[
  {
    "path": ".gitignore",
    "content": "# OS X\n.DS_Store\n\n# Xcode\nxcuserdata\nvm/RoarVM.xcodeproj/*.pbxuser\nvm/RoarVM.xcodeproj/*.perspectivev3\n*xcworkspace\n\n# Build dir\nvm/build/*.o\nvm/build/*.opt\nvm/build/Makefile\nvm/build/config.last\nvm/build/compiler_check\nvm/build/rvm\nvm/build/Debug/\nvm/build/Release/\nvm/build/RoarVM.build/\nvm/build/libgtest.a\nvm/build/rvm-test\nvm/src/tests/*.o\n\n# Unit tests\nvm/_trial_temp/\n*.pyc\n"
  },
  {
    "path": ".gitmodules",
    "content": "[submodule \"vm/googletest\"]\n\tpath = vm/googletest\n\turl = git://github.com/smarr/googletest.git\n"
  },
  {
    "path": "INSTALL.rst",
    "content": "Installation and Usage Instructions for the RoarVM\n==================================================\n\nThis file briefly describes how to compile and use the RoarVM.\n\nInstallation\n------------\n\nRequirements:\n\n - gcc, g++ (also tested with icc v11 on Linux)\n - Ubuntu: libx11-dev, libxext-dev\n - Mac OS X: Xcode Developer Tools\n\nCompilation:\n\nIn the standard case, calling ./configure ; make in the build directory\nshould be sufficient to compile the rvm executable::\n\n  $ cd build\n  $ ./configure\n  $ make\n\nCompilation for Debugging::\n\n  $ cd build\n  $ ./configure --debug\n  $ make\n\nKnown Issues:\n\nThe standard compiler on modern Linux systems is currently not fully\nsupported. Some of its optimizations lead to crashes in the RoarVM. Configure\nsupports a workaround which reduces the optimization level for affected files.\nUntil the bug in the RoarVM is fixed, please use::\n\n  $ ./configure --opt-workaround\n\nUsage\n-----\n\nThe RoarVM executable supports the following command-line interface::\n\n  ./rvm [options] <image-file> [app-params]\n  \n [options]       optional command-line parameters as detailed below \n <image-file>    a relative path to a Smalltalk image\n [app-params]    parameters given the application executed by the RoarVM\n\nCommand-line Parameters::\n\n -headless       initializes the RoarVM with a dummy display to avoid opening\n                 an X11 session, useful for command-line applications or\n                 benchmarks\n               \n -num_core N     starts the RoarVM with N interpreter instances, each running\n                 on a dedicated processor core\n               \n -geom N,M       starts the RoarVM with N*M interpreter instances, each\n                 running on a dedicated processor core. REMARK: this option is\n                 meant for TILE64 processors, where the interpreter instances\n                 are distributed on the 2D mesh of cores in an N*M layout\n\n -min_heap_MB N  sets the lower limit for the overall heap size\n                 \n\nFiling in RoarVM Changes\n''''''''''''''''''''''''\n\nTo use your current image on top of the RoarVM, a few changes need to be\napplied to the image.\n\n  1. Chose the suitable support file from /image.st/\n  2. Open you image (depending on the image, you need to use the SqueakVM)\n  3. Open a file list in your image\n  4. Pick the chosen support file and install it or file it in\n  5. Acknowledge the change to the Process class by pressing proceed in the\n     warning dialog window\n  6. Save and quit the image\n  7. Run RoarVM with a num_core setting > 1\n\nRemark:\n\n  The support for Squeak and Pharo has its limitations. Be aware that those\n  Smalltalks have not been developed with hardware parallelism in mind. It is\n  very likely that you will run into problems that are caused by the\n  assumption that only a single Smalltalk Process is active at a time, and\n  that the scheduler has certain properties like switching between processes\n  only at known places.\n\n"
  },
  {
    "path": "README",
    "content": "This branch is used to prepare the code for integration into the RoarVM.\nThe RoarVM uses a slightly different directory structure and supports only\na subset of the standard platforms of the SqueakVMs.\n\nSee https://github.com/smarr/RoarVM/blob/master/README.rst for details."
  },
  {
    "path": "README.rst",
    "content": "RoarVM - The Manycore SqueakVM\n==============================\n\n.. image:: https://github.com/smarr/RoarVM/raw/1591bb4e1c282f418231da77cf6d09ec31e2abe8/misc/RoarVM-logo-full.jpg\n   :align: left\n\nRoarVM, formerly known as the Renaissance Virtual Machine (RVM) is developed\nas part of a IBM Research project to investigate programming paradigms and\nlanguages for manycore systems of the future. Specifically, this VM is meant\nto support manycore systems with more than 1000 cores in the future.\n\nThe RVM was open sourced by IBM Research under the `Eclipse Public License`_.\nPlease see the `open source announcement`_ for further information.\n\nToday, the RoarVM supports the parallel execution of Smalltalk programs on x86\ncompatible multicore systems and Tilera TILE64-based manycore systems. It is\ntested with standard Squeak 4.1 closure-enabled images, and with a stripped\ndown version of a MVC-based Squeak 3.9 image.\n\nThe RoarVM provides parallel execution of Smalltalk processes and thus, the\nprogramming model is a typical shared-memory model similar to Java with its\nthreads and classical Pthreads for C/C++.\n\n.. _Eclipse Public License:   http://www.eclipse.org/legal/epl-v10.html\n.. _open source announcement: http://soft.vub.ac.be/~smarr/rvm-open-source-release/\n\nInstall and Use\n---------------\n\nPlease see the INSTALL.rst file.\n\nFeatures\n--------\n\nThe RoarVM is compatible with Squeak and its forks. However, the Smalltalk\nimages needs a number of changes to enable it to utilize more than one core\nand to interact with the VM correctly.\n\n - compatible with Squeak 4.1 and Pharo 1.2\n \n   - the RoarVM has full closure support\n   \n - Smalltalk processes are executed in parallel\n \n - tested with 8 cores, 16 hyperthreads on Intel systems\n\n - tested with 56 cores on Tilera TILE64/TILEPro64 processors\n \n - tested with Linux and Mac OS X 10.6\n\nPurpose\n-------\n\nThe source code of the RoarVM has been released as open source to enable the\nSmalltalk community to evaluate the ideas and possibly integrate them into\ntheir existing systems. The RoarVM provides the necessary functionality to\nexperiment with Smalltalk systems on multi- and manycore machines, which we\nwould like to encourage.\n\nHowever, we also welcome all contributions to the RoarVM itself. Either to\nbring it up to the speed of the existing VMs or to extend it for further\nexperiments.\n\n\nKnown Issues\n------------\n\nThe RoarVM is a research project and is not as optimized for performance as\nthe standard Squeak VM. Thus, its sequential performance is slower. This is\ndue to the fact that the RoarVM misses optimizations like using the GCC label\nas value extension to speed up the interpreter.\n\n - single core performance is slower than the Squeak VM\n \n   * Squeak 4.2.4beta1U, MVC image, OS X\n     554,844,390 bytecodes/sec; 12,213,718 sends/sec\n\n   * RoarVM, MVC image, OS X, 1 core\n     66,286,897 bytecodes/sec; 2,910,474 sends/sec\n   \n   * RoarVM, MVC image, OS X, 8 cores\n     470,588,235 bytecodes/sec; 19,825,677 sends/sec\n   \n - idle process does not yield when the RoarVM is run on more than one core\n\n   - the event processing is not adapted fully yet, thus, the idle process\n     is busy-waiting for performance reasons\n\n   - will drain your battery, on mobile devices\n\n - Garbage collector is as simple as possible\n\n   - it is neither concurrent nor parallel\n\n   - performance can be problematic\n\n - Graphical subsystem based on X11\n\n   - in contrast to todays Squeak VM, especially the OS X version,\n     the RoarVM uses solely X11 and does not integrate as well into the OS\n     as Squeak does\n\n - Stability should be ok, however, crashes can happen occasionally \n\n\nTechnical Overview\n------------------\n\nThe implementation details of the RoarVM are currently documented in:\n\n  [1] Hosting an Object Heap on Manycore Hardware: An Exploration,\n      by David Ungar, and Sam S. Adams, in Proceedings of the 5th Symposium on\n      Dynamic Languages, ACM (2009), p. 99-110.\n      http://portal.acm.org/citation.cfm?id=1640134.1640149\n  \n  As well as an VEE submission which is currently under review.\n  \nFurthermore, the design is based on the following earlier work:\n  \n  [2] Multiprocessor Smalltalk: A Case Study of a Multiprocessor-Based \n      Programming Environment\n      by Joseph Pallas, and David Ungar, in Proceedings of the ACM SIGPLAN\n      1988 Conference on Programming Language Design and Implementation,\n      ACM (1988), p. 268-277.\n      http://portal.acm.org/citation.cfm?id=54017\n\nThe RoarVM resembles the Squeak VM which is written in Smalltalk/Slang,\nhowever, it is rewritten in C++ to facilitate the development on manycore\narchitectures. The C source code of for instance plugins to the Squeak VM has\nbeen reused directly. This code is located in /src/from squeak/.\n\nThe support for x86 compatible multicore systems is currently based on POSIX\nthreads. Thus, the RoarVM can be started with a number of threads which are\nexecuted on distinct processor cores. On Tilera TILE64-based systems, the iLib\nlibrary is used and for each processor core a separate processes is started\nwhich executes an interpreter instance each. For both architectures, the VM\nprovides the illusion of a single object heap, spanning all of the cores, to\nthe Smalltalk user. Smalltalk processes are scheduled by a single scheduler on\nthe available processor cores, and thus, the processes can execute in\nparallel. For synchronization, the standard Smalltalk mechanisms are\navailable. Semaphores as well as mutexes work as in classical systems.\nCurrently, the RoarVM uses a single central scheduler which is based on the\ndesign of Pallas[2]. Its data structures are accessible from the image and\nonly require minimal modifications to the image, since the do not change the\ngeneral model of execution.\n\nA distinct feature of the RoarVM is its use of an object table. It was\nintroduced to reduce the necessary complexity to enable object migration\nbetween heaps on manycore architectures.\n\nTODO: add some remarks on the heap structure\n\nLicense\n-------\n\nCopyright (c) 2008 - 2010 IBM Corporation and others.\nAll rights reserved. This RoarVM and the accompanying materials are made\navailable under the terms of the Eclipse Public License v1.0 which accompanies\nthis distribution, and is available at:\n\n  http://www.eclipse.org/legal/epl-v10.html\n\nAll parts directly taken over from the original Squeak source code are\nlicensed under their original licenses.\n\nCredits\n-------\n\nSince the RoarVM is based on the work which has been done for Squeak, we would\nlike to acknowledge the Squeak community as a whole for its valuable work.\n\nThe RoarVM was designed and implemented as 'Renaissance VM' by\n  David Ungar and Sam Adams at IBM Research.\n\nIt was ported to x86 compatible multicore systems by\n  Stefan Marr at the Software Languages Lab, Vrije Universiteit Brussel.\n\nSpecial thanks go to Max OrHai for designing our logo.\n\n"
  },
  {
    "path": "image.st/RVM-multicore-support.mvc.st",
    "content": "'******************************************************************************\r *  Copyright (c) 2008 - 2010 IBM Corporation and others.\r *  All rights reserved. This program and the accompanying materials\r *  are made available under the terms of the Eclipse Public License v1.0\r *  which accompanies this distribution, and is available at\r *  http://www.eclipse.org/legal/epl-v10.html\r * \r *  Contributors:\r *    David Ungar, IBM Research - Initial Implementation\r *    Sam Adams, IBM Research - Initial Implementation\r *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\r ******************************************************************************'!\rDisplayText subclass: #Paragraph\r\tinstanceVariableNames: 'clippingRectangle compositionRectangle destinationForm rule mask marginTabsLevel lines lastLine destFormSema'\r\tclassVariableNames: ''\r\tpoolDictionaries: 'TextConstants'\r\tcategory: 'ST80-Support'!\rLink subclass: #Process\r\tinstanceVariableNames: 'suspendedContext priority myList errorHandler name hostCore coreMask'\r\tclassVariableNames: 'SemaForSuspensions'\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Processes'!\rObject subclass: #RVMPrimitives\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Support'!\rObject subclass: #ProcessorScheduler\r\tinstanceVariableNames: 'quiescentProcessLists activeProcess'\r\tclassVariableNames: 'BackgroundProcess EmergencyProcess HighIOPriority LowIOPriority SystemBackgroundPriority SystemRockBottomPriority TimingPriority UserBackgroundPriority UserInterruptPriority UserSchedulingPriority'\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Processes'!\rFileStream subclass: #StandardFileStream\r\tinstanceVariableNames: 'name fileID buffer1 interlock'\r\tclassVariableNames: 'Registry'\r\tpoolDictionaries: ''\r\tcategory: 'System-Files'!\rView subclass: #StandardSystemView\r\tinstanceVariableNames: 'labelFrame labelText isLabelComplemented savedSubViews minimumSize maximumSize collapsedViewport expandedViewport labelBits windowBits bitsValid updatablePanes displayInterlock'\r\tclassVariableNames: 'CacheBits LabelStyle'\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Support'!\rObject subclass: #Mutex\r\tinstanceVariableNames: 'semaphore owner'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Support'!\r!ProcessorScheduler methodsFor: 'accessing' stamp: 'dmu 11/25/2008 00:23'!\ractivePriority\r\t\"Answer the priority level of the currently running Process.\"\r\r\t^self thisProcess priority! !\r!ProcessorScheduler methodsFor: 'accessing' stamp: 'dmu 9/16/2010 14:53'!\rpreemptedProcess\r\t\"Return the process that the currently active process just preempted.\"\r\t| list listWithoutMe |\r\tself thisProcess priority to: 1 by: -1 do:[:priority|\r\t\tlist := quiescentProcessLists at: priority.\r\t\t\"RVM keeps running processes on the lists -- dmu 9/16/10\"\r\t\tlistWithoutMe := list reject: [:p | p == Processor thisProcess].\r\t\tlistWithoutMe isEmpty ifFalse:[^listWithoutMe last].\r\t].\r\t^nil\r\r\t\"Processor preemptedProcess\"! !\r!ProcessorScheduler methodsFor: 'process state change' stamp: 'dmu 11/25/2008 00:23'!\rterminateActive\r\t\"Terminate the process that is currently running.\"\r\r\tself thisProcess terminate! !\r!ProcessorScheduler methodsFor: 'RVM' stamp: 'dmu 6/14/2010 15:39'!\rareRunningProcessesInSchedulerLists\r\t\"Our RVM follows Pallas' MS system and keeps runnable processes in the scheduler lists even when running.\"\r\t^RVMPrimitives isRVM! !\r!ProcessorScheduler methodsFor: 'RVM' stamp: 'dmu 11/25/2008 00:26'!\risActive: aProcess\r^ aProcess suspendedContext ==  nil! !\r!ProcessorScheduler methodsFor: 'RVM' stamp: 'dmu 6/14/2010 15:32'!\rthisProcess\r\t^ RVMPrimitives thisProcess! !\r!ProcessorScheduler methodsFor: 'RVM' stamp: 'dmu 3/22/2010 13:03'!\ryieldIfFewerCoresThan: n\r\tRVMPrimitives coreCount < n    ifTrue: [self yield]! !\r!Project class methodsFor: 'utilities' stamp: 'dmu 11/25/2008 00:24'!\rspawnNewProcessAndTerminateOld: terminate\r\r\tself spawnNewProcess.\r\tterminate\r\t\tifTrue: [Processor terminateActive]\r\t\tifFalse: [Processor thisProcess suspend]! !\r!RVMPrimitives class methodsFor: 'debugging VM' stamp: 'dmu 6/8/2010 23:41'!\rbreakpoint\r\t<primitive: 'primitiveBreakpoint' module: 'RVMPrimitives'>\r\tself primitiveFailed! !\r!RVMPrimitives class methodsFor: 'debugging VM' stamp: 'dmu 6/9/2010 00:02'!\rprintExecutionTrace\r\t<primitive: 'primitivePrintExecutionTrace' module: 'RVMPlugin'>! !\r!RVMPrimitives class methodsFor: 'debugging VM' stamp: 'dmu 6/9/2010 00:01'!\rprintOnConsole: aString\r\t\"Prints a string onto the console\"\r\t<primitive: 'primitivePrint' module: 'RVMPlugin'>! !\r!RVMPrimitives class methodsFor: 'debugging VM' stamp: 'dmu 6/9/2010 00:00'!\rprintStack\r\t\"Prints Smalltalk stack to console\"\r\t<primitive: 'primitivePrintStack' module: 'RVMPlugin'>! !\r!RVMPrimitives class methodsFor: 'debugging VM' stamp: 'dmu 6/9/2010 00:01'!\rprintVMStatistics\r\t<primitive: 'primitivePrintStats' module: 'RVMPlugin'>! !\r!RVMPrimitives class methodsFor: 'VM statistics' stamp: 'dmu 6/8/2010 23:04'!\rsampleRVM\r\t\"Grab some data from the VM and return it\"\r\t<primitive: 'primitiveSampleRVM' module: 'RVMPlugin'>\r\t\"RVMPrimitives sampleRVM\"\r\t^ nil! !\r!RVMPrimitives class methodsFor: 'VM statistics' stamp: 'sm 10/27/2010 22:09'!\rgetMainRank\r\t\"Get a sample from the VM and read out the main rank\"\r\t| sample |\r\tsample := self sampleRVM.\r\t^ ((sample at: 6) at: 2) at: 6! !\r!RVMPrimitives class methodsFor: 'VM statistics' stamp: 'dmu 6/8/2010 23:40'!\rsampleSpecificData: flags\r\t\"Grab some data from the VM and return it\"\r\t\"Bit offsets for flags; bit 0 is 1, bit 1 is 2, bit 2 is 4, etc.\r\t\r\tallCores, // 0\r\trunMask,\r\tmessageNames,\r\tcpuCoreStats,\r\tallCoreStats,\r\tfence,\r\r\tmillisecs, // 6\r\tcycles,\r\tmessageStats,\r\tmemorySystemStats,\r    \tinterpreterStats,\r    \tobjectTableStats,\r    \tinteractionStats,\r\r   \t coreCoords, // 14\r    \tsendTallies,\r    \treceiveTallies,\r    \tbufferedMessageStats,\r    \treceiveCycles,\r\r    \t// memory system\r    \tgcStats, // 19\r    \theapStats,\r\r    \t// interpreter\r    \tbytecodes, // 20\r    \tyieldCount,\r    \tcycleCounts,\r    \tinterruptChecks,\r    \tmovedMutatedObjectStats,\r    \tmutexStats,\r   \t interpreterLoopStats // 26\"\r\r\t<primitive: 'primitiveSampleRVM' module: 'RVMPlugin'>\r\t^ nil! !\r!RVMPrimitives class methodsFor: 'rearranging objects' stamp: 'dmu 6/8/2010 23:58'!\rmoveAllToReadMostlyHeaps\r\t\"Move all objects into read-mostly heaps\"\r\t<primitive: 'primitiveMoveAllToReadMostlyHeaps' module: 'RVMPlugin'>\r\tself primitiveFailed! !\r!RVMPrimitives class methodsFor: 'rearranging objects' stamp: 'dmu 6/8/2010 23:55'!\rshuffleToHeapsFrom: firstHeap to: lastHeap\r\t\"Deal out all objects in the system into heaps from firstHeap through lastHeap in round-robin fashion so that adjacent objects wind up in different heaps\"\r\t<primitive: 'primitiveShuffle' module: 'RVMPlugin'>\r\t^ self primitiveFailed! !\r!RVMPrimitives class methodsFor: 'rearranging objects' stamp: 'dmu 6/8/2010 23:56'!\rshuffleToHeapsFrom: firstHeap to: lastHeap movingReadWriteObjectsToReadMostlyHeap: rwToRM  movingReadMostlyObjectsToReadWriteHeap: rmToRw\r\t\"Deal out all objects in the system into heaps from firstHeap through lastHeap in round-robin fashion so that adjacent objects wind up in different heaps\"\r\t\"If rwToRM, move objects in read/write heaps to read-mostly heaps.\"\r\t\"If rmToRW, move objects in read-mostly heaps to read/write heaps.\"\r\t<primitive: 'primitiveShuffle' module: 'RVMPlugin'>\r\t^ self primitiveFailed! !\r!RVMPrimitives class methodsFor: 'rearranging objects' stamp: 'dmu 6/8/2010 23:57'!\rspreadToHeapsFrom: firstHeap to: lastHeap\r\t\"Spread out all objects in the system into heaps from firstHeap through lastHeap so that each heap ends up about equally full.\"\r\t<primitive: 'primitiveSpread' module: 'RVMPlugin'>\r\t^ self primitiveFailed! !\r!RVMPrimitives class methodsFor: 'rearranging objects' stamp: 'dmu 6/8/2010 23:57'!\rspreadToHeapsFrom: firstHeap to: lastHeap movingReadWriteObjectsToReadMostlyHeap: rwToRM  movingReadMostlyObjectsToReadWriteHeap: rmToRw\r\t\"Spread out all objects in the system into heaps from firstHeap through lastHeap so that each heap ends up about equally full.\"\r\t\"If rwToRM, move objects in read/write heaps to read-mostly heaps.\"\r\t\"If rmToRW, move objects in read-mostly heaps to read/write heaps.\"\r\t<primitive: 'primitiveSpread' module: 'RVMPlugin'>\r\t^ self primitiveFailed! !\r!RVMPrimitives class methodsFor: 'situating an object' stamp: 'dmu 6/8/2010 23:30'!\rfor: anObject setRankTo: rank\r\t<primitive: 'primitiveSetCoordinatesFor' module: 'RVMPlugin'>\r\tself primitiveFailed! !\r!RVMPrimitives class methodsFor: 'situating an object' stamp: 'dmu 6/8/2010 23:31'!\rfor: anObject setRankTo: rank isReadWrite: isRW\r\t<primitive: 'primitiveSetCoordinatesFor' module: 'RVMPlugin'>\r\tself primitiveFailed! !\r!RVMPrimitives class methodsFor: 'situating an object' stamp: 'dmu 6/8/2010 23:17'!\rgetCoreOf: anObject\r\t\"RVMPrimitives getCoreOf: 2@3\"\r\t<primitive: 'primitiveGetCore' module: 'RVMPlugin'>\r\t^ -1! !\r!RVMPrimitives class methodsFor: 'situating an object' stamp: 'dmu 6/8/2010 23:47'!\rgetMutabilityOf: anObject\r\t\"Return true if argument is in a read/write heap, false if in read-mostly heap\"\r\t<primitive: 'primitiveGetMutability' module: 'RVMPlugin'>\r\t^ true! !\r!RVMPrimitives class methodsFor: 'enumerating a heap' stamp: 'dmu 6/8/2010 23:10'!\rallObjectsInHeap: rank isReadWrite: trueForReadWriteFalseForReadMostly\r\t\"return array of all objects in either read/write or read-mostly heap specified by rank and trueForReadWriteFalseForReadMostly\"\r\t\"RVMPrimitives allObjectsInHeap: 0 isReadWrite: true\"\r\t<primitive: 'primitiveAllObjectsInHeap' module: 'RVMPlugin'>\r\t^ nil! !\r!RVMPrimitives class methodsFor: 'processes' stamp: 'dmu 6/8/2010 23:18'!\rgetCoreIAmRunningOn\r\t\"RVMPrimitives getCoreIAmRunningOn\"\r\t<primitive: 'primitiveGetCoreIAmRunningOn' module: 'RVMPlugin' >\r  \t^ -1! !\r!RVMPrimitives class methodsFor: 'processes' stamp: 'dmu 6/8/2010 23:44'!\rgetRunMask\r\t\"Return an integer with ones corresponding to cores RVM is allowed to use: 1 means core 0, 3 means cores 0 and 1, etc.\"\r\t\"RVMPrimitives getRunMask printStringBase: 16\"\r\t<primitive: 'primitiveRunMask' module: 'RVMPlugin'>\r\t^ -1! !\r!RVMPrimitives class methodsFor: 'processes' stamp: 'dmu 6/9/2010 00:07'!\rgetRunningProcessesByCore\r\t\"Returns array of running processes, indexed by core (+1)\"\r\t<primitive: 'primitiveRunningProcessByCore' module: 'RVMPlugin'>\r\t^ self primitiveFailed! !\r!RVMPrimitives class methodsFor: 'processes' stamp: 'dmu 6/8/2010 23:46'!\rsetRunMask: anInteger\r\t\"Sets run mask to argument and returns old run mask.\r\tOnly cores set in run mask will be used to run Smalltalk processes.\"\r\t\"RVMPrimitives setRunMask: 1\"\r\t<primitive: 'primitiveRunMask' module: 'RVMPlugin'>\r\t^ -1! !\r!RVMPrimitives class methodsFor: 'processes' stamp: 'dmu 6/9/2010 00:04'!\rthisProcess\r\t\"Return the process that is running; RVM does not use ActiveProcess for this state, since many may be running\"\r\t<primitive: 'primitiveThisProcess'  module: 'RVMPlugin'>\r\t^ Processor activeProcess! !\r!RVMPrimitives class methodsFor: 'cores' stamp: 'dmu 6/8/2010 23:11'!\rcoreCount\r  \"RVMPrimitives coreCount\"\r  <primitive: 'primitiveCoreCount' module: 'RVMPlugin'>\r  ^ 1! !\r!RVMPrimitives class methodsFor: 'tracing' stamp: 'dmu 6/8/2010 23:25'!\rgetCoreTrace\r\t\"RVMPrimitives getCoreTrace\"\r\t<primitive: 'primitiveTraceCores' module: 'RVMPlugin'>\r\t^ self primitiveFailed! !\r!RVMPrimitives class methodsFor: 'tracing' stamp: 'dmu 6/8/2010 23:26'!\rgetMutatedReplicatedObjectsTrace\r\t<primitive: 'primitiveTraceMutatedReplicatedObjects' module: 'RVMPlugin'>\r\t^ self primitiveFailed! !\r!RVMPrimitives class methodsFor: 'tracing' stamp: 'dmu 6/8/2010 23:22'!\rstartCoreTrace: size\r\t\"RVMPrimitives startCoreTrace: 1000\"\r\t<primitive: 'primitiveTraceCores' module: 'RVMPlugin'>\r\t^ self primitiveFailed! !\r!RVMPrimitives class methodsFor: 'tracing' stamp: 'dmu 6/8/2010 23:27'!\rstartMutatedReplicatedObjectsTrace: size\r\t<primitive: 'primitiveTraceMutatedReplicatedObjects' module: 'RVMPlugin'>\r\t^ self primitiveFailed! !\r!RVMPrimitives class methodsFor: 'emergency evaluating' stamp: 'dmu 6/8/2010 23:19'!\rgetEmergencySemaphore\r\t\"When you hit shift-control-a, the VM will signal the emergency semaphore, if it has been set to a semaphore\"\r\t\"RVMPrimitives getEmergencySemaphore\"\r\t<primitive: 'primitiveEmergencySemaphore' module: 'RVMPlugin'>! !\r!RVMPrimitives class methodsFor: 'emergency evaluating' stamp: 'dmu 6/9/2010 00:06'!\rsetEmergencySemaphore: aSema\r\t\"When you hit shift-control-a, the VM will signal the emergency semaphore, if it has been set to a semaphore\"\r\t\"RVMPrimitives setEmergencySemaphore: Semaphore new\"\r\t<primitive: 'primitiveEmergencySemaphore' module: 'RVMPlugin'>! !\r!RVMPrimitives class methodsFor: 'using extra word' stamp: 'dmu 6/14/2010 15:27'!\rgetExtraPreheaderWordOf: anObject\r\t\"Returns the extra preheader word of the argument.\"\r\t\"RVMPrimitives getExtraPreheaderWordOf: 3@4\"\r\t<primitive: 'primitiveGetExtraPreheaderWord' module: 'RVMPlugin'>! !\r!RVMPrimitives class methodsFor: 'using extra word' stamp: 'dmu 6/14/2010 15:27'!\rsetExtraPreheaderWordOf: anObject to: newContents\r\t\"Sets the extra preheader word of the first argument.\"\r\t\"|n| n := 3@4.\r\tRVMPrimitives setExtraPreheaderWordOf: n to: 17.\r\tRVMPrimitives getExtraPreheaderWordOf: n\"\r\t<primitive: 'primitiveSetExtraPreheaderWord' module: 'RVMPlugin'>! !\r!RVMPrimitives class methodsFor: 'using extra word' stamp: 'dmu 6/9/2010 00:05'!\rsetExtraWordSelector: aSelector\r\t\"returns the old one\"\r\t<primitive: 'primitiveSetExtraWordSelector' module: 'RVMPlugin'>\r\t^self primitiveFailed! !\r!RVMPrimitives class methodsFor: 'testing' stamp: 'dmu 6/14/2010 15:36'!\risRVM\r\t\"RVMPrimitives isRVM\"\r\t^ (self getCoreOf: nil) ~= -1! !\r!BlockContext methodsFor: 'scheduling' stamp: 'dmu 6/14/2010 16:14'!\rvalueAt: blockPriority \r\t\"Evaluate the receiver (block), with another priority as the actual one \r\tand restore it afterwards. The caller should be careful with using \r\thigher priorities.\"\r\t| activeProcess result outsidePriority |\r\tactiveProcess := Processor thisProcess.\r\toutsidePriority := activeProcess priority.\r\tactiveProcess priority: blockPriority.\r\tresult := self\r\t\t\t\tensure: [activeProcess priority: outsidePriority].\r\t\"Yield after restoring lower priority to give the preempted processes a  \r\tchance to run.\"\r\tblockPriority > outsidePriority\r\t\tifTrue: [Processor yield].\r\t^ result! !\r!BlockContext methodsFor: 'private' stamp: 'dmu 11/25/2008 00:18'!\rvalueUnpreemptively\r\t\"Evaluate the receiver (block), without the possibility of preemption by higher priority processes. Use this facility VERY sparingly!!\"\r\t\"Think about using Block>>valueUninterruptably first, and think about using Semaphore>>critical: before that, and think about redesigning your application even before that!! \r\tAfter you've done all that thinking, go right ahead and use it...\"\r\t| activeProcess oldPriority result |\r\tactiveProcess := Processor thisProcess.\r\toldPriority := activeProcess priority.\r\tactiveProcess priority: Processor highestPriority.\r\tresult := self ensure: [activeProcess priority: oldPriority].\r\t\"Yield after restoring priority to give the preempted processes a chance to run\"\r\tProcessor yield.\r\t^result! !\r!CPUWatcher methodsFor: 'process operations' stamp: 'dmu 11/25/2008 00:18'!\rdebugProcess: aProcess\r\t| uiPriority oldPriority |\r\tuiPriority := Processor thisProcess priority.\r\taProcess priority >= uiPriority ifTrue: [\r\t\toldPriority := ProcessBrowser setProcess: aProcess toPriority: uiPriority - 1\r\t].\r\tProcessBrowser debugProcess: aProcess.! !\r!ControlManager methodsFor: 'scheduling' stamp: 'dmu 11/25/2008 00:19'!\rinActiveControllerProcess\r\t\"Answer whether the active scheduling process is the actual active \r\tprocess in the system.\"\r\r\t^activeControllerProcess == Processor thisProcess! !\r!ControlManager methodsFor: 'scheduling' stamp: 'dmu 11/25/2008 00:19'!\rresetActiveController\r\t\"When saving a morphic project whose parent is mvc, we need to set this up first\"\r\r\tactiveController := nil.\r\tactiveControllerProcess := Processor thisProcess.\r! !\r!ControlManager methodsFor: 'scheduling' stamp: 'dmu 11/25/2008 00:20'!\rscheduleActiveNoTerminate: aController \r\t\"Make aController be the active controller. Presumably the process that \r\trequested the new active controller wants to keep control to do more \r\tactivites before the new controller can take control. Therefore, do not \r\tterminate the currently active process.\"\r\r\tself schedulePassive: aController.\r\tself scheduled: aController\r\t\tfrom: Processor thisProcess! !\r!ControlManager methodsFor: 'scheduling' stamp: 'dmu 11/25/2008 00:20'!\rsearchForActiveController\r\t\"Find a scheduled controller that wants control and give control to it. If \r\tnone wants control, then see if the System Menu has been requested.\"\r\t| aController |\r\tactiveController := nil.\r\tactiveControllerProcess := Processor thisProcess.\r\tself activeController: self nextActiveController.\r\tProcessor terminateActive! !\r!Cursor methodsFor: 'displaying' stamp: 'dmu 6/14/2010 16:15'!\rshowWhile: aBlock \r\t\"While evaluating the argument, aBlock, make the receiver be the cursor shape.\"\r\t\"ar 2/2/2006: Only allow this if active process is ui process\"\r\t| oldcursor |\r\tProcessor thisProcess == Project uiProcess ifFalse:[^aBlock value].\r\toldcursor := Sensor currentCursor.\r\tself show.\r\t^aBlock ensure: [oldcursor show]\r! !\r!Paragraph methodsFor: 'RVM' stamp: 'dmu 6/15/2010 11:36'!\rdestFormSema: s\r\tdestFormSema := s! !\r!Paragraph methodsFor: 'private' stamp: 'ssa 4/7/2009 12:39'!\rdisplayOn: aDisplayMedium lines: lineInterval\r\r\t| saveDestinationForm |\r\tdestFormSema isNil ifTrue:[self destFormSema: Semaphore forMutualExclusion].\r\tdestFormSema critical: [\r\t\tsaveDestinationForm _ destinationForm.\r\t\tself destinationForm: aDisplayMedium.\r\t\tself displayLines: lineInterval.\r\t\tdestinationForm _ saveDestinationForm\r\t]! !\r!Process methodsFor: 'accessing' stamp: 'ssa 2/17/2009 22:34'!\risActiveProcess\r\r\t^ Processor areRunningProcessesInSchedulerLists\r\t\tifTrue: [ suspendedContext isNil and:[myList notNil]]\r\t\tifFalse: [self == Processor activeProcess]! !\r!Process methodsFor: 'changing process state' stamp: 'dmu 6/14/2010 16:16'!\rrun\r\t\"Suspend current process and execute self instead\"\r\r\t| proc |\r\tproc := Processor thisProcess.\r\t[\tproc suspend.\r\t\tself resume.\r\t] forkAt: Processor highestPriority! !\r!Process methodsFor: 'changing process state' stamp: 'dmu 3/24/2010 15:44'!\rsuspend\r\t\"Stop the process that the receiver represents in such a way \r\tthat it can be restarted at a later time (by sending the receiver the \r\tmessage resume). If the receiver represents the activeProcess, suspend it. \r\tOtherwise remove the receiver from the list of waiting processes.\"\r\tself isActiveProcess ifTrue: [\r\t\tself nilMyListUnlessRVM.\r\t\tself primitiveSuspend.\r\t] ifFalse: [\r\t\tmyList ifNotNil: [\r\t\t\tmyList remove: self ifAbsent: [].\r\t\t\tmyList := nil].\r\t]\r! !\r!Process methodsFor: 'changing process state' stamp: 'dmu 3/24/2010 15:45'!\rterminate \r\t\"Stop the process that the receiver represents forever.  Unwind to execute pending ensure:/ifCurtailed: blocks before terminating.\"\r\r\t| ctxt unwindBlock |\r\tself == Processor thisProcess  ifTrue: [\r\t\tctxt := thisContext.\r\t\t[\tctxt := ctxt findNextUnwindContextUpTo: nil.\r\t\t\tctxt isNil\r\t\t] whileFalse: [\r\t\t\tunwindBlock := ctxt tempAt: 1.\r\t\t\tunwindBlock ifNotNil: [\r\t\t\t\tctxt tempAt: 1 put: nil.\r\t\t\t\tthisContext terminateTo: ctxt.\r\t\t\t\tunwindBlock value].\r\t\t].\r\t\tthisContext terminateTo: nil.\r\t\tself nilMyListUnlessRVM.\r\t\tself primitiveSuspend.\r\t] ifFalse: [\r\t        self suspend.\r\t\tmyList ifNotNil: [\r\t\t\tmyList remove: self ifAbsent: [].\r\t\t\tmyList := nil].\r\t\tsuspendedContext ifNotNil: [\r\t\t\tctxt := self popTo: suspendedContext bottomContext.\r\t\t\tctxt == suspendedContext bottomContext ifFalse: [\r\t\t\t\tself debug: ctxt title: 'Unwind error during termination']].\r\t].\r! !\r!Process methodsFor: 'changing suspended state' stamp: 'dmu 12/2/2008 14:05'!\ractivateReturn: aContext value: value\r\t\"Activate 'aContext return: value', so execution will return to aContext's sender\"\r\tself suspend.\r\t^ suspendedContext := suspendedContext activateReturn: aContext value: value! !\r!Process methodsFor: 'changing suspended state' stamp: 'dmu 12/2/2008 14:01'!\rcomplete: aContext \r\t\"Run self until aContext is popped or an unhandled error is raised.  Return self's new top context, unless an unhandled error was raised then return the signaler context (rather than open a debugger).\"\r\t\r\t| ctxt pair error |\r\tself suspend.\r\tctxt := suspendedContext.\r\tsuspendedContext := nil.  \"disable this process while running its stack in active process below\"\r\tpair := ctxt runUntilErrorOrReturnFrom: aContext.\r\tsuspendedContext := pair first.\r\terror := pair second.\r\terror ifNotNil: [^ error signalerContext].\r\t^ suspendedContext! !\r!Process methodsFor: 'changing suspended state' stamp: 'dmu 6/14/2010 16:06'!\rinstall: aContext \r\t\"Replace the suspendedContext with aContext.\"\r\r\t(Processor isActive: self)\r\t\tifTrue: [^self error: 'An active process cannot install contexts'].\r\tsuspendedContext := aContext! !\r!Process methodsFor: 'changing suspended state' stamp: 'dmu 6/14/2010 16:07'!\rpopTo: aContext \r\t\"Pop self down to aContext by remote returning from aContext's callee.  Unwind blocks will be executed on the way.\r\tThis is done by pushing a new context on top which executes 'aContext callee return' then resuming self until aContext is reached.  This way any errors raised in an unwind block will get handled by senders in self and not by senders in the activeProcess.\r\tIf an unwind block raises an error that is not handled then the popping stops at the error and the signalling context is returned, othewise aContext is returned.\"\r\r\t| callee |\r\t(Processor isActive: self)\r\t\tifTrue: [^ self error: 'An active process cannot pop contexts'].\r\tcallee := (self calleeOf: aContext) ifNil: [^ aContext].  \"aContext is on top\"\r\t^ self return: callee value: callee receiver! !\r!Process methodsFor: 'changing suspended state' stamp: 'dmu 6/14/2010 16:08'!\rpopTo: aContext value: aValue\r\t\"Replace the suspendedContext with aContext, releasing all contexts \r\tbetween the currently suspendedContext and it.\"\r\r\t| callee |\r\t(Processor isActive: self)\r\t\tifTrue: [^ self error: 'An active process cannot pop contexts'].\r\tcallee := (self calleeOf: aContext) ifNil: [^ self].  \"aContext is on top\"\r\tself return: callee value: aValue! !\r!Process class methodsFor: 'accessing' stamp: 'ssa 3/25/2010 15:11'!\rsemaForSuspensions\r\r\tSemaForSuspensions isNil ifTrue:[SemaForSuspensions := Semaphore forMutualExclusion].\r\t^SemaForSuspensions! !\r!Process methodsFor: 'debugging' stamp: 'dmu 9/17/2010 12:03'!\rdebug: context title: title full: bool\r\t\"Open debugger on self with context shown on top\"\r\r\t| topCtxt |\r\ttopCtxt :=  self == Processor thisProcess  ifTrue: [thisContext] \r\t\tifFalse: [\r\t\t\tself suspend.  \r\t\t\tself suspendedContextWaitingIfNecessary].\r\t(topCtxt hasContext: context) ifFalse: [^ self error: 'context not in process'].\r\r\t\tTranscript cr; show: 'launching debugger'.\r\tDebugger openOn: self context: context label: title contents: nil fullView: bool.\r! !\r!Process methodsFor: 'debugging' stamp: 'dmu 9/17/2010 12:03'!\rdebugWithTitle: title\r\t\"Open debugger on self\"\r\r\t| context |\r\tcontext := self == Processor thisProcess  ifTrue: [thisContext] ifFalse: [ self suspend.  self suspendedContextWaitingIfNecessary].\r\tself debug: context title: title full: true.\r! !\r!Process methodsFor: 'signaling' stamp: 'ssa 2/17/2009 22:31'!\rpvtSignal: anException list: aList\r\t\"Private. This method is used to signal an exception from another\r\tprocess...the receiver must be the active process.  If the receiver \r\twas previously waiting on a Semaphore, then return the process\r\tto the waiting state after signaling the exception and if the Semaphore\r\thas not been signaled in the interim\"\r\r\t\"Since this method is not called in a normal way, we need to take care\r\tthat it doesn't directly return to the caller (because I believe that could\r\thave the potential to push an unwanted object on the caller's stack).\"\r\r\t| blocker |\r\tself == Processor thisProcess ifFalse: [^self].\r\tself suspend.\r\tanException signal.\r\tblocker := Semaphore new.\r\t[self suspend.\r\tsuspendedContext := suspendedContext swapSender: nil.\r\taList class == Semaphore \r\t\tifTrue:\r\t\t\t[aList isSignaled\r\t\t\t\tifTrue: \r\t\t\t\t\t[aList wait.  \"Consume the signal that would have restarted the receiver\"\r\t\t\t\t\tself resume]\r\t\t\t\tifFalse:\r\t\t\t\t\t[\"Add us back to the Semaphore's list (and remain blocked)\"\r\t\t\t\t\tmyList := aList.\r\t\t\t\t\taList add: self]]\r\t\tifFalse: [self resume]] fork.\r\tblocker wait.\r\r\r! !\r!Process methodsFor: 'signaling' stamp: 'dmu 6/14/2010 16:11'!\rsignalException: anException\r\t\"Signal an exception in the receiver process...if the receiver is currently\r\tsuspended, the exception will get signaled when the receiver is resumed.  If \r\tthe receiver is blocked on a Semaphore, it will be immediately re-awakened\r\tand the exception will be signaled; if the exception is resumed, then the receiver\r\twill return to a blocked state unless the blocking Semaphore has excess signals\"\r\t| oldList |\r\t\"If we are the active process, go ahead and signal the exception\"\r\tself == Processor thisProcess  ifTrue: [^anException signal].\r\r\t\"Suspend myself first to ensure that I won't run away in the\r\tmidst of the following modifications.\"\r\tmyList ifNotNil:[oldList := self suspend].\r\r\t\"Add a new method context to the stack that will signal the exception\"\r\tsuspendedContext := MethodContext\r\t\tsender: suspendedContext\r\t\treceiver: self\r\t\tmethod: (self class lookupSelector: #pvtSignal:list:)\r\t\targuments: (Array with: anException with: oldList).\r\r\t\"If we are on a list to run, then suspend and restart the receiver \r\t(this lets the receiver run if it is currently blocked on a semaphore).  If\r\twe are not on a list to be run (i.e. this process is suspended), then when the\r\tprocess is resumed, it will signal the exception\"\r\r\toldList ifNotNil: [self resume].\r! !\r!Process methodsFor: 'RVM' stamp: 'dmu 6/14/2010 15:40'!\rcoreMask\r\t^ coreMask! !\r!Process methodsFor: 'RVM' stamp: 'dmu 6/14/2010 15:40'!\rcoreMask: m\r\tcoreMask := m! !\r!Process methodsFor: 'RVM' stamp: 'dmu 6/14/2010 15:41'!\rhostCore\r\t^ hostCore! !\r!Process methodsFor: 'RVM' stamp: 'dmu 6/14/2010 15:31'!\risRunning\r\tProcessor thisProcess == self ifTrue: [^ true].\r\tself isActiveProcess ifTrue: [^ true].\r\tmyList ifNil: [^ false].\r\t^ myList class ~~ Semaphore! !\r!Process methodsFor: 'RVM' stamp: 'ssa 3/2/2010 18:23'!\rnilMyListUnlessRVM\r\tProcessor areRunningProcessesInSchedulerLists ifFalse: [\r\t\t\"primitiveSuspend will use myList to remove from list and will nil it out\"\r\t\tmyList := nil.\r\t]! !\r!ProcessBrowser methodsFor: 'stack list' stamp: 'dmu 6/14/2010 16:17'!\rupdateStackList: depth \r\t| suspendedContext oldHighlight |\r\tselectedProcess\r\t\tifNil: [^ self changeStackListTo: nil].\r\t(stackList notNil and: [ stackListIndex > 0 ])\r\t\tifTrue: [oldHighlight := stackList at: stackListIndex].\r\tselectedProcess == Processor thisProcess\r\t\tifTrue: [self\r\t\t\t\tchangeStackListTo: (thisContext stackOfSize: depth)]\r\t\tifFalse: [suspendedContext := selectedProcess suspendedContext.\r\t\t\tsuspendedContext\r\t\t\t\tifNil: [self changeStackListTo: nil]\r\t\t\t\tifNotNil: [self\r\t\t\t\t\t\tchangeStackListTo: (suspendedContext stackOfSize: depth)]].\r\tself\r\t\tstackListIndex: (stackList\r\t\t\t\tifNil: [0]\r\t\t\t\tifNotNil: [stackList indexOf: oldHighlight])! !\r!ProcessBrowser class methodsFor: 'process control' stamp: 'ssa 6/11/2010 14:35'!\rnameAndRulesFor: aProcess \r\t\"Answer a nickname and two flags: allow-stop, and allow-debug\"\r\t^ [aProcess caseOf: {\r\t\t[ProcessorScheduler emergencyProcess] -> [{'emergency evaluator ShftCtrl-A'. false. true}].\r\t\t[] -> [{'no process'. false. false}].\r\t\t[Smalltalk lowSpaceWatcherProcess] -> [{'the low space watcher'. false. false}].\r\t\t[WeakArray runningFinalizationProcess] -> [{'the WeakArray finalization process'. false. false}].\r\t\t[Processor thisProcess] -> [{'the UI process'. false. true}].\r\t\t[Processor backgroundProcess] -> [{'the idle process'. false. false}].\r\t\t[Sensor interruptWatcherProcess] -> [{'the user interrupt watcher'. false. false}].\r\t\t[Sensor eventTicklerProcess] -> [{'the event tickler'. false. false}].\r\t\t[Project uiProcess] -> [{'the inactive Morphic UI process'. false. false}].\r\t\t[Smalltalk\r\t\t\tat: #SoundPlayer\r\t\t\tifPresent: [:sp | sp playerProcess]] -> [{'the Sound Player'. false. false}].\r\t\t[ScheduledControllers\r\t\t\tifNotNil: [ScheduledControllers activeControllerProcess]] -> [{'the inactive MVC controller process'. false. true}].\r\t\t[Smalltalk\r\t\t\tat: #CPUWatcher\r\t\t\tifPresent: [:cw | cw currentWatcherProcess]] -> [{'the CPUWatcher'. false. false}]}\r\t\t otherwise: \r\t\t\t[(aProcess priority = Processor timingPriority\r\t\t\t\t\tand: [aProcess suspendedContext receiver == Delay])\r\t\t\t\tifTrue: [{'the timer interrupt watcher'. false. false}]\r\t\t\t\tifFalse: [{aProcess suspendedContext asString. true. true}]]]\r\t\tifError: [:err :rcvr | {aProcess suspendedContext asString. true. true}]! !\r!Paragraph reorganize!\r('accessing' backgroundColor clippingRectangle clippingRectangle: compositionRectangle compositionRectangle: destinationForm fillColor fillColor: height indentationOfLineIndex:ifBlank: mask numberOfLines replaceFrom:to:with:displaying: rule rule: stringAtLineNumber: text:)\r('alignment' centered justified leftFlush rightFlush toggleAlignment)\r('character location' characterBlockAtPoint: characterBlockForIndex: defaultCharacterBlock)\r('composition' composeAll wrappingBox:clippingBox:)\r('converting' asForm asString asText)\r('display box access' boundingBox computeBoundingBox)\r('displaying' displayOn: displayOn:at: displayOn:at:clippingBox:rule:fillColor: displayOn:transformation:clippingBox:align:with:rule:fillColor:)\r('indicating' flash outline)\r('scrolling' scrollBy: scrollBy:withSelectionFrom:to: scrollDelta scrollUncheckedBy:withSelectionFrom:to:)\r('selecting' caretFormForDepth: clickAt:for:controller: extendSelectionAt:endBlock: extendSelectionMark:pointBlock: hiliteRect: mouseMovedFrom:pivotBlock:showingCaret: mouseSelect mouseSelect: reverseFrom:to: selectionRectsFrom:to:)\r('utilities' clearVisibleRectangle deepCopy destinationForm: fit lines: visibleRectangle)\r('RVM' destFormSema:)\r('private' bottomAtLineIndex: compositionRectangle:text:style:offset: compositionRectangleDelta displayLines: displayLines:affectedRectangle: displayOn:lines: leftMarginForCompositionForLine: leftMarginForDisplayForLine:alignment: lineAt:put: lineIndexOfCharacterIndex: lineIndexOfTop: lines moveBy: rightMarginForComposition rightMarginForDisplay setWithText:style: setWithText:style:compositionRectangle:clippingRectangle: setWithText:style:compositionRectangle:clippingRectangle:foreColor:backColor: topAtLineIndex: topAtLineIndex:using:and: trimLinesTo: updateCompositionHeight withClippingRectangle:do:)\r!\r\r!BitBlt methodsFor: 'accessing' stamp: 'dmu 4/4/2009 00:24'!\rcopyBitsOnMain\r\t\"Primitive. Perform the movement of bits from the source form to the \r\tdestination form. Fail if any variables are not of the right type (Integer, \r\tFloat, or Form) or if the combination rule is not implemented. \r\tIn addition to the original 16 combination rules, this BitBlt supports\r\t16\tfail (to simulate paint)\r\t17\tfail (to simulate mask)\r\t18\tsourceWord + destinationWord\r\t19\tsourceWord - destinationWord\r\t20\trgbAdd: sourceWord with: destinationWord\r\t21\trgbSub: sourceWord with: destinationWord\r\t22\trgbDiff: sourceWord with: destinationWord\r\t23\ttallyIntoMap: destinationWord\r\t24\talphaBlend: sourceWord with: destinationWord\r\t25\tpixPaint: sourceWord with: destinationWord\r\t26\tpixMask: sourceWord with: destinationWord\r\t27\trgbMax: sourceWord with: destinationWord\r\t28\trgbMin: sourceWord with: destinationWord\r\t29\trgbMin: sourceWord bitInvert32 with: destinationWord\r\"\r\t<primitive: 'primitiveCopyBits' module: 'BitBltPlugin'>\r\r\t\"Check for compressed source, destination or halftone forms\"\r\t(combinationRule >= 30 and: [combinationRule <= 31]) ifTrue:\r\t\t[\"No alpha specified -- re-run with alpha = 1.0\"\r\t\t^ self copyBitsTranslucent: 255].\r\t((sourceForm isForm) and: [sourceForm unhibernate])\r\t\tifTrue: [^ self copyBits].\r\t((destForm isForm) and: [destForm unhibernate])\r\t\tifTrue: [^ self copyBits].\r\t((halftoneForm isForm) and: [halftoneForm unhibernate])\r\t\tifTrue: [^ self copyBits].\r\r\t\"Check for unimplmented rules\"\r\tcombinationRule = Form oldPaint ifTrue: [^ self paintBits].\r\tcombinationRule = Form oldErase1bitShape ifTrue: [^ self eraseBits].\r\r\t\"Check if BitBlt doesn't support full color maps\"\r\t(colorMap notNil and:[colorMap isColormap]) ifTrue:[\r\t\tcolorMap _ colorMap colors.\r\t\t^self copyBits].\r\t\"Check if clipping gots us way out of range\"\r\tself clipRange ifTrue:[^self copyBits].\r\r\tself error: 'Bad BitBlt arg (Fraction?); proceed to convert.'.\r\t\"Convert all numeric parameters to integers and try again.\"\r\tdestX _ destX asInteger.\r\tdestY _ destY asInteger.\r\twidth _ width asInteger.\r\theight _ height asInteger.\r\tsourceX _ sourceX asInteger.\r\tsourceY _ sourceY asInteger.\r\tclipX _ clipX asInteger.\r\tclipY _ clipY asInteger.\r\tclipWidth _ clipWidth asInteger.\r\tclipHeight _ clipHeight asInteger.\r\t^ self copyBitsAgain! !\r!BitBlt methodsFor: 'copying' stamp: 'dmu 4/4/2009 00:20'!\rcopyBitsLocally\r\t\"Primitive. Perform the movement of bits from the source form to the \r\tdestination form. Fail if any variables are not of the right type (Integer, \r\tFloat, or Form) or if the combination rule is not implemented. \r\tIn addition to the original 16 combination rules, this BitBlt supports\r\t16\tfail (to simulate paint)\r\t17\tfail (to simulate mask)\r\t18\tsourceWord + destinationWord\r\t19\tsourceWord - destinationWord\r\t20\trgbAdd: sourceWord with: destinationWord\r\t21\trgbSub: sourceWord with: destinationWord\r\t22\trgbDiff: sourceWord with: destinationWord\r\t23\ttallyIntoMap: destinationWord\r\t24\talphaBlend: sourceWord with: destinationWord\r\t25\tpixPaint: sourceWord with: destinationWord\r\t26\tpixMask: sourceWord with: destinationWord\r\t27\trgbMax: sourceWord with: destinationWord\r\t28\trgbMin: sourceWord with: destinationWord\r\t29\trgbMin: sourceWord bitInvert32 with: destinationWord\r\"\r\t<primitive: 'primitiveCopyBitsLocally'>\r\r\t\"Check for compressed source, destination or halftone forms\"\r\t(combinationRule >= 30 and: [combinationRule <= 31]) ifTrue:\r\t\t[\"No alpha specified -- re-run with alpha = 1.0\"\r\t\t^ self copyBitsTranslucent: 255].\r\t((sourceForm isForm) and: [sourceForm unhibernate])\r\t\tifTrue: [^ self copyBits].\r\t((destForm isForm) and: [destForm unhibernate])\r\t\tifTrue: [^ self copyBits].\r\t((halftoneForm isForm) and: [halftoneForm unhibernate])\r\t\tifTrue: [^ self copyBits].\r\r\t\"Check for unimplmented rules\"\r\tcombinationRule = Form oldPaint ifTrue: [^ self paintBits].\r\tcombinationRule = Form oldErase1bitShape ifTrue: [^ self eraseBits].\r\r\t\"Check if BitBlt doesn't support full color maps\"\r\t(colorMap notNil and:[colorMap isColormap]) ifTrue:[\r\t\tcolorMap _ colorMap colors.\r\t\t^self copyBits].\r\t\"Check if clipping gots us way out of range\"\r\tself clipRange ifTrue:[^self copyBits].\r\r\tself error: 'Bad BitBlt arg (Fraction?); proceed to convert.'.\r\t\"Convert all numeric parameters to integers and try again.\"\r\tdestX _ destX asInteger.\r\tdestY _ destY asInteger.\r\twidth _ width asInteger.\r\theight _ height asInteger.\r\tsourceX _ sourceX asInteger.\r\tsourceY _ sourceY asInteger.\r\tclipX _ clipX asInteger.\r\tclipY _ clipY asInteger.\r\tclipWidth _ clipWidth asInteger.\r\tclipHeight _ clipHeight asInteger.\r\t^ self copyBitsAgain! !\r!BitBlt methodsFor: 'line drawing' stamp: 'dmu 4/3/2009 23:01'!\rdrawLoopLocallyX: xDelta Y: yDelta \r\t\"Primitive. Implements the Bresenham plotting algorithm (IBM Systems\r\tJournal, Vol. 4 No. 1, 1965). It chooses a principal direction, and\r\tmaintains a potential, P. When P's sign changes, it is time to move in\r\tthe minor direction as well. This particular version does not write the\r\tfirst and last points, so that these can be called for as needed in client code.\r\tOptional. See Object documentation whatIsAPrimitive.\"\r\t| |\r\t<primitive: 'primitiveDrawLoopLocally'>\rself primitiveFailed! !\r!BitBlt methodsFor: 'line drawing' stamp: 'ssa 4/3/2009 22:36'!\rglobalDrawLoopX: xDelta Y: yDelta \r\t\"Primitive. Implements the Bresenham plotting algorithm (IBM Systems\r\tJournal, Vol. 4 No. 1, 1965). It chooses a principal direction, and\r\tmaintains a potential, P. When P's sign changes, it is time to move in\r\tthe minor direction as well. This particular version does not write the\r\tfirst and last points, so that these can be called for as needed in client code.\r\tOptional. See Object documentation whatIsAPrimitive.\"\r\t| dx dy px py P |\r\t<primitive: 'primitiveDrawLoop' module: 'BitBltPlugin'>\r\tdx _ xDelta sign.\r\tdy _ yDelta sign.\r\tpx _ yDelta abs.\r\tpy _ xDelta abs.\r\t\"self copyBits.\"\r\tpy > px\r\t\tifTrue: \r\t\t\t[\"more horizontal\"\r\t\t\tP _ py // 2.\r\t\t\t1 to: py do: \r\t\t\t\t[:i |\r\t\t\t\tdestX _ destX + dx.\r\t\t\t\t(P _ P - px) < 0 ifTrue: \r\t\t\t\t\t\t[destY _ destY + dy.\r\t\t\t\t\t\tP _ P + py].\r\t\t\t\ti < py ifTrue: [self copyBits]]]\r\t\tifFalse: \r\t\t\t[\"more vertical\"\r\t\t\tP _ px // 2.\r\t\t\t1 to: px do:\r\t\t\t\t[:i |\r\t\t\t\tdestY _ destY + dy.\r\t\t\t\t(P _ P - py) < 0 ifTrue: \r\t\t\t\t\t\t[destX _ destX + dx.\r\t\t\t\t\t\tP _ P + px].\r\t\t\t\ti < px ifTrue: [self copyBits]]]! !\r!BitBlt methodsFor: 'line drawing' stamp: 'ssa 4/3/2009 22:52'!\rlocalDrawLoopX: xDelta Y: yDelta \r\t\"Primitive\"\r\t<primitive: 'primitiveDrawLoopLocally'>\r\t^self primitiveFailed! !\r!ControlManager methodsFor: 'accessing' stamp: 'ssa 3/25/2010 16:14'!\ractiveControllerNoTerminate: aController andProcess: aProcess\r\t\"Set aController to be the currently active controller and aProcess to be \r\tthe process that handles controller scheduling activities in the \r\tsystem. This message differs from activeController:andProcess: in that it \r\tdoes not send controlTerminate to the currently active controller.\"\r\r\tself inActiveControllerProcess\r\t\tifTrue: \r\t\t\t[aController~~nil\r\t\t\t\tifTrue: [(scheduledControllers includes: aController)\r\t\t\t\t\t\t\tifTrue: [self promote: aController]\r\t\t\t\t\t\t\tifFalse: [self error: 'Old controller not scheduled']].\r\t\t\tactiveController _ aController.\r\t\t\tactiveController == nil\r\t\t\t\tifFalse: [activeController controlInitialize].\r\t\t\tactiveControllerProcess _ aProcess.\r\t\t\tactiveControllerProcess resume]\r\t\tifFalse: \r\t\t\t['New active controller process must be set from old one, resetting...' print.\r\t\t\tself reset.\r\t\t\t] ! !\r!ControlManager methodsFor: 'scheduling' stamp: 'ssa 3/2/2010 14:12'!\rinterruptName: labelString\r\t\"Create a Notifier on the active scheduling process with the given label. Make the Notifier the active controller.\"\r\t| suspendingList newActiveController |\r\t(suspendingList _ activeControllerProcess suspendingList) == nil\r\t\tifTrue: [activeControllerProcess == Processor thisProcess\r\t\t\t\t\tifTrue: [activeControllerProcess suspend]]\r\t\tifFalse: [suspendingList remove: activeControllerProcess ifAbsent:[].\r\t\t\t\tactiveControllerProcess offList].\r\r\tactiveController ~~ nil ifTrue: [\r\t\t\"Carefully de-emphasis the current window.\"\r\t\tactiveController view topView deEmphasizeForDebugger].\r\r\tnewActiveController _\r\t\t(Debugger\r\t\t\topenInterrupt: labelString \r\t\t\tonProcess: activeControllerProcess) controller.\r\tnewActiveController centerCursorInView.\r\tself activeController: newActiveController.\r! !\r!ControlManager methodsFor: 'scheduling' stamp: 'ssa 3/25/2010 16:17'!\rreset\r\t\"ssa - reset the window controller process\"\r\t| newProcess |\r\tnewProcess := [ScheduledControllers resetActiveController.\r\t\t\tScheduledControllers searchForActiveController] fixTemps newProcess priority: Processor userSchedulingPriority.\r\tnewProcess resume.\r\t\"lose the current process\"\r\t\"Processor terminateActive\"! !\r!Controller methodsFor: 'basic control sequence' stamp: 'dmu 3/22/2010 14:25'!\rinterActivityPause\r\t\"if we are looping quickly, insert a short delay.  Thus if we are just doing UI stuff, we won't take up much CPU\"\r\t| currentTime wait |\r\t[RVMPrimitives isRVM ifTrue: [Processor yield. ^ self].].\r\tMinActivityLapse ifNotNil: [\r\t\tlastActivityTime ifNotNil: [ \r\t\t\tcurrentTime _ Time millisecondClockValue.\r\t\t\twait _ lastActivityTime + MinActivityLapse - currentTime.\r\t\t\twait > 0 ifTrue: [ \r\t\t\t\twait <= MinActivityLapse  \"big waits happen after a snapshot\"\r\t\t\t\t\tifTrue: [DisplayScreen checkForNewScreenSize.\r\t\t\t\t\t\t\t\"(Delay forMilliseconds: wait) wait \"]. ]. ]. ].\r\r\tlastActivityTime _ Time millisecondClockValue.! !\r\r!EventSensor methodsFor: 'accessing' stamp: 'ssa 12/17/2009 12:30'!\rnextEvent\r\t\"Return the next event from the receiver.\"\r\teventQueue == nil \r\t\tifTrue:[^self nextEventSynthesized]\r\t\tifFalse:[^self nextEventFromQueue]\r! !\r!EventSensor methodsFor: 'initialize' stamp: 'nk 6/21/2004 10:42'!\rstartUp\r\t\"Run the I/O process\"\r\tself initialize.\r\tself primSetInputSemaphore: (Smalltalk registerExternalObject: inputSemaphore).\r\tsuper startUp.\r\tself installEventTickler.\r\tSmalltalk isMorphic ifTrue:[self flushAllButDandDEvents].\r\r\t\"Attempt to discover whether the input semaphore is actually being signaled.\"\r\thasInputSemaphore := false.\r\tinputSemaphore initSignals.\r! !\r\r!EventSensor methodsFor: 'private' stamp: 'ssa 12/17/2009 14:18'!\rflushNonKbdEvents\r\teventQueue ifNil: [^ self].\r\t[^self]value.   \"don't flush so we don't lose events\"\r\teventQueue flushAllSuchThat:\r\t\t[:buf | (self isKbdEvent: buf) not]\r! !\r!EventSensor methodsFor: 'private' stamp: 'ar 2/6/2004 14:42'!\rnextEventFromQueue\r\t\"Return the next event from the receiver.\"\r\teventQueue isEmpty ifTrue:[self fetchMoreEvents].\r\teventQueue isEmpty\r\t\tifTrue:[^nil]\r\t\tifFalse:[^eventQueue next]! !\r!EventSensor methodsFor: 'private' stamp: 'nk 3/17/2004 07:09'!\rnextEventSynthesized\r\t\"Return a synthesized event. This method is called if an event driven client wants to receive events but the primary user interface is not event-driven (e.g., the receiver does not have an event queue but only updates its state). This can, for instance, happen if a Morphic World is run in an MVC window. To simplify the clients work this method will always return all available keyboard events first, and then (repeatedly) the mouse events. Since mouse events come last, the client can assume that after one mouse event has been received there are no more to come. Note that it is impossible for EventSensor to determine if a mouse event has been issued before so the client must be aware of the possible problem of getting repeatedly the same mouse events. See HandMorph>>processEvents for an example on how to deal with this.\"\r\t| kbd array buttons pos modifiers mapped |\r\t\"First check for keyboard\"\r\tarray _ Array new: 8.\r\tkbd _ self primKbdNext.\r\tkbd ifNotNil:\r\t\t[\"simulate keyboard event\"\r\t\tarray at: 1 put: EventTypeKeyboard. \"evt type\"\r\t\tarray at: 2 put: Time millisecondClockValue. \"time stamp\"\r\t\tarray at: 3 put: (kbd bitAnd: 255). \"char code\"\r\t\tarray at: 4 put: EventKeyChar. \"key press/release\"\r\t\tarray at: 5 put: (kbd bitShift: -8). \"modifier keys\"\r\t\t^ array].\r\r\t\"Then check for mouse\"\r\tpos _ self primMousePt.\r\tbuttons _ mouseButtons.\r\tmodifiers _ buttons bitShift: -3.\r\tbuttons _ buttons bitAnd: 7.\r\tmapped _ self mapButtons: buttons modifiers: modifiers.\r\tarray \r\t\tat: 1 put: EventTypeMouse;\r\t\tat: 2 put: Time millisecondClockValue;\r\t\tat: 3 put: pos x;\r\t\tat: 4 put: pos y;\r\t\tat: 5 put: mapped;\r\t\tat: 6 put: modifiers.\r\t^ array\r\r! !\r!EventSensor methodsFor: 'private' stamp: 'ssa 12/16/2009 13:26'!\rprimMouseButtons\r\r\tself fetchMoreEvents.\r\tself flushNonKbdEvents.\r\t^ mouseButtons\r! !\r!EventSensor methodsFor: 'private' stamp: 'ssa 12/16/2009 13:26'!\rprimMousePt\r\r\tself fetchMoreEvents.\r\tself flushNonKbdEvents.\r\t^ mousePosition\r! !\r\r!EventSensor methodsFor: 'private-I/O' stamp: 'ssa 12/17/2009 12:46'!\rprocessEvent: evt \r\t\"Process a single event. This method is run at high priority.\"\r\t| type |\r\ttype := evt at: 1.\r\t\"Tackle mouse events first\"\r\ttype = EventTypeMouse\r\t\tifTrue: [evt\r\t\t\t\tat: 5\r\t\t\t\tput: (ButtonDecodeTable at: (evt at: 5)\r\t\t\t\t\t\t\t+ 1). \r\t\t\t\tself queueEvent: evt.\r\t\t\t\tself processMouseEvent: evt . \r\t\t\t\t^self].\r\t\r\t\"Store the event in the queue if there's any\"\r\ttype = EventTypeKeyboard\r\t\tifTrue: [ \"Check if the event is a user interrupt\"\r\t\t\t((evt at: 4) = 0\r\t\t\t\tand: [((evt at: 3)\r\t\t\t\t\t\tbitOr: (((evt at: 5)\r\t\t\t\t\t\t\tbitAnd: 8)\r\t\t\t\t\t\t\tbitShift: 8))\r\t\t\t\t\t\t\t= interruptKey])\r\t\t\t\t\tifTrue: [\"interrupt key is meta - not reported as event\"\r\t\t\t\t\t\t\t^ interruptSemaphore signal].\r\t\t\t\"Else swap ctrl/alt keys if neeeded.wi\"\r\t\t\tKeyDecodeTable\r\t\t\t\tat: {evt at: 3. evt at: 5}\r\t\t\t\tifPresent: [:a | evt at: 3 put: a first;\r\t\t\t\t\t\t at: 5 put: a second]. \r\t\t\tself queueEvent: evt. \r\t\t\tself processKeyboardEvent: evt . \r\t\t\t^self ].\r\t\t\t\t\r\t\"Handle all events other than Keyborad or Mouse.\"\r\tself queueEvent: evt.\r\t! !\r!EventSensor methodsFor: 'private-I/O' stamp: 'ssa 12/16/2009 13:12'!\rprocessKeyboardEvent: evt\r\t\"process a keyboard event, updating InputSensor state\"\r\t| charCode pressCode |\r\t\"Never update keyboardBuffer if we have an eventQueue active\"\r\tmouseButtons _ (mouseButtons bitAnd: 7) bitOr: ((evt at: 5) bitShift: 3).\r\teventQueue ifNotNil:[^self]. \r\tcharCode _ evt at: 3.\r\tcharCode = nil ifTrue:[^self]. \"extra characters not handled in MVC\"\r\tpressCode _ evt at: 4.\r\tpressCode = EventKeyChar ifFalse:[^self]. \"key down/up not handled in MVC\"\r\t\"mix in modifiers\"\r\tcharCode _ charCode bitOr: ((evt at: 5) bitShift: 8).\r\tkeyboardBuffer nextPut: charCode .! !\r!BlockContext methodsFor: 'scheduling' stamp: 'dmu 4/7/2009 02:38'!\rforkOn: aCore\r\t\"Create and schedule a Process running the code in the receiver.\"\r\r\t^ self newProcess resumeOn: aCore! !\r!BlockContext methodsFor: 'scheduling' stamp: 'ssa 4/8/2009 20:09'!\rforkOn: aCore with: anObject\r\t\"Create and schedule a Process running the code in the receiver.\"\r\r\t^ (self newProcessWith: anObject) resumeOn: aCore! !\r!BlockContext methodsFor: 'scheduling' stamp: 'ssa 4/8/2009 20:08'!\rforkOn: aCore with: anObject at: aPriority\r\t\"Create and schedule a Process running the code in the receiver.\"\r\r\t| proc |\r\tproc _ self newProcessWith: anObject.\r\tproc priority: aPriority.\r\t^proc resumeOn: aCore! !\r!BlockContext methodsFor: 'scheduling' stamp: 'dmu 4/7/2009 02:34'!\rforkWith: anObject\r\t\"Create and schedule a Process running the code in the receiver.\"\r\r\t^ (self newProcessWith: anObject) resume! !\r!BlockContext methodsFor: 'scheduling' stamp: 'dmu 4/7/2009 02:33'!\rnewProcessWith: anObject\r\t\"Answer a Process running the code in the receiver. The process is not \r\tscheduled.\"\r\t<primitive: 19> \"Simulation guard\"\r\t^Process\r\t\tforContext: \r\t\t\t[self value: anObject.\r\t\t\tProcessor terminateActive]\r\t\tpriority: Processor activePriority! !\r!Delay class methodsFor: 'snapshotting' stamp: 'dmu 5/25/2010 11:02'!\rstartUp\r\t\"Restart active delay, if any, when resuming a snapshot.\"\r\r\tself restoreResumptionTimes.\r\tActiveDelay == nil ifFalse: [ActiveDelay activate].\r\tAccessProtect _ Semaphore forMutualExclusion\r! !\r\r!Process methodsFor: 'accessing' stamp: 'dmu 3/8/2010 20:26'!\rhostCore: anObject\r\t\"Set the value of hostCore\"\r\r\thostCore _ anObject! !\r!Process methodsFor: 'accessing' stamp: 'dmu 3/8/2010 20:26'!\rmyList\r\t\"Answer the value of myList\"\r\r\tmyList isNil ifTrue:[self myList: nil].\r\t^ myList! !\r!Process methodsFor: 'accessing' stamp: 'dmu 3/8/2010 20:26'!\rmyList: anObject\r\t\"Set the value of myList\"\r\r\tmyList _ anObject! !\r!Process methodsFor: 'changing process state' stamp: 'dmu 3/2/2010 17:02'!\rprimitiveSuspend\r\t\"Primitive. Stop the process that self represents in such a way \r\tthat it can be restarted at a later time (by sending #resume).\r\tASSUMES self is the active process.\r\tEssential. See Object documentation whatIsAPrimitive.\"\r\r\t\"Debugging code below causes terminated running processes to seem not terminated. -- dmu 3/2/10\"\r\t\"(myList isNil and: [RVMPrimitives isRVM]) ifTrue:[self halt].\"\r\t<primitive: 88>\r\tself primitiveFailed! !\r!Process methodsFor: 'changing process state' stamp: 'dmu 3/24/2010 15:44'!\rresume\r\t\"Allow the process that the receiver represents to continue. Put  \r\tthe receiver in line to become the activeProcess. Check for a nil \r\tsuspendedContext, which indicates a previously terminated Process that \r\twould cause a vm crash if the resume attempt were permitted\"\r\tsuspendedContext ifNil: [^ self primitiveFailed].\r\t^ self primitiveResume! !\r!Process methodsFor: 'changing process state' stamp: 'dmu 4/7/2009 02:41'!\rresumeOn: aCore\r  self useOnlyCore: aCore.\r  self resume! !\r!Process methodsFor: 'changing suspended state' stamp: 'dmu 12/2/2008 14:04'!\rreturn: aContext value: value\r\t\"Pop thread down to aContext's sender.  Execute any unwind blocks on the way.  See #popTo: comment and #runUntilErrorOrReturnFrom: for more details.\"\r        self suspend.\r\tsuspendedContext == aContext ifTrue: [\r\t\t^ suspendedContext _ aContext return: value from: aContext].\r\tself activateReturn: aContext value: value.\r\t^ self complete: aContext.\r! !\r!Process methodsFor: 'changing suspended state' stamp: 'dmu 12/2/2008 14:03'!\rstep\r         self suspend.\r\t^ suspendedContext _ suspendedContext step! !\r!Process methodsFor: 'changing suspended state' stamp: 'dmu 12/2/2008 14:04'!\rstepToCallee\r\t\"Step until top context changes\"\r\r\t| ctxt |\r\tself suspend.\r\tctxt _ suspendedContext.\r\t[ctxt == suspendedContext] whileTrue: [\r\t\tsuspendedContext _ suspendedContext step].\r\t^ suspendedContext! !\r!Process methodsFor: 'changing suspended state' stamp: 'dmu 12/2/2008 14:05'!\rstepToSendOrReturn\rself suspend.\r\t^ suspendedContext _ suspendedContext stepToSendOrReturn! !\r!Process methodsFor: 'core assignment' stamp: 'ssa 2/26/2009 02:57'!\ravoidCore: anIndex\r\t\"Force this process to avoid this core (0-55)\"\r\tself coreMask: (self coreMask bitClear: (1 bitShift: anIndex))! !\r!Process methodsFor: 'core assignment' stamp: 'ssa 2/26/2009 03:49'!\ravoidCores: aCollectionOfIndicies\r\t\"Force this process to avoid these cores (0-55)\"\r\t| mask |\r\tmask _ 0.\r\taCollectionOfIndicies do:[:index| mask _ mask bitOr: (1 bitShift: index)].\r\tself coreMask: (self coreMask bitClear:mask)! !\r!Process methodsFor: 'core assignment' stamp: 'ssa 2/26/2009 02:59'!\ruseAdditionalCore: anIndex\r\t\"Force this process to only urn on this core (0-55)\"\r\tself coreMask: (self coreMask bitOr:(1 bitShift: anIndex))! !\r!Process methodsFor: 'core assignment' stamp: 'ssa 2/26/2009 03:50'!\ruseAdditionalCores: aCollectionOfIndicies\r\t\"Allow this process to run on these additional cores (0-55)\"\r\t| mask |\r\tmask _ 0.\r\taCollectionOfIndicies do:[:index| mask _ mask bitOr: (1 bitShift: index)].\r\tself coreMask: (self coreMask bitOr:mask)! !\r!Process methodsFor: 'core assignment' stamp: 'dmu 5/5/2009 01:32'!\ruseOnlyCore: anIndex\r\t\"Force this process to only run on this core (0-55)\"\r\tself coreMask: (1 bitShift: anIndex)! !\r!Process methodsFor: 'core assignment' stamp: 'ssa 2/26/2009 03:02'!\ruseOnlyCores: aCollectionOfIndicies\r\t\"Force this process to only run on these cores (0-55)\"\r\t| mask |\r\tmask _ 0.\r\taCollectionOfIndicies do:[:index| mask _ mask bitOr: (1 bitShift: index)].\r\tself coreMask: mask! !\r!Process methodsFor: 'core assignment' stamp: 'dmu 1/25/2010 11:06'!\ruseOnlyMainCore\r\tRVMPrimitives isRVM ifTrue: [self useOnlyCore: (RVMPrimitives getMainRank)]! !\r!Process methodsFor: 'signaling' stamp: 'ssa 2/17/2009 22:30'!\rsignal: anException\r\t\"Signal an exception in the receiver process...if the receiver is currently\r\tsuspended, the exception will get signaled when the receiver is resumed.  If \r\tthe receiver is blocked on a Semaphore, it will be immediately re-awakened\r\tand the exception will be signaled; if the exception is resumed, then the receiver\r\twill return to a blocked state unless the blocking Semaphore has excess signals\"\r\r\t\"If we are the active process, go ahead and signal the exception\"\r\tself == Processor thisProcess ifTrue: [^anException signal].\r\r        self suspend.\r\r\t\"Add a new method context to the stack that will signal the exception\"\r\tsuspendedContext := MethodContext\r\t\tsender: suspendedContext\r\t\treceiver: self\r\t\tmethod: (self class methodDict at: #pvtSignal:list:)\r\t\targuments: (Array with: anException with: myList).\r\r\t\"If we are on a list to run, then suspend and restart the receiver \r\t(this lets the receiver run if it is currently blocked on a semaphore).  If\r\twe are not on a list to be run (i.e. this process is suspended), then when the\r\tprocess is resumed, it will signal the exception\"\r\r\tmyList ifNotNil: [self suspend; resume].! !\r!Process class methodsFor: 'instance creation' stamp: 'dmu 3/24/2010 15:46'!\rforContext: aContext priority: anInteger \r\t\"Answer an instance of me that has suspended aContext at priority \r\tanInteger.\"\r\r\t| newProcess |\r\tnewProcess _ self new.\r\tnewProcess suspendedContext: aContext.\r\tnewProcess priority: anInteger.\r\t[newProcess coreMask:(1 bitShift: 27)].\r\t^newProcess! !\r!Process class methodsFor: 'instance creation' stamp: 'ssa 2/26/2009 02:45'!\rforContext: aContext priority: anInteger coreMask: anIntegerMask\r\t\"Answer an instance of me that has suspended aContext at priority \r\tanInteger using this coreMask.\"\r\r\t| newProcess |\r\tnewProcess _ self forContext: aContext priority: anInteger.\r\tnewProcess coreMask:anIntegerMask.\r\t^newProcess! !\r!ProcessorScheduler methodsFor: 'removing' stamp: 'ssa 6/11/2010 14:37'!\rremoveAllPossible\r\t\"Terminate and remove all processes that you can.\r\tThis should leave the standard set only\"\r\tself terminatableProcesses print do:[:proc| proc terminate]! !\r!ProcessorScheduler methodsFor: 'removing' stamp: 'ssa 6/11/2010 14:31'!\rterminatableProcesses\r\t\"Answer all current processes that may be user terminated like in the ProcessBrowser\"\r\t\"self terminatableProcesses\"\r\t| processList |\r\tSmalltalk garbageCollectMost. \"lose defunct processes\"\r\r\tprocessList _ Process allSubInstances\r\t\t\t\treject: [:each | each isTerminated].\r\tprocessList _ processList\r\t\t\t\tsortBy: [:a :b | a priority >= b priority].\r\tprocessList _ WeakArray withAll: processList.\r\t^processList select:[:proc| (ProcessBrowser nameAndRulesFor: proc) at: 2]! !\r!Project methodsFor: 'menu messages' stamp: 'dmu 11/25/2008 00:23'!\renterForEmergencyRecovery\r\t\"This version of enter invokes an absolute minimum of mechanism.\r\tAn unrecoverable error has been detected in an isolated project.\r\tIt is assumed that the old changeSet has already been revoked.\r\tNo new process gets spawned here.  This will happen in the debugger.\"\r\r\tself isCurrentProject ifTrue: [^ self].\r\tCurrentProject saveState.\r\tCurrentProject _ self.\r\tDisplay newDepthNoRestore: displayDepth.\r\tSmalltalk newChanges: changeSet.\r\tTranscriptStream newTranscript: transcript.\r\r\r\tworld isMorph\r\t\tifTrue:\r\t\t\t[\"Entering a Morphic project\"\r\t\t\tWorld _ world.\r\t\t\tworld install.\r\t\t\tworld triggerOpeningScripts]\r\t\tifFalse:\r\t\t\t[\"Entering an MVC project\"\r\t\t\tWorld _ nil.\r\t\t\tSmalltalk at: #ScheduledControllers put: world.\r\t\t\tScheduledControllers restore].\r\tUIProcess _ Processor thisProcess.\r! !\r\r!StandardFileStream methodsFor: 'RVM' stamp: 'dmu 9/7/2010 14:07'!\rinterlock\r\tinterlock ifNil: [self interlock: Semaphore forMutualExclusion].\r\t^ interlock! !\r!StandardFileStream methodsFor: 'RVM' stamp: 'dmu 9/7/2010 14:07'!\rinterlock: aSemaphore\r\tinterlock _ aSemaphore! !\r!StandardFileStream methodsFor: 'RVM' stamp: 'dmu 9/7/2010 14:14'!\rresetInterlock\r\tself interlock signal.\r\tself interlock: nil! !\r!StandardFileStream methodsFor: 'RVM' stamp: 'dmu 9/7/2010 14:09'!\rsafelyDo: aBlock\r\t^ self interlock critical: aBlock! !\r!StandardFileStream class methodsFor: 'RVM' stamp: 'dmu 9/7/2010 14:14'!\rresetAllInterlocks\r\t\"self resetAllInterlocks\"\r\tself allSubInstancesDo: [:sfs| sfs resetInterlock]! !\r\r!RemoteString methodsFor: 'accessing' stamp: 'dmu 9/7/2010 17:19'!\rtext \r\t\"Answer the receiver's string asText if remote files are enabled.\"\r\t| theFile theText |\r\t(sourceFileNumber == nil or: [(SourceFiles at: sourceFileNumber) == nil]) ifTrue: [^ nil].\r\ttheFile _ SourceFiles at: sourceFileNumber.\t\ttheFile safelyDo: [\r\t\ttheFile position: filePositionHi.\r\t\ttheText _ theFile nextChunkText].\r\t^theText! !\r\r!SyntaxError class methodsFor: 'instance creation' stamp: 'dmu 11/25/2008 00:25'!\ropen: aSyntaxError\r\t\"Answer a standard system view whose model is an instance of me.\"\r\t| topView |\r\t<primitive: 19> \"Simulation guard\"\r\t\r\ttopView _ self buildMVCViewOn: aSyntaxError.\r\ttopView controller openNoTerminateDisplayAt: Display extent // 2.\r\tCursor normal show.\r\tProcessor thisProcess suspend.\r! !\r!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'dmu 9/7/2010 14:26'!\rsnapshot: save andQuit: quit embedded: embeddedFlag\r\t\"Mark the changes file and close all files. If save is true, save the current state of this Smalltalk in the image file. If quit is true, then exit to the outer shell. The latter part of this method runs when resuming a previously saved image. The resume logic checks for a document file to process when starting up.\"\r\r\t| resuming msg sourceLink |\r\tObject flushDependents.\r\tObject flushEvents.\r\tsave & (SourceFiles at: 2) notNil ifTrue:\r\t\t[msg _  (quit\r\t\t\tifTrue: ['----QUIT----']\r\t\t\tifFalse: ['----SNAPSHOT----'])\r\t\t\t, Date dateAndTimeNow printString, ' ', (FileDirectory default localNameFor: self imageName).\r\t\tsourceLink _ ' priorSource: ' , LastQuitLogPosition printString.\r\t\tself assureStartupStampLogged.\r\t\t(SourceFiles at: 2) safelyDo: [\r\t\t\tLastQuitLogPosition _ (SourceFiles at: 2) setToEnd; position.\r\t\t\tself logChange: msg , sourceLink.\r\t\t].\r\t\tTranscript cr; show: msg].\r\r\tself processShutDownList: quit.\r\tCursor write show.\r\tsave ifTrue: [resuming _ embeddedFlag \r\t\t\t\t\tifTrue: [self snapshotEmbeddedPrimitive] \r\t\t\t\t\tifFalse: [self snapshotPrimitive].  \"<-- PC frozen here on image file\"\r\t\t\t\tresuming == false \"guard against failure\" ifTrue:\r\t\t\t\t\t[\"Time to reclaim segment files is immediately after a save\"\r\t\t\t\t\tSmalltalk at: #ImageSegment\r\t\t\t\t\t\tifPresent: [:theClass | theClass reclaimObsoleteSegmentFiles]]]\r\t\tifFalse: [resuming _ false].\r\tquit & (resuming == false) ifTrue: [self quitPrimitive].\r\tCursor normal show.\r\tself setGCParameters.\r\tresuming == true ifTrue: [self clearExternalObjects].\r\tself processStartUpList: resuming == true.\r\tresuming == true ifTrue:[\r\t\tself setPlatformPreferences.\r\t\tself readDocumentFile].\r\t\"Now it's time to raise an error\"\r\tresuming == nil ifTrue: [self error:'Failed to write image file (disk full?)'].\r\t^ resuming! !\r\r\r\r!UnhandledError methodsFor: 'priv handling' stamp: 'dmu 11/25/2008 00:25'!\rdevDefaultAction\r\r\tProcessor thisProcess\r\t\tdebug: exception signalerContext\r\t\ttitle: exception description! !\r\r\r!StandardSystemView methodsFor: 'displaying' stamp: 'dmu 9/17/2010 12:42'!\rdeEmphasizeLabel\r\t\"Un-Highlight the label.\"\r\tlabelFrame height = 0 ifTrue: [^ self].  \"no label\"\r\tself critical: [\r\t\tself displayLabelBackground: false.\r\t\tself displayLabelText.\r\t]! !\r\rCursor initialize!\rController initialize!\r!BitBlt methodsFor: 'copying' stamp: 'ssa 4/7/2009 13:44'!\rOLDcopyBits\r\t\"Primitive. Perform the movement of bits from the source form to the \r\tdestination form. Fail if any variables are not of the right type (Integer, \r\tFloat, or Form) or if the combination rule is not implemented. \r\tIn addition to the original 16 combination rules, this BitBlt supports\r\t16\tfail (to simulate paint)\r\t17\tfail (to simulate mask)\r\t18\tsourceWord + destinationWord\r\t19\tsourceWord - destinationWord\r\t20\trgbAdd: sourceWord with: destinationWord\r\t21\trgbSub: sourceWord with: destinationWord\r\t22\trgbDiff: sourceWord with: destinationWord\r\t23\ttallyIntoMap: destinationWord\r\t24\talphaBlend: sourceWord with: destinationWord\r\t25\tpixPaint: sourceWord with: destinationWord\r\t26\tpixMask: sourceWord with: destinationWord\r\t27\trgbMax: sourceWord with: destinationWord\r\t28\trgbMin: sourceWord with: destinationWord\r\t29\trgbMin: sourceWord bitInvert32 with: destinationWord\r\"\r\t<primitive: 'primitiveCopyBits' module: 'BitBltPlugin'>\r\r\t\"Check for compressed source, destination or halftone forms\"\r\t(combinationRule >= 30 and: [combinationRule <= 31]) ifTrue:\r\t\t[\"No alpha specified -- re-run with alpha = 1.0\"\r\t\t^ self copyBitsTranslucent: 255].\r\t((sourceForm isForm) and: [sourceForm unhibernate])\r\t\tifTrue: [^ self copyBits].\r\t((destForm isForm) and: [destForm unhibernate])\r\t\tifTrue: [^ self copyBits].\r\t((halftoneForm isForm) and: [halftoneForm unhibernate])\r\t\tifTrue: [^ self copyBits].\r\r\t\"Check for unimplmented rules\"\r\tcombinationRule = Form oldPaint ifTrue: [^ self paintBits].\r\tcombinationRule = Form oldErase1bitShape ifTrue: [^ self eraseBits].\r\r\t\"Check if BitBlt doesn't support full color maps\"\r\t(colorMap notNil and:[colorMap isColormap]) ifTrue:[\r\t\tcolorMap _ colorMap colors.\r\t\t^self copyBits].\r\t\"Check if clipping gots us way out of range\"\r\tself clipRange ifTrue:[^self copyBits].\r\r\tself error: 'Bad BitBlt arg (Fraction?); proceed to convert.'.\r\t\"Convert all numeric parameters to integers and try again.\"\r\tdestX _ destX asInteger.\r\tdestY _ destY asInteger.\r\twidth _ width asInteger.\r\theight _ height asInteger.\r\tsourceX _ sourceX asInteger.\r\tsourceY _ sourceY asInteger.\r\tclipX _ clipX asInteger.\r\tclipY _ clipY asInteger.\r\tclipWidth _ clipWidth asInteger.\r\tclipHeight _ clipHeight asInteger.\r\t^ self copyBitsAgain! !\r!BitBlt methodsFor: 'copying' stamp: 'dmu 5/10/2009 08:43'!\rcopyBits\r\tRVMPrimitives isRVM ifFalse:[^self OLDcopyBits].\r \tdestForm == Display  ifTrue: [self copyBitsOnMain] ifFalse: [self copyBitsLocally]! !\r!BitBlt methodsFor: 'line drawing' stamp: 'dmu 4/10/2009 22:47'!\rdrawFrom: startPoint to: stopPoint withFirstPoint: drawFirstPoint\r\t\"Draw a line whose end points are startPoint and stopPoint.\r\tThe line is formed by repeatedly calling copyBits at every\r\tpoint along the line.  If drawFirstPoint is false, then omit\r\tthe first point so as not to overstrike at line junctions.\"\r\t| offset point1 point2 forwards |\r\t\"Always draw down, or at least left-to-right\"\r\tforwards _ (startPoint y = stopPoint y and: [startPoint x < stopPoint x])\r\t\t\t\tor: [startPoint y < stopPoint y].\r\tforwards\r\t\tifTrue: [point1 _ startPoint. point2 _ stopPoint]\r\t\tifFalse: [point1 _ stopPoint. point2 _ startPoint].\r\tsourceForm == nil ifTrue:\r\t\t[destX _ point1 x.\r\t\tdestY _ point1 y]\r\t\tifFalse:\r\t\t[width _ sourceForm width.\r\t\theight _ sourceForm height.\r\t\toffset _ sourceForm offset.\r\t\tdestX _ (point1 x + offset x) rounded.\r\t\tdestY _ (point1 y + offset y) rounded].\r\r\t\"Note that if not forwards, then the first point is the last and vice versa.\r\tWe agree to always paint stopPoint, and to optionally paint startPoint.\"\r\t(drawFirstPoint or: [forwards == false  \"ie this is stopPoint\"])\r\t\tifTrue: [self copyBits].\r\t\t(destForm == Display or:[RVMPrimitives isRVM not]) ifTrue: [\r\tself drawLoopX: (point2 x - point1 x) rounded \r\t\t\t\t  Y: (point2 y - point1 y) rounded]\r\t\t\tifFalse: [self drawLoopLocallyX: (point2 x - point1 x) rounded \r\t\t\t\t  Y: (point2 y - point1 y) rounded].\r\t(drawFirstPoint or: [forwards  \"ie this is stopPoint\"])\r\t\tifTrue: [self copyBits].\r! !\r!BitBlt methodsFor: 'line drawing' stamp: 'dmu 4/10/2009 22:47'!\rdrawLoopX: xDelta Y: yDelta \r\t\"Primitive. Implements the Bresenham plotting algorithm (IBM Systems\r\tJournal, Vol. 4 No. 1, 1965). It chooses a principal direction, and\r\tmaintains a potential, P. When P's sign changes, it is time to move in\r\tthe minor direction as well. This particular version does not write the\r\tfirst and last points, so that these can be called for as needed in client code.\r\tOptional. See Object documentation whatIsAPrimitive.\"\r\t\r\t\t^(destForm == Display  or:[RVMPrimitives isRVM not])\r\t\t\tifTrue:[self globalDrawLoopX:xDelta Y: yDelta ]\r\t\t\tifFalse:[self localDrawLoopX:xDelta Y: yDelta ]! !\r\r!ClassDescription methodsFor: 'fileIn/Out' stamp: 'dmu 9/7/2010 14:17'!\rclassComment: aString stamp: aStamp\r\t\"Store the comment, aString or Text or RemoteString, associated with the class we are organizing.  Empty string gets stored only if had a non-empty one before.\"\r\r\t| ptr header file oldCommentRemoteStr |\r\t(aString isKindOf: RemoteString) ifTrue:\r\t\t[SystemChangeNotifier uniqueInstance classCommented: self.\r\t\t^ self organization classComment: aString stamp: aStamp].\r\r\toldCommentRemoteStr _ self organization commentRemoteStr.\r\t(aString size = 0) & (oldCommentRemoteStr == nil) ifTrue: [^ self organization classComment: nil].\r\t\t\"never had a class comment, no need to write empty string out\"\r\r\tptr _ oldCommentRemoteStr ifNil: [0] ifNotNil: [oldCommentRemoteStr sourcePointer].\r\tSourceFiles ifNotNil: [(file _ SourceFiles at: 2) ifNotNil: [\r\t\tfile safelyDo: [\r\t\t\tfile setToEnd; cr; nextPut: $!!.\t\"directly\"\r\t\t\t\"Should be saying (file command: 'H3') for HTML, but ignoring it here\"\r\t\t\theader _ String streamContents: [:strm | strm nextPutAll: self name;\r\t\t\t\tnextPutAll: ' commentStamp: '.\r\t\t\t\taStamp storeOn: strm.\r\t\t\t\tstrm nextPutAll: ' prior: '; nextPutAll: ptr printString].\r\t\t\tfile nextChunkPut: header]]].\r\tself organization classComment: (RemoteString newString: aString onFileNumber: 2) stamp: aStamp.\r\tSystemChangeNotifier uniqueInstance classCommented: self.\r! !\r!CompiledMethod methodsFor: 'source code management' stamp: 'dmu 9/7/2010 14:23'!\rputSource: sourceStr fromParseNode: methodNode inFile: fileIndex withPreamble: preambleBlock\r\t\"Store the source code for the receiver on an external file.\r\tIf no sources are available, i.e., SourceFile is nil, then store\r\ttemp names for decompilation at the end of the method.\r\tIf the fileIndex is 1, print on *.sources;  if it is 2, print on *.changes,\r\tin each case, storing a 4-byte source code pointer at the method end.\"\r\r\t| file remoteString  st80str |\r\t(SourceFiles == nil or: [(file _ SourceFiles at: fileIndex) == nil]) ifTrue:\r\t\t[^ self become: (self copyWithTempNames: methodNode tempNames)].\r\r\tSmalltalkImage current assureStartupStampLogged.\r\tfile safelyDo: [\r\t\tfile setToEnd.\r\r\t\tpreambleBlock value: file.  \"Write the preamble\"\r\t\t(methodNode isKindOf: DialectMethodNode)\r\t\t\tifTrue:\r\t\t\t[\"This source was parsed from an alternate syntax.\r\t\t\tWe must convert to ST80 before logging it.\"\r\t\t\tst80str _ (DialectStream dialect: #ST80 contents: [:strm | methodNode printOn: strm])\r\t\t\t\t\t\t\tasString.\r\t\t\tremoteString _ RemoteString newString: st80str\r\t\t\t\t\t\t\tonFileNumber: fileIndex toFile: file]\r\t\t\tifFalse:\r\t\t\t[remoteString _ RemoteString newString: sourceStr\r\t\t\t\t\t\t\tonFileNumber: fileIndex toFile: file].\r\r\t\tfile nextChunkPut: ' '.\r\t\tInMidstOfFileinNotification signal ifFalse: [file flush].\r\t\tself checkOKToAdd: sourceStr size at: remoteString position.\r\t\tself setSourcePosition: remoteString position inFile: fileIndex\r\t]! !\r!RemoteString methodsFor: 'private' stamp: 'dmu 9/7/2010 14:23'!\rstring: aString onFileNumber: fileNumber\r\t\"Store this as my string if source files exist.\"\r\t| theFile |\r\t(SourceFiles at: fileNumber) == nil ifFalse: \r\t\t[theFile _ SourceFiles at: fileNumber.\r\t\ttheFile safelyDo: [\r\t\t\ttheFile setToEnd; cr.\r\t\t\tself string: aString onFileNumber: fileNumber toFile: theFile]\r\t\t]! !\r!SystemDictionary methodsFor: 'sources, change log' stamp: 'dmu 9/7/2010 14:26'!\rwriteRecentCharacters: nCharacters toFileNamed: aFilename\r\t\"Schedule an editable text view on the last n characters of changes.\"\r\t| changes |\r\tchanges _ SourceFiles at: 2.\r\tchanges safelyDo: [\r\t\tchanges setToEnd; skip: nCharacters negated.\r\t\t(FileStream newFileNamed: aFilename) nextPutAll: (changes next: nCharacters); close; open; edit\r\t]! !\r!SmalltalkImage methodsFor: 'sources, changes log' stamp: 'dmu 9/7/2010 14:25'!\rlogChange: aStringOrText \r\t\"Write the argument, aString, onto the changes file.\"\r\t| aString changesFile |\r\t(SourceFiles isNil or: [(SourceFiles at: 2) == nil]) ifTrue: [^ self].\r\tself assureStartupStampLogged.\r\r\taStringOrText isText\r\t\tifTrue: [aString _ aStringOrText string]\r\t\tifFalse: [aString _ aStringOrText].\r\t(aString isMemberOf: String)\r\t\tifFalse: [self error: 'can''t log this change'].\r\t(aString findFirst: [:char | char isSeparator not]) = 0\r\t\tifTrue: [^ self].  \"null doits confuse replay\"\r\t(changesFile _ SourceFiles at: 2).\r\tchangesFile isReadOnly ifTrue:[^self].\r\tchangesFile safelyDo: [\r\t\tchangesFile setToEnd; cr; cr.\r\t\tchangesFile nextChunkPut: aString.\r\t\t\t\"If want style changes in DoIt, use nextChunkPutWithStyle:, and allow Texts to get here\"\r\t\tself forceChangesToDisk.\r\t]! !\r!SmalltalkImage methodsFor: 'sources, changes log' stamp: 'dmu 9/7/2010 14:25'!\rassureStartupStampLogged\r\t\"If there is a startup stamp not yet actually logged to disk, do it now.\"\r\t| changesFile |\r\tStartupStamp ifNil: [^ self].\r\t(SourceFiles isNil or: [(changesFile _ SourceFiles at: 2) == nil]) ifTrue: [^ self].\r\tchangesFile isReadOnly ifTrue:[^self].\r\tchangesFile safelyDo: [\r\t\tchangesFile setToEnd; cr; cr.\r\t\tchangesFile nextChunkPut: StartupStamp asString; cr.\r\t\tStartupStamp _ nil.\r\t\tself forceChangesToDisk.\r\t]! !\r\r!ClassDescription methodsFor: 'fileIn/Out' stamp: 'dmu 9/7/2010 14:22'!\rprintMethodChunk: selector withPreamble: doPreamble on: outStream\r\t\tmoveSource: moveSource toFile: fileIndex\r\t\"Copy the source code for the method associated with selector onto the fileStream.  If moveSource true, then also set the source code pointer of the method.\"\r\t| preamble method oldPos newPos sourceFile endPos |\r\tdoPreamble \r\t\tifTrue: [preamble _ self name , ' methodsFor: ' ,\r\t\t\t\t\t(self organization categoryOfElement: selector) asString printString]\r\t\tifFalse: [preamble _ ''].\r\tmethod _ self methodDict at: selector.\r\t((method fileIndex = 0\r\t\tor: [(SourceFiles at: method fileIndex) == nil])\r\t\tor: [(oldPos _ method filePosition) = 0])\r\t\tifTrue:\r\t\t[\"The source code is not accessible.  We must decompile...\"\r\t\tpreamble size > 0 ifTrue: [outStream cr; nextPut: $!!; nextChunkPut: preamble; cr].\r\t\toutStream nextChunkPut: (self decompilerClass new decompile: selector\r\t\t\t\t\t\t\t\t\t\t\tin: self method: method) decompileString]\r\t\tifFalse:\r\t\t[sourceFile _ SourceFiles at: method fileIndex.\r\t\tsourceFile safelyDo: [\r\t\t\tsourceFile position: oldPos.\r\t\t\tpreamble size > 0 ifTrue:    \"Copy the preamble\"\r\t\t\t\t[outStream copyPreamble: preamble from: sourceFile].\r\t\t\t\"Copy the method chunk\"\r\t\t\tnewPos _ outStream position.\r\t\t\toutStream copyMethodChunkFrom: sourceFile.\r\t\t\tsourceFile skipSeparators.      \"[\" \"The following chunk may have ]style[\" \"]\"\r\t\t\tsourceFile peek == \"[\" $] ifTrue: [\r\t\t\t\toutStream cr; copyMethodChunkFrom: sourceFile].\r\t\t\tmoveSource ifTrue:    \"Set the new method source pointer\"\r\t\t\t\t[endPos _ outStream position.\r\t\t\t\tmethod checkOKToAdd: endPos - newPos at: newPos.\r\t\t\t\tmethod setSourcePosition: newPos inFile: fileIndex]]].\r\tpreamble size > 0 ifTrue: [outStream nextChunkPut: ' '].\r\t^ outStream cr! !\r!StandardSourceFileArray class methodsFor: 'initialize-release' stamp: 'dmu 9/7/2010 14:12'!\rinstall\r\t\"Replace SourceFiles by an instance of me with the standard sources and changes files.\r\tThis only works if SourceFiles is either an Array or an instance of this class\"\r\t\"StandardSourceFileArray install\"\r\tStandardFileStream resetAllInterlocks.\r\tSourceFiles _ self new initialize! !\r\r!ProcessorScheduler methodsFor: 'RVM' stamp: 'dmu 9/17/2010 11:02'!\ruserBackgroundPriority\r\t^ UserBackgroundPriority! !\r!Process methodsFor: 'RVM' stamp: 'dmu 9/17/2010 11:59'!\rsuspendedContextWaitingIfNecessary\r\t\"In RVM, can suspend some other running process, and so after sending suspend, suspendedContext may still be nil.\"\r\t\r\t[self suspendedContext isNil] whileTrue.\r\t^ self suspendedContext! !\r!ParagraphEditor methodsFor: 'do-its' stamp: 'dmu 9/17/2010 12:00'!\rdebug: aCompiledMethod receiver: anObject in: evalContext\r\r\t| selector guineaPig debugger context |\r\tselector _ evalContext isNil ifTrue: [#DoIt] ifFalse: [#DoItIn:].\r\tanObject class addSelectorSilently: selector withMethod: aCompiledMethod.\r\tguineaPig _ evalContext isNil\r\t\tifTrue: [[anObject DoIt] newProcess]\r\t\tifFalse: [[anObject DoItIn: evalContext] newProcess].\r\tcontext _ guineaPig suspendedContextWaitingIfNecessary.\r\tdebugger _ Debugger new\r\t\tprocess: guineaPig\r\t\tcontroller: ((Smalltalk isMorphic not and: [ScheduledControllers inActiveControllerProcess])\r\t\t\t\tifTrue: [ScheduledControllers activeController]\r\t\t\t\tifFalse: [nil])\r\t\tcontext: context\r\t\tisolationHead: nil.\r\tdebugger openFullNoSuspendLabel: 'Debug it'.\r\t[debugger interruptedContext method == aCompiledMethod]\r\t\twhileFalse: [debugger send].\r\tanObject class basicRemoveSelector: selector! !\r!StandardSystemView methodsFor: 'RVM' stamp: 'dmu 9/17/2010 12:37'!\rdisplayInterlock\r\tdisplayInterlock ifNil: [self displayInterlock: Mutex new].\r\t^ displayInterlock! !\r!StandardSystemView methodsFor: 'RVM' stamp: 'dmu 9/17/2010 12:24'!\rdisplayInterlock: aSemaphore\r\tdisplayInterlock _ aSemaphore! !\r!StandardSystemView methodsFor: 'displaying' stamp: 'dmu 9/17/2010 12:31'!\rdisplayEmphasized\r\t\"Display with label highlighted to indicate that it is active.\"\r\tself  critical: [\r\t\tself displayDeEmphasized; emphasize.\r\t\tisLabelComplemented _ true\r\t]! !\r!StandardSystemView methodsFor: 'displaying' stamp: 'dmu 9/17/2010 12:30'!\rdisplayDeEmphasized \r\t\"Display this view with emphasis off.\r\tIf windowBits is not nil, then simply BLT if possible,\r\t\tbut force full display for top window so color is preserved.\"\r\tself  critical: [\r\t\t(bitsValid and: [controller ~~ ScheduledControllers activeController])\r\t\t\tifTrue: [self lock.\r\t\t\t\t\twindowBits displayAt: self windowOrigin]\r\t\t\tifFalse: [Display deferUpdates: true.\r\t\t\t\t\tsuper display.\r\t\t\t\t\tDisplay deferUpdates: false; forceToScreen: self windowBox.\r\t\t\t\t\tCacheBits ifTrue: [self cacheBitsAsIs]]\r\t]\r! !\r!StandardSystemView methodsFor: 'RVM' stamp: 'dmu 9/17/2010 12:37'!\rcritical: aBlock\r\t^self displayInterlock critical: aBlock! !\r!Mutex commentStamp: '<historical>'!\rA Mutex is a light-weight MUTual EXclusion object being used when two or more processes need to access a shared resource concurrently. A Mutex grants ownership to a single process and will suspend any other process trying to aquire the mutex while in use. Waiting processes are granted access to the mutex in the order the access was requested.\r\rInstance variables:\r\tsemaphore\t<Semaphore>\t\tThe (primitive) semaphore used for synchronization.\r\towner\t\t<Process>\t\tThe process owning the mutex.!\r!Mutex methodsFor: 'initialize' stamp: 'das 11/3/2005 22:53'!\rinitialize\r\tsemaphore := Semaphore forMutualExclusion.! !\r!Mutex methodsFor: 'mutual exclusion' stamp: 'dmu 6/14/2010 16:16'!\rcritical: aBlock\r\t\"Evaluate aBlock protected by the receiver.\"\r\t| activeProcess |\r\tactiveProcess := Processor thisProcess.\r\tactiveProcess == owner ifTrue:[^aBlock value].\r\t^semaphore critical:[\r\t\towner := activeProcess.\r\t\taBlock ensure:[owner := nil]].! !\r!Mutex commentStamp: 'dmu 9/17/2010 12:34'!\rA Mutex is a light-weight MUTual EXclusion object being used when two or more processes need to access a shared resource concurrently. A Mutex grants ownership to a single process and will suspend any other process trying to aquire the mutex while in use. Waiting processes are granted access to the mutex in the order the access was requested.\r\rBrought in from Squeak 4.1 because we need it.\r\rInstance variables:\r\tsemaphore\t<Semaphore>\t\tThe (primitive) semaphore used for synchronization.\r\towner\t\t<Process>\t\tThe process owning the mutex.!\r!StandardSystemView methodsFor: 'displaying' stamp: 'dmu 9/17/2010 12:42'!\remphasizeLabel\r\t\"Highlight the label.\"\r\tlabelFrame height = 0 ifTrue: [^ self].  \"no label\"\r\tself critical: [\r\t\tself displayLabelBackground: true.\r\t\tself displayLabelBoxes.\r\t\tself displayLabelText.\r\t]! !\r!StandardSystemView methodsFor: 'RVM' stamp: 'dmu 9/17/2010 12:47'!\rresetDisplayInterlock\r\tself displayInterlock: nil! !\r!ControlManager methodsFor: 'displaying' stamp: 'dmu 9/17/2010 12:48'!\rrestore \r\t\"Clear the screen to gray and then redisplay all the scheduled views.  Try to be a bit intelligent about the view that wants control and not display it twice if possible.\"\r\r\tscheduledControllers first view uncacheBits.  \"assure refresh\"\r\tself unschedule: screenController; scheduleOnBottom: screenController.\r\tscreenController view window: Display boundingBox; displayDeEmphasized.\r\tself scheduledWindowControllers reverseDo:\r\t\t[:aController | aController view resetDisplayInterlock; displayDeEmphasized].\r! !\r\r!SystemDictionary methodsFor: 'miscellaneous' stamp: 'dmu 9/17/2010 16:39'!\rhandleUserInterrupt\r\tPreferences cmdDotEnabled ifTrue:\r\t\t[Smalltalk isMorphic\r\t\t\tifTrue: []\r\t\t\tifFalse: [[ScheduledControllers interruptName: 'User Interrupt'] forkAt: Processor thisProcess priority + 1]]! !\r"
  },
  {
    "path": "image.st/RVM-multicore-support.pharo.st",
    "content": "'******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************'!\nDisplayText subclass: #Paragraph\n\tinstanceVariableNames: 'clippingRectangle compositionRectangle destinationForm rule mask marginTabsLevel lines lastLine destFormSema'\n\tclassVariableNames: ''\n\tpoolDictionaries: 'TextConstants'\n\tcategory: 'ST80-Support'!\nLink subclass: #Process\n\tinstanceVariableNames: 'suspendedContext priority myList errorHandler name env hostCore coreMask'\n\tclassVariableNames: 'SemaForSuspensions'\n\tpoolDictionaries: ''\n\tcategory: 'Kernel-Processes'!\nObject subclass: #RVMPrimitives\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpoolDictionaries: ''\n\tcategory: 'RVM-Support'!\t\nObject subclass: #ProcessorScheduler\n\tinstanceVariableNames: 'quiescentProcessLists activeProcess'\n\tclassVariableNames: 'BackgroundProcess EmergencyProcess HighIOPriority LowIOPriority SystemBackgroundPriority SystemRockBottomPriority TimingPriority UserBackgroundPriority UserInterruptPriority UserSchedulingPriority'\n\tpoolDictionaries: ''\n\tcategory: 'Kernel-Processes'!\nFileStream subclass: #StandardFileStream\n\tinstanceVariableNames: 'name fileID buffer1 interlock'\n\tclassVariableNames: 'Registry'\n\tpoolDictionaries: ''\n\tcategory: 'Files-Kernel'!\n!ProcessorScheduler methodsFor: 'accessing' stamp: 'dmu 11/25/2008 00:23'!\nactivePriority\n\t\"Answer the priority level of the currently running Process.\"\n\n\t^self thisProcess priority! !\n!ProcessorScheduler methodsFor: 'accessing' stamp: 'dmu 9/16/2010 14:53'!\npreemptedProcess\n\t\"Return the process that the currently active process just preempted.\"\n\t| list listWithoutMe |\n\tself thisProcess priority to: 1 by: -1 do:[:priority|\n\t\tlist := quiescentProcessLists at: priority.\n\t\t\"RVM keeps running processes on the lists -- dmu 9/16/10\"\n\t\tlistWithoutMe := list reject: [:p | p == Processor thisProcess].\n\t\tlistWithoutMe isEmpty ifFalse:[^listWithoutMe last].\n\t].\n\t^nil\n\n\t\"Processor preemptedProcess\"! !\n!ProcessorScheduler methodsFor: 'process state change' stamp: 'dmu 11/25/2008 00:23'!\nterminateActive\n\t\"Terminate the process that is currently running.\"\n\n\tself thisProcess terminate! !\n!ProcessorScheduler methodsFor: 'RVM' stamp: 'dmu 6/14/2010 15:39'!\nareRunningProcessesInSchedulerLists\n\t\"Our RVM follows Pallas' MS system and keeps runnable processes in the scheduler lists even when running.\"\n\t^RVMPrimitives isRVM! !\n!ProcessorScheduler methodsFor: 'RVM' stamp: 'dmu 11/25/2008 00:26'!\nisActive: aProcess\n\t^ aProcess suspendedContext ==  nil! !\n!ProcessorScheduler methodsFor: 'RVM' stamp: 'dmu 6/14/2010 15:32'!\nthisProcess\n\t^ RVMPrimitives thisProcess! !\n!ProcessorScheduler methodsFor: 'RVM' stamp: 'dmu 3/22/2010 13:03'!\nyieldIfFewerCoresThan: n\n\tRVMPrimitives coreCount < n    ifTrue: [self yield]! !\n!Project class methodsFor: 'utilities' stamp: 'dmu 11/25/2008 00:24'!\nspawnNewProcessAndTerminateOld: terminate\n\n\tself spawnNewProcess.\n\tterminate\n\t\tifTrue: [Processor terminateActive]\n\t\tifFalse: [Processor thisProcess suspend]! !\n!RVMPrimitives class methodsFor: 'debugging VM' stamp: 'dmu 6/8/2010 23:41'!\nbreakpoint\n\t<primitive: 'primitiveBreakpoint' module: 'RVMPrimitives'>\n\tself primitiveFailed! !\n!RVMPrimitives class methodsFor: 'debugging VM' stamp: 'dmu 6/9/2010 00:02'!\nprintExecutionTrace\n\t<primitive: 'primitivePrintExecutionTrace' module: 'RVMPlugin'>! !\n!RVMPrimitives class methodsFor: 'debugging VM' stamp: 'dmu 6/9/2010 00:01'!\nprintOnConsole: aString\n\t\"Prints a string onto the console\"\n\t<primitive: 'primitivePrint' module: 'RVMPlugin'>! !\n!RVMPrimitives class methodsFor: 'debugging VM' stamp: 'dmu 6/9/2010 00:00'!\nprintStack\n\t\"Prints Smalltalk stack to console\"\n\t<primitive: 'primitivePrintStack' module: 'RVMPlugin'>! !\n!RVMPrimitives class methodsFor: 'debugging VM' stamp: 'dmu 6/9/2010 00:01'!\nprintVMStatistics\n\t<primitive: 'primitivePrintStats' module: 'RVMPlugin'>! !\n!RVMPrimitives class methodsFor: 'VM statistics' stamp: 'dmu 6/8/2010 23:04'!\nsampleRVM\n\t\"Grab some data from the VM and return it\"\n\t<primitive: 'primitiveSampleRVM' module: 'RVMPlugin'>\n\t\"RVMPrimitives sampleRVM\"\n\t^ nil! !\n!RVMPrimitives class methodsFor: 'VM statistics' stamp: 'sm 10/27/2010 22:09'!\ngetMainRank\n\t\"Get a sample from the VM and read out the main rank\"\n\t| sample |\n\tsample := self sampleRVM.\n\t^ ((sample at: 6) at: 2) at: 6! !\n!RVMPrimitives class methodsFor: 'VM statistics' stamp: 'dmu 6/8/2010 23:40'!\nsampleSpecificData: flags\n\t\"Grab some data from the VM and return it\"\n\t\"Bit offsets for flags; bit 0 is 1, bit 1 is 2, bit 2 is 4, etc.\n\t\n\tallCores, // 0\n\trunMask,\n\tmessageNames,\n\tcpuCoreStats,\n\tallCoreStats,\n\tfence,\n\n\tmillisecs, // 6\n\tcycles,\n\tmessageStats,\n\tmemorySystemStats,\n    \tinterpreterStats,\n    \tobjectTableStats,\n    \tinteractionStats,\n\n   \t coreCoords, // 14\n    \tsendTallies,\n    \treceiveTallies,\n    \tbufferedMessageStats,\n    \treceiveCycles,\n\n    \t// memory system\n    \tgcStats, // 19\n    \theapStats,\n\n    \t// interpreter\n    \tbytecodes, // 20\n    \tyieldCount,\n    \tcycleCounts,\n    \tinterruptChecks,\n    \tmovedMutatedObjectStats,\n    \tmutexStats,\n   \t interpreterLoopStats // 26\"\n\n\t<primitive: 'primitiveSampleRVM' module: 'RVMPlugin'>\n\t^ nil! !\n!RVMPrimitives class methodsFor: 'rearranging objects' stamp: 'dmu 6/8/2010 23:58'!\nmoveAllToReadMostlyHeaps\n\t\"Move all objects into read-mostly heaps\"\n\t<primitive: 'primitiveMoveAllToReadMostlyHeaps' module: 'RVMPlugin'>\n\tself primitiveFailed! !\n!RVMPrimitives class methodsFor: 'rearranging objects' stamp: 'dmu 6/8/2010 23:55'!\nshuffleToHeapsFrom: firstHeap to: lastHeap\n\t\"Deal out all objects in the system into heaps from firstHeap through lastHeap in round-robin fashion so that adjacent objects wind up in different heaps\"\n\t<primitive: 'primitiveShuffle' module: 'RVMPlugin'>\n\t^ self primitiveFailed! !\n!RVMPrimitives class methodsFor: 'rearranging objects' stamp: 'dmu 6/8/2010 23:56'!\nshuffleToHeapsFrom: firstHeap to: lastHeap movingReadWriteObjectsToReadMostlyHeap: rwToRM  movingReadMostlyObjectsToReadWriteHeap: rmToRw\n\t\"Deal out all objects in the system into heaps from firstHeap through lastHeap in round-robin fashion so that adjacent objects wind up in different heaps\"\n\t\"If rwToRM, move objects in read/write heaps to read-mostly heaps.\"\n\t\"If rmToRW, move objects in read-mostly heaps to read/write heaps.\"\n\t<primitive: 'primitiveShuffle' module: 'RVMPlugin'>\n\t^ self primitiveFailed! !\n!RVMPrimitives class methodsFor: 'rearranging objects' stamp: 'dmu 6/8/2010 23:57'!\nspreadToHeapsFrom: firstHeap to: lastHeap\n\t\"Spread out all objects in the system into heaps from firstHeap through lastHeap so that each heap ends up about equally full.\"\n\t<primitive: 'primitiveSpread' module: 'RVMPlugin'>\n\t^ self primitiveFailed! !\n!RVMPrimitives class methodsFor: 'rearranging objects' stamp: 'dmu 6/8/2010 23:57'!\nspreadToHeapsFrom: firstHeap to: lastHeap movingReadWriteObjectsToReadMostlyHeap: rwToRM  movingReadMostlyObjectsToReadWriteHeap: rmToRw\n\t\"Spread out all objects in the system into heaps from firstHeap through lastHeap so that each heap ends up about equally full.\"\n\t\"If rwToRM, move objects in read/write heaps to read-mostly heaps.\"\n\t\"If rmToRW, move objects in read-mostly heaps to read/write heaps.\"\n\t<primitive: 'primitiveSpread' module: 'RVMPlugin'>\n\t^ self primitiveFailed! !\n!RVMPrimitives class methodsFor: 'situating an object' stamp: 'dmu 6/8/2010 23:30'!\nfor: anObject setRankTo: rank\n\t<primitive: 'primitiveSetCoordinatesFor' module: 'RVMPlugin'>\n\tself primitiveFailed! !\n!RVMPrimitives class methodsFor: 'situating an object' stamp: 'dmu 6/8/2010 23:31'!\nfor: anObject setRankTo: rank isReadWrite: isRW\n\t<primitive: 'primitiveSetCoordinatesFor' module: 'RVMPlugin'>\n\tself primitiveFailed! !\n!RVMPrimitives class methodsFor: 'situating an object' stamp: 'dmu 6/8/2010 23:17'!\ngetCoreOf: anObject\n\t\"RVMPrimitives getCoreOf: 2@3\"\n\t<primitive: 'primitiveGetCore' module: 'RVMPlugin'>\n\t^ -1! !\n!RVMPrimitives class methodsFor: 'situating an object' stamp: 'dmu 6/8/2010 23:47'!\ngetMutabilityOf: anObject\n\t\"Return true if argument is in a read/write heap, false if in read-mostly heap\"\n\t<primitive: 'primitiveGetMutability' module: 'RVMPlugin'>\n\t^ true! !\n!RVMPrimitives class methodsFor: 'enumerating a heap' stamp: 'dmu 6/8/2010 23:10'!\nallObjectsInHeap: rank isReadWrite: trueForReadWriteFalseForReadMostly\n\t\"return array of all objects in either read/write or read-mostly heap specified by rank and trueForReadWriteFalseForReadMostly\"\n\t\"RVMPrimitives allObjectsInHeap: 0 isReadWrite: true\"\n\t<primitive: 'primitiveAllObjectsInHeap' module: 'RVMPlugin'>\n\t^ nil! !\n!RVMPrimitives class methodsFor: 'processes' stamp: 'dmu 6/8/2010 23:18'!\ngetCoreIAmRunningOn\n\t\"RVMPrimitives getCoreIAmRunningOn\"\n\t<primitive: 'primitiveGetCoreIAmRunningOn' module: 'RVMPlugin' >\n  \t^ -1! !\n!RVMPrimitives class methodsFor: 'processes' stamp: 'dmu 6/8/2010 23:44'!\ngetRunMask\n\t\"Return an integer with ones corresponding to cores RVM is allowed to use: 1 means core 0, 3 means cores 0 and 1, etc.\"\n\t\"RVMPrimitives getRunMask printStringBase: 16\"\n\t<primitive: 'primitiveRunMask' module: 'RVMPlugin'>\n\t^ -1! !\n!RVMPrimitives class methodsFor: 'processes' stamp: 'dmu 6/9/2010 00:07'!\ngetRunningProcessesByCore\n\t\"Returns array of running processes, indexed by core (+1)\"\n\t<primitive: 'primitiveRunningProcessByCore' module: 'RVMPlugin'>\n\t^ self primitiveFailed! !\n!RVMPrimitives class methodsFor: 'processes' stamp: 'dmu 6/8/2010 23:46'!\nsetRunMask: anInteger\n\t\"Sets run mask to argument and returns old run mask.\n\tOnly cores set in run mask will be used to run Smalltalk processes.\"\n\t\"RVMPrimitives setRunMask: 1\"\n\t<primitive: 'primitiveRunMask' module: 'RVMPlugin'>\n\t^ -1! !\n!RVMPrimitives class methodsFor: 'processes' stamp: 'dmu 6/9/2010 00:04'!\nthisProcess\n\t\"Return the process that is running; RVM does not use ActiveProcess for this state, since many may be running\"\n\t<primitive: 'primitiveThisProcess'  module: 'RVMPlugin'>\n\t^ Processor activeProcess! !\n!RVMPrimitives class methodsFor: 'cores' stamp: 'dmu 6/8/2010 23:11'!\ncoreCount\n  \"RVMPrimitives coreCount\"\n  <primitive: 'primitiveCoreCount' module: 'RVMPlugin'>\n  ^ 1! !\n!RVMPrimitives class methodsFor: 'tracing' stamp: 'dmu 6/8/2010 23:25'!\ngetCoreTrace\n\t\"RVMPrimitives getCoreTrace\"\n\t<primitive: 'primitiveTraceCores' module: 'RVMPlugin'>\n\t^ self primitiveFailed! !\n!RVMPrimitives class methodsFor: 'tracing' stamp: 'dmu 6/8/2010 23:26'!\ngetMutatedReplicatedObjectsTrace\n\t<primitive: 'primitiveTraceMutatedReplicatedObjects' module: 'RVMPlugin'>\n\t^ self primitiveFailed! !\n!RVMPrimitives class methodsFor: 'tracing' stamp: 'dmu 6/8/2010 23:22'!\nstartCoreTrace: size\n\t\"RVMPrimitives startCoreTrace: 1000\"\n\t<primitive: 'primitiveTraceCores' module: 'RVMPlugin'>\n\t^ self primitiveFailed! !\n!RVMPrimitives class methodsFor: 'tracing' stamp: 'dmu 6/8/2010 23:27'!\nstartMutatedReplicatedObjectsTrace: size\n\t<primitive: 'primitiveTraceMutatedReplicatedObjects' module: 'RVMPlugin'>\n\t^ self primitiveFailed! !\n!RVMPrimitives class methodsFor: 'emergency evaluating' stamp: 'dmu 6/8/2010 23:19'!\ngetEmergencySemaphore\n\t\"When you hit shift-control-a, the VM will signal the emergency semaphore, if it has been set to a semaphore\"\n\t\"RVMPrimitives getEmergencySemaphore\"\n\t<primitive: 'primitiveEmergencySemaphore' module: 'RVMPlugin'>! !\n!RVMPrimitives class methodsFor: 'emergency evaluating' stamp: 'dmu 6/9/2010 00:06'!\nsetEmergencySemaphore: aSema\n\t\"When you hit shift-control-a, the VM will signal the emergency semaphore, if it has been set to a semaphore\"\n\t\"RVMPrimitives setEmergencySemaphore: Semaphore new\"\n\t<primitive: 'primitiveEmergencySemaphore' module: 'RVMPlugin'>! !\n!RVMPrimitives class methodsFor: 'using extra word' stamp: 'dmu 6/14/2010 15:27'!\ngetExtraPreheaderWordOf: anObject\n\t\"Returns the extra preheader word of the argument.\"\n\t\"RVMPrimitives getExtraPreheaderWordOf: 3@4\"\n\t<primitive: 'primitiveGetExtraPreheaderWord' module: 'RVMPlugin'>! !\n!RVMPrimitives class methodsFor: 'using extra word' stamp: 'dmu 6/14/2010 15:27'!\nsetExtraPreheaderWordOf: anObject to: newContents\n\t\"Sets the extra preheader word of the first argument.\"\n\t\"|n| n := 3@4.\n\tRVMPrimitives setExtraPreheaderWordOf: n to: 17.\n\tRVMPrimitives getExtraPreheaderWordOf: n\"\n\t<primitive: 'primitiveSetExtraPreheaderWord' module: 'RVMPlugin'>! !\n!RVMPrimitives class methodsFor: 'using extra word' stamp: 'dmu 6/9/2010 00:05'!\nsetExtraWordSelector: aSelector\n\t\"returns the old one\"\n\t<primitive: 'primitiveSetExtraWordSelector' module: 'RVMPlugin'>\n\t^self primitiveFailed! !\n!RVMPrimitives class methodsFor: 'testing' stamp: 'dmu 6/14/2010 15:36'!\nisRVM\n\t\"RVMPrimitives isRVM\"\n\t^ (self getCoreOf: nil) ~= -1! !\n!BlockClosure methodsFor: 'evaluating' stamp: 'dmu 6/14/2010 16:13'!\nvalueAt: blockPriority \n\t\"Evaluate the receiver (block), with another priority as the actual one \n\tand restore it afterwards. The caller should be careful with using \n\thigher priorities.\"\n\t| activeProcess result outsidePriority |\n\tactiveProcess := Processor thisProcess.\n\toutsidePriority := activeProcess priority.\n\tactiveProcess priority: blockPriority.\n\tresult := self ensure: [activeProcess priority: outsidePriority].\n\t\"Yield after restoring lower priority to give the preempted processes a  \n\tchance to run.\"\n\tblockPriority > outsidePriority\n\t\tifTrue: [Processor yield].\n\t^ result! !\n!BlockClosure methodsFor: 'evaluating' stamp: 'dmu 6/14/2010 16:13'!\nvalueWithin: aDuration onTimeout: timeoutBlock\n\t\"Evaluate the receiver.\n\tIf the evaluation does not complete in less than aDuration evaluate the timeoutBlock instead\"\n\n\t| theProcess delay watchdog |\n\n\taDuration <= Duration zero ifTrue: [^ timeoutBlock value ].\n\n\t\"the block will be executed in the current process\"\n\ttheProcess := Processor thisProcess.\n\tdelay := aDuration asDelay.\n\n\t\"make a watchdog process\"\n\twatchdog := [\n\t\tdelay wait. \t\"wait for timeout or completion\"\n\t\ttheProcess ifNotNil:[ theProcess signalException: TimedOut ] \n\t] newProcess.\n\n\t\"Watchdog needs to run at high priority to do its job (but not at timing priority)\"\n\twatchdog priority: Processor timingPriority-1.\n\n\t\"catch the timeout signal\"\n\t^ [\twatchdog resume.\t\t\t\t\"start up the watchdog\"\n\t\tself ensure:[\t\t\t\t\t\t\"evaluate the receiver\"\n\t\t\ttheProcess := nil.\t\t\t\t\"it has completed, so ...\"\n\t\t\tdelay delaySemaphore signal.\t\"arrange for the watchdog to exit\"\n\t\t]] on: TimedOut do: [ :e | timeoutBlock value ].\n! !\n!BlockClosure methodsFor: 'private' stamp: 'dmu 6/14/2010 16:13'!\nvalueUnpreemptively\n\t\"Evaluate the receiver (block), without the possibility of preemption by higher priority processes. Use this facility VERY sparingly!!\"\n\t\"Think about using Block>>valueUninterruptably first, and think about using Semaphore>>critical: before that, and think about redesigning your application even before that!! \n\tAfter you've done all that thinking, go right ahead and use it...\"\n\t| activeProcess oldPriority result |\n\tactiveProcess := Processor thisProcess.\n\toldPriority := activeProcess priority.\n\tactiveProcess priority: Processor highestPriority.\n\tresult := self ensure: [activeProcess priority: oldPriority].\n\t\"Yield after restoring priority to give the preempted processes a chance to run\"\n\tProcessor yield.\n\t^result! !\n!BlockContext methodsFor: 'evaluating' stamp: 'dmu 6/14/2010 16:14'!\nvalueWithin: aDuration onTimeout: timeoutBlock\n\t\"Evaluate the receiver.\n\tIf the evaluation does not complete in less than aDuration evaluate the timeoutBlock instead\"\n\n\t| theProcess delay watchdog |\n\n\taDuration <= Duration zero ifTrue: [^ timeoutBlock value ].\n\n\t\"the block will be executed in the current process\"\n\ttheProcess := Processor thisProcess.\n\tdelay := aDuration asDelay.\n\n\t\"make a watchdog process\"\n\twatchdog := [\n\t\tdelay wait. \t\"wait for timeout or completion\"\n\t\ttheProcess ifNotNil:[ theProcess signalException: TimedOut ] \n\t] newProcess.\n\n\t\"Watchdog needs to run at high priority to do its job (but not at timing priority)\"\n\twatchdog priority: Processor timingPriority-1.\n\n\t\"catch the timeout signal\"\n\t^ [\twatchdog resume.\t\t\t\t\"start up the watchdog\"\n\t\tself ensure:[\t\t\t\t\t\t\"evaluate the receiver\"\n\t\t\ttheProcess := nil.\t\t\t\t\"it has completed, so ...\"\n\t\t\tdelay delaySemaphore signal.\t\"arrange for the watchdog to exit\"\n\t\t]] on: TimedOut do: [ :e | timeoutBlock value ].\n! !\n!BlockContext methodsFor: 'scheduling' stamp: 'dmu 6/14/2010 16:14'!\nvalueAt: blockPriority \n\t\"Evaluate the receiver (block), with another priority as the actual one \n\tand restore it afterwards. The caller should be careful with using \n\thigher priorities.\"\n\t| activeProcess result outsidePriority |\n\tactiveProcess := Processor thisProcess.\n\toutsidePriority := activeProcess priority.\n\tactiveProcess priority: blockPriority.\n\tresult := self\n\t\t\t\tensure: [activeProcess priority: outsidePriority].\n\t\"Yield after restoring lower priority to give the preempted processes a  \n\tchance to run.\"\n\tblockPriority > outsidePriority\n\t\tifTrue: [Processor yield].\n\t^ result! !\n!BlockContext methodsFor: 'private' stamp: 'dmu 11/25/2008 00:18'!\nvalueUnpreemptively\n\t\"Evaluate the receiver (block), without the possibility of preemption by higher priority processes. Use this facility VERY sparingly!!\"\n\t\"Think about using Block>>valueUninterruptably first, and think about using Semaphore>>critical: before that, and think about redesigning your application even before that!! \n\tAfter you've done all that thinking, go right ahead and use it...\"\n\t| activeProcess oldPriority result |\n\tactiveProcess := Processor thisProcess.\n\toldPriority := activeProcess priority.\n\tactiveProcess priority: Processor highestPriority.\n\tresult := self ensure: [activeProcess priority: oldPriority].\n\t\"Yield after restoring priority to give the preempted processes a chance to run\"\n\tProcessor yield.\n\t^result! !\n!CPUWatcher methodsFor: 'process operations' stamp: 'dmu 11/25/2008 00:18'!\ndebugProcess: aProcess\n\t| uiPriority oldPriority |\n\tuiPriority := Processor thisProcess priority.\n\taProcess priority >= uiPriority ifTrue: [\n\t\toldPriority := ProcessBrowser setProcess: aProcess toPriority: uiPriority - 1\n\t].\n\tProcessBrowser debugProcess: aProcess.! !\n!Cursor methodsFor: 'displaying' stamp: 'dmu 6/14/2010 16:15'!\nshowWhile: aBlock \n\t\"While evaluating the argument, aBlock, make the receiver be the cursor shape.\"\n\t\"ar 2/2/2006: Only allow this if active process is ui process\"\n\t| oldcursor |\n\tProcessor thisProcess == Project uiProcess ifFalse:[^aBlock value].\n\toldcursor := Sensor currentCursor.\n\tself show.\n\t^aBlock ensure: [oldcursor show]\n! !\n!Debugger class methodsFor: 'class initialization' stamp: 'dmu 6/14/2010 16:15'!\nopenContext: aContext label: aString contents: contentsStringOrNil\n\n\t\"Open a notifier in response to an error, halt, or notify. A notifier view just shows a short view of the sender stack and provides a menu that lets the user open a full debugger.\"\n\t<primitive: 19> \"Simulation guard\"\n\tErrorRecursion not & self logDebuggerStackToFile ifTrue:\n\t\t[Smalltalk logError: aString inContext: aContext to: 'PharoDebug.log'].\n\t  ErrorRecursion ifTrue:[\n               ErrorRecursion := false.\n               self primitiveError: aString].\n\tErrorRecursion := true.\n\tself informExistingDebugger: aContext label: aString.\n\t(Debugger context: aContext)\n\t\topenNotifierContents: contentsStringOrNil\n\t\tlabel: aString.\n\tErrorRecursion := false.\n\tProcessor thisProcess suspend.\n! !\n!Debugger class methodsFor: 'instance creation' stamp: 'dmu 6/14/2010 16:15'!\ncontext: aContext\n\t\"Answer an instance of me for debugging the active process starting with the given context.\"\n\n\t^ self new\n\t\tprocess: Processor thisProcess\n\t\tcontroller: nil\n\t\tcontext: aContext! !\n!DelayWaitTimeout methodsFor: 'private' stamp: 'dmu 6/14/2010 16:15'!\nsetDelay: anInteger forSemaphore: aSemaphore\n\tsuper setDelay: anInteger forSemaphore: aSemaphore.\n\tprocess := Processor thisProcess.\n\texpired := false.! !\n!HTTPLoader methodsFor: 'private' stamp: 'dmu 6/14/2010 16:15'!\nstartDownload\n\t| newDownloadProcess |\n\t\n\tdownloads size >= self maxNrOfConnections ifTrue: [^self].\n\trequests size <= 0 ifTrue: [^self].\n\n\tnewDownloadProcess := [\n\t\t[\n\t\t\tself nextRequest startRetrieval\n\t\t] on: FTPConnectionException do: [ :ex | \n\t\t\tCursor normal show.\n\t\t\tself removeProcess: Processor thisProcess.\n\t\t\tself startDownload\n\t\t].\n\t\tself removeProcess: Processor thisProcess.\n\t\tself startDownload\n\t] newProcess.\n\tdownloads add: newDownloadProcess.\n\tnewDownloadProcess resume! !\n!MessageTally methodsFor: 'initialize-release' stamp: 'dmu 6/14/2010 16:16'!\nspyEvery: millisecs on: aBlock\n\t\"Create a spy and spy on the given block at the specified rate.\"\n\t\"Spy only on the active process (in which aBlock is run)\"\n\n\t| myDelay time0 observedProcess |\n\taBlock isBlock\n\t\tifFalse: [ self error: 'spy needs a block here' ].\n\tself class: aBlock receiver class method: aBlock method.\n\t\t\"set up the probe\"\n\tobservedProcess := Processor thisProcess.\n\tmyDelay := Delay forMilliseconds: millisecs.\n\ttime0 := Time millisecondClockValue.\n\tgcStats := Smalltalk getVMParameters.\n\tTimer ifNotNil: [ self error: 'it seems a tally is already running' ].\n\tTimer := [\n\t\t[ true ] whileTrue: [\n\t\t\t| startTime |\n\t\t\tstartTime := Time millisecondClockValue.\n\t\t\tmyDelay wait.\n\t\t\tself\n\t\t\t\ttally: Processor preemptedProcess suspendedContext\n\t\t\t\tin: (observedProcess == Processor preemptedProcess ifTrue: [observedProcess] ifFalse: [nil])\n\t\t\t\t\"tally can be > 1 if ran a long primitive\"\n\t\t\t\tby: (Time millisecondClockValue - startTime) // millisecs].\n\t\tnil] newProcess.\n\tTimer priority: Processor timingPriority-1.\n\t\t\"activate the probe and evaluate the block\"\n\tTimer resume.\n\t^ aBlock ensure: [\n\t\t\"cancel the probe and return the value\"\n\t\t\"Could have already been terminated. See #terminateTimerProcess\"\n\t\tTimer ifNotNil: [\n\t\t\tTimer terminate.\n\t\t\tTimer := nil ].\n\t\t\"Collect gc statistics\"\n\t\tSmalltalk getVMParameters keysAndValuesDo: [ :idx :gcVal | \n\t\t\tgcVal ifNotNil: [ gcStats at: idx put: (gcVal - (gcStats at: idx))]].\n\t\ttime := Time millisecondClockValue - time0]! !\n!Monitor methodsFor: 'private' stamp: 'dmu 6/14/2010 16:16'!\nenter\n\tself isOwnerProcess ifTrue: [\n\t\tnestingLevel := nestingLevel + 1.\n\t] ifFalse: [\n\t\tmutex wait.\n\t\townerProcess := Processor thisProcess.\n\t\tnestingLevel := 1.\n\t].! !\n!Monitor methodsFor: 'private' stamp: 'dmu 6/14/2010 16:16'!\nisOwnerProcess\n\t^ Processor thisProcess == ownerProcess! !\n!Paragraph methodsFor: 'RVM' stamp: 'dmu 6/15/2010 11:36'!\ndestFormSema: s\n\tdestFormSema := s! !\n!Paragraph methodsFor: 'private' stamp: 'dmu 4/1/2009 19:38'!\ncompositionRectangle: compositionRect text: aText style: aTextStyle offset: aPoint\n\n\tcompositionRectangle := compositionRect copy.\n\ttext := aText.\n\ttextStyle := aTextStyle.\n\trule := DefaultRule.\n\tmask := nil.\t\t\"was DefaultMask \"\n\tmarginTabsLevel := 0.\n\tdestFormSema := Semaphore forMutualExclusion.\n\tdestinationForm := Display.\n\toffset := aPoint.\n\t^self composeAll! !\n!Paragraph methodsFor: 'private' stamp: 'ssa 4/7/2009 12:39'!\ndisplayOn: aDisplayMedium lines: lineInterval\n\n\t| saveDestinationForm |\n\tdestFormSema isNil ifTrue:[self destFormSema: Semaphore forMutualExclusion].\n\tdestFormSema critical: [\n\t\tsaveDestinationForm := destinationForm.\n\t\tself destinationForm: aDisplayMedium.\n\t\tself displayLines: lineInterval.\n\t\tdestinationForm := saveDestinationForm\n\t]! !\n!Process methodsFor: 'accessing' stamp: 'ssa 2/17/2009 22:34'!\nisActiveProcess\n\n\t^ Processor areRunningProcessesInSchedulerLists\n\t\tifTrue: [ suspendedContext isNil and:[myList notNil]]\n\t\tifFalse: [self == Processor activeProcess]! !\n!Process methodsFor: 'accessing' stamp: 'dmu 6/18/2010 17:35'!\nisTerminated\n\n\tself isActiveProcess ifTrue: [^ false].\n\t^suspendedContext isNil\n\t  or: [\"If the suspendedContext is the bottomContext it is the block in Process>>newProcess.\n\t\t   If so, and the pc is greater than the startpc, the bock has alrteady sent and returned\n\t\t   from value and there is nothing more to do.\"\n\t\tsuspendedContext isBottomContext\n\t\tand: [suspendedContext pc isNil or: [suspendedContext pc > suspendedContext startpc]]]! !\n!Process methodsFor: 'changing process state' stamp: 'dmu 6/14/2010 16:16'!\nrun\n\t\"Suspend current process and execute self instead\"\n\n\t| proc |\n\tproc := Processor thisProcess.\n\t[\tproc suspend.\n\t\tself resume.\n\t] forkAt: Processor highestPriority! !\n!Process methodsFor: 'changing process state' stamp: 'dmu 6/18/2010 00:18'!\nsuspend\n\t\"Primitive. Stop the process that the receiver represents in such a way \n\tthat it can be restarted at a later time (by sending the receiver the \n\tmessage resume). If the receiver represents the activeProcess, suspend it. \n\tOtherwise remove the receiver from the list of waiting processes.\n\tThe return value of this method is the list the receiver was previously on (if any).\"\n\t| oldList |\n\t<primitive: 88>\n\t\"This is fallback code for VMs which only support the old primitiveSuspend which \n\twould not accept processes that are waiting to be run.\"\n\tRVMPrimitives isRVM ifTrue: [self error: 'suspend should never fail'].\n\tmyList ifNil:[^nil]. \"this allows us to use suspend multiple times\"\n\toldList := myList.\n\tmyList := nil.\n\toldList remove: self ifAbsent:[].\n\t^oldList! !\n!Process methodsFor: 'changing process state' stamp: 'dmu 6/17/2010 23:57'!\nterminate \n\t\"Stop the process that the receiver represents forever.  Unwind to execute pending ensure:/ifCurtailed: blocks before terminating.\"\n\n\t| ctxt unwindBlock oldList |\n\tself == Processor thisProcess\n\t\tifTrue: [\n\t\t\tctxt := thisContext.\n\t\t\t[ ctxt := ctxt findNextUnwindContextUpTo: nil.\n\t\t\tctxt isNil ] whileFalse: \n\t\t\t\t[ (ctxt tempAt: 2) ifNil:\n\t\t\t\t\t[ ctxt tempAt: 2 put: nil.\n\t\t\t\t\tunwindBlock := ctxt tempAt: 1.\n\t\t\t\t\tthisContext terminateTo: ctxt.\n\t\t\t\t\tunwindBlock value ]].\n\t\t\tthisContext terminateTo: nil.\n\t\t\tself suspend ]\n\t\t ifFalse: [\n\t\t\t\"Always suspend the process first so it doesn't accidentally get woken up\"\n\t\t\t oldList := self suspend.\n\t\t\tsuspendedContext ifNotNil:[\n\t\t\t\t\"Figure out if we are terminating the process while waiting in Semaphore>>critical:\n\t\t\t\tIn this case, pop the suspendedContext so that we leave the ensure: block inside\n\t\t\t\tSemaphore>>critical: without signaling the semaphore.\"\n\t\t\t\t(oldList class == Semaphore and:[\n\t\t\t\t\tsuspendedContext method == (Semaphore compiledMethodAt: #critical:)]) ifTrue:[\n\t\t\t\t\t\tsuspendedContext := suspendedContext home.].\n\n\t\t\t  \"If we are terminating a process halfways through an unwind, try to complete that unwind block first.\"\n\t\t\t\t(suspendedContext findNextUnwindContextUpTo: nil) ifNotNil: [ :outer |\n\t\t\t\t(suspendedContext findContextSuchThat: [ :c | c closure == (outer tempAt: 1)])\n\t\t\t\t\tifNotNil: [ :inner |\n\t\t\t\t\t\t\"This is an unwind block currently under evaluation\"\n\t\t\t\t\t\tsuspendedContext runUntilErrorOrReturnFrom: inner ]].\n\n\t\t\tctxt := self popTo: suspendedContext bottomContext.\n\t\t\tctxt == suspendedContext bottomContext ifFalse: [\n\t\t\t\tself debug: ctxt title: 'Unwind error during termination']] ].\n! !\n!Process methodsFor: 'changing suspended state' stamp: 'dmu 12/2/2008 14:05'!\nactivateReturn: aContext value: value\n\t\"Activate 'aContext return: value', so execution will return to aContext's sender\"\n\tself suspend.\n\t^ suspendedContext := suspendedContext activateReturn: aContext value: value! !\n!Process methodsFor: 'changing suspended state' stamp: 'dmu 12/2/2008 14:01'!\ncomplete: aContext \n\t\"Run self until aContext is popped or an unhandled error is raised.  Return self's new top context, unless an unhandled error was raised then return the signaler context (rather than open a debugger).\"\n\t\n\t| ctxt pair error |\n\tself suspend.\n\tctxt := suspendedContext.\n\tsuspendedContext := nil.  \"disable this process while running its stack in active process below\"\n\tpair := ctxt runUntilErrorOrReturnFrom: aContext.\n\tsuspendedContext := pair first.\n\terror := pair second.\n\terror ifNotNil: [^ error signalerContext].\n\t^ suspendedContext! !\n!Process methodsFor: 'changing suspended state' stamp: 'dmu 6/14/2010 16:06'!\ninstall: aContext \n\t\"Replace the suspendedContext with aContext.\"\n\n\t(Processor isActive: self)\n\t\tifTrue: [^self error: 'An active process cannot install contexts'].\n\tsuspendedContext := aContext! !\n!Process methodsFor: 'changing suspended state' stamp: 'dmu 6/14/2010 16:07'!\npopTo: aContext \n\t\"Pop self down to aContext by remote returning from aContext's callee.  Unwind blocks will be executed on the way.\n\tThis is done by pushing a new context on top which executes 'aContext callee return' then resuming self until aContext is reached.  This way any errors raised in an unwind block will get handled by senders in self and not by senders in the activeProcess.\n\tIf an unwind block raises an error that is not handled then the popping stops at the error and the signalling context is returned, othewise aContext is returned.\"\n\n\t| callee |\n\t(Processor isActive: self)\n\t\tifTrue: [^ self error: 'An active process cannot pop contexts'].\n\tcallee := (self calleeOf: aContext) ifNil: [^ aContext].  \"aContext is on top\"\n\t^ self return: callee value: callee receiver! !\n!Process methodsFor: 'changing suspended state' stamp: 'dmu 6/14/2010 16:08'!\npopTo: aContext value: aValue\n\t\"Replace the suspendedContext with aContext, releasing all contexts \n\tbetween the currently suspendedContext and it.\"\n\n\t| callee |\n\t(Processor isActive: self)\n\t\tifTrue: [^ self error: 'An active process cannot pop contexts'].\n\tcallee := (self calleeOf: aContext) ifNil: [^ self].  \"aContext is on top\"\n\tself return: callee value: aValue! !\n!Process class methodsFor: 'accessing' stamp: 'ssa 3/25/2010 15:11'!\nsemaForSuspensions\n\n\tSemaForSuspensions isNil ifTrue:[SemaForSuspensions := Semaphore forMutualExclusion].\n\t^SemaForSuspensions! !\n!Process methodsFor: 'debugging' stamp: 'dmu 6/14/2010 16:09'!\ndebug: context title: title full: bool\n\t\"Open debugger on self with context shown on top\"\n\n\t| topCtxt |\n\ttopCtxt :=  self == Processor thisProcess  ifTrue: [thisContext]\n\t\tifFalse: [\n\t\t\tself suspend.  \n\t\t\tself suspendedContextWaitingIfNecessary].\n\t(topCtxt hasContext: context) ifFalse: [^ self error: 'context not in process'].\n\tUIManager default onDebug: self context: context title: title full: bool\n! !\n!Process methodsFor: 'debugging' stamp: 'dmu 9/17/2010 12:03'!\ndebugWithTitle: title\n\t\"Open debugger on self\"\n\n\t| context |\n\tcontext := self == Processor thisProcess  ifTrue: [thisContext] ifFalse: [ self suspend.  self suspendedContextWaitingIfNecessary].\n\tself debug: context title: title full: true.\n! !\n!Process methodsFor: 'signaling' stamp: 'ssa 2/17/2009 22:31'!\npvtSignal: anException list: aList\n\t\"Private. This method is used to signal an exception from another\n\tprocess...the receiver must be the active process.  If the receiver \n\twas previously waiting on a Semaphore, then return the process\n\tto the waiting state after signaling the exception and if the Semaphore\n\thas not been signaled in the interim\"\n\n\t\"Since this method is not called in a normal way, we need to take care\n\tthat it doesn't directly return to the caller (because I believe that could\n\thave the potential to push an unwanted object on the caller's stack).\"\n\n\t| blocker |\n\tself == Processor thisProcess ifFalse: [^self].\n\tself suspend.\n\tanException signal.\n\tblocker := Semaphore new.\n\t[self suspend.\n\tsuspendedContext := suspendedContext swapSender: nil.\n\taList class == Semaphore \n\t\tifTrue:\n\t\t\t[aList isSignaled\n\t\t\t\tifTrue: \n\t\t\t\t\t[aList wait.  \"Consume the signal that would have restarted the receiver\"\n\t\t\t\t\tself resume]\n\t\t\t\tifFalse:\n\t\t\t\t\t[\"Add us back to the Semaphore's list (and remain blocked)\"\n\t\t\t\t\tmyList := aList.\n\t\t\t\t\taList add: self]]\n\t\tifFalse: [self resume]] fork.\n\tblocker wait.\n\n\n! !\n!Process methodsFor: 'signaling' stamp: 'dmu 6/14/2010 16:11'!\nsignalException: anException\n\t\"Signal an exception in the receiver process...if the receiver is currently\n\tsuspended, the exception will get signaled when the receiver is resumed.  If \n\tthe receiver is blocked on a Semaphore, it will be immediately re-awakened\n\tand the exception will be signaled; if the exception is resumed, then the receiver\n\twill return to a blocked state unless the blocking Semaphore has excess signals\"\n\t| oldList |\n\t\"If we are the active process, go ahead and signal the exception\"\n\tself == Processor thisProcess  ifTrue: [^anException signal].\n\n\t\"Suspend myself first to ensure that I won't run away in the\n\tmidst of the following modifications.\"\n\tmyList ifNotNil:[oldList := self suspend].\n\n\t\"Add a new method context to the stack that will signal the exception\"\n\tsuspendedContext := MethodContext\n\t\tsender: suspendedContext\n\t\treceiver: self\n\t\tmethod: (self class lookupSelector: #pvtSignal:list:)\n\t\targuments: (Array with: anException with: oldList).\n\n\t\"If we are on a list to run, then suspend and restart the receiver \n\t(this lets the receiver run if it is currently blocked on a semaphore).  If\n\twe are not on a list to be run (i.e. this process is suspended), then when the\n\tprocess is resumed, it will signal the exception\"\n\n\toldList ifNotNil: [self resume].\n! !\n!Process methodsFor: 'RVM' stamp: 'dmu 6/14/2010 15:40'!\ncoreMask\n\t^ coreMask! !\n!Process methodsFor: 'RVM' stamp: 'dmu 6/14/2010 15:40'!\ncoreMask: m\n\tcoreMask := m! !\n!Process methodsFor: 'RVM' stamp: 'dmu 6/14/2010 15:41'!\nhostCore\n\t^ hostCore! !\n!Process methodsFor: 'RVM' stamp: 'dmu 6/14/2010 15:31'!\nisRunning\n\tProcessor thisProcess == self ifTrue: [^ true].\n\tself isActiveProcess ifTrue: [^ true].\n\tmyList ifNil: [^ false].\n\t^ myList class ~~ Semaphore! !\n!Process methodsFor: 'RVM' stamp: 'ssa 3/2/2010 18:23'!\nnilMyListUnlessRVM\n\tProcessor areRunningProcessesInSchedulerLists ifFalse: [\n\t\t\"primitiveSuspend will use myList to remove from list and will nil it out\"\n\t\tmyList := nil.\n\t]! !\n!ProcessBrowser methodsFor: 'stack list' stamp: 'dmu 6/14/2010 16:17'!\nupdateStackList: depth \n\t| suspendedContext oldHighlight |\n\tselectedProcess\n\t\tifNil: [^ self changeStackListTo: nil].\n\t(stackList notNil and: [ stackListIndex > 0 ])\n\t\tifTrue: [oldHighlight := stackList at: stackListIndex].\n\tselectedProcess == Processor thisProcess\n\t\tifTrue: [self\n\t\t\t\tchangeStackListTo: (thisContext stackOfSize: depth)]\n\t\tifFalse: [suspendedContext := selectedProcess suspendedContext.\n\t\t\tsuspendedContext\n\t\t\t\tifNil: [self changeStackListTo: nil]\n\t\t\t\tifNotNil: [self\n\t\t\t\t\t\tchangeStackListTo: (suspendedContext stackOfSize: depth)]].\n\tself\n\t\tstackListIndex: (stackList\n\t\t\t\tifNil: [0]\n\t\t\t\tifNotNil: [stackList indexOf: oldHighlight])! !\n!ProcessBrowser class methodsFor: 'class initialization' stamp: 'dmu 6/14/2010 16:17'!\nregisterWellKnownProcesses\n\t\"Associate each well-known process with a nickname and two flags: allow-stop, and allow-debug.\n\tAdditional processes may be added to this list as required\"\n\n\tWellKnownProcesses := OrderedCollection new.\n\tself registerWellKnownProcess: []\n\t\tlabel: 'no process'\n\t\tallowStop: false\n\t\tallowDebug: false.\n\tself registerWellKnownProcess: [Smalltalk lowSpaceWatcherProcess]\n\t\tlabel: 'the low space watcher'\n\t\tallowStop: false\n\t\tallowDebug: false.\n\tself registerWellKnownProcess: [WeakArray runningFinalizationProcess]\n\t\tlabel: 'the WeakArray finalization process'\n\t\tallowStop: false\n\t\tallowDebug: false.\n\tself registerWellKnownProcess: [Processor thisProcess]\n\t\tlabel: 'the UI process'\n\t\tallowStop: false\n\t\tallowDebug: true.\n\tself registerWellKnownProcess: [Processor backgroundProcess]\n\t\tlabel: 'the idle process'\n\t\tallowStop: false\n\t\tallowDebug: false.\n\tself registerWellKnownProcess: [Sensor interruptWatcherProcess]\n\t\tlabel: 'the user interrupt watcher'\n\t\tallowStop: false\n\t\tallowDebug: false.\n\tself registerWellKnownProcess: [Sensor eventTicklerProcess]\n\t\tlabel: 'the event tickler'\n\t\tallowStop: false\n\t\tallowDebug: false.\n\tself registerWellKnownProcess: [Project uiProcess]\n\t\tlabel: 'the inactive Morphic UI process'\n\t\tallowStop: false\n\t\tallowDebug: false.\n\tself\n\t\tregisterWellKnownProcess: [ Smalltalk globals at: #SoundPlayer ifPresent: [ :sp | sp playerProcess ] ]\n\t\tlabel: 'the Sound Player'\n\t\tallowStop: false\n\t\tallowDebug: false.\n\tself\n\t\tregisterWellKnownProcess: [ Smalltalk globals at: #CPUWatcher ifPresent: [ :cw | cw currentWatcherProcess ] ]\n\t\tlabel: 'the CPUWatcher'\n\t\tallowStop: false\n\t\tallowDebug: false\n! !\n!StandardToolSet class methodsFor: 'debugging' stamp: 'dmu 6/14/2010 16:17'!\ndebugError: anError\n\t\"Handle an otherwise unhandled error\"\n\t^Processor thisProcess\n\t\tdebug: anError signalerContext\n\t\ttitle: anError description! !\n!TestCase methodsFor: 'extensions' stamp: 'dmu 6/14/2010 16:18'!\nshould: aBlock notTakeMoreThan: aDuration\n    \"Evaluate aBlock in a forked process and if it takes more than anInteger milliseconds\n    to run we terminate the process and report a test failure.  It'' important to\n    use the active process for the test failure so that the failure reporting works correctly\n    in the context of the exception handlers.\"\n\n    | succeeded evaluationProcess result delay testProcess |\n\n    succeeded := false.\n    delay := Delay forDuration: aDuration.\n    testProcess := Processor thisProcess.\n    \"Create a new process to evaluate aBlock\"\n    evaluationProcess := [\n        [result := aBlock value.\n        succeeded := true.] on: Exception do: [succeeded := false] .\n \t\tdelay unschedule.\n        testProcess resume ] newProcess name: 'Process to evaluate should: notTakeMoreThanMilliseconds:'.\n\tevaluationProcess resume.\n    \"Wait the milliseconds they asked me to\"\n    delay wait.\n    \"After this point either aBlock was evaluated if succeeded is not still nil\"\n    succeeded ifNil: [\n        evaluationProcess terminate.\n        self assert: false description: ('Block evaluation took more than the expected <1p>' expandMacrosWith: aDuration)].\n\t\"If tests in block failed, rerun block in this context, so it's handled correctly\"\n\tsucceeded ifFalse: [^aBlock value].\n   \n    ^result! !\n!SemaphoreTest methodsFor: 'private' stamp: 'dmu 6/14/2010 16:17'!\ncriticalError\n\tProcessor thisProcess terminate! !\n!TestFailure methodsFor: 'camp smalltalk' stamp: 'dmu 6/14/2010 16:18'!\ndefaultAction\n\n\tProcessor thisProcess\n\t\tdebug: self signalerContext\n\t\ttitle: self description! !\n!Utilities class methodsFor: 'fetching updates' stamp: 'dmu 6/14/2010 16:19'!\nretrieveUrls: urls ontoQueue: queue withWaitSema: waitSema \n\t\"download the given list of URLs. The queue will be loaded alternately  \n\twith url's and with the retrieved contents. If a download fails, the  \n\tcontents will be #failed. If all goes well, a special pair with an empty  \n\tURL and the contents #finished will be put on the queue. waitSema is  \n\twaited on every time before a new document is downloaded; this keeps \n\tthe downloader from getting too far  ahead of the main process\"\n\t\"kill the existing downloader if there is one\"\n\t| updateCounter |\n\tUpdateDownloader\n\t\tifNotNil: [UpdateDownloader terminate].\n\tupdateCounter := 0.\n\t\"fork a new downloading process\"\n\tUpdateDownloader := [\n\t\t'Downloading updates' displayProgressAt: Sensor cursorPoint from: 0 to: urls size during: [:bar |\n\t\t\turls\n\t\t\t\tdo: [:url | | front canPeek doc | \n\t\t\t\t\twaitSema wait.\n\t\t\t\t\tqueue nextPut: url.\n\t\t\t\t\tdoc := HTTPClient httpGet: url.\n\t\t\t\t\tdoc isString\n\t\t\t\t\t\tifTrue: [queue nextPut: #failed.\n\t\t\t\t\t\t\tUpdateDownloader := nil.\n\t\t\t\t\t\t\tProcessor thisProcess terminate]\n\t\t\t\t\t\tifFalse: [canPeek := 120 min: doc size.\n\t\t\t\t\t\t\tfront := doc next: canPeek.  doc skip: -1 * canPeek.\n\t\t\t\t\t\t\t(front beginsWith: '<!!DOCTYPE') ifTrue: [\n\t\t\t\t\t\t\t\t(front includesSubString: 'Not Found') ifTrue: [\n\t\t\t\t\t\t\t\t\tqueue nextPut: #failed.\n\t\t\t\t\t\t\t\t\tUpdateDownloader := nil.\n\t\t\t\t\t\t\t\t\tProcessor thisProcess terminate]]].\n\t\t\t\t\t\tUpdateDownloader ifNotNil: [queue nextPut: doc. updateCounter := updateCounter + 1. bar value: updateCounter]]].\n\t\t\tqueue nextPut: ''.\n\t\t\tqueue nextPut: #finished.\n\t\t\tUpdateDownloader := nil] newProcess.\n\tUpdateDownloader priority: Processor userInterruptPriority.\n\t\"start the process running\"\n\tUpdateDownloader resume! !\n!Paragraph reorganize!\n('accessing' backgroundColor clippingRectangle clippingRectangle: compositionRectangle compositionRectangle: destinationForm fillColor fillColor: height indentationOfLineIndex:ifBlank: mask numberOfLines replaceFrom:to:with:displaying: rule rule: stringAtLineNumber: text:)\n('alignment' centered justified leftFlush rightFlush toggleAlignment)\n('character location' characterBlockAtPoint: characterBlockForIndex: defaultCharacterBlock)\n('composition' composeAll wrappingBox:clippingBox:)\n('converting' asForm asString asText)\n('display box access' boundingBox computeBoundingBox)\n('displaying' displayOn: displayOn:at: displayOn:at:clippingBox:rule:fillColor: displayOn:transformation:clippingBox:align:with:rule:fillColor:)\n('indicating' flash outline)\n('scrolling' scrollBy: scrollBy:withSelectionFrom:to: scrollDelta scrollUncheckedBy:withSelectionFrom:to:)\n('selecting' caretFormForDepth: clickAt:for:controller: extendSelectionAt:endBlock: extendSelectionMark:pointBlock: hiliteRect: mouseMovedFrom:pivotBlock:showingCaret: mouseSelect mouseSelect: reverseFrom:to: selectionRectsFrom:to:)\n('utilities' clearVisibleRectangle deepCopy destinationForm: fit lines: visibleRectangle)\n('RVM' destFormSema:)\n('private' bottomAtLineIndex: compositionRectangle:text:style:offset: compositionRectangleDelta displayLines: displayLines:affectedRectangle: displayOn:lines: leftMarginForCompositionForLine: leftMarginForDisplayForLine:alignment: lineAt:put: lineIndexOfCharacterIndex: lineIndexOfTop: lines moveBy: rightMarginForComposition rightMarginForDisplay setWithText:style: setWithText:style:compositionRectangle:clippingRectangle: setWithText:style:compositionRectangle:clippingRectangle:foreColor:backColor: topAtLineIndex: topAtLineIndex:using:and: trimLinesTo: updateCompositionHeight withClippingRectangle:do:)\n!\n\n!BitBlt methodsFor: 'accessing' stamp: 'dmu 4/4/2009 00:24'!\ncopyBitsOnMain\n\t\"Primitive. Perform the movement of bits from the source form to the \n\tdestination form. Fail if any variables are not of the right type (Integer, \n\tFloat, or Form) or if the combination rule is not implemented. \n\tIn addition to the original 16 combination rules, this BitBlt supports\n\t16\tfail (to simulate paint)\n\t17\tfail (to simulate mask)\n\t18\tsourceWord + destinationWord\n\t19\tsourceWord - destinationWord\n\t20\trgbAdd: sourceWord with: destinationWord\n\t21\trgbSub: sourceWord with: destinationWord\n\t22\trgbDiff: sourceWord with: destinationWord\n\t23\ttallyIntoMap: destinationWord\n\t24\talphaBlend: sourceWord with: destinationWord\n\t25\tpixPaint: sourceWord with: destinationWord\n\t26\tpixMask: sourceWord with: destinationWord\n\t27\trgbMax: sourceWord with: destinationWord\n\t28\trgbMin: sourceWord with: destinationWord\n\t29\trgbMin: sourceWord bitInvert32 with: destinationWord\n\"\n\t<primitive: 'primitiveCopyBits' module: 'BitBltPlugin'>\n\n\t\"Check for compressed source, destination or halftone forms\"\n\t(combinationRule >= 30 and: [combinationRule <= 31]) ifTrue:\n\t\t[\"No alpha specified -- re-run with alpha = 1.0\"\n\t\t^ self copyBitsTranslucent: 255].\n\t((sourceForm isForm) and: [sourceForm unhibernate])\n\t\tifTrue: [^ self copyBits].\n\t((destForm isForm) and: [destForm unhibernate])\n\t\tifTrue: [^ self copyBits].\n\t((halftoneForm isForm) and: [halftoneForm unhibernate])\n\t\tifTrue: [^ self copyBits].\n\n\t\"Check for unimplmented rules\"\n\tcombinationRule = Form oldPaint ifTrue: [^ self paintBits].\n\tcombinationRule = Form oldErase1bitShape ifTrue: [^ self eraseBits].\n\n\t\"Check if BitBlt doesn't support full color maps\"\n\t(colorMap notNil and:[colorMap isColormap]) ifTrue:[\n\t\tcolorMap := colorMap colors.\n\t\t^self copyBits].\n\t\"Check if clipping gots us way out of range\"\n\tself clipRange ifTrue:[^self copyBits].\n\n\tself error: 'Bad BitBlt arg (Fraction?); proceed to convert.'.\n\t\"Convert all numeric parameters to integers and try again.\"\n\tdestX := destX asInteger.\n\tdestY := destY asInteger.\n\twidth := width asInteger.\n\theight := height asInteger.\n\tsourceX := sourceX asInteger.\n\tsourceY := sourceY asInteger.\n\tclipX := clipX asInteger.\n\tclipY := clipY asInteger.\n\tclipWidth := clipWidth asInteger.\n\tclipHeight := clipHeight asInteger.\n\t^ self copyBitsAgain! !\n!BitBlt methodsFor: 'copying' stamp: 'dmu 4/4/2009 00:20'!\ncopyBitsLocally\n\t\"Primitive. Perform the movement of bits from the source form to the \n\tdestination form. Fail if any variables are not of the right type (Integer, \n\tFloat, or Form) or if the combination rule is not implemented. \n\tIn addition to the original 16 combination rules, this BitBlt supports\n\t16\tfail (to simulate paint)\n\t17\tfail (to simulate mask)\n\t18\tsourceWord + destinationWord\n\t19\tsourceWord - destinationWord\n\t20\trgbAdd: sourceWord with: destinationWord\n\t21\trgbSub: sourceWord with: destinationWord\n\t22\trgbDiff: sourceWord with: destinationWord\n\t23\ttallyIntoMap: destinationWord\n\t24\talphaBlend: sourceWord with: destinationWord\n\t25\tpixPaint: sourceWord with: destinationWord\n\t26\tpixMask: sourceWord with: destinationWord\n\t27\trgbMax: sourceWord with: destinationWord\n\t28\trgbMin: sourceWord with: destinationWord\n\t29\trgbMin: sourceWord bitInvert32 with: destinationWord\n\"\n\t<primitive: 'primitiveCopyBitsLocally'>\n\n\t\"Check for compressed source, destination or halftone forms\"\n\t(combinationRule >= 30 and: [combinationRule <= 31]) ifTrue:\n\t\t[\"No alpha specified -- re-run with alpha = 1.0\"\n\t\t^ self copyBitsTranslucent: 255].\n\t((sourceForm isForm) and: [sourceForm unhibernate])\n\t\tifTrue: [^ self copyBits].\n\t((destForm isForm) and: [destForm unhibernate])\n\t\tifTrue: [^ self copyBits].\n\t((halftoneForm isForm) and: [halftoneForm unhibernate])\n\t\tifTrue: [^ self copyBits].\n\n\t\"Check for unimplmented rules\"\n\tcombinationRule = Form oldPaint ifTrue: [^ self paintBits].\n\tcombinationRule = Form oldErase1bitShape ifTrue: [^ self eraseBits].\n\n\t\"Check if BitBlt doesn't support full color maps\"\n\t(colorMap notNil and:[colorMap isColormap]) ifTrue:[\n\t\tcolorMap := colorMap colors.\n\t\t^self copyBits].\n\t\"Check if clipping gots us way out of range\"\n\tself clipRange ifTrue:[^self copyBits].\n\n\tself error: 'Bad BitBlt arg (Fraction?); proceed to convert.'.\n\t\"Convert all numeric parameters to integers and try again.\"\n\tdestX := destX asInteger.\n\tdestY := destY asInteger.\n\twidth := width asInteger.\n\theight := height asInteger.\n\tsourceX := sourceX asInteger.\n\tsourceY := sourceY asInteger.\n\tclipX := clipX asInteger.\n\tclipY := clipY asInteger.\n\tclipWidth := clipWidth asInteger.\n\tclipHeight := clipHeight asInteger.\n\t^ self copyBitsAgain! !\n!BitBlt methodsFor: 'line drawing' stamp: 'dmu 4/3/2009 23:01'!\ndrawLoopLocallyX: xDelta Y: yDelta \n\t\"Primitive. Implements the Bresenham plotting algorithm (IBM Systems\n\tJournal, Vol. 4 No. 1, 1965). It chooses a principal direction, and\n\tmaintains a potential, P. When P's sign changes, it is time to move in\n\tthe minor direction as well. This particular version does not write the\n\tfirst and last points, so that these can be called for as needed in client code.\n\tOptional. See Object documentation whatIsAPrimitive.\"\n\t| |\n\t<primitive: 'primitiveDrawLoopLocally'>\nself primitiveFailed! !\n!BitBlt methodsFor: 'line drawing' stamp: 'ssa 4/3/2009 22:36'!\nglobalDrawLoopX: xDelta Y: yDelta \n\t\"Primitive. Implements the Bresenham plotting algorithm (IBM Systems\n\tJournal, Vol. 4 No. 1, 1965). It chooses a principal direction, and\n\tmaintains a potential, P. When P's sign changes, it is time to move in\n\tthe minor direction as well. This particular version does not write the\n\tfirst and last points, so that these can be called for as needed in client code.\n\tOptional. See Object documentation whatIsAPrimitive.\"\n\t| dx dy px py P |\n\t<primitive: 'primitiveDrawLoop' module: 'BitBltPlugin'>\n\tdx := xDelta sign.\n\tdy := yDelta sign.\n\tpx := yDelta abs.\n\tpy := xDelta abs.\n\t\"self copyBits.\"\n\tpy > px\n\t\tifTrue: \n\t\t\t[\"more horizontal\"\n\t\t\tP := py // 2.\n\t\t\t1 to: py do: \n\t\t\t\t[:i |\n\t\t\t\tdestX := destX + dx.\n\t\t\t\t(P := P - px) < 0 ifTrue: \n\t\t\t\t\t\t[destY := destY + dy.\n\t\t\t\t\t\tP := P + py].\n\t\t\t\ti < py ifTrue: [self copyBits]]]\n\t\tifFalse: \n\t\t\t[\"more vertical\"\n\t\t\tP := px // 2.\n\t\t\t1 to: px do:\n\t\t\t\t[:i |\n\t\t\t\tdestY := destY + dy.\n\t\t\t\t(P := P - py) < 0 ifTrue: \n\t\t\t\t\t\t[destX := destX + dx.\n\t\t\t\t\t\tP := P + px].\n\t\t\t\ti < px ifTrue: [self copyBits]]]! !\n!BitBlt methodsFor: 'line drawing' stamp: 'ssa 4/3/2009 22:52'!\nlocalDrawLoopX: xDelta Y: yDelta \n\t\"Primitive\"\n\t<primitive: 'primitiveDrawLoopLocally'>\n\t^self primitiveFailed! !\n\n!BlockContext methodsFor: 'scheduling' stamp: 'dmu 4/7/2009 02:38'!\nforkOn: aCore\n\t\"Create and schedule a Process running the code in the receiver.\"\n\n\t^ self newProcess resumeOn: aCore! !\n!BlockContext methodsFor: 'scheduling' stamp: 'ssa 4/8/2009 20:09'!\nforkOn: aCore with: anObject\n\t\"Create and schedule a Process running the code in the receiver.\"\n\n\t^ (self newProcessWith: anObject) resumeOn: aCore! !\n!BlockContext methodsFor: 'scheduling' stamp: 'ssa 4/8/2009 20:08'!\nforkOn: aCore with: anObject at: aPriority\n\t\"Create and schedule a Process running the code in the receiver.\"\n\n\t| proc |\n\tproc := self newProcessWith: anObject.\n\tproc priority: aPriority.\n\t^proc resumeOn: aCore! !\n!BlockContext methodsFor: 'scheduling' stamp: 'dmu 4/7/2009 02:34'!\nforkWith: anObject\n\t\"Create and schedule a Process running the code in the receiver.\"\n\n\t^ (self newProcessWith: anObject) resume! !\n!BlockContext methodsFor: 'scheduling' stamp: 'dmu 4/7/2009 02:33'!\nnewProcessWith: anObject\n\t\"Answer a Process running the code in the receiver. The process is not \n\tscheduled.\"\n\t<primitive: 19> \"Simulation guard\"\n\t^Process\n\t\tforContext: \n\t\t\t[self value: anObject.\n\t\t\tProcessor terminateActive]\n\t\tpriority: Processor activePriority! !\n!Delay class methodsFor: 'snapshotting' stamp: 'dmu 5/25/2010 11:02'!\nstartUp\n\t\"Restart active delay, if any, when resuming a snapshot.\"\n\n\tDelaySuspended ifFalse:[^self error: 'Trying to activate Delay twice'].\n\tDelaySuspended := false.\n\tself restoreResumptionTimes.\n\tAccessProtect := Semaphore forMutualExclusion\n! !\n!Delay methodsFor: 'private' stamp: 'StefanMarr 11/9/2010 23:38' prior: 47886371!\nschedule\n\t\"Schedule this delay\"\n\t\n\t| delayDelivered |\n\tdelayDelivered := false.\n\t\n\tbeingWaitedOn ifTrue: [^self error: 'This Delay has already been scheduled.'].\n\tresumptionTime := Time millisecondClockValue + delayDuration.\n\t\n\t[AccessProtect critical: [\n\t\tScheduledDelay ifNil: [\n\t\t\tScheduledDelay := self.\n\t\t\tTimingSemaphore signal.\n\t\t\tdelayDelivered := true.\n\t\t]\n\t]. \tdelayDelivered\t] whileFalse.! !\n!Delay methodsFor: 'private' stamp: 'StefanMarr 11/9/2010 23:39' prior: 47885691!\nunschedule\n\t| delayDelivered |\n\tdelayDelivered := false.\n\t\n\t[AccessProtect critical: [\n\t\tScheduledDelay ifNil: [\n\t\t\tFinishedDelay := self.\n\t\t\tTimingSemaphore signal.\n\t\t\tdelayDelivered := true.\n\t\t]\n\t]. delayDelivered ] whileFalse.! !\n!Delay class methodsFor: 'timer process' stamp: 'StefanMarr 11/9/2010 17:44' prior: 19672467!\nhandleTimerEvent\n\t\"Handle a timer event; which can be either:\n\t\t- a schedule request (ScheduledDelay notNil)\n\t\t- an unschedule request (FinishedDelay notNil)\n\t\t- a timer signal (not explicitly specified)\n\tWe check for timer expiry every time we get a signal.\"\n\t| nowTick nextTick |\n\t\"Wait until there is work to do.\"\n\tTimingSemaphore wait.\n\n\t\"Process any schedule requests\"\n\tScheduledDelay ifNotNil:[\n\t\t\"Schedule the given delay\"\n\t\tself scheduleDelay: ScheduledDelay.\n\t\tScheduledDelay := nil.\n\t].\n\n\t\"Process any unschedule requests\"\n\tFinishedDelay ifNotNil:[\n\t\tself unscheduleDelay: FinishedDelay.\n\t\tFinishedDelay := nil.\n\t].\n\n\t\"Check for clock wrap-around.\"\n\tnowTick := Time millisecondClockValue.\n\tnowTick < ActiveDelayStartTime ifTrue: [\n\t\t\"clock wrapped\"\n\t\tself saveResumptionTimes.\n\t\tself restoreResumptionTimes.\n\t].\n\tActiveDelayStartTime := nowTick.\n\n\t\"Signal any expired delays\"\n\t[ActiveDelay notNil and:[nowTick >= ActiveDelay resumptionTime]] whileTrue:[\n\t\tActiveDelay signalWaitingProcess.\n\t\tSuspendedDelays isEmpty \n\t\t\tifTrue: [ActiveDelay := nil] \n\t\t\tifFalse:[ActiveDelay := SuspendedDelays removeFirst].\n\t].\n\n\t\"And signal when the next request is due. We sleep at most 1sec here\n\tas a soft busy-loop so that we don't accidentally miss signals.\"\n\tnextTick := nowTick + 1000.\n\tActiveDelay ifNotNil:[nextTick := nextTick min: ActiveDelay resumptionTime].\n\tnextTick := nextTick min: SmallInteger maxVal.\n\n\t\"Since we have processed all outstanding requests, reset the timing semaphore so\n\tthat only new work will wake us up again. Do this RIGHT BEFORE setting the next\n\twakeup call from the VM because it is only signaled once so we mustn't miss it.\"\n     \"No!!!! If running multicore, TimingSemaphore may have already been signalled!!!!\n      Do not reset signals, because then we will miss it -- dmu 9/26/10\"\n     RVMPrimitives coreCount > 1 ifFalse: [TimingSemaphore initSignals].\n     \"Do not wait till the next Delay if Semaphore already signaled. -- dmu 9/26/10\"\n     TimingSemaphore isSignaled ifFalse: [\n          Delay primSignal: TimingSemaphore atMilliseconds: nextTick.\n     ].\n\n\t\"This last test is necessary for the obscure case that the msecs clock rolls over\n\tafter nowTick has been computed (unlikely but not impossible). In this case we'd\n\twait for MillisecondClockMask msecs (roughly six days) or until another delay gets\n\tscheduled (which may not be any time soon). In any case, since handling the\n\tcondition is easy, let's just deal with it\"\n\tTime millisecondClockValue < nowTick ifTrue:[TimingSemaphore signal]. \"retry\"\n! !\n!Process methodsFor: 'accessing' stamp: 'dmu 3/8/2010 20:26'!\nhostCore: anObject\n\t\"Set the value of hostCore\"\n\n\thostCore := anObject! !\n!Process methodsFor: 'accessing' stamp: 'dmu 3/8/2010 20:26'!\nmyList\n\t\"Answer the value of myList\"\n\n\tmyList isNil ifTrue:[self myList: nil].\n\t^ myList! !\n!Process methodsFor: 'accessing' stamp: 'dmu 3/8/2010 20:26'!\nmyList: anObject\n\t\"Set the value of myList\"\n\n\tmyList := anObject! !\n!Process methodsFor: 'changing process state' stamp: 'dmu 3/2/2010 17:02'!\nprimitiveSuspend\n\t\"Primitive. Stop the process that self represents in such a way \n\tthat it can be restarted at a later time (by sending #resume).\n\tASSUMES self is the active process.\n\tEssential. See Object documentation whatIsAPrimitive.\"\n\n\t\"Debugging code below causes terminated running processes to seem not terminated. -- dmu 3/2/10\"\n\t\"(myList isNil and: [RVMPrimitives isRVM]) ifTrue:[self halt].\"\n\t<primitive: 88>\n\tself primitiveFailed! !\n!Process methodsFor: 'changing process state' stamp: 'dmu 4/7/2009 02:41'!\nresumeOn: aCore\n  self useOnlyCore: aCore.\n  self resume! !\n!Process methodsFor: 'changing suspended state' stamp: 'dmu 12/2/2008 14:04'!\nreturn: aContext value: value\n\t\"Pop thread down to aContext's sender.  Execute any unwind blocks on the way.  See #popTo: comment and #runUntilErrorOrReturnFrom: for more details.\"\n        self suspend.\n\tsuspendedContext == aContext ifTrue: [\n\t\t^ suspendedContext := aContext return: value from: aContext].\n\tself activateReturn: aContext value: value.\n\t^ self complete: aContext.\n! !\n!Process methodsFor: 'changing suspended state' stamp: 'dmu 12/2/2008 14:03'!\nstep\n         self suspend.\n\t^ suspendedContext := suspendedContext step! !\n!Process methodsFor: 'changing suspended state' stamp: 'dmu 12/2/2008 14:04'!\nstepToCallee\n\t\"Step until top context changes\"\n\n\t| ctxt |\n\tself suspend.\n\tctxt := suspendedContext.\n\t[ctxt == suspendedContext] whileTrue: [\n\t\tsuspendedContext := suspendedContext step].\n\t^ suspendedContext! !\n!Process methodsFor: 'changing suspended state' stamp: 'dmu 12/2/2008 14:05'!\nstepToSendOrReturn\nself suspend.\n\t^ suspendedContext := suspendedContext stepToSendOrReturn! !\n!Process methodsFor: 'core assignment' stamp: 'ssa 2/26/2009 02:57'!\navoidCore: anIndex\n\t\"Force this process to avoid this core (0-55)\"\n\tself coreMask: (self coreMask bitClear: (1 bitShift: anIndex))! !\n!Process methodsFor: 'core assignment' stamp: 'ssa 2/26/2009 03:49'!\navoidCores: aCollectionOfIndicies\n\t\"Force this process to avoid these cores (0-55)\"\n\t| mask |\n\tmask := 0.\n\taCollectionOfIndicies do:[:index| mask := mask bitOr: (1 bitShift: index)].\n\tself coreMask: (self coreMask bitClear:mask)! !\n!Process methodsFor: 'core assignment' stamp: 'ssa 2/26/2009 02:59'!\nuseAdditionalCore: anIndex\n\t\"Force this process to only urn on this core (0-55)\"\n\tself coreMask: (self coreMask bitOr:(1 bitShift: anIndex))! !\n!Process methodsFor: 'core assignment' stamp: 'ssa 2/26/2009 03:50'!\nuseAdditionalCores: aCollectionOfIndicies\n\t\"Allow this process to run on these additional cores (0-55)\"\n\t| mask |\n\tmask := 0.\n\taCollectionOfIndicies do:[:index| mask := mask bitOr: (1 bitShift: index)].\n\tself coreMask: (self coreMask bitOr:mask)! !\n!Process methodsFor: 'core assignment' stamp: 'dmu 5/5/2009 01:32'!\nuseOnlyCore: anIndex\n\t\"Force this process to only run on this core (0-55)\"\n\tself coreMask: (1 bitShift: anIndex)! !\n!Process methodsFor: 'core assignment' stamp: 'ssa 2/26/2009 03:02'!\nuseOnlyCores: aCollectionOfIndicies\n\t\"Force this process to only run on these cores (0-55)\"\n\t| mask |\n\tmask := 0.\n\taCollectionOfIndicies do:[:index| mask := mask bitOr: (1 bitShift: index)].\n\tself coreMask: mask! !\n!Process methodsFor: 'core assignment' stamp: 'dmu 1/25/2010 11:06'!\nuseOnlyMainCore\n\tRVMPrimitives isRVM ifTrue: [self useOnlyCore: (RVMPrimitives getMainRank)]! !\n!Process methodsFor: 'signaling' stamp: 'ssa 2/17/2009 22:30'!\nsignal: anException\n\t\"Signal an exception in the receiver process...if the receiver is currently\n\tsuspended, the exception will get signaled when the receiver is resumed.  If \n\tthe receiver is blocked on a Semaphore, it will be immediately re-awakened\n\tand the exception will be signaled; if the exception is resumed, then the receiver\n\twill return to a blocked state unless the blocking Semaphore has excess signals\"\n\n\t\"If we are the active process, go ahead and signal the exception\"\n\tself == Processor thisProcess ifTrue: [^anException signal].\n\n        self suspend.\n\n\t\"Add a new method context to the stack that will signal the exception\"\n\tsuspendedContext := MethodContext\n\t\tsender: suspendedContext\n\t\treceiver: self\n\t\tmethod: (self class methodDict at: #pvtSignal:list:)\n\t\targuments: (Array with: anException with: myList).\n\n\t\"If we are on a list to run, then suspend and restart the receiver \n\t(this lets the receiver run if it is currently blocked on a semaphore).  If\n\twe are not on a list to be run (i.e. this process is suspended), then when the\n\tprocess is resumed, it will signal the exception\"\n\n\tmyList ifNotNil: [self suspend; resume].! !\n!Process class methodsFor: 'instance creation' stamp: 'dmu 3/24/2010 15:46'!\nforContext: aContext priority: anInteger \n\t\"Answer an instance of me that has suspended aContext at priority \n\tanInteger.\"\n\n\t| newProcess |\n\tnewProcess := self new.\n\tnewProcess suspendedContext: aContext.\n\tnewProcess priority: anInteger.\n\t[newProcess coreMask:(1 bitShift: 27)].\n\t^newProcess! !\n!Process class methodsFor: 'instance creation' stamp: 'ssa 2/26/2009 02:45'!\nforContext: aContext priority: anInteger coreMask: anIntegerMask\n\t\"Answer an instance of me that has suspended aContext at priority \n\tanInteger using this coreMask.\"\n\n\t| newProcess |\n\tnewProcess := self forContext: aContext priority: anInteger.\n\tnewProcess coreMask:anIntegerMask.\n\t^newProcess! !\n!ProcessorScheduler methodsFor: 'removing' stamp: 'ssa 6/11/2010 14:37'!\nremoveAllPossible\n\t\"Terminate and remove all processes that you can.\n\tThis should leave the standard set only\"\n\tself terminatableProcesses print do:[:proc| proc terminate]! !\n!ProcessorScheduler methodsFor: 'removing' stamp: 'ssa 6/11/2010 14:31'!\nterminatableProcesses\n\t\"Answer all current processes that may be user terminated like in the ProcessBrowser\"\n\t\"self terminatableProcesses\"\n\t| processList |\n\tSmalltalk garbageCollectMost. \"lose defunct processes\"\n\n\tprocessList := Process allSubInstances\n\t\t\t\treject: [:each | each isTerminated].\n\tprocessList := processList\n\t\t\t\tsortBy: [:a :b | a priority >= b priority].\n\tprocessList := WeakArray withAll: processList.\n\t^processList select:[:proc| (ProcessBrowser nameAndRulesFor: proc) at: 2]! !\n!Project methodsFor: 'menu messages' stamp: 'dmu 11/25/2008 00:23'!\nenterForEmergencyRecovery\n\t\"This version of enter invokes an absolute minimum of mechanism.\n\tAn unrecoverable error has been detected in an isolated project.\n\tIt is assumed that the old changeSet has already been revoked.\n\tNo new process gets spawned here.  This will happen in the debugger.\"\n\n\tself isCurrentProject ifTrue: [^ self].\n\tCurrentProject saveState.\n\tCurrentProject := self.\n\tDisplay newDepthNoRestore: displayDepth.\n\tSmalltalk newChanges: changeSet.\n\tTranscriptStream newTranscript: transcript.\n\n\n\tworld isMorph\n\t\tifTrue:\n\t\t\t[\"Entering a Morphic project\"\n\t\t\tWorld := world.\n\t\t\tworld install.\n\t\t\tworld triggerOpeningScripts]\n\t\tifFalse:\n\t\t\t[\"Entering an MVC project\"\n\t\t\tWorld := nil.\n\t\t\tSmalltalk at: #ScheduledControllers put: world.\n\t\t\tScheduledControllers restore].\n\tUIProcess := Processor thisProcess.\n! !\n\n!StandardFileStream methodsFor: 'RVM' stamp: 'dmu 9/7/2010 14:07'!\ninterlock\n\tinterlock ifNil: [self interlock: Semaphore forMutualExclusion].\n\t^ interlock! !\n!StandardFileStream methodsFor: 'RVM' stamp: 'dmu 9/7/2010 14:07'!\ninterlock: aSemaphore\n\tinterlock := aSemaphore! !\n!StandardFileStream methodsFor: 'RVM' stamp: 'dmu 9/7/2010 14:14'!\nresetInterlock\n\tself interlock signal.\n\tself interlock: nil! !\n!StandardFileStream methodsFor: 'RVM' stamp: 'dmu 9/7/2010 14:09'!\nsafelyDo: aBlock\n\t^ self interlock critical: aBlock! !\n!StandardFileStream class methodsFor: 'RVM' stamp: 'dmu 9/7/2010 14:14'!\nresetAllInterlocks\n\t\"self resetAllInterlocks\"\n\tself allSubInstancesDo: [:sfs| sfs resetInterlock]! !\n\n!RemoteString methodsFor: 'accessing' stamp: 'dmu 9/7/2010 17:19'!\ntext \n\t\"Answer the receiver's string asText if remote files are enabled.\n\tUse a read only copy to avoid syntax errors when accessed via\n\tmultiple processes.\"\n\t\n\t| theFile |\n\t(sourceFileNumber == nil or: [(SourceFiles at: sourceFileNumber) == nil]) ifTrue: [^ nil].\n\ttheFile := (SourceFiles at: sourceFileNumber) readOnlyCopy.\n\t^[theFile safelyDo: [\n\ttheFile position: filePositionHi.\n\ttheFile position > theFile size ifTrue: [\n\t\tself error: 'RemoteString past end of file' ].\n\ttheFile nextChunkText string ]] ensure: [theFile close]! !\n\n!SyntaxError class methodsFor: 'instance creation' stamp: 'dmu 11/25/2008 00:25'!\nopen: aSyntaxError \n\t\"Answer a standard system view whose model is an instance of me.\"\n\t<primitive: 19>\n\t\"Simulation guard\"\n\tself buildMorphicViewOn: aSyntaxError.\n\tProject spawnNewProcessIfThisIsUI: Processor activeProcess.\n\t^ Processor thisProcess suspend! !\n!SmalltalkImage methodsFor: 'snapshot and quit' stamp: 'dmu 9/7/2010 14:26'!\nsnapshot: save andQuit: quit embedded: embeddedFlag\n\t\"Mark the changes file and close all files as part of #processShutdownList.\n\tIf save is true, save the current state of this Smalltalk in the image file.\n\tIf quit is true, then exit to the outer OS shell.\n\tThe latter part of this method runs when resuming a previously saved image. This resume logic checks for a document file to process when starting up.\"\n\n\t| resuming msg |\n\tObject flushDependents.\n\tObject flushEvents.\n\t(SourceFiles at: 2)\n\t\tifNotNil: [ \n\t\t\tmsg := String\n\t\t\t\tstreamContents: [ :s | \n\t\t\t\t\ts\n\t\t\t\t\t\tnextPutAll: '----';\n\t\t\t\t\t\tnextPutAll:\n\t\t\t\t\t\t\t\t(save\n\t\t\t\t\t\t\t\t\t\tifTrue: [ \n\t\t\t\t\t\t\t\t\t\t\tquit\n\t\t\t\t\t\t\t\t\t\t\t\tifTrue: [ 'QUIT' ]\n\t\t\t\t\t\t\t\t\t\t\t\tifFalse: [ 'SNAPSHOT' ] ]\n\t\t\t\t\t\t\t\t\t\tifFalse: [ \n\t\t\t\t\t\t\t\t\t\t\tquit\n\t\t\t\t\t\t\t\t\t\t\t\tifTrue: [ 'QUIT/NOSAVE' ]\n\t\t\t\t\t\t\t\t\t\t\t\tifFalse: [ 'NOP' ] ]);\n\t\t\t\t\t\tnextPutAll: '----';\n\t\t\t\t\t\tprint: Date dateAndTimeNow;\n\t\t\t\t\t\tspace;\n\t\t\t\t\t\tnextPutAll: (FileDirectory default localNameFor: self imageName);\n\t\t\t\t\t\tnextPutAll: ' priorSource: ';\n\t\t\t\t\t\tprint: LastQuitLogPosition ].\n\t\t\tself assureStartupStampLogged.\n\t\t\tsave\n\t\t\t\tifTrue: [ \n\t\t\t\t\t(SourceFiles at: 2) safelyDo: [\n\t\t\t\t\t\tLastQuitLogPosition := (SourceFiles at: 2)\n\t\t\t\t\t\t\tsetToEnd;\n\t\t\t\t\t\t\tposition ]].\n\t\t\tself logChange: msg.\n\t\t\tTranscript\n\t\t\t\tcr;\n\t\t\t\tshow: msg ].\n\tself processShutDownList: quit.\n\tCursor write show.\n\tsave\n\t\tifTrue: [ \n\t\t\tresuming := embeddedFlag\n\t\t\t\tifTrue: [ self snapshotEmbeddedPrimitive ]\n\t\t\t\tifFalse: [ self snapshotPrimitive ].\t\"<-- PC frozen here on image file\"\n\t\t\tresuming == false\n\t\t\t\tifTrue: [ \n\t\t\t\t\t\"Time to reclaim segment files is immediately after a save\"\n\t\t\t\t\tSmalltalk globals at: #ImageSegment ifPresent: [ :theClass | theClass reclaimObsoleteSegmentFiles ] ]\t\"guard against failure\" ]\n\t\tifFalse: [ resuming := false ].\n\tquit & (resuming == false)\n\t\tifTrue: [ self quitPrimitive ].\n\tCursor normal show.\n\tself setGCParameters.\n\tresuming == true\n\t\tifTrue: [ Smalltalk clearExternalObjects ].\n\tself processStartUpList: resuming == true.\n\tresuming == true\n\t\tifTrue: [ self recordStartupStamp ].\n\tUIManager default onSnapshot.\t\"Now it's time to raise an error\"\n\tresuming == nil\n\t\tifTrue: [ self error: 'Failed to write image file (disk full?)' ].\n\t^ resuming! !\n\n\nCursor initialize!\nController initialize!\n!BitBlt methodsFor: 'copying' stamp: 'ssa 4/7/2009 13:44'!\nOLDcopyBits\n\t\"Primitive. Perform the movement of bits from the source form to the \n\tdestination form. Fail if any variables are not of the right type (Integer, \n\tFloat, or Form) or if the combination rule is not implemented. \n\tIn addition to the original 16 combination rules, this BitBlt supports\n\t16\tfail (to simulate paint)\n\t17\tfail (to simulate mask)\n\t18\tsourceWord + destinationWord\n\t19\tsourceWord - destinationWord\n\t20\trgbAdd: sourceWord with: destinationWord\n\t21\trgbSub: sourceWord with: destinationWord\n\t22\trgbDiff: sourceWord with: destinationWord\n\t23\ttallyIntoMap: destinationWord\n\t24\talphaBlend: sourceWord with: destinationWord\n\t25\tpixPaint: sourceWord with: destinationWord\n\t26\tpixMask: sourceWord with: destinationWord\n\t27\trgbMax: sourceWord with: destinationWord\n\t28\trgbMin: sourceWord with: destinationWord\n\t29\trgbMin: sourceWord bitInvert32 with: destinationWord\n\"\n\t<primitive: 'primitiveCopyBits' module: 'BitBltPlugin'>\n\n\t\"Check for compressed source, destination or halftone forms\"\n\t(combinationRule >= 30 and: [combinationRule <= 31]) ifTrue:\n\t\t[\"No alpha specified -- re-run with alpha = 1.0\"\n\t\t^ self copyBitsTranslucent: 255].\n\t((sourceForm isForm) and: [sourceForm unhibernate])\n\t\tifTrue: [^ self copyBits].\n\t((destForm isForm) and: [destForm unhibernate])\n\t\tifTrue: [^ self copyBits].\n\t((halftoneForm isForm) and: [halftoneForm unhibernate])\n\t\tifTrue: [^ self copyBits].\n\n\t\"Check for unimplmented rules\"\n\tcombinationRule = Form oldPaint ifTrue: [^ self paintBits].\n\tcombinationRule = Form oldErase1bitShape ifTrue: [^ self eraseBits].\n\n\t\"Check if BitBlt doesn't support full color maps\"\n\t(colorMap notNil and:[colorMap isColormap]) ifTrue:[\n\t\tcolorMap := colorMap colors.\n\t\t^self copyBits].\n\t\"Check if clipping gots us way out of range\"\n\tself clipRange ifTrue:[^self copyBits].\n\n\tself error: 'Bad BitBlt arg (Fraction?); proceed to convert.'.\n\t\"Convert all numeric parameters to integers and try again.\"\n\tdestX := destX asInteger.\n\tdestY := destY asInteger.\n\twidth := width asInteger.\n\theight := height asInteger.\n\tsourceX := sourceX asInteger.\n\tsourceY := sourceY asInteger.\n\tclipX := clipX asInteger.\n\tclipY := clipY asInteger.\n\tclipWidth := clipWidth asInteger.\n\tclipHeight := clipHeight asInteger.\n\t^ self copyBitsAgain! !\n!BitBlt methodsFor: 'copying' stamp: 'dmu 5/10/2009 08:43'!\ncopyBits\n\tRVMPrimitives isRVM ifFalse:[^self OLDcopyBits].\n \tdestForm == Display  ifTrue: [self copyBitsOnMain] ifFalse: [self copyBitsLocally]! !\n!BitBlt methodsFor: 'line drawing' stamp: 'dmu 4/10/2009 22:47'!\ndrawFrom: startPoint to: stopPoint withFirstPoint: drawFirstPoint\n\t\"Draw a line whose end points are startPoint and stopPoint.\n\tThe line is formed by repeatedly calling copyBits at every\n\tpoint along the line.  If drawFirstPoint is false, then omit\n\tthe first point so as not to overstrike at line junctions.\"\n\t| offset point1 point2 forwards |\n\t\"Always draw down, or at least left-to-right\"\n\tforwards := (startPoint y = stopPoint y and: [startPoint x < stopPoint x])\n\t\t\t\tor: [startPoint y < stopPoint y].\n\tforwards\n\t\tifTrue: [point1 := startPoint. point2 := stopPoint]\n\t\tifFalse: [point1 := stopPoint. point2 := startPoint].\n\tsourceForm == nil ifTrue:\n\t\t[destX := point1 x.\n\t\tdestY := point1 y]\n\t\tifFalse:\n\t\t[width := sourceForm width.\n\t\theight := sourceForm height.\n\t\toffset := sourceForm offset.\n\t\tdestX := (point1 x + offset x) rounded.\n\t\tdestY := (point1 y + offset y) rounded].\n\n\t\"Note that if not forwards, then the first point is the last and vice versa.\n\tWe agree to always paint stopPoint, and to optionally paint startPoint.\"\n\t(drawFirstPoint or: [forwards == false  \"ie this is stopPoint\"])\n\t\tifTrue: [self copyBits].\n\t\t(destForm == Display or:[RVMPrimitives isRVM not]) ifTrue: [\n\tself drawLoopX: (point2 x - point1 x) rounded \n\t\t\t\t  Y: (point2 y - point1 y) rounded]\n\t\t\tifFalse: [self drawLoopLocallyX: (point2 x - point1 x) rounded \n\t\t\t\t  Y: (point2 y - point1 y) rounded].\n\t(drawFirstPoint or: [forwards  \"ie this is stopPoint\"])\n\t\tifTrue: [self copyBits].\n! !\n!BitBlt methodsFor: 'line drawing' stamp: 'dmu 4/10/2009 22:47'!\ndrawLoopX: xDelta Y: yDelta \n\t\"Primitive. Implements the Bresenham plotting algorithm (IBM Systems\n\tJournal, Vol. 4 No. 1, 1965). It chooses a principal direction, and\n\tmaintains a potential, P. When P's sign changes, it is time to move in\n\tthe minor direction as well. This particular version does not write the\n\tfirst and last points, so that these can be called for as needed in client code.\n\tOptional. See Object documentation whatIsAPrimitive.\"\n\t\n\t\t^(destForm == Display  or:[RVMPrimitives isRVM not])\n\t\t\tifTrue:[self globalDrawLoopX:xDelta Y: yDelta ]\n\t\t\tifFalse:[self localDrawLoopX:xDelta Y: yDelta ]! !\n\n!ClassDescription methodsFor: 'fileIn/Out' stamp: 'dmu 9/7/2010 14:17'!\nclassComment: aString stamp: aStamp\n\t\"Store the comment, aString or Text or RemoteString, associated with the class we are organizing.  Empty string gets stored only if had a non-empty one before.\"\n\n\t| ptr header file oldCommentRemoteStr oldComment oldStamp |\n\toldComment := self organization classComment.\n\toldStamp := self organization commentStamp.\n\t(aString isKindOf: RemoteString) ifTrue:\n\t\t[SystemChangeNotifier uniqueInstance class: self oldComment: oldComment newComment: aString string oldStamp: oldStamp newStamp: aStamp.\n\t\t^ self organization classComment: aString stamp: aStamp].\n\n\toldCommentRemoteStr := self organization commentRemoteStr.\n\t(aString size = 0) & (oldCommentRemoteStr isNil) ifTrue: [^ self organization classComment: nil].\n\t\t\"never had a class comment, no need to write empty string out\"\n\n\tptr := oldCommentRemoteStr ifNil: [0] ifNotNil: [oldCommentRemoteStr sourcePointer].\n\tSourceFiles ifNotNil: [(file := SourceFiles at: 2) ifNotNil:\n\t\t[file safelyDo:\n\t\t[file setToEnd; cr; nextPut: $!!.\t\"directly\"\n\t\t\"Should be saying (file command: 'H3') for HTML, but ignoring it here\"\n\t\theader := String streamContents: [:strm | strm nextPutAll: self name;\n\t\t\tnextPutAll: ' commentStamp: '.\n\t\t\taStamp storeOn: strm.\n\t\t\tstrm nextPutAll: ' prior: '; nextPutAll: ptr printString].\n\t\tfile nextChunkPut: header]]].\n\tself organization classComment: (RemoteString newString: aString onFileNumber: 2) stamp: aStamp.\n\tSystemChangeNotifier uniqueInstance class: self oldComment: oldComment newComment: aString oldStamp: oldStamp newStamp: aStamp\n! !\n!CompiledMethod methodsFor: 'source code management' stamp: 'dmu 9/7/2010 14:23'!\nputSource: sourceStr fromParseNode: methodNode inFile: fileIndex withPreamble: preambleBlock\n\t\"Store the source code for the receiver on an external file.\n\tIf no sources are available, i.e., SourceFile is nil, then store\n\ttemp names for decompilation at the end of the method.\n\tIf the fileIndex is 1, print on *.sources;  if it is 2, print on *.changes,\n\tin each case, storing a 4-byte source code pointer at the method end.\"\n\n\t| file remoteString |\n\t(SourceFiles == nil or: [(file := SourceFiles at: fileIndex) == nil]) ifTrue:\n\t\t[^self become: (self copyWithTempsFromMethodNode: methodNode)].\n\n\tSmalltalkImage current assureStartupStampLogged.\n\t\n\tfile safelyDo: [\n\t\tfile setToEnd.\n\n\t\tpreambleBlock value: file.  \"Write the preamble\"\n\t\tremoteString := RemoteString newString: sourceStr onFileNumber: fileIndex toFile: file.\n\t\tfile nextChunkPut: ' '.\n\t\tInMidstOfFileinNotification signal ifFalse: [file flush].\n\t\tself checkOKToAdd: sourceStr size at: remoteString position.\n\t\tself setSourcePosition: remoteString position inFile: fileIndex].\n! !\n!RemoteString methodsFor: 'private' stamp: 'dmu 9/7/2010 14:23'!\nstring: aString onFileNumber: fileNumber\n\t\"Store this as my string if source files exist.\"\n\t| theFile |\n\t(SourceFiles at: fileNumber) == nil ifFalse: \n\t\t[theFile := SourceFiles at: fileNumber.\n\t\ttheFile safelyDo: [\n\t\t\ttheFile setToEnd; cr.\n\t\t\tself string: aString onFileNumber: fileNumber toFile: theFile]\n\t\t]! !\n!SmalltalkImage methodsFor: 'sources, change log' stamp: 'dmu 9/7/2010 14:26'!\nwriteRecentCharacters: nCharacters toFileNamed: aFilename\n\t\"Schedule an editable text view on the last n characters of changes.\"\n\t| changes |\n\tchanges := SourceFiles at: 2.\n\tchanges safelyDo: [\n\t\tchanges setToEnd; skip: nCharacters negated.\n\t\t(FileStream newFileNamed: aFilename) nextPutAll: (changes next: nCharacters); close; open; edit\n\t]! !\n!SmalltalkImage methodsFor: 'sources, changes log' stamp: 'dmu 9/7/2010 14:25'!\nlogChange: aStringOrText \n\t\"Write the argument, aString, onto the changes file.\"\n\t| aString changesFile |\n\t(SourceFiles isNil or: [(SourceFiles at: 2) == nil]) ifTrue: [^ self].\n\tself assureStartupStampLogged.\n\n\taString := aStringOrText asString.\n\t(aString findFirst: [:char | char isSeparator not]) = 0\n\t\tifTrue: [^ self].  \"null doits confuse replay\"\n\t(changesFile := SourceFiles at: 2).\n\tchangesFile isReadOnly ifTrue:[^self].\n\tchangesFile safelyDo: [\n\t\tchangesFile setToEnd; cr; cr.\n\t\tchangesFile nextChunkPut: aString.\n\t\t\t\"If want style changes in DoIt, use nextChunkPutWithStyle:, and allow Texts to get here\"\n\t\tself forceChangesToDisk.\n\t]! !\n!SmalltalkImage methodsFor: 'sources, changes log' stamp: 'dmu 9/7/2010 14:25'!\nassureStartupStampLogged\n\t\"If there is a startup stamp not yet actually logged to disk, do it now.\"\n\t| changesFile |\n\tStartupStamp ifNil: [^ self].\n\t(SourceFiles isNil or: [(changesFile := SourceFiles at: 2) == nil]) ifTrue: [^ self].\n\tchangesFile isReadOnly ifTrue:[^self].\n\tchangesFile safelyDo: [\n\t\tchangesFile setToEnd; cr; cr.\n\t\tchangesFile nextChunkPut: StartupStamp asString; cr.\n\t\tStartupStamp := nil.\n\t\tself forceChangesToDisk.\n\t]! !\n\n!ClassDescription methodsFor: 'fileIn/Out' stamp: 'dmu 9/7/2010 14:22'!\nprintMethodChunk: selector withPreamble: doPreamble on: outStream\n\t\tmoveSource: moveSource toFile: fileIndex\n\t\"Copy the source code for the method associated with selector onto the fileStream.  If moveSource true, then also set the source code pointer of the method.\"\n\t| preamble method oldPos newPos sourceFile endPos |\n\tdoPreamble \n\t\tifTrue: [preamble := self name , ' methodsFor: ' ,\n\t\t\t\t\t(self organization categoryOfElement: selector) asString printString]\n\t\tifFalse: [preamble := ''].\n\tmethod := self methodDict at: selector ifAbsent:\n\t\t[outStream nextPutAll: selector; cr.\n\t\toutStream tab; nextPutAll: '** ERROR!!  THIS SCRIPT IS MISSING ** ' translated; cr; cr.\n\t\toutStream nextPutAll: '  '.\n\t\t^ outStream].\n\n\t((method fileIndex = 0\n\t\tor: [(SourceFiles at: method fileIndex) == nil])\n\t\tor: [(oldPos := method filePosition) = 0])\n\t\tifTrue:\n\t\t[\"The source code is not accessible.  We must decompile...\"\n\t\tpreamble size > 0 ifTrue: [outStream cr; nextPut: $!!; nextChunkPut: preamble; cr].\n\t\toutStream nextChunkPut: method decompileString]\n\t\tifFalse:\n\t\t[sourceFile := SourceFiles at: method fileIndex.\n\t\tsourceFile safelyDo: [\n\t\t\tpreamble size > 0\n\t\t\t\tifTrue:    \"Copy the preamble\"\n\t\t\t\t\t[outStream copyPreamble: preamble from: sourceFile at: oldPos]\n\t\t\t\tifFalse:\n\t\t\t\t\t[sourceFile position: oldPos].\n\t\t\t\"Copy the method chunk\"\n\t\t\tnewPos := outStream position.\n\t\t\toutStream copyMethodChunkFrom: sourceFile.\n\t\t\tsourceFile skipSeparators.      \"The following chunk may have ]style[\"\n\t\t\tsourceFile peek == $] ifTrue: [\n\t\t\t\toutStream cr; copyMethodChunkFrom: sourceFile].\n\t\t\t\n\t\t\tmoveSource ifTrue:    \"Set the new method source pointer\"\n\t\t\t\t[endPos := outStream position.\n\t\t\t\tmethod checkOKToAdd: endPos - newPos at: newPos.\n\t\t\t\tmethod setSourcePosition: newPos inFile: fileIndex]]].\n\tpreamble size > 0 ifTrue: [outStream nextChunkPut: ' '].\n\t^ outStream cr! !\n!StandardSourceFileArray class methodsFor: 'initialize-release' stamp: 'dmu 9/7/2010 14:12'!\ninstall\n\t\"Replace SourceFiles by an instance of me with the standard sources and changes files.\n\tThis only works if SourceFiles is either an Array or an instance of this class\"\n\t\"StandardSourceFileArray install\"\n\tStandardFileStream resetAllInterlocks.\n\tSourceFiles := self new initialize! !\n\n!Process methodsFor: 'RVM' stamp: 'dmu 9/17/2010 11:59'!\nsuspendedContextWaitingIfNecessary\n\t\"In RVM, can suspend some other running process, and so after sending suspend, suspendedContext may still be nil.\"\n\t\n\t[self suspendedContext isNil] whileTrue.\n\t^ self suspendedContext! !\n!ParagraphEditor methodsFor: 'do-its' stamp: 'dmu 9/17/2010 12:00'!\ndebug: aCompiledMethod receiver: anObject in: evalContext\n\n\t| selector guineaPig debugger context |\n\tselector := evalContext isNil ifTrue: [#DoIt] ifFalse: [#DoItIn:].\n\tanObject class addSelectorSilently: selector withMethod: aCompiledMethod.\n\tguineaPig := evalContext isNil\n\t\tifTrue: [[anObject DoIt] newProcess]\n\t\tifFalse: [[anObject DoItIn: evalContext] newProcess].\n\tcontext := guineaPig suspendedContextWaitingIfNecessary.\n\tdebugger := ToolSet \n\t\tdebug: guineaPig\n\t\tcontroller: nil\n\t\tcontext: context.\n\tdebugger openFullNoSuspendLabel: 'Debug it'.\n\t[debugger interruptedContext method == aCompiledMethod]\n\t\twhileFalse: [debugger send].\n\tanObject class basicRemoveSelector: selector! !\n!Mutex methodsFor: 'mutual exclusion' stamp: 'dmu 6/14/2010 16:16'!\ncritical: aBlock\n\t\"Evaluate aBlock protected by the receiver.\"\n\t| activeProcess |\n\tactiveProcess := Processor thisProcess.\n\tactiveProcess == owner ifTrue:[^aBlock value].\n\t^semaphore critical:[\n\t\towner := activeProcess.\n\t\taBlock ensure:[owner := nil]].! !\n!Mutex commentStamp: 'dmu 9/17/2010 12:34'!\nA Mutex is a light-weight MUTual EXclusion object being used when two or more processes need to access a shared resource concurrently. A Mutex grants ownership to a single process and will suspend any other process trying to aquire the mutex while in use. Waiting processes are granted access to the mutex in the order the access was requested.\n\nBrought in from Squeak 4.1 because we need it.\n\nInstance variables:\n\tsemaphore\t<Semaphore>\t\tThe (primitive) semaphore used for synchronization.\n\towner\t\t<Process>\t\tThe process owning the mutex.!\n\n!UserInterruptHandler methodsFor: 'private' stamp: 'dmu 9/17/2010 16:39'!\nhandleUserInterrupt\n\t\"This will be called from the event-fetcher process. \n\tAssume no system-vital processes have a lower priority than this, and are thus ok to interrupt\"\n\tUserInterruptHandler cmdDotEnabled \n\t\tifTrue: [\n\t\t\n\t\t\t[|toInterrupt|\n\t\t\ttoInterrupt := Processor preemptedProcess.\n\t\t\t\"Only interrupt processes which are potentially blocking the UI\"\n\t\t\ttoInterrupt priority <  Project uiProcess priority ifTrue: [toInterrupt := Project uiProcess].\n\t\t\t\n\t\t\t\"Fork at lower priority to avoid interrupting system-critical processes\"\n\t\t\ttoInterrupt debugWithTitle: 'User Interrupt'] \n\t\t\t\tforkAt: Processor thisProcess priority -1]! !\n\n!TAssertable methodsFor: 'asserting' stamp: 'StefanMarr 10/30/2010 13:38'!\nshould: aBlock notTakeMoreThan: aDuration\n    \"Evaluate aBlock in a forked process and if it takes more than anInteger milliseconds\n    to run we terminate the process and report a test failure.  It'' important to\n    use the active process for the test failure so that the failure reporting works correctly\n    in the context of the exception handlers.\"\n\n    | evaluated evaluationProcess result delay testProcess |\n\n    evaluated := false.\n    delay := Delay forDuration: aDuration.\n    testProcess := Processor thisProcess.\n    \"Create a new process to evaluate aBlock\"\n    evaluationProcess := [\n        result := aBlock value.\n        evaluated := true.\n        delay unschedule.\n        testProcess resume ] forkNamed: 'Process to evaluate should: notTakeMoreThanMilliseconds:'.\n\n    \"Wait the milliseconds they asked me to\"\n    delay wait.\n    \"After this point either aBlock was evaluated or not...\"\n    evaluated ifFalse: [\n        evaluationProcess terminate.\n        self assert: false description: ('Block evaluation took more than the expected <1p>' expandMacrosWith: aDuration)].\n   \n    ^result! !\n\n\n!ProcessTest methodsFor: 'running' stamp: 'StefanMarr 10/30/2010 13:38'!\ntearDown\n\tProcessor thisProcess environmentRemoveKey: #processTests ifAbsent: []! !\n\n!ProcessTest methodsFor: 'testing' stamp: 'StefanMarr 10/30/2010 13:39'!\ntestEnvironmentAt\n\tProcessor thisProcess environmentAt: #processTests put: 42.\n\tself assert: (Processor thisProcess environmentAt: #processTests) = 42.\n\tself should: [Processor thisProcess environmentAt: #foobar] raise: Error! !\n\n!ProcessTest methodsFor: 'testing' stamp: 'StefanMarr 10/30/2010 13:38'!\ntestEnvironmentAtPut\n\tself assert: (Processor thisProcess environmentAt: #processTests put: 42) = 42.! !\n\n!ProcessTest methodsFor: 'testing' stamp: 'StefanMarr 10/30/2010 13:38'!\ntestEnvironmentRemoveKey\n\tProcessor thisProcess environmentAt: #processTests put: 42.\n\tProcessor thisProcess environmentRemoveKey: #processTests.\n\tself assert: (Processor thisProcess environmentAt: #processTests ifAbsent: []) isNil.\n\tself should: [Processor thisProcess environmentAt: #processTests] raise: Error! !\n\n\n!UpdateStreamer methodsFor: 'private actions' stamp: 'StefanMarr 10/30/2010 13:39'!\nsilentRetrieveUrls: urls ontoQueue: queue withWaitSema: waitSema \n\t\"download the given list of URLs. The queue will be loaded alternately  \n\twith url's and with the retrieved contents. If a download fails, the  \n\tcontents will be #failed. If all goes well, a special pair with an empty  \n\tURL and the contents #finished will be put on the queue. waitSema is  \n\twaited on every time before a new document is downloaded; this keeps \n\tthe downloader from getting too far  ahead of the main process\"\n\t\"kill the existing downloader if there is one\"\n\t\n\tself zapUpdateDownloader.\n\t\"fork a new downloading process\"\n\tUpdateDownloader := [\n\t\t\turls do: [:url | \n\t\t\t\t\t| canPeek front doc | \n\t\t\t\t\twaitSema wait.\n\t\t\t\t\tqueue nextPut: url.\n\t\t\t\t\tdoc := HTTPClient httpGet: url.\n\t\t\t\t\tdoc isString\n\t\t\t\t\t\tifTrue: [queue nextPut: #failed.\n\t\t\t\t\t\t\tUpdateDownloader := nil.\n\t\t\t\t\t\t\tProcessor thisProcess terminate]\n\t\t\t\t\t\tifFalse: [canPeek := 120 min: doc size.\n\t\t\t\t\t\t\tfront := doc next: canPeek.  doc skip: -1 * canPeek.\n\t\t\t\t\t\t\t(front beginsWith: '<!!DOCTYPE') ifTrue: [\n\t\t\t\t\t\t\t\t(front includesSubString: 'Not Found') ifTrue: [\n\t\t\t\t\t\t\t\t\tqueue nextPut: #failed.\n\t\t\t\t\t\t\t\t\tUpdateDownloader := nil.\n\t\t\t\t\t\t\t\t\tProcessor thisProcess terminate]]].\n\t\t\t\t\t\tUpdateDownloader \n\t\t\t\t\t\t\t\tifNotNil: [queue nextPut: doc]].\n\t\t\tqueue nextPut: ''.\n\t\t\tqueue nextPut: #finished.\n\t\t\tUpdateDownloader := nil] newProcess.\n\tUpdateDownloader priority: Processor userInterruptPriority.\n\t\"start the process running\"\n\tUpdateDownloader resume! !\n\n!UpdateStreamer methodsFor: 'private actions' stamp: 'StefanMarr 10/30/2010 13:39'!\nverboseRetrieveUrls: urls ontoQueue: queue withWaitSema: waitSema \n\t\"download the given list of URLs. The queue will be loaded alternately  \n\twith url's and with the retrieved contents. If a download fails, the  \n\tcontents will be #failed. If all goes well, a special pair with an empty  \n\tURL and the contents #finished will be put on the queue. waitSema is  \n\twaited on every time before a new document is downloaded; this keeps \n\tthe downloader from getting too far  ahead of the main process\"\n\t\"kill the existing downloader if there is one\"\n\t\n\tself zapUpdateDownloader.\n\t\"fork a new downloading process\"\n\tUpdateDownloader := [\n\t\t| updateCounter |\n\t\tupdateCounter := 0.\n\t\t'Downloading updates' displayProgressAt: World activeHand position from: 0 to: urls size during: [:bar |\n\t\t\turls do: [:url | \n\t\t\t\t\t| canPeek front doc | \n\t\t\t\t\twaitSema wait.\n\t\t\t\t\tqueue nextPut: url.\n\t\t\t\t\tdoc := HTTPClient httpGet: url.\n\t\t\t\t\tdoc isString\n\t\t\t\t\t\tifTrue: [queue nextPut: #failed.\n\t\t\t\t\t\t\tUpdateDownloader := nil.\n\t\t\t\t\t\t\tProcessor thisProcess terminate]\n\t\t\t\t\t\tifFalse: [canPeek := 120 min: doc size.\n\t\t\t\t\t\t\tfront := doc next: canPeek.  doc skip: -1 * canPeek.\n\t\t\t\t\t\t\t(front beginsWith: '<!!DOCTYPE') ifTrue: [\n\t\t\t\t\t\t\t\t(front includesSubString: 'Not Found') ifTrue: [\n\t\t\t\t\t\t\t\t\tqueue nextPut: #failed.\n\t\t\t\t\t\t\t\t\tUpdateDownloader := nil.\n\t\t\t\t\t\t\t\t\tProcessor thisProcess terminate]]].\n\t\t\t\t\t\tUpdateDownloader \n\t\t\t\t\t\t\t\tifNotNil: [queue nextPut: doc. \n\t\t\t\t\t\t\t\t\t\tupdateCounter := updateCounter + 1. \n\t\t\t\t\t\t\t\t\t\tbar value: updateCounter]]].\n\t\t\tqueue nextPut: ''.\n\t\t\tqueue nextPut: #finished.\n\t\t\tUpdateDownloader := nil] newProcess.\n\tUpdateDownloader priority: Processor userInterruptPriority.\n\t\"start the process running\"\n\tUpdateDownloader resume! !\n\n\n!ProcessTerminateBug methodsFor: 'tests' stamp: 'StefanMarr 10/30/2010 13:37'!\ntestSchedulerTermination\n\t\"self debug: #testSchedulerTermination\"\n\t\n\t| process sema gotHere sema2 |\n\tgotHere := false.\n\tsema := Semaphore new.\n\tsema2 := Semaphore new.\n\tprocess := [\n\t\tsema signal.\n\t\tsema2 wait.\n\t\t\"will be suspended here\"\n\t\tgotHere := true. \"e.g., we must *never* get here\" ] forkAt: Processor thisProcess priority.\n\tsema wait. \"until process gets scheduled\"\n \tprocess terminate.\n\tsema2 signal.\n\tProcessor yield. \"will give process a chance to continue and\nhorribly screw up\"\n\tself assert: gotHere not.\n! !\n\n!ProcessTerminateBug methodsFor: 'tests' stamp: 'StefanMarr 10/30/2010 13:38'!\ntestUnwindFromActiveProcess\n\t\"self debug: #testUnwindFromActiveProcess\"\n\t\n\t| sema process |\n\tsema := Semaphore forMutualExclusion.\n\tself assert: (sema isSignaled).\n\tprocess := [ sema critical: \n\t\t\t\t\t\t[ self deny: sema isSignaled.\n\t\t\t\t\t\tProcessor thisProcess terminate.]] forkAt: Processor userInterruptPriority.\n\tself assert: sema isSignaled.! !\n\n!InputEventFetcher methodsFor: 'private' stamp: 'StefanMarr 11/4/2010 00:01' prior: 22276785!\nprimGetNextEvent: array\n\t\"Store the next OS event available into the provided array.\n\tEssential.\"\n\t<primitive: 94>\n\tarray at: 1 put: EventTypeNone. \"If there is no event, the primitive will fail, client code expects the indication via the array\"\n\t^nil! !"
  },
  {
    "path": "image.st/RVM-multicore-support.squeak.st",
    "content": "'******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************'!\nDisplayText subclass: #Paragraph\n\tinstanceVariableNames: 'clippingRectangle compositionRectangle destinationForm rule mask marginTabsLevel lines lastLine destFormSema'\n\tclassVariableNames: ''\n\tpoolDictionaries: 'TextConstants'\n\tcategory: 'ST80-Support'!\nPluggableTextMorph subclass: #PluggableTextMorphPlus\n\tinstanceVariableNames: 'getColorSelector acceptAction unstyledAcceptText styler textInterlock'\n\tclassVariableNames: ''\n\tpoolDictionaries: ''\n\tcategory: 'ToolBuilder-Morphic'!\nLink subclass: #Process\n\tinstanceVariableNames: 'suspendedContext priority myList errorHandler name island env hostCore coreMask'\n\tclassVariableNames: 'SemaForSuspensions'\n\tpoolDictionaries: ''\n\tcategory: 'Kernel-Processes'!\nObject subclass: #RVMPrimitives\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpoolDictionaries: ''\n\tcategory: 'RVM-Support'!\nObject subclass: #SHTextStyler\n\tinstanceVariableNames: 'sem backgroundProcess text monitor view stylingEnabled textInterlock'\n\tclassVariableNames: ''\n\tpoolDictionaries: ''\n\tcategory: 'ShoutCore-Styling'!\n\t\nObject subclass: #ProcessorScheduler\n\tinstanceVariableNames: 'quiescentProcessLists activeProcess'\n\tclassVariableNames: 'BackgroundProcess EmergencyProcess HighIOPriority LowIOPriority SystemBackgroundPriority SystemRockBottomPriority TimingPriority UserBackgroundPriority UserInterruptPriority UserSchedulingPriority'\n\tpoolDictionaries: ''\n\tcategory: 'Kernel-Processes'!\nFileStream subclass: #StandardFileStream\n\tinstanceVariableNames: 'name fileID buffer1 interlock'\n\tclassVariableNames: 'Registry'\n\tpoolDictionaries: ''\n\tcategory: 'System-Files'!\nView subclass: #StandardSystemView\n\tinstanceVariableNames: 'labelFrame labelText isLabelComplemented savedSubViews minimumSize maximumSize collapsedViewport expandedViewport labelBits windowBits bitsValid updatablePanes displayInterlock'\n\tclassVariableNames: 'CacheBits LabelStyle'\n\tpoolDictionaries: ''\n\tcategory: 'ST80-Support'!\nObject subclass: #Mutex\n\tinstanceVariableNames: 'semaphore owner'\n\tclassVariableNames: ''\n\tpoolDictionaries: ''\n\tcategory: 'RVM-Support'!\n!ProcessorScheduler methodsFor: 'accessing' stamp: 'dmu 11/25/2008 00:23'!\nactivePriority\n\t\"Answer the priority level of the currently running Process.\"\n\n\t^self thisProcess priority! !\n!ProcessorScheduler methodsFor: 'accessing' stamp: 'dmu 9/16/2010 14:53'!\npreemptedProcess\n\t\"Return the process that the currently active process just preempted.\"\n\t| list listWithoutMe |\n\tself thisProcess priority to: 1 by: -1 do:[:priority|\n\t\tlist := quiescentProcessLists at: priority.\n\t\t\"RVM keeps running processes on the lists -- dmu 9/16/10\"\n\t\tlistWithoutMe := list reject: [:p | p == Processor thisProcess].\n\t\tlistWithoutMe isEmpty ifFalse:[^listWithoutMe last].\n\t].\n\t^nil\n\n\t\"Processor preemptedProcess\"! !\n!ProcessorScheduler methodsFor: 'process state change' stamp: 'dmu 11/25/2008 00:23'!\nterminateActive\n\t\"Terminate the process that is currently running.\"\n\n\tself thisProcess terminate! !\n!ProcessorScheduler methodsFor: 'RVM' stamp: 'dmu 6/14/2010 15:39'!\nareRunningProcessesInSchedulerLists\n\t\"Our RVM follows Pallas' MS system and keeps runnable processes in the scheduler lists even when running.\"\n\t^RVMPrimitives isRVM! !\n!ProcessorScheduler methodsFor: 'RVM' stamp: 'dmu 11/25/2008 00:26'!\nisActive: aProcess\n\t^ aProcess suspendedContext ==  nil! !\n!ProcessorScheduler methodsFor: 'RVM' stamp: 'dmu 6/14/2010 15:32'!\nthisProcess\n\t^ RVMPrimitives thisProcess! !\n!ProcessorScheduler methodsFor: 'RVM' stamp: 'dmu 3/22/2010 13:03'!\nyieldIfFewerCoresThan: n\n\tRVMPrimitives coreCount < n    ifTrue: [self yield]! !\n!Project class methodsFor: 'utilities' stamp: 'dmu 11/25/2008 00:24'!\nspawnNewProcessAndTerminateOld: terminate\n\n\tself spawnNewProcess.\n\tterminate\n\t\tifTrue: [Processor terminateActive]\n\t\tifFalse: [Processor thisProcess suspend]! !\n!RVMPrimitives class methodsFor: 'debugging VM' stamp: 'dmu 6/8/2010 23:41'!\nbreakpoint\n\t<primitive: 'primitiveBreakpoint' module: 'RVMPrimitives'>\n\tself primitiveFailed! !\n!RVMPrimitives class methodsFor: 'debugging VM' stamp: 'dmu 6/9/2010 00:02'!\nprintExecutionTrace\n\t<primitive: 'primitivePrintExecutionTrace' module: 'RVMPlugin'>! !\n!RVMPrimitives class methodsFor: 'debugging VM' stamp: 'dmu 6/9/2010 00:01'!\nprintOnConsole: aString\n\t\"Prints a string onto the console\"\n\t<primitive: 'primitivePrint' module: 'RVMPlugin'>! !\n!RVMPrimitives class methodsFor: 'debugging VM' stamp: 'dmu 6/9/2010 00:00'!\nprintStack\n\t\"Prints Smalltalk stack to console\"\n\t<primitive: 'primitivePrintStack' module: 'RVMPlugin'>! !\n!RVMPrimitives class methodsFor: 'debugging VM' stamp: 'dmu 6/9/2010 00:01'!\nprintVMStatistics\n\t<primitive: 'primitivePrintStats' module: 'RVMPlugin'>! !\n!RVMPrimitives class methodsFor: 'VM statistics' stamp: 'dmu 6/8/2010 23:04'!\nsampleRVM\n\t\"Grab some data from the VM and return it\"\n\t<primitive: 'primitiveSampleRVM' module: 'RVMPlugin'>\n\t\"RVMPrimitives sampleRVM\"\n\t^ nil! !\n!RVMPrimitives class methodsFor: 'VM statistics' stamp: 'sm 10/27/2010 22:09'!\ngetMainRank\n\t\"Get a sample from the VM and read out the main rank\"\n\t| sample |\n\tsample := self sampleRVM.\n\t^ ((sample at: 6) at: 2) at: 6! !\n!RVMPrimitives class methodsFor: 'VM statistics' stamp: 'dmu 6/8/2010 23:40'!\nsampleSpecificData: flags\n\t\"Grab some data from the VM and return it\"\n\t\"Bit offsets for flags; bit 0 is 1, bit 1 is 2, bit 2 is 4, etc.\n\t\n\tallCores, // 0\n\trunMask,\n\tmessageNames,\n\tcpuCoreStats,\n\tallCoreStats,\n\tfence,\n\n\tmillisecs, // 6\n\tcycles,\n\tmessageStats,\n\tmemorySystemStats,\n    \tinterpreterStats,\n    \tobjectTableStats,\n    \tinteractionStats,\n\n   \t coreCoords, // 14\n    \tsendTallies,\n    \treceiveTallies,\n    \tbufferedMessageStats,\n    \treceiveCycles,\n\n    \t// memory system\n    \tgcStats, // 19\n    \theapStats,\n\n    \t// interpreter\n    \tbytecodes, // 20\n    \tyieldCount,\n    \tcycleCounts,\n    \tinterruptChecks,\n    \tmovedMutatedObjectStats,\n    \tmutexStats,\n   \t interpreterLoopStats // 26\"\n\n\t<primitive: 'primitiveSampleRVM' module: 'RVMPlugin'>\n\t^ nil! !\n!RVMPrimitives class methodsFor: 'rearranging objects' stamp: 'dmu 6/8/2010 23:58'!\nmoveAllToReadMostlyHeaps\n\t\"Move all objects into read-mostly heaps\"\n\t<primitive: 'primitiveMoveAllToReadMostlyHeaps' module: 'RVMPlugin'>\n\tself primitiveFailed! !\n!RVMPrimitives class methodsFor: 'rearranging objects' stamp: 'dmu 6/8/2010 23:55'!\nshuffleToHeapsFrom: firstHeap to: lastHeap\n\t\"Deal out all objects in the system into heaps from firstHeap through lastHeap in round-robin fashion so that adjacent objects wind up in different heaps\"\n\t<primitive: 'primitiveShuffle' module: 'RVMPlugin'>\n\t^ self primitiveFailed! !\n!RVMPrimitives class methodsFor: 'rearranging objects' stamp: 'dmu 6/8/2010 23:56'!\nshuffleToHeapsFrom: firstHeap to: lastHeap movingReadWriteObjectsToReadMostlyHeap: rwToRM  movingReadMostlyObjectsToReadWriteHeap: rmToRw\n\t\"Deal out all objects in the system into heaps from firstHeap through lastHeap in round-robin fashion so that adjacent objects wind up in different heaps\"\n\t\"If rwToRM, move objects in read/write heaps to read-mostly heaps.\"\n\t\"If rmToRW, move objects in read-mostly heaps to read/write heaps.\"\n\t<primitive: 'primitiveShuffle' module: 'RVMPlugin'>\n\t^ self primitiveFailed! !\n!RVMPrimitives class methodsFor: 'rearranging objects' stamp: 'dmu 6/8/2010 23:57'!\nspreadToHeapsFrom: firstHeap to: lastHeap\n\t\"Spread out all objects in the system into heaps from firstHeap through lastHeap so that each heap ends up about equally full.\"\n\t<primitive: 'primitiveSpread' module: 'RVMPlugin'>\n\t^ self primitiveFailed! !\n!RVMPrimitives class methodsFor: 'rearranging objects' stamp: 'dmu 6/8/2010 23:57'!\nspreadToHeapsFrom: firstHeap to: lastHeap movingReadWriteObjectsToReadMostlyHeap: rwToRM  movingReadMostlyObjectsToReadWriteHeap: rmToRw\n\t\"Spread out all objects in the system into heaps from firstHeap through lastHeap so that each heap ends up about equally full.\"\n\t\"If rwToRM, move objects in read/write heaps to read-mostly heaps.\"\n\t\"If rmToRW, move objects in read-mostly heaps to read/write heaps.\"\n\t<primitive: 'primitiveSpread' module: 'RVMPlugin'>\n\t^ self primitiveFailed! !\n!RVMPrimitives class methodsFor: 'situating an object' stamp: 'dmu 6/8/2010 23:30'!\nfor: anObject setRankTo: rank\n\t<primitive: 'primitiveSetCoordinatesFor' module: 'RVMPlugin'>\n\tself primitiveFailed! !\n!RVMPrimitives class methodsFor: 'situating an object' stamp: 'dmu 6/8/2010 23:31'!\nfor: anObject setRankTo: rank isReadWrite: isRW\n\t<primitive: 'primitiveSetCoordinatesFor' module: 'RVMPlugin'>\n\tself primitiveFailed! !\n!RVMPrimitives class methodsFor: 'situating an object' stamp: 'dmu 6/8/2010 23:17'!\ngetCoreOf: anObject\n\t\"RVMPrimitives getCoreOf: 2@3\"\n\t<primitive: 'primitiveGetCore' module: 'RVMPlugin'>\n\t^ -1! !\n!RVMPrimitives class methodsFor: 'situating an object' stamp: 'dmu 6/8/2010 23:47'!\ngetMutabilityOf: anObject\n\t\"Return true if argument is in a read/write heap, false if in read-mostly heap\"\n\t<primitive: 'primitiveGetMutability' module: 'RVMPlugin'>\n\t^ true! !\n!RVMPrimitives class methodsFor: 'enumerating a heap' stamp: 'dmu 6/8/2010 23:10'!\nallObjectsInHeap: rank isReadWrite: trueForReadWriteFalseForReadMostly\n\t\"return array of all objects in either read/write or read-mostly heap specified by rank and trueForReadWriteFalseForReadMostly\"\n\t\"RVMPrimitives allObjectsInHeap: 0 isReadWrite: true\"\n\t<primitive: 'primitiveAllObjectsInHeap' module: 'RVMPlugin'>\n\t^ nil! !\n!RVMPrimitives class methodsFor: 'processes' stamp: 'dmu 6/8/2010 23:18'!\ngetCoreIAmRunningOn\n\t\"RVMPrimitives getCoreIAmRunningOn\"\n\t<primitive: 'primitiveGetCoreIAmRunningOn' module: 'RVMPlugin' >\n  \t^ -1! !\n!RVMPrimitives class methodsFor: 'processes' stamp: 'dmu 6/8/2010 23:44'!\ngetRunMask\n\t\"Return an integer with ones corresponding to cores RVM is allowed to use: 1 means core 0, 3 means cores 0 and 1, etc.\"\n\t\"RVMPrimitives getRunMask printStringBase: 16\"\n\t<primitive: 'primitiveRunMask' module: 'RVMPlugin'>\n\t^ -1! !\n!RVMPrimitives class methodsFor: 'processes' stamp: 'dmu 6/9/2010 00:07'!\ngetRunningProcessesByCore\n\t\"Returns array of running processes, indexed by core (+1)\"\n\t<primitive: 'primitiveRunningProcessByCore' module: 'RVMPlugin'>\n\t^ self primitiveFailed! !\n!RVMPrimitives class methodsFor: 'processes' stamp: 'dmu 6/8/2010 23:46'!\nsetRunMask: anInteger\n\t\"Sets run mask to argument and returns old run mask.\n\tOnly cores set in run mask will be used to run Smalltalk processes.\"\n\t\"RVMPrimitives setRunMask: 1\"\n\t<primitive: 'primitiveRunMask' module: 'RVMPlugin'>\n\t^ -1! !\n!RVMPrimitives class methodsFor: 'processes' stamp: 'dmu 6/9/2010 00:04'!\nthisProcess\n\t\"Return the process that is running; RVM does not use ActiveProcess for this state, since many may be running\"\n\t<primitive: 'primitiveThisProcess'  module: 'RVMPlugin'>\n\t^ Processor activeProcess! !\n!RVMPrimitives class methodsFor: 'cores' stamp: 'dmu 6/8/2010 23:11'!\ncoreCount\n  \"RVMPrimitives coreCount\"\n  <primitive: 'primitiveCoreCount' module: 'RVMPlugin'>\n  ^ 1! !\n!RVMPrimitives class methodsFor: 'tracing' stamp: 'dmu 6/8/2010 23:25'!\ngetCoreTrace\n\t\"RVMPrimitives getCoreTrace\"\n\t<primitive: 'primitiveTraceCores' module: 'RVMPlugin'>\n\t^ self primitiveFailed! !\n!RVMPrimitives class methodsFor: 'tracing' stamp: 'dmu 6/8/2010 23:26'!\ngetMutatedReplicatedObjectsTrace\n\t<primitive: 'primitiveTraceMutatedReplicatedObjects' module: 'RVMPlugin'>\n\t^ self primitiveFailed! !\n!RVMPrimitives class methodsFor: 'tracing' stamp: 'dmu 6/8/2010 23:22'!\nstartCoreTrace: size\n\t\"RVMPrimitives startCoreTrace: 1000\"\n\t<primitive: 'primitiveTraceCores' module: 'RVMPlugin'>\n\t^ self primitiveFailed! !\n!RVMPrimitives class methodsFor: 'tracing' stamp: 'dmu 6/8/2010 23:27'!\nstartMutatedReplicatedObjectsTrace: size\n\t<primitive: 'primitiveTraceMutatedReplicatedObjects' module: 'RVMPlugin'>\n\t^ self primitiveFailed! !\n!RVMPrimitives class methodsFor: 'emergency evaluating' stamp: 'dmu 6/8/2010 23:19'!\ngetEmergencySemaphore\n\t\"When you hit shift-control-a, the VM will signal the emergency semaphore, if it has been set to a semaphore\"\n\t\"RVMPrimitives getEmergencySemaphore\"\n\t<primitive: 'primitiveEmergencySemaphore' module: 'RVMPlugin'>! !\n!RVMPrimitives class methodsFor: 'emergency evaluating' stamp: 'dmu 6/9/2010 00:06'!\nsetEmergencySemaphore: aSema\n\t\"When you hit shift-control-a, the VM will signal the emergency semaphore, if it has been set to a semaphore\"\n\t\"RVMPrimitives setEmergencySemaphore: Semaphore new\"\n\t<primitive: 'primitiveEmergencySemaphore' module: 'RVMPlugin'>! !\n!RVMPrimitives class methodsFor: 'using extra word' stamp: 'dmu 6/14/2010 15:27'!\ngetExtraPreheaderWordOf: anObject\n\t\"Returns the extra preheader word of the argument.\"\n\t\"RVMPrimitives getExtraPreheaderWordOf: 3@4\"\n\t<primitive: 'primitiveGetExtraPreheaderWord' module: 'RVMPlugin'>! !\n!RVMPrimitives class methodsFor: 'using extra word' stamp: 'dmu 6/14/2010 15:27'!\nsetExtraPreheaderWordOf: anObject to: newContents\n\t\"Sets the extra preheader word of the first argument.\"\n\t\"|n| n := 3@4.\n\tRVMPrimitives setExtraPreheaderWordOf: n to: 17.\n\tRVMPrimitives getExtraPreheaderWordOf: n\"\n\t<primitive: 'primitiveSetExtraPreheaderWord' module: 'RVMPlugin'>! !\n!RVMPrimitives class methodsFor: 'using extra word' stamp: 'dmu 6/9/2010 00:05'!\nsetExtraWordSelector: aSelector\n\t\"returns the old one\"\n\t<primitive: 'primitiveSetExtraWordSelector' module: 'RVMPlugin'>\n\t^self primitiveFailed! !\n!RVMPrimitives class methodsFor: 'testing' stamp: 'dmu 6/14/2010 15:36'!\nisRVM\n\t\"RVMPrimitives isRVM\"\n\t^ (self getCoreOf: nil) ~= -1! !\n!BlockClosure methodsFor: 'evaluating' stamp: 'dmu 6/14/2010 16:13'!\nvalueAt: blockPriority \n\t\"Evaluate the receiver (block), with another priority as the actual one \n\tand restore it afterwards. The caller should be careful with using \n\thigher priorities.\"\n\t| activeProcess result outsidePriority |\n\tactiveProcess := Processor thisProcess.\n\toutsidePriority := activeProcess priority.\n\tactiveProcess priority: blockPriority.\n\tresult := self ensure: [activeProcess priority: outsidePriority].\n\t\"Yield after restoring lower priority to give the preempted processes a  \n\tchance to run.\"\n\tblockPriority > outsidePriority\n\t\tifTrue: [Processor yield].\n\t^ result! !\n!BlockClosure methodsFor: 'evaluating' stamp: 'dmu 6/14/2010 16:13'!\nvalueWithin: aDuration onTimeout: timeoutBlock\n\t\"Evaluate the receiver.\n\tIf the evaluation does not complete in less than aDuration evaluate the timeoutBlock instead\"\n\n\t| theProcess delay watchdog |\n\n\taDuration <= Duration zero ifTrue: [^ timeoutBlock value ].\n\n\t\"the block will be executed in the current process\"\n\ttheProcess := Processor thisProcess.\n\tdelay := aDuration asDelay.\n\n\t\"make a watchdog process\"\n\twatchdog := [\n\t\tdelay wait. \t\"wait for timeout or completion\"\n\t\ttheProcess ifNotNil:[ theProcess signalException: TimedOut ] \n\t] newProcess.\n\n\t\"Watchdog needs to run at high priority to do its job (but not at timing priority)\"\n\twatchdog priority: Processor timingPriority-1.\n\n\t\"catch the timeout signal\"\n\t^ [\twatchdog resume.\t\t\t\t\"start up the watchdog\"\n\t\tself ensure:[\t\t\t\t\t\t\"evaluate the receiver\"\n\t\t\ttheProcess := nil.\t\t\t\t\"it has completed, so ...\"\n\t\t\tdelay delaySemaphore signal.\t\"arrange for the watchdog to exit\"\n\t\t]] on: TimedOut do: [ :e | timeoutBlock value ].\n! !\n!BlockClosure methodsFor: 'private' stamp: 'dmu 6/14/2010 16:13'!\nvalueUnpreemptively\n\t\"Evaluate the receiver (block), without the possibility of preemption by higher priority processes. Use this facility VERY sparingly!!\"\n\t\"Think about using Block>>valueUninterruptably first, and think about using Semaphore>>critical: before that, and think about redesigning your application even before that!! \n\tAfter you've done all that thinking, go right ahead and use it...\"\n\t| activeProcess oldPriority result |\n\tactiveProcess := Processor thisProcess.\n\toldPriority := activeProcess priority.\n\tactiveProcess priority: Processor highestPriority.\n\tresult := self ensure: [activeProcess priority: oldPriority].\n\t\"Yield after restoring priority to give the preempted processes a chance to run\"\n\tProcessor yield.\n\t^result! !\n!BlockContext methodsFor: 'evaluating' stamp: 'dmu 6/14/2010 16:14'!\nvalueWithin: aDuration onTimeout: timeoutBlock\n\t\"Evaluate the receiver.\n\tIf the evaluation does not complete in less than aDuration evaluate the timeoutBlock instead\"\n\n\t| theProcess delay watchdog |\n\n\taDuration <= Duration zero ifTrue: [^ timeoutBlock value ].\n\n\t\"the block will be executed in the current process\"\n\ttheProcess := Processor thisProcess.\n\tdelay := aDuration asDelay.\n\n\t\"make a watchdog process\"\n\twatchdog := [\n\t\tdelay wait. \t\"wait for timeout or completion\"\n\t\ttheProcess ifNotNil:[ theProcess signalException: TimedOut ] \n\t] newProcess.\n\n\t\"Watchdog needs to run at high priority to do its job (but not at timing priority)\"\n\twatchdog priority: Processor timingPriority-1.\n\n\t\"catch the timeout signal\"\n\t^ [\twatchdog resume.\t\t\t\t\"start up the watchdog\"\n\t\tself ensure:[\t\t\t\t\t\t\"evaluate the receiver\"\n\t\t\ttheProcess := nil.\t\t\t\t\"it has completed, so ...\"\n\t\t\tdelay delaySemaphore signal.\t\"arrange for the watchdog to exit\"\n\t\t]] on: TimedOut do: [ :e | timeoutBlock value ].\n! !\n!BlockContext methodsFor: 'scheduling' stamp: 'dmu 6/14/2010 16:14'!\nvalueAt: blockPriority \n\t\"Evaluate the receiver (block), with another priority as the actual one \n\tand restore it afterwards. The caller should be careful with using \n\thigher priorities.\"\n\t| activeProcess result outsidePriority |\n\tactiveProcess := Processor thisProcess.\n\toutsidePriority := activeProcess priority.\n\tactiveProcess priority: blockPriority.\n\tresult := self\n\t\t\t\tensure: [activeProcess priority: outsidePriority].\n\t\"Yield after restoring lower priority to give the preempted processes a  \n\tchance to run.\"\n\tblockPriority > outsidePriority\n\t\tifTrue: [Processor yield].\n\t^ result! !\n!BlockContext methodsFor: 'private' stamp: 'dmu 11/25/2008 00:18'!\nvalueUnpreemptively\n\t\"Evaluate the receiver (block), without the possibility of preemption by higher priority processes. Use this facility VERY sparingly!!\"\n\t\"Think about using Block>>valueUninterruptably first, and think about using Semaphore>>critical: before that, and think about redesigning your application even before that!! \n\tAfter you've done all that thinking, go right ahead and use it...\"\n\t| activeProcess oldPriority result |\n\tactiveProcess := Processor thisProcess.\n\toldPriority := activeProcess priority.\n\tactiveProcess priority: Processor highestPriority.\n\tresult := self ensure: [activeProcess priority: oldPriority].\n\t\"Yield after restoring priority to give the preempted processes a chance to run\"\n\tProcessor yield.\n\t^result! !\n!CPUWatcher methodsFor: 'process operations' stamp: 'dmu 11/25/2008 00:18'!\ndebugProcess: aProcess\n\t| uiPriority oldPriority |\n\tuiPriority := Processor thisProcess priority.\n\taProcess priority >= uiPriority ifTrue: [\n\t\toldPriority := ProcessBrowser setProcess: aProcess toPriority: uiPriority - 1\n\t].\n\tProcessBrowser debugProcess: aProcess.! !\n!ComplexProgressIndicator methodsFor: 'as yet unclassified' stamp: 'dmu 6/14/2010 16:14'!\nwithProgressDo: aBlock\n\n\t| safetyFactor totals trialRect delta targetOwner |\n\n\tSmalltalk isMorphic ifFalse: [^aBlock value].\n\tformerProject := Project current.\n\tformerWorld := World.\n\tformerProcess := Processor thisProcess.\n\ttargetMorph\n\t\tifNil: [targetMorph := ProgressTargetRequestNotification signal].\n\ttargetMorph ifNil: [\n\t\ttrialRect := Rectangle center: Sensor cursorPoint extent: 80@80.\n\t\tdelta := trialRect amountToTranslateWithin: formerWorld bounds.\n\t\ttrialRect := trialRect translateBy: delta.\n\t\ttranslucentMorph := TranslucentProgessMorph new\n\t\t\topaqueBackgroundColor: Color white;\n\t\t\tbounds: trialRect;\n\t\t\topenInWorld: formerWorld.\n\t] ifNotNil: [\n\t\ttargetOwner := targetMorph owner.\n\t\ttranslucentMorph := TranslucentProgessMorph new\n\t\t\tsetProperty: #morphicLayerNumber toValue: targetMorph morphicLayerNumber - 0.1;\n\t\t\tbounds: targetMorph boundsInWorld;\n\t\t\topenInWorld: targetMorph world.\n\t].\n\tstageCompleted := 0.\n\tsafetyFactor := 1.1.\t\"better to guess high than low\"\n\ttranslucentMorph setProperty: #progressStageNumber toValue: 1.\n\ttranslucentMorph hide.\n\ttargetOwner ifNotNil: [targetOwner hide].\n\ttotals := self loadingHistoryDataForKey: 'total'.\n\tnewRatio := 1.0.\n\testimate := totals size < 2 ifTrue: [\n\t\t15000\t\t\"be a pessimist\"\n\t] ifFalse: [\n\t\t(totals sum - totals max) / (totals size - 1 max: 1) * safetyFactor.\n\t].\n\tstart := Time millisecondClockValue.\n\tself forkProgressWatcher.\n\n\t[\n\t\taBlock \n\t\t\ton: ProgressInitiationException\n\t\t\tdo: [ :ex | \n\t\t\t\tex sendNotificationsTo: [ :min :max :curr |\n\t\t\t\t\t\"ignore this as it is inaccurate\"\n\t\t\t\t].\n\t\t\t].\n\t] on: ProgressNotification do: [ :note | | stageCompletedString |\n\t\ttranslucentMorph show.\n\t\ttargetOwner ifNotNil: [targetOwner show].\n\t\tnote extraParam ifNotNil:[self addProgressDecoration: note extraParam].\n\t\tstageCompletedString := (note messageText findTokens: ' ') first.\n\t\tstageCompleted := (stageCompletedString copyUpTo: $:) asNumber.\n\t\tcumulativeStageTime := Time millisecondClockValue - start max: 1.\n\t\tprevData := self loadingHistoryDataForKey: stageCompletedString.\n\t\tprevData isEmpty ifFalse: [\n\t\t\tnewRatio := (cumulativeStageTime / (prevData average max: 1)) asFloat.\n\t\t].\n\t\tself \n\t\t\tloadingHistoryAt: stageCompletedString \n\t\t\tadd: cumulativeStageTime.\n\t\ttranslucentMorph \n\t\t\tsetProperty: #progressStageNumber \n\t\t\ttoValue: stageCompleted + 1.\n\t\tnote resume.\n\t].\n\n\tstageCompleted := 999.\t\"we may or may not get here\"\n\n! !\n!ControlManager methodsFor: 'scheduling' stamp: 'dmu 11/25/2008 00:19'!\ninActiveControllerProcess\n\t\"Answer whether the active scheduling process is the actual active \n\tprocess in the system.\"\n\n\t^activeControllerProcess == Processor thisProcess! !\n!ControlManager methodsFor: 'scheduling' stamp: 'dmu 11/25/2008 00:19'!\nresetActiveController\n\t\"When saving a morphic project whose parent is mvc, we need to set this up first\"\n\n\tactiveController := nil.\n\tactiveControllerProcess := Processor thisProcess.\n! !\n!ControlManager methodsFor: 'scheduling' stamp: 'dmu 11/25/2008 00:20'!\nscheduleActiveNoTerminate: aController \n\t\"Make aController be the active controller. Presumably the process that \n\trequested the new active controller wants to keep control to do more \n\tactivites before the new controller can take control. Therefore, do not \n\tterminate the currently active process.\"\n\n\tself schedulePassive: aController.\n\tself scheduled: aController\n\t\tfrom: Processor thisProcess! !\n!ControlManager methodsFor: 'scheduling' stamp: 'dmu 11/25/2008 00:20'!\nsearchForActiveController\n\t\"Find a scheduled controller that wants control and give control to it. If \n\tnone wants control, then see if the System Menu has been requested.\"\n\t| aController |\n\tactiveController := nil.\n\tactiveControllerProcess := Processor thisProcess.\n\tself activeController: self nextActiveController.\n\tProcessor terminateActive! !\n!Cursor methodsFor: 'displaying' stamp: 'dmu 6/14/2010 16:15'!\nshowWhile: aBlock \n\t\"While evaluating the argument, aBlock, make the receiver be the cursor shape.\"\n\t\"ar 2/2/2006: Only allow this if active process is ui process\"\n\t| oldcursor |\n\tProcessor thisProcess == Project uiProcess ifFalse:[^aBlock value].\n\toldcursor := Sensor currentCursor.\n\tself show.\n\t^aBlock ensure: [oldcursor show]\n! !\n!Debugger class methodsFor: 'class initialization' stamp: 'dmu 6/14/2010 16:15'!\nopenContext: aContext label: aString contents: contentsStringOrNil\n\t\"Open a notifier in response to an error, halt, or notify. A notifier view just shows a short view of the sender stack and provides a menu that lets the user open a full debugger.\"\n\t<primitive: 19> \"Simulation guard\"\n\tErrorRecursion not & Preferences logDebuggerStackToFile ifTrue:\n\t\t[Smalltalk logError: aString inContext: aContext to: 'SqueakDebug.log'].\n\tErrorRecursion ifTrue:\n\t\t[ErrorRecursion := false.\n\t\tself primitiveError: aString].\n\tErrorRecursion := true.\n\tself informExistingDebugger: aContext label: aString.\n\t(Debugger context: aContext)\n\t\topenNotifierContents: contentsStringOrNil\n\t\tlabel: aString.\n\tErrorRecursion := false.\n\tProcessor thisProcess suspend.\n! !\n!Debugger class methodsFor: 'instance creation' stamp: 'dmu 6/14/2010 16:15'!\ncontext: aContext\n\t\"Answer an instance of me for debugging the active process starting with the given context.\"\n\n\t^ self new\n\t\tprocess: Processor thisProcess\n\t\tcontroller:\n\t\t\t((Smalltalk isMorphic not and: [ScheduledControllers inActiveControllerProcess])\n\t\t\t\tifTrue: [ScheduledControllers activeController]\n\t\t\t\tifFalse: [nil])\n\t\tcontext: aContext! !\n!DelayWaitTimeout methodsFor: 'private' stamp: 'dmu 6/14/2010 16:15'!\nsetDelay: anInteger forSemaphore: aSemaphore\n\tsuper setDelay: anInteger forSemaphore: aSemaphore.\n\tprocess := Processor thisProcess.\n\texpired := false.! !\n!HTTPLoader methodsFor: 'private' stamp: 'dmu 6/14/2010 16:15'!\nstartDownload\n\t| newDownloadProcess |\n\t\n\tdownloads size >= self maxNrOfConnections ifTrue: [^self].\n\trequests size <= 0 ifTrue: [^self].\n\n\tnewDownloadProcess := [\n\t\t[\n\t\t\tself nextRequest startRetrieval\n\t\t] on: FTPConnectionException do: [ :ex | \n\t\t\tCursor normal show.\n\t\t\tself removeProcess: Processor thisProcess.\n\t\t\tself startDownload\n\t\t].\n\t\tself removeProcess: Processor thisProcess.\n\t\tself startDownload\n\t] newProcess.\n\tdownloads add: newDownloadProcess.\n\tnewDownloadProcess resume! !\n!MVCToolBuilder class methodsFor: 'accessing' stamp: 'dmu 6/14/2010 16:16'!\nisActiveBuilder\n\t\"Answer whether I am the currently active builder\"\n\t\"This is really a way of answering whether 'Smalltalk isMVC'\"\n\tScheduledControllers ifNil:[^false].\n\t^ScheduledControllers activeControllerProcess == Processor thisProcess! !\n!MVCUIManager class methodsFor: 'accessing' stamp: 'dmu 6/14/2010 16:16'!\nisActiveManager\n\t\"Answer whether I should act as the active ui manager\"\n\t\"This is really a way of answering whether 'Smalltalk isMVC'\"\n\tScheduledControllers ifNil:[^false].\n\t^ScheduledControllers activeControllerProcess == Processor thisProcess! !\n!MessageTally methodsFor: 'initialize-release' stamp: 'dmu 6/14/2010 16:16'!\nspyEvery: millisecs on: aBlock\n\t\"Create a spy and spy on the given block at the specified rate.\"\n\t\"Spy only on the active process (in which aBlock is run)\"\n\n\t| myDelay time0 observedProcess |\n\taBlock isBlock\n\t\tifFalse: [ self error: 'spy needs a block here' ].\n\tself class: aBlock receiver class method: aBlock method.\n\t\t\"set up the probe\"\n\tobservedProcess := Processor thisProcess.\n\tmyDelay := Delay forMilliseconds: millisecs.\n\ttime0 := Time millisecondClockValue.\n\tgcStats := SmalltalkImage current getVMParameters.\n\tTimer ifNotNil: [ self error: 'it seems a tally is already running' ].\n\tTimer := [\n\t\t[ true ] whileTrue: [\n\t\t\t| startTime |\n\t\t\tstartTime := Time millisecondClockValue.\n\t\t\tmyDelay wait.\n\t\t\tself\n\t\t\t\ttally: Processor preemptedProcess suspendedContext\n\t\t\t\tin: (observedProcess == Processor preemptedProcess ifTrue: [observedProcess] ifFalse: [nil])\n\t\t\t\t\"tally can be > 1 if ran a long primitive\"\n\t\t\t\tby: (Time millisecondClockValue - startTime) // millisecs].\n\t\tnil] newProcess.\n\tTimer priority: Processor timingPriority-1.\n\t\t\"activate the probe and evaluate the block\"\n\tTimer resume.\n\t^ aBlock ensure: [\n\t\t\"cancel the probe and return the value\"\n\t\t\"Could have already been terminated. See #terminateTimerProcess\"\n\t\tTimer ifNotNil: [\n\t\t\tTimer terminate.\n\t\t\tTimer := nil ].\n\t\t\"Collect gc statistics\"\n\t\tSmalltalkImage current getVMParameters keysAndValuesDo: [ :idx :gcVal | \n\t\t\tgcStats at: idx put: (gcVal - (gcStats at: idx))].\n\t\ttime := Time millisecondClockValue - time0]! !\n!Monitor methodsFor: 'private' stamp: 'dmu 6/14/2010 16:16'!\nenter\n\tself isOwnerProcess ifTrue: [\n\t\tnestingLevel := nestingLevel + 1.\n\t] ifFalse: [\n\t\tmutex wait.\n\t\townerProcess := Processor thisProcess.\n\t\tnestingLevel := 1.\n\t].! !\n!Monitor methodsFor: 'private' stamp: 'dmu 6/14/2010 16:16'!\nisOwnerProcess\n\t^ Processor thisProcess == ownerProcess! !\n!Paragraph methodsFor: 'RVM' stamp: 'dmu 6/15/2010 11:36'!\ndestFormSema: s\n\tdestFormSema := s! !\n!Paragraph methodsFor: 'private' stamp: 'dmu 4/1/2009 19:38'!\ncompositionRectangle: compositionRect text: aText style: aTextStyle offset: aPoint\n\n\tcompositionRectangle := compositionRect copy.\n\ttext := aText.\n\ttextStyle := aTextStyle.\n\trule := DefaultRule.\n\tmask := nil.\t\t\"was DefaultMask \"\n\tmarginTabsLevel := 0.\n\tdestFormSema := Semaphore forMutualExclusion.\n\tdestinationForm := Display.\n\toffset := aPoint.\n\t^self composeAll! !\n!Paragraph methodsFor: 'private' stamp: 'ssa 4/7/2009 12:39'!\ndisplayOn: aDisplayMedium lines: lineInterval\n\n\t| saveDestinationForm |\n\tdestFormSema isNil ifTrue:[self destFormSema: Semaphore forMutualExclusion].\n\tdestFormSema critical: [\n\t\tsaveDestinationForm := destinationForm.\n\t\tself destinationForm: aDisplayMedium.\n\t\tself displayLines: lineInterval.\n\t\tdestinationForm := saveDestinationForm\n\t]! !\n!PluggableTextMorphPlus methodsFor: 'styling' stamp: 'dmu 6/21/2010 15:35'!\nhasUnacceptedEdits: aBoolean\n\t\"re-implemented to re-style the text iff aBoolean is true\"\n\t \n\tself textInterlock critical: [\n\t\tsuper hasUnacceptedEdits: aBoolean].\n\n\t(aBoolean and: [self okToStyle])\n\t\tifTrue: [ styler styleInBackgroundProcess: textMorph contents]! !\n!PluggableTextMorphPlus methodsFor: 'styling' stamp: 'dmu 6/21/2010 15:33'!\nsetText: aText\n\tself okToStyle ifFalse:[^super setText: aText].\n\tself textInterlock critical: [\n\t\tsuper setText: (styler format: aText asText).\n\t].\n\taText size < 4096\n\t\tifTrue:[styler style: textMorph contents]\n\t\tifFalse:[styler styleInBackgroundProcess:  textMorph contents]! !\n!PluggableTextMorphPlus methodsFor: 'RVM' stamp: 'dmu 6/21/2010 11:33'!\ntextInterlock\n\ttextInterlock isNil\n\t\tifTrue: [textInterlock := Monitor new].\n\t^textInterlock! !\n!Process methodsFor: 'accessing' stamp: 'ssa 2/17/2009 22:34'!\nisActiveProcess\n\n\t^ Processor areRunningProcessesInSchedulerLists\n\t\tifTrue: [ suspendedContext isNil and:[myList notNil]]\n\t\tifFalse: [self == Processor activeProcess]! !\n!Process methodsFor: 'accessing' stamp: 'dmu 6/18/2010 17:35'!\nisTerminated\n\n\tself isActiveProcess ifTrue: [^ false].\n\t^suspendedContext isNil\n\t  or: [\"If the suspendedContext is the bottomContext it is the block in Process>>newProcess.\n\t\t   If so, and the pc is greater than the startpc, the bock has alrteady sent and returned\n\t\t   from value and there is nothing more to do.\"\n\t\tsuspendedContext isBottomContext\n\t\tand: [suspendedContext pc isNil or: [suspendedContext pc > suspendedContext startpc]]]! !\n!Process methodsFor: 'changing process state' stamp: 'dmu 6/14/2010 16:16'!\nrun\n\t\"Suspend current process and execute self instead\"\n\n\t| proc |\n\tproc := Processor thisProcess.\n\t[\tproc suspend.\n\t\tself resume.\n\t] forkAt: Processor highestPriority! !\n!Process methodsFor: 'changing process state' stamp: 'dmu 6/18/2010 00:18'!\nsuspend\n\t\"Primitive. Stop the process that the receiver represents in such a way \n\tthat it can be restarted at a later time (by sending the receiver the \n\tmessage resume). If the receiver represents the activeProcess, suspend it. \n\tOtherwise remove the receiver from the list of waiting processes.\n\tThe return value of this method is the list the receiver was previously on (if any).\"\n\t| oldList |\n\t<primitive: 88>\n\t\"This is fallback code for VMs which only support the old primitiveSuspend which \n\twould not accept processes that are waiting to be run.\"\n\tRVMPrimitives isRVM ifTrue: [self error: 'suspend should never fail'].\n\tmyList ifNil:[^nil]. \"this allows us to use suspend multiple times\"\n\toldList := myList.\n\tmyList := nil.\n\toldList remove: self ifAbsent:[].\n\t^oldList! !\n!Process methodsFor: 'changing process state' stamp: 'dmu 6/17/2010 23:57'!\nterminate \n\t\"Stop the process that the receiver represents forever.  Unwind to execute pending ensure:/ifCurtailed: blocks before terminating.\"\n\n\t| ctxt unwindBlock oldList |\n\tself == Processor thisProcess  ifTrue: [ \n\t\tctxt := thisContext.\n\t\t[\tctxt := ctxt findNextUnwindContextUpTo: nil.\n\t\t\tctxt isNil\n\t\t] whileFalse: [\n\t\t\t(ctxt tempAt: 2) ifNil:[\n\t\t\t\tctxt tempAt: 2 put: nil.\n\t\t\t\tunwindBlock := ctxt tempAt: 1.\n\t\t\t\tthisContext terminateTo: ctxt.\n\t\t\t\tunwindBlock value].\n\t\t].\n\t\tthisContext terminateTo: nil.\n\t\tself suspend.\n\t] ifFalse:[\n\t\t\"Always suspend the process first so it doesn't accidentally get woken up\"\n\t\toldList := self suspend.\n\t\tsuspendedContext ifNotNil:[\n\t\t\t\"Figure out if we are terminating the process while waiting in Semaphore>>critical:\n\t\t\tIn this case, pop the suspendedContext so that we leave the ensure: block inside\n\t\t\tSemaphore>>critical: without signaling the semaphore.\"\n\t\t\t(oldList class == Semaphore and:[\n\t\t\t\tsuspendedContext method == (Semaphore compiledMethodAt: #critical:)]) ifTrue:[\n\t\t\t\t\tsuspendedContext := suspendedContext home.\n\t\t\t].\n\n\t\t\t\"If we are terminating a process halfways through an unwind, try\n\t\t\tto complete that unwind block first.\"\n\t\t\t(suspendedContext findNextUnwindContextUpTo: nil) ifNotNil:[:outer|\n\t\t\t\t(suspendedContext findContextSuchThat:[:c| c closure == (outer tempAt: 1)]) ifNotNil:[:inner|\n\t\t\t\t\t\"This is an unwind block currently under evaluation\"\n\t\t\t\t\tsuspendedContext runUntilErrorOrReturnFrom: inner.\n\t\t\t\t].\n\t\t\t].\n\n\t\t\tctxt := self popTo: suspendedContext bottomContext.\n\t\t\tctxt == suspendedContext bottomContext ifFalse: [\n\t\t\t\tself debug: ctxt title: 'Unwind error during termination']].\n\t].\n! !\n!Process methodsFor: 'changing suspended state' stamp: 'dmu 12/2/2008 14:05'!\nactivateReturn: aContext value: value\n\t\"Activate 'aContext return: value', so execution will return to aContext's sender\"\n\tself suspend.\n\t^ suspendedContext := suspendedContext activateReturn: aContext value: value! !\n!Process methodsFor: 'changing suspended state' stamp: 'dmu 12/2/2008 14:01'!\ncomplete: aContext \n\t\"Run self until aContext is popped or an unhandled error is raised.  Return self's new top context, unless an unhandled error was raised then return the signaler context (rather than open a debugger).\"\n\t\n\t| ctxt pair error |\n\tself suspend.\n\tctxt := suspendedContext.\n\tsuspendedContext := nil.  \"disable this process while running its stack in active process below\"\n\tpair := ctxt runUntilErrorOrReturnFrom: aContext.\n\tsuspendedContext := pair first.\n\terror := pair second.\n\terror ifNotNil: [^ error signalerContext].\n\t^ suspendedContext! !\n!Process methodsFor: 'changing suspended state' stamp: 'dmu 6/14/2010 16:06'!\ninstall: aContext \n\t\"Replace the suspendedContext with aContext.\"\n\n\t(Processor isActive: self)\n\t\tifTrue: [^self error: 'An active process cannot install contexts'].\n\tsuspendedContext := aContext! !\n!Process methodsFor: 'changing suspended state' stamp: 'dmu 6/14/2010 16:07'!\npopTo: aContext \n\t\"Pop self down to aContext by remote returning from aContext's callee.  Unwind blocks will be executed on the way.\n\tThis is done by pushing a new context on top which executes 'aContext callee return' then resuming self until aContext is reached.  This way any errors raised in an unwind block will get handled by senders in self and not by senders in the activeProcess.\n\tIf an unwind block raises an error that is not handled then the popping stops at the error and the signalling context is returned, othewise aContext is returned.\"\n\n\t| callee |\n\t(Processor isActive: self)\n\t\tifTrue: [^ self error: 'An active process cannot pop contexts'].\n\tcallee := (self calleeOf: aContext) ifNil: [^ aContext].  \"aContext is on top\"\n\t^ self return: callee value: callee receiver! !\n!Process methodsFor: 'changing suspended state' stamp: 'dmu 6/14/2010 16:08'!\npopTo: aContext value: aValue\n\t\"Replace the suspendedContext with aContext, releasing all contexts \n\tbetween the currently suspendedContext and it.\"\n\n\t| callee |\n\t(Processor isActive: self)\n\t\tifTrue: [^ self error: 'An active process cannot pop contexts'].\n\tcallee := (self calleeOf: aContext) ifNil: [^ self].  \"aContext is on top\"\n\tself return: callee value: aValue! !\n!Process class methodsFor: 'accessing' stamp: 'ssa 3/25/2010 15:11'!\nsemaForSuspensions\n\n\tSemaForSuspensions isNil ifTrue:[SemaForSuspensions := Semaphore forMutualExclusion].\n\t^SemaForSuspensions! !\n!Process methodsFor: 'debugging' stamp: 'dmu 6/14/2010 16:09'!\ndebug: context title: title full: bool\n\t\"Open debugger on self with context shown on top\"\n\n\t| topCtxt |\n\ttopCtxt :=  self == Processor thisProcess  ifTrue: [thisContext]\n\t\tifFalse: [\n\t\t\tself suspend.  \n\t\t\tself suspendedContextWaitingIfNecessary].\n\t(topCtxt hasContext: context) ifFalse: [^ self error: 'context not in process'].\n\tToolSet debug: self context: context label: title contents: nil fullView: bool.\n! !\n!Process methodsFor: 'debugging' stamp: 'dmu 9/17/2010 12:03'!\ndebugWithTitle: title\n\t\"Open debugger on self\"\n\n\t| context |\n\tcontext := self == Processor thisProcess  ifTrue: [thisContext] ifFalse: [ self suspend.  self suspendedContextWaitingIfNecessary].\n\tself debug: context title: title full: true.\n! !\n!Process methodsFor: 'signaling' stamp: 'ssa 2/17/2009 22:31'!\npvtSignal: anException list: aList\n\t\"Private. This method is used to signal an exception from another\n\tprocess...the receiver must be the active process.  If the receiver \n\twas previously waiting on a Semaphore, then return the process\n\tto the waiting state after signaling the exception and if the Semaphore\n\thas not been signaled in the interim\"\n\n\t\"Since this method is not called in a normal way, we need to take care\n\tthat it doesn't directly return to the caller (because I believe that could\n\thave the potential to push an unwanted object on the caller's stack).\"\n\n\t| blocker |\n\tself == Processor thisProcess ifFalse: [^self].\n\tself suspend.\n\tanException signal.\n\tblocker := Semaphore new.\n\t[self suspend.\n\tsuspendedContext := suspendedContext swapSender: nil.\n\taList class == Semaphore \n\t\tifTrue:\n\t\t\t[aList isSignaled\n\t\t\t\tifTrue: \n\t\t\t\t\t[aList wait.  \"Consume the signal that would have restarted the receiver\"\n\t\t\t\t\tself resume]\n\t\t\t\tifFalse:\n\t\t\t\t\t[\"Add us back to the Semaphore's list (and remain blocked)\"\n\t\t\t\t\tmyList := aList.\n\t\t\t\t\taList add: self]]\n\t\tifFalse: [self resume]] fork.\n\tblocker wait.\n\n\n! !\n!Process methodsFor: 'signaling' stamp: 'dmu 6/14/2010 16:11'!\nsignalException: anException\n\t\"Signal an exception in the receiver process...if the receiver is currently\n\tsuspended, the exception will get signaled when the receiver is resumed.  If \n\tthe receiver is blocked on a Semaphore, it will be immediately re-awakened\n\tand the exception will be signaled; if the exception is resumed, then the receiver\n\twill return to a blocked state unless the blocking Semaphore has excess signals\"\n\t| oldList |\n\t\"If we are the active process, go ahead and signal the exception\"\n\tself == Processor thisProcess  ifTrue: [^anException signal].\n\n\t\"Suspend myself first to ensure that I won't run away in the\n\tmidst of the following modifications.\"\n\tmyList ifNotNil:[oldList := self suspend].\n\n\t\"Add a new method context to the stack that will signal the exception\"\n\tsuspendedContext := MethodContext\n\t\tsender: suspendedContext\n\t\treceiver: self\n\t\tmethod: (self class lookupSelector: #pvtSignal:list:)\n\t\targuments: (Array with: anException with: oldList).\n\n\t\"If we are on a list to run, then suspend and restart the receiver \n\t(this lets the receiver run if it is currently blocked on a semaphore).  If\n\twe are not on a list to be run (i.e. this process is suspended), then when the\n\tprocess is resumed, it will signal the exception\"\n\n\toldList ifNotNil: [self resume].\n! !\n!Process methodsFor: 'RVM' stamp: 'dmu 6/14/2010 15:40'!\ncoreMask\n\t^ coreMask! !\n!Process methodsFor: 'RVM' stamp: 'dmu 6/14/2010 15:40'!\ncoreMask: m\n\tcoreMask := m! !\n!Process methodsFor: 'RVM' stamp: 'dmu 6/14/2010 15:41'!\nhostCore\n\t^ hostCore! !\n!Process methodsFor: 'RVM' stamp: 'dmu 6/14/2010 15:31'!\nisRunning\n\tProcessor thisProcess == self ifTrue: [^ true].\n\tself isActiveProcess ifTrue: [^ true].\n\tmyList ifNil: [^ false].\n\t^ myList class ~~ Semaphore! !\n!Process methodsFor: 'RVM' stamp: 'ssa 3/2/2010 18:23'!\nnilMyListUnlessRVM\n\tProcessor areRunningProcessesInSchedulerLists ifFalse: [\n\t\t\"primitiveSuspend will use myList to remove from list and will nil it out\"\n\t\tmyList := nil.\n\t]! !\n!ProcessBrowser methodsFor: 'stack list' stamp: 'dmu 6/14/2010 16:17'!\nupdateStackList: depth \n\t| suspendedContext oldHighlight |\n\tselectedProcess\n\t\tifNil: [^ self changeStackListTo: nil].\n\t(stackList notNil and: [ stackListIndex > 0 ])\n\t\tifTrue: [oldHighlight := stackList at: stackListIndex].\n\tselectedProcess == Processor thisProcess\n\t\tifTrue: [self\n\t\t\t\tchangeStackListTo: (thisContext stackOfSize: depth)]\n\t\tifFalse: [suspendedContext := selectedProcess suspendedContext.\n\t\t\tsuspendedContext\n\t\t\t\tifNil: [self changeStackListTo: nil]\n\t\t\t\tifNotNil: [self\n\t\t\t\t\t\tchangeStackListTo: (suspendedContext stackOfSize: depth)]].\n\tself\n\t\tstackListIndex: (stackList\n\t\t\t\tifNil: [0]\n\t\t\t\tifNotNil: [stackList indexOf: oldHighlight])! !\n!ProcessBrowser class methodsFor: 'class initialization' stamp: 'dmu 6/14/2010 16:17'!\nregisterWellKnownProcesses\n\t\"Associate each well-known process with a nickname and two flags: allow-stop, and allow-debug.\n\tAdditional processes may be added to this list as required\"\n\n\tWellKnownProcesses := OrderedCollection new.\n\tself registerWellKnownProcess: []\n\t\tlabel: 'no process'\n\t\tallowStop: false\n\t\tallowDebug: false.\n\tself registerWellKnownProcess: [Smalltalk lowSpaceWatcherProcess]\n\t\tlabel: 'the low space watcher'\n\t\tallowStop: false\n\t\tallowDebug: false.\n\tself registerWellKnownProcess: [WeakArray runningFinalizationProcess]\n\t\tlabel: 'the WeakArray finalization process'\n\t\tallowStop: false\n\t\tallowDebug: false.\n\tself registerWellKnownProcess: [Processor thisProcess]\n\t\tlabel: 'the UI process'\n\t\tallowStop: false\n\t\tallowDebug: true.\n\tself registerWellKnownProcess: [Processor backgroundProcess]\n\t\tlabel: 'the idle process'\n\t\tallowStop: false\n\t\tallowDebug: false.\n\tself registerWellKnownProcess: [Sensor interruptWatcherProcess]\n\t\tlabel: 'the user interrupt watcher'\n\t\tallowStop: false\n\t\tallowDebug: false.\n\tself registerWellKnownProcess: [Sensor eventTicklerProcess]\n\t\tlabel: 'the event tickler'\n\t\tallowStop: false\n\t\tallowDebug: false.\n\tself registerWellKnownProcess: [Project uiProcess]\n\t\tlabel: 'the inactive Morphic UI process'\n\t\tallowStop: false\n\t\tallowDebug: false.\n\tself registerWellKnownProcess:\n\t\t\t[Smalltalk at: #SoundPlayer ifPresent: [:sp | sp playerProcess]]\n\t\tlabel: 'the Sound Player'\n\t\tallowStop: false\n\t\tallowDebug: false.\n\tself registerWellKnownProcess:\n\t\t\t[ScheduledControllers ifNotNil: [ScheduledControllers activeControllerProcess]]\n\t\tlabel: 'the inactive MVC controller process'\n\t\tallowStop: false\n\t\tallowDebug: true.\n\tself registerWellKnownProcess:\n\t\t\t[Smalltalk at: #CPUWatcher ifPresent: [:cw | cw currentWatcherProcess]]\n\t\tlabel: 'the CPUWatcher'\n\t\tallowStop: false\n\t\tallowDebug: false\n! !\n!SHTextStyler methodsFor: 'styling' stamp: 'sm 9/29/2010 18:27'!\ninitialize\n\tstylingEnabled := true.\n\t\"If on RVM deactivate it for the moment. There is a racecondition we do not handle yet.\"\n\t\n\tRVMPrimitives isRVM ifTrue: [ stylingEnabled := false ]\n! !\n!SHTextStyler methodsFor: 'styling' stamp: 'dmu 6/21/2010 15:34'!\nstyleInBackgroundProcess: aText\n\tself terminateBackgroundStylingProcess.\n\tstylingEnabled ifTrue:[\n\t\ttext := aText copy.\n\t\tself monitor critical: [\n\t\t\tsem := Semaphore new. \n\t\t\t[sem notNil\n\t\t\t\tifTrue: [\n\t\t\t\t\tsem wait.\n\t\t\t\t\tview ifNotNil: [ self textInterlock critical: [view stylerStyledInBackground: text]]]\n\t\t\t] forkAt: Processor activePriority.\n\t\t\tbackgroundProcess := \n\t\t\t\t[ | s |\n\t\t\t\tself privateStyle: text.\n\t\t\t\ts := sem. \"terminateBackgroundStylingProcess nils sem\"\n\t\t\t\ts ifNotNil: [s signal]]\n\t\t\t\t\tforkAt: Processor userBackgroundPriority] ]\n\t! !\n!SHTextStyler methodsFor: 'RVM' stamp: 'dmu 6/21/2010 11:34'!\ntextInterlock\n\tview isNil\n\t\tifTrue: [^ Monitor new].\n\t^view textInterlock! !\n!SoundPlayer class methodsFor: 'player process' stamp: 'dmu 6/14/2010 16:17'!\nstopPlayerProcess\n\t\"Stop the sound player process.\"\n\t\"SoundPlayer stopPlayerProcess\"\n\n\t(PlayerProcess == nil or:[PlayerProcess == Processor thisProcess]) \n\t\tifFalse:[PlayerProcess terminate].\n\tPlayerProcess := nil.\n\tself primSoundStop.\n\tActiveSounds := OrderedCollection new.\n\tBuffer := nil.\n\tPlayerSemaphore := Semaphore forMutualExclusion.\n\tReadyForBuffer ifNotNil:\n\t\t[Smalltalk unregisterExternalObject: ReadyForBuffer].\n\tReadyForBuffer := nil.\n! !\n!StandardToolSet class methodsFor: 'debugging' stamp: 'dmu 6/14/2010 16:17'!\ndebugError: anError\n\t\"Handle an otherwise unhandled error\"\n\t^Processor thisProcess\n\t\tdebug: anError signalerContext\n\t\ttitle: anError description! !\n!SyntaxError class methodsFor: '*Morphic-Support' stamp: 'dmu 6/14/2010 16:19'!\nmorphicOpen: aSyntaxError\n\t\"Answer a view whose model is an instance of me.\"\n\n\tself buildMorphicViewOn: aSyntaxError.\n\tProject spawnNewProcessIfThisIsUI: Processor thisProcess.\n\t^ Processor thisProcess suspend! !\n!SyntaxError class methodsFor: '*ST80-Support' stamp: 'dmu 6/14/2010 16:18'!\nmvcOpen: aSyntaxError\n\t\"Answer a standard system view whose model is an instance of me.\"\n\n\t| topView |\n\ttopView := self buildMVCViewOn: aSyntaxError.\n\ttopView controller openNoTerminateDisplayAt: Display extent // 2.\n\tCursor normal show.\n\tProcessor thisProcess suspend\n! !\n!TestCase methodsFor: 'extensions' stamp: 'dmu 6/14/2010 16:18'!\nshould: aBlock notTakeMoreThan: aDuration\n    \"Evaluate aBlock in a forked process and if it takes more than anInteger milliseconds\n    to run we terminate the process and report a test failure.  It'' important to\n    use the active process for the test failure so that the failure reporting works correctly\n    in the context of the exception handlers.\"\n\n    | evaluated evaluationProcess result delay testProcess |\n\n    evaluated := false.\n    delay := Delay forDuration: aDuration.\n    testProcess := Processor thisProcess.\n    \"Create a new process to evaluate aBlock\"\n    evaluationProcess := [\n        result := aBlock value.\n        evaluated := true.\n        delay unschedule.\n        testProcess resume ] forkNamed: 'Process to evaluate should: notTakeMoreThanMilliseconds:'.\n\n    \"Wait the milliseconds they asked me to\"\n    delay wait.\n    \"After this point either aBlock was evaluated or not...\"\n    evaluated ifFalse: [\n        evaluationProcess terminate.\n        self assert: false description: ('Block evaluation took more than the expected <1p>' expandMacrosWith: aDuration)].\n   \n    ^result! !\n!SemaphoreTest methodsFor: 'private' stamp: 'dmu 6/14/2010 16:17'!\ncriticalError\n\tProcessor thisProcess terminate! !\n!TestFailure methodsFor: 'camp smalltalk' stamp: 'dmu 6/14/2010 16:18'!\ndefaultAction\n\n\tProcessor thisProcess\n\t\tdebug: self signalerContext\n\t\ttitle: self description! !\n!Utilities class methodsFor: 'fetching updates' stamp: 'dmu 6/14/2010 16:19'!\nretrieveUrls: urls ontoQueue: queue withWaitSema: waitSema \n\t\"download the given list of URLs. The queue will be loaded alternately  \n\twith url's and with the retrieved contents. If a download fails, the  \n\tcontents will be #failed. If all goes well, a special pair with an empty  \n\tURL and the contents #finished will be put on the queue. waitSema is  \n\twaited on every time before a new document is downloaded; this keeps \n\tthe downloader from getting too far  ahead of the main process\"\n\t\"kill the existing downloader if there is one\"\n\t| updateCounter |\n\tUpdateDownloader\n\t\tifNotNil: [UpdateDownloader terminate].\n\tupdateCounter := 0.\n\t\"fork a new downloading process\"\n\tUpdateDownloader := [\n\t\t'Downloading updates' displayProgressAt: Sensor cursorPoint from: 0 to: urls size during: [:bar |\n\t\t\turls\n\t\t\t\tdo: [:url | | front canPeek doc | \n\t\t\t\t\twaitSema wait.\n\t\t\t\t\tqueue nextPut: url.\n\t\t\t\t\tdoc := HTTPClient httpGet: url.\n\t\t\t\t\tdoc isString\n\t\t\t\t\t\tifTrue: [queue nextPut: #failed.\n\t\t\t\t\t\t\tUpdateDownloader := nil.\n\t\t\t\t\t\t\tProcessor thisProcess terminate]\n\t\t\t\t\t\tifFalse: [canPeek := 120 min: doc size.\n\t\t\t\t\t\t\tfront := doc next: canPeek.  doc skip: -1 * canPeek.\n\t\t\t\t\t\t\t(front beginsWith: '<!!DOCTYPE') ifTrue: [\n\t\t\t\t\t\t\t\t(front includesSubString: 'Not Found') ifTrue: [\n\t\t\t\t\t\t\t\t\tqueue nextPut: #failed.\n\t\t\t\t\t\t\t\t\tUpdateDownloader := nil.\n\t\t\t\t\t\t\t\t\tProcessor thisProcess terminate]]].\n\t\t\t\t\t\tUpdateDownloader ifNotNil: [queue nextPut: doc. updateCounter := updateCounter + 1. bar value: updateCounter]]].\n\t\t\tqueue nextPut: ''.\n\t\t\tqueue nextPut: #finished.\n\t\t\tUpdateDownloader := nil] newProcess.\n\tUpdateDownloader priority: Processor userInterruptPriority.\n\t\"start the process running\"\n\tUpdateDownloader resume! !\n!Paragraph reorganize!\n('accessing' backgroundColor clippingRectangle clippingRectangle: compositionRectangle compositionRectangle: destinationForm fillColor fillColor: height indentationOfLineIndex:ifBlank: mask numberOfLines replaceFrom:to:with:displaying: rule rule: stringAtLineNumber: text:)\n('alignment' centered justified leftFlush rightFlush toggleAlignment)\n('character location' characterBlockAtPoint: characterBlockForIndex: defaultCharacterBlock)\n('composition' composeAll wrappingBox:clippingBox:)\n('converting' asForm asString asText)\n('display box access' boundingBox computeBoundingBox)\n('displaying' displayOn: displayOn:at: displayOn:at:clippingBox:rule:fillColor: displayOn:transformation:clippingBox:align:with:rule:fillColor:)\n('indicating' flash outline)\n('scrolling' scrollBy: scrollBy:withSelectionFrom:to: scrollDelta scrollUncheckedBy:withSelectionFrom:to:)\n('selecting' caretFormForDepth: clickAt:for:controller: extendSelectionAt:endBlock: extendSelectionMark:pointBlock: hiliteRect: mouseMovedFrom:pivotBlock:showingCaret: mouseSelect mouseSelect: reverseFrom:to: selectionRectsFrom:to:)\n('utilities' clearVisibleRectangle deepCopy destinationForm: fit lines: visibleRectangle)\n('RVM' destFormSema:)\n('private' bottomAtLineIndex: compositionRectangle:text:style:offset: compositionRectangleDelta displayLines: displayLines:affectedRectangle: displayOn:lines: leftMarginForCompositionForLine: leftMarginForDisplayForLine:alignment: lineAt:put: lineIndexOfCharacterIndex: lineIndexOfTop: lines moveBy: rightMarginForComposition rightMarginForDisplay setWithText:style: setWithText:style:compositionRectangle:clippingRectangle: setWithText:style:compositionRectangle:clippingRectangle:foreColor:backColor: topAtLineIndex: topAtLineIndex:using:and: trimLinesTo: updateCompositionHeight withClippingRectangle:do:)\n!\n\n!BitBlt methodsFor: 'accessing' stamp: 'dmu 4/4/2009 00:24'!\ncopyBitsOnMain\n\t\"Primitive. Perform the movement of bits from the source form to the \n\tdestination form. Fail if any variables are not of the right type (Integer, \n\tFloat, or Form) or if the combination rule is not implemented. \n\tIn addition to the original 16 combination rules, this BitBlt supports\n\t16\tfail (to simulate paint)\n\t17\tfail (to simulate mask)\n\t18\tsourceWord + destinationWord\n\t19\tsourceWord - destinationWord\n\t20\trgbAdd: sourceWord with: destinationWord\n\t21\trgbSub: sourceWord with: destinationWord\n\t22\trgbDiff: sourceWord with: destinationWord\n\t23\ttallyIntoMap: destinationWord\n\t24\talphaBlend: sourceWord with: destinationWord\n\t25\tpixPaint: sourceWord with: destinationWord\n\t26\tpixMask: sourceWord with: destinationWord\n\t27\trgbMax: sourceWord with: destinationWord\n\t28\trgbMin: sourceWord with: destinationWord\n\t29\trgbMin: sourceWord bitInvert32 with: destinationWord\n\"\n\t<primitive: 'primitiveCopyBits' module: 'BitBltPlugin'>\n\n\t\"Check for compressed source, destination or halftone forms\"\n\t(combinationRule >= 30 and: [combinationRule <= 31]) ifTrue:\n\t\t[\"No alpha specified -- re-run with alpha = 1.0\"\n\t\t^ self copyBitsTranslucent: 255].\n\t((sourceForm isForm) and: [sourceForm unhibernate])\n\t\tifTrue: [^ self copyBits].\n\t((destForm isForm) and: [destForm unhibernate])\n\t\tifTrue: [^ self copyBits].\n\t((halftoneForm isForm) and: [halftoneForm unhibernate])\n\t\tifTrue: [^ self copyBits].\n\n\t\"Check for unimplmented rules\"\n\tcombinationRule = Form oldPaint ifTrue: [^ self paintBits].\n\tcombinationRule = Form oldErase1bitShape ifTrue: [^ self eraseBits].\n\n\t\"Check if BitBlt doesn't support full color maps\"\n\t(colorMap notNil and:[colorMap isColormap]) ifTrue:[\n\t\tcolorMap := colorMap colors.\n\t\t^self copyBits].\n\t\"Check if clipping gots us way out of range\"\n\tself clipRange ifTrue:[^self copyBits].\n\n\tself error: 'Bad BitBlt arg (Fraction?); proceed to convert.'.\n\t\"Convert all numeric parameters to integers and try again.\"\n\tdestX := destX asInteger.\n\tdestY := destY asInteger.\n\twidth := width asInteger.\n\theight := height asInteger.\n\tsourceX := sourceX asInteger.\n\tsourceY := sourceY asInteger.\n\tclipX := clipX asInteger.\n\tclipY := clipY asInteger.\n\tclipWidth := clipWidth asInteger.\n\tclipHeight := clipHeight asInteger.\n\t^ self copyBitsAgain! !\n!BitBlt methodsFor: 'copying' stamp: 'dmu 4/4/2009 00:20'!\ncopyBitsLocally\n\t\"Primitive. Perform the movement of bits from the source form to the \n\tdestination form. Fail if any variables are not of the right type (Integer, \n\tFloat, or Form) or if the combination rule is not implemented. \n\tIn addition to the original 16 combination rules, this BitBlt supports\n\t16\tfail (to simulate paint)\n\t17\tfail (to simulate mask)\n\t18\tsourceWord + destinationWord\n\t19\tsourceWord - destinationWord\n\t20\trgbAdd: sourceWord with: destinationWord\n\t21\trgbSub: sourceWord with: destinationWord\n\t22\trgbDiff: sourceWord with: destinationWord\n\t23\ttallyIntoMap: destinationWord\n\t24\talphaBlend: sourceWord with: destinationWord\n\t25\tpixPaint: sourceWord with: destinationWord\n\t26\tpixMask: sourceWord with: destinationWord\n\t27\trgbMax: sourceWord with: destinationWord\n\t28\trgbMin: sourceWord with: destinationWord\n\t29\trgbMin: sourceWord bitInvert32 with: destinationWord\n\"\n\t<primitive: 'primitiveCopyBitsLocally'>\n\n\t\"Check for compressed source, destination or halftone forms\"\n\t(combinationRule >= 30 and: [combinationRule <= 31]) ifTrue:\n\t\t[\"No alpha specified -- re-run with alpha = 1.0\"\n\t\t^ self copyBitsTranslucent: 255].\n\t((sourceForm isForm) and: [sourceForm unhibernate])\n\t\tifTrue: [^ self copyBits].\n\t((destForm isForm) and: [destForm unhibernate])\n\t\tifTrue: [^ self copyBits].\n\t((halftoneForm isForm) and: [halftoneForm unhibernate])\n\t\tifTrue: [^ self copyBits].\n\n\t\"Check for unimplmented rules\"\n\tcombinationRule = Form oldPaint ifTrue: [^ self paintBits].\n\tcombinationRule = Form oldErase1bitShape ifTrue: [^ self eraseBits].\n\n\t\"Check if BitBlt doesn't support full color maps\"\n\t(colorMap notNil and:[colorMap isColormap]) ifTrue:[\n\t\tcolorMap := colorMap colors.\n\t\t^self copyBits].\n\t\"Check if clipping gots us way out of range\"\n\tself clipRange ifTrue:[^self copyBits].\n\n\tself error: 'Bad BitBlt arg (Fraction?); proceed to convert.'.\n\t\"Convert all numeric parameters to integers and try again.\"\n\tdestX := destX asInteger.\n\tdestY := destY asInteger.\n\twidth := width asInteger.\n\theight := height asInteger.\n\tsourceX := sourceX asInteger.\n\tsourceY := sourceY asInteger.\n\tclipX := clipX asInteger.\n\tclipY := clipY asInteger.\n\tclipWidth := clipWidth asInteger.\n\tclipHeight := clipHeight asInteger.\n\t^ self copyBitsAgain! !\n!BitBlt methodsFor: 'line drawing' stamp: 'dmu 4/3/2009 23:01'!\ndrawLoopLocallyX: xDelta Y: yDelta \n\t\"Primitive. Implements the Bresenham plotting algorithm (IBM Systems\n\tJournal, Vol. 4 No. 1, 1965). It chooses a principal direction, and\n\tmaintains a potential, P. When P's sign changes, it is time to move in\n\tthe minor direction as well. This particular version does not write the\n\tfirst and last points, so that these can be called for as needed in client code.\n\tOptional. See Object documentation whatIsAPrimitive.\"\n\t| |\n\t<primitive: 'primitiveDrawLoopLocally'>\nself primitiveFailed! !\n!BitBlt methodsFor: 'line drawing' stamp: 'ssa 4/3/2009 22:36'!\nglobalDrawLoopX: xDelta Y: yDelta \n\t\"Primitive. Implements the Bresenham plotting algorithm (IBM Systems\n\tJournal, Vol. 4 No. 1, 1965). It chooses a principal direction, and\n\tmaintains a potential, P. When P's sign changes, it is time to move in\n\tthe minor direction as well. This particular version does not write the\n\tfirst and last points, so that these can be called for as needed in client code.\n\tOptional. See Object documentation whatIsAPrimitive.\"\n\t| dx dy px py P |\n\t<primitive: 'primitiveDrawLoop' module: 'BitBltPlugin'>\n\tdx := xDelta sign.\n\tdy := yDelta sign.\n\tpx := yDelta abs.\n\tpy := xDelta abs.\n\t\"self copyBits.\"\n\tpy > px\n\t\tifTrue: \n\t\t\t[\"more horizontal\"\n\t\t\tP := py // 2.\n\t\t\t1 to: py do: \n\t\t\t\t[:i |\n\t\t\t\tdestX := destX + dx.\n\t\t\t\t(P := P - px) < 0 ifTrue: \n\t\t\t\t\t\t[destY := destY + dy.\n\t\t\t\t\t\tP := P + py].\n\t\t\t\ti < py ifTrue: [self copyBits]]]\n\t\tifFalse: \n\t\t\t[\"more vertical\"\n\t\t\tP := px // 2.\n\t\t\t1 to: px do:\n\t\t\t\t[:i |\n\t\t\t\tdestY := destY + dy.\n\t\t\t\t(P := P - py) < 0 ifTrue: \n\t\t\t\t\t\t[destX := destX + dx.\n\t\t\t\t\t\tP := P + px].\n\t\t\t\ti < px ifTrue: [self copyBits]]]! !\n!BitBlt methodsFor: 'line drawing' stamp: 'ssa 4/3/2009 22:52'!\nlocalDrawLoopX: xDelta Y: yDelta \n\t\"Primitive\"\n\t<primitive: 'primitiveDrawLoopLocally'>\n\t^self primitiveFailed! !\n!ControlManager methodsFor: 'accessing' stamp: 'ssa 3/25/2010 16:14'!\nactiveControllerNoTerminate: aController andProcess: aProcess\n\t\"Set aController to be the currently active controller and aProcess to be \n\tthe process that handles controller scheduling activities in the \n\tsystem. This message differs from activeController:andProcess: in that it \n\tdoes not send controlTerminate to the currently active controller.\"\n\n\tself inActiveControllerProcess\n\t\tifTrue: \n\t\t\t[aController~~nil\n\t\t\t\tifTrue: [(scheduledControllers includes: aController)\n\t\t\t\t\t\t\tifTrue: [self promote: aController]\n\t\t\t\t\t\t\tifFalse: [self error: 'Old controller not scheduled']].\n\t\t\tactiveController := aController.\n\t\t\tactiveController == nil\n\t\t\t\tifFalse: [activeController controlInitialize].\n\t\t\tactiveControllerProcess := aProcess.\n\t\t\tactiveControllerProcess resume]\n\t\tifFalse: \n\t\t\t['New active controller process must be set from old one, resetting...' print.\n\t\t\tself reset.\n\t\t\t] ! !\n!ControlManager methodsFor: 'scheduling' stamp: 'ssa 3/2/2010 14:12'!\ninterruptName: labelString\n\t\"Create a Notifier on the active scheduling process with the given label. Make the Notifier the active controller.\"\n\t| suspendingList newActiveController |\n\t(suspendingList := activeControllerProcess suspendingList) == nil\n\t\tifTrue: [activeControllerProcess == Processor thisProcess\n\t\t\t\t\tifTrue: [activeControllerProcess suspend]]\n\t\tifFalse: [suspendingList remove: activeControllerProcess ifAbsent:[].\n\t\t\t\tactiveControllerProcess offList].\n\n\tactiveController ~~ nil ifTrue: [\n\t\t\"Carefully de-emphasis the current window.\"\n\t\tactiveController view topView deEmphasizeForDebugger].\n\n\tnewActiveController :=\n\t\t(Debugger\n\t\t\topenInterrupt: labelString \n\t\t\tonProcess: activeControllerProcess) controller.\n\tnewActiveController centerCursorInView.\n\tself activeController: newActiveController.\n! !\n!ControlManager methodsFor: 'scheduling' stamp: 'ssa 3/25/2010 16:17'!\nreset\n\t\"ssa - reset the window controller process\"\n\t| newProcess |\n\tnewProcess := [ScheduledControllers resetActiveController.\n\t\t\tScheduledControllers searchForActiveController] fixTemps newProcess priority: Processor userSchedulingPriority.\n\tnewProcess resume.\n\t\"lose the current process\"\n\t\"Processor terminateActive\"! !\n!Controller methodsFor: 'basic control sequence' stamp: 'dmu 3/22/2010 14:25'!\ninterActivityPause\n\t\"if we are looping quickly, insert a short delay.  Thus if we are just doing UI stuff, we won't take up much CPU\"\n\t| currentTime wait |\n\t[RVMPrimitives isRVM ifTrue: [Processor yield. ^ self].].\n\tMinActivityLapse ifNotNil: [\n\t\tlastActivityTime ifNotNil: [ \n\t\t\tcurrentTime := Time millisecondClockValue.\n\t\t\twait := lastActivityTime + MinActivityLapse - currentTime.\n\t\t\twait > 0 ifTrue: [ \n\t\t\t\twait <= MinActivityLapse  \"big waits happen after a snapshot\"\n\t\t\t\t\tifTrue: [DisplayScreen checkForNewScreenSize.\n\t\t\t\t\t\t\t\"(Delay forMilliseconds: wait) wait \"]. ]. ]. ].\n\n\tlastActivityTime := Time millisecondClockValue.! !\n\n!EventSensor methodsFor: 'private' stamp: 'ssa 12/17/2009 14:18'!\nflushNonKbdEvents\n\teventQueue ifNil: [^ self].\n\t[^self]value.   \"don't flush so we don't lose events\"\n\teventQueue flushAllSuchThat:\n\t\t[:buf | (self isKbdEvent: buf) not]\n! !\n!EventSensor methodsFor: 'private' stamp: 'ssa 12/16/2009 13:26'!\nprimMouseButtons\n\n\tself fetchMoreEvents.\n\tself flushNonKbdEvents.\n\t^ mouseButtons\n! !\n!EventSensor methodsFor: 'private' stamp: 'ssa 12/16/2009 13:26'!\nprimMousePt\n\n\tself fetchMoreEvents.\n\tself flushNonKbdEvents.\n\t^ mousePosition\n! !\n\n!EventSensor methodsFor: 'private-I/O' stamp: 'ssa 12/17/2009 12:46'!\nprocessEvent: evt \n\t\"Process a single event. This method is run at high priority.\"\n\t| type |\n\ttype := evt at: 1.\n\t\"Tackle mouse events first\"\n\ttype = EventTypeMouse\n\t\tifTrue: [evt\n\t\t\t\tat: 5\n\t\t\t\tput: (ButtonDecodeTable at: (evt at: 5)\n\t\t\t\t\t\t\t+ 1). \n\t\t\t\tself queueEvent: evt.\n\t\t\t\tself processMouseEvent: evt . \n\t\t\t\t^self].\n\t\n\t\"Store the event in the queue if there's any\"\n\ttype = EventTypeKeyboard\n\t\tifTrue: [ \"Check if the event is a user interrupt\"\n\t\t\t((evt at: 4) = 0\n\t\t\t\tand: [((evt at: 3)\n\t\t\t\t\t\tbitOr: (((evt at: 5)\n\t\t\t\t\t\t\tbitAnd: 8)\n\t\t\t\t\t\t\tbitShift: 8))\n\t\t\t\t\t\t\t= interruptKey])\n\t\t\t\t\tifTrue: [\"interrupt key is meta - not reported as event\"\n\t\t\t\t\t\t\t^ interruptSemaphore signal].\n\t\t\t\"Else swap ctrl/alt keys if neeeded.wi\"\n\t\t\tKeyDecodeTable\n\t\t\t\tat: {evt at: 3. evt at: 5}\n\t\t\t\tifPresent: [:a | evt at: 3 put: a first;\n\t\t\t\t\t\t at: 5 put: a second]. \n\t\t\tself queueEvent: evt. \n\t\t\tself processKeyboardEvent: evt . \n\t\t\t^self ].\n\t\t\t\t\n\t\"Handle all events other than Keyborad or Mouse.\"\n\tself queueEvent: evt.\n\t! !\n!BlockContext methodsFor: 'scheduling' stamp: 'dmu 4/7/2009 02:38'!\nforkOn: aCore\n\t\"Create and schedule a Process running the code in the receiver.\"\n\n\t^ self newProcess resumeOn: aCore! !\n!BlockContext methodsFor: 'scheduling' stamp: 'ssa 4/8/2009 20:09'!\nforkOn: aCore with: anObject\n\t\"Create and schedule a Process running the code in the receiver.\"\n\n\t^ (self newProcessWith: anObject) resumeOn: aCore! !\n!BlockContext methodsFor: 'scheduling' stamp: 'ssa 4/8/2009 20:08'!\nforkOn: aCore with: anObject at: aPriority\n\t\"Create and schedule a Process running the code in the receiver.\"\n\n\t| proc |\n\tproc := self newProcessWith: anObject.\n\tproc priority: aPriority.\n\t^proc resumeOn: aCore! !\n!BlockContext methodsFor: 'scheduling' stamp: 'dmu 4/7/2009 02:34'!\nforkWith: anObject\n\t\"Create and schedule a Process running the code in the receiver.\"\n\n\t^ (self newProcessWith: anObject) resume! !\n!BlockContext methodsFor: 'scheduling' stamp: 'dmu 4/7/2009 02:33'!\nnewProcessWith: anObject\n\t\"Answer a Process running the code in the receiver. The process is not \n\tscheduled.\"\n\t<primitive: 19> \"Simulation guard\"\n\t^Process\n\t\tforContext: \n\t\t\t[self value: anObject.\n\t\t\tProcessor terminateActive]\n\t\tpriority: Processor activePriority! !\n!Delay class methodsFor: 'snapshotting' stamp: 'dmu 5/25/2010 11:02'!\nstartUp\n\t\"Restart active delay, if any, when resuming a snapshot.\"\n\n\tDelaySuspended ifFalse:[^self error: 'Trying to activate Delay twice'].\n\tDelaySuspended := false.\n\tself restoreResumptionTimes.\n\tActiveDelay == nil ifFalse: [ActiveDelay activate].\n\tAccessProtect := Semaphore forMutualExclusion\n! !\n!Delay methodsFor: 'private' stamp: 'sm 11/9/2010 23:38'!\nschedule\n\t\"Schedule this delay\"\n\t\n\t| delayDelivered |\n\tdelayDelivered := false.\n\t\n\tbeingWaitedOn ifTrue: [^self error: 'This Delay has already been scheduled.'].\n\tresumptionTime := Time millisecondClockValue + delayDuration.\n\t\n\t[AccessProtect critical: [\n\t\tScheduledDelay ifNil: [\n\t\t\tScheduledDelay := self.\n\t\t\tTimingSemaphore signal.\n\t\t\tdelayDelivered := true.\n\t\t]\n\t]. \tdelayDelivered\t] whileFalse.! !\n!Delay methodsFor: 'private' stamp: 'sm 11/9/2010 23:39'!\nunschedule\n\t| delayDelivered |\n\tdelayDelivered := false.\n\t\n\t[AccessProtect critical: [\n\t\tScheduledDelay ifNil: [\n\t\t\tFinishedDelay := self.\n\t\t\tTimingSemaphore signal.\n\t\t\tdelayDelivered := true.\n\t\t]\n\t]. delayDelivered ] whileFalse.! !\n!Delay class methodsFor: 'timer process' stamp: 'sm 11/9/2010 17:44'!\nhandleTimerEvent\n\t\"Handle a timer event; which can be either:\n\t\t- a schedule request (ScheduledDelay notNil)\n\t\t- an unschedule request (FinishedDelay notNil)\n\t\t- a timer signal (not explicitly specified)\n\tWe check for timer expiry every time we get a signal.\"\n\t| nowTick nextTick |\n\t\"Wait until there is work to do.\"\n\tTimingSemaphore wait.\n\n\t\"Process any schedule requests\"\n\tScheduledDelay ifNotNil:[\n\t\t\"Schedule the given delay\"\n\t\tself scheduleDelay: ScheduledDelay.\n\t\tScheduledDelay := nil.\n\t].\n\n\t\"Process any unschedule requests\"\n\tFinishedDelay ifNotNil:[\n\t\tself unscheduleDelay: FinishedDelay.\n\t\tFinishedDelay := nil.\n\t].\n\n\t\"Check for clock wrap-around.\"\n\tnowTick := Time millisecondClockValue.\n\tnowTick < ActiveDelayStartTime ifTrue: [\n\t\t\"clock wrapped\"\n\t\tself saveResumptionTimes.\n\t\tself restoreResumptionTimes.\n\t].\n\tActiveDelayStartTime := nowTick.\n\n\t\"Signal any expired delays\"\n\t[ActiveDelay notNil and:[nowTick >= ActiveDelay resumptionTime]] whileTrue:[\n\t\tActiveDelay signalWaitingProcess.\n\t\tSuspendedDelays isEmpty \n\t\t\tifTrue: [ActiveDelay := nil] \n\t\t\tifFalse:[ActiveDelay := SuspendedDelays removeFirst].\n\t].\n\n\t\"And signal when the next request is due. We sleep at most 1sec here\n\tas a soft busy-loop so that we don't accidentally miss signals.\"\n\tnextTick := nowTick + 1000.\n\tActiveDelay ifNotNil:[nextTick := nextTick min: ActiveDelay resumptionTime].\n\tnextTick := nextTick min: SmallInteger maxVal.\n\n\t\"Since we have processed all outstanding requests, reset the timing semaphore so\n\tthat only new work will wake us up again. Do this RIGHT BEFORE setting the next\n\twakeup call from the VM because it is only signaled once so we mustn't miss it.\"\n     \"No!!!! If running multicore, TimingSemaphore may have already been signalled!!!!\n      Do not reset signals, because then we will miss it -- dmu 9/26/10\"\n     RVMPrimitives coreCount > 1 ifFalse: [TimingSemaphore initSignals].\n     \"Do not wait till the next Delay if Semaphore already signaled. -- dmu 9/26/10\"\n     TimingSemaphore isSignaled ifFalse: [\n          Delay primSignal: TimingSemaphore atMilliseconds: nextTick.\n     ].\n\n\t\"This last test is necessary for the obscure case that the msecs clock rolls over\n\tafter nowTick has been computed (unlikely but not impossible). In this case we'd\n\twait for MillisecondClockMask msecs (roughly six days) or until another delay gets\n\tscheduled (which may not be any time soon). In any case, since handling the\n\tcondition is easy, let's just deal with it\"\n\tTime millisecondClockValue < nowTick ifTrue:[TimingSemaphore signal]. \"retry\"\n! !\n!Process methodsFor: 'accessing' stamp: 'dmu 3/8/2010 20:26'!\nhostCore: anObject\n\t\"Set the value of hostCore\"\n\n\thostCore := anObject! !\n!Process methodsFor: 'accessing' stamp: 'dmu 3/8/2010 20:26'!\nmyList\n\t\"Answer the value of myList\"\n\n\tmyList isNil ifTrue:[self myList: nil].\n\t^ myList! !\n!Process methodsFor: 'accessing' stamp: 'dmu 3/8/2010 20:26'!\nmyList: anObject\n\t\"Set the value of myList\"\n\n\tmyList := anObject! !\n!Process methodsFor: 'changing process state' stamp: 'dmu 3/2/2010 17:02'!\nprimitiveSuspend\n\t\"Primitive. Stop the process that self represents in such a way \n\tthat it can be restarted at a later time (by sending #resume).\n\tASSUMES self is the active process.\n\tEssential. See Object documentation whatIsAPrimitive.\"\n\n\t\"Debugging code below causes terminated running processes to seem not terminated. -- dmu 3/2/10\"\n\t\"(myList isNil and: [RVMPrimitives isRVM]) ifTrue:[self halt].\"\n\t<primitive: 88>\n\tself primitiveFailed! !\n!Process methodsFor: 'changing process state' stamp: 'dmu 4/7/2009 02:41'!\nresumeOn: aCore\n  self useOnlyCore: aCore.\n  self resume! !\n!Process methodsFor: 'changing suspended state' stamp: 'dmu 12/2/2008 14:04'!\nreturn: aContext value: value\n\t\"Pop thread down to aContext's sender.  Execute any unwind blocks on the way.  See #popTo: comment and #runUntilErrorOrReturnFrom: for more details.\"\n        self suspend.\n\tsuspendedContext == aContext ifTrue: [\n\t\t^ suspendedContext := aContext return: value from: aContext].\n\tself activateReturn: aContext value: value.\n\t^ self complete: aContext.\n! !\n!Process methodsFor: 'changing suspended state' stamp: 'dmu 12/2/2008 14:03'!\nstep\n         self suspend.\n\t^ suspendedContext := suspendedContext step! !\n!Process methodsFor: 'changing suspended state' stamp: 'dmu 12/2/2008 14:04'!\nstepToCallee\n\t\"Step until top context changes\"\n\n\t| ctxt |\n\tself suspend.\n\tctxt := suspendedContext.\n\t[ctxt == suspendedContext] whileTrue: [\n\t\tsuspendedContext := suspendedContext step].\n\t^ suspendedContext! !\n!Process methodsFor: 'changing suspended state' stamp: 'dmu 12/2/2008 14:05'!\nstepToSendOrReturn\nself suspend.\n\t^ suspendedContext := suspendedContext stepToSendOrReturn! !\n!Process methodsFor: 'core assignment' stamp: 'ssa 2/26/2009 02:57'!\navoidCore: anIndex\n\t\"Force this process to avoid this core (0-55)\"\n\tself coreMask: (self coreMask bitClear: (1 bitShift: anIndex))! !\n!Process methodsFor: 'core assignment' stamp: 'ssa 2/26/2009 03:49'!\navoidCores: aCollectionOfIndicies\n\t\"Force this process to avoid these cores (0-55)\"\n\t| mask |\n\tmask := 0.\n\taCollectionOfIndicies do:[:index| mask := mask bitOr: (1 bitShift: index)].\n\tself coreMask: (self coreMask bitClear:mask)! !\n!Process methodsFor: 'core assignment' stamp: 'ssa 2/26/2009 02:59'!\nuseAdditionalCore: anIndex\n\t\"Force this process to only urn on this core (0-55)\"\n\tself coreMask: (self coreMask bitOr:(1 bitShift: anIndex))! !\n!Process methodsFor: 'core assignment' stamp: 'ssa 2/26/2009 03:50'!\nuseAdditionalCores: aCollectionOfIndicies\n\t\"Allow this process to run on these additional cores (0-55)\"\n\t| mask |\n\tmask := 0.\n\taCollectionOfIndicies do:[:index| mask := mask bitOr: (1 bitShift: index)].\n\tself coreMask: (self coreMask bitOr:mask)! !\n!Process methodsFor: 'core assignment' stamp: 'dmu 5/5/2009 01:32'!\nuseOnlyCore: anIndex\n\t\"Force this process to only run on this core (0-55)\"\n\tself coreMask: (1 bitShift: anIndex)! !\n!Process methodsFor: 'core assignment' stamp: 'ssa 2/26/2009 03:02'!\nuseOnlyCores: aCollectionOfIndicies\n\t\"Force this process to only run on these cores (0-55)\"\n\t| mask |\n\tmask := 0.\n\taCollectionOfIndicies do:[:index| mask := mask bitOr: (1 bitShift: index)].\n\tself coreMask: mask! !\n!Process methodsFor: 'core assignment' stamp: 'dmu 1/25/2010 11:06'!\nuseOnlyMainCore\n\tRVMPrimitives isRVM ifTrue: [self useOnlyCore: (RVMPrimitives getMainRank)]! !\n!Process methodsFor: 'signaling' stamp: 'ssa 2/17/2009 22:30'!\nsignal: anException\n\t\"Signal an exception in the receiver process...if the receiver is currently\n\tsuspended, the exception will get signaled when the receiver is resumed.  If \n\tthe receiver is blocked on a Semaphore, it will be immediately re-awakened\n\tand the exception will be signaled; if the exception is resumed, then the receiver\n\twill return to a blocked state unless the blocking Semaphore has excess signals\"\n\n\t\"If we are the active process, go ahead and signal the exception\"\n\tself == Processor thisProcess ifTrue: [^anException signal].\n\n        self suspend.\n\n\t\"Add a new method context to the stack that will signal the exception\"\n\tsuspendedContext := MethodContext\n\t\tsender: suspendedContext\n\t\treceiver: self\n\t\tmethod: (self class methodDict at: #pvtSignal:list:)\n\t\targuments: (Array with: anException with: myList).\n\n\t\"If we are on a list to run, then suspend and restart the receiver \n\t(this lets the receiver run if it is currently blocked on a semaphore).  If\n\twe are not on a list to be run (i.e. this process is suspended), then when the\n\tprocess is resumed, it will signal the exception\"\n\n\tmyList ifNotNil: [self suspend; resume].! !\n!Process class methodsFor: 'instance creation' stamp: 'dmu 3/24/2010 15:46'!\nforContext: aContext priority: anInteger \n\t\"Answer an instance of me that has suspended aContext at priority \n\tanInteger.\"\n\n\t| newProcess |\n\tnewProcess := self new.\n\tnewProcess suspendedContext: aContext.\n\tnewProcess priority: anInteger.\n\t[newProcess coreMask:(1 bitShift: 27)].\n\t^newProcess! !\n!Process class methodsFor: 'instance creation' stamp: 'ssa 2/26/2009 02:45'!\nforContext: aContext priority: anInteger coreMask: anIntegerMask\n\t\"Answer an instance of me that has suspended aContext at priority \n\tanInteger using this coreMask.\"\n\n\t| newProcess |\n\tnewProcess := self forContext: aContext priority: anInteger.\n\tnewProcess coreMask:anIntegerMask.\n\t^newProcess! !\n!ProcessorScheduler methodsFor: 'removing' stamp: 'ssa 6/11/2010 14:37'!\nremoveAllPossible\n\t\"Terminate and remove all processes that you can.\n\tThis should leave the standard set only\"\n\tself terminatableProcesses print do:[:proc| proc terminate]! !\n!ProcessorScheduler methodsFor: 'removing' stamp: 'ssa 6/11/2010 14:31'!\nterminatableProcesses\n\t\"Answer all current processes that may be user terminated like in the ProcessBrowser\"\n\t\"self terminatableProcesses\"\n\t| processList |\n\tSmalltalk garbageCollectMost. \"lose defunct processes\"\n\n\tprocessList := Process allSubInstances\n\t\t\t\treject: [:each | each isTerminated].\n\tprocessList := processList\n\t\t\t\tsortBy: [:a :b | a priority >= b priority].\n\tprocessList := WeakArray withAll: processList.\n\t^processList select:[:proc| (ProcessBrowser nameAndRulesFor: proc) at: 2]! !\n!Project methodsFor: 'menu messages' stamp: 'dmu 11/25/2008 00:23'!\nenterForEmergencyRecovery\n\t\"This version of enter invokes an absolute minimum of mechanism.\n\tAn unrecoverable error has been detected in an isolated project.\n\tIt is assumed that the old changeSet has already been revoked.\n\tNo new process gets spawned here.  This will happen in the debugger.\"\n\n\tself isCurrentProject ifTrue: [^ self].\n\tCurrentProject saveState.\n\tCurrentProject := self.\n\tDisplay newDepthNoRestore: displayDepth.\n\tSmalltalk newChanges: changeSet.\n\tTranscriptStream newTranscript: transcript.\n\n\n\tworld isMorph\n\t\tifTrue:\n\t\t\t[\"Entering a Morphic project\"\n\t\t\tWorld := world.\n\t\t\tworld install.\n\t\t\tworld triggerOpeningScripts]\n\t\tifFalse:\n\t\t\t[\"Entering an MVC project\"\n\t\t\tWorld := nil.\n\t\t\tSmalltalk at: #ScheduledControllers put: world.\n\t\t\tScheduledControllers restore].\n\tUIProcess := Processor thisProcess.\n! !\n\n!StandardFileStream methodsFor: 'RVM' stamp: 'dmu 9/7/2010 14:07'!\ninterlock\n\tinterlock ifNil: [self interlock: Semaphore forMutualExclusion].\n\t^ interlock! !\n!StandardFileStream methodsFor: 'RVM' stamp: 'dmu 9/7/2010 14:07'!\ninterlock: aSemaphore\n\tinterlock := aSemaphore! !\n!StandardFileStream methodsFor: 'RVM' stamp: 'dmu 9/7/2010 14:14'!\nresetInterlock\n\tself interlock signal.\n\tself interlock: nil! !\n!StandardFileStream methodsFor: 'RVM' stamp: 'dmu 9/7/2010 14:09'!\nsafelyDo: aBlock\n\t^ self interlock critical: aBlock! !\n!StandardFileStream class methodsFor: 'RVM' stamp: 'dmu 9/7/2010 14:14'!\nresetAllInterlocks\n\t\"self resetAllInterlocks\"\n\tself allSubInstancesDo: [:sfs| sfs resetInterlock]! !\n\n!RemoteString methodsFor: 'accessing' stamp: 'dmu 9/7/2010 17:19'!\ntext \n\t\"Answer the receiver's string asText if remote files are enabled.\"\n\t| theFile theText |\n\t(sourceFileNumber == nil or: [(SourceFiles at: sourceFileNumber) == nil]) ifTrue: [^ nil].\n\ttheFile := SourceFiles at: sourceFileNumber.\t\ttheFile safelyDo: [\n\t\ttheFile position: filePositionHi.\n\t\ttheText := theFile nextChunkText].\n\t^theText! !\n\n!SyntaxError class methodsFor: 'instance creation' stamp: 'dmu 11/25/2008 00:25'!\nopen: aSyntaxError\n\t\"Answer a standard system view whose model is an instance of me.\"\n\t| topView |\n\t<primitive: 19> \"Simulation guard\"\n\t\n\ttopView := self buildMVCViewOn: aSyntaxError.\n\ttopView controller openNoTerminateDisplayAt: Display extent // 2.\n\tCursor normal show.\n\tProcessor thisProcess suspend.\n! !\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'dmu 9/7/2010 14:26'!\nsnapshot: save andQuit: quit embedded: embeddedFlag\n\t\"Mark the changes file and close all files. If save is true, save the current state of this Smalltalk in the image file. If quit is true, then exit to the outer shell. The latter part of this method runs when resuming a previously saved image. The resume logic checks for a document file to process when starting up.\"\n\n\t| resuming msg sourceLink |\n\tObject flushDependents.\n\tObject flushEvents.\n\tsave & (SourceFiles at: 2) notNil ifTrue:\n\t\t[msg :=  (quit\n\t\t\tifTrue: ['----QUIT----']\n\t\t\tifFalse: ['----SNAPSHOT----'])\n\t\t\t, Date dateAndTimeNow printString, ' ', (FileDirectory default localNameFor: self imageName).\n\t\tsourceLink := ' priorSource: ' , LastQuitLogPosition printString.\n\t\tself assureStartupStampLogged.\n\t\t(SourceFiles at: 2) safelyDo: [\n\t\t\tLastQuitLogPosition := (SourceFiles at: 2) setToEnd; position.\n\t\t\tself logChange: msg , sourceLink.\n\t\t].\n\t\tTranscript cr; show: msg].\n\n\tself processShutDownList: quit.\n\tCursor write show.\n\tsave ifTrue: [resuming := embeddedFlag \n\t\t\t\t\tifTrue: [self snapshotEmbeddedPrimitive] \n\t\t\t\t\tifFalse: [self snapshotPrimitive].  \"<-- PC frozen here on image file\"\n\t\t\t\tresuming == false \"guard against failure\" ifTrue:\n\t\t\t\t\t[\"Time to reclaim segment files is immediately after a save\"\n\t\t\t\t\tSmalltalk at: #ImageSegment\n\t\t\t\t\t\tifPresent: [:theClass | theClass reclaimObsoleteSegmentFiles]]]\n\t\tifFalse: [resuming := false].\n\tquit & (resuming == false) ifTrue: [self quitPrimitive].\n\tCursor normal show.\n\tself setGCParameters.\n\tresuming == true ifTrue: [self clearExternalObjects].\n\tself processStartUpList: resuming == true.\n\tresuming == true ifTrue:[\n\t\tself setPlatformPreferences.\n\t\tself readDocumentFile].\n\t\"Now it's time to raise an error\"\n\tresuming == nil ifTrue: [self error:'Failed to write image file (disk full?)'].\n\t^ resuming! !\n\n\n\n!UnhandledError methodsFor: 'priv handling' stamp: 'dmu 11/25/2008 00:25'!\ndevDefaultAction\n\n\tProcessor thisProcess\n\t\tdebug: exception signalerContext\n\t\ttitle: exception description! !\n\n\n!StandardSystemView methodsFor: 'displaying' stamp: 'dmu 9/17/2010 12:42'!\ndeEmphasizeLabel\n\t\"Un-Highlight the label.\"\n\tlabelFrame height = 0 ifTrue: [^ self].  \"no label\"\n\tself critical: [\n\t\tself displayLabelBackground: false.\n\t\tself displayLabelText.\n\t]! !\n\nCursor initialize!\nController initialize!\n!BitBlt methodsFor: 'copying' stamp: 'ssa 4/7/2009 13:44'!\nOLDcopyBits\n\t\"Primitive. Perform the movement of bits from the source form to the \n\tdestination form. Fail if any variables are not of the right type (Integer, \n\tFloat, or Form) or if the combination rule is not implemented. \n\tIn addition to the original 16 combination rules, this BitBlt supports\n\t16\tfail (to simulate paint)\n\t17\tfail (to simulate mask)\n\t18\tsourceWord + destinationWord\n\t19\tsourceWord - destinationWord\n\t20\trgbAdd: sourceWord with: destinationWord\n\t21\trgbSub: sourceWord with: destinationWord\n\t22\trgbDiff: sourceWord with: destinationWord\n\t23\ttallyIntoMap: destinationWord\n\t24\talphaBlend: sourceWord with: destinationWord\n\t25\tpixPaint: sourceWord with: destinationWord\n\t26\tpixMask: sourceWord with: destinationWord\n\t27\trgbMax: sourceWord with: destinationWord\n\t28\trgbMin: sourceWord with: destinationWord\n\t29\trgbMin: sourceWord bitInvert32 with: destinationWord\n\"\n\t<primitive: 'primitiveCopyBits' module: 'BitBltPlugin'>\n\n\t\"Check for compressed source, destination or halftone forms\"\n\t(combinationRule >= 30 and: [combinationRule <= 31]) ifTrue:\n\t\t[\"No alpha specified -- re-run with alpha = 1.0\"\n\t\t^ self copyBitsTranslucent: 255].\n\t((sourceForm isForm) and: [sourceForm unhibernate])\n\t\tifTrue: [^ self copyBits].\n\t((destForm isForm) and: [destForm unhibernate])\n\t\tifTrue: [^ self copyBits].\n\t((halftoneForm isForm) and: [halftoneForm unhibernate])\n\t\tifTrue: [^ self copyBits].\n\n\t\"Check for unimplmented rules\"\n\tcombinationRule = Form oldPaint ifTrue: [^ self paintBits].\n\tcombinationRule = Form oldErase1bitShape ifTrue: [^ self eraseBits].\n\n\t\"Check if BitBlt doesn't support full color maps\"\n\t(colorMap notNil and:[colorMap isColormap]) ifTrue:[\n\t\tcolorMap := colorMap colors.\n\t\t^self copyBits].\n\t\"Check if clipping gots us way out of range\"\n\tself clipRange ifTrue:[^self copyBits].\n\n\tself error: 'Bad BitBlt arg (Fraction?); proceed to convert.'.\n\t\"Convert all numeric parameters to integers and try again.\"\n\tdestX := destX asInteger.\n\tdestY := destY asInteger.\n\twidth := width asInteger.\n\theight := height asInteger.\n\tsourceX := sourceX asInteger.\n\tsourceY := sourceY asInteger.\n\tclipX := clipX asInteger.\n\tclipY := clipY asInteger.\n\tclipWidth := clipWidth asInteger.\n\tclipHeight := clipHeight asInteger.\n\t^ self copyBitsAgain! !\n!BitBlt methodsFor: 'copying' stamp: 'dmu 5/10/2009 08:43'!\ncopyBits\n\tRVMPrimitives isRVM ifFalse:[^self OLDcopyBits].\n \tdestForm == Display  ifTrue: [self copyBitsOnMain] ifFalse: [self copyBitsLocally]! !\n!BitBlt methodsFor: 'line drawing' stamp: 'dmu 4/10/2009 22:47'!\ndrawFrom: startPoint to: stopPoint withFirstPoint: drawFirstPoint\n\t\"Draw a line whose end points are startPoint and stopPoint.\n\tThe line is formed by repeatedly calling copyBits at every\n\tpoint along the line.  If drawFirstPoint is false, then omit\n\tthe first point so as not to overstrike at line junctions.\"\n\t| offset point1 point2 forwards |\n\t\"Always draw down, or at least left-to-right\"\n\tforwards := (startPoint y = stopPoint y and: [startPoint x < stopPoint x])\n\t\t\t\tor: [startPoint y < stopPoint y].\n\tforwards\n\t\tifTrue: [point1 := startPoint. point2 := stopPoint]\n\t\tifFalse: [point1 := stopPoint. point2 := startPoint].\n\tsourceForm == nil ifTrue:\n\t\t[destX := point1 x.\n\t\tdestY := point1 y]\n\t\tifFalse:\n\t\t[width := sourceForm width.\n\t\theight := sourceForm height.\n\t\toffset := sourceForm offset.\n\t\tdestX := (point1 x + offset x) rounded.\n\t\tdestY := (point1 y + offset y) rounded].\n\n\t\"Note that if not forwards, then the first point is the last and vice versa.\n\tWe agree to always paint stopPoint, and to optionally paint startPoint.\"\n\t(drawFirstPoint or: [forwards == false  \"ie this is stopPoint\"])\n\t\tifTrue: [self copyBits].\n\t\t(destForm == Display or:[RVMPrimitives isRVM not]) ifTrue: [\n\tself drawLoopX: (point2 x - point1 x) rounded \n\t\t\t\t  Y: (point2 y - point1 y) rounded]\n\t\t\tifFalse: [self drawLoopLocallyX: (point2 x - point1 x) rounded \n\t\t\t\t  Y: (point2 y - point1 y) rounded].\n\t(drawFirstPoint or: [forwards  \"ie this is stopPoint\"])\n\t\tifTrue: [self copyBits].\n! !\n!BitBlt methodsFor: 'line drawing' stamp: 'dmu 4/10/2009 22:47'!\ndrawLoopX: xDelta Y: yDelta \n\t\"Primitive. Implements the Bresenham plotting algorithm (IBM Systems\n\tJournal, Vol. 4 No. 1, 1965). It chooses a principal direction, and\n\tmaintains a potential, P. When P's sign changes, it is time to move in\n\tthe minor direction as well. This particular version does not write the\n\tfirst and last points, so that these can be called for as needed in client code.\n\tOptional. See Object documentation whatIsAPrimitive.\"\n\t\n\t\t^(destForm == Display  or:[RVMPrimitives isRVM not])\n\t\t\tifTrue:[self globalDrawLoopX:xDelta Y: yDelta ]\n\t\t\tifFalse:[self localDrawLoopX:xDelta Y: yDelta ]! !\n\n!ClassDescription methodsFor: 'fileIn/Out' stamp: 'dmu 9/7/2010 14:17'!\nclassComment: aString stamp: aStamp\n\t\"Store the comment, aString or Text or RemoteString, associated with the class we are organizing.  Empty string gets stored only if had a non-empty one before.\"\n\n\t| ptr header file oldCommentRemoteStr |\n\t(aString isKindOf: RemoteString) ifTrue:\n\t\t[SystemChangeNotifier uniqueInstance classCommented: self.\n\t\t^ self organization classComment: aString stamp: aStamp].\n\n\toldCommentRemoteStr := self organization commentRemoteStr.\n\t(aString size = 0) & (oldCommentRemoteStr == nil) ifTrue: [^ self organization classComment: nil].\n\t\t\"never had a class comment, no need to write empty string out\"\n\n\tptr := oldCommentRemoteStr ifNil: [0] ifNotNil: [oldCommentRemoteStr sourcePointer].\n\tSourceFiles ifNotNil: [(file := SourceFiles at: 2) ifNotNil: [\n\t\tfile safelyDo: [\n\t\t\tfile setToEnd; cr; nextPut: $!!.\t\"directly\"\n\t\t\t\"Should be saying (file command: 'H3') for HTML, but ignoring it here\"\n\t\t\theader := String streamContents: [:strm | strm nextPutAll: self name;\n\t\t\t\tnextPutAll: ' commentStamp: '.\n\t\t\t\taStamp storeOn: strm.\n\t\t\t\tstrm nextPutAll: ' prior: '; nextPutAll: ptr printString].\n\t\t\tfile nextChunkPut: header]]].\n\tself organization classComment: (RemoteString newString: aString onFileNumber: 2) stamp: aStamp.\n\tSystemChangeNotifier uniqueInstance classCommented: self.\n! !\n!CompiledMethod methodsFor: 'source code management' stamp: 'dmu 9/7/2010 14:23'!\nputSource: sourceStr fromParseNode: methodNode inFile: fileIndex withPreamble: preambleBlock\n\t\"Store the source code for the receiver on an external file.\n\tIf no sources are available, i.e., SourceFile is nil, then store\n\ttemp names for decompilation at the end of the method.\n\tIf the fileIndex is 1, print on *.sources;  if it is 2, print on *.changes,\n\tin each case, storing a 4-byte source code pointer at the method end.\"\n\n\t| file remoteString |\n\t(SourceFiles == nil or: [(file := SourceFiles at: fileIndex) == nil]) ifTrue:\n\t\t[^self become: (self copyWithTempsFromMethodNode: methodNode)].\n\n\tSmalltalkImage current assureStartupStampLogged.\n\t\n\tfile safelyDo: [\n\t\tfile setToEnd.\n\n\t\tpreambleBlock value: file.  \"Write the preamble\"\n\t\tremoteString := RemoteString newString: sourceStr onFileNumber: fileIndex toFile: file.\n\t\tfile nextChunkPut: ' '.\n\t\tInMidstOfFileinNotification signal ifFalse: [file flush].\n\t\tself checkOKToAdd: sourceStr size at: remoteString position.\n\t\tself setSourcePosition: remoteString position inFile: fileIndex].\n! !\n!RemoteString methodsFor: 'private' stamp: 'dmu 9/7/2010 14:23'!\nstring: aString onFileNumber: fileNumber\n\t\"Store this as my string if source files exist.\"\n\t| theFile |\n\t(SourceFiles at: fileNumber) == nil ifFalse: \n\t\t[theFile := SourceFiles at: fileNumber.\n\t\ttheFile safelyDo: [\n\t\t\ttheFile setToEnd; cr.\n\t\t\tself string: aString onFileNumber: fileNumber toFile: theFile]\n\t\t]! !\n!SystemDictionary methodsFor: 'sources, change log' stamp: 'dmu 9/7/2010 14:26'!\nwriteRecentCharacters: nCharacters toFileNamed: aFilename\n\t\"Schedule an editable text view on the last n characters of changes.\"\n\t| changes |\n\tchanges := SourceFiles at: 2.\n\tchanges safelyDo: [\n\t\tchanges setToEnd; skip: nCharacters negated.\n\t\t(FileStream newFileNamed: aFilename) nextPutAll: (changes next: nCharacters); close; open; edit\n\t]! !\n!SmalltalkImage methodsFor: 'sources, changes log' stamp: 'dmu 9/7/2010 14:25'!\nlogChange: aStringOrText \n\t\"Write the argument, aString, onto the changes file.\"\n\t| aString changesFile |\n\t(SourceFiles isNil or: [(SourceFiles at: 2) == nil]) ifTrue: [^ self].\n\tself assureStartupStampLogged.\n\n\taString := aStringOrText asString.\n\t(aString findFirst: [:char | char isSeparator not]) = 0\n\t\tifTrue: [^ self].  \"null doits confuse replay\"\n\t(changesFile := SourceFiles at: 2).\n\tchangesFile isReadOnly ifTrue:[^self].\n\tchangesFile safelyDo: [\n\t\tchangesFile setToEnd; cr; cr.\n\t\tchangesFile nextChunkPut: aString.\n\t\t\t\"If want style changes in DoIt, use nextChunkPutWithStyle:, and allow Texts to get here\"\n\t\tself forceChangesToDisk.\n\t]! !\n!SmalltalkImage methodsFor: 'sources, changes log' stamp: 'dmu 9/7/2010 14:25'!\nassureStartupStampLogged\n\t\"If there is a startup stamp not yet actually logged to disk, do it now.\"\n\t| changesFile |\n\tStartupStamp ifNil: [^ self].\n\t(SourceFiles isNil or: [(changesFile := SourceFiles at: 2) == nil]) ifTrue: [^ self].\n\tchangesFile isReadOnly ifTrue:[^self].\n\tchangesFile safelyDo: [\n\t\tchangesFile setToEnd; cr; cr.\n\t\tchangesFile nextChunkPut: StartupStamp asString; cr.\n\t\tStartupStamp := nil.\n\t\tself forceChangesToDisk.\n\t]! !\n\n!ClassDescription methodsFor: 'fileIn/Out' stamp: 'dmu 9/7/2010 14:22'!\nprintMethodChunk: selector withPreamble: doPreamble on: outStream\n\t\tmoveSource: moveSource toFile: fileIndex\n\t\"Copy the source code for the method associated with selector onto the fileStream.  If moveSource true, then also set the source code pointer of the method.\"\n\t| preamble method oldPos newPos sourceFile endPos |\n\tdoPreamble \n\t\tifTrue: [preamble := self name , ' methodsFor: ' ,\n\t\t\t\t\t(self organization categoryOfElement: selector) asString printString]\n\t\tifFalse: [preamble := ''].\n\tmethod := self methodDict at: selector ifAbsent:\n\t\t[outStream nextPutAll: selector; cr.\n\t\toutStream tab; nextPutAll: '** ERROR!!  THIS SCRIPT IS MISSING ** ' translated; cr; cr.\n\t\toutStream nextPutAll: '  '.\n\t\t^ outStream].\n\n\t((method fileIndex = 0\n\t\tor: [(SourceFiles at: method fileIndex) == nil])\n\t\tor: [(oldPos := method filePosition) = 0])\n\t\tifTrue:\n\t\t[\"The source code is not accessible.  We must decompile...\"\n\t\tpreamble size > 0 ifTrue: [outStream cr; nextPut: $!!; nextChunkPut: preamble; cr].\n\t\toutStream nextChunkPut: method decompileString]\n\t\tifFalse:\n\t\t[sourceFile := SourceFiles at: method fileIndex.\n\t\tsourceFile safelyDo: [\n\t\t\tpreamble size > 0\n\t\t\t\tifTrue:    \"Copy the preamble\"\n\t\t\t\t\t[outStream copyPreamble: preamble from: sourceFile at: oldPos]\n\t\t\t\tifFalse:\n\t\t\t\t\t[sourceFile position: oldPos].\n\t\t\t\"Copy the method chunk\"\n\t\t\tnewPos := outStream position.\n\t\t\toutStream copyMethodChunkFrom: sourceFile.\n\t\t\tsourceFile skipSeparators.      \"The following chunk may have ]style[\"\n\t\t\tsourceFile peek == $] ifTrue: [\n\t\t\t\toutStream cr; copyMethodChunkFrom: sourceFile].\n\t\t\t\n\t\t\tmoveSource ifTrue:    \"Set the new method source pointer\"\n\t\t\t\t[endPos := outStream position.\n\t\t\t\tmethod checkOKToAdd: endPos - newPos at: newPos.\n\t\t\t\tmethod setSourcePosition: newPos inFile: fileIndex]]].\n\tpreamble size > 0 ifTrue: [outStream nextChunkPut: ' '].\n\t^ outStream cr! !\n!StandardSourceFileArray class methodsFor: 'initialize-release' stamp: 'dmu 9/7/2010 14:12'!\ninstall\n\t\"Replace SourceFiles by an instance of me with the standard sources and changes files.\n\tThis only works if SourceFiles is either an Array or an instance of this class\"\n\t\"StandardSourceFileArray install\"\n\tStandardFileStream resetAllInterlocks.\n\tSourceFiles := self new initialize! !\n\n!Process methodsFor: 'RVM' stamp: 'dmu 9/17/2010 11:59'!\nsuspendedContextWaitingIfNecessary\n\t\"In RVM, can suspend some other running process, and so after sending suspend, suspendedContext may still be nil.\"\n\t\n\t[self suspendedContext isNil] whileTrue.\n\t^ self suspendedContext! !\n!ParagraphEditor methodsFor: 'do-its' stamp: 'dmu 9/17/2010 12:00'!\ndebug: aCompiledMethod receiver: anObject in: evalContext\n\n\t| selector guineaPig debugger context |\n\tselector := evalContext isNil ifTrue: [#DoIt] ifFalse: [#DoItIn:].\n\tanObject class addSelectorSilently: selector withMethod: aCompiledMethod.\n\tguineaPig := evalContext isNil\n\t\tifTrue: [[anObject DoIt] newProcess]\n\t\tifFalse: [[anObject DoItIn: evalContext] newProcess].\n\tcontext := guineaPig suspendedContextWaitingIfNecessary.\n\tdebugger := Debugger new\n\t\tprocess: guineaPig\n\t\tcontroller: ((Smalltalk isMorphic not and: [ScheduledControllers inActiveControllerProcess])\n\t\t\t\tifTrue: [ScheduledControllers activeController]\n\t\t\t\tifFalse: [nil])\n\t\tcontext: context\n\t\tisolationHead: nil.\n\tdebugger openFullNoSuspendLabel: 'Debug it'.\n\t[debugger interruptedContext method == aCompiledMethod]\n\t\twhileFalse: [debugger send].\n\tanObject class basicRemoveSelector: selector! !\n!StandardSystemView methodsFor: 'RVM' stamp: 'dmu 9/17/2010 12:37'!\ndisplayInterlock\n\tdisplayInterlock ifNil: [self displayInterlock: Mutex new].\n\t^ displayInterlock! !\n!StandardSystemView methodsFor: 'RVM' stamp: 'dmu 9/17/2010 12:24'!\ndisplayInterlock: aSemaphore\n\tdisplayInterlock := aSemaphore! !\n!StandardSystemView methodsFor: 'displaying' stamp: 'dmu 9/17/2010 12:31'!\ndisplayEmphasized\n\t\"Display with label highlighted to indicate that it is active.\"\n\tself  critical: [\n\t\tself displayDeEmphasized; emphasize.\n\t\tisLabelComplemented := true\n\t]! !\n!StandardSystemView methodsFor: 'displaying' stamp: 'dmu 9/17/2010 12:30'!\ndisplayDeEmphasized \n\t\"Display this view with emphasis off.\n\tIf windowBits is not nil, then simply BLT if possible,\n\t\tbut force full display for top window so color is preserved.\"\n\tself  critical: [\n\t\t(bitsValid and: [controller ~~ ScheduledControllers activeController])\n\t\t\tifTrue: [self lock.\n\t\t\t\t\twindowBits displayAt: self windowOrigin]\n\t\t\tifFalse: [Display deferUpdates: true.\n\t\t\t\t\tsuper display.\n\t\t\t\t\tDisplay deferUpdates: false; forceToScreen: self windowBox.\n\t\t\t\t\tCacheBits ifTrue: [self cacheBitsAsIs]]\n\t]\n! !\n!StandardSystemView methodsFor: 'RVM' stamp: 'dmu 9/17/2010 12:37'!\ncritical: aBlock\n\t^self displayInterlock critical: aBlock! !\n!Mutex methodsFor: 'mutual exclusion' stamp: 'dmu 6/14/2010 16:16'!\ncritical: aBlock\n\t\"Evaluate aBlock protected by the receiver.\"\n\t| activeProcess |\n\tactiveProcess := Processor thisProcess.\n\tactiveProcess == owner ifTrue:[^aBlock value].\n\t^semaphore critical:[\n\t\towner := activeProcess.\n\t\taBlock ensure:[owner := nil]].! !\n!Mutex commentStamp: 'dmu 9/17/2010 12:34'!\nA Mutex is a light-weight MUTual EXclusion object being used when two or more processes need to access a shared resource concurrently. A Mutex grants ownership to a single process and will suspend any other process trying to aquire the mutex while in use. Waiting processes are granted access to the mutex in the order the access was requested.\n\nBrought in from Squeak 4.1 because we need it.\n\nInstance variables:\n\tsemaphore\t<Semaphore>\t\tThe (primitive) semaphore used for synchronization.\n\towner\t\t<Process>\t\tThe process owning the mutex.!\n!StandardSystemView methodsFor: 'displaying' stamp: 'dmu 9/17/2010 12:42'!\nemphasizeLabel\n\t\"Highlight the label.\"\n\tlabelFrame height = 0 ifTrue: [^ self].  \"no label\"\n\tself critical: [\n\t\tself displayLabelBackground: true.\n\t\tself displayLabelBoxes.\n\t\tself displayLabelText.\n\t]! !\n!StandardSystemView methodsFor: 'RVM' stamp: 'dmu 9/17/2010 12:47'!\nresetDisplayInterlock\n\tself displayInterlock: nil! !\n!ControlManager methodsFor: 'displaying' stamp: 'dmu 9/17/2010 12:48'!\nrestore \n\t\"Clear the screen to gray and then redisplay all the scheduled views.  Try to be a bit intelligent about the view that wants control and not display it twice if possible.\"\n\n\tscheduledControllers first view uncacheBits.  \"assure refresh\"\n\tself unschedule: screenController; scheduleOnBottom: screenController.\n\tscreenController view window: Display boundingBox; displayDeEmphasized.\n\tself scheduledWindowControllers reverseDo:\n\t\t[:aController | aController view resetDisplayInterlock; displayDeEmphasized].\n! !\n\n!SystemDictionary methodsFor: 'miscellaneous' stamp: 'dmu 9/17/2010 16:39'!\nhandleUserInterrupt\n\tPreferences cmdDotEnabled ifTrue:\n\t\t[Smalltalk isMorphic\n\t\t\tifTrue: []\n\t\t\tifFalse: [[ScheduledControllers interruptName: 'User Interrupt'] forkAt: Processor thisProcess priority + 1]]! !\n"
  },
  {
    "path": "image.st/Sly3.mvc.st",
    "content": "'******************************************************************************\r *  Copyright (c) 2008 - 2010 IBM Corporation and others.\r *  All rights reserved. This program and the accompanying materials\r *  are made available under the terms of the Eclipse Public License v1.0\r *  which accompanies this distribution, and is available at\r *  http://www.eclipse.org/legal/epl-v10.html\r * \r *  Contributors:\r *    David Ungar, IBM Research - Initial Implementation\r *    Sam Adams, IBM Research - Initial Implementation\r *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\r ******************************************************************************'!\rLink subclass: #Process\r\tinstanceVariableNames: 'suspendedContext priority myList errorHandler name hostCore coreMask lyDebuggingBlock parent children creatorEnsemble '\r\tclassVariableNames: 'SemaForSupensions'\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Processes'!\rObject subclass: #Sly3\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'KeepFlying SerializeForDebugging'\r\tpoolDictionaries: ''\r\tcategory: 'Sly3'!\rSly3 class\r\tinstanceVariableNames: ''!\rObject subclass: #Sly3AbstractModifier\rinstanceVariableNames: 'previous next'\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly3-Modifiers'!\rSly3AbstractModifier subclass: #Sly3Adverb\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly3-Modifiers'!\rSly3Adverb subclass: #Sly3OperandDistributor\r\tinstanceVariableNames: 'resultantMembers countsUpToMe'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Sly3-Modifiers'!\rSly3OperandDistributor subclass: #Sly3ModCollectionly\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Sly3-Modifiers'!\rSly3OperandDistributor subclass: #Sly3AbstractIndirectOperandDistributor\r\tinstanceVariableNames: 'parameter'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Sly3-Modifiers'!\rSly3AbstractIndirectOperandDistributor subclass: #Sly3ModRandomly\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'RandomNumberSource'\r\tpoolDictionaries: ''\r\tcategory: 'Sly3-Modifiers'!\rSly3OperandDistributor subclass: #Sly3ModWholly\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Sly3-Modifiers'!\rSly3OperandDistributor subclass: #Sly3ModRoundly\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Sly3-Modifiers'!\rSly3OperandDistributor subclass: #Sly3ModSingly\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Sly3-Modifiers'!\rSly3OperandDistributor subclass: #Sly3ModDuplicatively\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Sly3-Modifiers'!\rSly3Adverb subclass: #Sly3ModSerially\r\tinstanceVariableNames: 'cachedMod cachedEns'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Sly3-Modifiers'!\rSly3OperandDistributor subclass: #Sly3ModSelectively\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Sly3-Modifiers'!\rSly3ModWholly subclass: #Sly3ModPlainly\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Sly3-Modifiers'!\rObject subclass: #Sly3Boids\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly3-Boids'!\rSly3Boids subclass: #Sly3aBoids\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Sly3-Boids'!\rSly3AbstractModifier subclass: #Sly3Gerund\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly3-Modifiers'!\rObject subclass: #ArchiveReader\r\tinstanceVariableNames: 'stream classMap objectMap startPosition classVersions position'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Archiving'!\rObject subclass: #ArchiveWriter\r\tinstanceVariableNames: 'stream classMap objectMap position'\r\tclassVariableNames: ''\r\tpoolDictionaries: 'TextConstants'\r\tcategory: 'RVM-Archiving'!\rObject subclass: #BinaryChoice\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Compatibility'!\rObject subclass: #Collection\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'MutexForPicking RandomForPicking Tasks'\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Abstract'!\rObject subclass: #Controller\r\tinstanceVariableNames: 'model view sensor lastActivityTime lastProcessRunningMe killCounter'\r\tclassVariableNames: 'MinActivityLapse'\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-ST80 Remnants'!\rArchiveReader subclass: #CopyReader\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Archiving'!\rArchiveWriter subclass: #CopyWriter\r\tinstanceVariableNames: 'copySet'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Archiving'!\rForm subclass: #Cursor\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'ActionCursor BlankCursor BottomLeftCursor BottomRightCursor CornerCursor CrossHairCursor CurrentCursor DownCursor LeftArrowCursor MarkerCursor MenuCursor MoveCursor NormalCursor OriginCursor ReadCursor ResizeLeftCursor ResizeTopCursor ResizeTopLeftCursor ResizeTopRightCursor RightArrowCursor SquareCursor TopLeftCursor TopRightCursor UpCursor WaitCursor WebLinkCursor WriteCursor XeqCursor'\r\tpoolDictionaries: ''\r\tcategory: 'Graphics-Display Objects'!\rForm subclass: #DisplayScreen\r\tinstanceVariableNames: 'clippingBox extraRegions'\r\tclassVariableNames: 'Blank5 DeferringUpdates DisplayChangeSignature Dot1 Dot5 ScreenSave'\r\tpoolDictionaries: ''\r\tcategory: 'Graphics-Display Objects'!\rArchiveReader subclass: #RVMSampleReader\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: 'TextConstants'\rcategory: 'RVM-Archiving'!\rArchiveWriter subclass: #RVMSampleWriter\rinstanceVariableNames: 'rawData'\rclassVariableNames: ''\rpoolDictionaries: 'TextConstants'\rcategory: 'RVM-Archiving'!\rSly3AbstractIndirectOperandDistributor subclass: #Sly3ModValuely\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'RandomNumberSource'\r\tpoolDictionaries: ''\r\tcategory: 'Sly3-Modifiers'!\rObject subclass: #Sly3EnsembleMirror\r\tinstanceVariableNames: 'theEnsemble members'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Sly3'!\rObject subclass: #Sly3MessageEnvelope\r\tinstanceVariableNames: 'receiver message deactivateEnsembleBehaviorFlags'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Sly3'!\rObject subclass: #Sly3Boid\r\tinstanceVariableNames: 'position velocity neighbors flock lastDrawnPosition lastLastDrawnPosition'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Sly3-Boids'!\rSly3Boid subclass: #Sly3aBoid\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Sly3-Boids'!\r!ChangeList methodsFor: 'scanning' stamp: 'ssa 1/5/2010 15:55'!\rscanRecords: someRecords\r\tchangeList _ OrderedCollection new.\r\tlist _ OrderedCollection new.\r\tlistIndex _ 0.\r\tsomeRecords do:[:each|\r\t\teach type = #doIt ifTrue:[self addItem: each text: 'do it: ' , (each string contractTo: 50)].\r\t\teach type = #preamble ifTrue:[self addItem: each text: 'preamble: ' , (each string contractTo: 50)].\r\t\teach type = #classComment ifTrue:[self addItem: each text: 'class comment for ', each methodClassName].\r\t\teach type = #method ifTrue:[self addItem: each text:  'method: ',each methodClassName,(each isMetaClassChange ifTrue: [' class '] ifFalse: [' ']),each methodSelector,' ', each stamp]].\r\tlistSelections _ Array new: list size withAll: false! !\r!ChangeList methodsFor: 'menu actions' stamp: 'ssa 1/5/2010 12:19'!\rchangeListMenu: aMenu\r\t\"Fill aMenu up so that it comprises the primary changelist-browser menu\"\r\r\taMenu addList: #(\r\r\t('fileIn selections'\t\t\t\t\t\t\tfileInSelections\t\t\t\t\t\t'import the selected items into the image')\r\t('fileOut selections...\t'\t\t\t\t\t\tfileOutSelections\t\t\t\t\t\t'create a new file containing the selected items')\r\t-\r\t('compare to current'\t\t\t\t\t\tcompareToCurrentVersion\t\t\t'open a separate window which shows the text differences between the on-file version and the in-image version.' )\r\t('toggle diffing (D)'\t\t\t\t\t\t\ttoggleDiffing\t\t\t\t\t\t'start or stop showing diffs in the code pane.')\r\t-\r\t('select conflicts with any changeset'\t\tselectAllConflicts\t\t\t\t\t'select methods in the file which also occur in any change-set in the system')\r\t('select conflicts with current changeset'\tselectConflicts\t\t\t\t\t\t'select methods in the file which also occur in the current change-set')\r\t('select conflicts with...'\t\t\t\t\t\tselectConflictsWith\t\t\t\t\t'allows you to designate a file or change-set against which to check for code conflicts.')\r\t-\r\t('select changes matching...'\t\t\t\t\tselectChangesMatching\t\t\t\t'select changes in the file that match a user-supplied pattern')\r\t('spawn changes matching...'\t\t\t\t\tspawnChangesMatching\t\t\t\t'spawn changes in the file that match a user-supplied pattern into a new change list view')\r\t('select changes such that...'\t\t\t\t\tselectSuchThat\t\t\t\t'select changes in the file that evaluate to true to a user-supplied code fragment')\r\t('spawn changes such that...'\t\t\t\t\tspawnSuchThat\t\t\t\t'spawn changes in the file that evaluate to true to a user-supplied code fragment')\r\t-\r\t('select unchanged methods'\t\t\t\t\tselectUnchangedMethods\t\t\t\t'select methods in the file whose in-image versions are the same as their in-file counterparts' )\r\t('select new methods'\t\t\t\t\t\tselectNewMethods\t\t\t\t\t'select methods in the file that do not current occur in the image')\r\t('select methods for this class'\t\t\t\tselectMethodsForThisClass\t\t\t'select all methods in the file that belong to the currently-selected class')\r\r\t-\r\t('select all (a)'\t\t\t\t\t\t\t\tselectAll\t\t\t\t\t\t\t\t'select all the items in the list')\r\t('deselect all'\t\t\t\t\t\t\t\tdeselectAll\t\t\t\t\t\t\t'deselect all the items in the list')\r\t('invert selections'\t\t\t\t\t\t\tinvertSelections\t\t\t\t\t\t'select every item that is not currently selected, and deselect every item that *is* currently selected')\r\t('spawn selections'\t\t\t\t\t\t\tspawnSelections\t\t\t\t\t\t'spawn all selected changes into a new change list view')\r\t-\r\t('browse current versions of selections'\t\tbrowseCurrentVersionsOfSelections\t'open a message-list browser showing the current (in-image) counterparts of the selected methods')\r\t('destroy current methods of selections'\t\tdestroyCurrentCodeOfSelections\t\t'remove (*destroy*) the in-image counterparts of all selected methods')\r\t-\r\t('remove doIts'\t\t\t\t\t\t\t\tremoveDoIts\t\t\t\t\t\t\t'remove all items that are doIts rather than methods')\r\t('remove older versions'\t\t\t\t\t\tremoveOlderMethodVersions\t\t\t'remove all but the most recent versions of methods in the list')\r\t('remove up-to-date versions'\t\t\t\tremoveExistingMethodVersions\t\t'remove all items whose code is the same as the counterpart in-image code')\r\t('remove selected items'\t\t\t\t\t\tremoveSelections\t\t\t\t\t'remove the selected items from the change-list')\r\t('remove unselected items'\t\t\t\t\tremoveNonSelections\t\t\t\t\t'remove all the items not currently selected from the change-list')).\r\r\t^ aMenu\r\r! !\r!ChangeList methodsFor: 'menu actions' stamp: 'ssa 1/5/2010 14:16'!\rselectChangesMatching\r\t\"query the user for a pattern then select all changes matching that pattern\"\r\t| pattern |\r\tpattern _ FillInTheBlank request: 'Enter a pattern to match to select changes:\r# = single character wildcard\r* = many character wildcard'. ''\r.\r\r\tpattern isEmpty ifTrue: [^ self ].\r\r\tself selectSuchThat: [:aChangeRecord |  aChangeRecord match: pattern]! !\r!ChangeList methodsFor: 'menu actions' stamp: 'ssa 1/5/2010 15:07'!\rselectSuchThat\r\t\"query the user for a selection criterio.  By Lex Spoon.  NB: the UI for invoking this from a changelist browser is currently commented out; to reenfranchise it, you'll need to mild editing to ChangeList method #changeListMenu:\"\r\t| code block |\r\tcode _ FillInTheBlank request: 'selection criteria for a change named aChangeRecord?\rFor instance, \raChangeRecord category = ''System-Network''\raChangeRecord type = \"one of #(#method #doIt #classComment #preamble )\"\raChangeRecord text = ''whole change text'' \raChangeRecord string includesSubString: ''change text substring'' \raChangeRecord string includesSubString: ''change text substring'' \r''*fooba#'' match: aChangeRecord string  \r ''*fooba#''  match: aChangeRecord methodSelectorSafe\r ''*fooba#'' match: aChangeRecord methodSelectorSafe \r' initialAnswer: 'aChangeRecord match:''*anything#anyChar'''.\r\r\tcode isEmpty ifTrue: [^ self ].\r\r\tblock _ Compiler evaluate: '[:aChangeRecord | ', code, ']'.\r\r\tself selectSuchThat: block! !\r!ChangeList methodsFor: 'menu actions' stamp: 'ssa 1/5/2010 14:46'!\rspawnChangesMatching\r\t\"query the user for a pattern then select all changes matching that pattern\"\r\t| pattern |\r\tpattern _ FillInTheBlank request: 'Enter a pattern to match to select changes:\r# = single character wildcard\r* = many character wildcard'. ''\r.\r\r\tpattern isEmpty ifTrue: [^ self ].\r\r\tself spawnSuchThat: [:aChangeRecord |  aChangeRecord match: pattern] titled:'Changes matching ',pattern! !\r!ChangeList methodsFor: 'menu actions' stamp: 'ssa 1/5/2010 14:55'!\rspawnSelections\r\t\"spawn a new changelist view for the selections\"\r\t\r\tself class browseRecords: self selectedChanges titled:'Selected Changes'! !\r!ChangeList methodsFor: 'menu actions' stamp: 'ssa 1/5/2010 15:07'!\rspawnSuchThat\r\t\"query the user for a selection criterion block and then spawn\"\r\t| code block |\r\tcode _ FillInTheBlank request: 'selection criteria for a change named aChangeRecord?\rFor instance, \raChangeRecord category = ''System-Network''\raChangeRecord type = \"one of #(#method #doIt #classComment #preamble )\"\raChangeRecord text = ''whole change text'' \raChangeRecord string includesSubString: ''change text substring'' \r''*foo*ba#'' match: aChangeRecord string  \r ''*foo*ba#''  match: aChangeRecord methodSelectorSafe\r ''*foo*ba#'' match: aChangeRecord methodSelectorSafe \r' initialAnswer: 'aChangeRecord match:''*anything#anyChar'''.\r\r\r\tcode isEmpty ifTrue: [^ self ].\r\r\tblock _ Compiler evaluate: '[:aChangeRecord | ', code, ']'.\r\r\tself spawnSuchThat: block titled: 'Changes such that ''',code,'''' ! !\r!ChangeList methodsFor: 'menu actions' stamp: 'ssa 1/5/2010 14:58'!\rspawnSuchThat: aBlock titled: aString\r\t\"spawn changes passing aBlock\"\r\r\t| changes |\r\tchanges _ changeList select: [ :change | aBlock value: change ].\r\tself class browseRecords: changes titled: aString! !\r!ChangeList methodsFor: 'viewing access' stamp: 'ssa 1/1/1970 00:15'!\rtogglePrimaryListIndex: newListIndex \r\tlistIndex = newListIndex\r\t\tifTrue: [listSelections at: listIndex put: false.\r\t\t\tlistIndex := 0]\r\t\tifFalse: [newListIndex ~= 0\r\t\t\t\tifTrue: [listSelections at: newListIndex put: true.\r\t\t\t\t\tlistIndex := newListIndex]].\r\tself changed: #listIndex.\r\tself contentsChanged! !\r!ChangeList methodsFor: 'accessing' stamp: 'ssa 1/5/2010 13:56'!\rchangeList: aCollection\r\tchangeList _ aCollection! !\r!ChangeList methodsFor: 'accessing' stamp: 'ssa 1/5/2010 14:56'!\rselectedChanges\r\r\t| sels |\r\tsels _ OrderedCollection new.\r\tlistSelections with: changeList do: \r\t\t[:selected :item | selected ifTrue: [sels add: item]].\r\t^sels! !\r!ChangeList class methodsFor: 'public access' stamp: 'ssa 1/5/2010 14:45'!\rbrowseRecords: someChangeRecords\r\t\"Opens a changeList on a collection of change records\"\r\tself browseRecords: someChangeRecords titled: 'Some changes'! !\r!ChangeList class methodsFor: 'public access' stamp: 'ssa 1/5/2010 14:45'!\rbrowseRecords: someChangeRecords titled: aString\r\t\"Opens a changeList on a collection of change records\"\r\t| changeList |\r\tchangeList _ self new scanRecords: someChangeRecords.\r\tself open: changeList name: aString multiSelect: true! !\r!ChangeList class methodsFor: 'instance creation' stamp: 'ssa 8/21/2009 15:32'!\ropen: aChangeList name: aString multiSelect: multiSelect\r\t\"Create a standard system view for the messageSet, whose label is aString.\r\tThe listView may be either single or multiple selection type\"\r\r\t| topView listHeight annoHeight optButtonHeight codeHeight aListView underPane annotationPane buttonsView aBrowserCodeView |\r\t\r\tlistHeight _ 70.\r\tannoHeight _ 10.\r\toptButtonHeight _ aChangeList optionalButtonHeight.\r\tcodeHeight _ 110.\r\r\ttopView _ (StandardSystemView new)\r\t\tmodel: aChangeList;\r\t\tlabel: aString;\r\t\tminimumSize: 200 @ 120;\r\t\tborderWidth: 1.\r\r\taListView _ (multiSelect\r\t\t\tifTrue: [PluggableListViewOfMany\r\t\t\t\t\t\ton: aChangeList\r\t\t\t\t\t\tlist: #list\r\t\t\t\t\t\tprimarySelection: #listIndex\r\t\t\t\t\t\tchangePrimarySelection: #togglePrimaryListIndex:\r\t\t\t\t\t\tlistSelection: #listSelectionAt:\r\t\t\t\t\t\tchangeListSelection: #listSelectionAt:put:\r\t\t\t\t\t\tmenu: (aChangeList showsVersions\r\t\t\t\t\t\t\t\tifTrue: [#versionsMenu:]\r\t\t\t\t\t\t\t\tifFalse: [#changeListMenu:])]\r\t\t\tifFalse: [PluggableListView\r\t\t\t\t\t\ton: aChangeList\r\t\t\t\t\t\tlist: #list\r\t\t\t\t\t\tselected: #listIndex\r\t\t\t\t\t\tchangeSelected: #toggleListIndex:\r\t\t\t\t\t\tmenu: (aChangeList showsVersions\r\t\t\t\t\t\t\t\tifTrue: [#versionsMenu:]\r\t\t\t\t\t\t\t\tifFalse: [#changeListMenu:])]).\r\taListView  window: (0 @ 0 extent: 200 @ listHeight).\r\ttopView addSubView: aListView .\r\r\tunderPane _ aListView.\r\taChangeList wantsAnnotationPane\r\t\tifTrue:\r\t\t\t[annotationPane _ PluggableTextView\r\t\t\t\ton: aChangeList\r\t\t\t\ttext: #annotation\r\t\t\t\taccept: nil\r\t\t\t\treadSelection: nil\r\t\t\t\tmenu: nil.\r\t\t\tannotationPane window: (0 @ 0 extent: 200 @ 10).\r\t\t\ttopView addSubView: annotationPane below: underPane.\r\t\t\tunderPane _ annotationPane .\r\t\t\tcodeHeight _ codeHeight - annoHeight].\r\r\taChangeList wantsOptionalButtons\r\t\tifTrue:\r\t\t\t[buttonsView _ aChangeList optionalButtonsView.\r\t\t\tbuttonsView borderWidth: 1.\r\t\t\ttopView addSubView: buttonsView  below: underPane.\r\t\t\tunderPane _ buttonsView.\r\t\t\tcodeHeight _ codeHeight - optButtonHeight].\r\r\taBrowserCodeView _ PluggableTextView\r\t\t\ton: aChangeList\r\t\t\ttext: #contents\r\t\t\taccept: #contents:\r\t\t\treadSelection: #contentsSelection\r\t\t\tmenu: #codePaneMenu:shifted:.\r\taBrowserCodeView scrollingView\r\t\t\tcontroller: ReadOnlyTextController new.\r\taBrowserCodeView\r\t\t\twindow: (0 @ 0 extent: 200 @ codeHeight).\r\ttopView addSubView: aBrowserCodeView below: underPane.\r\r\ttopView controller open.! !\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 7/17/2002 11:37'!\rchangeSetListKey: aChar from: view\r\t\"Respond to a Command key.  I am a model with a listView that has a list of changeSets.\"\r\r\taChar == $b ifTrue: [^ self browseChangeSet].\r\taChar == $B ifTrue: [^ self openChangeSetBrowser].\r\taChar == $c ifTrue: [^ self copyAllToOther].\r\taChar == $D ifTrue: [^ self toggleDiffing]. \r\taChar == $f ifTrue: [^ self findCngSet].\r\taChar == $m ifTrue: [^ self newCurrent].\r\taChar == $n ifTrue: [^ self newSet].\r\taChar == $o ifTrue: [^ self fileOut].\r\taChar == $p ifTrue: [^ self addPreamble].\r\taChar == $r ifTrue: [^ self rename].\r\taChar == $s ifTrue: [^ self chooseChangeSetCategory].\r\taChar == $x ifTrue: [^ self remove].\r\taChar == $- ifTrue: [^ self subtractOtherSide].\r\r\t^ self messageListKey: aChar from: view! !\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'BG 10/29/2003 08:09'!\rchangeSetMenu: aMenu shifted: isShifted \r\t\"Set up aMenu to hold commands for the change-set-list pane.  This could be for a single or double changeSorter\"\r\r\tisShifted ifTrue: [^ self shiftedChangeSetMenu: aMenu].\r\tSmalltalk isMorphic\r\t\tifTrue:\r\t\t\t[]\r\t\tifFalse:\r\t\t\t[aMenu title: 'Change Set:\r' , myChangeSet name].\r\r\taMenu add: 'make changes go to me (m)' action: #newCurrent.\r\taMenu addLine.\r\taMenu add: 'new change set... (n)' action: #newSet.\r\taMenu add: 'find...(f)' action: #findCngSet.\r\taMenu add: 'show category... (s)' action:  #chooseChangeSetCategory.\r\taMenu balloonTextForLastItem:\r'Lets you choose which change sets should be listed in this change sorter'.\r\taMenu add: 'select change set...' action: #chooseCngSet.\r\taMenu addLine.\r\taMenu add: 'rename change set (r)' action: #rename.\r\taMenu add: 'file out (o)' action: #fileOut.\r\"\taMenu add: 'mail to list' action: #mailOut. \"\r\taMenu add: 'browse methods (b)' action: #browseChangeSet.\r\taMenu add: 'browse change set (B)' action: #openChangeSetBrowser.\r\taMenu addLine.\r\tparent\r\t\tifNotNil: \r\t\t\t[aMenu add: 'copy all to other side (c)' action: #copyAllToOther.\r\t\t\taMenu add: 'submerge into other side' action: #submergeIntoOtherSide.\r\t\t\taMenu add: 'subtract other side (-)' action: #subtractOtherSide.\r\t\t\taMenu addLine].\r\tmyChangeSet hasPreamble\r\t\tifTrue: \r\t\t\t[aMenu add: 'edit preamble (p)' action: #addPreamble.\r\t\t\taMenu add: 'remove preamble' action: #removePreamble]\r\t\tifFalse: [aMenu add: 'add preamble (p)' action: #addPreamble].\r\tmyChangeSet hasPostscript\r\t\tifTrue: \r\t\t\t[aMenu add: 'edit postscript...' action: #editPostscript.\r\t\t\taMenu add: 'remove postscript' action: #removePostscript]\r\t\tifFalse: [aMenu add: 'add postscript...' action: #editPostscript].\r\taMenu addLine.\r\r\taMenu add: 'category functions...' action: #offerCategorySubmenu.\r\taMenu balloonTextForLastItem:\r'Various commands relating to change-set-categories'.\r\taMenu addLine.\r\r\r\taMenu add: 'destroy change set (x)' action: #remove.\r\taMenu addLine.\r\taMenu add: 'more...' action: #offerShiftedChangeSetMenu.\r\t^ aMenu! !\r!ChangeSorter methodsFor: 'class list' stamp: 'ssa 1/5/2010 21:28'!\rclassListKey: aChar from: view\r\t\"Respond to a Command key in the class-list pane.\"\r\r\taChar == $x ifTrue: [^ self removeClass].\r\taChar == $d ifTrue: [^ self forgetClass]. \r\taChar == $m ifTrue: [^ self moveClassToOther]. \r\r\t^ self messageListKey: aChar from: view \"picks up b,h,p\"! !\r!ChangeSorter methodsFor: 'class list' stamp: 'ssa 1/5/2010 21:24'!\rclassListMenu: aMenu shifted: shifted\r\t\"Fill aMenu with items appropriate for the class list\"\r\r\taMenu title: 'class list'.\r\t(parent notNil and: [shifted not])\r\t\tifTrue: [aMenu addList: #( \"These two only apply to dual change sorters\"\r\t\t\t('copy class chgs to other side'\t\t\tcopyClassToOther)\t\r\t\t\t('move class chgs to other side (m)'\t\t\tmoveClassToOther)\r\t\t\t('copy  chgs to other side from classes matching...'\t\t\tcopyClassesToOtherMatching)\t\r\t\t\t('move  chgs to other side from classes matching...'\t\t\tmoveClassesToOtherMatching)\t\r\t\t\t)].\r\r\taMenu addList: (shifted\r\t\tifFalse: [#(\r\t\t\t-\r\t\t\t('delete class from change set (d)'\t\tforgetClass)\r\t\t\t('remove class from system (x)'\t\t\tremoveClass)\r\t\t\t-\r\t\t\t('browse full (b)'\t\t\t\t\t\tbrowseMethodFull)\r\t\t\t('browse hierarchy (h)'\t\t\t\t\tspawnHierarchy)\r\t\t\t('browse protocol (p)'\t\t\t\t\tbrowseFullProtocol)\r\t\t\t-\r\t\t\t('printOut'\t\t\t\t\t\t\t\tprintOutClass)\r\t\t\t('fileOut'\t\t\t\t\t\t\t\tfileOutClass)\r\t\t\t-\r\t\t\t('inst var refs...'\t\t\t\t\t\tbrowseInstVarRefs)\r\t\t\t('inst var defs...'\t\t\t\t\t\tbrowseInstVarDefs)\r\t\t\t('class var refs...'\t\t\t\t\t\tbrowseClassVarRefs)\r\t\t\t('class vars'\t\t\t\t\t\t\t\tbrowseClassVariables)\r\t\t\t('class refs (N)'\t\t\t\t\t\t\tbrowseClassRefs)\r\t\t\t-\r\t\t\t('more...'\t\t\t\t\t\t\t\tofferShiftedClassListMenu))]\r\r\t\tifTrue: [#(\r\t\t\t-\r\t\t\t('unsent methods'\t\t\t\t\t\tbrowseUnusedMethods)\r\t\t\t('unreferenced inst vars'\t\t\t\tshowUnreferencedInstVars)\r\t\t\t('unreferenced class vars'\t\t\t\tshowUnreferencedClassVars)\r\t\t\t-\r\t\t\t('sample instance'\t\t\t\t\t\tmakeSampleInstance)\r\t\t\t('inspect instances'\t\t\t\t\t\tinspectInstances)\r\t\t\t('inspect subinstances'\t\t\t\t\tinspectSubInstances)\r\t\t\t-\r\t\t\t('more...'\t\t\t\t\t\t\t\tofferUnshiftedClassListMenu ))]).\r\t^ aMenu! !\r!ChangeSorter methodsFor: 'class list' stamp: 'ssa 1/5/2010 21:13'!\rcopyClassesToOtherMatching\r\t\"Adsk the user for a pattern.  Copy matching changes from this changeset in the other changeSet\"\r\r\t| otherSorter otherChangeSet pattern classNamesToCopy |\r\tself checkThatSidesDiffer: [^ self halt].\r\tself okToChange ifFalse: [^ self halt].\r\totherSorter _ parent other: self.\r\totherChangeSet _ otherSorter changeSet.\r\r\tpattern _ FillInTheBlank request: 'Enter a pattern to match to the class to copy changes:\r# = single character wildcard\r* = many character wildcard'. ''.\r\r\tpattern isEmpty ifTrue: [^ self ].\r\r\tclassNamesToCopy _ OrderedCollection new.\r\tself changeSet changedClassNames   do: [:nm | (pattern match: nm) ifTrue:[classNamesToCopy add: nm]].\r\tclassNamesToCopy  do:[:clsnm|\r\t\totherChangeSet absorbClass: clsnm from: myChangeSet].\r\totherSorter showChangeSet: otherChangeSet.! !\r!ChangeSorter methodsFor: 'class list' stamp: 'ssa 1/5/2010 21:22'!\rmoveClassesToOtherMatching\r\t\"Adsk the user for a pattern.  Move matching changes from this changeset in the other changeSet\"\r\r\t| otherSorter otherChangeSet pattern classNamesToCopy |\r\tself checkThatSidesDiffer: [^ self halt].\r\tself okToChange ifFalse: [^ self halt].\r\totherSorter _ parent other: self.\r\totherChangeSet _ otherSorter changeSet.\r\r\tpattern _ FillInTheBlank request: 'Enter a pattern to match to the class to copy changes:\r# = single character wildcard\r* = many character wildcard'. ''.\r\r\tpattern isEmpty ifTrue: [^ self ].\r\r\tclassNamesToCopy _ OrderedCollection new.\r\tself changeSet changedClassNames   do: [:nm | (pattern match: nm) ifTrue:[classNamesToCopy add: nm]].\r\tclassNamesToCopy  do:[:clsnm|\r\t\totherChangeSet absorbClass: clsnm from: myChangeSet.\r\t\t myChangeSet removeClassChanges: clsnm].\r\tcurrentClassName _ nil.\r\t\tcurrentSelector _ nil.\r\t\tself showChangeSet: myChangeSet.\r\totherSorter showChangeSet: otherChangeSet.! !\rObject subclass: #Benchmark\r\tinstanceVariableNames: 'dummy verboseTranscript reporting reportStream fromList'\r\tclassVariableNames: 'Outputs StandardTests'\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Testing'!\r!Benchmark commentStamp: 'ssa 8/19/2008 22:14'!\rBenchmark testStandardToFile: (FileStream fileNamed: 'test1.timing').\rBenchmark testStandardToFile: (FileStream fileNamed: 'test2.timing').\r\rBenchmark new\r\t\tcompareOldTimes: 'test1.timing'\r\t\ttoNewTimes: 'test2.timing'\r\t\toutputTo: 'compare1-2.timing'.\r\rBenchmark new displayOutputNamed: 'compare1-2.timing'\r\r\r--------------original comment follows-------------------------------\r\rClass Benchmark contains facilities for timing the performance of your system and reporting the results.\r\rThere are built-in methods for timing certain activities that occur frequently in using Smalltalk-80.  There are also facilities for timing the execution of most byte codes.\r\rIt is intended that comparison of timing information between implementations and over time will allow implementors to discover where their systems could stand improvement and to gauge the value of intended performance enhancements.\r\rThe main interface to these facilities is through sending the messsage\r\tBenchmark new test: aBlock labeled: aLabel repeated: howManyTimes.\rThis will cause howManyTimes executions of aBlock and report the results, using aLabel for ease of identification.\r\rThe results can be reported in several different ways.  The default is to print a fairly verbose report in the Transcript.  But the reporting mode can be altered by sending the Benchmark which is going to perform a given test the message setOutputParameters.  This gives you the option of directing the report to a file or an internal stream and also of shortening the feedback in the Transcript.  The system automatically invites you to respecify the output parameters (e.g. naming a new output report file) whenever you test more than one thing at a time, using the message testList: (as in testStandardTests below).\r\rTry an example.  To time your system's performance of simple addition, say\r\tBenchmark new test3plus4\ror to time pushing an instance variable onto the stack, say\r\tBenchmark new testLoadInstVar.\r\rIf you had wished to print the results on a file or internal stream, you could have said\r\tBenchmark new setOutputParameters testLoadInstVar.\r\rIf you look at the code for these methods (e.g. testLoadInstVar), you will notice that it does a few things that you didn't want to time, such as sending the message ==, or popping things off the stack.  This is to make the compiler happy or to keep the stack from overflowing.  So you may want to subtract this stuff out.  (Use systems of equations.  Be clever!!)\r\rThe message category \"macro operations\" contains methods for timing more involved activities such as compiling, decompiling, editing text, formatting text, etc.\r\rThere is a message to class Benchmark which will invoke all the built-in benchmarks sequentially.  Say\r\tBenchmark testStandardTests.\r\rThere are also facilities for examining or automatically comparing the output files or streams generated by testing a bunch of benchmarks sequentially.  See the \"output\" category.  Be sure to read the comment to the streamsRatherThanFiles code.\r\rHave fun and share your results with a friend.\r!\rMouseMenuController subclass: #RVMAspectLabelController\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Generic'!\rObject subclass: #RVMBarrier\r\tinstanceVariableNames: 'interlock waitSema signalsNeededToPass'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Misc'!\rMouseMenuController subclass: #RVMButtonController\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Generic'!\rMouseMenuController subclass: #RVMCanvasController\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'Marker'\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-TraceBased'!\rMouseMenuController subclass: #RVMCheckBoxController\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Generic'!\rMouseMenuController subclass: #RVMColorButtonController\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Generic'!\rMouseMenuController subclass: #RVMColorScaleController\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-TileBased'!\rMouseMenuController subclass: #RVMCoreIndexController\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Generic'!\rMouseMenuController subclass: #RVMGridLocationController\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Generic'!\rMouseMenuController subclass: #RVMGroupLocatorController\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Locators'!\rMouseMenuController subclass: #RVMKiviatController\r\tinstanceVariableNames: 'scalerAdjusters'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Kiviat'!\rMouseMenuController subclass: #RVMMultiAspectKiviatController\r\tinstanceVariableNames: 'scalerAdjusters'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Kiviat'!\rMouseMenuController subclass: #RVMMultiAspectStripChartController\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Leftovers'!\rRVMGroupLocatorController subclass: #RVMMultiGroupLocatorController\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Locators'!\rObject subclass: #RVMObject\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Monitoring'!\rRVMObject subclass: #RVMAllCPUCoreStats\r\tinstanceVariableNames: 'coreStats rawData'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Monitoring'!\rRVMObject subclass: #RVMCPUCoreStats\r\tinstanceVariableNames: 'rawData millisecondsSinceLastQuery cyclesSinceLastQuery sendTallies receiveTally memorySystemStats squeakInterpreterStats messageNames myX myY myRank objectTableStats'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Monitoring'!\rRVMObject subclass: #RVMCircularCollection\r\tinstanceVariableNames: 'array begin end numberOfElements size nextIndex'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-TraceBased'!\rRVMObject subclass: #RVMColoredDataScaler\r\tinstanceVariableNames: 'scaler color'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Generic'!\rRVMObject subclass: #RVMCoreMessageTally\r\tinstanceVariableNames: 'talliesInOrderCache allocateOrRecycleContextMessage allocateOrRecycleContextJustTestingMessage recycleContextIfPossibleMessage flushInterpreterCachesMessage flushMethodCacheMessage flushByMethodMessage flushSelectiveMessage addObjectFromSnapshotMessage updateWholeInterpreterMessage updateEnoughInterpreterToTransferControlMessage updateEnoughInterpreterToTransferControlJustTestingMessage updateEnoughInterpreterToTransferControlJustTestingResponse zapUnusedPortionOfHeapMessage zapUnusedPortionOfHeapResponse verifyInterpreterAndHeapMessage doAllRootsThereMessage doAllRootsThereResponse doAllRootsHereMessage hereIsARootResponse newValueForOopMessage noMoreRootsResponse scanCompactOrMakeFreeObjectsMessage scanCompactOrMakeFreeObjectsResponse returnContextMessage runPrimitiveMessage runPrimitiveJustTestingMessage runPrimitiveResponse loadFunctionFromPluginMessage loadFunctionFromPluginResponse broadcastInterpreterDoublewordMessage broadcastInterpreterWordMessage broadcastInterpreterBoolMessage sampleOneCoreMessage sampleOneCoreResponse initiateBarrierMessage respondToBarrierMessage aboutToWriteReadMostlyMemoryMessage aboutToWriteReadMostlyMemoryResponse wroteReadMostlyMemoryMessage flushFreeContextsMessage enforceCoherenceBeforeSenderStoresIntoAllHeapsMessage enforceCoherenceBeforeSenderStoresIntoAllHeapsResponse enforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapMessage enforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapResponse enforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapMessage enforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapResponse rawData'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Monitoring'!\rRVMObject subclass: #RVMDataScaler\r\tinstanceVariableNames: 'aspect min max range observedMin observedMax lastObserved automaticScaling outOfRangeDetected pinAtZero minLocked maxLocked'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Generic'!\rRVMObject subclass: #RVMExperiment\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Experiments'!\rRVMObject subclass: #RVMGroupStats\r\tinstanceVariableNames: 'mainX mainY mainRank groupSize remaining width height'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Monitoring'!\rRVMObject subclass: #RVMHeapStats\r\tinstanceVariableNames: 'readWrite bytesUsed bytesLeft allocationsSinceLastQuery compactionsSinceLastQuery'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Monitoring'!\rRVMHeapStats subclass: #RVMGlobalHeapStats\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Leftovers'!\rRVMHeapStats subclass: #RVMLocalHeapStats\r\tinstanceVariableNames: 'objectsFetchedSinceLastQuery overlyLargeFetchOrAllocationRequestsDeniedSinceLastQuery failedFetchRequestsSinceLastQuery objectsFlushedSinceLastQuery'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Leftovers'!\rRVMObject subclass: #RVMMemorySystemStats\r\tinstanceVariableNames: 'gcCount gcMilliseconds gcCycles readWriteHeapStats readMostlyHeapStats'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Monitoring'!\rRVMObject subclass: #RVMMonitor\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'DelayTiming LastSample Listeners RecordingFile RecordingMode SampleLimit Samples SamplingProcess ShowHeartbeat ShowTestAspects TurboSampling'\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Monitoring'!\rRVMObject subclass: #RVMMulticoreSample\r\tinstanceVariableNames: 'rawData messageNames cpuCoreStats groupStats runMask  fence processInstanceCount'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Monitoring'!\r!RVMMulticoreSample commentStamp: 'ssa 8/19/2008 11:52'!\rtwo ways to capture a sample:\r\tRVMMulticoreSample captureSlow - uses a flexible but slower approach to handle data pairs\r\t            \"            captureFast - fast, order dependent version (6x faster)\r\t            \"            capture - calls captureFast\r\r\"performance test\"\rresults := OrderedCollection new.\r100 timesRepeat:[results add: (Time millisecondsToRun:[1000 timesRepeat:[RVMMulticoreSample captureFast]])/1000.0].\rresults average \r\rcaptureFast = 0.13813 \rcaptureSlow = 0.80164\r\rMessageTally spyOn:[1000 timesRepeat:[RVMMulticoreSample captureFast]]\rshows a 6x improvement over captureSlow!\rRVMObject subclass: #RVMObjectCoordinate\r\tinstanceVariableNames: 'object mutability activity coreIndex coreCoordinate'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Locators'!\rRVMObject subclass: #RVMObjectTableStats\r\tinstanceVariableNames: 'entryCount allocatedEntryCount entriesFreedSinceLastQuery allocationsSinceLastQuery'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Monitoring'!\rPluggableTextView subclass: #RVMPluggableTextView\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Generic'!\rObject subclass: #RVMProcessSwarm\r\tinstanceVariableNames: 'processes'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Testing'!\r!RVMProcessSwarm commentStamp: 'ssa 4/7/2009 13:37'!\rRVMProcessSwarm newRunning: [1000 timesRepeat:[10 factorial]].\r\r56 timesRepeat:[1000 timesRepeat:[10 factorial]]\r\r(Time millisecondsToRun:[1000 timesRepeat:[10 factorial]])/1000.0 ====> 1.5ms per 10 factorial\r(Time millisecondsToRun:[1000 timesRepeat:[10 factorial]]) ====> 1587ms per job\r(Time millisecondsToRun:[10 timesRepeat:[56 timesRepeat:[1000 timesRepeat:[10 factorial]]]])/10.0 \r 87902.1\r85059.2\r91263\r\rproc _ [RVMTester print: ((Time millisecondsToRun:[10 timesRepeat:[56 timesRepeat:[1000 timesRepeat:[10 factorial]]]])/10.0) printString] copy fixTemps newProcess.\rproc coreMask: (1 bitShift: 4).\rproc resume.\r\r\r\r\rProcess allInstances collect:[:proc| proc coreMask]    \rProcess instanceCount\rProcess allInstances do:[:proc| proc coreMask:(1 bitShift:27)]   \r[:x | x _ 10. [x] value] value: 2\r\r\r\r\rArray locate.\rcoord _ Array asObjectCoordinate.\rdelay _ Delay forMilliseconds: 500.\r0 to: 55 do:[:coreIndex|delay wait. coord moveToCore: coreIndex]\r\rBenchmark new testCompiler\r\rProcess allInstancesDo:[:each| each coreMask: nil].\r\rRVMTester runOnlyOn: 8.\rRVMTester runOnAll\r\rcount _ 0.\r[[true] whileTrue:[0 to: 55 do: [:i | Processor thisProcess coreMask: (1 bitShift: i).\r\tProcessor  yield.\r\t10 factorial.\r\tRVMTester print: '[',count printString,'] finished on core ',Processor thisProcess hostCore printString].\rcount _ count +1]]fork\r\rProcess allInstances collect:[:e| e coreMask]\r\r\rRVMTester moveAllToReadMostlyHeaps\r\r  \"RVMProcessSwarm newRunning: [3000 factorial] onCores:(1 to: 10)\"\r  \"RVMProcessSwarm newRunning: [RVMTester print: Processor thisProcess hostCore factorial printString] onCores:#(1 3 5 7)\"\r  \"RVMProcessSwarm newRunning: [3000 factorial.  RVMTester print: Processor thisProcess hostCore  printString,' done'] onCores:(1 to: 10),(40 to:50) \"!\rRVMObject subclass: #RVMSample\r\tinstanceVariableNames: 'rawData millisecondsSinceLastSample cyclesSinceLastSample globalHeapStats localHeapStats objectTableStats squeakInterpreterStats'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Leftovers'!\rRVMObject subclass: #RVMSampleFlags\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Monitoring'!\rRVMObject subclass: #RVMSqueakInterpreterStats\r\tinstanceVariableNames: 'bytecodesExecuted yieldCount millisecondsRunning millisecondsWaiting cyclesRunning cyclesWaiting contextChangeCount interruptCheckCount unforcedInterruptCheckCount'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Monitoring'!\rColorSystemView subclass: #RVMStandardSystemView\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Generic'!\rRVMCanvasController subclass: #RVMStripChartController\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-TraceBased'!\rMouseMenuController subclass: #RVMStripChartScaleController\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-TraceBased'!\rRVMObject subclass: #RVMStripChartTrace\r\tinstanceVariableNames: 'rawData scaledData scaler color pen muted'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-TraceBased'!\rRVMStripChartTrace subclass: #RVMAspectTrace\r\tinstanceVariableNames: 'aspect'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-TraceBased'!\rRVMAspectTrace subclass: #RVMCoreAspectTrace\r\tinstanceVariableNames: 'coreIndex'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-TraceBased'!\rObject subclass: #RVMTest\r\tinstanceVariableNames: 'name environment testBlock setUpBlock tearDownBlock assertionBlock lastResult runLog assertions'\r\tclassVariableNames: 'DebugOnFail'\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Testing'!\r!RVMTest commentStamp: 'ssa 7/7/2010 14:09'!\rSee \"examples\" in my class!\rObject subclass: #RVMTestResult\r\tinstanceVariableNames: 'test result assertion'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Testing'!\rObject subclass: #RVMTestSuite\r\tinstanceVariableNames: 'tests'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Testing'!\rRVMObject subclass: #RVMTester\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Testing'!\rRVMTestSuite subclass: #Sly3SyntaxTests\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Sly3'!\r!RVMTester commentStamp: 'ssa 7/7/2010 14:09'!\rThis was the original pargking lot for various VM testing methods!\rMouseMenuController subclass: #RVMTileGridController\r\tinstanceVariableNames: 'process'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-TileBased'!\rRVMTileGridController subclass: #RVMTileStripChartController\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-TileBased'!\rMouseMenuController subclass: #RVMTraceUIHolderController\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-TraceBased'!\rMouseMenuController subclass: #RVMValueController\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Generic'!\rMouseMenuController subclass: #RVMValueEditorController\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Generic'!\rView subclass: #RVMView\r\tinstanceVariableNames: 'okToDisplay'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Generic'!\rRVMView subclass: #RVMButtonView\r\tinstanceVariableNames: 'label action style'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Generic'!\rRVMView subclass: #RVMCanvasView\r\tinstanceVariableNames: 'canvas dirty offset extent'\r\tclassVariableNames: 'Marker'\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-TraceBased'!\rRVMView subclass: #RVMCheckBoxView\r\tinstanceVariableNames: 'label checked checkStateAction checkAction uncheckAction labelForm checkedBoxForm uncheckedBoxForm'\r\tclassVariableNames: 'TestState'\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Generic'!\rRVMCheckBoxView subclass: #RVMCheckBoxOnlyView\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Generic'!\rRVMView subclass: #RVMColorButtonView\r\tinstanceVariableNames: 'color colorGetter colorSetter'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Generic'!\rRVMCanvasView subclass: #RVMColorScaleView\r\tinstanceVariableNames: 'scalerSource colorsSource aspectSource orientation aspectLabel adjustScaleBox usesScaler'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-TileBased'!\rRVMView subclass: #RVMColoredDataScalerView\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Generic'!\rRVMView subclass: #RVMExpressionEditorView\r\tinstanceVariableNames: 'sourceString'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Generic'!\rRVMView subclass: #RVMGridLocationView\r\tinstanceVariableNames: 'pointGetter extentGetter pointSetter canvas'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Generic'!\rRVMView subclass: #RVMGroupLocatorView\r\tinstanceVariableNames: 'objectsSource boxes color countsPerCore backgroundCanvas canvas'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Locators'!\rRVMView subclass: #RVMKiviatView\r\tinstanceVariableNames: 'spokePens aspect spokeColor webColor scaler canvas backgroundCanvas webPen rescaleCounter lastAverage lastTotal drawingBackground firstDisplay rescaleCounterDefault adjustScaleBox blinker'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Kiviat'!\r!RVMKiviatView commentStamp: '<historical>'!\rI'm a kiviat chart for displaying core aspect data!\rRVMView subclass: #RVMLabelView\r\tinstanceVariableNames: 'label'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Generic'!\rRVMLabelView subclass: #RVMAspectLabelView\r\tinstanceVariableNames: 'getAspectsSelector getAspectSelector setAspectSelector lastAspect'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Generic'!\rRVMLabelView subclass: #RVMCoreIndexView\r\tinstanceVariableNames: 'getCoreIndex setCoreIndex getAvailableIndicies'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Generic'!\rRVMView subclass: #RVMMinMaxView\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Generic'!\rRVMView subclass: #RVMMultiAspectKiviatView\r\tinstanceVariableNames: 'spokePens aspects spokeColor webColor scalers canvas backgroundCanvas webPen rescaleCounter drawingBackground firstDisplay rescaleCounterDefault adjustScaleBox coreIndicies colors indexIcons blinker'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Kiviat'!\r!RVMMultiAspectKiviatView commentStamp: '<historical>'!\rI'm a kiviat chart for displaying core aspect data!\rRVMView subclass: #RVMMultiAspectStripChartView\r\tinstanceVariableNames: 'aspects chart dotSize data sampleSource coreIndex scalers'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Leftovers'!\rRVMGroupLocatorView subclass: #RVMMultiGroupLocatorView\r\tinstanceVariableNames: 'sources counts colors'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Locators'!\rRVMKiviatView subclass: #RVMMultiKiviatView\r\tinstanceVariableNames: 'aspects colors scalers lastTotals lastAverages commonScale pinMinAtZero'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Kiviat'!\rRVMView subclass: #RVMObjectCoordinateView\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Locators'!\rRVMCheckBoxView subclass: #RVMRadioButtonView\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Generic'!\rRVMCanvasView subclass: #RVMStripChartScaleView\r\tinstanceVariableNames: 'stripChart currentTrace uiHolder adjustScaleBox'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-TraceBased'!\rRVMCanvasView subclass: #RVMStripChartView\r\tinstanceVariableNames: 'traces rescaleCounter'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-TraceBased'!\rRVMView subclass: #RVMTileGridView\r\tinstanceVariableNames: 'canvas scale tiles colors maxValue minValue numberOfColors sample data aspect showProcessState'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-TileBased'!\rRVMTileGridView subclass: #RVMTileGridScalerView\r\tinstanceVariableNames: 'scaler rescaleCounter'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-TileBased'!\rRVMTileGridView subclass: #RVMTileStripChartView\r\tinstanceVariableNames: 'previousData boxSize box boxes count chart'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-TileBased'!\rRVMTileStripChartView subclass: #RVMScanningStripChartView\r\tinstanceVariableNames: 'scanner scannerLocation'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-TileBased'!\rRVMScanningStripChartView subclass: #RVMAbsScanningStripChartView\r\tinstanceVariableNames: 'scaler'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-TileBased'!\rRVMTileStripChartView subclass: #RVMTileStripChartScalerView\r\tinstanceVariableNames: 'scaler rescaleCounter'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-TileBased'!\rRVMView subclass: #RVMTraceUIHolderView\r\tinstanceVariableNames: 'stripChart'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-TraceBased'!\rRVMView subclass: #RVMValueView\r\tinstanceVariableNames: 'label valueGetter valueSetter'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Generic'!\rRVMValueView subclass: #RVMValueEditorView\r\tinstanceVariableNames: 'box operation lockBox valueBox operationBox oneBox tenBox hundredBox zeroBox prefixBox lockGetter lockSetter canvas lastValue lastOp lastLocked'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-UI-Generic'!\r!Benchmark methodsFor: 'load and popStore' stamp: ''!\rtestLoadInstVar\r\tdummy _ 1.\r\tself test: [dummy == dummy. dummy == dummy.\r\t\t\t  dummy == dummy. dummy == dummy.\r\t\t\t  dummy == dummy. dummy == dummy.\r\t\t\t  dummy == dummy. dummy == dummy.\r\t\t\t  dummy == dummy. dummy == dummy. nil]\r\t\tlabeled: 'load an instance variable, 20 times' repeated: 10000\r\r\t\"Benchmark new testLoadInstVar\"! !\r!Benchmark methodsFor: 'load and popStore' stamp: ''!\rtestLoadLiteralIndirect\r\tself test: [Point == Point. Point == Point.\r\t\t\t  Point == Point. Point == Point.\r\t\t\t  Point == Point. Point == Point.\r\t\t\t  Point == Point. Point == Point.\r\t\t\t  Point == Point. Point == Point. nil]\r\t\tlabeled: 'load literal indirect (overflow refct), 20 times' repeated: 10000\r\r\t\"Benchmark new testLoadLiteralIndirect\"! !\r!Benchmark methodsFor: 'load and popStore' stamp: ''!\rtestLoadLiteralNRef\r\tself test: [3 == 3. 3 == 3. 3 == 3. 3 == 3. 3 == 3.\r\t\t\t  3 == 3. 3 == 3. 3 == 3. 3 == 3. 3 == 3. nil]\r\t\tlabeled: 'load nonRefcounted literal, 20 times' repeated: 10000\r\r\t\"Benchmark new testLoadLiteralNRef\"! !\r!Benchmark methodsFor: 'load and popStore' stamp: ''!\rtestLoadQuickConstant\r\tself test: [1 == 1. 1 == 1. 1 == 1. 1 == 1. 1 == 1.\r\t\t\t  1 == 1. 1 == 1. 1 == 1. 1 == 1. 1 == 1.\r\t\t\t  1 == 1. 1 == 1. 1 == 1. 1 == 1. 1 == 1.\r\t\t\t  1 == 1. 1 == 1. 1 == 1. 1 == 1. 1 == 1. nil]\r\t\tlabeled: 'load 1, 40 times; send ==, 20 times' repeated: 10000\r\r\t\"Benchmark new testLoadQuickConstant\"! !\r!Benchmark methodsFor: 'load and popStore' stamp: ''!\rtestLoadTempNRef\r\t| temp |\r\ttemp _ 1.\r\tself test: [temp == temp. temp == temp.\r\t\t\t  temp == temp. temp == temp.\r\t\t\t  temp == temp. temp == temp.\r\t\t\t  temp == temp. temp == temp.\r\t\t\t  temp == temp. temp == temp. nil]\r\t\tlabeled: 'load 1 as a temp, 20 times' repeated: 10000\r\r\t\"Benchmark new testLoadTempNRef\"! !\r!Benchmark methodsFor: 'load and popStore' stamp: ''!\rtestLoadTempRef\r\t| temp |\r\ttemp _ 0@0.\r\tself test: [temp == temp. temp == temp.\r\t\t\t  temp == temp. temp == temp.\r\t\t\t  temp == temp. temp == temp.\r\t\t\t  temp == temp. temp == temp.\r\t\t\t  temp == temp. temp == temp. nil]\r\t\tlabeled: 'load 0@0, 20 times' repeated: 10000\r\r\t\"Benchmark new testLoadTempRef\"! !\r!Benchmark methodsFor: 'load and popStore' stamp: ''!\rtestPopStoreInstVar\r\tself test: [dummy _ 1. dummy _ 1. dummy _ 1. dummy _ 1. dummy _ 1.\r\t\t\t  dummy _ 1. dummy _ 1. dummy _ 1. dummy _ 1. dummy _ 1.\r\t\t\t  dummy _ 1. dummy _ 1. dummy _ 1. dummy _ 1. dummy _ 1.\r\t\t\t  dummy _ 1. dummy _ 1. dummy _ 1. dummy _ 1. dummy _ 1. nil]\r\t\tlabeled: 'store into an instance variable, 20 times' repeated: 10000\r\r\t\"Benchmark new testPopStoreInstVar\"! !\r!Benchmark methodsFor: 'load and popStore' stamp: ''!\rtestPopStoreTemp\r\t| temp |\r\tself test: [temp _ 1. temp _ 1. temp _ 1. temp _ 1. temp _ 1.\r\t\t\t  temp _ 1. temp _ 1. temp _ 1. temp _ 1. temp _ 1.\r\t\t\t  temp _ 1. temp _ 1. temp _ 1. temp _ 1. temp _ 1.\r\t\t\t  temp _ 1. temp _ 1. temp _ 1. temp _ 1. temp _ 1. nil]\r\t\tlabeled: 'store into a temp, 20 times' repeated: 10000\r\r\t\"Benchmark new testPopStoreTemp\"! !\r!Benchmark methodsFor: 'arithmetic' stamp: ''!\rtest16bitArith\r\t| twentyK |\r\ttwentyK _ 20000.\r\tself test: [twentyK+twentyK. twentyK+twentyK.\r\t\t\t  twentyK+twentyK. twentyK+twentyK.\r\t\t\t  twentyK+twentyK. twentyK+twentyK.\r\t\t\t  twentyK+twentyK. twentyK+twentyK.\r\t\t\t  twentyK+twentyK. twentyK+twentyK. nil]\r\t\tlabeled: 'add 20000 + 20000, 10 times' repeated: 1000\r\r\t\"Benchmark new test16bitArith\"! !\r!Benchmark methodsFor: 'arithmetic' stamp: ''!\rtest3div4\r\tself test: [3//4. 3//4. 3//4. 3//4. 3//4. 3//4. 3//4. 3//4. 3//4. 3//4. nil]\r\t\tlabeled: 'divide 3 by 4, 10 times' repeated: 1000\r\r\t\"Benchmark new test3div4\"! !\r!Benchmark methodsFor: 'arithmetic' stamp: ''!\rtest3lessThan4\r\tself test: [3<4. 3<4. 3<4. 3<4. 3<4. 3<4. 3<4. 3<4. 3<4. 3<4. nil]\r\t\tlabeled: 'test 3 < 4, 10 times' repeated: 10000\r\r\t\"Benchmark new test3lessThan4\"! !\r!Benchmark methodsFor: 'arithmetic' stamp: ''!\rtest3plus4\r\tself test: [3+4. 3+4. 3+4. 3+4. 3+4. 3+4. 3+4. 3+4. 3+4. 3+4. nil]\r\t\tlabeled: 'add 3 + 4, 10 times' repeated: 10000\r\r\t\"Benchmark new test3plus4\"! !\r!Benchmark methodsFor: 'arithmetic' stamp: ''!\rtest3times4\r\tself test: [3*4. 3*4. 3*4. 3*4. 3*4. 3*4. 3*4. 3*4. 3*4. 3*4. nil]\r\t\tlabeled: 'multiply 3 * 4, 10 times' repeated: 10000\r\r\t\"Benchmark new test3times4\"! !\r!Benchmark methodsFor: 'arithmetic' stamp: ''!\rtestLargeIntArith\r\t| eightyK |\r\teightyK _ 80000.\r\tself test: [eightyK+eightyK. eightyK+eightyK.\r\t\t\t  eightyK+eightyK. eightyK+eightyK.\r\t\t\t  eightyK+eightyK. eightyK+eightyK.\r\t\t\t  eightyK+eightyK. eightyK+eightyK.\r\t\t\t  eightyK+eightyK. eightyK+eightyK. nil]\r\t\tlabeled: 'add 80000 + 80000, 10 times' repeated: 100\r\r\t\"Benchmark new testLargeIntArith\"! !\r!Benchmark methodsFor: 'control' stamp: ''!\rtestActivationReturn\r\tself test:\r\t\t\t[self recur: 14]\r\t\tlabeled: 'activate and return, 32K times' repeated: 1\r\r\t\"Benchmark new testActivationReturn\"! !\r!Benchmark methodsFor: 'control' stamp: ''!\rtestShortBranch\r\tself test: [false ifTrue: [1] ifFalse: [2].\r\t\t\t  false ifTrue: [1] ifFalse: [2].\r\t\t\t  false ifTrue: [1] ifFalse: [2].\r\t\t\t  false ifTrue: [1] ifFalse: [2].\r\t\t\t  false ifTrue: [1] ifFalse: [2].\r\t\t\t  false ifTrue: [1] ifFalse: [2].\r\t\t\t  false ifTrue: [1] ifFalse: [2].\r\t\t\t  false ifTrue: [1] ifFalse: [2].\r\t\t\t  false ifTrue: [1] ifFalse: [2].\r\t\t\t  false ifTrue: [1] ifFalse: [2]. nil]\r\t\tlabeled: 'short branch on false, 10 times' repeated: 10000\r\r\t\"Benchmark new testShortBranch\"! !\r!Benchmark methodsFor: 'control' stamp: ''!\rtestWhileLoop\r\t| temp |\r\tself test: [temp _ 10000.\r\t\t\t  [temp > 0] whileTrue: [temp _ temp - 1].\r\t\t\t  nil]\r\t\tlabeled: 'simple whileLoop, 10000 times through' repeated: 10\r\r\t\"Benchmark new testWhileLoop\"! !\r!Benchmark methodsFor: 'arrays and strings' stamp: ''!\rtestArrayAt\r\t| array index |\r\tarray _ #(1 2 3 4 5 6).\r\tindex _ 4.\r\tself test:\r\t\t\t[array at: index. array at: index. array at: index. array at: index.\r\t\t\t array at: index. array at: index. array at: index. array at: index.\r\t\t\t array at: index. array at: index. array at: index. array at: index.\r\t\t\t array at: index. array at: index. array at: index. array at: index.\r\t\t\t array at: index. array at: index. array at: index. array at: index. nil]\r\t\tlabeled: 'send #at: 20 times (to an array)' repeated: 1000\r\r\t\"Benchmark new testArrayAt\"! !\r!Benchmark methodsFor: 'arrays and strings' stamp: ''!\rtestArrayAtPut\r\t| array index element |\r\tarray _ #(1 2 3 4 5 6).\r\tindex _ 4.\r\telement _ 17.\r\tself test:\r\t\t\t[array at: index put: element. array at: index put: element.\r\t\t\t array at: index put: element. array at: index put: element.\r\t\t\t array at: index put: element. array at: index put: element.\r\t\t\t array at: index put: element. array at: index put: element.\r\t\t\t array at: index put: element. array at: index put: element.\r\t\t\t array at: index put: element. array at: index put: element.\r\t\t\t array at: index put: element. array at: index put: element.\r\t\t\t array at: index put: element. array at: index put: element.\r\t\t\t array at: index put: element. array at: index put: element.\r\t\t\t array at: index put: element. array at: index put: element. nil]\r\t\tlabeled: 'send #at:put: 20 times (to an array)' repeated: 1000\r\r\t\"Benchmark new testArrayAtPut\"! !\r!Benchmark methodsFor: 'arrays and strings' stamp: ''!\rtestSize\r\t| string |\r\tstring _ 'abcde'.\r\tself test:\r\t\t\t[string size. string size. string size. string size. string size.\r\t\t\t string size. string size. string size. string size. string size.\r\t\t\t string size. string size. string size. string size. string size.\r\t\t\t string size. string size. string size. string size. string size. nil]\r\t\tlabeled: 'send #size 20 times (to a string)' repeated: 1000\r\r\t\"Benchmark new testSize\"! !\r!Benchmark methodsFor: 'arrays and strings' stamp: ''!\rtestStringAt\r\t| string index |\r\tstring _ 'abcdefg'.\r\tindex _ 4.\r\tself test:\r\t\t\t[string at: index. string at: index. string at: index. string at: index.\r\t\t\t string at: index. string at: index. string at: index. string at: index.\r\t\t\t string at: index. string at: index. string at: index. string at: index.\r\t\t\t string at: index. string at: index. string at: index. string at: index.\r\t\t\t string at: index. string at: index. string at: index. string at: index. nil]\r\t\tlabeled: 'send #at: 20 times (to a string)' repeated: 1000\r\r\t\"Benchmark new testStringAt\"! !\r!Benchmark methodsFor: 'arrays and strings' stamp: ''!\rtestStringAtPut\r\t| string index char |\r\tstring _ 'abcdefg'.\r\tindex _ 4.\r\tchar _ $q.\r\tself test:\r\t\t\t[string at: index put: char. string at: index put: char.\r\t\t\t string at: index put: char. string at: index put: char.\r\t\t\t string at: index put: char. string at: index put: char.\r\t\t\t string at: index put: char. string at: index put: char.\r\t\t\t string at: index put: char. string at: index put: char.\r\t\t\t string at: index put: char. string at: index put: char.\r\t\t\t string at: index put: char. string at: index put: char.\r\t\t\t string at: index put: char. string at: index put: char.\r\t\t\t string at: index put: char. string at: index put: char.\r\t\t\t string at: index put: char. string at: index put: char. nil]\r\t\tlabeled: 'send #at:put: 20 times (to a string)' repeated: 1000\r\r\t\"Benchmark new testStringAtPut\"! !\r!Benchmark methodsFor: 'primitive byte codes' stamp: ''!\rtestBlockCopy\r\t| tC |\r\ttC _ thisContext.\r\tself test: [tC blockCopy: 0. tC blockCopy: 0. tC blockCopy: 0. tC blockCopy: 0.\r\t\t\t  tC blockCopy: 0. tC blockCopy: 0. tC blockCopy: 0. tC blockCopy: 0.\r\t\t\t  tC blockCopy: 0. tC blockCopy: 0. tC blockCopy: 0. tC blockCopy: 0.\r\t\t\t  tC blockCopy: 0. tC blockCopy: 0. tC blockCopy: 0. tC blockCopy: 0.\r\t\t\t  tC blockCopy: 0. tC blockCopy: 0. tC blockCopy: 0. tC blockCopy: 0. nil]\r\t\tlabeled: 'execute blockCopy: 0, 20 times' repeated: 1000\r\r\t\"Benchmark new testBlockCopy\"! !\r!Benchmark methodsFor: 'primitive byte codes' stamp: ''!\rtestClass\r\t| pt |\r\tpt _ 0@0.\r\tself test:\r\t\t\t[pt class. pt class. pt class. pt class. pt class.\r\t\t\t pt class. pt class. pt class. pt class. pt class.\r\t\t\t pt class. pt class. pt class. pt class. pt class.\r\t\t\t pt class. pt class. pt class. pt class. pt class. nil]\r\t\tlabeled: 'send #class 20 times (to a point)' repeated: 1000\r\r\t\"Benchmark new testClass\"! !\r!Benchmark methodsFor: 'primitive byte codes' stamp: ''!\rtestCreation\r\tself test:\r\t\t\t[Point new. Point new. Point new. Point new. Point new.\r\t\t\t  Point new. Point new. Point new. Point new. Point new.\r\t\t\t  Point new. Point new. Point new. Point new. Point new.\r\t\t\t  Point new. Point new. Point new. Point new. Point new. nil]\r\t\tlabeled: 'create 20 uninitialized points' repeated: 1000\r\r\t\"Benchmark new testCreation\"! !\r!Benchmark methodsFor: 'primitive byte codes' stamp: ''!\rtestEQ\r\t| temp |\r\ttemp _ 1.\r\tself test: [temp == temp == temp == temp == temp ==\r\t\t\t  temp == temp == temp == temp == temp ==\r\t\t\t  temp == temp == temp == temp == temp ==\r\t\t\t  temp == temp == temp == temp == temp. nil]\r\t\tlabeled: 'send ==, 20 times' repeated: 10000\r\r\t\"Benchmark new testEQ\"! !\r!Benchmark methodsFor: 'primitive byte codes' stamp: ''!\rtestLoadThisContext\r\tself test: [thisContext == thisContext. thisContext == thisContext.\r\t\t\t  thisContext == thisContext. thisContext == thisContext.\r\t\t\t  thisContext == thisContext. thisContext == thisContext.\r\t\t\t  thisContext == thisContext. thisContext == thisContext.\r\t\t\t  thisContext == thisContext. thisContext == thisContext. nil]\r\t\tlabeled: 'load thisContext, 20 times' repeated: 10000\r\r\t\"Benchmark new testLoadThisContext\"! !\r!Benchmark methodsFor: 'primitive byte codes' stamp: ''!\rtestPointCreation\r\tself test: [3@4. 3@4. 3@4. 3@4. 3@4. 3@4. 3@4. 3@4. 3@4. 3@4. nil]\r\t\tlabeled: 'create 3@4, 10 times' repeated: 1000\r\r\t\"Benchmark new testPointCreation\"! !\r!Benchmark methodsFor: 'primitive byte codes' stamp: ''!\rtestPointX\r\t| pt |\r\tpt _ 0@0.\r\tself test: [pt x. pt x. pt x. pt x. pt x. pt x. pt x. pt x. pt x. pt x. nil]\r\t\tlabeled: 'execute aPoint x, 10 times' repeated: 10000\r\r\t\"Benchmark new testPointX\"! !\r!Benchmark methodsFor: 'primitive byte codes' stamp: ''!\rtestStreamNext\r\t| strm |\r\tstrm _ ReadStream on: 'abcdefghijklmnopqrstuvwxyz'.\r\tself test: [strm position: 0.\r\t\t\t  strm next. strm next. strm next. strm next.\r\t\t\t  strm next. strm next. strm next. strm next.\r\t\t\t  strm next. strm next. strm next. strm next.\r\t\t\t  strm next. strm next. strm next. strm next.\r\t\t\t  strm next. strm next. strm next. strm next. nil]\r\t\tlabeled: 'execute ReadStream next, 20 times' repeated: 1000\r\r\t\"Benchmark new testStreamNext\"! !\r!Benchmark methodsFor: 'primitive byte codes' stamp: ''!\rtestStreamNextPut\r\t| strm ch |\r\tstrm _ ReadWriteStream on: 'abcdefghijklmnopqrstuvwxyz'.\r\tch _ $q.\r\tself test: [strm position: 0.\r\t\t\t  strm nextPut: ch. strm nextPut: ch. strm nextPut: ch. strm nextPut: ch.\r\t\t\t  strm nextPut: ch. strm nextPut: ch. strm nextPut: ch. strm nextPut: ch.\r\t\t\t  strm nextPut: ch. strm nextPut: ch. strm nextPut: ch. strm nextPut: ch.\r\t\t\t  strm nextPut: ch. strm nextPut: ch. strm nextPut: ch. strm nextPut: ch.\r\t\t\t  strm nextPut: ch. strm nextPut: ch. strm nextPut: ch. strm nextPut: ch. nil]\r\t\tlabeled: 'execute ReadWriteStream nextPut:, 20 times' repeated: 1000\r\r\t\"Benchmark new testStreamNextPut\"! !\r!Benchmark methodsFor: 'primitive byte codes' stamp: ''!\rtestValue\r\t| block |\r\tblock _ [3+4].\r\tself test: [block value. block value. block value. block value.\r\t\t\t  block value. block value. block value. block value.\r\t\t\t  block value. block value. block value. block value.\r\t\t\t  block value. block value. block value. block value.\r\t\t\t  block value. block value. block value. block value. nil]\r\t\tlabeled: 'evaluate the block: (3+4), 20 times' repeated: 1000\r\r\t\"Benchmark new testValue\"! !\r!Benchmark methodsFor: 'primitive methods' stamp: ''!\rtestAsFloat\r\tself test: [1 asFloat. 1 asFloat. 1 asFloat. 1 asFloat. 1 asFloat.\r\t\t\t  1 asFloat. 1 asFloat. 1 asFloat. 1 asFloat. 1 asFloat.\r\t\t\t  1 asFloat. 1 asFloat. 1 asFloat. 1 asFloat. 1 asFloat.\r\t\t\t  1 asFloat. 1 asFloat. 1 asFloat. 1 asFloat. 1 asFloat. nil]\r\t\tlabeled: 'convert 1 to floating point, 20 times' repeated: 100\r\r\t\"Benchmark new testAsFloat\"! !\r!Benchmark methodsFor: 'primitive methods' stamp: 'ssa 8/19/2008 21:08'!\rtestBasicAt\r\t| coll index |\r\tcoll _ Array new: 16.\r\tindex _ 5.\r\tself test:\r\t\t\t[coll basicAt: index. coll basicAt: index. coll basicAt: index. coll basicAt: index.\r\t\t\t coll basicAt: index. coll basicAt: index. coll basicAt: index. coll basicAt: index.\r\t\t\t coll basicAt: index. coll basicAt: index. coll basicAt: index. coll basicAt: index.\r\t\t\t coll basicAt: index. coll basicAt: index. coll basicAt: index. coll basicAt: index.\r\t\t\t coll basicAt: index. coll basicAt: index. coll basicAt: index. coll basicAt: index. nil]\r\t\tlabeled: 'send #basicAt: 20 times (to an array)' repeated: 1000\r\r\t\"Benchmark new testBasicAt\"! !\r!Benchmark methodsFor: 'primitive methods' stamp: 'ssa 8/19/2008 21:09'!\rtestBasicAtPut\r\t| coll index element |\r\tcoll _ Array new: 16.\r\tindex _ 5.\r\telement _ 17.\r\tself test:\r\t\t\t[coll basicAt: index put: element. coll basicAt: index put: element.\r\t\t\t coll basicAt: index put: element. coll basicAt: index put: element.\r\t\t\t coll basicAt: index put: element. coll basicAt: index put: element.\r\t\t\t coll basicAt: index put: element. coll basicAt: index put: element.\r\t\t\t coll basicAt: index put: element. coll basicAt: index put: element.\r\t\t\t coll basicAt: index put: element. coll basicAt: index put: element.\r\t\t\t coll basicAt: index put: element. coll basicAt: index put: element.\r\t\t\t coll basicAt: index put: element. coll basicAt: index put: element.\r\t\t\t coll basicAt: index put: element. coll basicAt: index put: element.\r\t\t\t coll basicAt: index put: element. coll basicAt: index put: element. nil]\r\t\tlabeled: 'send #basicAtPut: 20 times (to a set)' repeated: 1000\r\r\t\"Benchmark new testBasicAtPut\"! !\r!Benchmark methodsFor: 'primitive methods' stamp: ''!\rtestBitBLT\r\t| bLTer |\r\tbLTer _ self sampleBitBLT.\r\tself test:\r\t\t\t[bLTer copyBits. bLTer copyBits.\r\t\t\t bLTer copyBits. bLTer copyBits.\r\t\t\t bLTer copyBits. bLTer copyBits.\r\t\t\t bLTer copyBits. bLTer copyBits.\r\t\t\t bLTer copyBits. bLTer copyBits. nil]\r\t\tlabeled: 'call bitBLT 10 times' repeated: 10\r\r\t\"Benchmark new testBitBLT\"! !\r!Benchmark methodsFor: 'primitive methods' stamp: ''!\rtestFloatingPointAddition\r\t| a b |\r\ta _ 3.1.\r\tb _ 4.1.\r\tself test: [a+b. a+b. a+b. a+b. a+b. a+b. a+b. a+b. a+b. a+b.\r\t\t\t  a+b. a+b. a+b. a+b. a+b. a+b. a+b. a+b. a+b. a+b. nil]\r\t\tlabeled: 'add 3.1 plus 4.1, 20 times' repeated: 100\r\r\t\"Benchmark new testFloatingPointAddition\"! !\r!Benchmark methodsFor: 'primitive methods' stamp: ''!\rtestPerform\r\tself test: [3 perform: #+ with: 4. 3 perform: #+ with: 4.\r\t\t\t  3 perform: #+ with: 4. 3 perform: #+ with: 4.\r\t\t\t  3 perform: #+ with: 4. 3 perform: #+ with: 4.\r\t\t\t  3 perform: #+ with: 4. 3 perform: #+ with: 4.\r\t\t\t  3 perform: #+ with: 4. 3 perform: #+ with: 4.\r\t\t\t  3 perform: #+ with: 4. 3 perform: #+ with: 4.\r\t\t\t  3 perform: #+ with: 4. 3 perform: #+ with: 4.\r\t\t\t  3 perform: #+ with: 4. 3 perform: #+ with: 4.\r\t\t\t  3 perform: #+ with: 4. 3 perform: #+ with: 4.\r\t\t\t  3 perform: #+ with: 4. 3 perform: #+ with: 4. nil]\r\t\tlabeled: '3 perform: #+ with: 4, 20 times' repeated: 1000\r\r\t\"Benchmark new testPerform\"! !\r!Benchmark methodsFor: 'primitive methods' stamp: ''!\rtestStringReplace\r\t| source sink size |\r\tsource _ self longishString copy.\r\tsink _ source copy.\r\tsize _ sink size.\r\tself test:\r\t\t\t[sink replaceFrom: 1 to: size with: source startingAt: 1. nil]\r\t\tlabeled: 'replace characters in a string' repeated: 100\r\r\t\"Benchmark new testStringReplace\"! !\r!Benchmark methodsFor: 'primitive methods' stamp: 'ssa 8/19/2008 21:51'!\rtestTextScanning\r\t| clipRect para range scanner stops |\r\t\"clipRect _ Display boundingBox.\r\tpara _ Paragraph withText: 'Hi there, folks' asText.\r\trange _ 1 to: para numberOfLines.\r\tscanner _ DisplayScanner new.\r\tscanner displayLines: range in: para clippedBy: clipRect.\r\tstops _ scanner instVarAt: 17.\"\r\tself test:\r\t\t[\"scanner destX: 0.\r\t\t scanner\r\t\t\tscanCharactersFrom: 1\r\t\t\tto: 16\r\t\t\tin: 'Hi there, folks!!'\r\t\t\trightX: 400\r\t\t\tstopConditions: stops\r\t\t\tdisplaying: true\"]\r\t\tlabeled: 'DISABLED scan characters (primitive text display)' repeated: 100\r\r\t\"Benchmark new testTextScanning\"! !\r!Benchmark methodsFor: 'macro operations' stamp: 'ssa 11/17/2008 22:54'!\rtestAllCallsOn\r\tself test:\r\t\t\t[SystemNavigation default  allCallsOn: #printStringBase:]\r\t\tlabeled: 'find all calls on #printStringBase:' repeated: 3\r\r\t\"Benchmark new testAllCallsOn\"! !\r!Benchmark methodsFor: 'macro operations' stamp: 'ssa 11/17/2008 22:51'!\rtestAllImplementors\r\tself test:\r\t\t\t[SystemNavigation default allImplementorsOf: #next]\r\t\tlabeled: 'find all implementors of #next' repeated: 10\r\r\t\"Benchmark new testAllImplementors\"! !\r!Benchmark methodsFor: 'macro operations' stamp: ''!\rtestClassOrganizer\r\t| class |\r\tclass _ Benchmark.\r\tself test:\r\t\t\t[class organization changeFromString: class organization printString]\r\t\tlabeled: 'read and write class organization' repeated: 1\r\r\t\"Benchmark new testClassOrganizer\"! !\r!Benchmark methodsFor: 'macro operations' stamp: 'dmu 1/1/2009 04:42'!\rtestCompiler\r\tself test:\r\t\t\t[Benchmark compileBenchmark:\r'dummy: aBlock repeated: nTimes | i emptyBlock emptyTime blockTime |\r\tnTimes > 1000 ifTrue: [^self time: aBlock repeatedK: nTimes // 1000].\r\temptyBlock _ [].\r\temptyTime _ Time millisecondsToRun:\r\t\t\t\t\t[i _ 0.\r\t\t\t\t\t [(i _ i + 1) <= nTimes] whileTrue: [emptyBlock value]].\r\tblockTime _ Time millisecondsToRun:\r\t\t\t\t\t[i _ 0.\r\t\t\t\t\t [(i _ i + 1) <= nTimes] whileTrue: [aBlock value]].\r\t^blockTime - emptyTime'\r\t\t\t\tnotifying: nil ]\r\t\tlabeled: 'compile dummy method' repeated: 5.\r\tBenchmark removeSelector: #dummy:repeated:\r\r\t\"Benchmark new testCompiler\"! !\r!Benchmark methodsFor: 'macro operations' stamp: ''!\rtestDecompiler\r\t| class |\r\tclass _ InputSensor.\r\tself\r\t\ttest: [class selectors do:\r\t\t\t\t[:sel | (Decompiler new\r\t\t\t\t\t\tdecompile: sel\r\t\t\t\t\t\tin: class\r\t\t\t\t\t\tmethod: (class compiledMethodAt: sel)) decompileString]]\r\t\tlabeled: 'decompile class InputSensor' repeated: 1\r\r\t\"Benchmark new testDecompiler\"! !\r!Benchmark methodsFor: 'macro operations' stamp: 'ssa 11/17/2008 22:57'!\rtestMandala\r\tself test:\r\t\t\t[Pen new mandala: 30 diameter: 400]\r\t\tlabeled: 'testing Mandala' repeated: 2\r\r\t\"Benchmark new testMandala\"! !\r!Benchmark methodsFor: 'macro operations' stamp: ''!\rtestPrintDefinition\r\t| class |\r\tclass _ Compiler.\r\tself test:\r\t\t\t[class definition]\r\t\tlabeled: 'print a class definition' repeated: 20\r\r\t\"Benchmark new testPrintDefinition\"! !\r!Benchmark methodsFor: 'macro operations' stamp: ''!\rtestPrintHierarchy\r\t| class |\r\tclass _ InstructionStream.\r\tself test:\r\t\t\t[class printHierarchy]\r\t\tlabeled: 'print a class hierarchy' repeated: 10\r\r\t\"Benchmark new testPrintHierarchy\"! !\r!Benchmark methodsFor: 'macro operations' stamp: ''!\rtestTextDisplay\r\t| para |\r\tpara _ Paragraph withText: self textForDisplay.\r\tpara displayAt: 200@200.\r\tself test: [para displayAt: 200@200]\r\t\tlabeled: 'display text' repeated: 10\r\r\t\"Benchmark new testTextDisplay\"! !\r!Benchmark methodsFor: 'macro operations' stamp: ''!\rtestTextEditing\r\t| aStringHolderView editor selectPoint |\r\taStringHolderView _ self favoriteStringHolderView.\r\teditor _ aStringHolderView controller.\r\tselectPoint _ 0.\r\tself test:\r\t\t\t[editor selectAt: (selectPoint _ selectPoint + 5).\r\t\t\t editor replaceSelectionWith: 'Now!! ' asText]\r\t\tlabeled: 'text replacement and redisplay' repeated: 20.\r\taStringHolderView release\r\r\t\"Benchmark new testTextEditing\"! !\r!Benchmark methodsFor: 'macro operations' stamp: ''!\rtestTextFormatting\r\t| aString aView contents |\r\taString _ self stringForDisplay.\r\taView _ StringHolderView container: StringHolder new.\r\taView window: Display boundingBox viewport: (100@100 extent: 200@200).\r\tself test:\r\t\t\t[aView editString: (aString asText makeSelectorBoldIn: Benchmark) asParagraph]\r\t\tlabeled: 'format a bunch of text' repeated: 5.\r\taView release\r\r\t\"Benchmark new testTextFormatting\"! !\r!Benchmark methodsFor: 'testing' stamp: ''!\rtest: aBlock labeled: label repeated: nTimes \r\t\"This is the main message to a Benchmark. aBlock is repeated nTimes, and the\r\tresults are reported.\"\r\r\t| time |\r\ttime _ self time: aBlock repeated: nTimes.\r\tself\r\t\treport: label\r\t\ttimedAt: time\r\t\trepeated: nTimes! !\r!Benchmark methodsFor: 'testing' stamp: 'ssa 8/19/2008 21:56'!\rtestList: selectorList\r\t\"This message allows you to test a series of benchmarks and record all the results on\r\ta file or stream.\"\r\r\tfromList _ true.\r\tself setOutputParameters.\r\tselectorList do:\r\t\t[:selector | self perform: selector].\r\treporting ifTrue: [self closeOutput: reportStream].\r\tfromList _ false.\r\r\t\"Benchmark new testList: #(testLoadInstVar testLoadLiteralIndirect testLoadLiteralNRef testLoadQuickConstant testLoadTempNRef)\"! !\r!Benchmark methodsFor: 'testing' stamp: 'ssa 8/19/2008 21:56'!\rtestList: selectorList toFile: aFileStream\r\t\"This message allows you to test a series of benchmarks and record all the results on\r\ta file or stream.\"\r\r\tfromList _ true.\r\tself fileOutputParameters: aFileStream.\r\tselectorList do:\r\t\t[:selector | self perform: selector.\r\t\t verboseTranscript ifTrue:\r\t\t\t[]].\r\treporting ifTrue: [self closeOutput: reportStream].\r\tfromList _ false.\r\r\t\"Benchmark new testList: #(testLoadInstVar testLoadLiteralIndirect testLoadLiteralNRef testLoadQuickConstant testLoadTempNRef) toFile: (FileStream fileNamed: 'Smalltalk.timing')\"! !\r!Benchmark methodsFor: 'testing' stamp: ''!\rtime: aBlock repeated10K: tenKTimes \r\t| i emptyBlock emptyTime blockTime |\r\ttenKTimes > 10000 ifTrue: [^self error: 'one hundred million repetitions is my limit'].\r\temptyBlock _ [].\r\temptyTime _\r\t\t\tTime millisecondsToRun:\r\t\t\t\t\t[1 to: tenKTimes do: \r\t\t\t\t\t\t[:j | \r\t\t\t\t\t\ti _ 0.\r\t\t\t\t\t\t[(i _ i + 1) <= 10000]\r\t\t\t\t\t\t\twhileTrue: [emptyBlock value]]].\r\tblockTime _\r\t\t\tTime millisecondsToRun:\r\t\t\t\t\t[1 to: tenKTimes do: \r\t\t\t\t\t\t[:j | \r\t\t\t\t\t\ti _ 0.\r\t\t\t\t\t\t[(i _ i + 1) <= 10000]\r\t\t\t\t\t\t\twhileTrue: [aBlock value]]].\r\t^blockTime - emptyTime! !\r!Benchmark methodsFor: 'testing' stamp: ''!\rtime: aBlock repeated: nTimes\r\t\"Answer how many milliseconds it takes to repeat aBlock nTimes, corrected for the\r\ttime to repeat an empty block.\"\r\r\t| i emptyBlock emptyTime blockTime iBox |\r\tnTimes > 10000 ifTrue: [^self time: aBlock repeated10K: nTimes // 10000].\r\temptyBlock _ [].\r\temptyTime _ Time millisecondsToRun: \r\t\t\t\t\t\t\t[i _ 0.\r\t\t\t\t\t\t\t [(i _ i + 1) <= nTimes] whileTrue: [emptyBlock value]].\r\tblockTime _ Time millisecondsToRun: \r\t\t\t\t\t\t\t[i _ 0.\r\t\t\t\t\t\t\t [(i _ i + 1) <= nTimes] whileTrue: [aBlock value]].\r\t^blockTime - emptyTime! !\r!Benchmark methodsFor: 'output' stamp: ''!\rclearOutputs\r\t\"This allows you to get rid of your old accumulated output streams.\"\r\r\tOutputs _ nil\r\r\t\"Benchmark new clearOutputs\"! !\r!Benchmark methodsFor: 'output' stamp: ''!\rcloseOutput: aStream\r\tself streamsRatherThanFiles \r\t\tifTrue: [aStream reset]\r\t\tifFalse: [aStream close]! !\r!Benchmark methodsFor: 'output' stamp: 'ssa 8/19/2008 22:12'!\rcompareOldTimes: oldName toNewTimes: newName outputTo: outName\r\t\"Compare two sets of benchmark ouput reports.\"\r\r\t| oldDict newDict labels compareStream oldTime newTime |\r\toldDict _ Dictionary new. newDict _ Dictionary new. labels _ OrderedCollection new.\r\tself readOutput: (self outputNamed: oldName) intoDict: oldDict andCollection: nil.\r\tself readOutput: (self outputNamed: newName) intoDict: newDict andCollection: labels.\r\tcompareStream _ self makeOutputNamed: outName.\r\tlabels do:\r\t\t[:label | (oldDict includesKey: label) ifTrue:\r\t\t\t[compareStream nextPutAll: label; cr; tab;\r\t\t\t\tnextPutAll: 'old time: ', (oldTime _ oldDict at: label) printString; tab;\r\t\t\t\tnextPutAll: 'new time: ', (newTime _ newDict at: label) printString; tab.\r\t\t\t\toldTime = 0 ifTrue:[compareStream nextPutAll:'percent change: ERROR oldTime=0';cr;cr]\r\t\t\t\tifFalse:[compareStream \r\t\t\t\tnextPutAll: 'percent change: ', (newTime - oldTime * 100.0 / oldTime) printString; cr; cr]]].\r\tself closeOutput: compareStream\r\r\t\"Benchmark new\r\t\tcompareOldTimes: 'test1.timing'\r\t\ttoNewTimes: 'test2.timing'\r\t\toutputTo: 'compare1-2.timing'\"\r\r\t\"Benchmark new displayOutputNamed: 'compare1-2.timing'\"! !\r!Benchmark methodsFor: 'output' stamp: ''!\rdisplayOutputNamed: name\r\t\"Create a window on the display to view the contents of the named output.\r\tDoes not allow editing of the output file or stream.\"\r\r\t| output contents |\r\toutput _ self outputNamed: name.\r\tcontents _ self streamsRatherThanFiles\r\t\t\t\t\tifTrue: [output contents]\r\t\t\t\t\tifFalse: [output contentsOfEntireFile].\r\tStringHolderView\r\t\topen: (StringHolder new contents: contents)\r\t\tlabel: name! !\r!Benchmark methodsFor: 'output' stamp: ''!\rmakeOutputNamed: name\r\t\"Create a new output file or stream of the given name.\"\r\r\tself streamsRatherThanFiles\r\t\tifTrue: [Outputs == nil ifTrue: [Outputs _ Dictionary new].\r\t\t\t\tOutputs at: name put:\r\t\t\t\t\t(ReadWriteStream on: (String new: 1000))].\r\t^self outputNamed: name! !\r!Benchmark methodsFor: 'output' stamp: 'ssa 8/19/2008 22:06'!\routputNamed: name\r\t\"Answer with the output file or stream of the given name.\"\r\r\tself streamsRatherThanFiles\r\t\tifTrue: [^Outputs at: name]\r\t\tifFalse: [^FileStream fileNamed: name]! !\r!Benchmark methodsFor: 'output' stamp: ''!\rreadOutput: aStream intoDict: aDict andCollection: aColl\r\t\"Parse the output file or stream, aStream, putting labels and times in aDict.\r\tIf aColl is non-nil (but rather an ordered collection), also add the labels to it\r\tin order.\"\r\r\t| leftBracket rightBracket tab space label value |\r\tleftBracket _ $[.\r\trightBracket _ $].\r\ttab _ $\t.\r\tspace _ $ .\r\taStream upTo: leftBracket.\r\t[aStream atEnd] whileFalse:\r\t\t[label _ aStream upTo: rightBracket.\r\t\t aColl notNil ifTrue: [aColl add: label].\r\t\t aStream next: 2; upTo: tab.\r\t\t value _ Number readFrom: (ReadStream on: (aStream upTo: space)).\r\t\t aDict at: label put: value.\r\t\t aStream upTo: leftBracket].\r\tself closeOutput: aStream! !\r!Benchmark methodsFor: 'output' stamp: ''!\rreport: label timedAt: time repeated: numberOfTimes\r\t\"Do all the reporting, both in the Transcript and on the output file or stream.\"\r\r\t| reportString |\r\treportString _ self reportStringFor: label\r\t\t\t\t\t\ttimedAt: time\r\t\t\t\t\t\trepeated: numberOfTimes.\r\tverboseTranscript\r\t\t\tifTrue: [Transcript show: reportString]\r\t\t\tifFalse: [Transcript show: '\r[', label, ']'].\r\treporting ifTrue:\r\t\t[reportStream nextPutAll: reportString.\r\t\t fromList ifFalse: [self closeOutput: reportStream]]! !\r!Benchmark methodsFor: 'output' stamp: ''!\rreportStringFor: label timedAt: time repeated: numberOfTimes\r\t\"Generate the parsible string to represent the measurement of a benchmark.\"\r\r\t| nTimes unitTime seconds aStream|\r\taStream _ WriteStream on: (String new: 200).\r\tnTimes _ numberOfTimes <= 1000\r\t\t\t\tifTrue: [numberOfTimes]\r\t\t\t\tifFalse: [numberOfTimes // 1000 * 1000].\r\tseconds _ time asFloat / 1000.\r\taStream cr; nextPutAll: 'Testing:  [' , label , ']'; cr.\r\taStream tab; print: nTimes; nextPutAll: ' repetition(s) in'; cr;\r\t\ttab; print: seconds; nextPutAll: ' seconds'; cr.\r\tnTimes ~= 1\r\t\tifTrue: \r\t\t\t[unitTime _ (time * 1000) asFloat / nTimes.\r\t\t\taStream tab; print: unitTime;\r\t\t\t\tnextPutAll: ' microseconds per repetition'; cr].\r\t^aStream contents! !\r!Benchmark methodsFor: 'output' stamp: 'ssa 8/19/2008 22:05'!\rstreamsRatherThanFiles\r\t\"Should the named outputs be (internal Smalltalk-80) streams rather than disk files?\r\tThey should if there is no file system.\r\tFeel free to change this method if you have a file system but want streams anyway.\"\r\r\t^false! !\r!Benchmark methodsFor: 'instance initialization' stamp: ''!\rdefaultOutputParameters\r\treporting _ false.\r\tverboseTranscript _ true.\r\tfromList _ false! !\r!Benchmark methodsFor: 'instance initialization' stamp: ''!\rfileOutputParameters: aFileStream\r\treporting _ true.\r\treportStream _ aFileStream.\r\tverboseTranscript _ false! !\r!Benchmark methodsFor: 'instance initialization' stamp: 'ssa 8/19/2008 22:24'!\rsetOutputParameters\r\t| answer |\r\tBinaryChoice \r\t\tmessage: 'Would you like the transcript to just show labels, rather than full reports?'\r\t\tdisplayAt: Sensor mousePoint\r\t\tcentered: true\r\t\tifTrue: [verboseTranscript _ false]\r\t\tifFalse: [verboseTranscript _ true].\r\tBinaryChoice\r\t\tmessage: 'Should the full reports to be output (saved on a file or stream)?'\r\t\tdisplayAt: Sensor mousePoint\r\t\tcentered: true\r\t\tifTrue: [reporting _ true]\r\t\tifFalse: [reporting _ false].\r\treporting ifTrue:\r\t\t[answer := FillInTheBlank\r\t\t\trequest: 'Please supply desired output name' \r\t\t\tinitialAnswer: '.timing'\r\t\t\tcenterAt: Sensor mousePoint.\r\t\t\tanswer isEmpty ifFalse:[reportStream _ self makeOutputNamed: answer]\r\t\t\t\tifTrue:[reporting := false]]! !\r!Benchmark methodsFor: 'private' stamp: ''!\rfavoriteStringHolderView\r\t| aStringHolderView message |\r\tmessage _ self longishString.\r\taStringHolderView _ StringHolderView container: (StringHolder new contents: message).\r\taStringHolderView window: (0@0 extent: 300@200).\r\taStringHolderView translateBy: 100@250.\r\taStringHolderView display.\r\t^aStringHolderView! !\r!Benchmark methodsFor: 'private' stamp: ''!\rlongishString\r\t^ 'Now is the time for all good people to come to the aid of the cause of world peace.  It is just fine, even desirable, to love your country, if that means wanting it to play a beneficial role in the course of world events and be the best possible example of a good society.  But if it means wanting dominion over the rest of the world, it is not love but defensiveness or self-glorification, and will lead only to oblivion.'! !\r!Benchmark methodsFor: 'private' stamp: ''!\rrecur: exp \r\t\"Invokes a recursion involving ((2 raisedTo: exp+1) - 1) activations and \r\treturns.\"\r\r\texp = 0 ifTrue: [^self].\r\tself recur: exp - 1.\r\t^self recur: exp - 1! !\r!Benchmark methodsFor: 'private' stamp: 'ssa 8/19/2008 21:11'!\rsampleBitBLT\r\t^BitBlt \r\t\tdestForm: Display\r\t\tsourceForm: nil\r\t\thalftoneForm: Color black\r\t\tcombinationRule: Form reverse\r\t\tdestOrigin: 0@0\r\t\tsourceOrigin: 0@0\r\t\textent: 400@400\r\t\tclipRect: Display boundingBox! !\r!Benchmark methodsFor: 'private' stamp: ''!\rstringForDisplay\r\t^'testTextDisplay\r\t| clipRect para range scanner |\r\tclipRect _ Display boundingBox.\r\tpara _ Paragraph withText: self textForDisplay.\r\trange _ 1 to: para numberOfLines.\r\tscanner _ DisplayScanner new.\r\tself test: [scanner\r\t\t\t\tdisplayLines: range\r\t\t\t\tin: para\r\t\t\t\tclippedBy: clipRect]\r\t\tlabeled: ''displaying text'' repeated: 10\r\r\t\"Benchmark new testTextDisplay\"'! !\r!Benchmark methodsFor: 'private' stamp: ''!\rtextForDisplay\r\t^self stringForDisplay asText! !\r!Benchmark class methodsFor: 'standard tests' stamp: 'ssa 8/19/2008 21:36'!\rsetStandardTests\r\t\"These are all the built-in benchmarks.\r\tFeel free to change if you add more or think some of these are useless.\r\tTo just execute a few, use testList: directly.\"\r\r\tStandardTests _\r\t\t\t#(testLoadInstVar testLoadTempNRef testLoadTempRef\r\t\t\ttestLoadQuickConstant testLoadLiteralNRef testLoadLiteralIndirect\r\t\t\ttestPopStoreInstVar testPopStoreTemp\r\t\t\ttest3plus4 test3lessThan4 test3times4 test3div4 test16bitArith testLargeIntArith\r\t\t\ttestActivationReturn testShortBranch testWhileLoop\r\t\t\ttestArrayAt testArrayAtPut testStringAt testStringAtPut testSize\r\t\t\ttestPointCreation testStreamNext testStreamNextPut testEQ testClass\r\t\t\ttestBlockCopy testValue testCreation testPointX \r\t\t\ttestLoadThisContext\r\t\t\ttestBasicAt testBasicAtPut testPerform testStringReplace\r\t\t\ttestAsFloat testFloatingPointAddition testBitBLT testTextScanning\r\t\t\ttestClassOrganizer testPrintDefinition testPrintHierarchy\r \t\t\ttestAllCallsOn testAllImplementors  \r\t\t\ttestCompiler testDecompiler\r\t\t\t\r\t\t\ttestTextDisplay testTextFormatting testTextEditing )! !\r!Benchmark class methodsFor: 'standard tests' stamp: ''!\rtestStandardTests\r\t\"This message allows you to test the default series of benchmarks and record all the\r\tresults according to how you answer the interactive prompts.\"\r\r\tself setStandardTests.\r\tself new testList: StandardTests\r\r\t\"Benchmark testStandardTests\"! !\r!Benchmark class methodsFor: 'standard tests' stamp: ''!\rtestStandardToFile: aFileStream\r\t\"This message allows you to test the default series of benchmarks and record all the\r\tresults on the specified file or stream.\"\r\r\tself setStandardTests.\r\tself new testList: StandardTests toFile: aFileStream\r\r\t\"Benchmark testStandardToFile: (FileStream fileNamed: 'Smalltalk.timing')\"! !\r!Benchmark class methodsFor: 'instance creation' stamp: ''!\rnew\r\t^super new defaultOutputParameters\r\r\t\"Benchmark new inspect\"! !\r!Benchmark class methodsFor: 'compiler benchmark support' stamp: 'dmu 1/1/2009 04:40'!\rcompileBenchmark: text classified: cat notifying: requestor\r\t| stamp |\r\tstamp _ self acceptsLoggingOfCompilation ifTrue: [Utilities changeStamp] ifFalse: [nil].\r\t^ self compileBenchmark: text classified: cat\r\t\twithStamp: stamp notifying: requestor\r\r ! !\r!Benchmark class methodsFor: 'compiler benchmark support' stamp: 'dmu 1/1/2009 04:39'!\rcompileBenchmark: text classified: cat withStamp: changeStamp notifying: requestor\r\t^ self compile: text classified: cat withStamp: changeStamp notifying: requestor logSource: false! !\r!Benchmark class methodsFor: 'compiler benchmark support' stamp: 'dmu 1/1/2009 04:41'!\rcompileBenchmark: code notifying: requestor \r\t\"Refer to the comment in Behavior|compile:notifying:.\" \r\r\t^self compileBenchmark: code\r\t\t classified: ClassOrganizer default\r\t\t notifying: requestor! !\r!Collection methodsFor: '*Sly' stamp: 'dmu 9/17/2010 11:04'!\rparallelCollect: aBlock\r\t\"#(1 2 3 4 5) asOrderedCollection parallelCollect:[:e| e * 2]\"\r\t| results task  barrier result interlock |\r\t\"true ifTrue: [^ self collect: aBlock.].\" \"for debugging\"\r\tself ifEmpty: [^ self].\r\t(Sly3 serializeForDebugging or: [self size = 1]) ifTrue: [^ self collect: aBlock].\r\tresults _ self species new.\r\tbarrier _ RVMBarrier new signalsNeededToPass: self size.\r\tinterlock _ Semaphore forMutualExclusion.\r\tself do:[:each|\r\t\ttask _ [\r\t\t\tresult _ ([aBlock copy fixTemps value: each] ifCurtailed: [barrier signal.\r\t\t\t\t\"Tasks do:[:eachTask| eachTask terminate].\r\t\t\t\tTasks _ OrderedCollection new.\"\r\t\t\t\t \"self error: 'Yipes!! An ensemble is NLRing back.'.\" ] ).\r\t\t\tinterlock critical: [results add: result].\r\t\t\tbarrier signal] asSlyMemberProcess.\r\t\ttask resume].\r\tbarrier wait.\r\t^results! !\r!RVMAspectLabelController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 00:25'!\raspectFromUser\r\t| menu answer |\r\tmenu := CustomMenu new.\r\tself view aspects\r\t\tdo: [:aspect | menu add: aspect action: aspect].\r\tanswer := menu startUp: self view aspect withCaption: 'Select the aspect to monitor' at: Sensor cursorPoint.\r\tanswer isNil ifTrue:[^self].\r\tself view aspect: answer.\r\tself view displayView.\r\tself view topView newFrame! !\r!RVMAspectLabelController methodsFor: 'controlling' stamp: 'ssa 9/19/2008 11:55'!\rcontrolActivity\r\tCursor menu show.\r\tsuper controlActivity! !\r!RVMAspectLabelController methodsFor: 'controlling' stamp: 'ssa 9/19/2008 11:55'!\rcontrolTerminate\r\tCursor normal show.\r\tsuper controlTerminate! !\r!RVMAspectLabelController methodsFor: 'controlling' stamp: 'ssa 9/13/2008 16:19'!\ryellowButtonActivity\r\r\tself aspectFromUser.\r! !\r!RVMBarrier methodsFor: 'as yet unclassified' stamp: 'dmu 1/21/2010 18:49'!\rinitialize\r\tinterlock _ Semaphore new.\r\tinterlock signal.\r\twaitSema _ Semaphore new.\r\tsignalsNeededToPass _ 0! !\r!RVMBarrier methodsFor: 'as yet unclassified' stamp: 'dmu 1/21/2010 19:14'!\rsignal\r\tinterlock critical: [\r\t\tsignalsNeededToPass _ signalsNeededToPass - 1.\r\t\tsignalsNeededToPass < 0 ifTrue: [self error: 'oops'].\r\t\tsignalsNeededToPass = 0 ifTrue: [waitSema signal]\r\t]! !\r!RVMBarrier methodsFor: 'as yet unclassified' stamp: 'dmu 1/21/2010 14:23'!\rsignalsNeededToPass: n\r\tsignalsNeededToPass _ n! !\r!RVMBarrier methodsFor: 'as yet unclassified' stamp: 'dmu 1/21/2010 18:32'!\rwait\r\twaitSema wait! !\r!RVMBarrier methodsFor: 'as yet unclassified' stamp: 'dmu 1/21/2010 18:24'!\rwaitSema ^ waitSema! !\r!RVMButtonController methodsFor: 'basic control sequence' stamp: 'ssa 1/1/1970 01:12'!\rredButtonActivity\r\r\t| aborted lastAborted |\r\tself view displayPressed.\r\tlastAborted _ false.\r\taborted _ true.\r\t[Sensor redButtonPressed] whileTrue:[\r\t\taborted _ (self view insetDisplayBox containsPoint: Sensor cursorPoint) not.\r\t\taborted & lastAborted not ifTrue:[self view displayView.\r\t\t\t\t\t\t\t\t\tlastAborted _ true].\r\t\taborted not & lastAborted ifTrue:[self view displayPressed.\r\t\t\t\t\t\t\t\t\tlastAborted _ false]].\r\tself view displayView.\r\taborted ifFalse:[self view performAction]! !\r!RVMButtonController methodsFor: 'controlling' stamp: 'ssa 10/3/2008 20:53'!\rcontrolInitialize\r\tself view style ~~ #raisedGray ifTrue:[Cursor action show].\r\tsuper controlInitialize! !\r!RVMButtonController methodsFor: 'controlling' stamp: 'ssa 9/19/2008 12:04'!\rcontrolTerminate\r\tCursor normal show.\r\tsuper controlTerminate! !\r!RVMCanvasController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 00:16'!\rredButtonActivity\r\t\"Move the offset of the view, effectively scrolling the canvas.\"\r\t| startPoint delta oldOffset |\r\tCursor crossHair show.\r\tstartPoint _ Sensor cursorPoint.\r\toldOffset _ self view offset.\r\t[Sensor redButtonPressed] whileTrue:[delta _ Sensor cursorPoint - startPoint.\r\t\tself view offset: oldOffset + delta.\r\t\tself view displayView].\r\tCursor normal show\r\t! !\r!RVMCanvasController methodsFor: 'controlling' stamp: 'ssa 10/8/2008 19:05'!\ryellowButtonActivity\r\t! !\r!RVMCheckBoxController methodsFor: 'basic control sequence' stamp: 'ssa 11/15/2008 11:04'!\rclearView\r\r\tDisplay fill: self view insetDisplayBox fillColor: Color white! !\r!RVMCheckBoxController methodsFor: 'basic control sequence' stamp: 'ssa 11/15/2008 11:04'!\rredButtonActivity\r\r\t| aborted lastAborted |\r\tself view displayPressed.\r\tlastAborted _ false.\r\taborted _ true.\r\t[Sensor redButtonPressed] whileTrue:[\r\t\taborted _ (self view insetDisplayBox containsPoint: Sensor cursorPoint) not.\r\t\taborted & lastAborted not ifTrue:[self clearView.  \r\t\t\t\t\t\t\t\t\tself view displayView.\r\t\t\t\t\t\t\t\t\tlastAborted _ true].\r\t\taborted not & lastAborted ifTrue:[self clearView.\r\t\t\t\t\t\t\t\t\tself view displayPressed.\r\t\t\t\t\t\t\t\t\tlastAborted _ false]].\r\tself clearView.\r\tself view displayView.\r\taborted ifFalse:[self view performAction]! !\r!RVMCheckBoxController methodsFor: 'basic control sequence' stamp: 'ssa 10/19/2008 00:09'!\ryellowButtonActivity\r! !\r!RVMCheckBoxController methodsFor: 'controlling' stamp: 'ssa 9/19/2008 12:20'!\rcontrolActivity\r\t\"Cursor action show.\"\r\tsuper controlActivity! !\r!RVMCheckBoxController methodsFor: 'controlling' stamp: 'ssa 9/19/2008 12:05'!\rcontrolTerminate\r\tCursor normal show.\r\tsuper controlTerminate! !\r!RVMColorButtonController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 00:50'!\rcolorFromUser\r\t\"Displays a color palette of colors, waits for a mouse click, and returns the selected color. Any pixel on the Display can be chosen, not just those in the color palette.\"\r\r\t| d startPt save tr oldColor c here s |\r\td _ Display depth.\r\t((Color colorChart == nil) or: [Color colorChart depth ~= Display depth]) \r\t\tifTrue: [Color colorChart:(Color oldColorPaletteForDepth: d extent: (2 * 144)@80)].\r\tstartPt _ Sensor cursorPoint.\r\r\tsave _ Form fromDisplay: (startPt extent: Color colorChart extent).\r\tColor colorChart displayAt: startPt.\r\ttr _ Color colorChart extent - (50@19) corner: Color colorChart extent.\r\ttr _ tr translateBy: startPt.\r\r\toldColor _ nil.\r\t[Sensor anyButtonPressed] whileTrue: [\r\t\tc _ Display colorAt: (here _ Sensor cursorPoint).\r\t\t(tr containsPoint: here)\r\t\t\tifFalse: [Display fill: (0@61+startPt extent: 20@19) fillColor: c]\r\t\t\tifTrue: [\r\t\t\t\tc _ Color transparent.\r\t\t\t\tDisplay fill: (0@61+startPt extent: 20@19) fillColor: Color white].\r\t\tc = oldColor ifFalse: [\r\t\t\tDisplay fillWhite: (20@61 + startPt extent: 135@19).\r\t\t\tc isTransparent\r\t\t\t\tifTrue: [s _ 'transparent']\r\t\t\t\tifFalse: [s _ c shortPrintString.\r\t\t\t\t\t\ts _ s copyFrom: 7 to: s size - 1].\r\t\t\ts displayAt: 20@61 + startPt.\r\t\t\toldColor _ c]].\r\tsave displayAt: startPt.\r\tSensor waitNoButton.\r\t^ c\r! !\r!RVMColorButtonController methodsFor: 'controlling' stamp: 'ssa 9/19/2008 11:56'!\rcontrolActivity\r\tCursor menu show.\r\tsuper controlActivity! !\r!RVMColorButtonController methodsFor: 'controlling' stamp: 'ssa 9/19/2008 11:56'!\rcontrolTerminate\r\tCursor normal show.\r\tsuper controlTerminate! !\r!RVMColorButtonController methodsFor: 'controlling' stamp: 'ssa 9/13/2008 16:06'!\ryellowButtonActivity\r\r\tview color: self colorFromUser.\r\tview display! !\r!RVMColorScaleController methodsFor: 'controlling' stamp: 'ssa 11/4/2008 20:13'!\rredButtonActivity\r\tself view usesScaler ifTrue:[\r\t(self view adjustScaleBox  containsPoint: Sensor cursorPoint) ifTrue:[Sensor waitNoButton.\r\t\tself spawnScaleAdjuster]]! !\r!RVMColorScaleController methodsFor: 'controlling' stamp: 'ssa 5/12/2010 10:19'!\rspawnScaleAdjuster\r\r\t| scaler maxView minView topView resetScaleButton setToObservedButton autoScaleCheckBox height |\r\tscaler _ self view scaler.\r\tmaxView _ RVMValueEditorView  on: scaler valueGetter: [scaler max] valueSetter:[:v|scaler setMax:v. self view model redrawOnCanvas; displayView] label:'max: '.\r\tmaxView lockGetter:#maxLocked; lockSetter:#maxLocked:.\r\tminView _ RVMValueEditorView  on: scaler valueGetter: [scaler min] valueSetter:[:v|scaler setMin:v.  self view model redrawOnCanvas; displayView] label:'min: '.\r\tminView lockGetter:#minLocked; lockSetter:#minLocked:.\r\tresetScaleButton _ RVMButtonView label:'Reset scale to default' action:[scaler resetScaling.  self view model redrawOnCanvas; displayView].\r\tsetToObservedButton _ RVMButtonView label:'Set scale to observed values' action:[scaler setRangeToObserved.  self view model redrawOnCanvas; displayView].\r\tautoScaleCheckBox _ RVMCheckBoxView on: scaler label: 'Automatic Scaling' checkState: [scaler automaticScaling] whenChecked: [scaler automatic.  self view model redrawOnCanvas; displayView] whenUnchecked: [scaler manual. self view model redrawOnCanvas; displayView] monitor: true.\r\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\ttopView addSubView: minView.\r\ttopView addSubView: maxView below:  minView.\r\ttopView addSubView: resetScaleButton below:  maxView.\r\ttopView addSubView: setToObservedButton below:  resetScaleButton.\r\ttopView addSubView: autoScaleCheckBox below:  setToObservedButton.\r\tRVMMonitor forgetAll:{resetScaleButton. setToObservedButton. autoScaleCheckBox}.\r\ttopView label: self view aspect.\r\theight _ topView subViews size * 26.\r\ttopView minimumSize:200@height.\r\ttopView maximumSize: 200@height.\r\ttopView controller open! !\r!RVMColorScaleController methodsFor: 'controlling' stamp: 'ssa 5/4/2010 15:41'!\ryellowButtonActivity\r\tself spawnScaleAdjuster! !\r!RVMCoreIndexController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 00:14'!\rcontrolActivity\r\tCursor menu show.\r\tsuper controlActivity! !\r!RVMCoreIndexController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 00:14'!\rcontrolTerminate\r\tCursor normal show.\r\tsuper controlTerminate! !\r!RVMCoreIndexController methodsFor: 'controlling' stamp: 'ssa 11/17/2008 17:10'!\ryellowButtonActivity\r\r\t| currentIndex maxIndex newIndex |\r\tcurrentIndex _ self view coreIndex.\r\tmaxIndex _ self view availableIndicies.\r\t[newIndex _ FillInTheBlank request:'Enter a new core index between 0 and ',(maxIndex - 1)printString,':' initialAnswer: currentIndex printString.\r\t(newIndex isEmpty or:[(newIndex asNumber between: 0 and: maxIndex - 1) not])] whileTrue.\r\tnewIndex asNumber = currentIndex ifTrue:[^self].\r\tself view coreIndex: newIndex asNumber.\r\tself view displayView\r\t! !\r!RVMGridLocationController methodsFor: 'controlling' stamp: 'ssa 11/16/2008 02:19'!\rredButtonActivity\r\t| point grid box coord cellSize |\r\tpoint _ Sensor cursorPoint.\r\tgrid _ RVMMonitor extent.\r\tbox _ self view insetDisplayBox.\r\tcellSize _ box extent // grid + 1.\r\tcoord _ (point - box origin  //(cellSize))+1.\r\tself view point: coord.\r\tview displayView.\r\t! !\r!RVMGridLocationController methodsFor: 'controlling' stamp: 'ssa 11/15/2008 16:11'!\ryellowButtonActivity\r! !\r!RVMGroupLocatorController methodsFor: 'controlling' stamp: 'ssa 11/27/2008 11:36'!\rchangeObjectsSourceSourceTo: aString\rCursor wait showWhile:[\r\tself view objectsSourceSource: aString.\r\tself view changed:#objectsSourceSource]! !\r!RVMGroupLocatorController methodsFor: 'controlling' stamp: 'ssa 11/27/2008 09:45'!\rredButtonActivity\r\r\tself view hear:nil! !\r!RVMGroupLocatorController methodsFor: 'controlling' stamp: 'ssa 11/27/2008 11:33'!\ryellowButtonActivity\r\t| menu action choices |\r\tself view topView dontDisplayWhile:[\r\tmenu := CustomMenu new.\r\tmenu add:'Inspect View' action:[self view inspect].\r\tmenu addLine.\r\tchoices _ {'Object withAllSubclasses'. \r\t\t\t'View withAllSubclasses'.\r\t\t\t'Number allSubclasses'.\r\t\t\t#line.\r\t\t\t'String allInstances'.\r\t\t\t'Array allInstances'.\r\t\t\t'Collection allSubInstances' }.\r\tchoices do:[:choice|\r\t\tchoice = #line ifTrue:[menu addLine]\r\t\t\tifFalse:[menu add: choice action:choice]].\r\t\r\taction := menu startUp: nil withCaption: '' at: Sensor cursorPoint].\r\t(action isKindOf: BlockContext) ifTrue:[^action value].\r\taction notNil ifTrue:[self changeObjectsSourceSourceTo: action]! !\r!RVMKiviatController methodsFor: 'control activity' stamp: 'ssa 10/7/2008 18:42'!\raddCoreAspect\r\t| menu selectedAspect |\r\tself view topView dontDisplayWhile:[\rmenu := CustomMenu new.\r RVMMulticoreSample coreAspects do:[:aspect|\r\t\t\tmenu add:  aspect action: aspect].\r\t\t\tselectedAspect := menu startUp: nil withCaption: 'Select a core aspect to monitor' at: Sensor cursorPoint.\r\t\t\tselectedAspect notNil ifTrue:[ self view addAspect: selectedAspect]].\r\t\t\tself view drawOnCanvas.\r\t\t\tself view displayView\r\t\t\t! !\r!RVMKiviatController methodsFor: 'control activity' stamp: 'ssa 10/20/2008 10:26'!\rchangeRescaleCounter\r\t| result |\r\tself view dontDisplayWhile:[\r\tresult _ FillInTheBlank request:'How many samples between rescaling?' initialAnswer: self view rescaleCounterDefault printString.\r\tresult isNil ifFalse:[result _ result asNumber max:0.\r\tself view rescaleCounterDefault:result]].\r\tself view displayView! !\r!RVMKiviatController methodsFor: 'control activity' stamp: 'ssa 10/7/2008 19:52'!\rinspectView\r\rself view inspect! !\r!RVMKiviatController methodsFor: 'control activity' stamp: 'ssa 11/11/2008 17:37'!\rredButtonActivity\r\t\r\t((self view adjustScaleBox translateBy: self view insetDisplayBox origin)  containsPoint: Sensor cursorPoint) ifTrue:[Sensor waitNoButton.\r\t\tself spawnScaleAdjuster]! !\r!RVMKiviatController methodsFor: 'control activity' stamp: 'ssa 10/7/2008 18:55'!\rremoveAspect\r\t| menu selectedAspect |\r\tself view topView dontDisplayWhile:[\rmenu := CustomMenu new.\r self view aspects do:[:aspect|\r\t\t\tmenu add:  aspect action: aspect].\r\t\t\tselectedAspect := menu startUp: nil withCaption: 'Select aspect to remove:' at: Sensor cursorPoint.\r\t\t\tselectedAspect notNil ifTrue:[ self view removeAspect: selectedAspect].\r\t\t\t].\r\t\t\tself view drawOnCanvas.\r\t\t\tself view displayView\r! !\r!RVMKiviatController methodsFor: 'control activity' stamp: 'ssa 10/7/2008 19:06'!\rrescale\r\r\tself view resetScaling.\r\tself view displayView! !\r!RVMKiviatController methodsFor: 'control activity' stamp: 'ssa 10/20/2008 09:06'!\ryellowButtonActivity\r\t| menu answer onlyOne maxed |\r\tonlyOne _ self view aspectCount = 1.\r\tmaxed _ self view aspectCount = 4.\r\tself view topView dontDisplayWhile:[\r\tmenu := CustomMenu new.\r\tmenu add:'Inspect View' action:#inspectView.\r\tmenu add:'Rescale' action:#rescale.\r\tmenu add:'Change Rescale Counter' action:#changeRescaleCounter.\r \tonlyOne ifTrue:[menu add: 'Change aspect' action: #changeAspect.\r \t\tmenu addLine].\r\tmaxed ifFalse:[\r \t\tmenu add: 'Add core aspect' action: #addCoreAspect].\r\tonlyOne ifFalse:[menu addLine.\r \t\tmenu add: 'Remove aspect' action: #removeAspect.].\r\tanswer := menu startUp: nil withCaption: '' at: Sensor cursorPoint].\r\tanswer notNil ifTrue:[self perform: answer]! !\r!RVMKiviatController methodsFor: 'menu messages' stamp: 'ssa 10/7/2008 19:38'!\rchangeAspect\r\r\t| menu answer newAspect |\rself view topView dontDisplayWhile:[\r\t\tmenu := CustomMenu new.\r\tmenu add: 'Core aspects' action: #core.\r\tmenu add: 'Test aspects' action: #testCore.\r\tanswer := menu startUp: nil withCaption: 'What kind of aspect would you like to monitor?' at: Sensor cursorPoint.\r\tanswer isNil ifTrue:[^self].\r\tnewAspect _ RVMMulticoreSample aspectFromUserUnder: answer.\r\tnewAspect isNil ifTrue:[^self].\r\tself view aspect = newAspect ifTrue:[^self].\r\tself view aspect: newAspect].\r\tself view resetScaling.\r\tself view drawOnCanvas.\r\tself view displayView! !\r!RVMKiviatController methodsFor: 'menu messages' stamp: 'ssa 5/12/2010 10:20'!\rspawnScaleAdjuster\r\r\t|  maxView minView topView resetScaleButton setToObservedButton autoScaleCheckBox height scalerIndex result |\r\t(self view scalers size  = 1 or:[self view commonScale])ifFalse:[result _ (PopUpMenu labelArray:self view aspects) startUpWithCaption:'Adjust the scale of which aspect?'.\r\t\tresult = 0 ifTrue:[^self].\r\t\tscalerIndex _ result]ifTrue:[scalerIndex _ 1].\r\tmaxView _ RVMValueEditorView  on: (view scalerAt: scalerIndex) valueGetter: [(view scalerAt: scalerIndex) max] valueSetter:[:v|(view scalerAt: scalerIndex) setMax:v. view drawOnCanvas; displayView] label:'max: '.\r\tmaxView lockGetter:#maxLocked; lockSetter:#maxLocked:.\r\tminView _ RVMValueEditorView  on: (view scalerAt: scalerIndex) valueGetter: [(view scalerAt: scalerIndex) min] valueSetter:[:v|(view scalerAt: scalerIndex) setMin:v.  view drawOnCanvas; displayView] label:'min: '.\r\tminView lockGetter:#minLocked; lockSetter:#minLocked:.\r\tresetScaleButton _ RVMButtonView label:'Reset scale to default' action:[(view scalerAt: scalerIndex) resetScaling.  view drawOnCanvas; displayView.  minView hear:nil.  maxView hear:nil].\r\tsetToObservedButton _ RVMButtonView label:'Set scale to observed values' action:[(view scalerAt: scalerIndex) setRangeToObserved.  view drawOnCanvas; displayView.  minView hear:nil.  maxView hear:nil].\r\tautoScaleCheckBox _ RVMCheckBoxView on: (view scalerAt: scalerIndex) label: 'Automatic Scaling' checkState: [(view scalerAt: scalerIndex) automaticScaling] whenChecked: [(view scalerAt: scalerIndex) automatic.  view drawOnCanvas; displayView.  minView hear:nil.  maxView hear:nil] whenUnchecked: [(view scalerAt: scalerIndex) manual. view drawOnCanvas; displayView.  minView hear:nil.  maxView hear:nil] monitor: true.\r\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\ttopView addSubView: minView.\r\ttopView addSubView: maxView below:  minView.\r\ttopView addSubView: resetScaleButton below:  maxView.\r\ttopView addSubView: setToObservedButton below:  resetScaleButton.\r\ttopView addSubView: autoScaleCheckBox below:  setToObservedButton.\r\tRVMMonitor forgetAll:{resetScaleButton. setToObservedButton. autoScaleCheckBox}.\r\ttopView label: (view aspects at: scalerIndex).\r\theight _ topView subViews size * 26.\r\ttopView minimumSize:200@height.\r\ttopView maximumSize: 200@height.\r\tself scalerAdjusters add: topView.\r\ttopView controller open! !\r!RVMKiviatController methodsFor: 'accessing' stamp: 'ssa 11/11/2008 18:32'!\rscalerAdjusters\r\t\"Answer the value of scalerAdjusters\"\r\r\tscalerAdjusters isNil ifTrue:[self scalerAdjusters: OrderedCollection new].\r\t^ scalerAdjusters! !\r!RVMKiviatController methodsFor: 'accessing' stamp: 'ssa 11/11/2008 18:31'!\rscalerAdjusters: anObject\r\t\"Set the value of scalerAdjusters\"\r\r\tscalerAdjusters _ anObject! !\r!RVMMultiAspectKiviatController methodsFor: 'control activity' stamp: 'ssa 10/7/2008 18:42'!\raddCoreAspect\r\t| menu selectedAspect |\r\tself view topView dontDisplayWhile:[\rmenu := CustomMenu new.\r RVMMulticoreSample coreAspects do:[:aspect|\r\t\t\tmenu add:  aspect action: aspect].\r\t\t\tselectedAspect := menu startUp: nil withCaption: 'Select a core aspect to monitor' at: Sensor cursorPoint.\r\t\t\tselectedAspect notNil ifTrue:[ self view addAspect: selectedAspect]].\r\t\t\tself view drawOnCanvas.\r\t\t\tself view displayView\r\t\t\t! !\r!RVMMultiAspectKiviatController methodsFor: 'control activity' stamp: 'ssa 10/20/2008 10:26'!\rchangeRescaleCounter\r\t| result |\r\tself view dontDisplayWhile:[\r\tresult _ FillInTheBlank request:'How many samples between rescaling?' initialAnswer: self view rescaleCounterDefault printString.\r\tresult isNil ifFalse:[result _ result asNumber max:0.\r\tself view rescaleCounterDefault:result]].\r\tself view displayView! !\r!RVMMultiAspectKiviatController methodsFor: 'control activity' stamp: 'ssa 10/7/2008 19:52'!\rinspectView\r\rself view inspect! !\r!RVMMultiAspectKiviatController methodsFor: 'control activity' stamp: 'ssa 11/27/2008 14:00'!\rredButtonActivity\r\t\r\t\"((self view adjustScaleBox translateBy: self view insetDisplayBox origin)  containsPoint: Sensor cursorPoint) ifTrue:[Sensor waitNoButton.\r\t\tself spawnScaleAdjuster]\"! !\r!RVMMultiAspectKiviatController methodsFor: 'control activity' stamp: 'ssa 10/7/2008 18:55'!\rremoveAspect\r\t| menu selectedAspect |\r\tself view topView dontDisplayWhile:[\rmenu := CustomMenu new.\r self view aspects do:[:aspect|\r\t\t\tmenu add:  aspect action: aspect].\r\t\t\tselectedAspect := menu startUp: nil withCaption: 'Select aspect to remove:' at: Sensor cursorPoint.\r\t\t\tselectedAspect notNil ifTrue:[ self view removeAspect: selectedAspect].\r\t\t\t].\r\t\t\tself view drawOnCanvas.\r\t\t\tself view displayView\r! !\r!RVMMultiAspectKiviatController methodsFor: 'control activity' stamp: 'ssa 10/7/2008 19:06'!\rrescale\r\r\tself view resetScaling.\r\tself view displayView! !\r!RVMMultiAspectKiviatController methodsFor: 'control activity' stamp: 'ssa 11/12/2008 12:48'!\ryellowButtonActivity\r\t| menu answer |\r\tself view topView dontDisplayWhile:[\r\tmenu := CustomMenu new.\r\tmenu add:'Inspect View' action:#inspectView.\r\tmenu add:'Rescale' action:#rescale.\r\tmenu add:'Change Rescale Counter' action:#changeRescaleCounter.\r\tanswer := menu startUp: nil withCaption: '' at: Sensor cursorPoint].\r\tanswer notNil ifTrue:[self perform: answer]! !\r!RVMMultiAspectKiviatController methodsFor: 'menu messages' stamp: 'ssa 10/7/2008 19:38'!\rchangeAspect\r\r\t| menu answer newAspect |\rself view topView dontDisplayWhile:[\r\t\tmenu := CustomMenu new.\r\tmenu add: 'Core aspects' action: #core.\r\tmenu add: 'Test aspects' action: #testCore.\r\tanswer := menu startUp: nil withCaption: 'What kind of aspect would you like to monitor?' at: Sensor cursorPoint.\r\tanswer isNil ifTrue:[^self].\r\tnewAspect _ RVMMulticoreSample aspectFromUserUnder: answer.\r\tnewAspect isNil ifTrue:[^self].\r\tself view aspect = newAspect ifTrue:[^self].\r\tself view aspect: newAspect].\r\tself view resetScaling.\r\tself view drawOnCanvas.\r\tself view displayView! !\r!RVMMultiAspectKiviatController methodsFor: 'menu messages' stamp: 'ssa 5/12/2010 10:20'!\rspawnScaleAdjuster\r\r\t|  maxView minView topView resetScaleButton setToObservedButton autoScaleCheckBox height scalerIndex result |\r\t(self view scalers size  = 1 or:[self view commonScale])ifFalse:[result _ (PopUpMenu labelArray:self view aspects) startUpWithCaption:'Adjust the scale of which aspect?'.\r\t\tresult = 0 ifTrue:[^self].\r\t\tscalerIndex _ result]ifTrue:[scalerIndex _ 1].\r\tmaxView _ RVMValueEditorView  on: (view scalerAt: scalerIndex) valueGetter: [(view scalerAt: scalerIndex) max] valueSetter:[:v|(view scalerAt: scalerIndex) setMax:v. view drawOnCanvas; displayView] label:'max: '.\r\tmaxView lockGetter:#maxLocked; lockSetter:#maxLocked:.\r\tminView _ RVMValueEditorView  on: (view scalerAt: scalerIndex) valueGetter: [(view scalerAt: scalerIndex) min] valueSetter:[:v|(view scalerAt: scalerIndex) setMin:v.  view drawOnCanvas; displayView] label:'min: '.\r\tminView lockGetter:#minLocked; lockSetter:#minLocked:.\r\tresetScaleButton _ RVMButtonView label:'Reset scale to default' action:[(view scalerAt: scalerIndex) resetScaling.  view drawOnCanvas; displayView.  minView hear:nil.  maxView hear:nil].\r\tsetToObservedButton _ RVMButtonView label:'Set scale to observed values' action:[(view scalerAt: scalerIndex) setRangeToObserved.  view drawOnCanvas; displayView.  minView hear:nil.  maxView hear:nil].\r\tautoScaleCheckBox _ RVMCheckBoxView on: (view scalerAt: scalerIndex) label: 'Automatic Scaling' checkState: [(view scalerAt: scalerIndex) automaticScaling] whenChecked: [(view scalerAt: scalerIndex) automatic.  view drawOnCanvas; displayView.  minView hear:nil.  maxView hear:nil] whenUnchecked: [(view scalerAt: scalerIndex) manual. view drawOnCanvas; displayView.  minView hear:nil.  maxView hear:nil] monitor: true.\r\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\ttopView addSubView: minView.\r\ttopView addSubView: maxView below:  minView.\r\ttopView addSubView: resetScaleButton below:  maxView.\r\ttopView addSubView: setToObservedButton below:  resetScaleButton.\r\ttopView addSubView: autoScaleCheckBox below:  setToObservedButton.\r\tRVMMonitor forgetAll:{resetScaleButton. setToObservedButton. autoScaleCheckBox}.\r\ttopView label: (view aspects at: scalerIndex).\r\theight _ topView subViews size * 26.\r\ttopView minimumSize:200@height.\r\ttopView maximumSize: 200@height.\r\tself scalerAdjusters add: topView.\r\ttopView controller open! !\r!RVMMultiAspectKiviatController methodsFor: 'accessing' stamp: 'ssa 11/11/2008 18:32'!\rscalerAdjusters\r\t\"Answer the value of scalerAdjusters\"\r\r\tscalerAdjusters isNil ifTrue:[self scalerAdjusters: OrderedCollection new].\r\t^ scalerAdjusters! !\r!RVMMultiAspectKiviatController methodsFor: 'accessing' stamp: 'ssa 11/11/2008 18:31'!\rscalerAdjusters: anObject\r\t\"Set the value of scalerAdjusters\"\r\r\tscalerAdjusters _ anObject! !\r!RVMMultiAspectStripChartController methodsFor: 'menu messages' stamp: 'ssa 9/14/2008 21:49'!\reraseStrip\r\r\tself view eraseStrip! !\r!RVMMultiAspectStripChartController methodsFor: 'controlling' stamp: 'ssa 9/13/2008 17:44'!\rredButtonActivity\r\r\tself view displayView! !\r!RVMMultiAspectStripChartController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 15:15'!\ryellowButtonActivity\r\t| menu answer |\r\tself view dontDisplayWhile:[\r\tSensor yellowButtonPressed \r\t\tifTrue: [menu := CustomMenu new.\r\t\t\tmenu add: 'erase strip' action: #eraseStrip:.\r\t\t\tanswer := menu startUp:  nil withCaption: nil at: Sensor cursorPoint.\r\t\t\tanswer notNil ifTrue:[\r\t\t\t\tself perform: answer]]]! !\r!RVMMultiGroupLocatorController methodsFor: 'controlling' stamp: 'ssa 11/27/2008 13:44'!\rchangeSourceForGroupNumber: anIndex\r\t| menu action choices |\r\tmenu := CustomMenu new.\r\tchoices _ {'Object withAllSubclasses'. \r\t\t\t'View withAllSubclasses'.\r\t\t\t'Number allSubclasses'.\r\t\t\t#line.\r\t\t\t'String allInstances'.\r\t\t\t'Array allInstances'.\r\t\t\t'Collection allSubInstances' }.\r\tchoices do:[:choice|\r\t\tchoice = #line ifTrue:[menu addLine]\r\t\t\tifFalse:[menu add: choice action:choice]].\r\t\r\taction := menu startUp: nil withCaption: 'Select an expression to use for group #',(anIndex printString) at: Sensor cursorPoint.\r\taction notNil ifTrue:[self changeSourceSourcefromGroupNumber: anIndex to: action]! !\r!RVMMultiGroupLocatorController methodsFor: 'controlling' stamp: 'ssa 11/27/2008 13:47'!\rchangeSourceSourcefromGroupNumber: anIndex to: aString\rCursor wait showWhile:[\r\tself view sourceSourceForGroupNumber: anIndex put: aString.\r\tself view changed:#updateDisplay]! !\r!RVMMultiGroupLocatorController methodsFor: 'controlling' stamp: 'ssa 11/27/2008 13:53'!\ryellowButtonActivity\r\t| menu action choices index |\r\tself view topView dontDisplayWhile:[\r\tmenu := CustomMenu new.\r\tmenu add:'Inspect View' action:[self view inspect].\r\tmenu addLine.\r\tchoices _ view sources collect:[:each| 'Change #',(index _ view sources indexOf: each) printString, ': ',(view sourceSourceForGroupNumber:index)].\r\tchoices do:[:choice|\r\t\tchoice = #line ifTrue:[menu addLine]\r\t\t\tifFalse:[menu add: choice action: (choices indexOf: choice)]].\r\t\r\taction := menu startUp: nil withCaption: '' at: Sensor cursorPoint].\r\t(action isKindOf: BlockContext) ifTrue:[^action value].\r\taction notNil ifTrue:[self changeSourceForGroupNumber: action]! !\r!RVMAllCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 16:52'!\rcoreStats\r\t\"Answer the value of coreStats\"\r\r\tcoreStats isNil ifTrue:[self coreStats: OrderedCollection new].\r\t^coreStats! !\r!RVMAllCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 16:52'!\rcoreStats: anObject\r\t\"Set the value of coreStats\"\r\r\tcoreStats := anObject! !\r!RVMAllCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 16:52'!\rrawData\r\t\"Answer the value of rawData\"\r\r\trawData isNil ifTrue:[self rawData: nil].\r\t^rawData! !\r!RVMAllCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:11'!\rrawData: anObject\r\t\"Set the value of rawData\"\r\r\trawData := anObject! !\r!RVMAllCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 8/19/2008 11:34'!\rinitializeFastFrom: data forMessageNames: messageNames\r\t\"data is an array of arrays, each element comprising stats from a single core\"\r\t\r\tself rawData: data.\r\tdata do:[:each| self coreStats add: (RVMCPUCoreStats newFastFromData: each forMessageNames: messageNames)]\r\r! !\r!RVMAllCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 1/1/1970 00:05'!\rinitializeFastestFrom: data forMessageNames: messageNames\r\t\"data is an array of arrays, each element comprising stats from a single core\"\r\t\r\tself rawData: data.\r\tdata do:[:each| self coreStats add: (RVMCPUCoreStats newFastestFromData: each forMessageNames: messageNames)]\r\r! !\r!RVMAllCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 8/13/2008 17:25'!\rinitializeFrom: data forMessageNames: messageNames\r\t\"data is an array of arrays, each element comprising stats from a single core\"\r\t\r\tself rawData: data.\r\tdata do:[:each| self coreStats add: (RVMCPUCoreStats newFromData: each forMessageNames: messageNames)]\r\r! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 08:39'!\rallocationsSinceLastReadMostlys\r\t^self coreStats collect:[:each| each allocationsSinceLastReadMostly]! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:53'!\rallocationsSinceLastReadWrites\r\t^self coreStats collect:[:each| each allocationsSinceLastReadWrite]! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:52'!\rallocationsSinceLasts\r\t^self coreStats collect:[:each| each allocationsSinceLast]! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:19'!\rbytecodeCounts\r\t\"RVMMulticoreSample capture bytecodeCounts\"\r\t\"Answer the collection of bytecode counts during this sample\"\r\t\r\t^self coreStats collect:[:each| each bytecodesExecuted]! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/15/2008 15:37'!\rbytecodesPerMillisecond\r\t\"RVMMulticoreSample capture bytecodesPerMillisecond\"\r\t\"Answer the collection of ratios of bytecodes executed per millisecond during this sample\"\r\t\r\t^self coreStats collect:[:each| each bytecodesPerMillisecond]! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:24'!\rbytecodesPerSecond\r\t\"RVMMulticoreSample capture bytecodesPerSecond\"\r\t\"Answer the collection of ratios of bytecodes executed per second during this sample\"\r\t\r\t^self coreStats collect:[:each| each bytecodesPerSecond]! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 08:39'!\rbytesLeftReadMostlys\r\t^self coreStats collect:[:each| each bytesLeftReadMostly]! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:50'!\rbytesLeftReadWrites\r\t^self coreStats collect:[:each| each bytesLeftReadWrite]! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:49'!\rbytesLefts\r\t^self coreStats collect:[:each| each bytesLeft]! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 08:38'!\rbytesUsedReadMostlys\r\t^self coreStats collect:[:each| each bytesUsedReadMostly]! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:48'!\rbytesUsedReadWrites\r\t^self coreStats collect:[:each| each bytesUsedReadWrite]! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 1/1/1970 00:07'!\rbytesUseds\r\t^self coreStats collect:[:each| each bytesUsed]! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 08:39'!\rcompactionsSinceLastReadMostlys\r\t^self coreStats collect:[:each| each compactionsSinceLastReadMostly]! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:54'!\rcompactionsSinceLastReadWrites\r\t^self coreStats collect:[:each| each compactionsSinceLastReadWrite]! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:54'!\rcompactionsSinceLasts\r\t^self coreStats collect:[:each| each compactionsSinceLast]! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:07'!\rcontextChangeCounts\r\t\"RVMMulticoreSample capture contextChangeCounts\"\r\t\"Answer the collection of contextChanges during this sample\"\r\t\r\t^self coreStats collect:[:each| each contextChangeCount]! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:52'!\rcyclesRunWaitRatios\r\t\"RVMMulticoreSample capture cyclesRunWaitRatios\"\r\t\"Answer the collection of ratios during this sample\"\r\t\r\t^self coreStats collect:[:each| each cyclesRunWaitRatio]! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:48'!\rcyclesRunnings\r\t\"RVMMulticoreSample capture cyclesRunnings\"\r\t\"Answer the collection of cyclesRunning counts during this sample\"\r\t\r\t^self coreStats collect:[:each| each cyclesRunning]! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/15/2008 15:41'!\rcyclesSinceLasts\r\t\"RVMMulticoreSample capture cyclesSinceLasts\"\r\t\"Answer the collection of cyclesSinceLasts counts during this sample\"\r\t\r\t^self coreStats collect:[:each| each cyclesSinceLast]! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:48'!\rcyclesWaitings\r\t\"RVMMulticoreSample capture cyclesWaitings\"\r\t\"Answer the collection of cyclesWaiting counts during this sample\"\r\t\r\t^self coreStats collect:[:each| each cyclesWaiting]! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:06'!\rinterruptCheckCounts\r\t\"RVMMulticoreSample capture yieldCounts\"\r\t\"Answer the collection of yields during this sample\"\r\t\r\t^self coreStats collect:[:each| each interruptCheckCount]! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:06'!\rmillisecondsRunnings\r\t\"RVMMulticoreSample capture millisecondsRunnings\"\r\t\"Answer the collection of millisecondsRunning counts during this sample\"\r\t\r\t^self coreStats collect:[:each| each millisecondsRunning]! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:37'!\rmillisecondsWaitings\r\t\"RVMMulticoreSample capture millisecondsWaitings\"\r\t\"Answer the collection of millisecondsWaiting counts during this sample\"\r\t\r\t^self coreStats collect:[:each| each millisecondsWaiting]! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:43'!\rmsRunWaitRatios\r\t\"RVMMulticoreSample capture msRunWaitRatios\"\r\t\"Answer the collection of ratios during this sample\"\r\t\r\t^self coreStats collect:[:each| each msRunWaitRatio]! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/15/2008 15:29'!\rmsSinceLasts\r\t\"RVMMulticoreSample capture msSinceLasts\"\r\t\"Answer the collection of msSinceLasts counts during this sample\"\r\t\r\t^self coreStats collect:[:each| each msSinceLast]! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:03'!\rreceiveTallySum\r\t| tallies sum s |\r\ttallies := self coreStats\r\t\t\t\tcollect: [:each | each receiveTally].\r\tsum := Array new: (tallies at: 1) rawData size.\r\t1\r\t\tto: sum size\r\t\tdo: [:i | \r\t\t\ts := 0.\r\t\t\t1\r\t\t\t\tto: tallies size\r\t\t\t\tdo: [:j | s := s\r\t\t\t\t\t\t\t\t+ ((tallies at: j) rawData\r\t\t\t\t\t\t\t\t\t\tat: i)].\r\t\t\tsum at: i put: s].\r\t^ sum! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 3/27/2009 16:53'!\rsendTallySums\r\t\"Answer an array with the sum of all my send tallies in order from all my coreStats\"\r\t| sums stats |\r\tsums _ self coreStats first sendTallySums.\r\t2 to: self coreStats size do:[:index| \r\t\tstats _ self coreStats at: index.\r\t\tsums _ sums + stats sendTallySums].\r\t^sums! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 3/27/2009 16:27'!\rsendTallySumsDictionary\r\t\"Answer a dictionary with the sums of all my send tallies from all my coreStats associated with their name\"\r\t| dict keys values |\r\tdict _ Dictionary new.\r\tkeys _ RVMCoreMessageTally tallyOrder.\r\tvalues _ self sendTallySums.\r\tkeys with: values do:[:key :value| dict at: key put: value].\r\t^dict! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 3/26/2009 09:55'!\rsendTallySumsSorted\r\t\"Answer a sorted collection with the sums of all my send tallies from all my coreStats associated with their name\"\r\t^self sendTallySumsDictionary associations asSortedCollection:[:a :b| a value > b value]! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 3/27/2009 17:06'!\rsendTallySumsSortedReport\r\t\"Answer a string to be used as a report of the sorted send tally sums\"\r\t| report |\r\treport _ 'Sorted Send Tallies for all cores',String crlf,'--------------------------',String crlf.\r\tself sendTallySumsSorted do:[:assoc| report _ report, assoc value printString,'  ',assoc key,String crlf].\r\t^report! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:07'!\runforcedInterruptCheckCounts\r\t\"RVMMulticoreSample capture yieldCounts\"\r\t\"Answer the collection of yields during this sample\"\r\t\r\t^self coreStats collect:[:each| each unforcedInterruptCheckCount]! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/14/2008 17:17'!\ryieldCounts\r\t\"RVMMulticoreSample capture yieldCounts\"\r\t\"Answer the collection of yields during this sample\"\r\t\r\t^self coreStats collect:[:each| each yieldCount]! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:16'!\ryieldFrequencies\r\t\"RVMMulticoreSample capture yieldFrequencies\"\r\t\r\t^self coreStats collect:[:each| each yieldFrequency]! !\r!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:37'!\ryieldsPerSecond\r\t\"RVMMulticoreSample capture yieldsPerSecond\"\r\t\"Answer the collection of ratios of yields  per second during this sample\"\r\t\r\t^self coreStats collect:[:each| each yieldsPerSecond]! !\r!RVMAllCPUCoreStats methodsFor: 'DNU hacks' stamp: 'ssa 3/27/2009 17:26'!\rdoesNotUnderstand: aMessage\r\t\"Hack DNU to install measurement mesages for tally aspects\"\r\t\r\t| code tallyAspect |\r\t(aMessage selector first: 5) = 'sumOf' ifTrue:[\r\t\ttallyAspect _ aMessage selector last: aMessage selector - 5.\r\t\ttallyAspect at: 1 put: tallyAspect first asLowercase.\r\t(RVMMulticoreSample coreTallyAspects includes: tallyAspect)\r\t\tifFalse:[^super doesNotUnderstand: aMessage].\r\tcode _ aMessage selector,'\r\t\"Answer the sum for this tally aspect from all cores\"\r\t^self sendTallySumsDictionary at: #',tallyAspect.\r\tself class compile: code classified: 'tallying' notifying: nil.\r\t^self perform: aMessage selector].\r\t^super doesNotUnderstand: aMessage! !\r!RVMAllCPUCoreStats class methodsFor: 'instance creation' stamp: 'ssa 8/19/2008 11:33'!\rnewFastFrom: data forMessageNames: messageNames\r\t\"Answer a new instance of me using this data, which is a collection of arrays of core stats\"\r\t| stats |\r\tstats := self new.\r\tstats initializeFastFrom: data forMessageNames: messageNames.\r\t^stats! !\r!RVMAllCPUCoreStats class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:05'!\rnewFastestFrom: data forMessageNames: messageNames\r\t\"Answer a new instance of me using this data, which is a collection of arrays of core stats\"\r\t| stats |\r\tstats := self new.\r\tstats initializeFastestFrom: data forMessageNames: messageNames.\r\t^stats! !\r!RVMAllCPUCoreStats class methodsFor: 'instance creation' stamp: 'ssa 8/13/2008 17:26'!\rnewFrom: data forMessageNames: messageNames\r\t\"Answer a new instance of me using this data, which is a collection of arrays of core stats\"\r\t| stats |\r\tstats := self new.\r\tstats initializeFrom: data forMessageNames: messageNames.\r\t^stats! !\r!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:07'!\rcyclesSinceLastQuery\r\t\"Answer the value of cyclesSinceLastQuery\"\r\r\tcyclesSinceLastQuery isNil ifTrue:[self cyclesSinceLastQuery: 0].\r\t^cyclesSinceLastQuery! !\r!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:07'!\rcyclesSinceLastQuery: anObject\r\t\"Set the value of cyclesSinceLastQuery\"\r\r\tcyclesSinceLastQuery := anObject! !\r!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 18:22'!\rmemorySystemStats\r\t\"Answer the value of memorySystemStats\"\r\r\tmemorySystemStats isNil ifTrue:[self memorySystemStats: RVMMemorySystemStats new].\r\t^memorySystemStats! !\r!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:07'!\rmemorySystemStats: anObject\r\t\"Set the value of memorySystemStats\"\r\r\tmemorySystemStats := anObject! !\r!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:49'!\rmessageNames\r\t\"Answer the value of messageNames\"\r\r\tmessageNames isNil ifTrue:[self messageNames: nil].\r\t^messageNames! !\r!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:49'!\rmessageNames: anObject\r\t\"Set the value of messageNames\"\r\r\tmessageNames := anObject! !\r!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:08'!\rmillisecondsSinceLastQuery\r\t\"Answer the value of millisecondsSinceLastQuery\"\r\r\tmillisecondsSinceLastQuery isNil ifTrue:[self millisecondsSinceLastQuery: 0].\r\t^millisecondsSinceLastQuery! !\r!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:07'!\rmillisecondsSinceLastQuery: anObject\r\t\"Set the value of millisecondsSinceLastQuery\"\r\r\tmillisecondsSinceLastQuery := anObject! !\r!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:58'!\rmyRank\r\t\"Answer the value of myRank\"\r\r\tmyRank isNil ifTrue:[self myRank: nil].\r\t^myRank! !\r!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:58'!\rmyRank: anObject\r\t\"Set the value of myRank\"\r\r\tmyRank := anObject! !\r!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:58'!\rmyX\r\t\"Answer the value of myX\"\r\r\tmyX isNil ifTrue:[self myX: nil].\r\t^myX! !\r!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:58'!\rmyX: anObject\r\t\"Set the value of myX\"\r\r\tmyX := anObject! !\r!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:58'!\rmyY\r\t\"Answer the value of myY\"\r\r\tmyY isNil ifTrue:[self myY: nil].\r\t^myY! !\r!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:58'!\rmyY: anObject\r\t\"Set the value of myY\"\r\r\tmyY := anObject! !\r!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 11/16/2008 15:54'!\robjectTableStats\r\t\"Answer the value of objectTableStats\"\r\r\tobjectTableStats isNil ifTrue:[self objectTableStats: RVMObjectTableStats new].\r\t^objectTableStats! !\r!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 11/16/2008 15:54'!\robjectTableStats: anObject\r\t\"Set the value of objectTableStats\"\r\r\tobjectTableStats := anObject! !\r!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:49'!\rrawData\r\t\"Answer the value of rawData\"\r\r\trawData isNil ifTrue:[self rawData: nil].\r\t^rawData! !\r!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rrawData: anObject\r\t\"Set the value of rawData\"\r\r\trawData := anObject! !\r!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:12'!\rreceiveTally\r\t\"Answer the value of receiveTally\"\r\r\treceiveTally isNil ifTrue:[self receiveTally: nil].\r\t^receiveTally! !\r!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:12'!\rreceiveTally: anObject\r\t\"Set the value of receiveTally\"\r\r\treceiveTally := anObject! !\r!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 18:20'!\rsendTallies\r\t\"Answer the value of sendTallies\"\r\r\tsendTallies isNil ifTrue:[self sendTallies: OrderedCollection new].\r\t^sendTallies! !\r!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:07'!\rsendTallies: anObject\r\t\"Set the value of sendTallies\"\r\r\tsendTallies := anObject! !\r!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 18:11'!\rsqueakInterpreterStats\r\t\"Answer the value of squeakInterpreterStats\"\r\r\tsqueakInterpreterStats isNil ifTrue:[self squeakInterpreterStats: RVMSqueakInterpreterStats new].\r\t^squeakInterpreterStats! !\r!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:07'!\rsqueakInterpreterStats: anObject\r\t\"Set the value of squeakInterpreterStats\"\r\r\tsqueakInterpreterStats := anObject! !\r!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 8/19/2008 11:22'!\rinitializeCoreStatsFrom: data\r\t| valueMap objectMap target |\r\tvalueMap := { \r\t\t\t\t'x' -> #myX:.\r\t\t\t\t'y' -> #myY:.\r\t\t\t\t'rank' -> #myRank:.\r\t\t\t\t}.\r\tobjectMap := {\r\t\t\t\t'sendTalliesByCore' -> #initializeSendTalliesFrom:.\r\t\t\t\t'receiveTallies' -> #initializeReceiveTalliesFrom:.\t\t\t\r\t\t\t\t}.\r\ttarget := self.\r\t\t\t\t\r\tself processMap: valueMap into: target forData: data.\r\tself processMap: objectMap into: target forData: data.! !\r!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'dmu 1/1/1970 01:09'!\rinitializeFastCoreStatsFrom: data\r\r\tself myX: (data at: 2).\r\tself myY: (data at: 4).\r\tself myRank: (data at: 6).\r\t\r\tself initializeFastSendTalliesFrom: (data at: 8).\r\tself initializeFastReceiveTalliesFrom: (data at: 10).\r\t\r\t! !\r!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 11/16/2008 15:47'!\rinitializeFastFrom: data\r\t\"This implementations assumes order dependency in the array for speed.  \r\t\r\tSet my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\r\t\r\t| target |\r\tself rawData: data.\r\ttarget := self.\r\ttarget millisecondsSinceLastQuery: (data at: 2).\r\ttarget cyclesSinceLastQuery: (data at: 4).\r\ttarget initializeFastCoreStatsFrom: (data at: 6).\r\ttarget initializeFastMemorySystemStatsFrom: (data at: 8).\r\ttarget initializeFastSqueakInterpreterStatsFrom: (data at: 10).\r\ttarget initializeFastObjectTableStatsFrom: (data at: 12).\r! !\r!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 1/1/1970 00:06'!\rinitializeFastMemorySystemStatsFrom: data\r\t\"This implementations assumes order dependency in the array for speed.  \r\t\r\tSet my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\r\t\r\t| target |\r\ttarget := self memorySystemStats.\r\ttarget gcCount: (data at: 2).\r\ttarget gcMilliseconds: (data at: 4).\r\ttarget gcCycles: (data at: 6).\r\tself  initializeFastReadWriteHeapStatsFrom: (data at: 8).\r\tself initializeFastReadMostlyHeapStatsFrom: (data at: 10).\r\t! !\r!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 11/16/2008 15:53'!\rinitializeFastObjectTableStatsFrom: data\r\t\"This implementations assumes order dependency in the array for speed.\r\t\r\tSet my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\r\t\r\t| target |\r\ttarget := self objectTableStats.\r\ttarget allocatedEntryCount: (data at: 2).\r\ttarget entryCount: (data at: 4).\r\ttarget allocationsSinceLastQuery: (data at: 6).\r\ttarget entriesFreedSinceLastQuery: (data at: 8).\r\t! !\r!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 1/1/1970 00:54'!\rinitializeFastReadMostlyHeapStatsFrom: data\r\t\"This implementations assumes order dependency in the array for speed.\r\t\r\tSet my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\r\t\r\t|  target |\r\ttarget := self memorySystemStats readMostlyHeapStats.\r\ttarget bytesUsed: (data at: 2).\r\ttarget bytesLeft: (data at: 4).\r\ttarget allocationsSinceLastQuery: (data at: 4).\r\ttarget compactionsSinceLastQuery: (data at: 8).\r\t! !\r!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 1/1/1970 00:54'!\rinitializeFastReadWriteHeapStatsFrom: data\r\t\"This implementations assumes order dependency in the array for speed.\r\t\r\tSet my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\r\t\r\t|  target |\r\ttarget := self memorySystemStats readWriteHeapStats.\r\ttarget bytesUsed: (data at: 2).\r\ttarget bytesLeft: (data at: 4).\r\ttarget allocationsSinceLastQuery: (data at: 4).\r\ttarget compactionsSinceLastQuery: (data at: 8).\r\t! !\r!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 8/19/2008 11:21'!\rinitializeFastReceiveTalliesFrom: data\r\t\"data looks like #(395 0 0 1041 1 520 0 0 0 121 0 1 0 1 0 1 28741 10 1 0)\r\tnumber of elements based on number of messages tallied\"\r\t\r\tself receiveTally: (RVMCoreMessageTally fastForData: data)! !\r!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 3/25/2009 14:19'!\rinitializeFastSendTalliesFrom: data\r\t\"data USED TO looks like \r\t\t#('send_tallies' #(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)\r\t\t'send_tallies' #(4 0 0 0 0 4 0 0 0 0 0 0 0 0 0 0 11 0 0 0) \r\t\t... as many as we have cores being used)\r\t\tnumber of elements based on number of messages tallied\"\r\t\"NOW DATA LOOKS LIKE #(0 0 0 4290 0 0 0 0 0 4840 0 0 55 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 11 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 322 0 0)\"\r\t\r\t\"OLD CODE\r\t2 to: data size by: 2 do:[:index|\r\t\tself sendTallies add: (RVMCoreMessageTally fastForData: (data at: index))]\"\r\t\r\t\"NEW CODE\"\r\tself sendTallies add: (RVMCoreMessageTally fastForData: data )! !\r!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 9/9/2008 22:40'!\rinitializeFastSqueakInterpreterStatsFrom: data\r\t\"This implementations assumes order dependency in the array for speed.  \r\t\r\tSet my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\r\t\r\t|  target |\r\ttarget := self squeakInterpreterStats.\r\ttarget bytecodesExecuted: (data at: 2).\r\ttarget yieldCount: (data at: 4).\r\"\ttarget millisecondsRunning: (data at: 6).\r\ttarget millisecondsWaiting: (data at: 8).\"\r\ttarget cyclesRunning: (data at: 6).\r\ttarget cyclesWaiting: (data at: 8).\r\ttarget contextChangeCount: (data at: 10).\r\ttarget interruptCheckCount: (data at: 12).\r\ttarget unforcedInterruptCheckCount: (data at: 14)\r\t! !\r!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 1/1/1970 00:07'!\rinitializeFastestCoreStatsFrom: data\r\t\"skip the tallies for speed\"\r\tself myX: (data at: 2).\r\tself myY: (data at: 4).\r\tself myRank: (data at: 6).\r\t\r\"\tself initializeFastSendTalliesFrom: (data at: 8).\r\tself initializeFastReceiveTalliesFrom: (data at: 10).\"\r\t\r\t! !\r!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 11/16/2008 15:48'!\rinitializeFastestFrom: data\r\t\"This implementations assumes order dependency in the array for speed.  \r\t\r\tSet my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\r\t\r\t| target |\r\tself rawData: data.\r\ttarget := self.\r\ttarget millisecondsSinceLastQuery: (data at: 2).\r\ttarget cyclesSinceLastQuery: (data at: 4).\r\ttarget initializeFastestCoreStatsFrom: (data at: 6).\r\ttarget initializeFastMemorySystemStatsFrom: (data at: 8).\r\ttarget initializeFastSqueakInterpreterStatsFrom: (data at: 10).\r\ttarget initializeFastObjectTableStatsFrom: (data at: 12).\r\t! !\r!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 11/16/2008 15:48'!\rinitializeFrom: data\r\t\"Set my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  This implementations assumes no order dependency in the array except that values always follow their names.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\r\t\r\t| valueMap objectMap target |\r\tself rawData: data.\r\tvalueMap := { \r\t\t\t\t'millisecs' -> #millisecondsSinceLastQuery:.\r\t\t\t\t'cycles' -> #cyclesSinceLastQuery:.\r\t\t\t\t}.\r\tobjectMap := {\r\t\t\t\t'coreStats' -> #initializeCoreStatsFrom:.\r\t\t\t\t'memorySystemStats' -> #initializeMemorySystemStatsFrom:.\r\t\t\t\t'interpreterStats' -> #initializeSqueakInterpreterStatsFrom:.\r\t\t\t\t'objectTableStats' -> #initializeFastObjectTableStatsFrom:.\r\t\t\t\t}.\r\ttarget := self.\r\t\t\t\t\r\tself processMap: valueMap into: target forData: data.\r\tself processMap: objectMap into: target forData: data.! !\r!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 1/1/1970 00:04'!\rinitializeMemorySystemStatsFrom: data\r\t\"Set my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  This implementations assumes no order dependency in the array except that values always follow their names.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\r\t\r\t| valueMap target |\r\tself rawData: data.\r\tvalueMap := { \r\t\t\t\t'gcCount' -> #gcCount:.\r\t\t\t\t'gcMilliseconds' -> #gcMilliseconds:.\r\t\t\t\t'gcCycles' -> #gcCycles:.\r\t\t\t\t'readWriteHeapStats' -> #initializeReadWriteHeapStatsFrom:.\r\t\t\t\t'readMostlyHeapStats' -> #initializeReadMostlyHeapStatsFrom:.\r\t\t\t\t}.\r\r\ttarget := self memorySystemStats.\r\t\t\t\t\r\tself processMap: valueMap into: target forData: data.\r! !\r!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 11/16/2008 15:50'!\rinitializeObjectTableStatsFrom: data\r\t\"Set my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  This implementations assumes no order dependency in the array except that values always follow their names.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\r\t\r\t| valueMap objectMap target |\r\tvalueMap := { \r\t\t\t\t'allocatedEntryCount[rank]' -> #allocatedEntryCount:.\r\t\t\t\t'entryCount[rank]' -> #entryCount:.\r\t\t\t\t'allocationsSinceLastQuery[rank]' -> #allocationsSinceLastQuery:.\r\t\t\t\t'entriesFreedSinceLastQuery[rank]' -> #entriesFreedSinceLastQuery:.\r\t\t\t\t}.\r\tobjectMap := {}.\r\ttarget := self objectTableStats.\r\t\t\t\t\r\tself processMap: valueMap into: target forData: data.\r\tself processMap: objectMap into: target forData: data.! !\r!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 1/1/1970 00:54'!\rinitializeReadMostlyHeapStatsFrom: data\r\t\"Set my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  This implementations assumes no order dependency in the array except that values always follow their names.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\r\t\r\t| valueMap  target |\r\tvalueMap := { \r\t\t\t\t'bytesUsed()' -> #bytesUsed:.\r\t\t\t\t'bytesLeft()' -> #bytesLeft:.\r\t\t\t\t'allocationsSinceLastQuery' -> #allocationsSinceLastQuery:.\r\t\t\t\t'compactionsSinceLastQuery' -> #compactionsSinceLastQuery:.\r\t\t\t\t}.\r\ttarget := self memorySystemStats readMostlyHeapStats.\r\t\t\t\t\r\tself processMap: valueMap into: target forData: data.\r! !\r!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 1/1/1970 00:54'!\rinitializeReadWriteHeapStatsFrom: data\r\t\"Set my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  This implementations assumes no order dependency in the array except that values always follow their names.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\r\t\r\t| valueMap  target |\r\tvalueMap := { \r\t\t\t\t'bytesUsed()' -> #bytesUsed:.\r\t\t\t\t'bytesLeft()' -> #bytesLeft:.\r\t\t\t\t'allocationsSinceLastQuery' -> #allocationsSinceLastQuery:.\r\t\t\t\t'compactionsSinceLastQuery' -> #compactionsSinceLastQuery:.\r\t\t\t\t}.\r\ttarget := self memorySystemStats readWriteHeapStats.\r\t\t\t\t\r\tself processMap: valueMap into: target forData: data.\r! !\r!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 8/13/2008 18:21'!\rinitializeReceiveTalliesFrom: data\r\t\"data looks like #(395 0 0 1041 1 520 0 0 0 121 0 1 0 1 0 1 28741 10 1 0)\r\tnumber of elements based on number of messages tallied\"\r\t\r\tself receiveTally: (RVMCoreMessageTally forMessageNames: self messageNames andData: data)! !\r!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 8/19/2008 11:31'!\rinitializeSendTalliesFrom: data\r\t\"data looks like \r\t\t#('send_tallies' #(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)\r\t\t'send_tallies' #(4 0 0 0 0 4 0 0 0 0 0 0 0 0 0 0 11 0 0 0) \r\t\t... as many as we have cores being used)\r\t\tnumber of elements based on number of messages tallied\"\r\t\r\t| tally |\r\tdata do:[:each|\r\t\teach = 'sendTallies' ifFalse:[\r\t\t\ttally := RVMCoreMessageTally forMessageNames: self messageNames andData: each.\r\t\t\tself sendTallies add: tally]]! !\r!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 9/9/2008 22:24'!\rinitializeSqueakInterpreterStatsFrom: data\r\t\"Set my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  This implementations assumes no order dependency in the array except that values always follow their names.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\r\t\r\t| valueMap target |\r\tself rawData: data.\r\tvalueMap := { \r\t\t\t\t'bytecodesExecuted' -> #bytecodesExecuted:.\r\t\t\t\t'yieldCount' -> #yieldCount:.\r\t\t\t\t'contextChangeCount' -> #contextChangeCount:.\r\t\t\t\t\"'millisecondsRunning' -> #millisecondsRunning:.\"\r\t\t\t\t\"'millisecondsWaiting' -> #millisecondsWaiting:.\"\r\t\t\t\t'cyclesRunning' -> #cyclesRunning:.\r\t\t\t\t'cyclesWaiting' -> #cyclesWaiting:.\r\t\t\t\t'contextChangeCount' -> #contextChangeCount:.\r\t\t\t\t'interruptCheckCount' -> #interruptCheckCount:.\r\t\t\t\t'unforcedInterruptCheckCount' -> #unforcedInterruptCheckCount:.\r\t\t\t\t}.\r\r\ttarget := self squeakInterpreterStats.\r\t\t\t\t\r\tself processMap: valueMap into: target forData: data.\r! !\r!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'dmu 8/15/2008 21:03'!\rprocessMap: map into: targetObject forData: data\r\t\t\t\t\r\t| index datum |\r\tmap do:[:assoc |\r\t\tindex := data indexOf: assoc key.\r\t\tindex = 0 ifTrue:[\r\t\t\tassoc key = 'receiveTallies' ifFalse:[self error:'Can''t find ',assoc key,' in sample data']].\r\t\tdatum := data at: index + 1.\r\t\ttargetObject perform: assoc value with: datum].\r! !\r!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:52'!\rallocationsSinceLast\r\t^self allocationsSinceLastReadWrite + self allocationsSinceLastReadMostly! !\r!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:56'!\rallocationsSinceLastReadMostly\r\t^self memorySystemStats readMostlyHeapStats allocationsSinceLastQuery! !\r!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:56'!\rallocationsSinceLastReadWrite\r\t^self memorySystemStats readWriteHeapStats allocationsSinceLastQuery! !\r!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:18'!\rbytecodesExecuted\r\t\"Answer the count of bytecodes executed during this sample\"\r\t\r\t^self squeakInterpreterStats bytecodesExecuted! !\r!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 9/17/2010 15:18'!\rbytecodesPerMillisecond\r\t\"Answer the ratio of bytecodes executed per ms during this sample\"\r\t\r\t^(self squeakInterpreterStats bytecodesExectued / (1 max: self millisecondsSinceLastQuery) asFloat ) rounded! !\r!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 9/17/2010 15:18'!\rbytecodesPerSecond\r\t\"Answer the ratio of bytecodes executed per second during this sample\"\r\tself millisecondsSinceLastQuery = 0 ifTrue:[^0].\r\t\r\t^(self squeakInterpreterStats bytecodesExecuted / (1 max: self millisecondsSinceLastQuery) asFloat * 1000) rounded! !\r!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:49'!\rbytesLeft\r\t^self bytesLeftReadWrite + self bytesLeftReadMostly! !\r!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:49'!\rbytesLeftReadMostly\r\t^self memorySystemStats readMostlyHeapStats bytesLeft ! !\r!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:49'!\rbytesLeftReadWrite\r\t^self memorySystemStats readWriteHeapStats bytesLeft ! !\r!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:45'!\rbytesUsed\r\t^self bytesUsedReadWrite + self bytesUsedReadMostly! !\r!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:44'!\rbytesUsedReadMostly\r\t^self memorySystemStats readMostlyHeapStats bytesUsed ! !\r!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 1/1/1970 00:54'!\rbytesUsedReadWrite\r\t^self memorySystemStats readWriteHeapStats bytesUsed ! !\r!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:54'!\rcompactionsSinceLast\r\t^self compactionsSinceLastReadWrite + self compactionsSinceLastReadMostly! !\r!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:57'!\rcompactionsSinceLastReadMostly\r\t^self memorySystemStats readMostlyHeapStats compactionsSinceLastQuery! !\r!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:56'!\rcompactionsSinceLastReadWrite\r\t^self memorySystemStats readWriteHeapStats compactionsSinceLastQuery! !\r!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:08'!\rcontextChangeCount\r\t\"Answer the count of yields  during this sample\"\r\t\r\t^self squeakInterpreterStats contextChangeCount! !\r!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:53'!\rcyclesRunWaitRatio\r\t\"Answer the ratio between my cyclesRunning and cyclesWaiting\"\r\t\r\t^self squeakInterpreterStats cyclesRunWaitRatio! !\r!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:46'!\rcyclesRunning\r\t\"Answer the count of cycles spent running during this sample\"\r\t\r\t^self squeakInterpreterStats cyclesRunning! !\r!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/15/2008 15:41'!\rcyclesSinceLast\r\t\"Answer the count of cycles since last sample\"\r\t\r\t^self cyclesSinceLastQuery! !\r!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:46'!\rcyclesWaiting\r\t\"Answer the count of cycles spect waiting during this sample\"\r\t\r\t^self squeakInterpreterStats cyclesWaiting! !\r!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:06'!\rinterruptCheckCount\r\t\"Answer the count of yields  during this sample\"\r\t\r\t^self squeakInterpreterStats interruptCheckCount! !\r!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:34'!\rmillisecondsRunning\r\t\"Answer the count of ms spent running during this sample\"\r\t\r\t^self squeakInterpreterStats millisecondsRunning! !\r!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:53'!\rmillisecondsWaiting\r\t\"Answer the count of ms spect waiting during this sample\"\r\t\r\t^self squeakInterpreterStats millisecondsWaiting! !\r!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:43'!\rmsRunWaitRatio\r\t\"Answer the ratio between my msRunning and msWaiting\"\r\t\r\t^self squeakInterpreterStats msRunWaitRatio! !\r!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/15/2008 15:27'!\rmsSinceLast\r\t\"Answer the count of ms since last sample\"\r\t\r\t^self millisecondsSinceLastQuery! !\r!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 3/27/2009 16:55'!\rsendTallySums\r\t\"Answer an array with the sum of all my send tallies in order\"\r\t| sums tally |\r\tself sendTallies isEmpty ifTrue:[^#()].\r\tsums _ self sendTallies first talliesInOrder.\r\t2 to: self sendTallies size do:[:index| \r\t\ttally _ self sendTallies at: index.\r\t\tsums _ sums + tally talliesInOrder].\r\t^sums! !\r!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:06'!\runforcedInterruptCheckCount\r\t\"Answer the count of yields  during this sample\"\r\t\r\t^self squeakInterpreterStats unforcedInterruptCheckCount! !\r!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/14/2008 17:16'!\ryieldCount\r\t\"Answer the count of yields  during this sample\"\r\t\r\t^self squeakInterpreterStats yieldCount! !\r!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:17'!\ryieldFrequency\r\t\r\t^self squeakInterpreterStats yieldFrequency! !\r!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 9/17/2010 15:19'!\ryieldsPerSecond\r\t\"Answer the ratio of yields per second during this sample\"\r\t\r\t^(self squeakInterpreterStats yieldCount / (1 max: self millisecondsSinceLastQuery) asFloat * 1000) rounded! !\r!RVMCPUCoreStats class methodsFor: 'instance creation' stamp: 'ssa 8/19/2008 10:57'!\rnewFastFromData: data forMessageNames: messageNames\r\r\t| stats |\r\tstats := self new.\r\tstats messageNames: messageNames.\r\tstats initializeFastFrom: data.\r\t^stats! !\r!RVMCPUCoreStats class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:05'!\rnewFastestFromData: data forMessageNames: messageNames\r\r\t| stats |\r\tstats := self new.\r\tstats messageNames: messageNames.\r\tstats initializeFastestFrom: data.\r\t^stats! !\r!RVMCPUCoreStats class methodsFor: 'instance creation' stamp: 'ssa 8/13/2008 17:49'!\rnewFromData: data forMessageNames: messageNames\r\r\t| stats |\r\tstats := self new.\r\tstats messageNames: messageNames.\r\tstats initializeFrom: data.\r\t^stats! !\r!RVMCircularCollection methodsFor: 'add/remove elements' stamp: 'ssa 1/1/1970 00:03'!\radd: anObject\r\t\"Add this object to my collection, increment the lastIndex, adjust if there is a rollover.\"\r\tself begin = 0 ifTrue:[ \"I have no elements, add the first one\"\r\t\tself begin:1.\r\t\tself end: 1]\r\tifFalse:[ \"I have elements, add one more and adjust if needed\"\r\t\tself numberOfElements = self size\r\t\t\tifTrue:[\"need to rollover the first element\"\r\t\t\t\tself begin = self size \"adjust begin and end\"\r\t\t\t\t\tifTrue:[self begin: 1.\r\t\t\t\t\t\tself end: self size]\r\t\t\t\t\tifFalse:[self end: self begin.\r\t\t\t\t\t\tself begin: self begin + 1]]\r\t\t\tifFalse:[\"no rollover needed\"\r\t\t\t\tself end: (self end + 1 min: self size)]].\r\tself array at: self end put: anObject.\r\tself incrementElements\r\t\t\t\t\r\t\t\t\t! !\r!RVMCircularCollection methodsFor: 'add/remove elements' stamp: 'ssa 1/1/1970 00:41'!\rremoveAll\r\tself begin: 0.\r\tself end: 0.\r\tself array:nil.\r\tself numberOfElements:0! !\r!RVMCircularCollection methodsFor: 'private' stamp: 'ssa 1/1/1970 00:53'!\rarray\r\t\"Answer the value of array\"\r\r\tarray isNil ifTrue:[self array: (Array new: self size)].\r\t^ array! !\r!RVMCircularCollection methodsFor: 'private' stamp: 'ssa 1/1/1970 00:38'!\rarray: anObject\r\t\"Set the value of array\"\r\r\tarray _ anObject! !\r!RVMCircularCollection methodsFor: 'private' stamp: 'ssa 1/1/1970 01:03'!\rbegin\r\t\"Answer the value of begin\"\r\r\tbegin isNil ifTrue:[self begin: 0].\r\t^ begin! !\r!RVMCircularCollection methodsFor: 'private' stamp: 'ssa 1/1/1970 01:02'!\rbegin: anObject\r\t\"Set the value of begin\"\r\r\tbegin _ anObject! !\r!RVMCircularCollection methodsFor: 'private' stamp: 'ssa 1/1/1970 00:04'!\rdecrementElements\r\r\tself numberOfElements: ((self numberOfElements - 1) max: 0)! !\r!RVMCircularCollection methodsFor: 'private' stamp: 'ssa 1/1/1970 01:03'!\rend\r\t\"Answer the value of end\"\r\r\tend isNil ifTrue:[self end: 0].\r\t^ end! !\r!RVMCircularCollection methodsFor: 'private' stamp: 'ssa 1/1/1970 01:02'!\rend: anObject\r\t\"Set the value of end\"\r\r\tend _ anObject! !\r!RVMCircularCollection methodsFor: 'private' stamp: 'ssa 1/1/1970 01:12'!\rincrementElements\r\r\tself numberOfElements: ((self numberOfElements + 1) min: self size)! !\r!RVMCircularCollection methodsFor: 'private' stamp: 'ssa 1/1/1970 01:03'!\rnumberOfElements\r\t\"Answer the value of numberOfElements\"\r\r\tnumberOfElements isNil ifTrue:[self numberOfElements: 0].\r\t^ numberOfElements! !\r!RVMCircularCollection methodsFor: 'private' stamp: 'ssa 1/1/1970 01:02'!\rnumberOfElements: anObject\r\t\"Set the value of numberOfElements\"\r\r\tnumberOfElements _ anObject! !\r!RVMCircularCollection methodsFor: 'private' stamp: 'ssa 10/18/2008 21:37'!\rrealIndexFor: index\r\t\"Answer the loop adjusted index value\"\r\t| realIndex |\r\tindex >  self size ifTrue:[realIndex _ index \\\\ self size]\r\t\t\tifFalse:[realIndex _ index].\r\trealIndex _ realIndex - 1 + self begin.\r\trealIndex > self size ifTrue:[realIndex _ realIndex - self size].\r\t^realIndex\r! !\r!RVMCircularCollection methodsFor: 'private' stamp: 'ssa 1/1/1970 00:52'!\rsize\r\t\"Answer the value of size\"\r\r\tsize isNil ifTrue:[self size: 10].\r\t^ size! !\r!RVMCircularCollection methodsFor: 'private' stamp: 'ssa 1/1/1970 00:04'!\rsize: aNumber\r\t\"Set the value of size\"\r\r\t| contents oldSize |\r\tsize = aNumber ifTrue:[^self].\r\tself isEmpty \r\t\tifTrue:[size _ aNumber.\r\t\t\tself array:nil; numberOfElements:0]\r\t\tifFalse:[contents _ self asOrderedCollection.\r\t\t\toldSize _ contents size.\r\t\t\tsize _ aNumber.\r\t\t\tself begin:0;end:0;numberOfElements:0.\r\t\t\tself array: (Array new: size).\r\t\t\t1 to: (size min: oldSize) do:[:index|\r\t\t\t\tself add: (contents at: index)]].\r\t\t! !\r!RVMCircularCollection methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:14'!\rat: index\r\r\t^self array at: (self realIndexFor: index)! !\r!RVMCircularCollection methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:15'!\rat: index put: anObject\r\r\tself array at: (self realIndexFor: index) put: anObject! !\r!RVMCircularCollection methodsFor: 'accessing' stamp: 'ssa 10/18/2008 22:00'!\ratRandom\r\r\t^self at: self numberOfElements atRandom! !\r!RVMCircularCollection methodsFor: 'accessing' stamp: 'ssa 10/26/2008 15:27'!\rfirst\r\r\t^self at:1! !\r!RVMCircularCollection methodsFor: 'accessing' stamp: 'ssa 10/26/2008 15:28'!\rlast\r\r\t^self at:self numberOfElements! !\r!RVMCircularCollection methodsFor: 'accessing' stamp: 'ssa 10/18/2008 21:29'!\rnextIndex\r\t\"Answer the value of nextIndex\"\r\r\tnextIndex isNil ifTrue:[self nextIndex: 1].\r\t^ nextIndex! !\r!RVMCircularCollection methodsFor: 'accessing' stamp: 'ssa 10/18/2008 21:40'!\rnextIndex: anInteger\r\t\"Set the value of nextIndex\"\r\tanInteger > self size ifTrue:[^nextIndex _ 1].\r\tnextIndex _ anInteger! !\r!RVMCircularCollection methodsFor: 'converting' stamp: 'ssa 1/1/1970 00:40'!\rasArray\r\r\t^self asOrderedCollection asArray! !\r!RVMCircularCollection methodsFor: 'converting' stamp: 'ssa 10/28/2008 19:41'!\rasCircularCollection\r^self! !\r!RVMCircularCollection methodsFor: 'converting' stamp: 'ssa 1/1/1970 00:20'!\rasOrderedCollection\r\r\t| oc |\r\toc _ OrderedCollection new.\r\tself do:[:each| oc add: each].\r\t^oc! !\r!RVMCircularCollection methodsFor: 'enumerating' stamp: 'ssa 1/1/1970 00:18'!\rcollect: aBlock\r\t\"Iterate over my elements in order and answer the results\"\r\t| results |\r\tresults _ self class new: self size.\r\tself do:[:each| results add: (aBlock value: each)].\r\t^results! !\r!RVMCircularCollection methodsFor: 'enumerating' stamp: 'ssa 1/1/1970 00:13'!\rdo: aBlock\r\t\"Iterate over my elements in order\"\r\t1 to: self numberOfElements do:[:index|\r\t\taBlock value:(self at: index)]! !\r!RVMCircularCollection methodsFor: 'testing' stamp: 'ssa 5/28/2010 16:55'!\ratEnd\r\t\"Acting like an infinite stream\"\r\t^false! !\r!RVMCircularCollection methodsFor: 'testing' stamp: 'ssa 1/1/1970 00:55'!\risEmpty\r\r\t^self numberOfElements = 0! !\r!RVMCircularCollection methodsFor: 'testing' stamp: 'ssa 1/1/1970 00:55'!\risFull\r\r\t^self numberOfElements = self size! !\r!RVMCircularCollection methodsFor: 'printing' stamp: 'ssa 10/3/2008 21:17'!\rprintOn: aStream\r\r\tsuper printOn: aStream.\r\taStream nextPutAll: ' size:',self size printString,' numberOfElements:',self numberOfElements printString! !\r!RVMCircularCollection methodsFor: 'stream emulation' stamp: 'ssa 10/18/2008 21:31'!\rnext\r\t\"Answer the next element in line, then advance the nextIndex\"\r\t| item |\r\tself isEmpty ifTrue:[self error:'Empty Collection'].\r\titem _ self at: self nextIndex.\r\tself nextIndex: self nextIndex + 1.\r\t^item! !\r!RVMCircularCollection class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:19'!\rnew: anInteger\r\r\t| collection |\r\tcollection _ self new.\r\tcollection size: anInteger.\r\t^collection! !\r!RVMCircularCollection class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:42'!\rnew: anInteger withAll: aCollection\r\r\t| collection |\r\tcollection _ self new: anInteger.\r\taCollection do:[:each| collection add: each].\r\t^collection! !\r!RVMCircularCollection class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:42'!\rwithAll: aCollection\r\r\t^self new: aCollection size withAll: aCollection! !\r!RVMCircularCollection class methodsFor: 'tests' stamp: 'ssa 1/1/1970 00:36'!\rtestAdd\r\t\"RVMCircularCollection testAdd\"\r\t\r\t| cc bag |\r\tcc _ self new: 10.\r\t5 timesRepeat:[cc add: 1].\r\tbag _ cc asOrderedCollection asBag.\r\tbag size = 5 & ((bag occurrencesOf: 1) = 5 ) ifTrue:['passed' print]ifFalse:['failed' print]! !\r!RVMCircularCollection class methodsFor: 'tests' stamp: 'ssa 1/1/1970 00:39'!\rtestCollect\r\t\"RVMCircularCollection testCollect\"\r\t\r\t| cc results |\r\tcc _ self new: 5.\r\t1 to: 20 do:[:each| cc add: each].\r\tresults _ cc collect:[:each|  each].\r\tresults asArray = #(16 17 18 19 20)\r\t\t ifTrue:['passed' print]ifFalse:['failed' print]! !\r!RVMCircularCollection class methodsFor: 'tests' stamp: 'ssa 1/1/1970 00:38'!\rtestDo\r\t\"RVMCircularCollection testDo\"\r\t\r\t| cc total |\r\tcc _ self new: 5.\r\t1 to: 20 do:[:each| cc add: each].\r\ttotal _ 0.\r\tcc do:[:each| total _ total + each].\r\ttotal = #(20 19 18 17 16) sum\r\t\t ifTrue:['passed' print]ifFalse:['failed' print]! !\r!RVMCircularCollection class methodsFor: 'tests' stamp: 'ssa 1/1/1970 00:54'!\rtestResize\r\t\"RVMCircularCollection testResize\"\r\t\r\t| cc |\r\tcc _ self new: 5.\r\t1 to: 20 do:[:each| cc add: each].\r\tcc size: 2.\r\tcc asArray = #(16 17)\r\t\t ifTrue:['passed' print]ifFalse:['failed' print]! !\r!RVMCircularCollection class methodsFor: 'tests' stamp: 'ssa 1/1/1970 00:35'!\rtestRollover\r\t\"RVMCircularCollection testRollover\"\r\t\r\t| cc |\r\tcc _ self new: 10.\r\t1 to: 20 do:[:each| cc add: each].\r\tcc asOrderedCollection asArray = #(11 12 13 14 15 16 17 18 19 20)\r\t\t ifTrue:['passed' print]ifFalse:['failed' print]! !\r!RVMColoredDataScaler methodsFor: 'privatizing' stamp: 'ssa 9/17/2008 13:01'!\rprivatize\r\t\"Install a copy of my current scaler so changes to it won't effect others.\"\r\tself scaler: self scaler deepCopy! !\r!RVMColoredDataScaler methodsFor: 'accessing' stamp: 'ssa 9/17/2008 12:56'!\raspect\r\r\t^self scaler aspect! !\r!RVMColoredDataScaler methodsFor: 'accessing' stamp: 'ssa 9/17/2008 14:22'!\raspect: aSymbol\r\t\"Swap in a new default scaler for this aspect if different from my current aspect.\"\r\r\t| defaultScaler |\r\taSymbol == self aspect ifTrue:[^self].  \"no need to change\"\r\tdefaultScaler _ RVMMonitor scalerFor: aSymbol.\r\tself scaler: defaultScaler  \"use the shared scaler until user asks for private copy\".\r! !\r!RVMColoredDataScaler methodsFor: 'accessing' stamp: 'ssa 9/13/2008 22:22'!\rcolor\r\t\"Answer the value of color\"\r\r\tcolor isNil ifTrue:[self color: Color blue].\r\t^ color! !\r!RVMColoredDataScaler methodsFor: 'accessing' stamp: 'ssa 9/13/2008 22:22'!\rcolor: anObject\r\t\"Set the value of color\"\r\r\tcolor _ anObject! !\r!RVMColoredDataScaler methodsFor: 'accessing' stamp: 'ssa 9/17/2008 14:23'!\rlastObserved\r\r\t^self scaler lastObserved! !\r!RVMColoredDataScaler methodsFor: 'accessing' stamp: 'ssa 9/17/2008 13:02'!\rmax\r\r\t^self scaler max! !\r!RVMColoredDataScaler methodsFor: 'accessing' stamp: 'ssa 9/17/2008 13:02'!\rmax: aValue\r\r\t^self scaler max: aValue! !\r!RVMColoredDataScaler methodsFor: 'accessing' stamp: 'ssa 9/17/2008 13:02'!\rmin\r\r\t^self scaler min! !\r!RVMColoredDataScaler methodsFor: 'accessing' stamp: 'ssa 9/17/2008 13:02'!\rmin: aValue\r\r\t^self scaler min: aValue! !\r!RVMColoredDataScaler methodsFor: 'accessing' stamp: 'ssa 9/17/2008 14:24'!\rscale: someData\r\r\t^self scaler scale: someData! !\r!RVMColoredDataScaler methodsFor: 'accessing' stamp: 'ssa 9/13/2008 22:35'!\rscaler\r\t\"Answer the value of scaler\"\r\r\tscaler isNil ifTrue:[self scaler: RVMDataScaler exampleInstance].\r\t^ scaler! !\r!RVMColoredDataScaler methodsFor: 'accessing' stamp: 'ssa 9/13/2008 22:35'!\rscaler: anObject\r\t\"Set the value of scaler\"\r\r\tscaler _ anObject! !\r!RVMColoredDataScaler methodsFor: 'user interface' stamp: 'ssa 9/17/2008 13:05'!\ropen\r\r\tRVMColoredDataScalerView openOn: self.\r! !\r!RVMColoredDataScaler methodsFor: 'delegation' stamp: 'ssa 9/17/2008 13:03'!\rdoesNotUnderstand: aMessage\r\t\"See if my scaler understands it.\"\r\tTranscript cr;show:'delegating: ',aMessage printString.\r\t^self scaler perform: aMessage selector withArguments: aMessage arguments! !\r!RVMColoredDataScaler class methodsFor: 'instance creation' stamp: 'ssa 9/19/2008 12:35'!\raspect: aSymbol \r\t^self aspect: aSymbol color: Color random! !\r!RVMColoredDataScaler class methodsFor: 'instance creation' stamp: 'ssa 9/14/2008 20:58'!\raspect: aSymbol color: aColor\r\r\t| scaler |\r\tscaler _ self new.\r\tscaler scaler: (RVMMonitor scalerFor: aSymbol).\r\tscaler color: aColor.\r\t^scaler! !\r!RVMColoredDataScaler class methodsFor: 'instance creation' stamp: 'ssa 9/13/2008 22:37'!\raspect: aSymbol min: minValue max: maxValue color: aColor\r\r\t| scaler |\r\tscaler _ self aspect: aSymbol min: minValue max: maxValue.\r\tscaler color: aColor.\r\t^scaler! !\r!RVMColoredDataScaler class methodsFor: 'examples' stamp: 'ssa 9/17/2008 14:03'!\rexampleInstance\r\t| cs |\r\tcs _ self new.\r\tcs scaler:RVMDataScaler exampleInstance.\r\tcs color: Color blue.\r\t^cs! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\raboutToWriteReadMostlyMemoryMessage\r\t\"Answer the tally for this message.\"\r\t^aboutToWriteReadMostlyMemoryMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\raboutToWriteReadMostlyMemoryMessage: aValue\r\t\"Answer the tally for this message.\"\r\taboutToWriteReadMostlyMemoryMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\raboutToWriteReadMostlyMemoryResponse\r\t\"Answer the tally for this message.\"\r\t^aboutToWriteReadMostlyMemoryResponse! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\raboutToWriteReadMostlyMemoryResponse: aValue\r\t\"Answer the tally for this message.\"\r\taboutToWriteReadMostlyMemoryResponse _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\raddObjectFromSnapshotMessage\r\t\"Answer the tally for this message.\"\r\t^addObjectFromSnapshotMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\raddObjectFromSnapshotMessage: aValue\r\t\"Answer the tally for this message.\"\r\taddObjectFromSnapshotMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rallocateOrRecycleContextJustTestingMessage\r\t\"Answer the tally for this message.\"\r\t^allocateOrRecycleContextJustTestingMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rallocateOrRecycleContextJustTestingMessage: aValue\r\t\"Answer the tally for this message.\"\r\tallocateOrRecycleContextJustTestingMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rallocateOrRecycleContextMessage\r\t\"Answer the tally for this message.\"\r\t^allocateOrRecycleContextMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rallocateOrRecycleContextMessage: aValue\r\t\"Answer the tally for this message.\"\r\tallocateOrRecycleContextMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rbroadcastInterpreterBoolMessage\r\t\"Answer the tally for this message.\"\r\t^broadcastInterpreterBoolMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rbroadcastInterpreterBoolMessage: aValue\r\t\"Answer the tally for this message.\"\r\tbroadcastInterpreterBoolMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rbroadcastInterpreterDoublewordMessage\r\t\"Answer the tally for this message.\"\r\t^broadcastInterpreterDoublewordMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rbroadcastInterpreterDoublewordMessage: aValue\r\t\"Answer the tally for this message.\"\r\tbroadcastInterpreterDoublewordMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rbroadcastInterpreterWordMessage\r\t\"Answer the tally for this message.\"\r\t^broadcastInterpreterWordMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rbroadcastInterpreterWordMessage: aValue\r\t\"Answer the tally for this message.\"\r\tbroadcastInterpreterWordMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 3/26/2009 10:05'!\rdetermineTalliesInOrder\r\t\"Answer an array of tallies in the order they appear in the sample\"\r\t^self tallyOrder collect:[:label| self perform: label]! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rdoAllRootsHereMessage\r\t\"Answer the tally for this message.\"\r\t^doAllRootsHereMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rdoAllRootsHereMessage: aValue\r\t\"Answer the tally for this message.\"\r\tdoAllRootsHereMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rdoAllRootsThereMessage\r\t\"Answer the tally for this message.\"\r\t^doAllRootsThereMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rdoAllRootsThereMessage: aValue\r\t\"Answer the tally for this message.\"\r\tdoAllRootsThereMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rdoAllRootsThereResponse\r\t\"Answer the tally for this message.\"\r\t^doAllRootsThereResponse! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rdoAllRootsThereResponse: aValue\r\t\"Answer the tally for this message.\"\r\tdoAllRootsThereResponse _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\renforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapMessage\r\t\"Answer the tally for this message.\"\r\t^enforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\renforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapMessage: aValue\r\t\"Answer the tally for this message.\"\r\tenforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\renforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapResponse\r\t\"Answer the tally for this message.\"\r\t^enforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapResponse! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\renforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapResponse: aValue\r\t\"Answer the tally for this message.\"\r\tenforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapResponse _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\renforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapMessage\r\t\"Answer the tally for this message.\"\r\t^enforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\renforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapMessage: aValue\r\t\"Answer the tally for this message.\"\r\tenforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\renforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapResponse\r\t\"Answer the tally for this message.\"\r\t^enforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapResponse! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\renforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapResponse: aValue\r\t\"Answer the tally for this message.\"\r\tenforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapResponse _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\renforceCoherenceBeforeSenderStoresIntoAllHeapsMessage\r\t\"Answer the tally for this message.\"\r\t^enforceCoherenceBeforeSenderStoresIntoAllHeapsMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\renforceCoherenceBeforeSenderStoresIntoAllHeapsMessage: aValue\r\t\"Answer the tally for this message.\"\r\tenforceCoherenceBeforeSenderStoresIntoAllHeapsMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\renforceCoherenceBeforeSenderStoresIntoAllHeapsResponse\r\t\"Answer the tally for this message.\"\r\t^enforceCoherenceBeforeSenderStoresIntoAllHeapsResponse! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\renforceCoherenceBeforeSenderStoresIntoAllHeapsResponse: aValue\r\t\"Answer the tally for this message.\"\r\tenforceCoherenceBeforeSenderStoresIntoAllHeapsResponse _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rflushByMethodMessage\r\t\"Answer the tally for this message.\"\r\t^flushByMethodMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rflushByMethodMessage: aValue\r\t\"Answer the tally for this message.\"\r\tflushByMethodMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rflushFreeContextsMessage\r\t\"Answer the tally for this message.\"\r\t^flushFreeContextsMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rflushFreeContextsMessage: aValue\r\t\"Answer the tally for this message.\"\r\tflushFreeContextsMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rflushInterpreterCachesMessage\r\t\"Answer the tally for this message.\"\r\t^flushInterpreterCachesMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rflushInterpreterCachesMessage: aValue\r\t\"Answer the tally for this message.\"\r\tflushInterpreterCachesMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rflushMethodCacheMessage\r\t\"Answer the tally for this message.\"\r\t^flushMethodCacheMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rflushMethodCacheMessage: aValue\r\t\"Answer the tally for this message.\"\r\tflushMethodCacheMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rflushSelectiveMessage\r\t\"Answer the tally for this message.\"\r\t^flushSelectiveMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rflushSelectiveMessage: aValue\r\t\"Answer the tally for this message.\"\r\tflushSelectiveMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rhereIsARootResponse\r\t\"Answer the tally for this message.\"\r\t^hereIsARootResponse! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rhereIsARootResponse: aValue\r\t\"Answer the tally for this message.\"\r\thereIsARootResponse _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rinitiateBarrierMessage\r\t\"Answer the tally for this message.\"\r\t^initiateBarrierMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rinitiateBarrierMessage: aValue\r\t\"Answer the tally for this message.\"\r\tinitiateBarrierMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rloadFunctionFromPluginMessage\r\t\"Answer the tally for this message.\"\r\t^loadFunctionFromPluginMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rloadFunctionFromPluginMessage: aValue\r\t\"Answer the tally for this message.\"\r\tloadFunctionFromPluginMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rloadFunctionFromPluginResponse\r\t\"Answer the tally for this message.\"\r\t^loadFunctionFromPluginResponse! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rloadFunctionFromPluginResponse: aValue\r\t\"Answer the tally for this message.\"\r\tloadFunctionFromPluginResponse _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rnewValueForOopMessage\r\t\"Answer the tally for this message.\"\r\t^newValueForOopMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rnewValueForOopMessage: aValue\r\t\"Answer the tally for this message.\"\r\tnewValueForOopMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rnoMoreRootsResponse\r\t\"Answer the tally for this message.\"\r\t^noMoreRootsResponse! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rnoMoreRootsResponse: aValue\r\t\"Answer the tally for this message.\"\r\tnoMoreRootsResponse _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rrawData\r\t\"Answer the tally for this message.\"\r\t^rawData! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rrawData: aValue\r\t\"Answer the tally for this message.\"\r\trawData _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rrecycleContextIfPossibleMessage\r\t\"Answer the tally for this message.\"\r\t^recycleContextIfPossibleMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rrecycleContextIfPossibleMessage: aValue\r\t\"Answer the tally for this message.\"\r\trecycleContextIfPossibleMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rrespondToBarrierMessage\r\t\"Answer the tally for this message.\"\r\t^respondToBarrierMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rrespondToBarrierMessage: aValue\r\t\"Answer the tally for this message.\"\r\trespondToBarrierMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rreturnContextMessage\r\t\"Answer the tally for this message.\"\r\t^returnContextMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rreturnContextMessage: aValue\r\t\"Answer the tally for this message.\"\r\treturnContextMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rrunPrimitiveJustTestingMessage\r\t\"Answer the tally for this message.\"\r\t^runPrimitiveJustTestingMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rrunPrimitiveJustTestingMessage: aValue\r\t\"Answer the tally for this message.\"\r\trunPrimitiveJustTestingMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rrunPrimitiveMessage\r\t\"Answer the tally for this message.\"\r\t^runPrimitiveMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rrunPrimitiveMessage: aValue\r\t\"Answer the tally for this message.\"\r\trunPrimitiveMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rrunPrimitiveResponse\r\t\"Answer the tally for this message.\"\r\t^runPrimitiveResponse! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rrunPrimitiveResponse: aValue\r\t\"Answer the tally for this message.\"\r\trunPrimitiveResponse _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rsampleOneCoreMessage\r\t\"Answer the tally for this message.\"\r\t^sampleOneCoreMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rsampleOneCoreMessage: aValue\r\t\"Answer the tally for this message.\"\r\tsampleOneCoreMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rsampleOneCoreResponse\r\t\"Answer the tally for this message.\"\r\t^sampleOneCoreResponse! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rsampleOneCoreResponse: aValue\r\t\"Answer the tally for this message.\"\r\tsampleOneCoreResponse _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rscanCompactOrMakeFreeObjectsMessage\r\t\"Answer the tally for this message.\"\r\t^scanCompactOrMakeFreeObjectsMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rscanCompactOrMakeFreeObjectsMessage: aValue\r\t\"Answer the tally for this message.\"\r\tscanCompactOrMakeFreeObjectsMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rscanCompactOrMakeFreeObjectsResponse\r\t\"Answer the tally for this message.\"\r\t^scanCompactOrMakeFreeObjectsResponse! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rscanCompactOrMakeFreeObjectsResponse: aValue\r\t\"Answer the tally for this message.\"\r\tscanCompactOrMakeFreeObjectsResponse _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 3/26/2009 10:05'!\rtalliesInOrder\r\t\"Answer an array of tallies in the order they appear in the sample\"\r\t^self talliesInOrderCache! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 3/26/2009 10:05'!\rtalliesInOrderCache\r\t\"Answer the value of talliesInOrderCache\"\r\r\ttalliesInOrderCache isNil ifTrue:[self talliesInOrderCache: self determineTalliesInOrder].\r\t^ talliesInOrderCache! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 3/26/2009 10:04'!\rtalliesInOrderCache: anObject\r\t\"Set the value of talliesInOrderCache\"\r\r\ttalliesInOrderCache _ anObject! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 3/26/2009 10:16'!\rtallyOrder\r\t\"Answer an array of tally names in the order they appear in the sample\"\r\t\"RVMMulticoreSample primitiveCapture at: 8\"\r\t^self class tallyOrder! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rupdateEnoughInterpreterToTransferControlJustTestingMessage\r\t\"Answer the tally for this message.\"\r\t^updateEnoughInterpreterToTransferControlJustTestingMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rupdateEnoughInterpreterToTransferControlJustTestingMessage: aValue\r\t\"Answer the tally for this message.\"\r\tupdateEnoughInterpreterToTransferControlJustTestingMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rupdateEnoughInterpreterToTransferControlJustTestingResponse\r\t\"Answer the tally for this message.\"\r\t^updateEnoughInterpreterToTransferControlJustTestingResponse! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rupdateEnoughInterpreterToTransferControlJustTestingResponse: aValue\r\t\"Answer the tally for this message.\"\r\tupdateEnoughInterpreterToTransferControlJustTestingResponse _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rupdateEnoughInterpreterToTransferControlMessage\r\t\"Answer the tally for this message.\"\r\t^updateEnoughInterpreterToTransferControlMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rupdateEnoughInterpreterToTransferControlMessage: aValue\r\t\"Answer the tally for this message.\"\r\tupdateEnoughInterpreterToTransferControlMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rupdateWholeInterpreterMessage\r\t\"Answer the tally for this message.\"\r\t^updateWholeInterpreterMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rupdateWholeInterpreterMessage: aValue\r\t\"Answer the tally for this message.\"\r\tupdateWholeInterpreterMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rverifyInterpreterAndHeapMessage\r\t\"Answer the tally for this message.\"\r\t^verifyInterpreterAndHeapMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rverifyInterpreterAndHeapMessage: aValue\r\t\"Answer the tally for this message.\"\r\tverifyInterpreterAndHeapMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rwroteReadMostlyMemoryMessage\r\t\"Answer the tally for this message.\"\r\t^wroteReadMostlyMemoryMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rwroteReadMostlyMemoryMessage: aValue\r\t\"Answer the tally for this message.\"\r\twroteReadMostlyMemoryMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rzapUnusedPortionOfHeapMessage\r\t\"Answer the tally for this message.\"\r\t^zapUnusedPortionOfHeapMessage! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rzapUnusedPortionOfHeapMessage: aValue\r\t\"Answer the tally for this message.\"\r\tzapUnusedPortionOfHeapMessage _ aValue! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rzapUnusedPortionOfHeapResponse\r\t\"Answer the tally for this message.\"\r\t^zapUnusedPortionOfHeapResponse! !\r!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\rzapUnusedPortionOfHeapResponse: aValue\r\t\"Answer the tally for this message.\"\r\tzapUnusedPortionOfHeapResponse _ aValue! !\r!RVMCoreMessageTally class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:00'!\rfastForData: data\r\t\"Answer a new instance of me initialized to tally these messages\"\r\t| tally |\r\ttally := self new.\r\ttally rawData: data.\r\ttally allocateOrRecycleContextMessage: (data at: 1).\r\ttally allocateOrRecycleContextJustTestingMessage: (data at: 2).\r\ttally recycleContextIfPossibleMessage: (data at: 3).\r\ttally flushInterpreterCachesMessage: (data at: 4).\r\ttally flushMethodCacheMessage: (data at: 5).\r\ttally flushByMethodMessage: (data at: 6).\r\ttally flushSelectiveMessage: (data at: 7).\r\ttally addObjectFromSnapshotMessage: (data at: 8).\r\ttally updateWholeInterpreterMessage: (data at: 9).\r\ttally updateEnoughInterpreterToTransferControlMessage: (data at: 10).\r\ttally updateEnoughInterpreterToTransferControlJustTestingMessage: (data at: 11).\r\ttally updateEnoughInterpreterToTransferControlJustTestingResponse: (data at: 12).\r\ttally zapUnusedPortionOfHeapMessage: (data at: 13).\r\ttally zapUnusedPortionOfHeapResponse: (data at: 14).\r\ttally verifyInterpreterAndHeapMessage: (data at: 15).\r\ttally doAllRootsThereMessage: (data at: 16).\r\ttally doAllRootsThereResponse: (data at: 17).\r\ttally doAllRootsHereMessage: (data at: 18).\r\ttally hereIsARootResponse: (data at: 19).\r\ttally newValueForOopMessage: (data at: 20).\r\ttally noMoreRootsResponse: (data at: 21).\r\ttally scanCompactOrMakeFreeObjectsMessage: (data at: 22).\r\ttally scanCompactOrMakeFreeObjectsResponse: (data at: 23).\r\ttally returnContextMessage: (data at: 24).\r\ttally runPrimitiveMessage: (data at: 25).\r\ttally runPrimitiveJustTestingMessage: (data at: 26).\r\ttally runPrimitiveResponse: (data at: 27).\r\ttally loadFunctionFromPluginMessage: (data at: 28).\r\ttally loadFunctionFromPluginResponse: (data at: 29).\r\ttally broadcastInterpreterDoublewordMessage: (data at: 30).\r\ttally broadcastInterpreterWordMessage: (data at: 31).\r\ttally broadcastInterpreterBoolMessage: (data at: 32).\r\ttally sampleOneCoreMessage: (data at: 33).\r\ttally sampleOneCoreResponse: (data at: 34).\r\ttally initiateBarrierMessage: (data at: 35).\r\ttally respondToBarrierMessage: (data at: 36).\r\ttally aboutToWriteReadMostlyMemoryMessage: (data at: 37).\r\ttally aboutToWriteReadMostlyMemoryResponse: (data at: 38).\r\ttally wroteReadMostlyMemoryMessage: (data at: 39).\r\ttally flushFreeContextsMessage: (data at: 40).\r\ttally enforceCoherenceBeforeSenderStoresIntoAllHeapsMessage: (data at: 41).\r\ttally enforceCoherenceBeforeSenderStoresIntoAllHeapsResponse: (data at: 42).\r\ttally enforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapMessage: (data at: 43).\r\ttally enforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapResponse: (data at: 44).\r\ttally enforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapMessage: (data at: 45).\r\ttally enforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapResponse: (data at: 46).\r\t^tally! !\r!RVMCoreMessageTally class methodsFor: 'instance creation' stamp: 'dmu 1/1/1970 00:02'!\rforMessageNames: aCollectionOfMessageNames andData: data\r\t\"Answer a new instance of me initialized to tally these messages\"\r\t| tally |\r\ttally := self new.\r\ttally rawData: data.\r\t1 to: data size do:[:index|\r\t\ttally perform:((aCollectionOfMessageNames at: index),':') asSymbol with:(data at: index)].\r\t^tally! !\r!RVMCoreMessageTally class methodsFor: 'code generation' stamp: 'ssa 3/26/2009 10:14'!\radaptToNewTallyMessages\r\t\"RVMCoreMessageTally adaptToNewTallyMessages\"\r\t\"Change this class to work with the new messages\"\r\t\"BE SURE TO UPDATE tallyOrder MESSAGE IF THE TALLY ORDER CHANGES\"\r\t\r| messageNames code index |\rmessageNames _ (RVMMulticoreSample primitiveCapture at: 8) asOrderedCollection.\rmessageNames add: 'rawData'.\r\rRVMObject subclass: #RVMCoreMessageTally\r\tinstanceVariableNames: messageNames asArray\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Monitoring'.\r\rcode _ 'fastForData: data\r\t\"Answer a new instance of me initialized to tally these messages\"\r\t| tally |\r\ttally := self new.\r\ttally rawData: data.\r\t'.\rindex _ 0.\rmessageNames remove: 'rawData'.\rmessageNames do:[:messageName| index _ index + 1.\r\tcode _ code, 'tally ',messageName,': (data at: ',index printString,').\r\t'].\rcode _ code,'^tally'.\rRVMCoreMessageTally class compile: code classified:'instance creation' notifying:nil.\r\rRVMCoreMessageTally removeCategory: 'accessing'.\rmessageNames do:[:selector|\r\tcode _ selector,'\r\t\"Answer the tally for this message.\"\r\t^',selector.\r\tRVMCoreMessageTally  compile: code classified:'accessing' notifying:nil.\t\r\tcode _ selector,': aValue\r\t\"Answer the tally for this message.\"\r\t',selector,' _ aValue'.\r\tRVMCoreMessageTally  compile: code classified:'accessing' notifying:nil].\t\r! !\r!RVMCoreMessageTally class methodsFor: 'accessing' stamp: 'ssa 3/26/2009 10:15'!\rtallyOrder\r\t\"Answer an array of tally names in the order they appear in the sample\"\r\t\"RVMMulticoreSample primitiveCapture at: 8\"\r\t^#(#allocateOrRecycleContextMessage\r\t#allocateOrRecycleContextJustTestingMessage\r\t#recycleContextIfPossibleMessage\r\t#flushInterpreterCachesMessage\r\t#flushMethodCacheMessage\r\t#flushByMethodMessage\r\t#flushSelectiveMessage\r\t#addObjectFromSnapshotMessage\r\t#updateWholeInterpreterMessage\r\t#updateEnoughInterpreterToTransferControlMessage\r\t#updateEnoughInterpreterToTransferControlJustTestingMessage\r\t#updateEnoughInterpreterToTransferControlJustTestingResponse\r\t#zapUnusedPortionOfHeapMessage\r\t#zapUnusedPortionOfHeapResponse\r\t#verifyInterpreterAndHeapMessage\r\t#doAllRootsThereMessage\r\t#doAllRootsThereResponse\r\t#doAllRootsHereMessage\r\t#hereIsARootResponse\r\t#newValueForOopMessage\r\t#noMoreRootsResponse\r\t#scanCompactOrMakeFreeObjectsMessage\r\t#scanCompactOrMakeFreeObjectsResponse\r\t#returnContextMessage\r\t#runPrimitiveMessage\r\t#runPrimitiveJustTestingMessage\r\t#runPrimitiveResponse\r\t#loadFunctionFromPluginMessage\r\t#loadFunctionFromPluginResponse\r\t#broadcastInterpreterDoublewordMessage\r\t#broadcastInterpreterWordMessage\r\t#broadcastInterpreterBoolMessage\r\t#sampleOneCoreMessage\r\t#sampleOneCoreResponse\r\t#initiateBarrierMessage\r\t#respondToBarrierMessage\r\t#aboutToWriteReadMostlyMemoryMessage\r\t#aboutToWriteReadMostlyMemoryResponse\r\t#wroteReadMostlyMemoryMessage\r\t#flushFreeContextsMessage\r\t#enforceCoherenceBeforeSenderStoresIntoAllHeapsMessage\r\t#enforceCoherenceBeforeSenderStoresIntoAllHeapsResponse\r\t#enforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapMessage\r\t#enforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapResponse\r\t#enforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapMessage\r\t#enforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapResponse)\r! !\r!RVMDataScaler methodsFor: 'private' stamp: 'ssa 11/4/2008 15:50'!\rsetMax: aValue\r\t\"No side effects\"\r\tmax _ aValue.\r\tself range:nil! !\r!RVMDataScaler methodsFor: 'private' stamp: 'ssa 11/4/2008 15:50'!\rsetMin: aValue\r\t\"No side effects\"\r\tmin _ aValue.\r\t\r\tself range:nil! !\r!RVMDataScaler methodsFor: 'scaling data' stamp: 'ssa 11/4/2008 15:08'!\radjustMax\r\t\"Adjust my max based on my observedMax\"\r\t| newMax |\r\tself maxLocked ifTrue:[^self].\r\tnewMax _ self max max: self observedMax.\r\tself max = newMax ifTrue:[^self].\r\tself outOfRangeDetected: true.\r\tself max: newMax! !\r!RVMDataScaler methodsFor: 'scaling data' stamp: 'ssa 11/4/2008 15:09'!\radjustMin\r\t\"Adjust my min based on my observedMin\"\r\t| newMin |\r\tself minLocked ifTrue:[^self].\r\tnewMin _ self min min: self observedMin.\r\tself min = newMin ifTrue:[^self].\r\tself outOfRangeDetected: true.\r\tself min: newMin! !\r!RVMDataScaler methodsFor: 'scaling data' stamp: 'ssa 1/1/1970 00:40'!\rautomatic\r\t\"Set to automatic scaling mode.\r\tThis mode expands the min/max over time to adapt to the data being observed.\r\tSend the message #resetScaling to flush historical min/max and rescale.\"\r\t\r\tself automaticScaling: true.\r\tself resetScaling! !\r!RVMDataScaler methodsFor: 'scaling data' stamp: 'ssa 1/1/1970 00:40'!\rmanual\r\t\"Turn off automatic scaling mode.\r\tStops adapting min/max\"\r\t\r\tself automaticScaling: false.\r! !\r!RVMDataScaler methodsFor: 'scaling data' stamp: 'ssa 10/6/2008 16:28'!\rresetObservations\r\t\"Reset my memory of min/max observations and my min/max as well once the first data value is observed.\"\r\tself observedMin:nil.\r\tself observedMax: nil.! !\r!RVMDataScaler methodsFor: 'scaling data' stamp: 'ssa 1/1/1970 00:15'!\rresetOutOfRangeDetector\r\t\"Reset my out of range detector\"\r\tself outOfRangeDetected: false.! !\r!RVMDataScaler methodsFor: 'scaling data' stamp: 'ssa 10/6/2008 16:29'!\rresetScaling\r\t\"Reset my memory of min/max observations and my min/max as well once the first data value is observed.\"\r\tmin _ nil.\r\tmax _  nil.\r\tobservedMin _ nil.\r\tobservedMax _  nil.\r\trange _ nil! !\r!RVMDataScaler methodsFor: 'scaling data' stamp: 'ssa 10/7/2008 17:35'!\rscale: someData\r\t\"Answer a number between 0-100 representing the percentage location of this data between my min and max\"\r\t\r\tself lastObserved: someData.\r\tself observedMin:(self observedMin min: someData).\r\tself observedMax:(self observedMax max: someData).\r\tsomeData <= self min ifTrue:[^0].\r\tsomeData >= self max ifTrue:[^100].\r\t^someData - self min * 100.0 /  self range ! !\r!RVMDataScaler methodsFor: 'scaling data' stamp: 'ssa 1/1/1970 01:10'!\rsetRangeToObserved\r\t\"Set my min and max to what I have observed in my data scaling\"\r\t\r\tmin _ self observedMin.\r\tmax _ self observedMax.\r\tself range: nil\r\t! !\r!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 9/13/2008 19:57'!\raspect\r\t\"Answer the value of aspect\"\r\r\taspect isNil ifTrue:[self aspect: #notDefinedYet].\r\t^ aspect! !\r!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 9/13/2008 19:56'!\raspect: anObject\r\t\"Set the value of aspect\"\r\r\taspect _ anObject! !\r!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:39'!\rautomaticScaling\r\t\"Answer the value of automaticScaling\"\r\r\tautomaticScaling isNil ifTrue:[self automaticScaling: false].\r\t^ automaticScaling! !\r!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:39'!\rautomaticScaling: anObject\r\t\"Set the value of automaticScaling\"\r\r\tautomaticScaling _ anObject! !\r!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 9/14/2008 21:33'!\rlastObserved\r\t\"Answer the value of lastObserved\"\r\r\tlastObserved isNil ifTrue:[self lastObserved: 0].\r\t^ lastObserved! !\r!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 9/14/2008 21:33'!\rlastObserved: anObject\r\t\"Set the value of lastObserved\"\r\r\tlastObserved _ anObject! !\r!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 10/3/2008 20:08'!\rmax\r\t\"Answer the value of max\"\r\r\tmax isNil ifTrue:[^1].\r\t^ max! !\r!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 9/19/2008 10:53'!\rmax: aNumber\r\t\"Set the value of max\"\r\r\tmax _ min isNil ifTrue:[aNumber] ifFalse:[aNumber max: self min].\r\tself range:nil! !\r!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:20'!\rmaxLocked\r\t\"Answer the value of maxLocked\"\r\r\tmaxLocked isNil ifTrue:[self maxLocked: false].\r\t^ maxLocked! !\r!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:20'!\rmaxLocked: anObject\r\t\"Set the value of maxLocked\"\r\r\tmaxLocked _ anObject! !\r!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 10/6/2008 20:22'!\rmin\r\t\"Answer the value of min\"\r\tself pinAtZero ifTrue:[^0].\r\tmin isNil ifTrue:[self min: 100000000].\r\t^ min! !\r!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 9/19/2008 10:53'!\rmin: aNumber\r\t\"Set the value of min\"\r\r\tmin _ max isNil ifTrue:[aNumber] ifFalse:[aNumber min: self max].\r\tself range:nil! !\r!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:20'!\rminLocked\r\t\"Answer the value of minLocked\"\r\r\tminLocked isNil ifTrue:[self minLocked: false].\r\t^ minLocked! !\r!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:20'!\rminLocked: anObject\r\t\"Set the value of minLocked\"\r\r\tminLocked _ anObject! !\r!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 9/13/2008 19:45'!\robservedMax\r\t\"Answer the value of observedMax\"\r\r\tobservedMax isNil ifTrue:[self observedMax: -10000000000].\r\t^ observedMax! !\r!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:43'!\robservedMax: aNumber\r\t\"Set the value of observedMax\"\r\r\tobservedMax _ aNumber.\r\tself automaticScaling ifTrue:[self adjustMax]! !\r!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 9/13/2008 19:45'!\robservedMin\r\t\"Answer the value of observedMin\"\r\r\tobservedMin isNil ifTrue:[self observedMin:  10000000000].\r\t^ observedMin! !\r!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:44'!\robservedMin: aNumber\r\t\"Set the value of observedMin\"\r\r\tobservedMin _ aNumber.\r\tself automaticScaling ifTrue:[self adjustMin]! !\r!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:14'!\routOfRangeDetected\r\t\"Answer the value of outOfRangeDetected\"\r\r\toutOfRangeDetected isNil ifTrue:[self outOfRangeDetected: false].\r\t^ outOfRangeDetected! !\r!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 10/2/2008 19:12'!\routOfRangeDetected: anObject\r\t\"Set the value of outOfRangeDetected\"\r\r\toutOfRangeDetected _ anObject! !\r!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 10/6/2008 20:22'!\rpinAtZero\r\t\"Answer the value of pinAtZero\"\r\r\tpinAtZero isNil ifTrue:[self pinAtZero: false].\r\t^ pinAtZero! !\r!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 10/6/2008 20:21'!\rpinAtZero: anObject\r\t\"Set the value of pinAtZero\"\r\r\tpinAtZero _ anObject! !\r!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 10/6/2008 20:50'!\rpinMinAtZero\t\r\r\tself pinAtZero: true! !\r!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 9/13/2008 17:52'!\rrange\r\t\"Answer the value of range\"\r\r\trange isNil ifTrue:[self range: (self max - self min)].\r\t^ range! !\r!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 9/13/2008 17:52'!\rrange: anObject\r\t\"Set the value of range\"\r\r\trange _ anObject! !\r!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 10/6/2008 20:50'!\runpinMinAtZero\t\r\r\tself pinAtZero: false! !\r!RVMDataScaler methodsFor: 'data generation' stamp: 'ssa 9/13/2008 19:33'!\ratRandom\r\t\"Answer a random data value in my range.\"\r\t^ self range atRandom + self min! !\r!RVMDataScaler methodsFor: 'autocoding' stamp: 'ssa 9/13/2008 20:13'!\rharden\r\t\"Compile a method into RVMMonitor that will reproduce a scaler like me.\"\r\tRVMMonitor autocodeScalerMethodForScaler: self! !\r!RVMDataScaler methodsFor: 'user interface' stamp: 'ssa 9/13/2008 22:38'!\ropen\r\r\t| cs |\r\tcs _ RVMColoredDataScaler new.\r\tcs scaler: self.\r\tcs color: Color random.\r\tcs open! !\r!RVMDataScaler methodsFor: 'printing' stamp: 'ssa 10/6/2008 16:19'!\rprintOn: aStream\r\r\tsuper printOn: aStream.\r\taStream nextPutAll: 'min:',self min printString,' max:',self max printString! !\r!RVMDataScaler class methodsFor: 'examples' stamp: 'ssa 9/13/2008 17:59'!\rexample1\r\t\"RVMDataScaler example1\"\r\t\r\t| scaler |\r\tscaler _ self min: 5 max: 15.\r\t1 to: 20 do:[:value|\r\t\tTranscript cr;show: 'value: ',value printString,' => scaled: ',(scaler scale: value) printString]! !\r!RVMDataScaler class methodsFor: 'examples' stamp: 'ssa 9/13/2008 18:00'!\rexample2\r\t\"RVMDataScaler example2\"\r\t\r\t| scaler |\r\tscaler _ self min: 0.5 max: 1.5.\r\t0.1 to: 2.0  by: 0.1 do:[:value|\r\t\tTranscript cr;show: 'value: ',value printString,' => scaled: ',(scaler scale: value) printString]! !\r!RVMDataScaler class methodsFor: 'examples' stamp: 'ssa 9/13/2008 18:02'!\rexample3\r\t\"RVMDataScaler example3\"\r\t\r\t| scaler |\r\tscaler _ self min: -5 max: -1.\r\t-7  to: 0  by: 1 do:[:value|\r\t\tTranscript cr;show: 'value: ',value printString,' => scaled: ',(scaler scale: value) printString]! !\r!RVMDataScaler class methodsFor: 'examples' stamp: 'ssa 9/13/2008 18:02'!\rexample4\r\t\"RVMDataScaler example4\"\r\t\r\t| scaler |\r\tscaler _ self min: -5 max: 5.\r\t-7  to: 7 by: 1 do:[:value|\r\t\tTranscript cr;show: 'value: ',value printString,' => scaled: ',(scaler scale: value) printString]! !\r!RVMDataScaler class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:48'!\rexampleInstance\r\t\"RVMDataScaler exampleInstance\"\r\t\r\t^self aspect: #bytesUseds min: 0 max: 100000! !\r!RVMDataScaler class methodsFor: 'instance creation' stamp: 'ssa 9/13/2008 19:57'!\raspect: aSymbol min: minValue max: maxValue\r\t\"Answer a new data scaler with this range.\"\r\t| scaler |\r\tscaler _ self new.\r\tscaler aspect: aSymbol.\r\tscaler min: minValue.\r\tscaler max: maxValue.\r\t^scaler! !\r!RVMDataScaler class methodsFor: 'instance creation' stamp: 'ssa 9/13/2008 19:58'!\rmin: minValue max: maxValue\r\t\"Answer a new data scaler with this range.\"\r\t\r\t^self aspect: nil min: minValue max: maxValue! !\r!RVMExperiment class methodsFor: 'as yet unclassified' stamp: 'dmu 1/1/1970 00:04'!\rdo: aBlock\r| ms s |\rRVMMulticoreSample capture.\rms := Time millisecondsToRun: aBlock.\rs := RVMMulticoreSample capture.\rTranscript cr; show: 'ms: '; show: ms; show: ' yields: '; show: s yieldCounts sum; show: ' bytecodes: '; show: s bytecodeCounts sum;\rshow: ' total/unforced interruptCheckCounts: '; show: s interruptCheckCounts sum; show: '/'; show: s unforcedInterruptCheckCounts sum; cr;\rshow: 'receive tallies: ', s receiveTallySum printString! !\r!RVMExperiment class methodsFor: 'as yet unclassified' stamp: 'dmu 1/1/1970 00:14'!\rtestCompiler\rself do: [Benchmark new testCompiler]! !\r!RVMGroupStats methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:05'!\rcoreIndices\r\t\"Answer a collection of points that give my core indicies as row@column\"\r\t| points |\r\tpoints _ OrderedCollection new.\r\t1 to: self height do:[:h|\r\t\t1 to: self width do:[:w|\r\t\t\th*w-1 + w > self groupSize ifTrue:[^points  \"handle odd last row case\"].\r\t\t\tpoints add: w@h]].\r\t^points! !\r!RVMGroupStats methodsFor: 'accessing' stamp: 'ssa 11/13/2008 09:41'!\rextent\r\t\"Answer the dimensions of my tile grid\"\r\t^self width @ self height! !\r!RVMGroupStats methodsFor: 'accessing' stamp: 'dmu 8/15/2008 21:56'!\rgroupSize  ^ groupSize! !\r!RVMGroupStats methodsFor: 'accessing' stamp: 'dmu 8/15/2008 21:56'!\rgroupSize: x groupSize _ x! !\r!RVMGroupStats methodsFor: 'accessing' stamp: 'dmu 1/1/1970 00:01'!\rheight ^ height! !\r!RVMGroupStats methodsFor: 'accessing' stamp: 'dmu 1/1/1970 00:01'!\rheight: x height _ x! !\r!RVMGroupStats methodsFor: 'accessing' stamp: 'dmu 8/15/2008 21:55'!\rmainRank  ^ mainRank! !\r!RVMGroupStats methodsFor: 'accessing' stamp: 'dmu 8/15/2008 21:57'!\rmainRank: x mainRank _ x! !\r!RVMGroupStats methodsFor: 'accessing' stamp: 'dmu 8/15/2008 21:55'!\rmainX  ^ mainX! !\r!RVMGroupStats methodsFor: 'accessing' stamp: 'dmu 8/15/2008 21:57'!\rmainX: x mainX _ x! !\r!RVMGroupStats methodsFor: 'accessing' stamp: 'dmu 8/15/2008 21:55'!\rmainY  ^ mainY! !\r!RVMGroupStats methodsFor: 'accessing' stamp: 'dmu 8/15/2008 21:57'!\rmainY: y mainY _ y! !\r!RVMGroupStats methodsFor: 'accessing' stamp: 'dmu 8/15/2008 21:56'!\rremaining  ^ remaining! !\r!RVMGroupStats methodsFor: 'accessing' stamp: 'dmu 8/15/2008 21:57'!\rremaining: r remaining _ r! !\r!RVMGroupStats methodsFor: 'accessing' stamp: 'dmu 1/1/1970 00:00'!\rwidth ^ width! !\r!RVMGroupStats methodsFor: 'accessing' stamp: 'dmu 1/1/1970 00:01'!\rwidth: x width _ x! !\r!RVMGroupStats methodsFor: 'initialize-release' stamp: 'ssa 8/19/2008 10:56'!\rinitializeFastFrom: data\r\r\tself mainX:(data at: 2).\r\tself mainY: (data at: 4).\r\tself mainRank: (data at: 6).\r\tself width: (data at: 8).\r\tself height: (data at: 10).\r\tself groupSize: (data at: 12).\r\tself remaining: (data at: 14).\r\t! !\r!RVMGroupStats methodsFor: 'initialize-release' stamp: 'dmu 8/15/2008 22:07'!\rinitializeFrom: data\r1 to: data size by: 2 do: [:i|\r\tself perform: ((data at: i), ':') asSymbol with: (data at: i + 1)\r\t]! !\r!RVMHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:06'!\rallocationsSinceLastQuery\r\t\"Answer the number of object allocations since the last query\"\r\tallocationsSinceLastQuery isNil ifTrue:[^0].\r\t^allocationsSinceLastQuery! !\r!RVMHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:07'!\rallocationsSinceLastQuery: count\r\t\"Set the number of object allocations since the last query\"\r\tallocationsSinceLastQuery := count! !\r!RVMHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:04'!\rbytesLeft\r\t\"Answer the number of bytes left in this heap\"\r\tbytesLeft isNil ifTrue:[^0].\r\t^bytesLeft! !\r!RVMHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:05'!\rbytesLeft: count\r\t\"Set the number of bytes left in this heap\"\r\tbytesLeft := count! !\r!RVMHeapStats methodsFor: 'acessing' stamp: 'ssa 10/4/2008 08:38'!\rbytesUsed\r\t\"Answer the number of bytes used in this heap\"\r\tbytesUsed isNil ifTrue:[^0].\r\t^bytesUsed ! !\r!RVMHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:04'!\rbytesUsed: count\r\t\"Set the number of bytes used in this heap\"\r\tbytesUsed := count! !\r!RVMHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:06'!\rcompactionsSinceLastQuery\r\t\"Answer the number of object compactions since the last query\"\r\tcompactionsSinceLastQuery isNil ifTrue:[^0].\r\t^compactionsSinceLastQuery! !\r!RVMHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:07'!\rcompactionsSinceLastQuery: count\r\t\"Set the number of object compactions since the last query\"\r\tcompactionsSinceLastQuery := count! !\r!RVMHeapStats methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:27'!\rreadWrite\r\t\"Answer the value of readWrite\"\r\r\treadWrite isNil ifTrue:[self readWrite: true].\r\t^ readWrite! !\r!RVMHeapStats methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:27'!\rreadWrite: anObject\r\t\"Set the value of readWrite\"\r\r\treadWrite _ anObject! !\r!RVMGlobalHeapStats methodsFor: 'testing' stamp: 'ssa 7/21/2008 10:09'!\risGlobal\r\r\t^true! !\r!RVMGlobalHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:09'!\rscope\r\t\"Answer my scope\"\r\t^'Global'! !\r!RVMHeapStats class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:27'!\rnewReadMostly\r\r\t^self new readWrite: false ! !\r!RVMHeapStats class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:28'!\rnewReadWrite\r\r\t^self new readWrite: true! !\r!RVMLocalHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:31'!\rfailedFetchRequestsSinceLastQuery\r\t\"Answer how many fetch requests failed since the last query\"\r\tfailedFetchRequestsSinceLastQuery isNil ifTrue:[^0].\r\t^failedFetchRequestsSinceLastQuery! !\r!RVMLocalHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:29'!\rfailedFetchRequestsSinceLastQuery: count\r\t\"Set how many fetch requests failed since the last query\"\r\tfailedFetchRequestsSinceLastQuery := count! !\r!RVMLocalHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 11:09'!\robjectsFetchedSinceLastQuery\r\t\"Answer how many objects were fetched into this local heap since the last query\"\r\tobjectsFetchedSinceLastQuery isNil ifTrue:[^0].\r\t^objectsFetchedSinceLastQuery! !\r!RVMLocalHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 11:09'!\robjectsFetchedSinceLastQuery: count\r\t\"Set how many objects were fetched into this local heap since the last query\"\r\tobjectsFetchedSinceLastQuery := count! !\r!RVMLocalHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:32'!\robjectsFlushedSinceLastQuery\r\t\"Answer how many objects were flushed since the last query\"\r\tobjectsFlushedSinceLastQuery isNil ifTrue:[^0].\r\t^objectsFlushedSinceLastQuery! !\r!RVMLocalHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:32'!\robjectsFlushedSinceLastQuery: count\r\t\"Set how many objects were flushed since the last query\"\r\tobjectsFlushedSinceLastQuery := count! !\r!RVMLocalHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:26'!\roverlyLargeFetchOrAllocationRequestsDeniedSinceLastQuery\r\t\"Answer how many 'cramden' requests were denied since the last query\"\r\toverlyLargeFetchOrAllocationRequestsDeniedSinceLastQuery isNil ifTrue:[^0].\r\t^overlyLargeFetchOrAllocationRequestsDeniedSinceLastQuery! !\r!RVMLocalHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:27'!\roverlyLargeFetchOrAllocationRequestsDeniedSinceLastQuery: count\r\t\"Set how many 'cramden' requests were denied since the last query\"\r\toverlyLargeFetchOrAllocationRequestsDeniedSinceLastQuery := count! !\r!RVMLocalHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:11'!\rscope\r\t\"Answer my scope\"\r\t^'Local'! !\r!RVMLocalHeapStats methodsFor: 'testing' stamp: 'ssa 7/21/2008 10:11'!\risLocal\r\r\t^true! !\r!RVMMemorySystemStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 18:15'!\rgcCount\r\t\"Answer the value of gcCount\"\r\r\tgcCount isNil ifTrue:[self gcCount: nil].\r\t^gcCount! !\r!RVMMemorySystemStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 18:15'!\rgcCount: anObject\r\t\"Set the value of gcCount\"\r\r\tgcCount := anObject! !\r!RVMMemorySystemStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 18:15'!\rgcCycles\r\t\"Answer the value of gcCycles\"\r\r\tgcCycles isNil ifTrue:[self gcCycles: nil].\r\t^gcCycles! !\r!RVMMemorySystemStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 18:15'!\rgcCycles: anObject\r\t\"Set the value of gcCycles\"\r\r\tgcCycles := anObject! !\r!RVMMemorySystemStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 18:15'!\rgcMilliseconds\r\t\"Answer the value of gcMilliseconds\"\r\r\tgcMilliseconds isNil ifTrue:[self gcMilliseconds: nil].\r\t^gcMilliseconds! !\r!RVMMemorySystemStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 18:15'!\rgcMilliseconds: anObject\r\t\"Set the value of gcMilliseconds\"\r\r\tgcMilliseconds := anObject! !\r!RVMMemorySystemStats methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:52'!\rreadMostlyHeapStats\r\t\"Answer the value of readMostlyHeapStats\"\r\r\treadMostlyHeapStats isNil ifTrue:[self readMostlyHeapStats: RVMHeapStats newReadMostly].\r\t^ readMostlyHeapStats! !\r!RVMMemorySystemStats methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:51'!\rreadMostlyHeapStats: anObject\r\t\"Set the value of readMostlyHeapStats\"\r\r\treadMostlyHeapStats _ anObject! !\r!RVMMemorySystemStats methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:51'!\rreadWriteHeapStats\r\t\"Answer the value of readWriteHeapStats\"\r\r\treadWriteHeapStats isNil ifTrue:[self readWriteHeapStats: RVMHeapStats newReadWrite].\r\t^ readWriteHeapStats! !\r!RVMMemorySystemStats methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:51'!\rreadWriteHeapStats: anObject\r\t\"Set the value of readWriteHeapStats\"\r\r\treadWriteHeapStats _ anObject! !\r!RVMMonitor class methodsFor: 'recording' stamp: 'ssa 10/19/2008 00:27'!\rcloseRecordingFile\r\t\"Close the recording file\"\r\tself recordingFile flush;close.\r\tself recordingFile: nil! !\r!RVMMonitor class methodsFor: 'recording' stamp: 'ssa 10/18/2008 22:41'!\risRecording\r\r\t^self recordingMode ~= #off! !\r!RVMMonitor class methodsFor: 'recording' stamp: 'ssa 10/28/2008 15:32'!\rloadChunkedSamplesFromRecordingFile\r\t\"Load the samples with the data on a file supplied by the user\"\r\t| fs data chunk readChunkTime compileChunkTime |\r\tfs _ StandardFileMenu oldFileStreamWithPattern:'*.recording'.\r\tfs isNil ifTrue:[^self inform:'No file to load'].\r\tCursor read showWhile:[\r\tdata _ OrderedCollection new.\r\t[fs atEnd] whileFalse:[Transcript cr;show:'reading data chunk #',(data size + 1) printString.\r\treadChunkTime _ Time millisecondsToRun:[chunk _ fs nextChunk].\r\tTranscript cr;show:(readChunkTime //1000 )printString,' secs to read chunk'.\r\tcompileChunkTime _ Time millisecondsToRun:[data add: (Compiler evaluate: chunk)].\r\tTranscript cr;show: (compileChunkTime //1000) printString,' secs to compile chunk'.\r\t].\r\tfs close.\r\tself recordingMode = #file ifTrue:[self recordingMode: #loop].\r\tself recordingMode = #loop ifTrue:[data _ data asCircularCollection].\r\tself samples: data asCircularCollection].\r\tself changed:#recordingMode\r\r! !\r!RVMMonitor class methodsFor: 'recording' stamp: 'ssa 10/28/2008 19:45'!\rloadSamplesFromRecordingFile\r\t\"Load the samples with the data on a file supplied by the user\"\r\t| fs data readChunkTime  |\r\tfs _ StandardFileMenu oldFileStreamWithPattern:'*.recording'.\r\tfs isNil ifTrue:[^self inform:'No file to load'].\r\tCursor read showWhile:[\r\tdata _ OrderedCollection new.\r\t[fs atEnd] whileFalse:[Transcript cr;show:'reading data chunk #',(data size + 1) printString.\r\treadChunkTime _ Time millisecondsToRun:[data add: (RVMSampleReader dearchiveRawDataFrom: fs)].\r\tTranscript cr;show:(readChunkTime /1000.0)printString,' seconds to read'.\r\t].\r\tfs close.\r\tself recordingMode = #file ifTrue:[self recordingMode: #loop].\r\tself recordingMode = #loop ifTrue:[data _ data asCircularCollection.  \r\t\tself sampleLimit: data size].\r\tself samples: data asCircularCollection].\r\tself changed:#recordingMode\r\r! !\r!RVMMonitor class methodsFor: 'recording' stamp: 'ssa 10/18/2008 22:41'!\ropenRecordingFile\r\t\"Open the recording file\"\r\tself recordingFile ensureOpen! !\r!RVMMonitor class methodsFor: 'recording' stamp: 'ssa 10/18/2008 22:37'!\rrecordAllToFile: aCollection\r\t\"Record each of these elements to the recording file in chunk format\"\r\t\r\taCollection do:[:each| self recordToFile: each]! !\r!RVMMonitor class methodsFor: 'recording' stamp: 'ssa 10/28/2008 15:33'!\rrecordChunkToFile: anObject\r\t\"Record the object on the recording file in chunk format\"\r\t\r\tanObject printOn: self recordingFile.\r\tself recordingFile nextPut:$!!;cr;cr! !\r!RVMMonitor class methodsFor: 'recording' stamp: 'ssa 10/18/2008 22:45'!\rrecordSample: someData\r\t\"Record this sample data based on the recording mode\"\r\t\r\tself recordingMode = #off ifTrue:[^self].\r\tself recordingMode = #file ifTrue:[^self recordToFile: someData].\r\tself samples add: someData! !\r!RVMMonitor class methodsFor: 'recording' stamp: 'ssa 10/28/2008 19:27'!\rrecordToFile: anObject\r\t\"Record the object on the recording file in archiver format\"\r\t\r\tRVMSampleWriter archiveRawData: anObject on:self recordingFile\r\t! !\r!RVMMonitor class methodsFor: 'recording' stamp: 'ssa 10/18/2008 22:24'!\rrecordingFile\r\t\"Answer an appropriately named file for recording samples, open and ready.\"\r\tRecordingFile isNil ifTrue:[self recordingFile: self recordingFileFromUser].\r\t^RecordingFile! !\r!RVMMonitor class methodsFor: 'recording' stamp: 'ssa 10/19/2008 00:28'!\rrecordingFile: aFile\r\t\"Set an appropriately named file for recording samples, open and ready.\"\r\tRecordingFile isNil ifFalse:[RecordingFile close].\r\tRecordingFile _ aFile! !\r!RVMMonitor class methodsFor: 'recording' stamp: 'ssa 10/18/2008 22:31'!\rrecordingFileFromUser\r\t\"Answer an appropriately named file for recording samples, open and ready.\"\r\t^FileStream newFileNamed:'rvm-samples.recording'! !\r!RVMMonitor class methodsFor: 'recording' stamp: 'ssa 10/18/2008 23:19'!\rrecordingMode\r\t\"Recording modes are #off, #loop, #file, and #long\"\r\tRecordingMode isNil ifTrue:[RecordingMode _ #loop].\r\t^RecordingMode! !\r!RVMMonitor class methodsFor: 'recording' stamp: 'ssa 10/19/2008 00:52'!\rrecordingMode: nextMode\r\t\"Recording modes are #off, #loop, #file, and #long\"\r\t| lastMode |\r\tlastMode _ RecordingMode.\r\tlastMode = nextMode ifTrue:[^self].\r\tself switchFrom: lastMode to: nextMode.\r\tRecordingMode _ nextMode.\r\tself changed:#recordingMode! !\r!RVMMonitor class methodsFor: 'recording' stamp: 'ssa 10/18/2008 22:21'!\rswitchFrom: lastMode to: nextMode.\r\t\"Switch recording modes.  Recording modes are #off, #loop, #file, and #long\"\r\tnextMode = #off ifTrue:[\r\t\tlastMode = #loop ifTrue:[\"do nothing, leave collection in place\"].\r\t\tlastMode = #long ifTrue:[\"do nothing, leave collection in place\"].\r\t\tlastMode = #file ifTrue:[self closeRecordingFile]].\r\tnextMode = #loop ifTrue:[\r\t\tlastMode = #off ifTrue:[self samples: (RVMCircularCollection new:self sampleLimit)].\r\t\tlastMode = #long ifTrue:[self samples: (RVMCircularCollection withAll: self samples)].\r\t\tlastMode = #file ifTrue:[self closeRecordingFile]].\r\tnextMode = #long ifTrue:[\r\t\tlastMode = #off ifTrue:[self samples: OrderedCollection new].\r\t\tlastMode = #loop ifTrue:[self samples: self samples asOrderedCollection].\r\t\tlastMode = #file ifTrue:[self closeRecordingFile]].\r\tnextMode = #file ifTrue:[self openRecordingFile; recordAllToFile: self samples].\r\t\r\t\t! !\r!RVMMonitor class methodsFor: 'queries' stamp: 'ssa 1/1/1970 00:18'!\rcoreCount\r\r^self lastSample  groupStats groupSize! !\r!RVMMonitor class methodsFor: 'queries' stamp: 'ssa 11/27/2008 14:45'!\rextent\r\r^self lastSample  extent! !\r!RVMMonitor class methodsFor: 'queries' stamp: 'ssa 11/17/2008 13:22'!\rmainRank\r\r^self lastSample  groupStats mainRank ! !\r!RVMMonitor class methodsFor: 'user interface' stamp: 'ssa 11/17/2008 17:11'!\rcoreIndexFromUser\r\t\"RVMMonitor coreIndexFromUser\"\r\t\"Answer a valid coreINdex from the user for my current configuration\"\r\t|  maxIndex newIndex |\r\tmaxIndex _ self coreCount.\r\t[newIndex _ FillInTheBlank request:'Enter a core index between 0 and ',(maxIndex - 1) printString,':' initialAnswer: '1'.\r\t(newIndex isEmpty or:[(newIndex asNumber between: 0 and: maxIndex - 1) not])] whileTrue.\r\t^newIndex asNumber! !\r!RVMMonitor class methodsFor: 'user interface' stamp: 'dmu 9/17/2010 15:33'!\rdashboard\r\t\"RVMMonitor dashboard      \"   \r\t| topView samplingCheck turboCheck gcButton benchButton subViewCount sampleButton clearSamplesButton forgetButton shuffle56Button shuffle4Button multistripButton systemAspectsButton coreAspectsButton inspectSampleButton testAspectCheck spiderButton bytesUsedsSpiderButton delayTimingCheck recordingOptionsButton allToReadMostlyButton printAllHeapsButton printExecutionTraceButton printStackButton gridButton stripButton scanButton outlierButton locateClassesButton locatorButton locators4Button heartbeat spread56Button runningProcessesButton |\r\ttopView := RVMStandardSystemView new  .\r\ttopView borderWidth:1. \r\tsamplingCheck _ RVMCheckBoxView on: self label: 'Sampling' checkState: [self sampling] whenChecked: [self startSampling] whenUnchecked: [self stopSampling] monitor: true.\r\tturboCheck _ RVMCheckBoxView on: self label: 'Turbo' checkState: [self turboSampling] whenChecked: [self turboOn] whenUnchecked: [self turboOff] monitor: true.\r\ttestAspectCheck _ RVMCheckBoxView on: self label: 'Test Aspects' checkState: [self showTestAspects] whenChecked: [self showTestAspects:true] whenUnchecked: [self showTestAspects:false] monitor: true.\r\tdelayTimingCheck _ RVMCheckBoxView on: self label: 'Short Delay' checkState: [self delayTiming = #short] whenChecked: [self useShortDelay] whenUnchecked: [self useNormalDelay] monitor: true.\r\theartbeat _ RVMCheckBoxView on: self label: 'Heartbeat' checkState: [self showHeartbeat] whenChecked: [self startHeartbeat] whenUnchecked: [self stopHeartbeat] monitor: true.\r\tsampleButton _ RVMButtonView label:'Take Sample' action:[RVMMonitor getSample; informListeners].\r\tinspectSampleButton _ RVMButtonView label:'Inspect Sample' action:[RVMMonitor lastSample inspect].\r\tclearSamplesButton _ RVMButtonView label:'Clear Samples' action:[RVMMonitor clearSamples].\r\trecordingOptionsButton _ RVMButtonView label:'Recording Options' action:[RVMMonitor recordingControls].\r\tforgetButton _ RVMButtonView label:'Forget Listeners' action:[RVMMonitor forgetListeners].\r\tgcButton _ RVMButtonView label:'GC' action:[Transcript cr show:'GC: ',Smalltalk garbageCollect printString].\r\tspread56Button _ RVMButtonView label:'Spread 56' action:[RVMTester spreadFrom: 0 to: 55  moveRWtoRM: true moveRMtoRW: false].\r\tshuffle56Button _ RVMButtonView label:'Shuffle:56' action:[RVMTester shuffle:56].\r\tshuffle4Button _ RVMButtonView label:'Shuffle:4' action:[RVMTester shuffle:4].\r\tallToReadMostlyButton _ RVMButtonView label:'All->readMostly' action:[RVMTester moveAllToReadMostlyHeaps].\r\tprintAllHeapsButton _ RVMButtonView label:'Print BytesUsed' action:[RVMTester printAllHeapsBytesUsed].\r\tprintExecutionTraceButton _ RVMButtonView label:'Print Trace' action:[RVMTester printExecutionTrace].\r\tprintStackButton _ RVMButtonView label:'Print Stack' action:[RVMTester printStack].\r\tgridButton _ self relAbsButtonLabeled:'Tile Grid...' \r\t\t\t\t\trelAction:[RVMTileGridView example]\r\t\t\t\t\tabsAction:[RVMTileGridScalerView example].\r\tstripButton _ self relAbsButtonLabeled:'Tile Strip...' \r\t\t\t\t\trelAction:[RVMTileStripChartView example]\r\t\t\t\t\tabsAction:[RVMTileStripChartScalerView example].\r\tscanButton _ self relAbsButtonLabeled:'Tile Scan...' \r\t\t\t\t\trelAction:[RVMScanningStripChartView example]\r\t\t\t\t\tabsAction:[RVMAbsScanningStripChartView example].\r\tmultistripButton _ RVMButtonView label:'Multi Strip' action:[RVMCoreAspectTrace exampleView1].\r\tsystemAspectsButton _ RVMButtonView label:'System Aspects' action:[RVMAspectTrace monitorAllSystemAspects].\r\tcoreAspectsButton _ RVMButtonView label:'Core Aspects' action:[RVMCoreAspectTrace monitorAllCoreAspectsForCoreFromUser].\r\trunningProcessesButton _  RVMButtonView label:'Running Processes' action:[RVMAspectTrace exampleView8].\r\t\tspiderButton _ RVMButtonView label:'Kiviat' action:[RVMMultiKiviatView exampleBytecodesAndProcessesRunning].\r\tbytesUsedsSpiderButton _ RVMButtonView label:'heap size Kiviat' action:[RVMMultiKiviatView exampleBytesUsedTrioCommonPinned].\r\toutlierButton _ RVMButtonView label:'Outlier...' action:[RVMMonitor outlierFromUser].\r\tlocateClassesButton _ RVMButtonView label:'Class Locator' action:[RVMGroupLocatorView openOn: Smalltalk objectsSource:#allClasses labeled:'All Classes'].\r\tlocatorButton _ RVMButtonView label:'Group Locator' action:[RVMGroupLocatorView openWithSourceEditorOn: nil objectsSource:[Array allInstances]].\r\tlocators4Button _ RVMButtonView label:'4 Group Locator' action:[RVMMultiGroupLocatorView openOn: nil sources: {[String allInstances]. [Collection withAllSubclasses]. [Object withAllSubclasses]. [View allSubInstances]} colors: nil].\r\tbenchButton _ RVMButtonView label:'testCompiler' action:[Cursor wait showWhile:[RVMExperiment testCompiler]].\r\t\r\ttopView addSubView: samplingCheck.\r\ttopView addSubView:  turboCheck below:  samplingCheck.\r\ttopView addSubView:  testAspectCheck below:  turboCheck.\r\ttopView addSubView:  delayTimingCheck below:  testAspectCheck.\r\ttopView addSubView:  heartbeat below:  delayTimingCheck.\r\ttopView addSubView:  sampleButton below:  heartbeat.\r\ttopView addSubView:  inspectSampleButton below:  sampleButton.\r\ttopView addSubView:  clearSamplesButton below:  inspectSampleButton.\r\ttopView addSubView:  recordingOptionsButton below:  clearSamplesButton.\r\ttopView addSubView:  forgetButton below:  recordingOptionsButton.\r\ttopView addSubView:  gcButton below:  forgetButton.\r\ttopView addSubView:  spread56Button below:  gcButton.\r\ttopView addSubView:  shuffle56Button below:  spread56Button.\r\ttopView addSubView:  shuffle4Button below:  shuffle56Button.\r \ttopView addSubView:  allToReadMostlyButton below:  shuffle4Button.\r\ttopView addSubView:  printAllHeapsButton below:  allToReadMostlyButton.\r\ttopView addSubView:  printExecutionTraceButton below: printAllHeapsButton.\r\ttopView addSubView:  printStackButton below: printExecutionTraceButton.\r\ttopView addSubView:  gridButton below: printStackButton.\r\ttopView addSubView:  stripButton below: gridButton.\r\ttopView addSubView:  scanButton below: stripButton.\r\ttopView addSubView:  multistripButton below: scanButton.\r\ttopView addSubView:  systemAspectsButton below: multistripButton.\r\ttopView addSubView:  coreAspectsButton below: systemAspectsButton.\r\ttopView addSubView: runningProcessesButton below: coreAspectsButton.\r\ttopView addSubView:  spiderButton below: runningProcessesButton.\r\ttopView addSubView:  bytesUsedsSpiderButton below: spiderButton.\r\ttopView addSubView:  outlierButton below: bytesUsedsSpiderButton.\r\ttopView addSubView:  locateClassesButton below: outlierButton.\r\ttopView addSubView:  locatorButton below: locateClassesButton.\r\ttopView addSubView:  locators4Button below: locatorButton.\r\ttopView addSubView:  benchButton below: locators4Button.\r\ttopView label: 'RVM'.\r\tRVMMonitor forgetAll: topView allSubViews.\r\tRVMMonitor forget: topView.\r\tsubViewCount _ topView subViews size.\r\ttopView minimumSize: 120@(subViewCount*27).\r\ttopView maximumSize: topView minimumSize.\r\ttopView controller open! !\r!RVMMonitor class methodsFor: 'user interface' stamp: 'ssa 11/13/2008 02:10'!\routlierFromUser\r\t| menu result selectors labels aspects sel cores |\r\tselectors _ #(coreAspectSubset coreAspectSubsetAllocationCompaction coreAspectSubsetBytecodes coreAspectSubsetBytes coreAspectSubsetRunWait coreAspectSubsetYields allCoreAspects).\r\tlabels _ #('selected aspects' 'allocation/compaction' 'bytecodes' 'bytes' 'run/wait' 'yields' 'all for a single core').\r\tmenu _ PopUpMenu labelArray: labels.\r\tresult _ menu startUpWithCaption:'Which set of aspects for the Outlier?'.\r\tresult = 0 ifTrue: [^self].\r\taspects _ RVMMultiAspectKiviatView perform: (sel _ selectors at: result).\r\tcores _ sel = #allCoreAspects ifTrue:[Array with: self coreIndexFromUser]ifFalse:[(1 to: RVMMonitor coreCount) asOrderedCollection].\r\tRVMMultiAspectKiviatView openOnAspects:  aspects forCores:  cores titled:'Outliers: ',(labels at: result)! !\r!RVMMonitor class methodsFor: 'user interface' stamp: 'ssa 5/12/2010 10:16'!\rrecordingControls\r\t\"RVMMonitor recordingControls   \"  \r\t| topView   offRadio loopRadio subViewCount longRadio fileRadio loadButton radios |\r\ttopView := RVMStandardSystemView new  .\r\tradios _ RVMView new.\r\ttopView borderWidth:1. \r\tRVMRadioButtonView testState:#(true false false false false).\r\toffRadio _ RVMRadioButtonView on: self label: 'stop recording' checkState: [RVMMonitor recordingMode = #off] whenChecked: [RVMMonitor recordingMode: #off] whenUnchecked: [] monitor: true.\r\tloopRadio _ RVMRadioButtonView on: self label: 'record last ',RVMMonitor sampleLimit printString,' samples' checkState: [RVMMonitor recordingMode = #loop] whenChecked: [RVMMonitor recordingMode: #loop] whenUnchecked: [] monitor: true.\r\tlongRadio _ RVMRadioButtonView on: self label: 'record all samples' checkState: [RVMMonitor recordingMode = #long] whenChecked: [RVMMonitor recordingMode: #long] whenUnchecked: [] monitor: true.\r\tfileRadio _ RVMRadioButtonView on: self label: 'record all samples to a file' checkState: [RVMMonitor recordingMode = #file] whenChecked: [RVMMonitor recordingMode: #file] whenUnchecked: [] monitor: true.\r\tloadButton _ RVMButtonView label:'Load samples from file' action:[RVMMonitor loadSamplesFromRecordingFile].\r\t\r\tradios addSubView: offRadio.\r\tradios addSubView:  loopRadio below:  offRadio.\r\tradios addSubView:  longRadio below:  loopRadio.\r\tradios addSubView:  fileRadio below:  longRadio.\r\ttopView addSubView: radios.\r\ttopView addSubView:  loadButton below:  radios.\r\tRVMMonitor forgetAll: topView allSubViews.\r\tRVMMonitor forget: topView.\r\ttopView label: 'Recording Options'.\r\tsubViewCount _ radios subViews size + topView subViews size - 1.\r\ttopView minimumSize: 200@(subViewCount*28).\r\ttopView maximumSize: 200@topView minimumSize y.\r\ttopView controller open! !\r!RVMMonitor class methodsFor: 'user interface' stamp: 'ssa 11/15/2008 23:30'!\rrelAbsButtonLabeled: aTitle relAction: relAction absAction: absAction\r\t| menu result |\r\t^RVMButtonView label: aTitle\r\t\t action:\t\t\t\t\r\t[menu _ PopUpMenu labelArray:#('Relative Scaling' 'Absolute Scaling').\r\tresult _ menu startUpWithCaption:'Which color scaling to use?'.\r\tresult = 1 ifTrue: [relAction copy value].\r\tresult = 2 ifTrue: [absAction copy value]] copy! !\r!RVMMonitor class methodsFor: 'test aspects' stamp: 'ssa 10/3/2008 15:06'!\rshowTestAspects\r\r\tShowTestAspects isNil ifTrue:[ShowTestAspects _ false].\r\t^ShowTestAspects! !\r!RVMMonitor class methodsFor: 'test aspects' stamp: 'ssa 10/3/2008 15:06'!\rshowTestAspects: aBoolean\r\r\tShowTestAspects _ aBoolean! !\r!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 1/1/1970 00:12'!\rclearSamples\r\t\"Clear my collection of samples\"\r\tSamples := nil.\r\tLastSample := nil.! !\r!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 10/7/2008 21:19'!\rdelaySamplingDuring: aBlock\r\r\tself sampling \r\t\tifTrue:[self stopSampling.\r\t\t\taBlock value.\r\t\t\tself startSampling]\r\t\tifFalse:[aBlock value]! !\r!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 10/7/2008 20:25'!\rdelayTiming\r\r\tDelayTiming isNil ifTrue:[DelayTiming _ #normal].\r\t^DelayTiming! !\r!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 10/7/2008 20:25'!\rdelayTiming: aSymbol\r\t\"#normal or #short\"\r\r\tDelayTiming _ aSymbol! !\r!RVMMonitor class methodsFor: 'sampling' stamp: 'dmu 4/10/2009 22:48'!\rgetSample\r\t\"Get the next sample\"\r\tLastSample := self turboSampling ifTrue:[RVMMulticoreSample captureFastest]ifFalse:[RVMMulticoreSample next].\r\tRVMTester isRVM & self isRecording ifTrue:[\r\t\t\t\tself recordSample: LastSample rawData].\r! !\r!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 11/15/2008 23:42'!\rlastSample\r\t\"Answer the last recorded sample\"\r\tLastSample isNil ifTrue:[self getSample].\r\t^LastSample ! !\r!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 10/7/2008 20:23'!\rnormalDelayTiming\r\t^self delayTiming = #normal! !\r!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 10/21/2008 11:56'!\rsampleLimit\r\r\tSampleLimit isNil ifTrue:[SampleLimit := 2].\r\t^SampleLimit! !\r!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 8/22/2008 09:42'!\rsampleLimit: anInteger\r\r\tSampleLimit := anInteger.\r\tself clearSamples! !\r!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 10/18/2008 22:14'!\rsamples\r\t\"Answer my collection of samples\"\r\tSamples isNil ifTrue:[self samples:(RVMCircularCollection new:self sampleLimit)].\r\t^Samples! !\r!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 10/18/2008 22:14'!\rsamples: aCollection\r\t\"Set my collection of samples\"\r\tSamples _ aCollection! !\r!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 10/7/2008 21:19'!\rsampling\r\t\"Am I current sampling?\"\r\t^SamplingProcess notNil! !\r!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 7/16/2010 16:54'!\rstartSampling\r\t\"RVMMonitor startSampling\"\r\t\"Start the sampling process\"\r\t| delay timeToRun delayTime lastTime|\r\tlastTime _ Time now asSeconds.\r\tSamplingProcess notNil ifTrue:[self stopSampling].\r\tSamplingProcess := [[ Sensor leftShiftDown & Sensor controlKeyPressed]\r\t\t\t\t\t\t\t\twhileFalse: [\r\t\t\t\t\t\t\t\t\t\"RVMTester print: (Time now asSeconds - lastTime)  printString,' seconds since last sample'.\"\r\t\t\t\t\t\t\t\t\t timeToRun _ Time millisecondsToRun: [self getSample].\r\t\t\t\t\t\t\t\t\tlastTime _ Time now asSeconds.\r\t\t\t\t\t\t\t\t\t\"RVMTester print:'sampling took ',(timeToRun/1000.0) printString,' seconds'.\"\r\t\t\t\t\t\t\t\t\tdelayTime _ self normalDelayTiming ifTrue:[10*timeToRun]ifFalse:[100 min: 10*timeToRun].\r\t\t\t\t\t\t\t\t\tdelay := Delay forMilliseconds: delayTime.\r\t\t\t\t\t\t\t\t\tself informListeners.\r\t\t\t\t\t\t\t\t\tRVMMulticoreSample flush.  \"clear sample buffers from monitor activity\"\r\t\t\t\t\t\t\t\t\tdelay wait]] newProcess.\r\tSamplingProcess name: 'RVMMonitor sampling process'.\r\tSamplingProcess resume\t! !\r!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 9/4/2008 15:00'!\rstopSampling\r\t\"RVMMonitor stopSampling\"\r\t\"Stop the sampling process\"\r\r\tSamplingProcess isNil ifFalse:[SamplingProcess terminate].\r\tSamplingProcess := nil! !\r!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 1/1/1970 00:16'!\rturboOff\r\t\"Turn off turboSampling\"\r\tTurboSampling := false! !\r!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 1/1/1970 00:16'!\rturboOn\r\t\"Turn on turboSampling\"\r\tTurboSampling := true! !\r!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 1/1/1970 00:16'!\rturboSampling\r\t\"Answer my  turboSampling flag\"\r\tTurboSampling isNil ifTrue:[TurboSampling := true].\r\t^TurboSampling! !\r!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 10/7/2008 21:22'!\ruseNormalDelay\r\tself delaySamplingDuring:[self delayTiming: #normal].\r\t! !\r!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 10/7/2008 21:22'!\ruseShortDelay\r\tself delaySamplingDuring:[self delayTiming: #short].! !\r!RVMMonitor class methodsFor: 'listeners' stamp: 'ssa 1/1/1970 00:07'!\rforget: someone\r\r\tself listeners remove: someone ifAbsent:[]! !\r!RVMMonitor class methodsFor: 'listeners' stamp: 'ssa 10/28/2008 19:54'!\rforgetAll: someListeners\r\r\tsomeListeners do:[:each|\r\tself forget: each]! !\r!RVMMonitor class methodsFor: 'listeners' stamp: 'ssa 1/1/1970 00:07'!\rforgetListeners\r\r\tListeners := nil! !\r!RVMMonitor class methodsFor: 'listeners' stamp: 'ssa 8/25/2008 05:02'!\rinform: someone\r\r\tself listeners add: someone! !\r!RVMMonitor class methodsFor: 'listeners' stamp: 'ssa 2/18/2009 17:42'!\rinformListeners\r\r\tself listeners do:[:each| each hear: self]\r\r\r\"\t| sema |\r\tsema _ Semaphore  new.\r\tself listeners do:[:each| [each hear: self. sema signal] copy fixTemps fork].\r\tself listeners do: [:each| sema wait]\"\r\t! !\r!RVMMonitor class methodsFor: 'listeners' stamp: 'ssa 8/25/2008 04:59'!\rlisteners\r\t\"Answer the list of listeners to me\"\r\tListeners isNil ifTrue:[Listeners := OrderedCollection new].\r\t^Listeners! !\r!RVMMonitor class methodsFor: 'autocoding' stamp: 'ssa 1/1/1970 00:03'!\rautocodeScalerMethodFor: aSelector\r\t\"Autocode and install a default scaler method for the aspect found in this selector.\"\r\t\"Note this also adds a class variable of the form SCALERaspect\"\r\t\r\t| aspect code var |\r\taspect _ aSelector allButLast:'Scaler' size.\r\tvar _ 'SCALER',aspect.\r\tself addClassVarName: var.\r\tcode _ aSelector,'\r\t\"Answer the default scaler for ',aspect,'.\"\r\t',var,' isNil ifTrue:[',var,' _ RVMDataScaler aspect: #',aspect,' min: 0 max: 100].\r\t^',var.\r\tself class compile: code classified:'scalers' notifying:nil! !\r!RVMMonitor class methodsFor: 'autocoding' stamp: 'ssa 1/1/1970 00:03'!\rautocodeScalerMethodForScaler: aDataScaler\r\t\"Autocode and install a default scaler method for the aspect found in this selector.\"\r\t\"Note this also adds a class variable of the form SCALERaspect\"\r\t\r\t| aspect code var |\r\taspect _ aDataScaler aspect.\r\tvar _ 'SCALER',aspect.\r\t(self classVarNames includes: var) ifFalse:[self addClassVarName: var].\r\tcode _ aspect,'Scaler\r\t\"Answer the default scaler for ',aspect,'.\"\r\t',var,' isNil ifTrue:[',var,' _ RVMDataScaler aspect:#',aspect,' min: ',aDataScaler min printString,' max: ',aDataScaler max printString,'].\r\t^',var.\r\tself class compile: code classified:'scalers' notifying:nil! !\r!RVMMonitor class methodsFor: 'autocoding' stamp: 'ssa 1/1/1970 00:49'!\rdoesNotUnderstand: aMessage\r\t\"autocode a method for aMessage if its one I recognize.\"\r\t(aMessage selector isUnary & (aMessage selector endsWith: 'Scaler')) \r\t\tifTrue:[self halt:'this should not be used anymore'.\r\t\t\tself  autocodeScalerMethodFor: aMessage selector.\r\t\t\t^self perform: aMessage selector].\r\t\t\r\t^super doesNotUnderstand: aMessage! !\r!RVMMonitor class methodsFor: 'data generation' stamp: 'ssa 9/13/2008 19:40'!\rdataFor: anAspect\r\t\"Answer a generated data value for this aspect, based on the range of its scaler\"\r\t\r\t^(self scalerFor:anAspect) atRandom! !\r!RVMMonitor class methodsFor: 'scaling' stamp: 'ssa 1/1/1970 00:44'!\rcoloredScalerFor: aspect\r\t\"Answer an appropriate colored scaler for this aspect.\"\r\t\r\t^RVMColoredDataScaler aspect: aspect! !\r!RVMMonitor class methodsFor: 'scaling' stamp: 'ssa 1/1/1970 00:44'!\rcoloredScalersFor: aspects\r\t\"Answer an appropriate colored scalers for this aspect.\"\r\t\r\t^aspects collect:[:each| self coloredScalerFor: each]! !\r!RVMMonitor class methodsFor: 'scaling' stamp: 'ssa 1/1/1970 00:02'!\rscalerFor: aspect\r\t\"Answer an appropriate scalers for this aspect.\"\r\t[^RVMDataScaler new automatic]value.\r\t^self perform: (aspect,'Scaler') asSymbol! !\r!RVMMonitor class methodsFor: 'scaling' stamp: 'ssa 9/13/2008 19:39'!\rscalersFor: aspects\r\t\"Answer a collection of appropriate scalers for these aspects.\"\r\r\t^aspects collect:[:aspect|\r\t\tself scalerFor: aspect]! !\r!RVMMonitor class methodsFor: 'heartbeat' stamp: 'ssa 4/1/2009 16:02'!\rshowHeartbeat\r\r\tShowHeartbeat isNil ifTrue:[ShowHeartbeat _ false].\r\t^ShowHeartbeat! !\r!RVMMonitor class methodsFor: 'heartbeat' stamp: 'ssa 4/1/2009 16:03'!\rshowHeartbeat: aBoolean\r\r\tShowHeartbeat _ aBoolean! !\r!RVMMonitor class methodsFor: 'heartbeat' stamp: 'ssa 4/3/2009 12:18'!\rstartHeartbeat\r\t\"RVMMonitor startHeartbeat\"\r\t\"RVMMonitor stopHeartbeat\"\r\t| rect delay |\r\tself showHeartbeat: true.\r\trect _ 0@0 extent: 4@4.\r\tdelay _ Delay forSeconds: 1.\r\t[[self showHeartbeat] whileTrue:[Display reverse: rect. delay wait]] forkAt: Processor highestPriority.\r\tProcessor yield ! !\r!RVMMonitor class methodsFor: 'heartbeat' stamp: 'ssa 4/1/2009 16:09'!\rstopHeartbeat\r\t\"RVMMonitor startHeartbeat\"\r\t\"RVMMonitor stopHeartbeat\"\r\tself showHeartbeat: false.! !\r!RVMMulticoreSample methodsFor: 'accessing' stamp: 'ssa 9/14/2008 20:50'!\raspects\r\t\"Answer a list of message selectors that will return arrays of numbers for my monitor\"\r\t\r\t^self class aspects! !\r!RVMMulticoreSample methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:06'!\rcoreIndices\r\r\t^self groupStats coreIndices! !\r!RVMMulticoreSample methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:33'!\rcpuCoreStats\r\t\"Answer the value of cpuCoreStats\"\r\r\t^cpuCoreStats! !\r!RVMMulticoreSample methodsFor: 'accessing' stamp: 'ssa 8/13/2008 15:11'!\rcpuCoreStats: anObject\r\t\"Set the value of cpuCoreStats\"\r\r\tcpuCoreStats := anObject! !\r!RVMMulticoreSample methodsFor: 'accessing' stamp: 'ssa 11/13/2008 09:42'!\rextent\r\t\"Answer the dimensions of my tile grid\"\r\t^self groupStats extent! !\r!RVMMulticoreSample methodsFor: 'accessing' stamp: 'ssa 11/16/2008 15:03'!\rfence\r\t\"Answer the value of fence\"\r\r\tfence isNil ifTrue:[self fence: nil].\r\t^ fence! !\r!RVMMulticoreSample methodsFor: 'accessing' stamp: 'ssa 11/16/2008 15:03'!\rfence: anObject\r\t\"Set the value of fence\"\r\r\tfence _ anObject! !\r!RVMMulticoreSample methodsFor: 'accessing' stamp: 'dmu 8/15/2008 22:13'!\rgroupStats ^  groupStats! !\r!RVMMulticoreSample methodsFor: 'accessing' stamp: 'dmu 8/15/2008 22:14'!\rgroupStats: x    groupStats  _ x! !\r!RVMMulticoreSample methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:33'!\rmessageNames\r\t\"Answer the value of messageNames\"\r\r\t^messageNames! !\r!RVMMulticoreSample methodsFor: 'accessing' stamp: 'ssa 8/13/2008 15:11'!\rmessageNames: anObject\r\t\"Set the value of messageNames\"\r\r\tmessageNames := anObject! !\r!RVMMulticoreSample methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:07'!\rnumberOfCores\r\r\t^self groupStats isNil ifTrue:[56]ifFalse:[self groupStats groupSize]! !\r!RVMMulticoreSample methodsFor: 'accessing' stamp: 'ssa 8/13/2008 15:11'!\rrawData\r\t\"Answer the value of rawData\"\r\r\trawData isNil ifTrue:[self rawData: nil].\r\t^rawData! !\r!RVMMulticoreSample methodsFor: 'accessing' stamp: 'ssa 10/18/2008 18:03'!\rrawData: anObject\r\t\"Set the value of rawData\"\r\r\trawData := anObject! !\r!RVMMulticoreSample methodsFor: 'accessing' stamp: 'dmu 1/1/1970 00:04'!\rrunMask\r^ runMask! !\r!RVMMulticoreSample methodsFor: 'accessing' stamp: 'dmu 1/1/1970 00:05'!\rrunMask: x\r  runMask := x! !\r!RVMMulticoreSample methodsFor: 'accessing' stamp: 'dmu 1/1/1970 00:20'!\rtotalYields\r^ self cpuCoreStats yieldCounts sum! !\r!RVMMulticoreSample methodsFor: 'initialize' stamp: 'ssa 8/13/2008 17:32'!\rinitializeAllCPUCoreStatsFrom: data\r\t\r\tself cpuCoreStats: (RVMAllCPUCoreStats newFrom: data forMessageNames: self messageNames)! !\r!RVMMulticoreSample methodsFor: 'initialize' stamp: 'ssa 8/19/2008 10:50'!\rinitializeFastAllCPUCoreStatsFrom: data\r\t\r\tself cpuCoreStats: (RVMAllCPUCoreStats newFastFrom: data forMessageNames: self messageNames)! !\r!RVMMulticoreSample methodsFor: 'initialize' stamp: 'ssa 7/16/2010 16:45'!\rinitializeFastFrom: data\r\t\"This implementations assumes order dependency in the array for speed.\r\t\r\tSet my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.    Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\r\t\r\tself rawData: data.\r\tself runMask: (data at: 2).\r\tself messageNames: (data at: 4).\r\tself initializeFastGroupStatsFrom: (data at: 6).\r\tself initializeFastAllCPUCoreStatsFrom: (data at: 8).\r\tself fence: (data at: 10).\r\tself processInstanceCount: Process instanceCount\r! !\r!RVMMulticoreSample methodsFor: 'initialize' stamp: 'ssa 3/25/2009 14:11'!\rinitializeFastGroupStatsFrom: data\r\t\r\tself groupStats: (RVMGroupStats new initializeFastFrom: data last)! !\r!RVMMulticoreSample methodsFor: 'initialize' stamp: 'ssa 1/1/1970 00:04'!\rinitializeFastestAllCPUCoreStatsFrom: data\r\t\r\tself cpuCoreStats: (RVMAllCPUCoreStats newFastestFrom: data forMessageNames: self messageNames)! !\r!RVMMulticoreSample methodsFor: 'initialize' stamp: 'dmu 5/21/2010 23:05'!\rinitializeFastestFrom: data\r\t\"This implementations assumes order dependency in the array for speed.\r\t\r\tSet my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.    Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\r\t\r\tself rawData: data.\r\tself runMask: (data at: 2).\r\tself messageNames: (data at: 4).\r\tself initializeFastestGroupStatsFrom: ((data at: 6 ) at: 2).\r\tself initializeFastestAllCPUCoreStatsFrom: (data at: 8).\r\tself fence: (data at: 10).\r! !\r!RVMMulticoreSample methodsFor: 'initialize' stamp: 'ssa 3/25/2009 19:17'!\rinitializeFastestGroupStatsFrom: data\r\t\r\tself groupStats: (RVMGroupStats new initializeFastFrom: data )! !\r!RVMMulticoreSample methodsFor: 'initialize' stamp: 'ssa 7/16/2010 16:46'!\rinitializeFrom: data\r\t\"Set my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  This implementations assumes no order dependency in the array except that values always follow their names.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\r\t\r\t| valueMap objectMap |\r\tself rawData: data.\r\tvalueMap := { }.\r\tobjectMap := { \r\t\t\t\t'runMask' -> #runMask:.\r\t\t\t\t'messageNames' -> #messageNames:.\r\t\t\t\t'allCPUCoreStats' -> #initializeAllCPUCoreStatsFrom:.\r\t\t\t\t'groupStats' -> #initializeGroupStatsFrom:.\r\t\t\t\t'fence' -> #fence:.\r\t\t\t\t}.\r\t\t\t\t\r\tself processMap: valueMap into: self forData: data.\r\tself processMap: objectMap into: self forData: data.\r\tself processInstanceCount: Process instanceCount\r! !\r!RVMMulticoreSample methodsFor: 'initialize' stamp: 'dmu 8/15/2008 22:11'!\rinitializeGroupStatsFrom: data\r\t\rgroupStats _ RVMGroupStats new initializeFrom: data! !\r!RVMMulticoreSample methodsFor: 'initialize' stamp: 'ssa 8/13/2008 15:47'!\rprocessMap: map into: targetObject forData: data\r\t\t\t\t\r\t| index datum |\r\tmap do:[:assoc |\r\t\tindex := data indexOf: assoc key.\r\t\tindex = 0 ifTrue:[self error:'Can''t find ',assoc key,' in sample data'].\r\t\tdatum := data at: index + 1.\r\t\ttargetObject perform: assoc value with: datum].\r! !\r!RVMMulticoreSample methodsFor: 'printing' stamp: 'ssa 8/15/2008 16:28'!\rprintOn: aStream\r\r\taStream \r\t\tnextPutAll: 'anRVMMulticoreStats(';\r\t\tcr;tab;nextPutAll: ' bytecodesPerCycle=';nextPutAll: self bytecodesPerCycle printString;\r\t\tcr;tab;nextPutAll: ' bytecodesPerCyclesAverage=';nextPutAll: self bytecodesPerCyclesAverage printString;\r\t\tcr;tab;nextPutAll: ' bytecodesPerMillisecond=';nextPutAll: self bytecodesPerMillisecond printString;\r\t\tcr;tab;nextPutAll: ' bytecodesPerMillisecondsAverage=';nextPutAll: self bytecodesPerMillisecondsAverage printString;\r\t\tcr;tab;nextPutAll: ' bytecodeCountsAvg=';nextPutAll: self bytecodeCountsAverage printString;\r\t\tcr;tab;nextPutAll: ' bytecodePerSecondAvg=';nextPutAll: self bytecodesPerSecondAverage printString;\r\t\tcr;tab;nextPutAll: ' cyclesRunningsAvg=';nextPutAll: self cyclesRunningsAverage printString;\r\t\tcr;tab;nextPutAll: ' cyclesWaitingsAvg=';nextPutAll: self cyclesWaitingsAverage printString;\r\t\tcr;tab;nextPutAll: ' cyclesRunWaitRatiosAvg=';nextPutAll: self cyclesRunWaitRatiosAverage printString;\r\t\tcr;tab;nextPutAll: ' msRunningsAvg=';nextPutAll: self msRunningsAverage printString;\r\t\tcr;tab;nextPutAll: ' msWaitingsAvg=';nextPutAll: self msWaitingsAverage printString;\r\t\tcr;tab;nextPutAll: ' msRunWaitRatiosAvg=';nextPutAll: self msRunWaitRatiosAverage printString;\r\t\tcr;tab;nextPutAll: ' yieldCountsAvg=';nextPutAll: self yieldCountsAverage printString;\r\t\tcr;tab;nextPutAll: ' yieldsPerSecondAvg=';nextPutAll: self yieldsPerSecondAverage printString;\r\t\tcr;tab;nextPutAll: ')';cr\r\t\t! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:58'!\rallocationsReadMostlys\r\t\"RVMMulticoreSample capture allocationsReadMostlys\"\r\t\"Answer the collection of allocationsSinceLastReadMostlys\"\r\t\r\t^self cpuCoreStats allocationsSinceLastReadMostlys! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:58'!\rallocationsReadWrites\r\t\"RVMMulticoreSample capture allocationsReadWrites\"\r\t\"Answer the collection of allocationsSinceLastReadWrites\"\r\t\r\t^self cpuCoreStats allocationsSinceLastReadWrites! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:53'!\rallocationsSinceLastReadMostlys\r\t\"RVMMulticoreSample capture allocationsSinceLastReadMostlys\"\r\t\"Answer the collection of allocationsSinceLastReadMostlys\"\r\t\r\t^self cpuCoreStats allocationsSinceLastReadMostlys! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:53'!\rallocationsSinceLastReadWrites\r\t\"RVMMulticoreSample capture allocationsSinceLastReadWrites\"\r\t\"Answer the collection of allocationsSinceLastReadWrites\"\r\t\r\t^self cpuCoreStats allocationsSinceLastReadWrites! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 10/4/2008 08:00'!\rallocationsTotal\r\t\"RVMMulticoreSample capture allocationsTotal\"\r\t\"Answer the collection of allocationsSinceLast\"\r\t\r\t^self cpuCoreStats allocationsSinceLasts! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:40'!\rbytecodeCounts\r\t\"RVMMulticoreSample capture bytecodeCounts\"\r\t\"Answer the collection of bytecode counts during this sample\"\r\t\r\t^self cpuCoreStats bytecodeCounts! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/14/2008 17:14'!\rbytecodeCountsAverage\r\t\"RVMMulticoreSample capture bytecodeCountsAverage\"\r\t\"Answer the average of bytecode counts during this sample\"\r\t\r\t^self cpuCoreStats bytecodeCounts average asFloat! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 9/17/2010 15:19'!\rbytecodesPerCycle\r\t\"RVMMulticoreSample capture bytecodesPerCycle\"\r\r\t| avg |\r\tavg := self cyclesSinceLastsAverage.\r\t^avg = 0 \r\t\tifTrue:[0] \r\t\tifFalse:[self bytecodeCounts sum / (1 max: self cyclesSinceLastsAverage) asFloat]! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:05'!\rbytecodesPerCycles\r\t\"RVMMulticoreSample capture bytecodesPerCycles\"\r\t^self bytecodeCounts with: self cyclesRunnings \r\t\tcollect:[:bc :ms| ms = 0 ifTrue:[0] ifFalse:[bc/ms asFloat]]! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/15/2008 16:06'!\rbytecodesPerCyclesAverage\r\t\"RVMMulticoreSample capture bytecodesPerCyclesAverage\"\r\t^self bytecodesPerCycles average! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:06'!\rbytecodesPerKCs\r^ self bytecodesPerCycles collect: [:x| x * 1000]! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:09'!\rbytecodesPerMCs\r^ self bytecodesPerCycles collect: [:x| x * 1000000]! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 9/17/2010 15:20'!\rbytecodesPerMillisecond\r\t\"RVMMulticoreSample capture bytecodesPerMillisecond\"\r\t^self bytecodeCounts sum / (1 max: self msSinceLastsAverage) asFloat! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 9/17/2010 15:20'!\rbytecodesPerMilliseconds\r\t\"RVMMulticoreSample capture bytecodesPerMilliseconds\"\r\t^self bytecodeCounts with: self msSinceLasts collect:[:bc :ms| bc/(1 max: ms) asFloat]! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/15/2008 15:35'!\rbytecodesPerMillisecondsAverage\r\t\"RVMMulticoreSample capture bytecodesPerMillisecondsAverage\"\r\t^self bytecodesPerMilliseconds average! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:25'!\rbytecodesPerSecond\r\t\"RVMMulticoreSample capture bytecodesPerSecond\"\r\t\"Answer the collection of ratios of bytecodes executed per second during this sample\"\r\t\r\t^self cpuCoreStats bytecodesPerSecond! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/14/2008 17:14'!\rbytecodesPerSecondAverage\r\t\"RVMMulticoreSample capture bytecodesPerSecondAverage\"\r\t\"Answer the average of ratios of bytecodes executed per second during this sample\"\r\t\r\t^self cpuCoreStats bytecodesPerSecond average asFloat! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:50'!\rbytesLeftReadMostlys\r\t\"RVMMulticoreSample capture bytesLeftReadMostlys\"\r\t\"Answer the collection of bytesLeftReadMostlys\"\r\t\r\t^self cpuCoreStats bytesLeftReadMostlys! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:50'!\rbytesLeftReadWrites\r\t\"RVMMulticoreSample capture bytesLeftReadWrites\"\r\t\"Answer the collection of bytesLeftReadWrites\"\r\t\r\t^self cpuCoreStats bytesLeftReadWrites! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:50'!\rbytesLefts\r\t\"RVMMulticoreSample capture bytesLefts\"\r\t\"Answer the collection of bytesLeft\"\r\t\r\t^self cpuCoreStats bytesLefts! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:48'!\rbytesUsedReadMostlys\r\t\"RVMMulticoreSample capture bytesUsedReadMostlys\"\r\t\"Answer the collection of bytesUsedReadMostlys\"\r\t\r\t^self cpuCoreStats bytesUsedReadMostlys! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:47'!\rbytesUsedReadWrites\r\t\"RVMMulticoreSample capture bytesUsedReadWrites\"\r\t\"Answer the collection of bytesUsedReadWrites\"\r\t\r\t^self cpuCoreStats bytesUsedReadWrites! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:24'!\rbytesUseds\r\t\"RVMMulticoreSample capture bytesUseds\"\r\t\"Answer the collection of bytesUsed\"\r\t\r\t^self cpuCoreStats bytesUseds! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:59'!\rcompactionsReadMostlys\r\t\"RVMMulticoreSample capture compactionsSinceLastReadMostlys\"\r\t\"Answer the collection of compactionsSinceLastReadMostlys\"\r\t\r\t^self cpuCoreStats compactionsSinceLastReadMostlys! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:59'!\rcompactionsReadWrites\r\t\"RVMMulticoreSample capture compactionsReadWrites\"\r\t\"Answer the collection of compactionsSinceLastReadWrites\"\r\t\r\t^self cpuCoreStats compactionsSinceLastReadWrites! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 10/4/2008 08:00'!\rcompactionsTotal\r\t\"RVMMulticoreSample capture compactionsTotal\"\r\t\"Answer the collection of compactionsSinceLast\"\r\t\r\t^self cpuCoreStats compactionsSinceLasts! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:06'!\rcontextChangeCounts\r\t\"RVMMulticoreSample capture contextChangeCounts\"\r\t\"Answer the collection of yields during this sample\"\r\t\r\t^self cpuCoreStats contextChangeCounts! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 4/1/2009 22:32'!\rcoreProcessUtilization\r\r\t^RVMTester coreProcessUtilization asFloat! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:52'!\rcyclesRunWaitRatios\r\t\"RVMMulticoreSample capture cyclesRunWaitRatios\"\r\t\"Answer the collection of ratios during this sample\"\r\t\r\t^self cpuCoreStats cyclesRunWaitRatios! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/14/2008 17:14'!\rcyclesRunWaitRatiosAverage\r\t\"RVMMulticoreSample capture cyclesRunWaitRatiosAverage\"\r\t\"Answer the average of ratios during this sample\"\r\t\r\t^self cpuCoreStats cyclesRunWaitRatios average asFloat! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:49'!\rcyclesRunnings\r\t\"RVMMulticoreSample capture cyclesRunnings\"\r\t\"Answer the collection of cyclesRunning counts during this sample\"\r\t\r\t^self cpuCoreStats cyclesRunnings! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/14/2008 17:14'!\rcyclesRunningsAverage\r\t\"RVMMulticoreSample capture cyclesRunningsAverage\"\r\t\"Answer the average of cyclesRunning counts during this sample\"\r\t\r\t^self cpuCoreStats cyclesRunnings average asFloat! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/15/2008 16:30'!\rcyclesSinceLasts\r\t\"RVMMulticoreSample capture cyclesSinceLasts\"\r\t\"Answer the cyclesSinceLasts  during this sample\"\r\t\r\t^self cpuCoreStats cyclesSinceLasts! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/15/2008 16:08'!\rcyclesSinceLastsAverage\r\t\"RVMMulticoreSample capture cyclesSinceLastsAverage\"\r\t\"Answer the average cyclesSinceLasts  during this sample\"\r\t\r\t^self cpuCoreStats cyclesSinceLasts average! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:49'!\rcyclesWaitings\r\t\"RVMMulticoreSample capture cyclesWaitings\"\r\t\"Answer the collection of cyclesWaiting counts during this sample\"\r\t\r\t^self cpuCoreStats cyclesWaitings! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/14/2008 17:14'!\rcyclesWaitingsAverage\r\t\"RVMMulticoreSample capture cyclesWaitingsAverage\"\r\t\"Answer the average of cyclesWaiting counts during this sample\"\r\t\r\t^self cpuCoreStats cyclesWaitings average asFloat! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:08'!\rinterruptCheckCounts\r\t\"RVMMulticoreSample capture yieldCounts\"\r\t\"Answer the collection of yields during this sample\"\r\t\r\t^self cpuCoreStats interruptCheckCounts! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 8/17/2008 11:01'!\rmillisecondsRunnings\r\t\"RVMMulticoreSample capture millisecondsRunnings\"\r\t\"Answer the collection of msRunning counts during this sample\"\r\t\r\t^self cpuCoreStats millisecondsRunnings! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:41'!\rmillisecondsWaitings\r\t\"RVMMulticoreSample capture millisecondsWaitings\"\r\t\"Answer the collection of millisecondsWaitings counts during this sample\"\r\t\r\t^self cpuCoreStats millisecondsWaitings! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:44'!\rmsRunWaitRatios\r\t\"RVMMulticoreSample capture msRunWaitRatios\"\r\t\"Answer the collection of ratios during this sample\"\r\t\r\t^self cpuCoreStats msRunWaitRatios! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/14/2008 17:15'!\rmsRunWaitRatiosAverage\r\t\"RVMMulticoreSample capture msRunWaitRatiosAverage\"\r\t\"Answer the average of ratios during this sample\"\r\t\r\t^self cpuCoreStats msRunWaitRatios average asFloat! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:29'!\rmsRunningsAverage\r\t\"RVMMulticoreSample capture msRunningsAverage\"\r\t\"Answer the average of millisecondsRunning counts during this sample\"\r\t\r\t^self cpuCoreStats millisecondsRunnings average asFloat! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/15/2008 15:30'!\rmsSinceLasts\r\t\"RVMMulticoreSample capture msSinceLasts\"\r\t\"Answer the collection of msSinceLasts  during this sample\"\r\t\r\t^self cpuCoreStats msSinceLasts! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/15/2008 15:30'!\rmsSinceLastsAverage\r\t\"RVMMulticoreSample capture msSinceLastsAverage\"\r\t\"Answer the average msSinceLasts  during this sample\"\r\t\r\t^self cpuCoreStats msSinceLasts average! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:43'!\rmsWaitingsAverage\r\t\"RVMMulticoreSample capture msWaitingsAverage\"\r\t\"Answer the average of msWaiting counts during this sample\"\r\t\r\t^self cpuCoreStats millisecondsWaitings average asFloat! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 4/1/2009 22:36'!\rnumberOfRunningProcesses\r\r\t^RVMTester numberOfRunningProcesses ! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 4/10/2009 22:48'!\rprocessCountsPerCore\r\r | bag counts |\rbag _ (Process allInstances asOrderedCollection  collect:[:obj| RVMTester isRVM ifFalse:[RVMMonitor coreCount atRandom - 1]ifTrue:[RVMTester getCoreHolding:obj]]) asBag.\rcounts _ Array new: RVMMonitor coreCount.\r1 to: RVMMonitor coreCount do:[:coreIndex| counts at: coreIndex put: (bag occurrencesOf: coreIndex)].\r^counts\r! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:20'!\rreceiveTallySum\r^ self cpuCoreStats receiveTallySum! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 4/2/2009 02:12'!\rrunningProcessCountsPerCore\r\r\r^RVMTester runningProcessByCore  collect:[:obj| obj isNil ifTrue:[0]  ifFalse:[1]]! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 3/27/2009 17:04'!\rsendTallySumsSortedReport\r\t\"Answer a string report of the sorted send tallies across all cores\"\r\t^self cpuCoreStats sendTallySumsSortedReport! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:08'!\runforcedInterruptCheckCounts\r\t\"RVMMulticoreSample capture yieldCounts\"\r\t\"Answer the collection of yields during this sample\"\r\t\r\t^self cpuCoreStats unforcedInterruptCheckCounts! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/14/2008 17:17'!\ryieldCounts\r\t\"RVMMulticoreSample capture yieldCounts\"\r\t\"Answer the collection of yields during this sample\"\r\t\r\t^self cpuCoreStats yieldCounts! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/14/2008 17:18'!\ryieldCountsAverage\r\t\"RVMMulticoreSample capture yieldCountsAverage\"\r\t\"Answer the average of yields during this sample\"\r\t\r\t^self cpuCoreStats yieldCounts average asFloat! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:16'!\ryieldFrequencies\r\t\"RVMMulticoreSample capture yieldFrequencies\"\r\t\r\t^self cpuCoreStats yieldFrequencies! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:36'!\ryieldsPerSecond\r\t\"RVMMulticoreSample capture yieldsPerSecond\"\r\t\"Answer the collection of ratios of yields  per second during this sample\"\r\t\r\t^self cpuCoreStats yieldsPerSecond! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/14/2008 17:15'!\ryieldsPerSecondAverage\r\t\"RVMMulticoreSample capture yieldsPerSecondAverage\"\r\t\"Answer the average of ratios of yields  per second during this sample\"\r\t\r\t^self cpuCoreStats yieldsPerSecond average asFloat! !\r!RVMMulticoreSample methodsFor: 'test measuring - system' stamp: 'ssa 10/3/2008 15:01'!\rrandom1\r\t\"RVMMulticoreSample new random1\"\r\t\"generated data for testing visualization\"\r\t\r\t^1 atRandom! !\r!RVMMulticoreSample methodsFor: 'test measuring - system' stamp: 'ssa 10/3/2008 15:01'!\rrandom10\r\t\"RVMMulticoreSample new random10\"\r\t\"generated data for testing visualization\"\r\t\r\t^10 atRandom! !\r!RVMMulticoreSample methodsFor: 'test measuring - system' stamp: 'ssa 10/3/2008 15:01'!\rrandom100\r\t\"RVMMulticoreSample new random100\"\r\t\"generated data for testing visualization\"\r\t\r\t^100 atRandom! !\r!RVMMulticoreSample methodsFor: 'test measuring - system' stamp: 'ssa 10/3/2008 15:00'!\rrandom1000\r\t\"RVMMulticoreSample new random1000\"\r\t\"generated data for testing visualization\"\r\t\r\t^1000 atRandom! !\r!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 10/7/2008 17:28'!\rtest0001To1\r\t\"RVMMulticoreSample new test0001To1\"\r\t\"generated data for testing visualization\"\r\t\r\t| testData start end |\r\ttestData _ OrderedCollection new.\r\tstart _ 0.0001.\r\tend _ 1.0.\r\tstart to: end by: end - start / self numberOfCores do:[:value|\r\t\ttestData add: value].\r\t^testData copyFrom: 1 to: self numberOfCores! !\r!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 10/7/2008 17:28'!\rtest0to1\r\t\"RVMMulticoreSample new test0to1\"\r\t\"generated data for testing visualization\"\r\t\r\t| testData start end |\r\ttestData _ OrderedCollection new.\r\tstart _ 0.0.\r\tend _ 1.0.\r\tstart to: end by: end - start / self numberOfCores do:[:value|\r\t\ttestData add: value].\r\t^testData copyFrom: 1 to: self numberOfCores! !\r!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 10/7/2008 17:28'!\rtest0to10\r\t\"RVMMulticoreSample new test0to10\"\r\t\"generated data for testing visualization\"\r\t\r\t| testData start end |\r\ttestData _ OrderedCollection new.\r\tstart _ 0.0.\r\tend _ 10.0.\r\tstart to: end by: end - start / self numberOfCores do:[:value|\r\t\ttestData add: value].\r\t^testData copyFrom: 1 to: self numberOfCores! !\r!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 10/7/2008 17:32'!\rtest0to100\r\t\"RVMMulticoreSample new test0to100\"\r\t\"generated data for testing visualization\"\r\t\r\t| testData start end |\r\ttestData _ OrderedCollection new.\r\tstart _ 0.0.\r\tend _ 100.0.\r\tstart to: end by: end - start / self numberOfCores do:[:value|\r\t\ttestData add: value].\r\t^(testData copyFrom: 1 to: self numberOfCores) ! !\r!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 10/7/2008 17:27'!\rtest0to1B\r\t\"RVMMulticoreSample new test0to1B\"\r\t\"generated data for testing visualization\"\r\t\r\t| testData start end |\r\ttestData _ OrderedCollection new.\r\tstart _ 0.0.\r\tend _ 1000000000.0.\r\tstart to: end by: end - start / self numberOfCores do:[:value|\r\t\ttestData add: value].\r\t^testData copyFrom: 1 to: self numberOfCores! !\r!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 10/7/2008 17:28'!\rtest0to1K\r\t\"RVMMulticoreSample new test0to1K\"\r\t\"generated data for testing visualization\"\r\t\r\t| testData start end |\r\ttestData _ OrderedCollection new.\r\tstart _ 0.0.\r\tend _ 1000.0.\r\tstart to: end by: end - start / self numberOfCores do:[:value|\r\t\ttestData add: value].\r\t^testData copyFrom: 1 to: self numberOfCores! !\r!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 10/7/2008 17:28'!\rtest0to1M\r\t\"RVMMulticoreSample new test0to1M\"\r\t\"generated data for testing visualization\"\r\t\r\t| testData start end |\r\ttestData _ OrderedCollection new.\r\tstart _ 0.0.\r\tend _ 1000000.0.\r\tstart to: end by: end - start / self numberOfCores do:[:value|\r\t\ttestData add: value].\r\t^testData copyFrom: 1 to: self numberOfCores! !\r!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 10/7/2008 17:28'!\rtestNeg1To1\r\t\"RVMMulticoreSample new testNeg1To1\"\r\t\"generated data for testing visualization\"\r\t\r\t| testData start end |\r\ttestData _ OrderedCollection new.\r\tstart _ -1.0.\r\tend _ 1.0.\r\tstart to: end by: end - start / self numberOfCores do:[:value|\r\t\ttestData add: value].\r\t^testData copyFrom: 1 to: self numberOfCores! !\r!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 1/1/1970 00:07'!\rtestRandom1\r\t\"RVMMulticoreSample new testRandom1\"\r\t\"generated data for testing visualization\"\r\t\r\t| testData |\r\ttestData _ OrderedCollection new.\r\tself numberOfCores timesRepeat:[\r\t\ttestData add: 1 atRandom].\r\t^testData! !\r!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 1/1/1970 00:06'!\rtestRandom10\r\t\"RVMMulticoreSample new testRandom10\"\r\t\"generated data for testing visualization\"\r\t\r\t| testData |\r\ttestData _ OrderedCollection new.\r\tself numberOfCores timesRepeat:[\r\t\ttestData add: 10 atRandom].\r\t^testData! !\r!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 1/1/1970 00:06'!\rtestRandom100\r\t\"RVMMulticoreSample new testRandom100\"\r\t\"generated data for testing visualization\"\r\t\r\t| testData |\r\ttestData _ OrderedCollection new.\r\tself numberOfCores timesRepeat:[\r\t\ttestData add: 100 atRandom].\r\t^testData! !\r!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 1/1/1970 00:06'!\rtestRandom1000\r\t\"RVMMulticoreSample new testRandom1000\"\r\t\"generated data for testing visualization\"\r\t\r\t| testData |\r\ttestData _ OrderedCollection new.\r\tself numberOfCores timesRepeat:[\r\t\ttestData add: 1000 atRandom].\r\t^testData! !\r!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 1/1/1970 00:05'!\rtestRandom100s\r\t\"RVMMulticoreSample new testRandom100s\"\r\t\"generated data for testing visualization\"\r\t\r\t| testData min max delta |\r\ttestData _ OrderedCollection new.\r\tmin _ 100.\r\tmax _ 999.\r\tdelta _ max - min.\r\tself numberOfCores timesRepeat:[\r\t\ttestData add: min + delta atRandom].\r\t^testData! !\r!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 1/1/1970 00:05'!\rtestRandom1Ks\r\t\"RVMMulticoreSample new testRandom1Ks\"\r\t\"generated data for testing visualization\"\r\t\r\t| testData min max delta |\r\ttestData _ OrderedCollection new.\r\tmin _ 1000.\r\tmax _ 1999.\r\tdelta _ max - min.\r\tself numberOfCores timesRepeat:[\r\t\ttestData add: min + delta atRandom].\r\t^testData! !\r!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 1/1/1970 00:04'!\rtestRandomBs\r\t\"RVMMulticoreSample new testRandomBs\"\r\t\"generated data for testing visualization\"\r\t\r\t| testData min max delta |\r\ttestData _ OrderedCollection new.\r\tmin _ 1000000000.\r\tmax _ 999000000000.\r\tdelta _ max - min.\r\tself numberOfCores timesRepeat:[\r\t\ttestData add: min + delta atRandom].\r\t^testData! !\r!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 1/1/1970 00:05'!\rtestRandomKs\r\t\"RVMMulticoreSample new testRandomKs\"\r\t\"generated data for testing visualization\"\r\t\r\t| testData min max delta |\r\ttestData _ OrderedCollection new.\r\tmin _ 1000.\r\tmax _ 999000.\r\tdelta _ max - min.\r\tself numberOfCores timesRepeat:[\r\t\ttestData add: min + delta atRandom].\r\t^testData! !\r!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 1/1/1970 00:04'!\rtestRandomMs\r\t\"RVMMulticoreSample new testRandomMs\"\r\t\"generated data for testing visualization\"\r\t\r\t| testData min max delta |\r\ttestData _ OrderedCollection new.\r\tmin _ 1000000.\r\tmax _ 999000000.\r\tdelta _ max - min.\r\tself numberOfCores timesRepeat:[\r\t\ttestData add: min + delta atRandom].\r\t^testData! !\r!RVMMulticoreSample methodsFor: 'co vs inco' stamp: 'dmu 10/5/2008 02:14'!\rcoinBytes\r\" RVMTester moveAllToReadMostlyHeaps. RVMTester printCoInBytesUsed. Smalltalk garbageCollect. RVMTester printCoInBytesUsed. RVMMulticoreSample capture coinBytes\"\r\t^self cpuCoreStats coreStats\r\t\tcollect: [:stat | (stat memorySystemStats readWriteHeapStats bytesUsed @ stat memorySystemStats readMostlyHeapStats bytesUsed)]! !\r!RVMMulticoreSample methodsFor: 'co vs inco' stamp: 'dmu 10/5/2008 00:26'!\rcoinBytesTotal\r\"Smalltalk garbageCollect. RVMMulticoreSample capture coinBytes\"\r\t| s |\r\ts := 0 @ 0.\r\tself cpuCoreStats coreStats\r\t\tdo: [:stat | s := s + (stat memorySystemStats readWriteHeapStats bytesUsed @ stat memorySystemStats readMostlyHeapStats bytesUsed)].\r\t^ s! !\r!RVMMulticoreSample methodsFor: 'archiving' stamp: 'ssa 10/26/2008 21:12'!\rarchiveOn: aStream\r\t| rw |\r\trw _ ReadWriteStream on:''.\r\tRVMSampleWriter archiveSample: RVMMonitor lastSample on: rw.\r\t\r\taStream\r\t\tstoreObject: self;\r\t\tstoreClass: self class;\r\t\tstore: rw reset.\r\t! !\r!RVMMulticoreSample methodsFor: 'copying' stamp: 'ssa 10/26/2008 21:08'!\rdeepCopy\r\t\"Use the RVMSampleWriter/Reader\"\r\t| rw |\r\trw _ ReadWriteStream on:''.\r\tRVMSampleWriter archiveSample: self on: rw.\r\tRVMSampleReader dearchiveSampleFrom: rw reset ! !\r!RVMMulticoreSample class methodsFor: 'examples' stamp: 'ssa 8/13/2008 15:13'!\rexample\r\t\"RVMMulticoreSample example\"\r\tself capture explore! !\r!RVMMulticoreSample class methodsFor: 'examples' stamp: 'ssa 9/9/2008 19:50'!\rexamplePrimitive\r\t\"RVMMulticoreSample examplePrimitive\"\r\tself primitiveCapture inspect! !\r!RVMMulticoreSample class methodsFor: 'archiving' stamp: 'ssa 11/16/2008 15:07'!\rarchiveVersion\r\t^2! !\r!RVMMulticoreSample class methodsFor: 'archiving' stamp: 'ssa 11/16/2008 15:10'!\rdearchive: versionNumber from: aStream\r\tversionNumber = self archiveVersion ifTrue:[^self dearchiveFrom: aStream].\t\r\tself error:'Can''t handle this archive version'! !\r!RVMMulticoreSample class methodsFor: 'archiving' stamp: 'ssa 10/26/2008 22:07'!\rdearchiveFrom: aStream\r\r\t| rwStream sample |\r\trwStream _ aStream next.\r\tsample _ RVMSampleReader dearchiveSampleFrom: rwStream reset.\r\taStream storeObject: sample.\r\t^sample! !\r!RVMMulticoreSample class methodsFor: 'instance creation' stamp: 'ssa 8/19/2008 11:48'!\rcapture\r\t\"Capture a sample from the vm and answer a new instance of me holding those values\"\r\t\"RVMMulticoreSample capture\"\r\t\r\t^self captureFast! !\r!RVMMulticoreSample class methodsFor: 'instance creation' stamp: 'ssa 8/19/2008 11:34'!\rcaptureFast\r\t\"Capture a sample from the vm and answer a new instance of me holding those values\"\r\t\"RVMMulticoreSample captureFast\"\r\t| data sample |\r\tdata := self primitiveCapture.\r\tsample := self new.\r\tsample initializeFastFrom: data.\r\t^sample! !\r!RVMMulticoreSample class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:03'!\rcaptureFastest\r\t\"Capture a sample from the vm and answer a new instance of me holding those values\"\r\t\"RVMMulticoreSample captureFastest\"\r\t| data sample |\r\tdata := self primitiveCapture.\r\tsample := self new.\r\tsample initializeFastestFrom: data.\r\t^sample! !\r!RVMMulticoreSample class methodsFor: 'instance creation' stamp: 'ssa 8/19/2008 11:48'!\rcaptureSlow\r\t\"Capture a sample from the vm and answer a new instance of me holding those values\"\r\t\"RVMMulticoreSample captureSlow\"\r\t| data sample |\r\tdata := self primitiveCapture.\r\tsample := self new.\r\tsample initializeFrom: data.\r\t^sample! !\r!RVMMulticoreSample class methodsFor: 'instance creation' stamp: 'ssa 10/26/2008 20:26'!\rnewFrom: rawData\r\t\"Answer a new instance of me holding these values\"\r\t\"RVMMulticoreSample newFrom: self primitiveCapture\"\r\t|  sample |\r\tsample := self new.\r\tsample initializeFastFrom: rawData.\r\t^sample! !\r!RVMMulticoreSample class methodsFor: 'primitive access' stamp: 'ssa 10/18/2008 21:42'!\rprimitiveCapture\r\t\"Grab some data from the VM and return it\"\r\t<primitive: 'primitiveSampleRVM' module: 'RVMPlugin'>\r\t[^RVMMonitor samples next]value.\r\tself primitiveFailed! !\r!RVMMulticoreSample class methodsFor: 'primitive access' stamp: 'dmu 4/10/2009 17:39'!\rprimitiveCapture: flags\r\t\"Grab some data from the VM and return it\"\r\t<primitive: 'primitiveSampleRVM' module: 'RVMPlugin'>\r\tself primitiveFailed! !\r!RVMMulticoreSample class methodsFor: 'primitive access' stamp: 'dmu 4/10/2009 17:39'!\rprimitiveCaptureOneCore\r\t\"self primitiveCaptureOneCore\"\r\t^ self primitiveCapture: RVMSampleFlags everything - RVMSampleFlags allCores! !\r!RVMMulticoreSample class methodsFor: 'primitive access' stamp: 'ssa 11/12/2008 12:23'!\rprimitiveFlush\r\t\"Clear out the sample buffer in the vm by grabbing a sample\"\r\t<primitive: 'primitiveSampleRVM' module: 'RVMPlugin'>\r\t! !\r!RVMMulticoreSample class methodsFor: 'sample access' stamp: 'ssa 11/12/2008 12:23'!\rflush\r\r\tself primitiveFlush! !\r!RVMMulticoreSample class methodsFor: 'sample access' stamp: 'ssa 1/1/1970 00:32'!\rnext\r\r\t^self capture! !\r!RVMMulticoreSample class methodsFor: 'aspect access' stamp: 'ssa 10/3/2008 22:54'!\raspectFromUserUnder: aSymbol\r\t\"Answer a selected aspect categorized under #system, #core, #testSystem, #testCore.\"\r\t\t| menu |\r\tmenu := CustomMenu new.\r\t(self aspectsUnder: aSymbol)\r\t\tdo: [:aspect | menu add: aspect action: aspect].\r\t^menu startUp:nil withCaption: 'Select the aspect to monitor'.\r! !\r!RVMMulticoreSample class methodsFor: 'aspect access' stamp: 'ssa 10/3/2008 15:10'!\raspects\r\t\"Answer a list of message selectors that will return arrays of numbers for my monitor\"\r\t^(RVMMulticoreSample allMethodsInCategory: #measuring),\r\t(RVMMonitor showTestAspects ifTrue:[self testAspects]ifFalse:[#()])! !\r!RVMMulticoreSample class methodsFor: 'aspect access' stamp: 'ssa 10/3/2008 22:51'!\raspectsUnder: aSymbol\r\t\"Answer the aspects categorized under #system, #core, #testSystem, #testCore.\"\r\taSymbol == #system ifTrue:[^self systemAspects].\r\taSymbol == #core ifTrue:[^self coreAspects].\r\taSymbol == #testSystem ifTrue:[^self testSystemAspects].\r\taSymbol == #testCore ifTrue:[^self testCoreAspects].\r\t^self aspects! !\r!RVMMulticoreSample class methodsFor: 'aspect access' stamp: 'dmu 4/2/2009 02:09'!\rcoreAspects\r\t\"Answer a list of message selectors that will return collections of core numbers for my monitor\"\r\t\r\t^#(#allocationsReadWrites #allocationsReadMostlys #allocationsTotal #bytecodeCounts #bytecodesPerCycles #bytecodesPerKCs #bytecodesPerMCs #bytecodesPerMilliseconds #bytecodesPerSecond #bytesLeftReadWrites #bytesLeftReadMostlys #bytesLefts #bytesUsedReadWrites #bytesUsedReadMostlys #bytesUseds #compactionsReadWrites #compactionsReadMostlys #compactionsTotal #contextChangeCounts #cyclesRunWaitRatios #cyclesRunnings #cyclesSinceLasts #cyclesWaitings #interruptCheckCounts #millisecondsRunnings #millisecondsWaitings #msRunWaitRatios #msSinceLasts  #unforcedInterruptCheckCounts #yieldCounts #yieldFrequencies #yieldsPerSecond #processCountsPerCore #runningProcessCountsPerCore)! !\r!RVMMulticoreSample class methodsFor: 'aspect access' stamp: 'ssa 3/26/2009 10:18'!\rcoreTallyAspects\r\t\"Answer a list of message selectors that will return tallies from core message tallies\"\r\t\r\t^RVMCoreMessageTally tallyOrder! !\r!RVMMulticoreSample class methodsFor: 'aspect access' stamp: 'ssa 7/16/2010 15:21'!\rsystemAspects\r\t\"Answer a list of message selectors that will return single system numbers for my monitor\"\r\t\r\t^#(#numberOfRunningProcesses #processCount #coreProcessUtilization #bytecodeCountsAverage #bytecodesPerCycle #bytecodesPerCyclesAverage #bytecodesPerMillisecond #bytecodesPerMillisecondsAverage #bytecodesPerSecondAverage #cyclesRunWaitRatiosAverage #cyclesRunningsAverage #cyclesSinceLastsAverage #cyclesWaitingsAverage #msRunWaitRatiosAverage #msRunningsAverage #msSinceLastsAverage #msWaitingsAverage #yieldCountsAverage #yieldsPerSecondAverage )! !\r!RVMMulticoreSample class methodsFor: 'aspect access' stamp: 'ssa 10/3/2008 15:14'!\rtestAspects\r\t\"Answer a list of message selectors that will return arrays of test numbers for my monitor\"\r\t\r\t^self testCoreAspects, self testSystemAspects! !\r!RVMMulticoreSample class methodsFor: 'aspect access' stamp: 'ssa 10/3/2008 15:14'!\rtestCoreAspects\r\t\"Answer a list of message selectors that will return arrays of test numbers for my monitor\"\r\t\r\t^RVMMulticoreSample allMethodsInCategory: 'test measuring - core' asSymbol! !\r!RVMMulticoreSample class methodsFor: 'aspect access' stamp: 'ssa 10/3/2008 15:14'!\rtestSystemAspects\r\t\"Answer a list of message selectors that will return arrays of test numbers for my monitor\"\r\t\r\t^RVMMulticoreSample allMethodsInCategory: 'test measuring - system' asSymbol! !\r!RVMMulticoreSample class methodsFor: 'aspect access' stamp: 'ssa 10/6/2008 18:46'!\rupdateSystemAndCoreAspectMethods\r\t\"RVMMulticoreSample updateSystemAndCoreAspectMethods\"\r\t\"Determine the lists of single value system aspects and multivalue core aspects and update the access methods for them\"\r\t| all singles groups code sample |\r\tall _ RVMMulticoreSample allMethodsInCategory: #measuring.\r\tsingles _ OrderedCollection new.\r\tgroups _ OrderedCollection new.\r\tsample _ RVMMulticoreSample capture.\r\tall do:[:msg| ((sample perform: msg) isKindOf:Number)ifTrue:[singles add: msg]ifFalse:[groups add: msg]].\r\tgroups remove:#receiveTallySum ifAbsent:[].\r\tcode _ 'coreAspects\r\t\"Answer a list of message selectors that will return collections of core numbers for my monitor\"\r\t\r\t^', groups asArray storeString.\r\tself class compile: code classified:'aspect access' notifying:nil.\r\tcode _ 'systemAspects\r\t\"Answer a list of message selectors that will return single system numbers for my monitor\"\r\t\r\t^', singles asArray storeString.\r\tself class compile: code classified:'aspect access' notifying:nil.\r\t\r! !\r!RVMObjectCoordinate methodsFor: 'accessing' stamp: 'ssa 11/16/2008 01:06'!\ractivity\r\t\"Answer the value of activity, whether or not you want the baton passed on a message send\"\r\r\t^RVMTester getPassTheBatonOf: self object! !\r!RVMObjectCoordinate methodsFor: 'accessing' stamp: 'ssa 11/16/2008 02:11'!\rcoreCoordinate\r\t\"Answer the value of coreCoordinate\"\r\r\t^(self coreIndex + 1 asPointWithinRectangleWithExtent: RVMMonitor extent) ! !\r!RVMObjectCoordinate methodsFor: 'accessing' stamp: 'ssa 11/16/2008 02:08'!\rcoreIndex\r\t\"Answer the value of coreIndex\"\r\r\t^(RVMTester getCoreHolding: self object)! !\r!RVMObjectCoordinate methodsFor: 'accessing' stamp: 'ssa 11/16/2008 01:06'!\rmutability\r\t\"Answer the value of mutability, whether you are readWrite (true) or readMostly (false)\"\r\r\t^RVMTester getReadWriteOf: self object! !\r!RVMObjectCoordinate methodsFor: 'accessing' stamp: 'ssa 11/13/2008 10:29'!\robject\r\t\"Answer the value of object\"\r\r\tobject isNil ifTrue:[self object: nil].\r\t^ object! !\r!RVMObjectCoordinate methodsFor: 'accessing' stamp: 'ssa 11/13/2008 10:29'!\robject: anObject\r\t\"Set the value of object\"\r\r\tobject _ anObject! !\r!RVMObjectCoordinate methodsFor: 'moving' stamp: 'dmu 5/25/2010 10:43'!\rmakeActive\rRVMTester isRVM ifTrue:[\r\tRVMTester setCoordinatesOf: self object toCore: self coreIndex  readWrite:  self mutability].\r\tself changed! !\r!RVMObjectCoordinate methodsFor: 'moving' stamp: 'dmu 5/25/2010 10:43'!\rmakePassive\r\rRVMTester isRVM ifTrue:[\r\tRVMTester setCoordinatesOf: self object toCore: self coreIndex readWrite: self mutability ].\r\tself changed! !\r!RVMObjectCoordinate methodsFor: 'moving' stamp: 'dmu 5/25/2010 10:43'!\rmakeReadMostly\rRVMTester isRVM ifTrue:[\r\tRVMTester setCoordinatesOf: self object toCore: self coreIndex readWrite: false ].\r\tself changed! !\r!RVMObjectCoordinate methodsFor: 'moving' stamp: 'dmu 5/25/2010 10:43'!\rmakeReadWrite\rRVMTester isRVM ifTrue:[\r\tRVMTester setCoordinatesOf: self object toCore: self coreIndex readWrite: true].\r\tself changed! !\r!RVMObjectCoordinate methodsFor: 'moving' stamp: 'ssa 11/16/2008 02:23'!\rmoveToCoordinate: aPoint\r\r\tself moveToCore:  (aPoint y -1 * RVMMonitor extent x + aPoint x) -1 .\r\tself changed:#coreCoordinate! !\r!RVMObjectCoordinate methodsFor: 'moving' stamp: 'dmu 5/25/2010 10:43'!\rmoveToCore: anIndex\r\rRVMTester isRVM ifTrue:[\r\tRVMTester setCoordinatesOf: self object toCore: (anIndex max:0) readWrite: self mutability ].\r\tself changed! !\r!RVMObjectCoordinate methodsFor: 'testing' stamp: 'ssa 11/13/2008 10:26'!\risActive\r\r\t^self activity = true! !\r!RVMObjectCoordinate methodsFor: 'testing' stamp: 'ssa 11/13/2008 10:26'!\risPassive\r\r\t^self activity = false! !\r!RVMObjectCoordinate methodsFor: 'testing' stamp: 'ssa 11/13/2008 10:26'!\risReadMostly\r\r\t^self mutability = false! !\r!RVMObjectCoordinate methodsFor: 'testing' stamp: 'ssa 11/13/2008 10:25'!\risReadWrite\r\r\t^self mutability = true! !\r!RVMObjectCoordinate class methodsFor: 'instance creation' stamp: 'ssa 11/16/2008 01:27'!\rfor: anObject\r\t\"Answer the coordinate for this object\"\r\t| coord |\r\tcoord _ self new.\r\tcoord object: anObject.\r\t^coord! !\r!RVMObjectTableStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:20'!\rallocatedEntryCount\r\t\"Answer the number of allocated entries in this object table\"\r\tallocatedEntryCount isNil ifTrue:[^0].\r\t^allocatedEntryCount! !\r!RVMObjectTableStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:20'!\rallocatedEntryCount: count\r\t\"Set the number of allocated entries in this object table\"\r\tallocatedEntryCount := count! !\r!RVMObjectTableStats methodsFor: 'acessing' stamp: 'dmu 8/15/2008 21:43'!\rallocationsSinceLastQuery\r\t\"Answer the allocations made since the last query\"\r\tallocationsSinceLastQuery isNil ifTrue:[^0].\r\t^allocationsSinceLastQuery! !\r!RVMObjectTableStats methodsFor: 'acessing' stamp: 'dmu 8/15/2008 21:44'!\rallocationsSinceLastQuery: count\r\t\"Set the allocations made since the last query\"\r\tallocationsSinceLastQuery := count! !\r!RVMObjectTableStats methodsFor: 'acessing' stamp: 'dmu 8/15/2008 21:45'!\rentriesFreedSinceLastQuery\r\t\"Answer the allocations freed since the last query\"\r\tentriesFreedSinceLastQuery isNil ifTrue:[^0].\r\t^entriesFreedSinceLastQuery! !\r!RVMObjectTableStats methodsFor: 'acessing' stamp: 'dmu 8/15/2008 21:46'!\rentriesFreedSinceLastQuery: count\r\t\"Set the allocations freed since the last query\"\r\tentriesFreedSinceLastQuery := count! !\r!RVMObjectTableStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:19'!\rentryCount\r\t\"Answer the number of entries in this object table\"\r\tentryCount isNil ifTrue:[^0].\r\t^entryCount! !\r!RVMObjectTableStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:19'!\rentryCount: count\r\t\"Set the number of entries in this object table\"\r\tentryCount := count! !\r!RVMPluggableTextView methodsFor: 'model access' stamp: 'ssa 11/27/2008 13:06'!\rgetText \r\t\"Answer the list to be displayed.\"\r\t| txt |\r\tgetTextSelector == nil ifTrue: [^ Text new].\r\ttxt _ getTextSelector isSymbol ifTrue:[model perform: getTextSelector]ifFalse:[getTextSelector value].\r\ttxt == nil ifTrue: [^ Text new].\r\tself hasUnacceptedEdits: false.\t\"clean now\"\r\t^ txt! !\r!RVMPluggableTextView methodsFor: 'model access' stamp: 'ssa 11/27/2008 13:08'!\rsetText: textToAccept from: ctlr\r\t\"Inform the model of text to be accepted, and return true if OK.\r\tAny errors should be reported to the controller, ctlr.\"\r\tsetTextSelector == nil ifTrue: [^ true].\r\tsetTextSelector isSymbol\r\t\tifTrue: [^ model perform: setTextSelector with: textToAccept]\r\t\tifFalse: [^ setTextSelector value: textToAccept]! !\r!RVMPluggableTextView methodsFor: 'updating' stamp: 'ssa 11/27/2008 13:47'!\rupdate: aSymbol\r\t\"Refer to the comment in View|update:. Do nothing if the given symbol does not match any action. \"\r\r\taSymbol == #updateDisplay ifTrue: [^ self updateDisplayContents].\r\t^super update: aSymbol! !\r!RVMProcessSwarm methodsFor: 'creation' stamp: 'dmu 2/22/2009 07:14'!\rinitialize: aBlock\r\t| p |\r\tprocesses _ OrderedCollection new.\r\t0 to: 55 do: [:i | \r\t\tp _ aBlock copy fixTemps newProcess.\r\t\tp coreMask: (1 bitShift: i).\r\t\tp resume.\r\t].! !\r!RVMProcessSwarm methodsFor: 'creation' stamp: 'ssa 2/26/2009 04:36'!\rinitialize: aBlock  onCores: aCollectionOfIndicies\r\t| p |\r\taCollectionOfIndicies size timesRepeat:[\r\t\tp _ aBlock copy fixTemps newProcess.\r\t\tp useOnlyCores: aCollectionOfIndicies.\r\t\tp resume.\r\t].! !\r!RVMProcessSwarm class methodsFor: 'instance creation' stamp: 'dmu 2/23/2009 08:51'!\rnewRunning: aBlock\r  \"RVMProcessSwarm newRunning: [3000 factorial]\"\r  \"RVMProcessSwarm newRunning: [RVMTester print: Processor thisProcess hostCore factorial printString]\"\r\tsuper new initialize: aBlock! !\r!RVMProcessSwarm class methodsFor: 'instance creation' stamp: 'ssa 2/26/2009 04:36'!\rnewRunning: aBlock onCores: aCollectionOfIndicies\r  \"RVMProcessSwarm newRunning: [3000 factorial] onCores:(1 to: 10)\"\r  \"RVMProcessSwarm newRunning: [RVMTester print: Processor thisProcess hostCore factorial printString] onCores:#(1 3 5 7)\"\r  \"RVMProcessSwarm newRunning: [3000 factorial.  RVMTester print: Processor thisProcess hostCore  printString,' done'] onCores:(1 to: 10),(40 to:50) \"\r\tsuper new initialize: aBlock onCores: aCollectionOfIndicies! !\r!RVMSample methodsFor: 'accessing' stamp: 'ssa 7/21/2008 09:38'!\rcyclesSinceLastSample\r\t\"Answer the number of processor cycles since the last sample was taken\"\r\tcyclesSinceLastSample isNil ifTrue:[^0].\r\t^cyclesSinceLastSample! !\r!RVMSample methodsFor: 'accessing' stamp: 'ssa 7/21/2008 10:05'!\rcyclesSinceLastSample: count\r\t\"Set the number of processor cycles since the last sample was taken\"\r\tcyclesSinceLastSample := count! !\r!RVMSample methodsFor: 'accessing' stamp: 'ssa 7/21/2008 11:29'!\rglobalHeapStats\r\t\"Answer the global heap stats for this sample\"\r\tglobalHeapStats isNil ifTrue:[self globalHeapStats: RVMGlobalHeapStats new].\r\t^globalHeapStats! !\r!RVMSample methodsFor: 'accessing' stamp: 'ssa 7/21/2008 09:40'!\rglobalHeapStats: anRVMGlobalHeapStats\r\t\"Set the global heap stats for this sample\"\r\tglobalHeapStats := anRVMGlobalHeapStats! !\r!RVMSample methodsFor: 'accessing' stamp: 'ssa 7/21/2008 11:29'!\rlocalHeapStats\r\t\"Answer the local heap stats for this sample\"\r\tlocalHeapStats isNil ifTrue:[self localHeapStats: RVMLocalHeapStats new].\r\t^localHeapStats! !\r!RVMSample methodsFor: 'accessing' stamp: 'ssa 7/21/2008 10:13'!\rlocalHeapStats: anRVMLocalHeapStats\r\t\"Set the local heap stats for this sample\"\r\tlocalHeapStats := anRVMLocalHeapStats! !\r!RVMSample methodsFor: 'accessing' stamp: 'ssa 7/21/2008 09:38'!\rmillisecondsSinceLastSample\r\t\"Answer the time since the last sample was taken\"\r\tmillisecondsSinceLastSample isNil ifTrue:[^0].\r\t^millisecondsSinceLastSample! !\r!RVMSample methodsFor: 'accessing' stamp: 'ssa 7/21/2008 09:37'!\rmillisecondsSinceLastSample: milliseconds\r\t\"Set the time since the last sample was taken\"\r\tmillisecondsSinceLastSample := milliseconds! !\r!RVMSample methodsFor: 'accessing' stamp: 'ssa 7/21/2008 11:29'!\robjectTableStats\r\t\"Answer the object stats for this sample\"\r\tobjectTableStats isNil ifTrue:[self objectTableStats: RVMObjectTableStats new].\r\t^objectTableStats! !\r!RVMSample methodsFor: 'accessing' stamp: 'ssa 7/21/2008 11:45'!\robjectTableStats: anRVMObjectTableStats\r\t\"Set the object stats for this sample\"\r\tobjectTableStats := anRVMObjectTableStats! !\r!RVMSample methodsFor: 'accessing' stamp: 'ssa 7/21/2008 11:25'!\rrawData\r\t\"Answer the raw data for this sample\"\r\t^rawData! !\r!RVMSample methodsFor: 'accessing' stamp: 'ssa 7/21/2008 11:25'!\rrawData: anArray\r\t\"Set the raw data for this sample\"\r\trawData := anArray! !\r!RVMSample methodsFor: 'accessing' stamp: 'ssa 7/21/2008 11:30'!\rsqueakInterpreterStats\r\t\"Answer the squeak interpreter stats for this sample\"\r\tsqueakInterpreterStats isNil ifTrue:[self squeakInterpreterStats: RVMSqueakInterpreterStats new].\r\t^squeakInterpreterStats! !\r!RVMSample methodsFor: 'accessing' stamp: 'ssa 7/21/2008 11:22'!\rsqueakInterpreterStats: anRVMSqueakInterpreterStats\r\t\"Set the squeak interpreter stats for this sample\"\r\tsqueakInterpreterStats := anRVMSqueakInterpreterStats! !\r!RVMSample methodsFor: 'initialize' stamp: 'ssa 7/21/2008 11:31'!\rinitializeFrom: data\r\t\"Set my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  This implementations assumes no order dependency in the array except that values always follow their names.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\r\t\r\t| valueMap objectMap index datum |\r\tself rawData: data.\r\tvalueMap := { \r\t\t\t\t'millisecs' -> #millisecondsSinceLastSample:.\r\t\t\t\t'cycles' -> #cyclesSinceLastSample:.\r\t\t\t\t}.\r\tobjectMap := { \r\t\t\t\t'The_Global_Object_Heap.get_stats()' -> #initializeGlobalHeapStatsFrom:.\r\t\t\t\t'The_Local_Object_Heap.get_stats()' -> #initializeLocalHeapStatsFrom:.\r\t\t\t\t'The_Object_Table.get_stats()' -> #initializeObjectTableStatsFrom:.\r\t\t\t\t'The_Squeak_Interpreter.get_stats()' -> #initializeSqueakInterpreterStatsFrom:.\r\t\t\t\t}.\r\t\t\t\t\r\tvalueMap do:[:assoc |\r\t\tindex := data indexOf: assoc key.\r\t\tindex = 0 ifTrue:[self error:'Can''t find ',assoc key,' in sample data'].\r\t\tdatum := data at: index + 1.\r\t\tself perform: assoc value with: datum].\r\t\t\r\tobjectMap do:[:assoc |\r\t\tindex := data indexOf: assoc key.\r\t\tindex = 0 ifTrue:[self error:'Can''t find ',assoc key,' in sample data'].\r\t\tdatum := data at: index + 1.\r\t\tself perform: assoc value with: datum].\r! !\r!RVMSample methodsFor: 'initialize' stamp: 'ssa 7/21/2008 11:11'!\rinitializeGlobalHeapStatsFrom: data\r\t\"Set my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  This implementations assumes no order dependency in the array except that values always follow their names.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\r\t\r\t| valueMap objectMap index datum |\r\tself initializeHeapStatsFrom: data into: self globalHeapStats.\r\tvalueMap := {}.\r\tobjectMap := {}.\r\t\t\t\t\r\tvalueMap do:[:assoc |\r\t\tindex := data indexOf: assoc key.\r\t\tindex = 0 ifTrue:[self error:'Can''t find ',assoc key,' in sample data'].\r\t\tdatum := data at: index + 1.\r\t\tself globalHeapStats perform: assoc value with: datum].\r\t\t\r\tobjectMap do:[:assoc |\r\t\tindex := data indexOf: assoc key.\r\t\tindex = 0 ifTrue:[self error:'Can''t find ',assoc key,' in sample data'].\r\t\tdatum := data at: index + 1.\r\t\tself globalHeapStats perform: assoc value with: datum].\r! !\r!RVMSample methodsFor: 'initialize' stamp: 'ssa 7/21/2008 11:11'!\rinitializeHeapStatsFrom: data into: aHeapStats\r\t\"Set my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  This implementations assumes no order dependency in the array except that values always follow their names.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\r\t\r\t| valueMap objectMap index datum |\r\tvalueMap := { \r\t\t\t\t'bytesUsed()' -> #bytesUsed:.\r\t\t\t\t'bytesLeft()' -> #bytesLeft:.\r\t\t\t\t'allocations_since_last_query' -> #allocationsSinceLastQuery:.\r\t\t\t\t'compactions_since_last_query' -> #compactionsSinceLastQuery:.\r\t\t\t\t}.\r\tobjectMap := {}.\r\t\t\t\t\r\tvalueMap do:[:assoc |\r\t\tindex := data indexOf: assoc key.\r\t\tindex = 0 ifTrue:[self error:'Can''t find ',assoc key,' in sample data'].\r\t\tdatum := data at: index + 1.\r\t\taHeapStats perform: assoc value with: datum].\r\t\t\r\tobjectMap do:[:assoc |\r\t\tindex := data indexOf: assoc key.\r\t\tindex = 0 ifTrue:[self error:'Can''t find ',assoc key,' in sample data'].\r\t\tdatum := data at: index + 1.\r\t\taHeapStats perform: assoc value with: datum].\r! !\r!RVMSample methodsFor: 'initialize' stamp: 'ssa 7/21/2008 11:12'!\rinitializeLocalHeapStatsFrom: data\r\t\"Set my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  This implementations assumes no order dependency in the array except that values always follow their names.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\r\t\r\t| valueMap objectMap index datum |\r\tself initializeHeapStatsFrom: data into: self localHeapStats.\r\tvalueMap := { \r\t\t\t\t'objects_fetched_into_local_heap_since_last_query' -> #objectsFetchedSinceLastQuery:.\r\t\t\t\t'overly_large_fetch_or_allocation_requests_denied_since_last_query' -> #overlyLargeFetchOrAllocationRequestsDeniedSinceLastQuery:.\r\t\t\t\t'fetch_requests_that_failed_since_last_query' -> #failedFetchRequestsSinceLastQuery:.\r\t\t\t\t'objects_flushed_since_last_query' -> #objectsFlushedSinceLastQuery:.\r\t\t\t\t}.\r\tobjectMap := {}.\r\t\t\t\t\r\tvalueMap do:[:assoc |\r\t\tindex := data indexOf: assoc key.\r\t\tindex = 0 ifTrue:[self error:'Can''t find ',assoc key,' in sample data'].\r\t\tdatum := data at: index + 1.\r\t\tself localHeapStats perform: assoc value with: datum].\r\t\t\r\tobjectMap do:[:assoc |\r\t\tindex := data indexOf: assoc key.\r\t\tindex = 0 ifTrue:[self error:'Can''t find ',assoc key,' in sample data'].\r\t\tdatum := data at: index + 1.\r\t\tself localHeapStats perform: assoc value with: datum].\r! !\r!RVMSample methodsFor: 'initialize' stamp: 'ssa 7/21/2008 11:16'!\rinitializeObjectTableStatsFrom: data\r\t\"Set my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  This implementations assumes no order dependency in the array except that values always follow their names.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\r\t\r\t| valueMap objectMap index datum |\r\tvalueMap := { \r\t\t\t\t'how_many_entries_are_currently_allocated' -> #allocatedEntryCount:.\r\t\t\t\t'how_many_entries_exist' -> #entryCount:.\r\t\t\t\t'how_many_allocations_have_occured_since_last_query' -> #allocationsMadeSinceLastQuery:.\r\t\t\t\t'how_many_have_been_freed_since_last_query' -> #allocationsFreedSinceLastQuery:.\r\t\t\t\t}.\r\tobjectMap := {}.\r\t\t\t\t\r\tvalueMap do:[:assoc |\r\t\tindex := data indexOf: assoc key.\r\t\tindex = 0 ifTrue:[self error:'Can''t find ',assoc key,' in sample data'].\r\t\tdatum := data at: index + 1.\r\t\tself objectTableStats perform: assoc value with: datum].\r\t\t\r\tobjectMap do:[:assoc |\r\t\tindex := data indexOf: assoc key.\r\t\tindex = 0 ifTrue:[self error:'Can''t find ',assoc key,' in sample data'].\r\t\tdatum := data at: index + 1.\r\t\tself objectTableStats perform: assoc value with: datum].\r! !\r!RVMSample methodsFor: 'initialize' stamp: 'ssa 7/21/2008 11:19'!\rinitializeSqueakInterpreterStatsFrom: data\r\t\"Set my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  This implementations assumes no order dependency in the array except that values always follow their names.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\r\t\r\t| valueMap objectMap index datum |\r\tvalueMap := { \r\t\t\t\t'bcCount - bytecodes' -> #bytecodeCount:.\r\t\t\t\t}.\r\tobjectMap := {}.\r\t\t\t\t\r\tvalueMap do:[:assoc |\r\t\tindex := data indexOf: assoc key.\r\t\tindex = 0 ifTrue:[self error:'Can''t find ',assoc key,' in sample data'].\r\t\tdatum := data at: index + 1.\r\t\tself squeakInterpreterStats perform: assoc value with: datum].\r\t\t\r\tobjectMap do:[:assoc |\r\t\tindex := data indexOf: assoc key.\r\t\tindex = 0 ifTrue:[self error:'Can''t find ',assoc key,' in sample data'].\r\t\tdatum := data at: index + 1.\r\t\tself squeakInterpreterStats perform: assoc value with: datum].\r! !\r!RVMSample class methodsFor: 'primitive access' stamp: 'ssa 7/21/2008 10:38'!\rprimitiveCapture\r\t\"Grab some data from the VM and return it\"\r\t<primitive: 'primitiveSampleRVM' module: 'RVMPlugin'>\r\tself primitiveFailed! !\r!RVMSample class methodsFor: 'instance creation' stamp: 'ssa 7/21/2008 11:23'!\rcapture\r\t\"Capture a sample from the vm and answer a new instance of me holding those values\"\r\t| data sample |\r\tdata := self primitiveCapture.\r\tsample := self new.\r\tsample initializeFrom: data.\r\t^sample! !\r!RVMSample class methodsFor: 'example' stamp: 'ssa 7/21/2008 11:24'!\rexample\r\t\"RVMSample example\"\r\tself capture explore! !\r!RVMSample class methodsFor: 'example' stamp: 'ssa 8/13/2008 15:05'!\rexamplePrimitive\r\t\"RVMSample examplePrimitive\"\r\tself primitiveCapture explore! !\r!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:27'!\rallCoreStats ^ 1 bitShift: 4! !\r!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:27'!\rallCores ^ 1 bitShift: 0! !\r!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:28'!\rbufferedMessageStats ^ 1 bitShift: 17! !\r!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:28'!\rbytecodes ^ 1 bitShift: 21! !\r!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:27'!\rcoreCoords ^ 1 bitShift: 14! !\r!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:28'!\rcpuCoreStats ^ 1 bitShift: 3! !\r!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:29'!\rcycleCounts ^ 1 bitShift: 23! !\r!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:29'!\rcycles ^ 1 bitShift: 8! !\r!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:29'!\rdontPassTheBatonDefault ^ 1 bitShift: 5! !\r!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:30'!\reverything ^ SmallInteger maxVal! !\r!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:31'!\rfence  ^  1 bitShift: 6! !\r!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:31'!\rgcStats ^ 1 bitShift: 19! !\r!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:32'!\rheapStats ^ 1 bitShift: 20! !\r!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:32'!\rinteractionStats ^ 1 bitShift: 13! !\r!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:32'!\rinterpreterLoopStats ^ 1 bitShift: 27! !\r!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:32'!\rinterpreterStats ^ 1 bitShift: 11! !\r!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:32'!\rinterruptChecks ^ 1 bitShift: 24! !\r!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:33'!\rmemorySystemStats  ^ 1 bitShift: 10! !\r!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:33'!\rmessageNames ^ 1 bitShift: 2! !\r!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:33'!\rmessageStats  ^ 1 bitShift: 9! !\r!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:33'!\rmillisecs  ^ 1 bitShift: 7! !\r!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:33'!\rmovedMutatedObjectStats ^ 1 bitShift: 25! !\r!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:34'!\rmutexStats ^ 1 bitShift: 26\r! !\r!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:34'!\robjectTableStats  ^ 1 bitShift: 12! !\r!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:34'!\rreceiveCycles ^ 1 bitShift: 18! !\r!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:34'!\rreceiveTallies ^ 1 bitShift: 16! !\r!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:34'!\rrunMask ^ 1 bitShift: 1! !\r!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:35'!\rsendTallies ^ 1 bitShift: 15! !\r!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:35'!\ryieldCount ^  1 bitShift: 22! !\r!RVMSqueakInterpreterStats methodsFor: 'measuring' stamp: 'dmu 9/17/2010 15:21'!\rcyclesRunWaitRatio\r\t\"Answer the ratio between my cyclesRunning and cyclesWaiting\"\r\t\r\t^self cyclesWaiting = 0 ifTrue:[0] ifFalse:[self cyclesRunning / (1 max: self cyclesWaiting) asFloat]! !\r!RVMSqueakInterpreterStats methodsFor: 'measuring' stamp: 'dmu 9/17/2010 15:21'!\rmsRunWaitRatio\r\t\"Answer the ratio between my millisecondsRunning and millisecondsWaiting\"\r\t\r\t^self millisecondsWaiting = 0 ifTrue:[0] ifFalse:[self millisecondsRunning / (1 max: self millisecondsWaiting) asFloat]! !\r!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'dmu 8/15/2008 21:27'!\rbytecodesExecuted\r\t\"Answer the number of bytecodes processed since last query\"\r\tbytecodesExecuted isNil ifTrue:[^0].\r\t^bytecodesExecuted! !\r!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'dmu 8/15/2008 21:27'!\rbytecodesExecuted: count\r\t\"Set the number of bytecodes processed since last query\"\r\tbytecodesExecuted := count! !\r!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:02'!\rcontextChangeCount\r\t\"Answer the value of contextChangeCount\"\r\r\tcontextChangeCount isNil ifTrue:[self contextChangeCount: 0].\r\t^contextChangeCount! !\r!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'dmu 1/1/1970 00:10'!\rcontextChangeCount: anObject\r\t\"Set the value of contextChangeCount\"\r\r\tcontextChangeCount := anObject! !\r!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:02'!\rcyclesRunning\r\t\"Answer the value of cyclesRunning\"\r\r\tcyclesRunning isNil ifTrue:[self cyclesRunning: 0].\r\t^cyclesRunning! !\r!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 18:13'!\rcyclesRunning: anObject\r\t\"Set the value of cyclesRunning\"\r\r\tcyclesRunning := anObject! !\r!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:02'!\rcyclesWaiting\r\t\"Answer the value of cyclesWaiting\"\r\r\tcyclesWaiting isNil ifTrue:[self cyclesWaiting: 0].\r\t^cyclesWaiting! !\r!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 18:13'!\rcyclesWaiting: anObject\r\t\"Set the value of cyclesWaiting\"\r\r\tcyclesWaiting := anObject! !\r!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'dmu 1/1/1970 00:03'!\rinterruptCheckCount\r^ interruptCheckCount! !\r!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'dmu 1/1/1970 00:03'!\rinterruptCheckCount: x\r interruptCheckCount := x! !\r!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:03'!\rmillisecondsRunning\r\t\"Answer the value of millisecondsRunning\"\r\r\tmillisecondsRunning isNil ifTrue:[self millisecondsRunning: 0].\r\t^millisecondsRunning! !\r!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'dmu 8/15/2008 21:24'!\rmillisecondsRunning: anObject\r\t\"Set the value of msRunning\"\r\r\tmillisecondsRunning := anObject! !\r!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:01'!\rmillisecondsWaiting\r\t\"Answer the value of msWaiting\"\r\r\tmillisecondsWaiting isNil ifTrue:[self millisecondsWaiting: 0].\r\t^millisecondsWaiting! !\r!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'dmu 8/15/2008 21:25'!\rmillisecondsWaiting: anObject\r\t\"Set the value of msWaiting\"\r\r\tmillisecondsWaiting := anObject! !\r!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'dmu 1/1/1970 00:04'!\runforcedInterruptCheckCount\r ^ unforcedInterruptCheckCount! !\r!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'dmu 1/1/1970 00:03'!\runforcedInterruptCheckCount: x\r unforcedInterruptCheckCount := x! !\r!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:03'!\ryieldCount\r\t\"Answer the value of yieldCount\"\r\r\tyieldCount isNil ifTrue:[self yieldCount: 0].\r\t^yieldCount! !\r!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 18:13'!\ryieldCount: anObject\r\t\"Set the value of yieldCount\"\r\r\tyieldCount := anObject! !\r!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'dmu 9/17/2010 15:21'!\ryieldFrequency\r\t\"Answer the value of yieldCount/contextChangeCount\"\r\t^self  contextChangeCount = 0 ifTrue: [0] ifFalse: [(self yieldCount / (1 max: self contextChangeCount)) asFloat]! !\r!RVMStandardSystemView methodsFor: 'displaying' stamp: 'ssa 8/20/2008 19:15'!\rdisplayLabelText\r\t\"The label goes in the center of the window\"\r\t| labelRect |\r\tlabelText foregroundColor: Color black\r\t\t\tbackgroundColor: self labelColor.\r\tlabelRect := self labelTextRegion.\r\tDisplay fill: (labelRect expandBy: 3@0) fillColor: self labelColor.\r\tlabelText displayOn: Display at: labelRect topLeft clippingBox: labelRect\r\t\t\trule: labelText rule fillColor: labelText fillColor.\r\tlabelText destinationForm: nil! !\r!RVMStandardSystemView methodsFor: 'displaying' stamp: 'ssa 1/1/1970 00:02'!\rdisplayView\r\tself okToDisplay: true.\r\tsuper displayView! !\r!RVMStandardSystemView methodsFor: 'displaying' stamp: 'ssa 1/1/1970 00:21'!\rdontDisplayWhile: aBlock\r\t\"Switch my okToDisplay flag off during this block\"\r\t\r\tself okToDisplay: false.\r\taBlock value.\r\tself okToDisplay: true.\r\tself displayView! !\r!RVMStandardSystemView methodsFor: 'displaying' stamp: 'ssa 1/1/1970 00:21'!\rerase\r\tself okToDisplay: false.\r\t^super erase! !\r!RVMStandardSystemView methodsFor: 'displaying' stamp: 'ssa 1/1/1970 00:21'!\rokToDisplay: aBoolean\r\tself subViews do:[:v| v isRVMView ifTrue:[v okToDisplay: aBoolean]].\r! !\r!RVMStandardSystemView methodsFor: 'framing' stamp: 'ssa 1/1/1970 00:24'!\rconstrainFrame: aRectangle\r\t\"Constrain aRectangle, to the minimum and maximum size\r\tfor this window\"\r\r   | adjustmentForLabel bWidth |\rbWidth _ labelFrame borderWidth.\r(bWidth isKindOf: Rectangle) ifTrue:[bWidth _ bWidth origin x].\r   adjustmentForLabel := 0 @ (labelFrame height  - bWidth).\r\t^ aRectangle origin extent:\r\t\t((aRectangle extent max: minimumSize + adjustmentForLabel)\r\t\t      min: maximumSize + adjustmentForLabel).! !\r!RVMStandardSystemView methodsFor: 'framing' stamp: 'ssa 1/1/1970 00:51'!\rinitialExtent\r\r\t^self minimumSize! !\r!RVMStandardSystemView methodsFor: 'framing' stamp: 'ssa 1/1/1970 00:25'!\rnewFrame\r\r\tself subViews do:[:v| v isRVMView ifTrue:[v  newFrame]]! !\r!RVMStandardSystemView methodsFor: 'framing' stamp: 'ssa 1/1/1970 00:15'!\rnewFrame: frameChangeBlock\r\r\tsuper newFrame: frameChangeBlock.\r\tself subViews do:[:v| v isRVMView ifTrue:[v  newFrame]]! !\r!RVMStandardSystemView methodsFor: 'framing' stamp: 'ssa 1/1/1970 00:14'!\rresizeInitially\r\t\"Determine the rectangular area for the receiver, adjusted to the \r\tminimum and maximum sizes.\"\r\tself resizeTo: self initialFrame.\r\tself subViews do:[:v| v isRVMView ifTrue:[v  firstFrame]]\r! !\r!RVMStandardSystemView methodsFor: 'accessing' stamp: 'ssa 10/4/2008 08:29'!\rsubViews: aCollection.\r\r\tsubViews _ aCollection! !\r!RVMStripChartController methodsFor: 'menu messages' stamp: 'ssa 1/1/1970 00:56'!\reraseStrip\r\r\tself view traces do:[:trace| trace removeAllData].\r\tself view canvas:nil.\r\tself view displayView! !\r!RVMStripChartController methodsFor: 'menu messages' stamp: 'ssa 1/1/1970 01:00'!\rinspectScaler\r\r\tself view traces first scaler inspect! !\r!RVMStripChartController methodsFor: 'menu messages' stamp: 'ssa 1/1/1970 12:59'!\rmuteAll\r\r\tself view traces do:[:trace| trace mute].\r\tself view topView allSubViews  do:[:v|( v isKindOf: RVMCheckBoxOnlyView) ifTrue:[v  update:#checked]]! !\r!RVMStripChartController methodsFor: 'menu messages' stamp: 'ssa 10/20/2008 09:02'!\rspawnUnmuted\r\r\t| unmutes |\r\tunmutes _ self view traces select:[:trace| trace muted not].\r\tself view okToDisplay: true.\r\tRVMStripChartView openOnTraces: unmutes deepCopy titled: 'Selected traces'! !\r!RVMStripChartController methodsFor: 'menu messages' stamp: 'ssa 1/1/1970 12:59'!\runmuteAll\r\r\tself view traces do:[:trace| trace unmute].\r\tself view topView allSubViews  do:[:v|( v isKindOf: RVMCheckBoxOnlyView) ifTrue:[v  update:#checked]]! !\r!RVMStripChartController methodsFor: 'controlling' stamp: 'ssa 10/20/2008 08:21'!\ryellowButtonActivity\r\t| menu answer |\r\tself view dontDisplayWhile:[\r\tSensor yellowButtonPressed \r\t\tifTrue: [menu := CustomMenu new.\r\t\t\t\"menu add: 'inspect scaler' action: #inspectScaler.\"\r\t\t\tmenu add: 'mute all' action: #muteAll.\r\t\t\tmenu add: 'unmute all' action: #unmuteAll.\r\t\t\tmenu add: 'spawn unmuted' action: #spawnUnmuted.\r\t\t\tmenu addLine.\r\t\t\tmenu add: 'erase strip' action: #eraseStrip.\r\t\t\tanswer := menu startUp: #eraseStrip withCaption: nil at: Sensor cursorPoint.\r\t\t\tanswer notNil ifTrue:[\r\t\t\t\tself perform: answer]]]! !\r!RVMStripChartScaleController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 00:33'!\raddCoreTrace\r\t| menu selectedAspect |\r\tself view topView dontDisplayWhile:[\rmenu := CustomMenu new.\r RVMMulticoreSample coreAspects do:[:aspect|\r\t\t\tmenu add:  aspect action: aspect].\r\t\t\tselectedAspect := menu startUp: nil withCaption: 'Select a core aspect to trace' at: Sensor cursorPoint.\r\t\t\tselectedAspect notNil ifTrue:[ self view stripChart addCoreTraceForAspect: selectedAspect coreIndex: RVMMonitor coreIndexFromUser]].\r\t\t\tself view stripChart rebuildAll. \r\t\t\t! !\r!RVMStripChartScaleController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 00:36'!\raddSystemTrace\r\t| menu selectedAspect |\r\tself view topView dontDisplayWhile:[\rmenu := CustomMenu new.\r RVMMulticoreSample systemAspects do:[:aspect|\r\t\t\tmenu add:  aspect action: aspect].\r\t\t\tselectedAspect := menu startUp: nil withCaption: 'Select a system aspect to trace' at: Sensor cursorPoint.\r\t\t\tselectedAspect notNil ifTrue:[ self view stripChart addSystemTraceForAspect: selectedAspect]].\r\t\t\tself view stripChart rebuildAll. \r! !\r!RVMStripChartScaleController methodsFor: 'controlling' stamp: 'ssa 10/3/2008 23:12'!\rchangeAspect\r\r\t| menu answer newAspect |\rself view topView dontDisplayWhile:[\r\t\tmenu := CustomMenu new.\r\tmenu add: 'System aspects' action: #system.\r\tmenu add: 'Core aspects' action: #core.\r\tmenu add: 'Test System Aspects' action: #testSystem.\r\tmenu add: 'Test Core Aspects' action: #testCore.\r\tanswer := menu startUp: nil withCaption: 'What kind of aspect would you like to monitor?' at: Sensor cursorPoint.\r\tanswer isNil ifTrue:[^self].\r\tnewAspect _ RVMMulticoreSample aspectFromUserUnder: answer.\r\tnewAspect isNil ifTrue:[^self].\r\tnewAspect = self view stripChart traces first aspect ifTrue:[^self].\r\tself view stripChart removeAllTraces.\r\t(#(testCore core) includes: answer)\r\t\tifTrue:[self view stripChart addCoreTraceForAspect: newAspect coreIndex: RVMMonitor coreIndexFromUser]\r\t\tifFalse:[self view stripChart addSystemTraceForAspect: newAspect].\r\tself view currentTrace: self view stripChart traces first].\r\tself view hear: nil.\r\tself view stripChart newFrame.! !\r!RVMStripChartScaleController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 00:31'!\rchangeScaleAspect\r\t| menu selectedTrace |\r\tself view topView dontDisplayWhile:[\rmenu := CustomMenu new.\r self view stripChart traces do:[:trace|\r\t\t\tmenu add: trace aspect action: trace].\r\t\t\tselectedTrace := menu startUp: self view currentAspect withCaption: 'Show scale for this aspect:' at: Sensor cursorPoint.\r\t\t\tselectedTrace notNil ifTrue:[ self view currentTrace: selectedTrace]].\r\t\t\tself view hear: nil! !\r!RVMStripChartScaleController methodsFor: 'controlling' stamp: 'ssa 11/11/2008 22:06'!\rredButtonActivity\r\t\r\t((self view adjustScaleBox translateBy: self view insetDisplayBox origin)  containsPoint: Sensor cursorPoint) ifTrue:[Sensor waitNoButton.\r\t\tself spawnScaleAdjuster]! !\r!RVMStripChartScaleController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 00:08'!\rremoveOtherTraces\r\t| menu selectedTrace |\r\tself view topView dontDisplayWhile:[\rmenu := CustomMenu new.\r self view stripChart traces do:[:trace|\r\t\t\tmenu add: trace aspect action: trace].\r\t\t\tselectedTrace := menu startUp: self view currentAspect withCaption: 'Remove all traces except:' at: Sensor cursorPoint.\r\t\t\tselectedTrace notNil ifTrue:[ self view stripChart removeTraces: (self view stripChart traces copyWithout: selectedTrace).\r\t\t\t\tself view currentTrace: selectedTrace]].\r\t\t\tself view stripChart rebuildAll. \r! !\r!RVMStripChartScaleController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 00:07'!\rremoveTrace\r\t| menu selectedTrace |\r\tself view topView dontDisplayWhile:[\rmenu := CustomMenu new.\r self view stripChart traces do:[:trace|\r\t\t\tmenu add: trace aspect action: trace].\r\t\t\tselectedTrace := menu startUp: self view currentAspect withCaption: 'Select trace to remove:' at: Sensor cursorPoint.\r\t\t\tselectedTrace notNil ifTrue:[ self view stripChart removeTrace: selectedTrace.\r\t\t\t\tself view currentTrace = selectedTrace ifTrue:[self view currentTrace: nil]].\r\t\t\t].\r\t\t\tself view stripChart rebuildAll. \r! !\r!RVMStripChartScaleController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 00:05'!\rscalerForThisAspect\r\r\tself view okToDisplay:true.\r\tRVMColoredDataScalerView openOnAspect:  self view currentTrace aspect! !\r!RVMStripChartScaleController methodsFor: 'controlling' stamp: 'ssa 5/12/2010 10:20'!\rspawnScaleAdjuster\r\r\t|  maxView minView topView resetScaleButton setToObservedButton autoScaleCheckBox height |\r\tmaxView _ RVMValueEditorView  on: view currentTrace scaler valueGetter: [view currentTrace scaler max] valueSetter:[:v|view currentTrace scaler setMax:v. view drawCanvas; displayView] label:'max: '.\r\tmaxView lockGetter:#maxLocked; lockSetter:#maxLocked:.\r\tminView _ RVMValueEditorView  on: view currentTrace scaler valueGetter: [view currentTrace scaler min] valueSetter:[:v|view currentTrace scaler setMin:v.  view drawCanvas; displayView] label:'min: '.\r\tminView lockGetter:#minLocked; lockSetter:#minLocked:.\r\tresetScaleButton _ RVMButtonView label:'Reset scale to default' action:[view currentTrace scaler resetScaling.  view drawCanvas; displayView.  minView hear:nil.  maxView hear:nil].\r\tsetToObservedButton _ RVMButtonView label:'Set scale to observed values' action:[view currentTrace scaler setRangeToObserved.  view drawCanvas; displayView.  minView hear:nil.  maxView hear:nil].\r\tautoScaleCheckBox _ RVMCheckBoxView on: view currentTrace scaler label: 'Automatic Scaling' checkState: [view currentTrace scaler automaticScaling] whenChecked: [view currentTrace scaler automatic.  view drawCanvas; displayView.  minView hear:nil.  maxView hear:nil] whenUnchecked: [view currentTrace scaler manual. view drawCanvas; displayView.  minView hear:nil.  maxView hear:nil] monitor: true.\r\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\ttopView addSubView: minView.\r\ttopView addSubView: maxView below:  minView.\r\ttopView addSubView: resetScaleButton below:  maxView.\r\ttopView addSubView: setToObservedButton below:  resetScaleButton.\r\ttopView addSubView: autoScaleCheckBox below:  setToObservedButton.\r\tRVMMonitor forgetAll:{resetScaleButton. setToObservedButton. autoScaleCheckBox}.\r\ttopView label: view currentAspect.\r\theight _ topView subViews size * 26.\r\ttopView minimumSize:200@height.\r\ttopView maximumSize: 200@height.\r\ttopView controller open! !\r!RVMStripChartScaleController methodsFor: 'controlling' stamp: 'ssa 10/4/2008 08:19'!\ryellowButtonActivity\r\t| menu answer onlyOneTrace |\r\tonlyOneTrace _ self view stripChart traces size = 1.\r\tself view topView dontDisplayWhile:[\r\tmenu := CustomMenu new.\r \tonlyOneTrace ifTrue:[menu add: 'Change aspect' action: #changeAspect.\r \t\tmenu addLine].\r \tonlyOneTrace ifFalse:[menu add: 'Show other scale' action: #changeScaleAspect.\r \t\tmenu addLine].\r \tmenu add: 'Add system aspect trace' action: #addSystemTrace.\r \tmenu add: 'Add core aspect trace' action: #addCoreTrace.\r\tonlyOneTrace ifFalse:[menu addLine.\r \t\tmenu add: 'Remove trace' action: #removeTrace.\r\t\tmenu add: 'Remove other traces' action: #removeOtherTraces].\r\tanswer := menu startUp: nil withCaption: '' at: Sensor cursorPoint].\r\tanswer notNil ifTrue:[self perform: answer]! !\r!RVMStripChartScaleController methodsFor: 'view resizing' stamp: 'ssa 1/1/1970 00:38'!\radjustViewSizes\r\tself view topView unlock.\r\tself view topView display! !\r!RVMStripChartTrace methodsFor: 'accessing' stamp: 'ssa 10/10/2008 19:23'!\rcolor\r\t\"Answer the value of color\"\r\r\tcolor isNil ifTrue:[self color: Color black].\r\t^ color! !\r!RVMStripChartTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:02'!\rcolor: anObject\r\t\"Set the value of color\"\r\r\tcolor _ anObject.\r\tcolor notNil ifTrue:[self pen color: color]! !\r!RVMStripChartTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rmax\r\t\"Answer my scaler max.\"\r\t^self scaler max! !\r!RVMStripChartTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rmax: aValue\r\t\"Set my scaler max.\"\r\tself scaler max: aValue! !\r!RVMStripChartTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rmin\r\t\"Answer my scaler min.\"\r\t^self scaler min! !\r!RVMStripChartTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rmin: aValue\r\t\"Set my scaler min.\"\r\tself scaler min: aValue! !\r!RVMStripChartTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:24'!\rmuted\r\t\"Answer the value of muted\"\r\r\tmuted isNil ifTrue:[self muted: false].\r\t^ muted! !\r!RVMStripChartTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:24'!\rmuted: anObject\r\t\"Set the value of muted\"\r\r\tmuted _ anObject! !\r!RVMStripChartTrace methodsFor: 'accessing' stamp: 'ssa 10/10/2008 19:22'!\rpen\r\t\"Answer the value of pen\"\r\r\t| bic |\r\tpen isNil ifTrue:[bic _ Pen new.\r\t\tbic defaultNib:1.\r\t\tbic combinationRule: Form over.\r\t\tself pen: bic].\r\t^ pen! !\r!RVMStripChartTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:01'!\rpen: anObject\r\t\"Set the value of pen\"\r\r\tpen _ anObject! !\r!RVMStripChartTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:07'!\rrawData\r\t\"Answer the value of rawData\"\r\r\trawData isNil ifTrue:[self rawData: (RVMCircularCollection new:10)].\r\t^ rawData! !\r!RVMStripChartTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:51'!\rrawData: anObject\r\t\"Set the value of rawData\"\r\r\trawData _ anObject.\r\tscaledData _ rawData collect:[:datum| self scaler scale: datum].! !\r!RVMStripChartTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:09'!\rscaledData\r\t\"Answer the value of scaledData\"\r\r\tscaledData isNil ifTrue:[self scaledData: self initialScaledData].\r\t^ scaledData! !\r!RVMStripChartTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:45'!\rscaledData: anObject\r\t\"Set the value of scaledData\"\r\r\tscaledData _ anObject! !\r!RVMStripChartTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:45'!\rscaler\r\t\"Answer the value of scaler\"\r\r\tscaler isNil ifTrue:[self scaler: nil].\r\t^ scaler! !\r!RVMStripChartTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:04'!\rscaler: anObject\r\t\"Set the value of scaler\"\r\r\tscaler _ anObject.\r\tscaler notNil ifTrue:[self removeAllData]! !\r!RVMStripChartTrace methodsFor: 'add/remove data' stamp: 'ssa 1/1/1970 00:53'!\radd: aValue\r\t\"Add this value to the end of my data\"\r\tself rawData add: aValue.\r\tself scaledData add: (self scaler scale: aValue)! !\r!RVMStripChartTrace methodsFor: 'add/remove data' stamp: 'ssa 1/1/1970 01:25'!\raddData\r\t\"do nothing, only works in subclasses\"! !\r!RVMStripChartTrace methodsFor: 'add/remove data' stamp: 'ssa 1/1/1970 00:25'!\rinitialScaledData\r\t\"Generate the scaled data by scaling the rawData\"\r\t^self rawData collect:[:datum| self scaler scale: datum]! !\r!RVMStripChartTrace methodsFor: 'add/remove data' stamp: 'ssa 1/1/1970 00:41'!\rremoveAllData\r\r\tself rawData removeAll.\r\tself scaledData removeAll! !\r!RVMStripChartTrace methodsFor: 'add/remove data' stamp: 'ssa 1/1/1970 01:13'!\rresizeTo: anInteger\r\r\t(self rawData isKindOf: RVMCircularCollection) ifTrue:[\r\tself rawData size: anInteger.\r\tself scaledData size: anInteger]! !\r!RVMStripChartTrace methodsFor: 'drawing' stamp: 'ssa 1/1/1970 00:12'!\rdrawLastOn: aColorForm\r\t\"Draw the last line segment on this canvas using this pen.\"\r\t| yScale xSpacing x |\r\tself muted ifTrue:[^self].\r\tself pen destForm: aColorForm.\r\tself scaledData numberOfElements = 1 ifTrue:[^self drawOn: aColorForm].\r\tyScale _ aColorForm height / 100.\r\txSpacing _ 2.\r\tx _ self scaledData numberOfElements  - 1* xSpacing.\r\tself pen place: x@ (aColorForm height -((self scaledData at: self scaledData numberOfElements - 1) * yScale)).\r\tself pen goto: x+ xSpacing @ (aColorForm height -((self scaledData at: self scaledData numberOfElements) * yScale)).\r! !\r!RVMStripChartTrace methodsFor: 'drawing' stamp: 'ssa 1/1/1970 00:25'!\rdrawOn: aColorForm\r\r\t| yScale xSpacing x first |\r\tself muted ifTrue:[^self].\r\tself pen destForm: aColorForm.\r\tyScale _ aColorForm height / 100.\r\txSpacing _ 2.\r\tx _ 0.\r\tfirst _ true.\r\tself scaledData do:[:datum|\r\t\tfirst ifTrue:[self pen place: x@ (aColorForm height -(datum * yScale)). first _ false].\r\t\tself pen goto: x@ (aColorForm height -(datum * yScale)).\r\t\tx _ x + xSpacing.\r\t\tx < 0 ifTrue:[^self]]! !\r!RVMStripChartTrace methodsFor: 'drawing' stamp: 'ssa 1/1/1970 00:28'!\rmute\r\r\tself muted: true.! !\r!RVMStripChartTrace methodsFor: 'drawing' stamp: 'ssa 1/1/1970 00:11'!\rredrawOn: aColorForm\r\tself scaledData: nil.\r\tself drawOn: aColorForm! !\r!RVMStripChartTrace methodsFor: 'drawing' stamp: 'ssa 1/1/1970 00:28'!\runmute\r\r\tself muted: false.! !\r!RVMStripChartTrace methodsFor: 'testing' stamp: 'ssa 1/1/1970 00:04'!\risEmpty\r\r\t^self rawData isEmpty! !\r!RVMStripChartTrace methodsFor: 'testing' stamp: 'ssa 1/1/1970 00:04'!\risFull\r\r\t^self rawData isFull! !\r!RVMStripChartTrace methodsFor: 'user interface' stamp: 'ssa 1/1/1970 00:21'!\rcolorButton\r\t\"Answer a color button connect to my color\"\r\t^RVMColorButtonView on: self colorGetter:#color colorSetter:#color:! !\r!RVMStripChartTrace methodsFor: 'user interface' stamp: 'ssa 1/1/1970 00:23'!\rminmaxButton\r\t\"Answer a minmax button connect to my scaler's minmax\"\r\t^RVMMinMaxView on: self  getMin: #min setMin: #min: getMax: #max setMax: #max:! !\r!RVMStripChartTrace methodsFor: 'user interface' stamp: 'ssa 5/12/2010 10:13'!\rmuteButton\r\t\"Answer a color button connect to my color\"\r\t| v |\r\tv _ RVMCheckBoxOnlyView on: self label: '' checkState: [self muted not] whenChecked: [self unmute] whenUnchecked: [self mute].\r\tRVMMonitor inform: v.\r\t^v! !\r!RVMStripChartTrace methodsFor: 'scaling' stamp: 'ssa 10/6/2008 16:29'!\rrescale\r\t\"Reset my scaler and recompute my scaledData\"\r\tself scaler resetScaling.\r\tself scaledData:nil.! !\r!RVMAspectTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:44'!\raspect\r\t\"Answer the value of aspect\"\r\r\taspect isNil ifTrue:[self aspect: #bytesUseds].\r\t^ aspect! !\r!RVMAspectTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:03'!\raspect: anObject\r\t\"Set the value of aspect\"\r\r\taspect _ anObject.\r\taspect notNil ifTrue:[self scaler: (RVMMonitor scalerFor:aspect)]! !\r!RVMAspectTrace methodsFor: 'accessing' stamp: 'ssa 10/3/2008 23:17'!\raspectLabel\r\r\t^self aspect! !\r!RVMAspectTrace methodsFor: 'updating' stamp: 'ssa 1/1/1970 00:26'!\raddData\r\t\"Assume a single valued data source\"\r\tself add:(RVMMonitor lastSample perform: self aspect)! !\r!RVMAspectTrace methodsFor: 'user interface' stamp: 'ssa 1/1/1970 00:29'!\rallView\r\t\r\t\t^self aspectColorMuteView! !\r!RVMAspectTrace methodsFor: 'user interface' stamp: 'ssa 1/1/1970 00:32'!\raspectButton\r\t\"Answer an aspect button connect to my aspect\"\r\t^RVMAspectLabelView on: self \r\t\tgetAllAspectsWith: [RVMMulticoreSample systemAspects] \r\t\tgetCurrentAspectWith: #aspect \r\t\tsetNewAspectWith: #aspect:! !\r!RVMAspectTrace methodsFor: 'user interface' stamp: 'ssa 1/1/1970 00:46'!\raspectColorMuteView\r\t\"Answer a view showing my color and aspect\"\r\t| view |\r\tview _ RVMView new.\r\tview model: self.\r\tview addSubView: self  muteButton in: (0@0 extent: (1/10) @ 1) borderWidth:1.\r\tview addSubView: self colorButton in: ((1/10)@0 extent: (1/10) @ 1) borderWidth:1.\r\tview addSubView: self aspectButton in: ((2/10)@0 extent: (8/10) @ 1) borderWidth:1.\r\t^view! !\r!RVMAspectTrace methodsFor: 'user interface' stamp: 'ssa 1/1/1970 00:37'!\raspectColorView\r\t\"Answer a view showing my color and aspect\"\r\t| view |\r\tview _ RVMView new.\r\tview addSubView: self  colorButton in: (0@0 extent: (1/10) @ 1) borderWidth:1.\r\tview addSubView: self aspectButton in: ((1/10)@0 extent: (9/10) @ 1) borderWidth:1.\r\t^view! !\r!RVMCoreAspectTrace methodsFor: 'accessing' stamp: 'ssa 10/3/2008 23:21'!\raspectLabel\r\r\t^'#',self coreIndex printString,' ',self aspect! !\r!RVMCoreAspectTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:27'!\rcoreIndex\r\t\"Answer the value of coreIndex\"\r\r\tcoreIndex isNil ifTrue:[self coreIndex: 1].\r\t^ coreIndex! !\r!RVMCoreAspectTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:27'!\rcoreIndex: anObject\r\t\"Set the value of coreIndex\"\r\r\tcoreIndex _ anObject! !\r!RVMCoreAspectTrace methodsFor: 'updating' stamp: 'ssa 11/17/2008 17:09'!\raddData\r\t\"Assume a multi valued data source\"\r\tself add:((RVMMonitor lastSample perform: self aspect) at: self coreIndex + 1)! !\r!RVMCoreAspectTrace methodsFor: 'user interface' stamp: 'ssa 1/1/1970 00:46'!\rallView\r\t\"Answer a view showing my color and aspect\"\r\t| view |\r\tview _ RVMView new.\r\tview model: self.\r\tview addSubView: self  muteButton in: (0@0 extent: (1/10) @ 1) borderWidth:1.\r\tview addSubView: self  coreIndexButton in: (1/10@0 extent: (1/10) @ 1) borderWidth:1.\r\tview addSubView: self  colorButton in: (2/10@0 extent: (1/10) @ 1) borderWidth:1.\r\tview addSubView: self aspectButton in: ((3/10)@0 extent: (7/10) @ 1) borderWidth:1.\r\t^view! !\r!RVMCoreAspectTrace methodsFor: 'user interface' stamp: 'ssa 1/1/1970 00:20'!\raspectButton\r\t\"Answer an aspect button connect to my aspect\"\r\t^RVMAspectLabelView on: self \r\t\tgetAllAspectsWith: [RVMMulticoreSample coreAspects] \r\t\tgetCurrentAspectWith: #aspect \r\t\tsetNewAspectWith: #aspect:.! !\r!RVMCoreAspectTrace methodsFor: 'user interface' stamp: 'ssa 1/1/1970 00:34'!\rcoreIndexButton\r\t\"Answer an aspect button connect to my aspect\"\r\t^RVMCoreIndexView on: self \r\t\tgetCoreIndex:#coreIndex\r\t\tsetCoreIndex: #coreIndex:\r\t\tgetAvailableIndicies: [RVMMonitor lastSample  groupStats groupSize]! !\r!RVMStripChartTrace class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:50'!\rdata: someData min: minValue max: maxValue color: aColor\r\t\"Answer a new strip chart trace with this data and parameters.\r\tNote that the type of collection used for someData will also be used for scaled data.\r\tUse OrderedCollection for variable sized data, CircularCollection for fixed size.\"\r\t| trace |\r\ttrace _ self new.\r\ttrace\r\t\tscaler: (RVMDataScaler min: minValue max: maxValue);\r\t\trawData: someData;\r\t\tcolor: aColor.\r\t^trace! !\r!RVMStripChartTrace class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 01:29'!\rsize: anInteger min: minValue max: maxValue color: aColor\r\t\"Answer a new strip chart trace with this size buffer and parameters\"\r\t| trace |\r\ttrace _ self new.\r\ttrace\r\t\tscaler: (RVMDataScaler min: minValue max: maxValue);\r\t\trawData: (RVMCircularCollection new: anInteger);\r\t\tcolor: aColor.\r\t^trace! !\r!RVMStripChartTrace class methodsFor: 'examples' stamp: 'ssa 10/18/2008 23:18'!\rexampleCircularInstance\r\t\"RVMStripChartTrace exampleCircularInstance\"\r\t\r\t^ self data: #(1 2 3 4 5 6 7 8 9) asCircularCollection min: 0 max: 10 color: Color blue! !\r!RVMStripChartTrace class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:55'!\rexampleInstance\r\t\"RVMStripChartTrace exampleInstance\"\r\t\r\t^ self data: #(1 2 3 4 5 6 5 4 3 2 1) min: 0 max: 10 color: Color blue! !\r!RVMStripChartTrace class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:14'!\rrandomInstance\r\t\"RVMStripChartTrace randomInstance\"\r\t\r\t| data |\r\tdata _ OrderedCollection new.\r\t100 timesRepeat:[data add: 10 atRandom].\r\t^ self data: data min: 0 max: 10 color: Color random! !\r!RVMAspectTrace class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:35'!\raspect: aSymbol size: anInteger color: aColor\r\t| trace |\r\ttrace _ self new.\r\ttrace\r\t\tscaler: RVMDataScaler new automatic;\r\t\trawData: (RVMCircularCollection new: anInteger);\r\t\tcolor: aColor;\r\t\taspect: aSymbol.\r\t^trace! !\r!RVMAspectTrace class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:51'!\rexampleInstance\r\t\"RVMAspectTrace exampleInstance\"\r\t^self aspect: #bytecodeCountsAverage size: 100 color: Color blue! !\r!RVMAspectTrace class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:46'!\rexampleView1\r\t\"RVMAspectTrace exampleView1\"\r\t\r\tRVMStripChartView openOnTrace: self exampleInstance! !\r!RVMAspectTrace class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:31'!\rexampleView2\r\t\"RVMAspectTrace exampleView2\"\r\t\r\tself exampleInstance aspectColorView demo! !\r!RVMAspectTrace class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:35'!\rexampleView3\r\t\"RVMAspectTrace exampleView3\"\r\t\r\tself exampleInstance aspectButton demo! !\r!RVMAspectTrace class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:25'!\rexampleView4\r\t\"RVMAspectTrace exampleView4\"\r\t\r\t| traces |\r\ttraces _ OrderedCollection new.\r\tRVMMulticoreSample systemAspects do:[:aspect|\r\t\ttraces add:(self aspect: aspect size: 100 color: Color random)].\r\tRVMStripChartView openOnTraces: traces! !\r!RVMAspectTrace class methodsFor: 'common uses' stamp: 'ssa 1/1/1970 01:18'!\rmonitorAllSystemAspects\r\t\"RVMAspectTrace monitorAllSystemAspects\"\r\t\r\t| traces colors |\r\tcolors _ (Color wheel: RVMMulticoreSample systemAspects size saturation: 1.0 brightness: 0.7) readStream.\r\ttraces _ OrderedCollection new.\r\tRVMMulticoreSample systemAspects do:[:aspect|\r\t\ttraces add:(self aspect: aspect size: 100 color: colors next)].\r\tRVMStripChartView openOnTraces: traces titled:'All system aspects'! !\r!RVMAspectTrace class methodsFor: 'common uses' stamp: 'ssa 1/1/1970 00:07'!\rmonitorAspects: someAspects \r\t\"RVMAspectTrace monitorAspects: #(bytecodeCountsAverage  bytecodesPerSecondAverage yieldCountsAverage)\"\r\t\r\t| traces colors |\r\tcolors _ (Color wheel: someAspects size saturation: 1.0 brightness: 0.7) readStream.\r\ttraces _ OrderedCollection new.\r\tsomeAspects do:[:aspect|\r\t\ttraces add:(self aspect: aspect size: 100 color: colors next)].\r\tRVMStripChartView openOnTraces: traces titled:'Selected system aspects'! !\r!RVMCoreAspectTrace class methodsFor: 'common uses' stamp: 'ssa 1/1/1970 01:14'!\rmonitorAllCoreAspectsForCore: anInteger\r\t\"RVMCoreAspectTrace monitorAllCoreAspectsForCore: 1\"\r\t\r\t| traces colors |\r\tcolors _ (Color wheel: RVMMulticoreSample coreAspects size saturation: 1.0 brightness: 0.7) readStream.\r\ttraces _ OrderedCollection new.\r\tRVMMulticoreSample coreAspects do:[:aspect|\r\t\ttraces add:(self coreIndex: anInteger aspect: aspect size: 100 color: colors next)].\r\tRVMStripChartView openOnTraces: traces titled:'All core aspects for core #',anInteger printString! !\r!RVMCoreAspectTrace class methodsFor: 'common uses' stamp: 'ssa 1/1/1970 00:21'!\rmonitorAllCoreAspectsForCoreFromUser\r\t\"RVMCoreAspectTrace monitorAllCoreAspectsForCoreFromUser\"\r\t\r\t\r\tself monitorAllCoreAspectsForCore: RVMMonitor coreIndexFromUser! !\r!RVMCoreAspectTrace class methodsFor: 'common uses' stamp: 'ssa 1/1/1970 01:21'!\rmonitorAspects: someAspects forCore: anInteger\r\t\"RVMCoreAspectTrace monitorAspects: #(bytecodeCounts bytesUseds) forCore:  1\"\r\t\r\t| traces colors |\r\tcolors _ (Color wheel: someAspects size saturation: 1.0 brightness: 0.7) readStream.\r\ttraces _ OrderedCollection new.\r\tsomeAspects do:[:aspect|\r\t\ttraces add:(self coreIndex: anInteger aspect: aspect size: 100 color: colors next)].\r\tRVMStripChartView openOnTraces: traces titled:'Selected aspects for core #',anInteger printString! !\r!RVMCoreAspectTrace class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 01:32'!\rcoreIndex: anIndex aspect: aSymbol size: anInteger color: aColor\r\r\t| trace |\r\ttrace _ self aspect: aSymbol size: anInteger color: aColor.\r\ttrace coreIndex: anIndex.\r\t^trace! !\r!RVMCoreAspectTrace class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:44'!\rexampleInstance\r\t\"RVMCoreAspectTrace exampleInstance\"\r\t^self coreIndex: 1 aspect: #bytesUseds size: 100 color: Color blue! !\r!RVMCoreAspectTrace class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:16'!\rexampleView1\r\t\"RVMCoreAspectTrace exampleView1\"\r\t\r\tRVMStripChartView openOnTrace: self exampleInstance! !\r!RVMCoreAspectTrace class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:24'!\rexampleView2\r\t\"RVMCoreAspectTrace exampleView2\"\r\t\r\t| traces |\r\ttraces _ OrderedCollection new.\r\ttraces add:(self coreIndex: 1 aspect: #bytecodeCounts size: 200 color: Color blue).\r\ttraces add:(self coreIndex: 1 aspect: #bytesUseds size: 200 color: Color red).\r\ttraces add:(self coreIndex: 1 aspect: #yieldCounts size: 200 color: Color green).\r\tRVMStripChartView openOnTraces: traces! !\r!RVMCoreAspectTrace class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:07'!\rexampleView3\r\t\"RVMCoreAspectTrace exampleView3\"\r\t\r\t| traces |\r\ttraces _ OrderedCollection new.\r\t1 to:  4 do:[:core|\r\t\ttraces add:(self coreIndex: core aspect: #bytecodeCounts size: 100 color: Color random).\r\t\ttraces add:(self coreIndex: core aspect: #bytesUseds size: 100 color: Color random).\r\t\ttraces add:(self coreIndex: core aspect: #yieldCounts size: 100 color: Color random)].\r\tRVMStripChartView openOnTraces: traces! !\r!RVMCoreAspectTrace class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:38'!\rexampleView4\r\t\"RVMCoreAspectTrace exampleView4\"\r\t\r\tself exampleInstance aspectColorView demo! !\r!RVMCoreAspectTrace class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:36'!\rexampleView5\r\t\"RVMCoreAspectTrace exampleView5\"\r\t\r\tself exampleInstance allView demo! !\r!RVMCoreAspectTrace class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:06'!\rexampleView6\r\t\"RVMCoreAspectTrace exampleView6\"\r\t\r\t| traces |\r\ttraces _ OrderedCollection new.\r\t1 to: 10 do:[:core|\r\t\ttraces add:(self coreIndex: core aspect: #bytecodeCounts size: 100 color: Color random).\r\t\ttraces add:(self coreIndex: core aspect: #bytesUseds size: 100 color: Color random).\r\t\ttraces add:(self coreIndex: core aspect: #yieldCounts size: 100 color: Color random)].\r\tRVMStripChartView openOnTraces: traces! !\r!RVMCoreAspectTrace class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:09'!\rexampleView7\r\t\"RVMCoreAspectTrace exampleView7\"\r\t\r\t| traces |\r\ttraces _ OrderedCollection new.\r\tRVMMulticoreSample coreAspects do:[:aspect|\r\t\ttraces add:(self coreIndex: 1 aspect: aspect size: 100 color: Color random)].\r\tRVMStripChartView openOnTraces: traces! !\r!RVMTest methodsFor: 'logging' stamp: 'dmu 11/11/2009 18:06'!\rlog: aString\r\r\tTranscript cr;show:'log: [',self name,'] ',aString. Transcript cr; cr.\r\tself runLog add: {Time dateAndTimeNow. aString}! !\r!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 06:19'!\rassertionBlock\r\t\"Answer the value of assertionBlock\"\r\r\tassertionBlock isNil ifTrue:[self assertionBlock: [:test :outcome| false]].\r\t^ assertionBlock! !\r!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 05:46'!\rassertionBlock: anObject\r\t\"Set the value of assertionBlock\"\r\r\tassertionBlock _ anObject! !\r!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 06:47'!\rassertions\r\t\"Answer the value of assertions\"\r\r\tassertions isNil ifTrue:[self assertions: OrderedCollection new].\r\t^ assertions! !\r!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 06:47'!\rassertions: anObject\r\t\"Set the value of assertions\"\r\r\tassertions _ anObject! !\r!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 05:15'!\renvironment\r\t\"Answer the value of environment\"\r\r\tenvironment isNil ifTrue:[self environment: nil].\r\t^ environment! !\r!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 05:15'!\renvironment: anObject\r\t\"Set the value of environment\"\r\r\tenvironment _ anObject! !\r!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 05:15'!\rlastResult\r\t\"Answer the value of lastResult\"\r\r\tlastResult isNil ifTrue:[self lastResult: nil].\r\t^ lastResult! !\r!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 05:15'!\rlastResult: anObject\r\t\"Set the value of lastResult\"\r\r\tlastResult _ anObject! !\r!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 06:05'!\rname\r\t\"Answer the value of name\"\r\r\tname isNil ifTrue:[self name: 'unnamed'].\r\t^ name! !\r!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 06:05'!\rname: anObject\r\t\"Set the value of name\"\r\r\tname _ anObject! !\r!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 07:39'!\rresult\r\r\t^self lastResult! !\r!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 06:31'!\rrunLog\r\t\"Answer the value of runLog\"\r\r\trunLog isNil ifTrue:[self runLog: OrderedCollection new].\r\t^ runLog! !\r!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 06:31'!\rrunLog: anObject\r\t\"Set the value of runLog\"\r\r\trunLog _ anObject! !\r!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 08:58'!\rsetUpBlock\r\t\"Answer the value of setUpBlock\"\r\r\tsetUpBlock isNil ifTrue:[self setUpBlock: [:test| ]].\r\t^ setUpBlock! !\r!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 05:15'!\rsetUpBlock: anObject\r\t\"Set the value of setUpBlock\"\r\r\tsetUpBlock _ anObject! !\r!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 08:58'!\rtearDownBlock\r\t\"Answer the value of tearDownBlock\"\r\r\ttearDownBlock isNil ifTrue:[self tearDownBlock: [:test :env|]].\r\t^ tearDownBlock! !\r!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 05:15'!\rtearDownBlock: anObject\r\t\"Set the value of tearDownBlock\"\r\r\ttearDownBlock _ anObject! !\r!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 06:19'!\rtestBlock\r\t\"Answer the value of testBlock\"\r\r\ttestBlock isNil ifTrue:[self testBlock: [:test :env| self log:'testing']].\r\t^ testBlock! !\r!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 05:22'!\rtestBlock: anObject\r\t\"Set the value of testBlock\"\r\r\ttestBlock _ anObject! !\r!RVMTest methodsFor: 'testing process' stamp: 'ssa 3/5/2010 17:37'!\rrun\r\tself environment: (self setUpBlock value: self).\r\tself lastResult: self runTest.\r\tself tearDownBlock value: self value: self environment.\r\t^self lastResult\r\t! !\r!RVMTest methodsFor: 'testing process' stamp: 'dmu 9/3/2010 11:49'!\rrunTest\r\r\t| outcome result decision |\r\toutcome _ self testBlock value: self value: self environment.\r\tresult _ RVMTestResult test: self result: outcome asserting: ((self assertionBlock value: self value: outcome) and:[self allAssertionsPassed]).\r\tself log: result gradeString.\r\t(result failed and:[self name ~= 'testFailure'])ifTrue:[decision _ self confirm:'Test [', self name,'] failed, continue?'.\r\t\tdecision ifFalse:[self halt:'Test [', self name,'] failed, aborting other tests']].\r\t^result! !\r!RVMTest methodsFor: 'printing' stamp: 'ssa 8/27/2009 07:00'!\rfullPrintOn: aStream\r\r\taStream nextPutAll: 'Testing: ',self name.\r\taStream cr; nextPutAll: 'result: '.\r\tself result printOn:aStream.\r\taStream cr; nextPutAll: 'setUp: '.\r\tself setUpBlock printOn:aStream.\r\taStream cr; nextPutAll: 'test: '.\r\tself testBlock printOn:aStream.\r\taStream cr; nextPutAll: 'tearDown: '.\r\tself tearDownBlock printOn:aStream.\r\taStream cr; nextPutAll: 'asserting: '.\r\tself assertionBlock printOn:aStream.\r\taStream cr; nextPutAll: 'runLog: '.\r\tself runLog printOn:aStream.\r\t! !\r!RVMTest methodsFor: 'printing' stamp: 'ssa 8/27/2009 07:05'!\rgradeString\r\t^self lastResult isNil ifTrue:['untested']ifFalse:[self lastResult gradeString]! !\r!RVMTest methodsFor: 'printing' stamp: 'ssa 8/27/2009 06:59'!\rprintOn: aStream\r\r\taStream nextPutAll: self shortPrintString,'(',self gradeString,')'! !\r!RVMTest methodsFor: 'printing' stamp: 'ssa 8/27/2009 06:04'!\rshortPrintString\r\r\t^'Testing: ',self name! !\r!RVMTest methodsFor: 'assertions' stamp: 'ssa 8/27/2009 06:51'!\rallAssertionsPassed\r\r\tself assertions detect:[:each| each = false] ifNone:[^true].\r\t^false! !\r!RVMTest methodsFor: 'assertions' stamp: 'ssa 9/15/2009 16:34'!\rassert: aTrueResult \r\r\tself assert: aTrueResult ifFail: [self log: 'assertion failed']! !\r!RVMTest methodsFor: 'assertions' stamp: 'dmu 12/16/2009 16:06'!\rassert: aTrueResult ifFail: failBlock\r\r\t(aTrueResult = true) | (aTrueResult = false) \r\t\tifFalse:[self lyError:'assertion expressions result result in Booleans'].\r\tself assertions add: aTrueResult.\r\taTrueResult ifFalse:[self class debugOnFail ifTrue:[self halt:self printString,' assertion failed']ifFalse:failBlock].\r\t! !\r!RVMTest class methodsFor: 'settings' stamp: 'ssa 9/15/2009 16:28'!\rdebugOnFail\r\t\"If true, then a failing assertion or failBlock execution will open a Debugger\"\r\t\r\tDebugOnFail isNil ifTrue:[DebugOnFail _ false].\r\t^DebugOnFail! !\r!RVMTest class methodsFor: 'settings' stamp: 'ssa 9/15/2009 16:29'!\rdebugOnFail: aBoolean\r\t\"If true, then a failing assertion or failBlock execution will open a Debugger\"\r\t\r\tDebugOnFail _ aBoolean! !\r!RVMTest class methodsFor: 'quick run' stamp: 'ssa 8/27/2009 05:52'!\rrunSetUp: setUpBlock test: testBlock asserting: assertionBlock\r\r\t| test |\r\ttest _ self setUp: setUpBlock test: testBlock  asserting: assertionBlock.\r\t^test run! !\r!RVMTest class methodsFor: 'quick run' stamp: 'ssa 8/27/2009 05:51'!\rrunSetUp: setUpBlock test: testBlock tearDown: tearDownBlock  asserting: assertionBlock\r\r\t| test |\r\ttest _ self setUp: setUpBlock test: testBlock tearDown: tearDownBlock asserting: assertionBlock.\r\t^test run! !\r!RVMTest class methodsFor: 'quick run' stamp: 'ssa 8/27/2009 05:52'!\rrunTest: testBlock asserting: assertionBlock\r\r\t| test |\r\ttest _ self  test: testBlock  asserting: assertionBlock.\r\t^test run! !\r!RVMTest class methodsFor: 'quick run' stamp: 'ssa 8/27/2009 05:52'!\rrunTest: testBlock tearDown: tearDownBlock  asserting: assertionBlock\r\r\t| test |\r\ttest _ self test: testBlock tearDown: tearDownBlock asserting: assertionBlock.\r\t^test run! !\r!RVMTest class methodsFor: 'examples' stamp: 'ssa 7/7/2010 14:02'!\rfullExample\r\t\"self fullExample run\"\r\t\"Use this example as a template for your tests in subclasses of LyTestSuite in the 'tests' message category\"\r\t| theTest |\r\ttheTest _ RVMTest setUp: [:test| test log:'setting up for test:',test name. \r\t\t\t\t\"setUpBlocks return the test environment\"\r\t\t\t\t#( 1 2 3 4 5 )]\r\t\t\ttest:[:test :env| test log:'test:',test name,' starting...'.\r\t\t\t\t\"testBlocks perform the test in the setup environment.  \r\t\t\t\tThe test object is available for assertions and logging\"\r\t\t\t\ttest assert: (env at: 2)=2.\r\t\t\t\ttest assert:(env select:[:e| e odd]) = #(1 3 5) ifFail:[test log:'odd selections failed'].\r\t\t\t\ttest log:'test:',test name,' complete'.\r\t\t\t\t\"the last expression result is the outcome of the test\"\r\t\t\t\tenv size = 5]\r\t\t\ttearDown:[:test :env| test log:'tearing down test:',test name.\r\t\t\t\t\"tearDownBlocks do any necessary cleanup that would not otherwise be garbage collected\"\r\t\t\t\ttest log:'tear down complete']\r\t\t\tasserting:[:test :outcome| \"assertionBlocks must result in True or False, and\r\t\t\t\t\t\t\t\trepresent the pass/fail judgement of the test outcome\" \r\t\t\t\t\t\t\t\t\"if you use  assert: or assert:ifFail: in these blocks their ANDed result\r\t\t\t\t\t\t\t\twill be ANDed to the result of this block for the final assertion\"\r\t\t\t\t\t\t\t\toutcome = true \"or use an expression that results in True or False\"].\r\ttheTest name: 'fullExample'.\r\t^theTest! !\r!RVMTest class methodsFor: 'examples' stamp: 'ssa 7/7/2010 14:03'!\rsimpleFullExample\r\t\"self simpleFullExample run\"\r\t| theTest |\r\ttheTest _ RVMTest setUp: [:test| ]\r\t\t\ttest:[:test :env| 123]\r\t\t\ttearDown:[:test :env| ]\r\t\t\tasserting:[:test :outcome| outcome = 123].\r\ttheTest name: 'simpleFullExample'.\r\t^theTest! !\r!RVMTest class methodsFor: 'instance creation' stamp: 'ssa 8/27/2009 05:49'!\rsetUp: setUpBlock test: testBlock  asserting: assertionBlock\r\r\t^self new\r\t\tsetUpBlock: setUpBlock;\r\t\ttestBlock: testBlock;\r\t\t assertionBlock: assertionBlock;\r\t\tyourself! !\r!RVMTest class methodsFor: 'instance creation' stamp: 'ssa 8/27/2009 05:48'!\rsetUp: setUpBlock test: testBlock tearDown: tearDownBlock asserting: assertionBlock\r\r\t^self new\r\t\tsetUpBlock: setUpBlock;\r\t\ttestBlock: testBlock;\r\t\ttearDownBlock: tearDownBlock;\r\t\t assertionBlock: assertionBlock;\r\t\tyourself! !\r!RVMTest class methodsFor: 'instance creation' stamp: 'ssa 8/27/2009 05:50'!\rtest: testBlock  asserting: assertionBlock\r\r\t^self new\r\t\ttestBlock: testBlock;\r\t\t assertionBlock: assertionBlock;\r\t\tyourself! !\r!RVMTest class methodsFor: 'instance creation' stamp: 'ssa 8/27/2009 05:50'!\rtest: testBlock tearDown: tearDownBlock asserting: assertionBlock\r\r\t^self new\r\t\ttestBlock: testBlock;\r\t\ttearDownBlock: tearDownBlock;\r\t\t assertionBlock: assertionBlock;\r\t\tyourself! !\r!RVMTest class methodsFor: 'user interfacing' stamp: 'ssa 5/12/2010 10:19'!\rdebugOnFailSwitch\r\t\"self debugOnFailSwitch\"\r\t| topView |\r\ttopView := RVMStandardSystemView new.\r\ttopView noLabel.\r\ttopView borderWidth:1.\r\ttopView minimumSize: 130@30.\r\ttopView maximumSize: 200@200.\r\ttopView addSubView: (RVMCheckBoxView on: self label: 'LyTest debugOnFail' checkState: [self debugOnFail] whenChecked: [self debugOnFail: true] whenUnchecked: [self debugOnFail: false] monitor: true).\r\ttopView controller open! !\r!RVMTest class methodsFor: 'tests' stamp: 'ssa 7/7/2010 14:03'!\rfullExampleTest\r\t\"self fullExampleTest\"\r\t| theTest |\r\ttheTest _ RVMTest setUp: [:test| test log:'setting up for test:',test name.\r\t\t\t\t\"setUpBlocks return the test environment\"\r\t\t\t\t#( 1 2 3 4 5 )]\r\t\t\ttest:[:test :env| test log:'test:',test name,' starting...'.\r\t\t\t\t\"testBlocks perform the test in the setup environment.  \r\t\t\t\tThe test object is available for assertions and logging\"\r\t\t\t\ttest assert: (env at: 2)=2.\r\t\t\t\ttest assert:(env select:[:e| e odd]) = #(1 3 5) ifFail:[test log:'odd selections failed'].\r\t\t\t\ttest log:'test:',test name,' complete'.\r\t\t\t\t\"the last expression result is the outcome of the test\"\r\t\t\t\tenv size = 5]\r\t\t\ttearDown:[:test :env| test log:'tearing down test:',test name.\r\t\t\t\t\"tearDownBlocks do any necessary cleanup that would not otherwise be garbage collected\"\r\t\t\t\ttest log:'tear down complete']\r\t\t\tasserting:[:test :outcome| \"assertionBlocks must result in True or False, and\r\t\t\t\t\t\t\t\trepresent the pass/fail judgement of the test outcome\" \r\t\t\t\t\t\t\t\ttest allAssertionsPassed . \" use this when using assert: or assert:ifFail:\"\r\t\t\t\t\t\t\t\toutcome = true \"or use an expression that results in True or False\"].\r\ttheTest name: 'fullExampleTest'.\r\t^theTest! !\r!RVMTestResult methodsFor: 'accessing' stamp: 'ssa 8/27/2009 07:03'!\rassertion\r\t\"Answer the value of assertion\"\r\r\tassertion isNil ifTrue:[self assertion: nil].\r\t^ assertion! !\r!RVMTestResult methodsFor: 'accessing' stamp: 'ssa 8/27/2009 05:27'!\rassertion: anObject\r\t\"Set the value of assertion\"\r\r\tassertion _ anObject! !\r!RVMTestResult methodsFor: 'accessing' stamp: 'ssa 8/27/2009 05:17'!\rresult\r\t\"Answer the value of result\"\r\r\tresult isNil ifTrue:[self result: nil].\r\t^ result! !\r!RVMTestResult methodsFor: 'accessing' stamp: 'ssa 8/27/2009 05:17'!\rresult: anObject\r\t\"Set the value of result\"\r\r\tresult _ anObject! !\r!RVMTestResult methodsFor: 'accessing' stamp: 'ssa 8/27/2009 05:17'!\rtest\r\t\"Answer the value of test\"\r\r\ttest isNil ifTrue:[self test: nil].\r\t^ test! !\r!RVMTestResult methodsFor: 'accessing' stamp: 'ssa 8/27/2009 05:17'!\rtest: anObject\r\t\"Set the value of test\"\r\r\ttest _ anObject! !\r!RVMTestResult methodsFor: 'printing' stamp: 'ssa 8/27/2009 07:01'!\rgradeString\r\t^self passed ifTrue:['passed']ifFalse:['failed']! !\r!RVMTestResult methodsFor: 'printing' stamp: 'ssa 8/27/2009 07:01'!\rprintOn: aStream\r\r\taStream nextPutAll: self gradeString, ' ',self test shortPrintString! !\r!RVMTestResult methodsFor: 'testing' stamp: 'ssa 8/27/2009 06:02'!\rfailed\r\r\t^self assertion not! !\r!RVMTestResult methodsFor: 'testing' stamp: 'ssa 8/27/2009 06:02'!\rpassed\r\r\t^self assertion! !\r!RVMTestResult class methodsFor: 'instance creation' stamp: 'ssa 8/27/2009 05:26'!\rtest: aRVMTest result: anOutcome asserting: anAssertion\r\r\t^self new\r\t\ttest: aRVMTest;\r\t\tresult: anOutcome;\r\t\tassertion: anAssertion;\r\t\tyourself! !\r!RVMTestSuite methodsFor: 'acessing' stamp: 'ssa 8/27/2009 07:07'!\rresults\r\r\t^self tests collect:[:test| test result]! !\r!RVMTestSuite methodsFor: 'testing process' stamp: 'ssa 8/30/2009 03:50'!\rfailureCount\r\t^(self tests select:[:test| test result failed])size! !\r!RVMTestSuite methodsFor: 'testing process' stamp: 'ssa 8/30/2009 03:50'!\rfailures\r\t^(self tests select:[:test| test result failed])! !\r!RVMTestSuite methodsFor: 'testing process' stamp: 'ssa 8/27/2009 09:06'!\rreportResults\r\t| passers failures |\r\tpassers _ OrderedCollection new.\r\tfailures _ OrderedCollection new.\r\tself tests do:[:test| test result passed ifTrue:[passers add: test name asSymbol]ifFalse:[failures add: test name asSymbol]].\r\tTranscript cr;show:'-------------------';cr;\r\t\tshow: 'Results for TestSuite:';\r\t\tshow: 'Summary: ',passers size printString,' passed, ',failures size printString,' failed';cr.\r\tfailures isEmpty ifFalse:[Transcript show:'Failed tests: ',failures asArray printString;cr;\r\t\tshow:'\"1 systemNavigation browseAllImplementorsOfList:', failures asArray printString,' title: ''Failed Tests'' \"']\r\t\t! !\r!RVMTestSuite methodsFor: 'testing process' stamp: 'dmu 9/24/2010 00:17'!\rrun\r\tTranscript cr;show:'Starting run.....................'.\r\tself tests do:[:test|  test printConsole. test run].\r\tTranscript cr;show:'......................Ending run'.\r\tself reportResults! !\r!RVMTestSuite methodsFor: 'accessing' stamp: 'ssa 8/27/2009 07:31'!\rtests\r\t\"Answer the value of tests\"\r\r\ttests isNil ifTrue:[self tests: OrderedCollection new].\r\t^ tests! !\r!RVMTestSuite methodsFor: 'accessing' stamp: 'ssa 8/27/2009 07:31'!\rtests: anObject\r\t\"Set the value of tests\"\r\r\ttests _ anObject! !\r!RVMTestSuite class methodsFor: 'instance creation' stamp: 'ssa 8/27/2009 05:35'!\rtests: someTests\r\r\t^self new tests: someTests! !\r!RVMTestSuite class methodsFor: 'running tests' stamp: 'ssa 8/27/2009 07:31'!\rrun\r\t\"self run\"\r\t\"just run the tests in my own 'testing' message category\"\r\t^self tests run! !\r!RVMTestSuite class methodsFor: 'running tests' stamp: 'ssa 8/27/2009 07:45'!\rrunAll\r\t\"self runAll\"\r\t\"just run all tests in the 'testing' message category of myself and my subclasses\"\r\t^self testsWithSubTests run! !\r!RVMTestSuite class methodsFor: 'running tests' stamp: 'ssa 8/27/2009 07:45'!\rrunSubs\r\t\"self runSubs\"\r\t\"just run all tests in the 'testing' message category of my subclasses\"\r\t^self subTests run! !\r!RVMTestSuite class methodsFor: 'suite creation' stamp: 'ssa 8/27/2009 09:37'!\rsubTests\r\t\"Answer a test suite built by scanning methods in my subclasses 'tests' categories\"\r\t\r\t| testSelectors tests |\r\ttests _ OrderedCollection new.\r\tself allSubclassesDo:[:cls| testSelectors _ cls class organization listAtCategoryNamed: 'tests'.\r\t\ttests addAll:(testSelectors collect:[:selector| cls perform: selector])].\r\t^self tests: tests! !\r!RVMTestSuite class methodsFor: 'suite creation' stamp: 'ssa 8/27/2009 06:57'!\rtests\r\t\"self tests\"\r\t\"Answer a test suite built by scanning methods in my 'tests' category\"\r\t\r\t| testSelectors |\r\ttestSelectors _ self  class organization listAtCategoryNamed: 'tests'.\r\t^self tests: (testSelectors collect:[:selector| self perform: selector])! !\r!RVMTestSuite class methodsFor: 'suite creation' stamp: 'ssa 8/27/2009 08:29'!\rtestsWithSubTests\r\t\"Answer a test suite built by scanning methods in my own and my subclasses 'tests' categories\"\r\t\r\t| testSelectors tests |\r\ttests _ OrderedCollection new.\r\tself withAllSubclassesDo:[:cls| testSelectors _ cls class organization listAtCategoryNamed: 'tests'.\r\t\ttests addAll:(testSelectors collect:[:selector| cls perform: selector])].\r\t^self tests: tests! !\r!RVMTestSuite class methodsFor: 'tests' stamp: 'ssa 7/7/2010 14:03'!\rtestFailure\r\t\"self testFailure run\"\r\t\"A test that will always fail to ensure the system is functioning at a minimum\"\r\t| theTest |\r\ttheTest _ RVMTest test:[:test :env| ]\r\t\t\tasserting:[:test :outcome| false].\r\ttheTest name: 'testFailure'.\r\t^theTest! !\r!RVMTestSuite class methodsFor: 'tests' stamp: 'ssa 7/7/2010 14:03'!\rtestRVMTest\r\r\t^RVMTest fullExampleTest! !\r!RVMTestSuite class methodsFor: 'user interface' stamp: 'ssa 8/31/2009 10:50'!\rrunAllButton\r\t\"self runAllButton\"\r\t| topView |\r\ttopView := RVMStandardSystemView new.\r\ttopView noLabel.\r\ttopView borderWidth:1.\r\ttopView minimumSize: 130@30.\r\ttopView maximumSize: 200@200.\r\ttopView addSubView: (RVMButtonView label:'Run All Tests' action:[self runAll]).\r\ttopView label: 'Tester'.\r\ttopView controller open! !\r!RVMTester class methodsFor: 'testing' stamp: 'ssa 9/24/2008 12:40'!\rchangingSuperclassTest\r\t\"RVMTester changingSuperclassTest\"\r\t\"Create a class, then change its superclass and  verify\"\r\tTranscript cr;show:'Starting changing superclass test......'.\r\t#(Foo Bar Baz)do:[:n| Smalltalk removeClassNamed: n].\r\tObject subclass: #Foo\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Testing'.\r\tObject subclass: #Bar\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Testing'.\r\t(Smalltalk classNamed:#Foo) subclass: #Baz\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Testing'.\r\tTranscript cr;show:'Foo, Bar and Baz test classes created, Baz is subclass of Foo, ready to try to change superclass to Bar'.\r\t(Smalltalk classNamed:#Bar) subclass: #Baz\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'RVM-Testing'.\r\t(Smalltalk classNamed:#Baz) superclass == (Smalltalk classNamed:#Bar)\r\t\tifTrue:[Transcript cr;show:'Successful....test passed']\r\t\tifFalse:[Transcript cr;show:'Nope....test failed'].\r\tTranscript cr;show:'Cleaning up....'.\r\t#(Foo Bar Baz)do:[:n| Smalltalk removeClassNamed: n].\r\tTranscript cr;show:'...End of changing superclass test'.\r\r! !\r!RVMTester class methodsFor: 'testing' stamp: 'dmu 4/1/2009 04:28'!\rdelayTest\r\"RVMTester delayTest\"\r\t| rect delay |\r\trect _ 0@0 extent: 40@40.\r\tdelay _ Delay forSeconds: 1.\r\t[Sensor leftShiftDown not] whileTrue:[Display reverse: rect. delay wait]\r! !\r!RVMTester class methodsFor: 'testing' stamp: 'ssa 7/24/2008 15:28'!\rmethodDeletionTest\r\t\"RVMTester methodDeletionTest\"\r\t\"Create a test class and add 32 methods to it, then try to add 33\"\r\t\r\t| testClassName testClass |\r\ttestClassName := #RVMTESTforMethodDeletion.\r\t(Smalltalk includesKey: testClassName) ifTrue:[(Smalltalk at: testClassName) removeFromSystem].\r\t\r\tObject subclass: testClassName\r\t\tinstanceVariableNames: ''\r\t\tclassVariableNames: ''\r\t\tpoolDictionaries: ''\r\t\tcategory: 'RVM-Testing'.\r\t\r\ttestClass := Smalltalk at: testClassName.\r\tTranscript cr;cr;show:'Test class created: ',testClassName.\r\tTranscript cr;show:'Method dictionary size = ',testClass selectors size printString.\r\r\tTranscript cr;show:'Adding 5 methods'.\r\t1 to: 5 do:[:count|\r\t\ttestClass compile: 'testMethod',count printString].\r\tTranscript cr;show:'Method dictionary size = ',testClass selectors size printString.\r\r\tTranscript cr;show:'Removing 5 methods'.\r\t1 to: 5 do:[:count|\r\t\ttestClass removeSelector: ('testMethod',count printString) asSymbol].\r\tTranscript cr;show:'Method dictionary size = ',testClass selectors size printString.\r\ttestClass selectors notEmpty ifTrue:[Transcript cr;show:'Test Failed']ifFalse:[Transcript cr;show:'test passed'].\r\r\tTranscript cr;show:'Removing test class: ',testClassName.\r\ttestClass removeFromSystem.\r\tTranscript cr;show:'test class removed.... test over'.\r! !\r!RVMTester class methodsFor: 'testing' stamp: 'ssa 7/24/2008 15:23'!\rmethodDictionaryGrowthTest\r\t\"RVMTester methodDictionaryGrowthTest\"\r\t\"Create a test class and add 32 methods to it, then try to add 33\"\r\t\r\t| testClassName testClass |\r\ttestClassName := #RVMTESTforMethodDictionaryGrowth.\r\t(Smalltalk includesKey: testClassName) ifTrue:[(Smalltalk at: testClassName) removeFromSystem].\r\t\r\tObject subclass: testClassName\r\t\tinstanceVariableNames: ''\r\t\tclassVariableNames: ''\r\t\tpoolDictionaries: ''\r\t\tcategory: 'RVM-Testing'.\r\t\r\ttestClass := Smalltalk at: testClassName.\r\tTranscript cr;cr;show:'Test class created: ',testClassName.\r\tTranscript cr;show:'Method dictionary size = ',testClass selectors size printString.\r\r\tTranscript cr;show:'Adding 32 methods'.\r\t1 to: 32 do:[:count|\r\t\ttestClass compile: 'testMethod',count printString].\r\tTranscript cr;show:'Method dictionary size = ',testClass selectors size printString.\r\r\tTranscript cr;show:'Adding 33rd method'.\r\t\ttestClass compile: 'testMethod33'.\r\tTranscript cr;show:'Method dictionary size = ',testClass selectors size printString.\r\r\tTranscript cr;show:'Removing test class: ',testClassName.\r\ttestClass removeFromSystem.\r\tTranscript cr;show:'test class removed.... test over'.\r! !\r!RVMTester class methodsFor: 'testing' stamp: 'dmu 1/1/2009 04:13'!\rrunParallelCompilerBenchmarks: n\r\"RVMTester runParallelCompilerBenchmarks: 4\"\rn timesRepeat: [[Benchmark new testCompiler. Transcript show: 'done'; cr] copy fixTemps fork]! !\r!RVMTester class methodsFor: 'testing' stamp: 'ssa 1/1/1970 00:21'!\rsegmentationFaultTest\r\t\"RVMTester segmentationFaultTest\"\r\t\"Executing this code produces a segmenation fault\"\r\t| all singles groups file |\r\tTranscript cr;show:'test starting... segmentation fault test... writing to segfaultLog.txt'.\rfile _ FileStream newFileNamed:'segfaultLog.txt'.\rall _ #(bytecodeCounts bytecodeCountsAverage bytecodesPerCycle bytecodesPerCycles bytecodesPerCyclesAverage bytecodesPerKCs bytecodesPerMCs bytecodesPerMillisecond bytecodesPerMilliseconds bytecodesPerMillisecondsAverage bytecodesPerSecond bytecodesPerSecondAverage bytesUseds contextChangeCounts cyclesRunWaitRatios cyclesRunWaitRatiosAverage cyclesRunnings cyclesRunningsAverage cyclesSinceLasts cyclesSinceLastsAverage cyclesWaitings cyclesWaitingsAverage interruptCheckCounts millisecondsRunnings millisecondsWaitings msRunWaitRatios msRunWaitRatiosAverage msRunningsAverage msSinceLasts msSinceLastsAverage msWaitingsAverage receiveTallySum unforcedInterruptCheckCounts yieldCounts yieldCountsAverage yieldFrequencies yieldsPerSecond yieldsPerSecondAverage).\rsingles _ OrderedCollection new.\rgroups _ OrderedCollection new.\rall do:[:msg| file nextPutAll:'Attempting ',msg,'\r\t'.\r\tfile flush.\r\t((RVMMonitor lastSample perform: msg) isKindOf:Number)ifTrue:[singles add: msg]ifFalse:[groups add: msg]].\rfile close.\r\tTranscript cr;show:'test passed.... test over'.\r! !\r!RVMTester class methodsFor: 'testing' stamp: 'dmu 5/4/2009 23:51'!\rtestAtRandom\r\t\"self testAtRandom\"\r\t| r n t |\r\tr _ Random new.\r\tn _ 0.\r\t100000 timesRepeat: [\r\t\tt _ 396 atRandom: r.\r\t\tn _ n + 1.\r\t\tt isInteger ifFalse: [self error: 'not int'].\r\t\tt < 0 ifTrue: [self error: 'neg' ].\r\t\tt > 400 ifTrue: [self error: 'too big'].\r\t]! !\r!RVMTester class methodsFor: 'testing' stamp: 'dmu 5/5/2009 00:24'!\rtestNextInt\r\t\"self testAtRandom\"\r\t| r n t |\r\tr _ Random new.\r\tn _ 0.\r\t100000 timesRepeat: [\r\t\tt _ r nextInt: 396.\r\t\tn _ n + 1.\r\t\tt isInteger ifFalse: [self error: 'not int'].\r\t\tt < 0 ifTrue: [self error: 'neg' ].\r\t\tt > 400 ifTrue: [self error: 'too big'].\r\t]! !\r!RVMTester class methodsFor: 'printing' stamp: 'dmu 5/25/2010 10:39'!\rprintPrefixFor: anObject\r\t\"RVMTester printPrefixFor: Array \"\r\t\"Answer a string to use as a prefix in Inspectors and Debuggers when printing an object\"\r\t| index readWrite |\r\t(anObject isKindOf: SmallInteger) ifTrue:[^''].\r\t(anObject isKindOf: Boolean) ifTrue:[^''].\r\t(anObject isNil) ifTrue:[^''].\r\tindex_(RVMTester getCoreHolding: anObject) printString.\r\treadWrite_(RVMTester getReadWriteOf: anObject)ifTrue:['rw']ifFalse:['rm'].\r\t\r\t\r\t^'<',readWrite,index,'> '! !\r!RVMTester class methodsFor: 'primitives' stamp: 'ssa 11/6/2008 13:10'!\rallObjectsInHeap: rank isReadWrite: isC\r\"RVMTester allObjectsInHeap: 34 isReadWrite: true\"\r<primitive: 'primitiveAllObjectsInHeap' module: 'RVMPlugin'>\rself primitiveFailed! !\r!RVMTester class methodsFor: 'primitives' stamp: 'dmu 3/22/2010 12:40'!\rcoreCount\r  \"RVMTester coreCount\"\r  <primitive: 'primitiveCoreCount' module: 'RVMPlugin'>\r  ^ 1! !\r!RVMTester class methodsFor: 'primitives' stamp: 'dmu 4/1/2009 22:17'!\rcoreProcessUtilization\r\t\"RVMTester coreProcessUtilization\"\r\t\"How many processes are running on my cores versus how many core??\"\r\t^self numberOfRunningProcesses / RVMMonitor coreCount! !\r!RVMTester class methodsFor: 'primitives' stamp: 'dmu 11/22/2008 23:43'!\renableMultithreading: aBool\r\"RVMTester enableMultithreading: true\"\r<primitive:'primitiveEnableMultithreading' module: 'RVMPlugin'>\rself primitiveFailed! !\r!RVMTester class methodsFor: 'primitives' stamp: 'dmu 1/1/1970 00:01'!\rextraRemoteContextAllocations: n\r<primitive: 'primitiveExtraRemoteContextAllocations' module: 'RVMPlugin'>\r^ self primitiveFailed! !\r!RVMTester class methodsFor: 'primitives' stamp: 'dmu 1/1/1970 00:01'!\rextraYields: n\r<primitive: 'primitiveExtraYields' module: 'RVMPlugin'>\r^ self primitiveFailed! !\r!RVMTester class methodsFor: 'primitives' stamp: 'dmu 4/7/2009 02:53'!\rgetCore\r  \"RVMTester getCore\"\r  <primitive: 'primitiveGetCore' module: 'RVMPlugin' >\r  ^ -1! !\r!RVMTester class methodsFor: 'primitives' stamp: 'ssa 11/16/2008 02:22'!\rgetCoreHolding: anObject\r\t^(self primitivGetCoreHolding: anObject)! !\r!RVMTester class methodsFor: 'primitives' stamp: 'dmu 4/7/2009 04:49'!\rgetCoreIAmRunningOn\r  \"RVMTester getCoreIAmRunningOn\"\r  <primitive: 'primitiveGetCoreIAmRunningOn' module: 'RVMPlugin' >\r  ^ -1! !\r!RVMTester class methodsFor: 'primitives' stamp: 'dmu 1/1/1970 00:05'!\rgetCoreTrace\r<primitive: 'primitiveTraceCores' module: 'RVMPlugin'>\r^ self primitiveFailed! !\r!RVMTester class methodsFor: 'primitives' stamp: 'dmu 6/2/2010 23:13'!\rgetEmergencySemaphore\r\t\"When you hit shift-control-a, the VM will signal the emergency semaphore, if it has been set to a semaphore\"\r\t\"self getEmergencySemaphore signal\"\r\t<primitive: 'primitiveEmergencySemaphore' module: 'RVMPlugin'>! !\r!RVMTester class methodsFor: 'primitives' stamp: 'dmu 1/1/1970 00:03'!\rgetMutatedReplicatedObjectsTrace\r<primitive: 'primitiveTraceMutatedReplicatedObjects' module: 'RVMPlugin'>\r^ self primitiveFailed! !\r!RVMTester class methodsFor: 'primitives' stamp: 'ssa 1/1/1970 00:11'!\rgetPassTheBatonOf: anObject\r<primitive: 'primitiveGetPassTheBaton' module: 'RVMPlugin'>\r^ true! !\r!RVMTester class methodsFor: 'primitives' stamp: 'ssa 11/6/2008 13:11'!\rgetReadWriteOf: anObject\r<primitive: 'primitiveGetMutability' module: 'RVMPlugin'>\r^ true! !\r!RVMTester class methodsFor: 'primitives' stamp: 'dmu 4/18/2009 18:34'!\risRVM\r\t\"RVMTester isRVM\"\r\t\"Am I actually running on the Tilera64?\"\r\t^(self getCoreHolding: nil) ~= -1! !\r!RVMTester class methodsFor: 'primitives' stamp: 'dmu 4/3/2009 03:40'!\rmove: anObject toCore: anInt\r<primitive: 'primitiveSetCoordinatesFor' module: 'RVMPlugin'>\rself primitiveFailed! !\r!RVMTester class methodsFor: 'primitives' stamp: 'dmu 4/3/2009 03:40'!\rmove: anObject toCore: anInteger readWritely: readWriteBoolean passTheBaton: batonBoolean\r<primitive: 'primitiveSetCoordinatesFor' module: 'RVMPlugin'>\rself primitiveFailed! !\r!RVMTester class methodsFor: 'primitives' stamp: 'ssa 11/6/2008 13:12'!\rmoveAllToReadMostlyHeaps\r\"RVMTester moveAllToReadMostlyHeaps\"\r<primitive: 'primitiveMoveAllToReadMostlyHeaps' module: 'RVMPlugin'>\r^ self primitiveFailed! !\r!RVMTester class methodsFor: 'primitives' stamp: 'ssa 4/1/2009 21:56'!\rnumberOfRunningProcesses\r\r\t^self runningProcesses size! !\r!RVMTester class methodsFor: 'primitives' stamp: 'ssa 11/16/2008 02:07'!\rprimitivGetCoreHolding: anObject\r<primitive: 'primitiveGetCore' module: 'RVMPlugin'>\r^ -1! !\r!RVMTester class methodsFor: 'primitives' stamp: 'dmu 4/1/2009 22:00'!\rprimitiveRunningProcessByCore\r\t\"Answers an array of numberOfCores size with a nil or Process instance for each core.  If a Process instance then that process was running on that core when invoked\"\r\t\"RVMTester primitiveRunningProcessByCore\"\r<primitive: 'primitiveRunningProcessByCore' module: 'RVMPlugin'>\r^ self primitiveFailed! !\r!RVMTester class methodsFor: 'primitives' stamp: 'dmu 12/7/2008 20:44'!\rprint: aString\r\"RVMTester print: 'hello'\"\r<primitive: 'primitivePrint' > \"omit module just as in thisProcess method to hit obsolete_named-primitive_table and be local\"! !\r!RVMTester class methodsFor: 'primitives' stamp: 'ssa 11/6/2008 13:13'!\rprintAllHeapsBytesUsed\r\"RVMTester printAllHeapsBytesUsed\"\r<primitive: 'primitivePrintReadWriteReadMostlyBytesUsed' module: 'RVMPlugin'>\r! !\r!RVMTester class methodsFor: 'primitives' stamp: 'dmu 10/27/2008 21:07'!\rprintExecutionTrace\r\"RVMTester printExecutionTrace\"\r\" [ [ [ RVMTester printExecutionTrace ] value ] value ] value\"\r<primitive: 'primitivePrintExecutionTrace' module: 'RVMPlugin'>\r^ self primitiveFailed! !\r!RVMTester class methodsFor: 'primitives' stamp: 'dmu 10/27/2008 15:27'!\rprintStack\r\"RVMTester printStack\"\r<primitive: 'primitivePrintStack' module: 'RVMPlugin'>\r^ self primitiveFailed! !\r!RVMTester class methodsFor: 'primitives' stamp: 'dmu 1/1/1970 00:02'!\rrunMask: aMask \r<primitive: 'primitiveRunMask' module: 'RVMPlugin'>! !\r!RVMTester class methodsFor: 'primitives' stamp: 'dmu 2/11/2009 06:03'!\rrunOnAll\r\"RVMTester runOnAll\"\rself runOnlyOn: -1! !\r!RVMTester class methodsFor: 'primitives' stamp: 'dmu 1/1/1970 00:03'!\rrunOnOne: aBool\rself runMask: ( aBool ifTrue: [1] ifFalse: [0] )! !\r!RVMTester class methodsFor: 'primitives' stamp: 'dmu 2/11/2009 06:02'!\rrunOnlyOn: anInt\r\"RVMTester runOnlyOn: 0\"\r<primitive:'primitiveRunOnlyOn' module: 'RVMPlugin'>\rself primitiveFailed! !\r!RVMTester class methodsFor: 'primitives' stamp: 'ssa 4/1/2009 21:47'!\rrunningProcessByCore\r\t\"Answers an array of numberOfCores size with a nil or Process instance for each core.  If a Process instance then that process was running on that core when invoked\"\r^self primitiveRunningProcessByCore! !\r!RVMTester class methodsFor: 'primitives' stamp: 'ssa 4/1/2009 21:48'!\rrunningProcesses\r\t\"Answers an array of Process instances that were running when invoked\"\r^self runningProcessByCore select:[:each| each notNil]! !\r!RVMTester class methodsFor: 'primitives' stamp: 'dmu 5/25/2010 10:42'!\rsetCoordinatesOf: anObject toCore: anInt readWrite: aBool\r\"RVMTester setCoordinatesOf: 3@4 toCore: 17 readWrite: false \"\r<primitive: 'primitiveSetCoordinatesFor' module: 'RVMPlugin'>\rself primitiveFailed\r! !\r!RVMTester class methodsFor: 'primitives' stamp: 'ssa 1/1/1970 00:25'!\rsetCoordinatesOf: anObject toCore: anInt readWrite: aBool passTheBaton: anotherBool\r\"RVMTester setCoordinatesOf: 3@4 toCore: 17 readWrite: false passTheBaton: false\"\r<primitive: 'primitiveSetCoordinatesFor' module: 'RVMPlugin'>\rself primitiveFailed\r! !\r!RVMTester class methodsFor: 'primitives' stamp: 'dmu 1/1/1970 00:00'!\rsetCoreTraceSize: n\r<primitive: 'primitiveTraceCores' module: 'RVMPlugin'>! !\r!RVMTester class methodsFor: 'primitives' stamp: 'dmu 6/2/2010 23:10'!\rsetEmergencySemaphore: aSemaOrNil\r\t\"When you hit shift-control-a, the VM will signal the emergency semaphore, if it has been set to a semaphore\"\r\t<primitive: 'primitiveEmergencySemaphore' module: 'RVMPlugin'>! !\r!RVMTester class methodsFor: 'primitives' stamp: 'dmu 1/1/1970 00:06'!\rsetMutatedReplicatedObjectsTraceSize: n\r<primitive: 'primitiveTraceMutatedReplicatedObjects' module: 'RVMPlugin'>\r^ self primitiveFailed! !\r!RVMTester class methodsFor: 'primitives' stamp: 'dmu 1/1/1970 00:40'!\rshuffle: numCores\r^ self shuffleFrom: 0 to: numCores - 1! !\r!RVMTester class methodsFor: 'primitives' stamp: 'dmu 1/1/1970 00:39'!\rshuffleFrom: first to: last\r<primitive: 'primitiveShuffle' module: 'RVMPlugin'>\r^ self primitiveFailed! !\r!RVMTester class methodsFor: 'primitives' stamp: 'dmu 11/1/2008 06:12'!\rshuffleFrom: first to: last  moveRWtoRM: bool1 moveRMtoRW: bool2\r\"RVMTester shuffleFrom: 1 to: 17 moveRWtoRM: false moveRMtoRW: true\"\r<primitive: 'primitiveShuffle' module: 'RVMPlugin'>\r^ self primitiveFailed! !\r!RVMTester class methodsFor: 'primitives' stamp: 'dmu 2/11/2009 06:04'!\rsoleRunningCore\r\"RVMTester soleRunningCore\"\r<primitive:'primitiveRunOnlyOn' module: 'RVMPlugin'>\rself primitiveFailed! !\r!RVMTester class methodsFor: 'primitives' stamp: 'dmu 4/2/2009 00:34'!\rspreadFrom: first to: last  moveRWtoRM: bool1 moveRMtoRW: bool2\r\"RVMTester spreadFrom: 1 to: 17 moveRWtoRM: true moveRMtoRW: false\"\r<primitive: 'primitiveSpread' module: 'RVMPlugin'>\r^ self primitiveFailed! !\r!RVMTester class methodsFor: 'as yet unclassified' stamp: 'dmu 1/1/1970 00:50'!\rrandomWalk\r\"RVMTester randomWalk\"\r[\r[Sensor leftShiftDown not] whileTrue: [\r\tDelay forMilliseconds: 250.\r\tRVMTester move: false toCore: ( 0 max: (55 min: ( self getCoreHolding: false)   + 3 atRandom - 2)) ].\rTranscript show: 'killed'; cr\r] fork.\r! !\r!RVMTester class methodsFor: 'teleportation' stamp: 'ssa 11/4/2008 23:39'!\risMulticoreCoordinate: stringOrSymbol\r\t\"Answer true if my unary selector matched the special multicore object coordinate format.\r\t{rm,rw}{Pass,Hold}{coreIndex, 0-55}\"\r\t\r\t | readWrite baton coreIndex aSymbol |\r\taSymbol _ stringOrSymbol asSymbol.\r\taSymbol isUnary ifFalse:[^false].\r\taSymbol size >= 7 ifFalse:[^false].\r\treadWrite _ aSymbol first: 2.\r\t(#('rw' 'rm') includes: readWrite) ifFalse:[^false].\r\tbaton _ aSymbol copyFrom: 3 to: 6.\r\t(#('Pass' 'Hold') includes: baton) ifFalse:[^false].\r\tcoreIndex _ aSymbol allButFirst:6.\r\t(coreIndex isAllDigits and:[(coreIndex _ coreIndex asNumber) between: 0 and: 55]) ifFalse:[^false].\r\t^true\r\t! !\r!RVMTester class methodsFor: 'teleportation' stamp: 'ssa 11/16/2008 01:00'!\rteleport: anObject to: aSymbol\r\t\"move this object to this multicore object coordinate.\r\taSymbol := {in,co}{Pass,Hold}{coreIndex, 1-56}\"\r\t\r\t | readWrite baton coreIndex old new |\r\t(self isMulticoreCoordinate: aSymbol) ifFalse:[self error:'Teleport aborted; bad coordinates = ',aSymbol].\r\treadWrite _ (aSymbol first: 2) = 'rw'.\r\tbaton _ (aSymbol copyFrom: 3 to: 6) = 'Pass'.\r\tcoreIndex _ (aSymbol allButFirst:6) asNumber - 1 max: 0.\r\told _ self printPrefixFor: anObject.\r\tself move: anObject toCore: coreIndex readWritely: readWrite passTheBaton: baton.\r\tSensor leftShiftDown ifTrue:[new _ self printPrefixFor: anObject.\r\tTranscript cr;show:'Zzzoingggg!!  ',anObject printString,' vanished from ',old.\r\tTranscript cr;show:'Ggggniozzz!!  ',anObject printString,' appeared at ',new].\r\t\r\t! !\r!RVMTester class methodsFor: 'demos' stamp: 'ssa 10/10/2008 19:27'!\rcolorTrail\r\t\"RVMTester colorTrail\"\r| rect boxes centers count colors pen x y coreIndex |\rrect _ Rectangle fromUser.\rboxes _ rect subDivideBy: 8@8.\rcenters _ boxes collect:[:box| box center].\rcount _ 500.\rcolors _ Color hotColdShades:count.\rpen _ Pen new.\rpen defaultNib:6.\rpen combinationRule: Form paint.\rpen place: (centers at:32).\rx _ y _ 4.\rpen down.\r1 to:count do:[:index|pen color: (colors at: index).\r\tx _ (x + (3 atRandom - 2))min:8 max:1.\r\ty _ (y + (3 atRandom - 2))min:8 max:1.\r\tcoreIndex _ y - 1 * 8 + x.\r\tpen goto: (centers at:(coreIndex))]! !\r!RVMTester class methodsFor: 'demos' stamp: 'ssa 10/6/2008 11:20'!\rdisplayImageOnReadMostlyStripChart\r\t\"RVMTester displayImageOnReadMostlyStripChart\"\r\t\"Works on readMostlyHeap tile strip chart\"\r| f text images height width pixelOn |\rf _ Form fromDisplay:(0@0 extent: 200@200)..\r\rtext _ 'IBM' asDisplayText asParagraph asForm magnifyBy:2.\r\"logo _ GIFReadWriter formFromFileNamed: 'ibm-logo-bw.gif'.\rlogo replaceColor: Color white with: Color transparent.\rface _ GIFReadWriter formFromFileNamed: 'sam-photo-bw.gif'.\rface replaceColor: Color white with: Color transparent.\"\rimages _ OrderedCollection new.\r\"images add: logo.\rimages add: face.\"\rimages add: text.\rimages do:[:image|\rheight _ image boundingBox height.\rwidth _ image boundingBox width.\r0 to: width -1 do:[:x|\r\t0 to: height - 1 do:[:y|\r\t\tpixelOn _ (image colorAt: x@y) isTransparent.\r\t\tRVMTester move: f copy toCore: y + 3 readWritely: pixelOn passTheBaton: true.\r\t\t\t].\r\t\tRVMTester move: f toCore: 1 readWritely: true passTheBaton: true..\r\t\tRVMMonitor getSample;informListeners.\r\t\t\t\tSmalltalk garbageCollect.\r]]\r! !\r!RVMTester class methodsFor: 'demos' stamp: 'ssa 11/4/2008 23:39'!\rspockToursTheRenaissance\r\t\"RVMTester spockToursTheRenaissance\"\r\t'Spock' rwPass24 rmHold2 rmPass40 rwHold0 rwPass55\r! !\r!RVMTester class methodsFor: 'filing out ' stamp: 'ssa 10/8/2008 16:49'!\rfileOutAllRVMCategories\r\t\"RVMTester fileOutAllRVMCategories\"\r\t| cats classNames classes orderedClasses fileStream |\r\tcats := SystemOrganization categoriesMatching: 'RVM-*'.\r\tclassNames := OrderedCollection new.\r\tcats\r\t\tdo: [:cat | classNames\r\t\t\t\taddAll: (SystemOrganization listAtCategoryNamed: cat)].\r\tclasses := classNames\r\t\t\t\tcollect: [:n | Smalltalk at: n].\r\torderedClasses := ChangeSet superclassOrder: classes.\r\tfileStream := FileStream fileNamed: 'all-RVM-categories ' , Time now print24 , ' '\r\t\t\t\t\t, (Date today printFormat: #(2 1 3 $- 1 2 2 )) , '.st'.\r\torderedClasses\r\t\tdo: [:cls | cls fileOutOn: fileStream].\r\tfileStream close! !\r!RVMTester class methodsFor: 'testing for RVM' stamp: 'dmu 4/10/2009 22:44'!\rpositiveIfOnRVM\r  \"RVMTester positiveIfOnRVM\"\r  <primitive: 'primitiveCoreCount' module: 'RVMPlugin'>\r  ^ -1! !\r!RVMTileGridController methodsFor: 'menu messages' stamp: 'ssa 1/1/1970 16:22'!\rbrowseAspectsForCore: coreIndex\r\r\tself view okToDisplay:true.\r\tRVMCoreAspectTrace monitorAllCoreAspectsForCore: coreIndex! !\r!RVMTileGridController methodsFor: 'menu messages' stamp: 'ssa 1/1/1970 16:29'!\rbrowseThisAspectForAllCores: coreIndex\r\r\tself view okToDisplay:true.\r\tRVMTileStripChartView openOnAspect:  self view aspect! !\r!RVMTileGridController methodsFor: 'menu messages' stamp: 'ssa 1/1/1970 16:24'!\rbrowseThisAspectForCore: coreIndex\r\r\tself view okToDisplay:true.\r\tRVMCoreAspectTrace monitorAspects: (Array with: self view aspect) forCore: coreIndex! !\r!RVMTileGridController methodsFor: 'menu messages' stamp: 'ssa 10/4/2008 08:36'!\rchangeAspect: coreIndex\r\t| menu answer |\r\tmenu := CustomMenu new.\r\tself view sample aspects\r\t\tdo: [:aspect | menu add: aspect action: aspect].\r\tanswer := menu startUp: self view aspect withCaption: 'Select the aspect to monitor'.\rself view topView okToDisplay:true.\ranswer isNil ifTrue:[^self].\r\tself view aspect: answer.\r\tself view topView allSubViews do:[:each| each hear: nil].\r\tself view displayView! !\r!RVMTileGridController methodsFor: 'menu messages' stamp: 'ssa 1/1/1970 00:12'!\rdoMessageTallyOfDisplayView\rself view topView okToDisplay:true.\r\tMessageTally spyOn:[100 timesRepeat:[view displayView]]\r\r! !\r!RVMTileGridController methodsFor: 'menu messages' stamp: 'ssa 1/1/1970 00:12'!\rinspectDataValues: coreIndex\rself view topView okToDisplay:true.\r\tself view data inspect! !\r!RVMTileGridController methodsFor: 'menu messages' stamp: 'ssa 1/1/1970 02:00'!\rinspectView:coreIndex\r\r\tself view okToDisplay:true.\r\tself view inspect! !\r!RVMTileGridController methodsFor: 'menu messages' stamp: 'ssa 1/1/1970 00:02'!\rscalerForThisAspect: coreIndex\r\r\tself view okToDisplay:true.\r\tRVMColoredDataScalerView openOnAspect:  self view aspect! !\r!RVMTileGridController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 13:10'!\rcoreIndexAt: aPoint\r\r\t| box |\r\t1 to: self view tiles size do:[:index| box _ self view tiles at: index.\r\t\t( box containsPoint: aPoint) ifTrue:[^index]]! !\r!RVMTileGridController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 00:55'!\rredButtonActivity\r\t| delay |\r\t[\"Color showColors: self view colors. \" ^self ]value.\r\tCursor move show.  Sensor waitNoButton.  Cursor normal show.\r\t\t\tself process isNil\r\t\t\t\tifTrue: [\r\t\t\t\t\tself view showProcessOn.\r\t\t\t\t\tself\r\t\t\t\t\t\tprocess: [[((self view displayBox containsPoint: Sensor cursorPoint)\r\t\t\t\t\t\t\t\t& Sensor redButtonPressed) or:[Sensor leftShiftDown & Sensor controlKeyPressed]]\r\t\t\t\t\t\t\t\twhileFalse: [\r\t\t\t\t\t\t\t\t\tdelay := Delay forMilliseconds: 1 * (Time millisecondsToRun: [self view displayView]).\r\t\t\t\t\t\t\t\t\tdelay wait]].\r\t\t\t\t\tself process fork]\r\t\t\t\tifFalse: [self stopDisplayProcess]! !\r!RVMTileGridController methodsFor: 'controlling' stamp: 'dmu 1/1/1970 00:08'!\rstopDisplayProcess\r\tself process terminate.\r\tself view showProcessOff.\r\tself view displayView.\r\tself process: nil! !\r!RVMTileGridController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 00:11'!\ryellowButtonActivity\r\t| menu answer coreIndex |\r\t\tcoreIndex _ self coreIndexAt: Sensor cursorPoint.\r\t\tself view dontDisplayWhile:[\rSensor yellowButtonPressed \r\t\tifTrue: [menu := self yellowButtonMenu.\r\t\t\tanswer := menu startUp: nil withCaption: nil at: Sensor cursorPoint.\r\t\t\tanswer notNil ifTrue:[\r\t\t\t\tself perform: answer with: coreIndex]]]! !\r!RVMTileGridController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 01:59'!\ryellowButtonMenu\r| menu coreIndex |\rcoreIndex _ self coreIndexAt: Sensor cursorPoint.\rmenu := CustomMenu new.\r\t\t\tmenu add: 'change aspect' action: #changeAspect:.\r\t\t\tmenu add: ' stripchart all aspects for core #',coreIndex printString  action: #browseAspectsForCore:.\r\t\t\tmenu add: 'stripchart this aspect for core #',coreIndex printString action: #browseThisAspectForCore:.\r\t\t\tmenu add: 'stripchart this aspect for all cores' action: #browseThisAspectForAllCores:.\r\t\t\tmenu add: 'adjust scale for this aspect' action: #scalerForThisAspect:.\r\t\t\tmenu add: 'current data values' action: #inspectDataValues:.\r\t\t\tmenu add: 'inspect view' action: #inspectView:.\r^menu\r! !\r!RVMTileGridController methodsFor: 'accessing' stamp: 'ssa 8/15/2008 20:14'!\rprocess\r\t\"Answer the value of process\"\r\r\tprocess isNil ifTrue:[self process: nil].\r\t^process! !\r!RVMTileGridController methodsFor: 'accessing' stamp: 'ssa 8/15/2008 20:14'!\rprocess: anObject\r\t\"Set the value of process\"\r\r\tprocess := anObject! !\r!RVMTileGridController methodsFor: 'initialize-release' stamp: 'ssa 8/15/2008 20:21'!\rrelease\r\r\tself process notNil ifTrue:[self process terminate].\r\tsuper release! !\r!RVMTileStripChartController methodsFor: 'menu messages' stamp: 'ssa 1/1/1970 15:14'!\reraseStrip: coreIndex\r\r\tself view eraseStrip! !\r!RVMTileStripChartController methodsFor: 'menu messages' stamp: 'ssa 1/1/1970 01:40'!\rredraw: coreIndex\r\tself view okToDisplay: true.\r\tself view redrawOnCanvas.\r\tself view displayView! !\r!RVMTileStripChartController methodsFor: 'menu messages' stamp: 'ssa 10/3/2008 21:43'!\rrescale: coreIndex\r\tself view okToDisplay: true.\r\tself view rescale.\r\tself view displayView! !\r!RVMTileStripChartController methodsFor: 'menu messages' stamp: 'ssa 10/3/2008 21:27'!\ryellowButtonMenu\r\r\t| menu |\r\tmenu _ super yellowButtonMenu.\r\tmenu add: 'erase strip' action: #eraseStrip:.\r\tmenu add: 'redraw' action: #redraw:.\r\tmenu add: 'rescale' action: #rescale:.\r\t^menu! !\r!RVMTileStripChartController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 16:20'!\rcoreIndexAt: aPoint\r\r\t| p |\r\tp _ aPoint y - self view insetDisplayBox origin y // self view boxSize.\r\t^p max:1! !\r!RVMValueController methodsFor: 'controlling' stamp: 'ssa 9/19/2008 11:51'!\radjustCursor\r\t\"Show the appropriate arrow cursor\"\r\t(Sensor cursorPoint x - self view insetDisplayBox center x )> 0 \r\t\tifTrue:[Cursor up show]\r\t\tifFalse:[Cursor down show].\r! !\r!RVMValueController methodsFor: 'controlling' stamp: 'ssa 9/19/2008 11:50'!\rcontrolActivity\r\t\"Show the appropriate arrow cursor, then default to other controlActivity\"\r\tself adjustCursor.\r\tsuper controlActivity! !\r!RVMValueController methodsFor: 'controlling' stamp: 'ssa 9/19/2008 11:34'!\rcontrolTerminate\r\tCursor normal show.\r\tsuper controlTerminate! !\r!RVMValueController methodsFor: 'controlling' stamp: 'ssa 9/19/2008 11:49'!\rredButtonActivity\r\t| point center delta sign delay |\r\tcenter _ self view insetDisplayBox center.\r\tdelay _ Delay forMilliseconds: 100.\r\t[Sensor redButtonPressed]\r\t\twhileTrue: [self adjustCursor.\r\t\t\tpoint := Sensor cursorPoint.\r\t\t\tdelta _ (point x - center x).\r\t\t\tsign _ delta < 0 ifTrue:[-1]ifFalse:[1].\r\t\t\tdelta _ delta abs max:1.\r\t\t\tdelta >10 ifFalse:[delta _ 1].\r\t\t\tself view changeValueBy: (delta * sign).\r\t\t\tdelay wait]! !\r!RVMValueController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 00:15'!\ryellowButtonActivity\r\r\t| result |\r\tself view dontDisplayWhile:[\r\tresult _ FillInTheBlank request: 'Enter the new value' initialAnswer: self view value printString.\r\tresult notNil ifTrue:[self view value: (Compiler evaluate: result).\r\t\tself view displayView] ]! !\r!RVMValueEditorController methodsFor: 'controller access' stamp: 'ssa 10/29/2008 21:32'!\rdefaultControllerClass\r\r\t^RVMValueEditorController! !\r!RVMValueEditorController methodsFor: 'controlling' stamp: 'ssa 11/4/2008 20:47'!\rredButtonActivity\r\r\t| p wait delay |\r\tdelay _ Delay forMilliseconds: 100.\r\twait _ [Sensor leftShiftDown ifFalse:[Sensor waitNoButton] ifTrue:[delay wait]].\r\tp _ Sensor cursorPoint - self view insetDisplayBox origin.\r\t(self view lockBox containsPoint: p) ifTrue:[self view locked: self view locked not. self view displayView.  ^Sensor waitNoButton.].\r\t(self view oneBox containsPoint: p) ifTrue:[self view performOperationWith: 1.  ^wait value].\r\t(self view tenBox containsPoint: p) ifTrue:[self view performOperationWith: 10.  ^wait value].\r\t(self view hundredBox containsPoint: p) ifTrue:[self view performOperationWith: 100.  ^wait value].\r\t(self view zeroBox containsPoint: p) ifTrue:[^self view resetValueToZero].\r\tself view operations with: self view operationBoxes do:[:op :bx|\r\t\t(bx containsPoint: p) ifTrue:[self view operation: op.  ^self view displayView]]! !\r!RVMValueEditorController methodsFor: 'controlling' stamp: 'ssa 11/4/2008 19:35'!\ryellowButtonActivity\r\r\t| result |\r\tself view topView dontDisplayWhile:[\r\tresult _ FillInTheBlank request: 'Enter the new value' initialAnswer: self view value printString.\r\tresult notNil ifTrue:[self view value: (Compiler evaluate: result).\r\t\tself view displayView] ]! !\r!RVMView methodsFor: 'updating' stamp: 'ssa 1/1/1970 00:16'!\rdontDisplayWhile: aBlock\r\t\"Switch my okToDisplay flag off during this block\"\r\t\r\tself okToDisplay: false.\r\taBlock value.\r\tself okToDisplay: true.\r\tself displayView! !\r!RVMView methodsFor: 'updating' stamp: 'ssa 10/7/2008 21:55'!\rfirstFrame\r\t\"A signal from my topView that I have been reframed.\r\tDefault is to do nothing but propagate the signal.\r\tSubclasses will override to react appropriately\"\r\tself subViews do:[:each| each firstFrame]! !\r!RVMView methodsFor: 'updating' stamp: 'ssa 1/1/1970 00:12'!\rnewFrame\r\t\"A signal from my topView that I have been reframed.\r\tDefault is to do nothing but propagate the signal.\r\tSubclasses will override to react appropriately\"\r\tself subViews do:[:each| each newFrame]! !\r!RVMView methodsFor: 'updating' stamp: 'ssa 10/21/2008 11:31'!\runcache\r\t(self topView isKindOf: StandardSystemView) ifTrue:[self topView uncacheBits]! !\r!RVMView methodsFor: 'initialize-release' stamp: 'ssa 10/3/2008 23:24'!\rinitialize\r\r\tsuper initialize.\r\tself backgroundColor: Color white.\r\tRVMMonitor inform: self! !\r!RVMView methodsFor: 'initialize-release' stamp: 'ssa 1/1/1970 00:07'!\rrelease\r\r\tRVMMonitor forget: self.\r\t\tsuper release.\r! !\r!RVMView methodsFor: 'listening' stamp: 'ssa 1/1/1970 00:34'!\rhear: aSpeaker\r\t\"Some object I am listening to is speaking\"\r! !\r!RVMView methodsFor: 'demonstrating' stamp: 'ssa 11/15/2008 15:43'!\rdemo\r\t\"Add me to a system view and open me on the desktop\"\r\tself demoSized: self minimumSize! !\r!RVMView methodsFor: 'demonstrating' stamp: 'ssa 11/15/2008 15:42'!\rdemoSized: anExtent\r\t\"Add me to a system view and open me on the desktop\"\r\t| topView  |\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\ttopView minimumSize: anExtent.\r\ttopView addSubView: self .\r\ttopView label: self class name,' demo'.\r\ttopView controller open! !\r!RVMView methodsFor: 'accessing' stamp: 'ssa 11/11/2008 18:24'!\rcontroller: aController\r\r\tsuper controller: aController.\r\taController isNil ifTrue:[self okToDisplay: false]! !\r!RVMView methodsFor: 'accessing' stamp: 'ssa 11/15/2008 15:44'!\rminimumSize\r\r\t^100@100! !\r!RVMView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:15'!\rokToDisplay\r\t\"Answer the value of okToDisplay\"\r\r\tokToDisplay isNil ifTrue:[self okToDisplay: false].\r\t^ okToDisplay  ! !\r!RVMView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:05'!\rokToDisplay: aBoolean\r\t\"Set the value of okToDisplay\"\r\r\tokToDisplay _ aBoolean.\r\tself subViews do:[:v| v okToDisplay: aBoolean]! !\r!RVMView methodsFor: 'testing' stamp: 'ssa 1/1/1970 00:19'!\risRVMView\r\r\t^true! !\r!RVMButtonView methodsFor: 'displaying' stamp: 'ssa 9/19/2008 12:19'!\rdisplayAction\r\t\"Let the controller indicate action available\"\r\tself displayLabel.\r! !\r!RVMButtonView methodsFor: 'displaying' stamp: 'ssa 1/1/1970 16:03'!\rdisplayLabel\r\t| labelRect labelText labelForm |\r\tlabelText := self label asDisplayText .\r\tlabelText foregroundColor: Color black\r\t\t\tbackgroundColor: Color transparent.\r\tlabelForm := labelText asParagraph asForm.\r\tlabelForm width > self insetDisplayBox width ifTrue:[labelForm _ labelForm scaledToSize:self insetDisplayBox width@labelForm height].\r\tlabelForm height > self insetDisplayBox height ifTrue:[labelForm _ labelForm scaledToSize: labelForm width@self insetDisplayBox height].\r\tlabelRect := self insetDisplayBox.\r\tDisplay fill: self insetDisplayBox fillColor: Color white.\r\tlabelForm displayOn: Display at: labelRect center - labelForm boundingBox center clippingBox: labelRect\r\t\t\trule: Form paint fillColor: nil.\r! !\r!RVMButtonView methodsFor: 'displaying' stamp: 'ssa 1/1/1970 03:09'!\rdisplayLabelDark\r\t| labelRect labelText labelForm |\r\tlabelText := self label asDisplayText .\r\tlabelText foregroundColor: Color black\r\t\t\tbackgroundColor: Color transparent.\r\tlabelForm := labelText asParagraph asForm.\r\tlabelForm width > self insetDisplayBox width ifTrue:[labelForm _ labelForm scaledToSize:self insetDisplayBox width@labelForm height].\r\tlabelForm height > self insetDisplayBox height ifTrue:[labelForm _ labelForm scaledToSize: labelForm width@self insetDisplayBox height].\r\tlabelRect := self insetDisplayBox.\r\tDisplay fill: self insetDisplayBox fillColor: self baseColorDark.\r\tlabelForm displayOn: Display at: labelRect center - labelForm boundingBox center clippingBox: labelRect\r\t\t\trule: Form erase fillColor: nil.\r! !\r!RVMButtonView methodsFor: 'displaying' stamp: 'ssa 9/19/2008 12:22'!\rdisplayOutline\r\r\tself displayLabel.\r\tDisplay border: (self insetDisplayBox insetBy: 1)width: 1 fillColor: Color black.! !\r!RVMButtonView methodsFor: 'displaying' stamp: 'ssa 1/1/1970 03:02'!\rdisplayPressed\r\tself displayLabelDark.\r\tDisplay border: (self insetDisplayBox insetBy: 0@0) width:2 fillColor: self baseColor.\r\tDisplay border: (self insetDisplayBox insetBy: 2@2) width:2 fillColor: self baseColor  darker.\r\tDisplay border: (self insetDisplayBox insetBy: 4@4) width:2 fillColor: self baseColor darker darker.\r\tDisplay border: (self insetDisplayBox insetBy: 6@6) width:2 fillColor: self baseColor darker darker darker.\r! !\r!RVMButtonView methodsFor: 'displaying' stamp: 'ssa 3/24/2010 17:07'!\rdisplayRaisedGray\r\tself displayRaisedWhiteLabel.\r\tself displayRaisedLabel.\r\tDisplay border: (self insetDisplayBox insetBy: 0@0) widthRectangle: (1@1 corner: 0@0) rule: Form paint fillColor: self baseColor.\r\tDisplay border: (self insetDisplayBox insetBy: 0@0) widthRectangle: (0@0 corner: 1@1) rule: Form paint fillColor: self baseColor darker darker darker.\r\t\r\tDisplay border: (self insetDisplayBox insetBy: 1@1) widthRectangle: (1@1 corner: 0@0) rule: Form paint fillColor: self baseColor lighter.\r\tDisplay border: (self insetDisplayBox insetBy: 1@1) widthRectangle: (0@0 corner: 1@1) rule: Form paint fillColor: self baseColor darker  darker.\r\t\r\tDisplay border: (self insetDisplayBox insetBy: 2@2) widthRectangle: (1@1 corner: 0@0) rule: Form paint fillColor: self baseColor lighter lighter.\r\tDisplay border: (self insetDisplayBox insetBy: 2@2) widthRectangle: (0@0 corner: 1@1) rule: Form paint fillColor: self baseColor darker.\r\t\r\tDisplay border: (self insetDisplayBox insetBy: 3@3) widthRectangle: (1@1 corner: 0@0) rule: Form paint fillColor: self baseColor lighter.\r\tDisplay border: (self insetDisplayBox insetBy: 3@3) widthRectangle: (0@0 corner: 1@1) rule: Form paint fillColor: self baseColor .\r! !\r!RVMButtonView methodsFor: 'displaying' stamp: 'ssa 2/22/2010 15:34'!\rdisplayRaisedLabel\r\t| labelRect labelText labelForm |\r\tlabelText := self label asDisplayText .\r\r\tlabelText foregroundColor: Color black\r\t\t\tbackgroundColor: Color transparent.\r\tlabelForm := labelText asParagraph asForm.\r\tlabelForm width > self insetDisplayBox width ifTrue:[labelForm _ labelForm scaledToSize:self insetDisplayBox width@labelForm height].\r\tlabelForm height > self insetDisplayBox height ifTrue:[labelForm _ labelForm scaledToSize: labelForm width@self insetDisplayBox height].\r\tlabelRect := self insetDisplayBox.\r\t\"Display fill: self insetDisplayBox fillColor: self baseColor.\"\r\tlabelForm displayOn: Display at: labelRect center - labelForm boundingBox center - (0@3)clippingBox: labelRect\r\t\t\trule: Form paint fillColor: nil.\r! !\r!RVMButtonView methodsFor: 'displaying' stamp: 'ssa 2/22/2010 15:37'!\rdisplayRaisedWhiteLabel\r\t| labelRect labelText labelForm |\r\tlabelText := self label asDisplayText .\r\r\tlabelText foregroundColor: self  baseColor lighter lighter\r\t\t\tbackgroundColor: Color transparent.\r\tlabelForm := labelText asParagraph asForm.\r\tlabelForm width > self insetDisplayBox width ifTrue:[labelForm _ labelForm scaledToSize:self insetDisplayBox width@labelForm height].\r\tlabelForm height > self insetDisplayBox height ifTrue:[labelForm _ labelForm scaledToSize: labelForm width@self insetDisplayBox height].\r\tlabelRect := self insetDisplayBox.\r\tDisplay fill: self insetDisplayBox fillColor: self baseColor.\r\tlabelForm displayOn: Display at: labelRect center - labelForm boundingBox center - (0@3)+(1@1)clippingBox: labelRect\r\t\t\trule: Form paint fillColor: nil.\r! !\r!RVMButtonView methodsFor: 'displaying' stamp: 'ssa 9/19/2008 12:15'!\rdisplayView\r\tself style == #raisedGray ifTrue:[self displayRaisedGray].\r\tself style == #outline ifTrue:[self displayOutline].\r\tself style == #action ifTrue:[self displayAction].\r\t! !\r!RVMButtonView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:03'!\raction\r\t\"Answer the value of action, a block to execute when the button is released\"\r\r\taction isNil ifTrue:[self action: [self inform:'no action defined yet']].\r\t^ action! !\r!RVMButtonView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:02'!\raction: anObject\r\t\"Set the value of action\"\r\r\taction _ anObject! !\r!RVMButtonView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 02:47'!\rbaseColor\r\t^Color gray lighter lighter lighter! !\r!RVMButtonView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 03:02'!\rbaseColorDark\r\t^Color gray ! !\r!RVMButtonView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:42'!\rlabel\r\t\"Answer the value of label\"\r\r\tlabel isNil ifTrue:[self label: 'not labeled yet'].\r\t^ label! !\r!RVMButtonView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:02'!\rlabel: anObject\r\t\"Set the value of label\"\r\r\tlabel _ anObject! !\r!RVMButtonView methodsFor: 'accessing' stamp: 'ssa 9/19/2008 12:14'!\rstyle\r\t\"Answer the value of style. how I should display myself.\r\tCurrent options are #raisedGray, #outline, #action\"\r\r\tstyle isNil ifTrue:[self style: #raisedGray].\r\t^ style! !\r!RVMButtonView methodsFor: 'accessing' stamp: 'ssa 9/19/2008 12:13'!\rstyle: anObject\r\t\"Set the value of style\"\r\r\tstyle _ anObject! !\r!RVMButtonView methodsFor: 'actions' stamp: 'ssa 1/1/1970 00:10'!\rperformAction\r\r\tself action copy value! !\r!RVMButtonView methodsFor: 'controller access' stamp: 'ssa 1/1/1970 00:25'!\rdefaultControllerClass\r\r\t^RVMButtonController! !\r!RVMButtonView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:27'!\rexample\r\t\"RVMButtonView example\"\r\t| topView |\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\ttopView minimumSize: 50@25.\r\ttopView maximumSize: 200@200.\r\ttopView addSubView: (self label:'Flash' action:[Display reverse reverse]).\r\ttopView label: 'RVMButtonView test'.\r\ttopView controller open! !\r!RVMButtonView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 02:59'!\rexampleGC\r\t\"RVMButtonView exampleGC\"\r\t| topView |\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\ttopView minimumSize: 50@25.\r\ttopView maximumSize: 200@200.\r\ttopView addSubView: (self label:'GC' action:[Smalltalk garbageCollect print]).\r\ttopView label: 'RVMButtonView test'.\r\ttopView controller open! !\r!RVMButtonView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:43'!\rexampleLong\r\t\"RVMButtonView exampleLong\"\r\t| topView |\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\ttopView minimumSize: 50@25.\r\ttopView maximumSize: 200@200.\r\ttopView addSubView: (self label:'Flash the display by reversing twice' action:[Display reverse reverse]).\r\ttopView label: 'RVMButtonView test'.\r\ttopView controller open! !\r!RVMButtonView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 01:43'!\rexampleTall\r\t\"RVMButtonView exampleTall\"\r\t| topView |\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\ttopView minimumSize: 50@25.\r\ttopView maximumSize: 200@200.\r\ttopView addSubView: (self label:'\tFlash \r\tthe \r\tdisplay \r\tby \r\treversing \r\ttwice' action:[Display reverse reverse]).\r\ttopView label: 'RVMButtonView test'.\r\ttopView controller open! !\r!RVMButtonView class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:30'!\rlabel: aString action: aBlock\r\r\t| v |\r\tv _ self new.\r\tv label: aString.\r\tv action: aBlock.\r\t^v  ! !\r!RVMButtonView class methodsFor: 'instance creation' stamp: 'ssa 9/19/2008 12:21'!\rlabel: aString style: aSymbol action: aBlock\r\r\t| v |\r\tv _ self new.\r\tv label: aString.\r\tv style: aSymbol.\r\tv action: aBlock.\r\t^v  ! !\r!RVMCanvasView methodsFor: 'drawing' stamp: 'ssa 1/1/1970 00:10'!\rdrawCanvas\r\t\"This is the main drawing method. Subclasses will override to do their own drawing\"\r\tself  marker destForm: self canvas.\r\tself drawCross! !\r!RVMCanvasView methodsFor: 'drawing' stamp: 'ssa 1/1/1970 00:10'!\rdrawCross\r\t| box |\r\tbox _ self canvas boundingBox.\r\tself drawLineFrom: box topLeft to: box bottomRight color: Color blue.\r\tself drawLineFrom: box topRight to: box bottomLeft color: Color red.\r\t! !\r!RVMCanvasView methodsFor: 'drawing' stamp: 'ssa 1/1/1970 00:22'!\rdrawLineFrom: beginPoint to: endPoint color: aColor \r\t\"Draw a line on the canvas in canvas coordinates\"\r\t\r\tMarker\r\t\tcolor: aColor;\r\t\tplace: beginPoint;\r\t\tgoto: endPoint! !\r!RVMCanvasView methodsFor: 'drawing' stamp: 'ssa 1/1/1970 00:33'!\reraseCanvas\r\tself canvas fillWhite! !\r!RVMCanvasView methodsFor: 'controller access' stamp: 'ssa 1/1/1970 00:29'!\rdefaultControllerClass\r\r\t^RVMCanvasController! !\r!RVMCanvasView methodsFor: 'accessing' stamp: 'ssa 10/3/2008 23:23'!\rcanvas\r\t\"Answer the value of canvas\"\r\tcanvas isNil ifTrue:[self canvas: (ColorForm extent: self extent  - (0@2) depth: Display depth).\r\t\tself drawCanvas].\r\t^ canvas! !\r!RVMCanvasView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:02'!\rcanvas: anObject\r\t\"Set the value of canvas\"\r\r\tcanvas _ anObject! !\r!RVMCanvasView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:25'!\rdefaultOffset\r\r\t^0@0! !\r!RVMCanvasView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:05'!\rdirty\r\t\"Answer the value of dirty\"\r\r\tdirty isNil ifTrue:[self dirty: true].\r\t^ dirty! !\r!RVMCanvasView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:02'!\rdirty: anObject\r\t\"Set the value of dirty\"\r\r\tdirty _ anObject! !\r!RVMCanvasView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:32'!\rextent\r\t\"Answer the value of extent\"\r\r\textent isNil ifTrue:[self extent: self insetDisplayBox extent].\r\t^ extent! !\r!RVMCanvasView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:40'!\rextent: aPoint\r\t\"Set the value of extent\"\r\r\textent _ aPoint\r\t! !\r!RVMCanvasView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:11'!\rmarker\r\r\t^self class marker! !\r!RVMCanvasView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:25'!\roffset\r\t\"Answer the value of offset\"\r\r\toffset isNil ifTrue:[self offset: self defaultOffset].\r\t^ offset! !\r!RVMCanvasView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:31'!\roffset: aPoint\r\t\"Set the value of offset\"\r\r\toffset _ aPoint min: 0@0 max: self insetDisplayBox extent - self canvas extent! !\r!RVMCanvasView methodsFor: 'displaying' stamp: 'ssa 10/21/2008 11:31'!\rdisplayView\r\t\"Display my canvas at my offset.\r\tSubclasses should not override this method but should draw on the canvas instead\"\r\tself okToDisplay ifFalse:[^self].\r\tself uncache.\r\tself canvas displayOn: Display at: self insetDisplayBox origin + self offset clippingBox: self insetDisplayBox.\r! !\r!RVMCanvasView methodsFor: 'framing' stamp: 'ssa 1/1/1970 00:30'!\rnewFrame\r\t\"My frame has changed.  Default is to do nothing special\"! !\r!RVMCanvasView class methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:20'!\rmarker\r\t\"Answer the default form to draw with, a 1 pixel black dot.\"\r\tMarker isNil ifTrue:[Marker _ Pen new.\r\t\tMarker defaultNib:1].\r\t^Marker! !\r!RVMCanvasView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:13'!\rexample\r\t\"RVMCanvasView example\"\r\t| topView |\r\ttopView _ StandardSystemView new.\r\ttopView label:'CanvasView test'.\r\ttopView minimumSize: 200@200.\r\ttopView borderWidth:2.\r\ttopView addSubView: self new.\r\ttopView controller open! !\r!RVMCanvasView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:17'!\rexample2\r\t\"RVMCanvasView example2\"\r\t| topView view |\r\ttopView _ RVMStandardSystemView new.\r\ttopView label:'CanvasView test'.\r\ttopView minimumSize: 200@50.\r\ttopView borderWidth:2.\r\tview _ self new.\r\tview extent: 500@50.\r\ttopView addSubView: view.\r\ttopView controller open! !\r!RVMCheckBoxView methodsFor: 'updating' stamp: 'ssa 10/19/2008 00:43'!\rhear: aSpeaker\r\t\"Some object I am listening to is speaking\"\rself checked:nil.\rself displayView! !\r!RVMCheckBoxView methodsFor: 'updating' stamp: 'ssa 11/13/2008 10:44'!\rperformAction\r\t\"I've been clicked, switch state and act\"\r\tself checked ifTrue:[self performUncheckAction]ifFalse:[self performCheckAction].\r\tself checked: nil.\r\tself displayView! !\r!RVMCheckBoxView methodsFor: 'updating' stamp: 'ssa 11/13/2008 10:46'!\rperformCheckAction\r\r\tself checkAction isSymbol ifTrue:[self model perform: self checkAction] ifFalse:[self checkAction value]! !\r!RVMCheckBoxView methodsFor: 'updating' stamp: 'ssa 11/13/2008 10:46'!\rperformUncheckAction\r\r\tself uncheckAction isSymbol ifTrue:[self model perform: self uncheckAction] ifFalse:[self uncheckAction value]! !\r!RVMCheckBoxView methodsFor: 'updating' stamp: 'ssa 10/19/2008 00:56'!\rupdate: aSelector\r\r\tsuper update: aSelector.\r\tself checked: nil.\r\tself displayView! !\r!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 2/22/2010 15:39'!\rbaseColor\r\t^Color gray lighter lighter lighter! !\r!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 03:16'!\rcheckAction\r\t\"Answer the value of checkAction\"\r\r\tcheckAction isNil ifTrue:[self checkAction: [self inform:'box just checked']].\r\t^ checkAction! !\r!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 03:15'!\rcheckAction: anObject\r\t\"Set the value of checkAction\"\r\r\tcheckAction _ anObject! !\r!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 11/16/2008 00:12'!\rcheckBoxForm\r\t\"Answer the value of checkBoxForm\"\r\r\t^self checkState ifTrue:[self checkedBoxForm]ifFalse:[self uncheckedBoxForm]! !\r!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 11/13/2008 10:43'!\rcheckState\r\t\"Answer the value of checked the state of my checkbox\"\r\r\t^self checkStateAction isSymbol ifTrue:[self model perform: self checkStateAction]\r\t\tifFalse:[self checkStateAction value]! !\r!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 03:19'!\rcheckStateAction\r\t\"Answer the value of checkStateAction\"\r\r\tcheckStateAction isNil ifTrue:[self checkStateAction: [false]].\r\t^ checkStateAction! !\r!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 03:18'!\rcheckStateAction: anObject\r\t\"Set the value of checkStateAction\"\r\r\tcheckStateAction _ anObject! !\r!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 11/13/2008 10:42'!\rchecked\r\t\"Answer the value of checked the state of my checkbox\"\r\r\tchecked isNil ifTrue:[self checked: self checkState].\r\t^ checked! !\r!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 03:15'!\rchecked: anObject\r\t\"Set the value of checked\"\r\r\tchecked _ anObject! !\r!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 11/16/2008 00:09'!\rcheckedBoxForm\r\t\"Answer the value of checkedBoxForm\"\r\r\tcheckedBoxForm isNil ifTrue:[self checkedBoxForm: self buildCheckedBoxForm].\r\t^ checkedBoxForm! !\r!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 11/16/2008 00:09'!\rcheckedBoxForm: anObject\r\t\"Set the value of checkedBoxForm\"\r\r\tcheckedBoxForm _ anObject! !\r!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 03:17'!\rlabel\r\t\"Answer the value of label\"\r\r\tlabel isNil ifTrue:[self label: 'no label yet'].\r\t^ label! !\r!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 03:15'!\rlabel: anObject\r\t\"Set the value of label\"\r\r\tlabel _ anObject! !\r!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 11/16/2008 00:03'!\rlabelForm\r\t\"Answer the value of labelForm\"\r\r\tlabelForm isNil ifTrue:[self labelForm: self buildLabelForm].\r\t^ labelForm! !\r!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 11/16/2008 00:03'!\rlabelForm: anObject\r\t\"Set the value of labelForm\"\r\r\tlabelForm _ anObject! !\r!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 03:17'!\runcheckAction\r\t\"Answer the value of uncheckAction\"\r\r\tuncheckAction isNil ifTrue:[self uncheckAction: [self inform:'box just UNchecked']].\r\t^ uncheckAction! !\r!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 03:15'!\runcheckAction: anObject\r\t\"Set the value of uncheckAction\"\r\r\tuncheckAction _ anObject! !\r!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 11/16/2008 00:10'!\runcheckedBoxForm\r\t\"Answer the value of uncheckedBoxForm\"\r\r\tuncheckedBoxForm isNil ifTrue:[self uncheckedBoxForm: self buildUncheckedBoxForm].\r\t^ uncheckedBoxForm! !\r!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 11/16/2008 00:09'!\runcheckedBoxForm: anObject\r\t\"Set the value of uncheckedBoxForm\"\r\r\tuncheckedBoxForm _ anObject! !\r!RVMCheckBoxView methodsFor: 'displaying' stamp: 'ssa 2/23/2010 15:40'!\rbuildCheckedBoxForm\r\t\"Answer the check(ed) box \"\r\t\r\t| box marker |\r\tbox _ Form extent: 15@15 depth: Display depth .\r\tbox fillColor: self baseColor lighter lighter.\r\tbox border: box boundingBox width:1  fillColor: Color black.\r\tmarker _ Form extent:2@2.\r\tmarker fillColor: Color black.\r\tbox drawLine:  marker\r\t\tfrom: box boundingBox origin\r\t\tto: box boundingBox corner\r\t\tclippingBox: box boundingBox\r\t\trule: Form over\r\t\tfillColor: nil.\r\tbox drawLine:  marker\r\t\tfrom: box boundingBox topRight - (2@0)\r\t\tto: box boundingBox bottomLeft - (2@0)\r\t\tclippingBox: box  boundingBox \r\t\trule: Form over\r\t\tfillColor: nil.\r\t\t\r\t^box! !\r!RVMCheckBoxView methodsFor: 'displaying' stamp: 'ssa 11/16/2008 00:01'!\rbuildLabelForm\r\t\"Answer the label form\"\r\t\r\t|  labelText  |\r\tlabelText := ('  ',self label ) asDisplayText .\r\tlabelText foregroundColor: Color black\r\t\t\tbackgroundColor: Color transparent.\r\t^labelText \"asParagraph asForm\"\r! !\r!RVMCheckBoxView methodsFor: 'displaying' stamp: 'ssa 2/23/2010 15:40'!\rbuildUncheckedBoxForm\r\t\"Answer the uncheck(ed) box\"\r\t\r\t| box |\r\tbox _ Form extent: 15@15 depth: Display depth .\r\tbox fillColor:self baseColor lighter lighter.\r\tbox border: box boundingBox width:1  fillColor: Color black.\r\r\t^box! !\r!RVMCheckBoxView methodsFor: 'displaying' stamp: 'ssa 2/23/2010 15:34'!\rbuildUnderLabelForm\r\t\"Answer the under label form\"\r\t\r\t|  labelText  |\r\tlabelText := ('  ',self label ) asDisplayText .\r\tlabelText foregroundColor: self baseColor lighter lighter\r\t\t\tbackgroundColor: Color transparent.\r\t^labelText \"asParagraph asForm\"\r! !\r!RVMCheckBoxView methodsFor: 'displaying' stamp: 'ssa 2/23/2010 15:39'!\rdisplayContents\r\r\t|   box theLabelForm theCheckBoxForm underLabelForm |\r\ttheCheckBoxForm _ self checkBoxForm.\r\ttheLabelForm _ self buildLabelForm.\r\tunderLabelForm _ self buildUnderLabelForm.\r\tbox _ 0@0 extent: theCheckBoxForm width + theLabelForm width @ (theCheckBoxForm height max: theLabelForm height).\r\tbox _ box align: box leftCenter with: self insetDisplayBox leftCenter + (4@1).\r\tDisplay fill: self insetDisplayBox fillColor: self baseColor.\r\ttheCheckBoxForm displayOn: Display at: box  origin clippingBox: self insetDisplayBox  rule: Form over fillColor:nil.\r\tunderLabelForm displayOn: Display at: box origin + (theCheckBoxForm width@-2)+(1@1) clippingBox: self insetDisplayBox rule: Form over fillColor:nil.\r\ttheLabelForm displayOn: Display at: box origin + (theCheckBoxForm width@-2) clippingBox: self insetDisplayBox rule: Form over fillColor:nil.\r\t! !\r!RVMCheckBoxView methodsFor: 'displaying' stamp: 'ssa 1/1/1970 04:10'!\rdisplayPressed\r\r\tself displayContents.\r\tDisplay border:( self  insetDisplayBox insetBy: 2@2) width: 2 fillColor: Color gray! !\r!RVMCheckBoxView methodsFor: 'displaying' stamp: 'ssa 11/15/2008 15:49'!\rdisplayView\r\tself okToDisplay ifFalse:[^self].\r\tself uncache.\r\tself displayContents! !\r!RVMCheckBoxView methodsFor: 'controller access' stamp: 'ssa 1/1/1970 03:21'!\rdefaultControllerClass\r\r\t^RVMCheckBoxController! !\r!RVMCheckBoxOnlyView methodsFor: 'displaying' stamp: 'ssa 5/4/2010 15:36'!\rcheckBoxForm\r\t\"Answer the check(ed) box based on the current state \"\r\t\r\t^self checkBoxFormX! !\r!RVMCheckBoxOnlyView methodsFor: 'displaying' stamp: 'ssa 5/4/2010 15:36'!\rcheckBoxFormNotCircle\r\t\"Answer the check(ed) box based on the current state \"\r\t\r\t^self checked ifTrue:[self clearCircle]ifFalse:[self notSign]! !\r!RVMCheckBoxOnlyView methodsFor: 'displaying' stamp: 'ssa 1/1/1970 01:05'!\rcheckBoxFormOnOff\r\t\"Answer the check(ed) box based on the current state \"\r\t\r\t| msg msgText |\r\tmsg _ self checked ifTrue:[\r\t\t'O\rN'] ifFalse:['O\rF\rF'].\r\tmsgText _ msg asDisplayText.\r\t^msgText \r\t\t\t asParagraph asForm scaledToSize:(self insetDisplayBox extent min: msgText boundingBox extent).\r! !\r!RVMCheckBoxOnlyView methodsFor: 'displaying' stamp: 'ssa 1/1/1970 00:56'!\rcheckBoxFormX\r\t\"Answer the check(ed) box based on the current state \"\r\t\r\t| box marker |\r\r\tbox _ Form extent: self insetDisplayBox width asPoint depth: Display depth.\r\t\"box border: box boundingBox width:2  fillColor: Color gray.\"\r\tself checked ifFalse:[^box].\r\t\"box fill: (box boundingBox insetBy: 2) fillColor: Color gray lighter lighter.\"\r\tmarker _ Form extent:2@2 depth: Display depth.\r\tmarker fillColor: Color gray.\r\tbox drawLine:  marker\r\t\tfrom: box boundingBox origin\r\t\tto: box boundingBox corner\r\t\tclippingBox: box boundingBox\r\t\trule: Form over\r\t\tfillColor: nil.\r\tbox drawLine:  marker\r\t\tfrom: box boundingBox topRight - (2@0)\r\t\tto: box boundingBox bottomLeft - (2@0)\r\t\tclippingBox: box  boundingBox \r\t\trule: Form over\r\t\tfillColor: nil.\r\t\t\r\t^box! !\r!RVMCheckBoxOnlyView methodsFor: 'displaying' stamp: 'ssa 1/1/1970 00:12'!\rcheckedCircle\r^Form\r\textent: 10@10\r\tdepth: 1\r\tfromArray: #( 1056964608 1635778560 3250585600 2185232384 2185232384 2487222272 2285895680 3368026112 1635778560 1056964608)\r\toffset: 0@0! !\r!RVMCheckBoxOnlyView methodsFor: 'displaying' stamp: 'ssa 1/1/1970 00:12'!\rclearCircle\r\t^ Form\r\t\textent: 10 @ 10\r\t\tdepth: 1\r\t\tfromArray: #(1056964608 1635778560 3233808384 2151677952 2151677952 2151677952 2151677952 3233808384 1635778560 1056964608 )\r\t\toffset: 0 @0! !\r!RVMCheckBoxOnlyView methodsFor: 'displaying' stamp: 'ssa 11/11/2008 22:42'!\rdisplayContents\r\r\t| checkBoxForm box |\r\tself okToDisplay ifFalse:[^self].\r\tcheckBoxForm _ self checkBoxForm.\r\tcheckBoxForm _ checkBoxForm scaledToSize:(self insetDisplayBox extent min: checkBoxForm boundingBox extent).\r\tbox _ checkBoxForm boundingBox.\r\tbox _ box align: box center with: self insetDisplayBox center.\r\tDisplay fill: self insetDisplayBox fillColor: Color white.\r\tcheckBoxForm displayOn: Display at: box  origin ! !\r!RVMCheckBoxOnlyView methodsFor: 'displaying' stamp: 'ssa 1/1/1970 00:12'!\rnotSign\r^Form\r\textent: 10@10\r\tdepth: 1\r\tfromArray: #( 1056964608 1635778560 3250585600 2202009600 2252341248 2353004544 2554331136 4039114752 1635778560 1056964608)\r\toffset: 0@0! !\r!RVMCheckBoxView class methodsFor: 'examples' stamp: 'ssa 11/13/2008 10:05'!\rexample\r\t\"RVMCheckBoxView example\"\r\t\"Note we are using this class as a test model for this method.  See examplePoint for a more normal usage\"\r\t| topView |\r\ttopView := RVMStandardSystemView new.\r\tself testState: true.\r\ttopView borderWidth:1.\r\ttopView minimumSize: 100@25.\r\ttopView maximumSize: 200@200.\r\ttopView addSubView: (self on: self label: 'test' checkState: [self testState] whenChecked: [self testState: true] whenUnchecked: [self testState: false]).\r\ttopView label: 'RVMCheckBoxView test'.\r\ttopView controller open! !\r!RVMCheckBoxView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 05:23'!\rexamplePoint\r\t\"RVMCheckBoxView examplePoint\"\r\t| topView model |\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\ttopView minimumSize: 100@25.\r\ttopView maximumSize: 200@200.\r\tmodel _ 0@0.\r\ttopView addSubView: (self on: model label: 'test' checkState: [model x = 1] whenChecked: [model x: 1] whenUnchecked: [model x:0]).\r\ttopView label: 'RVMCheckBoxView test'.\r\ttopView controller open! !\r!RVMCheckBoxView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 05:24'!\rexampleTwin\r\t\"RVMCheckBoxView exampleTwin\"\r\t\"Note we are using this class as a test model for this method.  See examplePoint for a more normal usage\"\r\t| topView v |\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\ttopView minimumSize: 100@50.\r\ttopView maximumSize: 200@200.\r\ttopView addSubView: (v _ self on: self label: 'test' checkState: [self testState] whenChecked: [self testState: true] whenUnchecked: [self testState: false]).\r\ttopView addSubView: (self on: self label: 'test' checkState: [self testState] whenChecked: [self testState: true] whenUnchecked: [self testState: false]) below: v.\r\ttopView label: 'RVMCheckBoxView test'.\r\ttopView controller open! !\r!RVMCheckBoxView class methodsFor: 'instance creation' stamp: 'ssa 5/12/2010 10:22'!\ron: aModel label: aString checkState: getterBlock whenChecked: checkedBlock whenUnchecked: uncheckedBlock\r\r\t^self on: aModel label: aString checkState: getterBlock whenChecked: checkedBlock whenUnchecked: uncheckedBlock monitor: false! !\r!RVMCheckBoxView class methodsFor: 'instance creation' stamp: 'ssa 5/12/2010 10:21'!\ron: aModel label: aString checkState: getterBlock whenChecked: checkedBlock whenUnchecked: uncheckedBlock monitor: updateFromRVMMonitor\r\r\t| v |\r\tv _ self new.\r\tv model: aModel.\r\tv label: aString.\r\tv checkStateAction: getterBlock.\r\tv checkAction: checkedBlock.\r\tv uncheckAction: uncheckedBlock.\r\tupdateFromRVMMonitor ifTrue:[RVMMonitor inform: v].\r\t^v! !\r!RVMCheckBoxView class methodsFor: 'testing' stamp: 'ssa 1/1/1970 04:22'!\rtestState\r\r\tTestState isNil ifTrue:[TestState _ true].\r\t^TestState! !\r!RVMCheckBoxView class methodsFor: 'testing' stamp: 'ssa 1/1/1970 04:25'!\rtestState: aValue\r\r\tTestState _ aValue.\r\tself changed:#testState! !\r!RVMColorButtonView methodsFor: 'controller access' stamp: 'ssa 9/13/2008 15:58'!\rdefaultControllerClass\r\r\t^RVMColorButtonController! !\r!RVMColorButtonView methodsFor: 'displaying' stamp: 'ssa 10/21/2008 11:31'!\rdisplayView\r\tself uncache.\r\tDisplay fill: self insetDisplayBox fillColor: self color.\r\t\"Display border: (self insetDisplayBox insetBy: 1)width: 1 fillColor: self color negated.\"! !\r!RVMColorButtonView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 21:29'!\rcolor\r\t\"Answer the value of color\"\r\r\tcolor isNil ifTrue:[color_(self colorSetter isSymbol\r\t\t\t\t\t\tifTrue:[model perform: self colorGetter]\r\t\t\t\t\t\tifFalse:[self colorGetter value])].\r\t^ color! !\r!RVMColorButtonView methodsFor: 'accessing' stamp: 'ssa 9/17/2008 14:05'!\rcolor: anObject\r\t\"Set the value of color\"\r\r\tcolor _ anObject.\r\tself colorSetter isSymbol\r\t\tifTrue:[model perform: self colorSetter with: anObject]\r\t\tifFalse:[self colorSetter value: anObject]! !\r!RVMColorButtonView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 21:21'!\rcolorGetter\r\t\"Answer the value of colorGetter\"\r\r\tcolorGetter isNil ifTrue:[self colorGetter: #color].\r\t^ colorGetter! !\r!RVMColorButtonView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 21:20'!\rcolorGetter: anObject\r\t\"Set the value of colorGetter\"\r\r\tcolorGetter _ anObject! !\r!RVMColorButtonView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 21:21'!\rcolorSetter\r\t\"Answer the value of colorSetter\"\r\r\tcolorSetter isNil ifTrue:[self colorSetter: #color:].\r\t^ colorSetter! !\r!RVMColorButtonView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 21:20'!\rcolorSetter: anObject\r\t\"Set the value of colorSetter\"\r\r\tcolorSetter _ anObject! !\r!RVMColorButtonView class methodsFor: 'examples' stamp: 'ssa 9/13/2008 22:03'!\rexample\r\t\"RVMColorButtonView example\"\r\t| topView |\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\ttopView minimumSize: 50@50.\r\ttopView maximumSize: 100@100.\r\ttopView addSubView: self exampleInstance.\r\ttopView label: 'ColorButton'.\r\ttopView controller open! !\r!RVMColorButtonView class methodsFor: 'examples' stamp: 'ssa 9/17/2008 13:58'!\rexampleInstance\r\r\t^self on: nil colorGetter:[Color random] colorSetter:[:color| color print]! !\r!RVMColorButtonView class methodsFor: 'instance creation' stamp: 'ssa 9/17/2008 13:57'!\ron: aModel colorGetter: getterSelector colorSetter: setterSelector\r\r\t| view |\r\tview _ self new.\r\tview model: aModel.\r\tview colorGetter: getterSelector.\r\tview colorSetter: setterSelector.\r\t^view! !\r!RVMColorScaleView methodsFor: 'controller access' stamp: 'ssa 11/4/2008 14:28'!\rdefaultControllerClass\r\r\t^RVMColorScaleController! !\r!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 11/4/2008 14:26'!\radjustScaleBox\r\t\"Answer the value of adjustScaleBox\"\r\r\tadjustScaleBox isNil ifTrue:[self adjustScaleBox: self insetDisplayBox].\r\t^ adjustScaleBox! !\r!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 11/4/2008 14:25'!\radjustScaleBox: anObject\r\t\"Set the value of adjustScaleBox\"\r\r\tadjustScaleBox _ anObject! !\r!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 10/1/2008 07:42'!\raspect\r\t^self aspectSource value! !\r!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 10/9/2008 11:42'!\raspectLabel\r\t\"Answer the value of aspectLabel\"\r\r\taspectLabel isNil ifTrue:[self aspectLabel: (Form extent: 1@1)].\r\t^ aspectLabel! !\r!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 10/3/2008 19:13'!\raspectLabel: anObject\r\t\"Set the value of aspectLabel\"\r\r\taspectLabel _ anObject! !\r!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 10/1/2008 07:42'!\raspectSource\r\t\"Answer the value of aspectSource\"\r\r\taspectSource isNil ifTrue:[self aspectSource: [#bytesUseds]].\r\t^ aspectSource! !\r!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 10/1/2008 07:41'!\raspectSource: anObject\r\t\"Set the value of aspectSource\"\r\r\taspectSource _ anObject! !\r!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 10/1/2008 06:26'!\rcolors\r\t^self colorsSource value! !\r!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 10/1/2008 06:25'!\rcolorsSource\r\t\"Answer the value of colorsSource\"\r\r\tcolorsSource isNil ifTrue:[self colorsSource: [Color hotColdShades: 25]].\r\t^ colorsSource! !\r!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 10/1/2008 06:25'!\rcolorsSource: anObject\r\t\"Set the value of colorsSource\"\r\r\tcolorsSource _ anObject! !\r!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:02'!\rhorizontal\r\tself orientation:#horizontal! !\r!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 10/1/2008 08:27'!\rorientation\r\t\"Answer the value of orientation\"\r\r\torientation isNil ifTrue:[self orientation: #vertical].\r\t^ orientation! !\r!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 10/1/2008 06:30'!\rorientation: anObject\r\t\"Set the value of orientation\"\r\r\torientation _ anObject! !\r!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 10/1/2008 06:20'!\rscaler\r\t^self scalerSource value! !\r!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 10/1/2008 06:19'!\rscalerSource\r\t\"Answer the value of scalerSource\"\r\r\tscalerSource isNil ifTrue:[self scalerSource: [RVMDataScaler exampleInstance]].\r\t^ scalerSource! !\r!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 10/1/2008 06:19'!\rscalerSource: anObject\r\t\"Set the value of scalerSource\"\r\r\tscalerSource _ anObject! !\r!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 11/4/2008 20:11'!\rusesScaler\r\t\"Answer the value of usesScaler\"\r\r\tusesScaler isNil ifTrue:[self usesScaler: false].\r\t^ usesScaler! !\r!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 11/4/2008 20:11'!\rusesScaler: anObject\r\t\"Set the value of usesScaler\"\r\r\tusesScaler _ anObject! !\r!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:02'!\rvertical\r\tself orientation:#vertical! !\r!RVMColorScaleView methodsFor: 'listening' stamp: 'ssa 1/1/1970 00:55'!\rhear: something\r\tself drawFastCanvas.\r\tself displayView! !\r!RVMColorScaleView methodsFor: 'drawing' stamp: 'ssa 11/4/2008 13:44'!\radjustScaleIcon\r^((ColorForm\r\textent: 16@31\r\tdepth: 8\r\tfromArray: #( 0 0 0 0 0 0 169614364 622594560 0 0 1694498815 4294913536 0 0 1845490943 4294915840 0 0 0 3506384384 0 0 0 3506386688 73 1677721600 0 3657379328 163 3642490880 0 3506386688 9716 4287692800 172 4110364160 46591 4294913536 208 4110366464 4259839 4294936576 0 3506384384 8973264 4106150400 0 3657381632 6558618 3942664503 0 3506384384 154 3942645760 0 3657381632 154 3942645760 25700 3808374272 154 3942645760 60415 4294915840 154 3942645760 18761 3808374272 154 3942645760 0 3506386688 2424986 3942648357 0 3657379328 11304867 3947480869 0 3506386688 7798783 4294948096 0 3506384384 1300991 4294925056 217 4294915840 25855 4291821568 145 3959369216 199 4098424832 0 3657381632 118 2432696320 0 3506384384 28 620756992 0 3506386688 0 0 0 3657379328 0 0 1541003737 4110366464 0 0 1694498815 4294913536 0 0 321795886 1227753984 0 0 0 0)\r\toffset: 0@0)\r\tcolorsFromArray: #(#(1.0 1.0 1.0) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0)  ))! !\r!RVMColorScaleView methodsFor: 'drawing' stamp: 'ssa 11/4/2008 14:14'!\radjustScaleIconHorizontal\r^((ColorForm\r\textent: 31@16\r\tdepth: 8\r\tfromArray: #( 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967040 4280755235 606282787 606282787 606282787 606282787 606282787 606282787 606600960 4280615169 16843009 16843009 16843009 16843009 16843009 16843009 19201792 4279173377 320014867 269488906 319427073 303237651 318837002 320014864 17760000 4280615169 4294967295 387186687 4294909697 251658239 4278852095 4294967050 19201792 4280615184 4294967295 4294967295 4294909713 251658239 4294967295 4294967050 19136256 4280615169 4294967295 4294967295 4294967295 4294967295 4294967295 4294967050 19201792 4280753933 4294967295 4294967295 4294967295 4294967295 4294967295 4294967072 522649344 4294967295 4294967295 4294967295 603979775 4294905615 4294967295 4294967295 4294967040 4294967295 4294967295 4280556050 251658239 4294911764 371261439 4294967295 4294967040 4294967295 4294967077 419496203 4294967295 4294967054 16847630 4294967295 4294967040 4294967295 4294909706 16843024 286331153 286331153 16843024 420478975 4294967040 4294967295 4294905368 268501267 202116108 202116120 16843028 505806847 4294967040 4294967295 4294967295 253100305 654311423 4294967043 17440767 4294967295 4294967040 4294967295 4294967295 4294910490 536870911 4294905623 505872383 4294967295 4294967040 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967040)\r\toffset: 0@0)\r\tcolorsFromArray: #(#(1.0 1.0 1.0) #(0.0 0.0 0.0) #(1.0 1.0 1.0) #(0.5 0.5 0.5) #(1.0 0.0 0.0) #(0.0 1.0 0.0) #(0.0 0.0 1.0) #(0.0 1.0 1.0) #(1.0 1.0 0.0) #(1.0 0.0 1.0) #(0.125 0.125 0.125) #(0.25 0.25 0.25) #(0.375 0.375 0.375) #(0.625 0.625 0.625) #(0.75 0.75 0.75) #(0.875 0.875 0.875) #(0.031 0.031 0.031) #(0.063 0.063 0.063) #(0.094 0.094 0.094) #(0.156 0.156 0.156) #(0.188 0.188 0.188) #(0.219 0.219 0.219) #(0.282 0.282 0.282) #(0.313 0.313 0.313) #(0.344 0.344 0.344) #(0.407 0.407 0.407) #(0.438 0.438 0.438) #(0.469 0.469 0.469) #(0.531 0.531 0.531) #(0.562 0.562 0.562) #(0.593 0.593 0.593) #(0.656 0.656 0.656) #(0.687 0.687 0.687) #(0.718 0.718 0.718) #(0.781 0.781 0.781) #(0.812 0.812 0.812) #(0.844 0.844 0.844) #(0.906 0.906 0.906) #(0.937 0.937 0.937) #(0.969 0.969 0.969) #(0.0 0.0 0.0) #(0.0 0.199 0.0) #(0.0 0.4 0.0) #(0.0 0.599 0.0) #(0.0 0.8 0.0) #(0.0 1.0 0.0) #(0.0 0.0 0.199) #(0.0 0.199 0.199) #(0.0 0.4 0.199) #(0.0 0.599 0.199) #(0.0 0.8 0.199) #(0.0 1.0 0.199) #(0.0 0.0 0.4) #(0.0 0.199 0.4) #(0.0 0.4 0.4) #(0.0 0.599 0.4) #(0.0 0.8 0.4) #(0.0 1.0 0.4) #(0.0 0.0 0.599) #(0.0 0.199 0.599) #(0.0 0.4 0.599) #(0.0 0.599 0.599) #(0.0 0.8 0.599) #(0.0 1.0 0.599) #(0.0 0.0 0.8) #(0.0 0.199 0.8) #(0.0 0.4 0.8) #(0.0 0.599 0.8) #(0.0 0.8 0.8) #(0.0 1.0 0.8) #(0.0 0.0 1.0) #(0.0 0.199 1.0) #(0.0 0.4 1.0) #(0.0 0.599 1.0) #(0.0 0.8 1.0) #(0.0 1.0 1.0) #(0.199 0.0 0.0) #(0.199 0.199 0.0) #(0.199 0.4 0.0) #(0.199 0.599 0.0) #(0.199 0.8 0.0) #(0.199 1.0 0.0) #(0.199 0.0 0.199) #(0.199 0.199 0.199) #(0.199 0.4 0.199) #(0.199 0.599 0.199) #(0.199 0.8 0.199) #(0.199 1.0 0.199) #(0.199 0.0 0.4) #(0.199 0.199 0.4) #(0.199 0.4 0.4) #(0.199 0.599 0.4) #(0.199 0.8 0.4) #(0.199 1.0 0.4) #(0.199 0.0 0.599) #(0.199 0.199 0.599) #(0.199 0.4 0.599) #(0.199 0.599 0.599) #(0.199 0.8 0.599) #(0.199 1.0 0.599) #(0.199 0.0 0.8) #(0.199 0.199 0.8) #(0.199 0.4 0.8) #(0.199 0.599 0.8) #(0.199 0.8 0.8) #(0.199 1.0 0.8) #(0.199 0.0 1.0) #(0.199 0.199 1.0) #(0.199 0.4 1.0) #(0.199 0.599 1.0) #(0.199 0.8 1.0) #(0.199 1.0 1.0) #(0.4 0.0 0.0) #(0.4 0.199 0.0) #(0.4 0.4 0.0) #(0.4 0.599 0.0) #(0.4 0.8 0.0) #(0.4 1.0 0.0) #(0.4 0.0 0.199) #(0.4 0.199 0.199) #(0.4 0.4 0.199) #(0.4 0.599 0.199) #(0.4 0.8 0.199) #(0.4 1.0 0.199) #(0.4 0.0 0.4) #(0.4 0.199 0.4) #(0.4 0.4 0.4) #(0.4 0.599 0.4) #(0.4 0.8 0.4) #(0.4 1.0 0.4) #(0.4 0.0 0.599) #(0.4 0.199 0.599) #(0.4 0.4 0.599) #(0.4 0.599 0.599) #(0.4 0.8 0.599) #(0.4 1.0 0.599) #(0.4 0.0 0.8) #(0.4 0.199 0.8) #(0.4 0.4 0.8) #(0.4 0.599 0.8) #(0.4 0.8 0.8) #(0.4 1.0 0.8) #(0.4 0.0 1.0) #(0.4 0.199 1.0) #(0.4 0.4 1.0) #(0.4 0.599 1.0) #(0.4 0.8 1.0) #(0.4 1.0 1.0) #(0.599 0.0 0.0) #(0.599 0.199 0.0) #(0.599 0.4 0.0) #(0.599 0.599 0.0) #(0.599 0.8 0.0) #(0.599 1.0 0.0) #(0.599 0.0 0.199) #(0.599 0.199 0.199) #(0.599 0.4 0.199) #(0.599 0.599 0.199) #(0.599 0.8 0.199) #(0.599 1.0 0.199) #(0.599 0.0 0.4) #(0.599 0.199 0.4) #(0.599 0.4 0.4) #(0.599 0.599 0.4) #(0.599 0.8 0.4) #(0.599 1.0 0.4) #(0.599 0.0 0.599) #(0.599 0.199 0.599) #(0.599 0.4 0.599) #(0.599 0.599 0.599) #(0.599 0.8 0.599) #(0.599 1.0 0.599) #(0.599 0.0 0.8) #(0.599 0.199 0.8) #(0.599 0.4 0.8) #(0.599 0.599 0.8) #(0.599 0.8 0.8) #(0.599 1.0 0.8) #(0.599 0.0 1.0) #(0.599 0.199 1.0) #(0.599 0.4 1.0) #(0.599 0.599 1.0) #(0.599 0.8 1.0) #(0.599 1.0 1.0) #(0.8 0.0 0.0) #(0.8 0.199 0.0) #(0.8 0.4 0.0) #(0.8 0.599 0.0) #(0.8 0.8 0.0) #(0.8 1.0 0.0) #(0.8 0.0 0.199) #(0.8 0.199 0.199) #(0.8 0.4 0.199) #(0.8 0.599 0.199) #(0.8 0.8 0.199) #(0.8 1.0 0.199) #(0.8 0.0 0.4) #(0.8 0.199 0.4) #(0.8 0.4 0.4) #(0.8 0.599 0.4) #(0.8 0.8 0.4) #(0.8 1.0 0.4) #(0.8 0.0 0.599) #(0.8 0.199 0.599) #(0.8 0.4 0.599) #(0.8 0.599 0.599) #(0.8 0.8 0.599) #(0.8 1.0 0.599) #(0.8 0.0 0.8) #(0.8 0.199 0.8) #(0.8 0.4 0.8) #(0.8 0.599 0.8) #(0.8 0.8 0.8) #(0.8 1.0 0.8) #(0.8 0.0 1.0) #(0.8 0.199 1.0) #(0.8 0.4 1.0) #(0.8 0.599 1.0) #(0.8 0.8 1.0) #(0.8 1.0 1.0) #(1.0 0.0 0.0) #(1.0 0.199 0.0) #(1.0 0.4 0.0) #(1.0 0.599 0.0) #(1.0 0.8 0.0) #(1.0 1.0 0.0) #(1.0 0.0 0.199) #(1.0 0.199 0.199) #(1.0 0.4 0.199) #(1.0 0.599 0.199) #(1.0 0.8 0.199) #(1.0 1.0 0.199) #(1.0 0.0 0.4) #(1.0 0.199 0.4) #(1.0 0.4 0.4) #(1.0 0.599 0.4) #(1.0 0.8 0.4) #(1.0 1.0 0.4) #(1.0 0.0 0.599) #(1.0 0.199 0.599) #(1.0 0.4 0.599) #(1.0 0.599 0.599) #(1.0 0.8 0.599) #(1.0 1.0 0.599) #(1.0 0.0 0.8) #(1.0 0.199 0.8) #(1.0 0.4 0.8) #(1.0 0.599 0.8) #(1.0 0.8 0.8) #(1.0 1.0 0.8) #(1.0 0.0 1.0) #(1.0 0.199 1.0) #(1.0 0.4 1.0) #(1.0 0.599 1.0) #(1.0 0.8 1.0) #(1.0 1.0 1.0)  ))! !\r!RVMColorScaleView methodsFor: 'drawing' stamp: 'ssa 1/1/1970 00:04'!\rdrawCanvas\r\tself canvas fillWhite.\r\tself orientation = #vertical\r\t\tifTrue:[self drawVertical]\r\t\tifFalse:[self drawHorizontal]! !\r!RVMColorScaleView methodsFor: 'drawing' stamp: 'ssa 1/1/1970 01:14'!\rdrawColorBarHorizontalIn: aRectangle\r\t| w r |\r\tw _ aRectangle width  / self colors size.\r\tr _ aRectangle origin extent: w@aRectangle height.\r\tself colors do: [:c |\r\t\tself canvas fill: r rounded fillColor: c.\r\t\tr _ r translateBy: w@0].\r! !\r!RVMColorScaleView methodsFor: 'drawing' stamp: 'ssa 1/1/1970 00:07'!\rdrawColorBarVerticalIn: aRectangle\r\t| h r |\r\th _ aRectangle height / self colors size.\r\tr _ aRectangle origin extent: aRectangle width@h.\r\tself colors do: [:c |\r\t\tself canvas fill: r rounded fillColor: c.\r\t\tr _ r translateBy: 0@h].\r! !\r!RVMColorScaleView methodsFor: 'drawing' stamp: 'ssa 1/1/1970 00:51'!\rdrawFastCanvas\r\tself orientation = #vertical\r\t\tifTrue:[self drawFastVertical]\r\t\tifFalse:[self drawFastHorizontal]! !\r!RVMColorScaleView methodsFor: 'drawing' stamp: 'ssa 11/4/2008 20:12'!\rdrawFastHorizontal\r\t\"Display in horizontal style, text labels only for speed\"\r\t|  maxLabel minLabel midLabel box ticLength margin  bigBox leftX midX adjustIcon loc |\r\tself aspectLabel fillWhite displayOn: self canvas.\r\tself aspectLabel:self aspect asDisplayText.\r\tmaxLabel _ self scaler max printShowingMax3Digits asDisplayText.\r\tminLabel _ self scaler min printShowingMax3Digits asDisplayText.\r\tmidLabel _ (self scaler range / 2 + self scaler min) printShowingMax3Digits asDisplayText.\r\tmaxLabel foregroundColor: Color black backgroundColor: Color transparent.\r\tmidLabel foregroundColor: Color black backgroundColor: Color transparent.\r\tminLabel foregroundColor: Color black backgroundColor: Color transparent.\r\tbigBox _ self canvas boundingBox.\r\tbox _ bigBox origin+ (0@11) corner: bigBox corner.\r\tticLength _ 4.\r\tmargin _ 2.\r\tleftX _ box topLeft x + 2.\r\tmidX _ box center x.\r\tself aspectLabel align: self aspectLabel boundingBox bottomCenter with: box bottomCenter.\r\tself aspectLabel displayOn: self canvas.\r\tmaxLabel align: maxLabel boundingBox topRight with: box topRight + (-2@ticLength+margin).\r\tmaxLabel displayOn: self canvas.\r\tmidLabel align: midLabel boundingBox topCenter with: box topCenter + (0@ticLength+margin).\r\tmidLabel displayOn: self canvas.\r\tminLabel align: minLabel boundingBox topLeft with: box topLeft +(0@ticLength+margin).\r\tminLabel displayOn: self canvas.\r\tself usesScaler ifTrue:[\r\tadjustIcon _ self adjustScaleIconHorizontal.\r\tadjustIcon displayOn: self canvas at: (loc _  ((leftX+midX//2)@(bigBox center y + 4)) - adjustIcon boundingBox center).\r\tself adjustScaleBox: (loc + self insetDisplayBox origin extent: adjustIcon  extent)]! !\r!RVMColorScaleView methodsFor: 'drawing' stamp: 'ssa 11/4/2008 20:12'!\rdrawFastVertical\r\t\"Display in vertical style, only the text labels for speed\"\r\t|  maxLabel minLabel midLabel box ticLength margin  bigBox eraser1 eraser2 eraser3 eraser topY midY adjustIcon loc |\r\teraser _ '           '.\r\teraser1 _ eraser asDisplayText.\r\teraser2 _ eraser asDisplayText.\r\teraser3 _ eraser asDisplayText.\r\teraser1 foregroundColor: Color white backgroundColor: Color white.\r\teraser2 foregroundColor: Color white backgroundColor: Color white.\r\teraser3 foregroundColor: Color white backgroundColor: Color white.\r\tself aspectLabel fillWhite displayOn: self canvas.\r\tself aspectLabel:(self aspect asDisplayText asParagraph asForm rotateBy: #left centerAt: 0@0).\r\tmaxLabel _ self scaler max printShowingMax3Digits asDisplayText.\r\tminLabel _ self scaler min printShowingMax3Digits asDisplayText.\t\r\tmidLabel _ (self scaler range / 2 + self scaler min) printShowingMax3Digits asDisplayText.\r\tmaxLabel foregroundColor: Color black backgroundColor: Color transparent.\r\tmidLabel foregroundColor: Color black backgroundColor: Color transparent.\r\tminLabel foregroundColor: Color black backgroundColor: Color transparent.\r\tbigBox _ self canvas boundingBox.\r\tbox _ bigBox origin + (self aspectLabel width@0)  extent: 40@bigBox height.\r\tticLength _ 4.\r\tmargin _ 2.\r\ttopY _ box topRight y + 2 .\r\tmidY _ box center y.\r\tself aspectLabel align: self  aspectLabel boundingBox leftCenter with: bigBox leftCenter.\r\tself aspectLabel displayOn: self canvas.\r\teraser1 align: eraser1 boundingBox topRight with: box topRight - (ticLength+margin+1@0).\r\teraser1 displayOn: self canvas.\r\tmaxLabel align: maxLabel boundingBox topRight with: box topRight - (ticLength+margin+1@0).\r\tmaxLabel displayOn: self canvas.\r\teraser2 align: eraser2 boundingBox rightCenter with: box rightCenter - (ticLength+margin+1@0).\r\teraser2 displayOn: self canvas.\r\tmidLabel align: midLabel boundingBox rightCenter with: box rightCenter - (ticLength+margin+1@0).\r\tmidLabel displayOn: self canvas.\r\teraser3 align: eraser3 boundingBox bottomRight with: box bottomRight -(ticLength+margin+1@0).\r\teraser3 displayOn: self canvas.\r\tminLabel align: minLabel boundingBox bottomRight with: box bottomRight -(ticLength+margin+1@0).\r\tminLabel displayOn: self canvas.\r\tself usesScaler ifTrue:[\r\tadjustIcon _ self adjustScaleIcon.\r\tadjustIcon displayOn: self canvas at: (loc _ (bigBox topCenter x @ (topY+midY//2)) - adjustIcon boundingBox center).\r\tself adjustScaleBox: (loc + self insetDisplayBox origin extent: adjustIcon  extent)]! !\r!RVMColorScaleView methodsFor: 'drawing' stamp: 'ssa 11/4/2008 20:12'!\rdrawHorizontal\r\t\"Display in horizontal style\"\r\t|  maxLabel minLabel midLabel box ticLength margin  topY leftX rightX bigBox midX adjustIcon loc |\r\tself aspectLabel asParagraph asForm  fillWhite displayOn: self canvas.\r\tself aspectLabel:self aspect asDisplayText.\r\tmaxLabel _ self scaler max printShowingMax3Digits asDisplayText.\r\tminLabel _ self scaler min printShowingMax3Digits asDisplayText.\r\tmidLabel _ (self scaler range / 2 + self scaler min) printShowingMax3Digits asDisplayText.\r\tmaxLabel foregroundColor: Color black backgroundColor: Color transparent.\r\tmidLabel foregroundColor: Color black backgroundColor: Color transparent.\r\tminLabel foregroundColor: Color black backgroundColor: Color transparent.\r\tbigBox _ self canvas boundingBox.\r\tbox _ bigBox origin+ (0@11) corner: bigBox corner.\r\tself drawColorBarHorizontalIn: (bigBox origin + (0@1) extent:  bigBox width@10).\r\tticLength _ 4.\r\tmargin _ 2.\r\tself aspectLabel align: self aspectLabel boundingBox bottomCenter with: box bottomCenter.\r\tself aspectLabel displayOn: self canvas.\r\tmaxLabel align: maxLabel boundingBox topRight with: box topRight + (-2@ticLength+margin).\r\tmaxLabel displayOn: self canvas.\r\tmidLabel align: midLabel boundingBox topCenter with: box topCenter + (0@ticLength+margin).\r\tmidLabel displayOn: self canvas.\r\tminLabel align: minLabel boundingBox topLeft with: box topLeft +(0@ticLength+margin).\r\tminLabel displayOn: self canvas.\r\tleftX _ box topLeft x + 2.\r\tmidX _ box center x.\r\trightX _ box topRight x - 2.\r\ttopY _ box topRight y  + margin.\r\tself canvas fill: (leftX@topY corner: rightX @(topY+1)) fillColor: Color black.\t\r\tself canvas fill: (leftX@topY extent: 1@ticLength) fillColor: Color black.\r\tself canvas fill: (midX+leftX//2@topY extent: 1@ticLength) fillColor: Color black.\r\tself canvas fill: (midX@topY extent: 1@ticLength) fillColor: Color black.\r\tself canvas fill: (midX+rightX//2@topY extent: 1@ticLength) fillColor: Color black.\r\tself canvas fill: (rightX@topY extent: 1@ticLength) fillColor: Color black.\r\tself usesScaler ifTrue:[\r\tadjustIcon _ self adjustScaleIconHorizontal.\r\tadjustIcon displayOn: self canvas at: (loc _  ((leftX+midX//2)@(bigBox center y + 4)) - adjustIcon boundingBox center).\r\t\r\tself adjustScaleBox: (loc + self insetDisplayBox origin extent: adjustIcon  extent)]! !\r!RVMColorScaleView methodsFor: 'drawing' stamp: 'ssa 11/4/2008 20:12'!\rdrawVertical\r\t\"Display in vertical style\"\r\t|  maxLabel minLabel midLabel box ticLength margin  topY midY bottomY leftX rightX bigBox adjustIcon loc |\r\tself aspectLabel fillWhite displayOn: self canvas.\r\tself aspectLabel:(self aspect asDisplayText asParagraph asForm rotateBy: #left centerAt: 0@0).\r\tmaxLabel _ self scaler max printShowingMax3Digits asDisplayText.\r\tminLabel _ self scaler min printShowingMax3Digits asDisplayText.\t\r\tmidLabel _ (self scaler range / 2 + self scaler min) printShowingMax3Digits asDisplayText.\r\tmaxLabel foregroundColor: Color black backgroundColor: Color transparent.\r\tmidLabel foregroundColor: Color black backgroundColor: Color transparent.\r\tminLabel foregroundColor: Color black backgroundColor: Color transparent.\r\tbigBox _ self canvas boundingBox.\r\tbox _ bigBox origin + (aspectLabel width@0)  extent: 40@bigBox height.\r\tself drawColorBarVerticalIn: (box topRight extent:  10@bigBox height).\r\tticLength _ 4.\r\tmargin _ 2.\r\tself aspectLabel align: self aspectLabel boundingBox leftCenter with: bigBox leftCenter.\r\tself aspectLabel displayOn: self canvas.\r\tmaxLabel align: maxLabel boundingBox topRight with: box topRight - (ticLength+margin+1@0).\r\tmaxLabel displayOn: self canvas.\r\tmidLabel align: midLabel boundingBox rightCenter with: box rightCenter - (ticLength+margin+1@0).\r\tmidLabel displayOn: self canvas.\r\tminLabel align: minLabel boundingBox bottomRight with: box bottomRight -(ticLength+margin+1@0).\r\tminLabel displayOn: self canvas.\r\ttopY _ box topRight y + 2 .\r\tmidY _ box center y.\r\tbottomY _ box bottomRight y - 3.\r\tleftX _ box topRight x - ticLength - margin.\r\trightX _ box corner x - margin.\r\tself canvas fill: (rightX - 1@topY corner: rightX@bottomY) fillColor: Color black.\t\r\tself canvas fill: (leftX@topY extent: ticLength@1) fillColor: Color black.\r\tself canvas fill: (leftX@(topY+midY//2) extent: ticLength@1) fillColor: Color black.\r\tself canvas fill: (leftX@midY extent: ticLength@1) fillColor: Color black.\r\tself canvas fill: (leftX@(midY+bottomY//2) extent: ticLength@1) fillColor: Color black.\r\tself canvas fill: (leftX@bottomY extent: ticLength@1) fillColor: Color black.\r\tself usesScaler ifTrue:[\r\tadjustIcon _ self adjustScaleIcon.\r\tadjustIcon displayOn: self canvas at: (loc _( bigBox topCenter x @ (topY+midY//2)) - adjustIcon boundingBox center).\r\tself adjustScaleBox: (loc + self insetDisplayBox origin extent: adjustIcon  extent)]! !\r!RVMColorScaleView methodsFor: 'framing' stamp: 'ssa 1/1/1970 01:30'!\rnewFrame\r\tself canvas: nil.\r\tself extent: self insetDisplayBox extent.\r\tself drawCanvas.\r\tself displayView! !\r!RVMColorScaleView class methodsFor: 'instance creation' stamp: 'ssa 11/4/2008 20:16'!\raspectSource: aspectBlock scalerSource: aBlock colorsSource: colorBlock orientation: aSymbol forView: aView adjustScaler: aBoolean\r\t\"Answer a new view.  Use these blocks to access the scaler and colors it will need to display.\r\tOrientation is #vertical or #horizontal\"\r\t| v |\r\tv _ self new.\r\tv aspectSource: aspectBlock.\r\tv scalerSource: aBlock.\r\tv colorsSource: colorBlock.\r\tv orientation: aSymbol.\r\tv model: aView.\r\tv usesScaler: aBoolean.\r\t^v! !\r!RVMColorScaleView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:02'!\rexampleHorizontal\r\t\"RVMColorScaleView exampleHorizontal\"\r\tself new horizontal demo! !\r!RVMColorScaleView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:03'!\rexampleVertical\r\t\"RVMColorScaleView exampleVertical\"\r\tself new vertical demo! !\r!RVMColoredDataScalerView methodsFor: 'subView access' stamp: 'ssa 9/17/2008 13:30'!\raspectView\r\t\"Answer a subview on my aspect, the symbol name for the aspect of the data sample I am scaling\"\r\t^RVMAspectLabelView on: self model \r\t\tgetAllAspectsWith: [RVMMulticoreSample aspects] \r\t\tgetCurrentAspectWith: #aspect \r\t\tsetNewAspectWith: #aspect:.! !\r!RVMColoredDataScalerView methodsFor: 'subView access' stamp: 'ssa 1/1/1970 01:02'!\rautoscaleHardenView\r\t\"Answer a subview showing the autoscale/harden/privatize buttons\"\r\t| view autoscaleButton hardenButton privatizeButton |\r\tview _ RVMView new.\r\tautoscaleButton _ RVMButtonView label:'A' style:#action action:[self model scaler setRangeToObserved].\r\thardenButton _ RVMButtonView label:'H' style:#action action:[self model scaler harden].\r\tprivatizeButton _ RVMButtonView label:'P' style:#action action:[self model privatize].\r\tview addSubView: autoscaleButton.\r\tview addSubView: hardenButton below: autoscaleButton.\r\tview addSubView: privatizeButton below: hardenButton.\r\t^view! !\r!RVMColoredDataScalerView methodsFor: 'subView access' stamp: 'ssa 9/17/2008 13:59'!\rcolorButton\r\t\"Answer a subview that shows the color to use to display my data\"\r\t^RVMColorButtonView on: self model \r\t\tcolorGetter:#color\r\t\tcolorSetter: #color:! !\r!RVMColoredDataScalerView methodsFor: 'subView access' stamp: 'ssa 1/1/1970 01:16'!\rinitializeSubViews\r\t\"Add the subviews required to provide a UI for my model, a ColoredDataScaler.\"\r\tself addSubView: self aspectView in: (0@0 extent: 5/10 @ (1/2)) borderWidth:0.\r\tself addSubView: self valueView in: (0@(1/2 )extent: 5/10 @ (1/2)) borderWidth:0.\r\tself addSubView: self autoscaleHardenView  in: (5/10@0 extent: 1/10@1) borderWidth:0.\r\tself addSubView: self minMaxView  in: (6/10@0 extent: 4/10@1) borderWidth:1.\r! !\r!RVMColoredDataScalerView methodsFor: 'subView access' stamp: 'ssa 9/17/2008 14:00'!\rminMaxView\r\t\"Answer a subview showing the min/max settings for the data sample I am scaling\"\r\t^RVMMinMaxView on: self model getMin: #min setMin: #min: getMax: #max setMax: #max:! !\r!RVMColoredDataScalerView methodsFor: 'subView access' stamp: 'ssa 9/17/2008 13:56'!\rvalueView\r\t\"Answer a subview that will show the last observed value\"\r\t^RVMValueView on: self model valueGetterOnly:#lastObserved! !\r!RVMColoredDataScalerView methodsFor: 'model access' stamp: 'ssa 9/17/2008 13:09'!\rmodel: aColoredDataScaler\r\t\"Set my model and initialize my subviews\"\r\tsuper model: aColoredDataScaler.\r\tself initializeSubViews! !\r!RVMColoredDataScalerView class methodsFor: 'instance creation' stamp: 'ssa 9/17/2008 13:07'!\ron: aColoredDataScaler\r\t\"Answer a new view on this scaler\"\r\t| view |\r\tview _ self new.\r\tview model: aColoredDataScaler.\r\t^view! !\r!RVMColoredDataScalerView class methodsFor: 'instance creation' stamp: 'ssa 9/19/2008 12:37'!\ronAspect: aSymbol\r\t^self on: (RVMColoredDataScaler aspect: aSymbol)! !\r!RVMColoredDataScalerView class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 01:17'!\ropenOn: aColoredDataScaler\r\t\"RVMColoredDataScalerView openOn: RVMColoredDataScaler exampleInstance\"\r\t\"Open a new view on this scaler\"\r\t| topView |\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\ttopView minimumSize: 200@40.\r\ttopView maximumSize: 300@80.\r\ttopView addSubView: (self on: aColoredDataScaler).\r\ttopView label: 'Aspect Data Scaler'.\r\ttopView controller open! !\r!RVMColoredDataScalerView class methodsFor: 'instance creation' stamp: 'ssa 9/19/2008 12:35'!\ropenOnAspect: aSymbol\r\t\"RVMColoredDataScalerView openOnAspect:#bytesUsed\"\r\tself openOn: (RVMColoredDataScaler aspect: aSymbol)! !\r!RVMGridLocationView methodsFor: 'displaying' stamp: 'ssa 11/16/2008 01:29'!\rdisplayView\r\t| gridExtent point boxes box dot |\r\tself canvas extent > self insetDisplayBox extent ifTrue:[self canvas:nil; canvas].\r\tself okToDisplay ifFalse:[^self].\r\tpoint _ self point.\r\tself uncache.\r\tself canvas displayOn: Display at:self insetDisplayBox origin.\r\tgridExtent _ self gridExtent.\r\tdot _ Form extent:1@1.\r\tdot fillBlack.\r\tboxes _ self insetDisplayBox subDivideBy:  gridExtent.\r\t1 to: gridExtent x do:[:x|\r\t\t1 to: gridExtent y do:[:y|\r\t\t\tpoint = (x@y)  ifTrue:[box _ boxes at: y-1*gridExtent x+x.\r\t\t\t\tDisplay fill: (box origin - (0@1) extent:box extent)rounded  fillColor: Color black].\r\t\t\t(point = (0@0)) & ((x@y)=(1@1))  ifTrue:[box _ boxes at: y-1*gridExtent x+x..\r\t\t\t\tDisplay fill: box rounded fillColor: Color red].\r\t\t\t(point > (gridExtent)) & ((x@y)=(gridExtent))  ifTrue:[box _ boxes at: y-1*gridExtent x+x..\r\t\t\t\tDisplay fill: box rounded fillColor: Color red].\r\t\t\t]]! !\r!RVMGridLocationView methodsFor: 'displaying' stamp: 'ssa 11/15/2008 23:46'!\rdrawGridOnCanvas\r\t| gridExtent boxes dot leftX rightX boxHeight boxWidth lineY lineX topY bottomY |\r\tself canvas fillWhite.\r\tgridExtent _ self gridExtent.\r\tdot _ Form extent:1@1.\r\tdot fillBlack.\r\tleftX _ self canvas boundingBox origin x.\r\trightX _ self canvas boundingBox corner x.\r\ttopY _ self canvas boundingBox origin y.\r\tbottomY _ self canvas boundingBox corner y.\r\tboxes _ self canvas boundingBox subDivideBy:  gridExtent.\r\tboxHeight _ boxes first height.\r\tboxWidth _ boxes first width  .\r\tlineY _ topY + boxHeight -2.\r\tlineX _ leftX + boxWidth  .\r\t1 to: gridExtent x do:[:x|\r\t\tx > (gridExtent x - 2) ifFalse:[\r\t\tself canvas drawLine: dot from: (leftX@lineY)  to: rightX@lineY clippingBox: self canvas boundingBox rule: Form paint fillColor: Color black.\r\t\tlineY _ lineY + boxHeight].\r\t\t1 to: gridExtent y do:[:y|\r\t\t\ty > (gridExtent y - 1) ifFalse:[\r\t\t\t\tself canvas drawLine: dot from: lineX@topY to: lineX@bottomY clippingBox: self canvas boundingBox rule: Form paint fillColor: Color black.\r\t\t\t\tlineX _ lineX + boxWidth].\r\t\t\t]]! !\r!RVMGridLocationView methodsFor: 'updating' stamp: 'ssa 11/16/2008 00:56'!\rhear: something\r\tself displayView! !\r!RVMGridLocationView methodsFor: 'updating' stamp: 'ssa 11/16/2008 00:32'!\rnewFrame\r\r\tself canvas: nil.\r\tself canvas! !\r!RVMGridLocationView methodsFor: 'accessing' stamp: 'ssa 11/15/2008 18:03'!\rcanvas\r\t\"Answer the value of canvas\"\r\r\tcanvas isNil ifTrue:[self canvas: (Form extent: self insetDisplayBox extent).\r\t\tself drawGridOnCanvas].\r\t^ canvas! !\r!RVMGridLocationView methodsFor: 'accessing' stamp: 'ssa 11/15/2008 18:02'!\rcanvas: anObject\r\t\"Set the value of canvas\"\r\r\tcanvas _ anObject! !\r!RVMGridLocationView methodsFor: 'accessing' stamp: 'ssa 11/13/2008 12:31'!\rextentGetter\r\t\"Answer the value of extentGetter\"\r\r\textentGetter isNil ifTrue:[self extentGetter: [8@7]].\r\t^ extentGetter! !\r!RVMGridLocationView methodsFor: 'accessing' stamp: 'ssa 11/13/2008 12:30'!\rextentGetter: anObject\r\t\"Set the value of extentGetter\"\r\r\textentGetter _ anObject! !\r!RVMGridLocationView methodsFor: 'accessing' stamp: 'ssa 11/13/2008 13:05'!\rgridExtent\r\r\t^self extentGetter isSymbol ifTrue:[self model perform: self extentGetter] ifFalse:[self extentGetter value]! !\r!RVMGridLocationView methodsFor: 'accessing' stamp: 'ssa 11/13/2008 12:37'!\rpoint\r\r\t^self pointGetter isSymbol ifTrue:[self model perform: self pointGetter] ifFalse:[self pointGetter value]! !\r!RVMGridLocationView methodsFor: 'accessing' stamp: 'ssa 11/16/2008 02:20'!\rpoint: aPoint\r\tself pointSetter isSymbol ifTrue:[self model perform: self pointSetter with: aPoint] ifFalse:[self pointSetter value: aPoint]! !\r!RVMGridLocationView methodsFor: 'accessing' stamp: 'ssa 11/13/2008 12:31'!\rpointGetter\r\t\"Answer the value of pointGetter\"\r\r\tpointGetter isNil ifTrue:[self pointGetter: [self extent atRandom]].\r\t^ pointGetter! !\r!RVMGridLocationView methodsFor: 'accessing' stamp: 'ssa 11/13/2008 12:30'!\rpointGetter: anObject\r\t\"Set the value of pointGetter\"\r\r\tpointGetter _ anObject! !\r!RVMGridLocationView methodsFor: 'accessing' stamp: 'ssa 11/13/2008 12:32'!\rpointSetter\r\t\"Answer the value of pointSetter\"\r\r\tpointSetter isNil ifTrue:[self pointSetter: [\"do nothing by default\"]].\r\t^ pointSetter! !\r!RVMGridLocationView methodsFor: 'accessing' stamp: 'ssa 11/13/2008 12:30'!\rpointSetter: anObject\r\t\"Set the value of pointSetter\"\r\r\tpointSetter _ anObject! !\r!RVMGridLocationView methodsFor: 'controller access' stamp: 'ssa 11/15/2008 16:10'!\rdefaultControllerClass\r\r\t^RVMGridLocationController! !\r!RVMGridLocationView class methodsFor: 'instance creation' stamp: 'ssa 11/13/2008 12:47'!\ron: aModel pointGetter: pointGetterBlockOrSelector pointSetter: pointSetterBlockOrSelector extentGetter: extentGetterBlockOrSelector\r\r\t| v |\r\tv _ self new.\r\tv model: aModel.\r\tv pointGetter: pointGetterBlockOrSelector.\r\tv pointSetter: pointSetterBlockOrSelector.\r\tv extentGetter: extentGetterBlockOrSelector.\r\t^v\t! !\r!RVMGroupLocatorView methodsFor: 'framing' stamp: 'ssa 11/27/2008 09:33'!\rnewFrame\r\tself boxes: nil.\r\tself canvas:nil.\r\tself backgroundCanvas:nil.\r\tself drawOnCanvas.\r\tDisplay fill: self insetDisplayBox fillColor: Color white.\r\tself displayView! !\r!RVMGroupLocatorView methodsFor: 'drawing' stamp: 'ssa 11/27/2008 14:42'!\rdrawBackgroundCanvas\r\t| alt count lighter rowWidth |\r\trowWidth _ RVMMonitor extent x  .\r\talt _ false.\r\tcount _ 0.\r\tlighter _ Color black lighter lighter.\r\tself boxes do:[:r| self backgroundCanvas fill: r  fillColor: (alt ifTrue:[Color black]ifFalse:[lighter]). \"self backgroundCanvas border: r width: 1 fillColor: Color gray.\"\r\talt _ alt not.\r\tcount _ count + 1.\r\trowWidth odd ifFalse:[count = rowWidth ifTrue:[alt _ alt not. count _ 0]]].\r! !\r!RVMGroupLocatorView methodsFor: 'drawing' stamp: 'ssa 3/31/2009 18:06'!\rdrawLocations\r\t| dot coreExtent amt index rect pt dotSize realRect label  |\r\tcoreExtent _ RVMMonitor extent.\r\tdotSize _(self boxes first width // ((self countsPerCore size // self boxes size)max:1))min:self boxes first width //2 max:1.\r\tdot _ Form dotOfSize: dotSize color: self color.\r\t0 to: coreExtent x - 1 do:[:x|\r\t\t0 to: coreExtent y - 1 do:[:y|\r\t\t\tamt _ self countsPerCore occurrencesOf: (index _ y*coreExtent x+x).\r\t\t\trect _ (realRect _ self boxes at: index + 1) insetBy: dot offset abs.\r\t\t\tlabel _ amt printString asDisplayText .\r\t\t\tlabel foregroundColor: Color red backgroundColor: Color transparent.\r\t\t\tlabel displayOn: self canvas at: realRect origin - (0@3) clippingBox: realRect rule: Form paint fillColor: Color red.\r\t\t\t\"amt  timesRepeat:[pt _ rect asRandomPoint.\r\t\t\t\tdot displayOn: self canvas at: pt clippingBox: realRect rule: Form paint fillColor:nil]\"].\r\t\t]! !\r!RVMGroupLocatorView methodsFor: 'drawing' stamp: 'ssa 11/27/2008 09:19'!\rdrawOnCanvas\r\tself backgroundCanvas displayOn: self canvas at: 0@0.\r\tself drawLocations! !\r!RVMGroupLocatorView methodsFor: 'displaying' stamp: 'ssa 11/27/2008 09:24'!\rdisplayView\r\t\"Display my canvas at my offset.\r\tSubclasses should not override this method but should draw on the canvas instead\"\r\tself drawOnCanvas.\r\tself okToDisplay ifFalse:[^self].\r\tself uncache.\r\tself canvas displayOn: Display at: self insetDisplayBox center - self canvas center clippingBox: self insetDisplayBox.\r! !\r!RVMGroupLocatorView methodsFor: 'listening' stamp: 'ssa 11/27/2008 09:31'!\rhear: something\r\t\"Update my display\"\r\tself countsPerCore: nil.\r\tself drawOnCanvas.\r\tself displayView! !\r!RVMGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 09:35'!\rbackgroundCanvas\r\t\"Answer the value of backgroundCanvas\"\r\r\tbackgroundCanvas isNil ifTrue:[self backgroundCanvas: (Form extent: self insetDisplayBox extent depth: Display depth).  self drawBackgroundCanvas].\r\t^ backgroundCanvas! !\r!RVMGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 09:08'!\rbackgroundCanvas: anObject\r\t\"Set the value of backgroundCanvas\"\r\r\tbackgroundCanvas _ anObject! !\r!RVMGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 09:30'!\rboxes\r\t\"Answer the value of boxes\"\r\r\tboxes isNil ifTrue:[self boxes: ((self insetDisplayBox subDivideRoundedBy: RVMMonitor extent) collect:[:r| r translateBy: self insetDisplayBox origin negated])].\r\t^ boxes! !\r!RVMGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 09:08'!\rboxes: anObject\r\t\"Set the value of boxes\"\r\r\tboxes _ anObject! !\r!RVMGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 09:35'!\rcanvas\r\t\"Answer the value of canvas\"\r\r\tcanvas isNil ifTrue:[self canvas:  (Form extent: self insetDisplayBox extent depth: Display depth)].\r\t^ canvas! !\r!RVMGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 09:08'!\rcanvas: anObject\r\t\"Set the value of canvas\"\r\r\tcanvas _ anObject! !\r!RVMGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 12:27'!\rchangeColorTo: aColor\r\t\"Set the value of color\"\r\r\tself color: aColor.\r\tself hear:nil! !\r!RVMGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 12:15'!\rcolor\r\t\"Answer the value of color\"\r\r\tcolor isNil ifTrue:[self color: Color red].\r\t^ color! !\r!RVMGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 12:15'!\rcolor: anObject\r\t\"Set the value of color\"\r\r\tcolor _ anObject! !\r!RVMGroupLocatorView methodsFor: 'accessing' stamp: 'dmu 5/10/2009 04:38'!\rcountsPerCore\r\t\"Answer the value of countsPerCore\"\r\tcountsPerCore isNil ifTrue:[self countsPerCore: (self objects asOrderedCollection  collect:[:obj| RVMTester isRVM ifFalse:[RVMMonitor coreCount atRandom - 1]ifTrue:[RVMTester getCoreHolding:obj]]) asBag].\r\t^ countsPerCore! !\r!RVMGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 09:14'!\rcountsPerCore: aBag\r\t\"Set the value of countsPerCore, a Bag of coreIndicies with occurenceCounts showing how many of my objects reside in each core\"\r\r\tcountsPerCore _ aBag! !\r!RVMGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 09:16'!\robjects\r\t\"Answer my colection of objects to locate.\"\r\t^self objectsSource isSymbol ifTrue:[self model perform: self objectsSource] ifFalse:[self objectsSource value]! !\r!RVMGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 09:16'!\robjectsSource\r\t\"Answer the value of objectsSource, a Block that returns a collection of objects to locate.\r\tCan also be a SYmbol, a message selector to send to my model\"\r\r\tobjectsSource isNil ifTrue:[self objectsSource: [String allInstances]].\r\t^ objectsSource! !\r!RVMGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 09:17'!\robjectsSource: aBlockOrSymbol\r\t\"Set the value of objectsSource\"\r\r\tobjectsSource _ aBlockOrSymbol! !\r!RVMGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 10:34'!\robjectsSourceSource\r\r\t| code |\r\tself objectsSource isSymbol ifTrue:[^self objectsSource printString].\r\tcode _ self objectsSource decompile printString.\r\t(code beginsWith:'{[') &(code endsWith:']}') ifTrue:[code _ code copyFrom: 3 to: code size - 2].\r\t^code! !\r!RVMGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 11:34'!\robjectsSourceSource: aText\r\r\t| value aString |\r\taString _ aText asString.\r\t( aString withBlanksTrimmed beginsWith:'#')\r\t\tifTrue:[value _  Compiler new evaluate: aString in: nil to: nil\r\t\t\t\t\t\tnotifying: nil ifFail: [^ false].\r\t\t\t\tself model perform: value.  \"test to make sure it works before installing\"]\r\t\tifFalse:[value _ Compiler new evaluate: '[',aString,']' in: nil to: nil\r\t\t\t\t\t\tnotifying: nil ifFail: [^ false]].\r\tself objectsSource:value.\r\tself hear:nil.\r\t^true \"tell the editor its OK\"! !\r!RVMGroupLocatorView methodsFor: 'controller access' stamp: 'ssa 11/27/2008 09:57'!\rdefaultControllerClass\r\r\t^RVMGroupLocatorController! !\r!RVMGroupLocatorView class methodsFor: 'instance creation' stamp: 'ssa 11/27/2008 09:57'!\ron: aModel objectsSource: aBlockOrSelector\r\t\"(RVMGroupLocatorView on: Smalltalk objectsSource:#values) demo\"\r\t\"(RVMGroupLocatorView on: nil objectsSource:[String allInstances]) demo\"\r\t\r\t| v |\r\tv _ self new.\r\tv model: aModel.\r\tv objectsSource: aBlockOrSelector.\r\t^v! !\r!RVMGroupLocatorView class methodsFor: 'instance creation' stamp: 'ssa 11/27/2008 14:10'!\ropenOn: aModel objectsSource: aBlockOrSelector labeled: aString\r\t\"RVMGroupLocatorView openOn: Smalltalk objectsSource:#allClasses labeled:'All Classes'\"\r\t\"RVMGroupLocatorView openOn: nil objectsSource:[Array allInstances] labeled: 'All Arrays'\"\r\t| topView v |\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\ttopView minimumSize: 150@150.\r\ttopView maximumSize: 800@800.\r\tv := self on: aModel objectsSource: aBlockOrSelector.\r\tv borderWidth:1.\r\ttopView addSubView: v  viewport:(0@0 extent: 150@150).\r\ttopView label: aString.\r\ttopView controller open! !\r!RVMGroupLocatorView class methodsFor: 'instance creation' stamp: 'ssa 11/27/2008 13:36'!\ropenWithSourceEditorOn: aModel objectsSource: aBlockOrSelector\r\t\"RVMGroupLocatorView openWithSourceEditorOn: Smalltalk objectsSource:#values\"\r\t\"RVMGroupLocatorView openWithSourceEditorOn: nil objectsSource:[Array allInstances]\"\r\t| topView v ptv cbv |\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\ttopView minimumSize: 150@170.\r\ttopView maximumSize: 400@425.\r\tv := self on: aModel objectsSource: aBlockOrSelector.\r\tv borderWidth:1.\r\tptv _ PluggableTextView on: v text:#objectsSourceSource accept:#objectsSourceSource:.\r\tptv borderWidth:1.\r\tcbv _ RVMColorButtonView on: v colorGetter:#color colorSetter:#changeColorTo:.\r\tcbv borderWidth:1.\r\ttopView addSubView: v  viewport:(0@0 extent: 150@150).\r\ttopView addSubView: cbv  viewport:(0@150 extent:20@20).\r\ttopView addSubView: ptv  viewport:(20@150 extent:130@20).\r\ttopView label: 'Group Locator'.\r\ttopView controller open! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 11/11/2008 17:20'!\radjustScaleBox\r\t\"Answer the value of adjustScaleBox\"\r\r\tadjustScaleBox isNil ifTrue:[self adjustScaleBox: self insetDisplayBox].\r\t^ adjustScaleBox! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 11/11/2008 17:20'!\radjustScaleBox: anObject\r\t\"Set the value of adjustScaleBox\"\r\r\tadjustScaleBox _ anObject! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 11:22'!\raspect\r\t\"Answer the value of aspect\"\r\r\taspect isNil ifTrue:[self aspect: #test0to100].\r\t^ aspect! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 17:23'!\raspect: anObject\r\t\"Set the value of aspect\"\r\r\taspect _ anObject.\r\tself lastAverage: nil.\r\tself lastTotal: nil.\r\tself topView == self ifFalse:[self topView relabel: anObject asString]! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 17:22'!\raspectCount\r\r\t^1! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/10/2008 18:39'!\rbackgroundCanvas\r\t\"Answer the value of backgroundCanvas\"\r\r\tbackgroundCanvas isNil ifTrue:[ self backgroundCanvas:(ColorForm extent: self canvasExtent depth:8).\r\t\tself spokePens do:[:pen| pen destForm: backgroundCanvas].\r\t\tself drawBackgroundCanvas.].\r\t^ backgroundCanvas! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 13:53'!\rbackgroundCanvas: anObject\r\t\"Set the value of backgroundCanvas\"\r\r\tbackgroundCanvas _ anObject\r! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 11/12/2008 13:08'!\rblinker\r\t\"Answer the value of blinker\"\r\r\tblinker isNil ifTrue:[self blinker: true].\r\tself blinker: blinker not.\r\t^ blinker! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 11/12/2008 13:08'!\rblinker: anObject\r\t\"Set the value of blinker\"\r\r\tblinker _ anObject! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/10/2008 18:39'!\rcanvas\r\t\"Answer the value of canvas\"\r\r\tcanvas isNil ifTrue:[self canvas: (ColorForm extent: self canvasExtent depth:8)].\r\t^ canvas! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 14:11'!\rcanvas: anObject\r\t\"Set the value of canvas\"\r\r\tcanvas _ anObject.\r\tself webPen destForm: anObject.\r\tself spokePens:nil! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/8/2008 18:00'!\rcanvasExtent\r\t\"Answer the extent of my canvas\"\r\t^self insetDisplayBox extent  ! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 13:38'!\rcenter\r\r\t^self canvas center! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 17:08'!\rcenterMargin\r\t\"the distance from center to the start of a spoke\"\r\t^20! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 14:13'!\rdiameter\r\t\"Answer the smallest square diameter for this view's box\"\r\t^self canvas height < self canvas width\r\t\tifTrue:[self canvas height- (self labelRowCount * 10)]\r\t\tifFalse:[self canvas width - 20]! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 14:17'!\rdrawingBackground\r\t\"Answer the value of drawingBackground\"\r\r\tdrawingBackground isNil ifTrue:[self drawingBackground: false].\r\t^ drawingBackground! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 14:17'!\rdrawingBackground: anObject\r\t\"Set the value of drawingBackground\"\r\r\tdrawingBackground _ anObject! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/8/2008 18:52'!\rfirstDisplay\r\t\"Answer the value of firstDisplay\"\r\r\tfirstDisplay isNil ifTrue:[self firstDisplay: false].\r\t^ firstDisplay! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/8/2008 15:13'!\rfirstDisplay: anObject\r\t\"Set the value of firstDisplay\"\r\r\tfirstDisplay _ anObject! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 01:18'!\rlabelRowCount\r\t\"How many rows of labels will I have?\"\r\t^2! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 02:25'!\rlastAverage\r\t\"Answer the value of lastAverage\"\r\r\tlastAverage isNil ifTrue:[self lastAverage: 0].\r\t^ lastAverage! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 02:25'!\rlastAverage: anObject\r\t\"Set the value of lastAverage\"\r\r\tlastAverage _ anObject! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 02:25'!\rlastTotal\r\t\"Answer the value of lastTotal\"\r\r\tlastTotal isNil ifTrue:[self lastTotal: 0].\r\t^ lastTotal! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 02:25'!\rlastTotal: anObject\r\t\"Set the value of lastTotal\"\r\r\tlastTotal _ anObject! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 14:37'!\rmajorTicLength\r\t\r\t^8! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 14:35'!\rmajorTicSpacing\r\r\t^self spokeLength / (self numberOfMajorTics - 1) asFloat! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 14:36'!\rminorTicLength\r\t\r\t^4! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 14:36'!\rminorTicSpacing\r\r\t^self majorTicSpacing /( self numberOfMinorTics + 1)! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 14:38'!\rnumberOfMajorTics\r\r\t^3! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 14:37'!\rnumberOfMinorTics\r\r\t^1! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 13:56'!\rradius\r\t\"Answer the smallest radius for this view's box\"\r\t^self diameter // 2! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/20/2008 10:25'!\rrescaleCounter\r\t\"Answer the value of rescaleCounter\"\r\r\trescaleCounter isNil ifTrue:[self rescaleCounter: self rescaleCounterDefault].\r\t^ rescaleCounter! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 15:02'!\rrescaleCounter: anObject\r\t\"Set the value of rescaleCounter\"\r\r\trescaleCounter _ anObject! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/20/2008 10:25'!\rrescaleCounterDefault\r\t\"Answer the value of rescaleCounterDefault\"\r\r\trescaleCounterDefault isNil ifTrue:[self rescaleCounterDefault: 10].\r\t^ rescaleCounterDefault! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/20/2008 10:25'!\rrescaleCounterDefault: anObject\r\t\"Set the value of rescaleCounterDefault\"\r\r\trescaleCounterDefault _ anObject! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 11:25'!\rscaler\r\t\"Answer the value of scaler\"\r\r\tscaler isNil ifTrue:[self scaler: RVMDataScaler new automatic].\r\t^ scaler! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 11:22'!\rscaler: anObject\r\t\"Set the value of scaler\"\r\r\tscaler _ anObject! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 22:07'!\rspokeColor\r\t\"Answer the value of spokeColor\"\r\r\tspokeColor isNil ifTrue:[self spokeColor: Color gray lighter lighter].\r\t^ spokeColor! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 13:21'!\rspokeColor: anObject\r\t\"Set the value of spokeColor\"\r\r\tspokeColor _ anObject! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 14:30'!\rspokeLength\r\r\t^self radius - self centerMargin - 5! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 11:25'!\rspokePens\r\t\"Answer the value of spokePens\"\r\r\tspokePens isNil ifTrue:[self spokePens: self initializeSpokePens].\r\t^ spokePens! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 11:22'!\rspokePens: anObject\r\t\"Set the value of spokePens\"\r\r\tspokePens _ anObject! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 13:21'!\rwebColor\r\t\"Answer the value of webColor\"\r\r\twebColor isNil ifTrue:[self webColor: Color blue].\r\t^ webColor! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 13:21'!\rwebColor: anObject\r\t\"Set the value of webColor\"\r\r\twebColor _ anObject! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 17:06'!\rwebPen\r\t\"Answer the value of webPen\"\r\r\twebPen isNil ifTrue:[self webPen: Pen new.\r\t\twebPen color: self webColor.\r\t\twebPen defaultNib:2.\r\t\twebPen  combinationRule: Form over.\r\t\twebPen destForm: self canvas].\r\t^ webPen! !\r!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 13:29'!\rwebPen: anObject\r\t\"Set the value of webPen\"\r\r\twebPen _ anObject! !\r!RVMKiviatView methodsFor: 'drawing' stamp: 'ssa 11/11/2008 17:19'!\radjustScaleIcon\r^((ColorForm\r\textent: 16@31\r\tdepth: 8\r\tfromArray: #( 0 0 0 0 0 0 169614364 622594560 0 0 1694498815 4294913536 0 0 1845490943 4294915840 0 0 0 3506384384 0 0 0 3506386688 73 1677721600 0 3657379328 163 3642490880 0 3506386688 9716 4287692800 172 4110364160 46591 4294913536 208 4110366464 4259839 4294936576 0 3506384384 8973264 4106150400 0 3657381632 6558618 3942664503 0 3506384384 154 3942645760 0 3657381632 154 3942645760 25700 3808374272 154 3942645760 60415 4294915840 154 3942645760 18761 3808374272 154 3942645760 0 3506386688 2424986 3942648357 0 3657379328 11304867 3947480869 0 3506386688 7798783 4294948096 0 3506384384 1300991 4294925056 217 4294915840 25855 4291821568 145 3959369216 199 4098424832 0 3657381632 118 2432696320 0 3506384384 28 620756992 0 3506386688 0 0 0 3657379328 0 0 1541003737 4110366464 0 0 1694498815 4294913536 0 0 321795886 1227753984 0 0 0 0)\r\toffset: 0@0)\r\tcolorsFromArray: #(#(1.0 1.0 1.0) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0)  ))! !\r!RVMKiviatView methodsFor: 'drawing' stamp: 'ssa 11/11/2008 17:34'!\rdrawAdjustScaleIcon\r\t| adjustIcon origin |\r.\r\tadjustIcon _ self adjustScaleIcon.\r\torigin _ self backgroundCanvas boundingBox leftCenter - adjustIcon boundingBox leftCenter + (4@0).\r\tadjustIcon displayOn: self backgroundCanvas at: origin.\r\tself adjustScaleBox:(origin extent: adjustIcon extent)! !\r!RVMKiviatView methodsFor: 'drawing' stamp: 'ssa 11/11/2008 17:18'!\rdrawBackgroundCanvas\r\tself drawingBackground: true.\r\tself backgroundCanvas fillWhite.\r\tself drawSpokes.\r\tself drawAdjustScaleIcon.\r\tself drawingBackground: false\r\t! !\r!RVMKiviatView methodsFor: 'drawing' stamp: 'ssa 11/11/2008 23:07'!\rdrawCounterOnCanvas\r\t|  counterLabel |\r\tself scaler automaticScaling ifFalse:[^self].\r\tcounterLabel _ ('rescale\rin: ',self rescaleCounter printString ) asDisplayText.\r\tcounterLabel displayOn: self canvas at: self canvas boundingBox bottomRight -(counterLabel width@90).\r! !\r!RVMKiviatView methodsFor: 'drawing' stamp: 'ssa 10/7/2008 15:29'!\rdrawLabelsOnCanvas\r\t\r\t| minLabel maxLabel  aspectLabel avgLabel totalLabel start |\r\taspectLabel _ self aspect asString asDisplayText.\r\taspectLabel foregroundColor: self webColor backgroundColor: Color transparent.\r\taspectLabel displayOn: self canvas at:  (2@-4).\r\tminLabel _ ('min: ',self scaler min printShowingMax3Digits) asDisplayText.\r\tmaxLabel _ ('max: ',self scaler max printShowingMax3Digits) asDisplayText.\r\tminLabel foregroundColor: self webColor backgroundColor: Color transparent.\r\tmaxLabel foregroundColor: self webColor backgroundColor: Color transparent.\r\tminLabel displayOn: self canvas at: 0@((aspectLabel height //2)-2)clippingBox: self canvas boundingBox rule: Form paint fillColor:nil.\r\tmaxLabel displayOn: self canvas at: 0@(start _ maxLabel height) clippingBox: self canvas boundingBox rule: Form paint fillColor:nil.\r\tavgLabel _ ('avg: ',self lastAverage printShowingMax3Digits) asDisplayText.\r\ttotalLabel _ ('total: ',self lastTotal printShowingMax3Digits) asDisplayText.\r\tavgLabel foregroundColor: self webColor backgroundColor: Color transparent.\r\ttotalLabel foregroundColor: self webColor backgroundColor: Color transparent.\r\ttotalLabel displayOn: self canvas at: 0@(start _start +(totalLabel height - 6)) clippingBox: self canvas boundingBox rule: Form paint fillColor:nil.\r\tavgLabel displayOn: self canvas at: 0@( start + (maxLabel height - 6)) clippingBox: self canvas boundingBox rule: Form paint fillColor:nil.\r\r! !\r!RVMKiviatView methodsFor: 'drawing' stamp: 'ssa 10/6/2008 14:16'!\rdrawMajorTicUsing: pen\r\r\tpen turn:90; go: self majorTicLength/2;turn:180;down;go:self majorTicLength;up;\r\t\t\tturn:180; go: self majorTicLength/2;turn:-90! !\r!RVMKiviatView methodsFor: 'drawing' stamp: 'ssa 10/6/2008 14:16'!\rdrawMinorTicUsing: pen\r\r\tpen turn:90; go: self minorTicLength/2;turn:180;down;go:self minorTicLength;up;\r\t\t\tturn:180; go: self minorTicLength/2;turn:-90! !\r!RVMKiviatView methodsFor: 'drawing' stamp: 'ssa 10/8/2008 19:16'!\rdrawOnCanvas\r\tself drawingBackground ifTrue:[^self].\r\tself backgroundCanvas displayOn: self canvas at: 0@0.\r\tself drawCounterOnCanvas.\r\tself drawWeb.\r\tself drawLabelsOnCanvas.\r! !\r!RVMKiviatView methodsFor: 'drawing' stamp: 'ssa 11/17/2008 13:25'!\rdrawSpokes\r\r\t| pen label labelOffsets labelOffset mainIndex oldColor |\r\tmainIndex _ RVMMonitor mainRank + 1.\r\t1 to: self spokePens size do:[:index|\r\t\tpen _ self spokePens at: index.\r\t\toldColor _ pen color.\r\t\tindex = mainIndex ifTrue:[pen color: Color red].\r\t\tpen destForm: self backgroundCanvas.\r\t\tpen place: self center.\r\t\tpen up; go: self centerMargin.\r\t\tpen down;go: self spokeLength;up.\r\t\tlabel _ (index - 1) printString asDisplayText asParagraph asForm.\r\t\tself diameter < 300 ifTrue:[label _ label scaledToSize: 11@11].\r\t\tlabelOffsets _ {0@label height negated.  0@0. label width negated@0.  label extent negated}.\r\t\tlabelOffset _ labelOffsets at: ((index - 1// (self spokePens size / 4) + 1) min:4).\r\t\tlabel displayOn: self backgroundCanvas at: pen location + labelOffset clippingBox: self backgroundCanvas boundingBox rule: Form paint fillColor: nil.\r\t\tself drawTicsUsing: pen.\r\t\tpen color: oldColor]\r\t\t! !\r!RVMKiviatView methodsFor: 'drawing' stamp: 'ssa 10/6/2008 11:54'!\rdrawTicsUsing: pen\r\r\tpen up;place: self center;go:self centerMargin.\r\tself drawMajorTicUsing: pen.\r\tself numberOfMajorTics - 1 timesRepeat:[\r\t\tself numberOfMinorTics timesRepeat:[\r\t\t\tpen go: self minorTicSpacing.\r\t\t\tself drawMinorTicUsing: pen].\r\t\tpen go: self minorTicSpacing.\r\t\tself drawMajorTicUsing: pen].\r\t! !\r!RVMKiviatView methodsFor: 'drawing' stamp: 'ssa 10/7/2008 14:18'!\rdrawWeb\r\tself drawingBackground ifTrue:[^self].\r\tself placeSpokePens.\r\tself webPen color: self webColor.\r\tself webPen up;place: self spokePens first location;down.\r\tself spokePens do:[:pen|\r\t\tself webPen goto: pen location].\r\tself webPen goto: self spokePens first location;up\r\t! !\r!RVMKiviatView methodsFor: 'drawing' stamp: 'dmu 8/23/2010 17:39'!\rplaceSpokePens\r\r\t| data tot |\r\tdata _ RVMMonitor lastSample perform: self aspect.\r\ttot _ 0.\r\tself spokePens size = data size ifFalse: [self resetAfterCoreCountChange].\r\tdata with: self spokePens do:[:datum :pen|\r\t\ttot _ tot + datum.\r\t\tpen up;place: self center;go:self centerMargin.\r\t\tpen go:(self spokeLength /100.0*(self scaler scale: datum))].\r\tself lastTotal: tot.\r\tself lastAverage: tot / data size! !\r!RVMKiviatView methodsFor: 'framing' stamp: 'ssa 10/8/2008 15:20'!\rfirstFrame\r\t! !\r!RVMKiviatView methodsFor: 'framing' stamp: 'ssa 10/8/2008 19:20'!\rnewFrame\r\tself canvas:nil.\r\tself backgroundCanvas:nil.\r\tself drawOnCanvas.\r\tDisplay fill: self insetDisplayBox fillColor: Color white.\r\tself displayView! !\r!RVMKiviatView methodsFor: 'scaling' stamp: 'ssa 10/8/2008 18:52'!\rresetScaling\r\r\tself scaler resetScaling.\r! !\r!RVMKiviatView methodsFor: 'initialize-release' stamp: 'ssa 10/6/2008 16:42'!\rinitializeSpokePens\r\r\t| pens numberOfSpokes spacing center pen |\r\tpens _ OrderedCollection new.\r\tnumberOfSpokes _ RVMMonitor coreCount.\r\tspacing _ 360 / numberOfSpokes asFloat.\r\tcenter _ self insetDisplayBox center.\r\tnumberOfSpokes timesRepeat:[\r\t\tpen _ Pen new.\r\t\tpen defaultNib:1.\r\t\tpen  combinationRule: Form over.\r\t\tpen color: self spokeColor.\r\t\tpen place: center.\r\t\tpen north.\r\t\tpen turn: pens size * spacing.\r\t\tpens add: pen].\r\t^pens! !\r!RVMKiviatView methodsFor: 'initialize-release' stamp: 'ssa 11/11/2008 21:41'!\rrelease\r\t\"self controller scalerAdjusters do:[:each| each topView controller closeAndUnscheduleNoTerminate].\t\r\tself controller scalerAdjusters: nil.\"\r\tsuper release! !\r!RVMKiviatView methodsFor: 'displaying' stamp: 'ssa 11/12/2008 13:16'!\rdisplayView\r\t\"Display my canvas at my offset.\r\tSubclasses should not override this method but should draw on the canvas instead\"\r\tself firstDisplay  ifFalse:[self firstDisplay:true.\r\t\tself drawOnCanvas].\r\tself okToDisplay ifFalse:[^self].\r\tself uncache.\r\tself canvas displayOn: Display at: self insetDisplayBox center - self canvas center clippingBox: self insetDisplayBox.\r\tself blinker  ifTrue:[(Form dotOfSize:5) displayOn: Display at: self insetDisplayBox center]\r! !\r!RVMKiviatView methodsFor: 'controller access' stamp: 'ssa 10/6/2008 13:35'!\rdefaultControllerClass\r\t^RVMKiviatController! !\r!RVMKiviatView methodsFor: 'listening' stamp: 'dmu 2/6/2009 22:35'!\rhear: something\r\t\"Update my traces and redisplay\"\r\tself firstDisplay ifFalse:[^self].\r\tself rescaleCounter: self rescaleCounter - 1.\r\tself rescaleCounter = 0 ifTrue:[self rescaleCounter:nil.  \r\t\tself resetScaling.]. \r\tself drawingBackground ifTrue:[^self].\r\tself drawOnCanvas.\r\tself displayView! !\r!RVMKiviatView class methodsFor: 'examples' stamp: 'ssa 10/6/2008 16:00'!\rexample\r\t\"RVMKiviatView example\"\r\tself openOnAspect: #bytesUseds! !\r!RVMKiviatView class methodsFor: 'instance creation' stamp: 'ssa 10/7/2008 13:58'!\ropenOnAspect: aSymbol\r\t\"RVMKiviatView example\"\r\t\r\t| topView v |\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\ttopView minimumSize: 300@250.\r\ttopView maximumSize: 600@500.\r\tv := self new.\r\tv borderWidth:1.\r\tv aspect: aSymbol.\r\ttopView addSubView: v.\r\ttopView label: v aspect.\r\ttopView controller open! !\r!RVMLabelView methodsFor: 'displaying' stamp: 'ssa 9/14/2008 20:45'!\rdisplayView\r\t| labelRect labelText labelForm |\r\tlabelText := self label asDisplayText .\r\r\tlabelText foregroundColor: self backgroundColor\r\t\t\tbackgroundColor: self foregroundColor.\r\tlabelForm := labelText\r\t\t\t asParagraph asForm scaledToSize:(self insetDisplayBox extent min: labelText boundingBox extent).\r\tlabelRect := self insetDisplayBox.\r\tDisplay fill: labelRect fillColor: self foregroundColor.\r\tlabelForm displayOn: Display at: labelRect center - labelForm boundingBox center clippingBox: labelRect\r\t\t\trule: Form paint fillColor: labelText foregroundColor.\r! !\r!RVMLabelView methodsFor: 'accessing' stamp: 'ssa 8/26/2008 22:55'!\rlabel\r\t\"Answer the value of label\"\r\r\tlabel isNil ifTrue:[^'no label yet'].\r\t^label! !\r!RVMLabelView methodsFor: 'accessing' stamp: 'ssa 8/26/2008 22:54'!\rlabel: anObject\r\t\"Set the value of label\"\r\r\tlabel := anObject! !\r!RVMAspectLabelView methodsFor: 'displaying' stamp: 'ssa 10/21/2008 11:31'!\rdisplayView\r\t| labelRect labelText labelForm |\rself uncache.\r\tlabelText := self label asDisplayText.\r\tlabelText foregroundColor: self foregroundColor\r\t\t\tbackgroundColor: self backgroundColor.\r\tlabelForm := labelText\r\t\t\t asParagraph asForm.\r\tlabelRect := self insetDisplayBox.\r\tDisplay fill: labelRect fillColor: self backgroundColor.\t\r\tlabelForm displayOn: Display at: labelRect leftCenter - labelForm boundingBox leftCenter + (2@0) clippingBox: labelRect\r\t\t\trule: Form paint fillColor: nil.\r\t\"Display border: (self insetDisplayBox insetBy: 1)width: 1 fillColor: self backgroundColor negated.\"\r! !\r!RVMAspectLabelView methodsFor: 'updating' stamp: 'ssa 9/17/2008 14:17'!\rupdate: aSymbol\r\r\taSymbol  = self getAspectSelector ifTrue:[self displayView ].\r\tsuper update: aSymbol! !\r!RVMAspectLabelView methodsFor: 'accessing' stamp: 'ssa 9/19/2008 12:51'!\raspect\r\r\t^self getAspectSelector isSymbol \r\t\tifTrue:[self model perform: self getAspectSelector]\r\t\tifFalse:[\"assume a block\"\r\t\t\tself getAspectSelector value]! !\r!RVMAspectLabelView methodsFor: 'accessing' stamp: 'ssa 9/17/2008 14:14'!\raspect: aSymbol\r\tself setAspectSelector isSymbol\r\t\tifTrue:[self model perform: self setAspectSelector with: aSymbol]\r\t\tifFalse:[\"assume a block\"\r\t\t\tself setAspectSelector value: aSymbol].\r! !\r!RVMAspectLabelView methodsFor: 'accessing' stamp: 'ssa 9/17/2008 13:15'!\raspects\r\t^self getAspectsSelector isSymbol \r\t\tifTrue:[self model perform: self getAspectsSelector]\r\t\tifFalse:[\"assume a block\"\r\t\t\tself getAspectsSelector value]! !\r!RVMAspectLabelView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 17:06'!\rbackgroundColor\r\r\t^Color white! !\r!RVMAspectLabelView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 16:36'!\rforegroundColor\r\r\t^Color black! !\r!RVMAspectLabelView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 16:14'!\rgetAspectSelector\r\t\"Answer the value of getAspectSelector\"\r\r\tgetAspectSelector isNil ifTrue:[self getAspectSelector: #aspect].\r\t^ getAspectSelector! !\r!RVMAspectLabelView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 16:13'!\rgetAspectSelector: anObject\r\t\"Set the value of getAspectSelector\"\r\r\tgetAspectSelector _ anObject! !\r!RVMAspectLabelView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 16:14'!\rgetAspectsSelector\r\t\"Answer the value of getAspectsSelector\"\r\r\tgetAspectsSelector isNil ifTrue:[self getAspectsSelector: #aspects].\r\t^ getAspectsSelector! !\r!RVMAspectLabelView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 16:13'!\rgetAspectsSelector: anObject\r\t\"Set the value of getAspectsSelector\"\r\r\tgetAspectsSelector _ anObject! !\r!RVMAspectLabelView methodsFor: 'accessing' stamp: 'ssa 9/17/2008 14:18'!\rlabel\r\r\t^self aspect! !\r!RVMAspectLabelView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 16:25'!\rlastAspect\r\t\"Answer the value of lastAspect\"\r\r\tlastAspect isNil ifTrue:[self lastAspect: #foo].\r\t^ lastAspect! !\r!RVMAspectLabelView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 16:25'!\rlastAspect: anObject\r\t\"Set the value of lastAspect\"\r\r\tlastAspect _ anObject! !\r!RVMAspectLabelView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 16:14'!\rsetAspectSelector\r\t\"Answer the value of setAspectSelector\"\r\r\tsetAspectSelector isNil ifTrue:[self setAspectSelector: #aspect:].\r\t^ setAspectSelector! !\r!RVMAspectLabelView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 16:13'!\rsetAspectSelector: anObject\r\t\"Set the value of setAspectSelector\"\r\r\tsetAspectSelector _ anObject! !\r!RVMAspectLabelView methodsFor: 'controller access' stamp: 'ssa 9/13/2008 16:16'!\rdefaultControllerClass\r\r\t^RVMAspectLabelController! !\r!RVMCoreIndexView methodsFor: 'displaying' stamp: 'ssa 11/16/2008 00:36'!\rdisplayView\r\t| labelRect labelText labelForm |\r\tself okToDisplay ifFalse:[^self].\r\tself uncache.\r\tlabelText := self label asDisplayText.\r\tlabelText foregroundColor: self foregroundColor\r\t\t\tbackgroundColor: self backgroundColor.\r\tlabelForm := labelText\r\t\t\t asParagraph asForm scaledToSize:(self insetDisplayBox extent min: labelText boundingBox extent).\r\tlabelRect := self insetDisplayBox.\r\tDisplay fill: labelRect fillColor: self backgroundColor.\t\r\tlabelForm displayOn: Display at: labelRect center - labelForm boundingBox center clippingBox: labelRect\r\t\t\trule: Form paint fillColor: nil.\r\t\"Display border: (self insetDisplayBox insetBy: 1)width: 1 fillColor: self backgroundColor negated.\"\r! !\r!RVMCoreIndexView methodsFor: 'controller access' stamp: 'ssa 1/1/1970 00:14'!\rdefaultControllerClass\r\r\t^RVMCoreIndexController! !\r!RVMCoreIndexView methodsFor: 'updating' stamp: 'ssa 11/16/2008 00:24'!\rhear: something\r\r\tself displayView! !\r!RVMCoreIndexView methodsFor: 'updating' stamp: 'ssa 1/1/1970 00:12'!\rupdate: aSymbol\r\r\taSymbol  = self getCoreIndex ifTrue:[self displayView ].\r\tsuper update: aSymbol! !\r!RVMCoreIndexView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:18'!\ravailableIndicies\r\t\"Answer the number of indices available\"\r\t^self getAvailableIndicies isSymbol \r\t\tifTrue:[self model perform: self getAvailableIndicies]\r\t\tifFalse:[\"assume a block\"\r\t\t\tself getAvailableIndicies value]! !\r!RVMCoreIndexView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:11'!\rcoreIndex\r\r\t^self getCoreIndex isSymbol \r\t\tifTrue:[self model perform: self getCoreIndex]\r\t\tifFalse:[\"assume a block\"\r\t\t\tself getCoreIndex value]! !\r!RVMCoreIndexView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:11'!\rcoreIndex: aValue\r\tself setCoreIndex isSymbol\r\t\tifTrue:[self model perform: self setCoreIndex with: aValue]\r\t\tifFalse:[\"assume a block\"\r\t\t\tself setCoreIndex value: aValue].\r! !\r!RVMCoreIndexView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:18'!\rgetAvailableIndicies\r\t\"Answer the value of getAvailableIndicies\"\r\r\tgetAvailableIndicies isNil ifTrue:[self getAvailableIndicies: [RVMMonitor lastSample  groupStats groupSize]].\r\t^ getAvailableIndicies! !\r!RVMCoreIndexView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:17'!\rgetAvailableIndicies: anObject\r\t\"Set the value of getAvailableIndicies\"\r\r\tgetAvailableIndicies _ anObject! !\r!RVMCoreIndexView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:07'!\rgetCoreIndex\r\t\"Answer the value of getCoreIndex\"\r\r\tgetCoreIndex isNil ifTrue:[self getCoreIndex: #coreIndex].\r\t^ getCoreIndex! !\r!RVMCoreIndexView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:06'!\rgetCoreIndex: anObject\r\t\"Set the value of getCoreIndex\"\r\r\tgetCoreIndex _ anObject! !\r!RVMCoreIndexView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:31'!\rlabel\r\r\t^self coreIndex printString! !\r!RVMCoreIndexView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:07'!\rsetCoreIndex\r\t\"Answer the value of setCoreIndex\"\r\r\tsetCoreIndex isNil ifTrue:[self setCoreIndex: #coreIndex:].\r\t^ setCoreIndex! !\r!RVMCoreIndexView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:06'!\rsetCoreIndex: anObject\r\t\"Set the value of setCoreIndex\"\r\r\tsetCoreIndex _ anObject! !\r!RVMLabelView class methodsFor: 'instance creation' stamp: 'ssa 8/26/2008 23:02'!\rlabel: aString\r\r\t| view |\r\tview := self new.\r\tview label: aString.\r\t^view! !\r!RVMAspectLabelView class methodsFor: 'instance creation' stamp: 'ssa 9/17/2008 13:27'!\ron: anObject\r\t\"Answer a label view that will send #aspect to this object to find its label\"\r\t| view |\r\tview := self new.\r\tview model: anObject.\r\t^view! !\r!RVMAspectLabelView class methodsFor: 'instance creation' stamp: 'ssa 9/17/2008 14:04'!\ron: anObject getAllAspectsWith: getAspectsSelector getCurrentAspectWith: getAspectSelector setNewAspectWith: setAspectSelector\r\t\"Answer an aspect view that can probe and change the aspect of its aspectee.\r\tNote 'selector' arguments can be symbols or blocks\"\r\t| view |\r\tview := self new.\r\tview model: anObject.\r\tview getAspectsSelector: getAspectsSelector.\r\tview getAspectSelector: getAspectSelector.\r\tview setAspectSelector: setAspectSelector.\r\t^view! !\r!RVMAspectLabelView class methodsFor: 'examples' stamp: 'ssa 9/17/2008 13:31'!\rexample\r\t\"RVMAspectLabelView example\"\r\t| topView view |\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\ttopView minimumSize: 100@25.\r\ttopView maximumSize: 200@50.\r\tview _ self on: view \r\t\tgetAllAspectsWith: [{ #foo. #bar. #baz. #waz }] \r\t\tgetCurrentAspectWith: #lastAspect \r\t\tsetNewAspectWith: #lastAspect:.\r\tview model: view.\r\ttopView addSubView: view.\r\ttopView label: 'Aspect Button'.\r\ttopView controller open! !\r!RVMAspectLabelView class methodsFor: 'examples' stamp: 'ssa 9/17/2008 13:31'!\rexampleMany\r\t\"RVMAspectLabelView exampleMany\"\r\t| topView view1 view2 view3 |\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\ttopView minimumSize: 100@75.\r\ttopView maximumSize: 200@100.\r\tview1 _ self on: view1 \r\t\tgetAllAspectsWith: [{ #foo. #bar. #baz. #waz }] \r\t\tgetCurrentAspectWith: #lastAspect \r\t\tsetNewAspectWith: #lastAspect:.\r\tview1 on: view1.\r\tview2 _ self on: view2 \r\t\tgetAllAspectsWith: [{ #foo. #bar. #baz. #waz }] \r\t\tgetCurrentAspectWith: #lastAspect \r\t\tsetNewAspectWith: #lastAspect:.\r\tview2 on: view2.\r\tview3 _ self on: view3 \r\t\tgetAllAspectsWith: [{ #foo. #bar. #baz. #waz }] \r\t\tgetCurrentAspectWith: #lastAspect \r\t\tsetNewAspectWith: #lastAspect:.\r\tview3 on: view3.\r\ttopView addSubView: view1.\r\ttopView addSubView: view2 below: view1.\r\ttopView addSubView: view3 below: view2.\r\ttopView label: 'Aspect Button'.\r\ttopView controller open! !\r!RVMAspectLabelView class methodsFor: 'examples' stamp: 'ssa 9/17/2008 13:32'!\rexampleWithColorButton\r\t\"RVMAspectLabelView exampleWithColorButton\"\r\t| topView view colorButton |\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\ttopView minimumSize: 100@25.\r\ttopView maximumSize: 200@50.\r\tview _ self on: view \r\t\tgetAllAspectsWith: [{ #foo. #bar. #baz. #waz }] \r\t\tgetCurrentAspectWith: #lastAspect \r\t\tsetNewAspectWith: #lastAspect:.\r\tview model: view.\r\tcolorButton _ RVMColorButtonView new.\r\ttopView addSubView: view in: (0@0 extent: 5/6 @ 1) borderWidth:0.\r\ttopView addSubView: colorButton in: (5/6@0 extent: 1/6@1) borderWidth:0.\r\ttopView label: 'Aspect Button'.\r\ttopView controller open! !\r!RVMCoreIndexView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:30'!\rexample\r\t\"RVMCoreIndexView example\"\r\tself exampleInstance demo! !\r!RVMCoreIndexView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:30'!\rexampleInstance\r\t\"RVMCoreIndexView exampleInstance\"\r\t^self on: RVMCoreAspectTrace exampleInstance\r\t\tgetCoreIndex:#coreIndex\r\t\tsetCoreIndex: #coreIndex:\r\t\tgetAvailableIndicies: [RVMMonitor lastSample  groupStats groupSize]! !\r!RVMCoreIndexView class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:28'!\ron: aModel getCoreIndex: getter setCoreIndex: setter getAvailableIndicies: maxIndexGetter\r\r\t| view |\r\tview _ self new.\r\tview model: aModel;\r\t\tgetCoreIndex: getter;\r\t\tsetCoreIndex: setter;\r\t\tgetAvailableIndicies: maxIndexGetter.\r\t^view! !\r!RVMMinMaxView class methodsFor: 'examples' stamp: 'ssa 9/13/2008 20:54'!\rexample\r\t\"RVMMinMaxView example\"\r\t| topView |\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\ttopView minimumSize: 100@50.\r\ttopView maximumSize: 200@100.\r\ttopView addSubView: self exampleInstance.\r\ttopView label: 'MinMax'.\r\ttopView controller open! !\r!RVMMinMaxView class methodsFor: 'examples' stamp: 'ssa 9/17/2008 13:56'!\rexampleInstance\r\r\t| scaler |\r\tscaler _ RVMDataScaler exampleInstance.\r\t^self on: scaler\r\t\tgetMin:  [scaler min]\r\t\tsetMin:[:v| scaler min: v]\r\t\tgetMax:  [scaler max]\r\t\tsetMax: [:v| scaler max: v].\r\t! !\r!RVMMinMaxView class methodsFor: 'instance creation' stamp: 'ssa 9/17/2008 13:53'!\ron: aModel getMin: getMin setMin: setMin getMax: getMax setMax: setMax\r\t| view v |\r\tview _ self new.\r\tview addSubView: (v _ RVMValueView on: aModel valueGetter: getMin valueSetter: setMin label:'m').\r\tview addSubView: (RVMValueView on: aModel valueGetter: getMax valueSetter: setMax  label:'M') above: v.\r\t^view! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 11/11/2008 17:20'!\radjustScaleBox\r\t\"Answer the value of adjustScaleBox\"\r\r\tadjustScaleBox isNil ifTrue:[self adjustScaleBox: self insetDisplayBox].\r\t^ adjustScaleBox! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 11/11/2008 17:20'!\radjustScaleBox: anObject\r\t\"Set the value of adjustScaleBox\"\r\r\tadjustScaleBox _ anObject! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 11/11/2008 23:14'!\raspects\r\t\"Answer the value of aspects\"\r\r\taspects isNil ifTrue:[self aspects: RVMMulticoreSample systemAspects].\r\t^ aspects! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 11/11/2008 23:12'!\raspects: anObject\r\t\"Set the value of aspects\"\r\r\taspects _ anObject! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/10/2008 18:39'!\rbackgroundCanvas\r\t\"Answer the value of backgroundCanvas\"\r\r\tbackgroundCanvas isNil ifTrue:[ self backgroundCanvas:(ColorForm extent: self canvasExtent depth:8).\r\t\tself spokePens do:[:pen| pen destForm: backgroundCanvas].\r\t\tself drawBackgroundCanvas.].\r\t^ backgroundCanvas! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 13:53'!\rbackgroundCanvas: anObject\r\t\"Set the value of backgroundCanvas\"\r\r\tbackgroundCanvas _ anObject\r! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 11/12/2008 13:17'!\rblinker\r\t\"Answer the value of blinker\"\r\r\tblinker isNil ifTrue:[self blinker: true].\r\tself blinker: blinker not.\r\t^ blinker! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 11/12/2008 13:18'!\rblinker: anObject\r\t\"Set the value of blinker\"\r\r\tblinker _ anObject! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/10/2008 18:39'!\rcanvas\r\t\"Answer the value of canvas\"\r\r\tcanvas isNil ifTrue:[self canvas: (ColorForm extent: self canvasExtent depth:8)].\r\t^ canvas! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 14:11'!\rcanvas: anObject\r\t\"Set the value of canvas\"\r\r\tcanvas _ anObject.\r\tself webPen destForm: anObject.\r\tself spokePens:nil! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/8/2008 18:00'!\rcanvasExtent\r\t\"Answer the extent of my canvas\"\r\t^self insetDisplayBox extent  ! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 13:38'!\rcenter\r\r\t^self canvas center! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 17:08'!\rcenterMargin\r\t\"the distance from center to the start of a spoke\"\r\t^20! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 11/12/2008 10:36'!\rcolors\r\t\"Answer the value of colors\"\r\r\tcolors isNil ifTrue:[self colors: ((Color wheel: self coreIndicies size) \"collect:[:each| each darker darker]\")\r\t\t].\r\t^ colors! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 11/12/2008 09:38'!\rcolors: anObject\r\t\"Set the value of colors\"\r\r\tcolors _ anObject! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 11/12/2008 10:34'!\rcoreIndicies\r\t\"Answer the value of coreIndicies\"\r\r\tcoreIndicies isNil ifTrue:[self coreIndicies: (1 to: RVMMonitor coreCount) asOrderedCollection].\r\t^ coreIndicies! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 11/12/2008 09:50'!\rcoreIndicies: anObject\r\t\"Set the value of coreIndicies\"\r\r\tcoreIndicies _ anObject! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 14:13'!\rdiameter\r\t\"Answer the smallest square diameter for this view's box\"\r\t^self canvas height < self canvas width\r\t\tifTrue:[self canvas height- (self labelRowCount * 10)]\r\t\tifFalse:[self canvas width - 20]! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 14:17'!\rdrawingBackground\r\t\"Answer the value of drawingBackground\"\r\r\tdrawingBackground isNil ifTrue:[self drawingBackground: false].\r\t^ drawingBackground! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 14:17'!\rdrawingBackground: anObject\r\t\"Set the value of drawingBackground\"\r\r\tdrawingBackground _ anObject! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/8/2008 18:52'!\rfirstDisplay\r\t\"Answer the value of firstDisplay\"\r\r\tfirstDisplay isNil ifTrue:[self firstDisplay: false].\r\t^ firstDisplay! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/8/2008 15:13'!\rfirstDisplay: anObject\r\t\"Set the value of firstDisplay\"\r\r\tfirstDisplay _ anObject! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 11/12/2008 10:56'!\rindexIcons\r\t\"Answer the value of indexIcons\"\r\r\tindexIcons isNil ifTrue:[self indexIcons: self buildIndexIcons].\r\t^ indexIcons! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 11/12/2008 10:56'!\rindexIcons: anObject\r\t\"Set the value of indexIcons\"\r\r\tindexIcons _ anObject! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 01:18'!\rlabelRowCount\r\t\"How many rows of labels will I have?\"\r\t^2! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 14:37'!\rmajorTicLength\r\t\r\t^8! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 14:35'!\rmajorTicSpacing\r\r\t^self spokeLength / (self numberOfMajorTics - 1) asFloat! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 14:36'!\rminorTicLength\r\t\r\t^4! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 14:36'!\rminorTicSpacing\r\r\t^self majorTicSpacing /( self numberOfMinorTics + 1)! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 14:38'!\rnumberOfMajorTics\r\r\t^3! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 14:37'!\rnumberOfMinorTics\r\r\t^1! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 13:56'!\rradius\r\t\"Answer the smallest radius for this view's box\"\r\t^self diameter // 2! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/20/2008 10:25'!\rrescaleCounter\r\t\"Answer the value of rescaleCounter\"\r\r\trescaleCounter isNil ifTrue:[self rescaleCounter: self rescaleCounterDefault].\r\t^ rescaleCounter! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 15:02'!\rrescaleCounter: anObject\r\t\"Set the value of rescaleCounter\"\r\r\trescaleCounter _ anObject! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/20/2008 10:25'!\rrescaleCounterDefault\r\t\"Answer the value of rescaleCounterDefault\"\r\r\trescaleCounterDefault isNil ifTrue:[self rescaleCounterDefault: 10].\r\t^ rescaleCounterDefault! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/20/2008 10:25'!\rrescaleCounterDefault: anObject\r\t\"Set the value of rescaleCounterDefault\"\r\r\trescaleCounterDefault _ anObject! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 11/11/2008 23:15'!\rscalers\r\t\"Answer the value of scalers\"\r\r\tscalers isNil ifTrue:[self scalers: (self aspects collect:[:each| RVMDataScaler new automatic])].\r\t^ scalers! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 11/11/2008 23:12'!\rscalers: anObject\r\t\"Set the value of scalers\"\r\r\tscalers _ anObject! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 22:07'!\rspokeColor\r\t\"Answer the value of spokeColor\"\r\r\tspokeColor isNil ifTrue:[self spokeColor: Color gray lighter lighter].\r\t^ spokeColor! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 13:21'!\rspokeColor: anObject\r\t\"Set the value of spokeColor\"\r\r\tspokeColor _ anObject! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 14:30'!\rspokeLength\r\r\t^self radius - self centerMargin - 5! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 11:25'!\rspokePens\r\t\"Answer the value of spokePens\"\r\r\tspokePens isNil ifTrue:[self spokePens: self initializeSpokePens].\r\t^ spokePens! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 11:22'!\rspokePens: anObject\r\t\"Set the value of spokePens\"\r\r\tspokePens _ anObject! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 13:21'!\rwebColor\r\t\"Answer the value of webColor\"\r\r\twebColor isNil ifTrue:[self webColor: Color blue].\r\t^ webColor! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 13:21'!\rwebColor: anObject\r\t\"Set the value of webColor\"\r\r\twebColor _ anObject! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 17:06'!\rwebPen\r\t\"Answer the value of webPen\"\r\r\twebPen isNil ifTrue:[self webPen: Pen new.\r\t\twebPen color: self webColor.\r\t\twebPen defaultNib:2.\r\t\twebPen  combinationRule: Form over.\r\t\twebPen destForm: self canvas].\r\t^ webPen! !\r!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 13:29'!\rwebPen: anObject\r\t\"Set the value of webPen\"\r\r\twebPen _ anObject! !\r!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 11/11/2008 17:19'!\radjustScaleIcon\r^((ColorForm\r\textent: 16@31\r\tdepth: 8\r\tfromArray: #( 0 0 0 0 0 0 169614364 622594560 0 0 1694498815 4294913536 0 0 1845490943 4294915840 0 0 0 3506384384 0 0 0 3506386688 73 1677721600 0 3657379328 163 3642490880 0 3506386688 9716 4287692800 172 4110364160 46591 4294913536 208 4110366464 4259839 4294936576 0 3506384384 8973264 4106150400 0 3657381632 6558618 3942664503 0 3506384384 154 3942645760 0 3657381632 154 3942645760 25700 3808374272 154 3942645760 60415 4294915840 154 3942645760 18761 3808374272 154 3942645760 0 3506386688 2424986 3942648357 0 3657379328 11304867 3947480869 0 3506386688 7798783 4294948096 0 3506384384 1300991 4294925056 217 4294915840 25855 4291821568 145 3959369216 199 4098424832 0 3657381632 118 2432696320 0 3506384384 28 620756992 0 3506386688 0 0 0 3657379328 0 0 1541003737 4110366464 0 0 1694498815 4294913536 0 0 321795886 1227753984 0 0 0 0)\r\toffset: 0@0)\r\tcolorsFromArray: #(#(1.0 1.0 1.0) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0)  ))! !\r!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 11/12/2008 11:21'!\rbuildIndexIcons\r\r\t| icon label |\r\t^self coreIndicies collect:[:index|\r\t\tlabel _ index printString asDisplayText .\r\t\tlabel foregroundColor: Color black backgroundColor: Color transparent.\r\t\ticon _ self iconCircle.\r\t\tlabel align: label boundingBox center with: icon boundingBox center.\r\t\tlabel displayOn: icon at: 0@-2.\r\t\ticon offset: icon boundingBox center negated.\r\t\ticon]! !\r!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 11/11/2008 17:34'!\rdrawAdjustScaleIcon\r\t| adjustIcon origin |\r.\r\tadjustIcon _ self adjustScaleIcon.\r\torigin _ self backgroundCanvas boundingBox leftCenter - adjustIcon boundingBox leftCenter + (4@0).\r\tadjustIcon displayOn: self backgroundCanvas at: origin.\r\tself adjustScaleBox:(origin extent: adjustIcon extent)! !\r!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 11/12/2008 12:59'!\rdrawBackgroundCanvas\r\tself drawingBackground: true.\r\tself backgroundCanvas fillWhite.\r\tself drawSpokes.\r\t\"self drawAdjustScaleIcon.\"\r\t\"self drawLabelsOnBackground.\"\r\tself drawingBackground: false.\r\t! !\r!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 11/11/2008 23:18'!\rdrawCounterOnCanvas\r\t|  counterLabel |\r\tcounterLabel _ ('rescale\rin: ',self rescaleCounter printString ) asDisplayText.\r\tcounterLabel displayOn: self canvas at: self canvas boundingBox bottomRight -(counterLabel width@90).\r! !\r!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 11/12/2008 10:27'!\rdrawLabelsOnBackground\r\t\r\t| labels count origin coreNameText |\r\tlabels _ self coreIndicies isEmpty ifTrue:[Array with:'System Aspects']ifFalse:[self coreIndicies collect:[:each| 'Core #',each printString]].\r\tcount _ 1.\r\torigin _ 2@-4.\r\tlabels do:[:coreName|\r\t\tcoreNameText _ coreName asDisplayText.\r\t\tcoreNameText foregroundColor: (self colors at: count) backgroundColor: Color transparent.\r\t\tcoreNameText displayOn: self backgroundCanvas at:  origin.\r\t\torigin  _ origin + (0@coreNameText height).\r\t\tcount = (labels size //2) ifTrue:[origin _ self canvas boundingBox topRight - (coreNameText width @0)].\r\t\tcount _ count + 1]\r! !\r!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 10/6/2008 14:16'!\rdrawMajorTicUsing: pen\r\r\tpen turn:90; go: self majorTicLength/2;turn:180;down;go:self majorTicLength;up;\r\t\t\tturn:180; go: self majorTicLength/2;turn:-90! !\r!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 10/6/2008 14:16'!\rdrawMinorTicUsing: pen\r\r\tpen turn:90; go: self minorTicLength/2;turn:180;down;go:self minorTicLength;up;\r\t\t\tturn:180; go: self minorTicLength/2;turn:-90! !\r!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 11/12/2008 11:43'!\rdrawOnCanvas\r\tself drawingBackground ifTrue:[^self].\r\tself backgroundCanvas displayOn: self canvas at: 0@0.\r\t\"self drawCounterOnCanvas.\"\r\tself drawWeb.\r! !\r!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 11/11/2008 23:24'!\rdrawSpokes\r\r\t| pen label labelOffsets labelOffset |\r\t1 to: self spokePens size do:[:index|\r\t\tpen _ self spokePens at: index.\r\t\tpen destForm: self backgroundCanvas.\r\t\tpen place: self center.\r\t\tpen up; go: self centerMargin.\r\t\tpen down;go: self spokeLength;up.\r\t\tlabel _ (self aspects at: index) asString asDisplayText asParagraph asForm.\r\t\t\"self diameter < 300 ifTrue:[label _ label scaledToSize: 11@11].\"\r\t\tlabelOffsets _ {0@label height negated.  0@0. label width negated@0.  label extent negated}.\r\t\tlabelOffset _ labelOffsets at: ((index - 1// (self spokePens size / 4) + 1) min:4).\r\t\tlabel displayOn: self backgroundCanvas at: pen location + labelOffset clippingBox: self backgroundCanvas boundingBox rule: Form paint fillColor: nil.\r\t\tself drawTicsUsing: pen]\r\t\t! !\r!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 10/6/2008 11:54'!\rdrawTicsUsing: pen\r\r\tpen up;place: self center;go:self centerMargin.\r\tself drawMajorTicUsing: pen.\r\tself numberOfMajorTics - 1 timesRepeat:[\r\t\tself numberOfMinorTics timesRepeat:[\r\t\t\tpen go: self minorTicSpacing.\r\t\t\tself drawMinorTicUsing: pen].\r\t\tpen go: self minorTicSpacing.\r\t\tself drawMajorTicUsing: pen].\r\t! !\r!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 11/12/2008 13:06'!\rdrawWeb\r\tself coreIndicies isEmpty ifTrue:[^self drawWebSystem].\r\tself coreIndicies do:[:index|\r\t\tself placeSpokePensForCore: index.\r\t\tself webPen color: (self colors at: (self coreIndicies indexOf: index)).\r\t\tself webPen combinationRule: Form paint.\r\t\tself webPen up;place: self spokePens first location;down.\r\t\tself spokePens do:[:pen|\r\t\t\tself webPen goto: pen location].\r\t\tself webPen goto: self spokePens first location;up].\r\tself coreIndicies  \"shuffled\" do:[:index|\r\t\t\t\tself placeIconsForCore: index]\r\r\t! !\r!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 11/12/2008 10:07'!\rdrawWebSystem\r\tself drawingBackground ifTrue:[^self].\r\tself placeSpokePens.\r\tself webPen color: self webColor.\r\tself webPen up;place: self spokePens first location;down.\r\tself spokePens do:[:pen|\r\t\tself webPen goto: pen location].\r\tself webPen goto: self spokePens first location;up\r\t! !\r!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 11/12/2008 11:12'!\riconCircle\r\r\t| icon aForm aCircle |\r\ticon _ Form extent:18@18 depth: Display depth.\r\taForm _ Form extent: 1@1.\r\taForm fillBlack.\r\taCircle _ Circle new.\r\taCircle form: aForm.\r\taCircle radius: 9.\r\taCircle center: 8@8.\r\taCircle displayOn: icon.\r\t^icon! !\r!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 11/12/2008 12:46'!\rplaceIconsForCore: anIndex\r\r\t| data scaledDatum offset aspectIndex |\r\tdata _ anIndex > 0 ifTrue:[self aspects collect:[:aspect| (RVMMonitor lastSample perform: aspect) at: anIndex]] ifFalse:[self aspects collect:[:aspect| RVMMonitor lastSample perform: aspect]].\r\toffset _ self aspects size > 0 ifTrue:[0]ifFalse:[((anIndex) - 1)*8/5].\r\taspectIndex _ 1.\r\tdata with: self spokePens do:[:datum :pen|\r\t\tpen up;place: self center;turn: offset negated;go:self centerMargin.\r\t\tscaledDatum _ (self scalers at: aspectIndex) scale: datum.\r\t\tpen go:(self spokeLength /100.0*(scaledDatum)).\r\t\tpen turn: offset.\r\t\taspectIndex _ aspectIndex + 1.\r\t\t(self indexIcons at: (self coreIndicies indexOf: anIndex)) displayOn: self canvas at: pen location].\r! !\r!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 11/12/2008 02:26'!\rplaceSpokePens\r\r\t| data index |\r\tdata _ self coreIndex > 0 ifTrue:[self aspects collect:[:aspect| (RVMMonitor lastSample perform: aspect) at: self coreIndex]] ifFalse:[self aspects collect:[:aspect| RVMMonitor lastSample perform: aspect]].\r\tindex _ 0.\r\tdata with: self spokePens do:[:datum :pen|\r\t\tindex _ index + 1.\r\t\tpen up;place: self center;go:self centerMargin.\r\t\tpen go:(self spokeLength /100.0*((self scalers at: index) scale: datum))].\r! !\r!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 11/12/2008 12:45'!\rplaceSpokePensForCore: anIndex\r\r\t| data scaledDatum offset aspectIndex |\r\tdata _ anIndex > 0 ifTrue:[self aspects collect:[:aspect| (RVMMonitor lastSample perform: aspect) at: anIndex]] ifFalse:[self aspects collect:[:aspect| RVMMonitor lastSample perform: aspect]].\r\toffset _ self aspects size > 0 ifTrue:[0]ifFalse:[((anIndex) - 1)*8/5].\r\taspectIndex _ 1.\r\tdata with: self spokePens do:[:datum :pen|\r\t\tpen color: (self colors at: (self coreIndicies indexOf: anIndex)).\r\t\tpen up;place: self center;turn: offset negated;go:self centerMargin.\r\t\tscaledDatum _ (self scalers at: aspectIndex) scale: datum.\r\t\tpen go:(self spokeLength /100.0*(scaledDatum)).\r\t\tpen turn: offset.\r\t\taspectIndex _ aspectIndex + 1].\r! !\r!RVMMultiAspectKiviatView methodsFor: 'framing' stamp: 'ssa 10/8/2008 15:20'!\rfirstFrame\r\t! !\r!RVMMultiAspectKiviatView methodsFor: 'framing' stamp: 'ssa 10/8/2008 19:20'!\rnewFrame\r\tself canvas:nil.\r\tself backgroundCanvas:nil.\r\tself drawOnCanvas.\r\tDisplay fill: self insetDisplayBox fillColor: Color white.\r\tself displayView! !\r!RVMMultiAspectKiviatView methodsFor: 'scaling' stamp: 'ssa 11/11/2008 23:06'!\rresetScaling\r\r\tself scalers do:[:each| each resetScaling].\r! !\r!RVMMultiAspectKiviatView methodsFor: 'initialize-release' stamp: 'ssa 11/11/2008 23:05'!\rinitializeSpokePens\r\r\t| pens numberOfSpokes spacing center pen |\r\tpens _ OrderedCollection new.\r\tnumberOfSpokes _ self aspects size.\r\tspacing _ 360 / numberOfSpokes asFloat.\r\tcenter _ self insetDisplayBox center.\r\tnumberOfSpokes timesRepeat:[\r\t\tpen _ Pen new.\r\t\tpen defaultNib:1.\r\t\tpen  combinationRule: Form over.\r\t\tpen color: self spokeColor.\r\t\tpen place: center.\r\t\tpen north.\r\t\tpen turn: pens size * spacing.\r\t\tpens add: pen].\r\t^pens! !\r!RVMMultiAspectKiviatView methodsFor: 'initialize-release' stamp: 'ssa 11/11/2008 21:41'!\rrelease\r\t\"self controller scalerAdjusters do:[:each| each topView controller closeAndUnscheduleNoTerminate].\t\r\tself controller scalerAdjusters: nil.\"\r\tsuper release! !\r!RVMMultiAspectKiviatView methodsFor: 'displaying' stamp: 'ssa 11/12/2008 13:18'!\rdisplayView\r\t\"Display my canvas at my offset.\r\tSubclasses should not override this method but should draw on the canvas instead\"\r\tself firstDisplay  ifFalse:[self firstDisplay:true.\r\t\tself drawOnCanvas].\r\tself okToDisplay ifFalse:[^self].\r\tself uncache.\r\tself canvas displayOn: Display at: self insetDisplayBox center - self canvas center clippingBox: self insetDisplayBox.\r\tself blinker  ifTrue:[(Form dotOfSize:5) displayOn: Display at: self insetDisplayBox center]\r\r! !\r!RVMMultiAspectKiviatView methodsFor: 'controller access' stamp: 'ssa 10/6/2008 13:35'!\rdefaultControllerClass\r\t^RVMMultiAspectKiviatController! !\r!RVMMultiAspectKiviatView methodsFor: 'listening' stamp: 'dmu 2/6/2009 22:35'!\rhear: something\r\t\"Update my traces and redisplay\"\r\tself firstDisplay ifFalse: [^self].\r\tself rescaleCounter: self rescaleCounter - 1.\r\tself rescaleCounter = 0 ifTrue:[self rescaleCounter:nil.  \r\t\tself resetScaling.]. \r\tself drawingBackground ifTrue:[^self].\r\tself drawOnCanvas.\r\tself displayView! !\r!RVMMultiAspectKiviatView class methodsFor: 'aspect subsets' stamp: 'ssa 11/13/2008 02:02'!\rallCoreAspects\r\t^RVMMulticoreSample coreAspects! !\r!RVMMultiAspectKiviatView class methodsFor: 'aspect subsets' stamp: 'ssa 11/12/2008 12:53'!\rcoreAspectSubset\r\t\"RVMMultiAspectKiviatView openOnAspects:  RVMMultiAspectKiviatView coreAspectSubset forCores:(1 to: RVMMonitor coreCount) asOrderedCollection titled:'Outliers'\"\r\t^#(   bytecodesPerSecond   bytesUseds  contextChangeCounts interruptCheckCounts  unforcedInterruptCheckCounts yieldsPerSecond )! !\r!RVMMultiAspectKiviatView class methodsFor: 'aspect subsets' stamp: 'ssa 11/12/2008 12:54'!\rcoreAspectSubsetAllocationCompaction\r\t\"RVMMultiAspectKiviatView openOnAspects:  RVMMultiAspectKiviatView coreAspectSubsetAllocationCompaction forCores:(1 to: RVMMonitor coreCount) asOrderedCollection  titled:'Outliers: Allocation/Compaction'\"\r\t^#(allocationsReadWrites allocationsReadMostlys allocationsTotal  compactionsReadWrites compactionsReadMostlys compactionsTotal  )! !\r!RVMMultiAspectKiviatView class methodsFor: 'aspect subsets' stamp: 'ssa 11/12/2008 12:54'!\rcoreAspectSubsetBytecodes\r\t\"RVMMultiAspectKiviatView openOnAspects:  RVMMultiAspectKiviatView coreAspectSubsetBytecodes forCores:(1 to: RVMMonitor coreCount) asOrderedCollection titled:'Outliers: Bytecodes'\"\r\t^#( bytecodeCounts bytecodesPerCycles  bytecodesPerSecond )! !\r!RVMMultiAspectKiviatView class methodsFor: 'aspect subsets' stamp: 'ssa 11/12/2008 12:54'!\rcoreAspectSubsetBytes\r\t\"RVMMultiAspectKiviatView openOnAspects:  RVMMultiAspectKiviatView coreAspectSubsetBytes forCores:(1 to: RVMMonitor coreCount) asOrderedCollection titled:'Outliers: Bytes'\"\r\t^#(bytesLeftReadWrites bytesLeftReadMostlys bytesLefts bytesUsedReadWrites bytesUsedReadMostlys bytesUseds )! !\r!RVMMultiAspectKiviatView class methodsFor: 'aspect subsets' stamp: 'ssa 11/12/2008 12:55'!\rcoreAspectSubsetRunWait\r\t\"RVMMultiAspectKiviatView openOnAspects:  RVMMultiAspectKiviatView coreAspectSubsetRunWait forCores:(1 to: RVMMonitor coreCount) asOrderedCollection titled:'Outliers: RunWait'\"\r\t^#(millisecondsRunnings millisecondsWaitings msRunWaitRatios msSinceLasts )! !\r!RVMMultiAspectKiviatView class methodsFor: 'aspect subsets' stamp: 'ssa 11/12/2008 12:55'!\rcoreAspectSubsetYields\r\t\"RVMMultiAspectKiviatView openOnAspects:  RVMMultiAspectKiviatView coreAspectSubsetYields forCores:(1 to: RVMMonitor coreCount) asOrderedCollection titled:'Outliers: Yields'\"\r\t^#(unforcedInterruptCheckCounts yieldCounts yieldFrequencies yieldsPerSecond )! !\r!RVMMultiAspectKiviatView class methodsFor: 'examples' stamp: 'ssa 11/11/2008 23:18'!\rexample\r\t\"RVMMultiAspectKiviatView example\"\r\tself openOnAspects: RVMMulticoreSample systemAspects! !\r!RVMMultiAspectKiviatView class methodsFor: 'examples' stamp: 'ssa 11/12/2008 10:26'!\rexample10Cores\r\t\"RVMMultiAspectKiviatView example10Cores\"\r\tself openOnAspects: RVMMulticoreSample coreAspects forCores: #(1 2 3 4 5 6 7 8 9 10)! !\r!RVMMultiAspectKiviatView class methodsFor: 'examples' stamp: 'ssa 11/12/2008 10:50'!\rexample10CoresSubset1\r\t\"RVMMultiAspectKiviatView example10CoresSubset1\"\r\tself openOnAspects: self coreAspectSubset forCores: #(1 2 3 4 5 6 7 8 9 10)! !\r!RVMMultiAspectKiviatView class methodsFor: 'examples' stamp: 'ssa 11/12/2008 10:34'!\rexample20Cores\r\t\"RVMMultiAspectKiviatView example20Cores\"\r\tself openOnAspects: RVMMulticoreSample coreAspects forCores: (1 to: 20) asOrderedCollection! !\r!RVMMultiAspectKiviatView class methodsFor: 'examples' stamp: 'ssa 11/12/2008 11:53'!\rexampleAllCores\r\t\"RVMMultiAspectKiviatView exampleAllCores\"\r\tself openOnAspects: RVMMulticoreSample coreAspects forCores:(1 to: RVMMonitor coreCount) asOrderedCollection! !\r!RVMMultiAspectKiviatView class methodsFor: 'examples' stamp: 'ssa 11/12/2008 11:53'!\rexampleAllCoresSubset1\r\t\"RVMMultiAspectKiviatView exampleAllCoresSubset1\"\r\tself openOnAspects:  self coreAspectSubset forCores:(1 to: RVMMonitor coreCount) asOrderedCollection! !\r!RVMMultiAspectKiviatView class methodsFor: 'examples' stamp: 'ssa 11/12/2008 02:24'!\rexampleCore5\r\t\"RVMMultiAspectKiviatView exampleCore5\"\r\tself openOnAspects: RVMMulticoreSample coreAspects forCore: 5! !\r!RVMMultiAspectKiviatView class methodsFor: 'examples' stamp: 'ssa 11/12/2008 10:45'!\rexampleSubset1\r\t\"RVMMultiAspectKiviatView exampleSubset1\"\r\tself openOnAspects: self coreAspectSubset! !\r!RVMMultiAspectKiviatView class methodsFor: 'instance creation' stamp: 'ssa 11/11/2008 23:17'!\ropenOnAspect: aSymbol\r\t\"RVMMultiAspectKiviatView example\"\r\t\r\tself openOnAspects: (Array with: aSymbol)! !\r!RVMMultiAspectKiviatView class methodsFor: 'instance creation' stamp: 'ssa 11/12/2008 11:44'!\ropenOnAspects: someSymbols\r\t\"RVMMultiAspectKiviatView example\"\r\t\r\t| topView v |\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\ttopView minimumSize: 600@250.\r\ttopView maximumSize: 1000@800.\r\tv := self new.\r\tv borderWidth:1.\r\tv aspects: someSymbols.\r\ttopView addSubView: v.\r\ttopView label: 'MultiAspectKiviat'.\r\ttopView controller open! !\r!RVMMultiAspectKiviatView class methodsFor: 'instance creation' stamp: 'ssa 11/12/2008 10:15'!\ropenOnAspects: someSymbols forCore: anIndex\r\t\"RVMMultiAspectKiviatView exampleCore5\"\r\t\r\tself openOnAspects: someSymbols forCores: (Array with: anIndex)! !\r!RVMMultiAspectKiviatView class methodsFor: 'instance creation' stamp: 'ssa 11/12/2008 12:52'!\ropenOnAspects: someSymbols forCores: indexArray\r\t\"RVMMultiAspectKiviatView exampleAllCores\"\r\t\r\tself openOnAspects: someSymbols forCores: indexArray titled: 'MultiAspectKiviat'! !\r!RVMMultiAspectKiviatView class methodsFor: 'instance creation' stamp: 'ssa 11/12/2008 12:59'!\ropenOnAspects: someSymbols forCores: indexArray titled: aString\r\t\"RVMMultiAspectKiviatView exampleAllCores\"\r\t\r\t| topView v |\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\ttopView minimumSize: 300@150\"(9*indexArray size max:250)\".\r\ttopView maximumSize: 1000@800.\r\tv := self new.\r\tv coreIndicies: indexArray.\r\tv borderWidth:1.\r\tv aspects: someSymbols.\r\ttopView addSubView: v.\r\ttopView label: aString.\r\ttopView controller open! !\r!RVMMultiAspectStripChartView methodsFor: 'controller access' stamp: 'ssa 9/13/2008 17:43'!\rdefaultControllerClass\r\r^RVMMultiAspectStripChartController! !\r!RVMMultiAspectStripChartView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 17:12'!\raspects\r\t\"Answer the value of aspects\"\r\r\taspects isNil ifTrue:[self aspects: OrderedCollection new].\r\t^ aspects! !\r!RVMMultiAspectStripChartView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:41'!\raspects: anObject\r\t\"Set the value of aspects\"\r\r\taspects _ anObject..\r\tself scalers:nil.\r\tself data: nil.\r! !\r!RVMMultiAspectStripChartView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 17:12'!\rchart\r\t\"Answer the value of chart\"\r\r\tchart isNil ifTrue:[self chart: (Form fromDisplay: self insetDisplayBox) fillWhite].\r\t^ chart! !\r!RVMMultiAspectStripChartView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 17:11'!\rchart: anObject\r\t\"Set the value of chart\"\r\r\tchart _ anObject! !\r!RVMMultiAspectStripChartView methodsFor: 'accessing' stamp: 'ssa 9/14/2008 20:55'!\rcolors\r\t\"Answer the value of colors\"\r\r\t^self scalers collect:[:each| each color]! !\r!RVMMultiAspectStripChartView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 17:36'!\rcoreIndex\r\t\"Answer the value of coreIndex\"\r\r\tcoreIndex isNil ifTrue:[self coreIndex: 1].\r\t^ coreIndex! !\r!RVMMultiAspectStripChartView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 17:36'!\rcoreIndex: anObject\r\t\"Set the value of coreIndex\"\r\r\tcoreIndex _ anObject! !\r!RVMMultiAspectStripChartView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 17:25'!\rdata\r\t\"Answer the value of data\"\r\r\tdata isNil ifTrue:[self data: (Array new: self aspects size)].\r\t^ data! !\r!RVMMultiAspectStripChartView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 17:11'!\rdata: anObject\r\t\"Set the value of data\"\r\r\tdata _ anObject! !\r!RVMMultiAspectStripChartView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:18'!\rdotSize\r\t\"Answer the value of dotSize\"\r\r\tdotSize isNil ifTrue:[self dotSize: 2].\r\t^ dotSize! !\r!RVMMultiAspectStripChartView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 17:14'!\rdotSize: anObject\r\t\"Set the value of dotSize\"\r\r\tdotSize _ anObject! !\r!RVMMultiAspectStripChartView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:49'!\rgetData\r\t | sample |\r\tsample _ self sampleSource value.\r\t1 to: self aspects size do:[:index|\r\t\tself data at: index put: ((self scalers at: index) scale:((sample perform: (self aspects at: index)) at:  self coreIndex))]! !\r!RVMMultiAspectStripChartView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 17:29'!\rsampleSource\r\t\"Answer the value of sampleSource\"\r\r\tsampleSource isNil ifTrue:[self sampleSource: [RVMMonitor lastSample]].\r\t^ sampleSource! !\r!RVMMultiAspectStripChartView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 17:27'!\rsampleSource: anObject\r\t\"Set the value of sampleSource\"\r\r\tsampleSource _ anObject! !\r!RVMMultiAspectStripChartView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:45'!\rscalers\r\t\"Answer the value of scalers\"\r\r\tscalers isNil ifTrue:[self scalers: (RVMMonitor coloredScalersFor: self aspects)].\r\t^ scalers! !\r!RVMMultiAspectStripChartView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 18:04'!\rscalers: anObject\r\t\"Set the value of scalers\"\r\r\tscalers _ anObject! !\r!RVMMultiAspectStripChartView methodsFor: 'listening' stamp: 'ssa 1/1/1970 00:33'!\rhear: something\r\r\tself displayView! !\r!RVMMultiAspectStripChartView methodsFor: 'displaying' stamp: 'ssa 10/21/2008 11:32'!\rdisplayView\r\t| bottomLeft points sortedPoints box |\r\tself okToDisplay ifFalse:[^self].\r\tself uncache.\r\tself getData.\r\tself chart displayOn: Display at: self insetDisplayBox origin + (self dotSize @ 0) clippingBox: self insetDisplayBox.\r\tbottomLeft := self insetDisplayBox bottomLeft.\r\tpoints := OrderedCollection new.\r\t1 to: self aspects size do: [:index | points add: index @ (self data at: index)].\r\tsortedPoints := points asSortedCollection: [:a :b | a y > b y].\r\tsortedPoints\r\t\tdo: [:each | \r\t\t\tbox := bottomLeft - (0 @ (each y * self dotSize)) corner: bottomLeft + (self dotSize @ 0).\r\t\t\tDisplay fill: box fillColor: (self colors at: each x)].\r\tself chart:(Form fromDisplay: self insetDisplayBox).! !\r!RVMMultiAspectStripChartView methodsFor: 'displaying' stamp: 'ssa 9/14/2008 21:50'!\reraseStrip\r\tDisplay fill: self insetDisplayBox fillColor: Color  white.\r\tself chart: nil;chart! !\r!RVMMultiAspectStripChartView methodsFor: 'auxiliary views' stamp: 'ssa 1/1/1970 00:29'!\rcombinedScalerView\r\t\"Answer a view holding all my appropriate scaler views\"\r\t| v last current |\r\tv _ RVMView new.\r\tlast _ nil.\r\tself scalers do:[:scaler|\r\t\tv addSubView: (current _ RVMColoredDataScalerView on: scaler) below: last.\r\t\tcurrent borderWidth:1.\r\t\tlast _ current].\r\t^v! !\r!RVMMultiAspectStripChartView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:29'!\rexample\r\t\"RVMMultiAspectStripChartView example\"\r\t| topView chart scalers aspectCount |\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\tchart _ self exampleInstance.\r\taspectCount _ chart aspects size.\r\ttopView minimumSize: 200@(aspectCount*40).\r\ttopView maximumSize: 800@(2*aspectCount*40).\r\tscalers _ chart combinedScalerView.\r\ttopView addSubView: scalers in:(0@0 extent: 1/3 @ 1)borderWidth:1.\r\ttopView addSubView: chart in:(1/3@0 extent: 2/3 @ 1)borderWidth:1.\r\ttopView label: 'Multi Aspect Strip'.\r\ttopView controller open! !\r!RVMMultiAspectStripChartView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:28'!\rexampleInstance\r\r\t| view |\r\tview _ self new.\r\tview aspects: #( bytecodeCounts bytesUseds yieldCounts ).\r\t^view! !\r!RVMMultiAspectStripChartView class methodsFor: 'examples' stamp: 'ssa 9/14/2008 20:30'!\rexampleMany\r\t\"RVMMultiAspectStripChartView exampleMany\"\r\t| topView view manyCount lastView |\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\tmanyCount _ 4.\r\ttopView minimumSize: 100@(25*manyCount).\r\ttopView maximumSize: 200@(50*manyCount).\r\tlastView _ nil.\r\tmanyCount timesRepeat:[\r\t\tview _ self exampleInstance.\r\t\ttopView addSubView: view below: lastView.\r\t\tlastView _ view].\r\ttopView label: 'Aspect/Color'.\r\ttopView controller open! !\r!RVMMultiAspectStripChartView class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 01:10'!\rcoreIndex: index\r\t\"Answer a stripchart for this core index watching these aspects from this source\"\r\t| view |\r\tview _ self new.\r\tview coreIndex: index.\r\tview aspects: #(bytesUsed bytecodeCounts yieldCounts).\r\tview sampleSource: [RVMMonitor lastSample].\r\t^view! !\r!RVMMultiAspectStripChartView class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 01:08'!\rcoreIndex: index  aspects: aspects \r\t\"Answer a stripchart for this core index watching these aspects from this source\"\r\t| view |\r\tview _ self new.\r\tview coreIndex: index.\r\tview aspects: aspects.\r\tview sampleSource: [RVMMonitor lastSample].\r\t^view! !\r!RVMMultiAspectStripChartView class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 01:08'!\rcoreIndex: index  aspects: aspects sampleSource: aBlock\r\t\"Answer a stripchart for this core index watching these aspects from this source\"\r\t| view |\r\tview _ self new.\r\tview coreIndex: index.\r\tview aspects: aspects.\r\tview sampleSource: aBlock.\r\t^view! !\r!RVMMultiGroupLocatorView methodsFor: 'listening' stamp: 'ssa 11/27/2008 13:24'!\rhear: something\r\t\"Update my display\"\r\tself counts: nil.\r\tself drawOnCanvas.\r\tself displayView! !\r!RVMMultiGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 12:55'!\rcolors\r\t\"Answer the value of colors\"\r\r\tcolors isNil ifTrue:[self colors: (Color hotColdShades: (self sources size max:5))].\r\t^ colors! !\r!RVMMultiGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 12:37'!\rcolors: anObject\r\t\"Set the value of colors\"\r\r\tcolors _ anObject! !\r!RVMMultiGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 13:33'!\rcounts\r\t\"Answer the value of counts\"\r\r\tcounts isNil ifTrue:[self counts: (Array new:self sources size).\r\t\t1 to: self sources size do:[:index| self countsPerCoreForGroupNumber: index]].\r\t^ counts! !\r!RVMMultiGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 12:31'!\rcounts: anObject\r\t\"Set the value of counts\"\r\r\tcounts _ anObject! !\r!RVMMultiGroupLocatorView methodsFor: 'accessing' stamp: 'dmu 4/18/2009 18:35'!\rcountsPerCoreForGroupNumber: anIndex\r\t\"Answer the value of countsPerCore\"\r\t(self counts at: anIndex) isNil ifTrue:[self counts at: anIndex put: ((self objectsForGroupNumber: anIndex) asOrderedCollection  collect:[:obj| RVMTester isRVM ifFalse:[RVMMonitor coreCount atRandom - 1]ifTrue:[RVMTester getCoreHolding:obj]]) asBag].\r\t^ self counts at: anIndex! !\r!RVMMultiGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 12:33'!\robjectsForGroupNumber: anIndex\r\t\"Answer my colection of objects to locate.\"\r\t| source |\r\tsource _ self sources at: anIndex.\r\t^source isSymbol ifTrue:[self model perform: source] ifFalse:[source value]! !\r!RVMMultiGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 13:19'!\rsourceSourceForGroupNumber: anIndex\r\t| code source |\r\tsource _ self sources at: anIndex.\r\tsource isSymbol ifTrue:[^source printString].\r\tcode _ source decompile printString.\r\t(code beginsWith:'{[') &(code endsWith:']}') ifTrue:[code _ code copyFrom: 3 to: code size - 2].\r\t^code! !\r!RVMMultiGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 13:22'!\rsourceSourceForGroupNumber: anIndex put: aText\r\t| value aString |\r\taString _ aText asString.\r\t( aString withBlanksTrimmed beginsWith:'#')\r\t\tifTrue:[value _  Compiler new evaluate: aString in: nil to: nil\r\t\t\t\t\t\tnotifying: nil ifFail: [^ false].\r\t\t\t\tself model perform: value.  \"test to make sure it works before installing\"]\r\t\tifFalse:[value _ Compiler new evaluate: '[',aString,']' in: nil to: nil\r\t\t\t\t\t\tnotifying: nil ifFail: [^ false]].\r\tself sources at: anIndex put: value.\r\tself hear:nil.\r\t^true \"tell the editor its OK\"! !\r!RVMMultiGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 12:42'!\rsources\r\t\"Answer the value of sources\"\r\r\tsources isNil ifTrue:[self sources: {[String allInstances]. [View withAllSubclasses]. [Number withAllSubclasses]}].\r\t^ sources! !\r!RVMMultiGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 12:31'!\rsources: anObject\r\t\"Set the value of sources\"\r\r\tsources _ anObject! !\r!RVMMultiGroupLocatorView methodsFor: 'drawing' stamp: 'ssa 11/27/2008 13:34'!\rdrawLocations\r\t| indicies |\r\tindicies _ (self counts asSortedCollection:[:a :b| a size < b size]) collect:[:each| self counts indexOf: each].\r\tindicies do:[:anIndex| self drawLocationsForGroupNumber: anIndex]! !\r!RVMMultiGroupLocatorView methodsFor: 'drawing' stamp: 'ssa 11/27/2008 12:40'!\rdrawLocationsForGroupNumber: anIndex\r\t| dot coreExtent amt index rect pt dotSize realRect |\r\tcoreExtent _ RVMMonitor extent.\r\tdotSize _(self boxes first width // (((self countsPerCoreForGroupNumber:anIndex) size // self boxes size)max:1))min:self boxes first width //2 max:1.\r\tdot _ Form dotOfSize: dotSize color: (self colors at: anIndex).\r\t0 to: coreExtent x - 1 do:[:x|\r\t\t0 to: coreExtent y - 1 do:[:y|\r\t\t\tamt _ (self countsPerCoreForGroupNumber:anIndex) occurrencesOf: (index _ y*8+x).\r\t\t\trect _ (realRect _ self boxes at: index + 1) insetBy: dot offset abs.\r\t\t\tamt  timesRepeat:[pt _ rect asRandomPoint.\r\t\t\t\tdot displayOn: self canvas at: pt clippingBox: realRect rule: Form paint fillColor:nil]].\r\t\t]! !\r!RVMMultiGroupLocatorView methodsFor: 'controller access' stamp: 'ssa 11/27/2008 13:40'!\rdefaultControllerClass\r\r\t^RVMMultiGroupLocatorController! !\r!RVMMultiGroupLocatorView class methodsFor: 'instance creation' stamp: 'ssa 11/27/2008 12:58'!\ron: aModel sources: someBlocksOrSelectors \r\t^self on: aModel sources: someBlocksOrSelectors colors: nil! !\r!RVMMultiGroupLocatorView class methodsFor: 'instance creation' stamp: 'ssa 11/27/2008 12:55'!\ron: aModel sources: someBlocksOrSelectors colors: someColors\r\t\"(RVMMultiGroupLocatorView on: Smalltalk sources: {#keys. #values. #classNames} colors: nil) demo\"\r\t\"(RVMultiGroupLocatorView on: nil sources: {[String allInstances]. [Array allInstances]} colors: {Color yellow. Color green}) demo\"\r\t\"(RVMMultiGroupLocatorView on: nil sources: {[String allInstances]. [Array allInstances]. [Object withAllSubclasses]. [Float allInstances]} colors: nil) demo\"\r\t\r\t| v |\r\tv _ self new.\r\tv model: aModel.\r\tv sources: someBlocksOrSelectors.\r\tv colors: someColors.\r\t^v! !\r!RVMMultiGroupLocatorView class methodsFor: 'instance creation' stamp: 'ssa 11/27/2008 14:04'!\ropenOn: aModel sources: someBlocksOrSelectors colors: someColors\r\t\"RVMMultiGroupLocatorView openOn: Smalltalk sources: {#keys. #values. #classNames} colors: nil\"\r\t\"RVMMultiGroupLocatorView openOn: nil sources: {[String allInstances]. [Array allInstances]} colors: {Color yellow. Color green}\"\r\t\"RVMMultiGroupLocatorView openOn: nil sources: {[String allInstances]. [Array allInstances]. [Object withAllSubclasses]. [Float allInstances]} colors: nil\"\r\t| topView v ptv cbv h |\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\tv := self on: aModel sources: someBlocksOrSelectors colors: someColors.\r\tv borderWidth:1.\r\ttopView minimumSize: 150@(150 + (v sources size * 20)).\r\ttopView maximumSize: 800@900.\r\ttopView addSubView: v  viewport:(0@0 extent: 150@150).\r\th _ 0.\r\t1 to: v sources size do:[:groupIndex|\r\t\tptv _ RVMPluggableTextView on: v text:[v sourceSourceForGroupNumber: groupIndex] fixTemps accept:[:arg| v sourceSourceForGroupNumber: groupIndex put: arg] fixTemps.\r\t\tptv borderWidth:1.\r\t\tcbv _ RVMColorButtonView on: v colorGetter:[v colors at: groupIndex] fixTemps colorSetter:[:arg|v colors at: groupIndex put: arg.  v displayView] fixTemps.\r\t\tcbv borderWidth:1.\r\t\ttopView addSubView: cbv  viewport:(0@(h+150) extent:20@20).\r\t\ttopView addSubView: ptv  viewport:(20@(h+150) extent:130@20).\r\t\th _ h + 20].\r\ttopView label: 'Group Locator'.\r\ttopView controller open! !\r!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 19:35'!\raddAspect: aSymbol\r\r\t| s |\r\tself aspects add: aSymbol.\r\tself scalers add:(s _ RVMDataScaler new automatic).\r\tself pinMinAtZero ifTrue:[s pinMinAtZero].\r\tself lastTotals add: 0.\r\tself lastAverages add:0\r! !\r!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 11/11/2008 18:02'!\raspect\r\t\"Get the value of aspect\"\r\r\t^self aspects at:1! !\r!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 19:44'!\raspect: anObject\r\t\"Set the value of aspect\"\r\r\tself aspects at:1 put: anObject.\r\tself lastAverages at: 1 put: 0.\r\tself lastTotals at: 1 put:0.\r\tself topView == self ifFalse:[self topView relabel: anObject asString].\r\tself resetScaling.\r\tself drawOnCanvas! !\r!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 17:22'!\raspectCount\r\r\t^self aspects size! !\r!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 15:02'!\raspects\r\t\"Answer the value of aspects\"\r\t\r\taspects isNil ifTrue:[self aspects: #(bytesUseds bytesUsedReadWrites bytesUsedReadMostlys) asOrderedCollection].\r\t^ aspects ! !\r!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 18:33'!\raspects: anObject\r\t\"Set the value of aspects\"\r\r\taspects _ anObject.\r\taspects notNil ifTrue:[aspects _ aspects asOrderedCollection.\r\t\taspects size > 4 ifTrue:[aspects _ aspects copyFrom: 1 to: 4]].\r\tself lastAverages: nil.\r\tself lastTotals: nil! !\r!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 17:57'!\rcolorForAspect: aSymbol\r\r\t^self colors at: (self aspects indexOf: aSymbol)! !\r!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/21/2008 11:33'!\rcolors\r\t\"Answer the value of colors \"\r\r\tcolors isNil ifTrue:[self colors: {Color blue. Color red. Color green darker darker. Color orange darker }].\r\t^ colors! !\r!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 17:56'!\rcolors: anObject\r\t\"Set the value of colors\"\r\r\tcolors _ anObject! !\r!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 19:12'!\rcommonScale\r\t\"Answer the value of commonScale\"\r\r\tcommonScale isNil ifTrue:[self commonScale: false].\r\t^ commonScale! !\r!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 19:13'!\rcommonScale: anObject\r\t\"Set the value of commonScale\"\r\r\tcommonScale _ anObject.! !\r!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 20:02'!\rlastAverageForAspect: aSymbol\r\r\t^self lastAverages at: (self aspects indexOf: aSymbol ifAbsent:[1])! !\r!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 15:19'!\rlastAverageForAspect: aSymbol put: aValue\r\r\t^self lastAverages at: (self aspects indexOf: aSymbol) put: aValue! !\r!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 18:41'!\rlastAverages\r\t\"Answer the value of lastAverages\"\r\r\tlastAverages isNil ifTrue:[self lastAverages: (Array new: self aspects size withAll: 0)asOrderedCollection].\r\t^ lastAverages! !\r!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 15:14'!\rlastAverages: anObject\r\t\"Set the value of lastAverages\"\r\r\tlastAverages _ anObject! !\r!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 15:15'!\rlastTotalForAspect: aSymbol\r\r\t^self lastTotals at: (self aspects indexOf: aSymbol)! !\r!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 15:19'!\rlastTotalForAspect: aSymbol put: aValue\r\r\t^self lastTotals at: (self aspects indexOf: aSymbol) put: aValue! !\r!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 18:41'!\rlastTotals\r\t\"Answer the value of lastTotals\"\r\r\tlastTotals isNil ifTrue:[self lastTotals: (Array new: self aspects size withAll: 0) asOrderedCollection].\r\t^ lastTotals! !\r!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 15:14'!\rlastTotals: anObject\r\t\"Set the value of lastTotals\"\r\r\tlastTotals _ anObject! !\r!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 19:12'!\rpinMinAtZero\r\t\"Answer the value of pinMinAtZero\"\r\r\tpinMinAtZero isNil ifTrue:[self pinMinAtZero: false].\r\t^ pinMinAtZero! !\r!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 19:12'!\rpinMinAtZero: anObject\r\t\"Set the value of pinMinAtZero\"\r\r\tpinMinAtZero _ anObject.\r\tself scalers do:[:each| each pinMinAtZero]! !\r!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 19:15'!\rremoveAspect: aSymbol\r\r\t| index |\r\tindex _ self aspects indexOf: aSymbol.\r\tself aspects remove: aSymbol.\r\tself commonScale ifFalse:[self scalers remove:(self scalers at: index)].\r\tself lastTotals remove:(self lastTotals at: index).\r\tself lastAverages remove:(self lastAverages at: index)\r! !\r!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 11/11/2008 18:04'!\rscaler\r\t\"Get the default scaler\"\r\r\t^self scalers at:1! !\r!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 11/11/2008 21:27'!\rscalerAt: anIndex\r\t\"Get the default scaler\"\r\tself commonScale ifTrue:[^self scalers first].\r\t^self scalers at: anIndex! !\r!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 19:13'!\rscalerForAspect: aSymbol\r\tself commonScale ifTrue:[^self scalers first].\r\t^self scalers at: (self aspects indexOf: aSymbol)! !\r!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 17:59'!\rscalers\r\t\"Answer the value of scalers\"\r\r\tscalers isNil ifTrue:[self scalers: OrderedCollection new.\r\t\tself aspects do:[:a| scalers add: RVMDataScaler new automatic]].\r\t^ scalers! !\r!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 17:56'!\rscalers: anObject\r\t\"Set the value of scalers\"\r\r\tscalers _ anObject! !\r!RVMMultiKiviatView methodsFor: 'drawing' stamp: 'ssa 10/7/2008 15:39'!\rdrawBottomLeftLabelsOnCanvasForAspect: aSymbol\r\t\r\t| minLabel maxLabel  aspectLabel avgLabel totalLabel aspectColor box height |\r\tbox _ self canvas boundingBox.\r\taspectColor _self colorForAspect:aSymbol.\r\taspectLabel _ aSymbol asString asDisplayText.\r\tminLabel _ ('min: ',(self scalerForAspect: aSymbol) min printShowingMax3Digits) asDisplayText.\r\tmaxLabel _ ('max: ',(self scalerForAspect: aSymbol) max printShowingMax3Digits) asDisplayText.\r\tavgLabel _ ('avg: ',(self lastAverageForAspect: aSymbol) printShowingMax3Digits) asDisplayText.\r\ttotalLabel _ ('total: ',(self lastTotalForAspect: aSymbol) printShowingMax3Digits) asDisplayText.\r\tavgLabel foregroundColor: aspectColor backgroundColor: Color transparent.\r\ttotalLabel foregroundColor: aspectColor backgroundColor: Color transparent.\r\taspectLabel foregroundColor: aspectColor backgroundColor: Color transparent.\r\tminLabel foregroundColor: aspectColor backgroundColor: Color transparent.\r\tmaxLabel foregroundColor: aspectColor backgroundColor: Color transparent.\r\theight _ aspectLabel height -3.\r\taspectLabel displayOn: self canvas at:  box bottomLeft - (0 @aspectLabel height).\r\tminLabel displayOn: self canvas at: ((box bottomLeft x )@(box bottomLeft y -( height*2) )) clippingBox: box rule: Form paint fillColor:nil.\r\tmaxLabel displayOn: self canvas at: ((box bottomLeft x )@(box bottomLeft y - (height*3)+3)) clippingBox: box rule: Form paint fillColor:nil.\r\ttotalLabel displayOn: self canvas at: ((box bottomLeft x )@(box bottomLeft y - (height *4)+6)) clippingBox: box rule: Form paint fillColor:nil.\r\tavgLabel displayOn: self canvas at: ((box bottomLeft x )@(box bottomLeft y - (height *5)+9)) clippingBox: box rule: Form paint fillColor:nil.\r! !\r!RVMMultiKiviatView methodsFor: 'drawing' stamp: 'ssa 10/7/2008 15:36'!\rdrawBottomRightLabelsOnCanvasForAspect: aSymbol\r\t\r\t| minLabel maxLabel  aspectLabel avgLabel totalLabel aspectColor box height |\r\tbox _ self canvas boundingBox.\r\taspectColor _self colorForAspect:aSymbol.\r\taspectLabel _ aSymbol asString asDisplayText.\r\tminLabel _ ('min: ',(self scalerForAspect: aSymbol) min printShowingMax3Digits) asDisplayText.\r\tmaxLabel _ ('max: ',(self scalerForAspect: aSymbol) max printShowingMax3Digits) asDisplayText.\r\tavgLabel _ ('avg: ',(self lastAverageForAspect: aSymbol) printShowingMax3Digits) asDisplayText.\r\ttotalLabel _ ('total: ',(self lastTotalForAspect: aSymbol) printShowingMax3Digits) asDisplayText.\r\tavgLabel foregroundColor: aspectColor backgroundColor: Color transparent.\r\ttotalLabel foregroundColor: aspectColor backgroundColor: Color transparent.\r\taspectLabel foregroundColor: aspectColor backgroundColor: Color transparent.\r\tminLabel foregroundColor: aspectColor backgroundColor: Color transparent.\r\tmaxLabel foregroundColor: aspectColor backgroundColor: Color transparent.\r\theight _ aspectLabel height -3.\r\taspectLabel displayOn: self canvas at:  box bottomRight - (aspectLabel extent).\r\tminLabel displayOn: self canvas at: ((box bottomRight x - minLabel width)@(box bottomRight y -( height*2) )) clippingBox: box rule: Form paint fillColor:nil.\r\tmaxLabel displayOn: self canvas at: ((box bottomRight x - maxLabel width)@(box bottomRight y - (height*3)+3)) clippingBox: box rule: Form paint fillColor:nil.\r\ttotalLabel displayOn: self canvas at: ((box bottomRight x - totalLabel width)@(box bottomRight y - (height *4)+6)) clippingBox: box rule: Form paint fillColor:nil.\r\tavgLabel displayOn: self canvas at: ((box bottomRight x - avgLabel width)@(box bottomRight y - (height *5)+9)) clippingBox: box rule: Form paint fillColor:nil.\r! !\r!RVMMultiKiviatView methodsFor: 'drawing' stamp: 'ssa 10/7/2008 14:56'!\rdrawLabelsOnCanvas\r\t\r\t| quads |\r\tquads _ #(drawTopLeftLabelsOnCanvasForAspect: drawTopRightLabelsOnCanvasForAspect: drawBottomRightLabelsOnCanvasForAspect: drawBottomLeftLabelsOnCanvasForAspect:).\r\t1 to: self aspects size do:[:index| \r\t\tself perform: (quads at: index) with: (self aspects at: index)]! !\r!RVMMultiKiviatView methodsFor: 'drawing' stamp: 'ssa 10/7/2008 15:13'!\rdrawTopLeftLabelsOnCanvasForAspect: aSymbol\r\t\r\t| minLabel maxLabel  aspectLabel avgLabel totalLabel aspectColor box height |\r\tbox _ self canvas boundingBox.\r\taspectColor _self colorForAspect:aSymbol.\r\taspectLabel _ aSymbol asString asDisplayText.\r\tminLabel _ ('min: ',(self scalerForAspect: aSymbol) min printShowingMax3Digits) asDisplayText.\r\tmaxLabel _ ('max: ',(self scalerForAspect: aSymbol) max printShowingMax3Digits) asDisplayText.\r\tavgLabel _ ('avg: ',(self lastAverageForAspect: aSymbol) printShowingMax3Digits) asDisplayText.\r\ttotalLabel _ ('total: ',(self lastTotalForAspect: aSymbol) printShowingMax3Digits) asDisplayText.\r\tavgLabel foregroundColor: aspectColor backgroundColor: Color transparent.\r\ttotalLabel foregroundColor: aspectColor backgroundColor: Color transparent.\r\taspectLabel foregroundColor: aspectColor backgroundColor: Color transparent.\r\tminLabel foregroundColor: aspectColor backgroundColor: Color transparent.\r\tmaxLabel foregroundColor: aspectColor backgroundColor: Color transparent.\r\theight _ aspectLabel height - 6.\r\taspectLabel displayOn: self canvas at:  (0@-4).\r\tminLabel displayOn: self canvas at: ((0)@(box topLeft y + height )) clippingBox: box rule: Form paint fillColor:nil.\r\tmaxLabel displayOn: self canvas at: ((0)@(box topLeft y + (height*2))) clippingBox: box rule: Form paint fillColor:nil.\r\ttotalLabel displayOn: self canvas at: ((0)@(box topLeft y + (height *3))) clippingBox: box rule: Form paint fillColor:nil.\r\tavgLabel displayOn: self canvas at: ((0)@(box topLeft y + (height *4))) clippingBox: box rule: Form paint fillColor:nil.\r! !\r!RVMMultiKiviatView methodsFor: 'drawing' stamp: 'ssa 10/7/2008 15:10'!\rdrawTopRightLabelsOnCanvasForAspect: aSymbol\r\t\r\t| minLabel maxLabel  aspectLabel avgLabel totalLabel aspectColor box height |\r\tbox _ self canvas boundingBox.\r\taspectColor _self colorForAspect:aSymbol.\r\taspectLabel _ aSymbol asString asDisplayText.\r\tminLabel _ ('min: ',(self scalerForAspect: aSymbol) min printShowingMax3Digits) asDisplayText.\r\tmaxLabel _ ('max: ',(self scalerForAspect: aSymbol) max printShowingMax3Digits) asDisplayText.\r\tavgLabel _ ('avg: ',(self lastAverageForAspect: aSymbol) printShowingMax3Digits) asDisplayText.\r\ttotalLabel _ ('total: ',(self lastTotalForAspect: aSymbol) printShowingMax3Digits) asDisplayText.\r\tavgLabel foregroundColor: aspectColor backgroundColor: Color transparent.\r\ttotalLabel foregroundColor: aspectColor backgroundColor: Color transparent.\r\taspectLabel foregroundColor: aspectColor backgroundColor: Color transparent.\r\tminLabel foregroundColor: aspectColor backgroundColor: Color transparent.\r\tmaxLabel foregroundColor: aspectColor backgroundColor: Color transparent.\r\theight _ aspectLabel height - 6.\r\taspectLabel displayOn: self canvas at:  box topRight - (aspectLabel width @4).\r\tminLabel displayOn: self canvas at: ((box topRight x - minLabel width)@(box topRight y + height )) clippingBox: box rule: Form paint fillColor:nil.\r\tmaxLabel displayOn: self canvas at: ((box topRight x - maxLabel width)@(box topRight y + (height*2))) clippingBox: box rule: Form paint fillColor:nil.\r\ttotalLabel displayOn: self canvas at: ((box topRight x - totalLabel width)@(box topRight y + (height *3))) clippingBox: box rule: Form paint fillColor:nil.\r\tavgLabel displayOn: self canvas at: ((box topRight x - avgLabel width)@(box topRight y + (height *4))) clippingBox: box rule: Form paint fillColor:nil.\r! !\r!RVMMultiKiviatView methodsFor: 'drawing' stamp: 'ssa 10/7/2008 16:04'!\rdrawWeb\r\tself aspects do:[:aSymbol|\r\t\tself placeSpokePensForAspect: aSymbol.\r\t\tself webPen color: (self colorForAspect: aSymbol).\r\t\tself webPen combinationRule: Form paint.\r\t\tself webPen up;place: self spokePens first location;down.\r\t\tself spokePens do:[:pen|\r\t\t\tself webPen goto: pen location].\r\t\tself webPen goto: self spokePens first location;up]\r\t! !\r!RVMMultiKiviatView methodsFor: 'drawing' stamp: 'dmu 8/23/2010 17:37'!\rplaceSpokePensForAspect: aSymbol\r\r\t| data scaledDatum tot offset |\r\tdata _ RVMMonitor lastSample perform: aSymbol.\r\toffset _ ((self aspects indexOf: aSymbol) - 1)*4/5.\r\ttot _ 0.\r\tself spokePens size = data size ifFalse: [self resetAfterCoreCountChange].\r\tdata with: self spokePens do:[:datum :pen|\r\t\ttot _ tot + datum.\r\t\tpen up;place: self center;turn: offset negated;go:self centerMargin.\r\t\tscaledDatum _ (self scalerForAspect: aSymbol) scale: datum.\r\t\tpen go:(self spokeLength /100.0*(scaledDatum)).\r\t\tpen turn: offset].\r\tself lastTotalForAspect: aSymbol put: tot.\r\tself lastAverageForAspect: aSymbol put: tot / data size! !\r!RVMMultiKiviatView methodsFor: 'scaling' stamp: 'ssa 10/7/2008 19:48'!\rresetScaling\r\r\t| data tot |\r\tself scalers do:[:s| s resetScaling].\r\tself aspects do:[:aSymbol|\r\tdata _ RVMMonitor lastSample perform: aSymbol.\r\ttot _ 0.\r\tdata do:[:datum |\r\t\ttot _ tot + datum.\r\t\t(self scalerForAspect: aSymbol) scale: datum].\r\tself lastTotalForAspect: aSymbol put: tot.\r\tself lastAverageForAspect: aSymbol put: tot / data size]! !\r!RVMMultiKiviatView class methodsFor: 'examples' stamp: 'ssa 10/7/2008 15:38'!\rexample\r\t\"RVMMultiKiviatView example\"\r\tself openOnAspects: #(bytesUsedReadMostlys bytesUsedReadWrites bytesUseds bytecodeCounts)! !\r!RVMMultiKiviatView class methodsFor: 'examples' stamp: 'ssa 4/3/2009 17:51'!\rexampleBytecodesAndProcessesRunning\r\t\"RVMMultiKiviatView exampleBytecodesAndProcessesRunning\"\r\tself openOnAspects: #(bytecodeCounts runningProcessCountsPerCore ) pinAllScalesAtZero: false useCommonScale: false! !\r!RVMMultiKiviatView class methodsFor: 'examples' stamp: 'ssa 10/7/2008 16:01'!\rexampleBytesUsedTrioCommonPinned\r\t\"RVMMultiKiviatView exampleBytesUsedTrioCommonPinned\"\r\tself openOnAspects: #(bytesUsedReadWrites bytesUsedReadMostlys bytesUseds ) pinAllScalesAtZero: true useCommonScale: true! !\r!RVMMultiKiviatView class methodsFor: 'examples' stamp: 'ssa 10/7/2008 16:01'!\rexampleBytesUsedTrioPinned\r\t\"RVMMultiKiviatView exampleBytesUsedTrioPinned\"\r\tself openOnAspects: #(bytesUsedReadWrites bytesUsedReadMostlys bytesUseds ) pinAllScalesAtZero: true! !\r!RVMMultiKiviatView class methodsFor: 'examples' stamp: 'ssa 10/7/2008 18:29'!\rexampleSingle\r\t\"RVMMultiKiviatView exampleSingle\"\r\tself openOnAspects: #(bytecodeCounts) pinAllScalesAtZero: false useCommonScale: false titled: 'bytecodeCounts' ! !\r!RVMMultiKiviatView class methodsFor: 'instance creation' stamp: 'ssa 10/7/2008 15:54'!\ropenOnAspects: someAspects\r\t\"RVMMultiKiviatView example\"\r\t\r\tself openOnAspects: someAspects pinAllScalesAtZero: false! !\r!RVMMultiKiviatView class methodsFor: 'instance creation' stamp: 'ssa 10/7/2008 16:12'!\ropenOnAspects: someAspects pinAllScalesAtZero: aBoolean\r\t\"RVMMultiKiviatView exampleBytesUsedTrioPinned\"\r\t\r\tself openOnAspects: someAspects pinAllScalesAtZero: aBoolean useCommonScale: false! !\r!RVMMultiKiviatView class methodsFor: 'instance creation' stamp: 'ssa 10/7/2008 16:09'!\ropenOnAspects: someAspects pinAllScalesAtZero: aBoolean useCommonScale: commonScale\r\t\"RVMMultiKiviatView exampleBytesUsedTrioCommonPinned\"\r\t| |\r\tself openOnAspects: someAspects pinAllScalesAtZero: aBoolean useCommonScale: commonScale titled: 'Multiaspect Kiviat'! !\r!RVMMultiKiviatView class methodsFor: 'instance creation' stamp: 'ssa 10/7/2008 19:24'!\ropenOnAspects: someAspects pinAllScalesAtZero: aBoolean useCommonScale: commonScale titled: aString\r\t\"RVMMultiKiviatView exampleBytesUsedTrioCommonPinned\"\r\t\r\t| topView v label |\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\ttopView minimumSize: 300@250.\r\ttopView maximumSize: 600@500.\r\tv := self new.\r\tv borderWidth:1.\r\tv aspects: someAspects.\r\tv commonScale: commonScale.\r\tv pinMinAtZero: aBoolean.\r\ttopView addSubView: v.\r\tlabel _ aString,(aBoolean ifTrue:[' (pinned)']ifFalse:['']),(commonScale ifTrue:[' (uniscale)']ifFalse:['']).\r\ttopView label: label.\r\ttopView controller open! !\r!RVMObjectCoordinateView methodsFor: 'listening' stamp: 'ssa 11/15/2008 23:43'!\rhear: something\r\r\tself displayView! !\r!RVMObjectCoordinateView methodsFor: 'listening' stamp: 'ssa 11/15/2008 23:44'!\rupdate\r\r\tself displayView! !\r!RVMObjectCoordinateView class methodsFor: 'instance creation' stamp: 'ssa 5/12/2010 10:15'!\ron: anRVMObjectCoordinate  \r\t\"RVMObjectCoordinateView openOn: nil asObjectCoordinate  \"\r\t| mutabilityView readWriteButton readMostlyButton activityView passButton holdButton coreIndexView coordView tileCoordView |\r\t\r\tmutabilityView _ RVMView new.\r\treadWriteButton _ RVMRadioButtonView on: anRVMObjectCoordinate label: 'readWrite' checkState: #isReadWrite whenChecked: #makeReadWrite whenUnchecked: [] monitor: true.\r\treadMostlyButton _ RVMRadioButtonView on: anRVMObjectCoordinate label: 'readMostly' checkState: #isReadMostly whenChecked: #makeReadMostly whenUnchecked: [] monitor: true.\r\tmutabilityView addSubView: readWriteButton in:(0@0 extent: 1@0.5) borderWidth:0.\r\tmutabilityView addSubView: readMostlyButton in:(0@0.5 extent: 1@0.5) borderWidth:0.\r\r\tactivityView _ RVMView new..\r\tpassButton _ RVMRadioButtonView on: anRVMObjectCoordinate label: 'pass baton' checkState: #isActive whenChecked: #makeActive whenUnchecked: [] monitor: true.\r\tholdButton _ RVMRadioButtonView on: anRVMObjectCoordinate label: 'keep baton' checkState: #isPassive whenChecked: #makePassive whenUnchecked: [] monitor: true.\r\tactivityView addSubView: passButton in:(0@0 extent: 1@0.5) borderWidth:0.\r\tactivityView addSubView: holdButton  in:(0@0.5 extent: 1@0.5) borderWidth:0.\r\t\r\ttileCoordView _ RVMGridLocationView on: anRVMObjectCoordinate pointGetter: #coreCoordinate pointSetter: #moveToCoordinate: extentGetter: [RVMMonitor extent].\r\r\tcoreIndexView _ RVMCoreIndexView on: anRVMObjectCoordinate\r\t\tgetCoreIndex:#coreIndex\r\t\tsetCoreIndex: #moveToCore:\r\t\tgetAvailableIndicies: [RVMMonitor coreCount].\r\t\t\r\tcoordView _ self new.\r\tcoordView addSubView: mutabilityView in:(0@0 extent: 1/3@1) borderWidth:1.\r\tcoordView addSubView: activityView in:((1/3)@0 extent: 1/3@1) borderWidth:1.\r\tcoordView addSubView: tileCoordView in:((2/3)@0 extent: 1/6@1) borderWidth:1.\r\tcoordView addSubView: coreIndexView in:((5/6)@0 extent: 1/6@1) borderWidth:1.\r\t^coordView\r! !\r!RVMObjectCoordinateView class methodsFor: 'instance creation' stamp: 'ssa 11/15/2008 15:52'!\ropenOn: anRVMObjectCoordinate\r\t\"RVMObjectCoordinateView openOn: nil asObjectCoordinate\"\r\t\"Add me to a system view and open me on the desktop\"\r\t| topView  |\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\ttopView minimumSize: 300@50.\r\ttopView addSubView: (self on: anRVMObjectCoordinate) .\r\ttopView label: 'Locating: ',anRVMObjectCoordinate object printString.\r\ttopView controller open! !\r!RVMRadioButtonView methodsFor: 'displaying' stamp: 'ssa 11/16/2008 00:19'!\rbuildCheckedBoxForm \r\t\"Answer the check(ed) circle \"\r\t\r\t| box aForm aCircle dot |\r\tbox _ Form extent:18@18 depth: Display depth.\r\taForm _ Form extent: 2@2.\r\taForm fillBlack.\r\taCircle _ Circle new.\r\taCircle form: aForm.\r\taCircle radius: 9.\r\taCircle center: 8@8.\r\taCircle displayOn: box.\r\tdot _ Form dotOfSize: 10.\r\tdot displayOn: box at: box boundingBox center clippingBox: box boundingBox  rule: Form paint fillColor:nil.\r\t\t\r\t^box! !\r!RVMRadioButtonView methodsFor: 'displaying' stamp: 'ssa 11/16/2008 00:19'!\rbuildUncheckedBoxForm  \r\t\"Answer the uncheck(ed) circle \"\r\t\r\t| box aForm aCircle |\r\tbox _ Form extent:18@18 depth: Display depth.\r\taForm _ Form extent: 2@2.\r\taForm fillBlack.\r\taCircle _ Circle new.\r\taCircle form: aForm.\r\taCircle radius: 9.\r\taCircle center: 8@8.\r\taCircle displayOn: box.\r\t^box! !\r!RVMRadioButtonView methodsFor: 'action' stamp: 'ssa 11/16/2008 01:26'!\rperformAction\r\t\"I've been clicked, switch state and act\"\r\t| others |\r\tself checked: true.\r\tself performCheckAction.\r\tothers _ self superView subViewsSatisfying: [:each| each ~~ self and:[each class == self class]].\r\tothers  do:[:each| \r\t\teach checked: false.\r\t\teach performUncheckAction.\r\t\teach displayView].\r\tself displayView\r! !\r!RVMRadioButtonView class methodsFor: 'examples' stamp: 'ssa 10/18/2008 23:34'!\rexample\r\t\"RVMRadioButtonView example\"\r\t\r\tsuper example! !\r!RVMRadioButtonView class methodsFor: 'examples' stamp: 'ssa 5/12/2010 10:15'!\rexampleRecording\r\t\"RVMRadioButtonView exampleRecording\"\r\t| topView   offRadio loopRadio subViewCount longRadio fileRadio |\r\ttopView := RVMStandardSystemView new  .\r\ttopView borderWidth:1. \r\tRVMRadioButtonView testState:#(true false false false false).\r\toffRadio _ RVMRadioButtonView on: self label: 'off' checkState: [RVMMonitor recordingMode = #off] whenChecked: [RVMMonitor recordingMode: #off] whenUnchecked: [] monitor: true.\r\tloopRadio _ RVMRadioButtonView on: self label: 'record last ',RVMMonitor sampleLimit printString,' samples' checkState: [RVMMonitor recordingMode = #loop] whenChecked: [RVMMonitor recordingMode: #loop] whenUnchecked: [] monitor: true.\r\tlongRadio _ RVMRadioButtonView on: self label: 'record all samples' checkState: [RVMMonitor recordingMode = #long] whenChecked: [RVMMonitor recordingMode: #long] whenUnchecked: [] monitor: true.\r\tfileRadio _ RVMRadioButtonView on: self label: 'record all samples to a file' checkState: [RVMMonitor recordingMode = #file] whenChecked: [RVMMonitor recordingMode: #file] whenUnchecked: [] monitor: true.\r\t\r\ttopView addSubView: offRadio.\r\ttopView addSubView:  loopRadio below:  offRadio.\r\ttopView addSubView:  longRadio below:  loopRadio.\r\ttopView addSubView:  fileRadio below:  longRadio.\r\ttopView label: 'Recording Options'.\r\tsubViewCount _ topView subViews size.\r\ttopView minimumSize: 100@(subViewCount*28).\r\ttopView maximumSize: 200@topView minimumSize y.\r\ttopView controller open! !\r!RVMStripChartScaleView methodsFor: 'accessing' stamp: 'ssa 11/11/2008 22:02'!\radjustScaleBox\r\t\"Answer the value of adjustScaleBox\"\r\r\tadjustScaleBox isNil ifTrue:[self adjustScaleBox: self insetDisplayBox].\r\t^ adjustScaleBox! !\r!RVMStripChartScaleView methodsFor: 'accessing' stamp: 'ssa 11/11/2008 22:02'!\radjustScaleBox: anObject\r\t\"Set the value of adjustScaleBox\"\r\r\tadjustScaleBox _ anObject! !\r!RVMStripChartScaleView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:11'!\rcurrentAspect\r\t\"Answer the value of currentAspect\"\r\r\t^self currentTrace aspect! !\r!RVMStripChartScaleView methodsFor: 'accessing' stamp: 'ssa 10/3/2008 23:17'!\rcurrentAspectLabel\r\t\"Answer a good label for this aspect\"\r\r\t^self currentTrace aspectLabel! !\r!RVMStripChartScaleView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:12'!\rcurrentColor\r\t\"Answer the value of currentColor\"\r\r\t^self currentTrace color! !\r!RVMStripChartScaleView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:12'!\rcurrentTrace\r\t\"Answer the value of currentTrace\"\r\r\tcurrentTrace isNil ifTrue:[self currentTrace: self stripChart traces first].\r\t^ currentTrace! !\r!RVMStripChartScaleView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:11'!\rcurrentTrace: anObject\r\t\"Set the value of currentTrace\"\r\r\tcurrentTrace _ anObject! !\r!RVMStripChartScaleView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:10'!\rstripChart\r\t\"Answer the value of stripChart\"\r\r\tstripChart isNil ifTrue:[self stripChart: (RVMStripChartView trace:RVMCoreAspectTrace exampleInstance)].\r\t^ stripChart! !\r!RVMStripChartScaleView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:03'!\rstripChart: anObject\r\t\"Set the value of stripChart\"\r\r\tstripChart _ anObject! !\r!RVMStripChartScaleView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:57'!\ruiHolder\r\t\"Answer the value of uiHolder\"\r\r\tuiHolder isNil ifTrue:[self uiHolder: nil].\r\t^ uiHolder! !\r!RVMStripChartScaleView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:57'!\ruiHolder: anObject\r\t\"Set the value of uiHolder\"\r\r\tuiHolder _ anObject! !\r!RVMStripChartScaleView methodsFor: 'drawing' stamp: 'ssa 11/11/2008 21:59'!\radjustScaleIcon\r^((ColorForm\r\textent: 16@31\r\tdepth: 8\r\tfromArray: #( 0 0 0 0 0 0 169614364 622594560 0 0 1694498815 4294913536 0 0 1845490943 4294915840 0 0 0 3506384384 0 0 0 3506386688 73 1677721600 0 3657379328 163 3642490880 0 3506386688 9716 4287692800 172 4110364160 46591 4294913536 208 4110366464 4259839 4294936576 0 3506384384 8973264 4106150400 0 3657381632 6558618 3942664503 0 3506384384 154 3942645760 0 3657381632 154 3942645760 25700 3808374272 154 3942645760 60415 4294915840 154 3942645760 18761 3808374272 154 3942645760 0 3506386688 2424986 3942648357 0 3657379328 11304867 3947480869 0 3506386688 7798783 4294948096 0 3506384384 1300991 4294925056 217 4294915840 25855 4291821568 145 3959369216 199 4098424832 0 3657381632 118 2432696320 0 3506384384 28 620756992 0 3506386688 0 0 0 3657379328 0 0 1541003737 4110366464 0 0 1694498815 4294913536 0 0 321795886 1227753984 0 0 0 0)\r\toffset: 0@0)\r\tcolorsFromArray: #(#(1.0 1.0 1.0) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0)  ))! !\r!RVMStripChartScaleView methodsFor: 'drawing' stamp: 'ssa 11/11/2008 22:05'!\rdrawAdjustScaleIcon\r\t| adjustIcon origin |\r.\tadjustIcon _ self adjustScaleIcon.\r\tadjustIcon _ adjustIcon scaledToSize: adjustIcon extent * 0.75.\r\torigin _ self canvas boundingBox center - adjustIcon boundingBox extent - (0@6).\r\tadjustIcon displayOn: self canvas at: origin.\r\tself adjustScaleBox:(origin extent: adjustIcon extent)! !\r!RVMStripChartScaleView methodsFor: 'drawing' stamp: 'ssa 11/11/2008 22:03'!\rdrawCanvas\r\t| scaler maxLabel minLabel midLabel  box ticLength ticOffset topY midY bottomY leftX rightX margin aspectLabel |\r\tself eraseCanvas.\r\tscaler _ self currentTrace scaler.\r\taspectLabel _ self currentAspectLabel asDisplayText asParagraph asForm rotateBy: #left centerAt: 0@0.\r\tmaxLabel _ scaler max printShowingMax3Digits asDisplayText.\r\tminLabel _ scaler min printShowingMax3Digits asDisplayText.\t\r\tmidLabel _ (scaler range / 2 + scaler min) printShowingMax3Digits asDisplayText.\r\tmaxLabel foregroundColor: self currentColor backgroundColor: Color transparent.\r\tmidLabel foregroundColor: self currentColor backgroundColor: Color transparent.\r\tminLabel foregroundColor: self currentColor backgroundColor: Color transparent.\r\tbox _ self canvas boundingBox.\r\tticLength _ 4.\r\tticOffset _ maxLabel height // 2.\r\tmargin _ 2.\r\taspectLabel align: aspectLabel boundingBox leftCenter with: box leftCenter.\r\taspectLabel displayOn: self canvas at: 0@0 clippingBox: box.\r\tmaxLabel align: maxLabel boundingBox topRight with: box topRight - (ticLength+margin+1@0).\r\tmaxLabel displayOn: self canvas.\r\tmidLabel align: midLabel boundingBox rightCenter with: box rightCenter - (ticLength+margin+1@0).\r\tmidLabel displayOn: self canvas.\r\tminLabel align: minLabel boundingBox bottomRight with: box bottomRight -(ticLength+margin+1@0).\r\tminLabel displayOn: self canvas.\r\ttopY _ box topRight y .\r\tmidY _ box center y.\r\tbottomY _ box bottomRight y - 2.\r\tleftX _ box topRight x - ticLength - margin.\r\trightX _ box corner x - margin.\r\tself canvas fill: (rightX - 1@topY corner: rightX@bottomY) fillColor: self currentColor.\t\r\tself canvas fill: (leftX@topY extent: ticLength@1) fillColor: self currentColor.\r\tself canvas fill: (leftX@(topY+midY//2) extent: ticLength@1) fillColor: self currentColor.\r\tself canvas fill: (leftX@midY extent: ticLength@1) fillColor: self currentColor.\r\tself canvas fill: (leftX@(midY+bottomY//2) extent: ticLength@1) fillColor: self currentColor.\r\tself canvas fill: (leftX@bottomY extent: ticLength@1) fillColor: self currentColor.\r\tself drawAdjustScaleIcon! !\r!RVMStripChartScaleView methodsFor: 'framing' stamp: 'ssa 1/1/1970 00:24'!\rnewFrame\r\tself canvas: nil.\r\tself extent: self insetDisplayBox extent.\r\tself drawCanvas.\r\tself displayView! !\r!RVMStripChartScaleView methodsFor: 'controller access' stamp: 'ssa 1/1/1970 00:04'!\rdefaultControllerClass\r\r\t^RVMStripChartScaleController! !\r!RVMStripChartScaleView methodsFor: 'listening' stamp: 'ssa 1/1/1970 00:05'!\rhear: something\r\t\"Update my traces and redisplay\"\r\tself drawCanvas.\r\tself displayView! !\r!RVMStripChartScaleView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:22'!\rexample\r\t\"RVMStripChartScaleView example\"\r\t\r\tself new demo! !\r!RVMStripChartScaleView class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:58'!\rstripChart: aStripChart uiHolder: aUIHolder\r\r\t| view |\r\tview _ self new.\r\tview stripChart: aStripChart.\r\tview uiHolder: aUIHolder.\r\t^view! !\r!RVMStripChartView methodsFor: 'drawing' stamp: 'ssa 10/2/2008 19:21'!\rdrawCanvas\r\r\tself eraseCanvas.\r\tself traces do:[:trace|\r\t\ttrace drawOn: self canvas]! !\r!RVMStripChartView methodsFor: 'drawing' stamp: 'ssa 10/3/2008 23:13'!\rdrawFastOnCanvas\r\t| box |\r\tself traces isEmpty ifTrue:[^self canvas fillWhite].\r\tself traces first isFull ifTrue:[self canvas displayOn: self canvas at: -2@0].\r\tbox _ self canvas boundingBox.\r\tself canvas fillWhite: (box topRight - (2@0) extent: 2@ box height).\r\tself traces do:[:trace|\r\t\ttrace drawLastOn: self canvas ]! !\r!RVMStripChartView methodsFor: 'drawing' stamp: 'ssa 10/2/2008 19:21'!\rredrawCanvas\r\r\tself eraseCanvas.\r\tself traces do:[:trace|\r\t\ttrace redrawOn: self canvas]! !\r!RVMStripChartView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:26'!\rdefaultOffset\r\r\t^self canvas width negated@ 0! !\r!RVMStripChartView methodsFor: 'accessing' stamp: 'ssa 10/3/2008 16:09'!\rrescaleCounter\r\t\"Answer the value of rescaleCounter\"\r\r\trescaleCounter isNil ifTrue:[self rescaleCounter: 15].\r\t^ rescaleCounter ! !\r!RVMStripChartView methodsFor: 'accessing' stamp: 'ssa 10/3/2008 15:21'!\rrescaleCounter: anObject\r\t\"Set the value of rescaleCounter\"\r\r\trescaleCounter _ anObject! !\r!RVMStripChartView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:00'!\rtraces\r\t\"Answer the value of traces\"\r\r\ttraces isNil ifTrue:[self traces: OrderedCollection new].\r\t^ traces! !\r!RVMStripChartView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:00'!\rtraces: anObject\r\t\"Set the value of traces\"\r\r\ttraces _ anObject! !\r!RVMStripChartView methodsFor: 'framing' stamp: 'ssa 10/8/2008 18:34'!\rfirstFrame\r\t\"First time framed, set my canvas to match my view\"\r\tself canvas: nil.\r\tself extent: self insetDisplayBox extent - (0@2).\r\tself traces do:[:trace| trace resizeTo: self extent x //2].\r\tself drawCanvas.\r! !\r!RVMStripChartView methodsFor: 'framing' stamp: 'ssa 10/3/2008 23:23'!\rnewFrame\r\t\"My frame has changed. Reset my canvas to my new size and redraw\"\r\tself canvas: nil.\r\tself extent: self insetDisplayBox extent - (0@2).\r\tself traces do:[:trace| trace resizeTo: self extent x //2].\r\tself drawCanvas.\r\tself displayView! !\r!RVMStripChartView methodsFor: 'framing' stamp: 'ssa 10/4/2008 08:28'!\rrebuildAll\r\t|  view subGroups width scaleView scaleWidth topView extraRows |\r\ttopView _ self topView.\r\t(topView allSubViews copyWithout: self) do:[:v| v release].\r\ttopView subViews: (OrderedCollection with: self).\r\ttopView borderWidth:1.\r\twidth _ 400.\r\tview _ self .\r\tscaleWidth _ 60.\r\tsubGroups _ RVMTraceUIHolderView forStripChart: view.\r\tview extent: width - scaleWidth@100.\r\tscaleView _ RVMStripChartScaleView stripChart: view uiHolder:subGroups.\r\textraRows _ self traces size = 1 ifTrue:[0]ifFalse:[subGroups subViews size].\r\ttopView minimumSize: width@(100+(extraRows * 20)).\r\ttopView addSubView: scaleView viewport: (0@0 extent: scaleWidth@100).\r\textraRows > 0 ifTrue:[topView addSubView: subGroups viewport: (0@100 extent: width@(extraRows* 20))].\r\ttopView backgroundColor: Color white.\r\tview borderWidthLeft: 0\r\t\tright: 1\r\t\ttop: 1\r\t\tbottom: 1.\r\tscaleView borderWidthLeft: 1\r\t\tright: 0\r\t\ttop: 1\r\t\tbottom: 1.\r\tsubGroups borderWidth:0.\r\ttopView reframeTo:(topView displayBox origin - (0@(topView labelHeight -2) ) extent: topView minimumSize + (0@topView labelHeight)).\r\tScheduledControllers restore: topView windowBox.\r\t! !\r!RVMStripChartView methodsFor: 'listening' stamp: 'ssa 11/11/2008 22:38'!\rhear: something\r\t\"Update my traces and redisplay\"\r\t| outOfRangeTraces |\r\tself rescaleCounter: self rescaleCounter - 1.\r\tself rescaleCounter = 0 ifTrue:[self rescaleCounter:nil.  \r\t\tself traces do:[:trace| trace scaler automaticScaling ifTrue:[trace rescale]]]. \r\tself traces do:[:trace| trace addData].\r\toutOfRangeTraces _ self traces select:[:trace| trace scaler outOfRangeDetected] .\r\toutOfRangeTraces isEmpty ifTrue:[self drawFastOnCanvas.\r\t\t\t^self displayView].\r\tself redrawCanvas.\r\toutOfRangeTraces do:[:trace| trace scaler resetOutOfRangeDetector].\r\tself displayView! !\r!RVMStripChartView methodsFor: 'controller access' stamp: 'ssa 1/1/1970 00:38'!\rdefaultControllerClass\r\r\t^RVMStripChartController! !\r!RVMStripChartView methodsFor: 'add/remove traces' stamp: 'ssa 10/4/2008 08:18'!\raddCoreTraceForAspect: aSymbol coreIndex: anInteger\r\t\r\t | traceSize existingColors traceColor newTrace |\r\ttraceSize _ self extent x //2.\r\texistingColors _ self traces collect:[:trace| trace color].\r\t[traceColor _ Color random darker.\r\tself traces isEmpty or:[ (existingColors collect:[:color| color diff: traceColor]) asSortedCollection last < 0.7]] whileFalse.\r\tnewTrace _ RVMCoreAspectTrace coreIndex: anInteger aspect: aSymbol size: traceSize color: traceColor.\r\tself traces add: newTrace.\r\tself newFrame! !\r!RVMStripChartView methodsFor: 'add/remove traces' stamp: 'ssa 10/3/2008 23:08'!\raddSystemTraceForAspect: aSymbol\r\t\r\t | traceSize existingColors traceColor newTrace |\r\ttraceSize _ self extent x //2.\r\texistingColors _ self traces collect:[:trace| trace color].\r\t[traceColor _ Color random darker.\r\tself traces isEmpty or:[(existingColors collect:[:color| color diff: traceColor]) asSortedCollection last < 0.7]] whileFalse.\r\tnewTrace _ RVMAspectTrace aspect: aSymbol size: traceSize color: traceColor.\r\tself traces add: newTrace.\r\tself newFrame! !\r!RVMStripChartView methodsFor: 'add/remove traces' stamp: 'ssa 10/3/2008 22:59'!\rremoveAllTraces\r\t\r\tself traces removeAll: self traces copy.\r! !\r!RVMStripChartView methodsFor: 'add/remove traces' stamp: 'ssa 1/1/1970 00:51'!\rremoveTrace: aTrace\r\t\r\tself traces remove: aTrace.\r\tself newFrame! !\r!RVMStripChartView methodsFor: 'add/remove traces' stamp: 'ssa 1/1/1970 00:51'!\rremoveTraces: someTraces\r\t\r\tself traces removeAll: someTraces.\r\tself newFrame! !\r!RVMStripChartView methodsFor: 'displaying' stamp: 'ssa 10/21/2008 11:32'!\rdisplayView\r\t\"Display my canvas at my offset.\r\tSubclasses should not override this method but should draw on the canvas instead\"\r\tself okToDisplay ifFalse:[^self].\r\tself uncache.\r\tself canvas displayOn: Display at: self insetDisplayBox origin + self offset - (0@2 ) clippingBox: self insetDisplayBox.\r! !\r!RVMStripChartView class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:30'!\ropenOnTrace: aTrace\r\t\"RVMStripChartView openOnTrace: RVMAspectTrace exampleInstance\"\r\tself openOnTrace:  aTrace titled:'Multi-aspect Stripchart'\r! !\r!RVMStripChartView class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:30'!\ropenOnTrace: aTrace titled: aString\r\t| topView view subGroups width scaleView scaleWidth |\r\ttopView _ RVMStandardSystemView new.\r\ttopView label: aString.\r\ttopView borderWidth:1.\r\twidth _ 400.\r\tview _ self traces: (OrderedCollection with: aTrace).\r\tscaleWidth _ 60.\r\tview extent: width - scaleWidth@100.\r\tscaleView _ RVMStripChartScaleView stripChart: view uiHolder:subGroups.\r\ttopView minimumSize: width@100.\r\ttopView addSubView: view viewport: (scaleWidth@0 extent: width-scaleWidth@100).\r\ttopView addSubView: scaleView viewport: (0@0 extent: scaleWidth@100).\r\ttopView backgroundColor: Color white.\r\tview borderWidthLeft: 0\r\t\tright: 1\r\t\ttop: 1\r\t\tbottom: 1.\r\tscaleView borderWidthLeft: 1\r\t\tright: 0\r\t\ttop: 1\r\t\tbottom: 1.\r\ttopView controller open! !\r!RVMStripChartView class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 01:16'!\ropenOnTraces: someTraces\r\t\"RVMCoreAspectTrace exampleView3\"\r\tself openOnTraces: someTraces titled: 'Multi-aspect Stripchart'! !\r!RVMStripChartView class methodsFor: 'instance creation' stamp: 'ssa 10/8/2008 19:09'!\ropenOnTraces: someTraces titled: aString\r\t| topView view subGroups width scaleView scaleWidth |\r\tsomeTraces size = 1 ifTrue:[self openOnTrace: someTraces first titled: aString].\r\ttopView _ RVMStandardSystemView new.\r\ttopView label: aString.\r\ttopView borderWidth:1.\r\tsomeTraces size > 2 ifTrue:[width _ 400]ifFalse:[width _ someTraces size + 1 * 150 ].\r\tview _ self traces: someTraces.\r\tscaleWidth _ 60.\r\tsubGroups _ RVMTraceUIHolderView forStripChart: view.\r\tview extent: width - scaleWidth@100.\r\tscaleView _ RVMStripChartScaleView stripChart: view uiHolder:subGroups.\r\ttopView minimumSize: width@(100+(subGroups subViews size + 1 * 20)).\r\ttopView addSubView: view viewport: (scaleWidth@0 extent: width-scaleWidth@100).\r\ttopView addSubView: scaleView viewport: (0@0 extent: scaleWidth@100).\r\ttopView addSubView: subGroups viewport: (0@100 extent: width@(subGroups subViews size* 20)).\r\ttopView backgroundColor: Color white.\r\tview borderWidthLeft: 0\r\t\tright: 1\r\t\ttop: 1\r\t\tbottom: 1.\r\tscaleView borderWidthLeft: 1\r\t\tright: 0\r\t\ttop: 1\r\t\tbottom: 1.\r\tsubGroups borderWidth:0.\r\ttopView controller open! !\r!RVMStripChartView class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:10'!\rtrace: aTrace\r\r\t^self traces:(OrderedCollection with: aTrace)! !\r!RVMStripChartView class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 01:09'!\rtraces: someTraces\r\r\t| view |\r\tview _ self new.\r\tview traces: someTraces.\r\t^view! !\r!RVMStripChartView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:09'!\rexample\r\t\"RVMStripChartView example\"\r\tself openOnTrace: RVMCoreAspectTrace exampleInstance! !\r!RVMTileGridView methodsFor: 'autoscaling' stamp: 'ssa 10/1/2008 09:09'!\rautoscale\r\t\"Adjust my scale so that it fits the data.\"\r\tself minValue: self data min.\r\tself maxValue: self data max.\r\tself scale:nil! !\r!RVMTileGridView methodsFor: 'updating' stamp: 'ssa 1/1/1970 00:34'!\rhear: someObject\r\r\tself sample: nil.\r\tself topView isCollapsed ifFalse:[self displayView]! !\r!RVMTileGridView methodsFor: 'updating' stamp: 'ssa 10/3/2008 19:33'!\rnewFrame\r\r\tself canvas: nil.\r\tself displayView! !\r!RVMTileGridView methodsFor: 'updating' stamp: 'ssa 8/19/2008 18:25'!\runlock\r\r\tsuper unlock.\r\tself tiles:nil\r! !\r!RVMTileGridView methodsFor: 'controller access' stamp: 'ssa 1/1/1970 00:30'!\rdefaultControllerClass\r\t^RVMTileGridController! !\r!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 8/15/2008 16:34'!\raspect\r\t\"Answer the value of aspect\"\r\r\taspect isNil ifTrue:[self aspect: #bytecodesPerSecond].\r\t^aspect! !\r!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:57'!\raspect: anObject\r\t\"Set the value of aspect\"\r\r\taspect := anObject.\r\tself topView == self ifFalse:[self topView relabel: self typeLabel,anObject]! !\r!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 8/20/2008 14:27'!\raspects\r\t^self sample aspects! !\r!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 10/3/2008 20:46'!\rcanvas\r\tcanvas isNil ifTrue:[self canvas: (Form fromDisplay: self insetDisplayBox) fillWhite].\r\t^canvas ! !\r!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 9/24/2008 17:45'!\rcanvas: aForm\r\r\tcanvas _ aForm! !\r!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rcolors\r\t\"Answer the value of colors\"\r\r\tcolors isNil ifTrue:[self colors: self makeColors].\r\t^colors! !\r!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 8/15/2008 16:20'!\rcolors: anObject\r\t\"Set the value of colors\"\r\r\tcolors := anObject! !\r!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 10/1/2008 09:12'!\rdata\r\t\"Answer the value of data\"\r\tdata isNil ifTrue:[\r\t\t(self sample respondsTo: self aspect) ifFalse: [^ Array new: 0].\r\t\tself data: (self sample perform: self aspect)].\r\t^data! !\r!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 10/3/2008 20:29'!\rdata: anObject\r\t\"Set the value of data\"\r\r\tdata := anObject.\r\tdata ifNotNil:[(data isKindOf: Collection) ifFalse:[data _ Array with: data]].\r\tdata notNil ifTrue:[self autoscale]! !\r!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 5/4/2010 12:44'!\rgridExtent\r\t\"Answer the width and height of the grid of tiles that is appropriate for the  layout of cores we have\"\r\r\t| total |\r\ttotal _ self data size.\r\ttotal = 1 ifTrue:[^1@1].\r\ttotal < 4 ifTrue:[^1@ total].\r\ttotal = 4 ifTrue:[^2@ 2].\r\ttotal < 16 ifTrue:[^4@ (total/4+0.5)rounded].\r\t\"otherwise assume a Tilera 8x8 grid\"\r\t^self sample groupStats width @ self sample groupStats height! !\r!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\rmakeColors\r\r\t^(Color hotColdShades: self numberOfColors) reversed! !\r!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 8/15/2008 16:22'!\rmaxValue\r\t\"Answer the value of maxValue\"\r\r\tmaxValue isNil ifTrue:[self maxValue: 5000].\r\t^maxValue! !\r!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 8/15/2008 16:20'!\rmaxValue: anObject\r\t\"Set the value of maxValue\"\r\r\tmaxValue := anObject! !\r!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 8/15/2008 16:22'!\rminValue\r\t\"Answer the value of minValue\"\r\r\tminValue isNil ifTrue:[self minValue: 0].\r\t^minValue! !\r!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 8/15/2008 16:20'!\rminValue: anObject\r\t\"Set the value of minValue\"\r\r\tminValue := anObject! !\r!RVMTileGridView methodsFor: 'accessing' stamp: 'dmu 1/1/1970 00:26'!\rnumberOfColors\r\t\"Answer the value of numberOfColors\"\r\r\tnumberOfColors isNil ifTrue:[self numberOfColors: 100].\r\t^numberOfColors! !\r!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 8/15/2008 19:50'!\rnumberOfColors: anObject\r\t\"Set the value of numberOfColors\"\r\r\tnumberOfColors := anObject rounded.\r\tself colors:nil.\r\tself changed:#numberOfColors! !\r!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 8/22/2008 09:25'!\rsample\r\t\"Answer the value of sample\"\r\r\tsample isNil ifTrue:[self sample: RVMMonitor lastSample].\r\t^sample! !\r!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 8/22/2008 09:49'!\rsample: anObject\r\t\"Set the value of sample\"\r\r\tsample := anObject..\r\tself data:nil.\r\r! !\r!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 8/22/2008 10:04'!\rscale\r\t\"Answer the value of scale\"\r\r\tscale isNil ifTrue:[self scale: self maxValue / self numberOfColors asFloat].\r\t^scale ! !\r!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:50'!\rscale: anObject\r\t\"Set the value of scale\"\r\r\tscale := anObject.\r\tscale = 0 ifTrue: [scale := 0.01].\r\tself changed:#scale.\r! !\r!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 10/1/2008 09:06'!\rscaler\r\t\"Answer a scaler for me as needed\"\r\t^RVMDataScaler aspect: self aspect min: self minValue max: self maxValue! !\r!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 8/19/2008 18:09'!\rshowProcessState\r\t\"Answer the value of showProcessState\"\r\r\tshowProcessState isNil ifTrue:[self showProcessState: false].\r\t^showProcessState! !\r!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 8/19/2008 18:08'!\rshowProcessState: anObject\r\t\"Set the value of showProcessState\"\r\r\tshowProcessState := anObject! !\r!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:13'!\rtiles\r\t\"Answer the value of tiles\"\r\ttiles isNil ifTrue:[self tiles: (self insetDisplayBox subDivideRoundedBy: \r\t\t(self data size > 1 ifTrue:[self sample groupStats width @ self sample groupStats height]ifFalse:[1@1]))].\r\t^tiles! !\r!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 8/15/2008 11:56'!\rtiles: anObject\r\t\"Set the value of tiles\"\r\r\ttiles := anObject! !\r!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:58'!\rtypeLabel\r\r\t^'Rel: '! !\r!RVMTileGridView methodsFor: 'displaying' stamp: 'ssa 11/4/2008 15:47'!\rdisplayView\r\t| color colorIndex |\r\tself okToDisplay ifFalse:[^self].\r\tself uncache.\r\tself sample: nil.\r \t\rself canvas fillColor: self tileBorderColor.\r\r\t1 to: self tiles size do:[:index|\r\t\tcolor := index > self data size \r\t\t\t\tifFalse:[\r\t\t\t\t\tcolorIndex _ (((self data at: index) / self scale)min: self numberOfColors max: 1) rounded.\r\t\t\t\t\tself colors at: colorIndex]\r\t\t\t\tifTrue:[Color black].\r\t\t\t\tself canvas fill: (((self tiles at: index) translateBy: self insetDisplayBox origin negated)insetBy:1@1) fillColor: color .\r\t\tself tiles size = 1 ifTrue:[(self data first printString asDisplayText alignedTo:#center)displayOn: self canvas at: self canvas boundingBox  center].\r\t\t\r\t\t].\rself canvas displayAt: self insetDisplayBox origin\r! !\r!RVMTileGridView methodsFor: 'displaying' stamp: 'ssa 11/4/2008 20:41'!\rredrawOnCanvas\r\t\"do nothing\"! !\r!RVMTileGridView methodsFor: 'displaying' stamp: 'ssa 1/1/1970 01:42'!\rtileBorderColor\r\r\t^Color darkGray! !\r!RVMTileGridScalerView methodsFor: 'displaying' stamp: 'ssa 10/21/2008 11:32'!\rdisplayView\r\t| color  |\r\tself okToDisplay\r\t\tifFalse: [^ self].\r\tself uncache.\r\tself sample: nil.\r\tself scaler resetObservations.\r\tself canvas fillColor: self tileBorderColor.\r\t1 to: self tiles size\r\t\tdo: [:index | \r\t\t\tcolor := index > self data size\r\t\t\t\t\t\tifTrue: [Color black]\r\t\t\t\t\t\tifFalse: [self colors at: ((self scaler scale: (self data at: index))min: 100 max:1)].\r\t\t\tself canvas\r\t\t\t\tfill: (((self tiles at: index)\r\t\t\t\t\t\ttranslateBy: self insetDisplayBox origin negated)\r\t\t\t\t\t\tinsetBy: 1 @ 1)\r\t\t\t\tfillColor: color.\r\t\t\tself tiles size = 1\r\t\t\t\tifTrue: [(self data first printString asDisplayText alignedTo: #center)\r\t\t\t\t\t\tdisplayOn: self canvas\r\t\t\t\t\t\tat: self canvas boundingBox center]].\r\tself canvas displayAt: self insetDisplayBox origin! !\r!RVMTileGridScalerView methodsFor: 'accessing' stamp: 'ssa 10/3/2008 20:07'!\raspect: aSymbol.\r\tself scaler: nil.\r\tsuper aspect: aSymbol! !\r!RVMTileGridScalerView methodsFor: 'accessing' stamp: 'ssa 10/3/2008 20:02'!\rrescaleCounter\r\t\"Answer the value of rescaleCounter\"\r\r\trescaleCounter isNil ifTrue:[self rescaleCounter: 30].\r\t^ rescaleCounter! !\r!RVMTileGridScalerView methodsFor: 'accessing' stamp: 'ssa 10/3/2008 20:03'!\rrescaleCounter: anObject\r\t\"Set the value of rescaleCounter\"\r\r\trescaleCounter _ anObject ! !\r!RVMTileGridScalerView methodsFor: 'accessing' stamp: 'ssa 10/1/2008 08:46'!\rscaler\r\t\"Answer the value of scaler\"\r\r\tscaler isNil ifTrue:[self scaler: (RVMMonitor scalerFor: self aspect)].\r\t^ scaler! !\r!RVMTileGridScalerView methodsFor: 'accessing' stamp: 'ssa 10/1/2008 08:45'!\rscaler: anObject\r\t\"Set the value of scaler\"\r\r\tscaler _ anObject! !\r!RVMTileGridScalerView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:11'!\rtypeLabel\r\r\t^'Abs: '! !\r!RVMTileGridScalerView methodsFor: 'listening' stamp: 'ssa 11/4/2008 15:37'!\rhear: someObject\r\r\t\"self rescaleCounter: self rescaleCounter - 1.\r\tself rescaleCounter = 0 ifTrue:[self rescaleCounter:nil.  \r\t\tself scaler resetScaling]. \"\r\tself sample: nil.\r\tself topView isCollapsed ifFalse:[self displayView]! !\r!RVMTileGridView class methodsFor: 'examples' stamp: 'ssa 11/4/2008 20:17'!\rexample\r\t\"RVMTileGridView example\"\r\t\r\t| topView v scaleWidth |\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\tscaleWidth _ 70.\r\ttopView minimumSize: 200+scaleWidth@200.\r\ttopView maximumSize: 460@400.\r\ttopView addSubView: (v := self new) viewport: (scaleWidth@0 extent: 200@200).\r\ttopView addSubView: (RVMColorScaleView aspectSource: [v aspect] scalerSource: [v scaler] colorsSource: [v colors reverse] orientation: #vertical  forView: v adjustScaler: false) viewport:(0@0 extent:scaleWidth@200).\r\ttopView label: v typeLabel,v aspect.\r\ttopView controller open! !\r!RVMTileGridView class methodsFor: 'instance creation' stamp: 'ssa 8/15/2008 16:36'!\raspect: aMessageSelector numberOfColors: numColors minValue: minValue maxValue: maxValue\r\t\"Answer a new view with these params\"\r\t\r\t| view |\r\tview := self new.\r\tview \r\t\taspect: aMessageSelector;\r\t \tnumberOfColors: numColors;\r\t\tminValue: minValue;\r\t\tmaxValue: maxValue.\r\t^view! !\r!RVMTileGridView class methodsFor: 'accessing' stamp: 'ssa 11/4/2008 20:19'!\radjustScaler\r\r\t^false! !\r!RVMTileGridScalerView class methodsFor: 'examples' stamp: 'ssa 11/4/2008 20:15'!\rexample\r\t\"RVMTileGridScalerView example\"\r\t\r\t| topView v scaleWidth |\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\tscaleWidth _ 70.\r\ttopView minimumSize: 200+scaleWidth@200.\r\ttopView maximumSize: 460@400.\r\ttopView addSubView: (v := self new) viewport: (scaleWidth@0 extent: 200@200).\r\ttopView addSubView: (RVMColorScaleView aspectSource: [v aspect] scalerSource: [v scaler] colorsSource: [v colors reverse] orientation: #vertical forView: v adjustScaler: true) viewport:(0@0 extent:scaleWidth@200).\r\ttopView label: v typeLabel,v aspect.\r\ttopView controller open! !\r!RVMTileStripChartView methodsFor: 'displaying' stamp: 'ssa 10/21/2008 11:32'!\rdisplayView\r\tself okToDisplay ifFalse:[^self].\r\tself uncache.\r\tself canvas displayOn: Display at: self insetDisplayBox origin clippingBox: self insetDisplayBox.! !\r!RVMTileStripChartView methodsFor: 'displaying' stamp: 'ssa 10/3/2008 20:47'!\rdrawOnCanvas\r\t| color colorIndex |\r\t[#draw print].\r\tself canvas displayOn: self canvas at: self boxSize negated @ 0.\r\t1 to: self count do: [:index | \r\t\t\tcolorIndex := ((self data at: index)\r\t\t\t\t\t\t/ self scale min: self numberOfColors max: 1) rounded.\r\t\t\tcolor := self colors at: colorIndex.\r\t\t\tself canvas\r\t\t\t\tfill: ((self boxes at: index)\r\t\t\t\t\t\ttranslateBy: self insetDisplayBox origin negated)\r\t\t\t\tfillColor: color]! !\r!RVMTileStripChartView methodsFor: 'displaying' stamp: 'ssa 1/1/1970 01:38'!\reraseStrip\r\tself previousData:nil.\r\tself canvas fillWhite.\r\t\r\tself displayView! !\r!RVMTileStripChartView methodsFor: 'displaying' stamp: 'ssa 10/3/2008 20:27'!\rredrawOnCanvas\r\t| color colorIndex x |\r\t#redraw print.\r\tself canvas fillWhite.\r\tx _ 0.\r\tself previousData do:[:oldData|\r\t1 to: self count do: [:index | \r\t\t\tcolorIndex := ((oldData at: index)\r\t\t\t\t\t\t/ self scale min: self numberOfColors max: 1) rounded.\r\t\t\tcolor := self colors at: colorIndex.\r\t\t\tself canvas\r\t\t\t\tfill: ((self boxes at: index)\r\t\t\t\t\t\ttranslateBy: self insetDisplayBox origin negated - (x@0))\r\t\t\t\tfillColor: color].\r\t\t\tx _ x + self boxSize]! !\r!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 10/3/2008 20:37'!\raspect: anObject\r\t\"Set the value of aspect\"\r\r\tsuper aspect: anObject.\r\tself eraseStrip! !\r!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 8/22/2008 08:48'!\rbox\r\t\"Answer the value of box\"\r\r\tbox isNil ifTrue:[self box: (self insetDisplayBox topRight - (self boxSize @ 0) extent: self boxSize @ self insetDisplayBox height)].\r\t^box! !\r!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 8/22/2008 09:02'!\rbox: anObject\r\t\"Set the value of box\"\r\r\tbox := anObject.\r\tself boxes:nil.\r\tself boxSize: nil! !\r!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 5/4/2010 15:24'!\rboxSize\r\t\"Answer the value of boxSize\"\r\r\tboxSize isNil ifTrue:[self boxSize: ((self insetDisplayBox height // self count max:1)min:4)].\r\t^boxSize! !\r!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 8/20/2008 16:30'!\rboxSize: anObject\r\t\"Set the value of boxSize\"\r\r\tboxSize := anObject! !\r!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 4/20/2010 10:23'!\rboxes\r\t\"Answer the value of boxes\"\r\r\tboxes isNil ifTrue:[self boxes: (self box subDivideRoundedBy: 1@ self count)].\r\t^boxes! !\r!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 8/20/2008 16:30'!\rboxes: anObject\r\t\"Set the value of boxes\"\r\r\tboxes := anObject! !\r!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 10/9/2008 11:42'!\rchart\r\t\"Answer the value of chart\"\r\r\tchart isNil ifTrue:[self chart: (Form fromDisplay: self insetDisplayBox)].\r\t^chart! !\r!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 8/20/2008 16:33'!\rchart: anObject\r\t\"Set the value of chart\"\r\r\tchart := anObject! !\r!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 8/20/2008 16:32'!\rcount\r\t\"Answer the value of count\"\r\r\tcount isNil ifTrue:[self count: self data size].\r\t^count! !\r!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 8/20/2008 16:30'!\rcount: anObject\r\t\"Set the value of count\"\r\r\tcount := anObject! !\r!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:36'!\rdata: someData\r\r\tsuper data: someData.\r\tsomeData notNil ifTrue:[self previousData add: someData]! !\r!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:00'!\rpreviousData\r\t\"Answer the value of previousData\"\r\r\tpreviousData isNil ifTrue:[self previousData: (RVMCircularCollection new: self visibleSampleCount)].\r\t^previousData! !\r!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 8/20/2008 16:28'!\rpreviousData: anObject\r\t\"Set the value of previousData\"\r\r\tpreviousData := anObject! !\r!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 10/3/2008 20:41'!\rscale: aValue\r\t\"Set the value of scale\"\r\r\tsuper scale: aValue.\r\t\"aValue isNil ifFalse:[self redrawOnCanvas]\"! !\r!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 8/20/2008 17:22'!\runlock\r\r\tsuper unlock.\r\tself box:nil\r! !\r!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:06'!\rvisibleSampleCount\r\t\"How many samples (columns of boxes) can I currently display?\"\r\t\r\t^self chart boundingBox width // self boxSize! !\r!RVMTileStripChartView methodsFor: 'updating' stamp: 'ssa 10/3/2008 20:34'!\rhear: someObject\r\r\tself sample: nil.\r\tself drawOnCanvas.\r\tself topView isCollapsed ifFalse:[self displayView]! !\r!RVMTileStripChartView methodsFor: 'updating' stamp: 'ssa 1/1/1970 00:10'!\rnewFrame\r\r\tsuper newFrame.\r\tself canvas:nil.\r\tself box: nil! !\r!RVMTileStripChartView methodsFor: 'controller access' stamp: 'ssa 1/1/1970 00:30'!\rdefaultControllerClass\r\t^RVMTileStripChartController! !\r!RVMTileStripChartView methodsFor: 'scaling' stamp: 'ssa 10/3/2008 22:26'!\rrescale\r\r\t\"do nothing\"! !\r!RVMScanningStripChartView methodsFor: 'displaying' stamp: 'ssa 10/28/2008 15:21'!\rdrawOnCanvas\r\t| color colorIndex |\r\t1 to: self count do: [:index | \r\t\t\tcolorIndex := ((self data at: index)\r\t\t\t\t\t\t/ self scale min: self numberOfColors max: 1) rounded.\r\t\t\tcolor := self colors at: colorIndex.\r\t\t\tself scanner\r\t\t\t\tfill: (self boxes at: index)\r\t\t\t\tfillColor: color].\r\tself scanner displayOn: self canvas at: self nextScannerLocation @ 0.\r! !\r!RVMScanningStripChartView methodsFor: 'displaying' stamp: 'ssa 10/28/2008 20:37'!\reraseStrip\r\t\r\t\r\tself resetScannerLocation.\r\tsuper eraseStrip.! !\r!RVMScanningStripChartView methodsFor: 'displaying' stamp: 'ssa 10/28/2008 20:02'!\rnextScannerLocation\r\t\"Answer the next location for the scanner\"\r\tself scannerLocation: self scannerLocation + self boxSize.\r\t^self scannerLocation! !\r!RVMScanningStripChartView methodsFor: 'displaying' stamp: 'ssa 10/28/2008 20:41'!\rredrawOnCanvas\r\t| color colorIndex |\r\tself canvas fillWhite.\r\tself resetScannerLocation.\r\tself previousData do:[:oldData|\r\t1 to: self count do: [:index | \r\t\t\tcolorIndex := ((oldData at: index)\r\t\t\t\t\t\t/ self scale min: self numberOfColors max: 1) rounded.\r\t\t\tcolor := self colors at: colorIndex.\r\t\t\tself scanner\r\t\t\t\tfill: (self boxes at: index)\r\t\t\t\tfillColor: color].\r\tself scanner displayOn: self canvas at: self nextScannerLocation @ 0]! !\r!RVMScanningStripChartView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 15:20'!\rbox\r\t\"Answer the value of box\"\r\r\tbox isNil ifTrue:[self box: (0@0 extent: self boxSize @ self scanner boundingBox height)].\r\t^box! !\r!RVMScanningStripChartView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 20:37'!\rresetScannerLocation\r\r\tscannerLocation _ nil! !\r!RVMScanningStripChartView methodsFor: 'accessing' stamp: 'ssa 5/4/2010 15:27'!\rscanner\r\t\"Answer the value of scanner\"\r\r\tscanner isNil ifTrue:[self scanner: (ColorForm extent: self boxSize * 3 @self canvas height depth:8)].\r\t^ scanner! !\r!RVMScanningStripChartView methodsFor: 'accessing' stamp: 'ssa 5/4/2010 15:31'!\rscanner: anObject\r\t\"Set the value of scanner\"\r\r\tscanner _ anObject.\r\tscanner fillWhite.\r\tscanner border: scanner boundingBox width:1 fillColor:Color black.\r'<\r<\r<\r<\r<\r<\r<\r<\r<\r<\r<\r<\r<\r<\r<\r<' asParagraph asForm displayOn: scanner at: scanner boundingBox topCenter - (1@0).\rscanner border: scanner boundingBox width:1\r\t! !\r!RVMScanningStripChartView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 15:24'!\rscannerLocation\r\t\"Answer the value of scannerLocation\"\r\r\tscannerLocation isNil ifTrue:[self scannerLocation: self boxSize negated].\r\t^ scannerLocation! !\r!RVMScanningStripChartView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 20:15'!\rscannerLocation: anInteger\r\t\"Set the value of scannerLocation\"\r\r\tanInteger > self canvas boundingBox width\r\t\tifTrue:[scannerLocation _ self boxSize negated]\r\t\tifFalse:[scannerLocation _ anInteger]! !\r!RVMScanningStripChartView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 20:49'!\rtypeLabel\r\r\t^'RelScan: '! !\r!RVMAbsScanningStripChartView methodsFor: 'displaying' stamp: 'ssa 10/28/2008 20:29'!\rdrawOnCanvas\r\t| color |\r\t1 to: self count do: [:index | \r\t\t\tcolor := self colors at: ((self scaler scale:(self data at: index))  min:  self numberOfColors max:1).\r\t\t\tself scanner\r\t\t\t\tfill: (self boxes at: index)\r\t\t\t\tfillColor: color].\r\tself scanner displayOn: self canvas at: self nextScannerLocation @ 0.\r! !\r!RVMAbsScanningStripChartView methodsFor: 'displaying' stamp: 'ssa 10/28/2008 20:41'!\rredrawOnCanvas\r\t| color |\r\tself canvas fillWhite.\r\tself resetScannerLocation.\r\tself previousData do:[:oldData|\r\t1 to: self count do: [:index | \r\t\t\tcolor := self colors at: ((self scaler scale:(oldData at: index))  min:  self numberOfColors max:1).\r\t\t\tself scanner\r\t\t\t\tfill: (self boxes at: index)\r\t\t\t\tfillColor: color].\r\tself scanner displayOn: self canvas at: self nextScannerLocation @ 0]! !\r!RVMAbsScanningStripChartView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 20:23'!\raspect: aSymbol.\r\tself scaler: nil.\r\tsuper aspect: aSymbol! !\r!RVMAbsScanningStripChartView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 20:26'!\rscaler\r\t\"Answer the value of scaler\"\r\r\tscaler isNil ifTrue:[self scaler: (RVMMonitor scalerFor: self aspect)].\r\t^scaler! !\r!RVMAbsScanningStripChartView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 20:23'!\rscaler: anObject\r\t\"Set the value of scaler\"\r\r\tscaler _ anObject! !\r!RVMAbsScanningStripChartView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 20:49'!\rtypeLabel\r\r\t^'AbsScan: '! !\r!RVMAbsScanningStripChartView methodsFor: 'scaling' stamp: 'ssa 10/28/2008 20:47'!\rrescale\r\t\"Reset the scaler and pass the previous data thorugh it to find the min/max.\r\tThen redraw\"\r\tself scaler resetScaling.\r\tself previousData do:[:dats| dats do:[:d| scaler scale: d]].\r\tself scaler resetOutOfRangeDetector.\r\tself topView newFrame.\r\tself redrawOnCanvas! !\r!RVMTileStripChartScalerView methodsFor: 'displaying' stamp: 'ssa 10/3/2008 21:02'!\rdrawOnCanvas\r\t| color  |\r\tself canvas displayOn: self canvas at: self boxSize negated @0.\r1 to: self count do:[:index|\r\tcolor := self colors at: ((self scaler scale:(self data at: index))  min:  self numberOfColors max:1).\r\t\tself canvas fill: ((self boxes at: index) translateBy: self insetDisplayBox origin negated )fillColor: color].\r! !\r!RVMTileStripChartScalerView methodsFor: 'displaying' stamp: 'ssa 10/28/2008 20:51'!\rredrawOnCanvas\r\t| color x |\r\t[#redrawScaler print].\r\tself canvas fillWhite.\r\tx _ 0.\r\tself previousData asOrderedCollection reversed do:[:oldData|\r\t1 to: self count do: [:index | \r\t\t\tcolor := self colors at: ((self scaler scale:(oldData at: index))  min:  self numberOfColors max:1).\r\t\t\tself canvas\r\t\t\t\tfill: ((self boxes at: index)\r\t\t\t\t\t\ttranslateBy: self insetDisplayBox origin negated - (x@0))\r\t\t\t\tfillColor: color].\r\t\t\tx _ x + self boxSize]! !\r!RVMTileStripChartScalerView methodsFor: 'scaling' stamp: 'ssa 10/6/2008 16:30'!\rrescale\r\t\"Reset the scaler and pass the previous data thorugh it to find the min/max.\r\tThen redraw\"\r\t[#rescaling print].\r\tself scaler resetScaling.\r\tself previousData do:[:dats| dats do:[:d| scaler scale: d]].\r\tself scaler resetOutOfRangeDetector.\r\t\tself redrawOnCanvas! !\r!RVMTileStripChartScalerView methodsFor: 'listening' stamp: 'ssa 11/4/2008 19:50'!\rhear: someObject\r\r\tself sample: nil.\r\t\"self rescaleCounter: self rescaleCounter - 1.\r\tself rescaleCounter = 0 ifTrue:[self rescaleCounter:nil.  \r\t\tself rescale]. \r\tself scaler outOfRangeDetected \r\t\tifTrue:[[('out of range = ',self scaler lastObserved printString) print].\r\t\t\tself rescale].\"\r\tself drawOnCanvas.\r\tself topView isCollapsed ifFalse:[self displayView].\r! !\r!RVMTileStripChartScalerView methodsFor: 'accessing' stamp: 'ssa 10/3/2008 21:06'!\raspect: aSymbol.\r\tself scaler: nil.\r\tsuper aspect: aSymbol! !\r!RVMTileStripChartScalerView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 20:51'!\rrescaleCounter\r\t\"Answer the value of rescaleCounter\"\r\r\trescaleCounter isNil ifTrue:[self rescaleCounter: 1].\r\t^ rescaleCounter! !\r!RVMTileStripChartScalerView methodsFor: 'accessing' stamp: 'ssa 10/3/2008 22:09'!\rrescaleCounter: anObject\r\t\"Set the value of rescaleCounter\"\r\r\trescaleCounter _ anObject ! !\r!RVMTileStripChartScalerView methodsFor: 'accessing' stamp: 'ssa 10/3/2008 21:04'!\rscaler\r\t\"Answer the value of scaler\"\r\r\tscaler isNil ifTrue:[self scaler: (RVMMonitor scalerFor: self aspect)].\r\t^ scaler! !\r!RVMTileStripChartScalerView methodsFor: 'accessing' stamp: 'ssa 10/3/2008 21:03'!\rscaler: anObject\r\t\"Set the value of scaler\"\r\r\tscaler _ anObject! !\r!RVMTileStripChartScalerView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:16'!\rtypeLabel\r\r\t^'Abs: '! !\r!RVMTileStripChartView class methodsFor: 'examples' stamp: 'ssa 11/4/2008 20:18'!\rexample\r\t\"RVMTileStripChartView example\"\r\t\r\t| topView v scaleWidth stripWidth |\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\tscaleWidth _ 70.\r\tstripWidth _ 200.\r\ttopView minimumSize: stripWidth+scaleWidth@200.\r\ttopView maximumSize: 1000@400.\r\ttopView addSubView: (v := self new) viewport: (scaleWidth@0 extent: stripWidth@200).\r\ttopView addSubView: (RVMColorScaleView aspectSource: [v aspect] scalerSource: [v scaler] colorsSource: [v colors reverse] orientation: #vertical  forView: v adjustScaler: self adjustScaler) viewport:(0@0 extent:scaleWidth@200).\r\ttopView label: v typeLabel,v aspect.\r\ttopView controller open! !\r!RVMTileStripChartView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:16'!\rexample1\r\t\"RVMTileStripChartView example1\"\r\t\r\tself openOnAspect: #bytesUseds! !\r!RVMTileStripChartView class methodsFor: 'scheduling' stamp: 'ssa 1/1/1970 00:16'!\ropenOnAspect: aSymbol\r\t\"Open a new monitor on this aspect\"\r\t| topView v |\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\ttopView minimumSize: 200@200.\r\ttopView maximumSize: 600@400.\r\ttopView insideColor: Color white.\r\tv := self new.\r\tv aspect: aSymbol.\r\ttopView addSubView: v.\r\ttopView label: v typeLabel,aSymbol.\r\ttopView controller open! !\r!RVMAbsScanningStripChartView class methodsFor: 'accessing' stamp: 'ssa 11/4/2008 20:19'!\radjustScaler\r\r\t^true! !\r!RVMTileStripChartScalerView class methodsFor: 'accessing' stamp: 'ssa 11/4/2008 20:20'!\radjustScaler\r\r\t^true! !\r!RVMTraceUIHolderView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:37'!\rstripChart\r\t\"Answer the value of stripChart\"\r\r\t^ stripChart! !\r!RVMTraceUIHolderView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:37'!\rstripChart: anObject\r\t\"Set the value of stripChart\"\r\r\tstripChart _ anObject! !\r!RVMTraceUIHolderView methodsFor: 'controller access' stamp: 'ssa 1/1/1970 00:39'!\rdefaultControllerClass\r\r\t^RVMTraceUIHolderController! !\r!RVMTraceUIHolderView methodsFor: 'subView inserting' stamp: 'ssa 1/1/1970 00:19'!\rmyControls\r\t\"Add the button to use to modify the number of traces my stripchart uses\"\r\t| addTraceButton removeTraceButton holder |\r\taddTraceButton _ RVMButtonView  label:'+' action:[self addTrace].\r\tremoveTraceButton _ RVMButtonView  label:'-' action:[self removeTrace].\r\tholder _ RVMView new.\r\tholder addSubView: addTraceButton.\r\tholder addSubView: removeTraceButton toRightOf: addTraceButton.\r\t^holder! !\r!RVMTraceUIHolderView methodsFor: 'subView inserting' stamp: 'ssa 1/1/1970 00:15'!\rrebuildSubViews\r\r\t| allSubs lastGroup holder last |\r\tallSubs _ self stripChart traces collect:[:trace| trace allView].\r\tlastGroup _ nil.\r\tallSubs groupsOfNoMoreThan: 3 atATimeDo:[:group| \r\t\tholder _ RVMView new.\r\t\tlast _ nil.\r\t\tgroup do:[:v| holder addSubView: v  toRightOf: last.   last _ v].\r\tself addSubView:holder below: lastGroup.\r\tlastGroup _ holder].\r! !\r!RVMTraceUIHolderView class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:55'!\rforStripChart: aViewWithTraces\r\r\t| v |\r\tv _ self new.\r\tv stripChart: aViewWithTraces.\r\tv rebuildSubViews.\r\t^v! !\r!RVMValueView methodsFor: 'accessing' stamp: 'ssa 9/19/2008 11:00'!\rchangeValueBy: delta\r\r\tself value: self value + delta.\r\tself displayView.! !\r!RVMValueView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 20:57'!\rlabel\r\t\"Answer the value of label\"\r\r\tlabel isNil ifTrue:[self label: ''].\r\t^ label! !\r!RVMValueView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 20:57'!\rlabel: anObject\r\t\"Set the value of label\"\r\r\tlabel _ anObject! !\r!RVMValueView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:37'!\rvalue\r\t\"Answer the value of value\"\r\r\t| temp |\r\ttemp _ self valueGetter isSymbol\r\t\t\t\t\t\tifTrue:[self model perform: self valueGetter]\r\t\t\t\t\t\tifFalse:[self valueGetter value].\r\t^temp isFraction ifTrue:[temp asFloat] ifFalse:[temp]! !\r!RVMValueView methodsFor: 'accessing' stamp: 'ssa 9/17/2008 14:28'!\rvalue: anObject\r\t\"Set the value of value\"\r\r\tself valueSetter isSymbol\r\t\tifTrue:[model perform: self valueSetter with: anObject]\r\t\tifFalse:[self valueSetter value: anObject]! !\r!RVMValueView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 21:37'!\rvalueGetter\r\t\"Answer the value of valueGetter\"\r\r\tvalueGetter isNil ifTrue:[self valueGetter: [100 atRandom]].\r\t^ valueGetter! !\r!RVMValueView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 21:36'!\rvalueGetter: anObject\r\t\"Set the value of valueGetter\"\r\r\tvalueGetter _ anObject! !\r!RVMValueView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 21:38'!\rvalueSetter\r\t\"Answer the value of valueSetter\"\r\r\tvalueSetter isNil ifTrue:[self valueSetter: [:v| v print]].\r\t^ valueSetter! !\r!RVMValueView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 21:36'!\rvalueSetter: anObject\r\t\"Set the value of valueSetter\"\r\r\tvalueSetter _ anObject! !\r!RVMValueView methodsFor: 'displaying' stamp: 'ssa 10/21/2008 11:32'!\rdisplayView\r\r\t| label1 labelForm |\r\tself okToDisplay ifFalse:[^self].\r\tself uncache.\r\tlabel1 _ ' ',self label,' ',self value printString.\r\tlabelForm _ label1 asDisplayText.\r\tDisplay fill: self insetDisplayBox fillColor: Color white.\r\tlabelForm displayOn: Display at: self insetDisplayBox leftCenter - labelForm boundingBox leftCenter clippingBox: self insetDisplayBox.\r\t\"(self controller isKindOf: NoController) ifFalse:[\r\tDisplay border: (self insetDisplayBox insetBy: 1)width: 1 fillColor: self backgroundColor negated.]\"\r! !\r!RVMValueView methodsFor: 'controller access' stamp: 'ssa 9/13/2008 20:35'!\rdefaultControllerClass\r\r\t^RVMValueController! !\r!RVMValueView methodsFor: 'listening' stamp: 'ssa 11/4/2008 19:37'!\rhear: something\r\r\r\tself displayView! !\r!RVMValueEditorView methodsFor: 'displaying' stamp: 'ssa 10/29/2008 20:27'!\rclosedPadlock\r^((ColorForm\r\textent: 14@16\r\tdepth: 8\r\tfromArray: #( 0 2511181205 2912223232 0 197 2097152000 7456089 0 51549 9817545 2908582317 0 7456000 2915368960 2915893445 1895825408 9276765 3445161984 13473173 2365587456 9276813 3439329280 13473173 2365587456 7712141 3036678400 12167597 1962934272 1701414249 2171169129 1770357121 2237988864 2634354961 286331153 286331153 228392960 2702252313 421075225 286857497 834732032 3625525537 555819297 555819321 1103167488 4011402533 623191333 623984969 905641984 4012455225 892942657 1094797621 1374617600 3693688117 892679497 893995345 1241186304 4012193065 1094795573 1363752273 1375404032 3504924904 3253266652 3705461980 3704619008)\r\toffset: 0@0)\r\tcolorsFromArray: #(#(1.0 1.0 1.0) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.376) #(0.972 0.972 0.376) #(0.972 0.972 0.376) #(0.972 0.972 0.376) #(0.972 0.94 0.909) #(0.972 0.94 0.909) #(0.972 0.94 0.909) #(0.972 0.94 0.909) #(0.972 0.94 0.25) #(0.972 0.94 0.25) #(0.972 0.94 0.25) #(0.972 0.94 0.25) #(0.972 0.94 0.219) #(0.972 0.94 0.219) #(0.972 0.94 0.219) #(0.972 0.94 0.219) #(0.972 0.94 0.188) #(0.972 0.94 0.188) #(0.972 0.94 0.188) #(0.972 0.94 0.188) #(0.972 0.878 0.156) #(0.972 0.878 0.156) #(0.972 0.878 0.156) #(0.972 0.878 0.156) #(0.972 0.878 0.125) #(0.972 0.878 0.125) #(0.972 0.878 0.125) #(0.972 0.878 0.125) #(0.972 0.815 0.094) #(0.972 0.815 0.094) #(0.972 0.815 0.094) #(0.972 0.815 0.094) #(0.972 0.784 0.094) #(0.972 0.784 0.094) #(0.972 0.784 0.094) #(0.972 0.784 0.094) #(0.972 0.721 0.094) #(0.972 0.721 0.094) #(0.972 0.721 0.094) #(0.972 0.721 0.094) #(0.972 0.721 0.063) #(0.972 0.721 0.063) #(0.972 0.721 0.063) #(0.972 0.721 0.063) #(0.972 0.69 0.031) #(0.972 0.69 0.031) #(0.972 0.69 0.031) #(0.972 0.69 0.031) #(0.972 0.658 0.063) #(0.972 0.658 0.063) #(0.972 0.658 0.063) #(0.972 0.658 0.063) #(0.972 0.658 0.031) #(0.972 0.658 0.031) #(0.972 0.658 0.031) #(0.972 0.658 0.031) #(0.972 0.627 0.031) #(0.972 0.627 0.031) #(0.972 0.627 0.031) #(0.972 0.627 0.031) #(0.972 0.595 0.031) #(0.972 0.595 0.031) #(0.972 0.595 0.031) #(0.972 0.595 0.031) #(0.972 0.564 0.031) #(0.972 0.564 0.031) #(0.972 0.564 0.031) #(0.972 0.564 0.031) #(0.972 0.533 0.0) #(0.972 0.533 0.0) #(0.972 0.533 0.0) #(0.972 0.533 0.0) #(0.972 0.501 0.0) #(0.972 0.501 0.0) #(0.972 0.501 0.0) #(0.972 0.501 0.0) #(0.972 0.47 0.0) #(0.972 0.47 0.0) #(0.972 0.47 0.0) #(0.972 0.47 0.0) #(0.94 0.94 0.972) #(0.94 0.94 0.972) #(0.94 0.94 0.972) #(0.94 0.94 0.972) #(0.909 0.909 0.94) #(0.909 0.909 0.94) #(0.909 0.909 0.94) #(0.909 0.909 0.94) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.69 0.501) #(0.878 0.69 0.501) #(0.878 0.69 0.501) #(0.878 0.69 0.501) #(0.878 0.658 0.345) #(0.878 0.658 0.345) #(0.878 0.658 0.345) #(0.878 0.658 0.345) #(0.878 0.658 0.313) #(0.878 0.658 0.313) #(0.878 0.658 0.313) #(0.878 0.658 0.313) #(0.847 0.847 0.878) #(0.847 0.847 0.878) #(0.847 0.847 0.878) #(0.847 0.847 0.878) #(0.847 0.784 0.721) #(0.847 0.784 0.721) #(0.847 0.784 0.721) #(0.847 0.784 0.721) #(0.847 0.784 0.69) #(0.847 0.784 0.69) #(0.847 0.784 0.69) #(0.847 0.784 0.69) #(0.815 0.815 0.847) #(0.815 0.815 0.847) #(0.815 0.815 0.847) #(0.815 0.815 0.847) #(0.815 0.627 0.282) #(0.815 0.627 0.282) #(0.815 0.627 0.282) #(0.815 0.627 0.282) #(0.784 0.595 0.282) #(0.784 0.595 0.282) #(0.784 0.595 0.282) #(0.784 0.595 0.282) #(0.784 0.595 0.25) #(0.784 0.595 0.25) #(0.784 0.595 0.25) #(0.784 0.595 0.25) #(0.753 0.753 0.784) #(0.753 0.753 0.784) #(0.753 0.753 0.784) #(0.753 0.753 0.784) #(0.753 0.721 0.721) #(0.753 0.721 0.721) #(0.753 0.721 0.721) #(0.753 0.721 0.721) #(0.721 0.721 0.784) #(0.721 0.721 0.784) #(0.721 0.721 0.784) #(0.721 0.721 0.784) #(0.721 0.721 0.753) #(0.721 0.721 0.753) #(0.721 0.721 0.753) #(0.721 0.721 0.753) #(0.721 0.501 0.156) #(0.721 0.501 0.156) #(0.721 0.501 0.156) #(0.721 0.501 0.156) #(0.721 0.47 0.125) #(0.721 0.47 0.125) #(0.721 0.47 0.125) #(0.721 0.47 0.125) #(0.69 0.69 0.753) #(0.69 0.69 0.753) #(0.69 0.69 0.753) #(0.69 0.69 0.753) #(0.69 0.658 0.658) #(0.69 0.658 0.658) #(0.69 0.658 0.658) #(0.69 0.658 0.658) #(0.658 0.658 0.721) #(0.658 0.658 0.721) #(0.658 0.658 0.721) #(0.658 0.658 0.721) #(0.658 0.658 0.69) #(0.658 0.658 0.69) #(0.658 0.658 0.69) #(0.658 0.658 0.69) #(0.627 0.533 0.501) #(0.627 0.533 0.501) #(0.627 0.533 0.501) #(0.627 0.533 0.501) #(0.627 0.533 0.47) #(0.627 0.533 0.47) #(0.627 0.533 0.47) #(0.627 0.533 0.47) #(0.627 0.408 0.125) #(0.627 0.408 0.125) #(0.627 0.408 0.125) #(0.627 0.408 0.125) #(0.627 0.345 0.063) #(0.627 0.345 0.063) #(0.627 0.345 0.063) #(0.627 0.345 0.063) #(0.595 0.595 0.69) #(0.595 0.595 0.69) #(0.595 0.595 0.69) #(0.595 0.595 0.69) #(0.564 0.564 0.658) #(0.564 0.564 0.658) #(0.564 0.564 0.658) #(0.564 0.564 0.658) #(0.533 0.533 0.595) #(0.533 0.533 0.595) #(0.533 0.533 0.595) #(0.533 0.408 0.313) #(0.533 0.408 0.313) #(0.533 0.408 0.313) #(0.533 0.408 0.313) #(0.533 0.376 0.313) #(0.533 0.376 0.313) #(0.533 0.376 0.313) #(0.533 0.376 0.313) #(0.533 0.313 0.094) #(0.533 0.313 0.094) #(0.533 0.313 0.094) #(0.533 0.313 0.094) #(0.533 0.282 0.094) #(0.533 0.282 0.094) #(0.533 0.282 0.094) #(0.533 0.282 0.094) #(0.501 0.533 0.595) #(0.501 0.533 0.595) #(0.501 0.533 0.595) #(0.501 0.533 0.595) #(0.501 0.501 0.595) #(0.501 0.501 0.595) #(0.501 0.501 0.595) #(0.501 0.501 0.595) #(0.501 0.313 0.125) #(0.501 0.313 0.125) #(0.501 0.313 0.125) #(0.501 0.313 0.125) #(0.501 0.25 0.063) #(0.501 0.25 0.063) #(0.501 0.25 0.063) #(0.47 0.282 0.094) #(0.47 0.282 0.094) #(0.47 0.282 0.094) #(0.47 0.282 0.094) #(0.47 0.25 0.094) #(0.47 0.25 0.094) #(0.47 0.25 0.094) #(0.47 0.25 0.094) #(0.47 0.25 0.063) #(0.47 0.25 0.063) #(0.47 0.25 0.063) #(0.47 0.25 0.063) #(0.47 0.219 0.063) #(0.47 0.219 0.063) #(0.47 0.219 0.063) #(0.47 0.219 0.063) #(0.0 0.0 0.0)  ))! !\r!RVMValueEditorView methodsFor: 'displaying' stamp: 'ssa 11/4/2008 20:03'!\rdisplayView\r\r\tself box.\r\tself okToDisplay ifFalse:[^self].\r\tself uncache.\r\t((self lastValue = self value and:[self lastOp  = self operation])and:[self lastLocked = self locked])ifFalse:[\r\t\tself drawOnCanvas].\r\tself canvas displayAt: self insetDisplayBox origin\r! !\r!RVMValueEditorView methodsFor: 'displaying' stamp: 'ssa 11/4/2008 20:03'!\rdrawOnCanvas\r\r\t| lock lt vt ot nt val |\r\tself box.\r\tself canvas fillWhite.\r\tlock _ self lockForm.\r\tself lastLocked: self locked.\r\tlock displayOn: self canvas at: self lockBox center - lock boundingBox center clippingBox: self lockBox.\r\tself lockBox displayOn: self canvas withBorderWidths:#(0 0 0 1).\r\t(lt _ (' ',label) asDisplayText) displayOn: self canvas at: self prefixBox leftCenter - (0@lt boundingBox leftCenter y) clippingBox: self prefixBox.\r\tself prefixBox displayOn: self canvas withBorderWidths:#(1 0 0 1).\r\tval _ self value.\r\t(vt _ val printShowingMax3Digits asDisplayText) displayOn: self canvas at: self valueBox leftCenter - vt boundingBox leftCenter clippingBox: self valueBox.\r\tself lastValue: val.\r\tself valueBox displayOn: self canvas withBorderWidths:#(0 0 0 1).\r\tself operationBoxes with: self operations do:[:bx :op|\r\t\t\t(ot _  op asString asDisplayText) displayOn: self canvas at: bx center - ot boundingBox center-(0@((#(/ + -) includes: op) ifTrue:[2]ifFalse:[1])) clippingBox: bx.\r\t\t\t\tbx displayOn: self canvas withBorderWidths:#(1 0 0 1).\r\t\t\t\top = self operation ifTrue:[self lastOp: op.\r\t\t\t\t\tself canvas reverse: (bx insetBy:1)].\r].\r\tself numberBoxes with: #(1 10 100 0) do:[:bx :num|\r\t\t\t(nt _  num printString asDisplayText) displayOn: self canvas at: bx center - nt boundingBox center clippingBox: bx.\r\t\t\tbx displayOn: self canvas withBorderWidths:#(1 0 0 1)].\r\t\r\r\t! !\r!RVMValueEditorView methodsFor: 'displaying' stamp: 'ssa 10/29/2008 21:25'!\rlockForm\r\r\t^self locked\r\t\tifTrue:[self closedPadlock]\r\t\tifFalse:[self openPadlock]! !\r!RVMValueEditorView methodsFor: 'displaying' stamp: 'ssa 10/29/2008 20:27'!\ropenPadlock\r^((ColorForm\r\textent: 20@16\r\tdepth: 8\r\tfromArray: #( 146 2861732522 2449473536 0 0 5614218 0 1841452288 0 0 12741888 3334915730 5882368 0 0 1839879626 2852126914 2852170349 0 0 2324859594 0 3396178570 0 0 2324859594 0 3396176522 0 0 1908838070 0 2995956337 0 0 0 24962 2122220133 1701143938 2122220129 0 39429 151850253 218959117 218958234 0 40461 353178901 353178901 353709502 0 54805 488447261 488447261 490028478 0 60957 556605729 556605733 1027944954 0 60961 824522037 825310525 1160859118 0 60965 825569585 1027423557 1162692090 0 60961 824524093 893732165 1162694126 0 52966 3873888954 3873888998 3873102542)\r\toffset: 0@0)\r\tcolorsFromArray: #(#(1.0 1.0 1.0) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.376) #(0.972 0.972 0.376) #(0.972 0.972 0.376) #(0.972 0.972 0.376) #(0.972 0.94 0.25) #(0.972 0.94 0.25) #(0.972 0.94 0.25) #(0.972 0.94 0.25) #(0.972 0.94 0.219) #(0.972 0.94 0.219) #(0.972 0.94 0.219) #(0.972 0.94 0.219) #(0.972 0.94 0.188) #(0.972 0.94 0.188) #(0.972 0.94 0.188) #(0.972 0.94 0.188) #(0.972 0.878 0.156) #(0.972 0.878 0.156) #(0.972 0.878 0.156) #(0.972 0.878 0.156) #(0.972 0.878 0.125) #(0.972 0.878 0.125) #(0.972 0.878 0.125) #(0.972 0.878 0.125) #(0.972 0.815 0.094) #(0.972 0.815 0.094) #(0.972 0.815 0.094) #(0.972 0.815 0.094) #(0.972 0.784 0.094) #(0.972 0.784 0.094) #(0.972 0.784 0.094) #(0.972 0.784 0.094) #(0.972 0.721 0.094) #(0.972 0.721 0.094) #(0.972 0.721 0.094) #(0.972 0.721 0.094) #(0.972 0.721 0.063) #(0.972 0.721 0.063) #(0.972 0.721 0.063) #(0.972 0.721 0.063) #(0.972 0.69 0.031) #(0.972 0.69 0.031) #(0.972 0.69 0.031) #(0.972 0.69 0.031) #(0.972 0.658 0.063) #(0.972 0.658 0.063) #(0.972 0.658 0.063) #(0.972 0.658 0.063) #(0.972 0.658 0.031) #(0.972 0.658 0.031) #(0.972 0.658 0.031) #(0.972 0.658 0.031) #(0.972 0.627 0.031) #(0.972 0.627 0.031) #(0.972 0.627 0.031) #(0.972 0.627 0.031) #(0.972 0.595 0.031) #(0.972 0.595 0.031) #(0.972 0.595 0.031) #(0.972 0.595 0.031) #(0.972 0.564 0.031) #(0.972 0.564 0.031) #(0.972 0.564 0.031) #(0.972 0.564 0.031) #(0.972 0.533 0.0) #(0.972 0.533 0.0) #(0.972 0.533 0.0) #(0.972 0.533 0.0) #(0.972 0.501 0.0) #(0.972 0.501 0.0) #(0.972 0.501 0.0) #(0.972 0.501 0.0) #(0.972 0.47 0.0) #(0.972 0.47 0.0) #(0.972 0.47 0.0) #(0.972 0.47 0.0) #(0.94 0.94 0.972) #(0.94 0.94 0.972) #(0.94 0.94 0.972) #(0.94 0.94 0.972) #(0.909 0.909 0.94) #(0.909 0.909 0.94) #(0.909 0.909 0.94) #(0.909 0.909 0.94) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.69 0.501) #(0.878 0.69 0.501) #(0.878 0.69 0.501) #(0.878 0.69 0.501) #(0.878 0.658 0.345) #(0.878 0.658 0.345) #(0.878 0.658 0.345) #(0.878 0.658 0.345) #(0.878 0.658 0.313) #(0.878 0.658 0.313) #(0.878 0.658 0.313) #(0.878 0.658 0.313) #(0.847 0.847 0.878) #(0.847 0.847 0.878) #(0.847 0.847 0.878) #(0.847 0.847 0.878) #(0.847 0.784 0.721) #(0.847 0.784 0.721) #(0.847 0.784 0.721) #(0.847 0.784 0.721) #(0.847 0.784 0.69) #(0.847 0.784 0.69) #(0.847 0.784 0.69) #(0.847 0.784 0.69) #(0.815 0.815 0.847) #(0.815 0.815 0.847) #(0.815 0.815 0.847) #(0.815 0.815 0.847) #(0.815 0.815 0.847) #(0.815 0.627 0.282) #(0.815 0.627 0.282) #(0.815 0.627 0.282) #(0.815 0.627 0.282) #(0.784 0.595 0.282) #(0.784 0.595 0.282) #(0.784 0.595 0.282) #(0.784 0.595 0.282) #(0.784 0.595 0.25) #(0.784 0.595 0.25) #(0.784 0.595 0.25) #(0.784 0.595 0.25) #(0.753 0.753 0.784) #(0.753 0.753 0.784) #(0.753 0.753 0.784) #(0.753 0.753 0.784) #(0.753 0.721 0.721) #(0.753 0.721 0.721) #(0.753 0.721 0.721) #(0.753 0.721 0.721) #(0.721 0.721 0.784) #(0.721 0.721 0.784) #(0.721 0.721 0.784) #(0.721 0.721 0.784) #(0.721 0.721 0.753) #(0.721 0.721 0.753) #(0.721 0.721 0.753) #(0.721 0.721 0.753) #(0.721 0.501 0.156) #(0.721 0.501 0.156) #(0.721 0.501 0.156) #(0.721 0.501 0.156) #(0.721 0.47 0.125) #(0.721 0.47 0.125) #(0.721 0.47 0.125) #(0.721 0.47 0.125) #(0.69 0.69 0.753) #(0.69 0.69 0.753) #(0.69 0.69 0.753) #(0.69 0.69 0.753) #(0.69 0.658 0.658) #(0.69 0.658 0.658) #(0.69 0.658 0.658) #(0.69 0.658 0.658) #(0.658 0.658 0.721) #(0.658 0.658 0.721) #(0.658 0.658 0.721) #(0.658 0.658 0.721) #(0.658 0.658 0.69) #(0.658 0.658 0.69) #(0.658 0.658 0.69) #(0.658 0.658 0.69) #(0.627 0.533 0.501) #(0.627 0.533 0.501) #(0.627 0.533 0.501) #(0.627 0.533 0.501) #(0.627 0.533 0.47) #(0.627 0.533 0.47) #(0.627 0.533 0.47) #(0.627 0.533 0.47) #(0.627 0.408 0.125) #(0.627 0.408 0.125) #(0.627 0.408 0.125) #(0.627 0.408 0.125) #(0.627 0.345 0.063) #(0.627 0.345 0.063) #(0.627 0.345 0.063) #(0.627 0.345 0.063) #(0.595 0.595 0.69) #(0.595 0.595 0.69) #(0.595 0.595 0.69) #(0.595 0.595 0.69) #(0.564 0.564 0.658) #(0.564 0.564 0.658) #(0.564 0.564 0.658) #(0.564 0.564 0.658) #(0.533 0.533 0.595) #(0.533 0.533 0.595) #(0.533 0.533 0.595) #(0.533 0.533 0.595) #(0.533 0.408 0.313) #(0.533 0.408 0.313) #(0.533 0.408 0.313) #(0.533 0.408 0.313) #(0.533 0.376 0.313) #(0.533 0.376 0.313) #(0.533 0.376 0.313) #(0.533 0.376 0.313) #(0.533 0.313 0.094) #(0.533 0.313 0.094) #(0.533 0.313 0.094) #(0.533 0.313 0.094) #(0.533 0.282 0.094) #(0.533 0.282 0.094) #(0.533 0.282 0.094) #(0.533 0.282 0.094) #(0.501 0.533 0.595) #(0.501 0.533 0.595) #(0.501 0.533 0.595) #(0.501 0.533 0.595) #(0.501 0.501 0.595) #(0.501 0.501 0.595) #(0.501 0.501 0.595) #(0.501 0.501 0.595) #(0.501 0.313 0.125) #(0.501 0.313 0.125) #(0.501 0.313 0.125) #(0.501 0.313 0.125) #(0.501 0.25 0.063) #(0.501 0.25 0.063) #(0.501 0.25 0.063) #(0.501 0.25 0.063) #(0.47 0.282 0.094) #(0.47 0.282 0.094) #(0.47 0.282 0.094) #(0.47 0.282 0.094) #(0.47 0.25 0.094) #(0.47 0.25 0.094) #(0.47 0.25 0.094) #(0.47 0.25 0.094) #(0.47 0.25 0.063) #(0.47 0.25 0.063) #(0.47 0.25 0.063) #(0.47 0.25 0.063) #(0.47 0.219 0.063) #(0.47 0.219 0.063) #(0.47 0.219 0.063) #(0.47 0.219 0.063) #(0.47 0.219 0.063) #(0.0 0.0 0.0)  ))! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 11/4/2008 19:20'!\rbox\r\r\tbox isNil ifTrue:[self box: self canvas boundingBox].\r\tbox extent = self insetDisplayBox extent ifFalse:[self box: self canvas boundingBox].\r\t^box! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/29/2008 10:43'!\rbox: anObject\r\t\"Set the value of box\"\r\r\tbox _ anObject.\r\tlockBox _ prefixBox _ valueBox _ operationBox _ oneBox _ tenBox _ hundredBox _ zeroBox _ nil.! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 11/4/2008 20:08'!\rcanvas\r\t\"Answer the value of canvas\"\r\r\tcanvas isNil ifTrue:[self canvas: (ColorForm extent:198@26 depth: Display depth) fillWhite].\r\t^ canvas! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 11/4/2008 19:12'!\rcanvas: anObject\r\t\"Set the value of canvas\"\r\r\tcanvas _ anObject! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:51'!\rhundredBox\r\t\"Answer the value of hundredBox\"\r\r\thundredBox isNil ifTrue:[self hundredBox: (self zeroBox topLeft - (self hundredLabel boundingBox width@0) extent: ( self hundredLabel boundingBox width @ self box height))].\r\t^ hundredBox! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:27'!\rhundredBox: anObject\r\t\"Set the value of hundredBox\"\r\r\thundredBox _ anObject! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:50'!\rhundredLabel\r\r\t^' 100 ' asDisplayText! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 11/4/2008 20:02'!\rlastLocked\r\t\"Answer the value of lastLocked\"\r\r\tlastLocked isNil ifTrue:[self lastLocked: nil].\r\t^ lastLocked! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 11/4/2008 20:02'!\rlastLocked: anObject\r\t\"Set the value of lastLocked\"\r\r\tlastLocked _ anObject! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 11/4/2008 19:57'!\rlastOp\r\t\"Answer the value of lastOp\"\r\r\tlastOp isNil ifTrue:[self lastOp: #none].\r\t^ lastOp! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 11/4/2008 19:56'!\rlastOp: anObject\r\t\"Set the value of lastOp\"\r\r\tlastOp _ anObject! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 11/4/2008 19:52'!\rlastValue\r\t\"Answer the value of lastValue\"\r\r\tlastValue isNil ifTrue:[self lastValue: 0.0000000000000001].\r\t^ lastValue! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 11/4/2008 19:51'!\rlastValue: anObject\r\t\"Set the value of lastValue\"\r\r\tlastValue _ anObject! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 11/4/2008 19:43'!\rlockBox\r\t\"Answer the value of lockBox\"\r\r\tlockBox isNil ifTrue:[self lockBox: (self box origin extent: (24@self box height))].\r\t^ lockBox! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:27'!\rlockBox: anObject\r\t\"Set the value of lockBox\"\r\r\tlockBox _ anObject! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/29/2008 20:29'!\rlockGetter\r\t\"Answer the value of lockGetter\"\r\r\tlockGetter isNil ifTrue:[self lockGetter: nil].\r\t^ lockGetter! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/29/2008 20:29'!\rlockGetter: anObject\r\t\"Set the value of lockGetter\"\r\r\tlockGetter _ anObject! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/29/2008 20:29'!\rlockSetter\r\t\"Answer the value of lockSetter\"\r\r\tlockSetter isNil ifTrue:[self lockSetter: nil].\r\t^ lockSetter! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/29/2008 20:29'!\rlockSetter: anObject\r\t\"Set the value of lockSetter\"\r\r\tlockSetter _ anObject! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/29/2008 21:37'!\rlocked\r\t| temp |\r\ttemp _ self lockGetter isSymbol\r\t\t\t\t\t\tifTrue:[self model perform: self lockGetter]\r\t\t\t\t\t\tifFalse:[self lockGetter value].\r\t^temp! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/29/2008 20:31'!\rlocked: aBoolean\r\t\"Set the value of locked\"\r\r\tself lockSetter isSymbol\r\t\tifTrue:[model perform: self lockSetter with: aBoolean]\r\t\tifFalse:[self lockSetter value: aBoolean]! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/29/2008 07:49'!\rnumberBoxes\r\t\"Answer the number boxes\"\r\t^{self oneBox. self tenBox. self hundredBox. self zeroBox}! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:52'!\rnumbersBox\r\t\"Answer the rectangle encompassing all number boxes\"\r\t^((self zeroBox merge: self hundredBox)merge: self tenBox)merge:self oneBox! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:51'!\roneBox\r\t\"Answer the value of oneBox\"\r\r\toneBox isNil ifTrue:[self oneBox: (self tenBox topLeft - (self oneLabel boundingBox width@0) extent: ( self oneLabel boundingBox width @ self box height))].\r\t^ oneBox! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:27'!\roneBox: anObject\r\t\"Set the value of oneBox\"\r\r\toneBox _ anObject! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:49'!\roneLabel\r\r\t^' 1 ' asDisplayText! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:42'!\ropBox\r\t\"Answer the value of opBox, the rectangle sized for a single operation button\"\r\r\t^0@0 extent: (self box height //2) asPoint! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:39'!\roperation\r\t\"Answer the value of operation, #+, #-, #*, or #/\"\r\r\toperation isNil ifTrue:[self operation: #+].\r\t^ operation! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:27'!\roperation: anObject\r\t\"Set the value of operation\"\r\r\toperation _ anObject! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:41'!\roperationBox\r\t\"Answer the value of operationBox\"\r\r\toperationBox isNil ifTrue:[self operationBox: ((self numbersBox topLeft - (self opBox width * 2 @0)extent:self opBox extent * 2))].\r\t^ operationBox! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:27'!\roperationBox: anObject\r\t\"Set the value of operationBox\"\r\r\toperationBox _ anObject! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:45'!\roperationBoxes\r\t\"Answer the boxes for + * - / boxes in \r\t+  |  *\r\t-----\r\t-  |  /\r\torder\"\r\r\t^self operationBox subDivideBy: 2@2! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:47'!\roperations\r\r\t^#(+ * - /)! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:37'!\rpostLabelBox\r\t\"Answer the rectangle encompassing all boxes to the left of the label\"\r\t^self operationBox merge: self numbersBox! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:35'!\rpreLabelBox\r\t\"Answer the rectangle encompassing all boxes to the right of the label\"\r\t^self lockBox merge: self prefixBox! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:53'!\rprefixBox\r\t\"Answer the value of prefixBox\"\r\r\tprefixBox isNil ifTrue:[self prefixBox: (self lockBox topRight extent: (self label asDisplayText boundingBox width @ self box height))].\r\t^ prefixBox! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:32'!\rprefixBox: anObject\r\t\"Set the value of prefixBox\"\r\r\tprefixBox _ anObject! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:51'!\rtenBox\r\t\"Answer the value of tenBox\"\r\r\ttenBox isNil ifTrue:[self tenBox: (self hundredBox topLeft - (self tenLabel boundingBox width@0) extent: ( self tenLabel boundingBox width @ self box height))].\r\t^ tenBox! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:27'!\rtenBox: anObject\r\t\"Set the value of tenBox\"\r\r\ttenBox _ anObject! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:50'!\rtenLabel\r\r\t^' 10 ' asDisplayText! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:34'!\rvalueBox\r\t\"Answer the value of valueBox\"\r\r\tvalueBox isNil ifTrue:[self valueBox: (self preLabelBox topRight corner: self postLabelBox bottomLeft)].\r\t^ valueBox! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:27'!\rvalueBox: anObject\r\t\"Set the value of valueBox\"\r\r\tvalueBox _ anObject! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:49'!\rzeroBox\r\t\"Answer the value of zeroBox\"\r\r\tzeroBox isNil ifTrue:[self zeroBox: (self box topRight - (self zeroLabel boundingBox width@0) extent: ( self zeroLabel boundingBox width @ self box height))].\r\t^ zeroBox! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:27'!\rzeroBox: anObject\r\t\"Set the value of zeroBox\"\r\r\tzeroBox _ anObject! !\r!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:49'!\rzeroLabel\r\r\t^' 0 ' asDisplayText! !\r!RVMValueEditorView methodsFor: 'controller access' stamp: 'ssa 10/29/2008 21:35'!\rdefaultControllerClass\r\r\t^RVMValueEditorController! !\r!RVMValueEditorView methodsFor: 'editing' stamp: 'ssa 10/29/2008 21:45'!\rperformOperationWith: aNumber\r\tself value: (self value perform: self operation with: aNumber).\r\tself displayView! !\r!RVMValueEditorView methodsFor: 'editing' stamp: 'ssa 10/29/2008 21:46'!\rresetValueToZero\r\tself value: 0.\r\tself displayView! !\r!RVMValueView class methodsFor: 'instance creation' stamp: 'ssa 9/17/2008 13:52'!\ron: aModel valueGetter: getterSymbolOrBlock valueSetter: setterSymbolOrBlock label: aString\r\r\t| view |\r\tview _ self new.\r\tview model: aModel.\r\tview valueGetter: getterSymbolOrBlock.\r\tview valueSetter: setterSymbolOrBlock.\r\tview label: aString.\r\t^view! !\r!RVMValueView class methodsFor: 'instance creation' stamp: 'ssa 9/17/2008 14:29'!\ron: aModel valueGetterOnly: getterSymbolOrBlock \r\r\t| view |\r\tview _ self new.\r\tview model: aModel.\r\tview controller: NoController new.\r\tview valueGetter: getterSymbolOrBlock.\r\tview valueSetter: [:v| ].\r\tview label: ''.\r\t^view! !\r!RVMValueView class methodsFor: 'examples' stamp: 'ssa 9/13/2008 20:31'!\rexample\r\t\"RVMValueView example\"\r\t| topView  |\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\ttopView minimumSize: 100@25.\r\ttopView maximumSize: 200@50.\r\ttopView addSubView: self exampleInstance.\r\ttopView label: 'Value Editor'.\r\ttopView controller open! !\r!RVMValueView class methodsFor: 'examples' stamp: 'ssa 10/29/2008 07:51'!\rexampleInstance\r\r\t| view |\r\tview _ self  on: nil valueGetter: [100 atRandom] valueSetter:[:v|v print] label:'min: '.\r\t^view! !\r!RVMValueEditorView class methodsFor: 'examples' stamp: 'ssa 10/29/2008 21:06'!\rexample\r\t\"RVMValueEditorView example\"\r\t| topView  |\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\ttopView minimumSize:200@26.\r\ttopView maximumSize: 200@26.\r\ttopView addSubView: self exampleInstanceMin.\r\ttopView label: 'Value Editor'.\r\ttopView controller open! !\r!RVMValueEditorView class methodsFor: 'examples' stamp: 'ssa 10/29/2008 20:38'!\rexampleInstanceMax\r\r\t| view scaler |\r\tscaler _ RVMMonitor scalerFor: #bytesUseds.\r\tview _ self  on: scaler valueGetter: [scaler max] valueSetter:[:v|scaler max:v] label:'max: '.\r\tview lockGetter:#maxLocked; lockSetter:#maxLocked:.\r\t^view! !\r!RVMValueEditorView class methodsFor: 'examples' stamp: 'ssa 10/29/2008 21:06'!\rexampleInstanceMin\r\r\t| view scaler |\r\tscaler _ RVMMonitor scalerFor: #bytesUseds.\r\tview _ self  on: scaler valueGetter: [scaler min] valueSetter:[:v|scaler min:v] label:'min: '.\r\tview lockGetter:#minLocked; lockSetter:#minLocked:.\r\t^view! !\r!RVMValueEditorView class methodsFor: 'examples' stamp: 'ssa 10/29/2008 21:33'!\rexampleMinMax\r\t\"RVMValueEditorView exampleMinMax\"\r\t| topView  v x |\r\ttopView := RVMStandardSystemView new.\r\ttopView borderWidth:1.\r\ttopView minimumSize:200@54.\r\ttopView maximumSize: 200@54.\r\ttopView addSubView: (v_self exampleInstanceMin).\r\ttopView addSubView: (x _ self exampleInstanceMax) below: v.\r\ttopView label: 'Value Editor'.\r\ttopView controller open! !\r!SequenceableCollection methodsFor: 'converting' stamp: 'ssa 10/18/2008 23:18'!\rasCircularCollection\r\t\"Answer a circular version of myself\"\r\t^RVMCircularCollection withAll: self! !\r!ArrayedCollection methodsFor: '*Sly' stamp: 'dmu 9/17/2010 11:04'!\rparallelCollect: aBlock\r\t\"#(1 2 3 4 5) parallelCollect:[:e| e * 2]\"\r\t| results task  barrier interlock result |\r\t\"true ifTrue: [^ self collect: aBlock.].\" \"for debugging\"\r\tself ifEmpty: [^ self].\r\t(Sly3 serializeForDebugging or: [self size = 1]) ifTrue: [^ self collect: aBlock].\r\tresults _ self species new: self size.\r\r\tbarrier _ RVMBarrier new signalsNeededToPass: self size.\r\tinterlock _ Semaphore forMutualExclusion.\r\t1 to: self size do: [:i|\r\t\ttask _ [\r\t\t\tresult _ [aBlock copy fixTemps value:  (self at: i)] ifCurtailed: [barrier signal].\r\t\t\tinterlock critical: [results at: i put: result].\r\t\t\tbarrier signal\r\t\t]  asSlyMemberProcess.\r\t\ttask resume\r\t].\r\tbarrier wait.\r\t^results! !\r!ImageReadWriter commentStamp: '<historical>'!\rCopyright (c) Kazuki Yasumatsu, 1995. All rights reserved.\r\rI am an abstract class to provide for encoding and/or decoding an image on a stream.\r\rInstance Variables:\rstream\t\t<ReadStream | WriteStream>\tstream for image storages\r\rClass Variables:\rImageNotStoredSignal\t\t<Signal>\timage not stored error signal\rMagicNumberErrorSignal\t\t<Signal>\tmagic number error signal\r\rSubclasses must implement the following messages:\raccessing\r\tnextImage\r\tnextPutImage:\rtesting\r\tcanUnderstand         (added tao 10/26/97)!\rImageReadWriter subclass: #BMPReadWriter\rinstanceVariableNames: 'bfType bfSize bfOffBits biSize biWidth biHeight biPlanes biBitCount biCompression biSizeImage biXPelsPerMeter biYPelsPerMeter biClrUsed biClrImportant'\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Graphics-Files'!\r!GIFReadWriter commentStamp: '<historical>'!\rCopyright (c) Kazuki Yasumatsu, 1995. All rights reserved.\r\rUsed with permission.  Modified for use in Squeak.!\rGIFReadWriter subclass: #AnimatedGIFReadWriter\rinstanceVariableNames: 'forms delays comments'\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Graphics-Files'!\r!EventSensor commentStamp: 'nk 4/13/2004 11:18'!\rEventSensor is a replacement for InputSensor based on a set of (optional) event primitives. An EventSensor updates its state when events are received so that all state based users of Sensor (e.g., Sensor keyboard, Sensor leftShiftDown, Sensor mouseButtons) will work exactly as before, by moving the current VM mechanisms into EventSensor itself. An optional input semaphore is part of the new design.\r\rFor platforms that support true asynchronous event notification, the semaphore will be signaled to indicate pending events.\rOn platforms that do not support asynchronous notifications about events, the UI will have to poll EventSensor periodically to read events from the VM.\r\rInstance variables:\rmouseButtons <Integer>\t- mouse button state as replacement for primMouseButtons\rmousePosition <Point>\t- mouse position as replacement for primMousePt\rkeyboardBuffer <SharedQueue>\t- keyboard input buffer\rinterruptKey <Integer>\t\t\t- currently defined interrupt key\rinterruptSemaphore <Semaphore>\t- the semaphore signaled when the interruptKey is detected\reventQueue <SharedQueue>\t- an optional event queue for event driven applications\rinputSemaphore <Semaphore>- the semaphore signaled by the VM if asynchronous event notification is supported\rlastEventPoll <Integer>\t\t- the last millisecondClockValue at which we called fetchMoreEvents\rhasInputSemaphore <Boolean>\t- true if my inputSemaphore has actually been signaled at least once.\r\rClass variables:\rEventPollPeriod <Integer>\t- the number of milliseconds to wait between polling for more events in the userInterruptHandler.\rEventTicklerProcess <Process>\t- the process that makes sure that events are polled for often enough (at least every EventPollPeriod milliseconds).\r\rEvent format:\rThe current event format is very simple. Each event is recorded into an 8 element array. All events must provide some SmallInteger ID (the first field in the event buffer) and a time stamp (the second field in the event buffer), so that the difference between the time stamp of an event and the current time can be reported.\r\rCurrently, the following events are defined:\r\rNull event\r=============\rThe Null event is returned when the ST side asks for more events but no more events are available.\rStructure:\r[1]\t\t- event type 0\r[2-8]\t- unused\r\rMouse event structure\r==========================\rMouse events are generated when mouse input is detected.\rStructure:\r[1]\t- event type 1\r[2]\t- time stamp\r[3]\t- mouse x position\r[4]\t- mouse y position\r[5]\t- button state; bitfield with the following entries:\r\t1\t-\tyellow (e.g., right) button\r\t2\t-\tblue (e.g., middle) button\r\t4\t-\tred (e.g., left) button\r\t[all other bits are currently undefined]\r[6]\t- modifier keys; bitfield with the following entries:\r\t1\t-\tshift key\r\t2\t-\tctrl key\r\t4\t-\t(Mac specific) option key\r\t8\t-\tCmd/Alt key\r\t[all other bits are currently undefined]\r[7]\t- reserved.\r[8]\t- reserved.\r\rKeyboard events\r====================\rKeyboard events are generated when keyboard input is detected.\r[1]\t- event type 2\r[2]\t- time stamp\r[3]\t- character code\r\tFor now the character code is in Mac Roman encoding.\r[4]\t- press state; integer with the following meaning\r\t0\t-\tcharacter\r\t1\t-\tkey press (down)\r\t2\t- \tkey release (up)\r[5]\t- modifier keys (same as in mouse events)\r[6]\t- reserved.\r[7]\t- reserved.\r[8]\t- reserved.\r!\rObject subclass: #JPEGColorComponent\rinstanceVariableNames: 'currentX currentY hSampleFactor vSampleFactor mcuBlocks widthInBlocks heightInBlocks dctSize mcuWidth mcuHeight priorDCValue id qTableIndex dcTableIndex acTableIndex'\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Graphics-Files'!\r!JPEGColorComponent commentStamp: '<historical>'!\rI represent a single component of color in JPEG YCbCr color space.  I can accept a list of blocks in my component from the current MCU, then stream the samples from this block for use in color conversion.  I also store the running DC sample value for my component, used by the Huffman decoder.\r\rThe following layout is fixed for the JPEG primitives to work:\rcurrentX \t\t<SmallInteger>\rcurrentY \t\t<SmallInteger>\rhSampleFactor \t<SmallInteger>\rvSampleFactor \t<SmallInteger>\rmcuBlocks \t\t<Array of: <IntegerArray of: DCTSize2 * Integer>>\rwidthInBlocks \t<SmallInteger>\rheightInBlocks \t<SmallInteger>\rdctSize \t\t\t<SmallInteger>\rmcuWidth \t\t<SmallInteger>\rmcuHeight \t\t<SmallInteger>\rpriorDCValue \t<SmallInteger>\r!\rObject subclass: #JPEGHuffmanTable\rinstanceVariableNames: 'bits values mincode maxcode valptr lookaheadBits lookaheadSymbol'\rclassVariableNames: 'BitBufferSize Lookahead'\rpoolDictionaries: ''\rcategory: 'Graphics-Files'!\r!JPEGHuffmanTable commentStamp: '<historical>'!\rI represent the table of values used to decode Huffman entropy-encoded bitstreams.  From the JFIF file header entropy values, I build a derived table of codes and values for faster decoding.!\rImageReadWriter subclass: #JPEGReadWriter\rinstanceVariableNames: 'width height components currentComponents qTable hACTable hDCTable restartInterval restartsToGo mcuWidth mcuHeight mcusPerRow mcuRowsInScan mcuMembership mcuSampleBuffer mcuImageBuffer majorVersion minorVersion dataPrecision densityUnit xDensity yDensity ss se ah al sosSeen residuals ditherMask'\rclassVariableNames: 'ConstBits DCTK1 DCTK2 DCTK3 DCTK4 DCTSize DCTSize2 DitherMasks FIXn0n298631336 FIXn0n34414 FIXn0n390180644 FIXn0n541196100 FIXn0n71414 FIXn0n765366865 FIXn0n899976223 FIXn1n175875602 FIXn1n40200 FIXn1n501321110 FIXn1n77200 FIXn1n847759065 FIXn1n961570560 FIXn2n053119869 FIXn2n562915447 FIXn3n072711026 FloatSampleOffset HuffmanTableSize JFIFMarkerParser JPEGNaturalOrder MaxSample Pass1Bits Pass1Div Pass2Div QTableScaleFactor QuantizationTableSize SampleOffset'\rpoolDictionaries: ''\rcategory: 'Graphics-Files'!\r!JPEGReadWriter commentStamp: '<historical>'!\rI am a subclass of ImageReadWriter that understands JFIF file streams, and can decode JPEG images.\rThis code is based upon the Independent Joint Photographic Experts Group (IJPEG) software, originally written in C by Tom Lane, Philip Gladstone, Luis Ortiz, Jim Boucher, Lee Crocker, Julian Minguillon, George Phillips, Davide Rossi, Ge' Weijers, and other members of the Independent JPEG Group.\r\r!\rImageReadWriter subclass: #JPEGReadWriter2\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Graphics-Files'!\r!JPEGReadWriter2 commentStamp: '<historical>'!\rI provide fast JPEG compression and decompression. I require the VM pluginJPEGReadWriter2Plugin, which is typically stored in same directory as the Squeak virtual machine.\r\rJPEGReadWriter2Plugin is based on LIBJPEG library. This sentence applies to the plugin:\r\"This software is based in part on the work of the Independent JPEG Group\".\r\rThe LIBJPEG license allows it to be used free for any purpose so long as its origin and copyright are acknowledged. You can read more about LIBJPEG and get the complete source code at www.ijg.org.\r!\rObject subclass: #ListItemWrapper\rinstanceVariableNames: 'item model'\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Ly-Explorer'!\r!ListItemWrapper commentStamp: '<historical>'!\rContributed by Bob Arning as part of the ObjectExplorer package.\r!\rObject subclass: #LyGraphicsLibrary\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Ly-Tools'!\rMouseMenuController subclass: #MSWScrollBarController\rinstanceVariableNames: 'unitScrollDelay'\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Interface-MSWLook'!\rListItemWrapper subclass: #ObjectExplorerWrapper\rinstanceVariableNames: 'itemName parent isOpen'\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Ly-Explorer'!\r!ObjectExplorerWrapper commentStamp: '<historical>'!\rContributed by Bob Arning as part of the ObjectExplorer package.\r!\rObjectExplorerWrapper subclass: #ClassHierarchyExplorerWrapper\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Ly-Explorer'!\rColorForm subclass: #OpaqueForm\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Graphics-Display Objects'!\r!OpaqueForm commentStamp: '<historical>'!\rOpaqueForms include a shape as well as a figure form.  The shape indicates what part of the background should get occluded in displaying, so that patterns other than black in the figure form will still appear opaque.\r\rInstance Variables:\rfigure\t<Form> the actual image\rshape\t<Form> the mask for displaying!\rObject subclass: #PluggableOutline\rinstanceVariableNames: 'subject list selection openItems levels'\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Ly-Tools'!\rPluggableOutline subclass: #AbstractHierarchicalList\rinstanceVariableNames: 'currentSelection myBrowser'\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Ly-Explorer'!\r!AbstractHierarchicalList commentStamp: '<historical>'!\rContributed by Bob Arning as part of the ObjectExplorer package.\r!\rAbstractHierarchicalList subclass: #ObjectExplorer\rinstanceVariableNames: 'rootObject inspector monitorList monitorProcess rootLabel'\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Ly-Explorer'!\r!ObjectExplorer commentStamp: '<historical>'!\rObjectExplorer provides a hierarchical alternative to #inspect. Simply evaluate an expression like:\r\rWorld explore\r\rand enjoy.!\rObjectExplorer subclass: #ClassHierarchyExplorer\rinstanceVariableNames: 'centralClass'\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Ly-Explorer'!\rObjectExplorer subclass: #PointerExplorer\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Ly-Explorer'!\r!PointerExplorer commentStamp: 'avi 8/21/2004 20:01'!\rA variant on the ObjectExlorer that works \"backwards\": like the ObjectExplorer, it shows a tree of objects, but expanding a node won't show the objects which that node references, but rather the objects that reference that node.  Its main use is to track down memory leaks: if you want to know why a particular object is still alive, open a PointerExplorer on it and drill down until you find the root object that's referencing it.  For example, find all the references to the symbol #zot with:\r\rPointerExplorer new openExplorerFor: #zot\r\rFor the \"name\" of the object, the PointerExplorer shows each object's identityHash, to allow the user to identify when two similar objects are identical and notice cycles.!\rObjectExplorerWrapper subclass: #PointerExplorerWrapper\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Ly-Explorer'!\r!PointerExplorerWrapper commentStamp: 'avi 8/21/2004 19:58'!\rA subclass of ObjectExplorerWrapper for use with PointerExplorer.  #contents is overridden to work backwards: it returns wrappers for the objects pointing to item rather than for the objects that item points to.!\rObject subclass: #PopUpMenu\rinstanceVariableNames: 'labelString font lineArray frame form marker selection'\rclassVariableNames: 'CacheMenuForms LastStartupTime MenuStyle'\rpoolDictionaries: ''\rcategory: 'Tools-Menus'!\rReadStream subclass: #JPEGReadStream\rinstanceVariableNames: 'bitBuffer bitsInBuffer'\rclassVariableNames: 'MaxBits'\rpoolDictionaries: ''\rcategory: 'Graphics-Files'!\r!JPEGReadStream commentStamp: '<historical>'!\rEncapsulates huffman encoded access to JPEG data.\r\rThe following layout is fixed for the JPEG primitives to work:\r\rcollection\t<ByteArray | String>\rposition\t\t<SmallInteger>\rreadLimit\t<SmallInteger>\rbitBuffer\t<SmallInteger>\rbitsInBuffer\t<SmallInteger>!\rObject subclass: #ProcessorScheduler\rinstanceVariableNames: 'quiescentProcessLists activeProcess'\rclassVariableNames: 'BackgroundProcess EmergencyProcess HighIOPriority LowIOPriority SystemBackgroundPriority SystemRockBottomPriority TimingPriority UserBackgroundPriority UserInterruptPriority UserSchedulingPriority'\rpoolDictionaries: ''\rcategory: 'Kernel-Processes'!\rRVMObject subclass: #RVMSBinarySampleWriter\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: 'TextConstants'\rcategory: 'RVM-Archiving'!\r!RVMSBinarySampleWriter commentStamp: 'ssa 10/26/2008 23:51'!\rA test to see if a completely flattened binary stream write method would be faster than the archiver.\r\rNot so!!\rthis takes 4-6 seconds and generates a 600K file for a 56 core sample\r\rArchiver takes 0.7 sec and generates a 40K file!\rObject subclass: #RemoteString\rinstanceVariableNames: 'sourceFileNumber filePositionHi'\rclassVariableNames: 'CurrentTextAttStructure CurrentTextAttVersion  TextAttributeStructureVersions'\rpoolDictionaries: ''\rcategory: 'System-Files'!\rPluggableListController subclass: #LyPluggableOutlineController\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Ly-Tools'!\rArray variableSubclass: #ArrayWithNilDetector\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Ly-Tools'!\rOrderedCollection subclass: #OrderedCollectionWithNilDetector\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Ly-Tools'!\rMouseMenuController subclass: #StandardSystemController\rinstanceVariableNames: 'status preventClosing'\rclassVariableNames: 'HBorderCursor ScheduledBlueButtonMenu ScheduledBlueButtonMessages VBorderCursor'\rpoolDictionaries: ''\rcategory: 'ST80-Support'!\rStandardSystemController subclass: #MSWSystemController\rinstanceVariableNames: 'lastSystemActivity'\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Interface-MSWLook'!\rCodeHolder subclass: #Browser\rinstanceVariableNames: 'systemOrganizer classOrganizer metaClassOrganizer systemCategoryListIndex classListIndex messageCategoryListIndex messageListIndex editSelection metaClassIndicated lastClassSelected'\rclassVariableNames: 'RecentClasses'\rpoolDictionaries: ''\rcategory: 'Tools-Browser'!\rHierarchyBrowser subclass: #HierarchyOutlineBrowser\rinstanceVariableNames: 'subject list selection openItems levels currentSelection myBrowser'\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Ly-Explorer'!\r!HierarchyOutlineBrowser commentStamp: '<historical>'!\rContributed by Bob Arning as part of the ObjectExplorer package.\r!\rTextDoIt subclass: #TextBlockDoIt\rinstanceVariableNames: 'actionBlock'\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Collections-Text'!\rWriteStream subclass: #TranscriptStream\rinstanceVariableNames: ''\rclassVariableNames: 'AccessSema ShowInConsole'\rpoolDictionaries: ''\rcategory: 'Collections-Streams'!\rView subclass: #MSWScrollBarView\rinstanceVariableNames: 'scrollBarWidth scrollBarBox upButtonBox downButtonBox elevatorShaft elevatorCache upButtonCache downButtonCache'\rclassVariableNames: 'WhereToLocateScrollBars'\rpoolDictionaries: ''\rcategory: 'Interface-MSWLook'!\rPluggableListView subclass: #PluggableListViewByObject\rinstanceVariableNames: 'objects scrollCache'\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'ST80-Pluggable Views'!\rPluggableListViewByObject subclass: #LyPluggableOutlineView\rinstanceVariableNames: 'getChildrenSelector twistyTargets'\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Ly-Tools'!\rLyPluggableOutlineView subclass: #ExplorerListView\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Ly-Explorer'!\rStandardSystemView subclass: #MSWSystemView\rinstanceVariableNames: 'growFrame'\rclassVariableNames: 'CloseBoxForm GrowBoxForm ShrinkBoxForm SystemBoxForm'\rpoolDictionaries: ''\rcategory: 'Interface-MSWLook'!\rView subclass: #StringHolderView\rinstanceVariableNames: 'displayContents hasUnacceptedEdits askBeforeDiscardingEdits textStyle'\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'ST80-Support'!\r!Object methodsFor: '*Javascript' stamp: 'aw 8/29/2007 14:27'!\r~== anObject\r\r^ (self == anObject) not! !\r!Object methodsFor: '*Sly' stamp: 'dmu 3/18/2010 15:47'!\rprimitiveGetExtraPreheaderWord: anObject\r\"ignores receiver, queries argument\"\r<primitive: 'primitiveGetExtraPreheaderWord' module: 'RVMPlugin'>\rself primitiveFailed! !\r!Object methodsFor: '*Sly' stamp: 'dmu 3/18/2010 14:52'!\rprimitiveSetExtraPreheaderWord: w\r\"sets word IN w to SELF\"\r<primitive: 'primitiveSetExtraPreheaderWord' module: 'RVMPlugin'>\rself primitiveFailed! !\r!Object methodsFor: '*Sly' stamp: 'dmu 3/16/2010 19:11'!\rprimitiveSetExtraWordSelector: aSelector\r<primitive: 'primitiveSetExtraWordSelector' module: 'RVMPlugin'>\rself primitiveFailed! !\r!Object methodsFor: 'RVM-ensembles' stamp: 'ssa 4/21/2009 20:29'!\rforMeRun: aBlock\r^ aBlock value! !\r!Object methodsFor: 'RVM-ensembles' stamp: 'dmu 5/14/2010 10:29'!\rprintConsole\rRVMTester isRVM ifTrue: [RVMTester print: self printString] ifFalse: [Transcript showInConsole ifFalse: [Transcript show: self printString; cr]]! !\r!Object methodsFor: 'converting' stamp: ''!\rasDisplayObject\r\"kwa -- 7 July 1989, answer some DisplayObject which represents the receiver.  The default is DisplayString.  Subclasses may wish to override.\rkwa -- 5 December 1989, changed from DisplayText to DisplayString for efficiency.\"\r\"ssa - 27 February 1990, at kwa's suggestion, changed asDisplayString back to asDisplayText to work around a bug in glyph scanning\"\r\"KSC Extension\"\r\r^self asDisplayText! !\r!Object methodsFor: 'converting' stamp: ''!\rasDisplayText\r\"Convert the receiver into a DisplayText.\"\r\"KSC Extension.\"\r\r^self asText asDisplayText! !\r!Object methodsFor: 'converting' stamp: 'ssa 11/13/2008 10:34'!\rasObjectCoordinate\r\"Answer an RVMObjectCoordinate with my manycore coordinate details\"\r\r^RVMObjectCoordinate for: self! !\r!Object methodsFor: 'converting' stamp: ''!\rasText\r\"kwa -- 7 July 1989, answer some Text which represents the receiver.  The default is to use asString asText.  This is so any object can can be treated as a Text (whether it is or not).  Subclasses may wish to override (but shouldn't have to) to take advantage of emphasis et al.\"\r\"KSC Extension\"\r\r^self asString asText! !\r!Object methodsFor: 'converting' stamp: 'ssa 12/16/2009 13:22'!\rprintDirectlyToDisplay\r\"For debugging: write the receiver's printString directly to the display at (0, 100); senders of this are detected by the check-for-slips mechanism.\"\r\rself asString displayAt: 0@0\r\r\"StringMorph someInstance printDirectlyToDisplay\"! !\r!Object methodsFor: 'debugging' stamp: 'ssa 1/21/2010 12:08'!\rdisplay\r\"Display my printString on the screen to avoid the transcript\"\r\rself printString asParagraph display! !\r!Object methodsFor: 'debugging' stamp: 'ssa 2/26/2009 01:59'!\rlocate\r\"Open a object coordinate view on my location in the manycore world\"\r\"Array locate\"\rRVMObjectCoordinateView openOn: self asObjectCoordinate! !\r!Object methodsFor: 'debugging' stamp: 'ssa 8/8/2008 17:25'!\rprint\r\rTranscript cr;show: self printString! !\r!Object methodsFor: '*Sly3' stamp: 'dmu 9/3/2010 17:00'!\rdoesNotUnderstand: aMessage \r \"Handle the fact that there was an attempt to send the given message to the receiver but the receiver does not understand this message (typically sent from the machine when a message is sent to the receiver and no method is defined for that selector).\"\r\"Testing: (3 activeProcess)\"\r|  newSelector rps |\rrps _ {Sly3Adverb reflectiveAdverb stringWithUppercaseSuffix. Sly3ModWholly stringWithUppercaseSuffix}.\rrps do: [:rp |\r\t(aMessage selector beginsWith: rp) ifTrue: [\r\t\tnewSelector _ aMessage selector copyFrom: rp size + 1 to: aMessage selector size.\r\t\tnewSelector size = 0 ifTrue: [^ self].\r\t\t^ self perform: newSelector asSymbol withArguments: aMessage arguments\r\t]\r].\r(RVMTester isMulticoreCoordinate: aMessage selector)\r\t ifTrue:[RVMTester teleport: self to: aMessage selector. \r\t\t\t^self].\r(Preferences autoAccessors and: [self tryToDefineVariableAccess: aMessage])\r\tifTrue: [^ aMessage sentTo: self].\r\r^ MessageNotUnderstood new \r\tmessage: aMessage;\r\treceiver: self;\r\tsignal! !\r!Object methodsFor: 'inspecting' stamp: 'ssa 1/6/2010 20:19'!\rinspect\r\"Create and schedule an Inspector in which the user can examine the receiver's variables.\"\r\rself inspectorClass openOn: self withEvalPane: true! !\r!Object methodsFor: 'macpal' stamp: 'ssa 9/8/2009 10:22'!\rallInstanceVariableValues\r\"Answer a collection whose elements are the values of those instance variables of the receiver\"\r| c |\rc _ OrderedCollection new.\r1 to: self class instSize do:\r\t[:i | c add: (self instVarAt: i)].\r^ c! !\r!Object methodsFor: 'macpal' stamp: 'ssa 9/8/2009 10:51'!\rallInstanceVariableValuesPlusIndexed\r\"Answer a collection whose elements are the values of those instance variables of the receiver.\rAlso include the indexed variables if any\"\r| c |\rc _ OrderedCollection new.\r1 to: self class instSize do:\r\t[:i | c add: (self instVarAt: i)].\rself class isVariable ifFalse:[^c].\r1 to: self size do:[:index|\r\tc add: (self basicAt: index)].\r^ c! !\r!Object methodsFor: 'outlining' stamp: 'ssa 9/11/2009 16:40'!\rexplore\r\rObjectExplorer new openExplorerFor: self! !\r!Object methodsFor: 'outlining' stamp: 'ssa 3/9/2010 16:17'!\rhasContents\r\r^false! !\r!Object methodsFor: 'outlining' stamp: 'ssa 9/10/2009 16:00'!\routlineString\r\r^self printString! !\r!Object methodsFor: 'outlining' stamp: 'ssa 9/10/2009 13:36'!\rsubobjects\r\"Answer an appropriate collection of my sub objects for an outliner view\"\r\r^self class allInstVarNames with: self allInstanceVariableValues collect:[:key :value| key -> value]! !\r!Object methodsFor: 'printing' stamp: ''!\rarchiveOn: aStream \r\"This is the generic archiver for objects. If an object does anything special, this method will need to be subclassed along with the complementary method - dearchiveFrom:\"\r\raStream\r\tstoreObject: self;\r\tstoreClass: self class.\r\rself class isVariable ifTrue:\r\t[aStream store: self basicSize.\r\t1 to: self basicSize do: [:i | aStream nextPut: (self basicAt: i)].].\r\r1 to: self class instSize do: [:i | aStream nextPut: (self instVarAt: i)].! !\r!Object methodsFor: 'printing' stamp: 'ssa 10/25/2008 20:45'!\rarchiveVersion\r\"Subclasses should override when they implement a different archive version\"\r\r^1! !\r!Object methodsFor: 'printing' stamp: ''!\rbasicArchiveOn: aStream \r\"This is the generic archiver for objects. This can be used if you want to bypass superclass or other reasons for overriding archiveOn:\"\r\raStream\r\tstoreObject: self;\r\tstoreClass: self class.\r\rself class isVariable ifTrue:\r\t[aStream store: self basicSize.\r\t1 to: self basicSize do: [:i | aStream nextPut: (self basicAt: i)].].\r\r1 to: self class instSize do: [:i | aStream nextPut: (self instVarAt: i)].! !\r!Object methodsFor: 'printing' stamp: ''!\rdearchiveFrom: aStream\r\"This is the generic de-archiver for objects. If an object does anything special, this method will need to be subclassed along with the complementary method - archiveOn:\"\r\rself class isVariable ifTrue:\r\t[1 to: self basicSize do: [:i | self basicAt: i put: aStream next]].\r\r1 to: self class instSize\r  do: [:j | self instVarAt: j put: aStream next]! !\r!Object methodsFor: 'printing' stamp: 'ssa 1/1/1970 00:21'!\rlongPrintOn: aStream\r\"Append to the argument, aStream, the names and values of all \rof the receiver's instance variables.\"\r\rself class allInstVarNames doWithIndex:\r\t[:title :index |\r\taStream nextPutAll: title;\r\t nextPut: $:;\r\t space;\r\t tab;\r\t nextPutAll: (RVMTester printPrefixFor: (self instVarAt: index));\r\tprint:(self instVarAt: index);\r\t cr]! !\r!Object methodsFor: 'printing' stamp: 'ssa 9/4/2009 22:29'!\rprintStringUpTo: limit\r\"Answer a String whose characters are a description of the receiver.\rIf you want to print without a character limit, use fullPrintString.\"\r| limitedString |\rlimitedString _ String streamContents: [:s | self printOn: s] limitedTo: limit.\rlimitedString size < limit ifTrue: [^ limitedString].\r^ limitedString, '...'! !\r!Object methodsFor: 'testing' stamp: 'ssa 9/8/2009 10:48'!\rhasInstanceVariables\r\r^self allInstanceVariableValuesPlusIndexed size > 0! !\r!Object methodsFor: 'testing' stamp: 'ssa 5/12/2010 19:26'!\risArray\r\"Return true if the receiver is an Array\"\r^false! !\r!Object methodsFor: 'testing' stamp: 'ssa 5/27/2010 10:40'!\risBoolean\r\"Return true if the receiver is true or false.\rNote: Do not override in any class except Boolean.\"\r^false! !\r!Object methodsFor: 'testing' stamp: 'ssa 8/11/2009 12:37'!\risCharacter\r^false! !\r!Object methodsFor: 'testing' stamp: 'ssa 8/31/2009 14:14'!\risObject\r\r^true! !\r!Object methodsFor: 'updating' stamp: 'ssa 5/12/2010 10:29'!\rchanged: anAspect with: anObject from: aSource\r\"Receiver changed. The change is denoted by the argument anAspect. \rUsually the argument is a Symbol that is part of the dependent's change \rprotocol. Inform all of the dependents. Also pass anObject for additional information.\"\r\rself dependents do: [:aDependent | aDependent update: anAspect with: anObject from: aSource]! !\r!Object methodsFor: 'updating' stamp: 'ssa 5/12/2010 10:29'!\rupdate: anAspect with: anObject from: aSource\r\"Receive a change notice from an object of whom the receiver is a \rdependent. The default behavior is to call update:,\rwhich by default does nothing; a subclass might want \rto change itself in some way.\"\r\r^ self update: anAspect with: anObject! !\r!Object methodsFor: 'user interface' stamp: 'ssa 6/17/2010 16:15'!\rasExplorerString\r^ self printString! !\r!Object methodsFor: 'user interface' stamp: 'ssa 11/30/2009 17:49'!\rdefaultBackgroundColor\r\"Answer the color to be used as the base window color for a window whose model is an object of the receiver's class\"\r\r(Smalltalk includesKey: #WINDOWCOLORSELECTOR)\r\tifFalse:[Smalltalk at: #WINDOWCOLORSELECTOR put:[:obj| Preferences windowColorFor: obj  class name]].\r\r^((Smalltalk at: #WINDOWCOLORSELECTOR) value: self) ! !\r!ArchiveReader methodsFor: 'reading' stamp: ''!\rclose\rstream close! !\r!ArchiveReader methodsFor: 'reading' stamp: ''!\rnext\r| anInteger |\rstartPosition _ position.\ranInteger _ self read: Integer.\r^anInteger = 0\r\tifTrue: [objectMap at: (self read: Integer)]\r\tifFalse:\r\t\t[(classMap at: anInteger)\r\t\t\tdearchive: (classVersions at: anInteger)\r\t\t\tfrom: self]! !\r!ArchiveReader methodsFor: 'reading' stamp: ''!\rread: aClass\r\"Ask aClass to read one of its objects from stream. aClass is typically Integer, Float, Symbol, etc.  Assume the object was put on the stream using ArchiveWriter>store:\"\r\r| anObject |\ranObject _ aClass readFrom: stream.\rstream skipSeparators.\rposition _ position + 1.\r^anObject! !\r!ArchiveReader methodsFor: 'testing' stamp: ''!\risCopier\r\"For compatibility with CopyReader (in case an object cares what type of Reader its using).\"\r\r^false! !\r!ArchiveReader methodsFor: 'private' stamp: 'ssa 10/25/2008 21:29'!\rdearchive: version from: aStream\r\"This is used before a class is read in for the first time... version is ignored here.  This method has this name only to avoid another case statement (see #next).  A better name for this method would be #dearchiveClassFrom:\"\r\r| aClass anInteger |\rclassMap add: (aClass _ Smalltalk at: (aStream read: Symbol)).\rclassVersions add: (anInteger _ aStream read: Integer).\r^aClass dearchive: anInteger from: aStream! !\r!ArchiveReader methodsFor: 'private' stamp: ''!\rsetStream: aStream\rstream _ aStream.\robjectMap _ IdentityDictionary new: 400.\rclassMap _ OrderedCollection new: 30.\rclassMap add: self.\rclassVersions _ OrderedCollection with: 0.\rposition _ 0! !\r!ArchiveReader methodsFor: 'private' stamp: ''!\rstoreObject: anObject\robjectMap at: startPosition put: anObject! !\r!ArchiveWriter methodsFor: 'writing' stamp: ''!\rcanCopy: anObject\r\"For archiving, I write out everything\"\r\r^true! !\r!ArchiveWriter methodsFor: 'writing' stamp: ''!\rclose\rstream close! !\r!ArchiveWriter methodsFor: 'writing' stamp: ''!\rnextPut: anObject\r| anInteger |\ranInteger _ objectMap\r\tat: anObject\r\tifAbsent: [^anObject archiveOn: self].\rself\r\tstore: 0;\r\tstore: anInteger! !\r!ArchiveWriter methodsFor: 'writing' stamp: ''!\rstore: anObject\r\"Put anObject on the Stream, converting it to an ascii String.  anObject will typically be a Symbol, Number, etc.  This takes advantage of the storeOn:/readFrom: facility already in Smalltalk which works well for Basic Classes.\"\r\"kwa -- 12 October 1989, replaced #space with: nextPut: Space (a TextConstant) for efficiency.\"\r\rstream store: anObject; nextPut: Space.\rposition _ position + 1! !\r!ArchiveWriter methodsFor: 'private' stamp: 'ssa 10/26/2008 20:44'!\rsetStream: aWriteStream\rstream _ aWriteStream.\rclassMap _ IdentityDictionary new: 30.\rclassMap at: self put: 1.\robjectMap _ IdentityDictionary new: 400.\rposition _ 0! !\r!ArchiveWriter methodsFor: 'private' stamp: ''!\rstoreClass: aClass\rself store: \r\t(classMap at: aClass ifAbsent: \r\t\t[self store: 1; store: aClass name; store: aClass archiveVersion.\r\t\t^classMap at: aClass put: classMap size + 1])! !\r!ArchiveWriter methodsFor: 'private' stamp: ''!\rstoreObject: anObject\robjectMap at: anObject put: \"stream\" position! !\r!ArchiveWriter methodsFor: 'testing' stamp: ''!\risCopier\r\"For compatibility with CopyWriter (in case an object cares what type of Writer its using).\"\r\r^false! !\r!Association methodsFor: 'outlining' stamp: 'ssa 9/10/2009 16:01'!\routlineString\r\r^self key asString,'  ',self value printString! !\r!Behavior methodsFor: 'accessing' stamp: 'ssa 9/2/2009 17:59'!\rsetInstanceFormat: sizeAndFlags \r\"Set the format for the receiver (a Class).\"\r\rformat _ sizeAndFlags! !\r!Behavior methodsFor: 'printing' stamp: 'ssa 10/25/2008 20:48'!\rarchiveVersion\r\"This is the daefault version number for an archived instance of any class.\rVersion 1 was back when each class was responsible for its own archiving.\rVersion 2 uses the default archiving behavior in object (see Object>archiveOn: and Object class>dearchive:from:).\"\r\r^1! !\r!Behavior methodsFor: 'printing' stamp: 'ssa 1/1/1970 00:22'!\rlongPrintOn: aStream\r\"Append to the argument, aStream, the names and values of all of the receiver's instance variables.  But, not useful for a class with a method dictionary.\"\r\raStream nextPutAll: (RVMTester printPrefixFor: self).\raStream nextPutAll: '<<too complex to show>>'; cr.! !\r!Behavior methodsFor: 'compiling' stamp: 'ssa 9/3/2008 12:19'!\rcompile: code notifying: requestor trailer: trailingBytes\r\"Compile the argument, code, as source code in the context of the \rreceiver and insEtall the result in the receiver's method dictionary. The \rsecond argument, requestor, is to be notified if an error occurs. The \rargument code is either a string or an object that converts to a string or \ra PositionableStream. This method also saves the source code.\"\r\r| methodAndNode |\rmethodAndNode  := self\r\tbasicCompile: code \"a Text\"\r\tnotifying: requestor\r\ttrailer: trailingBytes\r\tifFail: [^nil].\rmethodAndNode method putSource: code fromParseNode: methodAndNode node inFile: 2\r\t\twithPreamble: [:f | f cr; nextPut: $!!; nextChunkPut: 'Behavior method'; cr].\rself addSelector: methodAndNode selector withMethod: methodAndNode method notifying: requestor.\r^ methodAndNode selector! !\r!Behavior methodsFor: 'accessing class hierarchy' stamp: 'ssa 10/8/2008 15:47'!\rallSubclasses\r\"Answer a Set of the receiver's and the receiver's descendent's subclasses. \"\r\r| scan scanTop |\rscan _ OrderedCollection withAll: self subclasses.\rscanTop _ 1.\r[scanTop > scan size]\r\twhileFalse: [scan addAll: (scan at: scanTop) subclasses.\r\t\tscanTop _ scanTop + 1].\r^ scan \"asSet\"! !\r!Behavior methodsFor: 'accessing class hierarchy' stamp: 'ssa 10/8/2008 16:02'!\rwithAllSubclasses\r\"Answer a Set of the receiver, the receiver's descendent's, and the  \rreceiver's descendent's subclasses.\"\r\r| subs |\rsubs _ self allSubclasses.\rsubs addFirst: self.\r^subs! !\r!Behavior methodsFor: 'outlining' stamp: 'ssa 9/10/2009 13:46'!\rsubobjects\r\r^self subclasses! !\r!BitBlt methodsFor: 'accessing' stamp: 'dmu 4/4/2009 00:24'!\rcopyBitsOnMain\r\"Primitive. Perform the movement of bits from the source form to the \rdestination form. Fail if any variables are not of the right type (Integer, \rFloat, or Form) or if the combination rule is not implemented. \rIn addition to the original 16 combination rules, this BitBlt supports\r16\tfail (to simulate paint)\r17\tfail (to simulate mask)\r18\tsourceWord + destinationWord\r19\tsourceWord - destinationWord\r20\trgbAdd: sourceWord with: destinationWord\r21\trgbSub: sourceWord with: destinationWord\r22\trgbDiff: sourceWord with: destinationWord\r23\ttallyIntoMap: destinationWord\r24\talphaBlend: sourceWord with: destinationWord\r25\tpixPaint: sourceWord with: destinationWord\r26\tpixMask: sourceWord with: destinationWord\r27\trgbMax: sourceWord with: destinationWord\r28\trgbMin: sourceWord with: destinationWord\r29\trgbMin: sourceWord bitInvert32 with: destinationWord\r\"\r<primitive: 'primitiveCopyBits' module: 'BitBltPlugin'>\r\r\"Check for compressed source, destination or halftone forms\"\r(combinationRule >= 30 and: [combinationRule <= 31]) ifTrue:\r\t[\"No alpha specified -- re-run with alpha = 1.0\"\r\t^ self copyBitsTranslucent: 255].\r((sourceForm isForm) and: [sourceForm unhibernate])\r\tifTrue: [^ self copyBits].\r((destForm isForm) and: [destForm unhibernate])\r\tifTrue: [^ self copyBits].\r((halftoneForm isForm) and: [halftoneForm unhibernate])\r\tifTrue: [^ self copyBits].\r\r\"Check for unimplmented rules\"\rcombinationRule = Form oldPaint ifTrue: [^ self paintBits].\rcombinationRule = Form oldErase1bitShape ifTrue: [^ self eraseBits].\r\r\"Check if BitBlt doesn't support full color maps\"\r(colorMap notNil and:[colorMap isColormap]) ifTrue:[\r\tcolorMap _ colorMap colors.\r\t^self copyBits].\r\"Check if clipping gots us way out of range\"\rself clipRange ifTrue:[^self copyBits].\r\rself error: 'Bad BitBlt arg (Fraction?); proceed to convert.'.\r\"Convert all numeric parameters to integers and try again.\"\rdestX _ destX asInteger.\rdestY _ destY asInteger.\rwidth _ width asInteger.\rheight _ height asInteger.\rsourceX _ sourceX asInteger.\rsourceY _ sourceY asInteger.\rclipX _ clipX asInteger.\rclipY _ clipY asInteger.\rclipWidth _ clipWidth asInteger.\rclipHeight _ clipHeight asInteger.\r^ self copyBitsAgain! !\r!BitBlt methodsFor: 'copying' stamp: 'dmu 4/4/2009 00:20'!\rcopyBitsLocally\r\"Primitive. Perform the movement of bits from the source form to the \rdestination form. Fail if any variables are not of the right type (Integer, \rFloat, or Form) or if the combination rule is not implemented. \rIn addition to the original 16 combination rules, this BitBlt supports\r16\tfail (to simulate paint)\r17\tfail (to simulate mask)\r18\tsourceWord + destinationWord\r19\tsourceWord - destinationWord\r20\trgbAdd: sourceWord with: destinationWord\r21\trgbSub: sourceWord with: destinationWord\r22\trgbDiff: sourceWord with: destinationWord\r23\ttallyIntoMap: destinationWord\r24\talphaBlend: sourceWord with: destinationWord\r25\tpixPaint: sourceWord with: destinationWord\r26\tpixMask: sourceWord with: destinationWord\r27\trgbMax: sourceWord with: destinationWord\r28\trgbMin: sourceWord with: destinationWord\r29\trgbMin: sourceWord bitInvert32 with: destinationWord\r\"\r<primitive: 'primitiveCopyBitsLocally'>\r\r\"Check for compressed source, destination or halftone forms\"\r(combinationRule >= 30 and: [combinationRule <= 31]) ifTrue:\r\t[\"No alpha specified -- re-run with alpha = 1.0\"\r\t^ self copyBitsTranslucent: 255].\r((sourceForm isForm) and: [sourceForm unhibernate])\r\tifTrue: [^ self copyBits].\r((destForm isForm) and: [destForm unhibernate])\r\tifTrue: [^ self copyBits].\r((halftoneForm isForm) and: [halftoneForm unhibernate])\r\tifTrue: [^ self copyBits].\r\r\"Check for unimplmented rules\"\rcombinationRule = Form oldPaint ifTrue: [^ self paintBits].\rcombinationRule = Form oldErase1bitShape ifTrue: [^ self eraseBits].\r\r\"Check if BitBlt doesn't support full color maps\"\r(colorMap notNil and:[colorMap isColormap]) ifTrue:[\r\tcolorMap _ colorMap colors.\r\t^self copyBits].\r\"Check if clipping gots us way out of range\"\rself clipRange ifTrue:[^self copyBits].\r\rself error: 'Bad BitBlt arg (Fraction?); proceed to convert.'.\r\"Convert all numeric parameters to integers and try again.\"\rdestX _ destX asInteger.\rdestY _ destY asInteger.\rwidth _ width asInteger.\rheight _ height asInteger.\rsourceX _ sourceX asInteger.\rsourceY _ sourceY asInteger.\rclipX _ clipX asInteger.\rclipY _ clipY asInteger.\rclipWidth _ clipWidth asInteger.\rclipHeight _ clipHeight asInteger.\r^ self copyBitsAgain! !\r!BitBlt methodsFor: 'line drawing' stamp: 'dmu 4/3/2009 23:01'!\rdrawLoopLocallyX: xDelta Y: yDelta \r\"Primitive. Implements the Bresenham plotting algorithm (IBM Systems\rJournal, Vol. 4 No. 1, 1965). It chooses a principal direction, and\rmaintains a potential, P. When P's sign changes, it is time to move in\rthe minor direction as well. This particular version does not write the\rfirst and last points, so that these can be called for as needed in client code.\rOptional. See Object documentation whatIsAPrimitive.\"\r| |\r<primitive: 'primitiveDrawLoopLocally'>\rself primitiveFailed! !\r!BitBlt methodsFor: 'line drawing' stamp: 'ssa 4/3/2009 22:36'!\rglobalDrawLoopX: xDelta Y: yDelta \r\"Primitive. Implements the Bresenham plotting algorithm (IBM Systems\rJournal, Vol. 4 No. 1, 1965). It chooses a principal direction, and\rmaintains a potential, P. When P's sign changes, it is time to move in\rthe minor direction as well. This particular version does not write the\rfirst and last points, so that these can be called for as needed in client code.\rOptional. See Object documentation whatIsAPrimitive.\"\r| dx dy px py P |\r<primitive: 'primitiveDrawLoop' module: 'BitBltPlugin'>\rdx _ xDelta sign.\rdy _ yDelta sign.\rpx _ yDelta abs.\rpy _ xDelta abs.\r\"self copyBits.\"\rpy > px\r\tifTrue: \r\t\t[\"more horizontal\"\r\t\tP _ py // 2.\r\t\t1 to: py do: \r\t\t\t[:i |\r\t\t\tdestX _ destX + dx.\r\t\t\t(P _ P - px) < 0 ifTrue: \r\t\t\t\t\t[destY _ destY + dy.\r\t\t\t\t\tP _ P + py].\r\t\t\ti < py ifTrue: [self copyBits]]]\r\tifFalse: \r\t\t[\"more vertical\"\r\t\tP _ px // 2.\r\t\t1 to: px do:\r\t\t\t[:i |\r\t\t\tdestY _ destY + dy.\r\t\t\t(P _ P - py) < 0 ifTrue: \r\t\t\t\t\t[destX _ destX + dx.\r\t\t\t\t\tP _ P + px].\r\t\t\ti < px ifTrue: [self copyBits]]]! !\r!BitBlt methodsFor: 'line drawing' stamp: 'ssa 4/3/2009 22:52'!\rlocalDrawLoopX: xDelta Y: yDelta \r\"Primitive\"\r<primitive: 'primitiveDrawLoopLocally'>\r^self primitiveFailed! !\r!BlockNode methodsFor: 'accessing' stamp: 'dmu 1/21/2010 15:22'!\rreturnSelfIfNoOther\r\rself returns\r\tifFalse: \r\t\t[statements last == NodeSelf ifFalse: [\r\t\t\t(statements isKindOf: Array) ifTrue: [statements _ statements asOrderedCollection].\r\t\t\tstatements add: NodeSelf\r\t\t].\r\t\tself returnLast]! !\r!Boolean methodsFor: 'debugging' stamp: 'ssa 3/11/2010 11:54'!\rhaltIfFalse\r\r! !\r!Boolean methodsFor: 'debugging' stamp: 'ssa 3/11/2010 11:54'!\rhaltIfTrue\r\r! !\r!Boolean methodsFor: 'testing' stamp: 'ssa 5/27/2010 10:41'!\risBoolean\r\"Return true if the receiver is true or false.\rNote: Do not override in any class except Boolean.\"\r^true! !\r!Boolean methodsFor: 'testing' stamp: 'ssa 6/1/2010 16:46'!\rmustBeBoolean\r^false! !\r!Boolean methodsFor: 'testing' stamp: 'ssa 6/1/2010 16:47'!\rmustBeBooleanIn: aContext\r^true! !\r!ChangeRecord methodsFor: 'testing' stamp: 'ssa 1/5/2010 14:12'!\rmatch: aPatternString\r\"Answer true is any of my text matches aPatternString\"\r\r(aPatternString match: self string) ifTrue:[^true].\r(aPatternString match: self methodClassNameSafe) ifTrue:[^true].\r^false! !\r!ChangeRecord methodsFor: 'access' stamp: 'ssa 1/5/2010 14:04'!\rmethodClassNameSafe\r^class isNil ifTrue:['']ifFalse:[class]! !\r!ChangeRecord methodsFor: 'access' stamp: 'ssa 1/5/2010 14:03'!\rmethodSelectorSafe\r\"Answer a string in any case\"\rtype == #method ifFalse: [^ ''].\r^ Parser new parseSelector: self string! !\r!ChangeSet methodsFor: 'accessing' stamp: 'ssa 1/5/2010 21:02'!\rchangeRecords\r\"Answer the value of changeRecords\"\r\rchangeRecords isNil ifTrue:[self changeRecords: nil].\r^ changeRecords! !\r!ChangeSet methodsFor: 'accessing' stamp: 'ssa 1/5/2010 21:02'!\rchangeRecords: anObject\r\"Set the value of changeRecords\"\r\rchangeRecords _ anObject! !\r!ChangeSet methodsFor: 'accessing' stamp: 'ssa 1/5/2010 21:02'!\risolatedProject: anObject\r\"Set the value of isolatedProject\"\r\risolatedProject _ anObject! !\r!ChangeSet methodsFor: 'accessing' stamp: 'ssa 1/5/2010 21:02'!\risolationSet\r\"Answer the value of isolationSet\"\r\risolationSet isNil ifTrue:[self isolationSet: nil].\r^ isolationSet! !\r!ChangeSet methodsFor: 'accessing' stamp: 'ssa 1/5/2010 21:02'!\rpostscript\r\"Answer the value of postscript\"\r\rpostscript isNil ifTrue:[self postscript: nil].\r^ postscript! !\r!ChangeSet methodsFor: 'accessing' stamp: 'ssa 1/5/2010 21:02'!\rpostscript: anObject\r\"Set the value of postscript\"\r\rpostscript _ anObject! !\r!ChangeSet methodsFor: 'accessing' stamp: 'ssa 1/5/2010 21:02'!\rpreamble\r\"Answer the value of preamble\"\r\rpreamble isNil ifTrue:[self preamble: nil].\r^ preamble! !\r!ChangeSet methodsFor: 'accessing' stamp: 'ssa 1/5/2010 21:02'!\rpreamble: anObject\r\"Set the value of preamble\"\r\rpreamble _ anObject! !\r!ChangeSet methodsFor: 'accessing' stamp: 'ssa 1/5/2010 21:02'!\rrevertable\r\"Answer the value of revertable\"\r\rrevertable isNil ifTrue:[self revertable: nil].\r^ revertable! !\r!ChangeSet methodsFor: 'accessing' stamp: 'ssa 1/5/2010 21:02'!\rrevertable: anObject\r\"Set the value of revertable\"\r\rrevertable _ anObject! !\r!ChangeSet methodsFor: 'accessing' stamp: 'ssa 1/5/2010 21:02'!\rstructures: anObject\r\"Set the value of structures\"\r\rstructures _ anObject! !\r!ChangeSet methodsFor: 'accessing' stamp: 'ssa 1/5/2010 21:02'!\rsuperclasses: anObject\r\"Set the value of superclasses\"\r\rsuperclasses _ anObject! !\r!Character methodsFor: 'testing' stamp: 'ssa 8/11/2009 12:37'!\risCharacter\r^true! !\r!Character methodsFor: '*Ly' stamp: 'ssa 8/18/2009 12:29'!\rat: index\r\rindex > 1 ifTrue:[^super at: index].\r^self! !\r!Character methodsFor: '*Ly' stamp: 'ssa 8/18/2009 12:25'!\rdoesNotUnderstand: aMessage\r\"Hack DNU to make chars act like strings\"\r\r^self asString perform: aMessage selector withArguments: aMessage arguments! !\r!Character methodsFor: '*Ly' stamp: 'ssa 8/18/2009 12:28'!\rsize\r\r^1! !\r!CharacterScanner methodsFor: 'scanning' stamp: 'ssa 8/19/2008 21:22'!\rscanCharactersFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops displaying: foo\r\r^ self scanCharactersFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: 0! !\r!CharacterScanner methodsFor: 'accessing' stamp: 'ssa 8/19/2008 21:15'!\rdestX: x\r\rdestX := x! !\r!ClassDescription methodsFor: 'accessing method dictionary' stamp: 'ssa 10/8/2008 19:00'!\rallMethodsInCategory: aName \r\"Answer a list of all the method categories of the receiver and all its \rsuperclasses \"\r| aColl |\raColl _ OrderedCollection new.\rself withAllSuperclasses\r\tdo: [:aClass | aColl\r\t\t\taddAll: (aName = ClassOrganizer allCategory\r\t\t\t\t\tifTrue: [aClass organization allMethodSelectors]\r\t\t\t\t\tifFalse: [aClass organization listAtCategoryNamed: aName])].\r^ aColl asSet asSortedArray! !\r!Collection methodsFor: 'accessing' stamp: 'ssa 3/12/2010 17:57'!\ratRandom\r\"Answer a random element of the receiver.  Uses a shared random \rnumber generator owned by class Collection.  If you use this a lot, \rdefine your own instance of Random and use #atRandom:.  Causes \ran error if self has no elements.\"\r\r^ self atRandom: self class randomForPicking \r\r\"Examples:\r#('one' 'or' 'the' 'other') atRandom\r(1 to: 10) atRandom\r'Just pick one of these letters at random' atRandom\r#(3 7 4 9 21) asSet atRandom\t\t(just to show it also works for Sets)\r\"! !\r!Collection methodsFor: 'converting' stamp: ''!\rasString: aBlock withDelimiter: aDelimiter\r\"kwa -- 30 November 1988, Answer a string with each of the objects in the receiver (converted to strings by aBlock) separated by aDelimiter.\"\r\"KSC Extension\"\r\r| aStream |\rself isEmpty ifTrue: [^''].\raStream _ WriteStream on: (String new: 64).\rself do: [:each |\r\taStream nextPutAll: (aBlock value: each).\r\taStream nextPutAll: aDelimiter].\raStream skip: aDelimiter size negated.\r^aStream contents\r\r\"#(13 2 3) asString: [:each | (each * 2) printString] withDelimiter: ', '\"! !\r!Collection methodsFor: 'converting' stamp: ''!\rasStringWithDelimiter: aDelimiter\r\"kwa -- 13 May 1988, Answer a string of from the objects in the receiver separated by aDelimiter.\"\r\"KSC Extension\"\r\r| aStream |\rself isEmpty ifTrue: [^''].\raStream _ WriteStream on: (String new: 64).\rself do: [:each |\r\t(each isKindOf: String) \r\t\tifTrue: [aStream nextPutAll: each asString]\r\t\tifFalse: [each printOn: aStream].\r\taStream nextPutAll: aDelimiter].\raStream skip: aDelimiter size negated.\r^aStream contents\r\r\"#(a b 2 3) asStringWithDelimiter: ', '\"! !\r!Collection methodsFor: 'converting' stamp: ''!\rasText: aBlock withDelimiter: aDelimiter\r\"kwa -- 30 November 1988, Answer a text with each of the objects in the receiver (converted to texts by aBlock) separated by aDelimiter.\"\r\"KSC Extension\"\r\r| aDelimiterText first text |\rself isEmpty ifTrue: [^'' asText].\raDelimiterText _ aDelimiter asText.\rfirst _ true.\rself do: [:each |\r\tfirst \r\t\tifTrue: \r\t\t\t[text _ (aBlock value: each) asText.\r\t\t\tfirst _ false]\r\t\tifFalse:\r\t\t\t[text _ text, aDelimiterText, (aBlock value: each) asText]].\r^text\r\r\"(#(13 2 3) asText: [:each | (each * 2) printString asText allBold] withDelimiter: ', ') asDisplayText displayAt: Sensor cursorPoint\"! !\r!Collection methodsFor: 'enumerating' stamp: ''!\rcollect: aBlock if: aQualifyingBlock\r\"kwa -- 1 February 1989,\rEvaluate aQualifyingBlock with each of the values of the receiver as the argument.  If the result is true, collect the resulting values of aBlock (using the same value as the argument) into a collection that is like the receiver.  Answer the new collection.\"\r\"KSC Extension\"\r\r| newCollection |\rnewCollection _ self species new.\rself do: [:each | \r\t(aQualifyingBlock value: each)\r\t\tifTrue: [newCollection add: (aBlock value: each)]].\r^newCollection! !\r!Collection methodsFor: 'removing' stamp: 'ssa 9/9/2009 12:16'!\rremoveAll: aCollection ifAbsent:aBlock\r\"Remove each element of aCollection from the receiver. If successful for \reach, answer aCollection. Otherwise create an error notification.\rArrayedCollections cannot respond to this message.\"\r\raCollection do: [:each | self remove: each ifAbsent: aBlock].\r^ aCollection! !\r!Collection methodsFor: 'outlining' stamp: 'ssa 9/10/2009 13:47'!\rsubobjects\r\r^self! !\r!CharacterSet methodsFor: '*Ly' stamp: 'ssa 8/18/2009 12:50'!\raddAll: aCollection\r\raCollection do:[:char| self add: char]! !\r!CharacterSet methodsFor: '*Ly' stamp: 'ssa 8/18/2009 12:52'!\rremoveAll: aCollection\r\raCollection do:[:char| self remove: char]! !\r!ControlManager methodsFor: 'accessing' stamp: 'ssa 3/25/2010 16:14'!\ractiveControllerNoTerminate: aController andProcess: aProcess\r\"Set aController to be the currently active controller and aProcess to be \rthe the process that handles controller scheduling activities in the \rsystem. This message differs from activeController:andProcess: in that it \rdoes not send controlTerminate to the currently active controller.\"\r\rself inActiveControllerProcess\r\tifTrue: \r\t\t[aController~~nil\r\t\t\tifTrue: [(scheduledControllers includes: aController)\r\t\t\t\t\t\tifTrue: [self promote: aController]\r\t\t\t\t\t\tifFalse: [self error: 'Old controller not scheduled']].\r\t\tactiveController _ aController.\r\t\tactiveController == nil\r\t\t\tifFalse: [activeController controlInitialize].\r\t\tactiveControllerProcess _ aProcess.\r\t\tactiveControllerProcess resume]\r\tifFalse: \r\t\t['New active controller process must be set from old one, resetting...' print.\r\t\tself reset.\r\t\t] ! !\r!ControlManager methodsFor: 'scheduling' stamp: 'dmu 11/25/2008 00:19'!\rinActiveControllerProcess\r\"Answer whether the active scheduling process is the actual active \rprocess in the system.\"\r\r^activeControllerProcess == Processor thisProcess! !\r!ControlManager methodsFor: 'scheduling' stamp: 'ssa 3/2/2010 14:12'!\rinterruptName: labelString\r\"Create a Notifier on the active scheduling process with the given label. Make the Notifier the active controller.\"\r| suspendingList newActiveController |\r(suspendingList _ activeControllerProcess suspendingList) == nil\r\tifTrue: [activeControllerProcess == Processor thisProcess\r\t\t\t\tifTrue: [activeControllerProcess suspend]]\r\tifFalse: [suspendingList remove: activeControllerProcess ifAbsent:[].\r\t\t\tactiveControllerProcess offList].\r\ractiveController ~~ nil ifTrue: [\r\t\"Carefully de-emphasis the current window.\"\r\tactiveController view topView deEmphasizeForDebugger].\r\rnewActiveController _\r\t(Debugger\r\t\topenInterrupt: labelString \r\t\tonProcess: activeControllerProcess) controller.\rnewActiveController centerCursorInView.\rself activeController: newActiveController.\r! !\r!ControlManager methodsFor: 'scheduling' stamp: 'ssa 3/25/2010 16:17'!\rreset\r\"ssa - reset the window controller process\"\r| newProcess |\rnewProcess := [ScheduledControllers resetActiveController.\r\t\tScheduledControllers searchForActiveController] fixTemps newProcess priority: Processor userSchedulingPriority.\rnewProcess resume.\r\"lose the current process\"\r\"Processor terminateActive\"! !\r!ControlManager methodsFor: 'scheduling' stamp: 'dmu 11/25/2008 00:19'!\rresetActiveController\r\"When saving a morphic project whose parent is mvc, we need to set this up first\"\r\r\tactiveController := nil.\r\tactiveControllerProcess := Processor thisProcess.\r! !\r!ControlManager methodsFor: 'scheduling' stamp: 'dmu 11/25/2008 00:20'!\rscheduleActiveNoTerminate: aController \r\t\"Make aController be the active controller. Presumably the process that \r\trequested the new active controller wants to keep control to do more \r\tactivites before the new controller can take control. Therefore, do not \r\tterminate the currently active process.\"\r\r\tself schedulePassive: aController.\r\tself scheduled: aController\r\t\tfrom: Processor thisProcess! !\r!ControlManager methodsFor: 'scheduling' stamp: 'dmu 11/25/2008 00:20'!\rsearchForActiveController\r\t\"Find a scheduled controller that wants control and give control to it. If \r\tnone wants control, then see if the System Menu has been requested.\"\r\t| aController |\r\tactiveController := nil.\r\tactiveControllerProcess := Processor thisProcess.\r\tself activeController: self nextActiveController.\r\tProcessor terminateActive! !\r!ControlManager methodsFor: 'displaying' stamp: 'ssa 8/26/2008 08:55'!\rrestore: aRectangle below: index without: aView\r\"Restore all windows visible in aRectangle, but without aView\"\r| view | \rview := (scheduledControllers at: index) view.\rview == aView ifTrue: \r\t[index >= scheduledControllers size ifTrue: [^ self].\r\t^ self restore: aRectangle below: index+1 without: aView].\rview isNil ifTrue:[^self].\rview displayOn: ((BitBlt current toForm: Display) clipRect: aRectangle).\rindex >= scheduledControllers size ifTrue: [^ self].\r(aRectangle areasOutside: view windowBox) do:\r\t[:rect | self restore: rect below: index + 1 without: aView]! !\r!Controller methodsFor: 'basic control sequence' stamp: 'ssa 5/11/2010 16:45'!\rcontrolLoop \r\t\"Sent by Controller|startUp as part of the standard control sequence. \r\tController|controlLoop sends the message Controller|isControlActive to test \r\tfor loop termination. As long as true is returned, the loop continues. \r\tWhen false is returned, the loop ends. Each time through the loop, the \r\tmessage Controller|controlActivity is sent.\"\r\r\t[self isControlActive] whileTrue: [\"self killExtraUIProcesses.\"\r\t\tself interActivityPause. self controlActivity. Processor yield].\r\tself lastProcessRunningMe: nil! !\r!Controller methodsFor: 'basic control sequence' stamp: 'dmu 3/22/2010 14:25'!\rinterActivityPause\r\t\"if we are looping quickly, insert a short delay.  Thus if we are just doing UI stuff, we won't take up much CPU\"\r\t| currentTime wait |\r\t[RVMTester isRVM ifTrue: [Processor yield. ^ self].].\r\tMinActivityLapse ifNotNil: [\r\t\tlastActivityTime ifNotNil: [ \r\t\t\tcurrentTime := Time millisecondClockValue.\r\t\t\twait := lastActivityTime + MinActivityLapse - currentTime.\r\t\t\twait > 0 ifTrue: [ \r\t\t\t\twait <= MinActivityLapse  \"big waits happen after a snapshot\"\r\t\t\t\t\tifTrue: [DisplayScreen checkForNewScreenSize.\r\t\t\t\t\t\t\"(Delay forMilliseconds: wait) wait \"]. ]. ]. ].\r\r\tlastActivityTime := Time millisecondClockValue.! !\r!Controller methodsFor: '*Ly' stamp: 'dmu 3/29/2010 00:21'!\rkillExtraUIProcesses\r\t| p lp |\rp _ Processor thisProcess.\r\tlp _ self lastProcessRunningMe.\r\tp == lp ifTrue: [self killCounter: 0. ^ self].\r\tlp isRunning ifTrue: [\r\t\tself killCounter < 5  ifTrue: [\r\t\t\tself killCounter: self killCounter + 1.\r\t\t\t^ self.\r\t\t].\r\t\tself killCounter: 0.\r\t\tTranscript cr;show:'Controller>>killExtraUIProcesses working, killing process hash=',p identityHash printString.\r\t\tp terminate\r\t]\r\t\r\"1 foo\"\r\"2 timesRepeat:[[self halt]fork]\"! !\r!Controller methodsFor: 'accessing' stamp: 'dmu 3/26/2010 14:59'!\rkillCounter\r\"Answer the value of killCounter\"\r\rkillCounter isNil ifTrue:[self killCounter: 0].\r^ killCounter! !\r!Controller methodsFor: 'accessing' stamp: 'dmu 3/26/2010 14:59'!\rkillCounter: anObject\r\"Set the value of killCounter\"\r\rkillCounter _ anObject! !\r!Controller methodsFor: 'accessing' stamp: 'ssa 3/2/2010 17:18'!\rlastActivityTime\r\"Answer the value of lastActivityTime\"\r\rlastActivityTime isNil ifTrue:[self lastActivityTime: nil].\r^ lastActivityTime! !\r!Controller methodsFor: 'accessing' stamp: 'ssa 3/2/2010 17:18'!\rlastActivityTime: anObject\r\"Set the value of lastActivityTime\"\r\rlastActivityTime _ anObject! !\r!Controller methodsFor: 'accessing' stamp: 'ssa 3/2/2010 17:28'!\rlastProcessRunningMe\r\"Answer the value of lastProcessRunningMe\"\r\rlastProcessRunningMe isNil ifTrue:[self lastProcessRunningMe: Processor thisProcess].\r^ lastProcessRunningMe! !\r!Controller methodsFor: 'accessing' stamp: 'ssa 3/2/2010 17:18'!\rlastProcessRunningMe: anObject\r\"Set the value of lastProcessRunningMe\"\r\rlastProcessRunningMe _ anObject! !\r!CopyReader methodsFor: 'reading' stamp: ''!\rread: aClass\r\"Ignore aClass and grab the object directly from the stream. aClass is typically Integer, Float, Symbol, etc.  Assume the object was put on the stream using CopyWriter>store: (look there for more info).\"\r\r| anObject |\ranObject _ stream next.\rposition _ position + 1.\r^anObject! !\r!CopyReader methodsFor: 'testing' stamp: ''!\risCopier\r\r^true! !\r!CopyWriter methodsFor: 'testing' stamp: ''!\risCopier\r\r^true! !\r!CopyWriter methodsFor: 'writing' stamp: ''!\rcanCopy: anObject\r\"Answer true only if anObject is in the copySet (or if there is no copySet).  This can be used by objects which are connected to objects which are not to be copied.\"\r\r^copySet == nil\r\tifTrue:[true]\r\tifFalse:[copySet includes: anObject]! !\r!CopyWriter methodsFor: 'writing' stamp: ''!\rcopySet: aCollection\r\"Set the set of objects that should be copied.\"\r\rcopySet _ aCollection! !\r!CopyWriter methodsFor: 'writing' stamp: ''!\rstore: anObject\r\"Put anObject directly on the Stream... don't convert it to an ascii String since it's not going to a file.  anObject will typically be a Symbol, Number, etc.\"\r\rstream nextPut: anObject.\rposition _ position + 1! !\r!Delay methodsFor: 'as yet unclassified' stamp: 'dmu 5/10/2009 02:54'!\rspinWait\r| t |\rt _ Time millisecondClockValue + delayDuration.\r[t < Time millisecondClockValue] whileTrue: [Processor yield]! !\r!DisplayObject methodsFor: 'displaying-generic' stamp: 'ssa 9/4/2009 10:47'!\rdisplayOn: aDisplayMedium at: aDisplayPoint \r\"Display the receiver located at aDisplayPoint with default settings for \rrule and halftone.\"\r\rself displayOn: aDisplayMedium\r\tat: aDisplayPoint\r\tclippingBox: aDisplayMedium boundingBox\r\trule: Form paint\r\tfillColor: nil! !\r!DisplayObject methodsFor: 'displaying-generic' stamp: 'ssa 12/17/2009 16:54'!\rfollowCursor\r\"Just show the Form following the mouse. 6/21/96 tk\"\rCursor blank showWhile:\r\t[self follow: [Sensor cursorPoint] while: [Sensor noButtonPressed]].\rSensor waitNoButton\r! !\r!DisplayMedium methodsFor: 'bordering' stamp: 'ssa 11/30/2009 13:50'!\rborder: aRectangle width: borderWidth fillColor: aHalfTone  clippingBox: clipRect\r\"Paint a border whose rectangular area is defined by aRectangle. The \rwidth of the border of each side is borderWidth. Uses aHalfTone for \rdrawing the border.\"\r\rself border: aRectangle\r\twidthRectangle: \r\t\t(Rectangle\r\t\t\tleft: borderWidth\r\t\t\tright: borderWidth\r\t\t\ttop: borderWidth\r\t\t\tbottom: borderWidth)\r\trule: Form over\r\tfillColor: aHalfTone\r\t clippingBox: clipRect! !\r!DisplayMedium methodsFor: 'bordering' stamp: 'ssa 11/30/2009 13:50'!\rborder: aRectangle width: borderWidth rule: combinationRule fillColor: aHalfTone  clippingBox: clipRect\r\"Paint a border whose rectangular area is defined by aRectangle. The \rwidth of the border of each side is borderWidth. Uses aHalfTone for \rdrawing the border.\"\r\rself border: aRectangle\r\twidthRectangle: \r\t\t(Rectangle\r\t\t\tleft: borderWidth\r\t\t\tright: borderWidth\r\t\t\ttop: borderWidth\r\t\t\tbottom: borderWidth)\r\trule: combinationRule\r\tfillColor: aHalfTone\r\t clippingBox: clipRect! !\r!DisplayMedium methodsFor: 'bordering' stamp: 'ssa 11/30/2009 13:42'!\rborder: aRectangle widthRectangle: insets rule: combinationRule fillColor: aHalfTone clippingBox: clipRect\r\"Paint a border whose rectangular area is defined by aRectangle. The \rwidth of each edge of the border is determined by the four coordinates \rof insets. Uses aHalfTone and combinationRule for drawing the border.\"\r\r(aRectangle areasOutside: (aRectangle insetBy: insets)) do:\r\t[:edgeStrip | self fill: edgeStrip rule: combinationRule fillColor: aHalfTone  clippingBox: clipRect]! !\r!DisplayMedium methodsFor: 'bordering' stamp: 'ssa 12/18/2009 06:38'!\routlined\r\rself border: self boundingBox width: 1! !\r!DisplayText methodsFor: 'accessing' stamp: 'ssa 8/27/2009 11:17'!\rnumberOfLines \r\"Answer the number of lines of text in the receiver.\"\r\r^self text lineCount! !\r!DisplayText methodsFor: 'converting' stamp: 'ssa 1/20/2010 10:34'!\rasParagraphWithStyle: aTextStyle\r\"Answer a Paragraph whose text  is  identical to that of the \rreceiver.\"\r| para |\rpara _ Paragraph withText: text style: aTextStyle.\rpara foregroundColor: foreColor backgroundColor: backColor.\rbackColor isTransparent ifTrue: [para rule: Form paint].\r^ para! !\r!DisplayText methodsFor: 'testing' stamp: 'ssa 1/20/2010 11:00'!\risEmpty\r\r^self text isEmpty! !\r!False methodsFor: 'debugging' stamp: 'ssa 3/11/2010 11:53'!\rhaltIfFalse\r\rself halt\r\r! !\r!Form methodsFor: 'accessing' stamp: 'ssa 11/27/2009 00:23'!\rbottomCenter\r\r^self width//2@self height ! !\r!Form methodsFor: 'accessing' stamp: 'ssa 11/27/2009 00:21'!\rbottomLeft\r\r^0@self height! !\r!Form methodsFor: 'accessing' stamp: 'ssa 11/27/2009 00:21'!\rbottomRight\r\r^self extent! !\r!Form methodsFor: 'accessing' stamp: 'ssa 8/25/2009 13:22'!\rdisplayBox \r\r^Rectangle origin: self offset extent: width @ height! !\r!Form methodsFor: 'accessing' stamp: 'ssa 11/27/2009 00:22'!\rleftCenter\r\r^0@(self height//2)! !\r!Form methodsFor: 'accessing' stamp: 'ssa 11/27/2009 00:22'!\rrightCenter\r\r^self width @ (self height//2)! !\r!Form methodsFor: 'accessing' stamp: 'ssa 11/27/2009 00:23'!\rtopCenter\r\r^self width//2@0 ! !\r!Form methodsFor: 'accessing' stamp: 'ssa 11/27/2009 00:21'!\rtopLeft\r\r^0@0! !\r!Form methodsFor: 'accessing' stamp: 'ssa 11/27/2009 00:21'!\rtopRight\r\r^self width@0! !\r!Form methodsFor: 'converting' stamp: 'ssa 8/28/2009 16:18'!\rasOpaqueForm\r\r^OpaqueForm figure: self shape: self! !\r!Form methodsFor: 'converting' stamp: 'ssa 8/28/2009 11:32'!\rwrapAround: aPoint\r\"Answer a new form which contains the image of the receiver, but \rtranslated by deltaPoint, with wrap-around.  Used for realigning \rhalftone masks.  Assumes the receiver is 32x32 with zero offset.\"\r\r\"[Sensor anyButtonPressed] whileFalse:\r\t[((Cursor normal wrapAround: Sensor cursorPoint)\r\t\tmagnifyBy: 8) displayAt: 100@100]\"\r\r| newForm delta |\rnewForm _ Form extent: (width@height) depth: 1..\rdelta _ (aPoint x\\\\32)@(aPoint y\\\\32).\rdelta = (0@0) ifTrue: [^self].\rself displayOn: newForm at: delta-(32@32) clippingBox: newForm boundingBox rule: Form paint fillColor: nil.\rself displayOn: newForm at: delta-(32@0) clippingBox: newForm boundingBox rule: Form paint fillColor: nil.\rself displayOn: newForm at: delta-(0@32) clippingBox: newForm boundingBox rule: Form paint fillColor: nil.\rself displayOn: newForm at: delta clippingBox: newForm boundingBox rule: Form paint fillColor: nil.\r^newForm! !\r!Form methodsFor: 'displaying' stamp: 'ssa 9/4/2009 09:59'!\rdisplayOn: aDisplayMedium at: aDisplayPoint clippingBox: clipRectangle rule: rule fillColor: aForm\r\raDisplayMedium copyBits: self boundingBox\r\tfrom: self\r\tat: aDisplayPoint + self offset\r\tclippingBox: clipRectangle \r\trule: rule\r\tfillColor: aForm\r\tmap: (self colormapIfNeededFor: aDisplayMedium).\r! !\r!Form methodsFor: 'displaying' stamp: 'ssa 9/4/2009 15:45'!\rdisplayTranslucentOn: aDisplayMedium at: aDisplayPoint clippingBox: clipRectangle\r((aDisplayMedium isKindOf:Form) ifTrue:[aDisplayMedium]ifFalse:[aDisplayMedium displayMedium])\r\tpaintBits: self  at: aDisplayPoint + self offset clippingBox: clipRectangle translucent: 0.3! !\r!Form methodsFor: 'displaying' stamp: 'ssa 9/4/2009 15:32'!\rpaintBits: sourceForm at: destOrigin clippingBox: aRect translucent: factor\r\"Make up a BitBlt table and copy the bits with the given colorMap.\"\r(BitBlt current destForm: self\r\tsourceForm: sourceForm\r\thalftoneForm: nil\r\tcombinationRule: 31\r\tdestOrigin: destOrigin\r\tsourceOrigin: 0@0\r\textent: sourceForm extent\r\tclipRect: aRect)\r\tcopyBitsTranslucent: ((0 max: (factor*255.0) asInteger) min: 255)\r\"\r| f f2 f3 | f _ Form fromUser. f replaceColor:  (Color r: 0.8 g: 1.0 b: 0.599) withColor: Color transparent.\rf2 _ Form fromDisplay: (0@0 extent: f extent). f3 _ f2 deepCopy.\r0.0 to: 1.0 by: 1.0/32 do:\r[:t | f3 _ f2 deepCopy. f3 paintBits: f at: 0@0 translucent: t.\rf3 displayAt: 0@0. (Delay forMilliseconds: 100) wait].\r\"! !\r!Form methodsFor: 'filling' stamp: 'ssa 11/30/2009 13:30'!\rfill: aRectangle rule: anInteger fillColor: aForm  clippingBox: clipRect\r\"Replace a rectangular area of the receiver with the pattern described by aForm \raccording to the rule anInteger.\"\r\r\"Display fill: (300@300 extent: 300@100) rule: Form paint fillColor: Color red.\rDisplay fill: (300@300 extent: 300@100) rule: Form paint fillColor: Color green clippingBox: (300@300 extent: 150@100)\"\r\r| bb |\rbb _ BitBlt current toForm: self.\rbb clipRect: clipRect.\rbb\r\tcopy: aRectangle\r\tfrom: 0@0 in: nil\r\tfillColor: aForm rule: anInteger! !\r!Form methodsFor: 'image manipulation' stamp: 'ssa 12/17/2009 16:16'!\rerase\r\rself eraseInside: self boundingBox! !\r!Form methodsFor: 'image manipulation' stamp: 'ssa 12/17/2009 16:26'!\reraseInside: aRect\r\"Erase a transparent rectangular 'hole' in me\"\r\r\"  | form|\rform _ Form extent:100@100 depth: Display depth.\rform fillColor: Color blue.\rform eraseInside: (20@20 extent:60@60).\rform followCursor\"\r\r| eraser |\reraser _ Form extent: self extent depth:1.\reraser fill: aRect fillColor: Color black.\rself eraseShape: eraser! !\r!Form methodsFor: 'image manipulation' stamp: 'ssa 4/10/2009 23:42'!\rnextLifeGeneration\r\"Compute next generation by computing neighbor counts.\rThese are tallied in nbr1, nbr2, nbr4.\"\r| all delta nbr1 nbr2 nbr4 carry2 carry4 |\rall _ 0@0 extent: self extent.\rnbr1 _ Form extent: self extent.\rnbr2 _ Form extent: self extent.\rnbr4 _ Form extent: self extent.\rcarry2 _ Form extent: self extent.\rcarry4 _ Form extent: self extent.\r\rnbr1 fillWhite.  nbr2 fillWhite.  nbr4 fillWhite.\r1 to: 8 do:                   \"Three-bit add for each shift of self\"\r    [:i | delta _ (i+4\\\\9//3 - 1)@(i+4\\\\3 - 1).  \"8 neighbor deltas\"\r    carry2 copy: all from: nbr1 to: 0@0 rule: Form over.\r    carry2 copy: all from: self to: delta rule: Form and. \"carry 2\"\r    nbr1 copy: all from: self to: delta rule: Form reverse.   \"sum 1\" \"(reverse is xor)\"\r    carry4 copy: all from: nbr2 to: 0@0 rule: Form over.\r    carry4 copy: all from: carry2 to: 0@0 rule: Form and.  \"carry 4\"\r    nbr2 copy: all from: carry2 to: 0@0 rule: Form reverse.    \"sum 2\"\r    nbr4 copy: all from: carry4 to: 0@0 rule: Form reverse].    \"sum 4\"\r\"Next gen = ((2s AND self) OR (2s AND 1s)) AND (NOT 4s)\"\rself copy: all from: nbr2 to: 0@0 rule: Form and.\rnbr1 copy: all from: nbr2 to: 0@0 rule: Form and.\rself copy: all from: nbr1 to: 0@0 rule: Form under.\rself copy: all from: nbr4 to: 0@0 rule: Form erase.\rself borderWidth: 1 fillColor: Color white.  \"trim edges\"! !\r!Form methodsFor: 'image manipulation' stamp: 'ssa 4/10/2009 23:39'!\rnextLifeGenerationBlueBook\r\"|f| f_Form fromUser.\r100 timesRepeat:[f nextLifeGeneration display]\"\r| nbr1 nbr2 nbr4 carry2 carry4 all delta |\rnbr1 := Form extent: self extent.\rnbr2 := Form extent: self extent.\rnbr4 := Form extent: self extent.\rcarry2 := Form extent: self extent.\rcarry4 := Form extent: self extent.\rall := self boundingBox.\r1 to: 8\r\tdo: [:i | \r\t\t\"delta is the offset of the eight neighboring cells\"\r\t\tdelta := (#(-1 0 1 1 1 0 1 -1 ) at: i)\r\t\t\t\t\t@ (#(1 -1 -1 0 1 1 1 0 ) at: i).\r\t\tcarry2\r\t\t\tcopy: all\r\t\t\tfrom: 0 @ 0\r\t\t\tin: nbr1\r\t\t\trule: 3.\r\t\tcarry2\r\t\t\tcopy: all\r\t\t\tfrom: delta\r\t\t\tin: self\r\t\t\trule: 1.\r\t\t\"AND for carry into 2\"\r\t\tnbr1\r\t\t\tcopy: all\r\t\t\tfrom: delta\r\t\t\tin: self\r\t\t\trule: 6.\r\t\t\"XOR for sum 1\"\r\t\tcarry4\r\t\t\tcopy: all\r\t\t\tfrom: 0 @ 0\r\t\t\tin: nbr2\r\t\t\trule: 3.\r\t\tcarry4\r\t\t\tcopy: all\r\t\t\tfrom: 0 @ 0\r\t\t\tin: carry2\r\t\t\trule: 1.\r\t\t\"AND for carry into 4\"\r\t\tnbr2\r\t\t\tcopy: all\r\t\t\tfrom: 0 @ 0\r\t\t\tin: carry2\r\t\t\trule: 6.\r\t\t\"XOR for sum 2\"\r\t\tnbr4\r\t\t\tcopy: all\r\t\t\tfrom: 0 @ 0\r\t\t\tin: carry4\r\t\t\trule: 6].\r\"XOR for sum 4 (ignore carry into 8)\"\rself\r\tcopy: all\r\tfrom: 0 @ 0\r\tin: nbr2\r\trule: 1.\rnbr1\r\tcopy: all\r\tfrom: 0 @ 0\r\tin: nbr2\r\trule: 1.\rself\r\tcopy: all\r\tfrom: 0 @ 0\r\tin: nbr1\r\trule: 7.\rself\r\tcopy: all\r\tfrom: 0 @ 0\r\tin: nbr4\r\trule: 4\r\"compute next generation\"! !\r!Form methodsFor: 'scaling, rotation' stamp: 'ssa 8/31/2009 13:43'!\rrotateBy: deg smoothing: cellSize\r\"Rotate the receiver by the indicated number of degrees.\"\r\"rot is the destination form, big enough for any angle.\"\r| side rot warp r1 pts p center dim |\rside _ 1 + ((width*width) + (height*height)) asFloat sqrt asInteger.\r(#(0 90 180 270 360) includes: deg abs) ifTrue:[dim _ self extent]ifFalse:[dim _ side@side].\rrot _ Form extent: dim depth: self depth.\rcenter _ rot extent // 2.\r\r\"Now compute the sin and cos constants for the rotation angle.\" \rwarp _ (WarpBlt current toForm: rot)\r\tsourceForm: self;\r\tcolorMap: (self colormapIfNeededFor: rot);\r\tcellSize: cellSize;  \"installs a new colormap if cellSize > 1\"\r\tcombinationRule: Form over.\rr1 _ rot boundingBox align: center with: self boundingBox center.\r\rpts _ r1 innerCorners collect:\r\t[:pt | p _ pt - r1 center.\r\t(r1 center x asFloat + (p x asFloat*deg degreeCos) + (p y asFloat*deg degreeSin)) @\r\t(r1 center y asFloat - (p x asFloat*deg degreeSin) + (p y asFloat*deg degreeCos))].\rwarp copyQuad: pts toRect: rot boundingBox.\r^ rot\r\"\r| a f |  f _ Form fromDisplay: (0@0 extent: 200@200).  a _ 0.\r[Sensor anyButtonPressed] whileFalse:\r[((Form fromDisplay: (Sensor cursorPoint extent: 130@66))\r\trotateBy: (a _ a+5) smoothing: 2) display].\rf display\r\"! !\r!Form methodsFor: 'scaling, rotation' stamp: 'ssa 11/30/2009 12:57'!\rscaledToSize: newExtent\r\r| scale |\r\rnewExtent = self extent ifTrue: [^self].\rscale _ (newExtent x / self width) @ (newExtent y / self height).\r^self magnify: self boundingBox by: scale smoothing: 2.\r! !\r!Form methodsFor: 'printing' stamp: ''!\rarchiveOn: anArchiver\r\"Always use #storeOn: and #readFrom:\"\r\r\"\tanArchiver isCopier\r\tifFalse: [^super archiveOn: anArchiver].\"\ranArchiver\r\tstoreObject: self;\r\tstoreClass: self class;\r\tstore: self.! !\r!ColorForm methodsFor: 'private' stamp: 'ssa 11/26/2009 22:44'!\rsetExtent: extent depth: bitsPerPixel\r\"Create a virtual bit map with the given extent and bitsPerPixel.\"\r\r| bpp |\rbpp _ bitsPerPixel.\rbpp > 8 ifTrue: [self error: 'ColorForms only support depths up to 8 bits, proceed for 8 bits'.\r\tbpp _ 8].\rsuper setExtent: extent depth: bpp.\r! !\r!DisplayScreen methodsFor: 'displaying' stamp: 'dmu 1/25/2010 11:25'!\rdrawDot5At: point1\r\"Display drawDot5At: 100@100\"\rDot5 ifNil: [Dot5 _ Form dotOfSize:5].\rDot5 displayAt: point1! !\r!DisplayScreen methodsFor: 'displaying' stamp: 'dmu 3/23/2010 00:02'!\rdrawLineFrom: point1 to: point2 color: aColor\r\"Display drawLineFrom: Point fromUser to: Point fromUser color: Color fromUser\"\r\"Display drawLineFrom: 0@0 to: 200@200 color: Color black\"\r\"Display drawLineFrom: 0@0 to: 200@200 color: Color white\"\rDot1 ifNil: [Dot1 _ Form dotOfSize:1].\rself drawLine: Dot1 from: point1 to: point2 clippingBox: self boundingBox rule: Form paint fillColor: aColor ! !\r!DisplayScreen methodsFor: 'displaying' stamp: 'dmu 1/25/2010 11:27'!\reraseDot5At: point1\r\"Display eraseDot5At: 100@100\"\rBlank5 ifNil: [Blank5 _ (Form dotOfSize:5) fillWhite].\rBlank5 displayAt: point1! !\r!DisplayScreen methodsFor: 'displaying' stamp: 'dmu 3/23/2010 00:03'!\reraseLineFrom: point1 to: point2 color: aColor\r\"Display eraseLineFrom: Point fromUser to: Point fromUser color: Color fromUser\"\r\"Display eraseLineFrom: 0@0 to: 200@200 color: Color black\"\r\"Display eraseLineFrom: 0@0 to: 200@200 color: Color white\"\rDot1 ifNil: [Dot1 _ Form dotOfSize:1].\rself drawLine: Dot1 from: point1 to: point2 clippingBox: self boundingBox rule: Form erase fillColor: aColor ! !\r!DisplayScreen methodsFor: 'displaying' stamp: 'ssa 8/23/2009 15:06'!\routline: rectBlock do: effectBlock while: durationBlock width: borderWidth halftone: halftone\r\"Display an evolving rectangle dynamically.\rrectBlock supplies a rectangle, durationBlock supplies true, then false to terminate.\reffectBlock is executed at each iteration.\" \r\r| oldRect edges rect | \roldRect _ rectBlock value rounded.\redges _ oldRect areasOutside: (oldRect insetBy: borderWidth).\redges do: [:edge | self fill: edge rule: Form reverse fillColor: halftone].\r[durationBlock value] whileTrue:\r\t[rect _ rectBlock value rounded.\r\trect = oldRect\r\t\tifFalse:\r\t\t\t[edges do: [:edge | self fill: edge rule: Form reverse fillColor: halftone].\r\t\t\teffectBlock value.\r\t\t\tedges _ rect areasOutside: (rect insetBy: borderWidth).\r\t\t\tedges do: [:edge | self fill: edge rule: Form reverse fillColor: halftone].\r\t\t\toldRect _ rect]].\redges do: [:edge | self fill: edge rule: Form reverse fillColor: halftone].\r^ oldRect! !\r!DisplayScreen methodsFor: 'displaying' stamp: 'ssa 8/23/2009 15:05'!\routline: rectBlock while: durationBlock width: borderWidth halftone: halftone\r\"Display an evolving rectangle dynamically.\rrectBlock supplies a rectangle, durationBlock supplies true, then false to \rterminate.\" \r\r^self outline: rectBlock do: [] while: durationBlock width: borderWidth halftone: halftone! !\r!DisplayScreen methodsFor: 'other' stamp: 'ssa 8/24/2009 10:14'!\rboundingBox\rclippingBox == nil\r\tifTrue: [self clippingBox: super boundingBox].\r^ clippingBox copy! !\r!DisplayScreen methodsFor: 'other' stamp: 'ssa 8/24/2009 09:59'!\rclippingTo: aRect do: aBlock\r\"Display clippingTo: Rectangle fromUser do:\r[ScheduledControllers restore: Display fullBoundingBox]\"\r| saveClip |\rsaveClip _ clippingBox.\rself clippingBox: aRect.\raBlock value.\rself clippingBox: saveClip! !\r!DisplayScreen methodsFor: 'other' stamp: 'ssa 8/24/2009 09:59'!\rfullScreen   \"Display fullScreen\"\r\rScreenSave notNil ifTrue: [Display _ ScreenSave].\rself clippingBox: super boundingBox! !\r!DisplayScreen methodsFor: 'private' stamp: 'ssa 8/24/2009 10:00'!\rcopyFrom: aForm\r\"Take on all state of aForm, with complete sharing\"\r\rsuper copyFrom: aForm.\rself clippingBox: super boundingBox! !\r!DisplayScreen methodsFor: 'private' stamp: 'ssa 8/24/2009 10:00'!\rsetExtent: aPoint depth: bitsPerPixel  \"DisplayScreen startUp\"\r\"This method is critical.  If the setExtent fails, there will be no\rproper display on which to show the error condition...\"\r\"ar 5/1/1999: ... and that is exactly why we check for the available display depths first.\"\r\r\"RAA 27 Nov 99 - if depth and extent are the same and acceptable, why go through this.\ralso - record when we change so worlds can tell if it is time to repaint\"\r\r(depth == bitsPerPixel and: [aPoint = self extent and: \r\t\t\t\t[self supportsDisplayDepth: bitsPerPixel]]) ifFalse: [\r\tbits _ nil.  \"Free up old bitmap in case space is low\"\r\tDisplayChangeSignature _ (DisplayChangeSignature ifNil: [0]) + 1.\r\t(self supportsDisplayDepth: bitsPerPixel)\r\t\tifTrue:[super setExtent: aPoint depth: bitsPerPixel]\r\t\tifFalse:[\"Search for a suitable depth\"\r\t\t\t\tsuper setExtent: aPoint depth: self findAnyDisplayDepth].\r].\rself clippingBox: super boundingBox! !\r!DisplayScreen methodsFor: 'accessing' stamp: 'ssa 8/24/2009 10:10'!\rclippingBox: aRect\rclippingBox _ aRect\r! !\r!ImageReadWriter methodsFor: 'accessing' stamp: ''!\rnextImage\r\"Dencoding an image on stream and answer the image.\"\r\r^self subclassResponsibility! !\r!ImageReadWriter methodsFor: 'accessing' stamp: ''!\rnextPutImage: anImage\r\"Encoding anImage on stream.\"\r\r^self subclassResponsibility! !\r!ImageReadWriter methodsFor: 'stream access' stamp: ''!\ratEnd\r\r^stream atEnd! !\r!ImageReadWriter methodsFor: 'stream access' stamp: 'sd 1/30/2004 15:18'!\rclose\r\rstream close! !\r!ImageReadWriter methodsFor: 'stream access' stamp: ''!\rcontents\r\r^stream contents! !\r!ImageReadWriter methodsFor: 'stream access' stamp: ''!\rcr\r\r^stream nextPut: Character cr asInteger! !\r!ImageReadWriter methodsFor: 'stream access' stamp: ''!\rlf\r\"PPM and PBM are used LF as CR.\"\r\r^stream nextPut: Character lf asInteger! !\r!ImageReadWriter methodsFor: 'stream access' stamp: ''!\rnext\r\r^stream next! !\r!ImageReadWriter methodsFor: 'stream access' stamp: ''!\rnext: size\r\r^stream next: size! !\r!ImageReadWriter methodsFor: 'stream access' stamp: ''!\rnextLong\r\"Read a 32-bit quantity from the input stream.\"\r\r^(stream next bitShift: 24) + (stream next bitShift: 16) +\r\t(stream next bitShift: 8) + stream next! !\r!ImageReadWriter methodsFor: 'stream access' stamp: ''!\rnextLongPut: a32BitW\r\"Write out a 32-bit integer as 32 bits.\"\r\rstream nextPut: ((a32BitW bitShift: -24) bitAnd: 16rFF).\rstream nextPut: ((a32BitW bitShift: -16) bitAnd: 16rFF).\rstream nextPut: ((a32BitW bitShift: -8) bitAnd: 16rFF).\rstream nextPut: (a32BitW bitAnd: 16rFF).\r^a32BitW! !\r!ImageReadWriter methodsFor: 'stream access' stamp: ''!\rnextPut: aByte\r\r^stream nextPut: aByte! !\r!ImageReadWriter methodsFor: 'stream access' stamp: ''!\rnextPutAll: aByteArray\r\r^stream nextPutAll: aByteArray! !\r!ImageReadWriter methodsFor: 'stream access' stamp: ''!\rnextWord\r\"Read a 16-bit quantity from the input stream.\"\r\r^(stream next bitShift: 8) + stream next! !\r!ImageReadWriter methodsFor: 'stream access' stamp: ''!\rnextWordPut: a16BitW\r\"Write out a 16-bit integer as 16 bits.\"\r\rstream nextPut: ((a16BitW bitShift: -8) bitAnd: 16rFF).\rstream nextPut: (a16BitW bitAnd: 16rFF).\r^a16BitW! !\r!ImageReadWriter methodsFor: 'stream access' stamp: 'tao 10/23/97 18:00'!\rpeekFor: aValue\r\r^stream peekFor: aValue! !\r!ImageReadWriter methodsFor: 'stream access' stamp: ''!\rposition\r\r^stream position! !\r!ImageReadWriter methodsFor: 'stream access' stamp: ''!\rposition: anInteger\r\r^stream position: anInteger! !\r!ImageReadWriter methodsFor: 'stream access' stamp: ''!\rsize\r\r^stream size! !\r!ImageReadWriter methodsFor: 'stream access' stamp: ''!\rskip: anInteger\r\r^stream skip: anInteger! !\r!ImageReadWriter methodsFor: 'stream access' stamp: ''!\rspace\r\r^stream nextPut: Character space asInteger! !\r!ImageReadWriter methodsFor: 'stream access' stamp: ''!\rtab\r\r^stream nextPut: Character tab asInteger! !\r!ImageReadWriter methodsFor: 'private' stamp: ''!\rchangePadOfBits: bits width: width height: height depth: depth from: oldPad\rto: newPad\r\"Change padding size of bits.\"\r\r| srcRowByteSize dstRowByteSize newBits srcRowBase rowEndOffset |\r(#(8 16 32) includes: oldPad)\r\tifFalse: [^self error: 'Invalid pad: ', oldPad printString].\r(#(8 16 32) includes: newPad)\r\tifFalse: [^self error: 'Invalid pad: ', newPad printString].\rsrcRowByteSize _ width * depth + oldPad - 1 // oldPad * (oldPad / 8).\rsrcRowByteSize * height = bits size\r\tifFalse: [^self error: 'Incorrect bitmap array size.'].\rdstRowByteSize _ width * depth + newPad - 1 // newPad * (newPad / 8).\rnewBits _ ByteArray new: dstRowByteSize * height.\rsrcRowBase _ 1.\rrowEndOffset _ dstRowByteSize - 1.\r1 to: newBits size by: dstRowByteSize do:\r\t[:dstRowBase |\r\tnewBits replaceFrom: dstRowBase\r\t\tto: dstRowBase + rowEndOffset\r\t\twith: bits\r\t\tstartingAt: srcRowBase.\r\tsrcRowBase _ srcRowBase + srcRowByteSize].\r^newBits! !\r!ImageReadWriter methodsFor: 'private' stamp: ''!\rhasMagicNumber: aByteArray\r| position |\rposition _ stream position.\r((stream size - position) >= aByteArray size and:\r[(stream next: aByteArray size)  = aByteArray])\r\tifTrue: [^true].\rstream position: position.\r^false! !\r!ImageReadWriter methodsFor: 'private' stamp: 'sd 1/30/2004 15:18'!\ron: aStream\r(stream _ aStream) reset.\rstream binary.\r\"Note that 'reset' makes a file be text.  Must do this after.\"! !\r!ImageReadWriter methodsFor: 'private' stamp: ''!\runpackBits: bits depthTo8From: depth with: width height: height pad: pad\r\"Unpack bits of depth 1, 2, or 4 image to it of depth 8 image.\"\r\r| bitMask pixelInByte bitsWidth upBitsWidth stopWidth\r trailingSize upBits bitIndex upBitIndex val |\r(#(1 2 4) includes: depth)\r\tifFalse: [^self error: 'depth must be 1, 2, or 4'].\r(#(8 16 32) includes: pad)\r\tifFalse: [^self error: 'pad must be 8, 16, or 32'].\rbitMask _ (1 bitShift: depth) - 1.\rpixelInByte _ 8 / depth.\rbitsWidth _ width * depth + pad - 1 // pad * (pad / 8).\rupBitsWidth _ width * 8 + pad - 1 // pad * (pad / 8).\rstopWidth _ width * depth + 7 // 8.\rtrailingSize _ width - (stopWidth - 1 * pixelInByte).\rupBits _ ByteArray new: upBitsWidth * height.\r1 to: height do: [:i |\r\tbitIndex _ i - 1 * bitsWidth.\r\tupBitIndex _ i - 1 * upBitsWidth.\r\t1 to: stopWidth - 1 do: [:j |\r\t\tval _ bits at: (bitIndex _ bitIndex + 1).\r\t\tupBitIndex _ upBitIndex + pixelInByte.\r\t\t1 to: pixelInByte do: [:k |\r\t\t\tupBits at: (upBitIndex - k + 1) put: (val bitAnd: bitMask).\r\t\t\tval _ val bitShift: depth negated]].\r\tval _ (bits at: (bitIndex _ bitIndex + 1))\r\t\t\tbitShift: depth negated * (pixelInByte - trailingSize).\r\tupBitIndex _ upBitIndex + trailingSize.\r\t1 to: trailingSize do: [:k |\r\t\tupBits at: (upBitIndex - k + 1) put: (val bitAnd: bitMask).\r\t\tval _ val bitShift: depth negated]].\r^ upBits\r! !\r!ImageReadWriter methodsFor: 'testing' stamp: 'tao 10/27/97 09:26'!\runderstandsImageFormat\r\"Test to see if the image stream format is understood by this decoder.\rThis should be implemented in each subclass of ImageReadWriter so that\ra proper decoder can be selected without ImageReadWriter having to know\rabout all possible image file types.\"\r\r^ false! !\r!BMPReadWriter methodsFor: 'reading' stamp: 'ar 6/16/2002 15:36'!\rnextImage\r| colors |\rstream binary.\rself readHeader.\rbiBitCount = 24 ifTrue:[^self read24BmpFile].\r\"read the color map\"\rcolors := self readColorMap.\r^self readIndexedBmpFile: colors! !\r!BMPReadWriter methodsFor: 'reading' stamp: 'ar 10/25/2005 13:48'!\rread24BmpFile\r\"Read 24-bit pixel data from the given a BMP stream.\"\r| form formBits pixelLine bitsIndex bitBlt |\rform _ Form extent: biWidth@biHeight depth: 32.\rpixelLine := ByteArray new: (((24 * biWidth) + 31) // 32) * 4.\rbitsIndex := form height - 1 * biWidth + 1.\rformBits := form bits.\r1 to: biHeight do: [:i |\r\tpixelLine := stream nextInto: pixelLine.\r\tself read24BmpLine: pixelLine into: formBits startingAt: bitsIndex width: biWidth.\r\tbitsIndex := bitsIndex - biWidth.\r].\rbitBlt := BitBlt toForm: form.\rbitBlt combinationRule: 7 \"bitOr:with:\".\rbitBlt halftoneForm: (Bitmap with: 16rFF000000).\rbitBlt copyBits.\r^ form\r! !\r!BMPReadWriter methodsFor: 'reading' stamp: 'ar 10/25/2005 13:47'!\rread24BmpLine: pixelLine into: formBits startingAt: formBitsIndex width: width\r| pixIndex rgb bitsIndex |\rpixIndex _ 0. \"pre-increment\"\rbitsIndex := formBitsIndex-1. \"pre-increment\"\r1 to: width do: [:j |\r\trgb := \r\t\t(pixelLine at: (pixIndex := pixIndex+1)) +\r\t\t((pixelLine at: (pixIndex := pixIndex+1)) bitShift: 8) +\r\t\t((pixelLine at: (pixIndex := pixIndex+1)) bitShift: 16).\r\tformBits at: (bitsIndex := bitsIndex+1) put: rgb.\r].\r! !\r!BMPReadWriter methodsFor: 'reading' stamp: 'ar 10/24/2005 20:57'!\rreadColorMap\r\"Read colorCount BMP color map entries from the given binary stream. Answer an array of Colors.\"\r| colorCount colors maxLevel b g r ccStream |\rcolorCount _ (bfOffBits - 54) // 4.\r\"Note: some programs (e.g. Photoshop 4.0) apparently do not set colorCount; assume that any data between the end of the header and the start of the pixel data is the color map\"\rbiBitCount >= 16 ifTrue:[^nil].\rcolorCount = 0 ifTrue: [ \"this BMP file does not have a color map\"\r\t\"default monochrome color map\"\r\tbiBitCount = 1 ifTrue: [^ Array with: Color white with: Color black].\r\t\"default gray-scale color map\"\r\tmaxLevel _ (2 raisedTo: biBitCount) - 1.\r\t^ (0 to: maxLevel) collect: [:level | Color gray: (level asFloat / maxLevel)]].\rccStream := ReadStream on: (stream next: colorCount*4).\rcolors _ Array new: colorCount.\r1 to: colorCount do: [:i |\r\tb _ ccStream next.\r\tg _ ccStream next.\r\tr _ ccStream next.\r\tccStream next. \"skip reserved\"\r\tcolors at: i put: (Color r: r g: g b: b range: 255)].\r^ colors\r! !\r!BMPReadWriter methodsFor: 'reading' stamp: 'ar 6/16/2002 15:20'!\rreadHeader\r| reserved |\rbfType _ stream nextLittleEndianNumber: 2.\rbfSize _ stream nextLittleEndianNumber: 4.\rreserved _ stream nextLittleEndianNumber: 4.\rbfOffBits _ stream nextLittleEndianNumber: 4.\rbiSize _ stream nextLittleEndianNumber: 4.\rbiWidth _ stream nextLittleEndianNumber: 4.\rbiHeight _ stream nextLittleEndianNumber: 4.\rbiPlanes _ stream nextLittleEndianNumber: 2.\rbiBitCount _ stream nextLittleEndianNumber: 2.\rbiCompression _ stream nextLittleEndianNumber: 4.\rbiSizeImage _ stream nextLittleEndianNumber: 4.\rbiXPelsPerMeter _ stream nextLittleEndianNumber: 4.\rbiYPelsPerMeter _ stream nextLittleEndianNumber: 4.\rbiClrUsed _ stream nextLittleEndianNumber: 4.\rbiClrImportant _ stream nextLittleEndianNumber: 4.\r! !\r!BMPReadWriter methodsFor: 'reading' stamp: 'ar 10/25/2005 13:45'!\rreadIndexedBmpFile: colors\r\"Read uncompressed pixel data of depth d from the given BMP stream, where d is 1, 4, 8, or 16\"\r| form bytesPerRow pixelData pixelLine startIndex map bitBlt mask |\rcolors \r\tifNil:[form _ Form extent: biWidth@biHeight depth: biBitCount]\r\tifNotNil:[form _ ColorForm extent: biWidth@biHeight depth: biBitCount.\r\t\t\tform colors: colors].\rbytesPerRow _ (((biBitCount* biWidth) + 31) // 32) * 4.\rpixelData _ ByteArray new: bytesPerRow * biHeight.\rbiHeight to: 1 by: -1 do: [:y |\r\tpixelLine _ stream next: bytesPerRow.\r\tstartIndex _ ((y - 1) * bytesPerRow) + 1.\r\tpixelData \r\t\treplaceFrom: startIndex \r\t\tto: startIndex + bytesPerRow - 1 \r\t\twith: pixelLine \r\t\tstartingAt: 1].\rform bits copyFromByteArray: pixelData.\rbiBitCount = 16 ifTrue:[\r\tmap := ColorMap shifts: #(8 -8 0 0) masks: #(16rFF 16rFF00 0 0).\r\tmask := 16r80008000.\r].\rbiBitCount = 32 ifTrue:[\r\tmap := ColorMap shifts: #(24 8 -8 -24) masks: #(16rFF 16rFF00 16rFF0000 16rFF000000).\r\tmask := 16rFF000000.\r].\rmap ifNotNil:[\r\tbitBlt := BitBlt toForm: form.\r\tbitBlt sourceForm: form.\r\tbitBlt colorMap: map.\r\tbitBlt combinationRule: Form over.\r\tbitBlt copyBits.\r].\rmask ifNotNil:[\r\tbitBlt := BitBlt toForm: form.\r\tbitBlt combinationRule: 7 \"bitOr:with:\".\r\tbitBlt halftoneForm: (Bitmap with: mask).\r\tbitBlt copyBits.\r].\r^ form\r! !\r!BMPReadWriter methodsFor: 'testing' stamp: 'ar 6/16/2002 15:27'!\runderstandsImageFormat\rstream size < 54 ifTrue:[^false]. \"min size = BITMAPFILEHEADER+BITMAPINFOHEADER\"\rself readHeader.\rbfType = 19778 \"BM\" ifFalse:[^false].\rbiSize = 40 ifFalse:[^false].\rbiPlanes = 1 ifFalse:[^false].\rbfSize <= stream size ifFalse:[^false].\rbiCompression = 0 ifFalse:[^false].\r^true! !\r!BMPReadWriter methodsFor: 'writing' stamp: 'yo 2/18/2004 17:57'!\rnextPutImage: aForm\r| bhSize rowBytes rgb data colorValues depth image ppw scanLineLen |\rdepth := aForm depth.\r[#(1 4 8 32) includes: depth] whileFalse:[depth := depth + 1 asLargerPowerOfTwo].\rimage := aForm asFormOfDepth: depth.\rimage unhibernate.\rbhSize _ 14.  \"# bytes in file header\"\rbiSize _ 40.  \"info header size in bytes\"\rbiWidth := image width.\rbiHeight := image height.\rbiClrUsed _ depth = 32 ifTrue: [0] ifFalse:[1 << depth].  \"No. color table entries\"\rbfOffBits _ biSize + bhSize + (4*biClrUsed).\rrowBytes _ ((depth min: 24) * biWidth + 31 // 32) * 4.\rbiSizeImage _ biHeight * rowBytes.\r\r\"Write the file header\"\rstream position: 0.\rstream nextLittleEndianNumber: 2 put: 19778.  \"bfType = BM\"\rstream nextLittleEndianNumber: 4 put: bfOffBits + biSizeImage.  \"Entire file size in bytes\"\rstream nextLittleEndianNumber: 4 put: 0.  \"bfReserved\"\rstream nextLittleEndianNumber: 4 put: bfOffBits.  \"Offset of bitmap data from start of hdr (and file)\"\r\r\"Write the bitmap info header\"\rstream position: bhSize.\rstream nextLittleEndianNumber: 4 put: biSize.  \"info header size in bytes\"\rstream nextLittleEndianNumber: 4 put: image width.  \"biWidth\"\rstream nextLittleEndianNumber: 4 put: image height.  \"biHeight\"\rstream nextLittleEndianNumber: 2 put: 1.  \"biPlanes\"\rstream nextLittleEndianNumber: 2 put: (depth min: 24).  \"biBitCount\"\rstream nextLittleEndianNumber: 4 put: 0.  \"biCompression\"\rstream nextLittleEndianNumber: 4 put: biSizeImage.  \"size of image section in bytes\"\rstream nextLittleEndianNumber: 4 put: 2800.  \"biXPelsPerMeter\"\rstream nextLittleEndianNumber: 4 put: 2800.  \"biYPelsPerMeter\"\rstream nextLittleEndianNumber: 4 put: biClrUsed.\rstream nextLittleEndianNumber: 4 put: 0.  \"biClrImportant\"\rbiClrUsed > 0 ifTrue: [\r\t\"write color map; this works for ColorForms, too\"\r\tcolorValues _ image colormapIfNeededForDepth: 32.\r\t1 to: biClrUsed do: [:i |\r\t\trgb _ colorValues at: i.\r\t\t0 to: 24 by: 8 do: [:j | stream nextPut: (rgb >> j bitAnd: 16rFF)]]].\r\rdepth < 32 ifTrue: [\r\t\"depth = 1, 4 or 8.\"\r\tdata _ image bits asByteArray.\r\tppw _ 32 // depth.\r\tscanLineLen _ biWidth + ppw - 1 // ppw * 4.  \"# of bytes in line\"\r\t1 to: biHeight do: [:i |\r\t\tstream next: scanLineLen putAll: data startingAt: (biHeight-i)*scanLineLen+1.\r\t].\r] ifFalse: [\r\t1 to: biHeight do:[:i |\r\t\tdata _ (image copy: (0@(biHeight-i) extent: biWidth@1)) bits.\r\t\t1 to: data size do: [:j | stream nextLittleEndianNumber: 3 put: (data at: j)].\r\t\t1 to: (data size*3)+3//4*4-(data size*3) do: [:j | stream nextPut: 0 \"pad to 32-bits\"]\r\t].\r].\rstream position = (bfOffBits + biSizeImage) ifFalse: [self error:'Write failure'].\rstream close.! !\r!GIFReadWriter methodsFor: 'accessing' stamp: 'bf 5/29/2003 01:43'!\rdelay: aNumberOrNil\r\"Set delay for next image in hundredth (1/100) of seconds\"\rdelay := aNumberOrNil! !\r!GIFReadWriter methodsFor: 'accessing' stamp: 'bf 5/29/2003 01:39'!\rloopCount: aNumber\r\"Set looping. This must be done before any image is written!!\"\rloopCount := aNumber! !\r!GIFReadWriter methodsFor: 'accessing' stamp: 'sd 1/30/2004 15:18'!\rnextImage\r\"Read in the next GIF image from the stream. Read it all into\rmemory first for speed.\"\r\r| f thisImageColorTable |\rstream class == ReadWriteStream ifFalse: [\r\tstream binary.\r\tself on: (ReadWriteStream with: (stream contentsOfEntireFile))].\r\rlocalColorTable _ nil.\rself readHeader.\rf _ self readBody.\rself close.\rf == nil ifTrue: [^ self error: 'corrupt GIF file'].\r\rthisImageColorTable _ localColorTable ifNil: [colorPalette].\rtransparentIndex ifNotNil: [\r\ttransparentIndex + 1 > thisImageColorTable size ifTrue: [\r\t\tthisImageColorTable _ thisImageColorTable \r\t\t\tforceTo: transparentIndex + 1 \r\t\t\tpaddingWith: Color white\r\t].\r\tthisImageColorTable at: transparentIndex + 1 put: Color transparent\r].\rf colors: thisImageColorTable.\r^ f\r! !\r!GIFReadWriter methodsFor: 'accessing' stamp: 'ar 10/24/2005 22:52'!\rnextPutImage: aForm\r\r| reduced tempForm |\raForm unhibernate.\raForm depth > 8 ifTrue:[\r\treduced := aForm colorReduced.  \"minimize depth\"\r\treduced depth > 8 ifTrue: [\r\t\t\"Not enough color space; do it the hard way.\"\r\t\treduced := reduced asFormOfDepth: 8].\r] ifFalse:[reduced := aForm].\rreduced depth < 8 ifTrue: [\r\t\"writeBitData: expects depth of 8\"\r\ttempForm := reduced class extent: reduced extent depth: 8.\r\t(reduced isColorForm) ifTrue:[\r\t\ttempForm\r\t\t\tcopyBits: reduced boundingBox\r\t\t\tfrom: reduced at: 0@0\r\t\t\tclippingBox: reduced boundingBox\r\t\t\trule: Form over\r\t\t\tfillColor: nil\r\t\t\tmap: nil.\r\t\ttempForm colors: reduced colors.\r\t] ifFalse: [reduced displayOn: tempForm].\r\treduced := tempForm.\r].\r(reduced isColorForm) ifTrue:[\r\t(reduced colorsUsed includes: Color transparent) ifTrue: [\r\t\ttransparentIndex := (reduced colors indexOf: Color transparent) - 1.\r\t]\r] ifFalse: [transparentIndex := nil].\rwidth := reduced width.\rheight := reduced height.\rbitsPerPixel := reduced depth.\rcolorPalette := reduced colormapIfNeededForDepth: 32.\rinterlace := false.\rself writeHeader.\rself writeBitData: reduced bits.\r! !\r!GIFReadWriter methodsFor: 'accessing' stamp: '6/18/97 13:18 '!\rsetStream: aStream\r\"Feed it in from an existing source\"\rstream _ aStream! !\r!GIFReadWriter methodsFor: 'accessing' stamp: 'di 9/15/1998 09:53'!\runderstandsImageFormat\r^('abc' collect: [:x | stream next asCharacter]) = 'GIF'! !\r!GIFReadWriter methodsFor: 'private-encoding' stamp: ''!\rflushCode\rself flushBits! !\r!GIFReadWriter methodsFor: 'private-encoding' stamp: 'tk 9/14/97 16:25'!\rreadPixelFrom: bits\r\"Since bits is a Bitmap with 32 bit values, watch out for the\rpadding at the end of each row.  But, GIF format already wants padding to\r32 bit boundary!!  OK as is.  tk 9/14/97\"\r\r| pixel |\rypos >= height ifTrue: [^nil].\rpixel _ bits byteAt: (ypos * rowByteSize + xpos + 1).\rself updatePixelPosition.\r^pixel! !\r!GIFReadWriter methodsFor: 'private-encoding' stamp: 'bf 5/29/2003 01:21'!\rwriteBitData: bits\r\"using modified Lempel-Ziv Welch algorithm.\"\r\r| maxBits maxMaxCode tSize initCodeSize ent tShift fCode pixel index disp nomatch |\rpass _ 0.\rxpos _ 0.\rypos _ 0.\rrowByteSize _ width * 8 + 31 // 32 * 4.\rremainBitCount _ 0.\rbufByte _ 0.\rbufStream _ WriteStream on: (ByteArray new: 256).\r\rmaxBits _ 12.\rmaxMaxCode _ 1 bitShift: maxBits.\rtSize _ 5003.\rprefixTable _ Array new: tSize.\rsuffixTable _ Array new: tSize.\r\rinitCodeSize _ bitsPerPixel <= 1 ifTrue: [2] ifFalse: [bitsPerPixel].\rself nextPut: initCodeSize.\rself setParameters: initCodeSize.\r\rtShift _ 0.\rfCode _ tSize.\r[fCode < 65536] whileTrue:\r\t[tShift _ tShift + 1.\r\tfCode _ fCode * 2].\rtShift _ 8 - tShift.\r1 to: tSize do: [:i | suffixTable at: i put: -1].\r\rself writeCodeAndCheckCodeSize: clearCode.\rent _ self readPixelFrom: bits.\r[(pixel _ self readPixelFrom: bits) == nil] whileFalse:\r\t[\r\tfCode _ (pixel bitShift: maxBits) + ent.\r\tindex _ ((pixel bitShift: tShift) bitXor: ent) + 1.\r\t(suffixTable at: index) = fCode\r\t\tifTrue: [ent _ prefixTable at: index]\r\t\tifFalse:\r\t\t\t[nomatch _ true.\r\t\t\t(suffixTable at: index) >= 0\r\t\t\t\tifTrue:\r\t\t\t\t\t[disp _ tSize - index + 1.\r\t\t\t\t\tindex = 1 ifTrue: [disp _ 1].\r\t\t\t\t\t\"probe\"\r\t\t\t\t\t[(index _ index - disp) < 1 ifTrue: [index _ index + tSize].\r\t\t\t\t\t(suffixTable at: index) = fCode\r\t\t\t\t\t\tifTrue:\r\t\t\t\t\t\t\t[ent _ prefixTable at: index.\r\t\t\t\t\t\t\tnomatch _ false.\r\t\t\t\t\t\t\t\"continue whileFalse:\"].\r\t\t\t\t\tnomatch and: [(suffixTable at: index) > 0]]\r\t\t\t\t\t\twhileTrue: [\"probe\"]].\r\t\t\t\"nomatch\"\r\t\t\tnomatch ifTrue:\r\t\t\t\t[self writeCodeAndCheckCodeSize: ent.\r\t\t\t\tent _ pixel.\r\t\t\t\tfreeCode < maxMaxCode\r\t\t\t\t\tifTrue:\r\t\t\t\t\t\t[prefixTable at: index put: freeCode.\r\t\t\t\t\t\tsuffixTable at: index put: fCode.\r\t\t\t\t\t\tfreeCode _ freeCode + 1]\r\t\t\t\t\tifFalse:\r\t\t\t\t\t\t[self writeCodeAndCheckCodeSize: clearCode.\r\t\t\t\t\t\t1 to: tSize do: [:i | suffixTable at: i put: -1].\r\t\t\t\t\t\tself setParameters: initCodeSize]]]].\rprefixTable _ suffixTable _ nil.\rself writeCodeAndCheckCodeSize: ent.\rself writeCodeAndCheckCodeSize: eoiCode.\rself flushCode.\r\rself nextPut: 0.\t\"zero-length packet\"\r! !\r!GIFReadWriter methodsFor: 'private-encoding' stamp: ''!\rwriteCode: aCode\rself nextBitsPut: aCode! !\r!GIFReadWriter methodsFor: 'private-encoding' stamp: ''!\rwriteCodeAndCheckCodeSize: aCode\rself writeCode: aCode.\rself checkCodeSize! !\r!GIFReadWriter methodsFor: 'private-encoding' stamp: 'bf 5/29/2003 01:38'!\rwriteHeader\r\r| byte |\rstream position = 0 ifTrue: [\r\t\"For first image only\"\r\tself nextPutAll: 'GIF89a' asByteArray.\r\tself writeWord: width.\t\"Screen Width\"\r\tself writeWord: height.\t\"Screen Height\"\r\tbyte _ 16r80.  \"has color map\"\r\tbyte _ byte bitOr: ((bitsPerPixel - 1) bitShift: 5).  \"color resolution\"\r\tbyte _ byte bitOr: bitsPerPixel - 1.  \"bits per pixel\"\r\tself nextPut: byte.\r\tself nextPut: 0.\t\t\"background color.\"\r\tself nextPut: 0.\t\t\"reserved\"\r\tcolorPalette do: [:pixelValue |\r\t\tself\tnextPut: ((pixelValue bitShift: -16) bitAnd: 255);\r\t\t\tnextPut: ((pixelValue bitShift: -8) bitAnd: 255);\r\t\t\tnextPut: (pixelValue bitAnd: 255)].\r\tloopCount notNil ifTrue: [\r\t\t\"Write a Netscape loop chunk\"\r\t\tself nextPut: Extension.\r\t\tself nextPutAll: #(255 11 78 69 84 83 67 65 80 69 50 46 48 3 1) asByteArray.\r\t\tself writeWord: loopCount.\r\t\tself nextPut: 0]].\r\rdelay notNil | transparentIndex notNil ifTrue: [\r\tself nextPut: Extension;\r\t\tnextPutAll: #(16rF9 4) asByteArray;\r\t\tnextPut: (transparentIndex isNil ifTrue: [0] ifFalse: [9]);\r\t\twriteWord: (delay isNil ifTrue: [0] ifFalse: [delay]);\r\t\tnextPut: (transparentIndex isNil ifTrue: [0] ifFalse: [transparentIndex]);\r\t\tnextPut: 0].\r\rself nextPut: ImageSeparator.\rself writeWord: 0.\t\t\"Image Left\"\rself writeWord: 0.\t\t\"Image Top\"\rself writeWord: width.\t\"Image Width\"\rself writeWord: height.\t\"Image Height\"\rbyte _ interlace ifTrue: [16r40] ifFalse: [0].\rself nextPut: byte.\r! !\r!GIFReadWriter methodsFor: 'private-encoding' stamp: ''!\rwriteWord: aWord\rself nextPut: (aWord bitAnd: 255).\rself nextPut: ((aWord bitShift: -8) bitAnd: 255).\r^aWord! !\r!GIFReadWriter methodsFor: 'private-decoding' stamp: 'mir 11/19/2003 12:19'!\rreadBitData\r\"using modified Lempel-Ziv Welch algorithm.\"\r\r| outCodes outCount bitMask initCodeSize code curCode oldCode inCode finChar i bytes f c packedBits hasLocalColor localColorSize maxOutCodes |\r\rmaxOutCodes _ 4096.\roffset := self readWord@self readWord. \"Image Left@Image Top\"\rwidth _ self readWord.\rheight _ self readWord.\r\r\"---\rLocal Color Table Flag        1 Bit\rInterlace Flag                1 Bit\rSort Flag                     1 Bit\rReserved                      2 Bits\rSize of Local Color Table     3 Bits\r----\"\rpackedBits _ self next.\rinterlace _ (packedBits bitAnd: 16r40) ~= 0.\rhasLocalColor _ (packedBits bitAnd: 16r80) ~= 0.\rlocalColorSize _ 1 bitShift: ((packedBits bitAnd: 16r7) + 1).\rhasLocalColor ifTrue: [localColorTable _ self readColorTable: localColorSize].\r\rpass _ 0.\rxpos _ 0.\rypos _ 0.\rrowByteSize _ ((width + 3) // 4) * 4.\rremainBitCount _ 0.\rbufByte _ 0.\rbufStream _ ReadStream on: ByteArray new.\r\routCodes _ ByteArray new: maxOutCodes + 1.\routCount _ 0.\rbitMask _ (1 bitShift: bitsPerPixel) - 1.\rprefixTable _ Array new: 4096.\rsuffixTable _ Array new: 4096.\r\rinitCodeSize _ self next.\r\rself setParameters: initCodeSize.\rbitsPerPixel > 8 ifTrue: [^self error: 'never heard of a GIF that deep'].\rbytes _ ByteArray new: rowByteSize * height.\r[(code _ self readCode) = eoiCode] whileFalse:\r\t[code = clearCode\r\t\tifTrue:\r\t\t\t[self setParameters: initCodeSize.\r\t\t\tcurCode _ oldCode _ code _ self readCode.\r\t\t\tfinChar _ curCode bitAnd: bitMask.\r\t\t\t\"Horrible hack to avoid running off the end of the bitmap.  Seems to cure problem reading some gifs!!? tk 6/24/97 20:16\"\r\t\t\txpos = 0 ifTrue: [\r\t\t\t\t\typos < height ifTrue: [\r\t\t\t\t\t\tbytes at: (ypos * rowByteSize) + xpos + 1 put: finChar]]\r\t\t\t\tifFalse: [bytes at: (ypos * rowByteSize) + xpos + 1 put: finChar].\r\t\t\tself updatePixelPosition]\r\t\tifFalse:\r\t\t\t[curCode _ inCode _ code.\r\t\t\tcurCode >= freeCode ifTrue:\r\t\t\t\t[curCode _ oldCode.\r\t\t\t\toutCodes at: (outCount _ outCount + 1) put: finChar].\r\t\t\t[curCode > bitMask] whileTrue:\r\t\t\t\t[outCount > maxOutCodes\r\t\t\t\t\tifTrue: [^self error: 'corrupt GIF file (OutCount)'].\r\t\t\t\toutCodes at: (outCount _ outCount + 1)\r\t\t\t\t\tput: (suffixTable at: curCode + 1).\r\t\t\t\tcurCode _ prefixTable at: curCode + 1].\r\t\t\tfinChar _ curCode bitAnd: bitMask.\r\t\t\toutCodes at: (outCount _ outCount + 1) put: finChar.\r\t\t\ti _ outCount.\r\t\t\t[i > 0] whileTrue:\r\t\t\t\t[\"self writePixel: (outCodes at: i) to: bits\"\r\t\t\t\tbytes at: (ypos * rowByteSize) + xpos + 1 put: (outCodes at: i).\r\t\t\t\tself updatePixelPosition.\r\t\t\t\ti _ i - 1].\r\t\t\toutCount _ 0.\r\t\t\tprefixTable at: freeCode + 1 put: oldCode.\r\t\t\tsuffixTable at: freeCode + 1 put: finChar.\r\t\t\toldCode _ inCode.\r\t\t\tfreeCode _ freeCode + 1.\r\t\t\tself checkCodeSize]].\rprefixTable _ suffixTable _ nil.\r\rf _ ColorForm extent: width@height depth: 8.\rf bits copyFromByteArray: bytes.\r\"Squeak can handle depths 1, 2, 4, and 8\"\rbitsPerPixel > 4 ifTrue: [^ f].\r\"reduce depth to save space\"\rc _ ColorForm extent: width@height\r\tdepth: (bitsPerPixel = 3 ifTrue: [4] ifFalse: [bitsPerPixel]).\rf displayOn: c.\r^ c\r! !\r!GIFReadWriter methodsFor: 'private-decoding' stamp: 'KLC 1/25/2004 14:04'!\rreadBody\r\"Read the GIF blocks. Modified to return a form.  \"\r\r| form extype block blocksize packedFields delay1 |\rform _ nil.\r[stream atEnd] whileFalse: [\r\tblock _ self next.\r\tblock = Terminator ifTrue: [^ form].\r\tblock = ImageSeparator ifTrue: [\r\t\tform isNil\r\t\t\tifTrue: [form _ self readBitData]\r\t\t\tifFalse: [self skipBitData].\r\t] ifFalse: [\r\t\tblock = Extension\r\t\t\tifFalse: [^ form \"^ self error: 'Unknown block type'\"].\r\t\t\"Extension block\"\r\t\textype _ self next.\t\"extension type\"\r\t\textype = 16rF9 ifTrue: [  \"graphics control\"\r\t\t\tself next = 4 ifFalse: [^ form \"^ self error: 'corrupt GIF file'\"].\r\t\t\t\"====\r\t\t\tReserved                      3 Bits\r\t\t\tDisposal Method               3 Bits\r\t\t\tUser Input Flag               1 Bit\r\t\t\tTransparent Color Flag        1 Bit\r\t\t\t===\"\r\r\t\t\tpackedFields _ self next.\r\t\t\tdelay1 := self next.\t\"delay time 1\"\r\t\t\tdelay := (self next*256 + delay1) *10.\t \"delay time 2\"\r\t\t\ttransparentIndex _ self next.\r\t\t\t(packedFields bitAnd: 1) = 0 ifTrue: [transparentIndex _ nil].\r\t\t\tself next = 0 ifFalse: [^ form \"^ self error: 'corrupt GIF file'\"].\r\t\t] ifFalse: [\r\t\t\t\"Skip blocks\"\r\t\t\t[(blocksize _ self next) > 0]\r\t\t\t\twhileTrue: [\r\t\t\t\t\t\"Read the block and ignore it and eat the block terminator\"\r\t\t\t\t\tself next: blocksize]]]]! !\r!GIFReadWriter methodsFor: 'private-decoding' stamp: ''!\rreadCode\r^self nextBits! !\r!GIFReadWriter methodsFor: 'private-decoding' stamp: 'RAA 4/25/2001 08:48'!\rreadColorTable: numberOfEntries\r\r| array r g b |\r\rarray _ Array new: numberOfEntries.\r1 to: array size do: [ :i |\r\tr _ self next.  \r\tg _ self next.  \r\tb _ self next.\r\tarray at: i put: (Color r: r g: g b: b range: 255)\r].\r^array! !\r!GIFReadWriter methodsFor: 'private-decoding' stamp: 'RAA 4/25/2001 08:49'!\rreadHeader\r| is89 byte hasColorMap |\r(self hasMagicNumber: 'GIF87a' asByteArray)\r\tifTrue: [is89 _ false]\r\tifFalse: [(self hasMagicNumber: 'GIF89a' asByteArray)\r\t\tifTrue: [is89 _ true]\r\t\tifFalse: [^ self error: 'This does not appear to be a GIF file']].\rself readWord.\t\"skip Screen Width\"\rself readWord.\t\"skip Screen Height\"\rbyte _ self next.\rhasColorMap _ (byte bitAnd: 16r80) ~= 0.\rbitsPerPixel _ (byte bitAnd: 7) + 1.\rbyte _ self next.\t\"skip background color.\"\rself next ~= 0\r\tifTrue: [is89\r\t\tifFalse: [^self error: 'corrupt GIF file (screen descriptor)']].\rhasColorMap\r\tifTrue:\r\t\t[colorPalette _ self readColorTable: (1 bitShift: bitsPerPixel)]\r\tifFalse:\r\t\t[\"Transcript cr; show: 'GIF file does not have a color map.'.\"\r\t\tcolorPalette _ nil \"Palette monochromeDefault\"].! !\r!GIFReadWriter methodsFor: 'private-decoding' stamp: ''!\rreadWord\r^self next + (self next bitShift: 8)! !\r!GIFReadWriter methodsFor: 'private-decoding' stamp: ''!\rskipBitData\r| misc blocksize |\rself readWord.  \"skip Image Left\"\rself readWord.  \"skip Image Top\"\rself readWord.  \"width\"\rself readWord.  \"height\"\rmisc _ self next.\r(misc bitAnd: 16r80) = 0 ifFalse: [ \"skip colormap\"\r\t1 to: (1 bitShift: (misc bitAnd: 7) + 1) do: [:i |\r\t\tself next; next; next]].\rself next.  \"minimum code size\"\r[(blocksize _ self next) > 0]\r\twhileTrue: [self next: blocksize]! !\r!GIFReadWriter methodsFor: 'private-bits access' stamp: ''!\rflushBits\rremainBitCount = 0 ifFalse:\r\t[self nextBytePut: bufByte.\r\tremainBitCount _ 0].\rself flushBuffer! !\r!GIFReadWriter methodsFor: 'private-bits access' stamp: ''!\rnextBits\r| integer readBitCount shiftCount byte |\rinteger _ 0.\rremainBitCount = 0\r\tifTrue:\r\t\t[readBitCount _ 8.\r\t\tshiftCount _ 0]\r\tifFalse:\r\t\t[readBitCount _ remainBitCount.\r\t\tshiftCount _ remainBitCount - 8].\r[readBitCount < codeSize]\r\twhileTrue:\r\t\t[byte _ self nextByte.\r\t\tbyte == nil ifTrue: [^eoiCode].\r\t\tinteger _ integer + (byte bitShift: shiftCount).\r\t\tshiftCount _ shiftCount + 8.\r\t\treadBitCount _ readBitCount + 8].\r(remainBitCount _ readBitCount - codeSize) = 0\r\tifTrue:\t[byte _ self nextByte]\r\tifFalse:\t[byte _ self peekByte].\rbyte == nil ifTrue: [^eoiCode].\r^(integer + (byte bitShift: shiftCount)) bitAnd: maxCode! !\r!GIFReadWriter methodsFor: 'private-bits access' stamp: ''!\rnextBitsPut: anInteger\r| integer writeBitCount shiftCount |\rshiftCount _ 0.\rremainBitCount = 0\r\tifTrue:\r\t\t[writeBitCount _ 8.\r\t\tinteger _ anInteger]\r\tifFalse:\r\t\t[writeBitCount _ remainBitCount.\r\t\tinteger _ bufByte + (anInteger bitShift: 8 - remainBitCount)].\r[writeBitCount < codeSize]\r\twhileTrue:\r\t\t[self nextBytePut: ((integer bitShift: shiftCount) bitAnd: 255).\r\t\tshiftCount _ shiftCount - 8.\r\t\twriteBitCount _ writeBitCount + 8].\r(remainBitCount _ writeBitCount - codeSize) = 0\r\tifTrue: [self nextBytePut: (integer bitShift: shiftCount)]\r\tifFalse: [bufByte _ integer bitShift: shiftCount].\r^anInteger! !\r!GIFReadWriter methodsFor: 'private-packing' stamp: ''!\rfillBuffer\r| packSize |\rpackSize _ self next.\rbufStream _ ReadStream on: (self next: packSize)! !\r!GIFReadWriter methodsFor: 'private-packing' stamp: ''!\rflushBuffer\rbufStream isEmpty ifTrue: [^self].\rself nextPut: bufStream size.\rself nextPutAll: bufStream contents.\rbufStream _ WriteStream on: (ByteArray new: 256)! !\r!GIFReadWriter methodsFor: 'private-packing' stamp: ''!\rnextByte\rbufStream atEnd\r\tifTrue:\r\t\t[self atEnd ifTrue: [^nil].\r\t\tself fillBuffer].\r^bufStream next! !\r!GIFReadWriter methodsFor: 'private-packing' stamp: ''!\rnextBytePut: aByte\rbufStream nextPut: aByte.\rbufStream size >= 254 ifTrue: [self flushBuffer]! !\r!GIFReadWriter methodsFor: 'private-packing' stamp: ''!\rpeekByte\rbufStream atEnd\r\tifTrue:\r\t\t[self atEnd ifTrue: [^nil].\r\t\tself fillBuffer].\r^bufStream peek! !\r!GIFReadWriter methodsFor: 'private' stamp: ''!\rcheckCodeSize\r(freeCode > maxCode and: [codeSize < 12])\r\tifTrue:\r\t\t[codeSize _ codeSize + 1.\r\t\tmaxCode _ (1 bitShift: codeSize) - 1]! !\r!GIFReadWriter methodsFor: 'private' stamp: ''!\rsetParameters: initCodeSize\rclearCode _ 1 bitShift: initCodeSize.\reoiCode _ clearCode + 1.\rfreeCode _ clearCode + 2.\rcodeSize _ initCodeSize + 1.\rmaxCode _ (1 bitShift: codeSize) - 1! !\r!GIFReadWriter methodsFor: 'private' stamp: ''!\rupdatePixelPosition\r(xpos _ xpos + 1) >= width ifFalse: [^self].\rxpos _ 0.\rinterlace\r\tifFalse: [ypos _ ypos + 1. ^self].\rpass = 0 ifTrue:\r\t[(ypos _ ypos + 8) >= height\r\t\tifTrue:\r\t\t\t[pass _ pass + 1.\r\t\t\typos _ 4].\r\t^self].\rpass = 1 ifTrue:\r\t[(ypos _ ypos + 8) >= height\r\t\tifTrue:\r\t\t\t[pass _ pass + 1.\r\t\t\typos _ 2].\r\t^self].\rpass = 2 ifTrue:\r\t[(ypos _ ypos + 4) >= height\r\t\tifTrue:\r\t\t\t[pass _ pass + 1.\r\t\t\typos _ 1].\r\t^self].\rpass = 3 ifTrue:\r\t[ypos _ ypos + 2.\r\t^self].\r\r^self error: 'can''t happen'! !\r!GIFReadWriter methodsFor: 'stream access' stamp: 'bf 5/29/2003 01:23'!\rclose\r\"Write terminator\"\rself nextPut: Terminator.\r^super close! !\r!AnimatedGIFReadWriter methodsFor: 'accessing' stamp: 'bf 2/25/2005 11:11'!\rallImages\r| body colorTable |\rstream class == ReadWriteStream ifFalse: [\r\tstream binary.\r\tself on: (ReadWriteStream with: (stream contentsOfEntireFile))].\rlocalColorTable _ nil.\rforms _ OrderedCollection new.\rdelays _ OrderedCollection new.\rcomments _ OrderedCollection new.\rself readHeader.\r[(body _ self readBody) == nil]\r\twhileFalse: [colorTable _ localColorTable\r\t\t\t\t\tifNil: [colorPalette].\r\t\ttransparentIndex\r\t\t\tifNotNil: [transparentIndex + 1 > colorTable size\r\t\t\t\t\tifTrue: [colorTable _ colorTable forceTo: transparentIndex + 1 paddingWith: Color white].\r\t\t\t\tcolorTable at: transparentIndex + 1 put: Color transparent].\r\t\tbody colors: colorTable.\r\t\tforms add: body.\r\t\tdelays add: delay].\r^ forms! !\r!AnimatedGIFReadWriter methodsFor: 'accessing' stamp: 'mir 11/19/2003 14:16'!\rdelays\r^ delays! !\r!AnimatedGIFReadWriter methodsFor: 'accessing' stamp: 'mir 11/19/2003 14:16'!\rforms\r^ forms! !\r!AnimatedGIFReadWriter methodsFor: 'private' stamp: 'mir 11/19/2003 12:25'!\rcomment: aString\rcomments add: aString! !\r!AnimatedGIFReadWriter methodsFor: 'private-decoding' stamp: 'mir 11/19/2003 12:21'!\rreadBitData\r| form |\rform := super readBitData.\rform offset: offset.\r^form! !\r!InfiniteForm methodsFor: 'accessing' stamp: 'ssa 8/28/2009 11:40'!\rdepth\r^patternForm depth! !\r!InfiniteForm methodsFor: 'as yet unclassified' stamp: 'ssa 8/28/2009 11:39'!\rhasNonStandardPalette\r\r^patternForm hasNonStandardPalette! !\r!InputSensor methodsFor: 'mouse' stamp: 'ssa 10/27/2008 20:37'!\rwaitClick\r\"Wait for the user to press any mouse button and release it, then answer with the \rcurrent location of the cursor.\"\r\r| pt |\rpt _ self waitButton.\rself waitNoButton.\r^pt! !\r!EventSensor methodsFor: 'accessing' stamp: 'ar 7/23/2000 14:37'!\reventQueue\r\"Return the current event queue\"\r^eventQueue! !\r!EventSensor methodsFor: 'accessing' stamp: 'nk 4/12/2004 19:36'!\reventTicklerProcess\r\"Answer my event tickler process, if any\"\r^EventTicklerProcess! !\r!EventSensor methodsFor: 'accessing' stamp: 'ssa 12/17/2009 13:19'!\rflushAllButDandDEvents\r| newQueue oldQueue  |\r\rnewQueue _ SharedQueue new.\rself eventQueue ifNil: \r\t[eventQueue := newQueue.\r\t^self].\roldQueue _ self eventQueue.\r[oldQueue size > 0] whileTrue: \r\t[| item type | \r\titem _ oldQueue next.\r\ttype _ item at: 1.\r\ttype = EventTypeDragDropFiles ifTrue: [ newQueue nextPut: item]].\reventQueue := newQueue.\r! !\r!EventSensor methodsFor: 'accessing' stamp: 'ar 2/7/2001 17:13'!\rflushEvents\reventQueue ifNotNil:[eventQueue flush].! !\r!EventSensor methodsFor: 'accessing' stamp: 'ssa 12/17/2009 12:30'!\rnextEvent\r\"Return the next event from the receiver.\"\reventQueue == nil \r\tifTrue:[^self nextEventSynthesized]\r\tifFalse:[^self nextEventFromQueue]\r! !\r!EventSensor methodsFor: 'accessing' stamp: 'JMM 11/7/2005 14:38'!\rpeekButtons\rself wait2ms.\rself fetchMoreEvents.\r^mouseButtons! !\r!EventSensor methodsFor: 'accessing' stamp: 'ar 2/6/2004 14:51'!\rpeekEvent\r\"Look ahead at the next event.\"\reventQueue ifNil:[^nil].\rself fetchMoreEvents.\r^eventQueue peek! !\r!EventSensor methodsFor: 'accessing' stamp: 'tpr 1/5/2005 17:34'!\rpeekKeyboardEvent\r\"Return the next keyboard char event from the receiver or nil if none available\"\r^eventQueue nextOrNilSuchThat: \r\t\t\t\t[:buf | \r\t\t\t\tbuf first = EventTypeKeyboard and: [(buf fourth) = EventKeyChar]]! !\r!EventSensor methodsFor: 'accessing' stamp: 'ar 2/8/2001 21:45'!\rpeekMousePt\r^mousePosition! !\r!EventSensor methodsFor: 'accessing' stamp: 'JMM 11/7/2005 14:38'!\rpeekPosition\rself wait2ms.\rself fetchMoreEvents.\r^mousePosition! !\r!EventSensor methodsFor: 'initialize' stamp: 'nk 4/12/2004 19:21'!\rinitialize\r\"Initialize the receiver\"\rmouseButtons := 0.\rmousePosition := 0 @ 0.\rkeyboardBuffer := SharedQueue new.\rself setInterruptKey: (interruptKey ifNil: [$. asciiValue bitOr: 16r0800 ]). \t\"cmd-.\"\rinterruptSemaphore := (Smalltalk specialObjectsArray at: 31) ifNil: [Semaphore new].\rself flushAllButDandDEvents.\rinputSemaphore := Semaphore new.\rhasInputSemaphore := false.! !\r!EventSensor methodsFor: 'initialize' stamp: 'nk 4/12/2004 20:13'!\rshutDown\rsuper shutDown.\rEventTicklerProcess ifNotNil: [\r\tEventTicklerProcess terminate.\r\tEventTicklerProcess _ nil. ].\rinputSemaphore ifNotNil:[Smalltalk unregisterExternalObject: inputSemaphore].\r! !\r!EventSensor methodsFor: 'initialize' stamp: 'nk 6/21/2004 10:42'!\rstartUp\r\"Run the I/O process\"\rself initialize.\rself primSetInputSemaphore: (Smalltalk registerExternalObject: inputSemaphore).\rsuper startUp.\rself installEventTickler.\rSmalltalk isMorphic ifTrue:[self flushAllButDandDEvents].\r\r\"Attempt to discover whether the input semaphore is actually being signaled.\"\rhasInputSemaphore := false.\rinputSemaphore initSignals.\r! !\r!EventSensor methodsFor: 'mouse' stamp: 'ar 5/18/2003 18:27'!\rcreateMouseEvent\r\"create and return a new mouse event from the current mouse \rposition; this is useful for restarting normal event queue \rprocessing after manual polling\"\r\r| buttons modifiers pos mapped eventBuffer |\reventBuffer _ Array new: 8.\rbuttons _ self primMouseButtons.\rpos _ self primMousePt.\rmodifiers _ buttons bitShift: -3.\rbuttons _ buttons bitAnd: 7.\rmapped _ self mapButtons: buttons modifiers: modifiers.\reventBuffer\r\tat: 1\r\tput: EventTypeMouse;\r\t at: 2 put: Time millisecondClockValue;\r\t at: 3 put: pos x;\r\t at: 4 put: pos y;\r\t at: 5 put: mapped;\r\t at: 6 put: modifiers.\r^ eventBuffer! !\r!EventSensor methodsFor: 'private' stamp: 'nk 4/12/2004 20:16'!\reventTickler\r\"Poll infrequently to make sure that the UI process is not been stuck. \rIf it has been stuck, then spin the event loop so that I can detect the \rinterrupt key.\"\r| delay |\rdelay := Delay forMilliseconds: self class eventPollPeriod.\rself lastEventPoll.\t\"ensure not nil.\"\r[| delta | \r[ delay wait.\rdelta := Time millisecondClockValue - lastEventPoll.\r(delta < 0\r\t\tor: [delta > self class eventPollPeriod])\r\tifTrue: [\"force check on rollover\"\r\t\tself fetchMoreEvents]] on: Error do: [:ex | ].\rtrue ] whileTrue.! !\r!EventSensor methodsFor: 'private' stamp: 'ssa 12/17/2009 14:18'!\rflushNonKbdEvents\reventQueue ifNil: [^ self].\r[^self]value.   \"don't flush so we don't lose events\"\reventQueue flushAllSuchThat:\r\t[:buf | (self isKbdEvent: buf) not]\r! !\r!EventSensor methodsFor: 'private' stamp: 'nk 6/21/2004 10:40'!\rinstallEventTickler\r\"Initialize the interrupt watcher process. Terminate the old process if any.\"\r\"Sensor installEventTickler\"\r\rEventTicklerProcess ifNotNil: [EventTicklerProcess terminate].\rEventTicklerProcess _ [self eventTickler] forkAt: Processor lowIOPriority.\r! !\r!EventSensor methodsFor: 'private' stamp: 'di 10/1/2001 20:51'!\risKbdEvent: buf\r^ (buf at: 1) = EventTypeKeyboard and: [(buf at: 4) = EventKeyChar]! !\r!EventSensor methodsFor: 'private' stamp: 'nk 3/18/2004 13:21'!\rlastEventPoll\r\"Answer the last clock value at which fetchMoreEvents was called.\"\r^lastEventPoll ifNil: [ lastEventPoll _ Time millisecondClockValue ]! !\r!EventSensor methodsFor: 'private' stamp: 'ar 2/6/2004 14:42'!\rnextEventFromQueue\r\"Return the next event from the receiver.\"\reventQueue isEmpty ifTrue:[self fetchMoreEvents].\reventQueue isEmpty\r\tifTrue:[^nil]\r\tifFalse:[^eventQueue next]! !\r!EventSensor methodsFor: 'private' stamp: 'nk 3/17/2004 07:09'!\rnextEventSynthesized\r\"Return a synthesized event. This method is called if an event driven client wants to receive events but the primary user interface is not event-driven (e.g., the receiver does not have an event queue but only updates its state). This can, for instance, happen if a Morphic World is run in an MVC window. To simplify the clients work this method will always return all available keyboard events first, and then (repeatedly) the mouse events. Since mouse events come last, the client can assume that after one mouse event has been received there are no more to come. Note that it is impossible for EventSensor to determine if a mouse event has been issued before so the client must be aware of the possible problem of getting repeatedly the same mouse events. See HandMorph>>processEvents for an example on how to deal with this.\"\r| kbd array buttons pos modifiers mapped |\r\"First check for keyboard\"\rarray _ Array new: 8.\rkbd _ self primKbdNext.\rkbd ifNotNil:\r\t[\"simulate keyboard event\"\r\tarray at: 1 put: EventTypeKeyboard. \"evt type\"\r\tarray at: 2 put: Time millisecondClockValue. \"time stamp\"\r\tarray at: 3 put: (kbd bitAnd: 255). \"char code\"\r\tarray at: 4 put: EventKeyChar. \"key press/release\"\r\tarray at: 5 put: (kbd bitShift: -8). \"modifier keys\"\r\t^ array].\r\r\"Then check for mouse\"\rpos _ self primMousePt.\rbuttons _ mouseButtons.\rmodifiers _ buttons bitShift: -3.\rbuttons _ buttons bitAnd: 7.\rmapped _ self mapButtons: buttons modifiers: modifiers.\rarray \r\tat: 1 put: EventTypeMouse;\r\tat: 2 put: Time millisecondClockValue;\r\tat: 3 put: pos x;\r\tat: 4 put: pos y;\r\tat: 5 put: mapped;\r\tat: 6 put: modifiers.\r^ array\r\r! !\r!EventSensor methodsFor: 'private' stamp: 'ar 7/23/2000 00:34'!\rprimInterruptSemaphore: aSemaphore \r\"Primitive. Install the argument as the semaphore to be signalled whenever the user presses the interrupt key. The semaphore will be signaled once each time the interrupt key is pressed.\"\rinterruptSemaphore _ aSemaphore.\r\"backward compatibility: use the old primitive which is obsolete now\"\rsuper primInterruptSemaphore: aSemaphore! !\r!EventSensor methodsFor: 'private' stamp: 'ssa 12/16/2009 13:26'!\rprimKbdNext\r\"Allows for use of old Sensor protocol to get at the keyboard,\ras when running kbdTest or the InterpreterSimulator in Morphic\"\r| evtBuf |\rself fetchMoreEvents.\rkeyboardBuffer isEmpty ifFalse:[^ keyboardBuffer next].\reventQueue ifNotNil:\r\t[evtBuf _ eventQueue nextOrNilSuchThat: [:buf | self isKbdEvent: buf].\r\tself flushNonKbdEvents].\r^ evtBuf ifNotNil: [evtBuf at: 3]\r! !\r!EventSensor methodsFor: 'private' stamp: 'ssa 12/16/2009 13:26'!\rprimKbdPeek\r\"Allows for use of old Sensor protocol to get at the keyboard,\ras when running kbdTest or the InterpreterSimulator in Morphic\"\r| char |\r\rself fetchMoreEvents.\rkeyboardBuffer isEmpty ifFalse: [^ keyboardBuffer peek].\rchar _ nil.\reventQueue ifNotNil:\r\t[eventQueue nextOrNilSuchThat:  \"NOTE: must not return out of this block, so loop to end\"\r\t\t[:buf | (self isKbdEvent: buf) ifTrue: [char ifNil: [char _ buf at: 3]].\r\t\tfalse  \"NOTE: block value must be false so Queue won't advance\"]].\r^ char\r! !\r!EventSensor methodsFor: 'private' stamp: 'ssa 12/16/2009 13:26'!\rprimMouseButtons\r\r\tself fetchMoreEvents.\r\tself flushNonKbdEvents.\r\t^ mouseButtons! !\r!EventSensor methodsFor: 'private' stamp: 'ssa 12/16/2009 13:26'!\rprimMousePt\r\rself fetchMoreEvents.\rself flushNonKbdEvents.\r^ mousePosition\r! !\r!EventSensor methodsFor: 'private' stamp: 'ls 10/23/2000 14:14'!\rprimSetInterruptKey: anInteger\r\"Primitive. Register the given keycode as the user interrupt key. The low byte of the keycode is the ISO character and its next four bits are the Smalltalk modifer bits <cmd><opt><ctrl><shift>.\"\rinterruptKey _ anInteger.\r\"backward compatibility: use the old primitive which is obsolete now\"\rsuper primSetInterruptKey: anInteger! !\r!EventSensor methodsFor: 'private' stamp: 'JMM 11/7/2005 14:37'!\rwait2ms\r(Delay forMilliseconds: 2) wait.! !\r!EventSensor methodsFor: 'private-I/O' stamp: 'ssa 12/17/2009 13:21'!\rfetchMoreEvents\r\"Fetch more events from the VM\"\r| eventBuffer type |\r\r\"Reset input semaphore so clients can wait for the next events after this one.\"\rinputSemaphore isSignaled\r\tifTrue: [ hasInputSemaphore _ true.\r\t\tinputSemaphore initSignals ].\r\r\"Remember the last time that I checked for events.\"\rlastEventPoll := Time millisecondClockValue.\r\reventBuffer := Array new: 8.\r[self primGetNextEvent: eventBuffer.\rtype := eventBuffer at: 1.\rtype = EventTypeNone]\r\twhileFalse: [self processEvent: eventBuffer ].\r! !\r!EventSensor methodsFor: 'private-I/O' stamp: 'ar 7/30/2000 18:12'!\rmapButtons: buttons modifiers: modifiers\r\"Map the buttons to yellow or blue based on the given modifiers.\rIf only the red button is pressed, then map\r\tCtrl-RedButton -> BlueButton.\r\tCmd-RedButton -> YellowButton.\r\"\r(buttons = RedButtonBit)\r\tifFalse:[^buttons].\r(modifiers allMask: CtrlKeyBit) \r\tifTrue:[^BlueButtonBit].\r(modifiers allMask: CommandKeyBit) \r\tifTrue:[^YellowButtonBit].\r^buttons! !\r!EventSensor methodsFor: 'private-I/O' stamp: 'ssa 12/17/2009 13:30'!\rprimGetNextEvent: array\r\"Store the next OS event available into the provided array.\rEssential. If the VM is not event driven the ST code will fall\rback to the old-style mechanism and use the state based\rprimitives instead.\"\r| kbd buttons modifiers pos mapped |\r<primitive: 94>\r\r\"Simulate the events\"\rarray at: 1 put: EventTypeNone. \"assume no more events\"\r\r\"First check for keyboard\"\rkbd _ super primKbdNext.\rkbd = nil ifFalse:[\r\t\"simulate keyboard event\"\r\tarray at: 1 put: EventTypeKeyboard. \"evt type\"\r\tarray at: 2 put: Time millisecondClockValue. \"time stamp\"\r\tarray at: 3 put: (kbd bitAnd: 255). \"char code\"\r\tarray at: 4 put: EventKeyChar. \"key press/release\"\r\tarray at: 5 put: (kbd bitShift: -8). \"modifier keys\"\r\t^self].\r\r\"Then check for mouse\"\rbuttons _ super primMouseButtons.\rpos _ super primMousePt.\rmodifiers _ buttons bitShift: -3.\rbuttons _ buttons bitAnd: 7.\rmapped _ self mapButtons: buttons modifiers: modifiers.\r(pos = mousePosition and:[(mapped bitOr: (modifiers bitShift: 3)) = mouseButtons])\r\tifTrue:[^self].\rarray \r\tat: 1 put: EventTypeMouse;\r\tat: 2 put: Time millisecondClockValue;\r\tat: 3 put: pos x;\r\tat: 4 put: pos y;\r\tat: 5 put: mapped;\r\tat: 6 put: modifiers.\r! !\r!EventSensor methodsFor: 'private-I/O' stamp: 'ar 7/30/2000 18:16'!\rprimSetInputSemaphore: semaIndex\r\"Set the input semaphore the VM should use for asynchronously signaling the availability of events. Primitive. Optional.\"\r<primitive: 93>\r^nil! !\r!EventSensor methodsFor: 'private-I/O' stamp: 'ssa 12/17/2009 12:46'!\rprocessEvent: evt \r\"Process a single event. This method is run at high priority.\"\r| type |\rtype := evt at: 1.\r\"Tackle mouse events first\"\rtype = EventTypeMouse\r\tifTrue: [evt\r\t\t\tat: 5\r\t\t\tput: (ButtonDecodeTable at: (evt at: 5)\r\t\t\t\t\t\t+ 1). \r\t\t\tself queueEvent: evt.\r\t\t\tself processMouseEvent: evt . \r\t\t\t^self].\r\r\"Store the event in the queue if there's any\"\rtype = EventTypeKeyboard\r\tifTrue: [ \"Check if the event is a user interrupt\"\r\t\t((evt at: 4) = 0\r\t\t\tand: [((evt at: 3)\r\t\t\t\t\tbitOr: (((evt at: 5)\r\t\t\t\t\t\tbitAnd: 8)\r\t\t\t\t\t\tbitShift: 8))\r\t\t\t\t\t\t= interruptKey])\r\t\t\t\tifTrue: [\"interrupt key is meta - not reported as event\"\r\t\t\t\t\t\t^ interruptSemaphore signal].\r\t\t\"Else swap ctrl/alt keys if neeeded.wi\"\r\t\tKeyDecodeTable\r\t\t\tat: {evt at: 3. evt at: 5}\r\t\t\tifPresent: [:a | evt at: 3 put: a first;\r\t\t\t\t\t at: 5 put: a second]. \r\t\tself queueEvent: evt. \r\t\tself processKeyboardEvent: evt . \r\t\t^self ].\r\t\t\t\r\"Handle all events other than Keyborad or Mouse.\"\rself queueEvent: evt.\r! !\r!EventSensor methodsFor: 'private-I/O' stamp: 'ssa 12/16/2009 13:12'!\rprocessKeyboardEvent: evt\r\"process a keyboard event, updating InputSensor state\"\r| charCode pressCode |\r\"Never update keyboardBuffer if we have an eventQueue active\"\rmouseButtons _ (mouseButtons bitAnd: 7) bitOr: ((evt at: 5) bitShift: 3).\reventQueue ifNotNil:[^self]. \rcharCode _ evt at: 3.\rcharCode = nil ifTrue:[^self]. \"extra characters not handled in MVC\"\rpressCode _ evt at: 4.\rpressCode = EventKeyChar ifFalse:[^self]. \"key down/up not handled in MVC\"\r\"mix in modifiers\"\rcharCode _ charCode bitOr: ((evt at: 5) bitShift: 8).\rkeyboardBuffer nextPut: charCode .! !\r!EventSensor methodsFor: 'private-I/O' stamp: 'ar 8/16/2000 22:07'!\rprocessMouseEvent: evt\r\"process a mouse event, updating InputSensor state\"\r| modifiers buttons mapped |\rmousePosition _ (evt at: 3) @ (evt at: 4).\rbuttons _ evt at: 5.\rmodifiers _ evt at: 6.\rmapped _ self mapButtons: buttons modifiers: modifiers.\rmouseButtons _ mapped bitOr: (modifiers bitShift: 3).! !\r!EventSensor methodsFor: 'private-I/O' stamp: 'ssa 12/17/2009 14:17'!\rqueueEvent: evt\r\"Queue the given event in the event queue (if any).\rNote that the event buffer must be copied since it\rwill be reused later on.\"\reventQueue ifNil:[^self].\reventQueue nextPut: evt clone.! !\r!InstructionStream methodsFor: 'scanning' stamp: 'ssa 5/11/2010 16:14'!\rskipBackBeforeJump\r\"Assuming that the receiver is positioned jast after a jump, skip back one or two bytes, depending on the size of the previous jump instruction.\"\r| strm short |\rstrm _ InstructionStream on: self method.\r(strm scanFor: [:byte |\r\t((short _ byte between: 152 and: 159) or: [byte between: 168 and: 175])\r\t\tand: [strm pc = (short ifTrue: [pc-1] ifFalse: [pc-2])]]) ifFalse: [self error: 'Where''s the jump??'. self jump: 0].\rself jump: (short ifTrue: [-1] ifFalse: [-2]).\r! !\r!ContextPart methodsFor: 'debugger access' stamp: 'ssa 1/1/1970 00:36'!\rtempsAndValues\r\"Return a string of the temporary variabls and their current values\"\r| aStream |\raStream _ WriteStream on: (String new: 100).\rself tempNames\r\tdoWithIndex: [:title :index |\r\t\taStream nextPutAll: title; nextPut: $:; space; tab.\r\t\taStream nextPutAll:(RVMTester printPrefixFor:(self tempAt: index)).\r\t\t(self tempAt: index) printOn: aStream.\r\t\taStream cr].\r^aStream contents! !\r!ContextPart methodsFor: 'system simulation' stamp: 'ssa 9/7/2009 14:34'!\rrunSimulated: aBlock contextAtEachStep: block2\r\"Simulate the execution of the argument, aBlock, until it ends. aBlock \rMUST NOT contain an '^'. Evaluate block2 with the current context \rprior to each instruction executed. Answer the simulated value of aBlock.\"\r\r| current |\r(aBlock isBlock and: [aBlock hasMethodReturn])\r\tifTrue: [self error: 'simulation of blocks with ^ can run loose'].\rcurrent _ aBlock asContext.\rcurrent privSender: self.\r[current == self]\r\twhileFalse:\r\t\t[block2 value: current.\r\t\tcurrent _ current step].\r^ self pop! !\r!ContextPart methodsFor: 'private-exceptions' stamp: 'ssa 1/21/2010 16:20'!\runwindTo: aContext\r\r| ctx unwindBlock |\rctx := self.\r[(ctx _ ctx findNextUnwindContextUpTo: aContext) isNil] whileFalse: [\r\tunwindBlock := ctx tempAt: 1.\r\tunwindBlock == nil ifFalse: [\r\t\tctx tempAt: 1 put: nil.\r\t\tunwindBlock value]\r].\r! !\r!BlockContext methodsFor: 'evaluating' stamp: 'dmu 8/17/2009 21:52'!\rvalue: arg1 value: arg2 value: arg3 value: arg4  value: arg5\r\"Primitive. Evaluate the block represented by the receiver. Fail if the \rblock expects other than three arguments or if the block is already being \rexecuted. Optional. See Object documentation whatIsAPrimitive.\"\r\r<primitive: 81>\r^self valueWithArguments: \r\t(Array\r\t\twith: arg1\r\t\twith: arg2\r\t\twith: arg3\r\t\twith: arg4\r\t\twith: arg5)! !\r!BlockContext methodsFor: 'controlling' stamp: 'ssa 8/24/2009 16:18'!\rloopExit\r[self value: [^ self]] repeat! !\r!BlockContext methodsFor: 'controlling' stamp: 'ssa 8/24/2009 16:43'!\runtilFalse: aBlock\r\r[self value. aBlock value ifFalse: [^ self]] repeat\r\r! !\r!BlockContext methodsFor: 'scheduling' stamp: 'dmu 4/7/2009 02:38'!\rforkOn: aCore\r\"Create and schedule a Process running the code in the receiver.\"\r\r^ self newProcess resumeOn: aCore! !\r!BlockContext methodsFor: 'scheduling' stamp: 'ssa 4/8/2009 20:09'!\rforkOn: aCore with: anObject\r\"Create and schedule a Process running the code in the receiver.\"\r\r^ (self newProcessWith: anObject) resumeOn: aCore! !\r!BlockContext methodsFor: 'scheduling' stamp: 'ssa 4/8/2009 20:08'!\rforkOn: aCore with: anObject at: aPriority\r\"Create and schedule a Process running the code in the receiver.\"\r\r| proc |\rproc _ self newProcessWith: anObject.\rproc priority: aPriority.\r^proc resumeOn: aCore! !\r!BlockContext methodsFor: 'scheduling' stamp: 'dmu 4/7/2009 02:34'!\rforkWith: anObject\r\"Create and schedule a Process running the code in the receiver.\"\r\r^ (self newProcessWith: anObject) resume! !\r!BlockContext methodsFor: 'scheduling' stamp: 'dmu 4/7/2009 02:33'!\rnewProcessWith: anObject\r\"Answer a Process running the code in the receiver. The process is not \rscheduled.\"\r<primitive: 19> \"Simulation guard\"\r^Process\r\tforContext: \r\t\t[self value: anObject.\r\t\tProcessor terminateActive]\r\tpriority: Processor activePriority! !\r!BlockContext methodsFor: 'printing' stamp: 'ssa 11/27/2009 16:55'!\rasString\r\r| str |\rstr _ (((self decompile ifNil: ['--source missing--']) printString\r\t\t\t\t\treplaceAll: Character cr with: Character space)\r\t\t\t\t\t\treplaceAll: Character tab with: Character space).\r^str copyFrom: 2 to: str size - 1! !\r!BlockContext methodsFor: 'printing' stamp: 'ssa 8/27/2009 06:12'!\rprintOn: aStream\r| blockString truncatedBlockString |\raStream nextPutAll:(RVMTester printPrefixFor: self).\rhome == nil ifTrue: [^aStream nextPutAll: 'a BlockContext with home=nil'].\raStream nextPutAll: '[] in '.\rsuper printOn: aStream.\raStream nextPutAll: ' '.\rblockString _ ((self decompile ifNil: ['--source missing--']) printString\r\t\t\t\t\treplaceAll: Character cr with: Character space)\r\t\t\t\t\t\treplaceAll: Character tab with: Character space.\rtruncatedBlockString _ blockString truncateWithElipsisTo: 800.\rtruncatedBlockString size < blockString size ifTrue:\r\t[truncatedBlockString _ truncatedBlockString, ']}'].\raStream nextPutAll: truncatedBlockString.\r! !\r!BlockContext methodsFor: 'private' stamp: 'dmu 11/25/2008 00:18'!\rvalueUnpreemptively\r\t\"Evaluate the receiver (block), without the possibility of preemption by higher priority processes. Use this facility VERY sparingly!!\"\r\t\"Think about using Block>>valueUninterruptably first, and think about using Semaphore>>critical: before that, and think about redesigning your application even before that!! \r\tAfter you've done all that thinking, go right ahead and use it...\"\r\t| activeProcess oldPriority result |\r\tactiveProcess := Processor thisProcess.\r\toldPriority := activeProcess priority.\r\tactiveProcess priority: Processor highestPriority.\r\tresult := self ensure: [activeProcess priority: oldPriority].\r\t\"Yield after restoring priority to give the preempted processes a chance to run\"\r\tProcessor yield.\r\t^result! !\r!BlockContext methodsFor: 'converting' stamp: 'ssa 9/7/2009 14:36'!\rasContext\r\r^self! !\r!JPEGColorComponent methodsFor: 'accessing' stamp: 'tao 10/23/97 12:21'!\racTableIndex\r\r^acTableIndex! !\r!JPEGColorComponent methodsFor: 'accessing' stamp: 'tao 10/23/97 12:20'!\racTableIndex: anInteger\r\racTableIndex _ anInteger! !\r!JPEGColorComponent methodsFor: 'accessing' stamp: 'tao 10/23/97 12:21'!\rdcTableIndex\r\r^dcTableIndex! !\r!JPEGColorComponent methodsFor: 'accessing' stamp: 'tao 10/23/97 12:20'!\rdcTableIndex: anInteger\r\rdcTableIndex _ anInteger! !\r!JPEGColorComponent methodsFor: 'accessing' stamp: 'tao 10/23/97 12:11'!\rheightInBlocks\r\r^heightInBlocks! !\r!JPEGColorComponent methodsFor: 'accessing' stamp: 'tao 10/23/97 12:10'!\rheightInBlocks: anInteger\r\rheightInBlocks _ anInteger! !\r!JPEGColorComponent methodsFor: 'accessing' stamp: 'tao 10/23/97 12:09'!\rid\r\r^id! !\r!JPEGColorComponent methodsFor: 'accessing' stamp: 'tao 10/23/97 12:09'!\rid: anObject\r\rid _ anObject! !\r!JPEGColorComponent methodsFor: 'accessing' stamp: 'ar 3/4/2001 01:19'!\rmcuWidth: mw mcuHeight: mh dctSize: ds\r\rmcuWidth _ mw.\rmcuHeight _ mh.\rdctSize _ ds.\rhSampleFactor _ mcuWidth // widthInBlocks.\rvSampleFactor _ mcuHeight // heightInBlocks! !\r!JPEGColorComponent methodsFor: 'accessing' stamp: 'tao 10/23/97 12:15'!\rpriorDCValue: aNumber\r\rpriorDCValue _ aNumber! !\r!JPEGColorComponent methodsFor: 'accessing' stamp: 'tao 10/23/97 12:43'!\rqTableIndex\r^qTableIndex! !\r!JPEGColorComponent methodsFor: 'accessing' stamp: 'tao 10/23/97 12:11'!\rqTableIndex: anInteger\r\rqTableIndex _ anInteger! !\r!JPEGColorComponent methodsFor: 'accessing' stamp: 'tao 10/23/97 12:18'!\rtotalMcuBlocks\r\r^ heightInBlocks * widthInBlocks! !\r!JPEGColorComponent methodsFor: 'accessing' stamp: 'tao 10/23/97 12:16'!\rupdateDCValue: aNumber\r\rpriorDCValue _ priorDCValue + aNumber.\r^priorDCValue! !\r!JPEGColorComponent methodsFor: 'accessing' stamp: 'tao 10/23/97 12:11'!\rwidthInBlocks\r\r^widthInBlocks! !\r!JPEGColorComponent methodsFor: 'accessing' stamp: 'tao 10/23/97 12:10'!\rwidthInBlocks: anInteger\r\rwidthInBlocks _ anInteger! !\r!JPEGColorComponent methodsFor: 'sample streaming' stamp: 'tao 10/23/97 12:24'!\rinitializeSampleStreamBlocks: aCollection\r\rmcuBlocks _ aCollection.\rself resetSampleStream! !\r!JPEGColorComponent methodsFor: 'sample streaming' stamp: 'ar 3/4/2001 22:16'!\rnextSample\r\r| dx dy blockIndex sampleIndex sample |\rdx _ currentX // hSampleFactor.\rdy _ currentY // vSampleFactor.\rblockIndex _ dy // dctSize * widthInBlocks + (dx // dctSize) + 1.\rsampleIndex _ dy \\\\ dctSize * dctSize + (dx \\\\ dctSize) + 1.\rsample _ (mcuBlocks at: blockIndex) at: sampleIndex.\rcurrentX _ currentX + 1.\rcurrentX < (mcuWidth * dctSize)\r\tifFalse:\r\t\t[currentX _ 0.\r\t\tcurrentY _ currentY + 1].\r^ sample! !\r!JPEGColorComponent methodsFor: 'sample streaming' stamp: 'tao 10/23/97 12:24'!\rresetSampleStream\r\rcurrentX _ 0.\rcurrentY _ 0! !\r!JPEGHuffmanTable methodsFor: 'accessing' stamp: 'tao 10/20/97 14:27'!\rbits: anObject\r\rbits _ anObject! !\r!JPEGHuffmanTable methodsFor: 'accessing' stamp: 'tao 10/21/97 23:31'!\rlookaheadBits\r^lookaheadBits! !\r!JPEGHuffmanTable methodsFor: 'accessing' stamp: 'tao 10/21/97 23:38'!\rlookaheadSymbol\r^lookaheadSymbol! !\r!JPEGHuffmanTable methodsFor: 'accessing' stamp: 'tao 10/21/97 23:59'!\rmaxcode\r^maxcode! !\r!JPEGHuffmanTable methodsFor: 'accessing' stamp: 'tao 10/20/97 14:27'!\rvalues: anObject\r\rvalues _ anObject! !\r!JPEGHuffmanTable methodsFor: 'computation' stamp: 'tao 10/24/97 12:28'!\rmakeDerivedTables\r\r| huffSize huffCode code si index lookbits |\rmincode _ Array new: 16.\rmaxcode _ Array new: 17.\rvalptr _ Array new: 17.\rhuffSize _ OrderedCollection new.\r1 to: 16 do: [:l | 1 to: (bits at: l) do: [:i | huffSize add: l]].\rhuffSize add: 0.\rcode _ 0.\rhuffCode _ Array new: huffSize size.\rsi _ huffSize at: 1.\rindex _ 1.\r[(huffSize at: index) ~= 0] whileTrue:\r\t[[(huffSize at: index) = si] whileTrue:\r\t\t[huffCode at: index put: code.\r\t\tindex _ index + 1.\r\t\tcode _ code + 1].\r\tcode _ code << 1.\r\tsi _ si + 1].\r\rindex _ 1.\r1 to: 16 do:\r\t[:l |\r\t(bits at: l) ~= 0\r\t\tifTrue:\r\t\t\t[valptr at: l put: index.\r\t\t\tmincode at: l put: (huffCode at: index).\r\t\t\tindex _ index + (bits at: l).\r\t\t\tmaxcode at: l put: (huffCode at: index-1)]\r\t\tifFalse:\r\t\t\t[maxcode at: l put: -1]].\rmaxcode at: 17 put: 16rFFFFF.\r\rlookaheadBits _ (Array new: 1 << Lookahead) atAllPut: 0.\rlookaheadSymbol _ Array new: 1 << Lookahead.\rindex _ 1.\r1 to: Lookahead do:\r\t[:l |\r\t1 to: (bits at: l) do:\r\t\t[:i |\r\t\tlookbits _ (huffCode at: index) << (Lookahead - l) + 1.\r\t\t(1 << (Lookahead - l) to: 1 by: -1) do:\r\t\t\t[:ctr |\r\t\t\tlookaheadBits at: lookbits put: l.\r\t\t\tlookaheadSymbol at: lookbits put: (values at: index).\r\t\t\tlookbits _ lookbits + 1].\r\t\tindex _ index + 1]]! !\r!JPEGHuffmanTable methodsFor: 'computation' stamp: 'tao 10/21/97 22:44'!\rvalueForCode: code length: length\r\r^ values at: ((valptr at: length) + code - (mincode at: length))! !\r!JPEGReadWriter methodsFor: 'accessing' stamp: 'tao 10/19/97 13:46'!\rhACTable\r\rhACTable ifNil: [hACTable _ Array new: HuffmanTableSize].\r^ hACTable! !\r!JPEGReadWriter methodsFor: 'accessing' stamp: 'tao 10/19/97 13:46'!\rhDCTable\r\rhDCTable ifNil: [hDCTable _ Array new: HuffmanTableSize].\r^ hDCTable! !\r!JPEGReadWriter methodsFor: 'accessing' stamp: 'tao 10/19/97 08:46'!\rqTable\r\rqTable ifNil: [qTable _ Array new: QuantizationTableSize].\r^ qTable! !\r!JPEGReadWriter methodsFor: 'colorspace conversion' stamp: 'ar 3/4/2001 22:18'!\rcolorConvertFloatYCbCrMCU\r\r| ySampleStream crSampleStream cbSampleStream y cb cr red green blue bits |\rySampleStream _ currentComponents at: 1.\rcbSampleStream _ currentComponents at: 2.\rcrSampleStream _ currentComponents at: 3.\rySampleStream resetSampleStream.\rcbSampleStream resetSampleStream.\rcrSampleStream resetSampleStream.\rbits _ mcuImageBuffer bits.\r1 to: bits size do:\r\t[:i |\r\ty _ ySampleStream nextSample.\r\tcb _ cbSampleStream nextSample - FloatSampleOffset.\r\tcr _ crSampleStream nextSample - FloatSampleOffset.\r\tred _ self sampleFloatRangeLimit: (y + (1.40200 * cr)).\r\tgreen _ self sampleFloatRangeLimit: (y - (0.34414 * cb) - (0.71414 * cr)).\r\tblue _ self sampleFloatRangeLimit: (y + (1.77200 * cb)).\r\tbits at: i put: 16rFF000000 + (red << 16) + (green << 8) + blue].\r! !\r!JPEGReadWriter methodsFor: 'colorspace conversion' stamp: 'ar 3/4/2001 22:17'!\rcolorConvertGrayscaleMCU\r\r| ySampleStream y bits |\rySampleStream _ currentComponents at: 1.\rySampleStream resetSampleStream.\rbits _ mcuImageBuffer bits.\r1 to: bits size do:\r\t[:i |\r\ty _ (ySampleStream nextSample) + (residuals at: 2).\r\ty > MaxSample ifTrue: [y _ MaxSample].\r\tresiduals at: 2 put: (y bitAnd: ditherMask).\r\ty _ y bitAnd: MaxSample - ditherMask.\r\ty < 1 ifTrue: [y _ 1].\r\tbits at: i put: 16rFF000000 + (y<<16) + (y<<8) + y].\r! !\r!JPEGReadWriter methodsFor: 'colorspace conversion' stamp: 'ar 3/4/2001 22:18'!\rcolorConvertIntYCbCrMCU\r\r| ySampleStream crSampleStream cbSampleStream y cb cr red green blue bits |\rySampleStream _ currentComponents at: 1.\rcbSampleStream _ currentComponents at: 2.\rcrSampleStream _ currentComponents at: 3.\rySampleStream resetSampleStream.\rcbSampleStream resetSampleStream.\rcrSampleStream resetSampleStream.\rbits _ mcuImageBuffer bits.\r1 to: bits size do:\r\t[:i |\r\ty _ ySampleStream nextSample.\r\tcb _ cbSampleStream nextSample - SampleOffset.\r\tcr _ crSampleStream nextSample - SampleOffset.\r\tred _ y + ((FIXn1n40200 * cr) // 65536) + (residuals at: 1).\r\tred > MaxSample\r\t\tifTrue: [red _ MaxSample]\r\t\tifFalse: [red < 0 ifTrue: [red _ 0]].\r\tresiduals at: 1 put: (red bitAnd: ditherMask).\r\tred _ red bitAnd: MaxSample - ditherMask.\r\tred < 1 ifTrue: [red _ 1].\r\tgreen _ y - ((FIXn0n34414 * cb) // 65536) -\r\t\t((FIXn0n71414 * cr) // 65536) + (residuals at: 2).\r\tgreen > MaxSample\r\t\tifTrue: [green _ MaxSample]\r\t\tifFalse: [green < 0 ifTrue: [green _ 0]].\r\tresiduals at: 2 put: (green bitAnd: ditherMask).\r\tgreen _ green bitAnd: MaxSample - ditherMask.\r\tgreen < 1 ifTrue: [green _ 1].\r\tblue _ y + ((FIXn1n77200 * cb) // 65536) + (residuals at: 3).\r\tblue > MaxSample\r\t\tifTrue: [blue _ MaxSample]\r\t\tifFalse: [blue < 0 ifTrue: [blue _ 0]].\r\tresiduals at: 3 put: (blue bitAnd: ditherMask).\r\tblue _ blue bitAnd: MaxSample - ditherMask.\r\tblue < 1 ifTrue: [blue _ 1].\r\tbits at: i put: 16rFF000000 + (red bitShift: 16) + (green bitShift: 8) + blue].\r! !\r!JPEGReadWriter methodsFor: 'colorspace conversion' stamp: 'ar 3/7/2001 01:02'!\rcolorConvertMCU\r\r^ currentComponents size = 3\r\tifTrue:\r\t\t[self useFloatingPoint\r\t\t\tifTrue: [self colorConvertFloatYCbCrMCU]\r\t\t\tifFalse: [self primColorConvertYCbCrMCU: currentComponents\r\t\t\t\t\t\t\tbits: mcuImageBuffer bits\r\t\t\t\t\t\t\tresiduals: residuals\r\t\t\t\t\t\t\tditherMask: ditherMask.]]\r\tifFalse: [self primColorConvertGrayscaleMCU]! !\r!JPEGReadWriter methodsFor: 'colorspace conversion' stamp: 'ar 3/4/2001 22:19'!\rprimColorConvertGrayscaleMCU\rself primColorConvertGrayscaleMCU: (currentComponents at: 1)\r\t\tbits: mcuImageBuffer bits\r\t\tresiduals: residuals\r\t\tditherMask: ditherMask.! !\r!JPEGReadWriter methodsFor: 'colorspace conversion' stamp: 'ar 3/15/2001 18:11'!\rprimColorConvertGrayscaleMCU: componentArray bits: bits residuals: residualArray ditherMask: mask\r<primitive: 'primitiveColorConvertGrayscaleMCU' module: 'JPEGReaderPlugin'>\r\"JPEGReaderPlugin doPrimitive: #primitiveColorConvertGrayscaleMCU.\"\r^self colorConvertGrayscaleMCU! !\r!JPEGReadWriter methodsFor: 'colorspace conversion' stamp: 'ar 3/4/2001 21:36'!\rprimColorConvertIntYCbCrMCU\rself primColorConvertYCbCrMCU: currentComponents\r\t\tbits: mcuImageBuffer bits\r\t\tresiduals: residuals\r\t\tditherMask: ditherMask.! !\r!JPEGReadWriter methodsFor: 'colorspace conversion' stamp: 'ar 3/4/2001 21:36'!\rprimColorConvertYCbCrMCU: componentArray bits: bits residuals: residualArray ditherMask: mask\r<primitive: 'primitiveColorConvertMCU' module: 'JPEGReaderPlugin'>\r^self colorConvertIntYCbCrMCU! !\r!JPEGReadWriter methodsFor: 'colorspace conversion' stamp: 'tao 10/26/97 15:43'!\rsampleFloatRangeLimit: aNumber\r\r^ (aNumber rounded max: 0) min: MaxSample! !\r!JPEGReadWriter methodsFor: 'colorspace conversion' stamp: 'di 9/15/1998 14:30'!\rsampleRangeLimit: aNumber\r\raNumber < 0 ifTrue: [^ 0].\raNumber > MaxSample ifTrue: [^ MaxSample].\r^ aNumber! !\r!JPEGReadWriter methodsFor: 'dct' stamp: 'tao 10/26/97 15:16'!\rdctFloatRangeLimit: value\r\r^ (value / 8.0) + FloatSampleOffset.! !\r!JPEGReadWriter methodsFor: 'dct' stamp: 'tao 10/26/97 16:34'!\ridctBlockFloat: anArray component: aColorComponent\r\r| t0 t1 t2 t3 t4 t5 t6 t7 t10 t11 t12 t13 z5 z10 z11 z12 z13 qt ws |\rqt _ self qTable at: (aColorComponent qTableIndex).\rws _ Array new: DCTSize2.\r\r\"Pass 1: process columns from input, store into work array\"\r1 to: DCTSize do: [:i |\r\tt0 _ (anArray at: i) * (qt at: i).\r\tt1 _ (anArray at: (DCTSize*2 + i)) * (qt at: (DCTSize*2 + i)).\r\tt2 _ (anArray at: (DCTSize*4 + i)) * (qt at: (DCTSize*4 + i)).\r\tt3 _ (anArray at: (DCTSize*6 + i)) * (qt at: (DCTSize*6 + i)).\r\tt10 _ t0 + t2.\r\tt11 _ t0 - t2.\r\tt13 _ t1 + t3.\r\tt12 _ (t1 - t3) * DCTK1 - t13.\r\tt0 _ t10 + t13.\r\tt3 _ t10 - t13.\r\tt1 _ t11 + t12.\r\tt2 _ t11 - t12.\r\tt4 _ (anArray at: (DCTSize + i)) * (qt at: (DCTSize + i)).\r\tt5 _ (anArray at: (DCTSize*3 + i)) * (qt at: (DCTSize*3 + i)).\r\tt6 _ (anArray at: (DCTSize*5 + i)) * (qt at: (DCTSize*5 + i)).\r\tt7 _ (anArray at: (DCTSize*7 + i)) * (qt at: (DCTSize*7 + i)).\r\tz13 _ t6 + t5.\r\tz10 _ t6 - t5.\r\tz11 _ t4 + t7.\r\tz12 _ t4 - t7.\r\tt7 _ z11 + z13.\r\tt11 _ (z11 - z13) * DCTK1.\r\tz5 _ (z10 + z12) * DCTK2.\r\tt10 _ DCTK3 * z12 - z5.\r\tt12 _ DCTK4 * z10 + z5.\r\tt6 _ t12 - t7.\r\tt5 _ t11 - t6.\r\tt4 _ t10 + t5.\r\tws at: i put: t0 + t7.\r\tws at: (DCTSize*7 + i) put: t0 - t7.\r\tws at: (DCTSize + i) put: t1 + t6.\r\tws at: (DCTSize*6 + i) put: t1 - t6.\r\tws at: (DCTSize*2 + i) put: t2 + t5.\r\tws at: (DCTSize*5 + i) put: t2 - t5.\r\tws at: (DCTSize*4 + i) put: t3 + t4.\r\tws at: (DCTSize*3 + i) put: t3 - t4].\r\r\t\"Pass 2: process rows from the workspace\"\r(0 to: DCTSize2-DCTSize by: DCTSize) do: [:i |\r\tt10 _ (ws at: (i+1)) + (ws at: (i+5)).\r\tt11 _ (ws at: (i+1)) - (ws at: (i+5)).\r\tt13 _ (ws at: (i+3)) + (ws at: (i+7)).\r\tt12 _ ((ws at: (i+3)) - (ws at: (i+7))) * DCTK1 - t13.\r\tt0 _ t10 + t13.\r\tt3 _ t10 - t13.\r\tt1 _ t11 + t12.\r\tt2 _ t11 - t12.\r\tz13 _ (ws at: (i+6)) + (ws at: (i+4)).\r\tz10 _ (ws at: (i+6)) - (ws at: (i+4)).\r\tz11 _ (ws at: (i+2)) + (ws at: (i+8)).\r\tz12 _ (ws at: (i+2)) - (ws at: (i+8)).\r\tt7 _ z11 + z13.\r\tt11 _ (z11 - z13) * DCTK1.\r\tz5 _ (z10 + z12) * DCTK2.\r\tt10 _ DCTK3 * z12 - z5.\r\tt12 _ DCTK4 * z10 + z5.\r\tt6 _ t12 - t7.\r\tt5 _ t11 - t6.\r\tt4 _ t10 + t5.\r\r\t\"final output stage: scale down by a factor of 8 and range-limit\"\r\tanArray at: (i+1) put: (self dctFloatRangeLimit: (t0 + t7)).\r\tanArray at: (i+8) put: (self dctFloatRangeLimit: (t0 - t7)).\r\tanArray at: (i+2) put: (self dctFloatRangeLimit: (t1 + t6)).\r\tanArray at: (i+7) put: (self dctFloatRangeLimit: (t1 - t6)).\r\tanArray at: (i+3) put: (self dctFloatRangeLimit: (t2 + t5)).\r\tanArray at: (i+6) put: (self dctFloatRangeLimit: (t2 - t5)).\r\tanArray at: (i+5) put: (self dctFloatRangeLimit: (t3 + t4)).\r\tanArray at: (i+4) put: (self dctFloatRangeLimit: (t3 - t4))]\r\r\r! !\r!JPEGReadWriter methodsFor: 'dct' stamp: 'ar 3/4/2001 21:35'!\ridctBlockInt: anArray component: aColorComponent\r^self idctBlockInt: anArray qt: (self qTable at: aColorComponent qTableIndex)! !\r!JPEGReadWriter methodsFor: 'dct' stamp: 'ar 3/4/2001 21:34'!\ridctBlockInt: anArray qt: qt\r\r|  ws anACTerm dcval z1 z2 z3 z4 z5 t0 t1 t2 t3 t10 t11 t12 t13 shift |\rws _ Array new: DCTSize2.\r\r\"Pass 1: process columns from anArray, store into work array\"\rshift _ 1 bitShift: ConstBits - Pass1Bits.\r1 to: DCTSize do:\r\t[:i |\r\tanACTerm _ nil.\r\t1 to: DCTSize-1 do:[:row|\r\t\tanACTerm ifNil:[\r\t\t\t(anArray at: row * DCTSize + i) = 0 ifFalse:[anACTerm _ row]]].\r\tanACTerm == nil\r\t\tifTrue:\r\t\t\t[dcval _ (anArray at: i) * (qt at: 1) bitShift: Pass1Bits.\r\t\t\t0 to: DCTSize-1 do: [:j | ws at: (j * DCTSize + i) put: dcval]]\r\t\tifFalse:\r\t\t\t[z2 _ (anArray at: (DCTSize * 2 + i)) * (qt at: (DCTSize * 2 + i)).\r\t\t\tz3 _ (anArray at: (DCTSize * 6 + i)) * (qt at: (DCTSize * 6 + i)).\r\t\t\tz1 _ (z2 + z3) * FIXn0n541196100.\r\t\t\tt2 _ z1 + (z3 * FIXn1n847759065 negated).\r\t\t\tt3 _ z1 + (z2 * FIXn0n765366865).\r\t\t\tz2 _ (anArray at: i) * (qt at: i).\r\t\t\tz3 _ (anArray at: (DCTSize * 4 + i)) * (qt at: (DCTSize * 4 + i)).\r\t\t\tt0 _ (z2 + z3) bitShift: ConstBits.\r\t\t\tt1 _ (z2 - z3) bitShift: ConstBits.\r\t\t\tt10 _ t0 + t3.\r\t\t\tt13 _ t0 - t3.\r\t\t\tt11 _ t1 + t2.\r\t\t\tt12 _ t1 - t2.\r\t\t\tt0 _ (anArray at: (DCTSize * 7 + i)) * (qt at: (DCTSize * 7 + i)).\r\t\t\tt1 _ (anArray at: (DCTSize * 5 + i)) * (qt at: (DCTSize * 5 + i)).\r\t\t\tt2 _ (anArray at: (DCTSize * 3 + i)) * (qt at: (DCTSize * 3 + i)).\r\t\t\tt3 _ (anArray at: (DCTSize + i)) * (qt at: (DCTSize + i)).\r\t\t\tz1 _ t0 + t3.\r\t\t\tz2 _ t1 + t2.\r\t\t\tz3 _ t0 + t2.\r\t\t\tz4 _ t1 + t3.\r\t\t\tz5 _ (z3 + z4) * FIXn1n175875602.\r\t\t\tt0 _ t0 * FIXn0n298631336.\r\t\t\tt1 _ t1 * FIXn2n053119869.\r\t\t\tt2 _ t2 * FIXn3n072711026.\r\t\t\tt3 _ t3 * FIXn1n501321110.\r\t\t\tz1 _ z1 * FIXn0n899976223 negated.\r\t\t\tz2 _ z2 * FIXn2n562915447 negated.\r\t\t\tz3 _ z3 * FIXn1n961570560 negated.\r\t\t\tz4 _ z4 * FIXn0n390180644 negated.\r\t\t\tz3 _ z3 + z5.\r\t\t\tz4 _ z4 + z5.\r\t\t\tt0 _ t0 + z1 + z3.\r\t\t\tt1 _ t1 +z2 +z4.\r\t\t\tt2 _ t2 + z2 + z3.\r\t\t\tt3 _ t3 + z1 + z4.\r\t\t\tws at: i put: (t10 + t3) >> (ConstBits - Pass1Bits).\r\t\t\tws at: (DCTSize * 7 + i) put: (t10 - t3) // shift.\r\t\t\tws at: (DCTSize * 1 + i) put: (t11 + t2) // shift.\r\t\t\tws at: (DCTSize * 6 + i) put: (t11 - t2) // shift.\r\t\t\tws at: (DCTSize * 2 + i) put: (t12 + t1) // shift.\r\t\t\tws at: (DCTSize * 5 + i) put: (t12 - t1) // shift.\r\t\t\tws at: (DCTSize * 3 + i) put: (t13 + t0) // shift.\r\t\t\tws at: (DCTSize * 4 + i) put: (t13 - t0) // shift]].\r\r\"Pass 2: process rows from work array, store back into anArray\"\rshift _ 1 bitShift: ConstBits + Pass1Bits + 3.\r0 to: DCTSize2-DCTSize by: DCTSize do:\r\t[:i |\r\tz2 _ ws at: i + 3.\r\tz3 _ ws at: i + 7.\r\tz1 _ (z2 + z3) * FIXn0n541196100.\r\tt2 _ z1 + (z3 * FIXn1n847759065 negated).\r\tt3 _ z1 + (z2 * FIXn0n765366865).\r\tt0 _ (ws at: (i + 1)) + (ws at: (i + 5)) bitShift: ConstBits.\r\tt1 _ (ws at: (i + 1)) - (ws at: (i + 5)) bitShift: ConstBits.\r\tt10 _ t0 + t3.\r\tt13 _ t0 - t3.\r\tt11 _ t1 + t2.\r\tt12 _ t1 -t2.\r\tt0 _ ws at: (i + 8).\r\tt1 _ ws at: (i + 6).\r\tt2 _ ws at: (i + 4).\r\tt3 _ ws at: (i + 2).\r\tz1 _ t0 + t3.\r\tz2 _ t1 + t2.\r\tz3 _ t0 + t2.\r\tz4 _ t1 + t3.\r\tz5 _ (z3 + z4) * FIXn1n175875602.\r\tt0 _ t0 * FIXn0n298631336.\r\tt1 _ t1 * FIXn2n053119869.\r\tt2 _ t2 * FIXn3n072711026.\r\tt3 _ t3 * FIXn1n501321110.\r\tz1 _ z1 * FIXn0n899976223 negated.\r\tz2 _ z2 * FIXn2n562915447 negated.\r\tz3 _ z3 * FIXn1n961570560 negated.\r\tz4 _ z4 * FIXn0n390180644 negated.\r\tz3 _ z3 + z5.\r\tz4 _ z4 + z5.\r\tt0 _ t0 + z1 + z3.\r\tt1 _ t1 + z2 + z4.\r\tt2 _ t2 + z2 + z3.\r\tt3 _ t3 + z1 + z4.\r\tanArray at: (i + 1) put: (self sampleRangeLimit: (t10 + t3) // shift + SampleOffset).\r\tanArray at: (i + 8) put: (self sampleRangeLimit: (t10 - t3) // shift + SampleOffset).\r\tanArray at: (i + 2) put: (self sampleRangeLimit: (t11 + t2) // shift + SampleOffset).\r\tanArray at: (i + 7) put: (self sampleRangeLimit: (t11 - t2) // shift + SampleOffset).\r\tanArray at: (i + 3) put: (self sampleRangeLimit: (t12 + t1) // shift + SampleOffset).\r\tanArray at: (i + 6) put: (self sampleRangeLimit: (t12 - t1) // shift + SampleOffset).\r\tanArray at: (i + 4) put: (self sampleRangeLimit: (t13 + t0) // shift + SampleOffset).\r\tanArray at: (i + 5) put: (self sampleRangeLimit: (t13 - t0) // shift + SampleOffset)].\r\r\r! !\r!JPEGReadWriter methodsFor: 'dct' stamp: 'ar 3/7/2001 00:58'!\ridctMCU\r\r| comp fp ci |\rfp _ self useFloatingPoint.\r1 to: mcuMembership size do:[:i|\r\tci _ mcuMembership at: i.\r\tcomp _ currentComponents at: ci.\r\tfp ifTrue:[\r\t\tself idctBlockFloat: (mcuSampleBuffer at: i) component: comp.\r\t] ifFalse:[\r\t\tself primIdctInt: (mcuSampleBuffer at: i)\r\t\t\tqt: (qTable at: comp qTableIndex)]].! !\r!JPEGReadWriter methodsFor: 'dct' stamp: 'ar 3/4/2001 21:37'!\rprimIdctBlockInt: anArray component: aColorComponent\r^self primIdctInt: anArray qt: (self qTable at: aColorComponent qTableIndex)! !\r!JPEGReadWriter methodsFor: 'dct' stamp: 'ar 3/4/2001 21:35'!\rprimIdctInt: anArray qt: qt\r<primitive: 'primitiveIdctInt' module: 'JPEGReaderPlugin'>\r^self idctBlockInt: anArray qt: qt! !\r!JPEGReadWriter methodsFor: 'dct' stamp: 'tao 10/26/97 16:16'!\rscaleQuantizationTable: table\r\r| index |\r\rindex _ 1.\r1 to: DCTSize do:\r\t[:row |\r\t1 to: DCTSize do:\r\t\t[:col |\r\t\ttable at: index\r\t\t\tput: ((table at: index) * (QTableScaleFactor at: row) *\r\t\t\t\t(QTableScaleFactor at: col)) rounded.\r\t\tindex _ index + 1]].\r^ table\r! !\r!JPEGReadWriter methodsFor: 'error handling' stamp: 'tao 10/19/97 12:25'!\rnotSupported: aString\r\rself error: aString , ' is not currently supported'! !\r!JPEGReadWriter methodsFor: 'huffman encoding' stamp: 'ar 3/4/2001 20:55'!\rdecodeBlockInto: anArray component: aColorComponent dcTable: huffmanDC acTable: huffmanAC\r\r| byte i zeroCount |\rbyte _ stream decodeValueFrom: huffmanDC.\rbyte ~= 0 ifTrue: [byte _ self scaleAndSignExtend: ( self getBits: byte) inFieldWidth: byte].\rbyte _ aColorComponent updateDCValue: byte.\ranArray atAllPut: 0.\ranArray at: 1 put: byte.\ri _ 2.\r[i <= DCTSize2] whileTrue:\r\t[byte _ stream decodeValueFrom: huffmanAC.\r\tzeroCount _ byte >> 4.\r\tbyte _ byte bitAnd: 16r0F.\r\tbyte ~= 0\r\t\tifTrue:\r\t\t\t[i _ i + zeroCount.\r\t\t\tbyte _ self scaleAndSignExtend: ( self getBits: byte) inFieldWidth: byte.\r\t\t\tanArray at:\t (JPEGNaturalOrder at: i) put: byte]\r\t\tifFalse:\r\t\t\t[zeroCount = 15 ifTrue: [i _ i + zeroCount] ifFalse: [^ self]].\r\ti _ i + 1]\r\t! !\r!JPEGReadWriter methodsFor: 'huffman encoding' stamp: 'ar 3/7/2001 01:00'!\rdecodeMCU\r\r| comp ci |\r(restartInterval ~= 0 and: [restartsToGo = 0]) ifTrue: [self processRestart].\r1 to: mcuMembership size do:[:i|\r\tci _ mcuMembership at: i.\r\tcomp _ currentComponents at: ci.\r\tself\r\t\tprimDecodeBlockInto: (mcuSampleBuffer at: i)\r\t\tcomponent: comp\r\t\tdcTable: (hDCTable at: comp dcTableIndex)\r\t\tacTable: (hACTable at: comp acTableIndex)\r\t\tstream: stream.\r].\rrestartsToGo _ restartsToGo - 1.! !\r!JPEGReadWriter methodsFor: 'huffman encoding' stamp: 'ar 3/4/2001 17:27'!\rgetBits: requestedBits\r^stream getBits: requestedBits! !\r!JPEGReadWriter methodsFor: 'huffman encoding' stamp: 'ar 3/4/2001 21:32'!\rprimDecodeBlockInto: sampleBuffer component: comp dcTable: dcTable acTable: acTable stream: jpegStream\r<primitive: 'primitiveDecodeMCU' module: 'JPEGReaderPlugin'>\r^self decodeBlockInto: sampleBuffer component: comp dcTable: dcTable acTable: acTable! !\r!JPEGReadWriter methodsFor: 'huffman encoding' stamp: 'ar 3/4/2001 17:40'!\rprocessRestart\rstream resetBitBuffer.\rself parseNextMarker.\rcurrentComponents do: [:c | c priorDCValue: 0].\rrestartsToGo _ restartInterval.! !\r!JPEGReadWriter methodsFor: 'huffman encoding' stamp: 'ar 3/4/2001 01:17'!\rscaleAndSignExtend: aNumber inFieldWidth: w\r\raNumber < (1 bitShift: (w - 1))\r\tifTrue: [^aNumber - (1 bitShift: w) + 1]\r\tifFalse: [^aNumber]! !\r!JPEGReadWriter methodsFor: 'marker parsing' stamp: 'ar 3/4/2001 18:38'!\rinitialSOSSetup\r\rmcuWidth _ (components detectMax: [:c | c widthInBlocks]) widthInBlocks.\rmcuHeight _ (components detectMax: [:c | c heightInBlocks]) heightInBlocks.\rcomponents do:[:c |\r\tc mcuWidth: mcuWidth mcuHeight: mcuHeight dctSize: DCTSize].\rstream resetBitBuffer.! !\r!JPEGReadWriter methodsFor: 'marker parsing' stamp: 'mir 6/13/2001 13:06'!\rokToIgnoreMarker: aMarker\r\r^ (((16rE0 to: 16rEF) includes: aMarker) \"unhandled APPn markers\"\r\tor: [aMarker = 16rDC or: [aMarker = 16rFE]]) \"DNL or COM markers\"\r\tor: [aMarker = 16r99] \"Whatever that is\"! !\r!JPEGReadWriter methodsFor: 'marker parsing' stamp: 'ar 3/6/2001 22:28'!\rparseAPPn\r\r| length buffer thumbnailLength markerStart |\rmarkerStart _ self position.\rlength _ self nextWord.\rbuffer _ self next: 4.\r(buffer asString = 'JFIF') ifFalse: [\r\t\"Skip APPs that we're not interested in\"\r\tstream next: length-6.\r\t^self].\rself next.\rmajorVersion _ self next.\rminorVersion _ self next.\rdensityUnit _ self next.\rxDensity _ self nextWord.\ryDensity _ self nextWord.\rthumbnailLength _ self next * self next * 3.\rlength _ length - (self position - markerStart).\rlength = thumbnailLength ifFalse: [self error: 'APP0 thumbnail length is incorrect.'].\rself next: length! !\r!JPEGReadWriter methodsFor: 'marker parsing' stamp: 'tao 10/20/97 13:36'!\rparseDecoderRestartInterval\r\r| length |\rlength _ self nextWord.\rlength = 4 ifFalse: [self error: 'DRI length incorrect'].\rrestartInterval _ self nextWord.! !\r!JPEGReadWriter methodsFor: 'marker parsing' stamp: 'mir 6/12/2001 11:28'!\rparseFirstMarker\r\r| marker |\rself next = 16rFF ifFalse: [self error: 'JFIF marker expected'].\rmarker _ self next.\rmarker = 16rD9\r\tifTrue: [^self \"halt: 'EOI encountered.'\"].\rmarker = 16rD8 ifFalse: [self error: 'SOI marker expected'].\rself parseStartOfInput.\r! !\r!JPEGReadWriter methodsFor: 'marker parsing' stamp: 'ar 3/4/2001 18:36'!\rparseHuffmanTable\r\r| length markerStart index bits count huffVal isACTable hTable |\rmarkerStart _ self position.\rlength _ self nextWord.\r[self position - markerStart >= length] whileFalse:\r\t[index _ self next.\r\tisACTable _ (index bitAnd: 16r10) ~= 0.\r\tindex _ (index bitAnd: 16r0F) + 1.\r\tindex > HuffmanTableSize\r\t\tifTrue: [self error: 'image has more than ', HuffmanTableSize printString,\r\t\t\t' quantization tables'].\r\tbits _ self next: 16.\r\tcount _ bits sum.\r\t(count > 256 or: [(count > (length - (self position - markerStart)))])\r\t\tifTrue: [self error: 'Huffman Table count is incorrect'].\r\thuffVal _ self next: count.\r\thTable _ stream buildLookupTable: huffVal counts: bits.\r\tisACTable\r\t\tifTrue:\r\t\t\t[self hACTable at: index put: hTable]\r\t\tifFalse:\r\t\t\t[self hDCTable at: index put: hTable]].! !\r!JPEGReadWriter methodsFor: 'marker parsing' stamp: 'tao 10/24/97 17:32'!\rparseNOP\r\r\"don't need to do anything, here\"! !\r!JPEGReadWriter methodsFor: 'marker parsing' stamp: 'BG 3/16/2005 08:24'!\rparseNextMarker\r\"Parse the next marker of the stream\"\r\r| byte discardedBytes |\rdiscardedBytes _ 0.\r[(byte _ self next) = 16rFF] whileFalse: [discardedBytes _ discardedBytes + 1].\t\r[[(byte _ self next) = 16rFF] whileTrue. byte = 16r00] whileTrue:\r\t[discardedBytes _ discardedBytes + 2].\rdiscardedBytes > 0 ifTrue: [self \"notifyWithLabel: 'warning: extraneous data discarded'\"].\rself perform:\r\t(JFIFMarkerParser\r\t\tat: byte\r\t\tifAbsent:\r\t\t\t[(self okToIgnoreMarker: byte)\r\t\t\t\tifTrue: [#skipMarker]\r\t\t\t\tifFalse: [self error: 'marker ', byte printStringHex , ' cannot be handled']])! !\r!JPEGReadWriter methodsFor: 'marker parsing' stamp: 'ar 3/3/2001 22:19'!\rparseQuantizationTable\r\r| length markerStart n prec value table |\rmarkerStart _ self position.\rlength _ self nextWord.\r[self position - markerStart >= length] whileFalse:\r\t[value _ self next.\r\tn _ (value bitAnd: 16r0F) + 1.\r\tprec _ (value >> 4) > 0.\r\tn > QuantizationTableSize\r\t\t ifTrue: [self error: 'image has more than ',\r\t\t\tQuantizationTableSize printString,\r\t\t\t' quantization tables'].\r\ttable _ IntegerArray new: DCTSize2.\r\t1 to: DCTSize2 do:\r\t\t[:i |\r\t\tvalue _ (prec\r\t\t\tifTrue: [self nextWord]\r\t\t\tifFalse: [self next]).\r\t\ttable at: (JPEGNaturalOrder at: i) put: value].\r\tself useFloatingPoint ifTrue: [self scaleQuantizationTable: table].\r\tself qTable at: n put: table]! !\r!JPEGReadWriter methodsFor: 'marker parsing' stamp: 'tao 10/24/97 17:07'!\rparseStartOfFile\r\r| length markerStart value n |\rmarkerStart _ self position.\rlength _ self nextWord.\rdataPrecision _ self next.\rdataPrecision = 8\r\tifFalse: [self error: 'cannot handle ', dataPrecision printString, '-bit components'].\rheight _ self nextWord.\rwidth _ self nextWord.\rn _ self next.\r(height = 0) | (width = 0) | (n = 0) ifTrue: [self error: 'empty image'].\r(length - (self position - markerStart)) ~= (n * 3)\r\tifTrue: [self error: 'component length is incorrect'].\rcomponents _ Array new: n.\r1 to: components size do:\r\t[:i |\r\tcomponents\r\t\tat: i\r\t\tput:\r\t\t\t(JPEGColorComponent new\r\t\t\t\tid: self next;\r\t\t\t\t\"heightInBlocks: (((value _ self next) >> 4) bitAnd: 16r0F);\r\t\t\t\twidthInBlocks: (value bitAnd: 16r0F);\"\r\t\t\t\twidthInBlocks: (((value _ self next) >> 4) bitAnd: 16r0F);\r\t\t\t\theightInBlocks: (value bitAnd: 16r0F);\r\r\t\t\t\tqTableIndex: self next + 1)]! !\r!JPEGReadWriter methodsFor: 'marker parsing' stamp: 'tao 10/22/97 17:38'!\rparseStartOfInput\r\rrestartInterval _ 0.\rdensityUnit _ 0.\rxDensity _ 1.\ryDensity _ 1\r! !\r!JPEGReadWriter methodsFor: 'marker parsing' stamp: 'tao 10/26/97 21:53'!\rparseStartOfScan\r\r| length n id value dcNum acNum comp |\rlength _ self nextWord.\rn _ self next.\r(length ~= (n*2 + 6)) | (n < 1) ifTrue: [self error: 'SOS length is incorrect'].\rcurrentComponents _ Array new: n.\r1 to: n do: [:i |\r\tid _ self next.\r\tvalue _ self next.\r\tdcNum _ (value >> 4) bitAnd: 16r0F.\r\tacNum _ value bitAnd: 16r0F.\r\tcomp _ components detect: [:c | c id = id].\r\tcomp\r\t\tdcTableIndex: dcNum+1;\r\t\tacTableIndex: acNum+1.\r\tcurrentComponents at: i put: comp].\rss _ self next.\rse _ self next.\rvalue _ self next.\rah _ (value >> 4) bitAnd: 16r0F.\ral _ value bitAnd: 16r0F.\rself initialSOSSetup.\rself perScanSetup.\rsosSeen _ true! !\r!JPEGReadWriter methodsFor: 'marker parsing' stamp: 'ar 3/7/2001 01:01'!\rperScanSetup\r\rmcusPerRow _ (width / (mcuWidth * DCTSize)) ceiling.\rmcuRowsInScan _ (height / (mcuHeight * DCTSize)) ceiling.\r(currentComponents size = 3 or: [currentComponents size = 1])\r\tifFalse: [self error: 'JPEG color space not recognized'].\rmcuMembership _ OrderedCollection new.\rcurrentComponents withIndexDo:\r\t[:c :i |\r\tc priorDCValue: 0.\r\tmcuMembership addAll: ((1 to: c totalMcuBlocks) collect: [:b | i])].\rmcuMembership _ mcuMembership asArray.\rmcuSampleBuffer _ (1 to: mcuMembership size) collect: [:i | IntegerArray new: DCTSize2].\rcurrentComponents withIndexDo:\r\t[:c :i |\r\t\tc initializeSampleStreamBlocks:\r\t\t\t((1 to: mcuMembership size)\r\t\t\t\tselect: [:j | i = (mcuMembership at: j)]\r\t\t\t\tthenCollect: [:j | mcuSampleBuffer at: j])].\rmcuImageBuffer _ Form\r\textent: (mcuWidth @ mcuHeight) * DCTSize\r\tdepth: 32.\rrestartsToGo _ restartInterval.! !\r!JPEGReadWriter methodsFor: 'marker parsing' stamp: 'tao 10/22/97 16:27'!\rskipMarker\r\r| length markerStart |\rmarkerStart _ self position.\rlength _ self nextWord.\rself next: length - (self position - markerStart)\r! !\r!JPEGReadWriter methodsFor: 'preferences' stamp: 'tao 10/26/97 22:09'!\ruseFloatingPoint\r\r^ false! !\r!JPEGReadWriter methodsFor: 'public access' stamp: 'ar 3/7/2001 00:18'!\rdecompressionTest\r\"Test decompression; don't generate actual image\"\r| xStep yStep x y |\rMessageTally spyOn:[\rditherMask _ DitherMasks at: 32.\rresiduals _ WordArray new: 3.\rsosSeen _ false.\rself parseFirstMarker.\r[sosSeen] whileFalse: [self parseNextMarker].\rxStep _ mcuWidth * DCTSize.\ryStep _ mcuHeight * DCTSize.\ry _ 0.\r1 to: mcuRowsInScan do:\r\t[:row |\r\tx _ 0.\r\t1 to: mcusPerRow do:\r\t\t[:col |\r\t\tself decodeMCU.\r\t\tself idctMCU.\r\t\tself colorConvertMCU.\r\t\tx _ x + xStep].\r\ty _ y + yStep].\r].! !\r!JPEGReadWriter methodsFor: 'public access' stamp: 'tao 9/18/1998 08:53'!\rnextImage\r\r^ self nextImageDitheredToDepth: Display depth\r! !\r!JPEGReadWriter methodsFor: 'public access' stamp: 'ar 10/28/2001 16:25'!\rnextImageDitheredToDepth: depth\r\r| form xStep yStep x y bb |\rditherMask _ DitherMasks\r\tat: depth\r\tifAbsent: [self error: 'can only dither to display depths'].\rresiduals _ WordArray new: 3.\rsosSeen _ false.\rself parseFirstMarker.\r[sosSeen] whileFalse: [self parseNextMarker].\rform _ Form extent: (width @ height) depth: depth.\rbb _ BitBlt current toForm: form.\rbb sourceForm: mcuImageBuffer.\rbb colorMap: (mcuImageBuffer colormapIfNeededFor: form).\rbb sourceRect: mcuImageBuffer boundingBox.\rbb combinationRule: Form over.\rxStep _ mcuWidth * DCTSize.\ryStep _ mcuHeight * DCTSize.\ry _ 0.\r1 to: mcuRowsInScan do:\r\t[:row |\r\tx _ 0.\r\t1 to: mcusPerRow do:\r\t\t[:col |\r\t\tself decodeMCU.\r\t\tself idctMCU.\r\t\tself colorConvertMCU.\r\t\tbb destX: x; destY: y; copyBits.\r\t\tx _ x + xStep].\r\ty _ y + yStep].\r^ form! !\r!JPEGReadWriter methodsFor: 'public access' stamp: 'ar 3/4/2001 17:26'!\rsetStream: aStream\r\"Feed it in from an existing source\"\rstream _ JPEGReadStream on: aStream upToEnd.! !\r!JPEGReadWriter methodsFor: 'testing' stamp: 'ar 3/4/2001 00:50'!\runderstandsImageFormat\r\"Answer true if the image stream format is understood by this decoder.\"\rself next = 16rFF ifFalse: [^ false].\rself next = 16rD8 ifFalse: [^ false].\r^ true\r! !\r!JPEGReadWriter methodsFor: 'private' stamp: 'ar 3/4/2001 17:34'!\ron: aStream\rsuper on: aStream.\rstream _ JPEGReadStream on: stream upToEnd.! !\r!JPEGReadWriter2 methodsFor: 'primitives' stamp: 'jm 11/20/2001 10:34'!\rprimImageHeight: aJPEGCompressStruct\r\r<primitive: 'primImageHeight' module: 'JPEGReadWriter2Plugin'>\rself primitiveFailed\r! !\r!JPEGReadWriter2 methodsFor: 'primitives' stamp: 'jm 11/20/2001 10:35'!\rprimImageWidth: aJPEGCompressStruct\r\r<primitive: 'primImageWidth' module: 'JPEGReadWriter2Plugin'>\rself primitiveFailed\r! !\r!JPEGReadWriter2 methodsFor: 'primitives' stamp: 'jm 11/20/2001 10:35'!\rprimJPEGCompressStructSize\r\r<primitive: 'primJPEGCompressStructSize' module: 'JPEGReadWriter2Plugin'>\rself primitiveFailed\r! !\r!JPEGReadWriter2 methodsFor: 'primitives' stamp: 'jm 11/20/2001 10:35'!\rprimJPEGDecompressStructSize\r\r<primitive: 'primJPEGDecompressStructSize' module: 'JPEGReadWriter2Plugin'>\rself primitiveFailed\r! !\r!JPEGReadWriter2 methodsFor: 'primitives' stamp: 'jm 11/20/2001 10:35'!\rprimJPEGErrorMgr2StructSize\r\r<primitive: 'primJPEGErrorMgr2StructSize' module: 'JPEGReadWriter2Plugin'>\rself primitiveFailed\r! !\r!JPEGReadWriter2 methodsFor: 'primitives' stamp: 'ar 11/27/2001 00:39'!\rprimJPEGPluginIsPresent\r<primitive: 'primJPEGPluginIsPresent' module: 'JPEGReadWriter2Plugin'>\r^false! !\r!JPEGReadWriter2 methodsFor: 'primitives' stamp: 'jm 11/20/2001 10:35'!\rprimJPEGReadHeader: aJPEGDecompressStruct fromByteArray: source errorMgr: aJPEGErrorMgr2Struct\r\r<primitive: 'primJPEGReadHeaderfromByteArrayerrorMgr' module: 'JPEGReadWriter2Plugin'>\rself primitiveFailed\r! !\r!JPEGReadWriter2 methodsFor: 'primitives' stamp: 'jmv 12/7/2001 13:45'!\rprimJPEGReadImage: aJPEGDecompressStruct fromByteArray: source onForm: form doDithering: ditherFlag errorMgr: aJPEGErrorMgr2Struct\r\r<primitive: 'primJPEGReadImagefromByteArrayonFormdoDitheringerrorMgr' module: 'JPEGReadWriter2Plugin'>\rself primitiveFailed\r! !\r!JPEGReadWriter2 methodsFor: 'primitives' stamp: 'jm 11/20/2001 10:35'!\rprimJPEGWriteImage: aJPEGCompressStruct onByteArray: destination form: form quality: quality progressiveJPEG: progressiveFlag errorMgr: aJPEGErrorMgr2Struct\r\r<primitive: 'primJPEGWriteImageonByteArrayformqualityprogressiveJPEGerrorMgr' module: 'JPEGReadWriter2Plugin'>\rself primitiveFailed\r! !\r!JPEGReadWriter2 methodsFor: 'public access' stamp: 'JMM 1/11/2005 14:56'!\rcompress: aForm quality: quality\r\"Encode the given Form and answer the compressed ByteArray. Quality goes from 0 (low) to 100 (high), where -1 means default.\"\r\r| sourceForm jpegCompressStruct jpegErrorMgr2Struct buffer byteCount |\raForm unhibernate.\r\"odd width images of depth 16 give problems; avoid them.\"\rsourceForm _ (aForm depth = 32) | (aForm width even & (aForm depth = 16))\r\tifTrue: [aForm]\r\tifFalse: [aForm asFormOfDepth: 32].\rjpegCompressStruct _ ByteArray new: self primJPEGCompressStructSize.\rjpegErrorMgr2Struct _ ByteArray new: self primJPEGErrorMgr2StructSize.\rbuffer _ ByteArray new: sourceForm width * sourceForm height + 1024.\rbyteCount _ self primJPEGWriteImage: jpegCompressStruct \r\tonByteArray: buffer\r\tform: sourceForm\r\tquality: quality\r\tprogressiveJPEG: false\r\terrorMgr: jpegErrorMgr2Struct.\rbyteCount = 0 ifTrue: [self error: 'buffer too small for compressed data'].\r^ buffer copyFrom: 1 to: byteCount\r! !\r!JPEGReadWriter2 methodsFor: 'public access' stamp: 'jm 11/20/2001 10:01'!\rimageExtent: aByteArray \r\"Answer the extent of the compressed image encoded in the given ByteArray.\"\r\r| jpegDecompressStruct jpegErrorMgr2Struct w h |\rjpegDecompressStruct _ ByteArray new: self primJPEGDecompressStructSize.\rjpegErrorMgr2Struct _ ByteArray new: self primJPEGErrorMgr2StructSize.\rself\r\tprimJPEGReadHeader: jpegDecompressStruct \r\tfromByteArray: aByteArray\r\terrorMgr: jpegErrorMgr2Struct.\rw _ self primImageWidth: jpegDecompressStruct.\rh _ self primImageHeight: jpegDecompressStruct.\r^ w @ h\r! !\r!JPEGReadWriter2 methodsFor: 'public access' stamp: 'jm 11/20/2001 10:23'!\rnextImage\r\"Decode and answer a Form from my stream.\"\r\r^ self nextImageSuggestedDepth: Display depth\r! !\r!JPEGReadWriter2 methodsFor: 'public access' stamp: 'sd 1/30/2004 15:19'!\rnextImageSuggestedDepth: depth\r\"Decode and answer a Form of the given depth from my stream. Close the stream if it is a file stream. Possible depths are 16-bit and 32-bit.\"\r\r| bytes width height form jpegDecompressStruct jpegErrorMgr2Struct depthToUse |\rbytes _ stream upToEnd.\rstream close.\rjpegDecompressStruct _ ByteArray new: self primJPEGDecompressStructSize.\rjpegErrorMgr2Struct _ ByteArray new: self primJPEGErrorMgr2StructSize.\rself \r\tprimJPEGReadHeader: jpegDecompressStruct \r\tfromByteArray: bytes\r\terrorMgr: jpegErrorMgr2Struct.\rwidth _ self primImageWidth: jpegDecompressStruct.\rheight _ self primImageHeight: jpegDecompressStruct.\r\"Odd width images of depth 16 gave problems. Avoid them (or check carefully!!)\"\rdepthToUse _ ((depth = 32) | width odd) ifTrue: [32] ifFalse: [16].\rform _ Form extent: width@height depth: depthToUse.\r(width = 0 or: [height = 0]) ifTrue: [^ form].\rself\r\tprimJPEGReadImage: jpegDecompressStruct\r\tfromByteArray: bytes\r\tonForm: form\r\tdoDithering: true\r\terrorMgr: jpegErrorMgr2Struct.\r^ form\r! !\r!JPEGReadWriter2 methodsFor: 'public access' stamp: 'jm 11/20/2001 10:21'!\rnextPutImage: aForm\r\"Encode the given Form on my stream with default quality.\"\r\r^ self nextPutImage: aForm quality: -1 progressiveJPEG: false\r! !\r!JPEGReadWriter2 methodsFor: 'public access' stamp: 'JMM 1/11/2005 14:45'!\rnextPutImage: aForm quality: quality progressiveJPEG: progressiveFlag\r\"Encode the given Form on my stream with the given settings. Quality goes from 0 (low) to 100 (high), where -1 means default. If progressiveFlag is true, encode as a progressive JPEG.\"\r\r| sourceForm jpegCompressStruct jpegErrorMgr2Struct buffer byteCount |\raForm unhibernate.\r\"odd width images of depth 16 give problems; avoid them.\"\rsourceForm _ (aForm depth = 32) | (aForm width even & (aForm depth = 16))\r\tifTrue: [aForm]\r\tifFalse: [aForm asFormOfDepth: 32].\rjpegCompressStruct _ ByteArray new: self primJPEGCompressStructSize.\rjpegErrorMgr2Struct _ ByteArray new: self primJPEGErrorMgr2StructSize.\rbuffer _ ByteArray new: sourceForm width * sourceForm height + 1024.\rbyteCount _ self primJPEGWriteImage: jpegCompressStruct \r\tonByteArray: buffer\r\tform: sourceForm\r\tquality: quality\r\tprogressiveJPEG: progressiveFlag\r\terrorMgr: jpegErrorMgr2Struct.\rbyteCount = 0 ifTrue: [self error: 'buffer too small for compressed data'].\rstream next: byteCount putAll: buffer startingAt: 1.\rself close.\r! !\r!JPEGReadWriter2 methodsFor: 'public access' stamp: 'jmv 12/7/2001 13:49'!\runcompress: aByteArray into: aForm\r\"Uncompress an image from the given ByteArray into the given Form.\rFails if the given Form has the wrong dimensions or depth.\rIf aForm has depth 16, do ordered dithering.\"\r\r| jpegDecompressStruct jpegErrorMgr2Struct w h |\raForm unhibernate.\rjpegDecompressStruct _ ByteArray new: self primJPEGDecompressStructSize.\rjpegErrorMgr2Struct _ ByteArray new: self primJPEGErrorMgr2StructSize.\rself \r\tprimJPEGReadHeader: jpegDecompressStruct \r\tfromByteArray: aByteArray\r\terrorMgr: jpegErrorMgr2Struct.\rw _ self primImageWidth: jpegDecompressStruct.\rh _ self primImageHeight: jpegDecompressStruct.\r((aForm width = w) & (aForm height = h)) ifFalse: [\r\t^ self error: 'form dimensions do not match'].\r\r\"odd width images of depth 16 give problems; avoid them\"\rw odd\r\tifTrue: [\r\t\taForm depth = 32 ifFalse: [^ self error: 'must use depth 32 with odd width']]\r\tifFalse: [\r\t\t((aForm depth = 16) | (aForm depth = 32)) ifFalse: [^ self error: 'must use depth 16 or 32']].\r\rself primJPEGReadImage: jpegDecompressStruct\r\tfromByteArray: aByteArray\r\tonForm: aForm\r\tdoDithering: true\r\terrorMgr: jpegErrorMgr2Struct.\r! !\r!JPEGReadWriter2 methodsFor: 'public access' stamp: 'jmv 12/7/2001 13:48'!\runcompress: aByteArray into: aForm doDithering: ditherFlag\r\"Uncompress an image from the given ByteArray into the given Form. \rFails if the given Form has the wrong dimensions or depth.\rIf aForm has depth 16 and ditherFlag = true, do ordered dithering.\"\r\r| jpegDecompressStruct jpegErrorMgr2Struct w h |\raForm unhibernate.\rjpegDecompressStruct _ ByteArray new: self primJPEGDecompressStructSize.\rjpegErrorMgr2Struct _ ByteArray new: self primJPEGErrorMgr2StructSize.\rself \r\tprimJPEGReadHeader: jpegDecompressStruct \r\tfromByteArray: aByteArray\r\terrorMgr: jpegErrorMgr2Struct.\rw _ self primImageWidth: jpegDecompressStruct.\rh _ self primImageHeight: jpegDecompressStruct.\r((aForm width = w) & (aForm height = h)) ifFalse: [\r\t^ self error: 'form dimensions do not match'].\r\r\"odd width images of depth 16 give problems; avoid them\"\rw odd\r\tifTrue: [\r\t\taForm depth = 32 ifFalse: [^ self error: 'must use depth 32 with odd width']]\r\tifFalse: [\r\t\t((aForm depth = 16) | (aForm depth = 32)) ifFalse: [^ self error: 'must use depth 16 or 32']].\r\rself primJPEGReadImage: jpegDecompressStruct\r\tfromByteArray: aByteArray\r\tonForm: aForm\r\tdoDithering: ditherFlag\r\terrorMgr: jpegErrorMgr2Struct.\r! !\r!JPEGReadWriter2 methodsFor: 'testing' stamp: 'ar 11/27/2001 00:40'!\risPluginPresent\r^self primJPEGPluginIsPresent! !\r!JPEGReadWriter2 methodsFor: 'testing' stamp: 'ar 11/27/2001 00:39'!\runderstandsImageFormat\r\"Answer true if the image stream format is understood by this decoder.\"\rself isPluginPresent ifFalse:[^false]. \"cannot read it otherwise\"\rself next = 16rFF ifFalse: [^ false].\rself next = 16rD8 ifFalse: [^ false].\r^ true\r! !\r!ListItemWrapper methodsFor: 'as yet unclassified' stamp: 'RAA 3/31/1999 12:15'!\rhasEquivalentIn: aCollection\r\raCollection detect: [ :each | \r\teach withoutListWrapper = item withoutListWrapper\r] ifNone: [^false].\r^true! !\r!ListItemWrapper methodsFor: 'as yet unclassified' stamp: 'RAA 4/4/1999 17:58'!\rsendSettingMessageTo: aModel\r\raModel \r\tperform: (self settingSelector ifNil: [^self])\r\twith: self withoutListWrapper\r! !\r!ListItemWrapper methodsFor: 'as yet unclassified' stamp: 'RAA 3/31/1999 21:31'!\rsettingSelector\r\r^nil! !\r!ListItemWrapper methodsFor: 'converting' stamp: 'RAA 3/30/1999 18:17'!\rasString\r\r^item asString! !\r!ListItemWrapper methodsFor: 'converting' stamp: 'RAA 3/31/1999 12:13'!\rwithoutListWrapper\r\r^item withoutListWrapper! !\r!ListItemWrapper methodsFor: 'accessing' stamp: 'RAA 3/31/1999 16:32'!\rcontents\r\r^Array new! !\r!ListItemWrapper methodsFor: 'accessing' stamp: 'RAA 4/1/1999 20:09'!\rhasContents\r\r^self contents isEmpty not! !\r!ListItemWrapper methodsFor: 'accessing' stamp: 'RAA 8/3/1999 09:40'!\rhighlightingColor\r\r^Color red! !\r!ListItemWrapper methodsFor: 'accessing' stamp: 'dgd 9/26/2004 18:22'!\ricon\r\"Answer a form to be used as icon\"\r^ nil! !\r!ListItemWrapper methodsFor: 'accessing' stamp: 'ssa 11/24/2009 19:07'!\ritem\r\"Answer the value of item\"\r\ritem isNil ifTrue:[self item: nil].\r^ item! !\r!ListItemWrapper methodsFor: 'accessing' stamp: 'ssa 11/24/2009 19:07'!\ritem: anObject\r\"Set the value of item\"\r\ritem _ anObject! !\r!ListItemWrapper methodsFor: 'accessing' stamp: 'ssa 11/24/2009 19:07'!\rmodel\r\"Answer the value of model\"\r\rmodel isNil ifTrue:[self model: nil].\r^ model! !\r!ListItemWrapper methodsFor: 'accessing' stamp: 'ssa 11/24/2009 19:07'!\rmodel: anObject\r\"Set the value of model\"\r\rmodel _ anObject! !\r!ListItemWrapper methodsFor: 'accessing' stamp: 'RAA 4/2/1999 15:14'!\rpreferredColor\r\r^nil! !\r!ListItemWrapper methodsFor: 'accessing' stamp: 'RAA 3/30/1999 18:27'!\rsetItem: anObject\r\ritem _ anObject! !\r!ListItemWrapper methodsFor: 'accessing' stamp: 'RAA 3/31/1999 16:44'!\rsetItem: anObject model: aModel\r\ritem _ anObject.\rmodel _ aModel.! !\r!MSWScrollBarController methodsFor: 'delays' stamp: 'ssa 1/15/98 13:51'!\rdefaultUnitScrollDelay\r    \"Answer the delay to use when unit scrolling, i.e., pressing the up or down button.\"\r\r    ^Delay forMilliseconds: 50! !\r!MSWScrollBarController methodsFor: 'delays' stamp: 'ssa 1/15/98 13:52'!\rwait\r\r    self defaultUnitScrollDelay wait! !\r!MSWScrollBarController methodsFor: 'accessing' stamp: 'ssa 8/22/2009 15:13'!\relevatorBox\r    \"Compute this each time since the view content my change.\"\r\r    | box originY extentY |\r    box _ self view elevatorShaft.\r    extentY _ self viewToScroll  percentVisibleContent * box height.\r    originY _  (self viewToScroll percentPreceedingContent * box height) min: box height - extentY.\r    ^(box origin x asInteger @ (box origin y + originY) asInteger max: box origin) extent: ((box extent x asInteger @ extentY asInteger) min: box extent max: 10@box width)! !\r!MSWScrollBarController methodsFor: 'accessing' stamp: 'ssa 12/5/97 16:00'!\rscroller\r\r    ^self viewToScroll controller! !\r!MSWScrollBarController methodsFor: 'accessing' stamp: 'ssa 1/15/98 13:50'!\runitScrollDelay\r    \"<^hOf Delay>\"\r    \"ssa 1/15/98 13:50 - Answer the instance variable, unitScrollDelay\"\r\r    unitScrollDelay isNil ifTrue:[self unitScrollDelay: self defaultUnitScrollDelay].\r    ^unitScrollDelay! !\r!MSWScrollBarController methodsFor: 'accessing' stamp: 'ssa 1/15/98 13:50'!\runitScrollDelay: aDelay \r    \"<aDelay: hOf Delay, ^self>\"\r    \"ssa 1/15/98 13:50 - Set unitScrollDelay to be aDelay.\"\r\r    unitScrollDelay _ aDelay! !\r!MSWScrollBarController methodsFor: 'accessing' stamp: 'ssa 12/5/97 14:40'!\rviewToScroll\r\r    ^self view subViews first! !\r!MSWScrollBarController methodsFor: 'scrolling' stamp: 'ssa 12/5/97 16:07'!\rpageDown\r    \"Scroll down by one page length.\"\r    self scroller scrollView: self pageHeight negated.\r    self view updateElevator! !\r!MSWScrollBarController methodsFor: 'scrolling' stamp: 'ssa 12/5/97 16:00'!\rpageHeight\r    \"Answer the height of a page for the scrolling view.\"\r\r    ^self viewToScroll displayBox height! !\r!MSWScrollBarController methodsFor: 'scrolling' stamp: 'ssa 8/27/2009 07:11'!\rpageUp\r    \"Scroll up by one page length.\"\r   self scroller scrollView: self pageHeight.\r    self view updateElevator! !\r!MSWScrollBarController methodsFor: 'scrolling' stamp: 'stp 2/18/98 13:50'!\rreallyScrollAbsolute\r\r    | height center offset |\r    center _ self view elevatorBox center y.\r    offset _ (center - Sensor cursorPoint y). \r    height _ self view elevatorShaft height.\r    (self viewToScroll percentPreceedingContent ~= 0.0 or:\r                    [self viewToScroll percentVisibleContent < 1.0])\r            ifTrue:[self scroller scrollView: ((offset / height) \r                            * (self scroller view totalContentHeight \r                                    * self scroller view unitContentHeight)) asInteger.\r                    self view updateElevator]! !\r!MSWScrollBarController methodsFor: 'scrolling' stamp: 'stp 2/18/98 13:53'!\rscrollAbsolute\r    | lastY thisY |\r    [Sensor redButtonPressed]\r            whileTrue:  \r                    [thisY := Sensor cursorPoint y.\r                    lastY isNil\r                            ifTrue: [lastY := thisY.\r                                    self reallyScrollAbsolute]\r                            ifFalse: [lastY = thisY\r                                    ifFalse: [lastY := thisY.\r                                            self reallyScrollAbsolute]]]! !\r!MSWScrollBarController methodsFor: 'scrolling' stamp: 'ssa 1/15/98 13:54'!\runitDown\r    \"Scroll down by one content unit.\"\r\r    self view displayDownButtonPressed.\r    [Sensor redButtonPressed] whileTrue:[\r            self scroller scrollView: self unitHeight negated.\r            self view updateElevator.\r            self wait].\r    self view displayDownButton.\r! !\r!MSWScrollBarController methodsFor: 'scrolling' stamp: 'ssa 12/5/97 16:00'!\runitHeight\r    \"Answer the height of a content unit for the scrolling view.\"\r\r    ^self viewToScroll unitContentHeight! !\r!MSWScrollBarController methodsFor: 'scrolling' stamp: 'ssa 1/15/98 13:54'!\runitUp\r    \"Scroll up by one content unit.\"\r\r    self view displayUpButtonPressed.\r    [Sensor redButtonPressed] whileTrue:[\r            self scroller scrollView: self unitHeight.\r            self view updateElevator.\r            self wait].\r    self view displayUpButton.\r! !\r!MSWScrollBarController methodsFor: 'control activity' stamp: 'ssa 1/8/98 16:28'!\rcontrolActivity \r    \"Refer to the comment in Controller|controlActivity.\"\r\r    (Sensor redButtonPressed and:[self view scrollBarBox containsPoint: Sensor cursorPoint])\r                            ifTrue: [^self redButtonActivity].\r    super controlActivity\r! !\r!MSWScrollBarController methodsFor: 'control activity' stamp: 'ssa 8/27/2009 04:44'!\rredButtonActivity\r\r    | point |\r\"       self scroller view visibleContentHeight >= (self scroller view totalContentHeight + 2)\r            ifTrue:[^self].\"\r    point _ Sensor cursorPoint.\r    (self view upButtonBox containsPoint: point)\r            ifTrue:[^self unitUp].\r    (self view downButtonBox containsPoint: point)\r            ifTrue:[^self unitDown].\r    (self view elevatorBox containsPoint: point)\r            ifTrue:[^self scrollAbsolute].\r\r    self view elevatorBox center y > point y\r            ifTrue:[self wait.  self pageUp]\r            ifFalse:[self wait.   self pageDown].\r\r! !\r!MSWScrollBarController methodsFor: 'delegation' stamp: 'ssa 8/21/2009 12:55'!\rdoesNotUnderstand: aMessage\r    \"Here it comes, the dreaded doesNotUnderstand:  HACK   ssa 1/23/98 14:55\"\r\r    ^self viewToScroll controller perform: aMessage selector withArguments: aMessage arguments! !\r!Message methodsFor: 'private' stamp: 'ssa 5/27/2010 11:13'!\rarguments: anArray\r\rargs _ anArray! !\r!Message methodsFor: 'private' stamp: 'ssa 7/16/2010 19:03'!\rselector: aSymbol\r\rselector _ aSymbol.\r! !\r!Message methodsFor: 'sending' stamp: 'ssa 5/28/2010 17:06'!\rsentTo: receiver\r\"answer the result of sending this message to receiver\"\r\rlookupClass == nil\r\tifTrue: [^ receiver perform: selector withArguments: args asArray]\r\tifFalse: [^ receiver perform: selector withArguments: args asArray inSuperclass: lookupClass]! !\r!MessageTally methodsFor: 'comparing' stamp: ''!\r< aMessageTally \r\"Refer to the comment in Magnitude|<.\"\r\r^tally > aMessageTally tally! !\r!MessageTally methodsFor: 'comparing' stamp: 'tk 7/5/2001 22:05'!\r= aMessageTally\r\rself species == aMessageTally species ifFalse: [^ false].\r^ aMessageTally method == method! !\r!MessageTally methodsFor: 'comparing' stamp: ''!\r> aMessageTally \r\"Refer to the comment in Magnitude|>.\"\r\r^tally < aMessageTally tally! !\r!MessageTally methodsFor: 'comparing' stamp: ''!\rhash\r\"Hash is reimplemented because = is implemented.\"\r\r^method asOop! !\r!MessageTally methodsFor: 'comparing' stamp: ''!\risPrimitives\r\"Detect pseudo node used to carry tally of local hits\"\r^ receivers == nil! !\r!MessageTally methodsFor: 'comparing' stamp: ''!\rsonsOver: threshold\r\r| hereTally last sons |\r(receivers == nil or: [receivers size = 0]) ifTrue: [^#()].\rhereTally _ tally.\rsons _ receivers select:  \"subtract subNode tallies for primitive hits here\"\r\t[:son |\r\thereTally _ hereTally - son tally.\r\tson tally > threshold].\rhereTally > threshold\r\tifTrue: \r\t\t[last _ MessageTally new class: class method: method.\r\t\t^sons copyWith: (last primitives: hereTally)].\r^sons! !\r!MessageTally methodsFor: 'comparing' stamp: 'tk 7/5/2001 22:04'!\rspecies\r^MessageTally! !\r!MessageTally methodsFor: 'initialize-release' stamp: ''!\rclose\r\r(Timer isMemberOf: Process) ifTrue: [Timer terminate].\rTimer _ ObservedProcess _ nil.\rclass _ method _ tally _ receivers _ nil! !\r!MessageTally methodsFor: 'initialize-release' stamp: 'nk 3/8/2004 12:29'!\rinitialize\rmaxClassNameSize _ self class defaultMaxClassNameSize.\rmaxClassPlusSelectorSize _ self class defaultMaxClassPlusSelectorSize.\rmaxTabs _ self class defaultMaxTabs.! !\r!MessageTally methodsFor: 'initialize-release' stamp: 'dmu 9/17/2010 12:02'!\rspyEvery: millisecs on: aBlock \r\t\"Create a spy and spy on the given block at the specified rate.\"\r\r\t| myDelay startTime time0 |\r\t(aBlock isMemberOf: BlockContext)\r\t\tifFalse: [self error: 'spy needs a block here'].\r\tself class: aBlock receiver class method: aBlock method.\r\t\t\"set up the probe\"\r\tObservedProcess := Processor thisProcess.\r\tmyDelay := Delay forMilliseconds: millisecs.\r\ttime0 := Time millisecondClockValue.\r\tgcStats := SmalltalkImage current getVMParameters.\r\tTimer :=\r\t\t[[true] whileTrue: \r\t\t\t[startTime := Time millisecondClockValue.\r\t\t\tmyDelay wait.\r\t\t\tObservedProcess suspend.\r\t\t\tself\r\t\t\t\ttally: ObservedProcess suspendedContextWaitingIfNecessary\r\t\t\t\t\"tally can be > 1 if ran a long primitive\"\r\t\t\t\tby: (Time millisecondClockValue - startTime) // millisecs.\r\t\t\tObservedProcess resume].\r\t\tnil] newProcess.\r\tTimer priority: Processor userInterruptPriority.\r\t\t\"activate the probe and evaluate the block\"\r\tTimer resume.\r\t^ aBlock ensure:\r\t[\"Collect gc statistics\"\r\tSmalltalkImage current getVMParameters keysAndValuesDo:\r\t\t[:idx :gcVal| gcStats at: idx put: (gcVal - (gcStats at: idx))].\r\t\"cancel the probe and return the value\"\r\tTimer notNil ifTrue:[Timer terminate].\r\ttime := Time millisecondClockValue - time0]! !\r!MessageTally methodsFor: 'initialize-release' stamp: 'dmu 9/17/2010 12:03'!\rspyEvery: millisecs onProcess: aProcess forMilliseconds: msecDuration \r\"Create a spy and spy on the given process at the specified rate.\"\r| myDelay time0 endTime sem |\r(aProcess isKindOf: Process)\r\tifFalse: [self error: 'spy needs a Process here'].\rself class: aProcess suspendedContextWaitingIfNecessary receiver class method: aProcess suspendedContext method.\r\"set up the probe\"\rObservedProcess _ aProcess.\rmyDelay _ Delay forMilliseconds: millisecs.\rtime0 _ Time millisecondClockValue.\rendTime _ time0 + msecDuration.\rsem _ Semaphore new.\rgcStats _ SmalltalkImage current  getVMParameters.\rTimer _ [[| startTime | \r\t\tstartTime _ Time millisecondClockValue.\r\t\tmyDelay wait.\r\t\tObservedProcess suspend.\r\t\tself tally: ObservedProcess suspendedContextWaitingIfNecessary by: Time millisecondClockValue - startTime // millisecs.\r\t\tstartTime < endTime.\r\t\tObservedProcess resume] whileTrue.\r\t\tsem signal]\r\t\t\tforkAt: (ObservedProcess priority + 1 min: Processor highestPriority).\r\"activate the probe and wait for it to finish\"\rsem wait.\r\"Collect gc statistics\"\rSmalltalkImage current  getVMParameters keysAndValuesDo:\r\t[:idx :gcVal| gcStats at: idx put: (gcVal - gcStats at: idx)].\rtime _ Time millisecondClockValue - time0! !\r!MessageTally methodsFor: 'printing' stamp: 'dew 3/15/2000 21:49'!\rfullPrintOn: aStream tallyExact: isExact orThreshold: perCent\r| threshold |  \risExact ifFalse: [threshold _ (perCent asFloat / 100 * tally) rounded].\raStream nextPutAll: '**Tree**'; cr.\rself treePrintOn: aStream\r\ttabs: OrderedCollection new\r\tthisTab: ''\r\ttotal: tally\r\ttotalTime: time\r\ttallyExact: isExact\r\torThreshold: threshold.\raStream nextPut: Character newPage; cr.\raStream nextPutAll: '**Leaves**'; cr.\rself leavesPrintOn: aStream\r\ttallyExact: isExact\r\torThreshold: threshold! !\r!MessageTally methodsFor: 'printing' stamp: 'dew 3/22/2000 02:28'!\rleavesPrintOn: aStream tallyExact: isExact orThreshold: threshold\r| dict |\rdict _ IdentityDictionary new: 100.\rself leavesInto: dict fromSender: nil.\risExact ifTrue: \r\t[dict asSortedCollection\r\t\tdo: [:node |\r\t\t\tnode printOn: aStream total: tally totalTime: nil tallyExact: isExact.\r\t\t\tnode printSenderCountsOn: aStream]]\r\tifFalse:\r\t[(dict asOrderedCollection\r\t\t\tselect: [:node | node tally > threshold])\r\t\tasSortedCollection\r\t\tdo: [:node |\r\t\t\tnode printOn: aStream total: tally totalTime: time tallyExact: isExact]]! !\r!MessageTally methodsFor: 'printing' stamp: 'nk 3/8/2004 12:14'!\rprintOn: aStream \r| aSelector className aClass |\r(class isNil or: [method isNil]) ifTrue: [^super printOn: aStream].\raSelector := class selectorAtMethod: method setClass: [:c | aClass := c].\rclassName := aClass name contractTo: self maxClassNameSize.\raStream\r\tnextPutAll: className;\r\tnextPutAll: ' >> ';\r\tnextPutAll: (aSelector \r\t\t\t\tcontractTo: self maxClassPlusSelectorSize - className size)! !\r!MessageTally methodsFor: 'printing' stamp: 'nk 3/8/2004 12:15'!\rprintOn: aStream total: total totalTime: totalTime tallyExact: isExact \r| aSelector className myTally aClass percentage |\risExact \r\tifTrue: \r\t\t[myTally := tally.\r\t\treceivers == nil \r\t\t\tifFalse: [receivers do: [:r | myTally := myTally - r tally]].\r\t\taStream\r\t\t\tprint: myTally;\r\t\t\tspace]\r\tifFalse: \r\t\t[percentage := tally asFloat / total * 100.0 roundTo: 0.1.\r\t\taStream\r\t\t\tprint: percentage;\r\t\t\tnextPutAll: '% {';\r\t\t\tprint: (percentage * totalTime / 100) rounded;\r\t\t\tnextPutAll: 'ms} '].\rreceivers == nil \r\tifTrue: \r\t\t[aStream\r\t\t\tnextPutAll: 'primitives';\r\t\t\tcr]\r\tifFalse: \r\t\t[aSelector := class selectorAtMethod: method setClass: [:c | aClass := c].\r\t\tclassName := aClass name contractTo: self maxClassNameSize.\r\t\taStream\r\t\t\tnextPutAll: class name;\r\t\t\tnextPutAll: (aClass = class \r\t\t\t\t\t\tifTrue: ['>>']\r\t\t\t\t\t\tifFalse: ['(' , aClass name , ')>>']);\r\t\t\tnextPutAll: (aSelector \r\t\t\t\t\t\tcontractTo: self maxClassPlusSelectorSize - className size);\r\t\t\tcr]! !\r!MessageTally methodsFor: 'printing' stamp: 'dew 3/22/2000 02:28'!\rprintSenderCountsOn: aStream\r| mergedSenders mergedNode |\rmergedSenders _ IdentityDictionary new.\rsenders do:\r\t[:node |\r\tmergedNode _ mergedSenders at: node method ifAbsent: [nil].\r\tmergedNode == nil\r\t\tifTrue: [mergedSenders at: node method put: node]\r\t\tifFalse: [mergedNode bump: node tally]].\rmergedSenders asSortedCollection do:\r\t[:node | \r\t10 to: node tally printString size by: -1 do: [:i | aStream space].\r\tnode printOn: aStream total: tally totalTime: nil tallyExact: true]! !\r!MessageTally methodsFor: 'printing' stamp: 'nk 3/8/2004 12:23'!\rtreePrintOn: aStream tabs: tabs thisTab: myTab total: total totalTime: totalTime tallyExact: isExact orThreshold: threshold \r| sons sonTab |\rtabs do: [:tab | aStream nextPutAll: tab].\rtabs size > 0 \r\tifTrue: \r\t\t[self \r\t\t\tprintOn: aStream\r\t\t\ttotal: total\r\t\t\ttotalTime: totalTime\r\t\t\ttallyExact: isExact].\rsons := isExact ifTrue: [receivers] ifFalse: [self sonsOver: threshold].\rsons isEmpty \r\tifFalse: \r\t\t[tabs addLast: myTab.\r\t\tsons := sons asSortedCollection.\r\t\t(1 to: sons size) do: \r\t\t\t\t[:i | \r\t\t\t\tsonTab := i < sons size ifTrue: ['  |'] ifFalse: ['  '].\r\t\t\t\t(sons at: i) \r\t\t\t\t\ttreePrintOn: aStream\r\t\t\t\t\ttabs: (tabs size < self maxTabs \r\t\t\t\t\t\t\tifTrue: [tabs]\r\t\t\t\t\t\t\tifFalse: [(tabs select: [:x | x = '[']) copyWith: '['])\r\t\t\t\t\tthisTab: sonTab\r\t\t\t\t\ttotal: total\r\t\t\t\t\ttotalTime: totalTime\r\t\t\t\t\ttallyExact: isExact\r\t\t\t\t\torThreshold: threshold].\r\t\ttabs removeLast]! !\r!MessageTally methodsFor: 'printing format' stamp: 'nk 3/8/2004 12:29'!\rmaxClassNameSize\r^maxClassNameSize! !\r!MessageTally methodsFor: 'printing format' stamp: 'nk 3/8/2004 12:30'!\rmaxClassNameSize: aNumber\rmaxClassNameSize := aNumber! !\r!MessageTally methodsFor: 'printing format' stamp: 'nk 3/8/2004 12:29'!\rmaxClassPlusSelectorSize\r^maxClassPlusSelectorSize! !\r!MessageTally methodsFor: 'printing format' stamp: 'nk 3/8/2004 12:30'!\rmaxClassPlusSelectorSize: aNumber\rmaxClassPlusSelectorSize := aNumber! !\r!MessageTally methodsFor: 'printing format' stamp: 'nk 3/8/2004 12:29'!\rmaxTabs\r^maxTabs! !\r!MessageTally methodsFor: 'printing format' stamp: 'nk 3/8/2004 12:30'!\rmaxTabs: aNumber\rmaxTabs := aNumber! !\r!MessageTally methodsFor: 'reporting' stamp: ''!\rreport: strm \r\"Print a report, with cutoff percentage of each element of the tree \r(leaves, roots, tree)=2, on the stream, strm.\"\r\rself report: strm cutoff: 2! !\r!MessageTally methodsFor: 'reporting' stamp: 'spfa 6/1/2004 19:23'!\rreport: strm cutoff: threshold \rtally = 0\r\tifTrue: [strm nextPutAll: ' - no tallies obtained']\r\tifFalse: \r\t\t[strm nextPutAll: ' - '; print: tally; nextPutAll: ' tallies, ', time printString, ' msec.'; cr; cr.\r\t\tself fullPrintOn: strm tallyExact: false orThreshold: threshold].\r\t\rtime isZero ifFalse:\t\r\t[self reportGCStatsOn: strm].! !\r!MessageTally methodsFor: 'reporting' stamp: 'ar 7/18/2001 22:12'!\rreportGCStatsOn: str\r| oldSpaceEnd youngSpaceEnd memoryEnd fullGCs fullGCTime incrGCs incrGCTime tenureCount upTime rootOverflows |\rupTime _ time.\roldSpaceEnd\t\t\t_ gcStats at: 1.\ryoungSpaceEnd\t\t_ gcStats at: 2.\rmemoryEnd\t\t\t_ gcStats at: 3.\rfullGCs\t\t\t\t_ gcStats at: 7.\rfullGCTime\t\t\t_ gcStats at: 8.\rincrGCs\t\t\t\t_ gcStats at: 9.\rincrGCTime\t\t\t_ gcStats at: 10.\rtenureCount\t\t\t_ gcStats at: 11.\rrootOverflows\t\t_ gcStats at: 22.\r\rstr cr.\rstr\tnextPutAll: '**Memory**'; cr.\rstr\tnextPutAll:\t'\told\t\t\t';\r\tnextPutAll: oldSpaceEnd asStringWithCommasSigned; nextPutAll: ' bytes'; cr.\rstr\tnextPutAll: '\tyoung\t\t';\r\tnextPutAll: (youngSpaceEnd - oldSpaceEnd) asStringWithCommasSigned; nextPutAll: ' bytes'; cr.\rstr\tnextPutAll: '\tused\t\t';\r\tnextPutAll: youngSpaceEnd asStringWithCommasSigned; nextPutAll: ' bytes'; cr.\rstr\tnextPutAll: '\tfree\t\t';\r\tnextPutAll: (memoryEnd - youngSpaceEnd) asStringWithCommasSigned; nextPutAll: ' bytes'; cr.\r\rstr cr.\rstr\tnextPutAll: '**GCs**'; cr.\rstr\tnextPutAll: '\tfull\t\t\t';\r\tprint: fullGCs; nextPutAll: ' totalling '; nextPutAll: fullGCTime asStringWithCommas; nextPutAll: 'ms (';\r\tprint: ((fullGCTime / upTime * 100) roundTo: 1.0);\r\tnextPutAll: '% uptime)'.\rfullGCs = 0 ifFalse:\r\t[str\tnextPutAll: ', avg '; print: ((fullGCTime / fullGCs) roundTo: 1.0); nextPutAll: 'ms'].\rstr\tcr.\rstr\tnextPutAll: '\tincr\t\t';\r\tprint: incrGCs; nextPutAll: ' totalling '; nextPutAll: incrGCTime asStringWithCommas; nextPutAll: 'ms (';\r\tprint: ((incrGCTime / upTime * 100) roundTo: 1.0);\r\tnextPutAll: '% uptime)'.\rincrGCs = 0 ifFalse:\r\t[str nextPutAll:', avg '; print: ((incrGCTime / incrGCs) roundTo: 1.0); nextPutAll: 'ms'].\rstr cr.\rstr\tnextPutAll: '\ttenures\t\t';\r\tnextPutAll: tenureCount asStringWithCommas.\rtenureCount = 0 ifFalse:\r\t[str nextPutAll: ' (avg '; print: (incrGCs / tenureCount) asInteger; nextPutAll: ' GCs/tenure)'].\rstr\tcr.\rstr\tnextPutAll: '\troot table\t';\r\tnextPutAll: rootOverflows asStringWithCommas; nextPutAll:' overflows'.\rstr cr.\r! !\r!MessageTally methodsFor: 'reporting' stamp: 'stp 05/08/1999 12:06'!\rtally\r\"Answer the receiver's number of tally.\"\r\r^tally! !\r!MessageTally methodsFor: 'reporting' stamp: 'stp 05/08/1999 11:47'!\rtime\r\"Answer the receiver's run time.\"\r\r^time! !\r!MessageTally methodsFor: 'private' stamp: ''!\rclass: aClass method: aMethod\r\rclass _ aClass.\rmethod _ aMethod.\rtally _ 0.\rreceivers _ Array new: 0! !\r!MessageTally methodsFor: 'private' stamp: ''!\rcopyWithTally: hitCount\r^ (MessageTally new class: class method: method) bump: hitCount! !\r!MessageTally methodsFor: 'private' stamp: ''!\rmethod\r\r^method! !\r!MessageTally methodsFor: 'private' stamp: ''!\rprimitives: anInteger\r\rtally _ anInteger.\rreceivers _ nil! !\r!MessageTally methodsFor: 'collecting leaves' stamp: ''!\rbump: hitCount\rtally _ tally + hitCount! !\r!MessageTally methodsFor: 'collecting leaves' stamp: ''!\rbump: hitCount fromSender: senderTally\r\"Add this hitCount to the total, and include a reference to the\rsender responsible for the increment\"\rself bump: hitCount.\rsenders == nil ifTrue: [senders _ OrderedCollection new].\rsenderTally == nil\r\tifFalse: [senders add: (senderTally copyWithTally: hitCount)]! !\r!MessageTally methodsFor: 'collecting leaves' stamp: ''!\rinto: leafDict fromSender: senderTally\r| leafNode |\rleafNode _ leafDict at: method\r\tifAbsent: [leafDict at: method\r\t\tput: (MessageTally new class: class method: method)].\rleafNode bump: tally fromSender: senderTally! !\r!MessageTally methodsFor: 'collecting leaves' stamp: ''!\rleavesInto: leafDict fromSender: senderTally\r| rcvrs |\rrcvrs _ self sonsOver: 0.\rrcvrs size = 0\r\tifTrue: [self into: leafDict fromSender: senderTally]\r\tifFalse: [rcvrs do:\r\t\t\t[:node |\r\t\t\tnode isPrimitives\r\t\t\t\tifTrue: [node leavesInto: leafDict fromSender: senderTally]\r\t\t\t\tifFalse: [node leavesInto: leafDict fromSender: self]]]! !\r!MessageTally methodsFor: 'tallying' stamp: ''!\rbumpBy: count\r\rtally _ tally + count! !\r!MessageTally methodsFor: 'tallying' stamp: ''!\rtally: context by: count\r\"Explicitly tally the specified context and its stack.\"\r| root |\rcontext method == method ifTrue: [^self bumpBy: count].\r(root _ context home sender) == nil\r\tifTrue: [^ (self bumpBy: count) tallyPath: context by: count].\r^ (self tally: root by: count) tallyPath: context by: count! !\r!MessageTally methodsFor: 'tallying' stamp: ''!\rtallyPath: context by: count\r| aMethod path |\raMethod _ context method.\rreceivers do: \r\t[:aMessageTally | \r\taMessageTally method == aMethod ifTrue: [path _ aMessageTally]].\rpath == nil ifTrue: \r\t[path _ MessageTally new class: context receiver class method: aMethod.\r\treceivers _ receivers copyWith: path].\r^ path bumpBy: count! !\r!MethodContext methodsFor: 'printing' stamp: 'ssa 1/1/1970 00:14'!\rprintOn: aStream\r\r| h |\raStream nextPutAll:(RVMTester printPrefixFor: self).\rself isExecutingBlock ifFalse: [^ super printOn: aStream].\rh _ self blockHome.\rh ifNil: [^ aStream nextPutAll: '[]'].\raStream nextPutAll: '[] from '.\rh printOn: aStream! !\r!MethodContext methodsFor: 'converting' stamp: 'ssa 9/7/2009 14:36'!\rasContext\r\r^self! !\r!Model methodsFor: 'printing' stamp: ''!\rarchiveOn: aStream\r\"To be consistent with Object, don't file out the dependents (subclasses may wish to override or put back the dependencies back in some other manner -- see Figure>dearchiveFrom:).\"\r\r| oldDependents |\roldDependents _ dependents.\rdependents _ nil.\rsuper archiveOn: aStream.\rdependents _ oldDependents.! !\r!CPUWatcher methodsFor: 'process operations' stamp: 'dmu 11/25/2008 00:18'!\rdebugProcess: aProcess\r\t| uiPriority oldPriority |\r\tuiPriority := Processor thisProcess priority.\r\taProcess priority >= uiPriority ifTrue: [\r\t\toldPriority := ProcessBrowser setProcess: aProcess toPriority: uiPriority - 1\r\t].\r\tProcessBrowser debugProcess: aProcess.! !\r!Number methodsFor: 'arithmetic' stamp: 'ssa 11/27/2009 16:14'!\rinverted\r\r^1/self! !\r!Number methodsFor: 'mathematical functions' stamp: 'ssa 8/27/2009 14:58'!\rpi\r\r^Float pi * self! !\r!Number methodsFor: 'truncation and round off' stamp: 'ssa 8/30/2009 04:04'!\ratRandom\r^self asFloat * (Collection atRandom: self class randomForPicking copy)! !\r!Number methodsFor: 'converting' stamp: 'ssa 11/15/2008 08:57'!\rasPointWithinRectangleWithExtent: extent\r\"Answer a point showing what coordinate I would have if wrapped into a rectangle of this extent.\rClip out of bounds answer to 0@0 if undershot or extent if overShot.  Only really useful for integers\"\r| x y newX newY |\rx _ extent x.\ry _ extent y.\rself > (x*y) ifTrue:[^extent].\rself < 1 ifTrue:[^0@0].\rnewX _ self \\\\ x = 0 ifTrue:[x]ifFalse:[self \\\\ x].\rnewY _ self - 1 // x + 1.\r\r^newX@newY\r\r\"{0 asPointWithinRectangleWithExtent:2@2.\r1 asPointWithinRectangleWithExtent:2@2.\r2 asPointWithinRectangleWithExtent:2@2.\r3 asPointWithinRectangleWithExtent:2@2.\r4 asPointWithinRectangleWithExtent:2@2.\r5 asPointWithinRectangleWithExtent:2@2.}     #(0@0 1@1 2@1 1@2 2@2 2@2)\"\r\r\"{0 asPointWithinRectangleWithExtent:3@3.\r1 asPointWithinRectangleWithExtent:3@3.\r2 asPointWithinRectangleWithExtent:3@3.\r3 asPointWithinRectangleWithExtent:3@3.\r4 asPointWithinRectangleWithExtent:3@3.\r5 asPointWithinRectangleWithExtent:3@3.\r6 asPointWithinRectangleWithExtent:3@3.\r7 asPointWithinRectangleWithExtent:3@3.\r8 asPointWithinRectangleWithExtent:3@3.\r9 asPointWithinRectangleWithExtent:3@3.\r10 asPointWithinRectangleWithExtent:3@3.}   #(0@0 1@1 2@1 3@1 1@2 2@2 3@2 1@3 2@3 3@3 3@3)\"! !\r!Number methodsFor: 'converting' stamp: ''!\rtheta: angle\r\"Answer a new Point whose r value is the receiver and whose theta value is the argument.\"\r\"KSC Extension\"\r\r^(angle cos * self) @ (angle sin * self)! !\r!Number methodsFor: 'intervals' stamp: 'ssa 9/7/2009 21:42'!\rzeno\r\"100 zeno\"\r\"-100 zeno\"\r\"Answer a collection of numbers representing Zeno's paradox steps between myself and zero\"\r| steps distanceRemaining |\rsteps _ OrderedCollection new.\rdistanceRemaining _ self abs.\r[distanceRemaining > 1] whileTrue:[steps add: distanceRemaining * self sign.\r\tdistanceRemaining _ distanceRemaining / 2.0].\r^steps asArray! !\r!Number methodsFor: 'printing' stamp: ''!\rarchiveOn: aStream \raStream\r\tstoreClass: self class;\r\tstore: self! !\r!Number methodsFor: 'printing' stamp: 'ssa 1/1/1970 00:39'!\rfloatPrecisionForDecimalPlaces: places\r\"Answer the floatPrecision that corresponds to the given number of decimal places\"\r\r^ #(1 0.1 0.01 0.001 0.0001 0.00001 0.000001 0.0000001 0.00000001 0.000000001) at: (places + 1)\r\r\"\r(0 to: 6) collect: [:i | Number floatPrecisionForDecimalPlaces: i]\r\"! !\r!Number methodsFor: 'printing' stamp: 'ssa 1/1/1970 00:48'!\rprintShowingDecimalPlaces: placesDesired\r\"Print the receiver showing precisely the given number of places desired .  If the placesDesired provided is positive, a decimal point and that many digits after the decimal point will always be shown.  If the placesDesired is zero, a whole number will be shown, without a decimal point.  This method could probably be greatly optimized -- improvements welcomed.\"\r\r| aString |\rplacesDesired <= 0 ifTrue: [^ self rounded printString].\r\raString _ ((self asFloat roundTo: (self floatPrecisionForDecimalPlaces: placesDesired)) asString), ((String new: placesDesired) atAllPut: $0).\r^ aString copyFrom: 1 to: ((aString indexOf: $.) + placesDesired)\r\r\"\r0.23 printShowingDecimalPlaces: 2\r23.5698 printShowingDecimalPlaces: 2\r-234.567 printShowingDecimalPlaces: 5\r23.4567 printShowingDecimalPlaces: 0\r\"! !\r!Number methodsFor: 'printing' stamp: 'ssa 10/7/2008 18:20'!\rprintShowingMax3Digits\r\"Print the receiver showing precisely the 3 digits, using K M B T for thousand, million, etc.\"\r\"|num|\rnum _ 0.00001234567890.\r20 timesRepeat:[num printShowingMax3Digits print.\r\tnum _ num *10].\"\r\r| s abs value |\rvalue _ self isFraction ifTrue:[self asFloat]ifFalse:[self].\rs _ value printString select:[:char| '0123456789' includes: char].\rs size <=3 ifTrue:[^value printString].\rabs _ value abs asFloat.\rabs < 0.01 ifTrue:[^((value * 1000) printShowingDecimalPlaces: 2),'m'].\rabs < 0.1 ifTrue:[^((value * 1000) printShowingDecimalPlaces: 1),'m'].\rabs < 10 ifTrue:[^value printShowingDecimalPlaces: 2].\rabs < 100 ifTrue:[^value printShowingDecimalPlaces: 1].\rabs < 1000 ifTrue:[^value asInteger printString].\rabs < 10000 ifTrue:[^((value /1000) printShowingDecimalPlaces: 2),'K'].\rabs < 100000 ifTrue:[^((value /1000) printShowingDecimalPlaces: 1),'K'].\rabs < 1000000 ifTrue:[^((value /1000) asInteger printString),'K'].\rabs < 10000000 ifTrue:[^((value /1000000) printShowingDecimalPlaces: 2),'M'].\rabs < 100000000 ifTrue:[^((value /1000000) printShowingDecimalPlaces: 1),'M'].\rabs < 1000000000 ifTrue:[^(value /1000000) asInteger printString,'M'].\rabs < 10000000000 ifTrue:[^((value /1000000000) printShowingDecimalPlaces: 2),'B'].\rabs < 100000000000 ifTrue:[^((value /1000000000) printShowingDecimalPlaces: 1),'B'].\rabs < 1000000000000 ifTrue:[^((value /1000000000) asInteger printString),'B'].\rabs < 10000000000000 ifTrue:[^((value /1000000000000) printShowingDecimalPlaces: 2),'T'].\rabs < 100000000000000 ifTrue:[^((value /1000000000000) printShowingDecimalPlaces: 1),'T'].\rabs < 1000000000000000 ifTrue:[^((value /1000000000000) asInteger printString),'T'].\rabs < 10000000000000000 ifTrue:[^((value /1000000000000000) printShowingDecimalPlaces: 2),'Q'].\rabs < 100000000000000000 ifTrue:[^((value /1000000000000000) printShowingDecimalPlaces: 1),'Q'].\rabs < 1000000000000000000 ifTrue:[^((value /1000000000000000) asInteger printString),'Q'].\r^'too big'\r\r! !\r!Float methodsFor: 'printing' stamp: 'ssa 1/1/1970 00:24'!\rabsPrintOn: aStream base: base digitCount: digitCount \r\"Print me in the given base, using digitCount significant figures.\"\r\"Float pi absPrintOn: Transcript base: 10 digitCount: 4. Transcript cr;flush\" \r\r| fuzz x exp q fBase scale logScale xi |\rself isInf ifTrue: [^ aStream nextPutAll: 'Inf'].\rfBase _ base asFloat.\r\"x is myself normalized to [1.0, fBase), exp is my exponent\"\rexp _ \r\tself < 1.0\r\t\tifTrue: [self reciprocalFloorLog: fBase]\r\t\tifFalse: [self floorLog: fBase].\rscale _ 1.0.\rlogScale _ 0.\r[(x _ fBase raisedTo: (exp + logScale)) = 0]\r\twhileTrue:\r\t\t[scale _ scale * fBase.\r\t\tlogScale _ logScale + 1].\rx _ self * scale / x.\rfuzz _ fBase raisedTo: 1 - digitCount.\r\"round the last digit to be printed\"\rx _ 0.5 * fuzz + x.\rx >= fBase\r\tifTrue: \r\t\t[\"check if rounding has unnormalized x\"\r\t\tx _ x / fBase.\r\t\texp _ exp + 1].\r(exp < 6 and: [exp > -4])\r\tifTrue: \r\t\t[\"decimal notation\"\r\t\tq _ 0.\r\t\texp < 0 ifTrue: [1 to: 1 - exp do: [:i | aStream nextPut: ('0.0000'\rat: i)]]]\r\tifFalse: \r\t\t[\"scientific notation\"\r\t\tq _ exp.\r\t\texp _ 0].\r[x >= fuzz]\r\twhileTrue: \r\t\t[\"use fuzz to track significance\"\r\t\txi _ x asInteger.\r\t\taStream nextPut: (Character digitValue: xi).\r\t\tx _ x - xi asFloat * fBase.\r\t\tfuzz _ fuzz * fBase.\r\t\texp _ exp - 1.\r\t\texp = -1 ifTrue: [aStream nextPut: $.]].\r[exp >= -1]\r\twhileTrue: \r\t\t[aStream nextPut: $0.\r\t\texp _ exp - 1.\r\t\texp = -1 ifTrue: [aStream nextPut: $.]].\rq ~= 0\r\tifTrue: \r\t\t[aStream nextPut: $e.\r\t\tq printOn: aStream]! !\r!Integer methodsFor: 'truncation and round off' stamp: 'ssa 11/27/2009 16:44'!\ratRandom\r\"Answer a random integer from 1 to self.  This implementation uses a\rshared generator. Heavy users should their own implementation or use\rInterval>atRandom: directly.\"\r\rself = 0 ifTrue: [ ^0 ].\rself < 0 ifTrue: [ ^self negated atRandom negated ].\r^self atRandom: Collection randomForPicking ! !\r!Integer methodsFor: 'printing' stamp: 'ar 7/18/2001 22:09'!\rasStringWithCommasSigned\r\"123456789 asStringWithCommasSigned\"\r\"-123456789 asStringWithCommasSigned\"\r| digits |\rdigits _ self abs printString.\r^ String streamContents:\r\t[:strm | \r\tself sign = -1 ifTrue: [strm nextPut: $-] ifFalse:[strm nextPut: $+].\r\t1 to: digits size do: \r\t\t[:i | strm nextPut: (digits at: i).\r\t\t(i < digits size and: [(i - digits size) \\\\ 3 = 0])\r\t\t\tifTrue: [strm nextPut: $,]]]! !\r!Integer methodsFor: 'printing' stamp: 'ssa 8/26/2009 12:23'!\rprinteth\r\"1 printeth '1st'\"\r\"2 printeth '2nd'\"\r\"3 printeth '3rd'\"\r\"4 printeth '4th'\"\r\"5 printeth '5th'\"\r\"1234 printeth '1234th'\"\r\"121 printeth '121st'\"\r| str suffix |\rstr _ self printString.\rsuffix _ (#('st' 'nd' 'rd' 'th')at: ((str last asNumber max:1) min:4)).\r^str,suffix! !\r!Integer methodsFor: 'benchmarks' stamp: 'dmu 1/1/1970 00:40'!\rtinyRVMBenchmarks\r\"Report the results of running the two tiny Squeak benchmarks.\rar 9/10/1999: Adjusted to run at least 1 sec to get more stable results\"\r\"0 tinyBenchmarks\"\r\"On a 292 MHz G3 Mac: 22727272 bytecodes/sec; 984169 sends/sec\"\r\"On a 400 MHz PII/Win98:  18028169 bytecodes/sec; 1081272 sends/sec\"\r| t1 t2 r n1 n2 s1 s2 totalYields |\rn1 _ 1.\rs1 _ RVMMulticoreSample capture.\r[t1 _ Time millisecondsToRun: [n1 benchmark].\rt1 < 1000] whileTrue:[n1 _ n1 * 2]. \"Note: #benchmark's runtime is about O(n)\"\r\rn2 _ 28.\r[t2 _ Time millisecondsToRun: [r _ n2 benchFib].\rt2 < 1000] whileTrue:[n2 _ n2 + 1]. \r\"Note: #benchFib's runtime is about O(k^n),\r\twhere k is the golden number = (1 + 5 sqrt) / 2 = 1.618....\"\r s2 _ RVMMulticoreSample capture.\r totalYields _ s2 totalYields.\r^ ((n1 * 500000 * 1000) // t1) printString, ' bytecodes/sec; ',\r  ((r * 1000) // t2) printString, ' sends/sec; ',\r   totalYields printString, ' total yields; ',\r   (t1 + t2) printString, ' total ms'! !\r!Integer methodsFor: 'explorer' stamp: 'laza 3/17/2005 13:37'!\rexplorerContents\r^{\r\t'hexadecimal' -> 16.\r\t'octal' -> 8.\r\t'binary' -> 2\r} collect: [:each |\r\tObjectExplorerWrapper with: each key translated name: (self printStringBase: each value) model: self]! !\r!LargePositiveInteger methodsFor: 'printing' stamp: 'ssa 9/11/2009 16:52'!\rprintOn: aStream\r\"hack to fix strange LPI bug\"\r^(self - 1 + 1)printOn: aStream base: 10! !\r!Object class methodsFor: 'instance creation' stamp: ''!\rdearchive: versionNumber from: aStream\r\"Override this method when implementing new archive versions for a class.\"\r\r^versionNumber == self archiveVersion\r\tifTrue: [self dearchiveFrom: aStream]\r\tifFalse: [self error: 'Can''t dearchive this version.']! !\r!Object class methodsFor: 'instance creation' stamp: ''!\rdearchiveFrom: aStream\r\r| anObject |\rself isVariable\r\tifTrue:[anObject _ self basicNew: (aStream read: Integer)]\r\tifFalse:[anObject _ self dearchiveNewFrom: aStream].\raStream storeObject: anObject.\ranObject dearchiveFrom: aStream.\r^anObject! !\r!Object class methodsFor: 'instance creation' stamp: ''!\rdearchiveNewFrom: aStream\r^self basicNew! !\r!ArchiveReader class methodsFor: 'instance creation' stamp: 'ssa 10/26/2008 08:08'!\rdearchive: aString \r\"ArchiveReader dearchive: 'archive.test' \"\r| aStream anObject |\raStream _ self on: (self fastStreamOn: aString).\ranObject _ aStream next.\raStream close.\r^anObject! !\r!ArchiveReader class methodsFor: 'instance creation' stamp: 'ssa 10/25/2008 20:52'!\rfastStreamOn: aFilename\r\"Answer a stream which is appropriate for getting the data from aFilename as fast as possible.  The default version ignores lineEndConventions.  This is tightly coupled with ArchiveWriter>fastStreamOn:\"\r\r^(FileStream oldFileNamed: aFilename) openReadOnly; yourself! !\r!ArchiveReader class methodsFor: 'instance creation' stamp: ''!\ron: aStream\r^self new setStream: aStream! !\r!ArchiveWriter class methodsFor: 'instance creation' stamp: 'ssa 10/25/2008 21:17'!\rarchive: anObject to: aString \r\"ArchiveWriter archive: Array new to: 'archive.test'\"\r\"ArchiveWriter archive: 1 to: 'archive.test'\"\r\"ArchiveWriter archive: #(1 2 3) to: 'archive.test'\"\r\"ArchiveWriter archive: (Array with: #aSymbol with: 'aSymbol') to: 'archive.test'\"\r\r| stream |\r stream _ self fastStreamOn:  aString.\r(self on: stream)\r\tnextPut: anObject;\r\tclose.! !\r!ArchiveWriter class methodsFor: 'instance creation' stamp: 'ssa 10/25/2008 20:34'!\rfastStreamOn: aFilename\r\"Answer a stream which is appropriate for getting the data to aFilename as fast as possible.  The default version ignores lineEndConventions.  This is tightly coupled with ArchiveReader>fastStreamOn:\"\r\r^FileStream newFileNamed: aFilename! !\r!ArchiveWriter class methodsFor: 'instance creation' stamp: ''!\ron: aWriteStream\r^self new setStream: aWriteStream! !\r!BinaryChoice class methodsFor: 'instance creation' stamp: 'ssa 8/19/2008 21:47'!\rmessage: aString displayAt: aPoint centered: aBoolean ifTrue: trueBlock ifFalse: falseBlock\r\"Mimic the old BinaryChoice protocol.  Canceling the menu by clicking outside executes false block\"\r| answer |\ranswer := PopUpMenu withCaption: aString chooseFrom: #( 'Yes' 'No').\ranswer = 1 ifTrue: trueBlock ifFalse: falseBlock! !\r!BitBlt class methodsFor: 'examples' stamp: 'di 12/1/97 12:08'!\ralphaBlendDemo\r\"To run this demo, use...\r\tDisplay restoreAfter: [BitBlt alphaBlendDemo]\t\rDisplays 10 alphas, then lets you paint.  Option-Click to stop painting.\"\r\r\"This code exhibits alpha blending in any display depth by performing\rthe blend in an off-screen buffer with 32-bit pixels, and then copying\rthe result back onto the screen with an appropriate color map. - tk 3/10/97\"\r\r\"This version uses a sliding buffer for painting that keeps pixels in 32 bits\ras long as they are in the buffer, so as not to lose info by converting down\rto display resolution and back up to 32 bits at each operation. - di 3/15/97\"\r\r| brush buff dispToBuff buffToDisplay mapDto32 map32toD prevP p brushToBuff theta buffRect buffSize buffToBuff brushRect delta newBuffRect updateRect |  \r\r\"compute color maps if needed\"\rDisplay depth <= 8 ifTrue: [\r\tmapDto32 _ Color cachedColormapFrom: Display depth to: 32.\r\tmap32toD _ Color cachedColormapFrom: 32 to: Display depth].\r\r\"display 10 different alphas, across top of screen\"\rbuff _ Form extent: 500@50 depth: 32.\rdispToBuff _ BitBlt toForm: buff.\rdispToBuff colorMap: mapDto32.\rdispToBuff copyFrom: (50@10 extent: 500@50) in: Display to: 0@0.\r1 to: 10 do: [:i | dispToBuff fill: (50*(i-1)@0 extent: 50@50)\r\t\t\t\t\tfillColor: (Color red alpha: i/10)\r\t\t\t\t\trule: Form blend].\rbuffToDisplay _ BitBlt toForm: Display.\rbuffToDisplay colorMap: map32toD.\rbuffToDisplay copyFrom: buff boundingBox in: buff to: 50@10.\r\r\"Create a brush with radially varying alpha\"\rbrush _ Form extent: 30@30 depth: 32.\r1 to: 5 do: \r\t[:i | brush fillShape: (Form dotOfSize: brush width*(6-i)//5)\r\t\t\tfillColor: (Color red alpha: 0.02 * i - 0.01)\r\t\t\tat: brush extent // 2].\r\r\"Now paint with the brush using alpha blending.\"\rbuffSize _ 100.\rbuff _ Form extent: brush extent + buffSize depth: 32.  \"Travelling 32-bit buffer\"\rdispToBuff _ BitBlt toForm: buff.  \"This is from Display to buff\"\rdispToBuff colorMap: mapDto32.\rbrushToBuff _ BitBlt toForm: buff.  \"This is from brush to buff\"\rbrushToBuff sourceForm: brush; sourceOrigin: 0@0.\rbrushToBuff combinationRule: Form blend.\rbuffToBuff _ BitBlt toForm: buff.  \"This is for slewing the buffer\"\r\r[Sensor yellowButtonPressed] whileFalse:\r\t[prevP _ nil.\r\tbuffRect _ Sensor cursorPoint - (buffSize // 2) extent: buff extent.\r\tdispToBuff copyFrom: buffRect in: Display to: 0@0.\r\t[Sensor redButtonPressed] whileTrue:\r\t\t[\"Here is the painting loop\"\r\t\tp _ Sensor cursorPoint - (brush extent // 2).\r\t\t(prevP == nil or: [prevP ~= p]) ifTrue:\r\t\t\t[prevP == nil ifTrue: [prevP _ p].\r\t\t\t(p dist: prevP) > buffSize ifTrue:\r\t\t\t\t[\"Stroke too long to fit in buffer -- clip to buffer,\r\t\t\t\t\tand next time through will do more of it\"\r\t\t\t\ttheta _ (p-prevP) theta.\r\t\t\t\tp _ ((theta cos@theta sin) * buffSize asFloat + prevP) truncated].\r\t\t\tbrushRect _ p extent: brush extent.\r\t\t\t(buffRect containsRect: brushRect) ifFalse:\r\t\t\t\t[\"Brush is out of buffer region.  Scroll the buffer,\r\t\t\t\t\tand fill vacated regions from the display\"\r\t\t\t\tdelta _ brushRect amountToTranslateWithin: buffRect.\r\t\t\t\tbuffToBuff copyFrom: buff boundingBox in: buff to: delta.\r\t\t\t\tnewBuffRect _ buffRect translateBy: delta negated.\r\t\t\t\t(newBuffRect areasOutside: buffRect) do:\r\t\t\t\t\t[:r | dispToBuff copyFrom: r in: Display to: r origin - newBuffRect origin].\r\t\t\t\tbuffRect _ newBuffRect].\r\r\t\t\t\"Interpolate from prevP to p...\"\r\t\t\tbrushToBuff drawFrom: prevP - buffRect origin\r\t\t\t\t\t\t\t\tto: p - buffRect origin\r\t\t\t\t\t\t\t\twithFirstPoint: false.\r\r\t\t\t\"Update (only) the altered pixels of the destination\"\r\t\t\tupdateRect _ (p min: prevP) corner: (p max: prevP) + brush extent.\r\t\t\tbuffToDisplay copy: updateRect from: updateRect origin - buffRect origin in: buff.\r\t\t\tprevP _ p]]]! !\r!BitBlt class methodsFor: 'examples' stamp: 'di 12/1/97 12:09'!\rantiAliasDemo \r\"To run this demo, use...\r\tDisplay restoreAfter: [BitBlt antiAliasDemo]\rGoes immediately into on-screen paint mode.  Option-Click to stop painting.\"\r\r\"This code exhibits alpha blending in any display depth by performing\rthe blend in an off-screen buffer with 32-bit pixels, and then copying\rthe result back onto the screen with an appropriate color map. - tk 3/10/97\"\r\r\"This version uses a sliding buffer for painting that keeps pixels in 32 bits\ras long as they are in the buffer, so as not to lose info by converting down\rto display resolution and back up to 32 bits at each operation. - di 3/15/97\"\r\r\"This version also uses WarpBlt to paint into twice as large a buffer,\rand then use smoothing when reducing back down to the display.\rIn fact this same routine will now work for 3x3 soothing as well.\rRemove the statements 'buff displayAt: 0@0' to hide the buffer. - di 3/19/97\"\r\r| brush buff dispToBuff buffToDisplay mapDto32 map32toD prevP p brushToBuff theta buffRect buffSize buffToBuff brushRect delta newBuffRect updateRect scale p0 |  \r\"compute color maps if needed\"\rDisplay depth <= 8 ifTrue: [\r\tmapDto32 _ Color cachedColormapFrom: Display depth to: 32.\r\tmap32toD _ Color cachedColormapFrom: 32 to: Display depth].\r\r\"Create a brush with radially varying alpha\"\rbrush _ Form extent: 3@3 depth: 32.\rbrush fill: brush boundingBox fillColor: (Color red alpha: 0.05).\rbrush fill: (1@1 extent: 1@1) fillColor: (Color red alpha: 0.2).\r\rscale _ 2.  \"Actual drawing happens at this magnification\"\r\"Scale brush up for painting in magnified buffer\"\rbrush _ brush magnify: brush boundingBox by: scale.\r\r\"Now paint with the brush using alpha blending.\"\rbuffSize _ 100.\rbuff _ Form extent: (brush extent + buffSize) * scale depth: 32.  \"Travelling 32-bit buffer\"\rdispToBuff _ (WarpBlt toForm: buff)  \"From Display to buff - magnify by 2\"\r\tsourceForm: Display;\r\tcolorMap: mapDto32;\r\tcombinationRule: Form over.\rbrushToBuff _ (BitBlt toForm: buff)  \"From brush to buff\"\r\tsourceForm: brush;\r\tsourceOrigin: 0@0;\r\tcombinationRule: Form blend.\rbuffToDisplay _ (WarpBlt toForm: Display)  \"From buff to Display - shrink by 2\"\r\tsourceForm: buff;\r\tcolorMap: map32toD;\r\tcellSize: scale;  \"...and use smoothing\"\r\tcombinationRule: Form over.\rbuffToBuff _ BitBlt toForm: buff.  \"This is for slewing the buffer\"\r\r[Sensor yellowButtonPressed] whileFalse:\r\t[prevP _ nil.\r\tbuffRect _ Sensor cursorPoint - (buff extent // scale // 2) extent: buff extent // scale.\r\tp0 _ (buff extent // 2) - (buffRect extent // 2).\r\tdispToBuff copyQuad: buffRect innerCorners toRect: buff boundingBox.\rbuff displayAt: 0@0.  \"** remove to hide sliding buffer **\"\r\t[Sensor redButtonPressed] whileTrue:\r\t\t[\"Here is the painting loop\"\r\t\tp _ Sensor cursorPoint - buffRect origin + p0.  \"p, prevP are rel to buff origin\"\r\t\t(prevP == nil or: [prevP ~= p]) ifTrue:\r\t\t\t[prevP == nil ifTrue: [prevP _ p].\r\t\t\t(p dist: prevP) > (buffSize-1) ifTrue:\r\t\t\t\t[\"Stroke too long to fit in buffer -- clip to buffer,\r\t\t\t\t\tand next time through will do more of it\"\r\t\t\t\ttheta _ (p-prevP) theta.\r\t\t\t\tp _ ((theta cos@theta sin) * (buffSize-2) asFloat + prevP) truncated].\r\t\t\tbrushRect _ p extent: brush extent.\r\t\t\t((buff boundingBox insetBy: scale) containsRect: brushRect) ifFalse:\r\t\t\t\t[\"Brush is out of buffer region.  Scroll the buffer,\r\t\t\t\t\tand fill vacated regions from the display\"\r\t\t\t\tdelta _ (brushRect amountToTranslateWithin: (buff boundingBox insetBy: scale)) // scale.\r\t\t\t\tbuffToBuff copyFrom: buff boundingBox in: buff to: delta*scale.\r\t\t\t\tnewBuffRect _ buffRect translateBy: delta negated.\r\t\t\t\tp _ p translateBy: delta*scale.\r\t\t\t\tprevP _ prevP translateBy: delta*scale.\r\t\t\t\t(newBuffRect areasOutside: buffRect) do:\r\t\t\t\t\t[:r | dispToBuff copyQuad: r innerCorners toRect: (r origin - newBuffRect origin*scale extent: r extent*scale)].\r\t\t\t\tbuffRect _ newBuffRect].\r\r\t\t\t\"Interpolate from prevP to p...\"\r\t\t\tbrushToBuff drawFrom: prevP to: p withFirstPoint: false.\rbuff displayAt: 0@0.  \"** remove to hide sliding buffer **\"\r\r\t\t\t\"Update (only) the altered pixels of the destination\"\r\t\t\tupdateRect _ (p min: prevP) corner: (p max: prevP) + brush extent.\r\t\t\tupdateRect _ updateRect origin // scale * scale\r\t\t\t\t\tcorner: updateRect corner + scale // scale * scale.\r\t\t\tbuffToDisplay copyQuad: updateRect innerCorners\r\t\t\t\t\t\ttoRect: (updateRect origin // scale + buffRect origin\r\t\t\t\t\t\t\t\t\textent: updateRect extent // scale).\r\t\t\tprevP _ p]]]! !\r!BitBlt class methodsFor: 'examples' stamp: 'ssa 10/27/2008 16:38'!\rexampleColorMap\t\"BitBlt exampleColorMap\"\r\"This example shows what one can do with the fixed part of a color map. The color map, as setup below, rotates the bits of a pixel all the way around. Thus you'll get a (sometime strange looking ;-) animation of colors which will end up exactly the way it looked at the beginning. The example is given to make you understand that the masks and shifts can be used for a lot more than simply color converting pixels. In this example, for instance, we use only two of the four independent shifters.\"\r| cc bb |\rcc _ ColorMap masks: {\r\t1 << (Display depth-1). \"mask out high bit of color component\"\r\t1 << (Display depth-1) - 1. \"mask all other bits\"\r\t0.\r\t0}\r\tshifts: {\r\t\t1 - Display depth. \"shift right to bottom most position\"\r\t\t1. \"shift all other pixels one bit left\"\r\t\t0.\r\t\t0}.\rbb _ BitBlt toForm: Display.\rbb \r\tsourceForm: Display;\r\tcombinationRule: 3;\r\tcolorMap: cc.\r1 to: Display depth do:[:i|\r\tbb copyBits.\r\tDisplay forceDisplayUpdate.\r\tSensor waitButton;waitNoButton\r].\r! !\r!BitBlt class methodsFor: 'benchmarks' stamp: 'ar 4/24/2001 23:49'!\rbenchDiffsFrom: before to: afterwards\r\"Given two outputs of BitBlt>>benchmark show the relative improvements.\"\r| old new log oldLine newLine oldVal newVal improvement |\rlog _ WriteStream on: String new.\rold _ ReadStream on: before.\rnew _ ReadStream on: afterwards.\r[old atEnd or:[new atEnd]] whileFalse:[\r\toldLine _ old upTo: Character cr.\r\tnewLine _ new upTo: Character cr.\r\t(oldLine includes: Character tab) ifTrue:[\r\t\toldLine _ ReadStream on: oldLine.\r\t\tnewLine _ ReadStream on: newLine.\r\t\tTranscript cr; show: (oldLine upTo: Character tab); tab.\r\t\tlog cr; nextPutAll: (newLine upTo: Character tab); tab.\r\r\t\t[oldLine skipSeparators. newLine skipSeparators.\r\t\toldLine atEnd] whileFalse:[\r\t\t\toldVal _ Integer readFrom: oldLine.\r\t\t\tnewVal _ Integer readFrom: newLine.\r\t\t\timprovement _ oldVal asFloat / newVal asFloat roundTo: 0.01.\r\t\t\tTranscript show: improvement printString; tab; tab.\r\t\t\tlog print: improvement; tab; tab].\r\t] ifFalse:[\r\t\tTranscript cr; show: oldLine.\r\t\tlog cr; nextPutAll: oldLine.\r\t].\r].\r^log contents! !\r!BitBlt class methodsFor: 'benchmarks' stamp: 'ar 5/14/2001 23:31'!\rbenchmark2\t\t\"BitBlt benchmark\"\r\"Run a benchmark on different combinations rules, source/destination depths and BitBlt modes. Note: This benchmark doesn't give you any 'absolute' value - it is intended only for benchmarking improvements in the bitblt code and nothing else.\rAttention: *this*may*take*a*while*\"\r| bb source dest destRect log t |\rlog _ WriteStream on: String new.\rdestRect _ 0@0 extent: 600@600.\r\"Form paint/Form over - the most common rules\"\r#( 25 3 ) do:[:rule|\r\tTranscript cr; show:'---- Combination rule: ', rule printString,' ----'.\r\tlog cr; nextPutAll:'---- Combination rule: ', rule printString,' ----'.\r\t#(1 2 4 8 16 32) do:[:destDepth|\r\t\tdest _ nil.\r\t\tdest _ Form extent: destRect extent depth: destDepth.\r\t\tTranscript cr.\r\t\tlog cr.\r\t\t#(1 2 4 8 16 32) do:[:sourceDepth|\r\t\t\tTranscript cr; show: sourceDepth printString, ' => ', destDepth printString.\r\t\t\tlog cr; nextPutAll: sourceDepth printString, ' => ', destDepth printString.\r\t\t\tsource _ nil. bb _ nil.\r\t\t\tsource _ Form extent: destRect extent depth: sourceDepth.\r\t\t\t(source getCanvas) fillOval: dest boundingBox color: Color yellow borderWidth: 30 borderColor: Color black.\r\t\t\tbb _ WarpBlt toForm: dest.\r\t\t\tbb sourceForm: source.\r\t\t\tbb sourceRect: source boundingBox.\r\t\t\tbb destRect: dest boundingBox.\r\t\t\tbb colorMap: (source colormapIfNeededFor: dest).\r\t\t\tbb combinationRule: rule.\r\r\t\t\t\"Measure speed of copyBits\"\r\t\t\tt _ Time millisecondsToRun:[1 to: 10 do:[:i| bb copyBits]].\r\t\t\tTranscript tab; show: t printString.\r\t\t\tlog tab; nextPutAll: t printString.\r\r\t\t\tbb sourceForm: source destRect: source boundingBox.\r\r\t\t\t\"Measure speed of 1x1 warpBits\"\r\t\t\tbb cellSize: 1.\r\t\t\tt _ Time millisecondsToRun:[1 to: 4 do:[:i| bb warpBits]].\r\t\t\tTranscript tab; show: t printString.\r\t\t\tlog tab; nextPutAll: t printString.\r\r\t\t\t\"Measure speed of 2x2 warpBits\"\r\t\t\tbb cellSize: 2.\r\t\t\tt _ Time millisecondsToRun:[bb warpBits].\r\t\t\tTranscript tab; show: t printString.\r\t\t\tlog tab; nextPutAll: t printString.\r\r\t\t\t\"Measure speed of 3x3 warpBits\"\r\t\t\tbb cellSize: 3.\r\t\t\tt _ Time millisecondsToRun:[bb warpBits].\r\t\t\tTranscript tab; show: t printString.\r\t\t\tlog tab; nextPutAll: t printString.\r\t\t].\r\t].\r].\r^log contents! !\r!BitBlt class methodsFor: 'benchmarks' stamp: 'ar 4/26/2001 21:04'!\rbenchmark3\t\t\"BitBlt benchmark\"\r\"Run a benchmark on different combinations rules, source/destination depths and BitBlt modes. Note: This benchmark doesn't give you any 'absolute' value - it is intended only for benchmarking improvements in the bitblt code and nothing else.\rAttention: *this*may*take*a*while*\"\r| bb source dest destRect log t |\rlog _ WriteStream on: String new.\rdestRect _ 0@0 extent: 600@600.\r\"Form paint/Form over - the most common rules\"\r#( 25 3 ) do:[:rule|\r\tTranscript cr; show:'---- Combination rule: ', rule printString,' ----'.\r\tlog cr; nextPutAll:'---- Combination rule: ', rule printString,' ----'.\r\t#(1 2 4 8 16 32) do:[:destDepth|\r\t\tdest _ nil.\r\t\tdest _ Form extent: destRect extent depth: destDepth.\r\t\tTranscript cr.\r\t\tlog cr.\r\t\t#(1 2 4 8 16 32) do:[:sourceDepth|\r\t\t\tTranscript cr; show: sourceDepth printString, ' => ', destDepth printString.\r\t\t\tlog cr; nextPutAll: sourceDepth printString, ' => ', destDepth printString.\r\t\t\tsource _ nil. bb _ nil.\r\t\t\tsource _ Form extent: destRect extent depth: sourceDepth.\r\t\t\t(source getCanvas) fillOval: dest boundingBox color: Color yellow borderWidth: 30 borderColor: Color black.\r\t\t\tbb _ WarpBlt toForm: dest.\r\t\t\tbb sourceForm: source.\r\t\t\tbb sourceRect: source boundingBox.\r\t\t\tbb destRect: dest boundingBox.\r\t\t\tbb colorMap: (source colormapIfNeededFor: dest).\r\t\t\tbb combinationRule: rule.\r\r\t\t\t\"Measure speed of copyBits\"\r\t\t\tt _ Time millisecondsToRun:[1 to: 10 do:[:i| bb copyBits]].\r\t\t\tTranscript tab; show: t printString.\r\t\t\tlog tab; nextPutAll: t printString.\r\r\t\t\tbb sourceForm: source destRect: source boundingBox.\r\r\t\t\t\"Measure speed of 1x1 warpBits\"\r\t\t\tbb cellSize: 1.\r\t\t\tt _ Time millisecondsToRun:[1 to: 4 do:[:i| bb warpBits]].\r\t\t\tTranscript tab; show: t printString.\r\t\t\tlog tab; nextPutAll: t printString.\r\r\t\t\t\"Measure speed of 2x2 warpBits\"\r\t\t\tbb cellSize: 2.\r\t\t\tt _ Time millisecondsToRun:[bb warpBits].\r\t\t\tTranscript tab; show: t printString.\r\t\t\tlog tab; nextPutAll: t printString.\r\r\t\t\t\"Measure speed of 3x3 warpBits\"\r\t\t\tbb cellSize: 3.\r\t\t\tt _ Time millisecondsToRun:[bb warpBits].\r\t\t\tTranscript tab; show: t printString.\r\t\t\tlog tab; nextPutAll: t printString.\r\t\t].\r\t].\r].\r^log contents! !\r!Character class methodsFor: 'accessing untypeable characters' stamp: 'NS 7/11/2000 09:20'!\rarrowDown\r^ self value: 31! !\r!Character class methodsFor: 'accessing untypeable characters' stamp: 'NS 7/11/2000 09:20'!\rarrowLeft\r^ self value: 28! !\r!Character class methodsFor: 'accessing untypeable characters' stamp: 'NS 7/11/2000 09:20'!\rarrowRight\r^ self value: 29! !\r!Character class methodsFor: 'accessing untypeable characters' stamp: 'NS 7/11/2000 09:20'!\rarrowUp\r^ self value: 30! !\r!Character class methodsFor: 'accessing untypeable characters' stamp: ''!\rbackspace\r\"Answer the Character representing a backspace.\"\r\r^self value: 8! !\r!Character class methodsFor: 'accessing untypeable characters' stamp: ''!\rcr\r\"Answer the Character representing a carriage return.\"\r\r^self value: 13! !\r!Character class methodsFor: 'accessing untypeable characters' stamp: 'NS 7/11/2000 09:19'!\rdelete\r^ self value: 127! !\r!Character class methodsFor: 'accessing untypeable characters' stamp: 'NS 7/11/2000 09:21'!\rend\r^ self value: 4! !\r!Character class methodsFor: 'accessing untypeable characters' stamp: ''!\renter\r\"Answer the Character representing enter.\"\r\r^self value: 3! !\r!Character class methodsFor: 'accessing untypeable characters' stamp: 'ls 9/2/1999 08:06'!\rescape\r\"Answer the ASCII ESC character\"\r\r^self value: 27! !\r!Character class methodsFor: 'accessing untypeable characters' stamp: 'sma 3/15/2000 22:33'!\reuro\r\"The Euro currency sign, that E with two dashes. The key code is a wild guess\"\r\r^ Character value: 219! !\r!Character class methodsFor: 'accessing untypeable characters' stamp: 'NS 7/11/2000 09:21'!\rhome\r^ self value: 1! !\r!Character class methodsFor: 'accessing untypeable characters' stamp: 'NS 7/11/2000 09:19'!\rinsert\r^ self value: 5! !\r!Character class methodsFor: 'accessing untypeable characters' stamp: 'ls 9/8/1998 22:15'!\rlf\r\"Answer the Character representing a linefeed.\"\r\r^self value: 10! !\r!Character class methodsFor: 'accessing untypeable characters' stamp: ''!\rlinefeed\r\"Answer the Character representing a linefeed.\"\r\r^self value: 10! !\r!Character class methodsFor: 'accessing untypeable characters' stamp: 'wiz 4/9/2006 20:30'!\rnbsp\r\"non-breakable space. Latin1 encoding common usage.\"\r\r^ Character value: 160! !\r!Character class methodsFor: 'accessing untypeable characters' stamp: ''!\rnewPage\r\"Answer the Character representing a form feed.\"\r\r^self value: 12! !\r!Character class methodsFor: 'accessing untypeable characters' stamp: 'NS 7/11/2000 09:20'!\rpageDown\r^ self value: 12! !\r!Character class methodsFor: 'accessing untypeable characters' stamp: 'NS 7/11/2000 09:21'!\rpageUp\r^ self value: 11! !\r!Character class methodsFor: 'accessing untypeable characters' stamp: ''!\rspace\r\"Answer the Character representing a space.\"\r\r^self value: 32! !\r!Character class methodsFor: 'accessing untypeable characters' stamp: ''!\rtab\r\"Answer the Character representing a tab.\"\r\r^self value: 9! !\r!Color class methodsFor: 'other' stamp: 'ssa 9/13/2008 16:04'!\rcolorChart\r\r^ColorChart! !\r!Color class methodsFor: 'other' stamp: 'ssa 9/13/2008 16:04'!\rcolorChart: aChart\r\rColorChart _ aChart! !\r!Color class methodsFor: 'color from user' stamp: 'ssa 9/13/2008 15:52'!\rfromUser\r\"Displays a color palette of colors, waits for a mouse click, and returns the selected color. Any pixel on the Display can be chosen, not just those in the color palette.\"\r\"Note: Since the color chart is cached, you may need to do 'ColorChart _ nil' after changing the oldColorPaletteForDepth:extent: method.\"\r\"Color fromUser\"\r\r| d startPt save tr oldColor c here s |\rd _ Display depth.\r((ColorChart == nil) or: [ColorChart depth ~= Display depth]) \r\tifTrue: [ColorChart _ self oldColorPaletteForDepth: d extent: (2 * 144)@80].\rstartPt _ Sensor cursorPoint \"y < Display center y \r\tifTrue: [startPt _ 0@(Display boundingBox bottom - ColorChart height)]\r\tifFalse: [startPt _ 0@0]\".\r\rsave _ Form fromDisplay: (startPt extent: ColorChart extent).\rColorChart displayAt: startPt.\rtr _ ColorChart extent - (50@19) corner: ColorChart extent.\rtr _ tr translateBy: startPt.\r\roldColor _ nil.\r[Sensor anyButtonPressed] whileFalse: [\r\tc _ Display colorAt: (here _ Sensor cursorPoint).\r\t(tr containsPoint: here)\r\t\tifFalse: [Display fill: (0@61+startPt extent: 20@19) fillColor: c]\r\t\tifTrue: [\r\t\t\tc _ Color transparent.\r\t\t\tDisplay fill: (0@61+startPt extent: 20@19) fillColor: Color white].\r\tc = oldColor ifFalse: [\r\t\tDisplay fillWhite: (20@61 + startPt extent: 135@19).\r\t\tc isTransparent\r\t\t\tifTrue: [s _ 'transparent']\r\t\t\tifFalse: [s _ c shortPrintString.\r\t\t\t\t\ts _ s copyFrom: 7 to: s size - 1].\r\t\ts displayAt: 20@61 + startPt.\r\t\toldColor _ c]].\rsave displayAt: startPt.\rSensor waitNoButton.\r^ c\r! !\r!ColorMap class methodsFor: 'instance creation' stamp: 'ar 5/27/2000 20:08'!\rmappingToARGB: srcBitMasks\r\"Return a ColorMap mapping from srcBitMasks into canonical ARGB space\"\r^self mappingFrom: srcBitMasks to: #(16rFF0000 16rFF00 16rFF 16rFF000000)! !\r!ColorMap class methodsFor: 'instance creation' stamp: 'ar 5/4/2001 15:59'!\rmasks: maskArray shifts: shiftArray\r^self shifts: shiftArray masks: maskArray colors: nil.! !\r!Controller class methodsFor: 'initialization' stamp: 'ssa 8/15/2008 09:40'!\rinitialize\r\"Controller initialize\"\rself MinActivityLapse: 50.! !\r!CopyWriter class methodsFor: 'instance creation' stamp: ''!\rcopy: anObject\r| aStream |\raStream _ ReadWriteStream on: (Array new: 100).\r(self on: aStream) nextPut: anObject.\raStream reset.\r^(CopyReader on: aStream) next! !\r!Delay class methodsFor: 'snapshotting' stamp: 'dmu 5/25/2010 11:02'!\rstartUp\r\"Restart active delay, if any, when resuming a snapshot.\"\r\rself restoreResumptionTimes.\rActiveDelay == nil ifFalse: [ActiveDelay activate].\rAccessProtect _ Semaphore forMutualExclusion\r! !\r!EventSensor class methodsFor: 'class initialization' stamp: 'nk 4/12/2004 18:55'!\reventPollPeriod\r^EventPollPeriod ifNil: [ EventPollPeriod _ 500 ].! !\r!EventSensor class methodsFor: 'class initialization' stamp: 'nk 4/12/2004 18:55'!\reventPollPeriod: msec\r\"Set the number of milliseconds between checking for events to msec.\"\r\rEventPollPeriod _ msec max: 10.! !\r!EventSensor class methodsFor: 'class initialization' stamp: 'ar 7/23/2000 15:06'!\rinstall\t\"EventSensor install\"\r\"Install an EventSensor in place of the current Sensor.\"\r| newSensor |\rSensor shutDown.\rnewSensor _ self new.\rnewSensor startUp.\r\"Note: We must use #become: here to replace all references to the old sensor with the new one, since Sensor is referenced from all the existing controllers.\"\rSensor becomeForward: newSensor. \"done\"! !\r!False class methodsFor: 'instance creation' stamp: ''!\rdearchiveFrom: aStream\r\raStream storeObject: false.\r^false! !\r!Form class methodsFor: 'instance creation' stamp: ''!\rarchiveVersion\r\"universal 2.3, 2.4 format.\"\r\r^3! !\r!Form class methodsFor: 'instance creation' stamp: ''!\rdearchive2From: anArchiver\r\"If the archiver is a copier, just get a deepCopy directly from it.\"\r\r| anObject |\ranArchiver isCopier\r\tifFalse: [^super dearchiveFrom: anArchiver].\ranObject _ (anArchiver read: self) deepCopy.\ranArchiver storeObject: anObject.\r^anObject! !\r!Form class methodsFor: 'instance creation' stamp: ''!\rdearchive: versionNumber from: aStream\r\"Override this method when implementing new archive versions for a class.\"\r\r^versionNumber == self archiveVersion\r\tifTrue: [self dearchiveFrom: aStream]\r\tifFalse: \r\t\t[versionNumber == 2\r\t\t\tifTrue: [self dearchive2From: aStream]\r\t\t\tifFalse: [self error: 'Can''t dearchive this version.']]! !\r!Form class methodsFor: 'instance creation' stamp: ''!\rdearchiveFrom: anArchiver\r\"Always use store: and read:.\"\r\r| anObject |\ranObject _ anArchiver read: self.\ranArchiver isCopier\r\tifTrue: [anObject _ anObject deepCopy].\ranArchiver storeObject: anObject.\r^anObject! !\r!Form class methodsFor: 'instance creation' stamp: 'ssa 11/17/2008 13:50'!\rdotOfSize: diameter color: aColor\r\"Create a form which contains a round colored dot with transparent background.\"\r| radius form bb rect centerX centerY centerYBias centerXBias radiusSquared xOverY maxy dx |\rradius _ diameter//2.\rform _ self extent: diameter@diameter depth: Display depth.\rform offset: (0@0) - (radius@radius).\t\rbb _ (BitBlt current toForm: form)\r\tsourceX: 0; sourceY: 0;\r\tcombinationRule: Form over;\r\tfillColor: aColor.\rrect _ form boundingBox.\rcenterX _ rect center x.\rcenterY _ rect center y.\rcenterYBias _ rect height odd ifTrue: [0] ifFalse: [1].\rcenterXBias _ rect width odd ifTrue: [0] ifFalse: [1].\rradiusSquared _ (rect height asFloat / 2.0) squared - 0.01.\rxOverY _ rect width asFloat / rect height asFloat.\rmaxy _ rect height - 1 // 2.\r\r\"First do the inner fill, and collect x values\"\r0 to: maxy do:\r\t[:dy |\r\tdx _ ((radiusSquared - (dy * dy) asFloat) sqrt * xOverY) truncated.\r\tbb\tdestX: centerX - centerXBias - dx\r\t\tdestY: centerY - centerYBias - dy\r\t\twidth: dx + dx + centerXBias + 1\r\t\theight: 1;\r\t\tcopyBits.\r\tbb\tdestY: centerY + dy;\r\t\tcopyBits].\rform mapColor: Color white to: Color transparent.\r^ form\r\"\rTime millisecondsToRun:\r[1 to: 30 do: [:i | (Form dotOfSize: i color: Color random) displayAt: (i*30)@(i*30)]]\r\"! !\r!Form class methodsFor: 'instance creation' stamp: 'ssa 8/28/2009 19:30'!\rfromBinaryStream: aBinaryStream\r\"Read a Form or ColorForm from given file, using the first byte of the file to guess its format. Currently handles: GIF, uncompressed BMP, and both old and new DisplayObject writeOn: formats, JPEG, and PCX. Return nil if the file could not be read or was of an unrecognized format.\"\r\r| firstByte |\raBinaryStream binary.\rfirstByte _ aBinaryStream next.\rfirstByte = 1 ifTrue: [\r\t\"old Squeakform format\"\r\t^ self new readFromOldFormat: aBinaryStream].\rfirstByte = 2 ifTrue: [\r\t\"new Squeak form format\"\r\t^ self new readFrom: aBinaryStream].\r\r\"Try for JPG, GIF, or PCX...\"\r\"Note: The following call closes the stream.\"\r^ ImageReadWriter formFromStream: aBinaryStream \r! !\r!Cursor class methodsFor: 'class initialization' stamp: 'ssa 1/1/1970 00:21'!\rinitAction\r\"Cursor initAction\"\rActionCursor _    \r\t(Cursor\r\t\textent: 16@16\r\t\tfromArray: #(\r\t2r0000000000000000\r\t2r0000000100000000\r\t2r0010000100001000\r\t2r0001000100010000\r\t2r0000100100100000\r\t2r0000010001000000\r\t2r0000000000000000\r\t2r1111100100111110\r\t2r0000000000000000\r\t2r0000100001000000\r\t2r0001000100100000\r\t2r0010000100010000\r\t2r0100000100001000\r\t2r0000000100000000\r\t2r0000000000000000\r\t2r0)\r\t\toffset: -7@-7).\r\r! !\r!Cursor class methodsFor: 'class initialization' stamp: 'ssa 9/19/2008 11:39'!\rinitLeftArrow \r\rLeftArrowCursor  _\r\t      (Cursor\rextent: 16@16\rfromArray: #(\r\t2r0000100000000000\r\t2r0011100000000000\r\t2r1111111110000000\r\t2r0011100000000000\r\t2r0000100000000000\r\t2r0\r\t2r0\r\t2r0\r\t2r0\r\t2r0\r\t2r0\r\t2r0\r\t2r0\r\t2r0\r\t2r0\r\t2r0)\roffset: -8@0).\r\r\"Cursor initLeftArrow\"! !\r!Cursor class methodsFor: 'class initialization' stamp: 'ssa 1/1/1970 00:31'!\rinitialize\r\"Create all the standard cursors...\"\r\tself initOrigin.\r\tself initRightArrow.\r\tself initLeftArrow.\r\tself initMenu.\r\tself initCorner.\r\tself initRead.\r\tself initWrite.\r\tself initWait.\r\tBlankCursor _ Cursor new.\r\tself initXeq.\r\tself initSquare.\r\tself initNormalWithMask.\r\tself initCrossHair.\r\tself initMarker.\r\tself initUp.\r\tself initDown.\r\tself initMove.\r\tself initBottomLeft.\r\tself initBottomRight.\r\tself initAction.\r\tself initResizeLeft.\r\tself initResizeTop.\r\tself initResizeTopLeft.\r\tself initResizeTopRight.\r\tself initTopLeft.\r\tself initTopRight.\r\tself makeCursorsWithMask.\r\r\t\"Cursor initialize\"\r! !\r!Cursor class methodsFor: 'constants' stamp: 'ssa 9/19/2008 12:03'!\raction\r\"Answer the instance of me that indicates a mouse action is available\"\r\r^ActionCursor! !\r!Cursor class methodsFor: 'constants' stamp: 'ssa 9/19/2008 11:24'!\rleftArrow \r\"Answer the instance of me that is the shape of an arrow pointing to the left.\"\r\r^LeftArrowCursor! !\r!ImageReadWriter class methodsFor: 'instance creation' stamp: ''!\ron: aStream\r\"Answer an instance of the receiver for encoding and/or decoding images on the given.\"\r\r^ self new on: aStream\r! !\r!ImageReadWriter class methodsFor: 'image reading/writing' stamp: 'nk 7/16/2003 17:59'!\rallTypicalFileExtensions\r\"Answer a collection of file extensions (lowercase) which files that my subclasses can read might commonly have\"\r\"ImageReadWriter allTypicalFileExtensions\"\r| extensions |\rextensions _ Set new.\rself allSubclassesDo: [ :cls | extensions addAll: cls typicalFileExtensions ].\r^extensions! !\r!ImageReadWriter class methodsFor: 'image reading/writing' stamp: 'ls 9/15/1998 19:08'!\rformFromFileNamed: fileName\r\"Answer a ColorForm stored on the file with the given name.\"\r| stream |\rstream _ FileStream readOnlyFileNamed: fileName.\r^self formFromStream: stream! !\r!ImageReadWriter class methodsFor: 'image reading/writing' stamp: 'tk 5/7/1998 17:35'!\rformFromServerFile: fileName\r\"Answer a ColorForm stored on the file with the given name.  Meant to be called from during the getting of updates from the server.  That assures that (Utilities serverUrls) returns the right group of servers.\"\r\r| form urls doc |\rurls _ Utilities serverUrls collect:\r\t[:url | url, fileName].  \" fileName starts with: 'updates/'  \"\rurls do: [:aURL |\r\t(fileName findTokens: '.') last asLowercase = 'gif' ifTrue: [\r\t\tform _ HTTPSocket httpGif: aURL.\r\t\tform = (ColorForm extent: 20@20 depth: 8) \r\t\t\tifTrue: [self inform: 'The file ',aURL,' is ill formed.'].\r\t\t^ form].\r\t(fileName findTokens: '.') last asLowercase = 'bmp' ifTrue: [\r\t\tdoc _ HTTPSocket httpGet: aURL accept: 'image/bmp'.\r\t\tform _ Form fromBMPFile: doc.\r\t\tdoc close.\r\t\tform ifNil: [self inform: 'The file ',aURL,' is ill formed.'. ^ Form new]\r\t\t\tifNotNil: [^ form]].\r\tself inform: 'File ', fileName, 'does not end with .gif or .bmp'].\rself inform: 'That file not found on any server we know'.! !\r!ImageReadWriter class methodsFor: 'image reading/writing' stamp: 'sd 1/30/2004 15:18'!\rformFromStream: aBinaryStream\r\"Answer a ColorForm stored on the given stream.  closes the stream\"\r| reader readerClass form  |\r\rreaderClass _ self withAllSubclasses\r\tdetect: [:subclass | subclass understandsImageFormat: aBinaryStream]\r\tifNone: [\r\t\taBinaryStream close.\r\t\t^self error: 'image format not recognized'].\rreader _ readerClass new on: aBinaryStream reset.\rCursor read showWhile: [\r\tform _ reader nextImage.\r\treader close].\r^ form\r! !\r!ImageReadWriter class methodsFor: 'image reading/writing' stamp: ''!\rputForm: aForm onFileNamed: fileName\r\"Store the given form on a file of the given name.\"\r\r| writer |\rwriter _ self on: (FileStream newFileNamed: fileName) binary.\rCursor write showWhile: [writer nextPutImage: aForm].\rwriter close.\r! !\r!ImageReadWriter class methodsFor: 'image reading/writing' stamp: 'tk\r9/13/97 16:13'!\rputForm: aForm onStream: aWriteStream\r\"Store the given form on a file of the given name.\"\r\r| writer |\rwriter _ self on: aWriteStream.\rCursor write showWhile: [writer nextPutImage: aForm].\rwriter close.\r! !\r!ImageReadWriter class methodsFor: 'image reading/writing' stamp: 'nk 7/16/2003 17:55'!\rtypicalFileExtensions\r\"Answer a collection of file extensions (lowercase) which files that I can read might commonly have\"\r^#()! !\r!ImageReadWriter class methodsFor: 'image reading/writing' stamp: 'ar 3/1/2006 22:59'!\runderstandsImageFormat: aStream \r^[(self new on: aStream) understandsImageFormat] on: Error do:[:ex| ex return: false]! !\r!BMPReadWriter class methodsFor: 'image reading/writing' stamp: 'nk 7/16/2003 17:56'!\rtypicalFileExtensions\r\"Answer a collection of file extensions (lowercase) which files that I can read might commonly have\"\r^#('bmp')! !\r!BMPReadWriter class methodsFor: 'testing' stamp: 'ar 6/16/2002 18:55'!\rdisplayAllFrom: fd\r\"BMPReadWriter displayAllFrom: FileDirectory default\"\rfd fileNames do:[:fName|\r\t(fName endsWith: '.bmp') ifTrue:[\r\t\t[(Form fromBinaryStream: (fd readOnlyFileNamed: fName)) display.\r\t\tDisplay forceDisplayUpdate] on: Error do:[:nix|].\r\t].\r].\rfd directoryNames do:[:fdName|\r\tself displayAllFrom: (fd directoryNamed: fdName)\r].! !\r!BMPReadWriter class methodsFor: 'testing' stamp: 'ar 6/16/2002 18:56'!\rreadAllFrom: fd\r\"MessageTally spyOn:[BMPReadWriter readAllFrom: FileDirectory default]\"\rfd fileNames do:[:fName|\r\t(fName endsWith: '.bmp') ifTrue:[\r\t\t[Form fromBinaryStream: (fd readOnlyFileNamed: fName)] on: Error do:[:nix].\r\t].\r].\rfd directoryNames do:[:fdName|\r\tself readAllFrom: (fd directoryNamed: fdName)\r].! !\r!GIFReadWriter class methodsFor: 'class initialization' stamp: ''!\rinitialize\r\"GIFReadWriter initialize\"\r\rImageSeparator _ $, asInteger.\rExtension _ $!! asInteger.\rTerminator _ $; asInteger.\r! !\r!GIFReadWriter class methodsFor: 'examples' stamp: 'bf 5/29/2003 01:56'!\rexampleAnim\r\"GIFReadWriter exampleAnim\"\r\r| writer extent center |\rwriter := GIFReadWriter on: (FileStream newFileNamed: 'anim.gif').\rwriter loopCount: 20.\t\t\"Repeat 20 times\"\rwriter delay: 10.\t\t\"Wait 10/100 seconds\"\rextent := 42@42.\rcenter := extent / 2.\rCursor write showWhile: [\r\t[2 to: center x - 1 by: 2 do: [:r |\r\t\t\"Make a fancy anim without using Canvas - inefficient as hell\"\r\t\t| image |\r\t\timage := ColorForm extent: extent depth: 8.\r\t\t0.0 to: 359.0 do: [:theta | image colorAt: (center + (Point r: r degrees: theta)) rounded put: Color red].\r\t\twriter nextPutImage: image]\r\t]\tensure: [writer close]].! !\r!GIFReadWriter class methodsFor: 'examples' stamp: 'nk 7/30/2004 21:40'!\rgrabScreenAndSaveOnDisk\r\"GIFReaderWriter grabScreenAndSaveOnDisk\"\r\r| form fileName |\rform := Form fromUser.\rform bits size = 0 ifTrue: [^Beeper beep].\rfileName := FileDirectory default nextNameFor: 'Squeak' extension: 'gif'.\rUtilities informUser: 'Writing ' , fileName\r\tduring: [GIFReadWriter putForm: form onFileNamed: fileName]! !\r!GIFReadWriter class methodsFor: 'image reading/writing' stamp: 'asm 12/11/2003 21:29'!\rtypicalFileExtensions\r\"Answer a collection of file extensions (lowercase) which files that I can \rread might commonly have\"\r\rself\r\tallSubclasses detect: [:cls | cls wantsToHandleGIFs ]\r\t\t\t\t ifNone: [\"if none of my subclasses wants , then i''ll have to do\"\r\t\t\t\t\t\t^ #('gif' )].\r^ #( )! !\r!GIFReadWriter class methodsFor: 'image reading/writing' stamp: 'asm 12/11/2003 21:29'!\rwantsToHandleGIFs\r^ false! !\r!AnimatedGIFReadWriter class methodsFor: 'image reading/writing' stamp: 'mir 11/18/2003 17:00'!\rformsFromFileNamed: fileName \r| stream |\rstream _ FileStream readOnlyFileNamed: fileName.\r^ self formsFromStream: stream! !\r!AnimatedGIFReadWriter class methodsFor: 'image reading/writing' stamp: 'mir 11/18/2003 17:00'!\rformsFromStream: stream \r| reader |\rreader _ self new on: stream reset.\rCursor read\r\tshowWhile: [reader allImages.\r\t\treader close].\r^reader! !\r!AnimatedGIFReadWriter class methodsFor: 'image reading/writing' stamp: 'nk 6/12/2004 13:12'!\rtypicalFileExtensions\r\"Answer a collection of file extensions (lowercase) which files that I can read might commonly have\"\r^#('gif')! !\r!AnimatedGIFReadWriter class methodsFor: 'image reading/writing' stamp: 'asm 12/11/2003 21:29'!\rwantsToHandleGIFs\r^true! !\r!JPEGHuffmanTable class methodsFor: 'constants' stamp: 'tao 10/21/97 22:15'!\rlookahead\r\r^ Lookahead! !\r!JPEGHuffmanTable class methodsFor: 'initialization' stamp: 'tao 10/21/97 11:06'!\rinitialize\r\rLookahead _ 8.\rBitBufferSize _ 16! !\r!JPEGReadWriter class methodsFor: 'image reading/writing' stamp: 'nk 7/16/2003 17:56'!\rtypicalFileExtensions\r\"Answer a collection of file extensions (lowercase) which files that I can read might commonly have\"\r^#('jpg' 'jpeg')! !\r!JPEGReadWriter class methodsFor: 'image reading/writing' stamp: 'ar 6/16/2002 18:54'!\runderstandsImageFormat: aStream\r(JPEGReadWriter2 understandsImageFormat: aStream) ifTrue:[^false].\raStream reset.\raStream next = 16rFF ifFalse: [^ false].\raStream next = 16rD8 ifFalse: [^ false].\r^true! !\r!JPEGReadWriter class methodsFor: 'initialization' stamp: 'ar 3/3/2001 23:07'!\rinitialize\r\"JPEGReadWriter initialize\"\r\"general constants\"\rDCTSize _ 8.\rMaxSample _ (2 raisedToInteger: DCTSize) - 1.\rSampleOffset _ MaxSample // 2.\rFloatSampleOffset _ SampleOffset asFloat.\rDCTSize2 _ DCTSize squared.\rQuantizationTableSize _ 4.\rHuffmanTableSize _ 4.\r\r\"floating-point Inverse Discrete Cosine Transform (IDCT) constants\"\rConstBits _ 13.\rPass1Bits _ 2.\rDCTK1 _ 2 sqrt.\rDCTK2 _ 1.847759065.\rDCTK3 _ 1.082392200.\rDCTK4 _ -2.613125930.\rPass1Div _ 1 bitShift: ConstBits - Pass1Bits.\rPass2Div _ 1 bitShift: ConstBits + Pass1Bits + 3.\r\r\"fixed-point Inverse Discrete Cosine Transform (IDCT) constants\"\rFIXn0n298631336 _ 2446.\rFIXn0n390180644 _ 3196.\rFIXn0n541196100 _ 4433.\rFIXn0n765366865 _ 6270.\rFIXn0n899976223 _ 7373.\rFIXn1n175875602 _ 9633.\rFIXn1n501321110 _ 12299.\rFIXn1n847759065 _ 15137.\rFIXn1n961570560 _ 16069.\rFIXn2n053119869 _ 16819.\rFIXn2n562915447 _ 20995.\rFIXn3n072711026 _ 25172.\r\r\"fixed-point color conversion constants\"\rFIXn0n34414 _ 22554.\rFIXn0n71414 _ 46802.\rFIXn1n40200 _ 91881.\rFIXn1n77200 _  116130.\r\r\"reordering table from JPEG zig-zag order\"\rJPEGNaturalOrder _ #(\r\t1 2 9 17 10 3 4 11\r\t18 25 33 26 19 12 5 6\r\t13 20 27 34 41 49 42 35\r\t28 21 14 7 8 15 22 29\r\t36 43 50 57 58 51 44 37\r\t30 23 16 24 31 38 45 52\r\t59 60 53 46 39 32 40 47\r\t54 61 62 55 48 56 63 64).\r\r\"scale factors for the values in the Quantization Tables\"\rQTableScaleFactor _ (0 to: DCTSize-1) collect:\r\t[:k | k = 0\r\t\tifTrue: [1.0]\r\t\tifFalse: [(k * Float pi / 16) cos * 2 sqrt]].\r\r\"dithering masks\"\r(DitherMasks _ Dictionary new)\r\tadd: 0 -> 0;\r\tadd: 1 -> 127;\r\tadd: 2 -> 63;\r\tadd: 4 -> 63;\r\tadd: 8 -> 31;\r\tadd: 16 -> 7;\r\tadd: 32 -> 0.\r\r\"dictionary of marker parsers\"\r(JFIFMarkerParser _ Dictionary new)\r\tadd: (16r01 -> #parseNOP);\r\tadd: (16rC0 -> #parseStartOfFile);\r\tadd: (16rC4 -> #parseHuffmanTable);\r\taddAll: ((16rD0 to: 16rD7) collect: [:m | Association key: m value: #parseNOP]);\r\tadd: (16rD8 -> #parseStartOfInput);\r\tadd: (16rD9 -> #parseEndOfInput);\r\tadd: (16rDA -> #parseStartOfScan);\r\tadd: (16rDB -> #parseQuantizationTable);\r\tadd: (16rDD -> #parseDecoderRestartInterval);\r\tadd: (16rE0 -> #parseAPPn);\r\tadd: (16rE1 -> #parseAPPn)! !\r!JPEGReadWriter2 class methodsFor: 'image reading/writing' stamp: 'ar 6/16/2002 18:54'!\rprimJPEGPluginIsPresent\r<primitive: 'primJPEGPluginIsPresent' module: 'JPEGReadWriter2Plugin'>\r^false! !\r!JPEGReadWriter2 class methodsFor: 'image reading/writing' stamp: 'jm 12/22/2001 11:55'!\rputForm: aForm quality: quality progressiveJPEG: progressiveFlag onFileNamed: fileName\r\"Store the given Form as a JPEG file of the given name, overwriting any existing file of that name. Quality goes from 0 (low) to 100 (high), where -1 means default. If progressiveFlag is true, encode as a progressive JPEG.\"\r\r| writer |\rFileDirectory deleteFilePath: fileName.\rwriter _ self on: (FileStream newFileNamed: fileName) binary.\rCursor write showWhile: [\r\twriter nextPutImage: aForm quality: quality progressiveJPEG: progressiveFlag].\rwriter close.\r! !\r!JPEGReadWriter2 class methodsFor: 'image reading/writing' stamp: 'nk 7/16/2003 17:56'!\rtypicalFileExtensions\r\"Answer a collection of file extensions (lowercase) which files that I can read might commonly have\"\r^#('jpg' 'jpeg')! !\r!ListItemWrapper class methodsFor: 'as yet unclassified' stamp: 'RAA 3/30/1999 18:28'!\rwith: anObject\r\r^self new setItem: anObject! !\r!ListItemWrapper class methodsFor: 'as yet unclassified' stamp: 'RAA 3/31/1999 16:44'!\rwith: anObject model: aModel\r\r^self new setItem: anObject model: aModel! !\r!LyGraphicsLibrary class methodsFor: 'importing' stamp: 'ssa 8/28/2009 20:36'!\rfileReaderServicesForFile: fullName suffix: suffix\r\r^(#('gif' 'jpg' 'jpeg' 'bmp')includes: suffix)\r\tifTrue: [ self services]\r\tifFalse: [#()]! !\r!LyGraphicsLibrary class methodsFor: 'importing' stamp: 'ssa 3/9/2010 12:42'!\rimportGraphic: fileName\r\"self importGraphic:'/Users/samadams/Desktop/ssa working/lockClosed.gif'\"\r| fname image selector |\rfname _ fileName sansPeriodSuffix.\rselector _ fname copyFrom: (fname lastIndexOf:$/)+ 1 to: fname size.\rimage _ Form fromFileNamed: fileName.\rself installGraphic: image named: selector.\r! !\r!LyGraphicsLibrary class methodsFor: 'importing' stamp: 'ssa 11/26/2009 22:54'!\rinstallGraphic: aForm named: aString\r\"add a new method to me named aString that regenerates aForm\"\r| selector response code startString |\rstartString _ aString  select:[:c| c isLetter | c isDigit].\rselector _ (self respondsTo: startString asSymbol)\r\tifTrue:[[response _ FillInTheBlank request:'Selector #',startString,' already used.\\Enter a new selector\\to store this graphic under' withCRs initialAnswer: startString.\r\t\tresponse isEmpty ifTrue:[^self].\r\t\tself respondsTo: response asSymbol] whileTrue.\r\t\tresponse]\r\tifFalse:[startString].\rcode _ selector,'\r\"Cursor blank showWhile:[self ',selector,' follow:[Sensor cursorPoint] while:[Sensor noButtonPressed]]\"\r\"FormView open: self ',selector,' named: ''',selector,'''\"\r^',aForm storeString.\r\rself class compile: code classified:'graphics'! !\r!LyGraphicsLibrary class methodsFor: 'importing' stamp: 'ssa 8/28/2009 19:51'!\rserviceImportGraphic\r\r^SimpleServiceEntry \r\tprovider: self \r\tlabel: 'import graphic' \r\tselector: #importGraphic: \r\tdescription: 'import graphic to LyGraphicLibrary' \r\tbuttonLabel: 'install'! !\r!LyGraphicsLibrary class methodsFor: 'importing' stamp: 'ssa 8/28/2009 19:48'!\rservices\r\r^ Array with: self serviceImportGraphic\r\r! !\r!LyGraphicsLibrary class methodsFor: 'graphics' stamp: 'ssa 1/5/2010 20:33'!\rselfTwistyClosed\r\"Cursor blank showWhile:[self selfTwistyClosed follow:[Sensor cursorPoint] while:[Sensor noButtonPressed]]\"\r^((ColorForm\rextent: 5@10\rdepth: 8\rfromArray: #( 4278190080 0 4294901760 0 4294967040 0 4294967295 0 4294967295 4278190080 4294967295 4278190080 4294967295 0 4294967040 0 4294901760 0 4278190080 0)\roffset: 0@0)\rcolorsFromArray: #(#( ) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0)  ))! !\r!LyGraphicsLibrary class methodsFor: 'graphics' stamp: 'ssa 1/5/2010 20:33'!\rselfTwistyOpen\r\"Cursor blank showWhile:[self selfTwistyOpen follow:[Sensor cursorPoint] while:[Sensor noButtonPressed]]\"\r^((ColorForm\rextent: 10@10\rdepth: 8\rfromArray: #( 0 4278190080 0 255 4294901760 0 65535 4294901760 0 16777215 4294967040 0 4294967295 4294967040 0 16777215 4294967295 0 255 4294967295 0 0 16777215 4278190080 0 255 4278190080 0 0 16711680)\roffset: 0@0)\rcolorsFromArray: #(#( ) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0)  ))! !\r!LyGraphicsLibrary class methodsFor: 'graphics' stamp: 'ssa 1/4/2010 16:22'!\rworkWarningCone\r\"Cursor blank showWhile:[self workWarningCone follow:[Sensor cursorPoint] while:[Sensor noButtonPressed]]\"\r^((ColorForm\rextent: 64@64\rdepth: 8\rfromArray: #( 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4271808092 1549557758 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4266482012 1503549182 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4262222169 1128495870 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 1360216899 1128487254 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 135742239 1128481560 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 136201027 524501875 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 140067651 1128481566 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124109 742605599 1128481624 1459551998 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124040 320806723 524501827 1442774782 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124039 236526106 522133279 1442774782 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278079746 269028884 336863007 2052521726 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278084614 33820180 437919519 2544107262 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278059008 21712149 2223281059 2170748670 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4272103936 1610637408 2164359520 23110654 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4267704416 6291457 1616928864 1610711550 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4261412960 16810336 1616928769 2170585598 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4267713120 1610702944 23093344 2172739838 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 2734710784 1616928864 1616904577 1610703011 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 1610637313 1616904193 1619091585 2170585473 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 570458368 16810336 2170585440 1619067265 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 23093377 1619067232 1610702977 2172748198 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124116 177443713 2172748161 2172748161 2744355443 1459551998 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124109 135807833 1451853446 2256950614 1499225210 1912536830 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124040 656296259 1128481603 1130125660 1547918402 1912536830 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124071 675496771 1229144905 1128483139 1229538140 503250686 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278079752 356729667 1128483139 1128874825 1128483145 1938554622 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278085416 356731203 1128874825 1128483139 1229538121 2054094590 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278061095 407061315 1128481603 1128874825 1128483139 1131347710 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4269886504 505356063 1128481603 1128481603 1126113091 1230222590 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4267728903 1126111775 438247199 1126122271 522133315 2309198590 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4261437536 2205032218 521805599 438247199 524506515 2743173630 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4261478400 1619104405 2223409430 1433306757 2510520705 2172739838 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 2164285441 1610702977 1652654465 2172748161 2172752513 2172748195 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 1616904288 2170577025 1610711425 2172748161 2457960833 2173862273 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 6316128 1610702977 2170585473 2172748161 2172748178 2172748161 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124195 16777312 23093249 1619067265 1652646529 2173862273 2172748161 2784952062 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124128 6324481 1619100000 2172748161 2172748161 2172748161 2457960800 2751397630 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124132 1616928864 1619091585 2172748130 2172740242 2172752513 1619100033 2516516606 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124040 1684013408 2170552672 2164359553 2172748161 2172748161 1650483787 754908926 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278080551 1292416129 25264513 1619100033 2172748161 2173862290 2170683692 676855550 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124051 270422312 673012102 3028386177 1686208897 2173862290 2172756901 2536256029 946883070 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 671615244 507651880 742015836 1549183400 3030627491 2745414822 2996280648 1112087881 743721308 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278059779 134752019 1127876648 675891523 1229538121 1230784638 2120173897 1230981449 1229537353 493902409 1229586174 4278124286 4278124286 4278124286 4278124286 4278124286 4262200071 134875678 523380520 357122889 1128876355 1229539657 1229539657 1598638409 1229539423 1465152329 1128876542 4278124286 4278124286 4278124286 4278124286 4278124286 4268950279 134752286 1126705192 843663683 1229146441 1229146441 1229544521 1230981471 1229539657 1517383241 1230784841 1560215294 4278124286 4278124286 4278124286 4278124286 4266930691 134875706 1126639660 977486665 1229539651 1229539657 1548306780 1229545289 1600080223 1517383772 1229539679 1228938750 4278124286 4278124286 4278124286 4278124286 4278085939 134875667 1126639656 1212760905 1128876361 1229539657 1230784841 1598643273 1598644060 2117628255 1230784841 1598044211 4278124286 4278124286 4278124286 4278124286 4278124145 1846151692 405219111 1109346627 1128874825 1128876380 1229539679 1230784860 1229539679 1483823689 1548306780 1228943922 4278124286 4278124286 4278124286 4278124286 4278124286 2388069385 167912236 524492611 1128483139 1229146441 1229539657 1229539651 1128487260 2119671369 1229545289 1545418808 3221159678 4278124286 4278124286 4278124286 4278124286 4272786956 51387734 1549344579 524492611 1128481603 1128481603 1128481603 1130121632 1520322889 1230981468 1079676573 3388931838 4278124286 4278124286 4278124286 4278124286 4278095517 320020034 1549556825 1128481603 524501827 1128481603 1497586780 1549574304 1598638409 1598644128 2695732618 4278124286 4278124286 4278124286 4278124286 4278124286 4278124205 2685616926 1130143327 2656853081 1549556060 1499225180 1549753439 2694864713 1598638409 2694884768 2915041022 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 2911781407 522142537 1553883040 2657067100 2690621600 2694881375 1599889225 1235263661 2695741950 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4273778012 522133315 1128874825 1230784860 1549551945 1128481628 1229545376 2912985276 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124205 1547902751 1128481603 1128874825 1128481567 1128483164 2695736749 2919169790 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 2908504863 522142531 1126122271 1128481603 1549574317 2913861374 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4272791625 1128472387 524501827 1128488096 2913840583 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278100128 1547913539 1229146460 2694884781 3170828030 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124205 2912985248 2694884781 2696740606 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4273778080 2694888702 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286)\roffset: 0@0)\rcolorsFromArray: #(#(1.0 1.0 1.0) #(0.972 0.878 0.815) #(0.972 0.815 0.627) #(0.972 0.784 0.564) #(0.972 0.784 0.47) #(0.972 0.753 0.595) #(0.972 0.753 0.501) #(0.972 0.721 0.564) #(0.972 0.721 0.501) #(0.972 0.721 0.313) #(0.972 0.69 0.439) #(0.972 0.69 0.282) #(0.972 0.658 0.408) #(0.972 0.658 0.376) #(0.972 0.658 0.156) #(0.972 0.627 0.376) #(0.972 0.627 0.345) #(0.972 0.627 0.313) #(0.972 0.627 0.125) #(0.972 0.595 0.282) #(0.972 0.595 0.094) #(0.972 0.564 0.313) #(0.972 0.564 0.219) #(0.972 0.533 0.188) #(0.972 0.533 0.125) #(0.972 0.533 0.063) #(0.972 0.533 0.031) #(0.972 0.533 0.0) #(0.972 0.501 0.0) #(0.972 0.47 0.219) #(0.972 0.47 0.063) #(0.972 0.47 0.031) #(0.94 0.94 0.972) #(0.94 0.94 0.94) #(0.94 0.909 0.878) #(0.94 0.753 0.627) #(0.94 0.721 0.533) #(0.94 0.69 0.501) #(0.94 0.69 0.47) #(0.94 0.658 0.501) #(0.94 0.658 0.439) #(0.94 0.627 0.47) #(0.94 0.627 0.439) #(0.94 0.627 0.408) #(0.94 0.595 0.408) #(0.94 0.595 0.376) #(0.94 0.595 0.345) #(0.94 0.564 0.376) #(0.94 0.564 0.345) #(0.94 0.564 0.282) #(0.94 0.533 0.345) #(0.94 0.533 0.25) #(0.94 0.501 0.313) #(0.94 0.501 0.282) #(0.94 0.501 0.219) #(0.94 0.501 0.188) #(0.94 0.47 0.25) #(0.94 0.47 0.188) #(0.94 0.47 0.156) #(0.94 0.47 0.0) #(0.94 0.439 0.188) #(0.94 0.439 0.094) #(0.94 0.439 0.063) #(0.94 0.439 0.0) #(0.94 0.408 0.156) #(0.94 0.408 0.125) #(0.94 0.408 0.063) #(0.94 0.408 0.031) #(0.94 0.408 0.0) #(0.94 0.376 0.094) #(0.94 0.376 0.031) #(0.94 0.376 0.0) #(0.94 0.345 0.063) #(0.94 0.313 0.031) #(0.94 0.313 0.0) #(0.909 0.784 0.627) #(0.909 0.721 0.564) #(0.909 0.658 0.47) #(0.909 0.658 0.408) #(0.909 0.627 0.47) #(0.909 0.627 0.439) #(0.909 0.595 0.408) #(0.909 0.595 0.376) #(0.909 0.564 0.282) #(0.909 0.533 0.345) #(0.909 0.501 0.188) #(0.909 0.47 0.156) #(0.909 0.408 0.188) #(0.909 0.408 0.063) #(0.909 0.408 0.0) #(0.909 0.376 0.156) #(0.909 0.376 0.063) #(0.909 0.345 0.031) #(0.909 0.345 0.0) #(0.909 0.313 0.031) #(0.909 0.282 0.0) #(0.878 0.878 0.909) #(0.878 0.878 0.878) #(0.878 0.847 0.847) #(0.878 0.847 0.815) #(0.878 0.815 0.753) #(0.878 0.784 0.721) #(0.878 0.721 0.595) #(0.878 0.658 0.501) #(0.878 0.627 0.501) #(0.878 0.595 0.47) #(0.878 0.533 0.376) #(0.878 0.533 0.313) #(0.878 0.533 0.219) #(0.878 0.501 0.313) #(0.878 0.501 0.282) #(0.878 0.501 0.25) #(0.878 0.47 0.313) #(0.878 0.47 0.282) #(0.878 0.47 0.25) #(0.878 0.47 0.219) #(0.878 0.47 0.188) #(0.878 0.439 0.25) #(0.878 0.439 0.219) #(0.878 0.439 0.188) #(0.878 0.439 0.156) #(0.878 0.439 0.125) #(0.878 0.439 0.094) #(0.878 0.408 0.156) #(0.878 0.408 0.125) #(0.878 0.376 0.125) #(0.878 0.345 0.094) #(0.878 0.313 0.0) #(0.878 0.282 0.0) #(0.847 0.847 0.847) #(0.847 0.815 0.815) #(0.847 0.69 0.627) #(0.847 0.627 0.408) #(0.847 0.595 0.408) #(0.847 0.564 0.345) #(0.847 0.564 0.313) #(0.847 0.501 0.345) #(0.847 0.501 0.25) #(0.847 0.439 0.282) #(0.847 0.439 0.219) #(0.847 0.408 0.156) #(0.847 0.408 0.125) #(0.847 0.345 0.063) #(0.847 0.313 0.063) #(0.815 0.815 0.847) #(0.815 0.815 0.815) #(0.815 0.784 0.753) #(0.815 0.69 0.595) #(0.815 0.69 0.564) #(0.815 0.658 0.564) #(0.815 0.595 0.439) #(0.815 0.533 0.408) #(0.815 0.533 0.345) #(0.815 0.501 0.313) #(0.815 0.439 0.25) #(0.815 0.408 0.219) #(0.815 0.376 0.156) #(0.815 0.345 0.125) #(0.815 0.345 0.0) #(0.815 0.313 0.0) #(0.815 0.282 0.031) #(0.815 0.282 0.0) #(0.815 0.25 0.0) #(0.784 0.784 0.753) #(0.784 0.753 0.784) #(0.784 0.721 0.69) #(0.784 0.69 0.627) #(0.784 0.658 0.595) #(0.784 0.627 0.533) #(0.784 0.501 0.345) #(0.784 0.313 0.094) #(0.784 0.313 0.0) #(0.784 0.282 0.063) #(0.784 0.282 0.031) #(0.784 0.25 0.0) #(0.753 0.753 0.753) #(0.753 0.69 0.658) #(0.753 0.658 0.564) #(0.753 0.595 0.501) #(0.753 0.25 0.0) #(0.721 0.721 0.721) #(0.721 0.69 0.69) #(0.721 0.595 0.564) #(0.721 0.595 0.533) #(0.721 0.408 0.156) #(0.69 0.313 0.125) #(0.69 0.25 0.031) #(0.69 0.25 0.0) #(0.69 0.219 0.0) #(0.658 0.345 0.188) #(0.658 0.313 0.125) #(0.658 0.282 0.094) #(0.658 0.25 0.063) #(0.658 0.219 0.0) #(0.627 0.313 0.156) #(0.627 0.25 0.063) #(0.627 0.219 0.031) #(0.595 0.376 0.282) #(0.595 0.25 0.063) #(0.595 0.188 0.0) #(0.564 0.533 0.533) #(0.564 0.219 0.063) #(0.564 0.188 0.0) #(0.533 0.533 0.533) #(0.533 0.501 0.501) #(0.533 0.156 0.0) #(0.47 0.439 0.439) #(0.47 0.408 0.345) #(0.47 0.345 0.313) #(0.47 0.282 0.188) #(0.47 0.219 0.031) #(0.47 0.188 0.031) #(0.47 0.156 0.0) #(0.439 0.408 0.376) #(0.439 0.219 0.125) #(0.439 0.188 0.094) #(0.439 0.156 0.063) #(0.439 0.156 0.031) #(0.439 0.125 0.0) #(0.408 0.188 0.063) #(0.408 0.156 0.031) #(0.408 0.125 0.0) #(0.376 0.345 0.313) #(0.376 0.313 0.282) #(0.376 0.125 0.0) #(0.345 0.345 0.345) #(0.345 0.282 0.282) #(0.313 0.313 0.313) #(0.313 0.313 0.282) #(0.313 0.094 0.0) #(0.282 0.094 0.0) #(0.25 0.25 0.25) #(0.25 0.125 0.031) #(0.25 0.063 0.0) #(0.219 0.219 0.219) #(0.219 0.188 0.188) #(0.219 0.156 0.125) #(0.219 0.125 0.063) #(0.219 0.125 0.0) #(0.219 0.094 0.031) #(0.219 0.063 0.0) #(0.188 0.188 0.188) #(0.188 0.063 0.0) #(0.156 0.156 0.156) #(0.156 0.031 0.0) #(0.125 0.063 0.031) #(0.125 0.031 0.0) #(0.094 0.094 0.094) #(0.094 0.063 0.063) #(0.094 0.031 0.0) #(0.063 0.031 0.031) #(0.063 0.0 0.0) #(0.031 0.031 0.031) #(0.0 0.0 0.0) #( ) #(0.0 0.0 0.0)  ))! !\r!LyGraphicsLibrary class methodsFor: 'transforming' stamp: 'ssa 8/31/2009 12:30'!\raudition: selector\r\"self audition: #rgbAddButton\"\r\"Audition a graphic, resizing it dynamically based on its screen x location, Answering the resized icon\"\r\r| resized |\rSensor waitNoButton.\rCursor blank show.\r[Sensor noButtonPressed]\r\twhileTrue:[ resized _ self graphicNamed: selector resizedTo: Sensor cursorPoint.\r\t\tresized follow:[Sensor cursorPoint] while:[false]].\rCursor normal show.\r^resized! !\r!LyGraphicsLibrary class methodsFor: 'transforming' stamp: 'ssa 8/31/2009 13:14'!\rgraphicNamed: selector resizedTo: anExtentPoint\r\"(self graphicNamed: #rgbAddButton resizedTo: 16@16) followCursor\"\r\"(self graphicNamed: #rgbAddButton resizedTo: 400@400) followCursor\"\r\r| base resized |\rbase _ self perform: selector.\rresized _ base scaledToSize: anExtentPoint.\rresized offset: (base offset/ base extent) * resized offset rounded.\r^resized! !\r!LyGraphicsLibrary class methodsFor: 'transforming' stamp: 'ssa 8/31/2009 17:19'!\rgraphicNamed: selector withWhitemappedTo: aColor \r\"(self graphicNamed: #closedTwisty withWhitemappedTo: Color lightBlue) followCursor\"\r\"(self graphicNamed: #closedTwisty withWhitemappedTo: Color green) followCursor\"\r\r| base |\rbase _ self perform: selector.\rbase mapColor: Color white to: aColor.\r^base! !\r!MessageTally class methodsFor: 'defaults' stamp: 'nk 3/8/2004 12:27'!\rdefaultMaxClassNameSize\r\"Return the default maximum width of the class name alone\"\r^30! !\r!MessageTally class methodsFor: 'defaults' stamp: 'nk 3/8/2004 12:27'!\rdefaultMaxClassPlusSelectorSize\r\"Return the default maximum width of the class plus selector together (not counting the '>>')\"\r^60! !\r!MessageTally class methodsFor: 'defaults' stamp: 'nk 3/8/2004 12:26'!\rdefaultMaxTabs\r\"Return the default number of tabs after which leading white space is compressed\"\r^18! !\r!MessageTally class methodsFor: 'defaults' stamp: 'nk 3/8/2004 12:41'!\rdefaultPollPeriod\r\"Answer the number of milliseconds between interrupts for spyOn: and friends.\rThis should be faster for faster machines.\"\r^DefaultPollPeriod ifNil: [ DefaultPollPeriod _ 1 ]! !\r!MessageTally class methodsFor: 'defaults' stamp: 'nk 3/8/2004 12:41'!\rdefaultPollPeriod: numberOfMilliseconds\r\"Set the default number of milliseconds between interrupts for spyOn: and friends.\rThis should be faster for faster machines.\"\rDefaultPollPeriod := numberOfMilliseconds! !\r!MessageTally class methodsFor: 'spying' stamp: 'nk 3/8/2004 10:34'!\rspyOn: aBlock    \"MessageTally spyOn: [100 timesRepeat: [3.14159 printString]]\"\r| node result |\rnode _ self new.\rresult _ node spyEvery: self defaultPollPeriod on: aBlock.\r(StringHolder new contents: (String streamContents: [:s | node report: s; close]))\r\topenLabel: 'Spy Results'.\r^ result! !\r!MessageTally class methodsFor: 'spying' stamp: 'nk 3/8/2004 10:34'!\rspyOn: aBlock toFileNamed: fileName \r\"Spy on the evaluation of aBlock. Write the data collected on a file\rnamed fileName.\"\r\r| file value node |\rnode _ self new.\rvalue _ node spyEvery: self defaultPollPeriod on: aBlock.\rfile _ FileStream newFileNamed: fileName.\rnode report: file; close.\rfile close.\r^value! !\r!MessageTally class methodsFor: 'spying' stamp: 'nk 3/8/2004 10:35'!\rspyOnProcess: aProcess forMilliseconds: msecDuration \r\"| p |  \rp _ [100000 timesRepeat: [3.14159 printString]] fork.  \r(Delay forMilliseconds: 100) wait.  \rMessageTally spyOnProcess: p forMilliseconds: 1000\"\r| node |\rnode _ self new.\rnode\r\tspyEvery: self defaultPollPeriod\r\tonProcess: aProcess\r\tforMilliseconds: msecDuration.\r(StringHolder new\r\tcontents: (String\r\t\t\tstreamContents: [:s | node report: s;\r\t\t\t\t\t close]))\r\topenLabel: 'Spy Results'! !\r!MessageTally class methodsFor: 'spying' stamp: 'nk 3/8/2004 10:35'!\rspyOnProcess: aProcess forMilliseconds: msecDuration toFileNamed: fileName \r\"Spy on the evaluation of aProcess. Write the data collected on a file  \rnamed fileName. Will overwrite fileName\"\r| file node |\rnode _ self new.\rnode\r\tspyEvery: self defaultPollPeriod\r\tonProcess: aProcess\r\tforMilliseconds: msecDuration.\rfile _ FileStream fileNamed: fileName.\rnode report: file;\r\t close.\rfile close! !\r!MessageTally class methodsFor: 'spying' stamp: ''!\rtallySends: aBlock   \"MessageTally tallySends: [3.14159 printString]\"\r^ self tallySendsTo: nil inBlock: aBlock showTree: true! !\r!MessageTally class methodsFor: 'spying' stamp: 'tk 5/4/1998 17:01'!\rtallySendsTo: receiver inBlock: aBlock showTree: treeOption\r\"MessageTally tallySends: [3.14159 printString]\"\r\"This method uses the simulator to count the number of calls on each method\rinvoked in evaluating aBlock. If receiver is not nil, then only sends\rto that receiver are tallied.\rResults are presented as leaves, sorted by frequency,\rpreceded, optionally, by the whole tree.\"\r| prev tallies startTime totalTime |\rstartTime _ Time millisecondClockValue.\rtallies _ MessageTally new class: aBlock receiver class\r\t\t\t\t\t\tmethod: aBlock method.\rprev _ aBlock.\rthisContext sender\r\trunSimulated: aBlock\r\tcontextAtEachStep:\r\t\t[:current |\r\t\tcurrent == prev ifFalse: \r\t\t\t[\"call or return\"\r\t\t\tprev sender == nil ifFalse: \r\t\t\t\t[\"call only\"\r\t\t\t\t(receiver == nil or: [current receiver == receiver])\r\t\t\t\t\tifTrue: [tallies tally: current by: 1]].\r\t\t\tprev _ current]].\r\rtotalTime _ Time millisecondClockValue - startTime // 1000.0 roundTo: 0.01.\r(StringHolder new contents:\r\t(String streamContents:\r\t\t[:s |\r\t\ts nextPutAll: 'This simulation took ' , totalTime printString\r\t\t\t\t\t\t, ' seconds.'; cr.\r\t\ttreeOption\r\t\t\tifTrue: [tallies fullPrintOn: s tallyExact: true orThreshold: 0]\r\t\t\tifFalse: [tallies leavesPrintOn: s tallyExact: true orThreshold: 0].\r\t\ttallies close]))\r\topenLabel: 'Spy Results'! !\r!MessageTally class methodsFor: 'spying' stamp: ''!\rtime: aBlock\r\r^ Time millisecondsToRun: aBlock! !\r!Number class methodsFor: 'instance creation' stamp: ''!\rdearchiveFrom: aStream\r^aStream read: self! !\r!ObjectExplorerWrapper methodsFor: 'as yet unclassified' stamp: 'nk 7/24/2003 09:14'!\rparent\r^parent! !\r!ObjectExplorerWrapper methodsFor: 'as yet unclassified' stamp: 'nk 7/24/2003 09:14'!\rparent: anObject\rparent _ anObject! !\r!ObjectExplorerWrapper methodsFor: 'as yet unclassified' stamp: 'nk 7/24/2003 09:49'!\rselector\rparent ifNil: [ ^nil ].\r^(parent withoutListWrapper class allInstVarNames includes: itemName) ifTrue: [ itemName asSymbol ]! !\r!ObjectExplorerWrapper methodsFor: 'as yet unclassified' stamp: 'RAA 6/21/1999 10:49'!\rsetItem: anObject name: aString model: aModel\r\ritem _ anObject.\rmodel _ aModel.\ritemName _ aString.! !\r!ObjectExplorerWrapper methodsFor: 'as yet unclassified' stamp: 'nk 7/24/2003 09:14'!\rsetItem: anObject name: aString model: aModel parent: itemParent\rparent _ itemParent.\rself setItem: anObject name: aString model: aModel! !\r!ObjectExplorerWrapper methodsFor: 'converting' stamp: 'ssa 7/7/2010 11:08'!\rasString\r| explorerString string |\r\rexplorerString _ \r\t[item asExplorerString]\r\t\ton: Error \r\t\tdo: ['<error: ', item class name, ' in asExplorerString: evaluate \"' , itemName , ' asExplorerString\" to debug>'].\rstring _ (itemName ifNotNil: [itemName , ': '] ifNil: ['']) , explorerString.\r(string includes: Character cr)\r\tifTrue: [^ string withSeparatorsCompacted].\r^ string! !\r!ObjectExplorerWrapper methodsFor: 'converting' stamp: 'nk 7/24/2003 10:16'!\ritemName\r^itemName! !\r!ObjectExplorerWrapper methodsFor: 'monitoring' stamp: 'nk 7/12/2003 18:28'!\rrefresh\r\"hack to refresh item given an object and a string that is either an index or an instance variable name.\"\r[ | index |\r\t(model class allInstVarNames includes: itemName)\r\t\tifTrue: [ item _ model instVarNamed: itemName ]\r\t\tifFalse: [ index _ itemName asNumber.\r\t\t\t(index between: 1 and: model basicSize) ifTrue: [ item _ model basicAt: index]]\r] on: Error do: [ :ex | item _ nil ]! !\r!ObjectExplorerWrapper methodsFor: 'accessing' stamp: 'ssa 9/11/2009 16:17'!\rcontents\r\r(item respondsTo: #explorerContents) ifTrue: [^item explorerContents collect:[:e| e parent: self]].\r\"For all others, show named vars first, then indexed vars\"\r^(item class allInstVarNames asOrderedCollection withIndexCollect: [:each :index |\r\tself class\r\t\twith: (item instVarAt: index)\r\t\tname: each\r\t\tmodel: item\r\t\tparent: self]) ,\r((1 to: item basicSize) collect: [:index |\r\tself class\r\t\twith: (item basicAt: index)\r\t\tname: index printString\r\t\tmodel: item\r\t\tparent: self])! !\r!ObjectExplorerWrapper methodsFor: 'accessing' stamp: 'ssa 9/11/2009 15:09'!\rdepth\r\r^self parent isNil ifTrue:[0]ifFalse:[self parent depth + 1]! !\r!ObjectExplorerWrapper methodsFor: 'accessing' stamp: 'RAA 6/21/1999 11:27'!\rhasContents\r\r^item hasContentsInExplorer\r\r! !\r!ObjectExplorerWrapper methodsFor: 'accessing' stamp: 'dgd 9/26/2004 18:34'!\ricon\r\"Answer a form to be used as icon\"\r^ Preferences visualExplorer\r\tifTrue: [item iconOrThumbnailOfSize: 16]\r\tifFalse: [nil]! !\r!ObjectExplorerWrapper methodsFor: 'accessing' stamp: 'ssa 9/11/2009 14:45'!\risOpen\r\"Answer the value of isOpen\"\r\risOpen isNil ifTrue:[self isOpen: false].\r^ isOpen! !\r!ObjectExplorerWrapper methodsFor: 'accessing' stamp: 'ssa 9/11/2009 14:45'!\risOpen: anObject\r\"Set the value of isOpen\"\r\risOpen _ anObject! !\r!ObjectExplorerWrapper methodsFor: 'accessing' stamp: 'ssa 9/11/2009 14:45'!\ritemName: anObject\r\"Set the value of itemName\"\r\ritemName _ anObject! !\r!ClassHierarchyExplorerWrapper methodsFor: 'testing' stamp: 'ssa 3/1/2010 12:06'!\rhasContents\r\r^self item subclasses notEmpty ! !\r!ClassHierarchyExplorerWrapper methodsFor: 'accessing' stamp: 'ssa 3/1/2010 12:07'!\rasString\r\r^self itemName! !\r!ClassHierarchyExplorerWrapper methodsFor: 'accessing' stamp: 'ssa 3/1/2010 12:04'!\rcontents\r^ self item subclasses\r\tcollect: [:ea| self class with: ea name: ea name model: item parent: self]! !\r!ClassHierarchyExplorerWrapper methodsFor: 'printing' stamp: 'ssa 3/1/2010 12:19'!\rprintOn: aStream\r\raStream nextPutAll:self class name,' on: ',self item printString! !\r!ObjectExplorerWrapper class methodsFor: 'as yet unclassified' stamp: 'RAA 6/21/1999 10:50'!\rwith: anObject name: aString model: aModel\r\r^self new \r\tsetItem: anObject name: aString model: aModel! !\r!ObjectExplorerWrapper class methodsFor: 'as yet unclassified' stamp: 'nk 7/24/2003 09:16'!\rwith: anObject name: aString model: aModel parent: aParent\r\r^self new \r\tsetItem: anObject name: aString model: aModel parent: aParent\r! !\r!OpaqueForm methodsFor: 'private' stamp: 'ssa 8/21/2009 20:42'!\rcolormapIfNeededFor: df\r\r^self colorForm colormapIfNeededFor: df! !\r!OpaqueForm methodsFor: 'private' stamp: 'ssa 8/22/2009 13:50'!\rsetFigure: figureForm shape: shapeForm\r\"Initialize the instance variables.\"\r\r| figure shape |\rfigure _ figureForm.\rshape _ ColorForm mappingWhiteToTransparentFrom:( shapeForm asFormOfDepth: 8).\rfigure displayOn: shape at: 0@0 clippingBox: figure boundingBox rule: Form paint fillColor: nil.\rself colorForm: shape! !\r!OpaqueForm methodsFor: 'display box access' stamp: 'ssa 8/21/2009 20:28'!\rcomputeBoundingBox\r\"Answer the minimum enclosing rectangle around the image.\"\r\r^self colorForm boundingBox! !\r!OpaqueForm methodsFor: 'accessing' stamp: 'ssa 8/21/2009 20:44'!\rcolorForm\r\"Answer the value of colorForm\"\r\rself! !\r!OpaqueForm methodsFor: 'accessing' stamp: 'ssa 8/21/2009 20:44'!\rcolorForm: anObject\r\"Set the value of colorForm\"\r\rself become: anObject! !\r!OpaqueForm methodsFor: 'accessing' stamp: 'ssa 8/21/2009 20:31'!\rfigure\r\"Answer the visible image of the receiver.\"\r\r^ self colorForm! !\r!OpaqueForm methodsFor: 'accessing' stamp: 'ssa 8/21/2009 20:31'!\roffset\r\"Answer the offset for displaying the image.\"\r\r^ self figure offset! !\r!OpaqueForm methodsFor: 'accessing' stamp: 'ssa 8/21/2009 20:31'!\rshape\r\"Answer the form that indicates what part of the background should \rget occluded in displaying the receiver.\"\r\r^ self colorForm! !\r!OpaqueForm methodsFor: 'accessing' stamp: 'ssa 8/21/2009 20:34'!\rvalueAt: aPoint \r\"Answer the bit of the form image at position aPoint.  The value is\reither 0, 1 or 2 where 0 is white, 1 is black,  2 is transparent.\"\r\r(self colorForm isTransparentAt: aPoint) ifTrue:[^2].\r^(self colorAt: aPoint) isBlack ifTrue:[1]ifFalse:[0]! !\r!OpaqueForm methodsFor: 'accessing' stamp: 'ssa 8/21/2009 20:37'!\rvalueAt: aPoint put: value\r\"Store a bit of the form image at position aPoint.  The value is\reither 0, 1 or 2 where 0 is white, 1 is black,  2 is transparent.\"\r\r(1 - (value//2)) = 2 ifTrue:[self colorForm colorAt: aPoint put: Color transparent]\r\tifFalse:[value\\\\2 = 0 ifTrue:[self colorForm colorAt: aPoint put: Color white]\r\t\tifFalse:[self colorForm colorAt: aPoint put: Color black]]! !\r!OpaqueForm methodsFor: 'displaying' stamp: 'ssa 9/2/2009 09:30'!\rdisplayOn: aDisplayMedium at: aDisplayPoint clippingBox: clipRectangle rule: ruleInteger fillColor: aColor\r\"Display the receiver on the display medium aDisplayMedium positioned at aDisplayPoint within \rthe rectangle clipRectangle and with the rule, ruleInteger, and mask, aForm. \"\r\rself colorForm displayOn: aDisplayMedium at: aDisplayPoint clippingBox: clipRectangle rule: ruleInteger  fillColor: aColor! !\r!OpaqueForm methodsFor: 'displaying' stamp: 'ssa 8/21/2009 20:39'!\rdisplayOn: aDisplayMedium transformation: displayTransformation clippingBox:\rclipRectangle align: alignmentPoint with: relativePoint rule: ruleInteger fillColor: aColor\r\"See comment in Form.\"\r\rself colorForm displayOn: aDisplayMedium transformation: displayTransformation\rclippingBox: clipRectangle align: alignmentPoint with: relativePoint rule: Form\runder fillColor: aColor! !\r!OpaqueForm methodsFor: 'printing' stamp: 'ssa 8/21/2009 20:40'!\rstoreOn: aStream\r\"Append to the argument aStream a sequence of characters that is an expression \rwhose evaluation creates an object similar to the receiver.  The general format\rfor OpaqueForm is\r\tOpaqueForm figure: ( figure ) shape: ( shape ).\"\r\raStream nextPutAll: '(OpaqueForm colorForm: ('.\rself colorForm storeOn: aStream.\raStream nextPutAll: '))'! !\r!OpaqueForm methodsFor: 'editing' stamp: ''!\rbitEdit\r\"Create and schedule a view located in an area designated by the user that\rcontains a view of the receiver magnified by 8@8 that can be modified\rusing the Bit Editor.  It also contains a view of the original form.\"\r\rBitEditor openOnForm: self\r\r\"OpaqueForm makeStar bitEdit.\"! !\r!OpaqueForm class methodsFor: 'examples' stamp: 'ssa 8/21/2009 20:41'!\rmakeStar\r\"Answer a new OpaqueForm in the shape of a five-pointed star\rfilled with black.\"\r\r\"OpaqueForm makeStar.\"\r\"OpaqueForm makeStar bitEdit\"\r\r| figure shape pen formRect |\rformRect_ 0@0 extent: 50@50.\rpen _ Pen new.\rpen defaultNib: 2.\rDisplay fill: formRect fillColor: Color white.\rpen north; place: formRect center; spiral: 45 angle: 144.\rshape _ Form fromDisplay: formRect.\rpen fillColor: Color white; north; place: formRect center; spiral: 30 angle: 144.\rfigure _ Form fromDisplay: formRect.\r^ OpaqueForm figure: figure shape: shape! !\r!OpaqueForm class methodsFor: 'examples' stamp: ''!\rstarCursor\r\"Make the cursor track a five-pointed star.\"\r\r\"OpaqueForm starCursor\"\r\rCursor blank showWhile:\r\t[self makeStar follow: [Sensor cursorPoint] while: [Sensor noButtonPressed]]! !\r!OpaqueForm class methodsFor: 'instance creation' stamp: ''!\rfigure: figureForm shape: shapeForm\r\"Answer a new instance of the receiver whose figure\rand shape forms are defined by the arguments.\"\r\r^ self new setFigure: figureForm shape: shapeForm! !\r!OpaqueForm class methodsFor: 'instance creation' stamp: ''!\rshape: aSolidForm\r\"Answer a new instance of the receiver that is black where aSolidForm is black\rand transparent where aSolidForm is white.\"\r\r^ self new setFigure: aSolidForm shape: aSolidForm! !\r!Paragraph methodsFor: 'converting' stamp: 'ssa 9/4/2009 10:44'!\rasForm\r\"Answer a Form made up of the bits that represent the receiver's displayable text.\"\r| theForm oldBackColor oldForeColor |\rtextStyle isTTCStyle ifTrue: [\r\ttheForm _  (Form extent: compositionRectangle extent depth: Display depth)\r\toffset: offset.\r] ifFalse: [\r\ttheForm _ (ColorForm extent: compositionRectangle extent)\r\t\toffset: offset;\r\t\tcolors: (Array\r\t\t\twith: (backColor == nil ifTrue: [Color transparent] ifFalse: [backColor])\r\t\t\twith: (foreColor == nil ifTrue: [Color black] ifFalse: [foreColor])).\r].\roldBackColor _ backColor.\roldForeColor _ foreColor.\rbackColor _ Color white.\rforeColor _ Color black.\rself displayOn: theForm\r\tat: 0@0\r\tclippingBox: theForm boundingBox\r\trule: Form over\r\tfillColor: nil.\rbackColor _ oldBackColor.\rforeColor _ oldForeColor.\r^ theForm\r\r\"Example:\r| p |\rp _ 'Abc' asParagraph.\rp foregroundColor: Color red backgroundColor: Color black.\rp asForm displayOn: Display at: 30@30 rule: Form over\"\r! !\r!Pen methodsFor: 'accessing' stamp: ''!\rdestForm: aForm\r    \"2/14/97 ssa added for compatibility.\"\r    self flag:#compatibility.\r\r    destForm _ aForm ! !\r!Pen methodsFor: 'operations' stamp: 'ssa 11/29/2009 03:27'!\rturnToward: aPoint \r\"Aim the receiver at apoint\"\r\rself north; turn: (self penAngleFrom: self location to: aPoint)! !\r!Pen methodsFor: 'geometric designs' stamp: 'ssa 2/16/2009 11:50'!\rmandala: npoints diameter: d\r\"Display restoreAfter: [Pen new mandala: 30 diameter: 400]\"\r\"On a circle of diameter d, place npoints number of points. Draw all \tpossible connecting lines between the circumferential points.\"\r| l points  |\r\"Display fillWhite.\"\rl _ 3.14 * d / npoints.\rself home; up; turn: -90; go: d // 2; turn: 90; go: 0 - l / 2; down.\rpoints _ Array new: npoints.\r1 to: npoints do: \r\t[:i | \r\tpoints at: i put: location rounded.\r\tself go: l; turn: 360.0 / npoints].\rnpoints // 2\r\tto: 1\r\tby: -1\r\tdo: \r\t\t[:i | \r\t\tself color: i.\r\t\t1 to: npoints do: \r\t\t\t[:j | \r\t\t\tself place: (points at: j).\r\t\t\tself goto: (points at: j + i - 1 \\\\ npoints + 1)]]\r! !\r!Pen methodsFor: 'private' stamp: 'ssa 2/6/2009 10:49'!\rdirection: aFloat\rdirection _ aFloat.\r! !\r!Pen methodsFor: 'functions' stamp: 'ssa 11/29/2009 03:24'!\rpenAngleFrom:firstPoint to: lastPoint\r| offset x y deg | \r\"return the angle of the vector in Pen degrees (0 = north)\"\r\roffset _ lastPoint - firstPoint.\r\rx _ offset x .\ry _ offset y. \rx = 0 ifTrue:[ x _ 0.0001].\rdeg _ (y / x) arcTan radiansToDegrees.\rx positive & y positive ifTrue:[ deg _ 90 + deg].\rx positive & y negative ifTrue:[ deg _ 90 + deg].\rx negative & y positive ifTrue:[ deg _ 270 + deg].\rx negative & y negative ifTrue:[ deg _ 270 + deg].\r\r^deg! !\r!PluggableOutline methodsFor: 'menu support' stamp: 'ssa 9/10/2009 14:42'!\rinspectSelection\r\rself selection inspect! !\r!PluggableOutline methodsFor: 'menu support' stamp: 'ssa 9/10/2009 14:47'!\rmenu: aMenu\r\r\raMenu add: 'inspect' action: #inspectSelection.\raMenu add: 'outline' action: #outlineSelection.\r^ aMenu! !\r!PluggableOutline methodsFor: 'menu support' stamp: 'ssa 9/10/2009 14:43'!\routlineSelection\r\rself selection outline! !\r!PluggableOutline methodsFor: 'menu support' stamp: 'ssa 9/10/2009 14:55'!\rperform: selector orSendTo: otherTarget\r\r^self perform: selector! !\r!PluggableOutline methodsFor: 'accessing' stamp: 'ssa 9/10/2009 13:29'!\rchildrenOf: anObject\r\r^anObject subobjects! !\r!PluggableOutline methodsFor: 'accessing' stamp: 'ssa 9/9/2009 12:02'!\rinitializeList\r\rself list do:[:each| self levels at: each put:0]! !\r!PluggableOutline methodsFor: 'accessing' stamp: 'ssa 9/9/2009 12:01'!\rlevelOf: anItem\r\r^self levels at: anItem ifAbsent:[0]! !\r!PluggableOutline methodsFor: 'accessing' stamp: 'ssa 9/9/2009 12:01'!\rlevels\r\"Answer the value of levels\"\r\rlevels isNil ifTrue:[self levels: Dictionary new].\r^ levels! !\r!PluggableOutline methodsFor: 'accessing' stamp: 'ssa 9/9/2009 12:00'!\rlevels: anObject\r\"Set the value of levels\"\r\rlevels _ anObject! !\r!PluggableOutline methodsFor: 'accessing' stamp: 'ssa 9/10/2009 13:39'!\rlist\r\"Answer the value of list\"\r\rlist isNil ifTrue:[self list: (OrderedCollection with:self subject )].\r^ list! !\r!PluggableOutline methodsFor: 'accessing' stamp: 'ssa 9/10/2009 13:36'!\rlist: anObject\r\"Set the value of list\"\r\rlist _ anObject asOrderedCollection! !\r!PluggableOutline methodsFor: 'accessing' stamp: 'ssa 9/9/2009 11:42'!\ropenItems\r\"Answer the value of openItems\"\r\ropenItems isNil ifTrue:[self openItems: Set new].\r^ openItems! !\r!PluggableOutline methodsFor: 'accessing' stamp: 'ssa 9/9/2009 11:42'!\ropenItems: anObject\r\"Set the value of openItems\"\r\ropenItems _ anObject! !\r!PluggableOutline methodsFor: 'accessing' stamp: 'ssa 9/9/2009 13:28'!\rprogenyOf: anObject\r\r| all |\rall _ (self childrenOf: anObject)copy.\rall isEmpty ifTrue:[^all].\rall copy do:[:each| all addAll: (self progenyOf: each)].\r^all ! !\r!PluggableOutline methodsFor: 'accessing' stamp: 'ssa 9/9/2009 11:18'!\rselection\r\"Answer the value of selection\"\r\rselection isNil ifTrue:[self selection: nil].\r^ selection! !\r!PluggableOutline methodsFor: 'accessing' stamp: 'ssa 9/9/2009 17:15'!\rselection: anObject\r\"Set the value of selection\"\r\rselection _ anObject .\r! !\r!PluggableOutline methodsFor: 'accessing' stamp: 'ssa 7/7/2010 12:40'!\rsubject\r\"Answer the value of subject\"\r\rsubject isNil ifTrue:[self subject: nil].\r^ subject! !\r!PluggableOutline methodsFor: 'accessing' stamp: 'ssa 9/10/2009 08:25'!\rsubject: anObject\r\"Set the value of subject\"\r\rsubject _ anObject! !\r!PluggableOutline methodsFor: 'opening/closing' stamp: 'ssa 9/9/2009 13:02'!\rhasChildren: anObject\r\r^(self childrenOf: anObject) notEmpty ! !\r!PluggableOutline methodsFor: 'opening/closing' stamp: 'ssa 9/9/2009 14:07'!\rhideChildrenOfSelection\r\r| kids |\rself openItems remove: self selection.\rkids _ self progenyOf: self selection.\rkids do:[:each| self levels removeKey: each ifAbsent:[].\r\tself openItems remove: each ifAbsent:[]].\rself list removeAll: kids ifAbsent:[]\r! !\r!PluggableOutline methodsFor: 'opening/closing' stamp: 'ssa 9/9/2009 11:42'!\risOpen: anItem\r\r^self openItems includes: anItem! !\r!PluggableOutline methodsFor: 'opening/closing' stamp: 'ssa 9/9/2009 12:10'!\rshowChildrenOfSelection\r\r| kids nextLevel |\rself openItems add: self selection.\rnextLevel _ (self levelOf: self selection) + 1.\rkids _ self childrenOf: self selection.\rkids isEmpty ifTrue:[^self error:'should never try to show children of an childless object'].\rkids do:[:each| self levels at: each put: nextLevel].\rself list addAll: kids after: self selection! !\r!PluggableOutline methodsFor: 'opening/closing' stamp: 'ssa 9/10/2009 07:30'!\rtoggleSelection\r\rself selection isNil ifTrue:[^self].\r(self isOpen: self selection)\r\tifTrue:[self hideChildrenOfSelection]\r\tifFalse:[self showChildrenOfSelection].\rself changed:#list! !\r!PluggableOutline methodsFor: 'arrow keys' stamp: 'ssa 9/9/2009 14:47'!\rarrowKey: aChar from: view\r\"Process the up and down arrows in a list pane.  Note that the listView tells us what index variable, how to get the list, and how to move the index.  Derived from a Martin Pammer submission, 02/98\"\r\r | keyEvent oldSelection nextSelection max min howMany |\r\r(#(1 4 11 12 30 31) includes: (keyEvent _ aChar asciiValue)) ifFalse:\r\t[\r\t\t^ self].\r\r oldSelection := view getCurrentSelectionIndex.\r nextSelection := oldSelection.\r max := view maximumSelection.\r min := view minimumSelection.\r howMany := view numSelectionsInView.\t\"get this exactly??\"\r\r keyEvent == 31 ifTrue:\r\t[\"down-arrow; move down one, wrapping to top if needed\"\r\tnextSelection := oldSelection + 1.\r\tnextSelection > max ifTrue: [nextSelection _ 1]].\r\r keyEvent == 30 ifTrue:\r\t[\"up arrow; move up one, wrapping to bottom if needed\"\r\tnextSelection := oldSelection - 1.\r\tnextSelection < 1 ifTrue: [nextSelection _ max]].\r\r keyEvent == 1  ifTrue: [nextSelection := 1].  \"home\"\r keyEvent == 4  ifTrue: [nextSelection := max].   \"end\"\r keyEvent == 11 ifTrue: [nextSelection := min max: (oldSelection - howMany)].  \"page up\"\r keyEvent == 12  ifTrue: [nextSelection := (oldSelection + howMany) min: max].  \"page down\"\r nextSelection = oldSelection  ifFalse:\r\t[self okToChange\r\t\tifTrue:\r\t\t\t[view changeModelSelection: nextSelection.\r\t\t\t\"view controller moveMarker\"]]\r\t\t! !\r!AbstractHierarchicalList methodsFor: 'as yet unclassified' stamp: 'RAA 6/21/1999 15:22'!\rgenericMenu: aMenu\r\raMenu add: 'no menu yet' target: self selector: #yourself.\r^aMenu! !\r!AbstractHierarchicalList methodsFor: 'as yet unclassified' stamp: 'RAA 4/7/1999 16:44'!\rgetCurrentSelection\r\r^currentSelection! !\r!AbstractHierarchicalList methodsFor: 'as yet unclassified' stamp: 'RAA 4/7/1999 16:46'!\rnoteNewSelection: x\r\rcurrentSelection _ x.\rself changed: #getCurrentSelection.\rcurrentSelection ifNil: [^self].\rcurrentSelection sendSettingMessageTo: self.\r! !\r!AbstractHierarchicalList methodsFor: 'as yet unclassified' stamp: 'RAA 4/7/1999 16:53'!\rperform: selector orSendTo: otherTarget\r\"Selector was just chosen from a menu by a user.  If can respond, then\rperform it on myself. If not, send it to otherTarget, presumably the\reditPane from which the menu was invoked.\"\r\r(self respondsTo: selector)\r\tifTrue: [^ self perform: selector]\r\tifFalse: [^ otherTarget perform: selector]! !\r!AbstractHierarchicalList methodsFor: 'as yet unclassified' stamp: 'RAA 4/7/1999 16:47'!\rupdate: aSymbol\r\raSymbol == #hierarchicalList ifTrue: [\r\t^self changed: #getList\r].\rsuper update: aSymbol! !\r!AbstractHierarchicalList methodsFor: 'accessing' stamp: 'ssa 9/11/2009 15:44'!\rcurrentSelection\r\"Answer the value of currentSelection\"\r\rcurrentSelection isNil ifTrue:[self currentSelection: nil].\r^ currentSelection! !\r!AbstractHierarchicalList methodsFor: 'accessing' stamp: 'ssa 9/11/2009 15:44'!\rcurrentSelection: anObject\r\"Set the value of currentSelection\"\r\rcurrentSelection _ anObject! !\r!AbstractHierarchicalList methodsFor: 'accessing' stamp: 'ssa 9/11/2009 15:44'!\rmyBrowser\r\"Answer the value of myBrowser\"\r\rmyBrowser isNil ifTrue:[self myBrowser: nil].\r^ myBrowser! !\r!AbstractHierarchicalList methodsFor: 'accessing' stamp: 'ssa 9/11/2009 15:44'!\rmyBrowser: anObject\r\"Set the value of myBrowser\"\r\rmyBrowser _ anObject! !\r!ObjectExplorer methodsFor: 'opening/closing' stamp: 'ssa 9/11/2009 16:15'!\rhide: anItem\r\"recursively hide this and all progeny\"\r\t\ranItem isOpen ifTrue:[(self listedChildrenOf: anItem) do:[:each| self hide: each]].\rself levels removeKey: anItem ifAbsent:[].\rself list remove: anItem ifAbsent:[self halt].\ranItem isOpen: false.\r! !\r!ObjectExplorer methodsFor: 'opening/closing' stamp: 'ssa 2/26/2010 13:47'!\rhideChildrenOfSelection\r\r(self listedChildrenOf: self currentSelection ) do:[:each| self hide: each].\rself currentSelection isOpen: false.\r\t\r! !\r!ObjectExplorer methodsFor: 'opening/closing' stamp: 'ssa 9/11/2009 16:14'!\rlistedChildrenOf: aWrapper\r\r^self list select:[:item| item parent == aWrapper]! !\r!ObjectExplorer methodsFor: 'opening/closing' stamp: 'ssa 2/26/2010 13:45'!\rshowChildrenOfSelection\r\r| kids |\rself currentSelection hasContents ifFalse:[^self].\rkids _ self currentSelection contents.\rself list addAll: kids after: self currentSelection.\rself currentSelection isOpen: true.! !\r!ObjectExplorer methodsFor: 'opening/closing' stamp: 'ssa 9/11/2009 15:44'!\rtoggleSelection\r\rself currentSelection isNil ifTrue:[^self].\rself currentSelection isOpen\r\tifTrue:[self hideChildrenOfSelection]\r\tifFalse:[self showChildrenOfSelection].\rself changed:#list! !\r!ObjectExplorer methodsFor: 'accessing' stamp: 'RAA 9/23/1999 13:11'!\rcontentsSelection\r\"Return the interval of text in the code pane to select when I set the pane's contents\"\r\r^ 1 to: 0  \"null selection\"! !\r!ObjectExplorer methodsFor: 'accessing' stamp: 'ssa 2/8/2010 14:40'!\rdefaultRootLabel\r\r^'unlabeled object'! !\r!ObjectExplorer methodsFor: 'accessing' stamp: 'RAA 9/23/1999 13:15'!\rdoItContext\r\"Answer the context in which a text selection can be evaluated.\"\r\r^nil! !\r!ObjectExplorer methodsFor: 'accessing' stamp: 'RAA 9/23/1999 13:19'!\rdoItReceiver\r\"Answer the object that should be informed of the result of evaluating a\rtext selection.\"\r\rcurrentSelection ifNil: [^rootObject].\r^currentSelection withoutListWrapper\r! !\r!ObjectExplorer methodsFor: 'accessing' stamp: 'ssa 6/17/2010 16:25'!\rgetList\r^OrderedCollection with: (ObjectExplorerWrapper with: rootObject name: 'root' model: self parent: nil)\r! !\r!ObjectExplorer methodsFor: 'accessing' stamp: 'ssa 9/11/2009 15:35'!\rinspector\r\"Answer the value of inspector\"\r\rinspector isNil ifTrue:[self inspector: nil].\r^ inspector! !\r!ObjectExplorer methodsFor: 'accessing' stamp: 'ssa 9/11/2009 15:35'!\rinspector: anObject\r\"Set the value of inspector\"\r\rinspector _ anObject! !\r!ObjectExplorer methodsFor: 'accessing' stamp: 'hg 9/7/2001 12:12'!\rlabel\r\r^ rootObject printStringLimitedTo: 32! !\r!ObjectExplorer methodsFor: 'accessing' stamp: 'ssa 9/11/2009 15:51'!\rlist\r\"Answer the value of list\"\r\rlist isNil ifTrue:[self list: self getList].\r^ list! !\r!ObjectExplorer methodsFor: 'accessing' stamp: 'ssa 9/11/2009 15:35'!\rmonitorList: anObject\r\"Set the value of monitorList\"\r\rmonitorList _ anObject! !\r!ObjectExplorer methodsFor: 'accessing' stamp: 'ssa 12/17/2009 10:02'!\rmonitorProcess\r\"Answer the value of monitorProcess\"\r\rmonitorProcess isNil ifTrue:[self monitorProcess: nil].\r^ monitorProcess! !\r!ObjectExplorer methodsFor: 'accessing' stamp: 'ssa 12/17/2009 10:02'!\rmonitorProcess: anObject\r\"Set the value of monitorProcess\"\r\rmonitorProcess _ anObject! !\r!ObjectExplorer methodsFor: 'accessing' stamp: 'nk 7/24/2003 09:43'!\robject\r^currentSelection ifNotNilDo: [ :cs | cs withoutListWrapper ]! !\r!ObjectExplorer methodsFor: 'accessing' stamp: 'nk 7/24/2003 10:02'!\rparentObject\rcurrentSelection ifNil: [ ^nil ].\rcurrentSelection parent ifNil: [ ^rootObject ].\r^currentSelection parent withoutListWrapper! !\r!ObjectExplorer methodsFor: 'accessing' stamp: 'ssa 2/8/2010 14:40'!\rrootLabel\r\"Answer the value of rootLabel\"\r\rrootLabel isNil ifTrue:[self rootLabel: self defaultRootLabel].\r^ rootLabel! !\r!ObjectExplorer methodsFor: 'accessing' stamp: 'ssa 2/8/2010 14:39'!\rrootLabel: anObject\r\"Set the value of rootLabel\"\r\rrootLabel _ anObject! !\r!ObjectExplorer methodsFor: 'accessing' stamp: 'ssa 9/11/2009 15:35'!\rrootObject\r\"Answer the value of rootObject\"\r\rrootObject isNil ifTrue:[self rootObject: nil].\r^ rootObject! !\r!ObjectExplorer methodsFor: 'accessing' stamp: 'ssa 9/11/2009 15:35'!\rrootObject: anObject\r\"Set the value of rootObject\"\r\rrootObject _ anObject! !\r!ObjectExplorer methodsFor: 'accessing' stamp: 'nk 7/24/2003 09:47'!\rselector\r^currentSelection ifNotNilDo: [ :cs | cs selector ]! !\r!ObjectExplorer methodsFor: 'accessing' stamp: 'ssa 2/9/2010 04:26'!\rwrapperFor: anObject\r\r^self list detect:[:wrapper| wrapper item == anObject]ifNone:[^nil]! !\r!ObjectExplorer methodsFor: 'error handling' stamp: 'nk 7/24/2003 09:29'!\rdoesNotUnderstand: aMessage\rinspector ifNotNil: [ (inspector respondsTo: aMessage selector) ifTrue: [ ^inspector perform: aMessage selector withArguments: aMessage arguments ]].\r^super doesNotUnderstand: aMessage! !\r!ObjectExplorer methodsFor: 'menus' stamp: 'sd 11/20/2005 21:27'!\rchasePointers\r\"Open a PointerFinder on the selected item\"\r| path sel savedRoot saved |\rpath := OrderedCollection new.\rsel := currentSelection.\r[ sel isNil ] whileFalse: [ path addFirst: sel asString. sel := sel parent ].\rpath addFirst: #openPath.\rpath := path asArray.\rsavedRoot := rootObject.\rsaved := self object.\r[ rootObject := nil.\rself changed: #getList.\r(Smalltalk includesKey: #PointerFinder)\r\tifTrue: [PointerFinder on: saved]\r\tifFalse: [self objectReferencesToSelection ]]\r\tensure: [ rootObject := savedRoot.\r\t\tself changed: #getList.\r\t\tself changed: path.\r\t]! !\r!ObjectExplorer methodsFor: 'menus' stamp: 'RAA 9/23/1999 13:22'!\rcodePaneMenu: aMenu shifted: shifted\r\"Note that unless we override perform:orSendTo:, PluggableTextController will respond to all menu items\"\r^ StringHolder basicNew codePaneMenu: aMenu shifted: shifted\r! !\r!ObjectExplorer methodsFor: 'menus' stamp: 'sd 11/20/2005 21:27'!\rdefsOfSelection\r\"Open a browser on all defining references to the selected instance variable, if that's what's currently selected.\"\r| aClass sel |\r\r(aClass := self parentObject class) isVariable ifTrue: [^ self changed: #flash].\rsel := self selector.\rself systemNavigation  browseAllStoresInto: sel from: aClass! !\r!ObjectExplorer methodsFor: 'menus' stamp: 'nk 7/24/2003 10:26'!\rexploreSelection\r\"Open an ObjectExplorer on the current selection\"\rself object explore! !\r!ObjectExplorer methodsFor: 'menus' stamp: 'ssa 1/6/2010 20:35'!\rexplorerKey: aChar from: view\r\r\"Similar to #genericMenu:...\"\r| insideObject parentObject |\rcurrentSelection ifNotNil: [\r\tinsideObject := self object.\r\tparentObject := self parentObject.\r\tinspector ifNil: [inspector := Inspector new].\r\tinspector\r\t\tinspect: parentObject;\r\t\tobject: insideObject.\r\r\taChar == $i ifTrue: [^ self inspectSelection].\r\taChar == $e ifTrue: [^ self exploreSelection].\r\r\taChar == $b ifTrue:\t[^ inspector browseMethodFull].\r\taChar == $h ifTrue:\t[^ inspector classHierarchy].\r\taChar == $c ifTrue: [^ inspector copyName].\r\taChar == $p ifTrue: [^ inspector browseFullProtocol].\r\taChar == $N ifTrue: [^ inspector browseClassRefs].\r\taChar == $t ifTrue: [^ inspector tearOffTile].\r\taChar == $v ifTrue: [^ inspector viewerForValue]].\r\r^ self arrowKey: aChar from: view! !\r!ObjectExplorer methodsFor: 'menus' stamp: 'ssa 12/17/2009 10:13'!\rgenericMenu: aMenu \r\"Borrow a menu from my inspector\"\r| insideObject menu parentObject |\rcurrentSelection\r\tifNil: [menu := aMenu.\r\t\tmenu\r\t\t\tadd: '*nothing selected*'\r\t\t\ttarget: self\r\t\t\tselector: #yourself\r\t\t\targument:nil]\r\tifNotNil: [insideObject := self object.\r\t\tparentObject := self parentObject.\r\t\tinspector\r\t\t\tifNil: [inspector := Inspector new].\r\t\tinspector inspect: parentObject;\r\t\t\t object: insideObject.\r\t\taMenu selections do:[:each| aMenu targets add: inspector].\r\t\tinspector fieldListMenu: aMenu.\r\t\taMenu selections do:[:each| aMenu targets add: inspector].\r\t\taMenu selections \r\t\t\tdo: [:i | (#(#inspectSelection #exploreSelection #referencesToSelection #defsOfSelection #objectReferencesToSelection #chasePointers ) includes: i )\r\t\t\t\t\tifTrue: [aMenu targets at:(aMenu selections indexOf:i) put:self]].\r\t\taMenu addLine;\r\t\t\tadd: 'monitor changes'\r\t\t\ttarget: self\r\t\t\tselector: #monitor:\r\t\t\targument: currentSelection].\rmonitorList isEmptyOrNil\r\tifFalse: [aMenu addLine;\r\t\t\tadd: 'stop monitoring all'\r\t\t\ttarget: self\r\t\t\tselector: #stopMonitoring\r\t\t\targument:nil].\r^ aMenu! !\r!ObjectExplorer methodsFor: 'menus' stamp: 'nk 7/24/2003 10:26'!\rinspectSelection\r\"Open an Inspector on the current selection\"\rself object inspect! !\r!ObjectExplorer methodsFor: 'menus' stamp: 'nk 7/24/2003 10:00'!\robjectReferencesToSelection\r\"Open a browser on all references to the selected instance variable, if that's what currently selected. \"\rself systemNavigation\r\tbrowseAllObjectReferencesTo: self object\r\texcept: (Array with: self parentObject with: currentSelection with: inspector)\r\tifNone: [:obj | self changed: #flash].\r! !\r!ObjectExplorer methodsFor: 'menus' stamp: 'sd 11/20/2005 21:27'!\rreferencesToSelection\r\"Open a browser on all references to the selected instance variable, if that's what's currently selected.\"\r| aClass sel |\r\r(aClass := self parentObject class) isVariable ifTrue: [^ self changed: #flash].\rsel := self selector.\rself systemNavigation browseAllAccessesTo: sel from: aClass! !\r!ObjectExplorer methodsFor: 'menus' stamp: 'RAA 9/23/1999 13:19'!\rselectedClass\r\"Answer the class of the receiver's current selection\"\r\r^self doItReceiver class\r! !\r!ObjectExplorer methodsFor: 'menus' stamp: 'RAA 9/23/1999 13:10'!\rtrash\r\"What goes in the bottom pane\"\r^ ''! !\r!ObjectExplorer methodsFor: 'menus' stamp: 'RAA 9/23/1999 13:10'!\rtrash: newText\r\"Don't save it\"\r^ true! !\r!ObjectExplorer methodsFor: 'monitoring' stamp: 'ssa 12/17/2009 10:24'!\rmonitor: anObjectExplorerWrapper\r\"Start stepping and watching the given wrapper for changes.\"\ranObjectExplorerWrapper ifNil: [ ^self ].\rself monitorList at: anObjectExplorerWrapper put: anObjectExplorerWrapper asString.\rself monitorProcess isNil ifFalse:[self monitorProcess terminate].\rself monitorProcess: [[self monitorList notEmpty]whileTrue:[(Delay forMilliseconds:200)wait.  self step]] newProcess.\r[self monitorProcess resume] fork! !\r!ObjectExplorer methodsFor: 'monitoring' stamp: 'sd 11/20/2005 21:27'!\rmonitorList\r^monitorList ifNil: [ monitorList := WeakIdentityKeyDictionary new ].! !\r!ObjectExplorer methodsFor: 'monitoring' stamp: 'ssa 12/17/2009 10:06'!\rrelease\rself stopMonitoring.\rsuper release.! !\r!ObjectExplorer methodsFor: 'monitoring' stamp: 'nk 7/12/2003 17:55'!\rshouldGetStepsFrom: aWorld\r^self monitorList notEmpty! !\r!ObjectExplorer methodsFor: 'monitoring' stamp: 'ssa 12/17/2009 10:20'!\rstep\r\"If there's anything in my monitor list, see if the strings have changed.\"\r| string changes |\rchanges := false.\rself monitorList keysAndValuesDo: [ :k :v |\r\tk ifNotNil: [\r\t\tk refresh.\r\t\t(string := k asString) ~= v ifTrue: [ self monitorList at: k put: string. changes := true ].\r\t]\r].\r\rchanges ifTrue: [ | sel | \r\tsel := currentSelection.\r\tself changed: #list.\r\tself noteNewSelection: sel.\r].\r! !\r!ObjectExplorer methodsFor: 'monitoring' stamp: 'ssa 12/17/2009 10:06'!\rstopMonitoring\rmonitorList := nil.\rself monitorProcess ifNotNil:[self monitorProcess terminate]! !\r!ObjectExplorer methodsFor: 'user interface' stamp: 'ssa 9/10/2009 16:51'!\rexplorerFor: anObject\r\r^self explorerFor: anObject withLabel:'Object Explorer'! !\r!ObjectExplorer methodsFor: 'user interface' stamp: 'ssa 3/24/2010 15:05'!\rexplorerFor: anObject withLabel: label \r|  topView listView ptv |\rrootObject := anObject.\rtopView := StandardSystemView new\r\t\t\tlabel: 'Exploring ',anObject class name,' ',label; \r\t\t\tmodel: self;\r\t\t\tyourself.\rtopView addSubView:(listView := ExplorerListView\r\t\t\t\t\ton: self\r\t\t\t\t\tlist: #list\r\t\t\t\t\tselected: #getCurrentSelection\r\t\t\t\t\tchangeSelected: #noteNewSelection:\r\t\t\t\t\tmenu: #genericMenu:\r\t\t\t\t\tkeystroke: #explorerKey:from:)\r\tin: (0 @ 0 corner: 1 @ 0.8)\r\tborderWidth:1.\rptv _ PluggableTextView\r\t\t\ton: self\r\t\t\ttext: #trash\r\t\t\taccept: #trash:\r\t\t\treadSelection: #contentsSelection\r\t\t\tmenu: #codePaneMenu:shifted:.\rptv askBeforeDiscardingEdits: false.\rtopView\r\taddSubView: ptv\t\r\tin: (0 @ 0.8 corner: 1 @ 1)\r\tborderWidth:1.\rlistView autoDeselect: false.\r^ topView! !\r!ObjectExplorer methodsFor: 'user interface' stamp: 'RAA 6/2/2000 16:23'!\rinitialExtent\r\r^300@500! !\r!ObjectExplorer methodsFor: 'user interface' stamp: 'ssa 9/10/2009 16:42'!\ropenBrowser: aClass\r\rBrowser newOnClass: aClass selector: nil! !\r!ObjectExplorer methodsFor: 'user interface' stamp: 'ssa 9/11/2009 14:37'!\ropenExplorerFor: anObject\r\"\rObjectExplorer new openExplorerFor: Smalltalk\r\"\r\r(self explorerFor: anObject) controller open.\r^ self\r! !\r!ClassHierarchyExplorer methodsFor: 'accessing' stamp: 'ssa 3/1/2010 11:52'!\rcentralClass\r\"Answer the value of centralClass\"\r\rcentralClass isNil ifTrue:[self centralClass: nil].\r^ centralClass! !\r!ClassHierarchyExplorer methodsFor: 'accessing' stamp: 'ssa 3/1/2010 11:52'!\rcentralClass: anObject\r\"Set the value of centralClass\"\r\rcentralClass _ anObject! !\r!ClassHierarchyExplorer methodsFor: 'accessing' stamp: 'ssa 3/1/2010 11:52'!\rgetCentralItem\r^Array with: (ClassHierarchyExplorerWrapper with: self centralClass name: self centralClass name model: self)\r! !\r!ClassHierarchyExplorer methodsFor: 'accessing' stamp: 'ssa 3/1/2010 12:22'!\rgetList\r\r| classList prev |\rclassList _ OrderedCollection new.\rself centralClass allSuperclasses reverseDo:  [:aClass | classList add: aClass].\rclassList add: self centralClass.\rself centralClass subclassesDo: [:aClass| classList add: aClass].\rprev _nil.\r^(classList collect:[:cls| prev _ ClassHierarchyExplorerWrapper with: cls name: cls name model: self parent: prev]) asArray! !\r!ClassHierarchyExplorer methodsFor: 'user interface' stamp: 'ssa 3/1/2010 12:01'!\rexplorerFor: anObject withLabel: label \r|  topView listView |\rself centralClass: anObject.\rtopView := StandardSystemView new\r\t\t\tlabel: label; \r\t\t\tmodel: self;\r\t\t\tyourself.\rtopView addSubView:(listView := ExplorerListView\r\t\t\t\t\ton: self\r\t\t\t\t\tlist: #list\r\t\t\t\t\tselected: #getCurrentSelection\r\t\t\t\t\tchangeSelected: #noteNewSelection:\r\t\t\t\t\tmenu: #genericMenu:\r\t\t\t\t\tkeystroke: #explorerKey:from:)\r\tin: (0 @ 0 corner: 1 @ 1)\r\tborderWidth:1.\rlistView autoDeselect: false.\r^ topView! !\r!ObjectExplorer class methodsFor: 'instance creation' stamp: 'ssa 2/8/2010 14:44'!\ropenExplorerFor: anObject labeled: newRootLabel withLabel: label \r\r| exp view |\rexp _ self new rootLabel: newRootLabel.\rview _ exp explorerFor: anObject withLabel: label .\rview  controller open! !\r!ObjectExplorer class methodsFor: 'instance creation' stamp: 'ssa 2/8/2010 14:33'!\ropenExplorerFor: anObject withLabel: label \r\r| exp |\rexp _ self new explorerFor: anObject withLabel: label .\rexp controller open! !\r!Point methodsFor: 'accessing' stamp: 'ssa 11/16/2008 13:12'!\rx: aNumber\r\rx _ aNumber! !\r!Point methodsFor: 'accessing' stamp: 'ssa 11/16/2008 13:12'!\ry: aNumber\r\ry _ aNumber! !\r!Point methodsFor: 'arithmetic' stamp: 'ssa 11/27/2009 16:15'!\rinverted\r\r^1 asPoint / self! !\r!Point methodsFor: 'comparing' stamp: 'ssa 9/3/2009 07:11'!\rmaxed\r\r^(x max: y) asPoint! !\r!Point methodsFor: 'comparing' stamp: 'ssa 9/3/2009 07:11'!\rmined\r\r^(x min: y) asPoint! !\r!Point methodsFor: 'interpolating' stamp: 'ssa 9/7/2009 21:42'!\rzeno\r\"(10@10) zeno  #(10@10 5.0@5.0 2.5@2.5 1.25@1.25)\"\r\"(10@4) zeno  #(10@4 5.0@2.0)\"\r\"(-10@4) zeno  \"\r| steps zx zy minSize |\rsteps _ OrderedCollection new.\rzx _ x zeno.\rzy _ y zeno.\rminSize _ zx size min: zy size.\r1 to: minSize do:[:index|\r\tsteps add:(zx at: index)@(zy at: index)].\r^steps asArray! !\r!Point methodsFor: 'point functions' stamp: 'ssa 11/16/2008 02:35'!\ratRandom\r\r^x atRandom @ y atRandom! !\r!Point methodsFor: 'point functions' stamp: 'ssa 1/30/2009 10:04'!\rmandist: aPoint \r\"Answer the Manhattan distance between aPoint and the receiver.\"\r\r^(x-aPoint x) abs + (y - aPoint y) abs! !\r!Point methodsFor: 'point functions' stamp: 'dmu 4/1/2009 20:49'!\rmanhattanDist: aPoint \r\"Answer the distance between aPoint and the receiver.\"\r\r| p |\rp _ aPoint - self.\r^ p x abs + p y abs! !\r!Point methodsFor: 'polar coordinates' stamp: ''!\rcomplexProduct: aPoint\r\r^((x * aPoint x) - (y * aPoint y)) @ ((x * aPoint y) + (y * aPoint x))! !\r!Point methodsFor: 'transforming' stamp: 'ssa 8/25/2009 14:26'!\rmoveBy: aPoint\r\"Alter the receiver by moving it by a Point.\"\r\r\rx _ x + aPoint x.\ry _ y + aPoint y.! !\r!Point methodsFor: 'transforming' stamp: 'ssa 2/8/2009 20:57'!\rwrapAround: aRectangle\r\"If the receiver lies outside aRectangle, return the nearest point on the other side of the rectangle, otherwise return self.\"\r\r| newX newY |\rnewX _ x.\rnewY _ y.\r(aRectangle containsPoint: self) ifTrue: [^ self].\rx >= aRectangle right ifTrue:[newX _ aRectangle left].\rx <= aRectangle left ifTrue:[newX _ aRectangle right].\ry >= aRectangle bottom ifTrue:[newY _ aRectangle top].\ry <= aRectangle top ifTrue:[newY _ aRectangle bottom].\r^newX@newY! !\r!Point methodsFor: 'truncation and round off' stamp: 'ssa 8/25/2009 14:08'!\rceiling\r\"Answer a new Point that is the receiver's x and y ceiling.\"\r\r^x ceiling @ y ceiling! !\r!Point methodsFor: 'truncation and round off' stamp: 'ssa 8/25/2009 14:07'!\rfloor\r\"Answer a new Point that is the receiver's x and y floor.\"\r\r^x floor @ y floor! !\r!Point methodsFor: 'Ly' stamp: 'dmu 1/25/2010 14:02'!\rminus: arg \r\"Answer a Point that is the difference of the receiver and arg.\"\r\rarg isPoint ifTrue: [^ (x - arg x) @ (y - arg y)].\r^ arg adaptToPoint: self andSend: #-! !\r!Point methodsFor: 'Ly' stamp: 'dmu 3/16/2010 23:16'!\rperturb: n\r| r |\rr _ Random new.\r^ self + ( r next @r next   *  n  - (n / 2.0) )! !\r!PointerExplorer methodsFor: 'accessing' stamp: 'ab 8/22/2003 18:51'!\rgetList\r^Array with: (PointerExplorerWrapper with: rootObject name: rootObject identityHash asString model: self)\r! !\r!PointerExplorerWrapper methodsFor: 'accessing' stamp: 'ssa 9/11/2009 16:23'!\rcontents\r| objects |\robjects := Utilities pointersTo: item except: (Array with: self with: model).\t\r^(objects reject: [:ea | ea class = self class])\r\tcollect: [:ea| self class with: ea name: ea identityHash asString model: item parent: self]! !\r!PointerExplorerWrapper methodsFor: 'testing' stamp: 'ab 8/22/2003 18:39'!\rhasContents\r^true! !\r!PointerFinder methodsFor: 'morphic ui' stamp: 'ssa 3/9/2010 16:29'!\rmenu: aMenu shifted: shifted\r\"Note that unless we override perform:orSendTo:, PluggableTextController will respond to all menu items in a text pane\"\r^SelectionMenu\r\tlabels:\r'inpsect\rsearch again'\r\tlines: #()\r\tselections: #(inspectObject searchAgain).! !\r!PointerFinder methodsFor: 'morphic ui' stamp: 'ssa 3/9/2010 16:37'!\ropen\r| topView listView |\r\ttopView := StandardSystemView new\r\t\t\tlabel: 'Pointer FInder'; \r\t\t\tmodel: self;\r\t\t\tyourself.\rtopView addSubView:(listView := PluggableListView\r\ton: self\r\tlist: #pointerList\r\tselected: #pointerListIndex\r\tchangeSelected: #pointerListIndex:\r\tmenu: #menu:shifted:\r\tkeystroke: #arrowKey:from:)\rin:(0@0 extent: 1@1)\rborderWidth:1.\rlistView backgroundColor: Color lightMagenta.\rtopView controller open! !\r!PointerFinder class methodsFor: 'utilities' stamp: 'sd 9/24/2004 20:49'!\rpointersTo: anObject\r\"Find all occurrences in the system of pointers to the argument anObject.\"\r\"(PointerFinder pointersTo: Browser) inspect.\"\r\r^ self pointersTo: anObject except: #()\r! !\r!PointerFinder class methodsFor: 'utilities' stamp: 'sd 11/20/2005 21:28'!\rpointersTo: anObject except: objectsToExclude\r\"Find all occurrences in the system of pointers to the argument anObject. \rRemove objects in the exclusion list from the results.\"\r\r| results anObj |\rSmalltalk garbageCollect.\r\"big collection shouldn't grow, so it's contents array is always the same\"\rresults := OrderedCollection new: 1000.\r\r\"allObjectsDo: is expanded inline to keep spurious\r method and block contexts out of the results\"\ranObj := self someObject.\r[0 == anObj] whileFalse: [\r\tanObj isInMemory ifTrue: [\r\t\t(anObj pointsTo: anObject) ifTrue: [\r\t\t\t\"exclude the results collector and contexts in call chain\"\r\t\t\t((anObj ~~ results collector) and:\r\t\t\t [(anObj ~~ objectsToExclude) and:\r\t\t\t [(anObj ~~ thisContext) and:\r\t\t\t [(anObj ~~ thisContext sender) and:\r\t\t\t [anObj ~~ thisContext sender sender]]]])\r\t\t\t\t ifTrue: [ results add: anObj ].\r\t\t]].\r\tanObj := anObj nextObject.\r].\robjectsToExclude do: [ :obj | results removeAllSuchThat: [ :el | el == obj]].\r\r^ results asArray\r! !\r!PointerFinder class methodsFor: 'utilities' stamp: 'sd 9/24/2004 20:48'!\rpointersToItem: index of: anArray\r\"Find all occurrences in the system of pointers to the given element of the given array. \rThis is useful for tracing up a pointer chain from an inspector on the results of a previous \tcall of pointersTo:. To find out who points to the second element of the results, one would \tevaluate:\r\r\tPointerFinder pointersToItem: 2 of: self\r\rin the inspector.\"\r\r^ self pointersTo: (anArray at: index) except: (Array with: anArray)! !\r!PopUpMenu methodsFor: 'basic control sequence' stamp: 'ssa 4/19/2010 20:04'!\rstartUpWithCaption: captionOrNil\r\"Display the menu, slightly offset from the cursor,\rso that a slight tweak is required to confirm any action.\"\r^ self startUpWithCaption: captionOrNil at: Sensor cursorPoint! !\r!PopUpMenu methodsFor: 'basic control sequence' stamp: 'ssa 4/19/2010 20:12'!\rstartUpWithCaption: captionOrNil at: location allowKeyboard: aBoolean\r\"Display the menu, with caption if supplied. Wait for the mouse button to go down, then track the selection as long as the button is pressed. When the button is released,\rAnswer the index of the current selection, or zero if the mouse is not released over  any menu item. Location specifies the desired topLeft of the menu body rectangle. The final argument indicates whether the menu should seize the keyboard focus in order to allow the user to navigate it via the keyboard.\"\r\r| maxHeight |\r\"self terminateRedundantUIProcessIfAny.\"\rmaxHeight _ Display height*3//4.\rself frameHeight > maxHeight ifTrue:\r\t[^ self\r\t\tstartUpSegmented: maxHeight\r\t\twithCaption: captionOrNil\r\t\tat: location\r\t\tallowKeyboard: aBoolean].\r\r\r\rframe ifNil: [self computeForm].\rCursor normal showWhile:\r\t[self\r\t\tdisplayAt: location\r\t\twithCaption: captionOrNil\r\t\tduring: [self controlActivity]].\r^ selection! !\r!PopUpMenu methodsFor: 'RVM' stamp: 'ssa 3/1/2010 13:43'!\rlastStartupTime\r^ LastStartupTime ifNil: [LastStartupTime _ 0] ifNotNil: [LastStartupTime] ! !\r!PopUpMenu methodsFor: 'RVM' stamp: 'ssa 3/1/2010 13:43'!\rlastStartupTime: t\rLastStartupTime _ t ! !\r!PopUpMenu methodsFor: 'RVM' stamp: 'dmu 3/11/2010 20:43'!\rterminateRedundantUIProcessIfAny\r\"kill a redundant UI process if there is one; judge by pop-up time\"\r\"[self halt] fork\"\r|now delta |\rnow _ Time millisecondClockValue.\rdelta _ now - self lastStartupTime.\r(delta   <= (RVMTester isRVM ifTrue:[100]ifFalse:[^10]) and: [delta > 0]) ifTrue: [\" self lastStartupProcess\" \r\tTranscript resetSemaphore show: 'terminateRedundantUIProcessIfAny zap!!'; cr.\r\tProcessor thisProcess terminate ].\rself lastStartupTime: now! !\r!CustomMenu methodsFor: 'invocation' stamp: 'ssa 12/17/2009 10:10'!\rinvokeOn: targetObject orSendTo: anObject\r\"Pop up this menu and return the result of sending to the target object the selector corresponding to the menu item selected by the user. Return  nil if no item is selected.  If the chosen selector has arguments, obtain appropriately.  If the recipient does not respond to the resulting message, send it to the alternate object provided\"\r\r| aSelector anIndex recipient |\r^ (aSelector _ self startUp) ifNotNil:\r\t[anIndex _ self selection.\r\trecipient _ (self targets isEmpty or: [anIndex > self targets size])\r\t\tifTrue:\r\t\t\t[targetObject]\r\t\tifFalse:\r\t\t\t[self targets at: anIndex].\r\taSelector numArgs == 0\r\t\tifTrue:\r\t\t\t[recipient perform: aSelector orSendTo: anObject]\r\t\tifFalse:\r\t\t\t[recipient perform: aSelector withArguments: (self arguments at: 1)]]! !\r!CustomMenu methodsFor: 'invocation' stamp: 'ssa 1/1/1970 00:42'!\rstartUp: initialSelection withCaption: caption at: aPoint\r\"Build and invoke this menu with the given initial selection and caption. Answer the selection associated with the menu item chosen by the user or nil if none is chosen.\"\r\rself build.\r(initialSelection notNil) ifTrue: [self preSelect: initialSelection].\r^ super startUpWithCaption: caption at: aPoint! !\r!PositionableStream methodsFor: 'printing' stamp: 'ssa 8/19/2009 20:08'!\rprintOn: aStream\r\raStream nextPutAll:'@',self position printString,' in '.\r^super printOn: aStream! !\r!JPEGReadStream methodsFor: 'accessing' stamp: 'ar 3/4/2001 20:42'!\rfillBuffer\r\r| byte |\r[bitsInBuffer <= 16]\r\twhileTrue:[\r\t\tbyte _ self next.\r\t\t(byte = 16rFF and: [(self peekFor: 16r00) not])\r\t\t\t\tifTrue:\r\t\t\t\t\t[self position: self position - 1.\r\t\t\t\t\t^0].\r\t\tbitBuffer _ (bitBuffer bitShift: 8) bitOr: byte.\r\t\tbitsInBuffer _ bitsInBuffer + 8].\r^ bitsInBuffer! !\r!JPEGReadStream methodsFor: 'accessing' stamp: 'ar 3/4/2001 18:43'!\rgetBits: requestedBits\r| value |\rrequestedBits > bitsInBuffer ifTrue:[\r\tself fillBuffer.\r\trequestedBits > bitsInBuffer ifTrue:[\r\t\tself error: 'not enough bits available to decode']].\rvalue _ bitBuffer bitShift: (requestedBits - bitsInBuffer).\rbitBuffer _ bitBuffer bitAnd: (1 bitShift: (bitsInBuffer - requestedBits)) -1.\rbitsInBuffer _ bitsInBuffer - requestedBits.\r^ value! !\r!JPEGReadStream methodsFor: 'accessing' stamp: 'ar 3/6/2001 12:34'!\rnextByte\r^self next asInteger! !\r!JPEGReadStream methodsFor: 'accessing' stamp: 'ar 3/6/2001 12:35'!\rnextBytes: n\r^(self next: n) asByteArray! !\r!JPEGReadStream methodsFor: 'accessing' stamp: 'ar 3/4/2001 17:40'!\rreset\rsuper reset.\rself resetBitBuffer! !\r!JPEGReadStream methodsFor: 'accessing' stamp: 'ar 3/4/2001 18:44'!\rresetBitBuffer\rbitBuffer _ 0.\rbitsInBuffer _ 0.\r! !\r!JPEGReadStream methodsFor: 'huffman trees' stamp: 'ar 3/4/2001 21:06'!\rbuildLookupTable: values counts: counts\r| min max |\rmin _ max _ nil.\r1 to: counts size do:[:i|\r\t(counts at: i) = 0 ifFalse:[\r\t\tmin ifNil:[min _ i-1].\r\t\tmax _ i]].\r^self\r\tcreateHuffmanTables: values \r\tcounts: {0},counts \r\tfrom: min+1 \r\tto: max.! !\r!JPEGReadStream methodsFor: 'huffman trees' stamp: 'ar 3/4/2001 18:46'!\rcreateHuffmanTables: values counts: counts from: minBits to: maxBits\r\"Create the actual tables\"\r| table tableStart tableSize tableEnd \rvalueIndex tableStack numValues deltaBits maxEntries\rlastTable lastTableStart tableIndex lastTableIndex |\r\rtable _ WordArray new: ((4 bitShift: minBits) max: 16).\r\r\"Create the first entry - this is a dummy.\rIt gives us information about how many bits to fetch initially.\"\rtable at: 1 put: (minBits bitShift: 24) + 2. \"First actual table starts at index 2\"\r\r\"Create the first table from scratch.\"\rtableStart _ 2. \"See above\"\rtableSize _ 1 bitShift: minBits.\rtableEnd _ tableStart + tableSize.\r\"Store the terminal symbols\"\rvalueIndex _ (counts at: minBits+1).\rtableIndex _ 0.\r1 to: valueIndex do:[:i|\r\ttable at: tableStart + tableIndex put: (values at: i).\r\ttableIndex _ tableIndex + 1].\r\"Fill up remaining entries with invalid entries\"\rtableStack _ OrderedCollection new: 10. \"Should be more than enough\"\rtableStack addLast: \r\t(Array \r\t\twith: minBits\t\"Number of bits (e.g., depth) for this table\"\r\t\twith: tableStart\t\"Start of table\"\r\t\twith: tableIndex \"Next index in table\"\r\t\twith: minBits\t\"Number of delta bits encoded in table\"\r\t\twith: tableSize - valueIndex \"Entries remaining in table\").\r\"Go to next value index\"\rvalueIndex _ valueIndex + 1.\r\"Walk over remaining bit lengths and create new subtables\"\rminBits+1 to: maxBits do:[:bits|\r\tnumValues _ counts at: bits+1.\r\t[numValues > 0] whileTrue:[\"Create a new subtable\"\r\t\tlastTable _ tableStack last.\r\t\tlastTableStart _ lastTable at: 2.\r\t\tlastTableIndex _ lastTable at: 3.\r\t\tdeltaBits _ bits - (lastTable at: 1).\r\t\t\"Make up a table of deltaBits size\"\r\t\ttableSize _ 1 bitShift: deltaBits.\r\t\ttableStart _ tableEnd.\r\t\ttableEnd _ tableEnd + tableSize.\r\t\t[tableEnd > table size ]\r\t\t\twhileTrue:[table _ self growHuffmanTable: table].\r\t\t\"Connect to last table\"\r\t\tself assert:[(table at: lastTableStart + lastTableIndex) = 0].\"Entry must be unused\"\r\t\ttable at: lastTableStart + lastTableIndex put: (deltaBits bitShift: 24) + tableStart.\r\t\tlastTable at: 3 put: lastTableIndex+1.\r\t\tlastTable at: 5 put: (lastTable at: 5) - 1.\r\t\tself assert:[(lastTable at: 5) >= 0]. \"Don't exceed tableSize\"\r\t\t\"Store terminal values\"\r\t\tmaxEntries _ numValues min: tableSize.\r\t\ttableIndex _ 0.\r\t\t1 to: maxEntries do:[:i|\r\t\t\ttable at: tableStart + tableIndex put: (values at: valueIndex).\r\t\t\tvalueIndex _ valueIndex + 1.\r\t\t\tnumValues _ numValues - 1.\r\t\t\ttableIndex _ tableIndex+1].\r\t\t\"Check if we have filled up the current table completely\"\r\t\tmaxEntries = tableSize ifTrue:[\r\t\t\t\"Table has been filled. Back up to the last table with space left.\"\r\t\t\t[tableStack isEmpty not and:[(tableStack last at: 5) = 0]]\r\t\t\t\t\twhileTrue:[tableStack removeLast].\r\t\t] ifFalse:[\r\t\t\t\"Table not yet filled. Put it back on the stack.\"\r\t\t\ttableStack addLast:\r\t\t\t\t(Array\r\t\t\t\t\twith: bits\t\t\"Nr. of bits in this table\"\r\t\t\t\t\twith: tableStart\t\"Start of table\"\r\t\t\t\t\twith: tableIndex \"Index in table\"\r\t\t\t\t\twith: deltaBits\t\"delta bits of table\"\r\t\t\t\t\twith: tableSize - maxEntries \"Unused entries in table\").\r\t\t].\r\t].\r].\r ^table copyFrom: 1 to: tableEnd-1! !\r!JPEGReadStream methodsFor: 'huffman trees' stamp: 'ar 3/4/2001 18:44'!\rdecodeValueFrom: table\r\"Decode the next value in the receiver using the given huffman table.\"\r| bits bitsNeeded tableIndex value |\rbitsNeeded _ (table at: 1) bitShift: -24.\t\"Initial bits needed\"\rtableIndex _ 2.\t\t\t\t\t\t\t\"First real table\"\r[bits _ self getBits: bitsNeeded.\t\t\t\"Get bits\"\rvalue _ table at: (tableIndex + bits).\t\t\"Lookup entry in table\"\r(value bitAnd: 16r3F000000) = 0] \t\t\t\"Check if it is a non-leaf node\"\r\twhileFalse:[\"Fetch sub table\"\r\t\ttableIndex _ value bitAnd: 16rFFFF.\t\"Table offset in low 16 bit\"\r\t\tbitsNeeded _ (value bitShift: -24) bitAnd: 255. \"Additional bits in high 8 bit\"\r\t\tbitsNeeded > MaxBits ifTrue:[^self error:'Invalid huffman table entry']].\r^value! !\r!JPEGReadStream methodsFor: 'huffman trees' stamp: 'ar 3/4/2001 18:21'!\rgrowHuffmanTable: table\r| newTable |\rnewTable _ table species new: table size * 2.\rnewTable replaceFrom: 1 to: table size with: table startingAt: 1.\r^newTable! !\r!JPEGReadStream class methodsFor: 'class initialization' stamp: 'ar 3/4/2001 18:32'!\rinitialize\r\"JPEGReadStream initialize\"\rMaxBits _ 16.! !\r!Preferences class methodsFor: 'get/set' stamp: 'ssa 3/24/2010 15:18'!\renable: aSymbol\r\"Shorthand access to enabling a preference of the given name.  If there is none in the image, conjure one up\"\r\r| aPreference |\raPreference _ self preferenceAt: aSymbol ifAbsent:\r\t[self addPreference: aSymbol category: 'unclassified' default: false balloonHelp: 'this preference was added idiosyncratically and has no help message.'.\r\tself preferenceAt: aSymbol].\raPreference preferenceValue: true! !\r!Process methodsFor: '*Sly' stamp: 'dmu 3/24/2010 14:44'!\raddChild: aProcess\rself children add: aProcess.\raProcess parent: self.! !\r!Process methodsFor: '*Sly' stamp: 'dmu 3/24/2010 14:42'!\rchildren\r\"Answer the value of children\"\r\rchildren isNil ifTrue:[self children: WeakSet new].\r^ children! !\r!Process methodsFor: '*Sly' stamp: 'dmu 3/24/2010 14:38'!\rchildren: anObject\r\"Set the value of children\"\r\rchildren _ anObject! !\r!Process methodsFor: '*Sly' stamp: 'dmu 3/25/2010 10:30'!\rdescendantsDo: blk\rself children do: [:p | blk value: p. p descendantsDo: blk]! !\r!Process methodsFor: '*Sly' stamp: 'dmu 3/26/2010 12:26'!\rmyGeneration\r^ self parent ifNil: [{self}] ifNotNil: [self parent children]! !\r!Process methodsFor: '*Sly' stamp: 'dmu 3/25/2010 10:34'!\rmyGenerationAndTheirDescendantsDo: blk\rself myGeneration do: [:p | blk value: p. p descendantsDo: blk]! !\r!Process methodsFor: '*Sly' stamp: 'dmu 3/24/2010 14:38'!\rparent\r\"Answer the value of parent\"\r\rparent isNil ifTrue:[self parent: nil].\r^ parent! !\r!Process methodsFor: '*Sly' stamp: 'dmu 3/24/2010 14:38'!\rparent: anObject\r\"Set the value of parent\"\r\rparent _ anObject! !\r!Process methodsFor: '*Sly' stamp: 'dmu 3/25/2010 10:34'!\rsiblings\r^ self myGeneration copyWithout: self! !\r!Process methodsFor: '*Sly' stamp: 'dmu 3/25/2010 10:32'!\rsiblingsAndTheirDescendantsDo: blk\rself siblings do: [:p | blk value: p. p descendantsDo: blk]! !\r!Process methodsFor: 'Ly' stamp: 'dmu 3/9/2010 14:59'!\rstopIfDebugging: whatIAmAboutToDo\r| |\rself lyDebuggingBlock ifNil: [^ self].\rself lyDebuggingBlock value: whatIAmAboutToDo! !\r!Process methodsFor: 'RVM' stamp: 'dmu 5/9/2009 23:08'!\risRunning\r\tProcessor thisProcess == self ifTrue: [^ true].\r\tself isActiveProcess ifTrue: [^ true].\r\tmyList ifNil: [^ false].\r\t^ myList class ~~ Semaphore! !\r!Process methodsFor: 'RVM' stamp: 'dmu 6/14/2010 15:40'!\rnilMyListUnlessRVM\r\tProcessor areRunningProcessesInSchedulerLists ifFalse: [\r\t\"primitiveSuspend will use myList to remove from list and will nil it out\"\r\t\tmyList := nil.\r\t]! !\r!Process methodsFor: 'RVM' stamp: 'dmu 6/14/2010 15:40'!\rcoreMask\r\t^ coreMask! !\r!Process methodsFor: 'RVM' stamp: 'dmu 6/14/2010 15:40'!\rcoreMask: m\r\tcoreMask := m! !\r!Process methodsFor: '*Sly' stamp: 'dmu 3/25/2010 23:56'!\rcreatorEnsemble\r\"Answer the value of creatorEnsemble\"\r\rcreatorEnsemble isNil ifTrue:[self creatorEnsemble: nil].\r^ creatorEnsemble! !\r!Process methodsFor: '*Sly' stamp: 'dmu 3/25/2010 23:56'!\rcreatorEnsemble: anObject\r\"Set the value of creatorEnsemble\"\r\rcreatorEnsemble _ anObject! !\r!Process methodsFor: 'accessing' stamp: 'dmu 3/8/2010 20:26'!\rerrorHandler\r\"Answer the value of errorHandler\"\r\rerrorHandler isNil ifTrue:[self errorHandler: nil].\r^ errorHandler! !\r!Process methodsFor: 'accessing' stamp: 'dmu 3/8/2010 20:26'!\rerrorHandler: anObject\r\"Set the value of errorHandler\"\r\rerrorHandler _ anObject! !\r!Process methodsFor: 'RVM' stamp: 'dmu 6/14/2010 15:41'!\rhostCore\r\t^ hostCore! !\r!Process methodsFor: 'accessing' stamp: 'dmu 3/8/2010 20:26'!\rhostCore: anObject\r\t\"Set the value of hostCore\"\r\r\thostCore := anObject! !\r!Process methodsFor: 'accessing' stamp: 'ssa 2/17/2009 22:34'!\risActiveProcess\r\r\t^ suspendedContext isNil and:[myList notNil]! !\r!Process methodsFor: 'accessing' stamp: 'dmu 3/8/2010 20:26'!\rmyList\r\"Answer the value of myList\"\r\rmyList isNil ifTrue:[self myList: nil].\r^ myList! !\r!Process methodsFor: 'accessing' stamp: 'dmu 3/8/2010 20:26'!\rmyList: anObject\r\"Set the value of myList\"\r\rmyList _ anObject! !\r!Process methodsFor: 'changing process state' stamp: 'dmu 3/2/2010 17:02'!\rprimitiveSuspend\r\"Primitive. Stop the process that self represents in such a way \rthat it can be restarted at a later time (by sending #resume).\rASSUMES self is the active process.\rEssential. See Object documentation whatIsAPrimitive.\"\r\r\"Debugging code below causes terminated running processes to seem not terminated. -- dmu 3/2/10\"\r\"(myList isNil and: [RVMTester isRVM]) ifTrue:[self halt].\"\r<primitive: 88>\rself primitiveFailed! !\r!Process methodsFor: 'changing process state' stamp: 'dmu 3/24/2010 15:44'!\rresume\r\"Allow the process that the receiver represents to continue. Put  \rthe receiver in line to become the activeProcess. Check for a nil \rsuspendedContext, which indicates a previously terminated Process that \rwould cause a vm crash if the resume attempt were permitted\"\rself children do: [:c| c resume].\rsuspendedContext ifNil: [^ self primitiveFailed].\r^ self primitiveResume! !\r!Process methodsFor: 'changing process state' stamp: 'dmu 4/7/2009 02:41'!\rresumeOn: aCore\rself useOnlyCore: aCore.\rself resume! !\r!Process methodsFor: 'changing process state' stamp: 'dmu 3/24/2010 15:44'!\rsuspend\r\t\"Stop the process that the receiver represents in such a way \r\tthat it can be restarted at a later time (by sending the receiver the \r\tmessage resume). If the receiver represents the activeProcess, suspend it. \r\tOtherwise remove the receiver from the list of waiting processes.\"\r\tself children do: [:c| c suspend].\r\tself isActiveProcess ifTrue: [\r\t\tself nilMyListUnlessRVM.\r\t\tself primitiveSuspend.\r\t] ifFalse: [\r\t\tmyList ifNotNil: [\r\t\t\tmyList remove: self ifAbsent: [].\r\t\t\tmyList _ nil].\r\t]! !\r!Process methodsFor: 'changing process state' stamp: 'dmu 3/24/2010 15:45'!\rterminate \r\t\"Stop the process that the receiver represents forever.  Unwind to execute pending ensure:/ifCurtailed: blocks before terminating.\"\r\r\t| ctxt unwindBlock |\r\tself children do: [:c| c terminate].\r\tself == Processor thisProcess  ifTrue: [\r\t\tctxt := thisContext.\r\t\t[\tctxt := ctxt findNextUnwindContextUpTo: nil.\r\t\t\tctxt isNil\r\t\t] whileFalse: [\r\t\t\tunwindBlock := ctxt tempAt: 1.\r\t\t\tunwindBlock ifNotNil: [\r\t\t\t\tctxt tempAt: 1 put: nil.\r\t\t\t\tthisContext terminateTo: ctxt.\r\t\t\t\tunwindBlock value].\r\t\t].\r\t\tthisContext terminateTo: nil.\r\t\tself nilMyListUnlessRVM.\r\t\tself primitiveSuspend.\r\t] ifFalse: [\r        self suspend.\r\t\tmyList ifNotNil: [\r\t\t\tmyList remove: self ifAbsent: [].\r\t\t\tmyList := nil].\r\t\tsuspendedContext ifNotNil: [\r\t\tctxt := self popTo: suspendedContext bottomContext.\r\t\tctxt == suspendedContext bottomContext ifFalse: [\r\t\t\tself debug: ctxt title: 'Unwind error during termination']].\r\t].\r! !\r!Process methodsFor: 'changing suspended state' stamp: 'dmu 12/2/2008 14:05'!\ractivateReturn: aContext value: value\r\t\"Activate 'aContext return: value', so execution will return to aContext's sender\"\r\tself suspend.\r\t^ suspendedContext := suspendedContext activateReturn: aContext value: value! !\r!Process methodsFor: 'changing suspended state' stamp: 'dmu 12/2/2008 14:01'!\rcomplete: aContext \r\t\"Run self until aContext is popped or an unhandled error is raised.  Return self's new top context, unless an unhandled error was raised then return the signaler context (rather than open a debugger).\"\r\r\t| ctxt pair error |\r\tself suspend.\r\tctxt := suspendedContext.\r\tsuspendedContext := nil.  \"disable this process while running its stack in active process below\"\r\tpair := ctxt runUntilErrorOrReturnFrom: aContext.\r\tsuspendedContext := pair first.\r\terror := pair second.\r\terror ifNotNil: [^ error signalerContext].\r\t^ suspendedContext! !\r!Process methodsFor: 'changing suspended state' stamp: 'dmu 11/25/2008 00:21'!\rpopTo: aContext \r\t\"Pop self down to aContext by remote returning from aContext's callee.  Unwind blocks will be executed on the way.\r\tThis is done by pushing a new context on top which executes 'aContext callee return' then resuming self until aContext is reached.  This way any errors raised in an unwind block will get handled by senders in self and not by senders in the activeProcess.\r\tIf an unwind block raises an error that is not handled then the popping stops at the error and the signalling context is returned, othewise aContext is returned.\"\r\r\t| callee |\r\t(Processor isActive: self)\r\t\tifTrue: [^ self error: 'An active process cannot pop contexts'].\r\tcallee := (self calleeOf: aContext) ifNil: [^ aContext].  \"aContext is on top\"\r\t^ self return: callee value: callee receiver! !\r!Process methodsFor: 'changing suspended state' stamp: 'dmu 12/2/2008 14:04'!\rreturn: aContext value: value\r\"Pop thread down to aContext's sender.  Execute any unwind blocks on the way.  See #popTo: comment and #runUntilErrorOrReturnFrom: for more details.\"\r    self suspend.\rsuspendedContext == aContext ifTrue: [\r\t^ suspendedContext _ aContext return: value from: aContext].\rself activateReturn: aContext value: value.\r^ self complete: aContext.\r! !\r!Process methodsFor: 'changing suspended state' stamp: 'dmu 12/2/2008 14:03'!\rstep\r     self suspend.\r^ suspendedContext _ suspendedContext step! !\r!Process methodsFor: 'changing suspended state' stamp: 'dmu 12/2/2008 14:04'!\rstepToCallee\r\"Step until top context changes\"\r\r| ctxt |\rself suspend.\rctxt _ suspendedContext.\r[ctxt == suspendedContext] whileTrue: [\r\tsuspendedContext _ suspendedContext step].\r^ suspendedContext! !\r!Process methodsFor: 'changing suspended state' stamp: 'dmu 12/2/2008 14:05'!\rstepToSendOrReturn\rself suspend.\r^ suspendedContext _ suspendedContext stepToSendOrReturn! !\r!Process methodsFor: 'core assignment' stamp: 'ssa 2/26/2009 02:57'!\ravoidCore: anIndex\r\"Force this process to avoid this core (0-55)\"\rself coreMask: (self coreMask bitClear: (1 bitShift: anIndex))! !\r!Process methodsFor: 'core assignment' stamp: 'ssa 2/26/2009 03:49'!\ravoidCores: aCollectionOfIndicies\r\"Force this process to avoid these cores (0-55)\"\r| mask |\rmask _ 0.\raCollectionOfIndicies do:[:index| mask _ mask bitOr: (1 bitShift: index)].\rself coreMask: (self coreMask bitClear:mask)! !\r!Process methodsFor: 'core assignment' stamp: 'ssa 2/26/2009 02:59'!\ruseAdditionalCore: anIndex\r\"Force this process to only urn on this core (0-55)\"\rself coreMask: (self coreMask bitOr:(1 bitShift: anIndex))! !\r!Process methodsFor: 'core assignment' stamp: 'ssa 2/26/2009 03:50'!\ruseAdditionalCores: aCollectionOfIndicies\r\"Allow this process to run on these additional cores (0-55)\"\r| mask |\rmask _ 0.\raCollectionOfIndicies do:[:index| mask _ mask bitOr: (1 bitShift: index)].\rself coreMask: (self coreMask bitOr:mask)! !\r!Process methodsFor: 'core assignment' stamp: 'dmu 5/5/2009 01:32'!\ruseOnlyCore: anIndex\r\"Force this process to only run on this core (0-55)\"\rself coreMask: (1 bitShift: anIndex)! !\r!Process methodsFor: 'core assignment' stamp: 'ssa 2/26/2009 03:02'!\ruseOnlyCores: aCollectionOfIndicies\r\"Force this process to only run on these cores (0-55)\"\r| mask |\rmask _ 0.\raCollectionOfIndicies do:[:index| mask _ mask bitOr: (1 bitShift: index)].\rself coreMask: mask! !\r!Process methodsFor: 'core assignment' stamp: 'dmu 1/25/2010 11:06'!\ruseOnlyMainCore\rRVMTester isRVM ifTrue: [self useOnlyCore: (RVMMonitor getSample; mainRank)]! !\r!Process methodsFor: 'debugging' stamp: 'dmu 9/17/2010 12:03'!\rdebug: context title: title full: bool\r\t\"Open debugger on self with context shown on top\"\r\r\t| topCtxt |\r\ttopCtxt := self == Processor thisProcess ifTrue: [thisContext] \r\t\tifFalse: [\r\t\t\tself suspend.\r\t\t\tself suspendedContextWaitingIfNecessary].\r\t\t(topCtxt hasContext: context) ifFalse: [^ self error: 'context not in process'].\rTranscript cr; show: 'Suspending siblings & progeny'.\rself class semaForSupensions critical:[ self siblings size print.\r\tself siblingsAndTheirDescendantsDo: [:proc|\r\t\tproc == Processor thisProcess ifFalse: [Transcript cr;show:'suspending proc ',proc identityHash printString.\r\t\t\tproc suspend]].\r\t].\r\tTranscript cr; show: 'launching debugger'.\rDebugger openOn: self context: context label: title contents: nil fullView: bool.\r! !\r!Process methodsFor: 'debugging' stamp: 'dmu 9/17/2010 12:03'!\rdebugWithTitle: title\r\"Open debugger on self\"\r\r| context |\rcontext _ self == Processor thisProcess ifTrue: [thisContext] ifFalse: [ self suspend.  self suspendedContextWaitingIfNecessary].\rself debug: context title: title full: true.\r! !\r!Process methodsFor: 'printing' stamp: 'ssa 1/1/1970 00:21'!\rlongPrintOn: stream\r\r| ctxt |\rstream nextPutAll: (RVMTester printPrefixFor: self).\rsuper printOn: stream.\rstream cr.\rctxt _ self suspendedContext.\r[ctxt == nil] whileFalse: [\r\tstream space.\r\tctxt printOn: stream.\r\tstream cr.\r\tctxt _ ctxt sender.\r].\r! !\r!Process methodsFor: 'signaling' stamp: 'ssa 2/17/2009 22:31'!\rpvtSignal: anException list: aList\r\"Private. This method is used to signal an exception from another\rprocess...the receiver must be the active process.  If the receiver \rwas previously waiting on a Semaphore, then return the process\rto the waiting state after signaling the exception and if the Semaphore\rhas not been signaled in the interim\"\r\r\"Since this method is not called in a normal way, we need to take care\rthat it doesn't directly return to the caller (because I believe that could\rhave the potential to push an unwanted object on the caller's stack).\"\r\r\t| blocker |\r\tself == Processor thisProcess ifFalse: [^self].\r\tself suspend.\r\tanException signal.\r\tblocker := Semaphore new.\r\t[self suspend.\r\tsuspendedContext := suspendedContext swapSender: nil.\r\taList class == Semaphore \r\t\tifTrue:\r\t\t\t[aList isSignaled\r\t\t\t\tifTrue: \r\t\t\t\t\t[aList wait.  \"Consume the signal that would have restarted the receiver\"\r\t\t\t\t\tself resume]\r\t\t\t\tifFalse:\r\t\t\t\t\t[\"Add us back to the Semaphore's list (and remain blocked)\"\r\t\t\t\t\tmyList := aList.\r\t\t\t\t\taList add: self]]\r\t\tifFalse: [self resume]] fork.\r\tblocker wait.\r\r\r! !\r!Process methodsFor: 'signaling' stamp: 'ssa 2/17/2009 22:30'!\rsignal: anException\r\"Signal an exception in the receiver process...if the receiver is currently\rsuspended, the exception will get signaled when the receiver is resumed.  If \rthe receiver is blocked on a Semaphore, it will be immediately re-awakened\rand the exception will be signaled; if the exception is resumed, then the receiver\rwill return to a blocked state unless the blocking Semaphore has excess signals\"\r\r\"If we are the active process, go ahead and signal the exception\"\rself == Processor thisProcess ifTrue: [^anException signal].\r\r    self suspend.\r\r\"Add a new method context to the stack that will signal the exception\"\rsuspendedContext := MethodContext\r\tsender: suspendedContext\r\treceiver: self\r\tmethod: (self class methodDict at: #pvtSignal:list:)\r\targuments: (Array with: anException with: myList).\r\r\"If we are on a list to run, then suspend and restart the receiver \r(this lets the receiver run if it is currently blocked on a semaphore).  If\rwe are not on a list to be run (i.e. this process is suspended), then when the\rprocess is resumed, it will signal the exception\"\r\rmyList ifNotNil: [self suspend; resume].! !\r!Process class methodsFor: 'instance creation' stamp: 'dmu 3/24/2010 15:46'!\rforContext: aContext priority: anInteger \r\"Answer an instance of me that has suspended aContext at priority \ranInteger.\"\r\r| newProcess |\rnewProcess _ self new.\rnewProcess suspendedContext: aContext.\rnewProcess priority: anInteger.\r[newProcess coreMask:(1 bitShift: 27)].\r^newProcess! !\r!Process class methodsFor: 'instance creation' stamp: 'ssa 2/26/2009 02:45'!\rforContext: aContext priority: anInteger coreMask: anIntegerMask\r\"Answer an instance of me that has suspended aContext at priority \ranInteger using this coreMask.\"\r\r| newProcess |\rnewProcess _ self forContext: aContext priority: anInteger.\rnewProcess coreMask:anIntegerMask.\r^newProcess! !\r!Process class methodsFor: 'accessing' stamp: 'ssa 3/25/2010 15:11'!\rsemaForSupensions\r\rSemaForSupensions isNil ifTrue:[SemaForSupensions _ Semaphore forMutualExclusion].\r^SemaForSupensions! !\r!ProcessBrowser methodsFor: 'stack list' stamp: 'dmu 11/25/2008 00:22'!\rupdateStackList: depth \r\t| suspendedContext oldHighlight |\r\tselectedProcess\r\t\tifNil: [^ self changeStackListTo: nil].\r\t(stackList notNil and: [ stackListIndex > 0 ])\r\t\tifTrue: [oldHighlight := stackList at: stackListIndex].\r\t(Processor isActive: selectedProcess)\r\t\tifTrue: [self\r\t\t\tchangeStackListTo: (thisContext stackOfSize: depth)]\r\t\tifFalse: [suspendedContext := selectedProcess suspendedContext.\r\t\t\tsuspendedContext\r\t\t\t\tifNil: [self changeStackListTo: nil]\r\t\t\t\tifNotNil: [self\r\t\t\t\t\tchangeStackListTo: (suspendedContext stackOfSize: depth)]].\r\tself\r\t\tstackListIndex: (stackList\r\t\t\tifNil: [0]\r\t\t\tifNotNil: [stackList indexOf: oldHighlight])! !\r!ProcessBrowser class methodsFor: 'process control' stamp: 'ssa 6/11/2010 14:35'!\rnameAndRulesFor: aProcess \r\"Answer a nickname and two flags: allow-stop, and allow-debug\"\r^ [aProcess caseOf: {\r\t[ProcessorScheduler emergencyProcess] -> [{'emergency evaluator ShftCtrl-A'. false. true}].\r\t[] -> [{'no process'. false. false}].\r\t[Smalltalk lowSpaceWatcherProcess] -> [{'the low space watcher'. false. false}].\r\t[WeakArray runningFinalizationProcess] -> [{'the WeakArray finalization process'. false. false}].\r\t[Processor thisProcess] -> [{'the UI process'. false. true}].\r\t[Processor backgroundProcess] -> [{'the idle process'. false. false}].\r\t[Sensor interruptWatcherProcess] -> [{'the user interrupt watcher'. false. false}].\r\t[Sensor eventTicklerProcess] -> [{'the event tickler'. false. false}].\r\t[Project uiProcess] -> [{'the inactive Morphic UI process'. false. false}].\r\t[Smalltalk\r\t\tat: #SoundPlayer\r\t\tifPresent: [:sp | sp playerProcess]] -> [{'the Sound Player'. false. false}].\r\t[ScheduledControllers\r\t\tifNotNil: [ScheduledControllers activeControllerProcess]] -> [{'the inactive MVC controller process'. false. true}].\r\t[Smalltalk\r\t\tat: #CPUWatcher\r\t\tifPresent: [:cw | cw currentWatcherProcess]] -> [{'the CPUWatcher'. false. false}]}\r\t otherwise: \r\t\t[(aProcess priority = Processor timingPriority\r\t\t\t\tand: [aProcess suspendedContext receiver == Delay])\r\t\t\tifTrue: [{'the timer interrupt watcher'. false. false}]\r\t\t\tifFalse: [{aProcess suspendedContext asString. true. true}]]]\r\tifError: [:err :rcvr | {aProcess suspendedContext asString. true. true}]! !\r!ProcessorScheduler methodsFor: 'accessing' stamp: 'dmu 11/25/2008 00:23'!\ractivePriority\r\"Answer the priority level of the currently running Process.\"\r\r^self thisProcess priority! !\r!ProcessorScheduler methodsFor: 'removing' stamp: 'ssa 6/11/2010 14:37'!\rremoveAllPossible\r\"Terminate and remove all processes that you can.\rThis should leave the standard set only\"\rself terminatableProcesses print do:[:proc| proc terminate]! !\r!ProcessorScheduler methodsFor: 'removing' stamp: 'ssa 6/11/2010 14:31'!\rterminatableProcesses\r\"Answer all current processes that may be user terminated like in the ProcessBrowser\"\r\"self terminatableProcesses\"\r| processList |\rSmalltalk garbageCollectMost. \"lose defunct processes\"\r\rprocessList _ Process allSubInstances\r\t\t\treject: [:each | each isTerminated].\rprocessList _ processList\r\t\t\tsortBy: [:a :b | a priority >= b priority].\rprocessList _ WeakArray withAll: processList.\r^processList select:[:proc| (ProcessBrowser nameAndRulesFor: proc) at: 2]! !\r!ProcessorScheduler methodsFor: 'process state change' stamp: 'dmu 11/25/2008 00:23'!\rterminateActive\r\"Terminate the process that is currently running.\"\r\rself thisProcess terminate! !\r!ProcessorScheduler methodsFor: 'RVM' stamp: 'dmu 4/10/2009 22:48'!\rareRunningProcessesInSchedulerLists\r\t\"Our RVM follows Pallas' MS system and keeps runnable processes in the scheduler lists even when running.\"\r\t^RVMTester isRVM! !\r!ProcessorScheduler methodsFor: 'RVM' stamp: 'dmu 11/25/2008 00:26'!\risActive: aProcess\r^ aProcess suspendedContext ==  nil! !\r!ProcessorScheduler methodsFor: 'RVM' stamp: 'dmu 12/7/2008 20:43'!\rthisProcess\r\t<primitive: 'primitiveThisProcess' > \"must not specify module in order to hit obsolete_named_primitive_table and thus be local\"\r\t^ self activeProcess! !\r!ProcessorScheduler methodsFor: 'RVM' stamp: 'dmu 3/22/2010 13:03'!\ryieldIfFewerCoresThan: n\r\tRVMTester coreCount < n    ifTrue: [self yield]! !\r!ProcessorScheduler class methodsFor: '*RVM' stamp: 'ssa 6/11/2010 14:34'!\remergencyProcess\r^ EmergencyProcess! !\r!ProcessorScheduler class methodsFor: '*RVM' stamp: 'dmu 6/2/2010 23:17'!\rstartEmergencyProcess\r\"Bring up an emergency evaluator if the user hits control-shift-a\"\r\"self startEmergencyProcess\"\r\"self startEmergencyProcess. RVMTester getEmergencySemaphore signal\"\r| sema |\rsema _ Semaphore new.\rRVMTester setEmergencySemaphore: sema.\rEmergencyProcess ifNotNil: [EmergencyProcess terminate].\r^ EmergencyProcess _ [[sema wait. Transcripter emergencyEvaluator] repeat] forkAt: Processor userInterruptPriority! !\r!ProcessorScheduler class methodsFor: 'background process' stamp: 'dmu 6/2/2010 23:20'!\rstartUp\r\"Install a background process of the lowest possible priority that is always runnable.\"\r\"Details: The virtual machine requires that there is aways some runnable process that can be scheduled; this background process ensures that this is the case.\"\r\rSmalltalk installLowSpaceWatcher.\rBackgroundProcess == nil ifFalse: [BackgroundProcess terminate].\rBackgroundProcess _ [self idleProcess] newProcess.\r[BackgroundProcess useOnlyCore: (RVMMonitor getSample; mainRank).].\rBackgroundProcess priority: SystemRockBottomPriority.\rBackgroundProcess resume.\rself startEmergencyProcess\r! !\r!Project methodsFor: 'initialization' stamp: 'ssa 1/22/2010 14:06'!\rbackgroundColorForMvcProject\r^ Color r: 1.0 g: 1.0 b: 0.65! !\r!Project methodsFor: 'menu messages' stamp: 'dmu 11/25/2008 00:23'!\renterForEmergencyRecovery\r\"This version of enter invokes an absolute minimum of mechanism.\rAn unrecoverable error has been detected in an isolated project.\rIt is assumed that the old changeSet has already been revoked.\rNo new process gets spawned here.  This will happen in the debugger.\"\r\rself isCurrentProject ifTrue: [^ self].\rCurrentProject saveState.\rCurrentProject _ self.\rDisplay newDepthNoRestore: displayDepth.\rSmalltalk newChanges: changeSet.\rTranscriptStream newTranscript: transcript.\r\r\rworld isMorph\r\tifTrue:\r\t\t[\"Entering a Morphic project\"\r\t\tWorld _ world.\r\t\tworld install.\r\t\tworld triggerOpeningScripts]\r\tifFalse:\r\t\t[\"Entering an MVC project\"\r\t\tWorld _ nil.\r\t\tSmalltalk at: #ScheduledControllers put: world.\r\t\tScheduledControllers restore].\rUIProcess _ Processor thisProcess.\r! !\r!Project class methodsFor: 'utilities' stamp: 'dmu 11/25/2008 00:24'!\rspawnNewProcessAndTerminateOld: terminate\r\rself spawnNewProcess.\rterminate\r\tifTrue: [Processor terminateActive]\r\tifFalse: [Processor thisProcess suspend]! !\r!RVMSBinarySampleWriter class methodsFor: 'sample writing' stamp: 'ssa 10/26/2008 23:48'!\rwriteSample: aSample on: aStream\r\"RVMSBinarySampleWriter writeSample: RVMMonitor lastSample on: (FileStream newFileNamed:'binary-sample-writer.test')\"\r\"Write the minimum data in aSample to aStream in binary format\"\r| data subData innerCoreStats allSendTallies tallies rcvTallies memoryStats readWriteHeap readMostlyHeap interpStats objTableStats |\rdata _ aSample rawData.\raStream binary;\r\tnextNumber: 8 put:  (data at: 2);  \"runMask\"\r\tnextPut:  ((data at: 4)) ;  \"extraYields\"\r\tnextPut:  ((data at: 6)).  \"extraRemoteContextAllocations\"\r\t\"remember messageNames\"\r\tsubData _ data at: 10. \"groupStats\"\raStream\r\tnextPut:  ((subData at: 2));  \"mainX\"\r\tnextPut:  ((subData at: 4));  \"mainY\"\r\tnextPut:  ((subData at: 6));  \"mainRank\"\r\tnextPut:  ((subData at: 8));  \"width\"\r\tnextPut:  ((subData at: 10));  \"height\"\r\tnextPut:  ((subData at: 12));  \"groupSize\"\r\tnextPut:  ((subData at: 14)).  \"remaining\"\rsubData _ data at: 12. \"allCPUCoreStats\"\rsubData do:[:each|\r\taStream\r\t\tnextInt32Put:  (each at: 2);  \"millisecs\"\r\t\tnextInt32Put:  (each at: 4).  \"cycles\"\r\tinnerCoreStats _ each at: 6.\r\taStream\r\t\tnextPut:  ((innerCoreStats at: 2));  \"x\"\r\t\tnextPut:  ((innerCoreStats at: 4));  \"y\"\r\t\tnextPut:  ((innerCoreStats at: 6)).  \"rank\"\r\tallSendTallies _ innerCoreStats at: 8. \"sendTalliesByCore\"\r\tallSendTallies do:[:sndTally|\r\t\ttallies _ allSendTallies at: 2.\r\t\ttallies do:[:tally|\r\t\taStream\r\t\t\tnextWordPut: tally].  \"a single send tally\"\r\t\t].\r\trcvTallies _ innerCoreStats at: 10.\r\trcvTallies do:[:tally|\r\t\taStream\r\t\t\tnextWordPut: tally].  \"a single recieve tally\"\rmemoryStats _ each at: 8. \"memorySystemStats\"\raStream\r\tnextWordPut: (memoryStats at: 2);  \"gcCount\"\r\tnextInt32Put:  (memoryStats at: 4);  \"gcMilliseconds\"\r\tnextInt32Put:  (memoryStats at: 6).  \"gcCycles\"\rreadWriteHeap _ memoryStats at: 8.  \"readWriteHeapStats\"\raStream\r\tnextInt32Put:  (readWriteHeap at: 2);  \"bytesUsed()\"\r\tnextInt32Put:  (readWriteHeap at: 4);  \"bytesLeft()\"\r\tnextInt32Put:  (readWriteHeap at: 6);  \"allocationsSinceLastQuery\"\r\tnextInt32Put:  (readWriteHeap at: 8).  \"compactionsSinceLastQuery\"\rreadMostlyHeap _ memoryStats at: 10.  \"readMostlyHeapStats\"\raStream\r\tnextInt32Put:  (readMostlyHeap at: 2);  \"bytesUsed()\"\r\tnextInt32Put:  (readMostlyHeap at: 4);  \"bytesLeft()\"\r\tnextInt32Put:  (readMostlyHeap at: 6);  \"allocationsSinceLastQuery\"\r\tnextInt32Put:  (readMostlyHeap at: 8).  \"compactionsSinceLastQuery\"\rinterpStats _ each at: 10. \"interpreterStats\"\raStream\r\tnextInt32Put:  (interpStats at: 2);  \"bytecodesExecuted\"\r\tnextInt32Put:  (interpStats at: 4);  \"yieldCount\"\r\tnextNumber: 6 put:  (interpStats at: 6);  \"cyclesRunning\"\r\tnextNumber: 6 put:  (interpStats at: 8);  \"cyclesWaiting\"\r\tnextInt32Put:  (interpStats at: 10);  \"contextChangeCount\"\r\tnextInt32Put:  (interpStats at: 12);  \"interruptCheckCount\"\r\tnextInt32Put:  (interpStats at: 14);  \"unforcedInterruptCheckCount\"\r\tnextInt32Put:  (interpStats at: 16);  \"numberOfMovedMutatedReadMostlyObjects\"\r\tnextNumber: 6 put:  (interpStats at: 18).  \"cyclesMovingMutatedReadMostlyObjects\"\r].\robjTableStats _ data at: 14.   \"objectTableStats\"\raStream\r\tnextInt32Put:  (objTableStats at: 2);  \"allocatedEntryCount\"\r\tnextInt32Put:  (objTableStats at: 4);  \"entryCount\"\r\tnextInt32Put:  (objTableStats at: 6);  \"allocationsSinceLastQuery\"\r\tnextInt32Put:  (objTableStats at: 8).  \"entriesFreedSinceLastQuery\"\raStream\r\tnextPut:  ((data at: 16));  \"extraRunPrimitives\"\r\tnextPut:  ((data at: 18));  \"extraDoublewordBroadcasts\"\r\tnextPut:  ((data at: 20));  \"extraWordBroadcasts\"\r\tnextPut:  (((data at: 22) ifTrue:[1]ifFalse:[0]));  \"dontPassTheBatonDefault\"\r\tnextPut:  (((data at: 24) ifTrue:[1]ifFalse:[0])).  \"fence\"\r! !\r!RVMSampleReader methodsFor: 'common entries' stamp: 'ssa 11/16/2008 15:12'!\rmessageNames\r\"Normally at index 8 in sample raw data array\"\r^#('noMessage' 'allocateOrRecycleContextMessage' 'allocateOrRecycleContextJustTestingMessage' 'recycleContextIfPossibleMessage' 'flushInterpreterCachesMessage' 'flushMethodCacheMessage' 'flushByMethodMessage' 'flushSelectiveMessage' 'addObjectFromSnapshotMessage' 'addObjectFromSnapshotResponse' 'updateWholeInterpreterMessage' 'updateEnoughInterpreterToTransferControlMessage' 'updateEnoughInterpreterToTransferControlJustTestingMessage' 'updateEnoughInterpreterToTransferControlJustTestingResponse' 'zapUnusedPortionOfHeapMessage' 'zapUnusedPortionOfHeapResponse' 'verifyInterpreterAndHeapMessage' 'doAllRootsThereMessage' 'doAllRootsThereResponse' 'doAllRootsHereMessage' 'hereIsARootResponse' 'newValueForOopMessage' 'noMoreRootsResponse' 'scanCompactOrMakeFreeObjectsMessage' 'scanCompactOrMakeFreeObjectsResponse' 'returnContextMessage' 'runPrimitiveMessage' 'runPrimitiveJustTestingMessage' 'runPrimitiveResponse' 'loadFunctionFromPluginMessage' 'loadFunctionFromPluginResponse' 'broadcastInterpreterDoublewordMessage' 'broadcastInterpreterWordMessage' 'broadcastInterpreterBoolMessage' 'sampleOneCoreMessage' 'sampleOneCoreResponse' 'initiateBarrierMessage' 'respondToBarrierMessage' 'aboutToWriteRead_MostlyMemoryMessage' 'aboutToWriteRead_MostlyMemoryResponse' 'wroteRead_MostlyMemoryMessage' 'flushFreeContextsMessage' 'enforceCoherenceBeforeSenderStoresIntoAllHeapsMessage' 'enforceCoherenceBeforeSenderStoresIntoAllHeapsResponse' 'enforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapMessage' 'enforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapResponse' 'enforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapMessage' 'enforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapResponse' 'preGCActionMessage' 'preGCActionResponse' 'postGCActionMessage' 'postGCActionResponse' 'startAnotherProcessMessage' 'startAnotherProcessResponse' 'initContextMessage' 'initContextResponse' 'requestSafepointMessage' 'requestSafepointResponse' 'relinquishSafepointMessage' 'relinquishSafepointResponse')! !\r!RVMSampleReader methodsFor: 'common entries' stamp: 'ssa 11/16/2008 15:12'!\rversion1messageNames\r\"Normally at index 8 in sample raw data array\"\r^#('allocateOrRecycleContextMessage' 'allocateOrRecycleContextJustTestingMessage' 'recycleContextIfPossibleMessage' 'flushInterpreterCachesMessage' 'flushMethodCacheMessage' 'flushByMethodMessage' 'flushSelectiveMessage' 'addObjectFromSnapshotMessage' 'addObjectFromSnapshotResponse' 'updateWholeInterpreterMessage' 'updateEnoughInterpreterToTransferControlMessage' 'updateEnoughInterpreterToTransferControlJustTestingMessage' 'updateEnoughInterpreterToTransferControlJustTestingResponse' 'zapUnusedPortionOfHeapMessage' 'zapUnusedPortionOfHeapResponse' 'verifyInterpreterAndHeapMessage' 'doAllRootsThereMessage' 'doAllRootsThereResponse' 'doAllRootsHereMessage' 'hereIsARootResponse' 'newValueForOopMessage' 'noMoreRootsResponse' 'scanCompactOrMakeFreeObjectsMessage' 'scanCompactOrMakeFreeObjectsResponse' 'returnContextMessage' 'runPrimitiveMessage' 'runPrimitiveJustTestingMessage' 'runPrimitiveResponse' 'loadFunctionFromPluginMessage' 'loadFunctionFromPluginResponse' 'broadcastInterpreterDoublewordMessage' 'broadcastInterpreterWordMessage' 'broadcastInterpreterBoolMessage' 'sampleOneCoreMessage' 'sampleOneCoreResponse' 'initiateBarrierMessage' 'respondToBarrierMessage' 'aboutToWriteReadMostlyMemoryMessage' 'aboutToWriteReadMostlyMemoryResponse' 'wroteReadMostlyMemoryMessage' 'flushFreeContextsMessage' 'enforceCoherenceBeforeSenderStoresIntoAllHeapsMessage' 'enforceCoherenceBeforeSenderStoresIntoAllHeapsResponse' 'enforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapMessage' 'enforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapResponse' 'enforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapMessage' 'enforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapResponse')! !\r!RVMSampleReader methodsFor: 'reading' stamp: 'ssa 10/26/2008 16:03'!\rnextAllCPUCoreStats\r\r| rawData |\rrawData _ OrderedCollection new.\r56 timesRepeat:[rawData add: self nextCoreStats].\r^rawData asArray! !\r!RVMSampleReader methodsFor: 'reading' stamp: 'ssa 11/16/2008 15:31'!\rnextCoreStats\r\r| rawData |\rrawData _ Array new: 12.\rrawData at:1 put: 'millisecs'.\rrawData at:2 put: self next.\rrawData at:3 put: 'cycles'.\rrawData at:4 put: self next.\rrawData at:5 put: 'coreStats'.\rrawData at:6 put: self nextInnerCoreStats.\rrawData at:7 put: 'memorySystemStats'.\rrawData at:8 put: self nextMemorySystemStats.\rrawData at:9 put: 'interpreterStats'.\rrawData at:10 put: self nextInterpreterStats.\rrawData at:11put: 'objectTableStats'.\rrawData at:12 put: self nextObjectTableStats.\r^rawData! !\r!RVMSampleReader methodsFor: 'reading' stamp: 'ssa 10/26/2008 16:00'!\rnextGroupStats\r\r| rawData |\rrawData _ Array new: 14.\rrawData at:1 put: 'mainX'.\rrawData at:2 put: self next.\rrawData at:3 put: 'mainY'.\rrawData at:4 put: self next.\rrawData at:5 put: 'mainRank'.\rrawData at:6 put: self next.\rrawData at:7 put: 'width'.\rrawData at:8 put: self next.\rrawData at:9 put: 'height'.\rrawData at:10 put: self next.\rrawData at:11 put: 'groupSize'.\rrawData at:12 put: self next.\rrawData at:13 put: 'remaining'.\rrawData at:14 put: self next.\r^rawData! !\r!RVMSampleReader methodsFor: 'reading' stamp: 'ssa 10/26/2008 19:52'!\rnextInnerCoreStats\r\r| rawData |\rrawData _ Array new: 11.\rrawData at:1 put: 'x'.\rrawData at:2 put: self next.\rrawData at:3 put: 'y'.\rrawData at:4 put: self next.\rrawData at:5 put: 'rank'.\rrawData at:6 put: self next.\rrawData at:7 put: 'sendTalliesByCore'.\rrawData at:8 put: self nextSendTalliesByCore.\rrawData at:9 put: 'receiveTallies'.\rrawData at:10 put: self nextReceiveTallies.\rrawData at:11 put: #().\r^rawData! !\r!RVMSampleReader methodsFor: 'reading' stamp: 'ssa 11/16/2008 15:24'!\rnextInterpreterStats\r\r| rawData |\rrawData _ Array new: 18.\rrawData at:1 put: 'bytecodesExecuted'.\rrawData at:2 put: self next.\rrawData at:3 put: 'yieldCount'.\rrawData at:4 put: self next.\rrawData at:5 put: 'cyclesRunning'.\rrawData at:6 put: self next.\rrawData at:7 put: 'cyclesWaiting'.\rrawData at:8 put: self next.\rrawData at:9 put: 'contextChangeCount'.\rrawData at:10 put: self next.\rrawData at:11 put: 'interruptCheckCount'.\rrawData at:12 put: self next.\rrawData at:13 put: 'unforcedInterruptCheckCount'.\rrawData at:14 put: self next.\rrawData at:15 put: 'numberOfMovedMutatedRead_MostlyObjects'.\rrawData at:16 put: self next.\rrawData at:17 put: 'cyclesMovingMutatedRead_MostlyObjects'.\rrawData at:18 put: self next.\r^rawData! !\r!RVMSampleReader methodsFor: 'reading' stamp: 'ssa 10/26/2008 20:10'!\rnextMemorySystemStats\r\r| rawData heap |\rrawData _ Array new: 10.\rrawData at:1 put: 'gcCount'.\rrawData at:2 put: self next.\rrawData at:3 put: 'gcMilliseconds'.\rrawData at:4 put: self next.\rrawData at:5 put: 'gcCycles'.\rrawData at:6 put: self next.\rrawData at:7 put: 'readWriteHeapStats'.\rheap _ Array new:8.\rheap at: 1 put:'bytesUsed()'.\rheap at: 2 put:self next.\rheap at: 3 put:'bytesLeft()'.\rheap at: 4 put:self next.\rheap at: 5 put:'allocationsSinceLastQuery'.\rheap at: 6 put:self next.\rheap at: 7 put:'compactionsSinceLastQuery'.\rheap at: 8 put: self next.\rrawData at:8 put: heap.\rrawData at:9 put: 'readMostlyHeapStats'.\rheap _ Array new:8.\rheap at: 1 put:'bytesUsed()'.\rheap at: 2 put:self next.\rheap at: 3 put:'bytesLeft()'.\rheap at: 4 put:self next.\rheap at: 5 put:'allocationsSinceLastQuery'.\rheap at: 6 put:self next.\rheap at: 7 put:'compactionsSinceLastQuery'.\rheap at: 8 put: self next.\rrawData at:10 put: heap.\r^rawData! !\r!RVMSampleReader methodsFor: 'reading' stamp: 'ssa 11/16/2008 15:25'!\rnextObjectTableStats\r\r| rawData |\rrawData _ Array new: 8.\rrawData at:1 put: 'allocatedEntryCount[rank]'.\rrawData at:2 put: self next.\rrawData at:3 put: 'entryCount[rank]'.\rrawData at:4 put: self next.\rrawData at:5 put: 'allocationsSinceLastQuery[rank]'.\rrawData at:6 put: self next.\rrawData at:7 put: 'entriesFreedSinceLastQuery[rank]'.\rrawData at:8 put: self next.\r^rawData! !\r!RVMSampleReader methodsFor: 'reading' stamp: 'ssa 10/26/2008 20:00'!\rnextReceiveTallies\r\r^ self next asArray! !\r!RVMSampleReader methodsFor: 'reading' stamp: 'ssa 11/16/2008 15:15'!\rnextSample\r\r| rawData |\rrawData _ Array new: 22.\rrawData at:1 put: 'runMask'.\rrawData at:2 put: self next.\rrawData at:3 put: 'extraYields'.\rrawData at:4 put: self next.\rrawData at:5 put: 'extraRemoteContextAllocations'.\rrawData at:6 put: self next.\rrawData at:7 put: 'messageNames'.\rrawData at:8 put: self messageNames.\rself next.  \"consume #messageNames\"\rrawData at:9 put: 'groupStats'.\rrawData at:10 put: self nextGroupStats.\rrawData at:11 put: 'allCPUCoreStats'.\rrawData at:12 put: self nextAllCPUCoreStats.\rrawData at:13 put: 'extraRunPrimitives'.\rrawData at:14 put: self next.\rrawData at:15 put: 'extraDoublewordBroadcasts'.\rrawData at:16 put: self next.\rrawData at:17 put: 'extraWordBroadcasts'.\rrawData at:18 put: self next.\rrawData at:19 put: 'dontPassTheBatonDefault'.\rrawData at:20 put: self next.\rrawData at:21 put: 'fence'.\rrawData at:22 put: self next.\r^rawData! !\r!RVMSampleReader methodsFor: 'reading' stamp: 'ssa 10/26/2008 19:58'!\rnextSendTalliesByCore\r\r| rawData |\rrawData _ Array new: 112.\r1 to: 111 by: 2 do:[:index|\r\trawData at: index put: 'sendTallies'.\r\trawData at: index + 1 put: self next asArray].\r^rawData ! !\r!RVMSampleReader class methodsFor: 'instance creation' stamp: 'ssa 10/26/2008 15:51'!\rdearchive: aString \r\"RVMSampleReader dearchive: 'sample-writer.test' \"\r| aStream anObject  |\raStream _ self on: (self fastStreamOn: aString).\ranObject _ aStream nextSample.\raStream close.\r^anObject! !\r!RVMSampleReader class methodsFor: 'instance creation' stamp: 'ssa 10/26/2008 20:24'!\rdearchiveRawData: aString \r\"RVMSampleReader dearchiveRawData: 'sample-writer.test' \"\r| aStream anObject  |\raStream _ self on: (self fastStreamOn: aString).\ranObject _ aStream nextSample.\raStream close.\r^anObject! !\r!RVMSampleReader class methodsFor: 'instance creation' stamp: 'ssa 10/28/2008 19:27'!\rdearchiveRawDataFrom: aStream\r\"| rw |\rrw _ ReadWriteStream on:''.\rRVMSampleWriter archiveRawData: (RVMMonitor samples first) on: rw.\rRVMSampleReader dearchiveRawDataFrom: rw reset \"\r|  anObject  aReader |\raReader _ self on: aStream.\ranObject _ aReader nextSample.\r^anObject! !\r!RVMSampleReader class methodsFor: 'instance creation' stamp: 'ssa 10/26/2008 20:27'!\rdearchiveSample: aString \r\"RVMSampleReader dearchiveSample: 'sample-writer.test' \"\r| aStream anObject  |\raStream _ self on: (self fastStreamOn: aString).\ranObject _ aStream nextSample.\raStream close.\r^RVMMulticoreSample newFrom:anObject! !\r!RVMSampleReader class methodsFor: 'instance creation' stamp: 'ssa 10/28/2008 19:28'!\rdearchiveSampleFrom: aStream\r\"| rw |\rrw _ ReadWriteStream on:''.\rRVMSampleWriter archiveSample: RVMMonitor lastSample on: rw.\rRVMSampleReader dearchiveSampleFrom: rw reset \"\r|  anObject  aReader |\raReader _ self on: aStream.\ranObject _ aReader nextSample.\r^RVMMulticoreSample newFrom:anObject! !\r!RVMSampleWriter methodsFor: 'accessing' stamp: 'ssa 10/26/2008 15:04'!\rrawData\r\"Answer the value of rawData\"\r\r^ rawData! !\r!RVMSampleWriter methodsFor: 'accessing' stamp: 'ssa 10/26/2008 15:04'!\rrawData: anObject\r\"Set the value of rawData\"\r\rrawData _ anObject! !\r!RVMSampleWriter methodsFor: 'archiving' stamp: 'ssa 11/16/2008 15:42'!\rarchiveAllCPUCoreStats: data\r\"Archive the rawData I have from the sample, minimizing space\"\r|  datum |\rdata do:[:batch|\r2 to: batch size by: 2 do:[:index|\rdatum _ batch at: index.\rindex = 6 ifTrue:[self archiveCoreStats: datum]\r\tifFalse:[index = 8 ifTrue:[self archiveMemorySystemStats: datum]\r\t\tifFalse:[(#(10 12) includes:index) ifTrue:[self archiveNameValuePairArray: datum]\r\t\t\tifFalse:[self nextPut:datum]]]]].\r! !\r!RVMSampleWriter methodsFor: 'archiving' stamp: 'ssa 10/26/2008 15:18'!\rarchiveCoreStats: data\r\"Archive the rawData I have from the sample, minimizing space\"\r|  datum |\r2 to: data size by: 2 do:[:index|\rdatum _ data at: index.\rindex = 8 ifTrue:[self archiveSendTalliesByCore: datum]\r\tifFalse:[index = 10 ifTrue:[self archiveRecieveTallies: datum]\r\t\tifFalse:[self nextPut:datum]]].\r! !\r!RVMSampleWriter methodsFor: 'archiving' stamp: 'ssa 10/26/2008 15:25'!\rarchiveMemorySystemStats: data\r\"Archive the rawData I have from the sample, minimizing space\"\r|  datum |\r2 to: data size by: 2 do:[:index|\rdatum _ data at: index.\rindex = 8 ifTrue:[self archiveNameValuePairArray: datum]\r\tifFalse:[index = 10 ifTrue:[self archiveNameValuePairArray: datum]\r\t\tifFalse:[self nextPut:datum]]].\r! !\r!RVMSampleWriter methodsFor: 'archiving' stamp: 'ssa 10/26/2008 15:25'!\rarchiveNameValuePairArray: data\r\"Archive the rawData I have from the sample, minimizing space\"\r|  datum |\r2 to: data size by: 2 do:[:index|\rdatum _ data at: index.\rself nextPut: datum].\r! !\r!RVMSampleWriter methodsFor: 'archiving' stamp: 'ssa 10/26/2008 15:20'!\rarchiveRecieveTallies: data\r\"Archive the rawData I have from the sample, minimizing space\"\rself nextPut: data asRunArray\r! !\r!RVMSampleWriter methodsFor: 'archiving' stamp: 'ssa 11/16/2008 15:31'!\rarchiveSampleData\r\"Archive the rawData I have from the sample, minimizing space\"\r| data datum |\rdata _ self rawData.\r2 to: data size by: 2 do:[:index|\rdatum _ data at: index.\rindex = 8 ifTrue:[self nextPut: #messageNames]\r\tifFalse:[index = 12 ifTrue:[self archiveAllCPUCoreStats: datum]\r\t\tifFalse:[(index = 10) ifTrue:[self archiveNameValuePairArray: datum]\r\t\tifFalse:[self nextPut:datum]]]].\r! !\r!RVMSampleWriter methodsFor: 'archiving' stamp: 'ssa 10/26/2008 15:19'!\rarchiveSendTalliesByCore: data\r\"Archive the rawData I have from the sample, minimizing space\"\r|  datum |\r2 to: data size by: 2 do:[:index|\rdatum _ data at: index.\rself nextPut: datum asRunArray].\r! !\r!RVMSampleWriter methodsFor: 'private' stamp: 'ssa 7/7/2010 13:13'!\rsetStream: aWriteStream\r\"Since I only store arrays of numbers, use plain Dictionarys\"\rstream _ aWriteStream.\rclassMap _ Dictionary new: 30.\rclassMap at: self put: 1.\robjectMap _ Dictionary new: 400.\rposition _ 0  ! !\r!RVMSampleWriter class methodsFor: 'instance creation' stamp: 'ssa 10/26/2008 20:23'!\rarchive: rawData to: aString \r\"use the other specific versions of me\"\rself shouldNotImplement! !\r!RVMSampleWriter class methodsFor: 'instance creation' stamp: 'ssa 10/28/2008 19:26'!\rarchiveRawData: rawData on: aStream\r\"RVMSampleWriter archiveRawData: (RVMMonitor samples first) on: (ReadWriteStream on:'')\"\r\"rawData is expected to be the array of sample data obtained from the RVMMulticoreSample primitiveCapture primitive.\"\r\r| writer |\rwriter _ self on: aStream.\rwriter rawData: rawData.\rwriter archiveSampleData.\r^aStream! !\r!RVMSampleWriter class methodsFor: 'instance creation' stamp: 'ssa 10/26/2008 20:22'!\rarchiveRawData: rawData to: aString \r\"RVMSampleWriter archiveRawData: (RVMMonitor samples first) to: 'sample-writer.test'\"\r\"rawData is expected to be the array of sample data obtained from the RVMMulticoreSample primitiveCapture primitive.\"\r\r| stream writer |\r stream _ self fastStreamOn:  aString.\rwriter _ self on: stream.\rwriter rawData: rawData.\rwriter archiveSampleData.\rwriter close.! !\r!RVMSampleWriter class methodsFor: 'instance creation' stamp: 'ssa 10/28/2008 19:26'!\rarchiveSample: aMulticoreSample on: aStream\r\"RVMSampleWriter archiveRawData: (RVMMonitor samples first)  on: (ReadWriteStream on:'')\"\r\"rawData is expected to be the array of sample data obtained from the RVMMulticoreSample primitiveCapture primitive.\"\r\r| writer |\rwriter _ self on: aStream.\rwriter rawData: aMulticoreSample rawData.\rwriter archiveSampleData.\r^aStream! !\r!RVMSampleWriter class methodsFor: 'instance creation' stamp: 'ssa 10/26/2008 20:23'!\rarchiveSample: aMulticoreSample to: aString \r\"RVMSampleWriter archiveRawData: (RVMMonitor samples first) to: 'sample-writer.test'\"\r\"rawData is expected to be the array of sample data obtained from the RVMMulticoreSample primitiveCapture primitive.\"\r\r| stream writer |\r stream _ self fastStreamOn:  aString.\rwriter _ self on: stream.\rwriter rawData: aMulticoreSample rawData.\rwriter archiveSampleData.\rwriter close.! !\r!Rectangle methodsFor: 'accessing' stamp: ''!\rbottomLeft: aPoint\r\"Set the position of the bottomLeft corner of the receiver.\"\r\"KSC Extension\"\r\rorigin _ aPoint x @ self top.\rcorner _ self right @ aPoint y! !\r!Rectangle methodsFor: 'accessing' stamp: ''!\rbottomRight: bottomRightPoint \r\"Set the position of the right corner of the bottom horizontal line of the receiver.\"\r\rcorner _ bottomRightPoint! !\r!Rectangle methodsFor: 'accessing' stamp: 'ssa 8/22/2009 18:02'!\rcorner: aPoint\r\"Set the point at the bottom right corner of the receiver.\"\r\rcorner _ aPoint! !\r!Rectangle methodsFor: 'accessing' stamp: 'ssa 8/23/2009 14:39'!\rextent: aPoint\r\rcorner _ origin + aPoint! !\r!Rectangle methodsFor: 'accessing' stamp: 'ssa 8/22/2009 16:32'!\rheight: heightInteger \r\"Change the receiver's bottom y to make its height \rthe argument heightInteger.\"\r\rcorner y: origin y + heightInteger! !\r!Rectangle methodsFor: 'accessing' stamp: 'ssa 9/2/2009 17:10'!\rorigin: aPoint\r\"Set the point at the top left corner of the receiver.\"\r\rorigin _ aPoint! !\r!Rectangle methodsFor: 'accessing' stamp: ''!\rtopLeft: topLeftPoint \r\"Set the point at the top left corner of the receiver's top horizontal line.\"\r\rorigin _ topLeftPoint! !\r!Rectangle methodsFor: 'accessing' stamp: 'ssa 8/25/2009 14:40'!\rtopRight: aPoint\r\"Set the position of the top right corner of the receiver.\"\rorigin _ self left @ aPoint y.\rcorner _ aPoint x @ self bottom! !\r!Rectangle methodsFor: 'accessing' stamp: 'ssa 8/31/2009 16:30'!\rwidth: widthInteger \r\"Change the receiver's right x to make its width \rthe argument widthInteger.\"\r\rcorner x: origin x + widthInteger! !\r!Rectangle methodsFor: 'rectangle functions' stamp: 'ssa 11/16/2008 02:34'!\rasRandomPoint\r\"ssa - Answer a random point that lies within my borders\"\r^self origin + self extent atRandom ! !\r!Rectangle methodsFor: 'rectangle functions' stamp: 'ssa 8/24/2009 09:39'!\rintersect: aRectangle \r\"Answer a Rectangle that is the area in which the receiver overlaps with \raRectangle. Optimized for speed; old code read:\r\t^Rectangle \r\t\torigin: (origin max: aRectangle origin)\r\t\tcorner: (corner min: aRectangle corner)\r\"\r| aPoint left right top bottom |\raPoint _ aRectangle origin copy.\raPoint x > origin x ifTrue:[left _ aPoint x] ifFalse:[left _ origin x].\raPoint y > origin y ifTrue:[top _ aPoint y] ifFalse:[top _ origin y].\raPoint _ aRectangle corner copy.\raPoint x < corner x ifTrue:[right _ aPoint x] ifFalse:[right _ corner x].\raPoint y < corner y ifTrue:[bottom _ aPoint y] ifFalse:[bottom _ corner y].\r^Rectangle\r\torigin: (left@top)\r\tcorner: (right@bottom)\r! !\r!Rectangle methodsFor: 'rectangle functions' stamp: 'ssa 8/23/2009 17:07'!\rselfMerge: aRectangle \r\"Alter the receiver so that it contains both self and the argument aRectangle.  \rThis is much faster than a merge: but must be used wisely since it modifies both\rthe receiver and the points which make up its origin and corner.\"\r\"KSC Extension\"\r\r| hisOrigin hisCorner hisOriginX hisOriginY hisCornerX hisCornerY |\rhisOrigin _ aRectangle origin.\rhisCorner _ aRectangle corner.\rhisOriginX _ hisOrigin x. hisOriginY _ hisOrigin y.\rhisCornerX _ hisCorner x. hisCornerY _ hisCorner y.\rorigin x > hisOriginX ifTrue: [origin x: hisOriginX].\rorigin y > hisOriginY ifTrue: [origin y: hisOriginY].\rcorner x < hisCornerX ifTrue: [corner x: hisCornerX].\rcorner y < hisCornerY ifTrue: [corner y: hisCornerY].! !\r!Rectangle methodsFor: 'rectangle functions' stamp: 'ssa 8/15/2008 11:39'!\rsubDivideBy: aPoint\r\"Answer a collection of rectangles which divide the receiver evenly into aPoint x columns and aPoint y rows.  Answer the new rectangles left to right then down.  Yes, this method could be much shorter, but I tried to minimize duplications of arithmetic for efficiency.\"\r\"(0@0 corner: 100@100) subDivideBy: 4@2\"\r\r| rows columns eachWidth eachHeight subRegions rowTop baseIndex myLeft rowBottom columnLeft columnRight |\rcolumns _ aPoint x.\rrows _ aPoint y.\reachWidth _ self width / columns.\reachHeight _ self height / rows.\rsubRegions _ Array new: columns * rows.\rrowTop _ self top.\rbaseIndex _ 0.\rmyLeft _ self left.\r1 to: rows do: [:rowNumber |\r\trowBottom _ rowTop + eachHeight.\r\tcolumnLeft _ myLeft.\r\tcolumnRight _ columnLeft + eachWidth.\r\t1 to: columns do: [:columnNumber |\r\t\tsubRegions \r\t\t\tat: baseIndex + columnNumber\r\t\t\tput: (self species origin: columnLeft @ rowTop corner: columnRight @ rowBottom).\r\t\tcolumnLeft _ columnRight.\r\t\tcolumnRight _ columnRight + eachWidth].\r\trowTop _ rowBottom.\r\trowBottom _ rowBottom + eachHeight.\r\tbaseIndex _ baseIndex + columns].\r^subRegions\r! !\r!Rectangle methodsFor: 'rectangle functions' stamp: 'ssa 8/15/2008 12:24'!\rsubDivideRoundedBy: aPoint\r\"ssa - round the orign and extent points\"\r\"Answer a collection of rectangles which divide the receiver evenly into aPoint x columns and aPoint y rows.  Answer the new rectangles left to right then down.  Yes, this method could be much shorter, but I tried to minimize duplications of arithmetic for efficiency.\"\r\"(0@0 corner: 100@100) subDivideBy: 4@2\"\r\r| rows columns eachWidth eachHeight subRegions rowTop baseIndex myLeft rowBottom columnLeft columnRight |\rcolumns _ aPoint x.\rrows _ aPoint y.\reachWidth _ self width / columns.\reachHeight _ self height / rows.\rsubRegions _ Array new: columns * rows.\rrowTop _ self top.\rbaseIndex _ 0.\rmyLeft _ self left.\r1 to: rows do: [:rowNumber |\r\trowBottom _ rowTop + eachHeight.\r\tcolumnLeft _ myLeft.\r\tcolumnRight _ columnLeft + eachWidth.\r\t1 to: columns do: [:columnNumber |\r\t\tsubRegions \r\t\t\tat: baseIndex + columnNumber\r\t\t\tput: (self species origin: columnLeft @ rowTop corner: columnRight @ rowBottom) rounded.\r\t\tcolumnLeft _ columnRight.\r\t\tcolumnRight _ columnRight + eachWidth].\r\trowTop _ rowBottom.\r\trowBottom _ rowBottom + eachHeight.\r\tbaseIndex _ baseIndex + columns].\r^subRegions\r! !\r!Rectangle methodsFor: 'transforming' stamp: 'ssa 8/25/2009 14:24'!\rfastMoveBy: aPoint \r\"Change the corner positions of the receiver so that its area translates by\rthe amount defined by the argument, aPoint.  \rThis is much faster than a merge: but must be used wisely since it modifies both\rthe receiver and the points which make up its origin and corner.\"\r\rorigin moveBy: aPoint.\rcorner moveBy: aPoint! !\r!Rectangle methodsFor: 'transforming' stamp: 'ssa 8/25/2009 14:09'!\rmoveBy: aPoint \r\"Change the corner positions of the receiver so that its area translates by\rthe amount defined by the argument, aPoint.\"\r\rorigin _ origin + aPoint.\rcorner _ corner + aPoint! !\r!Rectangle methodsFor: 'transforming' stamp: 'ssa 8/25/2009 14:09'!\rmoveTo: aPoint \r\"Change the corners of the receiver so that its top left position is aPoint.\"\r\rcorner _ corner + aPoint - origin.\rorigin _ aPoint! !\r!Rectangle methodsFor: 'transforming' stamp: 'ssa 10/8/2008 17:52'!\rnewRectButtonPressedDo: newRectBlock \r\"Track the outline of a new rectangle until mouse button \rchanges. newFrameBlock produces each new rectangle from the \rprevious. Only tracks while mouse is down.\"\r| rect newRect buttonNow delay |\rdelay _ Delay forMilliseconds: 10.\rbuttonNow _ Sensor anyButtonPressed.\rrect _ self.\rDisplay\r\tborder: rect\r\twidth: 2\r\trule: Form reverse\r\tfillColor: Color gray.\r[buttonNow]\r\twhileTrue: [\"delay wait.\"\r\t\tbuttonNow _ Sensor anyButtonPressed.\r\t\tnewRect _ newRectBlock value: rect.\r\t\tnewRect = rect\r\t\t\tifFalse: [Display\r\t\t\t\t\tborder: rect\r\t\t\t\t\twidth: 2\r\t\t\t\t\trule: Form reverse\r\t\t\t\t\tfillColor: Color gray.\r\t\t\t\tDisplay\r\t\t\t\t\tborder: newRect\r\t\t\t\t\twidth: 2\r\t\t\t\t\trule: Form reverse\r\t\t\t\t\tfillColor: Color gray.\r\t\t\t\trect _ newRect]].\rDisplay\r\tborder: rect\r\twidth: 2\r\trule: Form reverse\r\tfillColor: Color gray.\r\" pay the price for reading the sensor directly ; get this party started \"\rSmalltalk isMorphic\r\tifTrue: [].\rSensor processEvent: Sensor createMouseEvent.\r^ rect! !\r!Rectangle methodsFor: 'transforming' stamp: 'ssa 10/8/2008 17:49'!\rnewRectFrom: newRectBlock\r\"Track the outline of a new rectangle until mouse button changes.\rnewFrameBlock produces each new rectangle from the previous\"\r| rect newRect buttonStart buttonNow delay |\rdelay _ Delay forMilliseconds: 10.\rbuttonStart _ buttonNow _ Sensor anyButtonPressed.\rrect _ self.\rDisplay border: rect width: 2 rule: Form reverse fillColor: Color gray.\r[buttonNow == buttonStart] whileTrue: \r\t[\"delay wait.\"\r\tbuttonNow _ Sensor anyButtonPressed.\r\tnewRect _ newRectBlock value: rect.\r\tnewRect = rect ifFalse:\r\t\t[Display border: rect width: 2 rule: Form reverse fillColor: Color gray.\r\t\tDisplay border: newRect width: 2 rule: Form reverse fillColor: Color gray.\r\t\trect _ newRect]].\rDisplay border: rect width: 2 rule: Form reverse fillColor: Color gray.\r\" pay the price for reading the sensor directly ; get this party started \"\r\rSensor processEvent: Sensor createMouseEvent.\r^ rect! !\r!Rectangle methodsFor: 'transforming' stamp: 'ssa 8/27/2008 04:43'!\rscaleByRect: scale \r\"Answer a Rectangle scaled by scale, a rectangle.\"\r\r^Rectangle origin: origin * scale origin corner: corner * scale corner! !\r!Rectangle methodsFor: 'displaying' stamp: 'ssa 10/29/2008 20:57'!\rdisplay\r\r| quad |\rquad _ Quadrangle region: self borderWidth: 1 borderColor: Color black insideColor: nil.\rquad display! !\r!Rectangle methodsFor: 'displaying' stamp: 'ssa 11/4/2008 19:15'!\rdisplayOn: aDisplayMedium withBorderWidths: anArray\r\"Rectangle fromUser displayOn: Display withBorderWidths:#(16 8 4 1)\"\r\"anArray = #(left top right bottom ) integers\"\r\r| quad |\rquad _ Quadrangle region: self borderWidth: ((anArray at:1)@(anArray at:2) corner: (anArray at:3)@(anArray at:4))borderColor: Color black insideColor: nil.\rquad displayOn: aDisplayMedium! !\r!Rectangle methodsFor: 'displaying' stamp: 'ssa 11/4/2008 19:16'!\rdisplayWithBorderWidths: anArray\r\"Rectangle fromUser displayWithBorderWidths:#(16 8 4 1)\"\r\"anArray = #(left top right bottom ) integers\"\r\rself displayOn: Display withBorderWidths: anArray! !\r!Rectangle methodsFor: 'sizing - Louvre' stamp: 'ssa 12/5/2009 08:28'!\rsize\r\r^self extent! !\r!Quadrangle methodsFor: 'bordering' stamp: ''!\rborderWidthLeft: anInteger1 right: anInteger2 top: anInteger3 bottom: anInteger4\r\"Set the border width of the receiver to a Rectangle that represents the \rleft, right, top, and bottom border widths.\"\r\rborderWidth _ anInteger1 @ anInteger3 corner: anInteger2 @ anInteger4! !\r!ScreenController methodsFor: 'fast window closing' stamp: 'ssa 3/10/2010 10:26'!\rcloseAllUnlockedWindows\r\"ScreenController new closeAllUnlockedWindows\"\r\"Close any window that isn't locked.\"\r\r| toClose |\rtoClose _ ScheduledControllers scheduledControllers select: [:c | c preventClosing not].\r(SelectionMenu confirm:'Do you really want to close all unlocked windows?')\r\tifFalse: [^ self].\rtoClose do: [:c | c closeAndUnscheduleIfOkWithModelNoTerminate].\rself restoreDisplay.\r! !\r!ScreenController methodsFor: 'fast window closing' stamp: 'ssa 3/9/2010 15:26'!\rcloseTopWindow\r\r| closeable |\rcloseable _ ScheduledControllers scheduledControllers detect:[:controller| controller preventClosing not] ifNone:[^self].\rcloseable view flash.\rsensor commandKeyPressed ifTrue:[closeable closeAndUnscheduleIfOkWithModel]! !\r!ScreenController methodsFor: 'fast window closing' stamp: 'ssa 3/9/2010 15:27'!\rpreventClosing\r^true! !\r!ScreenController methodsFor: 'control defaults' stamp: 'ssa 3/3/2010 14:37'!\rcontrolActivity\r\"Any button opens the screen's menu.\rIf the shift key is down, do find window.\"\r\rsensor leftShiftDown ifTrue: [^ self findWindow].\rsensor controlKeyPressed ifTrue: [^self closeTopWindow].\r(self projectScreenMenu invokeOn: self) ifNil: [super controlActivity]! !\r!ScreenController methodsFor: 'control defaults' stamp: 'ssa 3/3/2010 13:42'!\risControlWanted\r^ self viewHasCursor and: [sensor anyButtonPressed]! !\r!ScreenController methodsFor: 'menu messages' stamp: 'ssa 1/21/2010 12:17'!\rexploreViewFromUser\r\"Explore the selected window\"\r| controller |\r(controller _ ScheduledControllers windowFromUser) notNil\r\tifTrue:\r\t\t[controller view explore]! !\r!ScreenController methodsFor: 'menu messages' stamp: 'ssa 4/20/2010 09:50'!\ropenRVMDashboard\r\"Create and schedule a RVM dashboard.\"\r\rRVMMonitor dashboard! !\r!ScreenController methodsFor: 'menu messages' stamp: 'tk 5/4/1998 17:25'!\ropenWorkspace \r\"Create and schedule workspace.\"\r\rWorkspace open! !\r!ScreenController methodsFor: 'menu messages' stamp: 'ssa 3/24/2010 16:34'!\rrecolorWindows\r\rSmalltalk recolorWindows! !\r!ScreenController methodsFor: 'nested menus' stamp: 'ssa 3/24/2010 16:33'!\rappearanceMenu \r\"Answer the appearance menu to be put up as a screen submenu\"\r\r^ SelectionMenu labelList:\r\t#('system fonts...'\r\t\t'full screen on'\r\t\t'full screen off'\r\t\t'recolor windows'\r\t\t'set display depth...'\r\t\t'set desktop color...' ) \r\r\tlines: #(1 3)\r\tselections: #( configureFonts\rfullScreenOn fullScreenOff recolorWindows setDisplayDepth setDesktopColor)\r\"\rScreenController new appearanceMenu startUp\r\"! !\r!ScreenController methodsFor: 'nested menus' stamp: 'dmu 8/30/2010 10:43'!\rdashboardMenu\r| labels selections |\rlabels _ #('RVM dashboard') asOrderedCollection.\rselections _ #(openRVMDashboard) asOrderedCollection.\r(Smalltalk includesKey: #Sly3) ifTrue:[\r\t\tlabels add: 'Sly dashboard'.\r\t\tselections add:#openSlyDashboard].\r(Smalltalk includesKey: #Ly) ifTrue:[\r\t\tlabels add: 'Ly dashboard'.\r\t\tselections add:#openLyDashboard].\r\r\t\r^ SelectionMenu labelList: labels\r\tlines: #()\r\tselections: selections\r\"\rScreenController  new dashboardMenu startUp\r\"! !\r!ScreenController methodsFor: 'nested menus' stamp: 'ssa 7/7/2010 11:20'!\rpresentDashboardMenu\rself popUpMenuFor: #dashboardMenu! !\r!ScreenController methodsFor: 'nested menus' stamp: 'ssa 7/7/2010 11:21'!\rprojectScreenMenu\r\"Answer the project screen menu.\"\r\r^ SelectionMenu labelList:\r\t#(\t'previous project'\r\t\t'jump to project...'\r\t\t'restore display'\r\r\t\t'dashboards...'\r\r\t\t'open...'\r\t\t'windows...'\r\t\t'changes...'\r\t\t'help...'\r\t\t'appearance...'\r\t\t'do...'\r\r\t\t'save'\r\t\t'save as...'\r\t\t'save and quit'\r\t\t'quit')\r\tlines: #(3 4 12)\r\tselections: #(\rreturnToPreviousProject jumpToProject restoreDisplay presentDashboardMenu\rpresentOpenMenu presentWindowMenu presentChangesMenu presentHelpMenu presentAppearanceMenu commonRequests\rsnapshot saveAs snapshotAndQuit quit )\r\"\rScreenController new projectScreenMenu startUp\r\"! !\r!ScreenController methodsFor: 'nested menus' stamp: 'ssa 3/10/2010 10:01'!\rwindowMenu\r\"Answer a menu for windows-related items.  \"\r\r^ SelectionMenu labelList:\r\t#(\t'find window...'\r\t\t'find changed browsers...'\r\t\t'find changed windows...'\r\r\t\t'collapse all windows'\r\t\t'expand all windows'\r\t\t'close unchanged windows' \r\t\t'close unlocked windows' ) , \r\t\t(Array\r\t\t\twith: self bitCachingString\r\t\t\twith: self staggerPolicyString)\r\tlines: #(3 7)\r\tselections: #(\rfindWindow chooseDirtyBrowser chooseDirtyWindow\rcollapseAll expandAll closeUnchangedWindows closeAllUnlockedWindows\rfastWindows changeWindowPolicy )\r\"\rScreenController new windowMenu startUp\r\"! !\r!ScrollController methodsFor: 'basic control sequence' stamp: 'ssa 9/9/2009 17:06'!\rcontrolInitialize\r    \"Recompute scroll bars.  Save underlying image unless it is already saved.\"\r    \"Hacked to disable flop-out scroll bars when inside an MSWScrollBarView - ssa 12/10/97 15:21\"\r\r    super controlInitialize.\r    scrollBar region: (0 @ 0 extent: 24 @ view apparentDisplayBox height).\r    scrollBar insideColor: view backgroundColor.\r    marker region: self computeMarkerRegion.\r    scrollBar _ scrollBar align: scrollBar topRight with: view apparentDisplayBox topLeft.\r    marker _ marker align: marker topCenter with: self upDownLine @ (scrollBar top + 2).\r    savedArea isNil ifTrue: [savedArea _ Form fromDisplay: scrollBar].\r\r    (self view superView isKindOf: MSWScrollBarView) \"_______HERE IS THE HACK\"\r            ifFalse:[scrollBar displayOn: Display].\r\r    \"Show a border around yellow-button (menu) region\"\r\"\r    yellowBar _ Rectangle left: self yellowLine right: scrollBar right + 1\r            top: scrollBar top bottom: scrollBar bottom.\r    Display border: yellowBar width: 1 mask: Form veryLightGray.\r\"\r    self moveMarker\r! !\r!ScrollController methodsFor: 'basic control sequence' stamp: 'ssa 9/9/2009 17:07'!\rcontrolTerminate\r\rsuper controlTerminate.\rsavedArea notNil \t\r\tifTrue: \r\t\t[ (self view superView isKindOf: MSWScrollBarView) \"_______HERE IS THE HACK\"\r\t\t\tifFalse:[savedArea displayOn: Display at: scrollBar topLeft].\r\t\tsavedArea _ nil].! !\r!ScrollController methodsFor: 'control defaults' stamp: ''!\rcontrolActivity\r    \"Hacked to supprt MSWScrollBarView - ssa 12/10/97 17:07\"\r\r    (self view superView isKindOf: MSWScrollBarView)\r            ifFalse:[\r    self scrollBarContainsCursor\r                            ifTrue: [self scroll]\r                            ifFalse: [super controlActivity]]\r            ifTrue:[super controlActivity]! !\r!ScrollController methodsFor: 'control defaults' stamp: ''!\risControlActive \r    \"Viva la Junta!!\"\r    \"HACKED to ignore scrollbar in the activity test if contained in a ScrollbarView - ssa 1/8/98 16:24\"\r    view isNil ifTrue: [^ false].\r\r    (self view superView isKindOf: MSWScrollBarView) \"_______HERE IS THE HACK\"\r            ifFalse:[\"original code\" ^(view insetDisplayBox merge: scrollBar inside) containsPoint: sensor cursorPoint]\r            ifTrue:[^view insetDisplayBox containsPoint: sensor cursorPoint]! !\r!ScrollController methodsFor: 'marker adjustment' stamp: ''!\rmoveMarker\r    \"The view window has changed. Update the marker.\"\r    \"Hacked to suppress flop-out scrollbar updates when the view is encapsulated by an MSWScrollBarView - ssa 12/10/97 15:24\"\r\r    (self view superView isKindOf: MSWScrollBarView) \"_______HERE IS THE HACK\"\r            ifFalse:[self moveMarker: self markerDelta negated anchorMarker: nil]! !\r!ScrollController methodsFor: 'marker adjustment' stamp: ''!\rmoveMarkerTo: aRectangle \r    \"Same as markerRegion: aRectangle; moveMarker, except a no-op if the marker\r     would not move.\"\r    \"Hacked to suppress flop-out scrollbar updates when the view is encapsulated by an MSWScrollBarView - ssa 12/10/97 15:24\"\r\r    (self view superView isKindOf: MSWScrollBarView) \"_______HERE IS THE HACK\"\r            ifFalse:[       (aRectangle height = marker height and: [self viewDelta = 0])\r                                    ifFalse:\r                                            [self markerRegion: aRectangle.\r                                            self moveMarker]]! !\r!ListController methodsFor: 'menu messages' stamp: 'ssa 9/15/2009 16:53'!\rprocessKeyboard\r\"Derived from a Martin Pammer submission, 02/98\"\r\r | keyEvent oldSelection nextSelection max min howMany |\rsensor keyboardPressed ifFalse: [^ self].\r\r keyEvent := sensor keyboard asciiValue.\r(keyEvent = $l asciiValue and:[Sensor commandKeyPressed])ifTrue:[self view topView adjustWidths].\r oldSelection := view selection.\r nextSelection := oldSelection.\r max := view maximumSelection.\r min := view minimumSelection.\r howMany := view clippingBox height // view list lineGrid.\r\r keyEvent == 31 ifTrue:\r\t[\"down-arrow; move down one, wrapping to top if needed\"\r\tnextSelection := oldSelection + 1.\r\tnextSelection > max ifTrue: [nextSelection _ 1]].\r\r keyEvent == 30 ifTrue:\r\t[\"up arrow; move up one, wrapping to bottom if needed\"\r\tnextSelection := oldSelection - 1.\r\tnextSelection < 1 ifTrue: [nextSelection _ max]].\r\r keyEvent == 1  ifTrue: [nextSelection := 1].  \"home\"\r keyEvent == 4  ifTrue: [nextSelection := max].   \"end\"\r keyEvent == 11 ifTrue: [nextSelection := min max: (oldSelection -\rhowMany)].  \"page up\"\r keyEvent == 12  ifTrue: [nextSelection := (oldSelection + howMany)\rmin: max].  \"page down\"\r nextSelection = oldSelection  ifFalse:\r\t[model okToChange\r\t\tifTrue:\r\t\t\t[self changeModelSelection: nextSelection.\r\t\t\tself moveMarker]]\r\t\t! !\r!ParagraphEditor methodsFor: 'controlling' stamp: ''!\rcontrolActivity\r    \"Hacked to supprt MSWScrollBarView - ssa 12/10/97 17:07\"\r    \r    self scrollBarContainsCursor\r            ifTrue: [(self view superView isKindOf: MSWScrollBarView)\r                                    ifFalse:[self scroll]]\r            ifFalse: [self processKeyboard.\r                            self processMouseButtons]! !\r!ParagraphEditor methodsFor: 'scrolling' stamp: ''!\rscrollView: anInteger \r    \"Paragraph scrolling uses opposite polarity\"\r    \"Adjusted to keep text from scrolling off the view - ssa 1/15/98 15:22.  The - 30 below is the hack to allow for some empty space to show at the bottom.\"\r    | maximumAmount minimumAmount amount |\r    maximumAmount _\r            paragraph clippingRectangle top -\r            paragraph compositionRectangle top  max: 0.\r    minimumAmount _\r            paragraph clippingRectangle bottom -\r            paragraph compositionRectangle bottom - 30 min: 0.\r    amount _\r            (anInteger min: maximumAmount) max:\r            minimumAmount.\r    ^ self scrollBy: amount negated! !\r!ParagraphEditor methodsFor: 'scrolling' stamp: ''!\rupdateMarker\r    \"Hacked to catch this scrolling 'event'.  ssa 12/5/97 16:22\"\r    \"A variation of computeMarkerRegion--only redisplay the marker in the scrollbar if an actual change has occurred in the positioning of the paragraph.\"\r    self moveMarkerTo: self computeMarkerRegion.\r\r            \"A hack to notify the MSWScrollBarController\"\r    (self view superView isKindOf: MSWScrollBarView)\r            ifTrue:[self view superView updateElevator]! !\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'ssa 9/15/2009 16:53'!\radjustWidths\r\rself view topView adjustWidths! !\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'ssa 3/1/2010 11:41'!\rbrowseIt\r\"Launch a browser for the current selection, if appropriate\"\r\r| aSymbol anEntry brow |\r\rPreferences alternativeBrowseIt ifTrue: [^ self browseClassFromIt].\r\rself lineSelectAndEmptyCheck: [^ self].\r(aSymbol _ self selectedSymbol) isNil ifTrue: [^ view flash].\r\rself terminateAndInitializeAround:\r\t[aSymbol first isUppercase\r\t\tifTrue:\r\t\t\t[anEntry _ (Smalltalk\r\t\t\t\tat: aSymbol\r\t\t\t\tifAbsent:\r\t\t\t\t\t[ self systemNavigation browseAllImplementorsOf: aSymbol.\r\t\t\t\t\t^ nil]).\r\t\t\tanEntry isNil ifTrue: [^ view flash].\r\t\t\t(anEntry isKindOf: Class)\r\t\t\t\tifFalse:\t[anEntry _ anEntry class].\r\t\t\t\t[^ self browseClassFromIt]value.  \"<<<<<<<<<<<<<<<<<<  ssa added\"\r\t\t\tbrow _ Preferences browseToolClass new.\r\t\t\tbrow setClass: anEntry selector: nil.\r\t\t\tbrow class\r\t\t\t\topenBrowserView: (brow openEditString: nil)\r\t\t\t\tlabel: 'System Browser']\r\t\tifFalse:\r\t\t\t[ self systemNavigation browseAllImplementorsOf: aSymbol]]! !\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'ssa 1/21/2010 16:27'!\rmethodSourceContainingIt\r\"Open a browser on methods which contain the current selection in their source (case-sensitive full-text search of source). \"\r\rself lineSelectAndEmptyCheck: [^ self].\r\rself systemNavigation browseMethodsWithSourceString: self selection string! !\r!ParagraphEditor methodsFor: 'editing keys' stamp: 'ssa 9/8/2009 18:28'!\rbuttonIt: characterStream \r\"Called when user hits cmd-B.  make a button of the selection\"\r\rsensor keyboard.\t\rself buttonIt.\r^ true! !\r!ParagraphEditor methodsFor: 'editing keys' stamp: 'ssa 1/6/2010 20:32'!\rexploreIt: characterStream \r\"Inspect the selection -- invoked via cmd-i.  If there is no current selection, use the current line.\"\r\rsensor keyboard.\t\t\"flush character\"\rself terminateAndInitializeAround: [self exploreIt].\r^ true! !\r!ParagraphEditor methodsFor: 'editing keys' stamp: 'ssa 6/1/2010 16:55'!\rprintIt: characterStream \r\"Print the results of evaluting the selection -- invoked via cmd-p.  If there is no current selection, use the current line.  1/17/96 sw\r 2/29/96 sw: don't call selectLine now, since it's called by doIt\"\r\rsensor keyboard.\t\t\"flush character\"\r\tself terminateAndInitializeAround: [self printIt].\r^ true! !\r!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'ssa 1/20/2010 11:06'!\rcursorDown: characterStream \r\r\"Private - Move cursor from position in current line to same position in\rnext line. If next line too short, put at end. If shift key down,\rselect.\"\rself closeTypeIn: characterStream.\rparagraph isEmpty ifTrue:[Sensor flushKeyboard.  ^true].\rself \r\tmoveCursor:[:position | self\r\t\t\tsameColumn: position\r\t\t\tnewLine:[:line | line + 1]\r\t\t\tforward: true]\r\tforward: true\r\tspecialBlock:[:dummy | dummy].\r^true! !\r!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'ssa 1/20/2010 11:05'!\rcursorUp: characterStream \r\r\"Private - Move cursor from position in current line to same position in\rprior line. If prior line too short, put at end\"\r\rself closeTypeIn: characterStream.\rparagraph isEmpty ifTrue:[Sensor flushKeyboard.  ^true].\rself\r\tmoveCursor: [:position | self\r\t\t\tsameColumn: position\r\t\t\tnewLine:[:line | line - 1]\r\t\t\tforward: false]\r\tforward: false\r\tspecialBlock:[:dummy | dummy].\r^true! !\r!ParagraphEditor methodsFor: 'private' stamp: 'ssa 1/20/2010 10:55'!\rsameColumn: start newLine: lineBlock forward: isForward\r\"Private - Compute the index in my text\rwith the line number derived from lineBlock,\"\r\" a one argument block accepting the old line number.\rThe position inside the line will be preserved as good as possible\"\r\"The boolean isForward is used in the border case to determine if\rwe should move to the beginning or the end of the line.\"\r| wordStyle column currentLine offsetAtTargetLine targetEOL lines numberOfLines currentLineNumber targetLineNumber |\rwordStyle _ Preferences wordStyleCursorMovement.\rwordStyle\r\tifTrue: [\r\t\tlines _ paragraph lines.\r\t\tnumberOfLines := paragraph numberOfLines.\r\t\tcurrentLineNumber  _ paragraph lineIndexOfCharacterIndex: start.\r\t\tcurrentLine _ lines at: (currentLineNumber max: 1)]\r\tifFalse: [\r\t\tlines _ self lines.\r\t\tnumberOfLines := lines size.\r\t\tcurrentLine _ lines\r\t\t\tdetect:[:lineInterval | lineInterval last >= start]\r\t\t\tifNone:[lines last].\r\t\tcurrentLineNumber _ currentLine second].\rcolumn _ start - currentLine first.\rtargetLineNumber _ ((lineBlock value: currentLineNumber) max: 1) min: numberOfLines.\roffsetAtTargetLine _ (lines at: targetLineNumber) first.\rtargetEOL _ (lines at: targetLineNumber) last + (targetLineNumber == numberOfLines ifTrue:[1]ifFalse:[0]).\rtargetLineNumber == currentLineNumber\r\"No movement or movement failed. Move to beginning or end of line.\"\r\tifTrue:[^isForward\r\t\tifTrue:[targetEOL]\r\t\tifFalse:[offsetAtTargetLine]].\r^offsetAtTargetLine + column min: targetEOL.! !\r!ParagraphEditor methodsFor: 'do-its' stamp: 'ssa 9/8/2009 19:09'!\rbuttonIt\r\"launch a button to evaluate the selection\"\r| topView someCode extent |\rsomeCode _ self selection.\rextent _ (someCode asText asDisplayText extent + (30@20)) max: 80@30.\rtopView := RVMStandardSystemView new.\rtopView noLabel.\rtopView borderWidth:1.\rtopView minimumSize: extent .\rtopView maximumSize: extent.\r\rtopView addSubView: (RVMButtonView label: someCode action:[self evaluate: someCode]).\rtopView controller open! !\r!ParagraphEditor methodsFor: 'do-its' stamp: 'ssa 8/31/2009 10:30'!\rcompileSelectionFor: anObject in: evalContext\r\r| methodNode method |\rmethodNode _ [Compiler new\r\tcompileNoPattern: self selection\r\tin: anObject class\r\tcontext: evalContext\r\tnotifying: self\r\tifFail: [^nil]]\r\t\ton: OutOfScopeNotification\r\t\tdo: [:ex | ex resume: true].\rmethod _ methodNode generate: #(0 0 0 0).\r^method copyWithTempNames: methodNode tempNames! !\r!ParagraphEditor methodsFor: 'do-its' stamp: 'ssa 7/7/2010 12:32'!\rdebugIt\r\r| method receiver context |\r((Smalltalk includesKey: #Ly) and:[model isKindOf: (Smalltalk at: #LyWorkspace)]) ifTrue:[^model debug: self selection asString notifying:self].\r(model respondsTo: #doItReceiver) \r\tifTrue: \r\t\t[FakeClassPool adopt: model selectedClass.\r\t\treceiver _ model doItReceiver.\r\t\tcontext _ model doItContext]\r\tifFalse:\r\t\t[receiver _ context _ nil].\rself lineSelectAndEmptyCheck: [^self].\rmethod _ self compileSelectionFor: receiver in: context.\rmethod notNil ifTrue:\r\t[self debug: method receiver: receiver in: context].\rFakeClassPool adopt: nil! !\r!ParagraphEditor methodsFor: 'do-its' stamp: 'ssa 7/7/2010 12:32'!\revaluate: someCode\r\"Treat the current selection as an expression; evaluate it and return the result\"\r| result rcvr ctxt |\rsomeCode isEmpty ifTrue:[^ ''].\r\r(model respondsTo: #doItReceiver) \r\tifTrue: [FakeClassPool adopt: model selectedClass.  \"Include model pool vars if any\"\r\t\t\trcvr _ model doItReceiver.\r\t\t\tctxt _ model doItContext]\r\tifFalse: [rcvr _ ctxt _ nil].\rresult _ [((Smalltalk includesKey: #Ly) and:[model isKindOf: (Smalltalk at: #LyWorkspace)]) ifTrue:[model evaluate: someCode notifying:self] ifFalse:[\r\trcvr class evaluatorClass new \r\t\tevaluate: someCode readStream\r\t\tin: ctxt\r\t\tto: rcvr\r\t\tnotifying: self\r\t\tifFail: [FakeClassPool adopt: nil. ^ #failedDoit]\r\t\tlogged: true].\r] \r\ton: OutOfScopeNotification \r\tdo: [ :ex | ex resume: true].\rFakeClassPool adopt: nil.\r^ result! !\r!ParagraphEditor methodsFor: 'do-its' stamp: 'ssa 7/7/2010 12:32'!\revaluateSelection\r\"Treat the current selection as an expression; evaluate it and return the result\"\r| result rcvr ctxt |\rself lineSelectAndEmptyCheck: [^ ''].\r\r(model respondsTo: #doItReceiver) \r\tifTrue: [FakeClassPool adopt: model selectedClass.  \"Include model pool vars if any\"\r\t\t\trcvr _ model doItReceiver.\r\t\t\tctxt _ model doItContext]\r\tifFalse: [rcvr _ ctxt _ nil].\rresult _ [((Smalltalk includesKey: #Ly) and:[model isKindOf: (Smalltalk at: #LyWorkspace)]) ifTrue:[model evaluate: self selection asString notifying:self] ifFalse:[\r\trcvr class evaluatorClass new \r\t\tevaluate: self selectionAsStream\r\t\tin: ctxt\r\t\tto: rcvr\r\t\tnotifying: self\r\t\tifFail: [FakeClassPool adopt: nil. ^ #failedDoit]\r\t\tlogged: true].\r] \r\ton: OutOfScopeNotification \r\tdo: [ :ex | ex resume: true].\rFakeClassPool adopt: nil.\r^ result! !\r!ParagraphEditor methodsFor: 'do-its' stamp: 'ssa 7/7/2010 12:32'!\rexploreIt\r| result | \r((Smalltalk includesKey: #Ly) and:[model isKindOf: (Smalltalk at: #LyWorkspace)]) ifTrue:[^model exploreIt: self selection asString notifying:self].\rresult _ self evaluateSelection.\r((result isKindOf: FakeClassPool) or: [result == #failedDoit])\r\t\tifTrue: [view flash]\r\t\tifFalse: [result explore].\r! !\r!ParagraphEditor methodsFor: 'do-its' stamp: 'ssa 7/7/2010 12:32'!\rinspectIt\r\"1/13/96 sw: minor fixup\"\r| result |\r((Smalltalk includesKey: #Ly) and:[model isKindOf: (Smalltalk at: #LyWorkspace)]) ifTrue:[^model inspectIt: self selection asString notifying:self].\rresult _ self evaluateSelection.\r((result isKindOf: FakeClassPool) or: [result == #failedDoit])\r\t\tifTrue: [view flash]\r\t\tifFalse: [result inspect].\r! !\r!ParagraphEditor methodsFor: 'do-its' stamp: 'ssa 7/7/2010 12:33'!\rinstallAsTest\r| | \r((Smalltalk includesKey: #Ly) and:[model isKindOf: (Smalltalk at: #LyWorkspace)]) ifTrue:[^model installAsTest: self selection asString notifying:self].\rself halt:'not implemented for Squeak Workspaces yet'! !\r!ParagraphEditor methodsFor: 'do-its' stamp: 'ssa 7/7/2010 12:33'!\rparseIt\r\r((Smalltalk includesKey: #Ly) and:[model isKindOf: (Smalltalk at: #LyWorkspace)]) ifTrue:[^model parseAndExplore: self selection asString notifying:self].\r! !\r!ParagraphEditor methodsFor: 'do-its' stamp: 'ssa 7/7/2010 12:33'!\rprintIt\r\"Treat the current text selection as an expression; evaluate it. Insert the \rdescription of the result of evaluation after the selection and then make \rthis description the new text selection.\"\r| result |\r((Smalltalk includesKey: #Ly) and:[model isKindOf: (Smalltalk at: #LyWorkspace)]) ifTrue:[^model printIt: self selection asString notifying:self].\rresult _ self evaluateSelection.\r((result isKindOf: FakeClassPool) or: [result == #failedDoit])\r\t\tifTrue: [view flash]\r\t\tifFalse: [self afterSelectionInsertAndSelect: result printString]! !\r!ParagraphEditor class methodsFor: 'class initialization' stamp: 'ssa 2/9/2010 05:23'!\rinitializeTextEditorMenus\r\"Initialize the yellow button pop-up menu and corresponding messages.\"\r\"ParagraphEditor initializeTextEditorMenus\"\r\rTextEditorYellowButtonMenu _ SelectionMenu\r\tlabels:\r'find...(f)\rfind again (g)\rset search string (h)\rdo again (j)\rundo (z)\rcopy (c)\rcut (x)\rpaste (v)\rpaste...\rdo it (d)\rprint it (p)\rinspect it (i)\rexplore it (e)\rdebug it\rbutton it (B)\raccept (s)\rcancel (l)\rshow bytecodes\rmore...'\r\tlines: #(3 5 9 15 17 19)\r\tselections: #(find findAgain setSearchString again undo copySelection cut paste pasteRecent doIt printIt inspectIt exploreIt debugIt buttonIt accept cancel showBytecodes shiftedTextPaneMenuRequest).! !\r!ParagraphEditor class methodsFor: 'keyboard shortcut tables' stamp: 'ssa 1/29/2010 12:18'!\rinitializeCmdKeyShortcuts\r\"Initialize the (unshifted) command-key (or alt-key) shortcut table.\"\r\r\"NOTE: if you don't know what your keyboard generates, use Sensor kbdTest\"\r\r\"ParagraphEditor initialize\"\r\r| cmdMap cmds |\rcmdMap := Array new: 256 withAll: #noop:.\t\"use temp in case of a crash\"\rcmdMap at: 1 + 1 put: #cursorHome:.\t\"home key\"\rcmdMap at: 4 + 1 put: #cursorEnd:.\t\"end key\"\rcmdMap at: 8 + 1 put: #backspace:.\t\"ctrl-H or delete key\"\rcmdMap at: 11 + 1 put: #cursorPageUp:.\t\"page up key\"\rcmdMap at: 12 + 1 put: #cursorPageDown:.\t\"page down key\"\rcmdMap at: 13 + 1 put: #crWithIndent:.\t\"cmd-Return\"\rcmdMap at: 27 + 1 put: #offerMenuFromEsc:.\t\"escape key\"\rcmdMap at: 28 + 1 put: #cursorLeft:.\t\"left arrow key\"\rcmdMap at: 29 + 1 put: #cursorRight:.\t\"right arrow key\"\rcmdMap at: 30 + 1 put: #cursorUp:.\t\"up arrow key\"\rcmdMap at: 31 + 1 put: #cursorDown:.\t\"down arrow key\"\rcmdMap at: 32 + 1 put: #selectWord:.\t\"space bar key\"\rcmdMap at: 127 + 1 put: #forwardDelete:.\t\"del key\"\r'0123456789-=' \r\tdo: [:char | cmdMap at: char asciiValue + 1 put: #changeEmphasis:].\r'([{''\"<' do: [:char | cmdMap at: char asciiValue + 1 put: #enclose:].\rcmdMap at: $, asciiValue + 1 put: #shiftEnclose:.\rcmds := #($a #selectAll: $b #browseIt: $c #copySelection: $d #doIt: $e #exploreIt: $f #find: $g #findAgain: $h #setSearchString: $i #inspectIt: $j #doAgainOnce: $k #offerFontMenu: $l #cancel: $m #implementorsOfIt: $n #sendersOfIt: $o #spawnIt: $p #printIt: $q #querySymbol: $r #revert: $s #save: $S saveAs:: $t #tempCommand: $u #align: $v #paste: $w #backWord: $x #cut: $y #swapChars: $z #undo:).\r1 to: cmds size\r\tby: 2\r\tdo: [:i | cmdMap at: (cmds at: i) asciiValue + 1 put: (cmds at: i + 1)].\rCmdActions := cmdMap! !\r!ParagraphEditor class methodsFor: 'keyboard shortcut tables' stamp: 'ssa 2/9/2010 05:26'!\rinitializeShiftCmdKeyShortcuts \r\"Initialize the shift-command-key (or control-key) shortcut table.\"\r\"NOTE: if you don't know what your keyboard generates, use Sensor kbdTest\"\r\"wod 11/3/1998: Fix setting of cmdMap for shifted keys to actually use the \rcapitalized versions of the letters.\rTPR 2/18/99: add the plain ascii values back in for those VMs that don't return the shifted values.\"\r\r| cmdMap cmds |\r\r\"shift-command and control shortcuts\"\rcmdMap _ Array new: 256 withAll: #noop:.  \"use temp in case of a crash\"\rcmdMap at: ( 1 + 1) put: #cursorHome:.\t\t\t\"home key\"\rcmdMap at: ( 4 + 1) put: #cursorEnd:.\t\t\t\"end key\"\rcmdMap at: ( 8 + 1) put: #forwardDelete:.\t\t\"ctrl-H or delete key\"\rcmdMap at: (11 + 1) put: #cursorPageUp:.\t\t\"page up key\"\rcmdMap at: (12 + 1) put: #cursorPageDown:.\t\t\"page down key\"\rcmdMap at: (13 + 1) put: #crWithIndent:.\t\t\t\"ctrl-Return\"\rcmdMap at: (27 + 1) put: #offerMenuFromEsc:.\t\"escape key\"\rcmdMap at: (28 + 1) put: #cursorLeft:.\t\t\t\"left arrow key\"\rcmdMap at: (29 + 1) put: #cursorRight:.\t\t\t\"right arrow key\"\rcmdMap at: (30 + 1) put: #cursorUp:.\t\t\t\"up arrow key\"\rcmdMap at: (31 + 1) put: #cursorDown:.\t\t\t\"down arrow key\"\rcmdMap at: (32 + 1) put: #selectWord:.\t\t\t\"space bar key\"\rcmdMap at: (45 + 1) put: #changeEmphasis:.\t\t\"cmd-sh-minus\"\rcmdMap at: (61 + 1) put: #changeEmphasis:.\t\t\"cmd-sh-plus\"\rcmdMap at: (127 + 1) put: #forwardDelete:.\t\t\"del key\"\r\r\"Note: Command key overrides shift key, so, for example, cmd-shift-9 produces $9 not $(\"\r'9[,''' do: [ :char | cmdMap at: (char asciiValue + 1) put: #shiftEnclose: ].\t\"({< and double-quote\"\r\"Note: Must use cmd-9 or ctrl-9 to get '()' since cmd-shift-9 is a Mac FKey command.\"\r\r\"NB: sw 12/9/2001 commented out the idiosyncratic line just below, which was grabbing shift-esc in the text editor and hence which argued with the wish to have shift-esc be a universal gesture for escaping the local context and calling up the desktop menu.\"  \r\"cmdMap at: (27 + 1) put: #shiftEnclose:.\" \t\"ctrl-[\"\r\r\"'\"\"''(' do: [ :char | cmdMap at: (char asciiValue + 1) put: #enclose:].\"\r\rcmds _ #(\r\t$a\targAdvance:\r\t$b\tbuttonIt:\r\t$c\tcompareToClipboard:\r\t$d\tduplicate:\r\t$e\tmethodStringsContainingIt:\r\t$f\tdisplayIfFalse:\r\t$g\tfileItIn:\r\t$h\tcursorTopHome:\r\t$i\texploreIt:\r\t$j\tdoAgainMany:\r\t$k\tchangeStyle:\r\t$l\toutdent:\r\t$m\tselectCurrentTypeIn:\r\t$n\treferencesToIt:\r\t$p\tmakeProjectLink:\r\t$r\tindent:\r\t$s\tsearch:\r\t$t\tdisplayIfTrue:\r\t$u\tchangeLfToCr:\r\t$v\tpasteInitials:\r\t$w\tmethodNamesContainingIt:\r\t$x\tmakeLowercase:\r\t$y\tmakeUppercase:\r\t$z\tmakeCapitalized:\r).\r1 to: cmds size by: 2 do: [ :i |\r\tcmdMap at: ((cmds at: i) asciiValue + 1) put: (cmds at: i + 1).\t\t\"plain keys\"\r\tcmdMap at: ((cmds at: i) asciiValue - 32 + 1) put: (cmds at: i + 1).\t\t\"shifted keys\"\r\tcmdMap at: ((cmds at: i) asciiValue - 96 + 1) put: (cmds at: i + 1).\t\t\"ctrl keys\"\r].\rShiftCmdActions _ cmdMap! !\r!PluggableListController methodsFor: 'private' stamp: 'di 5/25/1998 10:20'!\rchangeModelSelection: anInteger\r\"Let the view handle this.\"\r\rterminateDuringSelect ifTrue: [self controlTerminate].\rview changeModelSelection: anInteger.\rterminateDuringSelect ifTrue: [self controlInitialize].! !\r!LyPluggableOutlineController methodsFor: 'selecting' stamp: 'ssa 9/9/2009 16:35'!\rredButtonActivity\r\rsuper redButtonActivity.\rself view twistyTargets keys detect:[:box| box containsPoint: Sensor cursorPoint] ifNone:[^self].\rself model toggleSelection! !\r!PluggableListControllerOfMany methodsFor: 'control defaults' stamp: 'ssa 1/1/1970 00:05'!\rredButtonActivity\r| selection firstHit turningOn lastSelection pt scrollFlag |\rmodel okToChange ifFalse: [^ self].\r\t\"Don't change selection if model refuses to unlock\"\rfirstHit _ true.\rscrollFlag _ false.\rlastSelection _ 0.\r[sensor redButtonPressed] whileTrue: \r\t[\rselection _ view findSelection: (pt _ sensor cursorPoint).\r\tselection == nil ifTrue:  \"Maybe out of box - check for auto-scroll\"\r\t\t[pt y < view insetDisplayBox top ifTrue:\r\t\t\t[self scrollView: view list lineGrid.\r\t\t\tscrollFlag _ true.\r\t\t\tselection _ view firstShown].\r\t\tpt y > view insetDisplayBox bottom ifTrue:\r\t\t\t[self scrollView: view list lineGrid negated.\r\t\t\tscrollFlag _ true.\r\t\t\tselection _ view lastShown]].\r\t(selection == nil or: [selection = lastSelection]) ifFalse: \r\t\t[firstHit ifTrue:\r\t\t\t[firstHit _ false.\r\t\t\tturningOn _ (view listSelectionAt: selection) not].\r\t\tview selection: selection.\r\t\t(view listSelectionAt: selection) == turningOn ifFalse:\r\t\t\t[view displaySelectionBox.\r\t\t\tview listSelectionAt: selection put: turningOn].\r\t\tlastSelection _ selection]].\rselection notNil ifTrue:\r\t[\"Normal protocol delivers change, so unchange first (ugh)\"\r\t\"view listSelectionAt: selection put: (view listSelectionAt: selection) not\".\r\tself changeModelSelection: selection].\rscrollFlag ifTrue: [self moveMarker]! !\r!PluggableTextController methodsFor: 'accessing-selection' stamp: 'th 9/19/2002 18:35'!\rselectFrom: start to: stop scroll: scrollCommand\r\"Deselect, then select the specified characters inclusive.\r Be sure the selection is in view.\"\r\r(start = self startIndex and: [stop + 1 = self stopIndex]) ifFalse:\r\t[view superView ifNotNil: [self deselect].\r\tself selectInvisiblyFrom: start to: stop].\rview superView ifNotNil: [self perform: scrollCommand]! !\r!SelectionMenu class methodsFor: 'instance creation' stamp: 'ssa 8/22/2009 16:21'!\rlabels: labels lines: linesArray selectors: selectionsArray\r\"ST80 Compatibility\"\r\r^ self labels: labels lines: linesArray selections: selectionsArray! !\r!SequenceableCollection methodsFor: 'converting' stamp: 'ssa 10/27/2008 20:34'!\rrotateBackward\r\"Answer a copy of the receiver with elements rotated toward the front.\"\r\" 'frog' rotateBackward\"\r\r| n result |\rn _ self size.\rresult _ self species new: n.\rn = 0 ifTrue:[^result].\rn = 1 ifTrue:[result at: 1 put: (self at: 1).  ^result].\r1 to: n-1  do: [:i | result at: i put: (self at: i + 1)].\rresult at: n put: self first.\r\r^ result\r! !\r!SequenceableCollection methodsFor: 'converting' stamp: 'ssa 10/27/2008 20:33'!\rrotateForward\r\"Answer a copy of the receiver with elements rotated toward the end.\"\r\" 'frog' rotateForward\"\r\r| n result |\rn _ self size.\rresult _ self species new: n.\rn = 0 ifTrue:[^result].\rn = 1 ifTrue:[result at: 1 put: (self at: 1).  ^result].\r2 to: n  do: [:i | result at: i put: (self at: i - 1)].\rresult at: 1 put: self last.\r\r^ result\r! !\r!SequenceableCollection methodsFor: 'copying' stamp: 'dmu 5/5/2009 01:05'!\rshuffled\r^ self shuffledBy: Collection randomForPicking copy\r\r\"Examples:\r($A to: $Z) shuffled\r\"! !\r!SequenceableCollection methodsFor: 'enumerating' stamp: 'ssa 5/28/2010 13:51'!\rwith: secondCollection with: thirdCollection do: threeArgBlock \r\"Evaluate threeArgBlock with corresponding elements from this collection, secondCollection and thirdCollection.\"\rsecondCollection size = self size ifFalse: [self error: 'secondCollection must be the same size'].\rthirdCollection size = self size ifFalse: [self error: 'thirdCollection must be the same size'].\r1 to: self size do:\r\t[:index |\r\tthreeArgBlock value: (self at: index)\r\t\t\tvalue: (secondCollection at: index)\r\t\t\tvalue: (thirdCollection at: index)]! !\r!SequenceableCollection methodsFor: 'enumerating' stamp: 'ssa 5/28/2010 14:01'!\rwith: secondCollection with: thirdCollection withIndexDo: fourArgBlock \r\"Evaluate fourArgBlock with corresponding elements from this collection, secondCollection and thirdCollection.\"\rsecondCollection size = self size ifFalse: [self error: 'secondCollection must be the same size'].\rthirdCollection size = self size ifFalse: [self error: 'thirdCollection must be the same size'].\r1 to: self size do:\r\t[:index |\r\tfourArgBlock value: (self at: index)\r\t\t\tvalue: (secondCollection at: index)\r\t\t\tvalue: (thirdCollection at: index)\r\t\t\tvalue: index]! !\r!SequenceableCollection methodsFor: 'enumerating' stamp: 'ssa 5/28/2010 15:34'!\rwith: secondCollection withIndexDo: threeArgBlock \r\"Evaluate threeArgBlock with corresponding elements from this collection and secondCollection.\"\rsecondCollection size = self size ifFalse: [self error: 'secondCollection must be the same size'].\r1 to: self size do:\r\t[:index |\r\tthreeArgBlock value: (self at: index)\r\t\t\tvalue: (secondCollection at: index)\r\t\t\tvalue: index]! !\r!SequenceableCollection methodsFor: 'enumerating' stamp: 'ssa 1/20/2009 14:08'!\rwithout: anObject collect: aBlock \r\"Evaluate aBlock with each of the receiver's elements except anObject as the argument.  \rCollect the resulting values into a collection like the receiver. Answer  \rthe new collection.\"\r\r| newCollection  |\rnewCollection _ self species new: self size - 1.\r1 to: self size do:\r\t[:index |\r\tanObject = (self at: index) ifFalse:[newCollection add: (aBlock value: (self at: index))]].\r^ newCollection! !\r!SequenceableCollection methodsFor: 'enumerating' stamp: 'ssa 1/20/2009 14:11'!\rwithout: anObject select: aBlock \r\"Evaluate aBlock with each of the receiver's elements except anObject as the argument.  \rSelect the resulting values that pass into a collection like the receiver. Answer  \rthe new collection.\"\r\r| newCollection  item |\rnewCollection _ self species new: self size - 1.\r1 to: self size do:\r\t[:index |\r\titem _ self at:index.\r\t(anObject ~= item and:[aBlock value: item]) ifTrue:[newCollection add: item]].\r^ newCollection! !\r!SequenceableCollection methodsFor: 'testing' stamp: 'ssa 8/27/2009 12:44'!\ris: anObject after: anotherObject\r\r^(self indexOf: anObject)<(self indexOf: anotherObject)! !\r!SequenceableCollection methodsFor: 'explorer' stamp: 'hg 9/7/2001 12:01'!\rexplorerContents\r\r^self asOrderedCollection withIndexCollect: [:value :index |\r\tObjectExplorerWrapper\r\t\twith: value\r\t\tname: index printString\r\t\tmodel: self]! !\r!SequenceableCollection methodsFor: '*connectors-enumerating' stamp: 'ssa 1/1/1970 00:18'!\rgroupsOfNoMoreThan: n atATimeDo: aBlock \r\"Evaluate aBlock with my elements taken n at a time. Handle leftovers at the end.\"\r| args remaining |\rn\r\tto: self size\r\tby: n\r\tdo: [:index | \r\t\targs := (self copyFrom: index - n + 1 to: index) asArray.\r\t\t aBlock value: args].\r(remaining _ self size \\\\ n)  = 0 ifFalse:[\"handle leftovers\"\r\targs := (self copyFrom: self size - remaining + 1 to: self size) asArray.\r\taBlock value: args]! !\r!Array methodsFor: 'converting' stamp: 'ssa 10/26/2008 15:00'!\rasRunArray\r\"Answer a RunArray of me\"\r\r^RunArray newFrom: self! !\r!Array methodsFor: 'testing' stamp: 'ssa 5/12/2010 19:26'!\risArray\r\"Return true if the receiver is an Array\"\r^true! !\r!ArrayWithNilDetector methodsFor: 'accessing' stamp: 'ssa 11/24/2009 20:01'!\rat: j put: obj\r\robj ifNil:[self halt:'trying to add nil'].\r^super at: j put: obj! !\r!ArrayWithNilDetector methodsFor: 'accessing' stamp: 'ssa 11/24/2009 20:39'!\rspecies\r\r(self includes: nil) ifTrue:[self halt:'I found a nil!!!!'].\r^super species! !\r!ArrayWithNilDetector class methodsFor: 'instance creation' stamp: 'ssa 11/24/2009 20:37'!\rnew: someSize\r\rsomeSize > 0 ifTrue:[self halt:'trying to create a an array with nil elements'].\r^super new: someSize! !\r!CompiledMethod methodsFor: 'printing' stamp: 'ssa 1/1/1970 00:21'!\rlongPrintOn: aStream indent: tabs\r\"List of all the byte codes in a method with a short description of each\" \r\raStream nextPutAll: (RVMTester printPrefixFor: self).\rself isQuick ifTrue: \r\t[self isReturnSpecial ifTrue:\r\t\t[^ aStream tab: tabs; nextPutAll: 'Quick return ' , \r\t\t\t(#('self' 'true' 'false' 'nil' '-1' '0' '1' '2') at: self primitive - 255)].\r\t^ aStream nextPutAll: 'Quick return field ' , self returnField printString , ' (0-based)'].\r\rself primitive = 0 ifFalse: [\r\taStream tab: tabs.\r\tself printPrimitiveOn: aStream.\r].\r(InstructionPrinter on: self) indent: tabs; printInstructionsOn: aStream.\r! !\r!CompiledMethod methodsFor: 'printing' stamp: 'ssa 10/3/2008 18:13'!\rsymbolic\r\"Answer a String that contains a list of all the byte codes in a method \rwith a short description of each.\"\r\r| aStream |\raStream _ WriteStream on: (String new: 1000).\rself longPrintOn: aStream.\r^aStream contents! !\r!LinkedList methodsFor: 'converting' stamp: 'ssa 1/26/2010 16:24'!\rasOrderedCollection\r\r^(self collect:[:link| link])asOrderedCollection! !\r!LinkedList methodsFor: 'explorer' stamp: 'ssa 1/26/2010 16:32'!\rhasContentsInExplorer\r\r^self isEmpty not! !\r!OrderedCollection methodsFor: 'accessing' stamp: 'ssa 9/14/2008 21:44'!\rinspectorClass\r\r^ OrderedCollectionInspector! !\r!OrderedCollection methodsFor: 'adding' stamp: 'ssa 9/9/2009 11:48'!\raddAll: aCollection  after: anObject\r\"Add each element of aCollection at my end. Answer aCollection.\"\r\r| after |\rafter _ anObject.\raCollection do:[:each| self add: each after: after.\r\tafter _ each].\r^aCollection! !\r!OrderedCollectionWithNilDetector methodsFor: 'adding' stamp: 'ssa 11/24/2009 19:54'!\radd: newObject\r\rnewObject ifNil:[self halt:'trying to add nil'].\r^super add: newObject! !\r!OrderedCollectionWithNilDetector methodsFor: 'adding' stamp: 'ssa 11/24/2009 19:56'!\raddAll: aCollection \r\"Add each element of aCollection at my end. Answer\taCollection.\"\r(aCollection includes: nil) ifTrue:[self halt:'trying to add nil'].\r^ super addAll: aCollection! !\r!OrderedCollectionWithNilDetector methodsFor: 'adding' stamp: 'ssa 11/24/2009 19:57'!\rinsert: anObject before: spot\r\ranObject ifNil:[self halt:'trying to add nil'].\r^super insert: anObject before: spot! !\r!RunArray methodsFor: 'fileIn/Out' stamp: ''!\rarchiveOn: aStream\raStream\r\tstoreObject: self;\r\tstoreClass: self class;\r\tstore: runs size.\r1 to: runs size do:\r\t[:x |\r\taStream store: (runs at: x).\r\taStream nextPut: (values at: x)]! !\r!RunArray class methodsFor: 'instance creation' stamp: ''!\rarchiveVersion\r^3! !\r!RunArray class methodsFor: 'instance creation' stamp: ''!\rdearchive2From: aStream\r| anInteger  runs values |\ranInteger _ aStream read: Integer.\rruns _ Array new: anInteger.\rvalues _ Array new: anInteger.\r1 to: anInteger do:\r\t[:x |\r\truns at: x put: (aStream read: Integer).\r\tvalues at: x put: aStream next].\r^self runs: runs values: values! !\r!RunArray class methodsFor: 'instance creation' stamp: ''!\rdearchive: versionNumber from: aStream\r| anInteger  runs values |\rversionNumber = 1 ifTrue:\r\t[anInteger _ aStream read: Integer.\r\truns _ Array new: anInteger.\r\tvalues _ Array new: anInteger.\r\t1 to: anInteger do:\r\t\t[:x |\r\t\truns at: x put: (aStream read: Integer).\r\t\tvalues at: x put: (aStream read: Integer)].\r\t^self runs: runs values: values].\rversionNumber = 2 ifTrue: \r\t[^self dearchive2From: aStream].\rversionNumber = self archiveVersion ifTrue:\r\t[^self dearchiveFrom: aStream].\rself error: 'Can''t dearchive this version.'! !\r!RunArray class methodsFor: 'instance creation' stamp: ''!\rdearchiveFrom: aStream\r\r| anObject anInteger runs values |\ranObject _ self basicNew.\raStream storeObject: anObject.\ranInteger _ aStream read: Integer.\rruns _ Array new: anInteger.\rvalues _ Array new: anInteger.\r1 to: anInteger do:\r\t[:x |\r\truns at: x put: (aStream read: Integer).\r\tvalues at: x put: aStream next].\r^anObject setRuns: runs setValues: values! !\r!Set methodsFor: 'explorer' stamp: 'hg 9/7/2001 11:51'!\rexplorerContents \r\r^self asOrderedCollection withIndexCollect: [:each :index |\r\tObjectExplorerWrapper\r\t\twith: each\r\t\tname: index printString\r\t\tmodel: self]! !\r!Set methodsFor: 'printing' stamp: ''!\rarchiveOn: aStream\r\raStream\r\tstoreObject: self;\r\tstoreClass: self class;\r\tstore: self size.\rself do: [:each | aStream nextPut: each]! !\r!Dictionary methodsFor: 'printing' stamp: ''!\rarchiveOn: aStream\raStream\r\tstoreObject: self;\r\tstoreClass: self class;\r\tstore: self size.\rself associationsDo:\r\t[:each | aStream nextPut: each]! !\r!Dictionary methodsFor: 'user interface' stamp: 'hg 10/3/2001 20:47'!\rexplorerContents\r\r| contents |\r\rcontents := OrderedCollection new.\rself keysSortedSafely do: [:key |\r\tcontents add: (ObjectExplorerWrapper\r\t\twith: (self at: key)\r\t\tname: (key printString contractTo: 32)\r\t\tmodel: self)].\r^contents\r! !\r!Dictionary methodsFor: 'outlining' stamp: 'ssa 9/10/2009 14:30'!\rsubobjects\r\r^self associations asOrderedCollection! !\r!Set class methodsFor: 'instance creation' stamp: ''!\rdearchiveFrom: aStream\r\r| anObject anInteger |\ranInteger _ aStream read: Integer.\ranObject _ self new: (anInteger * 2 max: 2).\raStream storeObject: anObject.\ranInteger timesRepeat:\r\t[anObject add: aStream next].\r^anObject! !\r!SmalltalkImage methodsFor: 'snapshot and quit' stamp: 'dmu 9/7/2010 14:25'!\rsnapshot: save andQuit: quit embedded: embeddedFlag\r\"Mark the changes file and close all files as part of #processShutdownList.\rIf save is true, save the current state of this Smalltalk in the image file.\rIf quit is true, then exit to the outer OS shell.\rThe latter part of this method runs when resuming a previously saved image. This resume logic checks for a document file to process when starting up.\"\r| resuming msg |\r\r\"Save a copy of the image file before you save the new one\"\rsave ifTrue:[(FileDirectory default fileExists:    SmalltalkImage current imageName  ) ifTrue:[FileDirectory default \rrename: SmalltalkImage current imageName \r\ttoBe: SmalltalkImage current imageName , '.prev',Time now hhmm24]].\r\rObject flushDependents.\rObject flushEvents.\r\r(SourceFiles at: 2) ifNotNil:[\r\tmsg _ String streamContents: [ :s |\r\t\ts nextPutAll: '----';\r\t\tnextPutAll: (save ifTrue: [ quit ifTrue: [ 'QUIT' ] ifFalse: [ 'SNAPSHOT' ] ]\r\t\t\t\t\t\tifFalse: [quit ifTrue: [ 'QUIT/NOSAVE' ] ifFalse: [ 'NOP' ]]);\r\t\tnextPutAll: '----';\r\t\tprint: Date dateAndTimeNow; space;\r\t\tnextPutAll: (FileDirectory default localNameFor: self imageName);\r\t\tnextPutAll: ' priorSource: ';\r\t\tprint: LastQuitLogPosition ].\r\tself assureStartupStampLogged.\r\tsave ifTrue: [ LastQuitLogPosition _ (SourceFiles at: 2) setToEnd; position ].\r\tself logChange: msg.\r\tTranscript cr; show: msg\r].\r\rSmalltalk processShutDownList: quit.\rCursor write show.\rsave ifTrue: [resuming _ embeddedFlag \r\t\t\t\tifTrue: [self snapshotEmbeddedPrimitive] \r\t\t\t\tifFalse: [self snapshotPrimitive].  \"<-- PC frozen here on image file\"\r\t\t\tresuming == false \"guard against failure\" ifTrue:\r\t\t\t\t[\"Time to reclaim segment files is immediately after a save\"\r\t\t\t\tSmalltalk at: #ImageSegment\r\t\t\t\t\tifPresent: [:theClass | theClass reclaimObsoleteSegmentFiles]]]\r\tifFalse: [resuming _ false].\rquit & (resuming == false) ifTrue: [self quitPrimitive].\rCursor normal show.\rSmalltalk setGCParameters.\rresuming == true ifTrue: [Smalltalk clearExternalObjects].\rSmalltalk processStartUpList: resuming == true.\rresuming == true ifTrue:[\r\tself setPlatformPreferences.\r\tself readDocumentFile].\r\"Now it's time to raise an error\"\rresuming == nil ifTrue: [self error:'Failed to write image file (disk full?)'].\r^ resuming! !\r!StandardFileMenu class methodsFor: 'instance creation' stamp: 'ssa 10/18/2008 22:56'!\roldFileMenu: aDirectory withPattern: aPattern\r\rSmalltalk isMorphic ifFalse: [^PluggableFileList oldFileMenu: aDirectory withPattern: aPattern].\r^super new oldFileFrom: aDirectory withPattern: aPattern! !\r!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'ssa 10/18/2008 23:01'!\roldFileFrom: aDirectory withPattern: aPattern\r\r^(self oldFileMenu: aDirectory withPattern: aPattern)\r\tstartUpWithCaption: 'Select a File:' translated! !\r!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'ssa 10/18/2008 23:12'!\roldFileStreamFrom: aDirectory  withPattern: aPattern\r\r| sfmResult fileStream |\rsfmResult _ self oldFileFrom: aDirectory  withPattern: aPattern. \rsfmResult ifNil: [^nil].\rfileStream _ sfmResult directory oldFileNamed: sfmResult name.\r[fileStream isNil] whileTrue:\r\t[sfmResult _ self oldFileFrom: aDirectory.\r\tsfmResult ifNil: [^nil].\r\tfileStream _ sfmResult directory oldFileNamed: sfmResult name].\r^fileStream\r! !\r!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'ssa 10/18/2008 23:12'!\roldFileStreamWithPattern: aPattern\r\r^self oldFileStreamFrom: (FileDirectory default) withPattern: aPattern\r! !\r!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'ssa 10/18/2008 22:54'!\roldFileWithPattern: aPattern\r\r^self oldFileFrom: (FileDirectory default) withPattern: aPattern! !\r!StandardFileStream methodsFor: 'read, write, position' stamp: 'ssa 10/26/2008 23:47'!\rnextPut: char\r\"Write the given character to this file.\"\r\rrwmode ifFalse: [^ self error: 'Cannot write a read-only file'].\rbuffer1 byteAt: 1 put: char.\rself primWrite: fileID from: buffer1 startingAt: 1 count: 1.\r^ char\r! !\r!StandardSystemController methodsFor: 'accessing' stamp: 'ssa 3/9/2010 12:56'!\rpreventClosing\r\"Answer the value of preventClosing\"\r\rpreventClosing isNil ifTrue:[self preventClosing: false].\r^ preventClosing! !\r!StandardSystemController methodsFor: 'accessing' stamp: 'ssa 3/9/2010 12:25'!\rpreventClosing: anObject\r\"Set the value of preventClosing\"\r\rpreventClosing _ anObject! !\r!StandardSystemController methodsFor: 'accessing' stamp: 'ssa 3/9/2010 12:25'!\rstatus\r\"Answer the value of status\"\r\rstatus isNil ifTrue:[self status: nil].\r^ status! !\r!StandardSystemController methodsFor: 'borders' stamp: ''!\radjustWindowCorners \r    | box cornerBox p clicked f2 |\r    box := view windowBox.\r    clicked := false.\r    #(topLeft topRight bottomRight bottomLeft)\r            do: [:readCorner |\r                    cornerBox := ((box insetBy: 2) perform: readCorner) - (10@10) extent: 20@20.\r                    (cornerBox containsPoint: sensor cursorPoint)\r                            ifTrue: \r                            [\"Display reverse: cornerBox.\"\r                            (Cursor perform: readCorner) showWhile:\r                                    [[(cornerBox containsPoint: (p := sensor cursorPoint))\r                                            and: [(clicked := sensor anyButtonPressed) not]]\r                                            whileTrue.\r                            \"Display reverse: cornerBox.\"\r                            clicked ifTrue:\r                                    [view newFrame:\r                                            [:f | p := sensor cursorPoint.\r                                            readCorner = #topLeft ifTrue:\r                                                    [f2 := p corner: f bottomRight].\r                                            readCorner = #bottomLeft ifTrue:\r                                                    [f2 := (f withBottom: p y) withLeft: p x].\r                                            readCorner = #bottomRight ifTrue:\r                                                    [f2 := f topLeft corner: p].\r                                            readCorner = #topRight ifTrue:\r                                                    [f2 := (f withTop: p y) withRight: p x].\r                                            f2]]]]].\r    ^ clicked! !\r!StandardSystemController methodsFor: 'borders' stamp: ''!\rcheckForReframe\r    \"2/18/97 ssa - added a leftshift hack to prevent over aggressive offerings of reframing help for subpanes.\"\r\r    | cp |\r    view isCollapsed ifTrue: [^ self].\r    cp := sensor cursorPoint.\r    ((view closeBoxFrame expandBy: 2) containsPoint: cp)\r            | ((view growBoxFrame expandBy: 2) containsPoint: cp)\r            ifTrue: [^ self].  \"Dont let reframe interfere with close/grow\"\r    self adjustWindowCorners.\r    self cursorOnBorder ifFalse: [^ self].\r    ((view insetDisplayBox insetBy: 2@2) containsPoint: cp)\r            ifFalse: [^ self adjustWindowBorders].\r\r    Sensor leftShiftDown \r            ifTrue:[        \r                    (view subviewWithLongestSide: [:s | ] near: cp) == nil\r                            ifFalse: [^ self adjustPaneBorders]].! !\r!StandardSystemController methodsFor: 'control defaults' stamp: 'ssa 3/9/2010 12:58'!\rblueButtonActivity\rself blueButtonMenu invokeOn: self! !\r!StandardSystemController methodsFor: 'control defaults' stamp: 'dmu 5/3/2009 12:12'!\risClosed\r^ status == #closed! !\r!StandardSystemController methodsFor: 'control defaults' stamp: 'ssa 3/12/2010 09:50'!\rredButtonActivity\r\"If cursor is in label of a window when red button is pushed,\rcheck for closeBox or growBox, else drag the window frame\ror edit the label.\"\r\r| box p |\rp _ sensor cursorPoint.\rself labelHasCursor ifFalse: [super redButtonActivity. ^ self].\r((box _ view closeBoxFrame) containsPoint: p)\r\tifTrue:\r\t\t[Utilities\r\t\t\tawaitMouseUpIn: box\r\t\t\trepeating: []\r\t\t\tifSucceed: [Sensor shiftPressed ifFalse:[self close.  ^ self]ifTrue:[^self togglePreventClosing]].\r\t\t^ self].\r((box _ view growBoxFrame) containsPoint: p)\r\tifTrue:\r\t\t[Utilities\r\t\t\tawaitMouseUpIn: box\r\t\t\trepeating: []\r\t\t\tifSucceed:\r\t\t\t\t[Sensor controlKeyPressed ifTrue: [^ self expand; fullScreen].\r\t\t\t\t^ view isCollapsed\r\t\t\t\t\tifTrue: [self expand]\r\t\t\t\t\tifFalse: [self collapse]].\r\t\t^ self].\r(((box _ view labelTextRegion expandBy: 1) containsPoint: p)\r\t\tand: [Preferences clickOnLabelToEdit or: [sensor leftShiftDown]])\r\tifTrue:\r\t\t[Utilities\r\t\t\tawaitMouseUpIn: box\r\t\t\trepeating: []\r\t\t\tifSucceed: [^ self label].\r\t\t^ self].\rself move! !\r!StandardSystemController methodsFor: 'menu messages' stamp: 'ssa 3/24/2010 16:12'!\rclose\r\"The receiver's view should be removed from the screen and from the \rcollection of scheduled views.\"\r\rself preventClosing ifTrue:[^self].\rmodel okToChange ifFalse: [^self].\rself closeForReal! !\r!StandardSystemController methodsFor: 'menu messages' stamp: 'ssa 3/12/2010 09:47'!\rcloseForReal\r\"The receiver's view should be removed from the screen and from the \rcollection of scheduled views.\"\r\rstatus _ #closed.\rview erase! !\r!StandardSystemController methodsFor: 'menu messages' stamp: 'ssa 3/9/2010 13:00'!\rtogglePreventClosing\r\rself preventClosing: self preventClosing not.\rself view emphasizeLabel.! !\r!StandardSystemController methodsFor: 'pluggable menus' stamp: 'ssa 3/12/2010 09:46'!\rblueButtonMenu\r\r^SelectionMenu\r\tlabels:\r'edit label\rchoose color...\rtwo-tone/full color\rmove\rframe\rfull screen\rcollapse\r', (self preventClosing ifTrue:['enable closing']ifFalse:['disable closing\rclose'])\rlines: #(3 7)\rselections: #(label chooseColor toggleTwoTone move reframe fullScreen collapse togglePreventClosing close).\r! !\r!StandardSystemController methodsFor: 'scheduling' stamp: 'ssa 3/3/2010 13:57'!\rcloseAndUnscheduleIfOkWithModel\r\"Erase the receiver's view and remove it from the collection of scheduled \rviews. IF its ok with my model.  This catches unsaved changes\"\r\rmodel okToChange ifFalse: [^self].\rself closeAndUnschedule! !\r!StandardSystemController methodsFor: 'scheduling' stamp: 'ssa 3/10/2010 10:07'!\rcloseAndUnscheduleIfOkWithModelNoTerminate\r\"Erase the receiver's view and remove it from the collection of scheduled \rviews. IF its ok with my model.  This catches unsaved changes\"\r\rmodel okToChange ifFalse: [^self].\rself closeAndUnscheduleNoTerminate! !\r!MSWSystemController methodsFor: 'accessing' stamp: 'ar 1/22/98 23:30'!\rlastSystemActivity\r    ^lastSystemActivity ifNil:[lastSystemActivity _ 0]! !\r!MSWSystemController methodsFor: 'accessing' stamp: 'ar 1/22/98 23:30'!\rlastSystemActivity: aNumber\r    lastSystemActivity _ aNumber! !\r!MSWSystemController methodsFor: 'basic control sequence' stamp: 'ssa 9/11/2009 16:36'!\rredButtonActivity\r| box p |\rp _ sensor cursorPoint.\r  ((box _ view systemBoxFrame) containsPoint: p)\r\t\t ifTrue: [^self systemActivity].\r  ((box _ view shrinkBoxFrame) containsPoint: p)\r  \t\t ifTrue: [Utilities awaitMouseUpIn: box\r\t\t\t\trepeating: [] ifSucceed: [self collapse. ^ self].\r   \t\t\t\t^ self].\r ((box _ view growBoxFrame) containsPoint: p)\r\t\tifTrue: [Utilities awaitMouseUpIn: box repeating: [] ifSucceed:\t[view isCollapsed\r\t\t\t ifTrue:[self expand]\r\t\t      ifFalse:[view isFullScreen \r\t\t\t\t\tifTrue:[self restore] \r\t\t\t\t\tifFalse:[self fullScreen]].\r\t\t\t ^ self].\r\t   ^ self].\r super redButtonActivity.! !\r!MSWSystemController methodsFor: 'basic control sequence' stamp: 'ar 1/22/98\r23:33'!\rsystemActivity  \"The system menu button has been pressed\"       | time |\r    time _ Time millisecondClockValue.      (time- self lastSystemActivity) < self\rdoubleClickTime                 ifTrue:[^self close].   self lastSystemActivity: time.  ^self\rblueButtonActivity! !\r!MSWSystemController methodsFor: 'menu messages' stamp: 'ar 1/22/98 22:41'!\rrestore\r    view restore! !\r!MSWSystemController methodsFor: 'private' stamp: 'ar 1/22/98 23:32'!\rdoubleClickTime\r    \"Return the maximum delay time for double clicks.\r    This value is in milliseconds.\"\r    ^500! !\r!MSWSystemController methodsFor: 'borders' stamp: 'ssa 1/25/98 00:00'!\radjustWindowCorners \r    | box cornerBox p clicked f2 |\r    box _ view windowBox.\r    clicked _ false.\r    #(topLeft topRight bottomRight bottomLeft)\r            do: [:readCorner |\r                    cornerBox _ ((box insetBy: 2) perform: readCorner) - (4@4) extent: 8@8.\r                    (cornerBox containsPoint: sensor cursorPoint)\r                            ifTrue: \r                            [\"Display reverse: cornerBox.\"\r                            (Cursor perform: readCorner) showWhile:\r                                    [[(cornerBox containsPoint: (p _ sensor cursorPoint))\r                                            and: [(clicked _ sensor anyButtonPressed) not]]\r                                            whileTrue.\r                            \"Display reverse: cornerBox.\"\r                            clicked ifTrue:\r                                    [view newFrame:\r                                            [:f | p _ sensor cursorPoint.\r                                            readCorner = #topLeft ifTrue:\r                                                    [f2 _ p corner: f bottomRight].\r                                            readCorner = #bottomLeft ifTrue:\r                                                    [f2 _ (f withBottom: p y) withLeft: p x].\r                                            readCorner = #bottomRight ifTrue:\r                                                    [f2 _ f topLeft corner: p].\r                                            readCorner = #topRight ifTrue:\r                                                    [f2 _ (f withTop: p y) withRight: p x].\r                                            f2]]]]].\r    ^ clicked! !\r!MSWSystemController methodsFor: 'borders' stamp: 'ssa 1/24/98 23:47'!\rcursorOnBorder \r    | cp i box |\r    view isCollapsed ifTrue: [^ false].\r    cp _ sensor cursorPoint.\r    ((view labelDisplayBox insetBy: 5@5) containsPoint: cp)\r            ifTrue: [^ false].\r    (i _ view subViews findFirst: [:v | v displayBox containsPoint: cp]) = 0\r            ifTrue: [box _ view windowBox]\r            ifFalse: [box _ (view subViews at: i) insetDisplayBox].\r    ^ ((box insetBy: 3) containsPoint: cp) not\r            and: [(box expandBy: 4) containsPoint: cp]! !\r!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\rascent: anObject\r\"Set the value of ascent\"\r\rascent _ anObject! !\r!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\rcharacterToGlyphMap: anObject\r\"Set the value of characterToGlyphMap\"\r\rcharacterToGlyphMap _ anObject! !\r!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\rderivativeFonts\r\"Answer the value of derivativeFonts\"\r\rderivativeFonts isNil ifTrue:[self derivativeFonts: nil].\r^ derivativeFonts! !\r!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\rderivativeFonts: anObject\r\"Set the value of derivativeFonts\"\r\rderivativeFonts _ anObject! !\r!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\rdescent: anObject\r\"Set the value of descent\"\r\rdescent _ anObject! !\r!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\remphasis\r\"Answer the value of emphasis\"\r\remphasis isNil ifTrue:[self emphasis: nil].\r^ emphasis! !\r!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\rglyphs: anObject\r\"Set the value of glyphs\"\r\rglyphs _ anObject! !\r!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\rmaxAscii: anObject\r\"Set the value of maxAscii\"\r\rmaxAscii _ anObject! !\r!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\rmaxWidth: anObject\r\"Set the value of maxWidth\"\r\rmaxWidth _ anObject! !\r!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\rminAscii: anObject\r\"Set the value of minAscii\"\r\rminAscii _ anObject! !\r!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\rpointSize: anObject\r\"Set the value of pointSize\"\r\rpointSize _ anObject! !\r!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\rraster\r\"Answer the value of raster\"\r\rraster isNil ifTrue:[self raster: nil].\r^ raster! !\r!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\rraster: anObject\r\"Set the value of raster\"\r\rraster _ anObject! !\r!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\rstrikeLength\r\"Answer the value of strikeLength\"\r\rstrikeLength isNil ifTrue:[self strikeLength: nil].\r^ strikeLength! !\r!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\rstrikeLength: anObject\r\"Set the value of strikeLength\"\r\rstrikeLength _ anObject! !\r!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\rsubscript\r\"Answer the value of subscript\"\r\rsubscript isNil ifTrue:[self subscript: nil].\r^ subscript! !\r!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\rsubscript: anObject\r\"Set the value of subscript\"\r\rsubscript _ anObject! !\r!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\rsuperscript\r\"Answer the value of superscript\"\r\rsuperscript isNil ifTrue:[self superscript: nil].\r^ superscript! !\r!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\rsuperscript: anObject\r\"Set the value of superscript\"\r\rsuperscript _ anObject! !\r!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\rtype\r\"Answer the value of type\"\r\rtype isNil ifTrue:[self type: nil].\r^ type! !\r!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\rtype: anObject\r\"Set the value of type\"\r\rtype _ anObject! !\r!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\rxOffset\r\"Answer the value of xOffset\"\r\rxOffset isNil ifTrue:[self xOffset: nil].\r^ xOffset! !\r!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\rxOffset: anObject\r\"Set the value of xOffset\"\r\rxOffset _ anObject! !\r!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\rxTable: anObject\r\"Set the value of xTable\"\r\rxTable _ anObject! !\r!StrikeFont methodsFor: 'printing' stamp: ''!\rarchiveOn: aStream\r\"record this instance by its name. On dearchive, the name corresponding to this instance will be looked up.\"\r\raStream\r\tstoreObject: self;\r\tstoreClass: self class;\r\tstore: self name! !\r!StrikeFont class methodsFor: 'archiving' stamp: ''!\rarchiveVersion\r\"This version archives only the name of the strikeFont. On dearchive, the name will be looked up and the appropriate strike font existing in that image will be returned.\"\r\r^3! !\r!StrikeFont class methodsFor: 'archiving' stamp: ''!\rdearchive: versionNumber from: aStream\r\r| aString sf |\rversionNumber = self archiveVersion\r\tifFalse:[^super dearchiveFrom: aStream].\raString _ aStream read: String.\rsf _ self allInstances\r\t\tdetect:[:inst| inst name = aString]\r\t\tifNone:[self error:'missing strike font for this image'].\raStream storeObject: sf.\r^sf! !\r!String methodsFor: 'converting' stamp: 'ssa 1/20/2010 10:34'!\rasParagraphWithStyle: aTextStyle\r\"Answer a Paragraph whose text string is the receiver.\"\r\r^Paragraph withText: self asText style: aTextStyle! !\r!String methodsFor: 'converting' stamp: 'ssa 9/7/2009 09:29'!\rasSmalltalkObject\r\r^Compiler evaluate: self! !\r!String methodsFor: 'converting' stamp: 'ssa 7/7/2010 20:26'!\rwithoutFirst: n\r\"Answer a string without my first n characters.\"\r^self size > n \r\tifFalse:['']\r\tifTrue:[self copyFrom: n+1 to: self size]! !\r!String methodsFor: 'converting' stamp: 'ssa 4/20/2010 15:52'!\rwithoutLast: n\r\"Answer a string without my last n characters.\"\r^self size > n \r\tifFalse:['']\r\tifTrue:[self copyFrom: 1 to: self size-n]! !\r!String methodsFor: 'printing' stamp: ''!\rarchiveOn: aStream\raStream\r\tstoreObject: self;\r\tstoreClass: self class;\r\tstore: self! !\r!String methodsFor: 'user interface' stamp: 'ssa 1/21/2010 11:47'!\rbuttonIt\r\"  'Display reverse' buttonIt  \"\r\"launch a button to evaluate this string\"\r| topView someCode extent |\rsomeCode _ self.\rextent _ (someCode asText asDisplayText extent + (30@20)) max: 80@30.\rtopView := RVMStandardSystemView new.\rtopView noLabel.\rtopView borderWidth:1.\rtopView minimumSize: extent .\rtopView maximumSize: extent.\r\rtopView addSubView: (RVMButtonView label: someCode action:[Compiler evaluate: someCode]).\rtopView controller open! !\r!String class methodsFor: 'instance creation' stamp: ''!\rdearchiveFrom: aStream\r\r| anObject |\ranObject _ aStream read: self.\raStream storeObject: anObject.\r^anObject! !\r!StringHolder methodsFor: 'accessing' stamp: 'tk 4/3/98 22:50'!\rcontentsSelection\r\"Return the interval of text in the code pane to select when I set the pane's contents\"\r\r^ 1 to: 0  \"null selection\"! !\r!Browser methodsFor: 'accessing' stamp: 'ssa 9/9/2009 09:01'!\rclassOrganizer\r\"Answer the value of classOrganizer\"\r\rclassOrganizer isNil ifTrue:[self classOrganizer: nil].\r^ classOrganizer! !\r!Browser methodsFor: 'accessing' stamp: 'ssa 9/9/2009 09:01'!\rclassOrganizer: anObject\r\"Set the value of classOrganizer\"\r\rclassOrganizer _ anObject! !\r!Browser methodsFor: 'accessing' stamp: 'ssa 9/9/2009 09:40'!\rlastClassSelected\r\"Answer the value of lastClassSelected\"\r\rlastClassSelected isNil ifTrue:[self lastClassSelected: self selectedClassOrMetaClass].\r^ lastClassSelected! !\r!Browser methodsFor: 'accessing' stamp: 'ssa 9/9/2009 09:01'!\rlastClassSelected: anObject\r\"Set the value of lastClassSelected\"\r\rlastClassSelected _ anObject! !\r!Browser methodsFor: 'accessing' stamp: 'ssa 9/9/2009 09:01'!\rmetaClassOrganizer\r\"Answer the value of metaClassOrganizer\"\r\rmetaClassOrganizer isNil ifTrue:[self metaClassOrganizer: nil].\r^ metaClassOrganizer! !\r!Browser methodsFor: 'accessing' stamp: 'ssa 9/9/2009 09:01'!\rmetaClassOrganizer: anObject\r\"Set the value of metaClassOrganizer\"\r\rmetaClassOrganizer _ anObject! !\r!Browser methodsFor: 'accessing' stamp: 'ssa 9/9/2009 09:01'!\rsystemOrganizer\r\"Answer the value of systemOrganizer\"\r\rsystemOrganizer isNil ifTrue:[self systemOrganizer: nil].\r^ systemOrganizer! !\r!Browser methodsFor: 'class functions' stamp: 'ssa 8/27/2009 05:09'!\rcreateInstVarAccessors\r\"Create getters and setters for all inst vars defined at the level of the current class selection, except do NOT clobber or override any selectors already understood by the instances of the selected class\"\r\r| aClass newMessage setter |\r(aClass _ self selectedClassOrMetaClass) ifNotNil:\r\t[aClass instVarNames do: \r\t\t[:aName |\r\t\t\t(aClass canUnderstand: aName asSymbol)\r\t\t\t\tifFalse:\r\t\t\t\t\t[newMessage _ aName, '\r\"Answer the value of ', aName, '\"\r\r',aName,' isNil ifTrue:[self ',aName,': nil].\r^ ', aName.\r\t\t\t\t\taClass compile: newMessage classified: 'accessing' notifying: nil].\r\t\t\t(aClass canUnderstand: (setter _ aName, ':') asSymbol)\r\t\t\t\tifFalse:\r\t\t\t\t\t[newMessage _ setter, ' anObject\r\"Set the value of ', aName, '\"\r\r', aName, ' _ anObject'.\r\t\t\t\t\taClass compile: newMessage classified: 'accessing' notifying: nil]]].\rself changed: #messageCategoryList.\rself changed: #messageList.\rself changed: #relabel.\rself contentsChanged.\rself selectMessageCategoryNamed:'accessing'! !\r!Browser methodsFor: 'class list' stamp: 'ssa 9/9/2009 09:03'!\rclassListIndex: anInteger \r\"Set anInteger to be the index of the current class selection.\"\r\r| className |\r\rclassListIndex _ anInteger.\rself lastClassSelected: self selectedClassOrMetaClass.\rself setClassOrganizer.\rmessageCategoryListIndex _ 0.\rmessageListIndex _ 0.\rself classCommentIndicated\r\tifTrue: []\r\tifFalse: [self editSelection: (anInteger = 0\r\t\t\t\tifTrue: [metaClassIndicated | (systemCategoryListIndex == 0)\r\t\t\t\t\tifTrue: [#none]\r\t\t\t\t\tifFalse: [#newClass]]\r\t\t\t\tifFalse: [#editClass])].\rcontents _ nil.\rself selectedClass isNil\r\tifFalse: [className _ self selectedClass name.\r\t\t\t\t(RecentClasses includes: className)\r\t\t\tifTrue: [RecentClasses remove: className].\r\t\tRecentClasses addFirst: className.\r\t\tRecentClasses size > 16\r\t\t\tifTrue: [RecentClasses removeLast]].\rself changed: #classSelectionChanged.\rself changed: #classCommentText.\rself changed: #classListIndex.\t\"update my selection\"\rself changed: #messageCategoryList.\rself changed: #messageList.\rself changed: #relabel.\rself contentsChanged! !\r!Browser methodsFor: 'initialize-release' stamp: 'ssa 9/10/2009 13:32'!\rsetClass: aBehavior selector: aSymbol \r\"Set the state of a new, uninitialized Browser.\"\r\r| isMeta aClass messageCatIndex |\raBehavior ifNil: [^ self].\r(aBehavior isKindOf: Metaclass)\r\tifTrue: [\r\t\tisMeta _ true.\r\t\taClass _ aBehavior soleInstance]\r\tifFalse: [\r\t\tisMeta _ false.\r\t\taClass _ aBehavior].\rself selectCategoryForClass: aClass.\rself classListIndex: (\r\t(SystemOrganization listAtCategoryNamed: self selectedSystemCategoryName)\r\t\tindexOf: aClass name).\rself metaClassIndicated: isMeta.\raSymbol ifNil: [^ self].\rmessageCatIndex _ aBehavior organization numberOfCategoryOfElement: aSymbol.\rself messageCategoryListIndex: (messageCatIndex > 0\r\tifTrue: [messageCatIndex + 1]\r\tifFalse: [0]).\rmessageCatIndex = 0 ifTrue: [^ self].\rself messageListIndex: (\r\t(aBehavior organization listAtCategoryNumber: messageCatIndex)\r\t\tindexOf: aSymbol).! !\r!Browser methodsFor: 'message functions' stamp: 'ssa 9/9/2009 09:05'!\rdefineMessage: aString notifying: aController \r\"Compile the expressions in aString. Notify aController if a syntax error \roccurs. Install the compiled method in the selected class classified under \rthe currently selected message category name. Answer true if \rcompilation succeeds, false otherwise.\"\r| selectedMessageName selector category oldMessageList |\rselectedMessageName _ self selectedMessageName.\roldMessageList _ self messageList.\rcontents _ nil.\rselector _ self lastClassSelected \"selectedClassOrMetaClass\"\r\t\t\tcompile: aString\r\t\t\tclassified: (category _ self selectedMessageCategoryName)\r\t\t\tnotifying: aController.\rselector == nil ifTrue: [^ false].\rcontents _ aString copy.\rselector ~~ selectedMessageName\r\tifTrue: \r\t\t[category = ClassOrganizer nullCategory\r\t\t\tifTrue: [self changed: #classSelectionChanged.\r\t\t\t\t\tself changed: #classList.\r\t\t\t\t\tself messageCategoryListIndex: 1].\r\t\tself setClassOrganizer.  \"In case organization not cached\"\r\t\t(oldMessageList includes: selector)\r\t\t\tifFalse: [self changed: #messageList].\r\t\tself messageListIndex: (self messageList indexOf: selector)].\r^ true! !\r!Browser methodsFor: 'message functions' stamp: 'ssa 9/9/2009 09:06'!\rdefineMessageFrom: aString notifying: aController\r\"Compile the expressions in aString. Notify aController if a syntax error occurs. Install the compiled method in the selected class classified under  the currently selected message category name. Answer the selector obtained if compilation succeeds, nil otherwise.\"\r| selectedMessageName selector category oldMessageList |\rselectedMessageName _ self selectedMessageName.\roldMessageList _ self messageList.\rcontents _ nil.\rselector _ (Parser new parseSelector: aString).\r(self metaClassIndicated\r\tand: [(self lastClassSelected \"selectedClassOrMetaClass\" includesSelector: selector) not\r\tand: [Metaclass isScarySelector: selector]])\r\tifTrue: [\"A frist-time definition overlaps the protocol of Metaclasses\"\r\t\t\t(self confirm: ((selector , ' is used in the existing class system.\rOverriding it could cause serious problems.\rIs this really what you want to do?') asText makeBoldFrom: 1 to: selector size))\r\t\t\tifFalse: [^nil]].\rselector _ self lastClassSelected \"selectedClassOrMetaClass\"\r\t\t\tcompile: aString\r\t\t\tclassified: (category _ self selectedMessageCategoryName)\r\t\t\tnotifying: aController.\rselector == nil ifTrue: [^ nil].\rcontents _ aString copy.\rselector ~~ selectedMessageName\r\tifTrue: \r\t\t[category = ClassOrganizer nullCategory\r\t\t\tifTrue: [self changed: #classSelectionChanged.\r\t\t\t\t\tself changed: #classList.\r\t\t\t\t\tself messageCategoryListIndex: 1].\r\t\tself setClassOrganizer.  \"In case organization not cached\"\r\t\t(oldMessageList includes: selector)\r\t\t\tifFalse: [self changed: #messageList].\r\t\tself messageListIndex: (self messageList indexOf: selector)].\r^ selector! !\r!Browser methodsFor: 'metaclass' stamp: 'ssa 9/10/2009 08:45'!\rmetaClassIndicated: trueOrFalse \r\"Indicate whether browsing instance or class messages.\"\r\rmetaClassIndicated _ trueOrFalse.\rself setClassOrganizer.\rsystemCategoryListIndex > 0 ifTrue:\r\t[self editSelection: (classListIndex = 0\r\t\tifTrue: [metaClassIndicated\r\t\t\tifTrue: [#none]\r\t\t\tifFalse: [#newClass]]\r\t\tifFalse: [#editClass])].\rmessageCategoryListIndex _ 0.\rmessageListIndex _ 0.\rcontents _ nil.\rself changed: #classSelectionChanged.\rself changed: #messageCategoryList.\rself changed: #messageList.\rself changed: #contents.\rself changed: #annotation.\rself decorateButtons.\rself lastClassSelected: self selectedClassOrMetaClass.\r! !\r!FileList methodsFor: 'file list menu' stamp: 'ssa 8/28/2009 19:44'!\rfileContentsMenu: aMenu shifted: shifted\r\"Construct aMenu to have items appropriate for the file browser's code pane, given the shift state provided\"\r\r| shiftMenu services maybeLine extraLines |\rshifted ifTrue:\r\t[shiftMenu _ ParagraphEditor shiftedYellowButtonMenu.\r\t^ aMenu \r\t\tlabels: shiftMenu labelString \r\t\tlines: shiftMenu lineArray\r\t\tselections: shiftMenu selections].\rfileName ifNotNil:\r\t[services _ OrderedCollection new.\r\t(#(briefHex briefFile needToGetBriefHex needToGetBrief) includes: brevityState) ifTrue:\r\t\t[services add: self serviceGet].\r\t(#(fullHex briefHex needToGetFullHex needToGetBriefHex) includes: brevityState) ifFalse:\r\t\t[services add: self serviceGetHex].\r\tmaybeLine _ services size.\r\t(#('st' 'cs') includes: self suffixOfSelectedFile) ifTrue:\r\t\t[services addAll:\r\t\t\t(self servicesFromSelectorSpecs:\r\t\t\t\t#(fileIntoNewChangeSet: fileIn: browseChangesFile: browseFile:))].\r\t(#('gif' 'jpg' 'bmp') includes: self suffixOfSelectedFile) ifTrue:\r\t\t[services halt addAll:\r\t\t\t(self servicesFromSelectorSpecs:\r\t\t\t\t#(importGraphic))].\r\r\textraLines _ OrderedCollection new.\r\tmaybeLine > 0 ifTrue: [extraLines add: maybeLine].\r\tservices size > maybeLine ifTrue: [extraLines add: services size].\r\taMenu \r\t\taddServices: services\r\t\tfor: self fullName\r\t\textraLines: extraLines].\r\raMenu addList: {\r\t\t{'find...(f)' translated.\t\t#find}.\r\t\t{'find again (g)' translated.\t\t#findAgain}.\r\t\t{'set search string (h)' translated.\t#setSearchString}.\r\t\t#-.\r\t\t{'do again (j)' translated.\t\t#again}.\r\t\t{'undo (z)' translated.\t\t\t#undo}.\r\t\t#-.\r\t\t{'copy (c)' translated.\t\t\t#copySelection}.\r\t\t{'cut (x)' translated.\t\t\t#cut}.\r\t\t{'paste (v)' translated.\t\t#paste}.\r\t\t{'paste...' translated.\t\t\t#pasteRecent}.\r\t\t#-.\r\t\t{'do it (d)' translated.\t\t#doIt}.\r\t\t{'print it (p)' translated.\t\t#printIt}.\r\t\t{'inspect it (i)' translated.\t\t#inspectIt}.\r\t\t{'fileIn selection (G)' translated.\t#fileItIn}.\r\t\t#-.\r\t\t{'accept (s)' translated.\t\t#accept}.\r\t\t{'cancel (l)' translated.\t\t#cancel}.\r\t\t#-.\r\t\t{'more...' translated.\t\t\t#shiftedYellowButtonActivity}}.\r\r\r^ aMenu\r! !\r!FileList methodsFor: 'file list menu' stamp: 'ssa 8/28/2009 19:14'!\rfileSelectedMenu: aMenu\r\r| firstItems secondItems thirdItems n1 n2 n3 services |\rfirstItems _ self itemsForFile: self fullName.\rsecondItems _ self itemsForAnyFile.\rthirdItems _ self itemsForNoFile.\rn1 _ firstItems size.\rn2 _ n1 + secondItems size.\rn3 _ n2 + thirdItems size.\rservices _ firstItems, secondItems, thirdItems, self serviceAllFileOptions.\rservices do: [ :svc | svc addDependent: self ].\r^ aMenu \r\taddServices2: services \r\tfor: self\r\textraLines: (Array with: n1 with: n2 with: n3)\r! !\r!FileList methodsFor: 'file list menu' stamp: 'BG 11/2/2003 21:04'!\rmyServicesForFile: fullName suffix: suffix\r\r^(FileStream isSourceFileSuffix: suffix)\r\tifTrue: [ #() ]\r\tifFalse: [ #() ]! !\r!FileList class methodsFor: 'instance creation' stamp: 'ssa 8/22/2009 14:57'!\ropen\r\"Open a view of an instance of me on the default directory.\"\r\"Added scrollingView to support Windoze - ssa\"\r\"FileList open\"\r| dir aFileList topView volListView templateView fileListView fileContentsView |\rWorld ifNotNil: [^ self openAsMorph].\r\rdir _ FileDirectory default.\raFileList _ self new directory: dir.\rtopView _ StandardSystemView new.\rtopView\r\tmodel: aFileList;\r\tlabel: dir pathName;\r\tminimumSize: 200@200.\rtopView borderWidth: 1.\r\rvolListView _ PluggableListView on: aFileList\r\tlist: #volumeList\r\tselected: #volumeListIndex\r\tchangeSelected: #volumeListIndex:\r\tmenu: #volumeMenu:.\rvolListView autoDeselect: false.\rvolListView window: (0@0 extent: 80@45).\rtopView addSubView: volListView.\r\rtemplateView _ PluggableTextView on: aFileList\r\ttext: #pattern\r\taccept: #pattern:.\rtemplateView scrollingView askBeforeDiscardingEdits: false.\rtemplateView window: (0@0 extent: 80@15).\rtopView addSubView: templateView below: volListView.\r\rfileListView _ PluggableListView on: aFileList\r\tlist: #fileList\r\tselected: #fileListIndex\r\tchangeSelected: #fileListIndex:\r\tmenu: #fileListMenu:.\rfileListView window: (0@0 extent: 120@60).\rtopView addSubView: fileListView toRightOf: volListView.\r\"fileListView scrollingView controller terminateDuringSelect: true. \" \"Pane to left may change under scrollbar\"\r\rfileContentsView _ PluggableTextView on: aFileList\r\ttext: #contents accept: #put:\r\treadSelection: #contentsSelection menu: #fileContentsMenu:shifted:.\rfileContentsView window: (0@0 extent: 200@140).\rtopView addSubView: fileContentsView below: templateView.\r\rtopView controller open.\r! !\r!HierarchyBrowser methodsFor: 'initialization' stamp: 'ssa 9/10/2009 13:34'!\rsetClass: aBehavior selector: aSymbol\r\"Set the state of a new, uninitialized Browser.\"\r\r| isMeta aClass messageCatIndex |\raBehavior ifNil: [^ self].\r(aBehavior isKindOf: Metaclass)\r\tifTrue: [\r\t\tisMeta _ true.\r\t\taClass _ aBehavior soleInstance]\r\tifFalse: [\r\t\tisMeta _ false.\r\t\taClass _ aBehavior].\rself selectCategoryForClass: aClass.\rself selectClass: aClass.\rself metaClassIndicated: isMeta.\raSymbol ifNil: [^ self].\rmessageCatIndex _ aBehavior organization numberOfCategoryOfElement: aSymbol.\rself messageCategoryListIndex: (messageCatIndex > 0\r\tifTrue: [messageCatIndex + 1]\r\tifFalse: [0]).\rmessageCatIndex = 0 ifTrue: [^ self].\rself messageListIndex: (\r\t(aBehavior organization listAtCategoryNumber: messageCatIndex)\r\t\tindexOf: aSymbol).! !\r!HierarchyBrowser class methodsFor: 'as yet unclassified' stamp: 'ssa 3/1/2010 13:54'!\rnewFor: aClass\r\"Open a new HierarchyBrowser on the given class\"\rself newFor: aClass labeled: nil\r\r\"HierarchyBrowser newFor: Boolean\"! !\r!HierarchyBrowser class methodsFor: 'as yet unclassified' stamp: 'ssa 3/1/2010 13:54'!\rnewFor: aClass labeled: aLabel\r\"Open a new HierarchyBrowser on the given class, using aLabel as the window title.\"\r\r|  newBrowser |\rnewBrowser _ self new initHierarchyForClass: aClass.\rBrowser openBrowserView: (newBrowser openSystemCatEditString: nil)\r\tlabel: (aLabel isNil ifTrue:[newBrowser labelString]ifFalse:[aLabel])\r\r\"HierarchyBrowser newFor: Boolean labeled: 'Testing'\"! !\r!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/10/2009 13:29'!\rchildrenOf: anObject\r\r^anObject subobjects! !\r!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/11/2009 15:44'!\rcurrentSelection\r\"Answer the value of currentSelection\"\r\rcurrentSelection isNil ifTrue:[self currentSelection: nil].\r^ currentSelection! !\r!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/11/2009 15:44'!\rcurrentSelection: anObject\r\"Set the value of currentSelection\"\r\rcurrentSelection _ anObject! !\r!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 3/1/2010 14:12'!\rgetClassList\r\r|  prev classes |\rclasses _ OrderedCollection new.\r centralClass allSuperclasses reverseDo:  [:aClass | classes add: aClass].\rclasses add:  centralClass.\r centralClass subclassesDo: [:aClass| classes add: aClass].\rprev _nil.\r^(classes collect:[:cls| prev _ ClassHierarchyExplorerWrapper with: cls name: cls name model: self parent: prev]) asArray! !\r!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/9/2009 12:02'!\rinitializeList\r\rself list do:[:each| self levels at: each put:0]! !\r!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/9/2009 12:01'!\rlevelOf: anItem\r\r^self levels at: anItem ifAbsent:[0]! !\r!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/9/2009 12:01'!\rlevels\r\"Answer the value of levels\"\r\rlevels isNil ifTrue:[self levels: Dictionary new].\r^ levels! !\r!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/9/2009 12:00'!\rlevels: anObject\r\"Set the value of levels\"\r\rlevels _ anObject! !\r!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/10/2009 13:39'!\rlist\r\"Answer the value of list\"\r\rlist isNil ifTrue:[self list: (OrderedCollection with:self subject )].\r^ list! !\r!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/10/2009 13:36'!\rlist: anObject\r\"Set the value of list\"\r\rlist _ anObject asOrderedCollection! !\r!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/11/2009 15:44'!\rmyBrowser\r\"Answer the value of myBrowser\"\r\rmyBrowser isNil ifTrue:[self myBrowser: nil].\r^ myBrowser! !\r!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/11/2009 15:44'!\rmyBrowser: anObject\r\"Set the value of myBrowser\"\r\rmyBrowser _ anObject! !\r!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/9/2009 11:42'!\ropenItems\r\"Answer the value of openItems\"\r\ropenItems isNil ifTrue:[self openItems: Set new].\r^ openItems! !\r!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/9/2009 11:42'!\ropenItems: anObject\r\"Set the value of openItems\"\r\ropenItems _ anObject! !\r!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/9/2009 13:28'!\rprogenyOf: anObject\r\r| all |\rall _ (self childrenOf: anObject)copy.\rall isEmpty ifTrue:[^all].\rall copy do:[:each| all addAll: (self progenyOf: each)].\r^all ! !\r!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/9/2009 11:18'!\rselection\r\"Answer the value of selection\"\r\rselection isNil ifTrue:[self selection: nil].\r^ selection! !\r!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/9/2009 17:15'!\rselection: anObject\r\"Set the value of selection\"\r\rselection _ anObject .\r! !\r!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 7/7/2010 12:40'!\rsubject\r\"Answer the value of subject\"\r\rsubject isNil ifTrue:[self subject: Object].\r^ subject! !\r!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/10/2009 08:25'!\rsubject: anObject\r\"Set the value of subject\"\r\rsubject _ anObject! !\r!HierarchyOutlineBrowser methodsFor: 'user interfacing' stamp: 'ssa 3/1/2010 14:23'!\ropenSystemCatEditString: aString\r\"Create a pluggable version of all the views for a Browser, including views and controllers.  The top list view is of the currently selected system class category--a single item list.\"\r| systemCategoryListView classListView messageCategoryListView messageListView browserCodeView topView switchView y annotationPane underPane optionalButtonsView |\r\r\rtopView _ (StandardSystemView new) model: self.\rtopView borderWidth: 1.\r\t\"label and minSize taken care of by caller\"\r\rsystemCategoryListView _ PluggableListView on: self\r\tlist: #systemCategorySingleton\r\tselected: #indexIsOne \r\tchangeSelected: #indexIsOne:\r\tmenu: #systemCatSingletonMenu:\r\tkeystroke: #systemCatSingletonKey:from:.\rsystemCategoryListView window: (0 @ 0 extent: 200 @ 12).\rtopView addSubView: systemCategoryListView.\r\rclassListView _ LyPluggableOutlineView on: self\r\tlist: #getClassList\r\tselected: #currentSelection\r\tchangeSelected: #currentSelection:\r\tmenu: #classListMenu:shifted:\r\tkeystroke: #classListKey:from:.\rclassListView window: (0 @ 0 extent: 67 @ 62).\rtopView addSubView: classListView below: systemCategoryListView.\r\rmessageCategoryListView _ PluggableListView on: self\r\tlist: #messageCategoryList\r\tselected: #messageCategoryListIndex\r\tchangeSelected: #messageCategoryListIndex:\r\tmenu: #messageCategoryMenu:.\rmessageCategoryListView controller terminateDuringSelect: true.\rmessageCategoryListView window: (0 @ 0 extent: 66 @ 70).\rtopView addSubView: messageCategoryListView toRightOf: classListView.\r\rswitchView _ self buildInstanceClassSwitchView.\rswitchView \r\twindow: switchView window \r\tviewport: (classListView viewport bottomLeft \r\t\t\t\tcorner: messageCategoryListView viewport bottomLeft).\rswitchView borderWidth: 1.\rtopView addSubView: switchView below: classListView.\r\rmessageListView _ PluggableListView on: self\r\tlist: #messageList\r\tselected: #messageListIndex\r\tchangeSelected: #messageListIndex:\r\tmenu: #messageListMenu:shifted:\r\tkeystroke: #messageListKey:from:.\rmessageListView menuTitleSelector: #messageListSelectorTitle.\rmessageListView window: (0 @ 0 extent: 67 @ 70).\rtopView addSubView: messageListView toRightOf: messageCategoryListView.\r\r self wantsAnnotationPane\r\tifTrue:\r\t\t[annotationPane _ PluggableTextView on: self\r\t\t\ttext: #annotation accept: nil\r\t\t\treadSelection: nil menu: nil.\r\t\tannotationPane window: (0@0 extent: 200@self optionalAnnotationHeight).\r\t\ttopView addSubView: annotationPane below: switchView.\r\t\ty _ 110 - 12 - self optionalAnnotationHeight.\r\t\tunderPane _ annotationPane]\r\tifFalse:\r\t\t[y _ 110 - 12.\r\t\tunderPane _ switchView].\r\rself wantsOptionalButtons ifTrue:\r\t[optionalButtonsView _ self buildOptionalButtonsView.\r\toptionalButtonsView borderWidth: 1.\r\ttopView addSubView: optionalButtonsView below: underPane.\r\tunderPane _ optionalButtonsView.\r\ty _ y - self optionalButtonHeight].\r\rbrowserCodeView _ PluggableTextView on: self \r\t\ttext: #contents accept: #contents:notifying:\r\t\treadSelection: #contentsSelection menu: #codePaneMenu:shifted:.\rbrowserCodeView window: (0@0 extent: 200@y).\rtopView addSubView: browserCodeView below: underPane.\raString ifNotNil: [browserCodeView editString: aString.\r\t\tbrowserCodeView hasUnacceptedEdits: true].\rtopView setUpdatablePanesFrom: #(getClassList messageCategoryList messageList).\r^ topView! !\r!HierarchyOutlineBrowser methodsFor: 'menu support' stamp: 'ssa 9/10/2009 14:42'!\rinspectSelection\r\rself selection inspect! !\r!HierarchyOutlineBrowser methodsFor: 'menu support' stamp: 'ssa 9/10/2009 14:47'!\rmenu: aMenu\r\r\raMenu add: 'inspect' action: #inspectSelection.\raMenu add: 'outline' action: #outlineSelection.\r^ aMenu! !\r!HierarchyOutlineBrowser methodsFor: 'menu support' stamp: 'ssa 9/10/2009 14:43'!\routlineSelection\r\rself selection outline! !\r!HierarchyOutlineBrowser methodsFor: 'menu support' stamp: 'RAA 4/7/1999 16:53'!\rperform: selector orSendTo: otherTarget\r\"Selector was just chosen from a menu by a user.  If can respond, then\rperform it on myself. If not, send it to otherTarget, presumably the\reditPane from which the menu was invoked.\"\r\r(self respondsTo: selector)\r\tifTrue: [^ self perform: selector]\r\tifFalse: [^ otherTarget perform: selector]! !\r!HierarchyOutlineBrowser methodsFor: 'opening/closing' stamp: 'ssa 9/9/2009 13:02'!\rhasChildren: anObject\r\r^(self childrenOf: anObject) notEmpty ! !\r!HierarchyOutlineBrowser methodsFor: 'opening/closing' stamp: 'ssa 9/9/2009 14:07'!\rhideChildrenOfSelection\r\r| kids |\rself openItems remove: self selection.\rkids _ self progenyOf: self selection.\rkids do:[:each| self levels removeKey: each ifAbsent:[].\r\tself openItems remove: each ifAbsent:[]].\rself list removeAll: kids ifAbsent:[]\r! !\r!HierarchyOutlineBrowser methodsFor: 'opening/closing' stamp: 'ssa 9/9/2009 11:42'!\risOpen: anItem\r\r^self openItems includes: anItem! !\r!HierarchyOutlineBrowser methodsFor: 'opening/closing' stamp: 'ssa 9/9/2009 12:10'!\rshowChildrenOfSelection\r\r| kids nextLevel |\rself openItems add: self selection.\rnextLevel _ (self levelOf: self selection) + 1.\rkids _ self childrenOf: self selection.\rkids isEmpty ifTrue:[^self error:'should never try to show children of an childless object'].\rkids do:[:each| self levels at: each put: nextLevel].\rself list addAll: kids after: self selection! !\r!HierarchyOutlineBrowser methodsFor: 'opening/closing' stamp: 'ssa 9/10/2009 07:30'!\rtoggleSelection\r\rself selection isNil ifTrue:[^self].\r(self isOpen: self selection)\r\tifTrue:[self hideChildrenOfSelection]\r\tifFalse:[self showChildrenOfSelection].\rself changed:#list! !\r!HierarchyOutlineBrowser methodsFor: 'arrow keys' stamp: 'ssa 9/9/2009 14:47'!\rarrowKey: aChar from: view\r\"Process the up and down arrows in a list pane.  Note that the listView tells us what index variable, how to get the list, and how to move the index.  Derived from a Martin Pammer submission, 02/98\"\r\r | keyEvent oldSelection nextSelection max min howMany |\r\r(#(1 4 11 12 30 31) includes: (keyEvent _ aChar asciiValue)) ifFalse:\r\t[\r\t\t^ self].\r\r oldSelection := view getCurrentSelectionIndex.\r nextSelection := oldSelection.\r max := view maximumSelection.\r min := view minimumSelection.\r howMany := view numSelectionsInView.\t\"get this exactly??\"\r\r keyEvent == 31 ifTrue:\r\t[\"down-arrow; move down one, wrapping to top if needed\"\r\tnextSelection := oldSelection + 1.\r\tnextSelection > max ifTrue: [nextSelection _ 1]].\r\r keyEvent == 30 ifTrue:\r\t[\"up arrow; move up one, wrapping to bottom if needed\"\r\tnextSelection := oldSelection - 1.\r\tnextSelection < 1 ifTrue: [nextSelection _ max]].\r\r keyEvent == 1  ifTrue: [nextSelection := 1].  \"home\"\r keyEvent == 4  ifTrue: [nextSelection := max].   \"end\"\r keyEvent == 11 ifTrue: [nextSelection := min max: (oldSelection - howMany)].  \"page up\"\r keyEvent == 12  ifTrue: [nextSelection := (oldSelection + howMany) min: max].  \"page down\"\r nextSelection = oldSelection  ifFalse:\r\t[self okToChange\r\t\tifTrue:\r\t\t\t[view changeModelSelection: nextSelection.\r\t\t\t\"view controller moveMarker\"]]\r\t\t! !\r!HierarchyOutlineBrowser methodsFor: 'as yet unclassified' stamp: 'RAA 6/21/1999 15:22'!\rgenericMenu: aMenu\r\raMenu add: 'no menu yet' target: self selector: #yourself.\r^aMenu! !\r!HierarchyOutlineBrowser methodsFor: 'as yet unclassified' stamp: 'RAA 4/7/1999 16:44'!\rgetCurrentSelection\r\r^currentSelection! !\r!HierarchyOutlineBrowser methodsFor: 'as yet unclassified' stamp: 'RAA 4/7/1999 16:46'!\rnoteNewSelection: x\r\rcurrentSelection _ x.\rself changed: #getCurrentSelection.\rcurrentSelection ifNil: [^self].\rcurrentSelection sendSettingMessageTo: self.\r! !\r!HierarchyOutlineBrowser methodsFor: 'as yet unclassified' stamp: 'RAA 4/7/1999 16:47'!\rupdate: aSymbol\r\raSymbol == #hierarchicalList ifTrue: [\r\t^self changed: #getList\r].\rsuper update: aSymbol! !\r!Inspector methodsFor: 'accessing' stamp: 'ssa 8/26/2009 10:43'!\rselectionIndex: anObject\r\"Set the value of selectionIndex\"\r\rselectionIndex _ anObject! !\r!Inspector methodsFor: 'accessing' stamp: 'ssa 8/26/2009 10:43'!\rselectionUpdateTime\r\"Answer the value of selectionUpdateTime\"\r\rselectionUpdateTime isNil ifTrue:[self selectionUpdateTime: nil].\r^ selectionUpdateTime! !\r!Inspector methodsFor: 'accessing' stamp: 'ssa 8/26/2009 10:43'!\rselectionUpdateTime: anObject\r\"Set the value of selectionUpdateTime\"\r\rselectionUpdateTime _ anObject! !\r!Inspector methodsFor: 'accessing' stamp: 'ssa 8/26/2009 10:43'!\rtimeOfLastListUpdate: anObject\r\"Set the value of timeOfLastListUpdate\"\r\rtimeOfLastListUpdate _ anObject! !\r!Inspector methodsFor: 'selecting' stamp: 'tk 4/10/1998 17:57'!\rselection\r\"The receiver has a list of variables of its inspected object.\rOne of these is selected. Answer the value of the selected variable.\"\r| basicIndex |\rselectionIndex = 0 ifTrue: [^ ''].\rselectionIndex = 1 ifTrue: [^ object].\rselectionIndex = 2 ifTrue: [^ object longPrintString].\r(selectionIndex - 2) <= object class instSize\r\tifTrue: [^ object instVarAt: selectionIndex - 2].\rbasicIndex _ selectionIndex - 2 - object class instSize.\r(object basicSize <= (self i1 + self i2)  or: [basicIndex <= self i1])\r\tifTrue: [^ object basicAt: basicIndex]\r\tifFalse: [^ object basicAt: object basicSize - (self i1 + self i2) + basicIndex]! !\r!Inspector methodsFor: 'selecting' stamp: 'ssa 7/7/2010 19:29'!\rselectionPrintString\r| text nm |\rselectionUpdateTime _ [text _ [(RVMTester printPrefixFor: self selection),(self selection printString)]\r\ton: Error do: \r\t[nm _ self selectionIndex < 3\r\t\t\t\tifTrue: ['self']\r\t\t\t\tifFalse: [self selectedSlotName].\r\ttext _ ('<error in printString: evaluate \"' , nm , ' printString\" to debug>') asText.\r\ttext\r\t\taddAttribute: TextColor red\r\t\tfrom: 1\r\t\tto: text size.\r\ttext]] timeToRun.\r^ text! !\r!Inspector methodsFor: 'menu commands' stamp: 'ssa 1/6/2010 20:21'!\rexploreSelection\r\"Open an explorer on the receiver's model's currently selected object.\"\r\rself selectionIndex = 0 ifTrue: [^ self changed: #flash].\r^ self selection explore! !\r!Inspector methodsFor: 'menu commands' stamp: 'ssa 7/7/2010 13:04'!\rfieldListMenu: aMenu\r\"Arm the supplied menu with items for the field-list of the receiver\"\r\r\r\raMenu addList: #(\r\t('inspect (i)'\t\t\t\t\t\tinspectSelection)\r\t('explore (e)'\t\t\t\t\t\texploreSelection)\r\t('locate'\t\t\t\t\t\tlocateSelection)).\r\rself addCollectionItemsTo: aMenu.\r\raMenu addList: #(\r\t-\r\t('method refs to this inst var'\t\treferencesToSelection)\r\t('methods storing into this inst var'\tdefsOfSelection)\r\t('objects pointing to this value'\t\tobjectReferencesToSelection)\r\t('chase pointers'\t\t\t\t\tchasePointers)\r\t-\r\t('browse full (b)'\t\t\t\t\tbrowseMethodFull)\r\t('browse class'\t\t\t\t\t\tbrowseClass)\r\t('browse hierarchy'\t\t\t\t\tclassHierarchy)\r\t('browse protocol (p)'\t\t\t\tbrowseFullProtocol)\r\t-\r\t('inst var refs...'\t\t\t\t\tbrowseInstVarRefs)\r\t('inst var defs...'\t\t\t\t\tbrowseInstVarDefs)\r\t('class var refs...'\t\t\t\t\tclassVarRefs)\r\t('class variables'\t\t\t\t\tbrowseClassVariables)\r\t('class refs (N)'\t\t\t\t\t\tbrowseClassRefs)\r\t-\r\t('copy name (c)'\t\t\t\t\tcopyName)\t\t\r\t('basic inspect'\t\t\t\t\t\tinspectBasic)).\r\r\r^ aMenu\r\r\r\"\t\t\t-\r\t\t('alias for this value'\t\t\taliasForValue)\r\t\t('watcher for this slot'\t\t\twatcherForSlot)\"\r\r! !\r!Inspector methodsFor: 'menu commands' stamp: 'ssa 7/7/2010 13:04'!\rinspectorKey: aChar from: view\r\"Respond to a Command key issued while the cursor is over my field list\"\r\raChar == $i ifTrue: [^ self selection inspect].\raChar == $e ifTrue: [^ self selection explore].\raChar == $b ifTrue:\t[^ self browseMethodFull].\raChar == $h ifTrue:\t[^ self classHierarchy].\raChar == $c ifTrue: [^ self copyName].\raChar == $p ifTrue: [^ self browseFullProtocol].\raChar == $N ifTrue: [^ self browseClassRefs].\r\"aChar == $t ifTrue: [^ self tearOffTile].\"\raChar == $v ifTrue: [^ self viewerForValue].\r\r^ self arrowKey: aChar from: view! !\r!Inspector methodsFor: 'menu commands' stamp: 'ssa 11/16/2008 01:53'!\rlocateSelection\r\"Open a locator on the receiver's model's currently selected object.\"\r\rself selectionIndex = 0 ifTrue: [^ self changed: #flash].\r^ self selection locate! !\r!DictionaryInspector methodsFor: 'menu' stamp: 'ssa 1/6/2010 20:24'!\rdictionaryMenu: aMenu\r\"Set up the key-list menu for a dictionary inspector\"\r\raMenu title: 'Dictionary key'.\r^ aMenu addList: #(\r\t('inspect'\t\t\t\t\t\tinspectSelection)\r\t('explore'\t\t\t\t\t\texploreSelection)\r\t('copy name'\t\t\t\t\tcopyName)\r\t('references'\t\t\t\t\tselectionReferences)\r\t('objects pointing to this value'\tobjectReferencesToSelection)\r\t('senders of this key'\t\t\tsendersOfSelectedKey)\r\t-\r\t('refresh view'\t\t\t\t\tcalculateKeyArray)\r\t-\r\t('add key'\t\t\t\t\t\taddEntry)\r\t('rename key'\t\t\t\t\trenameEntry)\r\t('remove'\t\t\t\t\t\tremoveSelection)\r\t-\r\t('basic inspect'\t\t\t\t\tinspectBasic))! !\r!Inspector class methodsFor: 'instance creation' stamp: 'ssa 8/26/2009 11:23'!\rnewFrom: anInspector\r\"Use anInspector's contents for that of a new instance of me\"\r\r| in |\rin _ self new.\rin contents: anInspector contents.\rin myDependents: anInspector myDependents.\rin dependents do:[:each| (each respondsTo:#model:) ifTrue:[each model: in]].\rin selectionIndex: anInspector selectionIndex.\rin timeOfLastListUpdate: anInspector timeOfLastListUpdate.\rin selectionUpdateTime: anInspector selectionUpdateTime.\rin object: anInspector object.\r^in! !\r!Inspector class methodsFor: 'instance creation' stamp: 'ssa 3/24/2010 14:43'!\ropenOn: anObject withEvalPane: withEval withLabel: label valueViewClass: valueViewClass\r| topView inspector listView valueView evalView v |\rinspector _ self inspect: anObject.\rtopView _ StandardSystemView new model: inspector.\rtopView borderWidth: 1.\r\rlistView _ PluggableListView on: inspector\r\tlist: #fieldList\r\tselected: #selectionIndex\r\tchangeSelected: #toggleIndex:\r\tmenu: #fieldListMenu:\r\tkeystroke: #inspectorKey:from:.\r(inspector isMemberOf: DictionaryInspector)\r\tifTrue: [listView menu: #dictionaryMenu:].\rlistView window: (0 @ 0 extent: 40 @ 40).\rtopView addSubView: listView.\r\rvalueView _ valueViewClass new.\r\t\"PluggableTextView or PluggableFormView\"\r(valueView respondsTo: #getText) ifTrue: [\r\tvalueView on: inspector \r\t\ttext: #contents accept: #accept:\r\t\treadSelection: #contentsSelection menu: #codePaneMenu:shifted:].\r(valueViewClass inheritsFrom: FormView) ifTrue: [\r\tvalueView model: inspector].\r v_ \"MSWScrollBarView on:\" valueView.\rv window: (0 @ 0 extent: 75 @ 40).\rtopView addSubView: v toRightOf: listView.\r\rwithEval ifTrue:\r\t[evalView _ PluggableTextView new on: inspector \r\t\ttext: #trash accept: #trash:\r\t\treadSelection: #contentsSelection menu: #codePaneMenu:shifted:.\r\tevalView window: (0 @ 0 extent: 115 @ 20).\r\tevalView askBeforeDiscardingEdits: false.\r\ttopView addSubView: evalView below: listView].\rtopView label: label.\rtopView minimumSize: 180 @ 120.\rtopView setUpdatablePanesFrom: #(fieldList).\rtopView controller open! !\r!PluggableFileList methodsFor: 'StandardFileMenu' stamp: 'ssa 4/19/2010 20:06'!\rstartUpWithCaption: captionOrNil\r\"Display the menu, slightly offset from the cursor,\rso that a slight tweak is required to confirm any action.\"\r^ self startUpWithCaption: captionOrNil at: Sensor cursorPoint! !\r!PluggableFileList class methodsFor: 'StandardFileMenu' stamp: 'ssa 10/18/2008 23:10'!\roldFileMenu: aDirectory withPattern: aPattern\r\r\"For compatibility with StandardFileMenu for now, answer a StandardFileMenuResult\"\r^(self getFilePathNameDialog)\r\tresultBlock: self sfmResultBlock;\r\tdirectory: aDirectory;\r\tpattern: aPattern;\r\tyourself! !\r!Symbol methodsFor: 'converting' stamp: 'ssa 5/11/2010 15:14'!\rasKeyword\r\r^self last == $:\r\tifTrue:[self]\r\tifFalse:[(self  copyWith:$:) asSymbol]! !\r!Symbol class methodsFor: 'instance creation' stamp: 'ssa 10/26/2008 08:08'!\rreadFrom: aStream\r\"Correctly read a Symbol from aStream.\"\r| string | \raStream skipSeparators.\r^(aStream peekFor: $#)\r\tifTrue: [(aStream upTo: Character space) asSymbol]\r\tifFalse: \r\t\t[string _ super readFrom: aStream.\r\t\t(aStream next: 9) = ' asSymbol'\r\t\t\tifTrue: [string asSymbol]\r\t\t\tifFalse: [self error: 'This ain''t no ', self class name]]! !\r!SyntaxError class methodsFor: 'instance creation' stamp: 'dmu 11/25/2008 00:25'!\ropen: aSyntaxError\r\"Answer a standard system view whose model is an instance of me.\"\r| topView |\r<primitive: 19> \"Simulation guard\"\r\rtopView _ self buildMVCViewOn: aSyntaxError.\rtopView controller openNoTerminateDisplayAt: Display extent // 2.\rCursor normal show.\rProcessor thisProcess suspend.\r! !\r!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'dmu 9/7/2010 14:26'!\rsnapshot: save andQuit: quit embedded: embeddedFlag\r\"Mark the changes file and close all files. If save is true, save the current state of this Smalltalk in the image file. If quit is true, then exit to the outer shell. The latter part of this method runs when resuming a previously saved image. The resume logic checks for a document file to process when starting up.\"\r\r| resuming msg sourceLink |\rObject flushDependents.\rObject flushEvents.\rsave & (SourceFiles at: 2) notNil ifTrue:\r\t[msg _  (quit\r\t\tifTrue: ['----QUIT----']\r\t\tifFalse: ['----SNAPSHOT----'])\r\t\t, Date dateAndTimeNow printString, ' ', (FileDirectory default localNameFor: self imageName).\r\tsourceLink _ ' priorSource: ' , LastQuitLogPosition printString.\r\tself assureStartupStampLogged.\r\t(SourceFiles at: 2) safelyDo: [\r\t\tLastQuitLogPosition _ (SourceFiles at: 2) setToEnd; position.\r\t\tself logChange: msg , sourceLink.\r\t].\r\tTranscript cr; show: msg].\r\rself processShutDownList: quit.\rCursor write show.\rsave ifTrue: [resuming _ embeddedFlag \r\t\t\t\tifTrue: [self snapshotEmbeddedPrimitive] \r\t\t\t\tifFalse: [self snapshotPrimitive].  \"<-- PC frozen here on image file\"\r\t\t\tresuming == false \"guard against failure\" ifTrue:\r\t\t\t\t[\"Time to reclaim segment files is immediately after a save\"\r\t\t\t\tSmalltalk at: #ImageSegment\r\t\t\t\t\tifPresent: [:theClass | theClass reclaimObsoleteSegmentFiles]]]\r\tifFalse: [resuming _ false].\rquit & (resuming == false) ifTrue: [self quitPrimitive].\rCursor normal show.\rself setGCParameters.\rresuming == true ifTrue: [self clearExternalObjects].\rself processStartUpList: resuming == true.\rresuming == true ifTrue:[\r\tself setPlatformPreferences.\r\tself readDocumentFile].\r\"Now it's time to raise an error\"\rresuming == nil ifTrue: [self error:'Failed to write image file (disk full?)'].\r^ resuming! !\r!SystemDictionary methodsFor: 'window preferences' stamp: 'ssa 11/30/2009 17:48'!\rrecolorWindows\r\"Smalltalk recolorWindows\"\r\"Let the user define the color scheme for all my windows\"\r| menu choice color |\rmenu _ PopUpMenu labels:'one color for all windows\\standard color palette' withCRs.\rchoice _ menu startUp.\rchoice = 0 ifTrue:[^self].\rchoice = 1 ifTrue:[color _ Color fromUser.\r\tSmalltalk at: #WINDOWCOLORSELECTOR put:[:obj| color]].\rchoice = 2 ifTrue:[\r\tSmalltalk at: #WINDOWCOLORSELECTOR put:[:obj| Preferences windowColorFor: obj class name]].\rself updateAllWindowColors! !\r!SystemDictionary methodsFor: 'window preferences' stamp: 'ssa 11/30/2009 17:48'!\rupdateAllWindowColors\r\"Smalltalk updateAllWindowColors\"\r\rCursor wait showWhile:[\r\tView allSubInstances do:[:v| v backgroundColor: v model defaultBackgroundColor].\r\tScheduledControllers unCacheWindows;restore]! !\r!Text methodsFor: 'converting' stamp: 'ssa 1/20/2010 10:35'!\rasParagraphWithStyle: aTextStyle\r\"Answer a Paragraph whose text is the receiver.\"\r\r^Paragraph withText: self style: aTextStyle! !\r!Text methodsFor: 'emphasis' stamp: 'ssa 11/24/2009 19:00'!\rbold\r\"Force this whole text to be bold.\"\rstring size = 0 ifTrue: [^self].\rself makeBoldFrom: 1 to: string size! !\r!Text methodsFor: 'emphasis' stamp: 'ssa 8/22/2009 17:47'!\remphasizeFrom: start to: stop with: emphasis \r\"Set the emphasis for characters in the interval start-stop.\"\r\rruns _ \r\truns\r\t\tcopyReplaceFrom: start\r\t\tto: stop\r\t\twith: (RunArray new: stop - start + 1 withAll: emphasis)! !\r!Text methodsFor: 'emphasis' stamp: 'ssa 11/24/2009 19:01'!\ritalic\r\"Force this whole text to be italic.\"\rstring size = 0 ifTrue: [^self].\rself makeItalicFrom: 1 to: string size! !\r!Text methodsFor: 'emphasis' stamp: 'ssa 11/24/2009 19:01'!\rmakeItalicFrom: start to: stop\r\r^ self addAttribute: TextEmphasis italic from: start to: stop! !\r!Text methodsFor: 'emphasis' stamp: 'ssa 11/27/2009 01:23'!\rmakeUnderlineFrom: start to: stop\r\r^ self addAttribute: TextEmphasis underline from: start to: stop! !\r!Text methodsFor: 'emphasis' stamp: 'ssa 11/24/2009 19:03'!\rmakeUnderlinedFrom: start to: stop\r\r^ self addAttribute: TextEmphasis underlined from: start to: stop! !\r!Text methodsFor: 'emphasis' stamp: 'ssa 11/27/2009 01:23'!\runderline \r\"Force this whole text to be underline.\"\rstring size = 0 ifTrue: [^self].\rself makeUnderlineFrom: 1 to: string size! !\r!Text methodsFor: 'emphasis' stamp: 'ssa 11/24/2009 19:03'!\runderlined\r\"Force this whole text to be underlined.\"\rstring size = 0 ifTrue: [^self].\rself makeUnderlinedFrom: 1 to: string size! !\r!Text methodsFor: 'attributes' stamp: 'ssa 11/27/2009 01:09'!\rfont: aFont\rself addAttribute: (TextFontReference toFont: aFont)! !\r!Text methodsFor: 'attributes' stamp: 'ssa 11/27/2009 01:28'!\rfontName: fname pointSize: ptsize\r\"  ('Hello World' asText fontName: #Accuny pointSize: 24) asParagraph display\"\r| style sizes findex font availableSize |\rstyle _ TextStyle named:fname.\rsizes _ TextStyle fontPointSizesFor: fname.\ravailableSize _ sizes detect:[:each| each >= ptsize] ifNone:[sizes last].\rfindex _ sizes indexOf: availableSize.\rfont _ style fontAt:findex.\rself font: font \r\r\"Accuat  #(18 )\rAccujen  #(9 10 12 14 18 24 )\rAccula  #(12 24 )\rAccumon  #(9 10 12 )\rAccuny  #(9 10 12 14 18 24 )\rAccusf  #(18 )\rAccushi  #(12 )\rAccuve  #(12 14 )\rAtlanta  #(11 22 )\rDefaultFixedTextStyle  #(11 22 )\rDefaultTextStyle  #(9 10 12 14 18 24 )\"! !\r!Text methodsFor: 'attributes' stamp: 'ssa 11/27/2009 00:56'!\rfontNumber: anInteger\r\rself addAttribute: (TextFontChange fontNumber:anInteger)! !\r!TextBlockDoIt methodsFor: 'accessing' stamp: 'ssa 9/15/2009 09:37'!\ractionBlock\r\"Answer the value of actionBlock\"\r\ractionBlock isNil ifTrue:[self actionBlock: [self notify:'default action block']].\r^ actionBlock! !\r!TextBlockDoIt methodsFor: 'accessing' stamp: 'ssa 9/15/2009 09:36'!\ractionBlock: anObject\r\"Set the value of actionBlock\"\r\ractionBlock _ anObject! !\r!TextBlockDoIt methodsFor: 'activating' stamp: 'ssa 9/15/2009 09:38'!\ractOnClickFor: anObject\r\rself actionBlock value.\r^true! !\r!TextStyle class methodsFor: 'user interface' stamp: 'ssa 9/4/2009 21:20'!\rmvcPromptForFont: aPrompt \r\"MVC Only!! prompt for a font and if one is provided, send it to aTarget using a message with selector aSelector.\"\r| aMenu aChoice aStyle namesAndSizes |\r\"TextStyle mvcPromptForFont: 'Choose system font style' \"\raMenu _ CustomMenu new.\rself actualTextStyles keys do:\r\t[:styleName |\r\t\taMenu add: styleName action: styleName].\raChoice _ aMenu startUpWithCaption: aPrompt.\raChoice ifNil: [^ self].\raMenu _ CustomMenu new.\raStyle _ self named: aChoice.\r(namesAndSizes _ aStyle fontNamesWithPointSizes) do:\r\t[:aString | aMenu add: aString action: aString].\raChoice _ aMenu startUpWithCaption: nil.\raChoice ifNil: [^ self].\r^aStyle fontAt: (namesAndSizes indexOf: aChoice).\r! !\r!TextStyle class methodsFor: 'user interface' stamp: 'ssa 9/4/2009 21:11'!\rmvcPromptForStyle: aPrompt andSendTo: aTarget withSelector: aSelector\r\"MVC Only!! prompt for a font and if one is provided, send it to aTarget using a message with selector aSelector.\"\r| aMenu aChoice aStyle namesAndSizes aFont |\r\"TextStyle mvcPromptForFont: 'Choose system font style' andSendTo: TextStyle withSelector: #setSystemFontTo:\"\raMenu _ CustomMenu new.\rself actualTextStyles keys do:\r\t[:styleName |\r\t\taMenu add: styleName action: styleName].\raChoice _ aMenu startUpWithCaption: aPrompt.\raChoice ifNil: [^ self].\raMenu _ CustomMenu new.\raStyle _ self named: aChoice.\r(namesAndSizes _ aStyle fontNamesWithPointSizes) do:\r\t[:aString | aMenu add: aString action: aString].\raChoice _ aMenu startUpWithCaption: nil.\raChoice ifNil: [^ self].\raTarget perform: aSelector with: aStyle! !\r!TranscriptStream methodsFor: 'Ly*' stamp: 'dmu 3/22/2010 02:58'!\rresetSemaphore\rAccessSema signal! !\r!TranscriptStream methodsFor: '*RVM' stamp: 'ssa 3/24/2010 14:03'!\rshowInConsole\r\r^self class showInConsole! !\r!TranscriptStream methodsFor: '*RVM' stamp: 'ssa 3/24/2010 14:04'!\rshowInConsole: aBoolean\r\r^self class showInConsole: aBoolean! !\r!TranscriptStream methodsFor: '*RVM' stamp: 'ssa 7/5/2010 13:02'!\rshowInConsoleSwitch\r\"Transcript showInConsoleSwitch demo\"\r^RVMCheckBoxView on: nil label: 'Show Transcript in Console' \r\t\t\t\t\tcheckState: [Transcript showInConsole] \r\t\t\t\t\twhenChecked: [Transcript showInConsole: true] \r\t\t\t\t\twhenUnchecked: [Transcript showInConsole: false].! !\r!TranscriptStream methodsFor: '*RVM' stamp: 'ssa 3/24/2010 14:04'!\rtoggleShowInConsole\r\rself class toggleShowInConsole! !\r!TranscriptStream class methodsFor: '*RVM' stamp: 'ssa 3/24/2010 13:58'!\rshowInConsole\r\"A flag to support mirroring the transcript in the RVM console\"\rShowInConsole isNil ifTrue:[ShowInConsole _ false].\r^ShowInConsole! !\r!TranscriptStream class methodsFor: '*RVM' stamp: 'ssa 3/24/2010 13:58'!\rshowInConsole: aBoolean\r\"A flag to support mirroring the transcript in the RVM console\"\rShowInConsole _ aBoolean! !\r!TranscriptStream class methodsFor: '*RVM' stamp: 'ssa 3/24/2010 13:59'!\rtoggleShowInConsole\r\rself showInConsole: self showInConsole not! !\r!Transcripter methodsFor: 'command line' stamp: 'ssa 7/7/2010 19:30'!\rreadEvalPrint\r| line okToRevert |\rSensor flushKeyboard.\rokToRevert _ true.\r[#('quit' 'exit' 'done' 'restart' 'refresh' 'revert') includes: (line _ self request: '>') ]\r\twhileFalse:\r\t[line = 'refresh'\r\t\tifTrue:[ScheduledControllers restore halt]\r\t\tifFalse:[line = 'restart'\r\t\t\tifTrue:[ProcessorScheduler removeAllPossible]\r\t\t\tifFalse:[line = 'revert'\r\t\t\t\tifTrue: [okToRevert\r\t\t\t\t\tifTrue: [Utilities revertLastMethodSubmission.\r\t\t\t\t\t\tself cr; show: 'reverted: ' , Utilities mostRecentlySubmittedMessage.\r\t\t\t\t\t\tokToRevert _ false]\r\t\t\t\tifFalse: [self cr; show: 'Only one level of revert currently supported']]\r\t\tifFalse: [self cr; show: ([Compiler evaluate: line] ifError: [:err :ex | err])]]]]! !\r!Transcripter class methodsFor: 'utilities' stamp: 'ssa 6/11/2010 13:29'!\remergencyEvaluator\r(Transcripter newInFrame: (0@0 corner: 320@200))\r\tshow: 'Type ''revert'' to revert your last method change.\rType ''restart'' to restart the processor scheduler.\rType ''refresh'' to refresh the display.\rType ''exit'' to exit the emergency evaluator.';\r\treadEvalPrint! !\r!True methodsFor: 'debugging' stamp: 'ssa 3/11/2010 11:54'!\rhaltIfTrue\r\rself halt! !\r!True class methodsFor: 'instance creation' stamp: ''!\rdearchiveFrom: aStream\r\raStream storeObject: true.\r^true! !\r!UndefinedObject methodsFor: 'printing' stamp: ''!\rarchiveOn: aStream\raStream\r\tstoreClass: self class! !\r!UndefinedObject class methodsFor: 'instance creation' stamp: ''!\rdearchiveFrom: aStream\r^nil! !\r!UnhandledError methodsFor: 'priv handling' stamp: 'dmu 11/25/2008 00:25'!\rdevDefaultAction\r\rProcessor thisProcess\r\tdebug: exception signalerContext\r\ttitle: exception description! !\r!Utilities class methodsFor: 'miscellaneous' stamp: 'ssa 1/21/2010 12:17'!\rexploreViewFromUser\rScheduledControllers screenController exploreViewFromUser! !\r!Utilities class methodsFor: 'finding pointers' stamp: 'ar 7/16/2005 19:56'!\rpointersTo: anObject\r\"Find all occurrences in the system of pointers to the argument anObject.\"\r\"(Utilities pointersTo: Browser) inspect.\"\r^ self pointersTo: anObject except: #()\r! !\r!Utilities class methodsFor: 'finding pointers' stamp: 'dmu 3/23/2010 12:31'!\rpointersTo: anObject except: objectsToExclude \r\"Find all occurrences in the system of pointers to the argument\ranObject. Remove objects in the exclusion list from the\rresults. \"\r| results anObj |\rTranscript cr; show: 'Calling garbageCollect from pointersTo:except:'.\rSmalltalk garbageCollect.\r\"big collection shouldn't grow, so it's contents array is always the same\"\rresults := OrderedCollection new: 1000.\r\"allObjectsDo: is expanded inline to keep spurious\rmethod and block contexts out of the results\"\ranObj := self someObject.\r[0 == anObj] whileFalse: [\r\tanObj isInMemory ifTrue: [\r\t\t(anObj pointsTo: anObject) ifTrue: [\r\t\t\t\"exclude the results collector and contexts in call chain\"\r\t\t\t(anObj ~~ results collector \r\t\t\t\tand: [anObj ~~ objectsToExclude\r\t\t\t\tand: [anObj ~~ thisContext\r\t\t\t\tand: [anObj ~~ thisContext sender\r\t\t\t\tand: [anObj ~~ thisContext sender sender]]]])\r\t\t\t\t\tifTrue: [results add: anObj]]].\r\tanObj := anObj nextObject].\robjectsToExclude do: [:obj | results removeAllSuchThat: [:el | el == obj]].\r^ results asArray! !\r!Utilities class methodsFor: 'finding pointers' stamp: 'ar 7/16/2005 19:56'!\rpointersToItem: index of: anArray\r\"Find all occurrences in the system of pointers to the given element of the given array. This is useful for tracing up a pointer chain from an inspector on the results of a previous call of pointersTo:. To find out who points to the second element of the results, one would evaluate:\r\rUtilities pointersToItem: 2 of: self\r\rin the inspector.\"\r^ self pointersTo: (anArray at: index) except: (Array with: anArray)! !\r!View methodsFor: 'initialize-release' stamp: 'ssa 11/30/2009 17:50'!\rsetDefaultBackgroundColor\r\rself backgroundColor: self model defaultBackgroundColor! !\r!View methodsFor: 'testing' stamp: 'ssa 1/1/1970 00:19'!\risRVMView\r\r^false! !\r!View methodsFor: 'subView access' stamp: 'ssa 1/1/1970 12:58'!\rallSubViews\r\"Answer the receiver's collection of subViews and their subViews recursively.\"\r\r| all |\rall _ OrderedCollection new.\rall addAll: self subViews.\rself subViews do:[:sub| all addAll: sub allSubViews].\r^all! !\r!View methodsFor: 'subView access' stamp: 'ssa 10/19/2008 00:00'!\rsubViewsSatisfying: aBlock\r\"Return the subviews that satisfy aBlock, or #() if none does.  1/31/96 sw\"\r\r^ subViews select: [:aView | aBlock value: aView]! !\r!View methodsFor: 'lock access' stamp: ''!\runlock\r    \"Unlock the receiver and all of its subViews (see View|isUnlocked). This \r    has the effect of forcing the display transformation (see \r    View|displayTransformation) and inset display box (see \r    View|insetDisplayBox) of the receiver and all its subViews to be \r    recomputed the next time they are referenced. The locking and \r    unlocking of a View is handled automatically by the internal methods of \r    the View, but can also be done explicitly if desired.\"\r    \"Added a guard clause to protect against empty subview collections.  This is one reason why lazy initialization and consistent use of accessor methods is better than direct access.  - ssa 2/27/98 11:26\"\r\r    self isUnlocked ifTrue: [^self].\r    displayTransformation _ nil.\r    insetDisplayBox _ nil.\r    subViews isNil ifFalse:[subViews do: [:aSubView | aSubView unlock]]! !\r!View methodsFor: 'subView inserting' stamp: 'ssa 9/13/2008 16:54'!\raddSubView: aSubView above: lowerView\r\"Adds aView (see View|addSubView:) so that it lies above topView.\"\r\"ssa - added a hack to allow nil lowerView\"\r\rlowerView isNil\r\tifTrue:[self addSubView: aSubView]\r\tifFalse:[self addSubView: aSubView\r\t\t\t\talign: aSubView viewport bottomLeft\r\t\t\t\twith: lowerView viewport topLeft]! !\r!View methodsFor: 'subView inserting' stamp: 'ssa 9/13/2008 16:55'!\raddSubView: aSubView below: lowerView\r\"Add the argument, aSubView, (see View|addSubView:) so that it lies \rbelow the view, topView.\"\r\"ssa - added a hack to allow nil lowerView\"\r\rlowerView isNil\r\tifTrue:[self addSubView: aSubView]\r\tifFalse:[self addSubView: aSubView\r\t\t\t\talign: aSubView viewport topLeft\r\t\t\t\twith: lowerView viewport bottomLeft]! !\r!View methodsFor: 'subView inserting' stamp: 'ssa 9/13/2008 16:55'!\raddSubView: aSubView toLeftOf: rightView\r\"Adds aView (see addSubView:) so that it lies to the right of rightView.\"\r\r\"ssa - added a hack to allow nil rightView\"\r\rrightView isNil\r\tifTrue:[self addSubView: aSubView]\r\tifFalse:[self addSubView: aSubView\r\t\t\t\talign: aSubView viewport topRight\r\t\t\t\twith:  rightView viewport topLeft]! !\r!View methodsFor: 'subView inserting' stamp: 'ssa 9/13/2008 16:56'!\raddSubView: aSubView toRightOf: leftView\r\"Add the argument, aSubView, (see View|addSubView:) so that it lies to \rthe right of the view, leftView.\"\r\r\"ssa - added a hack to allow nil leftView\"\r\rleftView isNil\r\tifTrue:[self addSubView: aSubView]\r\tifFalse:[self addSubView: aSubView\r\t\t\t\talign: aSubView viewport topLeft\r\t\t\t\twith: leftView viewport topRight]! !\r!View methodsFor: 'miscellaneous' stamp: 'ssa 10/8/2008 17:54'!\rstretchFrame: newFrameBlock startingWith: startFrame \r\"Track the outline of a newFrame as long as mouse drags it.\rMaintain max and min constraints throughout the drag\"\r| frame newFrame click delay |\rdelay _ Delay forMilliseconds: 10.\rframe _ startFrame origin extent: ((startFrame extent min: self maximumSize)\r\t\t\t\t\t\t\t\t\t\tmax: self minimumSize).\rDisplay border: frame width: 2 rule: Form reverse fillColor: Color gray.\rclick _ false.\r[click and: [Sensor noButtonPressed]] whileFalse: \r\t[\"delay wait.\"\r\tclick _ click | Sensor anyButtonPressed.\r\tnewFrame _ newFrameBlock value: frame.\r\tnewFrame _ newFrame topLeft extent: ((newFrame extent min: self maximumSize)\r\t\t\t\t\t\t\t\t\t\tmax: self minimumSize).\r\tnewFrame = frame ifFalse:\r\t\t[Display border: frame width: 2 rule: Form reverse fillColor: Color gray.\r\t\tDisplay border: newFrame width: 2 rule: Form reverse fillColor: Color gray.\r\t\tframe _ newFrame]].\rDisplay border: frame width: 2 rule: Form reverse fillColor: Color gray.\r^ frame! !\r!View methodsFor: 'scrolling support' stamp: ''!\rpercentContentVisible\r    \"Answer the percent of my content that is visible.  ssa 12/5/97 15:37\"\r\r    ^self visibleContentHeight / self totalContentHeight! !\r!View methodsFor: 'scrolling support' stamp: ''!\rpercentPrecedingContent\r    \"Answer the percent of my content that not visible since it has been scrolled of the top of the screen.  ssa 12/5/97 15:37\"\r\r    ^0.0! !\r!View methodsFor: 'scrolling support' stamp: ''!\rpercentPreceedingContent\r    \"Answer the percent of my content that not visible since it has been scrolled of the top of the screen.  ssa 12/5/97 15:37\"\r\r    ^0.0! !\r!View methodsFor: 'scrolling support' stamp: ''!\rpercentVisibleContent\r    \"Answer the percent of my content that is visible.  ssa 12/5/97 15:37\"\r\r    ^self totalContentHeight = 0\r            ifTrue:[0.0]\r            ifFalse:[self visibleContentHeight / self totalContentHeight]! !\r!View methodsFor: 'scrolling support' stamp: ''!\rtotalContentHeight\r    \"Answer the height of my content, visible or not.  ssa 12/5/97 15:04\"\r\r    ^100 / self unitContentHeight! !\r!View methodsFor: 'scrolling support' stamp: ''!\runitContentHeight\r    \"Answer the unit height of my content.  ssa 12/5/97 15:04\"\r\r    ^10.0! !\r!View methodsFor: 'scrolling support' stamp: ''!\rvisibleContentHeight\r    \"Answer the height of my visible content.  ssa 12/5/97 15:04\"\r\r    ^100 / self unitContentHeight! !\r!View methodsFor: 'demonstrating' stamp: 'ssa 11/27/2008 10:05'!\rdemo\r\"Add me to a system view and open me on the desktop\"\rself demoSized: self minimumSize! !\r!View methodsFor: 'demonstrating' stamp: 'ssa 11/27/2008 10:05'!\rdemoSized: anExtent\r\"Add me to a system view and open me on the desktop\"\r| topView  |\rtopView := StandardSystemView new.\rtopView borderWidth:1.\rtopView minimumSize: anExtent.\rtopView addSubView: self .\rtopView label: self class name,' demo'.\rtopView controller open! !\r!View methodsFor: 'accessing' stamp: 'ssa 3/12/2010 10:12'!\rborderColor\r\"Answer the value of borderColor\"\r\rborderColor isNil ifTrue:[self borderColor: self foregroundColor].\r^ borderColor! !\r!View methodsFor: 'accessing' stamp: 'ssa 3/12/2010 10:12'!\rborderColor: anObject\r\"Set the value of borderColor\"\r\rborderColor _ anObject! !\r!View methodsFor: 'accessing' stamp: 'ssa 3/12/2010 10:12'!\rboundingBox: anObject\r\"Set the value of boundingBox\"\r\rboundingBox _ anObject! !\r!View methodsFor: 'accessing' stamp: 'ssa 3/12/2010 10:12'!\rdisplayTransformation: anObject\r\"Set the value of displayTransformation\"\r\rdisplayTransformation _ anObject! !\r!View methodsFor: 'accessing' stamp: 'ssa 3/12/2010 10:12'!\rinsetDisplayBox: anObject\r\"Set the value of insetDisplayBox\"\r\rinsetDisplayBox _ anObject! !\r!View methodsFor: 'accessing' stamp: 'ssa 3/12/2010 10:12'!\rinsideColor\r\"Answer the value of insideColor\"\r\rinsideColor isNil ifTrue:[self insideColor: nil].\r^ insideColor! !\r!View methodsFor: 'accessing' stamp: 'ssa 3/12/2010 10:12'!\rsubViews: anObject\r\"Set the value of subViews\"\r\rsubViews _ anObject! !\r!View methodsFor: 'accessing' stamp: 'ssa 3/12/2010 10:12'!\rviewport: anObject\r\"Set the value of viewport\"\r\rviewport _ anObject! !\r!View methodsFor: '*Ly experiments' stamp: 'ssa 3/12/2010 17:52'!\rmoveBy: delta\r\"Move me delta left  in my superView\"\r| scaledDelta |\rscaledDelta _ self viewport width / self insetDisplayBox width * delta.\rself transformUsing:[:ovp| ovp moveBy: scaledDelta]! !\r!View methodsFor: '*Ly experiments' stamp: 'ssa 3/12/2010 17:54'!\rmoveDown\r\"Move me 10 pixels down  in my superView\"\rself moveBy:(0@10)! !\r!View methodsFor: '*Ly experiments' stamp: 'ssa 3/12/2010 16:50'!\rmoveFrom: oldBox\r\"Move me to ensure I refect my window/viewport\"\r\rself uncacheBits.\rself displayEmphasized.\rself moved.  \"In case its model wishes to take note.\"\r(oldBox areasOutside: self windowBox) do:\r\t[:rect | ScheduledControllers restore: rect]! !\r!View methodsFor: '*Ly experiments' stamp: 'ssa 3/12/2010 17:54'!\rmoveLeft\r\"Move me 10 pixels left  in my superView\"\rself moveBy:(-10@0)! !\r!View methodsFor: '*Ly experiments' stamp: 'ssa 3/12/2010 17:54'!\rmoveRight\r\"Move me 10 pixels right  in my superView\"\rself moveBy:(10@0)! !\r!View methodsFor: '*Ly experiments' stamp: 'ssa 3/12/2010 17:54'!\rmoveUp\r\"Move me 10 pixels up  in my superView\"\rself moveBy:(0@-10)! !\r!View methodsFor: '*Ly experiments' stamp: 'ssa 3/12/2010 16:55'!\rnarrower\r\"Make me 5% narrower in my superView\"\rself transformUsing:[:ovp| ovp expandBy:(ovp width*0.05)negated@0]! !\r!View methodsFor: '*Ly experiments' stamp: 'ssa 3/12/2010 16:57'!\rshorter\r\"Make me 5% shorter in my superView\"\rself transformUsing:[:ovp| ovp expandBy:0@(ovp height*0.05)negated]! !\r!View methodsFor: '*Ly experiments' stamp: 'ssa 3/12/2010 16:57'!\rtaller\r\"Make me 5% taller in my superView\"\rself transformUsing:[:ovp| ovp expandBy:0@(ovp height*0.05)]! !\r!View methodsFor: '*Ly experiments' stamp: 'ssa 3/12/2010 17:43'!\rtransformUsing: aBlock\r\"self transformUsing: [:oldViewport |  ...return new viewport... ]  \"\r\"Change my viewport and update me on the display\"\r| ovp nvp ow |\rovp _ self viewport.\row _ self getWindow.\rnvp _ aBlock value:ovp.\rself window: self window viewport: nvp.\rself moveFrom: ow.\rself unlock.! !\r!View methodsFor: '*Ly experiments' stamp: 'ssa 3/12/2010 16:55'!\rwider\r\"Make me 5% wider in my superView\"\rself transformUsing:[:ovp| ovp expandBy:(ovp width*0.05)@0]! !\r!DisplayTextView class methodsFor: 'examples' stamp: 'ssa 9/4/1998 17:29'!\rexample2\t\r\"Create a standarad system view with two parts, one editable, the other not.\"\r\"Modified to support Windoze - ssa\"\r| topView aDisplayTextView |\rtopView _ StandardSystemView new.\rtopView label: 'Text Editor'.\raDisplayTextView _ MSWScrollBarView on: (self new model: 'test string label' asDisplayText).\raDisplayTextView scrollingView controller: NoController new.\raDisplayTextView window: (0 @ 0 extent: 100 @ 100).\raDisplayTextView borderWidthLeft: 2 right: 0 top: 2 bottom: 2.\rtopView addSubView: aDisplayTextView.\r\raDisplayTextView _ MSWScrollBarView on: (self new model: 'test string' asDisplayText).\raDisplayTextView window: (0 @ 0 extent: 100 @ 100).\raDisplayTextView borderWidth: 2.\rtopView\r\taddSubView: aDisplayTextView\r\talign: aDisplayTextView viewport topLeft\r\twith: topView lastSubView viewport topRight.\rtopView controller open\r\r\"DisplayTextView example2\"! !\r!DisplayTextView class methodsFor: 'examples' stamp: ''!\ropen: textOrString label: aLabel\r    \"Create a system view with a paragraph editor in it.  6/2/96 sw\"\r    \"VIVA LA JUNTA!!  Modified to use MSWScrollBarViews - ssa 12/11/97 12:00\"\r\r    | topView aDisplayTextView |\r    aDisplayTextView _ MSWScrollBarView on: (DisplayTextView new model: textOrString asDisplayText).\r    aDisplayTextView borderWidth: 2.\r    topView _ StandardSystemView new.\r    topView label: aLabel.\r    topView addSubView: aDisplayTextView.\r    topView controller open\r\r    \"DisplayTextView open: 'Great green gobs' label: 'Gopher Guts'\"! !\r!FormView methodsFor: 'displaying' stamp: 'ssa 11/26/2009 22:52'!\rdisplayView \r\"Refer to the comment in View|displayView.\"\r\r| oldOffset |\rsuper displayView.\rinsideColor == nil ifFalse: [Display fill: self insetDisplayBox fillColor: insideColor].\roldOffset _ model offset.\rmodel offset: \"borderWidth origin\" 0@0.\rmodel\r\tdisplayOn: Display\r\tat: self insetDisplayBox origin\r\tclippingBox: self insetDisplayBox\r\trule: Form paint\r\tfillColor: nil.\rmodel offset: oldOffset! !\r!FormView methodsFor: 'private' stamp: 'ssa 11/26/2009 22:42'!\rdefaultRule \r\"The default display rule is 3=over or storing.\"\r\r^Form paint! !\r!FormView class methodsFor: 'examples' stamp: 'ssa 11/26/2009 22:47'!\ropen: aForm named: aString\r\"FormView open: ((ColorForm fromUser) borderWidth: 1) named: 'Squeak' \"\r\"Open a window whose model is aForm and whose label is aString.\"\r| topView aView |\rtopView _ StandardSystemView new.\rtopView model: aForm.\rtopView label: aString.\rtopView minimumSize: aForm extent+2\";\r          maximumSize: aForm extent + 2\".\raView _ FormView new.\raView model: aForm.\r\"aView window: (aForm boundingBox expandBy: 2).\"\raView borderWidthLeft: 1 right: 1 top: 2 bottom: 1.\rtopView addSubView: aView.\rtopView controller open! !\r!ListView methodsFor: 'displaying' stamp: ''!\rscrollSelectionIntoView\r\"Selection is assumed to be on and clipped out of view.\rUses controller scrollView to keep selection right\"\r| delta |\r(delta _ self insetDisplayBox bottom - self selectionBox bottom) < 0\r\tifTrue: [^ self controller scrollView: delta - (list lineGrid-1)]. \"up\"\r(delta _ self insetDisplayBox top - self selectionBox top) > 0\r\tifTrue: [^ self controller scrollView: delta + 1] \"down\"! !\r!ListView methodsFor: 'clipping box access' stamp: 'ssa 9/11/2009 18:25'!\rclippingBox\r\"Answer the rectangle in which the model can be displayed--this is the \rinsetDisplayBox inset by the height of a line for an item.\"\r\r^self insetDisplayBox insetBy: \r\t(Rectangle\r\t\tleft: 0\r\t\tright: 0\r\t\ttop: 0\r\t\tbottom: 0 \"self insetDisplayBox height \\\\ list lineGrid\")! !\r!ListView methodsFor: 'selecting' stamp: 'ssa 9/11/2009 18:25'!\rfindSelection: aPoint \r\"Determine which selection is displayed in an area containing the point, \raPoint. Answer the selection if one contains the point, answer nil \rotherwise.\"\r\r| trialSelection |\r(self clippingBox  containsPoint: aPoint) ifFalse: [^nil].\rtrialSelection _ aPoint y - list compositionRectangle top // list lineGrid + 1.\rtopDelimiter == nil ifFalse: [trialSelection _ trialSelection - 1].\r(trialSelection < 1) | (trialSelection > self maximumSelection)\r\tifTrue: [^ nil]\r\tifFalse: [^ trialSelection]! !\r!ListView methodsFor: 'updating' stamp: 'ssa 1/22/2010 14:49'!\rupdate: aSymbol \r    \"Refer to the comment in View|update:.\"\r    \"Hacked to support MSWScrollBars - ssa 12/11/97 16:42\"\r\r    aSymbol  == #list\r            ifTrue: \r                    [self list: model list.\r                    self displayView]\r            ifFalse:[\r                    aSymbol == #listIndex\r                            ifTrue: \r                                    [self moveSelectionBox: model listIndex]].\r    (self superView isKindOf: MSWScrollBarView)\r            ifTrue:[self superView updateElevator]! !\r!ListView methodsFor: 'scrolling support' stamp: ''!\rpercentPreceedingContent\r    \"Answer the percent of my content that not visible since it has been scrolled of the top of the screen.  ssa 12/5/97 15:37\"\r\r    | para lineIndex |\r    para _ self list.\r    lineIndex _ para lineIndexOfTop: para visibleRectangle top.\r    lineIndex = 1 ifTrue:[^0.0].\r    ^lineIndex / para numberOfLines asFloat\r! !\r!ListView methodsFor: 'scrolling support' stamp: ''!\rscrollBy: anInteger \r    \"Scroll up by this amount adjusted by lineSpacing and list limits\"\r    \"Hacked to support MSWScrollBarView - ssa 12/10/97 16:26\"\r\r    | maximumAmount minimumAmount amount |\r    maximumAmount _ 0 max:\r            list clippingRectangle top - list compositionRectangle top.\r    minimumAmount _ 0 min:\r            list clippingRectangle bottom - list compositionRectangle bottom.\r    amount _ (anInteger min: maximumAmount) max: minimumAmount.\r    amount ~= 0\r            ifTrue: [list scrollBy: amount negated.\r                            (self superView isKindOf: MSWScrollBarView)  \"______HERE IS THE HACK\"\r                                    ifTrue:[self superView updateElevator].\r                      ^ true]\r            ifFalse: [^ false]  \"Return false if no scrolling took place\"! !\r!ListView methodsFor: 'scrolling support' stamp: 'ssa 9/9/2009 15:24'!\rtotalContentHeight\r    \"Answer the total height of my contents. ssa 12/5/97 15:16\"\r    ^ self list compositionRectangle height / self unitContentHeight! !\r!ListView methodsFor: 'scrolling support' stamp: ''!\runitContentHeight\r    \"Answer the unit height of my contents. ssa 12/5/97 15:16\"\r    ^ self list lineGrid asFloat! !\r!ListView methodsFor: 'scrolling support' stamp: ''!\rvisibleContentHeight\r    \"Answer the total height of my contents. ssa 12/5/97 15:16\"\r    ^ self list clippingRectangle height / self unitContentHeight! !\r!ListView methodsFor: 'accessing' stamp: 'ssa 1/29/2010 13:43'!\risEmpty\r\"Answer the value of isEmpty\"\r\risEmpty isNil ifTrue:[self isEmpty: nil].\r^ isEmpty! !\r!ListView methodsFor: 'accessing' stamp: 'ssa 1/29/2010 13:43'!\risEmpty: anObject\r\"Set the value of isEmpty\"\r\risEmpty _ anObject! !\r!ListView methodsFor: 'accessing' stamp: 'ssa 1/29/2010 13:43'!\rtextStyle\r\"Answer the value of textStyle\"\r\rtextStyle isNil ifTrue:[self textStyle: nil].\r^ textStyle! !\r!ListView methodsFor: 'accessing' stamp: 'ssa 1/29/2010 13:43'!\rtextStyle: anObject\r\"Set the value of textStyle\"\r\rtextStyle _ anObject! !\r!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 11/30/2009 17:33'!\rbackgroundColor: aColor\r\"Blow the caches\"\rsuper backgroundColor: aColor.\rself elevatorCache:nil.\rself downButtonCache: nil.\rself upButtonCache: nil.\r! !\r!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/5/97 12:24'!\rdownButtonBox\r    \"<^hOf Rectangle>\"\r    \"ssa 12/5/97 11:15 - Answer the instance variable, downButtonBox\"\r\r    downButtonBox isNil ifTrue:[self downButtonBox: self determineDownButtonBox].\r    ^downButtonBox! !\r!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/5/97 11:15'!\rdownButtonBox: aRectangle \r    \"<aRectangle: hOf Rectangle, ^self>\"\r    \"ssa 12/5/97 11:15 - Set downButtonBox to be aRectangle.\"\r\r    downButtonBox _ aRectangle! !\r!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/11/97 11:46'!\rdownButtonCache\r    \"<^hOf Form>\"\r    \"ssa 12/11/97 11:43 - Answer the instance variable, downButtonCache\"\r\r    downButtonCache isNil ifTrue:[self downButtonCache: (Form extent:1@1)].\r    ^downButtonCache! !\r!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/11/97 11:43'!\rdownButtonCache: aColorForm \r    \"<aColorForm: hOf ColorForm, ^self>\"\r    \"ssa 12/11/97 11:43 - Set downButtonCache to be aColorForm.\"\r\r    downButtonCache _ aColorForm! !\r!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/5/97 16:29'!\relevatorBox\r    \"Answer the rectangle for the elevator.\"\r\r    ^self controller elevatorBox! !\r!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 9/9/2009 16:45'!\relevatorCache\r    \"<^hOf Form>\"\r    \"ssa 12/10/97 16:32 - Answer the instance variable, elevatorCache\"\r\r    elevatorCache isNil ifTrue:[self elevatorCache: (Form extent:1@1)].\r    ^elevatorCache ! !\r!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/10/97 16:32'!\relevatorCache: aForm \r    \"<aForm: hOf Form, ^self>\"\r    \"ssa 12/10/97 16:32 - Set elevatorCache to be aForm.\"\r\r    elevatorCache _ aForm! !\r!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/5/97 14:18'!\relevatorShaft\r    \"<^hOf Rectangle>\"\r    \"ssa 12/5/97 14:18 - Answer the instance variable, elevatorShaft\"\r\r    elevatorShaft isNil ifTrue:[self elevatorShaft: self determineElevatorShaft].\r    ^elevatorShaft! !\r!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/5/97 14:18'!\relevatorShaft: aRectangle \r    \"<aRectangle: hOf Rectangle, ^self>\"\r    \"ssa 12/5/97 14:18 - Set elevatorShaft to be aRectangle.\"\r\r    elevatorShaft _ aRectangle! !\r!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/11/97 12:43'!\rgetWindow\r    \"This is here to break a recursive loop caused by the indirection of my display transformation.\"\r    self window isNil ifTrue:[self window: Display boundingBox].\r    ^self window! !\r!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 8/27/2009 04:51'!\rmodel: aModel\r\rmodel ~~ nil & (model ~~ aModel)\r\tifTrue: [model removeDependent: self].\raModel ~~ nil & (aModel ~~ model)\r\tifTrue: [aModel addDependent: self].\rmodel _ aModel.\r! !\r!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/5/97 11:28'!\rscrollBarBox\r    \"<^hOf Rectangle>\"\r    \"ssa 12/5/97 11:15 - Answer the instance variable, scrollBarBox\"\r\r    scrollBarBox isNil ifTrue:[self scrollBarBox: self determineScrollBarBox].\r    ^scrollBarBox! !\r!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/5/97 11:15'!\rscrollBarBox: aRectangle \r    \"<aRectangle: hOf Rectangle, ^self>\"\r    \"ssa 12/5/97 11:15 - Set scrollBarBox to be aRectangle.\"\r\r    scrollBarBox _ aRectangle! !\r!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/10/97 14:05'!\rscrollBarWidth\r    \"<^hOf Integer>\"\r    \"ssa 12/5/97 11:27 - Answer the instance variable, scrollBarWidth\"\r\r    scrollBarWidth isNil ifTrue:[self scrollBarWidth: 12].\r    ^scrollBarWidth! !\r!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/5/97 11:27'!\rscrollBarWidth: anInteger \r    \"<anInteger: hOf Integer, ^self>\"\r    \"ssa 12/5/97 11:27 - Set scrollBarWidth to be anInteger.\"\r\r    scrollBarWidth _ anInteger! !\r!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 1/24/98 16:06'!\rscrollingView\r\r    ^self subViews isEmpty ifTrue:[nil] ifFalse:[self subViews first]! !\r!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/5/97 13:59'!\rupButtonBox\r    \"<^hOf Rectangle>\"\r    \"ssa 12/5/97 11:15 - Answer the instance variable, upButtonBox\"\r\r    upButtonBox isNil ifTrue:[self upButtonBox: self determineUpButtonBox].\r    ^upButtonBox! !\r!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/5/97 11:15'!\rupButtonBox: aRectangle \r    \"<aRectangle: hOf Rectangle, ^self>\"\r    \"ssa 12/5/97 11:15 - Set upButtonBox to be aRectangle.\"\r\r    upButtonBox _ aRectangle! !\r!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/11/97 11:46'!\rupButtonCache\r    \"<^hOf Form>\"\r    \"ssa 12/11/97 11:43 - Answer the instance variable, upButtonCache\"\r\r    upButtonCache isNil ifTrue:[self upButtonCache: (Form extent:1@1)].\r    ^upButtonCache! !\r!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/11/97 11:43'!\rupButtonCache: aColorForm \r    \"<aColorForm: hOf ColorForm, ^self>\"\r    \"ssa 12/11/97 11:43 - Set upButtonCache to be aColorForm.\"\r\r    upButtonCache _ aColorForm! !\r!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/11/97 12:44'!\rwindow\r    \"This is here to break a recursive loop caused by the indirection of my display transformation.\"\r    window isNil ifTrue:[self window: Display boundingBox].\r    ^window! !\r!MSWScrollBarView methodsFor: 'bordering' stamp: 'ssa 1/24/98 16:05'!\rborderWidth: anything\r\r    super borderWidth:1.\r! !\r!MSWScrollBarView methodsFor: 'control defaults' stamp: 'stp 02/18/98 0-11:'!\rdefaultControllerClass\r\r    ^MSWScrollBarController! !\r!MSWScrollBarView methodsFor: 'delegation' stamp: 'ssa 1/23/98 14:56'!\rdoesNotUnderstand: aMessage\r    \"Here it comes, the dreaded doesNotUnderstand:  HACK   ssa 1/23/98 14:55\"\r\r    ^self scrollingView perform: aMessage selector withArguments: aMessage arguments! !\r!MSWScrollBarView methodsFor: 'delegation' stamp: 'ssa 3/24/2010 14:37'!\rupdate: aSymbol\rself topView ifNotNil:[self topView isCollapsed ifFalse:[self updateElevator]].\rsuper update: aSymbol.\r\"self subViews do:[:each| each update: aSymbol]\"! !\r!MSWScrollBarView methodsFor: 'delegation' stamp: 'ssa 1/21/2010 12:24'!\rupdate: aSymbol with: aValue\r\rself updateElevator.\rsuper update: aSymbol  with: aValue.\r\"self subViews do:[:each| each update: aSymbol with: aValue]\"! !\r!MSWScrollBarView methodsFor: 'delegation' stamp: 'ssa 8/27/2009 04:55'!\rupdateListsAndCodeIn: aWindow\rself updateElevator.\rsuper  updateListsAndCodeIn: aWindow.\r^self subViews first updateListsAndCodeIn: aWindow! !\r!MSWScrollBarView methodsFor: 'display box access' stamp: 'ssa 8/27/2009 09:29'!\rdetermineDownButtonBox\r    \"Answer the rectangle for the scroll bar down button.\"\r\r    ^self scrollBarBox corner -  self scrollBarBox width asPoint extent: (self scrollBarBox width)asPoint! !\r!MSWScrollBarView methodsFor: 'display box access' stamp: 'ssa 12/5/97 12:38'!\rdetermineElevatorBox\r    \"Answer the rectangle for the scroll bar elevator.\"\r\r    ^self scrollBarBox center -  (self scrollBarWidth asPoint // 2) extent: self scrollBarWidth asPoint! !\r!MSWScrollBarView methodsFor: 'display box access' stamp: 'ssa 12/5/97 14:19'!\rdetermineElevatorShaft\r    \"Answer the rectangle for the scroll bar down button.\"\r\r    ^self upButtonBox bottomLeft corner: self downButtonBox topRight! !\r!MSWScrollBarView methodsFor: 'display box access' stamp: 'ssa 12/5/97 12:47'!\rdetermineScrollBarBox\r    \"Answer the rectangle for the scroll bar region.\"\r\r    ^(self realInsetDisplayBox areasOutside: self insetDisplayBox) first! !\r!MSWScrollBarView methodsFor: 'display box access' stamp: 'ssa 12/5/97 12:52'!\rdetermineUpButtonBox\r    \"Answer the rectangle for the scroll bar up button.\"\r\r    ^self scrollBarBox origin extent: self scrollBarBox width asPoint! !\r!MSWScrollBarView methodsFor: 'display box access' stamp: ''!\rdisplayBox\r    \"tah -- (17 July 1989 6:37:46 pm ) -- Answer the real displayBox\"\r\r    ^self realInsetDisplayBox expandBy: borderWidth! !\r!MSWScrollBarView methodsFor: 'display box access' stamp: 'ssa 2/27/98 11:10'!\rinsetDisplayBox\r    \"Answer the inset displayBox reduced by the horizontal space for the scroll bar\"\r\r   ^WhereToLocateScrollBars = #left\r                    ifTrue:[self insetDisplayBoxLeft]\r                    ifFalse:[self insetDisplayBoxRight]! !\r!MSWScrollBarView methodsFor: 'display box access' stamp: 'ssa 2/27/98 11:09'!\rinsetDisplayBoxLeft\r    \"Answer the inset displayBox reduced by the horizontal space for the scroll bar\"\r\r    | box |\r    box _ self realInsetDisplayBox.\r    ^box origin extent: box width - (self borderWidth left  + self scrollBarWidth) @ box height\r\r! !\r!MSWScrollBarView methodsFor: 'display box access' stamp: 'ssa 2/27/98 11:10'!\rinsetDisplayBoxRight\r    \"Answer the inset displayBox reduced by the horizontal space for the scroll bar\"\r    \"Changed to left-side scroll bars--stp.\"\r    \"MSWScrollBarView someInstance\"\r\r    | box |\r    box _ self realInsetDisplayBox.\r    ^((box left + self scrollBarWidth) @ box top)\r            extent: (box width - (self borderWidth left + self scrollBarWidth) @ box height)\r! !\r!MSWScrollBarView methodsFor: 'display box access' stamp: 'ssa 12/15/97 14:50'!\rrealInsetDisplayBox\r    \"tah -- (17 July 1989 6:05:48 pm ) -- answer the real inset displayBox \"\r\r    ^super insetDisplayBox! !\r!MSWScrollBarView methodsFor: 'display transformation' stamp: ''!\rdisplayTransform: anObject \r    \"Apply the display transformation of the receiver to anObject (see \r    View|displayTransformation) and answer the resulting scaled, translated \r    object. It is normally applied to Rectangles, Points, and other objects with \r    coordinates defined in the View's local coordinate system in order to get a \r    corresponding object in display coordinates.\"\r\r    ^(self realDisplayTransformation applyTo: anObject) rounded! !\r!MSWScrollBarView methodsFor: 'display transformation' stamp: 'ssa 12/15/97 14:49'!\rdisplayTransformation\r    \"This is a hook for to get the real displayTransformation\"\r\r    ^self scrollBarWidth = 0\r            ifTrue: [self realDisplayTransformation]\r            ifFalse: [WindowingTransformation window: self getWindow viewport: (self realInsetDisplayBox expandBy: self borderWidth)]! !\r!MSWScrollBarView methodsFor: 'display transformation' stamp: ''!\rrealDisplayTransformation\r    \"This is a hook for labeledView to get the real displayTransformation\"\r\r    ^super displayTransformation! !\r!MSWScrollBarView methodsFor: 'displaying' stamp: 'ssa 9/9/2009 16:44'!\rdeEmphasizeView\r\r    super deEmphasizeView ! !\r!MSWScrollBarView methodsFor: 'displaying' stamp: 'ssa 12/11/97 13:13'!\rdisplayDownButton\r    | box |\r    box _ self downButtonBox.\r    self downButtonCache extent = box extent\r            ifFalse:[self drawDownButton].\r    self downButtonCache displayOn: Display at: box origin! !\r!MSWScrollBarView methodsFor: 'displaying' stamp: 'ssa 1/20/98 21:45'!\rdisplayDownButtonPressed\r    | box cf bb |\r    box _ self downButtonBox.\r    Display fill: box fillColor: Color darkGray.\r    Display fill: (box origin + (2 @ 2) corner: box corner - (1 @ 1))\r            fillColor: Color gray.\r    cf _ ColorForm mappingWhiteToTransparentFrom: (Form\r                                    extent: 13 @ 13\r                                    depth: 1\r                                    fromArray: #(0 0 0 0 0 260046848 117440512 33554432 0 0 0 0 0 )\r                                    offset: 0 @ 0).\r    bb _ BitBlt\r                            destForm: Display\r                            sourceForm: cf\r                            fillColor: Color black\r                            combinationRule: Form paint\r                            destOrigin: box origin + 2\r                            sourceOrigin: 0 @ 0\r                            extent: cf extent\r                            clipRect: box truncated.\r    bb copyBits! !\r!MSWScrollBarView methodsFor: 'displaying' stamp: 'ssa 9/9/2009 17:02'!\rdisplayElevatorOn: aForm\r    | box shaft |\r    box _ self elevatorBox.\rshaft _ self elevatorShaft.\r    self elevatorCache extent = box extent\r            ifFalse:[self drawElevator].\r    self elevatorCache displayOn: aForm at: box origin - shaft origin! !\r!MSWScrollBarView methodsFor: 'displaying' stamp: 'ssa 9/9/2009 16:52'!\rdisplayElevatorShaftOn: aForm\r\r    | box |\r    box _ self elevatorShaft.\r     aForm fill: (0@0 extent: box extent) fillColor: self backgroundColor darker darker\r! !\r!MSWScrollBarView methodsFor: 'displaying' stamp: 'ssa 12/11/97 13:18'!\rdisplayUpButton\r    | box |\r    box _ self upButtonBox.\r    self upButtonCache extent = box extent\r            ifFalse:[self drawUpButton].\r    self upButtonCache displayOn: Display at: box origin! !\r!MSWScrollBarView methodsFor: 'displaying' stamp: 'ssa 1/20/98 21:45'!\rdisplayUpButtonPressed\r    | box cf bb |\r    box _ self upButtonBox.\r    Display fill: box fillColor: Color darkGray.\r    Display fill: (box origin + (2 @ 2) corner: box corner - (1 @ 1))\r            fillColor: Color gray.\r    cf _ ColorForm mappingWhiteToTransparentFrom: (Form\r                                    extent: 13 @ 13\r                                    depth: 1\r                                    fromArray: #(0 0 0 0 0 33554432 117440512 260046848 0 0 0 0 0 )\r                                    offset: 0 @ 0).\r    bb _ BitBlt\r                            destForm: Display\r                            sourceForm: cf\r                            fillColor: Color black\r                            combinationRule: Form paint\r                            destOrigin: box origin + 2\r                            sourceOrigin: 0 @ 0\r                            extent: cf extent\r                            clipRect: box truncated.\r    bb copyBits! !\r!MSWScrollBarView methodsFor: 'displaying' stamp: 'ssa 9/9/2009 16:58'!\rdisplayView\r\r\r    self displayUpButton.\r    self displayDownButton.\r    self updateElevator\r! !\r!MSWScrollBarView methodsFor: 'displaying' stamp: 'ssa 8/27/2009 09:30'!\rdrawDownButton\r    | box pen cf bb form |\r    form _ Form extent: self downButtonBox extent depth: Display depth.\r    box _ form boundingBox.\r    pen _ Pen new.\r    pen destForm: form.\r    pen color: Color black.\r    pen place: box bottomLeft.\r    pen goto: box topLeft.\r    pen goto: box topRight. \r    pen color: Color black.\r    pen place: box bottomLeft + (1 @ 0).\r    pen goto: box topLeft + 1.\r    pen goto: box topRight + (0 @ 1).\r    pen color: Color black.\r    pen place: box bottomLeft + (1 @ 1 negated).\r    pen goto: box bottomRight - (1 @ 1).\r    pen goto: box topRight + (1 negated @ 1).\r    pen color: Color black.\r    pen place: box bottomLeft.\r    pen goto: box bottomRight.\r    pen goto: box topRight.\r    form fill: (box origin + (2 @ 2) corner: box corner - (1 @ 1))\r            fillColor: self backgroundColor.\r    cf _ ColorForm mappingWhiteToTransparentFrom: (Form\r                                    extent: 13 @ 13\r                                    depth: 1\r                                    fromArray: #(0 0 0 0 0 260046848 117440512 33554432 0 0 0 0 0 )\r                                    offset: 0 @ 0).\r    bb _ BitBlt\r                            destForm: form\r                            sourceForm: cf\r                            fillColor: Color black\r                            combinationRule: Form paint\r                            destOrigin: box origin + 1\r                            sourceOrigin: 0 @ 0\r                            extent: cf extent\r                            clipRect: box truncated.\r    bb copyBits.\r    self downButtonCache: form! !\r!MSWScrollBarView methodsFor: 'displaying' stamp: 'ssa 8/21/2009 13:03'!\rdrawElevator\r    | box pen form |\r    form _ Form extent: self controller elevatorBox extent depth: Display depth.\r    box _ form boundingBox.\r    pen _ Pen new.\r    pen destForm: form.\r    pen color: self backgroundColor.\r    pen place: box bottomLeft. \r    pen goto: box topLeft.\r    pen goto: box topRight.\r    pen color: Color black.\r    pen place: box bottomLeft + (1 @ 0).\r    pen goto: box topLeft + 1.\r    pen goto: box topRight + (0 @ 1).\r    pen color: Color black.\r    pen place: box bottomLeft + (1 @ 1 negated).\r    pen goto: box bottomRight - (1 @ 1).\r    pen goto: box topRight + (1 negated @ 1).\r    pen color: Color black.\r    pen place: box bottomLeft.\r    pen goto: box bottomRight.\r    pen goto: box topRight.\r    form fill: (box origin + (2 @ 2) corner: box corner - (1 @ 1))\r            fillColor: self backgroundColor.\r    self elevatorCache: form! !\r!MSWScrollBarView methodsFor: 'displaying' stamp: 'ssa 8/21/2009 13:03'!\rdrawUpButton\r    | box pen cf bb form |\r    form _ Form extent: self upButtonBox extent depth: Display depth.\r    box _ form boundingBox.\r    pen _ Pen new.\r    pen destForm: form.\r    pen color: self backgroundColor.\r    pen place: box bottomLeft.\r    pen goto: box topLeft.\r    pen goto: box topRight. \r    pen color: Color black.\r    pen place: box bottomLeft + (1 @ 0).\r    pen goto: box topLeft + 1.\r    pen goto: box topRight + (0 @ 1).\r    pen color: Color black.\r    pen place: box bottomLeft + (1 @ 1 negated).\r    pen goto: box bottomRight - (1 @ 1).\r    pen goto: box topRight + (1 negated @ 1).\r    pen color: Color black.\r    pen place: box bottomLeft.\r    pen goto: box bottomRight.\r    pen goto: box topRight.\r    form fill: (box origin + (2 @ 2) corner: box corner - (1 @ 1))\r            fillColor: self backgroundColor.\r    cf _ ColorForm mappingWhiteToTransparentFrom: (Form\r                                    extent: 13 @ 13\r                                    depth: 1\r                                    fromArray: #(0 0 0 0 0 33554432 117440512 260046848 0 0 0 0 0 )\r                                    offset: 0 @ 0).\r    bb _ BitBlt\r                            destForm: form\r                            sourceForm: cf\r                            fillColor: Color black\r                            combinationRule: Form paint\r                            destOrigin: box origin + 1\r                            sourceOrigin: 0 @ 0\r                            extent: cf extent\r                            clipRect: box truncated.\r    bb copyBits.\r    self upButtonCache: form! !\r!MSWScrollBarView methodsFor: 'displaying' stamp: 'ssa 9/9/2009 16:46'!\remphasizeView\r\r    self displayView.\r    super emphasizeView! !\r!MSWScrollBarView methodsFor: 'displaying' stamp: 'ssa 9/9/2009 15:18'!\rupdateElevator\r   | newForm |\r\rnewForm _ Form fromDisplay: self elevatorShaft.\rself displayElevatorShaftOn: newForm.\r    self displayElevatorOn: newForm.\rnewForm displayOn: Display at: self elevatorShaft origin! !\r!MSWScrollBarView methodsFor: 'lock access' stamp: 'ssa 12/5/97 16:10'!\runlock\r    \"Flush the cache.\"\r    self scrollBarBox: nil.\r    self upButtonBox: nil.\r    self downButtonBox: nil.\r    self elevatorShaft: nil.\r    super unlock! !\r!MSWScrollBarView methodsFor: 'subview additions' stamp: 'ssa 1/15/98 15:50'!\raddSubView: aView in: aRelativeRectangle borderWidth: width\r    \"11/3/96 ssa - added for compatibility.\"\r\r    \"Make 'aView' into a subview. Use 'aRelativeRectangle' and the \r    super view's window to compute (1) a viewport within the \r    superview for 'aView' and (2) the window extent for 'aView'. Note: \r    defining the windowing transformation and deriving the viewport is \r    logically equivalent but does not seem to be easily done\"\r\r    | subViewPort myWindow myExtent myOrigin |\r    self addSubView: aView ifCyclic: [self error: 'cycle in subView structure.'].\r    aView borderWidth: width.\r    myWindow _ self window.\r    myExtent _ myWindow extent.\r    myOrigin _ myWindow origin.\r    subViewPort _ myExtent * aRelativeRectangle origin + myOrigin \r                                            corner: myExtent * aRelativeRectangle corner + myOrigin.\r    aView window: aView window viewport: subViewPort\r! !\r!MSWScrollBarView methodsFor: 'subview additions' stamp: 'ssa 8/27/2009 04:49'!\ron: aView\r    \"tah -- (17 July 1989 7:17:34 pm ) -- Add a subview to this view\"\r\r    self on: aView borderWidth: 0.\rself model: aView model! !\r!MSWScrollBarView methodsFor: 'subview additions' stamp: ''!\ron: aView borderWidth: aBorderWidth\r    \"tah -- (17 July 1989 7:17:34 pm ) -- Add a subview to this view\"\r\r    self addSubView: aView in: (0@0 extent: (1@1)) borderWidth: aBorderWidth! !\r!MSWScrollBarView methodsFor: 'testing' stamp: 'ssa 1/8/98 16:13'!\rcontainsPoint: aPoint\r    \"Overriden to access my real insetDsiplayBox\"\r\r    ^ self realInsetDisplayBox containsPoint: aPoint! !\r!MSWScrollBarView class methodsFor: 'instance creation' stamp: 'ssa 3/24/2010 15:07'!\ron: aScrollingView\r    \"<aScrollingView: {hOf ListView | hOf TextView | hOf StringHolderView | hOf ParagraphEditor | hOf CodeView | hOf PPSListView | hOf SelectionInListView}, ^iOf self>\"\r    \"Answer an instance of me that encapsulates aScrollingView by providing Windows-style scroll bars\"\r\r   ^aScrollingView class == self class   \"prevent scrollbars on scrolbars\"\r\tifTrue:[aScrollingView error:'should never try to embed scrollbar views']\r\tifFalse:[self new on: aScrollingView]! !\r!MSWScrollBarView class methodsFor: 'class initialization' stamp: 'ssa 1/5/2010 18:10'!\rinitialize\r    \"Make an initial decision as to which side to locate the scrollbars.  See preferences to change sides.\"\r\r    self locateScrollBarsOnRightSide! !\r!MSWScrollBarView class methodsFor: 'preferences' stamp: 'ssa 2/27/98 11:40'!\rlocateScrollBarsOnLeftSide\r    \"Set the flag to locate the ScrollBars on the left hand side of the view.\"\r    \"MSWScrollBarView locateScrollBarsOnLeftSide\"\r\r    | openWindows |\r    WhereToLocateScrollBars _ #left.\r    self allInstances do:[:each| each unlock].\r    openWindows _ ScheduledControllers controllersSatisfying:\r            [:each| (each view  respondsTo:#isCollapsed)\r                            and:[each view isCollapsed not]].\r    openWindows reverseDo:[:each| each view uncacheBits display].\r    ScheduledControllers restore! !\r!MSWScrollBarView class methodsFor: 'preferences' stamp: 'ssa 2/27/98 11:39'!\rlocateScrollBarsOnRightSide\r    \"Set the flag to locate the ScrollBars on the right hand side of the view.\"\r    \"MSWScrollBarView locateScrollBarsOnRightSide\"\r\r    | openWindows |\r    WhereToLocateScrollBars _ #right.\r    self allInstances do:[:each| each unlock].\r    openWindows _ ScheduledControllers controllersSatisfying:\r            [:each| (each view  respondsTo:#isCollapsed)\r                            and:[each view isCollapsed not]].\r    openWindows reverseDo:[:each| each view uncacheBits display].\r    ScheduledControllers restore! !\r!PluggableButtonView methodsFor: 'accessing' stamp: 'ssa 8/23/2009 13:42'!\rlabel: aStringOrDisplayObject \r\"Label this button with the given String or DisplayObject.\"\r\r((aStringOrDisplayObject isKindOf: Paragraph)\ror: [aStringOrDisplayObject isForm])\r\tifTrue: [label _ aStringOrDisplayObject]\r\tifFalse: [label _ aStringOrDisplayObject asParagraph].\rself centerLabel.\r! !\r!PluggableButtonView methodsFor: 'displaying' stamp: 'acg 2/23/2000 00:18'!\rdisplayView\r\r\"Displays this switch and its label, if any.\"\r\rself clearInside.\rlabel ifNotNil: [\r\t(label isKindOf: Paragraph) ifTrue: [\r\t\tlabel foregroundColor: self foregroundColor\r\t\t\t backgroundColor: self backgroundColor].\r\tlabel displayOn: Display\r\t\t\tat: label boundingBox topLeft\r\t\t\tclippingBox: self insetDisplayBox].\rcomplemented _ false.! !\r!PluggableButtonView methodsFor: 'other' stamp: 'ssa 8/22/2009 15:54'!\rperformAction\r\"Inform the model that this button has been pressed. Sent by the controller when this button is pressed.\"\r\r(argumentsSelector isKindOf: BlockContext) ifTrue:[^argumentsSelector value].\rargumentsSelector\r\tifNil:\r\t\t[actionSelector ifNotNil:\r\t\t\t[model perform: actionSelector]]\r\tifNotNil:\r\t\t[model perform: actionSelector\r\t\t\twithArguments:\r\t\t\t\t(Array with: (argumentsProvider perform: argumentsSelector))]! !\r!PluggableButtonView methodsFor: 'other' stamp: 'ssa 8/23/2009 13:47'!\rupdate: aParameter \r\raParameter == getLabelSelector ifTrue: [\r\tgetLabelSelector ifNotNil: [\r\t\tself label: (model perform: getLabelSelector halt ).\r\t\tself displayView]].\rself getModelState \r\tifTrue: [self displayComplemented]\r\tifFalse: [self displayNormal].\r! !\r!PluggableListView methodsFor: 'model access' stamp: 'ssa 9/2/2009 20:11'!\rgetList \r\"Answer the list to be displayed.\"\r\r| lst |\rgetListSelector == nil ifTrue: [^ #()].\rlst _ model perform: getListSelector.\rlst == nil ifTrue: [^ #()].\r^ lst ! !\r!PluggableListView methodsFor: 'updating' stamp: 'ssa 11/25/2009 14:42'!\rupdate: aSymbol \r\"Refer to the comment in View|update:.\"\r\"Hacked to support Windoze - ssa\"\raSymbol == getListSelector ifTrue:\r\t[self list: self getList.\r\tself displayView.\r\tself displaySelectionBox].\raSymbol == getSelectionSelector ifTrue:\r\t[self moveSelectionBox: self getCurrentSelectionIndex].\r(self superView isKindOf: MSWScrollBarView)\r\tifTrue:[self superView updateElevator]! !\r!PluggableListView class methodsFor: 'instance creation' stamp: 'ssa 3/24/2010 14:45'!\ron: anObject list: getListSel selected: getSelectionSel changeSelected: setSelectionSel\r\"Create a 'pluggable' list view on the given model parameterized by the given message selectors. See aboutPluggability comment.\"\r\r^ self \r\ton: anObject\r\tlist: getListSel\r\tselected: getSelectionSel\r\tchangeSelected: setSelectionSel\r\tmenu: nil\r\tkeystroke: #arrowKey:from:\t\t\"default\"\r! !\r!PluggableListView class methodsFor: 'instance creation' stamp: 'ssa 3/24/2010 14:45'!\ron: anObject list: getListSel selected: getSelectionSel changeSelected: setSelectionSel menu: getMenuSel\r\"Create a 'pluggable' list view on the given model parameterized by the given message selectors. See aboutPluggability comment.\"\r\r^ self \r\ton: anObject\r\tlist: getListSel\r\tselected: getSelectionSel\r\tchangeSelected: setSelectionSel\r\tmenu: getMenuSel\r\tkeystroke: #arrowKey:from:\t\t\"default\"\r\r! !\r!PluggableListView class methodsFor: 'instance creation' stamp: 'ssa 9/4/1998 16:00'!\ron: anObject list: getListSel selected: getSelectionSel changeSelected: setSelectionSel menu: getMenuSel keystroke: keyActionSel\r\"Create a 'pluggable' list view on the given model parameterized by the given message selectors. See aboutPluggability comment.\"\r\"Added Windoze wrapper - ssa\"\r\r^ MSWScrollBarView on: (self new\r\ton: anObject\r\tlist: getListSel\r\tselected: getSelectionSel\r\tchangeSelected: setSelectionSel\r\tmenu: getMenuSel\r\tkeystroke: keyActionSel)\r! !\r!PluggableListViewByObject methodsFor: 'accessing' stamp: 'ssa 11/25/2009 12:50'!\rchangeModelSelection: anInteger\r\"Change the model's selected item to be the one at the given index.\"\r| item |\rsetSelectionSelector ifNotNil: [\r\titem _ (anInteger = 0 ifTrue: [nil] ifFalse: [self objects at: anInteger]).\r\tmodel perform: setSelectionSelector with: item].\r! !\r!PluggableListViewByObject methodsFor: 'accessing' stamp: 'ssa 1/29/2010 13:40'!\rgetCurrentSelectionIndex\r\"Answer the index of the current selection.\"\r| item |\rgetSelectionSelector == nil ifTrue: [^ 0].\ritem _ model perform: getSelectionSelector.\r^ self objects indexOf: item ifAbsent:[0]\r! !\r!PluggableListViewByObject methodsFor: 'accessing' stamp: 'ssa 1/29/2010 13:47'!\rlabelForItem: anItem\r\"Subclasses may want to override\"\r^anItem isString ifTrue:[anItem]ifFalse:[anItem printString]! !\r!PluggableListViewByObject methodsFor: 'accessing' stamp: 'ssa 6/17/2010 16:40'!\rlist: arrayOfObjects\r\"Set the receivers items to be the given list of objects printStrings.\"\r\"Note: the instance variable 'objects' holds the original list.\r The instance variable 'list' is a paragraph constructed from\r this list.\"\r\r| oldOffset |\rself scrollCache: (list isNil ifFalse:[list scrollDelta]ifTrue:[0]).\rself objects: arrayOfObjects.\risEmpty _ arrayOfObjects isEmpty.\roldOffset _ list isNil ifTrue:[0@0]ifFalse:[list offset].\r\r\"add top and bottom delimiters\"\rlist _ ListParagraph \r\twithArray:\r\t\t(Array streamContents: [:s |\r\t\t\ts nextPut: topDelimiter.\r\t\t\tself objects do: [:item | item == nil ifFalse: [s nextPut: (self labelForItem: item)]].\r\t\t\ts nextPut: bottomDelimiter])\r\t style: self assuredTextStyle.\rlist offset: oldOffset.\rselection _ self getCurrentSelectionIndex.\rself positionList.! !\r!PluggableListViewByObject methodsFor: 'accessing' stamp: 'ssa 9/9/2009 11:31'!\robjects\r\"Answer the value of objects\"\r\robjects isNil ifTrue:[self objects: OrderedCollection new].\r^ objects! !\r!PluggableListViewByObject methodsFor: 'accessing' stamp: 'ssa 9/9/2009 11:29'!\robjects: anObject\r\"Set the value of objects\"\r\robjects _ anObject! !\r!PluggableListViewByObject methodsFor: 'accessing' stamp: 'ssa 1/22/2010 14:02'!\rscrollCache\r\"Answer the value of scrollCache\"\r\rscrollCache isNil ifTrue:[self scrollCache: 0].\r^ scrollCache! !\r!PluggableListViewByObject methodsFor: 'accessing' stamp: 'ssa 1/22/2010 14:02'!\rscrollCache: anObject\r\"Set the value of scrollCache\"\r\rscrollCache _ anObject! !\r!LyPluggableOutlineView methodsFor: 'accessing' stamp: 'ssa 9/9/2009 10:58'!\rboxFor: index\r\"Answer the rectangle in which the item is displayed.\"\r\r| offset |\roffset _ (index - 1 + (topDelimiter == nil ifTrue: [0] ifFalse: [1]))* list lineGrid.\r^(self insetDisplayBox left @ (list compositionRectangle top +offset) \r\textent: self insetDisplayBox width @ list lineGrid)\r\tinsetBy: (Rectangle left: 1 right: 1 top: 1 bottom: 0)! !\r!LyPluggableOutlineView methodsFor: 'accessing' stamp: 'ssa 9/9/2009 10:52'!\rgetChildrenSelector\r\"Answer the value of getChildrenSelector\"\r\rgetChildrenSelector isNil ifTrue:[self getChildrenSelector: #subobjects].\r^ getChildrenSelector! !\r!LyPluggableOutlineView methodsFor: 'accessing' stamp: 'ssa 9/9/2009 10:51'!\rgetChildrenSelector: anObject\r\"Set the value of getChildrenSelector\"\r\rgetChildrenSelector _ anObject! !\r!LyPluggableOutlineView methodsFor: 'accessing' stamp: 'ssa 3/1/2010 12:28'!\rindentBoxFor: index\r\"Answer the rectangle which counds the whitespace in front of the item at this index\"\r\r| itemBox indents |\ritemBox _ self boxFor: index.\rindents _ self indentFor:(self objects at: index).\r\r^itemBox width: (Paragraph withText: indents asText style: self textStyle)  boundingBox width.! !\r!LyPluggableOutlineView methodsFor: 'accessing' stamp: 'ssa 9/9/2009 14:42'!\rindentFor: anItem\r\r| aStream |\raStream _ WriteStream on:''.\r(self levelOf: anItem) timesRepeat:[aStream tab].\r^aStream contents,'    '! !\r!LyPluggableOutlineView methodsFor: 'accessing' stamp: 'ssa 9/10/2009 16:00'!\rlabelForItem: anItem\r\"Subclasses may want to override\"\r\r^(self indentFor: anItem),anItem outlineString! !\r!LyPluggableOutlineView methodsFor: 'accessing' stamp: 'ssa 9/9/2009 11:59'!\rlevelOf: anItem\r\r^self model levelOf: anItem! !\r!LyPluggableOutlineView methodsFor: 'accessing' stamp: 'ssa 9/9/2009 16:25'!\rtwistyTargets\r\"Answer the value of twistyTargets\"\r\rtwistyTargets isNil ifTrue:[self twistyTargets: Dictionary new].\r^ twistyTargets! !\r!LyPluggableOutlineView methodsFor: 'accessing' stamp: 'ssa 9/9/2009 16:24'!\rtwistyTargets: anObject\r\"Set the value of twistyTargets\"\r\rtwistyTargets _ anObject! !\r!LyPluggableOutlineView methodsFor: 'displaying' stamp: 'ssa 9/11/2009 17:06'!\rdisplayTwisties\r\r| box isOpen twisty to firstIndex |\rfirstIndex _ self firstShown.\rfirstIndex to: ((self list numberOfLines - 2)min:(firstIndex + self numSelectionsInView )) do:[:index|\r\t(self model hasChildren: (self objects at: index)) ifTrue:[ \r\t\tbox _ self indentBoxFor: index.\r\t\tisOpen _ self model isOpen:(self objects at: index).\r\t\ttwisty _ isOpen ifTrue:[self openedTwistyIcon]ifFalse:[self closedTwistyIcon].\r\t\ttwisty\r\t\t\tdisplayOn: Display\r\t\t\tat: (to_box topRight - (twisty width@0))\r\t\t\tclippingBox: (box intersect: self clippingBox)\r\t\t\trule: Form paint\r\t\t\tfillColor: nil.\r\t\tself twistyTargets at:(to extent: twisty extent) put: index]].! !\r!LyPluggableOutlineView methodsFor: 'displaying' stamp: 'ssa 1/22/2010 14:03'!\rdisplayView\r\rself list foregroundColor: self foregroundColor backgroundColor: self backgroundColor.\rself list displayOn: Display at: self insetDisplayBox origin - (0@self scrollCache) clippingBox: self insetDisplayBox.\r(self insetDisplayBox copy areasOutside: (self insetDisplayBox origin extent: self list compositionRectangle   extent )) do:[:box| Display fill: box fillColor: Color white].\rself displayTwisties.\r! !\r!LyPluggableOutlineView methodsFor: 'displaying' stamp: 'ssa 11/25/2009 12:55'!\rpositionList\r\rlist wrappingBox: self wrappingBox  clippingBox: self clippingBox! !\r!LyPluggableOutlineView methodsFor: 'icons' stamp: 'ssa 9/9/2009 13:33'!\rclosedTwistyIcon\r\r^LyGraphicsLibrary selfTwistyClosed! !\r!LyPluggableOutlineView methodsFor: 'icons' stamp: 'ssa 9/9/2009 13:33'!\ropenedTwistyIcon\r\r^LyGraphicsLibrary selfTwistyOpen! !\r!LyPluggableOutlineView methodsFor: 'scrolling support' stamp: 'ssa 11/25/2009 12:36'!\rscrollBy: anInteger \r\rsuper scrollBy: anInteger .\rself displayTwisties.\r^true! !\r!LyPluggableOutlineView methodsFor: 'controller access' stamp: 'ssa 9/9/2009 16:34'!\rdefaultControllerClass\r\r^LyPluggableOutlineController! !\r!LyPluggableOutlineView methodsFor: 'controller access' stamp: 'ssa 9/9/2009 16:28'!\rdefaultCsntrollerClass\r\r^LyPluggableOutlineController! !\r!ExplorerListView methodsFor: 'accessing' stamp: 'ssa 3/9/2010 16:15'!\rindentFor: anItem\r\r| aStream lev |\r(anItem isKindOf: String) ifTrue:[^''].\raStream _ WriteStream on:''.\r(lev _ self levelOf: anItem) .\rlev  timesRepeat:[aStream nextPutAll:'   '].\r^aStream contents,'  '! !\r!ExplorerListView methodsFor: 'accessing' stamp: 'ssa 3/1/2010 12:33'!\rlevelOf: anItem\r\r^anItem depth! !\r!ExplorerListView methodsFor: 'displaying' stamp: 'ssa 2/8/2010 16:17'!\rdisplayTwisties\r\r| box twisty to firstIndex |\rfirstIndex _ self firstShown.\rfirstIndex  to: ((self list numberOfLines -2)min:(firstIndex + self numSelectionsInView )) do:[:index|\r\t(self objects at: index) hasContents ifTrue:[ \r\t\tbox _ self indentBoxFor: index.\r\t\ttwisty _(self objects at: index) isOpen ifTrue:[self openedTwistyIcon]ifFalse:[self closedTwistyIcon].\r\t\ttwisty\r\t\t\tdisplayOn: Display\r\t\t\tat: (to_box topRight- (twisty width@0))\r\t\t\tclippingBox: (box intersect: self clippingBox)\r\t\t\trule: Form paint\r\t\t\tfillColor: nil.\r\t\tself twistyTargets at:(to extent: twisty extent) put: index]].! !\r!ExplorerListView methodsFor: 'displaying' stamp: 'ssa 6/17/2010 16:32'!\rlabelForItem: anItem\r\"Subclasses may want to override\"\r\r^(self indentFor: anItem),' ',anItem asString ! !\r!PluggableListViewOfMany class methodsFor: 'instance creation' stamp: 'ssa 3/24/2010 14:46'!\ron: anObject list: listSel primarySelection: getSelectionSel changePrimarySelection: setSelectionSel listSelection: getListSel changeListSelection: setListSel menu: getMenuSel\r^ self \r\ton: anObject\r\tlist: listSel\r\tprimarySelection: getSelectionSel\r\tchangePrimarySelection: setSelectionSel\r\tlistSelection: getListSel\r\tchangeListSelection: setListSel\r\tmenu: getMenuSel\r\tkeystroke: #arrowKey:from:\t\t\"default\"! !\r!PluggableListViewOfMany class methodsFor: 'instance creation' stamp: 'ssa 8/21/2009 15:22'!\ron: anObject list: listSel primarySelection: getSelectionSel changePrimarySelection: setSelectionSel listSelection: getListSel changeListSelection: setListSel menu: getMenuSel keystroke: keyActionSel \r^MSWScrollBarView on: ( self new\r\ton: anObject\r\tlist: listSel\r\tprimarySelection: getSelectionSel\r\tchangePrimarySelection: setSelectionSel\r\tlistSelection: getListSel\r\tchangeListSelection: setListSel\r\tmenu: getMenuSel\r\tkeystroke: keyActionSel)! !\r!MSWSystemView methodsFor: 'label accessing' stamp: 'ssa 3/24/2010 16:03'!\rcloseBoxFrame\r\r    | boxHeight |\r    boxHeight _ self labelDisplayBox height -  11.\r    ^ Rectangle origin: (self labelDisplayBox topRight + (boxHeight negated-9@7)) extent:\rboxHeight+2@boxHeight\r\r    \"MSWSystemView initializeCache\"! !\r!MSWSystemView methodsFor: 'label accessing' stamp: 'ssa 1/24/98 23:35'!\rgrowBoxFrame\r\r    | boxHeight |\r    boxHeight _ self labelDisplayBox height -  11.\r    ^ Rectangle origin: (self labelDisplayBox topRight + (2*boxHeight negated-12@7)) extent:\rboxHeight+2@boxHeight\r\r    \"NiceSystemView initializeCache\"! !\r!MSWSystemView methodsFor: 'label accessing' stamp: 'ssa 2/6/98 14:24'!\rlabelHeight\r    ^self isCollapsed\r            ifFalse:[18 + 6]\r            ifTrue:[(LabelStyle fontAt: 2) height + 14]! !\r!MSWSystemView methodsFor: 'label accessing' stamp: 'ssa 1/24/98 23:56'!\rlabelTextRegion\r    labelText == nil ifTrue: [^ self labelDisplayBox center extent: 0@0].\r    ^ (labelText boundingBox\r                    align: labelText boundingBox leftCenter\r                    with: self labelDisplayBox leftCenter + (25@0))\r            intersect: (self labelDisplayBox origin corner: self labelDisplayBox corner -\r(55@0))! !\r!MSWSystemView methodsFor: 'label accessing' stamp: 'ssa 1/24/98 23:34'!\rshrinkBoxFrame\r\r    | boxHeight |\r    boxHeight _ self labelDisplayBox height -  11.\r    ^ Rectangle origin: (self labelDisplayBox topRight + (3*boxHeight negated-15@7)) extent:\rboxHeight+2@boxHeight\r\r    \"NiceSystemView initializeCache\"! !\r!MSWSystemView methodsFor: 'label accessing' stamp: 'ssa 1/24/98 23:17'!\rsystemBoxFrame\r\r    | boxHeight |\r    boxHeight _ self labelDisplayBox height - 11 .\r    ^ Rectangle origin: (self labelDisplayBox origin + (7@7)) extent:\rboxHeight@boxHeight\r\r    \"NiceSystemView initializeCache\"! !\r!MSWSystemView methodsFor: 'framing' stamp: 'stp 02/18/98 0-15:'!\rcollapse\r    \"If the receiver is not already collapsed, change its view to be that of its \r    label only.\"\r\r    self isCollapsed ifFalse:\r                    [expandedViewport _ self viewport.\r                    savedSubViews _ subViews.\r                    self resetSubViews.\r                    labelText isNil ifTrue: [self label: nil.  bitsValid _ false.].\r                    self window: (self inverseDisplayTransform:\r                                    ((self labelDisplayBox topLeft extent: (labelText extent x + 80) @ self labelHeight)\r                                             intersect: self labelDisplayBox))]! !\r!MSWSystemView methodsFor: 'framing' stamp: 'ar 1/22/98 22:47'!\rfullScreen\r    | portRect |\r    portRect _ self viewport.\r    growFrame _ portRect topLeft - self labelOffset\r                            corner: portRect corner.\r    ^super fullScreen! !\r!MSWSystemView methodsFor: 'framing' stamp: 'ar 1/22/98 22:49'!\rrestore\r    self reframeTo: ( growFrame isNil ifTrue:[self initialFrame]\rifFalse:[growFrame])! !\r!MSWSystemView methodsFor: 'displaying' stamp: 'ssa 3/24/2010 15:27'!\rdeEmphasizeLabel\r    \"Un-Highlight the label.\"\r    labelFrame height = 0 ifTrue: [^ self].  \"no label\"\r    self displayLabelBackground: false.\r    self displayLabelTextDeEmphasized.\r    self displayLabelBorder.\rself displayClosingGuardBoxIfNeeded.\r! !\r!MSWSystemView methodsFor: 'displaying' stamp: 'ssa 3/24/2010 15:32'!\rdisplayClosingGuardBoxIfNeeded\r\"display closing guard active, if true\"\r\r| aRect |\rself controller preventClosing ifTrue:[\r\taRect _ self closeBoxFrame.\r\tself closingGuardIcon displayOn: Display at: aRect origin + (2@1) clippingBox: aRect rule: Form over fillColor: nil].\r! !\r!MSWSystemView methodsFor: 'displaying' stamp: 'ssa 3/24/2010 15:42'!\rdisplayDeEmphasizedOLD\r    \"Display this view with emphasis off.\r    If windowBits is not nil, then simply BLT if possible,\r            but force full display for top window so color is preserved.\"\r\rself displayBorder.\rsuper displayDeEmphasized.\rself deEmphasizeLabel! !\r!MSWSystemView methodsFor: 'displaying' stamp: 'ssa 3/24/2010 15:43'!\rdisplayEmphasizedOLD\r    \"Display with label highlighted to indicate that it is active.\"\r\rself displayBorder.\rsuper displayEmphasized.\rself emphasizeLabel ! !\r!MSWSystemView methodsFor: 'displaying' stamp: 'ssa 3/24/2010 15:41'!\rdisplayLabelBackground: emphasized\r    \"Clear or emphasize the inner region of the label\"\r\r    emphasized\r            ifTrue:[Display\r                                    fill: self labelDisplayBox\r                                    fillColor: self labelBackgroundColor]\r            ifFalse:[Display\r                                    fill: self labelDisplayBox\r                                    fillColor:self labelBackgroundColor darker darker].\r            self displayLabelBoxes.\r! !\r!MSWSystemView methodsFor: 'displaying' stamp: 'ssa 3/24/2010 15:25'!\rdisplayLabelBoxes\r    CloseBoxForm ifNil:[CloseBoxForm _ self drawCloseBoxForm].\r    GrowBoxForm ifNil:[GrowBoxForm _ self drawGrowBoxForm].\r    ShrinkBoxForm ifNil:[ShrinkBoxForm _ self drawShrinkBoxForm].\r    SystemBoxForm ifNil:[SystemBoxForm _ self drawSystemBoxForm].\r    CloseBoxForm displayOn: Display at: self closeBoxFrame origin.\r    GrowBoxForm displayOn: Display at: self growBoxFrame origin.\r    self isCollapsed \r            ifFalse:[ShrinkBoxForm displayOn: Display at: self shrinkBoxFrame origin].\r\r    SystemBoxForm displayOn: Display at: self  systemBoxFrame origin.\r\t\"display closing guard active, if true\"\rself displayClosingGuardBoxIfNeeded.\r! !\r!MSWSystemView methodsFor: 'displaying' stamp: 'ssa 3/24/2010 15:41'!\rdisplayLabelText\r    \"The label goes in the center of the window\"\r    | labelRect |\r    labelText foregroundColor: Color black\r                    backgroundColor: self labelBackgroundColor.\r    labelRect _ self labelTextRegion.\r    \"Display fill: (labelRect expandBy: 3@0) fillColor: self labelColor.\"\r    labelText displayOn: Display at: labelRect topLeft +(0@1) clippingBox: labelRect\r                    rule: Form under fillColor: labelText fillColor! !\r!MSWSystemView methodsFor: 'displaying' stamp: 'ssa 3/24/2010 15:41'!\rdisplayLabelTextDeEmphasized\r    | labelRect |\r    labelText foregroundColor: Color gray\r                    backgroundColor: self labelBackgroundColor.\r    labelRect _ self labelTextRegion.\r    labelText displayOn: Display at: labelRect topLeft +(0@1) clippingBox: labelRect\r                    rule: Form under fillColor: labelText fillColor! !\r!MSWSystemView methodsFor: 'displaying' stamp: 'ssa 3/24/2010 15:41'!\rdisplayLabelTextEmphasized\r    | labelRect |\r    labelText foregroundColor: Color black\r                    backgroundColor: self labelBackgroundColor.\r    labelRect _ self labelTextRegion.\r    labelText displayOn: Display at: labelRect topLeft +(0@1) clippingBox: labelRect\r                    rule: Form under fillColor: labelText fillColor! !\r!MSWSystemView methodsFor: 'displaying' stamp: 'stp 02/18/98 0-13:'!\rdrawCloseBoxForm\r    \"Answer a thinner 'X' for the close box.\"\r    \"CloseBoxForm bitEdit\"\r\r    ^Form\r            extent: 15@13\r            depth: 8\r            fromArray: #( 50529027 50529027 50529027 50529024 51252750 235802126 235802126 235801600 \r                    51249923 50529027 50529027 50531328 51249921 16974595 50528513 50531328 51249923 16843523 \r                    50397443 50531328 51249923 50397443 16843523 50531328 51249923 50528513 16974595 50531328 \r                    51249923 50397443 16843523 50531328 51249923 16843523 50397443 50531328 51249921 16974595 \r                    50528513 50531328 51249923 50529027 50529027 50531328 51249923 50529027 50529027 50531328 \r                    51121164 202116108 202116108 202116096)\r            offset: 0@0! !\r!MSWSystemView methodsFor: 'displaying' stamp: 'ar 1/22/98 22:10'!\rdrawGrowBoxForm\r    | box pen form |\r    form _ Form extent: self growBoxFrame extent depth: 8.\r    box _ form boundingBox.\r    pen _ Pen new.\r    pen destForm: form.\r    pen color: Color gray.\r    pen place: box bottomLeft.\r    pen goto: box topLeft.\r    pen goto: box topRight.\r    pen color: Color veryLightGray.\r    pen place: box bottomLeft + (1 @ 0).\r    pen goto: box topLeft + 1.\r    pen goto: box topRight + (0 @ 1).\r    pen color: Color darkGray.\r    pen place: box bottomLeft + (1 @ 1 negated).\r    pen goto: box bottomRight - (1 @ 1).\r    pen goto: box topRight + (1 negated @ 1).\r    pen color: Color black.\r    pen place: box bottomLeft.\r    pen goto: box bottomRight.\r    pen goto: box topRight.\r    form fill: (box origin + (2 @ 2) corner: box corner - (1 @ 1))\r            fillColor: Color gray.\r    pen color: Color black.\r    pen place: box topLeft + (3@3).\r    pen goto: box bottomLeft + (3@-3).\r    pen goto: box bottomRight + (-3@-3).\r    pen goto: box topRight + (-3@3).\r    pen defaultNib: 2.\r    pen place: box topRight + (-4@3).\r    pen goto: box topLeft + (3@3).\r    ^form! !\r!MSWSystemView methodsFor: 'displaying' stamp: 'ar 1/22/98 22:11'!\rdrawShrinkBoxForm\r    | box pen form |\r    form _ Form extent: self growBoxFrame extent depth: 8.\r    box _ form boundingBox.\r    pen _ Pen new.\r    pen destForm: form.\r    pen color: Color gray.\r    pen place: box bottomLeft.\r    pen goto: box topLeft.\r    pen goto: box topRight.\r    pen color: Color veryLightGray.\r    pen place: box bottomLeft + (1 @ 0).\r    pen goto: box topLeft + 1.\r    pen goto: box topRight + (0 @ 1).\r    pen color: Color darkGray.\r    pen place: box bottomLeft + (1 @ 1 negated).\r    pen goto: box bottomRight - (1 @ 1).\r    pen goto: box topRight + (1 negated @ 1).\r    pen color: Color black.\r    pen place: box bottomLeft.\r    pen goto: box bottomRight.\r    pen goto: box topRight.\r    form fill: (box origin + (2 @ 2) corner: box corner - (1 @ 1))\r            fillColor: Color gray.\r    pen color: Color black.\r    pen defaultNib: 2.\r    pen place: box bottomRight + (-4@-3).\r    pen goto: box bottomLeft + (3@-3).\r    ^form! !\r!MSWSystemView methodsFor: 'displaying' stamp: 'ssa 1/24/98 23:09'!\rdrawSystemBoxForm\r    | box pen form |\r    form _ Form extent: self systemBoxFrame extent depth: 8.\r    box _ form boundingBox.\r    pen _ Pen new.\r    pen destForm: form.\r    pen color: Color gray.\r    pen place: box bottomLeft.\r    pen goto: box topLeft.\r    pen goto: box topRight.\r    pen color: Color veryLightGray.\r    pen place: box bottomLeft + (1 @ 0).\r    pen goto: box topLeft + 1.\r    pen goto: box topRight + (0 @ 1).\r    pen color: Color darkGray.\r    pen place: box bottomLeft + (1 @ 1 negated).\r    pen goto: box bottomRight - (1 @ 1).\r    pen goto: box topRight + (1 negated @ 1).\r    pen color: Color black.\r    pen place: box bottomLeft.\r    pen goto: box bottomRight.\r    pen goto: box topRight.\r    form fill: (box origin + (2 @ 2) corner: box corner - (1 @ 1))\r            fillColor: Color gray.\r    ^form! !\r!MSWSystemView methodsFor: 'displaying' stamp: 'ssa 1/24/98 22:49'!\remphasizeLabel\r    \"Highlight the label.\"\r    labelFrame height = 0 ifTrue: [^ self].  \"no label\"\r    self displayLabelBackground: true.\r    self displayLabelBoxes.\r    self displayLabelTextEmphasized.\r    self displayLabelBorder! !\r!MSWSystemView methodsFor: 'displaying' stamp: 'ssa 3/24/2010 15:44'!\rlabelBackgroundColor\r\r^Color veryLightGray lighter! !\r!MSWSystemView methodsFor: 'bordering' stamp: 'ssa 3/25/2010 14:30'!\rbaseColor\r^Color gray ! !\r!MSWSystemView methodsFor: 'bordering' stamp: 'ssa 3/25/2010 14:34'!\rborderBox: box\r\rDisplay border: (box insetBy: 0@0) widthRectangle: (1@1 corner: 0@0) rule: Form paint fillColor: self baseColor.\rDisplay border: (box insetBy: 0@0) widthRectangle: (0@0 corner: 1@1) rule: Form paint fillColor: self baseColor darker darker darker.\r\rDisplay border: (box insetBy: 1@1) widthRectangle: (1@1 corner: 0@0) rule: Form paint fillColor: self baseColor lighter.\rDisplay border: (box insetBy: 1@1) widthRectangle: (0@0 corner: 1@1) rule: Form paint fillColor: self baseColor darker .\r\rDisplay border: (box insetBy: 2@2) widthRectangle: (1@1 corner: 0@0) rule: Form paint fillColor: self baseColor.\rDisplay border: (box insetBy: 2@2) widthRectangle: (0@0 corner: 1@1) rule: Form paint fillColor: self baseColor lighter.\r! !\r!MSWSystemView methodsFor: 'bordering' stamp: 'ssa 3/25/2010 14:39'!\rborderBoxNoBottom: box\r\rDisplay border: (box insetBy: 0@0) widthRectangle: (1@1 corner: 0@0) rule: Form paint fillColor: self baseColor.\rDisplay border: (box insetBy: 0@0) widthRectangle: (0@0 corner: 1@0) rule: Form paint fillColor: self baseColor darker darker darker.\r\rDisplay border: (box insetBy: 1@1) widthRectangle: (1@1 corner: 0@0) rule: Form paint fillColor: self baseColor lighter.\rDisplay border: (box insetBy: 1@1) widthRectangle: (0@0 corner: 1@0) rule: Form paint fillColor: self baseColor darker .\r\rDisplay border: (box insetBy: 2@2) widthRectangle: (1@1 corner: 0@0) rule: Form paint fillColor: self baseColor.\rDisplay border: (box insetBy: 2@2) widthRectangle: (0@0 corner: 1@0) rule: Form paint fillColor: self baseColor lighter.\r! !\r!MSWSystemView methodsFor: 'bordering' stamp: 'ssa 9/4/1998 16:52'!\rborderWidth: anInteger\r\"Override to support standard borders\"! !\r!MSWSystemView methodsFor: 'bordering' stamp: 'ssa 3/25/2010 14:33'!\rdisplayBorder\r    \"Display the receiver's border (using the receiver's borderColor).\"\r\r    | |\r    self isCollapsed ifTrue:[^self].\r    borderWidth = 0\r            ifTrue:\r                    [insideColor == nil\r                            ifFalse: \r                                    [Display fill: self displayBox fillColor: self backgroundColor]]\r            ifFalse:\r                    [self borderBox: self displayBox]! !\r!MSWSystemView methodsFor: 'bordering' stamp: 'ssa 3/24/2010 17:09'!\rdisplayBorderOLD\r    \"Display the receiver's border (using the receiver's borderColor).\"\r\r    | box |\r    self isCollapsed ifTrue:[^self].\r    borderWidth = 0\r            ifTrue:\r                    [insideColor == nil\r                            ifFalse: \r                                    [Display fill: self displayBox fillColor: self backgroundColor]]\r            ifFalse:\r                    [box _ self displayBox.\r    \"left edge\"\r    Display fill: (box origin extent: 1@(box height - 1))\r            fillColor: Color gray.\r    Display fill: (box origin +(1@1) extent: 1@(box height - 2))\r            fillColor: Color veryLightGray.\r    Display fill: (box origin +(2@2) extent: 2@(box height-4))\r            fillColor: Color gray.\r    Display fill: (box origin +(4@3) extent: 1@(box height-6))\r            fillColor: Color veryDarkGray.\r    Display fill: (box origin +(5@4) extent: 1@(box height-8))\r            fillColor: Color black.\r\r    \"right edge\"\r    Display fill: (box topRight -(1@0)extent: 1@(box height - 1))\r            fillColor: Color black.\r    Display fill: (box topRight +(-2@1) extent: 1@(box height - 2))\r            fillColor: Color veryDarkGray.\r    Display fill: (box topRight +(-4@2) extent: 2@(box height-4))\r            fillColor: Color gray.\r    Display fill: (box topRight +(-5@5) extent: 1@(box height-10))\r            fillColor: Color veryLightGray.\r    Display fill: (box topRight +(-6@6) extent: 1@(box height-12))\r            fillColor: Color gray.\r\r    \"top edge\"\r    Display fill: (box origin extent: box width@1)\r            fillColor: Color gray.\r    Display fill: (box origin +(1@1) extent: (box width - 2)@1)\r            fillColor: Color veryLightGray.\r    Display fill: (box origin +(2@2) extent: (box width-4)@2)\r            fillColor: Color gray.\r    Display fill: (box origin +(4@4) extent: (box width-8)@1)\r            fillColor: Color veryDarkGray.\r    Display fill: (box origin +(5@5) extent: (box width-10)@1)\r            fillColor: Color black.\r\r    \"bottom edge\"\r    Display fill: (box bottomLeft -(0@1) extent: box width @1)\r            fillColor: Color black.\r    Display fill: (box bottomLeft +(1@-2) extent: (box width - 2)@1)\r            fillColor: Color veryDarkGray.\r    Display fill: (box bottomLeft +(2@-4) extent: (box width-4)@2)\r            fillColor: Color gray.\r    Display fill: (box bottomLeft +(4@-5) extent: (box width-7)@1)\r            fillColor: Color veryLightGray.\r    Display fill: (box bottomLeft +(5@-6) extent: (box width-9)@1)\r            fillColor: Color gray.\r                    insideColor == nil ifFalse:\r                            [Display fill: self insetDisplayBox fillColor: self backgroundColor]]! !\r!MSWSystemView methodsFor: 'bordering' stamp: 'ssa 3/25/2010 14:37'!\rdisplayCollaspedLabelBorder\r    \"Display the receiver's label border.\"\r\r    | |\r    borderWidth = 0\r            ifTrue:\r                    [insideColor == nil\r                            ifFalse: \r                                    [Display fill: self displayBox fillColor: self backgroundColor]]\r            ifFalse:\r                    [self borderBox: self labelDisplayBox]! !\r!MSWSystemView methodsFor: 'bordering' stamp: 'ssa 3/25/2010 14:39'!\rdisplayLabelBorder\r    \"Display the receiver's label border.\"\r\r    | |\r    self isCollapsed ifTrue:[^self displayCollaspedLabelBorder].\r    borderWidth = 0\r            ifTrue:\r                    [insideColor == nil\r                            ifFalse: \r                                    [Display fill: self displayBox fillColor: self backgroundColor]]\r            ifFalse:\r                    [self borderBoxNoBottom: self labelDisplayBox]! !\r!MSWSystemView methodsFor: 'bordering' stamp: 'ssa 3/25/2010 14:32'!\rdisplayLabelBorderOLD\r    \"Display the receiver's label border.\"\r\r    | box |\r    self isCollapsed ifTrue:[^self displayCollaspedLabelBorder].\r    borderWidth = 0\r            ifTrue:\r                    [insideColor == nil\r                            ifFalse: \r                                    [Display fill: self displayBox fillColor: self backgroundColor]]\r            ifFalse:\r                    [box _ self labelDisplayBox.\r    \"left edge\"\r    Display fill: (box origin extent: 1@(box height))\r            fillColor: Color gray.\r    Display fill: (box origin +(1@1) extent: 1@(box height))\r            fillColor: Color veryLightGray.\r    Display fill: (box origin +(2@2) extent: 2@(box height))\r            fillColor: Color gray.\r    Display fill: (box origin +(4@3) extent: 1@(box height))\r            fillColor: Color veryDarkGray.\r    Display fill: (box origin +(5@4) extent: 1@(box height))\r            fillColor: Color black.\r\r    \"right edge\"\r    Display fill: (box topRight -(1@0)extent: 1@(box height))\r            fillColor: Color black.\r    Display fill: (box topRight +(-2@1) extent: 1@(box height))\r            fillColor: Color veryDarkGray.\r    Display fill: (box topRight +(-4@2) extent: 2@(box height))\r            fillColor: Color gray.\r    Display fill: (box topRight +(-5@5) extent: 1@(box height))\r            fillColor: Color veryLightGray.\r    Display fill: (box topRight +(-6@6) extent: 1@(box height))\r            fillColor: Color gray.\r\r    \"top edge\"\r    Display fill: (box origin extent: box width@1)\r            fillColor: Color gray.\r    Display fill: (box origin +(1@1) extent: (box width - 2)@1)\r            fillColor: Color veryLightGray.\r    Display fill: (box origin +(2@2) extent: (box width-4)@2)\r            fillColor: Color gray.\r    Display fill: (box origin +(4@4) extent: (box width-8)@1)\r            fillColor: Color veryDarkGray.\r    Display fill: (box origin +(5@5) extent: (box width-10)@1)\r            fillColor: Color black]! !\r!MSWSystemView methodsFor: 'testing' stamp: 'ar 1/22/98 22:07'!\rcacheBitsAsTwoTone\r    ^false! !\r!MSWSystemView methodsFor: 'testing' stamp: 'ar 1/22/98 22:37'!\risFullScreen\r    | frame |\r    frame _ model fullScreenSize.\r    ^(frame topLeft + self labelOffset corner: frame corner) = self viewport\r! !\r!MSWSystemView methodsFor: 'controller access' stamp: 'stp 02/18/98 0-11:'!\rdefaultControllerClass\r    ^MSWSystemController! !\r!MSWSystemView methodsFor: 'initialize' stamp: 'ssa 3/25/2010 14:36'!\rinitialize\r    \"change the default border to 3 to support stylish edges.\"\r\r\r    super initialize. \r    self borderWidthLeft: 3 right: 3 top: 0 bottom: 3! !\r!MSWSystemView methodsFor: 'window access' stamp: 'ssa 8/24/2009 10:13'!\rdefaultWindow\r    \"Build the minimum Rectangle that encloses all the windows of the \r    receiver's subViews. The answer is a Rectangle obtained by expanding \r    this minimal Rectangle by the borderWidth of the receiver. If the \r    receiver has no subViews, then a Rectangle enclosing the entire display \r    screen is answered. It is used internally by View methods if no window \r    has been specified for the View. Specialized subclasses of View should \r    redefine View|defaultWindow to handle the default case for instances \r    that have no subViews.\"\r\r    | aRectangle |\r    subViews isEmpty ifTrue: [^DisplayScreen boundingBox copy].\r    aRectangle _ self firstSubView viewport.\r    subViews do: [:aView | aRectangle _ aRectangle merge: aView viewport].\r    ^aRectangle! !\r!StandardSystemView class methodsFor: 'instance creation' stamp: 'ssa 3/24/2010 15:17'!\rnew\r    \"This is a rather dirty hack -- but we don't have a window builder\ryet. (ar 1/22/98 23:36)\"\r\r    ^Preferences nicerSystemViews\r            ifTrue:[MSWSystemView basicNew initialize]\r            ifFalse:[self basicNew initialize]! !\r!MSWSystemView class methodsFor: 'class initialization' stamp: 'ssaq 2/27/98 11:17'!\rinitialize\r    \"MSWSystemView initialize\"\r\r    self install! !\r!MSWSystemView class methodsFor: 'class initialization' stamp: 'ssa 2/27/98 11:02'!\rinitializeCache\r    \"MSWSystemView initializeCache\"\r    GrowBoxForm _ nil.\r    ShrinkBoxForm _ nil.\r    SystemBoxForm _ nil.\r    CloseBoxForm _ nil.! !\r!MSWSystemView class methodsFor: 'class initialization' stamp: 'ssa 3/24/2010 15:16'!\rinstall\r    \"MSWSystemView install\"\r    \r    Preferences enable:#nicerSystemViews! !\r!MSWSystemView class methodsFor: 'class initialization' stamp: 'ssa 3/24/2010 15:16'!\runInstall\r    \"MSWSystemView unInstall\"\r\r    Preferences disable:#nicerSystemViews! !\r!StringHolderView methodsFor: 'initialize-release' stamp: 'ssa 1/20/2010 10:35'!\rinitialize \r\"Refer to the comment in View|initialize.\"\r\rsuper initialize.\rdisplayContents _ '' asParagraphWithStyle: self textStyle.\rhasUnacceptedEdits _ false.\raskBeforeDiscardingEdits _ true.\r! !\r!StringHolderView methodsFor: 'updating' stamp: ''!\rupdateDisplayContents\r    \"Make the text that is displayed be the contents of the receiver's model.\"\r    \"VIVA LA JUNTA!!!!  hack this to update the scroll bar when the contents changes  - ssa 1/15/98 14:39\"\r\r    self editString: model contents.\r    self displayView.\r    (self superView isKindOf: MSWScrollBarView)\r            ifTrue:[self superView updateElevator]! !\r!StringHolderView methodsFor: 'model access' stamp: 'ssa 1/20/2010 10:43'!\reditString: aString \r\"The paragraph to be displayed is created from the characters in aString.\"\r\rdisplayContents _ Paragraph withText: aString asText\r\tstyle: self textStyle copy\r\tcompositionRectangle: (self insetDisplayBox insetBy: 6 @ 0)\r\tclippingRectangle: self insetDisplayBox\r\tforeColor: self foregroundColor backColor: self backgroundColor.\r(self controller isKindOf: ParagraphEditor)\r\tifTrue: [controller changeParagraph: displayContents]! !\r!StringHolderView methodsFor: 'scrolling support' stamp: ''!\rpercentPreceedingContent\r    \"Answer the percent of my content that not visible since it has been scrolled of the top of the screen.  ssa 12/5/97 15:37\"\r    | para lineIndex |\r    para _ self displayContents.\r    lineIndex _ para lineIndexOfTop: para visibleRectangle top.\r    lineIndex = 1 ifTrue:[^0.0].\r    ^lineIndex / para numberOfLines asFloat\r! !\r!StringHolderView methodsFor: 'scrolling support' stamp: ''!\rtotalContentHeight\r    \"Answer the total height of my contents. ssa 12/5/97 15:16\"\r    ^ self displayContents compositionRectangle height / self unitContentHeight! !\r!StringHolderView methodsFor: 'scrolling support' stamp: ''!\runitContentHeight\r    \"Answer the unit height of my contents. ssa 12/5/97 15:16\"\r    ^ self displayContents lineGrid asFloat! !\r!StringHolderView methodsFor: 'scrolling support' stamp: ''!\rvisibleContentHeight\r    \"Answer the total height of my contents. ssa 12/5/97 15:16\"\r    ^ self displayContents clippingRectangle height / self unitContentHeight! !\r!StringHolderView methodsFor: 'accessing' stamp: 'ssa 1/20/2010 10:31'!\raskBeforeDiscardingEdits\r\"Answer the value of askBeforeDiscardingEdits\"\r\raskBeforeDiscardingEdits isNil ifTrue:[self askBeforeDiscardingEdits: nil].\r^ askBeforeDiscardingEdits! !\r!StringHolderView methodsFor: 'accessing' stamp: 'ssa 1/20/2010 10:48'!\rchangeTextStyle: aTextStyle\r\rself textStyle: aTextStyle.\rself displayContents setWithText: self displayContents asText style: self textStyle ! !\r!StringHolderView methodsFor: 'accessing' stamp: 'ssa 1/27/2010 17:12'!\rdefaultTextStyle\r\r^TextStyle default ! !\r!StringHolderView methodsFor: 'accessing' stamp: 'ssa 1/20/2010 10:31'!\rdisplayContents: anObject\r\"Set the value of displayContents\"\r\rdisplayContents _ anObject! !\r!StringHolderView methodsFor: 'accessing' stamp: 'ssa 1/20/2010 10:36'!\rtextStyle\r\"Answer the value of textStyle\"\r\rtextStyle isNil ifTrue:[self textStyle: self defaultTextStyle].\r^ textStyle! !\r!StringHolderView methodsFor: 'accessing' stamp: 'ssa 1/20/2010 10:31'!\rtextStyle: anObject\r\"Set the value of textStyle\"\r\rtextStyle _ anObject! !\r!StringHolderView class methodsFor: 'instance creation' stamp: ''!\ropen: aStringHolder label: aString \r    \"Create a standard system view of the model, aStringHolder, as viewed by \r    an instance of me. The label of the view is aString.\"\r    \"VIVA LA JUNTA!!  Modified to use MSWScrollBarViews - ssa 12/11/97 12:00\"\r    | aStringHolderView topView shv |\r    aStringHolderView _ self container: aStringHolder.\r    topView _ StandardSystemView new.\r    topView model: aStringHolderView model.\r    topView addSubView: (shv _ MSWScrollBarView on: aStringHolderView ).\r    shv borderWidth: 2.\r    topView label: aString.\r    topView minimumSize: 100 @ 50.\r    topView controller open! !\r!PluggableTextView class methodsFor: 'instance creation' stamp: 'ssa 3/24/2010 14:35'!\ron: anObject text: getTextSel accept: setTextSel\r\r^ self on: anObject\r\ttext: getTextSel\r\taccept: setTextSel\r\treadSelection: nil\r\tmenu: nil\r! !\r!PluggableTextView class methodsFor: 'instance creation' stamp: 'ssa 9/4/1998 16:04'!\ron: anObject text: getTextSel accept: setTextSel readSelection: getSelectionSel menu: getMenuSel\r\"Added Windoze wrapper - ssa\"\r\r^ MSWScrollBarView on: (self new on: anObject\r\ttext: getTextSel\r\taccept: setTextSel\r\treadSelection: getSelectionSel\r\tmenu: getMenuSel)\r! !\rBraceNode subclass: #EnsembleNode\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'System-Compiler'!\rObject subclass: #Sly\rinstanceVariableNames: ''\rclassVariableNames: 'KeepFlying'\rpoolDictionaries: ''\rcategory: 'Sly'!\r!EnsembleNode methodsFor: 'printing' stamp: 'ssa 4/19/2010 20:44'!\rprintOn: aStream indent: level\r\raStream nextPut: $%;nextPut: ${.\r1 to: elements size do: \r\t[:i | (elements at: i) printOn: aStream indent: level.\r\ti < elements size ifTrue: [aStream nextPutAll: '. ']].\raStream nextPut: $}! !\r!EnsembleNode methodsFor: 'code generation' stamp: 'ssa 4/19/2010 22:35'!\remitForValue: stack on: aStream\r\r^ emitNode emitForValue: stack on: aStream! !\r!EnsembleNode methodsFor: 'code generation' stamp: 'dmu 9/16/2010 23:44'!\rsizeForValue: encoder\remitNode _ \"Long form: (Array braceStream: N) nextPut: a; nextPut: b; ...; braceArray;asEnsembleOfElements\"\r\t\t\tCascadeNode new\r\t\t\t\treceiver: (MessageNode new\r\t\t\t\t\t\t\treceiver: (encoder encodeVariable: #Array)\r\t\t\t\t\t\t\tselector: #braceStream:\r\t\t\t\t\t\t\targuments: (Array with: (encoder encodeLiteral: elements size))\r\t\t\t\t\t\t\tprecedence: 3 from: encoder)\r\t\t\t\tmessages: (((elements collect: [:elt | MessageNode new receiver: nil\r\t\t\t\t\t\t\t\t\t\t\t\t\tselector: #nextPut:\r\t\t\t\t\t\t\t\t\t\t\t\t\targuments: (Array with: elt)\r\t\t\t\t\t\t\t\t\t\t\t\t\tprecedence: 3 from: encoder])\r\t\t\t\t\t\t\tcopyWith: (MessageNode new receiver: nil\r\t\t\t\t\t\t\t\t\t\t\t\t\tselector: #braceArray\r\t\t\t\t\t\t\t\t\t\t\t\t\targuments: (Array new)\r\t\t\t\t\t\t\t\t\t\t\t\t\tprecedence: 1 from: encoder))copyWith: (MessageNode new receiver: nil\r\t\t\t\t\t\t\t\t\t\t\t\t\tselector: #asEnsembleOfElements\r\t\t\t\t\t\t\t\t\t\t\t\t\targuments: (Array new)\r\t\t\t\t\t\t\t\t\t\t\t\t\tprecedence: 1 from: encoder)).\r^ emitNode sizeForValue: encoder! !\rObject subclass: #SlyBoid\rinstanceVariableNames: 'position velocity neighbors flock lastDrawnPosition lastLastDrawnPosition'\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly-Boids'!\rObject subclass: #SlyBoids\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly-Boids'!\rObject subclass: #SlyDrawer\rinstanceVariableNames: 'flock'\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly-Boids'!\rObject subclass: #SlyEnsemble\rinstanceVariableNames: 'members'\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly'!\rObject subclass: #SlyEnsembleMessageDispatcher\rinstanceVariableNames: 'members message originalReceiver originalSelector arguments return actualSelector  messageAdverb argumentAdverbs messageEnvelopes argumentSources receiverSource receivers usingRoundRobin robinCount gerund executingSerially isAsAWhole'\rclassVariableNames: 'RandomNumberSource'\rpoolDictionaries: ''\rcategory: 'Sly'!\rObject subclass: #SlyFlock\rinstanceVariableNames: 'boids isDone'\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly-Boids'!\rObject subclass: #SlyGraphics\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly'!\rObject subclass: #SlyMessageEnvelope\rinstanceVariableNames: 'receiver message'\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly'!\rRVMTestSuite subclass: #SlySyntaxTests\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly'!\r!Scanner class methodsFor: 'class initialization' stamp: 'ssa 4/19/2010 20:31'!\rinitialize\r| newTable |\rnewTable _ Array new: 256 withAll: #xBinary. \"default\"\rnewTable atAll: #(9 10 12 13 32 ) put: #xDelimiter. \"tab lf ff cr space\"\rnewTable atAll: ($0 asciiValue to: $9 asciiValue) put: #xDigit.\r\r1 to: 255\r\tdo: [:index |\r\t\t(Character value: index) isLetter\r\t\t\tifTrue: [newTable at: index put: #xLetter]].\r\rnewTable at: 30 put: #doIt.\rnewTable at: $\" asciiValue put: #xDoubleQuote.\rnewTable at: $# asciiValue put: #xLitQuote.\rnewTable at: $% asciiValue put: #percent.\rnewTable at: $$ asciiValue put: #xDollar.\rnewTable at: $' asciiValue put: #xSingleQuote.\rnewTable at: $: asciiValue put: #xColon.\rnewTable at: $( asciiValue put: #leftParenthesis.\rnewTable at: $) asciiValue put: #rightParenthesis.\rnewTable at: $. asciiValue put: #period.\rnewTable at: $; asciiValue put: #semicolon.\rnewTable at: $[ asciiValue put: #leftBracket.\rnewTable at: $] asciiValue put: #rightBracket.\rnewTable at: ${ asciiValue put: #leftBrace.\rnewTable at: $} asciiValue put: #rightBrace.\rnewTable at: $^ asciiValue put: #upArrow.\rnewTable at: $_ asciiValue put: #leftArrow.\rnewTable at: $| asciiValue put: #verticalBar.\rTypeTable _ newTable \"bon voyage!!\"\r\r\"Scanner initialize\"! !\r!Sly class methodsFor: 'testing' stamp: 'dmu 8/27/2010 13:38'!\risSlySelector: aSelector\r\"True if its has SlySelectorModifers\"\r^(aSelector beginsWith: SlySelectorModifier asAWhole)\r\tor:[(aSelector includesSubString: SlySelectorModifier adverbColon)\r\tor:[aSelector includesSubString: SlySelectorModifier gerundColon]]! !\rScanner initialize!\r!Object methodsFor: '*Sly' stamp: 'dmu 9/19/2010 22:45'!\rcomma: x\r^self , x! !\r!Object methodsFor: '*Sly' stamp: 'dmu 3/25/2010 23:43'!\rdivideBy: x\r^ self / x! !\r!Object methodsFor: '*Sly' stamp: 'dmu 3/25/2010 23:42'!\rminus: x\r^ self - x! !\r!Object methodsFor: '*Sly' stamp: 'dmu 3/25/2010 23:42'!\rplus: x\r^ self + x! !\r!Object methodsFor: '*Sly' stamp: 'dmu 3/25/2010 23:43'!\rtimes: x\r^ self * x! !\r!Object methodsFor: 'testing' stamp: 'dmu 9/3/2010 15:00'!\risEnsemble\r\"Sly3Ensemble overrides to true\"\r^false! !\r!Collection methodsFor: '*Sly' stamp: 'ssa 7/7/2010 19:50'!\rdeactivateEnsembleSendsDuring: aBlock\r\"disable messaging dispatching to members and just send it to myself during aBlock\"\r\r0 primitiveSetExtraPreheaderWord:  self.\raBlock value.\rself  primitiveSetExtraPreheaderWord:  self. \r! !\rObject subclass: #Sly3AbstractEnsembleMessageDispatcher\r\tinstanceVariableNames: 'unprocessedMessage doneBlock '\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Sly3-Basic-Dispatching'!\rSly3AbstractEnsembleMessageDispatcher subclass: #Sly3EnsembleMessageDispatcher\r\tinstanceVariableNames: 'parsedMessage'\r\tclassVariableNames: 'RandomNumberSource'\r\tpoolDictionaries: ''\r\tcategory: 'Sly3-Advanced-Dispatching'!\rObject subclass: #Sly3UnprocessedEnsembleMessage\r\tinstanceVariableNames: 'receiver selector arguments members'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Sly3-Basic-Dispatching'!\r!Collection methodsFor: '*Sly' stamp: 'dmu 9/8/2010 21:58'!\rsentToEnsemble: aMessage\r| r |\rr _ Sly3EnsembleMessageDispatcher dispatch: (Sly3UnprocessedEnsembleMessage fromMessage: aMessage members: self).\r^ r! !\r!Integer methodsFor: 'explorer' stamp: 'ssa 7/7/2010 21:07'!\rhasContentsInExplorer\r\r^false! !\r!ScreenController methodsFor: 'menu messages' stamp: 'dmu 8/30/2010 10:44'!\ropenSlyDashboard\r\"Create and schedule a Sly dashboard.\"\r\rSly3 dashboard! !\r!ScreenController methodsFor: 'nested menus' stamp: 'ssa 3/24/2010 14:13'!\rpresentSlyMenu\rself popUpMenuFor: #slyMenu! !\r!ScreenController methodsFor: 'nested menus' stamp: 'ssa 3/24/2010 14:12'!\rslyMenu\r^ SelectionMenu labelList:\r\t#(\t'dashboard'\r\t\t)\r\tlines: #()\r\tselections: #(openSlyDashboard)\r\"\rScreenController  new slyMenu startUp\r\"! !\r!Sly class methodsFor: 'user interfacing' stamp: 'dmu 8/27/2010 14:15'!\rdashboard \r\"Sly dashboard      \"   \r| topView  buttons lastView subViewCount |\rtopView := RVMStandardSystemView new  .\rtopView borderWidth:1. \rbuttons _ {\r\tTranscript showInConsoleSwitch.\r\tself keepFlyingSwitch.\r\tRVMButtonView label:'[ SlyBoids new run ] fork' \r\t\t\t\taction:[[ SlyBoids new run ] fork].\r\tRVMButtonView label:'Restore normal cursor' \r\t\t\t\taction:[Cursor normal show].\r\tRVMButtonView label:'process browser' \r\t\t\t\taction:[ProcessBrowser  open].\r\tRVMButtonView label: 'SlySyntaxTests runAll'\r\t\t\t\taction: [SlySyntaxTests runAll].\r}.\rlastView _ nil.\rbuttons do:[:view| topView addSubView: view below: lastView.\r\tlastView _ view].\rtopView label: 'Sly'.\rsubViewCount _ topView subViews size.\rtopView minimumSize: 165@(subViewCount*27).\rtopView maximumSize: topView minimumSize.\rtopView controller open! !\r!Sly class methodsFor: 'user interfacing' stamp: 'dmu 8/30/2010 10:44'!\rkeepFlyingSwitch\r\"Sly3 keepFlyingSwitch demo\"\r^RVMCheckBoxView on: self label: 'Keep SlyBoids Flying' \r\t\t\t\t\tcheckState: [Sly3 keepFlying] \r\t\t\t\t\twhenChecked: [Sly3 keepFlying:true] \r\t\t\t\t\twhenUnchecked: [Sly3 keepFlying:false].! !\r!Sly class methodsFor: 'accessing' stamp: 'ssa 3/25/2010 16:29'!\rkeepFlying\r\rKeepFlying isNil ifTrue:[KeepFlying _ true].\r^KeepFlying! !\r!Sly class methodsFor: 'accessing' stamp: 'ssa 3/25/2010 16:32'!\rkeepFlying: aBoolean\r\rKeepFlying _ aBoolean! !\r!Sly class methodsFor: 'accessing' stamp: 'ssa 3/25/2010 16:32'!\rtoggleKeepFlying\r\rself keepFlying: self keepFlying not! !\r!SlyBoid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:51'!\rflock\r\"Answer the value of flock\"\r\rflock isNil ifTrue:[self flock: #()].\r^ flock! !\r!SlyBoid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 22:38'!\rflock: anObject\r\"Set the value of flock\"\r\rflock _ anObject! !\r!SlyBoid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:57'!\rlastDrawnPosition\r\"Answer the value of lastDrawnPosition\"\r\rlastDrawnPosition isNil ifTrue:[self lastDrawnPosition: self position].\r^ lastDrawnPosition! !\r!SlyBoid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:00'!\rlastDrawnPosition: anObject\r\"Set the value of lastDrawnPosition\"\r\rlastDrawnPosition _ anObject! !\r!SlyBoid methodsFor: 'accessing' stamp: 'dmu 3/23/2010 00:05'!\rlastLastDrawnPosition\r\"Answer the value of lastLastDrawnPosition\"\r\rlastLastDrawnPosition isNil ifTrue:[self lastLastDrawnPosition: self lastDrawnPosition].\r^ lastLastDrawnPosition! !\r!SlyBoid methodsFor: 'accessing' stamp: 'dmu 3/22/2010 23:53'!\rlastLastDrawnPosition: anObject\r\"Set the value of lastLastDrawnPosition\"\r\rlastLastDrawnPosition _ anObject! !\r!SlyBoid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:53'!\rneighbors\r\"Answer the value of neighbors\"\r\rneighbors isNil ifTrue:[self neighbors: #()].\r^ neighbors! !\r!SlyBoid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 22:38'!\rneighbors: anObject\r\"Set the value of neighbors\"\r\rneighbors _ anObject! !\r!SlyBoid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 22:39'!\rposition\r\"Answer the value of position\"\r\rposition isNil ifTrue:[self position: 500@500].\r^ position! !\r!SlyBoid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 22:38'!\rposition: anObject\r\"Set the value of position\"\r\rposition _ anObject! !\r!SlyBoid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 22:39'!\rvelocity\r\"Answer the value of velocity\"\r\rvelocity isNil ifTrue:[self velocity: 0@0].\r^ velocity! !\r!SlyBoid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 22:38'!\rvelocity: anObject\r\"Set the value of velocity\"\r\rvelocity _ anObject! !\r!SlyBoid methodsFor: 'as yet unclassified' stamp: 'dmu 8/23/2010 15:42'!\rcomputeCentroid\r[\"buttonize next two lines for a trigger setting button\"\r\"Click To Set Trigger\"\r\"  ONEHALT _ true\"     \r].\r\r\"ONEHALT ifTrue:[ONEHALT _ false. self halt].\"\r\r\"^500@500\"\r\"^ self flock boids  positionING: #averaging\"\r\"^ self flock boids  positionLY: #serially ING: #averaging\"\r^ (self flock boids members collect: [:m| m position]) average! !\r!SlyBoid methodsFor: 'as yet unclassified' stamp: 'dmu 8/23/2010 15:43'!\rcomputeNeighbors\r\"^self flock boids yourselfLY:{ #selectively:. [:b| b isNear: self]}\"\r\r^self flock boids members select:[:m| m isNear: self]! !\r!SlyBoid methodsFor: 'as yet unclassified' stamp: 'dmu 3/22/2010 23:55'!\rdraw\r| p |\rself lastDrawnPosition = self position ifTrue: [^ self].\rp _ self position.\r\rfalse ifTrue: [\r\tSlyGraphics drawWhiteCircle: self lastDrawnPosition.\r\tSlyGraphics drawCircle: p.\r\t\"SlyGraphics drawFrom: self lastDrawnPosition to: p.\"\r]\rifFalse: [\r\tSlyGraphics drawFrom: self lastDrawnPosition to: p.\r\tSlyGraphics eraseFrom: self lastLastDrawnPosition to: self lastDrawnPosition.\r].\r\rself lastLastDrawnPosition: self lastDrawnPosition.\rself lastDrawnPosition: p! !\r!SlyBoid methodsFor: 'as yet unclassified' stamp: 'ssa 3/25/2010 16:28'!\rfly\r| centroid |\r[Sly keepFlying] whileTrue:[\r\tcentroid _ self computeCentroid.\r\tself moveToNewPosition: centroid.\r\tself flock maybeYield\r]! !\r!SlyBoid methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:15'!\rgo\rself fly! !\r!SlyBoid methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 22:43'!\risNear: aBoid\r^ (self ~== aBoid) and: [(self position dist: aBoid position) <= 10]! !\r!SlyBoid methodsFor: 'as yet unclassified' stamp: 'dmu 3/17/2010 00:10'!\rkeepAwayFromNeighbors\r| sum |\rself neighbors ifEmpty: [^ 0@0].\rsum _ 0.\rself neighbors  do: [:m | sum _ sum + (self position - m position)].\r^ sum / self neighbors size asFloat! !\r!SlyBoid methodsFor: 'as yet unclassified' stamp: 'dmu 3/24/2010 15:30'!\rlimitPositionFrom: min to: max\r| r pos |\rpos _ self position.\rr _ ((pos max: min@min) min: max@max).\rr = pos ifTrue: [^ self].\rpos x < min ifTrue: [r _                 min + (min - pos x)  @  pos y. self velocity: self velocity x negated @ self velocity y].\rpos y < min ifTrue: [r _ pos x @ (min + (min - pos y)).               self velocity: self velocity x             @ self velocity y negated].\rpos x > max ifTrue: [r _                 max - (pos x - max) @ pos y.  self velocity: self velocity x negated @ self velocity y ].\rpos y > max ifTrue: [r _ pos x @ (max - (pos y - max)).              self velocity: self velocity x              @ self velocity y negated].\rself position: r! !\r!SlyBoid methodsFor: 'as yet unclassified' stamp: 'dmu 3/24/2010 15:36'!\rlimitVelocityTo: n\r| ns v vs q |\rns _ n * n * 2.\rv _ self velocity.\rvs _ v x squared + v y squared.\rvs <= ns ifTrue: [^ self].\rq _ (ns / vs) sqrt.\rself velocity: v * q.! !\r!SlyBoid methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:53'!\rmatchVelocityWithNeighbors\rself neighbors  ifEmpty: [^ 0@0].\r^ (self neighbors  collect: [:m| m velocity]) average / 8.0! !\r!SlyBoid methodsFor: 'as yet unclassified' stamp: 'dmu 3/24/2010 15:04'!\rmoveToNewPosition: centroid\r| a b c |\rself neighbors: self computeNeighbors.\ra _ self moveTowardCentroidOfAllOthers: centroid.\rb _ self keepAwayFromNeighbors.\rc _ self matchVelocityWithNeighbors.\rself velocity: self velocity + a + b + c.\rself limitVelocityTo: 10.\rself position: self position + self velocity.\rself limitPositionFrom: 0 to: 1000! !\r!SlyBoid methodsFor: 'as yet unclassified' stamp: 'dmu 8/23/2010 15:43'!\rmoveTowardCentroidOfAllOthers: centroid\r| perceivedCentroid s |\rs _ self flock boids members size. \"was ENSsize\"\rs < 2 ifTrue: [^ 0@0].\rperceivedCentroid _ (centroid * s - self position) / (s - 1).\r^ (perceivedCentroid - self position) / 100.0! !\r!SlyBoid methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 22:54'!\rperturb\rself position: (self position perturb: 100).\rself velocity: (self velocity perturb: 2).! !\r!SlyBoids methodsFor: 'as yet unclassified' stamp: 'dmu 9/16/2010 23:59'!\rrun\r\"Transcript show: (Time millisecondsToRun: [SlyBoids new run]); cr\"\r\"[ SlyBoids new run ] fork\"\r| c flock drawer flockAndDrawer n |\rc _ OrderedCollection new.\rn _ self flockSize.\r1 to: n do: [:i| c add: self boidClass new perturb].\rflock _ SlyFlock boids: c asEnsembleOfElements.\rflock boids flock: flock.\rdrawer _ SlyDrawer flock: flock.\rflockAndDrawer _ SlyEnsemble with: {flock. drawer}.\r\"SlyGraphics clearScreen.\"\rflockAndDrawer  go ! !\r!SlyBoids class methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 22:30'!\rrun\r^ self new run! !\r!SlyDrawer methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:06'!\rflock\r\"Answer the value of flock\"\r\rflock isNil ifTrue:[self flock: nil].\r^ flock! !\r!SlyDrawer methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:06'!\rflock: anObject\r\"Set the value of flock\"\r\rflock _ anObject! !\r!SlyDrawer methodsFor: 'as yet unclassified' stamp: 'dmu 8/23/2010 15:49'!\rgo\rProcessor thisProcess useOnlyMainCore. \"for bitblt efficiency\"\r[flock isDone] whileFalse: [flock boids members do: [:m | m draw. \"self flock maybeYield\"] ]! !\r!SlyDrawer class methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:07'!\rflock: f\r^ self new flock: f! !\r!SlyEnsemble methodsFor: 'as yet unclassified' stamp: 'ssa 7/8/2010 00:50'!\rENSsize\r^members size! !\r!SlyEnsemble methodsFor: 'as yet unclassified' stamp: 'dmu 8/29/2010 12:53'!\rdoesNotUnderstand: aMessage\r\"Try to process this message as an ensemble dispatch message to help in the case of inlined primitive calls  like perform:with:with:\"\r^ Sly3EnsembleMessageDispatcher dispatch: (Sly3UnprocessedEnsembleMessage fromMessage: aMessage theEnsemble: self)! !\r!SlyEnsemble methodsFor: 'as yet unclassified' stamp: 'dmu 3/29/2010 01:04'!\rensembleSpecies\r^ SlyEnsemble! !\r!SlyEnsemble methodsFor: 'as yet unclassified' stamp: 'dmu 3/26/2010 00:34'!\rifEmpty: blk\r^ self sizeAsAWhole = 0 ifTrue: [blk value]! !\r!SlyEnsemble methodsFor: 'as yet unclassified' stamp: 'ssa 6/11/2010 14:50'!\risEnsemble\r\"Object answers false\"\r^true! !\r!SlyEnsemble methodsFor: 'as yet unclassified' stamp: 'ssa 6/17/2010 10:29'!\rmembers\r\"you should never trust that the members collection stays the same within the ensemble\"\r^members copy! !\r!SlyEnsemble methodsFor: 'as yet unclassified' stamp: 'ssa 7/7/2010 13:57'!\rmembers: aCollection\rself primitiveSetExtraWordSelector: #sentToEnsemble:.\raCollection primitiveSetExtraPreheaderWord: self.\rmembers _ aCollection.\r^ self! !\r!SlyEnsemble methodsFor: 'as yet unclassified' stamp: 'dmu 3/25/2010 23:48'!\rselect: aBlock\r^ self members select: aBlock! !\r!SlyEnsemble methodsFor: 'as yet unclassified' stamp: 'dmu 3/25/2010 21:13'!\rsize\r^ self members size! !\r!SlyEnsemble methodsFor: 'as yet unclassified' stamp: 'dmu 3/25/2010 21:25'!\rtotalWithIdentity: id\r^ self plus: id adverb: #reductively! !\r!SlyEnsemble methodsFor: 'printing' stamp: 'ssa 6/17/2010 16:35'!\rasExplorerString\r\r^self printString! !\r!SlyEnsemble methodsFor: 'printing' stamp: 'ssa 6/17/2010 13:48'!\rprintOn: out\r\"Add a string that should compile back into an ensemble like me\"\rout nextPutAll:'%{'.\rself members  do:[:mem|\r\tmem ENSprintOn: out.\r\tout nextPutAll:'. '].\rout nextPutAll:'}'.\r! !\r!SlyEnsemble methodsFor: 'printing' stamp: 'ssa 6/17/2010 13:51'!\rstoreOn: out\r\"Write a string on aStream that should compile back into an ensemble like me\"\rout nextPut:$%;nextPut:${.\rself members  do:[:mem|\r\tmem ENSstoreOn: out.\r\tout nextPut:$.].\rout nextPut:$}.\r! !\r!SlyEnsemble methodsFor: 'exploring' stamp: 'ssa 6/15/2010 16:14'!\rexplorerContents\r\r^self members asOrderedCollection withIndexCollect: [:value :index |\r\tObjectExplorerWrapper\r\t\twith: value\r\t\tname: index printString\r\t\tmodel: self]! !\r!SlyEnsemble methodsFor: 'exploring' stamp: 'ssa 6/15/2010 16:15'!\rhasContentsInExplorer\r^self members isEmpty not! !\r!SlyEnsemble methodsFor: 'disabling' stamp: 'ssa 7/7/2010 19:13'!\rdeactivateEnsembleSendsDuring: aBlock\r\"disable messaging dispatching to members and just send it to the ensemble object itself during aBlock\"\r\r0 primitiveSetExtraPreheaderWord:  self.\raBlock value.\rself members primitiveSetExtraPreheaderWord:  self. \r! !\r!SlyEnsemble class methodsFor: 'as yet unclassified' stamp: 'dmu 3/28/2010 23:48'!\rwith: aCollection\r^ self new members: aCollection! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/12/2010 10:58'!\ractualSelector\r\"Answer the value of actualSelector\"\r\ractualSelector isNil ifTrue:[self determineActualSelector].\r^ actualSelector! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 7/16/2010 19:19'!\ractualSelector: anObject\r\"Set the value of actualSelector\"\r\ractualSelector _ anObject asSymbol.\r\t\"(actualSelector = #readStream) ifTrue:[self halt:'FOUND IT!!']\"! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 7/16/2010 19:34'!\rargumentAdverbs\r\"Answer the value of argumentAdverbs\"\r\rargumentAdverbs isNil ifTrue:[self argumentAdverbs: \"OrderedCollection new \"(self arguments collect:[:e| nil])].\r^ argumentAdverbs! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 4/20/2010 16:19'!\rargumentAdverbs: anObject\r\"Set the value of argumentAdverbs\"\r\rargumentAdverbs _ anObject! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/28/2010 14:23'!\rargumentSources\r\"Answer the value of argumentSources\"\r\rargumentSources isNil ifTrue:[self argumentSources: Dictionary new].\r^ argumentSources! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/28/2010 14:23'!\rargumentSources: anObject\r\"Set the value of argumentSources\"\r\rargumentSources _ anObject! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/28/2010 15:41'!\rarguments\r\"Answer the value of arguments\"\r\rarguments isNil ifTrue:[self arguments: self  originalArguments].\r^ arguments! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 6/1/2010 16:30'!\rarguments: anObject\r\"Set the value of arguments\"\r\rarguments _ anObject asOrderedCollection! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 6/1/2010 16:27'!\rgerund\r\"Answer the value of gerund, nil, a #symbol, or a block\"\r\rgerund isNil ifTrue:[self gerund: nil].\r^ gerund! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 6/1/2010 16:27'!\rgerund: anObject\r\"Set the value of gerund\"\r\rgerund _ anObject! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 6/1/2010 16:27'!\rhasGerund\r\"Answer true if we have a gerund\"\r\r^self gerund notNil! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 3/28/2010 23:04'!\rmembers\r\"Answer the value of members\"\r\rmembers isNil ifTrue:[self members: nil].\r^ members! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 3/28/2010 23:04'!\rmembers: anObject\r\"Set the value of members\"\r\rmembers _ anObject! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 3/28/2010 23:04'!\rmessage\r\"Answer the value of message\"\r\rmessage isNil ifTrue:[self message: nil].\r^ message! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 6/17/2010 16:21'!\rmessage: anObject\r\"Set the value of message\"\r\rmessage _ anObject.\r\"force initialization\"\rself originalReceiver  .\rself arguments.! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 4/20/2010 16:19'!\rmessageAdverb\r\"Answer the value of messageAdverb\"\r\rmessageAdverb isNil ifTrue:[self messageAdverb: nil].\r^ messageAdverb! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 4/20/2010 16:19'!\rmessageAdverb: anObject\r\"Set the value of messageAdverb\"\r\rmessageAdverb _ anObject! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/12/2010 16:09'!\rmessageEnvelopes\r\"Answer the value of messageEnvelopes\"\r\rmessageEnvelopes isNil ifTrue:[self messageEnvelopes: OrderedCollection new].\r^ messageEnvelopes! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/12/2010 16:08'!\rmessageEnvelopes: anObject\r\"Set the value of messageEnvelopes\"\r\rmessageEnvelopes _ anObject! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/12/2010 15:28'!\roriginalArguments\r\r^ self message arguments! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 8/27/2010 14:35'!\roriginalReceiver\r\"Answer the value of originalReceiver\"\r\roriginalReceiver isNil ifTrue:[self error: 'should have been set at instantiation time'].\r^ originalReceiver! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 3/28/2010 23:04'!\roriginalReceiver: anObject\r\"Set the value of originalReceiver\"\r\roriginalReceiver _ anObject! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 4/20/2010 16:22'!\roriginalSelector\r\"Answer the value of originalSelector\"\r\roriginalSelector isNil ifTrue:[self originalSelector: self message selector].\r^ originalSelector! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 7/16/2010 18:48'!\roriginalSelector: anObject\r\"Set the value of originalSelector\"\r\"anObject = #selector ifTrue:[self halt].\"    \"useful for debugging\"\rTranscript cr;show:'Dispatching #',anObject.\roriginalSelector _ anObject ! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/12/2010 19:32'!\rrandomNumberSource\r\rRandomNumberSource isNil ifTrue:[RandomNumberSource _ Random new].\r^RandomNumberSource! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/28/2010 14:36'!\rreceiverSource\r\"Answer the value of receiverSource\"\r\rreceiverSource isNil ifTrue:[self receiverSource: self determineReceiverSource].\r^ receiverSource! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/28/2010 14:35'!\rreceiverSource: anObject\r\"Set the value of receiverSource\"\r\rreceiverSource _ anObject! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/28/2010 14:41'!\rreceivers\r\"Answer the value of receivers\"\r\rreceivers isNil ifTrue:[self receivers: self determineReceivers].\r^ receivers! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/28/2010 14:41'!\rreceivers: anObject\r\"Set the value of receivers\"\r\rreceivers _ anObject! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/11/2010 11:11'!\rreturn\r\"Answer the value of return\"\r\rself halt:'Special case...hould never access this way'.\rreturn isNil ifTrue:[self return: nil].\r^ return! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/28/2010 16:54'!\rrobinCount\r\"Answer the value of robinCount\"\r\rrobinCount isNil ifTrue:[self robinCount: 0].\r^ robinCount! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/28/2010 16:54'!\rrobinCount: anObject\r\"Set the value of robinCount\"\r\rrobinCount _ anObject! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/28/2010 15:16'!\rusingRoundRobin\r\"Answer the value of usingRoundRobin\"\r\rusingRoundRobin isNil ifTrue:[self usingRoundRobin: self determineRoundRobin].\r^ usingRoundRobin! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/28/2010 14:47'!\rusingRoundRobin: anObject\r\"Set the value of usingRoundRobin\"\r\rusingRoundRobin _ anObject! !\r!SlyEnsembleMessageDispatcher methodsFor: 'applying adverbs' stamp: 'ssa 5/28/2010 14:26'!\rapplyAdverb: adverb toArgument: argument inEnvelope: envelope\r\"Answer the final argument to send with the message being dispatched via this envelope.\rCommon cases are \r\t#wholly (batch all args to each member with the message)\r\t#singly (distributed arguments one-to-one over members).  Issue here with count mismatch.\r\t#roundly (distribute args over members round-robin fashion, repeating members as needed.  Think of members here as a Resource Pool.  This will require collaboration with any message adverbs.\r\t#duplicatively (each member gets a copy of the arguments).\r\rDefault case is #wholly\"\r\radverb isSymbol ifTrue:[^self perform: ('ARG',adverb,':inEnvelope:') asSymbol  with: argument with: envelope].\radverb isBlock ifTrue:[^ adverb value: argument value: envelope].\rself error:'adverbs can only be unarySelectors or Blocks at this point'! !\r!SlyEnsembleMessageDispatcher methodsFor: 'applying adverbs' stamp: 'ssa 5/28/2010 17:04'!\rdetermineArgumentsForEachReceiver\r\"Support for argument adverbs that allow arguments to be distributed/shared/paired/etc across members.\"\r\r| finalArg |\rself messageEnvelopes  do:[:env|\r\tself arguments with: self argumentAdverbs \r\t\twithIndexDo:[:arg :adv :index|\r\t\t\tfinalArg _ adv isNil \r\t\t\t\tifTrue: [arg]\r\t\t\t\tifFalse:[\"use adverb to determine and process the argument\"\r\t\t\t\t\tself applyAdverb: adv toArgument: arg inEnvelope: env].\r\t\t\tenv message arguments at: index put: finalArg]]\r\t\t! !\r!SlyEnsembleMessageDispatcher methodsFor: 'applying adverbs' stamp: 'ssa 7/16/2010 19:35'!\rdetermineRoundRobin\r\"Do any of my argument adverbs imply a round-robin use of my receivers?\"\rself argumentAdverbs isEmpty ifTrue:[^false].\rself argumentAdverbs with: self arguments do:[:adv :arg| \r\tadv = #roundly ifTrue:[self robinCount: arg ENSsize. ^true]].\r^false! !\r!SlyEnsembleMessageDispatcher methodsFor: 'applying adverbs' stamp: 'ssa 5/12/2010 19:51'!\rdetermineSelectorForEachReceiver\r\"Support for message adverbs that allow members to modify the message selector being sent.\rExpect this case rarely.  Implement later.\rDefault case is to use the actualSelector\"\rself messageEnvelopes do:[:each| each message selector: self actualSelector]! !\r!SlyEnsembleMessageDispatcher methodsFor: 'applying adverbs' stamp: 'ssa 5/12/2010 19:27'!\rreceiversForAdverb: anAdverb\r\"Answer the (sub)set of my members to send a message to based on this adverb\"\r\ranAdverb isSymbol ifTrue:[^self perform: anAdverb].\ranAdverb isArray ifTrue:[^self perform: anAdverb first withArguments: anAdverb allButFirst].\ranAdverb isBlock ifTrue:[^anAdverb value: self members].\rself error:'Expected a #symbol or aBlock for an adverb'! !\r!SlyEnsembleMessageDispatcher methodsFor: 'applying gerunds' stamp: 'ssa 5/11/2010 16:38'!\randing:results\r\"AND the elements in results and return the result.\rAssumes these elements understand &.\"\r\r| result |\rresults isEmpty ifTrue:[self error:'No members, how should we handle?  proceed for nil'.  ^nil].\rresult _ results first.\rresults allButFirst do:[:each| result _ each & result].\r^result! !\r!SlyEnsembleMessageDispatcher methodsFor: 'applying gerunds' stamp: 'ssa 7/7/2010 22:06'!\rapplyGerundTo: results\r\"use the gerund that was supplied by the sender to post-process the results of the message.\rALL gerund processing starts here\"\r\rself gerund isSymbol ifTrue:[^self perform: self gerund asKeyword with: results].\rself gerund isBlock ifTrue:[^ gerund value: results].\rself error:'gerunds can only be unarySelectors or Blocks at this point'! !\r!SlyEnsembleMessageDispatcher methodsFor: 'applying gerunds' stamp: 'ssa 5/11/2010 15:47'!\raveraging:results\r\"Average the elements in results and return the result.\rAssumes these elements understand +.\"\r\r| sum |\rresults isEmpty ifTrue:[self error:'No members, how should we handle?  proceed for nil'.  ^nil].\rsum _ self totalling: results.\r^sum / results size! !\r!SlyEnsembleMessageDispatcher methodsFor: 'applying gerunds' stamp: 'ssa 5/11/2010 15:35'!\rconcatenating: results\r\"Concatenate each element in results and return the result.\rAssumes these elements are collections of some kind.\"\r\r| result |\rresults isEmpty ifTrue:[self error:'No members, how should we handle?  proceed for nil'.  ^nil].\rresult _ results first.\rresults allButFirst do:[:each| result _ result , each].\r^result! !\r!SlyEnsembleMessageDispatcher methodsFor: 'applying gerunds' stamp: 'ssa 5/11/2010 16:39'!\roring:results\r\"OR the elements in results and return the result.\rAssumes these elements understand |.\"\r\r| result |\rresults isEmpty ifTrue:[self error:'No members, how should we handle?  proceed for nil'.  ^nil].\rresult _ results first.\rresults allButFirst do:[:each| result _ each | result].\r^result! !\r!SlyEnsembleMessageDispatcher methodsFor: 'applying gerunds' stamp: 'ssa 5/11/2010 15:41'!\rtotalling:results\r\"Sum the elements in results and return the result.\rAssumes these elements understand +.\"\r\r| result |\rresults isEmpty ifTrue:[self error:'No members, how should we handle?  proceed for nil'.  ^nil].\rresult _ 0.\rresults do:[:each| result _ each + result].\r^result! !\r!SlyEnsembleMessageDispatcher methodsFor: 'argument adverbs' stamp: 'ssa 5/28/2010 14:27'!\rARGReadMe\r\"Argument adverbs set policies/strategies for how arguments participate in ensemble messages to the members.\rThe ARG selector prefix is used to separate possible naming conflicts between message adverbs and argument adverbs.  All argument adverbs found in a selector will get prefixed with ARG before being called.\rAll argument adverb methods should begin with ARG \r\tand be of the form 'ARGadverbName: origArg inEnvelope: envelope'\"! !\r!SlyEnsembleMessageDispatcher methodsFor: 'argument adverbs' stamp: 'ssa 5/28/2010 14:26'!\rARGduplicatively: originalArgument inEnvelope: envelope\r\"Each message uses a copy of the original argument\"\r^originalArgument copy! !\r!SlyEnsembleMessageDispatcher methodsFor: 'argument adverbs' stamp: 'ssa 5/28/2010 14:51'!\rARGroundly: originalArgument inEnvelope: envelope\r\"Each message uses one of the argument elements.  Reuse receivers as needed in round-robin fashion.  \"\r^self nextArgumentFromSource: originalArgument ifAtEnd:[^self]\r! !\r!SlyEnsembleMessageDispatcher methodsFor: 'argument adverbs' stamp: 'ssa 5/28/2010 14:11'!\rARGwholly: originalArgument inEnvelope: envelope\r\"Each message uses original argument\"\r^originalArgument! !\r!SlyEnsembleMessageDispatcher methodsFor: 'receiver sourcing' stamp: 'ssa 5/28/2010 14:46'!\rdetermineReceiverSource\r\"Answer the stream(like) object that serves up my receivers\"\rself usingRoundRobin ifTrue:[^RVMCircularCollection withAll: self receivers].\r^self receivers readStream! !\r!SlyEnsembleMessageDispatcher methodsFor: 'receiver sourcing' stamp: 'ssa 5/28/2010 14:42'!\rdetermineReceivers\r\"identify the (sub)set of my members that will actually be sent a message.\rThis can change based on message adverbs (completely, randomly, stochastically:aProbability, selectively:aBooleanBlock, aBlock etc)\rand argument adverbs (singly, aBlock, etc)\"\r\r\"only handle message adverbs for now, otherwise default to all members\"\r^self hasMessageAdverb \r\tifTrue:[self receiversForAdverb: self messageAdverb]\r\tifFalse:[self members asOrderedCollection].\r! !\r!SlyEnsembleMessageDispatcher methodsFor: 'receiver sourcing' stamp: 'ssa 5/28/2010 14:35'!\rnextReceiver\r\"Answer the next receiver from a stream set up over my receivers.\rThis stream will be linear in normal cases and circular in #roundly(round-robin) cases\"\r\r| source |\rsource _ self receiverSource.\rsource atEnd ifTrue:[self error:'not enough receivers!!'].\r^source next! !\r!SlyEnsembleMessageDispatcher methodsFor: 'argument sourcing' stamp: 'ssa 5/28/2010 14:50'!\rnextArgumentFromSource: argument\r\"Answer the next element from a stream set up over argument.\rNOTE: this implementation assumes that the argument source understands #readStream.\rMay want to have an alternative version passing in a block to do the stream creation\"\r\r^self nextArgumentFromSource: argument ifAtEnd: [self error:'not enough argument elements for members'].\r! !\r!SlyEnsembleMessageDispatcher methodsFor: 'argument sourcing' stamp: 'ssa 7/16/2010 19:28'!\rnextArgumentFromSource: argument ifAtEnd: aBlock\r\"Answer the next element from a stream set up over argument.\rNOTE: this implementation assumes that the argument source understands #readStream.\rMay want to have an alternative version passing in a block to do the stream creation\"\r\r| source |\rsource _ self argumentSources \r\t\tat: argument \r\t\tifAbsentPut:[argument ENSisEnsemble\r\t\t\t\t\tifTrue:[argument ENSmembers readStream]\r\t\t\t\t\tifFalse:[argument readStream]].\rsource atEnd ifTrue:[aBlock value].\r^source next! !\r!SlyEnsembleMessageDispatcher methodsFor: 'dispatching' stamp: 'dmu 8/27/2010 14:30'!\rdispatch\r|   results |\r\"NOTE: using non-local return to allow immediate exit from this method upon return determination\"\rreturn _ [:result | ^ result].\r\"(self originalSelector endsWith:'equals:') ifTrue:[self halt].\"\rself  determineActualSelector.  \"gets selector to send to members and finds adverbs, gerunds and ENS\"\rself isAsAWhole ifTrue:[self tryReflectiveMessages ].\rself onlyHasGerund ifTrue:[self return: (self applyGerundTo: self members)].\rresults _ self sendMessageToMembersModeratedByAdverbs.\rself hasGerund ifTrue:[self return: (self applyGerundTo: results)].\rself returnEnsembleContaining: results \r! !\r!SlyEnsembleMessageDispatcher methodsFor: 'dispatching' stamp: 'dmu 3/29/2010 00:01'!\rreturn: r\rreturn value: r! !\r!SlyEnsembleMessageDispatcher methodsFor: 'dispatching' stamp: 'ssa 6/15/2010 11:17'!\rreturnEnsembleContaining: membersOfResult\r\r\"self return: ((self originalReceiver perform: #ensembleSpecies) with: membersOfResult)\"\r\rself return: (SlyEnsemble with: membersOfResult)\r! !\r!SlyEnsembleMessageDispatcher methodsFor: 'reflection' stamp: 'ssa 6/17/2010 10:37'!\rOLDtryReflectiveMessages\r| reflectiveMessages r |\rself actualSelector = #members ifTrue:[self return: self members].\rself actualSelector = #size ifTrue:[self return: self members size].\rself actualSelector = #inspect ifTrue:[self return: self originalReceiver mirror inspect].\rself actualSelector = #storeString ifTrue:[self return: self storeStringForMyEnsemble].\rself actualSelector = #printString ifTrue:[self return: self storeStringForMyEnsemble].\rself actualSelector = #printOn: ifTrue:[self return: (self originalArguments first nextPutAll: self storeStringForMyEnsemble)].\rreflectiveMessages _ #( #isNil #isNotNil #isKindOf:  #isInMemory #pointsTo: #nextObject  #mustBeBooleanIn: #class #inspect #explore #hash #printString #printOn:).\r(reflectiveMessages includes: self actualSelector)   ifTrue: [\r\t0 primitiveSetExtraPreheaderWord:  self originalReceiver.\r\tr _ self originalReceiver perform: self actualSelector asSymbol withArguments: self originalArguments.\r\tself members primitiveSetExtraPreheaderWord:  self originalReceiver.\r\tself return: r\r].! !\r!SlyEnsembleMessageDispatcher methodsFor: 'reflection' stamp: 'ssa 7/7/2010 20:15'!\rtryReflectiveMessages\r\"disable messaging dispatching to members and just send it to the ensemble object itself\"\r| result |\r0 primitiveSetExtraPreheaderWord:  self message lookupClass \"was originalReceiver\".\rresult _ self originalReceiver perform: self actualSelector asSymbol withArguments: self originalArguments.\rself originalReceiver members: self originalReceiver members.  \"force preheader update\"\rself return: result! !\r!SlyEnsembleMessageDispatcher methodsFor: 'ensemble behavior' stamp: 'ssa 6/17/2010 10:12'!\rstoreStringForMyEnsemble\r\"Answer a string that should compile back into an ensemble like me\"\r| out |\rout _ WriteStream on:''.\rout nextPutAll:'%{'.\rself members  do:[:mem|\r\tmem storeOn: out.\r\tout nextPutAll:'. '].\rout nextPutAll:'}'.\r^out contents! !\r!SlyEnsembleMessageDispatcher methodsFor: 'member messaging' stamp: 'ssa 5/28/2010 17:08'!\rdetermineEnvelopes\r\"Determine the number of envelopes needed and create them.\rNOTE: #roundly argument adverb will impact this number\"\rself usingRoundRobin \r\tifFalse:[self receivers do:[:each|\r\t\t\tself messageEnvelopes add: (SlyMessageEnvelope  \r\t\t\t\t\t\t\t\t\t\treceiver: each \r\t\t\t\t\t\t\t\t\t\tselector: self actualSelector \r\t\t\t\t\t\t\t\t\t\targuments: self arguments asArray copy)]]\r\tifTrue:[self robinCount timesRepeat:[\r\t\t\tself messageEnvelopes add: (SlyMessageEnvelope  \r\t\t\t\t\t\t\t\t\t\treceiver: self nextReceiver \r\t\t\t\t\t\t\t\t\t\tselector: self actualSelector \r\t\t\t\t\t\t\t\t\t\targuments: self arguments asArray copy)]]! !\r!SlyEnsembleMessageDispatcher methodsFor: 'member messaging' stamp: 'ssa 7/8/2010 00:43'!\rsendMessageToMembersModeratedByAdverbs\r\"default behavior when no adverbs found in message\"\rself hasAdverbs ifFalse:[  self actualSelector = #members ifTrue:[self halt:'should never dispatch #members to members'].\r\t^self members parallelCollect: [:elem| elem perform: self actualSelector withArguments: self arguments asArray]].\r\r\"now handle the general case for all possible adverbs\"\rself determineEnvelopes.\rself determineSelectorForEachReceiver.\rself determineArgumentsForEachReceiver.\rself relocateReceiversIfNeeded.\rself relocateArgumentsIfNeeded.\r^self sendMessages! !\r!SlyEnsembleMessageDispatcher methodsFor: 'member messaging' stamp: 'ssa 7/14/2010 13:49'!\rsendMessages\r\"Deliver the message envelopes and collect results.\rThis must eventually handle adverbs for timing and recurring messages, determining when the ensemble message is 'done'. etc.\rFor now, do the simplest thing, a parallelCollect:\"\r\r\"check for serially flag and handle appropriately\"\r^self executingSerially \r\tifTrue:[self messageEnvelopes collect:[:env| env deliver]]\r\tifFalse:[self messageEnvelopes parallelCollect: [:env| env deliver]]! !\r!SlyEnsembleMessageDispatcher methodsFor: 'message adverbs' stamp: 'ssa 5/27/2010 14:36'!\rcompletely\r\"A message level adverb indicating all members are to receive the message\"\r^self members! !\r!SlyEnsembleMessageDispatcher methodsFor: 'message adverbs' stamp: 'ssa 5/12/2010 19:35'!\rexclusively: aBlock \r\"A message level adverb indicating to exclude certain members from receiving the message\"\r^self rejectively: aBlock! !\r!SlyEnsembleMessageDispatcher methodsFor: 'message adverbs' stamp: 'ssa 5/12/2010 19:36'!\rinclusively: aBlock \r\"A message level adverb indicating to include certain members for receiving the message\"\r^self selectively: aBlock! !\r!SlyEnsembleMessageDispatcher methodsFor: 'message adverbs' stamp: 'ssa 5/12/2010 19:37'!\rrandomly\r\"A message level adverb indicating one member at random to receive the message\"\r^self randomly: 1! !\r!SlyEnsembleMessageDispatcher methodsFor: 'message adverbs' stamp: 'ssa 5/27/2010 10:42'!\rrandomly: n\r\"A message level adverb indicating n members at random to receive the message\"\r| remainders chosen picked |\rremainders _ self members asOrderedCollection.\rchosen _ OrderedCollection new.\rn timesRepeat:[ remainders isEmpty ifTrue:[^chosen].\r\tchosen add: (picked _ remainders atRandom).\r\tremainders remove: picked].\r^chosen! !\r!SlyEnsembleMessageDispatcher methodsFor: 'message adverbs' stamp: 'ssa 6/1/2010 16:41'!\rreflectively\r\"A message level adverb indicating the ensemble itself is to receive the message.\rThis duplicates the ENS prefix protocol using message adverbs to make it possible for programmatic\rreflective messaging without hacking the selector.\rThis approach has the effect of making the ensemble itself appear as the single member of an ensemble\"\r^self originalReceiver! !\r!SlyEnsembleMessageDispatcher methodsFor: 'message adverbs' stamp: 'ssa 5/12/2010 19:35'!\rrejectively: aBlock \r\"A message level adverb indicating to exclude certain members from receiving the message\"\r^self members reject: aBlock! !\r!SlyEnsembleMessageDispatcher methodsFor: 'message adverbs' stamp: 'ssa 5/12/2010 19:36'!\rselectively: aBlock \r\"A message level adverb indicating to select certain members to receive the message\"\r^self members select: aBlock! !\r!SlyEnsembleMessageDispatcher methodsFor: 'message adverbs' stamp: 'ssa 6/1/2010 16:38'!\rstochastically: aProbability\r\"A message level adverb indicating some probalilty (0.0-1.0) for each members to receive the message\"\r^self members select:[:each| self randomNumberSource next <= aProbability]! !\r!SlyEnsembleMessageDispatcher methodsFor: 'relocating' stamp: 'ssa 5/27/2010 11:28'!\rrelocateArgumentsIfNeeded\r\"Supports argument adverbs that desire to be in special core locations relative to each other or to their receiving members.\rExamples:\r\t#locally (same core)\r\t#globally (anywhere is fine)\r\t#closely (nearby cores)\r\t#distantly (on distant cores from each other.  may need a parameter here for Manhattan distance apart)\r\t#evenly (spread over cores so each core has same number)\r\t#statically (don't relocate under any circumstances)\rDefault case is #globally, i.e., no relocation.\rOthers to be implemented later.\"\r\r\t! !\r!SlyEnsembleMessageDispatcher methodsFor: 'relocating' stamp: 'ssa 5/27/2010 11:28'!\rrelocateReceiversIfNeeded\r\"Supports message adverbs that desire to have member in special core locations relative to each other or to arguments.\rExamples:\r\t#locally (same core)\r\t#globally (anywhere is fine)\r\t#closely (nearby cores)\r\t#distantly (on distant cores from each other.  may need a parameter here for Manhattan distance apart)\r\t#evenly (spread over cores so each core has same number)\r\t#statically (don't relocate under any circumstances)\rDefault case is #globally, i.e., no relocation.\rOthers to be implemented later.\"\r\r\t! !\r!SlyEnsembleMessageDispatcher methodsFor: 'selector deconstruction' stamp: 'dmu 8/27/2010 14:30'!\rdetermineActualKeywordSelector\r\"Answer the selector to actually send to the members, with all the LY/ING/ENS stuff removed\rCases follow at end of method\"\r\r| orig actual |\rorig _ self originalSelector.\ractual _ orig copy asString.\r(orig beginsWith: SlySelectorModifier asAWhole)  \r\tifTrue:[self setAsAWhole.  \r\t\tactual _ actual withoutFirst: SlySelectorModifier asAWholeSize].\r((actual includesSubString: SlySelectorModifier adverbColon) or:\r  [actual includesSubString: SlySelectorModifier gerundColon]) \r\tifFalse:[^actual ]\r\tifTrue:[self isAsAWhole ifTrue:[self error:'reflective ENS sends can''t have adverbs or gerunds'].\r\t\t\"handle gerund case\"\r\t\t(actual last: SlySelectorModifier gerundColonSize)= SlySelectorModifier gerundColon\r\t\t\tifTrue:[self gerund: self arguments removeLast.\r\t\t\t\tactual _ actual withoutLast: SlySelectorModifier gerundColonSize.\r\t\t\t\t].\r\t\t\"handle adverb cases\"\r\t\t^(actual includesSubString: SlySelectorModifier adverbColon) ifTrue:[self handleAdverbKeywordIn: actual]\r\t\t\tifFalse:[actual].\r\t\t]\r\r\r\"Cases:\r\tNormal Smalltalk support:\r\t+   => +\r\tunary  =>  unary\r\tkeyword:  => keyword:\r\t\r\tAdverb support:\r\tunaryLY:   =>   unary\r\tLY:keyword:    =>   keyword:\r\tLY:keyword:LY:   =>   keyword:\r\tLY:keyword:LY:keyword:keyword:   =>   keyword:keyword:keyword:\r\tLY:keyword:LY:keyword:LY:keyword:   =>   keyword:keyword:keyword:\r\tLY:keyword:LY:keyword:LY:keyword:LY:   =>   keyword:keyword:keyword:\r\tLY:keyword:keyword:LY:keyword:LY:   =>   keyword:keyword:keyword:\r\tetc., strip all LY:s\r\t\r\tGerund (reducer) support:\r\tunaryING:  => unary\r\tkeyword:ING:   => keyword:\r\tkeyword:keyword:keyword:keyword:ING:  =>  keyword:keyword:keyword:keyword:\r\tetc., strip all ING:s, though there should only be one per selector\r\t\r\tDotDot, reflective send support:\r\tENSunary  => unary\r\tENSkeyword:  =>  keyword:\r\tENSkeywordLY:  =>  error, smae with ING\r\t\"\r\t! !\r!SlyEnsembleMessageDispatcher methodsFor: 'selector deconstruction' stamp: 'ssa 5/12/2010 15:51'!\rdetermineActualSelector\r\"Answer the selector to actually send to the members, with all the LY/ING/ENS stuff removed\"\rself actualSelector: self findActualSelector! !\r!SlyEnsembleMessageDispatcher methodsFor: 'selector deconstruction' stamp: 'dmu 8/27/2010 14:28'!\rdetermineActualUnarySelector\r\"Answer the selector to actually send to the members, with all the LY/ING/ENS stuff removed\rCases follow at end of method\"\r\r| orig |\rorig _ self originalSelector.\r(orig beginsWith: SlySelectorModifier asAWhole) ifTrue:[self isAsAWhole: true.\r\t\torig _ orig copyFrom:  SlySelectorModifier asAWholeSize + 1  to: orig size].\r^orig.\r\r\r\"Cases:\r\tNormal Smalltalk support:\r\tunary  =>  unary\r\t\r\tAdverb support:\r\tunaryLY:   =>   unary\r\t\r\tGerund (reducer) support:\r\tunaryING:  => unary\r\t\r\tDotDot, reflective send support:\r\tENSunary  => unary\r\t\"\r\t! !\r!SlyEnsembleMessageDispatcher methodsFor: 'selector deconstruction' stamp: 'ssa 5/12/2010 15:45'!\rfindActualSelector\r\"Answer the selector to actually send to the members, with all the LY/ING/ENS stuff removed\rCases follow at end of method\"\r\r| orig |\rorig _ self originalSelector.\rorig isInfix ifTrue:[^orig].  \"strategy extensions not supported on binary messages\"\rorig isUnary ifTrue:[^self determineActualUnarySelector].\rorig isKeyword ifTrue:[^self determineActualKeywordSelector].\rself error:'Unknown selector type for ',orig.\r\r\"Cases:\r\tNormal Smalltalk support:\r\t+   => +\r\tunary  =>  unary\r\tkeyword:  => keyword:\r\t\r\tAdverb support:\r\tunaryLY:   =>   unary\r\tLY:keyword:    =>   keyword:\r\tLY:keyword:LY:   =>   keyword:\r\tLY:keyword:LY:keyword:keyword:   =>   keyword:keyword:keyword:\r\tLY:keyword:LY:keyword:LY:keyword:   =>   keyword:keyword:keyword:\r\tLY:keyword:LY:keyword:LY:keyword:LY:   =>   keyword:keyword:keyword:\r\tLY:keyword:keyword:LY:keyword:LY:   =>   keyword:keyword:keyword:\r\tetc., strip all LY:s\r\t\r\tGerund (reducer) support:\r\tunaryING:  => unary\r\tkeyword:ING:   => keyword:\r\tkeyword:keyword:keyword:keyword:ING:  =>  keyword:keyword:keyword:keyword:\r\tetc., strip all ING:s, though there should only be one per selector\r\t\r\tDotDot, reflective send support:\r\tENSunary  => unary\r\tENSkeyword:  =>  keyword:\r\tENSkeywordLY:  =>  error, same with ING\r\t\"\r\t! !\r!SlyEnsembleMessageDispatcher methodsFor: 'selector deconstruction' stamp: 'dmu 8/27/2010 13:46'!\rhandleAdverbKeywordIn: selector\r\"Locate the *LY: keywords and extract adverb arguments, and set real arguments,\rAnswer the selector stripped of LY:s \"\r| keywords adverbOffset keyword argIndex strippedSelector realArgs lastWasAdverb |\rlastWasAdverb _ true.\rkeywords _  selector subStrings: {$:}.\radverbOffset _ 0.\rrealArgs _ OrderedCollection new.\rstrippedSelector _ ''.\r1 to: keywords size do:[:index|\r\tkeyword _  keywords at: index.\r\t(keyword endsWith: SlySelectorModifier adverb) ifTrue:[\"found an adverb keyword\"\r\t\tindex = 1 ifTrue:[\"its the message adverb\"\t\r\t\t\t\t\tself messageAdverb: (self arguments first).\r\t\t\t\t\tadverbOffset _ 1.\r\t\t\t\t\tkeyword = SlySelectorModifier adverb\r\t\t\t\t\t\tifFalse:[\" the unary case,  e.g., oddLY \"\r\t\t\t\t\t\t\tstrippedSelector _ (keyword withoutLast: SlySelectorModifier adverbSize).\r\t\t\t\t\t\t\tkeywords size > 1 ifTrue:[strippedSelector _ strippedSelector,':']]\r\t\t\t\t\t\tifTrue:[\"the keyword case LY: adv foo: bar\"\r\t\t\t\t\t\t\t\"do nothing, let the first keyword drop\"]]\r\t\t\t\tifFalse:[\"its an argument adverb\"\r\t\t\t\t\tlastWasAdverb _ true.\r\t\t\t\t\targIndex _ index - adverbOffset.\r\t\t\t\t\tself argumentAdverbs at: argIndex put:(self arguments at: argIndex).\r\t\t\t\t\t\"DO NOTHING HERE  was:   strippedSelector _ strippedSelector,(keyword withoutLast: SlySelectorModifier adverbSize),':'\"]]\r\t\t\tifFalse:[\"normal keyword found or ING found\"\r\t\t\t\t(keyword endsWith: SlySelectorModifier gerund) ifFalse:[\r\t\t\t\t\tlastWasAdverb ifFalse:[self argumentAdverbs add: nil].\r\t\t\t\t\tlastWasAdverb _ false.\r\t\t\t\t\trealArgs add:(self arguments at: index).\r\t\t\t\t\tstrippedSelector _ strippedSelector,keyword,':']]].\r\t\tself arguments: realArgs.\r^strippedSelector! !\r!SlyEnsembleMessageDispatcher methodsFor: 'testing' stamp: 'ssa 5/12/2010 11:12'!\rhasAdverbs\r\r^self hasMessageAdverb or:[self hasArgumentAdverbs]! !\r!SlyEnsembleMessageDispatcher methodsFor: 'testing' stamp: 'ssa 5/12/2010 11:13'!\rhasArgumentAdverbs\r\rself argumentAdverbs detect:[:each| each notNil] ifNone:[^false].\r^true! !\r!SlyEnsembleMessageDispatcher methodsFor: 'testing' stamp: 'ssa 5/12/2010 11:13'!\rhasMessageAdverb\r\r^self messageAdverb notNil! !\r!SlyEnsembleMessageDispatcher methodsFor: 'testing' stamp: 'ssa 5/11/2010 15:45'!\ronlyHasGerund\r\"True is the selector is only #ING: \"\r^self originalSelector == #ING:! !\r!SlyEnsembleMessageDispatcher class methodsFor: 'dispatching' stamp: 'ssa 7/8/2010 00:13'!\rdispatch: aMessage members: aCollection originalReceiver: anObject\r^ self new originalReceiver: anObject; message: aMessage; members: aCollection; dispatch! !\r!SlyFlock methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:39'!\rboids\r\"Answer the value of boids\"\r\r^ boids! !\r!SlyFlock methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:11'!\rboids: anObject\r\"Set the value of boids\"\r\rboids _ anObject! !\r!SlyFlock methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:12'!\risDone\r\"Answer the value of isDone\"\r\risDone isNil ifTrue:[self isDone: false].\r^ isDone! !\r!SlyFlock methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:12'!\risDone: anObject\r\"Set the value of isDone\"\r\risDone _ anObject! !\r!SlyFlock methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:13'!\rgo\rself isDone: false.\rboids fly.\rself isDone: true! !\r!SlyFlock methodsFor: 'as yet unclassified' stamp: 'dmu 8/23/2010 17:09'!\rmaybeYield\r| n |\r\"[Processor yield. ^self]value.\"\rn _self boids ENSsize + 1 \"1 for Drawer\".\rProcessor yieldIfFewerCoresThan: n! !\r!SlyFlock class methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:11'!\rboids: b\r^ self new boids: b! !\r!SlyGraphics class methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:05'!\rclearScreen\rDisplay fillWhite! !\r!SlyGraphics class methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:05'!\rdrawCircle: pt\rDisplay drawDot5At: pt! !\r!SlyGraphics class methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:03'!\rdrawFrom: ptA to: ptB\rDisplay drawLineFrom: ptA to: ptB color: Color black! !\r!SlyGraphics class methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:04'!\rdrawWhiteCircle: pt\rDisplay eraseDot5At: pt! !\r!SlyGraphics class methodsFor: 'as yet unclassified' stamp: 'dmu 3/23/2010 00:02'!\reraseFrom: ptA to: ptB\rDisplay eraseLineFrom: ptA to: ptB color: Color black! !\r!SlyMessageEnvelope methodsFor: 'delivering' stamp: 'ssa 6/1/2010 16:31'!\rdeliver\r\"send my message to my receiver and return the reply\"\rself message arguments: self message arguments asArray.\r^self message sentTo: self receiver! !\r!SlyMessageEnvelope methodsFor: 'accessing' stamp: 'ssa 5/12/2010 15:24'!\rmessage\r\"Answer the value of message\"\r\rmessage isNil ifTrue:[self message: nil].\r^ message! !\r!SlyMessageEnvelope methodsFor: 'accessing' stamp: 'ssa 7/16/2010 19:03'!\rmessage: anObject\r\"Set the value of message\"\r\rmessage _ anObject.\r! !\r!SlyMessageEnvelope methodsFor: 'accessing' stamp: 'ssa 5/12/2010 15:24'!\rreceiver\r\"Answer the value of receiver\"\r\rreceiver isNil ifTrue:[self receiver: nil].\r^ receiver! !\r!SlyMessageEnvelope methodsFor: 'accessing' stamp: 'ssa 5/12/2010 15:24'!\rreceiver: anObject\r\"Set the value of receiver\"\r\rreceiver _ anObject! !\r!SlyMessageEnvelope methodsFor: 'printing' stamp: 'ssa 5/28/2010 16:17'!\rprintOn: aStream\r\raStream nextPutAll:'MsgEnv|rcvr:',self receiver printString,'|message: ',self message printString! !\r!SlyMessageEnvelope class methodsFor: 'instance creation' stamp: 'ssa 5/27/2010 10:46'!\rreceiver: anObject selector: aSymbol arguments: anArray\r\r^self new\r\treceiver: anObject;\r\tmessage: (Message selector: aSymbol arguments: anArray);\r\tyourself! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 7/14/2010 13:50'!\rexecutingSerially\r\"Answer the value of executingSerially\"\r\rexecutingSerially isNil ifTrue:[self executingSerially: false].\r^ executingSerially! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 7/14/2010 13:50'!\rexecutingSerially: anObject\r\"Set the value of executingSerially\"\r\rexecutingSerially _ anObject! !\r!SlyEnsembleMessageDispatcher methodsFor: 'message adverbs' stamp: 'ssa 7/14/2010 13:55'!\rserially\r\"Execute this message serially to all my members.\rThis is a hack since currently all message adverbs must return the members to make envelopes for\"\rself executingSerially:true.\r^self members! !\r!RVMTester class methodsFor: 'primitives' stamp: 'ssa 7/16/2010 14:59'!\rnumberOfProcessInstances\r\r^Process instanceCount! !\r!RVMMulticoreSample methodsFor: 'accessing' stamp: 'ssa 7/16/2010 15:03'!\rprocessInstanceCount\r\"Answer the value of processInstanceCount\"\r\rprocessInstanceCount isNil ifTrue:[self processInstanceCount: Process instanceCount].\r^ processInstanceCount! !\r!RVMMulticoreSample methodsFor: 'accessing' stamp: 'ssa 7/16/2010 15:02'!\rprocessInstanceCount: anObject\r\"Set the value of processInstanceCount\"\r\rprocessInstanceCount _ anObject! !\r!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 7/16/2010 15:21'!\rprocessCount\r^self processInstanceCount! !\r!Object methodsFor: 'comparing' stamp: 'dmu 8/27/2010 13:27'!\requals: anObject\r\"a keyword verion of = for use with SlySelectorModifiers\"\r^self = anObject! !\r!Object methodsFor: 'comparing' stamp: 'dmu 8/27/2010 13:26'!\rdoubleEquals: anObject\r\"a keyword verion of == for use with selector modifiers in Sly\"\r^self == anObject! !\rObject subclass: #ClassAndMethodSaver\rinstanceVariableNames: 'rootName rootDirectory classDir baseDir metaDir'\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'DMU-Tools'!\r!ClassAndMethodSaver commentStamp: 'dmu 8/23/2010 13:56'!\rSave all class definitions and method definitions to a directory tree so I can use FileMerge!\r!ClassAndMethodSaver methodsFor: 'as yet unclassified' stamp: 'dmu 8/23/2010 14:01'!\rsave\rself createRoot.\rself saveAllClasses.! !\r!ClassAndMethodSaver methodsFor: 'root directory' stamp: 'dmu 8/23/2010 14:41'!\rcreateRoot\rself rootDirectory: ( self createDir: self rootName in: FileDirectory default mustBeNew: false )! !\r!ClassAndMethodSaver methodsFor: 'root directory' stamp: 'dmu 8/23/2010 14:04'!\rrootDirectory\r\"Answer the value of rootDirectory\"\r\rrootDirectory isNil ifTrue:[self rootDirectory: nil].\r^ rootDirectory! !\r!ClassAndMethodSaver methodsFor: 'root directory' stamp: 'dmu 8/23/2010 14:04'!\rrootDirectory: anObject\r\"Set the value of rootDirectory\"\r\rrootDirectory _ anObject! !\r!ClassAndMethodSaver methodsFor: 'root directory' stamp: 'dmu 8/23/2010 14:00'!\rrootName\r\"Answer the value of rootName\"\r\rrootName isNil ifTrue:[self rootName: 'root'].\r^ rootName! !\r!ClassAndMethodSaver methodsFor: 'root directory' stamp: 'dmu 8/23/2010 14:00'!\rrootName: anObject\r\"Set the value of rootName\"\r\rrootName _ anObject! !\r!ClassAndMethodSaver methodsFor: 'directories' stamp: 'dmu 8/23/2010 14:35'!\rclassCategoryDirFor: cat\r^ self createDir: cat in: self rootDirectory mustBeNew: false! !\r!ClassAndMethodSaver methodsFor: 'directories' stamp: 'dmu 8/23/2010 14:34'!\rcreateDir: leafName in: parentDir mustBeNew: mustBeNew\r| p d |\rp _ parentDir pathName, parentDir pathNameDelimiter, leafName.\rd _ FileDirectory on: p.\r(mustBeNew and: [d exists]) ifTrue: [self error: p, ' already exists'].\rd exists ifFalse: [d assureExistence].\r^ d\r! !\r!ClassAndMethodSaver methodsFor: 'directories' stamp: 'dmu 8/23/2010 14:38'!\rcreateDirectoriesFor: cls\r\r| catDir |\rcatDir _ self classCategoryDirFor: cls category.\rclassDir _ self createDir: cls name in: catDir mustBeNew: false.\rbaseDir _ self createDir: 'base' in: classDir mustBeNew: false.\rmetaDir _ self createDir: 'meta' in: classDir mustBeNew: false.! !\r!ClassAndMethodSaver methodsFor: 'saving methods' stamp: 'dmu 10/1/2010 22:58'!\rmethodSourceFor: sel in: clsHalf \r\t| method |\r\tmethod := clsHalf methodDict at: sel ifAbsent: [^ sel printString, 'CORRUPTED'].\r\t^ (method getSourceFor: sel in: clsHalf) asString! !\r!ClassAndMethodSaver methodsFor: 'saving methods' stamp: 'dmu 10/1/2010 22:59'!\rsaveMethodNamed: sel inCategory: cat of: clsHalf in: catDir\r\t| src fs selOrFoo |\r\tsrc _ self methodSourceFor: sel in: clsHalf.\r\tselOrFoo _ (sel isKindOf: String) ifTrue: [sel] ifFalse: [sel printString].\r\tfs _ self fileStreamIn: catDir named: selOrFoo, '.txt'.\rfs nextPutAll: src.\rfs close\r! !\r!ClassAndMethodSaver methodsFor: 'saving classes' stamp: 'dmu 8/23/2010 14:46'!\rfileStreamIn: dir named: n\r| fs |\rfs _ FileStream fileNamed: dir pathName, dir pathNameDelimiter, n.\r^ fs! !\r!ClassAndMethodSaver methodsFor: 'saving classes' stamp: 'dmu 8/23/2010 14:01'!\rsaveAllClasses\rSmalltalk allClassesDo: [:cls| self saveClass: cls]! !\r!ClassAndMethodSaver methodsFor: 'saving classes' stamp: 'dmu 8/23/2010 15:00'!\rsaveCategory: cat of: clsHalf in: dir\r| selectors catDir |\rcatDir _ self createDir: cat in: dir mustBeNew: false.\rselectors := (cat asString = ClassOrganizer allCategory)\r\t\t\tifTrue: [ clsHalf organization allMethodSelectors ]\r\t\t\tifFalse: [ clsHalf organization listAtCategoryNamed: cat ].\rselectors do: [:sel| self saveMethodNamed: sel inCategory: cat of: clsHalf in: catDir]! !\r!ClassAndMethodSaver methodsFor: 'saving classes' stamp: 'dmu 8/23/2010 14:39'!\rsaveClass: cls\rself createDirectoriesFor: cls.\rself saveClassHalf: cls in:  baseDir.\rself saveClassHalf: cls class in:  metaDir! !\r!ClassAndMethodSaver methodsFor: 'saving classes' stamp: 'dmu 8/23/2010 14:52'!\rsaveClassHalf: clsHalf in: dir\rself saveClassHalfDefinition: clsHalf in: dir.\rself saveClassHalfComment: clsHalf in: dir.\rself saveClassHalfCategories: clsHalf in: dir! !\r!ClassAndMethodSaver methodsFor: 'saving classes' stamp: 'dmu 8/23/2010 14:53'!\rsaveClassHalfCategories: clsHalf in: dir\rclsHalf organization categories do: [:cat | self saveCategory: cat of: clsHalf in: dir]! !\r!ClassAndMethodSaver methodsFor: 'saving classes' stamp: 'dmu 8/23/2010 15:15'!\rsaveClassHalfComment: clsHalf in: dir\r| fs |\rfs _ self fileStreamIn: dir named: 'comment.txt'.\rfs nextPutAll: clsHalf organization classComment asString.\rfs close.! !\r!ClassAndMethodSaver methodsFor: 'saving classes' stamp: 'dmu 8/23/2010 14:48'!\rsaveClassHalfDefinition: clsHalf in: dir\r| fs |\rfs _ self fileStreamIn: dir named: 'definition.txt'.\rfs nextPutAll: clsHalf definition.\rfs close.! !\rClassAndMethodSaver class\rinstanceVariableNames: ''!\r!ClassAndMethodSaver class methodsFor: 'as yet unclassified' stamp: 'dmu 8/23/2010 16:32'!\rsave\r\"ClassAndMethodSaver save\"\r^self saveIn: 'root'! !\r!ClassAndMethodSaver class methodsFor: 'as yet unclassified' stamp: 'dmu 8/23/2010 13:59'!\rsaveIn: rootName\r(self new rootName: rootName) save! !\r!Collection methodsFor: 'RVM-converting' stamp: 'dmu 9/16/2010 23:43'!\rdoInParallel: aBlock\rself parallelCollect: aBlock! !\r!SystemDictionary methodsFor: '*Sly' stamp: 'dmu 8/23/2010 15:38'!\rallClassesDoInParallel: aBlock\r\"Evaluate the argument, aBlock, for each class in the system.\"\r\r(self classNames collect: [:name | self at: name]) doInParallel: aBlock! !\r!SystemNavigation methodsFor: '*Sly' stamp: 'dmu 8/23/2010 15:39'!\rparallelAllMethodsWithSourceString: aString matchCase: caseSensitive\r\"Answer a SortedCollection of all the methods that contain, in source code, aString as a substring.  Search the class comments also\"\r\"An experiment -- dmu\"\r\r| list classCount adder sema |\rlist _ Set new.\rsema _ Semaphore forMutualExclusion.\radder _ [ :mrClass :mrSel | sema critical: [list add: ( MethodReference new\r\t\t\t\t\t\t\t\t\t\tsetStandardClass: mrClass\r\t\t\t\t\t\t\t\t\t\tmethodSymbol: mrSel)]].\r'Searching all source code...'\rdisplayProgressAt: Sensor cursorPoint\rfrom: 0 to: Smalltalk classNames size\rduring:\r[:bar | classCount _ 0.\rSmalltalk allClassesDoInParallel:\r\t[:class | bar value: (classCount _ classCount + 1).\r\t(Array with: class with: class class) do:\r\t\t[:cl | \r\t\t\tcl selectorsDo: [:sel | \r\t\t\t\t((cl sourceCodeAt: sel) findString: aString \r\t\t\t\t\tstartingAt: 1 caseSensitive: caseSensitive) > 0 ifTrue: [\r\t\t\t\t\t\tsel == #DoIt ifFalse: [adder copy fixTemps value: cl value: sel]]].\r\t\t\t(cl organization classComment asString findString: aString \r\t\t\t\t\tstartingAt: 1 caseSensitive: caseSensitive) > 0 ifTrue: [\r\t\t\t\t\t\tadder copy fixTemps value: cl value: #Comment].\r\t\t]]].\r^ list asSortedCollection! !\r!SlyBoids methodsFor: 'as yet unclassified' stamp: 'dmu 8/23/2010 17:08'!\rflockSize\r\"RVMTester coreCount - 6 max: 10\".\r^ 250! !\r!SlyBoids methodsFor: 'as yet unclassified' stamp: 'dmu 8/23/2010 15:52'!\rboidClass\r^ SlyBoid! !\r!RVMMultiAspectKiviatView methodsFor: 'displaying' stamp: 'dmu 8/23/2010 17:38'!\rresetAfterCoreCountChange\rself spokePens: nil. backgroundCanvas _ nil! !\r!RVMKiviatView methodsFor: 'drawing' stamp: 'dmu 8/23/2010 17:38'!\rresetAfterCoreCountChange\rself spokePens: nil. backgroundCanvas _ nil! !\rObject subclass: #ChangedMethodFinder\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'DMU-Tools'!\r!ChangedMethodFinder methodsFor: 'no messages' stamp: 'dmu 8/25/2010 15:56'!\risMethodChanged: aMethod\r^ (SourceFiles at: 1) ~= aMethod sourceFileStream! !\r!ChangedMethodFinder methodsFor: 'as yet unclassified' stamp: 'dmu 8/25/2010 16:17'!\rchangedMethods\r\"ChangedMethodFinder new changedMethods\"\r| result |\rresult _ OrderedCollection new.\rSmalltalk allClassesDo: [:cls| \r\t{cls. cls class.} do: [:clsHalf|\r\t\tclsHalf methodDict associationsDo: [:a | \r\t\t\t(self isMethodChanged: a value) ifTrue: [\r\t\t\t\tresult add: { cls category. cls name. clsHalf name.  clsHalf organization categoryOfElement: a key. a key}\r\t\t\t]\r\t\t]\r\t]\r].\r^ result! !\r!ChangedMethodFinder methodsFor: 'as yet unclassified' stamp: 'dmu 8/25/2010 16:17'!\rstandardClassNames\r\"ChangedMethodFinder new standardClassNames\"\r| result |\rresult _ Set new.\rSmalltalk allClassesDo: [:cls| \r\t{cls. cls class.} do: [:clsHalf|\r\t\tclsHalf methodDict associationsDo: [:a | \r\t\t\t(self isMethodChanged: a value) ifFalse: [result add: cls name]\r\t\t]\r\t]\r].\r^ result! !\r!ChangedMethodFinder methodsFor: 'as yet unclassified' stamp: 'dmu 8/25/2010 16:19'!\rchangedMethodsInStandardClasses\r\"ChangedMethodFinder new  changedMethodsInStandardClasses\"\r| changedMethods standardClassNames result |\rchangedMethods _ self changedMethods.\rstandardClassNames _ self standardClassNames.\rresult _ changedMethods select: [:e| standardClassNames includes: (e at: 2)].\r^ result! !\rObject subclass: #SlySelectorModifier\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly'!\r!SlySelectorModifier class methodsFor: 'accessing' stamp: 'dmu 8/27/2010 13:30'!\rasAWhole ^ 'ENS'! !\r!SlySelectorModifier class methodsFor: 'accessing' stamp: 'dmu 8/27/2010 13:30'!\radverb ^ 'LY'! !\r!SlySelectorModifier class methodsFor: 'accessing' stamp: 'dmu 8/27/2010 13:30'!\rgerund ^ 'ING'! !\r!SlySelectorModifier class methodsFor: 'accessing' stamp: 'dmu 8/27/2010 13:35'!\rgerundColon \r^ self gerund, ':'! !\r!SlySelectorModifier class methodsFor: 'accessing' stamp: 'dmu 8/27/2010 13:35'!\radverbColon \r^ self adverb, ':'! !\r!SlySelectorModifier class methodsFor: 'accessing' stamp: 'dmu 8/27/2010 13:35'!\radverbColonSize\r^ self adverbColon size! !\r!SlySelectorModifier class methodsFor: 'sizes' stamp: 'dmu 8/27/2010 14:17'!\rgerundColonSize\r^ self gerundColon size! !\r!SlySelectorModifier class methodsFor: 'accessing' stamp: 'dmu 8/27/2010 13:40'!\rasAWholeSize\r^ self asAWhole size! !\r!SlySelectorModifier class methodsFor: 'accessing' stamp: 'dmu 8/27/2010 13:44'!\radverbSize\r^ self adverb size! !\r!SlySelectorModifier class methodsFor: 'commonly modified selectors' stamp: 'dmu 8/29/2010 18:36'!\rasAWholeify: selector\r(selector beginsWith: self asAWhole) ifTrue: [^ self].\r^ (self asAWhole, selector) asSymbol! !\r!SlySelectorModifier class methodsFor: 'accessing' stamp: 'dmu 8/27/2010 13:52'!\rsizeAsAWhole\r^ self asAWholeify: #size! !\r!SlySelectorModifier class methodsFor: 'special selectors' stamp: 'dmu 8/27/2010 13:56'!\rmembers\r^ #members! !\r!SlySelectorModifier class methodsFor: 'special selectors' stamp: 'dmu 8/27/2010 13:59'!\requalsAsAWhole\r^ ( self asAWhole, 'equals:' ) asSymbol! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 8/27/2010 14:28'!\risAsAWhole\r\"Answer the value of isAsAWhole\"\r\risAsAWhole isNil ifTrue:[self isAsAWhole: false].\r^ isAsAWhole! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 8/27/2010 14:28'!\risAsAWhole: anObject\r\"Set the value of isAsAWhole\"\r\risAsAWhole _ anObject! !\r!SlyEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 8/27/2010 14:29'!\rsetAsAWhole\r\rself isAsAWhole: true! !\rSly3AbstractEnsembleMessageDispatcher subclass: #Sly3ReflectiveMessageDispatcher\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly3-Basic-Dispatching'!\r!Sly3ReflectiveMessageDispatcher commentStamp: 'dmu 8/27/2010 14:38'!\rNo matter what Sly is, ST depends on some reflective messages. Handle them here. -- dmu\r\rPossible useful expressions for doIt or printIt.\r\rStructure:\rinstVar1\t\ttype -- comment about the purpose of instVar1\rinstVar2\t\ttype -- comment about the purpose of instVar2\r\rAny further useful comments about the general approach of this implementation.!\r!Sly3ReflectiveMessageDispatcher commentStamp: 'dmu 8/27/2010 14:38'!\rNo matter what Sly is, ST depends on some reflective messages. Handle them here. -- dmu\r\rPossible useful expressions for doIt or printIt.\r\rStructure:\rinstVar1\t\ttype -- comment about the purpose of instVar1\rinstVar2\t\ttype -- comment about the purpose of instVar2\r\rAny further useful comments about the general approach of this implementation.!\r!Sly3ReflectiveMessageDispatcher methodsFor: 'modifying reflective selectors' stamp: 'dmu 8/29/2010 13:28'!\rmodifyReflectiveSelectorIfNeeded\r(self unprocessedMessage selector beginsWith: SlySelectorModifier asAWhole) ifTrue: [^ self].\rself modifyEquals  or: [\rself modifyToolMessages  or: [\rself modifyToolProcesses]]! !\r!Sly3ReflectiveMessageDispatcher methodsFor: 'modifying reflective selectors' stamp: 'dmu 8/29/2010 13:29'!\rmodifyEquals\rself unprocessedMessage selector = #= ifTrue:[self setUnprocessedSelector: SlySelectorModifier equalsAsAWhole. ^ true].\r^ false\r! !\r!Sly3ReflectiveMessageDispatcher methodsFor: 'modifying reflective selectors' stamp: 'dmu 8/29/2010 13:32'!\rmodifyToolMessages\r| toolMessages |\rtoolMessages _ #(inspect explore printString asExplorerString hasContentsInExplorer explorerContents  halt error: halt:).\r(toolMessages includes: self unprocessedMessage selector) ifTrue:[\r\tself setUnprocessedSelector: (SlySelectorModifier asAWholeify:  self unprocessedMessage selector).\r\t^ true\r].\r^ false! !\r!Sly3ReflectiveMessageDispatcher methodsFor: 'modifying reflective selectors' stamp: 'dmu 8/29/2010 18:36'!\rmodifyToolProcesses\r| foundContext toolClasses |\t\rtoolClasses _ { Inspector. Debugger.  PluggableListController}.\rfoundContext _ thisContext findContextSuchThat:[:ctxt|  toolClasses includes: ctxt receiver class].\rfoundContext notNil ifTrue:[\r\tself setUnprocessedSelector: (SlySelectorModifier asAWholeify: self unprocessedMessage selector). ^ true].\r^ false! !\r!Sly3EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 8/29/2010 19:04'!\roriginalArguments\r\r^ self unprocessedMessage arguments! !\r!Sly3EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/12/2010 19:32'!\rrandomNumberSource\r\rRandomNumberSource isNil ifTrue:[RandomNumberSource _ Random new].\r^RandomNumberSource! !\r!Sly3EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 8/27/2010 14:29'!\rsetAsAWhole\r\rself isAsAWhole: true! !\r!Sly3EnsembleMessageDispatcher methodsFor: 'ensemble behavior' stamp: 'dmu 8/29/2010 19:00'!\rstoreStringForMyEnsemble\r\"Answer a string that should compile back into an ensemble like me\"\r| out |\rout _ WriteStream on:''.\rout nextPutAll:'%{'.\rself unprocessedMessage members  do:[:mem|\r\tmem storeOn: out.\r\tout nextPutAll:'. '].\rout nextPutAll:'}'.\r^out contents! !\rSly3EnsembleMessageDispatcher class\rinstanceVariableNames: ''!\r!Sly3AbstractEnsembleMessageDispatcher methodsFor: 'dispatching' stamp: 'dmu 8/29/2010 18:28'!\rdispatch\r! !\r!Sly3AbstractEnsembleMessageDispatcher methodsFor: 'ensemble behavior' stamp: 'dmu 8/29/2010 12:56'!\rstoreStringForMyEnsemble\r\"Answer a string that should compile back into an ensemble like me\"\r| out |\rout _ WriteStream on:''.\rout nextPutAll:'%{'.\rself unprocessedMessage members  do:[:mem|\r\tmem storeOn: out.\r\tout nextPutAll:'. '].\rout nextPutAll:'}'.\r^out contents! !\rSly3AbstractEnsembleMessageDispatcher class\rinstanceVariableNames: ''!\r!Sly3UnprocessedEnsembleMessage methodsFor: 'accessing' stamp: 'dmu 8/29/2010 12:46'!\rselector\r\"Answer the value of selector\"\r\rselector isNil ifTrue:[self selector: #noSelector].\r^ selector! !\r!Sly3UnprocessedEnsembleMessage methodsFor: 'accessing' stamp: 'dmu 8/29/2010 12:45'!\rselector: anObject\r\"Set the value of selector\"\r\rselector _ anObject! !\r!Sly3UnprocessedEnsembleMessage methodsFor: 'accessing' stamp: 'dmu 8/29/2010 12:46'!\rarguments\r\"Answer the value of arguments\"\r\rarguments isNil ifTrue:[self arguments: #()].\r^ arguments! !\r!Sly3UnprocessedEnsembleMessage methodsFor: 'accessing' stamp: 'dmu 8/29/2010 12:45'!\rarguments: anObject\r\"Set the value of arguments\"\r\rarguments _ anObject! !\r!Sly3UnprocessedEnsembleMessage methodsFor: 'accessing' stamp: 'dmu 8/29/2010 12:46'!\rmembers\r\"Answer the value of members\"\r\rmembers isNil ifTrue:[self members: #()].\r^ members! !\r!Sly3UnprocessedEnsembleMessage methodsFor: 'accessing' stamp: 'dmu 8/29/2010 12:45'!\rmembers: anObject\r\"Set the value of members\"\r\rmembers _ anObject! !\r!Sly3UnprocessedEnsembleMessage class methodsFor: 'instance creation' stamp: 'dmu 8/30/2010 19:37'!\rfromMessage: m members: members\r^ self new receiver: m lookupClass \"VM hack\"; selector: m selector; arguments: m arguments; members: members; yourself! !\r!Sly3UnprocessedEnsembleMessage class methodsFor: 'instance creation' stamp: 'dmu 8/30/2010 19:38'!\rfromMessage: m theEnsemble: e\r^ self new receiver: e; selector: m selector; arguments: m arguments; members: e members; yourself! !\r!Sly3AbstractEnsembleMessageDispatcher class methodsFor: 'dispatching' stamp: 'dmu 8/29/2010 18:27'!\rdispatch: anUnprocessedMessage \rself dispatch: anUnprocessedMessage andDo: [:r | ^ r].\rself error: 'unhandled'! !\r!Sly3AbstractEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 8/29/2010 12:56'!\runprocessedMessage\r\"Answer the value of unprocessedMessage\"\r\runprocessedMessage isNil ifTrue:[self unprocessedMessage: Sly3UnprocessedEnsembleMessage new].\r^ unprocessedMessage! !\r!Sly3AbstractEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 8/29/2010 12:55'!\runprocessedMessage: anObject\r\"Set the value of unprocessedMessage\"\r\runprocessedMessage _ anObject! !\r!Sly3AbstractEnsembleMessageDispatcher methodsFor: 'created processed message' stamp: 'dmu 8/29/2010 18:32'!\rjustReturn: anObject\rself doneBlock value: anObject! !\r!Sly3AbstractEnsembleMessageDispatcher methodsFor: 'created processed message' stamp: 'dmu 9/1/2010 23:30'!\rsendToMembers: selector\rself doneBlock value: (Sly3MessageEnvelope receiver: self unprocessedMessage members selector: selector arguments: self unprocessedMessage arguments) deliver! !\r!Sly3ReflectiveMessageDispatcher methodsFor: 'dispatching' stamp: 'dmu 9/8/2010 02:54'!\rtryReflectiveMessageSend\r| message selector |\r\rmessage _ self unprocessedMessage.\rselector _ message selector.\r\rselector = #members ifTrue: [self justReturn: message members].\r\r((selector = #isKindOf:  and:[message arguments first = FakeClassPool])\r\t           or: [(selector = #==          ) and:[message arguments first = #failedDoit] ] )\r\t\t\tifTrue:[self justReturn: false].\r\t\t\t\r(#(hash halt error: halt: identityHash == isNil) includes: selector) ifTrue: [self justReturn: (message receiver class deactivateEnsembleSendsFor: message receiver during: [message receiver perform: message selector withArguments: message arguments])].\r\r(selector = #isKindOf:) ifTrue: [self justReturn: (Sly3Ensemble includesBehavior: message arguments first)]! !\r!Sly3AbstractEnsembleMessageDispatcher methodsFor: 'nil' stamp: 'dmu 8/29/2010 13:29'!\rsetUnprocessedSelector: sel\rself unprocessedMessage selector: sel! !\r!Sly3AbstractEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 8/29/2010 18:24'!\rdoneBlock\r\"Answer the value of doneBlock\"\r\rdoneBlock isNil ifTrue:[self doneBlock: [:r | ^ r]].\r^ doneBlock! !\r!Sly3AbstractEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 8/29/2010 18:24'!\rdoneBlock: anObject\r\"Set the value of doneBlock\"\r\rdoneBlock _ anObject! !\r!Sly3AbstractEnsembleMessageDispatcher class methodsFor: 'dispatching' stamp: 'dmu 8/29/2010 18:26'!\rdispatch: anUnprocessedMessage andDo: doneBlock\r^ self new unprocessedMessage: anUnprocessedMessage; doneBlock: [:r | ^ doneBlock value: r]; dispatch! !\r!Sly3EnsembleMessageDispatcher methodsFor: 'dispatching' stamp: 'dmu 9/1/2010 23:18'!\rdispatch\rself parsedMessage: self parseMessage.\r     self parsedMessage ifNil: [^ self].\r     ^ self doneBlock value:  ( Sly3MessageEvaluator evaluate: self parsedMessage )\r! !\r!Sly3ReflectiveMessageDispatcher methodsFor: 'dispatching' stamp: 'dmu 8/29/2010 18:40'!\rdispatch\rself tryReflectiveMessageSend.\r! !\rObject subclass: #Sly3ReflectiveSelectorChanger\rinstanceVariableNames: 'message selector'\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly3-Basic-Dispatching'!\r!Sly3EnsembleMessageDispatcher class methodsFor: 'dispatching' stamp: 'dmu 9/3/2010 12:27'!\rdispatch: anUnprocessedMessage andDo: doneBlock\r| newMessage |\rSly3ReflectiveMessageDispatcher dispatch: anUnprocessedMessage andDo: [:r|  ^ doneBlock value: r].\rnewMessage _ Sly3ReflectiveSelectorChanger modifyAsNeeded: anUnprocessedMessage.\r^super dispatch: newMessage andDo: doneBlock! !\r!Sly3EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 8/29/2010 18:49'!\rparsedMessage\r\"Answer the value of parsedMessage\"\r\rparsedMessage isNil ifTrue:[self parsedMessage: nil].\r^ parsedMessage! !\r!Sly3EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 8/29/2010 18:49'!\rparsedMessage: anObject\r\"Set the value of parsedMessage\"\r\rparsedMessage _ anObject! !\rObject subclass: #Sly3ParsedMessage\rinstanceVariableNames: 'receiverMirror selector gerunds messageAdverbs argumentMirrors argumentAdverbs receiver members arguments'\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly3-Advanced-Dispatching'!\rObject subclass: #SlyModifierString\rinstanceVariableNames: 'modifierName modifierSuffix'\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly'!\r!Sly3EnsembleMessageDispatcher methodsFor: 'parsing message' stamp: 'dmu 8/29/2010 21:54'!\rparseMessage\r^ Sly3MessageParser parse: self unprocessedMessage\r! !\r!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 8/29/2010 21:08'!\rselector\r\"Answer the value of selector\"\r\rselector isNil ifTrue:[self selector: #noSelector].\r^ selector! !\r!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 8/29/2010 21:08'!\rselector: anObject\r\"Set the value of selector\"\r\rselector _ anObject! !\rSly3Gerund subclass: #Sly3ModAveraging\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly3-Modifiers'!\rSly3Gerund subclass: #Sly3ModConcatenating\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly3-Modifiers'!\rObject subclass: #Sly3MessageParser\r\tinstanceVariableNames: 'unparsedMessage parsedMessage unparsedSelector arguments keywordModifiersAssociations argumentModifiers messageModifier actualSelector messageModifiers stringsAndModifiersMergingReceiverAndFirstArgument flatStringsAndModifiers foldedFlatStringsAndModifiers modifiersForRcvrAndArgs flatKeywordsAndModifiers modifiersWithDefaults'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Sly3-Advanced-Dispatching'!\r!Sly3MessageParser methodsFor: 'accessing' stamp: 'dmu 8/29/2010 21:21'!\rparsedMessage\r\"Answer the value of parsedMessage\"\r\rparsedMessage isNil ifTrue:[self parsedMessage: nil].\r^ parsedMessage! !\r!Sly3MessageParser methodsFor: 'accessing' stamp: 'dmu 8/29/2010 21:21'!\rparsedMessage: anObject\r\"Set the value of parsedMessage\"\r\rparsedMessage _ anObject! !\r!Sly3MessageParser class methodsFor: 'as yet unclassified' stamp: 'dmu 8/29/2010 21:22'!\rparse: m\r^self new unparsedMessage: m; parse; parsedMessage! !\r!Sly3MessageParser methodsFor: 'accessing' stamp: 'dmu 8/29/2010 21:22'!\runparsedMessage\r\"Answer the value of unparsedMessage\"\r\runparsedMessage isNil ifTrue:[self unparsedMessage: nil].\r^ unparsedMessage! !\r!Sly3MessageParser methodsFor: 'accessing' stamp: 'dmu 8/29/2010 21:22'!\runparsedMessage: anObject\r\"Set the value of unparsedMessage\"\r\runparsedMessage _ anObject! !\r!Sly3MessageParser methodsFor: 'parsing' stamp: 'dmu 10/1/2010 00:17'!\rparse\r\tunparsedSelector _  self unparsedMessage selector. \r\tunparsedSelector = #mustBeBoolean ifTrue: [self halt].\r\targuments _ self unparsedMessage arguments.\r\tflatStringsAndModifiers _ self  dissectSelectorIntoStringsAndModifiers: unparsedSelector.\r\tflatKeywordsAndModifiers _ self breakStringsIntoKeywords: flatStringsAndModifiers.\r\tself foldInIndirectModifiers: [:s :a | foldedFlatStringsAndModifiers _ s. arguments _ a].\r\tactualSelector _  self gatherActualSelector.\r\tmodifiersForRcvrAndArgs _ self breakModifiersForArguments.\r\tmodifiersWithDefaults _ self addDefaultModifiersTo: modifiersForRcvrAndArgs.\r\tmessageModifiers _ modifiersWithDefaults first.\r\targumentModifiers _ modifiersWithDefaults copyWithoutFirst.\r\tparsedMessage _ self createParsedMessage.! !\r!Sly3MessageParser methodsFor: 'parsing' stamp: 'dmu 9/3/2010 19:52'!\rgatherActualSelector\r| sel |\rsel _ ((foldedFlatStringsAndModifiers select: [:a| a isKindOf: String]) gather: [:a | a ]) as: Symbol.\r^ sel ifEmpty: [#yourself] ifNotEmpty: [sel]! !\r!Sly3MessageParser methodsFor: 'parsing' stamp: 'dmu 9/3/2010 19:44'!\rcreateParsedMessage.\r^ Sly3ParsedMessage \r\treceiver: self unparsedMessage receiver \r\tmembers: self unparsedMessage members \r\tmessageModifiers: messageModifiers  \r\tselector: actualSelector  \r\targuments: self  arguments \r\targumentAdverbs: argumentModifiers\r\r! !\rObject subclass: #Sly3MessageEvaluator\r\tinstanceVariableNames: 'message envelopes receiverAndArgumentCounts result defaultingToAsAWhole  putResultsIntoAnEnsemble operandTuples'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Sly3-Advanced-Dispatching'!\r!Sly3MessageEvaluator methodsFor: 'accessing' stamp: 'dmu 8/29/2010 21:55'!\rmessage\r\"Answer the value of message\"\r\rmessage isNil ifTrue:[self message: nil].\r^ message! !\r!Sly3MessageEvaluator methodsFor: 'accessing' stamp: 'dmu 8/29/2010 21:55'!\rmessage: anObject\r\"Set the value of message\"\r\rmessage _ anObject! !\r!Sly3MessageEvaluator class methodsFor: 'as yet unclassified' stamp: 'dmu 9/8/2010 21:55'!\revaluate: message\r| r |\rr _  self new message: message; evaluate.\r^ r! !\r!Sly3MessageEvaluator methodsFor: 'evaluating-modified' stamp: 'dmu 10/6/2010 14:19'!\revaluate\r\t| r  | \r\tmessage selector = #particle:ofSize:movedTo: ifTrue: [self halt].\r\tputResultsIntoAnEnsemble _ false.\r\toperandTuples _ self buildOperandTuples.\r\tenvelopes _ self makeEnvelopes.\r\tself stuffSelectors.\r\tself stuffReceivers.\r\tself stuffArguments.\r\tself relocateReceiversIfNeeded.\r\tself relocateArgumentsIfNeeded.\r\tself setDisableEnsembleBehaviorFlags.\r\tresult _ self sendMessages.\r\tputResultsIntoAnEnsemble _ self calculatePutResultsIntoAnEnsemble.\r\tr _ self evaluateGerunds.\r\t^ r\r! !\r!Sly3ParsedMessage methodsFor: 'testing' stamp: 'dmu 9/1/2010 16:09'!\rhasGerund\r^ gerunds notEmpty ! !\rObject subclass: #Sly3Ensemble\rinstanceVariableNames: 'members'\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly3'!\r!Sly3Ensemble methodsFor: 'environment support' stamp: 'dmu 8/29/2010 12:53'!\rdoesNotUnderstand: aMessage\r\"Try to process this message as an ensemble dispatch message to help in the case of inlined primitive calls  like perform:with:with:\"\r^ Sly3EnsembleMessageDispatcher dispatch: (Sly3UnprocessedEnsembleMessage fromMessage: aMessage theEnsemble: self)! !\r!Sly3Ensemble methodsFor: 'environment support' stamp: 'dmu 3/29/2010 01:04'!\rensembleSpecies\r^ Sly3Ensemble! !\r!Sly3Ensemble methodsFor: 'testing' stamp: 'dmu 9/3/2010 15:55'!\rifEmpty: blk\r^ self collecitonLYsize = 0 ifTrue: [blk value]! !\r!Sly3Ensemble methodsFor: 'testing' stamp: 'dmu 9/3/2010 14:54'!\risEnsemble\r\"Sly3Ensemble overrides to true\"\r^true! !\r!Sly3Ensemble methodsFor: 'membership' stamp: 'ssa 6/17/2010 10:29'!\rmembers\r\"you should never trust that the members collection stays the same within the ensemble\"\r^members copy! !\r!Sly3Ensemble methodsFor: 'membership' stamp: 'dmu 9/19/2010 22:53'!\rmembers: aCollection\r\t\"crude check:\"\r\tself primitiveSetExtraWordSelector: #sentToEnsemble:.\r\taCollection primitiveSetExtraPreheaderWord: self.\r\tmembers _ aCollection.\r\t^ self! !\r!Sly3Ensemble methodsFor: 'as yet unclassified' stamp: 'dmu 3/25/2010 23:48'!\rselect: aBlock\r^ self members select: aBlock! !\r!Sly3Ensemble methodsFor: 'membership' stamp: 'dmu 8/30/2010 01:53'!\rsize\r^ members size! !\r!Sly3Ensemble methodsFor: 'as yet unclassified' stamp: 'dmu 3/25/2010 21:25'!\rtotalWithIdentity: id\r^ self plus: id adverb: #reductively! !\r!Sly3Ensemble methodsFor: 'printing' stamp: 'ssa 6/17/2010 16:35'!\rasExplorerString\r\r^self printString! !\r!Sly3Ensemble methodsFor: 'printing' stamp: 'dmu 9/3/2010 16:50'!\rprintOn: out\r\"Add a string that should compile back into an ensemble like me\"\rout nextPutAll:'%{'.\rself members  do:[:mem|\r\tmem printOn: out.\r\tout nextPutAll:'. '].\rout nextPutAll:'}'.\r! !\r!Sly3Ensemble methodsFor: 'printing' stamp: 'dmu 9/3/2010 16:51'!\rstoreOn: out\r\"Write a string on aStream that should compile back into an ensemble like me\"\rout nextPut:$%;nextPut:${.\rself members  do:[:mem|\r\tmem storeOn: out.\r\tout nextPut:$.].\rout nextPut:$}.\r! !\r!Sly3Ensemble methodsFor: 'exploring' stamp: 'ssa 6/15/2010 16:14'!\rexplorerContents\r\r^self members asOrderedCollection withIndexCollect: [:value :index |\r\tObjectExplorerWrapper\r\t\twith: value\r\t\tname: index printString\r\t\tmodel: self]! !\r!Sly3Ensemble methodsFor: 'exploring' stamp: 'ssa 6/15/2010 16:15'!\rhasContentsInExplorer\r^self members isEmpty not! !\rSly3Ensemble class\rinstanceVariableNames: ''!\r!Sly3MessageEvaluator methodsFor: 'evaluating-modified' stamp: 'dmu 9/23/2010 15:18'!\rstuffReceivers\renvelopes with: operandTuples do: [:e :ot| e receiver: ot first]! !\r!Sly3MessageEvaluator methodsFor: 'evaluating-modified' stamp: 'dmu 9/13/2010 00:13'!\rstuffSelectors\r\"placeholder; could vary\"\renvelopes do: [:e| e message setSelector: message selector]! !\r!Sly3MessageEvaluator methodsFor: 'evaluating-modified' stamp: 'dmu 9/23/2010 15:21'!\rstuffArguments\renvelopes with: operandTuples do: [:e :ot| \r\t1 to: ot size -1 do: [:i|\r\t\te message arguments at: i put: (ot at: i + 1)]]! !\r!Sly3MessageEvaluator methodsFor: 'evaluating-modified' stamp: 'dmu 8/30/2010 01:26'!\rrelocateReceiversIfNeeded\r\"Supports message adverbs that desire to have member in special core locations relative to each other or to arguments.\rExamples:\r\t#locally (same core)\r\t#globally (anywhere is fine)\r\t#closely (nearby cores)\r\t#distantly (on distant cores from each other.  may need a parameter here for Manhattan distance apart)\r\t#evenly (spread over cores so each core has same number)\r\t#statically (don't relocate under any circumstances)\rDefault case is #globally, i.e., no relocation.\rOthers to be implemented later.\"\r\r\t! !\r!Sly3MessageEvaluator methodsFor: 'evaluating-modified' stamp: 'dmu 8/30/2010 01:27'!\rrelocateArgumentsIfNeeded\r\"Supports argument adverbs that desire to be in special core locations relative to each other or to their receiving members.\rExamples:\r\t#locally (same core)\r\t#globally (anywhere is fine)\r\t#closely (nearby cores)\r\t#distantly (on distant cores from each other.  may need a parameter here for Manhattan distance apart)\r\t#evenly (spread over cores so each core has same number)\r\t#statically (don't relocate under any circumstances)\rDefault case is #globally, i.e., no relocation.\rOthers to be implemented later.\"\r\r\t! !\r!Sly3MessageEvaluator methodsFor: 'evaluating-modified' stamp: 'dmu 9/21/2010 00:26'!\rsendMessages\r\"Deliver the message envelopes and collect results.\rThis must eventually handle adverbs for timing and recurring messages, determining when the ensemble message is 'done'. etc.\rFor now, do the simplest thing, a parallelCollect:\"\r\r| payloadBlock |\rpayloadBlock _ [:env| \r\tProcessor thisProcess creatorEnsemble: env receiver. \r\tenv deliver].\r\r\"check for serially flag and handle appropriately\"\r^(message messageAdverbs anySatisfy: [:ad| ad isKindOf: Sly3ModSerially])\r\tifTrue:[ envelopes collect: payloadBlock]\r\tifFalse:[ envelopes parallelCollect: payloadBlock]! !\r!SlySelectorModifier class methodsFor: 'testing' stamp: 'dmu 8/30/2010 10:01'!\risSlySelector: aSelector\r\"True if its has SlySelectorModifers\"\r^ {self asAWhole. self adverb. self gerundColon} anySatisfy: [:ss | aSelector includesSubString: ss]! !\r!Sly3 class methodsFor: 'user interfacing' stamp: 'dmu 9/23/2010 13:41'!\rdashboard \r\"Sly3 dashboard      \"   \r| topView  buttons lastView subViewCount |\rtopView := RVMStandardSystemView new  .\rtopView borderWidth:1. \rbuttons _ {\r\tTranscript showInConsoleSwitch.\r\tself keepFlyingSwitch.\r\tself serializeForDebuggingSwitch.\r\tRVMButtonView label: 'Suspend member processes' action: [Processor suspendMemberProcesses].\r\tRVMButtonView label: 'Terminate member processes' action: [Processor terminateMemberProcesses].\r\tRVMButtonView label: 'Debug member processes' action: [Processor suspendMemberProcesses. ProcessBrowser open].\r\t\r\tRVMButtonView label:'[ Sly3Boids new run ] fork' \r\t\t\t\taction:[[ Sly3Boids new run ] fork].\r\tRVMButtonView label: '[Sly3aBoids new run ] fork'\r\t\t\t\taction: [[Sly3aBoids new run ] fork ].\r\tRVMButtonView label:'Restore normal cursor' \r\t\t\t\taction:[Cursor normal show].\r\tRVMButtonView label:'process browser' \r\t\t\t\taction:[ProcessBrowser  open].\r\tRVMButtonView label: 'Sly3SyntaxTests runAll'\r\t\t\t\taction: [Sly3SyntaxTests runAll].\r}.\rlastView _ nil.\rbuttons do:[:view| topView addSubView: view below: lastView.\r\tlastView _ view].\rtopView label: 'Sly3'.\rsubViewCount _ topView subViews size.\rtopView minimumSize: 165@(subViewCount*27).\rtopView maximumSize: topView minimumSize.\rtopView controller open! !\r!Sly3 class methodsFor: 'user interfacing' stamp: 'ssa 3/25/2010 16:41'!\rkeepFlyingSwitch\r\"Sly3 keepFlyingSwitch demo\"\r^RVMCheckBoxView on: self label: 'Keep SlyBoids Flying' \r\t\t\t\t\tcheckState: [Sly3 keepFlying] \r\t\t\t\t\twhenChecked: [Sly3 keepFlying:true] \r\t\t\t\t\twhenUnchecked: [Sly3 keepFlying:false].! !\r!Sly3 class methodsFor: 'accessing' stamp: 'ssa 3/25/2010 16:29'!\rkeepFlying\r\rKeepFlying isNil ifTrue:[KeepFlying _ true].\r^KeepFlying! !\r!Sly3 class methodsFor: 'accessing' stamp: 'ssa 3/25/2010 16:32'!\rkeepFlying: aBoolean\r\rKeepFlying _ aBoolean! !\r!Sly3 class methodsFor: 'accessing' stamp: 'ssa 3/25/2010 16:32'!\rtoggleKeepFlying\r\rself keepFlying: self keepFlying not! !\r!Sly3AbstractModifier methodsFor: 'testing' stamp: 'dmu 8/30/2010 18:34'!\risMessageModifier\r^ self class isMessageModifier! !\r!Sly3AbstractModifier methodsFor: 'testing' stamp: 'dmu 8/30/2010 18:34'!\risArgumentModifier\r^ self class isArgumentModifier! !\r!Sly3AbstractModifier methodsFor: 'testing' stamp: 'dmu 8/30/2010 18:34'!\risGerund\r^ self class isGerund! !\rSly3Gerund subclass: #Sly3ModTotalling\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly3-Modifiers'!\rSly3Gerund subclass: #Sly3ModSelecting\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly3-Modifiers'!\rSly3Gerund subclass: #Sly3ModAverging\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly3-Modifiers'!\r!Sly3AbstractModifier methodsFor: 'accessing' stamp: 'dmu 8/30/2010 18:36'!\rstringWithLowercaseSuffix\r^ self class stringWithLowercaseSuffix! !\r!Sly3AbstractModifier methodsFor: 'testing' stamp: 'dmu 8/30/2010 18:33'!\risAdverb\r^ self class isAdverb! !\r!Sly3AbstractModifier methodsFor: 'accessing' stamp: 'dmu 8/30/2010 18:37'!\ruppercaseSuffix\r^ self class uppercaseSuffix! !\r!Sly3AbstractModifier methodsFor: 'accessing' stamp: 'dmu 8/30/2010 18:35'!\rlowercaseSuffix\r^ self class lowercaseSuffix! !\r!Sly3AbstractModifier class methodsFor: 'testing' stamp: 'dmu 8/30/2010 18:33'!\risAdverb\r^ false! !\r!Sly3AbstractModifier class methodsFor: 'testing' stamp: 'dmu 8/30/2010 18:34'!\risArgumentModifier\r^ false! !\r!Sly3AbstractModifier class methodsFor: 'testing' stamp: 'dmu 8/30/2010 18:34'!\risGerund\r^ false! !\r!Sly3AbstractModifier class methodsFor: 'testing' stamp: 'dmu 8/30/2010 18:34'!\risMessageModifier\r^ false! !\r!Sly3AbstractModifier class methodsFor: 'accessing' stamp: 'dmu 8/30/2010 19:52'!\rlowercaseSuffix\r^ self uppercaseSuffix asLowercase! !\r!Sly3AbstractModifier class methodsFor: 'accessing' stamp: 'dmu 8/30/2010 18:36'!\rstringWithLowercaseSuffix\r\"Sly3ModWholly  stringWithLowercaseSuffix\"\r^ (self  name copyFrom: 'Sly3Mod' size + 1 to: self  name size) asLowercase! !\r!Sly3AbstractModifier class methodsFor: 'accessing' stamp: 'dmu 8/30/2010 18:37'!\ruppercaseSuffix\r^self subclassResponsibility! !\r!Sly3Adverb class methodsFor: 'testing' stamp: 'dmu 8/30/2010 18:38'!\ruppercaseSuffix\r^ 'LY'! !\r!Sly3Gerund class methodsFor: 'testing' stamp: 'dmu 8/30/2010 18:38'!\ruppercaseSuffix\r^ 'ING'! !\r!Sly3AbstractModifier methodsFor: 'accessing' stamp: 'dmu 8/30/2010 18:39'!\rallUppercaseSuffixes\r^ self class allUppercaseSuffixes! !\r!Sly3AbstractModifier class methodsFor: 'accessing' stamp: 'dmu 8/30/2010 18:39'!\rallUppercaseSuffixes\r^ {Sly3Adverb. Sly3Gerund} collect: [:x | x uppercaseSuffix]! !\r!Sly3Adverb class methodsFor: 'testing' stamp: 'dmu 8/30/2010 18:40'!\risAdverb\r^ true! !\r!Sly3Gerund class methodsFor: 'testing' stamp: 'dmu 9/1/2010 23:44'!\risGerund\r^ true! !\r!Sly3AbstractModifier class methodsFor: 'accessing' stamp: 'dmu 9/3/2010 12:31'!\rmodifySelector: sel\r^ (self stringWithUppercaseSuffix, sel) asSymbol! !\r!Sly3AbstractModifier class methodsFor: 'accessing' stamp: 'dmu 8/30/2010 18:46'!\rstringWithUppercaseSuffix\r^ self stringWithoutSuffix, self uppercaseSuffix! !\r!Sly3AbstractModifier class methodsFor: 'accessing' stamp: 'dmu 8/30/2010 18:47'!\rstringWithoutSuffix\r| s ss |\rs _ self stringWithLowercaseSuffix.\rss _ self suffixSize.\r^ s copyFrom: 1 to: s size - ss! !\r!Sly3AbstractModifier class methodsFor: 'testing' stamp: 'dmu 8/30/2010 19:00'!\risSlySelector: aString\r\"  Sly3AbstractModifier isSlySelector: 'abdc'  \"\r^ self allUppercaseSuffixes anySatisfy: [:s | aString includesSubString: s]! !\r!Sly3UnprocessedEnsembleMessage methodsFor: 'accessing' stamp: 'dmu 8/30/2010 19:35'!\rreceiver: anObject\r\"Set the value of receiver\"\r\rreceiver _ anObject! !\r!Sly3AbstractModifier methodsFor: 'accessing' stamp: 'dmu 8/30/2010 19:41'!\rsuffixSize\r^ self class suffixSize! !\r!Sly3AbstractModifier class methodsFor: 'accessing' stamp: 'dmu 8/30/2010 19:41'!\rsuffixSize\r^ self uppercaseSuffix size! !\r!Sly3AbstractModifier class methodsFor: 'accessing' stamp: 'dmu 8/30/2010 19:56'!\rmembersSelector\r^#members! !\r!Sly3AbstractModifier class methodsFor: 'instance creation' stamp: 'dmu 9/1/2010 10:59'!\rinstantiateSpecificFromBaseName: baseName includingSuffix: suffix\r| specificClassName cls |\rspecificClassName _ 'Sly3Mod', baseName capitalized, suffix asLowercase.\rcls _ Smalltalk at: specificClassName asSymbol ifAbsent: [self error: 'could not find modifier class: ', specificClassName].\r^ cls new! !\r!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/12/2010 21:19'!\rmessageModifiers: anObject\r\"Set the value of messageModifiers\"\r\r| |\rgerunds _ anObject select: [:x|x isGerund].\rmessageAdverbs _ anObject select: [:x| x isAdverb]\r\t! !\r!Sly3UnprocessedEnsembleMessage methodsFor: 'printing' stamp: 'dmu 9/1/2010 10:35'!\rprintOn: aStream\rsuper printOn: aStream.\raStream nextPutAll: '(', self selector, ')'! !\r!Sly3ParsedMessage methodsFor: 'printing' stamp: 'dmu 9/1/2010 11:15'!\rprintOn: aStream\rsuper printOn: aStream.\raStream nextPutAll: ': ', self selector! !\rSly3Gerund subclass: #Sly3ModAnding\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly3-Modifiers'!\r!Collection methodsFor: '*Sly' stamp: 'dmu 9/1/2010 15:17'!\rproduct\r| r |\rr _ 1.\rself do: [:e| r _ r * e].\r^ r! !\r!Sly3MessageEvaluator methodsFor: 'as yet unclassified' stamp: 'dmu 9/23/2010 15:17'!\rmakeEnvelopes\r\t^ (Array new: operandTuples size) collect: [:x|Sly3MessageEnvelope argumentCount: message arguments size]! !\r!SlyMessageEnvelope class methodsFor: 'instance creation' stamp: 'dmu 9/1/2010 15:32'!\rargumentCount: n\r\r^self new\r\tmessage: (Message selector: #none arguments: (Array new: n));\r\tyourself! !\r!Sly3ModSerially methodsFor: 'accessing' stamp: 'dmu 9/1/2010 15:49'!\rcachedMod\r\"Answer the value of cachedMod\"\r\rcachedMod isNil ifTrue:[self cachedMod: nil].\r^ cachedMod! !\r!Sly3ModSerially methodsFor: 'accessing' stamp: 'dmu 9/1/2010 15:49'!\rcachedMod: anObject\r\"Set the value of cachedMod\"\r\rcachedMod _ anObject! !\r!Sly3ModSerially methodsFor: 'accessing' stamp: 'dmu 9/1/2010 15:51'!\rcachedEns\rself unimplemented: 'must get receiver and arg ens and construct a selected ensemble'.\r^ cachedEns! !\r!Sly3ModSerially methodsFor: 'accessing' stamp: 'dmu 9/1/2010 15:49'!\rcachedEns: anObject\r\"Set the value of cachedEns\"\r\rcachedEns _ anObject! !\r!Sly3ModWholly commentStamp: 'dmu 9/1/2010 15:57'!\rbatch all args to each member with the message!\r!Sly3ModSingly commentStamp: 'dmu 9/1/2010 15:57'!\rdistributed arguments one-to-one over members!\r!Sly3ModRoundly commentStamp: 'dmu 9/1/2010 15:58'!\rdistribute args over members round-robin fashion, repeating members as needed.  Think of members here as a Resource Pool.  This will require collaboration with any message adverbs.!\r!Sly3ModDuplicatively commentStamp: 'dmu 9/1/2010 15:58'!\reach member gets a copy of the arguments!\rSly3Gerund subclass: #Sly3ModEnsembling\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly3-Modifiers'!\r!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/3/2010 20:29'!\rargumentAdverbs: collectionPerArgument\r\"Set the value of argumentModifiers\"\r(collectionPerArgument anySatisfy: [:x | x anySatisfy: [:a | a isAdverb not]]) ifTrue: [self error: 'only adverbs for arguments'].\rargumentAdverbs _ collectionPerArgument asArray! !\rSly3Gerund subclass: #Sly3ModAndling\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly3-Modifiers'!\r!Sly3ModAndling methodsFor: 'as yet unclassified' stamp: 'dmu 9/1/2010 16:25'!\rreducing: results\r| result |\rresults isEmpty ifTrue:[self error:'No members, how should we handle?  proceed for nil'.  ^nil].\rresult _ results first.\rresults allButFirst do:[:each| result _ each & result].\r^result! !\rSly3Gerund subclass: #Sly3Concatenating\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly3-Modifiers'!\rSly3Gerund subclass: #Sly3ModOring\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly3-Modifiers'!\r!Sly3MessageEvaluator methodsFor: 'post-processing' stamp: 'dmu 9/4/2010 15:34'!\revaluateGerunds\rmessage gerunds reverseDo: [:g| g reduceForEvaluator: self].\r^ result! !\r!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/1/2010 16:34'!\rgerunds\rgerunds ifNil: [gerunds _ {}].\r^ gerunds! !\r!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/1/2010 16:46'!\rmessageAdverbs\r^ messageAdverbs ifNil: [messageAdverbs _ {}] ifNotNil: [messageAdverbs]! !\r!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/1/2010 23:05'!\rgerunds: anObject\r\"Set the value of gerunds\"\r\rgerunds _ anObject! !\r!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/1/2010 23:05'!\rmessageAdverbs: anObject\r\"Set the value of messageAdverbs\"\r\rmessageAdverbs _ anObject! !\r!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/1/2010 23:05'!\rargumentAdverbs\r\"Answer the value of argumentAdverbs\"\r\rargumentAdverbs isNil ifTrue:[self argumentAdverbs: nil].\r^ argumentAdverbs! !\r!Sly3ParsedMessage class methodsFor: 'as yet unclassified' stamp: 'dmu 9/19/2010 21:35'!\rreceiver: ens members: mems messageModifiers: m  selector: s  arguments: args  argumentAdverbs: argumentAdverbs\r| r |\rfalse  ifFalse: [\r\t^ self new receiver: ens; members: mems; messageModifiers: m; selector: s; arguments: args; argumentAdverbs: argumentAdverbs; yourself\r\t].\rSupportMultipleAdverbs. \"come back here later\"\rr _ self new.\rr receiverMirror: (Sly3EnsembleMirror forEnsemble: ens members: mems).\rr messageModifiers: m.\rr selector: s.\rr argumentMirrors: (args collect: [:a| Sly3EnsembleMirror forObject: a]).\rr argumentAdverbs: argumentAdverbs.\r^ r! !\r!Object methodsFor: '*Sly3' stamp: 'dmu 9/1/2010 23:22'!\rcollectionLY\r^ nil! !\r!Sly3MessageEnvelope methodsFor: 'delivering' stamp: 'dmu 9/21/2010 00:24'!\rdeliver\r\"send my message to my receiver and return the reply\"\r| e |\r1 to: deactivateEnsembleBehaviorFlags size do: [:i|\r\t(deactivateEnsembleBehaviorFlags at: i) ifTrue: [\r\t\te _ i = 1 ifTrue: [ receiver] ifFalse: [message arguments at: i - 1].\r\t\t^ Sly3Ensemble deactivateEnsembleSendsFor: e during: [(self copy at: i putDeactivateEnsembleBehaviorFlag: false) deliver]\r\t\t]\r\t].\rself message arguments: self message arguments asArray.\r^self message sentTo: self receiver! !\r!Sly3MessageEnvelope methodsFor: 'accessing' stamp: 'ssa 5/12/2010 15:24'!\rmessage\r\"Answer the value of message\"\r\rmessage isNil ifTrue:[self message: nil].\r^ message! !\r!Sly3MessageEnvelope methodsFor: 'accessing' stamp: 'ssa 7/16/2010 19:03'!\rmessage: anObject\r\"Set the value of message\"\r\rmessage _ anObject.\r! !\r!Sly3MessageEnvelope methodsFor: 'accessing' stamp: 'dmu 9/3/2010 21:27'!\rreceiver\r^ receiver! !\r!Sly3MessageEnvelope methodsFor: 'accessing' stamp: 'ssa 5/12/2010 15:24'!\rreceiver: anObject\r\"Set the value of receiver\"\r\rreceiver _ anObject! !\r!Sly3MessageEnvelope methodsFor: 'printing' stamp: 'dmu 9/3/2010 16:51'!\rprintOn: aStream\r\raStream nextPutAll:'MsgEnv|rcvr:',self receiver wholLYprintString,'|message: ',self message printString! !\rSly3MessageEnvelope class\rinstanceVariableNames: ''!\r!Sly3MessageEnvelope class methodsFor: 'instance creation' stamp: 'dmu 9/3/2010 15:35'!\rargumentCount: n\r\r^self new\r\tmessage: (Message selector: #none arguments: (Array new: n));\r\tdeactivateEnsembleBehaviorFlags: ((Array new: n + 1) collect: [:x| false]);\r\tyourself! !\r!Sly3MessageEnvelope class methodsFor: 'instance creation' stamp: 'ssa 5/27/2010 10:46'!\rreceiver: anObject selector: aSymbol arguments: anArray\r\r^self new\r\treceiver: anObject;\r\tmessage: (Message selector: aSymbol arguments: anArray);\r\tyourself! !\rSly3Boid subclass: #Sly3aBoid\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly3-Boids'!\r!Sly3aBoid methodsFor: 'no messages' stamp: 'dmu 9/2/2010 23:59'!\rcomputeCentroid\r[\"buttonize next two lines for a trigger setting button\"\r\"Click To Set Trigger\"\r\"  ONEHALT _ true\"     \r].\r\r\"ONEHALT ifTrue:[ONEHALT _ false. self halt].\"\r^ self flock boids averagINGserialLYposition! !\r!Sly3aBoid methodsFor: 'as yet unclassified' stamp: 'dmu 9/3/2010 00:01'!\rcomputeNeighbors\r\"should return ensemble\"\r^ self flock boids selectINGisNear: self! !\r!Sly3aBoid methodsFor: 'as yet unclassified' stamp: 'dmu 9/3/2010 15:56'!\rkeepAwayFromNeighbors\rself neighbors collectionLYsize = 0 ifTrue: [^ 0@0].\r^ self position - self neighbors averagINGserialLYposition! !\r!Sly3aBoid methodsFor: 'as yet unclassified' stamp: 'dmu 9/8/2010 03:02'!\rmatchVelocityWithNeighbors\rself neighbors  collectionLYsize = 0 ifTrue:  [^ 0@0].\r^ self neighbors averagINGvelocity / 8.0! !\rSly3SyntaxTests class\rinstanceVariableNames: ''!\r!Sly3ReflectiveSelectorChanger methodsFor: 'modifying reflective selectors' stamp: 'dmu 9/3/2010 14:34'!\rmodifiedSelector\r^ Sly3Adverb reflectiveAdverb modifySelector: selector! !\r!Sly3ReflectiveSelectorChanger methodsFor: 'modifying reflective selectors' stamp: 'dmu 9/8/2010 21:09'!\risEquals\r^ selector = #= ifTrue:[self selector: #equals:. true] ifFalse: [false]! !\r!Sly3ReflectiveSelectorChanger methodsFor: 'modifying reflective selectors' stamp: 'dmu 9/3/2010 12:12'!\risToolMessage\r| toolMessages |\rtoolMessages _ #(inspect explore printString asExplorerString hasContentsInExplorer explorerContents  halt error: halt: isKindOf:).\r^ toolMessages includes: selector! !\r!Sly3ReflectiveSelectorChanger methodsFor: 'modifying reflective selectors' stamp: 'dmu 9/3/2010 12:13'!\risToolProcess\r| foundContext toolClasses |\t\rtoolClasses _ { Inspector. Debugger.  PluggableListController}.\rfoundContext _ thisContext findContextSuchThat:[:ctxt|  toolClasses includes: ctxt receiver class].\r^ foundContext notNil! !\r!Sly3ReflectiveSelectorChanger methodsFor: 'accessing' stamp: 'dmu 9/3/2010 12:17'!\rmessage: m\rmessage _ m! !\r!Sly3ReflectiveSelectorChanger methodsFor: 'dispatching' stamp: 'dmu 9/3/2010 17:46'!\rmodifyMessageAsNeeded\r| newSelector |\rselector _ message selector.\rnewSelector _ self modifySelectorAsNeeded.\r^ selector = newSelector ifTrue: [message] ifFalse: [message copy selector: newSelector]! !\r!Sly3ReflectiveSelectorChanger methodsFor: 'dispatching' stamp: 'dmu 9/3/2010 17:51'!\rmodifySelectorAsNeeded\r(self isReflective or: [self isWholly or: [self isCollectionly]]) ifTrue: [^ selector].\r^ (self isEquals or: [self isToolMessage or: [self isToolProcess]]) ifTrue: [self modifiedSelector] ifFalse: [selector]\r! !\r!Sly3ReflectiveSelectorChanger class methodsFor: 'as yet unclassified' stamp: 'dmu 9/3/2010 12:25'!\rmodifyAsNeeded: aMessage\r^self new message: aMessage; modifyMessageAsNeeded! !\r!Sly3Gerund methodsFor: 'as yet unclassified' stamp: 'dmu 9/3/2010 14:13'!\rreduceForEvaluator: ev\rself subclassResponsibility! !\r!Sly3ModAnding methodsFor: 'as yet unclassified' stamp: 'dmu 9/4/2010 15:35'!\rreduceForEvaluator: ev\r| result results |\rresults _ ev result.\rresults isEmpty ifTrue:[self error:'No members, how should we handle?  proceed for nil'.  ^nil].\rresult _ results first.\rresults allButFirst do:[:each| result _ each & result].\rev result: result! !\r!Sly3ModAveraging methodsFor: 'as yet unclassified' stamp: 'dmu 9/8/2010 02:42'!\rreduceForEvaluator: ev\r| sum results |\rresults _ ev result.\rresults isEmpty ifTrue:[self error:'No members, how should we handle?  proceed for nil'.  ^nil].\rsum _ results sum.\rev result: sum  / results size ! !\r!Sly3ModConcatenating methodsFor: 'as yet unclassified' stamp: 'dmu 9/4/2010 15:33'!\rreduceForEvaluator: ev\r\"Concatenate each element in results and return the result.\rAssumes these elements are collections of some kind.\"\r\r| result results |\rresults _ ev result.\rresults isEmpty ifTrue:[self error:'No members, how should we handle?  proceed for nil'.  ^nil].\rresult _ results first.\rresults allButFirst do:[:each| result _ result , each].\rev result: result! !\r!Sly3ModEnsembling methodsFor: 'result handling' stamp: 'dmu 9/22/2010 22:05'!\rreduceForEvaluator: ev\r| results |\rresults _ ev result.\rev result: ( ev putResultsIntoAnEnsemble ifTrue: [results asEnsembleOfElements]\rifFalse: [results size = 1 ifTrue: [results first] ifFalse: [self error: 'no ensembles dismembered, but yet results have ', results size printString, ' elements']])! !\r!Sly3ModOring methodsFor: 'as yet unclassified' stamp: 'dmu 9/4/2010 15:35'!\rreduceForEvaluator: ev\r\"OR the elements in results and return the result.\rAssumes these elements understand |.\"\r\r| result results |\rresults _ ev result.\rresults isEmpty ifTrue:[self error:'No members, how should we handle?  proceed for nil'.  ^nil].\rresult _ results first.\rresults allButFirst do:[:each| result _ each | result].\rev result: result! !\r!Sly3ModTotalling methodsFor: 'as yet unclassified' stamp: 'dmu 9/4/2010 15:35'!\rreduceForEvaluator: ev\r\"Sum the elements in results and return the result.\rAssumes these elements understand +.\"\r\r| result results |\rresults _ ev result.\rresults isEmpty ifTrue:[self error:'No members, how should we handle?  proceed for nil'.  ^nil].\rresult _ 0.\rresults do:[:each| result _ each + result].\rev result: result! !\r!Sly3ModSelecting methodsFor: 'as yet unclassified' stamp: 'dmu 9/16/2010 23:59'!\rreduceForEvaluator: ev\r| results members r |\rresults _ ev result.\rmembers _ ev message members.\rr _ OrderedCollection new.\rmembers with: results do: [:m :res | res ifTrue: [r add: m]].\rev result: r asEnsembleOfElements! !\rSly3ModWholly subclass: #Sly3Plainly\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly3-Modifiers'!\r!Sly3Plainly commentStamp: 'dmu 9/3/2010 14:28'!\rDisable all ensemble processing for the recursive duration of this send!\r!Sly3Adverb class methodsFor: 'nil' stamp: 'dmu 9/3/2010 14:33'!\rreflectiveAdverb\r^Sly3ModPlainly! !\r!Sly3ReflectiveSelectorChanger methodsFor: 'modifying reflective selectors' stamp: 'dmu 9/3/2010 14:35'!\risReflective\r^ selector beginsWith: Sly3Adverb reflectiveAdverb stringWithUppercaseSuffix! !\r!Sly3MessageEnvelope methodsFor: 'accessing' stamp: 'dmu 9/3/2010 15:35'!\rdeactivateEnsembleBehaviorFlags: x\rdeactivateEnsembleBehaviorFlags _ x! !\r!Sly3ModPlainly methodsFor: 'testing' stamp: 'dmu 9/3/2010 15:41'!\rshouldDisableEnsembleBehavior\r^ true! !\r!Sly3MessageEnvelope methodsFor: 'accessing' stamp: 'dmu 9/3/2010 15:43'!\rat: rcvrArgIndex putDeactivateEnsembleBehaviorFlag: aBool\rdeactivateEnsembleBehaviorFlags at: rcvrArgIndex put: aBool! !\r!Process methodsFor: 'accessing' stamp: 'dmu 9/3/2010 16:30'!\rlyDebuggingBlock\r\"Answer the value of lyDebuggingBlock\"\r\rlyDebuggingBlock isNil ifTrue:[self lyDebuggingBlock: nil].\r^ lyDebuggingBlock! !\r!Process methodsFor: 'accessing' stamp: 'dmu 9/3/2010 16:30'!\rlyDebuggingBlock: anObject\r\"Set the value of lyDebuggingBlock\"\r\rlyDebuggingBlock _ anObject! !\r!Sly3ModCollectionly commentStamp: 'dmu 9/3/2010 16:55'!\rUse members collection of the ensemble!\r!Sly3Ensemble class methodsFor: 'as yet unclassified' stamp: 'dmu 9/7/2010 11:13'!\rdeactivateEnsembleSendsFor: anEnsemble during: aBlock\r\"disable messaging dispatching to members and just send it to the ensemble object itself during aBlock\"\r| members r |\rmembers _ anEnsemble members.\r0 primitiveSetExtraPreheaderWord:  anEnsemble.\rr _ aBlock ensure: [members primitiveSetExtraPreheaderWord:  anEnsemble. \r].\r^ r\r\r! !\r!Sly3ReflectiveSelectorChanger methodsFor: 'accessing' stamp: 'dmu 9/3/2010 17:49'!\rselector: x\rselector _ x! !\r!Sly3ReflectiveSelectorChanger methodsFor: 'modifying reflective selectors' stamp: 'dmu 9/3/2010 17:52'!\risWholly\r^ selector beginsWith: Sly3ModWholly stringWithUppercaseSuffix! !\r!Sly3ReflectiveSelectorChanger methodsFor: 'modifying reflective selectors' stamp: 'dmu 9/3/2010 17:52'!\risCollectionly\r^ selector beginsWith: Sly3ModCollectionly stringWithUppercaseSuffix! !\r!Sly3ModRandomly methodsFor: 'accessing' stamp: 'dmu 9/3/2010 18:12'!\rparameter\r\"Answer the value of parameter\"\r\rparameter isNil ifTrue:[self parameter: 1].\r^ parameter! !\r!Sly3Adverb methodsFor: 'testing' stamp: 'dmu 9/3/2010 18:15'!\risIndirect\r^ false! !\r!Sly3MessageParser methodsFor: 'assigning modifiers to arguments' stamp: 'dmu 9/13/2010 00:02'!\rfoldInIndirectModifiers: blk\r| stringsAndMods args inStringsAndMods inArgs s |\rstringsAndMods _ OrderedCollection new.\rargs _ OrderedCollection new.\rinStringsAndMods _ ReadStream on: flatKeywordsAndModifiers.\rinArgs _ ReadStream on: arguments.\r\r[inStringsAndMods atEnd] whileFalse: [\r\ts _ inStringsAndMods next.\r\t(s isKindOf: String) ifTrue: [\r\t\tstringsAndMods addLast: s.\r\t\t(s notEmpty and: [(s last = $:) or: [s first isLetter not]]) ifTrue: [args addLast: inArgs next].\r\t\t]\r\tifFalse: [\r\t\ts isIndirect  ifTrue: [\r\t\t\ts parameter: inArgs next.\r\t\t\t].\r\t\tstringsAndMods addLast: s.\r\t]\r].\rblk value: stringsAndMods contents value: args  asArray! !\r!Sly3MessageParser methodsFor: 'assigning modifiers to arguments' stamp: 'dmu 9/16/2010 23:24'!\rbreakModifiersForArguments\r\t| |\rarguments isEmpty ifTrue: [ ^ self breakUnaryModifiersForArguments].\runparsedSelector isInfix ifTrue: [ ^ OrderedCollection with: (OrderedCollection new) with: (OrderedCollection new)\r\t].\r^ self breakKeywordModifiersForArguments! !\r!Sly3MessageParser methodsFor: 'accessing' stamp: 'dmu 9/3/2010 19:44'!\rarguments\r^ arguments! !\r!Sly3ModRandomly methodsFor: 'accessing' stamp: 'dmu 9/3/2010 19:46'!\rrandomNumberSource\r\rRandomNumberSource isNil ifTrue:[RandomNumberSource _ Random new].\r^RandomNumberSource! !\r!Sly3Gerund methodsFor: 'testing' stamp: 'dmu 9/3/2010 22:16'!\risIndirect\r^ false! !\r!Sly3AbstractModifier methodsFor: 'testing' stamp: 'dmu 9/3/2010 22:16'!\risDirect\r^ self isIndirect not! !\r!Sly3MessageParser methodsFor: 'dissecting selector' stamp: 'dmu 9/13/2010 00:09'!\rbreakStringsIntoKeywords: inCol\r| in out x inin outout c |\rin _ ReadStream on: inCol.\rout _ WriteStream on: (Array new: inCol size * 2).\r[in atEnd] whileFalse: [\r\tx _ in next.\r\t(x isKindOf: String) ifFalse: [ out nextPut: x] ifTrue: [\r\t\tinin _ ReadStream on: x.\r\t\toutout _ WriteStream on:  (String new: x size).\r\t\t[inin atEnd] whileFalse: [\r\t\t\tc _ inin next.\r\t\t\toutout nextPut: c.\r\t\t\tc = $: ifTrue: [\r\t\t\t\tout nextPut:  (outout contents).\r\t\t\t\toutout _ WriteStream on:  (String new: x size).\r\t\t\t]\r\t\t].\r\t\toutout isEmpty ifFalse: [out nextPut: (outout contents)]\r\t]\r].\r^ out contents asOrderedCollection! !\r!Sly3MessageEvaluator methodsFor: 'accessing' stamp: 'dmu 9/4/2010 15:33'!\rresult: r\rresult _ r! !\r!Sly3MessageEvaluator methodsFor: 'accessing' stamp: 'dmu 9/4/2010 15:34'!\rresult\r^ result! !\rSly3OperandDistributor subclass: #Sly3AbstractIndirectAdverb\rinstanceVariableNames: 'parameter'\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly3-Modifiers'!\r!Sly3AbstractIndirectAdverb methodsFor: 'accessing' stamp: 'dmu 9/4/2010 23:00'!\rparameter\r\"Answer the value of parameter\"\r\rparameter isNil ifTrue:[self parameter: nil].\r^ parameter! !\r!Sly3AbstractIndirectAdverb methodsFor: 'accessing' stamp: 'dmu 9/4/2010 23:00'!\rparameter: anObject\r\"Set the value of parameter\"\r\rparameter _ anObject! !\r!Sly3AbstractIndirectAdverb methodsFor: 'accessing' stamp: 'dmu 9/4/2010 23:01'!\risIndirect\r^ true! !\r!Sly3EnsembleMirror methodsFor: 'accessing' stamp: 'dmu 9/5/2010 15:25'!\rtheEnsemble\r\"Answer the value of theEnsemble\"\r\rtheEnsemble isNil ifTrue:[self theEnsemble: nil].\r^ theEnsemble! !\r!Sly3EnsembleMirror methodsFor: 'accessing' stamp: 'dmu 9/5/2010 15:25'!\rtheEnsemble: anObject\r\"Set the value of theEnsemble\"\r\rtheEnsemble _ anObject! !\r!Sly3EnsembleMirror methodsFor: 'accessing' stamp: 'dmu 9/5/2010 15:25'!\rmembers\r\"Answer the value of members\"\r\rmembers isNil ifTrue:[self members: nil].\r^ members! !\r!Sly3EnsembleMirror methodsFor: 'accessing' stamp: 'dmu 9/5/2010 15:25'!\rmembers: anObject\r\"Set the value of members\"\r\rmembers _ anObject! !\r!Sly3EnsembleMirror class methodsFor: 'as yet unclassified' stamp: 'dmu 9/5/2010 15:27'!\rforObject: obj\rself new theEnsemble: obj; members: (obj wholLYisEnsemble ifTrue: [obj collectionLY] ifFalse: [obj]); yourself! !\r!Sly3EnsembleMirror class methodsFor: 'as yet unclassified' stamp: 'dmu 9/5/2010 15:27'!\rforEnsemble: e members: m\r^ self new theEnsemble: e; members: m; yourself! !\r!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/5/2010 15:32'!\rreceiverMirror\r\"Answer the value of receiverMirror\"\r\rreceiverMirror isNil ifTrue:[self receiverMirror: nil].\r^ receiverMirror! !\r!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/5/2010 15:32'!\rreceiverMirror: anObject\r\"Set the value of receiverMirror\"\r\rreceiverMirror _ anObject! !\r!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/5/2010 15:32'!\rargumentMirrors\r\"Answer the value of argumentMirrors\"\r\rargumentMirrors isNil ifTrue:[self argumentMirrors: nil].\r^ argumentMirrors! !\r!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/5/2010 15:32'!\rargumentMirrors: anObject\r\"Set the value of argumentMirrors\"\r\rargumentMirrors _ anObject! !\r!ClassDescription methodsFor: 'printing' stamp: 'dmu 9/6/2010 16:21'!\rinstanceVariablesString\r\"Answer a string of my instance variable names separated by spaces.\"\r\r^String streamContents: [ :stream |\r\t(self instVarNames isKindOf: Number) ifTrue: [stream nextPutAll: 'EEK'] ifFalse: [\r\t\tself instVarNames\r\t\tdo: [ :each | stream nextPutAll: each ]\r\t\tseparatedBy: [ stream space ] ]]! !\r!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/19/2010 21:37'!\rreceiver\r\"Answer the value of receiver\"\rfalse ifTrue: [SupportMultipleAdverbs. self error: 'should rm this inst var after mirror switch'].\r\r\r^ receiver! !\r!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/6/2010 16:47'!\rreceiver: anObject\r\"Set the value of receiver\"\r\rreceiver _ anObject! !\r!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/19/2010 21:36'!\rmembers\r\"Answer the value of members\"\rfalse ifTrue: [SupportMultipleAdverbs. self error: 'should rm this inst var after mirror switch'].\r\r\rmembers isNil ifTrue:[self members: nil].\r^ members! !\r!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/6/2010 16:47'!\rmembers: anObject\r\"Set the value of members\"\r\rmembers _ anObject! !\rFileStream subclass: #StandardFileStream\rinstanceVariableNames: 'name fileID buffer1 interlock'\rclassVariableNames: 'Registry'\rpoolDictionaries: ''\rcategory: 'System-Files'!\r!StandardFileStream methodsFor: '*RVM' stamp: 'dmu 9/7/2010 14:07'!\rinterlock\rinterlock ifNil: [self interlock: Semaphore forMutualExclusion].\r^ interlock! !\r!StandardFileStream methodsFor: '*RVM' stamp: 'dmu 9/7/2010 14:07'!\rinterlock: aSemaphore\rinterlock _ aSemaphore! !\r!StandardFileStream methodsFor: '*RVM' stamp: 'dmu 9/7/2010 14:14'!\rresetInterlock\rself interlock signal.\rself interlock: nil! !\r!StandardFileStream methodsFor: '*RVM' stamp: 'dmu 9/7/2010 14:09'!\rsafelyDo: aBlock\r^ self interlock critical: aBlock! !\r!StandardFileStream class methodsFor: '*RVM' stamp: 'dmu 9/7/2010 14:14'!\rresetAllInterlocks\r\"self resetAllInterlocks\"\rself allSubInstancesDo: [:sfs| sfs resetInterlock]! !\r!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/19/2010 21:36'!\rarguments\r\"Answer the value of arguments\"\rfalse ifTrue: [SupportMultipleAdverbs. self error: 'should rm this inst var after mirror switch'].\r\r\rarguments isNil ifTrue:[self arguments: nil].\r^ arguments! !\r!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/6/2010 16:47'!\rarguments: anObject\r\"Set the value of arguments\"\r\rarguments _ anObject! !\r!ClassDescription methodsFor: 'fileIn/Out' stamp: 'dmu 9/7/2010 14:17'!\rclassComment: aString stamp: aStamp\r\"Store the comment, aString or Text or RemoteString, associated with the class we are organizing.  Empty string gets stored only if had a non-empty one before.\"\r\r| ptr header file oldCommentRemoteStr |\r(aString isKindOf: RemoteString) ifTrue:\r\t[SystemChangeNotifier uniqueInstance classCommented: self.\r\t^ self organization classComment: aString stamp: aStamp].\r\roldCommentRemoteStr _ self organization commentRemoteStr.\r(aString size = 0) & (oldCommentRemoteStr == nil) ifTrue: [^ self organization classComment: nil].\r\t\"never had a class comment, no need to write empty string out\"\r\rptr _ oldCommentRemoteStr ifNil: [0] ifNotNil: [oldCommentRemoteStr sourcePointer].\rSourceFiles ifNotNil: [(file _ SourceFiles at: 2) ifNotNil: [\r\tfile safelyDo: [\r\t\tfile setToEnd; cr; nextPut: $!!.\t\"directly\"\r\t\t\"Should be saying (file command: 'H3') for HTML, but ignoring it here\"\r\t\theader _ String streamContents: [:strm | strm nextPutAll: self name;\r\t\t\tnextPutAll: ' commentStamp: '.\r\t\t\taStamp storeOn: strm.\r\t\t\tstrm nextPutAll: ' prior: '; nextPutAll: ptr printString].\r\t\tfile nextChunkPut: header]]].\rself organization classComment: (RemoteString newString: aString onFileNumber: 2) stamp: aStamp.\rSystemChangeNotifier uniqueInstance classCommented: self.\r! !\r!CompiledMethod methodsFor: 'source code management' stamp: 'dmu 9/7/2010 14:23'!\rputSource: sourceStr fromParseNode: methodNode inFile: fileIndex withPreamble: preambleBlock\r\"Store the source code for the receiver on an external file.\rIf no sources are available, i.e., SourceFile is nil, then store\rtemp names for decompilation at the end of the method.\rIf the fileIndex is 1, print on *.sources;  if it is 2, print on *.changes,\rin each case, storing a 4-byte source code pointer at the method end.\"\r\r| file remoteString  st80str |\r(SourceFiles == nil or: [(file _ SourceFiles at: fileIndex) == nil]) ifTrue:\r\t[^ self become: (self copyWithTempNames: methodNode tempNames)].\r\rSmalltalkImage current assureStartupStampLogged.\rfile safelyDo: [\r\tfile setToEnd.\r\r\tpreambleBlock value: file.  \"Write the preamble\"\r\t(methodNode isKindOf: DialectMethodNode)\r\t\tifTrue:\r\t\t[\"This source was parsed from an alternate syntax.\r\t\tWe must convert to ST80 before logging it.\"\r\t\tst80str _ (DialectStream dialect: #ST80 contents: [:strm | methodNode printOn: strm])\r\t\t\t\t\t\tasString.\r\t\tremoteString _ RemoteString newString: st80str\r\t\t\t\t\t\tonFileNumber: fileIndex toFile: file]\r\t\tifFalse:\r\t\t[remoteString _ RemoteString newString: sourceStr\r\t\t\t\t\t\tonFileNumber: fileIndex toFile: file].\r\r\tfile nextChunkPut: ' '.\r\tInMidstOfFileinNotification signal ifFalse: [file flush].\r\tself checkOKToAdd: sourceStr size at: remoteString position.\r\tself setSourcePosition: remoteString position inFile: fileIndex\r]! !\r!SystemDictionary methodsFor: 'sources, change log' stamp: 'dmu 9/7/2010 14:26'!\rwriteRecentCharacters: nCharacters toFileNamed: aFilename\r\"Schedule an editable text view on the last n characters of changes.\"\r| changes |\rchanges _ SourceFiles at: 2.\rchanges safelyDo: [\r\tchanges setToEnd; skip: nCharacters negated.\r\t(FileStream newFileNamed: aFilename) nextPutAll: (changes next: nCharacters); close; open; edit\r]! !\r!SmalltalkImage methodsFor: 'sources, changes log' stamp: 'dmu 9/7/2010 14:25'!\rlogChange: aStringOrText \r\"Write the argument, aString, onto the changes file.\"\r| aString changesFile |\r(SourceFiles isNil or: [(SourceFiles at: 2) == nil]) ifTrue: [^ self].\rself assureStartupStampLogged.\r\raStringOrText isText\r\tifTrue: [aString _ aStringOrText string]\r\tifFalse: [aString _ aStringOrText].\r(aString isMemberOf: String)\r\tifFalse: [self error: 'can''t log this change'].\r(aString findFirst: [:char | char isSeparator not]) = 0\r\tifTrue: [^ self].  \"null doits confuse replay\"\r(changesFile _ SourceFiles at: 2).\rchangesFile isReadOnly ifTrue:[^self].\rchangesFile safelyDo: [\r\tchangesFile setToEnd; cr; cr.\r\tchangesFile nextChunkPut: aString.\r\t\t\"If want style changes in DoIt, use nextChunkPutWithStyle:, and allow Texts to get here\"\r\tself forceChangesToDisk.\r]! !\r!SmalltalkImage methodsFor: 'sources, changes log' stamp: 'dmu 9/7/2010 14:25'!\rassureStartupStampLogged\r\"If there is a startup stamp not yet actually logged to disk, do it now.\"\r| changesFile |\rStartupStamp ifNil: [^ self].\r(SourceFiles isNil or: [(changesFile _ SourceFiles at: 2) == nil]) ifTrue: [^ self].\rchangesFile isReadOnly ifTrue:[^self].\rchangesFile safelyDo: [\r\tchangesFile setToEnd; cr; cr.\r\tchangesFile nextChunkPut: StartupStamp asString; cr.\r\tStartupStamp _ nil.\r\tself forceChangesToDisk.\r]! !\r!ChangeList class methodsFor: 'public access' stamp: 'dmu 9/7/2010 14:16'!\rgetRecentLocatorWithPrompt: aPrompt\r\"Prompt with a menu of how far back to go.  Return nil if user backs out.  Otherwise return the number of characters back from the end of the .changes file the user wishes to include\"\r \"ChangeList getRecentPosition\"\r| end changesFile banners positions pos chunk i |\rchangesFile _ (SourceFiles at: 2) readOnlyCopy.\rbanners _ OrderedCollection new.\rpositions _ OrderedCollection new.\rchangesFile safelyDo: [\r\tend _ changesFile size.\r\tpos _ SmalltalkImage current lastQuitLogPosition.\r\t[pos = 0 or: [banners size > 20]] whileFalse:\r\t\t[\r\t\tchangesFile position: pos.\r\t\tchunk _ changesFile nextChunk.\r\t\ti _ chunk indexOfSubCollection: 'priorSource: ' startingAt: 1.\r\t\ti > 0 ifTrue: [positions addLast: pos.\r\t\t\t\t\tbanners addLast: (chunk copyFrom: 5 to: i-2).\r\t\t\t\t\tpos _ Number readFrom: (chunk copyFrom: i+13 to: chunk size)]\r\t\t\tifFalse: [pos _ 0]].\r\tchangesFile close.\r\tpos _ (SelectionMenu labelList: banners selections: positions)\r\t\t\t\tstartUpWithCaption: aPrompt.\r\tpos == nil ifTrue: [^ nil].\r\t^ end - pos\r]! !\r!ClassCommentVersionsBrowser methodsFor: 'basic function' stamp: 'dmu 9/7/2010 14:16'!\rscanVersionsOf: class \r\"Scan for all past versions of the class comment of the given class\"\r\r| oldCommentRemoteStr sourceFilesCopy position prevPos stamp preamble tokens prevFileIndex |\r\rclassOfMethod _ class.\roldCommentRemoteStr _ class  organization commentRemoteStr.\rcurrentCompiledMethod _ oldCommentRemoteStr.\rselectorOfMethod _ #Comment.\rchangeList _ OrderedCollection new.\rlist _ OrderedCollection new.\rlistIndex _ 0.\roldCommentRemoteStr ifNil:[^ nil] ifNotNil: [oldCommentRemoteStr sourcePointer].\r\rsourceFilesCopy _ SourceFiles collect:\r\t[:x | x isNil ifTrue: [ nil ]\r\t\t\tifFalse: [x readOnlyCopy]].\rposition _ oldCommentRemoteStr position.\rfile _ sourceFilesCopy at: oldCommentRemoteStr sourceFileNumber.\r[position notNil & file notNil]\r\twhileTrue: [\r\tfile position: (0 max: position-150).  \" Skip back to before the preamble\"\r\t[file position < (position-1)]  \"then pick it up from the front\"\r\t\twhileTrue: [preamble _ file nextChunk].\r\r\tprevPos _ nil.\r\tstamp _ ''.\r\t(preamble findString: 'commentStamp:' startingAt: 1) > 0\r\t\tifTrue: [tokens _ Scanner new scanTokens: preamble.\r\t\t\t(tokens at: tokens size-3) = #commentStamp:\r\t\t\tifTrue: [\"New format gives change stamp and unified prior pointer\"\r\t\t\t\t\tstamp _ tokens at: tokens size-2.\r\t\t\t\t\tprevPos _ tokens last.\r\t\t\t\t\tprevFileIndex _ sourceFilesCopy fileIndexFromSourcePointer: prevPos.\r\t\t\t\t\tprevPos _ sourceFilesCopy filePositionFromSourcePointer: prevPos]]\r\t\tifFalse: [\"The stamp get lost, maybe after a condenseChanges\"\r\t\t\t\tstamp _ '<historical>'].\r\tself addItem:\r\t\t\t(ChangeRecord new file: file position: position type: #classComment\r\t\t\t\t\tclass: class name category: nil meta: class stamp: stamp)\r\t\ttext: stamp , ' ' , class name , ' class comment'. \r\tprevPos = 0 ifTrue:[prevPos _ nil].\r\tposition _ prevPos.\r\tprevPos notNil \r\t\t\t\tifTrue:[file _ sourceFilesCopy at: prevFileIndex]].\rsourceFilesCopy do: [:x | x notNil ifTrue: [x close]].\rlistSelections _ Array new: list size withAll: false! !\r!ClassDescription methodsFor: 'fileIn/Out' stamp: 'dmu 9/7/2010 14:22'!\rprintMethodChunk: selector withPreamble: doPreamble on: outStream\r\tmoveSource: moveSource toFile: fileIndex\r\"Copy the source code for the method associated with selector onto the fileStream.  If moveSource true, then also set the source code pointer of the method.\"\r| preamble method oldPos newPos sourceFile endPos |\rdoPreamble \r\tifTrue: [preamble _ self name , ' methodsFor: ' ,\r\t\t\t\t(self organization categoryOfElement: selector) asString printString]\r\tifFalse: [preamble _ ''].\rmethod _ self methodDict at: selector.\r((method fileIndex = 0\r\tor: [(SourceFiles at: method fileIndex) == nil])\r\tor: [(oldPos _ method filePosition) = 0])\r\tifTrue:\r\t[\"The source code is not accessible.  We must decompile...\"\r\tpreamble size > 0 ifTrue: [outStream cr; nextPut: $!!; nextChunkPut: preamble; cr].\r\toutStream nextChunkPut: (self decompilerClass new decompile: selector\r\t\t\t\t\t\t\t\t\t\tin: self method: method) decompileString]\r\tifFalse:\r\t[sourceFile _ SourceFiles at: method fileIndex.\r\tsourceFile safelyDo: [\r\t\tsourceFile position: oldPos.\r\t\tpreamble size > 0 ifTrue:    \"Copy the preamble\"\r\t\t\t[outStream copyPreamble: preamble from: sourceFile].\r\t\t\"Copy the method chunk\"\r\t\tnewPos _ outStream position.\r\t\toutStream copyMethodChunkFrom: sourceFile.\r\t\tsourceFile skipSeparators.      \"[\" \"The following chunk may have ]style[\" \"]\"\r\t\tsourceFile peek == \"[\" $] ifTrue: [\r\t\t\toutStream cr; copyMethodChunkFrom: sourceFile].\r\t\tmoveSource ifTrue:    \"Set the new method source pointer\"\r\t\t\t[endPos _ outStream position.\r\t\t\tmethod checkOKToAdd: endPos - newPos at: newPos.\r\t\t\tmethod setSourcePosition: newPos inFile: fileIndex]]].\rpreamble size > 0 ifTrue: [outStream nextChunkPut: ' '].\r^ outStream cr! !\r!Parser methodsFor: '*Sly-expression types' stamp: 'dmu 9/16/2010 23:49'!\rensembleExpression\r\" %{ elements } => MessageNode(BraceNode asEnsembleOfElements).\"\r\r| elements locations loc more |\relements _ OrderedCollection new.\rlocations _ OrderedCollection new.\rself advance. \"swallow the %\"\rself advance.\rmore _ hereType ~~ #rightBrace.\r[more]\r\twhileTrue: \r\t\t[loc _ hereMark + requestorOffset.\r\t\tself expression\r\t\t\tifTrue: \r\t\t\t\t[elements addLast: parseNode.\r\t\t\t\tlocations addLast: loc]\r\t\t\tifFalse:\r\t\t\t\t[^self expected: 'Variable or expression'].\r\t\t(self match: #period)\r\t\t\tifTrue: [more _ hereType ~~ #rightBrace]\r\t\t\tifFalse: [more _ false]].\rparseNode _ BraceNode new elements: elements sourceLocations: locations.\r(self match: #rightBrace)\r\tifFalse: [^self expected: 'Period or right brace'].\r\rparseNode _ MessageNode new\r\t\t\treceiver: parseNode\r\t\t\tselector: #asEnsembleOfElements\r\t\t\targuments: #()\r\t\t\tprecedence: 1  \"unary\"\r\t\t\tfrom: encoder\r\t\t\tsourceRange: (self startOfNextToken to: self endOfLastToken).\r^true! !\r!Parser methodsFor: '*Sly' stamp: 'dmu 8/30/2010 09:42'!\rexpression\r\"Modified for Sly ensemble literals\"\r(hereType == #word and: [tokenType == #leftArrow])\r\tifTrue: [^ self assignment: self variable].\rhereType == #percent\r\tifTrue: [self ensembleExpression]\r\tifFalse:[\r\t\thereType == #leftBrace\r\t\t\tifTrue: [self braceExpression]\r\t\t\tifFalse: [self primaryExpression ifFalse: [^ false]]].\r(self messagePart: 3 repeat: true)\r\tifTrue: [hereType == #semicolon ifTrue: [self cascade]].\r^ true! !\r!Parser methodsFor: '*Sly-expression types' stamp: 'dmu 9/12/2010 23:49'!\rmessagePart: level repeat: repeat\r\"Changed to support RVM multicore coordinates and  Sly selectors\"\r| start receiver selector args precedence words keywordStart |\r[receiver _ parseNode.\r(hereType == #keyword and: [level >= 3])\r\tifTrue: \r\t\t[start _ self startOfNextToken.\r\t\tselector _ WriteStream on: (String new: 32).\r\t\targs _ OrderedCollection new.\r\t\twords _ OrderedCollection new.\r\t\t[hereType == #keyword]\r\t\t\twhileTrue: \r\t\t\t\t[keywordStart _ self startOfNextToken + requestorOffset.\r\t\t\t\tselector nextPutAll: self advance.\r\t\t\t\twords addLast: (keywordStart to: self endOfLastToken + requestorOffset).\r\t\t\t\tself primaryExpression ifFalse: [^self expected: 'Argument'].\r\t\t\t\tself messagePart: 2 repeat: true.\r\t\t\t\targs addLast: parseNode].\r\t\t(Symbol hasInterned: selector contents ifTrue: [ :sym | selector _ sym])\r\t\t\tifFalse: [ selector _ ((RVMTester ifNil: [false] ifNotNil: [RVMTester isMulticoreCoordinate: selector contents]) or:[Sly3AbstractModifier isSlySelector: selector contents])\r\t\t\t\t\t\t\t\t ifTrue:[selector contents asSymbol]\r\t\t\t\t\t\t\t\tifFalse:[self correctSelector: selector contents\r\t\t\t\t\t\t\t\t\twordIntervals: words\r\t\t\t\t\t\t\t\t\texprInterval: (start to: self endOfLastToken)\r\t\t\t\t\t\t\t\t\tifAbort: [ ^ self fail ] ]].\r\t\tprecedence _ 3]\r\tifFalse: [((hereType == #binary or: [hereType == #verticalBar])\r\t\t\tand: [level >= 2])\r\t\t\tifTrue: \r\t\t\t\t[start _ self startOfNextToken.\r\t\t\t\tselector _ self advance asSymbol.\r\t\t\t\tself primaryExpression ifFalse: [^self expected: 'Argument'].\r\t\t\t\tself messagePart: 1 repeat: true.\r\t\t\t\targs _ Array with: parseNode.\r\t\t\t\tprecedence _ 2]\r\t\t\tifFalse: [hereType == #word\r\t\t\t\t\tifTrue: \r\t\t\t\t\t\t[start _ self startOfNextToken.\r\t\t\t\t\t\tselector _ self advance.\r\t\t\t\t\t\targs _ #().\r\t\t\t\t\t\twords _ OrderedCollection with: (start  + requestorOffset to: self endOfLastToken + requestorOffset).\r\t\t\t\t\t\t(Symbol hasInterned: selector ifTrue: [ :sym | selector _ sym])\r\t\t\t\t\t\t\tifFalse: [ selector _  ((RVMTester isMulticoreCoordinate: selector contents) or:[Sly3AbstractModifier isSlySelector: selector contents])\r\t\t\t\t\t\t\t\t ifTrue:[selector contents asSymbol]\r\t\t\t\t\t\t\t\tifFalse:[self correctSelector: selector\r\t\t\t\t\t\t\t\t\t\t\t\twordIntervals: words\r\t\t\t\t\t\t\t\t\t\t\t\texprInterval: (start to: self endOfLastToken)\r\t\t\t\t\t\t\t\t\t\t\t\tifAbort: [ ^ self fail ] ]].\r\t\t\t\t\t\tprecedence _ 1]\r\t\t\t\t\tifFalse: [^args notNil]]].\rparseNode _ MessageNode new\r\t\t\treceiver: receiver\r\t\t\tselector: selector\r\t\t\targuments: args\r\t\t\tprecedence: precedence\r\t\t\tfrom: encoder\r\t\t\tsourceRange: (start to: self endOfLastToken).\rrepeat]\r\twhileTrue: [].\r^true! !\r!Parser methodsFor: 'expression types' stamp: 'dmu 8/30/2010 09:49'!\rprimaryExpression \r\"Added Sly ensembleExpression type\"\rhereType == #word \r\tifTrue: \r\t\t[parseNode _ self variable.\r\t\t(parseNode isUndefTemp and: [self interactive])\r\t\t\tifTrue: [self queryUndefined].\r\t\tparseNode nowHasRef.\r\t\t^ true].\rhereType == #leftBracket\r\tifTrue: \r\t\t[self advance.\r\t\tself blockExpression.\r\t\t^true].\rhereType == #leftBrace\r\tifTrue: \r\t\t[self braceExpression.\r\t\t^true].\rhereType == #percent\r\tifTrue: \r\t\t[self ensembleExpression.\r\t\t^true].\rhereType == #leftParenthesis\r\tifTrue: \r\t\t[self advance.\r\t\tself expression ifFalse: [^self expected: 'expression'].\r\t\t(self match: #rightParenthesis)\r\t\t\tifFalse: [^self expected: 'right parenthesis'].\r\t\t^true].\r(hereType == #string or: [hereType == #number or: [hereType == #literal]])\r\tifTrue: \r\t\t[parseNode _ encoder encodeLiteral: self advance.\r\t\t^true].\r(here == #- and: [tokenType == #number])\r\tifTrue: \r\t\t[self advance.\r\t\tparseNode _ encoder encodeLiteral: self advance negated.\r\t\t^true].\r^false! !\r!CompiledMethod methodsFor: 'printing' stamp: 'dmu 9/7/2010 14:23'!\rtimeStamp\r\"Answer the authoring time-stamp for the given method, retrieved from the sources or changes file. Answer the empty string if no time stamp is available.\"\r\r\"(CompiledMethod compiledMethodAt: #timeStamp) timeStamp\"\r\r| position file preamble stamp tokens tokenCount |\rself fileIndex == 0 ifTrue: [^ String new].  \"no source pointer for this method\"\rposition _ self filePosition.\rfile _ SourceFiles at: self fileIndex.\rfile ifNil: [^ String new].  \"sources file not available\"\r\"file does not exist happens in secure mode\"\rfile _ [file readOnlyCopy] on: FileDoesNotExistException do:[:ex| nil].\r\rfile ifNil: [^ String new].\rfile position: (0 max: position - 150).  \"Skip back to before the preamble\"\r\t[file position < (position - 1)]  \"then pick it up from the front\"\r\t\twhileTrue: [preamble _ file nextChunk].\r\tstamp _ String new.\r\ttokens _ (preamble findString: 'methodsFor:' startingAt: 1) > 0\r\t\tifTrue: [Scanner new scanTokens: preamble]\r\t\tifFalse: [Array new  \"ie cant be back ref\"].\r\t(((tokenCount _ tokens size) between: 7 and: 8) and: [(tokens at: tokenCount - 5) = #methodsFor:])\r\t\tifTrue:\r\t\t\t[(tokens at: tokenCount - 3) = #stamp:\r\t\t\t\tifTrue: [\"New format gives change stamp and unified prior pointer\"\r\t\t\t\t\t\tstamp _ tokens at: tokenCount - 2]].\r\t((tokenCount between: 5 and: 6) and: [(tokens at: tokenCount - 3) = #methodsFor:])\r\t\tifTrue:\r\t\t\t[(tokens at: tokenCount  - 1) = #stamp:\r\t\t\t\tifTrue: [\"New format gives change stamp and unified prior pointer\"\r\t\t\t\t\tstamp _ tokens at: tokenCount]].\rfile close.\r^ stamp\r! !\r!StandardSourceFileArray class methodsFor: 'initialize-release' stamp: 'dmu 9/7/2010 14:12'!\rinstall\r\"Replace SourceFiles by an instance of me with the standard sources and changes files.\rThis only works if SourceFiles is either an Array or an instance of this class\"\r\"StandardSourceFileArray install\"\rStandardFileStream resetAllInterlocks.\rSourceFiles _ self new initialize! !\r!Sly3 class methodsFor: 'accessing' stamp: 'dmu 9/7/2010 17:24'!\rserializeForDebugging\r^ SerializeForDebugging ifNil: [SerializeForDebugging _ false] ifNotNil: [SerializeForDebugging]! !\r!Sly3 class methodsFor: 'accessing' stamp: 'dmu 9/7/2010 17:25'!\rserializeForDebugging: aBool\rSerializeForDebugging _ aBool! !\r!Sly3 class methodsFor: 'user interfacing' stamp: 'dmu 9/7/2010 17:25'!\rserializeForDebuggingSwitch\r\"Sly3 serializeForDebuggingSwitch demo\"\r^RVMCheckBoxView on: self label: 'Serialize for debugging' \r\t\t\t\t\tcheckState: [Sly3 serializeForDebugging] \r\t\t\t\t\twhenChecked: [Sly3 serializeForDebugging:true] \r\t\t\t\t\twhenUnchecked: [Sly3 serializeForDebugging:false].! !\rObject subclass: #Sly3Graphics\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly3'!\rSly3Graphics class\rinstanceVariableNames: ''!\r!Sly3Graphics class methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:05'!\rclearScreen\rDisplay fillWhite! !\r!Sly3Graphics class methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:05'!\rdrawCircle: pt\rDisplay drawDot5At: pt! !\r!Sly3Graphics class methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:03'!\rdrawFrom: ptA to: ptB\rDisplay drawLineFrom: ptA to: ptB color: Color black! !\r!Sly3Graphics class methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:04'!\rdrawWhiteCircle: pt\rDisplay eraseDot5At: pt! !\r!Sly3Graphics class methodsFor: 'as yet unclassified' stamp: 'dmu 3/23/2010 00:02'!\reraseFrom: ptA to: ptB\rDisplay eraseLineFrom: ptA to: ptB color: Color black! !\r!Sly3aBoids methodsFor: 'no messages' stamp: 'dmu 9/8/2010 02:27'!\rboidClass ^ Sly3aBoid! !\rObject subclass: #Sly3Drawer\rinstanceVariableNames: 'flock'\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly3-Boids'!\rSly3Drawer subclass: #Sly3aDrawer\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly3-Boids'!\r!Sly3aDrawer methodsFor: 'no messages' stamp: 'dmu 9/8/2010 02:28'!\rgo\rProcessor thisProcess useOnlyMainCore. \"for bitblt efficiency\"\r[flock isDone] whileFalse: [flock boids serialLYdraw]! !\r!Sly3Boids methodsFor: 'as yet unclassified' stamp: 'dmu 9/8/2010 02:29'!\rdrawerClass ^ Sly3Drawer! !\r!Sly3aBoids methodsFor: 'as yet unclassified' stamp: 'dmu 9/8/2010 02:30'!\rdrawerClass ^ Sly3aDrawer! !\r!Sly3aBoids methodsFor: 'as yet unclassified' stamp: 'dmu 9/8/2010 03:03'!\rflockSize ^ 30! !\rObject subclass: #ParallelRandomBug\rinstanceVariableNames: ''\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'DMU-Tools'!\r!ParallelRandomBug class methodsFor: 'as yet unclassified' stamp: 'dmu 9/9/2010 00:13'!\rtest\r| numWorkers |\rnumWorkers _ 2.\r\r1 to: numWorkers do: [ :w |\r[ \r| tr |\rtr := Random new.\r\r10000 timesRepeat: [\r\r\t\t(tr next) < 0.0 ifTrue: [self error: 'neg'].\r\r].\r\r] fork\r].\r! !\r!Random methodsFor: 'private' stamp: 'sma 5/12/2000 12:28'!\rnextValue\r\"This method generates random instances of Integer \tin the interval\r0 to 16r7FFFFFFF. This method does NOT update the seed; repeated sends\ranswer the same value.\rThe algorithm is described in detail in 'Random Number Generators: \rGood Ones Are Hard to Find' by Stephen K. Park and Keith W. Miller \r(Comm. Asso. Comp. Mach., 31(10):1192--1201, 1988).\"\r\r| lo hi aLoRHi answer |\rhi _ (seed quo: q) asFloat.\rlo _ seed - (hi * q).  \" = seed rem: q\"  \raLoRHi _ (a * lo) - (r * hi).\ranswer _ (aLoRHi > 0.0)\r\tifTrue:  [aLoRHi]\r\tifFalse: [aLoRHi + m].\r^ answer! !\r!ParallelRandomBug class methodsFor: 'as yet unclassified' stamp: 'dmu 9/9/2010 00:28'!\rtest2\r| numWorkers randoms |\rnumWorkers _ 2.\rrandoms _ ( Array new: 2) collect: [:x|Random new].\r\r1 to: numWorkers do: [ :w |\r[ \r\r\r10000 timesRepeat: [\r\r\t\t((randoms at: w) next) < 0.0 ifTrue: [self error: 'neg'].\r\r].\r\r] copy fixTemps fork\r].\r! !\r!Sly3AbstractModifier methodsFor: 'testing' stamp: 'dmu 9/11/2010 16:58'!\risOperandDistributor ^ false! !\r!Sly3MessageParser methodsFor: 'testing' stamp: 'dmu 9/12/2010 20:16'!\risString: x\r^ x isKindOf: String! !\r!Sly3MessageParser methodsFor: 'testing' stamp: 'dmu 9/12/2010 20:17'!\risKeyword: x\r^ (self isString: x) and: [x last = $:]! !\r!Sly3MessageParser methodsFor: 'testing' stamp: 'dmu 9/12/2010 20:17'!\risModifier: x\r^ x isKindOf: Sly3AbstractModifier! !\r!Sly3MessageParser methodsFor: 'testing' stamp: 'dmu 9/12/2010 20:18'!\risDirect: x\r^ (self isModifier: x) and: [x isDirect]! !\r!Sly3MessageParser methodsFor: 'testing' stamp: 'dmu 9/12/2010 20:18'!\risIndirect: x\r^ (self isModifier: x) and: [x isIndirect]! !\r!Sly3MessageParser methodsFor: 'testing' stamp: 'dmu 9/12/2010 20:21'!\rnextOnesIn: aStream suchThat: testBlk\r| result |\rresult _ OrderedCollection new.\r[\r\t(aStream atEnd not and:  [testBlk value: aStream peek]) ifFalse: [^ result].\r\tresult addLast: aStream next\r] repeat! !\r!Sly3MessageParser methodsFor: 'testing' stamp: 'dmu 9/13/2010 00:03'!\risNonKeywordString: x\r^ (self isString: x) and: [x isEmpty or: [x last ~= $:]]! !\r!Sly3MessageParser methodsFor: 'assigning modifiers to arguments' stamp: 'dmu 9/12/2010 20:45'!\rbreakUnaryModifiersForArguments\r^ OrderedCollection with: (foldedFlatStringsAndModifiers select: [:x | x isKindOf: Sly3AbstractModifier])! !\r!Sly3MessageParser methodsFor: 'assigning modifiers to arguments' stamp: 'dmu 9/12/2010 20:54'!\rbreakModifiersForReceiverIn: s\r| rcvrDirectMods rcvrIndirectMods |\rrcvrDirectMods _ self nextOnesIn: s suchThat: [:x| self isDirect: x].\rrcvrIndirectMods _ self nextOnesIn: s suchThat: [:x| self isIndirect: x].\r^ rcvrDirectMods, rcvrIndirectMods! !\r!Sly3MessageParser methodsFor: 'assigning modifiers to arguments' stamp: 'dmu 9/12/2010 21:17'!\rbreakKeywordModifiersForArguments\r| s allOperandMods directsAndStrings argDirectMods argIndirectMods |\rs _ ReadStream on: foldedFlatStringsAndModifiers.\rallOperandMods _ OrderedCollection with: (self breakModifiersForReceiverIn: s).\r\t\t\t\t\t\r[s atEnd] whileFalse: [\r\tdirectsAndStrings _ self nextOnesIn: s suchThat: [:x| (self isDirect: x) or: [self isNonKeywordString: x]].\r\targDirectMods _ directsAndStrings select: [:x | self isDirect: x].\r\t(self isKeyword: s peek) ifFalse: [self error: 'expected keyword'].\r\ts next.\r\targIndirectMods _ self nextOnesIn: s suchThat: [:x | self isIndirect: x].\r\tallOperandMods addLast: argDirectMods, argIndirectMods.\r].\r^ allOperandMods! !\r!Sly3MessageParser methodsFor: 'dissecting selector' stamp: 'dmu 9/12/2010 21:02'!\rdissectSelectorIntoStringsAndModifiers: aString\r\"break up a sequence of characters that are part of a selector\"\r\"returns a collection of Strings and Sly3AbstractModifier s\"\r\"Examples:    snortLY -> adverb is snort selectorPart is empty\r\tsnortLYfoo -> adverb is snort selectorPart is foo\r\tfooSnortLY -> selector part is foo, adverb is Snort\"\r\t\r\"Sly3MessageParser new breakIntoStringsAndModifiers:  #serialLYRoundLYatRoundLY:atRoundLY:atRoundLY:atRoundLY:put:valueLY:\"\r\r| lastStart i parts modifierString foundSuffix end nextWord c endWord charAfterSuffixIndex pastModifierIndex |\rparts _ OrderedCollection new.\rlastStart _ 1.\ri _ 1.\r[i <= aString size]  whileTrue: [\r\tfoundSuffix _ nil.\r\tSly3AbstractModifier allUppercaseSuffixes do: [:suffix|\r\t\tend _ i + suffix size - 1.\r\t\t(aString size >= end  and: [ (aString copyFrom: i to: i + suffix size - 1) = suffix ])\r\t\t\tifTrue: [\r\t\t\t\tfoundSuffix ifNil: [foundSuffix _ suffix] ifNotNil: [self error: 'ambiguous']\r\t\t\t]\r\t].\r\tfoundSuffix ifNotNil: [\r\t\tcharAfterSuffixIndex _ i + foundSuffix size.\r\t\tmodifierString _ aString copyFrom: lastStart to: i - 1.\r\t\tparts addLast: (Sly3AbstractModifier instantiateSpecificFromBaseName: modifierString includingSuffix: foundSuffix).\r\t\tparts last isIndirect ifTrue: [\r\t\t\t((aString size >= charAfterSuffixIndex) and: [(aString at: charAfterSuffixIndex) = $:])\r\t\t\t\tifFalse: [self error: 'indirect modifier should have colon'].\r\t\t\t].\r\t\tpastModifierIndex _ charAfterSuffixIndex + (parts last isIndirect ifTrue: [1] ifFalse: [0]).\r\t\tlastStart _ i _ pastModifierIndex.\r\t\t] ifNil: [\r\t\t\tc _ aString at: i.\r\t\t\t(c isUppercase or: [c = $:]) ifTrue: [\r\t\t\t\tendWord _ c = $: ifTrue: [i] ifFalse: [i - 1].\r\t\t\t\tnextWord _ aString copyFrom: lastStart to: endWord. \r\t\t\t\tparts addLast: (\r\t\t\t\t\t(parts notEmpty and: [(parts last isKindOf: String) and: [parts last last ~= $:]]) ifFalse: [nextWord] ifTrue: [parts removeLast, nextWord ]).\r\t\t\t\tlastStart _ endWord + 1\r\t\t\t\t].\r\t\t\ti _ i + 1\r\t\t]\r\t].\rlastStart <= aString size ifTrue: [\r\tnextWord _ aString copyFrom: lastStart to: aString size.\r\tparts addLast: (\r\t\t(parts notEmpty and: [parts last isKindOf: String]) ifFalse: [nextWord] ifTrue: [parts removeLast, nextWord capitalized])].\r^ parts\r\t\t! !\r!Sly3MessageParser methodsFor: 'parsing' stamp: 'dmu 9/21/2010 00:23'!\raddDefaultModifiersTo:  allMods\r| r rcvr ms defaultClass ods addDefault |\rr _ OrderedCollection new.\rrcvr _ true.\rallMods do: [:mods | \r\tms _ mods copy.\r\tdefaultClass _ rcvr ifTrue: [Sly3Adverb defaultReceiverOperandDistributor] ifFalse: [Sly3Adverb defaultArgumentOperandDistributor].\r\tods _ mods select: [:x|x isOperandDistributor].\r\taddDefault _ ods isEmpty.\r\taddDefault ifTrue: [ms addFirst: defaultClass new].\r\t(rcvr and: [mods noneSatisfy:[:x| x isGerund]]) ifTrue: [ms addFirst: Sly3Gerund defaultGerund new].\r\tr addLast: ms.\r\trcvr _ false.\r].\r^ r! !\r!Sly3Gerund class methodsFor: 'as yet unclassified' stamp: 'dmu 9/12/2010 21:24'!\rdefaultGerund\r^Sly3ModEnsembling! !\r!Sly3Adverb class methodsFor: 'nil' stamp: 'dmu 9/19/2010 21:26'!\rdefaultReceiverOperandDistributor\r^Sly3ModSingly! !\r!Sly3Adverb class methodsFor: 'nil' stamp: 'dmu 9/12/2010 22:08'!\rdefaultArgumentOperandDistributor\r^Sly3ModWholly! !\rSly3MessageEvaluator class\rinstanceVariableNames: ''!\rSly3MessageParser class\rinstanceVariableNames: ''!\rSly3ParsedMessage class\rinstanceVariableNames: ''!\r!Debugger class methodsFor: 'opening' stamp: 'dmu 9/17/2010 12:00'!\ropenInterrupt: aString onProcess: interruptedProcess\r\t\"Open a notifier in response to an interrupt. An interrupt occurs when the user types the interrupt key (cmd-. on Macs, ctrl-c or alt-. on other systems) or when the low-space watcher detects that memory is low.\"\r\t| debugger |\r\t<primitive: 19> \"Simulation guard\"\r\tdebugger := self new.\r\tinterruptedProcess suspend.\r\tdebugger\r\t\tprocess: interruptedProcess\r\t\tcontroller: ((Smalltalk isMorphic not\r\t\t\t\tand: [ScheduledControllers activeControllerProcess == interruptedProcess])\r\t\t\t\t\tifTrue: [ScheduledControllers activeController])\r\t\tcontext: interruptedProcess suspendedContextWaitingIfNecessary.\r\tdebugger externalInterrupt: true.\r\rPreferences logDebuggerStackToFile ifTrue:\r[(aString includesSubString: 'Space') & \r\t(aString includesSubString: 'low') ifTrue: [\r\t\tSmalltalk logError: aString inContext: debugger interruptedContext to:'LowSpaceDebug.log']].\r\r^ debugger\r\topenNotifierContents: nil\r\tlabel: aString\r! !\r!Sly3Ensemble class methodsFor: 'as yet unclassified' stamp: 'dmu 9/16/2010 23:37'!\rwithMembersFrom: aCollection\r^ self new members: aCollection! !\r!Sly3Ensemble class methodsFor: 'as yet unclassified' stamp: 'dmu 9/16/2010 23:39'!\rwithSoleMember: anObject\r^ self withMembersFrom: {anObject}! !\r!Collection methodsFor: '*Sly3' stamp: 'dmu 9/16/2010 23:41'!\rasEnsembleOfElements\r^ Sly3Ensemble withMembersFrom: self! !\r!Object methodsFor: '*Sly3' stamp: 'dmu 9/16/2010 23:45'!\rasSingletonEnsemble\r^Sly3Ensemble withSoleMember: self! !\r!BlockContext methodsFor: '*Sly3' stamp: 'dmu 9/17/2010 10:58'!\rasSlyMemberProcess\r^ self copy fixTemps newProcess beSlyMemberProcess! !\r!ProcessorScheduler methodsFor: '*RVM' stamp: 'dmu 9/17/2010 11:02'!\ruserBackgroundPriority\r^ UserBackgroundPriority! !\r!Process methodsFor: '*Sly3' stamp: 'dmu 9/17/2010 11:12'!\rbeSlyMemberProcess\rself priority: Processor userBackgroundPriority.\rProcessor thisProcess addChild: self.\r^ self! !\r!ProcessorScheduler methodsFor: '*Sly3' stamp: 'dmu 9/17/2010 13:04'!\rsuspendMemberProcesses\rself memberProcesses do: [:p| p suspend]! !\r!ProcessorScheduler methodsFor: '*Sly3' stamp: 'dmu 9/17/2010 11:16'!\rmemberProcesses\r^Process allInstances select: [:proc | proc creatorEnsemble notNil]! !\r!ProcessorScheduler methodsFor: '*Sly3' stamp: 'dmu 9/17/2010 11:17'!\rterminateMemberProcesses\rself memberProcesses do: [:p| p terminate]! !\r!ProcessorScheduler methodsFor: '*Sly3' stamp: 'dmu 9/17/2010 12:18'!\rdebugMemberProcesses\rself suspendMemberProcesses.\rself memberProcesses do: [:p| p  debug]! !\r!Process methodsFor: '*Sly3' stamp: 'dmu 9/17/2010 11:57'!\rsynchronousSuspend\r\"In RVM, can suspend some other running process, and so after sending suspend, suspendedContext may still be nil.\"\r\"Send suspend and don't return till the process is really suspended\"\rself suspend.\r[self suspendedContext isNil] whileTrue.! !\r!Process methodsFor: '*Sly3' stamp: 'dmu 9/17/2010 11:59'!\rsuspendedContextWaitingIfNecessary\r\t\"In RVM, can suspend some other running process, and so after sending suspend, suspendedContext may still be nil.\"\r\r\t[self suspendedContext isNil] whileTrue.\r\t^ self suspendedContext! !\r!ParagraphEditor methodsFor: 'do-its' stamp: 'dmu 9/17/2010 12:00'!\rdebug: aCompiledMethod receiver: anObject in: evalContext\r\r\t| selector guineaPig debugger context |\r\tselector := evalContext isNil ifTrue: [#DoIt] ifFalse: [#DoItIn:].\r\tanObject class addSelectorSilently: selector withMethod: aCompiledMethod.\r\tguineaPig := evalContext isNil\r\t\tifTrue: [[anObject DoIt] newProcess]\r\t\tifFalse: [[anObject DoItIn: evalContext] newProcess].\r\tcontext := guineaPig suspendedContextWaitingIfNecessary.\r\tdebugger := Debugger new\r\tprocess: guineaPig\r\tcontroller: ((Smalltalk isMorphic not and: [ScheduledControllers inActiveControllerProcess])\r\t\t\tifTrue: [ScheduledControllers activeController]\r\t\t\tifFalse: [nil])\r\tcontext: context\r\tisolationHead: nil.\rdebugger openFullNoSuspendLabel: 'Debug it'.\r[debugger interruptedContext method == aCompiledMethod]\r\twhileFalse: [debugger send].\ranObject class basicRemoveSelector: selector! !\rView subclass: #StandardSystemView\rinstanceVariableNames: 'labelFrame labelText isLabelComplemented savedSubViews minimumSize maximumSize collapsedViewport expandedViewport labelBits windowBits bitsValid updatablePanes displayInterlock'\rclassVariableNames: 'CacheBits LabelStyle'\rpoolDictionaries: ''\rcategory: 'ST80-Support'!\r!StandardSystemView methodsFor: 'accessing' stamp: 'dmu 9/17/2010 12:22'!\rlabelFrame: anObject\r\"Set the value of labelFrame\"\r\rlabelFrame _ anObject! !\r!StandardSystemView methodsFor: 'accessing' stamp: 'dmu 9/17/2010 12:22'!\rlabelText: anObject\r\"Set the value of labelText\"\r\rlabelText _ anObject! !\r!StandardSystemView methodsFor: 'accessing' stamp: 'dmu 9/17/2010 12:22'!\risLabelComplemented\r\"Answer the value of isLabelComplemented\"\r\risLabelComplemented isNil ifTrue:[self isLabelComplemented: nil].\r^ isLabelComplemented! !\r!StandardSystemView methodsFor: 'accessing' stamp: 'dmu 9/17/2010 12:22'!\risLabelComplemented: anObject\r\"Set the value of isLabelComplemented\"\r\risLabelComplemented _ anObject! !\r!StandardSystemView methodsFor: 'accessing' stamp: 'dmu 9/17/2010 12:22'!\rsavedSubViews\r\"Answer the value of savedSubViews\"\r\rsavedSubViews isNil ifTrue:[self savedSubViews: nil].\r^ savedSubViews! !\r!StandardSystemView methodsFor: 'accessing' stamp: 'dmu 9/17/2010 12:22'!\rsavedSubViews: anObject\r\"Set the value of savedSubViews\"\r\rsavedSubViews _ anObject! !\r!StandardSystemView methodsFor: 'accessing' stamp: 'dmu 9/17/2010 12:22'!\rcollapsedViewport\r\"Answer the value of collapsedViewport\"\r\rcollapsedViewport isNil ifTrue:[self collapsedViewport: nil].\r^ collapsedViewport! !\r!StandardSystemView methodsFor: 'accessing' stamp: 'dmu 9/17/2010 12:22'!\rcollapsedViewport: anObject\r\"Set the value of collapsedViewport\"\r\rcollapsedViewport _ anObject! !\r!StandardSystemView methodsFor: 'accessing' stamp: 'dmu 9/17/2010 12:22'!\rexpandedViewport\r\"Answer the value of expandedViewport\"\r\rexpandedViewport isNil ifTrue:[self expandedViewport: nil].\r^ expandedViewport! !\r!StandardSystemView methodsFor: 'accessing' stamp: 'dmu 9/17/2010 12:22'!\rexpandedViewport: anObject\r\"Set the value of expandedViewport\"\r\rexpandedViewport _ anObject! !\r!StandardSystemView methodsFor: 'accessing' stamp: 'dmu 9/17/2010 12:22'!\rlabelBits\r\"Answer the value of labelBits\"\r\rlabelBits isNil ifTrue:[self labelBits: nil].\r^ labelBits! !\r!StandardSystemView methodsFor: 'accessing' stamp: 'dmu 9/17/2010 12:22'!\rlabelBits: anObject\r\"Set the value of labelBits\"\r\rlabelBits _ anObject! !\r!StandardSystemView methodsFor: 'accessing' stamp: 'dmu 9/17/2010 12:22'!\rwindowBits: anObject\r\"Set the value of windowBits\"\r\rwindowBits _ anObject! !\r!StandardSystemView methodsFor: 'accessing' stamp: 'dmu 9/17/2010 12:22'!\rbitsValid\r\"Answer the value of bitsValid\"\r\rbitsValid isNil ifTrue:[self bitsValid: nil].\r^ bitsValid! !\r!StandardSystemView methodsFor: 'accessing' stamp: 'dmu 9/17/2010 12:22'!\rbitsValid: anObject\r\"Set the value of bitsValid\"\r\rbitsValid _ anObject! !\r!StandardSystemView methodsFor: 'accessing' stamp: 'dmu 9/17/2010 12:22'!\rupdatablePanes: anObject\r\"Set the value of updatablePanes\"\r\rupdatablePanes _ anObject! !\r!StandardSystemView methodsFor: '*Sly3' stamp: 'dmu 9/17/2010 12:37'!\rdisplayInterlock\rdisplayInterlock ifNil: [self displayInterlock: Mutex new].\r^ displayInterlock! !\r!StandardSystemView methodsFor: '*Sly3' stamp: 'dmu 9/17/2010 12:24'!\rdisplayInterlock: aSemaphore\rdisplayInterlock _ aSemaphore! !\r!StandardSystemView methodsFor: 'displaying' stamp: 'dmu 9/17/2010 12:31'!\rdisplayEmphasized\r\"Display with label highlighted to indicate that it is active.\"\rself  critical: [\r\tself displayDeEmphasized; emphasize.\r\tisLabelComplemented _ true\r]! !\r!StandardSystemView methodsFor: 'displaying' stamp: 'dmu 9/17/2010 12:30'!\rdisplayDeEmphasized \r\"Display this view with emphasis off.\rIf windowBits is not nil, then simply BLT if possible,\r\tbut force full display for top window so color is preserved.\"\rself  critical: [\r\t(bitsValid and: [controller ~~ ScheduledControllers activeController])\r\t\tifTrue: [self lock.\r\t\t\t\twindowBits displayAt: self windowOrigin]\r\t\tifFalse: [Display deferUpdates: true.\r\t\t\t\tsuper display.\r\t\t\t\tDisplay deferUpdates: false; forceToScreen: self windowBox.\r\t\t\t\tCacheBits ifTrue: [self cacheBitsAsIs]]\r]\r! !\r!StandardSystemView methodsFor: '*Sly3' stamp: 'dmu 9/17/2010 12:37'!\rcritical: aBlock\r^self displayInterlock critical: aBlock! !\rObject subclass: #Mutex\rinstanceVariableNames: 'semaphore owner'\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly3'!\r!Mutex commentStamp: '<historical>'!\rA Mutex is a light-weight MUTual EXclusion object being used when two or more processes need to access a shared resource concurrently. A Mutex grants ownership to a single process and will suspend any other process trying to aquire the mutex while in use. Waiting processes are granted access to the mutex in the order the access was requested.\r\rInstance variables:\rsemaphore\t<Semaphore>\t\tThe (primitive) semaphore used for synchronization.\rowner\t\t<Process>\t\tThe process owning the mutex.!\r!Mutex methodsFor: 'initialize' stamp: 'das 11/3/2005 22:53'!\rinitialize\rsemaphore := Semaphore forMutualExclusion.! !\r!Mutex methodsFor: 'mutual exclusion' stamp: 'dmu 6/14/2010 16:16'!\rcritical: aBlock\r\"Evaluate aBlock protected by the receiver.\"\r| activeProcess |\ractiveProcess := Processor thisProcess.\ractiveProcess == owner ifTrue:[^aBlock value].\r^semaphore critical:[\r\towner := activeProcess.\r\taBlock ensure:[owner := nil]].! !\r!Mutex commentStamp: 'dmu 9/17/2010 12:34'!\rA Mutex is a light-weight MUTual EXclusion object being used when two or more processes need to access a shared resource concurrently. A Mutex grants ownership to a single process and will suspend any other process trying to aquire the mutex while in use. Waiting processes are granted access to the mutex in the order the access was requested.\r\rBrought in from Squeak 4.1 because we need it.\r\rInstance variables:\rsemaphore\t<Semaphore>\t\tThe (primitive) semaphore used for synchronization.\rowner\t\t<Process>\t\tThe process owning the mutex.!\r!StandardSystemView methodsFor: 'displaying' stamp: 'dmu 9/17/2010 12:42'!\remphasizeLabel\r\"Highlight the label.\"\rlabelFrame height = 0 ifTrue: [^ self].  \"no label\"\rself critical: [\r\tself displayLabelBackground: true.\r\tself displayLabelBoxes.\r\tself displayLabelText.\r]! !\r!StandardSystemView methodsFor: '*Sly3' stamp: 'dmu 9/17/2010 12:47'!\rresetDisplayInterlock\rself displayInterlock: nil! !\r!ControlManager methodsFor: 'displaying' stamp: 'dmu 9/17/2010 12:48'!\rrestore \r\"Clear the screen to gray and then redisplay all the scheduled views.  Try to be a bit intelligent about the view that wants control and not display it twice if possible.\"\r\rscheduledControllers first view uncacheBits.  \"assure refresh\"\rself unschedule: screenController; scheduleOnBottom: screenController.\rscreenController view window: Display boundingBox; displayDeEmphasized.\rself scheduledWindowControllers reverseDo:\r\t[:aController | aController view resetDisplayInterlock; displayDeEmphasized].\r! !\r!StandardSystemView methodsFor: 'label access' stamp: 'ssa 3/9/2010 12:49'!\rclosingGuardIcon\r\r^(ColorForm\rextent: 11@11\rdepth: 1\rfromArray: #( 0 520093696 1065353216 830472192 830472192 2143289344 2143289344 2143289344 2143289344 2143289344 0)\roffset: 0@0)\rcolorsFromArray: #(#(1.0 1.0 1.0)#(0.0 0.0 0.0)   )! !\r!StandardSystemView methodsFor: 'label access' stamp: ''!\rlabelColor\r\"Answer the color to use as the background for the receiver's label.  By default, this is the same as the background color of the window, but need not be.  7/16/96 sw\"\r\r^ self backgroundColor! !\r!StandardSystemView methodsFor: 'framing' stamp: 'ssa 1/1/1970 00:05'!\rinitialFrame\r    \"Find a plausible initial screen area for the receiver, taking into account user preference, the size needed, and other windows currently on the screen.  5/22/96 sw: let RealEstateAgent do it for us\"\r\r   | rect |\rrect _ Rectangle originFromUser: self initialExtent + (0@self labelHeight).\r^rect origin + (0@ self labelHeight) extent: self initialExtent\r\"RealEstateAgent initialFrameFor: self world: nil\"! !\r!StandardSystemView methodsFor: 'displaying' stamp: 'ssa 8/24/2009 07:49'!\rcacheBitsAsTwoTone\r^ false! !\r!StandardSystemView methodsFor: 'displaying' stamp: 'dmu 9/17/2010 12:42'!\rdeEmphasizeLabel\r\"Un-Highlight the label.\"\rlabelFrame height = 0 ifTrue: [^ self].  \"no label\"\rself critical: [\r\tself displayLabelBackground: false.\r\tself displayClosingGuardBoxIfNeeded.\r\tself displayLabelText.\r]! !\r!StandardSystemView methodsFor: 'displaying' stamp: 'ssa 3/9/2010 12:52'!\rdisplayClosingGuardBoxIfNeeded\r\"display closing guard active, if true\"\r\r| aRect |\rself controller preventClosing ifTrue:[\r\taRect _ self closeBoxFrame.\r\tself closingGuardIcon displayOn: Display at: aRect origin clippingBox: aRect rule: Form over fillColor: nil].\r! !\r!StandardSystemView methodsFor: 'displaying' stamp: 'ssa 3/9/2010 12:52'!\rdisplayLabelBackground: emphasized\r\"Clear or emphasize the inner region of the label\"\r| r1 r2 r3 c3 c2 c1 |\remphasized ifFalse:\r\t[\"Just clear the label if not emphasized\"\r\tDisplay fill: (self labelDisplayBox insetBy: 2) fillColor: self labelColor.\r\t^self displayClosingGuardBoxIfNeeded].\rr1 _ self labelDisplayBox insetBy: 2.\rr2 _ r1 insetBy: 0@2.\rr3 _ r2 insetBy: 0@3.\rc3 _ self labelColor.\rc2 _ c3 dansDarker.\rc1 _ c2 dansDarker.\rDisplay fill: r1 fillColor: c1.\rDisplay fill: r2 fillColor: c2.\rDisplay fill: r3 fillColor: c3.\r\r\"\tHere is the Mac racing stripe code\rstripes _ Bitmap with: (self labelColor pixelWordForDepth: Display depth)\r\t\t\t\twith: (Form black pixelWordForDepth: Display depth).\rself windowOrigin y even ifTrue: [stripes swap: 1 with: 2].\rDisplay fill: (self labelDisplayBox insetBy: 3) fillColor: stripes.\r\"! !\r!StandardSystemView methodsFor: 'displaying' stamp: 'ssa 3/9/2010 12:52'!\rdisplayLabelBoxes\r\"closeBox,closingGuard box growBox.\"\r| aRect smallRect backColor |\raRect _ self closeBoxFrame.\rbackColor _ self labelColor.\rDisplay fill: (aRect insetBy: -2) fillColor: backColor.\rDisplay fillBlack: aRect.\rDisplay fill: (aRect insetBy: 1) fillColor: backColor.\r\r\"display closing guard active, if true\"\rself displayClosingGuardBoxIfNeeded.\r\raRect _ self growBoxFrame.\rsmallRect _ aRect origin extent: 7@7.\rDisplay fill: (aRect insetBy: -2) fillColor: backColor.\raRect _ aRect insetOriginBy: 2@2 cornerBy: 0@0.\rDisplay fillBlack: aRect.\rDisplay fill: (aRect insetBy: 1) fillColor: backColor.\rDisplay fillBlack: smallRect.\rDisplay fill: (smallRect insetBy: 1) fillColor: backColor! !\r!StandardSystemView methodsFor: 'displaying' stamp: 'ssa 3/9/2010 15:41'!\rdisplayView\r\"Refer to the comment in View|displayView. \"\rlabelFrame height = 0 ifTrue: [^ self].  \"no label\"\rself displayBox width = labelFrame width ifFalse:\r\t[\"recompute label width when window changes size\"\r\tself setLabelRegion].\r(labelFrame align: labelFrame topLeft with: self windowOrigin)\r\tinsideColor: self labelColor;\r\tdisplayOn: Display.\rself displayClosingGuardBoxIfNeeded.\rself displayLabelText! !\r!StandardSystemView methodsFor: 'updating' stamp: 'ssa 8/21/2009 12:58'!\rsetUpdatablePanesFrom: getSelectors\r| aList aPane |\r\"Set my updatablePanes inst var to the list of panes which are list panes with the given get-list selectors.  Order is important here!!  Note that the method is robust in the face of panes not found, but a warning is printed in the transcript in each such case\"\r\raList _ OrderedCollection new.\rgetSelectors do:\r\t[:sel | aPane _ self subViewSatisfying:\r\t\t\t[:pane | ((pane isKindOf: PluggableListView) or:[pane isKindOf: MSWScrollBarView]) and: [pane getListSelector == sel]].\r\t\taPane\r\t\t\tifNotNil:\r\t\t\t\t[aList add: aPane]\r\t\t\tifNil:\r\t\t\t\t[Transcript cr; show: 'Warning: view ', sel, ' not found.']].\rupdatablePanes _ aList asArray! !\r!RVMAspectTrace class methodsFor: 'examples' stamp: 'dmu 9/17/2010 15:34'!\rexampleView8\r\"RVMAspectTrace exampleView8\"\r\r| traces |\rtraces _ OrderedCollection new.\rtraces add:(self  aspect: #numberOfRunningProcesses size: 100 color: Color random).\rRVMStripChartView openOnTraces: traces! !\r!SystemDictionary methodsFor: 'miscellaneous' stamp: 'dmu 9/17/2010 16:39'!\rhandleUserInterrupt\rPreferences cmdDotEnabled ifTrue:\r\t[Smalltalk isMorphic\r\t\tifTrue: []\r\t\tifFalse: [[ScheduledControllers interruptName: 'User Interrupt'] forkAt: Processor thisProcess priority + 1]]! !\r!Sly3OperandDistributor methodsFor: 'testing' stamp: 'dmu 9/19/2010 20:52'!\risOperandDistributor ^ true! !\r!Sly3OperandDistributor methodsFor: 'testing' stamp: 'dmu 9/19/2010 20:59'!\rshouldDisableEnsembleBehavior\r^ false! !\r!Sly3ModWholly methodsFor: 'as yet unclassified' stamp: 'dmu 9/22/2010 22:00'!\rdoNotDismember\r^ true! !\r!Sly3ModCollectionly methodsFor: 'result handling' stamp: 'dmu 9/22/2010 22:03'!\rputResultsIntoAnEnsemble\r^ false! !\r!Sly3ModWholly methodsFor: 'result handling' stamp: 'dmu 9/22/2010 22:03'!\rputResultsIntoAnEnsemble\r^ false! !\r!Sly3OperandDistributor methodsFor: 'result handling' stamp: 'dmu 9/22/2010 22:03'!\rputResultsIntoAnEnsemble\r^ true! !\r!Sly3MessageEvaluator methodsFor: 'accessing' stamp: 'dmu 9/22/2010 22:05'!\rputResultsIntoAnEnsemble\r^ putResultsIntoAnEnsemble! !\r!Debugger methodsFor: 'context stack (message list)' stamp: 'dmu 9/22/2010 22:17'!\rfullyExpandStack\r\"Expand the stack to include all of it, rather than the first four or five\rcontexts.\"\r\rself okToChange ifFalse: [^ self].\rself newStack: ( contextStackTop contextStackIn: interruptedProcess).\rself changed: #contextStackList! !\r!ContextPart methodsFor: 'debugger access' stamp: 'dmu 9/22/2010 22:18'!\rcontextStackIn: aProcess\r\"Answer an Array of the contexts on the receiver's sender chain.\"\r\r^self stackOfSize: 100000 in: aProcess! !\r!ContextPart methodsFor: 'debugger access' stamp: 'dmu 9/22/2010 22:38'!\rstackOfSize: limit  in: aProcess\r\"Answer an OrderedCollection of the top 'limit' contexts\r\ton the receiver's sender chain.\"\r\r| a stack cachedStackTop newLimit p assoc |\rstack _ OrderedCollection new.\rstack addLast: (a _ self).\rp _ aProcess.\r\"Ugh!! I ought to clean this up. -- dmu\"\r[ (assoc _ a senderOrSlyInvokerAndProcessIn: p) ~~ nil and: [stack size < limit]]\r\twhileTrue:\r\t\t[\r\t\ta _ assoc key.\r\t\tp _ assoc value.\r\t\ta hideFromDebugger ifFalse: [stack addLast: a].\r\t\ta cachesStack ifTrue: [cachedStackTop := a cachedStackTop]].\r^cachedStackTop == nil \r\tifTrue: [stack]\r\tifFalse:\r\t\t[newLimit := limit - stack size.\r\t\tnewLimit > 0\r\t\t\tifTrue: [stack addAllLast: (cachedStackTop stackOfSize: newLimit); yourself]\r\t\t\tifFalse: [stack]]! !\r!ContextPart methodsFor: 'debugger access' stamp: 'dmu 9/22/2010 22:29'!\rsenderOrSlyInvokerIn: aProcess\r\"Answer the context that sent the message that created the receiver.\"\r\"Follow up the process parent chain to the invoking ensemble process.\"\r\r^sender ifNotNil: [sender] ifNil: [self halt. aProcess parent ifNil: [nil] ifNotNil: [aProcess parent suspendedContext]]! !\r!ContextPart methodsFor: 'debugger access' stamp: 'dmu 9/22/2010 22:38'!\rsenderOrSlyInvokerAndProcessIn: aProcess\r\"Answer the context that sent the message that created the receiver.\"\r\"Follow up the process parent chain to the invoking ensemble process.\"\r^sender ifNotNil: [sender->aProcess] ifNil: [ aProcess parent ifNil: [nil] ifNotNil: [aProcess parent suspendedContext->aProcess parent]]! !\r!Sly3Ensemble methodsFor: 'membership' stamp: 'dmu 9/23/2010 13:05'!\radd: anObject\rmembers add: anObject! !\r!Sly3Ensemble methodsFor: 'membership' stamp: 'dmu 9/23/2010 13:05'!\rremove: anObject\rmembers remove: anObject! !\r!Sly3Ensemble methodsFor: 'membership' stamp: 'dmu 9/23/2010 13:06'!\rremove: anObject ifAbsent: blk\r^ members remove: anObject ifAbsent: blk! !\r!Sly3MessageEvaluator methodsFor: 'evaluating-modified' stamp: 'dmu 9/23/2010 16:26'!\rbuildOperandTuples\r| mems |\roperandTuples _ OrderedCollection new.\roperandTuples _ self operandTuplesForObject: message receiver membersOrNil: message members adverbs: message messageAdverbs operandTuplesSoFar: operandTuples.\rmessage arguments with: message argumentAdverbs do: [:arg :ads | \r\tmems _ arg collectionLY.\r\toperandTuples _ \r\t\tself operandTuplesForObject: arg \r\t\tmembersOrNil: mems \r\t\tadverbs: ads \r\t\toperandTuplesSoFar: operandTuples].\r^ operandTuples! !\r!Sly3MessageEvaluator methodsFor: 'evaluating-modified' stamp: 'dmu 9/23/2010 16:16'!\roperandTuplesForObject: operand membersOrNil: mems adverbs: ads operandTuplesSoFar: operandTuplesSoFar\r| ods operandTuplesIncludingThisOne | \r\"Return the factor by which to multiply the number of envelopes for this operand.\"\rods _ ads select: [:ad| ad isOperandDistributor].\roperandTuplesIncludingThisOne _ ods last extendOperandTuples: operandTuplesSoFar operand: operand membersOrNil: mems.\rods removeLast.\rods  reverseDo: [:operandDistributor | \r\toperandTuplesIncludingThisOne _ operandDistributor amendOperandTuples: operandTuplesIncludingThisOne\r].\r^ operandTuplesIncludingThisOne! !\r!Sly3ModWholly methodsFor: 'as yet unclassified' stamp: 'dmu 9/23/2010 14:46'!\rextendOperandTuples: operandTuplesSoFar operand: operand membersOrNil: operandMembers\r^ operandTuplesSoFar\r ifEmpty: [OrderedCollection with: (OrderedCollection with: operand)]\rifNotEmpty: [ operandTuplesSoFar collect: [:tuple | tuple copy addLast: operand; yourself]]! !\r!Sly3ModSingly methodsFor: 'as yet unclassified' stamp: 'dmu 9/24/2010 00:53'!\rextendOperandTuples: operandTuplesSoFar operand: operand membersOrNil: operandMembers\r|  mems |\rmems _ operandMembers ifNil: [OrderedCollection with: operand] ifNotNil: [operandMembers].\r^ operandTuplesSoFar\r ifEmpty: [operandMembers collect: [:m| OrderedCollection with: m]]\rifNotEmpty: [ \r\toperandTuplesSoFar size = mems size  ifFalse: [self error: 'mismatch in number'].\r\toperandTuplesSoFar with: mems collect: [:ot :m| ot copy addLast: m; yourself].\r\t]! !\r!Sly3ModSelectively methodsFor: 'as yet unclassified' stamp: 'dmu 9/23/2010 16:03'!\rextendOperandTuples: operandTuplesSoFar operand: operand membersOrNil: operandMembers\r| mems |\rmems _ operandMembers ifNil: [OrderedCollection with: operand] ifNotNil: [operandMembers].\r\r^ operandTuplesSoFar\r ifEmpty: [self error: 'cannot be used for receiver']\rifNotEmpty: [ \r\toperandTuplesSoFar size = mems size ifFalse: [self error: 'sizes'].\r\tmems _ mems copy asOrderedCollection.\r\toperandTuplesSoFar select: [:ot | mems removeFirst]\r]! !\r!Sly3ModRoundly methodsFor: 'as yet unclassified' stamp: 'dmu 9/23/2010 16:32'!\rextendOperandTuples: operandTuplesSoFar operand: operand membersOrNil: operandMembers\r| r mems |\rmems _ operandMembers ifNil: [OrderedCollection with: operand] ifNotNil: [operandMembers].\r^ operandTuplesSoFar\r ifEmpty: [mems asOrderedCollection collect: [:m| OrderedCollection with: m]]\rifNotEmpty: [ \r\tr _ OrderedCollection new.\r\t1 to: operandMembers size do: [:i |\r\t\tr addAll: (operandTuplesSoFar collect: [:t| t copy addLast: (mems at: i); yourself])..\r\t\t].\r\tr ]! !\r!Sly3ModDuplicatively methodsFor: 'as yet unclassified' stamp: 'dmu 9/24/2010 14:46'!\rextendOperandTuples: operandTuplesSoFar operand: operand membersOrNil: operandMembers\r| r mems |\rmems _ operandMembers ifNil: [OrderedCollection with: operand] ifNotNil: [operandMembers].\r^ operandTuplesSoFar\r ifEmpty: [operandMembers collect: [:m| OrderedCollection with: m copy]]\rifNotEmpty: [ \r\toperandTuplesSoFar size = mems size ifFalse: [self error: 'mismatch in number'].\r\tr _ OrderedCollection new.\r\toperandTuplesSoFar with: mems do: [:ot :m| r addLast: (ot copy addLast: m copy; yourself)].\r\tr]! !\r!Sly3ModCollectionly methodsFor: 'as yet unclassified' stamp: 'dmu 9/23/2010 16:01'!\rextendOperandTuples: operandTuplesSoFar operand: operand membersOrNil: operandMembers\r| mems |\rmems _ operandMembers ifNil: [operand] ifNotNil: [operandMembers].\r^ operandTuplesSoFar\r ifEmpty: [OrderedCollection with: (OrderedCollection with: mems)]\rifNotEmpty: [ operandTuplesSoFar collect: [:tuple | tuple copy addLast: mems; yourself]]! !\r!Sly3ModValuely methodsFor: 'multiple adverb support' stamp: 'dmu 9/24/2010 14:48'!\rextendOperandTuples: operandTuplesSoFar operand: operand membersOrNil: operandMembers\r| r mems |\rmems _ operandMembers ifNil: [OrderedCollection with: operand] ifNotNil: [operandMembers].\r\r^ operandTuplesSoFar\r ifEmpty: [mems collect: [:m| OrderedCollection with: (parameter value: m)]]\rifNotEmpty: [ \r\toperandTuplesSoFar size = mems size ifFalse: [self error: 'mismatch in number'].\r\tr _ OrderedCollection new.\r\toperandTuplesSoFar with: mems do: [:ot :m| r addLast: (ot copy addLast: (parameter value: m); yourself)].\r\tr]! !\r!Sly3ModRandomly methodsFor: 'multiple adverb support' stamp: 'dmu 9/24/2010 00:44'!\rextendOperandTuples: operandTuplesSoFar operand: operand membersOrNil: operandMembers\r| r mems |\rmems _ operandMembers ifNil: [OrderedCollection with: operand] ifNotNil: [operandMembers].\r\r^ operandTuplesSoFar\r ifEmpty: [\r\t(1 to: parameter) collect: [:m| OrderedCollection with: (mems atRandom: self randomNumberSource)]\r\t]\rifNotEmpty: [ \r\tr _ OrderedCollection new.\r\tparameter timesRepeat: [\r\t\tr addAll: (operandTuplesSoFar collect: [:t| t copy addLast: (mems atRandom: self randomNumberSource); yourself]).\r\t\t].\r\tr ]! !\r!Sly3ModWholly methodsFor: 'as yet unclassified' stamp: 'dmu 9/24/2010 00:47'!\ramendOperandTuples: operandTuplesIncludingThisOne\r| ens |\rens _ (operandTuplesIncludingThisOne collect: [:ot| ot last]) asEnsembleOfElements.\r^ operandTuplesIncludingThisOne collect: [:ot|\r\tot copy removeLast; addLast: ens; yourself]! !\r!Sly3ModSingly methodsFor: 'multiple adverb support' stamp: 'dmu 9/23/2010 15:10'!\ramendOperandTuples: operandTuplesIncludingThisOne\roperandTuplesIncludingThisOne size > 1 ifTrue: [^ self error: 'what?'].\r^ operandTuplesIncludingThisOne first last members collect: [:m|\r\t\toperandTuplesIncludingThisOne first copy addLast: m; yourself\r\t\t]! !\r!Sly3ModSelectively methodsFor: 'as yet unclassified' stamp: 'dmu 9/23/2010 15:12'!\ramendOperandTuples: operandTuplesIncludingThisOne\rself error: 'unimp'! !\r!Sly3ModRoundly methodsFor: 'as yet unclassified' stamp: 'dmu 9/23/2010 15:14'!\ramendOperandTuples: operandTuplesIncludingThisOne\r| mems r |\rmems _ operandTuplesIncludingThisOne collect: [:tup | tup last].\rr _ OrderedCollection new.\roperandTuplesIncludingThisOne do: [:ot|\r\tmems do: [:m|\r\t\tr add: (ot copy removeLast; addLast: m; yourself)\r\t]\r].\r^ r! !\r!Sly3ModDuplicatively methodsFor: 'as yet unclassified' stamp: 'dmu 9/23/2010 15:15'!\ramendOperandTuples: operandTuplesIncludingThisOne\r^ operandTuplesIncludingThisOne collect: [:ot| ot copy removeLast; addLast: ot last copy; yourself]! !\r!Sly3ModCollectionly methodsFor: 'multiple adverb support' stamp: 'dmu 9/24/2010 00:46'!\ramendOperandTuples: operandTuplesIncludingThisOne\r| ens |\rens _ (operandTuplesIncludingThisOne collect: [:ot| ot last]).\r^ operandTuplesIncludingThisOne collect: [:ot|\r\tot copy removeLast; addLast: ens; yourself]! !\r!Sly3ModValuely methodsFor: 'multiple adverb support' stamp: 'dmu 9/23/2010 15:16'!\ramendOperandTuples: operandTuplesIncludingThisOne\rself error: 'unimp'! !\r!Sly3ModRandomly methodsFor: 'multiple adverb support' stamp: 'dmu 9/23/2010 15:16'!\ramendOperandTuples: operandTuplesIncludingThisOne\rself error: 'unimp'! !\r!Sly3MessageEvaluator methodsFor: 'evaluating-modified' stamp: 'dmu 9/23/2010 15:54'!\rcalculatePutResultsIntoAnEnsemble\r((message messageAdverbs select: [:mm| mm isOperandDistributor]) anySatisfy: [:m | m putResultsIntoAnEnsemble])\r\tifTrue: [^ true].\r^ message argumentAdverbs anySatisfy: [:aa|\r\t(aa select: [:mm| mm isOperandDistributor]) anySatisfy: [:m | m putResultsIntoAnEnsemble]\r\t]\r! !\r!Sly3MessageEvaluator methodsFor: 'as yet unclassified' stamp: 'dmu 9/24/2010 00:35'!\rsetDisableEnsembleBehaviorFlags\r| deactivateEnsembleBehaviorFlags |\rdeactivateEnsembleBehaviorFlags _ ((OrderedCollection with: message messageAdverbs) addAll: message argumentAdverbs; yourself)\r\tcollect: [:adverbs | adverbs anySatisfy: [:adverb| adverb isOperandDistributor and: [adverb shouldDisableEnsembleBehavior]]].\renvelopes do: [:e|e deactivateEnsembleBehaviorFlags: deactivateEnsembleBehaviorFlags]! !\r!Object methodsFor: 'private' stamp: 'yo 6/29/2004 11:37'!\rerrorNotIndexable\r\"Create an error notification that the receiver is not indexable.\"\r\rself error: ('Instances of {1} are not indexable' translated format: {self class name})! !\r!Object methodsFor: 'private' stamp: ''!\rerrorSubscriptBounds: index \r\"Create an error notification that an improper integer was used as an index.\"\r\rself error: 'subscript is out of bounds: ' , index printString! !\r!RVMTester class methodsFor: 'primitives' stamp: 'dmu 10/1/2010 19:59'!\rprintObjectForVMDebugging: obj\r\"self printObjectForVMDebugging: 3@4\"\r<primitive: 'primitivePrintObjectForVMDebugging' module: 'RVMPlugin'>! !\rSly3AbstractModifier class\rinstanceVariableNames: ''!\rSly3Adverb class\rinstanceVariableNames: ''!\rSly3Gerund class\rinstanceVariableNames: ''!\r!Sly3AbstractIndirectOperandDistributor methodsFor: 'accessing' stamp: 'dmu 9/4/2010 23:01'!\risIndirect\r^ true! !\r!Sly3AbstractIndirectOperandDistributor methodsFor: 'accessing' stamp: 'dmu 9/4/2010 23:00'!\rparameter\r\"Answer the value of parameter\"\r\rparameter isNil ifTrue:[self parameter: nil].\r^ parameter! !\r!Sly3AbstractIndirectOperandDistributor methodsFor: 'accessing' stamp: 'dmu 9/4/2010 23:00'!\rparameter: anObject\r\"Set the value of parameter\"\r\rparameter _ anObject! !\r!Sly3ModCollectionly commentStamp: 'dmu 9/3/2010 16:55'!\rUse members collection of the ensemble!\r!Sly3ModDuplicatively commentStamp: 'dmu 9/1/2010 15:58'!\reach member gets a copy of the arguments!\r!Sly3ModRoundly commentStamp: 'dmu 9/1/2010 15:58'!\rdistribute args over members round-robin fashion, repeating members as needed.  Think of members here as a Resource Pool.  This will require collaboration with any message adverbs.!\r!Sly3ModSingly commentStamp: 'dmu 9/1/2010 15:57'!\rdistributed arguments one-to-one over members!\r!Sly3ModWholly commentStamp: 'dmu 9/1/2010 15:57'!\rbatch all args to each member with the message!\r!Sly3ModPlainly commentStamp: 'dmu 9/3/2010 14:28'!\rDisable all ensemble processing for the recursive duration of this send!\r!Mutex commentStamp: 'dmu 9/17/2010 12:34'!\rA Mutex is a light-weight MUTual EXclusion object being used when two or more processes need to access a shared resource concurrently. A Mutex grants ownership to a single process and will suspend any other process trying to aquire the mutex while in use. Waiting processes are granted access to the mutex in the order the access was requested.\r\rBrought in from Squeak 4.1 because we need it.\r\rInstance variables:\rsemaphore\t<Semaphore>\t\tThe (primitive) semaphore used for synchronization.\rowner\t\t<Process>\t\tThe process owning the mutex.!\rSly3EnsembleMirror class\rinstanceVariableNames: ''!\rMagnitude subclass: #MessageTally\rinstanceVariableNames: 'class method tally receivers senders time gcStats maxClassNameSize maxClassPlusSelectorSize maxTabs'\rclassVariableNames: 'DefaultPollPeriod ObservedProcess Timer'\rpoolDictionaries: ''\rcategory: 'Tools-Debugger'!\r!MessageTally commentStamp: 'nk 3/8/2004 12:43'!\rMy instances observe and report the amount of time spent in methods.\r\rNOTE: a higher-level user interface (combining the MessageTally result tree with a method browser) is available from TimeProfileBrowser.\r\rMessageTally provides two different strategies available for profiling:\r\r* spyOn: and friends use a high-priority Process to interrupt the block or process being spied on at periodic intervals. The interrupted call stack is then examined for caller information.\r\r* tallySends: and friends use the interpreter simulator to run the block, recording every method call.\r\rThe two give you different results:\r\r* spyOn: gives you a view of where the time is being spent in your program, at least on a rough statistical level (assuming you've run the block for long enough and have a high enough poll rate). If you're trying to optimize your code, start here and optimize the methods where most of the time is being spent first.\r\r* tallySends: gives you accurate counts of how many times methods get called, and by exactly which route. If you're debugging, or trying to figure out if a given method is getting called too many times, this is your tool.\r\rYou can change the printing format (that is, the whitespace and string compression) by using these instance methods: \rmaxClassNameSize:\rmaxClassPlusSelectorSize:\rmaxTabs:\r\rYou can change the default polling period (initially set to 1) by calling\rMessageTally defaultPollPeriod: numberOfMilliseconds\r\rQ: How do you interpret MessageTally>>tallySends\rA: The methods #tallySends and #spyOn: measure two very different quantities, but broken down in the same who-called-who format.  #spyOn: is approximate, but more indicative of real time spent, whereas #tallySends is exact and a precise record of how many times each method got executed.!\r!MessageTally commentStamp: 'nk 3/8/2004 12:43'!\rMy instances observe and report the amount of time spent in methods.\r\rNOTE: a higher-level user interface (combining the MessageTally result tree with a method browser) is available from TimeProfileBrowser.\r\rMessageTally provides two different strategies available for profiling:\r\r* spyOn: and friends use a high-priority Process to interrupt the block or process being spied on at periodic intervals. The interrupted call stack is then examined for caller information.\r\r* tallySends: and friends use the interpreter simulator to run the block, recording every method call.\r\rThe two give you different results:\r\r* spyOn: gives you a view of where the time is being spent in your program, at least on a rough statistical level (assuming you've run the block for long enough and have a high enough poll rate). If you're trying to optimize your code, start here and optimize the methods where most of the time is being spent first.\r\r* tallySends: gives you accurate counts of how many times methods get called, and by exactly which route. If you're debugging, or trying to figure out if a given method is getting called too many times, this is your tool.\r\rYou can change the printing format (that is, the whitespace and string compression) by using these instance methods: \rmaxClassNameSize:\rmaxClassPlusSelectorSize:\rmaxTabs:\r\rYou can change the default polling period (initially set to 1) by calling\rMessageTally defaultPollPeriod: numberOfMilliseconds\r\rQ: How do you interpret MessageTally>>tallySends\rA: The methods #tallySends and #spyOn: measure two very different quantities, but broken down in the same who-called-who format.  #spyOn: is approximate, but more indicative of real time spent, whereas #tallySends is exact and a precise record of how many times each method got executed.!\r!Sly3ModCollectionly commentStamp: 'dmu 9/3/2010 16:55'!\rUse members collection of the ensemble!\r!Sly3ModDuplicatively commentStamp: 'dmu 9/1/2010 15:58'!\reach member gets a copy of the arguments!\r!Sly3ModRoundly commentStamp: 'dmu 9/1/2010 15:58'!\rdistribute args over members round-robin fashion, repeating members as needed.  Think of members here as a Resource Pool.  This will require collaboration with any message adverbs.!\r!Sly3ModSingly commentStamp: 'dmu 9/1/2010 15:57'!\rdistributed arguments one-to-one over members!\r!Sly3ModWholly commentStamp: 'dmu 9/1/2010 15:57'!\rbatch all args to each member with the message!\r!Sly3ModPlainly commentStamp: 'dmu 9/3/2010 14:28'!\rDisable all ensemble processing for the recursive duration of this send!\r!Mutex commentStamp: 'dmu 9/17/2010 12:34'!\rA Mutex is a light-weight MUTual EXclusion object being used when two or more processes need to access a shared resource concurrently. A Mutex grants ownership to a single process and will suspend any other process trying to aquire the mutex while in use. Waiting processes are granted access to the mutex in the order the access was requested.\r\rBrought in from Squeak 4.1 because we need it.\r\rInstance variables:\rsemaphore\t<Semaphore>\t\tThe (primitive) semaphore used for synchronization.\rowner\t\t<Process>\t\tThe process owning the mutex.!\r!TranscriptStream methodsFor: 'Ly*' stamp: 'ssa 7/16/2010 17:06'!\rnextPutAll: stuff\rself showInConsole ifTrue:[stuff printConsole].\rsuper nextPutAll: stuff.\r! !\rMSWSystemView initialize!\rMSWScrollBarView initialize!\rJPEGReadStream initialize!\rJPEGReadWriter initialize!\rJPEGHuffmanTable initialize!\rGIFReadWriter initialize!\rCursor initialize!\rController initialize!\rDisplayText subclass: #Paragraph\rinstanceVariableNames: 'clippingRectangle compositionRectangle destinationForm rule mask marginTabsLevel lines lastLine destFormSema'\rclassVariableNames: ''\rpoolDictionaries: 'TextConstants'\rcategory: 'ST80-Support'!\r!BitBlt methodsFor: 'copying' stamp: 'ssa 4/7/2009 13:44'!\rOLDcopyBits\r\"Primitive. Perform the movement of bits from the source form to the \rdestination form. Fail if any variables are not of the right type (Integer, \rFloat, or Form) or if the combination rule is not implemented. \rIn addition to the original 16 combination rules, this BitBlt supports\r16\tfail (to simulate paint)\r17\tfail (to simulate mask)\r18\tsourceWord + destinationWord\r19\tsourceWord - destinationWord\r20\trgbAdd: sourceWord with: destinationWord\r21\trgbSub: sourceWord with: destinationWord\r22\trgbDiff: sourceWord with: destinationWord\r23\ttallyIntoMap: destinationWord\r24\talphaBlend: sourceWord with: destinationWord\r25\tpixPaint: sourceWord with: destinationWord\r26\tpixMask: sourceWord with: destinationWord\r27\trgbMax: sourceWord with: destinationWord\r28\trgbMin: sourceWord with: destinationWord\r29\trgbMin: sourceWord bitInvert32 with: destinationWord\r\"\r<primitive: 'primitiveCopyBits' module: 'BitBltPlugin'>\r\r\"Check for compressed source, destination or halftone forms\"\r(combinationRule >= 30 and: [combinationRule <= 31]) ifTrue:\r\t[\"No alpha specified -- re-run with alpha = 1.0\"\r\t^ self copyBitsTranslucent: 255].\r((sourceForm isForm) and: [sourceForm unhibernate])\r\tifTrue: [^ self copyBits].\r((destForm isForm) and: [destForm unhibernate])\r\tifTrue: [^ self copyBits].\r((halftoneForm isForm) and: [halftoneForm unhibernate])\r\tifTrue: [^ self copyBits].\r\r\"Check for unimplmented rules\"\rcombinationRule = Form oldPaint ifTrue: [^ self paintBits].\rcombinationRule = Form oldErase1bitShape ifTrue: [^ self eraseBits].\r\r\"Check if BitBlt doesn't support full color maps\"\r(colorMap notNil and:[colorMap isColormap]) ifTrue:[\r\tcolorMap _ colorMap colors.\r\t^self copyBits].\r\"Check if clipping gots us way out of range\"\rself clipRange ifTrue:[^self copyBits].\r\rself error: 'Bad BitBlt arg (Fraction?); proceed to convert.'.\r\"Convert all numeric parameters to integers and try again.\"\rdestX _ destX asInteger.\rdestY _ destY asInteger.\rwidth _ width asInteger.\rheight _ height asInteger.\rsourceX _ sourceX asInteger.\rsourceY _ sourceY asInteger.\rclipX _ clipX asInteger.\rclipY _ clipY asInteger.\rclipWidth _ clipWidth asInteger.\rclipHeight _ clipHeight asInteger.\r^ self copyBitsAgain! !\r!BitBlt methodsFor: 'copying' stamp: 'dmu 5/10/2009 08:43'!\rcopyBits\rRVMTester isRVM ifFalse:[^self OLDcopyBits].\rdestForm == Display  ifTrue: [self copyBitsOnMain] ifFalse: [self copyBitsLocally]! !\r!BitBlt methodsFor: 'line drawing' stamp: 'dmu 4/10/2009 22:47'!\rdrawFrom: startPoint to: stopPoint withFirstPoint: drawFirstPoint\r\"Draw a line whose end points are startPoint and stopPoint.\rThe line is formed by repeatedly calling copyBits at every\rpoint along the line.  If drawFirstPoint is false, then omit\rthe first point so as not to overstrike at line junctions.\"\r| offset point1 point2 forwards |\r\"Always draw down, or at least left-to-right\"\rforwards _ (startPoint y = stopPoint y and: [startPoint x < stopPoint x])\r\t\t\tor: [startPoint y < stopPoint y].\rforwards\r\tifTrue: [point1 _ startPoint. point2 _ stopPoint]\r\tifFalse: [point1 _ stopPoint. point2 _ startPoint].\rsourceForm == nil ifTrue:\r\t[destX _ point1 x.\r\tdestY _ point1 y]\r\tifFalse:\r\t[width _ sourceForm width.\r\theight _ sourceForm height.\r\toffset _ sourceForm offset.\r\tdestX _ (point1 x + offset x) rounded.\r\tdestY _ (point1 y + offset y) rounded].\r\r\"Note that if not forwards, then the first point is the last and vice versa.\rWe agree to always paint stopPoint, and to optionally paint startPoint.\"\r(drawFirstPoint or: [forwards == false  \"ie this is stopPoint\"])\r\tifTrue: [self copyBits].\r\t(destForm == Display or:[RVMTester isRVM not]) ifTrue: [\rself drawLoopX: (point2 x - point1 x) rounded \r\t\t\t  Y: (point2 y - point1 y) rounded]\r\t\tifFalse: [self drawLoopLocallyX: (point2 x - point1 x) rounded \r\t\t\t  Y: (point2 y - point1 y) rounded].\r(drawFirstPoint or: [forwards  \"ie this is stopPoint\"])\r\tifTrue: [self copyBits].\r! !\r!BitBlt methodsFor: 'line drawing' stamp: 'dmu 4/10/2009 22:47'!\rdrawLoopX: xDelta Y: yDelta \r\"Primitive. Implements the Bresenham plotting algorithm (IBM Systems\rJournal, Vol. 4 No. 1, 1965). It chooses a principal direction, and\rmaintains a potential, P. When P's sign changes, it is time to move in\rthe minor direction as well. This particular version does not write the\rfirst and last points, so that these can be called for as needed in client code.\rOptional. See Object documentation whatIsAPrimitive.\"\r\r\t^(destForm == Display  or:[RVMTester isRVM not])\r\t\tifTrue:[self globalDrawLoopX:xDelta Y: yDelta ]\r\t\tifFalse:[self localDrawLoopX:xDelta Y: yDelta ]! !\r!Paragraph methodsFor: 'RVM' stamp: 'dmu 6/15/2010 11:36'!\rdestFormSema: s\r\tdestFormSema := s! !\r!Paragraph methodsFor: 'private' stamp: 'dmu 4/1/2009 19:38'!\rcompositionRectangle: compositionRect text: aText style: aTextStyle offset: aPoint\r\r\tcompositionRectangle := compositionRect copy.\r\ttext := aText.\r\ttextStyle := aTextStyle.\r\trule := DefaultRule.\r\tmask := nil.\t\t\"was DefaultMask \"\r\tmarginTabsLevel := 0.\r\tdestFormSema := Semaphore forMutualExclusion.\r\tself destinationForm: Display.\r\toffset := aPoint.\r\t^self composeAll! !\r!Paragraph methodsFor: 'private' stamp: 'ssa 4/7/2009 12:39'!\rdisplayOn: aDisplayMedium lines: lineInterval\r\r| saveDestinationForm |\rdestFormSema isNil ifTrue:[self destFormSema: Semaphore forMutualExclusion].\rdestFormSema critical: [\r\tsaveDestinationForm _ destinationForm.\r\tself destinationForm: aDisplayMedium.\r\tself displayLines: lineInterval.\r\tdestinationForm _ saveDestinationForm\r]! !\rObject subclass: #Sly3Flock\rinstanceVariableNames: 'boids isDone'\rclassVariableNames: ''\rpoolDictionaries: ''\rcategory: 'Sly3-Boids'!\r!Debugger methodsFor: '*Ly' stamp: 'ssa 3/3/2010 22:53'!\rinstallListFontInto: aListView\r\r\"do nothing by default\"! !\r!Debugger methodsFor: '*Ly' stamp: 'smu 3/4/2010 10:26'!\rsetContextStackIndexFromLyIndex: anIndex\r\r| ctx n |\rctx _ contextStackTop.\rn _ 1.\r[ \r\tctx _ ctx firstContextContainingLyActivation. \r\tctx ifNil: [\r\t\tTranscript show: 'setContextStackIndexFromLyIndex: missing activation'; cr. \r\t\t^ self\r\t].\r\tn >= anIndex ifTrue: [\r\t\tself fullStack.\r\t\tself toggleContextStackIndex: (self contextStack indexOf: ctx).\r\t\t^ self\r\t].\r\tn _ n + 1.\r\tctx _ ctx sender.\r] repeat! !\r!Debugger methodsFor: '*Ly' stamp: 'ssa 3/3/2010 20:25'!\rsetContextStackIndexFromOtherIndex: anIndex otherTopContext: ctx\rself setContextStackIndexFromLyIndex: anIndex! !\r!Debugger methodsFor: 'initialize' stamp: 'ssa 3/3/2010 23:00'!\rbuildMVCDebuggerViewLabel: aString minSize: aPoint\r\"Build an MVC debugger view around the receiver, and return the StandardSystemView thus created.\"\r\r| topView stackListView stackCodeView rcvrVarView rcvrValView ctxtVarView ctxtValView deltaY underPane annotationPane buttonsView oldContextStackIndex |\r\roldContextStackIndex _ contextStackIndex.\rself expandStack. \"Sets contextStackIndex to zero.\"\rcontextStackIndex _ oldContextStackIndex.\rself contextVariablesInspector object: self selectedContext.\rself receiverInspector object: self receiver.\r\rtopView _ StandardSystemView new model: self.\rtopView borderWidth: 1.\rstackListView _ PluggableListView on: self\r\t\tlist: #contextStackList\r\t\tselected: #contextStackIndex\r\t\tchangeSelected: #toggleContextStackIndex:\r\t\tmenu: #contextStackMenu:shifted:\r\t\tkeystroke: #contextStackKey:from:.\r\tself installListFontInto: stackListView.\r\tstackListView menuTitleSelector: #messageListSelectorTitle.\r\tstackListView window: (0 @ 0 extent: 150 @ 50).\r\ttopView addSubView: stackListView.\rdeltaY _ 0.\r self wantsAnnotationPane\r\tifTrue:\r\t\t[annotationPane _ PluggableTextView on: self\r\t\t\ttext: #annotation accept: nil readSelection: nil menu: nil.\r\t\tannotationPane window: (0@0 extent: 150@self optionalAnnotationHeight).\r\t\ttopView addSubView: annotationPane below: stackListView.\r\t\tdeltaY _ deltaY + self optionalAnnotationHeight.\r\t\tunderPane _ annotationPane]\r\tifFalse:\r\t\t[underPane _ stackListView].\rself wantsOptionalButtons\r\tifTrue:\r\t\t[buttonsView _ self buildMVCOptionalButtonsButtonsView.\r\t\tbuttonsView borderWidth: 1.\r\t\ttopView addSubView: buttonsView below: underPane.\r\t\tunderPane _ buttonsView.\r\t\tdeltaY _ deltaY + self optionalButtonHeight].\rstackCodeView _ self codeView.\r\tstackCodeView window: (0 @ 0 extent: 150 @ (75 - deltaY)).\r\ttopView addSubView: stackCodeView below: underPane.\rrcvrVarView _ PluggableListView on: self receiverInspector\r\t\tlist: #fieldList\r\t\tselected: #selectionIndex\r\t\tchangeSelected: #toggleIndex:\r\t\tmenu: #fieldListMenu:\r\t\tkeystroke: #inspectorKey:from:.\r\tself installListFontInto: rcvrVarView.\r\trcvrVarView window: (0 @ 0 extent: 25 @ (50 - deltaY)).\r\ttopView addSubView: rcvrVarView below: stackCodeView.\rrcvrValView _ PluggableTextView on: self receiverInspector\r\t\ttext: #contents accept: #accept:\r\t\treadSelection: #contentsSelection menu: #codePaneMenu:shifted:.\r\trcvrValView window: (0 @ 0 extent: 50 @ (50 - deltaY)).\r\ttopView addSubView: rcvrValView toRightOf: rcvrVarView.\rctxtVarView _ PluggableListView on: self contextVariablesInspector\r\t\tlist: #fieldList\r\t\tselected: #selectionIndex\r\t\tchangeSelected: #toggleIndex:\r\t\tmenu: #fieldListMenu:\r\t\tkeystroke: #inspectorKey:from:.\r\tself installListFontInto: ctxtVarView.\r\tctxtVarView window: (0 @ 0 extent: 25 @ (50 - deltaY)).\r\ttopView addSubView: ctxtVarView toRightOf: rcvrValView.\rctxtValView _ PluggableTextView on: self contextVariablesInspector\r\t\ttext: #contents accept: #accept:\r\t\treadSelection: #contentsSelection menu: #codePaneMenu:shifted:.\r\tctxtValView window: (0 @ 0 extent: 50 @ (50 - deltaY)).\r\ttopView addSubView: ctxtValView toRightOf: ctxtVarView.\rtopView label: aString.\rtopView minimumSize: aPoint.\r^ topView ! !\r!Debugger methodsFor: 'initialize' stamp: 'ssa 3/3/2010 22:55'!\rbuildMVCNotifierViewLabel: aString message: messageString minSize: aPoint\r\r| topView notifyView buttonView x y bHeight |\rself expandStack.\rtopView _ StandardSystemView new model: self.\rtopView borderWidth: 1.\rbuttonView _ self buildMVCNotifierButtonView.\rtopView addSubView: buttonView.\rnotifyView _ PluggableListView on: self\r\tlist: #contextStackList\r\tselected: #contextStackIndex\r\tchangeSelected: #debugAt:\r\tmenu: nil\r\tkeystroke: nil.\rself installListFontInto: notifyView.\rx _ 350 max: (aPoint x).\ry _ ((4 * 15) + 16) max: (aPoint y - 16 - self optionalButtonHeight).\rbHeight _ self optionalButtonHeight.\ry _ y - bHeight.\rnotifyView window: (0@0 extent: x@y).\rtopView\r\taddSubView: notifyView below: buttonView;\r\tlabel: aString;\r\tminimumSize: aPoint.\r^ topView! !\r!Debugger methodsFor: 'initialize' stamp: 'ssa 3/3/2010 21:35'!\rcodeView\r\"Answer the code editing view for me\"\r^PluggableTextView on: self\r\t\ttext: #contents accept: #contents:notifying:\r\t\treadSelection: #contentsSelection menu: #codePaneMenu:shifted:! !\r!Debugger methodsFor: 'initialize' stamp: 'dmu 3/10/2010 18:15'!\rcustomButtonSpecs\r\"Answer an array of elements of the form wording, selector, help-message, that characterize the custom button row of a debugger.\"\r\r| list |\rlist _ #(('Proceed'\tproceed\t\t\t\t'close the debugger and proceed.')\r\t('Restart'\t\trestart\t\t\t\t'reset this context to its start.')\r\t('Into'\t\t\tsend\t\t\t\t'step Into message sends')\r\t('Over'\t\t\tdoStep\t\t\t\t'step Over message sends')\r\t('Through'\t\tstepIntoBlock\t\t'step into a block')\r\t('Full Stack'\t\tfullStack\t\t\t'show full stack')\r\t('Where'\t\twhere\t\t\t\t'select current pc range')\r\t('Meta'\t\thalt\t\t\t\t\t'go meta & debug the debugger')).\rlist _ list, self otherButtonSpecs.\rPreferences restartAlsoProceeds ifTrue:\r\t[list _ list collect: [:each |\r\t\teach second == #restart\r\t\t\tifTrue: [each copy at: 3 put: 'proceed from the beginning of this context.'; yourself]\r\t\t\tifFalse: [each]]].\r^ list! !\r!Debugger methodsFor: 'initialize' stamp: 'ssa 9/9/2009 17:35'!\rdebugAt: anInteger\rself toggleContextStackIndex: anInteger. \r ^ self debug.! !\r!Debugger methodsFor: 'initialize' stamp: 'ssa 9/10/2009 15:56'!\ropenFullNoSuspendLabel: aString\r\"Create and schedule a full debugger with the given label. Do not terminate the current active process.\"\r\r| topView |\r\r\rtopView _ self buildMVCDebuggerViewLabel: aString minSize: 300@200.\rtopView controller openNoTerminate.\r^ topView\r! !\r!Debugger methodsFor: 'initialize' stamp: 'ssa 9/15/2009 14:11'!\ropenNotifierContents: msgString label: label\r\"Create and schedule a notifier view with the given label and message. A notifier view shows just the message or the first several lines of the stack, with a menu that allows the user to open a full debugger if so desired.\"\r\"NOTE: When this method returns, a new process has been scheduled to run the windows, and thus this notifier, but the previous active porcess has not been suspended.  The sender will do this.\"\r| msg topView p |\rSensor flushKeyboard.\rsavedCursor _ Sensor currentCursor.\rSensor currentCursor: Cursor normal.\r(label beginsWith: 'Space is low')\r\tifTrue: [msg _ self lowSpaceChoices, (msgString ifNil: [''])]\r\tifFalse: [msg _ msgString].\risolationHead ifNotNil:\r\t[\"We have already revoked the isolation layer -- now jump to the parent project.\"\r\tmsg _ self isolationRecoveryAdvice, msgString.\r\tfailedProject _ Project current.\r\tisolationHead parent enterForEmergencyRecovery].\r\r\r\rDisplay fullScreen.\rtopView _ self \r\tbuildMVCNotifierViewLabel: label , Time dateAndTimeNow  printString\r\tmessage: thisContext sender sender shortStack \r\tminSize:600@((14 * 20) + 16 + self optionalButtonHeight).\rScheduledControllers activeController\r\tifNil: [p _ Display boundingBox center]\r\tifNotNil: [p _ ScheduledControllers activeController view displayBox center].\rtopView controller openNoTerminateDisplayAt: (p adhereTo:(Display boundingBox insetBy: topView minimumSize)).\r^ topView! !\r!Debugger methodsFor: 'initialize' stamp: 'ssa 7/7/2010 10:48'!\rotherButtonSpecs\r| r |\rr _ OrderedCollection new.\r(Smalltalk includesKey:#Ly) ifTrue:[\r\tcontextStackTop hasLyActivation \r\t\tifTrue:[r add: #('Debug in Ly'\tdebugInLy\t\t\t\t'launch a Ly execution debugger on this stack')]].\r^ r asArray! !\r!Debugger methodsFor: 'initialize' stamp: 'ssa 3/3/2010 20:55'!\rrelease\rself windowIsClosing.\rsuper release.\r! !\r!Debugger methodsFor: 'initialize' stamp: 'ssa 3/3/2010 20:58'!\rterminateInterruptedProcessIfSoleOwner\r\r| otherOwners |\rotherOwners _ Smalltalk pointersTo: interruptedProcess except:{self}.\rotherOwners detect:[:each| each isKindOf: Debugger] ifNone:[\r\tTranscript show: 'Debugger>>terminateInterruptedProcessIfSoleOwner: ', interruptedProcess identityHash printString; cr.\r\tinterruptedProcess terminate].\r\r! !\r!Debugger methodsFor: 'initialize' stamp: 'ssa 4/20/2010 11:05'!\rwindowIsClosing\r\"My window is being closed; clean up. Restart the low space watcher.\"\r\rinterruptedProcess == nil ifTrue: [^ self].\rinterruptedProcess terminate.\r\"self terminateInterruptedProcessIfSoleOwner.\"\rinterruptedProcess _ nil.\rinterruptedController _ nil.\rcontextStack _ nil.\rcontextStackTop _ nil.\rreceiverInspector _ nil.\rcontextVariablesInspector _ nil.\rSmalltalk installLowSpaceWatcher.  \"restart low space handler\"\r! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\rcontextStack\r\"Answer the value of contextStack\"\r\rcontextStack isNil ifTrue:[self contextStack: nil].\r^ contextStack! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\rcontextStack: anObject\r\"Set the value of contextStack\"\r\rcontextStack _ anObject! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\rcontextStackIndex: anObject\r\"Set the value of contextStackIndex\"\r\rcontextStackIndex _ anObject! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\rcontextStackList: anObject\r\"Set the value of contextStackList\"\r\rcontextStackList _ anObject! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\rcontextStackTop\r\"Answer the value of contextStackTop\"\r\rcontextStackTop isNil ifTrue:[self contextStackTop: nil].\r^ contextStackTop! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\rcontextStackTop: anObject\r\"Set the value of contextStackTop\"\r\rcontextStackTop _ anObject! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 3/3/2010 22:24'!\rcontextVariablesInspector\r\"Answer the instance of Inspector that is providing a view of the \rvariables of the selected context.\"\r\rcontextVariablesInspector isNil ifTrue:[self contextVariablesInspector: self defaultContextVariablesInspector].\r^contextVariablesInspector! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\rcontextVariablesInspector: anObject\r\"Set the value of contextVariablesInspector\"\r\rcontextVariablesInspector _ anObject! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 3/3/2010 22:22'!\rdefaultContextVariablesInspector\r\r^ContextVariablesInspector inspect: nil! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 3/3/2010 22:15'!\rdefaultReceiverInspector\r\r^Inspector inspect: nil! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\rerrorWasInUIProcess\r\"Answer the value of errorWasInUIProcess\"\r\rerrorWasInUIProcess isNil ifTrue:[self errorWasInUIProcess: nil].\r^ errorWasInUIProcess! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\rerrorWasInUIProcess: anObject\r\"Set the value of errorWasInUIProcess\"\r\rerrorWasInUIProcess _ anObject! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\rexternalInterrupt\r\"Answer the value of externalInterrupt\"\r\rexternalInterrupt isNil ifTrue:[self externalInterrupt: nil].\r^ externalInterrupt! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\rfailedProject\r\"Answer the value of failedProject\"\r\rfailedProject isNil ifTrue:[self failedProject: nil].\r^ failedProject! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\rfailedProject: anObject\r\"Set the value of failedProject\"\r\rfailedProject _ anObject! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\rinterruptedController\r\"Answer the value of interruptedController\"\r\rinterruptedController isNil ifTrue:[self interruptedController: nil].\r^ interruptedController! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\rinterruptedController: anObject\r\"Set the value of interruptedController\"\r\rinterruptedController _ anObject! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\rinterruptedProcess\r\"Answer the value of interruptedProcess\"\r\rinterruptedProcess isNil ifTrue:[self interruptedProcess: nil].\r^ interruptedProcess! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\rinterruptedProcess: anObject\r\"Set the value of interruptedProcess\"\r\rinterruptedProcess _ anObject! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\risolationHead\r\"Answer the value of isolationHead\"\r\risolationHead isNil ifTrue:[self isolationHead: nil].\r^ isolationHead! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\risolationHead: anObject\r\"Set the value of isolationHead\"\r\risolationHead _ anObject! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\rproceedValue\r\"Answer the value of proceedValue\"\r\rproceedValue isNil ifTrue:[self proceedValue: nil].\r^ proceedValue! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 3/3/2010 22:15'!\rreceiverInspector\r\"Answer the instance of Inspector that is providing a view of the \rvariables of the selected context's receiver.\"\r\rreceiverInspector isNil ifTrue:[self receiverInspector: self defaultReceiverInspector].\r^receiverInspector! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\rreceiverInspector: anObject\r\"Set the value of receiverInspector\"\r\rreceiverInspector _ anObject! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\rsavedCursor\r\"Answer the value of savedCursor\"\r\rsavedCursor isNil ifTrue:[self savedCursor: nil].\r^ savedCursor! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\rsavedCursor: anObject\r\"Set the value of savedCursor\"\r\rsavedCursor _ anObject! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:16'!\rselectingPC\r\"Answer the value of selectingPC\"\r\rselectingPC isNil ifTrue:[self selectingPC: false].\r^ selectingPC! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\rselectingPC: anObject\r\"Set the value of selectingPC\"\r\rselectingPC _ anObject! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\rsourceMap\r\"Answer the value of sourceMap\"\r\rsourceMap isNil ifTrue:[self sourceMap: nil].\r^ sourceMap! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\rsourceMap: anObject\r\"Set the value of sourceMap\"\r\rsourceMap _ anObject! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\rtempNames\r\"Answer the value of tempNames\"\r\rtempNames isNil ifTrue:[self tempNames: nil].\r^ tempNames! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\rtempNames: anObject\r\"Set the value of tempNames\"\r\rtempNames _ anObject! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\rtheMethodNode\r\"Answer the value of theMethodNode\"\r\rtheMethodNode isNil ifTrue:[self theMethodNode: nil].\r^ theMethodNode! !\r!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\rtheMethodNode: anObject\r\"Set the value of theMethodNode\"\r\rtheMethodNode _ anObject! !\r!Debugger methodsFor: 'notifier menu' stamp: 'ssa 3/2/2010 18:08'!\rdebug\r\"Open a full DebuggerView.\"\r| topView |\rtopView _ self  topView.\rtopView isNil ifTrue:[topView _ self buildMVCDebuggerViewLabel: self labelString minSize: 200@200].\rtopView model: nil.  \"so close won't release me.\"\r\r\rtopView controller controlTerminate.\rtopView deEmphasize; erase.\r\r\"a few hacks to get the scroll selection artifacts out when we got here by clicking in the list\"\rtopView subViewWantingControl ifNotNil: [\r\ttopView subViewWantingControl controller controlTerminate\r].\rtopView controller status: #closed.\r\rself openFullNoSuspendLabel: topView label.\rtopView controller closeAndUnscheduleNoErase.\rTranscript show: 'in debug: ', Processor thisProcess identityHash printString; cr.\rProcessor terminateActive.\r! !\r!Debugger methodsFor: 'context stack (message list)' stamp: 'ssa 3/10/2010 09:17'!\rcontextStackIndex\r\"Answer the index of the selected context.\"\r\rcontextStackIndex isNil ifTrue:[self contextStackIndex: 0].\r^contextStackIndex! !\r!Debugger methodsFor: 'context stack (message list)' stamp: 'ssa 3/3/2010 22:23'!\rexpandStack\r\"A Notifier is being turned into a full debugger.  Show a substantial amount of stack in the context pane.\"\r\rself newStack: (contextStackTop stackOfSize: 20).\rcontextStackIndex _ 0.\rreceiverInspector _ self defaultReceiverInspector.\rcontextVariablesInspector _ self defaultContextVariablesInspector.\rproceedValue _ nil! !\r!Debugger methodsFor: 'context stack (message list)' stamp: 'ssa 3/2/2010 16:17'!\rlabelForContext: ctxt\r\r^ctxt printString! !\r!Debugger methodsFor: 'context stack (message list)' stamp: 'ssa 9/15/2009 10:14'!\rtoggleContextStackIndex: anInteger \r\"If anInteger is the same as the index of the selected context, deselect it. \rOtherwise, the context whose index is anInteger becomes the selected \rcontext.\"\r\rself contextStackIndex: \r\t(contextStackIndex = anInteger\r\t\tifTrue: [0]\r\t\tifFalse: [anInteger])\r\toldContextWas:\r\t((contextStackIndex = 0 or:[contextStackIndex isNil])\r\t\tifTrue: [nil]\r\t\tifFalse: [contextStack at: contextStackIndex])! !\r!Debugger methodsFor: 'code pane' stamp: 'ssa 9/15/2009 10:16'!\rpcRange\r\"Answer the indices in the source code for the method corresponding to \rthe selected context's program counter value.\"\r\r| i pc end |\r(self selectingPC and: [contextStackIndex ~= 0])\r\tifFalse: [^1 to: 0].\rsourceMap ifNil:\r\t[theMethodNode isNil ifTrue:[^1 to: 0].\r\tsourceMap _ theMethodNode sourceMap.\r\ttempNames _ theMethodNode tempNames.\r\tself selectedContext method cacheTempNames: tempNames].\r(sourceMap size = 0 or: [ self selectedContext isDead ]) ifTrue: [^1 to: 0].\rSmalltalk at: #RBProgramNode ifPresent:[:nodeClass|\r\t(theMethodNode isKindOf: nodeClass) ifTrue: [\r\t\tpc _ contextStackIndex = 1\r\t\t\tifTrue: [self selectedContext pc]\r\t\t\tifFalse: [self selectedContext previousPc].\r\t\ti _ sourceMap findLast:[:pcRange | pcRange key <= pc].\r\t\ti = 0 ifTrue:[^ 1 to: 0].\r\t\t^ (sourceMap at: i) value\r\t].\r].\rpc_ self selectedContext pc -\r\t((\"externalInterrupt\" true and: [contextStackIndex=1])\r\t\tifTrue: [1]\r\t\tifFalse: [2]).\ri _ sourceMap indexForInserting: (Association key: pc value: nil).\ri < 1 ifTrue: [^1 to: 0].\ri > sourceMap size\r\tifTrue:\r\t\t[end _ sourceMap inject: 0 into:\r\t\t\t[:prev :this | prev max: this value last].\r\t\t^ end+1 to: end].\r^(sourceMap at: i) value! !\r!Debugger methodsFor: 'dependents access' stamp: 'ssa 3/3/2010 22:18'!\rstep \r\"Update the inspectors.\"\r\rself receiverInspector ifNotNil: [self receiverInspector step].\rself contextVariablesInspector ifNotNil: [self contextVariablesInspector step].\r! !\r!Debugger methodsFor: 'dependents access' stamp: 'ssa 3/3/2010 22:19'!\rupdateInspectors \r\"Update the inspectors on the receiver's variables.\"\r\rself receiverInspector == nil ifFalse: [self receiverInspector update].\rself contextVariablesInspector == nil ifFalse: [self contextVariablesInspector update]! !\r!Debugger methodsFor: 'private' stamp: 'ssa 3/3/2010 21:46'!\rcontextStackIndex: anInteger oldContextWas: oldContext \r\"Change the context stack index to anInteger, perhaps in response to user selection.\"\r\r| newMethod |\rcontextStackIndex := anInteger.\ranInteger = 0\r\tifTrue: [currentCompiledMethod := theMethodNode := tempNames := sourceMap := contents := nil.\r\t\tself changed: #contextStackIndex.\r\t\tself decorateButtons.\r\t\tself contentsChanged.\r\t\tcontextVariablesInspector object: nil.\r\t\tself updateInspectorToObject: self receiver.\r\t\t^ self].\r(newMethod := oldContext == nil\r\t\t\t\tor: [oldContext method ~~ (currentCompiledMethod := self selectedContext method)])\r\tifTrue: [tempNames := sourceMap := nil.\r\t\ttheMethodNode := Preferences browseWithPrettyPrint\r\t\t\tifTrue: [ \tself selectedContext methodNodeFormattedAndDecorated: Preferences colorWhenPrettyPrinting ]\r\t\t\tifFalse: [\tself selectedContext methodNode ].\r\t\tcontents := self selectedMessage.\r\t\tself contentsChanged.\r\t\tself pcRange\r\t\t\"will compute tempNamesunless noFrills\"].\rself changed: #contextStackIndex.\rself decorateButtons.\rtempNames == nil\r\tifTrue: [tempNames := self selectedClassOrMetaClass parserClass new parseArgsAndTemps: contents notifying: nil].\rcontextVariablesInspector object: self selectedContext.\rself updateInspectorToObject: self receiver.\rnewMethod\r\tifFalse: [self changed: #contentsSelection]! !\r!Debugger methodsFor: 'private' stamp: 'ssa 3/2/2010 16:16'!\rnewStack: stack\r| oldStack diff |\r\rcontextStackTop _ stack first.\roldStack _ contextStack.\rcontextStack _ stack.\r(oldStack == nil or: [oldStack last ~~ stack last])\r\tifTrue: [contextStackList _ contextStack collect: [:ctx | self labelForContext: ctx ].\r\t\t\t^ self].\r\"May be able to re-use some of previous list\"\rdiff _ stack size - oldStack size.\rcontextStackList _ diff <= 0\r\tifTrue: [contextStackList copyFrom: 1-diff to: oldStack size]\r\tifFalse: [diff > 1\r\t\t\tifTrue: [contextStack collect: [:ctx | self labelForContext: ctx ]]\r\t\t\tifFalse: [(Array with: (self labelForContext:stack first)) , contextStackList]]! !\r!Debugger methodsFor: 'private' stamp: 'ssa 9/15/2009 14:25'!\rprocess: aProcess controller: aController context: aContext isolationHead: projectOrNil\r\rsuper initialize.\rSmalltalk at: #MessageTally ifPresentAndInMemory: [:c | c new close].\rcontents _ nil. \rinterruptedProcess _ aProcess.\rinterruptedController _ aController.\rcontextStackTop _ aContext.\rself newStack: (contextStackTop stackOfSize: 1).\rcontextStackIndex _ 1.\rexternalInterrupt _ false.\rselectingPC _ true.\risolationHead _ projectOrNil.\r! !\r!Debugger methodsFor: 'private' stamp: 'dmu 3/10/2010 17:52'!\rresetContext: aContext \r\"Used when a new context becomes top-of-stack, for instance when the\rmethod of the selected context is re-compiled, or the simulator steps or\rreturns to a new method. There is room for much optimization here, first\rto save recomputing the whole stack list (and text), and secondly to avoid\rrecomposing all that text (by editing the paragraph instead of recreating it).\"\r\r| oldContext |\roldContext _ self selectedContext.\rcontextStackTop _ aContext.\rself newStack: (contextStackTop ifNil:  [^ self release] ifNotNil: [contextStackTop contextStack]).\rself changed: #contextStackList.\rself contextStackIndex: 1 oldContextWas: oldContext.\rself changed: #content.! !\r!Debugger methodsFor: 'private' stamp: 'ssa 3/25/2010 16:02'!\rresumeProcess: aTopView \r| c |\raTopView erase.\rsavedCursor\r\tifNotNil: [Sensor currentCursor: savedCursor].\risolationHead\r\tifNotNil: [failedProject enterForEmergencyRecovery.\r\t\tisolationHead invoke.\r\t\tisolationHead _ nil].\r(interruptedProcess isNil or:[interruptedProcess isTerminated]) ifFalse: [\r\tc _ interruptedController ifNil:[ScheduledControllers scheduledControllers last] ifNotNil:[interruptedController].\r\tScheduledControllers activeControllerNoTerminate: c  andProcess: interruptedProcess].\r\"if old process was terminated, just terminate current one\"\rinterruptedProcess _ nil.\r\"Before delete, so release doesn't terminate it\"\raTopView controller closeAndUnscheduleNoErase.\rSmalltalk installLowSpaceWatcher.\r\"restart low space handler\"\rerrorWasInUIProcess == false\r\tifFalse: [Processor terminateActive]! !\r!Debugger methodsFor: 'private' stamp: 'ssa 3/10/2010 09:17'!\rselectedContext\r\rself contextStackIndex = 0\r\tifTrue: [^self contextStackTop]\r\tifFalse: [^self contextStack at: contextStackIndex]! !\r!Debugger methodsFor: 'private' stamp: 'ssa 3/3/2010 21:48'!\rupdateInspectorToObject: obj\r\rself receiverInspector object: obj! !\r!Debugger class methodsFor: 'class initialization' stamp: 'dmu 11/25/2008 00:20'!\ropenContext: aContext label: aString contents: contentsStringOrNil\r| isolationHead |\r\"Open a notifier in response to an error, halt, or notify. A notifier view just shows a short view of the sender stack and provides a menu that lets the user open a full debugger.\"\r<primitive: 19> \"Simulation guard\"\rErrorRecursion not & Preferences logDebuggerStackToFile ifTrue:\r\t[Smalltalk logError: aString inContext: aContext to: 'SqueakDebug.log'].\rErrorRecursion ifTrue:\r\t[ErrorRecursion _ false.\r\t\"(isolationHead _ CurrentProjectRefactoring currentIsolationHead)\r\t\tifNil: [self primitiveError: aString]\r\t\tifNotNil: [isolationHead revoke]\"].\rErrorRecursion _ true.\rself informExistingDebugger: aContext label: aString.\r(Debugger context: aContext isolationHead: nil)\r\topenNotifierContents: contentsStringOrNil\r\tlabel: aString.\rErrorRecursion _ false.\rProcessor thisProcess suspend.\r! !\r!Debugger class methodsFor: 'instance creation' stamp: 'dmu 11/25/2008 00:20'!\rcontext: aContext isolationHead: isolationHead\r\"Answer an instance of me for debugging the active process starting with the given context.\"\r\r^ self new\r\tprocess: Processor thisProcess\r\tcontroller:\r\t\t((Smalltalk isMorphic not and: [ScheduledControllers inActiveControllerProcess])\r\t\t\tifTrue: [ScheduledControllers activeController]\r\t\t\tifFalse: [nil])\r\tcontext: aContext\r\tisolationHead: isolationHead\r! !\r!Debugger class methodsFor: 'opening' stamp: 'dmu 3/10/2010 18:39'!\ropenNoForkSuspendOn: process context: context label: title contents: contentsStringOrNil fullView: bool selectingOtherIndex: anIndex\r\"Open a notifier in response to an error, halt, or notify. A notifier view just shows a short view of the sender stack and provides a menu that lets the user open a full debugger.\"\r\r| controller |\rcontroller _ ScheduledControllers activeControllerProcess == process\r\t\t\tifTrue: [ScheduledControllers activeController].\r [\r\t[\t| debugger |\r\t\tdebugger _ self new process: process controller: controller context: context.\r\t\tbool ifTrue: [debugger openFullNoSuspendLabel: title]\r\t\t\tifFalse: [debugger openNotifierContents: contentsStringOrNil label: title].\r\t\tdebugger setContextStackIndexFromOtherIndex: anIndex otherTopContext: context.\r\t\tPreferences logDebuggerStackToFile ifTrue: [\r\t\t\tSmalltalk logError: title inContext: context to: 'SqueakDebug.log'].\r\t\tSmalltalk isMorphic\r\t\t\tifFalse: [ScheduledControllers searchForActiveController \"needed since openNoTerminate (see debugger #open...) does not set up activeControllerProcess if activeProcess (this fork) is not the current activeControllerProcess (see #scheduled:from:)\"].\r\t] on: Error do: [:ex |\r\t\tself primitiveError: \r\t\t\t'Orginal error: ', \r\t\t\ttitle asString, '.\rDebugger error: ', \r\t\t\t([ex description] on: Error do: ['a ', ex class printString]), ':'\r\t]\r] value! !\r!Debugger class methodsFor: 'opening' stamp: 'dmu 3/25/2010 10:22'!\ropenNoSuspendOn: process context: context label: title contents: contentsStringOrNil fullView: bool\r\"Open a notifier in response to an error, halt, or notify. A notifier view just shows a short view of the sender stack and provides a menu that lets the user open a full debugger.\"\r\r| controller |\rSmalltalk isMorphic\r\tifTrue: []\r\tifFalse: [controller _ ScheduledControllers activeControllerProcess == process\r\t\t\tifTrue: [ScheduledControllers activeController]].\r[\r\t[\t| debugger |\r\t\tdebugger _ self new process: process controller: controller context: context.\r\t\tbool ifTrue: [debugger openFullNoSuspendLabel: title]\r\t\t\tifFalse: [debugger openNotifierContents: contentsStringOrNil label: title].\r\t\tPreferences logDebuggerStackToFile ifTrue: [\r\t\t\tSmalltalk logError: title inContext: context to: 'SqueakDebug.log'].\r\t\tSmalltalk isMorphic\r\t\t\tifFalse: [ScheduledControllers searchForActiveController \"needed since openNoTerminate (see debugger #open...) does not set up activeControllerProcess if activeProcess (this fork) is not the current activeControllerProcess (see #scheduled:from:)\"].\r\t] on: Error do: [:ex |\r\t\tself primitiveError: \r\t\t\t'Orginal error: ', \r\t\t\ttitle asString, '.\rDebugger error: ', \r\t\t\t([ex description] on: Error do: ['a ', ex class printString]), ':'\r\t]\r] fork! !\r!Debugger class methodsFor: 'opening' stamp: 'dmu 3/25/2010 10:23'!\ropenOn: process context: context label: title contents: contentsStringOrNil fullView: bool\rself openNoSuspendOn: process context: context label: title contents: contentsStringOrNil fullView: bool.\rprocess suspend.\r! !\r!VersionsBrowser methodsFor: 'init & update' stamp: 'dmu 9/7/2010 14:26'!\rscanVersionsOf: method class: class meta: meta category: category selector: selector\r| position prevPos prevFileIndex preamble tokens sourceFilesCopy stamp |\rselectorOfMethod _ selector.\rcurrentCompiledMethod _ method.\rclassOfMethod _ meta ifTrue: [class class] ifFalse: [class].\rchangeList _ OrderedCollection new.\rlist _ OrderedCollection new.\rself addedChangeRecord ifNotNilDo: [ :change |\r\tself addItem: change text: ('{1} (in {2})' translated format: { change stamp. change fileName }) ].\rlistIndex _ 0.\rposition _ method filePosition.\rsourceFilesCopy _ SourceFiles collect:\r\t[:x | x isNil ifTrue: [ nil ]\r\t\t\tifFalse: [x readOnlyCopy]].\rmethod fileIndex == 0 ifTrue: [^ nil].\rfile _ sourceFilesCopy at: method fileIndex.\r[position notNil & file notNil]\r\twhileTrue:\r\t[file position: (0 max: position-150).  \"Skip back to before the preamble\"\r\t[file position < (position-1)]  \"then pick it up from the front\"\r\t\twhileTrue: [preamble _ file nextChunk].\r\r\t\"Preamble is likely a linked method preamble, if we're in\r\t\ta changes file (not the sources file).  Try to parse it\r\t\tfor prior source position and file index\"\r\tprevPos _ nil.\r\tstamp _ ''.\r\t(preamble findString: 'methodsFor:' startingAt: 1) > 0\r\t\tifTrue: [tokens _ Scanner new scanTokens: preamble]\r\t\tifFalse: [tokens _ Array new  \"ie cant be back ref\"].\r\t((tokens size between: 7 and: 8)\r\t\tand: [(tokens at: tokens size-5) = #methodsFor:])\r\t\tifTrue:\r\t\t\t[(tokens at: tokens size-3) = #stamp:\r\t\t\tifTrue: [\"New format gives change stamp and unified prior pointer\"\r\t\t\t\t\tstamp _ tokens at: tokens size-2.\r\t\t\t\t\tprevPos _ tokens last.\r\t\t\t\t\tprevFileIndex _ sourceFilesCopy fileIndexFromSourcePointer: prevPos.\r\t\t\t\t\tprevPos _ sourceFilesCopy filePositionFromSourcePointer: prevPos]\r\t\t\tifFalse: [\"Old format gives no stamp; prior pointer in two parts\"\r\t\t\t\t\tprevPos _ tokens at: tokens size-2.\r\t\t\t\t\tprevFileIndex _ tokens last].\r\t\t\t(prevPos = 0 or: [prevFileIndex = 0]) ifTrue: [prevPos _ nil]].\r\t((tokens size between: 5 and: 6)\r\t\tand: [(tokens at: tokens size-3) = #methodsFor:])\r\t\tifTrue:\r\t\t\t[(tokens at: tokens size-1) = #stamp:\r\t\t\tifTrue: [\"New format gives change stamp and unified prior pointer\"\r\t\t\t\t\tstamp _ tokens at: tokens size]].\r\tself addItem:\r\t\t\t(ChangeRecord new file: file position: position type: #method\r\t\t\t\t\tclass: class name category: category meta: meta stamp: stamp)\r\t\ttext: stamp , ' ' , class name , (meta ifTrue: [' class '] ifFalse: [' ']) , selector.\r\tposition _ prevPos.\r\tprevPos notNil ifTrue:\r\t\t[file _ sourceFilesCopy at: prevFileIndex]].\rsourceFilesCopy do: [:x | x notNil ifTrue: [x close]].\rlistSelections _ Array new: list size withAll: false! !\r!RemoteString methodsFor: 'private' stamp: 'dmu 9/7/2010 14:23'!\rstring: aString onFileNumber: fileNumber\r\"Store this as my string if source files exist.\"\r| theFile |\r(SourceFiles at: fileNumber) == nil ifFalse: \r\t[theFile _ SourceFiles at: fileNumber.\r\ttheFile safelyDo: [\r\t\ttheFile setToEnd; cr.\r\t\tself string: aString onFileNumber: fileNumber toFile: theFile]\r\t]! !\r!RemoteString methodsFor: 'accessing' stamp: 'dmu 9/7/2010 17:19'!\rtext \r\"Answer the receiver's string asText if remote files are enabled.\"\r| theFile theText |\r(sourceFileNumber == nil or: [(SourceFiles at: sourceFileNumber) == nil]) ifTrue: [^ nil].\rtheFile _ SourceFiles at: sourceFileNumber.\t\ttheFile safelyDo: [\r\ttheFile position: filePositionHi.\r\ttheText _ theFile nextChunkText].\r^theText! !\r!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/24/2010 00:41'!\rseveralIndirectAdverbTests\r\t\"self severalIndirectAdverbTests run\"\r\t\"self runAll\" \r\t| theTest |\r\ttheTest _ RVMTest \r\t\tsetUp: [:test|   \"no setup needed\"]\r\t\ttest:[:test :env| \r\t\t\t%{1. 2. 3} randomLY: 2.\r\t\t\t%{1. 2. 3} oddRandomLY: 2.\r\t\t\t%{1. 3. 4} plus: %{4. 5} randomLY: 3.\r\t\t\t%{2. 4} randomLY: 3 plus: %{2. 6} randomLY: 4 .\r\t\t\ttest assert:  true.\r\t\t\t]\r\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\r\ttheTest name: 'severalIndirectAdverbTests'.\r\t^theTest! !\r!Sly3SyntaxTests class methodsFor: 'tutorial' stamp: 'dmu 9/16/2010 23:51'!\rtutorialExamples\r\r\t%{1. 2. 3} isNil. \"%{false. false. false}.\"\r\t%{1. 2. 3} totallING. \"6\" \r\t%{1. 2. 3} randomLY: 2. \"%{1. 3}\"\r\t%{1. 2. 3} oddRandomLY: 2.  \"%{true. false}\"\r\t%{1. 3. 4} plus: %{4. 5} randomLY: 3.   \"%{5. 8. 8. 6. 7. 8. 6. 8. 8. }\"\r\t%{2. 4} randomLY: 3 plus: %{2. 6} randomLY: 4. \"  %{10. 8. 8. 6. 10. 8. 10. 6. 4. 6. 10. 10. }\"\r\t%{{1. 2}. {3. 4}. {5. 6}} commaWholLY: {9. 10}.  \"%{#(1 2 9 10). #(3 4 9 10). #(5 6 9 10). }\"\r  \t%{1. 2. 3} collectionLY. \" #(1 2 3)\"\r \t%{10. 20. 30} plusRoundLY: %{4. 5. 6.7. 8. 9} . \" %{14. 24. 34. 15. 25. 35. 16.7. 26.7. 36.7. 18. 28. 38. 19. 29. 39. }\"! !\r\r!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:59'!\rplainlyTest\r\t\"Sly3SyntaxTests plainlyTest run\"\r\t\"Sly3SyntaxTests runAll\"\r\t| theTest ens result |\r\ttheTest _ RVMTest \r\t\tsetUp: [:test|   \"no setup needed\"]\r\t\ttest:[:test :env| \r\t\t\tens _ %{}.\r\t\t\tresult _ ens plainLYisEnsemble.\r\t\t\t\r\t\t\ttest assert:  result.\r\t\t\t]\r\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\r\ttheTest name: 'adverbKeywordTest'.\r\t^theTest! !\r!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/24/2010 14:51'!\rstrategyMultipleAdverbTest\r\t\"Sly3SyntaxTests strategyMultipleAdverbTest run\"\r\t\"Sly3SyntaxTests runAll\"\r\t| theTest ens result |\r\ttheTest _ RVMTest  \r\t\tsetUp: [:test|   \"no setup needed\"]\r\t\ttest:[:test :env| \r\t\t\tens _ %{{3. 30}. {4. 40}. {5. 50}}.\r\t\t\tresult _ ens serialLYatRoundLY: %{1. 2} put: %{1. 2. 3. 4. 5. 6} valueLY: [:x| x + 17].\r\t\t\ttest assert:  result members asArray  = {18. 19. 20. 21. 22. 23. }.\r\t\t\t]\r\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\r\ttheTest name: 'strategyMultipleAdverbTest'.\r\t^theTest! !\r!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/17/2010 00:02'!\rbinaryTest\r\t\"Sly3SyntaxTests binaryTest run\"\r\t\"Sly3SyntaxTests runAll\"\r\t| theTest ens result |\r\ttheTest _ RVMTest \r\t\tsetUp: [:test|   \"no setup needed\"]\r\t\ttest:[:test :env| \r\t\t\tens _ %{1. 2. 3}.\r\t\t\tresult _ ens + 10.\r\t\t\ttest assert:  result members asArray  = #(11 12 13).\r\t\t\t]\r\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\r\ttheTest name: 'binaryTest'.\r\t^theTest! !\r!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/23/2010 13:11'!\raddTest\r\"Sly3SyntaxTests addTest run\"\r\"Sly3SyntaxTests runAll\"\r| theTest ens result |\rtheTest _ RVMTest \r\tsetUp: [:test|   \"no setup needed\"]\r\ttest:[:test :env| \r\t\tens _ {{1. 2}. {3. 4}. {5. 6}} asOrderedCollection asEnsembleOfElements.\r\t\tresult _ ens wholLYadd: {7. 8}.\r\t\ttest assert:  result members asArray  = {{1. 2}. {3. 4}. {5. 6}. {7. 8}}.\r\t\t]\r\tasserting:[:test :outcome| true \"assertions will also be checked\"].\rtheTest name: 'addTest'.\r^theTest! !\r!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/23/2010 13:12'!\rremoveTest\r\"Sly3SyntaxTests removeTest run\"\r\"Sly3SyntaxTests runAll\"\r| theTest ens result |\rtheTest _ RVMTest \r\tsetUp: [:test|   \"no setup needed\"]\r\ttest:[:test :env| \r\t\tens _ {{1. 2}. {3. 4}. {5. 6}} asOrderedCollection asEnsembleOfElements.\r\t\tresult _ ens wholLYremove: {3. 4}.\r\t\ttest assert:  result members asArray  = {{1. 2}.  {5. 6}. }.\r\t\t]\r\tasserting:[:test :outcome| true \"assertions will also be checked\"].\rtheTest name: 'removeTest'.\r^theTest! !\r!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/24/2010 00:54'!\rsinglyTest\r\"Sly3SyntaxTests singlyTest run\"\r\"Sly3SyntaxTests runAll\"\r| theTest ens result |\rtheTest _ RVMTest \r\tsetUp: [:test|   \"no setup needed\"]\r\ttest:[:test :env| \r\t\tens _ %{1. 2. 3}.\r\t\tresult _ ens plusSingLY: %{10. 20. 30 }.\r\t\ttest assert:  result members asArray  = {11. 22. 33}.\r\t\t]\r\tasserting:[:test :outcome| true \"assertions will also be checked\"].\rtheTest name: 'singlyTest'.\r^theTest! !\r!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:50'!\radverbKeywordTest\r\t\"Sly3SyntaxTests adverbKeywordTest run\"\r\t\"Sly3SyntaxTests runAll\"\r\t| theTest ens result |\r\ttheTest _ RVMTest \r\t\tsetUp: [:test|   \"no setup needed\"]\r\t\ttest:[:test :env| \r\t\t\tens _ %{{1. 2}. {3. 4}. {5. 6}}.\r\t\t\tresult _ ens commaWholLY: {9. 10}.\r\t\t\ttest assert:  result members asArray  = #(#(1 2 9 10) #(3 4 9 10) #(5 6 9 10)).\r\t\t\t]\r\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\r\ttheTest name: 'adverbKeywordTest'.\r\t^theTest! !\r!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:50'!\radverbUnaryTest\r\t\"self adverbUnaryTest run\" \r\t\"self runAll\"\r\t| theTest ens result |\r\ttheTest _ RVMTest \r\t\tsetUp: [:test|   \"no setup needed\"]\r\t\ttest:[:test :env| \r\t\t\tens _ %{1. 2. 3}.\r\t\t\tresult _ ens oddRandomLY: 1.\r\t\t\ttest assert:  (result members size = 1) & (result members first isBoolean).\r\t\t\t]\r\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\r\ttheTest name: 'adverbUnaryTest'.\r\t^theTest! !\r!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/22/2010 22:50'!\rargAdverbRoundlyTest\r\t\"self argAdverbRoundlyTest run\"\r\t\"self runAll\"\r\t| theTest ens result | \r\ttheTest _ RVMTest \r\t\tsetUp: [:test|   \"no setup needed\"]\r\t\ttest:[:test :env| \r\t\t\tens _ %{10. 20. 30}.\r\t\t\tresult _ ens plusRoundLY: %(4. 5. 6. 7. 8. 9}.\r\t\t\ttest assert:  result members asArray = {14. 24. 34. 15. 25. 35. 16. 26. 36. 17. 27. 37. 18. 28. 38. 19. 29. 39. }.\r\t\t\t]\r\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\r\ttheTest name: 'argAdverbRoundlyTest'.\r\t^theTest! !\r!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:50'!\rargAdverbWhollyTest\r\t\"self argAdverbWhollyTest run\"\r\t\"self runAll\"\r\t| theTest ens result |\r\ttheTest _ RVMTest \r\t\tsetUp: [:test|   \"no setup needed\"]\r\t\ttest:[:test :env| \r\t\t\tens _ %{{1. 2}. {3. 4}. {5. 6}}.\r\t\t\tresult _ ens commaWholLY: {9. 10}.\r\t\t\ttest assert:  result members asArray  = #(#(1 2 9 10) #(3 4 9 10) #(5 6 9 10)).\r\t\t\t]\r\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\r\ttheTest name: 'argAdverbWhollyTest'.\r\t^theTest! !\r!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:50'!\rgerundAndingTest \r\t\"self gerundAndingTest run\"\r\t\"self runAll\"\r\t| theTest ens result |\r\ttheTest _ RVMTest \r\t\tsetUp: [:test|   \"no setup needed\"]\r\t\ttest:[:test :env| \r\t\t\tens _ %{1. 2. 3}.\r\t\t\tresult _ ens andINGodd.\r\t\t\ttest assert:  result = false.\r\t\t\t]\r\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\r\ttheTest name: 'gerundAndingTest'.\r\t^theTest! !\r!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/17/2010 16:49'!\rgerundDoubleKeywordTest\r\t\"self gerundDoubleKeywordTest run\"\r\t\"self runAll\"\r\t| theTest ens result |\r\ttheTest _ RVMTest  \r\t\tsetUp: [:test|   \"no setup needed\"]\r\t\ttest:[:test :env| \r\t\t\tens _ %{#(1). #(2)}.\r\t\t\tresult _ ens concatenatINGat: 1 put: #(12 13).\r\t\t\ttest assert:  result  = #( 12 13 12 13)\r\t\t\t]\r\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\r\ttheTest name: 'gerundDoubleKeywordTest'.\r\t^theTest! !\r!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:50'!\rgerundOnlyAveragingTest\r\t\"self gerundOnlyAveragingTest run\"\r\t\"self runAll\"\r\t| theTest ens result | \r\ttheTest _ RVMTest \r\t\tsetUp: [:test|   \"no setup needed\"]\r\t\ttest:[:test :env| \r\t\t\tens _ %{1. 2. 3}.\r\t\t\tresult _ ens averagING.\r\t\t\ttest assert:  result = 2.\r\t\t\t]\r\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\r\ttheTest name: 'gerundOnlyAveragingTest'.\r\t^theTest! !\r!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:50'!\rgerundOnlyConcatenatingTest\r\t\"self gerundOnlyConcatenatingTest run\"\r\t\"self runAll\"\r\t| theTest ens result | \r\ttheTest _ RVMTest \r\t\tsetUp: [:test|   \"no setup needed\"]\r\t\ttest:[:test :env| \r\t\t\tens _ %{'hello'. ' '. 'world'}.\r\t\t\tresult _ ens concatenatING.\r\t\t\ttest assert:  result = 'hello world'\r\t\t\t]\r\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\r\ttheTest name: 'gerundOnlyConcatenatingTest'.\r\t^theTest! !\r!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:50'!\rgerundOnlyTest\r\t\"self gerundOnlyTest run\"\r\t\"self runAll\" \r\t| theTest ens result |\r\ttheTest _ RVMTest \r\t\tsetUp: [:test|   \"no setup needed\"]\r\t\ttest:[:test :env| \r\t\t\tens _ %{1. 2. 3}.\r\t\t\tresult _ ens totallING.\r\t\t\ttest assert:  result = 6\r\t\t\t]\r\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\r\ttheTest name: 'gerundOnlyTest'.\r\t^theTest! !\r!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:50'!\rgerundOnlyTotallingTest\r\t\"self gerundOnlyTotallingTest run\"\r\t\"self runAll\"\r\t| theTest ens result |\r\ttheTest _ RVMTest \r\t\tsetUp: [:test|   \"no setup needed\"] \r\t\ttest:[:test :env| \r\t\t\tens _ %{1. 2. 3}.\r\t\t\tresult _ ens totallING.\r\t\t\ttest assert:  result = 6\r\t\t\t]\r\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\r\ttheTest name: 'gerundOnlyTotallingTest'.\r\t^theTest! !\r!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:50'!\rgerundOringTest\r\t\"self gerundOringTest run\"\r\t\"self runAll\"\r\t| theTest ens result |\r\ttheTest _ RVMTest  \r\t\tsetUp: [:test|   \"no setup needed\"]\r\t\ttest:[:test :env| \r\t\t\tens _ %{1. 2. 3}.\r\t\t\tresult _ ens orINGodd.\r\t\t\ttest assert:  result = true\r\t\t\t]\r\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\r\ttheTest name: 'gerundOringTest'.\r\t^theTest! !\r!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:50'!\rgerundSingleKeywordTest\r\t\"self gerundSingleKeywordTest run\"\r\t\"self runAll\"\r\t| theTest ens result |\r\ttheTest _ RVMTest  \r\t\tsetUp: [:test|   \"no setup needed\"]\r\t\ttest:[:test :env| \r\t\t\tens _ %{1. 2. 3}.\r\t\t\tresult _ ens totallINGplus: 1.\r\t\t\ttest assert:  result = 9\r\t\t\t]\r\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\r\ttheTest name: 'gerundSingleKeywordTest'.\r\t^theTest! !\r!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:50'!\rgerundUnaryTest\r\t\"self gerundUnaryTest run\"\r\t\"self runAll\"\r\t| theTest ens result | \r\ttheTest _ RVMTest \r\t\tsetUp: [:test|   \"no setup needed\"]\r\t\ttest:[:test :env| \r\t\t\tens _ %{1. 2. 3}.\r\t\t\tresult _ ens andINGodd.\r\t\t\ttest assert:  result = false\r\t\t\t]\r\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\r\ttheTest name: 'gerundUnaryTest'.\r\t^theTest! !\r!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:51'!\rmsgAdvKeywordTest\r\t\"self msgAdvKeywordTest run\"\r\t\"self runAll\"\r\t| theTest ens result |\r\ttheTest _ RVMTest  \r\t\tsetUp: [:test|   \"no setup needed\"]\r\t\ttest:[:test :env| \r\t\t\tens _ %{1. 2. 3}.\r\t\t\tresult _ ens randomLY: 1 plus:1.\r\t\t\ttest assert:  (result members size = 1)\r\t\t\t]\r\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\r\ttheTest name: 'msgAdvKeywordTest'.\r\t^theTest! !\r!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:51'!\rmsgAdvOnlyRandomlyTest\r\t\"self msgAdvOnlyRandomlyTest run\"\r\t\"self runAll\"\r\t| theTest ens result |\r\ttheTest _ RVMTest  \r\t\tsetUp: [:test|   \"no setup needed\"]\r\t\ttest:[:test :env| \r\t\t\tens _ %{1. 2. 3}.\r\t\t\tresult _ ens randomLY: 1.\r\t\t\ttest assert:  (result members size = 1)\r\t\t\t]\r\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\r\ttheTest name: 'msgAdvOnlyRandomlyTest'.\r\t^theTest! !\r!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:51'!\rmsgAdvRandomly2Test\r\t\"self msgAdvRandomly2Test run\"\r\t\"self runAll\"\r\t| theTest ens result |\r\ttheTest _ RVMTest \r\t\tsetUp: [:test|   \"no setup needed\"]\r\t\ttest:[:test :env|  \r\t\t\tens _ %{1. 2. 3}.\r\t\t\tresult _ ens oddRandomLY: 2.\r\t\t\ttest assert:  (result members size = 2)\r\t\t\t]\r\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\r\ttheTest name: 'msgAdvRandomly2Test'.\r\t^theTest! !\r!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:51'!\rmsgAdvRandomlyTest\r\t\"self msgAdvRandomlyTest run\"\r\t\"self runAll\"\r\t| theTest ens result |\r\ttheTest _ RVMTest \r\t\tsetUp: [:test|   \"no setup needed\"] \r\t\ttest:[:test :env| \r\t\t\tens _ %{1. 2. 3}.\r\t\t\tresult _ ens oddRandomLY: 1.\r\t\t\ttest assert:  (result members size = 1)\r\t\t\t]\r\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\r\ttheTest name: 'msgAdvRandomlyTest'.\r\t^theTest! !\r!Sly3SyntaxTests class methodsFor: 'isolated failures' stamp: 'dmu 9/16/2010 23:51'!\rmsgAdvSelectivelyTest\r\t\"self msgAdvSelectivelyTest run\"\r\t\"self runAll\"\r\t| theTest ens result |\r\ttheTest _ RVMTest  \r\t\tsetUp: [:test|   \"no setup needed\"]\r\t\ttest:[:test :env| \r\t\t\tens _ %{1. 2. 3}.\r\t\t\tresult _ ens serialLYselectiveLYvalueLY:  [:mbr| mbr odd].\r\t\t\ttest assert:  result members asArray = #(1 3)\r\t\t\t]\r\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\r\ttheTest name: 'msgAdvSelectivelyTest'.\r\t^theTest! !\r!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:51'!\rmsgAdvSeriallyTest\r\t\"self msgAdvSeriallyTest run\"\r\t\"self runAll\"\r\t| theTest ens result |\r\ttheTest _ RVMTest \r\t\tsetUp: [:test|   \"no setup needed\"] \r\t\ttest:[:test :env| \r\t\t\tens _ %{1. 2. 3. 4. 5. 6. 7. 8. 9}.\r\t\t\tresult _ ens serialLY.\r\t\t\ttest assert:  (result members asArray = {1. 2. 3. 4. 5. 6. 7. 8. 9})\r\t\t\t]\r\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\r\ttheTest name: 'msgAdvSeriallyTest'.\r\t^theTest! !\r!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:51'!\rnormalBinaryTest\r\t\"self normalBinaryTest run\"\r\t\"self runAll\"\r\t| theTest ens result |\r\ttheTest _ RVMTest \r\t\tsetUp: [:test|   \"no setup needed\"] \r\t\ttest:[:test :env| \r\t\t\tens _ %{1. 2. 3}.\r\t\t\tresult _ ens +1.\r\t\t\ttest assert:  result members = {2. 3. 4}\r\t\t\t]\r\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\r\ttheTest name: 'normalBinaryTest'.\r\t^theTest! !\r!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:51'!\rnormalKeywordTest\r\t\"self normalKeywordTest run\"\r\t\"self runAll\"\r\t| theTest ens result |\r\ttheTest _ RVMTest  \r\t\tsetUp: [:test|   \"no setup needed\"]\r\t\ttest:[:test :env| \r\t\t\tens _ %{1. 2. 3}.\r\t\t\tresult _ ens plus: 1.\r\t\t\ttest assert:  result members = {2. 3. 4}\r\t\t\t]\r\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\r\ttheTest name: 'normalKeywordTest'.\r\t^theTest! !\r!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/22/2010 22:54'!\rnormalUnaryTest\r\t\"self normalUnaryTest run\"\r\t\"self runAll\"\r\t| theTest ens result |\r\ttheTest _ RVMTest  \r\t\tsetUp: [:test|   \"no setup needed\"]\r\t\ttest:[:test :env| \r\t\t\tens _ %{1. 2. 3}.\r\t\t\tresult _ ens odd.\r\t\t\ttest assert:  result members = {true. false. true}\r\t\t\t]\r\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\r\ttheTest name: 'normalUnaryTest'.\r\t^theTest! !\r!Sly3SyntaxTests class methodsFor: 'isolated failures' stamp: 'dmu 9/16/2010 23:50'!\rgerundPerformWithWithTest\r\t\"CURRENTLY FAILS\"\r\t\"self gerundPerformWithWithTest run\"\r\t\"self runAll\" \r\t| theTest ens result |\r\ttheTest _ RVMTest \r\t\tsetUp: [:test|   \"no setup needed\"]\r\t\ttest:[:test :env| \r\t\t\tens _ %{#(1). #(2)}.\r\t\t\tresult _ ens perform: #at:put: with: 1 with: 4 ING:#totalling.\r\t\t\ttest assert:  result = 8\r\t\t\t\t ifFail:[test log:' failed: %{#(1). #(2)} perform: #at:put: with: 1 with 4 ING:#totalling  ==> ', result  printString].\r\t\t\t]\r\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\r\ttheTest name: 'gerundPerformWithWithTest'.\r\t^theTest! !\r!Sly3SyntaxTests class methodsFor: 'harness' stamp: 'dmu 9/3/2010 11:50'!\rrunAll\r\tsuper runAll! !\r!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:50'!\rmembersTest\r\t\"Sly3SyntaxTests ensMembersTest run\"\r\t\"Sly3SyntaxTests runAll\"\r\t| theTest ens result |\r\ttheTest _ RVMTest  \r\t\tsetUp: [:test|   \"no setup needed\"]\r\t\ttest:[:test :env| \r\t\t\tens _ %{{1. 2}. {3. 4}. {5. 6}}.\r\t\t\tresult _ ens members.\r\t\t\ttest assert:  result = {{1. 2}. {3. 4}. {5. 6}}\r\t\t\t]\r\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\r\ttheTest name: 'ensMembersTest'.\r\t^theTest! !\r!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/24/2010 00:37'!\rprintStringTest\r\t\"Sly3SyntaxTests printStringTest run\"\r\t\"Sly3SyntaxTests runAll\" \r\t| theTest ens result |\r\ttheTest _ RVMTest \r\t\tsetUp: [:test|   \"no setup needed\"]\r\t\ttest:[:test :env| \r\t\t\tens _ %{1. 2. 3}.\r\t\t\tresult _ ens plainLYprintString.\r\t\t\ttest assert:  result = '%{1. 2. 3. }'\r\t\t\t]\r\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\r\ttheTest name: 'printStringTest'.\r\t^theTest! !\r!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:51'!\rsizeTest\r\t\"Sly3SyntaxTests sizeTest run\"\r\t\"Sly3SyntaxTests runAll\"\r\t| theTest ens result | \r\ttheTest _ RVMTest \r\t\tsetUp: [:test|   \"no setup needed\"]\r\t\ttest:[:test :env| \r\t\t\tens _ %{{1. 2}. {3. 4}. {5. 6}}.\r\t\t\tresult _ ens collectionLYsize.\r\t\t\ttest assert:  result = 3\r\t\t\t]\r\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\r\ttheTest name: 'sizeTest'.\r\t^theTest! !\r!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:51'!\radverbKeywordTest\r\"SlySyntaxTests adverbKeywordTest run\"\r\"SlySyntaxTests runAll\"\r| theTest ens result | \rtheTest _ RVMTest \r\tsetUp: [:test|   \"no setup needed\"]\r\ttest:[:test :env| \r\t\tens _ %{{1. 2}. {3. 4}. {5. 6}}.\r\t\tself halt.\r\t\tresult _ ens comma: {9. 10} LY:#wholly.\r\t\ttest assert:  result ENSmembers asArray  = #(#(1 2 9 10) #(3 4 9 10) #(5 6 9 10))\r\t\t\t ifFail:[test log:' failed: %{{1. 2}. {3. 4}. {5. 6}} comma: {9. 10} LY:#wholly ==> ', result ENSmembers asArray printString].\r\t\t]\r\tasserting:[:test :outcome| true \"assertions will also be checked\"].\rtheTest name: 'adverbKeywordTest'.\r^theTest! !\r!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:51'!\radverbUnaryTest\r\"self adverbUnaryTest run\"\r\"self runAll\"\r| theTest ens result |\rtheTest _ RVMTest  \r\tsetUp: [:test|   \"no setup needed\"]\r\ttest:[:test :env| \r\t\tens _ %{1. 2. 3}.\r\t\tresult _ ens oddLY:#randomly.\r\t\ttest assert:  (result ENSmembers size = 1) & (result ENSmembers first isBoolean)\r\t\t\t ifFail:[test log:' failed: %{1. 2. 3} oddLY:#randomly ==> ', result ENSmembers printString].\r\t\t]\r\tasserting:[:test :outcome| true \"assertions will also be checked\"].\rtheTest name: 'adverbUnaryTest'.\r^theTest! !\r!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:51'!\rargAdverbRoundlyTest\r\"self argAdverbRoundlyTest run\"\r\"self runAll\"\r| theTest ens result | \rtheTest _ RVMTest \r\tsetUp: [:test|   \"no setup needed\"]\r\ttest:[:test :env| \r\t\tens _ %{1. 2. 3}.\r\t\tresult _ ens plus: #(4 5 6 7 8 9) LY:#roundly.\r\t\ttest assert:  result ENSmembers asArray = #(5 7 9 8 10 12)\r\t\t\t ifFail:[test log:' failed: %{1. 2. 3} plus: #(4 5 6 7 8 9) LY:#roundly ==> ', result ENSmembers asArray printString].\r\t\t]\r\tasserting:[:test :outcome| true \"assertions will also be checked\"].\rtheTest name: 'argAdverbRoundlyTest'.\r^theTest! !\r!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\rargAdverbWhollyTest\r\"self argAdverbWhollyTest run\"\r\"self runAll\"\r| theTest ens result | \rtheTest _ RVMTest \r\tsetUp: [:test|   \"no setup needed\"]\r\ttest:[:test :env| \r\t\tens _ %{{1. 2}. {3. 4}. {5. 6}}.\r\t\tresult _ ens comma: {9. 10} LY:#wholly.\r\t\ttest assert:  result ENSmembers asArray  = #(#(1 2 9 10) #(3 4 9 10) #(5 6 9 10))\r\t\t\t ifFail:[test log:' failed: %{{1. 2}. {3. 4}. {5. 6}} comma: {9. 10} LY:#wholly ==> ', result ENSmembers asArray printString].\r\t\t]\r\tasserting:[:test :outcome| true \"assertions will also be checked\"].\rtheTest name: 'argAdverbWhollyTest'.\r^theTest! !\r!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\rensMembersTest\r\"SlySyntaxTests ensMembersTest run\"\r\"SlySyntaxTests runAll\"\r| theTest ens result | \rtheTest _ RVMTest \r\tsetUp: [:test|   \"no setup needed\"]\r\ttest:[:test :env| \r\t\tens _ %{{1. 2}. {3. 4}. {5. 6}}.\r\t\tresult _ ens ENSmembers.\r\t\ttest assert:  result = {{1. 2}. {3. 4}. {5. 6}}\r\t\t\t ifFail:[test log:' failed: %{{1. 2}. {3. 4}. {5. 6}} ENSmembers ==> ', result ENSmembers size printString].\r\t\t]\r\tasserting:[:test :outcome| true \"assertions will also be checked\"].\rtheTest name: 'ensMembersTest'.\r^theTest! !\r!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\rensPrintStringTest\r\"SlySyntaxTests ensPrintStringTest run\"\r\"SlySyntaxTests runAll\"\r| theTest ens result | \rtheTest _ RVMTest \r\tsetUp: [:test|   \"no setup needed\"]\r\ttest:[:test :env| \r\t\tens _ %{1. 2. 3}.\r\t\tresult _ ens ENSprintString.\r\t\ttest assert:  result = '%{1. 2. 3. }'\r\t\t\t ifFail:[test log:' failed: %{1. 2. 3} ENSprintString ==> ', result ENSmembers size printString].\r\t\t]\r\tasserting:[:test :outcome| true \"assertions will also be checked\"].\rtheTest name: 'ensPrintStringTest'.\r^theTest! !\r!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\rensSizeTest\r\"SlySyntaxTests ensSizeTest run\"\r\"SlySyntaxTests runAll\" \r| theTest ens result |\rtheTest _ RVMTest \r\tsetUp: [:test|   \"no setup needed\"]\r\ttest:[:test :env| \r\t\tens _ %{{1. 2}. {3. 4}. {5. 6}}.\r\t\tresult _ ens ENSsize.\r\t\ttest assert:  result = 3\r\t\t\t ifFail:[test log:' failed: %{{1. 2}. {3. 4}. {5. 6}} ENSsize ==> ', result ENSmembers size printString].\r\t\t]\r\tasserting:[:test :outcome| true \"assertions will also be checked\"].\rtheTest name: 'ensSizeTest'.\r^theTest! !\r!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\rgerundAndingTest\r\"self gerundAndingTest run\"\r\"self runAll\"\r| theTest ens result | \rtheTest _ RVMTest \r\tsetUp: [:test|   \"no setup needed\"]\r\ttest:[:test :env| \r\t\tens _ %{1. 2. 3}.\r\t\tresult _ ens oddING: #anding.\r\t\ttest assert:  result = false\r\t\t\t ifFail:[test log:' failed: %{1. 2. 3} oddING: #anding ==> ', result  printString].\r\t\t]\r\tasserting:[:test :outcome| true \"assertions will also be checked\"].\rtheTest name: 'gerundAndingTest'.\r^theTest! !\r!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\rgerundDoubleKeywordTest\r\"self gerundDoubleKeywordTest run\"\r\"self runAll\"\r| theTest ens result |\rtheTest _ RVMTest  \r\tsetUp: [:test|   \"no setup needed\"]\r\ttest:[:test :env| \r\t\tens _ %{#(1). #(2)}.\r\t\tresult _ ens at: 1 put: 4 ING:#totalling.\r\t\ttest assert:  result = 8\r\t\t\t ifFail:[test log:' failed:  %{#(1). #(2)} at: 1 put: 4 ING:#totalling  ==> ', result  printString].\r\t\t]\r\tasserting:[:test :outcome| true \"assertions will also be checked\"].\rtheTest name: 'gerundDoubleKeywordTest'.\r^theTest! !\r!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\rgerundOnlyAveragingTest\r\"self gerundOnlyAveragingTest run\"\r\"self runAll\"\r| theTest ens result |\rtheTest _ RVMTest \r\tsetUp: [:test|   \"no setup needed\"] \r\ttest:[:test :env| \r\t\tens _ %{1. 2. 3}.\r\t\tresult _ ens ING: #averaging.\r\t\ttest assert:  result = 2\r\t\t\t ifFail:[test log:' failed: %{1. 2. 3} ING: #averaging ==> ', result ENSmembers printString].\r\t\t]\r\tasserting:[:test :outcome| true \"assertions will also be checked\"].\rtheTest name: 'gerundOnlyAveragingTest'.\r^theTest! !\r!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\rgerundOnlyConcatenatingTest\r\"self gerundOnlyConcatenatingTest run\" \r\"self runAll\"\r| theTest ens result |\rtheTest _ RVMTest \r\tsetUp: [:test|   \"no setup needed\"]\r\ttest:[:test :env| \r\t\tens _ %{'hello'. ' '. 'world'}.\r\t\tresult _ ens ING: #concatenating.\r\t\ttest assert:  result = 'hello world'\r\t\t\t ifFail:[test log:' failed: %{''hello''. '' ''. ''world''} ING:#concatenating ==> ', result ENSmembers printString].\r\t\t]\r\tasserting:[:test :outcome| true \"assertions will also be checked\"].\rtheTest name: 'gerundOnlyConcatenatingTest'.\r^theTest! !\r!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\rgerundOnlyTest\r\"self gerundOnlyTest run\"\r\"self runAll\"\r| theTest ens result | \rtheTest _ RVMTest \r\tsetUp: [:test|   \"no setup needed\"]\r\ttest:[:test :env| \r\t\tens _ %{1. 2. 3}.\r\t\tresult _ ens ING: #totalling.\r\t\ttest assert:  result = 6\r\t\t\t ifFail:[test log:' failed: %{1. 2. 3} ING: #totalling ==> ', result ENSmembers printString].\r\t\t]\r\tasserting:[:test :outcome| true \"assertions will also be checked\"].\rtheTest name: 'gerundOnlyTest'.\r^theTest! !\r!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\rgerundOnlyTotallingTest\r\"self gerundOnlyTotallingTest run\"\r\"self runAll\"\r| theTest ens result |\rtheTest _ RVMTest  \r\tsetUp: [:test|   \"no setup needed\"]\r\ttest:[:test :env| \r\t\tens _ %{1. 2. 3}.\r\t\tresult _ ens ING: #totalling.\r\t\ttest assert:  result = 6\r\t\t\t ifFail:[test log:' failed: %{1. 2. 3} ING: #totalling ==> ', result ENSmembers printString].\r\t\t]\r\tasserting:[:test :outcome| true \"assertions will also be checked\"].\rtheTest name: 'gerundOnlyTotallingTest'.\r^theTest! !\r!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\rgerundOringTest\r\"self gerundOringTest run\"\r\"self runAll\"\r| theTest ens result |\rtheTest _ RVMTest \r\tsetUp: [:test|   \"no setup needed\"] \r\ttest:[:test :env| \r\t\tens _ %{1. 2. 3}.\r\t\tresult _ ens oddING: #oring.\r\t\ttest assert:  result = true\r\t\t\t ifFail:[test log:' failed: %{1. 2. 3} oddING: #oring ==> ', result  printString].\r\t\t]\r\tasserting:[:test :outcome| true \"assertions will also be checked\"].\rtheTest name: 'gerundOringTest'.\r^theTest! !\r!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\rgerundSingleKeywordTest\r\"self gerundSingleKeywordTest run\"\r\"self runAll\"\r| theTest ens result |\rtheTest _ RVMTest \r\tsetUp: [:test|   \"no setup needed\"] \r\ttest:[:test :env| \r\t\tens _ %{1. 2. 3}.\r\t\tresult _ ens plus: 1 ING:#totalling.\r\t\ttest assert:  result = 9\r\t\t\t ifFail:[test log:' failed: %{1. 2. 3} plus: 1 ING:#totalling ==> ', result  printString].\r\t\t]\r\tasserting:[:test :outcome| true \"assertions will also be checked\"].\rtheTest name: 'gerundSingleKeywordTest'.\r^theTest! !\r!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\rgerundTripleKeywordTest\r\"self gerundTripleKeywordTest run\"\r\"self runAll\"\r| theTest ens result | \rtheTest _ RVMTest \r\tsetUp: [:test|   \"no setup needed\"]\r\ttest:[:test :env| \r\t\tens _ %{#(1). #(2)}.\r\t\tresult _ ens changed:#foo with:#bar from:self ING:#concatenating.\r\t\ttest assert:  result  = #( 1 2)\r\t\t\t ifFail:[test log:' failed: %{#(1). #(2)} changed:#foo with:#bar from:self ING:#concatenating  ==> ', result  printString].\r\t\t]\r\tasserting:[:test :outcome| true \"assertions will also be checked\"].\rtheTest name: 'gerundTripleKeywordTest'.\r^theTest! !\r!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\rgerundUnaryTest\r\"self gerundUnaryTest run\"\r\"self runAll\"\r| theTest ens result |\rtheTest _ RVMTest \r\tsetUp: [:test|   \"no setup needed\"] \r\ttest:[:test :env| \r\t\tens _ %{1. 2. 3}.\r\t\tresult _ ens oddING: #anding.\r\t\ttest assert:  result = false\r\t\t\t ifFail:[test log:' failed: %{1. 2. 3} oddING: #anding ==> ', result  printString].\r\t\t]\r\tasserting:[:test :outcome| true \"assertions will also be checked\"].\rtheTest name: 'gerundUnaryTest'.\r^theTest! !\r!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\rmsgAdvKeywordTest\r\"self msgAdvKeywordTest run\"\r\"self runAll\"\r| theTest ens result |\rtheTest _ RVMTest \r\tsetUp: [:test|   \"no setup needed\"]\r\ttest:[:test :env| \r\t\tens _ %{1. 2. 3}. \r\t\tresult _ ens LY:#randomly plus:1.\r\t\ttest assert:  (result ENSmembers size = 1)\r\t\t\t ifFail:[test log:' failed: %{1. 2. 3} LY:#randomly plus:1 ==> ', result ENSmembers printString].\r\t\t]\r\tasserting:[:test :outcome| true \"assertions will also be checked\"].\rtheTest name: 'msgAdvKeywordTest'.\r^theTest! !\r!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\rmsgAdvOnlyRandomlyTest\r\"self msgAdvOnlyRandomlyTest run\"\r\"self runAll\"\r| theTest ens result |\rtheTest _ RVMTest \r\tsetUp: [:test|   \"no setup needed\"]\r\ttest:[:test :env|  \r\t\tens _ %{1. 2. 3}.\r\t\tresult _ ens yourselfLY:#randomly.\r\t\ttest assert:  (result ENSmembers size = 1)\r\t\t\t ifFail:[test log:' failed: %{1. 2. 3} LY:#randomly ==> ', result ENSmembers printString].\r\t\t]\r\tasserting:[:test :outcome| true \"assertions will also be checked\"].\rtheTest name: 'msgAdvOnlyRandomlyTest'.\r^theTest! !\r!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\rmsgAdvRandomly2Test\r\"self msgAdvRandomly2Test run\"\r\"self runAll\"\r| theTest ens result |\rtheTest _ RVMTest \r\tsetUp: [:test|   \"no setup needed\"] \r\ttest:[:test :env| \r\t\tens _ %{1. 2. 3}.\r\t\tresult _ ens oddLY:#(#randomly: 2).\r\t\ttest assert:  (result ENSmembers size = 2)\r\t\t\t ifFail:[test log:' failed: %{1. 2. 3} oddLY:#(#randomly: 2) ==> ', result ENSmembers printString].\r\t\t]\r\tasserting:[:test :outcome| true \"assertions will also be checked\"].\rtheTest name: 'msgAdvRandomly2Test'.\r^theTest! !\r!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\rmsgAdvRandomlyTest\r\"self msgAdvRandomlyTest run\"\r\"self runAll\"\r| theTest ens result | \rtheTest _ RVMTest \r\tsetUp: [:test|   \"no setup needed\"]\r\ttest:[:test :env| \r\t\tens _ %{1. 2. 3}.\r\t\tresult _ ens oddLY:#randomly.\r\t\ttest assert:  (result ENSmembers size = 1)\r\t\t\t ifFail:[test log:' failed: %{1. 2. 3} oddLY:#randomly ==> ', result ENSmembers printString].\r\t\t]\r\tasserting:[:test :outcome| true \"assertions will also be checked\"].\rtheTest name: 'msgAdvRandomlyTest'.\r^theTest! !\r!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:53'!\rmsgAdvSelectivelyTest\r\"self msgAdvSelectivelyTest run\"\r\"self runAll\"\r| theTest ens result |\rtheTest _ RVMTest \r\tsetUp: [:test|   \"no setup needed\"]\r\ttest:[:test :env|  \r\t\tens _ %{1. 2. 3}.\r\t\tresult _ ens yourselfLY:{#selectively:. [:mbr| mbr odd]}.\r\t\ttest assert:  result ENSmembers asArray = #(1 3)\r\t\t\t ifFail:[test log:' failed: %{1. 2. 3} yourselfLy:{#selectively:. [:mbr| mbr odd]} ==> ', result ENSmembers printString].\r\t\t]\r\tasserting:[:test :outcome| true \"assertions will also be checked\"].\rtheTest name: 'msgAdvSelectivelyTest'.\r^theTest! !\r!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:53'!\rnormalBinaryTest\r\"self normalBinaryTest run\"\r\"self runAll\"\r| theTest ens result |\rtheTest _ RVMTest \r\tsetUp: [:test|   \"no setup needed\"] \r\ttest:[:test :env| \r\t\tens _ %{1. 2. 3}.\r\t\tresult _ ens +1.\r\t\ttest assert:  result ENSmembers = {2. 3. 4}\r\t\t\t ifFail:[test log:' failed: %{1. 2. 3} + 1 ==> ', result ENSmembers printString].\r\t\t]\r\tasserting:[:test :outcome| true \"assertions will also be checked\"].\rtheTest name: 'normalBinaryTest'.\r^theTest! !\r!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:53'!\rnormalKeywordTest\r\"self normalKeywordTest run\"\r\"self runAll\"\r| theTest ens result |\rtheTest _ RVMTest  \r\tsetUp: [:test|   \"no setup needed\"]\r\ttest:[:test :env| \r\t\tens _ %{1. 2. 3}.\r\t\tresult _ ens plus: 1.\r\t\ttest assert:  result ENSmembers = {2. 3. 4}\r\t\t\t ifFail:[test log:' failed: %{1. 2. 3} plus: 1 ==> ', result ENSmembers printString].\r\t\t]\r\tasserting:[:test :outcome| true \"assertions will also be checked\"].\rtheTest name: 'normalKeywordTest'.\r^theTest! !\r!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:53'!\rnormalUnaryTest\r\"self normalUnaryTest run\"\r\"self runAll\"\r| theTest ens result |\rtheTest _ RVMTest  \r\tsetUp: [:test|   \"no setup needed\"]\r\ttest:[:test :env| \r\t\tens _ %{1. 2. 3}.\r\t\tresult _ ens odd.\r\t\ttest assert:  result ENSmembers = {true. false. true}\r\t\t\t ifFail:[test log:' failed: %{1. 2. 3} odd ==> ', result ENSmembers printString].\r\t\t]\r\tasserting:[:test :outcome| true \"assertions will also be checked\"].\rtheTest name: 'normalUnaryTest'.\r^theTest! !\r!SlySyntaxTests class methodsFor: 'isolated failures' stamp: 'dmu 9/16/2010 23:52'!\rgerundPerformWithWithTest\r\"CURRENTLY FAILS\"\r\"self gerundPerformWithWithTest run\"\r\"self runAll\"\r| theTest ens result | \rtheTest _ RVMTest \r\tsetUp: [:test|   \"no setup needed\"]\r\ttest:[:test :env| \r\t\tens _ %{#(1). #(2)}.\r\t\tresult _ ens perform: #at:put: with: 1 with: 4 ING:#totalling.\r\t\ttest assert:  result = 8\r\t\t\t ifFail:[test log:' failed: %{#(1). #(2)} perform: #at:put: with: 1 with 4 ING:#totalling  ==> ', result  printString].\r\t\t]\r\tasserting:[:test :outcome| true \"assertions will also be checked\"].\rtheTest name: 'gerundPerformWithWithTest'.\r^theTest! !\r!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:53'!\rmsgAdvSeriallyTest\r\"self msgAdvSeriallyTest run\"\r\"self runAll\"\r| theTest ens result |\rtheTest _ RVMTest  \r\tsetUp: [:test|   \"no setup needed\"]\r\ttest:[:test :env| \r\t\tens _ %{1. 2. 3. 4. 5. 6. 7. 8. 9}.\r\t\tresult _ ens yourselfLY:#serially.\r\t\ttest assert:  (result ENSmembers asArray = {1. 2. 3. 4. 5. 6. 7. 8. 9})\r\t\t\t ifFail:[test log:' failed: %{1. 2. 3. 4. 5. 6. 7. 8. 9} yourselfLY:#serially ==> ', result ENSmembers printString].\r\t\t]\r\tasserting:[:test :outcome| true \"assertions will also be checked\"].\rtheTest name: 'msgAdvSeriallyTest'.\r^theTest! !\r!Sly3Boid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:51'!\rflock\r\t\"Answer the value of flock\"\r\r\tflock isNil ifTrue:[self flock: #()].\r\t^ flock! !\r!Sly3Boid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 22:38'!\rflock: anObject\r\t\"Set the value of flock\"\r\r\tflock _ anObject! !\r!Sly3Boid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:57'!\rlastDrawnPosition\r\t\"Answer the value of lastDrawnPosition\"\r\r\tlastDrawnPosition isNil ifTrue:[self lastDrawnPosition: self position].\r\t^ lastDrawnPosition! !\r!Sly3Boid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:00'!\rlastDrawnPosition: anObject\r\t\"Set the value of lastDrawnPosition\"\r\r\tlastDrawnPosition _ anObject! !\r!Sly3Boid methodsFor: 'accessing' stamp: 'dmu 3/23/2010 00:05'!\rlastLastDrawnPosition\r\t\"Answer the value of lastLastDrawnPosition\"\r\r\tlastLastDrawnPosition isNil ifTrue:[self lastLastDrawnPosition: self lastDrawnPosition].\r\t^ lastLastDrawnPosition! !\r!Sly3Boid methodsFor: 'accessing' stamp: 'dmu 3/22/2010 23:53'!\rlastLastDrawnPosition: anObject\r\t\"Set the value of lastLastDrawnPosition\"\r\r\tlastLastDrawnPosition _ anObject! !\r!Sly3Boid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:53'!\rneighbors\r\t\"Answer the value of neighbors\"\r\r\tneighbors isNil ifTrue:[self neighbors: #()].\r\t^ neighbors! !\r!Sly3Boid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 22:38'!\rneighbors: anObject\r\t\"Set the value of neighbors\"\r\r\tneighbors _ anObject! !\r!Sly3Boid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 22:39'!\rposition\r\t\"Answer the value of position\"\r\r\tposition isNil ifTrue:[self position: 500@500].\r\t^ position! !\r!Sly3Boid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 22:38'!\rposition: anObject\r\t\"Set the value of position\"\r\r\tposition _ anObject! !\r!Sly3Boid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 22:39'!\rvelocity\r\t\"Answer the value of velocity\"\r\r\tvelocity isNil ifTrue:[self velocity: 0@0].\r\t^ velocity! !\r!Sly3Boid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 22:38'!\rvelocity: anObject\r\t\"Set the value of velocity\"\r\r\tvelocity _ anObject! !\r!Sly3Boid methodsFor: 'as yet unclassified' stamp: 'dmu 9/3/2010 00:00'!\rcomputeCentroid\r[\"buttonize next two lines for a trigger setting button\"\r\"Click To Set Trigger\"\r\"  ONEHALT _ true\"     \r].\r\r\"ONEHALT ifTrue:[ONEHALT _ false. self halt].\"\r\r\t^ (self flock boids members collect: [:m| m position]) average! !\r!Sly3Boid methodsFor: 'as yet unclassified' stamp: 'dmu 9/3/2010 00:01'!\rcomputeNeighbors\r\t^self flock boids members select:[:m| m isNear: self]! !\r!Sly3Boid methodsFor: 'as yet unclassified' stamp: 'dmu 9/8/2010 02:07'!\rdraw\r\t| p |\r\tself lastDrawnPosition = self position ifTrue: [^ self].\r\tp _ self position.\r\t\r\tfalse ifTrue: [\r\t\tSly3Graphics drawWhiteCircle: self lastDrawnPosition.\r\t\tSly3Graphics drawCircle: p.\r\t\t\"Sly3Graphics drawFrom: self lastDrawnPosition to: p.\"\r\t]\r\tifFalse: [\r\t\tSly3Graphics drawFrom: self lastDrawnPosition to: p. \r\t\tSly3Graphics eraseFrom: self lastLastDrawnPosition to: self lastDrawnPosition.\r\t].\r\t\r\tself lastLastDrawnPosition: self lastDrawnPosition.\r\tself lastDrawnPosition: p! !\r!Sly3Boid methodsFor: 'as yet unclassified' stamp: 'dmu 9/8/2010 02:22'!\rfly\r\t| centroid |\r\t[Sly3 keepFlying] whileTrue:[\r\t\tcentroid _ self computeCentroid.\r\t\tself moveToNewPosition: centroid.\r\t\tself flock maybeYield\r\t]! !\r!Sly3Boid methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:15'!\rgo\r\tself fly! !\r!Sly3Boid methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 22:43'!\risNear: aBoid\r\t^ (self ~== aBoid) and: [(self position dist: aBoid position) <= 10]! !\r!Sly3Boid methodsFor: 'as yet unclassified' stamp: 'dmu 9/3/2010 00:04'!\rkeepAwayFromNeighbors\r\t| sum |\r\tself neighbors ifEmpty: [^ 0@0].\r\tsum _ 0.\r\tself neighbors  do: [:m | sum _ sum + (self position - m position)].\r\t^ sum / self neighbors size asFloat! !\r!Sly3Boid methodsFor: 'as yet unclassified' stamp: 'dmu 3/24/2010 15:30'!\rlimitPositionFrom: min to: max\r\t| r pos |\r\tpos _ self position.\r\tr _ ((pos max: min@min) min: max@max).\r\tr = pos ifTrue: [^ self].\r\tpos x < min ifTrue: [r _                 min + (min - pos x)  @  pos y. self velocity: self velocity x negated @ self velocity y].\r\tpos y < min ifTrue: [r _ pos x @ (min + (min - pos y)).               self velocity: self velocity x             @ self velocity y negated].\r\tpos x > max ifTrue: [r _                 max - (pos x - max) @ pos y.  self velocity: self velocity x negated @ self velocity y ].\r\tpos y > max ifTrue: [r _ pos x @ (max - (pos y - max)).              self velocity: self velocity x              @ self velocity y negated].\r\tself position: r! !\r!Sly3Boid methodsFor: 'as yet unclassified' stamp: 'dmu 3/24/2010 15:36'!\rlimitVelocityTo: n\r\t| ns v vs q |\r\tns _ n * n * 2.\r\tv _ self velocity.\r\tvs _ v x squared + v y squared.\r\tvs <= ns ifTrue: [^ self].\r\tq _ (ns / vs) sqrt.\r\tself velocity: v * q.! !\r!Sly3Boid methodsFor: 'as yet unclassified' stamp: 'dmu 9/3/2010 15:54'!\rmatchVelocityWithNeighbors\r\tself neighbors  size = 0 ifTrue:  [^ 0@0].\r\t^ (self neighbors  collect: [:m| m velocity]) average / 8.0! !\r!Sly3Boid methodsFor: 'as yet unclassified' stamp: 'dmu 3/24/2010 15:04'!\rmoveToNewPosition: centroid\r\t| a b c |\r\tself neighbors: self computeNeighbors.\r\ta _ self moveTowardCentroidOfAllOthers: centroid.\r\tb _ self keepAwayFromNeighbors.\r\tc _ self matchVelocityWithNeighbors.\r\tself velocity: self velocity + a + b + c.\r\tself limitVelocityTo: 10.\r\tself position: self position + self velocity.\r\tself limitPositionFrom: 0 to: 1000! !\r!Sly3Boid methodsFor: 'as yet unclassified' stamp: 'dmu 9/8/2010 02:16'!\rmoveTowardCentroidOfAllOthers: centroid\r\t| perceivedCentroid s |\r\t\"collectionLYSize introduces overhead.\"\r\ts _ self flock boids collectionLYsize.\r\ts < 2 ifTrue: [^ 0@0].\r\tperceivedCentroid _ (centroid * s - self position) / (s - 1).\r\t^ (perceivedCentroid - self position) / 100.0! !\r!Sly3Boid methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 22:54'!\rperturb\r\tself position: (self position perturb: 100).\r\tself velocity: (self velocity perturb: 2).! !\r!Sly3Boids methodsFor: 'as yet unclassified' stamp: 'dmu 8/23/2010 15:52'!\rboidClass\r\t^ Sly3Boid! !\r!Sly3Boids methodsFor: 'as yet unclassified' stamp: 'dmu 9/17/2010 15:37'!\rflockSize\r\t\"RVMTester coreCount - 6 max: 10\".\r\t^ 3! !\r!Sly3Boids methodsFor: 'as yet unclassified' stamp: 'dmu 9/16/2010 23:58'!\rrun\r\t\"Transcript show: (Time millisecondsToRun: [Sly3Boids new run]); cr\"\r\t\"[ Sly3Boids new run ] fork\"\r\t| c flock drawer flockAndDrawer n |\r\tc _ OrderedCollection new.\r\tn _ self flockSize.\r\t1 to: n do: [:i| c add: self boidClass new perturb].\r\tflock _ Sly3Flock boids: c asEnsembleOfElements.\r\tflock boids flock: flock.\r\tdrawer _ self drawerClass flock: flock.\r\tflockAndDrawer _ %{flock. drawer}.\r\t\"SlyGraphics clearScreen.\"\r\tflockAndDrawer  go ! !\rSly3Boids class\r\tinstanceVariableNames: ''!\r!Sly3Boids class methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 22:30'!\rrun\r\t^ self new run! !\r!Sly3Drawer methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:06'!\rflock\r\t\"Answer the value of flock\"\r\r\tflock isNil ifTrue:[self flock: nil].\r\t^ flock! !\r!Sly3Drawer methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:06'!\rflock: anObject\r\t\"Set the value of flock\"\r\r\tflock _ anObject! !\r!Sly3Drawer methodsFor: 'as yet unclassified' stamp: 'dmu 9/8/2010 02:28'!\rgo\r\tProcessor thisProcess useOnlyMainCore. \"for bitblt efficiency\"\r\t[flock isDone] whileFalse: [flock boids members do: [:b| b draw]]! !\rSly3Drawer class\r\tinstanceVariableNames: ''!\r!Sly3Drawer class methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:07'!\rflock: f\r\t^ self new flock: f! !\r!Sly3Flock methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:39'!\rboids\r\t\"Answer the value of boids\"\r\r\t^ boids! !\r!Sly3Flock methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:11'!\rboids: anObject\r\t\"Set the value of boids\"\r\r\tboids _ anObject! !\r!Sly3Flock methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:12'!\risDone\r\t\"Answer the value of isDone\"\r\r\tisDone isNil ifTrue:[self isDone: false].\r\t^ isDone! !\r!Sly3Flock methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:12'!\risDone: anObject\r\t\"Set the value of isDone\"\r\r\tisDone _ anObject! !\r!Sly3Flock methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:13'!\rgo\r\tself isDone: false.\r\tboids fly.\r\tself isDone: true! !\r!Sly3Flock methodsFor: 'as yet unclassified' stamp: 'dmu 9/7/2010 17:32'!\rmaybeYield\r\t| n |\r\t\"[Processor yield. ^self]value.\"\r\tSly3 serializeForDebugging ifTrue: [Processor yield. ^ self].\r\tn _self boids collectionLYsize + 1 \"1 for Drawer\".\r\tProcessor yieldIfFewerCoresThan: n! !\rSly3Flock class\r\tinstanceVariableNames: ''!\r!Sly3Flock class methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:11'!\rboids: b\r\t^ self new boids: b! !\r!Sly3UnprocessedEnsembleMessage methodsFor: 'accessing' stamp: 'dmu 9/16/2010 23:59'!\rreceiver\r\t\"Answer the value of receiver\"\r\t\"Send no messages; might be an ensemble\"\r\r\tnil == receiver ifTrue:[self receiver: ( %{})].\r\t^ receiver! !\rPreferences disable: #nicerSystemViews!\r"
  },
  {
    "path": "vm/RoarVM.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t0A278518128DBF7400336BDE /* externals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2783F6128DBF7300336BDE /* externals.cpp */; };\n\t\t0A278519128DBF7400336BDE /* FilePlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A278400128DBF7300336BDE /* FilePlugin.c */; };\n\t\t0A27851A128DBF7400336BDE /* sqFilePluginBasicPrims.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A278402128DBF7300336BDE /* sqFilePluginBasicPrims.c */; };\n\t\t0A27851E128DBF7400336BDE /* B2DPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A27840F128DBF7300336BDE /* B2DPlugin.c */; };\n\t\t0A27851F128DBF7400336BDE /* BitBltPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A278411128DBF7300336BDE /* BitBltPlugin.c */; };\n\t\t0A278520128DBF7400336BDE /* FloatArrayPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A278413128DBF7300336BDE /* FloatArrayPlugin.c */; };\n\t\t0A278521128DBF7400336BDE /* LargeIntegers.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A278415128DBF7300336BDE /* LargeIntegers.c */; };\n\t\t0A278522128DBF7400336BDE /* Matrix2x3Plugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A278417128DBF7300336BDE /* Matrix2x3Plugin.c */; };\n\t\t0A278523128DBF7400336BDE /* MiscPrimitivePlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A278419128DBF7300336BDE /* MiscPrimitivePlugin.c */; };\n\t\t0A278524128DBF7400336BDE /* SocketPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A27841B128DBF7300336BDE /* SocketPlugin.c */; };\n\t\t0A278525128DBF7400336BDE /* SoundPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A27841D128DBF7300336BDE /* SoundPlugin.c */; };\n\t\t0A278529128DBF7400336BDE /* aio.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A278426128DBF7300336BDE /* aio.c */; };\n\t\t0A278531128DBF7400336BDE /* sqUnixCustomSound.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A27843D128DBF7300336BDE /* sqUnixCustomSound.c */; };\n\t\t0A278533128DBF7400336BDE /* sqUnixSoundNull.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A278442128DBF7300336BDE /* sqUnixSoundNull.c */; };\n\t\t0A278534128DBF7400336BDE /* abstract_mark_sweep_collector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278444128DBF7300336BDE /* abstract_mark_sweep_collector.cpp */; };\n\t\t0A278535128DBF7400336BDE /* abstract_object_heap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278446128DBF7300336BDE /* abstract_object_heap.cpp */; };\n\t\t0A278536128DBF7400336BDE /* memory_system.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A27844D128DBF7300336BDE /* memory_system.cpp */; };\n\t\t0A278537128DBF7400336BDE /* multicore_object_heap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278450128DBF7300336BDE /* multicore_object_heap.cpp */; };\n\t\t0A278538128DBF7400336BDE /* multicore_object_table.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278453128DBF7300336BDE /* multicore_object_table.cpp */; };\n\t\t0A27853C128DBF7400336BDE /* squeak_image_reader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278460128DBF7300336BDE /* squeak_image_reader.cpp */; };\n\t\t0A27853D128DBF7400336BDE /* at_cache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278464128DBF7300336BDE /* at_cache.cpp */; };\n\t\t0A27853E128DBF7400336BDE /* interpreter_bytecodes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278467128DBF7300336BDE /* interpreter_bytecodes.cpp */; };\n\t\t0A27853F128DBF7400336BDE /* interpreter_primitives.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278469128DBF7300336BDE /* interpreter_primitives.cpp */; };\n\t\t0A278540128DBF7400336BDE /* method_cache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A27846B128DBF7300336BDE /* method_cache.cpp */; };\n\t\t0A278541128DBF7400336BDE /* obsolete_indexed_primitive_table.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A27846D128DBF7300336BDE /* obsolete_indexed_primitive_table.cpp */; };\n\t\t0A278542128DBF7400336BDE /* obsolete_named_primitive_table.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A27846F128DBF7300336BDE /* obsolete_named_primitive_table.cpp */; };\n\t\t0A278543128DBF7400336BDE /* primitive_table.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278471128DBF7300336BDE /* primitive_table.cpp */; };\n\t\t0A278544128DBF7400336BDE /* squeak_interpreter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278473128DBF7400336BDE /* squeak_interpreter.cpp */; };\n\t\t0A278545128DBF7400336BDE /* abstract_message.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A27847B128DBF7400336BDE /* abstract_message.cpp */; };\n\t\t0A278546128DBF7400336BDE /* deferred_request.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A27847D128DBF7400336BDE /* deferred_request.cpp */; };\n\t\t0A278547128DBF7400336BDE /* interactions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A27847F128DBF7400336BDE /* interactions.cpp */; };\n\t\t0A278548128DBF7400336BDE /* interpreter_subset_for_control_transfer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278481128DBF7400336BDE /* interpreter_subset_for_control_transfer.cpp */; };\n\t\t0A278549128DBF7400336BDE /* message_classes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278483128DBF7400336BDE /* message_classes.cpp */; };\n\t\t0A27854A128DBF7400336BDE /* message_or_ack_request.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278485128DBF7400336BDE /* message_or_ack_request.cpp */; };\n\t\t0A27854B128DBF7400336BDE /* message_statics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278487128DBF7400336BDE /* message_statics.cpp */; };\n\t\t0A27854C128DBF7400336BDE /* message_stats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278489128DBF7400336BDE /* message_stats.cpp */; };\n\t\t0A27854D128DBF7400336BDE /* receive_marker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A27848C128DBF7400336BDE /* receive_marker.cpp */; };\n\t\t0A278557128DBF7400336BDE /* header_type.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784A4128DBF7400336BDE /* header_type.cpp */; };\n\t\t0A278558128DBF7400336BDE /* object.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784A6128DBF7400336BDE /* object.cpp */; };\n\t\t0A278559128DBF7400336BDE /* process_field_locator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784AB128DBF7400336BDE /* process_field_locator.cpp */; };\n\t\t0A27855A128DBF7400336BDE /* roots.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784AD128DBF7400336BDE /* roots.cpp */; };\n\t\t0A27855B128DBF7400336BDE /* oop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784B3128DBF7400336BDE /* oop.cpp */; };\n\t\t0A27855C128DBF7400336BDE /* abstract_os_interface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784BB128DBF7400336BDE /* abstract_os_interface.cpp */; };\n\t\t0A27855D128DBF7400336BDE /* dummy_cpu_coordinate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784BE128DBF7400336BDE /* dummy_cpu_coordinate.cpp */; };\n\t\t0A278561128DBF7400336BDE /* osx_os_interface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784C9128DBF7400336BDE /* osx_os_interface.cpp */; };\n\t\t0A278562128DBF7400336BDE /* posix_os_interface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784CB128DBF7400336BDE /* posix_os_interface.cpp */; };\n\t\t0A278564128DBF7400336BDE /* shared_memory_message_queue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784CF128DBF7400336BDE /* shared_memory_message_queue.cpp */; };\n\t\t0A278565128DBF7400336BDE /* thread_memory_semantics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784D1128DBF7400336BDE /* thread_memory_semantics.cpp */; };\n\t\t0A278567128DBF7400336BDE /* RVMPlugin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784D6128DBF7400336BDE /* RVMPlugin.cpp */; };\n\t\t0A278568128DBF7400336BDE /* abstract_mutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784D9128DBF7400336BDE /* abstract_mutex.cpp */; };\n\t\t0A278569128DBF7400336BDE /* abstract_tracer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784DB128DBF7400336BDE /* abstract_tracer.cpp */; };\n\t\t0A27856A128DBF7400336BDE /* bytemap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784DD128DBF7400336BDE /* bytemap.cpp */; };\n\t\t0A27856B128DBF7400336BDE /* core_tracer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784DF128DBF7400336BDE /* core_tracer.cpp */; };\n\t\t0A27856C128DBF7400336BDE /* gc_debugging_tracer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784E2128DBF7400336BDE /* gc_debugging_tracer.cpp */; };\n\t\t0A27856D128DBF7400336BDE /* error_handling.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784E4128DBF7400336BDE /* error_handling.cpp */; };\n\t\t0A27856E128DBF7400336BDE /* execution_tracer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784E6128DBF7400336BDE /* execution_tracer.cpp */; };\n\t\t0A27856F128DBF7400336BDE /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784E9128DBF7400336BDE /* main.cpp */; };\n\t\t0A278570128DBF7400336BDE /* measurements.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784EA128DBF7400336BDE /* measurements.cpp */; };\n\t\t0A278571128DBF7400336BDE /* my_rank.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784EC128DBF7400336BDE /* my_rank.cpp */; };\n\t\t0A278572128DBF7400336BDE /* oop_tracer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784EE128DBF7400336BDE /* oop_tracer.cpp */; };\n\t\t0A278573128DBF7400336BDE /* printer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784F0128DBF7400336BDE /* printer.cpp */; };\n\t\t0A278574128DBF7400336BDE /* profiling_tracer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784F2128DBF7400336BDE /* profiling_tracer.cpp */; };\n\t\t0A278575128DBF7400336BDE /* rank_set.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784F4128DBF7400336BDE /* rank_set.cpp */; };\n\t\t0A278576128DBF7400336BDE /* rvm_bitmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784F7128DBF7400336BDE /* rvm_bitmap.cpp */; };\n\t\t0A278577128DBF7400336BDE /* rvm_config.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784F9128DBF7400336BDE /* rvm_config.cpp */; };\n\t\t0A278578128DBF7400336BDE /* safepoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784FB128DBF7400336BDE /* safepoint.cpp */; };\n\t\t0A278579128DBF7400336BDE /* safepoint_ability.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784FD128DBF7400336BDE /* safepoint_ability.cpp */; };\n\t\t0A27857A128DBF7400336BDE /* safepoint_request_queue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784FF128DBF7400336BDE /* safepoint_request_queue.cpp */; };\n\t\t0A27857B128DBF7400336BDE /* scheduler_mutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278501128DBF7400336BDE /* scheduler_mutex.cpp */; };\n\t\t0A27857C128DBF7400336BDE /* semaphore_mutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278503128DBF7400336BDE /* semaphore_mutex.cpp */; };\n\t\t0A27857D128DBF7400336BDE /* squeak_adapters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278505128DBF7400336BDE /* squeak_adapters.cpp */; };\n\t\t0A27857E128DBF7400336BDE /* timeout_deferral.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278507128DBF7400336BDE /* timeout_deferral.cpp */; };\n\t\t0A27857F128DBF7400336BDE /* timeout_timer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278509128DBF7400336BDE /* timeout_timer.cpp */; };\n\t\t0A278580128DBF7400336BDE /* utils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A27850B128DBF7400336BDE /* utils.cpp */; };\n\t\t0A2785A6128DC2B700336BDE /* logical_core.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784C4128DBF7400336BDE /* logical_core.cpp */; };\n\t\t0A2785E4128DC3A000336BDE /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A2785E3128DC3A000336BDE /* CoreFoundation.framework */; };\n\t\t0A2785EE128DC42800336BDE /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A2785ED128DC42800336BDE /* CoreServices.framework */; };\n\t\t0A3FB13614D99C7E0050F39C /* gtest-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = 0A3FB13514D99C7E0050F39C /* gtest-all.cc */; };\n\t\t0A4D824B135C51D500CD74D8 /* sqNamedPrims.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A4D8249135C51D500CD74D8 /* sqNamedPrims.c */; };\n\t\t0A4D824C135C51D500CD74D8 /* sqNamedPrims.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A4D8249135C51D500CD74D8 /* sqNamedPrims.c */; };\n\t\t0A4D824D135C51D500CD74D8 /* sqVirtualMachine.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A4D824A135C51D500CD74D8 /* sqVirtualMachine.c */; };\n\t\t0A4D824E135C51D500CD74D8 /* sqVirtualMachine.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A4D824A135C51D500CD74D8 /* sqVirtualMachine.c */; };\n\t\t0A4D8253135C523B00CD74D8 /* sqUnixCharConv.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A4D8250135C523B00CD74D8 /* sqUnixCharConv.c */; };\n\t\t0A4D8254135C523B00CD74D8 /* sqUnixCharConv.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A4D8250135C523B00CD74D8 /* sqUnixCharConv.c */; };\n\t\t0A4D8255135C523B00CD74D8 /* sqUnixExternalPrims.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A4D8251135C523B00CD74D8 /* sqUnixExternalPrims.c */; };\n\t\t0A4D8256135C523B00CD74D8 /* sqUnixExternalPrims.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A4D8251135C523B00CD74D8 /* sqUnixExternalPrims.c */; };\n\t\t0A4D8257135C523B00CD74D8 /* sqUnixMain.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A4D8252135C523B00CD74D8 /* sqUnixMain.c */; };\n\t\t0A4D8258135C523B00CD74D8 /* sqUnixMain.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A4D8252135C523B00CD74D8 /* sqUnixMain.c */; };\n\t\t0A4D825A135C526100CD74D8 /* sqUnixX11.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A4D8259135C526100CD74D8 /* sqUnixX11.c */; };\n\t\t0A4D825B135C526100CD74D8 /* sqUnixX11.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A4D8259135C526100CD74D8 /* sqUnixX11.c */; };\n\t\t0A4D825D135C526F00CD74D8 /* sqUnixSoundMacOSX.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A4D825C135C526F00CD74D8 /* sqUnixSoundMacOSX.c */; };\n\t\t0A5D7C99135CC84700D13E53 /* sqUnixSound.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7C98135CC84700D13E53 /* sqUnixSound.c */; };\n\t\t0A5D7C9C135CC86800D13E53 /* sqUnixSocket.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7C9B135CC86800D13E53 /* sqUnixSocket.c */; };\n\t\t0A6A4834135ADF0A00933643 /* os_interface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A6A4832135ADF0A00933643 /* os_interface.cpp */; };\n\t\t0A6A4837135AE32D00933643 /* external_primitive_table.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A6A4835135AE32D00933643 /* external_primitive_table.cpp */; };\n\t\t0A72A76514432D7C0008E8AC /* tmc_os_interface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A72A76314432D7C0008E8AC /* tmc_os_interface.cpp */; };\n\t\t0A87AD8A1379573F00337878 /* performance_counters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A87AD891379573E00337878 /* performance_counters.cpp */; };\n\t\t0A8C91C712DE62B6007DBAD9 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A8C91C612DE62B6007DBAD9 /* IOKit.framework */; };\n\t\t0A97FB35128FEA77003A1C74 /* buffered_channel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A27850F128DBF7400336BDE /* buffered_channel.cpp */; };\n\t\t0A97FB36128FEA77003A1C74 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278510128DBF7400336BDE /* main.cpp */; };\n\t\t0A97FB37128FEA77003A1C74 /* starter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278511128DBF7400336BDE /* starter.cpp */; };\n\t\t0A97FB39128FEA77003A1C74 /* synced_queue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278513128DBF7400336BDE /* synced_queue.cpp */; };\n\t\t0A97FB3A128FEA77003A1C74 /* synced_queue_threaded.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278514128DBF7400336BDE /* synced_queue_threaded.cpp */; };\n\t\t0A97FBB512900371003A1C74 /* tracked_ptr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A97FBB412900371003A1C74 /* tracked_ptr.cpp */; };\n\t\t0ACF551912E07E7F0010386A /* shared_memory_message_queue_per_sender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0ACF551712E07E7F0010386A /* shared_memory_message_queue_per_sender.cpp */; };\n\t\t0ADA26E612EF642C009404B0 /* cacheline_alignment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0ADA26B912EF5C00009404B0 /* cacheline_alignment.cpp */; };\n\t\t0AE6D0E61531C596001A1018 /* buffered_channel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0AE6D0E21531C596001A1018 /* buffered_channel.cpp */; };\n\t\t0AE6D0E71531C596001A1018 /* synced_queue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0AE6D0E41531C596001A1018 /* synced_queue.cpp */; };\n\t\t0AE6D0E91531C63D001A1018 /* buffered_channel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0AE6D0E21531C596001A1018 /* buffered_channel.cpp */; };\n\t\t0AE6D0EA1531C645001A1018 /* synced_queue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0AE6D0E41531C596001A1018 /* synced_queue.cpp */; };\n\t\t0AE6D0EB1531C740001A1018 /* squeak_adapters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278505128DBF7400336BDE /* squeak_adapters.cpp */; };\n\t\t0AE6D0EC1531C776001A1018 /* utils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A27850B128DBF7400336BDE /* utils.cpp */; };\n\t\t0AE6D0ED1531C78B001A1018 /* oop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784B3128DBF7400336BDE /* oop.cpp */; };\n\t\t0AE6D0EE1531C7DE001A1018 /* header_type.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784A4128DBF7400336BDE /* header_type.cpp */; };\n\t\t0AE6D0EF1531C7E3001A1018 /* object.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784A6128DBF7400336BDE /* object.cpp */; };\n\t\t0AE6D0F01531C7E7001A1018 /* process_field_locator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784AB128DBF7400336BDE /* process_field_locator.cpp */; };\n\t\t0AE6D0F11531C7EB001A1018 /* roots.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784AD128DBF7400336BDE /* roots.cpp */; };\n\t\t0AE6D0F21531C7FC001A1018 /* abstract_os_interface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784BB128DBF7400336BDE /* abstract_os_interface.cpp */; };\n\t\t0AE6D0F31531C800001A1018 /* dummy_cpu_coordinate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784BE128DBF7400336BDE /* dummy_cpu_coordinate.cpp */; };\n\t\t0AE6D0F41531C80C001A1018 /* logical_core.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784C4128DBF7400336BDE /* logical_core.cpp */; };\n\t\t0AE6D0F61531C824001A1018 /* shared_memory_message_queue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784CF128DBF7400336BDE /* shared_memory_message_queue.cpp */; };\n\t\t0AE6D0F71531C827001A1018 /* shared_memory_message_queue_per_sender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0ACF551712E07E7F0010386A /* shared_memory_message_queue_per_sender.cpp */; };\n\t\t0AE6D0F81531C82A001A1018 /* thread_memory_semantics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784D1128DBF7400336BDE /* thread_memory_semantics.cpp */; };\n\t\t0AE6D0F91531C832001A1018 /* RVMPlugin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784D6128DBF7400336BDE /* RVMPlugin.cpp */; };\n\t\t0AE6D0FA1531C838001A1018 /* abstract_mutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784D9128DBF7400336BDE /* abstract_mutex.cpp */; };\n\t\t0AE6D0FB1531C83B001A1018 /* abstract_tracer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784DB128DBF7400336BDE /* abstract_tracer.cpp */; };\n\t\t0AE6D0FC1531C83E001A1018 /* bytemap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784DD128DBF7400336BDE /* bytemap.cpp */; };\n\t\t0AE6D0FD1531C842001A1018 /* core_tracer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784DF128DBF7400336BDE /* core_tracer.cpp */; };\n\t\t0AE6D0FE1531C846001A1018 /* gc_debugging_tracer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784E2128DBF7400336BDE /* gc_debugging_tracer.cpp */; };\n\t\t0AE6D0FF1531C849001A1018 /* error_handling.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784E4128DBF7400336BDE /* error_handling.cpp */; };\n\t\t0AE6D1001531C84C001A1018 /* execution_tracer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784E6128DBF7400336BDE /* execution_tracer.cpp */; };\n\t\t0AE6D1011531C853001A1018 /* measurements.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784EA128DBF7400336BDE /* measurements.cpp */; };\n\t\t0AE6D1021531C856001A1018 /* my_rank.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784EC128DBF7400336BDE /* my_rank.cpp */; };\n\t\t0AE6D1031531C859001A1018 /* oop_tracer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784EE128DBF7400336BDE /* oop_tracer.cpp */; };\n\t\t0AE6D1041531C85D001A1018 /* printer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784F0128DBF7400336BDE /* printer.cpp */; };\n\t\t0AE6D1051531C860001A1018 /* profiling_tracer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784F2128DBF7400336BDE /* profiling_tracer.cpp */; };\n\t\t0AE6D1061531C864001A1018 /* rank_set.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784F4128DBF7400336BDE /* rank_set.cpp */; };\n\t\t0AE6D1071531C868001A1018 /* rvm_bitmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784F7128DBF7400336BDE /* rvm_bitmap.cpp */; };\n\t\t0AE6D1081531C884001A1018 /* rvm_config.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784F9128DBF7400336BDE /* rvm_config.cpp */; };\n\t\t0AE6D1091531C887001A1018 /* safepoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784FB128DBF7400336BDE /* safepoint.cpp */; };\n\t\t0AE6D10A1531C88A001A1018 /* safepoint_ability.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784FD128DBF7400336BDE /* safepoint_ability.cpp */; };\n\t\t0AE6D10B1531C88E001A1018 /* safepoint_request_queue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784FF128DBF7400336BDE /* safepoint_request_queue.cpp */; };\n\t\t0AE6D10C1531C891001A1018 /* semaphore_mutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278503128DBF7400336BDE /* semaphore_mutex.cpp */; };\n\t\t0AE6D10D1531C894001A1018 /* scheduler_mutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278501128DBF7400336BDE /* scheduler_mutex.cpp */; };\n\t\t0AE6D10E1531C899001A1018 /* timeout_deferral.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278507128DBF7400336BDE /* timeout_deferral.cpp */; };\n\t\t0AE6D10F1531C89C001A1018 /* timeout_timer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278509128DBF7400336BDE /* timeout_timer.cpp */; };\n\t\t0AE6D1101531C8A1001A1018 /* debug_helper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0AEC1185128DF0A000EFF6D1 /* debug_helper.cpp */; };\n\t\t0AE6D1111531C8A5001A1018 /* performance_counters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A87AD891379573E00337878 /* performance_counters.cpp */; };\n\t\t0AE6D1121531C8C4001A1018 /* FilePlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A278400128DBF7300336BDE /* FilePlugin.c */; };\n\t\t0AE6D1131531C90F001A1018 /* tmc_os_interface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A72A76314432D7C0008E8AC /* tmc_os_interface.cpp */; };\n\t\t0AE6D1141531C927001A1018 /* sqFilePluginBasicPrims.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A278402128DBF7300336BDE /* sqFilePluginBasicPrims.c */; };\n\t\t0AE6D1161531C931001A1018 /* B2DPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A27840F128DBF7300336BDE /* B2DPlugin.c */; };\n\t\t0AE6D1171531C935001A1018 /* BitBltPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A278411128DBF7300336BDE /* BitBltPlugin.c */; };\n\t\t0AE6D1181531C938001A1018 /* FloatArrayPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A278413128DBF7300336BDE /* FloatArrayPlugin.c */; };\n\t\t0AE6D1191531C93C001A1018 /* LargeIntegers.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A278415128DBF7300336BDE /* LargeIntegers.c */; };\n\t\t0AE6D11A1531C941001A1018 /* Matrix2x3Plugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A278417128DBF7300336BDE /* Matrix2x3Plugin.c */; };\n\t\t0AE6D11B1531C944001A1018 /* MiscPrimitivePlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A278419128DBF7300336BDE /* MiscPrimitivePlugin.c */; };\n\t\t0AE6D11C1531C949001A1018 /* SoundPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A27841D128DBF7300336BDE /* SoundPlugin.c */; };\n\t\t0AE6D11D1531C95E001A1018 /* sqUnixCustomSound.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A27843D128DBF7300336BDE /* sqUnixCustomSound.c */; };\n\t\t0AE6D11E1531C962001A1018 /* sqUnixSoundMacOSX.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A4D825C135C526F00CD74D8 /* sqUnixSoundMacOSX.c */; };\n\t\t0AE6D11F1531C980001A1018 /* osx_os_interface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784C9128DBF7400336BDE /* osx_os_interface.cpp */; };\n\t\t0AE6D1201531C98F001A1018 /* posix_os_interface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2784CB128DBF7400336BDE /* posix_os_interface.cpp */; };\n\t\t0AEC1186128DF0A000EFF6D1 /* debug_helper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0AEC1185128DF0A000EFF6D1 /* debug_helper.cpp */; };\n\t\t0AEDCC6315E3CB2B0022DD44 /* sqUnixFile.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AEDCC6215E3CB2B0022DD44 /* sqUnixFile.c */; };\n\t\t0AEDCC6415E3CB2B0022DD44 /* sqUnixFile.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AEDCC6215E3CB2B0022DD44 /* sqUnixFile.c */; };\n\t\t34221D6D13D4D3C50057DCBD /* externals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A2783F6128DBF7300336BDE /* externals.cpp */; };\n\t\t34221D6E13D4D3D10057DCBD /* abstract_mark_sweep_collector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278444128DBF7300336BDE /* abstract_mark_sweep_collector.cpp */; };\n\t\t34221D6F13D4D3F50057DCBD /* abstract_object_heap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278446128DBF7300336BDE /* abstract_object_heap.cpp */; };\n\t\t34221D7013D4D3F50057DCBD /* memory_system.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A27844D128DBF7300336BDE /* memory_system.cpp */; };\n\t\t34221D7113D4D3F50057DCBD /* multicore_object_heap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278450128DBF7300336BDE /* multicore_object_heap.cpp */; };\n\t\t34221D7213D4D3F50057DCBD /* multicore_object_table.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278453128DBF7300336BDE /* multicore_object_table.cpp */; };\n\t\t34221D7413D4D3F50057DCBD /* squeak_image_reader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278460128DBF7300336BDE /* squeak_image_reader.cpp */; };\n\t\t34221D7513D4D3F50057DCBD /* at_cache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278464128DBF7300336BDE /* at_cache.cpp */; };\n\t\t34221D7613D4D3F50057DCBD /* interpreter_bytecodes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278467128DBF7300336BDE /* interpreter_bytecodes.cpp */; };\n\t\t34221D7713D4D3F50057DCBD /* interpreter_primitives.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278469128DBF7300336BDE /* interpreter_primitives.cpp */; };\n\t\t34221D7813D4D3F50057DCBD /* method_cache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A27846B128DBF7300336BDE /* method_cache.cpp */; };\n\t\t34221D7913D4D3F50057DCBD /* obsolete_indexed_primitive_table.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A27846D128DBF7300336BDE /* obsolete_indexed_primitive_table.cpp */; };\n\t\t34221D7A13D4D3F50057DCBD /* obsolete_named_primitive_table.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A27846F128DBF7300336BDE /* obsolete_named_primitive_table.cpp */; };\n\t\t34221D7B13D4D3F50057DCBD /* primitive_table.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278471128DBF7300336BDE /* primitive_table.cpp */; };\n\t\t34221D7C13D4D3F50057DCBD /* squeak_interpreter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278473128DBF7400336BDE /* squeak_interpreter.cpp */; };\n\t\t34221D7D13D4D3F50057DCBD /* abstract_message.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A27847B128DBF7400336BDE /* abstract_message.cpp */; };\n\t\t34221D7E13D4D3F50057DCBD /* deferred_request.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A27847D128DBF7400336BDE /* deferred_request.cpp */; };\n\t\t34221D7F13D4D3F50057DCBD /* interactions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A27847F128DBF7400336BDE /* interactions.cpp */; };\n\t\t34221D8013D4D3F50057DCBD /* interpreter_subset_for_control_transfer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278481128DBF7400336BDE /* interpreter_subset_for_control_transfer.cpp */; };\n\t\t34221D8113D4D3F50057DCBD /* message_classes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278483128DBF7400336BDE /* message_classes.cpp */; };\n\t\t34221D8213D4D3F50057DCBD /* message_or_ack_request.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278485128DBF7400336BDE /* message_or_ack_request.cpp */; };\n\t\t34221D8313D4D3F50057DCBD /* message_statics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278487128DBF7400336BDE /* message_statics.cpp */; };\n\t\t34221D8413D4D3F50057DCBD /* message_stats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A278489128DBF7400336BDE /* message_stats.cpp */; };\n\t\t34221D8513D4D3F50057DCBD /* receive_marker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A27848C128DBF7400336BDE /* receive_marker.cpp */; };\n\t\t34221DBF13D4D9650057DCBD /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A2785E3128DC3A000336BDE /* CoreFoundation.framework */; };\n\t\t34221DC013D4D9670057DCBD /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A2785ED128DC42800336BDE /* CoreServices.framework */; };\n\t\t34221DC113D4D96B0057DCBD /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A8C91C612DE62B6007DBAD9 /* IOKit.framework */; };\n\t\t34221DC213D4D98B0057DCBD /* aio.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A278426128DBF7300336BDE /* aio.c */; };\n\t\t34221DC313D4D9B70057DCBD /* sqUnixSound.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7C98135CC84700D13E53 /* sqUnixSound.c */; };\n\t\t34221DC413D4D9D00057DCBD /* sqUnixSocket.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7C9B135CC86800D13E53 /* sqUnixSocket.c */; };\n\t\t34221DC513D4D9DC0057DCBD /* SocketPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A27841B128DBF7300336BDE /* SocketPlugin.c */; };\n\t\t34221DC613D4D9F10057DCBD /* sqUnixSoundNull.c in Sources */ = {isa = PBXBuildFile; fileRef = 0A278442128DBF7300336BDE /* sqUnixSoundNull.c */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXFileReference section */\n\t\t0A2783EB128DBF1000336BDE /* RoarVM */ = {isa = PBXFileReference; explicitFileType = \"compiled.mach-o.executable\"; includeInIndex = 0; path = RoarVM; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t0A2783F6128DBF7300336BDE /* externals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = externals.cpp; sourceTree = \"<group>\"; };\n\t\t0A2783F7128DBF7300336BDE /* externals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = externals.h; sourceTree = \"<group>\"; };\n\t\t0A2783FC128DBF7300336BDE /* B3DAcceleratorPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = B3DAcceleratorPlugin.h; sourceTree = \"<group>\"; };\n\t\t0A2783FD128DBF7300336BDE /* sqOpenGLRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqOpenGLRenderer.h; sourceTree = \"<group>\"; };\n\t\t0A278400128DBF7300336BDE /* FilePlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = FilePlugin.c; sourceTree = \"<group>\"; };\n\t\t0A278401128DBF7300336BDE /* FilePlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FilePlugin.h; sourceTree = \"<group>\"; };\n\t\t0A278402128DBF7300336BDE /* sqFilePluginBasicPrims.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqFilePluginBasicPrims.c; sourceTree = \"<group>\"; };\n\t\t0A278405128DBF7300336BDE /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = \"<group>\"; };\n\t\t0A278408128DBF7300336BDE /* SocketPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SocketPlugin.h; sourceTree = \"<group>\"; };\n\t\t0A27840C128DBF7300336BDE /* sqVirtualMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqVirtualMachine.h; sourceTree = \"<group>\"; };\n\t\t0A27840F128DBF7300336BDE /* B2DPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = B2DPlugin.c; sourceTree = \"<group>\"; };\n\t\t0A278411128DBF7300336BDE /* BitBltPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = BitBltPlugin.c; sourceTree = \"<group>\"; };\n\t\t0A278413128DBF7300336BDE /* FloatArrayPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = FloatArrayPlugin.c; sourceTree = \"<group>\"; };\n\t\t0A278415128DBF7300336BDE /* LargeIntegers.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = LargeIntegers.c; sourceTree = \"<group>\"; };\n\t\t0A278417128DBF7300336BDE /* Matrix2x3Plugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Matrix2x3Plugin.c; sourceTree = \"<group>\"; };\n\t\t0A278419128DBF7300336BDE /* MiscPrimitivePlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = MiscPrimitivePlugin.c; sourceTree = \"<group>\"; };\n\t\t0A27841B128DBF7300336BDE /* SocketPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SocketPlugin.c; sourceTree = \"<group>\"; };\n\t\t0A27841D128DBF7300336BDE /* SoundPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SoundPlugin.c; sourceTree = \"<group>\"; };\n\t\t0A278421128DBF7300336BDE /* UnixOSProcessPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = UnixOSProcessPlugin.c; sourceTree = \"<group>\"; };\n\t\t0A278426128DBF7300336BDE /* aio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = aio.c; sourceTree = \"<group>\"; };\n\t\t0A278427128DBF7300336BDE /* dlfcn-dyld.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = \"dlfcn-dyld.c\"; sourceTree = \"<group>\"; };\n\t\t0A278428128DBF7300336BDE /* interp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = interp.h; sourceTree = \"<group>\"; };\n\t\t0A27842A128DBF7300336BDE /* sqaio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqaio.h; sourceTree = \"<group>\"; };\n\t\t0A27842B128DBF7300336BDE /* sqConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqConfig.h; sourceTree = \"<group>\"; };\n\t\t0A27842C128DBF7300336BDE /* SqDisplay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SqDisplay.h; sourceTree = \"<group>\"; };\n\t\t0A27842E128DBF7300336BDE /* SqModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SqModule.h; sourceTree = \"<group>\"; };\n\t\t0A27842F128DBF7300336BDE /* sqNamedPrims.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqNamedPrims.h; sourceTree = \"<group>\"; };\n\t\t0A278430128DBF7300336BDE /* sqPlatformSpecific.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqPlatformSpecific.h; sourceTree = \"<group>\"; };\n\t\t0A278434128DBF7300336BDE /* SqSound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SqSound.h; sourceTree = \"<group>\"; };\n\t\t0A278435128DBF7300336BDE /* sqUnixCharConv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqUnixCharConv.h; sourceTree = \"<group>\"; };\n\t\t0A278436128DBF7300336BDE /* sqUnixEvent.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqUnixEvent.c; sourceTree = \"<group>\"; };\n\t\t0A278437128DBF7300336BDE /* sqUnixGlobals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqUnixGlobals.h; sourceTree = \"<group>\"; };\n\t\t0A278438128DBF7300336BDE /* sqUnixMain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqUnixMain.h; sourceTree = \"<group>\"; };\n\t\t0A27843B128DBF7300336BDE /* sqUnixXdnd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqUnixXdnd.c; sourceTree = \"<group>\"; };\n\t\t0A27843D128DBF7300336BDE /* sqUnixCustomSound.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqUnixCustomSound.c; sourceTree = \"<group>\"; };\n\t\t0A278440128DBF7300336BDE /* sqUnixSoundDebug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqUnixSoundDebug.h; sourceTree = \"<group>\"; };\n\t\t0A278442128DBF7300336BDE /* sqUnixSoundNull.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqUnixSoundNull.c; sourceTree = \"<group>\"; };\n\t\t0A278444128DBF7300336BDE /* abstract_mark_sweep_collector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = abstract_mark_sweep_collector.cpp; sourceTree = \"<group>\"; };\n\t\t0A278445128DBF7300336BDE /* abstract_mark_sweep_collector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abstract_mark_sweep_collector.h; sourceTree = \"<group>\"; };\n\t\t0A278446128DBF7300336BDE /* abstract_object_heap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = abstract_object_heap.cpp; sourceTree = \"<group>\"; };\n\t\t0A278447128DBF7300336BDE /* abstract_object_heap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abstract_object_heap.h; sourceTree = \"<group>\"; };\n\t\t0A278448128DBF7300336BDE /* abstract_object_heap.inline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abstract_object_heap.inline.h; sourceTree = \"<group>\"; };\n\t\t0A278449128DBF7300336BDE /* abstract_object_table.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abstract_object_table.h; sourceTree = \"<group>\"; };\n\t\t0A27844A128DBF7300336BDE /* gc_oop_stack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gc_oop_stack.h; sourceTree = \"<group>\"; };\n\t\t0A27844B128DBF7300336BDE /* indirect_oop_mark_sweep_collector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = indirect_oop_mark_sweep_collector.h; sourceTree = \"<group>\"; };\n\t\t0A27844C128DBF7300336BDE /* mark_sweep_collector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mark_sweep_collector.h; sourceTree = \"<group>\"; };\n\t\t0A27844D128DBF7300336BDE /* memory_system.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = memory_system.cpp; sourceTree = \"<group>\"; };\n\t\t0A27844E128DBF7300336BDE /* memory_system.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = memory_system.h; sourceTree = \"<group>\"; };\n\t\t0A27844F128DBF7300336BDE /* memory_system.inline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = memory_system.inline.h; sourceTree = \"<group>\"; };\n\t\t0A278450128DBF7300336BDE /* multicore_object_heap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = multicore_object_heap.cpp; sourceTree = \"<group>\"; };\n\t\t0A278451128DBF7300336BDE /* multicore_object_heap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = multicore_object_heap.h; sourceTree = \"<group>\"; };\n\t\t0A278452128DBF7300336BDE /* multicore_object_heap.inline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = multicore_object_heap.inline.h; sourceTree = \"<group>\"; };\n\t\t0A278453128DBF7300336BDE /* multicore_object_table.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = multicore_object_table.cpp; sourceTree = \"<group>\"; };\n\t\t0A278454128DBF7300336BDE /* multicore_object_table.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = multicore_object_table.h; sourceTree = \"<group>\"; };\n\t\t0A278455128DBF7300336BDE /* multicore_object_table.inline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = multicore_object_table.inline.h; sourceTree = \"<group>\"; };\n\t\t0A278456128DBF7300336BDE /* oop_closure.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oop_closure.h; sourceTree = \"<group>\"; };\n\t\t0A278460128DBF7300336BDE /* squeak_image_reader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = squeak_image_reader.cpp; sourceTree = \"<group>\"; };\n\t\t0A278461128DBF7300336BDE /* squeak_image_reader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = squeak_image_reader.h; sourceTree = \"<group>\"; };\n\t\t0A278463128DBF7300336BDE /* abstract_primitive_table.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abstract_primitive_table.h; sourceTree = \"<group>\"; };\n\t\t0A278464128DBF7300336BDE /* at_cache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = at_cache.cpp; sourceTree = \"<group>\"; };\n\t\t0A278465128DBF7300336BDE /* at_cache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = at_cache.h; sourceTree = \"<group>\"; };\n\t\t0A278466128DBF7300336BDE /* external_primitive_table.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = external_primitive_table.h; sourceTree = \"<group>\"; };\n\t\t0A278467128DBF7300336BDE /* interpreter_bytecodes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = interpreter_bytecodes.cpp; sourceTree = \"<group>\"; };\n\t\t0A278468128DBF7300336BDE /* interpreter_bytecodes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = interpreter_bytecodes.h; sourceTree = \"<group>\"; };\n\t\t0A278469128DBF7300336BDE /* interpreter_primitives.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = interpreter_primitives.cpp; sourceTree = \"<group>\"; };\n\t\t0A27846A128DBF7300336BDE /* interpreter_primitives.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = interpreter_primitives.h; sourceTree = \"<group>\"; };\n\t\t0A27846B128DBF7300336BDE /* method_cache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = method_cache.cpp; sourceTree = \"<group>\"; };\n\t\t0A27846C128DBF7300336BDE /* method_cache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = method_cache.h; sourceTree = \"<group>\"; };\n\t\t0A27846D128DBF7300336BDE /* obsolete_indexed_primitive_table.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = obsolete_indexed_primitive_table.cpp; sourceTree = \"<group>\"; };\n\t\t0A27846E128DBF7300336BDE /* obsolete_indexed_primitive_table.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = obsolete_indexed_primitive_table.h; sourceTree = \"<group>\"; };\n\t\t0A27846F128DBF7300336BDE /* obsolete_named_primitive_table.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = obsolete_named_primitive_table.cpp; sourceTree = \"<group>\"; };\n\t\t0A278470128DBF7300336BDE /* obsolete_named_primitive_table.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = obsolete_named_primitive_table.h; sourceTree = \"<group>\"; };\n\t\t0A278471128DBF7300336BDE /* primitive_table.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = primitive_table.cpp; sourceTree = \"<group>\"; };\n\t\t0A278472128DBF7400336BDE /* primitive_table.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = primitive_table.h; sourceTree = \"<group>\"; };\n\t\t0A278473128DBF7400336BDE /* squeak_interpreter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = squeak_interpreter.cpp; sourceTree = \"<group>\"; };\n\t\t0A278474128DBF7400336BDE /* squeak_interpreter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = squeak_interpreter.h; sourceTree = \"<group>\"; };\n\t\t0A278476128DBF7400336BDE /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = \"<group>\"; };\n\t\t0A278477128DBF7400336BDE /* Makefile.common */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; indentWidth = 4; path = Makefile.common; sourceTree = \"<group>\"; tabWidth = 4; usesTabs = 1; };\n\t\t0A278478128DBF7400336BDE /* Makefile.debug */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; indentWidth = 4; path = Makefile.debug; sourceTree = \"<group>\"; tabWidth = 4; };\n\t\t0A278479128DBF7400336BDE /* Makefile.opt */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; indentWidth = 4; path = Makefile.opt; sourceTree = \"<group>\"; tabWidth = 4; };\n\t\t0A27847B128DBF7400336BDE /* abstract_message.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = abstract_message.cpp; sourceTree = \"<group>\"; };\n\t\t0A27847C128DBF7400336BDE /* abstract_message.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abstract_message.h; sourceTree = \"<group>\"; };\n\t\t0A27847D128DBF7400336BDE /* deferred_request.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = deferred_request.cpp; sourceTree = \"<group>\"; };\n\t\t0A27847E128DBF7400336BDE /* deferred_request.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = deferred_request.h; sourceTree = \"<group>\"; };\n\t\t0A27847F128DBF7400336BDE /* interactions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = interactions.cpp; sourceTree = \"<group>\"; };\n\t\t0A278480128DBF7400336BDE /* interactions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = interactions.h; sourceTree = \"<group>\"; };\n\t\t0A278481128DBF7400336BDE /* interpreter_subset_for_control_transfer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = interpreter_subset_for_control_transfer.cpp; sourceTree = \"<group>\"; };\n\t\t0A278482128DBF7400336BDE /* interpreter_subset_for_control_transfer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = interpreter_subset_for_control_transfer.h; sourceTree = \"<group>\"; };\n\t\t0A278483128DBF7400336BDE /* message_classes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = message_classes.cpp; sourceTree = \"<group>\"; };\n\t\t0A278484128DBF7400336BDE /* message_classes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = message_classes.h; sourceTree = \"<group>\"; };\n\t\t0A278485128DBF7400336BDE /* message_or_ack_request.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = message_or_ack_request.cpp; sourceTree = \"<group>\"; };\n\t\t0A278486128DBF7400336BDE /* message_or_ack_request.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = message_or_ack_request.h; sourceTree = \"<group>\"; };\n\t\t0A278487128DBF7400336BDE /* message_statics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = message_statics.cpp; sourceTree = \"<group>\"; };\n\t\t0A278488128DBF7400336BDE /* message_statics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = message_statics.h; sourceTree = \"<group>\"; };\n\t\t0A278489128DBF7400336BDE /* message_stats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = message_stats.cpp; sourceTree = \"<group>\"; };\n\t\t0A27848A128DBF7400336BDE /* message_stats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = message_stats.h; sourceTree = \"<group>\"; };\n\t\t0A27848B128DBF7400336BDE /* message_templates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = message_templates.h; sourceTree = \"<group>\"; };\n\t\t0A27848C128DBF7400336BDE /* receive_marker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = receive_marker.cpp; sourceTree = \"<group>\"; };\n\t\t0A27848D128DBF7400336BDE /* receive_marker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = receive_marker.h; sourceTree = \"<group>\"; };\n\t\t0A27848F128DBF7400336BDE /* abstract_zero_copy_command_queue_endpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = abstract_zero_copy_command_queue_endpoint.cpp; sourceTree = \"<group>\"; };\n\t\t0A278490128DBF7400336BDE /* abstract_zero_copy_command_queue_endpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abstract_zero_copy_command_queue_endpoint.h; sourceTree = \"<group>\"; };\n\t\t0A278491128DBF7400336BDE /* chip_to_chip_direct_to_hypervisor_zero_copy_endpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = chip_to_chip_direct_to_hypervisor_zero_copy_endpoint.cpp; sourceTree = \"<group>\"; };\n\t\t0A278492128DBF7400336BDE /* chip_to_chip_direct_to_hypervisor_zero_copy_endpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chip_to_chip_direct_to_hypervisor_zero_copy_endpoint.h; sourceTree = \"<group>\"; };\n\t\t0A278493128DBF7400336BDE /* chip_to_chip_direct_to_hypervisor_zero_copy_receiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = chip_to_chip_direct_to_hypervisor_zero_copy_receiver.cpp; sourceTree = \"<group>\"; };\n\t\t0A278494128DBF7400336BDE /* chip_to_chip_direct_to_hypervisor_zero_copy_receiver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chip_to_chip_direct_to_hypervisor_zero_copy_receiver.h; sourceTree = \"<group>\"; };\n\t\t0A278495128DBF7400336BDE /* chip_to_chip_direct_to_hypervisor_zero_copy_sender.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = chip_to_chip_direct_to_hypervisor_zero_copy_sender.cpp; sourceTree = \"<group>\"; };\n\t\t0A278496128DBF7400336BDE /* chip_to_chip_direct_to_hypervisor_zero_copy_sender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chip_to_chip_direct_to_hypervisor_zero_copy_sender.h; sourceTree = \"<group>\"; };\n\t\t0A278497128DBF7400336BDE /* chip_to_chip_zero_copy_command_queue_endpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = chip_to_chip_zero_copy_command_queue_endpoint.cpp; sourceTree = \"<group>\"; };\n\t\t0A278498128DBF7400336BDE /* chip_to_chip_zero_copy_command_queue_endpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chip_to_chip_zero_copy_command_queue_endpoint.h; sourceTree = \"<group>\"; };\n\t\t0A278499128DBF7400336BDE /* chip_to_chip_zero_copy_command_receiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = chip_to_chip_zero_copy_command_receiver.cpp; sourceTree = \"<group>\"; };\n\t\t0A27849A128DBF7400336BDE /* chip_to_chip_zero_copy_command_receiver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chip_to_chip_zero_copy_command_receiver.h; sourceTree = \"<group>\"; };\n\t\t0A27849B128DBF7400336BDE /* chip_to_chip_zero_copy_command_sender.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = chip_to_chip_zero_copy_command_sender.cpp; sourceTree = \"<group>\"; };\n\t\t0A27849C128DBF7400336BDE /* chip_to_chip_zero_copy_command_sender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chip_to_chip_zero_copy_command_sender.h; sourceTree = \"<group>\"; };\n\t\t0A27849D128DBF7400336BDE /* host_pci_info.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = host_pci_info.cpp; sourceTree = \"<group>\"; };\n\t\t0A27849E128DBF7400336BDE /* host_pci_info.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = host_pci_info.h; sourceTree = \"<group>\"; };\n\t\t0A27849F128DBF7400336BDE /* tilera_chip_to_chip_message_queue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tilera_chip_to_chip_message_queue.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784A0128DBF7400336BDE /* tilera_chip_to_chip_message_queue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tilera_chip_to_chip_message_queue.h; sourceTree = \"<group>\"; };\n\t\t0A2784A2128DBF7400336BDE /* chunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chunk.h; sourceTree = \"<group>\"; };\n\t\t0A2784A3128DBF7400336BDE /* chunk.inline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chunk.inline.h; sourceTree = \"<group>\"; };\n\t\t0A2784A4128DBF7400336BDE /* header_type.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = header_type.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784A5128DBF7400336BDE /* header_type.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = header_type.h; sourceTree = \"<group>\"; };\n\t\t0A2784A6128DBF7400336BDE /* object.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = object.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784A7128DBF7400336BDE /* object.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = object.h; sourceTree = \"<group>\"; };\n\t\t0A2784A8128DBF7400336BDE /* object.inline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = object.inline.h; sourceTree = \"<group>\"; };\n\t\t0A2784A9128DBF7400336BDE /* object_indices.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = object_indices.h; sourceTree = \"<group>\"; };\n\t\t0A2784AA128DBF7400336BDE /* preheader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = preheader.h; sourceTree = \"<group>\"; };\n\t\t0A2784AB128DBF7400336BDE /* process_field_locator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = process_field_locator.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784AC128DBF7400336BDE /* process_field_locator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = process_field_locator.h; sourceTree = \"<group>\"; };\n\t\t0A2784AD128DBF7400336BDE /* roots.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = roots.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784AE128DBF7400336BDE /* roots.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = roots.h; sourceTree = \"<group>\"; };\n\t\t0A2784AF128DBF7400336BDE /* special_indices.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = special_indices.h; sourceTree = \"<group>\"; };\n\t\t0A2784B0128DBF7400336BDE /* word_containing_object_type.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = word_containing_object_type.h; sourceTree = \"<group>\"; };\n\t\t0A2784B2128DBF7400336BDE /* abstract_oop.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abstract_oop.h; sourceTree = \"<group>\"; };\n\t\t0A2784B3128DBF7400336BDE /* oop.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = oop.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784B4128DBF7400336BDE /* oop.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oop.h; sourceTree = \"<group>\"; };\n\t\t0A2784B5128DBF7400336BDE /* oop.inline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oop.inline.h; sourceTree = \"<group>\"; };\n\t\t0A2784B6128DBF7400336BDE /* tags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tags.h; sourceTree = \"<group>\"; };\n\t\t0A2784B8128DBF7400336BDE /* abstract_cpu_coordinate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abstract_cpu_coordinate.h; sourceTree = \"<group>\"; };\n\t\t0A2784B9128DBF7400336BDE /* abstract_memory_semantics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abstract_memory_semantics.h; sourceTree = \"<group>\"; };\n\t\t0A2784BA128DBF7400336BDE /* abstract_message_queue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abstract_message_queue.h; sourceTree = \"<group>\"; };\n\t\t0A2784BB128DBF7400336BDE /* abstract_os_interface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = abstract_os_interface.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784BC128DBF7400336BDE /* abstract_os_interface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abstract_os_interface.h; sourceTree = \"<group>\"; };\n\t\t0A2784BD128DBF7400336BDE /* cpu_coordinate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpu_coordinate.h; sourceTree = \"<group>\"; };\n\t\t0A2784BE128DBF7400336BDE /* dummy_cpu_coordinate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = dummy_cpu_coordinate.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784BF128DBF7400336BDE /* dummy_cpu_coordinate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dummy_cpu_coordinate.h; sourceTree = \"<group>\"; };\n\t\t0A2784C0128DBF7400336BDE /* ilib_message_queue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ilib_message_queue.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784C1128DBF7400336BDE /* ilib_message_queue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ilib_message_queue.h; sourceTree = \"<group>\"; };\n\t\t0A2784C2128DBF7400336BDE /* ilib_os_interface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ilib_os_interface.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784C3128DBF7400336BDE /* ilib_os_interface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ilib_os_interface.h; sourceTree = \"<group>\"; };\n\t\t0A2784C4128DBF7400336BDE /* logical_core.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = logical_core.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784C5128DBF7400336BDE /* logical_core.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = logical_core.h; sourceTree = \"<group>\"; };\n\t\t0A2784C6128DBF7400336BDE /* memory_semantics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = memory_semantics.h; sourceTree = \"<group>\"; };\n\t\t0A2784C7128DBF7400336BDE /* message_queue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = message_queue.h; sourceTree = \"<group>\"; };\n\t\t0A2784C8128DBF7400336BDE /* os_interface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = os_interface.h; sourceTree = \"<group>\"; };\n\t\t0A2784C9128DBF7400336BDE /* osx_os_interface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = osx_os_interface.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784CA128DBF7400336BDE /* osx_os_interface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = osx_os_interface.h; sourceTree = \"<group>\"; };\n\t\t0A2784CB128DBF7400336BDE /* posix_os_interface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = posix_os_interface.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784CC128DBF7400336BDE /* posix_os_interface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = posix_os_interface.h; sourceTree = \"<group>\"; };\n\t\t0A2784CD128DBF7400336BDE /* process_memory_semantics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = process_memory_semantics.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784CE128DBF7400336BDE /* process_memory_semantics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = process_memory_semantics.h; sourceTree = \"<group>\"; };\n\t\t0A2784CF128DBF7400336BDE /* shared_memory_message_queue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = shared_memory_message_queue.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784D0128DBF7400336BDE /* shared_memory_message_queue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = shared_memory_message_queue.h; sourceTree = \"<group>\"; };\n\t\t0A2784D1128DBF7400336BDE /* thread_memory_semantics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = thread_memory_semantics.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784D2128DBF7400336BDE /* thread_memory_semantics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = thread_memory_semantics.h; sourceTree = \"<group>\"; };\n\t\t0A2784D3128DBF7400336BDE /* tile_cpu_coordinate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tile_cpu_coordinate.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784D4128DBF7400336BDE /* tile_cpu_coordinate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tile_cpu_coordinate.h; sourceTree = \"<group>\"; };\n\t\t0A2784D6128DBF7400336BDE /* RVMPlugin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RVMPlugin.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784D7128DBF7400336BDE /* RVMPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RVMPlugin.h; sourceTree = \"<group>\"; };\n\t\t0A2784D9128DBF7400336BDE /* abstract_mutex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = abstract_mutex.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784DA128DBF7400336BDE /* abstract_mutex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abstract_mutex.h; sourceTree = \"<group>\"; };\n\t\t0A2784DB128DBF7400336BDE /* abstract_tracer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = abstract_tracer.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784DC128DBF7400336BDE /* abstract_tracer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abstract_tracer.h; sourceTree = \"<group>\"; };\n\t\t0A2784DD128DBF7400336BDE /* bytemap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = bytemap.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784DE128DBF7400336BDE /* bytemap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bytemap.h; sourceTree = \"<group>\"; };\n\t\t0A2784DF128DBF7400336BDE /* core_tracer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = core_tracer.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784E0128DBF7400336BDE /* core_tracer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = core_tracer.h; sourceTree = \"<group>\"; };\n\t\t0A2784E1128DBF7400336BDE /* debug_store_checks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = debug_store_checks.h; sourceTree = \"<group>\"; };\n\t\t0A2784E2128DBF7400336BDE /* gc_debugging_tracer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = gc_debugging_tracer.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784E3128DBF7400336BDE /* gc_debugging_tracer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gc_debugging_tracer.h; sourceTree = \"<group>\"; };\n\t\t0A2784E4128DBF7400336BDE /* error_handling.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = error_handling.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784E5128DBF7400336BDE /* error_handling.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = error_handling.h; sourceTree = \"<group>\"; };\n\t\t0A2784E6128DBF7400336BDE /* execution_tracer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = execution_tracer.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784E7128DBF7400336BDE /* execution_tracer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = execution_tracer.h; sourceTree = \"<group>\"; };\n\t\t0A2784E8128DBF7400336BDE /* headers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = headers.h; sourceTree = \"<group>\"; };\n\t\t0A2784E9128DBF7400336BDE /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784EA128DBF7400336BDE /* measurements.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = measurements.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784EB128DBF7400336BDE /* measurements.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = measurements.h; sourceTree = \"<group>\"; };\n\t\t0A2784EC128DBF7400336BDE /* my_rank.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = my_rank.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784ED128DBF7400336BDE /* my_rank.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = my_rank.h; sourceTree = \"<group>\"; };\n\t\t0A2784EE128DBF7400336BDE /* oop_tracer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = oop_tracer.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784EF128DBF7400336BDE /* oop_tracer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oop_tracer.h; sourceTree = \"<group>\"; };\n\t\t0A2784F0128DBF7400336BDE /* printer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = printer.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784F1128DBF7400336BDE /* printer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = printer.h; sourceTree = \"<group>\"; };\n\t\t0A2784F2128DBF7400336BDE /* profiling_tracer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = profiling_tracer.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784F3128DBF7400336BDE /* profiling_tracer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = profiling_tracer.h; sourceTree = \"<group>\"; };\n\t\t0A2784F4128DBF7400336BDE /* rank_set.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rank_set.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784F5128DBF7400336BDE /* rank_set.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rank_set.h; sourceTree = \"<group>\"; };\n\t\t0A2784F6128DBF7400336BDE /* runtime_tester.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = runtime_tester.h; sourceTree = \"<group>\"; };\n\t\t0A2784F7128DBF7400336BDE /* rvm_bitmap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rvm_bitmap.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784F8128DBF7400336BDE /* rvm_bitmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rvm_bitmap.h; sourceTree = \"<group>\"; };\n\t\t0A2784F9128DBF7400336BDE /* rvm_config.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rvm_config.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784FA128DBF7400336BDE /* rvm_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rvm_config.h; sourceTree = \"<group>\"; };\n\t\t0A2784FB128DBF7400336BDE /* safepoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = safepoint.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784FC128DBF7400336BDE /* safepoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = safepoint.h; sourceTree = \"<group>\"; };\n\t\t0A2784FD128DBF7400336BDE /* safepoint_ability.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = safepoint_ability.cpp; sourceTree = \"<group>\"; };\n\t\t0A2784FE128DBF7400336BDE /* safepoint_ability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = safepoint_ability.h; sourceTree = \"<group>\"; };\n\t\t0A2784FF128DBF7400336BDE /* safepoint_request_queue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = safepoint_request_queue.cpp; sourceTree = \"<group>\"; };\n\t\t0A278500128DBF7400336BDE /* safepoint_request_queue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = safepoint_request_queue.h; sourceTree = \"<group>\"; };\n\t\t0A278501128DBF7400336BDE /* scheduler_mutex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = scheduler_mutex.cpp; sourceTree = \"<group>\"; };\n\t\t0A278502128DBF7400336BDE /* scheduler_mutex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = scheduler_mutex.h; sourceTree = \"<group>\"; };\n\t\t0A278503128DBF7400336BDE /* semaphore_mutex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = semaphore_mutex.cpp; sourceTree = \"<group>\"; };\n\t\t0A278504128DBF7400336BDE /* semaphore_mutex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = semaphore_mutex.h; sourceTree = \"<group>\"; };\n\t\t0A278505128DBF7400336BDE /* squeak_adapters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = squeak_adapters.cpp; sourceTree = \"<group>\"; };\n\t\t0A278506128DBF7400336BDE /* squeak_adapters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = squeak_adapters.h; sourceTree = \"<group>\"; };\n\t\t0A278507128DBF7400336BDE /* timeout_deferral.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = timeout_deferral.cpp; sourceTree = \"<group>\"; };\n\t\t0A278508128DBF7400336BDE /* timeout_deferral.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = timeout_deferral.h; sourceTree = \"<group>\"; };\n\t\t0A278509128DBF7400336BDE /* timeout_timer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = timeout_timer.cpp; sourceTree = \"<group>\"; };\n\t\t0A27850A128DBF7400336BDE /* timeout_timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = timeout_timer.h; sourceTree = \"<group>\"; };\n\t\t0A27850B128DBF7400336BDE /* utils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = utils.cpp; sourceTree = \"<group>\"; };\n\t\t0A27850C128DBF7400336BDE /* utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utils.h; sourceTree = \"<group>\"; };\n\t\t0A27850F128DBF7400336BDE /* buffered_channel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = buffered_channel.cpp; sourceTree = \"<group>\"; };\n\t\t0A278510128DBF7400336BDE /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = \"<group>\"; };\n\t\t0A278511128DBF7400336BDE /* starter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = starter.cpp; sourceTree = \"<group>\"; };\n\t\t0A278512128DBF7400336BDE /* starter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = starter.h; sourceTree = \"<group>\"; };\n\t\t0A278513128DBF7400336BDE /* synced_queue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = synced_queue.cpp; sourceTree = \"<group>\"; };\n\t\t0A278514128DBF7400336BDE /* synced_queue_threaded.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = synced_queue_threaded.cpp; sourceTree = \"<group>\"; };\n\t\t0A278516128DBF7400336BDE /* types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = types.h; sourceTree = \"<group>\"; };\n\t\t0A2785E3128DC3A000336BDE /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = \"<absolute>\"; };\n\t\t0A2785ED128DC42800336BDE /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = \"<absolute>\"; };\n\t\t0A3FB13514D99C7E0050F39C /* gtest-all.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = \"gtest-all.cc\"; path = \"googletest/src/gtest-all.cc\"; sourceTree = SOURCE_ROOT; };\n\t\t0A4D8249135C51D500CD74D8 /* sqNamedPrims.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqNamedPrims.c; sourceTree = \"<group>\"; };\n\t\t0A4D824A135C51D500CD74D8 /* sqVirtualMachine.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqVirtualMachine.c; sourceTree = \"<group>\"; };\n\t\t0A4D8250135C523B00CD74D8 /* sqUnixCharConv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqUnixCharConv.c; sourceTree = \"<group>\"; };\n\t\t0A4D8251135C523B00CD74D8 /* sqUnixExternalPrims.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqUnixExternalPrims.c; sourceTree = \"<group>\"; };\n\t\t0A4D8252135C523B00CD74D8 /* sqUnixMain.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqUnixMain.c; sourceTree = \"<group>\"; };\n\t\t0A4D8259135C526100CD74D8 /* sqUnixX11.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqUnixX11.c; sourceTree = \"<group>\"; };\n\t\t0A4D825C135C526F00CD74D8 /* sqUnixSoundMacOSX.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqUnixSoundMacOSX.c; sourceTree = \"<group>\"; };\n\t\t0A5124F61372077B001008AC /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = config.h; path = iOS/vm/iPhone/config.h; sourceTree = \"<group>\"; };\n\t\t0A5D7C87135C905800D13E53 /* sq.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sq.h; sourceTree = \"<group>\"; };\n\t\t0A5D7C88135C90BC00D13E53 /* sqMemoryAccess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqMemoryAccess.h; sourceTree = \"<group>\"; };\n\t\t0A5D7C94135CA28500D13E53 /* rvm_squeak_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rvm_squeak_config.h; sourceTree = \"<group>\"; };\n\t\t0A5D7C98135CC84700D13E53 /* sqUnixSound.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sqUnixSound.c; path = plugins/SoundPlugin/sqUnixSound.c; sourceTree = \"<group>\"; };\n\t\t0A5D7C9B135CC86800D13E53 /* sqUnixSocket.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqUnixSocket.c; sourceTree = \"<group>\"; };\n\t\t0A5D7C9E135CC8D700D13E53 /* sqUnixOpenGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqUnixOpenGL.h; path = plugins/B3DAcceleratorPlugin/sqUnixOpenGL.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CA0135CC9D400D13E53 /* SoundPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoundPlugin.h; sourceTree = \"<group>\"; };\n\t\t0A6A4832135ADF0A00933643 /* os_interface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = os_interface.cpp; sourceTree = \"<group>\"; };\n\t\t0A6A4835135AE32D00933643 /* external_primitive_table.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = external_primitive_table.cpp; sourceTree = \"<group>\"; };\n\t\t0A72A76314432D7C0008E8AC /* tmc_os_interface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tmc_os_interface.cpp; sourceTree = \"<group>\"; };\n\t\t0A72A76414432D7C0008E8AC /* tmc_os_interface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tmc_os_interface.h; sourceTree = \"<group>\"; };\n\t\t0A87AD871378439000337878 /* performance_counters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = performance_counters.h; sourceTree = \"<group>\"; };\n\t\t0A87AD891379573E00337878 /* performance_counters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = performance_counters.cpp; sourceTree = \"<group>\"; };\n\t\t0A8C91BC12DE61BB007DBAD9 /* object_p.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = object_p.h; sourceTree = \"<group>\"; };\n\t\t0A8C91C612DE62B6007DBAD9 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = \"<absolute>\"; };\n\t\t0A97FB26128FE95A003A1C74 /* UnitTests */ = {isa = PBXFileReference; explicitFileType = \"compiled.mach-o.executable\"; includeInIndex = 0; path = UnitTests; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t0A97FBAE12900336003A1C74 /* tracked_ptr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tracked_ptr.h; sourceTree = \"<group>\"; };\n\t\t0A97FBB412900371003A1C74 /* tracked_ptr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tracked_ptr.cpp; sourceTree = \"<group>\"; };\n\t\t0A97FEE412909C92003A1C74 /* test_os_interface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = test_os_interface.h; sourceTree = \"<group>\"; };\n\t\t0A97FEF112909D58003A1C74 /* tracked_ptr_registry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tracked_ptr_registry.h; sourceTree = \"<group>\"; };\n\t\t0ACF551712E07E7F0010386A /* shared_memory_message_queue_per_sender.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = shared_memory_message_queue_per_sender.cpp; sourceTree = \"<group>\"; };\n\t\t0ACF551812E07E7F0010386A /* shared_memory_message_queue_per_sender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = shared_memory_message_queue_per_sender.h; sourceTree = \"<group>\"; };\n\t\t0ADA26B912EF5C00009404B0 /* cacheline_alignment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cacheline_alignment.cpp; sourceTree = \"<group>\"; };\n\t\t0ADA271212EF66EC009404B0 /* cacheline_aligned.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cacheline_aligned.h; sourceTree = \"<group>\"; };\n\t\t0AE6D0E11531C596001A1018 /* buffered_channel_debug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = buffered_channel_debug.h; sourceTree = \"<group>\"; };\n\t\t0AE6D0E21531C596001A1018 /* buffered_channel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = buffered_channel.cpp; sourceTree = \"<group>\"; };\n\t\t0AE6D0E31531C596001A1018 /* buffered_channel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = buffered_channel.h; sourceTree = \"<group>\"; };\n\t\t0AE6D0E41531C596001A1018 /* synced_queue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = synced_queue.cpp; sourceTree = \"<group>\"; };\n\t\t0AE6D0E51531C596001A1018 /* synced_queue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = synced_queue.h; sourceTree = \"<group>\"; };\n\t\t0AEC1184128DF02F00EFF6D1 /* debug_helper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = debug_helper.h; sourceTree = \"<group>\"; };\n\t\t0AEC1185128DF0A000EFF6D1 /* debug_helper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = debug_helper.cpp; sourceTree = \"<group>\"; };\n\t\t0AEDCC6215E3CB2B0022DD44 /* sqUnixFile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqUnixFile.c; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t0A2783E9128DBF1000336BDE /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t0A2785E4128DC3A000336BDE /* CoreFoundation.framework in Frameworks */,\n\t\t\t\t0A2785EE128DC42800336BDE /* CoreServices.framework in Frameworks */,\n\t\t\t\t0A8C91C712DE62B6007DBAD9 /* IOKit.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t0A97FB24128FE95A003A1C74 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t34221DBF13D4D9650057DCBD /* CoreFoundation.framework in Frameworks */,\n\t\t\t\t34221DC013D4D9670057DCBD /* CoreServices.framework in Frameworks */,\n\t\t\t\t34221DC113D4D96B0057DCBD /* IOKit.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t0A278283128DBE2700336BDE = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A27829C128DBEBB00336BDE /* Source */,\n\t\t\t\t0A2783EC128DBF1000336BDE /* Products */,\n\t\t\t\t0A2785E3128DC3A000336BDE /* CoreFoundation.framework */,\n\t\t\t\t0A2785ED128DC42800336BDE /* CoreServices.framework */,\n\t\t\t\t0A8C91C612DE62B6007DBAD9 /* IOKit.framework */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A27829C128DBEBB00336BDE /* Source */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A2783F5128DBF7300336BDE /* externals */,\n\t\t\t\t0A2783F8128DBF7300336BDE /* from_squeak */,\n\t\t\t\t0A278443128DBF7300336BDE /* heap */,\n\t\t\t\t0A27845F128DBF7300336BDE /* image_readers */,\n\t\t\t\t0A278462128DBF7300336BDE /* interpreter */,\n\t\t\t\t0A278475128DBF7400336BDE /* makefiles */,\n\t\t\t\t0A4A612C14F7917F006748DD /* message_buffers */,\n\t\t\t\t0A27847A128DBF7400336BDE /* messages */,\n\t\t\t\t0A27848E128DBF7400336BDE /* multichip */,\n\t\t\t\t0A2784A1128DBF7400336BDE /* objects */,\n\t\t\t\t0A2784B1128DBF7400336BDE /* oops */,\n\t\t\t\t0A2784B7128DBF7400336BDE /* platform */,\n\t\t\t\t0A2784D5128DBF7400336BDE /* primitives */,\n\t\t\t\t0A2784D8128DBF7400336BDE /* runtime */,\n\t\t\t\t0A27850D128DBF7400336BDE /* tests */,\n\t\t\t\t0A278515128DBF7400336BDE /* types */,\n\t\t\t);\n\t\t\tname = Source;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A2783EC128DBF1000336BDE /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A2783EB128DBF1000336BDE /* RoarVM */,\n\t\t\t\t0A97FB26128FE95A003A1C74 /* UnitTests */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A2783F5128DBF7300336BDE /* externals */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A2783F6128DBF7300336BDE /* externals.cpp */,\n\t\t\t\t0A2783F7128DBF7300336BDE /* externals.h */,\n\t\t\t);\n\t\t\tname = externals;\n\t\t\tpath = src/externals;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A2783F8128DBF7300336BDE /* from_squeak */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A5124F31372072C001008AC /* iOS */,\n\t\t\t\t0A2783F9128DBF7300336BDE /* Cross */,\n\t\t\t\t0A27840D128DBF7300336BDE /* intplugins */,\n\t\t\t\t0A278422128DBF7300336BDE /* unix */,\n\t\t\t);\n\t\t\tname = from_squeak;\n\t\t\tpath = src/from_squeak;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A2783F9128DBF7300336BDE /* Cross */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A2783FA128DBF7300336BDE /* plugins */,\n\t\t\t\t0A278409128DBF7300336BDE /* vm */,\n\t\t\t);\n\t\t\tpath = Cross;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A2783FA128DBF7300336BDE /* plugins */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A5D7C9F135CC9D400D13E53 /* SoundPlugin */,\n\t\t\t\t0A2783FB128DBF7300336BDE /* B3DAcceleratorPlugin */,\n\t\t\t\t0A2783FF128DBF7300336BDE /* FilePlugin */,\n\t\t\t\t0A278404128DBF7300336BDE /* RePlugin */,\n\t\t\t\t0A278407128DBF7300336BDE /* SocketPlugin */,\n\t\t\t);\n\t\t\tpath = plugins;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A2783FB128DBF7300336BDE /* B3DAcceleratorPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A2783FC128DBF7300336BDE /* B3DAcceleratorPlugin.h */,\n\t\t\t\t0A2783FD128DBF7300336BDE /* sqOpenGLRenderer.h */,\n\t\t\t);\n\t\t\tpath = B3DAcceleratorPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A2783FF128DBF7300336BDE /* FilePlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A278400128DBF7300336BDE /* FilePlugin.c */,\n\t\t\t\t0A278401128DBF7300336BDE /* FilePlugin.h */,\n\t\t\t\t0A278402128DBF7300336BDE /* sqFilePluginBasicPrims.c */,\n\t\t\t);\n\t\t\tpath = FilePlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A278404128DBF7300336BDE /* RePlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A278405128DBF7300336BDE /* config.h */,\n\t\t\t);\n\t\t\tpath = RePlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A278407128DBF7300336BDE /* SocketPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A278408128DBF7300336BDE /* SocketPlugin.h */,\n\t\t\t);\n\t\t\tpath = SocketPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A278409128DBF7300336BDE /* vm */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A5D7C87135C905800D13E53 /* sq.h */,\n\t\t\t\t0A5D7C88135C90BC00D13E53 /* sqMemoryAccess.h */,\n\t\t\t\t0A4D8249135C51D500CD74D8 /* sqNamedPrims.c */,\n\t\t\t\t0A4D824A135C51D500CD74D8 /* sqVirtualMachine.c */,\n\t\t\t\t0A27840C128DBF7300336BDE /* sqVirtualMachine.h */,\n\t\t\t);\n\t\t\tpath = vm;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A27840D128DBF7300336BDE /* intplugins */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A27840E128DBF7300336BDE /* B2DPlugin */,\n\t\t\t\t0A278410128DBF7300336BDE /* BitBltPlugin */,\n\t\t\t\t0A278412128DBF7300336BDE /* FloatArrayPlugin */,\n\t\t\t\t0A278414128DBF7300336BDE /* LargeIntegers */,\n\t\t\t\t0A278416128DBF7300336BDE /* Matrix2x3Plugin */,\n\t\t\t\t0A278418128DBF7300336BDE /* MiscPrimitivePlugin */,\n\t\t\t\t0A27841A128DBF7300336BDE /* SocketPlugin */,\n\t\t\t\t0A27841C128DBF7300336BDE /* SoundPlugin */,\n\t\t\t\t0A278420128DBF7300336BDE /* UnixOSProcessPlugin */,\n\t\t\t);\n\t\t\tpath = intplugins;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A27840E128DBF7300336BDE /* B2DPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A27840F128DBF7300336BDE /* B2DPlugin.c */,\n\t\t\t);\n\t\t\tpath = B2DPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A278410128DBF7300336BDE /* BitBltPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A278411128DBF7300336BDE /* BitBltPlugin.c */,\n\t\t\t);\n\t\t\tpath = BitBltPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A278412128DBF7300336BDE /* FloatArrayPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A278413128DBF7300336BDE /* FloatArrayPlugin.c */,\n\t\t\t);\n\t\t\tpath = FloatArrayPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A278414128DBF7300336BDE /* LargeIntegers */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A278415128DBF7300336BDE /* LargeIntegers.c */,\n\t\t\t);\n\t\t\tpath = LargeIntegers;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A278416128DBF7300336BDE /* Matrix2x3Plugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A278417128DBF7300336BDE /* Matrix2x3Plugin.c */,\n\t\t\t);\n\t\t\tpath = Matrix2x3Plugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A278418128DBF7300336BDE /* MiscPrimitivePlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A278419128DBF7300336BDE /* MiscPrimitivePlugin.c */,\n\t\t\t);\n\t\t\tpath = MiscPrimitivePlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A27841A128DBF7300336BDE /* SocketPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A27841B128DBF7300336BDE /* SocketPlugin.c */,\n\t\t\t);\n\t\t\tpath = SocketPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A27841C128DBF7300336BDE /* SoundPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A27841D128DBF7300336BDE /* SoundPlugin.c */,\n\t\t\t);\n\t\t\tpath = SoundPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A278420128DBF7300336BDE /* UnixOSProcessPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A278421128DBF7300336BDE /* UnixOSProcessPlugin.c */,\n\t\t\t);\n\t\t\tpath = UnixOSProcessPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A278422128DBF7300336BDE /* unix */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A5D7C96135CC81F00D13E53 /* plugins */,\n\t\t\t\t0A278425128DBF7300336BDE /* vm */,\n\t\t\t\t0A278439128DBF7300336BDE /* vm-display-X11 */,\n\t\t\t\t0A27843C128DBF7300336BDE /* vm-sound-custom */,\n\t\t\t\t0A27843E128DBF7300336BDE /* vm-sound-MacOSX */,\n\t\t\t\t0A278441128DBF7300336BDE /* vm-sound-null */,\n\t\t\t);\n\t\t\tpath = unix;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A278425128DBF7300336BDE /* vm */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A278426128DBF7300336BDE /* aio.c */,\n\t\t\t\t0A278427128DBF7300336BDE /* dlfcn-dyld.c */,\n\t\t\t\t0A278428128DBF7300336BDE /* interp.h */,\n\t\t\t\t0A27842A128DBF7300336BDE /* sqaio.h */,\n\t\t\t\t0A27842B128DBF7300336BDE /* sqConfig.h */,\n\t\t\t\t0A27842C128DBF7300336BDE /* SqDisplay.h */,\n\t\t\t\t0A27842E128DBF7300336BDE /* SqModule.h */,\n\t\t\t\t0A27842F128DBF7300336BDE /* sqNamedPrims.h */,\n\t\t\t\t0A278430128DBF7300336BDE /* sqPlatformSpecific.h */,\n\t\t\t\t0A4D8250135C523B00CD74D8 /* sqUnixCharConv.c */,\n\t\t\t\t0A4D8251135C523B00CD74D8 /* sqUnixExternalPrims.c */,\n\t\t\t\t0A4D8252135C523B00CD74D8 /* sqUnixMain.c */,\n\t\t\t\t0A278434128DBF7300336BDE /* SqSound.h */,\n\t\t\t\t0A278435128DBF7300336BDE /* sqUnixCharConv.h */,\n\t\t\t\t0A278436128DBF7300336BDE /* sqUnixEvent.c */,\n\t\t\t\t0A278437128DBF7300336BDE /* sqUnixGlobals.h */,\n\t\t\t\t0A278438128DBF7300336BDE /* sqUnixMain.h */,\n\t\t\t);\n\t\t\tpath = vm;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A278439128DBF7300336BDE /* vm-display-X11 */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A4D8259135C526100CD74D8 /* sqUnixX11.c */,\n\t\t\t\t0A27843B128DBF7300336BDE /* sqUnixXdnd.c */,\n\t\t\t);\n\t\t\tpath = \"vm-display-X11\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A27843C128DBF7300336BDE /* vm-sound-custom */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A27843D128DBF7300336BDE /* sqUnixCustomSound.c */,\n\t\t\t);\n\t\t\tpath = \"vm-sound-custom\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A27843E128DBF7300336BDE /* vm-sound-MacOSX */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A4D825C135C526F00CD74D8 /* sqUnixSoundMacOSX.c */,\n\t\t\t\t0A278440128DBF7300336BDE /* sqUnixSoundDebug.h */,\n\t\t\t);\n\t\t\tpath = \"vm-sound-MacOSX\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A278441128DBF7300336BDE /* vm-sound-null */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A278442128DBF7300336BDE /* sqUnixSoundNull.c */,\n\t\t\t);\n\t\t\tpath = \"vm-sound-null\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A278443128DBF7300336BDE /* heap */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A278444128DBF7300336BDE /* abstract_mark_sweep_collector.cpp */,\n\t\t\t\t0A278445128DBF7300336BDE /* abstract_mark_sweep_collector.h */,\n\t\t\t\t0A278446128DBF7300336BDE /* abstract_object_heap.cpp */,\n\t\t\t\t0A278447128DBF7300336BDE /* abstract_object_heap.h */,\n\t\t\t\t0A278448128DBF7300336BDE /* abstract_object_heap.inline.h */,\n\t\t\t\t0A278449128DBF7300336BDE /* abstract_object_table.h */,\n\t\t\t\t0A27844A128DBF7300336BDE /* gc_oop_stack.h */,\n\t\t\t\t0A27844B128DBF7300336BDE /* indirect_oop_mark_sweep_collector.h */,\n\t\t\t\t0A27844C128DBF7300336BDE /* mark_sweep_collector.h */,\n\t\t\t\t0A27844D128DBF7300336BDE /* memory_system.cpp */,\n\t\t\t\t0A27844E128DBF7300336BDE /* memory_system.h */,\n\t\t\t\t0A27844F128DBF7300336BDE /* memory_system.inline.h */,\n\t\t\t\t0A278450128DBF7300336BDE /* multicore_object_heap.cpp */,\n\t\t\t\t0A278451128DBF7300336BDE /* multicore_object_heap.h */,\n\t\t\t\t0A278452128DBF7300336BDE /* multicore_object_heap.inline.h */,\n\t\t\t\t0A278453128DBF7300336BDE /* multicore_object_table.cpp */,\n\t\t\t\t0A278454128DBF7300336BDE /* multicore_object_table.h */,\n\t\t\t\t0A278455128DBF7300336BDE /* multicore_object_table.inline.h */,\n\t\t\t\t0A278456128DBF7300336BDE /* oop_closure.h */,\n\t\t\t);\n\t\t\tname = heap;\n\t\t\tpath = src/heap;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A27845F128DBF7300336BDE /* image_readers */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A278460128DBF7300336BDE /* squeak_image_reader.cpp */,\n\t\t\t\t0A278461128DBF7300336BDE /* squeak_image_reader.h */,\n\t\t\t);\n\t\t\tname = image_readers;\n\t\t\tpath = src/image_readers;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A278462128DBF7300336BDE /* interpreter */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A278463128DBF7300336BDE /* abstract_primitive_table.h */,\n\t\t\t\t0A278464128DBF7300336BDE /* at_cache.cpp */,\n\t\t\t\t0A278465128DBF7300336BDE /* at_cache.h */,\n\t\t\t\t0A278466128DBF7300336BDE /* external_primitive_table.h */,\n\t\t\t\t0A278467128DBF7300336BDE /* interpreter_bytecodes.cpp */,\n\t\t\t\t0A278468128DBF7300336BDE /* interpreter_bytecodes.h */,\n\t\t\t\t0A278469128DBF7300336BDE /* interpreter_primitives.cpp */,\n\t\t\t\t0A27846A128DBF7300336BDE /* interpreter_primitives.h */,\n\t\t\t\t0A27846B128DBF7300336BDE /* method_cache.cpp */,\n\t\t\t\t0A27846C128DBF7300336BDE /* method_cache.h */,\n\t\t\t\t0A27846D128DBF7300336BDE /* obsolete_indexed_primitive_table.cpp */,\n\t\t\t\t0A27846E128DBF7300336BDE /* obsolete_indexed_primitive_table.h */,\n\t\t\t\t0A27846F128DBF7300336BDE /* obsolete_named_primitive_table.cpp */,\n\t\t\t\t0A278470128DBF7300336BDE /* obsolete_named_primitive_table.h */,\n\t\t\t\t0A278471128DBF7300336BDE /* primitive_table.cpp */,\n\t\t\t\t0A278472128DBF7400336BDE /* primitive_table.h */,\n\t\t\t\t0A278473128DBF7400336BDE /* squeak_interpreter.cpp */,\n\t\t\t\t0A278474128DBF7400336BDE /* squeak_interpreter.h */,\n\t\t\t);\n\t\t\tname = interpreter;\n\t\t\tpath = src/interpreter;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A278475128DBF7400336BDE /* makefiles */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A278476128DBF7400336BDE /* configure */,\n\t\t\t\t0A278477128DBF7400336BDE /* Makefile.common */,\n\t\t\t\t0A278478128DBF7400336BDE /* Makefile.debug */,\n\t\t\t\t0A278479128DBF7400336BDE /* Makefile.opt */,\n\t\t\t);\n\t\t\tname = makefiles;\n\t\t\tpath = src/makefiles;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A27847A128DBF7400336BDE /* messages */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A27847B128DBF7400336BDE /* abstract_message.cpp */,\n\t\t\t\t0A27847C128DBF7400336BDE /* abstract_message.h */,\n\t\t\t\t0A27847D128DBF7400336BDE /* deferred_request.cpp */,\n\t\t\t\t0A27847E128DBF7400336BDE /* deferred_request.h */,\n\t\t\t\t0A27847F128DBF7400336BDE /* interactions.cpp */,\n\t\t\t\t0A278480128DBF7400336BDE /* interactions.h */,\n\t\t\t\t0A278481128DBF7400336BDE /* interpreter_subset_for_control_transfer.cpp */,\n\t\t\t\t0A278482128DBF7400336BDE /* interpreter_subset_for_control_transfer.h */,\n\t\t\t\t0A278483128DBF7400336BDE /* message_classes.cpp */,\n\t\t\t\t0A278484128DBF7400336BDE /* message_classes.h */,\n\t\t\t\t0A278485128DBF7400336BDE /* message_or_ack_request.cpp */,\n\t\t\t\t0A278486128DBF7400336BDE /* message_or_ack_request.h */,\n\t\t\t\t0A278487128DBF7400336BDE /* message_statics.cpp */,\n\t\t\t\t0A278488128DBF7400336BDE /* message_statics.h */,\n\t\t\t\t0A278489128DBF7400336BDE /* message_stats.cpp */,\n\t\t\t\t0A27848A128DBF7400336BDE /* message_stats.h */,\n\t\t\t\t0A27848B128DBF7400336BDE /* message_templates.h */,\n\t\t\t\t0A27848C128DBF7400336BDE /* receive_marker.cpp */,\n\t\t\t\t0A27848D128DBF7400336BDE /* receive_marker.h */,\n\t\t\t);\n\t\t\tname = messages;\n\t\t\tpath = src/messages;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A27848E128DBF7400336BDE /* multichip */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A27848F128DBF7400336BDE /* abstract_zero_copy_command_queue_endpoint.cpp */,\n\t\t\t\t0A278490128DBF7400336BDE /* abstract_zero_copy_command_queue_endpoint.h */,\n\t\t\t\t0A278491128DBF7400336BDE /* chip_to_chip_direct_to_hypervisor_zero_copy_endpoint.cpp */,\n\t\t\t\t0A278492128DBF7400336BDE /* chip_to_chip_direct_to_hypervisor_zero_copy_endpoint.h */,\n\t\t\t\t0A278493128DBF7400336BDE /* chip_to_chip_direct_to_hypervisor_zero_copy_receiver.cpp */,\n\t\t\t\t0A278494128DBF7400336BDE /* chip_to_chip_direct_to_hypervisor_zero_copy_receiver.h */,\n\t\t\t\t0A278495128DBF7400336BDE /* chip_to_chip_direct_to_hypervisor_zero_copy_sender.cpp */,\n\t\t\t\t0A278496128DBF7400336BDE /* chip_to_chip_direct_to_hypervisor_zero_copy_sender.h */,\n\t\t\t\t0A278497128DBF7400336BDE /* chip_to_chip_zero_copy_command_queue_endpoint.cpp */,\n\t\t\t\t0A278498128DBF7400336BDE /* chip_to_chip_zero_copy_command_queue_endpoint.h */,\n\t\t\t\t0A278499128DBF7400336BDE /* chip_to_chip_zero_copy_command_receiver.cpp */,\n\t\t\t\t0A27849A128DBF7400336BDE /* chip_to_chip_zero_copy_command_receiver.h */,\n\t\t\t\t0A27849B128DBF7400336BDE /* chip_to_chip_zero_copy_command_sender.cpp */,\n\t\t\t\t0A27849C128DBF7400336BDE /* chip_to_chip_zero_copy_command_sender.h */,\n\t\t\t\t0A27849D128DBF7400336BDE /* host_pci_info.cpp */,\n\t\t\t\t0A27849E128DBF7400336BDE /* host_pci_info.h */,\n\t\t\t\t0A27849F128DBF7400336BDE /* tilera_chip_to_chip_message_queue.cpp */,\n\t\t\t\t0A2784A0128DBF7400336BDE /* tilera_chip_to_chip_message_queue.h */,\n\t\t\t);\n\t\t\tname = multichip;\n\t\t\tpath = src/multichip;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A2784A1128DBF7400336BDE /* objects */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A2784A2128DBF7400336BDE /* chunk.h */,\n\t\t\t\t0A2784A3128DBF7400336BDE /* chunk.inline.h */,\n\t\t\t\t0A2784A4128DBF7400336BDE /* header_type.cpp */,\n\t\t\t\t0A2784A5128DBF7400336BDE /* header_type.h */,\n\t\t\t\t0A2784A6128DBF7400336BDE /* object.cpp */,\n\t\t\t\t0A2784A7128DBF7400336BDE /* object.h */,\n\t\t\t\t0A2784A8128DBF7400336BDE /* object.inline.h */,\n\t\t\t\t0A2784A9128DBF7400336BDE /* object_indices.h */,\n\t\t\t\t0A2784AA128DBF7400336BDE /* preheader.h */,\n\t\t\t\t0A2784AB128DBF7400336BDE /* process_field_locator.cpp */,\n\t\t\t\t0A2784AC128DBF7400336BDE /* process_field_locator.h */,\n\t\t\t\t0A2784AD128DBF7400336BDE /* roots.cpp */,\n\t\t\t\t0A2784AE128DBF7400336BDE /* roots.h */,\n\t\t\t\t0A2784AF128DBF7400336BDE /* special_indices.h */,\n\t\t\t\t0A2784B0128DBF7400336BDE /* word_containing_object_type.h */,\n\t\t\t\t0A8C91BC12DE61BB007DBAD9 /* object_p.h */,\n\t\t\t);\n\t\t\tname = objects;\n\t\t\tpath = src/objects;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A2784B1128DBF7400336BDE /* oops */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A2784B2128DBF7400336BDE /* abstract_oop.h */,\n\t\t\t\t0A2784B3128DBF7400336BDE /* oop.cpp */,\n\t\t\t\t0A2784B4128DBF7400336BDE /* oop.h */,\n\t\t\t\t0A2784B5128DBF7400336BDE /* oop.inline.h */,\n\t\t\t\t0A2784B6128DBF7400336BDE /* tags.h */,\n\t\t\t);\n\t\t\tname = oops;\n\t\t\tpath = src/oops;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A2784B7128DBF7400336BDE /* platform */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A2784B8128DBF7400336BDE /* abstract_cpu_coordinate.h */,\n\t\t\t\t0A2784B9128DBF7400336BDE /* abstract_memory_semantics.h */,\n\t\t\t\t0A2784BA128DBF7400336BDE /* abstract_message_queue.h */,\n\t\t\t\t0A2784BB128DBF7400336BDE /* abstract_os_interface.cpp */,\n\t\t\t\t0A2784BC128DBF7400336BDE /* abstract_os_interface.h */,\n\t\t\t\t0A2784BD128DBF7400336BDE /* cpu_coordinate.h */,\n\t\t\t\t0A2784BE128DBF7400336BDE /* dummy_cpu_coordinate.cpp */,\n\t\t\t\t0A2784BF128DBF7400336BDE /* dummy_cpu_coordinate.h */,\n\t\t\t\t0A2784C0128DBF7400336BDE /* ilib_message_queue.cpp */,\n\t\t\t\t0A2784C1128DBF7400336BDE /* ilib_message_queue.h */,\n\t\t\t\t0A2784C2128DBF7400336BDE /* ilib_os_interface.cpp */,\n\t\t\t\t0A2784C3128DBF7400336BDE /* ilib_os_interface.h */,\n\t\t\t\t0A72A76314432D7C0008E8AC /* tmc_os_interface.cpp */,\n\t\t\t\t0A72A76414432D7C0008E8AC /* tmc_os_interface.h */,\n\t\t\t\t0A2784C4128DBF7400336BDE /* logical_core.cpp */,\n\t\t\t\t0A2784C5128DBF7400336BDE /* logical_core.h */,\n\t\t\t\t0A2784C6128DBF7400336BDE /* memory_semantics.h */,\n\t\t\t\t0A2784C7128DBF7400336BDE /* message_queue.h */,\n\t\t\t\t0A2784C8128DBF7400336BDE /* os_interface.h */,\n\t\t\t\t0A2784C9128DBF7400336BDE /* osx_os_interface.cpp */,\n\t\t\t\t0A2784CA128DBF7400336BDE /* osx_os_interface.h */,\n\t\t\t\t0A2784CB128DBF7400336BDE /* posix_os_interface.cpp */,\n\t\t\t\t0A2784CC128DBF7400336BDE /* posix_os_interface.h */,\n\t\t\t\t0A2784CD128DBF7400336BDE /* process_memory_semantics.cpp */,\n\t\t\t\t0A2784CE128DBF7400336BDE /* process_memory_semantics.h */,\n\t\t\t\t0A2784CF128DBF7400336BDE /* shared_memory_message_queue.cpp */,\n\t\t\t\t0A2784D0128DBF7400336BDE /* shared_memory_message_queue.h */,\n\t\t\t\t0ACF551712E07E7F0010386A /* shared_memory_message_queue_per_sender.cpp */,\n\t\t\t\t0ACF551812E07E7F0010386A /* shared_memory_message_queue_per_sender.h */,\n\t\t\t\t0A2784D1128DBF7400336BDE /* thread_memory_semantics.cpp */,\n\t\t\t\t0A2784D2128DBF7400336BDE /* thread_memory_semantics.h */,\n\t\t\t\t0A2784D3128DBF7400336BDE /* tile_cpu_coordinate.cpp */,\n\t\t\t\t0A2784D4128DBF7400336BDE /* tile_cpu_coordinate.h */,\n\t\t\t\t0ADA271212EF66EC009404B0 /* cacheline_aligned.h */,\n\t\t\t);\n\t\t\tname = platform;\n\t\t\tpath = src/platform;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A2784D5128DBF7400336BDE /* primitives */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A2784D6128DBF7400336BDE /* RVMPlugin.cpp */,\n\t\t\t\t0A2784D7128DBF7400336BDE /* RVMPlugin.h */,\n\t\t\t);\n\t\t\tname = primitives;\n\t\t\tpath = src/primitives;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A2784D8128DBF7400336BDE /* runtime */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A2784D9128DBF7400336BDE /* abstract_mutex.cpp */,\n\t\t\t\t0A2784DA128DBF7400336BDE /* abstract_mutex.h */,\n\t\t\t\t0A2784DB128DBF7400336BDE /* abstract_tracer.cpp */,\n\t\t\t\t0A2784DC128DBF7400336BDE /* abstract_tracer.h */,\n\t\t\t\t0A2784DD128DBF7400336BDE /* bytemap.cpp */,\n\t\t\t\t0A2784DE128DBF7400336BDE /* bytemap.h */,\n\t\t\t\t0A2784DF128DBF7400336BDE /* core_tracer.cpp */,\n\t\t\t\t0A2784E0128DBF7400336BDE /* core_tracer.h */,\n\t\t\t\t0A2784E1128DBF7400336BDE /* debug_store_checks.h */,\n\t\t\t\t0A2784E2128DBF7400336BDE /* gc_debugging_tracer.cpp */,\n\t\t\t\t0A2784E3128DBF7400336BDE /* gc_debugging_tracer.h */,\n\t\t\t\t0A2784E4128DBF7400336BDE /* error_handling.cpp */,\n\t\t\t\t0A2784E5128DBF7400336BDE /* error_handling.h */,\n\t\t\t\t0A2784E6128DBF7400336BDE /* execution_tracer.cpp */,\n\t\t\t\t0A2784E7128DBF7400336BDE /* execution_tracer.h */,\n\t\t\t\t0A2784E8128DBF7400336BDE /* headers.h */,\n\t\t\t\t0A2784E9128DBF7400336BDE /* main.cpp */,\n\t\t\t\t0A2784EA128DBF7400336BDE /* measurements.cpp */,\n\t\t\t\t0A2784EB128DBF7400336BDE /* measurements.h */,\n\t\t\t\t0A2784EC128DBF7400336BDE /* my_rank.cpp */,\n\t\t\t\t0A2784ED128DBF7400336BDE /* my_rank.h */,\n\t\t\t\t0A2784EE128DBF7400336BDE /* oop_tracer.cpp */,\n\t\t\t\t0A2784EF128DBF7400336BDE /* oop_tracer.h */,\n\t\t\t\t0A2784F0128DBF7400336BDE /* printer.cpp */,\n\t\t\t\t0A2784F1128DBF7400336BDE /* printer.h */,\n\t\t\t\t0A2784F2128DBF7400336BDE /* profiling_tracer.cpp */,\n\t\t\t\t0A2784F3128DBF7400336BDE /* profiling_tracer.h */,\n\t\t\t\t0A2784F4128DBF7400336BDE /* rank_set.cpp */,\n\t\t\t\t0A2784F5128DBF7400336BDE /* rank_set.h */,\n\t\t\t\t0A2784F6128DBF7400336BDE /* runtime_tester.h */,\n\t\t\t\t0A2784F7128DBF7400336BDE /* rvm_bitmap.cpp */,\n\t\t\t\t0A2784F8128DBF7400336BDE /* rvm_bitmap.h */,\n\t\t\t\t0A2784F9128DBF7400336BDE /* rvm_config.cpp */,\n\t\t\t\t0A2784FA128DBF7400336BDE /* rvm_config.h */,\n\t\t\t\t0A5D7C94135CA28500D13E53 /* rvm_squeak_config.h */,\n\t\t\t\t0A2784FB128DBF7400336BDE /* safepoint.cpp */,\n\t\t\t\t0A2784FC128DBF7400336BDE /* safepoint.h */,\n\t\t\t\t0A2784FD128DBF7400336BDE /* safepoint_ability.cpp */,\n\t\t\t\t0A2784FE128DBF7400336BDE /* safepoint_ability.h */,\n\t\t\t\t0A2784FF128DBF7400336BDE /* safepoint_request_queue.cpp */,\n\t\t\t\t0A278500128DBF7400336BDE /* safepoint_request_queue.h */,\n\t\t\t\t0A278501128DBF7400336BDE /* scheduler_mutex.cpp */,\n\t\t\t\t0A278502128DBF7400336BDE /* scheduler_mutex.h */,\n\t\t\t\t0A278503128DBF7400336BDE /* semaphore_mutex.cpp */,\n\t\t\t\t0A278504128DBF7400336BDE /* semaphore_mutex.h */,\n\t\t\t\t0A278505128DBF7400336BDE /* squeak_adapters.cpp */,\n\t\t\t\t0A278506128DBF7400336BDE /* squeak_adapters.h */,\n\t\t\t\t0A278507128DBF7400336BDE /* timeout_deferral.cpp */,\n\t\t\t\t0A278508128DBF7400336BDE /* timeout_deferral.h */,\n\t\t\t\t0A278509128DBF7400336BDE /* timeout_timer.cpp */,\n\t\t\t\t0A27850A128DBF7400336BDE /* timeout_timer.h */,\n\t\t\t\t0A27850B128DBF7400336BDE /* utils.cpp */,\n\t\t\t\t0A27850C128DBF7400336BDE /* utils.h */,\n\t\t\t\t0AEC1184128DF02F00EFF6D1 /* debug_helper.h */,\n\t\t\t\t0AEC1185128DF0A000EFF6D1 /* debug_helper.cpp */,\n\t\t\t\t0A97FBAE12900336003A1C74 /* tracked_ptr.h */,\n\t\t\t\t0A97FEF112909D58003A1C74 /* tracked_ptr_registry.h */,\n\t\t\t\t0A87AD871378439000337878 /* performance_counters.h */,\n\t\t\t\t0A87AD891379573E00337878 /* performance_counters.cpp */,\n\t\t\t);\n\t\t\tname = runtime;\n\t\t\tpath = src/runtime;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A27850D128DBF7400336BDE /* tests */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A3FB13514D99C7E0050F39C /* gtest-all.cc */,\n\t\t\t\t0A27850F128DBF7400336BDE /* buffered_channel.cpp */,\n\t\t\t\t0A278510128DBF7400336BDE /* main.cpp */,\n\t\t\t\t0A278511128DBF7400336BDE /* starter.cpp */,\n\t\t\t\t0A278512128DBF7400336BDE /* starter.h */,\n\t\t\t\t0A278513128DBF7400336BDE /* synced_queue.cpp */,\n\t\t\t\t0A278514128DBF7400336BDE /* synced_queue_threaded.cpp */,\n\t\t\t\t0A97FBB412900371003A1C74 /* tracked_ptr.cpp */,\n\t\t\t\t0A97FEE412909C92003A1C74 /* test_os_interface.h */,\n\t\t\t\t0ADA26B912EF5C00009404B0 /* cacheline_alignment.cpp */,\n\t\t\t\t0A6A4832135ADF0A00933643 /* os_interface.cpp */,\n\t\t\t\t0A6A4835135AE32D00933643 /* external_primitive_table.cpp */,\n\t\t\t);\n\t\t\tname = tests;\n\t\t\tpath = src/tests;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A278515128DBF7400336BDE /* types */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A278516128DBF7400336BDE /* types.h */,\n\t\t\t);\n\t\t\tname = types;\n\t\t\tpath = src/types;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A4A612C14F7917F006748DD /* message_buffers */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AE6D0E11531C596001A1018 /* buffered_channel_debug.h */,\n\t\t\t\t0AE6D0E21531C596001A1018 /* buffered_channel.cpp */,\n\t\t\t\t0AE6D0E31531C596001A1018 /* buffered_channel.h */,\n\t\t\t\t0AE6D0E41531C596001A1018 /* synced_queue.cpp */,\n\t\t\t\t0AE6D0E51531C596001A1018 /* synced_queue.h */,\n\t\t\t);\n\t\t\tname = message_buffers;\n\t\t\tpath = src/message_buffers;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A5124F31372072C001008AC /* iOS */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A5124F41372073F001008AC /* vm */,\n\t\t\t);\n\t\t\tname = iOS;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A5124F41372073F001008AC /* vm */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A5124F513720749001008AC /* iPhone */,\n\t\t\t);\n\t\t\tname = vm;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A5124F513720749001008AC /* iPhone */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A5124F61372077B001008AC /* config.h */,\n\t\t\t);\n\t\t\tname = iPhone;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A5D7C96135CC81F00D13E53 /* plugins */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AEDCC6015E3CB2B0022DD44 /* FilePlugin */,\n\t\t\t\t0A5D7C9D135CC8C800D13E53 /* B3DAcceleratorPlugin */,\n\t\t\t\t0A5D7C9A135CC86800D13E53 /* SocketPlugin */,\n\t\t\t\t0A5D7C97135CC83500D13E53 /* SoundPlugin */,\n\t\t\t);\n\t\t\tname = plugins;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A5D7C97135CC83500D13E53 /* SoundPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A5D7C98135CC84700D13E53 /* sqUnixSound.c */,\n\t\t\t);\n\t\t\tname = SoundPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A5D7C9A135CC86800D13E53 /* SocketPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A5D7C9B135CC86800D13E53 /* sqUnixSocket.c */,\n\t\t\t);\n\t\t\tname = SocketPlugin;\n\t\t\tpath = plugins/SocketPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A5D7C9D135CC8C800D13E53 /* B3DAcceleratorPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A5D7C9E135CC8D700D13E53 /* sqUnixOpenGL.h */,\n\t\t\t);\n\t\t\tname = B3DAcceleratorPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A5D7C9F135CC9D400D13E53 /* SoundPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A5D7CA0135CC9D400D13E53 /* SoundPlugin.h */,\n\t\t\t);\n\t\t\tpath = SoundPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AEDCC6015E3CB2B0022DD44 /* FilePlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AEDCC6215E3CB2B0022DD44 /* sqUnixFile.c */,\n\t\t\t);\n\t\t\tname = FilePlugin;\n\t\t\tpath = plugins/FilePlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXLegacyTarget section */\n\t\t0AC76D9212EC5FCD00C86B11 /* make */ = {\n\t\t\tisa = PBXLegacyTarget;\n\t\t\tbuildArgumentsString = \"$(ACTION)\";\n\t\t\tbuildConfigurationList = 0AC76D9812EC5FF200C86B11 /* Build configuration list for PBXLegacyTarget \"make\" */;\n\t\t\tbuildPhases = (\n\t\t\t);\n\t\t\tbuildToolPath = /usr/bin/make;\n\t\t\tbuildWorkingDirectory = \"$(SRCROOT)/build/\";\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = make;\n\t\t\tpassBuildSettingsInEnvironment = 1;\n\t\t\tproductName = make;\n\t\t};\n/* End PBXLegacyTarget section */\n\n/* Begin PBXNativeTarget section */\n\t\t0A2783EA128DBF1000336BDE /* RoarVM */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 0A2783F0128DBF1000336BDE /* Build configuration list for PBXNativeTarget \"RoarVM\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t0A2783E8128DBF1000336BDE /* Sources */,\n\t\t\t\t0A2783E9128DBF1000336BDE /* Frameworks */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = RoarVM;\n\t\t\tproductName = RoarVM;\n\t\t\tproductReference = 0A2783EB128DBF1000336BDE /* RoarVM */;\n\t\t\tproductType = \"com.apple.product-type.tool\";\n\t\t};\n\t\t0A97FB25128FE95A003A1C74 /* UnitTests */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 0A97FB2B128FE975003A1C74 /* Build configuration list for PBXNativeTarget \"UnitTests\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t0A97FB23128FE95A003A1C74 /* Sources */,\n\t\t\t\t0A97FB24128FE95A003A1C74 /* Frameworks */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = UnitTests;\n\t\t\tproductName = UnitTests;\n\t\t\tproductReference = 0A97FB26128FE95A003A1C74 /* UnitTests */;\n\t\t\tproductType = \"com.apple.product-type.tool\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t0A278285128DBE2700336BDE /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastUpgradeCheck = 0460;\n\t\t\t};\n\t\t\tbuildConfigurationList = 0A278288128DBE2700336BDE /* Build configuration list for PBXProject \"RoarVM\" */;\n\t\t\tcompatibilityVersion = \"Xcode 3.2\";\n\t\t\tdevelopmentRegion = English;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\tEnglish,\n\t\t\t\tJapanese,\n\t\t\t\tFrench,\n\t\t\t\tGerman,\n\t\t\t);\n\t\t\tmainGroup = 0A278283128DBE2700336BDE;\n\t\t\tproductRefGroup = 0A2783EC128DBF1000336BDE /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t0A2783EA128DBF1000336BDE /* RoarVM */,\n\t\t\t\t0A97FB25128FE95A003A1C74 /* UnitTests */,\n\t\t\t\t0AC76D9212EC5FCD00C86B11 /* make */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t0A2783E8128DBF1000336BDE /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t0A278518128DBF7400336BDE /* externals.cpp in Sources */,\n\t\t\t\t0A278519128DBF7400336BDE /* FilePlugin.c in Sources */,\n\t\t\t\t0A27851A128DBF7400336BDE /* sqFilePluginBasicPrims.c in Sources */,\n\t\t\t\t0A27851E128DBF7400336BDE /* B2DPlugin.c in Sources */,\n\t\t\t\t0A27851F128DBF7400336BDE /* BitBltPlugin.c in Sources */,\n\t\t\t\t0A278520128DBF7400336BDE /* FloatArrayPlugin.c in Sources */,\n\t\t\t\t0A278521128DBF7400336BDE /* LargeIntegers.c in Sources */,\n\t\t\t\t0A278522128DBF7400336BDE /* Matrix2x3Plugin.c in Sources */,\n\t\t\t\t0A278523128DBF7400336BDE /* MiscPrimitivePlugin.c in Sources */,\n\t\t\t\t0A278524128DBF7400336BDE /* SocketPlugin.c in Sources */,\n\t\t\t\t0A278525128DBF7400336BDE /* SoundPlugin.c in Sources */,\n\t\t\t\t0A278529128DBF7400336BDE /* aio.c in Sources */,\n\t\t\t\t0A278531128DBF7400336BDE /* sqUnixCustomSound.c in Sources */,\n\t\t\t\t0A278533128DBF7400336BDE /* sqUnixSoundNull.c in Sources */,\n\t\t\t\t0A278534128DBF7400336BDE /* abstract_mark_sweep_collector.cpp in Sources */,\n\t\t\t\t0A278535128DBF7400336BDE /* abstract_object_heap.cpp in Sources */,\n\t\t\t\t0A278536128DBF7400336BDE /* memory_system.cpp in Sources */,\n\t\t\t\t0A278537128DBF7400336BDE /* multicore_object_heap.cpp in Sources */,\n\t\t\t\t0A278538128DBF7400336BDE /* multicore_object_table.cpp in Sources */,\n\t\t\t\t0A27853C128DBF7400336BDE /* squeak_image_reader.cpp in Sources */,\n\t\t\t\t0A27853D128DBF7400336BDE /* at_cache.cpp in Sources */,\n\t\t\t\t0A27853E128DBF7400336BDE /* interpreter_bytecodes.cpp in Sources */,\n\t\t\t\t0A27853F128DBF7400336BDE /* interpreter_primitives.cpp in Sources */,\n\t\t\t\t0A278540128DBF7400336BDE /* method_cache.cpp in Sources */,\n\t\t\t\t0A278541128DBF7400336BDE /* obsolete_indexed_primitive_table.cpp in Sources */,\n\t\t\t\t0A278542128DBF7400336BDE /* obsolete_named_primitive_table.cpp in Sources */,\n\t\t\t\t0A278543128DBF7400336BDE /* primitive_table.cpp in Sources */,\n\t\t\t\t0A278544128DBF7400336BDE /* squeak_interpreter.cpp in Sources */,\n\t\t\t\t0A278545128DBF7400336BDE /* abstract_message.cpp in Sources */,\n\t\t\t\t0A278546128DBF7400336BDE /* deferred_request.cpp in Sources */,\n\t\t\t\t0A278547128DBF7400336BDE /* interactions.cpp in Sources */,\n\t\t\t\t0A278548128DBF7400336BDE /* interpreter_subset_for_control_transfer.cpp in Sources */,\n\t\t\t\t0A278549128DBF7400336BDE /* message_classes.cpp in Sources */,\n\t\t\t\t0A27854A128DBF7400336BDE /* message_or_ack_request.cpp in Sources */,\n\t\t\t\t0A27854B128DBF7400336BDE /* message_statics.cpp in Sources */,\n\t\t\t\t0A27854C128DBF7400336BDE /* message_stats.cpp in Sources */,\n\t\t\t\t0A27854D128DBF7400336BDE /* receive_marker.cpp in Sources */,\n\t\t\t\t0A278557128DBF7400336BDE /* header_type.cpp in Sources */,\n\t\t\t\t0A278558128DBF7400336BDE /* object.cpp in Sources */,\n\t\t\t\t0A278559128DBF7400336BDE /* process_field_locator.cpp in Sources */,\n\t\t\t\t0A27855A128DBF7400336BDE /* roots.cpp in Sources */,\n\t\t\t\t0A27855B128DBF7400336BDE /* oop.cpp in Sources */,\n\t\t\t\t0A27855C128DBF7400336BDE /* abstract_os_interface.cpp in Sources */,\n\t\t\t\t0A27855D128DBF7400336BDE /* dummy_cpu_coordinate.cpp in Sources */,\n\t\t\t\t0A278561128DBF7400336BDE /* osx_os_interface.cpp in Sources */,\n\t\t\t\t0A278562128DBF7400336BDE /* posix_os_interface.cpp in Sources */,\n\t\t\t\t0A278564128DBF7400336BDE /* shared_memory_message_queue.cpp in Sources */,\n\t\t\t\t0A278565128DBF7400336BDE /* thread_memory_semantics.cpp in Sources */,\n\t\t\t\t0A278567128DBF7400336BDE /* RVMPlugin.cpp in Sources */,\n\t\t\t\t0A278568128DBF7400336BDE /* abstract_mutex.cpp in Sources */,\n\t\t\t\t0A278569128DBF7400336BDE /* abstract_tracer.cpp in Sources */,\n\t\t\t\t0A27856A128DBF7400336BDE /* bytemap.cpp in Sources */,\n\t\t\t\t0A27856B128DBF7400336BDE /* core_tracer.cpp in Sources */,\n\t\t\t\t0A27856C128DBF7400336BDE /* gc_debugging_tracer.cpp in Sources */,\n\t\t\t\t0A27856D128DBF7400336BDE /* error_handling.cpp in Sources */,\n\t\t\t\t0A27856E128DBF7400336BDE /* execution_tracer.cpp in Sources */,\n\t\t\t\t0A27856F128DBF7400336BDE /* main.cpp in Sources */,\n\t\t\t\t0A278570128DBF7400336BDE /* measurements.cpp in Sources */,\n\t\t\t\t0A278571128DBF7400336BDE /* my_rank.cpp in Sources */,\n\t\t\t\t0A278572128DBF7400336BDE /* oop_tracer.cpp in Sources */,\n\t\t\t\t0A278573128DBF7400336BDE /* printer.cpp in Sources */,\n\t\t\t\t0A278574128DBF7400336BDE /* profiling_tracer.cpp in Sources */,\n\t\t\t\t0A278575128DBF7400336BDE /* rank_set.cpp in Sources */,\n\t\t\t\t0A278576128DBF7400336BDE /* rvm_bitmap.cpp in Sources */,\n\t\t\t\t0A278577128DBF7400336BDE /* rvm_config.cpp in Sources */,\n\t\t\t\t0A278578128DBF7400336BDE /* safepoint.cpp in Sources */,\n\t\t\t\t0A278579128DBF7400336BDE /* safepoint_ability.cpp in Sources */,\n\t\t\t\t0A27857A128DBF7400336BDE /* safepoint_request_queue.cpp in Sources */,\n\t\t\t\t0A27857B128DBF7400336BDE /* scheduler_mutex.cpp in Sources */,\n\t\t\t\t0A27857C128DBF7400336BDE /* semaphore_mutex.cpp in Sources */,\n\t\t\t\t0A27857D128DBF7400336BDE /* squeak_adapters.cpp in Sources */,\n\t\t\t\t0A27857E128DBF7400336BDE /* timeout_deferral.cpp in Sources */,\n\t\t\t\t0A27857F128DBF7400336BDE /* timeout_timer.cpp in Sources */,\n\t\t\t\t0A278580128DBF7400336BDE /* utils.cpp in Sources */,\n\t\t\t\t0A2785A6128DC2B700336BDE /* logical_core.cpp in Sources */,\n\t\t\t\t0AEC1186128DF0A000EFF6D1 /* debug_helper.cpp in Sources */,\n\t\t\t\t0ACF551912E07E7F0010386A /* shared_memory_message_queue_per_sender.cpp in Sources */,\n\t\t\t\t0A4D824B135C51D500CD74D8 /* sqNamedPrims.c in Sources */,\n\t\t\t\t0A4D824D135C51D500CD74D8 /* sqVirtualMachine.c in Sources */,\n\t\t\t\t0A4D8253135C523B00CD74D8 /* sqUnixCharConv.c in Sources */,\n\t\t\t\t0A4D8255135C523B00CD74D8 /* sqUnixExternalPrims.c in Sources */,\n\t\t\t\t0A4D8257135C523B00CD74D8 /* sqUnixMain.c in Sources */,\n\t\t\t\t0A4D825A135C526100CD74D8 /* sqUnixX11.c in Sources */,\n\t\t\t\t0A4D825D135C526F00CD74D8 /* sqUnixSoundMacOSX.c in Sources */,\n\t\t\t\t0A5D7C99135CC84700D13E53 /* sqUnixSound.c in Sources */,\n\t\t\t\t0A5D7C9C135CC86800D13E53 /* sqUnixSocket.c in Sources */,\n\t\t\t\t0A87AD8A1379573F00337878 /* performance_counters.cpp in Sources */,\n\t\t\t\t0A72A76514432D7C0008E8AC /* tmc_os_interface.cpp in Sources */,\n\t\t\t\t0AE6D0E61531C596001A1018 /* buffered_channel.cpp in Sources */,\n\t\t\t\t0AE6D0E71531C596001A1018 /* synced_queue.cpp in Sources */,\n\t\t\t\t0AEDCC6315E3CB2B0022DD44 /* sqUnixFile.c in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t0A97FB23128FE95A003A1C74 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t0A97FB35128FEA77003A1C74 /* buffered_channel.cpp in Sources */,\n\t\t\t\t0A97FB36128FEA77003A1C74 /* main.cpp in Sources */,\n\t\t\t\t0A97FB37128FEA77003A1C74 /* starter.cpp in Sources */,\n\t\t\t\t0A97FB39128FEA77003A1C74 /* synced_queue.cpp in Sources */,\n\t\t\t\t0A97FB3A128FEA77003A1C74 /* synced_queue_threaded.cpp in Sources */,\n\t\t\t\t0A97FBB512900371003A1C74 /* tracked_ptr.cpp in Sources */,\n\t\t\t\t0ADA26E612EF642C009404B0 /* cacheline_alignment.cpp in Sources */,\n\t\t\t\t0A6A4834135ADF0A00933643 /* os_interface.cpp in Sources */,\n\t\t\t\t0A6A4837135AE32D00933643 /* external_primitive_table.cpp in Sources */,\n\t\t\t\t0A4D824C135C51D500CD74D8 /* sqNamedPrims.c in Sources */,\n\t\t\t\t0A4D824E135C51D500CD74D8 /* sqVirtualMachine.c in Sources */,\n\t\t\t\t0A4D8254135C523B00CD74D8 /* sqUnixCharConv.c in Sources */,\n\t\t\t\t0A4D8256135C523B00CD74D8 /* sqUnixExternalPrims.c in Sources */,\n\t\t\t\t0A4D8258135C523B00CD74D8 /* sqUnixMain.c in Sources */,\n\t\t\t\t0A4D825B135C526100CD74D8 /* sqUnixX11.c in Sources */,\n\t\t\t\t34221D6D13D4D3C50057DCBD /* externals.cpp in Sources */,\n\t\t\t\t34221D6F13D4D3F50057DCBD /* abstract_object_heap.cpp in Sources */,\n\t\t\t\t34221D7013D4D3F50057DCBD /* memory_system.cpp in Sources */,\n\t\t\t\t34221D7113D4D3F50057DCBD /* multicore_object_heap.cpp in Sources */,\n\t\t\t\t34221D7213D4D3F50057DCBD /* multicore_object_table.cpp in Sources */,\n\t\t\t\t34221D7413D4D3F50057DCBD /* squeak_image_reader.cpp in Sources */,\n\t\t\t\t34221D7513D4D3F50057DCBD /* at_cache.cpp in Sources */,\n\t\t\t\t34221D7613D4D3F50057DCBD /* interpreter_bytecodes.cpp in Sources */,\n\t\t\t\t34221D7713D4D3F50057DCBD /* interpreter_primitives.cpp in Sources */,\n\t\t\t\t34221D7813D4D3F50057DCBD /* method_cache.cpp in Sources */,\n\t\t\t\t34221D7913D4D3F50057DCBD /* obsolete_indexed_primitive_table.cpp in Sources */,\n\t\t\t\t34221D7A13D4D3F50057DCBD /* obsolete_named_primitive_table.cpp in Sources */,\n\t\t\t\t34221D7B13D4D3F50057DCBD /* primitive_table.cpp in Sources */,\n\t\t\t\t34221D7C13D4D3F50057DCBD /* squeak_interpreter.cpp in Sources */,\n\t\t\t\t34221D7D13D4D3F50057DCBD /* abstract_message.cpp in Sources */,\n\t\t\t\t34221D7E13D4D3F50057DCBD /* deferred_request.cpp in Sources */,\n\t\t\t\t34221D7F13D4D3F50057DCBD /* interactions.cpp in Sources */,\n\t\t\t\t34221D8013D4D3F50057DCBD /* interpreter_subset_for_control_transfer.cpp in Sources */,\n\t\t\t\t34221D8113D4D3F50057DCBD /* message_classes.cpp in Sources */,\n\t\t\t\t34221D8213D4D3F50057DCBD /* message_or_ack_request.cpp in Sources */,\n\t\t\t\t34221D8313D4D3F50057DCBD /* message_statics.cpp in Sources */,\n\t\t\t\t34221D8413D4D3F50057DCBD /* message_stats.cpp in Sources */,\n\t\t\t\t34221D8513D4D3F50057DCBD /* receive_marker.cpp in Sources */,\n\t\t\t\t34221D6E13D4D3D10057DCBD /* abstract_mark_sweep_collector.cpp in Sources */,\n\t\t\t\t34221DC213D4D98B0057DCBD /* aio.c in Sources */,\n\t\t\t\t34221DC313D4D9B70057DCBD /* sqUnixSound.c in Sources */,\n\t\t\t\t34221DC413D4D9D00057DCBD /* sqUnixSocket.c in Sources */,\n\t\t\t\t34221DC513D4D9DC0057DCBD /* SocketPlugin.c in Sources */,\n\t\t\t\t34221DC613D4D9F10057DCBD /* sqUnixSoundNull.c in Sources */,\n\t\t\t\t0A3FB13614D99C7E0050F39C /* gtest-all.cc in Sources */,\n\t\t\t\t0AE6D0E91531C63D001A1018 /* buffered_channel.cpp in Sources */,\n\t\t\t\t0AE6D0EA1531C645001A1018 /* synced_queue.cpp in Sources */,\n\t\t\t\t0AE6D0EB1531C740001A1018 /* squeak_adapters.cpp in Sources */,\n\t\t\t\t0AE6D0EC1531C776001A1018 /* utils.cpp in Sources */,\n\t\t\t\t0AE6D0ED1531C78B001A1018 /* oop.cpp in Sources */,\n\t\t\t\t0AE6D0EE1531C7DE001A1018 /* header_type.cpp in Sources */,\n\t\t\t\t0AE6D0EF1531C7E3001A1018 /* object.cpp in Sources */,\n\t\t\t\t0AE6D0F01531C7E7001A1018 /* process_field_locator.cpp in Sources */,\n\t\t\t\t0AE6D0F11531C7EB001A1018 /* roots.cpp in Sources */,\n\t\t\t\t0AE6D0F21531C7FC001A1018 /* abstract_os_interface.cpp in Sources */,\n\t\t\t\t0AE6D0F31531C800001A1018 /* dummy_cpu_coordinate.cpp in Sources */,\n\t\t\t\t0AE6D0F41531C80C001A1018 /* logical_core.cpp in Sources */,\n\t\t\t\t0AE6D0F61531C824001A1018 /* shared_memory_message_queue.cpp in Sources */,\n\t\t\t\t0AE6D0F71531C827001A1018 /* shared_memory_message_queue_per_sender.cpp in Sources */,\n\t\t\t\t0AE6D0F81531C82A001A1018 /* thread_memory_semantics.cpp in Sources */,\n\t\t\t\t0AE6D0F91531C832001A1018 /* RVMPlugin.cpp in Sources */,\n\t\t\t\t0AE6D0FA1531C838001A1018 /* abstract_mutex.cpp in Sources */,\n\t\t\t\t0AE6D0FB1531C83B001A1018 /* abstract_tracer.cpp in Sources */,\n\t\t\t\t0AE6D0FC1531C83E001A1018 /* bytemap.cpp in Sources */,\n\t\t\t\t0AE6D0FD1531C842001A1018 /* core_tracer.cpp in Sources */,\n\t\t\t\t0AE6D0FE1531C846001A1018 /* gc_debugging_tracer.cpp in Sources */,\n\t\t\t\t0AE6D0FF1531C849001A1018 /* error_handling.cpp in Sources */,\n\t\t\t\t0AE6D1001531C84C001A1018 /* execution_tracer.cpp in Sources */,\n\t\t\t\t0AE6D1011531C853001A1018 /* measurements.cpp in Sources */,\n\t\t\t\t0AE6D1021531C856001A1018 /* my_rank.cpp in Sources */,\n\t\t\t\t0AE6D1031531C859001A1018 /* oop_tracer.cpp in Sources */,\n\t\t\t\t0AE6D1041531C85D001A1018 /* printer.cpp in Sources */,\n\t\t\t\t0AE6D1051531C860001A1018 /* profiling_tracer.cpp in Sources */,\n\t\t\t\t0AE6D1061531C864001A1018 /* rank_set.cpp in Sources */,\n\t\t\t\t0AE6D1071531C868001A1018 /* rvm_bitmap.cpp in Sources */,\n\t\t\t\t0AE6D1081531C884001A1018 /* rvm_config.cpp in Sources */,\n\t\t\t\t0AE6D1091531C887001A1018 /* safepoint.cpp in Sources */,\n\t\t\t\t0AE6D10A1531C88A001A1018 /* safepoint_ability.cpp in Sources */,\n\t\t\t\t0AE6D10B1531C88E001A1018 /* safepoint_request_queue.cpp in Sources */,\n\t\t\t\t0AE6D10C1531C891001A1018 /* semaphore_mutex.cpp in Sources */,\n\t\t\t\t0AE6D10D1531C894001A1018 /* scheduler_mutex.cpp in Sources */,\n\t\t\t\t0AE6D10E1531C899001A1018 /* timeout_deferral.cpp in Sources */,\n\t\t\t\t0AE6D10F1531C89C001A1018 /* timeout_timer.cpp in Sources */,\n\t\t\t\t0AE6D1101531C8A1001A1018 /* debug_helper.cpp in Sources */,\n\t\t\t\t0AE6D1111531C8A5001A1018 /* performance_counters.cpp in Sources */,\n\t\t\t\t0AE6D1121531C8C4001A1018 /* FilePlugin.c in Sources */,\n\t\t\t\t0AE6D1131531C90F001A1018 /* tmc_os_interface.cpp in Sources */,\n\t\t\t\t0AE6D1141531C927001A1018 /* sqFilePluginBasicPrims.c in Sources */,\n\t\t\t\t0AE6D1161531C931001A1018 /* B2DPlugin.c in Sources */,\n\t\t\t\t0AE6D1171531C935001A1018 /* BitBltPlugin.c in Sources */,\n\t\t\t\t0AE6D1181531C938001A1018 /* FloatArrayPlugin.c in Sources */,\n\t\t\t\t0AE6D1191531C93C001A1018 /* LargeIntegers.c in Sources */,\n\t\t\t\t0AE6D11A1531C941001A1018 /* Matrix2x3Plugin.c in Sources */,\n\t\t\t\t0AE6D11B1531C944001A1018 /* MiscPrimitivePlugin.c in Sources */,\n\t\t\t\t0AE6D11C1531C949001A1018 /* SoundPlugin.c in Sources */,\n\t\t\t\t0AE6D11D1531C95E001A1018 /* sqUnixCustomSound.c in Sources */,\n\t\t\t\t0AE6D11E1531C962001A1018 /* sqUnixSoundMacOSX.c in Sources */,\n\t\t\t\t0AE6D11F1531C980001A1018 /* osx_os_interface.cpp in Sources */,\n\t\t\t\t0AE6D1201531C98F001A1018 /* posix_os_interface.cpp in Sources */,\n\t\t\t\t0AEDCC6415E3CB2B0022DD44 /* sqUnixFile.c in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin XCBuildConfiguration section */\n\t\t0A278286128DBE2700336BDE /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tVALID_ARCHS = i386;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t0A278287128DBE2700336BDE /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCOPY_PHASE_STRIP = YES;\n\t\t\t\tVALID_ARCHS = i386;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t0A2783EE128DBF1000336BDE /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tARCHS = \"$(ARCHS_STANDARD_32_BIT)\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tGCC_DEBUGGING_SYMBOLS = full;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_ENABLE_CPP_EXCEPTIONS = NO;\n\t\t\t\tGCC_ENABLE_CPP_RTTI = NO;\n\t\t\t\tGCC_ENABLE_OBJC_EXCEPTIONS = NO;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PRECOMPILE_PREFIX_HEADER = YES;\n\t\t\t\tGCC_PREFIX_HEADER = src/runtime/rvm_config.h;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"Use_PerSender_Message_Queue=1\",\n\t\t\t\t\t\"Print_Scheduler=0\",\n\t\t\t\t\t\"Extra_Preheader_Word_Experiment=1\",\n\t\t\t\t\t\"check_assertions=1\",\n\t\t\t\t\t\"check_many_assertions=0\",\n\t\t\t\t\t\"Include_Debugging_Code=1\",\n\t\t\t\t\t\"Trace_For_Debugging=0\",\n\t\t\t\t\t\"Trace_Execution=0\",\n\t\t\t\t\t\"Track_OnStackPointer=0\",\n\t\t\t\t\t\"Collect_Performance_Counters=0\",\n\t\t\t\t\tLSB_FIRST,\n\t\t\t\t\tROAR_VM,\n\t\t\t\t);\n\t\t\t\tHEADER_SEARCH_PATHS = (\n\t\t\t\t\tsrc/runtime,\n\t\t\t\t\tsrc/from_squeak/iOS/vm/src/vm,\n\t\t\t\t\tsrc/from_squeak/iOS/vm/iPhone,\n\t\t\t\t\tsrc/from_squeak/unix/vm,\n\t\t\t\t\t/opt/X11/include,\n\t\t\t\t);\n\t\t\t\tINSTALL_PATH = /usr/local/bin;\n\t\t\t\tLD_NO_PIE = YES;\n\t\t\t\tLIBRARY_SEARCH_PATHS = /usr/X11/lib;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tOTHER_CFLAGS = \"\";\n\t\t\t\tOTHER_LDFLAGS = (\n\t\t\t\t\t\"-lX11\",\n\t\t\t\t\t\"-lXext\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_NAME = RoarVM;\n\t\t\t\tSDKROOT = macosx;\n\t\t\t\tUSER_HEADER_SEARCH_PATHS = \"\";\n\t\t\t\tVALID_ARCHS = i386;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t0A2783EF128DBF1000336BDE /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tARCHS = \"$(ARCHS_STANDARD_32_BIT)\";\n\t\t\t\tCOPY_PHASE_STRIP = YES;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tGCC_DEBUGGING_SYMBOLS = full;\n\t\t\t\tGCC_ENABLE_CPP_EXCEPTIONS = NO;\n\t\t\t\tGCC_ENABLE_CPP_RTTI = NO;\n\t\t\t\tGCC_ENABLE_OBJC_EXCEPTIONS = NO;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 3;\n\t\t\t\tGCC_PRECOMPILE_PREFIX_HEADER = YES;\n\t\t\t\tGCC_PREFIX_HEADER = src/runtime/rvm_config.h;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"Print_Scheduler=0\",\n\t\t\t\t\t\"Extra_Preheader_Word_Experiment=1\",\n\t\t\t\t\t\"check_assertions=0\",\n\t\t\t\t\t\"check_many_assertions=0\",\n\t\t\t\t\t\"Include_Debugging_Code=0\",\n\t\t\t\t\t\"Trace_For_Debugging=0\",\n\t\t\t\t\t\"Trace_Execution=0\",\n\t\t\t\t\tLSB_FIRST,\n\t\t\t\t\tROAR_VM,\n\t\t\t\t);\n\t\t\t\tHEADER_SEARCH_PATHS = (\n\t\t\t\t\tsrc/runtime,\n\t\t\t\t\tsrc/from_squeak/iOS/vm/src/vm,\n\t\t\t\t\tsrc/from_squeak/iOS/vm/iPhone,\n\t\t\t\t\tsrc/from_squeak/unix/vm,\n\t\t\t\t\t/opt/X11/include,\n\t\t\t\t);\n\t\t\t\tINSTALL_PATH = /usr/local/bin;\n\t\t\t\tLD_NO_PIE = YES;\n\t\t\t\tLIBRARY_SEARCH_PATHS = /usr/X11/lib;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tOTHER_CFLAGS = \"\";\n\t\t\t\tOTHER_LDFLAGS = (\n\t\t\t\t\t\"-lX11\",\n\t\t\t\t\t\"-lXext\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_NAME = RoarVM;\n\t\t\t\tSDKROOT = macosx;\n\t\t\t\tUSER_HEADER_SEARCH_PATHS = \"\";\n\t\t\t\tVALID_ARCHS = i386;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t0A97FB28128FE95A003A1C74 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tARCHS = \"$(ARCHS_STANDARD_32_BIT)\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = \"$(inherited)\";\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_MODEL_TUNING = G5;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREFIX_HEADER = src/runtime/rvm_config.h;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\tROAR_VM,\n\t\t\t\t\tLSB_FIRST,\n\t\t\t\t);\n\t\t\t\tHEADER_SEARCH_PATHS = (\n\t\t\t\t\tsrc/from_squeak/iOS/vm/iPhone,\n\t\t\t\t\tsrc/from_squeak/unix/vm,\n\t\t\t\t\tgoogletest/include,\n\t\t\t\t\tgoogletest,\n\t\t\t\t);\n\t\t\t\tINSTALL_PATH = /usr/local/bin;\n\t\t\t\tLIBRARY_SEARCH_PATHS = /usr/X11/lib;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tOTHER_LDFLAGS = (\n\t\t\t\t\t\"-lXext\",\n\t\t\t\t\t\"-lX11\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_NAME = UnitTests;\n\t\t\t\tVALID_ARCHS = i386;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t0A97FB29128FE95A003A1C74 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tARCHS = \"$(ARCHS_STANDARD_32_BIT)\";\n\t\t\t\tCOPY_PHASE_STRIP = YES;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = \"$(inherited)\";\n\t\t\t\tGCC_MODEL_TUNING = G5;\n\t\t\t\tGCC_PREFIX_HEADER = src/runtime/rvm_config.h;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\tROAR_VM,\n\t\t\t\t\tLSB_FIRST,\n\t\t\t\t);\n\t\t\t\tHEADER_SEARCH_PATHS = (\n\t\t\t\t\tsrc/from_squeak/iOS/vm/iPhone,\n\t\t\t\t\tsrc/from_squeak/unix/vm,\n\t\t\t\t\tgoogletest/include,\n\t\t\t\t\tgoogletest,\n\t\t\t\t);\n\t\t\t\tINSTALL_PATH = /usr/local/bin;\n\t\t\t\tLIBRARY_SEARCH_PATHS = /usr/X11/lib;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tOTHER_LDFLAGS = (\n\t\t\t\t\t\"-lXext\",\n\t\t\t\t\t\"-lX11\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_NAME = UnitTests;\n\t\t\t\tVALID_ARCHS = i386;\n\t\t\t\tZERO_LINK = NO;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t0AC76D9312EC5FCD00C86B11 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCOMBINE_HIDPI_IMAGES = YES;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tPRODUCT_NAME = make;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t0AC76D9412EC5FCD00C86B11 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCOMBINE_HIDPI_IMAGES = YES;\n\t\t\t\tCOPY_PHASE_STRIP = YES;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tPRODUCT_NAME = make;\n\t\t\t\tZERO_LINK = NO;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t0A278288128DBE2700336BDE /* Build configuration list for PBXProject \"RoarVM\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t0A278286128DBE2700336BDE /* Debug */,\n\t\t\t\t0A278287128DBE2700336BDE /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t0A2783F0128DBF1000336BDE /* Build configuration list for PBXNativeTarget \"RoarVM\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t0A2783EE128DBF1000336BDE /* Debug */,\n\t\t\t\t0A2783EF128DBF1000336BDE /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t0A97FB2B128FE975003A1C74 /* Build configuration list for PBXNativeTarget \"UnitTests\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t0A97FB28128FE95A003A1C74 /* Debug */,\n\t\t\t\t0A97FB29128FE95A003A1C74 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t0AC76D9812EC5FF200C86B11 /* Build configuration list for PBXLegacyTarget \"make\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t0AC76D9312EC5FCD00C86B11 /* Debug */,\n\t\t\t\t0AC76D9412EC5FCD00C86B11 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 0A278285128DBE2700336BDE /* Project object */;\n}\n"
  },
  {
    "path": "vm/run/reliability-test",
    "content": "#!/bin/bash\n\necho_usage () {\n    echo \"Usage: $0 <n> <cmd> [args]\"\n    echo\n    echo \"Runs a command max. n-times and reports whether it failed in the process.\"\n    echo\n    # return an error code to signal non-success\n    exit 128\n}\n\nif [[ $# -lt 2 ]]\nthen\n\techo_usage\nfi\n\n# read the required standard arguments\nn=$1\ncmd=$2\nshift 2\n\n# build the command, there might be a better way...\nwhile [[ $# -gt 0 ]]\ndo\n\tcmd=\"$cmd $1\"\n\tshift 1\ndone\n\n# do the execution\ni=1\nwhile [[ $n -gt 0 ]]\ndo\n\techo \"$cmd\"\n\t$cmd\n\tif [[ $? -ne 0 ]]\n\tthen\n\t\techo \"Reliability test failed after run $i ($cmd)\"\n\t\texit 1\n\tfi\n\t: $(( n-- ))\n\t: $(( i++ ))\ndone\n\necho \"Reliability test successful ($cmd)\""
  },
  {
    "path": "vm/run/tile-runner",
    "content": "#!/bin/sh\nBASE_PATH=`pwd`\ntile-monitor --pci --rtc --bootrom-file /users/smarr/Projects/Tilera-custom-bootrom/vmlinux-pci-RVM.bootrom \\\n\t--huge-pages 80 --export /users/smarr/ --cd $BASE_PATH \\\n\t--env DISPLAY=134.184.43.183:0 --env SQUEAK_NOTIMER=1 --run \\\n\t--- \\\n\t\\\n\t\"$@\" \\\n\t--- \\\n\t--quit\n"
  },
  {
    "path": "vm/run/tile-rvm",
    "content": "#!/bin/sh\nBASE_PATH=`pwd`\nBUILD_PATH=$BASE_PATH/../build\ntile-monitor --pci --rtc --bootrom-file /users/smarr/Projects/Tilera-custom-bootrom/vmlinux-pci-RVM.bootrom \\\n        --debug-on-crash \\\n\t--huge-pages 80 --export /users/smarr/ --cd $BASE_PATH \\\n\t--env DISPLAY=134.184.43.183:0 --env SQUEAK_NOTIMER=1 --run \\\n\t--- \\\n\t$BUILD_PATH/rvm \\\n\t\"$@\" \\\n\t--- \\\n\t--quit\n"
  },
  {
    "path": "vm/run/tile-rvm-db",
    "content": "#!/bin/sh\nBASE_PATH=`pwd`\nBUILD_PATH=$BASE_PATH/../build\ntile-monitor --pci --rtc --bootrom-file /users/smarr/Projects/Tilera-custom-bootrom/vmlinux-pci-RVM.bootrom \\\n\t--huge-pages 80 --export /users/smarr/ --cd $BASE_PATH \\\n\t--env DISPLAY=134.184.43.183:0 --env SQUEAK_NOTIMER=1 --debug \\\n\t--- \\\n\t$BUILD_PATH/rvm \\\n\t\"$@\" \\\n\t---\n"
  },
  {
    "path": "vm/src/externals/externals.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\n\nchar* ioListExternalModule(int) {  unimpExt(); return NULL; }\n\nint setCompilerInitialized(int /* flagValue */) { unimpExt(); return 0; }\n\nint (*compilerHooks[])() = {NULL};\n\n\n\n# if On_iOS\n\n  void setFullScreenFlag(int32 value) {\n    The_Memory_System()->snapshot_window_size.fullScreenFlag(value);\n  }\n\n  int32 getFullScreenFlag(void) {\n    return The_Memory_System()->snapshot_window_size.fullScreenFlag();\n  }\n\n\n  int32 ioMousePoint() {/*unimpExt();*/ return -1;}\n  int ioGetButtonState() {/*unimpExt();*/ return -1; }\n  int ioGetKeystroke() {/*unimpExt();*/ return -1; }\n  void    ioSetCursor(char*, int, int) {unimpExt();}\n  int     ioSetCursorWithMask(char*, char*, int, int) {unimpExt(); return 0; }\n  bool    ioFormPrint(int32* bitsAddr, int w, int h, int depth, double hScale, double vScale, bool landscapeFlag) {unimpExt(); return 0; }\n  int ioSetDisplayMode(int, int, int, int) {unimpExt();  return true;}\n\n\n# endif\n\n// # include \"sq.h\"\nint event_type_complex() { return 6 /*UGH*/ /*EventTypeComplex*/; }\n\n\n# if 0\n\nfn_t ioLoadFunctionFrom(const char*, const char*) {unimpExt(); return dummy_fn; }\n\n\nfn_t ioLoadExternalFunctionOfLengthFromModuleOfLength(char*, int, char*, int) {\n  unimpExt();\n  assert_on_main();\n  return NULL;\n}\n\n\nchar* ioListBuiltinModule(int) {  unimpExt(); return NULL; }\n\nvoid* dummy_fn(...) {unimplemented(); return 0;}\n\n\n\nint ioGetNextEvent(void*) { unimpExt(); }\n\n# if !On_iOS\n  int ioGetButtonState() {unimpExt(); return 0; }\n  int32 ioMousePoint() {unimpExt(); return 0;}\n  int ioSetDisplayMode(int, int, int, int) {unimpExt();  return true;}\n# endif\n\n\n\n\nbool ioHasDisplayDepth(int depth) {unimpExt(); return true;}\n\n# endif\n\n\n\nvoid sigint() {The_Squeak_Interpreter()->handle_sigint();}\n\n"
  },
  {
    "path": "vm/src/externals/externals.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nextern \"C\" {\n  int32 vmPathSize();\n  void  vmPathGetLength(char*, int);\n  void  sqGetFilenameFromString(char*, char*, int, int);\n\n  void rvm_callInitializersInAllModules();\n}\n\n\nextern \"C\" {\n# if On_iOS\n  void setFullScreenFlag(int32 value);\n  int32 getFullScreenFlag(void);\n# endif\n\n  int sqr_main(int, char**, char**);\n\n\n  void* dummy_fn(...);\n\n\n  void    ioBeep();\n  int     ioExit();\n  void    ioForceDisplayUpdate();\n  bool    ioFormPrint(int32* bitsAddr, int w, int h, int depth, double hScale, double vScale, bool landscapeFlag);\n  int     ioGetButtonState();\n  int     ioGetNextEvent(void*);\n  bool    ioHasDisplayDepth(int depth);\n  char*   ioListBuiltinModule(int);\n  char*   ioListExternalModule(int);\n  fn_t    ioLoadExternalFunctionOfLengthFromModuleOfLength(char*, int, char*, int);\n  fn_t    ioLoadFunctionFrom(const char*, const char*);\n  int32   ioMousePoint();\n  int     ioMSecs();\n  void    ioProcessEvents();\n  void    ioRelinquishProcessorForMicroseconds(int);\n  u_int32 ioScreenSize();\n  void    ioSetCursor(char*, int, int);\n# if On_iOS\n# define T int\n# else\n# define T void\n# endif\n  T    ioSetCursorWithMask(char*, char*, int, int);\n# undef T\n  void    ioSetInputSemaphore(int);\n  int32   ioSeconds();\n# if On_iOS\n# define T int\n# else\n# define T bool\n# endif\n  T    ioSetDisplayMode(int, int, int, int);\n# undef T\n  void    ioSetFullScreen(bool);\n  void    ioShowDisplay(char*, int, int, int,   int, int, int, int);\n\n  int     ioGetKeystroke();\n  int     ioPeekKeystroke();\n\n\n\n  void clipboardWriteFromAt(int, char*, int);\n  int  clipboardSize();\n  void clipboardReadIntoAt(int, int, char*);\n\n\n  void getAttributeIntoLength(int id, char* p, int len);\n  int attributeSize(int id);\n\n\n\n  int setCompilerInitialized(int flagValue);\n\n  void sigint();\n  \n# if On_iOS\n  /* Will be used from Obj-C code to initalize the VM */\n  void initialize_basic_subsystems();\n  void set_num_cores(char* num_cores_str);\n  void initialize_interpreter_instances_selftest_and_interpreter_proxy(char** orig_argv);\n  void read_image(char* image_path);\n  void begin_interpretation();\n# endif\n\n}\n\nextern   int (*compilerHooks[])();\n\n\n\nint event_type_complex();\n\n\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/AsynchFilePlugin/AsynchFilePlugin.h",
    "content": "/* Header file for AsynchFile plugin */\n/* module initialization/shutdown */\nint asyncFileInit(void);\nint asyncFileShutdown(void);\n\n/*** Experimental Asynchronous File I/O ***/\ntypedef struct {\n\tint\t\t\tsessionID;\n\tvoid\t\t*state;\n} AsyncFile;\n\nint asyncFileClose(AsyncFile *f);\nint asyncFileOpen(AsyncFile *f, int fileNamePtr, int fileNameSize, int writeFlag, int semaIndex);\nint asyncFileRecordSize();\nint asyncFileReadResult(AsyncFile *f, int bufferPtr, int bufferSize);\nint asyncFileReadStart(AsyncFile *f, int fPosition, int count);\nint asyncFileWriteResult(AsyncFile *f);\nint asyncFileWriteStart(AsyncFile *f, int fPosition, int bufferPtr, int bufferSize);\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/B3DAcceleratorPlugin/B3DAcceleratorPlugin.h",
    "content": "/* Header file for 3D accelerator plugin */\n#ifdef WIN32\n# include <windows.h>\n#endif\n#if defined(BUILD_FOR_OSX)\n#include <OpenGL/gl.h>\n#else\n#include <GL/gl.h>\n#endif\n\n/* Vertex buffer flags */\n#define B3D_VB_TRACK_AMBIENT 1\n#define B3D_VB_TRACK_DIFFUSE 2\n#define B3D_VB_TRACK_SPECULAR 4\n#define B3D_VB_TRACK_EMISSION 8\n\n#define B3D_VB_HAS_NORMALS 16\n#define B3D_VB_HAS_TEXTURES 32\n\n#define B3D_VB_TWO_SIDED 64\n#define B3D_VB_LOCAL_VIEWER 128\n\ntypedef struct B3DPrimitiveVertex {\n\tfloat position[3];\n\tfloat normal[3];\n\tfloat texCoord[2];\n\tfloat rasterPos[4];\n\tint pixelValue32;\n\tint clipFlags;\n\tint windowPos[2];\n} B3DPrimitiveVertex;\n\ntypedef struct B3DPrimitiveMaterial {\n\tfloat ambient[4];\n\tfloat diffuse[4];\n\tfloat specular[4];\n\tfloat emission[4];\n\tfloat shininess;\n} B3DPrimitiveMaterial;\n\n/* Light type flags */\n#define B3D_LIGHT_POSITIONAL 0x0001\n#define B3D_LIGHT_DIRECTIONAL 0x0002\n#define B3D_LIGHT_ATTENUATED 0x0004\n#define B3D_LIGHT_HAS_SPOT 0x0008\n\n/* Light color flags */\n#define B3D_LIGHT_AMBIENT 0x0100\n#define B3D_LIGHT_DIFFUSE 0x0200\n#define B3D_LIGHT_SPECULAR 0x0400\n\ntypedef struct B3DPrimitiveLight {\n\tfloat ambient[4];\n\tfloat diffuse[4];\n\tfloat specular[4];\n\n\tfloat position[3];\n\tfloat direction[3];\n\tfloat attenuation[3];\n\tint flags;\n\n\tfloat spotMinCos;\n\tfloat spotMaxCos;\n\tfloat spotDeltaCos;\n\tfloat spotExponent;\n} B3DPrimitiveLight;\n\n/* Renderer creation flags:\n   B3D_SOFTWARE_RENDERER: Enable use of software renderers\n   B3D_HARDWARE_RENDERER: Enable use of hardware renderers\n   B3D_STENCIL_BUFFER:    Request stencil buffer\n   B3D_ANTIALIASING:      Request antialiasing in the renderer.\n   B3D_STEREO:            Request stereo visual from the renderer\n   B3D_SYNCVBL:           Request VBL sync\n   More flags may be added - if they are not supported by the platform\n   code the creation primitive should fail.\n*/\n#define B3D_SOFTWARE_RENDERER 0x0001\n#define B3D_HARDWARE_RENDERER 0x0002\n#define B3D_STENCIL_BUFFER    0x0004\n#define B3D_ANTIALIASING      0x0008\n#define B3D_STEREO            0x0010\n#define B3D_SYNCVBL           0x0020\n\n/* Win32 defaults to DUAL D3D/GL interface everyone else to OpenGL */\n#if defined(WIN32)\n# if defined(WIN32_PURE_D3D)\n#  define B3DX_D3D\n# elif defined(WIN32_PURE_GL)\n#  define B3DX_GL\n# else\n#  define B3DX_DUAL\n# endif\n#else\n# define B3DX_GL\n#endif\n\n/* b3dxCreateRenderer is now obsolete but older plugin sources may still use it */\n#define b3dxCreateRenderer(sw,hw,x,y,w,h) b3dxCreateRendererFlags(x,y,w,h, (sw ? B3D_SOFTWARE_RENDERER : 0) | (hw ? B3D_HARDWARE_RENDERER : 0))\n\n\n#if defined(B3DX_GL)\n#define b3dxInitialize            glInitialize\n#define b3dxShutdown              glShutdown\n\n#define b3dxAllocateTexture       glAllocateTexture\n#define b3dxDestroyTexture        glDestroyTexture\n#define b3dxActualTextureDepth    glActualTextureDepth\n#define b3dxTextureColorMasks     glTextureColorMasks\n#define b3dxUploadTexture         glUploadTexture\n#define b3dxTextureByteSex        glTextureByteSex\n#define b3dxTextureSurfaceHandle glTextureSurfaceHandle\n#define b3dxCompositeTexture      glCompositeTexture\n\n#define b3dxCreateRendererFlags   glCreateRendererFlags\n#define b3dxDestroyRenderer        glDestroyRenderer\n#define b3dxIsOverlayRenderer     glIsOverlayRenderer\n#define b3dxGetRendererSurfaceHandle glGetRendererSurfaceHandle\n#define b3dxGetRendererSurfaceWidth glGetRendererSurfaceWidth\n#define b3dxGetRendererSurfaceHeight glGetRendererSurfaceHeight\n#define b3dxGetRendererSurfaceDepth glGetRendererSurfaceDepth\n#define b3dxGetRendererColorMasks glGetRendererColorMasks\n#define b3dxSetBufferRect           glSetBufferRect\n\n#define b3dxSetViewport          glSetViewport\n#define b3dxClearDepthBuffer     glClearDepthBuffer\n#define b3dxClearViewport        glClearViewport\n#define b3dxRenderVertexBuffer   glRenderVertexBuffer\n#define b3dxSetTransform         glSetTransform\n#define b3dxDisableLights        glDisableLights\n#define b3dxLoadLight            glLoadLight\n#define b3dxLoadMaterial         glLoadMaterial\n#define b3dxFlushRenderer        glFlushRenderer\n#define b3dxFinishRenderer       glFinishRenderer\n#define b3dxSwapRendererBuffers  glSwapRendererBuffers\n#define b3dxGetIntProperty       glGetIntProperty\n#define b3dxSetIntProperty       glSetIntProperty\n#define b3dxGetIntPropertyOS     glGetIntPropertyOS\n#define b3dxSetIntPropertyOS     glSetIntPropertyOS\n#define b3dxSetVerboseLevel      glSetVerboseLevel\n#define b3dxSetFog               glSetFog\n#endif\n\n#if defined(B3DX_D3D)\n#define b3dxInitialize            d3dInitialize\n#define b3dxShutdown              d3dShutdown\n\n#define b3dxAllocateTexture       d3dAllocateTexture\n#define b3dxDestroyTexture        d3dDestroyTexture\n#define b3dxActualTextureDepth    d3dActualTextureDepth\n#define b3dxTextureColorMasks     d3dTextureColorMasks\n#define b3dxUploadTexture         d3dUploadTexture\n#define b3dxTextureByteSex        d3dTextureByteSex\n#define b3dxTextureSurfaceHandle d3dTextureSurfaceHandle\n#define b3dxCompositeTexture      d3dCompositeTexture\n\n#define b3dxCreateRendererFlags    d3dCreateRendererFlags\n#define b3dxDestroyRenderer        d3dDestroyRenderer\n#define b3dxGetRendererSurfaceHandle d3dGetRendererSurfaceHandle\n#define b3dxGetRendererSurfaceWidth d3dGetRendererSurfaceWidth\n#define b3dxGetRendererSurfaceHeight d3dGetRendererSurfaceHeight\n#define b3dxGetRendererSurfaceDepth d3dGetRendererSurfaceDepth\n#define b3dxGetRendererColorMasks d3dGetRendererColorMasks\n#define b3dxIsOverlayRenderer    d3dIsOverlayRenderer\n#define b3dxSetBufferRect           d3dSetBufferRect\n\n#define b3dxSetViewport           d3dSetViewport\n#define b3dxClearDepthBuffer      d3dClearDepthBuffer\n#define b3dxClearViewport          d3dClearViewport\n#define b3dxRenderVertexBuffer   d3dRenderVertexBuffer\n#define b3dxSetTransform          d3dSetTransform\n#define b3dxDisableLights          d3dDisableLights\n#define b3dxLoadLight             d3dLoadLight\n#define b3dxLoadMaterial          d3dLoadMaterial\n#define b3dxFlushRenderer        d3dFlushRenderer\n#define b3dxFinishRenderer       d3dFinishRenderer\n#define b3dxSwapRendererBuffers d3dSwapRendererBuffers\n#define b3dxGetIntProperty       d3dGetIntProperty\n#define b3dxSetIntProperty       d3dSetIntProperty\n#define b3dxSetVerboseLevel     d3dSetVerboseLevel\n#define b3dxSetFog               d3dSetFog\n#endif\n\n/* module initialization support */\nint b3dxInitialize(void); /* return true on success, false on error */\nint b3dxShutdown(void); /* return true on success, false on error */\n\n/* Texture support primitives */\nint b3dxAllocateTexture(int renderer, int w, int h, int d); /* return handle or -1 on error */\nint b3dxDestroyTexture(int renderer, int handle); /* return true on success, false on error */\nint b3dxActualTextureDepth(int renderer, int handle); /* return depth or <0 on error */\nint b3dxTextureColorMasks(int renderer, int handle, int masks[4]);  /* return true on success, false on error */\nint b3dxUploadTexture(int renderer, int handle, int w, int h, int d, void* bits); /* return true on success, false on error */\nint b3dxTextureByteSex(int renderer, int handle); /* return > 0 for MSB, = 0 for LSB, < 0 for error */\nint b3dxTextureSurfaceHandle(int renderer, int handle); /* return handle or <0 if error */\nint b3dxCompositeTexture(int renderer, int handle, int x, int y, int w, int h, int translucent); /* return true on success; else false */\n\n/* Renderer primitives */\nint b3dxCreateRendererFlags(int x, int y, int w, int h, int flags); /* return handle or -1 on error */\nint b3dxDestroyRenderer(int handle); /* return true on success, else false */\nint b3dxIsOverlayRenderer(int handle); /* return true/false */\nint b3dxSetBufferRect(int handle, int x, int y, int w, int h); /* return true on success, false on error */\nint b3dxGetRendererSurfaceHandle(int handle); /* return handle or <0 if error */\nint b3dxGetRendererSurfaceWidth(int handle); /* return width or <0 if error */\nint b3dxGetRendererSurfaceHeight(int handle); /* return height or <0 if error */\nint b3dxGetRendererSurfaceDepth(int handle); /* return depth or <0 if error */\nint b3dxGetRendererColorMasks(int handle, int *masks); /* return true on success, false on error */\n\nint b3dxSetViewport(int handle, int x, int y, int w, int h); /* return true on success, false on error */\nint b3dxClearDepthBuffer(int handle); /* return true on success, false on error */\nint b3dxClearViewport(int handle, unsigned int rgba, unsigned int pv); /* return true on success, else false */\nint b3dxSetTransform(int handle, float *modelView, float *projection);\nint b3dxDisableLights(int handle);\nint b3dxLoadLight(int handle, int index, B3DPrimitiveLight *light);\nint b3dxLoadMaterial(int handle, B3DPrimitiveMaterial *material);\nint b3dxRenderVertexBuffer(int handle, int primType, int flags, int texHandle, float *vtxArray, int vtxSize, int *idxArray, int idxSize); /* return true on success, false on error */\nint b3dxFlushRenderer(int handle);\nint b3dxFinishRenderer(int handle);\nint b3dxSwapRendererBuffers(int handle);\nint b3dxGetIntProperty(int handle, int prop);\nint b3dxSetIntProperty(int handle, int prop, int value);\nint b3dxGetIntPropertyOS(int handle, int prop);\nint b3dxSetIntPropertyOS(int handle, int prop, int value);\nint b3dxSetVerboseLevel(int level);\nint b3dxSetFog(int handle, int fogType, double density, double rangeStart, double rangeEnd, int rgba);\n\n/* Qwaq primitives */\nint b3dDrawArrays(int handle, int mode, int minIdx, int maxIdx);\nint b3dDrawElements(int handle, int mode, int nFaces, unsigned int *facePtr);\nint b3dDrawRangeElements(int handle, int mode, int minIdx, int maxIdx, int nFaces, unsigned int *facePtr);\n\n#if defined(B3DX_DUAL)\nextern int glMode;\n\n#if 0 /* initializer is special since it decides what to use */\n#define b3dxInitialize() \\\n  (glMode ? glInitialize() : d3dInitialize())\n#endif\n\n#define b3dxShutdown() \\\n  (glMode ? glShutdown()   : d3dShutdown())\n#define b3dxAllocateTexture(r,w,h,d) \\\n  (glMode ? glAllocateTexture(r,w,h,d) : d3dAllocateTexture(r,w,h,d))\n#define b3dxDestroyTexture(r,h) \\\n  (glMode ? glDestroyTexture(r,h) : d3dAllocateTexture(r,h))\n#define b3dxActualTextureDepth(r,h) \\\n  (glMode ? glActualTextureDepth(r,h) : d3dActualTextureDepth(r,h))\n#define b3dxTextureColorMasks(r,h,m) \\\n  (glMode ? glTextureColorMasks(r,h,m) : d3dTextureColorMasks(r,h,m))\n#define b3dxUploadTexture(r,hh,w,h,d,b) \\\n  (glMode ? glUploadTexture(r,hh,w,h,d,b) : d3dUploadTexture(r,hh,w,h,d,b))\n#define b3dxTextureByteSex(r,h) \\\n  (glMode ? glTextureByteSex(r,h) : d3dTextureByteSex(r,h))\n#define b3dxTextureSurfaceHandle(r,h) \\\n  (glMode ? glTextureSurfaceHandle(r,h) : d3dTextureSurfaceHandle(r,h))\n#define b3dxCompositeTexture(r,hh,x,y,w,h,t) \\\n  (glMode ? glCompositeTexture(r,hh,x,y,w,h,t) : d3dCompositeTexture(r,hh,x,y,w,h,t))\n#define b3dxCreateRendererFlags(x,y,w,h,f) \\\n  (glMode ? glCreateRendererFlags(x,y,w,h,f) : d3dCreateRendererFlags(x,y,w,h,f))\n#define b3dxDestroyRenderer(h) \\\n  (glMode ? glDestroyRenderer(h) : d3dDestroyRenderer(h))\n#define b3dxIsOverlayRenderer(h) \\\n  (glMode ? glIsOverlayRenderer(h) : d3dIsOverlayRenderer(h))\n#define b3dxSetBufferRect(hh,x,y,w,h) \\\n  (glMode ? glSetBufferRect(hh, x, y, w, h) : d3dSetBufferRect(hh,x,y,w,h))\n#define b3dxGetRendererSurfaceHandle(h) \\\n  (glMode ? glGetRendererSurfaceHandle(h) : d3dGetRendererSurfaceHandle(h))\n#define b3dxGetRendererSurfaceWidth(h) \\\n  (glMode ? glGetRendererSurfaceWidth(h) : d3dGetRendererSurfaceWidth(h))\n#define b3dxGetRendererSurfaceHeight(h) \\\n  (glMode ? glGetRendererSurfaceHeight(h) : d3dGetRendererSurfaceHeight(h))\n#define b3dxGetRendererSurfaceDepth(h) \\\n  (glMode ? glGetRendererSurfaceDepth(h) : d3dGetRendererSurfaceDepth(h))\n#define b3dxGetRendererColorMasks(h,m) \\\n  (glMode ? glGetRendererColorMasks(h,m) : d3dGetRendererColorMasks(h,m))\n\n#define b3dxSetViewport(hh,x,y,w,h) \\\n  (glMode ? glSetViewport(hh,x,y,w,h) : d3dSetViewport(hh,x,y,w,h))\n#define b3dxClearDepthBuffer(h) \\\n  (glMode ? glClearDepthBuffer(h) : d3dClearDepthBuffer(h))\n#define b3dxClearViewport(h,rgba,pv) \\\n  (glMode ? glClearViewport(h,rgba, pv) : d3dClearViewport(h,rgba,pv))\n\n#define b3dxSetTransform(h,mv,p) \\\n  (glMode ? glSetTransform(h,mv,p) : d3dSetTransform(h,mv,p))\n#define b3dxDisableLights(h) \\\n  (glMode ? glDisableLights(h) : d3dDisableLights(h))\n#define b3dxLoadLight(h,i,l) \\\n  (glMode ? glLoadLight(h,i,l) : d3dLoadLight(h,i,l))\n#define b3dxLoadMaterial(h,m) \\\n  (glMode ? glLoadMaterial(h,m) : d3dLoadMaterial(h,m))\n#define b3dxRenderVertexBuffer(h,p,f,t,va,vs,ia,is) \\\n  (glMode ? glRenderVertexBuffer(h,p,f,t,va,vs,ia,is) : d3dRenderVertexBuffer(h,p,f,t,va,vs,ia,is))\n#define b3dxFlushRenderer(h) \\\n  (glMode ? glFlushRenderer(h) : d3dFlushRenderer(h))\n#define b3dxFinishRenderer(h) \\\n  (glMode ? glFinishRenderer(h) : d3dFinishRenderer(h))\n#define b3dxSwapRendererBuffers(h) \\\n  (glMode ? glSwapRendererBuffers(h) : d3dSwapRendererBuffers(h))\n#define b3dxGetIntProperty(h,p) \\\n  (glMode ? glGetIntProperty(h,p) : d3dGetIntProperty(h,p))\n#define b3dxSetIntProperty(h,p,v) \\\n  (glMode ? glSetIntProperty(h,p,v) : d3dSetIntProperty(h,p,v))\n#define b3dxSetVerboseLevel(l) \\\n  (glMode ? glSetVerboseLevel(l) : d3dSetVerboseLevel(l))\n#define b3dxSetFog(h,t,d,s,e,rgba) \\\n  (glMode ? glSetFog(h,t,d,s,e,rgba) : d3dSetFog(h,t,d,s,e,rgba))\n\n#define B3DX_GL\n#define B3DX_D3D\n\n#endif\n\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/B3DAcceleratorPlugin/sqOpenGLRenderer.c",
    "content": "/****************************************************************************\n*   PROJECT: Squeak 3D accelerator\n*   FILE:    sqOpenGLRenderer.c\n*   CONTENT: Generic (cross-platform) bindings for OpenGL\n*\n*   AUTHOR:  Andreas Raab (ar)\n*   ADDRESS: Walt Disney Imagineering, Glendale, CA\n*   EMAIL:   Andreas.Raab@disney.com\n*   RCSID:   $Id: sqOpenGLRenderer.c 909 2004-08-31 21:13:51Z bertf $\n*\n*   NOTES: \n*\n*\n*****************************************************************************/\n#ifdef WIN32\n# include <windows.h>\n# include <winerror.h>\n#endif\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n#include \"sqVirtualMachine.h\"\n#include \"sqConfig.h\"\n#include \"sqPlatformSpecific.h\"\n#include \"B3DAcceleratorPlugin.h\"\n\n#if defined (B3DX_GL)\n\n#include \"sqOpenGLRenderer.h\"\n\n#if !defined(GL_VERSION_1_1)\n#warning \"This system does not support OpenGL 1.1\"\n#endif\n\nstatic float blackLight[4] = { 0.0, 0.0, 0.0, 0.0 };\n\n/*****************************************************************************/\n/*****************************************************************************/\n/*****************************************************************************/\n/*****************************************************************************/\n\nint glGetRendererSurfaceHandle(int handle) {\n  /* If we were to use p-buffers, this would be the place to \n     return a surface handle for the p-buffer so Squeak can\n     blt directly to it. Note that this is a ZILLION times\n     faster when it comes to compositing; so it is definitely\n     a good idea when supported. However, I don't have the\n     time to figure it out so I'll just leave this as an\n     exercise for the interested reader :-)\n   */\n  return -1; /* e.g., fail */\n}\n\nint glGetRendererColorMasks(int handle, int *masks) {\n  /* If a surface is provided, this is the place to fill\n     in the color masks for the surface. Since we don't\n     provide any, we just bail out.\n   */\n  return 0; /* e.g., fail */\n}\n\nint glGetRendererSurfaceWidth(int handle) {\n  /* If a surface is provided return the width of it */\n  return -1; /* e.g., fail */\n}\n\nint glGetRendererSurfaceHeight(int handle) {\n  /* If a surface is provided return the height of it */\n  return -1; /* e.g., fail */\n}\n\nint glGetRendererSurfaceDepth(int handle) {\n  /* If a surface is provided return the depth of it */\n  return -1; /* e.g., fail */\n}\n\n/*****************************************************************************/\n/*****************************************************************************/\n/*****************************************************************************/\n/*****************************************************************************/\n/* texture support */\nint glAllocateTexture(int handle, int w, int h, int d) /* return handle or -1 on error */\n{   GLuint texture;\n\tchar *errMsg = \"\";\n\n\tstruct glRenderer *renderer = glRendererFromHandle(handle);\n\n\tif(!renderer || !glMakeCurrentRenderer(renderer)) {\n\t\tDPRINTF3D(4, (fp, \"ERROR: Invalid renderer specified\\n\"));\n\t\treturn 0;\n\t}\n\n\tif(w & (w-1)) return -1; /* not power of two */\n\tif(h & (h-1)) return -1; /* not power of two */\n\n\tDPRINTF3D(5, (fp, \"### Allocating new texture (w = %d, h = %d, d = %d)\\n\", w, h, d));\n\n\terrMsg = \"glGenTextures() failed\";\n\tglGenTextures(1, &texture);\n\tif((glErr = glGetError()) != GL_NO_ERROR) goto FAILED;\n\tDPRINTF3D(5, (fp, \"Allocated texture id = %d\\n\", texture));\n\terrMsg = \"glBindTexture() failed\";\n\tglBindTexture(GL_TEXTURE_2D, texture);\n\tif((glErr = glGetError()) != GL_NO_ERROR) goto FAILED;\n\terrMsg = \"glTexParameter() failed\";\n\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);\n\tif((glErr = glGetError()) != GL_NO_ERROR) goto FAILED;\n\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);\n\tif((glErr = glGetError()) != GL_NO_ERROR) goto FAILED;\n\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);\n\tif((glErr = glGetError()) != GL_NO_ERROR) goto FAILED;\n\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);\n\tif((glErr = glGetError()) != GL_NO_ERROR) goto FAILED;\n\tglTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);\n\tif((glErr = glGetError()) != GL_NO_ERROR) goto FAILED;\n\terrMsg = \"glTexImage2D() failed\";\n\tglTexImage2D(GL_TEXTURE_2D, /* target */\n\t\t\t\t 0, /* mipmap level */\n\t\t\t\t 4, /* components */\n\t\t\t\t w, /* width */\n\t\t\t\t h, /* height */\n\t\t\t\t 0, /* border */\n\t\t\t\t GL_RGBA, /* format */\n\t\t\t\t GL_UNSIGNED_BYTE, /* type */\n\t\t\t\t NULL /* image data - if NULL contents is unspecified */);\n\tif((glErr = glGetError()) != GL_NO_ERROR) goto FAILED;\n\tDPRINTF3D(5, (fp,\"\\tid = %d\\n\", texture));\n\treturn texture;\nFAILED:\n\tDPRINTF3D(1, (fp, \"ERROR (glAllocateTexture): %s -- %s\\n\", errMsg, glErrString()));\n\tglDeleteTextures(1, &texture);\n\treturn -1;\n}\n\nint glDestroyTexture(int rendererHandle, int handle) /* return true on success, false on error */\n{\n\tstruct glRenderer *renderer = glRendererFromHandle(rendererHandle);\n\n\tif(!renderer || !glMakeCurrentRenderer(renderer)) {\n\t\tDPRINTF3D(4, (fp, \"ERROR: Invalid renderer specified\\n\"));\n\t\treturn 0;\n\t}\n\n\tif(!glIsTexture(handle)) {\n\t\treturn 0;\n\t}\n\tDPRINTF3D(5, (fp, \"### Destroying texture (id = %d)\\n\", handle));\n\tglDeleteTextures(1, (GLuint*) &handle);\n\tERROR_CHECK;\n\treturn 1;\n}\n\nint glActualTextureDepth(int rendererHandle, int handle) /* return depth or <0 on error */\n{\n\tstruct glRenderer *renderer = glRendererFromHandle(rendererHandle);\n\tif(!renderer) return -1;\n\treturn 32;\n}\n\nint glTextureColorMasks(int rendererHandle, int handle, int masks[4])  /* return true on success, false on error */\n{\n\tstruct glRenderer *renderer = glRendererFromHandle(rendererHandle);\n\tif(!renderer) return 0;\n#ifdef LSB_FIRST\n\tmasks[3] = 0xFF000000;\n\tmasks[2] = 0x00FF0000;\n\tmasks[1] = 0x0000FF00;\n\tmasks[0] = 0x000000FF;\n#else\n\tmasks[0] = 0xFF000000;\n\tmasks[1] = 0x00FF0000;\n\tmasks[2] = 0x0000FF00;\n\tmasks[3] = 0x000000FF;\n#endif\n\treturn 1;\n}\n\nint glTextureByteSex(int rendererHandle, int handle) /* return > 0 if MSB, = 0 if LSB, < 0 if error */\n{\n\tstruct glRenderer *renderer = glRendererFromHandle(rendererHandle);\n\tif(!renderer) return -1;\n#ifdef LSB_FIRST\n\treturn 0;\n#else\n\treturn 1;\n#endif\n}\n\nint glTextureSurfaceHandle(int rendererHandle, int handle) {\n  /* GL textures are not directly accessible */\n  return -1;\n}\n\nint glUploadTexture(int rendererHandle, int handle, int w, int h, int d, void* bits)\n{\n\tint y;\n\n\tstruct glRenderer *renderer = glRendererFromHandle(rendererHandle);\n\n\tif(!renderer || !glMakeCurrentRenderer(renderer)) {\n\t\tDPRINTF3D(4, (fp, \"ERROR: Invalid renderer specified\\n\"));\n\t\treturn 0;\n\t}\n\n\tif(d != 32) return 0;\n\n\tif(!glIsTexture(handle)) {\n\t\treturn 0;\n\t}\n\tDPRINTF3D(5, (fp, \"### Uploading texture (w = %d, h = %d, d = %d, id = %d)\\n\", w, h, d, handle));\n\tglBindTexture(GL_TEXTURE_2D, handle);\n\tERROR_CHECK;\n\tfor(y = 0; y < h; y++) {\n\t\tglTexSubImage2D(GL_TEXTURE_2D, /* target */\n\t\t\t\t\t\t0, /* level */\n\t\t\t\t\t\t0, /* xoffset */\n\t\t\t\t\t\ty, /* yoffset */\n\t\t\t\t\t\tw, /* width */\n\t\t\t\t\t\t1, /* height */\n\t\t\t\t\t\tGL_RGBA, /* format */\n\t\t\t\t\t\tGL_UNSIGNED_BYTE, /* type */\n\t\t\t\t\t\t((char*)bits) + (y*w*4));\n\t\tERROR_CHECK;\n\t}\n\treturn 1;\n}\n\nint glCompositeTexture(int rendererHandle, int handle, int x, int y, int w, int h, int translucent)\n{\n\tstruct glRenderer *renderer = glRendererFromHandle(rendererHandle);\n\n\tif(!renderer || !glMakeCurrentRenderer(renderer)) {\n\t\tDPRINTF3D(4, (fp, \"ERROR: Invalid renderer specified\\n\"));\n\t\treturn 0;\n\t}\n\tif(!glIsTexture(handle)) {\n\t\treturn 0;\n\t}\n\tERROR_CHECK;\n\tDPRINTF3D(7, (fp, \"glCompositeTexture(%d, %d, %d, %d)\\n\", x, y, w, h));\n\t{\n\t\t/* setup a transformation so that we're dealing with pixel x/y coordinate systems */\n\t\tglPushMatrix();\n\t\tglLoadIdentity();\n\t\tglMatrixMode(GL_PROJECTION);\n\t\tglPushMatrix();\n\t\tglLoadIdentity();\n\t\tERROR_CHECK;\n\t\t/* matrix backup complete - now install new mapping */\n\t\t{\n\t\t\tint width = renderer->bufferRect[2];\n\t\t\tint height = renderer->bufferRect[3];\n\t\t\tglViewport(0, 0, width, height);\n\t\t\t/* now remap from lower left origin to upper left origin \n\t\t\t   while scaling from (-width,+width) to (-1, +1) */\n\t\t\tglScaled(2.0/width, -2.0/height, 1.0);\n\t\t\t/* offset origin to start at 0,0 rather than -width/2,-height/2 */\n\t\t\tglTranslated(width*-0.5, height*-0.5, 0.0);\n\t\t\tERROR_CHECK;\n\t\t}\n\t\t/* setup the right shading rules */\n\t\tglPushAttrib(GL_ALL_ATTRIB_BITS);\n\t\t{\n\t\t\tglShadeModel(GL_FLAT);\n\t\t\tglEnable(GL_TEXTURE_2D);\n\t\t\tglDisable(GL_COLOR_MATERIAL);\n\t\t\tglDisable(GL_DITHER);\n\t\t\tglDisable(GL_LIGHTING);\n\t\t\tglDisable(GL_DEPTH_TEST);\n\t\t\tglDisable(GL_BLEND);\n\t\t\tglDisable(GL_CULL_FACE);\n\t\t\tglDepthMask(GL_FALSE);\n\t\t\tglColor4d(1.0, 1.0, 1.0, 1.0);\n\t\t\tglHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST);\n\t\t}\n\t\tERROR_CHECK;\n\n\t\t/* prepare for translucency */\n\t\tif(translucent) {\n\t\t\tglEnable(GL_BLEND);\n\t\t\tglBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);\n\t\t}\n\t\tERROR_CHECK;\n\t}\n\t{\n\t\t/* and *THAT* is the hard work ;-))) */\n\t\tglBindTexture(GL_TEXTURE_2D, handle);\n\t\tERROR_CHECK;\n\t\tx -= renderer->bufferRect[0];\n\t\ty -= renderer->bufferRect[1];\n\t\tDPRINTF3D(7, (fp, \"glRecti(%d, %d, %d, %d)\\n\", x, y, w, h));\n\t\tglBegin(GL_QUADS);\n\t\t\tglTexCoord2d(0.0, 0.0);\n\t\t\tglVertex2i(x, y);\n\t\t\tglTexCoord2d(1.0, 0.0);\n\t\t\tglVertex2i(x+w, y);\n\t\t\tglTexCoord2d(1.0, 1.0);\n\t\t\tglVertex2i(x+w, y+h);\n\t\t\tglTexCoord2d(0.0, 1.0);\n\t\t\tglVertex2i(x, y+h);\n\t\tglEnd();\n\t\tERROR_CHECK;\n\t}\n\t/* and restore everything back to normal */\n\t{\n\t\tglPopAttrib();\n\t\t/* BUG BUG BUG - Mac OpenGL has a problem with glPushAttrib/glShadeModel/glPopAttrib - BUG BUG BUG */\n\t\tglShadeModel(GL_SMOOTH);\n\t\tglPopMatrix();\n\t\tglMatrixMode(GL_MODELVIEW);\n\t\tglPopMatrix();\n\t}\n\tERROR_CHECK;\n\t/* done */\n\treturn 1;\n}\n\n/*****************************************************************************/\n/*****************************************************************************/\n/*****************************************************************************/\n/*****************************************************************************/\n\nint glSetViewport(int handle, int x, int y, int w, int h) /* return true on success, false on error */\n{\n\tstruct glRenderer *renderer = glRendererFromHandle(handle);\n\tif(!renderer || !glMakeCurrentRenderer(renderer)) return 0;\n\n\tDPRINTF3D(5, (fp, \"### New Viewport\\n\"));\n\tDPRINTF3D(5, (fp, \"\\tx: %d\\n\\ty: %d\\n\\tw: %d\\n\\th: %d\\n\", x, y, w, h));\n\trenderer->viewport[0] = x;\n\trenderer->viewport[1] = y;\n\trenderer->viewport[2] = w;\n\trenderer->viewport[3] = h;\n\tx -= renderer->bufferRect[0];\n\ty -= renderer->bufferRect[1];\n\tDPRINTF3D(5, (fp, \"\\tx: %d\\n\\ty: %d\\n\\tw: %d\\n\\th: %d\\n\", x, y, w, h));\n\tglViewport(x, renderer->bufferRect[3] - (y+h), w, h);\n\tERROR_CHECK;\n\n\treturn 1;\n}\n\nint glClearDepthBuffer(int handle) /* return true on success, false on error */\n{\n\tstruct glRenderer *renderer = glRendererFromHandle(handle);\n\tif(!renderer || !glMakeCurrentRenderer(renderer)) return 0;\n\tDPRINTF3D(5, (fp, \"### Clearing depth buffer\\n\"));\n\tglClear(GL_DEPTH_BUFFER_BIT);\n\tERROR_CHECK;\n\treturn 1;\n}\n\nint glClearViewport(int handle, unsigned int rgba, unsigned int pv) /* return true on success, false on error */\n{\n\tstruct glRenderer *renderer = glRendererFromHandle(handle);\n\tif(!renderer || !glMakeCurrentRenderer(renderer)) return 0;\n\tDPRINTF3D(5, (fp, \"### Clearing viewport buffer\\n\"));\n\tglClearColor(\n\t\t\t\t((rgba >> 16) & 255) / 255.0, \n\t\t\t\t((rgba >>  8) & 255) / 255.0, \n\t\t\t\t(rgba & 255) / 255.0, \n\t\t\t\t(rgba >> 24) / 255.0);\n\tglClear(GL_COLOR_BUFFER_BIT);\n\tERROR_CHECK;\n\treturn 1;\n}\n\nint glFinishRenderer(int handle) /* return true on success, false on error */\n{\n\tstruct glRenderer *renderer = glRendererFromHandle(handle);\n\tif(!renderer || !glMakeCurrentRenderer(renderer)) return 0;\n\tDPRINTF3D(5, (fp, \"### Finishing renderer\\n\"));\n\tglFinish();\n\tERROR_CHECK;\n\treturn 1;\n}\n\nint glFlushRenderer(int handle) /* return true on success, false on error */\n{\n\tstruct glRenderer *renderer = glRendererFromHandle(handle);\n\tif(!renderer || !glMakeCurrentRenderer(renderer)) return 0;\n\tDPRINTF3D(5, (fp, \"### Flushing renderer\\n\"));\n\tglFlush();\n\tERROR_CHECK;\n\treturn 1;\n}\n\nint glSwapRendererBuffers(int handle) /* return true on success, false on error */\n{\n\tstruct glRenderer *renderer = glRendererFromHandle(handle);\n\tif(!renderer || !glMakeCurrentRenderer(renderer)) return 0;\n\tDPRINTF3D(5, (fp, \"### Swapping renderer buffers\\n\"));\n\tglSwapBuffers(renderer);\n\tERROR_CHECK;\n\treturn 1;\n}\n\n\nint glSetTransform(int handle, float *modelViewMatrix, float *projectionMatrix) {\n\tfloat matrix[16];\n\tint i, j;\n\n\tstruct glRenderer *renderer = glRendererFromHandle(handle);\n\tif(!renderer || !glMakeCurrentRenderer(renderer)) return 0;\n\n\tDPRINTF3D(5, (fp, \"### Installing new transformations\\n\"));\n\tglMatrixMode(GL_PROJECTION);\n\tERROR_CHECK;\n\tglLoadIdentity();\n\tERROR_CHECK;\n\tif(projectionMatrix) {\n\t\t/* TODO: Check if matrix is simple and don't use glMultMatrixf if so */\n\t\tfor(i=0; i<4; i++)\n\t\t\tfor(j=0; j<4; j++)\n\t\t\t\tmatrix[i*4+j] = projectionMatrix[j*4+i];\n\t\tglLoadMatrixf(matrix);\n\t\tERROR_CHECK;\n\t}\n\tglMatrixMode(GL_MODELVIEW);\n\tERROR_CHECK;\n\tglLoadIdentity();\n\tERROR_CHECK;\n\tif(modelViewMatrix) {\n\t\t/* TODO: Check if matrix is simple and don't use glMultMatrixf if so */\n\t\tfor(i=0; i<4; i++)\n\t\t\tfor(j=0; j<4; j++)\n\t\t\t\tmatrix[i*4+j] = modelViewMatrix[j*4+i];\n\t\tglLoadMatrixf(matrix);\n\t\tERROR_CHECK;\n\t}\n\treturn 1;\n}\n\nint glDisableLights(int handle) {\n\tint i;\n\tGLint max;\n\tstruct glRenderer *renderer = glRendererFromHandle(handle);\n\n\tif(!renderer || !glMakeCurrentRenderer(renderer)) {\n\t\tDPRINTF3D(4, (fp, \"ERROR: Invalid renderer specified\\n\"));\n\t\treturn 0;\n\t}\n\n\tDPRINTF3D(5, (fp, \"### Disabling all lights\\n\"));\n\tglGetIntegerv(GL_MAX_LIGHTS, &max);\n\tERROR_CHECK;\n\tfor(i = 0; i < max; i++) {\n\t\tglDisable(GL_LIGHT0+i);\n\t\tERROR_CHECK;\n\t\tif( (glErr = glGetError()) != GL_NO_ERROR) \n\t\t\tDPRINTF3D(1, (fp,\"ERROR (glDisableLights): glDisable(GL_LIGHT%d) failed -- %s\\n\", i, glErrString()));\n\t}\n\treturn 1;\n}\n\nint glLoadMaterial(int handle, B3DPrimitiveMaterial *mat)\n{\n\tstruct glRenderer *renderer = glRendererFromHandle(handle);\n\n\tif(!renderer || !glMakeCurrentRenderer(renderer)) {\n\t\tDPRINTF3D(4, (fp, \"ERROR: Invalid renderer specified\\n\"));\n\t\treturn 0;\n\t}\n\n\tDPRINTF3D(5, (fp, \"### New Material\\n\"));\n\tif(!mat) {\n\t\tDPRINTF3D(5, (fp, \"\\tOFF (material == nil)\\n\"));\n\t\tglDisable(GL_LIGHTING);\n\t\tERROR_CHECK;\n\t\treturn 1;\n\t}\n\tDPRINTF3D(5, (fp, \"\\tambient  : %g, %g, %g, %g\\n\",mat->ambient[0], mat->ambient[1], mat->ambient[2], mat->ambient[3]));\n\tDPRINTF3D(5, (fp, \"\\tdiffuse  : %g, %g, %g, %g\\n\",mat->diffuse[0], mat->diffuse[1], mat->diffuse[2], mat->diffuse[3]));\n\tDPRINTF3D(5, (fp, \"\\tspecular : %g, %g, %g, %g\\n\",mat->specular[0], mat->specular[1], mat->specular[2], mat->specular[3]));\n\tDPRINTF3D(5, (fp, \"\\temission : %g, %g, %g, %g\\n\",mat->emission[0], mat->emission[1], mat->emission[2], mat->emission[3]));\n\tDPRINTF3D(5, (fp, \"\\tshininess: %g\\n\", mat->shininess));\n\tglEnable(GL_LIGHTING);\n\tERROR_CHECK;\n\tglMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, mat->ambient);\n\tERROR_CHECK;\n\tglMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mat->diffuse);\n\tERROR_CHECK;\n\tglMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, mat->specular);\n\tERROR_CHECK;\n\tglMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, mat->emission);\n\tERROR_CHECK;\n\tglMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, mat->shininess);\n\tERROR_CHECK;\n\treturn 1;\n}\n\nint glLoadLight(int handle, int idx, B3DPrimitiveLight *light)\n{\n\tfloat pos[4];\n\tint index = GL_LIGHT0 + idx;\n\tstruct glRenderer *renderer = glRendererFromHandle(handle);\n\n\tif(!renderer || !glMakeCurrentRenderer(renderer)) {\n\t\tDPRINTF3D(4, (fp, \"ERROR: Invalid renderer specified\\n\"));\n\t\treturn 0;\n\t}\n\n\tDPRINTF3D(5, (fp, \"### New Light (%d)\\n\", idx));\n\n\tif(!light) {\n\t\tDPRINTF3D(5, (fp, \"\\tDISABLED\\n\"));\n\t\tglDisable(index);\n\t\tERROR_CHECK;\n\t\treturn 1;\n\t}\n\tglEnable(index);\n\tERROR_CHECK;\n\tDPRINTF3D(5, (fp, \"\\tambient       : %g, %g, %g, %g\\n\",light->ambient[0], light->ambient[1], light->ambient[2], light->ambient[3]));\n\tDPRINTF3D(5, (fp, \"\\tdiffuse       : %g, %g, %g, %g\\n\",light->diffuse[0], light->diffuse[1], light->diffuse[2], light->diffuse[3]));\n\tDPRINTF3D(5, (fp, \"\\tspecular      : %g, %g, %g, %g\\n\",light->specular[0], light->specular[1], light->specular[2], light->specular[3]));\n\tDPRINTF3D(5, (fp, \"\\tposition      : %g, %g, %g\\n\",light->position[0], light->position[1], light->position[2]));\n\tDPRINTF3D(5, (fp, \"\\tdirection     : %g, %g, %g\\n\",light->direction[0], light->direction[1], light->direction[2]));\n\tDPRINTF3D(5, (fp, \"\\tattenuation   : %g, %g, %g\\n\",light->attenuation[0], light->attenuation[1], light->attenuation[2]));\n\tDPRINTF3D(5, (fp, \"\\tflags [%d]:\", light->flags));\n\tif(light->flags & B3D_LIGHT_AMBIENT) DPRINTF3D(5,(fp,\" B3D_LIGHT_AMBIENT\"));\n\tif(light->flags & B3D_LIGHT_DIFFUSE) DPRINTF3D(5,(fp,\" B3D_LIGHT_DIFFUSE\"));\n\tif(light->flags & B3D_LIGHT_SPECULAR) DPRINTF3D(5,(fp,\" B3D_LIGHT_SPECULAR\"));\n\tif(light->flags & B3D_LIGHT_POSITIONAL) DPRINTF3D(5,(fp,\" B3D_LIGHT_POSITIONAL\"));\n\tif(light->flags & B3D_LIGHT_DIRECTIONAL) DPRINTF3D(5,(fp,\" B3D_LIGHT_DIRECTIONAL\"));\n\tif(light->flags & B3D_LIGHT_ATTENUATED) DPRINTF3D(5,(fp,\" B3D_LIGHT_ATTENUATED\"));\n\tif(light->flags & B3D_LIGHT_HAS_SPOT) DPRINTF3D(5,(fp,\" B3D_LIGHT_HAS_SPOT\"));\n\tDPRINTF3D(5, (fp, \"\\n\"));\n\tDPRINTF3D(5, (fp, \"\\tspot exponent : %g\\n\", light->spotExponent));\n\n\tDPRINTF3D(5, (fp, \"### Installing Light (%d)\\n\", idx));\n\tif(light->flags & B3D_LIGHT_AMBIENT) {\n\t\tDPRINTF3D(5, (fp, \"\\tambient  : %g, %g, %g, %g\\n\",light->ambient[0], light->ambient[1], light->ambient[2], light->ambient[3]));\n\t\tglLightfv(index, GL_AMBIENT, light->ambient);\n\t} else {\n\t\tDPRINTF3D(5, (fp, \"\\tambient  : OFF (0, 0, 0, 1)\\n\"));\n\t\tglLightfv(index, GL_AMBIENT, blackLight);\n\t}\n\tERROR_CHECK;\n\n\tif(light->flags & B3D_LIGHT_DIFFUSE) {\n\t\tDPRINTF3D(5, (fp, \"\\tdiffuse  : %g, %g, %g, %g\\n\",light->diffuse[0], light->diffuse[1], light->diffuse[2], light->diffuse[3]));\n\t\tglLightfv(index, GL_DIFFUSE, light->diffuse);\n\t} else {\n\t\tDPRINTF3D(5, (fp, \"\\tdiffuse  : OFF (0, 0, 0, 1)\\n\"));\n\t\tglLightfv(index, GL_DIFFUSE, blackLight);\n\t}\n\tERROR_CHECK;\n\n\tif(light->flags & B3D_LIGHT_SPECULAR) {\n\t\tDPRINTF3D(5, (fp, \"\\tspecular : %g, %g, %g, %g\\n\",light->specular[0], light->specular[1], light->specular[2], light->specular[3]));\n\t\tglLightfv(index, GL_SPECULAR, light->specular);\n\t} else {\n\t\tDPRINTF3D(5, (fp, \"\\tspecular : OFF (0, 0, 0, 1)\\n\"));\n\t\tglLightfv(index, GL_SPECULAR, blackLight);\n\t}\n\tERROR_CHECK;\n\n\tif(light->flags & B3D_LIGHT_POSITIONAL) {\n\t\tDPRINTF3D(5, (fp, \"\\tposition : %g, %g, %g\\n\",light->position[0], light->position[1], light->position[2]));\n\t\tpos[0] = light->position[0];\n\t\tpos[1] = light->position[1];\n\t\tpos[2] = light->position[2];\n\t\tpos[3] = 1.0;\n\t\t/* @@@ FIXME: Squeak pre-transforms the light @@@ */\n\t\tglPushMatrix();\n\t\tglLoadIdentity();\n\t\tglLightfv(index, GL_POSITION, pos);\n\t\tglPopMatrix();\n\t} else {\n\t\tif(light->flags & B3D_LIGHT_DIRECTIONAL) {\n\t\t\tDPRINTF3D(5, (fp, \"\\tdirection: %g, %g, %g\\n\",light->direction[0], light->direction[1], light->direction[2]));\n\t\t\tpos[0] = light->direction[0];\n\t\t\tpos[1] = light->direction[1];\n\t\t\tpos[2] = light->direction[2];\n\t\t\tpos[3] = 0.0;\n\t\t\t/* @@@ FIXME: Squeak pre-transforms the light @@@ */\n\t\t\tglPushMatrix();\n\t\t\tglLoadIdentity();\n\t\t\tglLightfv(index, GL_POSITION, pos);\n\t\t\tglPopMatrix();\n\t\t}\n\t}\n\tERROR_CHECK;\n\n\tif(light->flags & B3D_LIGHT_ATTENUATED) {\n\t\tDPRINTF3D(5, (fp, \"\\tattenuation: %g, %g, %g\\n\",light->attenuation[0], light->attenuation[1], light->attenuation[2]));\n\t\tglLightf(index, GL_CONSTANT_ATTENUATION,  light->attenuation[0]);\n\t\tERROR_CHECK;\n\t\tglLightf(index, GL_LINEAR_ATTENUATION,    light->attenuation[1]);\n\t\tERROR_CHECK;\n\t\tglLightf(index, GL_QUADRATIC_ATTENUATION, light->attenuation[2]);\n\t\tERROR_CHECK;\n\t} else {\n\t\tDPRINTF3D(5, (fp, \"\\tattenuation: OFF (1, 0, 0)\\n\"));\n\t\tglLightf(index, GL_CONSTANT_ATTENUATION,  1.0);\n\t\tERROR_CHECK;\n\t\tglLightf(index, GL_LINEAR_ATTENUATION,    0.0);\n\t\tERROR_CHECK;\n\t\tglLightf(index, GL_QUADRATIC_ATTENUATION, 0.0);\n\t\tERROR_CHECK;\n\t}\n\n\tif(light->flags & B3D_LIGHT_HAS_SPOT) {\n\t\tDPRINTF3D(5, (fp, \"\\tspot exponent : %g\\n\", light->spotExponent));\n\t\tDPRINTF3D(5, (fp, \"\\tspot cutoff   : ???\\n\"));\n\t\tDPRINTF3D(5, (fp, \"\\tspot direction: %g, %g, %g\\n\",light->direction[0], light->direction[1], light->direction[2]));\n\t\tglLightf(index, GL_SPOT_EXPONENT, light->spotExponent);\n\t\tERROR_CHECK;\n\t\tglLightf(index, GL_SPOT_CUTOFF, light->spotExponent);\n\t\tERROR_CHECK;\n\t\tglLightfv(index, GL_SPOT_DIRECTION, light->direction);\n\t\tERROR_CHECK;\n\t} else {\n\t\tglLightf(index, GL_SPOT_EXPONENT, 0.0);\n\t\tERROR_CHECK;\n\t\tglLightf(index, GL_SPOT_CUTOFF, 180.0);\n\t\tERROR_CHECK;\n\t}\n\treturn 1;\n}\n\nint glSetFog(int handle, int fogType, double density, \n             double fogRangeStart, double fogRangeEnd, int rgba) {\n  GLfloat fogColor[4];\n  glRenderer *renderer = glRendererFromHandle(handle);\n\n  if(!renderer || !glMakeCurrentRenderer(renderer)) return 0;\n  if(fogType == 0) {\n    glDisable(GL_FOG);\n    ERROR_CHECK;\n    return 1;\n  }\n\n  glEnable(GL_FOG);\n  if(fogType == 1) glFogi(GL_FOG_MODE, GL_LINEAR);\n  if(fogType == 2) glFogi(GL_FOG_MODE, GL_EXP);\n  if(fogType == 3) glFogi(GL_FOG_MODE, GL_EXP2);\n  glFogf(GL_FOG_DENSITY, (GLfloat)density);\n  glFogf(GL_FOG_START, (GLfloat)fogRangeStart);\n  glFogf(GL_FOG_END, (GLfloat)fogRangeEnd);\n  fogColor[0] = ((rgba >> 16) & 255) / 255.0;\n  fogColor[1] = ((rgba >>  8) & 255) / 255.0;\n  fogColor[2] = (rgba & 255) / 255.0;\n  fogColor[3] = (rgba >> 24) / 255.0;\n  glFogfv(GL_FOG_COLOR, fogColor);\n  /* enable pixel fog */\n  glHint(GL_FOG_HINT, GL_NICEST);\n  ERROR_CHECK;\n  return 1;\n}\n\nint glGetIntProperty(int handle, int prop)\n{\n  GLint v;\n\n  glRenderer *renderer = glRendererFromHandle(handle);\n  if(!renderer || !glMakeCurrentRenderer(renderer)) return 0;\n\n  if(prop < 0) return glGetIntPropertyOS(handle, prop);\n\n  switch(prop) {\n  case 1: /* backface culling */\n    if(!glIsEnabled(GL_CULL_FACE)) return 0;\n    glGetIntegerv(GL_FRONT_FACE, &v);\n    if(v == GL_CW) return 1;\n    if(v == GL_CCW) return -1;\n    return 0;\n  case 2: /* polygon mode */\n    glGetIntegerv(GL_POLYGON_MODE, &v);\n    ERROR_CHECK;\n    return v;\n  case 3: /* point size */\n    glGetIntegerv(GL_POINT_SIZE, &v);\n    ERROR_CHECK;\n    return v;\n  case 4: /* line width */\n    glGetIntegerv(GL_LINE_WIDTH, &v);\n    ERROR_CHECK;\n    return v;\n  case 5: /* blend enable */\n    return glIsEnabled(GL_BLEND);\n  case 6: /* blend source factor */\n  case 7: /* blend dest factor */\n    if(prop == 6)\n      glGetIntegerv(GL_BLEND_SRC, &v);\n    else\n      glGetIntegerv(GL_BLEND_DST, &v);\n    ERROR_CHECK;\n    switch(v) {\n        case GL_ZERO: return 0;\n        case GL_ONE: return 1;\n        case GL_SRC_COLOR: return 2;\n        case GL_ONE_MINUS_SRC_COLOR: return 3;\n        case GL_DST_COLOR: return 4;\n        case GL_ONE_MINUS_DST_COLOR: return 5;\n        case GL_SRC_ALPHA: return 6;\n        case GL_ONE_MINUS_SRC_ALPHA: return 7;\n        case GL_DST_ALPHA: return 8;\n        case GL_ONE_MINUS_DST_ALPHA: return 9;\n        case GL_SRC_ALPHA_SATURATE: return 10;\n        default: return -1;\n    }\n  }\n  return 0;\n}\n\nint glSetIntProperty(int handle, int prop, int value)\n{\n  glRenderer *renderer = glRendererFromHandle(handle);\n  if(!renderer || !glMakeCurrentRenderer(renderer)) return 0;\n\n  if(prop < 0) return glSetIntPropertyOS(handle, prop, value);\n\n  switch(prop) {\n  case 1: /* backface culling */\n    if(!value) {\n      glDisable(GL_CULL_FACE);\n      ERROR_CHECK;\n      return 1;\n    }\n    glEnable(GL_CULL_FACE);\n    glFrontFace(value == 1 ? GL_CCW : GL_CW);\n    ERROR_CHECK;\n    return 1;\n  case 2: /* polygon mode */\n    if(value == 0) glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);\n    else if(value == 1) glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);\n    else if(value == 2) glPolygonMode(GL_FRONT_AND_BACK, GL_POINT);\n    else return 0;\n    ERROR_CHECK;\n    return 1;\n  case 3: /* point size */\n    glPointSize(value);\n    ERROR_CHECK;\n    return 1;\n  case 4: /* line width */\n    glLineWidth(value);\n    ERROR_CHECK;\n    return 1;\n  case 5: /* blend enable */\n    if(value)\n      glEnable(GL_BLEND);\n    else\n      glDisable(GL_BLEND);\n    ERROR_CHECK;\n    return 1;\n  case 6: /* blend source factor */\n  case 7: /* blend dest factor */\n    {\n      int factor;\n      GLint src, dst;\n      switch(value) {\n        case 0: factor = GL_ZERO; break;\n        case 1: factor = GL_ONE; break;\n        case 2: factor = GL_SRC_COLOR; break;\n        case 3: factor = GL_ONE_MINUS_SRC_COLOR; break;\n        case 4: factor = GL_DST_COLOR; break;\n        case 5: factor = GL_ONE_MINUS_DST_COLOR; break;\n        case 6: factor = GL_SRC_ALPHA; break;\n        case 7: factor = GL_ONE_MINUS_SRC_ALPHA; break;\n        case 8: factor = GL_DST_ALPHA; break;\n        case 9: factor = GL_ONE_MINUS_DST_ALPHA; break;\n        case 10: factor = GL_SRC_ALPHA_SATURATE; break;\n        default: return 0;\n      }\n      glGetIntegerv(GL_BLEND_SRC, &src);\n      glGetIntegerv(GL_BLEND_DST, &dst);\n      if(prop == 6) src = factor;\n      else dst = factor;\n      glBlendFunc(src,dst);\n      ERROR_CHECK;\n      return 1;\n    }\n  }\n  return 0;\n}\n\n#ifndef GL_VERSION_1_1\n\nstatic void glRenderVertex(B3DPrimitiveVertex *vtx, int flags)\n{\n\tDPRINTF3D(10, (fp, \"[\"));\n\tif(flags & 1) {\n\t\tunsigned int vv = vtx->pixelValue32;\n\t\tDPRINTF3D(10, (fp, \"C(%d, %d, %d, %d)\",(vv >> 16) & 255, (vv >> 8) & 255, vv & 255, vv >> 24));\n\t\tglColor4ub( (vv >> 16) & 255, (vv >> 8) & 255, vv & 255, vv >> 24 );\n\t}\n\tif(flags & 2) {\n\t\tDPRINTF3D(10, (fp, \"N(%g, %g, %g)\", vtx->normal[0], vtx->normal[1], vtx->normal[2]));\n\t\tglNormal3fv(vtx->normal);\n\t}\n\tif(flags & 4) {\n\t\tDPRINTF3D(10, (fp, \"T(%g, %g)\", vtx->texCoord[0], vtx->texCoord[1]));\n\t\tglTexCoord2fv(vtx->texCoord);\n\t}\n\tDPRINTF3D(10, (fp, \"V(%g, %g, %g)]\\n\", vtx->position[0], vtx->position[1], vtx->position[2]));\n\tglVertex3fv(vtx->position);\n}\n#endif\n\n/* General dummy for Squeak's primitive faces */\ntypedef int B3DInputFace;\n\nint glRenderVertexBuffer(int handle, int primType, int flags, int texHandle, float *vtxArray, int vtxSize, int *idxArray, int idxSize)\n{\n\tB3DPrimitiveVertex *vtxPointer = (B3DPrimitiveVertex*) vtxArray;\n\tB3DInputFace *facePtr = (B3DInputFace*) idxArray;\n\tGLuint tracking;\n\tint nVertices = vtxSize;\n\tint nFaces = 0;\n\tint i, vtxFlags;\n\n\tstruct glRenderer *renderer = glRendererFromHandle(handle);\n\n\tif(!renderer || !glMakeCurrentRenderer(renderer)) {\n\t\tDPRINTF3D(4, (fp, \"ERROR: Invalid renderer specified\\n\"));\n\t\treturn 0;\n\t}\n\n\tDPRINTF3D(5, (fp,\"### Primitive : %d\\n\", primType));\n\tDPRINTF3D(5, (fp,\"\\ttexHandle   : %d\\n\", texHandle));\n\tDPRINTF3D(5, (fp,\"\\tcolor flags :\"));\n\tif(flags & B3D_VB_TRACK_AMBIENT) DPRINTF3D(5,(fp,\" B3D_VB_TRACK_AMBIENT\"));\n\tif(flags & B3D_VB_TRACK_DIFFUSE) DPRINTF3D(5,(fp,\" B3D_VB_TRACK_DIFFUSE\"));\n\tif(flags & B3D_VB_TRACK_SPECULAR) DPRINTF3D(5,(fp,\" B3D_VB_TRACK_SPECULAR\"));\n\tif(flags & B3D_VB_TRACK_EMISSION) DPRINTF3D(5,(fp,\" B3D_VB_TRACK_EMISSION\"));\n\tDPRINTF3D(5, (fp,\"\\n\\tlight flags :\"));\n\tif(flags & B3D_VB_LOCAL_VIEWER) DPRINTF3D(5,(fp,\" B3D_VB_LOCAL_VIEWER\"));\n\tif(flags & B3D_VB_TWO_SIDED) DPRINTF3D(5,(fp,\" B3D_VB_TWO_SIDED\"));\n\tDPRINTF3D(5, (fp,\"\\n\\tvertex flags:\"));\n\tif(flags & B3D_VB_HAS_NORMALS) DPRINTF3D(5,(fp,\" B3D_VB_HAS_NORMALS\"));\n\tif(flags & B3D_VB_HAS_TEXTURES) DPRINTF3D(5,(fp,\" B3D_VB_HAS_TEXTURES\"));\n\tDPRINTF3D(5, (fp, \"\\n\"));\n\n\t/* process VB flags */\n\ttracking = 0;\n\tif(flags & B3D_VB_TRACK_AMBIENT) tracking |= GL_AMBIENT;\n\tif(flags & B3D_VB_TRACK_DIFFUSE) tracking |= GL_DIFFUSE;\n\tif(flags & B3D_VB_TRACK_SPECULAR) tracking |= GL_SPECULAR;\n\tif(flags & B3D_VB_TRACK_EMISSION) tracking |= GL_EMISSION;\n\n\tif(tracking) {\n\t\t/* in accordance with glColorMaterial man page noting:\n\t\t   Call glColorMaterial before enabling GL_COLOR_MATERIAL. */\n\t\tglColorMaterial(GL_FRONT_AND_BACK, tracking);\n\t\tERROR_CHECK;\n\t\tglEnable(GL_COLOR_MATERIAL);\n\t\tERROR_CHECK;\n\t}\n\n\tglLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, (flags & B3D_VB_LOCAL_VIEWER) ? 1 : 0);\n\tERROR_CHECK;\n\tglLightModeli(GL_LIGHT_MODEL_TWO_SIDE, (flags & B3D_VB_TWO_SIDED) ? 1 : 0);\n\tERROR_CHECK;\n\n\tif(texHandle > 0) {\n\t\tglEnable(GL_TEXTURE_2D);\n\t\tERROR_CHECK;\n\t\tglBindTexture(GL_TEXTURE_2D, texHandle);\n\t\tERROR_CHECK;\n\t} else {\n\t\tglDisable(GL_TEXTURE_2D);\n\t\tERROR_CHECK;\n\t}\n\tvtxFlags = 0;\n\tif(tracking)\n\t\tvtxFlags |= 1;\n\tif(flags & B3D_VB_HAS_NORMALS)\n\t\tvtxFlags |= 2;\n\tif(flags & B3D_VB_HAS_TEXTURES)\n\t\tvtxFlags |= 4;\n#ifdef GL_VERSION_1_1\n\t/* use glDrawElements() etc */\n\t/* @@@ HACK!!! */\n\tvtxPointer -= 1; /* that way we can submit all vertices at once */\n\tif(vtxFlags & 1) {\n\t  /* harumph... we need to rotate all the colors as we're getting ARGB here but GL expects RGBA... */\n\t  for(i=1;i<=nVertices;i++) {\n\t    unsigned int argb = vtxPointer[i].pixelValue32;\n\t    unsigned int rgba = (argb << 8) | (argb >> 24);\n\t    vtxPointer[i].pixelValue32 = rgba;\n\t  }\n\t  glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(B3DPrimitiveVertex), &(vtxPointer->pixelValue32));\n\t  glEnableClientState(GL_COLOR_ARRAY);\n\t}\n\tif(vtxFlags & 2) {\n\t  glNormalPointer(GL_FLOAT, sizeof(B3DPrimitiveVertex), vtxPointer->normal);\n\t  glEnableClientState(GL_NORMAL_ARRAY);\n\t}\n\tif(vtxFlags & 4) {\n\t  glTexCoordPointer(2, GL_FLOAT, sizeof(B3DPrimitiveVertex), vtxPointer->texCoord);\n\t  glEnableClientState(GL_TEXTURE_COORD_ARRAY);\n\t}\n\n\tglVertexPointer(3, GL_FLOAT, sizeof(B3DPrimitiveVertex), vtxPointer->position);\n\tglEnableClientState(GL_VERTEX_ARRAY);\n\tERROR_CHECK;\n\t/* @@@ HACK!!! */\n\tvtxPointer += 1; /* that way we can submit all vertices at once */\n#endif /* GL_VERSION_1_1 */\n\n\tswitch(primType) {\n\t\tcase 1: /* points */\n#ifdef GL_VERSION_1_1\n\t\t        glDrawArrays(GL_POINTS, 1, nVertices);\n#else /* !GL_VERSION_1_1 */\n\t\t\tglBegin(GL_POINTS);\n\t\t\tfor(i=0; i < nVertices; i++)\n\t\t\t\tglRenderVertex(vtxPointer + i, vtxFlags);\n\t\t\tglEnd();\n#endif /* GL_VERSION_1_1 */\n\t\t\tbreak;\n\t\tcase 2: /* lines */\n#ifdef GL_VERSION_1_1\n\t\t        glDrawArrays(GL_LINES, 1, nVertices);\n#else /* !GL_VERSION_1_1 */\n\t\t\tglBegin(GL_LINES);\n\t\t\tfor(i=0; i < nVertices; i++)\n\t\t\t\tglRenderVertex(vtxPointer + i, vtxFlags);\n\t\t\tglEnd();\n#endif /* GL_VERSION_1_1 */\n\t\t\tbreak;\n\t\tcase 3: /* polygon */\n#ifdef GL_VERSION_1_1\n\t\t        glDrawArrays(GL_POLYGON, 1, nVertices);\n#else /* !GL_VERSION_1_1 */\n\t\t\tglBegin(GL_POLYGON);\n\t\t\tfor(i=0; i < nVertices; i++)\n\t\t\t\tglRenderVertex(vtxPointer + i, vtxFlags);\n\t\t\tglEnd();\n#endif /* GL_VERSION_1_1 */\n\t\t\tbreak;\n\t\tcase 4: /* indexed lines */\n#ifdef GL_VERSION_1_1\n\t\t        glDrawElements(GL_LINES, idxSize, GL_UNSIGNED_INT, facePtr);\n#else /* !GL_VERSION_1_1 */\n\t\t\tnFaces = idxSize / 2;\n\t\t\tglBegin(GL_LINES);\n\t\t\tfor(i = 0; i < nFaces; i++) {\n\t\t\t\tB3DInputFace *face = facePtr + (2*i);\n\t\t\t\tif(face[0] && face[1]) {\n\t\t\t\t\tDPRINTF3D(10, (fp,\"\\n\"));\n\t\t\t\t\tglRenderVertex(vtxPointer + face[0] - 1, vtxFlags);\n\t\t\t\t\tglRenderVertex(vtxPointer + face[1] - 1, vtxFlags);\n\t\t\t\t}\n\t\t\t}\n\t\t\tglEnd();\n#endif /* GL_VERSION_1_1 */\n\t\t\tbreak;\n\t\tcase 5: /* indexed triangles */\n#ifdef GL_VERSION_1_1\n\t\t        glDrawElements(GL_TRIANGLES, idxSize, GL_UNSIGNED_INT, facePtr);\n#else /* !GL_VERSION_1_1 */\n\t\t\tnFaces = idxSize / 3;\n\t\t\tglBegin(GL_TRIANGLES);\n\t\t\tfor(i = 0; i < nFaces; i++) {\n\t\t\t\tB3DInputFace *face = facePtr + (3*i);\n\t\t\t\tif(face[0] && face[1] && face[2]) {\n\t\t\t\t\tDPRINTF3D(10, (fp,\"\\n\"));\n\t\t\t\t\tglRenderVertex(vtxPointer + face[0] - 1, vtxFlags);\n\t\t\t\t\tglRenderVertex(vtxPointer + face[1] - 1, vtxFlags);\n\t\t\t\t\tglRenderVertex(vtxPointer + face[2] - 1, vtxFlags);\n\t\t\t\t}\n\t\t\t}\n\t\t\tglEnd();\n#endif /* GL_VERSION_1_1 */\n\t\t\tbreak;\n\t\tcase 6: /* indexed quads */\n#ifdef GL_VERSION_1_1\n\t\t        glDrawElements(GL_QUADS, idxSize, GL_UNSIGNED_INT, facePtr);\n#else /* !GL_VERSION_1_1 */\n\t\t\tnFaces = idxSize / 4;\n\t\t\tglBegin(GL_QUADS);\n\t\t\tfor(i = 0; i < nFaces; i++) {\n\t\t\t\tB3DInputFace *face = facePtr + (4*i);\n\t\t\t\tif(face[0] && face[1] && face[2] && face[3]) {\n\t\t\t\t\tDPRINTF3D(10, (fp,\"\\n\"));\n\t\t\t\t\tglRenderVertex(vtxPointer + face[0] - 1, vtxFlags);\n\t\t\t\t\tglRenderVertex(vtxPointer + face[1] - 1, vtxFlags);\n\t\t\t\t\tglRenderVertex(vtxPointer + face[2] - 1, vtxFlags);\n\t\t\t\t\tglRenderVertex(vtxPointer + face[3] - 1, vtxFlags);\n\t\t\t\t}\n\t\t\t}\n\t\t\tglEnd();\n#endif /* GL_VERSION_1_1 */\n\t\t\tbreak;\n\t}\n\tERROR_CHECK;\n\tDPRINTF3D(5, (fp,\"\\n\"));\n\tglDisable(GL_COLOR_MATERIAL);\n\tERROR_CHECK;\n#ifdef GL_VERSION_1_1\n\tif(vtxFlags & 1)\n\t  glDisableClientState(GL_COLOR_ARRAY);\n\tif(vtxFlags & 2)\n\t  glDisableClientState(GL_NORMAL_ARRAY);\n\tif(vtxFlags & 4)\n\t  glDisableClientState(GL_TEXTURE_COORD_ARRAY);\n\tglDisableClientState(GL_VERTEX_ARRAY);\n\tERROR_CHECK;\n#endif /* GL_VERSION_1_1 */\n\treturn 1;\n}\n\n\n/*****************************************************************************/\n/*****************************************************************************/\nint b3dLoadClientState(int handle, float *vtxData, int vtxSize, float *colorData, int colorSize, float *normalData, int normalSize, float *txData, int txSize) {\n  glRenderer *renderer = glRendererFromHandle(handle);\n  if(!renderer || !glMakeCurrentRenderer(renderer)) {\n    DPRINTF3D(0, (fp, \"ERROR: Invalid renderer specified: %d\\n\", handle));\n    return 0;\n  }\n\n  if(colorData) glColorPointer(colorSize, GL_FLOAT, colorSize*4, colorData);\n  else glDisableClientState(GL_COLOR_ARRAY);\n  if(normalData) glNormalPointer(GL_FLOAT, normalSize*4, normalData);\n  else glDisableClientState(GL_NORMAL_ARRAY);\n  if(txData) glTexCoordPointer(txSize, GL_FLOAT, txSize*4, txData);\n  else glDisableClientState(GL_TEXTURE_COORD_ARRAY);\n  glVertexPointer(vtxSize, GL_FLOAT, vtxSize*4, vtxData);\n  return 1;\n}\n\nint b3dDrawRangeElements(int handle, int mode, int minIdx, int maxIdx, int nFaces, unsigned int *facePtr) {\n  glRenderer *renderer = glRendererFromHandle(handle);\n  if(!renderer || !glMakeCurrentRenderer(renderer)) return 0;\n\n#ifdef WIN32\n  if(!renderer->glDrawRangeElements) {\n    void *fn;\n    fn = wglGetProcAddress(\"glDrawRangeElements\");\n    if(!fn) {\n      DPRINTF3D(1, (fp, \"ERROR: Cannot find glDrawRangeElements\\n\"));\n      fn = wglGetProcAddress(\"glDrawRangeElementsEXT\");\n      if(!fn) {\n\tDPRINTF3D(1, (fp, \"ERROR: Cannot find glDrawRangeElementsEXT\\n\"));\n\treturn 0;\n      }\n    }\n    renderer->glDrawRangeElements = fn;\n  }\n  (*(renderer->glDrawRangeElements))\n    (mode, minIdx, maxIdx, nFaces, GL_UNSIGNED_INT, facePtr);\n#else\n  glDrawRangeElements(mode, minIdx, maxIdx, nFaces, GL_UNSIGNED_INT, facePtr);\n#endif\n  return 1;\n}\n\nint b3dDrawElements(int handle, int mode, int nFaces, unsigned int *facePtr) {\n  glRenderer *renderer = glRendererFromHandle(handle);\n  if(!renderer || !glMakeCurrentRenderer(renderer)) return 0;\n  glDrawElements(mode, nFaces, GL_UNSIGNED_INT, facePtr);\n  return 1;\n}\n\nint b3dDrawArrays(int handle, int mode, int minIdx, int maxIdx) {\n  glRenderer *renderer = glRendererFromHandle(handle);\n  if(!renderer || !glMakeCurrentRenderer(renderer)) return 0;\n  glDrawArrays(mode, minIdx, maxIdx);\n  return 1;\n}\n\n\n#endif /* defined B3DX_GL */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/B3DAcceleratorPlugin/sqOpenGLRenderer.h",
    "content": "#ifndef SQ_OPENGL_RENDERER_H\n#define SQ_OPENGL_RENDERER_H\n\n#if defined(macintoshSqueak)\n# include \"sqMacOpenGL.h\"\n#elif defined(WIN32)\n# include \"sqWin32OpenGL.h\"\n#elif defined(UNIX)\n# include \"sqUnixOpenGL.h\"\n#endif\n\n#if !defined(GL_RENDERER_DEFINED)\ntypedef struct glRenderer {\n\tGLint bufferRect[4];\n\tGLint viewport[4];\n} glRenderer;\n#endif\n\nstruct glRenderer *glRendererFromHandle(int rendererHandle);\nint glMakeCurrentRenderer(struct glRenderer *renderer);\nint glSwapBuffers(struct glRenderer *renderer);\n\n\n/*****************************************************************************/\n/*****************************************************************************/\n/*****************************************************************************/\n/*****************************************************************************/\nstatic int glErr = GL_NO_ERROR; /* this is only for debug purposes */\n\nstatic char *glErrString(void) {\n\tstatic char errString[50];\n\n\tswitch(glErr) {\n\t\tcase 0x0500: return \"GL_INVALID_ENUM\";\n\t\tcase 0x0501: return \"GL_INVALID_VALUE\";\n\t\tcase 0x0502: return \"GL_INVALID_OPERATION\";\n\t\tcase 0x0503: return \"GL_STACK_OVERFLOW\";\n\t\tcase 0x0504: return \"GL_STACK_UNDERFLOW\";\n\t\tcase 0x0505: return \"GL_OUT_OF_MEMORY\";\n\t}\n\tsprintf(errString, \"error code %d\", glErr);\n\treturn errString;\n}\n\n#define ERROR_CHECK_2(glFn, sqFn) \\\n\t{ if( (glErr = glGetError()) != GL_NO_ERROR) DPRINTF3D(1, (fp,\"ERROR (%s): %s failed -- %s\\n\", sqFn, glFn, glErrString())); }\n\n#define ERROR_CHECK_1(glFn) \\\n\t{ if( (glErr = glGetError()) != GL_NO_ERROR) DPRINTF3D(1, (fp,\"ERROR (file %s, line %d): %s failed -- %s\\n\", __FILE__, __LINE__, glFn, glErrString())); }\n\n#define ERROR_CHECK ERROR_CHECK_1(\"a GL function\")\n\n/* Verbose level for debugging purposes:\n\t0 - print NO information ever\n\t1 - print critical debug errors\n\t2 - print debug warnings\n\t3 - print extra information\n\t4 - print per-frame statistics\n\t5 - print information about textures, lights, materials, and primitives\n\t6 - print information about background synchronization\n\n   10 - print information about each vertex and face\n*/\nextern int verboseLevel;\n\n/* define forceFlush if we should fflush() before closing file */\n#define forceFlush 1\n\n/* Note: Print this stuff into a file in case we lock up*/\n#undef DPRINTF3D\n# define DPRINTF3D(vLevel, args) if(vLevel <= verboseLevel) {\\\n\tFILE *fp = fopen(\"Squeak3D.log\", \"at\");\\\n\tif(fp) { fprintf args; if(forceFlush) fflush(fp); fclose(fp); }}\n\n\n#endif /* sqOpenGLRenderer.h */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/BochsIA32Plugin/BochsIA32Plugin.h",
    "content": "/* Bochs seems to use error code 1 for execution errors.\n * So we use > 1 for various errors\n */\n#define NoError 0\n#define ExecutionError 1\n#define BadCPUInstance 2\n#define MemoryBoundsError 3\n#define PanicError 4\n#define UnsupportedOperationError 5\n#define SomethingLoggedError 6\n\n#if !defined(ulong)\ntypedef unsigned long ulong;\n#endif\n\n/*\n * Answer a pointer to a new Bochs IA32 CPU (an instance of C++ class bx_cpu_c)\n */\nextern void *newCPU();\n/*\n * reset the cpu to register contents 0, protected 32-bit mode.\n */\nextern int   resetCPU(void *cpu);\n/*\n * Single-step *cpu (a bx_cpu_c instance) using memory as its memory.\n * Answer 0 on success, or an integer error code if something went awry.\n */\nextern int  singleStepCPUInSizeMinAddrReadWrite(void *cpu, void *memory,\n\t\t\t\t\tulong byteSize, ulong minReadAddr, ulong minWriteAddr);\n/*\n * Run *cpu (a bx_cpu_c instance) using memory as its memory.\n * Answer an integer error code when the processor hits some exception.\n * Answer 0 when it is interrupted.\n */\nextern int\trunCPUInSizeMinAddrReadWrite(void *cpu, void *memory,\n\t\t\t\t\tulong byteSize, ulong minReadAddr, ulong minWriteAddr);\n/*\n * Flush any icache entries from start to end\n */\nextern void\tflushICacheFromTo(void *cpu, ulong strt, ulong nd);\n/*\n * force runCPUInSize to exit asap.  Used by interrupts.\n */\nextern void\tforceStopRunning(void);\n/*\n * The previous entry in the interruptCheckChain so forceStopRunning can chain.\n */\nextern void (*prevInterruptCheckChain)();\n/*\n * Disassemble the instruction at address in memory, writing the output to the\n * log.\n */\nextern int disassembleForAtInSize(void *cpu, ulong laddr,\n\t\t\t\t\t\t\t\t\tvoid *memory, ulong byteSize);\n/*\n * The saved error if the previous singleStepIn failed.\n */\nextern int   errorAcorn();\n/*\n * The current log (if singleStep failed with SomethingLoggedError).\n */\nextern char *getlog(long *len);\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/BochsIA32Plugin/sqBochsIA32Plugin.cpp",
    "content": "#include <stdarg.h>\n#define COG 1\n#define FOR_COG_PLUGIN 1\n\n// Requires per-target include paths:\n// ../../processors/IA32/bochs ../../processors/IA32/bochs/instrument/stubs\n#include <bochs.h>\n#include <cpu/cpu.h>\n#include <iodev/iodev.h>\n\n#define min(a,b) ((a)<=(b)?(a):(b))\n/*\n * Define setjmp and longjmp to be the most minimal setjmp/longjmp available\n * on the platform.\n */\n#if !WIN32\n# define setjmp(jb) _setjmp(jb)\n# define longjmp(jb,v) _longjmp(jb,v)\n#endif\n\nBOCHSAPI BX_CPU_C bx_cpu;\n\nextern \"C\" {\n\n#include \"BochsIA32Plugin.h\"\n\nstatic int            cpu_has_been_reset = 0;\n\n#define LOGSIZE 4096\nstatic char           bochs_log[LOGSIZE + 1];\nstatic int            blidx = 0;\n\nstatic unsigned char *theMemory = 0;\nstatic unsigned long  theMemorySize;\nstatic unsigned long  minReadAddress;\nstatic unsigned long  minWriteAddress;\nstatic int            theErrorAcorn;\nstatic bx_address     last_read_address = (bx_address)-1; /* for RMW cycles */\n\n\t   void\t\t\t(*prevInterruptCheckChain)() = 0;\n       int            resetCPU(void *cpu);\n\n\tvoid *\n\tnewCPU()\n\t{\n\t\tif (!cpu_has_been_reset) {\n\t\t\tresetCPU(&bx_cpu);\n\t\t\tcpu_has_been_reset = 1;\n\t\t}\n\t\treturn &bx_cpu;\n\t}\n\n\tint\n\tresetCPU(void *cpu)\n\t{\n\t\tBX_CPU_C *anx86 = (BX_CPU_C *)cpu;\n\n\t\tif (anx86 != &bx_cpu)\n\t\t\treturn BadCPUInstance;\n\n\t\tblidx = 0;\n#define RESET_FROM_COG BX_RESET_HARDWARE + 1\n\t\tbx_cpu.reset(RESET_FROM_COG);\n\t\tbx_cpu.SetCR0(0x80000001); // Enter protected mode\n\t\t// Origin the code, data & stack segments at 0\n\t\tbx_cpu.parse_selector(0x0000,&bx_cpu.sregs[BX_SEG_REG_CS].selector);\n\t\tbx_cpu.sregs[BX_SEG_REG_CS].cache.u.segment.base = 0;\n\t\tbx_cpu.sregs[BX_SEG_REG_CS].cache.u.segment.d_b  = 1; // 32-bit seg\n\t\tbx_cpu.sregs[BX_SEG_REG_CS].cache.u.segment.limit = 0xffff;\n\t\tbx_cpu.sregs[BX_SEG_REG_CS].cache.u.segment.limit_scaled = 0xffffffff;\n\t\tbx_cpu.parse_selector(0x0000,&bx_cpu.sregs[BX_SEG_REG_DS].selector);\n\t\tbx_cpu.sregs[BX_SEG_REG_DS].cache.u.segment.base = 0;\n\t\tbx_cpu.sregs[BX_SEG_REG_DS].cache.u.segment.d_b  = 1; // 32-bit seg\n\t\tbx_cpu.sregs[BX_SEG_REG_DS].cache.u.segment.limit = 0xffff;\n\t\tbx_cpu.sregs[BX_SEG_REG_DS].cache.u.segment.limit_scaled = 0xffffffff;\n\t\tbx_cpu.parse_selector(0x0000,&bx_cpu.sregs[BX_SEG_REG_SS].selector);\n\t\tbx_cpu.sregs[BX_SEG_REG_SS].cache.u.segment.base = 0;\n\t\tbx_cpu.sregs[BX_SEG_REG_SS].cache.u.segment.d_b  = 1; // 32-bit seg\n\t\tbx_cpu.sregs[BX_SEG_REG_SS].cache.u.segment.limit = 0xffff;\n\t\tbx_cpu.sregs[BX_SEG_REG_SS].cache.u.segment.limit_scaled = 0xffffffff;\n\n\t\tbx_cpu.gen_reg[BX_32BIT_REG_EDX].dword.erx = 0;\n\t\tbx_cpu.gen_reg[BX_32BIT_REG_EIP].dword.erx = 0;\n\t\treturn 0;\n\t}\n\n\tint\n\tsingleStepCPUInSizeMinAddressReadWrite(void *cpu,\n\t\t\t\t\t\t\t\t\tvoid *memory, ulong byteSize,\n\t\t\t\t\t\t\t\t\tulong minAddr, ulong minWriteMaxExecAddr)\n\t{\n\t\tBX_CPU_C *anx86 = (BX_CPU_C *)cpu;\n\n\t\tif (anx86 != &bx_cpu)\n\t\t\treturn BadCPUInstance;\n\t\ttheMemory = (unsigned char *)memory;\n\t\ttheMemorySize = byteSize;\n\t\tminReadAddress = minAddr;\n\t\tminWriteAddress = minWriteMaxExecAddr;\n\t\tif ((theErrorAcorn = setjmp(anx86->jmp_buf_env)) != 0) {\n\t\t\tanx86->gen_reg[BX_32BIT_REG_EIP].dword.erx = anx86->prev_rip;\n\t\t\treturn theErrorAcorn;\n\t\t}\n\n\t\tblidx = 0;\n\t\tbx_cpu.sregs[BX_SEG_REG_CS].cache.u.segment.limit_scaled\n\t\t\t= minWriteMaxExecAddr > 0 ? minWriteMaxExecAddr - 1 : 0;\n\t\tbx_cpu.sregs[BX_SEG_REG_DS].cache.u.segment.limit_scaled =\n\t\tbx_cpu.sregs[BX_SEG_REG_SS].cache.u.segment.limit_scaled = byteSize;\n\t\tbx_cpu.sregs[BX_SEG_REG_CS].cache.u.segment.limit = minWriteMaxExecAddr >> 16;\n\t\tbx_cpu.sregs[BX_SEG_REG_DS].cache.u.segment.limit =\n\t\tbx_cpu.sregs[BX_SEG_REG_SS].cache.u.segment.limit = byteSize >> 16;\n\t\tanx86->eipFetchPtr = theMemory;\n\t\tanx86->eipPageWindowSize = minWriteMaxExecAddr;\n\t\tanx86->cpu_single_step();\n\n\t\treturn blidx == 0 ? 0 : SomethingLoggedError;\n\t}\n\n\tint\n\trunCPUInSizeMinAddressReadWrite(void *cpu, void *memory, ulong byteSize,\n\t\t\t\t\t\t\t\t\tulong minAddr, ulong minWriteMaxExecAddr)\n\t{\n\t\tBX_CPU_C *anx86 = (BX_CPU_C *)cpu;\n\n\t\tif (anx86 != &bx_cpu)\n\t\t\treturn BadCPUInstance;\n\t\ttheMemory = (unsigned char *)memory;\n\t\ttheMemorySize = byteSize;\n\t\tminReadAddress = minAddr;\n\t\tminWriteAddress = minWriteMaxExecAddr;\n\t\tif ((theErrorAcorn = setjmp(anx86->jmp_buf_env)) != 0) {\n\t\t\tanx86->gen_reg[BX_32BIT_REG_EIP].dword.erx = anx86->prev_rip;\n\t\t\treturn theErrorAcorn;\n\t\t}\n\n\t\tblidx = 0;\n\t\tbx_cpu.sregs[BX_SEG_REG_CS].cache.u.segment.limit_scaled\n\t\t\t= minWriteMaxExecAddr > 0 ? minWriteMaxExecAddr - 1 : 0;\n\t\tbx_cpu.sregs[BX_SEG_REG_DS].cache.u.segment.limit_scaled =\n\t\tbx_cpu.sregs[BX_SEG_REG_SS].cache.u.segment.limit_scaled = byteSize;\n\t\tbx_cpu.sregs[BX_SEG_REG_CS].cache.u.segment.limit = minWriteMaxExecAddr >> 16;\n\t\tbx_cpu.sregs[BX_SEG_REG_DS].cache.u.segment.limit =\n\t\tbx_cpu.sregs[BX_SEG_REG_SS].cache.u.segment.limit = byteSize >> 16;\n\t\tanx86->eipFetchPtr = theMemory;\n\t\tanx86->eipPageWindowSize = minWriteMaxExecAddr;\n\t\tbx_pc_system.kill_bochs_request = 0;\n\t\tanx86->cpu_loop(0 /* = \"run forever\" until exception or interupt */);\n\t\tif (anx86->stop_reason != STOP_NO_REASON) {\n\t\t\tanx86->gen_reg[BX_32BIT_REG_EIP].dword.erx = anx86->prev_rip;\n\t\t\tif (theErrorAcorn == NoError)\n\t\t\t\ttheErrorAcorn = ExecutionError;\n\t\t\treturn theErrorAcorn;\n\t\t}\n\t\treturn blidx == 0 ? 0 : SomethingLoggedError;\n\t}\n\n\t/*\n\t * Currently a dummy for Bochs.\n\t */\n\tvoid\n\tflushICacheFromTo(void *cpu, ulong saddr, ulong eaddr)\n\t{\n#if BX_SUPPORT_ICACHE\n# error not yet implemented\n#endif\n\t}\n\n\tint\n\tdisassembleForAtInSize(void *cpu, ulong laddr,\n\t\t\t\t\t\t\tvoid *memory, ulong byteSize)\n\t{\n\t\tBX_CPU_C *anx86 = (BX_CPU_C *)cpu;\n\n\t\tBit8u  instr_buf[16];\n\t\tsize_t i=0;\n\n\t\tstatic char letters[] = \"0123456789ABCDEF\";\n\t\tstatic disassembler bx_disassemble;\n\t\tlong remainsInPage = byteSize - laddr;\n\n\t\tif (remainsInPage < 0) {\n\t\t\ttheErrorAcorn = MemoryBoundsError;\n\t\t\treturn -MemoryBoundsError;\n\t\t}\n\n\t\tmemcpy(instr_buf, (char *)memory + laddr, min(15,byteSize - laddr));\n\t\ti = sprintf(bochs_log, \"%08lx: \", laddr);\n\t\tbx_disassemble.set_syntax_att();\n\t\tunsigned isize = bx_disassemble.disasm(\n\t\t\t\t\t\t\tanx86->sregs[BX_SEG_REG_CS].cache.u.segment.d_b,\n\t\t\t\t\t\t\tanx86->cpu_mode == BX_MODE_LONG_64,\n\t\t\t\t\t\t\tanx86->get_segment_base(BX_SEG_REG_CS), laddr,\n\t\t\t\t\t\t\tinstr_buf,\n\t\t\t\t\t\t\tbochs_log+i);\n\t\tif (isize <= remainsInPage) {\n\t\t  i=strlen(bochs_log);\n\t\t  bochs_log[i++] = ' ';\n\t\t  bochs_log[i++] = ':';\n\t\t  bochs_log[i++] = ' ';\n\t\t  for (unsigned j=0; j<isize; j++) {\n\t\t\tbochs_log[i++] = letters[(instr_buf[j] >> 4) & 0xf];\n\t\t\tbochs_log[i++] = letters[(instr_buf[j] >> 0) & 0xf];\n\t\t\tbochs_log[i++] = ' ';\n\t\t  }\n\t\t}\n\t\tbochs_log[blidx = i] = 0;\n\t\treturn isize;\n\t}\n\n\tvoid\n\tforceStopRunning(void)\n\t{\n\t\tif (prevInterruptCheckChain)\n\t\t\tprevInterruptCheckChain();\n\t\tbx_pc_system.kill_bochs_request = 1;\n\t\tbx_cpu.async_event = 1;\n\t}\n\n\tint\n\terrorAcorn(void) { return theErrorAcorn; }\n\n\tchar *\n\tgetlog(long *len)\n\t{\n\t\t*len = blidx;\n\t\treturn bochs_log;\n\t}\n} // extern \"C\"\n\n/*\n * With COG we implement the paging access_read/write_linear level here\n * to access data to/from the current Bitmap memory object.  This is hence\n * a simplified subset of cpu/paging.cc.\n */\n#define LOG_THIS BX_CPU_THIS_PTR\n\n#define BX_PHY_ADDRESS_MASK ((((Bit64u)(1)) << BX_PHY_ADDRESS_WIDTH) - 1)\n\n#define BX_PHY_ADDRESS_RESERVED_BITS \\\n      (~BX_PHY_ADDRESS_MASK & BX_CONST64(0xfffffffffffff))\n\n// bit [11] of the TLB lpf used for TLB_HostPtr valid indication\n#define TLB_LPFOf(laddr) AlignedAccessLPFOf(laddr, 0x7ff)\n\n  void BX_CPP_AttrRegparmN(2)\nBX_CPU_C::pagingCR0Changed(Bit32u oldCR0, Bit32u newCR0)\n{\n  // Modification of PG,PE flushes TLB cache according to docs.\n  // Additionally, the TLB strategy is based on the current value of\n  // WP, so if that changes we must also flush the TLB.\n  if ((oldCR0 & 0x80010001) != (newCR0 & 0x80010001))\n    TLB_flush(); // Flush Global entries also.\n}\n\n  void BX_CPP_AttrRegparmN(2)\nBX_CPU_C::pagingCR4Changed(Bit32u oldCR4, Bit32u newCR4)\n{\n  // Modification of PGE,PAE,PSE flushes TLB cache according to docs.\n  if ((oldCR4 & 0x000000b0) != (newCR4 & 0x000000b0))\n    TLB_flush(); // Flush Global entries also.\n\n}\n\n  void BX_CPP_AttrRegparmN(1)\nBX_CPU_C::SetCR3(bx_address val)\n{\n  // flush TLB even if value does not change\n#if BX_SUPPORT_GLOBAL_PAGES\n  if (BX_CPU_THIS_PTR cr4.get_PGE())\n    TLB_flushNonGlobal(); // Don't flush Global entries.\n  else\n#endif\n    TLB_flush();          // Flush Global entries also.\n\n  {\n#if BX_PHY_ADDRESS_WIDTH == 32\n    if (val & BX_CONST64(0x000fffff00000000)) {\n      BX_PANIC((\"SetCR3() 0x%08x%08x: Only 32 bit physical address space is emulated !\", GET32H(val), GET32L(val)));\n    }\n#endif\n    if (val & BX_PHY_ADDRESS_RESERVED_BITS) {\n      BX_ERROR((\"SetCR3(): Attempt to write to reserved bits of CR3\"));\n      exception(BX_GP_EXCEPTION, 0, 0);\n    }\n    BX_CPU_THIS_PTR cr3_masked = val & BX_CONST64(0x000ffffffffff000);\n  }\n\n  BX_CPU_THIS_PTR cr3 = val;\n}\n\n// Called to initialize the TLB upon startup.\n// Unconditional initialization of all TLB entries.\nvoid BX_CPU_C::TLB_init(void)\n{\n  TLB_flush();\n}\n\nvoid BX_CPU_C::TLB_flush(void)\n{\n}\n\nvoid BX_CPU_C::TLB_invlpg(bx_address laddr)\n{\n}\n\nvoid BX_CPP_AttrRegparmN(1) BX_CPU_C::INVLPG(bxInstruction_c* i)\n{\n#if BX_CPU_LEVEL >= 4\n    BX_ERROR((\"INVLPG: priviledge check failed, generate #GP(0)\"));\n    exception(BX_GP_EXCEPTION, 0, 0);\n#else\n\tBX_INFO((\"INVLPG: required i486, use --enable-cpu=4 option\"));\n\texception(BX_UD_EXCEPTION, 0, 0);\n#endif\n}\n\n// error checking order - page not present, reserved bits, protection\n#define ERROR_NOT_PRESENT       0x00\n#define ERROR_PROTECTION        0x01\n#define ERROR_RESERVED          0x08\n#define ERROR_CODE_ACCESS       0x10\n\n/* PSE PDE4M: bits [21:17] */\n#define PAGING_PSE_PDE4M_RESERVED_BITS \\\n    (BX_PHY_ADDRESS_RESERVED_BITS | BX_CONST64(0x003E0000))\n\n// Translate a linear address to a physical address\nbx_phy_address BX_CPU_C::translate_linear(bx_address laddr, unsigned curr_pl, unsigned rw, unsigned access_type)\n{\n  return laddr;\n}\n\n#if BX_DEBUGGER || BX_DISASM || BX_INSTRUMENTATION || BX_GDBSTUB\nbx_bool BX_CPU_C::dbg_xlate_linear2phy(bx_address laddr, bx_phy_address *phy)\n{\n    *phy = (bx_phy_address) laddr;\n    return 1;\n}\n#endif\n\nvoid BX_CPU_C::access_write_linear(bx_address laddr, unsigned len, unsigned curr_pl, void *data)\n{\n#if BX_X86_DEBUGGER\n  hwbreakpoint_match(laddr, len, BX_WRITE);\n#endif\n\n\tif (laddr < minWriteAddress\n\t || laddr + len > theMemorySize)\n\t\tlongjmp(bx_cpu.jmp_buf_env,MemoryBoundsError);\n\tmemcpy(theMemory + laddr, data, len);\n}\n\nvoid BX_CPU_C::access_read_linear(bx_address laddr, unsigned len, unsigned curr_pl, unsigned xlate_rw, void *data)\n{\n  BX_ASSERT(xlate_rw == BX_READ || xlate_rw == BX_RW);\n\n\tif (laddr < minReadAddress\n\t || laddr + len > theMemorySize)\n\t\tlongjmp(bx_cpu.jmp_buf_env,MemoryBoundsError);\n\tlast_read_address = laddr; /* for RMW write cycles below */\n\tmemcpy(data, theMemory + laddr, len);\n}\n\n/*\n * With COG we implement the paging access_read/write_linear level here\n * to access data to/from the current Bitmap memory object.  This is hence\n * a simplified subset of the RMW operations in cpu/access32.cc\n */\n  void BX_CPP_AttrRegparmN(1)\nBX_CPU_C::write_RMW_virtual_byte(Bit8u val8)\n{\n\tif (last_read_address == (bx_address)-1)\n\t\tlongjmp(bx_cpu.jmp_buf_env,PanicError);\n\tmemcpy(theMemory + last_read_address, &val8, 1);\n\tlast_read_address = (bx_address)-1;\n}\n\n  void BX_CPP_AttrRegparmN(1)\nBX_CPU_C::write_RMW_virtual_word(Bit16u val16)\n{\n\tif (last_read_address == (bx_address)-1)\n\t\tlongjmp(bx_cpu.jmp_buf_env,PanicError);\n\tmemcpy(theMemory + last_read_address, &val16, 2);\n\tlast_read_address = (bx_address)-1;\n}\n\n  void BX_CPP_AttrRegparmN(1)\nBX_CPU_C::write_RMW_virtual_dword(Bit32u val32)\n{\n\tif (last_read_address == (bx_address)-1)\n\t\tlongjmp(bx_cpu.jmp_buf_env,PanicError);\n\tmemcpy(theMemory + last_read_address, &val32, 4);\n\tlast_read_address = (bx_address)-1;\n}\n\n  void BX_CPP_AttrRegparmN(1)\nBX_CPU_C::write_RMW_virtual_qword(Bit64u val64)\n{\n\tif (last_read_address == (bx_address)-1)\n\t\tlongjmp(bx_cpu.jmp_buf_env,PanicError);\n\tmemcpy(theMemory + last_read_address, &val64, 8);\n\tlast_read_address = (bx_address)-1;\n}\n\n\n// Cut-down parts of memory/misc_mem.cc for cpu/debugstuff.cc\nbx_bool BX_MEM_C::dbg_fetch_mem(BX_CPU_C *cpu, bx_phy_address addr, unsigned len, Bit8u *buf)\n{\n\tif (addr + len > theMemorySize)\n\t\treturn 0;\n\n\tmemcpy(buf, theMemory + addr, len);\n\treturn 1;\n}\n\n// Cut-down cpu/smm.cc\nvoid BX_CPP_AttrRegparmN(1)\nBX_CPU_C::RSM(bxInstruction_c *i)\n{\n\tBX_ERROR((\"BX_CPU_C::RSM not yet implemented\"));\n\ttheErrorAcorn = UnsupportedOperationError;\n\tlongjmp(bx_cpu.jmp_buf_env,1);\n}\n\nvoid\nBX_CPU_C::enter_system_management_mode(void)\n{\n\tBX_ERROR((\"BX_CPU_C::enter_system_management_mode not yet implemented\"));\n\ttheErrorAcorn = UnsupportedOperationError;\n\tlongjmp(bx_cpu.jmp_buf_env,1);\n}\n\n// Cut-down cpu/io_pro.cc\n  Bit32u BX_CPP_AttrRegparmN(2)\nbx_devices_c::inp(Bit16u addr, unsigned io_len)\n{\n\tBX_ERROR((\"BX_CPU_C::inp not yet implemented\"));\n\ttheErrorAcorn = UnsupportedOperationError;\n\tlongjmp(bx_cpu.jmp_buf_env,1);\n\treturn 0;\n}\n\n  void BX_CPP_AttrRegparmN(3)\nbx_devices_c::outp(Bit16u addr, Bit32u value, unsigned io_len)\n{\n\tBX_ERROR((\"BX_CPU_C::outp not yet implemented\"));\n\ttheErrorAcorn = UnsupportedOperationError;\n\tlongjmp(bx_cpu.jmp_buf_env,1);\n}\n\n// Cut-down gui/siminterface.cc\n\nstatic logfunctions thePluginLog;\nlogfunctions *pluginlog = &thePluginLog;\n\n// Dummy SIM object; we don't use the SIM interface or libgui.a\nbx_simulator_interface_c *SIM = NULL;\n\n#undef LOG_THIS\n#define LOG_THIS bx_pc_system.\n\n// Dummy pc_system object; we don't have a pc, but this contains the\n//  bx_pc_system.kill_bochs_request flag we use to break out of loops.\nbx_pc_system_c bx_pc_system;\n\n// constructor\nbx_pc_system_c::bx_pc_system_c()\n{\n  BX_ASSERT(numTimers == 0);\n\n  // Timer[0] is the null timer.  It is initialized as a special\n  // case here.  It should never be turned off or modified, and its\n  // duration should always remain the same.\n  ticksTotal = 0; // Reset ticks since emulator started.\n  timer[0].inUse      = 1;\n  timer[0].period     = 0xffffffff; // see NullTimerInterval in pc_system.cc\n  timer[0].active     = 1;\n  timer[0].continuous = 1;\n  timer[0].funct      = (void (*)(void *))0; // see nullTimer in pc_system.cc\n  timer[0].this_ptr   = this;\n  numTimers = 1; // So far, only the nullTimer.\n  kill_bochs_request = 0;\n}\n\nint bx_pc_system_c::Reset(unsigned type)\n{\n  // type is BX_RESET_HARDWARE or BX_RESET_SOFTWARE\n  BX_INFO((\"bx_pc_system_c::Reset(%s) called\",type==BX_RESET_HARDWARE?\"HARDWARE\":\"SOFTWARE\"));\n\n  // Always reset cpu\n  for (int i=0; i<BX_SMP_PROCESSORS; i++) {\n    BX_CPU(i)->reset(type);\n  }\n\n  return(0);\n}\n\n#undef LOG_THIS\n\n// Cut-down bx_devices (see iodev/devices.cc)\nbx_devices_c bx_devices;\n\n// constructor for bx_devices_c\nbx_devices_c::bx_devices_c()\n{\n  settype(DEVLOG);\n\n  read_port_to_handler = NULL;\n  write_port_to_handler = NULL;\n  io_read_handlers.next = NULL;\n  io_read_handlers.handler_name = NULL;\n  io_write_handlers.next = NULL;\n  io_write_handlers.handler_name = NULL;\n\n  for (unsigned i=0; i < BX_MAX_IRQS; i++)\n    irq_handler_name[i] = NULL;\n}\n\nbx_devices_c::~bx_devices_c()\n{\n  // nothing needed for now\n  timer_handle = BX_NULL_TIMER_HANDLE;\n}\n\n// Versions of the iofunctions that libcpu uses that log to a buffer\n//\n// logfunctions::put(char const*)\n// logfunctions::info(char const*, ...)\n// logfunctions::panic(char const*, ...)\n// logfunctions::ldebug(char const*, ...)\n// logfunctions::settype(int)\n// logfunctions::logfunctions()\n// logfunctions::~logfunctions()\n// logfunctions::error(char const*, ...)\n\nlogfunctions::logfunctions(void) {}\n\nlogfunctions::~logfunctions() {}\n\n#define sprintlog(fmt, ap) \\\ndo { \\\n\tva_list ap; \\\n\tva_start(ap, fmt); \\\n\tint len = vsnprintf(bochs_log + blidx, LOGSIZE-blidx, fmt, ap); \\\n\tif ((blidx = min(blidx + len, LOGSIZE)) < LOGSIZE - 1) { \\\n\t\tbochs_log[blidx]   = '\\r'; \\\n\t\tbochs_log[++blidx] = 0; \\\n\t} \\\n} while (0)\n\nvoid logfunctions::put(const char *p)\n{\n\tint len = strlen(p);\n\tstrncpy(bochs_log + blidx, p, min(len,LOGSIZE-blidx));\n\tblidx = min(blidx + len, LOGSIZE);\n\tbochs_log[blidx] = 0;\n}\n\nvoid logfunctions::settype(int t) {}\n\nvoid logfunctions::info(const char *fmt, ...) { sprintlog(fmt,ap); }\n\nvoid logfunctions::error(const char *fmt, ...) { sprintlog(fmt,ap); }\n\nvoid logfunctions::panic(const char *fmt, ...)\n{\n\tsprintlog(fmt,ap);\n\tlongjmp(bx_cpu.jmp_buf_env,PanicError);\n}\n\nvoid logfunctions::ldebug(const char *fmt, ...) { sprintlog(fmt,ap); }\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/CroquetPlugin/CroquetPlugin.h",
    "content": "#ifndef CROQUET_PLUGIN_H\r\n#define CROQUET_PLUGIN_H\r\n/* CroquetPlugin.h include file */\r\n\r\n/* Include MD5 code for primitives */\r\n#include \"md5.h\"\r\n\r\n/* \r\n   ioGatherEntropy:\r\n   Fill a buffer with high-quality entropy. Return true on success, false \r\n   if no high-quality source is available or if the source couldn't be \r\n   used for some reason. On *nix platforms, the Right Thing To Do is\r\n   to use /dev/urandom for filling the buffer so the implementation gets\r\n   trivial (open /dev/urandom, read bufSize bytes, return true).\r\n   Arguments:\r\n     bufPtr  - the buffer to fill\r\n     bufSize - the number of bytes to place in the buffer\r\n   Return value:\r\n     Non-zero if successful, zero otherwise.\r\n*/\r\nint ioGatherEntropy(char *bufPtr, int bufSize);\r\n\r\n/* Imported from tribox.c */\r\nint triBoxOverlap(float minCorner[3],float maxCorner[3],\r\n\t\t  float vert0[3], float vert1[3], float vert2[3]);\r\n\r\n#endif /* CROQUET_PLUGIN_H */\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/CroquetPlugin/CroquetPlugin.st",
    "content": "'From Croquet1.0beta of 24 March 2006 [latest update: #6665] on 26 March 2006 at 8:26:17 pm'!\rInterpreterPlugin subclass: #CroquetPlugin\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'VMMaker-Plugins'!\r!CroquetPlugin commentStamp: '<historical>' prior: 0!\rAn assorted list of useful primitives for Croquet.!\r\r\r!CroquetPlugin methodsFor: 'primitives' stamp: 'ar 3/26/2006 19:59'!\rprimitiveARC4Transform\r\t\"Perform an ARC4 transform of input.\r\tArguments:\r\t\tbuffer\t\t<ByteArray> transformed data\r\t\tstartIndex \t<Integer>\tstart of transform\r\t\tstopIndex\t<Integer>\tend of transform\r\t\tm\t\t\t<ByteArray>\tkey stream data\r\t\tx\t\t\t<Integer>\tkey state value\r\t\ty\t\t\t<Integer>\tkey state value\r\tReturn value:\r\t\tx@y - updated key state value\r\t\"\r\r\t| y x mOop stopIndex startIndex bufOop bufSize buffer a m b mask ptOop xOop yOop |\r\tself export: true.\r\tself var: 'buffer' type: 'unsigned char *'.\r\tself var: 'm' type: 'unsigned char *'.\r\r\tinterpreterProxy methodArgumentCount = 6\r\t\tifFalse:[^interpreterProxy primitiveFail].\r\t\"pick up arguments\"\r\ty := interpreterProxy stackIntegerValue: 0.\r\tx := interpreterProxy stackIntegerValue: 1.\r\tmOop := interpreterProxy stackObjectValue: 2.\r\tstopIndex := interpreterProxy stackIntegerValue: 3.\r\tstartIndex := interpreterProxy stackIntegerValue: 4.\r\tbufOop := interpreterProxy stackObjectValue: 5.\r\tinterpreterProxy failed ifTrue:[^nil].\r\t((interpreterProxy isBytes: mOop) and:[interpreterProxy isBytes: bufOop])\r\t\tifFalse:[^interpreterProxy primitiveFail].\r\t(interpreterProxy byteSizeOf: mOop) = 256\r\t\tifFalse:[^interpreterProxy primitiveFail].\r\tbufSize := interpreterProxy byteSizeOf: bufOop.\r\t(startIndex > 0 and:[startIndex <= bufSize])\r\t\tifFalse:[^interpreterProxy primitiveFail].\r\t(stopIndex > startIndex and:[stopIndex <= bufSize])\r\t\tifFalse:[^interpreterProxy primitiveFail].\r\tm := interpreterProxy firstIndexableField: mOop.\r\tbuffer := interpreterProxy firstIndexableField: bufOop.\r\tstartIndex-1 to: stopIndex-1 do:[:i|\r\t\tx := (x + 1) bitAnd: 255.\r\t\ta := m at: x.\r\t\ty := (y + a) bitAnd: 255.\r\t\tb := m at: y.\r\t\tm at: x put: b.\r\t\tm at: y put: a.\r\t\tmask := m at: ((a + b) bitAnd: 255).\r\t\tbuffer at: i put: ((buffer at: i) bitXor: mask).\r\t].\r\tptOop := interpreterProxy instantiateClass: interpreterProxy classPoint indexableSize: 0.\r\tinterpreterProxy pushRemappableOop: ptOop.\r\txOop := interpreterProxy positive32BitIntegerFor: x.\r\tinterpreterProxy pushRemappableOop: xOop.\r\tyOop := interpreterProxy positive32BitIntegerFor: x.\r\txOop := interpreterProxy popRemappableOop.\r\tptOop := interpreterProxy popRemappableOop.\r\tinterpreterProxy storePointer: 0 ofObject: ptOop withValue: xOop.\r\tinterpreterProxy storePointer: 1 ofObject: ptOop withValue: yOop.\r\tinterpreterProxy pop: interpreterProxy methodArgumentCount + 1.\r\tinterpreterProxy push: ptOop.\r! !\r\r!CroquetPlugin methodsFor: 'primitives' stamp: 'ar 3/26/2006 19:45'!\rprimitiveMD5Transform\r\t\"Perform an MD5 transform of input\"\r\t| bufOop hashOop hash buffer |\r\tself export: true.\r\tself var: 'hash' type: 'unsigned int *'.\r\tself var: 'buffer' type: 'unsigned int *'.\r\tinterpreterProxy methodArgumentCount = 2 \r\t\tifFalse:[^interpreterProxy primitiveFail].\r\r\thashOop := interpreterProxy stackObjectValue: 0.\r\t((interpreterProxy isWords: hashOop) and:[(interpreterProxy slotSizeOf: hashOop) = 4])\r\t\tifFalse:[^interpreterProxy primitiveFail].\r\thash := interpreterProxy firstIndexableField: hashOop.\r\r\tbufOop := interpreterProxy stackObjectValue: 1.\r\t((interpreterProxy isWords: bufOop) and:[(interpreterProxy slotSizeOf: bufOop) = 16])\r\t\tifFalse:[^interpreterProxy primitiveFail].\r\tbuffer := interpreterProxy firstIndexableField: bufOop.\r\r\r\tself cCode:'MD5Transform(hash, buffer)' inSmalltalk:[\r\t\thash. buffer. \r\t\t^interpreterProxy primitiveFail].\r\t\"Pop args; return buffer\"\r\tinterpreterProxy pop: interpreterProxy methodArgumentCount+1.\r\tinterpreterProxy push: bufOop.! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rCroquetPlugin class\r\tinstanceVariableNames: ''!\r\r!CroquetPlugin class methodsFor: 'as yet unclassified' stamp: 'ar 3/26/2006 19:37'!\rhasHeaderFile\r\t\"If there is a single intrinsic header file to be associated with the plugin, here is where you want to flag\"\r\t^true! !\r\r!CroquetPlugin class methodsFor: 'as yet unclassified' stamp: 'ar 3/26/2006 19:37'!\rrequiresCrossPlatformFiles\r\t\"default is ok for most, any plugin needing platform specific files must say so\"\r\t^true! !\r"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/CroquetPlugin/md5.h",
    "content": "/*\r\n * MD5 transform algorithm, taken from code written by Colin Plumb,\r\n * and put into the public domain\r\n *\r\n */\r\n\r\n/* The four core functions - F1 is optimized somewhat */\r\n\r\n/* #define F1(x, y, z) (x & y | ~x & z) */\r\n#define F1(x, y, z) (z ^ (x & (y ^ z)))\r\n#define F2(x, y, z) F1(z, x, y)\r\n#define F3(x, y, z) (x ^ y ^ z)\r\n#define F4(x, y, z) (y ^ (x | ~z))\r\n\r\n/* This is the central step in the MD5 algorithm. */\r\n#define MD5STEP(f, w, x, y, z, data, s) \\\r\n\t( w += f(x, y, z) + data,  w = w<<s | w>>(32-s),  w += x )\r\n\r\n/*\r\n * The core of the MD5 algorithm, this alters an existing MD5 hash to\r\n * reflect the addition of 16 longwords of new data.  MD5Update blocks\r\n * the data and converts bytes into longwords for this routine.\r\n */\r\nstatic void MD5Transform(unsigned int buf[4],\r\n\t\t\t unsigned int const in[16])\r\n{\r\n\tunsigned int a, b, c, d;\r\n\r\n\ta = buf[0];\r\n\tb = buf[1];\r\n\tc = buf[2];\r\n\td = buf[3];\r\n\r\n\tMD5STEP(F1, a, b, c, d, in[ 0]+0xd76aa478,  7);\r\n\tMD5STEP(F1, d, a, b, c, in[ 1]+0xe8c7b756, 12);\r\n\tMD5STEP(F1, c, d, a, b, in[ 2]+0x242070db, 17);\r\n\tMD5STEP(F1, b, c, d, a, in[ 3]+0xc1bdceee, 22);\r\n\tMD5STEP(F1, a, b, c, d, in[ 4]+0xf57c0faf,  7);\r\n\tMD5STEP(F1, d, a, b, c, in[ 5]+0x4787c62a, 12);\r\n\tMD5STEP(F1, c, d, a, b, in[ 6]+0xa8304613, 17);\r\n\tMD5STEP(F1, b, c, d, a, in[ 7]+0xfd469501, 22);\r\n\tMD5STEP(F1, a, b, c, d, in[ 8]+0x698098d8,  7);\r\n\tMD5STEP(F1, d, a, b, c, in[ 9]+0x8b44f7af, 12);\r\n\tMD5STEP(F1, c, d, a, b, in[10]+0xffff5bb1, 17);\r\n\tMD5STEP(F1, b, c, d, a, in[11]+0x895cd7be, 22);\r\n\tMD5STEP(F1, a, b, c, d, in[12]+0x6b901122,  7);\r\n\tMD5STEP(F1, d, a, b, c, in[13]+0xfd987193, 12);\r\n\tMD5STEP(F1, c, d, a, b, in[14]+0xa679438e, 17);\r\n\tMD5STEP(F1, b, c, d, a, in[15]+0x49b40821, 22);\r\n\r\n\tMD5STEP(F2, a, b, c, d, in[ 1]+0xf61e2562,  5);\r\n\tMD5STEP(F2, d, a, b, c, in[ 6]+0xc040b340,  9);\r\n\tMD5STEP(F2, c, d, a, b, in[11]+0x265e5a51, 14);\r\n\tMD5STEP(F2, b, c, d, a, in[ 0]+0xe9b6c7aa, 20);\r\n\tMD5STEP(F2, a, b, c, d, in[ 5]+0xd62f105d,  5);\r\n\tMD5STEP(F2, d, a, b, c, in[10]+0x02441453,  9);\r\n\tMD5STEP(F2, c, d, a, b, in[15]+0xd8a1e681, 14);\r\n\tMD5STEP(F2, b, c, d, a, in[ 4]+0xe7d3fbc8, 20);\r\n\tMD5STEP(F2, a, b, c, d, in[ 9]+0x21e1cde6,  5);\r\n\tMD5STEP(F2, d, a, b, c, in[14]+0xc33707d6,  9);\r\n\tMD5STEP(F2, c, d, a, b, in[ 3]+0xf4d50d87, 14);\r\n\tMD5STEP(F2, b, c, d, a, in[ 8]+0x455a14ed, 20);\r\n\tMD5STEP(F2, a, b, c, d, in[13]+0xa9e3e905,  5);\r\n\tMD5STEP(F2, d, a, b, c, in[ 2]+0xfcefa3f8,  9);\r\n\tMD5STEP(F2, c, d, a, b, in[ 7]+0x676f02d9, 14);\r\n\tMD5STEP(F2, b, c, d, a, in[12]+0x8d2a4c8a, 20);\r\n\r\n\tMD5STEP(F3, a, b, c, d, in[ 5]+0xfffa3942,  4);\r\n\tMD5STEP(F3, d, a, b, c, in[ 8]+0x8771f681, 11);\r\n\tMD5STEP(F3, c, d, a, b, in[11]+0x6d9d6122, 16);\r\n\tMD5STEP(F3, b, c, d, a, in[14]+0xfde5380c, 23);\r\n\tMD5STEP(F3, a, b, c, d, in[ 1]+0xa4beea44,  4);\r\n\tMD5STEP(F3, d, a, b, c, in[ 4]+0x4bdecfa9, 11);\r\n\tMD5STEP(F3, c, d, a, b, in[ 7]+0xf6bb4b60, 16);\r\n\tMD5STEP(F3, b, c, d, a, in[10]+0xbebfbc70, 23);\r\n\tMD5STEP(F3, a, b, c, d, in[13]+0x289b7ec6,  4);\r\n\tMD5STEP(F3, d, a, b, c, in[ 0]+0xeaa127fa, 11);\r\n\tMD5STEP(F3, c, d, a, b, in[ 3]+0xd4ef3085, 16);\r\n\tMD5STEP(F3, b, c, d, a, in[ 6]+0x04881d05, 23);\r\n\tMD5STEP(F3, a, b, c, d, in[ 9]+0xd9d4d039,  4);\r\n\tMD5STEP(F3, d, a, b, c, in[12]+0xe6db99e5, 11);\r\n\tMD5STEP(F3, c, d, a, b, in[15]+0x1fa27cf8, 16);\r\n\tMD5STEP(F3, b, c, d, a, in[ 2]+0xc4ac5665, 23);\r\n\r\n\tMD5STEP(F4, a, b, c, d, in[ 0]+0xf4292244,  6);\r\n\tMD5STEP(F4, d, a, b, c, in[ 7]+0x432aff97, 10);\r\n\tMD5STEP(F4, c, d, a, b, in[14]+0xab9423a7, 15);\r\n\tMD5STEP(F4, b, c, d, a, in[ 5]+0xfc93a039, 21);\r\n\tMD5STEP(F4, a, b, c, d, in[12]+0x655b59c3,  6);\r\n\tMD5STEP(F4, d, a, b, c, in[ 3]+0x8f0ccc92, 10);\r\n\tMD5STEP(F4, c, d, a, b, in[10]+0xffeff47d, 15);\r\n\tMD5STEP(F4, b, c, d, a, in[ 1]+0x85845dd1, 21);\r\n\tMD5STEP(F4, a, b, c, d, in[ 8]+0x6fa87e4f,  6);\r\n\tMD5STEP(F4, d, a, b, c, in[15]+0xfe2ce6e0, 10);\r\n\tMD5STEP(F4, c, d, a, b, in[ 6]+0xa3014314, 15);\r\n\tMD5STEP(F4, b, c, d, a, in[13]+0x4e0811a1, 21);\r\n\tMD5STEP(F4, a, b, c, d, in[ 4]+0xf7537e82,  6);\r\n\tMD5STEP(F4, d, a, b, c, in[11]+0xbd3af235, 10);\r\n\tMD5STEP(F4, c, d, a, b, in[ 2]+0x2ad7d2bb, 15);\r\n\tMD5STEP(F4, b, c, d, a, in[ 9]+0xeb86d391, 21);\r\n\r\n\tbuf[0] += a;\r\n\tbuf[1] += b;\r\n\tbuf[2] += c;\r\n\tbuf[3] += d;\r\n}\r\n\r\n#undef F1\r\n#undef F2\r\n#undef F3\r\n#undef F4\r\n#undef MD5STEP\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/CroquetPlugin/tribox.c",
    "content": "/********************************************************/\r\n/* AABB-triangle overlap test code                      */\r\n/* by Tomas Akenine-Mller                              */\r\n/* Function: int triBoxOverlap(float boxcenter[3],      */\r\n/*          float boxhalfsize[3],float triverts[3][3]); */\r\n/* History:                                             */\r\n/*   2001-03-05: released the code in its first version */\r\n/*   2001-06-18: changed the order of the tests, faster */\r\n/*                                                      */\r\n/* Acknowledgement: Many thanks to Pierre Terdiman for  */\r\n/* suggestions and discussions on how to optimize code. */\r\n/* Thanks to David Hunt for finding a \">=\"-bug!         */\r\n/********************************************************/\r\n#include <math.h>\r\n#include <stdio.h>\r\n\r\n#define X 0\r\n#define Y 1\r\n#define Z 2\r\n\r\n#define CROSS(dest,v1,v2) \\\r\n          dest[0]=v1[1]*v2[2]-v1[2]*v2[1]; \\\r\n          dest[1]=v1[2]*v2[0]-v1[0]*v2[2]; \\\r\n          dest[2]=v1[0]*v2[1]-v1[1]*v2[0]; \r\n\r\n#define DOT(v1,v2) (v1[0]*v2[0]+v1[1]*v2[1]+v1[2]*v2[2])\r\n\r\n#define SUB(dest,v1,v2) \\\r\n          dest[0]=v1[0]-v2[0]; \\\r\n          dest[1]=v1[1]-v2[1]; \\\r\n          dest[2]=v1[2]-v2[2]; \r\n\r\n#define MID(dest,v1,v2) \\\r\n          dest[0]=(v1[0]+v2[0])*0.5; \\\r\n          dest[1]=(v1[1]+v2[1])*0.5; \\\r\n          dest[2]=(v1[2]+v2[2])*0.5; \r\n\r\n#define FINDMINMAX(x0,x1,x2,min,max) \\\r\n  min = max = x0;   \\\r\n  if(x1<min) min=x1;\\\r\n  if(x1>max) max=x1;\\\r\n  if(x2<min) min=x2;\\\r\n  if(x2>max) max=x2;\r\n\r\nint planeBoxOverlap(float normal[3],float vert[3], float maxbox[3])\r\n{\r\n  int q;\r\n  float vmin[3],vmax[3],v;\r\n  for(q=X;q<=Z;q++)\r\n  {\r\n    v = vert[q];\r\n    if(normal[q]>0.0f)\r\n    {\r\n      vmin[q]=-maxbox[q] - v;\r\n      vmax[q]= maxbox[q] - v;\r\n    }\r\n    else\r\n    {\r\n      vmin[q]= maxbox[q] - v;\r\n      vmax[q]=-maxbox[q] - v;\r\n    }\r\n  }\r\n  if(DOT(normal,vmin)> 0.0f) return 0;\r\n  if(DOT(normal,vmax)>=0.0f) return 1;\r\n  \r\n  return 0;\r\n}\r\n\r\n\r\n/*======================== X-tests ========================*/\r\n#define AXISTEST_X01(a, b, fa, fb)\t\t\t   \\\r\n\tp0 = a*v0[Y] - b*v0[Z];\t\t\t       \t   \\\r\n\tp2 = a*v2[Y] - b*v2[Z];\t\t\t       \t   \\\r\n        if(p0<p2) {min=p0; max=p2;} else {min=p2; max=p0;} \\\r\n\trad = fa * boxhalfsize[Y] + fb * boxhalfsize[Z];   \\\r\n\tif(min>rad || max<-rad) return 0;\r\n\r\n#define AXISTEST_X2(a, b, fa, fb)\t\t\t   \\\r\n\tp0 = a*v0[Y] - b*v0[Z];\t\t\t           \\\r\n\tp1 = a*v1[Y] - b*v1[Z];\t\t\t       \t   \\\r\n        if(p0<p1) {min=p0; max=p1;} else {min=p1; max=p0;} \\\r\n\trad = fa * boxhalfsize[Y] + fb * boxhalfsize[Z];   \\\r\n\tif(min>rad || max<-rad) return 0;\r\n\r\n/*======================== Y-tests ========================*/\r\n#define AXISTEST_Y02(a, b, fa, fb)\t\t\t   \\\r\n\tp0 = -a*v0[X] + b*v0[Z];\t\t      \t   \\\r\n\tp2 = -a*v2[X] + b*v2[Z];\t       \t       \t   \\\r\n        if(p0<p2) {min=p0; max=p2;} else {min=p2; max=p0;} \\\r\n\trad = fa * boxhalfsize[X] + fb * boxhalfsize[Z];   \\\r\n\tif(min>rad || max<-rad) return 0;\r\n\r\n#define AXISTEST_Y1(a, b, fa, fb)\t\t\t   \\\r\n\tp0 = -a*v0[X] + b*v0[Z];\t\t      \t   \\\r\n\tp1 = -a*v1[X] + b*v1[Z];\t     \t       \t   \\\r\n        if(p0<p1) {min=p0; max=p1;} else {min=p1; max=p0;} \\\r\n\trad = fa * boxhalfsize[X] + fb * boxhalfsize[Z];   \\\r\n\tif(min>rad || max<-rad) return 0;\r\n\r\n/*======================== Z-tests ========================*/\r\n\r\n#define AXISTEST_Z12(a, b, fa, fb)\t\t\t   \\\r\n\tp1 = a*v1[X] - b*v1[Y];\t\t\t           \\\r\n\tp2 = a*v2[X] - b*v2[Y];\t\t\t       \t   \\\r\n        if(p2<p1) {min=p2; max=p1;} else {min=p1; max=p2;} \\\r\n\trad = fa * boxhalfsize[X] + fb * boxhalfsize[Y];   \\\r\n\tif(min>rad || max<-rad) return 0;\r\n\r\n#define AXISTEST_Z0(a, b, fa, fb)\t\t\t   \\\r\n\tp0 = a*v0[X] - b*v0[Y];\t\t\t\t   \\\r\n\tp1 = a*v1[X] - b*v1[Y];\t\t\t           \\\r\n        if(p0<p1) {min=p0; max=p1;} else {min=p1; max=p0;} \\\r\n\trad = fa * boxhalfsize[X] + fb * boxhalfsize[Y];   \\\r\n\tif(min>rad || max<-rad) return 0;\r\n\r\nint triBoxOverlap(float minCorner[3],float maxCorner[3],\r\n\t\t  float vert0[3], float vert1[3], float vert2[3])\r\n{\r\n\r\n  /*    use separating axis theorem to test overlap between triangle and box */\r\n  /*    need to test for overlap in these directions: */\r\n  /*    1) the {x,y,z}-directions (actually, since we use the AABB of the triangle */\r\n  /*       we do not even need to test these) */\r\n  /*    2) normal of the triangle */\r\n  /*    3) crossproduct(edge from tri, {x,y,z}-directin) */\r\n  /*       this gives 3x3=9 more tests */\r\n   float v0[3],v1[3],v2[3];\r\n   float min,max,p0,p1,p2,rad,fex,fey,fez;  \r\n   float normal[3],e0[3],e1[3],e2[3];\r\n   float boxcenter[3];\r\n   float boxhalfsize[3];\r\n\r\n   MID(boxcenter, minCorner, maxCorner);\r\n   SUB(boxhalfsize, boxcenter, minCorner);\r\n\r\n   /* This is the fastest branch on Sun */\r\n   /* move everything so that the boxcenter is in (0,0,0) */\r\n   SUB(v0,vert0,boxcenter);\r\n   SUB(v1,vert1,boxcenter);\r\n   SUB(v2,vert2,boxcenter);\r\n\r\n   /* compute triangle edges */\r\n   SUB(e0,v1,v0);      /* tri edge 0 */\r\n   SUB(e1,v2,v1);      /* tri edge 1 */\r\n   SUB(e2,v0,v2);      /* tri edge 2 */\r\n\r\n   /* Bullet 3:  */\r\n   /*  test the 9 tests first (this was faster) */\r\n   fex = fabsf(e0[X]);\r\n   fey = fabsf(e0[Y]);\r\n   fez = fabsf(e0[Z]);\r\n   AXISTEST_X01(e0[Z], e0[Y], fez, fey);\r\n   AXISTEST_Y02(e0[Z], e0[X], fez, fex);\r\n   AXISTEST_Z12(e0[Y], e0[X], fey, fex);\r\n\r\n   fex = fabsf(e1[X]);\r\n   fey = fabsf(e1[Y]);\r\n   fez = fabsf(e1[Z]);\r\n   AXISTEST_X01(e1[Z], e1[Y], fez, fey);\r\n   AXISTEST_Y02(e1[Z], e1[X], fez, fex);\r\n   AXISTEST_Z0(e1[Y], e1[X], fey, fex);\r\n\r\n   fex = fabsf(e2[X]);\r\n   fey = fabsf(e2[Y]);\r\n   fez = fabsf(e2[Z]);\r\n   AXISTEST_X2(e2[Z], e2[Y], fez, fey);\r\n   AXISTEST_Y1(e2[Z], e2[X], fez, fex);\r\n   AXISTEST_Z12(e2[Y], e2[X], fey, fex);\r\n\r\n   /* Bullet 1: */\r\n   /*  first test overlap in the {x,y,z}-directions */\r\n   /*  find min, max of the triangle each direction, and test for overlap in */\r\n   /*  that direction -- this is equivalent to testing a minimal AABB around */\r\n   /*  the triangle against the AABB */\r\n\r\n   /* test in X-direction */\r\n   FINDMINMAX(v0[X],v1[X],v2[X],min,max);\r\n   if(min>boxhalfsize[X] || max<-boxhalfsize[X]) return 0;\r\n\r\n   /* test in Y-direction */\r\n   FINDMINMAX(v0[Y],v1[Y],v2[Y],min,max);\r\n   if(min>boxhalfsize[Y] || max<-boxhalfsize[Y]) return 0;\r\n\r\n   /* test in Z-direction */\r\n   FINDMINMAX(v0[Z],v1[Z],v2[Z],min,max);\r\n   if(min>boxhalfsize[Z] || max<-boxhalfsize[Z]) return 0;\r\n\r\n   /* Bullet 2: */\r\n   /*  test if the box intersects the plane of the triangle */\r\n   /*  compute plane equation of triangle: normal*x+d=0 */\r\n   CROSS(normal,e0,e1);\r\n   if(!planeBoxOverlap(normal,v0,boxhalfsize)) return 0;\r\n\r\n   return 1;   /* box and triangle overlaps */\r\n}\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/DropPlugin/DropPlugin.h",
    "content": "/* drop support primitives */\n\n/* module initialization/shutdown */\nint dropInit(void);\nint dropShutdown(void);\n\nchar* dropRequestFileName(int dropIndex); /* return name of file or NULL if error */\n/* note: dropRequestFileHandle needs to bypass plugin security checks when implemented */\nint dropRequestFileHandle(int dropIndex); /* return READ-ONLY file handle OOP or nilObject if error */\nint sqSecFileAccessCallback(void *);\nvoid sqSetNumberOfDropFiles(int numberOfFiles);\nvoid sqSetFileInformation(int dropIndex, void *dropFile);\nvoid sqDragTriggerData(char *aByteArray, int dataLength, char *aFormat, int formatLength);\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/ExampleSurfacePlugin/ExampleSurfacePlugin.h",
    "content": "/* example surface plugin header file */\r\nint memInitialize(void);\r\nint memCreateSurfaceWidthHeightDepth(int width, int height, int depth);\r\nint memDestroySurface(int id);\r\nint memGetSurfaceWidth(int id);\r\nint memGetSurfaceHeight(int id);\r\nint memGetSurfaceDepth(int id);\r\n\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/ExampleSurfacePlugin/SurfacePlugin-Examples.st",
    "content": "Form subclass: #ExampleSurface\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'SurfacePlugin-Examples'!\r!ExampleSurface commentStamp: '<historical>' prior: 0!\rAn example surface for the example surface plugin.!\r\r\r!ExampleSurface methodsFor: 'initialize' stamp: 'ar 4/26/2006 13:55'!\rdestroy\r\t\"Free my bits\"\r\tself primitiveDestroySurface: bits.\r! !\r\r\r!ExampleSurface methodsFor: 'private' stamp: 'ar 4/26/2006 13:54'!\rfromHandle: h\r\t\"Create me from the given handle\"\r\twidth := self primitiveGetSurfaceWidth: h.\r\theight := self primitiveGetSurfaceHeight: h.\r\tdepth := self primitiveGetSurfaceDepth: h.\r\tbits := h.! !\r\r!ExampleSurface methodsFor: 'private' stamp: 'ar 4/26/2006 13:53'!\rprimitiveCreateSurfaceWidth: width height: height depth: bitsPerPixel\r\t<primitive: 'primitiveCreateSurface' module: 'ExampleSurfacePlugin'>\r\t^self primitiveFailed! !\r\r!ExampleSurface methodsFor: 'private' stamp: 'ar 4/26/2006 13:55'!\rprimitiveDestroySurface: h\r\t<primitive: 'primitiveDestroySurface' module: 'ExampleSurfacePlugin'>\r\t^self primitiveFailed! !\r\r!ExampleSurface methodsFor: 'private' stamp: 'ar 4/26/2006 13:54'!\rprimitiveGetSurfaceBits: h\r\t<primitive: 'primitiveGetSurfaceBits' module: 'ExampleSurfacePlugin'>\r\t^self primitiveFailed! !\r\r!ExampleSurface methodsFor: 'private' stamp: 'ar 4/26/2006 13:54'!\rprimitiveGetSurfaceDepth: h\r\t<primitive: 'primitiveGetSurfaceDepth' module: 'ExampleSurfacePlugin'>\r\t^self primitiveFailed! !\r\r!ExampleSurface methodsFor: 'private' stamp: 'ar 4/26/2006 13:54'!\rprimitiveGetSurfaceHeight: h\r\t<primitive: 'primitiveGetSurfaceHeight' module: 'ExampleSurfacePlugin'>\r\t^self primitiveFailed! !\r\r!ExampleSurface methodsFor: 'private' stamp: 'ar 4/26/2006 13:54'!\rprimitiveGetSurfaceWidth: h\r\t<primitive: 'primitiveGetSurfaceWidth' module: 'ExampleSurfacePlugin'>\r\t^self primitiveFailed! !\r\r!ExampleSurface methodsFor: 'private' stamp: 'ar 4/26/2006 13:52'!\rsetExtent: extent depth: bitsPerPixel\r\t\"Create a virtual bit map with the given extent and bitsPerPixel.\"\r\twidth := extent x asInteger.\r\twidth < 0 ifTrue: [width := 0].\r\theight := extent y asInteger.\r\theight < 0 ifTrue: [height := 0].\r\tdepth := bitsPerPixel.\r\tbits := self primitiveCreateSurfaceWidth: width height: height depth: bitsPerPixel.! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rExampleSurface class\r\tinstanceVariableNames: ''!\r\r!ExampleSurface class methodsFor: 'examples' stamp: 'ar 4/26/2006 14:00'!\rexample\t\t\t\"ExampleSurface example\"\r\t\"Create a new example surface; then one from its handle; then copy between them etc\"\r\t| formA formB |\r\tformA := self extent: 100@100 depth: (Display depth max: 8).\r\t\"Copy from display to external form\"\r\tDisplay displayOn: formA at: 0@0.\r\t\"Copy from external form to display\"\r\tformA displayOn: Display at: 0@0.\r\t\"Create a form from a handle - this is literally the same form!!\"\r\tformB := self new fromHandle: formA bits.\r\t\"Display right next to formA\"\r\tformB displayOn: Display at: formA width@0.\r\t\"Do an overlapping blt between formA and formB\"\r\tformA displayOn: formB at: formA extent // 2.\r\t\"Show the result\"\r\tformA displayOn: Display at: 0@0.\r\tformB displayOn: Display at: formA width@0.\r! !\r\r\f\rInterpreterPlugin subclass: #ExampleSurfacePlugin\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'SurfacePlugin-Examples'!\r!ExampleSurfacePlugin commentStamp: '<historical>' prior: 0!\rThis is an example for using the surface plugin.!\r\r\r!ExampleSurfacePlugin methodsFor: 'initialize' stamp: 'ar 4/26/2006 13:46'!\rinitialiseModule\r\tself export: true.\r\t^self memInitialize! !\r\r\r!ExampleSurfacePlugin methodsFor: 'primitives' stamp: 'ar 4/26/2006 13:50'!\rprimitiveCreateSurface\r\t\"Primitive. Create a surface of the given width/height/depth. Answer the handle.\"\r\t| depth height width id |\r\tself export: true.\r\tinterpreterProxy methodArgumentCount = 3 \r\t\tifFalse:[^interpreterProxy primitiveFail].\r\tdepth := interpreterProxy stackIntegerValue: 0.\r\theight := interpreterProxy stackIntegerValue: 1.\r\twidth := interpreterProxy stackIntegerValue: 2.\r\tinterpreterProxy failed ifTrue:[^nil]. \"invalid arguments\"\r\t\"make sure depth is power of two\"\r\t(depth bitAnd: depth-1) = 0 \r\t\tifFalse:[^interpreterProxy primitiveFail].\r\t\"Create bitmap surface\"\r\tid := self memCreateSurfaceWidth: width Height: height Depth: depth.\r\tid < 0 ifTrue:[^interpreterProxy primitiveFail].\r\tinterpreterProxy pop: interpreterProxy methodArgumentCount+1. \"args+rcvr\"\r\tinterpreterProxy pushInteger: id.! !\r\r!ExampleSurfacePlugin methodsFor: 'primitives' stamp: 'ar 4/26/2006 13:49'!\rprimitiveDestroySurface\r\t\"Primitive. Destroy a surface.\"\r\t| id ok |\r\tself export: true.\r\tinterpreterProxy methodArgumentCount = 1\r\t\tifFalse:[^interpreterProxy primitiveFail].\r\tid := interpreterProxy stackIntegerValue: 0.\r\tinterpreterProxy failed ifTrue:[^nil]. \"invalid arguments\"\r\tok := self memDestroySurface: id.\r\tinterpreterProxy pop: interpreterProxy methodArgumentCount+1. \"args + rcvr\"\r\tinterpreterProxy pushBool: ok.! !\r\r!ExampleSurfacePlugin methodsFor: 'primitives' stamp: 'ar 4/26/2006 13:49'!\rprimitiveGetSurfaceBits\r\t\"Primitive. Return the witdth of a surface.\"\r\t| id result |\r\tself export: true.\r\tinterpreterProxy methodArgumentCount = 1\r\t\tifFalse:[^interpreterProxy primitiveFail].\r\tid := interpreterProxy stackIntegerValue: 0.\r\tinterpreterProxy failed ifTrue:[^nil]. \"invalid arguments\"\r\tresult := self memGetSurfaceBits: id.\r\tinterpreterProxy pop: interpreterProxy methodArgumentCount+1. \"args+rcvr\"\r\tinterpreterProxy push: (interpreterProxy positive32BitIntegerFor: result).! !\r\r!ExampleSurfacePlugin methodsFor: 'primitives' stamp: 'ar 4/26/2006 13:50'!\rprimitiveGetSurfaceDepth\r\t\"Primitive. Return the height of a surface.\"\r\t| id result |\r\tself export: true.\r\tinterpreterProxy methodArgumentCount = 1\r\t\tifFalse:[^interpreterProxy primitiveFail].\r\tid := interpreterProxy stackIntegerValue: 0.\r\tinterpreterProxy failed ifTrue:[^nil]. \"invalid arguments\"\r\tresult := self memGetSurfaceDepth: id.\r\tinterpreterProxy pop: interpreterProxy methodArgumentCount+1. \"args+rcvr\"\r\tinterpreterProxy pushInteger: result.! !\r\r!ExampleSurfacePlugin methodsFor: 'primitives' stamp: 'ar 4/26/2006 13:50'!\rprimitiveGetSurfaceHeight\r\t\"Primitive. Return the height of a surface.\"\r\t| id result |\r\tself export: true.\r\tinterpreterProxy methodArgumentCount = 1\r\t\tifFalse:[^interpreterProxy primitiveFail].\r\tid := interpreterProxy stackIntegerValue: 0.\r\tinterpreterProxy failed ifTrue:[^nil]. \"invalid arguments\"\r\tresult := self memGetSurfaceHeight: id.\r\tinterpreterProxy pop: interpreterProxy methodArgumentCount+1. \"args+rcvr\"\r\tinterpreterProxy pushInteger: result.! !\r\r!ExampleSurfacePlugin methodsFor: 'primitives' stamp: 'ar 4/26/2006 13:50'!\rprimitiveGetSurfaceWidth\r\t\"Primitive. Return the witdth of a surface.\"\r\t| id result |\r\tself export: true.\r\tinterpreterProxy methodArgumentCount = 1\r\t\tifFalse:[^interpreterProxy primitiveFail].\r\tid := interpreterProxy stackIntegerValue: 0.\r\tinterpreterProxy failed ifTrue:[^nil]. \"invalid arguments\"\r\tresult := self memGetSurfaceWidth: id.\r\tinterpreterProxy pop: interpreterProxy methodArgumentCount+1. \"args+rcvr\"\r\tinterpreterProxy pushInteger: result.! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rExampleSurfacePlugin class\r\tinstanceVariableNames: ''!\r\r!ExampleSurfacePlugin class methodsFor: 'accessing' stamp: 'ar 4/26/2006 12:35'!\rhasHeaderFile\r\t\"If there is a single intrinsic header file to be associated with the plugin, here is where you want to flag\"\r\t^true! !\r\r!ExampleSurfacePlugin class methodsFor: 'accessing' stamp: 'ar 4/26/2006 12:35'!\rrequiresCrossPlatformFiles\r\t\"default is ok for most, any plugin needing platform specific files must say so\"\r\t^true! !\r"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/ExampleSurfacePlugin/sqMemorySurface.c",
    "content": "/* sample memory surface plugin implementation */\r\n#include <malloc.h>\r\n#include \"sqVirtualMachine.h\"\r\n#include \"ExampleSurfacePlugin.h\"\r\n#include \"../SurfacePlugin/SurfacePlugin.h\"\r\n\r\ntypedef struct memSurface {\r\n  int width, height, depth, stride;\r\n  void *bits;\r\n} memSurface;\r\n\r\n/* entry points for surface manager; looked up at startup */\r\nstatic fn_ioRegisterSurface registerSurface = 0;\r\nstatic fn_ioUnregisterSurface unregisterSurface = 0;\r\nstatic fn_ioFindSurface findSurface = 0;\r\n\r\nextern struct VirtualMachine *interpreterProxy;\r\n\r\n/******************* Surface manager entry points *******************/\r\nstatic int memGetSurfaceFormat(memSurface *ms, int *w, int *h, int *d, int *msbFlag) {\r\n  *w = ms->width;\r\n  *h = ms->height;\r\n  *d = ms->depth;\r\n  *msbFlag = 0; /* should really depend on platform */\r\n  return 1;\r\n}\r\n\r\nstatic int memLock(memSurface *ms, int *stride, int x, int y, int w, int h){\r\n  /* Locking can be safely ignored for memory surfaces but we need to fill in \r\n     the stride and return the bits */\r\n  *stride = ms->stride;\r\n  return (int)ms->bits;\r\n}\r\n\r\nstatic int memUnlock(memSurface *ms, int x, int y, int w, int h){\r\n  return 1; /* ignored */\r\n}\r\n\r\nstatic int memShow(memSurface *ms, int x, int y, int w, int h) {\r\n  /* unsupported */\r\n  return 0;\r\n}\r\n\r\nstatic sqSurfaceDispatch memSurfaceDispatch = {\r\n  1,\r\n  0,\r\n  (fn_getSurfaceFormat) memGetSurfaceFormat,\r\n  (fn_lockSurface) memLock,\r\n  (fn_unlockSurface) memUnlock,\r\n  (fn_showSurface) memShow\r\n};\r\n\r\n/******************* primitive entry points *******************/\r\n\r\nint memCreateSurfaceWidthHeightDepth(int w, int h, int d) {\r\n  memSurface *ms;\r\n  int id;\r\n  /* since I'm lazy I'll only deal with d >= 8 */\r\n  if(d < 8) return -1; /* indicates failure */\r\n  /* create the memory surface */\r\n  ms = calloc(1, sizeof(memSurface));\r\n  ms->width = w;\r\n  ms->height = h;\r\n  ms->depth = d;\r\n  ms->stride = w * (d >> 3);\r\n  ms->bits = calloc(ms->stride, ms->height);\r\n  /* register memory surface */\r\n  if(!(*registerSurface)((int)ms, &memSurfaceDispatch, &id)) {\r\n    /* registration failed; bail */\r\n    free(ms->bits);\r\n    free(ms);\r\n    return -1;\r\n  }\r\n  return id;\r\n}\r\n\r\nint memDestroySurface(int id) {\r\n  memSurface *ms;\r\n  if(!(*findSurface)(id, &memSurfaceDispatch, (int*) &ms)) return 0;\r\n  (*unregisterSurface)(id);\r\n  free(ms->bits);\r\n  free(ms);\r\n  return 1;\r\n}\r\n\r\nint memGetSurfaceWidth(int id) {\r\n  memSurface *ms;\r\n  if(!(*findSurface)(id, &memSurfaceDispatch, (int*) &ms)) return 0;\r\n  return ms->width;\r\n}\r\n\r\nint memGetSurfaceHeight(int id) {\r\n  memSurface *ms;\r\n  if(!(*findSurface)(id, &memSurfaceDispatch, (int*) &ms)) return 0;\r\n  return ms->height;\r\n}\r\n\r\nint memGetSurfaceDepth(int id) {\r\n  memSurface *ms;\r\n  if(!(*findSurface)(id, &memSurfaceDispatch, (int*) &ms)) return 0;\r\n  return ms->depth;\r\n}\r\n\r\nint memGetSurfaceBits(int id) {\r\n  memSurface *ms;\r\n  if(!(*findSurface)(id, &memSurfaceDispatch, (int*) &ms)) return 0;\r\n  return (int) ms->bits;\r\n}\r\n\r\nint memInitialize(void) {\r\n  /* look up the required entry points */\r\n  registerSurface = (fn_ioRegisterSurface) \r\n    interpreterProxy->ioLoadFunctionFrom(\"ioRegisterSurface\",\"SurfacePlugin\");\r\n  unregisterSurface = (fn_ioUnregisterSurface)\r\n    interpreterProxy->ioLoadFunctionFrom(\"ioUnregisterSurface\",\"SurfacePlugin\");\r\n  findSurface = (fn_ioFindSurface)\r\n    interpreterProxy->ioLoadFunctionFrom(\"ioFindSurface\",\"SurfacePlugin\");\r\n\r\n  /* if any of the above fail we won't load the plugin */\r\n  if(!registerSurface) return 0;\r\n  if(!unregisterSurface) return 0;\r\n  if(!findSurface) return 0;\r\n  return 1;\r\n}\r\n\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FileCopyPlugin/FileCopyPlugin.h",
    "content": "/* This is a hopefully temporary plugin that provides a platform specific way\n * to copy files with all the type and status information intact -\n * rather useful for makefiles, unix shell scripts, Mac resources etc\n * It will fade away once Squeak has decent file handling.\n */\n \nint sqCopyFilesizetosize(char *srcNameIndex, int srcNameSize, char *dstNameIndex, int dstNameSize);\nint sqCopyDirectorysizetosize(char *srcNameIndex, int srcNameSize, char *dstNameIndex, int dstNameSize);\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FilePlugin/FilePlugin.c",
    "content": "/* Automatically generated by\n\tVMPluginCodeGenerator VMMaker.oscog-eem.97 uuid: e5a88d4c-b638-4228-8a1d-39d5af02c8d8\n   from\n\tFilePlugin VMMaker.oscog-eem.97 uuid: e5a88d4c-b638-4228-8a1d-39d5af02c8d8\n */\nstatic char __buildInfo[] = \"FilePlugin VMMaker.oscog-eem.97 uuid: e5a88d4c-b638-4228-8a1d-39d5af02c8d8 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n# include \"squeak_adapters.h\"\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"FilePlugin.h\"\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n#define COGMTVM 0\n#define DirBadPath 2\n#define DirNoMoreEntries 1\n#define PrimErrBadArgument 3\n#define PrimErrBadIndex 4\n#define PrimErrNoMemory 9\n#define PrimErrObjectMayMove 14\n#define PrimErrUnsupported 7\n#define PrimNoErr 0\n\n\n/*** Function Prototypes ***/\nstatic sqInt asciiDirectoryDelimiter(void);\nEXPORT(sqInt) fileOpenNamesizewritesecure(char * nameIndex, sqInt nameSize, sqInt writeFlag, sqInt secureFlag);\nsqInt fileRecordSize(void);\nSQFile * fileValueOf(sqInt objectPointer);\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nEXPORT(sqInt) getThisSession(void);\nstatic sqInt halt(void);\nEXPORT(sqInt) initialiseModule(void);\nstatic sqInt makeDirEntryNamesizecreateDatemodDateisDirfileSize(char * entryName, sqInt entryNameSize, sqInt createDate, sqInt modifiedDate, sqInt dirFlag, squeakFileOffsetType  fileSize);\nEXPORT(sqInt) moduleUnloaded(char * aModuleName);\nstatic sqInt msg(char * s);\nEXPORT(sqInt) primitiveDirectoryCreate(void);\nEXPORT(sqInt) primitiveDirectoryDelete(void);\nEXPORT(sqInt) primitiveDirectoryDelimitor(void);\nEXPORT(sqInt) primitiveDirectoryEntry(void);\nEXPORT(sqInt) primitiveDirectoryGetMacTypeAndCreator(void);\nEXPORT(sqInt) primitiveDirectoryLookup(void);\nEXPORT(sqInt) primitiveDirectorySetMacTypeAndCreator(void);\nEXPORT(sqInt) primitiveDisableFileAccess(void);\nEXPORT(sqInt) primitiveFileAtEnd(void);\nEXPORT(sqInt) primitiveFileClose(void);\nEXPORT(sqInt) primitiveFileDelete(void);\nEXPORT(sqInt) primitiveFileFlush(void);\nEXPORT(sqInt) primitiveFileGetPosition(void);\nEXPORT(sqInt) primitiveFileOpen(void);\nEXPORT(sqInt) primitiveFileRead(void);\nEXPORT(sqInt) primitiveFileRename(void);\nEXPORT(sqInt) primitiveFileSetPosition(void);\nEXPORT(sqInt) primitiveFileSize(void);\nEXPORT(sqInt) primitiveFileStdioHandles(void);\nEXPORT(sqInt) primitiveFileTruncate(void);\nEXPORT(sqInt) primitiveFileWrite(void);\nEXPORT(sqInt) primitiveHasFileAccess(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine* anInterpreter);\nEXPORT(sqInt) setMacFileTypeAndCreator(char * fileName, char * typeString, char * creatorString);\nEXPORT(sqInt) shutdownModule(void);\n\n\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"FilePlugin VMMaker.oscog-eem.97 (i)\"\n#else\n\t\"FilePlugin VMMaker.oscog-eem.97 (e)\"\n#endif\n;\nstatic void * sCCPfn;\nstatic void * sCDFfn;\nstatic void * sCDPfn;\nstatic void * sCGFTfn;\nstatic void * sCLPfn;\nstatic void * sCOFfn;\nstatic void * sCRFfn;\nstatic void * sCSFTfn;\nstatic void * sDFAfn;\nstatic void * sHFAfn;\n\n\nstatic sqInt\nasciiDirectoryDelimiter(void)\n{\n\treturn dir_Delimitor();\n}\n\n\n/*\tOpen the named file, possibly checking security. Answer the file oop. */\n\nEXPORT(sqInt)\nfileOpenNamesizewritesecure(char * nameIndex_xxx_dmu, sqInt nameSize, sqInt writeFlag, sqInt secureFlag)\n{\n    SQFile * file;\n\tsqInt fileOop;\n    sqInt okToOpen;\n\n  char* nameIndex_xxx_dmu1 = malloc(nameSize);\n  memmove(nameIndex_xxx_dmu1, nameIndex_xxx_dmu, nameSize);\n\tfileOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(SQFile));\n\t/* begin fileValueOf: */\n\tif (!((interpreterProxy->isBytes(fileOop))\n\t\t && ((interpreterProxy->byteSizeOf(fileOop)) == (sizeof(SQFile))))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tfile = null;\n\t\tgoto l1;\n\t}\n\tfile = interpreterProxy->arrayValueOf(fileOop);\nl1:\t/* end fileValueOf: */;\n\tif (!(interpreterProxy->failed())) {\n\t\tif (secureFlag) {\n\t\t\tif (sCOFfn != 0) {\n\t\t\t\tokToOpen = ((sqInt (*) (char *, sqInt, sqInt)) sCOFfn)(nameIndex_xxx_dmu1, nameSize, writeFlag);\n\t\t\t\tif (!(okToOpen)) {\n\t\t\t\t\tinterpreterProxy->primitiveFail();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tsqFileOpen(file, nameIndex_xxx_dmu1, nameSize, writeFlag);\n\t}\n  free(nameIndex_xxx_dmu1);\n\treturn fileOop;\n}\n\n\n/*\tReturn the size of a Smalltalk file record in bytes. */\n\nsqInt\nfileRecordSize(void)\n{\n\treturn sizeof(SQFile);\n}\n\n\n/*\tReturn a pointer to the first byte of of the file record within the given\n\tSmalltalk object, or nil if objectPointer is not a file record.\n */\n\nSQFile *\nfileValueOf(sqInt objectPointer)\n{\n\tif (!((interpreterProxy->isBytes(objectPointer))\n\t\t && ((interpreterProxy->byteSizeOf(objectPointer)) == (sizeof(SQFile))))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\treturn interpreterProxy->firstIndexableField(objectPointer);\n}\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\n\n/*\tExported entry point for the VM. Only used by AsynchFilePlugin and needs\n\tto be reowrked now we have a VM global session Id capability\n */\n\nEXPORT(sqInt)\ngetThisSession(void)\n{\n\treturn sqFileThisSession();\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nEXPORT(sqInt)\ninitialiseModule(void)\n{\n\tsCCPfn = interpreterProxy->ioLoadFunctionFrom(\"secCanCreatePathOfSize\", \"SecurityPlugin\");\n\tsCDPfn = interpreterProxy->ioLoadFunctionFrom(\"secCanDeletePathOfSize\", \"SecurityPlugin\");\n\tsCGFTfn = interpreterProxy->ioLoadFunctionFrom(\"secCanGetFileTypeOfSize\", \"SecurityPlugin\");\n\tsCLPfn = interpreterProxy->ioLoadFunctionFrom(\"secCanListPathOfSize\", \"SecurityPlugin\");\n\tsCSFTfn = interpreterProxy->ioLoadFunctionFrom(\"secCanSetFileTypeOfSize\", \"SecurityPlugin\");\n\tsDFAfn = interpreterProxy->ioLoadFunctionFrom(\"secDisableFileAccess\", \"SecurityPlugin\");\n\tsCDFfn = interpreterProxy->ioLoadFunctionFrom(\"secCanDeleteFileOfSize\", \"SecurityPlugin\");\n\tsCOFfn = interpreterProxy->ioLoadFunctionFrom(\"secCanOpenFileOfSizeWritable\", \"SecurityPlugin\");\n\tsCRFfn = interpreterProxy->ioLoadFunctionFrom(\"secCanRenameFileOfSize\", \"SecurityPlugin\");\n\tsHFAfn = interpreterProxy->ioLoadFunctionFrom(\"secHasFileAccess\", \"SecurityPlugin\");\n\treturn sqFileInit();\n}\n\nstatic sqInt\nmakeDirEntryNamesizecreateDatemodDateisDirfileSize(char *entryName, sqInt entryNameSize, sqInt createDate, sqInt modifiedDate, sqInt dirFlag, squeakFileOffsetType  fileSize)\n{\n    sqInt createDateOop;\n    sqInt fileSizeOop;\n    sqInt i;\n    sqInt modDateOop;\n    sqInt nameString;\n    sqInt results;\n    char *stringPtr;\n\n\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 5));\n\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), entryNameSize));\n\tinterpreterProxy->pushRemappableOop(interpreterProxy->positive32BitIntegerFor(createDate));\n\tinterpreterProxy->pushRemappableOop(interpreterProxy->positive32BitIntegerFor(modifiedDate));\n\tinterpreterProxy->pushRemappableOop(interpreterProxy->positive64BitIntegerFor(fileSize));\n\tfileSizeOop = interpreterProxy->popRemappableOop();\n\tmodDateOop = interpreterProxy->popRemappableOop();\n\tcreateDateOop = interpreterProxy->popRemappableOop();\n\tnameString = interpreterProxy->popRemappableOop();\n\n\t/* copy name into Smalltalk string */\n\n\tresults = interpreterProxy->popRemappableOop();\n\tstringPtr = interpreterProxy->firstIndexableField(nameString);\n\tfor (i = 0; i <= (entryNameSize - 1); i += 1) {\n\t\tstringPtr[i] = (entryName[i]);\n\t}\n\tinterpreterProxy->storePointerofObjectwithValue(0, results, nameString);\n\tinterpreterProxy->storePointerofObjectwithValue(1, results, createDateOop);\n\tinterpreterProxy->storePointerofObjectwithValue(2, results, modDateOop);\n\tif (dirFlag) {\n\t\tinterpreterProxy->storePointerofObjectwithValue(3, results, interpreterProxy->trueObject());\n\t}\n\telse {\n\t\tinterpreterProxy->storePointerofObjectwithValue(3, results, interpreterProxy->falseObject());\n\t}\n\tinterpreterProxy->storePointerofObjectwithValue(4, results, fileSizeOop);\n\treturn results;\n}\n\n\n/*\tThe module with the given name was just unloaded.\n\tMake sure we have no dangling references. */\n\nEXPORT(sqInt)\nmoduleUnloaded(char *aModuleName)\n{\n\tif ((strcmp(aModuleName, \"SecurityPlugin\")) == 0) {\n\t\tsCCPfn = (sCDPfn = (sCGFTfn = (sCLPfn = (sCSFTfn = (sDFAfn = (sCDFfn = (sCOFfn = (sCRFfn = (sHFAfn = 0)))))))));\n\t}\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\nEXPORT(sqInt)\nprimitiveDirectoryCreate(void)\n{\n    sqInt dirName;\n    char * dirNameIndex;\n    sqInt dirNameSize;\n    sqInt okToCreate;\n\n\tdirName = interpreterProxy->stackValue(0);\n\tif (!(interpreterProxy->isBytes(dirName))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tdirNameIndex = interpreterProxy->firstIndexableField(dirName);\n\n\t/* If the security plugin can be loaded, use it to check for permission.\n\tIf not, assume it's ok */\n\n\tdirNameSize = interpreterProxy->byteSizeOf(dirName);\n\tif (sCCPfn != 0) {\n\t\tokToCreate =  ((sqInt (*)(char *, sqInt))sCCPfn)(dirNameIndex, dirNameSize);\n\t\tif (!(okToCreate)) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\tif (!(dir_Create(dirNameIndex, dirNameSize))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop(1);\n}\n\nEXPORT(sqInt)\nprimitiveDirectoryDelete(void)\n{\n    sqInt dirName;\n    char * dirNameIndex;\n    sqInt dirNameSize;\n    sqInt okToDelete;\n\n\tdirName = interpreterProxy->stackValue(0);\n\tif (!(interpreterProxy->isBytes(dirName))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tdirNameIndex = interpreterProxy->firstIndexableField(dirName);\n\n\t/* If the security plugin can be loaded, use it to check for permission.\n\tIf not, assume it's ok */\n\n\tdirNameSize = interpreterProxy->byteSizeOf(dirName);\n\tif (sCDPfn != 0) {\n\t\tokToDelete =  ((sqInt (*)(char *, sqInt))sCDPfn)(dirNameIndex, dirNameSize);\n\t\tif (!(okToDelete)) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\tif (!(dir_Delete(dirNameIndex, dirNameSize))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop(1);\n}\n\nEXPORT(sqInt)\nprimitiveDirectoryDelimitor(void)\n{\n    sqInt ascii;\n\n\tascii = asciiDirectoryDelimiter();\n\tif (!((ascii >= 0)\n\t\t && (ascii <= 255))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->popthenPush(1, interpreterProxy->fetchPointerofObject(ascii, interpreterProxy->characterTable())); // OK xxx_dmu\n}\n\n/*\tTwo arguments - directory path, and simple file name;\n\treturns an array (see primitiveDirectoryLookup) describing the file or\n\tdirectory, or nil if it does not exist. \n\tPrimitive fails if the outer path does not identify a readable directory.\n\t(This is a lookup-by-name variant of primitiveDirectoryLookup.) */\n\nEXPORT(sqInt)\nprimitiveDirectoryEntry(void)\n{\n    sqInt createDate;\n    sqInt dirFlag;\n    char entryName[256];\n    sqInt entryNameSize;\n    squeakFileOffsetType fileSize;\n    sqInt modifiedDate;\n    sqInt okToList;\n    sqInt pathName;\n    char *pathNameIndex;\n    sqInt pathNameSize;\n    char *reqNameIndex;\n    sqInt reqNameSize;\n    sqInt requestedName;\n    sqInt status;\n\n\trequestedName = interpreterProxy->stackValue(0);\n\tpathName = interpreterProxy->stackValue(1);\n\tif (!(interpreterProxy->isBytes(pathName))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tpathNameIndex = interpreterProxy->firstIndexableField(pathName);\n\tpathNameSize = interpreterProxy->byteSizeOf(pathName);\n\treqNameIndex = interpreterProxy->firstIndexableField(requestedName);\n\n\t/* If the security plugin can be loaded, use it to check for permission. \n\tIf not, assume it's ok */\n\n\treqNameSize = interpreterProxy->byteSizeOf(requestedName);\n\tif (sCLPfn != 0) {\n\t\tokToList = ((sqInt (*)(char *, sqInt))sCLPfn)(pathNameIndex, pathNameSize);\n\t}\n\telse {\n\t\tokToList = 1;\n\t}\n\tif (okToList) {\n\t\tstatus = dir_EntryLookup(pathNameIndex, pathNameSize, reqNameIndex, reqNameSize,\n\t\t\t\t\t\t\t\t\t\t\t\t\t  entryName, &entryNameSize, &createDate,\n\t\t\t\t\t\t\t\t\t\t\t\t\t  &modifiedDate, &dirFlag, &fileSize);\n\t}\n\telse {\n\t\tstatus = DirNoMoreEntries;\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (status == DirNoMoreEntries) {\n\t\tinterpreterProxy->popthenPush(3, interpreterProxy->nilObject());\n\t\treturn null;\n\t}\n\tif (status == DirBadPath) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->popthenPush(3, makeDirEntryNamesizecreateDatemodDateisDirfileSize(entryName, entryNameSize, createDate, modifiedDate, dirFlag, fileSize));\n}\n\nEXPORT(sqInt)\nprimitiveDirectoryGetMacTypeAndCreator(void)\n{\n    sqInt creatorString;\n    char * creatorStringIndex;\n    sqInt fileName;\n    char *fileNameIndex;\n    sqInt fileNameSize;\n    sqInt okToGet;\n    sqInt typeString;\n    char *typeStringIndex;\n\n\tcreatorString = interpreterProxy->stackValue(0);\n\ttypeString = interpreterProxy->stackValue(1);\n\tfileName = interpreterProxy->stackValue(2);\n\tif (!((interpreterProxy->isBytes(creatorString))\n\t\t && ((interpreterProxy->byteSizeOf(creatorString)) == 4))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!((interpreterProxy->isBytes(typeString))\n\t\t && ((interpreterProxy->byteSizeOf(typeString)) == 4))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!(interpreterProxy->isBytes(fileName))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tcreatorStringIndex = interpreterProxy->firstIndexableField(creatorString);\n\ttypeStringIndex = interpreterProxy->firstIndexableField(typeString);\n\tfileNameIndex = interpreterProxy->firstIndexableField(fileName);\n\n\t/* If the security plugin can be loaded, use it to check for permission.\n\tIf not, assume it's ok */\n\n\tfileNameSize = interpreterProxy->byteSizeOf(fileName);\n\tif (sCGFTfn != 0) {\n\t\tokToGet =  ((sqInt (*)(char *, sqInt))sCGFTfn)(fileNameIndex, fileNameSize);\n\t\tif (!(okToGet)) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\tif (!(dir_GetMacFileTypeAndCreator(fileNameIndex, fileNameSize, typeStringIndex, creatorStringIndex))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop(3);\n}\n\nEXPORT(sqInt)\nprimitiveDirectoryLookup(void)\n{\n    sqInt createDate;\n    sqInt dirFlag;\n    char entryName[256];\n    sqInt entryNameSize;\n    squeakFileOffsetType fileSize;\n    sqInt index;\n    sqInt modifiedDate;\n    sqInt okToList;\n    sqInt pathName;\n    char *pathNameIndex;\n    sqInt pathNameSize;\n    sqInt status;\n\n\tindex = interpreterProxy->stackIntegerValue(0);\n\tpathName = interpreterProxy->stackValue(1);\n\tif (!(interpreterProxy->isBytes(pathName))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tpathNameIndex = interpreterProxy->firstIndexableField(pathName);\n\n\t/* If the security plugin can be loaded, use it to check for permission.\n\tIf not, assume it's ok */\n\n\tpathNameSize = interpreterProxy->byteSizeOf(pathName);\n\tif (sCLPfn != 0) {\n\t\tokToList = ((sqInt (*)(char *, sqInt))sCLPfn)(pathNameIndex, pathNameSize);\n\t}\n\telse {\n\t\tokToList = 1;\n\t}\n\tif (okToList) {\n\t\tstatus = dir_Lookup(pathNameIndex, pathNameSize, index,\n\t\t\t\t\t\t\t\t\t\t\t\tentryName, &entryNameSize, &createDate,\n\t\t\t\t\t\t\t\t\t\t\t\t&modifiedDate, &dirFlag, &fileSize);\n\t}\n\telse {\n\t\tstatus = DirNoMoreEntries;\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (status == DirNoMoreEntries) {\n\t\tinterpreterProxy->popthenPush(3, interpreterProxy->nilObject());\n\t\treturn null;\n\t}\n\tif (status == DirBadPath) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->popthenPush(3, makeDirEntryNamesizecreateDatemodDateisDirfileSize(entryName, entryNameSize, createDate, modifiedDate, dirFlag, fileSize));\n}\n\nEXPORT(sqInt)\nprimitiveDirectorySetMacTypeAndCreator(void)\n{\n    sqInt creatorString;\n    char * creatorStringIndex;\n    sqInt fileName;\n    char *fileNameIndex;\n    sqInt fileNameSize;\n    sqInt okToSet;\n    sqInt typeString;\n    char *typeStringIndex;\n\n\tcreatorString = interpreterProxy->stackValue(0);\n\ttypeString = interpreterProxy->stackValue(1);\n\tfileName = interpreterProxy->stackValue(2);\n\tif (!((interpreterProxy->isBytes(creatorString))\n\t\t && ((interpreterProxy->byteSizeOf(creatorString)) == 4))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!((interpreterProxy->isBytes(typeString))\n\t\t && ((interpreterProxy->byteSizeOf(typeString)) == 4))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!(interpreterProxy->isBytes(fileName))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tcreatorStringIndex = interpreterProxy->firstIndexableField(creatorString);\n\ttypeStringIndex = interpreterProxy->firstIndexableField(typeString);\n\tfileNameIndex = interpreterProxy->firstIndexableField(fileName);\n\n\t/* If the security plugin can be loaded, use it to check for permission.\n\tIf not, assume it's ok */\n\n\tfileNameSize = interpreterProxy->byteSizeOf(fileName);\n\tif (sCSFTfn != 0) {\n\t\tokToSet =  ((sqInt (*)(char *, sqInt))sCSFTfn)(fileNameIndex, fileNameSize);\n\t\tif (!(okToSet)) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\tif (!(dir_SetMacFileTypeAndCreator(fileNameIndex, fileNameSize,typeStringIndex, creatorStringIndex))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop(3);\n}\n\n\n/*\tIf the security plugin can be loaded, use it to turn off file access\n\tIf not, assume it's ok */\n\nEXPORT(sqInt)\nprimitiveDisableFileAccess(void)\n{\n\tif (sDFAfn != 0) {\n\t\t ((sqInt (*)(void))sDFAfn)();\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveFileAtEnd(void)\n{\n    sqInt atEnd;\n    SQFile * file;\n    sqInt objectPointer;\n\n\t/* begin fileValueOf: */\n\tobjectPointer = interpreterProxy->stackValue(0);\n\tif (!((interpreterProxy->isBytes(objectPointer))\n\t\t && ((interpreterProxy->byteSizeOf(objectPointer)) == (sizeof(SQFile))))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tfile = null;\n\t\tgoto l1;\n\t}\n\tfile = interpreterProxy->firstIndexableField(objectPointer);\nl1:\t/* end fileValueOf: */;\n\tif (!(interpreterProxy->failed())) {\n\t\tatEnd = sqFileAtEnd(file);\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushBool(atEnd);\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveFileClose(void)\n{\n    SQFile * file;\n    sqInt objectPointer;\n\n\t/* begin fileValueOf: */\n\tobjectPointer = interpreterProxy->stackValue(0);\n\tif (!((interpreterProxy->isBytes(objectPointer))\n\t\t && ((interpreterProxy->byteSizeOf(objectPointer)) == (sizeof(SQFile))))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tfile = null;\n\t\tgoto l1;\n\t}\n\tfile = interpreterProxy->firstIndexableField(objectPointer);\nl1:\t/* end fileValueOf: */;\n\tif (!(interpreterProxy->failed())) {\n\t\tsqFileClose(file);\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->pop(1);\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveFileDelete(void)\n{\n    char *nameIndex;\n    sqInt namePointer;\n    sqInt nameSize;\n    sqInt okToDelete;\n\n\tnamePointer = interpreterProxy->stackValue(0);\n\tif (!(interpreterProxy->isBytes(namePointer))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tnameIndex = interpreterProxy->firstIndexableField(namePointer);\n\n\t/* If the security plugin can be loaded, use it to check for permission.\n\tIf not, assume it's ok */\n\n\tnameSize = interpreterProxy->byteSizeOf(namePointer);\n\tif (sCDFfn != 0) {\n\t\tokToDelete =  ((sqInt (*)(char *, sqInt))sCDFfn)(nameIndex, nameSize);\n\t\tif (!(okToDelete)) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\tsqFileDeleteNameSize(nameIndex, nameSize);\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->pop(1);\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveFileFlush(void)\n{\n    SQFile * file;\n    sqInt objectPointer;\n\n\t/* begin fileValueOf: */\n\tobjectPointer = interpreterProxy->stackValue(0);\n\tif (!((interpreterProxy->isBytes(objectPointer))\n\t\t && ((interpreterProxy->byteSizeOf(objectPointer)) == (sizeof(SQFile))))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tfile = null;\n\t\tgoto l1;\n\t}\n\tfile = interpreterProxy->firstIndexableField(objectPointer);\nl1:\t/* end fileValueOf: */;\n\tif (!(interpreterProxy->failed())) {\n\t\tsqFileFlush(file);\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->pop(1);\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveFileGetPosition(void)\n{\n    SQFile * file;\n    sqInt objectPointer;\n    squeakFileOffsetType position;\n\n\t/* begin fileValueOf: */\n\tobjectPointer = interpreterProxy->stackValue(0);\n\tif (!((interpreterProxy->isBytes(objectPointer))\n\t\t && ((interpreterProxy->byteSizeOf(objectPointer)) == (sizeof(SQFile))))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tfile = null;\n\t\tgoto l1;\n\t}\n\tfile = interpreterProxy->firstIndexableField(objectPointer);\nl1:\t/* end fileValueOf: */;\n\tif (!(interpreterProxy->failed())) {\n\t\tposition = sqFileGetPosition(file);\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->popthenPush(2, interpreterProxy->positive64BitIntegerFor(position));\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveFileOpen(void)\n{\n    sqInt filePointer;\n    char * nameIndex;\n    sqInt namePointer;\n    sqInt nameSize;\n    sqInt writeFlag;\n\n\twriteFlag = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(0));\n\tnamePointer = interpreterProxy->stackValue(1);\n\tif (!(interpreterProxy->isBytes(namePointer))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tnameIndex = interpreterProxy->firstIndexableField(namePointer);\n\tnameSize = interpreterProxy->byteSizeOf(namePointer);\n\tfilePointer = fileOpenNamesizewritesecure(nameIndex, nameSize, writeFlag, 1);\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->popthenPush(3, filePointer);\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveFileRead(void)\n{\n    sqInt array;\n    sqInt bytesRead;\n    size_t count;\n    size_t elementSize;\n    SQFile *file;\n    sqInt objectPointer;\n    sqInt retryCount;\n    size_t startIndex;\n\n\tretryCount = 0;\n\tcount = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(0));\n\tstartIndex = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(1));\n\twhile (1) {\n\t\tarray = interpreterProxy->stackValue(2);\n\t\t/* begin fileValueOf: */\n\t\tobjectPointer = interpreterProxy->stackValue(3);\n\t\tif (!((interpreterProxy->isBytes(objectPointer))\n\t\t\t && ((interpreterProxy->byteSizeOf(objectPointer)) == (sizeof(SQFile))))) {\n\t\t\tinterpreterProxy->primitiveFail();\n\t\t\tfile = null;\n\t\t\tgoto l1;\n\t\t}\n\t\tfile = interpreterProxy->firstIndexableField(objectPointer);\n\tl1:\t/* end fileValueOf: */;\n\t\tif ((interpreterProxy->failed())\n\t\t || (!(interpreterProxy->isWordsOrBytes(array)))) {\n\t\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t\t}\n\t\telementSize = (interpreterProxy->isWords(array)\n\t\t\t? (4)\n\t\t\t: (1));\n\t\tif (!((startIndex >= 1)\n\t\t\t && (((startIndex + count) - 1) <= (interpreterProxy->slotSizeOf(array))))) {\n\t\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadIndex);\n\t\t}\n\t\tbytesRead = sqFileReadIntoAt(file, count * elementSize, ((char *) (interpreterProxy->firstIndexableField(array))), (startIndex - 1) * elementSize);\n\t\tif (!(((interpreterProxy->primitiveFailureCode()) == PrimErrObjectMayMove)\n && (((retryCount += 1)) <= 2))) break;\n\t\tinterpreterProxy->tenuringIncrementalGC();\n\t\tinterpreterProxy->primitiveFailFor(PrimNoErr);\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->popthenPush(5, (((bytesRead / elementSize) << 1) | 1));\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveFileRename(void)\n{\n    char * newNameIndex;\n    sqInt newNamePointer;\n    sqInt newNameSize;\n    sqInt okToRename;\n    char *oldNameIndex;\n    sqInt oldNamePointer;\n    sqInt oldNameSize;\n\n\tnewNamePointer = interpreterProxy->stackValue(0);\n\toldNamePointer = interpreterProxy->stackValue(1);\n\tif (!((interpreterProxy->isBytes(newNamePointer))\n\t\t && (interpreterProxy->isBytes(oldNamePointer)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tnewNameIndex = interpreterProxy->firstIndexableField(newNamePointer);\n\tnewNameSize = interpreterProxy->byteSizeOf(newNamePointer);\n\toldNameIndex = interpreterProxy->firstIndexableField(oldNamePointer);\n\n\t/* If the security plugin can be loaded, use it to check for rename permission.\n\tIf not, assume it's ok */\n\n\toldNameSize = interpreterProxy->byteSizeOf(oldNamePointer);\n\tif (sCRFfn != 0) {\n\t\tokToRename =  ((sqInt (*)(char *, sqInt))sCRFfn)(oldNameIndex, oldNameSize);\n\t\tif (!(okToRename)) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\tsqFileRenameOldSizeNewSize(oldNameIndex, oldNameSize, newNameIndex, newNameSize);\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->pop(2);\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveFileSetPosition(void)\n{\n    SQFile *file;\n    squeakFileOffsetType newPosition;\n    sqInt objectPointer;\n    sqInt sz;\n\n\tif (!(((interpreterProxy->stackValue(0)) & 1))) {\n\t\tsz = sizeof(squeakFileOffsetType);\n\t\tif ((interpreterProxy->byteSizeOf(interpreterProxy->stackValue(0))) > sz) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\tnewPosition = interpreterProxy->positive64BitValueOf(interpreterProxy->stackValue(0));\n\t/* begin fileValueOf: */\n\tobjectPointer = interpreterProxy->stackValue(1);\n\tif (!((interpreterProxy->isBytes(objectPointer))\n\t\t && ((interpreterProxy->byteSizeOf(objectPointer)) == (sizeof(SQFile))))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tfile = null;\n\t\tgoto l1;\n\t}\n\tfile = interpreterProxy->firstIndexableField(objectPointer);\nl1:\t/* end fileValueOf: */;\n\tif (!(interpreterProxy->failed())) {\n\t\tsqFileSetPosition(file, newPosition);\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->pop(2);\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveFileSize(void)\n{\n    SQFile * file;\n    sqInt objectPointer;\n    squeakFileOffsetType size;\n\n\t/* begin fileValueOf: */\n\tobjectPointer = interpreterProxy->stackValue(0);\n\tif (!((interpreterProxy->isBytes(objectPointer))\n\t\t && ((interpreterProxy->byteSizeOf(objectPointer)) == (sizeof(SQFile))))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tfile = null;\n\t\tgoto l1;\n\t}\n\tfile = interpreterProxy->firstIndexableField(objectPointer);\nl1:\t/* end fileValueOf: */;\n\tif (!(interpreterProxy->failed())) {\n\t\tsize = sqFileSize(file);\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->popthenPush(2, interpreterProxy->positive64BitIntegerFor(size));\n\t}\n}\n\n\n/*\tAnswer an Array of file handles for standard in, standard out and standard\n\terror, with nil in entries that are unvailable, e.g. because the platform\n\tdoes not provide\n\tstandard error, etc. Fail if there are no standard i/o facilities on the\n\tplatform or\n\tif the security plugin denies access or if memory runs out. */\n\nEXPORT(sqInt)\nprimitiveFileStdioHandles(void)\n{\n    SQFile fileRecords[3];\n    sqInt index;\n    sqInt result;\n    sqInt validMask;\n\n\tif (sHFAfn != 0) {\n\t\tif (!( ((sqInt (*)(void))sHFAfn)())) {\n\t\t\treturn interpreterProxy->primitiveFailFor(PrimErrUnsupported);\n\t\t}\n\t}\n\t;\n\tvalidMask = sqFileStdioHandlesInto(fileRecords);\n\tif (validMask == 0) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrUnsupported);\n\t}\n\tresult = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 3);\n\tif (result == null) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrNoMemory);\n\t}\n\tinterpreterProxy->pushRemappableOop(result);\n\tfor (index = 0; index <= 2; index += 1) {\n\t\tif ((validMask & (1 << index)) != 0) {\n\t\t\tresult = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(SQFile));\n\t\t\tif (result == null) {\n\t\t\t\tinterpreterProxy->popRemappableOop();\n\t\t\t\treturn interpreterProxy->primitiveFailFor(PrimErrNoMemory);\n\t\t\t}\n\t\t\tinterpreterProxy->storePointerofObjectwithValue(index, interpreterProxy->topRemappableOop(), result);\n\t\t\tmemcpy(interpreterProxy->firstIndexableField(result), (&(fileRecords[index])), sizeof(SQFile));\n\t\t}\n\t}\n\t\n#  if COGMTVM\n\tinterpreterProxy->fullGC();\n\n#  endif /* COGMTVM */\n\n\tresult = interpreterProxy->popRemappableOop();\n\tinterpreterProxy->popthenPush(1, result);\n}\n\n\n/*\tftruncate is not an ansi function so we have a macro to point to a\n\tsuitable platform implementation\n */\n\nEXPORT(sqInt)\nprimitiveFileTruncate(void)\n{\n    SQFile * file;\n    sqInt objectPointer;\n\tsqInt sz;\n    squeakFileOffsetType truncatePosition;\n\n\tif (!(((interpreterProxy->stackValue(0)) & 1))) {\n\t\tsz = sizeof(squeakFileOffsetType);\n\t\tif ((interpreterProxy->byteSizeOf(interpreterProxy->stackValue(0))) > sz) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\ttruncatePosition = interpreterProxy->positive64BitValueOf(interpreterProxy->stackValue(0));\n\t/* begin fileValueOf: */\n\tobjectPointer = interpreterProxy->stackValue(1);\n\tif (!((interpreterProxy->isBytes(objectPointer))\n\t\t && ((interpreterProxy->byteSizeOf(objectPointer)) == (sizeof(SQFile))))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tfile = null;\n\t\tgoto l1;\n\t}\n\tfile = interpreterProxy->firstIndexableField(objectPointer);\nl1:\t/* end fileValueOf: */;\n\tif (!(interpreterProxy->failed())) {\n\t\tsqFileTruncate(file, truncatePosition);\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->pop(2);\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveFileWrite(void)\n{\n    sqInt array;\n    char *arrayIndex;\n    size_t byteSize;\n    sqInt bytesWritten;\n    size_t count;\n    SQFile * file;\n    sqInt objectPointer;\n    size_t startIndex;\n\n\tcount = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(0));\n\tstartIndex = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(1));\n\tarray = interpreterProxy->stackValue(2);\n\t/* begin fileValueOf: */\n\tobjectPointer = interpreterProxy->stackValue(3);\n\tif (!((interpreterProxy->isBytes(objectPointer))\n\t\t && ((interpreterProxy->byteSizeOf(objectPointer)) == (sizeof(SQFile))))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tfile = null;\n\t\tgoto l1;\n\t}\n\tfile = interpreterProxy->firstIndexableField(objectPointer);\nl1:\t/* end fileValueOf: */;\n\tif (!(interpreterProxy->isWordsOrBytes(array))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (interpreterProxy->isWords(array)) {\n\t\tbyteSize = 4;\n\t}\n\telse {\n\t\tbyteSize = 1;\n\t}\n\tif (!((startIndex >= 1)\n\t\t && (((startIndex + count) - 1) <= (interpreterProxy->slotSizeOf(array))))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!(interpreterProxy->failed())) {\n\n\t\t/* Note: adjust startIndex for zero-origin indexing */\n\n\t\tarrayIndex = interpreterProxy->firstIndexableField(array);\n\t\tbytesWritten = sqFileWriteFromAt(file, count * byteSize, arrayIndex, (startIndex - 1) * byteSize);\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->popthenPush(5, (((bytesWritten / byteSize) << 1) | 1));\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveHasFileAccess(void)\n{\n    sqInt hasAccess;\n\n\tif (sHFAfn != 0) {\n\t\thasAccess =  ((sqInt (*)(void))sHFAfn)();\n\t}\n\telse {\n\t\thasAccess = 1;\n\t}\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushBool(hasAccess);\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n    sqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\n/*\tExported entry point for the VM. Needed for image saving only and no-op on\n\tanything but Macs.\n */\n\nEXPORT(sqInt)\nsetMacFileTypeAndCreator(char *fileName, char *typeString, char *creatorString)\n{\n\treturn dir_SetMacFileTypeAndCreator(fileName, strlen(fileName), typeString, creatorString);\n}\n\nEXPORT(sqInt)\nshutdownModule(void)\n{\n\treturn sqFileShutdown();\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* FilePlugin_exports[][3] = {\n\t{\"FilePlugin\", \"fileOpenNamesizewritesecure\", (void*)fileOpenNamesizewritesecure},\n\t{\"FilePlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"FilePlugin\", \"getThisSession\", (void*)getThisSession},\n\t{\"FilePlugin\", \"initialiseModule\", (void*)initialiseModule},\n\t{\"FilePlugin\", \"moduleUnloaded\", (void*)moduleUnloaded},\n\t{\"FilePlugin\", \"primitiveDirectoryCreate\", (void*)primitiveDirectoryCreate},\n\t{\"FilePlugin\", \"primitiveDirectoryDelete\", (void*)primitiveDirectoryDelete},\n\t{\"FilePlugin\", \"primitiveDirectoryDelimitor\", (void*)primitiveDirectoryDelimitor},\n\t{\"FilePlugin\", \"primitiveDirectoryEntry\", (void*)primitiveDirectoryEntry},\n\t{\"FilePlugin\", \"primitiveDirectoryGetMacTypeAndCreator\", (void*)primitiveDirectoryGetMacTypeAndCreator},\n\t{\"FilePlugin\", \"primitiveDirectoryLookup\", (void*)primitiveDirectoryLookup},\n\t{\"FilePlugin\", \"primitiveDirectorySetMacTypeAndCreator\", (void*)primitiveDirectorySetMacTypeAndCreator},\n\t{\"FilePlugin\", \"primitiveDisableFileAccess\", (void*)primitiveDisableFileAccess},\n\t{\"FilePlugin\", \"primitiveFileAtEnd\", (void*)primitiveFileAtEnd},\n\t{\"FilePlugin\", \"primitiveFileClose\", (void*)primitiveFileClose},\n\t{\"FilePlugin\", \"primitiveFileDelete\", (void*)primitiveFileDelete},\n\t{\"FilePlugin\", \"primitiveFileFlush\", (void*)primitiveFileFlush},\n\t{\"FilePlugin\", \"primitiveFileGetPosition\", (void*)primitiveFileGetPosition},\n\t{\"FilePlugin\", \"primitiveFileOpen\", (void*)primitiveFileOpen},\n\t{\"FilePlugin\", \"primitiveFileRead\", (void*)primitiveFileRead},\n\t{\"FilePlugin\", \"primitiveFileRename\", (void*)primitiveFileRename},\n\t{\"FilePlugin\", \"primitiveFileSetPosition\", (void*)primitiveFileSetPosition},\n\t{\"FilePlugin\", \"primitiveFileSize\", (void*)primitiveFileSize},\n\t{\"FilePlugin\", \"primitiveFileStdioHandles\", (void*)primitiveFileStdioHandles},\n\t{\"FilePlugin\", \"primitiveFileTruncate\", (void*)primitiveFileTruncate},\n\t{\"FilePlugin\", \"primitiveFileWrite\", (void*)primitiveFileWrite},\n\t{\"FilePlugin\", \"primitiveHasFileAccess\", (void*)primitiveHasFileAccess},\n\t{\"FilePlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{\"FilePlugin\", \"setMacFileTypeAndCreator\", (void*)setMacFileTypeAndCreator},\n\t{\"FilePlugin\", \"shutdownModule\", (void*)shutdownModule},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FilePlugin/FilePlugin.h",
    "content": "/****************************************************************************\n*   PROJECT: Common include\n*   FILE:    FilePlugin.h\n*   CONTENT: \n*\n*   AUTHOR:  \n*   ADDRESS: \n*   EMAIL:   \n*   RCSID:   $Id: FilePlugin.h 1283 2005-12-31 00:51:12Z rowledge $\n*\n*\t2009-05-15 EEM add stdio flag; reorder SQFile to make it more compact\n*\t2005-03-26 IKP fix unaligned accesses to file member\n*\t2004-06-10 IKP 64-bit cleanliness\n*\t01/22/2002 JMM change off_t to squeakOffsetFileType\n*/\n/* File support definitions */\n\n#include \"sqMemoryAccess.h\"\n\n/* squeak file record; see sqFilePrims.c for details */\ntypedef struct {\n  int\t\t\t sessionID;\t/* ikp: must be first */\n  void\t\t\t*file;\n  squeakFileOffsetType\t fileSize;\t/* 64-bits we hope. */\n  char\t\t\t writable;\n  char\t\t\t lastOp; /* 0 = uncommitted, 1 = read, 2 = write */\n  char\t\t\t lastChar;\n  char\t\t\t isStdioStream;\n} SQFile;\n\n/* file i/o */\n\nsqInt   sqFileAtEnd(SQFile *f);\nsqInt   sqFileClose(SQFile *f);\nsqInt   sqFileDeleteNameSize(char* sqFileNameIndex, sqInt sqFileNameSize);\nsqueakFileOffsetType sqFileGetPosition(SQFile *f);\nsqInt   sqFileInit(void);\nsqInt   sqFileShutdown(void);\nsqInt   sqFileOpen(SQFile *f, char* sqFileNameIndex, sqInt sqFileNameSize, sqInt writeFlag);\nsize_t  sqFileReadIntoAt(SQFile *f, size_t count, char* byteArrayIndex, size_t startIndex);\nsqInt   sqFileRenameOldSizeNewSize(char* oldNameIndex, sqInt oldNameSize, char* newNameIndex, sqInt newNameSize);\nsqInt   sqFileSetPosition(SQFile *f, squeakFileOffsetType position);\nsqueakFileOffsetType sqFileSize(SQFile *f);\nsqInt   sqFileValid(SQFile *f);\nsize_t  sqFileWriteFromAt(SQFile *f, size_t count, char* byteArrayIndex, size_t startIndex);\nsqInt   sqFileFlush(SQFile *f);\nsqInt   sqFileTruncate(SQFile *f,squeakFileOffsetType offset);\nsqInt   sqFileThisSession(void);\nsqInt   sqFileStdioHandlesInto(SQFile files[3]);\n\n/* directories */\n\nsqInt dir_Create(char *pathString, sqInt pathStringLength);\nsqInt dir_Delete(char *pathString, sqInt pathStringLength);\nsqInt dir_Delimitor(void);\nsqInt dir_Lookup(char *pathString, sqInt pathStringLength, sqInt index,\n\t\t/* outputs: */\n\t\tchar *name, sqInt *nameLength, sqInt *creationDate, sqInt *modificationDate,\n\t\tsqInt *isDirectory, squeakFileOffsetType *sizeIfFile);\nsqInt dir_PathToWorkingDir(char *pathName, sqInt pathNameMax);\nsqInt dir_SetMacFileTypeAndCreator(char *filename, sqInt filenameSize, char *fType, char *fCreator);\nsqInt dir_GetMacFileTypeAndCreator(char *filename, sqInt filenameSize, char *fType, char *fCreator);\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c",
    "content": "/****************************************************************************\n*   PROJECT: File Interface\n*   FILE:    sqFilePluginBasicPrims.c\n*   CONTENT: \n*\n*   AUTHOR:  \n*   ADDRESS: \n*   EMAIL:   ]\n*   RCSID:   $Id: sqFilePluginBasicPrims.c 1283 2005-12-31 00:51:12Z rowledge $\n*\n*   NOTES: See change log below.\n*\t2005-03-26 IKP fix unaligned accesses to file[Size] members\n* \t2004-06-10 IKP 64-bit cleanliness\n* \t1/28/02    Tim remove non-ansi stuff\n*\t\t\t\tunistd.h\n\t\t\t\tftello\n\t\t\t\tfseeko\n\t\t\t\tftruncate & fileno\n\t\t\t\tmacro-ise use of sqFTruncate to avoid non-ansi\n*\t1/22/2002  JMM Use squeakFileOffsetType versus off_t\n*\n*****************************************************************************/\n\n/* The basic prim code for file operations. See also the platform specific\n* files typically named 'sq{blah}Directory.c' for details of the directory\n* handling code. Note that the win32 platform #defines NO_STD_FILE_SUPPORT\n* and thus bypasses this file\n*/\n\n#include <errno.h>\n#include \"sq.h\"\n#ifndef NO_STD_FILE_SUPPORT\n#include \"FilePlugin.h\"\n\n/***\n\tThe state of a file is kept in the following structure,\n\twhich is stored directly in a Squeak bytes object.\n\tNOTE: The Squeak side is responsible for creating an\n\tobject with enough room to store sizeof(SQFile) bytes.\n\n\tThe session ID is used to detect stale file objects--\n\tfiles that were still open when an image was written.\n\tThe file pointer of such files is meaningless.\n\n\tFiles are always opened in binary mode; Smalltalk code\n\tdoes (or someday will do) line-end conversion if needed.\n\n\tWriteable files are opened read/write. The stdio spec\n\trequires that a positioning operation be done when\n\tswitching between reading and writing of a read/write\n\tfilestream. The lastOp field records whether the last\n\toperation was a read or write operation, allowing this\n\tpositioning operation to be done automatically if needed.\n\n\ttypedef struct {\n\t\tint\t\tsessionID;\n\t\tFile\t*file;\n\t\tsqueakFileOffsetType\t\tfileSize;  //JMM Nov 8th 2001 64bits we hope\n\t\tchar\twritable;\n\t\tchar\tlastOp;  \t\t// 0 = uncommitted, 1 = read, 2 = write //\n\t\tchar\tlastChar;\t\t// one character peek for stdin //\n\t\tchar\tisStdioStream;\n\t} SQFile;\n\n***/\n\n/*** Constants ***/\n#define UNCOMMITTED\t0\n#define READ_OP\t\t1\n#define WRITE_OP\t2\n\n#ifndef SEEK_SET\n#define SEEK_SET\t0\n#define SEEK_CUR\t1\n#define SEEK_END\t2\n#endif\n\n/*** Variables ***/\nint thisSession = 0;\nextern struct VirtualMachine * interpreterProxy;\n\n/* Since SQFile instaces are held on the heap in 32-bit-aligned byte arrays we\n * may need to use memcpy to avoid alignment faults.\n */\n#if DOUBLE_WORD_ALIGNMENT\nstatic void setFile(SQFile *f, FILE *file)\n{\n  void *in= (void *)&file;\n  void *out= (void *)&f->file;\n  memcpy(out, in, sizeof(FILE *));\n}\n#else\n# define setFile(f,fileptr) ((f)->file = (fileptr))\n#endif\n\n#if DOUBLE_WORD_ALIGNMENT\nstatic void setSize(SQFile *f, squeakFileOffsetType size)\n{\n  void *in= (void *)&size;\n  void *out= (void *)&f->fileSize;\n  memcpy(out, in, sizeof(squeakFileOffsetType));\n}\n#else\n# define setSize(f,size) ((f)->fileSize = (size))\n#endif\n\n#if DOUBLE_WORD_ALIGNMENT\nstatic FILE *getFile(SQFile *f)\n{\n  FILE *file;\n  void *in= (void *)&f->file;\n  void *out= (void *)&file;\n  memcpy(out, in, sizeof(FILE *));\n  return file;\n}\n#else\n# define getFile(f) ((FILE *)((f)->file))\n#endif\n\n#if DOUBLE_WORD_ALIGNMENT\nstatic squeakFileOffsetType getSize(SQFile *f)\n{\n  squeakFileOffsetType size;\n  void *in= (void *)&f->fileSize;\n  void *out= (void *)&size;\n  memcpy(out, in, sizeof(squeakFileOffsetType));\n  return size;\n}\n#else\n# define getSize(f) ((f)->fileSize)\n#endif\n\n#if 0\n# define pentry(func) do { int fn = fileno(getFile(f)); if (f->isStdioStream) printf(\"\\n\"#func \"(%s) %lld %d\\n\", fn == 0 ? \"in\" : fn == 1 ? \"out\" : \"err\", (long long)ftell(getFile(f)), f->lastChar); } while (0)\n# define pexit(expr) (f->isStdioStream && printf(\"\\n\\t^\"#expr \" %lld %d\\n\", (long long)(sqFileValid(f) ? ftell(getFile(f)) : -1), f->lastChar)), expr\n# define pfail() printf(\"\\tFAIL\\n\");\n#else\n# define pentry(func) 0\n# define pexit(expr) expr\n# define pfail() 0\n#endif\n\nsqInt sqFileAtEnd(SQFile *f) {\n\t/* Return true if the file's read/write head is at the end of the file. */\n\n\tif (!sqFileValid(f))\n\t\treturn interpreterProxy->success(false);\n\tpentry(sqFileAtEnd);\n\tif (f->isStdioStream)\n\t\treturn pexit(feof(getFile(f)));\n\treturn ftell(getFile(f)) == getSize(f);\n}\n\nsqInt sqFileClose(SQFile *f) {\n\t/* Close the given file. */\n\n\tif (!sqFileValid(f))\n\t\treturn interpreterProxy->success(false);\n\tfclose(getFile(f));\n\tsetFile(f, 0);\n\tf->sessionID = 0;\n\tf->writable = false;\n\tsetSize(f, 0);\n\tf->lastOp = UNCOMMITTED;\n\treturn 1;\n}\n\nsqInt sqFileDeleteNameSize(char* sqFileName, sqInt sqFileNameSize) {\n\tchar cFileName[1000];\n\tint err;\n\n\tif (sqFileNameSize >= 1000) {\n\t\treturn interpreterProxy->success(false);\n\t}\n\n\t/* copy the file name into a null-terminated C string */\n\tinterpreterProxy->ioFilenamefromStringofLengthresolveAliases(cFileName, sqFileName, sqFileNameSize, false);\n\n\terr = remove(cFileName);\n\tif (err) {\n\t\treturn interpreterProxy->success(false);\n\t}\n\treturn 1;\n}\n\nsqueakFileOffsetType sqFileGetPosition(SQFile *f) {\n\t/* Return the current position of the file's read/write head. */\n\n\tsqueakFileOffsetType position;\n\n\tif (!sqFileValid(f))\n\t\treturn interpreterProxy->success(false);\n\tpentry(sqFileGetPosition);\n\tif (f->isStdioStream\n\t && !f->writable)\n\t\treturn pexit(f->lastChar == EOF ? 0 : 1);\n\tposition = ftell(getFile(f));\n\tif (position == -1)\n\t\treturn interpreterProxy->success(false);\n\treturn position;\n}\n\nsqInt sqFileInit(void) {\n\t/* Create a session ID that is unlikely to be repeated.\n\t   Zero is never used for a valid session number.\n\t   Should be called once at startup time.\n\t*/\n#if VM_PROXY_MINOR > 6\n\tthisSession = interpreterProxy->getThisSessionID();\n#else\n\tthisSession = ioLowResMSecs() + time(NULL);\n\tif (thisSession == 0) thisSession = 1;\t/* don't use 0 */\n#endif\n\treturn 1;\n}\n\nsqInt sqFileShutdown(void) {\n\treturn 1;\n}\n\nsqInt sqFileOpen(SQFile *f, char* sqFileName, sqInt sqFileNameSize, sqInt writeFlag) {\n\t/* Opens the given file using the supplied sqFile structure\n\t   to record its state. Fails with no side effects if f is\n\t   already open. Files are always opened in binary mode;\n\t   Squeak must take care of any line-end character mapping.\n\t*/\n\n\tchar cFileName[1001];\n\n\t/* don't open an already open file */\n\tif (sqFileValid(f))\n\t\treturn interpreterProxy->success(false);\n\n\t/* copy the file name into a null-terminated C string */\n\tif (sqFileNameSize > 1000) {\n\t\treturn interpreterProxy->success(false);\n\t}\n\tinterpreterProxy->ioFilenamefromStringofLengthresolveAliases(cFileName, sqFileName, sqFileNameSize, true);\n\n\tif (writeFlag) {\n\t\t/* First try to open an existing file read/write: */\n\t\tsetFile(f, fopen(cFileName, \"r+b\"));\n\t\tif (getFile(f) == NULL) {\n\t\t\t/* Previous call fails if file does not exist. In that case,\n\t\t\t   try opening it in write mode to create a new, empty file.\n\t\t\t*/\n\t\t\tsetFile(f, fopen(cFileName, \"w+b\"));\n\t\t\tif (getFile(f) != NULL) {\n\t\t\t    char type[4],creator[4];\n\t\t\t\tdir_GetMacFileTypeAndCreator(sqFileName, sqFileNameSize, type, creator);\n\t\t\t\tif (strncmp(type,\"BINA\",4) == 0 || strncmp(type,\"????\",4) == 0 || *(int *)type == 0 ) \n\t\t\t\t    dir_SetMacFileTypeAndCreator(sqFileName, sqFileNameSize,\"TEXT\",\"R*ch\");\t\n\t\t\t}\n\t\t}\n\t\tf->writable = true;\n\t} else {\n\t\tsetFile(f, fopen(cFileName, \"rb\"));\n\t\tf->writable = false;\n\t}\n\n\tif (getFile(f) == NULL) {\n\t\tf->sessionID = 0;\n\t\tsetSize(f, 0);\n\t\treturn interpreterProxy->success(false);\n\t} else {\n\t\tFILE *file= getFile(f);\n\t\tf->sessionID = thisSession;\n\t\t/* compute and cache file size */\n\t\tfseek(file, 0, SEEK_END);\n\t\tsetSize(f, ftell(file));\n\t\tfseek(file, 0, SEEK_SET);\n\t}\n\tf->lastOp = UNCOMMITTED;\n\treturn 1;\n}\n\n/*\n * Fill-in files with handles for stdin, stdout and stderr as available and\n * answer a bit-mask of the availability, 1 corresponding to stdin, 2 to stdout\n * and 4 to stderr, with 0 on error or unavailablity.\n */\nsqInt\nsqFileStdioHandlesInto(SQFile files[3])\n{\n#if defined(_IONBF) && 0\n\tif (isatty(fileno(stdin)))\n# if 0\n\t\tsetvbuf(stdin,0,_IONBF,1);\n# else\n\t\tsetvbuf(stdin,0,_IOFBF,0);\n# endif\n#endif\n\tfiles[0].sessionID = thisSession;\n\tfiles[0].file = stdin;\n\tfiles[0].fileSize = 0;\n\tfiles[0].writable = false;\n\tfiles[0].lastOp = READ_OP;\n\tfiles[0].isStdioStream = true;\n\tfiles[0].lastChar = EOF;\n\n\tfiles[1].sessionID = thisSession;\n\tfiles[1].file = stdout;\n\tfiles[1].fileSize = 0;\n\tfiles[1].writable = true;\n\tfiles[1].isStdioStream = true;\n\tfiles[1].lastChar = EOF;\n\tfiles[1].lastOp = WRITE_OP;\n\n\tfiles[2].sessionID = thisSession;\n\tfiles[2].file = stderr;\n\tfiles[2].fileSize = 0;\n\tfiles[2].writable = true;\n\tfiles[2].isStdioStream = true;\n\tfiles[2].lastChar = EOF;\n\tfiles[2].lastOp = WRITE_OP;\n\n\treturn 7;\n}\n\nsize_t sqFileReadIntoAt(SQFile *f, size_t count, char* byteArrayIndex, size_t startIndex) {\n\t/* Read count bytes from the given file into byteArray starting at\n\t   startIndex. byteArray is the address of the first byte of a\n\t   Squeak bytes object (e.g. String or ByteArray). startIndex\n\t   is a zero-based index; that is a startIndex of 0 starts writing\n\t   at the first byte of byteArray.\n\t*/\n\n\tchar *dst;\n\tsize_t bytesRead;\n\tFILE *file;\n#if COGMTVM\n\tsqInt myThreadIndex;\n#endif\n\n\tif (!sqFileValid(f))\n\t\treturn interpreterProxy->success(false);\n\tpentry(sqFileReadIntoAt);\n\tfile = getFile(f);\n\tif (f->writable) {\n\t\tif (f->isStdioStream)\n\t\t\treturn interpreterProxy->success(false);\n\t\tif (f->lastOp == WRITE_OP)\n\t\t\tfseek(file, 0, SEEK_CUR);  /* seek between writing and reading */\n\t}\n\tdst = byteArrayIndex + startIndex;\n#if COGMTVM\n\tif (f->isStdioStream) {\n\t\tif (interpreterProxy->isInMemory((sqInt)f)\n\t\t && interpreterProxy->isYoung((sqInt)f)\n\t\t || interpreterProxy->isInMemory((sqInt)dst)\n\t\t && interpreterProxy->isYoung((sqInt)dst)) {\n\t\t\tinterpreterProxy->primitiveFailFor(PrimErrObjectMayMove);\n\t\t\treturn 0;\n\t\t}\n\t\tmyThreadIndex = interpreterProxy->disownVM(DisownVMLockOutFullGC);\n\t}\n#endif\n\tdo {\n\t\tclearerr(file);\n\t\tbytesRead = fread(dst, 1, count, file);\n\t} while (bytesRead <= 0 && ferror(file) && errno == EINTR);\n#if COGMTVM\n\tif (f->isStdioStream)\n\t\tinterpreterProxy->ownVM(myThreadIndex);\n#endif\n\t/* support for skipping back 1 character for stdio streams */\n\tif (f->isStdioStream)\n\t\tif (bytesRead > 0)\n\t\t\tf->lastChar = dst[bytesRead-1];\n\tf->lastOp = READ_OP;\n\treturn pexit(bytesRead);\n}\n\nsqInt sqFileRenameOldSizeNewSize(char* oldNameIndex, sqInt oldNameSize, char* newNameIndex, sqInt newNameSize) {\n\tchar cOldName[1000], cNewName[1000];\n\tint err;\n\n\tif ((oldNameSize >= 1000) || (newNameSize >= 1000)) {\n\t\treturn interpreterProxy->success(false);\n\t}\n\n\t/* copy the file names into null-terminated C strings */\n\tinterpreterProxy->ioFilenamefromStringofLengthresolveAliases(cOldName, oldNameIndex, oldNameSize, false);\n\n\tinterpreterProxy->ioFilenamefromStringofLengthresolveAliases(cNewName, newNameIndex, newNameSize, false);\n\n\terr = rename(cOldName, cNewName);\n\tif (err) {\n\t\treturn interpreterProxy->success(false);\n\t}\n\treturn 1;\n}\n\nsqInt sqFileSetPosition(SQFile *f, squeakFileOffsetType position) {\n\t/* Set the file's read/write head to the given position. */\n\n\tif (!sqFileValid(f))\n\t\treturn interpreterProxy->success(false);\n\tif (f->isStdioStream) {\n\t\tpentry(sqFileSetPosition);\n\t\t/* support one character of pushback for stdio streams. */\n\t\tif (!f->writable\n\t\t && f->lastChar != EOF) {\n\t\t\tsqueakFileOffsetType currentPos = f->lastChar == EOF ? 0 : 1;\n\t\t\tif (currentPos == position)\n\t\t\t\treturn pexit(1);\n\t\t\tif (currentPos - 1 == position) {\n\t\t\t\tungetc(f->lastChar, getFile(f));\n\t\t\t\tf->lastChar = EOF;\n\t\t\t\treturn pexit(1);\n\t\t\t}\n\t\t}\n\t\tpfail();\n\t\treturn interpreterProxy->success(false);\n\t}\n\tfseek(getFile(f), position, SEEK_SET);\n\tf->lastOp = UNCOMMITTED;\n\treturn 1;\n}\n\nsqueakFileOffsetType sqFileSize(SQFile *f) {\n\t/* Return the length of the given file. */\n\n\tif (!sqFileValid(f))\n\t\treturn interpreterProxy->success(false);\n\tif (f->isStdioStream)\n\t\treturn interpreterProxy->success(false);\n\treturn getSize(f);\n}\n\nsqInt sqFileFlush(SQFile *f) {\n\n\tif (!sqFileValid(f))\n\t\treturn interpreterProxy->success(false);\n\tpentry(sqFileFlush);\n\tfflush(getFile(f));\n\treturn 1;\n}\n\nsqInt sqFileTruncate(SQFile *f,squeakFileOffsetType offset) {\n\n\tif (!sqFileValid(f))\n\t\treturn interpreterProxy->success(false);\n \tif (sqFTruncate(getFile(f), offset))\n\t\treturn interpreterProxy->success(false);\n\tsetSize(f, ftell(getFile(f)));\n\treturn 1;\n}\n\n\nsqInt sqFileValid(SQFile *f) {\n\treturn (\n\t\t(f != NULL) &&\n\t\t(getFile(f) != NULL) &&\n\t\t(f->sessionID == thisSession));\n}\n\nsize_t sqFileWriteFromAt(SQFile *f, size_t count, char* byteArrayIndex, size_t startIndex) {\n\t/* Write count bytes to the given writable file starting at startIndex\n\t   in the given byteArray. (See comment in sqFileReadIntoAt for interpretation\n\t   of byteArray and startIndex).\n\t*/\n\n\tchar *src;\n\tsize_t bytesWritten;\n\tsqueakFileOffsetType position;\n\tFILE *file;\n\n\tif (!(sqFileValid(f) && f->writable))\n\t\treturn interpreterProxy->success(false);\n\tpentry(sqFileWriteFromAt);\n\tfile = getFile(f);\n\tif (f->lastOp == READ_OP) fseek(file, 0, SEEK_CUR);  /* seek between reading and writing */\n\tsrc = byteArrayIndex + startIndex;\n\tbytesWritten = fwrite(src, 1, count, file);\n\n\tposition = ftell(file);\n\tif (position > getSize(f)) {\n\t\tsetSize(f, position);  /* update file size */\n\t}\n\n\tif (bytesWritten != count) {\n\t\tinterpreterProxy->success(false);\n\t}\n\tf->lastOp = WRITE_OP;\n\treturn pexit(bytesWritten);\n}\n\nsqInt sqFileThisSession() {\n\treturn thisSession;\n}\n#endif /* NO_STD_FILE_SUPPORT */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/FloatMathPlugin.h",
    "content": "/* we only declare those functions from fdlibm that we actually use\r\n   and avoid including fdlibm.h alltogether as it conflicts with math.h */\r\n\r\n/* #define NO_ISNAN -- do NOT define this by default but in command line*/\r\n\r\n#ifndef NO_ISNAN\r\n/* by default we use fdlibm's isnan() */\r\nextern int isnan(double);\r\n#endif\r\nextern double __ieee754_sqrt(double);\r\n\r\nextern double __ieee754_acos(double);\r\nextern double __ieee754_acosh(double);\r\nextern double __ieee754_asin(double);\r\nextern double __ieee754_asinh(double);\r\nextern double __ieee754_atan(double);\r\nextern double __ieee754_atan2(double,double);\r\nextern double __ieee754_atanh(double);\r\nextern double __ieee754_cos(double);\r\nextern double __ieee754_cosh(double);\r\nextern double __ieee754_exp(double);\r\nextern double __ieee754_fmod(double,double);\r\nextern double __ieee754_modf(double,double*);\r\nextern double __ieee754_hypot(double,double);\r\nextern double __ieee754_log10(double);\r\nextern double __ieee754_log(double);\r\nextern double __ieee754_pow(double,double);\r\nextern double __ieee754_sin(double);\r\nextern double __ieee754_sinh(double);\r\nextern double __ieee754_sqrt(double);\r\nextern double __ieee754_tan(double);\r\nextern double __ieee754_tanh(double);\r\nextern double __ieee754_ldexp(double, int);\r\n\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/FloatMathPlugin.st",
    "content": "'From Croquet1.0beta of 24 March 2006 [latest update: #6665] on 26 March 2006 at 6:00:28 pm'!\rInterpreterPlugin subclass: #FloatMathPlugin\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'VMMaker-Plugins'!\r\r!FloatMathPlugin methodsFor: 'float primitives' stamp: 'ar 3/26/2006 15:24'!\rprimitiveArcCos\r\t\"Computes acos(receiver)\"\r\t| rcvr result |\r\tself export: true.\r\tself var: #rcvr type: 'double'.\r\tself var: #result type: 'double'.\r\trcvr := interpreterProxy stackFloatValue: 0.\r\t(interpreterProxy failed) ifTrue:[^nil].\r\tresult := self cCode: '__ieee754_acos(rcvr)' inSmalltalk: [rcvr arcCos].\r\tinterpreterProxy pop: interpreterProxy methodArgumentCount + 1.\r\tinterpreterProxy pushFloat: result.! !\r\r!FloatMathPlugin methodsFor: 'float primitives' stamp: 'ar 3/26/2006 15:24'!\rprimitiveArcCosH\r\t\"Computes acosh(receiver)\"\r\t| rcvr result |\r\tself export: true.\r\tself var: #rcvr type: 'double'.\r\tself var: #result type: 'double'.\r\trcvr := interpreterProxy stackFloatValue: 0.\r\t(interpreterProxy failed) ifTrue:[^nil].\r\tresult := self cCode: '__ieee754_acosh(rcvr)' inSmalltalk: [rcvr arcCosH].\r\tinterpreterProxy pop: interpreterProxy methodArgumentCount + 1.\r\tinterpreterProxy pushFloat: result.! !\r\r!FloatMathPlugin methodsFor: 'float primitives' stamp: 'ar 3/26/2006 15:24'!\rprimitiveArcSin\r\t\"Computes asin(receiver)\"\r\t| rcvr result |\r\tself export: true.\r\tself var: #rcvr type: 'double'.\r\tself var: #result type: 'double'.\r\trcvr := interpreterProxy stackFloatValue: 0.\r\t(interpreterProxy failed) ifTrue:[^nil].\r\tresult := self cCode: '__ieee754_asin(rcvr)' inSmalltalk: [rcvr arcSin].\r\tinterpreterProxy pop: interpreterProxy methodArgumentCount + 1.\r\tinterpreterProxy pushFloat: result.! !\r\r!FloatMathPlugin methodsFor: 'float primitives' stamp: 'ar 3/26/2006 15:24'!\rprimitiveArcSinH\r\t\"Computes asinh(receiver)\"\r\t| rcvr result |\r\tself export: true.\r\tself var: #rcvr type: 'double'.\r\tself var: #result type: 'double'.\r\trcvr := interpreterProxy stackFloatValue: 0.\r\t(interpreterProxy failed) ifTrue:[^nil].\r\tresult := self cCode: '__ieee754_asinh(rcvr)' inSmalltalk: [rcvr arcSinH].\r\tinterpreterProxy pop: interpreterProxy methodArgumentCount + 1.\r\tinterpreterProxy pushFloat: result.! !\r\r!FloatMathPlugin methodsFor: 'float primitives' stamp: 'ar 3/26/2006 15:24'!\rprimitiveArcTan\r\t\"Computes atan(receiver)\"\r\t| rcvr result |\r\tself export: true.\r\tself var: #rcvr type: 'double'.\r\tself var: #result type: 'double'.\r\trcvr := interpreterProxy stackFloatValue: 0.\r\t(interpreterProxy failed) ifTrue:[^nil].\r\tresult := self cCode: '__ieee754_atan(rcvr)' inSmalltalk: [rcvr arcTan].\r\tinterpreterProxy pop: interpreterProxy methodArgumentCount + 1.\r\tinterpreterProxy pushFloat: result.! !\r\r!FloatMathPlugin methodsFor: 'float primitives' stamp: 'ar 3/26/2006 15:24'!\rprimitiveArcTan2\r\t\"Computes atan2(receiver, arg)\"\r\t| rcvr arg result |\r\tself export: true.\r\tself var: #rcvr type: 'double'.\r\tself var: #arg type: 'double'.\r\tself var: #result type: 'double'.\r\targ := interpreterProxy stackFloatValue: 0.\r\trcvr := interpreterProxy stackFloatValue: 1.\r\t(interpreterProxy failed) ifTrue:[^nil].\r\tresult := self cCode: '__ieee754_atan2(rcvr, arg)' inSmalltalk: [rcvr arcTan: arg].\r\tinterpreterProxy pop: interpreterProxy methodArgumentCount + 1.\r\tinterpreterProxy pushFloat: result.! !\r\r!FloatMathPlugin methodsFor: 'float primitives' stamp: 'ar 3/26/2006 15:24'!\rprimitiveArcTanH\r\t\"Computes atanh(receiver)\"\r\t| rcvr result |\r\tself export: true.\r\tself var: #rcvr type: 'double'.\r\tself var: #result type: 'double'.\r\trcvr := interpreterProxy stackFloatValue: 0.\r\t(interpreterProxy failed) ifTrue:[^nil].\r\tresult := self cCode: '__ieee754_atanh(rcvr)' inSmalltalk: [rcvr arcTanH].\r\tinterpreterProxy pop: interpreterProxy methodArgumentCount + 1.\r\tinterpreterProxy pushFloat: result.! !\r\r!FloatMathPlugin methodsFor: 'float primitives' stamp: 'ar 3/26/2006 15:24'!\rprimitiveCos\r\t\"Computes cos(receiver)\"\r\t| rcvr result |\r\tself export: true.\r\tself var: #rcvr type: 'double'.\r\tself var: #result type: 'double'.\r\trcvr := interpreterProxy stackFloatValue: 0.\r\t(interpreterProxy failed) ifTrue:[^nil].\r\tresult := self cCode: '__ieee754_cos(rcvr)' inSmalltalk: [rcvr cos].\r\tinterpreterProxy pop: interpreterProxy methodArgumentCount + 1.\r\tinterpreterProxy pushFloat: result.! !\r\r!FloatMathPlugin methodsFor: 'float primitives' stamp: 'ar 3/26/2006 15:24'!\rprimitiveCosH\r\t\"Computes cosh(receiver)\"\r\t| rcvr result |\r\tself export: true.\r\tself var: #rcvr type: 'double'.\r\tself var: #result type: 'double'.\r\trcvr := interpreterProxy stackFloatValue: 0.\r\t(interpreterProxy failed) ifTrue:[^nil].\r\tresult := self cCode: '__ieee754_cosh(rcvr)' inSmalltalk: [rcvr cosH].\r\tinterpreterProxy pop: interpreterProxy methodArgumentCount + 1.\r\tinterpreterProxy pushFloat: result.! !\r\r!FloatMathPlugin methodsFor: 'float primitives' stamp: 'ar 11/6/2005 03:01'!\rprimitiveExp\r\t\"Computes E raised to the receiver power.\"\r\t| rcvr result |\r\tself export: true.\r\tself var: #rcvr type: 'double'.\r\tself var: #result type: 'double'.\r\trcvr := interpreterProxy stackFloatValue: 0.\r\t(interpreterProxy failed) ifTrue:[^nil].\r\tresult := (self cCode: '__ieee754_exp(rcvr)' inSmalltalk: [rcvr exp]).\r\tinterpreterProxy pop: interpreterProxy methodArgumentCount + 1.\r\tinterpreterProxy pushFloat: result.! !\r\r!FloatMathPlugin methodsFor: 'float primitives' stamp: 'ar 3/26/2006 15:21'!\rprimitiveFMod\r\t\"Computes receiver \\\\ arg\"\r\t| rcvr arg result |\r\tself export: true.\r\tself var: #rcvr type: 'double'.\r\tself var: #arg type: 'double'.\r\tself var: #result type: 'double'.\r\targ := interpreterProxy stackFloatValue: 0.\r\trcvr := interpreterProxy stackFloatValue: 1.\r\t(interpreterProxy failed) ifTrue:[^nil].\r\tresult := self cCode: '__ieee754_fmod(rcvr, arg)' inSmalltalk: [rcvr \\\\ arg].\r\tinterpreterProxy pop: interpreterProxy methodArgumentCount + 1.\r\tinterpreterProxy pushFloat: result.! !\r\r!FloatMathPlugin methodsFor: 'float primitives' stamp: 'ar 3/26/2006 15:21'!\rprimitiveFractionalPart\r\t\"Computes receiver \\\\ 1.0\"\r\t| rcvr result trunc|\r\tself export: true.\r\tself var: #rcvr type: 'double'.\r\tself var: #result type: 'double'.\r\tself var: #trunc type: 'double'.\r\trcvr := interpreterProxy stackFloatValue: 0.\r\t(interpreterProxy failed) ifTrue:[^nil].\r\tresult := self cCode: '__ieee754_modf(rcvr, &trunc)' inSmalltalk: [rcvr fractionPart].\r\tinterpreterProxy pop: interpreterProxy methodArgumentCount + 1.\r\tinterpreterProxy pushFloat: result.! !\r\r!FloatMathPlugin methodsFor: 'float primitives' stamp: 'ar 11/6/2005 16:13'!\rprimitiveHypot\r\t\"hypot(x,y) returns sqrt(x^2+y^2) with error less  than 1 ulps\"\r\t| rcvr arg result |\r\tself export: true.\r\tself var: #rcvr type: 'double'.\r\tself var: #arg type: 'double'.\r\tself var: #result type: 'double'.\r\targ := interpreterProxy stackFloatValue: 0.\r\trcvr := interpreterProxy stackFloatValue: 1.\r\t(interpreterProxy failed) ifTrue:[^nil].\r\tresult := self cCode: '__ieee754_hypot(rcvr, arg)' inSmalltalk: [rcvr hypot: arg].\r\tinterpreterProxy pop: interpreterProxy methodArgumentCount + 1.\r\tinterpreterProxy pushFloat: result.! !\r\r!FloatMathPlugin methodsFor: 'float primitives' stamp: 'ar 3/26/2006 15:25'!\rprimitiveLog10\r\t\"Computes log10(receiver)\"\r\t| rcvr result |\r\tself export: true.\r\tself var: #rcvr type: 'double'.\r\tself var: #result type: 'double'.\r\trcvr := interpreterProxy stackFloatValue: 0.\r\t(interpreterProxy failed) ifTrue:[^nil].\r\trcvr < 0.0 ifTrue:[^interpreterProxy primitiveFail].\r\tresult := self cCode: '__ieee754_log10(rcvr)' inSmalltalk: [rcvr log: 10].\r\tinterpreterProxy pop: interpreterProxy methodArgumentCount + 1.\r\tinterpreterProxy pushFloat: result.! !\r\r!FloatMathPlugin methodsFor: 'float primitives' stamp: 'ar 3/26/2006 17:24'!\rprimitiveLogN\r\t\"Computes log(receiver)\"\r\t| rcvr result |\r\tself export: true.\r\tself var: #rcvr type: 'double'.\r\tself var: #result type: 'double'.\r\trcvr := interpreterProxy stackFloatValue: 0.\r\t(interpreterProxy failed) ifTrue:[^nil].\r\trcvr < 0.0 ifTrue:[^interpreterProxy primitiveFail].\r\tresult := self cCode: '__ieee754_log(rcvr)' inSmalltalk: [rcvr ln].\r\tinterpreterProxy pop: interpreterProxy methodArgumentCount + 1.\r\tinterpreterProxy pushFloat: result.! !\r\r!FloatMathPlugin methodsFor: 'float primitives' stamp: 'ar 3/26/2006 15:23'!\rprimitiveRaisedToPower\r\t\"Computes receiver**arg\"\r\t| rcvr arg result |\r\tself export: true.\r\tself var: #rcvr type: 'double'.\r\tself var: #arg type: 'double'.\r\tself var: #result type: 'double'.\r\targ := interpreterProxy stackFloatValue: 0.\r\trcvr := interpreterProxy stackFloatValue: 1.\r\t(interpreterProxy failed) ifTrue:[^nil].\r\tresult := self cCode: '__ieee754_pow(rcvr, arg)' inSmalltalk: [rcvr raisedTo: arg].\r\tinterpreterProxy pop: interpreterProxy methodArgumentCount + 1.\r\tinterpreterProxy pushFloat: result.! !\r\r!FloatMathPlugin methodsFor: 'float primitives' stamp: 'ar 3/26/2006 15:23'!\rprimitiveSin\r\t\"Computes sin(receiver)\"\r\t| rcvr result |\r\tself export: true.\r\tself var: #rcvr type: 'double'.\r\tself var: #result type: 'double'.\r\trcvr := interpreterProxy stackFloatValue: 0.\r\t(interpreterProxy failed) ifTrue:[^nil].\r\tresult := self cCode: '__ieee754_sin(rcvr)' inSmalltalk: [rcvr sin].\r\tinterpreterProxy pop: interpreterProxy methodArgumentCount + 1.\r\tinterpreterProxy pushFloat: result.! !\r\r!FloatMathPlugin methodsFor: 'float primitives' stamp: 'ar 3/26/2006 15:23'!\rprimitiveSinH\r\t\"Computes sinh(receiver)\"\r\t| rcvr result |\r\tself export: true.\r\tself var: #rcvr type: 'double'.\r\tself var: #result type: 'double'.\r\trcvr := interpreterProxy stackFloatValue: 0.\r\t(interpreterProxy failed) ifTrue:[^nil].\r\tresult := self cCode: '__ieee754_sinh(rcvr)' inSmalltalk: [rcvr sinH].\r\tinterpreterProxy pop: interpreterProxy methodArgumentCount + 1.\r\tinterpreterProxy pushFloat: result.! !\r\r!FloatMathPlugin methodsFor: 'float primitives' stamp: 'ar 3/26/2006 15:22'!\rprimitiveSqrt\r\t\"Computes sqrt(receiver)\"\r\t| rcvr result |\r\tself export: true.\r\tself var: #rcvr type: 'double'.\r\tself var: #result type: 'double'.\r\trcvr := interpreterProxy stackFloatValue: 0.\r\t(interpreterProxy failed) ifTrue:[^nil].\r\trcvr < 0.0 ifTrue:[^interpreterProxy primitiveFail].\r\tresult := self cCode: '__ieee754_sqrt(rcvr)' inSmalltalk: [rcvr sqrt].\r\tinterpreterProxy pop: interpreterProxy methodArgumentCount + 1.\r\tinterpreterProxy pushFloat: result.! !\r\r!FloatMathPlugin methodsFor: 'float primitives' stamp: 'ar 3/26/2006 15:23'!\rprimitiveTan\r\t\"Computes tan(receiver)\"\r\t| rcvr result |\r\tself export: true.\r\tself var: #rcvr type: 'double'.\r\tself var: #result type: 'double'.\r\trcvr := interpreterProxy stackFloatValue: 0.\r\t(interpreterProxy failed) ifTrue:[^nil].\r\tresult := self cCode: '__ieee754_tan(rcvr)' inSmalltalk: [rcvr tan].\r\tinterpreterProxy pop: interpreterProxy methodArgumentCount + 1.\r\tinterpreterProxy pushFloat: result.! !\r\r!FloatMathPlugin methodsFor: 'float primitives' stamp: 'ar 3/26/2006 15:23'!\rprimitiveTanH\r\t\"Computes tanh(receiver)\"\r\t| rcvr result |\r\tself export: true.\r\tself var: #rcvr type: 'double'.\r\tself var: #result type: 'double'.\r\trcvr := interpreterProxy stackFloatValue: 0.\r\t(interpreterProxy failed) ifTrue:[^nil].\r\tresult := self cCode: '__ieee754_tanh(rcvr)' inSmalltalk: [rcvr tanH].\r\tinterpreterProxy pop: interpreterProxy methodArgumentCount + 1.\r\tinterpreterProxy pushFloat: result.! !\r\r!FloatMathPlugin methodsFor: 'float primitives' stamp: 'ar 3/26/2006 14:06'!\rprimitiveTimesTwoPower\r\t\"Computes E raised to the receiver power.\"\r\t| rcvr arg result |\r\tself export: true.\r\tself var: #rcvr type: 'double'.\r\tself var: #result type: 'double'.\r\targ := interpreterProxy stackIntegerValue: 0.\r\trcvr := interpreterProxy stackFloatValue: 1.\r\t(interpreterProxy failed) ifTrue:[^nil].\r\tresult := self cCode: '__ieee754_ldexp(rcvr, arg)' inSmalltalk: [rcvr timesTwoPower: arg].\r\tinterpreterProxy pop: interpreterProxy methodArgumentCount + 1.\r\tinterpreterProxy pushFloat: result.! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rFloatMathPlugin class\r\tinstanceVariableNames: ''!\r\r!FloatMathPlugin class methodsFor: 'as yet unclassified' stamp: 'ar 11/6/2005 02:48'!\rhasHeaderFile\r\t\"If there is a single intrinsic header file to be associated with the plugin, here is where you want to flag\"\r\t^true! !\r\r!FloatMathPlugin class methodsFor: 'as yet unclassified' stamp: 'ar 11/6/2005 16:20'!\rrequiresCrossPlatformFiles\r\t\"default is ok for most, any plugin needing platform specific files must say so\"\r\t^true! !\r"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/FloatMathPluginTests.st",
    "content": "'From Croquet1.0beta of 24 March 2006 [latest update: #6665] on 26 March 2006 at 6:00:26 pm'!\rTestCase subclass: #FloatMathPluginTests\r\tinstanceVariableNames: 'random'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'VMMaker-Plugins'!\r!FloatMathPluginTests commentStamp: '<historical>' prior: 0!\rFloatMathPluginTests buildSuite run.!\r\r\r!FloatMathPluginTests methodsFor: 'running' stamp: 'ar 3/26/2006 16:52'!\rmakeLargeTestData\r\t\"self basicNew makeLargeTestData\"\r\tself makeTestData: 'sin-large.dat' using:[:f| self sin: f] seed: 432567 rounds: 1000000.\r\tself makeTestData: 'log-large.dat' using:[:f| self ln: f abs] seed: 432567 rounds: 1000000.\r\tself makeTestData: 'sqrt-large.dat' using:[:f| self sqrt: f abs] seed: 432567 rounds: 1000000.\r\tself makeTestData: 'atan-large.dat' using:[:f| self arcTan: f] seed: 432567 rounds: 1000000.\r\tself makeTestData: 'exp-large.dat' using:[:f| self exp: f] seed: 432567 rounds: 1000000.\r! !\r\r!FloatMathPluginTests methodsFor: 'running' stamp: 'ar 3/26/2006 16:52'!\rmakeSmallTestData\r\t\"self basicNew makeSmallTestData\"\r\tself makeTestData: 'sin-small.dat' using:[:f| self sin: f] seed: 321567 rounds: 10000.\r\tself makeTestData: 'log-small.dat' using:[:f| self ln: f abs] seed: 321567 rounds: 10000.\r\tself makeTestData: 'sqrt-small.dat' using:[:f| self sqrt: f abs] seed: 321567 rounds: 10000.\r\tself makeTestData: 'atan-small.dat' using:[:f| self arcTan: f] seed: 321567 rounds: 10000.\r\tself makeTestData: 'exp-small.dat' using:[:f| self exp: f] seed: 321567 rounds: 10000.\r! !\r\r!FloatMathPluginTests methodsFor: 'running' stamp: 'ar 3/26/2006 16:11'!\rmakeTestData: fileName using: aBlock seed: seed rounds: rounds\r\t| bytes out float result |\r\tbytes := ByteArray new: 8.\r\tout := FileStream newFileNamed: fileName.\r\t[\r\t\tout binary. \r\t\tout nextNumber: 4 put: rounds.\r\t\tout nextNumber: 4 put: seed.\r\t\trandom := Random seed: seed.\r\t\tfloat := Float basicNew: 2.\r\t\t'Creating test data for: ', fileName \r\t\t\tdisplayProgressAt: Sensor cursorPoint \r\t\t\tfrom: 1 to: rounds during:[:bar|\r\t\t\t\t1 to: rounds do:[:i|\r\t\t\t\t\ti \\\\ 10000 = 0 ifTrue:[bar value: i].\r\t\t\t\t\t[1 to: 8 do:[:j| bytes at: j put: (random nextInt: 256)-1].\r\t\t\t\t\tfloat basicAt: 1 put: (bytes unsignedLongAt: 1 bigEndian: true).\r\t\t\t\t\tfloat basicAt: 2 put: (bytes unsignedLongAt: 5 bigEndian: true).\r\t\t\t\t\tfloat isNaN] whileTrue.\r\t\t\t\t\tresult := aBlock value: float.\r\t\t\t\t\tout nextNumber: 4 put: (result basicAt: 1).\r\t\t\t\t\tout nextNumber: 4 put: (result basicAt: 2).\r\t\t\t\t].\r\t\t\t].\r\t] ensure:[out close].\r! !\r\r!FloatMathPluginTests methodsFor: 'running' stamp: 'ar 3/26/2006 16:58'!\rrunTest: aBlock\r\t| bytes out float result |\r\tbytes := ByteArray new: 8.\r\tout := WriteStream on: ByteArray new.\r\tfloat := Float basicNew: 2.\r\t1 to: 10000 do:[:i|\r\t\t[1 to: 8 do:[:j| bytes at: j put: (random nextInt: 256)-1].\r\t\tfloat basicAt: 1 put: (bytes unsignedLongAt: 1 bigEndian: true).\r\t\tfloat basicAt: 2 put: (bytes unsignedLongAt: 5 bigEndian: true).\r\t\tfloat isNaN] whileTrue.\r\t\tresult := aBlock value: float.\r\t\tout nextNumber: 4 put: (result basicAt: 1).\r\t\tout nextNumber: 4 put: (result basicAt: 2).\r\t].\r\t^self md5HashMessage: out contents.! !\r\r!FloatMathPluginTests methodsFor: 'running' stamp: 'ar 3/26/2006 14:38'!\rsetUp\r\trandom := Random seed: 253213.! !\r\r!FloatMathPluginTests methodsFor: 'running' stamp: 'ar 3/26/2006 16:53'!\rverifyTestData: fileName using: aBlock\r\t| rounds seed bytes float result in expected count bits |\r\tin := [FileStream readOnlyFileNamed: fileName] \r\t\t\ton: FileDoesNotExistException \r\t\t\tdo:[:ex| ex return: nil].\r\tin ifNil:[^nil].\r\tcount := bits := 0.\r\tbytes := ByteArray new: 8.\r\t[\r\t\tin binary.\r\t\trounds := in nextNumber: 4.\r\t\tseed := in nextNumber: 4.\r\t\trandom := Random seed: seed.\r\t\tfloat := Float basicNew: 2.\r\t\texpected := Float basicNew: 2.\r\t\t'Verifying test data from: ', fileName \r\t\t\tdisplayProgressAt: Sensor cursorPoint \r\t\t\tfrom: 1 to: rounds during:[:bar|\r\t\t\t\t1 to: rounds do:[:i|\r\t\t\t\t\ti \\\\ 10000 = 0 ifTrue:[bar value: i].\r\t\t\t\t\t[1 to: 8 do:[:j| bytes at: j put: (random nextInt: 256)-1].\r\t\t\t\t\tfloat basicAt: 1 put: (bytes unsignedLongAt: 1 bigEndian: true).\r\t\t\t\t\tfloat basicAt: 2 put: (bytes unsignedLongAt: 5 bigEndian: true).\r\t\t\t\t\tfloat isNaN] whileTrue.\r\t\t\t\t\tresult := aBlock value: float.\r\t\t\t\t\texpected basicAt: 1 put: (in nextNumber: 4).\r\t\t\t\t\texpected basicAt: 2 put: (in nextNumber: 4).\r\t\t\t\t\t((expected isNaN and:[result isNaN]) or:[expected = result]) ifFalse:[\r\t\t\t\t\t\t(expected basicAt: 1) = (result basicAt: 1)\r\t\t\t\t\t\t\tifFalse:[self error: 'Verification failure'].\r\t\t\t\t\t\tcount := count + 1.\r\t\t\t\t\t\tbits := bits + ((expected basicAt: 2) - (result basicAt: 2)) abs.\r\t\t\t\t\t].\r\t\t\t\t].\r\t\t\t].\r\t] ensure:[in close].\r\tself assert: count = 0. \"all the same\"! !\r\r\r!FloatMathPluginTests methodsFor: 'tests' stamp: 'ar 3/26/2006 17:42'!\rtestArcCos\r\t| hash |\r\thash := self runTest:[:f| self arcCos: f].\r\tself assert: hash = 175366936335278026567589867783483480383! !\r\r!FloatMathPluginTests methodsFor: 'tests' stamp: 'ar 3/26/2006 17:44'!\rtestArcCosH\r\t| hash |\r\thash := self runTest:[:f| self arcCosH: f].\r\tself assert: hash = 6724426144112251941037505276242428134! !\r\r!FloatMathPluginTests methodsFor: 'tests' stamp: 'ar 3/26/2006 17:43'!\rtestArcSin\r\t| hash |\r\thash := self runTest:[:f| self arcSin: f].\r\tself assert: hash = 27372132577303862731837100895783885417! !\r\r!FloatMathPluginTests methodsFor: 'tests' stamp: 'ar 3/26/2006 17:42'!\rtestArcSinH\r\t| hash |\r\thash := self runTest:[:f| self arcSinH: f].\r\tself assert: hash = 255911863578190171815115260235896145802! !\r\r!FloatMathPluginTests methodsFor: 'tests' stamp: 'ar 3/26/2006 17:43'!\rtestArcTan\r\t| hash |\r\thash := self runTest:[:f| self arcTan: f].\r\tself assert: hash = 17311773710959114634056077345168823659! !\r\r!FloatMathPluginTests methodsFor: 'tests' stamp: 'ar 3/26/2006 17:51'!\rtestArcTan2\r\t| hash |\r\thash := self runTest:[:f| self arcTan2: f with: f].\r\tself assert: hash = 287068347279655848752274030373495709564! !\r\r!FloatMathPluginTests methodsFor: 'tests' stamp: 'ar 3/26/2006 17:44'!\rtestArcTanH\r\t| hash |\r\thash := self runTest:[:f| self arcTanH: f].\r\tself assert: hash = 295711907369004359459882231908879164929! !\r\r!FloatMathPluginTests methodsFor: 'tests' stamp: 'ar 3/26/2006 17:45'!\rtestCos\r\t| hash |\r\thash := self runTest:[:f| self cos: f].\r\tself assert: hash = 110207739557966732640546618158077332978! !\r\r!FloatMathPluginTests methodsFor: 'tests' stamp: 'ar 3/26/2006 17:42'!\rtestCosH\r\t| hash |\r\thash := self runTest:[:f| self cosH: f].\r\tself assert: hash = 139309299067563830037108641802292492276! !\r\r!FloatMathPluginTests methodsFor: 'tests' stamp: 'ar 3/26/2006 14:27'!\rtestExp\r\t| hash |\r\thash := self runTest:[:f| self exp: f].\r\tself assert: hash = 264681209343177480335132131244505189510! !\r\r!FloatMathPluginTests methodsFor: 'tests' stamp: 'ar 3/26/2006 14:27'!\rtestFloatAt\r\t| hash flt |\r\tflt := FloatArray new: 1.\r\thash := self runTest:[:f| flt at: 1 put: f. flt at: 1].\r\tself assert: hash = 80498428122197125691266588764018905399! !\r\r!FloatMathPluginTests methodsFor: 'tests' stamp: 'ar 3/26/2006 14:27'!\rtestFraction\r\t| hash |\r\thash := self runTest:[:f| self fractionPart: f].\r\tself assert: hash = 320444785026869345695277323179170692004! !\r\r!FloatMathPluginTests methodsFor: 'tests' stamp: 'ar 3/26/2006 17:51'!\rtestHypot\r\t| hash |\r\thash := self runTest:[:f| self hypot: f with: f+1].\r\tself assert: hash = 217113721886532765853628735806816720346! !\r\r!FloatMathPluginTests methodsFor: 'tests' stamp: 'ar 3/26/2006 14:27'!\rtestLog\r\t| hash |\r\thash := self runTest:[:f| self ln: f abs].\r\tself assert: hash = 24389651894375564945708989023746058645! !\r\r!FloatMathPluginTests methodsFor: 'tests' stamp: 'ar 3/26/2006 17:42'!\rtestLog10\r\t| hash |\r\thash := self runTest:[:f| self log10: f abs].\r\tself assert: hash = 135564553959509933253581837789050718785! !\r\r!FloatMathPluginTests methodsFor: 'tests' stamp: 'ar 3/26/2006 17:44'!\rtestSin\r\t| hash |\r\thash := self runTest:[:f| self sin: f].\r\tself assert: hash = 290162321010315440569513182938961037473! !\r\r!FloatMathPluginTests methodsFor: 'tests' stamp: 'ar 3/26/2006 17:44'!\rtestSinH\r\t| hash |\r\thash := self runTest:[:f| self sinH: f].\r\tself assert: hash = 146029709156303766079448006055284064911! !\r\r!FloatMathPluginTests methodsFor: 'tests' stamp: 'ar 3/26/2006 14:28'!\rtestSqrt\r\t| hash |\r\thash := self runTest:[:f| self sqrt: f abs].\r\tself assert: hash = 112236588358122834093969606123302196127! !\r\r!FloatMathPluginTests methodsFor: 'tests' stamp: 'ar 3/26/2006 17:45'!\rtestTan\r\t| hash |\r\thash := self runTest:[:f| self tan: f].\r\tself assert: hash = 169918898922109300293069449425089094780! !\r\r!FloatMathPluginTests methodsFor: 'tests' stamp: 'ar 3/26/2006 17:43'!\rtestTanH\r\t| hash |\r\thash := self runTest:[:f| self tanH: f].\r\tself assert: hash = 15738508136206638425252880299326548123! !\r\r!FloatMathPluginTests methodsFor: 'tests' stamp: 'ar 3/26/2006 14:28'!\rtestTimesTwoPower\r\t| hash |\r\thash := self runTest:[:f| self timesTwoPower: f with: (random nextInt: 200) - 100].\r\tself assert: hash = 278837335583284459890979576373223649870.! !\r\r\r!FloatMathPluginTests methodsFor: 'data' stamp: 'ar 3/26/2006 17:56'!\rtestAtanData\r\tself verifyTestData: 'atan-small.dat' using:[:f| self arcTan: f].\r\tself verifyTestData: 'atan-large.dat' using:[:f| self arcTan: f].\r! !\r\r!FloatMathPluginTests methodsFor: 'data' stamp: 'ar 3/26/2006 17:56'!\rtestExpData\r\tself verifyTestData: 'exp-small.dat' using:[:f| self exp: f].\r\tself verifyTestData: 'exp-large.dat' using:[:f| self exp: f].\r! !\r\r!FloatMathPluginTests methodsFor: 'data' stamp: 'ar 3/26/2006 17:56'!\rtestLogData\r\tself verifyTestData: 'log-small.dat' using:[:f| self ln: f abs].\r\tself verifyTestData: 'log-large.dat' using:[:f| self ln: f abs].\r! !\r\r!FloatMathPluginTests methodsFor: 'data' stamp: 'ar 3/26/2006 17:56'!\rtestSinData\r\tself verifyTestData: 'sin-small.dat' using:[:f| self sin: f].\r\tself verifyTestData: 'sin-large.dat' using:[:f| self sin: f].\r! !\r\r!FloatMathPluginTests methodsFor: 'data' stamp: 'ar 3/26/2006 17:56'!\rtestSqrtData\r\tself verifyTestData: 'sqrt-small.dat' using:[:f| self sqrt: f abs].\r\tself verifyTestData: 'sqrt-large.dat' using:[:f| self sqrt: f abs].! !\r\r\r!FloatMathPluginTests methodsFor: 'math' stamp: 'ar 3/26/2006 17:34'!\rarcCosH: f\r\t<primitive: 'primitiveArcCosH' module: 'FloatMathPlugin'>\r\t^self primitiveFailed! !\r\r!FloatMathPluginTests methodsFor: 'math' stamp: 'ar 3/26/2006 17:34'!\rarcCos: f\r\t<primitive: 'primitiveArcCos' module: 'FloatMathPlugin'>\r\t^self primitiveFailed! !\r\r!FloatMathPluginTests methodsFor: 'math' stamp: 'ar 3/26/2006 17:34'!\rarcSinH: f\r\t<primitive: 'primitiveArcSinH' module: 'FloatMathPlugin'>\r\t^self primitiveFailed! !\r\r!FloatMathPluginTests methodsFor: 'math' stamp: 'ar 3/26/2006 17:34'!\rarcSin: f\r\t<primitive: 'primitiveArcSin' module: 'FloatMathPlugin'>\r\t^self primitiveFailed! !\r\r!FloatMathPluginTests methodsFor: 'math' stamp: 'ar 3/26/2006 17:35'!\rarcTan2: value with: arg\r\t<primitive: 'primitiveArcTan2' module: 'FloatMathPlugin'>\r\t^self primitiveFailed! !\r\r!FloatMathPluginTests methodsFor: 'math' stamp: 'ar 3/26/2006 17:35'!\rarcTanH: value\r\t<primitive: 'primitiveArcTanH' module: 'FloatMathPlugin'>\r\t^self primitiveFailed! !\r\r!FloatMathPluginTests methodsFor: 'math' stamp: 'ar 3/26/2006 14:29'!\rarcTan: value\r\t<primitive: 'primitiveArcTan' module: 'FloatMathPlugin'>\r\t^self primitiveFailed! !\r\r!FloatMathPluginTests methodsFor: 'math' stamp: 'ar 3/26/2006 17:35'!\rcosH: value\r\t<primitive: 'primitiveCosH' module: 'FloatMathPlugin'>\r\t^self primitiveFailed! !\r\r!FloatMathPluginTests methodsFor: 'math' stamp: 'ar 3/26/2006 17:35'!\rcos: value\r\t<primitive: 'primitiveCos' module: 'FloatMathPlugin'>\r\t^self primitiveFailed! !\r\r!FloatMathPluginTests methodsFor: 'math' stamp: 'ar 3/26/2006 14:29'!\rexp: value\r\t<primitive: 'primitiveExp' module: 'FloatMathPlugin'>\r\t^self primitiveFailed! !\r\r!FloatMathPluginTests methodsFor: 'math' stamp: 'ar 3/26/2006 14:29'!\rfractionPart: value\r\t<primitive: 'primitiveFractionalPart' module: 'FloatMathPlugin'>\r\t^self primitiveFailed! !\r\r!FloatMathPluginTests methodsFor: 'math' stamp: 'ar 3/26/2006 17:36'!\rhypot: x with: y\r\t<primitive: 'primitiveHypot' module: 'FloatMathPlugin'>\r\t^self primitiveFailed! !\r\r!FloatMathPluginTests methodsFor: 'math' stamp: 'ar 3/26/2006 17:24'!\rln: value\r\t<primitive: 'primitiveLogN' module: 'FloatMathPlugin'>\r\t^self primitiveFailed! !\r\r!FloatMathPluginTests methodsFor: 'math' stamp: 'ar 3/26/2006 17:41'!\rlog10: value\r\t<primitive: 'primitiveLog10' module: 'FloatMathPlugin'>\r\t^self primitiveFailed! !\r\r!FloatMathPluginTests methodsFor: 'math' stamp: 'ar 3/26/2006 17:37'!\rsinH: value\r\t<primitive: 'primitiveSinH' module: 'FloatMathPlugin'>\r\t^self primitiveFailed! !\r\r!FloatMathPluginTests methodsFor: 'math' stamp: 'ar 3/26/2006 14:29'!\rsin: value\r\t<primitive: 'primitiveSin' module: 'FloatMathPlugin'>\r\t^self primitiveFailed! !\r\r!FloatMathPluginTests methodsFor: 'math' stamp: 'ar 3/26/2006 14:29'!\rsqrt: value\r\t<primitive: 'primitiveSqrt' module: 'FloatMathPlugin'>\r\t^self primitiveFailed! !\r\r!FloatMathPluginTests methodsFor: 'math' stamp: 'ar 3/26/2006 17:37'!\rtanH: value\r\t<primitive: 'primitiveTanH' module: 'FloatMathPlugin'>\r\t^self primitiveFailed! !\r\r!FloatMathPluginTests methodsFor: 'math' stamp: 'ar 3/26/2006 17:37'!\rtan: value\r\t<primitive: 'primitiveTan' module: 'FloatMathPlugin'>\r\t^self primitiveFailed! !\r\r!FloatMathPluginTests methodsFor: 'math' stamp: 'ar 3/26/2006 14:29'!\rtimesTwoPower: f with: arg\r\t<primitive: 'primitiveTimesTwoPower' module: 'FloatMathPlugin'>\r\t^self primitiveFailed! !\r\r\r!FloatMathPluginTests methodsFor: 'md5' stamp: 'ar 3/26/2006 15:19'!\rmd5HashMessage: aStringOrByteArray\r\t^ self md5HashStream: (ReadStream on: aStringOrByteArray asByteArray)\r! !\r\r!FloatMathPluginTests methodsFor: 'md5' stamp: 'ar 3/26/2006 15:19'!\rmd5HashStream: aStream\r\t| start buffer bytes sz n words hash large |\r\thash := Array with: 16r67452301 with: 16rEFCDAB89 with: 16r98BADCFE with: 16r10325476.\r\twords := Array new: 16.\r\tbuffer := ByteArray new: 64.\r\tstart _ aStream position.\r\t[aStream atEnd] whileFalse: [\r\t\tbytes _ aStream nextInto: buffer.\r\t\t(bytes size < 64 or:[aStream atEnd]) ifTrue:[\r\t\t\tsz := bytes size.\r\t\t\tbuffer replaceFrom: 1 to: sz with: bytes startingAt: 1.\r\t\t\tbuffer from: sz+1 to: buffer size put: 0.\r\t\t\tsz < 56 ifTrue:[\r\t\t\t\tbuffer at: sz + 1 put: 128. \"trailing bit\"\r\t\t\t] ifFalse:[\r\t\t\t\t\"not enough room for the length, so just pad this one, then...\"\r\t\t\t\tsz < 64 ifTrue:[buffer at: sz + 1 put: 128].\r\t\t\t\t1 to: 16 do:[:i| words at: i put: (buffer unsignedLongAt: i*4-3 bigEndian: false)].\r\t\t\t\tself md5Transform: words hash: hash.\r\t\t\t\t\"process one additional block of padding ending with the length\"\r\t\t\t\tbuffer atAllPut: 0.\r\t\t\t\tsz = 64 ifTrue: [buffer at: 1 put: 128].\r\t\t\t].\r\t\t\t\"Fill in the final 8 bytes with the 64-bit length in bits.\"\r\t\t\tn _ (aStream position - start) * 8.\r\t\t\t7 to: 0 by: -1 do:[:i| buffer at: (buffer size - i) put: ((n bitShift: 7-i*-8) bitAnd: 255)].\r\t\t].\r\t\t1 to: 16 do:[:i| words at: i put: (buffer unsignedLongAt: i*4-3 bigEndian: false)].\r\t\tself md5Transform: words hash: hash.\r\t].\r\tbytes := ByteArray new: 16.\r\tbytes unsignedLongAt: 1 put: (hash at: 4) bigEndian: true.\r\tbytes unsignedLongAt: 5 put: (hash at: 3) bigEndian: true.\r\tbytes unsignedLongAt: 9 put: (hash at: 2) bigEndian: true.\r\tbytes unsignedLongAt: 13 put: (hash at: 1) bigEndian: true.\r\tlarge := LargePositiveInteger new: 16.\r\t1 to: 16 do:[:i| large digitAt: i put: (bytes at: i)].\r\t^large normalize! !\r\r!FloatMathPluginTests methodsFor: 'md5' stamp: 'ar 3/26/2006 15:19'!\rmd5Transform: in hash: hash\r\t\"This adds the incoming words to the existing hash\"\r\t| a b c d |\r\ta := hash at: 1.\r\tb := hash at: 2.\r\tc := hash at: 3.\r\td := hash at: 4.\r\r\ta := self step1: a x: b y: c z: d data: (in at:  1) add: 16rD76AA478 shift: 7.\r\td := self step1: d x: a y: b z: c data: (in at:  2) add: 16rE8C7B756 shift: 12.\r\tc := self step1: c x: d y: a z: b data: (in at:  3) add: 16r242070DB shift: 17.\r\tb := self step1: b x: c y: d z: a data: (in at:  4) add: 16rC1BDCEEE shift: 22.\r\ta := self step1: a x: b y: c z: d data: (in at:  5) add: 16rF57C0FAF shift:  7.\r\td := self step1: d x: a y: b z: c data: (in at:  6) add: 16r4787C62A shift: 12.\r\tc := self step1: c x: d y: a z: b data: (in at:  7) add: 16rA8304613 shift: 17.\r\tb := self step1: b x: c y: d z: a data: (in at:  8) add: 16rFD469501 shift: 22.\r\ta := self step1: a x: b y: c z: d data: (in at:  9) add: 16r698098D8 shift:  7.\r\td := self step1: d x: a y: b z: c data: (in at: 10) add: 16r8B44F7AF shift: 12.\r\tc := self step1: c x: d y: a z: b data: (in at: 11) add: 16rFFFF5BB1 shift: 17.\r\tb := self step1: b x: c y: d z: a data: (in at: 12) add: 16r895CD7BE shift: 22.\r\ta := self step1: a x: b y: c z: d data: (in at: 13) add: 16r6B901122 shift:  7.\r\td := self step1: d x: a y: b z: c data: (in at: 14) add: 16rFD987193 shift: 12.\r\tc := self step1: c x: d y: a z: b data: (in at: 15) add: 16rA679438E shift: 17.\r\tb := self step1: b x: c y: d z: a data: (in at: 16) add: 16r49B40821 shift: 22.\r\r\ta := self step2: a x: b y: c z: d data: (in at:  2) add: 16rF61E2562 shift:  5.\r\td := self step2: d x: a y: b z: c data: (in at:  7) add: 16rC040B340 shift:  9.\r\tc := self step2: c x: d y: a z: b data: (in at: 12) add: 16r265E5A51 shift: 14.\r\tb := self step2: b x: c y: d z: a data: (in at:  1) add: 16rE9B6C7AA shift: 20.\r\ta := self step2: a x: b y: c z: d data: (in at:  6) add: 16rD62F105D shift:  5.\r\td := self step2: d x: a y: b z: c data: (in at: 11) add: 16r02441453 shift:  9.\r\tc := self step2: c x: d y: a z: b data: (in at: 16) add: 16rD8A1E681 shift: 14.\r\tb := self step2: b x: c y: d z: a data: (in at:  5) add: 16rE7D3FBC8 shift: 20.\r\ta := self step2: a x: b y: c z: d data: (in at: 10) add: 16r21E1CDE6 shift:  5.\r\td := self step2: d x: a y: b z: c data: (in at: 15) add: 16rC33707D6 shift:  9.\r\tc := self step2: c x: d y: a z: b data: (in at:  4) add: 16rF4D50D87 shift: 14.\r\tb := self step2: b x: c y: d z: a data: (in at:  9) add: 16r455A14ED shift: 20.\r\ta := self step2: a x: b y: c z: d data: (in at: 14) add: 16rA9E3E905 shift:  5.\r\td := self step2: d x: a y: b z: c data: (in at:  3) add: 16rFCEFA3F8 shift:  9.\r\tc := self step2: c x: d y: a z: b data: (in at:  8) add: 16r676F02D9 shift: 14.\r\tb := self step2: b x: c y: d z: a data: (in at: 13) add: 16r8D2A4C8A shift: 20.\r\r\ta := self step3: a x: b y: c z: d data: (in at:  6) add: 16rFFFA3942 shift:  4.\r\td := self step3: d x: a y: b z: c data: (in at:  9) add: 16r8771F681 shift: 11.\r\tc := self step3: c x: d y: a z: b data: (in at: 12) add: 16r6D9D6122 shift: 16.\r\tb := self step3: b x: c y: d z: a data: (in at: 15) add: 16rFDE5380C shift: 23.\r\ta := self step3: a x: b y: c z: d data: (in at:  2) add: 16rA4BEEA44 shift:  4.\r\td := self step3: d x: a y: b z: c data: (in at:  5) add: 16r4BDECFA9 shift: 11.\r\tc := self step3: c x: d y: a z: b data: (in at:  8) add: 16rF6BB4B60 shift: 16.\r\tb := self step3: b x: c y: d z: a data: (in at: 11) add: 16rBEBFBC70 shift: 23.\r\ta := self step3: a x: b y: c z: d data: (in at: 14) add: 16r289B7EC6 shift:  4.\r\td := self step3: d x: a y: b z: c data: (in at:  1) add: 16rEAA127FA shift: 11.\r\tc := self step3: c x: d y: a z: b data: (in at:  4) add: 16rD4EF3085 shift: 16.\r\tb := self step3: b x: c y: d z: a data: (in at:  7) add: 16r04881D05 shift: 23.\r\ta := self step3: a x: b y: c z: d data: (in at: 10) add: 16rD9D4D039 shift:  4.\r\td := self step3: d x: a y: b z: c data: (in at: 13) add: 16rE6DB99E5 shift: 11.\r\tc := self step3: c x: d y: a z: b data: (in at: 16) add: 16r1FA27CF8 shift: 16.\r\tb := self step3: b x: c y: d z: a data: (in at:  3) add: 16rC4AC5665 shift: 23.\r\r\ta := self step4: a x: b y: c z: d data: (in at:  1) add: 16rF4292244 shift:  6.\r\td := self step4: d x: a y: b z: c data: (in at:  8) add: 16r432AFF97 shift: 10.\r\tc := self step4: c x: d y: a z: b data: (in at: 15) add: 16rAB9423A7 shift: 15.\r\tb := self step4: b x: c y: d z: a data: (in at:  6) add: 16rFC93A039 shift: 21.\r\ta := self step4: a x: b y: c z: d data: (in at: 13) add: 16r655B59C3 shift:  6.\r\td := self step4: d x: a y: b z: c data: (in at:  4) add: 16r8F0CCC92 shift: 10.\r\tc := self step4: c x: d y: a z: b data: (in at: 11) add: 16rFFEFF47D shift: 15.\r\tb := self step4: b x: c y: d z: a data: (in at:  2) add: 16r85845DD1 shift: 21.\r\ta := self step4: a x: b y: c z: d data: (in at:  9) add: 16r6FA87E4F shift:  6.\r\td := self step4: d x: a y: b z: c data: (in at: 16) add: 16rFE2CE6E0 shift: 10.\r\tc := self step4: c x: d y: a z: b data: (in at:  7) add: 16rA3014314 shift: 15.\r\tb := self step4: b x: c y: d z: a data: (in at: 14) add: 16r4E0811A1 shift: 21.\r\ta := self step4: a x: b y: c z: d data: (in at:  5) add: 16rF7537E82 shift:  6.\r\td := self step4: d x: a y: b z: c data: (in at: 12) add: 16rBD3AF235 shift: 10.\r\tc := self step4: c x: d y: a z: b data: (in at:  3) add: 16r2AD7D2BB shift: 15.\r\tb := self step4: b x: c y: d z: a data: (in at: 10) add: 16rEB86D391 shift: 21.\r\r\ta := (a + (hash at: 1)) bitAnd: 16rFFFFFFFF. hash at: 1 put: a.\r\tb := (b + (hash at: 2)) bitAnd: 16rFFFFFFFF. hash at: 2 put: b.\r\tc := (c + (hash at: 3)) bitAnd: 16rFFFFFFFF. hash at: 3 put: c.\r\td := (d + (hash at: 4)) bitAnd: 16rFFFFFFFF. hash at: 4 put: d.\r\r\t^hash! !\r\r!FloatMathPluginTests methodsFor: 'md5' stamp: 'ar 3/26/2006 15:19'!\rrotate: value by: amount\r\t\"Rotate value left by amount\"\r\t| lowMask highMask |\r\tlowMask := (1 bitShift: 32-amount) - 1.\r\thighMask := 16rFFFFFFFF - lowMask.\r\t^((value bitAnd: lowMask) bitShift: amount) + \r\t\t((value bitAnd: highMask) bitShift: amount-32)! !\r\r!FloatMathPluginTests methodsFor: 'md5' stamp: 'ar 3/26/2006 15:19'!\rstep1: w x: x y: y z: z data: data add: add shift: s\r\t\"First step in MD5 transformation\"\r\t| f result |\r\tf := z bitXor: (x bitAnd: (y bitXor: z)).\r\tresult := w + f + data + add.\r\tresult := self rotate: result by: s.\r\t^result + x bitAnd: 16rFFFFFFFF! !\r\r!FloatMathPluginTests methodsFor: 'md5' stamp: 'ar 3/26/2006 15:19'!\rstep2: w x: x y: y z: z data: data add: add shift: s\r\t\"First step in MD5 transformation\"\r\t| f result |\r\tf := y bitXor: (z bitAnd: (x bitXor: y)).\r\tresult := w + f + data + add.\r\tresult := self rotate: result by: s.\r\t^result + x bitAnd: 16rFFFFFFFF! !\r\r!FloatMathPluginTests methodsFor: 'md5' stamp: 'ar 3/26/2006 15:19'!\rstep3: w x: x y: y z: z data: data add: add shift: s\r\t\"First step in MD5 transformation\"\r\t| f result |\r\tf := (x bitXor: y) bitXor: z.\r\tresult := w + f + data + add.\r\tresult := self rotate: result by: s.\r\t^result + x bitAnd: 16rFFFFFFFF! !\r\r!FloatMathPluginTests methodsFor: 'md5' stamp: 'ar 3/26/2006 15:19'!\rstep4: w x: x y: y z: z data: data add: add shift: s\r\t\"First step in MD5 transformation\"\r\t| f result |\r\tf := y bitXor: (x bitOr: (z  bitXor: 16rFFFFFFFF)).\r\tresult := w + f + data + add.\r\tresult := self rotate: result by: s.\r\t^result + x bitAnd: 16rFFFFFFFF! !\r\r!FloatMathPluginTests methodsFor: 'md5' stamp: 'ar 3/26/2006 15:20'!\rtestMD5\r\tself assert: (self md5HashMessage: 'a') = 16r0CC175B9C0F1B6A831C399E269772661.\r\tself assert: (self md5HashMessage: 'abc') = 16r900150983CD24FB0D6963F7D28E17F72.\r\tself assert: (self md5HashMessage: 'message digest') = 16rF96B697D7CB7938D525A2F31AAF161D0.\r\tself assert: (self md5HashMessage:\r\t\t'abcdefghijklmnopqrstuvwxyz') = 16rC3FCD3D76192E4007DFB496CCA67E13B.\r\tself assert: (self md5HashMessage:\r\t\t'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789') =\r\t\t16rD174AB98D277D9F5A5611C2C9F419D9F.\r\tself assert: (self md5HashMessage:\r\t\t'12345678901234567890123456789012345678901234567890123456789012345678901234567890') =\r \t\t16r57EDF4A22BE3C955AC49DA2E2107B67A.! !\r"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/acos.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/e_acos.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/acosh.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/e_acosh.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/asin.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/e_asin.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/asinh.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/s_asinh.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/atan.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/s_atan.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/atan2.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/e_atan2.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/atanh.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/e_atanh.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/copysign.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/s_copysign.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/cos.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/s_cos.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/cosh.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/e_cosh.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/exp.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/e_exp.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/expm1.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/s_expm1.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/MD5",
    "content": "-----BEGIN PGP SIGNED MESSAGE-----\n\n# netlib-bl master Mon May 17 03:35:14 EDT 2004\n# http://cm.bell-labs.com/netlib/crc/netlib-bl.html\nxqdt0SfICJbYU285K5kg9g\tchanges\nvXBJ84aVdIHpqtTdjwinqQ\tconfigure\nydqnyJgYpziE8zrr/WU4/g\tconfigure.in\nP2sEgHh/v3RHTsLuS1UeTw\te_acos.c\nSReAT7diAMhuAtChHm1nLQ\te_acosh.c\nxsqL2/A2cuTbG4ZabFtgQg\te_asin.c\nuXwtBvNUrnsWp2lWS/ZPzg\te_atan2.c\n7+Zmokqk6yU+4B/dPWLVnQ\te_atanh.c\nFFRFIVaqeYuPIbZDy+GPLQ\te_cosh.c\nlGljkqn5/mLxl0XkN4fWxQ\te_exp.c\nladlzVeoGGhd+r/RvPJUsw\te_fmod.c\nWwWDDWUnqoeniw5c6ShWUQ\te_gamma.c\n+rYzLHXdv60VBR9GpEVA7Q\te_gamma_r.c\nBUemgwLOjQ2tpsWv8fQOWA\te_hypot.c\num0j/BMMHd0mEzOIg/iTIw\te_j0.c\n023e/9GjB47rNsYlxW9/Ug\te_j1.c\nX2UtLCi/Hg5Xx0ZAiaUHXQ\te_jn.c\nbBStzzLdDSzNsVlhy/Isdw\te_lgamma.c\npYie2c6jvQAObJMq2IhNGQ\te_lgamma_r.c\nmj6pKYX+E8euiAP6577R4A\te_log.c\nfEuDo4brNfU8HRqvM0syqQ\te_log10.c\nryT3m0UgTGJarnV+NzNhNQ\te_pow.c\nL/2ye70MqZA7YqsCtgMQlQ\te_rem_pio2.c\nkdemnBPRKpa3661lnjEcyw\te_remainder.c\nDW4MDjGPgkJLg4PBGX5yGg\te_scalb.c\nLiW0gFPaN5JVIuQZW4XbVQ\te_sinh.c\nJPBrE86qzL59qF5PFCDA/Q\te_sqrt.c\nuHfh5HgtlKGibLxJYYBFCg\tfdlibm.h\nG21yQjn+xOAex15TPeLfBQ\tindex\nsDIZFCqsPOqSl9ykcjky8w\tk_cos.c\n1t3fuGir+TOYRAO0N8Chng\tk_rem_pio2.c\n1Fi/fEeHcsIq50vVplKVzQ\tk_sin.c\n1ufaWqW1PRP1cOuPtb7O7A\tk_standard.c\n0axra6/ERRuXJJcCc5js/Q\tk_tan.c\nwDXTC07GG4Bd+EnUjk/MVw\tmakefile\n0ffZi8Ey9JbRT9vCxp4LLg\tmakefile.in\nTw07rtlUiXvlgwzbRb632Q\treadme\nWDSYQ245qaKiYXtEn9qSdg\ts_asinh.c\nucf0ncFkne9OW4Uv+CxRrQ\ts_atan.c\nw2/WG3x7j7+b9uydji3FZg\ts_cbrt.c\nYqCYHnPBw1dDvbYwjWJNbw\ts_ceil.c\nJX6gTEPMyjuTQclyjiLC2w\ts_copysign.c\n91ARVh9L6LTc2i9VGu9DSg\ts_cos.c\n0Jwhkbo/6ewEss7CW1PI9w\ts_erf.c\ncpq+MFqK2Vi883y8LA/hxA\ts_expm1.c\nK6LRiJVYLNzThuQaOyibVA\ts_fabs.c\nuvNnsV4Fmj90jAbySXd54w\ts_finite.c\netEc6khe9K27aeE+6ZpW0A\ts_floor.c\n5KDyugUMkjOsPsq6fygPjg\ts_frexp.c\nUWvuamu8A+XGSwi9twc/vQ\ts_ilogb.c\n/KmGbiWbhyiZCru0HbLUpw\ts_isnan.c\n+OZ/WHEZ12FiA8mZ7hk4rA\ts_ldexp.c\ng33PLRuQjT5HRX4ZozySGA\ts_lib_version.c\nMHsSOIzpsdw4sVVtAu4GTQ\ts_log1p.c\nqWJm/3AkemsNi7aF295SGA\ts_logb.c\nQGkKHdTmho+2Xbd0rObCmA\ts_matherr.c\nTfmhq38TAJspcNpJT9Tcww\ts_modf.c\nk+onjlepmLUH/9xA+Wdqaw\ts_nextafter.c\nomWcOHAaAKLjMuuSirX8Lw\ts_rint.c\n6w2X17eamkvE+pCZlPm8Xg\ts_scalbn.c\nz93vZw0EQ1IQUSqJMRu/IA\ts_signgam.c\nS3OtNFaARNk7TltgUoVs+Q\ts_significand.c\nyYuvBWZCWR0Y/YT6pmIr0w\ts_sin.c\nLhJVti8VVlaWbptWR88XGg\ts_tan.c\nQfLTJ1iGqgC7RhZWHi0PTQ\ts_tanh.c\nvR2IBXoLtHZh+GHCV+Iydg\tw_acos.c\nZbhbPlbMYiu8Z1NXaDiPDQ\tw_acosh.c\nKsvLAMHSqu1b72p5kYkJyQ\tw_asin.c\nENaJir3y0hZ4yWWKzBs89w\tw_atan2.c\n+jLlTCXpNVY6yuncPyfWyw\tw_atanh.c\n84kcBUnnIU16mG+cChPbRA\tw_cosh.c\nbjKr6q9UZYgun3LytNO+1A\tw_exp.c\nWQG0A3Gk/MlFkjx4h3yw6Q\tw_fmod.c\nMNIqntvhf0fvFvKfzcPR1g\tw_gamma.c\nTnrF3OPpiAEUymzT0PZiDw\tw_gamma_r.c\nOLFqJDwkIZmIF7vm6BQuGQ\tw_hypot.c\ncvayKIzuZlCxTj6dLXe+qQ\tw_j0.c\nPB3rNmFTtPoMICeJFkAMeg\tw_j1.c\n7qCc7gGMiRIp1GY0UQ3gLg\tw_jn.c\n8URUp8BmBP32s79GRllwdw\tw_lgamma.c\nAJyN8jlYXVe1Dwx+w6qlEQ\tw_lgamma_r.c\n8fmXSpy3xt0Mgd+9BkKHRg\tw_log.c\n/+qteyYx+IKTmLuv1fxqPQ\tw_log10.c\n+o/ImP/JfknQmSxM4TA1ag\tw_pow.c\nBkF5AkqkRA4Py2Y1p0bQIA\tw_remainder.c\n77arOaApwrSQngHv26UWrg\tw_scalb.c\nSgGvz6WUAuHs90sDA/GDbA\tw_sinh.c\n2aR8vbagrVvvMtXPktM6CQ\tw_sqrt.c\n\n-----BEGIN PGP SIGNATURE-----\nVersion: 2.6.2\n\niQCVAwUBQKhrNb5pvxO9gjtZAQGFgAP9GkR1sBbpgy/sXcoyIj/LMfystMc5ljYC\nWeqSep2+0gmE3l/aLWBaEL/ngyVY8fWNV7lll/DKGA4oJBTWtozHhWGl2g8+tb+L\nafoMIwLTbSMMkB4bPGfZm1MevZmOn5g4WLOHQ3aTPlykkBw8QDgmLm+7cWZrbHao\nSJ+0t7F/FWI=\n=aGTu\n-----END PGP SIGNATURE-----\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/changes",
    "content": "21 Oct 2002\nbug fix in e_pow.c from \"David G Hough at validlab.com\" <validlab@validlab.com>.\ncredit for bug report goes to andrew_johnson@uk.ibm.com\ntest example:\n-----------------------------\nstatic int fail=0;\n\ntrypow(x,y,z)\ndouble x,y,z;\n{\nextern double pow();\ndouble p ;\n\np = pow(x,y);\nif (p != z) {\n        printf(\" pow failure x %e y %e computed %e correct %e \\n\",x,y,p,z);\n        fail++;\n        return;\n}\nif (1/p != 1/z) {\n        printf(\" pow failure x %e y %e computed %e correct %e \\n\",x,y,p,z);\n        fail++;\n        return;\n}\n}\n\nmain()\n{\n\ntrypow( 1.0000000001, 1.0000000001E10, 2.7182820535066154);\ntrypow(-1.0000000001, 1.0000000001E10, -2.7182820535066154);\ntrypow(-0.001, 1.0000000001E10, -0.0);\ntrypow(-1000.0, 1.0000000001E10, -1.0/0.0);\n\nif (fail == 0) {\n        printf(\" fdlibm e_pow.c seems to be current \\n\");\n        exit(0);\n}\nelse {\n        printf(\" fdlibm e_pow.c seems to be out of date \\n\");\n        exit(1);\n}\n\n}\n-----------------------------\n\n\n\nWhat's new in FDLIBM 5.3?\n\nCONFIGURE\n        To build FDLIBM, edit the supplied Makefile or create\n        a local Makefile by running \"sh configure\"\n        using the supplied configure script contributed by Nelson Beebe\n\nBUGS FIXED\n\n    1. e_pow.c incorrect results when\n        x is very close to -1.0 and y is very large, e.g.\n        pow(-1.0000000000000002e+00,4.5035996273704970e+15) = 0\n        pow(-9.9999999999999978e-01,4.5035996273704970e+15) = 0\n        Correct results are close to -e and -1/e.\n\n    2. k_tan.c error was > 1 ulp target for FDLIBM\n        5.2: Worst error at least 1.45 ulp at\n        tan(1.7765241907548024E+269) = 1.7733884462610958E+16\n        5.3: Worst error 0.96 ulp\n\nNOT FIXED YET\n\n    3. Compiler failure on non-standard code\n        Statements like\n                    *(1+(int*)&t1) = 0;\n        are not standard C and cause some optimizing compilers (e.g. GCC)\n        to generate bad code under optimization.    These cases\n        are to be addressed in the next release.\n\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/configure",
    "content": "#! /bin/sh\n# Guess values for system-dependent variables and create Makefiles.\n# Generated by GNU Autoconf 2.59 for fdlibm 5.3.\n#\n# Report bugs to <FDLIBM COMMENTS <fdlibm-comments AT sun.com>>.\n#\n# Copyright (C) 2003 Free Software Foundation, Inc.\n# This configure script is free software; the Free Software Foundation\n# gives unlimited permission to copy, distribute and modify it.\n## --------------------- ##\n## M4sh Initialization.  ##\n## --------------------- ##\n\n# Be Bourne compatible\nif test -n \"${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then\n  emulate sh\n  NULLCMD=:\n  # Zsh 3.x and 4.x performs word splitting on ${1+\"$@\"}, which\n  # is contrary to our usage.  Disable this feature.\n  alias -g '${1+\"$@\"}'='\"$@\"'\nelif test -n \"${BASH_VERSION+set}\" && (set -o posix) >/dev/null 2>&1; then\n  set -o posix\nfi\nDUALCASE=1; export DUALCASE # for MKS sh\n\n# Support unset when possible.\nif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then\n  as_unset=unset\nelse\n  as_unset=false\nfi\n\n\n# Work around bugs in pre-3.0 UWIN ksh.\n$as_unset ENV MAIL MAILPATH\nPS1='$ '\nPS2='> '\nPS4='+ '\n\n# NLS nuisances.\nfor as_var in \\\n  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \\\n  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \\\n  LC_TELEPHONE LC_TIME\ndo\n  if (set +x; test -z \"`(eval $as_var=C; export $as_var) 2>&1`\"); then\n    eval $as_var=C; export $as_var\n  else\n    $as_unset $as_var\n  fi\ndone\n\n# Required to use basename.\nif expr a : '\\(a\\)' >/dev/null 2>&1; then\n  as_expr=expr\nelse\n  as_expr=false\nfi\n\nif (basename /) >/dev/null 2>&1 && test \"X`basename / 2>&1`\" = \"X/\"; then\n  as_basename=basename\nelse\n  as_basename=false\nfi\n\n\n# Name of the executable.\nas_me=`$as_basename \"$0\" ||\n$as_expr X/\"$0\" : '.*/\\([^/][^/]*\\)/*$' \\| \\\n\t X\"$0\" : 'X\\(//\\)$' \\| \\\n\t X\"$0\" : 'X\\(/\\)$' \\| \\\n\t .     : '\\(.\\)' 2>/dev/null ||\necho X/\"$0\" |\n    sed '/^.*\\/\\([^/][^/]*\\)\\/*$/{ s//\\1/; q; }\n  \t  /^X\\/\\(\\/\\/\\)$/{ s//\\1/; q; }\n  \t  /^X\\/\\(\\/\\).*/{ s//\\1/; q; }\n  \t  s/.*/./; q'`\n\n\n# PATH needs CR, and LINENO needs CR and PATH.\n# Avoid depending upon Character Ranges.\nas_cr_letters='abcdefghijklmnopqrstuvwxyz'\nas_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'\nas_cr_Letters=$as_cr_letters$as_cr_LETTERS\nas_cr_digits='0123456789'\nas_cr_alnum=$as_cr_Letters$as_cr_digits\n\n# The user is always right.\nif test \"${PATH_SEPARATOR+set}\" != set; then\n  echo \"#! /bin/sh\" >conf$$.sh\n  echo  \"exit 0\"   >>conf$$.sh\n  chmod +x conf$$.sh\n  if (PATH=\"/nonexistent;.\"; conf$$.sh) >/dev/null 2>&1; then\n    PATH_SEPARATOR=';'\n  else\n    PATH_SEPARATOR=:\n  fi\n  rm -f conf$$.sh\nfi\n\n\n  as_lineno_1=$LINENO\n  as_lineno_2=$LINENO\n  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`\n  test \"x$as_lineno_1\" != \"x$as_lineno_2\" &&\n  test \"x$as_lineno_3\"  = \"x$as_lineno_2\"  || {\n  # Find who we are.  Look in the path if we contain no path at all\n  # relative or not.\n  case $0 in\n    *[\\\\/]* ) as_myself=$0 ;;\n    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  test -r \"$as_dir/$0\" && as_myself=$as_dir/$0 && break\ndone\n\n       ;;\n  esac\n  # We did not find ourselves, most probably we were run as `sh COMMAND'\n  # in which case we are not to be found in the path.\n  if test \"x$as_myself\" = x; then\n    as_myself=$0\n  fi\n  if test ! -f \"$as_myself\"; then\n    { echo \"$as_me: error: cannot find myself; rerun with an absolute path\" >&2\n   { (exit 1); exit 1; }; }\n  fi\n  case $CONFIG_SHELL in\n  '')\n    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for as_base in sh bash ksh sh5; do\n\t case $as_dir in\n\t /*)\n\t   if (\"$as_dir/$as_base\" -c '\n  as_lineno_1=$LINENO\n  as_lineno_2=$LINENO\n  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`\n  test \"x$as_lineno_1\" != \"x$as_lineno_2\" &&\n  test \"x$as_lineno_3\"  = \"x$as_lineno_2\" ') 2>/dev/null; then\n\t     $as_unset BASH_ENV || test \"${BASH_ENV+set}\" != set || { BASH_ENV=; export BASH_ENV; }\n\t     $as_unset ENV || test \"${ENV+set}\" != set || { ENV=; export ENV; }\n\t     CONFIG_SHELL=$as_dir/$as_base\n\t     export CONFIG_SHELL\n\t     exec \"$CONFIG_SHELL\" \"$0\" ${1+\"$@\"}\n\t   fi;;\n\t esac\n       done\ndone\n;;\n  esac\n\n  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO\n  # uniformly replaced by the line number.  The first 'sed' inserts a\n  # line-number line before each line; the second 'sed' does the real\n  # work.  The second script uses 'N' to pair each line-number line\n  # with the numbered line, and appends trailing '-' during\n  # substitution so that $LINENO is not a special case at line end.\n  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the\n  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)\n  sed '=' <$as_myself |\n    sed '\n      N\n      s,$,-,\n      : loop\n      s,^\\(['$as_cr_digits']*\\)\\(.*\\)[$]LINENO\\([^'$as_cr_alnum'_]\\),\\1\\2\\1\\3,\n      t loop\n      s,-$,,\n      s,^['$as_cr_digits']*\\n,,\n    ' >$as_me.lineno &&\n  chmod +x $as_me.lineno ||\n    { echo \"$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell\" >&2\n   { (exit 1); exit 1; }; }\n\n  # Don't try to exec as it changes $[0], causing all sort of problems\n  # (the dirname of $[0] is not the place where we might find the\n  # original and so on.  Autoconf is especially sensible to this).\n  . ./$as_me.lineno\n  # Exit status is that of the last command.\n  exit\n}\n\n\ncase `echo \"testing\\c\"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in\n  *c*,-n*) ECHO_N= ECHO_C='\n' ECHO_T='\t' ;;\n  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;\n  *)       ECHO_N= ECHO_C='\\c' ECHO_T= ;;\nesac\n\nif expr a : '\\(a\\)' >/dev/null 2>&1; then\n  as_expr=expr\nelse\n  as_expr=false\nfi\n\nrm -f conf$$ conf$$.exe conf$$.file\necho >conf$$.file\nif ln -s conf$$.file conf$$ 2>/dev/null; then\n  # We could just check for DJGPP; but this test a) works b) is more generic\n  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).\n  if test -f conf$$.exe; then\n    # Don't use ln at all; we don't have any links\n    as_ln_s='cp -p'\n  else\n    as_ln_s='ln -s'\n  fi\nelif ln conf$$.file conf$$ 2>/dev/null; then\n  as_ln_s=ln\nelse\n  as_ln_s='cp -p'\nfi\nrm -f conf$$ conf$$.exe conf$$.file\n\nif mkdir -p . 2>/dev/null; then\n  as_mkdir_p=:\nelse\n  test -d ./-p && rmdir ./-p\n  as_mkdir_p=false\nfi\n\nas_executable_p=\"test -f\"\n\n# Sed expression to map a string onto a valid CPP name.\nas_tr_cpp=\"eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'\"\n\n# Sed expression to map a string onto a valid variable name.\nas_tr_sh=\"eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'\"\n\n\n# IFS\n# We need space, tab and new line, in precisely that order.\nas_nl='\n'\nIFS=\" \t$as_nl\"\n\n# CDPATH.\n$as_unset CDPATH\n\n\n# Name of the host.\n# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,\n# so uname gets run too.\nac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`\n\nexec 6>&1\n\n#\n# Initializations.\n#\nac_default_prefix=/usr/local\nac_config_libobj_dir=.\ncross_compiling=no\nsubdirs=\nMFLAGS=\nMAKEFLAGS=\nSHELL=${CONFIG_SHELL-/bin/sh}\n\n# Maximum number of lines to put in a shell here document.\n# This variable seems obsolete.  It should probably be removed, and\n# only ac_max_sed_lines should be used.\n: ${ac_max_here_lines=38}\n\n# Identity of this package.\nPACKAGE_NAME='fdlibm'\nPACKAGE_TARNAME='fdlibm'\nPACKAGE_VERSION='5.3'\nPACKAGE_STRING='fdlibm 5.3'\nPACKAGE_BUGREPORT='FDLIBM COMMENTS <fdlibm-comments AT sun.com>'\n\nac_unique_file=\"e_acos.c\"\nac_subst_vars='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 CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT AR CHMOD CP RANLIB RM LIBOBJS LTLIBOBJS'\nac_subst_files=''\n\n# Initialize some variables set by options.\nac_init_help=\nac_init_version=false\n# The variables have the same names as the options, with\n# dashes changed to underlines.\ncache_file=/dev/null\nexec_prefix=NONE\nno_create=\nno_recursion=\nprefix=NONE\nprogram_prefix=NONE\nprogram_suffix=NONE\nprogram_transform_name=s,x,x,\nsilent=\nsite=\nsrcdir=\nverbose=\nx_includes=NONE\nx_libraries=NONE\n\n# Installation directory options.\n# These are left unexpanded so users can \"make install exec_prefix=/foo\"\n# and all the variables that are supposed to be based on exec_prefix\n# by default will actually change.\n# Use braces instead of parens because sh, perl, etc. also accept them.\nbindir='${exec_prefix}/bin'\nsbindir='${exec_prefix}/sbin'\nlibexecdir='${exec_prefix}/libexec'\ndatadir='${prefix}/share'\nsysconfdir='${prefix}/etc'\nsharedstatedir='${prefix}/com'\nlocalstatedir='${prefix}/var'\nlibdir='${exec_prefix}/lib'\nincludedir='${prefix}/include'\noldincludedir='/usr/include'\ninfodir='${prefix}/info'\nmandir='${prefix}/man'\n\nac_prev=\nfor ac_option\ndo\n  # If the previous option needs an argument, assign it.\n  if test -n \"$ac_prev\"; then\n    eval \"$ac_prev=\\$ac_option\"\n    ac_prev=\n    continue\n  fi\n\n  ac_optarg=`expr \"x$ac_option\" : 'x[^=]*=\\(.*\\)'`\n\n  # Accept the important Cygnus configure options, so we can diagnose typos.\n\n  case $ac_option in\n\n  -bindir | --bindir | --bindi | --bind | --bin | --bi)\n    ac_prev=bindir ;;\n  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)\n    bindir=$ac_optarg ;;\n\n  -build | --build | --buil | --bui | --bu)\n    ac_prev=build_alias ;;\n  -build=* | --build=* | --buil=* | --bui=* | --bu=*)\n    build_alias=$ac_optarg ;;\n\n  -cache-file | --cache-file | --cache-fil | --cache-fi \\\n  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)\n    ac_prev=cache_file ;;\n  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \\\n  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)\n    cache_file=$ac_optarg ;;\n\n  --config-cache | -C)\n    cache_file=config.cache ;;\n\n  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)\n    ac_prev=datadir ;;\n  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \\\n  | --da=*)\n    datadir=$ac_optarg ;;\n\n  -disable-* | --disable-*)\n    ac_feature=`expr \"x$ac_option\" : 'x-*disable-\\(.*\\)'`\n    # Reject names that are not valid shell variable names.\n    expr \"x$ac_feature\" : \".*[^-_$as_cr_alnum]\" >/dev/null &&\n      { echo \"$as_me: error: invalid feature name: $ac_feature\" >&2\n   { (exit 1); exit 1; }; }\n    ac_feature=`echo $ac_feature | sed 's/-/_/g'`\n    eval \"enable_$ac_feature=no\" ;;\n\n  -enable-* | --enable-*)\n    ac_feature=`expr \"x$ac_option\" : 'x-*enable-\\([^=]*\\)'`\n    # Reject names that are not valid shell variable names.\n    expr \"x$ac_feature\" : \".*[^-_$as_cr_alnum]\" >/dev/null &&\n      { echo \"$as_me: error: invalid feature name: $ac_feature\" >&2\n   { (exit 1); exit 1; }; }\n    ac_feature=`echo $ac_feature | sed 's/-/_/g'`\n    case $ac_option in\n      *=*) ac_optarg=`echo \"$ac_optarg\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"`;;\n      *) ac_optarg=yes ;;\n    esac\n    eval \"enable_$ac_feature='$ac_optarg'\" ;;\n\n  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \\\n  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \\\n  | --exec | --exe | --ex)\n    ac_prev=exec_prefix ;;\n  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \\\n  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \\\n  | --exec=* | --exe=* | --ex=*)\n    exec_prefix=$ac_optarg ;;\n\n  -gas | --gas | --ga | --g)\n    # Obsolete; use --with-gas.\n    with_gas=yes ;;\n\n  -help | --help | --hel | --he | -h)\n    ac_init_help=long ;;\n  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)\n    ac_init_help=recursive ;;\n  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)\n    ac_init_help=short ;;\n\n  -host | --host | --hos | --ho)\n    ac_prev=host_alias ;;\n  -host=* | --host=* | --hos=* | --ho=*)\n    host_alias=$ac_optarg ;;\n\n  -includedir | --includedir | --includedi | --included | --include \\\n  | --includ | --inclu | --incl | --inc)\n    ac_prev=includedir ;;\n  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \\\n  | --includ=* | --inclu=* | --incl=* | --inc=*)\n    includedir=$ac_optarg ;;\n\n  -infodir | --infodir | --infodi | --infod | --info | --inf)\n    ac_prev=infodir ;;\n  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)\n    infodir=$ac_optarg ;;\n\n  -libdir | --libdir | --libdi | --libd)\n    ac_prev=libdir ;;\n  -libdir=* | --libdir=* | --libdi=* | --libd=*)\n    libdir=$ac_optarg ;;\n\n  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \\\n  | --libexe | --libex | --libe)\n    ac_prev=libexecdir ;;\n  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \\\n  | --libexe=* | --libex=* | --libe=*)\n    libexecdir=$ac_optarg ;;\n\n  -localstatedir | --localstatedir | --localstatedi | --localstated \\\n  | --localstate | --localstat | --localsta | --localst \\\n  | --locals | --local | --loca | --loc | --lo)\n    ac_prev=localstatedir ;;\n  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \\\n  | --localstate=* | --localstat=* | --localsta=* | --localst=* \\\n  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)\n    localstatedir=$ac_optarg ;;\n\n  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)\n    ac_prev=mandir ;;\n  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)\n    mandir=$ac_optarg ;;\n\n  -nfp | --nfp | --nf)\n    # Obsolete; use --without-fp.\n    with_fp=no ;;\n\n  -no-create | --no-create | --no-creat | --no-crea | --no-cre \\\n  | --no-cr | --no-c | -n)\n    no_create=yes ;;\n\n  -no-recursion | --no-recursion | --no-recursio | --no-recursi \\\n  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)\n    no_recursion=yes ;;\n\n  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \\\n  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \\\n  | --oldin | --oldi | --old | --ol | --o)\n    ac_prev=oldincludedir ;;\n  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \\\n  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \\\n  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)\n    oldincludedir=$ac_optarg ;;\n\n  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)\n    ac_prev=prefix ;;\n  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)\n    prefix=$ac_optarg ;;\n\n  -program-prefix | --program-prefix | --program-prefi | --program-pref \\\n  | --program-pre | --program-pr | --program-p)\n    ac_prev=program_prefix ;;\n  -program-prefix=* | --program-prefix=* | --program-prefi=* \\\n  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)\n    program_prefix=$ac_optarg ;;\n\n  -program-suffix | --program-suffix | --program-suffi | --program-suff \\\n  | --program-suf | --program-su | --program-s)\n    ac_prev=program_suffix ;;\n  -program-suffix=* | --program-suffix=* | --program-suffi=* \\\n  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)\n    program_suffix=$ac_optarg ;;\n\n  -program-transform-name | --program-transform-name \\\n  | --program-transform-nam | --program-transform-na \\\n  | --program-transform-n | --program-transform- \\\n  | --program-transform | --program-transfor \\\n  | --program-transfo | --program-transf \\\n  | --program-trans | --program-tran \\\n  | --progr-tra | --program-tr | --program-t)\n    ac_prev=program_transform_name ;;\n  -program-transform-name=* | --program-transform-name=* \\\n  | --program-transform-nam=* | --program-transform-na=* \\\n  | --program-transform-n=* | --program-transform-=* \\\n  | --program-transform=* | --program-transfor=* \\\n  | --program-transfo=* | --program-transf=* \\\n  | --program-trans=* | --program-tran=* \\\n  | --progr-tra=* | --program-tr=* | --program-t=*)\n    program_transform_name=$ac_optarg ;;\n\n  -q | -quiet | --quiet | --quie | --qui | --qu | --q \\\n  | -silent | --silent | --silen | --sile | --sil)\n    silent=yes ;;\n\n  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)\n    ac_prev=sbindir ;;\n  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \\\n  | --sbi=* | --sb=*)\n    sbindir=$ac_optarg ;;\n\n  -sharedstatedir | --sharedstatedir | --sharedstatedi \\\n  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \\\n  | --sharedst | --shareds | --shared | --share | --shar \\\n  | --sha | --sh)\n    ac_prev=sharedstatedir ;;\n  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \\\n  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \\\n  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \\\n  | --sha=* | --sh=*)\n    sharedstatedir=$ac_optarg ;;\n\n  -site | --site | --sit)\n    ac_prev=site ;;\n  -site=* | --site=* | --sit=*)\n    site=$ac_optarg ;;\n\n  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)\n    ac_prev=srcdir ;;\n  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)\n    srcdir=$ac_optarg ;;\n\n  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \\\n  | --syscon | --sysco | --sysc | --sys | --sy)\n    ac_prev=sysconfdir ;;\n  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \\\n  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)\n    sysconfdir=$ac_optarg ;;\n\n  -target | --target | --targe | --targ | --tar | --ta | --t)\n    ac_prev=target_alias ;;\n  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)\n    target_alias=$ac_optarg ;;\n\n  -v | -verbose | --verbose | --verbos | --verbo | --verb)\n    verbose=yes ;;\n\n  -version | --version | --versio | --versi | --vers | -V)\n    ac_init_version=: ;;\n\n  -with-* | --with-*)\n    ac_package=`expr \"x$ac_option\" : 'x-*with-\\([^=]*\\)'`\n    # Reject names that are not valid shell variable names.\n    expr \"x$ac_package\" : \".*[^-_$as_cr_alnum]\" >/dev/null &&\n      { echo \"$as_me: error: invalid package name: $ac_package\" >&2\n   { (exit 1); exit 1; }; }\n    ac_package=`echo $ac_package| sed 's/-/_/g'`\n    case $ac_option in\n      *=*) ac_optarg=`echo \"$ac_optarg\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"`;;\n      *) ac_optarg=yes ;;\n    esac\n    eval \"with_$ac_package='$ac_optarg'\" ;;\n\n  -without-* | --without-*)\n    ac_package=`expr \"x$ac_option\" : 'x-*without-\\(.*\\)'`\n    # Reject names that are not valid shell variable names.\n    expr \"x$ac_package\" : \".*[^-_$as_cr_alnum]\" >/dev/null &&\n      { echo \"$as_me: error: invalid package name: $ac_package\" >&2\n   { (exit 1); exit 1; }; }\n    ac_package=`echo $ac_package | sed 's/-/_/g'`\n    eval \"with_$ac_package=no\" ;;\n\n  --x)\n    # Obsolete; use --with-x.\n    with_x=yes ;;\n\n  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \\\n  | --x-incl | --x-inc | --x-in | --x-i)\n    ac_prev=x_includes ;;\n  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \\\n  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)\n    x_includes=$ac_optarg ;;\n\n  -x-libraries | --x-libraries | --x-librarie | --x-librari \\\n  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)\n    ac_prev=x_libraries ;;\n  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \\\n  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)\n    x_libraries=$ac_optarg ;;\n\n  -*) { echo \"$as_me: error: unrecognized option: $ac_option\nTry \\`$0 --help' for more information.\" >&2\n   { (exit 1); exit 1; }; }\n    ;;\n\n  *=*)\n    ac_envvar=`expr \"x$ac_option\" : 'x\\([^=]*\\)='`\n    # Reject names that are not valid shell variable names.\n    expr \"x$ac_envvar\" : \".*[^_$as_cr_alnum]\" >/dev/null &&\n      { echo \"$as_me: error: invalid variable name: $ac_envvar\" >&2\n   { (exit 1); exit 1; }; }\n    ac_optarg=`echo \"$ac_optarg\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"`\n    eval \"$ac_envvar='$ac_optarg'\"\n    export $ac_envvar ;;\n\n  *)\n    # FIXME: should be removed in autoconf 3.0.\n    echo \"$as_me: WARNING: you should use --build, --host, --target\" >&2\n    expr \"x$ac_option\" : \".*[^-._$as_cr_alnum]\" >/dev/null &&\n      echo \"$as_me: WARNING: invalid host type: $ac_option\" >&2\n    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}\n    ;;\n\n  esac\ndone\n\nif test -n \"$ac_prev\"; then\n  ac_option=--`echo $ac_prev | sed 's/_/-/g'`\n  { echo \"$as_me: error: missing argument to $ac_option\" >&2\n   { (exit 1); exit 1; }; }\nfi\n\n# Be sure to have absolute paths.\nfor ac_var in exec_prefix prefix\ndo\n  eval ac_val=$`echo $ac_var`\n  case $ac_val in\n    [\\\\/$]* | ?:[\\\\/]* | NONE | '' ) ;;\n    *)  { echo \"$as_me: error: expected an absolute directory name for --$ac_var: $ac_val\" >&2\n   { (exit 1); exit 1; }; };;\n  esac\ndone\n\n# Be sure to have absolute paths.\nfor ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \\\n\t      localstatedir libdir includedir oldincludedir infodir mandir\ndo\n  eval ac_val=$`echo $ac_var`\n  case $ac_val in\n    [\\\\/$]* | ?:[\\\\/]* ) ;;\n    *)  { echo \"$as_me: error: expected an absolute directory name for --$ac_var: $ac_val\" >&2\n   { (exit 1); exit 1; }; };;\n  esac\ndone\n\n# There might be people who depend on the old broken behavior: `$host'\n# used to hold the argument of --host etc.\n# FIXME: To remove some day.\nbuild=$build_alias\nhost=$host_alias\ntarget=$target_alias\n\n# FIXME: To remove some day.\nif test \"x$host_alias\" != x; then\n  if test \"x$build_alias\" = x; then\n    cross_compiling=maybe\n    echo \"$as_me: WARNING: If you wanted to set the --build type, don't use --host.\n    If a cross compiler is detected then cross compile mode will be used.\" >&2\n  elif test \"x$build_alias\" != \"x$host_alias\"; then\n    cross_compiling=yes\n  fi\nfi\n\nac_tool_prefix=\ntest -n \"$host_alias\" && ac_tool_prefix=$host_alias-\n\ntest \"$silent\" = yes && exec 6>/dev/null\n\n\n# Find the source files, if location was not specified.\nif test -z \"$srcdir\"; then\n  ac_srcdir_defaulted=yes\n  # Try the directory containing this script, then its parent.\n  ac_confdir=`(dirname \"$0\") 2>/dev/null ||\n$as_expr X\"$0\" : 'X\\(.*[^/]\\)//*[^/][^/]*/*$' \\| \\\n\t X\"$0\" : 'X\\(//\\)[^/]' \\| \\\n\t X\"$0\" : 'X\\(//\\)$' \\| \\\n\t X\"$0\" : 'X\\(/\\)' \\| \\\n\t .     : '\\(.\\)' 2>/dev/null ||\necho X\"$0\" |\n    sed '/^X\\(.*[^/]\\)\\/\\/*[^/][^/]*\\/*$/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\/\\)[^/].*/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\/\\)$/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\).*/{ s//\\1/; q; }\n  \t  s/.*/./; q'`\n  srcdir=$ac_confdir\n  if test ! -r $srcdir/$ac_unique_file; then\n    srcdir=..\n  fi\nelse\n  ac_srcdir_defaulted=no\nfi\nif test ! -r $srcdir/$ac_unique_file; then\n  if test \"$ac_srcdir_defaulted\" = yes; then\n    { echo \"$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or ..\" >&2\n   { (exit 1); exit 1; }; }\n  else\n    { echo \"$as_me: error: cannot find sources ($ac_unique_file) in $srcdir\" >&2\n   { (exit 1); exit 1; }; }\n  fi\nfi\n(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||\n  { echo \"$as_me: error: sources are in $srcdir, but \\`cd $srcdir' does not work\" >&2\n   { (exit 1); exit 1; }; }\nsrcdir=`echo \"$srcdir\" | sed 's%\\([^\\\\/]\\)[\\\\/]*$%\\1%'`\nac_env_build_alias_set=${build_alias+set}\nac_env_build_alias_value=$build_alias\nac_cv_env_build_alias_set=${build_alias+set}\nac_cv_env_build_alias_value=$build_alias\nac_env_host_alias_set=${host_alias+set}\nac_env_host_alias_value=$host_alias\nac_cv_env_host_alias_set=${host_alias+set}\nac_cv_env_host_alias_value=$host_alias\nac_env_target_alias_set=${target_alias+set}\nac_env_target_alias_value=$target_alias\nac_cv_env_target_alias_set=${target_alias+set}\nac_cv_env_target_alias_value=$target_alias\nac_env_CC_set=${CC+set}\nac_env_CC_value=$CC\nac_cv_env_CC_set=${CC+set}\nac_cv_env_CC_value=$CC\nac_env_CFLAGS_set=${CFLAGS+set}\nac_env_CFLAGS_value=$CFLAGS\nac_cv_env_CFLAGS_set=${CFLAGS+set}\nac_cv_env_CFLAGS_value=$CFLAGS\nac_env_LDFLAGS_set=${LDFLAGS+set}\nac_env_LDFLAGS_value=$LDFLAGS\nac_cv_env_LDFLAGS_set=${LDFLAGS+set}\nac_cv_env_LDFLAGS_value=$LDFLAGS\nac_env_CPPFLAGS_set=${CPPFLAGS+set}\nac_env_CPPFLAGS_value=$CPPFLAGS\nac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}\nac_cv_env_CPPFLAGS_value=$CPPFLAGS\n\n#\n# Report the --help message.\n#\nif test \"$ac_init_help\" = \"long\"; then\n  # Omit some internal or obsolete options to make the list less imposing.\n  # This message is too long to be a string in the A/UX 3.1 sh.\n  cat <<_ACEOF\n\\`configure' configures fdlibm 5.3 to adapt to many kinds of systems.\n\nUsage: $0 [OPTION]... [VAR=VALUE]...\n\nTo assign environment variables (e.g., CC, CFLAGS...), specify them as\nVAR=VALUE.  See below for descriptions of some of the useful variables.\n\nDefaults for the options are specified in brackets.\n\nConfiguration:\n  -h, --help              display this help and exit\n      --help=short        display options specific to this package\n      --help=recursive    display the short help of all the included packages\n  -V, --version           display version information and exit\n  -q, --quiet, --silent   do not print \\`checking...' messages\n      --cache-file=FILE   cache test results in FILE [disabled]\n  -C, --config-cache      alias for \\`--cache-file=config.cache'\n  -n, --no-create         do not create output files\n      --srcdir=DIR        find the sources in DIR [configure dir or \\`..']\n\n_ACEOF\n\n  cat <<_ACEOF\nInstallation directories:\n  --prefix=PREFIX         install architecture-independent files in PREFIX\n\t\t\t  [$ac_default_prefix]\n  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX\n\t\t\t  [PREFIX]\n\nBy default, \\`make install' will install all the files in\n\\`$ac_default_prefix/bin', \\`$ac_default_prefix/lib' etc.  You can specify\nan installation prefix other than \\`$ac_default_prefix' using \\`--prefix',\nfor instance \\`--prefix=\\$HOME'.\n\nFor better control, use the options below.\n\nFine tuning of the installation directories:\n  --bindir=DIR           user executables [EPREFIX/bin]\n  --sbindir=DIR          system admin executables [EPREFIX/sbin]\n  --libexecdir=DIR       program executables [EPREFIX/libexec]\n  --datadir=DIR          read-only architecture-independent data [PREFIX/share]\n  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]\n  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]\n  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]\n  --libdir=DIR           object code libraries [EPREFIX/lib]\n  --includedir=DIR       C header files [PREFIX/include]\n  --oldincludedir=DIR    C header files for non-gcc [/usr/include]\n  --infodir=DIR          info documentation [PREFIX/info]\n  --mandir=DIR           man documentation [PREFIX/man]\n_ACEOF\n\n  cat <<\\_ACEOF\n_ACEOF\nfi\n\nif test -n \"$ac_init_help\"; then\n  case $ac_init_help in\n     short | recursive ) echo \"Configuration of fdlibm 5.3:\";;\n   esac\n  cat <<\\_ACEOF\n\nSome influential environment variables:\n  CC          C compiler command\n  CFLAGS      C compiler flags\n  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a\n              nonstandard directory <lib dir>\n  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have\n              headers in a nonstandard directory <include dir>\n\nUse these variables to override the choices made by `configure' or to help\nit to find libraries and programs with nonstandard names/locations.\n\nReport bugs to <FDLIBM COMMENTS <fdlibm-comments AT sun.com>>\n_ACEOF\nfi\n\nif test \"$ac_init_help\" = \"recursive\"; then\n  # If there are subdirs, report their specific --help.\n  ac_popdir=`pwd`\n  for ac_dir in : $ac_subdirs_all; do test \"x$ac_dir\" = x: && continue\n    test -d $ac_dir || continue\n    ac_builddir=.\n\nif test \"$ac_dir\" != .; then\n  ac_dir_suffix=/`echo \"$ac_dir\" | sed 's,^\\.[\\\\/],,'`\n  # A \"../\" for each directory in $ac_dir_suffix.\n  ac_top_builddir=`echo \"$ac_dir_suffix\" | sed 's,/[^\\\\/]*,../,g'`\nelse\n  ac_dir_suffix= ac_top_builddir=\nfi\n\ncase $srcdir in\n  .)  # No --srcdir option.  We are building in place.\n    ac_srcdir=.\n    if test -z \"$ac_top_builddir\"; then\n       ac_top_srcdir=.\n    else\n       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`\n    fi ;;\n  [\\\\/]* | ?:[\\\\/]* )  # Absolute path.\n    ac_srcdir=$srcdir$ac_dir_suffix;\n    ac_top_srcdir=$srcdir ;;\n  *) # Relative path.\n    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix\n    ac_top_srcdir=$ac_top_builddir$srcdir ;;\nesac\n\n# Do not use `cd foo && pwd` to compute absolute paths, because\n# the directories may not exist.\ncase `pwd` in\n.) ac_abs_builddir=\"$ac_dir\";;\n*)\n  case \"$ac_dir\" in\n  .) ac_abs_builddir=`pwd`;;\n  [\\\\/]* | ?:[\\\\/]* ) ac_abs_builddir=\"$ac_dir\";;\n  *) ac_abs_builddir=`pwd`/\"$ac_dir\";;\n  esac;;\nesac\ncase $ac_abs_builddir in\n.) ac_abs_top_builddir=${ac_top_builddir}.;;\n*)\n  case ${ac_top_builddir}. in\n  .) ac_abs_top_builddir=$ac_abs_builddir;;\n  [\\\\/]* | ?:[\\\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;\n  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;\n  esac;;\nesac\ncase $ac_abs_builddir in\n.) ac_abs_srcdir=$ac_srcdir;;\n*)\n  case $ac_srcdir in\n  .) ac_abs_srcdir=$ac_abs_builddir;;\n  [\\\\/]* | ?:[\\\\/]* ) ac_abs_srcdir=$ac_srcdir;;\n  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;\n  esac;;\nesac\ncase $ac_abs_builddir in\n.) ac_abs_top_srcdir=$ac_top_srcdir;;\n*)\n  case $ac_top_srcdir in\n  .) ac_abs_top_srcdir=$ac_abs_builddir;;\n  [\\\\/]* | ?:[\\\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;\n  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;\n  esac;;\nesac\n\n    cd $ac_dir\n    # Check for guested configure; otherwise get Cygnus style configure.\n    if test -f $ac_srcdir/configure.gnu; then\n      echo\n      $SHELL $ac_srcdir/configure.gnu  --help=recursive\n    elif test -f $ac_srcdir/configure; then\n      echo\n      $SHELL $ac_srcdir/configure  --help=recursive\n    elif test -f $ac_srcdir/configure.ac ||\n\t   test -f $ac_srcdir/configure.in; then\n      echo\n      $ac_configure --help\n    else\n      echo \"$as_me: WARNING: no configuration information is in $ac_dir\" >&2\n    fi\n    cd $ac_popdir\n  done\nfi\n\ntest -n \"$ac_init_help\" && exit 0\nif $ac_init_version; then\n  cat <<\\_ACEOF\nfdlibm configure 5.3\ngenerated by GNU Autoconf 2.59\n\nCopyright (C) 2003 Free Software Foundation, Inc.\nThis configure script is free software; the Free Software Foundation\ngives unlimited permission to copy, distribute and modify it.\n_ACEOF\n  exit 0\nfi\nexec 5>config.log\ncat >&5 <<_ACEOF\nThis file contains any messages produced by compilers while\nrunning configure, to aid debugging if configure makes a mistake.\n\nIt was created by fdlibm $as_me 5.3, which was\ngenerated by GNU Autoconf 2.59.  Invocation command line was\n\n  $ $0 $@\n\n_ACEOF\n{\ncat <<_ASUNAME\n## --------- ##\n## Platform. ##\n## --------- ##\n\nhostname = `(hostname || uname -n) 2>/dev/null | sed 1q`\nuname -m = `(uname -m) 2>/dev/null || echo unknown`\nuname -r = `(uname -r) 2>/dev/null || echo unknown`\nuname -s = `(uname -s) 2>/dev/null || echo unknown`\nuname -v = `(uname -v) 2>/dev/null || echo unknown`\n\n/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`\n/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`\n\n/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`\n/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`\n/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`\nhostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`\n/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`\n/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`\n/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`\n\n_ASUNAME\n\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  echo \"PATH: $as_dir\"\ndone\n\n} >&5\n\ncat >&5 <<_ACEOF\n\n\n## ----------- ##\n## Core tests. ##\n## ----------- ##\n\n_ACEOF\n\n\n# Keep a trace of the command line.\n# Strip out --no-create and --no-recursion so they do not pile up.\n# Strip out --silent because we don't want to record it for future runs.\n# Also quote any args containing shell meta-characters.\n# Make two passes to allow for proper duplicate-argument suppression.\nac_configure_args=\nac_configure_args0=\nac_configure_args1=\nac_sep=\nac_must_keep_next=false\nfor ac_pass in 1 2\ndo\n  for ac_arg\n  do\n    case $ac_arg in\n    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;\n    -q | -quiet | --quiet | --quie | --qui | --qu | --q \\\n    | -silent | --silent | --silen | --sile | --sil)\n      continue ;;\n    *\" \"*|*\"\t\"*|*[\\[\\]\\~\\#\\$\\^\\&\\*\\(\\)\\{\\}\\\\\\|\\;\\<\\>\\?\\\"\\']*)\n      ac_arg=`echo \"$ac_arg\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"` ;;\n    esac\n    case $ac_pass in\n    1) ac_configure_args0=\"$ac_configure_args0 '$ac_arg'\" ;;\n    2)\n      ac_configure_args1=\"$ac_configure_args1 '$ac_arg'\"\n      if test $ac_must_keep_next = true; then\n\tac_must_keep_next=false # Got value, back to normal.\n      else\n\tcase $ac_arg in\n\t  *=* | --config-cache | -C | -disable-* | --disable-* \\\n\t  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \\\n\t  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \\\n\t  | -with-* | --with-* | -without-* | --without-* | --x)\n\t    case \"$ac_configure_args0 \" in\n\t      \"$ac_configure_args1\"*\" '$ac_arg' \"* ) continue ;;\n\t    esac\n\t    ;;\n\t  -* ) ac_must_keep_next=true ;;\n\tesac\n      fi\n      ac_configure_args=\"$ac_configure_args$ac_sep'$ac_arg'\"\n      # Get rid of the leading space.\n      ac_sep=\" \"\n      ;;\n    esac\n  done\ndone\n$as_unset ac_configure_args0 || test \"${ac_configure_args0+set}\" != set || { ac_configure_args0=; export ac_configure_args0; }\n$as_unset ac_configure_args1 || test \"${ac_configure_args1+set}\" != set || { ac_configure_args1=; export ac_configure_args1; }\n\n# When interrupted or exit'd, cleanup temporary files, and complete\n# config.log.  We remove comments because anyway the quotes in there\n# would cause problems or look ugly.\n# WARNING: Be sure not to use single quotes in there, as some shells,\n# such as our DU 5.0 friend, will then `close' the trap.\ntrap 'exit_status=$?\n  # Save into config.log some information that might help in debugging.\n  {\n    echo\n\n    cat <<\\_ASBOX\n## ---------------- ##\n## Cache variables. ##\n## ---------------- ##\n_ASBOX\n    echo\n    # The following way of writing the cache mishandles newlines in values,\n{\n  (set) 2>&1 |\n    case `(ac_space='\"'\"' '\"'\"'; set | grep ac_space) 2>&1` in\n    *ac_space=\\ *)\n      sed -n \\\n\t\"s/'\"'\"'/'\"'\"'\\\\\\\\'\"'\"''\"'\"'/g;\n\t  s/^\\\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\\\)=\\\\(.*\\\\)/\\\\1='\"'\"'\\\\2'\"'\"'/p\"\n      ;;\n    *)\n      sed -n \\\n\t\"s/^\\\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\\\)=\\\\(.*\\\\)/\\\\1=\\\\2/p\"\n      ;;\n    esac;\n}\n    echo\n\n    cat <<\\_ASBOX\n## ----------------- ##\n## Output variables. ##\n## ----------------- ##\n_ASBOX\n    echo\n    for ac_var in $ac_subst_vars\n    do\n      eval ac_val=$`echo $ac_var`\n      echo \"$ac_var='\"'\"'$ac_val'\"'\"'\"\n    done | sort\n    echo\n\n    if test -n \"$ac_subst_files\"; then\n      cat <<\\_ASBOX\n## ------------- ##\n## Output files. ##\n## ------------- ##\n_ASBOX\n      echo\n      for ac_var in $ac_subst_files\n      do\n\teval ac_val=$`echo $ac_var`\n\techo \"$ac_var='\"'\"'$ac_val'\"'\"'\"\n      done | sort\n      echo\n    fi\n\n    if test -s confdefs.h; then\n      cat <<\\_ASBOX\n## ----------- ##\n## confdefs.h. ##\n## ----------- ##\n_ASBOX\n      echo\n      sed \"/^$/d\" confdefs.h | sort\n      echo\n    fi\n    test \"$ac_signal\" != 0 &&\n      echo \"$as_me: caught signal $ac_signal\"\n    echo \"$as_me: exit $exit_status\"\n  } >&5\n  rm -f core *.core &&\n  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&\n    exit $exit_status\n     ' 0\nfor ac_signal in 1 2 13 15; do\n  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal\ndone\nac_signal=0\n\n# confdefs.h avoids OS command line length limits that DEFS can exceed.\nrm -rf conftest* confdefs.h\n# AIX cpp loses on an empty file, so make sure it contains at least a newline.\necho >confdefs.h\n\n# Predefined preprocessor variables.\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_NAME \"$PACKAGE_NAME\"\n_ACEOF\n\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"\n_ACEOF\n\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_VERSION \"$PACKAGE_VERSION\"\n_ACEOF\n\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_STRING \"$PACKAGE_STRING\"\n_ACEOF\n\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"\n_ACEOF\n\n\n# Let the site file select an alternate cache file if it wants to.\n# Prefer explicitly selected file to automatically selected ones.\nif test -z \"$CONFIG_SITE\"; then\n  if test \"x$prefix\" != xNONE; then\n    CONFIG_SITE=\"$prefix/share/config.site $prefix/etc/config.site\"\n  else\n    CONFIG_SITE=\"$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site\"\n  fi\nfi\nfor ac_site_file in $CONFIG_SITE; do\n  if test -r \"$ac_site_file\"; then\n    { echo \"$as_me:$LINENO: loading site script $ac_site_file\" >&5\necho \"$as_me: loading site script $ac_site_file\" >&6;}\n    sed 's/^/| /' \"$ac_site_file\" >&5\n    . \"$ac_site_file\"\n  fi\ndone\n\nif test -r \"$cache_file\"; then\n  # Some versions of bash will fail to source /dev/null (special\n  # files actually), so we avoid doing that.\n  if test -f \"$cache_file\"; then\n    { echo \"$as_me:$LINENO: loading cache $cache_file\" >&5\necho \"$as_me: loading cache $cache_file\" >&6;}\n    case $cache_file in\n      [\\\\/]* | ?:[\\\\/]* ) . $cache_file;;\n      *)                      . ./$cache_file;;\n    esac\n  fi\nelse\n  { echo \"$as_me:$LINENO: creating cache $cache_file\" >&5\necho \"$as_me: creating cache $cache_file\" >&6;}\n  >$cache_file\nfi\n\n# Check that the precious variables saved in the cache have kept the same\n# value.\nac_cache_corrupted=false\nfor ac_var in `(set) 2>&1 |\n\t       sed -n 's/^ac_env_\\([a-zA-Z_0-9]*\\)_set=.*/\\1/p'`; do\n  eval ac_old_set=\\$ac_cv_env_${ac_var}_set\n  eval ac_new_set=\\$ac_env_${ac_var}_set\n  eval ac_old_val=\"\\$ac_cv_env_${ac_var}_value\"\n  eval ac_new_val=\"\\$ac_env_${ac_var}_value\"\n  case $ac_old_set,$ac_new_set in\n    set,)\n      { echo \"$as_me:$LINENO: error: \\`$ac_var' was set to \\`$ac_old_val' in the previous run\" >&5\necho \"$as_me: error: \\`$ac_var' was set to \\`$ac_old_val' in the previous run\" >&2;}\n      ac_cache_corrupted=: ;;\n    ,set)\n      { echo \"$as_me:$LINENO: error: \\`$ac_var' was not set in the previous run\" >&5\necho \"$as_me: error: \\`$ac_var' was not set in the previous run\" >&2;}\n      ac_cache_corrupted=: ;;\n    ,);;\n    *)\n      if test \"x$ac_old_val\" != \"x$ac_new_val\"; then\n\t{ echo \"$as_me:$LINENO: error: \\`$ac_var' has changed since the previous run:\" >&5\necho \"$as_me: error: \\`$ac_var' has changed since the previous run:\" >&2;}\n\t{ echo \"$as_me:$LINENO:   former value:  $ac_old_val\" >&5\necho \"$as_me:   former value:  $ac_old_val\" >&2;}\n\t{ echo \"$as_me:$LINENO:   current value: $ac_new_val\" >&5\necho \"$as_me:   current value: $ac_new_val\" >&2;}\n\tac_cache_corrupted=:\n      fi;;\n  esac\n  # Pass precious variables to config.status.\n  if test \"$ac_new_set\" = set; then\n    case $ac_new_val in\n    *\" \"*|*\"\t\"*|*[\\[\\]\\~\\#\\$\\^\\&\\*\\(\\)\\{\\}\\\\\\|\\;\\<\\>\\?\\\"\\']*)\n      ac_arg=$ac_var=`echo \"$ac_new_val\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"` ;;\n    *) ac_arg=$ac_var=$ac_new_val ;;\n    esac\n    case \" $ac_configure_args \" in\n      *\" '$ac_arg' \"*) ;; # Avoid dups.  Use of quotes ensures accuracy.\n      *) ac_configure_args=\"$ac_configure_args '$ac_arg'\" ;;\n    esac\n  fi\ndone\nif $ac_cache_corrupted; then\n  { echo \"$as_me:$LINENO: error: changes in the environment can compromise the build\" >&5\necho \"$as_me: error: changes in the environment can compromise the build\" >&2;}\n  { { echo \"$as_me:$LINENO: error: run \\`make distclean' and/or \\`rm $cache_file' and start over\" >&5\necho \"$as_me: error: run \\`make distclean' and/or \\`rm $cache_file' and start over\" >&2;}\n   { (exit 1); exit 1; }; }\nfi\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\nif test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}gcc\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}gcc; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_CC+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$CC\"; then\n  ac_cv_prog_CC=\"$CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_CC=\"${ac_tool_prefix}gcc\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nCC=$ac_cv_prog_CC\nif test -n \"$CC\"; then\n  echo \"$as_me:$LINENO: result: $CC\" >&5\necho \"${ECHO_T}$CC\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\nfi\nif test -z \"$ac_cv_prog_CC\"; then\n  ac_ct_CC=$CC\n  # Extract the first word of \"gcc\", so it can be a program name with args.\nset dummy gcc; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_ac_ct_CC+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$ac_ct_CC\"; then\n  ac_cv_prog_ac_ct_CC=\"$ac_ct_CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_CC=\"gcc\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nac_ct_CC=$ac_cv_prog_ac_ct_CC\nif test -n \"$ac_ct_CC\"; then\n  echo \"$as_me:$LINENO: result: $ac_ct_CC\" >&5\necho \"${ECHO_T}$ac_ct_CC\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\n  CC=$ac_ct_CC\nelse\n  CC=\"$ac_cv_prog_CC\"\nfi\n\nif test -z \"$CC\"; then\n  if test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}cc\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}cc; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_CC+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$CC\"; then\n  ac_cv_prog_CC=\"$CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_CC=\"${ac_tool_prefix}cc\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nCC=$ac_cv_prog_CC\nif test -n \"$CC\"; then\n  echo \"$as_me:$LINENO: result: $CC\" >&5\necho \"${ECHO_T}$CC\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\nfi\nif test -z \"$ac_cv_prog_CC\"; then\n  ac_ct_CC=$CC\n  # Extract the first word of \"cc\", so it can be a program name with args.\nset dummy cc; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_ac_ct_CC+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$ac_ct_CC\"; then\n  ac_cv_prog_ac_ct_CC=\"$ac_ct_CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_CC=\"cc\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nac_ct_CC=$ac_cv_prog_ac_ct_CC\nif test -n \"$ac_ct_CC\"; then\n  echo \"$as_me:$LINENO: result: $ac_ct_CC\" >&5\necho \"${ECHO_T}$ac_ct_CC\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\n  CC=$ac_ct_CC\nelse\n  CC=\"$ac_cv_prog_CC\"\nfi\n\nfi\nif test -z \"$CC\"; then\n  # Extract the first word of \"cc\", so it can be a program name with args.\nset dummy cc; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_CC+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$CC\"; then\n  ac_cv_prog_CC=\"$CC\" # Let the user override the test.\nelse\n  ac_prog_rejected=no\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    if test \"$as_dir/$ac_word$ac_exec_ext\" = \"/usr/ucb/cc\"; then\n       ac_prog_rejected=yes\n       continue\n     fi\n    ac_cv_prog_CC=\"cc\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nif test $ac_prog_rejected = yes; then\n  # We found a bogon in the path, so make sure we never use it.\n  set dummy $ac_cv_prog_CC\n  shift\n  if test $# != 0; then\n    # We chose a different compiler from the bogus one.\n    # However, it has the same basename, so the bogon will be chosen\n    # first if we set CC to just the basename; use the full file name.\n    shift\n    ac_cv_prog_CC=\"$as_dir/$ac_word${1+' '}$@\"\n  fi\nfi\nfi\nfi\nCC=$ac_cv_prog_CC\nif test -n \"$CC\"; then\n  echo \"$as_me:$LINENO: result: $CC\" >&5\necho \"${ECHO_T}$CC\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\nfi\nif test -z \"$CC\"; then\n  if test -n \"$ac_tool_prefix\"; then\n  for ac_prog in cl\n  do\n    # Extract the first word of \"$ac_tool_prefix$ac_prog\", so it can be a program name with args.\nset dummy $ac_tool_prefix$ac_prog; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_CC+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$CC\"; then\n  ac_cv_prog_CC=\"$CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_CC=\"$ac_tool_prefix$ac_prog\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nCC=$ac_cv_prog_CC\nif test -n \"$CC\"; then\n  echo \"$as_me:$LINENO: result: $CC\" >&5\necho \"${ECHO_T}$CC\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\n    test -n \"$CC\" && break\n  done\nfi\nif test -z \"$CC\"; then\n  ac_ct_CC=$CC\n  for ac_prog in cl\ndo\n  # Extract the first word of \"$ac_prog\", so it can be a program name with args.\nset dummy $ac_prog; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_ac_ct_CC+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$ac_ct_CC\"; then\n  ac_cv_prog_ac_ct_CC=\"$ac_ct_CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_CC=\"$ac_prog\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nac_ct_CC=$ac_cv_prog_ac_ct_CC\nif test -n \"$ac_ct_CC\"; then\n  echo \"$as_me:$LINENO: result: $ac_ct_CC\" >&5\necho \"${ECHO_T}$ac_ct_CC\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\n  test -n \"$ac_ct_CC\" && break\ndone\n\n  CC=$ac_ct_CC\nfi\n\nfi\n\n\ntest -z \"$CC\" && { { echo \"$as_me:$LINENO: error: no acceptable C compiler found in \\$PATH\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: no acceptable C compiler found in \\$PATH\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 1); exit 1; }; }\n\n# Provide some information about the compiler.\necho \"$as_me:$LINENO:\" \\\n     \"checking for C compiler version\" >&5\nac_compiler=`set X $ac_compile; echo $2`\n{ (eval echo \"$as_me:$LINENO: \\\"$ac_compiler --version </dev/null >&5\\\"\") >&5\n  (eval $ac_compiler --version </dev/null >&5) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }\n{ (eval echo \"$as_me:$LINENO: \\\"$ac_compiler -v </dev/null >&5\\\"\") >&5\n  (eval $ac_compiler -v </dev/null >&5) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }\n{ (eval echo \"$as_me:$LINENO: \\\"$ac_compiler -V </dev/null >&5\\\"\") >&5\n  (eval $ac_compiler -V </dev/null >&5) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }\n\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nac_clean_files_save=$ac_clean_files\nac_clean_files=\"$ac_clean_files a.out a.exe b.out\"\n# Try to create an executable without -o first, disregard a.out.\n# It will help us diagnose broken compilers, and finding out an intuition\n# of exeext.\necho \"$as_me:$LINENO: checking for C compiler default output file name\" >&5\necho $ECHO_N \"checking for C compiler default output file name... $ECHO_C\" >&6\nac_link_default=`echo \"$ac_link\" | sed 's/ -o *conftest[^ ]*//'`\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link_default\\\"\") >&5\n  (eval $ac_link_default) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; then\n  # Find the output, starting from the most likely.  This scheme is\n# not robust to junk in `.', hence go to wildcards (a.*) only as a last\n# resort.\n\n# Be careful to initialize this variable, since it used to be cached.\n# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.\nac_cv_exeext=\n# b.out is created by i960 compilers.\nfor ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out\ndo\n  test -f \"$ac_file\" || continue\n  case $ac_file in\n    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )\n\t;;\n    conftest.$ac_ext )\n\t# This is the source file.\n\t;;\n    [ab].out )\n\t# We found the default executable, but exeext='' is most\n\t# certainly right.\n\tbreak;;\n    *.* )\n\tac_cv_exeext=`expr \"$ac_file\" : '[^.]*\\(\\..*\\)'`\n\t# FIXME: I believe we export ac_cv_exeext for Libtool,\n\t# but it would be cool to find out if it's true.  Does anybody\n\t# maintain Libtool? --akim.\n\texport ac_cv_exeext\n\tbreak;;\n    * )\n\tbreak;;\n  esac\ndone\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n{ { echo \"$as_me:$LINENO: error: C compiler cannot create executables\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: C compiler cannot create executables\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 77); exit 77; }; }\nfi\n\nac_exeext=$ac_cv_exeext\necho \"$as_me:$LINENO: result: $ac_file\" >&5\necho \"${ECHO_T}$ac_file\" >&6\n\n# Check the compiler produces executables we can run.  If not, either\n# the compiler is broken, or we cross compile.\necho \"$as_me:$LINENO: checking whether the C compiler works\" >&5\necho $ECHO_N \"checking whether the C compiler works... $ECHO_C\" >&6\n# FIXME: These cross compiler hacks should be removed for Autoconf 3.0\n# If not cross compiling, check that we can run a simple program.\nif test \"$cross_compiling\" != yes; then\n  if { ac_try='./$ac_file'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n    cross_compiling=no\n  else\n    if test \"$cross_compiling\" = maybe; then\n\tcross_compiling=yes\n    else\n\t{ { echo \"$as_me:$LINENO: error: cannot run C compiled programs.\nIf you meant to cross compile, use \\`--host'.\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: cannot run C compiled programs.\nIf you meant to cross compile, use \\`--host'.\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 1); exit 1; }; }\n    fi\n  fi\nfi\necho \"$as_me:$LINENO: result: yes\" >&5\necho \"${ECHO_T}yes\" >&6\n\nrm -f a.out a.exe conftest$ac_cv_exeext b.out\nac_clean_files=$ac_clean_files_save\n# Check the compiler produces executables we can run.  If not, either\n# the compiler is broken, or we cross compile.\necho \"$as_me:$LINENO: checking whether we are cross compiling\" >&5\necho $ECHO_N \"checking whether we are cross compiling... $ECHO_C\" >&6\necho \"$as_me:$LINENO: result: $cross_compiling\" >&5\necho \"${ECHO_T}$cross_compiling\" >&6\n\necho \"$as_me:$LINENO: checking for suffix of executables\" >&5\necho $ECHO_N \"checking for suffix of executables... $ECHO_C\" >&6\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; then\n  # If both `conftest.exe' and `conftest' are `present' (well, observable)\n# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will\n# work properly (i.e., refer to `conftest.exe'), while it won't with\n# `rm'.\nfor ac_file in conftest.exe conftest conftest.*; do\n  test -f \"$ac_file\" || continue\n  case $ac_file in\n    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;\n    *.* ) ac_cv_exeext=`expr \"$ac_file\" : '[^.]*\\(\\..*\\)'`\n\t  export ac_cv_exeext\n\t  break;;\n    * ) break;;\n  esac\ndone\nelse\n  { { echo \"$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: cannot compute suffix of executables: cannot compile and link\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 1); exit 1; }; }\nfi\n\nrm -f conftest$ac_cv_exeext\necho \"$as_me:$LINENO: result: $ac_cv_exeext\" >&5\necho \"${ECHO_T}$ac_cv_exeext\" >&6\n\nrm -f conftest.$ac_ext\nEXEEXT=$ac_cv_exeext\nac_exeext=$EXEEXT\necho \"$as_me:$LINENO: checking for suffix of object files\" >&5\necho $ECHO_N \"checking for suffix of object files... $ECHO_C\" >&6\nif test \"${ac_cv_objext+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.o conftest.obj\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; then\n  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do\n  case $ac_file in\n    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;\n    *) ac_cv_objext=`expr \"$ac_file\" : '.*\\.\\(.*\\)'`\n       break;;\n  esac\ndone\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n{ { echo \"$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: cannot compute suffix of object files: cannot compile\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 1); exit 1; }; }\nfi\n\nrm -f conftest.$ac_cv_objext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_objext\" >&5\necho \"${ECHO_T}$ac_cv_objext\" >&6\nOBJEXT=$ac_cv_objext\nac_objext=$OBJEXT\necho \"$as_me:$LINENO: checking whether we are using the GNU C compiler\" >&5\necho $ECHO_N \"checking whether we are using the GNU C compiler... $ECHO_C\" >&6\nif test \"${ac_cv_c_compiler_gnu+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n#ifndef __GNUC__\n       choke me\n#endif\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_compiler_gnu=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_compiler_gnu=no\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nac_cv_c_compiler_gnu=$ac_compiler_gnu\n\nfi\necho \"$as_me:$LINENO: result: $ac_cv_c_compiler_gnu\" >&5\necho \"${ECHO_T}$ac_cv_c_compiler_gnu\" >&6\nGCC=`test $ac_compiler_gnu = yes && echo yes`\nac_test_CFLAGS=${CFLAGS+set}\nac_save_CFLAGS=$CFLAGS\nCFLAGS=\"-g\"\necho \"$as_me:$LINENO: checking whether $CC accepts -g\" >&5\necho $ECHO_N \"checking whether $CC accepts -g... $ECHO_C\" >&6\nif test \"${ac_cv_prog_cc_g+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_prog_cc_g=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_prog_cc_g=no\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_prog_cc_g\" >&5\necho \"${ECHO_T}$ac_cv_prog_cc_g\" >&6\nif test \"$ac_test_CFLAGS\" = set; then\n  CFLAGS=$ac_save_CFLAGS\nelif test $ac_cv_prog_cc_g = yes; then\n  if test \"$GCC\" = yes; then\n    CFLAGS=\"-g -O2\"\n  else\n    CFLAGS=\"-g\"\n  fi\nelse\n  if test \"$GCC\" = yes; then\n    CFLAGS=\"-O2\"\n  else\n    CFLAGS=\n  fi\nfi\necho \"$as_me:$LINENO: checking for $CC option to accept ANSI C\" >&5\necho $ECHO_N \"checking for $CC option to accept ANSI C... $ECHO_C\" >&6\nif test \"${ac_cv_prog_cc_stdc+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_cv_prog_cc_stdc=no\nac_save_CC=$CC\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <stdarg.h>\n#include <stdio.h>\n#include <sys/types.h>\n#include <sys/stat.h>\n/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */\nstruct buf { int x; };\nFILE * (*rcsopen) (struct buf *, struct stat *, int);\nstatic char *e (p, i)\n     char **p;\n     int i;\n{\n  return p[i];\n}\nstatic char *f (char * (*g) (char **, int), char **p, ...)\n{\n  char *s;\n  va_list v;\n  va_start (v,p);\n  s = g (p, va_arg (v,int));\n  va_end (v);\n  return s;\n}\n\n/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has\n   function prototypes and stuff, but not '\\xHH' hex character constants.\n   These don't provoke an error unfortunately, instead are silently treated\n   as 'x'.  The following induces an error, until -std1 is added to get\n   proper ANSI mode.  Curiously '\\x00'!='x' always comes out true, for an\n   array size at least.  It's necessary to write '\\x00'==0 to get something\n   that's true only with -std1.  */\nint osf4_cc_array ['\\x00' == 0 ? 1 : -1];\n\nint test (int i, double x);\nstruct s1 {int (*f) (int a);};\nstruct s2 {int (*f) (double a);};\nint pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);\nint argc;\nchar **argv;\nint\nmain ()\n{\nreturn f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];\n  ;\n  return 0;\n}\n_ACEOF\n# Don't try gcc -ansi; that turns off useful extensions and\n# breaks some systems' header files.\n# AIX\t\t\t-qlanglvl=ansi\n# Ultrix and OSF/1\t-std1\n# HP-UX 10.20 and later\t-Ae\n# HP-UX older versions\t-Aa -D_HPUX_SOURCE\n# SVR4\t\t\t-Xc -D__EXTENSIONS__\nfor ac_arg in \"\" -qlanglvl=ansi -std1 -Ae \"-Aa -D_HPUX_SOURCE\" \"-Xc -D__EXTENSIONS__\"\ndo\n  CC=\"$ac_save_CC $ac_arg\"\n  rm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_prog_cc_stdc=$ac_arg\nbreak\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nfi\nrm -f conftest.err conftest.$ac_objext\ndone\nrm -f conftest.$ac_ext conftest.$ac_objext\nCC=$ac_save_CC\n\nfi\n\ncase \"x$ac_cv_prog_cc_stdc\" in\n  x|xno)\n    echo \"$as_me:$LINENO: result: none needed\" >&5\necho \"${ECHO_T}none needed\" >&6 ;;\n  *)\n    echo \"$as_me:$LINENO: result: $ac_cv_prog_cc_stdc\" >&5\necho \"${ECHO_T}$ac_cv_prog_cc_stdc\" >&6\n    CC=\"$CC $ac_cv_prog_cc_stdc\" ;;\nesac\n\n# Some people use a C++ compiler to compile C.  Since we use `exit',\n# in C++ we need to declare it.  In case someone uses the same compiler\n# for both compiling C and C++ we need to have the C++ compiler decide\n# the declaration of exit, since it's the most demanding environment.\ncat >conftest.$ac_ext <<_ACEOF\n#ifndef __cplusplus\n  choke me\n#endif\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  for ac_declaration in \\\n   '' \\\n   'extern \"C\" void std::exit (int) throw (); using std::exit;' \\\n   'extern \"C\" void std::exit (int); using std::exit;' \\\n   'extern \"C\" void exit (int) throw ();' \\\n   'extern \"C\" void exit (int);' \\\n   'void exit (int);'\ndo\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_declaration\n#include <stdlib.h>\nint\nmain ()\n{\nexit (42);\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  :\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\ncontinue\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_declaration\nint\nmain ()\n{\nexit (42);\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  break\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\ndone\nrm -f conftest*\nif test -n \"$ac_declaration\"; then\n  echo '#ifdef __cplusplus' >>confdefs.h\n  echo $ac_declaration      >>confdefs.h\n  echo '#endif'             >>confdefs.h\nfi\n\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\n\nfor ac_prog in ar\ndo\n  # Extract the first word of \"$ac_prog\", so it can be a program name with args.\nset dummy $ac_prog; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_AR+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$AR\"; then\n  ac_cv_prog_AR=\"$AR\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_AR=\"$ac_prog\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nAR=$ac_cv_prog_AR\nif test -n \"$AR\"; then\n  echo \"$as_me:$LINENO: result: $AR\" >&5\necho \"${ECHO_T}$AR\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\n  test -n \"$AR\" && break\ndone\n\nfor ac_prog in chmod\ndo\n  # Extract the first word of \"$ac_prog\", so it can be a program name with args.\nset dummy $ac_prog; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_CHMOD+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$CHMOD\"; then\n  ac_cv_prog_CHMOD=\"$CHMOD\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_CHMOD=\"$ac_prog\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nCHMOD=$ac_cv_prog_CHMOD\nif test -n \"$CHMOD\"; then\n  echo \"$as_me:$LINENO: result: $CHMOD\" >&5\necho \"${ECHO_T}$CHMOD\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\n  test -n \"$CHMOD\" && break\ndone\n\nfor ac_prog in cp\ndo\n  # Extract the first word of \"$ac_prog\", so it can be a program name with args.\nset dummy $ac_prog; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_CP+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$CP\"; then\n  ac_cv_prog_CP=\"$CP\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_CP=\"$ac_prog\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nCP=$ac_cv_prog_CP\nif test -n \"$CP\"; then\n  echo \"$as_me:$LINENO: result: $CP\" >&5\necho \"${ECHO_T}$CP\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\n  test -n \"$CP\" && break\ndone\n\nfor ac_prog in ranlib echo\ndo\n  # Extract the first word of \"$ac_prog\", so it can be a program name with args.\nset dummy $ac_prog; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_RANLIB+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$RANLIB\"; then\n  ac_cv_prog_RANLIB=\"$RANLIB\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_RANLIB=\"$ac_prog\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nRANLIB=$ac_cv_prog_RANLIB\nif test -n \"$RANLIB\"; then\n  echo \"$as_me:$LINENO: result: $RANLIB\" >&5\necho \"${ECHO_T}$RANLIB\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\n  test -n \"$RANLIB\" && break\ndone\n\nfor ac_prog in /bin/rm rm\ndo\n  # Extract the first word of \"$ac_prog\", so it can be a program name with args.\nset dummy $ac_prog; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_path_RM+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  case $RM in\n  [\\\\/]* | ?:[\\\\/]*)\n  ac_cv_path_RM=\"$RM\" # Let the user override the test with a path.\n  ;;\n  *)\n  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_path_RM=\"$as_dir/$ac_word$ac_exec_ext\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\n  ;;\nesac\nfi\nRM=$ac_cv_path_RM\n\nif test -n \"$RM\"; then\n  echo \"$as_me:$LINENO: result: $RM\" >&5\necho \"${ECHO_T}$RM\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\n  test -n \"$RM\" && break\ndone\n\n\n          ac_config_files=\"$ac_config_files Makefile\"\ncat >confcache <<\\_ACEOF\n# This file is a shell script that caches the results of configure\n# tests run on this system so they can be shared between configure\n# scripts and configure runs, see configure's option --config-cache.\n# It is not useful on other systems.  If it contains results you don't\n# want to keep, you may remove or edit it.\n#\n# config.status only pays attention to the cache file if you give it\n# the --recheck option to rerun configure.\n#\n# `ac_cv_env_foo' variables (set or unset) will be overridden when\n# loading this file, other *unset* `ac_cv_foo' will be assigned the\n# following values.\n\n_ACEOF\n\n# The following way of writing the cache mishandles newlines in values,\n# but we know of no workaround that is simple, portable, and efficient.\n# So, don't put newlines in cache variables' values.\n# Ultrix sh set writes to stderr and can't be redirected directly,\n# and sets the high bit in the cache file unless we assign to the vars.\n{\n  (set) 2>&1 |\n    case `(ac_space=' '; set | grep ac_space) 2>&1` in\n    *ac_space=\\ *)\n      # `set' does not quote correctly, so add quotes (double-quote\n      # substitution turns \\\\\\\\ into \\\\, and sed turns \\\\ into \\).\n      sed -n \\\n\t\"s/'/'\\\\\\\\''/g;\n\t  s/^\\\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\\\)=\\\\(.*\\\\)/\\\\1='\\\\2'/p\"\n      ;;\n    *)\n      # `set' quotes correctly as required by POSIX, so do not add quotes.\n      sed -n \\\n\t\"s/^\\\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\\\)=\\\\(.*\\\\)/\\\\1=\\\\2/p\"\n      ;;\n    esac;\n} |\n  sed '\n     t clear\n     : clear\n     s/^\\([^=]*\\)=\\(.*[{}].*\\)$/test \"${\\1+set}\" = set || &/\n     t end\n     /^ac_cv_env/!s/^\\([^=]*\\)=\\(.*\\)$/\\1=${\\1=\\2}/\n     : end' >>confcache\nif diff $cache_file confcache >/dev/null 2>&1; then :; else\n  if test -w $cache_file; then\n    test \"x$cache_file\" != \"x/dev/null\" && echo \"updating cache $cache_file\"\n    cat confcache >$cache_file\n  else\n    echo \"not updating unwritable cache $cache_file\"\n  fi\nfi\nrm -f confcache\n\ntest \"x$prefix\" = xNONE && prefix=$ac_default_prefix\n# Let make expand exec_prefix.\ntest \"x$exec_prefix\" = xNONE && exec_prefix='${prefix}'\n\n# VPATH may cause trouble with some makes, so we remove $(srcdir),\n# ${srcdir} and @srcdir@ from VPATH if srcdir is \".\", strip leading and\n# trailing colons and then remove the whole line if VPATH becomes empty\n# (actually we leave an empty line to preserve line numbers).\nif test \"x$srcdir\" = x.; then\n  ac_vpsub='/^[\t ]*VPATH[\t ]*=/{\ns/:*\\$(srcdir):*/:/;\ns/:*\\${srcdir}:*/:/;\ns/:*@srcdir@:*/:/;\ns/^\\([^=]*=[\t ]*\\):*/\\1/;\ns/:*$//;\ns/^[^=]*=[\t ]*$//;\n}'\nfi\n\n# Transform confdefs.h into DEFS.\n# Protect against shell expansion while executing Makefile rules.\n# Protect against Makefile macro expansion.\n#\n# If the first sed substitution is executed (which looks for macros that\n# take arguments), then we branch to the quote section.  Otherwise,\n# look for a macro that doesn't take arguments.\ncat >confdef2opt.sed <<\\_ACEOF\nt clear\n: clear\ns,^[\t ]*#[\t ]*define[\t ][\t ]*\\([^\t (][^\t (]*([^)]*)\\)[\t ]*\\(.*\\),-D\\1=\\2,g\nt quote\ns,^[\t ]*#[\t ]*define[\t ][\t ]*\\([^\t ][^\t ]*\\)[\t ]*\\(.*\\),-D\\1=\\2,g\nt quote\nd\n: quote\ns,[\t `~#$^&*(){}\\\\|;'\"<>?],\\\\&,g\ns,\\[,\\\\&,g\ns,\\],\\\\&,g\ns,\\$,$$,g\np\n_ACEOF\n# We use echo to avoid assuming a particular line-breaking character.\n# The extra dot is to prevent the shell from consuming trailing\n# line-breaks from the sub-command output.  A line-break within\n# single-quotes doesn't work because, if this script is created in a\n# platform that uses two characters for line-breaks (e.g., DOS), tr\n# would break.\nac_LF_and_DOT=`echo; echo .`\nDEFS=`sed -n -f confdef2opt.sed confdefs.h | tr \"$ac_LF_and_DOT\" ' .'`\nrm -f confdef2opt.sed\n\n\nac_libobjs=\nac_ltlibobjs=\nfor ac_i in : $LIBOBJS; do test \"x$ac_i\" = x: && continue\n  # 1. Remove the extension, and $U if already installed.\n  ac_i=`echo \"$ac_i\" |\n\t sed 's/\\$U\\././;s/\\.o$//;s/\\.obj$//'`\n  # 2. Add them.\n  ac_libobjs=\"$ac_libobjs $ac_i\\$U.$ac_objext\"\n  ac_ltlibobjs=\"$ac_ltlibobjs $ac_i\"'$U.lo'\ndone\nLIBOBJS=$ac_libobjs\n\nLTLIBOBJS=$ac_ltlibobjs\n\n\n\n: ${CONFIG_STATUS=./config.status}\nac_clean_files_save=$ac_clean_files\nac_clean_files=\"$ac_clean_files $CONFIG_STATUS\"\n{ echo \"$as_me:$LINENO: creating $CONFIG_STATUS\" >&5\necho \"$as_me: creating $CONFIG_STATUS\" >&6;}\ncat >$CONFIG_STATUS <<_ACEOF\n#! $SHELL\n# Generated by $as_me.\n# Run this file to recreate the current configuration.\n# Compiler output produced by configure, useful for debugging\n# configure, is in config.log if it exists.\n\ndebug=false\nac_cs_recheck=false\nac_cs_silent=false\nSHELL=\\${CONFIG_SHELL-$SHELL}\n_ACEOF\n\ncat >>$CONFIG_STATUS <<\\_ACEOF\n## --------------------- ##\n## M4sh Initialization.  ##\n## --------------------- ##\n\n# Be Bourne compatible\nif test -n \"${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then\n  emulate sh\n  NULLCMD=:\n  # Zsh 3.x and 4.x performs word splitting on ${1+\"$@\"}, which\n  # is contrary to our usage.  Disable this feature.\n  alias -g '${1+\"$@\"}'='\"$@\"'\nelif test -n \"${BASH_VERSION+set}\" && (set -o posix) >/dev/null 2>&1; then\n  set -o posix\nfi\nDUALCASE=1; export DUALCASE # for MKS sh\n\n# Support unset when possible.\nif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then\n  as_unset=unset\nelse\n  as_unset=false\nfi\n\n\n# Work around bugs in pre-3.0 UWIN ksh.\n$as_unset ENV MAIL MAILPATH\nPS1='$ '\nPS2='> '\nPS4='+ '\n\n# NLS nuisances.\nfor as_var in \\\n  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \\\n  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \\\n  LC_TELEPHONE LC_TIME\ndo\n  if (set +x; test -z \"`(eval $as_var=C; export $as_var) 2>&1`\"); then\n    eval $as_var=C; export $as_var\n  else\n    $as_unset $as_var\n  fi\ndone\n\n# Required to use basename.\nif expr a : '\\(a\\)' >/dev/null 2>&1; then\n  as_expr=expr\nelse\n  as_expr=false\nfi\n\nif (basename /) >/dev/null 2>&1 && test \"X`basename / 2>&1`\" = \"X/\"; then\n  as_basename=basename\nelse\n  as_basename=false\nfi\n\n\n# Name of the executable.\nas_me=`$as_basename \"$0\" ||\n$as_expr X/\"$0\" : '.*/\\([^/][^/]*\\)/*$' \\| \\\n\t X\"$0\" : 'X\\(//\\)$' \\| \\\n\t X\"$0\" : 'X\\(/\\)$' \\| \\\n\t .     : '\\(.\\)' 2>/dev/null ||\necho X/\"$0\" |\n    sed '/^.*\\/\\([^/][^/]*\\)\\/*$/{ s//\\1/; q; }\n  \t  /^X\\/\\(\\/\\/\\)$/{ s//\\1/; q; }\n  \t  /^X\\/\\(\\/\\).*/{ s//\\1/; q; }\n  \t  s/.*/./; q'`\n\n\n# PATH needs CR, and LINENO needs CR and PATH.\n# Avoid depending upon Character Ranges.\nas_cr_letters='abcdefghijklmnopqrstuvwxyz'\nas_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'\nas_cr_Letters=$as_cr_letters$as_cr_LETTERS\nas_cr_digits='0123456789'\nas_cr_alnum=$as_cr_Letters$as_cr_digits\n\n# The user is always right.\nif test \"${PATH_SEPARATOR+set}\" != set; then\n  echo \"#! /bin/sh\" >conf$$.sh\n  echo  \"exit 0\"   >>conf$$.sh\n  chmod +x conf$$.sh\n  if (PATH=\"/nonexistent;.\"; conf$$.sh) >/dev/null 2>&1; then\n    PATH_SEPARATOR=';'\n  else\n    PATH_SEPARATOR=:\n  fi\n  rm -f conf$$.sh\nfi\n\n\n  as_lineno_1=$LINENO\n  as_lineno_2=$LINENO\n  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`\n  test \"x$as_lineno_1\" != \"x$as_lineno_2\" &&\n  test \"x$as_lineno_3\"  = \"x$as_lineno_2\"  || {\n  # Find who we are.  Look in the path if we contain no path at all\n  # relative or not.\n  case $0 in\n    *[\\\\/]* ) as_myself=$0 ;;\n    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  test -r \"$as_dir/$0\" && as_myself=$as_dir/$0 && break\ndone\n\n       ;;\n  esac\n  # We did not find ourselves, most probably we were run as `sh COMMAND'\n  # in which case we are not to be found in the path.\n  if test \"x$as_myself\" = x; then\n    as_myself=$0\n  fi\n  if test ! -f \"$as_myself\"; then\n    { { echo \"$as_me:$LINENO: error: cannot find myself; rerun with an absolute path\" >&5\necho \"$as_me: error: cannot find myself; rerun with an absolute path\" >&2;}\n   { (exit 1); exit 1; }; }\n  fi\n  case $CONFIG_SHELL in\n  '')\n    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for as_base in sh bash ksh sh5; do\n\t case $as_dir in\n\t /*)\n\t   if (\"$as_dir/$as_base\" -c '\n  as_lineno_1=$LINENO\n  as_lineno_2=$LINENO\n  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`\n  test \"x$as_lineno_1\" != \"x$as_lineno_2\" &&\n  test \"x$as_lineno_3\"  = \"x$as_lineno_2\" ') 2>/dev/null; then\n\t     $as_unset BASH_ENV || test \"${BASH_ENV+set}\" != set || { BASH_ENV=; export BASH_ENV; }\n\t     $as_unset ENV || test \"${ENV+set}\" != set || { ENV=; export ENV; }\n\t     CONFIG_SHELL=$as_dir/$as_base\n\t     export CONFIG_SHELL\n\t     exec \"$CONFIG_SHELL\" \"$0\" ${1+\"$@\"}\n\t   fi;;\n\t esac\n       done\ndone\n;;\n  esac\n\n  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO\n  # uniformly replaced by the line number.  The first 'sed' inserts a\n  # line-number line before each line; the second 'sed' does the real\n  # work.  The second script uses 'N' to pair each line-number line\n  # with the numbered line, and appends trailing '-' during\n  # substitution so that $LINENO is not a special case at line end.\n  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the\n  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)\n  sed '=' <$as_myself |\n    sed '\n      N\n      s,$,-,\n      : loop\n      s,^\\(['$as_cr_digits']*\\)\\(.*\\)[$]LINENO\\([^'$as_cr_alnum'_]\\),\\1\\2\\1\\3,\n      t loop\n      s,-$,,\n      s,^['$as_cr_digits']*\\n,,\n    ' >$as_me.lineno &&\n  chmod +x $as_me.lineno ||\n    { { echo \"$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell\" >&5\necho \"$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell\" >&2;}\n   { (exit 1); exit 1; }; }\n\n  # Don't try to exec as it changes $[0], causing all sort of problems\n  # (the dirname of $[0] is not the place where we might find the\n  # original and so on.  Autoconf is especially sensible to this).\n  . ./$as_me.lineno\n  # Exit status is that of the last command.\n  exit\n}\n\n\ncase `echo \"testing\\c\"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in\n  *c*,-n*) ECHO_N= ECHO_C='\n' ECHO_T='\t' ;;\n  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;\n  *)       ECHO_N= ECHO_C='\\c' ECHO_T= ;;\nesac\n\nif expr a : '\\(a\\)' >/dev/null 2>&1; then\n  as_expr=expr\nelse\n  as_expr=false\nfi\n\nrm -f conf$$ conf$$.exe conf$$.file\necho >conf$$.file\nif ln -s conf$$.file conf$$ 2>/dev/null; then\n  # We could just check for DJGPP; but this test a) works b) is more generic\n  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).\n  if test -f conf$$.exe; then\n    # Don't use ln at all; we don't have any links\n    as_ln_s='cp -p'\n  else\n    as_ln_s='ln -s'\n  fi\nelif ln conf$$.file conf$$ 2>/dev/null; then\n  as_ln_s=ln\nelse\n  as_ln_s='cp -p'\nfi\nrm -f conf$$ conf$$.exe conf$$.file\n\nif mkdir -p . 2>/dev/null; then\n  as_mkdir_p=:\nelse\n  test -d ./-p && rmdir ./-p\n  as_mkdir_p=false\nfi\n\nas_executable_p=\"test -f\"\n\n# Sed expression to map a string onto a valid CPP name.\nas_tr_cpp=\"eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'\"\n\n# Sed expression to map a string onto a valid variable name.\nas_tr_sh=\"eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'\"\n\n\n# IFS\n# We need space, tab and new line, in precisely that order.\nas_nl='\n'\nIFS=\" \t$as_nl\"\n\n# CDPATH.\n$as_unset CDPATH\n\nexec 6>&1\n\n# Open the log real soon, to keep \\$[0] and so on meaningful, and to\n# report actual input values of CONFIG_FILES etc. instead of their\n# values after options handling.  Logging --version etc. is OK.\nexec 5>>config.log\n{\n  echo\n  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX\n## Running $as_me. ##\n_ASBOX\n} >&5\ncat >&5 <<_CSEOF\n\nThis file was extended by fdlibm $as_me 5.3, which was\ngenerated by GNU Autoconf 2.59.  Invocation command line was\n\n  CONFIG_FILES    = $CONFIG_FILES\n  CONFIG_HEADERS  = $CONFIG_HEADERS\n  CONFIG_LINKS    = $CONFIG_LINKS\n  CONFIG_COMMANDS = $CONFIG_COMMANDS\n  $ $0 $@\n\n_CSEOF\necho \"on `(hostname || uname -n) 2>/dev/null | sed 1q`\" >&5\necho >&5\n_ACEOF\n\n# Files that config.status was made for.\nif test -n \"$ac_config_files\"; then\n  echo \"config_files=\\\"$ac_config_files\\\"\" >>$CONFIG_STATUS\nfi\n\nif test -n \"$ac_config_headers\"; then\n  echo \"config_headers=\\\"$ac_config_headers\\\"\" >>$CONFIG_STATUS\nfi\n\nif test -n \"$ac_config_links\"; then\n  echo \"config_links=\\\"$ac_config_links\\\"\" >>$CONFIG_STATUS\nfi\n\nif test -n \"$ac_config_commands\"; then\n  echo \"config_commands=\\\"$ac_config_commands\\\"\" >>$CONFIG_STATUS\nfi\n\ncat >>$CONFIG_STATUS <<\\_ACEOF\n\nac_cs_usage=\"\\\n\\`$as_me' instantiates files from templates according to the\ncurrent configuration.\n\nUsage: $0 [OPTIONS] [FILE]...\n\n  -h, --help       print this help, then exit\n  -V, --version    print version number, then exit\n  -q, --quiet      do not print progress messages\n  -d, --debug      don't remove temporary files\n      --recheck    update $as_me by reconfiguring in the same conditions\n  --file=FILE[:TEMPLATE]\n\t\t   instantiate the configuration file FILE\n\nConfiguration files:\n$config_files\n\nReport bugs to <bug-autoconf@gnu.org>.\"\n_ACEOF\n\ncat >>$CONFIG_STATUS <<_ACEOF\nac_cs_version=\"\\\\\nfdlibm config.status 5.3\nconfigured by $0, generated by GNU Autoconf 2.59,\n  with options \\\\\"`echo \"$ac_configure_args\" | sed 's/[\\\\\"\"\\`\\$]/\\\\\\\\&/g'`\\\\\"\n\nCopyright (C) 2003 Free Software Foundation, Inc.\nThis config.status script is free software; the Free Software Foundation\ngives unlimited permission to copy, distribute and modify it.\"\nsrcdir=$srcdir\n_ACEOF\n\ncat >>$CONFIG_STATUS <<\\_ACEOF\n# If no file are specified by the user, then we need to provide default\n# value.  By we need to know if files were specified by the user.\nac_need_defaults=:\nwhile test $# != 0\ndo\n  case $1 in\n  --*=*)\n    ac_option=`expr \"x$1\" : 'x\\([^=]*\\)='`\n    ac_optarg=`expr \"x$1\" : 'x[^=]*=\\(.*\\)'`\n    ac_shift=:\n    ;;\n  -*)\n    ac_option=$1\n    ac_optarg=$2\n    ac_shift=shift\n    ;;\n  *) # This is not an option, so the user has probably given explicit\n     # arguments.\n     ac_option=$1\n     ac_need_defaults=false;;\n  esac\n\n  case $ac_option in\n  # Handling of the options.\n_ACEOF\ncat >>$CONFIG_STATUS <<\\_ACEOF\n  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)\n    ac_cs_recheck=: ;;\n  --version | --vers* | -V )\n    echo \"$ac_cs_version\"; exit 0 ;;\n  --he | --h)\n    # Conflict between --help and --header\n    { { echo \"$as_me:$LINENO: error: ambiguous option: $1\nTry \\`$0 --help' for more information.\" >&5\necho \"$as_me: error: ambiguous option: $1\nTry \\`$0 --help' for more information.\" >&2;}\n   { (exit 1); exit 1; }; };;\n  --help | --hel | -h )\n    echo \"$ac_cs_usage\"; exit 0 ;;\n  --debug | --d* | -d )\n    debug=: ;;\n  --file | --fil | --fi | --f )\n    $ac_shift\n    CONFIG_FILES=\"$CONFIG_FILES $ac_optarg\"\n    ac_need_defaults=false;;\n  --header | --heade | --head | --hea )\n    $ac_shift\n    CONFIG_HEADERS=\"$CONFIG_HEADERS $ac_optarg\"\n    ac_need_defaults=false;;\n  -q | -quiet | --quiet | --quie | --qui | --qu | --q \\\n  | -silent | --silent | --silen | --sile | --sil | --si | --s)\n    ac_cs_silent=: ;;\n\n  # This is an error.\n  -*) { { echo \"$as_me:$LINENO: error: unrecognized option: $1\nTry \\`$0 --help' for more information.\" >&5\necho \"$as_me: error: unrecognized option: $1\nTry \\`$0 --help' for more information.\" >&2;}\n   { (exit 1); exit 1; }; } ;;\n\n  *) ac_config_targets=\"$ac_config_targets $1\" ;;\n\n  esac\n  shift\ndone\n\nac_configure_extra_args=\n\nif $ac_cs_silent; then\n  exec 6>/dev/null\n  ac_configure_extra_args=\"$ac_configure_extra_args --silent\"\nfi\n\n_ACEOF\ncat >>$CONFIG_STATUS <<_ACEOF\nif \\$ac_cs_recheck; then\n  echo \"running $SHELL $0 \" $ac_configure_args \\$ac_configure_extra_args \" --no-create --no-recursion\" >&6\n  exec $SHELL $0 $ac_configure_args \\$ac_configure_extra_args --no-create --no-recursion\nfi\n\n_ACEOF\n\n\n\n\n\ncat >>$CONFIG_STATUS <<\\_ACEOF\nfor ac_config_target in $ac_config_targets\ndo\n  case \"$ac_config_target\" in\n  # Handling of arguments.\n  \"Makefile\" ) CONFIG_FILES=\"$CONFIG_FILES Makefile\" ;;\n  *) { { echo \"$as_me:$LINENO: error: invalid argument: $ac_config_target\" >&5\necho \"$as_me: error: invalid argument: $ac_config_target\" >&2;}\n   { (exit 1); exit 1; }; };;\n  esac\ndone\n\n# If the user did not use the arguments to specify the items to instantiate,\n# then the envvar interface is used.  Set only those that are not.\n# We use the long form for the default assignment because of an extremely\n# bizarre bug on SunOS 4.1.3.\nif $ac_need_defaults; then\n  test \"${CONFIG_FILES+set}\" = set || CONFIG_FILES=$config_files\nfi\n\n# Have a temporary directory for convenience.  Make it in the build tree\n# simply because there is no reason to put it here, and in addition,\n# creating and moving files from /tmp can sometimes cause problems.\n# Create a temporary directory, and hook for its removal unless debugging.\n$debug ||\n{\n  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0\n  trap '{ (exit 1); exit 1; }' 1 2 13 15\n}\n\n# Create a (secure) tmp directory for tmp files.\n\n{\n  tmp=`(umask 077 && mktemp -d -q \"./confstatXXXXXX\") 2>/dev/null` &&\n  test -n \"$tmp\" && test -d \"$tmp\"\n}  ||\n{\n  tmp=./confstat$$-$RANDOM\n  (umask 077 && mkdir $tmp)\n} ||\n{\n   echo \"$me: cannot create a temporary directory in .\" >&2\n   { (exit 1); exit 1; }\n}\n\n_ACEOF\n\ncat >>$CONFIG_STATUS <<_ACEOF\n\n#\n# CONFIG_FILES section.\n#\n\n# No need to generate the scripts if there are no CONFIG_FILES.\n# This happens for instance when ./config.status config.h\nif test -n \"\\$CONFIG_FILES\"; then\n  # Protect against being on the right side of a sed subst in config.status.\n  sed 's/,@/@@/; s/@,/@@/; s/,;t t\\$/@;t t/; /@;t t\\$/s/[\\\\\\\\&,]/\\\\\\\\&/g;\n   s/@@/,@/; s/@@/@,/; s/@;t t\\$/,;t t/' >\\$tmp/subs.sed <<\\\\CEOF\ns,@SHELL@,$SHELL,;t t\ns,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t\ns,@PACKAGE_NAME@,$PACKAGE_NAME,;t t\ns,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t\ns,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t\ns,@PACKAGE_STRING@,$PACKAGE_STRING,;t t\ns,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t\ns,@exec_prefix@,$exec_prefix,;t t\ns,@prefix@,$prefix,;t t\ns,@program_transform_name@,$program_transform_name,;t t\ns,@bindir@,$bindir,;t t\ns,@sbindir@,$sbindir,;t t\ns,@libexecdir@,$libexecdir,;t t\ns,@datadir@,$datadir,;t t\ns,@sysconfdir@,$sysconfdir,;t t\ns,@sharedstatedir@,$sharedstatedir,;t t\ns,@localstatedir@,$localstatedir,;t t\ns,@libdir@,$libdir,;t t\ns,@includedir@,$includedir,;t t\ns,@oldincludedir@,$oldincludedir,;t t\ns,@infodir@,$infodir,;t t\ns,@mandir@,$mandir,;t t\ns,@build_alias@,$build_alias,;t t\ns,@host_alias@,$host_alias,;t t\ns,@target_alias@,$target_alias,;t t\ns,@DEFS@,$DEFS,;t t\ns,@ECHO_C@,$ECHO_C,;t t\ns,@ECHO_N@,$ECHO_N,;t t\ns,@ECHO_T@,$ECHO_T,;t t\ns,@LIBS@,$LIBS,;t t\ns,@CC@,$CC,;t t\ns,@CFLAGS@,$CFLAGS,;t t\ns,@LDFLAGS@,$LDFLAGS,;t t\ns,@CPPFLAGS@,$CPPFLAGS,;t t\ns,@ac_ct_CC@,$ac_ct_CC,;t t\ns,@EXEEXT@,$EXEEXT,;t t\ns,@OBJEXT@,$OBJEXT,;t t\ns,@AR@,$AR,;t t\ns,@CHMOD@,$CHMOD,;t t\ns,@CP@,$CP,;t t\ns,@RANLIB@,$RANLIB,;t t\ns,@RM@,$RM,;t t\ns,@LIBOBJS@,$LIBOBJS,;t t\ns,@LTLIBOBJS@,$LTLIBOBJS,;t t\nCEOF\n\n_ACEOF\n\n  cat >>$CONFIG_STATUS <<\\_ACEOF\n  # Split the substitutions into bite-sized pieces for seds with\n  # small command number limits, like on Digital OSF/1 and HP-UX.\n  ac_max_sed_lines=48\n  ac_sed_frag=1 # Number of current file.\n  ac_beg=1 # First line for current file.\n  ac_end=$ac_max_sed_lines # Line after last line for current file.\n  ac_more_lines=:\n  ac_sed_cmds=\n  while $ac_more_lines; do\n    if test $ac_beg -gt 1; then\n      sed \"1,${ac_beg}d; ${ac_end}q\" $tmp/subs.sed >$tmp/subs.frag\n    else\n      sed \"${ac_end}q\" $tmp/subs.sed >$tmp/subs.frag\n    fi\n    if test ! -s $tmp/subs.frag; then\n      ac_more_lines=false\n    else\n      # The purpose of the label and of the branching condition is to\n      # speed up the sed processing (if there are no `@' at all, there\n      # is no need to browse any of the substitutions).\n      # These are the two extra sed commands mentioned above.\n      (echo ':t\n  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed\n      if test -z \"$ac_sed_cmds\"; then\n\tac_sed_cmds=\"sed -f $tmp/subs-$ac_sed_frag.sed\"\n      else\n\tac_sed_cmds=\"$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed\"\n      fi\n      ac_sed_frag=`expr $ac_sed_frag + 1`\n      ac_beg=$ac_end\n      ac_end=`expr $ac_end + $ac_max_sed_lines`\n    fi\n  done\n  if test -z \"$ac_sed_cmds\"; then\n    ac_sed_cmds=cat\n  fi\nfi # test -n \"$CONFIG_FILES\"\n\n_ACEOF\ncat >>$CONFIG_STATUS <<\\_ACEOF\nfor ac_file in : $CONFIG_FILES; do test \"x$ac_file\" = x: && continue\n  # Support \"outfile[:infile[:infile...]]\", defaulting infile=\"outfile.in\".\n  case $ac_file in\n  - | *:- | *:-:* ) # input from stdin\n\tcat >$tmp/stdin\n\tac_file_in=`echo \"$ac_file\" | sed 's,[^:]*:,,'`\n\tac_file=`echo \"$ac_file\" | sed 's,:.*,,'` ;;\n  *:* ) ac_file_in=`echo \"$ac_file\" | sed 's,[^:]*:,,'`\n\tac_file=`echo \"$ac_file\" | sed 's,:.*,,'` ;;\n  * )   ac_file_in=$ac_file.in ;;\n  esac\n\n  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.\n  ac_dir=`(dirname \"$ac_file\") 2>/dev/null ||\n$as_expr X\"$ac_file\" : 'X\\(.*[^/]\\)//*[^/][^/]*/*$' \\| \\\n\t X\"$ac_file\" : 'X\\(//\\)[^/]' \\| \\\n\t X\"$ac_file\" : 'X\\(//\\)$' \\| \\\n\t X\"$ac_file\" : 'X\\(/\\)' \\| \\\n\t .     : '\\(.\\)' 2>/dev/null ||\necho X\"$ac_file\" |\n    sed '/^X\\(.*[^/]\\)\\/\\/*[^/][^/]*\\/*$/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\/\\)[^/].*/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\/\\)$/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\).*/{ s//\\1/; q; }\n  \t  s/.*/./; q'`\n  { if $as_mkdir_p; then\n    mkdir -p \"$ac_dir\"\n  else\n    as_dir=\"$ac_dir\"\n    as_dirs=\n    while test ! -d \"$as_dir\"; do\n      as_dirs=\"$as_dir $as_dirs\"\n      as_dir=`(dirname \"$as_dir\") 2>/dev/null ||\n$as_expr X\"$as_dir\" : 'X\\(.*[^/]\\)//*[^/][^/]*/*$' \\| \\\n\t X\"$as_dir\" : 'X\\(//\\)[^/]' \\| \\\n\t X\"$as_dir\" : 'X\\(//\\)$' \\| \\\n\t X\"$as_dir\" : 'X\\(/\\)' \\| \\\n\t .     : '\\(.\\)' 2>/dev/null ||\necho X\"$as_dir\" |\n    sed '/^X\\(.*[^/]\\)\\/\\/*[^/][^/]*\\/*$/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\/\\)[^/].*/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\/\\)$/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\).*/{ s//\\1/; q; }\n  \t  s/.*/./; q'`\n    done\n    test ! -n \"$as_dirs\" || mkdir $as_dirs\n  fi || { { echo \"$as_me:$LINENO: error: cannot create directory \\\"$ac_dir\\\"\" >&5\necho \"$as_me: error: cannot create directory \\\"$ac_dir\\\"\" >&2;}\n   { (exit 1); exit 1; }; }; }\n\n  ac_builddir=.\n\nif test \"$ac_dir\" != .; then\n  ac_dir_suffix=/`echo \"$ac_dir\" | sed 's,^\\.[\\\\/],,'`\n  # A \"../\" for each directory in $ac_dir_suffix.\n  ac_top_builddir=`echo \"$ac_dir_suffix\" | sed 's,/[^\\\\/]*,../,g'`\nelse\n  ac_dir_suffix= ac_top_builddir=\nfi\n\ncase $srcdir in\n  .)  # No --srcdir option.  We are building in place.\n    ac_srcdir=.\n    if test -z \"$ac_top_builddir\"; then\n       ac_top_srcdir=.\n    else\n       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`\n    fi ;;\n  [\\\\/]* | ?:[\\\\/]* )  # Absolute path.\n    ac_srcdir=$srcdir$ac_dir_suffix;\n    ac_top_srcdir=$srcdir ;;\n  *) # Relative path.\n    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix\n    ac_top_srcdir=$ac_top_builddir$srcdir ;;\nesac\n\n# Do not use `cd foo && pwd` to compute absolute paths, because\n# the directories may not exist.\ncase `pwd` in\n.) ac_abs_builddir=\"$ac_dir\";;\n*)\n  case \"$ac_dir\" in\n  .) ac_abs_builddir=`pwd`;;\n  [\\\\/]* | ?:[\\\\/]* ) ac_abs_builddir=\"$ac_dir\";;\n  *) ac_abs_builddir=`pwd`/\"$ac_dir\";;\n  esac;;\nesac\ncase $ac_abs_builddir in\n.) ac_abs_top_builddir=${ac_top_builddir}.;;\n*)\n  case ${ac_top_builddir}. in\n  .) ac_abs_top_builddir=$ac_abs_builddir;;\n  [\\\\/]* | ?:[\\\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;\n  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;\n  esac;;\nesac\ncase $ac_abs_builddir in\n.) ac_abs_srcdir=$ac_srcdir;;\n*)\n  case $ac_srcdir in\n  .) ac_abs_srcdir=$ac_abs_builddir;;\n  [\\\\/]* | ?:[\\\\/]* ) ac_abs_srcdir=$ac_srcdir;;\n  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;\n  esac;;\nesac\ncase $ac_abs_builddir in\n.) ac_abs_top_srcdir=$ac_top_srcdir;;\n*)\n  case $ac_top_srcdir in\n  .) ac_abs_top_srcdir=$ac_abs_builddir;;\n  [\\\\/]* | ?:[\\\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;\n  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;\n  esac;;\nesac\n\n\n\n  if test x\"$ac_file\" != x-; then\n    { echo \"$as_me:$LINENO: creating $ac_file\" >&5\necho \"$as_me: creating $ac_file\" >&6;}\n    rm -f \"$ac_file\"\n  fi\n  # Let's still pretend it is `configure' which instantiates (i.e., don't\n  # use $as_me), people would be surprised to read:\n  #    /* config.h.  Generated by config.status.  */\n  if test x\"$ac_file\" = x-; then\n    configure_input=\n  else\n    configure_input=\"$ac_file.  \"\n  fi\n  configure_input=$configure_input\"Generated from `echo $ac_file_in |\n\t\t\t\t     sed 's,.*/,,'` by configure.\"\n\n  # First look for the input files in the build tree, otherwise in the\n  # src tree.\n  ac_file_inputs=`IFS=:\n    for f in $ac_file_in; do\n      case $f in\n      -) echo $tmp/stdin ;;\n      [\\\\/$]*)\n\t # Absolute (can't be DOS-style, as IFS=:)\n\t test -f \"$f\" || { { echo \"$as_me:$LINENO: error: cannot find input file: $f\" >&5\necho \"$as_me: error: cannot find input file: $f\" >&2;}\n   { (exit 1); exit 1; }; }\n\t echo \"$f\";;\n      *) # Relative\n\t if test -f \"$f\"; then\n\t   # Build tree\n\t   echo \"$f\"\n\t elif test -f \"$srcdir/$f\"; then\n\t   # Source tree\n\t   echo \"$srcdir/$f\"\n\t else\n\t   # /dev/null tree\n\t   { { echo \"$as_me:$LINENO: error: cannot find input file: $f\" >&5\necho \"$as_me: error: cannot find input file: $f\" >&2;}\n   { (exit 1); exit 1; }; }\n\t fi;;\n      esac\n    done` || { (exit 1); exit 1; }\n_ACEOF\ncat >>$CONFIG_STATUS <<_ACEOF\n  sed \"$ac_vpsub\n$extrasub\n_ACEOF\ncat >>$CONFIG_STATUS <<\\_ACEOF\n:t\n/@[a-zA-Z_][a-zA-Z_0-9]*@/!b\ns,@configure_input@,$configure_input,;t t\ns,@srcdir@,$ac_srcdir,;t t\ns,@abs_srcdir@,$ac_abs_srcdir,;t t\ns,@top_srcdir@,$ac_top_srcdir,;t t\ns,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t\ns,@builddir@,$ac_builddir,;t t\ns,@abs_builddir@,$ac_abs_builddir,;t t\ns,@top_builddir@,$ac_top_builddir,;t t\ns,@abs_top_builddir@,$ac_abs_top_builddir,;t t\n\" $ac_file_inputs | (eval \"$ac_sed_cmds\") >$tmp/out\n  rm -f $tmp/stdin\n  if test x\"$ac_file\" != x-; then\n    mv $tmp/out $ac_file\n  else\n    cat $tmp/out\n    rm -f $tmp/out\n  fi\n\ndone\n_ACEOF\n\ncat >>$CONFIG_STATUS <<\\_ACEOF\n\n{ (exit 0); exit 0; }\n_ACEOF\nchmod +x $CONFIG_STATUS\nac_clean_files=$ac_clean_files_save\n\n\n# configure is writing to config.log, and then calls config.status.\n# config.status does its own redirection, appending to config.log.\n# Unfortunately, on DOS this fails, as config.log is still kept open\n# by configure, so config.status won't be able to write to it; its\n# output is simply discarded.  So we exec the FD to /dev/null,\n# effectively closing config.log, so it can be properly (re)opened and\n# appended to by config.status.  When coming back to configure, we\n# need to make the FD available again.\nif test \"$no_create\" != yes; then\n  ac_cs_success=:\n  ac_config_status_args=\n  test \"$silent\" = yes &&\n    ac_config_status_args=\"$ac_config_status_args --quiet\"\n  exec 5>/dev/null\n  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false\n  exec 5>>config.log\n  # Use ||, not &&, to avoid exiting from the if with $? = 1, which\n  # would make configure fail if this is the last instruction.\n  $ac_cs_success || { (exit 1); exit 1; }\nfi\n\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/configure.in",
    "content": "dnl Process this file with autoconf to produce a configure script\nAC_INIT(fdlibm,5.3,[FDLIBM COMMENTS <fdlibm-comments AT sun.com>])\nAC_CONFIG_SRCDIR(e_acos.c)\n\ndnl Checks for programs\nAC_PROG_CC\n\nAC_CHECK_PROGS(AR, ar)\nAC_CHECK_PROGS(CHMOD, chmod)\nAC_CHECK_PROGS(CP, cp)\nAC_CHECK_PROGS(RANLIB, [ranlib echo])\nAC_PATH_PROGS(RM, [/bin/rm rm])\n\nAC_OUTPUT(Makefile)\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/e_acos.c",
    "content": "\n/* @(#)e_acos.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* __ieee754_acos(x)\n * Method :                  \n *\tacos(x)  = pi/2 - asin(x)\n *\tacos(-x) = pi/2 + asin(x)\n * For |x|<=0.5\n *\tacos(x) = pi/2 - (x + x*x^2*R(x^2))\t(see asin.c)\n * For x>0.5\n * \tacos(x) = pi/2 - (pi/2 - 2asin(sqrt((1-x)/2)))\n *\t\t= 2asin(sqrt((1-x)/2))  \n *\t\t= 2s + 2s*z*R(z) \t...z=(1-x)/2, s=sqrt(z)\n *\t\t= 2f + (2c + 2s*z*R(z))\n *     where f=hi part of s, and c = (z-f*f)/(s+f) is the correction term\n *     for f so that f+c ~ sqrt(z).\n * For x<-0.5\n *\tacos(x) = pi - 2asin(sqrt((1-|x|)/2))\n *\t\t= pi - 0.5*(s+s*z*R(z)), where z=(1-|x|)/2,s=sqrt(z)\n *\n * Special cases:\n *\tif x is NaN, return x itself;\n *\tif |x|>1, return NaN with invalid signal.\n *\n * Function needed: sqrt\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic const double \n#else\nstatic double \n#endif\none=  1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */\npi =  3.14159265358979311600e+00, /* 0x400921FB, 0x54442D18 */\npio2_hi =  1.57079632679489655800e+00, /* 0x3FF921FB, 0x54442D18 */\npio2_lo =  6.12323399573676603587e-17, /* 0x3C91A626, 0x33145C07 */\npS0 =  1.66666666666666657415e-01, /* 0x3FC55555, 0x55555555 */\npS1 = -3.25565818622400915405e-01, /* 0xBFD4D612, 0x03EB6F7D */\npS2 =  2.01212532134862925881e-01, /* 0x3FC9C155, 0x0E884455 */\npS3 = -4.00555345006794114027e-02, /* 0xBFA48228, 0xB5688F3B */\npS4 =  7.91534994289814532176e-04, /* 0x3F49EFE0, 0x7501B288 */\npS5 =  3.47933107596021167570e-05, /* 0x3F023DE1, 0x0DFDF709 */\nqS1 = -2.40339491173441421878e+00, /* 0xC0033A27, 0x1C8A2D4B */\nqS2 =  2.02094576023350569471e+00, /* 0x40002AE5, 0x9C598AC8 */\nqS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */\nqS4 =  7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */\n\n#ifdef __STDC__\n\tdouble __ieee754_acos(double x)\n#else\n\tdouble __ieee754_acos(x)\n\tdouble x;\n#endif\n{\n\tdouble z,p,q,r,w,s,c,df;\n\tint hx,ix;\n\thx = __HI(x);\n\tix = hx&0x7fffffff;\n\tif(ix>=0x3ff00000) {\t/* |x| >= 1 */\n\t    if(((ix-0x3ff00000)|__LO(x))==0) {\t/* |x|==1 */\n\t\tif(hx>0) return 0.0;\t\t/* acos(1) = 0  */\n\t\telse return pi+2.0*pio2_lo;\t/* acos(-1)= pi */\n\t    }\n\t    return (x-x)/(x-x);\t\t/* acos(|x|>1) is NaN */\n\t}\n\tif(ix<0x3fe00000) {\t/* |x| < 0.5 */\n\t    if(ix<=0x3c600000) return pio2_hi+pio2_lo;/*if|x|<2**-57*/\n\t    z = x*x;\n\t    p = z*(pS0+z*(pS1+z*(pS2+z*(pS3+z*(pS4+z*pS5)))));\n\t    q = one+z*(qS1+z*(qS2+z*(qS3+z*qS4)));\n\t    r = p/q;\n\t    return pio2_hi - (x - (pio2_lo-x*r));\n\t} else  if (hx<0) {\t\t/* x < -0.5 */\n\t    z = (one+x)*0.5;\n\t    p = z*(pS0+z*(pS1+z*(pS2+z*(pS3+z*(pS4+z*pS5)))));\n\t    q = one+z*(qS1+z*(qS2+z*(qS3+z*qS4)));\n\t    s = sqrt(z);\n\t    r = p/q;\n\t    w = r*s-pio2_lo;\n\t    return pi - 2.0*(s+w);\n\t} else {\t\t\t/* x > 0.5 */\n\t    z = (one-x)*0.5;\n\t    s = sqrt(z);\n\t    df = s;\n\t    __LO(df) = 0;\n\t    c  = (z-df*df)/(s+df);\n\t    p = z*(pS0+z*(pS1+z*(pS2+z*(pS3+z*(pS4+z*pS5)))));\n\t    q = one+z*(qS1+z*(qS2+z*(qS3+z*qS4)));\n\t    r = p/q;\n\t    w = r*s+c;\n\t    return 2.0*(df+w);\n\t}\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/e_acosh.c",
    "content": "\n/* @(#)e_acosh.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n *\n */\n\n/* __ieee754_acosh(x)\n * Method :\n *\tBased on \n *\t\tacosh(x) = log [ x + sqrt(x*x-1) ]\n *\twe have\n *\t\tacosh(x) := log(x)+ln2,\tif x is large; else\n *\t\tacosh(x) := log(2x-1/(sqrt(x*x-1)+x)) if x>2; else\n *\t\tacosh(x) := log1p(t+sqrt(2.0*t+t*t)); where t=x-1.\n *\n * Special cases:\n *\tacosh(x) is NaN with signal if x<1.\n *\tacosh(NaN) is NaN without signal.\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic const double \n#else\nstatic double \n#endif\none\t= 1.0,\nln2\t= 6.93147180559945286227e-01;  /* 0x3FE62E42, 0xFEFA39EF */\n\n#ifdef __STDC__\n\tdouble __ieee754_acosh(double x)\n#else\n\tdouble __ieee754_acosh(x)\n\tdouble x;\n#endif\n{\t\n\tdouble t;\n\tint hx;\n\thx = __HI(x);\n\tif(hx<0x3ff00000) {\t\t/* x < 1 */\n\t    return (x-x)/(x-x);\n\t} else if(hx >=0x41b00000) {\t/* x > 2**28 */\n\t    if(hx >=0x7ff00000) {\t/* x is inf of NaN */\n\t        return x+x;\n\t    } else \n\t\treturn __ieee754_log(x)+ln2;\t/* acosh(huge)=log(2x) */\n\t} else if(((hx-0x3ff00000)|__LO(x))==0) {\n\t    return 0.0;\t\t\t/* acosh(1) = 0 */\n\t} else if (hx > 0x40000000) {\t/* 2**28 > x > 2 */\n\t    t=x*x;\n\t    return __ieee754_log(2.0*x-one/(x+sqrt(t-one)));\n\t} else {\t\t\t/* 1<x<2 */\n\t    t = x-one;\n\t    return log1p(t+sqrt(2.0*t+t*t));\n\t}\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/e_asin.c",
    "content": "\n/* @(#)e_asin.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* __ieee754_asin(x)\n * Method :                  \n *\tSince  asin(x) = x + x^3/6 + x^5*3/40 + x^7*15/336 + ...\n *\twe approximate asin(x) on [0,0.5] by\n *\t\tasin(x) = x + x*x^2*R(x^2)\n *\twhere\n *\t\tR(x^2) is a rational approximation of (asin(x)-x)/x^3 \n *\tand its remez error is bounded by\n *\t\t|(asin(x)-x)/x^3 - R(x^2)| < 2^(-58.75)\n *\n *\tFor x in [0.5,1]\n *\t\tasin(x) = pi/2-2*asin(sqrt((1-x)/2))\n *\tLet y = (1-x), z = y/2, s := sqrt(z), and pio2_hi+pio2_lo=pi/2;\n *\tthen for x>0.98\n *\t\tasin(x) = pi/2 - 2*(s+s*z*R(z))\n *\t\t\t= pio2_hi - (2*(s+s*z*R(z)) - pio2_lo)\n *\tFor x<=0.98, let pio4_hi = pio2_hi/2, then\n *\t\tf = hi part of s;\n *\t\tc = sqrt(z) - f = (z-f*f)/(s+f) \t...f+c=sqrt(z)\n *\tand\n *\t\tasin(x) = pi/2 - 2*(s+s*z*R(z))\n *\t\t\t= pio4_hi+(pio4-2s)-(2s*z*R(z)-pio2_lo)\n *\t\t\t= pio4_hi+(pio4-2f)-(2s*z*R(z)-(pio2_lo+2c))\n *\n * Special cases:\n *\tif x is NaN, return x itself;\n *\tif |x|>1, return NaN with invalid signal.\n *\n */\n\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic const double \n#else\nstatic double \n#endif\none =  1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */\nhuge =  1.000e+300,\npio2_hi =  1.57079632679489655800e+00, /* 0x3FF921FB, 0x54442D18 */\npio2_lo =  6.12323399573676603587e-17, /* 0x3C91A626, 0x33145C07 */\npio4_hi =  7.85398163397448278999e-01, /* 0x3FE921FB, 0x54442D18 */\n\t/* coefficient for R(x^2) */\npS0 =  1.66666666666666657415e-01, /* 0x3FC55555, 0x55555555 */\npS1 = -3.25565818622400915405e-01, /* 0xBFD4D612, 0x03EB6F7D */\npS2 =  2.01212532134862925881e-01, /* 0x3FC9C155, 0x0E884455 */\npS3 = -4.00555345006794114027e-02, /* 0xBFA48228, 0xB5688F3B */\npS4 =  7.91534994289814532176e-04, /* 0x3F49EFE0, 0x7501B288 */\npS5 =  3.47933107596021167570e-05, /* 0x3F023DE1, 0x0DFDF709 */\nqS1 = -2.40339491173441421878e+00, /* 0xC0033A27, 0x1C8A2D4B */\nqS2 =  2.02094576023350569471e+00, /* 0x40002AE5, 0x9C598AC8 */\nqS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */\nqS4 =  7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */\n\n#ifdef __STDC__\n\tdouble __ieee754_asin(double x)\n#else\n\tdouble __ieee754_asin(x)\n\tdouble x;\n#endif\n{\n\tdouble t,w,p,q,c,r,s;\n\tint hx,ix;\n\thx = __HI(x);\n\tix = hx&0x7fffffff;\n\tif(ix>= 0x3ff00000) {\t\t/* |x|>= 1 */\n\t    if(((ix-0x3ff00000)|__LO(x))==0)\n\t\t    /* asin(1)=+-pi/2 with inexact */\n\t\treturn x*pio2_hi+x*pio2_lo;\t\n\t    return (x-x)/(x-x);\t\t/* asin(|x|>1) is NaN */   \n\t} else if (ix<0x3fe00000) {\t/* |x|<0.5 */\n\t    if(ix<0x3e400000) {\t\t/* if |x| < 2**-27 */\n\t\tif(huge+x>one) return x;/* return x with inexact if x!=0*/\n\t    } else \n\t\tt = x*x;\n\t\tp = t*(pS0+t*(pS1+t*(pS2+t*(pS3+t*(pS4+t*pS5)))));\n\t\tq = one+t*(qS1+t*(qS2+t*(qS3+t*qS4)));\n\t\tw = p/q;\n\t\treturn x+x*w;\n\t}\n\t/* 1> |x|>= 0.5 */\n\tw = one-fabs(x);\n\tt = w*0.5;\n\tp = t*(pS0+t*(pS1+t*(pS2+t*(pS3+t*(pS4+t*pS5)))));\n\tq = one+t*(qS1+t*(qS2+t*(qS3+t*qS4)));\n\ts = sqrt(t);\n\tif(ix>=0x3FEF3333) { \t/* if |x| > 0.975 */\n\t    w = p/q;\n\t    t = pio2_hi-(2.0*(s+s*w)-pio2_lo);\n\t} else {\n\t    w  = s;\n\t    __LO(w) = 0;\n\t    c  = (t-w*w)/(s+w);\n\t    r  = p/q;\n\t    p  = 2.0*s*r-(pio2_lo-2.0*c);\n\t    q  = pio4_hi-2.0*w;\n\t    t  = pio4_hi-(p-q);\n\t}    \n\tif(hx>0) return t; else return -t;    \n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/e_atan2.c",
    "content": "\n/* @(#)e_atan2.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n *\n */\n\n/* __ieee754_atan2(y,x)\n * Method :\n *\t1. Reduce y to positive by atan2(y,x)=-atan2(-y,x).\n *\t2. Reduce x to positive by (if x and y are unexceptional): \n *\t\tARG (x+iy) = arctan(y/x)   \t   ... if x > 0,\n *\t\tARG (x+iy) = pi - arctan[y/(-x)]   ... if x < 0,\n *\n * Special cases:\n *\n *\tATAN2((anything), NaN ) is NaN;\n *\tATAN2(NAN , (anything) ) is NaN;\n *\tATAN2(+-0, +(anything but NaN)) is +-0  ;\n *\tATAN2(+-0, -(anything but NaN)) is +-pi ;\n *\tATAN2(+-(anything but 0 and NaN), 0) is +-pi/2;\n *\tATAN2(+-(anything but INF and NaN), +INF) is +-0 ;\n *\tATAN2(+-(anything but INF and NaN), -INF) is +-pi;\n *\tATAN2(+-INF,+INF ) is +-pi/4 ;\n *\tATAN2(+-INF,-INF ) is +-3pi/4;\n *\tATAN2(+-INF, (anything but,0,NaN, and INF)) is +-pi/2;\n *\n * Constants:\n * The hexadecimal values are the intended ones for the following \n * constants. The decimal values may be used, provided that the \n * compiler will convert from decimal to binary accurately enough \n * to produce the hexadecimal values shown.\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic const double \n#else\nstatic double \n#endif\ntiny  = 1.0e-300,\nzero  = 0.0,\npi_o_4  = 7.8539816339744827900E-01, /* 0x3FE921FB, 0x54442D18 */\npi_o_2  = 1.5707963267948965580E+00, /* 0x3FF921FB, 0x54442D18 */\npi      = 3.1415926535897931160E+00, /* 0x400921FB, 0x54442D18 */\npi_lo   = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */\n\n#ifdef __STDC__\n\tdouble __ieee754_atan2(double y, double x)\n#else\n\tdouble __ieee754_atan2(y,x)\n\tdouble  y,x;\n#endif\n{  \n\tdouble z;\n\tint k,m,hx,hy,ix,iy;\n\tunsigned lx,ly;\n\n\thx = __HI(x); ix = hx&0x7fffffff;\n\tlx = __LO(x);\n\thy = __HI(y); iy = hy&0x7fffffff;\n\tly = __LO(y);\n\tif(((ix|((lx|-lx)>>31))>0x7ff00000)||\n\t   ((iy|((ly|-ly)>>31))>0x7ff00000))\t/* x or y is NaN */\n\t   return x+y;\n\tif((hx-0x3ff00000|lx)==0) return __ieee754_atan(y);   /* x=1.0 */\n\tm = ((hy>>31)&1)|((hx>>30)&2);\t/* 2*sign(x)+sign(y) */\n\n    /* when y = 0 */\n\tif((iy|ly)==0) {\n\t    switch(m) {\n\t\tcase 0: \n\t\tcase 1: return y; \t/* atan(+-0,+anything)=+-0 */\n\t\tcase 2: return  pi+tiny;/* atan(+0,-anything) = pi */\n\t\tcase 3: return -pi-tiny;/* atan(-0,-anything) =-pi */\n\t    }\n\t}\n    /* when x = 0 */\n\tif((ix|lx)==0) return (hy<0)?  -pi_o_2-tiny: pi_o_2+tiny;\n\t    \n    /* when x is INF */\n\tif(ix==0x7ff00000) {\n\t    if(iy==0x7ff00000) {\n\t\tswitch(m) {\n\t\t    case 0: return  pi_o_4+tiny;/* atan(+INF,+INF) */\n\t\t    case 1: return -pi_o_4-tiny;/* atan(-INF,+INF) */\n\t\t    case 2: return  3.0*pi_o_4+tiny;/*atan(+INF,-INF)*/\n\t\t    case 3: return -3.0*pi_o_4-tiny;/*atan(-INF,-INF)*/\n\t\t}\n\t    } else {\n\t\tswitch(m) {\n\t\t    case 0: return  zero  ;\t/* atan(+...,+INF) */\n\t\t    case 1: return -zero  ;\t/* atan(-...,+INF) */\n\t\t    case 2: return  pi+tiny  ;\t/* atan(+...,-INF) */\n\t\t    case 3: return -pi-tiny  ;\t/* atan(-...,-INF) */\n\t\t}\n\t    }\n\t}\n    /* when y is INF */\n\tif(iy==0x7ff00000) return (hy<0)? -pi_o_2-tiny: pi_o_2+tiny;\n\n    /* compute y/x */\n\tk = (iy-ix)>>20;\n\tif(k > 60) z=pi_o_2+0.5*pi_lo; \t/* |y/x| >  2**60 */\n\telse if(hx<0&&k<-60) z=0.0; \t/* |y|/x < -2**60 */\n\telse z=__ieee754_atan(fabs(y/x));\t\t/* safe to do y/x */\n\tswitch (m) {\n\t    case 0: return       z  ;\t/* atan(+,+) */\n\t    case 1: __HI(z) ^= 0x80000000;\n\t\t    return       z  ;\t/* atan(-,+) */\n\t    case 2: return  pi-(z-pi_lo);/* atan(+,-) */\n\t    default: /* case 3 */\n\t    \t    return  (z-pi_lo)-pi;/* atan(-,-) */\n\t}\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/e_atanh.c",
    "content": "\n/* @(#)e_atanh.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n *\n */\n\n/* __ieee754_atanh(x)\n * Method :\n *    1.Reduced x to positive by atanh(-x) = -atanh(x)\n *    2.For x>=0.5\n *                  1              2x                          x\n *\tatanh(x) = --- * log(1 + -------) = 0.5 * log1p(2 * --------)\n *                  2             1 - x                      1 - x\n *\t\n * \tFor x<0.5\n *\tatanh(x) = 0.5*log1p(2x+2x*x/(1-x))\n *\n * Special cases:\n *\tatanh(x) is NaN if |x| > 1 with signal;\n *\tatanh(NaN) is that NaN with no signal;\n *\tatanh(+-1) is +-INF with signal.\n *\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic const double one = 1.0, huge = 1e300;\n#else\nstatic double one = 1.0, huge = 1e300;\n#endif\n\nstatic double zero = 0.0;\n\n#ifdef __STDC__\n\tdouble __ieee754_atanh(double x)\n#else\n\tdouble __ieee754_atanh(x)\n\tdouble x;\n#endif\n{\n\tdouble t;\n\tint hx,ix;\n\tunsigned lx;\n\thx = __HI(x);\t\t/* high word */\n\tlx = __LO(x);\t\t/* low word */\n\tix = hx&0x7fffffff;\n\tif ((ix|((lx|(-lx))>>31))>0x3ff00000) /* |x|>1 */\n\t    return (x-x)/(x-x);\n\tif(ix==0x3ff00000) \n\t    return x/zero;\n\tif(ix<0x3e300000&&(huge+x)>zero) return x;\t/* x<2**-28 */\n\t__HI(x) = ix;\t\t/* x <- |x| */\n\tif(ix<0x3fe00000) {\t\t/* x < 0.5 */\n\t    t = x+x;\n\t    t = 0.5*log1p(t+t*x/(one-x));\n\t} else \n\t    t = 0.5*log1p((x+x)/(one-x));\n\tif(hx>=0) return t; else return -t;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/e_cosh.c",
    "content": "\n/* @(#)e_cosh.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* __ieee754_cosh(x)\n * Method : \n * mathematically cosh(x) if defined to be (exp(x)+exp(-x))/2\n *\t1. Replace x by |x| (cosh(x) = cosh(-x)). \n *\t2. \n *\t\t                                        [ exp(x) - 1 ]^2 \n *\t    0        <= x <= ln2/2  :  cosh(x) := 1 + -------------------\n *\t\t\t       \t\t\t           2*exp(x)\n *\n *\t\t                                  exp(x) +  1/exp(x)\n *\t    ln2/2    <= x <= 22     :  cosh(x) := -------------------\n *\t\t\t       \t\t\t          2\n *\t    22       <= x <= lnovft :  cosh(x) := exp(x)/2 \n *\t    lnovft   <= x <= ln2ovft:  cosh(x) := exp(x/2)/2 * exp(x/2)\n *\t    ln2ovft  <  x\t    :  cosh(x) := huge*huge (overflow)\n *\n * Special cases:\n *\tcosh(x) is |x| if x is +INF, -INF, or NaN.\n *\tonly cosh(0)=1 is exact for finite x.\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic const double one = 1.0, half=0.5, huge = 1.0e300;\n#else\nstatic double one = 1.0, half=0.5, huge = 1.0e300;\n#endif\n\n#ifdef __STDC__\n\tdouble __ieee754_cosh(double x)\n#else\n\tdouble __ieee754_cosh(x)\n\tdouble x;\n#endif\n{\t\n\tdouble t,w;\n\tint ix;\n\tunsigned lx;\n\n    /* High word of |x|. */\n\tix = __HI(x);\n\tix &= 0x7fffffff;\n\n    /* x is INF or NaN */\n\tif(ix>=0x7ff00000) return x*x;\t\n\n    /* |x| in [0,0.5*ln2], return 1+expm1(|x|)^2/(2*exp(|x|)) */\n\tif(ix<0x3fd62e43) {\n\t    t = expm1(fabs(x));\n\t    w = one+t;\n\t    if (ix<0x3c800000) return w;\t/* cosh(tiny) = 1 */\n\t    return one+(t*t)/(w+w);\n\t}\n\n    /* |x| in [0.5*ln2,22], return (exp(|x|)+1/exp(|x|)/2; */\n\tif (ix < 0x40360000) {\n\t\tt = __ieee754_exp(fabs(x));\n\t\treturn half*t+half/t;\n\t}\n\n    /* |x| in [22, log(maxdouble)] return half*exp(|x|) */\n\tif (ix < 0x40862E42)  return half*__ieee754_exp(fabs(x));\n\n    /* |x| in [log(maxdouble), overflowthresold] */\n\tlx = *( (((*(unsigned*)&one)>>29)) + (unsigned*)&x);\n\tif (ix<0x408633CE || \n\t      (ix==0x408633ce)&&(lx<=(unsigned)0x8fb9f87d)) {\n\t    w = __ieee754_exp(half*fabs(x));\n\t    t = half*w;\n\t    return t*w;\n\t}\n\n    /* |x| > overflowthresold, cosh(x) overflow */\n\treturn huge*huge;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/e_exp.c",
    "content": "\n/* @(#)e_exp.c 1.6 04/04/22 */\n/*\n * ====================================================\n * Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.\n *\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* __ieee754_exp(x)\n * Returns the exponential of x.\n *\n * Method\n *   1. Argument reduction:\n *      Reduce x to an r so that |r| <= 0.5*ln2 ~ 0.34658.\n *\tGiven x, find r and integer k such that\n *\n *               x = k*ln2 + r,  |r| <= 0.5*ln2.  \n *\n *      Here r will be represented as r = hi-lo for better \n *\taccuracy.\n *\n *   2. Approximation of exp(r) by a special rational function on\n *\tthe interval [0,0.34658]:\n *\tWrite\n *\t    R(r**2) = r*(exp(r)+1)/(exp(r)-1) = 2 + r*r/6 - r**4/360 + ...\n *      We use a special Remes algorithm on [0,0.34658] to generate \n * \ta polynomial of degree 5 to approximate R. The maximum error \n *\tof this polynomial approximation is bounded by 2**-59. In\n *\tother words,\n *\t    R(z) ~ 2.0 + P1*z + P2*z**2 + P3*z**3 + P4*z**4 + P5*z**5\n *  \t(where z=r*r, and the values of P1 to P5 are listed below)\n *\tand\n *\t    |                  5          |     -59\n *\t    | 2.0+P1*z+...+P5*z   -  R(z) | <= 2 \n *\t    |                             |\n *\tThe computation of exp(r) thus becomes\n *                             2*r\n *\t\texp(r) = 1 + -------\n *\t\t              R - r\n *                                 r*R1(r)\t\n *\t\t       = 1 + r + ----------- (for better accuracy)\n *\t\t                  2 - R1(r)\n *\twhere\n *\t\t\t         2       4             10\n *\t\tR1(r) = r - (P1*r  + P2*r  + ... + P5*r   ).\n *\t\n *   3. Scale back to obtain exp(x):\n *\tFrom step 1, we have\n *\t   exp(x) = 2^k * exp(r)\n *\n * Special cases:\n *\texp(INF) is INF, exp(NaN) is NaN;\n *\texp(-INF) is 0, and\n *\tfor finite argument, only exp(0)=1 is exact.\n *\n * Accuracy:\n *\taccording to an error analysis, the error is always less than\n *\t1 ulp (unit in the last place).\n *\n * Misc. info.\n *\tFor IEEE double \n *\t    if x >  7.09782712893383973096e+02 then exp(x) overflow\n *\t    if x < -7.45133219101941108420e+02 then exp(x) underflow\n *\n * Constants:\n * The hexadecimal values are the intended ones for the following \n * constants. The decimal values may be used, provided that the \n * compiler will convert from decimal to binary accurately enough\n * to produce the hexadecimal values shown.\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic const double\n#else\nstatic double\n#endif\none\t= 1.0,\nhalF[2]\t= {0.5,-0.5,},\nhuge\t= 1.0e+300,\ntwom1000= 9.33263618503218878990e-302,     /* 2**-1000=0x01700000,0*/\no_threshold=  7.09782712893383973096e+02,  /* 0x40862E42, 0xFEFA39EF */\nu_threshold= -7.45133219101941108420e+02,  /* 0xc0874910, 0xD52D3051 */\nln2HI[2]   ={ 6.93147180369123816490e-01,  /* 0x3fe62e42, 0xfee00000 */\n\t     -6.93147180369123816490e-01,},/* 0xbfe62e42, 0xfee00000 */\nln2LO[2]   ={ 1.90821492927058770002e-10,  /* 0x3dea39ef, 0x35793c76 */\n\t     -1.90821492927058770002e-10,},/* 0xbdea39ef, 0x35793c76 */\ninvln2 =  1.44269504088896338700e+00, /* 0x3ff71547, 0x652b82fe */\nP1   =  1.66666666666666019037e-01, /* 0x3FC55555, 0x5555553E */\nP2   = -2.77777777770155933842e-03, /* 0xBF66C16C, 0x16BEBD93 */\nP3   =  6.61375632143793436117e-05, /* 0x3F11566A, 0xAF25DE2C */\nP4   = -1.65339022054652515390e-06, /* 0xBEBBBD41, 0xC5D26BF1 */\nP5   =  4.13813679705723846039e-08; /* 0x3E663769, 0x72BEA4D0 */\n\n\n#ifdef __STDC__\n\tdouble __ieee754_exp(double x)\t/* default IEEE double exp */\n#else\n\tdouble __ieee754_exp(x)\t/* default IEEE double exp */\n\tdouble x;\n#endif\n{\n\tdouble y,hi,lo,c,t;\n\tint k,xsb;\n\tunsigned hx;\n\n\thx  = __HI(x);\t/* high word of x */\n\txsb = (hx>>31)&1;\t\t/* sign bit of x */\n\thx &= 0x7fffffff;\t\t/* high word of |x| */\n\n    /* filter out non-finite argument */\n\tif(hx >= 0x40862E42) {\t\t\t/* if |x|>=709.78... */\n            if(hx>=0x7ff00000) {\n\t\tif(((hx&0xfffff)|__LO(x))!=0) \n\t\t     return x+x; \t\t/* NaN */\n\t\telse return (xsb==0)? x:0.0;\t/* exp(+-inf)={inf,0} */\n\t    }\n\t    if(x > o_threshold) return huge*huge; /* overflow */\n\t    if(x < u_threshold) return twom1000*twom1000; /* underflow */\n\t}\n\n    /* argument reduction */\n\tif(hx > 0x3fd62e42) {\t\t/* if  |x| > 0.5 ln2 */ \n\t    if(hx < 0x3FF0A2B2) {\t/* and |x| < 1.5 ln2 */\n\t\thi = x-ln2HI[xsb]; lo=ln2LO[xsb]; k = 1-xsb-xsb;\n\t    } else {\n\t\tk  = (int)(invln2*x+halF[xsb]);\n\t\tt  = k;\n\t\thi = x - t*ln2HI[0];\t/* t*ln2HI is exact here */\n\t\tlo = t*ln2LO[0];\n\t    }\n\t    x  = hi - lo;\n\t} \n\telse if(hx < 0x3e300000)  {\t/* when |x|<2**-28 */\n\t    if(huge+x>one) return one+x;/* trigger inexact */\n\t}\n\telse k = 0;\n\n    /* x is now in primary range */\n\tt  = x*x;\n\tc  = x - t*(P1+t*(P2+t*(P3+t*(P4+t*P5))));\n\tif(k==0) \treturn one-((x*c)/(c-2.0)-x); \n\telse \t\ty = one-((lo-(x*c)/(2.0-c))-hi);\n\tif(k >= -1021) {\n\t    __HI(y) += (k<<20);\t/* add k to y's exponent */\n\t    return y;\n\t} else {\n\t    __HI(y) += ((k+1000)<<20);/* add k to y's exponent */\n\t    return y*twom1000;\n\t}\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/e_fmod.c",
    "content": "\n/* @(#)e_fmod.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* \n * __ieee754_fmod(x,y)\n * Return x mod y in exact arithmetic\n * Method: shift and subtract\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic const double one = 1.0, Zero[] = {0.0, -0.0,};\n#else\nstatic double one = 1.0, Zero[] = {0.0, -0.0,};\n#endif\n\n#ifdef __STDC__\n\tdouble __ieee754_fmod(double x, double y)\n#else\n\tdouble __ieee754_fmod(x,y)\n\tdouble x,y ;\n#endif\n{\n\tint n,hx,hy,hz,ix,iy,sx,i;\n\tunsigned lx,ly,lz;\n\n\thx = __HI(x);\t\t/* high word of x */\n\tlx = __LO(x);\t\t/* low  word of x */\n\thy = __HI(y);\t\t/* high word of y */\n\tly = __LO(y);\t\t/* low  word of y */\n\tsx = hx&0x80000000;\t\t/* sign of x */\n\thx ^=sx;\t\t/* |x| */\n\thy &= 0x7fffffff;\t/* |y| */\n\n    /* purge off exception values */\n\tif((hy|ly)==0||(hx>=0x7ff00000)||\t/* y=0,or x not finite */\n\t  ((hy|((ly|-ly)>>31))>0x7ff00000))\t/* or y is NaN */\n\t    return (x*y)/(x*y);\n\tif(hx<=hy) {\n\t    if((hx<hy)||(lx<ly)) return x;\t/* |x|<|y| return x */\n\t    if(lx==ly) \n\t\treturn Zero[(unsigned)sx>>31];\t/* |x|=|y| return x*0*/\n\t}\n\n    /* determine ix = ilogb(x) */\n\tif(hx<0x00100000) {\t/* subnormal x */\n\t    if(hx==0) {\n\t\tfor (ix = -1043, i=lx; i>0; i<<=1) ix -=1;\n\t    } else {\n\t\tfor (ix = -1022,i=(hx<<11); i>0; i<<=1) ix -=1;\n\t    }\n\t} else ix = (hx>>20)-1023;\n\n    /* determine iy = ilogb(y) */\n\tif(hy<0x00100000) {\t/* subnormal y */\n\t    if(hy==0) {\n\t\tfor (iy = -1043, i=ly; i>0; i<<=1) iy -=1;\n\t    } else {\n\t\tfor (iy = -1022,i=(hy<<11); i>0; i<<=1) iy -=1;\n\t    }\n\t} else iy = (hy>>20)-1023;\n\n    /* set up {hx,lx}, {hy,ly} and align y to x */\n\tif(ix >= -1022) \n\t    hx = 0x00100000|(0x000fffff&hx);\n\telse {\t\t/* subnormal x, shift x to normal */\n\t    n = -1022-ix;\n\t    if(n<=31) {\n\t        hx = (hx<<n)|(lx>>(32-n));\n\t        lx <<= n;\n\t    } else {\n\t\thx = lx<<(n-32);\n\t\tlx = 0;\n\t    }\n\t}\n\tif(iy >= -1022) \n\t    hy = 0x00100000|(0x000fffff&hy);\n\telse {\t\t/* subnormal y, shift y to normal */\n\t    n = -1022-iy;\n\t    if(n<=31) {\n\t        hy = (hy<<n)|(ly>>(32-n));\n\t        ly <<= n;\n\t    } else {\n\t\thy = ly<<(n-32);\n\t\tly = 0;\n\t    }\n\t}\n\n    /* fix point fmod */\n\tn = ix - iy;\n\twhile(n--) {\n\t    hz=hx-hy;lz=lx-ly; if(lx<ly) hz -= 1;\n\t    if(hz<0){hx = hx+hx+(lx>>31); lx = lx+lx;}\n\t    else {\n\t    \tif((hz|lz)==0) \t\t/* return sign(x)*0 */\n\t\t    return Zero[(unsigned)sx>>31];\n\t    \thx = hz+hz+(lz>>31); lx = lz+lz;\n\t    }\n\t}\n\thz=hx-hy;lz=lx-ly; if(lx<ly) hz -= 1;\n\tif(hz>=0) {hx=hz;lx=lz;}\n\n    /* convert back to floating value and restore the sign */\n\tif((hx|lx)==0) \t\t\t/* return sign(x)*0 */\n\t    return Zero[(unsigned)sx>>31];\t\n\twhile(hx<0x00100000) {\t\t/* normalize x */\n\t    hx = hx+hx+(lx>>31); lx = lx+lx;\n\t    iy -= 1;\n\t}\n\tif(iy>= -1022) {\t/* normalize output */\n\t    hx = ((hx-0x00100000)|((iy+1023)<<20));\n\t    __HI(x) = hx|sx;\n\t    __LO(x) = lx;\n\t} else {\t\t/* subnormal output */\n\t    n = -1022 - iy;\n\t    if(n<=20) {\n\t\tlx = (lx>>n)|((unsigned)hx<<(32-n));\n\t\thx >>= n;\n\t    } else if (n<=31) {\n\t\tlx = (hx<<(32-n))|(lx>>n); hx = sx;\n\t    } else {\n\t\tlx = hx>>(n-32); hx = sx;\n\t    }\n\t    __HI(x) = hx|sx;\n\t    __LO(x) = lx;\n\t    x *= one;\t\t/* create necessary signal */\n\t}\n\treturn x;\t\t/* exact output */\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/e_gamma.c",
    "content": "\n/* @(#)e_gamma.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n *\n */\n\n/* __ieee754_gamma(x)\n * Return the logarithm of the Gamma function of x.\n *\n * Method: call __ieee754_gamma_r\n */\n\n#include \"fdlibm.h\"\n\nextern int signgam;\n\n#ifdef __STDC__\n\tdouble __ieee754_gamma(double x)\n#else\n\tdouble __ieee754_gamma(x)\n\tdouble x;\n#endif\n{\n\treturn __ieee754_gamma_r(x,&signgam);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/e_gamma_r.c",
    "content": "\n/* @(#)e_gamma_r.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n *\n */\n\n/* __ieee754_gamma_r(x, signgamp)\n * Reentrant version of the logarithm of the Gamma function \n * with user provide pointer for the sign of Gamma(x). \n *\n * Method: See __ieee754_lgamma_r\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\n\tdouble __ieee754_gamma_r(double x, int *signgamp)\n#else\n\tdouble __ieee754_gamma_r(x,signgamp)\n\tdouble x; int *signgamp;\n#endif\n{\n\treturn __ieee754_lgamma_r(x,signgamp);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/e_hypot.c",
    "content": "\n/* @(#)e_hypot.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* __ieee754_hypot(x,y)\n *\n * Method :                  \n *\tIf (assume round-to-nearest) z=x*x+y*y \n *\thas error less than sqrt(2)/2 ulp, than \n *\tsqrt(z) has error less than 1 ulp (exercise).\n *\n *\tSo, compute sqrt(x*x+y*y) with some care as \n *\tfollows to get the error below 1 ulp:\n *\n *\tAssume x>y>0;\n *\t(if possible, set rounding to round-to-nearest)\n *\t1. if x > 2y  use\n *\t\tx1*x1+(y*y+(x2*(x+x1))) for x*x+y*y\n *\twhere x1 = x with lower 32 bits cleared, x2 = x-x1; else\n *\t2. if x <= 2y use\n *\t\tt1*y1+((x-y)*(x-y)+(t1*y2+t2*y))\n *\twhere t1 = 2x with lower 32 bits cleared, t2 = 2x-t1, \n *\ty1= y with lower 32 bits chopped, y2 = y-y1.\n *\t\t\n *\tNOTE: scaling may be necessary if some argument is too \n *\t      large or too tiny\n *\n * Special cases:\n *\thypot(x,y) is INF if x or y is +INF or -INF; else\n *\thypot(x,y) is NAN if x or y is NAN.\n *\n * Accuracy:\n * \thypot(x,y) returns sqrt(x^2+y^2) with error less \n * \tthan 1 ulps (units in the last place) \n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\n\tdouble __ieee754_hypot(double x, double y)\n#else\n\tdouble __ieee754_hypot(x,y)\n\tdouble x, y;\n#endif\n{\n\tdouble a=x,b=y,t1,t2,y1,y2,w;\n\tint j,k,ha,hb;\n\n\tha = __HI(x)&0x7fffffff;\t/* high word of  x */\n\thb = __HI(y)&0x7fffffff;\t/* high word of  y */\n\tif(hb > ha) {a=y;b=x;j=ha; ha=hb;hb=j;} else {a=x;b=y;}\n\t__HI(a) = ha;\t/* a <- |a| */\n\t__HI(b) = hb;\t/* b <- |b| */\n\tif((ha-hb)>0x3c00000) {return a+b;} /* x/y > 2**60 */\n\tk=0;\n\tif(ha > 0x5f300000) {\t/* a>2**500 */\n\t   if(ha >= 0x7ff00000) {\t/* Inf or NaN */\n\t       w = a+b;\t\t\t/* for sNaN */\n\t       if(((ha&0xfffff)|__LO(a))==0) w = a;\n\t       if(((hb^0x7ff00000)|__LO(b))==0) w = b;\n\t       return w;\n\t   }\n\t   /* scale a and b by 2**-600 */\n\t   ha -= 0x25800000; hb -= 0x25800000;\tk += 600;\n\t   __HI(a) = ha;\n\t   __HI(b) = hb;\n\t}\n\tif(hb < 0x20b00000) {\t/* b < 2**-500 */\n\t    if(hb <= 0x000fffff) {\t/* subnormal b or 0 */\t\n\t\tif((hb|(__LO(b)))==0) return a;\n\t\tt1=0;\n\t\t__HI(t1) = 0x7fd00000;\t/* t1=2^1022 */\n\t\tb *= t1;\n\t\ta *= t1;\n\t\tk -= 1022;\n\t    } else {\t\t/* scale a and b by 2^600 */\n\t        ha += 0x25800000; \t/* a *= 2^600 */\n\t\thb += 0x25800000;\t/* b *= 2^600 */\n\t\tk -= 600;\n\t   \t__HI(a) = ha;\n\t   \t__HI(b) = hb;\n\t    }\n\t}\n    /* medium size a and b */\n\tw = a-b;\n\tif (w>b) {\n\t    t1 = 0;\n\t    __HI(t1) = ha;\n\t    t2 = a-t1;\n\t    w  = sqrt(t1*t1-(b*(-b)-t2*(a+t1)));\n\t} else {\n\t    a  = a+a;\n\t    y1 = 0;\n\t    __HI(y1) = hb;\n\t    y2 = b - y1;\n\t    t1 = 0;\n\t    __HI(t1) = ha+0x00100000;\n\t    t2 = a - t1;\n\t    w  = sqrt(t1*y1-(w*(-w)-(t1*y2+t2*b)));\n\t}\n\tif(k!=0) {\n\t    t1 = 1.0;\n\t    __HI(t1) += (k<<20);\n\t    return t1*w;\n\t} else return w;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/e_j0.c",
    "content": "\n/* @(#)e_j0.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* __ieee754_j0(x), __ieee754_y0(x)\n * Bessel function of the first and second kinds of order zero.\n * Method -- j0(x):\n *\t1. For tiny x, we use j0(x) = 1 - x^2/4 + x^4/64 - ...\n *\t2. Reduce x to |x| since j0(x)=j0(-x),  and\n *\t   for x in (0,2)\n *\t\tj0(x) = 1-z/4+ z^2*R0/S0,  where z = x*x;\n *\t   (precision:  |j0-1+z/4-z^2R0/S0 |<2**-63.67 )\n *\t   for x in (2,inf)\n * \t\tj0(x) = sqrt(2/(pi*x))*(p0(x)*cos(x0)-q0(x)*sin(x0))\n * \t   where x0 = x-pi/4. It is better to compute sin(x0),cos(x0)\n *\t   as follow:\n *\t\tcos(x0) = cos(x)cos(pi/4)+sin(x)sin(pi/4)\n *\t\t\t= 1/sqrt(2) * (cos(x) + sin(x))\n *\t\tsin(x0) = sin(x)cos(pi/4)-cos(x)sin(pi/4)\n *\t\t\t= 1/sqrt(2) * (sin(x) - cos(x))\n * \t   (To avoid cancellation, use\n *\t\tsin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))\n * \t    to compute the worse one.)\n *\t   \n *\t3 Special cases\n *\t\tj0(nan)= nan\n *\t\tj0(0) = 1\n *\t\tj0(inf) = 0\n *\t\t\n * Method -- y0(x):\n *\t1. For x<2.\n *\t   Since \n *\t\ty0(x) = 2/pi*(j0(x)*(ln(x/2)+Euler) + x^2/4 - ...)\n *\t   therefore y0(x)-2/pi*j0(x)*ln(x) is an even function.\n *\t   We use the following function to approximate y0,\n *\t\ty0(x) = U(z)/V(z) + (2/pi)*(j0(x)*ln(x)), z= x^2\n *\t   where \n *\t\tU(z) = u00 + u01*z + ... + u06*z^6\n *\t\tV(z) = 1  + v01*z + ... + v04*z^4\n *\t   with absolute approximation error bounded by 2**-72.\n *\t   Note: For tiny x, U/V = u0 and j0(x)~1, hence\n *\t\ty0(tiny) = u0 + (2/pi)*ln(tiny), (choose tiny<2**-27)\n *\t2. For x>=2.\n * \t\ty0(x) = sqrt(2/(pi*x))*(p0(x)*cos(x0)+q0(x)*sin(x0))\n * \t   where x0 = x-pi/4. It is better to compute sin(x0),cos(x0)\n *\t   by the method mentioned above.\n *\t3. Special cases: y0(0)=-inf, y0(x<0)=NaN, y0(inf)=0.\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic double pzero(double), qzero(double);\n#else\nstatic double pzero(), qzero();\n#endif\n\n#ifdef __STDC__\nstatic const double \n#else\nstatic double \n#endif\nhuge \t= 1e300,\none\t= 1.0,\ninvsqrtpi=  5.64189583547756279280e-01, /* 0x3FE20DD7, 0x50429B6D */\ntpi      =  6.36619772367581382433e-01, /* 0x3FE45F30, 0x6DC9C883 */\n \t\t/* R0/S0 on [0, 2.00] */\nR02  =  1.56249999999999947958e-02, /* 0x3F8FFFFF, 0xFFFFFFFD */\nR03  = -1.89979294238854721751e-04, /* 0xBF28E6A5, 0xB61AC6E9 */\nR04  =  1.82954049532700665670e-06, /* 0x3EBEB1D1, 0x0C503919 */\nR05  = -4.61832688532103189199e-09, /* 0xBE33D5E7, 0x73D63FCE */\nS01  =  1.56191029464890010492e-02, /* 0x3F8FFCE8, 0x82C8C2A4 */\nS02  =  1.16926784663337450260e-04, /* 0x3F1EA6D2, 0xDD57DBF4 */\nS03  =  5.13546550207318111446e-07, /* 0x3EA13B54, 0xCE84D5A9 */\nS04  =  1.16614003333790000205e-09; /* 0x3E1408BC, 0xF4745D8F */\n\nstatic double zero = 0.0;\n\n#ifdef __STDC__\n\tdouble __ieee754_j0(double x) \n#else\n\tdouble __ieee754_j0(x) \n\tdouble x;\n#endif\n{\n\tdouble z, s,c,ss,cc,r,u,v;\n\tint hx,ix;\n\n\thx = __HI(x);\n\tix = hx&0x7fffffff;\n\tif(ix>=0x7ff00000) return one/(x*x);\n\tx = fabs(x);\n\tif(ix >= 0x40000000) {\t/* |x| >= 2.0 */\n\t\ts = sin(x);\n\t\tc = cos(x);\n\t\tss = s-c;\n\t\tcc = s+c;\n\t\tif(ix<0x7fe00000) {  /* make sure x+x not overflow */\n\t\t    z = -cos(x+x);\n\t\t    if ((s*c)<zero) cc = z/ss;\n\t\t    else \t    ss = z/cc;\n\t\t}\n\t/*\n\t * j0(x) = 1/sqrt(pi) * (P(0,x)*cc - Q(0,x)*ss) / sqrt(x)\n\t * y0(x) = 1/sqrt(pi) * (P(0,x)*ss + Q(0,x)*cc) / sqrt(x)\n\t */\n\t\tif(ix>0x48000000) z = (invsqrtpi*cc)/sqrt(x);\n\t\telse {\n\t\t    u = pzero(x); v = qzero(x);\n\t\t    z = invsqrtpi*(u*cc-v*ss)/sqrt(x);\n\t\t}\n\t\treturn z;\n\t}\n\tif(ix<0x3f200000) {\t/* |x| < 2**-13 */\n\t    if(huge+x>one) {\t/* raise inexact if x != 0 */\n\t        if(ix<0x3e400000) return one;\t/* |x|<2**-27 */\n\t        else \t      return one - 0.25*x*x;\n\t    }\n\t}\n\tz = x*x;\n\tr =  z*(R02+z*(R03+z*(R04+z*R05)));\n\ts =  one+z*(S01+z*(S02+z*(S03+z*S04)));\n\tif(ix < 0x3FF00000) {\t/* |x| < 1.00 */\n\t    return one + z*(-0.25+(r/s));\n\t} else {\n\t    u = 0.5*x;\n\t    return((one+u)*(one-u)+z*(r/s));\n\t}\n}\n\n#ifdef __STDC__\nstatic const double\n#else\nstatic double\n#endif\nu00  = -7.38042951086872317523e-02, /* 0xBFB2E4D6, 0x99CBD01F */\nu01  =  1.76666452509181115538e-01, /* 0x3FC69D01, 0x9DE9E3FC */\nu02  = -1.38185671945596898896e-02, /* 0xBF8C4CE8, 0xB16CFA97 */\nu03  =  3.47453432093683650238e-04, /* 0x3F36C54D, 0x20B29B6B */\nu04  = -3.81407053724364161125e-06, /* 0xBECFFEA7, 0x73D25CAD */\nu05  =  1.95590137035022920206e-08, /* 0x3E550057, 0x3B4EABD4 */\nu06  = -3.98205194132103398453e-11, /* 0xBDC5E43D, 0x693FB3C8 */\nv01  =  1.27304834834123699328e-02, /* 0x3F8A1270, 0x91C9C71A */\nv02  =  7.60068627350353253702e-05, /* 0x3F13ECBB, 0xF578C6C1 */\nv03  =  2.59150851840457805467e-07, /* 0x3E91642D, 0x7FF202FD */\nv04  =  4.41110311332675467403e-10; /* 0x3DFE5018, 0x3BD6D9EF */\n\n#ifdef __STDC__\n\tdouble __ieee754_y0(double x) \n#else\n\tdouble __ieee754_y0(x) \n\tdouble x;\n#endif\n{\n\tdouble z, s,c,ss,cc,u,v;\n\tint hx,ix,lx;\n\n        hx = __HI(x);\n        ix = 0x7fffffff&hx;\n        lx = __LO(x);\n    /* Y0(NaN) is NaN, y0(-inf) is Nan, y0(inf) is 0  */\n\tif(ix>=0x7ff00000) return  one/(x+x*x); \n        if((ix|lx)==0) return -one/zero;\n        if(hx<0) return zero/zero;\n        if(ix >= 0x40000000) {  /* |x| >= 2.0 */\n        /* y0(x) = sqrt(2/(pi*x))*(p0(x)*sin(x0)+q0(x)*cos(x0))\n         * where x0 = x-pi/4\n         *      Better formula:\n         *              cos(x0) = cos(x)cos(pi/4)+sin(x)sin(pi/4)\n         *                      =  1/sqrt(2) * (sin(x) + cos(x))\n         *              sin(x0) = sin(x)cos(3pi/4)-cos(x)sin(3pi/4)\n         *                      =  1/sqrt(2) * (sin(x) - cos(x))\n         * To avoid cancellation, use\n         *              sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))\n         * to compute the worse one.\n         */\n                s = sin(x);\n                c = cos(x);\n                ss = s-c;\n                cc = s+c;\n\t/*\n\t * j0(x) = 1/sqrt(pi) * (P(0,x)*cc - Q(0,x)*ss) / sqrt(x)\n\t * y0(x) = 1/sqrt(pi) * (P(0,x)*ss + Q(0,x)*cc) / sqrt(x)\n\t */\n                if(ix<0x7fe00000) {  /* make sure x+x not overflow */\n                    z = -cos(x+x);\n                    if ((s*c)<zero) cc = z/ss;\n                    else            ss = z/cc;\n                }\n                if(ix>0x48000000) z = (invsqrtpi*ss)/sqrt(x);\n                else {\n                    u = pzero(x); v = qzero(x);\n                    z = invsqrtpi*(u*ss+v*cc)/sqrt(x);\n                }\n                return z;\n\t}\n\tif(ix<=0x3e400000) {\t/* x < 2**-27 */\n\t    return(u00 + tpi*__ieee754_log(x));\n\t}\n\tz = x*x;\n\tu = u00+z*(u01+z*(u02+z*(u03+z*(u04+z*(u05+z*u06)))));\n\tv = one+z*(v01+z*(v02+z*(v03+z*v04)));\n\treturn(u/v + tpi*(__ieee754_j0(x)*__ieee754_log(x)));\n}\n\n/* The asymptotic expansions of pzero is\n *\t1 - 9/128 s^2 + 11025/98304 s^4 - ...,\twhere s = 1/x.\n * For x >= 2, We approximate pzero by\n * \tpzero(x) = 1 + (R/S)\n * where  R = pR0 + pR1*s^2 + pR2*s^4 + ... + pR5*s^10\n * \t  S = 1 + pS0*s^2 + ... + pS4*s^10\n * and\n *\t| pzero(x)-1-R/S | <= 2  ** ( -60.26)\n */\n#ifdef __STDC__\nstatic const double pR8[6] = { /* for x in [inf, 8]=1/[0,0.125] */\n#else\nstatic double pR8[6] = { /* for x in [inf, 8]=1/[0,0.125] */\n#endif\n  0.00000000000000000000e+00, /* 0x00000000, 0x00000000 */\n -7.03124999999900357484e-02, /* 0xBFB1FFFF, 0xFFFFFD32 */\n -8.08167041275349795626e+00, /* 0xC02029D0, 0xB44FA779 */\n -2.57063105679704847262e+02, /* 0xC0701102, 0x7B19E863 */\n -2.48521641009428822144e+03, /* 0xC0A36A6E, 0xCD4DCAFC */\n -5.25304380490729545272e+03, /* 0xC0B4850B, 0x36CC643D */\n};\n#ifdef __STDC__\nstatic const double pS8[5] = {\n#else\nstatic double pS8[5] = {\n#endif\n  1.16534364619668181717e+02, /* 0x405D2233, 0x07A96751 */\n  3.83374475364121826715e+03, /* 0x40ADF37D, 0x50596938 */\n  4.05978572648472545552e+04, /* 0x40E3D2BB, 0x6EB6B05F */\n  1.16752972564375915681e+05, /* 0x40FC810F, 0x8F9FA9BD */\n  4.76277284146730962675e+04, /* 0x40E74177, 0x4F2C49DC */\n};\n\n#ifdef __STDC__\nstatic const double pR5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */\n#else\nstatic double pR5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */\n#endif\n -1.14125464691894502584e-11, /* 0xBDA918B1, 0x47E495CC */\n -7.03124940873599280078e-02, /* 0xBFB1FFFF, 0xE69AFBC6 */\n -4.15961064470587782438e+00, /* 0xC010A370, 0xF90C6BBF */\n -6.76747652265167261021e+01, /* 0xC050EB2F, 0x5A7D1783 */\n -3.31231299649172967747e+02, /* 0xC074B3B3, 0x6742CC63 */\n -3.46433388365604912451e+02, /* 0xC075A6EF, 0x28A38BD7 */\n};\n#ifdef __STDC__\nstatic const double pS5[5] = {\n#else\nstatic double pS5[5] = {\n#endif\n  6.07539382692300335975e+01, /* 0x404E6081, 0x0C98C5DE */\n  1.05125230595704579173e+03, /* 0x40906D02, 0x5C7E2864 */\n  5.97897094333855784498e+03, /* 0x40B75AF8, 0x8FBE1D60 */\n  9.62544514357774460223e+03, /* 0x40C2CCB8, 0xFA76FA38 */\n  2.40605815922939109441e+03, /* 0x40A2CC1D, 0xC70BE864 */\n};\n\n#ifdef __STDC__\nstatic const double pR3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */\n#else\nstatic double pR3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */\n#endif\n -2.54704601771951915620e-09, /* 0xBE25E103, 0x6FE1AA86 */\n -7.03119616381481654654e-02, /* 0xBFB1FFF6, 0xF7C0E24B */\n -2.40903221549529611423e+00, /* 0xC00345B2, 0xAEA48074 */\n -2.19659774734883086467e+01, /* 0xC035F74A, 0x4CB94E14 */\n -5.80791704701737572236e+01, /* 0xC04D0A22, 0x420A1A45 */\n -3.14479470594888503854e+01, /* 0xC03F72AC, 0xA892D80F */\n};\n#ifdef __STDC__\nstatic const double pS3[5] = {\n#else\nstatic double pS3[5] = {\n#endif\n  3.58560338055209726349e+01, /* 0x4041ED92, 0x84077DD3 */\n  3.61513983050303863820e+02, /* 0x40769839, 0x464A7C0E */\n  1.19360783792111533330e+03, /* 0x4092A66E, 0x6D1061D6 */\n  1.12799679856907414432e+03, /* 0x40919FFC, 0xB8C39B7E */\n  1.73580930813335754692e+02, /* 0x4065B296, 0xFC379081 */\n};\n\n#ifdef __STDC__\nstatic const double pR2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */\n#else\nstatic double pR2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */\n#endif\n -8.87534333032526411254e-08, /* 0xBE77D316, 0xE927026D */\n -7.03030995483624743247e-02, /* 0xBFB1FF62, 0x495E1E42 */\n -1.45073846780952986357e+00, /* 0xBFF73639, 0x8A24A843 */\n -7.63569613823527770791e+00, /* 0xC01E8AF3, 0xEDAFA7F3 */\n -1.11931668860356747786e+01, /* 0xC02662E6, 0xC5246303 */\n -3.23364579351335335033e+00, /* 0xC009DE81, 0xAF8FE70F */\n};\n#ifdef __STDC__\nstatic const double pS2[5] = {\n#else\nstatic double pS2[5] = {\n#endif\n  2.22202997532088808441e+01, /* 0x40363865, 0x908B5959 */\n  1.36206794218215208048e+02, /* 0x4061069E, 0x0EE8878F */\n  2.70470278658083486789e+02, /* 0x4070E786, 0x42EA079B */\n  1.53875394208320329881e+02, /* 0x40633C03, 0x3AB6FAFF */\n  1.46576176948256193810e+01, /* 0x402D50B3, 0x44391809 */\n};\n\n#ifdef __STDC__\n\tstatic double pzero(double x)\n#else\n\tstatic double pzero(x)\n\tdouble x;\n#endif\n{\n#ifdef __STDC__\n\tconst double *p,*q;\n#else\n\tdouble *p,*q;\n#endif\n\tdouble z,r,s;\n\tint ix;\n\tix = 0x7fffffff&__HI(x);\n\tif(ix>=0x40200000)     {p = pR8; q= pS8;}\n\telse if(ix>=0x40122E8B){p = pR5; q= pS5;}\n\telse if(ix>=0x4006DB6D){p = pR3; q= pS3;}\n\telse if(ix>=0x40000000){p = pR2; q= pS2;}\n\tz = one/(x*x);\n\tr = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5]))));\n\ts = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*q[4]))));\n\treturn one+ r/s;\n}\n\t\t\n\n/* For x >= 8, the asymptotic expansions of qzero is\n *\t-1/8 s + 75/1024 s^3 - ..., where s = 1/x.\n * We approximate pzero by\n * \tqzero(x) = s*(-1.25 + (R/S))\n * where  R = qR0 + qR1*s^2 + qR2*s^4 + ... + qR5*s^10\n * \t  S = 1 + qS0*s^2 + ... + qS5*s^12\n * and\n *\t| qzero(x)/s +1.25-R/S | <= 2  ** ( -61.22)\n */\n#ifdef __STDC__\nstatic const double qR8[6] = { /* for x in [inf, 8]=1/[0,0.125] */\n#else\nstatic double qR8[6] = { /* for x in [inf, 8]=1/[0,0.125] */\n#endif\n  0.00000000000000000000e+00, /* 0x00000000, 0x00000000 */\n  7.32421874999935051953e-02, /* 0x3FB2BFFF, 0xFFFFFE2C */\n  1.17682064682252693899e+01, /* 0x40278952, 0x5BB334D6 */\n  5.57673380256401856059e+02, /* 0x40816D63, 0x15301825 */\n  8.85919720756468632317e+03, /* 0x40C14D99, 0x3E18F46D */\n  3.70146267776887834771e+04, /* 0x40E212D4, 0x0E901566 */\n};\n#ifdef __STDC__\nstatic const double qS8[6] = {\n#else\nstatic double qS8[6] = {\n#endif\n  1.63776026895689824414e+02, /* 0x406478D5, 0x365B39BC */\n  8.09834494656449805916e+03, /* 0x40BFA258, 0x4E6B0563 */\n  1.42538291419120476348e+05, /* 0x41016652, 0x54D38C3F */\n  8.03309257119514397345e+05, /* 0x412883DA, 0x83A52B43 */\n  8.40501579819060512818e+05, /* 0x4129A66B, 0x28DE0B3D */\n -3.43899293537866615225e+05, /* 0xC114FD6D, 0x2C9530C5 */\n};\n\n#ifdef __STDC__\nstatic const double qR5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */\n#else\nstatic double qR5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */\n#endif\n  1.84085963594515531381e-11, /* 0x3DB43D8F, 0x29CC8CD9 */\n  7.32421766612684765896e-02, /* 0x3FB2BFFF, 0xD172B04C */\n  5.83563508962056953777e+00, /* 0x401757B0, 0xB9953DD3 */\n  1.35111577286449829671e+02, /* 0x4060E392, 0x0A8788E9 */\n  1.02724376596164097464e+03, /* 0x40900CF9, 0x9DC8C481 */\n  1.98997785864605384631e+03, /* 0x409F17E9, 0x53C6E3A6 */\n};\n#ifdef __STDC__\nstatic const double qS5[6] = {\n#else\nstatic double qS5[6] = {\n#endif\n  8.27766102236537761883e+01, /* 0x4054B1B3, 0xFB5E1543 */\n  2.07781416421392987104e+03, /* 0x40A03BA0, 0xDA21C0CE */\n  1.88472887785718085070e+04, /* 0x40D267D2, 0x7B591E6D */\n  5.67511122894947329769e+04, /* 0x40EBB5E3, 0x97E02372 */\n  3.59767538425114471465e+04, /* 0x40E19118, 0x1F7A54A0 */\n -5.35434275601944773371e+03, /* 0xC0B4EA57, 0xBEDBC609 */\n};\n\n#ifdef __STDC__\nstatic const double qR3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */\n#else\nstatic double qR3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */\n#endif\n  4.37741014089738620906e-09, /* 0x3E32CD03, 0x6ADECB82 */\n  7.32411180042911447163e-02, /* 0x3FB2BFEE, 0x0E8D0842 */\n  3.34423137516170720929e+00, /* 0x400AC0FC, 0x61149CF5 */\n  4.26218440745412650017e+01, /* 0x40454F98, 0x962DAEDD */\n  1.70808091340565596283e+02, /* 0x406559DB, 0xE25EFD1F */\n  1.66733948696651168575e+02, /* 0x4064D77C, 0x81FA21E0 */\n};\n#ifdef __STDC__\nstatic const double qS3[6] = {\n#else\nstatic double qS3[6] = {\n#endif\n  4.87588729724587182091e+01, /* 0x40486122, 0xBFE343A6 */\n  7.09689221056606015736e+02, /* 0x40862D83, 0x86544EB3 */\n  3.70414822620111362994e+03, /* 0x40ACF04B, 0xE44DFC63 */\n  6.46042516752568917582e+03, /* 0x40B93C6C, 0xD7C76A28 */\n  2.51633368920368957333e+03, /* 0x40A3A8AA, 0xD94FB1C0 */\n -1.49247451836156386662e+02, /* 0xC062A7EB, 0x201CF40F */\n};\n\n#ifdef __STDC__\nstatic const double qR2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */\n#else\nstatic double qR2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */\n#endif\n  1.50444444886983272379e-07, /* 0x3E84313B, 0x54F76BDB */\n  7.32234265963079278272e-02, /* 0x3FB2BEC5, 0x3E883E34 */\n  1.99819174093815998816e+00, /* 0x3FFFF897, 0xE727779C */\n  1.44956029347885735348e+01, /* 0x402CFDBF, 0xAAF96FE5 */\n  3.16662317504781540833e+01, /* 0x403FAA8E, 0x29FBDC4A */\n  1.62527075710929267416e+01, /* 0x403040B1, 0x71814BB4 */\n};\n#ifdef __STDC__\nstatic const double qS2[6] = {\n#else\nstatic double qS2[6] = {\n#endif\n  3.03655848355219184498e+01, /* 0x403E5D96, 0xF7C07AED */\n  2.69348118608049844624e+02, /* 0x4070D591, 0xE4D14B40 */\n  8.44783757595320139444e+02, /* 0x408A6645, 0x22B3BF22 */\n  8.82935845112488550512e+02, /* 0x408B977C, 0x9C5CC214 */\n  2.12666388511798828631e+02, /* 0x406A9553, 0x0E001365 */\n -5.31095493882666946917e+00, /* 0xC0153E6A, 0xF8B32931 */\n};\n\n#ifdef __STDC__\n\tstatic double qzero(double x)\n#else\n\tstatic double qzero(x)\n\tdouble x;\n#endif\n{\n#ifdef __STDC__\n\tconst double *p,*q;\n#else\n\tdouble *p,*q;\n#endif\n\tdouble s,r,z;\n\tint ix;\n\tix = 0x7fffffff&__HI(x);\n\tif(ix>=0x40200000)     {p = qR8; q= qS8;}\n\telse if(ix>=0x40122E8B){p = qR5; q= qS5;}\n\telse if(ix>=0x4006DB6D){p = qR3; q= qS3;}\n\telse if(ix>=0x40000000){p = qR2; q= qS2;}\n\tz = one/(x*x);\n\tr = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5]))));\n\ts = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*(q[4]+z*q[5])))));\n\treturn (-.125 + r/s)/x;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/e_j1.c",
    "content": "\n/* @(#)e_j1.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* __ieee754_j1(x), __ieee754_y1(x)\n * Bessel function of the first and second kinds of order zero.\n * Method -- j1(x):\n *\t1. For tiny x, we use j1(x) = x/2 - x^3/16 + x^5/384 - ...\n *\t2. Reduce x to |x| since j1(x)=-j1(-x),  and\n *\t   for x in (0,2)\n *\t\tj1(x) = x/2 + x*z*R0/S0,  where z = x*x;\n *\t   (precision:  |j1/x - 1/2 - R0/S0 |<2**-61.51 )\n *\t   for x in (2,inf)\n * \t\tj1(x) = sqrt(2/(pi*x))*(p1(x)*cos(x1)-q1(x)*sin(x1))\n * \t\ty1(x) = sqrt(2/(pi*x))*(p1(x)*sin(x1)+q1(x)*cos(x1))\n * \t   where x1 = x-3*pi/4. It is better to compute sin(x1),cos(x1)\n *\t   as follow:\n *\t\tcos(x1) =  cos(x)cos(3pi/4)+sin(x)sin(3pi/4)\n *\t\t\t=  1/sqrt(2) * (sin(x) - cos(x))\n *\t\tsin(x1) =  sin(x)cos(3pi/4)-cos(x)sin(3pi/4)\n *\t\t\t= -1/sqrt(2) * (sin(x) + cos(x))\n * \t   (To avoid cancellation, use\n *\t\tsin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))\n * \t    to compute the worse one.)\n *\t   \n *\t3 Special cases\n *\t\tj1(nan)= nan\n *\t\tj1(0) = 0\n *\t\tj1(inf) = 0\n *\t\t\n * Method -- y1(x):\n *\t1. screen out x<=0 cases: y1(0)=-inf, y1(x<0)=NaN \n *\t2. For x<2.\n *\t   Since \n *\t\ty1(x) = 2/pi*(j1(x)*(ln(x/2)+Euler)-1/x-x/2+5/64*x^3-...)\n *\t   therefore y1(x)-2/pi*j1(x)*ln(x)-1/x is an odd function.\n *\t   We use the following function to approximate y1,\n *\t\ty1(x) = x*U(z)/V(z) + (2/pi)*(j1(x)*ln(x)-1/x), z= x^2\n *\t   where for x in [0,2] (abs err less than 2**-65.89)\n *\t\tU(z) = U0[0] + U0[1]*z + ... + U0[4]*z^4\n *\t\tV(z) = 1  + v0[0]*z + ... + v0[4]*z^5\n *\t   Note: For tiny x, 1/x dominate y1 and hence\n *\t\ty1(tiny) = -2/pi/tiny, (choose tiny<2**-54)\n *\t3. For x>=2.\n * \t\ty1(x) = sqrt(2/(pi*x))*(p1(x)*sin(x1)+q1(x)*cos(x1))\n * \t   where x1 = x-3*pi/4. It is better to compute sin(x1),cos(x1)\n *\t   by method mentioned above.\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic double pone(double), qone(double);\n#else\nstatic double pone(), qone();\n#endif\n\n#ifdef __STDC__\nstatic const double \n#else\nstatic double \n#endif\nhuge    = 1e300,\none\t= 1.0,\ninvsqrtpi=  5.64189583547756279280e-01, /* 0x3FE20DD7, 0x50429B6D */\ntpi      =  6.36619772367581382433e-01, /* 0x3FE45F30, 0x6DC9C883 */\n\t/* R0/S0 on [0,2] */\nr00  = -6.25000000000000000000e-02, /* 0xBFB00000, 0x00000000 */\nr01  =  1.40705666955189706048e-03, /* 0x3F570D9F, 0x98472C61 */\nr02  = -1.59955631084035597520e-05, /* 0xBEF0C5C6, 0xBA169668 */\nr03  =  4.96727999609584448412e-08, /* 0x3E6AAAFA, 0x46CA0BD9 */\ns01  =  1.91537599538363460805e-02, /* 0x3F939D0B, 0x12637E53 */\ns02  =  1.85946785588630915560e-04, /* 0x3F285F56, 0xB9CDF664 */\ns03  =  1.17718464042623683263e-06, /* 0x3EB3BFF8, 0x333F8498 */\ns04  =  5.04636257076217042715e-09, /* 0x3E35AC88, 0xC97DFF2C */\ns05  =  1.23542274426137913908e-11; /* 0x3DAB2ACF, 0xCFB97ED8 */\n\nstatic double zero    = 0.0;\n\n#ifdef __STDC__\n\tdouble __ieee754_j1(double x) \n#else\n\tdouble __ieee754_j1(x) \n\tdouble x;\n#endif\n{\n\tdouble z, s,c,ss,cc,r,u,v,y;\n\tint hx,ix;\n\n\thx = __HI(x);\n\tix = hx&0x7fffffff;\n\tif(ix>=0x7ff00000) return one/x;\n\ty = fabs(x);\n\tif(ix >= 0x40000000) {\t/* |x| >= 2.0 */\n\t\ts = sin(y);\n\t\tc = cos(y);\n\t\tss = -s-c;\n\t\tcc = s-c;\n\t\tif(ix<0x7fe00000) {  /* make sure y+y not overflow */\n\t\t    z = cos(y+y);\n\t\t    if ((s*c)>zero) cc = z/ss;\n\t\t    else \t    ss = z/cc;\n\t\t}\n\t/*\n\t * j1(x) = 1/sqrt(pi) * (P(1,x)*cc - Q(1,x)*ss) / sqrt(x)\n\t * y1(x) = 1/sqrt(pi) * (P(1,x)*ss + Q(1,x)*cc) / sqrt(x)\n\t */\n\t\tif(ix>0x48000000) z = (invsqrtpi*cc)/sqrt(y);\n\t\telse {\n\t\t    u = pone(y); v = qone(y);\n\t\t    z = invsqrtpi*(u*cc-v*ss)/sqrt(y);\n\t\t}\n\t\tif(hx<0) return -z;\n\t\telse  \t return  z;\n\t}\n\tif(ix<0x3e400000) {\t/* |x|<2**-27 */\n\t    if(huge+x>one) return 0.5*x;/* inexact if x!=0 necessary */\n\t}\n\tz = x*x;\n\tr =  z*(r00+z*(r01+z*(r02+z*r03)));\n\ts =  one+z*(s01+z*(s02+z*(s03+z*(s04+z*s05))));\n\tr *= x;\n\treturn(x*0.5+r/s);\n}\n\n#ifdef __STDC__\nstatic const double U0[5] = {\n#else\nstatic double U0[5] = {\n#endif\n -1.96057090646238940668e-01, /* 0xBFC91866, 0x143CBC8A */\n  5.04438716639811282616e-02, /* 0x3FA9D3C7, 0x76292CD1 */\n -1.91256895875763547298e-03, /* 0xBF5F55E5, 0x4844F50F */\n  2.35252600561610495928e-05, /* 0x3EF8AB03, 0x8FA6B88E */\n -9.19099158039878874504e-08, /* 0xBE78AC00, 0x569105B8 */\n};\n#ifdef __STDC__\nstatic const double V0[5] = {\n#else\nstatic double V0[5] = {\n#endif\n  1.99167318236649903973e-02, /* 0x3F94650D, 0x3F4DA9F0 */\n  2.02552581025135171496e-04, /* 0x3F2A8C89, 0x6C257764 */\n  1.35608801097516229404e-06, /* 0x3EB6C05A, 0x894E8CA6 */\n  6.22741452364621501295e-09, /* 0x3E3ABF1D, 0x5BA69A86 */\n  1.66559246207992079114e-11, /* 0x3DB25039, 0xDACA772A */\n};\n\n#ifdef __STDC__\n\tdouble __ieee754_y1(double x) \n#else\n\tdouble __ieee754_y1(x) \n\tdouble x;\n#endif\n{\n\tdouble z, s,c,ss,cc,u,v;\n\tint hx,ix,lx;\n\n        hx = __HI(x);\n        ix = 0x7fffffff&hx;\n        lx = __LO(x);\n    /* if Y1(NaN) is NaN, Y1(-inf) is NaN, Y1(inf) is 0 */\n\tif(ix>=0x7ff00000) return  one/(x+x*x); \n        if((ix|lx)==0) return -one/zero;\n        if(hx<0) return zero/zero;\n        if(ix >= 0x40000000) {  /* |x| >= 2.0 */\n                s = sin(x);\n                c = cos(x);\n                ss = -s-c;\n                cc = s-c;\n                if(ix<0x7fe00000) {  /* make sure x+x not overflow */\n                    z = cos(x+x);\n                    if ((s*c)>zero) cc = z/ss;\n                    else            ss = z/cc;\n                }\n        /* y1(x) = sqrt(2/(pi*x))*(p1(x)*sin(x0)+q1(x)*cos(x0))\n         * where x0 = x-3pi/4\n         *      Better formula:\n         *              cos(x0) = cos(x)cos(3pi/4)+sin(x)sin(3pi/4)\n         *                      =  1/sqrt(2) * (sin(x) - cos(x))\n         *              sin(x0) = sin(x)cos(3pi/4)-cos(x)sin(3pi/4)\n         *                      = -1/sqrt(2) * (cos(x) + sin(x))\n         * To avoid cancellation, use\n         *              sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))\n         * to compute the worse one.\n         */\n                if(ix>0x48000000) z = (invsqrtpi*ss)/sqrt(x);\n                else {\n                    u = pone(x); v = qone(x);\n                    z = invsqrtpi*(u*ss+v*cc)/sqrt(x);\n                }\n                return z;\n        } \n        if(ix<=0x3c900000) {    /* x < 2**-54 */\n            return(-tpi/x);\n        } \n        z = x*x;\n        u = U0[0]+z*(U0[1]+z*(U0[2]+z*(U0[3]+z*U0[4])));\n        v = one+z*(V0[0]+z*(V0[1]+z*(V0[2]+z*(V0[3]+z*V0[4]))));\n        return(x*(u/v) + tpi*(__ieee754_j1(x)*__ieee754_log(x)-one/x));\n}\n\n/* For x >= 8, the asymptotic expansions of pone is\n *\t1 + 15/128 s^2 - 4725/2^15 s^4 - ...,\twhere s = 1/x.\n * We approximate pone by\n * \tpone(x) = 1 + (R/S)\n * where  R = pr0 + pr1*s^2 + pr2*s^4 + ... + pr5*s^10\n * \t  S = 1 + ps0*s^2 + ... + ps4*s^10\n * and\n *\t| pone(x)-1-R/S | <= 2  ** ( -60.06)\n */\n\n#ifdef __STDC__\nstatic const double pr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */\n#else\nstatic double pr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */\n#endif\n  0.00000000000000000000e+00, /* 0x00000000, 0x00000000 */\n  1.17187499999988647970e-01, /* 0x3FBDFFFF, 0xFFFFFCCE */\n  1.32394806593073575129e+01, /* 0x402A7A9D, 0x357F7FCE */\n  4.12051854307378562225e+02, /* 0x4079C0D4, 0x652EA590 */\n  3.87474538913960532227e+03, /* 0x40AE457D, 0xA3A532CC */\n  7.91447954031891731574e+03, /* 0x40BEEA7A, 0xC32782DD */\n};\n#ifdef __STDC__\nstatic const double ps8[5] = {\n#else\nstatic double ps8[5] = {\n#endif\n  1.14207370375678408436e+02, /* 0x405C8D45, 0x8E656CAC */\n  3.65093083420853463394e+03, /* 0x40AC85DC, 0x964D274F */\n  3.69562060269033463555e+04, /* 0x40E20B86, 0x97C5BB7F */\n  9.76027935934950801311e+04, /* 0x40F7D42C, 0xB28F17BB */\n  3.08042720627888811578e+04, /* 0x40DE1511, 0x697A0B2D */\n};\n\n#ifdef __STDC__\nstatic const double pr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */\n#else\nstatic double pr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */\n#endif\n  1.31990519556243522749e-11, /* 0x3DAD0667, 0xDAE1CA7D */\n  1.17187493190614097638e-01, /* 0x3FBDFFFF, 0xE2C10043 */\n  6.80275127868432871736e+00, /* 0x401B3604, 0x6E6315E3 */\n  1.08308182990189109773e+02, /* 0x405B13B9, 0x452602ED */\n  5.17636139533199752805e+02, /* 0x40802D16, 0xD052D649 */\n  5.28715201363337541807e+02, /* 0x408085B8, 0xBB7E0CB7 */\n};\n#ifdef __STDC__\nstatic const double ps5[5] = {\n#else\nstatic double ps5[5] = {\n#endif\n  5.92805987221131331921e+01, /* 0x404DA3EA, 0xA8AF633D */\n  9.91401418733614377743e+02, /* 0x408EFB36, 0x1B066701 */\n  5.35326695291487976647e+03, /* 0x40B4E944, 0x5706B6FB */\n  7.84469031749551231769e+03, /* 0x40BEA4B0, 0xB8A5BB15 */\n  1.50404688810361062679e+03, /* 0x40978030, 0x036F5E51 */\n};\n\n#ifdef __STDC__\nstatic const double pr3[6] = {\n#else\nstatic double pr3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */\n#endif\n  3.02503916137373618024e-09, /* 0x3E29FC21, 0xA7AD9EDD */\n  1.17186865567253592491e-01, /* 0x3FBDFFF5, 0x5B21D17B */\n  3.93297750033315640650e+00, /* 0x400F76BC, 0xE85EAD8A */\n  3.51194035591636932736e+01, /* 0x40418F48, 0x9DA6D129 */\n  9.10550110750781271918e+01, /* 0x4056C385, 0x4D2C1837 */\n  4.85590685197364919645e+01, /* 0x4048478F, 0x8EA83EE5 */\n};\n#ifdef __STDC__\nstatic const double ps3[5] = {\n#else\nstatic double ps3[5] = {\n#endif\n  3.47913095001251519989e+01, /* 0x40416549, 0xA134069C */\n  3.36762458747825746741e+02, /* 0x40750C33, 0x07F1A75F */\n  1.04687139975775130551e+03, /* 0x40905B7C, 0x5037D523 */\n  8.90811346398256432622e+02, /* 0x408BD67D, 0xA32E31E9 */\n  1.03787932439639277504e+02, /* 0x4059F26D, 0x7C2EED53 */\n};\n\n#ifdef __STDC__\nstatic const double pr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */\n#else\nstatic double pr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */\n#endif\n  1.07710830106873743082e-07, /* 0x3E7CE9D4, 0xF65544F4 */\n  1.17176219462683348094e-01, /* 0x3FBDFF42, 0xBE760D83 */\n  2.36851496667608785174e+00, /* 0x4002F2B7, 0xF98FAEC0 */\n  1.22426109148261232917e+01, /* 0x40287C37, 0x7F71A964 */\n  1.76939711271687727390e+01, /* 0x4031B1A8, 0x177F8EE2 */\n  5.07352312588818499250e+00, /* 0x40144B49, 0xA574C1FE */\n};\n#ifdef __STDC__\nstatic const double ps2[5] = {\n#else\nstatic double ps2[5] = {\n#endif\n  2.14364859363821409488e+01, /* 0x40356FBD, 0x8AD5ECDC */\n  1.25290227168402751090e+02, /* 0x405F5293, 0x14F92CD5 */\n  2.32276469057162813669e+02, /* 0x406D08D8, 0xD5A2DBD9 */\n  1.17679373287147100768e+02, /* 0x405D6B7A, 0xDA1884A9 */\n  8.36463893371618283368e+00, /* 0x4020BAB1, 0xF44E5192 */\n};\n\n#ifdef __STDC__\n\tstatic double pone(double x)\n#else\n\tstatic double pone(x)\n\tdouble x;\n#endif\n{\n#ifdef __STDC__\n\tconst double *p,*q;\n#else\n\tdouble *p,*q;\n#endif\n\tdouble z,r,s;\n        int ix;\n        ix = 0x7fffffff&__HI(x);\n        if(ix>=0x40200000)     {p = pr8; q= ps8;}\n        else if(ix>=0x40122E8B){p = pr5; q= ps5;}\n        else if(ix>=0x4006DB6D){p = pr3; q= ps3;}\n        else if(ix>=0x40000000){p = pr2; q= ps2;}\n        z = one/(x*x);\n        r = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5]))));\n        s = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*q[4]))));\n        return one+ r/s;\n}\n\t\t\n\n/* For x >= 8, the asymptotic expansions of qone is\n *\t3/8 s - 105/1024 s^3 - ..., where s = 1/x.\n * We approximate pone by\n * \tqone(x) = s*(0.375 + (R/S))\n * where  R = qr1*s^2 + qr2*s^4 + ... + qr5*s^10\n * \t  S = 1 + qs1*s^2 + ... + qs6*s^12\n * and\n *\t| qone(x)/s -0.375-R/S | <= 2  ** ( -61.13)\n */\n\n#ifdef __STDC__\nstatic const double qr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */\n#else\nstatic double qr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */\n#endif\n  0.00000000000000000000e+00, /* 0x00000000, 0x00000000 */\n -1.02539062499992714161e-01, /* 0xBFBA3FFF, 0xFFFFFDF3 */\n -1.62717534544589987888e+01, /* 0xC0304591, 0xA26779F7 */\n -7.59601722513950107896e+02, /* 0xC087BCD0, 0x53E4B576 */\n -1.18498066702429587167e+04, /* 0xC0C724E7, 0x40F87415 */\n -4.84385124285750353010e+04, /* 0xC0E7A6D0, 0x65D09C6A */\n};\n#ifdef __STDC__\nstatic const double qs8[6] = {\n#else\nstatic double qs8[6] = {\n#endif\n  1.61395369700722909556e+02, /* 0x40642CA6, 0xDE5BCDE5 */\n  7.82538599923348465381e+03, /* 0x40BE9162, 0xD0D88419 */\n  1.33875336287249578163e+05, /* 0x4100579A, 0xB0B75E98 */\n  7.19657723683240939863e+05, /* 0x4125F653, 0x72869C19 */\n  6.66601232617776375264e+05, /* 0x412457D2, 0x7719AD5C */\n -2.94490264303834643215e+05, /* 0xC111F969, 0x0EA5AA18 */\n};\n\n#ifdef __STDC__\nstatic const double qr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */\n#else\nstatic double qr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */\n#endif\n -2.08979931141764104297e-11, /* 0xBDB6FA43, 0x1AA1A098 */\n -1.02539050241375426231e-01, /* 0xBFBA3FFF, 0xCB597FEF */\n -8.05644828123936029840e+00, /* 0xC0201CE6, 0xCA03AD4B */\n -1.83669607474888380239e+02, /* 0xC066F56D, 0x6CA7B9B0 */\n -1.37319376065508163265e+03, /* 0xC09574C6, 0x6931734F */\n -2.61244440453215656817e+03, /* 0xC0A468E3, 0x88FDA79D */\n};\n#ifdef __STDC__\nstatic const double qs5[6] = {\n#else\nstatic double qs5[6] = {\n#endif\n  8.12765501384335777857e+01, /* 0x405451B2, 0xFF5A11B2 */\n  1.99179873460485964642e+03, /* 0x409F1F31, 0xE77BF839 */\n  1.74684851924908907677e+04, /* 0x40D10F1F, 0x0D64CE29 */\n  4.98514270910352279316e+04, /* 0x40E8576D, 0xAABAD197 */\n  2.79480751638918118260e+04, /* 0x40DB4B04, 0xCF7C364B */\n -4.71918354795128470869e+03, /* 0xC0B26F2E, 0xFCFFA004 */\n};\n\n#ifdef __STDC__\nstatic const double qr3[6] = {\n#else\nstatic double qr3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */\n#endif\n -5.07831226461766561369e-09, /* 0xBE35CFA9, 0xD38FC84F */\n -1.02537829820837089745e-01, /* 0xBFBA3FEB, 0x51AEED54 */\n -4.61011581139473403113e+00, /* 0xC01270C2, 0x3302D9FF */\n -5.78472216562783643212e+01, /* 0xC04CEC71, 0xC25D16DA */\n -2.28244540737631695038e+02, /* 0xC06C87D3, 0x4718D55F */\n -2.19210128478909325622e+02, /* 0xC06B66B9, 0x5F5C1BF6 */\n};\n#ifdef __STDC__\nstatic const double qs3[6] = {\n#else\nstatic double qs3[6] = {\n#endif\n  4.76651550323729509273e+01, /* 0x4047D523, 0xCCD367E4 */\n  6.73865112676699709482e+02, /* 0x40850EEB, 0xC031EE3E */\n  3.38015286679526343505e+03, /* 0x40AA684E, 0x448E7C9A */\n  5.54772909720722782367e+03, /* 0x40B5ABBA, 0xA61D54A6 */\n  1.90311919338810798763e+03, /* 0x409DBC7A, 0x0DD4DF4B */\n -1.35201191444307340817e+02, /* 0xC060E670, 0x290A311F */\n};\n\n#ifdef __STDC__\nstatic const double qr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */\n#else\nstatic double qr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */\n#endif\n -1.78381727510958865572e-07, /* 0xBE87F126, 0x44C626D2 */\n -1.02517042607985553460e-01, /* 0xBFBA3E8E, 0x9148B010 */\n -2.75220568278187460720e+00, /* 0xC0060484, 0x69BB4EDA */\n -1.96636162643703720221e+01, /* 0xC033A9E2, 0xC168907F */\n -4.23253133372830490089e+01, /* 0xC04529A3, 0xDE104AAA */\n -2.13719211703704061733e+01, /* 0xC0355F36, 0x39CF6E52 */\n};\n#ifdef __STDC__\nstatic const double qs2[6] = {\n#else\nstatic double qs2[6] = {\n#endif\n  2.95333629060523854548e+01, /* 0x403D888A, 0x78AE64FF */\n  2.52981549982190529136e+02, /* 0x406F9F68, 0xDB821CBA */\n  7.57502834868645436472e+02, /* 0x4087AC05, 0xCE49A0F7 */\n  7.39393205320467245656e+02, /* 0x40871B25, 0x48D4C029 */\n  1.55949003336666123687e+02, /* 0x40637E5E, 0x3C3ED8D4 */\n -4.95949898822628210127e+00, /* 0xC013D686, 0xE71BE86B */\n};\n\n#ifdef __STDC__\n\tstatic double qone(double x)\n#else\n\tstatic double qone(x)\n\tdouble x;\n#endif\n{\n#ifdef __STDC__\n\tconst double *p,*q;\n#else\n\tdouble *p,*q;\n#endif\n\tdouble  s,r,z;\n\tint ix;\n\tix = 0x7fffffff&__HI(x);\n\tif(ix>=0x40200000)     {p = qr8; q= qs8;}\n\telse if(ix>=0x40122E8B){p = qr5; q= qs5;}\n\telse if(ix>=0x4006DB6D){p = qr3; q= qs3;}\n\telse if(ix>=0x40000000){p = qr2; q= qs2;}\n\tz = one/(x*x);\n\tr = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5]))));\n\ts = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*(q[4]+z*q[5])))));\n\treturn (.375 + r/s)/x;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/e_jn.c",
    "content": "\n/* @(#)e_jn.c 1.4 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/*\n * __ieee754_jn(n, x), __ieee754_yn(n, x)\n * floating point Bessel's function of the 1st and 2nd kind\n * of order n\n *          \n * Special cases:\n *\ty0(0)=y1(0)=yn(n,0) = -inf with division by zero signal;\n *\ty0(-ve)=y1(-ve)=yn(n,-ve) are NaN with invalid signal.\n * Note 2. About jn(n,x), yn(n,x)\n *\tFor n=0, j0(x) is called,\n *\tfor n=1, j1(x) is called,\n *\tfor n<x, forward recursion us used starting\n *\tfrom values of j0(x) and j1(x).\n *\tfor n>x, a continued fraction approximation to\n *\tj(n,x)/j(n-1,x) is evaluated and then backward\n *\trecursion is used starting from a supposed value\n *\tfor j(n,x). The resulting value of j(0,x) is\n *\tcompared with the actual value to correct the\n *\tsupposed value of j(n,x).\n *\n *\tyn(n,x) is similar in all respects, except\n *\tthat forward recursion is used for all\n *\tvalues of n>1.\n *\t\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic const double\n#else\nstatic double\n#endif\ninvsqrtpi=  5.64189583547756279280e-01, /* 0x3FE20DD7, 0x50429B6D */\ntwo   =  2.00000000000000000000e+00, /* 0x40000000, 0x00000000 */\none   =  1.00000000000000000000e+00; /* 0x3FF00000, 0x00000000 */\n\nstatic double zero  =  0.00000000000000000000e+00;\n\n#ifdef __STDC__\n\tdouble __ieee754_jn(int n, double x)\n#else\n\tdouble __ieee754_jn(n,x)\n\tint n; double x;\n#endif\n{\n\tint i,hx,ix,lx, sgn;\n\tdouble a, b, temp, di;\n\tdouble z, w;\n\n    /* J(-n,x) = (-1)^n * J(n, x), J(n, -x) = (-1)^n * J(n, x)\n     * Thus, J(-n,x) = J(n,-x)\n     */\n\thx = __HI(x);\n\tix = 0x7fffffff&hx;\n\tlx = __LO(x);\n    /* if J(n,NaN) is NaN */\n\tif((ix|((unsigned)(lx|-lx))>>31)>0x7ff00000) return x+x;\n\tif(n<0){\t\t\n\t\tn = -n;\n\t\tx = -x;\n\t\thx ^= 0x80000000;\n\t}\n\tif(n==0) return(__ieee754_j0(x));\n\tif(n==1) return(__ieee754_j1(x));\n\tsgn = (n&1)&(hx>>31);\t/* even n -- 0, odd n -- sign(x) */\n\tx = fabs(x);\n\tif((ix|lx)==0||ix>=0x7ff00000) \t/* if x is 0 or inf */\n\t    b = zero;\n\telse if((double)n<=x) {   \n\t\t/* Safe to use J(n+1,x)=2n/x *J(n,x)-J(n-1,x) */\n\t    if(ix>=0x52D00000) { /* x > 2**302 */\n    /* (x >> n**2) \n     *\t    Jn(x) = cos(x-(2n+1)*pi/4)*sqrt(2/x*pi)\n     *\t    Yn(x) = sin(x-(2n+1)*pi/4)*sqrt(2/x*pi)\n     *\t    Let s=sin(x), c=cos(x), \n     *\t\txn=x-(2n+1)*pi/4, sqt2 = sqrt(2),then\n     *\n     *\t\t   n\tsin(xn)*sqt2\tcos(xn)*sqt2\n     *\t\t----------------------------------\n     *\t\t   0\t s-c\t\t c+s\n     *\t\t   1\t-s-c \t\t-c+s\n     *\t\t   2\t-s+c\t\t-c-s\n     *\t\t   3\t s+c\t\t c-s\n     */\n\t\tswitch(n&3) {\n\t\t    case 0: temp =  cos(x)+sin(x); break;\n\t\t    case 1: temp = -cos(x)+sin(x); break;\n\t\t    case 2: temp = -cos(x)-sin(x); break;\n\t\t    case 3: temp =  cos(x)-sin(x); break;\n\t\t}\n\t\tb = invsqrtpi*temp/sqrt(x);\n\t    } else {\t\n\t        a = __ieee754_j0(x);\n\t        b = __ieee754_j1(x);\n\t        for(i=1;i<n;i++){\n\t\t    temp = b;\n\t\t    b = b*((double)(i+i)/x) - a; /* avoid underflow */\n\t\t    a = temp;\n\t        }\n\t    }\n\t} else {\n\t    if(ix<0x3e100000) {\t/* x < 2**-29 */\n    /* x is tiny, return the first Taylor expansion of J(n,x) \n     * J(n,x) = 1/n!*(x/2)^n  - ...\n     */\n\t\tif(n>33)\t/* underflow */\n\t\t    b = zero;\n\t\telse {\n\t\t    temp = x*0.5; b = temp;\n\t\t    for (a=one,i=2;i<=n;i++) {\n\t\t\ta *= (double)i;\t\t/* a = n! */\n\t\t\tb *= temp;\t\t/* b = (x/2)^n */\n\t\t    }\n\t\t    b = b/a;\n\t\t}\n\t    } else {\n\t\t/* use backward recurrence */\n\t\t/* \t\t\tx      x^2      x^2       \n\t\t *  J(n,x)/J(n-1,x) =  ----   ------   ------   .....\n\t\t *\t\t\t2n  - 2(n+1) - 2(n+2)\n\t\t *\n\t\t * \t\t\t1      1        1       \n\t\t *  (for large x)   =  ----  ------   ------   .....\n\t\t *\t\t\t2n   2(n+1)   2(n+2)\n\t\t *\t\t\t-- - ------ - ------ - \n\t\t *\t\t\t x     x         x\n\t\t *\n\t\t * Let w = 2n/x and h=2/x, then the above quotient\n\t\t * is equal to the continued fraction:\n\t\t *\t\t    1\n\t\t *\t= -----------------------\n\t\t *\t\t       1\n\t\t *\t   w - -----------------\n\t\t *\t\t\t  1\n\t\t * \t        w+h - ---------\n\t\t *\t\t       w+2h - ...\n\t\t *\n\t\t * To determine how many terms needed, let\n\t\t * Q(0) = w, Q(1) = w(w+h) - 1,\n\t\t * Q(k) = (w+k*h)*Q(k-1) - Q(k-2),\n\t\t * When Q(k) > 1e4\tgood for single \n\t\t * When Q(k) > 1e9\tgood for double \n\t\t * When Q(k) > 1e17\tgood for quadruple \n\t\t */\n\t    /* determine k */\n\t\tdouble t,v;\n\t\tdouble q0,q1,h,tmp; int k,m;\n\t\tw  = (n+n)/(double)x; h = 2.0/(double)x;\n\t\tq0 = w;  z = w+h; q1 = w*z - 1.0; k=1;\n\t\twhile(q1<1.0e9) {\n\t\t\tk += 1; z += h;\n\t\t\ttmp = z*q1 - q0;\n\t\t\tq0 = q1;\n\t\t\tq1 = tmp;\n\t\t}\n\t\tm = n+n;\n\t\tfor(t=zero, i = 2*(n+k); i>=m; i -= 2) t = one/(i/x-t);\n\t\ta = t;\n\t\tb = one;\n\t\t/*  estimate log((2/x)^n*n!) = n*log(2/x)+n*ln(n)\n\t\t *  Hence, if n*(log(2n/x)) > ...\n\t\t *  single 8.8722839355e+01\n\t\t *  double 7.09782712893383973096e+02\n\t\t *  long double 1.1356523406294143949491931077970765006170e+04\n\t\t *  then recurrent value may overflow and the result is \n\t\t *  likely underflow to zero\n\t\t */\n\t\ttmp = n;\n\t\tv = two/x;\n\t\ttmp = tmp*__ieee754_log(fabs(v*tmp));\n\t\tif(tmp<7.09782712893383973096e+02) {\n\t    \t    for(i=n-1,di=(double)(i+i);i>0;i--){\n\t\t        temp = b;\n\t\t\tb *= di;\n\t\t\tb  = b/x - a;\n\t\t        a = temp;\n\t\t\tdi -= two;\n\t     \t    }\n\t\t} else {\n\t    \t    for(i=n-1,di=(double)(i+i);i>0;i--){\n\t\t        temp = b;\n\t\t\tb *= di;\n\t\t\tb  = b/x - a;\n\t\t        a = temp;\n\t\t\tdi -= two;\n\t\t    /* scale b to avoid spurious overflow */\n\t\t\tif(b>1e100) {\n\t\t\t    a /= b;\n\t\t\t    t /= b;\n\t\t\t    b  = one;\n\t\t\t}\n\t     \t    }\n\t\t}\n\t    \tb = (t*__ieee754_j0(x)/b);\n\t    }\n\t}\n\tif(sgn==1) return -b; else return b;\n}\n\n#ifdef __STDC__\n\tdouble __ieee754_yn(int n, double x) \n#else\n\tdouble __ieee754_yn(n,x) \n\tint n; double x;\n#endif\n{\n\tint i,hx,ix,lx;\n\tint sign;\n\tdouble a, b, temp;\n\n\thx = __HI(x);\n\tix = 0x7fffffff&hx;\n\tlx = __LO(x);\n    /* if Y(n,NaN) is NaN */\n\tif((ix|((unsigned)(lx|-lx))>>31)>0x7ff00000) return x+x;\n\tif((ix|lx)==0) return -one/zero;\n\tif(hx<0) return zero/zero;\n\tsign = 1;\n\tif(n<0){\n\t\tn = -n;\n\t\tsign = 1 - ((n&1)<<1);\n\t}\n\tif(n==0) return(__ieee754_y0(x));\n\tif(n==1) return(sign*__ieee754_y1(x));\n\tif(ix==0x7ff00000) return zero;\n\tif(ix>=0x52D00000) { /* x > 2**302 */\n    /* (x >> n**2) \n     *\t    Jn(x) = cos(x-(2n+1)*pi/4)*sqrt(2/x*pi)\n     *\t    Yn(x) = sin(x-(2n+1)*pi/4)*sqrt(2/x*pi)\n     *\t    Let s=sin(x), c=cos(x), \n     *\t\txn=x-(2n+1)*pi/4, sqt2 = sqrt(2),then\n     *\n     *\t\t   n\tsin(xn)*sqt2\tcos(xn)*sqt2\n     *\t\t----------------------------------\n     *\t\t   0\t s-c\t\t c+s\n     *\t\t   1\t-s-c \t\t-c+s\n     *\t\t   2\t-s+c\t\t-c-s\n     *\t\t   3\t s+c\t\t c-s\n     */\n\t\tswitch(n&3) {\n\t\t    case 0: temp =  sin(x)-cos(x); break;\n\t\t    case 1: temp = -sin(x)-cos(x); break;\n\t\t    case 2: temp = -sin(x)+cos(x); break;\n\t\t    case 3: temp =  sin(x)+cos(x); break;\n\t\t}\n\t\tb = invsqrtpi*temp/sqrt(x);\n\t} else {\n\t    a = __ieee754_y0(x);\n\t    b = __ieee754_y1(x);\n\t/* quit if b is -inf */\n\t    for(i=1;i<n&&(__HI(b) != 0xfff00000);i++){ \n\t\ttemp = b;\n\t\tb = ((double)(i+i)/x)*b - a;\n\t\ta = temp;\n\t    }\n\t}\n\tif(sign>0) return b; else return -b;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/e_lgamma.c",
    "content": "\n/* @(#)e_lgamma.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n *\n */\n\n/* __ieee754_lgamma(x)\n * Return the logarithm of the Gamma function of x.\n *\n * Method: call __ieee754_lgamma_r\n */\n\n#include \"fdlibm.h\"\n\nextern int signgam;\n\n#ifdef __STDC__\n\tdouble __ieee754_lgamma(double x)\n#else\n\tdouble __ieee754_lgamma(x)\n\tdouble x;\n#endif\n{\n\treturn __ieee754_lgamma_r(x,&signgam);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/e_lgamma_r.c",
    "content": "\n/* @(#)e_lgamma_r.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n *\n */\n\n/* __ieee754_lgamma_r(x, signgamp)\n * Reentrant version of the logarithm of the Gamma function \n * with user provide pointer for the sign of Gamma(x). \n *\n * Method:\n *   1. Argument Reduction for 0 < x <= 8\n * \tSince gamma(1+s)=s*gamma(s), for x in [0,8], we may \n * \treduce x to a number in [1.5,2.5] by\n * \t\tlgamma(1+s) = log(s) + lgamma(s)\n *\tfor example,\n *\t\tlgamma(7.3) = log(6.3) + lgamma(6.3)\n *\t\t\t    = log(6.3*5.3) + lgamma(5.3)\n *\t\t\t    = log(6.3*5.3*4.3*3.3*2.3) + lgamma(2.3)\n *   2. Polynomial approximation of lgamma around its\n *\tminimun ymin=1.461632144968362245 to maintain monotonicity.\n *\tOn [ymin-0.23, ymin+0.27] (i.e., [1.23164,1.73163]), use\n *\t\tLet z = x-ymin;\n *\t\tlgamma(x) = -1.214862905358496078218 + z^2*poly(z)\n *\twhere\n *\t\tpoly(z) is a 14 degree polynomial.\n *   2. Rational approximation in the primary interval [2,3]\n *\tWe use the following approximation:\n *\t\ts = x-2.0;\n *\t\tlgamma(x) = 0.5*s + s*P(s)/Q(s)\n *\twith accuracy\n *\t\t|P/Q - (lgamma(x)-0.5s)| < 2**-61.71\n *\tOur algorithms are based on the following observation\n *\n *                             zeta(2)-1    2    zeta(3)-1    3\n * lgamma(2+s) = s*(1-Euler) + --------- * s  -  --------- * s  + ...\n *                                 2                 3\n *\n *\twhere Euler = 0.5771... is the Euler constant, which is very\n *\tclose to 0.5.\n *\n *   3. For x>=8, we have\n *\tlgamma(x)~(x-0.5)log(x)-x+0.5*log(2pi)+1/(12x)-1/(360x**3)+....\n *\t(better formula:\n *\t   lgamma(x)~(x-0.5)*(log(x)-1)-.5*(log(2pi)-1) + ...)\n *\tLet z = 1/x, then we approximation\n *\t\tf(z) = lgamma(x) - (x-0.5)(log(x)-1)\n *\tby\n *\t  \t\t\t    3       5             11\n *\t\tw = w0 + w1*z + w2*z  + w3*z  + ... + w6*z\n *\twhere \n *\t\t|w - f(z)| < 2**-58.74\n *\t\t\n *   4. For negative x, since (G is gamma function)\n *\t\t-x*G(-x)*G(x) = pi/sin(pi*x),\n * \twe have\n * \t\tG(x) = pi/(sin(pi*x)*(-x)*G(-x))\n *\tsince G(-x) is positive, sign(G(x)) = sign(sin(pi*x)) for x<0\n *\tHence, for x<0, signgam = sign(sin(pi*x)) and \n *\t\tlgamma(x) = log(|Gamma(x)|)\n *\t\t\t  = log(pi/(|x*sin(pi*x)|)) - lgamma(-x);\n *\tNote: one should avoid compute pi*(-x) directly in the \n *\t      computation of sin(pi*(-x)).\n *\t\t\n *   5. Special Cases\n *\t\tlgamma(2+s) ~ s*(1-Euler) for tiny s\n *\t\tlgamma(1)=lgamma(2)=0\n *\t\tlgamma(x) ~ -log(x) for tiny x\n *\t\tlgamma(0) = lgamma(inf) = inf\n *\t \tlgamma(-integer) = +-inf\n *\t\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic const double \n#else\nstatic double \n#endif\ntwo52=  4.50359962737049600000e+15, /* 0x43300000, 0x00000000 */\nhalf=  5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */\none =  1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */\npi  =  3.14159265358979311600e+00, /* 0x400921FB, 0x54442D18 */\na0  =  7.72156649015328655494e-02, /* 0x3FB3C467, 0xE37DB0C8 */\na1  =  3.22467033424113591611e-01, /* 0x3FD4A34C, 0xC4A60FAD */\na2  =  6.73523010531292681824e-02, /* 0x3FB13E00, 0x1A5562A7 */\na3  =  2.05808084325167332806e-02, /* 0x3F951322, 0xAC92547B */\na4  =  7.38555086081402883957e-03, /* 0x3F7E404F, 0xB68FEFE8 */\na5  =  2.89051383673415629091e-03, /* 0x3F67ADD8, 0xCCB7926B */\na6  =  1.19270763183362067845e-03, /* 0x3F538A94, 0x116F3F5D */\na7  =  5.10069792153511336608e-04, /* 0x3F40B6C6, 0x89B99C00 */\na8  =  2.20862790713908385557e-04, /* 0x3F2CF2EC, 0xED10E54D */\na9  =  1.08011567247583939954e-04, /* 0x3F1C5088, 0x987DFB07 */\na10 =  2.52144565451257326939e-05, /* 0x3EFA7074, 0x428CFA52 */\na11 =  4.48640949618915160150e-05, /* 0x3F07858E, 0x90A45837 */\ntc  =  1.46163214496836224576e+00, /* 0x3FF762D8, 0x6356BE3F */\ntf  = -1.21486290535849611461e-01, /* 0xBFBF19B9, 0xBCC38A42 */\n/* tt = -(tail of tf) */\ntt  = -3.63867699703950536541e-18, /* 0xBC50C7CA, 0xA48A971F */\nt0  =  4.83836122723810047042e-01, /* 0x3FDEF72B, 0xC8EE38A2 */\nt1  = -1.47587722994593911752e-01, /* 0xBFC2E427, 0x8DC6C509 */\nt2  =  6.46249402391333854778e-02, /* 0x3FB08B42, 0x94D5419B */\nt3  = -3.27885410759859649565e-02, /* 0xBFA0C9A8, 0xDF35B713 */\nt4  =  1.79706750811820387126e-02, /* 0x3F9266E7, 0x970AF9EC */\nt5  = -1.03142241298341437450e-02, /* 0xBF851F9F, 0xBA91EC6A */\nt6  =  6.10053870246291332635e-03, /* 0x3F78FCE0, 0xE370E344 */\nt7  = -3.68452016781138256760e-03, /* 0xBF6E2EFF, 0xB3E914D7 */\nt8  =  2.25964780900612472250e-03, /* 0x3F6282D3, 0x2E15C915 */\nt9  = -1.40346469989232843813e-03, /* 0xBF56FE8E, 0xBF2D1AF1 */\nt10 =  8.81081882437654011382e-04, /* 0x3F4CDF0C, 0xEF61A8E9 */\nt11 = -5.38595305356740546715e-04, /* 0xBF41A610, 0x9C73E0EC */\nt12 =  3.15632070903625950361e-04, /* 0x3F34AF6D, 0x6C0EBBF7 */\nt13 = -3.12754168375120860518e-04, /* 0xBF347F24, 0xECC38C38 */\nt14 =  3.35529192635519073543e-04, /* 0x3F35FD3E, 0xE8C2D3F4 */\nu0  = -7.72156649015328655494e-02, /* 0xBFB3C467, 0xE37DB0C8 */\nu1  =  6.32827064025093366517e-01, /* 0x3FE4401E, 0x8B005DFF */\nu2  =  1.45492250137234768737e+00, /* 0x3FF7475C, 0xD119BD6F */\nu3  =  9.77717527963372745603e-01, /* 0x3FEF4976, 0x44EA8450 */\nu4  =  2.28963728064692451092e-01, /* 0x3FCD4EAE, 0xF6010924 */\nu5  =  1.33810918536787660377e-02, /* 0x3F8B678B, 0xBF2BAB09 */\nv1  =  2.45597793713041134822e+00, /* 0x4003A5D7, 0xC2BD619C */\nv2  =  2.12848976379893395361e+00, /* 0x40010725, 0xA42B18F5 */\nv3  =  7.69285150456672783825e-01, /* 0x3FE89DFB, 0xE45050AF */\nv4  =  1.04222645593369134254e-01, /* 0x3FBAAE55, 0xD6537C88 */\nv5  =  3.21709242282423911810e-03, /* 0x3F6A5ABB, 0x57D0CF61 */\ns0  = -7.72156649015328655494e-02, /* 0xBFB3C467, 0xE37DB0C8 */\ns1  =  2.14982415960608852501e-01, /* 0x3FCB848B, 0x36E20878 */\ns2  =  3.25778796408930981787e-01, /* 0x3FD4D98F, 0x4F139F59 */\ns3  =  1.46350472652464452805e-01, /* 0x3FC2BB9C, 0xBEE5F2F7 */\ns4  =  2.66422703033638609560e-02, /* 0x3F9B481C, 0x7E939961 */\ns5  =  1.84028451407337715652e-03, /* 0x3F5E26B6, 0x7368F239 */\ns6  =  3.19475326584100867617e-05, /* 0x3F00BFEC, 0xDD17E945 */\nr1  =  1.39200533467621045958e+00, /* 0x3FF645A7, 0x62C4AB74 */\nr2  =  7.21935547567138069525e-01, /* 0x3FE71A18, 0x93D3DCDC */\nr3  =  1.71933865632803078993e-01, /* 0x3FC601ED, 0xCCFBDF27 */\nr4  =  1.86459191715652901344e-02, /* 0x3F9317EA, 0x742ED475 */\nr5  =  7.77942496381893596434e-04, /* 0x3F497DDA, 0xCA41A95B */\nr6  =  7.32668430744625636189e-06, /* 0x3EDEBAF7, 0xA5B38140 */\nw0  =  4.18938533204672725052e-01, /* 0x3FDACFE3, 0x90C97D69 */\nw1  =  8.33333333333329678849e-02, /* 0x3FB55555, 0x5555553B */\nw2  = -2.77777777728775536470e-03, /* 0xBF66C16C, 0x16B02E5C */\nw3  =  7.93650558643019558500e-04, /* 0x3F4A019F, 0x98CF38B6 */\nw4  = -5.95187557450339963135e-04, /* 0xBF4380CB, 0x8C0FE741 */\nw5  =  8.36339918996282139126e-04, /* 0x3F4B67BA, 0x4CDAD5D1 */\nw6  = -1.63092934096575273989e-03; /* 0xBF5AB89D, 0x0B9E43E4 */\n\nstatic double zero=  0.00000000000000000000e+00;\n\n#ifdef __STDC__\n\tstatic double sin_pi(double x)\n#else\n\tstatic double sin_pi(x)\n\tdouble x;\n#endif\n{\n\tdouble y,z;\n\tint n,ix;\n\n\tix = 0x7fffffff&__HI(x);\n\n\tif(ix<0x3fd00000) return __kernel_sin(pi*x,zero,0);\n\ty = -x;\t\t/* x is assume negative */\n\n    /*\n     * argument reduction, make sure inexact flag not raised if input\n     * is an integer\n     */\n\tz = floor(y);\n\tif(z!=y) {\t\t\t\t/* inexact anyway */\n\t    y  *= 0.5;\n\t    y   = 2.0*(y - floor(y));\t\t/* y = |x| mod 2.0 */\n\t    n   = (int) (y*4.0);\n\t} else {\n            if(ix>=0x43400000) {\n                y = zero; n = 0;                 /* y must be even */\n            } else {\n                if(ix<0x43300000) z = y+two52;\t/* exact */\n                n   = __LO(z)&1;        /* lower word of z */\n                y  = n;\n                n<<= 2;\n            }\n        }\n\tswitch (n) {\n\t    case 0:   y =  __kernel_sin(pi*y,zero,0); break;\n\t    case 1:   \n\t    case 2:   y =  __kernel_cos(pi*(0.5-y),zero); break;\n\t    case 3:  \n\t    case 4:   y =  __kernel_sin(pi*(one-y),zero,0); break;\n\t    case 5:\n\t    case 6:   y = -__kernel_cos(pi*(y-1.5),zero); break;\n\t    default:  y =  __kernel_sin(pi*(y-2.0),zero,0); break;\n\t    }\n\treturn -y;\n}\n\n\n#ifdef __STDC__\n\tdouble __ieee754_lgamma_r(double x, int *signgamp)\n#else\n\tdouble __ieee754_lgamma_r(x,signgamp)\n\tdouble x; int *signgamp;\n#endif\n{\n\tdouble t,y,z,nadj,p,p1,p2,p3,q,r,w;\n\tint i,hx,lx,ix;\n\n\thx = __HI(x);\n\tlx = __LO(x);\n\n    /* purge off +-inf, NaN, +-0, and negative arguments */\n\t*signgamp = 1;\n\tix = hx&0x7fffffff;\n\tif(ix>=0x7ff00000) return x*x;\n\tif((ix|lx)==0) return one/zero;\n\tif(ix<0x3b900000) {\t/* |x|<2**-70, return -log(|x|) */\n\t    if(hx<0) {\n\t        *signgamp = -1;\n\t        return -__ieee754_log(-x);\n\t    } else return -__ieee754_log(x);\n\t}\n\tif(hx<0) {\n\t    if(ix>=0x43300000) \t/* |x|>=2**52, must be -integer */\n\t\treturn one/zero;\n\t    t = sin_pi(x);\n\t    if(t==zero) return one/zero; /* -integer */\n\t    nadj = __ieee754_log(pi/fabs(t*x));\n\t    if(t<zero) *signgamp = -1;\n\t    x = -x;\n\t}\n\n    /* purge off 1 and 2 */\n\tif((((ix-0x3ff00000)|lx)==0)||(((ix-0x40000000)|lx)==0)) r = 0;\n    /* for x < 2.0 */\n\telse if(ix<0x40000000) {\n\t    if(ix<=0x3feccccc) { \t/* lgamma(x) = lgamma(x+1)-log(x) */\n\t\tr = -__ieee754_log(x);\n\t\tif(ix>=0x3FE76944) {y = one-x; i= 0;}\n\t\telse if(ix>=0x3FCDA661) {y= x-(tc-one); i=1;}\n\t  \telse {y = x; i=2;}\n\t    } else {\n\t  \tr = zero;\n\t        if(ix>=0x3FFBB4C3) {y=2.0-x;i=0;} /* [1.7316,2] */\n\t        else if(ix>=0x3FF3B4C4) {y=x-tc;i=1;} /* [1.23,1.73] */\n\t\telse {y=x-one;i=2;}\n\t    }\n\t    switch(i) {\n\t      case 0:\n\t\tz = y*y;\n\t\tp1 = a0+z*(a2+z*(a4+z*(a6+z*(a8+z*a10))));\n\t\tp2 = z*(a1+z*(a3+z*(a5+z*(a7+z*(a9+z*a11)))));\n\t\tp  = y*p1+p2;\n\t\tr  += (p-0.5*y); break;\n\t      case 1:\n\t\tz = y*y;\n\t\tw = z*y;\n\t\tp1 = t0+w*(t3+w*(t6+w*(t9 +w*t12)));\t/* parallel comp */\n\t\tp2 = t1+w*(t4+w*(t7+w*(t10+w*t13)));\n\t\tp3 = t2+w*(t5+w*(t8+w*(t11+w*t14)));\n\t\tp  = z*p1-(tt-w*(p2+y*p3));\n\t\tr += (tf + p); break;\n\t      case 2:\t\n\t\tp1 = y*(u0+y*(u1+y*(u2+y*(u3+y*(u4+y*u5)))));\n\t\tp2 = one+y*(v1+y*(v2+y*(v3+y*(v4+y*v5))));\n\t\tr += (-0.5*y + p1/p2);\n\t    }\n\t}\n\telse if(ix<0x40200000) { \t\t\t/* x < 8.0 */\n\t    i = (int)x;\n\t    t = zero;\n\t    y = x-(double)i;\n\t    p = y*(s0+y*(s1+y*(s2+y*(s3+y*(s4+y*(s5+y*s6))))));\n\t    q = one+y*(r1+y*(r2+y*(r3+y*(r4+y*(r5+y*r6)))));\n\t    r = half*y+p/q;\n\t    z = one;\t/* lgamma(1+s) = log(s) + lgamma(s) */\n\t    switch(i) {\n\t    case 7: z *= (y+6.0);\t/* FALLTHRU */\n\t    case 6: z *= (y+5.0);\t/* FALLTHRU */\n\t    case 5: z *= (y+4.0);\t/* FALLTHRU */\n\t    case 4: z *= (y+3.0);\t/* FALLTHRU */\n\t    case 3: z *= (y+2.0);\t/* FALLTHRU */\n\t\t    r += __ieee754_log(z); break;\n\t    }\n    /* 8.0 <= x < 2**58 */\n\t} else if (ix < 0x43900000) {\n\t    t = __ieee754_log(x);\n\t    z = one/x;\n\t    y = z*z;\n\t    w = w0+z*(w1+y*(w2+y*(w3+y*(w4+y*(w5+y*w6)))));\n\t    r = (x-half)*(t-one)+w;\n\t} else \n    /* 2**58 <= x <= inf */\n\t    r =  x*(__ieee754_log(x)-one);\n\tif(hx<0) r = nadj - r;\n\treturn r;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/e_log.c",
    "content": "\n/* @(#)e_log.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* __ieee754_log(x)\n * Return the logrithm of x\n *\n * Method :                  \n *   1. Argument Reduction: find k and f such that \n *\t\t\tx = 2^k * (1+f), \n *\t   where  sqrt(2)/2 < 1+f < sqrt(2) .\n *\n *   2. Approximation of log(1+f).\n *\tLet s = f/(2+f) ; based on log(1+f) = log(1+s) - log(1-s)\n *\t\t = 2s + 2/3 s**3 + 2/5 s**5 + .....,\n *\t     \t = 2s + s*R\n *      We use a special Reme algorithm on [0,0.1716] to generate \n * \ta polynomial of degree 14 to approximate R The maximum error \n *\tof this polynomial approximation is bounded by 2**-58.45. In\n *\tother words,\n *\t\t        2      4      6      8      10      12      14\n *\t    R(z) ~ Lg1*s +Lg2*s +Lg3*s +Lg4*s +Lg5*s  +Lg6*s  +Lg7*s\n *  \t(the values of Lg1 to Lg7 are listed in the program)\n *\tand\n *\t    |      2          14          |     -58.45\n *\t    | Lg1*s +...+Lg7*s    -  R(z) | <= 2 \n *\t    |                             |\n *\tNote that 2s = f - s*f = f - hfsq + s*hfsq, where hfsq = f*f/2.\n *\tIn order to guarantee error in log below 1ulp, we compute log\n *\tby\n *\t\tlog(1+f) = f - s*(f - R)\t(if f is not too large)\n *\t\tlog(1+f) = f - (hfsq - s*(hfsq+R)).\t(better accuracy)\n *\t\n *\t3. Finally,  log(x) = k*ln2 + log(1+f).  \n *\t\t\t    = k*ln2_hi+(f-(hfsq-(s*(hfsq+R)+k*ln2_lo)))\n *\t   Here ln2 is split into two floating point number: \n *\t\t\tln2_hi + ln2_lo,\n *\t   where n*ln2_hi is always exact for |n| < 2000.\n *\n * Special cases:\n *\tlog(x) is NaN with signal if x < 0 (including -INF) ; \n *\tlog(+INF) is +INF; log(0) is -INF with signal;\n *\tlog(NaN) is that NaN with no signal.\n *\n * Accuracy:\n *\taccording to an error analysis, the error is always less than\n *\t1 ulp (unit in the last place).\n *\n * Constants:\n * The hexadecimal values are the intended ones for the following \n * constants. The decimal values may be used, provided that the \n * compiler will convert from decimal to binary accurately enough \n * to produce the hexadecimal values shown.\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic const double\n#else\nstatic double\n#endif\nln2_hi  =  6.93147180369123816490e-01,\t/* 3fe62e42 fee00000 */\nln2_lo  =  1.90821492927058770002e-10,\t/* 3dea39ef 35793c76 */\ntwo54   =  1.80143985094819840000e+16,  /* 43500000 00000000 */\nLg1 = 6.666666666666735130e-01,  /* 3FE55555 55555593 */\nLg2 = 3.999999999940941908e-01,  /* 3FD99999 9997FA04 */\nLg3 = 2.857142874366239149e-01,  /* 3FD24924 94229359 */\nLg4 = 2.222219843214978396e-01,  /* 3FCC71C5 1D8E78AF */\nLg5 = 1.818357216161805012e-01,  /* 3FC74664 96CB03DE */\nLg6 = 1.531383769920937332e-01,  /* 3FC39A09 D078C69F */\nLg7 = 1.479819860511658591e-01;  /* 3FC2F112 DF3E5244 */\n\nstatic double zero   =  0.0;\n\n#ifdef __STDC__\n\tdouble __ieee754_log(double x)\n#else\n\tdouble __ieee754_log(x)\n\tdouble x;\n#endif\n{\n\tdouble hfsq,f,s,z,R,w,t1,t2,dk;\n\tint k,hx,i,j;\n\tunsigned lx;\n\n\thx = __HI(x);\t\t/* high word of x */\n\tlx = __LO(x);\t\t/* low  word of x */\n\n\tk=0;\n\tif (hx < 0x00100000) {\t\t\t/* x < 2**-1022  */\n\t    if (((hx&0x7fffffff)|lx)==0) \n\t\treturn -two54/zero;\t\t/* log(+-0)=-inf */\n\t    if (hx<0) return (x-x)/zero;\t/* log(-#) = NaN */\n\t    k -= 54; x *= two54; /* subnormal number, scale up x */\n\t    hx = __HI(x);\t\t/* high word of x */\n\t} \n\tif (hx >= 0x7ff00000) return x+x;\n\tk += (hx>>20)-1023;\n\thx &= 0x000fffff;\n\ti = (hx+0x95f64)&0x100000;\n\t__HI(x) = hx|(i^0x3ff00000);\t/* normalize x or x/2 */\n\tk += (i>>20);\n\tf = x-1.0;\n\tif((0x000fffff&(2+hx))<3) {\t/* |f| < 2**-20 */\n\t    if(f==zero) if(k==0) return zero;  else {dk=(double)k;\n\t\t\t\t return dk*ln2_hi+dk*ln2_lo;}\n\t    R = f*f*(0.5-0.33333333333333333*f);\n\t    if(k==0) return f-R; else {dk=(double)k;\n\t    \t     return dk*ln2_hi-((R-dk*ln2_lo)-f);}\n\t}\n \ts = f/(2.0+f); \n\tdk = (double)k;\n\tz = s*s;\n\ti = hx-0x6147a;\n\tw = z*z;\n\tj = 0x6b851-hx;\n\tt1= w*(Lg2+w*(Lg4+w*Lg6)); \n\tt2= z*(Lg1+w*(Lg3+w*(Lg5+w*Lg7))); \n\ti |= j;\n\tR = t2+t1;\n\tif(i>0) {\n\t    hfsq=0.5*f*f;\n\t    if(k==0) return f-(hfsq-s*(hfsq+R)); else\n\t\t     return dk*ln2_hi-((hfsq-(s*(hfsq+R)+dk*ln2_lo))-f);\n\t} else {\n\t    if(k==0) return f-s*(f-R); else\n\t\t     return dk*ln2_hi-((s*(f-R)-dk*ln2_lo)-f);\n\t}\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/e_log10.c",
    "content": "\n/* @(#)e_log10.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* __ieee754_log10(x)\n * Return the base 10 logarithm of x\n * \n * Method :\n *\tLet log10_2hi = leading 40 bits of log10(2) and\n *\t    log10_2lo = log10(2) - log10_2hi,\n *\t    ivln10   = 1/log(10) rounded.\n *\tThen\n *\t\tn = ilogb(x), \n *\t\tif(n<0)  n = n+1;\n *\t\tx = scalbn(x,-n);\n *\t\tlog10(x) := n*log10_2hi + (n*log10_2lo + ivln10*log(x))\n *\n * Note 1:\n *\tTo guarantee log10(10**n)=n, where 10**n is normal, the rounding \n *\tmode must set to Round-to-Nearest.\n * Note 2:\n *\t[1/log(10)] rounded to 53 bits has error  .198   ulps;\n *\tlog10 is monotonic at all binary break points.\n *\n * Special cases:\n *\tlog10(x) is NaN with signal if x < 0; \n *\tlog10(+INF) is +INF with no signal; log10(0) is -INF with signal;\n *\tlog10(NaN) is that NaN with no signal;\n *\tlog10(10**N) = N  for N=0,1,...,22.\n *\n * Constants:\n * The hexadecimal values are the intended ones for the following constants.\n * The decimal values may be used, provided that the compiler will convert\n * from decimal to binary accurately enough to produce the hexadecimal values\n * shown.\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic const double\n#else\nstatic double\n#endif\ntwo54      =  1.80143985094819840000e+16, /* 0x43500000, 0x00000000 */\nivln10     =  4.34294481903251816668e-01, /* 0x3FDBCB7B, 0x1526E50E */\nlog10_2hi  =  3.01029995663611771306e-01, /* 0x3FD34413, 0x509F6000 */\nlog10_2lo  =  3.69423907715893078616e-13; /* 0x3D59FEF3, 0x11F12B36 */\n\nstatic double zero   =  0.0;\n\n#ifdef __STDC__\n\tdouble __ieee754_log10(double x)\n#else\n\tdouble __ieee754_log10(x)\n\tdouble x;\n#endif\n{\n\tdouble y,z;\n\tint i,k,hx;\n\tunsigned lx;\n\n\thx = __HI(x);\t/* high word of x */\n\tlx = __LO(x);\t/* low word of x */\n\n        k=0;\n        if (hx < 0x00100000) {                  /* x < 2**-1022  */\n            if (((hx&0x7fffffff)|lx)==0)\n                return -two54/zero;             /* log(+-0)=-inf */\n            if (hx<0) return (x-x)/zero;        /* log(-#) = NaN */\n            k -= 54; x *= two54; /* subnormal number, scale up x */\n            hx = __HI(x);                /* high word of x */\n        }\n\tif (hx >= 0x7ff00000) return x+x;\n\tk += (hx>>20)-1023;\n\ti  = ((unsigned)k&0x80000000)>>31;\n        hx = (hx&0x000fffff)|((0x3ff-i)<<20);\n        y  = (double)(k+i);\n        __HI(x) = hx;\n\tz  = y*log10_2lo + ivln10*__ieee754_log(x);\n\treturn  z+y*log10_2hi;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/e_pow.c",
    "content": "\n#ifndef lint\nstatic  char sccsid[] = \"@(#)e_pow.c 1.5 04/04/22 SMI\"; \n#endif\n\n/*\n * ====================================================\n * Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.\n *\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* __ieee754_pow(x,y) return x**y\n *\n *\t\t      n\n * Method:  Let x =  2   * (1+f)\n *\t1. Compute and return log2(x) in two pieces:\n *\t\tlog2(x) = w1 + w2,\n *\t   where w1 has 53-24 = 29 bit trailing zeros.\n *\t2. Perform y*log2(x) = n+y' by simulating muti-precision \n *\t   arithmetic, where |y'|<=0.5.\n *\t3. Return x**y = 2**n*exp(y'*log2)\n *\n * Special cases:\n *\t1.  (anything) ** 0  is 1\n *\t2.  (anything) ** 1  is itself\n *\t3.  (anything) ** NAN is NAN\n *\t4.  NAN ** (anything except 0) is NAN\n *\t5.  +-(|x| > 1) **  +INF is +INF\n *\t6.  +-(|x| > 1) **  -INF is +0\n *\t7.  +-(|x| < 1) **  +INF is +0\n *\t8.  +-(|x| < 1) **  -INF is +INF\n *\t9.  +-1         ** +-INF is NAN\n *\t10. +0 ** (+anything except 0, NAN)               is +0\n *\t11. -0 ** (+anything except 0, NAN, odd integer)  is +0\n *\t12. +0 ** (-anything except 0, NAN)               is +INF\n *\t13. -0 ** (-anything except 0, NAN, odd integer)  is +INF\n *\t14. -0 ** (odd integer) = -( +0 ** (odd integer) )\n *\t15. +INF ** (+anything except 0,NAN) is +INF\n *\t16. +INF ** (-anything except 0,NAN) is +0\n *\t17. -INF ** (anything)  = -0 ** (-anything)\n *\t18. (-anything) ** (integer) is (-1)**(integer)*(+anything**integer)\n *\t19. (-anything except 0 and inf) ** (non-integer) is NAN\n *\n * Accuracy:\n *\tpow(x,y) returns x**y nearly rounded. In particular\n *\t\t\tpow(integer,integer)\n *\talways returns the correct integer provided it is \n *\trepresentable.\n *\n * Constants :\n * The hexadecimal values are the intended ones for the following \n * constants. The decimal values may be used, provided that the \n * compiler will convert from decimal to binary accurately enough \n * to produce the hexadecimal values shown.\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic const double \n#else\nstatic double \n#endif\nbp[] = {1.0, 1.5,},\ndp_h[] = { 0.0, 5.84962487220764160156e-01,}, /* 0x3FE2B803, 0x40000000 */\ndp_l[] = { 0.0, 1.35003920212974897128e-08,}, /* 0x3E4CFDEB, 0x43CFD006 */\nzero    =  0.0,\none\t=  1.0,\ntwo\t=  2.0,\ntwo53\t=  9007199254740992.0,\t/* 0x43400000, 0x00000000 */\nhuge\t=  1.0e300,\ntiny    =  1.0e-300,\n\t/* poly coefs for (3/2)*(log(x)-2s-2/3*s**3 */\nL1  =  5.99999999999994648725e-01, /* 0x3FE33333, 0x33333303 */\nL2  =  4.28571428578550184252e-01, /* 0x3FDB6DB6, 0xDB6FABFF */\nL3  =  3.33333329818377432918e-01, /* 0x3FD55555, 0x518F264D */\nL4  =  2.72728123808534006489e-01, /* 0x3FD17460, 0xA91D4101 */\nL5  =  2.30660745775561754067e-01, /* 0x3FCD864A, 0x93C9DB65 */\nL6  =  2.06975017800338417784e-01, /* 0x3FCA7E28, 0x4A454EEF */\nP1   =  1.66666666666666019037e-01, /* 0x3FC55555, 0x5555553E */\nP2   = -2.77777777770155933842e-03, /* 0xBF66C16C, 0x16BEBD93 */\nP3   =  6.61375632143793436117e-05, /* 0x3F11566A, 0xAF25DE2C */\nP4   = -1.65339022054652515390e-06, /* 0xBEBBBD41, 0xC5D26BF1 */\nP5   =  4.13813679705723846039e-08, /* 0x3E663769, 0x72BEA4D0 */\nlg2  =  6.93147180559945286227e-01, /* 0x3FE62E42, 0xFEFA39EF */\nlg2_h  =  6.93147182464599609375e-01, /* 0x3FE62E43, 0x00000000 */\nlg2_l  = -1.90465429995776804525e-09, /* 0xBE205C61, 0x0CA86C39 */\novt =  8.0085662595372944372e-0017, /* -(1024-log2(ovfl+.5ulp)) */\ncp    =  9.61796693925975554329e-01, /* 0x3FEEC709, 0xDC3A03FD =2/(3ln2) */\ncp_h  =  9.61796700954437255859e-01, /* 0x3FEEC709, 0xE0000000 =(float)cp */\ncp_l  = -7.02846165095275826516e-09, /* 0xBE3E2FE0, 0x145B01F5 =tail of cp_h*/\nivln2    =  1.44269504088896338700e+00, /* 0x3FF71547, 0x652B82FE =1/ln2 */\nivln2_h  =  1.44269502162933349609e+00, /* 0x3FF71547, 0x60000000 =24b 1/ln2*/\nivln2_l  =  1.92596299112661746887e-08; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 tail*/\n\n#ifdef __STDC__\n\tdouble __ieee754_pow(double x, double y)\n#else\n\tdouble __ieee754_pow(x,y)\n\tdouble x, y;\n#endif\n{\n\tdouble z,ax,z_h,z_l,p_h,p_l;\n\tdouble y1,t1,t2,r,s,t,u,v,w;\n\tint i0,i1,i,j,k,yisint,n;\n\tint hx,hy,ix,iy;\n\tunsigned lx,ly;\n\n\ti0 = ((*(int*)&one)>>29)^1; i1=1-i0;\n\thx = __HI(x); lx = __LO(x);\n\thy = __HI(y); ly = __LO(y);\n\tix = hx&0x7fffffff;  iy = hy&0x7fffffff;\n\n    /* y==zero: x**0 = 1 */\n\tif((iy|ly)==0) return one; \t\n\n    /* +-NaN return x+y */\n\tif(ix > 0x7ff00000 || ((ix==0x7ff00000)&&(lx!=0)) ||\n\t   iy > 0x7ff00000 || ((iy==0x7ff00000)&&(ly!=0))) \n\t\treturn x+y;\t\n\n    /* determine if y is an odd int when x < 0\n     * yisint = 0\t... y is not an integer\n     * yisint = 1\t... y is an odd int\n     * yisint = 2\t... y is an even int\n     */\n\tyisint  = 0;\n\tif(hx<0) {\t\n\t    if(iy>=0x43400000) yisint = 2; /* even integer y */\n\t    else if(iy>=0x3ff00000) {\n\t\tk = (iy>>20)-0x3ff;\t   /* exponent */\n\t\tif(k>20) {\n\t\t    j = ly>>(52-k);\n\t\t    if((j<<(52-k))==ly) yisint = 2-(j&1);\n\t\t} else if(ly==0) {\n\t\t    j = iy>>(20-k);\n\t\t    if((j<<(20-k))==iy) yisint = 2-(j&1);\n\t\t}\n\t    }\t\t\n\t} \n\n    /* special value of y */\n\tif(ly==0) { \t\n\t    if (iy==0x7ff00000) {\t/* y is +-inf */\n\t        if(((ix-0x3ff00000)|lx)==0)\n\t\t    return  y - y;\t/* inf**+-1 is NaN */\n\t        else if (ix >= 0x3ff00000)/* (|x|>1)**+-inf = inf,0 */\n\t\t    return (hy>=0)? y: zero;\n\t        else\t\t\t/* (|x|<1)**-,+inf = inf,0 */\n\t\t    return (hy<0)?-y: zero;\n\t    } \n\t    if(iy==0x3ff00000) {\t/* y is  +-1 */\n\t\tif(hy<0) return one/x; else return x;\n\t    }\n\t    if(hy==0x40000000) return x*x; /* y is  2 */\n\t    if(hy==0x3fe00000) {\t/* y is  0.5 */\n\t\tif(hx>=0)\t/* x >= +0 */\n\t\treturn sqrt(x);\t\n\t    }\n\t}\n\n\tax   = fabs(x);\n    /* special value of x */\n\tif(lx==0) {\n\t    if(ix==0x7ff00000||ix==0||ix==0x3ff00000){\n\t\tz = ax;\t\t\t/*x is +-0,+-inf,+-1*/\n\t\tif(hy<0) z = one/z;\t/* z = (1/|x|) */\n\t\tif(hx<0) {\n\t\t    if(((ix-0x3ff00000)|yisint)==0) {\n\t\t\tz = (z-z)/(z-z); /* (-1)**non-int is NaN */\n\t\t    } else if(yisint==1) \n\t\t\tz = -z;\t\t/* (x<0)**odd = -(|x|**odd) */\n\t\t}\n\t\treturn z;\n\t    }\n\t}\n    \n\tn = (hx>>31)+1;\n\n    /* (x<0)**(non-int) is NaN */\n\tif((n|yisint)==0) return (x-x)/(x-x);\n\n\ts = one; /* s (sign of result -ve**odd) = -1 else = 1 */\n\tif((n|(yisint-1))==0) s = -one;/* (-ve)**(odd int) */\n\n    /* |y| is huge */\n\tif(iy>0x41e00000) { /* if |y| > 2**31 */\n\t    if(iy>0x43f00000){\t/* if |y| > 2**64, must o/uflow */\n\t\tif(ix<=0x3fefffff) return (hy<0)? huge*huge:tiny*tiny;\n\t\tif(ix>=0x3ff00000) return (hy>0)? huge*huge:tiny*tiny;\n\t    }\n\t/* over/underflow if x is not close to one */\n\t    if(ix<0x3fefffff) return (hy<0)? s*huge*huge:s*tiny*tiny;\n\t    if(ix>0x3ff00000) return (hy>0)? s*huge*huge:s*tiny*tiny;\n\t/* now |1-x| is tiny <= 2**-20, suffice to compute \n\t   log(x) by x-x^2/2+x^3/3-x^4/4 */\n\t    t = ax-one;\t\t/* t has 20 trailing zeros */\n\t    w = (t*t)*(0.5-t*(0.3333333333333333333333-t*0.25));\n\t    u = ivln2_h*t;\t/* ivln2_h has 21 sig. bits */\n\t    v = t*ivln2_l-w*ivln2;\n\t    t1 = u+v;\n\t    __LO(t1) = 0;\n\t    t2 = v-(t1-u);\n\t} else {\n\t    double ss,s2,s_h,s_l,t_h,t_l;\n\t    n = 0;\n\t/* take care subnormal number */\n\t    if(ix<0x00100000)\n\t\t{ax *= two53; n -= 53; ix = __HI(ax); }\n\t    n  += ((ix)>>20)-0x3ff;\n\t    j  = ix&0x000fffff;\n\t/* determine interval */\n\t    ix = j|0x3ff00000;\t\t/* normalize ix */\n\t    if(j<=0x3988E) k=0;\t\t/* |x|<sqrt(3/2) */\n\t    else if(j<0xBB67A) k=1;\t/* |x|<sqrt(3)   */\n\t    else {k=0;n+=1;ix -= 0x00100000;}\n\t    __HI(ax) = ix;\n\n\t/* compute ss = s_h+s_l = (x-1)/(x+1) or (x-1.5)/(x+1.5) */\n\t    u = ax-bp[k];\t\t/* bp[0]=1.0, bp[1]=1.5 */\n\t    v = one/(ax+bp[k]);\n\t    ss = u*v;\n\t    s_h = ss;\n\t    __LO(s_h) = 0;\n\t/* t_h=ax+bp[k] High */\n\t    t_h = zero;\n\t    __HI(t_h)=((ix>>1)|0x20000000)+0x00080000+(k<<18); \n\t    t_l = ax - (t_h-bp[k]);\n\t    s_l = v*((u-s_h*t_h)-s_h*t_l);\n\t/* compute log(ax) */\n\t    s2 = ss*ss;\n\t    r = s2*s2*(L1+s2*(L2+s2*(L3+s2*(L4+s2*(L5+s2*L6)))));\n\t    r += s_l*(s_h+ss);\n\t    s2  = s_h*s_h;\n\t    t_h = 3.0+s2+r;\n\t    __LO(t_h) = 0;\n\t    t_l = r-((t_h-3.0)-s2);\n\t/* u+v = ss*(1+...) */\n\t    u = s_h*t_h;\n\t    v = s_l*t_h+t_l*ss;\n\t/* 2/(3log2)*(ss+...) */\n\t    p_h = u+v;\n\t    __LO(p_h) = 0;\n\t    p_l = v-(p_h-u);\n\t    z_h = cp_h*p_h;\t\t/* cp_h+cp_l = 2/(3*log2) */\n\t    z_l = cp_l*p_h+p_l*cp+dp_l[k];\n\t/* log2(ax) = (ss+..)*2/(3*log2) = n + dp_h + z_h + z_l */\n\t    t = (double)n;\n\t    t1 = (((z_h+z_l)+dp_h[k])+t);\n\t    __LO(t1) = 0;\n\t    t2 = z_l-(((t1-t)-dp_h[k])-z_h);\n\t}\n\n    /* split up y into y1+y2 and compute (y1+y2)*(t1+t2) */\n\ty1  = y;\n\t__LO(y1) = 0;\n\tp_l = (y-y1)*t1+y*t2;\n\tp_h = y1*t1;\n\tz = p_l+p_h;\n\tj = __HI(z);\n\ti = __LO(z);\n\tif (j>=0x40900000) {\t\t\t\t/* z >= 1024 */\n\t    if(((j-0x40900000)|i)!=0)\t\t\t/* if z > 1024 */\n\t\treturn s*huge*huge;\t\t\t/* overflow */\n\t    else {\n\t\tif(p_l+ovt>z-p_h) return s*huge*huge;\t/* overflow */\n\t    }\n\t} else if((j&0x7fffffff)>=0x4090cc00 ) {\t/* z <= -1075 */\n\t    if(((j-0xc090cc00)|i)!=0) \t\t/* z < -1075 */\n\t\treturn s*tiny*tiny;\t\t/* underflow */\n\t    else {\n\t\tif(p_l<=z-p_h) return s*tiny*tiny;\t/* underflow */\n\t    }\n\t}\n    /*\n     * compute 2**(p_h+p_l)\n     */\n\ti = j&0x7fffffff;\n\tk = (i>>20)-0x3ff;\n\tn = 0;\n\tif(i>0x3fe00000) {\t\t/* if |z| > 0.5, set n = [z+0.5] */\n\t    n = j+(0x00100000>>(k+1));\n\t    k = ((n&0x7fffffff)>>20)-0x3ff;\t/* new k for n */\n\t    t = zero;\n\t    __HI(t) = (n&~(0x000fffff>>k));\n\t    n = ((n&0x000fffff)|0x00100000)>>(20-k);\n\t    if(j<0) n = -n;\n\t    p_h -= t;\n\t} \n\tt = p_l+p_h;\n\t__LO(t) = 0;\n\tu = t*lg2_h;\n\tv = (p_l-(t-p_h))*lg2+t*lg2_l;\n\tz = u+v;\n\tw = v-(z-u);\n\tt  = z*z;\n\tt1  = z - t*(P1+t*(P2+t*(P3+t*(P4+t*P5))));\n\tr  = (z*t1)/(t1-two)-(w+z*w);\n\tz  = one-(r-z);\n\tj  = __HI(z);\n\tj += (n<<20);\n\tif((j>>20)<=0) z = scalbn(z,n);\t/* subnormal output */\n\telse __HI(z) += (n<<20);\n\treturn s*z;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/e_rem_pio2.c",
    "content": "\n/* @(#)e_rem_pio2.c 1.4 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n *\n */\n\n/* __ieee754_rem_pio2(x,y)\n * \n * return the remainder of x rem pi/2 in y[0]+y[1] \n * use __kernel_rem_pio2()\n */\n\n#include \"fdlibm.h\"\n\n/*\n * Table of constants for 2/pi, 396 Hex digits (476 decimal) of 2/pi \n */\n#ifdef __STDC__\nstatic const int two_over_pi[] = {\n#else\nstatic int two_over_pi[] = {\n#endif\n0xA2F983, 0x6E4E44, 0x1529FC, 0x2757D1, 0xF534DD, 0xC0DB62, \n0x95993C, 0x439041, 0xFE5163, 0xABDEBB, 0xC561B7, 0x246E3A, \n0x424DD2, 0xE00649, 0x2EEA09, 0xD1921C, 0xFE1DEB, 0x1CB129, \n0xA73EE8, 0x8235F5, 0x2EBB44, 0x84E99C, 0x7026B4, 0x5F7E41, \n0x3991D6, 0x398353, 0x39F49C, 0x845F8B, 0xBDF928, 0x3B1FF8, \n0x97FFDE, 0x05980F, 0xEF2F11, 0x8B5A0A, 0x6D1F6D, 0x367ECF, \n0x27CB09, 0xB74F46, 0x3F669E, 0x5FEA2D, 0x7527BA, 0xC7EBE5, \n0xF17B3D, 0x0739F7, 0x8A5292, 0xEA6BFB, 0x5FB11F, 0x8D5D08, \n0x560330, 0x46FC7B, 0x6BABF0, 0xCFBC20, 0x9AF436, 0x1DA9E3, \n0x91615E, 0xE61B08, 0x659985, 0x5F14A0, 0x68408D, 0xFFD880, \n0x4D7327, 0x310606, 0x1556CA, 0x73A8C9, 0x60E27B, 0xC08C6B, \n};\n\n#ifdef __STDC__\nstatic const int npio2_hw[] = {\n#else\nstatic int npio2_hw[] = {\n#endif\n0x3FF921FB, 0x400921FB, 0x4012D97C, 0x401921FB, 0x401F6A7A, 0x4022D97C,\n0x4025FDBB, 0x402921FB, 0x402C463A, 0x402F6A7A, 0x4031475C, 0x4032D97C,\n0x40346B9C, 0x4035FDBB, 0x40378FDB, 0x403921FB, 0x403AB41B, 0x403C463A,\n0x403DD85A, 0x403F6A7A, 0x40407E4C, 0x4041475C, 0x4042106C, 0x4042D97C,\n0x4043A28C, 0x40446B9C, 0x404534AC, 0x4045FDBB, 0x4046C6CB, 0x40478FDB,\n0x404858EB, 0x404921FB,\n};\n\n/*\n * invpio2:  53 bits of 2/pi\n * pio2_1:   first  33 bit of pi/2\n * pio2_1t:  pi/2 - pio2_1\n * pio2_2:   second 33 bit of pi/2\n * pio2_2t:  pi/2 - (pio2_1+pio2_2)\n * pio2_3:   third  33 bit of pi/2\n * pio2_3t:  pi/2 - (pio2_1+pio2_2+pio2_3)\n */\n\n#ifdef __STDC__\nstatic const double \n#else\nstatic double \n#endif\nzero =  0.00000000000000000000e+00, /* 0x00000000, 0x00000000 */\nhalf =  5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */\ntwo24 =  1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */\ninvpio2 =  6.36619772367581382433e-01, /* 0x3FE45F30, 0x6DC9C883 */\npio2_1  =  1.57079632673412561417e+00, /* 0x3FF921FB, 0x54400000 */\npio2_1t =  6.07710050650619224932e-11, /* 0x3DD0B461, 0x1A626331 */\npio2_2  =  6.07710050630396597660e-11, /* 0x3DD0B461, 0x1A600000 */\npio2_2t =  2.02226624879595063154e-21, /* 0x3BA3198A, 0x2E037073 */\npio2_3  =  2.02226624871116645580e-21, /* 0x3BA3198A, 0x2E000000 */\npio2_3t =  8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */\n\n#ifdef __STDC__\n\tint __ieee754_rem_pio2(double x, double *y)\n#else\n\tint __ieee754_rem_pio2(x,y)\n\tdouble x,y[];\n#endif\n{\n\tdouble z,w,t,r,fn;\n\tdouble tx[3];\n\tint e0,i,j,nx,n,ix,hx;\n\n\thx = __HI(x);\t\t/* high word of x */\n\tix = hx&0x7fffffff;\n\tif(ix<=0x3fe921fb)   /* |x| ~<= pi/4 , no need for reduction */\n\t    {y[0] = x; y[1] = 0; return 0;}\n\tif(ix<0x4002d97c) {  /* |x| < 3pi/4, special case with n=+-1 */\n\t    if(hx>0) { \n\t\tz = x - pio2_1;\n\t\tif(ix!=0x3ff921fb) { \t/* 33+53 bit pi is good enough */\n\t\t    y[0] = z - pio2_1t;\n\t\t    y[1] = (z-y[0])-pio2_1t;\n\t\t} else {\t\t/* near pi/2, use 33+33+53 bit pi */\n\t\t    z -= pio2_2;\n\t\t    y[0] = z - pio2_2t;\n\t\t    y[1] = (z-y[0])-pio2_2t;\n\t\t}\n\t\treturn 1;\n\t    } else {\t/* negative x */\n\t\tz = x + pio2_1;\n\t\tif(ix!=0x3ff921fb) { \t/* 33+53 bit pi is good enough */\n\t\t    y[0] = z + pio2_1t;\n\t\t    y[1] = (z-y[0])+pio2_1t;\n\t\t} else {\t\t/* near pi/2, use 33+33+53 bit pi */\n\t\t    z += pio2_2;\n\t\t    y[0] = z + pio2_2t;\n\t\t    y[1] = (z-y[0])+pio2_2t;\n\t\t}\n\t\treturn -1;\n\t    }\n\t}\n\tif(ix<=0x413921fb) { /* |x| ~<= 2^19*(pi/2), medium size */\n\t    t  = fabs(x);\n\t    n  = (int) (t*invpio2+half);\n\t    fn = (double)n;\n\t    r  = t-fn*pio2_1;\n\t    w  = fn*pio2_1t;\t/* 1st round good to 85 bit */\n\t    if(n<32&&ix!=npio2_hw[n-1]) {\t\n\t\ty[0] = r-w;\t/* quick check no cancellation */\n\t    } else {\n\t        j  = ix>>20;\n\t        y[0] = r-w; \n\t        i = j-(((__HI(y[0]))>>20)&0x7ff);\n\t        if(i>16) {  /* 2nd iteration needed, good to 118 */\n\t\t    t  = r;\n\t\t    w  = fn*pio2_2;\t\n\t\t    r  = t-w;\n\t\t    w  = fn*pio2_2t-((t-r)-w);\t\n\t\t    y[0] = r-w;\n\t\t    i = j-(((__HI(y[0]))>>20)&0x7ff);\n\t\t    if(i>49)  {\t/* 3rd iteration need, 151 bits acc */\n\t\t    \tt  = r;\t/* will cover all possible cases */\n\t\t    \tw  = fn*pio2_3;\t\n\t\t    \tr  = t-w;\n\t\t    \tw  = fn*pio2_3t-((t-r)-w);\t\n\t\t    \ty[0] = r-w;\n\t\t    }\n\t\t}\n\t    }\n\t    y[1] = (r-y[0])-w;\n\t    if(hx<0) \t{y[0] = -y[0]; y[1] = -y[1]; return -n;}\n\t    else\t return n;\n\t}\n    /* \n     * all other (large) arguments\n     */\n\tif(ix>=0x7ff00000) {\t\t/* x is inf or NaN */\n\t    y[0]=y[1]=x-x; return 0;\n\t}\n    /* set z = scalbn(|x|,ilogb(x)-23) */\n\t__LO(z) = __LO(x);\n\te0 \t= (ix>>20)-1046;\t/* e0 = ilogb(z)-23; */\n\t__HI(z) = ix - (e0<<20);\n\tfor(i=0;i<2;i++) {\n\t\ttx[i] = (double)((int)(z));\n\t\tz     = (z-tx[i])*two24;\n\t}\n\ttx[2] = z;\n\tnx = 3;\n\twhile(tx[nx-1]==zero) nx--;\t/* skip zero term */\n\tn  =  __kernel_rem_pio2(tx,y,e0,nx,2,two_over_pi);\n\tif(hx<0) {y[0] = -y[0]; y[1] = -y[1]; return -n;}\n\treturn n;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/e_remainder.c",
    "content": "\n/* @(#)e_remainder.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* __ieee754_remainder(x,p)\n * Return :                  \n * \treturns  x REM p  =  x - [x/p]*p as if in infinite \n * \tprecise arithmetic, where [x/p] is the (infinite bit) \n *\tinteger nearest x/p (in half way case choose the even one).\n * Method : \n *\tBased on fmod() return x-[x/p]chopped*p exactlp.\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic const double zero = 0.0;\n#else\nstatic double zero = 0.0;\n#endif\n\n\n#ifdef __STDC__\n\tdouble __ieee754_remainder(double x, double p)\n#else\n\tdouble __ieee754_remainder(x,p)\n\tdouble x,p;\n#endif\n{\n\tint hx,hp;\n\tunsigned sx,lx,lp;\n\tdouble p_half;\n\n\thx = __HI(x);\t\t/* high word of x */\n\tlx = __LO(x);\t\t/* low  word of x */\n\thp = __HI(p);\t\t/* high word of p */\n\tlp = __LO(p);\t\t/* low  word of p */\n\tsx = hx&0x80000000;\n\thp &= 0x7fffffff;\n\thx &= 0x7fffffff;\n\n    /* purge off exception values */\n\tif((hp|lp)==0) return (x*p)/(x*p); \t/* p = 0 */\n\tif((hx>=0x7ff00000)||\t\t\t/* x not finite */\n\t  ((hp>=0x7ff00000)&&\t\t\t/* p is NaN */\n\t  (((hp-0x7ff00000)|lp)!=0)))\n\t    return (x*p)/(x*p);\n\n\n\tif (hp<=0x7fdfffff) x = __ieee754_fmod(x,p+p);\t/* now x < 2p */\n\tif (((hx-hp)|(lx-lp))==0) return zero*x;\n\tx  = fabs(x);\n\tp  = fabs(p);\n\tif (hp<0x00200000) {\n\t    if(x+x>p) {\n\t\tx-=p;\n\t\tif(x+x>=p) x -= p;\n\t    }\n\t} else {\n\t    p_half = 0.5*p;\n\t    if(x>p_half) {\n\t\tx-=p;\n\t\tif(x>=p_half) x -= p;\n\t    }\n\t}\n\t__HI(x) ^= sx;\n\treturn x;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/e_scalb.c",
    "content": "\n/* @(#)e_scalb.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/*\n * __ieee754_scalb(x, fn) is provide for\n * passing various standard test suite. One \n * should use scalbn() instead.\n */\n\n#include \"fdlibm.h\"\n\n#ifdef _SCALB_INT\n#ifdef __STDC__\n\tdouble __ieee754_scalb(double x, int fn)\n#else\n\tdouble __ieee754_scalb(x,fn)\n\tdouble x; int fn;\n#endif\n#else\n#ifdef __STDC__\n\tdouble __ieee754_scalb(double x, double fn)\n#else\n\tdouble __ieee754_scalb(x,fn)\n\tdouble x, fn;\n#endif\n#endif\n{\n#ifdef _SCALB_INT\n\treturn scalbn(x,fn);\n#else\n\tif (isnan(x)||isnan(fn)) return x*fn;\n\tif (!finite(fn)) {\n\t    if(fn>0.0) return x*fn;\n\t    else       return x/(-fn);\n\t}\n\tif (rint(fn)!=fn) return (fn-fn)/(fn-fn);\n\tif ( fn > 65000.0) return scalbn(x, 65000);\n\tif (-fn > 65000.0) return scalbn(x,-65000);\n\treturn scalbn(x,(int)fn);\n#endif\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/e_sinh.c",
    "content": "\n/* @(#)e_sinh.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* __ieee754_sinh(x)\n * Method : \n * mathematically sinh(x) if defined to be (exp(x)-exp(-x))/2\n *\t1. Replace x by |x| (sinh(-x) = -sinh(x)). \n *\t2. \n *\t\t                                    E + E/(E+1)\n *\t    0        <= x <= 22     :  sinh(x) := --------------, E=expm1(x)\n *\t\t\t       \t\t\t        2\n *\n *\t    22       <= x <= lnovft :  sinh(x) := exp(x)/2 \n *\t    lnovft   <= x <= ln2ovft:  sinh(x) := exp(x/2)/2 * exp(x/2)\n *\t    ln2ovft  <  x\t    :  sinh(x) := x*shuge (overflow)\n *\n * Special cases:\n *\tsinh(x) is |x| if x is +INF, -INF, or NaN.\n *\tonly sinh(0)=0 is exact for finite x.\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic const double one = 1.0, shuge = 1.0e307;\n#else\nstatic double one = 1.0, shuge = 1.0e307;\n#endif\n\n#ifdef __STDC__\n\tdouble __ieee754_sinh(double x)\n#else\n\tdouble __ieee754_sinh(x)\n\tdouble x;\n#endif\n{\t\n\tdouble t,w,h;\n\tint ix,jx;\n\tunsigned lx;\n\n    /* High word of |x|. */\n\tjx = __HI(x);\n\tix = jx&0x7fffffff;\n\n    /* x is INF or NaN */\n\tif(ix>=0x7ff00000) return x+x;\t\n\n\th = 0.5;\n\tif (jx<0) h = -h;\n    /* |x| in [0,22], return sign(x)*0.5*(E+E/(E+1))) */\n\tif (ix < 0x40360000) {\t\t/* |x|<22 */\n\t    if (ix<0x3e300000) \t\t/* |x|<2**-28 */\n\t\tif(shuge+x>one) return x;/* sinh(tiny) = tiny with inexact */\n\t    t = expm1(fabs(x));\n\t    if(ix<0x3ff00000) return h*(2.0*t-t*t/(t+one));\n\t    return h*(t+t/(t+one));\n\t}\n\n    /* |x| in [22, log(maxdouble)] return 0.5*exp(|x|) */\n\tif (ix < 0x40862E42)  return h*__ieee754_exp(fabs(x));\n\n    /* |x| in [log(maxdouble), overflowthresold] */\n\tlx = *( (((*(unsigned*)&one)>>29)) + (unsigned*)&x);\n\tif (ix<0x408633CE || (ix==0x408633ce)&&(lx<=(unsigned)0x8fb9f87d)) {\n\t    w = __ieee754_exp(0.5*fabs(x));\n\t    t = h*w;\n\t    return t*w;\n\t}\n\n    /* |x| > overflowthresold, sinh(x) overflow */\n\treturn x*shuge;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/e_sqrt.c",
    "content": "/* @(#)e_sqrt.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* __ieee754_sqrt(x)\n * Return correctly rounded sqrt.\n *           ------------------------------------------\n *\t     |  Use the hardware sqrt if you have one |\n *           ------------------------------------------\n * Method: \n *   Bit by bit method using integer arithmetic. (Slow, but portable) \n *   1. Normalization\n *\tScale x to y in [1,4) with even powers of 2: \n *\tfind an integer k such that  1 <= (y=x*2^(2k)) < 4, then\n *\t\tsqrt(x) = 2^k * sqrt(y)\n *   2. Bit by bit computation\n *\tLet q  = sqrt(y) truncated to i bit after binary point (q = 1),\n *\t     i\t\t\t\t\t\t\t 0\n *                                     i+1         2\n *\t    s  = 2*q , and\ty  =  2   * ( y - q  ).\t\t(1)\n *\t     i      i            i                 i\n *                                                        \n *\tTo compute q    from q , one checks whether \n *\t\t    i+1       i                       \n *\n *\t\t\t      -(i+1) 2\n *\t\t\t(q + 2      ) <= y.\t\t\t(2)\n *     \t\t\t  i\n *\t\t\t\t\t\t\t      -(i+1)\n *\tIf (2) is false, then q   = q ; otherwise q   = q  + 2      .\n *\t\t \t       i+1   i             i+1   i\n *\n *\tWith some algebric manipulation, it is not difficult to see\n *\tthat (2) is equivalent to \n *                             -(i+1)\n *\t\t\ts  +  2       <= y\t\t\t(3)\n *\t\t\t i                i\n *\n *\tThe advantage of (3) is that s  and y  can be computed by \n *\t\t\t\t      i      i\n *\tthe following recurrence formula:\n *\t    if (3) is false\n *\n *\t    s     =  s  ,\ty    = y   ;\t\t\t(4)\n *\t     i+1      i\t\t i+1    i\n *\n *\t    otherwise,\n *                         -i                     -(i+1)\n *\t    s\t  =  s  + 2  ,  y    = y  -  s  - 2  \t\t(5)\n *           i+1      i          i+1    i     i\n *\t\t\t\t\n *\tOne may easily use induction to prove (4) and (5). \n *\tNote. Since the left hand side of (3) contain only i+2 bits,\n *\t      it does not necessary to do a full (53-bit) comparison \n *\t      in (3).\n *   3. Final rounding\n *\tAfter generating the 53 bits result, we compute one more bit.\n *\tTogether with the remainder, we can decide whether the\n *\tresult is exact, bigger than 1/2ulp, or less than 1/2ulp\n *\t(it will never equal to 1/2ulp).\n *\tThe rounding mode can be detected by checking whether\n *\thuge + tiny is equal to huge, and whether huge - tiny is\n *\tequal to huge for some floating point number \"huge\" and \"tiny\".\n *\t\t\n * Special cases:\n *\tsqrt(+-0) = +-0 \t... exact\n *\tsqrt(inf) = inf\n *\tsqrt(-ve) = NaN\t\t... with invalid signal\n *\tsqrt(NaN) = NaN\t\t... with invalid signal for signaling NaN\n *\n * Other methods : see the appended file at the end of the program below.\n *---------------\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic\tconst double\tone\t= 1.0, tiny=1.0e-300;\n#else\nstatic\tdouble\tone\t= 1.0, tiny=1.0e-300;\n#endif\n\n#ifdef __STDC__\n\tdouble __ieee754_sqrt(double x)\n#else\n\tdouble __ieee754_sqrt(x)\n\tdouble x;\n#endif\n{\n\tdouble z;\n\tint \tsign = (int)0x80000000; \n\tunsigned r,t1,s1,ix1,q1;\n\tint ix0,s0,q,m,t,i;\n\n\tix0 = __HI(x);\t\t\t/* high word of x */\n\tix1 = __LO(x);\t\t/* low word of x */\n\n    /* take care of Inf and NaN */\n\tif((ix0&0x7ff00000)==0x7ff00000) {\t\t\t\n\t    return x*x+x;\t\t/* sqrt(NaN)=NaN, sqrt(+inf)=+inf\n\t\t\t\t\t   sqrt(-inf)=sNaN */\n\t} \n    /* take care of zero */\n\tif(ix0<=0) {\n\t    if(((ix0&(~sign))|ix1)==0) return x;/* sqrt(+-0) = +-0 */\n\t    else if(ix0<0)\n\t\treturn (x-x)/(x-x);\t\t/* sqrt(-ve) = sNaN */\n\t}\n    /* normalize x */\n\tm = (ix0>>20);\n\tif(m==0) {\t\t\t\t/* subnormal x */\n\t    while(ix0==0) {\n\t\tm -= 21;\n\t\tix0 |= (ix1>>11); ix1 <<= 21;\n\t    }\n\t    for(i=0;(ix0&0x00100000)==0;i++) ix0<<=1;\n\t    m -= i-1;\n\t    ix0 |= (ix1>>(32-i));\n\t    ix1 <<= i;\n\t}\n\tm -= 1023;\t/* unbias exponent */\n\tix0 = (ix0&0x000fffff)|0x00100000;\n\tif(m&1){\t/* odd m, double x to make it even */\n\t    ix0 += ix0 + ((ix1&sign)>>31);\n\t    ix1 += ix1;\n\t}\n\tm >>= 1;\t/* m = [m/2] */\n\n    /* generate sqrt(x) bit by bit */\n\tix0 += ix0 + ((ix1&sign)>>31);\n\tix1 += ix1;\n\tq = q1 = s0 = s1 = 0;\t/* [q,q1] = sqrt(x) */\n\tr = 0x00200000;\t\t/* r = moving bit from right to left */\n\n\twhile(r!=0) {\n\t    t = s0+r; \n\t    if(t<=ix0) { \n\t\ts0   = t+r; \n\t\tix0 -= t; \n\t\tq   += r; \n\t    } \n\t    ix0 += ix0 + ((ix1&sign)>>31);\n\t    ix1 += ix1;\n\t    r>>=1;\n\t}\n\n\tr = sign;\n\twhile(r!=0) {\n\t    t1 = s1+r; \n\t    t  = s0;\n\t    if((t<ix0)||((t==ix0)&&(t1<=ix1))) { \n\t\ts1  = t1+r;\n\t\tif(((t1&sign)==sign)&&(s1&sign)==0) s0 += 1;\n\t\tix0 -= t;\n\t\tif (ix1 < t1) ix0 -= 1;\n\t\tix1 -= t1;\n\t\tq1  += r;\n\t    }\n\t    ix0 += ix0 + ((ix1&sign)>>31);\n\t    ix1 += ix1;\n\t    r>>=1;\n\t}\n\n    /* use floating add to find out rounding direction */\n\tif((ix0|ix1)!=0) {\n\t    z = one-tiny; /* trigger inexact flag */\n\t    if (z>=one) {\n\t        z = one+tiny;\n\t        if (q1==(unsigned)0xffffffff) { q1=0; q += 1;}\n\t\telse if (z>one) {\n\t\t    if (q1==(unsigned)0xfffffffe) q+=1;\n\t\t    q1+=2; \n\t\t} else\n\t            q1 += (q1&1);\n\t    }\n\t}\n\tix0 = (q>>1)+0x3fe00000;\n\tix1 =  q1>>1;\n\tif ((q&1)==1) ix1 |= sign;\n\tix0 += (m <<20);\n\t__HI(z) = ix0;\n\t__LO(z) = ix1;\n\treturn z;\n}\n\n/*\nOther methods  (use floating-point arithmetic)\n-------------\n(This is a copy of a drafted paper by Prof W. Kahan \nand K.C. Ng, written in May, 1986)\n\n\tTwo algorithms are given here to implement sqrt(x) \n\t(IEEE double precision arithmetic) in software.\n\tBoth supply sqrt(x) correctly rounded. The first algorithm (in\n\tSection A) uses newton iterations and involves four divisions.\n\tThe second one uses reciproot iterations to avoid division, but\n\trequires more multiplications. Both algorithms need the ability\n\tto chop results of arithmetic operations instead of round them, \n\tand the INEXACT flag to indicate when an arithmetic operation\n\tis executed exactly with no roundoff error, all part of the \n\tstandard (IEEE 754-1985). The ability to perform shift, add,\n\tsubtract and logical AND operations upon 32-bit words is needed\n\ttoo, though not part of the standard.\n\nA.  sqrt(x) by Newton Iteration\n\n   (1)\tInitial approximation\n\n\tLet x0 and x1 be the leading and the trailing 32-bit words of\n\ta floating point number x (in IEEE double format) respectively \n\n\t    1    11\t\t     52\t\t\t\t  ...widths\n\t   ------------------------------------------------------\n\tx: |s|\t  e     |\t      f\t\t\t\t|\n\t   ------------------------------------------------------\n\t      msb    lsb  msb\t\t\t\t      lsb ...order\n\n \n\t     ------------------------  \t     ------------------------\n\tx0:  |s|   e    |    f1     |\t x1: |          f2           |\n\t     ------------------------  \t     ------------------------\n\n\tBy performing shifts and subtracts on x0 and x1 (both regarded\n\tas integers), we obtain an 8-bit approximation of sqrt(x) as\n\tfollows.\n\n\t\tk  := (x0>>1) + 0x1ff80000;\n\t\ty0 := k - T1[31&(k>>15)].\t... y ~ sqrt(x) to 8 bits\n\tHere k is a 32-bit integer and T1[] is an integer array containing\n\tcorrection terms. Now magically the floating value of y (y's\n\tleading 32-bit word is y0, the value of its trailing word is 0)\n\tapproximates sqrt(x) to almost 8-bit.\n\n\tValue of T1:\n\tstatic int T1[32]= {\n\t0,\t1024,\t3062,\t5746,\t9193,\t13348,\t18162,\t23592,\n\t29598,\t36145,\t43202,\t50740,\t58733,\t67158,\t75992,\t85215,\n\t83599,\t71378,\t60428,\t50647,\t41945,\t34246,\t27478,\t21581,\n\t16499,\t12183,\t8588,\t5674,\t3403,\t1742,\t661,\t130,};\n\n    (2)\tIterative refinement\n\n\tApply Heron's rule three times to y, we have y approximates \n\tsqrt(x) to within 1 ulp (Unit in the Last Place):\n\n\t\ty := (y+x/y)/2\t\t... almost 17 sig. bits\n\t\ty := (y+x/y)/2\t\t... almost 35 sig. bits\n\t\ty := y-(y-x/y)/2\t... within 1 ulp\n\n\n\tRemark 1.\n\t    Another way to improve y to within 1 ulp is:\n\n\t\ty := (y+x/y)\t\t... almost 17 sig. bits to 2*sqrt(x)\n\t\ty := y - 0x00100006\t... almost 18 sig. bits to sqrt(x)\n\n\t\t\t\t2\n\t\t\t    (x-y )*y\n\t\ty := y + 2* ----------\t...within 1 ulp\n\t\t\t       2\n\t\t\t     3y  + x\n\n\n\tThis formula has one division fewer than the one above; however,\n\tit requires more multiplications and additions. Also x must be\n\tscaled in advance to avoid spurious overflow in evaluating the\n\texpression 3y*y+x. Hence it is not recommended uless division\n\tis slow. If division is very slow, then one should use the \n\treciproot algorithm given in section B.\n\n    (3) Final adjustment\n\n\tBy twiddling y's last bit it is possible to force y to be \n\tcorrectly rounded according to the prevailing rounding mode\n\tas follows. Let r and i be copies of the rounding mode and\n\tinexact flag before entering the square root program. Also we\n\tuse the expression y+-ulp for the next representable floating\n\tnumbers (up and down) of y. Note that y+-ulp = either fixed\n\tpoint y+-1, or multiply y by nextafter(1,+-inf) in chopped\n\tmode.\n\n\t\tI := FALSE;\t... reset INEXACT flag I\n\t\tR := RZ;\t... set rounding mode to round-toward-zero\n\t\tz := x/y;\t... chopped quotient, possibly inexact\n\t\tIf(not I) then {\t... if the quotient is exact\n\t\t    if(z=y) {\n\t\t        I := i;\t ... restore inexact flag\n\t\t        R := r;  ... restore rounded mode\n\t\t        return sqrt(x):=y.\n\t\t    } else {\n\t\t\tz := z - ulp;\t... special rounding\n\t\t    }\n\t\t}\n\t\ti := TRUE;\t\t... sqrt(x) is inexact\n\t\tIf (r=RN) then z=z+ulp\t... rounded-to-nearest\n\t\tIf (r=RP) then {\t... round-toward-+inf\n\t\t    y = y+ulp; z=z+ulp;\n\t\t}\n\t\ty := y+z;\t\t... chopped sum\n\t\ty0:=y0-0x00100000;\t... y := y/2 is correctly rounded.\n\t        I := i;\t \t\t... restore inexact flag\n\t        R := r;  \t\t... restore rounded mode\n\t        return sqrt(x):=y.\n\t\t    \n    (4)\tSpecial cases\n\n\tSquare root of +inf, +-0, or NaN is itself;\n\tSquare root of a negative number is NaN with invalid signal.\n\n\nB.  sqrt(x) by Reciproot Iteration\n\n   (1)\tInitial approximation\n\n\tLet x0 and x1 be the leading and the trailing 32-bit words of\n\ta floating point number x (in IEEE double format) respectively\n\t(see section A). By performing shifs and subtracts on x0 and y0,\n\twe obtain a 7.8-bit approximation of 1/sqrt(x) as follows.\n\n\t    k := 0x5fe80000 - (x0>>1);\n\t    y0:= k - T2[63&(k>>14)].\t... y ~ 1/sqrt(x) to 7.8 bits\n\n\tHere k is a 32-bit integer and T2[] is an integer array \n\tcontaining correction terms. Now magically the floating\n\tvalue of y (y's leading 32-bit word is y0, the value of\n\tits trailing word y1 is set to zero) approximates 1/sqrt(x)\n\tto almost 7.8-bit.\n\n\tValue of T2:\n\tstatic int T2[64]= {\n\t0x1500,\t0x2ef8,\t0x4d67,\t0x6b02,\t0x87be,\t0xa395,\t0xbe7a,\t0xd866,\n\t0xf14a,\t0x1091b,0x11fcd,0x13552,0x14999,0x15c98,0x16e34,0x17e5f,\n\t0x18d03,0x19a01,0x1a545,0x1ae8a,0x1b5c4,0x1bb01,0x1bfde,0x1c28d,\n\t0x1c2de,0x1c0db,0x1ba73,0x1b11c,0x1a4b5,0x1953d,0x18266,0x16be0,\n\t0x1683e,0x179d8,0x18a4d,0x19992,0x1a789,0x1b445,0x1bf61,0x1c989,\n\t0x1d16d,0x1d77b,0x1dddf,0x1e2ad,0x1e5bf,0x1e6e8,0x1e654,0x1e3cd,\n\t0x1df2a,0x1d635,0x1cb16,0x1be2c,0x1ae4e,0x19bde,0x1868e,0x16e2e,\n\t0x1527f,0x1334a,0x11051,0xe951,\t0xbe01,\t0x8e0d,\t0x5924,\t0x1edd,};\n\n    (2)\tIterative refinement\n\n\tApply Reciproot iteration three times to y and multiply the\n\tresult by x to get an approximation z that matches sqrt(x)\n\tto about 1 ulp. To be exact, we will have \n\t\t-1ulp < sqrt(x)-z<1.0625ulp.\n\t\n\t... set rounding mode to Round-to-nearest\n\t   y := y*(1.5-0.5*x*y*y)\t... almost 15 sig. bits to 1/sqrt(x)\n\t   y := y*((1.5-2^-30)+0.5*x*y*y)... about 29 sig. bits to 1/sqrt(x)\n\t... special arrangement for better accuracy\n\t   z := x*y\t\t\t... 29 bits to sqrt(x), with z*y<1\n\t   z := z + 0.5*z*(1-z*y)\t... about 1 ulp to sqrt(x)\n\n\tRemark 2. The constant 1.5-2^-30 is chosen to bias the error so that\n\t(a) the term z*y in the final iteration is always less than 1; \n\t(b) the error in the final result is biased upward so that\n\t\t-1 ulp < sqrt(x) - z < 1.0625 ulp\n\t    instead of |sqrt(x)-z|<1.03125ulp.\n\n    (3)\tFinal adjustment\n\n\tBy twiddling y's last bit it is possible to force y to be \n\tcorrectly rounded according to the prevailing rounding mode\n\tas follows. Let r and i be copies of the rounding mode and\n\tinexact flag before entering the square root program. Also we\n\tuse the expression y+-ulp for the next representable floating\n\tnumbers (up and down) of y. Note that y+-ulp = either fixed\n\tpoint y+-1, or multiply y by nextafter(1,+-inf) in chopped\n\tmode.\n\n\tR := RZ;\t\t... set rounding mode to round-toward-zero\n\tswitch(r) {\n\t    case RN:\t\t... round-to-nearest\n\t       if(x<= z*(z-ulp)...chopped) z = z - ulp; else\n\t       if(x<= z*(z+ulp)...chopped) z = z; else z = z+ulp;\n\t       break;\n\t    case RZ:case RM:\t... round-to-zero or round-to--inf\n\t       R:=RP;\t\t... reset rounding mod to round-to-+inf\n\t       if(x<z*z ... rounded up) z = z - ulp; else\n\t       if(x>=(z+ulp)*(z+ulp) ...rounded up) z = z+ulp;\n\t       break;\n\t    case RP:\t\t... round-to-+inf\n\t       if(x>(z+ulp)*(z+ulp)...chopped) z = z+2*ulp; else\n\t       if(x>z*z ...chopped) z = z+ulp;\n\t       break;\n\t}\n\n\tRemark 3. The above comparisons can be done in fixed point. For\n\texample, to compare x and w=z*z chopped, it suffices to compare\n\tx1 and w1 (the trailing parts of x and w), regarding them as\n\ttwo's complement integers.\n\n\t...Is z an exact square root?\n\tTo determine whether z is an exact square root of x, let z1 be the\n\ttrailing part of z, and also let x0 and x1 be the leading and\n\ttrailing parts of x.\n\n\tIf ((z1&0x03ffffff)!=0)\t... not exact if trailing 26 bits of z!=0\n\t    I := 1;\t\t... Raise Inexact flag: z is not exact\n\telse {\n\t    j := 1 - [(x0>>20)&1]\t... j = logb(x) mod 2\n\t    k := z1 >> 26;\t\t... get z's 25-th and 26-th \n\t\t\t\t\t    fraction bits\n\t    I := i or (k&j) or ((k&(j+j+1))!=(x1&3));\n\t}\n\tR:= r\t\t... restore rounded mode\n\treturn sqrt(x):=z.\n\n\tIf multiplication is cheaper then the foregoing red tape, the \n\tInexact flag can be evaluated by\n\n\t    I := i;\n\t    I := (z*z!=x) or I.\n\n\tNote that z*z can overwrite I; this value must be sensed if it is \n\tTrue.\n\n\tRemark 4. If z*z = x exactly, then bit 25 to bit 0 of z1 must be\n\tzero.\n\n\t\t    --------------------\n\t\tz1: |        f2        | \n\t\t    --------------------\n\t\tbit 31\t\t   bit 0\n\n\tFurther more, bit 27 and 26 of z1, bit 0 and 1 of x1, and the odd\n\tor even of logb(x) have the following relations:\n\n\t-------------------------------------------------\n\tbit 27,26 of z1\t\tbit 1,0 of x1\tlogb(x)\n\t-------------------------------------------------\n\t00\t\t\t00\t\todd and even\n\t01\t\t\t01\t\teven\n\t10\t\t\t10\t\todd\n\t10\t\t\t00\t\teven\n\t11\t\t\t01\t\teven\n\t-------------------------------------------------\n\n    (4)\tSpecial cases (see (4) of Section A).\t\n \n */\n \n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/fdlibm.h",
    "content": "\n/* @(#)fdlibm.h 1.5 04/04/22 */\n/*\n * ====================================================\n * Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.\n *\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* Sometimes it's necessary to define __LITTLE_ENDIAN explicitly\n   but these catch some common cases. */\n\n#if defined(i386) || defined(i486) || \\\n\tdefined(intel) || defined(x86) || defined(i86pc) || \\\n\tdefined(__alpha) || defined(__osf__)\n#define __LITTLE_ENDIAN\n#endif\n\n#ifdef __LITTLE_ENDIAN\n#define __HI(x) *(1+(int*)&x)\n#define __LO(x) *(int*)&x\n#define __HIp(x) *(1+(int*)x)\n#define __LOp(x) *(int*)x\n#else\n#define __HI(x) *(int*)&x\n#define __LO(x) *(1+(int*)&x)\n#define __HIp(x) *(int*)x\n#define __LOp(x) *(1+(int*)x)\n#endif\n\n#ifdef __STDC__\n#define\t__P(p)\tp\n#else\n#define\t__P(p)\t()\n#endif\n\n/*\n * ANSI/POSIX\n */\n\nextern int signgam;\n\n#define\tMAXFLOAT\t((float)3.40282346638528860e+38)\n\nenum fdversion {fdlibm_ieee = -1, fdlibm_svid, fdlibm_xopen, fdlibm_posix};\n\n#define _LIB_VERSION_TYPE enum fdversion\n#define _LIB_VERSION _fdlib_version  \n\n/* if global variable _LIB_VERSION is not desirable, one may \n * change the following to be a constant by: \n *\t#define _LIB_VERSION_TYPE const enum version\n * In that case, after one initializes the value _LIB_VERSION (see\n * s_lib_version.c) during compile time, it cannot be modified\n * in the middle of a program\n */ \nextern  _LIB_VERSION_TYPE  _LIB_VERSION;\n\n#define _IEEE_  fdlibm_ieee\n#define _SVID_  fdlibm_svid\n#define _XOPEN_ fdlibm_xopen\n#define _POSIX_ fdlibm_posix\n\nstruct exception {\n\tint type;\n\tchar *name;\n\tdouble arg1;\n\tdouble arg2;\n\tdouble retval;\n};\n\n#define\tHUGE\t\tMAXFLOAT\n\n/* \n * set X_TLOSS = pi*2**52, which is possibly defined in <values.h>\n * (one may replace the following line by \"#include <values.h>\")\n */\n\n#define X_TLOSS\t\t1.41484755040568800000e+16 \n\n#define\tDOMAIN\t\t1\n#define\tSING\t\t2\n#define\tOVERFLOW\t3\n#define\tUNDERFLOW\t4\n#define\tTLOSS\t\t5\n#define\tPLOSS\t\t6\n\n/*\n * ANSI/POSIX\n */\nextern double acos __P((double));\nextern double asin __P((double));\nextern double atan __P((double));\nextern double atan2 __P((double, double));\nextern double cos __P((double));\nextern double sin __P((double));\nextern double tan __P((double));\n\nextern double cosh __P((double));\nextern double sinh __P((double));\nextern double tanh __P((double));\n\nextern double exp __P((double));\nextern double frexp __P((double, int *));\nextern double ldexp __P((double, int));\nextern double log __P((double));\nextern double log10 __P((double));\nextern double modf __P((double, double *));\n\nextern double pow __P((double, double));\nextern double sqrt __P((double));\n\nextern double ceil __P((double));\nextern double fabs __P((double));\nextern double floor __P((double));\nextern double fmod __P((double, double));\n\nextern double erf __P((double));\nextern double erfc __P((double));\nextern double gamma __P((double));\nextern double hypot __P((double, double));\nextern int isnan __P((double));\nextern int finite __P((double));\nextern double j0 __P((double));\nextern double j1 __P((double));\nextern double jn __P((int, double));\nextern double lgamma __P((double));\nextern double y0 __P((double));\nextern double y1 __P((double));\nextern double yn __P((int, double));\n\nextern double acosh __P((double));\nextern double asinh __P((double));\nextern double atanh __P((double));\nextern double cbrt __P((double));\nextern double logb __P((double));\nextern double nextafter __P((double, double));\nextern double remainder __P((double, double));\n#ifdef _SCALB_INT\nextern double scalb __P((double, int));\n#else\nextern double scalb __P((double, double));\n#endif\n\nextern int matherr __P((struct exception *));\n\n/*\n * IEEE Test Vector\n */\nextern double significand __P((double));\n\n/*\n * Functions callable from C, intended to support IEEE arithmetic.\n */\nextern double copysign __P((double, double));\nextern int ilogb __P((double));\nextern double rint __P((double));\nextern double scalbn __P((double, int));\n\n/*\n * BSD math library entry points\n */\nextern double expm1 __P((double));\nextern double log1p __P((double));\n\n/*\n * Reentrant version of gamma & lgamma; passes signgam back by reference\n * as the second argument; user must allocate space for signgam.\n */\n#ifdef _REENTRANT\nextern double gamma_r __P((double, int *));\nextern double lgamma_r __P((double, int *));\n#endif\t/* _REENTRANT */\n\n/* ieee style elementary functions */\nextern double __ieee754_sqrt __P((double));\t\t\t\nextern double __ieee754_acos __P((double));\t\t\t\nextern double __ieee754_acosh __P((double));\t\t\t\nextern double __ieee754_log __P((double));\t\t\t\nextern double __ieee754_atanh __P((double));\t\t\t\nextern double __ieee754_atan __P((double));\t\t\t\nextern double __ieee754_asin __P((double));\t\t\t\nextern double __ieee754_atan2 __P((double,double));\t\t\t\nextern double __ieee754_exp __P((double));\nextern double __ieee754_cosh __P((double));\nextern double __ieee754_fmod __P((double,double));\nextern double __ieee754_pow __P((double,double));\nextern double __ieee754_lgamma_r __P((double,int *));\nextern double __ieee754_gamma_r __P((double,int *));\nextern double __ieee754_lgamma __P((double));\nextern double __ieee754_gamma __P((double));\nextern double __ieee754_log10 __P((double));\nextern double __ieee754_sinh __P((double));\nextern double __ieee754_hypot __P((double,double));\nextern double __ieee754_j0 __P((double));\nextern double __ieee754_j1 __P((double));\nextern double __ieee754_y0 __P((double));\nextern double __ieee754_y1 __P((double));\nextern double __ieee754_jn __P((int,double));\nextern double __ieee754_yn __P((int,double));\nextern double __ieee754_remainder __P((double,double));\nextern int    __ieee754_rem_pio2 __P((double,double*));\n#ifdef _SCALB_INT\nextern double __ieee754_scalb __P((double,int));\n#else\nextern double __ieee754_scalb __P((double,double));\n#endif\n\n/* fdlibm kernel function */\nextern double __kernel_standard __P((double,double,int));\t\nextern double __kernel_sin __P((double,double,int));\nextern double __kernel_cos __P((double,double));\nextern double __kernel_tan __P((double,double,int));\nextern int    __kernel_rem_pio2 __P((double*,double*,int,int,int,const int*));\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/index",
    "content": "file\tfdlibm/fdlibm.h\n\nfile\tfdlibm/index\n\nfile\tfdlibm/e_acos.c\n\nfile\tfdlibm/e_acosh.c\n\nfile\tfdlibm/e_asin.c\n\nfile\tfdlibm/e_atan2.c\n\nfile\tfdlibm/e_atanh.c\n\nfile\tfdlibm/e_cosh.c\n\nfile\tfdlibm/e_exp.c\n\nfile\tfdlibm/e_fmod.c\n\nfile\tfdlibm/e_gamma.c\n\nfile\tfdlibm/e_gamma_r.c\n\nfile\tfdlibm/e_hypot.c\n\nfile\tfdlibm/e_j0.c\n\nfile\tfdlibm/e_j1.c\n\nfile\tfdlibm/e_jn.c\n\nfile\tfdlibm/e_lgamma.c\n\nfile\tfdlibm/e_lgamma_r.c\n\nfile\tfdlibm/e_log.c\n\nfile\tfdlibm/e_log10.c\n\nfile\tfdlibm/e_pow.c\n\nfile\tfdlibm/e_rem_pio2.c\n\nfile\tfdlibm/e_remainder.c\n\nfile\tfdlibm/e_scalb.c\n\nfile\tfdlibm/e_sinh.c\n\nfile\tfdlibm/e_sqrt.c\n\nfile\tfdlibm/k_cos.c\n\nfile\tfdlibm/k_rem_pio2.c\n\nfile\tfdlibm/k_sin.c\n\nfile\tfdlibm/k_standard.c\n\nfile\tfdlibm/k_tan.c\n\nfile\tfdlibm/makefile\n\nfile\tfdlibm/s_asinh.c\n\nfile\tfdlibm/s_atan.c\n\nfile\tfdlibm/s_cbrt.c\n\nfile\tfdlibm/s_ceil.c\n\nfile\tfdlibm/s_copysign.c\n\nfile\tfdlibm/s_cos.c\n\nfile\tfdlibm/s_erf.c\n\nfile\tfdlibm/s_expm1.c\n\nfile\tfdlibm/s_fabs.c\n\nfile\tfdlibm/s_finite.c\n\nfile\tfdlibm/s_floor.c\n\nfile\tfdlibm/s_frexp.c\n\nfile\tfdlibm/s_ilogb.c\n\nfile\tfdlibm/s_isnan.c\n\nfile\tfdlibm/s_ldexp.c\n\nfile\tfdlibm/s_lib_version.c\n\nfile\tfdlibm/s_log1p.c\n\nfile\tfdlibm/s_logb.c\n\nfile\tfdlibm/s_matherr.c\n\nfile\tfdlibm/s_modf.c\n\nfile\tfdlibm/s_nextafter.c\n\nfile\tfdlibm/s_rint.c\n\nfile\tfdlibm/s_scalbn.c\n\nfile\tfdlibm/s_signgam.c\n\nfile\tfdlibm/s_significand.c\n\nfile\tfdlibm/s_sin.c\n\nfile\tfdlibm/s_tan.c\n\nfile\tfdlibm/s_tanh.c\n\nfile\tfdlibm/w_acos.c\n\nfile\tfdlibm/w_acosh.c\n\nfile\tfdlibm/w_asin.c\n\nfile\tfdlibm/w_atan2.c\n\nfile\tfdlibm/w_atanh.c\n\nfile\tfdlibm/w_cosh.c\n\nfile\tfdlibm/w_exp.c\n\nfile\tfdlibm/w_fmod.c\n\nfile\tfdlibm/w_gamma.c\n\nfile\tfdlibm/w_gamma_r.c\n\nfile\tfdlibm/w_hypot.c\n\nfile\tfdlibm/w_j0.c\n\nfile\tfdlibm/w_j1.c\n\nfile\tfdlibm/w_jn.c\n\nfile\tfdlibm/w_lgamma.c\n\nfile\tfdlibm/w_lgamma_r.c\n\nfile\tfdlibm/w_log.c\n\nfile\tfdlibm/w_log10.c\n\nfile\tfdlibm/w_pow.c\n\nfile\tfdlibm/w_remainder.c\n\nfile\tfdlibm/w_scalb.c\n\nfile\tfdlibm/w_sinh.c\n\nfile\tfdlibm/w_sqrt.c\n\nfile\tfdlibm/readme\n\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/index.html",
    "content": "<head>\n<title>fdlibm</title>\n<meta name=\"waisindex\" value=\"nse\">\n</head>\n<h1>fdlibm</h1>\n<p>\nClick <A HREF=\"http://www.netlib.org/master_counts2.html#fdlibm\">here</A> to see the number of accesses to this library.\n<p><hr>\n<pre>\nfile\t<a href=\"fdlibm.h\">fdlibm.h</a>\n\nfile\t<a href=\"index\">index</a>\n\nfile\t<a href=\"e_acos.c\">e_acos.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/e_acos.c\">e_acos.c plus dependencies</a>\n\nfile\t<a href=\"e_acosh.c\">e_acosh.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/e_acosh.c\">e_acosh.c plus dependencies</a>\n\nfile\t<a href=\"e_asin.c\">e_asin.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/e_asin.c\">e_asin.c plus dependencies</a>\n\nfile\t<a href=\"e_atan2.c\">e_atan2.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/e_atan2.c\">e_atan2.c plus dependencies</a>\n\nfile\t<a href=\"e_atanh.c\">e_atanh.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/e_atanh.c\">e_atanh.c plus dependencies</a>\n\nfile\t<a href=\"e_cosh.c\">e_cosh.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/e_cosh.c\">e_cosh.c plus dependencies</a>\n\nfile\t<a href=\"e_exp.c\">e_exp.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/e_exp.c\">e_exp.c plus dependencies</a>\n\nfile\t<a href=\"e_fmod.c\">e_fmod.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/e_fmod.c\">e_fmod.c plus dependencies</a>\n\nfile\t<a href=\"e_gamma.c\">e_gamma.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/e_gamma.c\">e_gamma.c plus dependencies</a>\n\nfile\t<a href=\"e_gamma_r.c\">e_gamma_r.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/e_gamma_r.c\">e_gamma_r.c plus dependencies</a>\n\nfile\t<a href=\"e_hypot.c\">e_hypot.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/e_hypot.c\">e_hypot.c plus dependencies</a>\n\nfile\t<a href=\"e_j0.c\">e_j0.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/e_j0.c\">e_j0.c plus dependencies</a>\n\nfile\t<a href=\"e_j1.c\">e_j1.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/e_j1.c\">e_j1.c plus dependencies</a>\n\nfile\t<a href=\"e_jn.c\">e_jn.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/e_jn.c\">e_jn.c plus dependencies</a>\n\nfile\t<a href=\"e_lgamma.c\">e_lgamma.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/e_lgamma.c\">e_lgamma.c plus dependencies</a>\n\nfile\t<a href=\"e_lgamma_r.c\">e_lgamma_r.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/e_lgamma_r.c\">e_lgamma_r.c plus dependencies</a>\n\nfile\t<a href=\"e_log.c\">e_log.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/e_log.c\">e_log.c plus dependencies</a>\n\nfile\t<a href=\"e_log10.c\">e_log10.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/e_log10.c\">e_log10.c plus dependencies</a>\n\nfile\t<a href=\"e_pow.c\">e_pow.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/e_pow.c\">e_pow.c plus dependencies</a>\n\nfile\t<a href=\"e_rem_pio2.c\">e_rem_pio2.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/e_rem_pio2.c\">e_rem_pio2.c plus dependencies</a>\n\nfile\t<a href=\"e_remainder.c\">e_remainder.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/e_remainder.c\">e_remainder.c plus dependencies</a>\n\nfile\t<a href=\"e_scalb.c\">e_scalb.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/e_scalb.c\">e_scalb.c plus dependencies</a>\n\nfile\t<a href=\"e_sinh.c\">e_sinh.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/e_sinh.c\">e_sinh.c plus dependencies</a>\n\nfile\t<a href=\"e_sqrt.c\">e_sqrt.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/e_sqrt.c\">e_sqrt.c plus dependencies</a>\n\nfile\t<a href=\"k_cos.c\">k_cos.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/k_cos.c\">k_cos.c plus dependencies</a>\n\nfile\t<a href=\"k_rem_pio2.c\">k_rem_pio2.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/k_rem_pio2.c\">k_rem_pio2.c plus dependencies</a>\n\nfile\t<a href=\"k_sin.c\">k_sin.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/k_sin.c\">k_sin.c plus dependencies</a>\n\nfile\t<a href=\"k_standard.c\">k_standard.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/k_standard.c\">k_standard.c plus dependencies</a>\n\nfile\t<a href=\"k_tan.c\">k_tan.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/k_tan.c\">k_tan.c plus dependencies</a>\n\nfile\t<a href=\"makefile\">makefile</a>\n\nfile\t<a href=\"s_asinh.c\">s_asinh.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/s_asinh.c\">s_asinh.c plus dependencies</a>\n\nfile\t<a href=\"s_atan.c\">s_atan.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/s_atan.c\">s_atan.c plus dependencies</a>\n\nfile\t<a href=\"s_cbrt.c\">s_cbrt.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/s_cbrt.c\">s_cbrt.c plus dependencies</a>\n\nfile\t<a href=\"s_ceil.c\">s_ceil.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/s_ceil.c\">s_ceil.c plus dependencies</a>\n\nfile\t<a href=\"s_copysign.c\">s_copysign.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/s_copysign.c\">s_copysign.c plus dependencies</a>\n\nfile\t<a href=\"s_cos.c\">s_cos.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/s_cos.c\">s_cos.c plus dependencies</a>\n\nfile\t<a href=\"s_erf.c\">s_erf.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/s_erf.c\">s_erf.c plus dependencies</a>\n\nfile\t<a href=\"s_expm1.c\">s_expm1.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/s_expm1.c\">s_expm1.c plus dependencies</a>\n\nfile\t<a href=\"s_fabs.c\">s_fabs.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/s_fabs.c\">s_fabs.c plus dependencies</a>\n\nfile\t<a href=\"s_finite.c\">s_finite.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/s_finite.c\">s_finite.c plus dependencies</a>\n\nfile\t<a href=\"s_floor.c\">s_floor.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/s_floor.c\">s_floor.c plus dependencies</a>\n\nfile\t<a href=\"s_frexp.c\">s_frexp.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/s_frexp.c\">s_frexp.c plus dependencies</a>\n\nfile\t<a href=\"s_ilogb.c\">s_ilogb.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/s_ilogb.c\">s_ilogb.c plus dependencies</a>\n\nfile\t<a href=\"s_isnan.c\">s_isnan.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/s_isnan.c\">s_isnan.c plus dependencies</a>\n\nfile\t<a href=\"s_ldexp.c\">s_ldexp.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/s_ldexp.c\">s_ldexp.c plus dependencies</a>\n\nfile\t<a href=\"s_lib_version.c\">s_lib_version.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/s_lib_version.c\">s_lib_version.c plus dependencies</a>\n\nfile\t<a href=\"s_log1p.c\">s_log1p.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/s_log1p.c\">s_log1p.c plus dependencies</a>\n\nfile\t<a href=\"s_logb.c\">s_logb.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/s_logb.c\">s_logb.c plus dependencies</a>\n\nfile\t<a href=\"s_matherr.c\">s_matherr.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/s_matherr.c\">s_matherr.c plus dependencies</a>\n\nfile\t<a href=\"s_modf.c\">s_modf.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/s_modf.c\">s_modf.c plus dependencies</a>\n\nfile\t<a href=\"s_nextafter.c\">s_nextafter.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/s_nextafter.c\">s_nextafter.c plus dependencies</a>\n\nfile\t<a href=\"s_rint.c\">s_rint.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/s_rint.c\">s_rint.c plus dependencies</a>\n\nfile\t<a href=\"s_scalbn.c\">s_scalbn.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/s_scalbn.c\">s_scalbn.c plus dependencies</a>\n\nfile\t<a href=\"s_signgam.c\">s_signgam.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/s_signgam.c\">s_signgam.c plus dependencies</a>\n\nfile\t<a href=\"s_significand.c\">s_significand.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/s_significand.c\">s_significand.c plus dependencies</a>\n\nfile\t<a href=\"s_sin.c\">s_sin.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/s_sin.c\">s_sin.c plus dependencies</a>\n\nfile\t<a href=\"s_tan.c\">s_tan.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/s_tan.c\">s_tan.c plus dependencies</a>\n\nfile\t<a href=\"s_tanh.c\">s_tanh.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/s_tanh.c\">s_tanh.c plus dependencies</a>\n\nfile\t<a href=\"w_acos.c\">w_acos.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/w_acos.c\">w_acos.c plus dependencies</a>\n\nfile\t<a href=\"w_acosh.c\">w_acosh.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/w_acosh.c\">w_acosh.c plus dependencies</a>\n\nfile\t<a href=\"w_asin.c\">w_asin.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/w_asin.c\">w_asin.c plus dependencies</a>\n\nfile\t<a href=\"w_atan2.c\">w_atan2.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/w_atan2.c\">w_atan2.c plus dependencies</a>\n\nfile\t<a href=\"w_atanh.c\">w_atanh.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/w_atanh.c\">w_atanh.c plus dependencies</a>\n\nfile\t<a href=\"w_cosh.c\">w_cosh.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/w_cosh.c\">w_cosh.c plus dependencies</a>\n\nfile\t<a href=\"w_exp.c\">w_exp.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/w_exp.c\">w_exp.c plus dependencies</a>\n\nfile\t<a href=\"w_fmod.c\">w_fmod.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/w_fmod.c\">w_fmod.c plus dependencies</a>\n\nfile\t<a href=\"w_gamma.c\">w_gamma.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/w_gamma.c\">w_gamma.c plus dependencies</a>\n\nfile\t<a href=\"w_gamma_r.c\">w_gamma_r.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/w_gamma_r.c\">w_gamma_r.c plus dependencies</a>\n\nfile\t<a href=\"w_hypot.c\">w_hypot.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/w_hypot.c\">w_hypot.c plus dependencies</a>\n\nfile\t<a href=\"w_j0.c\">w_j0.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/w_j0.c\">w_j0.c plus dependencies</a>\n\nfile\t<a href=\"w_j1.c\">w_j1.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/w_j1.c\">w_j1.c plus dependencies</a>\n\nfile\t<a href=\"w_jn.c\">w_jn.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/w_jn.c\">w_jn.c plus dependencies</a>\n\nfile\t<a href=\"w_lgamma.c\">w_lgamma.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/w_lgamma.c\">w_lgamma.c plus dependencies</a>\n\nfile\t<a href=\"w_lgamma_r.c\">w_lgamma_r.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/w_lgamma_r.c\">w_lgamma_r.c plus dependencies</a>\n\nfile\t<a href=\"w_log.c\">w_log.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/w_log.c\">w_log.c plus dependencies</a>\n\nfile\t<a href=\"w_log10.c\">w_log10.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/w_log10.c\">w_log10.c plus dependencies</a>\n\nfile\t<a href=\"w_pow.c\">w_pow.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/w_pow.c\">w_pow.c plus dependencies</a>\n\nfile\t<a href=\"w_remainder.c\">w_remainder.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/w_remainder.c\">w_remainder.c plus dependencies</a>\n\nfile\t<a href=\"w_scalb.c\">w_scalb.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/w_scalb.c\">w_scalb.c plus dependencies</a>\n\nfile\t<a href=\"w_sinh.c\">w_sinh.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/w_sinh.c\">w_sinh.c plus dependencies</a>\n\nfile\t<a href=\"w_sqrt.c\">w_sqrt.c</a>  <a href=\"/cgi-bin/netlibfiles.pl?filename=/fdlibm/w_sqrt.c\">w_sqrt.c plus dependencies</a>\n\nfile\t<a href=\"readme\">readme</a>\n\n</pre>\n</body>\n</html>\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/k_cos.c",
    "content": "\n/* @(#)k_cos.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/*\n * __kernel_cos( x,  y )\n * kernel cos function on [-pi/4, pi/4], pi/4 ~ 0.785398164\n * Input x is assumed to be bounded by ~pi/4 in magnitude.\n * Input y is the tail of x. \n *\n * Algorithm\n *\t1. Since cos(-x) = cos(x), we need only to consider positive x.\n *\t2. if x < 2^-27 (hx<0x3e400000 0), return 1 with inexact if x!=0.\n *\t3. cos(x) is approximated by a polynomial of degree 14 on\n *\t   [0,pi/4]\n *\t\t  \t                 4            14\n *\t   \tcos(x) ~ 1 - x*x/2 + C1*x + ... + C6*x\n *\t   where the remez error is\n *\t\n * \t|              2     4     6     8     10    12     14 |     -58\n * \t|cos(x)-(1-.5*x +C1*x +C2*x +C3*x +C4*x +C5*x  +C6*x  )| <= 2\n * \t|    \t\t\t\t\t               | \n * \n * \t               4     6     8     10    12     14 \n *\t4. let r = C1*x +C2*x +C3*x +C4*x +C5*x  +C6*x  , then\n *\t       cos(x) = 1 - x*x/2 + r\n *\t   since cos(x+y) ~ cos(x) - sin(x)*y \n *\t\t\t  ~ cos(x) - x*y,\n *\t   a correction term is necessary in cos(x) and hence\n *\t\tcos(x+y) = 1 - (x*x/2 - (r - x*y))\n *\t   For better accuracy when x > 0.3, let qx = |x|/4 with\n *\t   the last 32 bits mask off, and if x > 0.78125, let qx = 0.28125.\n *\t   Then\n *\t\tcos(x+y) = (1-qx) - ((x*x/2-qx) - (r-x*y)).\n *\t   Note that 1-qx and (x*x/2-qx) is EXACT here, and the\n *\t   magnitude of the latter is at least a quarter of x*x/2,\n *\t   thus, reducing the rounding error in the subtraction.\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic const double \n#else\nstatic double \n#endif\none =  1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */\nC1  =  4.16666666666666019037e-02, /* 0x3FA55555, 0x5555554C */\nC2  = -1.38888888888741095749e-03, /* 0xBF56C16C, 0x16C15177 */\nC3  =  2.48015872894767294178e-05, /* 0x3EFA01A0, 0x19CB1590 */\nC4  = -2.75573143513906633035e-07, /* 0xBE927E4F, 0x809C52AD */\nC5  =  2.08757232129817482790e-09, /* 0x3E21EE9E, 0xBDB4B1C4 */\nC6  = -1.13596475577881948265e-11; /* 0xBDA8FAE9, 0xBE8838D4 */\n\n#ifdef __STDC__\n\tdouble __kernel_cos(double x, double y)\n#else\n\tdouble __kernel_cos(x, y)\n\tdouble x,y;\n#endif\n{\n\tdouble a,hz,z,r,qx;\n\tint ix;\n\tix = __HI(x)&0x7fffffff;\t/* ix = |x|'s high word*/\n\tif(ix<0x3e400000) {\t\t\t/* if x < 2**27 */\n\t    if(((int)x)==0) return one;\t\t/* generate inexact */\n\t}\n\tz  = x*x;\n\tr  = z*(C1+z*(C2+z*(C3+z*(C4+z*(C5+z*C6)))));\n\tif(ix < 0x3FD33333) \t\t\t/* if |x| < 0.3 */ \n\t    return one - (0.5*z - (z*r - x*y));\n\telse {\n\t    if(ix > 0x3fe90000) {\t\t/* x > 0.78125 */\n\t\tqx = 0.28125;\n\t    } else {\n\t        __HI(qx) = ix-0x00200000;\t/* x/4 */\n\t        __LO(qx) = 0;\n\t    }\n\t    hz = 0.5*z-qx;\n\t    a  = one-qx;\n\t    return a - (hz - (z*r-x*y));\n\t}\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/k_rem_pio2.c",
    "content": "\n/* @(#)k_rem_pio2.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/*\n * __kernel_rem_pio2(x,y,e0,nx,prec,ipio2)\n * double x[],y[]; int e0,nx,prec; int ipio2[];\n * \n * __kernel_rem_pio2 return the last three digits of N with \n *\t\ty = x - N*pi/2\n * so that |y| < pi/2.\n *\n * The method is to compute the integer (mod 8) and fraction parts of \n * (2/pi)*x without doing the full multiplication. In general we\n * skip the part of the product that are known to be a huge integer (\n * more accurately, = 0 mod 8 ). Thus the number of operations are\n * independent of the exponent of the input.\n *\n * (2/pi) is represented by an array of 24-bit integers in ipio2[].\n *\n * Input parameters:\n * \tx[]\tThe input value (must be positive) is broken into nx \n *\t\tpieces of 24-bit integers in double precision format.\n *\t\tx[i] will be the i-th 24 bit of x. The scaled exponent \n *\t\tof x[0] is given in input parameter e0 (i.e., x[0]*2^e0 \n *\t\tmatch x's up to 24 bits.\n *\n *\t\tExample of breaking a double positive z into x[0]+x[1]+x[2]:\n *\t\t\te0 = ilogb(z)-23\n *\t\t\tz  = scalbn(z,-e0)\n *\t\tfor i = 0,1,2\n *\t\t\tx[i] = floor(z)\n *\t\t\tz    = (z-x[i])*2**24\n *\n *\n *\ty[]\touput result in an array of double precision numbers.\n *\t\tThe dimension of y[] is:\n *\t\t\t24-bit  precision\t1\n *\t\t\t53-bit  precision\t2\n *\t\t\t64-bit  precision\t2\n *\t\t\t113-bit precision\t3\n *\t\tThe actual value is the sum of them. Thus for 113-bit\n *\t\tprecison, one may have to do something like:\n *\n *\t\tlong double t,w,r_head, r_tail;\n *\t\tt = (long double)y[2] + (long double)y[1];\n *\t\tw = (long double)y[0];\n *\t\tr_head = t+w;\n *\t\tr_tail = w - (r_head - t);\n *\n *\te0\tThe exponent of x[0]\n *\n *\tnx\tdimension of x[]\n *\n *  \tprec\tan integer indicating the precision:\n *\t\t\t0\t24  bits (single)\n *\t\t\t1\t53  bits (double)\n *\t\t\t2\t64  bits (extended)\n *\t\t\t3\t113 bits (quad)\n *\n *\tipio2[]\n *\t\tinteger array, contains the (24*i)-th to (24*i+23)-th \n *\t\tbit of 2/pi after binary point. The corresponding \n *\t\tfloating value is\n *\n *\t\t\tipio2[i] * 2^(-24(i+1)).\n *\n * External function:\n *\tdouble scalbn(), floor();\n *\n *\n * Here is the description of some local variables:\n *\n * \tjk\tjk+1 is the initial number of terms of ipio2[] needed\n *\t\tin the computation. The recommended value is 2,3,4,\n *\t\t6 for single, double, extended,and quad.\n *\n * \tjz\tlocal integer variable indicating the number of \n *\t\tterms of ipio2[] used. \n *\n *\tjx\tnx - 1\n *\n *\tjv\tindex for pointing to the suitable ipio2[] for the\n *\t\tcomputation. In general, we want\n *\t\t\t( 2^e0*x[0] * ipio2[jv-1]*2^(-24jv) )/8\n *\t\tis an integer. Thus\n *\t\t\te0-3-24*jv >= 0 or (e0-3)/24 >= jv\n *\t\tHence jv = max(0,(e0-3)/24).\n *\n *\tjp\tjp+1 is the number of terms in PIo2[] needed, jp = jk.\n *\n * \tq[]\tdouble array with integral value, representing the\n *\t\t24-bits chunk of the product of x and 2/pi.\n *\n *\tq0\tthe corresponding exponent of q[0]. Note that the\n *\t\texponent for q[i] would be q0-24*i.\n *\n *\tPIo2[]\tdouble precision array, obtained by cutting pi/2\n *\t\tinto 24 bits chunks. \n *\n *\tf[]\tipio2[] in floating point \n *\n *\tiq[]\tinteger array by breaking up q[] in 24-bits chunk.\n *\n *\tfq[]\tfinal product of x*(2/pi) in fq[0],..,fq[jk]\n *\n *\tih\tinteger. If >0 it indicates q[] is >= 0.5, hence\n *\t\tit also indicates the *sign* of the result.\n *\n */\n\n\n/*\n * Constants:\n * The hexadecimal values are the intended ones for the following \n * constants. The decimal values may be used, provided that the \n * compiler will convert from decimal to binary accurately enough \n * to produce the hexadecimal values shown.\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic const int init_jk[] = {2,3,4,6}; /* initial value for jk */\n#else\nstatic int init_jk[] = {2,3,4,6}; \n#endif\n\n#ifdef __STDC__\nstatic const double PIo2[] = {\n#else\nstatic double PIo2[] = {\n#endif\n  1.57079625129699707031e+00, /* 0x3FF921FB, 0x40000000 */\n  7.54978941586159635335e-08, /* 0x3E74442D, 0x00000000 */\n  5.39030252995776476554e-15, /* 0x3CF84698, 0x80000000 */\n  3.28200341580791294123e-22, /* 0x3B78CC51, 0x60000000 */\n  1.27065575308067607349e-29, /* 0x39F01B83, 0x80000000 */\n  1.22933308981111328932e-36, /* 0x387A2520, 0x40000000 */\n  2.73370053816464559624e-44, /* 0x36E38222, 0x80000000 */\n  2.16741683877804819444e-51, /* 0x3569F31D, 0x00000000 */\n};\n\n#ifdef __STDC__\nstatic const double\t\t\t\n#else\nstatic double\t\t\t\n#endif\nzero   = 0.0,\none    = 1.0,\ntwo24   =  1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */\ntwon24  =  5.96046447753906250000e-08; /* 0x3E700000, 0x00000000 */\n\n#ifdef __STDC__\n\tint __kernel_rem_pio2(double *x, double *y, int e0, int nx, int prec, const int *ipio2) \n#else\n\tint __kernel_rem_pio2(x,y,e0,nx,prec,ipio2) \t\n\tdouble x[], y[]; int e0,nx,prec; int ipio2[];\n#endif\n{\n\tint jz,jx,jv,jp,jk,carry,n,iq[20],i,j,k,m,q0,ih;\n\tdouble z,fw,f[20],fq[20],q[20];\n\n    /* initialize jk*/\n\tjk = init_jk[prec];\n\tjp = jk;\n\n    /* determine jx,jv,q0, note that 3>q0 */\n\tjx =  nx-1;\n\tjv = (e0-3)/24; if(jv<0) jv=0;\n\tq0 =  e0-24*(jv+1);\n\n    /* set up f[0] to f[jx+jk] where f[jx+jk] = ipio2[jv+jk] */\n\tj = jv-jx; m = jx+jk;\n\tfor(i=0;i<=m;i++,j++) f[i] = (j<0)? zero : (double) ipio2[j];\n\n    /* compute q[0],q[1],...q[jk] */\n\tfor (i=0;i<=jk;i++) {\n\t    for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw;\n\t}\n\n\tjz = jk;\nrecompute:\n    /* distill q[] into iq[] reversingly */\n\tfor(i=0,j=jz,z=q[jz];j>0;i++,j--) {\n\t    fw    =  (double)((int)(twon24* z));\n\t    iq[i] =  (int)(z-two24*fw);\n\t    z     =  q[j-1]+fw;\n\t}\n\n    /* compute n */\n\tz  = scalbn(z,q0);\t\t/* actual value of z */\n\tz -= 8.0*floor(z*0.125);\t\t/* trim off integer >= 8 */\n\tn  = (int) z;\n\tz -= (double)n;\n\tih = 0;\n\tif(q0>0) {\t/* need iq[jz-1] to determine n */\n\t    i  = (iq[jz-1]>>(24-q0)); n += i;\n\t    iq[jz-1] -= i<<(24-q0);\n\t    ih = iq[jz-1]>>(23-q0);\n\t} \n\telse if(q0==0) ih = iq[jz-1]>>23;\n\telse if(z>=0.5) ih=2;\n\n\tif(ih>0) {\t/* q > 0.5 */\n\t    n += 1; carry = 0;\n\t    for(i=0;i<jz ;i++) {\t/* compute 1-q */\n\t\tj = iq[i];\n\t\tif(carry==0) {\n\t\t    if(j!=0) {\n\t\t\tcarry = 1; iq[i] = 0x1000000- j;\n\t\t    }\n\t\t} else  iq[i] = 0xffffff - j;\n\t    }\n\t    if(q0>0) {\t\t/* rare case: chance is 1 in 12 */\n\t        switch(q0) {\n\t        case 1:\n\t    \t   iq[jz-1] &= 0x7fffff; break;\n\t    \tcase 2:\n\t    \t   iq[jz-1] &= 0x3fffff; break;\n\t        }\n\t    }\n\t    if(ih==2) {\n\t\tz = one - z;\n\t\tif(carry!=0) z -= scalbn(one,q0);\n\t    }\n\t}\n\n    /* check if recomputation is needed */\n\tif(z==zero) {\n\t    j = 0;\n\t    for (i=jz-1;i>=jk;i--) j |= iq[i];\n\t    if(j==0) { /* need recomputation */\n\t\tfor(k=1;iq[jk-k]==0;k++);   /* k = no. of terms needed */\n\n\t\tfor(i=jz+1;i<=jz+k;i++) {   /* add q[jz+1] to q[jz+k] */\n\t\t    f[jx+i] = (double) ipio2[jv+i];\n\t\t    for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j];\n\t\t    q[i] = fw;\n\t\t}\n\t\tjz += k;\n\t\tgoto recompute;\n\t    }\n\t}\n\n    /* chop off zero terms */\n\tif(z==0.0) {\n\t    jz -= 1; q0 -= 24;\n\t    while(iq[jz]==0) { jz--; q0-=24;}\n\t} else { /* break z into 24-bit if necessary */\n\t    z = scalbn(z,-q0);\n\t    if(z>=two24) { \n\t\tfw = (double)((int)(twon24*z));\n\t\tiq[jz] = (int)(z-two24*fw);\n\t\tjz += 1; q0 += 24;\n\t\tiq[jz] = (int) fw;\n\t    } else iq[jz] = (int) z ;\n\t}\n\n    /* convert integer \"bit\" chunk to floating-point value */\n\tfw = scalbn(one,q0);\n\tfor(i=jz;i>=0;i--) {\n\t    q[i] = fw*(double)iq[i]; fw*=twon24;\n\t}\n\n    /* compute PIo2[0,...,jp]*q[jz,...,0] */\n\tfor(i=jz;i>=0;i--) {\n\t    for(fw=0.0,k=0;k<=jp&&k<=jz-i;k++) fw += PIo2[k]*q[i+k];\n\t    fq[jz-i] = fw;\n\t}\n\n    /* compress fq[] into y[] */\n\tswitch(prec) {\n\t    case 0:\n\t\tfw = 0.0;\n\t\tfor (i=jz;i>=0;i--) fw += fq[i];\n\t\ty[0] = (ih==0)? fw: -fw; \n\t\tbreak;\n\t    case 1:\n\t    case 2:\n\t\tfw = 0.0;\n\t\tfor (i=jz;i>=0;i--) fw += fq[i]; \n\t\ty[0] = (ih==0)? fw: -fw; \n\t\tfw = fq[0]-fw;\n\t\tfor (i=1;i<=jz;i++) fw += fq[i];\n\t\ty[1] = (ih==0)? fw: -fw; \n\t\tbreak;\n\t    case 3:\t/* painful */\n\t\tfor (i=jz;i>0;i--) {\n\t\t    fw      = fq[i-1]+fq[i]; \n\t\t    fq[i]  += fq[i-1]-fw;\n\t\t    fq[i-1] = fw;\n\t\t}\n\t\tfor (i=jz;i>1;i--) {\n\t\t    fw      = fq[i-1]+fq[i]; \n\t\t    fq[i]  += fq[i-1]-fw;\n\t\t    fq[i-1] = fw;\n\t\t}\n\t\tfor (fw=0.0,i=jz;i>=2;i--) fw += fq[i]; \n\t\tif(ih==0) {\n\t\t    y[0] =  fq[0]; y[1] =  fq[1]; y[2] =  fw;\n\t\t} else {\n\t\t    y[0] = -fq[0]; y[1] = -fq[1]; y[2] = -fw;\n\t\t}\n\t}\n\treturn n&7;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/k_sin.c",
    "content": "\n/* @(#)k_sin.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* __kernel_sin( x, y, iy)\n * kernel sin function on [-pi/4, pi/4], pi/4 ~ 0.7854\n * Input x is assumed to be bounded by ~pi/4 in magnitude.\n * Input y is the tail of x.\n * Input iy indicates whether y is 0. (if iy=0, y assume to be 0). \n *\n * Algorithm\n *\t1. Since sin(-x) = -sin(x), we need only to consider positive x. \n *\t2. if x < 2^-27 (hx<0x3e400000 0), return x with inexact if x!=0.\n *\t3. sin(x) is approximated by a polynomial of degree 13 on\n *\t   [0,pi/4]\n *\t\t  \t         3            13\n *\t   \tsin(x) ~ x + S1*x + ... + S6*x\n *\t   where\n *\t\n * \t|sin(x)         2     4     6     8     10     12  |     -58\n * \t|----- - (1+S1*x +S2*x +S3*x +S4*x +S5*x  +S6*x   )| <= 2\n * \t|  x \t\t\t\t\t           | \n * \n *\t4. sin(x+y) = sin(x) + sin'(x')*y\n *\t\t    ~ sin(x) + (1-x*x/2)*y\n *\t   For better accuracy, let \n *\t\t     3      2      2      2      2\n *\t\tr = x *(S2+x *(S3+x *(S4+x *(S5+x *S6))))\n *\t   then                   3    2\n *\t\tsin(x) = x + (S1*x + (x *(r-y/2)+y))\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic const double \n#else\nstatic double \n#endif\nhalf =  5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */\nS1  = -1.66666666666666324348e-01, /* 0xBFC55555, 0x55555549 */\nS2  =  8.33333333332248946124e-03, /* 0x3F811111, 0x1110F8A6 */\nS3  = -1.98412698298579493134e-04, /* 0xBF2A01A0, 0x19C161D5 */\nS4  =  2.75573137070700676789e-06, /* 0x3EC71DE3, 0x57B1FE7D */\nS5  = -2.50507602534068634195e-08, /* 0xBE5AE5E6, 0x8A2B9CEB */\nS6  =  1.58969099521155010221e-10; /* 0x3DE5D93A, 0x5ACFD57C */\n\n#ifdef __STDC__\n\tdouble __kernel_sin(double x, double y, int iy)\n#else\n\tdouble __kernel_sin(x, y, iy)\n\tdouble x,y; int iy;\t\t/* iy=0 if y is zero */\n#endif\n{\n\tdouble z,r,v;\n\tint ix;\n\tix = __HI(x)&0x7fffffff;\t/* high word of x */\n\tif(ix<0x3e400000)\t\t\t/* |x| < 2**-27 */\n\t   {if((int)x==0) return x;}\t\t/* generate inexact */\n\tz\t=  x*x;\n\tv\t=  z*x;\n\tr\t=  S2+z*(S3+z*(S4+z*(S5+z*S6)));\n\tif(iy==0) return x+v*(S1+z*r);\n\telse      return x-((z*(half*y-v*r)-y)-v*S1);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/k_standard.c",
    "content": "\n/* @(#)k_standard.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n *\n */\n\n#include \"fdlibm.h\"\n#include <errno.h>\n\n#ifndef _USE_WRITE\n#include <stdio.h>\t\t\t/* fputs(), stderr */\n#define\tWRITE2(u,v)\tfputs(u, stderr)\n#else\t/* !defined(_USE_WRITE) */\n#include <unistd.h>\t\t\t/* write */\n#define\tWRITE2(u,v)\twrite(2, u, v)\n#undef fflush\n#endif\t/* !defined(_USE_WRITE) */\n\nstatic double zero = 0.0;\t/* used as const */\n\n/* \n * Standard conformance (non-IEEE) on exception cases.\n * Mapping:\n *\t1 -- acos(|x|>1)\n *\t2 -- asin(|x|>1)\n *\t3 -- atan2(+-0,+-0)\n *\t4 -- hypot overflow\n *\t5 -- cosh overflow\n *\t6 -- exp overflow\n *\t7 -- exp underflow\n *\t8 -- y0(0)\n *\t9 -- y0(-ve)\n *\t10-- y1(0)\n *\t11-- y1(-ve)\n *\t12-- yn(0)\n *\t13-- yn(-ve)\n *\t14-- lgamma(finite) overflow\n *\t15-- lgamma(-integer)\n *\t16-- log(0)\n *\t17-- log(x<0)\n *\t18-- log10(0)\n *\t19-- log10(x<0)\n *\t20-- pow(0.0,0.0)\n *\t21-- pow(x,y) overflow\n *\t22-- pow(x,y) underflow\n *\t23-- pow(0,negative) \n *\t24-- pow(neg,non-integral)\n *\t25-- sinh(finite) overflow\n *\t26-- sqrt(negative)\n *      27-- fmod(x,0)\n *      28-- remainder(x,0)\n *\t29-- acosh(x<1)\n *\t30-- atanh(|x|>1)\n *\t31-- atanh(|x|=1)\n *\t32-- scalb overflow\n *\t33-- scalb underflow\n *\t34-- j0(|x|>X_TLOSS)\n *\t35-- y0(x>X_TLOSS)\n *\t36-- j1(|x|>X_TLOSS)\n *\t37-- y1(x>X_TLOSS)\n *\t38-- jn(|x|>X_TLOSS, n)\n *\t39-- yn(x>X_TLOSS, n)\n *\t40-- gamma(finite) overflow\n *\t41-- gamma(-integer)\n *\t42-- pow(NaN,0.0)\n */\n\n\n#ifdef __STDC__\n\tdouble __kernel_standard(double x, double y, int type) \n#else\n\tdouble __kernel_standard(x,y,type) \n\tdouble x,y; int type;\n#endif\n{\n\tstruct exception exc;\n#ifndef HUGE_VAL\t/* this is the only routine that uses HUGE_VAL */ \n#define HUGE_VAL inf\n\tdouble inf = 0.0;\n\n\t__HI(inf) = 0x7ff00000;\t/* set inf to infinite */\n#endif\n\n#ifdef _USE_WRITE\n\t(void) fflush(stdout);\n#endif\n\texc.arg1 = x;\n\texc.arg2 = y;\n\tswitch(type) {\n\t    case 1:\n\t\t/* acos(|x|>1) */\n\t\texc.type = DOMAIN;\n\t\texc.name = \"acos\";\n\t\texc.retval = zero;\n\t\tif (_LIB_VERSION == _POSIX_)\n\t\t  errno = EDOM;\n\t\telse if (!matherr(&exc)) {\n\t\t  if(_LIB_VERSION == _SVID_) {\n\t\t    (void) WRITE2(\"acos: DOMAIN error\\n\", 19);\n\t\t  }\n\t\t  errno = EDOM;\n\t\t}\n\t\tbreak;\n\t    case 2:\n\t\t/* asin(|x|>1) */\n\t\texc.type = DOMAIN;\n\t\texc.name = \"asin\";\n\t\texc.retval = zero;\n\t\tif(_LIB_VERSION == _POSIX_)\n\t\t  errno = EDOM;\n\t\telse if (!matherr(&exc)) {\n\t\t  if(_LIB_VERSION == _SVID_) {\n\t\t    \t(void) WRITE2(\"asin: DOMAIN error\\n\", 19);\n\t\t  }\n\t\t  errno = EDOM;\n\t\t}\n\t\tbreak;\n\t    case 3:\n\t\t/* atan2(+-0,+-0) */\n\t\texc.arg1 = y;\n\t\texc.arg2 = x;\n\t\texc.type = DOMAIN;\n\t\texc.name = \"atan2\";\n\t\texc.retval = zero;\n\t\tif(_LIB_VERSION == _POSIX_)\n\t\t  errno = EDOM;\n\t\telse if (!matherr(&exc)) {\n\t\t  if(_LIB_VERSION == _SVID_) {\n\t\t\t(void) WRITE2(\"atan2: DOMAIN error\\n\", 20);\n\t\t      }\n\t\t  errno = EDOM;\n\t\t}\n\t\tbreak;\n\t    case 4:\n\t\t/* hypot(finite,finite) overflow */\n\t\texc.type = OVERFLOW;\n\t\texc.name = \"hypot\";\n\t\tif (_LIB_VERSION == _SVID_)\n\t\t  exc.retval = HUGE;\n\t\telse\n\t\t  exc.retval = HUGE_VAL;\n\t\tif (_LIB_VERSION == _POSIX_)\n\t\t  errno = ERANGE;\n\t\telse if (!matherr(&exc)) {\n\t\t\terrno = ERANGE;\n\t\t}\n\t\tbreak;\n\t    case 5:\n\t\t/* cosh(finite) overflow */\n\t\texc.type = OVERFLOW;\n\t\texc.name = \"cosh\";\n\t\tif (_LIB_VERSION == _SVID_)\n\t\t  exc.retval = HUGE;\n\t\telse\n\t\t  exc.retval = HUGE_VAL;\n\t\tif (_LIB_VERSION == _POSIX_)\n\t\t  errno = ERANGE;\n\t\telse if (!matherr(&exc)) {\n\t\t\terrno = ERANGE;\n\t\t}\n\t\tbreak;\n\t    case 6:\n\t\t/* exp(finite) overflow */\n\t\texc.type = OVERFLOW;\n\t\texc.name = \"exp\";\n\t\tif (_LIB_VERSION == _SVID_)\n\t\t  exc.retval = HUGE;\n\t\telse\n\t\t  exc.retval = HUGE_VAL;\n\t\tif (_LIB_VERSION == _POSIX_)\n\t\t  errno = ERANGE;\n\t\telse if (!matherr(&exc)) {\n\t\t\terrno = ERANGE;\n\t\t}\n\t\tbreak;\n\t    case 7:\n\t\t/* exp(finite) underflow */\n\t\texc.type = UNDERFLOW;\n\t\texc.name = \"exp\";\n\t\texc.retval = zero;\n\t\tif (_LIB_VERSION == _POSIX_)\n\t\t  errno = ERANGE;\n\t\telse if (!matherr(&exc)) {\n\t\t\terrno = ERANGE;\n\t\t}\n\t\tbreak;\n\t    case 8:\n\t\t/* y0(0) = -inf */\n\t\texc.type = DOMAIN;\t/* should be SING for IEEE */\n\t\texc.name = \"y0\";\n\t\tif (_LIB_VERSION == _SVID_)\n\t\t  exc.retval = -HUGE;\n\t\telse\n\t\t  exc.retval = -HUGE_VAL;\n\t\tif (_LIB_VERSION == _POSIX_)\n\t\t  errno = EDOM;\n\t\telse if (!matherr(&exc)) {\n\t\t  if (_LIB_VERSION == _SVID_) {\n\t\t\t(void) WRITE2(\"y0: DOMAIN error\\n\", 17);\n\t\t      }\n\t\t  errno = EDOM;\n\t\t}\n\t\tbreak;\n\t    case 9:\n\t\t/* y0(x<0) = NaN */\n\t\texc.type = DOMAIN;\n\t\texc.name = \"y0\";\n\t\tif (_LIB_VERSION == _SVID_)\n\t\t  exc.retval = -HUGE;\n\t\telse\n\t\t  exc.retval = -HUGE_VAL;\n\t\tif (_LIB_VERSION == _POSIX_)\n\t\t  errno = EDOM;\n\t\telse if (!matherr(&exc)) {\n\t\t  if (_LIB_VERSION == _SVID_) {\n\t\t\t(void) WRITE2(\"y0: DOMAIN error\\n\", 17);\n\t\t      }\n\t\t  errno = EDOM;\n\t\t}\n\t\tbreak;\n\t    case 10:\n\t\t/* y1(0) = -inf */\n\t\texc.type = DOMAIN;\t/* should be SING for IEEE */\n\t\texc.name = \"y1\";\n\t\tif (_LIB_VERSION == _SVID_)\n\t\t  exc.retval = -HUGE;\n\t\telse\n\t\t  exc.retval = -HUGE_VAL;\n\t\tif (_LIB_VERSION == _POSIX_)\n\t\t  errno = EDOM;\n\t\telse if (!matherr(&exc)) {\n\t\t  if (_LIB_VERSION == _SVID_) {\n\t\t\t(void) WRITE2(\"y1: DOMAIN error\\n\", 17);\n\t\t      }\n\t\t  errno = EDOM;\n\t\t}\n\t\tbreak;\n\t    case 11:\n\t\t/* y1(x<0) = NaN */\n\t\texc.type = DOMAIN;\n\t\texc.name = \"y1\";\n\t\tif (_LIB_VERSION == _SVID_)\n\t\t  exc.retval = -HUGE;\n\t\telse\n\t\t  exc.retval = -HUGE_VAL;\n\t\tif (_LIB_VERSION == _POSIX_)\n\t\t  errno = EDOM;\n\t\telse if (!matherr(&exc)) {\n\t\t  if (_LIB_VERSION == _SVID_) {\n\t\t\t(void) WRITE2(\"y1: DOMAIN error\\n\", 17);\n\t\t      }\n\t\t  errno = EDOM;\n\t\t}\n\t\tbreak;\n\t    case 12:\n\t\t/* yn(n,0) = -inf */\n\t\texc.type = DOMAIN;\t/* should be SING for IEEE */\n\t\texc.name = \"yn\";\n\t\tif (_LIB_VERSION == _SVID_)\n\t\t  exc.retval = -HUGE;\n\t\telse\n\t\t  exc.retval = -HUGE_VAL;\n\t\tif (_LIB_VERSION == _POSIX_)\n\t\t  errno = EDOM;\n\t\telse if (!matherr(&exc)) {\n\t\t  if (_LIB_VERSION == _SVID_) {\n\t\t\t(void) WRITE2(\"yn: DOMAIN error\\n\", 17);\n\t\t      }\n\t\t  errno = EDOM;\n\t\t}\n\t\tbreak;\n\t    case 13:\n\t\t/* yn(x<0) = NaN */\n\t\texc.type = DOMAIN;\n\t\texc.name = \"yn\";\n\t\tif (_LIB_VERSION == _SVID_)\n\t\t  exc.retval = -HUGE;\n\t\telse\n\t\t  exc.retval = -HUGE_VAL;\n\t\tif (_LIB_VERSION == _POSIX_)\n\t\t  errno = EDOM;\n\t\telse if (!matherr(&exc)) {\n\t\t  if (_LIB_VERSION == _SVID_) {\n\t\t\t(void) WRITE2(\"yn: DOMAIN error\\n\", 17);\n\t\t      }\n\t\t  errno = EDOM;\n\t\t}\n\t\tbreak;\n\t    case 14:\n\t\t/* lgamma(finite) overflow */\n\t\texc.type = OVERFLOW;\n\t\texc.name = \"lgamma\";\n                if (_LIB_VERSION == _SVID_)\n                  exc.retval = HUGE;\n                else\n                  exc.retval = HUGE_VAL;\n                if (_LIB_VERSION == _POSIX_)\n\t\t\terrno = ERANGE;\n                else if (!matherr(&exc)) {\n                        errno = ERANGE;\n\t\t}\n\t\tbreak;\n\t    case 15:\n\t\t/* lgamma(-integer) or lgamma(0) */\n\t\texc.type = SING;\n\t\texc.name = \"lgamma\";\n                if (_LIB_VERSION == _SVID_)\n                  exc.retval = HUGE;\n                else\n                  exc.retval = HUGE_VAL;\n\t\tif (_LIB_VERSION == _POSIX_)\n\t\t  errno = EDOM;\n\t\telse if (!matherr(&exc)) {\n\t\t  if (_LIB_VERSION == _SVID_) {\n\t\t\t(void) WRITE2(\"lgamma: SING error\\n\", 19);\n\t\t      }\n\t\t  errno = EDOM;\n\t\t}\n\t\tbreak;\n\t    case 16:\n\t\t/* log(0) */\n\t\texc.type = SING;\n\t\texc.name = \"log\";\n\t\tif (_LIB_VERSION == _SVID_)\n\t\t  exc.retval = -HUGE;\n\t\telse\n\t\t  exc.retval = -HUGE_VAL;\n\t\tif (_LIB_VERSION == _POSIX_)\n\t\t  errno = ERANGE;\n\t\telse if (!matherr(&exc)) {\n\t\t  if (_LIB_VERSION == _SVID_) {\n\t\t\t(void) WRITE2(\"log: SING error\\n\", 16);\n\t\t      }\n\t\t  errno = EDOM;\n\t\t}\n\t\tbreak;\n\t    case 17:\n\t\t/* log(x<0) */\n\t\texc.type = DOMAIN;\n\t\texc.name = \"log\";\n\t\tif (_LIB_VERSION == _SVID_)\n\t\t  exc.retval = -HUGE;\n\t\telse\n\t\t  exc.retval = -HUGE_VAL;\n\t\tif (_LIB_VERSION == _POSIX_)\n\t\t  errno = EDOM;\n\t\telse if (!matherr(&exc)) {\n\t\t  if (_LIB_VERSION == _SVID_) {\n\t\t\t(void) WRITE2(\"log: DOMAIN error\\n\", 18);\n\t\t      }\n\t\t  errno = EDOM;\n\t\t}\n\t\tbreak;\n\t    case 18:\n\t\t/* log10(0) */\n\t\texc.type = SING;\n\t\texc.name = \"log10\";\n\t\tif (_LIB_VERSION == _SVID_)\n\t\t  exc.retval = -HUGE;\n\t\telse\n\t\t  exc.retval = -HUGE_VAL;\n\t\tif (_LIB_VERSION == _POSIX_)\n\t\t  errno = ERANGE;\n\t\telse if (!matherr(&exc)) {\n\t\t  if (_LIB_VERSION == _SVID_) {\n\t\t\t(void) WRITE2(\"log10: SING error\\n\", 18);\n\t\t      }\n\t\t  errno = EDOM;\n\t\t}\n\t\tbreak;\n\t    case 19:\n\t\t/* log10(x<0) */\n\t\texc.type = DOMAIN;\n\t\texc.name = \"log10\";\n\t\tif (_LIB_VERSION == _SVID_)\n\t\t  exc.retval = -HUGE;\n\t\telse\n\t\t  exc.retval = -HUGE_VAL;\n\t\tif (_LIB_VERSION == _POSIX_)\n\t\t  errno = EDOM;\n\t\telse if (!matherr(&exc)) {\n\t\t  if (_LIB_VERSION == _SVID_) {\n\t\t\t(void) WRITE2(\"log10: DOMAIN error\\n\", 20);\n\t\t      }\n\t\t  errno = EDOM;\n\t\t}\n\t\tbreak;\n\t    case 20:\n\t\t/* pow(0.0,0.0) */\n\t\t/* error only if _LIB_VERSION == _SVID_ */\n\t\texc.type = DOMAIN;\n\t\texc.name = \"pow\";\n\t\texc.retval = zero;\n\t\tif (_LIB_VERSION != _SVID_) exc.retval = 1.0;\n\t\telse if (!matherr(&exc)) {\n\t\t\t(void) WRITE2(\"pow(0,0): DOMAIN error\\n\", 23);\n\t\t\terrno = EDOM;\n\t\t}\n\t\tbreak;\n\t    case 21:\n\t\t/* pow(x,y) overflow */\n\t\texc.type = OVERFLOW;\n\t\texc.name = \"pow\";\n\t\tif (_LIB_VERSION == _SVID_) {\n\t\t  exc.retval = HUGE;\n\t\t  y *= 0.5;\n\t\t  if(x<zero&&rint(y)!=y) exc.retval = -HUGE;\n\t\t} else {\n\t\t  exc.retval = HUGE_VAL;\n\t\t  y *= 0.5;\n\t\t  if(x<zero&&rint(y)!=y) exc.retval = -HUGE_VAL;\n\t\t}\n\t\tif (_LIB_VERSION == _POSIX_)\n\t\t  errno = ERANGE;\n\t\telse if (!matherr(&exc)) {\n\t\t\terrno = ERANGE;\n\t\t}\n\t\tbreak;\n\t    case 22:\n\t\t/* pow(x,y) underflow */\n\t\texc.type = UNDERFLOW;\n\t\texc.name = \"pow\";\n\t\texc.retval =  zero;\n\t\tif (_LIB_VERSION == _POSIX_)\n\t\t  errno = ERANGE;\n\t\telse if (!matherr(&exc)) {\n\t\t\terrno = ERANGE;\n\t\t}\n\t\tbreak;\n\t    case 23:\n\t\t/* 0**neg */\n\t\texc.type = DOMAIN;\n\t\texc.name = \"pow\";\n\t\tif (_LIB_VERSION == _SVID_) \n\t\t  exc.retval = zero;\n\t\telse\n\t\t  exc.retval = -HUGE_VAL;\n\t\tif (_LIB_VERSION == _POSIX_)\n\t\t  errno = EDOM;\n\t\telse if (!matherr(&exc)) {\n\t\t  if (_LIB_VERSION == _SVID_) {\n\t\t\t(void) WRITE2(\"pow(0,neg): DOMAIN error\\n\", 25);\n\t\t      }\n\t\t  errno = EDOM;\n\t\t}\n\t\tbreak;\n\t    case 24:\n\t\t/* neg**non-integral */\n\t\texc.type = DOMAIN;\n\t\texc.name = \"pow\";\n\t\tif (_LIB_VERSION == _SVID_) \n\t\t    exc.retval = zero;\n\t\telse \n\t\t    exc.retval = zero/zero;\t/* X/Open allow NaN */\n\t\tif (_LIB_VERSION == _POSIX_) \n\t\t   errno = EDOM;\n\t\telse if (!matherr(&exc)) {\n\t\t  if (_LIB_VERSION == _SVID_) {\n\t\t\t(void) WRITE2(\"neg**non-integral: DOMAIN error\\n\", 32);\n\t\t      }\n\t\t  errno = EDOM;\n\t\t}\n\t\tbreak;\n\t    case 25:\n\t\t/* sinh(finite) overflow */\n\t\texc.type = OVERFLOW;\n\t\texc.name = \"sinh\";\n\t\tif (_LIB_VERSION == _SVID_)\n\t\t  exc.retval = ( (x>zero) ? HUGE : -HUGE);\n\t\telse\n\t\t  exc.retval = ( (x>zero) ? HUGE_VAL : -HUGE_VAL);\n\t\tif (_LIB_VERSION == _POSIX_)\n\t\t  errno = ERANGE;\n\t\telse if (!matherr(&exc)) {\n\t\t\terrno = ERANGE;\n\t\t}\n\t\tbreak;\n\t    case 26:\n\t\t/* sqrt(x<0) */\n\t\texc.type = DOMAIN;\n\t\texc.name = \"sqrt\";\n\t\tif (_LIB_VERSION == _SVID_)\n\t\t  exc.retval = zero;\n\t\telse\n\t\t  exc.retval = zero/zero;\n\t\tif (_LIB_VERSION == _POSIX_)\n\t\t  errno = EDOM;\n\t\telse if (!matherr(&exc)) {\n\t\t  if (_LIB_VERSION == _SVID_) {\n\t\t\t(void) WRITE2(\"sqrt: DOMAIN error\\n\", 19);\n\t\t      }\n\t\t  errno = EDOM;\n\t\t}\n\t\tbreak;\n            case 27:\n                /* fmod(x,0) */\n                exc.type = DOMAIN;\n                exc.name = \"fmod\";\n                if (_LIB_VERSION == _SVID_)\n                    exc.retval = x;\n\t\telse\n\t\t    exc.retval = zero/zero;\n                if (_LIB_VERSION == _POSIX_)\n                  errno = EDOM;\n                else if (!matherr(&exc)) {\n                  if (_LIB_VERSION == _SVID_) {\n                    (void) WRITE2(\"fmod:  DOMAIN error\\n\", 20);\n                  }\n                  errno = EDOM;\n                }\n                break;\n            case 28:\n                /* remainder(x,0) */\n                exc.type = DOMAIN;\n                exc.name = \"remainder\";\n                exc.retval = zero/zero;\n                if (_LIB_VERSION == _POSIX_)\n                  errno = EDOM;\n                else if (!matherr(&exc)) {\n                  if (_LIB_VERSION == _SVID_) {\n                    (void) WRITE2(\"remainder: DOMAIN error\\n\", 24);\n                  }\n                  errno = EDOM;\n                }\n                break;\n            case 29:\n                /* acosh(x<1) */\n                exc.type = DOMAIN;\n                exc.name = \"acosh\";\n                exc.retval = zero/zero;\n                if (_LIB_VERSION == _POSIX_)\n                  errno = EDOM;\n                else if (!matherr(&exc)) {\n                  if (_LIB_VERSION == _SVID_) {\n                    (void) WRITE2(\"acosh: DOMAIN error\\n\", 20);\n                  }\n                  errno = EDOM;\n                }\n                break;\n            case 30:\n                /* atanh(|x|>1) */\n                exc.type = DOMAIN;\n                exc.name = \"atanh\";\n                exc.retval = zero/zero;\n                if (_LIB_VERSION == _POSIX_)\n                  errno = EDOM;\n                else if (!matherr(&exc)) {\n                  if (_LIB_VERSION == _SVID_) {\n                    (void) WRITE2(\"atanh: DOMAIN error\\n\", 20);\n                  }\n                  errno = EDOM;\n                }\n                break;\n            case 31:\n                /* atanh(|x|=1) */\n                exc.type = SING;\n                exc.name = \"atanh\";\n\t\texc.retval = x/zero;\t/* sign(x)*inf */\n                if (_LIB_VERSION == _POSIX_)\n                  errno = EDOM;\n                else if (!matherr(&exc)) {\n                  if (_LIB_VERSION == _SVID_) {\n                    (void) WRITE2(\"atanh: SING error\\n\", 18);\n                  }\n                  errno = EDOM;\n                }\n                break;\n\t    case 32:\n\t\t/* scalb overflow; SVID also returns +-HUGE_VAL */\n\t\texc.type = OVERFLOW;\n\t\texc.name = \"scalb\";\n\t\texc.retval = x > zero ? HUGE_VAL : -HUGE_VAL;\n\t\tif (_LIB_VERSION == _POSIX_)\n\t\t  errno = ERANGE;\n\t\telse if (!matherr(&exc)) {\n\t\t\terrno = ERANGE;\n\t\t}\n\t\tbreak;\n\t    case 33:\n\t\t/* scalb underflow */\n\t\texc.type = UNDERFLOW;\n\t\texc.name = \"scalb\";\n\t\texc.retval = copysign(zero,x);\n\t\tif (_LIB_VERSION == _POSIX_)\n\t\t  errno = ERANGE;\n\t\telse if (!matherr(&exc)) {\n\t\t\terrno = ERANGE;\n\t\t}\n\t\tbreak;\n\t    case 34:\n\t\t/* j0(|x|>X_TLOSS) */\n                exc.type = TLOSS;\n                exc.name = \"j0\";\n                exc.retval = zero;\n                if (_LIB_VERSION == _POSIX_)\n                        errno = ERANGE;\n                else if (!matherr(&exc)) {\n                        if (_LIB_VERSION == _SVID_) {\n                                (void) WRITE2(exc.name, 2);\n                                (void) WRITE2(\": TLOSS error\\n\", 14);\n                        }\n                        errno = ERANGE;\n                }        \n\t\tbreak;\n\t    case 35:\n\t\t/* y0(x>X_TLOSS) */\n                exc.type = TLOSS;\n                exc.name = \"y0\";\n                exc.retval = zero;\n                if (_LIB_VERSION == _POSIX_)\n                        errno = ERANGE;\n                else if (!matherr(&exc)) {\n                        if (_LIB_VERSION == _SVID_) {\n                                (void) WRITE2(exc.name, 2);\n                                (void) WRITE2(\": TLOSS error\\n\", 14);\n                        }\n                        errno = ERANGE;\n                }        \n\t\tbreak;\n\t    case 36:\n\t\t/* j1(|x|>X_TLOSS) */\n                exc.type = TLOSS;\n                exc.name = \"j1\";\n                exc.retval = zero;\n                if (_LIB_VERSION == _POSIX_)\n                        errno = ERANGE;\n                else if (!matherr(&exc)) {\n                        if (_LIB_VERSION == _SVID_) {\n                                (void) WRITE2(exc.name, 2);\n                                (void) WRITE2(\": TLOSS error\\n\", 14);\n                        }\n                        errno = ERANGE;\n                }        \n\t\tbreak;\n\t    case 37:\n\t\t/* y1(x>X_TLOSS) */\n                exc.type = TLOSS;\n                exc.name = \"y1\";\n                exc.retval = zero;\n                if (_LIB_VERSION == _POSIX_)\n                        errno = ERANGE;\n                else if (!matherr(&exc)) {\n                        if (_LIB_VERSION == _SVID_) {\n                                (void) WRITE2(exc.name, 2);\n                                (void) WRITE2(\": TLOSS error\\n\", 14);\n                        }\n                        errno = ERANGE;\n                }        \n\t\tbreak;\n\t    case 38:\n\t\t/* jn(|x|>X_TLOSS) */\n                exc.type = TLOSS;\n                exc.name = \"jn\";\n                exc.retval = zero;\n                if (_LIB_VERSION == _POSIX_)\n                        errno = ERANGE;\n                else if (!matherr(&exc)) {\n                        if (_LIB_VERSION == _SVID_) {\n                                (void) WRITE2(exc.name, 2);\n                                (void) WRITE2(\": TLOSS error\\n\", 14);\n                        }\n                        errno = ERANGE;\n                }        \n\t\tbreak;\n\t    case 39:\n\t\t/* yn(x>X_TLOSS) */\n                exc.type = TLOSS;\n                exc.name = \"yn\";\n                exc.retval = zero;\n                if (_LIB_VERSION == _POSIX_)\n                        errno = ERANGE;\n                else if (!matherr(&exc)) {\n                        if (_LIB_VERSION == _SVID_) {\n                                (void) WRITE2(exc.name, 2);\n                                (void) WRITE2(\": TLOSS error\\n\", 14);\n                        }\n                        errno = ERANGE;\n                }        \n\t\tbreak;\n\t    case 40:\n\t\t/* gamma(finite) overflow */\n\t\texc.type = OVERFLOW;\n\t\texc.name = \"gamma\";\n                if (_LIB_VERSION == _SVID_)\n                  exc.retval = HUGE;\n                else\n                  exc.retval = HUGE_VAL;\n                if (_LIB_VERSION == _POSIX_)\n\t\t  errno = ERANGE;\n                else if (!matherr(&exc)) {\n                  errno = ERANGE;\n                }\n\t\tbreak;\n\t    case 41:\n\t\t/* gamma(-integer) or gamma(0) */\n\t\texc.type = SING;\n\t\texc.name = \"gamma\";\n                if (_LIB_VERSION == _SVID_)\n                  exc.retval = HUGE;\n                else\n                  exc.retval = HUGE_VAL;\n\t\tif (_LIB_VERSION == _POSIX_)\n\t\t  errno = EDOM;\n\t\telse if (!matherr(&exc)) {\n\t\t  if (_LIB_VERSION == _SVID_) {\n\t\t\t(void) WRITE2(\"gamma: SING error\\n\", 18);\n\t\t      }\n\t\t  errno = EDOM;\n\t\t}\n\t\tbreak;\n\t    case 42:\n\t\t/* pow(NaN,0.0) */\n\t\t/* error only if _LIB_VERSION == _SVID_ & _XOPEN_ */\n\t\texc.type = DOMAIN;\n\t\texc.name = \"pow\";\n\t\texc.retval = x;\n\t\tif (_LIB_VERSION == _IEEE_ ||\n\t\t    _LIB_VERSION == _POSIX_) exc.retval = 1.0;\n\t\telse if (!matherr(&exc)) {\n\t\t\terrno = EDOM;\n\t\t}\n\t\tbreak;\n\t}\n\treturn exc.retval; \n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/k_tan.c",
    "content": "#pragma ident \"@(#)k_tan.c 1.5 04/04/22 SMI\"\n\n/*\n * ====================================================\n * Copyright 2004 Sun Microsystems, Inc.  All Rights Reserved.\n *\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice\n * is preserved.\n * ====================================================\n */\n\n/* INDENT OFF */\n/* __kernel_tan( x, y, k )\n * kernel tan function on [-pi/4, pi/4], pi/4 ~ 0.7854\n * Input x is assumed to be bounded by ~pi/4 in magnitude.\n * Input y is the tail of x.\n * Input k indicates whether tan (if k = 1) or -1/tan (if k = -1) is returned.\n *\n * Algorithm\n *\t1. Since tan(-x) = -tan(x), we need only to consider positive x.\n *\t2. if x < 2^-28 (hx<0x3e300000 0), return x with inexact if x!=0.\n *\t3. tan(x) is approximated by a odd polynomial of degree 27 on\n *\t   [0,0.67434]\n *\t\t  \t         3             27\n *\t   \ttan(x) ~ x + T1*x + ... + T13*x\n *\t   where\n *\n * \t        |tan(x)         2     4            26   |     -59.2\n * \t        |----- - (1+T1*x +T2*x +.... +T13*x    )| <= 2\n * \t        |  x \t\t\t\t\t|\n *\n *\t   Note: tan(x+y) = tan(x) + tan'(x)*y\n *\t\t          ~ tan(x) + (1+x*x)*y\n *\t   Therefore, for better accuracy in computing tan(x+y), let\n *\t\t     3      2      2       2       2\n *\t\tr = x *(T2+x *(T3+x *(...+x *(T12+x *T13))))\n *\t   then\n *\t\t \t\t    3    2\n *\t\ttan(x+y) = x + (T1*x + (x *(r+y)+y))\n *\n *      4. For x in [0.67434,pi/4],  let y = pi/4 - x, then\n *\t\ttan(x) = tan(pi/4-y) = (1-tan(y))/(1+tan(y))\n *\t\t       = 1 - 2*(tan(y) - (tan(y)^2)/(1+tan(y)))\n */\n\n#include \"fdlibm.h\"\n\nstatic const double xxx[] = {\n\t\t 3.33333333333334091986e-01,\t/* 3FD55555, 55555563 */\n\t\t 1.33333333333201242699e-01,\t/* 3FC11111, 1110FE7A */\n\t\t 5.39682539762260521377e-02,\t/* 3FABA1BA, 1BB341FE */\n\t\t 2.18694882948595424599e-02,\t/* 3F9664F4, 8406D637 */\n\t\t 8.86323982359930005737e-03,\t/* 3F8226E3, E96E8493 */\n\t\t 3.59207910759131235356e-03,\t/* 3F6D6D22, C9560328 */\n\t\t 1.45620945432529025516e-03,\t/* 3F57DBC8, FEE08315 */\n\t\t 5.88041240820264096874e-04,\t/* 3F4344D8, F2F26501 */\n\t\t 2.46463134818469906812e-04,\t/* 3F3026F7, 1A8D1068 */\n\t\t 7.81794442939557092300e-05,\t/* 3F147E88, A03792A6 */\n\t\t 7.14072491382608190305e-05,\t/* 3F12B80F, 32F0A7E9 */\n\t\t-1.85586374855275456654e-05,\t/* BEF375CB, DB605373 */\n\t\t 2.59073051863633712884e-05,\t/* 3EFB2A70, 74BF7AD4 */\n/* one */\t 1.00000000000000000000e+00,\t/* 3FF00000, 00000000 */\n/* pio4 */\t 7.85398163397448278999e-01,\t/* 3FE921FB, 54442D18 */\n/* pio4lo */\t 3.06161699786838301793e-17\t/* 3C81A626, 33145C07 */\n};\n#define\tone\txxx[13]\n#define\tpio4\txxx[14]\n#define\tpio4lo\txxx[15]\n#define\tT\txxx\n/* INDENT ON */\n\ndouble\n__kernel_tan(double x, double y, int iy) {\n\tdouble z, r, v, w, s;\n\tint ix, hx;\n\n\thx = __HI(x);\t\t/* high word of x */\n\tix = hx & 0x7fffffff;\t\t\t/* high word of |x| */\n\tif (ix < 0x3e300000) {\t\t\t/* x < 2**-28 */\n\t\tif ((int) x == 0) {\t\t/* generate inexact */\n\t\t\tif (((ix | __LO(x)) | (iy + 1)) == 0)\n\t\t\t\treturn one / fabs(x);\n\t\t\telse {\n\t\t\t\tif (iy == 1)\n\t\t\t\t\treturn x;\n\t\t\t\telse {\t/* compute -1 / (x+y) carefully */\n\t\t\t\t\tdouble a, t;\n\n\t\t\t\t\tz = w = x + y;\n\t\t\t\t\t__LO(z) = 0;\n\t\t\t\t\tv = y - (z - x);\n\t\t\t\t\tt = a = -one / w;\n\t\t\t\t\t__LO(t) = 0;\n\t\t\t\t\ts = one + t * z;\n\t\t\t\t\treturn t + a * (s + t * v);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif (ix >= 0x3FE59428) {\t/* |x| >= 0.6744 */\n\t\tif (hx < 0) {\n\t\t\tx = -x;\n\t\t\ty = -y;\n\t\t}\n\t\tz = pio4 - x;\n\t\tw = pio4lo - y;\n\t\tx = z + w;\n\t\ty = 0.0;\n\t}\n\tz = x * x;\n\tw = z * z;\n\t/*\n\t * Break x^5*(T[1]+x^2*T[2]+...) into\n\t * x^5(T[1]+x^4*T[3]+...+x^20*T[11]) +\n\t * x^5(x^2*(T[2]+x^4*T[4]+...+x^22*[T12]))\n\t */\n\tr = T[1] + w * (T[3] + w * (T[5] + w * (T[7] + w * (T[9] +\n\t\tw * T[11]))));\n\tv = z * (T[2] + w * (T[4] + w * (T[6] + w * (T[8] + w * (T[10] +\n\t\tw * T[12])))));\n\ts = z * x;\n\tr = y + z * (s * (r + v) + y);\n\tr += T[0] * s;\n\tw = x + r;\n\tif (ix >= 0x3FE59428) {\n\t\tv = (double) iy;\n\t\treturn (double) (1 - ((hx >> 30) & 2)) *\n\t\t\t(v - 2.0 * (x - (w * w / (w + v) - r)));\n\t}\n\tif (iy == 1)\n\t\treturn w;\n\telse {\n\t\t/*\n\t\t * if allow error up to 2 ulp, simply return\n\t\t * -1.0 / (x+r) here\n\t\t */\n\t\t/* compute -1.0 / (x+r) accurately */\n\t\tdouble a, t;\n\t\tz = w;\n\t\t__LO(z) = 0;\n\t\tv = r - (z - x);\t/* z+v = r+x */\n\t\tt = a = -1.0 / w;\t/* a = -1.0/w */\n\t\t__LO(t) = 0;\n\t\ts = 1.0 + t * z;\n\t\treturn t + a * (s + t * v);\n\t}\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/makefile",
    "content": "#\n#  @(#)Makefile 1.4 95/01/18 \n# \n#  ====================================================\n#  Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n# \n#  Developed at SunSoft, a Sun Microsystems, Inc. business.\n#  Permission to use, copy, modify, and distribute this\n#  software is freely granted, provided that this notice \n#  is preserved.\n#  ====================================================\n# \n# \n\n#\n# There are two options in making libm at fdlibm compile time:\n# \t_IEEE_LIBM \t--- IEEE libm; smaller, and somewhat faster\n#\t_MULTI_LIBM\t--- Support multi-standard at runtime by \n#\t\t\t    imposing wrapper functions defined in \n#\t\t\t    fdlibm.h:\n#\t\t\t\t_IEEE_MODE \t-- IEEE\n#\t\t\t\t_XOPEN_MODE \t-- X/OPEN\n#\t\t\t\t_POSIX_MODE \t-- POSIX/ANSI\n#\t\t\t\t_SVID3_MODE \t-- SVID\n#\n# Here is how to set up CFLAGS to create the desired libm at \n# compile time:\n#\n# \tCFLAGS = -D_IEEE_LIBM\t\t... IEEE libm (recommended)\n#\tCFLAGS = -D_SVID3_MODE\t... Multi-standard supported\n#\t\t\t\t\t    libm with SVID as the \n#\t\t\t\t\t    default standard\n#\tCFLAGS = -D_XOPEN_MODE\t... Multi-standard supported\n#\t\t\t\t\t    libm with XOPEN as the \n#\t\t\t\t\t    default standard\n#\tCFLAGS = -D_POSIX_MODE\t... Multi-standard supported\n#\t\t\t\t\t    libm with POSIX as the \n#\t\t\t\t\t    default standard\n#\tCFLAGS = \t\t\t... Multi-standard supported\n#\t\t\t\t\t    libm with IEEE as the \n#\t\t\t\t\t    default standard\n# \n# NOTE: if scalb's second arguement is an int, then one must\n# define _SCALB_INT in CFLAGS. The default prototype of scalb\n# is double scalb(double, double)\n#\n\n\n#\n# Default IEEE libm\n#\nCFLAGS = -D_IEEE_LIBM \n\nCC = cc\n\nINCFILES = fdlibm.h\n.INIT: $(INCFILES)\n.KEEP_STATE:\nsrc = \tk_standard.c k_rem_pio2.c \\\n\tk_cos.c k_sin.c k_tan.c \\\n\te_acos.c e_acosh.c e_asin.c e_atan2.c \\\n\te_atanh.c e_cosh.c e_exp.c e_fmod.c \\\n\te_gamma.c e_gamma_r.c e_hypot.c e_j0.c \\\n\te_j1.c e_jn.c e_lgamma.c e_lgamma_r.c \\\n\te_log.c e_log10.c e_pow.c e_rem_pio2.c e_remainder.c \\\n\te_scalb.c e_sinh.c e_sqrt.c \\\n\tw_acos.c w_acosh.c w_asin.c w_atan2.c \\\n\tw_atanh.c w_cosh.c w_exp.c w_fmod.c \\\n\tw_gamma.c w_gamma_r.c w_hypot.c w_j0.c \\\n\tw_j1.c w_jn.c w_lgamma.c w_lgamma_r.c \\\n\tw_log.c w_log10.c w_pow.c w_remainder.c \\\n\tw_scalb.c w_sinh.c w_sqrt.c \\\n\ts_asinh.c s_atan.c s_cbrt.c s_ceil.c s_copysign.c \\\n\ts_cos.c s_erf.c s_expm1.c s_fabs.c s_finite.c s_floor.c \\\n\ts_frexp.c s_ilogb.c s_isnan.c s_ldexp.c s_lib_version.c \\\n\ts_log1p.c s_logb.c s_matherr.c s_modf.c s_nextafter.c \\\n\ts_rint.c s_scalbn.c s_signgam.c s_significand.c s_sin.c \\\n\ts_tan.c s_tanh.c\n\nobj = \tk_standard.o k_rem_pio2.o \\\n\tk_cos.o k_sin.o k_tan.o \\\n\te_acos.o e_acosh.o e_asin.o e_atan2.o \\\n\te_atanh.o e_cosh.o e_exp.o e_fmod.o \\\n\te_gamma.o e_gamma_r.o e_hypot.o e_j0.o \\\n\te_j1.o e_jn.o e_lgamma.o e_lgamma_r.o \\\n\te_log.o e_log10.o e_pow.o e_rem_pio2.o e_remainder.o  \\\n\te_scalb.o e_sinh.o e_sqrt.o \\\n\tw_acos.o w_acosh.o w_asin.o w_atan2.o \\\n\tw_atanh.o w_cosh.o w_exp.o w_fmod.o \\\n\tw_gamma.o w_gamma_r.o w_hypot.o w_j0.o \\\n\tw_j1.o w_jn.o w_lgamma.o w_lgamma_r.o \\\n\tw_log.o w_log10.o w_pow.o w_remainder.o \\\n\tw_scalb.o w_sinh.o w_sqrt.o \\\n\ts_asinh.o s_atan.o s_cbrt.o s_ceil.o s_copysign.o \\\n\ts_cos.o s_erf.o s_expm1.o s_fabs.o s_finite.o s_floor.o \\\n\ts_frexp.o s_ilogb.o s_isnan.o s_ldexp.o s_lib_version.o \\\n\ts_log1p.o s_logb.o s_matherr.o s_modf.o s_nextafter.o \\\n\ts_rint.o s_scalbn.o s_signgam.o s_significand.o s_sin.o \\\n\ts_tan.o s_tanh.o\n\nall: libm.a \n\nlibm.a : $(obj) \n\tar cru libm.a $(obj)\n\tranlib libm.a\n\nsource: $(src) README\n\nclean: \n\t/bin/rm -f $(obj) a.out libm.a\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/makefile.in",
    "content": "#\n#  @(#)Makefile 1.4 95/01/18\n#\n#  ====================================================\n#  Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n#\n#  Developed at SunSoft, a Sun Microsystems, Inc. business.\n#  Permission to use, copy, modify, and distribute this\n#  software is freely granted, provided that this notice\n#  is preserved.\n#  ====================================================\n#\n#\n\n#\n# There are two options in making libm at fdlibm compile time:\n# \t_IEEE_LIBM \t--- IEEE libm; smaller, and somewhat faster\n#\t_MULTI_LIBM\t--- Support multi-standard at runtime by\n#\t\t\t    imposing wrapper functions defined in\n#\t\t\t    fdlibm.h:\n#\t\t\t\t_IEEE_MODE \t-- IEEE\n#\t\t\t\t_XOPEN_MODE \t-- X/OPEN\n#\t\t\t\t_POSIX_MODE \t-- POSIX/ANSI\n#\t\t\t\t_SVID3_MODE \t-- SVID\n#\n# Here is how to set up CFLAGS to create the desired libm at\n# compile time:\n#\n# \tCFLAGS = -D_IEEE_LIBM\t\t... IEEE libm (recommended)\n#\tCFLAGS = -D_SVID3_MODE\t... Multi-standard supported\n#\t\t\t\t\t    libm with SVID as the\n#\t\t\t\t\t    default standard\n#\tCFLAGS = -D_XOPEN_MODE\t... Multi-standard supported\n#\t\t\t\t\t    libm with XOPEN as the\n#\t\t\t\t\t    default standard\n#\tCFLAGS = -D_POSIX_MODE\t... Multi-standard supported\n#\t\t\t\t\t    libm with POSIX as the\n#\t\t\t\t\t    default standard\n#\tCFLAGS = \t\t\t... Multi-standard supported\n#\t\t\t\t\t    libm with IEEE as the\n#\t\t\t\t\t    default standard\n#\n# NOTE: if scalb's second arguement is an int, then one must\n# define _SCALB_INT in CFLAGS. The default prototype of scalb\n# is double scalb(double, double)\n#\n\nprefix\t= @prefix@\n\nAR\t= @AR@\n\nCC\t= @CC@\n\n#\n# Default IEEE libm\n#\nCFLAGS\t= @CFLAGS@ -D_IEEE_LIBM\n\nCHMOD\t= @CHMOD@\n\nCP\t= @CP@\n\nINCFILES = fdlibm.h\n\nLDFLAGS\t= @LDFLAGS@\n\nLIB\t= libfdm.a\n\nLIBS\t= @LIBS@\n\nRANLIB\t= @RANLIB@\n\nRM\t= @RM@ -f\n\n.INIT: $(INCFILES)\n\n.KEEP_STATE:\n\nsrc = \tk_standard.c k_rem_pio2.c \\\n\tk_cos.c k_sin.c k_tan.c \\\n\te_acos.c e_acosh.c e_asin.c e_atan2.c \\\n\te_atanh.c e_cosh.c e_exp.c e_fmod.c \\\n\te_gamma.c e_gamma_r.c e_hypot.c e_j0.c \\\n\te_j1.c e_jn.c e_lgamma.c e_lgamma_r.c \\\n\te_log.c e_log10.c e_pow.c e_rem_pio2.c e_remainder.c \\\n\te_scalb.c e_sinh.c e_sqrt.c \\\n\tw_acos.c w_acosh.c w_asin.c w_atan2.c \\\n\tw_atanh.c w_cosh.c w_exp.c w_fmod.c \\\n\tw_gamma.c w_gamma_r.c w_hypot.c w_j0.c \\\n\tw_j1.c w_jn.c w_lgamma.c w_lgamma_r.c \\\n\tw_log.c w_log10.c w_pow.c w_remainder.c \\\n\tw_scalb.c w_sinh.c w_sqrt.c \\\n\ts_asinh.c s_atan.c s_cbrt.c s_ceil.c s_copysign.c \\\n\ts_cos.c s_erf.c s_expm1.c s_fabs.c s_finite.c s_floor.c \\\n\ts_frexp.c s_ilogb.c s_isnan.c s_ldexp.c s_lib_version.c \\\n\ts_log1p.c s_logb.c s_matherr.c s_modf.c s_nextafter.c \\\n\ts_rint.c s_scalbn.c s_signgam.c s_significand.c s_sin.c \\\n\ts_tan.c s_tanh.c\n\nobj = \tk_standard.o k_rem_pio2.o \\\n\tk_cos.o k_sin.o k_tan.o \\\n\te_acos.o e_acosh.o e_asin.o e_atan2.o \\\n\te_atanh.o e_cosh.o e_exp.o e_fmod.o \\\n\te_gamma.o e_gamma_r.o e_hypot.o e_j0.o \\\n\te_j1.o e_jn.o e_lgamma.o e_lgamma_r.o \\\n\te_log.o e_log10.o e_pow.o e_rem_pio2.o e_remainder.o  \\\n\te_scalb.o e_sinh.o e_sqrt.o \\\n\tw_acos.o w_acosh.o w_asin.o w_atan2.o \\\n\tw_atanh.o w_cosh.o w_exp.o w_fmod.o \\\n\tw_gamma.o w_gamma_r.o w_hypot.o w_j0.o \\\n\tw_j1.o w_jn.o w_lgamma.o w_lgamma_r.o \\\n\tw_log.o w_log10.o w_pow.o w_remainder.o \\\n\tw_scalb.o w_sinh.o w_sqrt.o \\\n\ts_asinh.o s_atan.o s_cbrt.o s_ceil.o s_copysign.o \\\n\ts_cos.o s_erf.o s_expm1.o s_fabs.o s_finite.o s_floor.o \\\n\ts_frexp.o s_ilogb.o s_isnan.o s_ldexp.o s_lib_version.o \\\n\ts_log1p.o s_logb.o s_matherr.o s_modf.o s_nextafter.o \\\n\ts_rint.o s_scalbn.o s_signgam.o s_significand.o s_sin.o \\\n\ts_tan.o s_tanh.o\n\nall: $(LIB)\n\ncheck:\n\t@echo This package does not have a validation suite.\n\nclean:\n\t-$(RM) *~ #* core a.out\n\ndistclean:\tmostlyclean\n\t-$(RM) $(LIB)\n\t-$(RM) -r autom4te.cache/\n\t-$(RM) config.cache config.log config.status Makefile\n\ninstall:\t$(LIB) uninstall\n\t$(CP) $(LIB) $(prefix)/lib/$(LIB)\n\t$(CHMOD) 664 $(prefix)/lib/$(LIB)\n\t$(RANLIB) $(prefix)/lib/$(LIB) || true\n\n$(LIB) : $(obj)\n\t$(AR) cru $(LIB) $(obj)\n\t$(RANLIB) $(LIB) || true\n\nmaintainer-clean:\tdistclean\n\t@echo \"This command is intended for maintainers to use;\"\n\t@echo \"it deletes files that may require special tools to rebuild.\"\n\t-$(RM) configure\n\nmostlyclean:\tclean\n\t-$(RM) $(obj)\n\nsource: $(src) README\n\nuninstall:\n\t-$(RM) $(prefix)/lib/$(LIB)\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/readme",
    "content": "\n\t  *********************************\n \t  * Announcing FDLIBM Version 5.3 *\n\t  *********************************\n============================================================\n\t\t\tFDLIBM\n============================================================\n\tdeveloped at Sun Microsystems, Inc. \n\nWhat's new in FDLIBM 5.3?\n\nCONFIGURE\n\tTo build FDLIBM, edit the supplied Makefile or create\n\ta local Makefile by running \"sh configure\" \n\tusing the supplied configure script contributed by Nelson Beebe\n\nBUGS FIXED\n\n    1. e_pow.c incorrect results when \n\tx is very close to -1.0 and y is very large, e.g.\n  \tpow(-1.0000000000000002e+00,4.5035996273704970e+15) = 0\n  \tpow(-9.9999999999999978e-01,4.5035996273704970e+15) = 0\n\tCorrect results are close to -e and -1/e.\n\n    2. k_tan.c error was > 1 ulp target for FDLIBM\n\t5.2: Worst error at least 1.45 ulp at\n\ttan(1.7765241907548024E+269) = 1.7733884462610958E+16\n\t5.3: Worst error 0.96 ulp\n\nNOT FIXED YET\n\n    3. Compiler failure on non-standard code\n\tStatements like\n\t            *(1+(int*)&t1) = 0;\n\tare not standard C and cause some optimizing compilers (e.g. GCC)\n\tto generate bad code under optimization.    These cases\n\tare to be addressed in the next release.\n\t\nFDLIBM (Freely Distributable LIBM) is a C math library \nfor machines that support IEEE 754 floating-point arithmetic. \nIn this release, only double precision is supported.\n\nFDLIBM is intended to provide a reasonably portable (see \nassumptions below), reference quality (below one ulp for\nmajor functions like sin,cos,exp,log) math library \n(libm.a).  For a copy of FDLIBM, please see\n\thttp://www.netlib.org/fdlibm/\nor\n\thttp://www.validlab.com/software/\n\n--------------\n1. ASSUMPTIONS\n--------------\nFDLIBM (double precision version) assumes:\n a.  IEEE 754 style (if not precise compliance) arithmetic;\n b.  32 bit 2's complement integer arithmetic;\n c.  Each double precision floating-point number must be in IEEE 754 \n     double format, and that each number can be retrieved as two 32-bit \n     integers through the using of pointer bashing as in the example \n     below:\n\n     Example: let y = 2.0\n\tdouble fp number y: \t2.0\n\tIEEE double format:\t0x4000000000000000\n\n\tReferencing y as two integers:\n\t*(int*)&y,*(1+(int*)&y) =\t{0x40000000,0x0} (on sparc)\n\t\t\t\t\t{0x0,0x40000000} (on 386)\n\n\tNote: Four macros are defined in fdlibm.h to handle this kind of\n\tretrieving:\n\n\t__HI(x)\t\tthe high part of a double x \n\t\t\t(sign,exponent,the first 21 significant bits)\n\t__LO(x)\t\tthe least 32 significant bits of x\n\t__HIp(x)\tsame as __HI except that the argument is a pointer\n\t\t\tto a double\n\t__LOp(x)\tsame as __LO except that the argument is a pointer\n\t\t\tto a double\n\t\n\tTo ensure obtaining correct ordering, one must define  __LITTLE_ENDIAN\n\tduring compilation for little endian machine (like 386,486). The \n\tdefault is big endian.\n\n\tIf the behavior of pointer bashing is undefined, one may hack on the \n\tmacro in fdlibm.h.\n\t\n  d. IEEE exceptions may trigger \"signals\" as is common in Unix\n     implementations. \n\n-------------------\n2. EXCEPTION CASES\n-------------------\nAll exception cases in the FDLIBM functions will be mapped\nto one of the following four exceptions:\n\n   +-huge*huge, +-tiny*tiny,    +-1.0/0.0,\t+-0.0/0.0\n    (overflow)\t(underflow)  (divided-by-zero) \t(invalid)\n\nFor example, log(0) is a singularity and is thus mapped to \n\t-1.0/0.0 = -infinity.\nThat is, FDLIBM's log will compute -one/zero and return the\ncomputed value.  On an IEEE machine, this will trigger the \ndivided-by-zero exception and a negative infinity is returned by \ndefault.\n\nSimilarly, exp(-huge) will be mapped to tiny*tiny to generate\nan underflow signal. \n\n\n--------------------------------\n3. STANDARD CONFORMANCE WRAPPER \n--------------------------------\nThe default FDLIBM functions (compiled with -D_IEEE_LIBM flag)  \nare in \"IEEE spirit\" (i.e., return the most reasonable result in \nfloating-point arithmetic). If one wants FDLIBM to comply with\nstandards like SVID, X/OPEN, or POSIX/ANSI, then one can \ncreate a multi-standard compliant FDLIBM. In this case, each\nfunction in FDLIBM is actually a standard compliant wrapper\nfunction.  \n\nFile organization:\n    1. For FDLIBM's kernel (internal) function,\n\t\tFile name\tEntry point\n\t\t---------------------------\n\t\tk_sin.c\t\t__kernel_sin\n\t\tk_tan.c\t\t__kernel_tan\n\t\t---------------------------\n    2. For functions that have no standards conflict \n\t\tFile name\tEntry point\n\t\t---------------------------\n\t\ts_sin.c\t\tsin\n\t\ts_erf.c\t\terf\n\t\t---------------------------\n    3. Ieee754 core functions\n\t\tFile name\tEntry point\n\t\t---------------------------\n\t\te_exp.c\t\t__ieee754_exp\n\t\te_sinh.c\t__ieee754_sinh\n\t\t---------------------------\n    4. Wrapper functions\n\t\tFile name\tEntry point\n\t\t---------------------------\n\t\tw_exp.c\t\texp\n\t\tw_sinh.c\tsinh\n\t\t---------------------------\n\nWrapper functions will twist the result of the ieee754 \nfunction to comply to the standard specified by the value \nof _LIB_VERSION \n    if _LIB_VERSION = _IEEE_, return the ieee754 result;\n    if _LIB_VERSION = _SVID_, return SVID result;\n    if _LIB_VERSION = _XOPEN_, return XOPEN result;\n    if _LIB_VERSION = _POSIX_, return POSIX/ANSI result.\n(These are macros, see fdlibm.h for their definition.)\n\n\n--------------------------------\n4. HOW TO CREATE FDLIBM's libm.a\n--------------------------------\nThere are two types of libm.a. One is IEEE only, and the other is\nmulti-standard compliant (supports IEEE,XOPEN,POSIX/ANSI,SVID).\n\nTo create the IEEE only libm.a, use \n\t    make \"CFLAGS = -D_IEEE_LIBM\"\t \nThis will create an IEEE libm.a, which is smaller in size, and \nsomewhat faster.\n\nTo create a multi-standard compliant libm, use\n    make \"CFLAGS = -D_IEEE_MODE\"   --- multi-standard fdlibm: default\n\t\t\t\t\t to IEEE\n    make \"CFLAGS = -D_XOPEN_MODE\"  --- multi-standard fdlibm: default\n\t\t\t\t\t to X/OPEN\n    make \"CFLAGS = -D_POSIX_MODE\"  --- multi-standard fdlibm: default\n\t\t\t\t\t to POSIX/ANSI\n    make \"CFLAGS = -D_SVID3_MODE\"  --- multi-standard fdlibm: default\n\t\t\t\t\t to SVID\n\n\nHere is how one makes a SVID compliant libm.\n    Make the library by\n\t\tmake \"CFLAGS = -D_SVID3_MODE\".\n    The libm.a of FDLIBM will be multi-standard compliant and \n    _LIB_VERSION is initialized to the value _SVID_ . \n\n    example1:\n    ---------\n\t    main()\n\t    {\n\t\tdouble y0();\n\t\tprintf(\"y0(1e300) = %1.20e\\n\",y0(1e300));\n\t\texit(0);\n\t    }\n\n    % cc example1.c libm.a\n    % a.out\n    y0: TLOSS error\n    y0(1e300) = 0.00000000000000000000e+00\n\n\nIt is possible to change the default standard in multi-standard \nfdlibm. Here is an example of how to do it:\n    example2:\n    ---------\n\t#include \"fdlibm.h\"\t/* must include FDLIBM's fdlibm.h */\n\tmain()\n\t{\n\t\tdouble y0();\n\t\t_LIB_VERSION =  _IEEE_;\n\t\tprintf(\"IEEE: y0(1e300) = %1.20e\\n\",y0(1e300));\n\t\t_LIB_VERSION = _XOPEN_;\n\t\tprintf(\"XOPEN y0(1e300) = %1.20e\\n\",y0(1e300));\n\t\t_LIB_VERSION = _POSIX_;\n\t\tprintf(\"POSIX y0(1e300) = %1.20e\\n\",y0(1e300));\n\t\t_LIB_VERSION = _SVID_;\n\t\tprintf(\"SVID  y0(1e300) = %1.20e\\n\",y0(1e300));\n\t\texit(0);\n\t}\n\n    % cc example2.c libm.a\n    % a.out\n      IEEE: y0(1e300) = -1.36813604503424810557e-151\n      XOPEN y0(1e300) = 0.00000000000000000000e+00\n      POSIX y0(1e300) = 0.00000000000000000000e+00\n      y0: TLOSS error\n      SVID  y0(1e300) = 0.00000000000000000000e+00\n\nNote:\tHere _LIB_VERSION is a global variable. If global variables \n\tare forbidden, then one should modify fdlibm.h to change\n\t_LIB_VERSION to be a global constant. In this case, one\n\tmay not change the value of _LIB_VERSION as in example2.\n\n---------------------------\n5. NOTES ON PORTING FDLIBM\n---------------------------\n\tCare must be taken when installing FDLIBM over existing\n\tlibm.a.\n\tAll co-existing function prototypes must agree, otherwise\n\tusers will encounter mysterious failures.\n\n\tSo far, the only known likely conflict is the declaration \n\tof the IEEE recommended function scalb:\n\n\t\tdouble scalb(double,double)\t(1)\tSVID3 defined\n\t\tdouble scalb(double,int)\t(2)\tIBM,DEC,...\n\n\tFDLIBM follows Sun definition and use (1) as default. \n\tIf one's existing libm.a uses (2), then one may raise\n\tthe flags _SCALB_INT during the compilation of FDLIBM\n\tto get the correct function prototype.\n\t(E.g., make \"CFLAGS = -D_IEEE_LIBM -D_SCALB_INT\".)\n\tNOTE that if -D_SCALB_INT is raised, it won't be SVID3\n\tconformant.\n\n--------------\n6. PROBLEMS ?\n--------------\nPlease send comments and bug reports to the electronic mail address\nsuggested by: \n\t\tfdlibm-comments AT sun.com\n\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/s_asinh.c",
    "content": "\n/* @(#)s_asinh.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* asinh(x)\n * Method :\n *\tBased on \n *\t\tasinh(x) = sign(x) * log [ |x| + sqrt(x*x+1) ]\n *\twe have\n *\tasinh(x) := x  if  1+x*x=1,\n *\t\t := sign(x)*(log(x)+ln2)) for large |x|, else\n *\t\t := sign(x)*log(2|x|+1/(|x|+sqrt(x*x+1))) if|x|>2, else\n *\t\t := sign(x)*log1p(|x| + x^2/(1 + sqrt(1+x^2)))  \n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic const double \n#else\nstatic double \n#endif\none =  1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */\nln2 =  6.93147180559945286227e-01, /* 0x3FE62E42, 0xFEFA39EF */\nhuge=  1.00000000000000000000e+300; \n\n#ifdef __STDC__\n\tdouble asinh(double x)\n#else\n\tdouble asinh(x)\n\tdouble x;\n#endif\n{\t\n\tdouble t,w;\n\tint hx,ix;\n\thx = __HI(x);\n\tix = hx&0x7fffffff;\n\tif(ix>=0x7ff00000) return x+x;\t/* x is inf or NaN */\n\tif(ix< 0x3e300000) {\t/* |x|<2**-28 */\n\t    if(huge+x>one) return x;\t/* return x inexact except 0 */\n\t} \n\tif(ix>0x41b00000) {\t/* |x| > 2**28 */\n\t    w = __ieee754_log(fabs(x))+ln2;\n\t} else if (ix>0x40000000) {\t/* 2**28 > |x| > 2.0 */\n\t    t = fabs(x);\n\t    w = __ieee754_log(2.0*t+one/(sqrt(x*x+one)+t));\n\t} else {\t\t/* 2.0 > |x| > 2**-28 */\n\t    t = x*x;\n\t    w =log1p(fabs(x)+t/(one+sqrt(one+t)));\n\t}\n\tif(hx>0) return w; else return -w;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/s_atan.c",
    "content": "\n/* @(#)s_atan.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n *\n */\n\n/* atan(x)\n * Method\n *   1. Reduce x to positive by atan(x) = -atan(-x).\n *   2. According to the integer k=4t+0.25 chopped, t=x, the argument\n *      is further reduced to one of the following intervals and the\n *      arctangent of t is evaluated by the corresponding formula:\n *\n *      [0,7/16]      atan(x) = t-t^3*(a1+t^2*(a2+...(a10+t^2*a11)...)\n *      [7/16,11/16]  atan(x) = atan(1/2) + atan( (t-0.5)/(1+t/2) )\n *      [11/16.19/16] atan(x) = atan( 1 ) + atan( (t-1)/(1+t) )\n *      [19/16,39/16] atan(x) = atan(3/2) + atan( (t-1.5)/(1+1.5t) )\n *      [39/16,INF]   atan(x) = atan(INF) + atan( -1/t )\n *\n * Constants:\n * The hexadecimal values are the intended ones for the following \n * constants. The decimal values may be used, provided that the \n * compiler will convert from decimal to binary accurately enough \n * to produce the hexadecimal values shown.\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic const double atanhi[] = {\n#else\nstatic double atanhi[] = {\n#endif\n  4.63647609000806093515e-01, /* atan(0.5)hi 0x3FDDAC67, 0x0561BB4F */\n  7.85398163397448278999e-01, /* atan(1.0)hi 0x3FE921FB, 0x54442D18 */\n  9.82793723247329054082e-01, /* atan(1.5)hi 0x3FEF730B, 0xD281F69B */\n  1.57079632679489655800e+00, /* atan(inf)hi 0x3FF921FB, 0x54442D18 */\n};\n\n#ifdef __STDC__\nstatic const double atanlo[] = {\n#else\nstatic double atanlo[] = {\n#endif\n  2.26987774529616870924e-17, /* atan(0.5)lo 0x3C7A2B7F, 0x222F65E2 */\n  3.06161699786838301793e-17, /* atan(1.0)lo 0x3C81A626, 0x33145C07 */\n  1.39033110312309984516e-17, /* atan(1.5)lo 0x3C700788, 0x7AF0CBBD */\n  6.12323399573676603587e-17, /* atan(inf)lo 0x3C91A626, 0x33145C07 */\n};\n\n#ifdef __STDC__\nstatic const double aT[] = {\n#else\nstatic double aT[] = {\n#endif\n  3.33333333333329318027e-01, /* 0x3FD55555, 0x5555550D */\n -1.99999999998764832476e-01, /* 0xBFC99999, 0x9998EBC4 */\n  1.42857142725034663711e-01, /* 0x3FC24924, 0x920083FF */\n -1.11111104054623557880e-01, /* 0xBFBC71C6, 0xFE231671 */\n  9.09088713343650656196e-02, /* 0x3FB745CD, 0xC54C206E */\n -7.69187620504482999495e-02, /* 0xBFB3B0F2, 0xAF749A6D */\n  6.66107313738753120669e-02, /* 0x3FB10D66, 0xA0D03D51 */\n -5.83357013379057348645e-02, /* 0xBFADDE2D, 0x52DEFD9A */\n  4.97687799461593236017e-02, /* 0x3FA97B4B, 0x24760DEB */\n -3.65315727442169155270e-02, /* 0xBFA2B444, 0x2C6A6C2F */\n  1.62858201153657823623e-02, /* 0x3F90AD3A, 0xE322DA11 */\n};\n\n#ifdef __STDC__\n\tstatic const double \n#else\n\tstatic double \n#endif\none   = 1.0,\nhuge   = 1.0e300;\n\n#ifdef __STDC__\n\tdouble __ieee754_atan(double x)\n#else\n\tdouble __ieee754_atan(x)\n\tdouble x;\n#endif\n{\n\tdouble w,s1,s2,z;\n\tint ix,hx,id;\n\n\thx = __HI(x);\n\tix = hx&0x7fffffff;\n\tif(ix>=0x44100000) {\t/* if |x| >= 2^66 */\n\t    if(ix>0x7ff00000||\n\t\t(ix==0x7ff00000&&(__LO(x)!=0)))\n\t\treturn x+x;\t\t/* NaN */\n\t    if(hx>0) return  atanhi[3]+atanlo[3];\n\t    else     return -atanhi[3]-atanlo[3];\n\t} if (ix < 0x3fdc0000) {\t/* |x| < 0.4375 */\n\t    if (ix < 0x3e200000) {\t/* |x| < 2^-29 */\n\t\tif(huge+x>one) return x;\t/* raise inexact */\n\t    }\n\t    id = -1;\n\t} else {\n\tx = fabs(x);\n\tif (ix < 0x3ff30000) {\t\t/* |x| < 1.1875 */\n\t    if (ix < 0x3fe60000) {\t/* 7/16 <=|x|<11/16 */\n\t\tid = 0; x = (2.0*x-one)/(2.0+x); \n\t    } else {\t\t\t/* 11/16<=|x|< 19/16 */\n\t\tid = 1; x  = (x-one)/(x+one); \n\t    }\n\t} else {\n\t    if (ix < 0x40038000) {\t/* |x| < 2.4375 */\n\t\tid = 2; x  = (x-1.5)/(one+1.5*x);\n\t    } else {\t\t\t/* 2.4375 <= |x| < 2^66 */\n\t\tid = 3; x  = -1.0/x;\n\t    }\n\t}}\n    /* end of argument reduction */\n\tz = x*x;\n\tw = z*z;\n    /* break sum from i=0 to 10 aT[i]z**(i+1) into odd and even poly */\n\ts1 = z*(aT[0]+w*(aT[2]+w*(aT[4]+w*(aT[6]+w*(aT[8]+w*aT[10])))));\n\ts2 = w*(aT[1]+w*(aT[3]+w*(aT[5]+w*(aT[7]+w*aT[9]))));\n\tif (id<0) return x - x*(s1+s2);\n\telse {\n\t    z = atanhi[id] - ((x*(s1+s2) - atanlo[id]) - x);\n\t    return (hx<0)? -z:z;\n\t}\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/s_cbrt.c",
    "content": "\n/* @(#)s_cbrt.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n *\n */\n\n#include \"fdlibm.h\"\n\n/* cbrt(x)\n * Return cube root of x\n */\n#ifdef __STDC__\nstatic const unsigned \n#else\nstatic unsigned \n#endif\n\tB1 = 715094163, /* B1 = (682-0.03306235651)*2**20 */\n\tB2 = 696219795; /* B2 = (664-0.03306235651)*2**20 */\n\n#ifdef __STDC__\nstatic const double\n#else\nstatic double\n#endif\nC =  5.42857142857142815906e-01, /* 19/35     = 0x3FE15F15, 0xF15F15F1 */\nD = -7.05306122448979611050e-01, /* -864/1225 = 0xBFE691DE, 0x2532C834 */\nE =  1.41428571428571436819e+00, /* 99/70     = 0x3FF6A0EA, 0x0EA0EA0F */\nF =  1.60714285714285720630e+00, /* 45/28     = 0x3FF9B6DB, 0x6DB6DB6E */\nG =  3.57142857142857150787e-01; /* 5/14      = 0x3FD6DB6D, 0xB6DB6DB7 */\n\n#ifdef __STDC__\n\tdouble cbrt(double x) \n#else\n\tdouble cbrt(x) \n\tdouble x;\n#endif\n{\n\tint\thx;\n\tdouble r,s,t=0.0,w;\n\tunsigned sign;\n\n\n\thx = __HI(x);\t\t/* high word of x */\n\tsign=hx&0x80000000; \t\t/* sign= sign(x) */\n\thx  ^=sign;\n\tif(hx>=0x7ff00000) return(x+x); /* cbrt(NaN,INF) is itself */\n\tif((hx|__LO(x))==0) \n\t    return(x);\t\t/* cbrt(0) is itself */\n\n\t__HI(x) = hx;\t/* x <- |x| */\n    /* rough cbrt to 5 bits */\n\tif(hx<0x00100000) \t\t/* subnormal number */\n\t  {__HI(t)=0x43500000; \t\t/* set t= 2**54 */\n\t   t*=x; __HI(t)=__HI(t)/3+B2;\n\t  }\n\telse\n\t  __HI(t)=hx/3+B1;\t\n\n\n    /* new cbrt to 23 bits, may be implemented in single precision */\n\tr=t*t/x;\n\ts=C+r*t;\n\tt*=G+F/(s+E+D/s);\t\n\n    /* chopped to 20 bits and make it larger than cbrt(x) */ \n\t__LO(t)=0; __HI(t)+=0x00000001;\n\n\n    /* one step newton iteration to 53 bits with error less than 0.667 ulps */\n\ts=t*t;\t\t/* t*t is exact */\n\tr=x/s;\n\tw=t+t;\n\tr=(r-t)/(w+r);\t/* r-s is exact */\n\tt=t+t*r;\n\n    /* retore the sign bit */\n\t__HI(t) |= sign;\n\treturn(t);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/s_ceil.c",
    "content": "\n/* @(#)s_ceil.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/*\n * ceil(x)\n * Return x rounded toward -inf to integral value\n * Method:\n *\tBit twiddling.\n * Exception:\n *\tInexact flag raised if x not equal to ceil(x).\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic const double huge = 1.0e300;\n#else\nstatic double huge = 1.0e300;\n#endif\n\n#ifdef __STDC__\n\tdouble ceil(double x)\n#else\n\tdouble ceil(x)\n\tdouble x;\n#endif\n{\n\tint i0,i1,j0;\n\tunsigned i,j;\n\ti0 =  __HI(x);\n\ti1 =  __LO(x);\n\tj0 = ((i0>>20)&0x7ff)-0x3ff;\n\tif(j0<20) {\n\t    if(j0<0) { \t/* raise inexact if x != 0 */\n\t\tif(huge+x>0.0) {/* return 0*sign(x) if |x|<1 */\n\t\t    if(i0<0) {i0=0x80000000;i1=0;} \n\t\t    else if((i0|i1)!=0) { i0=0x3ff00000;i1=0;}\n\t\t}\n\t    } else {\n\t\ti = (0x000fffff)>>j0;\n\t\tif(((i0&i)|i1)==0) return x; /* x is integral */\n\t\tif(huge+x>0.0) {\t/* raise inexact flag */\n\t\t    if(i0>0) i0 += (0x00100000)>>j0;\n\t\t    i0 &= (~i); i1=0;\n\t\t}\n\t    }\n\t} else if (j0>51) {\n\t    if(j0==0x400) return x+x;\t/* inf or NaN */\n\t    else return x;\t\t/* x is integral */\n\t} else {\n\t    i = ((unsigned)(0xffffffff))>>(j0-20);\n\t    if((i1&i)==0) return x;\t/* x is integral */\n\t    if(huge+x>0.0) { \t\t/* raise inexact flag */\n\t\tif(i0>0) {\n\t\t    if(j0==20) i0+=1; \n\t\t    else {\n\t\t\tj = i1 + (1<<(52-j0));\n\t\t\tif(j<i1) i0+=1;\t/* got a carry */\n\t\t\ti1 = j;\n\t\t    }\n\t\t}\n\t\ti1 &= (~i);\n\t    }\n\t}\n\t__HI(x) = i0;\n\t__LO(x) = i1;\n\treturn x;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/s_copysign.c",
    "content": "\n/* @(#)s_copysign.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/*\n * copysign(double x, double y)\n * copysign(x,y) returns a value with the magnitude of x and\n * with the sign bit of y.\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\n\tdouble copysign(double x, double y)\n#else\n\tdouble copysign(x,y)\n\tdouble x,y;\n#endif\n{\n\t__HI(x) = (__HI(x)&0x7fffffff)|(__HI(y)&0x80000000);\n        return x;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/s_cos.c",
    "content": "\n/* @(#)s_cos.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* cos(x)\n * Return cosine function of x.\n *\n * kernel function:\n *\t__kernel_sin\t\t... sine function on [-pi/4,pi/4]\n *\t__kernel_cos\t\t... cosine function on [-pi/4,pi/4]\n *\t__ieee754_rem_pio2\t... argument reduction routine\n *\n * Method.\n *      Let S,C and T denote the sin, cos and tan respectively on \n *\t[-PI/4, +PI/4]. Reduce the argument x to y1+y2 = x-k*pi/2 \n *\tin [-pi/4 , +pi/4], and let n = k mod 4.\n *\tWe have\n *\n *          n        sin(x)      cos(x)        tan(x)\n *     ----------------------------------------------------------\n *\t    0\t       S\t   C\t\t T\n *\t    1\t       C\t  -S\t\t-1/T\n *\t    2\t      -S\t  -C\t\t T\n *\t    3\t      -C\t   S\t\t-1/T\n *     ----------------------------------------------------------\n *\n * Special cases:\n *      Let trig be any of sin, cos, or tan.\n *      trig(+-INF)  is NaN, with signals;\n *      trig(NaN)    is that NaN;\n *\n * Accuracy:\n *\tTRIG(x) returns trig(x) nearly rounded \n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\n\tdouble cos(double x)\n#else\n\tdouble cos(x)\n\tdouble x;\n#endif\n{\n\tdouble y[2],z=0.0;\n\tint n, ix;\n\n    /* High word of x. */\n\tix = __HI(x);\n\n    /* |x| ~< pi/4 */\n\tix &= 0x7fffffff;\n\tif(ix <= 0x3fe921fb) return __kernel_cos(x,z);\n\n    /* cos(Inf or NaN) is NaN */\n\telse if (ix>=0x7ff00000) return x-x;\n\n    /* argument reduction needed */\n\telse {\n\t    n = __ieee754_rem_pio2(x,y);\n\t    switch(n&3) {\n\t\tcase 0: return  __kernel_cos(y[0],y[1]);\n\t\tcase 1: return -__kernel_sin(y[0],y[1],1);\n\t\tcase 2: return -__kernel_cos(y[0],y[1]);\n\t\tdefault:\n\t\t        return  __kernel_sin(y[0],y[1],1);\n\t    }\n\t}\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/s_erf.c",
    "content": "\n/* @(#)s_erf.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* double erf(double x)\n * double erfc(double x)\n *\t\t\t     x\n *\t\t      2      |\\\n *     erf(x)  =  ---------  | exp(-t*t)dt\n *\t \t   sqrt(pi) \\| \n *\t\t\t     0\n *\n *     erfc(x) =  1-erf(x)\n *  Note that \n *\t\terf(-x) = -erf(x)\n *\t\terfc(-x) = 2 - erfc(x)\n *\n * Method:\n *\t1. For |x| in [0, 0.84375]\n *\t    erf(x)  = x + x*R(x^2)\n *          erfc(x) = 1 - erf(x)           if x in [-.84375,0.25]\n *                  = 0.5 + ((0.5-x)-x*R)  if x in [0.25,0.84375]\n *\t   where R = P/Q where P is an odd poly of degree 8 and\n *\t   Q is an odd poly of degree 10.\n *\t\t\t\t\t\t -57.90\n *\t\t\t| R - (erf(x)-x)/x | <= 2\n *\t\n *\n *\t   Remark. The formula is derived by noting\n *          erf(x) = (2/sqrt(pi))*(x - x^3/3 + x^5/10 - x^7/42 + ....)\n *\t   and that\n *          2/sqrt(pi) = 1.128379167095512573896158903121545171688\n *\t   is close to one. The interval is chosen because the fix\n *\t   point of erf(x) is near 0.6174 (i.e., erf(x)=x when x is\n *\t   near 0.6174), and by some experiment, 0.84375 is chosen to\n * \t   guarantee the error is less than one ulp for erf.\n *\n *      2. For |x| in [0.84375,1.25], let s = |x| - 1, and\n *         c = 0.84506291151 rounded to single (24 bits)\n *         \terf(x)  = sign(x) * (c  + P1(s)/Q1(s))\n *         \terfc(x) = (1-c)  - P1(s)/Q1(s) if x > 0\n *\t\t\t  1+(c+P1(s)/Q1(s))    if x < 0\n *         \t|P1/Q1 - (erf(|x|)-c)| <= 2**-59.06\n *\t   Remark: here we use the taylor series expansion at x=1.\n *\t\terf(1+s) = erf(1) + s*Poly(s)\n *\t\t\t = 0.845.. + P1(s)/Q1(s)\n *\t   That is, we use rational approximation to approximate\n *\t\t\terf(1+s) - (c = (single)0.84506291151)\n *\t   Note that |P1/Q1|< 0.078 for x in [0.84375,1.25]\n *\t   where \n *\t\tP1(s) = degree 6 poly in s\n *\t\tQ1(s) = degree 6 poly in s\n *\n *      3. For x in [1.25,1/0.35(~2.857143)], \n *         \terfc(x) = (1/x)*exp(-x*x-0.5625+R1/S1)\n *         \terf(x)  = 1 - erfc(x)\n *\t   where \n *\t\tR1(z) = degree 7 poly in z, (z=1/x^2)\n *\t\tS1(z) = degree 8 poly in z\n *\n *      4. For x in [1/0.35,28]\n *         \terfc(x) = (1/x)*exp(-x*x-0.5625+R2/S2) if x > 0\n *\t\t\t= 2.0 - (1/x)*exp(-x*x-0.5625+R2/S2) if -6<x<0\n *\t\t\t= 2.0 - tiny\t\t(if x <= -6)\n *         \terf(x)  = sign(x)*(1.0 - erfc(x)) if x < 6, else\n *         \terf(x)  = sign(x)*(1.0 - tiny)\n *\t   where\n *\t\tR2(z) = degree 6 poly in z, (z=1/x^2)\n *\t\tS2(z) = degree 7 poly in z\n *\n *      Note1:\n *\t   To compute exp(-x*x-0.5625+R/S), let s be a single\n *\t   precision number and s := x; then\n *\t\t-x*x = -s*s + (s-x)*(s+x)\n *\t        exp(-x*x-0.5626+R/S) = \n *\t\t\texp(-s*s-0.5625)*exp((s-x)*(s+x)+R/S);\n *      Note2:\n *\t   Here 4 and 5 make use of the asymptotic series\n *\t\t\t  exp(-x*x)\n *\t\terfc(x) ~ ---------- * ( 1 + Poly(1/x^2) )\n *\t\t\t  x*sqrt(pi)\n *\t   We use rational approximation to approximate\n *      \tg(s)=f(1/x^2) = log(erfc(x)*x) - x*x + 0.5625\n *\t   Here is the error bound for R1/S1 and R2/S2\n *      \t|R1/S1 - f(x)|  < 2**(-62.57)\n *      \t|R2/S2 - f(x)|  < 2**(-61.52)\n *\n *      5. For inf > x >= 28\n *         \terf(x)  = sign(x) *(1 - tiny)  (raise inexact)\n *         \terfc(x) = tiny*tiny (raise underflow) if x > 0\n *\t\t\t= 2 - tiny if x<0\n *\n *      7. Special case:\n *         \terf(0)  = 0, erf(inf)  = 1, erf(-inf) = -1,\n *         \terfc(0) = 1, erfc(inf) = 0, erfc(-inf) = 2, \n *\t   \terfc/erf(NaN) is NaN\n */\n\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic const double\n#else\nstatic double\n#endif\ntiny\t    = 1e-300,\nhalf=  5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */\none =  1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */\ntwo =  2.00000000000000000000e+00, /* 0x40000000, 0x00000000 */\n\t/* c = (float)0.84506291151 */\nerx =  8.45062911510467529297e-01, /* 0x3FEB0AC1, 0x60000000 */\n/*\n * Coefficients for approximation to  erf on [0,0.84375]\n */\nefx =  1.28379167095512586316e-01, /* 0x3FC06EBA, 0x8214DB69 */\nefx8=  1.02703333676410069053e+00, /* 0x3FF06EBA, 0x8214DB69 */\npp0  =  1.28379167095512558561e-01, /* 0x3FC06EBA, 0x8214DB68 */\npp1  = -3.25042107247001499370e-01, /* 0xBFD4CD7D, 0x691CB913 */\npp2  = -2.84817495755985104766e-02, /* 0xBF9D2A51, 0xDBD7194F */\npp3  = -5.77027029648944159157e-03, /* 0xBF77A291, 0x236668E4 */\npp4  = -2.37630166566501626084e-05, /* 0xBEF8EAD6, 0x120016AC */\nqq1  =  3.97917223959155352819e-01, /* 0x3FD97779, 0xCDDADC09 */\nqq2  =  6.50222499887672944485e-02, /* 0x3FB0A54C, 0x5536CEBA */\nqq3  =  5.08130628187576562776e-03, /* 0x3F74D022, 0xC4D36B0F */\nqq4  =  1.32494738004321644526e-04, /* 0x3F215DC9, 0x221C1A10 */\nqq5  = -3.96022827877536812320e-06, /* 0xBED09C43, 0x42A26120 */\n/*\n * Coefficients for approximation to  erf  in [0.84375,1.25] \n */\npa0  = -2.36211856075265944077e-03, /* 0xBF6359B8, 0xBEF77538 */\npa1  =  4.14856118683748331666e-01, /* 0x3FDA8D00, 0xAD92B34D */\npa2  = -3.72207876035701323847e-01, /* 0xBFD7D240, 0xFBB8C3F1 */\npa3  =  3.18346619901161753674e-01, /* 0x3FD45FCA, 0x805120E4 */\npa4  = -1.10894694282396677476e-01, /* 0xBFBC6398, 0x3D3E28EC */\npa5  =  3.54783043256182359371e-02, /* 0x3FA22A36, 0x599795EB */\npa6  = -2.16637559486879084300e-03, /* 0xBF61BF38, 0x0A96073F */\nqa1  =  1.06420880400844228286e-01, /* 0x3FBB3E66, 0x18EEE323 */\nqa2  =  5.40397917702171048937e-01, /* 0x3FE14AF0, 0x92EB6F33 */\nqa3  =  7.18286544141962662868e-02, /* 0x3FB2635C, 0xD99FE9A7 */\nqa4  =  1.26171219808761642112e-01, /* 0x3FC02660, 0xE763351F */\nqa5  =  1.36370839120290507362e-02, /* 0x3F8BEDC2, 0x6B51DD1C */\nqa6  =  1.19844998467991074170e-02, /* 0x3F888B54, 0x5735151D */\n/*\n * Coefficients for approximation to  erfc in [1.25,1/0.35]\n */\nra0  = -9.86494403484714822705e-03, /* 0xBF843412, 0x600D6435 */\nra1  = -6.93858572707181764372e-01, /* 0xBFE63416, 0xE4BA7360 */\nra2  = -1.05586262253232909814e+01, /* 0xC0251E04, 0x41B0E726 */\nra3  = -6.23753324503260060396e+01, /* 0xC04F300A, 0xE4CBA38D */\nra4  = -1.62396669462573470355e+02, /* 0xC0644CB1, 0x84282266 */\nra5  = -1.84605092906711035994e+02, /* 0xC067135C, 0xEBCCABB2 */\nra6  = -8.12874355063065934246e+01, /* 0xC0545265, 0x57E4D2F2 */\nra7  = -9.81432934416914548592e+00, /* 0xC023A0EF, 0xC69AC25C */\nsa1  =  1.96512716674392571292e+01, /* 0x4033A6B9, 0xBD707687 */\nsa2  =  1.37657754143519042600e+02, /* 0x4061350C, 0x526AE721 */\nsa3  =  4.34565877475229228821e+02, /* 0x407B290D, 0xD58A1A71 */\nsa4  =  6.45387271733267880336e+02, /* 0x40842B19, 0x21EC2868 */\nsa5  =  4.29008140027567833386e+02, /* 0x407AD021, 0x57700314 */\nsa6  =  1.08635005541779435134e+02, /* 0x405B28A3, 0xEE48AE2C */\nsa7  =  6.57024977031928170135e+00, /* 0x401A47EF, 0x8E484A93 */\nsa8  = -6.04244152148580987438e-02, /* 0xBFAEEFF2, 0xEE749A62 */\n/*\n * Coefficients for approximation to  erfc in [1/.35,28]\n */\nrb0  = -9.86494292470009928597e-03, /* 0xBF843412, 0x39E86F4A */\nrb1  = -7.99283237680523006574e-01, /* 0xBFE993BA, 0x70C285DE */\nrb2  = -1.77579549177547519889e+01, /* 0xC031C209, 0x555F995A */\nrb3  = -1.60636384855821916062e+02, /* 0xC064145D, 0x43C5ED98 */\nrb4  = -6.37566443368389627722e+02, /* 0xC083EC88, 0x1375F228 */\nrb5  = -1.02509513161107724954e+03, /* 0xC0900461, 0x6A2E5992 */\nrb6  = -4.83519191608651397019e+02, /* 0xC07E384E, 0x9BDC383F */\nsb1  =  3.03380607434824582924e+01, /* 0x403E568B, 0x261D5190 */\nsb2  =  3.25792512996573918826e+02, /* 0x40745CAE, 0x221B9F0A */\nsb3  =  1.53672958608443695994e+03, /* 0x409802EB, 0x189D5118 */\nsb4  =  3.19985821950859553908e+03, /* 0x40A8FFB7, 0x688C246A */\nsb5  =  2.55305040643316442583e+03, /* 0x40A3F219, 0xCEDF3BE6 */\nsb6  =  4.74528541206955367215e+02, /* 0x407DA874, 0xE79FE763 */\nsb7  = -2.24409524465858183362e+01; /* 0xC03670E2, 0x42712D62 */\n\n#ifdef __STDC__\n\tdouble erf(double x) \n#else\n\tdouble erf(x) \n\tdouble x;\n#endif\n{\n\tint hx,ix,i;\n\tdouble R,S,P,Q,s,y,z,r;\n\thx = __HI(x);\n\tix = hx&0x7fffffff;\n\tif(ix>=0x7ff00000) {\t\t/* erf(nan)=nan */\n\t    i = ((unsigned)hx>>31)<<1;\n\t    return (double)(1-i)+one/x;\t/* erf(+-inf)=+-1 */\n\t}\n\n\tif(ix < 0x3feb0000) {\t\t/* |x|<0.84375 */\n\t    if(ix < 0x3e300000) { \t/* |x|<2**-28 */\n\t        if (ix < 0x00800000) \n\t\t    return 0.125*(8.0*x+efx8*x);  /*avoid underflow */\n\t\treturn x + efx*x;\n\t    }\n\t    z = x*x;\n\t    r = pp0+z*(pp1+z*(pp2+z*(pp3+z*pp4)));\n\t    s = one+z*(qq1+z*(qq2+z*(qq3+z*(qq4+z*qq5))));\n\t    y = r/s;\n\t    return x + x*y;\n\t}\n\tif(ix < 0x3ff40000) {\t\t/* 0.84375 <= |x| < 1.25 */\n\t    s = fabs(x)-one;\n\t    P = pa0+s*(pa1+s*(pa2+s*(pa3+s*(pa4+s*(pa5+s*pa6)))));\n\t    Q = one+s*(qa1+s*(qa2+s*(qa3+s*(qa4+s*(qa5+s*qa6)))));\n\t    if(hx>=0) return erx + P/Q; else return -erx - P/Q;\n\t}\n\tif (ix >= 0x40180000) {\t\t/* inf>|x|>=6 */\n\t    if(hx>=0) return one-tiny; else return tiny-one;\n\t}\n\tx = fabs(x);\n \ts = one/(x*x);\n\tif(ix< 0x4006DB6E) {\t/* |x| < 1/0.35 */\n\t    R=ra0+s*(ra1+s*(ra2+s*(ra3+s*(ra4+s*(\n\t\t\t\tra5+s*(ra6+s*ra7))))));\n\t    S=one+s*(sa1+s*(sa2+s*(sa3+s*(sa4+s*(\n\t\t\t\tsa5+s*(sa6+s*(sa7+s*sa8)))))));\n\t} else {\t/* |x| >= 1/0.35 */\n\t    R=rb0+s*(rb1+s*(rb2+s*(rb3+s*(rb4+s*(\n\t\t\t\trb5+s*rb6)))));\n\t    S=one+s*(sb1+s*(sb2+s*(sb3+s*(sb4+s*(\n\t\t\t\tsb5+s*(sb6+s*sb7))))));\n\t}\n\tz  = x;  \n\t__LO(z) = 0;\n\tr  =  __ieee754_exp(-z*z-0.5625)*__ieee754_exp((z-x)*(z+x)+R/S);\n\tif(hx>=0) return one-r/x; else return  r/x-one;\n}\n\n#ifdef __STDC__\n\tdouble erfc(double x) \n#else\n\tdouble erfc(x) \n\tdouble x;\n#endif\n{\n\tint hx,ix;\n\tdouble R,S,P,Q,s,y,z,r;\n\thx = __HI(x);\n\tix = hx&0x7fffffff;\n\tif(ix>=0x7ff00000) {\t\t\t/* erfc(nan)=nan */\n\t\t\t\t\t\t/* erfc(+-inf)=0,2 */\n\t    return (double)(((unsigned)hx>>31)<<1)+one/x;\n\t}\n\n\tif(ix < 0x3feb0000) {\t\t/* |x|<0.84375 */\n\t    if(ix < 0x3c700000)  \t/* |x|<2**-56 */\n\t\treturn one-x;\n\t    z = x*x;\n\t    r = pp0+z*(pp1+z*(pp2+z*(pp3+z*pp4)));\n\t    s = one+z*(qq1+z*(qq2+z*(qq3+z*(qq4+z*qq5))));\n\t    y = r/s;\n\t    if(hx < 0x3fd00000) {  \t/* x<1/4 */\n\t\treturn one-(x+x*y);\n\t    } else {\n\t\tr = x*y;\n\t\tr += (x-half);\n\t        return half - r ;\n\t    }\n\t}\n\tif(ix < 0x3ff40000) {\t\t/* 0.84375 <= |x| < 1.25 */\n\t    s = fabs(x)-one;\n\t    P = pa0+s*(pa1+s*(pa2+s*(pa3+s*(pa4+s*(pa5+s*pa6)))));\n\t    Q = one+s*(qa1+s*(qa2+s*(qa3+s*(qa4+s*(qa5+s*qa6)))));\n\t    if(hx>=0) {\n\t        z  = one-erx; return z - P/Q; \n\t    } else {\n\t\tz = erx+P/Q; return one+z;\n\t    }\n\t}\n\tif (ix < 0x403c0000) {\t\t/* |x|<28 */\n\t    x = fabs(x);\n \t    s = one/(x*x);\n\t    if(ix< 0x4006DB6D) {\t/* |x| < 1/.35 ~ 2.857143*/\n\t        R=ra0+s*(ra1+s*(ra2+s*(ra3+s*(ra4+s*(\n\t\t\t\tra5+s*(ra6+s*ra7))))));\n\t        S=one+s*(sa1+s*(sa2+s*(sa3+s*(sa4+s*(\n\t\t\t\tsa5+s*(sa6+s*(sa7+s*sa8)))))));\n\t    } else {\t\t\t/* |x| >= 1/.35 ~ 2.857143 */\n\t\tif(hx<0&&ix>=0x40180000) return two-tiny;/* x < -6 */\n\t        R=rb0+s*(rb1+s*(rb2+s*(rb3+s*(rb4+s*(\n\t\t\t\trb5+s*rb6)))));\n\t        S=one+s*(sb1+s*(sb2+s*(sb3+s*(sb4+s*(\n\t\t\t\tsb5+s*(sb6+s*sb7))))));\n\t    }\n\t    z  = x;\n\t    __LO(z)  = 0;\n\t    r  =  __ieee754_exp(-z*z-0.5625)*\n\t\t\t__ieee754_exp((z-x)*(z+x)+R/S);\n\t    if(hx>0) return r/x; else return two-r/x;\n\t} else {\n\t    if(hx>0) return tiny*tiny; else return two-tiny;\n\t}\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/s_expm1.c",
    "content": "\n/* @(#)s_expm1.c 1.5 04/04/22 */\n/*\n * ====================================================\n * Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.\n *\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* expm1(x)\n * Returns exp(x)-1, the exponential of x minus 1.\n *\n * Method\n *   1. Argument reduction:\n *\tGiven x, find r and integer k such that\n *\n *               x = k*ln2 + r,  |r| <= 0.5*ln2 ~ 0.34658  \n *\n *      Here a correction term c will be computed to compensate \n *\tthe error in r when rounded to a floating-point number.\n *\n *   2. Approximating expm1(r) by a special rational function on\n *\tthe interval [0,0.34658]:\n *\tSince\n *\t    r*(exp(r)+1)/(exp(r)-1) = 2+ r^2/6 - r^4/360 + ...\n *\twe define R1(r*r) by\n *\t    r*(exp(r)+1)/(exp(r)-1) = 2+ r^2/6 * R1(r*r)\n *\tThat is,\n *\t    R1(r**2) = 6/r *((exp(r)+1)/(exp(r)-1) - 2/r)\n *\t\t     = 6/r * ( 1 + 2.0*(1/(exp(r)-1) - 1/r))\n *\t\t     = 1 - r^2/60 + r^4/2520 - r^6/100800 + ...\n *      We use a special Remes algorithm on [0,0.347] to generate \n * \ta polynomial of degree 5 in r*r to approximate R1. The \n *\tmaximum error of this polynomial approximation is bounded \n *\tby 2**-61. In other words,\n *\t    R1(z) ~ 1.0 + Q1*z + Q2*z**2 + Q3*z**3 + Q4*z**4 + Q5*z**5\n *\twhere \tQ1  =  -1.6666666666666567384E-2,\n * \t\tQ2  =   3.9682539681370365873E-4,\n * \t\tQ3  =  -9.9206344733435987357E-6,\n * \t\tQ4  =   2.5051361420808517002E-7,\n * \t\tQ5  =  -6.2843505682382617102E-9;\n *  \t(where z=r*r, and the values of Q1 to Q5 are listed below)\n *\twith error bounded by\n *\t    |                  5           |     -61\n *\t    | 1.0+Q1*z+...+Q5*z   -  R1(z) | <= 2 \n *\t    |                              |\n *\t\n *\texpm1(r) = exp(r)-1 is then computed by the following \n * \tspecific way which minimize the accumulation rounding error: \n *\t\t\t       2     3\n *\t\t\t      r     r    [ 3 - (R1 + R1*r/2)  ]\n *\t      expm1(r) = r + --- + --- * [--------------------]\n *\t\t              2     2    [ 6 - r*(3 - R1*r/2) ]\n *\t\n *\tTo compensate the error in the argument reduction, we use\n *\t\texpm1(r+c) = expm1(r) + c + expm1(r)*c \n *\t\t\t   ~ expm1(r) + c + r*c \n *\tThus c+r*c will be added in as the correction terms for\n *\texpm1(r+c). Now rearrange the term to avoid optimization \n * \tscrew up:\n *\t\t        (      2                                    2 )\n *\t\t        ({  ( r    [ R1 -  (3 - R1*r/2) ]  )  }    r  )\n *\t expm1(r+c)~r - ({r*(--- * [--------------------]-c)-c} - --- )\n *\t                ({  ( 2    [ 6 - r*(3 - R1*r/2) ]  )  }    2  )\n *                      (                                             )\n *    \t\n *\t\t   = r - E\n *   3. Scale back to obtain expm1(x):\n *\tFrom step 1, we have\n *\t   expm1(x) = either 2^k*[expm1(r)+1] - 1\n *\t\t    = or     2^k*[expm1(r) + (1-2^-k)]\n *   4. Implementation notes:\n *\t(A). To save one multiplication, we scale the coefficient Qi\n *\t     to Qi*2^i, and replace z by (x^2)/2.\n *\t(B). To achieve maximum accuracy, we compute expm1(x) by\n *\t  (i)   if x < -56*ln2, return -1.0, (raise inexact if x!=inf)\n *\t  (ii)  if k=0, return r-E\n *\t  (iii) if k=-1, return 0.5*(r-E)-0.5\n *        (iv)\tif k=1 if r < -0.25, return 2*((r+0.5)- E)\n *\t       \t       else\t     return  1.0+2.0*(r-E);\n *\t  (v)   if (k<-2||k>56) return 2^k(1-(E-r)) - 1 (or exp(x)-1)\n *\t  (vi)  if k <= 20, return 2^k((1-2^-k)-(E-r)), else\n *\t  (vii) return 2^k(1-((E+2^-k)-r)) \n *\n * Special cases:\n *\texpm1(INF) is INF, expm1(NaN) is NaN;\n *\texpm1(-INF) is -1, and\n *\tfor finite argument, only expm1(0)=0 is exact.\n *\n * Accuracy:\n *\taccording to an error analysis, the error is always less than\n *\t1 ulp (unit in the last place).\n *\n * Misc. info.\n *\tFor IEEE double \n *\t    if x >  7.09782712893383973096e+02 then expm1(x) overflow\n *\n * Constants:\n * The hexadecimal values are the intended ones for the following \n * constants. The decimal values may be used, provided that the \n * compiler will convert from decimal to binary accurately enough\n * to produce the hexadecimal values shown.\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic const double\n#else\nstatic double\n#endif\none\t\t= 1.0,\nhuge\t\t= 1.0e+300,\ntiny\t\t= 1.0e-300,\no_threshold\t= 7.09782712893383973096e+02,/* 0x40862E42, 0xFEFA39EF */\nln2_hi\t\t= 6.93147180369123816490e-01,/* 0x3fe62e42, 0xfee00000 */\nln2_lo\t\t= 1.90821492927058770002e-10,/* 0x3dea39ef, 0x35793c76 */\ninvln2\t\t= 1.44269504088896338700e+00,/* 0x3ff71547, 0x652b82fe */\n\t/* scaled coefficients related to expm1 */\nQ1  =  -3.33333333333331316428e-02, /* BFA11111 111110F4 */\nQ2  =   1.58730158725481460165e-03, /* 3F5A01A0 19FE5585 */\nQ3  =  -7.93650757867487942473e-05, /* BF14CE19 9EAADBB7 */\nQ4  =   4.00821782732936239552e-06, /* 3ED0CFCA 86E65239 */\nQ5  =  -2.01099218183624371326e-07; /* BE8AFDB7 6E09C32D */\n\n#ifdef __STDC__\n\tdouble expm1(double x)\n#else\n\tdouble expm1(x)\n\tdouble x;\n#endif\n{\n\tdouble y,hi,lo,c,t,e,hxs,hfx,r1;\n\tint k,xsb;\n\tunsigned hx;\n\n\thx  = __HI(x);\t/* high word of x */\n\txsb = hx&0x80000000;\t\t/* sign bit of x */\n\tif(xsb==0) y=x; else y= -x;\t/* y = |x| */\n\thx &= 0x7fffffff;\t\t/* high word of |x| */\n\n    /* filter out huge and non-finite argument */\n\tif(hx >= 0x4043687A) {\t\t\t/* if |x|>=56*ln2 */\n\t    if(hx >= 0x40862E42) {\t\t/* if |x|>=709.78... */\n                if(hx>=0x7ff00000) {\n\t\t    if(((hx&0xfffff)|__LO(x))!=0) \n\t\t         return x+x; \t /* NaN */\n\t\t    else return (xsb==0)? x:-1.0;/* exp(+-inf)={inf,-1} */\n\t        }\n\t        if(x > o_threshold) return huge*huge; /* overflow */\n\t    }\n\t    if(xsb!=0) { /* x < -56*ln2, return -1.0 with inexact */\n\t\tif(x+tiny<0.0)\t\t/* raise inexact */\n\t\treturn tiny-one;\t/* return -1 */\n\t    }\n\t}\n\n    /* argument reduction */\n\tif(hx > 0x3fd62e42) {\t\t/* if  |x| > 0.5 ln2 */ \n\t    if(hx < 0x3FF0A2B2) {\t/* and |x| < 1.5 ln2 */\n\t\tif(xsb==0)\n\t\t    {hi = x - ln2_hi; lo =  ln2_lo;  k =  1;}\n\t\telse\n\t\t    {hi = x + ln2_hi; lo = -ln2_lo;  k = -1;}\n\t    } else {\n\t\tk  = invln2*x+((xsb==0)?0.5:-0.5);\n\t\tt  = k;\n\t\thi = x - t*ln2_hi;\t/* t*ln2_hi is exact here */\n\t\tlo = t*ln2_lo;\n\t    }\n\t    x  = hi - lo;\n\t    c  = (hi-x)-lo;\n\t} \n\telse if(hx < 0x3c900000) {  \t/* when |x|<2**-54, return x */\n\t    t = huge+x;\t/* return x with inexact flags when x!=0 */\n\t    return x - (t-(huge+x));\t\n\t}\n\telse k = 0;\n\n    /* x is now in primary range */\n\thfx = 0.5*x;\n\thxs = x*hfx;\n\tr1 = one+hxs*(Q1+hxs*(Q2+hxs*(Q3+hxs*(Q4+hxs*Q5))));\n\tt  = 3.0-r1*hfx;\n\te  = hxs*((r1-t)/(6.0 - x*t));\n\tif(k==0) return x - (x*e-hxs);\t\t/* c is 0 */\n\telse {\n\t    e  = (x*(e-c)-c);\n\t    e -= hxs;\n\t    if(k== -1) return 0.5*(x-e)-0.5;\n\t    if(k==1) \n\t       \tif(x < -0.25) return -2.0*(e-(x+0.5));\n\t       \telse \t      return  one+2.0*(x-e);\n\t    if (k <= -2 || k>56) {   /* suffice to return exp(x)-1 */\n\t        y = one-(e-x);\n\t        __HI(y) += (k<<20);\t/* add k to y's exponent */\n\t        return y-one;\n\t    }\n\t    t = one;\n\t    if(k<20) {\n\t       \t__HI(t) = 0x3ff00000 - (0x200000>>k);  /* t=1-2^-k */\n\t       \ty = t-(e-x);\n\t       \t__HI(y) += (k<<20);\t/* add k to y's exponent */\n\t   } else {\n\t       \t__HI(t)  = ((0x3ff-k)<<20);\t/* 2^-k */\n\t       \ty = x-(e+t);\n\t       \ty += one;\n\t       \t__HI(y) += (k<<20);\t/* add k to y's exponent */\n\t    }\n\t}\n\treturn y;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/s_fabs.c",
    "content": "\n/* @(#)s_fabs.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/*\n * fabs(x) returns the absolute value of x.\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\n\tdouble fabs(double x)\n#else\n\tdouble fabs(x)\n\tdouble x;\n#endif\n{\n\t__HI(x) &= 0x7fffffff;\n        return x;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/s_finite.c",
    "content": "\n/* @(#)s_finite.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/*\n * finite(x) returns 1 is x is finite, else 0;\n * no branching!\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\n\tint finite(double x)\n#else\n\tint finite(x)\n\tdouble x;\n#endif\n{\n\tint hx; \n\thx = __HI(x);\n\treturn  (unsigned)((hx&0x7fffffff)-0x7ff00000)>>31;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/s_floor.c",
    "content": "\n/* @(#)s_floor.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/*\n * floor(x)\n * Return x rounded toward -inf to integral value\n * Method:\n *\tBit twiddling.\n * Exception:\n *\tInexact flag raised if x not equal to floor(x).\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic const double huge = 1.0e300;\n#else\nstatic double huge = 1.0e300;\n#endif\n\n#ifdef __STDC__\n\tdouble floor(double x)\n#else\n\tdouble floor(x)\n\tdouble x;\n#endif\n{\n\tint i0,i1,j0;\n\tunsigned i,j;\n\ti0 =  __HI(x);\n\ti1 =  __LO(x);\n\tj0 = ((i0>>20)&0x7ff)-0x3ff;\n\tif(j0<20) {\n\t    if(j0<0) { \t/* raise inexact if x != 0 */\n\t\tif(huge+x>0.0) {/* return 0*sign(x) if |x|<1 */\n\t\t    if(i0>=0) {i0=i1=0;} \n\t\t    else if(((i0&0x7fffffff)|i1)!=0)\n\t\t\t{ i0=0xbff00000;i1=0;}\n\t\t}\n\t    } else {\n\t\ti = (0x000fffff)>>j0;\n\t\tif(((i0&i)|i1)==0) return x; /* x is integral */\n\t\tif(huge+x>0.0) {\t/* raise inexact flag */\n\t\t    if(i0<0) i0 += (0x00100000)>>j0;\n\t\t    i0 &= (~i); i1=0;\n\t\t}\n\t    }\n\t} else if (j0>51) {\n\t    if(j0==0x400) return x+x;\t/* inf or NaN */\n\t    else return x;\t\t/* x is integral */\n\t} else {\n\t    i = ((unsigned)(0xffffffff))>>(j0-20);\n\t    if((i1&i)==0) return x;\t/* x is integral */\n\t    if(huge+x>0.0) { \t\t/* raise inexact flag */\n\t\tif(i0<0) {\n\t\t    if(j0==20) i0+=1; \n\t\t    else {\n\t\t\tj = i1+(1<<(52-j0));\n\t\t\tif(j<i1) i0 +=1 ; \t/* got a carry */\n\t\t\ti1=j;\n\t\t    }\n\t\t}\n\t\ti1 &= (~i);\n\t    }\n\t}\n\t__HI(x) = i0;\n\t__LO(x) = i1;\n\treturn x;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/s_frexp.c",
    "content": "\n/* @(#)s_frexp.c 1.4 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/*\n * for non-zero x \n *\tx = frexp(arg,&exp);\n * return a double fp quantity x such that 0.5 <= |x| <1.0\n * and the corresponding binary exponent \"exp\". That is\n *\targ = x*2^exp.\n * If arg is inf, 0.0, or NaN, then frexp(arg,&exp) returns arg \n * with *exp=0. \n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic const double\n#else\nstatic double\n#endif\ntwo54 =  1.80143985094819840000e+16; /* 0x43500000, 0x00000000 */\n\n#ifdef __STDC__\n\tdouble frexp(double x, int *eptr)\n#else\n\tdouble frexp(x, eptr)\n\tdouble x; int *eptr;\n#endif\n{\n\tint  hx, ix, lx;\n\thx = __HI(x);\n\tix = 0x7fffffff&hx;\n\tlx = __LO(x);\n\t*eptr = 0;\n\tif(ix>=0x7ff00000||((ix|lx)==0)) return x;\t/* 0,inf,nan */\n\tif (ix<0x00100000) {\t\t/* subnormal */\n\t    x *= two54;\n\t    hx = __HI(x);\n\t    ix = hx&0x7fffffff;\n\t    *eptr = -54;\n\t}\n\t*eptr += (ix>>20)-1022;\n\thx = (hx&0x800fffff)|0x3fe00000;\n\t__HI(x) = hx;\n\treturn x;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/s_ilogb.c",
    "content": "\n/* @(#)s_ilogb.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* ilogb(double x)\n * return the binary exponent of non-zero x\n * ilogb(0) = 0x80000001\n * ilogb(inf/NaN) = 0x7fffffff (no signal is raised)\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\n\tint ilogb(double x)\n#else\n\tint ilogb(x)\n\tdouble x;\n#endif\n{\n\tint hx,lx,ix;\n\n\thx  = (__HI(x))&0x7fffffff;\t/* high word of x */\n\tif(hx<0x00100000) {\n\t    lx = __LO(x);\n\t    if((hx|lx)==0) \n\t\treturn 0x80000001;\t/* ilogb(0) = 0x80000001 */\n\t    else\t\t\t/* subnormal x */\n\t\tif(hx==0) {\n\t\t    for (ix = -1043; lx>0; lx<<=1) ix -=1;\n\t\t} else {\n\t\t    for (ix = -1022,hx<<=11; hx>0; hx<<=1) ix -=1;\n\t\t}\n\t    return ix;\n\t}\n\telse if (hx<0x7ff00000) return (hx>>20)-1023;\n\telse return 0x7fffffff;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/s_isnan.c",
    "content": "\n/* @(#)s_isnan.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/*\n * isnan(x) returns 1 is x is nan, else 0;\n * no branching!\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\n\tint isnan(double x)\n#else\n\tint isnan(x)\n\tdouble x;\n#endif\n{\n\tint hx,lx;\n\thx = (__HI(x)&0x7fffffff);\n\tlx = __LO(x);\n\thx |= (unsigned)(lx|(-lx))>>31;\t\n\thx = 0x7ff00000 - hx;\n\treturn ((unsigned)(hx))>>31;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/s_ldexp.c",
    "content": "\n/* @(#)s_ldexp.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n#include \"fdlibm.h\"\n#include <errno.h>\n\n#ifdef __STDC__\n\tdouble ldexp(double value, int exp)\n#else\n\tdouble ldexp(value, exp)\n\tdouble value; int exp;\n#endif\n{\n\tif(!finite(value)||value==0.0) return value;\n\tvalue = scalbn(value,exp);\n\tif(!finite(value)||value==0.0) errno = ERANGE;\n\treturn value;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/s_lib_version.c",
    "content": "\n/* @(#)s_lib_version.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/*\n * MACRO for standards\n */\n\n#include \"fdlibm.h\"\n\n/*\n * define and initialize _LIB_VERSION\n */\n#ifdef _POSIX_MODE\n_LIB_VERSION_TYPE _LIB_VERSION = _POSIX_;\n#else\n#ifdef _XOPEN_MODE\n_LIB_VERSION_TYPE _LIB_VERSION = _XOPEN_;\n#else\n#ifdef _SVID3_MODE\n_LIB_VERSION_TYPE _LIB_VERSION = _SVID_;\n#else\t\t\t\t\t/* default _IEEE_MODE */\n_LIB_VERSION_TYPE _LIB_VERSION = _IEEE_;\n#endif\n#endif\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/s_log1p.c",
    "content": "\n/* @(#)s_log1p.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* double log1p(double x)\n *\n * Method :                  \n *   1. Argument Reduction: find k and f such that \n *\t\t\t1+x = 2^k * (1+f), \n *\t   where  sqrt(2)/2 < 1+f < sqrt(2) .\n *\n *      Note. If k=0, then f=x is exact. However, if k!=0, then f\n *\tmay not be representable exactly. In that case, a correction\n *\tterm is need. Let u=1+x rounded. Let c = (1+x)-u, then\n *\tlog(1+x) - log(u) ~ c/u. Thus, we proceed to compute log(u),\n *\tand add back the correction term c/u.\n *\t(Note: when x > 2**53, one can simply return log(x))\n *\n *   2. Approximation of log1p(f).\n *\tLet s = f/(2+f) ; based on log(1+f) = log(1+s) - log(1-s)\n *\t\t = 2s + 2/3 s**3 + 2/5 s**5 + .....,\n *\t     \t = 2s + s*R\n *      We use a special Reme algorithm on [0,0.1716] to generate \n * \ta polynomial of degree 14 to approximate R The maximum error \n *\tof this polynomial approximation is bounded by 2**-58.45. In\n *\tother words,\n *\t\t        2      4      6      8      10      12      14\n *\t    R(z) ~ Lp1*s +Lp2*s +Lp3*s +Lp4*s +Lp5*s  +Lp6*s  +Lp7*s\n *  \t(the values of Lp1 to Lp7 are listed in the program)\n *\tand\n *\t    |      2          14          |     -58.45\n *\t    | Lp1*s +...+Lp7*s    -  R(z) | <= 2 \n *\t    |                             |\n *\tNote that 2s = f - s*f = f - hfsq + s*hfsq, where hfsq = f*f/2.\n *\tIn order to guarantee error in log below 1ulp, we compute log\n *\tby\n *\t\tlog1p(f) = f - (hfsq - s*(hfsq+R)).\n *\t\n *\t3. Finally, log1p(x) = k*ln2 + log1p(f).  \n *\t\t \t     = k*ln2_hi+(f-(hfsq-(s*(hfsq+R)+k*ln2_lo)))\n *\t   Here ln2 is split into two floating point number: \n *\t\t\tln2_hi + ln2_lo,\n *\t   where n*ln2_hi is always exact for |n| < 2000.\n *\n * Special cases:\n *\tlog1p(x) is NaN with signal if x < -1 (including -INF) ; \n *\tlog1p(+INF) is +INF; log1p(-1) is -INF with signal;\n *\tlog1p(NaN) is that NaN with no signal.\n *\n * Accuracy:\n *\taccording to an error analysis, the error is always less than\n *\t1 ulp (unit in the last place).\n *\n * Constants:\n * The hexadecimal values are the intended ones for the following \n * constants. The decimal values may be used, provided that the \n * compiler will convert from decimal to binary accurately enough \n * to produce the hexadecimal values shown.\n *\n * Note: Assuming log() return accurate answer, the following\n * \t algorithm can be used to compute log1p(x) to within a few ULP:\n *\t\n *\t\tu = 1+x;\n *\t\tif(u==1.0) return x ; else\n *\t\t\t   return log(u)*(x/(u-1.0));\n *\n *\t See HP-15C Advanced Functions Handbook, p.193.\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic const double\n#else\nstatic double\n#endif\nln2_hi  =  6.93147180369123816490e-01,\t/* 3fe62e42 fee00000 */\nln2_lo  =  1.90821492927058770002e-10,\t/* 3dea39ef 35793c76 */\ntwo54   =  1.80143985094819840000e+16,  /* 43500000 00000000 */\nLp1 = 6.666666666666735130e-01,  /* 3FE55555 55555593 */\nLp2 = 3.999999999940941908e-01,  /* 3FD99999 9997FA04 */\nLp3 = 2.857142874366239149e-01,  /* 3FD24924 94229359 */\nLp4 = 2.222219843214978396e-01,  /* 3FCC71C5 1D8E78AF */\nLp5 = 1.818357216161805012e-01,  /* 3FC74664 96CB03DE */\nLp6 = 1.531383769920937332e-01,  /* 3FC39A09 D078C69F */\nLp7 = 1.479819860511658591e-01;  /* 3FC2F112 DF3E5244 */\n\nstatic double zero = 0.0;\n\n#ifdef __STDC__\n\tdouble log1p(double x)\n#else\n\tdouble log1p(x)\n\tdouble x;\n#endif\n{\n\tdouble hfsq,f,c,s,z,R,u;\n\tint k,hx,hu,ax;\n\n\thx = __HI(x);\t\t/* high word of x */\n\tax = hx&0x7fffffff;\n\n\tk = 1;\n\tif (hx < 0x3FDA827A) {\t\t\t/* x < 0.41422  */\n\t    if(ax>=0x3ff00000) {\t\t/* x <= -1.0 */\n\t\tif(x==-1.0) return -two54/zero; /* log1p(-1)=+inf */\n\t\telse return (x-x)/(x-x);\t/* log1p(x<-1)=NaN */\n\t    }\n\t    if(ax<0x3e200000) {\t\t\t/* |x| < 2**-29 */\n\t\tif(two54+x>zero\t\t\t/* raise inexact */\n\t            &&ax<0x3c900000) \t\t/* |x| < 2**-54 */\n\t\t    return x;\n\t\telse\n\t\t    return x - x*x*0.5;\n\t    }\n\t    if(hx>0||hx<=((int)0xbfd2bec3)) {\n\t\tk=0;f=x;hu=1;}\t/* -0.2929<x<0.41422 */\n\t} \n\tif (hx >= 0x7ff00000) return x+x;\n\tif(k!=0) {\n\t    if(hx<0x43400000) {\n\t\tu  = 1.0+x; \n\t        hu = __HI(u);\t\t/* high word of u */\n\t        k  = (hu>>20)-1023;\n\t        c  = (k>0)? 1.0-(u-x):x-(u-1.0);/* correction term */\n\t\tc /= u;\n\t    } else {\n\t\tu  = x;\n\t        hu = __HI(u);\t\t/* high word of u */\n\t        k  = (hu>>20)-1023;\n\t\tc  = 0;\n\t    }\n\t    hu &= 0x000fffff;\n\t    if(hu<0x6a09e) {\n\t        __HI(u) = hu|0x3ff00000;\t/* normalize u */\n\t    } else {\n\t        k += 1; \n\t        __HI(u) = hu|0x3fe00000;\t/* normalize u/2 */\n\t        hu = (0x00100000-hu)>>2;\n\t    }\n\t    f = u-1.0;\n\t}\n\thfsq=0.5*f*f;\n\tif(hu==0) {\t/* |f| < 2**-20 */\n\t    if(f==zero) if(k==0) return zero;  \n\t\t\telse {c += k*ln2_lo; return k*ln2_hi+c;}\n\t    R = hfsq*(1.0-0.66666666666666666*f);\n\t    if(k==0) return f-R; else\n\t    \t     return k*ln2_hi-((R-(k*ln2_lo+c))-f);\n\t}\n \ts = f/(2.0+f); \n\tz = s*s;\n\tR = z*(Lp1+z*(Lp2+z*(Lp3+z*(Lp4+z*(Lp5+z*(Lp6+z*Lp7))))));\n\tif(k==0) return f-(hfsq-s*(hfsq+R)); else\n\t\t return k*ln2_hi-((hfsq-(s*(hfsq+R)+(k*ln2_lo+c)))-f);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/s_logb.c",
    "content": "\n/* @(#)s_logb.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/*\n * double logb(x)\n * IEEE 754 logb. Included to pass IEEE test suite. Not recommend.\n * Use ilogb instead.\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\n\tdouble logb(double x)\n#else\n\tdouble logb(x)\n\tdouble x;\n#endif\n{\n\tint lx,ix;\n\tix = (__HI(x))&0x7fffffff;\t/* high |x| */\n\tlx = __LO(x);\t\t\t/* low x */\n\tif((ix|lx)==0) return -1.0/fabs(x);\n\tif(ix>=0x7ff00000) return x*x;\n\tif((ix>>=20)==0) \t\t\t/* IEEE 754 logb */\n\t\treturn -1022.0; \n\telse\n\t\treturn (double) (ix-1023); \n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/s_matherr.c",
    "content": "\n/* @(#)s_matherr.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\n\tint matherr(struct exception *x)\n#else\n\tint matherr(x)\n\tstruct exception *x;\n#endif\n{\n\tint n=0;\n\tif(x->arg1!=x->arg1) return 0;\n\treturn n;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/s_modf.c",
    "content": "\n/* @(#)s_modf.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/*\n * modf(double x, double *iptr) \n * return fraction part of x, and return x's integral part in *iptr.\n * Method:\n *\tBit twiddling.\n *\n * Exception:\n *\tNo exception.\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic const double one = 1.0;\n#else\nstatic double one = 1.0;\n#endif\n\n#ifdef __STDC__\n\tdouble modf(double x, double *iptr)\n#else\n\tdouble modf(x, iptr)\n\tdouble x,*iptr;\n#endif\n{\n\tint i0,i1,j0;\n\tunsigned i;\n\ti0 =  __HI(x);\t\t/* high x */\n\ti1 =  __LO(x);\t\t/* low  x */\n\tj0 = ((i0>>20)&0x7ff)-0x3ff;\t/* exponent of x */\n\tif(j0<20) {\t\t\t/* integer part in high x */\n\t    if(j0<0) {\t\t\t/* |x|<1 */\n\t\t__HIp(iptr) = i0&0x80000000;\n\t\t__LOp(iptr) = 0;\t\t/* *iptr = +-0 */\n\t\treturn x;\n\t    } else {\n\t\ti = (0x000fffff)>>j0;\n\t\tif(((i0&i)|i1)==0) {\t\t/* x is integral */\n\t\t    *iptr = x;\n\t\t    __HI(x) &= 0x80000000;\n\t\t    __LO(x)  = 0;\t/* return +-0 */\n\t\t    return x;\n\t\t} else {\n\t\t    __HIp(iptr) = i0&(~i);\n\t\t    __LOp(iptr) = 0;\n\t\t    return x - *iptr;\n\t\t}\n\t    }\n\t} else if (j0>51) {\t\t/* no fraction part */\n\t    *iptr = x*one;\n\t    __HI(x) &= 0x80000000;\n\t    __LO(x)  = 0;\t/* return +-0 */\n\t    return x;\n\t} else {\t\t\t/* fraction part in low x */\n\t    i = ((unsigned)(0xffffffff))>>(j0-20);\n\t    if((i1&i)==0) { \t\t/* x is integral */\n\t\t*iptr = x;\n\t\t__HI(x) &= 0x80000000;\n\t\t__LO(x)  = 0;\t/* return +-0 */\n\t\treturn x;\n\t    } else {\n\t\t__HIp(iptr) = i0;\n\t\t__LOp(iptr) = i1&(~i);\n\t\treturn x - *iptr;\n\t    }\n\t}\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/s_nextafter.c",
    "content": "\n/* @(#)s_nextafter.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* IEEE functions\n *\tnextafter(x,y)\n *\treturn the next machine floating-point number of x in the\n *\tdirection toward y.\n *   Special cases:\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\n\tdouble nextafter(double x, double y)\n#else\n\tdouble nextafter(x,y)\n\tdouble x,y;\n#endif\n{\n\tint\thx,hy,ix,iy;\n\tunsigned lx,ly;\n\n\thx = __HI(x);\t\t/* high word of x */\n\tlx = __LO(x);\t\t/* low  word of x */\n\thy = __HI(y);\t\t/* high word of y */\n\tly = __LO(y);\t\t/* low  word of y */\n\tix = hx&0x7fffffff;\t\t/* |x| */\n\tiy = hy&0x7fffffff;\t\t/* |y| */\n\n\tif(((ix>=0x7ff00000)&&((ix-0x7ff00000)|lx)!=0) ||   /* x is nan */ \n\t   ((iy>=0x7ff00000)&&((iy-0x7ff00000)|ly)!=0))     /* y is nan */ \n\t   return x+y;\t\t\t\t\n\tif(x==y) return x;\t\t/* x=y, return x */\n\tif((ix|lx)==0) {\t\t\t/* x == 0 */\n\t    __HI(x) = hy&0x80000000;\t/* return +-minsubnormal */\n\t    __LO(x) = 1;\n\t    y = x*x;\n\t    if(y==x) return y; else return x;\t/* raise underflow flag */\n\t} \n\tif(hx>=0) {\t\t\t\t/* x > 0 */\n\t    if(hx>hy||((hx==hy)&&(lx>ly))) {\t/* x > y, x -= ulp */\n\t\tif(lx==0) hx -= 1;\n\t\tlx -= 1;\n\t    } else {\t\t\t\t/* x < y, x += ulp */\n\t\tlx += 1;\n\t\tif(lx==0) hx += 1;\n\t    }\n\t} else {\t\t\t\t/* x < 0 */\n\t    if(hy>=0||hx>hy||((hx==hy)&&(lx>ly))){/* x < y, x -= ulp */\n\t\tif(lx==0) hx -= 1;\n\t\tlx -= 1;\n\t    } else {\t\t\t\t/* x > y, x += ulp */\n\t\tlx += 1;\n\t\tif(lx==0) hx += 1;\n\t    }\n\t}\n\thy = hx&0x7ff00000;\n\tif(hy>=0x7ff00000) return x+x;\t/* overflow  */\n\tif(hy<0x00100000) {\t\t/* underflow */\n\t    y = x*x;\n\t    if(y!=x) {\t\t/* raise underflow flag */\n\t\t__HI(y) = hx; __LO(y) = lx;\n\t\treturn y;\n\t    }\n\t}\n\t__HI(x) = hx; __LO(x) = lx;\n\treturn x;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/s_rint.c",
    "content": "\n/* @(#)s_rint.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/*\n * rint(x)\n * Return x rounded to integral value according to the prevailing\n * rounding mode.\n * Method:\n *\tUsing floating addition.\n * Exception:\n *\tInexact flag raised if x not equal to rint(x).\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic const double\n#else\nstatic double \n#endif\nTWO52[2]={\n  4.50359962737049600000e+15, /* 0x43300000, 0x00000000 */\n -4.50359962737049600000e+15, /* 0xC3300000, 0x00000000 */\n};\n\n#ifdef __STDC__\n\tdouble rint(double x)\n#else\n\tdouble rint(x)\n\tdouble x;\n#endif\n{\n\tint i0,j0,sx;\n\tunsigned i,i1;\n\tdouble w,t;\n\ti0 =  __HI(x);\n\tsx = (i0>>31)&1;\n\ti1 =  __LO(x);\n\tj0 = ((i0>>20)&0x7ff)-0x3ff;\n\tif(j0<20) {\n\t    if(j0<0) { \t\n\t\tif(((i0&0x7fffffff)|i1)==0) return x;\n\t\ti1 |= (i0&0x0fffff);\n\t\ti0 &= 0xfffe0000;\n\t\ti0 |= ((i1|-i1)>>12)&0x80000;\n\t\t__HI(x)=i0;\n\t        w = TWO52[sx]+x;\n\t        t =  w-TWO52[sx];\n\t        i0 = __HI(t);\n\t        __HI(t) = (i0&0x7fffffff)|(sx<<31);\n\t        return t;\n\t    } else {\n\t\ti = (0x000fffff)>>j0;\n\t\tif(((i0&i)|i1)==0) return x; /* x is integral */\n\t\ti>>=1;\n\t\tif(((i0&i)|i1)!=0) {\n\t\t    if(j0==19) i1 = 0x40000000; else\n\t\t    i0 = (i0&(~i))|((0x20000)>>j0);\n\t\t}\n\t    }\n\t} else if (j0>51) {\n\t    if(j0==0x400) return x+x;\t/* inf or NaN */\n\t    else return x;\t\t/* x is integral */\n\t} else {\n\t    i = ((unsigned)(0xffffffff))>>(j0-20);\n\t    if((i1&i)==0) return x;\t/* x is integral */\n\t    i>>=1;\n\t    if((i1&i)!=0) i1 = (i1&(~i))|((0x40000000)>>(j0-20));\n\t}\n\t__HI(x) = i0;\n\t__LO(x) = i1;\n\tw = TWO52[sx]+x;\n\treturn w-TWO52[sx];\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/s_scalbn.c",
    "content": "\n/* @(#)s_scalbn.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* \n * scalbn (double x, int n)\n * scalbn(x,n) returns x* 2**n  computed by  exponent  \n * manipulation rather than by actually performing an \n * exponentiation or a multiplication.\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic const double\n#else\nstatic double\n#endif\ntwo54   =  1.80143985094819840000e+16, /* 0x43500000, 0x00000000 */\ntwom54  =  5.55111512312578270212e-17, /* 0x3C900000, 0x00000000 */\nhuge   = 1.0e+300,\ntiny   = 1.0e-300;\n\n#ifdef __STDC__\n\tdouble scalbn (double x, int n)\n#else\n\tdouble scalbn (x,n)\n\tdouble x; int n;\n#endif\n{\n\tint  k,hx,lx;\n\thx = __HI(x);\n\tlx = __LO(x);\n        k = (hx&0x7ff00000)>>20;\t\t/* extract exponent */\n        if (k==0) {\t\t\t\t/* 0 or subnormal x */\n            if ((lx|(hx&0x7fffffff))==0) return x; /* +-0 */\n\t    x *= two54; \n\t    hx = __HI(x);\n\t    k = ((hx&0x7ff00000)>>20) - 54; \n            if (n< -50000) return tiny*x; \t/*underflow*/\n\t    }\n        if (k==0x7ff) return x+x;\t\t/* NaN or Inf */\n        k = k+n; \n        if (k >  0x7fe) return huge*copysign(huge,x); /* overflow  */\n        if (k > 0) \t\t\t\t/* normal result */\n\t    {__HI(x) = (hx&0x800fffff)|(k<<20); return x;}\n        if (k <= -54)\n            if (n > 50000) \t/* in case integer overflow in n+k */\n\t\treturn huge*copysign(huge,x);\t/*overflow*/\n\t    else return tiny*copysign(tiny,x); \t/*underflow*/\n        k += 54;\t\t\t\t/* subnormal result */\n        __HI(x) = (hx&0x800fffff)|(k<<20);\n        return x*twom54;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/s_signgam.c",
    "content": "#include \"fdlibm.h\"\nint signgam = 0;\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/s_significand.c",
    "content": "\n/* @(#)s_significand.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/*\n * significand(x) computes just\n * \tscalb(x, (double) -ilogb(x)),\n * for exercising the fraction-part(F) IEEE 754-1985 test vector.\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\n\tdouble significand(double x)\n#else\n\tdouble significand(x)\n\tdouble x;\n#endif\n{\n\treturn __ieee754_scalb(x,(double) -ilogb(x));\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/s_sin.c",
    "content": "\n/* @(#)s_sin.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* sin(x)\n * Return sine function of x.\n *\n * kernel function:\n *\t__kernel_sin\t\t... sine function on [-pi/4,pi/4]\n *\t__kernel_cos\t\t... cose function on [-pi/4,pi/4]\n *\t__ieee754_rem_pio2\t... argument reduction routine\n *\n * Method.\n *      Let S,C and T denote the sin, cos and tan respectively on \n *\t[-PI/4, +PI/4]. Reduce the argument x to y1+y2 = x-k*pi/2 \n *\tin [-pi/4 , +pi/4], and let n = k mod 4.\n *\tWe have\n *\n *          n        sin(x)      cos(x)        tan(x)\n *     ----------------------------------------------------------\n *\t    0\t       S\t   C\t\t T\n *\t    1\t       C\t  -S\t\t-1/T\n *\t    2\t      -S\t  -C\t\t T\n *\t    3\t      -C\t   S\t\t-1/T\n *     ----------------------------------------------------------\n *\n * Special cases:\n *      Let trig be any of sin, cos, or tan.\n *      trig(+-INF)  is NaN, with signals;\n *      trig(NaN)    is that NaN;\n *\n * Accuracy:\n *\tTRIG(x) returns trig(x) nearly rounded \n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\n\tdouble sin(double x)\n#else\n\tdouble sin(x)\n\tdouble x;\n#endif\n{\n\tdouble y[2],z=0.0;\n\tint n, ix;\n\n    /* High word of x. */\n\tix = __HI(x);\n\n    /* |x| ~< pi/4 */\n\tix &= 0x7fffffff;\n\tif(ix <= 0x3fe921fb) return __kernel_sin(x,z,0);\n\n    /* sin(Inf or NaN) is NaN */\n\telse if (ix>=0x7ff00000) return x-x;\n\n    /* argument reduction needed */\n\telse {\n\t    n = __ieee754_rem_pio2(x,y);\n\t    switch(n&3) {\n\t\tcase 0: return  __kernel_sin(y[0],y[1],1);\n\t\tcase 1: return  __kernel_cos(y[0],y[1]);\n\t\tcase 2: return -__kernel_sin(y[0],y[1],1);\n\t\tdefault:\n\t\t\treturn -__kernel_cos(y[0],y[1]);\n\t    }\n\t}\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/s_tan.c",
    "content": "\n/* @(#)s_tan.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* tan(x)\n * Return tangent function of x.\n *\n * kernel function:\n *\t__kernel_tan\t\t... tangent function on [-pi/4,pi/4]\n *\t__ieee754_rem_pio2\t... argument reduction routine\n *\n * Method.\n *      Let S,C and T denote the sin, cos and tan respectively on \n *\t[-PI/4, +PI/4]. Reduce the argument x to y1+y2 = x-k*pi/2 \n *\tin [-pi/4 , +pi/4], and let n = k mod 4.\n *\tWe have\n *\n *          n        sin(x)      cos(x)        tan(x)\n *     ----------------------------------------------------------\n *\t    0\t       S\t   C\t\t T\n *\t    1\t       C\t  -S\t\t-1/T\n *\t    2\t      -S\t  -C\t\t T\n *\t    3\t      -C\t   S\t\t-1/T\n *     ----------------------------------------------------------\n *\n * Special cases:\n *      Let trig be any of sin, cos, or tan.\n *      trig(+-INF)  is NaN, with signals;\n *      trig(NaN)    is that NaN;\n *\n * Accuracy:\n *\tTRIG(x) returns trig(x) nearly rounded \n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\n\tdouble tan(double x)\n#else\n\tdouble tan(x)\n\tdouble x;\n#endif\n{\n\tdouble y[2],z=0.0;\n\tint n, ix;\n\n    /* High word of x. */\n\tix = __HI(x);\n\n    /* |x| ~< pi/4 */\n\tix &= 0x7fffffff;\n\tif(ix <= 0x3fe921fb) return __kernel_tan(x,z,1);\n\n    /* tan(Inf or NaN) is NaN */\n\telse if (ix>=0x7ff00000) return x-x;\t\t/* NaN */\n\n    /* argument reduction needed */\n\telse {\n\t    n = __ieee754_rem_pio2(x,y);\n\t    return __kernel_tan(y[0],y[1],1-((n&1)<<1)); /*   1 -- n even\n\t\t\t\t\t\t\t-1 -- n odd */\n\t}\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/s_tanh.c",
    "content": "\n/* @(#)s_tanh.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* Tanh(x)\n * Return the Hyperbolic Tangent of x\n *\n * Method :\n *\t\t\t\t       x    -x\n *\t\t\t\t      e  - e\n *\t0. tanh(x) is defined to be -----------\n *\t\t\t\t       x    -x\n *\t\t\t\t      e  + e\n *\t1. reduce x to non-negative by tanh(-x) = -tanh(x).\n *\t2.  0      <= x <= 2**-55 : tanh(x) := x*(one+x)\n *\t\t\t\t\t        -t\n *\t    2**-55 <  x <=  1     : tanh(x) := -----; t = expm1(-2x)\n *\t\t\t\t\t       t + 2\n *\t\t\t\t\t\t     2\n *\t    1      <= x <=  22.0  : tanh(x) := 1-  ----- ; t=expm1(2x)\n *\t\t\t\t\t\t   t + 2\n *\t    22.0   <  x <= INF    : tanh(x) := 1.\n *\n * Special cases:\n *\ttanh(NaN) is NaN;\n *\tonly tanh(0)=0 is exact for finite argument.\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic const double one=1.0, two=2.0, tiny = 1.0e-300;\n#else\nstatic double one=1.0, two=2.0, tiny = 1.0e-300;\n#endif\n\n#ifdef __STDC__\n\tdouble tanh(double x)\n#else\n\tdouble tanh(x)\n\tdouble x;\n#endif\n{\n\tdouble t,z;\n\tint jx,ix;\n\n    /* High word of |x|. */\n\tjx = __HI(x);\n\tix = jx&0x7fffffff;\n\n    /* x is INF or NaN */\n\tif(ix>=0x7ff00000) { \n\t    if (jx>=0) return one/x+one;    /* tanh(+-inf)=+-1 */\n\t    else       return one/x-one;    /* tanh(NaN) = NaN */\n\t}\n\n    /* |x| < 22 */\n\tif (ix < 0x40360000) {\t\t/* |x|<22 */\n\t    if (ix<0x3c800000) \t\t/* |x|<2**-55 */\n\t\treturn x*(one+x);    \t/* tanh(small) = small */\n\t    if (ix>=0x3ff00000) {\t/* |x|>=1  */\n\t\tt = expm1(two*fabs(x));\n\t\tz = one - two/(t+two);\n\t    } else {\n\t        t = expm1(-two*fabs(x));\n\t        z= -t/(t+two);\n\t    }\n    /* |x| > 22, return +-1 */\n\t} else {\n\t    z = one - tiny;\t\t/* raised inexact flag */\n\t}\n\treturn (jx>=0)? z: -z;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/w_acos.c",
    "content": "\n/* @(#)w_acos.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/*\n * wrap_acos(x)\n */\n\n#include \"fdlibm.h\"\n\n\n#ifdef __STDC__\n\tdouble acos(double x)\t\t/* wrapper acos */\n#else\n\tdouble acos(x)\t\t\t/* wrapper acos */\n\tdouble x;\n#endif\n{\n#ifdef _IEEE_LIBM\n\treturn __ieee754_acos(x);\n#else\n\tdouble z;\n\tz = __ieee754_acos(x);\n\tif(_LIB_VERSION == _IEEE_ || isnan(x)) return z;\n\tif(fabs(x)>1.0) {\n\t        return __kernel_standard(x,x,1); /* acos(|x|>1) */\n\t} else\n\t    return z;\n#endif\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/w_acosh.c",
    "content": "\n/* @(#)w_acosh.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n *\n */\n\n/* \n * wrapper acosh(x)\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\n\tdouble acosh(double x)\t\t/* wrapper acosh */\n#else\n\tdouble acosh(x)\t\t\t/* wrapper acosh */\n\tdouble x;\n#endif\n{\n#ifdef _IEEE_LIBM\n\treturn __ieee754_acosh(x);\n#else\n\tdouble z;\n\tz = __ieee754_acosh(x);\n\tif(_LIB_VERSION == _IEEE_ || isnan(x)) return z;\n\tif(x<1.0) {\n\t        return __kernel_standard(x,x,29); /* acosh(x<1) */\n\t} else\n\t    return z;\n#endif\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/w_asin.c",
    "content": "\n/* @(#)w_asin.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n *\n */\n\n/* \n * wrapper asin(x)\n */\n\n\n#include \"fdlibm.h\"\n\n\n#ifdef __STDC__\n\tdouble asin(double x)\t\t/* wrapper asin */\n#else\n\tdouble asin(x)\t\t\t/* wrapper asin */\n\tdouble x;\n#endif\n{\n#ifdef _IEEE_LIBM\n\treturn __ieee754_asin(x);\n#else\n\tdouble z;\n\tz = __ieee754_asin(x);\n\tif(_LIB_VERSION == _IEEE_ || isnan(x)) return z;\n\tif(fabs(x)>1.0) {\n\t        return __kernel_standard(x,x,2); /* asin(|x|>1) */\n\t} else\n\t    return z;\n#endif\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/w_atan2.c",
    "content": "\n/* @(#)w_atan2.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n *\n */\n\n/* \n * wrapper atan2(y,x)\n */\n\n#include \"fdlibm.h\"\n\n\n#ifdef __STDC__\n\tdouble atan2(double y, double x)\t/* wrapper atan2 */\n#else\n\tdouble atan2(y,x)\t\t\t/* wrapper atan2 */\n\tdouble y,x;\n#endif\n{\n#ifdef _IEEE_LIBM\n\treturn __ieee754_atan2(y,x);\n#else\n\tdouble z;\n\tz = __ieee754_atan2(y,x);\n\tif(_LIB_VERSION == _IEEE_||isnan(x)||isnan(y)) return z;\n\tif(x==0.0&&y==0.0) {\n\t        return __kernel_standard(y,x,3); /* atan2(+-0,+-0) */\n\t} else\n\t    return z;\n#endif\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/w_atanh.c",
    "content": "\n/* @(#)w_atanh.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n/* \n * wrapper atanh(x)\n */\n\n#include \"fdlibm.h\"\n\n\n#ifdef __STDC__\n\tdouble atanh(double x)\t\t/* wrapper atanh */\n#else\n\tdouble atanh(x)\t\t\t/* wrapper atanh */\n\tdouble x;\n#endif\n{\n#ifdef _IEEE_LIBM\n\treturn __ieee754_atanh(x);\n#else\n\tdouble z,y;\n\tz = __ieee754_atanh(x);\n\tif(_LIB_VERSION == _IEEE_ || isnan(x)) return z;\n\ty = fabs(x);\n\tif(y>=1.0) {\n\t    if(y>1.0)\n\t        return __kernel_standard(x,x,30); /* atanh(|x|>1) */\n\t    else \n\t        return __kernel_standard(x,x,31); /* atanh(|x|==1) */\n\t} else\n\t    return z;\n#endif\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/w_cosh.c",
    "content": "\n/* @(#)w_cosh.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* \n * wrapper cosh(x)\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\n\tdouble cosh(double x)\t\t/* wrapper cosh */\n#else\n\tdouble cosh(x)\t\t\t/* wrapper cosh */\n\tdouble x;\n#endif\n{\n#ifdef _IEEE_LIBM\n\treturn __ieee754_cosh(x);\n#else\n\tdouble z;\n\tz = __ieee754_cosh(x);\n\tif(_LIB_VERSION == _IEEE_ || isnan(x)) return z;\n\tif(fabs(x)>7.10475860073943863426e+02) {\t\n\t        return __kernel_standard(x,x,5); /* cosh overflow */\n\t} else\n\t    return z;\n#endif\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/w_exp.c",
    "content": "\n/* @(#)w_exp.c 1.4 04/04/22 */\n/*\n * ====================================================\n * Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.\n *\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* \n * wrapper exp(x)\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\nstatic const double\n#else\nstatic double\n#endif\no_threshold=  7.09782712893383973096e+02,  /* 0x40862E42, 0xFEFA39EF */\nu_threshold= -7.45133219101941108420e+02;  /* 0xc0874910, 0xD52D3051 */\n\n#ifdef __STDC__\n\tdouble exp(double x)\t\t/* wrapper exp */\n#else\n\tdouble exp(x)\t\t\t/* wrapper exp */\n\tdouble x;\n#endif\n{\n#ifdef _IEEE_LIBM\n\treturn __ieee754_exp(x);\n#else\n\tdouble z;\n\tz = __ieee754_exp(x);\n\tif(_LIB_VERSION == _IEEE_) return z;\n\tif(finite(x)) {\n\t    if(x>o_threshold)\n\t        return __kernel_standard(x,x,6); /* exp overflow */\n\t    else if(x<u_threshold)\n\t        return __kernel_standard(x,x,7); /* exp underflow */\n\t} \n\treturn z;\n#endif\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/w_fmod.c",
    "content": "\n/* @(#)w_fmod.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* \n * wrapper fmod(x,y)\n */\n\n#include \"fdlibm.h\"\n\n\n#ifdef __STDC__\n\tdouble fmod(double x, double y)\t/* wrapper fmod */\n#else\n\tdouble fmod(x,y)\t\t/* wrapper fmod */\n\tdouble x,y;\n#endif\n{\n#ifdef _IEEE_LIBM\n\treturn __ieee754_fmod(x,y);\n#else\n\tdouble z;\n\tz = __ieee754_fmod(x,y);\n\tif(_LIB_VERSION == _IEEE_ ||isnan(y)||isnan(x)) return z;\n\tif(y==0.0) {\n\t        return __kernel_standard(x,y,27); /* fmod(x,0) */\n\t} else\n\t    return z;\n#endif\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/w_gamma.c",
    "content": "\n/* @(#)w_gamma.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n *\n */\n\n/* double gamma(double x)\n * Return the logarithm of the Gamma function of x.\n *\n * Method: call gamma_r\n */\n\n#include \"fdlibm.h\"\n\nextern int signgam;\n\n#ifdef __STDC__\n\tdouble gamma(double x)\n#else\n\tdouble gamma(x)\n\tdouble x;\n#endif\n{\n#ifdef _IEEE_LIBM\n\treturn __ieee754_gamma_r(x,&signgam);\n#else\n        double y;\n        y = __ieee754_gamma_r(x,&signgam);\n        if(_LIB_VERSION == _IEEE_) return y;\n        if(!finite(y)&&finite(x)) {\n            if(floor(x)==x&&x<=0.0)\n                return __kernel_standard(x,x,41); /* gamma pole */\n            else\n                return __kernel_standard(x,x,40); /* gamma overflow */\n        } else\n            return y;\n#endif\n}             \n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/w_gamma_r.c",
    "content": "\n/* @(#)w_gamma_r.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* \n * wrapper double gamma_r(double x, int *signgamp)\n */\n\n#include \"fdlibm.h\"\n\n\n#ifdef __STDC__\n\tdouble gamma_r(double x, int *signgamp) /* wrapper lgamma_r */\n#else\n\tdouble gamma_r(x,signgamp)              /* wrapper lgamma_r */\n        double x; int *signgamp;\n#endif\n{\n#ifdef _IEEE_LIBM\n\treturn __ieee754_gamma_r(x,signgamp);\n#else\n        double y;\n        y = __ieee754_gamma_r(x,signgamp);\n        if(_LIB_VERSION == _IEEE_) return y;\n        if(!finite(y)&&finite(x)) {\n            if(floor(x)==x&&x<=0.0)\n                return __kernel_standard(x,x,41); /* gamma pole */\n            else\n                return __kernel_standard(x,x,40); /* gamma overflow */\n        } else\n            return y;\n#endif\n}             \n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/w_hypot.c",
    "content": "\n/* @(#)w_hypot.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/*\n * wrapper hypot(x,y)\n */\n\n#include \"fdlibm.h\"\n\n\n#ifdef __STDC__\n\tdouble hypot(double x, double y)/* wrapper hypot */\n#else\n\tdouble hypot(x,y)\t\t/* wrapper hypot */\n\tdouble x,y;\n#endif\n{\n#ifdef _IEEE_LIBM\n\treturn __ieee754_hypot(x,y);\n#else\n\tdouble z;\n\tz = __ieee754_hypot(x,y);\n\tif(_LIB_VERSION == _IEEE_) return z;\n\tif((!finite(z))&&finite(x)&&finite(y))\n\t    return __kernel_standard(x,y,4); /* hypot overflow */\n\telse\n\t    return z;\n#endif\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/w_j0.c",
    "content": "\n/* @(#)w_j0.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/*\n * wrapper j0(double x), y0(double x)\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\n\tdouble j0(double x)\t\t/* wrapper j0 */\n#else\n\tdouble j0(x)\t\t\t/* wrapper j0 */\n\tdouble x;\n#endif\n{\n#ifdef _IEEE_LIBM\n\treturn __ieee754_j0(x);\n#else\n\tdouble z = __ieee754_j0(x);\n\tif(_LIB_VERSION == _IEEE_ || isnan(x)) return z;\n\tif(fabs(x)>X_TLOSS) {\n\t        return __kernel_standard(x,x,34); /* j0(|x|>X_TLOSS) */\n\t} else\n\t    return z;\n#endif\n}\n\n#ifdef __STDC__\n\tdouble y0(double x)\t\t/* wrapper y0 */\n#else\n\tdouble y0(x)\t\t\t/* wrapper y0 */\n\tdouble x;\n#endif\n{\n#ifdef _IEEE_LIBM\n\treturn __ieee754_y0(x);\n#else\n\tdouble z;\n\tz = __ieee754_y0(x);\n\tif(_LIB_VERSION == _IEEE_ || isnan(x) ) return z;\n        if(x <= 0.0){\n                if(x==0.0)\n                    /* d= -one/(x-x); */\n                    return __kernel_standard(x,x,8);\n                else\n                    /* d = zero/(x-x); */\n                    return __kernel_standard(x,x,9);\n        }\n\tif(x>X_TLOSS) {\n\t        return __kernel_standard(x,x,35); /* y0(x>X_TLOSS) */\n\t} else\n\t    return z;\n#endif\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/w_j1.c",
    "content": "\n/* @(#)w_j1.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* \n * wrapper of j1,y1 \n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\n\tdouble j1(double x)\t\t/* wrapper j1 */\n#else\n\tdouble j1(x)\t\t\t/* wrapper j1 */\n\tdouble x;\n#endif\n{\n#ifdef _IEEE_LIBM\n\treturn __ieee754_j1(x);\n#else\n\tdouble z;\n\tz = __ieee754_j1(x);\n\tif(_LIB_VERSION == _IEEE_ || isnan(x) ) return z;\n\tif(fabs(x)>X_TLOSS) {\n\t        return __kernel_standard(x,x,36); /* j1(|x|>X_TLOSS) */\n\t} else\n\t    return z;\n#endif\n}\n\n#ifdef __STDC__\n\tdouble y1(double x)\t\t/* wrapper y1 */\n#else\n\tdouble y1(x)\t\t\t/* wrapper y1 */\n\tdouble x;\n#endif\n{\n#ifdef _IEEE_LIBM\n\treturn __ieee754_y1(x);\n#else\n\tdouble z;\n\tz = __ieee754_y1(x);\n\tif(_LIB_VERSION == _IEEE_ || isnan(x) ) return z;\n        if(x <= 0.0){\n                if(x==0.0)\n                    /* d= -one/(x-x); */\n                    return __kernel_standard(x,x,10);\n                else\n                    /* d = zero/(x-x); */\n                    return __kernel_standard(x,x,11);\n        }\n\tif(x>X_TLOSS) {\n\t        return __kernel_standard(x,x,37); /* y1(x>X_TLOSS) */\n\t} else\n\t    return z;\n#endif\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/w_jn.c",
    "content": "\n/* @(#)w_jn.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/*\n * wrapper jn(int n, double x), yn(int n, double x)\n * floating point Bessel's function of the 1st and 2nd kind\n * of order n\n *          \n * Special cases:\n *\ty0(0)=y1(0)=yn(n,0) = -inf with division by zero signal;\n *\ty0(-ve)=y1(-ve)=yn(n,-ve) are NaN with invalid signal.\n * Note 2. About jn(n,x), yn(n,x)\n *\tFor n=0, j0(x) is called,\n *\tfor n=1, j1(x) is called,\n *\tfor n<x, forward recursion us used starting\n *\tfrom values of j0(x) and j1(x).\n *\tfor n>x, a continued fraction approximation to\n *\tj(n,x)/j(n-1,x) is evaluated and then backward\n *\trecursion is used starting from a supposed value\n *\tfor j(n,x). The resulting value of j(0,x) is\n *\tcompared with the actual value to correct the\n *\tsupposed value of j(n,x).\n *\n *\tyn(n,x) is similar in all respects, except\n *\tthat forward recursion is used for all\n *\tvalues of n>1.\n *\t\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\n\tdouble jn(int n, double x)\t/* wrapper jn */\n#else\n\tdouble jn(n,x)\t\t\t/* wrapper jn */\n\tdouble x; int n;\n#endif\n{\n#ifdef _IEEE_LIBM\n\treturn __ieee754_jn(n,x);\n#else\n\tdouble z;\n\tz = __ieee754_jn(n,x);\n\tif(_LIB_VERSION == _IEEE_ || isnan(x) ) return z;\n\tif(fabs(x)>X_TLOSS) {\n\t    return __kernel_standard((double)n,x,38); /* jn(|x|>X_TLOSS,n) */\n\t} else\n\t    return z;\n#endif\n}\n\n#ifdef __STDC__\n\tdouble yn(int n, double x)\t/* wrapper yn */\n#else\n\tdouble yn(n,x)\t\t\t/* wrapper yn */\n\tdouble x; int n;\n#endif\n{\n#ifdef _IEEE_LIBM\n\treturn __ieee754_yn(n,x);\n#else\n\tdouble z;\n\tz = __ieee754_yn(n,x);\n\tif(_LIB_VERSION == _IEEE_ || isnan(x) ) return z;\n        if(x <= 0.0){\n                if(x==0.0)\n                    /* d= -one/(x-x); */\n                    return __kernel_standard((double)n,x,12);\n                else\n                    /* d = zero/(x-x); */\n                    return __kernel_standard((double)n,x,13);\n        }\n\tif(x>X_TLOSS) {\n\t    return __kernel_standard((double)n,x,39); /* yn(x>X_TLOSS,n) */\n\t} else\n\t    return z;\n#endif\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/w_lgamma.c",
    "content": "\n/* @(#)w_lgamma.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n *\n */\n\n/* double lgamma(double x)\n * Return the logarithm of the Gamma function of x.\n *\n * Method: call __ieee754_lgamma_r\n */\n\n#include \"fdlibm.h\"\n\nextern int signgam;\n\n#ifdef __STDC__\n\tdouble lgamma(double x)\n#else\n\tdouble lgamma(x)\n\tdouble x;\n#endif\n{\n#ifdef _IEEE_LIBM\n\treturn __ieee754_lgamma_r(x,&signgam);\n#else\n        double y;\n        y = __ieee754_lgamma_r(x,&signgam);\n        if(_LIB_VERSION == _IEEE_) return y;\n        if(!finite(y)&&finite(x)) {\n            if(floor(x)==x&&x<=0.0)\n                return __kernel_standard(x,x,15); /* lgamma pole */\n            else\n                return __kernel_standard(x,x,14); /* lgamma overflow */\n        } else\n            return y;\n#endif\n}             \n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/w_lgamma_r.c",
    "content": "\n/* @(#)w_lgamma_r.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* \n * wrapper double lgamma_r(double x, int *signgamp)\n */\n\n#include \"fdlibm.h\"\n\n\n#ifdef __STDC__\n\tdouble lgamma_r(double x, int *signgamp) /* wrapper lgamma_r */\n#else\n\tdouble lgamma_r(x,signgamp)              /* wrapper lgamma_r */\n        double x; int *signgamp;\n#endif\n{\n#ifdef _IEEE_LIBM\n\treturn __ieee754_lgamma_r(x,signgamp);\n#else\n        double y;\n        y = __ieee754_lgamma_r(x,signgamp);\n        if(_LIB_VERSION == _IEEE_) return y;\n        if(!finite(y)&&finite(x)) {\n            if(floor(x)==x&&x<=0.0)\n                return __kernel_standard(x,x,15); /* lgamma pole */\n            else\n                return __kernel_standard(x,x,14); /* lgamma overflow */\n        } else\n            return y;\n#endif\n}             \n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/w_log.c",
    "content": "\n/* @(#)w_log.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/*\n * wrapper log(x)\n */\n\n#include \"fdlibm.h\"\n\n\n#ifdef __STDC__\n\tdouble log(double x)\t\t/* wrapper log */\n#else\n\tdouble log(x)\t\t\t/* wrapper log */\n\tdouble x;\n#endif\n{\n#ifdef _IEEE_LIBM\n\treturn __ieee754_log(x);\n#else\n\tdouble z;\n\tz = __ieee754_log(x);\n\tif(_LIB_VERSION == _IEEE_ || isnan(x) || x > 0.0) return z;\n\tif(x==0.0)\n\t    return __kernel_standard(x,x,16); /* log(0) */\n\telse \n\t    return __kernel_standard(x,x,17); /* log(x<0) */\n#endif\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/w_log10.c",
    "content": "\n/* @(#)w_log10.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* \n * wrapper log10(X)\n */\n\n#include \"fdlibm.h\"\n\n\n#ifdef __STDC__\n\tdouble log10(double x)\t\t/* wrapper log10 */\n#else\n\tdouble log10(x)\t\t\t/* wrapper log10 */\n\tdouble x;\n#endif\n{\n#ifdef _IEEE_LIBM\n\treturn __ieee754_log10(x);\n#else\n\tdouble z;\n\tz = __ieee754_log10(x);\n\tif(_LIB_VERSION == _IEEE_ || isnan(x)) return z;\n\tif(x<=0.0) {\n\t    if(x==0.0)\n\t        return __kernel_standard(x,x,18); /* log10(0) */\n\t    else \n\t        return __kernel_standard(x,x,19); /* log10(x<0) */\n\t} else\n\t    return z;\n#endif\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/w_pow.c",
    "content": "\n\n/* @(#)w_pow.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* \n * wrapper pow(x,y) return x**y\n */\n\n#include \"fdlibm.h\"\n\n\n#ifdef __STDC__\n\tdouble pow(double x, double y)\t/* wrapper pow */\n#else\n\tdouble pow(x,y)\t\t\t/* wrapper pow */\n\tdouble x,y;\n#endif\n{\n#ifdef _IEEE_LIBM\n\treturn  __ieee754_pow(x,y);\n#else\n\tdouble z;\n\tz=__ieee754_pow(x,y);\n\tif(_LIB_VERSION == _IEEE_|| isnan(y)) return z;\n\tif(isnan(x)) {\n\t    if(y==0.0) \n\t        return __kernel_standard(x,y,42); /* pow(NaN,0.0) */\n\t    else \n\t\treturn z;\n\t}\n\tif(x==0.0){ \n\t    if(y==0.0)\n\t        return __kernel_standard(x,y,20); /* pow(0.0,0.0) */\n\t    if(finite(y)&&y<0.0)\n\t        return __kernel_standard(x,y,23); /* pow(0.0,negative) */\n\t    return z;\n\t}\n\tif(!finite(z)) {\n\t    if(finite(x)&&finite(y)) {\n\t        if(isnan(z))\n\t            return __kernel_standard(x,y,24); /* pow neg**non-int */\n\t        else \n\t            return __kernel_standard(x,y,21); /* pow overflow */\n\t    }\n\t} \n\tif(z==0.0&&finite(x)&&finite(y))\n\t    return __kernel_standard(x,y,22); /* pow underflow */\n\treturn z;\n#endif\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/w_remainder.c",
    "content": "\n/* @(#)w_remainder.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* \n * wrapper remainder(x,p)\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\n\tdouble remainder(double x, double y)\t/* wrapper remainder */\n#else\n\tdouble remainder(x,y)\t\t\t/* wrapper remainder */\n\tdouble x,y;\n#endif\n{\n#ifdef _IEEE_LIBM\n\treturn __ieee754_remainder(x,y);\n#else\n\tdouble z;\n\tz = __ieee754_remainder(x,y);\n\tif(_LIB_VERSION == _IEEE_ || isnan(y)) return z;\n\tif(y==0.0) \n\t    return __kernel_standard(x,y,28); /* remainder(x,0) */\n\telse\n\t    return z;\n#endif\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/w_scalb.c",
    "content": "\n/* @(#)w_scalb.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/*\n * wrapper scalb(double x, double fn) is provide for\n * passing various standard test suite. One \n * should use scalbn() instead.\n */\n\n#include \"fdlibm.h\"\n\n#include <errno.h>\n\n#ifdef __STDC__\n#ifdef _SCALB_INT\n\tdouble scalb(double x, int fn)\t\t/* wrapper scalb */\n#else\n\tdouble scalb(double x, double fn)\t/* wrapper scalb */\n#endif\n#else\n\tdouble scalb(x,fn)\t\t\t/* wrapper scalb */\n#ifdef _SCALB_INT\n\tdouble x; int fn;\n#else\n\tdouble x,fn;\n#endif\n#endif\n{\n#ifdef _IEEE_LIBM\n\treturn __ieee754_scalb(x,fn);\n#else\n\tdouble z;\n\tz = __ieee754_scalb(x,fn);\n\tif(_LIB_VERSION == _IEEE_) return z;\n\tif(!(finite(z)||isnan(z))&&finite(x)) {\n\t    return __kernel_standard(x,(double)fn,32); /* scalb overflow */\n\t}\n\tif(z==0.0&&z!=x) {\n\t    return __kernel_standard(x,(double)fn,33); /* scalb underflow */\n\t} \n#ifndef _SCALB_INT\n\tif(!finite(fn)) errno = ERANGE;\n#endif\n\treturn z;\n#endif \n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/w_sinh.c",
    "content": "\n/* @(#)w_sinh.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* \n * wrapper sinh(x)\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\n\tdouble sinh(double x)\t\t/* wrapper sinh */\n#else\n\tdouble sinh(x)\t\t\t/* wrapper sinh */\n\tdouble x;\n#endif\n{\n#ifdef _IEEE_LIBM\n\treturn __ieee754_sinh(x);\n#else\n\tdouble z; \n\tz = __ieee754_sinh(x);\n\tif(_LIB_VERSION == _IEEE_) return z;\n\tif(!finite(z)&&finite(x)) {\n\t    return __kernel_standard(x,x,25); /* sinh overflow */\n\t} else\n\t    return z;\n#endif\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fdlibm/w_sqrt.c",
    "content": "\n/* @(#)w_sqrt.c 1.3 95/01/18 */\n/*\n * ====================================================\n * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\n *\n * Developed at SunSoft, a Sun Microsystems, Inc. business.\n * Permission to use, copy, modify, and distribute this\n * software is freely granted, provided that this notice \n * is preserved.\n * ====================================================\n */\n\n/* \n * wrapper sqrt(x)\n */\n\n#include \"fdlibm.h\"\n\n#ifdef __STDC__\n\tdouble sqrt(double x)\t\t/* wrapper sqrt */\n#else\n\tdouble sqrt(x)\t\t\t/* wrapper sqrt */\n\tdouble x;\n#endif\n{\n#ifdef _IEEE_LIBM\n\treturn __ieee754_sqrt(x);\n#else\n\tdouble z;\n\tz = __ieee754_sqrt(x);\n\tif(_LIB_VERSION == _IEEE_ || isnan(x)) return z;\n\tif(x<0.0) {\n\t    return __kernel_standard(x,x,26); /* sqrt(negative) */\n\t} else\n\t    return z;\n#endif\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/finite.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/s_finite.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/fmod.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/e_fmod.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/hypot.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/e_hypot.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/ieee754names.h",
    "content": "/* Re-define all of the conflicting names of fdlibm to use __ieee754_ prefix */\r\n#define asinh __ieee754_asinh\r\n#define atan __ieee754_atan\r\n#define cos __ieee754_cos\r\n#define expm1 __ieee754_expm1\r\n#define finite __ieee754_finite\r\n#define ldexp __ieee754_ldexp\r\n#define scalbn __ieee754_scalbn\r\n#define log1p __ieee754_log1p\r\n#define modf __ieee754_modf\r\n#define rint __ieee754_rint\r\n#define sin __ieee754_sin\r\n#define tan __ieee754_tan\r\n#define tanh __ieee754_tanh\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/isnan.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/s_isnan.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/k_cos.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/k_cos.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/k_rem_pio2.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/k_rem_pio2.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/k_sin.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/k_sin.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/k_tan.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/k_tan.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/ldexp.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/s_ldexp.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/log.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/e_log.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/log10.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/e_log10.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/log1p.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/s_log1p.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/modf.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/s_modf.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/pow.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/e_pow.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/rem_pio2.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/e_rem_pio2.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/rint.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/s_rint.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/scalb.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/e_scalb.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/scalbn.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/s_scalbn.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/sin.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/s_sin.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/sinh.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/e_sinh.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/sqrt.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/e_sqrt.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/tan.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/s_tan.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/FloatMathPlugin/tanh.c",
    "content": "#include \"ieee754names.h\"\r\n#include \"fdlibm/s_tanh.c\"\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/GStreamerPlugin/squeakAudioVideoPipeLineSignalInterface.c",
    "content": "/*\n *  squeakAudioVideoPipeLineSignalInterface.c\n *  GStreamer\n *\n *  Created by John M McIntosh on 3/29/08.\n *  Copyright 2008 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.con All rights reserved.\n *  Written for Viewpoints Research Institute  http://www.vpri.org/\n * http://www.opensource.org/licenses/mit-license.php\n *\n */\n\n#include <gst/gst.h>\n#include <gst/gstobject.h>\n#include <string.h>\n#include \"squeakAudioVideoPipeLineSignalInterface.h\"\n#include \"sqVirtualMachine.h\"\n\n\nvoid gst_SqueakVideoSink_set_caps (SqueakAudioVideoSinkPtr sink, GstCaps * caps);\nvoid gst_SqueakAudioSink_sink_write(GstElement* plugin, SqueakAudioVideoSinkPtr sink, gpointer data, guint length, GstClockTime  duration);\n\n\n/* Element Signals:\n  \"handoff\" :  void user_function (GstElement* object,\n                                   GstBuffer* arg0,\n                                   GstPad* arg1,\n                                   gpointer user_data);\n  \"preroll-handoff\" :  void user_function (GstElement* object,\n                                           GstBuffer* arg0,\n                                           GstPad* arg1,\n                                           gpointer user_data); */\n\n\nvoid squeakVideoHandOff (GstElement* object,\n\t\tGstBuffer* buf,\n\t\tGstPad* pad,\n\t\tgpointer user_data)  {\n\n\tGST_LOCK(object); \n\t{\n\t\tSqueakAudioVideoSinkPtr  squeaker = (SqueakAudioVideoSinkPtr) user_data;\n\t\t\n\t\tif (squeaker->width == 0)\n\t\t\tgst_SqueakVideoSink_set_caps(squeaker,GST_BUFFER_CAPS(buf));\n\t\t\n\t\t\n\t\tif (squeaker->width == 0) {\n\t\t\tGST_UNLOCK(object);\n\t\t\treturn;  /* should not happen but let's check */\n\t\t}\n\t\t\t\n\t\tif (GST_BUFFER_DATA(buf)) {\n\t\t\tguint totalBytes = (squeaker->depth == 24 ? 4 : 2)*squeaker->width*squeaker->height;\n\t\t\tsqueaker->frame_ready = TRUE;\n\t\t\tif (totalBytes != squeaker->allocbytes) {\n\t\t\t\tif (squeaker->copyToSendToSqueakVideo) \n\t\t\t\t\tg_free(squeaker->copyToSendToSqueakVideo);\n\t\t\t\tsqueaker->copyToSendToSqueakVideo = g_malloc(totalBytes);\n\t\t\t\tsqueaker->allocbytes = totalBytes;\n\t\t\t}\n\t\t\tmemcpy(squeaker->copyToSendToSqueakVideo,GST_BUFFER_DATA(buf),totalBytes);\n\t\t}\n\t}\n\tGST_UNLOCK(object);\n\n\t\n}\n\nvoid squeakSrcHandOff (GstElement* object,\n\t\tGstBuffer* buf,\n\t\tGstPad* pad,\n\t\tgpointer user_data)  {\n\n\tGST_LOCK(object);\n\t{\n\t\tSqueakAudioVideoSinkPtr  squeaker = (SqueakAudioVideoSinkPtr) user_data;\n\t\t\n\t\tif (squeaker->frame_ready) {\n\t\t\tsqueaker->frame_ready = FALSE;\n\t\t\tif (squeaker->semaphoreIndexForSink && squeaker->interpreterProxy) {\n\t\t\t\tsqueaker->interpreterProxy->signalSemaphoreWithIndex(squeaker->semaphoreIndexForSink);\n\t\t\t}\n\t\t\tif (GST_BUFFER_SIZE (buf) >= squeaker->actualbytes)\n\t\t\t\tmemcpy(GST_BUFFER_DATA(buf),squeaker->copyToSendToSqueakVideo,squeaker->actualbytes);\n\t\t\tGST_BUFFER_TIMESTAMP(buf) = squeaker->startTime;\n\t\t\tGST_BUFFER_DURATION(buf) = squeaker->duration;\n\t\t}\n\t}\n\tGST_UNLOCK(object);\n\n}\n\nvoid\n\tgst_SqueakVideoSink_set_caps (SqueakAudioVideoSinkPtr sink, GstCaps * caps) {\n\tGstStructure *structure;\t\n\tint width, height, depth;\n\tgboolean ret;\n\tconst GValue *fps;\n\tstructure = gst_caps_get_structure (caps, 0);\n\tret = gst_structure_get_int (structure, \"width\", &width);\n\tret = ret && gst_structure_get_int (structure, \"height\", &height);\n\tret = ret && gst_structure_get_int (structure, \"depth\", &depth);\n\tfps = gst_structure_get_value (structure, \"framerate\");\n\tret = ret && (fps != NULL);\n\tif (!ret) return;\n\tsink->width = width;\n\tsink->height = height;\n\tsink->depth = depth;\n\tsink->fps_n = gst_value_get_fraction_numerator(fps);\n\tsink->fps_d = gst_value_get_fraction_denominator(fps);\n\tsink->width = width;\n\tsink->height = height;\n}\n\n\nvoid squeakAudioHandOff (GstElement* object,\n\t\tGstBuffer* buf,\n\t\tGstPad* pad,\n\t\tgpointer user_data)  {\n\n\tSqueakAudioVideoSinkPtr  squeaker = (SqueakAudioVideoSinkPtr) user_data;\n\t\n\tif (GST_BUFFER_DATA(buf)) {\n\t\tgst_SqueakAudioSink_sink_write(object, squeaker,GST_BUFFER_DATA(buf), GST_BUFFER_SIZE(buf),GST_BUFFER_DURATION(buf));\n\t}\n\t\n}\n\n\n\nvoid gst_SqueakAudioSink_sink_write(GstElement* plugin, SqueakAudioVideoSinkPtr sink, gpointer data,guint length, GstClockTime  duration)\n{\n\tguint64 squeakbuffersize;\n\tguint8\t\t* startLocation;\n\t\n\t\t\n\tGST_LOCK(plugin);\n\t\n\tif (sink->copyToSendToSqueakAudio == NULL) {\n\t\tsink->copyToSendToSqueakAudio = gst_buffer_new_and_alloc(22050*8);  /* 2.0 second of data */\n\t\tGST_BUFFER_OFFSET_END(sink->copyToSendToSqueakAudio) = 0;\n\t}\n\n\tsqueakbuffersize = GST_BUFFER_OFFSET_END(sink->copyToSendToSqueakAudio);\n\t/* semaphore not signalled and if we go over X then we want to signal the semaphore if it exits, but only once */\n\t\n\tif ((sink->semaphoreWasSignaled == 0) && \n\t\t((squeakbuffersize + length) > 22050))\n\t\t{\tsink->semaphoreWasSignaled = 1;\n\t\t\tif (sink->semaphoreIndexForSink && sink->interpreterProxy) {\n\t\t\t\tsink->interpreterProxy->signalSemaphoreWithIndex(sink->semaphoreIndexForSink);\n\t\t\t}\n\t\t}\n\t\n\t/* if squeakbuffersize + incoming length <= 22050*8 then allow the copy, otherwise we FLUSH the buffer and start over */\n\t\n\tif ((squeakbuffersize + length) <= 22050*8) {\n\t\t\tstartLocation = GST_BUFFER_DATA(sink->copyToSendToSqueakAudio) + squeakbuffersize;\n\t\t} else {\n\t\t\t/* buffer full and squeak not getting data, please wait */\n\t\t\t\n\t\t\tGST_BUFFER_OFFSET_END(sink->copyToSendToSqueakAudio) = 0;\n\t\t\tstartLocation = GST_BUFFER_DATA(sink->copyToSendToSqueakAudio);\n\t\t} \n\t\n\t/* copy data to the start of the squeak buffer or to some offset, and not run over the end! */\n\t\t\t\n\tmemcpy(startLocation,data,length);\n\tGST_BUFFER_OFFSET_END(sink->copyToSendToSqueakAudio) = GST_BUFFER_OFFSET_END(sink->copyToSendToSqueakAudio) + length;\n\tif (sink->prerollCounter) {\n\t\tsink->prerollCounter = sink->prerollCounter -1;\n\t\tGST_UNLOCK(plugin);\n\t\treturn;\n\t}\n\t\t\n\tGST_UNLOCK(plugin);\n\t \t\n\n\t{\n\t\t\t/* Wait for this many milliseconds so squeak can catch up per buffer write */\n\t\t\t\n\t/*\t\tGstClock *clock;\n\t\t\tGstClockID id;\n\t\t\tGstClockTime base;\n\t\t\tGstClockReturn result;\n\t\t\tgdouble millisecondestimate;\n\t\t\t\t\t\t\n\t\t\tmillisecondestimate = (duration/1000000);\n\t\t\t\t\n\t\t\tclock = gst_system_clock_obtain ();\n\t\t\tbase = gst_clock_get_time (clock);\n\t\t\tid = gst_clock_new_single_shot_id (clock, base + (gint)millisecondestimate);\n\t\t\tresult = gst_clock_id_wait (id, NULL);\n\t\t\tgst_clock_id_unref(id); */\n\t\t} \n\t\n\treturn;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/GStreamerPlugin/squeakAudioVideoPipeLineSignalInterface.h",
    "content": "/*\n *  squeakAudioVideoPipeLineSignalInterface.h\n *  GStreamer\n *\n *  Created by John M McIntosh on 4/1/08.\n *  Copyright 2008 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.con All rights reserved.\n *  Written for Viewpoints Research Institute  http://www.vpri.org/\n * http://www.opensource.org/licenses/mit-license.php\n *\n */\n\nstruct _SqueakAudioVideoSink { \n   GstElement *owner;\n   void*\thandler;\n   GstBuffer *copyToSendToSqueakAudio;\n   gboolean semaphoreWasSignaled;\n   gint semaphoreIndexForSink;\n   gint prerollCounter;\n   guchar *copyToSendToSqueakVideo;\n   guint allocbytes;\n   guint actualbytes;\n   guint width;\n   guint height;\n   guint fps_n;\n   guint fps_d;\n   guint depth;\n   GstClockTime startTime;\n   GstClockTime duration;\n   gboolean frame_ready;\n\tstruct VirtualMachine* interpreterProxy;\n};\ntypedef struct _SqueakAudioVideoSink       SqueakAudioVideoSink;\ntypedef struct _SqueakAudioVideoSink       *SqueakAudioVideoSinkPtr;\n\nvoid squeakVideoHandOff (GstElement* object,\n\t\tGstBuffer* buf,\n\t\tGstPad* pad,\n\t\tgpointer user_data);\n\nvoid squeakAudioHandOff (GstElement* object,\n\t\tGstBuffer* buf,\n\t\tGstPad* pad,\n\t\tgpointer user_data);\n\t\t\nvoid squeakSrcHandOff (GstElement* object,\n\t\tGstBuffer* buf,\n\t\tGstPad* pad,\n\t\tgpointer user_data);\n\n#define GST_LOCK(obj)\t\t\t(g_mutex_lock(GST_OBJECT_CAST(obj)->lock))\n#define GST_UNLOCK(obj)\t\t\t(g_mutex_unlock(GST_OBJECT_CAST(obj)->lock))"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/HostWindowPlugin/HostWindowPlugin.h",
    "content": "/* Host windows plugin header file\n * tim@sumeru.stanford.edu\n * All sizes are in pixels; convert from OS abstract units as needed\n * windowHandles etc are expected to be SmallInteger valid values\n * windowHandle 1 is the traditional main window */\n\n/* closeWindow: arg is sqInt windowIndex. Fail (return 0) if anything goes wrong\n * - typically the windowIndex invalid or similar */\nextern sqInt closeWindow(sqInt index);\n\n/* createWindow: takes sqInt width, height and origin x/y plus a char* list of\n * as yet undefined attributes. Returns an sqInt window index or 0 for failure\n * Failure may occur because of an inability to add the window, too many\n * windows already extant (platform dependant), the specified size being\n * unreasonable etc. */\nextern sqInt createWindowWidthheightoriginXyattrlength(sqInt w, sqInt h, sqInt x, sqInt y,\nchar * list, sqInt attributeListLength);\n\n/* ioShowDisplayOnWindow: similar to ioShowDisplay but adds the sqInt windowIndex\n * Return true if ok, false if not, but not currently checked */\nextern sqInt ioShowDisplayOnWindow( unsigned char* dispBitsIndex, sqInt width, sqInt\nheight, sqInt depth, sqInt affectedL, sqInt affectedR, sqInt affectedT, sqInt affectedB,\nsqInt windowIndex);\n\n/* ioSizeOfWindow: arg is sqInt windowIndex. Return the size of the specified\n * window in (width<<16 || height) format like ioScreenSize.\n * Return -1 for failure - typically invalid windowIndex\n * -1 is chosen since itwould correspond to a window size of 64k@64k which\n * I hope is unlikely for some time to come */\nextern sqInt ioSizeOfWindow(sqInt windowIndex);\n\n/* ioSizeOfWindowSetxy: args are sqInt windowIndex, sqInt w & h for the\n * width / height to make the window. Return the actual size the OS\n * produced in (width<<16 || height) format or -1 for failure as above. */\nextern sqInt ioSizeOfWindowSetxy(sqInt windowIndex, sqInt w, sqInt h);\n\n/* ioPositionOfWindow: arg is sqInt windowIndex. Return the pos of the specified\n * window in (left<<16 || top) format like ioScreenSize.\n * Return -1 (as above) for failure - tpyically invalid windowIndex */\nextern sqInt ioPositionOfWindow(sqInt windowIndex);\n\n/* ioPositionOfWindowSetxy: args are sqInt windowIndex, sqInt x & y for the\n * origin x/y for the window. Return the actual origin the OS\n * produced in (left<<16 || top) format or -1 for failure, as above */\nextern sqInt ioPositionOfWindowSetxy(sqInt windowIndex, sqInt x, sqInt y);\n\n/* ioSetTitleOfWindow: args are sqInt windowIndex, char* newTitle and\n * sqInt size of new title. Fail with -1 if windowIndex is invalid, string is too\nlong for platform etc. Leave previous title in place on failure */\nsqInt ioSetTitleOfWindow(sqInt windowIndex, char * newTitle, sqInt sizeOfTitle);\n\n/* ioCloseAllWindows: sqIntended for VM shutdown.\n * Close all the windows that appear to be open.\n * No useful return value since we're getting out of Dodge anyway.\n */\nextern sqInt ioCloseAllWindows(void);\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/IA32ABI/dabusiness.h",
    "content": "/*\n *  dabusiness.h\n *\n *  Written by Eliot Miranda 11/07.\n *  Copyright 2007 Cadence Design Systems. All rights reserved.\n *\n * Body of the various callIA32XXXReturn functions.\n * Call a foreign function according to IA32-ish ABI rules.\n */\n\tlong i, size;\n\tsqInt funcAlien, resultMaybeAlien;\n\tchar *argvec;\n#if STACK_ALIGN_BYTES\n\tchar *argstart;\n#endif\n\n\tfor (i = numArgs, size = 0; --i >= 0;) {\n\t\tsqInt arg = argVector[i];\n\t\tif (objIsAlien(arg) && sizeField(arg))\n\t\t\tsize += moduloPOT(sizeof(long),abs(sizeField(arg)));\n\t\telse /* assume an integer or pointer.  check below. */\n\t\t\tsize += sizeof(long);\n\t}\n\n#if STACK_ALIGN_BYTES\n\t/* At point of call stack must be aligned to STACK_ALIGN_BYTES.  So alloca\n\t * at least enough for this plus the argvector, and start writing argvector\n\t * at aligned point.  Then just prior to call cut-back stack to aligned.\n\t */\n\targvec = alloca(STACK_ALIGN_BYTES + moduloPOT(STACK_ALIGN_BYTES,size));\n\targvec = alignModuloPOT(STACK_ALIGN_BYTES, argvec);\n\targstart = argvec;\n#else\n\targvec = alloca(moduloPOT(sizeof(long),size));\n# if defined(__MINGW32__) && (__GNUC__ >= 3)\n\t/*\n\t * cygwin & MinGW's gcc 3.4.x's alloca is a library routine that answers\n\t * %esp + 4, so the outgoing stack is offset by one word if uncorrected.\n\t * Grab the actual stack pointer to correct.\n\t */\n\targvec = getsp();\n# endif\n#endif\n\n\tfor (i = 0; i < numArgs; i++) {\n\t\tsqInt arg = argVector[i];\n\t\tif (isSmallInt(arg)) {\n\t\t\t*(long *)argvec = intVal(arg);\n\t\t\targvec += sizeof(long);\n\t\t}\n\t\telse if (objIsAlien(arg)) {\n\t\t\tlong  argByteSize;\n\n\t\t\tif (!(size = sizeField(arg)))\n\t\t\t\tsize = argByteSize = sizeof(void *);\n\t\t\telse\n\t\t\t\targByteSize = abs(size);\n\t\t\tmemcpy(argvec, startOfDataWithSize(arg,size), argByteSize);\n\t\t\targvec += moduloPOT(sizeof(long), argByteSize);\n\t\t}\n\t\telse if (objIsUnsafeAlien(arg)) {\n\t\t\tsqInt bitsObj = interpreterProxy->fetchPointerofObject(0,arg);\n\t\t\tvoid *v = interpreterProxy->firstIndexableField(bitsObj);\n\t\t\t*(void **)argvec = v;\n\t\t\targvec += sizeof(long);\n\t\t}\n\t\telse {\n\t\t\tlong v = interpreterProxy->signed32BitValueOf(arg);\n\t\t\tif (interpreterProxy->failed())\n\t\t\t\treturn PrimErrBadArgument;\n\t\t\t*(long *)argvec = v;\n\t\t\targvec += sizeof(long);\n\t\t}\n\t}\n\n\tfuncAlien = interpreterProxy->stackValue(funcOffset);\n\tf = *(void **)startOfParameterData(funcAlien);\n#if STACK_ALIGN_BYTES\n\t/* cut stack back to start of aligned args */\n\tsetsp(argstart);\n#endif\n\tr = f();\n\t/* post call need to refresh stack pointer in case of call-back and GC. */\n\tresultMaybeAlien = interpreterProxy->stackValue(resultOffset);\n\tif (objIsAlien(resultMaybeAlien)) {\n\t\tif (!(size = sizeField(resultMaybeAlien)))\n\t\t\tsize = sizeof(void *);\n\t\tmemcpy(startOfDataWithSize(resultMaybeAlien,size),\n\t\t\t\t&r,\n\t\t\t\tmin(abs(size), sizeof(r)));\n\t}\n\n\treturn PrimNoErr;\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/IA32ABI/ia32abi.h",
    "content": "/*\n *  platforms/Cross/plugins/IA32ABI/ia32abi.h\n *\n *  Written by Eliot Miranda 11/07.\n *  Copyright 2007 Cadence Design Systems. All rights reserved.\n *\n * Call foreign functons returning results in either %eax, %edx (Integral)\n * or %f0 (Float, Double).  \n *\n * The primitive will have signatures of the form\n *\n *\t<Anywhere> primFFIResult: result <Alien> call: functionAddress <Alien>\n *\t  with: firstArg <Alien> ... with: lastArg <Alien>\n *\t\t<primitive: 'primCallOutXXX' module: 'IA32ABI'>\n *\n *\tresult <Alien> primFFICall: functionAddress <Alien>\n *\t  with: firstArg <Alien> ... with: lastArg <Alien>\n *\t\t<primitive: 'primCallOutXXX' module: 'IA32ABI'>\n *\n *\tfunctionAddress <Alien> primFFICallResult: result <Alien>\n *\t  with: firstArg <Alien> ... with: lastArg <Alien>\n *\t\t<primitive: 'primCallOutXXX' module: 'IA32ABI'>\n */\n\n#define SIGNATURE\tsqInt *argVector/* call args on stack or in array */, \\\n\t\t\t\t\tint numArgs,\t/* arg count of function to call   */ \\\n\t\t\t\t\tint funcOffset, /* stack offset of func Alien   */ \\\n\t\t\t\t\tint resultOffset/* stack offset of result Alien */\n\nextern sqInt callIA32IntegralReturn(SIGNATURE);\nextern sqInt callIA32FloatReturn   (SIGNATURE);\nextern sqInt callIA32DoubleReturn  (SIGNATURE);\nextern long  thunkEntry            (void *thunkp, long *stackp);\nextern void *allocateExecutablePage(long *pagesize);\n\n/* Use the most minimal setjmp/longjmp pair available; no signal handling\n * wanted or necessary.\n */\n#if !defined(WIN32)\n# define setjmp _setjmp\n# define longjmp _longjmp\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/IA32ABI/ia32abicc.c",
    "content": "/*\n *  ia32abicc.c\n *\n * Support for Call-outs and Call-backs from the Plugin.\n *  Written by Eliot Miranda 11/07.\n *  Copyright 2007 Cadence Design Systems. All rights reserved.\n *\n */\n\n#if defined(_MSC_VER) || defined(__MINGW32__)\n# include \"windows.h\" /* for GetSystemInfo & VirtualAlloc */\n#elif __APPLE__ && __MACH__\n# include <sys/mman.h> /* for mprotect */\n# if OBJC_DEBUG /* define this to get debug info for struct objc_class et al */\n#  include <objc/objc.h>\n#  include <objc/objc-class.h>\n\nstruct objc_class *baz;\n\nvoid setbaz(void *p) { baz = p; }\nvoid *getbaz() { return baz; }\n# endif\n# include <stdlib.h> /* for valloc */\n# include <sys/mman.h> /* for mprotect */\n#else\n# include <stdlib.h> /* for valloc */\n# include <sys/mman.h> /* for mprotect */\n#endif\n\n#include <setjmp.h>\n#include <stdio.h> /* for fprintf(stderr,...) */\n\n#include \"vmCallback.h\"\n#include \"sqMemoryAccess.h\"\n#include \"sqVirtualMachine.h\"\n#include \"ia32abi.h\"\n\n#if !defined(min)\n# define min(a,b) ((a) < (b) ? (a) : (b))\n#endif\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif \nstruct VirtualMachine* interpreterProxy;\n\n#if defined(SQ_IMAGE32)\n# define BytesPerOop    4\n#elif defined(SQ_IMAGE64)\n# define BytesPerOop    8\n#else   \n# error cannot determine image word size/object header size\n#endif\n\n#define BaseHeaderSize BytesPerOop\n \n#ifdef _MSC_VER\n# define alloca _alloca\n#endif\n#if __GNUC__\n# define setsp(sp) asm volatile (\"movl %0,%%esp\" : : \"m\"(sp))\n# define getsp() ({ void *esp; asm volatile (\"movl %%esp,%0\" : \"=r\"(esp) : ); esp;})\n#endif\n#if __APPLE__ && __MACH__ && __i386__\n# define STACK_ALIGN_BYTES 16\n#endif\n\n#if !defined(setsp)\n# define setsp(ignored) 0\n#endif\n\n#define moduloPOT(m,v) ((v)+(m)-1 & ~((m)-1))\n#define alignModuloPOT(m,v) ((void *)moduloPOT(m,(unsigned long)(v)))\n\n#define objIsAlien(anOop) (interpreterProxy->includesBehaviorThatOf(interpreterProxy->fetchClassOf(anOop), interpreterProxy->classAlien()))\n#define objIsUnsafeAlien(anOop) (interpreterProxy->includesBehaviorThatOf(interpreterProxy->fetchClassOf(anOop), interpreterProxy->classUnsafeAlien()))\n\n#define sizeField(alien) (*(long *)pointerForOop((sqInt)(alien) + BaseHeaderSize))\n#define dataPtr(alien) pointerForOop((sqInt)(alien) + BaseHeaderSize + BytesPerOop)\n#if 0 /* obsolete after adding pointer Aliens with size field == 0 */\n# define isIndirectOrPointer(alien) (sizeField(alien) <= 0)\n# define startOfData(alien) (isIndirectOrPointer(alien)\t\t\\\n\t\t\t\t\t\t\t\t? *(void **)dataPtr(alien)\t\\\n\t\t\t\t\t\t\t\t:  (void  *)dataPtr(alien))\n#endif\n#define isIndirect(alien) (sizeField(alien) < 0)\n#define startOfParameterData(alien) (isIndirect(alien)\t\\\n\t\t\t\t\t\t\t\t\t? *(void **)dataPtr(alien)\t\\\n\t\t\t\t\t\t\t\t\t:  (void  *)dataPtr(alien))\n#define isIndirectSize(size) ((size) < 0)\n#define startOfDataWithSize(alien,size) (isIndirectSize(size)\t\\\n\t\t\t\t\t\t\t\t? *(void **)dataPtr(alien)\t\t\\\n\t\t\t\t\t\t\t\t:  (void  *)dataPtr(alien))\n\n#define isSmallInt(oop) ((oop)&1)\n#define intVal(oop) (((long)(oop))>>1)\n\n/*\n * Call a foreign function that answers an integral result in %eax (and\n * possibly %edx) according to IA32-ish ABI rules.\n */\nsqInt\ncallIA32IntegralReturn(SIGNATURE) {\n#ifdef _MSC_VER\n__int64 (*f)(), r;\n#else\nlong long (*f)(), r;\n#endif\n#include \"dabusiness.h\"\n}\n\n/*\n * Call a foreign function that answers a single-precision floating-point\n * result in %f0 according to IA32-ish ABI rules.\n */\nsqInt\ncallIA32FloatReturn(SIGNATURE) { float (*f)(), r;\n#include \"dabusiness.h\"\n}\n\n/*\n * Call a foreign function that answers a double-precision floating-point\n * result in %f0 according to IA32-ish ABI rules.\n */\nsqInt\ncallIA32DoubleReturn(SIGNATURE) { double (*f)(), r;\n#include \"dabusiness.h\"\n}\n\n/*\n * Entry-point for call-back thunks.  Args are thunk address and stack pointer,\n * where the stack pointer is pointing one word below the return address of the\n * thunk's callee, 4 bytes below the thunk's first argument.  The stack is:\n *\t\tcallback\n *\t\targuments\n *\t\tretpc (thunk) <--\\\n *\t\taddress of retpc-/        <--\\\n *\t\taddress of address of ret pc-/\n *\t\tthunkp\n * esp->retpc (thunkEntry)\n *\n * The stack pointer is pushed twice to keep the stack alignment to 16 bytes, a\n * requirement on platforms using SSE2 such as Mac OS X, and harmless elsewhere.\n *\n * This function's roles are to use setjmp/longjmp to save the call point\n * and return to it, and to return any of the various values from the callback.\n *\n * Looking forward to support for x86-64, which typically has 6 register\n * arguments, the function would take 8 arguments, the 6 register args as\n * longs, followed by the thunkp and stackp passed on the stack.  The register\n * args would get copied into a struct on the stack. A pointer to the struct\n * is then passed as an element of the VMCallbackContext.\n */\nlong\nthunkEntry(void *thunkp, long *stackp)\n{\n\tVMCallbackContext vmcc;\n\tint flags, returnType;\n\n\tif ((flags = interpreterProxy->ownVM(0)) < 0) {\n\t\tfprintf(stderr,\"Warning; callback failed to own the VM\\n\");\n\t\treturn -1;\n\t}\n\n\tif (!(returnType = setjmp(vmcc.trampoline))) {\n\t\tvmcc.thunkp = thunkp;\n\t\tvmcc.stackp = stackp + 2; /* skip address of retpc & retpc (thunk) */\n\t\tvmcc.intregargsp = 0;\n\t\tvmcc.floatregargsp = 0;\n\t\tinterpreterProxy->sendInvokeCallbackContext(&vmcc);\n\t\tfprintf(stderr,\"Warning; callback failed to invoke\\n\");\n\t\tinterpreterProxy->disownVM(flags);\n\t\treturn -1;\n\t}\n\tinterpreterProxy->disownVM(flags);\n\n\tswitch (returnType) {\n\n\tcase retword:\treturn vmcc.rvs.valword;\n\n\tcase retword64: {\n\t\tlong vhigh = vmcc.rvs.valleint64.high;\n#if _MSC_VER\n\t\t\t\t_asm mov edx, dword ptr vhigh;\n#elif __GNUC__\n\t\t\t\tasm(\"mov %0,%%edx\" : : \"m\"(vhigh));\n#else\n# error need to load edx with vmcc.rvs.valleint64.high on this compiler\n#endif\n\t\t\t\treturn vmcc.rvs.valleint64.low;\n\t}\n\n\tcase retdouble: {\n\t\tdouble valflt64 = vmcc.rvs.valflt64;\n#if _MSC_VER\n\t\t\t\t_asm fld qword ptr valflt64;\n#elif __GNUC__\n\t\t\t\tasm(\"fldl %0\" : : \"m\"(valflt64));\n#else\n# error need to load %f0 with vmcc.rvs.valflt64 on this compiler\n#endif\n\t\t\t\treturn 0;\n\t}\n\n\tcase retstruct:\tmemcpy( (void *)(stackp[1]),\n\t\t\t\t\t\t\tvmcc.rvs.valstruct.addr,\n\t\t\t\t\t\t\tvmcc.rvs.valstruct.size);\n\t\t\t\t\treturn stackp[1];\n\t}\n\tfprintf(stderr,\"Warning; invalid callback return type\\n\");\n\treturn 0;\n}\n\n/*\n * Thunk allocation support.  Since thunks must be exectuable and some OSs\n * may not provide default execute permission on memory returned by malloc\n * we must provide memory that is guaranteed to be executable.  The abstraction\n * is to answer an Alien that references an executable piece of memory that\n * is some (possiby unitary) multiple of the pagesize.\n *\n * We assume the Smalltalk image code will manage subdividing the executable\n * page amongst thunks so there is no need to free these pages, since the image\n * will recycle parts of the page for reclaimed thunks.\n */\n#if defined(_MSC_VER) || defined(__MINGW32__)\nstatic unsigned long pagesize = 0;\n#endif\n\nvoid *\nallocateExecutablePage(long *size)\n{\n\tvoid *mem;\n\n#if defined(_MSC_VER) || defined(__MINGW32__)\n#if !defined(MEM_TOP_DOWN)\n# define MEM_TOP_DOWN 0x100000\n#endif\n\tif (!pagesize) {\n\t\tSYSTEM_INFO\tsysinf;\n\n\t\tGetSystemInfo(&sysinf);\n\n\t\tpagesize = sysinf.dwPageSize;\n\t}\n\t/* N.B. VirtualAlloc MEM_COMMIT initializes the memory returned to zero. */\n\tmem = VirtualAlloc(\t0,\n\t\t\t\t\t\tpagesize,\n\t\t\t\t\t\tMEM_COMMIT | MEM_TOP_DOWN,\n\t\t\t\t\t\tPAGE_EXECUTE_READWRITE);\n\tif (mem)\n\t\t*size = pagesize;\n#else\n\tlong pagesize = getpagesize();\n\n\tif (!(mem = valloc(pagesize)))\n\t\treturn 0;\n\n\tmemset(mem, 0, pagesize);\n\tif (mprotect(mem, pagesize, PROT_READ | PROT_WRITE | PROT_EXEC) < 0) {\n\t\tfree(mem);\n\t\treturn 0;\n\t}\n\t*size = pagesize;\n#endif\n\treturn mem;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/InternetConfigPlugin/InternetConfigPlugin.h",
    "content": "int sqInternetConfigurationInit(void);\nint sqInternetConfigurationGetStringKeyedBykeySizeinto(char * aKey, int keyLength, char *nameptr);\nint sqInternetConfigurationShutdown(void);\n#pragma export on\nvoid sqInternetGetMacintoshFileTypeAndCreatorFromkeySizeinto(char * aFileName, int keyLength, char * creator);\n#pragma export off\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/Error.c",
    "content": "#include <stdio.h>\n#include \"jpeglib.h\"\n#include <setjmp.h>\n\nstruct error_mgr2 {\n  struct jpeg_error_mgr pub;\t/* \"public\" fields */\n\n  jmp_buf setjmp_buffer;\t/* for return to caller */\n};\n\ntypedef struct error_mgr2 * error_ptr2;\n\n/*\n * Here's the routine that will replace the standard error_exit method:\n */\n\nvoid error_exit (j_common_ptr cinfo)\n{\n  /* cinfo->err really points to a error_mgr2 struct, so coerce pointer */\n  error_ptr2 myerr = (error_ptr2) cinfo->err;\n\n  /* Return control to the setjmp point */\n  longjmp(myerr->setjmp_buffer, 1);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.h",
    "content": "#include <stdio.h>\n/* Interface to JPEG code */\n#include \"jpeglib.h\"\n#include <setjmp.h>\n\nstruct error_mgr2 {\n  struct jpeg_error_mgr pub;\t/* \"public\" fields */\n\n  jmp_buf setjmp_buffer;\t/* for return to caller */\n};\n\ntypedef struct error_mgr2* error_ptr2;\n\nvoid error_exit (j_common_ptr cinfo);\nGLOBAL(void) jpeg_mem_src (j_decompress_ptr cinfo, char * pSourceData, unsigned sourceDataSize);\nGLOBAL(int) jpeg_mem_src_newLocationOfData (j_decompress_ptr cinfo, char * pSourceData, unsigned sourceDataSize);\nGLOBAL(void) jpeg_mem_dest (j_compress_ptr cinfo, char * pDestination, unsigned *pDestinationSize);"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/ReadMe.txt",
    "content": "\nProject Smarts - C Dynamic Link Library application README\n----------------------------------------------------------\n\nSelect \"Build Normal\" on the project's pop-up menu to build the\nproject target, a DLL file.\n\n\n\u001a"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jcapimin.c",
    "content": "/*\n * jcapimin.c\n *\n * Copyright (C) 1994-1998, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains application interface code for the compression half\n * of the JPEG library.  These are the \"minimum\" API routines that may be\n * needed in either the normal full-compression case or the transcoding-only\n * case.\n *\n * Most of the routines intended to be called directly by an application\n * are in this file or in jcapistd.c.  But also see jcparam.c for\n * parameter-setup helper routines, jcomapi.c for routines shared by\n * compression and decompression, and jctrans.c for the transcoding case.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n\n\n/*\n * Initialization of a JPEG compression object.\n * The error manager must already be set up (in case memory manager fails).\n */\n\nGLOBAL(void)\njpeg_CreateCompress (j_compress_ptr cinfo, int version, size_t structsize)\n{\n  int i;\n\n  /* Guard against version mismatches between library and caller. */\n  cinfo->mem = NULL;\t\t/* so jpeg_destroy knows mem mgr not called */\n  if (version != JPEG_LIB_VERSION)\n    ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version);\n  if (structsize != SIZEOF(struct jpeg_compress_struct))\n    ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE, \n\t     (int) SIZEOF(struct jpeg_compress_struct), (int) structsize);\n\n  /* For debugging purposes, we zero the whole master structure.\n   * But the application has already set the err pointer, and may have set\n   * client_data, so we have to save and restore those fields.\n   * Note: if application hasn't set client_data, tools like Purify may\n   * complain here.\n   */\n  {\n    struct jpeg_error_mgr * err = cinfo->err;\n    void * client_data = cinfo->client_data; /* ignore Purify complaint here */\n    MEMZERO(cinfo, SIZEOF(struct jpeg_compress_struct));\n    cinfo->err = err;\n    cinfo->client_data = client_data;\n  }\n  cinfo->is_decompressor = FALSE;\n\n  /* Initialize a memory manager instance for this object */\n  jinit_memory_mgr((j_common_ptr) cinfo);\n\n  /* Zero out pointers to permanent structures. */\n  cinfo->progress = NULL;\n  cinfo->dest = NULL;\n\n  cinfo->comp_info = NULL;\n\n  for (i = 0; i < NUM_QUANT_TBLS; i++)\n    cinfo->quant_tbl_ptrs[i] = NULL;\n\n  for (i = 0; i < NUM_HUFF_TBLS; i++) {\n    cinfo->dc_huff_tbl_ptrs[i] = NULL;\n    cinfo->ac_huff_tbl_ptrs[i] = NULL;\n  }\n\n  cinfo->script_space = NULL;\n\n  cinfo->input_gamma = 1.0;\t/* in case application forgets */\n\n  /* OK, I'm ready */\n  cinfo->global_state = CSTATE_START;\n}\n\n\n/*\n * Destruction of a JPEG compression object\n */\n\nGLOBAL(void)\njpeg_destroy_compress (j_compress_ptr cinfo)\n{\n  jpeg_destroy((j_common_ptr) cinfo); /* use common routine */\n}\n\n\n/*\n * Abort processing of a JPEG compression operation,\n * but don't destroy the object itself.\n */\n\nGLOBAL(void)\njpeg_abort_compress (j_compress_ptr cinfo)\n{\n  jpeg_abort((j_common_ptr) cinfo); /* use common routine */\n}\n\n\n/*\n * Forcibly suppress or un-suppress all quantization and Huffman tables.\n * Marks all currently defined tables as already written (if suppress)\n * or not written (if !suppress).  This will control whether they get emitted\n * by a subsequent jpeg_start_compress call.\n *\n * This routine is exported for use by applications that want to produce\n * abbreviated JPEG datastreams.  It logically belongs in jcparam.c, but\n * since it is called by jpeg_start_compress, we put it here --- otherwise\n * jcparam.o would be linked whether the application used it or not.\n */\n\nGLOBAL(void)\njpeg_suppress_tables (j_compress_ptr cinfo, boolean suppress)\n{\n  int i;\n  JQUANT_TBL * qtbl;\n  JHUFF_TBL * htbl;\n\n  for (i = 0; i < NUM_QUANT_TBLS; i++) {\n    if ((qtbl = cinfo->quant_tbl_ptrs[i]) != NULL)\n      qtbl->sent_table = suppress;\n  }\n\n  for (i = 0; i < NUM_HUFF_TBLS; i++) {\n    if ((htbl = cinfo->dc_huff_tbl_ptrs[i]) != NULL)\n      htbl->sent_table = suppress;\n    if ((htbl = cinfo->ac_huff_tbl_ptrs[i]) != NULL)\n      htbl->sent_table = suppress;\n  }\n}\n\n\n/*\n * Finish JPEG compression.\n *\n * If a multipass operating mode was selected, this may do a great deal of\n * work including most of the actual output.\n */\n\nGLOBAL(void)\njpeg_finish_compress (j_compress_ptr cinfo)\n{\n  JDIMENSION iMCU_row;\n\n  if (cinfo->global_state == CSTATE_SCANNING ||\n      cinfo->global_state == CSTATE_RAW_OK) {\n    /* Terminate first pass */\n    if (cinfo->next_scanline < cinfo->image_height)\n      ERREXIT(cinfo, JERR_TOO_LITTLE_DATA);\n    (*cinfo->master->finish_pass) (cinfo);\n  } else if (cinfo->global_state != CSTATE_WRCOEFS)\n    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);\n  /* Perform any remaining passes */\n  while (! cinfo->master->is_last_pass) {\n    (*cinfo->master->prepare_for_pass) (cinfo);\n    for (iMCU_row = 0; iMCU_row < cinfo->total_iMCU_rows; iMCU_row++) {\n      if (cinfo->progress != NULL) {\n\tcinfo->progress->pass_counter = (long) iMCU_row;\n\tcinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows;\n\t(*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo);\n      }\n      /* We bypass the main controller and invoke coef controller directly;\n       * all work is being done from the coefficient buffer.\n       */\n      if (! (*cinfo->coef->compress_data) (cinfo, (JSAMPIMAGE) NULL))\n\tERREXIT(cinfo, JERR_CANT_SUSPEND);\n    }\n    (*cinfo->master->finish_pass) (cinfo);\n  }\n  /* Write EOI, do final cleanup */\n  (*cinfo->marker->write_file_trailer) (cinfo);\n  (*cinfo->dest->term_destination) (cinfo);\n  /* We can use jpeg_abort to release memory and reset global_state */\n  jpeg_abort((j_common_ptr) cinfo);\n}\n\n\n/*\n * Write a special marker.\n * This is only recommended for writing COM or APPn markers.\n * Must be called after jpeg_start_compress() and before\n * first call to jpeg_write_scanlines() or jpeg_write_raw_data().\n */\n\nGLOBAL(void)\njpeg_write_marker (j_compress_ptr cinfo, int marker,\n\t\t   const JOCTET *dataptr, unsigned int datalen)\n{\n  JMETHOD(void, write_marker_byte, (j_compress_ptr info, int val));\n\n  if (cinfo->next_scanline != 0 ||\n      (cinfo->global_state != CSTATE_SCANNING &&\n       cinfo->global_state != CSTATE_RAW_OK &&\n       cinfo->global_state != CSTATE_WRCOEFS))\n    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);\n\n  (*cinfo->marker->write_marker_header) (cinfo, marker, datalen);\n  write_marker_byte = cinfo->marker->write_marker_byte;\t/* copy for speed */\n  while (datalen--) {\n    (*write_marker_byte) (cinfo, *dataptr);\n    dataptr++;\n  }\n}\n\n/* Same, but piecemeal. */\n\nGLOBAL(void)\njpeg_write_m_header (j_compress_ptr cinfo, int marker, unsigned int datalen)\n{\n  if (cinfo->next_scanline != 0 ||\n      (cinfo->global_state != CSTATE_SCANNING &&\n       cinfo->global_state != CSTATE_RAW_OK &&\n       cinfo->global_state != CSTATE_WRCOEFS))\n    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);\n\n  (*cinfo->marker->write_marker_header) (cinfo, marker, datalen);\n}\n\nGLOBAL(void)\njpeg_write_m_byte (j_compress_ptr cinfo, int val)\n{\n  (*cinfo->marker->write_marker_byte) (cinfo, val);\n}\n\n\n/*\n * Alternate compression function: just write an abbreviated table file.\n * Before calling this, all parameters and a data destination must be set up.\n *\n * To produce a pair of files containing abbreviated tables and abbreviated\n * image data, one would proceed as follows:\n *\n *\t\tinitialize JPEG object\n *\t\tset JPEG parameters\n *\t\tset destination to table file\n *\t\tjpeg_write_tables(cinfo);\n *\t\tset destination to image file\n *\t\tjpeg_start_compress(cinfo, FALSE);\n *\t\twrite data...\n *\t\tjpeg_finish_compress(cinfo);\n *\n * jpeg_write_tables has the side effect of marking all tables written\n * (same as jpeg_suppress_tables(..., TRUE)).  Thus a subsequent start_compress\n * will not re-emit the tables unless it is passed write_all_tables=TRUE.\n */\n\nGLOBAL(void)\njpeg_write_tables (j_compress_ptr cinfo)\n{\n  if (cinfo->global_state != CSTATE_START)\n    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);\n\n  /* (Re)initialize error mgr and destination modules */\n  (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo);\n  (*cinfo->dest->init_destination) (cinfo);\n  /* Initialize the marker writer ... bit of a crock to do it here. */\n  jinit_marker_writer(cinfo);\n  /* Write them tables! */\n  (*cinfo->marker->write_tables_only) (cinfo);\n  /* And clean up. */\n  (*cinfo->dest->term_destination) (cinfo);\n  /*\n   * In library releases up through v6a, we called jpeg_abort() here to free\n   * any working memory allocated by the destination manager and marker\n   * writer.  Some applications had a problem with that: they allocated space\n   * of their own from the library memory manager, and didn't want it to go\n   * away during write_tables.  So now we do nothing.  This will cause a\n   * memory leak if an app calls write_tables repeatedly without doing a full\n   * compression cycle or otherwise resetting the JPEG object.  However, that\n   * seems less bad than unexpectedly freeing memory in the normal case.\n   * An app that prefers the old behavior can call jpeg_abort for itself after\n   * each call to jpeg_write_tables().\n   */\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jcapistd.c",
    "content": "/*\n * jcapistd.c\n *\n * Copyright (C) 1994-1996, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains application interface code for the compression half\n * of the JPEG library.  These are the \"standard\" API routines that are\n * used in the normal full-compression case.  They are not used by a\n * transcoding-only application.  Note that if an application links in\n * jpeg_start_compress, it will end up linking in the entire compressor.\n * We thus must separate this file from jcapimin.c to avoid linking the\n * whole compression library into a transcoder.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n\n\n/*\n * Compression initialization.\n * Before calling this, all parameters and a data destination must be set up.\n *\n * We require a write_all_tables parameter as a failsafe check when writing\n * multiple datastreams from the same compression object.  Since prior runs\n * will have left all the tables marked sent_table=TRUE, a subsequent run\n * would emit an abbreviated stream (no tables) by default.  This may be what\n * is wanted, but for safety's sake it should not be the default behavior:\n * programmers should have to make a deliberate choice to emit abbreviated\n * images.  Therefore the documentation and examples should encourage people\n * to pass write_all_tables=TRUE; then it will take active thought to do the\n * wrong thing.\n */\n\nGLOBAL(void)\njpeg_start_compress (j_compress_ptr cinfo, boolean write_all_tables)\n{\n  if (cinfo->global_state != CSTATE_START)\n    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);\n\n  if (write_all_tables)\n    jpeg_suppress_tables(cinfo, FALSE);\t/* mark all tables to be written */\n\n  /* (Re)initialize error mgr and destination modules */\n  (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo);\n  (*cinfo->dest->init_destination) (cinfo);\n  /* Perform master selection of active modules */\n  jinit_compress_master(cinfo);\n  /* Set up for the first pass */\n  (*cinfo->master->prepare_for_pass) (cinfo);\n  /* Ready for application to drive first pass through jpeg_write_scanlines\n   * or jpeg_write_raw_data.\n   */\n  cinfo->next_scanline = 0;\n  cinfo->global_state = (cinfo->raw_data_in ? CSTATE_RAW_OK : CSTATE_SCANNING);\n}\n\n\n/*\n * Write some scanlines of data to the JPEG compressor.\n *\n * The return value will be the number of lines actually written.\n * This should be less than the supplied num_lines only in case that\n * the data destination module has requested suspension of the compressor,\n * or if more than image_height scanlines are passed in.\n *\n * Note: we warn about excess calls to jpeg_write_scanlines() since\n * this likely signals an application programmer error.  However,\n * excess scanlines passed in the last valid call are *silently* ignored,\n * so that the application need not adjust num_lines for end-of-image\n * when using a multiple-scanline buffer.\n */\n\nGLOBAL(JDIMENSION)\njpeg_write_scanlines (j_compress_ptr cinfo, JSAMPARRAY scanlines,\n\t\t      JDIMENSION num_lines)\n{\n  JDIMENSION row_ctr, rows_left;\n\n  if (cinfo->global_state != CSTATE_SCANNING)\n    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);\n  if (cinfo->next_scanline >= cinfo->image_height)\n    WARNMS(cinfo, JWRN_TOO_MUCH_DATA);\n\n  /* Call progress monitor hook if present */\n  if (cinfo->progress != NULL) {\n    cinfo->progress->pass_counter = (long) cinfo->next_scanline;\n    cinfo->progress->pass_limit = (long) cinfo->image_height;\n    (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo);\n  }\n\n  /* Give master control module another chance if this is first call to\n   * jpeg_write_scanlines.  This lets output of the frame/scan headers be\n   * delayed so that application can write COM, etc, markers between\n   * jpeg_start_compress and jpeg_write_scanlines.\n   */\n  if (cinfo->master->call_pass_startup)\n    (*cinfo->master->pass_startup) (cinfo);\n\n  /* Ignore any extra scanlines at bottom of image. */\n  rows_left = cinfo->image_height - cinfo->next_scanline;\n  if (num_lines > rows_left)\n    num_lines = rows_left;\n\n  row_ctr = 0;\n  (*cinfo->main->process_data) (cinfo, scanlines, &row_ctr, num_lines);\n  cinfo->next_scanline += row_ctr;\n  return row_ctr;\n}\n\n\n/*\n * Alternate entry point to write raw data.\n * Processes exactly one iMCU row per call, unless suspended.\n */\n\nGLOBAL(JDIMENSION)\njpeg_write_raw_data (j_compress_ptr cinfo, JSAMPIMAGE data,\n\t\t     JDIMENSION num_lines)\n{\n  JDIMENSION lines_per_iMCU_row;\n\n  if (cinfo->global_state != CSTATE_RAW_OK)\n    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);\n  if (cinfo->next_scanline >= cinfo->image_height) {\n    WARNMS(cinfo, JWRN_TOO_MUCH_DATA);\n    return 0;\n  }\n\n  /* Call progress monitor hook if present */\n  if (cinfo->progress != NULL) {\n    cinfo->progress->pass_counter = (long) cinfo->next_scanline;\n    cinfo->progress->pass_limit = (long) cinfo->image_height;\n    (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo);\n  }\n\n  /* Give master control module another chance if this is first call to\n   * jpeg_write_raw_data.  This lets output of the frame/scan headers be\n   * delayed so that application can write COM, etc, markers between\n   * jpeg_start_compress and jpeg_write_raw_data.\n   */\n  if (cinfo->master->call_pass_startup)\n    (*cinfo->master->pass_startup) (cinfo);\n\n  /* Verify that at least one iMCU row has been passed. */\n  lines_per_iMCU_row = cinfo->max_v_samp_factor * DCTSIZE;\n  if (num_lines < lines_per_iMCU_row)\n    ERREXIT(cinfo, JERR_BUFFER_SIZE);\n\n  /* Directly compress the row. */\n  if (! (*cinfo->coef->compress_data) (cinfo, data)) {\n    /* If compressor did not consume the whole row, suspend processing. */\n    return 0;\n  }\n\n  /* OK, we processed one iMCU row. */\n  cinfo->next_scanline += lines_per_iMCU_row;\n  return lines_per_iMCU_row;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jccoefct.c",
    "content": "/*\n * jccoefct.c\n *\n * Copyright (C) 1994-1997, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains the coefficient buffer controller for compression.\n * This controller is the top level of the JPEG compressor proper.\n * The coefficient buffer lies between forward-DCT and entropy encoding steps.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n\n\n/* We use a full-image coefficient buffer when doing Huffman optimization,\n * and also for writing multiple-scan JPEG files.  In all cases, the DCT\n * step is run during the first pass, and subsequent passes need only read\n * the buffered coefficients.\n */\n#ifdef ENTROPY_OPT_SUPPORTED\n#define FULL_COEF_BUFFER_SUPPORTED\n#else\n#ifdef C_MULTISCAN_FILES_SUPPORTED\n#define FULL_COEF_BUFFER_SUPPORTED\n#endif\n#endif\n\n\n/* Private buffer controller object */\n\ntypedef struct {\n  struct jpeg_c_coef_controller pub; /* public fields */\n\n  JDIMENSION iMCU_row_num;\t/* iMCU row # within image */\n  JDIMENSION mcu_ctr;\t\t/* counts MCUs processed in current row */\n  int MCU_vert_offset;\t\t/* counts MCU rows within iMCU row */\n  int MCU_rows_per_iMCU_row;\t/* number of such rows needed */\n\n  /* For single-pass compression, it's sufficient to buffer just one MCU\n   * (although this may prove a bit slow in practice).  We allocate a\n   * workspace of C_MAX_BLOCKS_IN_MCU coefficient blocks, and reuse it for each\n   * MCU constructed and sent.  (On 80x86, the workspace is FAR even though\n   * it's not really very big; this is to keep the module interfaces unchanged\n   * when a large coefficient buffer is necessary.)\n   * In multi-pass modes, this array points to the current MCU's blocks\n   * within the virtual arrays.\n   */\n  JBLOCKROW MCU_buffer[C_MAX_BLOCKS_IN_MCU];\n\n  /* In multi-pass modes, we need a virtual block array for each component. */\n  jvirt_barray_ptr whole_image[MAX_COMPONENTS];\n} my_coef_controller;\n\ntypedef my_coef_controller * my_coef_ptr;\n\n\n/* Forward declarations */\nMETHODDEF(boolean) compress_data\n    JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf));\n#ifdef FULL_COEF_BUFFER_SUPPORTED\nMETHODDEF(boolean) compress_first_pass\n    JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf));\nMETHODDEF(boolean) compress_output\n    JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf));\n#endif\n\n\nLOCAL(void)\nstart_iMCU_row (j_compress_ptr cinfo)\n/* Reset within-iMCU-row counters for a new row */\n{\n  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;\n\n  /* In an interleaved scan, an MCU row is the same as an iMCU row.\n   * In a noninterleaved scan, an iMCU row has v_samp_factor MCU rows.\n   * But at the bottom of the image, process only what's left.\n   */\n  if (cinfo->comps_in_scan > 1) {\n    coef->MCU_rows_per_iMCU_row = 1;\n  } else {\n    if (coef->iMCU_row_num < (cinfo->total_iMCU_rows-1))\n      coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->v_samp_factor;\n    else\n      coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->last_row_height;\n  }\n\n  coef->mcu_ctr = 0;\n  coef->MCU_vert_offset = 0;\n}\n\n\n/*\n * Initialize for a processing pass.\n */\n\nMETHODDEF(void)\nstart_pass_coef (j_compress_ptr cinfo, J_BUF_MODE pass_mode)\n{\n  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;\n\n  coef->iMCU_row_num = 0;\n  start_iMCU_row(cinfo);\n\n  switch (pass_mode) {\n  case JBUF_PASS_THRU:\n    if (coef->whole_image[0] != NULL)\n      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);\n    coef->pub.compress_data = compress_data;\n    break;\n#ifdef FULL_COEF_BUFFER_SUPPORTED\n  case JBUF_SAVE_AND_PASS:\n    if (coef->whole_image[0] == NULL)\n      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);\n    coef->pub.compress_data = compress_first_pass;\n    break;\n  case JBUF_CRANK_DEST:\n    if (coef->whole_image[0] == NULL)\n      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);\n    coef->pub.compress_data = compress_output;\n    break;\n#endif\n  default:\n    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);\n    break;\n  }\n}\n\n\n/*\n * Process some data in the single-pass case.\n * We process the equivalent of one fully interleaved MCU row (\"iMCU\" row)\n * per call, ie, v_samp_factor block rows for each component in the image.\n * Returns TRUE if the iMCU row is completed, FALSE if suspended.\n *\n * NB: input_buf contains a plane for each component in image,\n * which we index according to the component's SOF position.\n */\n\nMETHODDEF(boolean)\ncompress_data (j_compress_ptr cinfo, JSAMPIMAGE input_buf)\n{\n  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;\n  JDIMENSION MCU_col_num;\t/* index of current MCU within row */\n  JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1;\n  JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1;\n  int blkn, bi, ci, yindex, yoffset, blockcnt;\n  JDIMENSION ypos, xpos;\n  jpeg_component_info *compptr;\n\n  /* Loop to write as much as one whole iMCU row */\n  for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row;\n       yoffset++) {\n    for (MCU_col_num = coef->mcu_ctr; MCU_col_num <= last_MCU_col;\n\t MCU_col_num++) {\n      /* Determine where data comes from in input_buf and do the DCT thing.\n       * Each call on forward_DCT processes a horizontal row of DCT blocks\n       * as wide as an MCU; we rely on having allocated the MCU_buffer[] blocks\n       * sequentially.  Dummy blocks at the right or bottom edge are filled in\n       * specially.  The data in them does not matter for image reconstruction,\n       * so we fill them with values that will encode to the smallest amount of\n       * data, viz: all zeroes in the AC entries, DC entries equal to previous\n       * block's DC value.  (Thanks to Thomas Kinsman for this idea.)\n       */\n      blkn = 0;\n      for (ci = 0; ci < cinfo->comps_in_scan; ci++) {\n\tcompptr = cinfo->cur_comp_info[ci];\n\tblockcnt = (MCU_col_num < last_MCU_col) ? compptr->MCU_width\n\t\t\t\t\t\t: compptr->last_col_width;\n\txpos = MCU_col_num * compptr->MCU_sample_width;\n\typos = yoffset * DCTSIZE; /* ypos == (yoffset+yindex) * DCTSIZE */\n\tfor (yindex = 0; yindex < compptr->MCU_height; yindex++) {\n\t  if (coef->iMCU_row_num < last_iMCU_row ||\n\t      yoffset+yindex < compptr->last_row_height) {\n\t    (*cinfo->fdct->forward_DCT) (cinfo, compptr,\n\t\t\t\t\t input_buf[compptr->component_index],\n\t\t\t\t\t coef->MCU_buffer[blkn],\n\t\t\t\t\t ypos, xpos, (JDIMENSION) blockcnt);\n\t    if (blockcnt < compptr->MCU_width) {\n\t      /* Create some dummy blocks at the right edge of the image. */\n\t      jzero_far((void FAR *) coef->MCU_buffer[blkn + blockcnt],\n\t\t\t(compptr->MCU_width - blockcnt) * SIZEOF(JBLOCK));\n\t      for (bi = blockcnt; bi < compptr->MCU_width; bi++) {\n\t\tcoef->MCU_buffer[blkn+bi][0][0] = coef->MCU_buffer[blkn+bi-1][0][0];\n\t      }\n\t    }\n\t  } else {\n\t    /* Create a row of dummy blocks at the bottom of the image. */\n\t    jzero_far((void FAR *) coef->MCU_buffer[blkn],\n\t\t      compptr->MCU_width * SIZEOF(JBLOCK));\n\t    for (bi = 0; bi < compptr->MCU_width; bi++) {\n\t      coef->MCU_buffer[blkn+bi][0][0] = coef->MCU_buffer[blkn-1][0][0];\n\t    }\n\t  }\n\t  blkn += compptr->MCU_width;\n\t  ypos += DCTSIZE;\n\t}\n      }\n      /* Try to write the MCU.  In event of a suspension failure, we will\n       * re-DCT the MCU on restart (a bit inefficient, could be fixed...)\n       */\n      if (! (*cinfo->entropy->encode_mcu) (cinfo, coef->MCU_buffer)) {\n\t/* Suspension forced; update state counters and exit */\n\tcoef->MCU_vert_offset = yoffset;\n\tcoef->mcu_ctr = MCU_col_num;\n\treturn FALSE;\n      }\n    }\n    /* Completed an MCU row, but perhaps not an iMCU row */\n    coef->mcu_ctr = 0;\n  }\n  /* Completed the iMCU row, advance counters for next one */\n  coef->iMCU_row_num++;\n  start_iMCU_row(cinfo);\n  return TRUE;\n}\n\n\n#ifdef FULL_COEF_BUFFER_SUPPORTED\n\n/*\n * Process some data in the first pass of a multi-pass case.\n * We process the equivalent of one fully interleaved MCU row (\"iMCU\" row)\n * per call, ie, v_samp_factor block rows for each component in the image.\n * This amount of data is read from the source buffer, DCT'd and quantized,\n * and saved into the virtual arrays.  We also generate suitable dummy blocks\n * as needed at the right and lower edges.  (The dummy blocks are constructed\n * in the virtual arrays, which have been padded appropriately.)  This makes\n * it possible for subsequent passes not to worry about real vs. dummy blocks.\n *\n * We must also emit the data to the entropy encoder.  This is conveniently\n * done by calling compress_output() after we've loaded the current strip\n * of the virtual arrays.\n *\n * NB: input_buf contains a plane for each component in image.  All\n * components are DCT'd and loaded into the virtual arrays in this pass.\n * However, it may be that only a subset of the components are emitted to\n * the entropy encoder during this first pass; be careful about looking\n * at the scan-dependent variables (MCU dimensions, etc).\n */\n\nMETHODDEF(boolean)\ncompress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)\n{\n  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;\n  JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1;\n  JDIMENSION blocks_across, MCUs_across, MCUindex;\n  int bi, ci, h_samp_factor, block_row, block_rows, ndummy;\n  JCOEF lastDC;\n  jpeg_component_info *compptr;\n  JBLOCKARRAY buffer;\n  JBLOCKROW thisblockrow, lastblockrow;\n\n  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n       ci++, compptr++) {\n    /* Align the virtual buffer for this component. */\n    buffer = (*cinfo->mem->access_virt_barray)\n      ((j_common_ptr) cinfo, coef->whole_image[ci],\n       coef->iMCU_row_num * compptr->v_samp_factor,\n       (JDIMENSION) compptr->v_samp_factor, TRUE);\n    /* Count non-dummy DCT block rows in this iMCU row. */\n    if (coef->iMCU_row_num < last_iMCU_row)\n      block_rows = compptr->v_samp_factor;\n    else {\n      /* NB: can't use last_row_height here, since may not be set! */\n      block_rows = (int) (compptr->height_in_blocks % compptr->v_samp_factor);\n      if (block_rows == 0) block_rows = compptr->v_samp_factor;\n    }\n    blocks_across = compptr->width_in_blocks;\n    h_samp_factor = compptr->h_samp_factor;\n    /* Count number of dummy blocks to be added at the right margin. */\n    ndummy = (int) (blocks_across % h_samp_factor);\n    if (ndummy > 0)\n      ndummy = h_samp_factor - ndummy;\n    /* Perform DCT for all non-dummy blocks in this iMCU row.  Each call\n     * on forward_DCT processes a complete horizontal row of DCT blocks.\n     */\n    for (block_row = 0; block_row < block_rows; block_row++) {\n      thisblockrow = buffer[block_row];\n      (*cinfo->fdct->forward_DCT) (cinfo, compptr,\n\t\t\t\t   input_buf[ci], thisblockrow,\n\t\t\t\t   (JDIMENSION) (block_row * DCTSIZE),\n\t\t\t\t   (JDIMENSION) 0, blocks_across);\n      if (ndummy > 0) {\n\t/* Create dummy blocks at the right edge of the image. */\n\tthisblockrow += blocks_across; /* => first dummy block */\n\tjzero_far((void FAR *) thisblockrow, ndummy * SIZEOF(JBLOCK));\n\tlastDC = thisblockrow[-1][0];\n\tfor (bi = 0; bi < ndummy; bi++) {\n\t  thisblockrow[bi][0] = lastDC;\n\t}\n      }\n    }\n    /* If at end of image, create dummy block rows as needed.\n     * The tricky part here is that within each MCU, we want the DC values\n     * of the dummy blocks to match the last real block's DC value.\n     * This squeezes a few more bytes out of the resulting file...\n     */\n    if (coef->iMCU_row_num == last_iMCU_row) {\n      blocks_across += ndummy;\t/* include lower right corner */\n      MCUs_across = blocks_across / h_samp_factor;\n      for (block_row = block_rows; block_row < compptr->v_samp_factor;\n\t   block_row++) {\n\tthisblockrow = buffer[block_row];\n\tlastblockrow = buffer[block_row-1];\n\tjzero_far((void FAR *) thisblockrow,\n\t\t  (size_t) (blocks_across * SIZEOF(JBLOCK)));\n\tfor (MCUindex = 0; MCUindex < MCUs_across; MCUindex++) {\n\t  lastDC = lastblockrow[h_samp_factor-1][0];\n\t  for (bi = 0; bi < h_samp_factor; bi++) {\n\t    thisblockrow[bi][0] = lastDC;\n\t  }\n\t  thisblockrow += h_samp_factor; /* advance to next MCU in row */\n\t  lastblockrow += h_samp_factor;\n\t}\n      }\n    }\n  }\n  /* NB: compress_output will increment iMCU_row_num if successful.\n   * A suspension return will result in redoing all the work above next time.\n   */\n\n  /* Emit data to the entropy encoder, sharing code with subsequent passes */\n  return compress_output(cinfo, input_buf);\n}\n\n\n/*\n * Process some data in subsequent passes of a multi-pass case.\n * We process the equivalent of one fully interleaved MCU row (\"iMCU\" row)\n * per call, ie, v_samp_factor block rows for each component in the scan.\n * The data is obtained from the virtual arrays and fed to the entropy coder.\n * Returns TRUE if the iMCU row is completed, FALSE if suspended.\n *\n * NB: input_buf is ignored; it is likely to be a NULL pointer.\n */\n\nMETHODDEF(boolean)\ncompress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)\n{\n  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;\n  JDIMENSION MCU_col_num;\t/* index of current MCU within row */\n  int blkn, ci, xindex, yindex, yoffset;\n  JDIMENSION start_col;\n  JBLOCKARRAY buffer[MAX_COMPS_IN_SCAN];\n  JBLOCKROW buffer_ptr;\n  jpeg_component_info *compptr;\n\n  /* Align the virtual buffers for the components used in this scan.\n   * NB: during first pass, this is safe only because the buffers will\n   * already be aligned properly, so jmemmgr.c won't need to do any I/O.\n   */\n  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {\n    compptr = cinfo->cur_comp_info[ci];\n    buffer[ci] = (*cinfo->mem->access_virt_barray)\n      ((j_common_ptr) cinfo, coef->whole_image[compptr->component_index],\n       coef->iMCU_row_num * compptr->v_samp_factor,\n       (JDIMENSION) compptr->v_samp_factor, FALSE);\n  }\n\n  /* Loop to process one whole iMCU row */\n  for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row;\n       yoffset++) {\n    for (MCU_col_num = coef->mcu_ctr; MCU_col_num < cinfo->MCUs_per_row;\n\t MCU_col_num++) {\n      /* Construct list of pointers to DCT blocks belonging to this MCU */\n      blkn = 0;\t\t\t/* index of current DCT block within MCU */\n      for (ci = 0; ci < cinfo->comps_in_scan; ci++) {\n\tcompptr = cinfo->cur_comp_info[ci];\n\tstart_col = MCU_col_num * compptr->MCU_width;\n\tfor (yindex = 0; yindex < compptr->MCU_height; yindex++) {\n\t  buffer_ptr = buffer[ci][yindex+yoffset] + start_col;\n\t  for (xindex = 0; xindex < compptr->MCU_width; xindex++) {\n\t    coef->MCU_buffer[blkn++] = buffer_ptr++;\n\t  }\n\t}\n      }\n      /* Try to write the MCU. */\n      if (! (*cinfo->entropy->encode_mcu) (cinfo, coef->MCU_buffer)) {\n\t/* Suspension forced; update state counters and exit */\n\tcoef->MCU_vert_offset = yoffset;\n\tcoef->mcu_ctr = MCU_col_num;\n\treturn FALSE;\n      }\n    }\n    /* Completed an MCU row, but perhaps not an iMCU row */\n    coef->mcu_ctr = 0;\n  }\n  /* Completed the iMCU row, advance counters for next one */\n  coef->iMCU_row_num++;\n  start_iMCU_row(cinfo);\n  return TRUE;\n}\n\n#endif /* FULL_COEF_BUFFER_SUPPORTED */\n\n\n/*\n * Initialize coefficient buffer controller.\n */\n\nGLOBAL(void)\njinit_c_coef_controller (j_compress_ptr cinfo, boolean need_full_buffer)\n{\n  my_coef_ptr coef;\n\n  coef = (my_coef_ptr)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\tSIZEOF(my_coef_controller));\n  cinfo->coef = (struct jpeg_c_coef_controller *) coef;\n  coef->pub.start_pass = start_pass_coef;\n\n  /* Create the coefficient buffer. */\n  if (need_full_buffer) {\n#ifdef FULL_COEF_BUFFER_SUPPORTED\n    /* Allocate a full-image virtual array for each component, */\n    /* padded to a multiple of samp_factor DCT blocks in each direction. */\n    int ci;\n    jpeg_component_info *compptr;\n\n    for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n\t ci++, compptr++) {\n      coef->whole_image[ci] = (*cinfo->mem->request_virt_barray)\n\t((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE,\n\t (JDIMENSION) jround_up((long) compptr->width_in_blocks,\n\t\t\t\t(long) compptr->h_samp_factor),\n\t (JDIMENSION) jround_up((long) compptr->height_in_blocks,\n\t\t\t\t(long) compptr->v_samp_factor),\n\t (JDIMENSION) compptr->v_samp_factor);\n    }\n#else\n    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);\n#endif\n  } else {\n    /* We only need a single-MCU buffer. */\n    JBLOCKROW buffer;\n    int i;\n\n    buffer = (JBLOCKROW)\n      (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\t  C_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK));\n    for (i = 0; i < C_MAX_BLOCKS_IN_MCU; i++) {\n      coef->MCU_buffer[i] = buffer + i;\n    }\n    coef->whole_image[0] = NULL; /* flag for no virtual arrays */\n  }\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jccolor.c",
    "content": "/*\n * jccolor.c\n *\n * Copyright (C) 1991-1996, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains input colorspace conversion routines.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n\n\n/* Private subobject */\n\ntypedef struct {\n  struct jpeg_color_converter pub; /* public fields */\n\n  /* Private state for RGB->YCC conversion */\n  INT32 * rgb_ycc_tab;\t\t/* => table for RGB to YCbCr conversion */\n} my_color_converter;\n\ntypedef my_color_converter * my_cconvert_ptr;\n\n\n/**************** RGB -> YCbCr conversion: most common case **************/\n\n/*\n * YCbCr is defined per CCIR 601-1, except that Cb and Cr are\n * normalized to the range 0..MAXJSAMPLE rather than -0.5 .. 0.5.\n * The conversion equations to be implemented are therefore\n *\tY  =  0.29900 * R + 0.58700 * G + 0.11400 * B\n *\tCb = -0.16874 * R - 0.33126 * G + 0.50000 * B  + CENTERJSAMPLE\n *\tCr =  0.50000 * R - 0.41869 * G - 0.08131 * B  + CENTERJSAMPLE\n * (These numbers are derived from TIFF 6.0 section 21, dated 3-June-92.)\n * Note: older versions of the IJG code used a zero offset of MAXJSAMPLE/2,\n * rather than CENTERJSAMPLE, for Cb and Cr.  This gave equal positive and\n * negative swings for Cb/Cr, but meant that grayscale values (Cb=Cr=0)\n * were not represented exactly.  Now we sacrifice exact representation of\n * maximum red and maximum blue in order to get exact grayscales.\n *\n * To avoid floating-point arithmetic, we represent the fractional constants\n * as integers scaled up by 2^16 (about 4 digits precision); we have to divide\n * the products by 2^16, with appropriate rounding, to get the correct answer.\n *\n * For even more speed, we avoid doing any multiplications in the inner loop\n * by precalculating the constants times R,G,B for all possible values.\n * For 8-bit JSAMPLEs this is very reasonable (only 256 entries per table);\n * for 12-bit samples it is still acceptable.  It's not very reasonable for\n * 16-bit samples, but if you want lossless storage you shouldn't be changing\n * colorspace anyway.\n * The CENTERJSAMPLE offsets and the rounding fudge-factor of 0.5 are included\n * in the tables to save adding them separately in the inner loop.\n */\n\n#define SCALEBITS\t16\t/* speediest right-shift on some machines */\n#define CBCR_OFFSET\t((INT32) CENTERJSAMPLE << SCALEBITS)\n#define ONE_HALF\t((INT32) 1 << (SCALEBITS-1))\n#define FIX(x)\t\t((INT32) ((x) * (1L<<SCALEBITS) + 0.5))\n\n/* We allocate one big table and divide it up into eight parts, instead of\n * doing eight alloc_small requests.  This lets us use a single table base\n * address, which can be held in a register in the inner loops on many\n * machines (more than can hold all eight addresses, anyway).\n */\n\n#define R_Y_OFF\t\t0\t\t\t/* offset to R => Y section */\n#define G_Y_OFF\t\t(1*(MAXJSAMPLE+1))\t/* offset to G => Y section */\n#define B_Y_OFF\t\t(2*(MAXJSAMPLE+1))\t/* etc. */\n#define R_CB_OFF\t(3*(MAXJSAMPLE+1))\n#define G_CB_OFF\t(4*(MAXJSAMPLE+1))\n#define B_CB_OFF\t(5*(MAXJSAMPLE+1))\n#define R_CR_OFF\tB_CB_OFF\t\t/* B=>Cb, R=>Cr are the same */\n#define G_CR_OFF\t(6*(MAXJSAMPLE+1))\n#define B_CR_OFF\t(7*(MAXJSAMPLE+1))\n#define TABLE_SIZE\t(8*(MAXJSAMPLE+1))\n\n\n/*\n * Initialize for RGB->YCC colorspace conversion.\n */\n\nMETHODDEF(void)\nrgb_ycc_start (j_compress_ptr cinfo)\n{\n  my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;\n  INT32 * rgb_ycc_tab;\n  INT32 i;\n\n  /* Allocate and fill in the conversion tables. */\n  cconvert->rgb_ycc_tab = rgb_ycc_tab = (INT32 *)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\t(TABLE_SIZE * SIZEOF(INT32)));\n\n  for (i = 0; i <= MAXJSAMPLE; i++) {\n    rgb_ycc_tab[i+R_Y_OFF] = FIX(0.29900) * i;\n    rgb_ycc_tab[i+G_Y_OFF] = FIX(0.58700) * i;\n    rgb_ycc_tab[i+B_Y_OFF] = FIX(0.11400) * i     + ONE_HALF;\n    rgb_ycc_tab[i+R_CB_OFF] = (-FIX(0.16874)) * i;\n    rgb_ycc_tab[i+G_CB_OFF] = (-FIX(0.33126)) * i;\n    /* We use a rounding fudge-factor of 0.5-epsilon for Cb and Cr.\n     * This ensures that the maximum output will round to MAXJSAMPLE\n     * not MAXJSAMPLE+1, and thus that we don't have to range-limit.\n     */\n    rgb_ycc_tab[i+B_CB_OFF] = FIX(0.50000) * i    + CBCR_OFFSET + ONE_HALF-1;\n/*  B=>Cb and R=>Cr tables are the same\n    rgb_ycc_tab[i+R_CR_OFF] = FIX(0.50000) * i    + CBCR_OFFSET + ONE_HALF-1;\n*/\n    rgb_ycc_tab[i+G_CR_OFF] = (-FIX(0.41869)) * i;\n    rgb_ycc_tab[i+B_CR_OFF] = (-FIX(0.08131)) * i;\n  }\n}\n\n\n/*\n * Convert some rows of samples to the JPEG colorspace.\n *\n * Note that we change from the application's interleaved-pixel format\n * to our internal noninterleaved, one-plane-per-component format.\n * The input buffer is therefore three times as wide as the output buffer.\n *\n * A starting row offset is provided only for the output buffer.  The caller\n * can easily adjust the passed input_buf value to accommodate any row\n * offset required on that side.\n */\n\nMETHODDEF(void)\nrgb_ycc_convert (j_compress_ptr cinfo,\n\t\t JSAMPARRAY input_buf, JSAMPIMAGE output_buf,\n\t\t JDIMENSION output_row, int num_rows)\n{\n  my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;\n  register int r, g, b;\n  register INT32 * ctab = cconvert->rgb_ycc_tab;\n  register JSAMPROW inptr;\n  register JSAMPROW outptr0, outptr1, outptr2;\n  register JDIMENSION col;\n  JDIMENSION num_cols = cinfo->image_width;\n\n  while (--num_rows >= 0) {\n    inptr = *input_buf++;\n    outptr0 = output_buf[0][output_row];\n    outptr1 = output_buf[1][output_row];\n    outptr2 = output_buf[2][output_row];\n    output_row++;\n    for (col = 0; col < num_cols; col++) {\n      r = GETJSAMPLE(inptr[RGB_RED]);\n      g = GETJSAMPLE(inptr[RGB_GREEN]);\n      b = GETJSAMPLE(inptr[RGB_BLUE]);\n      inptr += RGB_PIXELSIZE;\n      /* If the inputs are 0..MAXJSAMPLE, the outputs of these equations\n       * must be too; we do not need an explicit range-limiting operation.\n       * Hence the value being shifted is never negative, and we don't\n       * need the general RIGHT_SHIFT macro.\n       */\n      /* Y */\n      outptr0[col] = (JSAMPLE)\n\t\t((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF])\n\t\t >> SCALEBITS);\n      /* Cb */\n      outptr1[col] = (JSAMPLE)\n\t\t((ctab[r+R_CB_OFF] + ctab[g+G_CB_OFF] + ctab[b+B_CB_OFF])\n\t\t >> SCALEBITS);\n      /* Cr */\n      outptr2[col] = (JSAMPLE)\n\t\t((ctab[r+R_CR_OFF] + ctab[g+G_CR_OFF] + ctab[b+B_CR_OFF])\n\t\t >> SCALEBITS);\n    }\n  }\n}\n\n\n/**************** Cases other than RGB -> YCbCr **************/\n\n\n/*\n * Convert some rows of samples to the JPEG colorspace.\n * This version handles RGB->grayscale conversion, which is the same\n * as the RGB->Y portion of RGB->YCbCr.\n * We assume rgb_ycc_start has been called (we only use the Y tables).\n */\n\nMETHODDEF(void)\nrgb_gray_convert (j_compress_ptr cinfo,\n\t\t  JSAMPARRAY input_buf, JSAMPIMAGE output_buf,\n\t\t  JDIMENSION output_row, int num_rows)\n{\n  my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;\n  register int r, g, b;\n  register INT32 * ctab = cconvert->rgb_ycc_tab;\n  register JSAMPROW inptr;\n  register JSAMPROW outptr;\n  register JDIMENSION col;\n  JDIMENSION num_cols = cinfo->image_width;\n\n  while (--num_rows >= 0) {\n    inptr = *input_buf++;\n    outptr = output_buf[0][output_row];\n    output_row++;\n    for (col = 0; col < num_cols; col++) {\n      r = GETJSAMPLE(inptr[RGB_RED]);\n      g = GETJSAMPLE(inptr[RGB_GREEN]);\n      b = GETJSAMPLE(inptr[RGB_BLUE]);\n      inptr += RGB_PIXELSIZE;\n      /* Y */\n      outptr[col] = (JSAMPLE)\n\t\t((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF])\n\t\t >> SCALEBITS);\n    }\n  }\n}\n\n\n/*\n * Convert some rows of samples to the JPEG colorspace.\n * This version handles Adobe-style CMYK->YCCK conversion,\n * where we convert R=1-C, G=1-M, and B=1-Y to YCbCr using the same\n * conversion as above, while passing K (black) unchanged.\n * We assume rgb_ycc_start has been called.\n */\n\nMETHODDEF(void)\ncmyk_ycck_convert (j_compress_ptr cinfo,\n\t\t   JSAMPARRAY input_buf, JSAMPIMAGE output_buf,\n\t\t   JDIMENSION output_row, int num_rows)\n{\n  my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;\n  register int r, g, b;\n  register INT32 * ctab = cconvert->rgb_ycc_tab;\n  register JSAMPROW inptr;\n  register JSAMPROW outptr0, outptr1, outptr2, outptr3;\n  register JDIMENSION col;\n  JDIMENSION num_cols = cinfo->image_width;\n\n  while (--num_rows >= 0) {\n    inptr = *input_buf++;\n    outptr0 = output_buf[0][output_row];\n    outptr1 = output_buf[1][output_row];\n    outptr2 = output_buf[2][output_row];\n    outptr3 = output_buf[3][output_row];\n    output_row++;\n    for (col = 0; col < num_cols; col++) {\n      r = MAXJSAMPLE - GETJSAMPLE(inptr[0]);\n      g = MAXJSAMPLE - GETJSAMPLE(inptr[1]);\n      b = MAXJSAMPLE - GETJSAMPLE(inptr[2]);\n      /* K passes through as-is */\n      outptr3[col] = inptr[3];\t/* don't need GETJSAMPLE here */\n      inptr += 4;\n      /* If the inputs are 0..MAXJSAMPLE, the outputs of these equations\n       * must be too; we do not need an explicit range-limiting operation.\n       * Hence the value being shifted is never negative, and we don't\n       * need the general RIGHT_SHIFT macro.\n       */\n      /* Y */\n      outptr0[col] = (JSAMPLE)\n\t\t((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF])\n\t\t >> SCALEBITS);\n      /* Cb */\n      outptr1[col] = (JSAMPLE)\n\t\t((ctab[r+R_CB_OFF] + ctab[g+G_CB_OFF] + ctab[b+B_CB_OFF])\n\t\t >> SCALEBITS);\n      /* Cr */\n      outptr2[col] = (JSAMPLE)\n\t\t((ctab[r+R_CR_OFF] + ctab[g+G_CR_OFF] + ctab[b+B_CR_OFF])\n\t\t >> SCALEBITS);\n    }\n  }\n}\n\n\n/*\n * Convert some rows of samples to the JPEG colorspace.\n * This version handles grayscale output with no conversion.\n * The source can be either plain grayscale or YCbCr (since Y == gray).\n */\n\nMETHODDEF(void)\ngrayscale_convert (j_compress_ptr cinfo,\n\t\t   JSAMPARRAY input_buf, JSAMPIMAGE output_buf,\n\t\t   JDIMENSION output_row, int num_rows)\n{\n  register JSAMPROW inptr;\n  register JSAMPROW outptr;\n  register JDIMENSION col;\n  JDIMENSION num_cols = cinfo->image_width;\n  int instride = cinfo->input_components;\n\n  while (--num_rows >= 0) {\n    inptr = *input_buf++;\n    outptr = output_buf[0][output_row];\n    output_row++;\n    for (col = 0; col < num_cols; col++) {\n      outptr[col] = inptr[0];\t/* don't need GETJSAMPLE() here */\n      inptr += instride;\n    }\n  }\n}\n\n\n/*\n * Convert some rows of samples to the JPEG colorspace.\n * This version handles multi-component colorspaces without conversion.\n * We assume input_components == num_components.\n */\n\nMETHODDEF(void)\nnull_convert (j_compress_ptr cinfo,\n\t      JSAMPARRAY input_buf, JSAMPIMAGE output_buf,\n\t      JDIMENSION output_row, int num_rows)\n{\n  register JSAMPROW inptr;\n  register JSAMPROW outptr;\n  register JDIMENSION col;\n  register int ci;\n  int nc = cinfo->num_components;\n  JDIMENSION num_cols = cinfo->image_width;\n\n  while (--num_rows >= 0) {\n    /* It seems fastest to make a separate pass for each component. */\n    for (ci = 0; ci < nc; ci++) {\n      inptr = *input_buf;\n      outptr = output_buf[ci][output_row];\n      for (col = 0; col < num_cols; col++) {\n\toutptr[col] = inptr[ci]; /* don't need GETJSAMPLE() here */\n\tinptr += nc;\n      }\n    }\n    input_buf++;\n    output_row++;\n  }\n}\n\n\n/*\n * Empty method for start_pass.\n */\n\nMETHODDEF(void)\nnull_method (j_compress_ptr cinfo)\n{\n  /* no work needed */\n}\n\n\n/*\n * Module initialization routine for input colorspace conversion.\n */\n\nGLOBAL(void)\njinit_color_converter (j_compress_ptr cinfo)\n{\n  my_cconvert_ptr cconvert;\n\n  cconvert = (my_cconvert_ptr)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\tSIZEOF(my_color_converter));\n  cinfo->cconvert = (struct jpeg_color_converter *) cconvert;\n  /* set start_pass to null method until we find out differently */\n  cconvert->pub.start_pass = null_method;\n\n  /* Make sure input_components agrees with in_color_space */\n  switch (cinfo->in_color_space) {\n  case JCS_GRAYSCALE:\n    if (cinfo->input_components != 1)\n      ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE);\n    break;\n\n  case JCS_RGB:\n#if RGB_PIXELSIZE != 3\n    if (cinfo->input_components != RGB_PIXELSIZE)\n      ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE);\n    break;\n#endif /* else share code with YCbCr */\n\n  case JCS_YCbCr:\n    if (cinfo->input_components != 3)\n      ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE);\n    break;\n\n  case JCS_CMYK:\n  case JCS_YCCK:\n    if (cinfo->input_components != 4)\n      ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE);\n    break;\n\n  default:\t\t\t/* JCS_UNKNOWN can be anything */\n    if (cinfo->input_components < 1)\n      ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE);\n    break;\n  }\n\n  /* Check num_components, set conversion method based on requested space */\n  switch (cinfo->jpeg_color_space) {\n  case JCS_GRAYSCALE:\n    if (cinfo->num_components != 1)\n      ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);\n    if (cinfo->in_color_space == JCS_GRAYSCALE)\n      cconvert->pub.color_convert = grayscale_convert;\n    else if (cinfo->in_color_space == JCS_RGB) {\n      cconvert->pub.start_pass = rgb_ycc_start;\n      cconvert->pub.color_convert = rgb_gray_convert;\n    } else if (cinfo->in_color_space == JCS_YCbCr)\n      cconvert->pub.color_convert = grayscale_convert;\n    else\n      ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);\n    break;\n\n  case JCS_RGB:\n    if (cinfo->num_components != 3)\n      ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);\n    if (cinfo->in_color_space == JCS_RGB && RGB_PIXELSIZE == 3)\n      cconvert->pub.color_convert = null_convert;\n    else\n      ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);\n    break;\n\n  case JCS_YCbCr:\n    if (cinfo->num_components != 3)\n      ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);\n    if (cinfo->in_color_space == JCS_RGB) {\n      cconvert->pub.start_pass = rgb_ycc_start;\n      cconvert->pub.color_convert = rgb_ycc_convert;\n    } else if (cinfo->in_color_space == JCS_YCbCr)\n      cconvert->pub.color_convert = null_convert;\n    else\n      ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);\n    break;\n\n  case JCS_CMYK:\n    if (cinfo->num_components != 4)\n      ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);\n    if (cinfo->in_color_space == JCS_CMYK)\n      cconvert->pub.color_convert = null_convert;\n    else\n      ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);\n    break;\n\n  case JCS_YCCK:\n    if (cinfo->num_components != 4)\n      ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);\n    if (cinfo->in_color_space == JCS_CMYK) {\n      cconvert->pub.start_pass = rgb_ycc_start;\n      cconvert->pub.color_convert = cmyk_ycck_convert;\n    } else if (cinfo->in_color_space == JCS_YCCK)\n      cconvert->pub.color_convert = null_convert;\n    else\n      ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);\n    break;\n\n  default:\t\t\t/* allow null conversion of JCS_UNKNOWN */\n    if (cinfo->jpeg_color_space != cinfo->in_color_space ||\n\tcinfo->num_components != cinfo->input_components)\n      ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);\n    cconvert->pub.color_convert = null_convert;\n    break;\n  }\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jcdctmgr.c",
    "content": "/*\n * jcdctmgr.c\n *\n * Copyright (C) 1994-1996, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains the forward-DCT management logic.\n * This code selects a particular DCT implementation to be used,\n * and it performs related housekeeping chores including coefficient\n * quantization.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n#include \"jdct.h\"\t\t/* Private declarations for DCT subsystem */\n\n\n/* Private subobject for this module */\n\ntypedef struct {\n  struct jpeg_forward_dct pub;\t/* public fields */\n\n  /* Pointer to the DCT routine actually in use */\n  forward_DCT_method_ptr do_dct;\n\n  /* The actual post-DCT divisors --- not identical to the quant table\n   * entries, because of scaling (especially for an unnormalized DCT).\n   * Each table is given in normal array order.\n   */\n  DCTELEM * divisors[NUM_QUANT_TBLS];\n\n#ifdef DCT_FLOAT_SUPPORTED\n  /* Same as above for the floating-point case. */\n  float_DCT_method_ptr do_float_dct;\n  FAST_FLOAT * float_divisors[NUM_QUANT_TBLS];\n#endif\n} my_fdct_controller;\n\ntypedef my_fdct_controller * my_fdct_ptr;\n\n\n/*\n * Initialize for a processing pass.\n * Verify that all referenced Q-tables are present, and set up\n * the divisor table for each one.\n * In the current implementation, DCT of all components is done during\n * the first pass, even if only some components will be output in the\n * first scan.  Hence all components should be examined here.\n */\n\nMETHODDEF(void)\nstart_pass_fdctmgr (j_compress_ptr cinfo)\n{\n  my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct;\n  int ci, qtblno, i;\n  jpeg_component_info *compptr;\n  JQUANT_TBL * qtbl;\n  DCTELEM * dtbl;\n\n  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n       ci++, compptr++) {\n    qtblno = compptr->quant_tbl_no;\n    /* Make sure specified quantization table is present */\n    if (qtblno < 0 || qtblno >= NUM_QUANT_TBLS ||\n\tcinfo->quant_tbl_ptrs[qtblno] == NULL)\n      ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, qtblno);\n    qtbl = cinfo->quant_tbl_ptrs[qtblno];\n    /* Compute divisors for this quant table */\n    /* We may do this more than once for same table, but it's not a big deal */\n    switch (cinfo->dct_method) {\n#ifdef DCT_ISLOW_SUPPORTED\n    case JDCT_ISLOW:\n      /* For LL&M IDCT method, divisors are equal to raw quantization\n       * coefficients multiplied by 8 (to counteract scaling).\n       */\n      if (fdct->divisors[qtblno] == NULL) {\n\tfdct->divisors[qtblno] = (DCTELEM *)\n\t  (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\t      DCTSIZE2 * SIZEOF(DCTELEM));\n      }\n      dtbl = fdct->divisors[qtblno];\n      for (i = 0; i < DCTSIZE2; i++) {\n\tdtbl[i] = ((DCTELEM) qtbl->quantval[i]) << 3;\n      }\n      break;\n#endif\n#ifdef DCT_IFAST_SUPPORTED\n    case JDCT_IFAST:\n      {\n\t/* For AA&N IDCT method, divisors are equal to quantization\n\t * coefficients scaled by scalefactor[row]*scalefactor[col], where\n\t *   scalefactor[0] = 1\n\t *   scalefactor[k] = cos(k*PI/16) * sqrt(2)    for k=1..7\n\t * We apply a further scale factor of 8.\n\t */\n#define CONST_BITS 14\n\tstatic const INT16 aanscales[DCTSIZE2] = {\n\t  /* precomputed values scaled up by 14 bits */\n\t  16384, 22725, 21407, 19266, 16384, 12873,  8867,  4520,\n\t  22725, 31521, 29692, 26722, 22725, 17855, 12299,  6270,\n\t  21407, 29692, 27969, 25172, 21407, 16819, 11585,  5906,\n\t  19266, 26722, 25172, 22654, 19266, 15137, 10426,  5315,\n\t  16384, 22725, 21407, 19266, 16384, 12873,  8867,  4520,\n\t  12873, 17855, 16819, 15137, 12873, 10114,  6967,  3552,\n\t   8867, 12299, 11585, 10426,  8867,  6967,  4799,  2446,\n\t   4520,  6270,  5906,  5315,  4520,  3552,  2446,  1247\n\t};\n\tSHIFT_TEMPS\n\n\tif (fdct->divisors[qtblno] == NULL) {\n\t  fdct->divisors[qtblno] = (DCTELEM *)\n\t    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\t\tDCTSIZE2 * SIZEOF(DCTELEM));\n\t}\n\tdtbl = fdct->divisors[qtblno];\n\tfor (i = 0; i < DCTSIZE2; i++) {\n\t  dtbl[i] = (DCTELEM)\n\t    DESCALE(MULTIPLY16V16((INT32) qtbl->quantval[i],\n\t\t\t\t  (INT32) aanscales[i]),\n\t\t    CONST_BITS-3);\n\t}\n      }\n      break;\n#endif\n#ifdef DCT_FLOAT_SUPPORTED\n    case JDCT_FLOAT:\n      {\n\t/* For float AA&N IDCT method, divisors are equal to quantization\n\t * coefficients scaled by scalefactor[row]*scalefactor[col], where\n\t *   scalefactor[0] = 1\n\t *   scalefactor[k] = cos(k*PI/16) * sqrt(2)    for k=1..7\n\t * We apply a further scale factor of 8.\n\t * What's actually stored is 1/divisor so that the inner loop can\n\t * use a multiplication rather than a division.\n\t */\n\tFAST_FLOAT * fdtbl;\n\tint row, col;\n\tstatic const double aanscalefactor[DCTSIZE] = {\n\t  1.0, 1.387039845, 1.306562965, 1.175875602,\n\t  1.0, 0.785694958, 0.541196100, 0.275899379\n\t};\n\n\tif (fdct->float_divisors[qtblno] == NULL) {\n\t  fdct->float_divisors[qtblno] = (FAST_FLOAT *)\n\t    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\t\tDCTSIZE2 * SIZEOF(FAST_FLOAT));\n\t}\n\tfdtbl = fdct->float_divisors[qtblno];\n\ti = 0;\n\tfor (row = 0; row < DCTSIZE; row++) {\n\t  for (col = 0; col < DCTSIZE; col++) {\n\t    fdtbl[i] = (FAST_FLOAT)\n\t      (1.0 / (((double) qtbl->quantval[i] *\n\t\t       aanscalefactor[row] * aanscalefactor[col] * 8.0)));\n\t    i++;\n\t  }\n\t}\n      }\n      break;\n#endif\n    default:\n      ERREXIT(cinfo, JERR_NOT_COMPILED);\n      break;\n    }\n  }\n}\n\n\n/*\n * Perform forward DCT on one or more blocks of a component.\n *\n * The input samples are taken from the sample_data[] array starting at\n * position start_row/start_col, and moving to the right for any additional\n * blocks. The quantized coefficients are returned in coef_blocks[].\n */\n\nMETHODDEF(void)\nforward_DCT (j_compress_ptr cinfo, jpeg_component_info * compptr,\n\t     JSAMPARRAY sample_data, JBLOCKROW coef_blocks,\n\t     JDIMENSION start_row, JDIMENSION start_col,\n\t     JDIMENSION num_blocks)\n/* This version is used for integer DCT implementations. */\n{\n  /* This routine is heavily used, so it's worth coding it tightly. */\n  my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct;\n  forward_DCT_method_ptr do_dct = fdct->do_dct;\n  DCTELEM * divisors = fdct->divisors[compptr->quant_tbl_no];\n  DCTELEM workspace[DCTSIZE2];\t/* work area for FDCT subroutine */\n  JDIMENSION bi;\n\n  sample_data += start_row;\t/* fold in the vertical offset once */\n\n  for (bi = 0; bi < num_blocks; bi++, start_col += DCTSIZE) {\n    /* Load data into workspace, applying unsigned->signed conversion */\n    { register DCTELEM *workspaceptr;\n      register JSAMPROW elemptr;\n      register int elemr;\n\n      workspaceptr = workspace;\n      for (elemr = 0; elemr < DCTSIZE; elemr++) {\n\telemptr = sample_data[elemr] + start_col;\n#if DCTSIZE == 8\t\t/* unroll the inner loop */\n\t*workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;\n\t*workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;\n\t*workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;\n\t*workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;\n\t*workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;\n\t*workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;\n\t*workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;\n\t*workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;\n#else\n\t{ register int elemc;\n\t  for (elemc = DCTSIZE; elemc > 0; elemc--) {\n\t    *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;\n\t  }\n\t}\n#endif\n      }\n    }\n\n    /* Perform the DCT */\n    (*do_dct) (workspace);\n\n    /* Quantize/descale the coefficients, and store into coef_blocks[] */\n    { register DCTELEM temp, qval;\n      register int i;\n      register JCOEFPTR output_ptr = coef_blocks[bi];\n\n      for (i = 0; i < DCTSIZE2; i++) {\n\tqval = divisors[i];\n\ttemp = workspace[i];\n\t/* Divide the coefficient value by qval, ensuring proper rounding.\n\t * Since C does not specify the direction of rounding for negative\n\t * quotients, we have to force the dividend positive for portability.\n\t *\n\t * In most files, at least half of the output values will be zero\n\t * (at default quantization settings, more like three-quarters...)\n\t * so we should ensure that this case is fast.  On many machines,\n\t * a comparison is enough cheaper than a divide to make a special test\n\t * a win.  Since both inputs will be nonnegative, we need only test\n\t * for a < b to discover whether a/b is 0.\n\t * If your machine's division is fast enough, define FAST_DIVIDE.\n\t */\n#ifdef FAST_DIVIDE\n#define DIVIDE_BY(a,b)\ta /= b\n#else\n#define DIVIDE_BY(a,b)\tif (a >= b) a /= b; else a = 0\n#endif\n\tif (temp < 0) {\n\t  temp = -temp;\n\t  temp += qval>>1;\t/* for rounding */\n\t  DIVIDE_BY(temp, qval);\n\t  temp = -temp;\n\t} else {\n\t  temp += qval>>1;\t/* for rounding */\n\t  DIVIDE_BY(temp, qval);\n\t}\n\toutput_ptr[i] = (JCOEF) temp;\n      }\n    }\n  }\n}\n\n\n#ifdef DCT_FLOAT_SUPPORTED\n\nMETHODDEF(void)\nforward_DCT_float (j_compress_ptr cinfo, jpeg_component_info * compptr,\n\t\t   JSAMPARRAY sample_data, JBLOCKROW coef_blocks,\n\t\t   JDIMENSION start_row, JDIMENSION start_col,\n\t\t   JDIMENSION num_blocks)\n/* This version is used for floating-point DCT implementations. */\n{\n  /* This routine is heavily used, so it's worth coding it tightly. */\n  my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct;\n  float_DCT_method_ptr do_dct = fdct->do_float_dct;\n  FAST_FLOAT * divisors = fdct->float_divisors[compptr->quant_tbl_no];\n  FAST_FLOAT workspace[DCTSIZE2]; /* work area for FDCT subroutine */\n  JDIMENSION bi;\n\n  sample_data += start_row;\t/* fold in the vertical offset once */\n\n  for (bi = 0; bi < num_blocks; bi++, start_col += DCTSIZE) {\n    /* Load data into workspace, applying unsigned->signed conversion */\n    { register FAST_FLOAT *workspaceptr;\n      register JSAMPROW elemptr;\n      register int elemr;\n\n      workspaceptr = workspace;\n      for (elemr = 0; elemr < DCTSIZE; elemr++) {\n\telemptr = sample_data[elemr] + start_col;\n#if DCTSIZE == 8\t\t/* unroll the inner loop */\n\t*workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);\n\t*workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);\n\t*workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);\n\t*workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);\n\t*workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);\n\t*workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);\n\t*workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);\n\t*workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);\n#else\n\t{ register int elemc;\n\t  for (elemc = DCTSIZE; elemc > 0; elemc--) {\n\t    *workspaceptr++ = (FAST_FLOAT)\n\t      (GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);\n\t  }\n\t}\n#endif\n      }\n    }\n\n    /* Perform the DCT */\n    (*do_dct) (workspace);\n\n    /* Quantize/descale the coefficients, and store into coef_blocks[] */\n    { register FAST_FLOAT temp;\n      register int i;\n      register JCOEFPTR output_ptr = coef_blocks[bi];\n\n      for (i = 0; i < DCTSIZE2; i++) {\n\t/* Apply the quantization and scaling factor */\n\ttemp = workspace[i] * divisors[i];\n\t/* Round to nearest integer.\n\t * Since C does not specify the direction of rounding for negative\n\t * quotients, we have to force the dividend positive for portability.\n\t * The maximum coefficient size is +-16K (for 12-bit data), so this\n\t * code should work for either 16-bit or 32-bit ints.\n\t */\n\toutput_ptr[i] = (JCOEF) ((int) (temp + (FAST_FLOAT) 16384.5) - 16384);\n      }\n    }\n  }\n}\n\n#endif /* DCT_FLOAT_SUPPORTED */\n\n\n/*\n * Initialize FDCT manager.\n */\n\nGLOBAL(void)\njinit_forward_dct (j_compress_ptr cinfo)\n{\n  my_fdct_ptr fdct;\n  int i;\n\n  fdct = (my_fdct_ptr)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\tSIZEOF(my_fdct_controller));\n  cinfo->fdct = (struct jpeg_forward_dct *) fdct;\n  fdct->pub.start_pass = start_pass_fdctmgr;\n\n  switch (cinfo->dct_method) {\n#ifdef DCT_ISLOW_SUPPORTED\n  case JDCT_ISLOW:\n    fdct->pub.forward_DCT = forward_DCT;\n    fdct->do_dct = jpeg_fdct_islow;\n    break;\n#endif\n#ifdef DCT_IFAST_SUPPORTED\n  case JDCT_IFAST:\n    fdct->pub.forward_DCT = forward_DCT;\n    fdct->do_dct = jpeg_fdct_ifast;\n    break;\n#endif\n#ifdef DCT_FLOAT_SUPPORTED\n  case JDCT_FLOAT:\n    fdct->pub.forward_DCT = forward_DCT_float;\n    fdct->do_float_dct = jpeg_fdct_float;\n    break;\n#endif\n  default:\n    ERREXIT(cinfo, JERR_NOT_COMPILED);\n    break;\n  }\n\n  /* Mark divisor tables unallocated */\n  for (i = 0; i < NUM_QUANT_TBLS; i++) {\n    fdct->divisors[i] = NULL;\n#ifdef DCT_FLOAT_SUPPORTED\n    fdct->float_divisors[i] = NULL;\n#endif\n  }\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jchuff.c",
    "content": "/*\n * jchuff.c\n *\n * Copyright (C) 1991-1997, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains Huffman entropy encoding routines.\n *\n * Much of the complexity here has to do with supporting output suspension.\n * If the data destination module demands suspension, we want to be able to\n * back up to the start of the current MCU.  To do this, we copy state\n * variables into local working storage, and update them back to the\n * permanent JPEG objects only upon successful completion of an MCU.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n#include \"jchuff.h\"\t\t/* Declarations shared with jcphuff.c */\n\n\n/* Expanded entropy encoder object for Huffman encoding.\n *\n * The savable_state subrecord contains fields that change within an MCU,\n * but must not be updated permanently until we complete the MCU.\n */\n\ntypedef struct {\n  INT32 put_buffer;\t\t/* current bit-accumulation buffer */\n  int put_bits;\t\t\t/* # of bits now in it */\n  int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */\n} savable_state;\n\n/* This macro is to work around compilers with missing or broken\n * structure assignment.  You'll need to fix this code if you have\n * such a compiler and you change MAX_COMPS_IN_SCAN.\n */\n\n#ifndef NO_STRUCT_ASSIGN\n#define ASSIGN_STATE(dest,src)  ((dest) = (src))\n#else\n#if MAX_COMPS_IN_SCAN == 4\n#define ASSIGN_STATE(dest,src)  \\\n\t((dest).put_buffer = (src).put_buffer, \\\n\t (dest).put_bits = (src).put_bits, \\\n\t (dest).last_dc_val[0] = (src).last_dc_val[0], \\\n\t (dest).last_dc_val[1] = (src).last_dc_val[1], \\\n\t (dest).last_dc_val[2] = (src).last_dc_val[2], \\\n\t (dest).last_dc_val[3] = (src).last_dc_val[3])\n#endif\n#endif\n\n\ntypedef struct {\n  struct jpeg_entropy_encoder pub; /* public fields */\n\n  savable_state saved;\t\t/* Bit buffer & DC state at start of MCU */\n\n  /* These fields are NOT loaded into local working state. */\n  unsigned int restarts_to_go;\t/* MCUs left in this restart interval */\n  int next_restart_num;\t\t/* next restart number to write (0-7) */\n\n  /* Pointers to derived tables (these workspaces have image lifespan) */\n  c_derived_tbl * dc_derived_tbls[NUM_HUFF_TBLS];\n  c_derived_tbl * ac_derived_tbls[NUM_HUFF_TBLS];\n\n#ifdef ENTROPY_OPT_SUPPORTED\t/* Statistics tables for optimization */\n  long * dc_count_ptrs[NUM_HUFF_TBLS];\n  long * ac_count_ptrs[NUM_HUFF_TBLS];\n#endif\n} huff_entropy_encoder;\n\ntypedef huff_entropy_encoder * huff_entropy_ptr;\n\n/* Working state while writing an MCU.\n * This struct contains all the fields that are needed by subroutines.\n */\n\ntypedef struct {\n  JOCTET * next_output_byte;\t/* => next byte to write in buffer */\n  size_t free_in_buffer;\t/* # of byte spaces remaining in buffer */\n  savable_state cur;\t\t/* Current bit buffer & DC state */\n  j_compress_ptr cinfo;\t\t/* dump_buffer needs access to this */\n} working_state;\n\n\n/* Forward declarations */\nMETHODDEF(boolean) encode_mcu_huff JPP((j_compress_ptr cinfo,\n\t\t\t\t\tJBLOCKROW *MCU_data));\nMETHODDEF(void) finish_pass_huff JPP((j_compress_ptr cinfo));\n#ifdef ENTROPY_OPT_SUPPORTED\nMETHODDEF(boolean) encode_mcu_gather JPP((j_compress_ptr cinfo,\n\t\t\t\t\t  JBLOCKROW *MCU_data));\nMETHODDEF(void) finish_pass_gather JPP((j_compress_ptr cinfo));\n#endif\n\n\n/*\n * Initialize for a Huffman-compressed scan.\n * If gather_statistics is TRUE, we do not output anything during the scan,\n * just count the Huffman symbols used and generate Huffman code tables.\n */\n\nMETHODDEF(void)\nstart_pass_huff (j_compress_ptr cinfo, boolean gather_statistics)\n{\n  huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;\n  int ci, dctbl, actbl;\n  jpeg_component_info * compptr;\n\n  if (gather_statistics) {\n#ifdef ENTROPY_OPT_SUPPORTED\n    entropy->pub.encode_mcu = encode_mcu_gather;\n    entropy->pub.finish_pass = finish_pass_gather;\n#else\n    ERREXIT(cinfo, JERR_NOT_COMPILED);\n#endif\n  } else {\n    entropy->pub.encode_mcu = encode_mcu_huff;\n    entropy->pub.finish_pass = finish_pass_huff;\n  }\n\n  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {\n    compptr = cinfo->cur_comp_info[ci];\n    dctbl = compptr->dc_tbl_no;\n    actbl = compptr->ac_tbl_no;\n    if (gather_statistics) {\n#ifdef ENTROPY_OPT_SUPPORTED\n      /* Check for invalid table indexes */\n      /* (make_c_derived_tbl does this in the other path) */\n      if (dctbl < 0 || dctbl >= NUM_HUFF_TBLS)\n\tERREXIT1(cinfo, JERR_NO_HUFF_TABLE, dctbl);\n      if (actbl < 0 || actbl >= NUM_HUFF_TBLS)\n\tERREXIT1(cinfo, JERR_NO_HUFF_TABLE, actbl);\n      /* Allocate and zero the statistics tables */\n      /* Note that jpeg_gen_optimal_table expects 257 entries in each table! */\n      if (entropy->dc_count_ptrs[dctbl] == NULL)\n\tentropy->dc_count_ptrs[dctbl] = (long *)\n\t  (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\t      257 * SIZEOF(long));\n      MEMZERO(entropy->dc_count_ptrs[dctbl], 257 * SIZEOF(long));\n      if (entropy->ac_count_ptrs[actbl] == NULL)\n\tentropy->ac_count_ptrs[actbl] = (long *)\n\t  (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\t      257 * SIZEOF(long));\n      MEMZERO(entropy->ac_count_ptrs[actbl], 257 * SIZEOF(long));\n#endif\n    } else {\n      /* Compute derived values for Huffman tables */\n      /* We may do this more than once for a table, but it's not expensive */\n      jpeg_make_c_derived_tbl(cinfo, TRUE, dctbl,\n\t\t\t      & entropy->dc_derived_tbls[dctbl]);\n      jpeg_make_c_derived_tbl(cinfo, FALSE, actbl,\n\t\t\t      & entropy->ac_derived_tbls[actbl]);\n    }\n    /* Initialize DC predictions to 0 */\n    entropy->saved.last_dc_val[ci] = 0;\n  }\n\n  /* Initialize bit buffer to empty */\n  entropy->saved.put_buffer = 0;\n  entropy->saved.put_bits = 0;\n\n  /* Initialize restart stuff */\n  entropy->restarts_to_go = cinfo->restart_interval;\n  entropy->next_restart_num = 0;\n}\n\n\n/*\n * Compute the derived values for a Huffman table.\n * This routine also performs some validation checks on the table.\n *\n * Note this is also used by jcphuff.c.\n */\n\nGLOBAL(void)\njpeg_make_c_derived_tbl (j_compress_ptr cinfo, boolean isDC, int tblno,\n\t\t\t c_derived_tbl ** pdtbl)\n{\n  JHUFF_TBL *htbl;\n  c_derived_tbl *dtbl;\n  int p, i, l, lastp, si, maxsymbol;\n  char huffsize[257];\n  unsigned int huffcode[257];\n  unsigned int code;\n\n  /* Note that huffsize[] and huffcode[] are filled in code-length order,\n   * paralleling the order of the symbols themselves in htbl->huffval[].\n   */\n\n  /* Find the input Huffman table */\n  if (tblno < 0 || tblno >= NUM_HUFF_TBLS)\n    ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tblno);\n  htbl =\n    isDC ? cinfo->dc_huff_tbl_ptrs[tblno] : cinfo->ac_huff_tbl_ptrs[tblno];\n  if (htbl == NULL)\n    ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tblno);\n\n  /* Allocate a workspace if we haven't already done so. */\n  if (*pdtbl == NULL)\n    *pdtbl = (c_derived_tbl *)\n      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\t  SIZEOF(c_derived_tbl));\n  dtbl = *pdtbl;\n  \n  /* Figure C.1: make table of Huffman code length for each symbol */\n\n  p = 0;\n  for (l = 1; l <= 16; l++) {\n    i = (int) htbl->bits[l];\n    if (i < 0 || p + i > 256)\t/* protect against table overrun */\n      ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);\n    while (i--)\n      huffsize[p++] = (char) l;\n  }\n  huffsize[p] = 0;\n  lastp = p;\n  \n  /* Figure C.2: generate the codes themselves */\n  /* We also validate that the counts represent a legal Huffman code tree. */\n\n  code = 0;\n  si = huffsize[0];\n  p = 0;\n  while (huffsize[p]) {\n    while (((int) huffsize[p]) == si) {\n      huffcode[p++] = code;\n      code++;\n    }\n    /* code is now 1 more than the last code used for codelength si; but\n     * it must still fit in si bits, since no code is allowed to be all ones.\n     */\n    if (((INT32) code) >= (((INT32) 1) << si))\n      ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);\n    code <<= 1;\n    si++;\n  }\n  \n  /* Figure C.3: generate encoding tables */\n  /* These are code and size indexed by symbol value */\n\n  /* Set all codeless symbols to have code length 0;\n   * this lets us detect duplicate VAL entries here, and later\n   * allows emit_bits to detect any attempt to emit such symbols.\n   */\n  MEMZERO(dtbl->ehufsi, SIZEOF(dtbl->ehufsi));\n\n  /* This is also a convenient place to check for out-of-range\n   * and duplicated VAL entries.  We allow 0..255 for AC symbols\n   * but only 0..15 for DC.  (We could constrain them further\n   * based on data depth and mode, but this seems enough.)\n   */\n  maxsymbol = isDC ? 15 : 255;\n\n  for (p = 0; p < lastp; p++) {\n    i = htbl->huffval[p];\n    if (i < 0 || i > maxsymbol || dtbl->ehufsi[i])\n      ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);\n    dtbl->ehufco[i] = huffcode[p];\n    dtbl->ehufsi[i] = huffsize[p];\n  }\n}\n\n\n/* Outputting bytes to the file */\n\n/* Emit a byte, taking 'action' if must suspend. */\n#define emit_byte(state,val,action)  \\\n\t{ *(state)->next_output_byte++ = (JOCTET) (val);  \\\n\t  if (--(state)->free_in_buffer == 0)  \\\n\t    if (! dump_buffer(state))  \\\n\t      { action; } }\n\n\nLOCAL(boolean)\ndump_buffer (working_state * state)\n/* Empty the output buffer; return TRUE if successful, FALSE if must suspend */\n{\n  struct jpeg_destination_mgr * dest = state->cinfo->dest;\n\n  if (! (*dest->empty_output_buffer) (state->cinfo))\n    return FALSE;\n  /* After a successful buffer dump, must reset buffer pointers */\n  state->next_output_byte = dest->next_output_byte;\n  state->free_in_buffer = dest->free_in_buffer;\n  return TRUE;\n}\n\n\n/* Outputting bits to the file */\n\n/* Only the right 24 bits of put_buffer are used; the valid bits are\n * left-justified in this part.  At most 16 bits can be passed to emit_bits\n * in one call, and we never retain more than 7 bits in put_buffer\n * between calls, so 24 bits are sufficient.\n */\n\nINLINE\nLOCAL(boolean)\nemit_bits (working_state * state, unsigned int code, int size)\n/* Emit some bits; return TRUE if successful, FALSE if must suspend */\n{\n  /* This routine is heavily used, so it's worth coding tightly. */\n  register INT32 put_buffer = (INT32) code;\n  register int put_bits = state->cur.put_bits;\n\n  /* if size is 0, caller used an invalid Huffman table entry */\n  if (size == 0)\n    ERREXIT(state->cinfo, JERR_HUFF_MISSING_CODE);\n\n  put_buffer &= (((INT32) 1)<<size) - 1; /* mask off any extra bits in code */\n  \n  put_bits += size;\t\t/* new number of bits in buffer */\n  \n  put_buffer <<= 24 - put_bits; /* align incoming bits */\n\n  put_buffer |= state->cur.put_buffer; /* and merge with old buffer contents */\n  \n  while (put_bits >= 8) {\n    int c = (int) ((put_buffer >> 16) & 0xFF);\n    \n    emit_byte(state, c, return FALSE);\n    if (c == 0xFF) {\t\t/* need to stuff a zero byte? */\n      emit_byte(state, 0, return FALSE);\n    }\n    put_buffer <<= 8;\n    put_bits -= 8;\n  }\n\n  state->cur.put_buffer = put_buffer; /* update state variables */\n  state->cur.put_bits = put_bits;\n\n  return TRUE;\n}\n\n\nLOCAL(boolean)\nflush_bits (working_state * state)\n{\n  if (! emit_bits(state, 0x7F, 7)) /* fill any partial byte with ones */\n    return FALSE;\n  state->cur.put_buffer = 0;\t/* and reset bit-buffer to empty */\n  state->cur.put_bits = 0;\n  return TRUE;\n}\n\n\n/* Encode a single block's worth of coefficients */\n\nLOCAL(boolean)\nencode_one_block (working_state * state, JCOEFPTR block, int last_dc_val,\n\t\t  c_derived_tbl *dctbl, c_derived_tbl *actbl)\n{\n  register int temp, temp2;\n  register int nbits;\n  register int k, r, i;\n  \n  /* Encode the DC coefficient difference per section F.1.2.1 */\n  \n  temp = temp2 = block[0] - last_dc_val;\n\n  if (temp < 0) {\n    temp = -temp;\t\t/* temp is abs value of input */\n    /* For a negative input, want temp2 = bitwise complement of abs(input) */\n    /* This code assumes we are on a two's complement machine */\n    temp2--;\n  }\n  \n  /* Find the number of bits needed for the magnitude of the coefficient */\n  nbits = 0;\n  while (temp) {\n    nbits++;\n    temp >>= 1;\n  }\n  /* Check for out-of-range coefficient values.\n   * Since we're encoding a difference, the range limit is twice as much.\n   */\n  if (nbits > MAX_COEF_BITS+1)\n    ERREXIT(state->cinfo, JERR_BAD_DCT_COEF);\n  \n  /* Emit the Huffman-coded symbol for the number of bits */\n  if (! emit_bits(state, dctbl->ehufco[nbits], dctbl->ehufsi[nbits]))\n    return FALSE;\n\n  /* Emit that number of bits of the value, if positive, */\n  /* or the complement of its magnitude, if negative. */\n  if (nbits)\t\t\t/* emit_bits rejects calls with size 0 */\n    if (! emit_bits(state, (unsigned int) temp2, nbits))\n      return FALSE;\n\n  /* Encode the AC coefficients per section F.1.2.2 */\n  \n  r = 0;\t\t\t/* r = run length of zeros */\n  \n  for (k = 1; k < DCTSIZE2; k++) {\n    if ((temp = block[jpeg_natural_order[k]]) == 0) {\n      r++;\n    } else {\n      /* if run length > 15, must emit special run-length-16 codes (0xF0) */\n      while (r > 15) {\n\tif (! emit_bits(state, actbl->ehufco[0xF0], actbl->ehufsi[0xF0]))\n\t  return FALSE;\n\tr -= 16;\n      }\n\n      temp2 = temp;\n      if (temp < 0) {\n\ttemp = -temp;\t\t/* temp is abs value of input */\n\t/* This code assumes we are on a two's complement machine */\n\ttemp2--;\n      }\n      \n      /* Find the number of bits needed for the magnitude of the coefficient */\n      nbits = 1;\t\t/* there must be at least one 1 bit */\n      while ((temp >>= 1))\n\tnbits++;\n      /* Check for out-of-range coefficient values */\n      if (nbits > MAX_COEF_BITS)\n\tERREXIT(state->cinfo, JERR_BAD_DCT_COEF);\n      \n      /* Emit Huffman symbol for run length / number of bits */\n      i = (r << 4) + nbits;\n      if (! emit_bits(state, actbl->ehufco[i], actbl->ehufsi[i]))\n\treturn FALSE;\n\n      /* Emit that number of bits of the value, if positive, */\n      /* or the complement of its magnitude, if negative. */\n      if (! emit_bits(state, (unsigned int) temp2, nbits))\n\treturn FALSE;\n      \n      r = 0;\n    }\n  }\n\n  /* If the last coef(s) were zero, emit an end-of-block code */\n  if (r > 0)\n    if (! emit_bits(state, actbl->ehufco[0], actbl->ehufsi[0]))\n      return FALSE;\n\n  return TRUE;\n}\n\n\n/*\n * Emit a restart marker & resynchronize predictions.\n */\n\nLOCAL(boolean)\nemit_restart (working_state * state, int restart_num)\n{\n  int ci;\n\n  if (! flush_bits(state))\n    return FALSE;\n\n  emit_byte(state, 0xFF, return FALSE);\n  emit_byte(state, JPEG_RST0 + restart_num, return FALSE);\n\n  /* Re-initialize DC predictions to 0 */\n  for (ci = 0; ci < state->cinfo->comps_in_scan; ci++)\n    state->cur.last_dc_val[ci] = 0;\n\n  /* The restart counter is not updated until we successfully write the MCU. */\n\n  return TRUE;\n}\n\n\n/*\n * Encode and output one MCU's worth of Huffman-compressed coefficients.\n */\n\nMETHODDEF(boolean)\nencode_mcu_huff (j_compress_ptr cinfo, JBLOCKROW *MCU_data)\n{\n  huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;\n  working_state state;\n  int blkn, ci;\n  jpeg_component_info * compptr;\n\n  /* Load up working state */\n  state.next_output_byte = cinfo->dest->next_output_byte;\n  state.free_in_buffer = cinfo->dest->free_in_buffer;\n  ASSIGN_STATE(state.cur, entropy->saved);\n  state.cinfo = cinfo;\n\n  /* Emit restart marker if needed */\n  if (cinfo->restart_interval) {\n    if (entropy->restarts_to_go == 0)\n      if (! emit_restart(&state, entropy->next_restart_num))\n\treturn FALSE;\n  }\n\n  /* Encode the MCU data blocks */\n  for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {\n    ci = cinfo->MCU_membership[blkn];\n    compptr = cinfo->cur_comp_info[ci];\n    if (! encode_one_block(&state,\n\t\t\t   MCU_data[blkn][0], state.cur.last_dc_val[ci],\n\t\t\t   entropy->dc_derived_tbls[compptr->dc_tbl_no],\n\t\t\t   entropy->ac_derived_tbls[compptr->ac_tbl_no]))\n      return FALSE;\n    /* Update last_dc_val */\n    state.cur.last_dc_val[ci] = MCU_data[blkn][0][0];\n  }\n\n  /* Completed MCU, so update state */\n  cinfo->dest->next_output_byte = state.next_output_byte;\n  cinfo->dest->free_in_buffer = state.free_in_buffer;\n  ASSIGN_STATE(entropy->saved, state.cur);\n\n  /* Update restart-interval state too */\n  if (cinfo->restart_interval) {\n    if (entropy->restarts_to_go == 0) {\n      entropy->restarts_to_go = cinfo->restart_interval;\n      entropy->next_restart_num++;\n      entropy->next_restart_num &= 7;\n    }\n    entropy->restarts_to_go--;\n  }\n\n  return TRUE;\n}\n\n\n/*\n * Finish up at the end of a Huffman-compressed scan.\n */\n\nMETHODDEF(void)\nfinish_pass_huff (j_compress_ptr cinfo)\n{\n  huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;\n  working_state state;\n\n  /* Load up working state ... flush_bits needs it */\n  state.next_output_byte = cinfo->dest->next_output_byte;\n  state.free_in_buffer = cinfo->dest->free_in_buffer;\n  ASSIGN_STATE(state.cur, entropy->saved);\n  state.cinfo = cinfo;\n\n  /* Flush out the last data */\n  if (! flush_bits(&state))\n    ERREXIT(cinfo, JERR_CANT_SUSPEND);\n\n  /* Update state */\n  cinfo->dest->next_output_byte = state.next_output_byte;\n  cinfo->dest->free_in_buffer = state.free_in_buffer;\n  ASSIGN_STATE(entropy->saved, state.cur);\n}\n\n\n/*\n * Huffman coding optimization.\n *\n * We first scan the supplied data and count the number of uses of each symbol\n * that is to be Huffman-coded. (This process MUST agree with the code above.)\n * Then we build a Huffman coding tree for the observed counts.\n * Symbols which are not needed at all for the particular image are not\n * assigned any code, which saves space in the DHT marker as well as in\n * the compressed data.\n */\n\n#ifdef ENTROPY_OPT_SUPPORTED\n\n\n/* Process a single block's worth of coefficients */\n\nLOCAL(void)\nhtest_one_block (j_compress_ptr cinfo, JCOEFPTR block, int last_dc_val,\n\t\t long dc_counts[], long ac_counts[])\n{\n  register int temp;\n  register int nbits;\n  register int k, r;\n  \n  /* Encode the DC coefficient difference per section F.1.2.1 */\n  \n  temp = block[0] - last_dc_val;\n  if (temp < 0)\n    temp = -temp;\n  \n  /* Find the number of bits needed for the magnitude of the coefficient */\n  nbits = 0;\n  while (temp) {\n    nbits++;\n    temp >>= 1;\n  }\n  /* Check for out-of-range coefficient values.\n   * Since we're encoding a difference, the range limit is twice as much.\n   */\n  if (nbits > MAX_COEF_BITS+1)\n    ERREXIT(cinfo, JERR_BAD_DCT_COEF);\n\n  /* Count the Huffman symbol for the number of bits */\n  dc_counts[nbits]++;\n  \n  /* Encode the AC coefficients per section F.1.2.2 */\n  \n  r = 0;\t\t\t/* r = run length of zeros */\n  \n  for (k = 1; k < DCTSIZE2; k++) {\n    if ((temp = block[jpeg_natural_order[k]]) == 0) {\n      r++;\n    } else {\n      /* if run length > 15, must emit special run-length-16 codes (0xF0) */\n      while (r > 15) {\n\tac_counts[0xF0]++;\n\tr -= 16;\n      }\n      \n      /* Find the number of bits needed for the magnitude of the coefficient */\n      if (temp < 0)\n\ttemp = -temp;\n      \n      /* Find the number of bits needed for the magnitude of the coefficient */\n      nbits = 1;\t\t/* there must be at least one 1 bit */\n      while ((temp >>= 1))\n\tnbits++;\n      /* Check for out-of-range coefficient values */\n      if (nbits > MAX_COEF_BITS)\n\tERREXIT(cinfo, JERR_BAD_DCT_COEF);\n      \n      /* Count Huffman symbol for run length / number of bits */\n      ac_counts[(r << 4) + nbits]++;\n      \n      r = 0;\n    }\n  }\n\n  /* If the last coef(s) were zero, emit an end-of-block code */\n  if (r > 0)\n    ac_counts[0]++;\n}\n\n\n/*\n * Trial-encode one MCU's worth of Huffman-compressed coefficients.\n * No data is actually output, so no suspension return is possible.\n */\n\nMETHODDEF(boolean)\nencode_mcu_gather (j_compress_ptr cinfo, JBLOCKROW *MCU_data)\n{\n  huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;\n  int blkn, ci;\n  jpeg_component_info * compptr;\n\n  /* Take care of restart intervals if needed */\n  if (cinfo->restart_interval) {\n    if (entropy->restarts_to_go == 0) {\n      /* Re-initialize DC predictions to 0 */\n      for (ci = 0; ci < cinfo->comps_in_scan; ci++)\n\tentropy->saved.last_dc_val[ci] = 0;\n      /* Update restart state */\n      entropy->restarts_to_go = cinfo->restart_interval;\n    }\n    entropy->restarts_to_go--;\n  }\n\n  for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {\n    ci = cinfo->MCU_membership[blkn];\n    compptr = cinfo->cur_comp_info[ci];\n    htest_one_block(cinfo, MCU_data[blkn][0], entropy->saved.last_dc_val[ci],\n\t\t    entropy->dc_count_ptrs[compptr->dc_tbl_no],\n\t\t    entropy->ac_count_ptrs[compptr->ac_tbl_no]);\n    entropy->saved.last_dc_val[ci] = MCU_data[blkn][0][0];\n  }\n\n  return TRUE;\n}\n\n\n/*\n * Generate the best Huffman code table for the given counts, fill htbl.\n * Note this is also used by jcphuff.c.\n *\n * The JPEG standard requires that no symbol be assigned a codeword of all\n * one bits (so that padding bits added at the end of a compressed segment\n * can't look like a valid code).  Because of the canonical ordering of\n * codewords, this just means that there must be an unused slot in the\n * longest codeword length category.  Section K.2 of the JPEG spec suggests\n * reserving such a slot by pretending that symbol 256 is a valid symbol\n * with count 1.  In theory that's not optimal; giving it count zero but\n * including it in the symbol set anyway should give a better Huffman code.\n * But the theoretically better code actually seems to come out worse in\n * practice, because it produces more all-ones bytes (which incur stuffed\n * zero bytes in the final file).  In any case the difference is tiny.\n *\n * The JPEG standard requires Huffman codes to be no more than 16 bits long.\n * If some symbols have a very small but nonzero probability, the Huffman tree\n * must be adjusted to meet the code length restriction.  We currently use\n * the adjustment method suggested in JPEG section K.2.  This method is *not*\n * optimal; it may not choose the best possible limited-length code.  But\n * typically only very-low-frequency symbols will be given less-than-optimal\n * lengths, so the code is almost optimal.  Experimental comparisons against\n * an optimal limited-length-code algorithm indicate that the difference is\n * microscopic --- usually less than a hundredth of a percent of total size.\n * So the extra complexity of an optimal algorithm doesn't seem worthwhile.\n */\n\nGLOBAL(void)\njpeg_gen_optimal_table (j_compress_ptr cinfo, JHUFF_TBL * htbl, long freq[])\n{\n#define MAX_CLEN 32\t\t/* assumed maximum initial code length */\n  UINT8 bits[MAX_CLEN+1];\t/* bits[k] = # of symbols with code length k */\n  int codesize[257];\t\t/* codesize[k] = code length of symbol k */\n  int others[257];\t\t/* next symbol in current branch of tree */\n  int c1, c2;\n  int p, i, j;\n  long v;\n\n  /* This algorithm is explained in section K.2 of the JPEG standard */\n\n  MEMZERO(bits, SIZEOF(bits));\n  MEMZERO(codesize, SIZEOF(codesize));\n  for (i = 0; i < 257; i++)\n    others[i] = -1;\t\t/* init links to empty */\n  \n  freq[256] = 1;\t\t/* make sure 256 has a nonzero count */\n  /* Including the pseudo-symbol 256 in the Huffman procedure guarantees\n   * that no real symbol is given code-value of all ones, because 256\n   * will be placed last in the largest codeword category.\n   */\n\n  /* Huffman's basic algorithm to assign optimal code lengths to symbols */\n\n  for (;;) {\n    /* Find the smallest nonzero frequency, set c1 = its symbol */\n    /* In case of ties, take the larger symbol number */\n    c1 = -1;\n    v = 1000000000L;\n    for (i = 0; i <= 256; i++) {\n      if (freq[i] && freq[i] <= v) {\n\tv = freq[i];\n\tc1 = i;\n      }\n    }\n\n    /* Find the next smallest nonzero frequency, set c2 = its symbol */\n    /* In case of ties, take the larger symbol number */\n    c2 = -1;\n    v = 1000000000L;\n    for (i = 0; i <= 256; i++) {\n      if (freq[i] && freq[i] <= v && i != c1) {\n\tv = freq[i];\n\tc2 = i;\n      }\n    }\n\n    /* Done if we've merged everything into one frequency */\n    if (c2 < 0)\n      break;\n    \n    /* Else merge the two counts/trees */\n    freq[c1] += freq[c2];\n    freq[c2] = 0;\n\n    /* Increment the codesize of everything in c1's tree branch */\n    codesize[c1]++;\n    while (others[c1] >= 0) {\n      c1 = others[c1];\n      codesize[c1]++;\n    }\n    \n    others[c1] = c2;\t\t/* chain c2 onto c1's tree branch */\n    \n    /* Increment the codesize of everything in c2's tree branch */\n    codesize[c2]++;\n    while (others[c2] >= 0) {\n      c2 = others[c2];\n      codesize[c2]++;\n    }\n  }\n\n  /* Now count the number of symbols of each code length */\n  for (i = 0; i <= 256; i++) {\n    if (codesize[i]) {\n      /* The JPEG standard seems to think that this can't happen, */\n      /* but I'm paranoid... */\n      if (codesize[i] > MAX_CLEN)\n\tERREXIT(cinfo, JERR_HUFF_CLEN_OVERFLOW);\n\n      bits[codesize[i]]++;\n    }\n  }\n\n  /* JPEG doesn't allow symbols with code lengths over 16 bits, so if the pure\n   * Huffman procedure assigned any such lengths, we must adjust the coding.\n   * Here is what the JPEG spec says about how this next bit works:\n   * Since symbols are paired for the longest Huffman code, the symbols are\n   * removed from this length category two at a time.  The prefix for the pair\n   * (which is one bit shorter) is allocated to one of the pair; then,\n   * skipping the BITS entry for that prefix length, a code word from the next\n   * shortest nonzero BITS entry is converted into a prefix for two code words\n   * one bit longer.\n   */\n  \n  for (i = MAX_CLEN; i > 16; i--) {\n    while (bits[i] > 0) {\n      j = i - 2;\t\t/* find length of new prefix to be used */\n      while (bits[j] == 0)\n\tj--;\n      \n      bits[i] -= 2;\t\t/* remove two symbols */\n      bits[i-1]++;\t\t/* one goes in this length */\n      bits[j+1] += 2;\t\t/* two new symbols in this length */\n      bits[j]--;\t\t/* symbol of this length is now a prefix */\n    }\n  }\n\n  /* Remove the count for the pseudo-symbol 256 from the largest codelength */\n  while (bits[i] == 0)\t\t/* find largest codelength still in use */\n    i--;\n  bits[i]--;\n  \n  /* Return final symbol counts (only for lengths 0..16) */\n  MEMCOPY(htbl->bits, bits, SIZEOF(htbl->bits));\n  \n  /* Return a list of the symbols sorted by code length */\n  /* It's not real clear to me why we don't need to consider the codelength\n   * changes made above, but the JPEG spec seems to think this works.\n   */\n  p = 0;\n  for (i = 1; i <= MAX_CLEN; i++) {\n    for (j = 0; j <= 255; j++) {\n      if (codesize[j] == i) {\n\thtbl->huffval[p] = (UINT8) j;\n\tp++;\n      }\n    }\n  }\n\n  /* Set sent_table FALSE so updated table will be written to JPEG file. */\n  htbl->sent_table = FALSE;\n}\n\n\n/*\n * Finish up a statistics-gathering pass and create the new Huffman tables.\n */\n\nMETHODDEF(void)\nfinish_pass_gather (j_compress_ptr cinfo)\n{\n  huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;\n  int ci, dctbl, actbl;\n  jpeg_component_info * compptr;\n  JHUFF_TBL **htblptr;\n  boolean did_dc[NUM_HUFF_TBLS];\n  boolean did_ac[NUM_HUFF_TBLS];\n\n  /* It's important not to apply jpeg_gen_optimal_table more than once\n   * per table, because it clobbers the input frequency counts!\n   */\n  MEMZERO(did_dc, SIZEOF(did_dc));\n  MEMZERO(did_ac, SIZEOF(did_ac));\n\n  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {\n    compptr = cinfo->cur_comp_info[ci];\n    dctbl = compptr->dc_tbl_no;\n    actbl = compptr->ac_tbl_no;\n    if (! did_dc[dctbl]) {\n      htblptr = & cinfo->dc_huff_tbl_ptrs[dctbl];\n      if (*htblptr == NULL)\n\t*htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo);\n      jpeg_gen_optimal_table(cinfo, *htblptr, entropy->dc_count_ptrs[dctbl]);\n      did_dc[dctbl] = TRUE;\n    }\n    if (! did_ac[actbl]) {\n      htblptr = & cinfo->ac_huff_tbl_ptrs[actbl];\n      if (*htblptr == NULL)\n\t*htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo);\n      jpeg_gen_optimal_table(cinfo, *htblptr, entropy->ac_count_ptrs[actbl]);\n      did_ac[actbl] = TRUE;\n    }\n  }\n}\n\n\n#endif /* ENTROPY_OPT_SUPPORTED */\n\n\n/*\n * Module initialization routine for Huffman entropy encoding.\n */\n\nGLOBAL(void)\njinit_huff_encoder (j_compress_ptr cinfo)\n{\n  huff_entropy_ptr entropy;\n  int i;\n\n  entropy = (huff_entropy_ptr)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\tSIZEOF(huff_entropy_encoder));\n  cinfo->entropy = (struct jpeg_entropy_encoder *) entropy;\n  entropy->pub.start_pass = start_pass_huff;\n\n  /* Mark tables unallocated */\n  for (i = 0; i < NUM_HUFF_TBLS; i++) {\n    entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL;\n#ifdef ENTROPY_OPT_SUPPORTED\n    entropy->dc_count_ptrs[i] = entropy->ac_count_ptrs[i] = NULL;\n#endif\n  }\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jchuff.h",
    "content": "/*\n * jchuff.h\n *\n * Copyright (C) 1991-1997, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains declarations for Huffman entropy encoding routines\n * that are shared between the sequential encoder (jchuff.c) and the\n * progressive encoder (jcphuff.c).  No other modules need to see these.\n */\n\n/* The legal range of a DCT coefficient is\n *  -1024 .. +1023  for 8-bit data;\n * -16384 .. +16383 for 12-bit data.\n * Hence the magnitude should always fit in 10 or 14 bits respectively.\n */\n\n#if BITS_IN_JSAMPLE == 8\n#define MAX_COEF_BITS 10\n#else\n#define MAX_COEF_BITS 14\n#endif\n\n/* Derived data constructed for each Huffman table */\n\ntypedef struct {\n  unsigned int ehufco[256];\t/* code for each symbol */\n  char ehufsi[256];\t\t/* length of code for each symbol */\n  /* If no code has been allocated for a symbol S, ehufsi[S] contains 0 */\n} c_derived_tbl;\n\n/* Short forms of external names for systems with brain-damaged linkers. */\n\n#ifdef NEED_SHORT_EXTERNAL_NAMES\n#define jpeg_make_c_derived_tbl\tjMkCDerived\n#define jpeg_gen_optimal_table\tjGenOptTbl\n#endif /* NEED_SHORT_EXTERNAL_NAMES */\n\n/* Expand a Huffman table definition into the derived format */\nEXTERN(void) jpeg_make_c_derived_tbl\n\tJPP((j_compress_ptr cinfo, boolean isDC, int tblno,\n\t     c_derived_tbl ** pdtbl));\n\n/* Generate an optimal table definition given the specified counts */\nEXTERN(void) jpeg_gen_optimal_table\n\tJPP((j_compress_ptr cinfo, JHUFF_TBL * htbl, long freq[]));\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jcinit.c",
    "content": "/*\n * jcinit.c\n *\n * Copyright (C) 1991-1997, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains initialization logic for the JPEG compressor.\n * This routine is in charge of selecting the modules to be executed and\n * making an initialization call to each one.\n *\n * Logically, this code belongs in jcmaster.c.  It's split out because\n * linking this routine implies linking the entire compression library.\n * For a transcoding-only application, we want to be able to use jcmaster.c\n * without linking in the whole library.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n\n\n/*\n * Master selection of compression modules.\n * This is done once at the start of processing an image.  We determine\n * which modules will be used and give them appropriate initialization calls.\n */\n\nGLOBAL(void)\njinit_compress_master (j_compress_ptr cinfo)\n{\n  /* Initialize master control (includes parameter checking/processing) */\n  jinit_c_master_control(cinfo, FALSE /* full compression */);\n\n  /* Preprocessing */\n  if (! cinfo->raw_data_in) {\n    jinit_color_converter(cinfo);\n    jinit_downsampler(cinfo);\n    jinit_c_prep_controller(cinfo, FALSE /* never need full buffer here */);\n  }\n  /* Forward DCT */\n  jinit_forward_dct(cinfo);\n  /* Entropy encoding: either Huffman or arithmetic coding. */\n  if (cinfo->arith_code) {\n    ERREXIT(cinfo, JERR_ARITH_NOTIMPL);\n  } else {\n    if (cinfo->progressive_mode) {\n#ifdef C_PROGRESSIVE_SUPPORTED\n      jinit_phuff_encoder(cinfo);\n#else\n      ERREXIT(cinfo, JERR_NOT_COMPILED);\n#endif\n    } else\n      jinit_huff_encoder(cinfo);\n  }\n\n  /* Need a full-image coefficient buffer in any multi-pass mode. */\n  jinit_c_coef_controller(cinfo,\n\t\t(boolean) (cinfo->num_scans > 1 || cinfo->optimize_coding));\n  jinit_c_main_controller(cinfo, FALSE /* never need full buffer here */);\n\n  jinit_marker_writer(cinfo);\n\n  /* We can now tell the memory manager to allocate virtual arrays. */\n  (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo);\n\n  /* Write the datastream header (SOI) immediately.\n   * Frame and scan headers are postponed till later.\n   * This lets application insert special markers after the SOI.\n   */\n  (*cinfo->marker->write_file_header) (cinfo);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jcmainct.c",
    "content": "/*\n * jcmainct.c\n *\n * Copyright (C) 1994-1996, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains the main buffer controller for compression.\n * The main buffer lies between the pre-processor and the JPEG\n * compressor proper; it holds downsampled data in the JPEG colorspace.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n\n\n/* Note: currently, there is no operating mode in which a full-image buffer\n * is needed at this step.  If there were, that mode could not be used with\n * \"raw data\" input, since this module is bypassed in that case.  However,\n * we've left the code here for possible use in special applications.\n */\n#undef FULL_MAIN_BUFFER_SUPPORTED\n\n\n/* Private buffer controller object */\n\ntypedef struct {\n  struct jpeg_c_main_controller pub; /* public fields */\n\n  JDIMENSION cur_iMCU_row;\t/* number of current iMCU row */\n  JDIMENSION rowgroup_ctr;\t/* counts row groups received in iMCU row */\n  boolean suspended;\t\t/* remember if we suspended output */\n  J_BUF_MODE pass_mode;\t\t/* current operating mode */\n\n  /* If using just a strip buffer, this points to the entire set of buffers\n   * (we allocate one for each component).  In the full-image case, this\n   * points to the currently accessible strips of the virtual arrays.\n   */\n  JSAMPARRAY buffer[MAX_COMPONENTS];\n\n#ifdef FULL_MAIN_BUFFER_SUPPORTED\n  /* If using full-image storage, this array holds pointers to virtual-array\n   * control blocks for each component.  Unused if not full-image storage.\n   */\n  jvirt_sarray_ptr whole_image[MAX_COMPONENTS];\n#endif\n} my_main_controller;\n\ntypedef my_main_controller * my_main_ptr;\n\n\n/* Forward declarations */\nMETHODDEF(void) process_data_simple_main\n\tJPP((j_compress_ptr cinfo, JSAMPARRAY input_buf,\n\t     JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail));\n#ifdef FULL_MAIN_BUFFER_SUPPORTED\nMETHODDEF(void) process_data_buffer_main\n\tJPP((j_compress_ptr cinfo, JSAMPARRAY input_buf,\n\t     JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail));\n#endif\n\n\n/*\n * Initialize for a processing pass.\n */\n\nMETHODDEF(void)\nstart_pass_main (j_compress_ptr cinfo, J_BUF_MODE pass_mode)\n{\n  my_main_ptr main = (my_main_ptr) cinfo->main;\n\n  /* Do nothing in raw-data mode. */\n  if (cinfo->raw_data_in)\n    return;\n\n  main->cur_iMCU_row = 0;\t/* initialize counters */\n  main->rowgroup_ctr = 0;\n  main->suspended = FALSE;\n  main->pass_mode = pass_mode;\t/* save mode for use by process_data */\n\n  switch (pass_mode) {\n  case JBUF_PASS_THRU:\n#ifdef FULL_MAIN_BUFFER_SUPPORTED\n    if (main->whole_image[0] != NULL)\n      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);\n#endif\n    main->pub.process_data = process_data_simple_main;\n    break;\n#ifdef FULL_MAIN_BUFFER_SUPPORTED\n  case JBUF_SAVE_SOURCE:\n  case JBUF_CRANK_DEST:\n  case JBUF_SAVE_AND_PASS:\n    if (main->whole_image[0] == NULL)\n      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);\n    main->pub.process_data = process_data_buffer_main;\n    break;\n#endif\n  default:\n    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);\n    break;\n  }\n}\n\n\n/*\n * Process some data.\n * This routine handles the simple pass-through mode,\n * where we have only a strip buffer.\n */\n\nMETHODDEF(void)\nprocess_data_simple_main (j_compress_ptr cinfo,\n\t\t\t  JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,\n\t\t\t  JDIMENSION in_rows_avail)\n{\n  my_main_ptr main = (my_main_ptr) cinfo->main;\n\n  while (main->cur_iMCU_row < cinfo->total_iMCU_rows) {\n    /* Read input data if we haven't filled the main buffer yet */\n    if (main->rowgroup_ctr < DCTSIZE)\n      (*cinfo->prep->pre_process_data) (cinfo,\n\t\t\t\t\tinput_buf, in_row_ctr, in_rows_avail,\n\t\t\t\t\tmain->buffer, &main->rowgroup_ctr,\n\t\t\t\t\t(JDIMENSION) DCTSIZE);\n\n    /* If we don't have a full iMCU row buffered, return to application for\n     * more data.  Note that preprocessor will always pad to fill the iMCU row\n     * at the bottom of the image.\n     */\n    if (main->rowgroup_ctr != DCTSIZE)\n      return;\n\n    /* Send the completed row to the compressor */\n    if (! (*cinfo->coef->compress_data) (cinfo, main->buffer)) {\n      /* If compressor did not consume the whole row, then we must need to\n       * suspend processing and return to the application.  In this situation\n       * we pretend we didn't yet consume the last input row; otherwise, if\n       * it happened to be the last row of the image, the application would\n       * think we were done.\n       */\n      if (! main->suspended) {\n\t(*in_row_ctr)--;\n\tmain->suspended = TRUE;\n      }\n      return;\n    }\n    /* We did finish the row.  Undo our little suspension hack if a previous\n     * call suspended; then mark the main buffer empty.\n     */\n    if (main->suspended) {\n      (*in_row_ctr)++;\n      main->suspended = FALSE;\n    }\n    main->rowgroup_ctr = 0;\n    main->cur_iMCU_row++;\n  }\n}\n\n\n#ifdef FULL_MAIN_BUFFER_SUPPORTED\n\n/*\n * Process some data.\n * This routine handles all of the modes that use a full-size buffer.\n */\n\nMETHODDEF(void)\nprocess_data_buffer_main (j_compress_ptr cinfo,\n\t\t\t  JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,\n\t\t\t  JDIMENSION in_rows_avail)\n{\n  my_main_ptr main = (my_main_ptr) cinfo->main;\n  int ci;\n  jpeg_component_info *compptr;\n  boolean writing = (main->pass_mode != JBUF_CRANK_DEST);\n\n  while (main->cur_iMCU_row < cinfo->total_iMCU_rows) {\n    /* Realign the virtual buffers if at the start of an iMCU row. */\n    if (main->rowgroup_ctr == 0) {\n      for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n\t   ci++, compptr++) {\n\tmain->buffer[ci] = (*cinfo->mem->access_virt_sarray)\n\t  ((j_common_ptr) cinfo, main->whole_image[ci],\n\t   main->cur_iMCU_row * (compptr->v_samp_factor * DCTSIZE),\n\t   (JDIMENSION) (compptr->v_samp_factor * DCTSIZE), writing);\n      }\n      /* In a read pass, pretend we just read some source data. */\n      if (! writing) {\n\t*in_row_ctr += cinfo->max_v_samp_factor * DCTSIZE;\n\tmain->rowgroup_ctr = DCTSIZE;\n      }\n    }\n\n    /* If a write pass, read input data until the current iMCU row is full. */\n    /* Note: preprocessor will pad if necessary to fill the last iMCU row. */\n    if (writing) {\n      (*cinfo->prep->pre_process_data) (cinfo,\n\t\t\t\t\tinput_buf, in_row_ctr, in_rows_avail,\n\t\t\t\t\tmain->buffer, &main->rowgroup_ctr,\n\t\t\t\t\t(JDIMENSION) DCTSIZE);\n      /* Return to application if we need more data to fill the iMCU row. */\n      if (main->rowgroup_ctr < DCTSIZE)\n\treturn;\n    }\n\n    /* Emit data, unless this is a sink-only pass. */\n    if (main->pass_mode != JBUF_SAVE_SOURCE) {\n      if (! (*cinfo->coef->compress_data) (cinfo, main->buffer)) {\n\t/* If compressor did not consume the whole row, then we must need to\n\t * suspend processing and return to the application.  In this situation\n\t * we pretend we didn't yet consume the last input row; otherwise, if\n\t * it happened to be the last row of the image, the application would\n\t * think we were done.\n\t */\n\tif (! main->suspended) {\n\t  (*in_row_ctr)--;\n\t  main->suspended = TRUE;\n\t}\n\treturn;\n      }\n      /* We did finish the row.  Undo our little suspension hack if a previous\n       * call suspended; then mark the main buffer empty.\n       */\n      if (main->suspended) {\n\t(*in_row_ctr)++;\n\tmain->suspended = FALSE;\n      }\n    }\n\n    /* If get here, we are done with this iMCU row.  Mark buffer empty. */\n    main->rowgroup_ctr = 0;\n    main->cur_iMCU_row++;\n  }\n}\n\n#endif /* FULL_MAIN_BUFFER_SUPPORTED */\n\n\n/*\n * Initialize main buffer controller.\n */\n\nGLOBAL(void)\njinit_c_main_controller (j_compress_ptr cinfo, boolean need_full_buffer)\n{\n  my_main_ptr main;\n  int ci;\n  jpeg_component_info *compptr;\n\n  main = (my_main_ptr)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\tSIZEOF(my_main_controller));\n  cinfo->main = (struct jpeg_c_main_controller *) main;\n  main->pub.start_pass = start_pass_main;\n\n  /* We don't need to create a buffer in raw-data mode. */\n  if (cinfo->raw_data_in)\n    return;\n\n  /* Create the buffer.  It holds downsampled data, so each component\n   * may be of a different size.\n   */\n  if (need_full_buffer) {\n#ifdef FULL_MAIN_BUFFER_SUPPORTED\n    /* Allocate a full-image virtual array for each component */\n    /* Note we pad the bottom to a multiple of the iMCU height */\n    for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n\t ci++, compptr++) {\n      main->whole_image[ci] = (*cinfo->mem->request_virt_sarray)\n\t((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE,\n\t compptr->width_in_blocks * DCTSIZE,\n\t (JDIMENSION) jround_up((long) compptr->height_in_blocks,\n\t\t\t\t(long) compptr->v_samp_factor) * DCTSIZE,\n\t (JDIMENSION) (compptr->v_samp_factor * DCTSIZE));\n    }\n#else\n    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);\n#endif\n  } else {\n#ifdef FULL_MAIN_BUFFER_SUPPORTED\n    main->whole_image[0] = NULL; /* flag for no virtual arrays */\n#endif\n    /* Allocate a strip buffer for each component */\n    for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n\t ci++, compptr++) {\n      main->buffer[ci] = (*cinfo->mem->alloc_sarray)\n\t((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t compptr->width_in_blocks * DCTSIZE,\n\t (JDIMENSION) (compptr->v_samp_factor * DCTSIZE));\n    }\n  }\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jcmarker.c",
    "content": "/*\n * jcmarker.c\n *\n * Copyright (C) 1991-1998, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains routines to write JPEG datastream markers.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n\n\ntypedef enum {\t\t\t/* JPEG marker codes */\n  M_SOF0  = 0xc0,\n  M_SOF1  = 0xc1,\n  M_SOF2  = 0xc2,\n  M_SOF3  = 0xc3,\n  \n  M_SOF5  = 0xc5,\n  M_SOF6  = 0xc6,\n  M_SOF7  = 0xc7,\n  \n  M_JPG   = 0xc8,\n  M_SOF9  = 0xc9,\n  M_SOF10 = 0xca,\n  M_SOF11 = 0xcb,\n  \n  M_SOF13 = 0xcd,\n  M_SOF14 = 0xce,\n  M_SOF15 = 0xcf,\n  \n  M_DHT   = 0xc4,\n  \n  M_DAC   = 0xcc,\n  \n  M_RST0  = 0xd0,\n  M_RST1  = 0xd1,\n  M_RST2  = 0xd2,\n  M_RST3  = 0xd3,\n  M_RST4  = 0xd4,\n  M_RST5  = 0xd5,\n  M_RST6  = 0xd6,\n  M_RST7  = 0xd7,\n  \n  M_SOI   = 0xd8,\n  M_EOI   = 0xd9,\n  M_SOS   = 0xda,\n  M_DQT   = 0xdb,\n  M_DNL   = 0xdc,\n  M_DRI   = 0xdd,\n  M_DHP   = 0xde,\n  M_EXP   = 0xdf,\n  \n  M_APP0  = 0xe0,\n  M_APP1  = 0xe1,\n  M_APP2  = 0xe2,\n  M_APP3  = 0xe3,\n  M_APP4  = 0xe4,\n  M_APP5  = 0xe5,\n  M_APP6  = 0xe6,\n  M_APP7  = 0xe7,\n  M_APP8  = 0xe8,\n  M_APP9  = 0xe9,\n  M_APP10 = 0xea,\n  M_APP11 = 0xeb,\n  M_APP12 = 0xec,\n  M_APP13 = 0xed,\n  M_APP14 = 0xee,\n  M_APP15 = 0xef,\n  \n  M_JPG0  = 0xf0,\n  M_JPG13 = 0xfd,\n  M_COM   = 0xfe,\n  \n  M_TEM   = 0x01,\n  \n  M_ERROR = 0x100\n} JPEG_MARKER;\n\n\n/* Private state */\n\ntypedef struct {\n  struct jpeg_marker_writer pub; /* public fields */\n\n  unsigned int last_restart_interval; /* last DRI value emitted; 0 after SOI */\n} my_marker_writer;\n\ntypedef my_marker_writer * my_marker_ptr;\n\n\n/*\n * Basic output routines.\n *\n * Note that we do not support suspension while writing a marker.\n * Therefore, an application using suspension must ensure that there is\n * enough buffer space for the initial markers (typ. 600-700 bytes) before\n * calling jpeg_start_compress, and enough space to write the trailing EOI\n * (a few bytes) before calling jpeg_finish_compress.  Multipass compression\n * modes are not supported at all with suspension, so those two are the only\n * points where markers will be written.\n */\n\nLOCAL(void)\nemit_byte (j_compress_ptr cinfo, int val)\n/* Emit a byte */\n{\n  struct jpeg_destination_mgr * dest = cinfo->dest;\n\n  *(dest->next_output_byte)++ = (JOCTET) val;\n  if (--dest->free_in_buffer == 0) {\n    if (! (*dest->empty_output_buffer) (cinfo))\n      ERREXIT(cinfo, JERR_CANT_SUSPEND);\n  }\n}\n\n\nLOCAL(void)\nemit_marker (j_compress_ptr cinfo, JPEG_MARKER mark)\n/* Emit a marker code */\n{\n  emit_byte(cinfo, 0xFF);\n  emit_byte(cinfo, (int) mark);\n}\n\n\nLOCAL(void)\nemit_2bytes (j_compress_ptr cinfo, int value)\n/* Emit a 2-byte integer; these are always MSB first in JPEG files */\n{\n  emit_byte(cinfo, (value >> 8) & 0xFF);\n  emit_byte(cinfo, value & 0xFF);\n}\n\n\n/*\n * Routines to write specific marker types.\n */\n\nLOCAL(int)\nemit_dqt (j_compress_ptr cinfo, int index)\n/* Emit a DQT marker */\n/* Returns the precision used (0 = 8bits, 1 = 16bits) for baseline checking */\n{\n  JQUANT_TBL * qtbl = cinfo->quant_tbl_ptrs[index];\n  int prec;\n  int i;\n\n  if (qtbl == NULL)\n    ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, index);\n\n  prec = 0;\n  for (i = 0; i < DCTSIZE2; i++) {\n    if (qtbl->quantval[i] > 255)\n      prec = 1;\n  }\n\n  if (! qtbl->sent_table) {\n    emit_marker(cinfo, M_DQT);\n\n    emit_2bytes(cinfo, prec ? DCTSIZE2*2 + 1 + 2 : DCTSIZE2 + 1 + 2);\n\n    emit_byte(cinfo, index + (prec<<4));\n\n    for (i = 0; i < DCTSIZE2; i++) {\n      /* The table entries must be emitted in zigzag order. */\n      unsigned int qval = qtbl->quantval[jpeg_natural_order[i]];\n      if (prec)\n\temit_byte(cinfo, (int) (qval >> 8));\n      emit_byte(cinfo, (int) (qval & 0xFF));\n    }\n\n    qtbl->sent_table = TRUE;\n  }\n\n  return prec;\n}\n\n\nLOCAL(void)\nemit_dht (j_compress_ptr cinfo, int index, boolean is_ac)\n/* Emit a DHT marker */\n{\n  JHUFF_TBL * htbl;\n  int length, i;\n  \n  if (is_ac) {\n    htbl = cinfo->ac_huff_tbl_ptrs[index];\n    index += 0x10;\t\t/* output index has AC bit set */\n  } else {\n    htbl = cinfo->dc_huff_tbl_ptrs[index];\n  }\n\n  if (htbl == NULL)\n    ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, index);\n  \n  if (! htbl->sent_table) {\n    emit_marker(cinfo, M_DHT);\n    \n    length = 0;\n    for (i = 1; i <= 16; i++)\n      length += htbl->bits[i];\n    \n    emit_2bytes(cinfo, length + 2 + 1 + 16);\n    emit_byte(cinfo, index);\n    \n    for (i = 1; i <= 16; i++)\n      emit_byte(cinfo, htbl->bits[i]);\n    \n    for (i = 0; i < length; i++)\n      emit_byte(cinfo, htbl->huffval[i]);\n    \n    htbl->sent_table = TRUE;\n  }\n}\n\n\nLOCAL(void)\nemit_dac (j_compress_ptr cinfo)\n/* Emit a DAC marker */\n/* Since the useful info is so small, we want to emit all the tables in */\n/* one DAC marker.  Therefore this routine does its own scan of the table. */\n{\n#ifdef C_ARITH_CODING_SUPPORTED\n  char dc_in_use[NUM_ARITH_TBLS];\n  char ac_in_use[NUM_ARITH_TBLS];\n  int length, i;\n  jpeg_component_info *compptr;\n  \n  for (i = 0; i < NUM_ARITH_TBLS; i++)\n    dc_in_use[i] = ac_in_use[i] = 0;\n  \n  for (i = 0; i < cinfo->comps_in_scan; i++) {\n    compptr = cinfo->cur_comp_info[i];\n    dc_in_use[compptr->dc_tbl_no] = 1;\n    ac_in_use[compptr->ac_tbl_no] = 1;\n  }\n  \n  length = 0;\n  for (i = 0; i < NUM_ARITH_TBLS; i++)\n    length += dc_in_use[i] + ac_in_use[i];\n  \n  emit_marker(cinfo, M_DAC);\n  \n  emit_2bytes(cinfo, length*2 + 2);\n  \n  for (i = 0; i < NUM_ARITH_TBLS; i++) {\n    if (dc_in_use[i]) {\n      emit_byte(cinfo, i);\n      emit_byte(cinfo, cinfo->arith_dc_L[i] + (cinfo->arith_dc_U[i]<<4));\n    }\n    if (ac_in_use[i]) {\n      emit_byte(cinfo, i + 0x10);\n      emit_byte(cinfo, cinfo->arith_ac_K[i]);\n    }\n  }\n#endif /* C_ARITH_CODING_SUPPORTED */\n}\n\n\nLOCAL(void)\nemit_dri (j_compress_ptr cinfo)\n/* Emit a DRI marker */\n{\n  emit_marker(cinfo, M_DRI);\n  \n  emit_2bytes(cinfo, 4);\t/* fixed length */\n\n  emit_2bytes(cinfo, (int) cinfo->restart_interval);\n}\n\n\nLOCAL(void)\nemit_sof (j_compress_ptr cinfo, JPEG_MARKER code)\n/* Emit a SOF marker */\n{\n  int ci;\n  jpeg_component_info *compptr;\n  \n  emit_marker(cinfo, code);\n  \n  emit_2bytes(cinfo, 3 * cinfo->num_components + 2 + 5 + 1); /* length */\n\n  /* Make sure image isn't bigger than SOF field can handle */\n  if ((long) cinfo->image_height > 65535L ||\n      (long) cinfo->image_width > 65535L)\n    ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) 65535);\n\n  emit_byte(cinfo, cinfo->data_precision);\n  emit_2bytes(cinfo, (int) cinfo->image_height);\n  emit_2bytes(cinfo, (int) cinfo->image_width);\n\n  emit_byte(cinfo, cinfo->num_components);\n\n  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n       ci++, compptr++) {\n    emit_byte(cinfo, compptr->component_id);\n    emit_byte(cinfo, (compptr->h_samp_factor << 4) + compptr->v_samp_factor);\n    emit_byte(cinfo, compptr->quant_tbl_no);\n  }\n}\n\n\nLOCAL(void)\nemit_sos (j_compress_ptr cinfo)\n/* Emit a SOS marker */\n{\n  int i, td, ta;\n  jpeg_component_info *compptr;\n  \n  emit_marker(cinfo, M_SOS);\n  \n  emit_2bytes(cinfo, 2 * cinfo->comps_in_scan + 2 + 1 + 3); /* length */\n  \n  emit_byte(cinfo, cinfo->comps_in_scan);\n  \n  for (i = 0; i < cinfo->comps_in_scan; i++) {\n    compptr = cinfo->cur_comp_info[i];\n    emit_byte(cinfo, compptr->component_id);\n    td = compptr->dc_tbl_no;\n    ta = compptr->ac_tbl_no;\n    if (cinfo->progressive_mode) {\n      /* Progressive mode: only DC or only AC tables are used in one scan;\n       * furthermore, Huffman coding of DC refinement uses no table at all.\n       * We emit 0 for unused field(s); this is recommended by the P&M text\n       * but does not seem to be specified in the standard.\n       */\n      if (cinfo->Ss == 0) {\n\tta = 0;\t\t\t/* DC scan */\n\tif (cinfo->Ah != 0 && !cinfo->arith_code)\n\t  td = 0;\t\t/* no DC table either */\n      } else {\n\ttd = 0;\t\t\t/* AC scan */\n      }\n    }\n    emit_byte(cinfo, (td << 4) + ta);\n  }\n\n  emit_byte(cinfo, cinfo->Ss);\n  emit_byte(cinfo, cinfo->Se);\n  emit_byte(cinfo, (cinfo->Ah << 4) + cinfo->Al);\n}\n\n\nLOCAL(void)\nemit_jfif_app0 (j_compress_ptr cinfo)\n/* Emit a JFIF-compliant APP0 marker */\n{\n  /*\n   * Length of APP0 block\t(2 bytes)\n   * Block ID\t\t\t(4 bytes - ASCII \"JFIF\")\n   * Zero byte\t\t\t(1 byte to terminate the ID string)\n   * Version Major, Minor\t(2 bytes - major first)\n   * Units\t\t\t(1 byte - 0x00 = none, 0x01 = inch, 0x02 = cm)\n   * Xdpu\t\t\t(2 bytes - dots per unit horizontal)\n   * Ydpu\t\t\t(2 bytes - dots per unit vertical)\n   * Thumbnail X size\t\t(1 byte)\n   * Thumbnail Y size\t\t(1 byte)\n   */\n  \n  emit_marker(cinfo, M_APP0);\n  \n  emit_2bytes(cinfo, 2 + 4 + 1 + 2 + 1 + 2 + 2 + 1 + 1); /* length */\n\n  emit_byte(cinfo, 0x4A);\t/* Identifier: ASCII \"JFIF\" */\n  emit_byte(cinfo, 0x46);\n  emit_byte(cinfo, 0x49);\n  emit_byte(cinfo, 0x46);\n  emit_byte(cinfo, 0);\n  emit_byte(cinfo, cinfo->JFIF_major_version); /* Version fields */\n  emit_byte(cinfo, cinfo->JFIF_minor_version);\n  emit_byte(cinfo, cinfo->density_unit); /* Pixel size information */\n  emit_2bytes(cinfo, (int) cinfo->X_density);\n  emit_2bytes(cinfo, (int) cinfo->Y_density);\n  emit_byte(cinfo, 0);\t\t/* No thumbnail image */\n  emit_byte(cinfo, 0);\n}\n\n\nLOCAL(void)\nemit_adobe_app14 (j_compress_ptr cinfo)\n/* Emit an Adobe APP14 marker */\n{\n  /*\n   * Length of APP14 block\t(2 bytes)\n   * Block ID\t\t\t(5 bytes - ASCII \"Adobe\")\n   * Version Number\t\t(2 bytes - currently 100)\n   * Flags0\t\t\t(2 bytes - currently 0)\n   * Flags1\t\t\t(2 bytes - currently 0)\n   * Color transform\t\t(1 byte)\n   *\n   * Although Adobe TN 5116 mentions Version = 101, all the Adobe files\n   * now in circulation seem to use Version = 100, so that's what we write.\n   *\n   * We write the color transform byte as 1 if the JPEG color space is\n   * YCbCr, 2 if it's YCCK, 0 otherwise.  Adobe's definition has to do with\n   * whether the encoder performed a transformation, which is pretty useless.\n   */\n  \n  emit_marker(cinfo, M_APP14);\n  \n  emit_2bytes(cinfo, 2 + 5 + 2 + 2 + 2 + 1); /* length */\n\n  emit_byte(cinfo, 0x41);\t/* Identifier: ASCII \"Adobe\" */\n  emit_byte(cinfo, 0x64);\n  emit_byte(cinfo, 0x6F);\n  emit_byte(cinfo, 0x62);\n  emit_byte(cinfo, 0x65);\n  emit_2bytes(cinfo, 100);\t/* Version */\n  emit_2bytes(cinfo, 0);\t/* Flags0 */\n  emit_2bytes(cinfo, 0);\t/* Flags1 */\n  switch (cinfo->jpeg_color_space) {\n  case JCS_YCbCr:\n    emit_byte(cinfo, 1);\t/* Color transform = 1 */\n    break;\n  case JCS_YCCK:\n    emit_byte(cinfo, 2);\t/* Color transform = 2 */\n    break;\n  default:\n    emit_byte(cinfo, 0);\t/* Color transform = 0 */\n    break;\n  }\n}\n\n\n/*\n * These routines allow writing an arbitrary marker with parameters.\n * The only intended use is to emit COM or APPn markers after calling\n * write_file_header and before calling write_frame_header.\n * Other uses are not guaranteed to produce desirable results.\n * Counting the parameter bytes properly is the caller's responsibility.\n */\n\nMETHODDEF(void)\nwrite_marker_header (j_compress_ptr cinfo, int marker, unsigned int datalen)\n/* Emit an arbitrary marker header */\n{\n  if (datalen > (unsigned int) 65533)\t\t/* safety check */\n    ERREXIT(cinfo, JERR_BAD_LENGTH);\n\n  emit_marker(cinfo, (JPEG_MARKER) marker);\n\n  emit_2bytes(cinfo, (int) (datalen + 2));\t/* total length */\n}\n\nMETHODDEF(void)\nwrite_marker_byte (j_compress_ptr cinfo, int val)\n/* Emit one byte of marker parameters following write_marker_header */\n{\n  emit_byte(cinfo, val);\n}\n\n\n/*\n * Write datastream header.\n * This consists of an SOI and optional APPn markers.\n * We recommend use of the JFIF marker, but not the Adobe marker,\n * when using YCbCr or grayscale data.  The JFIF marker should NOT\n * be used for any other JPEG colorspace.  The Adobe marker is helpful\n * to distinguish RGB, CMYK, and YCCK colorspaces.\n * Note that an application can write additional header markers after\n * jpeg_start_compress returns.\n */\n\nMETHODDEF(void)\nwrite_file_header (j_compress_ptr cinfo)\n{\n  my_marker_ptr marker = (my_marker_ptr) cinfo->marker;\n\n  emit_marker(cinfo, M_SOI);\t/* first the SOI */\n\n  /* SOI is defined to reset restart interval to 0 */\n  marker->last_restart_interval = 0;\n\n  if (cinfo->write_JFIF_header)\t/* next an optional JFIF APP0 */\n    emit_jfif_app0(cinfo);\n  if (cinfo->write_Adobe_marker) /* next an optional Adobe APP14 */\n    emit_adobe_app14(cinfo);\n}\n\n\n/*\n * Write frame header.\n * This consists of DQT and SOFn markers.\n * Note that we do not emit the SOF until we have emitted the DQT(s).\n * This avoids compatibility problems with incorrect implementations that\n * try to error-check the quant table numbers as soon as they see the SOF.\n */\n\nMETHODDEF(void)\nwrite_frame_header (j_compress_ptr cinfo)\n{\n  int ci, prec;\n  boolean is_baseline;\n  jpeg_component_info *compptr;\n  \n  /* Emit DQT for each quantization table.\n   * Note that emit_dqt() suppresses any duplicate tables.\n   */\n  prec = 0;\n  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n       ci++, compptr++) {\n    prec += emit_dqt(cinfo, compptr->quant_tbl_no);\n  }\n  /* now prec is nonzero iff there are any 16-bit quant tables. */\n\n  /* Check for a non-baseline specification.\n   * Note we assume that Huffman table numbers won't be changed later.\n   */\n  if (cinfo->arith_code || cinfo->progressive_mode ||\n      cinfo->data_precision != 8) {\n    is_baseline = FALSE;\n  } else {\n    is_baseline = TRUE;\n    for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n\t ci++, compptr++) {\n      if (compptr->dc_tbl_no > 1 || compptr->ac_tbl_no > 1)\n\tis_baseline = FALSE;\n    }\n    if (prec && is_baseline) {\n      is_baseline = FALSE;\n      /* If it's baseline except for quantizer size, warn the user */\n      TRACEMS(cinfo, 0, JTRC_16BIT_TABLES);\n    }\n  }\n\n  /* Emit the proper SOF marker */\n  if (cinfo->arith_code) {\n    emit_sof(cinfo, M_SOF9);\t/* SOF code for arithmetic coding */\n  } else {\n    if (cinfo->progressive_mode)\n      emit_sof(cinfo, M_SOF2);\t/* SOF code for progressive Huffman */\n    else if (is_baseline)\n      emit_sof(cinfo, M_SOF0);\t/* SOF code for baseline implementation */\n    else\n      emit_sof(cinfo, M_SOF1);\t/* SOF code for non-baseline Huffman file */\n  }\n}\n\n\n/*\n * Write scan header.\n * This consists of DHT or DAC markers, optional DRI, and SOS.\n * Compressed data will be written following the SOS.\n */\n\nMETHODDEF(void)\nwrite_scan_header (j_compress_ptr cinfo)\n{\n  my_marker_ptr marker = (my_marker_ptr) cinfo->marker;\n  int i;\n  jpeg_component_info *compptr;\n\n  if (cinfo->arith_code) {\n    /* Emit arith conditioning info.  We may have some duplication\n     * if the file has multiple scans, but it's so small it's hardly\n     * worth worrying about.\n     */\n    emit_dac(cinfo);\n  } else {\n    /* Emit Huffman tables.\n     * Note that emit_dht() suppresses any duplicate tables.\n     */\n    for (i = 0; i < cinfo->comps_in_scan; i++) {\n      compptr = cinfo->cur_comp_info[i];\n      if (cinfo->progressive_mode) {\n\t/* Progressive mode: only DC or only AC tables are used in one scan */\n\tif (cinfo->Ss == 0) {\n\t  if (cinfo->Ah == 0)\t/* DC needs no table for refinement scan */\n\t    emit_dht(cinfo, compptr->dc_tbl_no, FALSE);\n\t} else {\n\t  emit_dht(cinfo, compptr->ac_tbl_no, TRUE);\n\t}\n      } else {\n\t/* Sequential mode: need both DC and AC tables */\n\temit_dht(cinfo, compptr->dc_tbl_no, FALSE);\n\temit_dht(cinfo, compptr->ac_tbl_no, TRUE);\n      }\n    }\n  }\n\n  /* Emit DRI if required --- note that DRI value could change for each scan.\n   * We avoid wasting space with unnecessary DRIs, however.\n   */\n  if (cinfo->restart_interval != marker->last_restart_interval) {\n    emit_dri(cinfo);\n    marker->last_restart_interval = cinfo->restart_interval;\n  }\n\n  emit_sos(cinfo);\n}\n\n\n/*\n * Write datastream trailer.\n */\n\nMETHODDEF(void)\nwrite_file_trailer (j_compress_ptr cinfo)\n{\n  emit_marker(cinfo, M_EOI);\n}\n\n\n/*\n * Write an abbreviated table-specification datastream.\n * This consists of SOI, DQT and DHT tables, and EOI.\n * Any table that is defined and not marked sent_table = TRUE will be\n * emitted.  Note that all tables will be marked sent_table = TRUE at exit.\n */\n\nMETHODDEF(void)\nwrite_tables_only (j_compress_ptr cinfo)\n{\n  int i;\n\n  emit_marker(cinfo, M_SOI);\n\n  for (i = 0; i < NUM_QUANT_TBLS; i++) {\n    if (cinfo->quant_tbl_ptrs[i] != NULL)\n      (void) emit_dqt(cinfo, i);\n  }\n\n  if (! cinfo->arith_code) {\n    for (i = 0; i < NUM_HUFF_TBLS; i++) {\n      if (cinfo->dc_huff_tbl_ptrs[i] != NULL)\n\temit_dht(cinfo, i, FALSE);\n      if (cinfo->ac_huff_tbl_ptrs[i] != NULL)\n\temit_dht(cinfo, i, TRUE);\n    }\n  }\n\n  emit_marker(cinfo, M_EOI);\n}\n\n\n/*\n * Initialize the marker writer module.\n */\n\nGLOBAL(void)\njinit_marker_writer (j_compress_ptr cinfo)\n{\n  my_marker_ptr marker;\n\n  /* Create the subobject */\n  marker = (my_marker_ptr)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\tSIZEOF(my_marker_writer));\n  cinfo->marker = (struct jpeg_marker_writer *) marker;\n  /* Initialize method pointers */\n  marker->pub.write_file_header = write_file_header;\n  marker->pub.write_frame_header = write_frame_header;\n  marker->pub.write_scan_header = write_scan_header;\n  marker->pub.write_file_trailer = write_file_trailer;\n  marker->pub.write_tables_only = write_tables_only;\n  marker->pub.write_marker_header = write_marker_header;\n  marker->pub.write_marker_byte = write_marker_byte;\n  /* Initialize private state */\n  marker->last_restart_interval = 0;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jcmaster.c",
    "content": "/*\n * jcmaster.c\n *\n * Copyright (C) 1991-1997, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains master control logic for the JPEG compressor.\n * These routines are concerned with parameter validation, initial setup,\n * and inter-pass control (determining the number of passes and the work \n * to be done in each pass).\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n\n\n/* Private state */\n\ntypedef enum {\n\tmain_pass,\t\t/* input data, also do first output step */\n\thuff_opt_pass,\t\t/* Huffman code optimization pass */\n\toutput_pass\t\t/* data output pass */\n} c_pass_type;\n\ntypedef struct {\n  struct jpeg_comp_master pub;\t/* public fields */\n\n  c_pass_type pass_type;\t/* the type of the current pass */\n\n  int pass_number;\t\t/* # of passes completed */\n  int total_passes;\t\t/* total # of passes needed */\n\n  int scan_number;\t\t/* current index in scan_info[] */\n} my_comp_master;\n\ntypedef my_comp_master * my_master_ptr;\n\n\n/*\n * Support routines that do various essential calculations.\n */\n\nLOCAL(void)\ninitial_setup (j_compress_ptr cinfo)\n/* Do computations that are needed before master selection phase */\n{\n  int ci;\n  jpeg_component_info *compptr;\n  long samplesperrow;\n  JDIMENSION jd_samplesperrow;\n\n  /* Sanity check on image dimensions */\n  if (cinfo->image_height <= 0 || cinfo->image_width <= 0\n      || cinfo->num_components <= 0 || cinfo->input_components <= 0)\n    ERREXIT(cinfo, JERR_EMPTY_IMAGE);\n\n  /* Make sure image isn't bigger than I can handle */\n  if ((long) cinfo->image_height > (long) JPEG_MAX_DIMENSION ||\n      (long) cinfo->image_width > (long) JPEG_MAX_DIMENSION)\n    ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) JPEG_MAX_DIMENSION);\n\n  /* Width of an input scanline must be representable as JDIMENSION. */\n  samplesperrow = (long) cinfo->image_width * (long) cinfo->input_components;\n  jd_samplesperrow = (JDIMENSION) samplesperrow;\n  if ((long) jd_samplesperrow != samplesperrow)\n    ERREXIT(cinfo, JERR_WIDTH_OVERFLOW);\n\n  /* For now, precision must match compiled-in value... */\n  if (cinfo->data_precision != BITS_IN_JSAMPLE)\n    ERREXIT1(cinfo, JERR_BAD_PRECISION, cinfo->data_precision);\n\n  /* Check that number of components won't exceed internal array sizes */\n  if (cinfo->num_components > MAX_COMPONENTS)\n    ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components,\n\t     MAX_COMPONENTS);\n\n  /* Compute maximum sampling factors; check factor validity */\n  cinfo->max_h_samp_factor = 1;\n  cinfo->max_v_samp_factor = 1;\n  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n       ci++, compptr++) {\n    if (compptr->h_samp_factor<=0 || compptr->h_samp_factor>MAX_SAMP_FACTOR ||\n\tcompptr->v_samp_factor<=0 || compptr->v_samp_factor>MAX_SAMP_FACTOR)\n      ERREXIT(cinfo, JERR_BAD_SAMPLING);\n    cinfo->max_h_samp_factor = MAX(cinfo->max_h_samp_factor,\n\t\t\t\t   compptr->h_samp_factor);\n    cinfo->max_v_samp_factor = MAX(cinfo->max_v_samp_factor,\n\t\t\t\t   compptr->v_samp_factor);\n  }\n\n  /* Compute dimensions of components */\n  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n       ci++, compptr++) {\n    /* Fill in the correct component_index value; don't rely on application */\n    compptr->component_index = ci;\n    /* For compression, we never do DCT scaling. */\n    compptr->DCT_scaled_size = DCTSIZE;\n    /* Size in DCT blocks */\n    compptr->width_in_blocks = (JDIMENSION)\n      jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor,\n\t\t    (long) (cinfo->max_h_samp_factor * DCTSIZE));\n    compptr->height_in_blocks = (JDIMENSION)\n      jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor,\n\t\t    (long) (cinfo->max_v_samp_factor * DCTSIZE));\n    /* Size in samples */\n    compptr->downsampled_width = (JDIMENSION)\n      jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor,\n\t\t    (long) cinfo->max_h_samp_factor);\n    compptr->downsampled_height = (JDIMENSION)\n      jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor,\n\t\t    (long) cinfo->max_v_samp_factor);\n    /* Mark component needed (this flag isn't actually used for compression) */\n    compptr->component_needed = TRUE;\n  }\n\n  /* Compute number of fully interleaved MCU rows (number of times that\n   * main controller will call coefficient controller).\n   */\n  cinfo->total_iMCU_rows = (JDIMENSION)\n    jdiv_round_up((long) cinfo->image_height,\n\t\t  (long) (cinfo->max_v_samp_factor*DCTSIZE));\n}\n\n\n#ifdef C_MULTISCAN_FILES_SUPPORTED\n\nLOCAL(void)\nvalidate_script (j_compress_ptr cinfo)\n/* Verify that the scan script in cinfo->scan_info[] is valid; also\n * determine whether it uses progressive JPEG, and set cinfo->progressive_mode.\n */\n{\n  const jpeg_scan_info * scanptr;\n  int scanno, ncomps, ci, coefi, thisi;\n  int Ss, Se, Ah, Al;\n  boolean component_sent[MAX_COMPONENTS];\n#ifdef C_PROGRESSIVE_SUPPORTED\n  int * last_bitpos_ptr;\n  int last_bitpos[MAX_COMPONENTS][DCTSIZE2];\n  /* -1 until that coefficient has been seen; then last Al for it */\n#endif\n\n  if (cinfo->num_scans <= 0)\n    ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, 0);\n\n  /* For sequential JPEG, all scans must have Ss=0, Se=DCTSIZE2-1;\n   * for progressive JPEG, no scan can have this.\n   */\n  scanptr = cinfo->scan_info;\n  if (scanptr->Ss != 0 || scanptr->Se != DCTSIZE2-1) {\n#ifdef C_PROGRESSIVE_SUPPORTED\n    cinfo->progressive_mode = TRUE;\n    last_bitpos_ptr = & last_bitpos[0][0];\n    for (ci = 0; ci < cinfo->num_components; ci++) \n      for (coefi = 0; coefi < DCTSIZE2; coefi++)\n\t*last_bitpos_ptr++ = -1;\n#else\n    ERREXIT(cinfo, JERR_NOT_COMPILED);\n#endif\n  } else {\n    cinfo->progressive_mode = FALSE;\n    for (ci = 0; ci < cinfo->num_components; ci++) \n      component_sent[ci] = FALSE;\n  }\n\n  for (scanno = 1; scanno <= cinfo->num_scans; scanptr++, scanno++) {\n    /* Validate component indexes */\n    ncomps = scanptr->comps_in_scan;\n    if (ncomps <= 0 || ncomps > MAX_COMPS_IN_SCAN)\n      ERREXIT2(cinfo, JERR_COMPONENT_COUNT, ncomps, MAX_COMPS_IN_SCAN);\n    for (ci = 0; ci < ncomps; ci++) {\n      thisi = scanptr->component_index[ci];\n      if (thisi < 0 || thisi >= cinfo->num_components)\n\tERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno);\n      /* Components must appear in SOF order within each scan */\n      if (ci > 0 && thisi <= scanptr->component_index[ci-1])\n\tERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno);\n    }\n    /* Validate progression parameters */\n    Ss = scanptr->Ss;\n    Se = scanptr->Se;\n    Ah = scanptr->Ah;\n    Al = scanptr->Al;\n    if (cinfo->progressive_mode) {\n#ifdef C_PROGRESSIVE_SUPPORTED\n      /* The JPEG spec simply gives the ranges 0..13 for Ah and Al, but that\n       * seems wrong: the upper bound ought to depend on data precision.\n       * Perhaps they really meant 0..N+1 for N-bit precision.\n       * Here we allow 0..10 for 8-bit data; Al larger than 10 results in\n       * out-of-range reconstructed DC values during the first DC scan,\n       * which might cause problems for some decoders.\n       */\n#if BITS_IN_JSAMPLE == 8\n#define MAX_AH_AL 10\n#else\n#define MAX_AH_AL 13\n#endif\n      if (Ss < 0 || Ss >= DCTSIZE2 || Se < Ss || Se >= DCTSIZE2 ||\n\t  Ah < 0 || Ah > MAX_AH_AL || Al < 0 || Al > MAX_AH_AL)\n\tERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);\n      if (Ss == 0) {\n\tif (Se != 0)\t\t/* DC and AC together not OK */\n\t  ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);\n      } else {\n\tif (ncomps != 1)\t/* AC scans must be for only one component */\n\t  ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);\n      }\n      for (ci = 0; ci < ncomps; ci++) {\n\tlast_bitpos_ptr = & last_bitpos[scanptr->component_index[ci]][0];\n\tif (Ss != 0 && last_bitpos_ptr[0] < 0) /* AC without prior DC scan */\n\t  ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);\n\tfor (coefi = Ss; coefi <= Se; coefi++) {\n\t  if (last_bitpos_ptr[coefi] < 0) {\n\t    /* first scan of this coefficient */\n\t    if (Ah != 0)\n\t      ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);\n\t  } else {\n\t    /* not first scan */\n\t    if (Ah != last_bitpos_ptr[coefi] || Al != Ah-1)\n\t      ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);\n\t  }\n\t  last_bitpos_ptr[coefi] = Al;\n\t}\n      }\n#endif\n    } else {\n      /* For sequential JPEG, all progression parameters must be these: */\n      if (Ss != 0 || Se != DCTSIZE2-1 || Ah != 0 || Al != 0)\n\tERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);\n      /* Make sure components are not sent twice */\n      for (ci = 0; ci < ncomps; ci++) {\n\tthisi = scanptr->component_index[ci];\n\tif (component_sent[thisi])\n\t  ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno);\n\tcomponent_sent[thisi] = TRUE;\n      }\n    }\n  }\n\n  /* Now verify that everything got sent. */\n  if (cinfo->progressive_mode) {\n#ifdef C_PROGRESSIVE_SUPPORTED\n    /* For progressive mode, we only check that at least some DC data\n     * got sent for each component; the spec does not require that all bits\n     * of all coefficients be transmitted.  Would it be wiser to enforce\n     * transmission of all coefficient bits??\n     */\n    for (ci = 0; ci < cinfo->num_components; ci++) {\n      if (last_bitpos[ci][0] < 0)\n\tERREXIT(cinfo, JERR_MISSING_DATA);\n    }\n#endif\n  } else {\n    for (ci = 0; ci < cinfo->num_components; ci++) {\n      if (! component_sent[ci])\n\tERREXIT(cinfo, JERR_MISSING_DATA);\n    }\n  }\n}\n\n#endif /* C_MULTISCAN_FILES_SUPPORTED */\n\n\nLOCAL(void)\nselect_scan_parameters (j_compress_ptr cinfo)\n/* Set up the scan parameters for the current scan */\n{\n  int ci;\n\n#ifdef C_MULTISCAN_FILES_SUPPORTED\n  if (cinfo->scan_info != NULL) {\n    /* Prepare for current scan --- the script is already validated */\n    my_master_ptr master = (my_master_ptr) cinfo->master;\n    const jpeg_scan_info * scanptr = cinfo->scan_info + master->scan_number;\n\n    cinfo->comps_in_scan = scanptr->comps_in_scan;\n    for (ci = 0; ci < scanptr->comps_in_scan; ci++) {\n      cinfo->cur_comp_info[ci] =\n\t&cinfo->comp_info[scanptr->component_index[ci]];\n    }\n    cinfo->Ss = scanptr->Ss;\n    cinfo->Se = scanptr->Se;\n    cinfo->Ah = scanptr->Ah;\n    cinfo->Al = scanptr->Al;\n  }\n  else\n#endif\n  {\n    /* Prepare for single sequential-JPEG scan containing all components */\n    if (cinfo->num_components > MAX_COMPS_IN_SCAN)\n      ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components,\n\t       MAX_COMPS_IN_SCAN);\n    cinfo->comps_in_scan = cinfo->num_components;\n    for (ci = 0; ci < cinfo->num_components; ci++) {\n      cinfo->cur_comp_info[ci] = &cinfo->comp_info[ci];\n    }\n    cinfo->Ss = 0;\n    cinfo->Se = DCTSIZE2-1;\n    cinfo->Ah = 0;\n    cinfo->Al = 0;\n  }\n}\n\n\nLOCAL(void)\nper_scan_setup (j_compress_ptr cinfo)\n/* Do computations that are needed before processing a JPEG scan */\n/* cinfo->comps_in_scan and cinfo->cur_comp_info[] are already set */\n{\n  int ci, mcublks, tmp;\n  jpeg_component_info *compptr;\n  \n  if (cinfo->comps_in_scan == 1) {\n    \n    /* Noninterleaved (single-component) scan */\n    compptr = cinfo->cur_comp_info[0];\n    \n    /* Overall image size in MCUs */\n    cinfo->MCUs_per_row = compptr->width_in_blocks;\n    cinfo->MCU_rows_in_scan = compptr->height_in_blocks;\n    \n    /* For noninterleaved scan, always one block per MCU */\n    compptr->MCU_width = 1;\n    compptr->MCU_height = 1;\n    compptr->MCU_blocks = 1;\n    compptr->MCU_sample_width = DCTSIZE;\n    compptr->last_col_width = 1;\n    /* For noninterleaved scans, it is convenient to define last_row_height\n     * as the number of block rows present in the last iMCU row.\n     */\n    tmp = (int) (compptr->height_in_blocks % compptr->v_samp_factor);\n    if (tmp == 0) tmp = compptr->v_samp_factor;\n    compptr->last_row_height = tmp;\n    \n    /* Prepare array describing MCU composition */\n    cinfo->blocks_in_MCU = 1;\n    cinfo->MCU_membership[0] = 0;\n    \n  } else {\n    \n    /* Interleaved (multi-component) scan */\n    if (cinfo->comps_in_scan <= 0 || cinfo->comps_in_scan > MAX_COMPS_IN_SCAN)\n      ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->comps_in_scan,\n\t       MAX_COMPS_IN_SCAN);\n    \n    /* Overall image size in MCUs */\n    cinfo->MCUs_per_row = (JDIMENSION)\n      jdiv_round_up((long) cinfo->image_width,\n\t\t    (long) (cinfo->max_h_samp_factor*DCTSIZE));\n    cinfo->MCU_rows_in_scan = (JDIMENSION)\n      jdiv_round_up((long) cinfo->image_height,\n\t\t    (long) (cinfo->max_v_samp_factor*DCTSIZE));\n    \n    cinfo->blocks_in_MCU = 0;\n    \n    for (ci = 0; ci < cinfo->comps_in_scan; ci++) {\n      compptr = cinfo->cur_comp_info[ci];\n      /* Sampling factors give # of blocks of component in each MCU */\n      compptr->MCU_width = compptr->h_samp_factor;\n      compptr->MCU_height = compptr->v_samp_factor;\n      compptr->MCU_blocks = compptr->MCU_width * compptr->MCU_height;\n      compptr->MCU_sample_width = compptr->MCU_width * DCTSIZE;\n      /* Figure number of non-dummy blocks in last MCU column & row */\n      tmp = (int) (compptr->width_in_blocks % compptr->MCU_width);\n      if (tmp == 0) tmp = compptr->MCU_width;\n      compptr->last_col_width = tmp;\n      tmp = (int) (compptr->height_in_blocks % compptr->MCU_height);\n      if (tmp == 0) tmp = compptr->MCU_height;\n      compptr->last_row_height = tmp;\n      /* Prepare array describing MCU composition */\n      mcublks = compptr->MCU_blocks;\n      if (cinfo->blocks_in_MCU + mcublks > C_MAX_BLOCKS_IN_MCU)\n\tERREXIT(cinfo, JERR_BAD_MCU_SIZE);\n      while (mcublks-- > 0) {\n\tcinfo->MCU_membership[cinfo->blocks_in_MCU++] = ci;\n      }\n    }\n    \n  }\n\n  /* Convert restart specified in rows to actual MCU count. */\n  /* Note that count must fit in 16 bits, so we provide limiting. */\n  if (cinfo->restart_in_rows > 0) {\n    long nominal = (long) cinfo->restart_in_rows * (long) cinfo->MCUs_per_row;\n    cinfo->restart_interval = (unsigned int) MIN(nominal, 65535L);\n  }\n}\n\n\n/*\n * Per-pass setup.\n * This is called at the beginning of each pass.  We determine which modules\n * will be active during this pass and give them appropriate start_pass calls.\n * We also set is_last_pass to indicate whether any more passes will be\n * required.\n */\n\nMETHODDEF(void)\nprepare_for_pass (j_compress_ptr cinfo)\n{\n  my_master_ptr master = (my_master_ptr) cinfo->master;\n\n  switch (master->pass_type) {\n  case main_pass:\n    /* Initial pass: will collect input data, and do either Huffman\n     * optimization or data output for the first scan.\n     */\n    select_scan_parameters(cinfo);\n    per_scan_setup(cinfo);\n    if (! cinfo->raw_data_in) {\n      (*cinfo->cconvert->start_pass) (cinfo);\n      (*cinfo->downsample->start_pass) (cinfo);\n      (*cinfo->prep->start_pass) (cinfo, JBUF_PASS_THRU);\n    }\n    (*cinfo->fdct->start_pass) (cinfo);\n    (*cinfo->entropy->start_pass) (cinfo, cinfo->optimize_coding);\n    (*cinfo->coef->start_pass) (cinfo,\n\t\t\t\t(master->total_passes > 1 ?\n\t\t\t\t JBUF_SAVE_AND_PASS : JBUF_PASS_THRU));\n    (*cinfo->main->start_pass) (cinfo, JBUF_PASS_THRU);\n    if (cinfo->optimize_coding) {\n      /* No immediate data output; postpone writing frame/scan headers */\n      master->pub.call_pass_startup = FALSE;\n    } else {\n      /* Will write frame/scan headers at first jpeg_write_scanlines call */\n      master->pub.call_pass_startup = TRUE;\n    }\n    break;\n#ifdef ENTROPY_OPT_SUPPORTED\n  case huff_opt_pass:\n    /* Do Huffman optimization for a scan after the first one. */\n    select_scan_parameters(cinfo);\n    per_scan_setup(cinfo);\n    if (cinfo->Ss != 0 || cinfo->Ah == 0 || cinfo->arith_code) {\n      (*cinfo->entropy->start_pass) (cinfo, TRUE);\n      (*cinfo->coef->start_pass) (cinfo, JBUF_CRANK_DEST);\n      master->pub.call_pass_startup = FALSE;\n      break;\n    }\n    /* Special case: Huffman DC refinement scans need no Huffman table\n     * and therefore we can skip the optimization pass for them.\n     */\n    master->pass_type = output_pass;\n    master->pass_number++;\n    /*FALLTHROUGH*/\n#endif\n  case output_pass:\n    /* Do a data-output pass. */\n    /* We need not repeat per-scan setup if prior optimization pass did it. */\n    if (! cinfo->optimize_coding) {\n      select_scan_parameters(cinfo);\n      per_scan_setup(cinfo);\n    }\n    (*cinfo->entropy->start_pass) (cinfo, FALSE);\n    (*cinfo->coef->start_pass) (cinfo, JBUF_CRANK_DEST);\n    /* We emit frame/scan headers now */\n    if (master->scan_number == 0)\n      (*cinfo->marker->write_frame_header) (cinfo);\n    (*cinfo->marker->write_scan_header) (cinfo);\n    master->pub.call_pass_startup = FALSE;\n    break;\n  default:\n    ERREXIT(cinfo, JERR_NOT_COMPILED);\n  }\n\n  master->pub.is_last_pass = (master->pass_number == master->total_passes-1);\n\n  /* Set up progress monitor's pass info if present */\n  if (cinfo->progress != NULL) {\n    cinfo->progress->completed_passes = master->pass_number;\n    cinfo->progress->total_passes = master->total_passes;\n  }\n}\n\n\n/*\n * Special start-of-pass hook.\n * This is called by jpeg_write_scanlines if call_pass_startup is TRUE.\n * In single-pass processing, we need this hook because we don't want to\n * write frame/scan headers during jpeg_start_compress; we want to let the\n * application write COM markers etc. between jpeg_start_compress and the\n * jpeg_write_scanlines loop.\n * In multi-pass processing, this routine is not used.\n */\n\nMETHODDEF(void)\npass_startup (j_compress_ptr cinfo)\n{\n  cinfo->master->call_pass_startup = FALSE; /* reset flag so call only once */\n\n  (*cinfo->marker->write_frame_header) (cinfo);\n  (*cinfo->marker->write_scan_header) (cinfo);\n}\n\n\n/*\n * Finish up at end of pass.\n */\n\nMETHODDEF(void)\nfinish_pass_master (j_compress_ptr cinfo)\n{\n  my_master_ptr master = (my_master_ptr) cinfo->master;\n\n  /* The entropy coder always needs an end-of-pass call,\n   * either to analyze statistics or to flush its output buffer.\n   */\n  (*cinfo->entropy->finish_pass) (cinfo);\n\n  /* Update state for next pass */\n  switch (master->pass_type) {\n  case main_pass:\n    /* next pass is either output of scan 0 (after optimization)\n     * or output of scan 1 (if no optimization).\n     */\n    master->pass_type = output_pass;\n    if (! cinfo->optimize_coding)\n      master->scan_number++;\n    break;\n  case huff_opt_pass:\n    /* next pass is always output of current scan */\n    master->pass_type = output_pass;\n    break;\n  case output_pass:\n    /* next pass is either optimization or output of next scan */\n    if (cinfo->optimize_coding)\n      master->pass_type = huff_opt_pass;\n    master->scan_number++;\n    break;\n  }\n\n  master->pass_number++;\n}\n\n\n/*\n * Initialize master compression control.\n */\n\nGLOBAL(void)\njinit_c_master_control (j_compress_ptr cinfo, boolean transcode_only)\n{\n  my_master_ptr master;\n\n  master = (my_master_ptr)\n      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\t  SIZEOF(my_comp_master));\n  cinfo->master = (struct jpeg_comp_master *) master;\n  master->pub.prepare_for_pass = prepare_for_pass;\n  master->pub.pass_startup = pass_startup;\n  master->pub.finish_pass = finish_pass_master;\n  master->pub.is_last_pass = FALSE;\n\n  /* Validate parameters, determine derived values */\n  initial_setup(cinfo);\n\n  if (cinfo->scan_info != NULL) {\n#ifdef C_MULTISCAN_FILES_SUPPORTED\n    validate_script(cinfo);\n#else\n    ERREXIT(cinfo, JERR_NOT_COMPILED);\n#endif\n  } else {\n    cinfo->progressive_mode = FALSE;\n    cinfo->num_scans = 1;\n  }\n\n  if (cinfo->progressive_mode)\t/*  TEMPORARY HACK ??? */\n    cinfo->optimize_coding = TRUE; /* assume default tables no good for progressive mode */\n\n  /* Initialize my private state */\n  if (transcode_only) {\n    /* no main pass in transcoding */\n    if (cinfo->optimize_coding)\n      master->pass_type = huff_opt_pass;\n    else\n      master->pass_type = output_pass;\n  } else {\n    /* for normal compression, first pass is always this type: */\n    master->pass_type = main_pass;\n  }\n  master->scan_number = 0;\n  master->pass_number = 0;\n  if (cinfo->optimize_coding)\n    master->total_passes = cinfo->num_scans * 2;\n  else\n    master->total_passes = cinfo->num_scans;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jcomapi.c",
    "content": "/*\n * jcomapi.c\n *\n * Copyright (C) 1994-1997, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains application interface routines that are used for both\n * compression and decompression.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n\n\n/*\n * Abort processing of a JPEG compression or decompression operation,\n * but don't destroy the object itself.\n *\n * For this, we merely clean up all the nonpermanent memory pools.\n * Note that temp files (virtual arrays) are not allowed to belong to\n * the permanent pool, so we will be able to close all temp files here.\n * Closing a data source or destination, if necessary, is the application's\n * responsibility.\n */\n\nGLOBAL(void)\njpeg_abort (j_common_ptr cinfo)\n{\n  int pool;\n\n  /* Do nothing if called on a not-initialized or destroyed JPEG object. */\n  if (cinfo->mem == NULL)\n    return;\n\n  /* Releasing pools in reverse order might help avoid fragmentation\n   * with some (brain-damaged) malloc libraries.\n   */\n  for (pool = JPOOL_NUMPOOLS-1; pool > JPOOL_PERMANENT; pool--) {\n    (*cinfo->mem->free_pool) (cinfo, pool);\n  }\n\n  /* Reset overall state for possible reuse of object */\n  if (cinfo->is_decompressor) {\n    cinfo->global_state = DSTATE_START;\n    /* Try to keep application from accessing now-deleted marker list.\n     * A bit kludgy to do it here, but this is the most central place.\n     */\n    ((j_decompress_ptr) cinfo)->marker_list = NULL;\n  } else {\n    cinfo->global_state = CSTATE_START;\n  }\n}\n\n\n/*\n * Destruction of a JPEG object.\n *\n * Everything gets deallocated except the master jpeg_compress_struct itself\n * and the error manager struct.  Both of these are supplied by the application\n * and must be freed, if necessary, by the application.  (Often they are on\n * the stack and so don't need to be freed anyway.)\n * Closing a data source or destination, if necessary, is the application's\n * responsibility.\n */\n\nGLOBAL(void)\njpeg_destroy (j_common_ptr cinfo)\n{\n  /* We need only tell the memory manager to release everything. */\n  /* NB: mem pointer is NULL if memory mgr failed to initialize. */\n  if (cinfo->mem != NULL)\n    (*cinfo->mem->self_destruct) (cinfo);\n  cinfo->mem = NULL;\t\t/* be safe if jpeg_destroy is called twice */\n  cinfo->global_state = 0;\t/* mark it destroyed */\n}\n\n\n/*\n * Convenience routines for allocating quantization and Huffman tables.\n * (Would jutils.c be a more reasonable place to put these?)\n */\n\nGLOBAL(JQUANT_TBL *)\njpeg_alloc_quant_table (j_common_ptr cinfo)\n{\n  JQUANT_TBL *tbl;\n\n  tbl = (JQUANT_TBL *)\n    (*cinfo->mem->alloc_small) (cinfo, JPOOL_PERMANENT, SIZEOF(JQUANT_TBL));\n  tbl->sent_table = FALSE;\t/* make sure this is false in any new table */\n  return tbl;\n}\n\n\nGLOBAL(JHUFF_TBL *)\njpeg_alloc_huff_table (j_common_ptr cinfo)\n{\n  JHUFF_TBL *tbl;\n\n  tbl = (JHUFF_TBL *)\n    (*cinfo->mem->alloc_small) (cinfo, JPOOL_PERMANENT, SIZEOF(JHUFF_TBL));\n  tbl->sent_table = FALSE;\t/* make sure this is false in any new table */\n  return tbl;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jconfig.h",
    "content": "/*\n * jconfig.doc\n *\n * Copyright (C) 1991-1994, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file documents the configuration options that are required to\n * customize the JPEG software for a particular system.\n *\n * The actual configuration options for a particular installation are stored\n * in jconfig.h.  On many machines, jconfig.h can be generated automatically\n * or copied from one of the \"canned\" jconfig files that we supply.  But if\n * you need to generate a jconfig.h file by hand, this file tells you how.\n *\n * DO NOT EDIT THIS FILE --- IT WON'T ACCOMPLISH ANYTHING.\n * EDIT A COPY NAMED JCONFIG.H.\n */\n\n\n/*\n * These symbols indicate the properties of your machine or compiler.\n * #define the symbol if yes, #undef it if no.\n */\n\n/* Does your compiler support function prototypes?\n * (If not, you also need to use ansi2knr, see install.doc)\n */\n#define HAVE_PROTOTYPES\n\n/* Does your compiler support the declaration \"unsigned char\" ?\n * How about \"unsigned short\" ?\n */\n#define HAVE_UNSIGNED_CHAR\n#define HAVE_UNSIGNED_SHORT\n\n/* Define \"void\" as \"char\" if your compiler doesn't know about type void.\n * NOTE: be sure to define void such that \"void *\" represents the most general\n * pointer type, e.g., that returned by malloc().\n */\n/* #define void char */\n\n/* Define \"const\" as empty if your compiler doesn't know the \"const\" keyword.\n */\n/* #define const */\n\n/* Define this if an ordinary \"char\" type is unsigned.\n * If you're not sure, leaving it undefined will work at some cost in speed.\n * If you defined HAVE_UNSIGNED_CHAR then the speed difference is minimal.\n */\n#undef CHAR_IS_UNSIGNED\n\n/* Define this if your system has an ANSI-conforming <stddef.h> file.\n */\n#define HAVE_STDDEF_H\n\n/* Define this if your system has an ANSI-conforming <stdlib.h> file.\n */\n#define HAVE_STDLIB_H\n\n/* Define this if your system does not have an ANSI/SysV <string.h>,\n * but does have a BSD-style <strings.h>.\n */\n#undef NEED_BSD_STRINGS\n\n/* Define this if your system does not provide typedef size_t in any of the\n * ANSI-standard places (stddef.h, stdlib.h, or stdio.h), but places it in\n * <sys/types.h> instead.\n */\n#undef NEED_SYS_TYPES_H\n\n/* For 80x86 machines, you need to define NEED_FAR_POINTERS,\n * unless you are using a large-data memory model or 80386 flat-memory mode.\n * On less brain-damaged CPUs this symbol must not be defined.\n * (Defining this symbol causes large data structures to be referenced through\n * \"far\" pointers and to be allocated with a special version of malloc.)\n */\n#undef NEED_FAR_POINTERS\n\n/* Define this if your linker needs global names to be unique in less\n * than the first 15 characters.\n */\n#undef NEED_SHORT_EXTERNAL_NAMES\n\n/* Although a real ANSI C compiler can deal perfectly well with pointers to\n * unspecified structures (see \"incomplete types\" in the spec), a few pre-ANSI\n * and pseudo-ANSI compilers get confused.  To keep one of these bozos happy,\n * define INCOMPLETE_TYPES_BROKEN.  This is not recommended unless you\n * actually get \"missing structure definition\" warnings or errors while\n * compiling the JPEG code.\n */\n#undef INCOMPLETE_TYPES_BROKEN\n\n\n/*\n * The following options affect code selection within the JPEG library,\n * but they don't need to be visible to applications using the library.\n * To minimize application namespace pollution, the symbols won't be\n * defined unless JPEG_INTERNALS has been defined.\n */\n\n#ifdef JPEG_INTERNALS\n\n/* Define this if your compiler implements \">>\" on signed values as a logical\n * (unsigned) shift; leave it undefined if \">>\" is a signed (arithmetic) shift,\n * which is the normal and rational definition.\n */\n#undef RIGHT_SHIFT_IS_UNSIGNED\n\n\n#endif /* JPEG_INTERNALS */\n\n\n/*\n * The remaining options do not affect the JPEG library proper,\n * but only the sample applications cjpeg/djpeg (see cjpeg.c, djpeg.c).\n * Other applications can ignore these.\n */\n\n#ifdef JPEG_CJPEG_DJPEG\n\n/* These defines indicate which image (non-JPEG) file formats are allowed. */\n\n#define BMP_SUPPORTED\t\t/* BMP image file format */\n#define GIF_SUPPORTED\t\t/* GIF image file format */\n#define PPM_SUPPORTED\t\t/* PBMPLUS PPM/PGM image file format */\n#undef RLE_SUPPORTED\t\t/* Utah RLE image file format */\n#define TARGA_SUPPORTED\t\t/* Targa image file format */\n\n/* Define this if you want to name both input and output files on the command\n * line, rather than using stdout and optionally stdin.  You MUST do this if\n * your system can't cope with binary I/O to stdin/stdout.  See comments at\n * head of cjpeg.c or djpeg.c.\n */\n#undef TWO_FILE_COMMANDLINE\n\n/* Define this if your system needs explicit cleanup of temporary files.\n * This is crucial under MS-DOS, where the temporary \"files\" may be areas\n * of extended memory; on most other systems it's not as important.\n */\n#undef NEED_SIGNAL_CATCHER\n\n/* By default, we open image files with fopen(...,\"rb\") or fopen(...,\"wb\").\n * This is necessary on systems that distinguish text files from binary files,\n * and is harmless on most systems that don't.  If you have one of the rare\n * systems that complains about the \"b\" spec, define this symbol.\n */\n#undef DONT_USE_B_MODE\n\n/* Define this if you want percent-done progress reports from cjpeg/djpeg.\n */\n#undef PROGRESS_REPORT\n\n\n#endif /* JPEG_CJPEG_DJPEG */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jcparam.c",
    "content": "/*\n * jcparam.c\n *\n * Copyright (C) 1991-1998, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains optional default-setting code for the JPEG compressor.\n * Applications do not have to use this file, but those that don't use it\n * must know a lot more about the innards of the JPEG code.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n\n\n/*\n * Quantization table setup routines\n */\n\nGLOBAL(void)\njpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl,\n\t\t      const unsigned int *basic_table,\n\t\t      int scale_factor, boolean force_baseline)\n/* Define a quantization table equal to the basic_table times\n * a scale factor (given as a percentage).\n * If force_baseline is TRUE, the computed quantization table entries\n * are limited to 1..255 for JPEG baseline compatibility.\n */\n{\n  JQUANT_TBL ** qtblptr;\n  int i;\n  long temp;\n\n  /* Safety check to ensure start_compress not called yet. */\n  if (cinfo->global_state != CSTATE_START)\n    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);\n\n  if (which_tbl < 0 || which_tbl >= NUM_QUANT_TBLS)\n    ERREXIT1(cinfo, JERR_DQT_INDEX, which_tbl);\n\n  qtblptr = & cinfo->quant_tbl_ptrs[which_tbl];\n\n  if (*qtblptr == NULL)\n    *qtblptr = jpeg_alloc_quant_table((j_common_ptr) cinfo);\n\n  for (i = 0; i < DCTSIZE2; i++) {\n    temp = ((long) basic_table[i] * scale_factor + 50L) / 100L;\n    /* limit the values to the valid range */\n    if (temp <= 0L) temp = 1L;\n    if (temp > 32767L) temp = 32767L; /* max quantizer needed for 12 bits */\n    if (force_baseline && temp > 255L)\n      temp = 255L;\t\t/* limit to baseline range if requested */\n    (*qtblptr)->quantval[i] = (UINT16) temp;\n  }\n\n  /* Initialize sent_table FALSE so table will be written to JPEG file. */\n  (*qtblptr)->sent_table = FALSE;\n}\n\n\nGLOBAL(void)\njpeg_set_linear_quality (j_compress_ptr cinfo, int scale_factor,\n\t\t\t boolean force_baseline)\n/* Set or change the 'quality' (quantization) setting, using default tables\n * and a straight percentage-scaling quality scale.  In most cases it's better\n * to use jpeg_set_quality (below); this entry point is provided for\n * applications that insist on a linear percentage scaling.\n */\n{\n  /* These are the sample quantization tables given in JPEG spec section K.1.\n   * The spec says that the values given produce \"good\" quality, and\n   * when divided by 2, \"very good\" quality.\n   */\n  static const unsigned int std_luminance_quant_tbl[DCTSIZE2] = {\n    16,  11,  10,  16,  24,  40,  51,  61,\n    12,  12,  14,  19,  26,  58,  60,  55,\n    14,  13,  16,  24,  40,  57,  69,  56,\n    14,  17,  22,  29,  51,  87,  80,  62,\n    18,  22,  37,  56,  68, 109, 103,  77,\n    24,  35,  55,  64,  81, 104, 113,  92,\n    49,  64,  78,  87, 103, 121, 120, 101,\n    72,  92,  95,  98, 112, 100, 103,  99\n  };\n  static const unsigned int std_chrominance_quant_tbl[DCTSIZE2] = {\n    17,  18,  24,  47,  99,  99,  99,  99,\n    18,  21,  26,  66,  99,  99,  99,  99,\n    24,  26,  56,  99,  99,  99,  99,  99,\n    47,  66,  99,  99,  99,  99,  99,  99,\n    99,  99,  99,  99,  99,  99,  99,  99,\n    99,  99,  99,  99,  99,  99,  99,  99,\n    99,  99,  99,  99,  99,  99,  99,  99,\n    99,  99,  99,  99,  99,  99,  99,  99\n  };\n\n  /* Set up two quantization tables using the specified scaling */\n  jpeg_add_quant_table(cinfo, 0, std_luminance_quant_tbl,\n\t\t       scale_factor, force_baseline);\n  jpeg_add_quant_table(cinfo, 1, std_chrominance_quant_tbl,\n\t\t       scale_factor, force_baseline);\n}\n\n\nGLOBAL(int)\njpeg_quality_scaling (int quality)\n/* Convert a user-specified quality rating to a percentage scaling factor\n * for an underlying quantization table, using our recommended scaling curve.\n * The input 'quality' factor should be 0 (terrible) to 100 (very good).\n */\n{\n  /* Safety limit on quality factor.  Convert 0 to 1 to avoid zero divide. */\n  if (quality <= 0) quality = 1;\n  if (quality > 100) quality = 100;\n\n  /* The basic table is used as-is (scaling 100) for a quality of 50.\n   * Qualities 50..100 are converted to scaling percentage 200 - 2*Q;\n   * note that at Q=100 the scaling is 0, which will cause jpeg_add_quant_table\n   * to make all the table entries 1 (hence, minimum quantization loss).\n   * Qualities 1..50 are converted to scaling percentage 5000/Q.\n   */\n  if (quality < 50)\n    quality = 5000 / quality;\n  else\n    quality = 200 - quality*2;\n\n  return quality;\n}\n\n\nGLOBAL(void)\njpeg_set_quality (j_compress_ptr cinfo, int quality, boolean force_baseline)\n/* Set or change the 'quality' (quantization) setting, using default tables.\n * This is the standard quality-adjusting entry point for typical user\n * interfaces; only those who want detailed control over quantization tables\n * would use the preceding three routines directly.\n */\n{\n  /* Convert user 0-100 rating to percentage scaling */\n  quality = jpeg_quality_scaling(quality);\n\n  /* Set up standard quality tables */\n  jpeg_set_linear_quality(cinfo, quality, force_baseline);\n}\n\n\n/*\n * Huffman table setup routines\n */\n\nLOCAL(void)\nadd_huff_table (j_compress_ptr cinfo,\n\t\tJHUFF_TBL **htblptr, const UINT8 *bits, const UINT8 *val)\n/* Define a Huffman table */\n{\n  int nsymbols, len;\n\n  if (*htblptr == NULL)\n    *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo);\n\n  /* Copy the number-of-symbols-of-each-code-length counts */\n  MEMCOPY((*htblptr)->bits, bits, SIZEOF((*htblptr)->bits));\n\n  /* Validate the counts.  We do this here mainly so we can copy the right\n   * number of symbols from the val[] array, without risking marching off\n   * the end of memory.  jchuff.c will do a more thorough test later.\n   */\n  nsymbols = 0;\n  for (len = 1; len <= 16; len++)\n    nsymbols += bits[len];\n  if (nsymbols < 1 || nsymbols > 256)\n    ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);\n\n  MEMCOPY((*htblptr)->huffval, val, nsymbols * SIZEOF(UINT8));\n\n  /* Initialize sent_table FALSE so table will be written to JPEG file. */\n  (*htblptr)->sent_table = FALSE;\n}\n\n\nLOCAL(void)\nstd_huff_tables (j_compress_ptr cinfo)\n/* Set up the standard Huffman tables (cf. JPEG standard section K.3) */\n/* IMPORTANT: these are only valid for 8-bit data precision! */\n{\n  static const UINT8 bits_dc_luminance[17] =\n    { /* 0-base */ 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 };\n  static const UINT8 val_dc_luminance[] =\n    { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };\n  \n  static const UINT8 bits_dc_chrominance[17] =\n    { /* 0-base */ 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 };\n  static const UINT8 val_dc_chrominance[] =\n    { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };\n  \n  static const UINT8 bits_ac_luminance[17] =\n    { /* 0-base */ 0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d };\n  static const UINT8 val_ac_luminance[] =\n    { 0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12,\n      0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07,\n      0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08,\n      0x23, 0x42, 0xb1, 0xc1, 0x15, 0x52, 0xd1, 0xf0,\n      0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0a, 0x16,\n      0x17, 0x18, 0x19, 0x1a, 0x25, 0x26, 0x27, 0x28,\n      0x29, 0x2a, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,\n      0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49,\n      0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59,\n      0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,\n      0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79,\n      0x7a, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89,\n      0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98,\n      0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,\n      0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6,\n      0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5,\n      0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4,\n      0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe1, 0xe2,\n      0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea,\n      0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,\n      0xf9, 0xfa };\n  \n  static const UINT8 bits_ac_chrominance[17] =\n    { /* 0-base */ 0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77 };\n  static const UINT8 val_ac_chrominance[] =\n    { 0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21,\n      0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71,\n      0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91,\n      0xa1, 0xb1, 0xc1, 0x09, 0x23, 0x33, 0x52, 0xf0,\n      0x15, 0x62, 0x72, 0xd1, 0x0a, 0x16, 0x24, 0x34,\n      0xe1, 0x25, 0xf1, 0x17, 0x18, 0x19, 0x1a, 0x26,\n      0x27, 0x28, 0x29, 0x2a, 0x35, 0x36, 0x37, 0x38,\n      0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48,\n      0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,\n      0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,\n      0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,\n      0x79, 0x7a, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,\n      0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96,\n      0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5,\n      0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4,\n      0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3,\n      0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2,\n      0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda,\n      0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9,\n      0xea, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,\n      0xf9, 0xfa };\n  \n  add_huff_table(cinfo, &cinfo->dc_huff_tbl_ptrs[0],\n\t\t bits_dc_luminance, val_dc_luminance);\n  add_huff_table(cinfo, &cinfo->ac_huff_tbl_ptrs[0],\n\t\t bits_ac_luminance, val_ac_luminance);\n  add_huff_table(cinfo, &cinfo->dc_huff_tbl_ptrs[1],\n\t\t bits_dc_chrominance, val_dc_chrominance);\n  add_huff_table(cinfo, &cinfo->ac_huff_tbl_ptrs[1],\n\t\t bits_ac_chrominance, val_ac_chrominance);\n}\n\n\n/*\n * Default parameter setup for compression.\n *\n * Applications that don't choose to use this routine must do their\n * own setup of all these parameters.  Alternately, you can call this\n * to establish defaults and then alter parameters selectively.  This\n * is the recommended approach since, if we add any new parameters,\n * your code will still work (they'll be set to reasonable defaults).\n */\n\nGLOBAL(void)\njpeg_set_defaults (j_compress_ptr cinfo)\n{\n  int i;\n\n  /* Safety check to ensure start_compress not called yet. */\n  if (cinfo->global_state != CSTATE_START)\n    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);\n\n  /* Allocate comp_info array large enough for maximum component count.\n   * Array is made permanent in case application wants to compress\n   * multiple images at same param settings.\n   */\n  if (cinfo->comp_info == NULL)\n    cinfo->comp_info = (jpeg_component_info *)\n      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,\n\t\t\t\t  MAX_COMPONENTS * SIZEOF(jpeg_component_info));\n\n  /* Initialize everything not dependent on the color space */\n\n  cinfo->data_precision = BITS_IN_JSAMPLE;\n  /* Set up two quantization tables using default quality of 75 */\n  jpeg_set_quality(cinfo, 75, TRUE);\n  /* Set up two Huffman tables */\n  std_huff_tables(cinfo);\n\n  /* Initialize default arithmetic coding conditioning */\n  for (i = 0; i < NUM_ARITH_TBLS; i++) {\n    cinfo->arith_dc_L[i] = 0;\n    cinfo->arith_dc_U[i] = 1;\n    cinfo->arith_ac_K[i] = 5;\n  }\n\n  /* Default is no multiple-scan output */\n  cinfo->scan_info = NULL;\n  cinfo->num_scans = 0;\n\n  /* Expect normal source image, not raw downsampled data */\n  cinfo->raw_data_in = FALSE;\n\n  /* Use Huffman coding, not arithmetic coding, by default */\n  cinfo->arith_code = FALSE;\n\n  /* By default, don't do extra passes to optimize entropy coding */\n  cinfo->optimize_coding = FALSE;\n  /* The standard Huffman tables are only valid for 8-bit data precision.\n   * If the precision is higher, force optimization on so that usable\n   * tables will be computed.  This test can be removed if default tables\n   * are supplied that are valid for the desired precision.\n   */\n  if (cinfo->data_precision > 8)\n    cinfo->optimize_coding = TRUE;\n\n  /* By default, use the simpler non-cosited sampling alignment */\n  cinfo->CCIR601_sampling = FALSE;\n\n  /* No input smoothing */\n  cinfo->smoothing_factor = 0;\n\n  /* DCT algorithm preference */\n  cinfo->dct_method = JDCT_DEFAULT;\n\n  /* No restart markers */\n  cinfo->restart_interval = 0;\n  cinfo->restart_in_rows = 0;\n\n  /* Fill in default JFIF marker parameters.  Note that whether the marker\n   * will actually be written is determined by jpeg_set_colorspace.\n   *\n   * By default, the library emits JFIF version code 1.01.\n   * An application that wants to emit JFIF 1.02 extension markers should set\n   * JFIF_minor_version to 2.  We could probably get away with just defaulting\n   * to 1.02, but there may still be some decoders in use that will complain\n   * about that; saying 1.01 should minimize compatibility problems.\n   */\n  cinfo->JFIF_major_version = 1; /* Default JFIF version = 1.01 */\n  cinfo->JFIF_minor_version = 1;\n  cinfo->density_unit = 0;\t/* Pixel size is unknown by default */\n  cinfo->X_density = 1;\t\t/* Pixel aspect ratio is square by default */\n  cinfo->Y_density = 1;\n\n  /* Choose JPEG colorspace based on input space, set defaults accordingly */\n\n  jpeg_default_colorspace(cinfo);\n}\n\n\n/*\n * Select an appropriate JPEG colorspace for in_color_space.\n */\n\nGLOBAL(void)\njpeg_default_colorspace (j_compress_ptr cinfo)\n{\n  switch (cinfo->in_color_space) {\n  case JCS_GRAYSCALE:\n    jpeg_set_colorspace(cinfo, JCS_GRAYSCALE);\n    break;\n  case JCS_RGB:\n    jpeg_set_colorspace(cinfo, JCS_YCbCr);\n    break;\n  case JCS_YCbCr:\n    jpeg_set_colorspace(cinfo, JCS_YCbCr);\n    break;\n  case JCS_CMYK:\n    jpeg_set_colorspace(cinfo, JCS_CMYK); /* By default, no translation */\n    break;\n  case JCS_YCCK:\n    jpeg_set_colorspace(cinfo, JCS_YCCK);\n    break;\n  case JCS_UNKNOWN:\n    jpeg_set_colorspace(cinfo, JCS_UNKNOWN);\n    break;\n  default:\n    ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE);\n  }\n}\n\n\n/*\n * Set the JPEG colorspace, and choose colorspace-dependent default values.\n */\n\nGLOBAL(void)\njpeg_set_colorspace (j_compress_ptr cinfo, J_COLOR_SPACE colorspace)\n{\n  jpeg_component_info * compptr;\n  int ci;\n\n#define SET_COMP(index,id,hsamp,vsamp,quant,dctbl,actbl)  \\\n  (compptr = &cinfo->comp_info[index], \\\n   compptr->component_id = (id), \\\n   compptr->h_samp_factor = (hsamp), \\\n   compptr->v_samp_factor = (vsamp), \\\n   compptr->quant_tbl_no = (quant), \\\n   compptr->dc_tbl_no = (dctbl), \\\n   compptr->ac_tbl_no = (actbl) )\n\n  /* Safety check to ensure start_compress not called yet. */\n  if (cinfo->global_state != CSTATE_START)\n    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);\n\n  /* For all colorspaces, we use Q and Huff tables 0 for luminance components,\n   * tables 1 for chrominance components.\n   */\n\n  cinfo->jpeg_color_space = colorspace;\n\n  cinfo->write_JFIF_header = FALSE; /* No marker for non-JFIF colorspaces */\n  cinfo->write_Adobe_marker = FALSE; /* write no Adobe marker by default */\n\n  switch (colorspace) {\n  case JCS_GRAYSCALE:\n    cinfo->write_JFIF_header = TRUE; /* Write a JFIF marker */\n    cinfo->num_components = 1;\n    /* JFIF specifies component ID 1 */\n    SET_COMP(0, 1, 1,1, 0, 0,0);\n    break;\n  case JCS_RGB:\n    cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag RGB */\n    cinfo->num_components = 3;\n    SET_COMP(0, 0x52 /* 'R' */, 1,1, 0, 0,0);\n    SET_COMP(1, 0x47 /* 'G' */, 1,1, 0, 0,0);\n    SET_COMP(2, 0x42 /* 'B' */, 1,1, 0, 0,0);\n    break;\n  case JCS_YCbCr:\n    cinfo->write_JFIF_header = TRUE; /* Write a JFIF marker */\n    cinfo->num_components = 3;\n    /* JFIF specifies component IDs 1,2,3 */\n    /* We default to 2x2 subsamples of chrominance */\n    SET_COMP(0, 1, 2,2, 0, 0,0);\n    SET_COMP(1, 2, 1,1, 1, 1,1);\n    SET_COMP(2, 3, 1,1, 1, 1,1);\n    break;\n  case JCS_CMYK:\n    cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag CMYK */\n    cinfo->num_components = 4;\n    SET_COMP(0, 0x43 /* 'C' */, 1,1, 0, 0,0);\n    SET_COMP(1, 0x4D /* 'M' */, 1,1, 0, 0,0);\n    SET_COMP(2, 0x59 /* 'Y' */, 1,1, 0, 0,0);\n    SET_COMP(3, 0x4B /* 'K' */, 1,1, 0, 0,0);\n    break;\n  case JCS_YCCK:\n    cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag YCCK */\n    cinfo->num_components = 4;\n    SET_COMP(0, 1, 2,2, 0, 0,0);\n    SET_COMP(1, 2, 1,1, 1, 1,1);\n    SET_COMP(2, 3, 1,1, 1, 1,1);\n    SET_COMP(3, 4, 2,2, 0, 0,0);\n    break;\n  case JCS_UNKNOWN:\n    cinfo->num_components = cinfo->input_components;\n    if (cinfo->num_components < 1 || cinfo->num_components > MAX_COMPONENTS)\n      ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components,\n\t       MAX_COMPONENTS);\n    for (ci = 0; ci < cinfo->num_components; ci++) {\n      SET_COMP(ci, ci, 1,1, 0, 0,0);\n    }\n    break;\n  default:\n    ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);\n  }\n}\n\n\n#ifdef C_PROGRESSIVE_SUPPORTED\n\nLOCAL(jpeg_scan_info *)\nfill_a_scan (jpeg_scan_info * scanptr, int ci,\n\t     int Ss, int Se, int Ah, int Al)\n/* Support routine: generate one scan for specified component */\n{\n  scanptr->comps_in_scan = 1;\n  scanptr->component_index[0] = ci;\n  scanptr->Ss = Ss;\n  scanptr->Se = Se;\n  scanptr->Ah = Ah;\n  scanptr->Al = Al;\n  scanptr++;\n  return scanptr;\n}\n\nLOCAL(jpeg_scan_info *)\nfill_scans (jpeg_scan_info * scanptr, int ncomps,\n\t    int Ss, int Se, int Ah, int Al)\n/* Support routine: generate one scan for each component */\n{\n  int ci;\n\n  for (ci = 0; ci < ncomps; ci++) {\n    scanptr->comps_in_scan = 1;\n    scanptr->component_index[0] = ci;\n    scanptr->Ss = Ss;\n    scanptr->Se = Se;\n    scanptr->Ah = Ah;\n    scanptr->Al = Al;\n    scanptr++;\n  }\n  return scanptr;\n}\n\nLOCAL(jpeg_scan_info *)\nfill_dc_scans (jpeg_scan_info * scanptr, int ncomps, int Ah, int Al)\n/* Support routine: generate interleaved DC scan if possible, else N scans */\n{\n  int ci;\n\n  if (ncomps <= MAX_COMPS_IN_SCAN) {\n    /* Single interleaved DC scan */\n    scanptr->comps_in_scan = ncomps;\n    for (ci = 0; ci < ncomps; ci++)\n      scanptr->component_index[ci] = ci;\n    scanptr->Ss = scanptr->Se = 0;\n    scanptr->Ah = Ah;\n    scanptr->Al = Al;\n    scanptr++;\n  } else {\n    /* Noninterleaved DC scan for each component */\n    scanptr = fill_scans(scanptr, ncomps, 0, 0, Ah, Al);\n  }\n  return scanptr;\n}\n\n\n/*\n * Create a recommended progressive-JPEG script.\n * cinfo->num_components and cinfo->jpeg_color_space must be correct.\n */\n\nGLOBAL(void)\njpeg_simple_progression (j_compress_ptr cinfo)\n{\n  int ncomps = cinfo->num_components;\n  int nscans;\n  jpeg_scan_info * scanptr;\n\n  /* Safety check to ensure start_compress not called yet. */\n  if (cinfo->global_state != CSTATE_START)\n    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);\n\n  /* Figure space needed for script.  Calculation must match code below! */\n  if (ncomps == 3 && cinfo->jpeg_color_space == JCS_YCbCr) {\n    /* Custom script for YCbCr color images. */\n    nscans = 10;\n  } else {\n    /* All-purpose script for other color spaces. */\n    if (ncomps > MAX_COMPS_IN_SCAN)\n      nscans = 6 * ncomps;\t/* 2 DC + 4 AC scans per component */\n    else\n      nscans = 2 + 4 * ncomps;\t/* 2 DC scans; 4 AC scans per component */\n  }\n\n  /* Allocate space for script.\n   * We need to put it in the permanent pool in case the application performs\n   * multiple compressions without changing the settings.  To avoid a memory\n   * leak if jpeg_simple_progression is called repeatedly for the same JPEG\n   * object, we try to re-use previously allocated space, and we allocate\n   * enough space to handle YCbCr even if initially asked for grayscale.\n   */\n  if (cinfo->script_space == NULL || cinfo->script_space_size < nscans) {\n    cinfo->script_space_size = MAX(nscans, 10);\n    cinfo->script_space = (jpeg_scan_info *)\n      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,\n\t\t\tcinfo->script_space_size * SIZEOF(jpeg_scan_info));\n  }\n  scanptr = cinfo->script_space;\n  cinfo->scan_info = scanptr;\n  cinfo->num_scans = nscans;\n\n  if (ncomps == 3 && cinfo->jpeg_color_space == JCS_YCbCr) {\n    /* Custom script for YCbCr color images. */\n    /* Initial DC scan */\n    scanptr = fill_dc_scans(scanptr, ncomps, 0, 1);\n    /* Initial AC scan: get some luma data out in a hurry */\n    scanptr = fill_a_scan(scanptr, 0, 1, 5, 0, 2);\n    /* Chroma data is too small to be worth expending many scans on */\n    scanptr = fill_a_scan(scanptr, 2, 1, 63, 0, 1);\n    scanptr = fill_a_scan(scanptr, 1, 1, 63, 0, 1);\n    /* Complete spectral selection for luma AC */\n    scanptr = fill_a_scan(scanptr, 0, 6, 63, 0, 2);\n    /* Refine next bit of luma AC */\n    scanptr = fill_a_scan(scanptr, 0, 1, 63, 2, 1);\n    /* Finish DC successive approximation */\n    scanptr = fill_dc_scans(scanptr, ncomps, 1, 0);\n    /* Finish AC successive approximation */\n    scanptr = fill_a_scan(scanptr, 2, 1, 63, 1, 0);\n    scanptr = fill_a_scan(scanptr, 1, 1, 63, 1, 0);\n    /* Luma bottom bit comes last since it's usually largest scan */\n    scanptr = fill_a_scan(scanptr, 0, 1, 63, 1, 0);\n  } else {\n    /* All-purpose script for other color spaces. */\n    /* Successive approximation first pass */\n    scanptr = fill_dc_scans(scanptr, ncomps, 0, 1);\n    scanptr = fill_scans(scanptr, ncomps, 1, 5, 0, 2);\n    scanptr = fill_scans(scanptr, ncomps, 6, 63, 0, 2);\n    /* Successive approximation second pass */\n    scanptr = fill_scans(scanptr, ncomps, 1, 63, 2, 1);\n    /* Successive approximation final pass */\n    scanptr = fill_dc_scans(scanptr, ncomps, 1, 0);\n    scanptr = fill_scans(scanptr, ncomps, 1, 63, 1, 0);\n  }\n}\n\n#endif /* C_PROGRESSIVE_SUPPORTED */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jcphuff.c",
    "content": "/*\n * jcphuff.c\n *\n * Copyright (C) 1995-1997, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains Huffman entropy encoding routines for progressive JPEG.\n *\n * We do not support output suspension in this module, since the library\n * currently does not allow multiple-scan files to be written with output\n * suspension.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n#include \"jchuff.h\"\t\t/* Declarations shared with jchuff.c */\n\n#ifdef C_PROGRESSIVE_SUPPORTED\n\n/* Expanded entropy encoder object for progressive Huffman encoding. */\n\ntypedef struct {\n  struct jpeg_entropy_encoder pub; /* public fields */\n\n  /* Mode flag: TRUE for optimization, FALSE for actual data output */\n  boolean gather_statistics;\n\n  /* Bit-level coding status.\n   * next_output_byte/free_in_buffer are local copies of cinfo->dest fields.\n   */\n  JOCTET * next_output_byte;\t/* => next byte to write in buffer */\n  size_t free_in_buffer;\t/* # of byte spaces remaining in buffer */\n  INT32 put_buffer;\t\t/* current bit-accumulation buffer */\n  int put_bits;\t\t\t/* # of bits now in it */\n  j_compress_ptr cinfo;\t\t/* link to cinfo (needed for dump_buffer) */\n\n  /* Coding status for DC components */\n  int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */\n\n  /* Coding status for AC components */\n  int ac_tbl_no;\t\t/* the table number of the single component */\n  unsigned int EOBRUN;\t\t/* run length of EOBs */\n  unsigned int BE;\t\t/* # of buffered correction bits before MCU */\n  char * bit_buffer;\t\t/* buffer for correction bits (1 per char) */\n  /* packing correction bits tightly would save some space but cost time... */\n\n  unsigned int restarts_to_go;\t/* MCUs left in this restart interval */\n  int next_restart_num;\t\t/* next restart number to write (0-7) */\n\n  /* Pointers to derived tables (these workspaces have image lifespan).\n   * Since any one scan codes only DC or only AC, we only need one set\n   * of tables, not one for DC and one for AC.\n   */\n  c_derived_tbl * derived_tbls[NUM_HUFF_TBLS];\n\n  /* Statistics tables for optimization; again, one set is enough */\n  long * count_ptrs[NUM_HUFF_TBLS];\n} phuff_entropy_encoder;\n\ntypedef phuff_entropy_encoder * phuff_entropy_ptr;\n\n/* MAX_CORR_BITS is the number of bits the AC refinement correction-bit\n * buffer can hold.  Larger sizes may slightly improve compression, but\n * 1000 is already well into the realm of overkill.\n * The minimum safe size is 64 bits.\n */\n\n#define MAX_CORR_BITS  1000\t/* Max # of correction bits I can buffer */\n\n/* IRIGHT_SHIFT is like RIGHT_SHIFT, but works on int rather than INT32.\n * We assume that int right shift is unsigned if INT32 right shift is,\n * which should be safe.\n */\n\n#ifdef RIGHT_SHIFT_IS_UNSIGNED\n#define ISHIFT_TEMPS\tint ishift_temp;\n#define IRIGHT_SHIFT(x,shft)  \\\n\t((ishift_temp = (x)) < 0 ? \\\n\t (ishift_temp >> (shft)) | ((~0) << (16-(shft))) : \\\n\t (ishift_temp >> (shft)))\n#else\n#define ISHIFT_TEMPS\n#define IRIGHT_SHIFT(x,shft)\t((x) >> (shft))\n#endif\n\n/* Forward declarations */\nMETHODDEF(boolean) encode_mcu_DC_first JPP((j_compress_ptr cinfo,\n\t\t\t\t\t    JBLOCKROW *MCU_data));\nMETHODDEF(boolean) encode_mcu_AC_first JPP((j_compress_ptr cinfo,\n\t\t\t\t\t    JBLOCKROW *MCU_data));\nMETHODDEF(boolean) encode_mcu_DC_refine JPP((j_compress_ptr cinfo,\n\t\t\t\t\t     JBLOCKROW *MCU_data));\nMETHODDEF(boolean) encode_mcu_AC_refine JPP((j_compress_ptr cinfo,\n\t\t\t\t\t     JBLOCKROW *MCU_data));\nMETHODDEF(void) finish_pass_phuff JPP((j_compress_ptr cinfo));\nMETHODDEF(void) finish_pass_gather_phuff JPP((j_compress_ptr cinfo));\n\n\n/*\n * Initialize for a Huffman-compressed scan using progressive JPEG.\n */\n\nMETHODDEF(void)\nstart_pass_phuff (j_compress_ptr cinfo, boolean gather_statistics)\n{  \n  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;\n  boolean is_DC_band;\n  int ci, tbl;\n  jpeg_component_info * compptr;\n\n  entropy->cinfo = cinfo;\n  entropy->gather_statistics = gather_statistics;\n\n  is_DC_band = (cinfo->Ss == 0);\n\n  /* We assume jcmaster.c already validated the scan parameters. */\n\n  /* Select execution routines */\n  if (cinfo->Ah == 0) {\n    if (is_DC_band)\n      entropy->pub.encode_mcu = encode_mcu_DC_first;\n    else\n      entropy->pub.encode_mcu = encode_mcu_AC_first;\n  } else {\n    if (is_DC_band)\n      entropy->pub.encode_mcu = encode_mcu_DC_refine;\n    else {\n      entropy->pub.encode_mcu = encode_mcu_AC_refine;\n      /* AC refinement needs a correction bit buffer */\n      if (entropy->bit_buffer == NULL)\n\tentropy->bit_buffer = (char *)\n\t  (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\t      MAX_CORR_BITS * SIZEOF(char));\n    }\n  }\n  if (gather_statistics)\n    entropy->pub.finish_pass = finish_pass_gather_phuff;\n  else\n    entropy->pub.finish_pass = finish_pass_phuff;\n\n  /* Only DC coefficients may be interleaved, so cinfo->comps_in_scan = 1\n   * for AC coefficients.\n   */\n  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {\n    compptr = cinfo->cur_comp_info[ci];\n    /* Initialize DC predictions to 0 */\n    entropy->last_dc_val[ci] = 0;\n    /* Get table index */\n    if (is_DC_band) {\n      if (cinfo->Ah != 0)\t/* DC refinement needs no table */\n\tcontinue;\n      tbl = compptr->dc_tbl_no;\n    } else {\n      entropy->ac_tbl_no = tbl = compptr->ac_tbl_no;\n    }\n    if (gather_statistics) {\n      /* Check for invalid table index */\n      /* (make_c_derived_tbl does this in the other path) */\n      if (tbl < 0 || tbl >= NUM_HUFF_TBLS)\n        ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tbl);\n      /* Allocate and zero the statistics tables */\n      /* Note that jpeg_gen_optimal_table expects 257 entries in each table! */\n      if (entropy->count_ptrs[tbl] == NULL)\n\tentropy->count_ptrs[tbl] = (long *)\n\t  (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\t      257 * SIZEOF(long));\n      MEMZERO(entropy->count_ptrs[tbl], 257 * SIZEOF(long));\n    } else {\n      /* Compute derived values for Huffman table */\n      /* We may do this more than once for a table, but it's not expensive */\n      jpeg_make_c_derived_tbl(cinfo, is_DC_band, tbl,\n\t\t\t      & entropy->derived_tbls[tbl]);\n    }\n  }\n\n  /* Initialize AC stuff */\n  entropy->EOBRUN = 0;\n  entropy->BE = 0;\n\n  /* Initialize bit buffer to empty */\n  entropy->put_buffer = 0;\n  entropy->put_bits = 0;\n\n  /* Initialize restart stuff */\n  entropy->restarts_to_go = cinfo->restart_interval;\n  entropy->next_restart_num = 0;\n}\n\n\n/* Outputting bytes to the file.\n * NB: these must be called only when actually outputting,\n * that is, entropy->gather_statistics == FALSE.\n */\n\n/* Emit a byte */\n#define emit_byte(entropy,val)  \\\n\t{ *(entropy)->next_output_byte++ = (JOCTET) (val);  \\\n\t  if (--(entropy)->free_in_buffer == 0)  \\\n\t    dump_buffer(entropy); }\n\n\nLOCAL(void)\ndump_buffer (phuff_entropy_ptr entropy)\n/* Empty the output buffer; we do not support suspension in this module. */\n{\n  struct jpeg_destination_mgr * dest = entropy->cinfo->dest;\n\n  if (! (*dest->empty_output_buffer) (entropy->cinfo))\n    ERREXIT(entropy->cinfo, JERR_CANT_SUSPEND);\n  /* After a successful buffer dump, must reset buffer pointers */\n  entropy->next_output_byte = dest->next_output_byte;\n  entropy->free_in_buffer = dest->free_in_buffer;\n}\n\n\n/* Outputting bits to the file */\n\n/* Only the right 24 bits of put_buffer are used; the valid bits are\n * left-justified in this part.  At most 16 bits can be passed to emit_bits\n * in one call, and we never retain more than 7 bits in put_buffer\n * between calls, so 24 bits are sufficient.\n */\n\nINLINE\nLOCAL(void)\nemit_bits (phuff_entropy_ptr entropy, unsigned int code, int size)\n/* Emit some bits, unless we are in gather mode */\n{\n  /* This routine is heavily used, so it's worth coding tightly. */\n  register INT32 put_buffer = (INT32) code;\n  register int put_bits = entropy->put_bits;\n\n  /* if size is 0, caller used an invalid Huffman table entry */\n  if (size == 0)\n    ERREXIT(entropy->cinfo, JERR_HUFF_MISSING_CODE);\n\n  if (entropy->gather_statistics)\n    return;\t\t\t/* do nothing if we're only getting stats */\n\n  put_buffer &= (((INT32) 1)<<size) - 1; /* mask off any extra bits in code */\n  \n  put_bits += size;\t\t/* new number of bits in buffer */\n  \n  put_buffer <<= 24 - put_bits; /* align incoming bits */\n\n  put_buffer |= entropy->put_buffer; /* and merge with old buffer contents */\n\n  while (put_bits >= 8) {\n    int c = (int) ((put_buffer >> 16) & 0xFF);\n    \n    emit_byte(entropy, c);\n    if (c == 0xFF) {\t\t/* need to stuff a zero byte? */\n      emit_byte(entropy, 0);\n    }\n    put_buffer <<= 8;\n    put_bits -= 8;\n  }\n\n  entropy->put_buffer = put_buffer; /* update variables */\n  entropy->put_bits = put_bits;\n}\n\n\nLOCAL(void)\nflush_bits (phuff_entropy_ptr entropy)\n{\n  emit_bits(entropy, 0x7F, 7); /* fill any partial byte with ones */\n  entropy->put_buffer = 0;     /* and reset bit-buffer to empty */\n  entropy->put_bits = 0;\n}\n\n\n/*\n * Emit (or just count) a Huffman symbol.\n */\n\nINLINE\nLOCAL(void)\nemit_symbol (phuff_entropy_ptr entropy, int tbl_no, int symbol)\n{\n  if (entropy->gather_statistics)\n    entropy->count_ptrs[tbl_no][symbol]++;\n  else {\n    c_derived_tbl * tbl = entropy->derived_tbls[tbl_no];\n    emit_bits(entropy, tbl->ehufco[symbol], tbl->ehufsi[symbol]);\n  }\n}\n\n\n/*\n * Emit bits from a correction bit buffer.\n */\n\nLOCAL(void)\nemit_buffered_bits (phuff_entropy_ptr entropy, char * bufstart,\n\t\t    unsigned int nbits)\n{\n  if (entropy->gather_statistics)\n    return;\t\t\t/* no real work */\n\n  while (nbits > 0) {\n    emit_bits(entropy, (unsigned int) (*bufstart), 1);\n    bufstart++;\n    nbits--;\n  }\n}\n\n\n/*\n * Emit any pending EOBRUN symbol.\n */\n\nLOCAL(void)\nemit_eobrun (phuff_entropy_ptr entropy)\n{\n  register int temp, nbits;\n\n  if (entropy->EOBRUN > 0) {\t/* if there is any pending EOBRUN */\n    temp = entropy->EOBRUN;\n    nbits = 0;\n    while ((temp >>= 1))\n      nbits++;\n    /* safety check: shouldn't happen given limited correction-bit buffer */\n    if (nbits > 14)\n      ERREXIT(entropy->cinfo, JERR_HUFF_MISSING_CODE);\n\n    emit_symbol(entropy, entropy->ac_tbl_no, nbits << 4);\n    if (nbits)\n      emit_bits(entropy, entropy->EOBRUN, nbits);\n\n    entropy->EOBRUN = 0;\n\n    /* Emit any buffered correction bits */\n    emit_buffered_bits(entropy, entropy->bit_buffer, entropy->BE);\n    entropy->BE = 0;\n  }\n}\n\n\n/*\n * Emit a restart marker & resynchronize predictions.\n */\n\nLOCAL(void)\nemit_restart (phuff_entropy_ptr entropy, int restart_num)\n{\n  int ci;\n\n  emit_eobrun(entropy);\n\n  if (! entropy->gather_statistics) {\n    flush_bits(entropy);\n    emit_byte(entropy, 0xFF);\n    emit_byte(entropy, JPEG_RST0 + restart_num);\n  }\n\n  if (entropy->cinfo->Ss == 0) {\n    /* Re-initialize DC predictions to 0 */\n    for (ci = 0; ci < entropy->cinfo->comps_in_scan; ci++)\n      entropy->last_dc_val[ci] = 0;\n  } else {\n    /* Re-initialize all AC-related fields to 0 */\n    entropy->EOBRUN = 0;\n    entropy->BE = 0;\n  }\n}\n\n\n/*\n * MCU encoding for DC initial scan (either spectral selection,\n * or first pass of successive approximation).\n */\n\nMETHODDEF(boolean)\nencode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)\n{\n  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;\n  register int temp, temp2;\n  register int nbits;\n  int blkn, ci;\n  int Al = cinfo->Al;\n  JBLOCKROW block;\n  jpeg_component_info * compptr;\n  ISHIFT_TEMPS\n\n  entropy->next_output_byte = cinfo->dest->next_output_byte;\n  entropy->free_in_buffer = cinfo->dest->free_in_buffer;\n\n  /* Emit restart marker if needed */\n  if (cinfo->restart_interval)\n    if (entropy->restarts_to_go == 0)\n      emit_restart(entropy, entropy->next_restart_num);\n\n  /* Encode the MCU data blocks */\n  for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {\n    block = MCU_data[blkn];\n    ci = cinfo->MCU_membership[blkn];\n    compptr = cinfo->cur_comp_info[ci];\n\n    /* Compute the DC value after the required point transform by Al.\n     * This is simply an arithmetic right shift.\n     */\n    temp2 = IRIGHT_SHIFT((int) ((*block)[0]), Al);\n\n    /* DC differences are figured on the point-transformed values. */\n    temp = temp2 - entropy->last_dc_val[ci];\n    entropy->last_dc_val[ci] = temp2;\n\n    /* Encode the DC coefficient difference per section G.1.2.1 */\n    temp2 = temp;\n    if (temp < 0) {\n      temp = -temp;\t\t/* temp is abs value of input */\n      /* For a negative input, want temp2 = bitwise complement of abs(input) */\n      /* This code assumes we are on a two's complement machine */\n      temp2--;\n    }\n    \n    /* Find the number of bits needed for the magnitude of the coefficient */\n    nbits = 0;\n    while (temp) {\n      nbits++;\n      temp >>= 1;\n    }\n    /* Check for out-of-range coefficient values.\n     * Since we're encoding a difference, the range limit is twice as much.\n     */\n    if (nbits > MAX_COEF_BITS+1)\n      ERREXIT(cinfo, JERR_BAD_DCT_COEF);\n    \n    /* Count/emit the Huffman-coded symbol for the number of bits */\n    emit_symbol(entropy, compptr->dc_tbl_no, nbits);\n    \n    /* Emit that number of bits of the value, if positive, */\n    /* or the complement of its magnitude, if negative. */\n    if (nbits)\t\t\t/* emit_bits rejects calls with size 0 */\n      emit_bits(entropy, (unsigned int) temp2, nbits);\n  }\n\n  cinfo->dest->next_output_byte = entropy->next_output_byte;\n  cinfo->dest->free_in_buffer = entropy->free_in_buffer;\n\n  /* Update restart-interval state too */\n  if (cinfo->restart_interval) {\n    if (entropy->restarts_to_go == 0) {\n      entropy->restarts_to_go = cinfo->restart_interval;\n      entropy->next_restart_num++;\n      entropy->next_restart_num &= 7;\n    }\n    entropy->restarts_to_go--;\n  }\n\n  return TRUE;\n}\n\n\n/*\n * MCU encoding for AC initial scan (either spectral selection,\n * or first pass of successive approximation).\n */\n\nMETHODDEF(boolean)\nencode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)\n{\n  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;\n  register int temp, temp2;\n  register int nbits;\n  register int r, k;\n  int Se = cinfo->Se;\n  int Al = cinfo->Al;\n  JBLOCKROW block;\n\n  entropy->next_output_byte = cinfo->dest->next_output_byte;\n  entropy->free_in_buffer = cinfo->dest->free_in_buffer;\n\n  /* Emit restart marker if needed */\n  if (cinfo->restart_interval)\n    if (entropy->restarts_to_go == 0)\n      emit_restart(entropy, entropy->next_restart_num);\n\n  /* Encode the MCU data block */\n  block = MCU_data[0];\n\n  /* Encode the AC coefficients per section G.1.2.2, fig. G.3 */\n  \n  r = 0;\t\t\t/* r = run length of zeros */\n   \n  for (k = cinfo->Ss; k <= Se; k++) {\n    if ((temp = (*block)[jpeg_natural_order[k]]) == 0) {\n      r++;\n      continue;\n    }\n    /* We must apply the point transform by Al.  For AC coefficients this\n     * is an integer division with rounding towards 0.  To do this portably\n     * in C, we shift after obtaining the absolute value; so the code is\n     * interwoven with finding the abs value (temp) and output bits (temp2).\n     */\n    if (temp < 0) {\n      temp = -temp;\t\t/* temp is abs value of input */\n      temp >>= Al;\t\t/* apply the point transform */\n      /* For a negative coef, want temp2 = bitwise complement of abs(coef) */\n      temp2 = ~temp;\n    } else {\n      temp >>= Al;\t\t/* apply the point transform */\n      temp2 = temp;\n    }\n    /* Watch out for case that nonzero coef is zero after point transform */\n    if (temp == 0) {\n      r++;\n      continue;\n    }\n\n    /* Emit any pending EOBRUN */\n    if (entropy->EOBRUN > 0)\n      emit_eobrun(entropy);\n    /* if run length > 15, must emit special run-length-16 codes (0xF0) */\n    while (r > 15) {\n      emit_symbol(entropy, entropy->ac_tbl_no, 0xF0);\n      r -= 16;\n    }\n\n    /* Find the number of bits needed for the magnitude of the coefficient */\n    nbits = 1;\t\t\t/* there must be at least one 1 bit */\n    while ((temp >>= 1))\n      nbits++;\n    /* Check for out-of-range coefficient values */\n    if (nbits > MAX_COEF_BITS)\n      ERREXIT(cinfo, JERR_BAD_DCT_COEF);\n\n    /* Count/emit Huffman symbol for run length / number of bits */\n    emit_symbol(entropy, entropy->ac_tbl_no, (r << 4) + nbits);\n\n    /* Emit that number of bits of the value, if positive, */\n    /* or the complement of its magnitude, if negative. */\n    emit_bits(entropy, (unsigned int) temp2, nbits);\n\n    r = 0;\t\t\t/* reset zero run length */\n  }\n\n  if (r > 0) {\t\t\t/* If there are trailing zeroes, */\n    entropy->EOBRUN++;\t\t/* count an EOB */\n    if (entropy->EOBRUN == 0x7FFF)\n      emit_eobrun(entropy);\t/* force it out to avoid overflow */\n  }\n\n  cinfo->dest->next_output_byte = entropy->next_output_byte;\n  cinfo->dest->free_in_buffer = entropy->free_in_buffer;\n\n  /* Update restart-interval state too */\n  if (cinfo->restart_interval) {\n    if (entropy->restarts_to_go == 0) {\n      entropy->restarts_to_go = cinfo->restart_interval;\n      entropy->next_restart_num++;\n      entropy->next_restart_num &= 7;\n    }\n    entropy->restarts_to_go--;\n  }\n\n  return TRUE;\n}\n\n\n/*\n * MCU encoding for DC successive approximation refinement scan.\n * Note: we assume such scans can be multi-component, although the spec\n * is not very clear on the point.\n */\n\nMETHODDEF(boolean)\nencode_mcu_DC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)\n{\n  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;\n  register int temp;\n  int blkn;\n  int Al = cinfo->Al;\n  JBLOCKROW block;\n\n  entropy->next_output_byte = cinfo->dest->next_output_byte;\n  entropy->free_in_buffer = cinfo->dest->free_in_buffer;\n\n  /* Emit restart marker if needed */\n  if (cinfo->restart_interval)\n    if (entropy->restarts_to_go == 0)\n      emit_restart(entropy, entropy->next_restart_num);\n\n  /* Encode the MCU data blocks */\n  for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {\n    block = MCU_data[blkn];\n\n    /* We simply emit the Al'th bit of the DC coefficient value. */\n    temp = (*block)[0];\n    emit_bits(entropy, (unsigned int) (temp >> Al), 1);\n  }\n\n  cinfo->dest->next_output_byte = entropy->next_output_byte;\n  cinfo->dest->free_in_buffer = entropy->free_in_buffer;\n\n  /* Update restart-interval state too */\n  if (cinfo->restart_interval) {\n    if (entropy->restarts_to_go == 0) {\n      entropy->restarts_to_go = cinfo->restart_interval;\n      entropy->next_restart_num++;\n      entropy->next_restart_num &= 7;\n    }\n    entropy->restarts_to_go--;\n  }\n\n  return TRUE;\n}\n\n\n/*\n * MCU encoding for AC successive approximation refinement scan.\n */\n\nMETHODDEF(boolean)\nencode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)\n{\n  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;\n  register int temp;\n  register int r, k;\n  int EOB;\n  char *BR_buffer;\n  unsigned int BR;\n  int Se = cinfo->Se;\n  int Al = cinfo->Al;\n  JBLOCKROW block;\n  int absvalues[DCTSIZE2];\n\n  entropy->next_output_byte = cinfo->dest->next_output_byte;\n  entropy->free_in_buffer = cinfo->dest->free_in_buffer;\n\n  /* Emit restart marker if needed */\n  if (cinfo->restart_interval)\n    if (entropy->restarts_to_go == 0)\n      emit_restart(entropy, entropy->next_restart_num);\n\n  /* Encode the MCU data block */\n  block = MCU_data[0];\n\n  /* It is convenient to make a pre-pass to determine the transformed\n   * coefficients' absolute values and the EOB position.\n   */\n  EOB = 0;\n  for (k = cinfo->Ss; k <= Se; k++) {\n    temp = (*block)[jpeg_natural_order[k]];\n    /* We must apply the point transform by Al.  For AC coefficients this\n     * is an integer division with rounding towards 0.  To do this portably\n     * in C, we shift after obtaining the absolute value.\n     */\n    if (temp < 0)\n      temp = -temp;\t\t/* temp is abs value of input */\n    temp >>= Al;\t\t/* apply the point transform */\n    absvalues[k] = temp;\t/* save abs value for main pass */\n    if (temp == 1)\n      EOB = k;\t\t\t/* EOB = index of last newly-nonzero coef */\n  }\n\n  /* Encode the AC coefficients per section G.1.2.3, fig. G.7 */\n  \n  r = 0;\t\t\t/* r = run length of zeros */\n  BR = 0;\t\t\t/* BR = count of buffered bits added now */\n  BR_buffer = entropy->bit_buffer + entropy->BE; /* Append bits to buffer */\n\n  for (k = cinfo->Ss; k <= Se; k++) {\n    if ((temp = absvalues[k]) == 0) {\n      r++;\n      continue;\n    }\n\n    /* Emit any required ZRLs, but not if they can be folded into EOB */\n    while (r > 15 && k <= EOB) {\n      /* emit any pending EOBRUN and the BE correction bits */\n      emit_eobrun(entropy);\n      /* Emit ZRL */\n      emit_symbol(entropy, entropy->ac_tbl_no, 0xF0);\n      r -= 16;\n      /* Emit buffered correction bits that must be associated with ZRL */\n      emit_buffered_bits(entropy, BR_buffer, BR);\n      BR_buffer = entropy->bit_buffer; /* BE bits are gone now */\n      BR = 0;\n    }\n\n    /* If the coef was previously nonzero, it only needs a correction bit.\n     * NOTE: a straight translation of the spec's figure G.7 would suggest\n     * that we also need to test r > 15.  But if r > 15, we can only get here\n     * if k > EOB, which implies that this coefficient is not 1.\n     */\n    if (temp > 1) {\n      /* The correction bit is the next bit of the absolute value. */\n      BR_buffer[BR++] = (char) (temp & 1);\n      continue;\n    }\n\n    /* Emit any pending EOBRUN and the BE correction bits */\n    emit_eobrun(entropy);\n\n    /* Count/emit Huffman symbol for run length / number of bits */\n    emit_symbol(entropy, entropy->ac_tbl_no, (r << 4) + 1);\n\n    /* Emit output bit for newly-nonzero coef */\n    temp = ((*block)[jpeg_natural_order[k]] < 0) ? 0 : 1;\n    emit_bits(entropy, (unsigned int) temp, 1);\n\n    /* Emit buffered correction bits that must be associated with this code */\n    emit_buffered_bits(entropy, BR_buffer, BR);\n    BR_buffer = entropy->bit_buffer; /* BE bits are gone now */\n    BR = 0;\n    r = 0;\t\t\t/* reset zero run length */\n  }\n\n  if (r > 0 || BR > 0) {\t/* If there are trailing zeroes, */\n    entropy->EOBRUN++;\t\t/* count an EOB */\n    entropy->BE += BR;\t\t/* concat my correction bits to older ones */\n    /* We force out the EOB if we risk either:\n     * 1. overflow of the EOB counter;\n     * 2. overflow of the correction bit buffer during the next MCU.\n     */\n    if (entropy->EOBRUN == 0x7FFF || entropy->BE > (MAX_CORR_BITS-DCTSIZE2+1))\n      emit_eobrun(entropy);\n  }\n\n  cinfo->dest->next_output_byte = entropy->next_output_byte;\n  cinfo->dest->free_in_buffer = entropy->free_in_buffer;\n\n  /* Update restart-interval state too */\n  if (cinfo->restart_interval) {\n    if (entropy->restarts_to_go == 0) {\n      entropy->restarts_to_go = cinfo->restart_interval;\n      entropy->next_restart_num++;\n      entropy->next_restart_num &= 7;\n    }\n    entropy->restarts_to_go--;\n  }\n\n  return TRUE;\n}\n\n\n/*\n * Finish up at the end of a Huffman-compressed progressive scan.\n */\n\nMETHODDEF(void)\nfinish_pass_phuff (j_compress_ptr cinfo)\n{   \n  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;\n\n  entropy->next_output_byte = cinfo->dest->next_output_byte;\n  entropy->free_in_buffer = cinfo->dest->free_in_buffer;\n\n  /* Flush out any buffered data */\n  emit_eobrun(entropy);\n  flush_bits(entropy);\n\n  cinfo->dest->next_output_byte = entropy->next_output_byte;\n  cinfo->dest->free_in_buffer = entropy->free_in_buffer;\n}\n\n\n/*\n * Finish up a statistics-gathering pass and create the new Huffman tables.\n */\n\nMETHODDEF(void)\nfinish_pass_gather_phuff (j_compress_ptr cinfo)\n{\n  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;\n  boolean is_DC_band;\n  int ci, tbl;\n  jpeg_component_info * compptr;\n  JHUFF_TBL **htblptr;\n  boolean did[NUM_HUFF_TBLS];\n\n  /* Flush out buffered data (all we care about is counting the EOB symbol) */\n  emit_eobrun(entropy);\n\n  is_DC_band = (cinfo->Ss == 0);\n\n  /* It's important not to apply jpeg_gen_optimal_table more than once\n   * per table, because it clobbers the input frequency counts!\n   */\n  MEMZERO(did, SIZEOF(did));\n\n  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {\n    compptr = cinfo->cur_comp_info[ci];\n    if (is_DC_band) {\n      if (cinfo->Ah != 0)\t/* DC refinement needs no table */\n\tcontinue;\n      tbl = compptr->dc_tbl_no;\n    } else {\n      tbl = compptr->ac_tbl_no;\n    }\n    if (! did[tbl]) {\n      if (is_DC_band)\n        htblptr = & cinfo->dc_huff_tbl_ptrs[tbl];\n      else\n        htblptr = & cinfo->ac_huff_tbl_ptrs[tbl];\n      if (*htblptr == NULL)\n        *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo);\n      jpeg_gen_optimal_table(cinfo, *htblptr, entropy->count_ptrs[tbl]);\n      did[tbl] = TRUE;\n    }\n  }\n}\n\n\n/*\n * Module initialization routine for progressive Huffman entropy encoding.\n */\n\nGLOBAL(void)\njinit_phuff_encoder (j_compress_ptr cinfo)\n{\n  phuff_entropy_ptr entropy;\n  int i;\n\n  entropy = (phuff_entropy_ptr)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\tSIZEOF(phuff_entropy_encoder));\n  cinfo->entropy = (struct jpeg_entropy_encoder *) entropy;\n  entropy->pub.start_pass = start_pass_phuff;\n\n  /* Mark tables unallocated */\n  for (i = 0; i < NUM_HUFF_TBLS; i++) {\n    entropy->derived_tbls[i] = NULL;\n    entropy->count_ptrs[i] = NULL;\n  }\n  entropy->bit_buffer = NULL;\t/* needed only in AC refinement scan */\n}\n\n#endif /* C_PROGRESSIVE_SUPPORTED */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jcprepct.c",
    "content": "/*\n * jcprepct.c\n *\n * Copyright (C) 1994-1996, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains the compression preprocessing controller.\n * This controller manages the color conversion, downsampling,\n * and edge expansion steps.\n *\n * Most of the complexity here is associated with buffering input rows\n * as required by the downsampler.  See the comments at the head of\n * jcsample.c for the downsampler's needs.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n\n\n/* At present, jcsample.c can request context rows only for smoothing.\n * In the future, we might also need context rows for CCIR601 sampling\n * or other more-complex downsampling procedures.  The code to support\n * context rows should be compiled only if needed.\n */\n#ifdef INPUT_SMOOTHING_SUPPORTED\n#define CONTEXT_ROWS_SUPPORTED\n#endif\n\n\n/*\n * For the simple (no-context-row) case, we just need to buffer one\n * row group's worth of pixels for the downsampling step.  At the bottom of\n * the image, we pad to a full row group by replicating the last pixel row.\n * The downsampler's last output row is then replicated if needed to pad\n * out to a full iMCU row.\n *\n * When providing context rows, we must buffer three row groups' worth of\n * pixels.  Three row groups are physically allocated, but the row pointer\n * arrays are made five row groups high, with the extra pointers above and\n * below \"wrapping around\" to point to the last and first real row groups.\n * This allows the downsampler to access the proper context rows.\n * At the top and bottom of the image, we create dummy context rows by\n * copying the first or last real pixel row.  This copying could be avoided\n * by pointer hacking as is done in jdmainct.c, but it doesn't seem worth the\n * trouble on the compression side.\n */\n\n\n/* Private buffer controller object */\n\ntypedef struct {\n  struct jpeg_c_prep_controller pub; /* public fields */\n\n  /* Downsampling input buffer.  This buffer holds color-converted data\n   * until we have enough to do a downsample step.\n   */\n  JSAMPARRAY color_buf[MAX_COMPONENTS];\n\n  JDIMENSION rows_to_go;\t/* counts rows remaining in source image */\n  int next_buf_row;\t\t/* index of next row to store in color_buf */\n\n#ifdef CONTEXT_ROWS_SUPPORTED\t/* only needed for context case */\n  int this_row_group;\t\t/* starting row index of group to process */\n  int next_buf_stop;\t\t/* downsample when we reach this index */\n#endif\n} my_prep_controller;\n\ntypedef my_prep_controller * my_prep_ptr;\n\n\n/*\n * Initialize for a processing pass.\n */\n\nMETHODDEF(void)\nstart_pass_prep (j_compress_ptr cinfo, J_BUF_MODE pass_mode)\n{\n  my_prep_ptr prep = (my_prep_ptr) cinfo->prep;\n\n  if (pass_mode != JBUF_PASS_THRU)\n    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);\n\n  /* Initialize total-height counter for detecting bottom of image */\n  prep->rows_to_go = cinfo->image_height;\n  /* Mark the conversion buffer empty */\n  prep->next_buf_row = 0;\n#ifdef CONTEXT_ROWS_SUPPORTED\n  /* Preset additional state variables for context mode.\n   * These aren't used in non-context mode, so we needn't test which mode.\n   */\n  prep->this_row_group = 0;\n  /* Set next_buf_stop to stop after two row groups have been read in. */\n  prep->next_buf_stop = 2 * cinfo->max_v_samp_factor;\n#endif\n}\n\n\n/*\n * Expand an image vertically from height input_rows to height output_rows,\n * by duplicating the bottom row.\n */\n\nLOCAL(void)\nexpand_bottom_edge (JSAMPARRAY image_data, JDIMENSION num_cols,\n\t\t    int input_rows, int output_rows)\n{\n  register int row;\n\n  for (row = input_rows; row < output_rows; row++) {\n    jcopy_sample_rows(image_data, input_rows-1, image_data, row,\n\t\t      1, num_cols);\n  }\n}\n\n\n/*\n * Process some data in the simple no-context case.\n *\n * Preprocessor output data is counted in \"row groups\".  A row group\n * is defined to be v_samp_factor sample rows of each component.\n * Downsampling will produce this much data from each max_v_samp_factor\n * input rows.\n */\n\nMETHODDEF(void)\npre_process_data (j_compress_ptr cinfo,\n\t\t  JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,\n\t\t  JDIMENSION in_rows_avail,\n\t\t  JSAMPIMAGE output_buf, JDIMENSION *out_row_group_ctr,\n\t\t  JDIMENSION out_row_groups_avail)\n{\n  my_prep_ptr prep = (my_prep_ptr) cinfo->prep;\n  int numrows, ci;\n  JDIMENSION inrows;\n  jpeg_component_info * compptr;\n\n  while (*in_row_ctr < in_rows_avail &&\n\t *out_row_group_ctr < out_row_groups_avail) {\n    /* Do color conversion to fill the conversion buffer. */\n    inrows = in_rows_avail - *in_row_ctr;\n    numrows = cinfo->max_v_samp_factor - prep->next_buf_row;\n    numrows = (int) MIN((JDIMENSION) numrows, inrows);\n    (*cinfo->cconvert->color_convert) (cinfo, input_buf + *in_row_ctr,\n\t\t\t\t       prep->color_buf,\n\t\t\t\t       (JDIMENSION) prep->next_buf_row,\n\t\t\t\t       numrows);\n    *in_row_ctr += numrows;\n    prep->next_buf_row += numrows;\n    prep->rows_to_go -= numrows;\n    /* If at bottom of image, pad to fill the conversion buffer. */\n    if (prep->rows_to_go == 0 &&\n\tprep->next_buf_row < cinfo->max_v_samp_factor) {\n      for (ci = 0; ci < cinfo->num_components; ci++) {\n\texpand_bottom_edge(prep->color_buf[ci], cinfo->image_width,\n\t\t\t   prep->next_buf_row, cinfo->max_v_samp_factor);\n      }\n      prep->next_buf_row = cinfo->max_v_samp_factor;\n    }\n    /* If we've filled the conversion buffer, empty it. */\n    if (prep->next_buf_row == cinfo->max_v_samp_factor) {\n      (*cinfo->downsample->downsample) (cinfo,\n\t\t\t\t\tprep->color_buf, (JDIMENSION) 0,\n\t\t\t\t\toutput_buf, *out_row_group_ctr);\n      prep->next_buf_row = 0;\n      (*out_row_group_ctr)++;\n    }\n    /* If at bottom of image, pad the output to a full iMCU height.\n     * Note we assume the caller is providing a one-iMCU-height output buffer!\n     */\n    if (prep->rows_to_go == 0 &&\n\t*out_row_group_ctr < out_row_groups_avail) {\n      for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n\t   ci++, compptr++) {\n\texpand_bottom_edge(output_buf[ci],\n\t\t\t   compptr->width_in_blocks * DCTSIZE,\n\t\t\t   (int) (*out_row_group_ctr * compptr->v_samp_factor),\n\t\t\t   (int) (out_row_groups_avail * compptr->v_samp_factor));\n      }\n      *out_row_group_ctr = out_row_groups_avail;\n      break;\t\t\t/* can exit outer loop without test */\n    }\n  }\n}\n\n\n#ifdef CONTEXT_ROWS_SUPPORTED\n\n/*\n * Process some data in the context case.\n */\n\nMETHODDEF(void)\npre_process_context (j_compress_ptr cinfo,\n\t\t     JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,\n\t\t     JDIMENSION in_rows_avail,\n\t\t     JSAMPIMAGE output_buf, JDIMENSION *out_row_group_ctr,\n\t\t     JDIMENSION out_row_groups_avail)\n{\n  my_prep_ptr prep = (my_prep_ptr) cinfo->prep;\n  int numrows, ci;\n  int buf_height = cinfo->max_v_samp_factor * 3;\n  JDIMENSION inrows;\n\n  while (*out_row_group_ctr < out_row_groups_avail) {\n    if (*in_row_ctr < in_rows_avail) {\n      /* Do color conversion to fill the conversion buffer. */\n      inrows = in_rows_avail - *in_row_ctr;\n      numrows = prep->next_buf_stop - prep->next_buf_row;\n      numrows = (int) MIN((JDIMENSION) numrows, inrows);\n      (*cinfo->cconvert->color_convert) (cinfo, input_buf + *in_row_ctr,\n\t\t\t\t\t prep->color_buf,\n\t\t\t\t\t (JDIMENSION) prep->next_buf_row,\n\t\t\t\t\t numrows);\n      /* Pad at top of image, if first time through */\n      if (prep->rows_to_go == cinfo->image_height) {\n\tfor (ci = 0; ci < cinfo->num_components; ci++) {\n\t  int row;\n\t  for (row = 1; row <= cinfo->max_v_samp_factor; row++) {\n\t    jcopy_sample_rows(prep->color_buf[ci], 0,\n\t\t\t      prep->color_buf[ci], -row,\n\t\t\t      1, cinfo->image_width);\n\t  }\n\t}\n      }\n      *in_row_ctr += numrows;\n      prep->next_buf_row += numrows;\n      prep->rows_to_go -= numrows;\n    } else {\n      /* Return for more data, unless we are at the bottom of the image. */\n      if (prep->rows_to_go != 0)\n\tbreak;\n      /* When at bottom of image, pad to fill the conversion buffer. */\n      if (prep->next_buf_row < prep->next_buf_stop) {\n\tfor (ci = 0; ci < cinfo->num_components; ci++) {\n\t  expand_bottom_edge(prep->color_buf[ci], cinfo->image_width,\n\t\t\t     prep->next_buf_row, prep->next_buf_stop);\n\t}\n\tprep->next_buf_row = prep->next_buf_stop;\n      }\n    }\n    /* If we've gotten enough data, downsample a row group. */\n    if (prep->next_buf_row == prep->next_buf_stop) {\n      (*cinfo->downsample->downsample) (cinfo,\n\t\t\t\t\tprep->color_buf,\n\t\t\t\t\t(JDIMENSION) prep->this_row_group,\n\t\t\t\t\toutput_buf, *out_row_group_ctr);\n      (*out_row_group_ctr)++;\n      /* Advance pointers with wraparound as necessary. */\n      prep->this_row_group += cinfo->max_v_samp_factor;\n      if (prep->this_row_group >= buf_height)\n\tprep->this_row_group = 0;\n      if (prep->next_buf_row >= buf_height)\n\tprep->next_buf_row = 0;\n      prep->next_buf_stop = prep->next_buf_row + cinfo->max_v_samp_factor;\n    }\n  }\n}\n\n\n/*\n * Create the wrapped-around downsampling input buffer needed for context mode.\n */\n\nLOCAL(void)\ncreate_context_buffer (j_compress_ptr cinfo)\n{\n  my_prep_ptr prep = (my_prep_ptr) cinfo->prep;\n  int rgroup_height = cinfo->max_v_samp_factor;\n  int ci, i;\n  jpeg_component_info * compptr;\n  JSAMPARRAY true_buffer, fake_buffer;\n\n  /* Grab enough space for fake row pointers for all the components;\n   * we need five row groups' worth of pointers for each component.\n   */\n  fake_buffer = (JSAMPARRAY)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\t(cinfo->num_components * 5 * rgroup_height) *\n\t\t\t\tSIZEOF(JSAMPROW));\n\n  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n       ci++, compptr++) {\n    /* Allocate the actual buffer space (3 row groups) for this component.\n     * We make the buffer wide enough to allow the downsampler to edge-expand\n     * horizontally within the buffer, if it so chooses.\n     */\n    true_buffer = (*cinfo->mem->alloc_sarray)\n      ((j_common_ptr) cinfo, JPOOL_IMAGE,\n       (JDIMENSION) (((long) compptr->width_in_blocks * DCTSIZE *\n\t\t      cinfo->max_h_samp_factor) / compptr->h_samp_factor),\n       (JDIMENSION) (3 * rgroup_height));\n    /* Copy true buffer row pointers into the middle of the fake row array */\n    MEMCOPY(fake_buffer + rgroup_height, true_buffer,\n\t    3 * rgroup_height * SIZEOF(JSAMPROW));\n    /* Fill in the above and below wraparound pointers */\n    for (i = 0; i < rgroup_height; i++) {\n      fake_buffer[i] = true_buffer[2 * rgroup_height + i];\n      fake_buffer[4 * rgroup_height + i] = true_buffer[i];\n    }\n    prep->color_buf[ci] = fake_buffer + rgroup_height;\n    fake_buffer += 5 * rgroup_height; /* point to space for next component */\n  }\n}\n\n#endif /* CONTEXT_ROWS_SUPPORTED */\n\n\n/*\n * Initialize preprocessing controller.\n */\n\nGLOBAL(void)\njinit_c_prep_controller (j_compress_ptr cinfo, boolean need_full_buffer)\n{\n  my_prep_ptr prep;\n  int ci;\n  jpeg_component_info * compptr;\n\n  if (need_full_buffer)\t\t/* safety check */\n    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);\n\n  prep = (my_prep_ptr)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\tSIZEOF(my_prep_controller));\n  cinfo->prep = (struct jpeg_c_prep_controller *) prep;\n  prep->pub.start_pass = start_pass_prep;\n\n  /* Allocate the color conversion buffer.\n   * We make the buffer wide enough to allow the downsampler to edge-expand\n   * horizontally within the buffer, if it so chooses.\n   */\n  if (cinfo->downsample->need_context_rows) {\n    /* Set up to provide context rows */\n#ifdef CONTEXT_ROWS_SUPPORTED\n    prep->pub.pre_process_data = pre_process_context;\n    create_context_buffer(cinfo);\n#else\n    ERREXIT(cinfo, JERR_NOT_COMPILED);\n#endif\n  } else {\n    /* No context, just make it tall enough for one row group */\n    prep->pub.pre_process_data = pre_process_data;\n    for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n\t ci++, compptr++) {\n      prep->color_buf[ci] = (*cinfo->mem->alloc_sarray)\n\t((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t (JDIMENSION) (((long) compptr->width_in_blocks * DCTSIZE *\n\t\t\tcinfo->max_h_samp_factor) / compptr->h_samp_factor),\n\t (JDIMENSION) cinfo->max_v_samp_factor);\n    }\n  }\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jcsample.c",
    "content": "/*\n * jcsample.c\n *\n * Copyright (C) 1991-1996, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains downsampling routines.\n *\n * Downsampling input data is counted in \"row groups\".  A row group\n * is defined to be max_v_samp_factor pixel rows of each component,\n * from which the downsampler produces v_samp_factor sample rows.\n * A single row group is processed in each call to the downsampler module.\n *\n * The downsampler is responsible for edge-expansion of its output data\n * to fill an integral number of DCT blocks horizontally.  The source buffer\n * may be modified if it is helpful for this purpose (the source buffer is\n * allocated wide enough to correspond to the desired output width).\n * The caller (the prep controller) is responsible for vertical padding.\n *\n * The downsampler may request \"context rows\" by setting need_context_rows\n * during startup.  In this case, the input arrays will contain at least\n * one row group's worth of pixels above and below the passed-in data;\n * the caller will create dummy rows at image top and bottom by replicating\n * the first or last real pixel row.\n *\n * An excellent reference for image resampling is\n *   Digital Image Warping, George Wolberg, 1990.\n *   Pub. by IEEE Computer Society Press, Los Alamitos, CA. ISBN 0-8186-8944-7.\n *\n * The downsampling algorithm used here is a simple average of the source\n * pixels covered by the output pixel.  The hi-falutin sampling literature\n * refers to this as a \"box filter\".  In general the characteristics of a box\n * filter are not very good, but for the specific cases we normally use (1:1\n * and 2:1 ratios) the box is equivalent to a \"triangle filter\" which is not\n * nearly so bad.  If you intend to use other sampling ratios, you'd be well\n * advised to improve this code.\n *\n * A simple input-smoothing capability is provided.  This is mainly intended\n * for cleaning up color-dithered GIF input files (if you find it inadequate,\n * we suggest using an external filtering program such as pnmconvol).  When\n * enabled, each input pixel P is replaced by a weighted sum of itself and its\n * eight neighbors.  P's weight is 1-8*SF and each neighbor's weight is SF,\n * where SF = (smoothing_factor / 1024).\n * Currently, smoothing is only supported for 2h2v sampling factors.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n\n\n/* Pointer to routine to downsample a single component */\ntypedef JMETHOD(void, downsample1_ptr,\n\t\t(j_compress_ptr cinfo, jpeg_component_info * compptr,\n\t\t JSAMPARRAY input_data, JSAMPARRAY output_data));\n\n/* Private subobject */\n\ntypedef struct {\n  struct jpeg_downsampler pub;\t/* public fields */\n\n  /* Downsampling method pointers, one per component */\n  downsample1_ptr methods[MAX_COMPONENTS];\n} my_downsampler;\n\ntypedef my_downsampler * my_downsample_ptr;\n\n\n/*\n * Initialize for a downsampling pass.\n */\n\nMETHODDEF(void)\nstart_pass_downsample (j_compress_ptr cinfo)\n{\n  /* no work for now */\n}\n\n\n/*\n * Expand a component horizontally from width input_cols to width output_cols,\n * by duplicating the rightmost samples.\n */\n\nLOCAL(void)\nexpand_right_edge (JSAMPARRAY image_data, int num_rows,\n\t\t   JDIMENSION input_cols, JDIMENSION output_cols)\n{\n  register JSAMPROW ptr;\n  register JSAMPLE pixval;\n  register int count;\n  int row;\n  int numcols = (int) (output_cols - input_cols);\n\n  if (numcols > 0) {\n    for (row = 0; row < num_rows; row++) {\n      ptr = image_data[row] + input_cols;\n      pixval = ptr[-1];\t\t/* don't need GETJSAMPLE() here */\n      for (count = numcols; count > 0; count--)\n\t*ptr++ = pixval;\n    }\n  }\n}\n\n\n/*\n * Do downsampling for a whole row group (all components).\n *\n * In this version we simply downsample each component independently.\n */\n\nMETHODDEF(void)\nsep_downsample (j_compress_ptr cinfo,\n\t\tJSAMPIMAGE input_buf, JDIMENSION in_row_index,\n\t\tJSAMPIMAGE output_buf, JDIMENSION out_row_group_index)\n{\n  my_downsample_ptr downsample = (my_downsample_ptr) cinfo->downsample;\n  int ci;\n  jpeg_component_info * compptr;\n  JSAMPARRAY in_ptr, out_ptr;\n\n  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n       ci++, compptr++) {\n    in_ptr = input_buf[ci] + in_row_index;\n    out_ptr = output_buf[ci] + (out_row_group_index * compptr->v_samp_factor);\n    (*downsample->methods[ci]) (cinfo, compptr, in_ptr, out_ptr);\n  }\n}\n\n\n/*\n * Downsample pixel values of a single component.\n * One row group is processed per call.\n * This version handles arbitrary integral sampling ratios, without smoothing.\n * Note that this version is not actually used for customary sampling ratios.\n */\n\nMETHODDEF(void)\nint_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,\n\t\tJSAMPARRAY input_data, JSAMPARRAY output_data)\n{\n  int inrow, outrow, h_expand, v_expand, numpix, numpix2, h, v;\n  JDIMENSION outcol, outcol_h;\t/* outcol_h == outcol*h_expand */\n  JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE;\n  JSAMPROW inptr, outptr;\n  INT32 outvalue;\n\n  h_expand = cinfo->max_h_samp_factor / compptr->h_samp_factor;\n  v_expand = cinfo->max_v_samp_factor / compptr->v_samp_factor;\n  numpix = h_expand * v_expand;\n  numpix2 = numpix/2;\n\n  /* Expand input data enough to let all the output samples be generated\n   * by the standard loop.  Special-casing padded output would be more\n   * efficient.\n   */\n  expand_right_edge(input_data, cinfo->max_v_samp_factor,\n\t\t    cinfo->image_width, output_cols * h_expand);\n\n  inrow = 0;\n  for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) {\n    outptr = output_data[outrow];\n    for (outcol = 0, outcol_h = 0; outcol < output_cols;\n\t outcol++, outcol_h += h_expand) {\n      outvalue = 0;\n      for (v = 0; v < v_expand; v++) {\n\tinptr = input_data[inrow+v] + outcol_h;\n\tfor (h = 0; h < h_expand; h++) {\n\t  outvalue += (INT32) GETJSAMPLE(*inptr++);\n\t}\n      }\n      *outptr++ = (JSAMPLE) ((outvalue + numpix2) / numpix);\n    }\n    inrow += v_expand;\n  }\n}\n\n\n/*\n * Downsample pixel values of a single component.\n * This version handles the special case of a full-size component,\n * without smoothing.\n */\n\nMETHODDEF(void)\nfullsize_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,\n\t\t     JSAMPARRAY input_data, JSAMPARRAY output_data)\n{\n  /* Copy the data */\n  jcopy_sample_rows(input_data, 0, output_data, 0,\n\t\t    cinfo->max_v_samp_factor, cinfo->image_width);\n  /* Edge-expand */\n  expand_right_edge(output_data, cinfo->max_v_samp_factor,\n\t\t    cinfo->image_width, compptr->width_in_blocks * DCTSIZE);\n}\n\n\n/*\n * Downsample pixel values of a single component.\n * This version handles the common case of 2:1 horizontal and 1:1 vertical,\n * without smoothing.\n *\n * A note about the \"bias\" calculations: when rounding fractional values to\n * integer, we do not want to always round 0.5 up to the next integer.\n * If we did that, we'd introduce a noticeable bias towards larger values.\n * Instead, this code is arranged so that 0.5 will be rounded up or down at\n * alternate pixel locations (a simple ordered dither pattern).\n */\n\nMETHODDEF(void)\nh2v1_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,\n\t\t JSAMPARRAY input_data, JSAMPARRAY output_data)\n{\n  int outrow;\n  JDIMENSION outcol;\n  JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE;\n  register JSAMPROW inptr, outptr;\n  register int bias;\n\n  /* Expand input data enough to let all the output samples be generated\n   * by the standard loop.  Special-casing padded output would be more\n   * efficient.\n   */\n  expand_right_edge(input_data, cinfo->max_v_samp_factor,\n\t\t    cinfo->image_width, output_cols * 2);\n\n  for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) {\n    outptr = output_data[outrow];\n    inptr = input_data[outrow];\n    bias = 0;\t\t\t/* bias = 0,1,0,1,... for successive samples */\n    for (outcol = 0; outcol < output_cols; outcol++) {\n      *outptr++ = (JSAMPLE) ((GETJSAMPLE(*inptr) + GETJSAMPLE(inptr[1])\n\t\t\t      + bias) >> 1);\n      bias ^= 1;\t\t/* 0=>1, 1=>0 */\n      inptr += 2;\n    }\n  }\n}\n\n\n/*\n * Downsample pixel values of a single component.\n * This version handles the standard case of 2:1 horizontal and 2:1 vertical,\n * without smoothing.\n */\n\nMETHODDEF(void)\nh2v2_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,\n\t\t JSAMPARRAY input_data, JSAMPARRAY output_data)\n{\n  int inrow, outrow;\n  JDIMENSION outcol;\n  JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE;\n  register JSAMPROW inptr0, inptr1, outptr;\n  register int bias;\n\n  /* Expand input data enough to let all the output samples be generated\n   * by the standard loop.  Special-casing padded output would be more\n   * efficient.\n   */\n  expand_right_edge(input_data, cinfo->max_v_samp_factor,\n\t\t    cinfo->image_width, output_cols * 2);\n\n  inrow = 0;\n  for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) {\n    outptr = output_data[outrow];\n    inptr0 = input_data[inrow];\n    inptr1 = input_data[inrow+1];\n    bias = 1;\t\t\t/* bias = 1,2,1,2,... for successive samples */\n    for (outcol = 0; outcol < output_cols; outcol++) {\n      *outptr++ = (JSAMPLE) ((GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) +\n\t\t\t      GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1])\n\t\t\t      + bias) >> 2);\n      bias ^= 3;\t\t/* 1=>2, 2=>1 */\n      inptr0 += 2; inptr1 += 2;\n    }\n    inrow += 2;\n  }\n}\n\n\n#ifdef INPUT_SMOOTHING_SUPPORTED\n\n/*\n * Downsample pixel values of a single component.\n * This version handles the standard case of 2:1 horizontal and 2:1 vertical,\n * with smoothing.  One row of context is required.\n */\n\nMETHODDEF(void)\nh2v2_smooth_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,\n\t\t\tJSAMPARRAY input_data, JSAMPARRAY output_data)\n{\n  int inrow, outrow;\n  JDIMENSION colctr;\n  JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE;\n  register JSAMPROW inptr0, inptr1, above_ptr, below_ptr, outptr;\n  INT32 membersum, neighsum, memberscale, neighscale;\n\n  /* Expand input data enough to let all the output samples be generated\n   * by the standard loop.  Special-casing padded output would be more\n   * efficient.\n   */\n  expand_right_edge(input_data - 1, cinfo->max_v_samp_factor + 2,\n\t\t    cinfo->image_width, output_cols * 2);\n\n  /* We don't bother to form the individual \"smoothed\" input pixel values;\n   * we can directly compute the output which is the average of the four\n   * smoothed values.  Each of the four member pixels contributes a fraction\n   * (1-8*SF) to its own smoothed image and a fraction SF to each of the three\n   * other smoothed pixels, therefore a total fraction (1-5*SF)/4 to the final\n   * output.  The four corner-adjacent neighbor pixels contribute a fraction\n   * SF to just one smoothed pixel, or SF/4 to the final output; while the\n   * eight edge-adjacent neighbors contribute SF to each of two smoothed\n   * pixels, or SF/2 overall.  In order to use integer arithmetic, these\n   * factors are scaled by 2^16 = 65536.\n   * Also recall that SF = smoothing_factor / 1024.\n   */\n\n  memberscale = 16384 - cinfo->smoothing_factor * 80; /* scaled (1-5*SF)/4 */\n  neighscale = cinfo->smoothing_factor * 16; /* scaled SF/4 */\n\n  inrow = 0;\n  for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) {\n    outptr = output_data[outrow];\n    inptr0 = input_data[inrow];\n    inptr1 = input_data[inrow+1];\n    above_ptr = input_data[inrow-1];\n    below_ptr = input_data[inrow+2];\n\n    /* Special case for first column: pretend column -1 is same as column 0 */\n    membersum = GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) +\n\t\tGETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]);\n    neighsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[1]) +\n\t       GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[1]) +\n\t       GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[2]) +\n\t       GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[2]);\n    neighsum += neighsum;\n    neighsum += GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[2]) +\n\t\tGETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[2]);\n    membersum = membersum * memberscale + neighsum * neighscale;\n    *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16);\n    inptr0 += 2; inptr1 += 2; above_ptr += 2; below_ptr += 2;\n\n    for (colctr = output_cols - 2; colctr > 0; colctr--) {\n      /* sum of pixels directly mapped to this output element */\n      membersum = GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) +\n\t\t  GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]);\n      /* sum of edge-neighbor pixels */\n      neighsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[1]) +\n\t\t GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[1]) +\n\t\t GETJSAMPLE(inptr0[-1]) + GETJSAMPLE(inptr0[2]) +\n\t\t GETJSAMPLE(inptr1[-1]) + GETJSAMPLE(inptr1[2]);\n      /* The edge-neighbors count twice as much as corner-neighbors */\n      neighsum += neighsum;\n      /* Add in the corner-neighbors */\n      neighsum += GETJSAMPLE(above_ptr[-1]) + GETJSAMPLE(above_ptr[2]) +\n\t\t  GETJSAMPLE(below_ptr[-1]) + GETJSAMPLE(below_ptr[2]);\n      /* form final output scaled up by 2^16 */\n      membersum = membersum * memberscale + neighsum * neighscale;\n      /* round, descale and output it */\n      *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16);\n      inptr0 += 2; inptr1 += 2; above_ptr += 2; below_ptr += 2;\n    }\n\n    /* Special case for last column */\n    membersum = GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) +\n\t\tGETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]);\n    neighsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[1]) +\n\t       GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[1]) +\n\t       GETJSAMPLE(inptr0[-1]) + GETJSAMPLE(inptr0[1]) +\n\t       GETJSAMPLE(inptr1[-1]) + GETJSAMPLE(inptr1[1]);\n    neighsum += neighsum;\n    neighsum += GETJSAMPLE(above_ptr[-1]) + GETJSAMPLE(above_ptr[1]) +\n\t\tGETJSAMPLE(below_ptr[-1]) + GETJSAMPLE(below_ptr[1]);\n    membersum = membersum * memberscale + neighsum * neighscale;\n    *outptr = (JSAMPLE) ((membersum + 32768) >> 16);\n\n    inrow += 2;\n  }\n}\n\n\n/*\n * Downsample pixel values of a single component.\n * This version handles the special case of a full-size component,\n * with smoothing.  One row of context is required.\n */\n\nMETHODDEF(void)\nfullsize_smooth_downsample (j_compress_ptr cinfo, jpeg_component_info *compptr,\n\t\t\t    JSAMPARRAY input_data, JSAMPARRAY output_data)\n{\n  int outrow;\n  JDIMENSION colctr;\n  JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE;\n  register JSAMPROW inptr, above_ptr, below_ptr, outptr;\n  INT32 membersum, neighsum, memberscale, neighscale;\n  int colsum, lastcolsum, nextcolsum;\n\n  /* Expand input data enough to let all the output samples be generated\n   * by the standard loop.  Special-casing padded output would be more\n   * efficient.\n   */\n  expand_right_edge(input_data - 1, cinfo->max_v_samp_factor + 2,\n\t\t    cinfo->image_width, output_cols);\n\n  /* Each of the eight neighbor pixels contributes a fraction SF to the\n   * smoothed pixel, while the main pixel contributes (1-8*SF).  In order\n   * to use integer arithmetic, these factors are multiplied by 2^16 = 65536.\n   * Also recall that SF = smoothing_factor / 1024.\n   */\n\n  memberscale = 65536L - cinfo->smoothing_factor * 512L; /* scaled 1-8*SF */\n  neighscale = cinfo->smoothing_factor * 64; /* scaled SF */\n\n  for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) {\n    outptr = output_data[outrow];\n    inptr = input_data[outrow];\n    above_ptr = input_data[outrow-1];\n    below_ptr = input_data[outrow+1];\n\n    /* Special case for first column */\n    colsum = GETJSAMPLE(*above_ptr++) + GETJSAMPLE(*below_ptr++) +\n\t     GETJSAMPLE(*inptr);\n    membersum = GETJSAMPLE(*inptr++);\n    nextcolsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(*below_ptr) +\n\t\t GETJSAMPLE(*inptr);\n    neighsum = colsum + (colsum - membersum) + nextcolsum;\n    membersum = membersum * memberscale + neighsum * neighscale;\n    *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16);\n    lastcolsum = colsum; colsum = nextcolsum;\n\n    for (colctr = output_cols - 2; colctr > 0; colctr--) {\n      membersum = GETJSAMPLE(*inptr++);\n      above_ptr++; below_ptr++;\n      nextcolsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(*below_ptr) +\n\t\t   GETJSAMPLE(*inptr);\n      neighsum = lastcolsum + (colsum - membersum) + nextcolsum;\n      membersum = membersum * memberscale + neighsum * neighscale;\n      *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16);\n      lastcolsum = colsum; colsum = nextcolsum;\n    }\n\n    /* Special case for last column */\n    membersum = GETJSAMPLE(*inptr);\n    neighsum = lastcolsum + (colsum - membersum) + colsum;\n    membersum = membersum * memberscale + neighsum * neighscale;\n    *outptr = (JSAMPLE) ((membersum + 32768) >> 16);\n\n  }\n}\n\n#endif /* INPUT_SMOOTHING_SUPPORTED */\n\n\n/*\n * Module initialization routine for downsampling.\n * Note that we must select a routine for each component.\n */\n\nGLOBAL(void)\njinit_downsampler (j_compress_ptr cinfo)\n{\n  my_downsample_ptr downsample;\n  int ci;\n  jpeg_component_info * compptr;\n  boolean smoothok = TRUE;\n\n  downsample = (my_downsample_ptr)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\tSIZEOF(my_downsampler));\n  cinfo->downsample = (struct jpeg_downsampler *) downsample;\n  downsample->pub.start_pass = start_pass_downsample;\n  downsample->pub.downsample = sep_downsample;\n  downsample->pub.need_context_rows = FALSE;\n\n  if (cinfo->CCIR601_sampling)\n    ERREXIT(cinfo, JERR_CCIR601_NOTIMPL);\n\n  /* Verify we can handle the sampling factors, and set up method pointers */\n  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n       ci++, compptr++) {\n    if (compptr->h_samp_factor == cinfo->max_h_samp_factor &&\n\tcompptr->v_samp_factor == cinfo->max_v_samp_factor) {\n#ifdef INPUT_SMOOTHING_SUPPORTED\n      if (cinfo->smoothing_factor) {\n\tdownsample->methods[ci] = fullsize_smooth_downsample;\n\tdownsample->pub.need_context_rows = TRUE;\n      } else\n#endif\n\tdownsample->methods[ci] = fullsize_downsample;\n    } else if (compptr->h_samp_factor * 2 == cinfo->max_h_samp_factor &&\n\t       compptr->v_samp_factor == cinfo->max_v_samp_factor) {\n      smoothok = FALSE;\n      downsample->methods[ci] = h2v1_downsample;\n    } else if (compptr->h_samp_factor * 2 == cinfo->max_h_samp_factor &&\n\t       compptr->v_samp_factor * 2 == cinfo->max_v_samp_factor) {\n#ifdef INPUT_SMOOTHING_SUPPORTED\n      if (cinfo->smoothing_factor) {\n\tdownsample->methods[ci] = h2v2_smooth_downsample;\n\tdownsample->pub.need_context_rows = TRUE;\n      } else\n#endif\n\tdownsample->methods[ci] = h2v2_downsample;\n    } else if ((cinfo->max_h_samp_factor % compptr->h_samp_factor) == 0 &&\n\t       (cinfo->max_v_samp_factor % compptr->v_samp_factor) == 0) {\n      smoothok = FALSE;\n      downsample->methods[ci] = int_downsample;\n    } else\n      ERREXIT(cinfo, JERR_FRACT_SAMPLE_NOTIMPL);\n  }\n\n#ifdef INPUT_SMOOTHING_SUPPORTED\n  if (cinfo->smoothing_factor && !smoothok)\n    TRACEMS(cinfo, 0, JTRC_SMOOTH_NOTIMPL);\n#endif\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jctrans.c",
    "content": "/*\n * jctrans.c\n *\n * Copyright (C) 1995-1998, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains library routines for transcoding compression,\n * that is, writing raw DCT coefficient arrays to an output JPEG file.\n * The routines in jcapimin.c will also be needed by a transcoder.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n\n\n/* Forward declarations */\nLOCAL(void) transencode_master_selection\n\tJPP((j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays));\nLOCAL(void) transencode_coef_controller\n\tJPP((j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays));\n\n\n/*\n * Compression initialization for writing raw-coefficient data.\n * Before calling this, all parameters and a data destination must be set up.\n * Call jpeg_finish_compress() to actually write the data.\n *\n * The number of passed virtual arrays must match cinfo->num_components.\n * Note that the virtual arrays need not be filled or even realized at\n * the time write_coefficients is called; indeed, if the virtual arrays\n * were requested from this compression object's memory manager, they\n * typically will be realized during this routine and filled afterwards.\n */\n\nGLOBAL(void)\njpeg_write_coefficients (j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays)\n{\n  if (cinfo->global_state != CSTATE_START)\n    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);\n  /* Mark all tables to be written */\n  jpeg_suppress_tables(cinfo, FALSE);\n  /* (Re)initialize error mgr and destination modules */\n  (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo);\n  (*cinfo->dest->init_destination) (cinfo);\n  /* Perform master selection of active modules */\n  transencode_master_selection(cinfo, coef_arrays);\n  /* Wait for jpeg_finish_compress() call */\n  cinfo->next_scanline = 0;\t/* so jpeg_write_marker works */\n  cinfo->global_state = CSTATE_WRCOEFS;\n}\n\n\n/*\n * Initialize the compression object with default parameters,\n * then copy from the source object all parameters needed for lossless\n * transcoding.  Parameters that can be varied without loss (such as\n * scan script and Huffman optimization) are left in their default states.\n */\n\nGLOBAL(void)\njpeg_copy_critical_parameters (j_decompress_ptr srcinfo,\n\t\t\t       j_compress_ptr dstinfo)\n{\n  JQUANT_TBL ** qtblptr;\n  jpeg_component_info *incomp, *outcomp;\n  JQUANT_TBL *c_quant, *slot_quant;\n  int tblno, ci, coefi;\n\n  /* Safety check to ensure start_compress not called yet. */\n  if (dstinfo->global_state != CSTATE_START)\n    ERREXIT1(dstinfo, JERR_BAD_STATE, dstinfo->global_state);\n  /* Copy fundamental image dimensions */\n  dstinfo->image_width = srcinfo->image_width;\n  dstinfo->image_height = srcinfo->image_height;\n  dstinfo->input_components = srcinfo->num_components;\n  dstinfo->in_color_space = srcinfo->jpeg_color_space;\n  /* Initialize all parameters to default values */\n  jpeg_set_defaults(dstinfo);\n  /* jpeg_set_defaults may choose wrong colorspace, eg YCbCr if input is RGB.\n   * Fix it to get the right header markers for the image colorspace.\n   */\n  jpeg_set_colorspace(dstinfo, srcinfo->jpeg_color_space);\n  dstinfo->data_precision = srcinfo->data_precision;\n  dstinfo->CCIR601_sampling = srcinfo->CCIR601_sampling;\n  /* Copy the source's quantization tables. */\n  for (tblno = 0; tblno < NUM_QUANT_TBLS; tblno++) {\n    if (srcinfo->quant_tbl_ptrs[tblno] != NULL) {\n      qtblptr = & dstinfo->quant_tbl_ptrs[tblno];\n      if (*qtblptr == NULL)\n\t*qtblptr = jpeg_alloc_quant_table((j_common_ptr) dstinfo);\n      MEMCOPY((*qtblptr)->quantval,\n\t      srcinfo->quant_tbl_ptrs[tblno]->quantval,\n\t      SIZEOF((*qtblptr)->quantval));\n      (*qtblptr)->sent_table = FALSE;\n    }\n  }\n  /* Copy the source's per-component info.\n   * Note we assume jpeg_set_defaults has allocated the dest comp_info array.\n   */\n  dstinfo->num_components = srcinfo->num_components;\n  if (dstinfo->num_components < 1 || dstinfo->num_components > MAX_COMPONENTS)\n    ERREXIT2(dstinfo, JERR_COMPONENT_COUNT, dstinfo->num_components,\n\t     MAX_COMPONENTS);\n  for (ci = 0, incomp = srcinfo->comp_info, outcomp = dstinfo->comp_info;\n       ci < dstinfo->num_components; ci++, incomp++, outcomp++) {\n    outcomp->component_id = incomp->component_id;\n    outcomp->h_samp_factor = incomp->h_samp_factor;\n    outcomp->v_samp_factor = incomp->v_samp_factor;\n    outcomp->quant_tbl_no = incomp->quant_tbl_no;\n    /* Make sure saved quantization table for component matches the qtable\n     * slot.  If not, the input file re-used this qtable slot.\n     * IJG encoder currently cannot duplicate this.\n     */\n    tblno = outcomp->quant_tbl_no;\n    if (tblno < 0 || tblno >= NUM_QUANT_TBLS ||\n\tsrcinfo->quant_tbl_ptrs[tblno] == NULL)\n      ERREXIT1(dstinfo, JERR_NO_QUANT_TABLE, tblno);\n    slot_quant = srcinfo->quant_tbl_ptrs[tblno];\n    c_quant = incomp->quant_table;\n    if (c_quant != NULL) {\n      for (coefi = 0; coefi < DCTSIZE2; coefi++) {\n\tif (c_quant->quantval[coefi] != slot_quant->quantval[coefi])\n\t  ERREXIT1(dstinfo, JERR_MISMATCHED_QUANT_TABLE, tblno);\n      }\n    }\n    /* Note: we do not copy the source's Huffman table assignments;\n     * instead we rely on jpeg_set_colorspace to have made a suitable choice.\n     */\n  }\n  /* Also copy JFIF version and resolution information, if available.\n   * Strictly speaking this isn't \"critical\" info, but it's nearly\n   * always appropriate to copy it if available.  In particular,\n   * if the application chooses to copy JFIF 1.02 extension markers from\n   * the source file, we need to copy the version to make sure we don't\n   * emit a file that has 1.02 extensions but a claimed version of 1.01.\n   * We will *not*, however, copy version info from mislabeled \"2.01\" files.\n   */\n  if (srcinfo->saw_JFIF_marker) {\n    if (srcinfo->JFIF_major_version == 1) {\n      dstinfo->JFIF_major_version = srcinfo->JFIF_major_version;\n      dstinfo->JFIF_minor_version = srcinfo->JFIF_minor_version;\n    }\n    dstinfo->density_unit = srcinfo->density_unit;\n    dstinfo->X_density = srcinfo->X_density;\n    dstinfo->Y_density = srcinfo->Y_density;\n  }\n}\n\n\n/*\n * Master selection of compression modules for transcoding.\n * This substitutes for jcinit.c's initialization of the full compressor.\n */\n\nLOCAL(void)\ntransencode_master_selection (j_compress_ptr cinfo,\n\t\t\t      jvirt_barray_ptr * coef_arrays)\n{\n  /* Although we don't actually use input_components for transcoding,\n   * jcmaster.c's initial_setup will complain if input_components is 0.\n   */\n  cinfo->input_components = 1;\n  /* Initialize master control (includes parameter checking/processing) */\n  jinit_c_master_control(cinfo, TRUE /* transcode only */);\n\n  /* Entropy encoding: either Huffman or arithmetic coding. */\n  if (cinfo->arith_code) {\n    ERREXIT(cinfo, JERR_ARITH_NOTIMPL);\n  } else {\n    if (cinfo->progressive_mode) {\n#ifdef C_PROGRESSIVE_SUPPORTED\n      jinit_phuff_encoder(cinfo);\n#else\n      ERREXIT(cinfo, JERR_NOT_COMPILED);\n#endif\n    } else\n      jinit_huff_encoder(cinfo);\n  }\n\n  /* We need a special coefficient buffer controller. */\n  transencode_coef_controller(cinfo, coef_arrays);\n\n  jinit_marker_writer(cinfo);\n\n  /* We can now tell the memory manager to allocate virtual arrays. */\n  (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo);\n\n  /* Write the datastream header (SOI, JFIF) immediately.\n   * Frame and scan headers are postponed till later.\n   * This lets application insert special markers after the SOI.\n   */\n  (*cinfo->marker->write_file_header) (cinfo);\n}\n\n\n/*\n * The rest of this file is a special implementation of the coefficient\n * buffer controller.  This is similar to jccoefct.c, but it handles only\n * output from presupplied virtual arrays.  Furthermore, we generate any\n * dummy padding blocks on-the-fly rather than expecting them to be present\n * in the arrays.\n */\n\n/* Private buffer controller object */\n\ntypedef struct {\n  struct jpeg_c_coef_controller pub; /* public fields */\n\n  JDIMENSION iMCU_row_num;\t/* iMCU row # within image */\n  JDIMENSION mcu_ctr;\t\t/* counts MCUs processed in current row */\n  int MCU_vert_offset;\t\t/* counts MCU rows within iMCU row */\n  int MCU_rows_per_iMCU_row;\t/* number of such rows needed */\n\n  /* Virtual block array for each component. */\n  jvirt_barray_ptr * whole_image;\n\n  /* Workspace for constructing dummy blocks at right/bottom edges. */\n  JBLOCKROW dummy_buffer[C_MAX_BLOCKS_IN_MCU];\n} my_coef_controller;\n\ntypedef my_coef_controller * my_coef_ptr;\n\n\nLOCAL(void)\nstart_iMCU_row (j_compress_ptr cinfo)\n/* Reset within-iMCU-row counters for a new row */\n{\n  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;\n\n  /* In an interleaved scan, an MCU row is the same as an iMCU row.\n   * In a noninterleaved scan, an iMCU row has v_samp_factor MCU rows.\n   * But at the bottom of the image, process only what's left.\n   */\n  if (cinfo->comps_in_scan > 1) {\n    coef->MCU_rows_per_iMCU_row = 1;\n  } else {\n    if (coef->iMCU_row_num < (cinfo->total_iMCU_rows-1))\n      coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->v_samp_factor;\n    else\n      coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->last_row_height;\n  }\n\n  coef->mcu_ctr = 0;\n  coef->MCU_vert_offset = 0;\n}\n\n\n/*\n * Initialize for a processing pass.\n */\n\nMETHODDEF(void)\nstart_pass_coef (j_compress_ptr cinfo, J_BUF_MODE pass_mode)\n{\n  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;\n\n  if (pass_mode != JBUF_CRANK_DEST)\n    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);\n\n  coef->iMCU_row_num = 0;\n  start_iMCU_row(cinfo);\n}\n\n\n/*\n * Process some data.\n * We process the equivalent of one fully interleaved MCU row (\"iMCU\" row)\n * per call, ie, v_samp_factor block rows for each component in the scan.\n * The data is obtained from the virtual arrays and fed to the entropy coder.\n * Returns TRUE if the iMCU row is completed, FALSE if suspended.\n *\n * NB: input_buf is ignored; it is likely to be a NULL pointer.\n */\n\nMETHODDEF(boolean)\ncompress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)\n{\n  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;\n  JDIMENSION MCU_col_num;\t/* index of current MCU within row */\n  JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1;\n  JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1;\n  int blkn, ci, xindex, yindex, yoffset, blockcnt;\n  JDIMENSION start_col;\n  JBLOCKARRAY buffer[MAX_COMPS_IN_SCAN];\n  JBLOCKROW MCU_buffer[C_MAX_BLOCKS_IN_MCU];\n  JBLOCKROW buffer_ptr;\n  jpeg_component_info *compptr;\n\n  /* Align the virtual buffers for the components used in this scan. */\n  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {\n    compptr = cinfo->cur_comp_info[ci];\n    buffer[ci] = (*cinfo->mem->access_virt_barray)\n      ((j_common_ptr) cinfo, coef->whole_image[compptr->component_index],\n       coef->iMCU_row_num * compptr->v_samp_factor,\n       (JDIMENSION) compptr->v_samp_factor, FALSE);\n  }\n\n  /* Loop to process one whole iMCU row */\n  for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row;\n       yoffset++) {\n    for (MCU_col_num = coef->mcu_ctr; MCU_col_num < cinfo->MCUs_per_row;\n\t MCU_col_num++) {\n      /* Construct list of pointers to DCT blocks belonging to this MCU */\n      blkn = 0;\t\t\t/* index of current DCT block within MCU */\n      for (ci = 0; ci < cinfo->comps_in_scan; ci++) {\n\tcompptr = cinfo->cur_comp_info[ci];\n\tstart_col = MCU_col_num * compptr->MCU_width;\n\tblockcnt = (MCU_col_num < last_MCU_col) ? compptr->MCU_width\n\t\t\t\t\t\t: compptr->last_col_width;\n\tfor (yindex = 0; yindex < compptr->MCU_height; yindex++) {\n\t  if (coef->iMCU_row_num < last_iMCU_row ||\n\t      yindex+yoffset < compptr->last_row_height) {\n\t    /* Fill in pointers to real blocks in this row */\n\t    buffer_ptr = buffer[ci][yindex+yoffset] + start_col;\n\t    for (xindex = 0; xindex < blockcnt; xindex++)\n\t      MCU_buffer[blkn++] = buffer_ptr++;\n\t  } else {\n\t    /* At bottom of image, need a whole row of dummy blocks */\n\t    xindex = 0;\n\t  }\n\t  /* Fill in any dummy blocks needed in this row.\n\t   * Dummy blocks are filled in the same way as in jccoefct.c:\n\t   * all zeroes in the AC entries, DC entries equal to previous\n\t   * block's DC value.  The init routine has already zeroed the\n\t   * AC entries, so we need only set the DC entries correctly.\n\t   */\n\t  for (; xindex < compptr->MCU_width; xindex++) {\n\t    MCU_buffer[blkn] = coef->dummy_buffer[blkn];\n\t    MCU_buffer[blkn][0][0] = MCU_buffer[blkn-1][0][0];\n\t    blkn++;\n\t  }\n\t}\n      }\n      /* Try to write the MCU. */\n      if (! (*cinfo->entropy->encode_mcu) (cinfo, MCU_buffer)) {\n\t/* Suspension forced; update state counters and exit */\n\tcoef->MCU_vert_offset = yoffset;\n\tcoef->mcu_ctr = MCU_col_num;\n\treturn FALSE;\n      }\n    }\n    /* Completed an MCU row, but perhaps not an iMCU row */\n    coef->mcu_ctr = 0;\n  }\n  /* Completed the iMCU row, advance counters for next one */\n  coef->iMCU_row_num++;\n  start_iMCU_row(cinfo);\n  return TRUE;\n}\n\n\n/*\n * Initialize coefficient buffer controller.\n *\n * Each passed coefficient array must be the right size for that\n * coefficient: width_in_blocks wide and height_in_blocks high,\n * with unitheight at least v_samp_factor.\n */\n\nLOCAL(void)\ntransencode_coef_controller (j_compress_ptr cinfo,\n\t\t\t     jvirt_barray_ptr * coef_arrays)\n{\n  my_coef_ptr coef;\n  JBLOCKROW buffer;\n  int i;\n\n  coef = (my_coef_ptr)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\tSIZEOF(my_coef_controller));\n  cinfo->coef = (struct jpeg_c_coef_controller *) coef;\n  coef->pub.start_pass = start_pass_coef;\n  coef->pub.compress_data = compress_output;\n\n  /* Save pointer to virtual arrays */\n  coef->whole_image = coef_arrays;\n\n  /* Allocate and pre-zero space for dummy DCT blocks. */\n  buffer = (JBLOCKROW)\n    (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\tC_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK));\n  jzero_far((void FAR *) buffer, C_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK));\n  for (i = 0; i < C_MAX_BLOCKS_IN_MCU; i++) {\n    coef->dummy_buffer[i] = buffer + i;\n  }\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jdapimin.c",
    "content": "/*\n * jdapimin.c\n *\n * Copyright (C) 1994-1998, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains application interface code for the decompression half\n * of the JPEG library.  These are the \"minimum\" API routines that may be\n * needed in either the normal full-decompression case or the\n * transcoding-only case.\n *\n * Most of the routines intended to be called directly by an application\n * are in this file or in jdapistd.c.  But also see jcomapi.c for routines\n * shared by compression and decompression, and jdtrans.c for the transcoding\n * case.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n\n\n/*\n * Initialization of a JPEG decompression object.\n * The error manager must already be set up (in case memory manager fails).\n */\n\nGLOBAL(void)\njpeg_CreateDecompress (j_decompress_ptr cinfo, int version, size_t structsize)\n{\n  int i;\n\n  /* Guard against version mismatches between library and caller. */\n  cinfo->mem = NULL;\t\t/* so jpeg_destroy knows mem mgr not called */\n  if (version != JPEG_LIB_VERSION)\n    ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version);\n  if (structsize != SIZEOF(struct jpeg_decompress_struct))\n    ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE, \n\t     (int) SIZEOF(struct jpeg_decompress_struct), (int) structsize);\n\n  /* For debugging purposes, we zero the whole master structure.\n   * But the application has already set the err pointer, and may have set\n   * client_data, so we have to save and restore those fields.\n   * Note: if application hasn't set client_data, tools like Purify may\n   * complain here.\n   */\n  {\n    struct jpeg_error_mgr * err = cinfo->err;\n    void * client_data = cinfo->client_data; /* ignore Purify complaint here */\n    MEMZERO(cinfo, SIZEOF(struct jpeg_decompress_struct));\n    cinfo->err = err;\n    cinfo->client_data = client_data;\n  }\n  cinfo->is_decompressor = TRUE;\n\n  /* Initialize a memory manager instance for this object */\n  jinit_memory_mgr((j_common_ptr) cinfo);\n\n  /* Zero out pointers to permanent structures. */\n  cinfo->progress = NULL;\n  cinfo->src = NULL;\n\n  for (i = 0; i < NUM_QUANT_TBLS; i++)\n    cinfo->quant_tbl_ptrs[i] = NULL;\n\n  for (i = 0; i < NUM_HUFF_TBLS; i++) {\n    cinfo->dc_huff_tbl_ptrs[i] = NULL;\n    cinfo->ac_huff_tbl_ptrs[i] = NULL;\n  }\n\n  /* Initialize marker processor so application can override methods\n   * for COM, APPn markers before calling jpeg_read_header.\n   */\n  cinfo->marker_list = NULL;\n  jinit_marker_reader(cinfo);\n\n  /* And initialize the overall input controller. */\n  jinit_input_controller(cinfo);\n\n  /* OK, I'm ready */\n  cinfo->global_state = DSTATE_START;\n}\n\n\n/*\n * Destruction of a JPEG decompression object\n */\n\nGLOBAL(void)\njpeg_destroy_decompress (j_decompress_ptr cinfo)\n{\n  jpeg_destroy((j_common_ptr) cinfo); /* use common routine */\n}\n\n\n/*\n * Abort processing of a JPEG decompression operation,\n * but don't destroy the object itself.\n */\n\nGLOBAL(void)\njpeg_abort_decompress (j_decompress_ptr cinfo)\n{\n  jpeg_abort((j_common_ptr) cinfo); /* use common routine */\n}\n\n\n/*\n * Set default decompression parameters.\n */\n\nLOCAL(void)\ndefault_decompress_parms (j_decompress_ptr cinfo)\n{\n  /* Guess the input colorspace, and set output colorspace accordingly. */\n  /* (Wish JPEG committee had provided a real way to specify this...) */\n  /* Note application may override our guesses. */\n  switch (cinfo->num_components) {\n  case 1:\n    cinfo->jpeg_color_space = JCS_GRAYSCALE;\n    cinfo->out_color_space = JCS_GRAYSCALE;\n    break;\n    \n  case 3:\n    if (cinfo->saw_JFIF_marker) {\n      cinfo->jpeg_color_space = JCS_YCbCr; /* JFIF implies YCbCr */\n    } else if (cinfo->saw_Adobe_marker) {\n      switch (cinfo->Adobe_transform) {\n      case 0:\n\tcinfo->jpeg_color_space = JCS_RGB;\n\tbreak;\n      case 1:\n\tcinfo->jpeg_color_space = JCS_YCbCr;\n\tbreak;\n      default:\n\tWARNMS1(cinfo, JWRN_ADOBE_XFORM, cinfo->Adobe_transform);\n\tcinfo->jpeg_color_space = JCS_YCbCr; /* assume it's YCbCr */\n\tbreak;\n      }\n    } else {\n      /* Saw no special markers, try to guess from the component IDs */\n      int cid0 = cinfo->comp_info[0].component_id;\n      int cid1 = cinfo->comp_info[1].component_id;\n      int cid2 = cinfo->comp_info[2].component_id;\n\n      if (cid0 == 1 && cid1 == 2 && cid2 == 3)\n\tcinfo->jpeg_color_space = JCS_YCbCr; /* assume JFIF w/out marker */\n      else if (cid0 == 82 && cid1 == 71 && cid2 == 66)\n\tcinfo->jpeg_color_space = JCS_RGB; /* ASCII 'R', 'G', 'B' */\n      else {\n\tTRACEMS3(cinfo, 1, JTRC_UNKNOWN_IDS, cid0, cid1, cid2);\n\tcinfo->jpeg_color_space = JCS_YCbCr; /* assume it's YCbCr */\n      }\n    }\n    /* Always guess RGB is proper output colorspace. */\n    cinfo->out_color_space = JCS_RGB;\n    break;\n    \n  case 4:\n    if (cinfo->saw_Adobe_marker) {\n      switch (cinfo->Adobe_transform) {\n      case 0:\n\tcinfo->jpeg_color_space = JCS_CMYK;\n\tbreak;\n      case 2:\n\tcinfo->jpeg_color_space = JCS_YCCK;\n\tbreak;\n      default:\n\tWARNMS1(cinfo, JWRN_ADOBE_XFORM, cinfo->Adobe_transform);\n\tcinfo->jpeg_color_space = JCS_YCCK; /* assume it's YCCK */\n\tbreak;\n      }\n    } else {\n      /* No special markers, assume straight CMYK. */\n      cinfo->jpeg_color_space = JCS_CMYK;\n    }\n    cinfo->out_color_space = JCS_CMYK;\n    break;\n    \n  default:\n    cinfo->jpeg_color_space = JCS_UNKNOWN;\n    cinfo->out_color_space = JCS_UNKNOWN;\n    break;\n  }\n\n  /* Set defaults for other decompression parameters. */\n  cinfo->scale_num = 1;\t\t/* 1:1 scaling */\n  cinfo->scale_denom = 1;\n  cinfo->output_gamma = 1.0;\n  cinfo->buffered_image = FALSE;\n  cinfo->raw_data_out = FALSE;\n  cinfo->dct_method = JDCT_DEFAULT;\n  cinfo->do_fancy_upsampling = TRUE;\n  cinfo->do_block_smoothing = TRUE;\n  cinfo->quantize_colors = FALSE;\n  /* We set these in case application only sets quantize_colors. */\n  cinfo->dither_mode = JDITHER_FS;\n#ifdef QUANT_2PASS_SUPPORTED\n  cinfo->two_pass_quantize = TRUE;\n#else\n  cinfo->two_pass_quantize = FALSE;\n#endif\n  cinfo->desired_number_of_colors = 256;\n  cinfo->colormap = NULL;\n  /* Initialize for no mode change in buffered-image mode. */\n  cinfo->enable_1pass_quant = FALSE;\n  cinfo->enable_external_quant = FALSE;\n  cinfo->enable_2pass_quant = FALSE;\n}\n\n\n/*\n * Decompression startup: read start of JPEG datastream to see what's there.\n * Need only initialize JPEG object and supply a data source before calling.\n *\n * This routine will read as far as the first SOS marker (ie, actual start of\n * compressed data), and will save all tables and parameters in the JPEG\n * object.  It will also initialize the decompression parameters to default\n * values, and finally return JPEG_HEADER_OK.  On return, the application may\n * adjust the decompression parameters and then call jpeg_start_decompress.\n * (Or, if the application only wanted to determine the image parameters,\n * the data need not be decompressed.  In that case, call jpeg_abort or\n * jpeg_destroy to release any temporary space.)\n * If an abbreviated (tables only) datastream is presented, the routine will\n * return JPEG_HEADER_TABLES_ONLY upon reaching EOI.  The application may then\n * re-use the JPEG object to read the abbreviated image datastream(s).\n * It is unnecessary (but OK) to call jpeg_abort in this case.\n * The JPEG_SUSPENDED return code only occurs if the data source module\n * requests suspension of the decompressor.  In this case the application\n * should load more source data and then re-call jpeg_read_header to resume\n * processing.\n * If a non-suspending data source is used and require_image is TRUE, then the\n * return code need not be inspected since only JPEG_HEADER_OK is possible.\n *\n * This routine is now just a front end to jpeg_consume_input, with some\n * extra error checking.\n */\n\nGLOBAL(int)\njpeg_read_header (j_decompress_ptr cinfo, boolean require_image)\n{\n  int retcode;\n\n  if (cinfo->global_state != DSTATE_START &&\n      cinfo->global_state != DSTATE_INHEADER)\n    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);\n\n  retcode = jpeg_consume_input(cinfo);\n\n  switch (retcode) {\n  case JPEG_REACHED_SOS:\n    retcode = JPEG_HEADER_OK;\n    break;\n  case JPEG_REACHED_EOI:\n    if (require_image)\t\t/* Complain if application wanted an image */\n      ERREXIT(cinfo, JERR_NO_IMAGE);\n    /* Reset to start state; it would be safer to require the application to\n     * call jpeg_abort, but we can't change it now for compatibility reasons.\n     * A side effect is to free any temporary memory (there shouldn't be any).\n     */\n    jpeg_abort((j_common_ptr) cinfo); /* sets state = DSTATE_START */\n    retcode = JPEG_HEADER_TABLES_ONLY;\n    break;\n  case JPEG_SUSPENDED:\n    /* no work */\n    break;\n  }\n\n  return retcode;\n}\n\n\n/*\n * Consume data in advance of what the decompressor requires.\n * This can be called at any time once the decompressor object has\n * been created and a data source has been set up.\n *\n * This routine is essentially a state machine that handles a couple\n * of critical state-transition actions, namely initial setup and\n * transition from header scanning to ready-for-start_decompress.\n * All the actual input is done via the input controller's consume_input\n * method.\n */\n\nGLOBAL(int)\njpeg_consume_input (j_decompress_ptr cinfo)\n{\n  int retcode = JPEG_SUSPENDED;\n\n  /* NB: every possible DSTATE value should be listed in this switch */\n  switch (cinfo->global_state) {\n  case DSTATE_START:\n    /* Start-of-datastream actions: reset appropriate modules */\n    (*cinfo->inputctl->reset_input_controller) (cinfo);\n    /* Initialize application's data source module */\n    (*cinfo->src->init_source) (cinfo);\n    cinfo->global_state = DSTATE_INHEADER;\n    /*FALLTHROUGH*/\n  case DSTATE_INHEADER:\n    retcode = (*cinfo->inputctl->consume_input) (cinfo);\n    if (retcode == JPEG_REACHED_SOS) { /* Found SOS, prepare to decompress */\n      /* Set up default parameters based on header data */\n      default_decompress_parms(cinfo);\n      /* Set global state: ready for start_decompress */\n      cinfo->global_state = DSTATE_READY;\n    }\n    break;\n  case DSTATE_READY:\n    /* Can't advance past first SOS until start_decompress is called */\n    retcode = JPEG_REACHED_SOS;\n    break;\n  case DSTATE_PRELOAD:\n  case DSTATE_PRESCAN:\n  case DSTATE_SCANNING:\n  case DSTATE_RAW_OK:\n  case DSTATE_BUFIMAGE:\n  case DSTATE_BUFPOST:\n  case DSTATE_STOPPING:\n    retcode = (*cinfo->inputctl->consume_input) (cinfo);\n    break;\n  default:\n    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);\n  }\n  return retcode;\n}\n\n\n/*\n * Have we finished reading the input file?\n */\n\nGLOBAL(boolean)\njpeg_input_complete (j_decompress_ptr cinfo)\n{\n  /* Check for valid jpeg object */\n  if (cinfo->global_state < DSTATE_START ||\n      cinfo->global_state > DSTATE_STOPPING)\n    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);\n  return cinfo->inputctl->eoi_reached;\n}\n\n\n/*\n * Is there more than one scan?\n */\n\nGLOBAL(boolean)\njpeg_has_multiple_scans (j_decompress_ptr cinfo)\n{\n  /* Only valid after jpeg_read_header completes */\n  if (cinfo->global_state < DSTATE_READY ||\n      cinfo->global_state > DSTATE_STOPPING)\n    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);\n  return cinfo->inputctl->has_multiple_scans;\n}\n\n\n/*\n * Finish JPEG decompression.\n *\n * This will normally just verify the file trailer and release temp storage.\n *\n * Returns FALSE if suspended.  The return value need be inspected only if\n * a suspending data source is used.\n */\n\nGLOBAL(boolean)\njpeg_finish_decompress (j_decompress_ptr cinfo)\n{\n  if ((cinfo->global_state == DSTATE_SCANNING ||\n       cinfo->global_state == DSTATE_RAW_OK) && ! cinfo->buffered_image) {\n    /* Terminate final pass of non-buffered mode */\n    if (cinfo->output_scanline < cinfo->output_height)\n      ERREXIT(cinfo, JERR_TOO_LITTLE_DATA);\n    (*cinfo->master->finish_output_pass) (cinfo);\n    cinfo->global_state = DSTATE_STOPPING;\n  } else if (cinfo->global_state == DSTATE_BUFIMAGE) {\n    /* Finishing after a buffered-image operation */\n    cinfo->global_state = DSTATE_STOPPING;\n  } else if (cinfo->global_state != DSTATE_STOPPING) {\n    /* STOPPING = repeat call after a suspension, anything else is error */\n    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);\n  }\n  /* Read until EOI */\n  while (! cinfo->inputctl->eoi_reached) {\n    if ((*cinfo->inputctl->consume_input) (cinfo) == JPEG_SUSPENDED)\n      return FALSE;\t\t/* Suspend, come back later */\n  }\n  /* Do final cleanup */\n  (*cinfo->src->term_source) (cinfo);\n  /* We can use jpeg_abort to release memory and reset global_state */\n  jpeg_abort((j_common_ptr) cinfo);\n  return TRUE;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jdapistd.c",
    "content": "/*\n * jdapistd.c\n *\n * Copyright (C) 1994-1996, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains application interface code for the decompression half\n * of the JPEG library.  These are the \"standard\" API routines that are\n * used in the normal full-decompression case.  They are not used by a\n * transcoding-only application.  Note that if an application links in\n * jpeg_start_decompress, it will end up linking in the entire decompressor.\n * We thus must separate this file from jdapimin.c to avoid linking the\n * whole decompression library into a transcoder.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n\n\n/* Forward declarations */\nLOCAL(boolean) output_pass_setup JPP((j_decompress_ptr cinfo));\n\n\n/*\n * Decompression initialization.\n * jpeg_read_header must be completed before calling this.\n *\n * If a multipass operating mode was selected, this will do all but the\n * last pass, and thus may take a great deal of time.\n *\n * Returns FALSE if suspended.  The return value need be inspected only if\n * a suspending data source is used.\n */\n\nGLOBAL(boolean)\njpeg_start_decompress (j_decompress_ptr cinfo)\n{\n  if (cinfo->global_state == DSTATE_READY) {\n    /* First call: initialize master control, select active modules */\n    jinit_master_decompress(cinfo);\n    if (cinfo->buffered_image) {\n      /* No more work here; expecting jpeg_start_output next */\n      cinfo->global_state = DSTATE_BUFIMAGE;\n      return TRUE;\n    }\n    cinfo->global_state = DSTATE_PRELOAD;\n  }\n  if (cinfo->global_state == DSTATE_PRELOAD) {\n    /* If file has multiple scans, absorb them all into the coef buffer */\n    if (cinfo->inputctl->has_multiple_scans) {\n#ifdef D_MULTISCAN_FILES_SUPPORTED\n      for (;;) {\n\tint retcode;\n\t/* Call progress monitor hook if present */\n\tif (cinfo->progress != NULL)\n\t  (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo);\n\t/* Absorb some more input */\n\tretcode = (*cinfo->inputctl->consume_input) (cinfo);\n\tif (retcode == JPEG_SUSPENDED)\n\t  return FALSE;\n\tif (retcode == JPEG_REACHED_EOI)\n\t  break;\n\t/* Advance progress counter if appropriate */\n\tif (cinfo->progress != NULL &&\n\t    (retcode == JPEG_ROW_COMPLETED || retcode == JPEG_REACHED_SOS)) {\n\t  if (++cinfo->progress->pass_counter >= cinfo->progress->pass_limit) {\n\t    /* jdmaster underestimated number of scans; ratchet up one scan */\n\t    cinfo->progress->pass_limit += (long) cinfo->total_iMCU_rows;\n\t  }\n\t}\n      }\n#else\n      ERREXIT(cinfo, JERR_NOT_COMPILED);\n#endif /* D_MULTISCAN_FILES_SUPPORTED */\n    }\n    cinfo->output_scan_number = cinfo->input_scan_number;\n  } else if (cinfo->global_state != DSTATE_PRESCAN)\n    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);\n  /* Perform any dummy output passes, and set up for the final pass */\n  return output_pass_setup(cinfo);\n}\n\n\n/*\n * Set up for an output pass, and perform any dummy pass(es) needed.\n * Common subroutine for jpeg_start_decompress and jpeg_start_output.\n * Entry: global_state = DSTATE_PRESCAN only if previously suspended.\n * Exit: If done, returns TRUE and sets global_state for proper output mode.\n *       If suspended, returns FALSE and sets global_state = DSTATE_PRESCAN.\n */\n\nLOCAL(boolean)\noutput_pass_setup (j_decompress_ptr cinfo)\n{\n  if (cinfo->global_state != DSTATE_PRESCAN) {\n    /* First call: do pass setup */\n    (*cinfo->master->prepare_for_output_pass) (cinfo);\n    cinfo->output_scanline = 0;\n    cinfo->global_state = DSTATE_PRESCAN;\n  }\n  /* Loop over any required dummy passes */\n  while (cinfo->master->is_dummy_pass) {\n#ifdef QUANT_2PASS_SUPPORTED\n    /* Crank through the dummy pass */\n    while (cinfo->output_scanline < cinfo->output_height) {\n      JDIMENSION last_scanline;\n      /* Call progress monitor hook if present */\n      if (cinfo->progress != NULL) {\n\tcinfo->progress->pass_counter = (long) cinfo->output_scanline;\n\tcinfo->progress->pass_limit = (long) cinfo->output_height;\n\t(*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo);\n      }\n      /* Process some data */\n      last_scanline = cinfo->output_scanline;\n      (*cinfo->main->process_data) (cinfo, (JSAMPARRAY) NULL,\n\t\t\t\t    &cinfo->output_scanline, (JDIMENSION) 0);\n      if (cinfo->output_scanline == last_scanline)\n\treturn FALSE;\t\t/* No progress made, must suspend */\n    }\n    /* Finish up dummy pass, and set up for another one */\n    (*cinfo->master->finish_output_pass) (cinfo);\n    (*cinfo->master->prepare_for_output_pass) (cinfo);\n    cinfo->output_scanline = 0;\n#else\n    ERREXIT(cinfo, JERR_NOT_COMPILED);\n#endif /* QUANT_2PASS_SUPPORTED */\n  }\n  /* Ready for application to drive output pass through\n   * jpeg_read_scanlines or jpeg_read_raw_data.\n   */\n  cinfo->global_state = cinfo->raw_data_out ? DSTATE_RAW_OK : DSTATE_SCANNING;\n  return TRUE;\n}\n\n\n/*\n * Read some scanlines of data from the JPEG decompressor.\n *\n * The return value will be the number of lines actually read.\n * This may be less than the number requested in several cases,\n * including bottom of image, data source suspension, and operating\n * modes that emit multiple scanlines at a time.\n *\n * Note: we warn about excess calls to jpeg_read_scanlines() since\n * this likely signals an application programmer error.  However,\n * an oversize buffer (max_lines > scanlines remaining) is not an error.\n */\n\nGLOBAL(JDIMENSION)\njpeg_read_scanlines (j_decompress_ptr cinfo, JSAMPARRAY scanlines,\n\t\t     JDIMENSION max_lines)\n{\n  JDIMENSION row_ctr;\n\n  if (cinfo->global_state != DSTATE_SCANNING)\n    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);\n  if (cinfo->output_scanline >= cinfo->output_height) {\n    WARNMS(cinfo, JWRN_TOO_MUCH_DATA);\n    return 0;\n  }\n\n  /* Call progress monitor hook if present */\n  if (cinfo->progress != NULL) {\n    cinfo->progress->pass_counter = (long) cinfo->output_scanline;\n    cinfo->progress->pass_limit = (long) cinfo->output_height;\n    (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo);\n  }\n\n  /* Process some data */\n  row_ctr = 0;\n  (*cinfo->main->process_data) (cinfo, scanlines, &row_ctr, max_lines);\n  cinfo->output_scanline += row_ctr;\n  return row_ctr;\n}\n\n\n/*\n * Alternate entry point to read raw data.\n * Processes exactly one iMCU row per call, unless suspended.\n */\n\nGLOBAL(JDIMENSION)\njpeg_read_raw_data (j_decompress_ptr cinfo, JSAMPIMAGE data,\n\t\t    JDIMENSION max_lines)\n{\n  JDIMENSION lines_per_iMCU_row;\n\n  if (cinfo->global_state != DSTATE_RAW_OK)\n    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);\n  if (cinfo->output_scanline >= cinfo->output_height) {\n    WARNMS(cinfo, JWRN_TOO_MUCH_DATA);\n    return 0;\n  }\n\n  /* Call progress monitor hook if present */\n  if (cinfo->progress != NULL) {\n    cinfo->progress->pass_counter = (long) cinfo->output_scanline;\n    cinfo->progress->pass_limit = (long) cinfo->output_height;\n    (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo);\n  }\n\n  /* Verify that at least one iMCU row can be returned. */\n  lines_per_iMCU_row = cinfo->max_v_samp_factor * cinfo->min_DCT_scaled_size;\n  if (max_lines < lines_per_iMCU_row)\n    ERREXIT(cinfo, JERR_BUFFER_SIZE);\n\n  /* Decompress directly into user's buffer. */\n  if (! (*cinfo->coef->decompress_data) (cinfo, data))\n    return 0;\t\t\t/* suspension forced, can do nothing more */\n\n  /* OK, we processed one iMCU row. */\n  cinfo->output_scanline += lines_per_iMCU_row;\n  return lines_per_iMCU_row;\n}\n\n\n/* Additional entry points for buffered-image mode. */\n\n#ifdef D_MULTISCAN_FILES_SUPPORTED\n\n/*\n * Initialize for an output pass in buffered-image mode.\n */\n\nGLOBAL(boolean)\njpeg_start_output (j_decompress_ptr cinfo, int scan_number)\n{\n  if (cinfo->global_state != DSTATE_BUFIMAGE &&\n      cinfo->global_state != DSTATE_PRESCAN)\n    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);\n  /* Limit scan number to valid range */\n  if (scan_number <= 0)\n    scan_number = 1;\n  if (cinfo->inputctl->eoi_reached &&\n      scan_number > cinfo->input_scan_number)\n    scan_number = cinfo->input_scan_number;\n  cinfo->output_scan_number = scan_number;\n  /* Perform any dummy output passes, and set up for the real pass */\n  return output_pass_setup(cinfo);\n}\n\n\n/*\n * Finish up after an output pass in buffered-image mode.\n *\n * Returns FALSE if suspended.  The return value need be inspected only if\n * a suspending data source is used.\n */\n\nGLOBAL(boolean)\njpeg_finish_output (j_decompress_ptr cinfo)\n{\n  if ((cinfo->global_state == DSTATE_SCANNING ||\n       cinfo->global_state == DSTATE_RAW_OK) && cinfo->buffered_image) {\n    /* Terminate this pass. */\n    /* We do not require the whole pass to have been completed. */\n    (*cinfo->master->finish_output_pass) (cinfo);\n    cinfo->global_state = DSTATE_BUFPOST;\n  } else if (cinfo->global_state != DSTATE_BUFPOST) {\n    /* BUFPOST = repeat call after a suspension, anything else is error */\n    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);\n  }\n  /* Read markers looking for SOS or EOI */\n  while (cinfo->input_scan_number <= cinfo->output_scan_number &&\n\t ! cinfo->inputctl->eoi_reached) {\n    if ((*cinfo->inputctl->consume_input) (cinfo) == JPEG_SUSPENDED)\n      return FALSE;\t\t/* Suspend, come back later */\n  }\n  cinfo->global_state = DSTATE_BUFIMAGE;\n  return TRUE;\n}\n\n#endif /* D_MULTISCAN_FILES_SUPPORTED */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jdatadst.c",
    "content": "/*\n * jdatadst.c\n *\n * Copyright (C) 1994-1996, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains compression data destination routines for the case of\n * emitting JPEG data to a file (or any stdio stream).  While these routines\n * are sufficient for most applications, some will want to use a different\n * destination manager.\n * IMPORTANT: we assume that fwrite() will correctly transcribe an array of\n * JOCTETs into 8-bit-wide elements on external storage.  If char is wider\n * than 8 bits on your machine, you may need to do some tweaking.\n */\n\n/* this is not a core library module, so it doesn't define JPEG_INTERNALS */\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n#include \"jerror.h\"\n\n\n/* Expanded data destination object for stdio output */\n\ntypedef struct {\n  struct jpeg_destination_mgr pub; /* public fields */\n\n  FILE * outfile;\t\t/* target stream */\n  JOCTET * buffer;\t\t/* start of buffer */\n} my_destination_mgr;\n\ntypedef my_destination_mgr * my_dest_ptr;\n\n#define OUTPUT_BUF_SIZE  4096\t/* choose an efficiently fwrite'able size */\n\n\n/*\n * Initialize destination --- called by jpeg_start_compress\n * before any data is actually written.\n */\n\nMETHODDEF(void)\ninit_destination (j_compress_ptr cinfo)\n{\n  my_dest_ptr dest = (my_dest_ptr) cinfo->dest;\n\n  /* Allocate the output buffer --- it will be released when done with image */\n  dest->buffer = (JOCTET *)\n      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\t  OUTPUT_BUF_SIZE * SIZEOF(JOCTET));\n\n  dest->pub.next_output_byte = dest->buffer;\n  dest->pub.free_in_buffer = OUTPUT_BUF_SIZE;\n}\n\n\n/*\n * Empty the output buffer --- called whenever buffer fills up.\n *\n * In typical applications, this should write the entire output buffer\n * (ignoring the current state of next_output_byte & free_in_buffer),\n * reset the pointer & count to the start of the buffer, and return TRUE\n * indicating that the buffer has been dumped.\n *\n * In applications that need to be able to suspend compression due to output\n * overrun, a FALSE return indicates that the buffer cannot be emptied now.\n * In this situation, the compressor will return to its caller (possibly with\n * an indication that it has not accepted all the supplied scanlines).  The\n * application should resume compression after it has made more room in the\n * output buffer.  Note that there are substantial restrictions on the use of\n * suspension --- see the documentation.\n *\n * When suspending, the compressor will back up to a convenient restart point\n * (typically the start of the current MCU). next_output_byte & free_in_buffer\n * indicate where the restart point will be if the current call returns FALSE.\n * Data beyond this point will be regenerated after resumption, so do not\n * write it out when emptying the buffer externally.\n */\n\nMETHODDEF(boolean)\nempty_output_buffer (j_compress_ptr cinfo)\n{\n  my_dest_ptr dest = (my_dest_ptr) cinfo->dest;\n\n  if (JFWRITE(dest->outfile, dest->buffer, OUTPUT_BUF_SIZE) !=\n      (size_t) OUTPUT_BUF_SIZE)\n    ERREXIT(cinfo, JERR_FILE_WRITE);\n\n  dest->pub.next_output_byte = dest->buffer;\n  dest->pub.free_in_buffer = OUTPUT_BUF_SIZE;\n\n  return TRUE;\n}\n\n\n/*\n * Terminate destination --- called by jpeg_finish_compress\n * after all data has been written.  Usually needs to flush buffer.\n *\n * NB: *not* called by jpeg_abort or jpeg_destroy; surrounding\n * application must deal with any cleanup that should happen even\n * for error exit.\n */\n\nMETHODDEF(void)\nterm_destination (j_compress_ptr cinfo)\n{\n  my_dest_ptr dest = (my_dest_ptr) cinfo->dest;\n  size_t datacount = OUTPUT_BUF_SIZE - dest->pub.free_in_buffer;\n\n  /* Write any data remaining in the buffer */\n  if (datacount > 0) {\n    if (JFWRITE(dest->outfile, dest->buffer, datacount) != datacount)\n      ERREXIT(cinfo, JERR_FILE_WRITE);\n  }\n  fflush(dest->outfile);\n  /* Make sure we wrote the output file OK */\n  if (ferror(dest->outfile))\n    ERREXIT(cinfo, JERR_FILE_WRITE);\n}\n\n\n/*\n * Prepare for output to a stdio stream.\n * The caller must have already opened the stream, and is responsible\n * for closing it after finishing compression.\n */\n\nGLOBAL(void)\njpeg_stdio_dest (j_compress_ptr cinfo, FILE * outfile)\n{\n  my_dest_ptr dest;\n\n  /* The destination object is made permanent so that multiple JPEG images\n   * can be written to the same file without re-executing jpeg_stdio_dest.\n   * This makes it dangerous to use this manager and a different destination\n   * manager serially with the same JPEG object, because their private object\n   * sizes may be different.  Caveat programmer.\n   */\n  if (cinfo->dest == NULL) {\t/* first time for this JPEG object? */\n    cinfo->dest = (struct jpeg_destination_mgr *)\n      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,\n\t\t\t\t  SIZEOF(my_destination_mgr));\n  }\n\n  dest = (my_dest_ptr) cinfo->dest;\n  dest->pub.init_destination = init_destination;\n  dest->pub.empty_output_buffer = empty_output_buffer;\n  dest->pub.term_destination = term_destination;\n  dest->outfile = outfile;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jdatasrc.c",
    "content": "/*\n * jdatasrc.c\n *\n * Copyright (C) 1994-1996, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains decompression data source routines for the case of\n * reading JPEG data from a file (or any stdio stream).  While these routines\n * are sufficient for most applications, some will want to use a different\n * source manager.\n * IMPORTANT: we assume that fread() will correctly transcribe an array of\n * JOCTETs from 8-bit-wide elements on external storage.  If char is wider\n * than 8 bits on your machine, you may need to do some tweaking.\n */\n\n/* this is not a core library module, so it doesn't define JPEG_INTERNALS */\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n#include \"jerror.h\"\n\n\n/* Expanded data source object for stdio input */\n\ntypedef struct {\n  struct jpeg_source_mgr pub;\t/* public fields */\n\n  FILE * infile;\t\t/* source stream */\n  JOCTET * buffer;\t\t/* start of buffer */\n  boolean start_of_file;\t/* have we gotten any data yet? */\n} my_source_mgr;\n\ntypedef my_source_mgr * my_src_ptr;\n\n#define INPUT_BUF_SIZE  4096\t/* choose an efficiently fread'able size */\n\n\n/*\n * Initialize source --- called by jpeg_read_header\n * before any data is actually read.\n */\n\nMETHODDEF(void)\ninit_source (j_decompress_ptr cinfo)\n{\n  my_src_ptr src = (my_src_ptr) cinfo->src;\n\n  /* We reset the empty-input-file flag for each image,\n   * but we don't clear the input buffer.\n   * This is correct behavior for reading a series of images from one source.\n   */\n  src->start_of_file = TRUE;\n}\n\n\n/*\n * Fill the input buffer --- called whenever buffer is emptied.\n *\n * In typical applications, this should read fresh data into the buffer\n * (ignoring the current state of next_input_byte & bytes_in_buffer),\n * reset the pointer & count to the start of the buffer, and return TRUE\n * indicating that the buffer has been reloaded.  It is not necessary to\n * fill the buffer entirely, only to obtain at least one more byte.\n *\n * There is no such thing as an EOF return.  If the end of the file has been\n * reached, the routine has a choice of ERREXIT() or inserting fake data into\n * the buffer.  In most cases, generating a warning message and inserting a\n * fake EOI marker is the best course of action --- this will allow the\n * decompressor to output however much of the image is there.  However,\n * the resulting error message is misleading if the real problem is an empty\n * input file, so we handle that case specially.\n *\n * In applications that need to be able to suspend compression due to input\n * not being available yet, a FALSE return indicates that no more data can be\n * obtained right now, but more may be forthcoming later.  In this situation,\n * the decompressor will return to its caller (with an indication of the\n * number of scanlines it has read, if any).  The application should resume\n * decompression after it has loaded more data into the input buffer.  Note\n * that there are substantial restrictions on the use of suspension --- see\n * the documentation.\n *\n * When suspending, the decompressor will back up to a convenient restart point\n * (typically the start of the current MCU). next_input_byte & bytes_in_buffer\n * indicate where the restart point will be if the current call returns FALSE.\n * Data beyond this point must be rescanned after resumption, so move it to\n * the front of the buffer rather than discarding it.\n */\n\nMETHODDEF(boolean)\nfill_input_buffer (j_decompress_ptr cinfo)\n{\n  my_src_ptr src = (my_src_ptr) cinfo->src;\n  size_t nbytes;\n\n  nbytes = JFREAD(src->infile, src->buffer, INPUT_BUF_SIZE);\n\n  if (nbytes <= 0) {\n    if (src->start_of_file)\t/* Treat empty input file as fatal error */\n      ERREXIT(cinfo, JERR_INPUT_EMPTY);\n    WARNMS(cinfo, JWRN_JPEG_EOF);\n    /* Insert a fake EOI marker */\n    src->buffer[0] = (JOCTET) 0xFF;\n    src->buffer[1] = (JOCTET) JPEG_EOI;\n    nbytes = 2;\n  }\n\n  src->pub.next_input_byte = src->buffer;\n  src->pub.bytes_in_buffer = nbytes;\n  src->start_of_file = FALSE;\n\n  return TRUE;\n}\n\n\n/*\n * Skip data --- used to skip over a potentially large amount of\n * uninteresting data (such as an APPn marker).\n *\n * Writers of suspendable-input applications must note that skip_input_data\n * is not granted the right to give a suspension return.  If the skip extends\n * beyond the data currently in the buffer, the buffer can be marked empty so\n * that the next read will cause a fill_input_buffer call that can suspend.\n * Arranging for additional bytes to be discarded before reloading the input\n * buffer is the application writer's problem.\n */\n\nMETHODDEF(void)\nskip_input_data (j_decompress_ptr cinfo, long num_bytes)\n{\n  my_src_ptr src = (my_src_ptr) cinfo->src;\n\n  /* Just a dumb implementation for now.  Could use fseek() except\n   * it doesn't work on pipes.  Not clear that being smart is worth\n   * any trouble anyway --- large skips are infrequent.\n   */\n  if (num_bytes > 0) {\n    while (num_bytes > (long) src->pub.bytes_in_buffer) {\n      num_bytes -= (long) src->pub.bytes_in_buffer;\n      (void) fill_input_buffer(cinfo);\n      /* note we assume that fill_input_buffer will never return FALSE,\n       * so suspension need not be handled.\n       */\n    }\n    src->pub.next_input_byte += (size_t) num_bytes;\n    src->pub.bytes_in_buffer -= (size_t) num_bytes;\n  }\n}\n\n\n/*\n * An additional method that can be provided by data source modules is the\n * resync_to_restart method for error recovery in the presence of RST markers.\n * For the moment, this source module just uses the default resync method\n * provided by the JPEG library.  That method assumes that no backtracking\n * is possible.\n */\n\n\n/*\n * Terminate source --- called by jpeg_finish_decompress\n * after all data has been read.  Often a no-op.\n *\n * NB: *not* called by jpeg_abort or jpeg_destroy; surrounding\n * application must deal with any cleanup that should happen even\n * for error exit.\n */\n\nMETHODDEF(void)\nterm_source (j_decompress_ptr cinfo)\n{\n  /* no work necessary here */\n}\n\n\n/*\n * Prepare for input from a stdio stream.\n * The caller must have already opened the stream, and is responsible\n * for closing it after finishing decompression.\n */\n\nGLOBAL(void)\njpeg_stdio_src (j_decompress_ptr cinfo, FILE * infile)\n{\n  my_src_ptr src;\n\n  /* The source object and input buffer are made permanent so that a series\n   * of JPEG images can be read from the same file by calling jpeg_stdio_src\n   * only before the first one.  (If we discarded the buffer at the end of\n   * one image, we'd likely lose the start of the next one.)\n   * This makes it unsafe to use this manager and a different source\n   * manager serially with the same JPEG object.  Caveat programmer.\n   */\n  if (cinfo->src == NULL) {\t/* first time for this JPEG object? */\n    cinfo->src = (struct jpeg_source_mgr *)\n      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,\n\t\t\t\t  SIZEOF(my_source_mgr));\n    src = (my_src_ptr) cinfo->src;\n    src->buffer = (JOCTET *)\n      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,\n\t\t\t\t  INPUT_BUF_SIZE * SIZEOF(JOCTET));\n  }\n\n  src = (my_src_ptr) cinfo->src;\n  src->pub.init_source = init_source;\n  src->pub.fill_input_buffer = fill_input_buffer;\n  src->pub.skip_input_data = skip_input_data;\n  src->pub.resync_to_restart = jpeg_resync_to_restart; /* use default method */\n  src->pub.term_source = term_source;\n  src->infile = infile;\n  src->pub.bytes_in_buffer = 0; /* forces fill_input_buffer on first read */\n  src->pub.next_input_byte = NULL; /* until buffer loaded */\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jdcoefct.c",
    "content": "/*\n * jdcoefct.c\n *\n * Copyright (C) 1994-1997, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains the coefficient buffer controller for decompression.\n * This controller is the top level of the JPEG decompressor proper.\n * The coefficient buffer lies between entropy decoding and inverse-DCT steps.\n *\n * In buffered-image mode, this controller is the interface between\n * input-oriented processing and output-oriented processing.\n * Also, the input side (only) is used when reading a file for transcoding.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n\n/* Block smoothing is only applicable for progressive JPEG, so: */\n#ifndef D_PROGRESSIVE_SUPPORTED\n#undef BLOCK_SMOOTHING_SUPPORTED\n#endif\n\n/* Private buffer controller object */\n\ntypedef struct {\n  struct jpeg_d_coef_controller pub; /* public fields */\n\n  /* These variables keep track of the current location of the input side. */\n  /* cinfo->input_iMCU_row is also used for this. */\n  JDIMENSION MCU_ctr;\t\t/* counts MCUs processed in current row */\n  int MCU_vert_offset;\t\t/* counts MCU rows within iMCU row */\n  int MCU_rows_per_iMCU_row;\t/* number of such rows needed */\n\n  /* The output side's location is represented by cinfo->output_iMCU_row. */\n\n  /* In single-pass modes, it's sufficient to buffer just one MCU.\n   * We allocate a workspace of D_MAX_BLOCKS_IN_MCU coefficient blocks,\n   * and let the entropy decoder write into that workspace each time.\n   * (On 80x86, the workspace is FAR even though it's not really very big;\n   * this is to keep the module interfaces unchanged when a large coefficient\n   * buffer is necessary.)\n   * In multi-pass modes, this array points to the current MCU's blocks\n   * within the virtual arrays; it is used only by the input side.\n   */\n  JBLOCKROW MCU_buffer[D_MAX_BLOCKS_IN_MCU];\n\n#ifdef D_MULTISCAN_FILES_SUPPORTED\n  /* In multi-pass modes, we need a virtual block array for each component. */\n  jvirt_barray_ptr whole_image[MAX_COMPONENTS];\n#endif\n\n#ifdef BLOCK_SMOOTHING_SUPPORTED\n  /* When doing block smoothing, we latch coefficient Al values here */\n  int * coef_bits_latch;\n#define SAVED_COEFS  6\t\t/* we save coef_bits[0..5] */\n#endif\n} my_coef_controller;\n\ntypedef my_coef_controller * my_coef_ptr;\n\n/* Forward declarations */\nMETHODDEF(int) decompress_onepass\n\tJPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf));\n#ifdef D_MULTISCAN_FILES_SUPPORTED\nMETHODDEF(int) decompress_data\n\tJPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf));\n#endif\n#ifdef BLOCK_SMOOTHING_SUPPORTED\nLOCAL(boolean) smoothing_ok JPP((j_decompress_ptr cinfo));\nMETHODDEF(int) decompress_smooth_data\n\tJPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf));\n#endif\n\n\nLOCAL(void)\nstart_iMCU_row (j_decompress_ptr cinfo)\n/* Reset within-iMCU-row counters for a new row (input side) */\n{\n  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;\n\n  /* In an interleaved scan, an MCU row is the same as an iMCU row.\n   * In a noninterleaved scan, an iMCU row has v_samp_factor MCU rows.\n   * But at the bottom of the image, process only what's left.\n   */\n  if (cinfo->comps_in_scan > 1) {\n    coef->MCU_rows_per_iMCU_row = 1;\n  } else {\n    if (cinfo->input_iMCU_row < (cinfo->total_iMCU_rows-1))\n      coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->v_samp_factor;\n    else\n      coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->last_row_height;\n  }\n\n  coef->MCU_ctr = 0;\n  coef->MCU_vert_offset = 0;\n}\n\n\n/*\n * Initialize for an input processing pass.\n */\n\nMETHODDEF(void)\nstart_input_pass (j_decompress_ptr cinfo)\n{\n  cinfo->input_iMCU_row = 0;\n  start_iMCU_row(cinfo);\n}\n\n\n/*\n * Initialize for an output processing pass.\n */\n\nMETHODDEF(void)\nstart_output_pass (j_decompress_ptr cinfo)\n{\n#ifdef BLOCK_SMOOTHING_SUPPORTED\n  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;\n\n  /* If multipass, check to see whether to use block smoothing on this pass */\n  if (coef->pub.coef_arrays != NULL) {\n    if (cinfo->do_block_smoothing && smoothing_ok(cinfo))\n      coef->pub.decompress_data = decompress_smooth_data;\n    else\n      coef->pub.decompress_data = decompress_data;\n  }\n#endif\n  cinfo->output_iMCU_row = 0;\n}\n\n\n/*\n * Decompress and return some data in the single-pass case.\n * Always attempts to emit one fully interleaved MCU row (\"iMCU\" row).\n * Input and output must run in lockstep since we have only a one-MCU buffer.\n * Return value is JPEG_ROW_COMPLETED, JPEG_SCAN_COMPLETED, or JPEG_SUSPENDED.\n *\n * NB: output_buf contains a plane for each component in image,\n * which we index according to the component's SOF position.\n */\n\nMETHODDEF(int)\ndecompress_onepass (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)\n{\n  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;\n  JDIMENSION MCU_col_num;\t/* index of current MCU within row */\n  JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1;\n  JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1;\n  int blkn, ci, xindex, yindex, yoffset, useful_width;\n  JSAMPARRAY output_ptr;\n  JDIMENSION start_col, output_col;\n  jpeg_component_info *compptr;\n  inverse_DCT_method_ptr inverse_DCT;\n\n  /* Loop to process as much as one whole iMCU row */\n  for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row;\n       yoffset++) {\n    for (MCU_col_num = coef->MCU_ctr; MCU_col_num <= last_MCU_col;\n\t MCU_col_num++) {\n      /* Try to fetch an MCU.  Entropy decoder expects buffer to be zeroed. */\n      jzero_far((void FAR *) coef->MCU_buffer[0],\n\t\t(size_t) (cinfo->blocks_in_MCU * SIZEOF(JBLOCK)));\n      if (! (*cinfo->entropy->decode_mcu) (cinfo, coef->MCU_buffer)) {\n\t/* Suspension forced; update state counters and exit */\n\tcoef->MCU_vert_offset = yoffset;\n\tcoef->MCU_ctr = MCU_col_num;\n\treturn JPEG_SUSPENDED;\n      }\n      /* Determine where data should go in output_buf and do the IDCT thing.\n       * We skip dummy blocks at the right and bottom edges (but blkn gets\n       * incremented past them!).  Note the inner loop relies on having\n       * allocated the MCU_buffer[] blocks sequentially.\n       */\n      blkn = 0;\t\t\t/* index of current DCT block within MCU */\n      for (ci = 0; ci < cinfo->comps_in_scan; ci++) {\n\tcompptr = cinfo->cur_comp_info[ci];\n\t/* Don't bother to IDCT an uninteresting component. */\n\tif (! compptr->component_needed) {\n\t  blkn += compptr->MCU_blocks;\n\t  continue;\n\t}\n\tinverse_DCT = cinfo->idct->inverse_DCT[compptr->component_index];\n\tuseful_width = (MCU_col_num < last_MCU_col) ? compptr->MCU_width\n\t\t\t\t\t\t    : compptr->last_col_width;\n\toutput_ptr = output_buf[compptr->component_index] +\n\t  yoffset * compptr->DCT_scaled_size;\n\tstart_col = MCU_col_num * compptr->MCU_sample_width;\n\tfor (yindex = 0; yindex < compptr->MCU_height; yindex++) {\n\t  if (cinfo->input_iMCU_row < last_iMCU_row ||\n\t      yoffset+yindex < compptr->last_row_height) {\n\t    output_col = start_col;\n\t    for (xindex = 0; xindex < useful_width; xindex++) {\n\t      (*inverse_DCT) (cinfo, compptr,\n\t\t\t      (JCOEFPTR) coef->MCU_buffer[blkn+xindex],\n\t\t\t      output_ptr, output_col);\n\t      output_col += compptr->DCT_scaled_size;\n\t    }\n\t  }\n\t  blkn += compptr->MCU_width;\n\t  output_ptr += compptr->DCT_scaled_size;\n\t}\n      }\n    }\n    /* Completed an MCU row, but perhaps not an iMCU row */\n    coef->MCU_ctr = 0;\n  }\n  /* Completed the iMCU row, advance counters for next one */\n  cinfo->output_iMCU_row++;\n  if (++(cinfo->input_iMCU_row) < cinfo->total_iMCU_rows) {\n    start_iMCU_row(cinfo);\n    return JPEG_ROW_COMPLETED;\n  }\n  /* Completed the scan */\n  (*cinfo->inputctl->finish_input_pass) (cinfo);\n  return JPEG_SCAN_COMPLETED;\n}\n\n\n/*\n * Dummy consume-input routine for single-pass operation.\n */\n\nMETHODDEF(int)\ndummy_consume_data (j_decompress_ptr cinfo)\n{\n  return JPEG_SUSPENDED;\t/* Always indicate nothing was done */\n}\n\n\n#ifdef D_MULTISCAN_FILES_SUPPORTED\n\n/*\n * Consume input data and store it in the full-image coefficient buffer.\n * We read as much as one fully interleaved MCU row (\"iMCU\" row) per call,\n * ie, v_samp_factor block rows for each component in the scan.\n * Return value is JPEG_ROW_COMPLETED, JPEG_SCAN_COMPLETED, or JPEG_SUSPENDED.\n */\n\nMETHODDEF(int)\nconsume_data (j_decompress_ptr cinfo)\n{\n  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;\n  JDIMENSION MCU_col_num;\t/* index of current MCU within row */\n  int blkn, ci, xindex, yindex, yoffset;\n  JDIMENSION start_col;\n  JBLOCKARRAY buffer[MAX_COMPS_IN_SCAN];\n  JBLOCKROW buffer_ptr;\n  jpeg_component_info *compptr;\n\n  /* Align the virtual buffers for the components used in this scan. */\n  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {\n    compptr = cinfo->cur_comp_info[ci];\n    buffer[ci] = (*cinfo->mem->access_virt_barray)\n      ((j_common_ptr) cinfo, coef->whole_image[compptr->component_index],\n       cinfo->input_iMCU_row * compptr->v_samp_factor,\n       (JDIMENSION) compptr->v_samp_factor, TRUE);\n    /* Note: entropy decoder expects buffer to be zeroed,\n     * but this is handled automatically by the memory manager\n     * because we requested a pre-zeroed array.\n     */\n  }\n\n  /* Loop to process one whole iMCU row */\n  for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row;\n       yoffset++) {\n    for (MCU_col_num = coef->MCU_ctr; MCU_col_num < cinfo->MCUs_per_row;\n\t MCU_col_num++) {\n      /* Construct list of pointers to DCT blocks belonging to this MCU */\n      blkn = 0;\t\t\t/* index of current DCT block within MCU */\n      for (ci = 0; ci < cinfo->comps_in_scan; ci++) {\n\tcompptr = cinfo->cur_comp_info[ci];\n\tstart_col = MCU_col_num * compptr->MCU_width;\n\tfor (yindex = 0; yindex < compptr->MCU_height; yindex++) {\n\t  buffer_ptr = buffer[ci][yindex+yoffset] + start_col;\n\t  for (xindex = 0; xindex < compptr->MCU_width; xindex++) {\n\t    coef->MCU_buffer[blkn++] = buffer_ptr++;\n\t  }\n\t}\n      }\n      /* Try to fetch the MCU. */\n      if (! (*cinfo->entropy->decode_mcu) (cinfo, coef->MCU_buffer)) {\n\t/* Suspension forced; update state counters and exit */\n\tcoef->MCU_vert_offset = yoffset;\n\tcoef->MCU_ctr = MCU_col_num;\n\treturn JPEG_SUSPENDED;\n      }\n    }\n    /* Completed an MCU row, but perhaps not an iMCU row */\n    coef->MCU_ctr = 0;\n  }\n  /* Completed the iMCU row, advance counters for next one */\n  if (++(cinfo->input_iMCU_row) < cinfo->total_iMCU_rows) {\n    start_iMCU_row(cinfo);\n    return JPEG_ROW_COMPLETED;\n  }\n  /* Completed the scan */\n  (*cinfo->inputctl->finish_input_pass) (cinfo);\n  return JPEG_SCAN_COMPLETED;\n}\n\n\n/*\n * Decompress and return some data in the multi-pass case.\n * Always attempts to emit one fully interleaved MCU row (\"iMCU\" row).\n * Return value is JPEG_ROW_COMPLETED, JPEG_SCAN_COMPLETED, or JPEG_SUSPENDED.\n *\n * NB: output_buf contains a plane for each component in image.\n */\n\nMETHODDEF(int)\ndecompress_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)\n{\n  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;\n  JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1;\n  JDIMENSION block_num;\n  int ci, block_row, block_rows;\n  JBLOCKARRAY buffer;\n  JBLOCKROW buffer_ptr;\n  JSAMPARRAY output_ptr;\n  JDIMENSION output_col;\n  jpeg_component_info *compptr;\n  inverse_DCT_method_ptr inverse_DCT;\n\n  /* Force some input to be done if we are getting ahead of the input. */\n  while (cinfo->input_scan_number < cinfo->output_scan_number ||\n\t (cinfo->input_scan_number == cinfo->output_scan_number &&\n\t  cinfo->input_iMCU_row <= cinfo->output_iMCU_row)) {\n    if ((*cinfo->inputctl->consume_input)(cinfo) == JPEG_SUSPENDED)\n      return JPEG_SUSPENDED;\n  }\n\n  /* OK, output from the virtual arrays. */\n  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n       ci++, compptr++) {\n    /* Don't bother to IDCT an uninteresting component. */\n    if (! compptr->component_needed)\n      continue;\n    /* Align the virtual buffer for this component. */\n    buffer = (*cinfo->mem->access_virt_barray)\n      ((j_common_ptr) cinfo, coef->whole_image[ci],\n       cinfo->output_iMCU_row * compptr->v_samp_factor,\n       (JDIMENSION) compptr->v_samp_factor, FALSE);\n    /* Count non-dummy DCT block rows in this iMCU row. */\n    if (cinfo->output_iMCU_row < last_iMCU_row)\n      block_rows = compptr->v_samp_factor;\n    else {\n      /* NB: can't use last_row_height here; it is input-side-dependent! */\n      block_rows = (int) (compptr->height_in_blocks % compptr->v_samp_factor);\n      if (block_rows == 0) block_rows = compptr->v_samp_factor;\n    }\n    inverse_DCT = cinfo->idct->inverse_DCT[ci];\n    output_ptr = output_buf[ci];\n    /* Loop over all DCT blocks to be processed. */\n    for (block_row = 0; block_row < block_rows; block_row++) {\n      buffer_ptr = buffer[block_row];\n      output_col = 0;\n      for (block_num = 0; block_num < compptr->width_in_blocks; block_num++) {\n\t(*inverse_DCT) (cinfo, compptr, (JCOEFPTR) buffer_ptr,\n\t\t\toutput_ptr, output_col);\n\tbuffer_ptr++;\n\toutput_col += compptr->DCT_scaled_size;\n      }\n      output_ptr += compptr->DCT_scaled_size;\n    }\n  }\n\n  if (++(cinfo->output_iMCU_row) < cinfo->total_iMCU_rows)\n    return JPEG_ROW_COMPLETED;\n  return JPEG_SCAN_COMPLETED;\n}\n\n#endif /* D_MULTISCAN_FILES_SUPPORTED */\n\n\n#ifdef BLOCK_SMOOTHING_SUPPORTED\n\n/*\n * This code applies interblock smoothing as described by section K.8\n * of the JPEG standard: the first 5 AC coefficients are estimated from\n * the DC values of a DCT block and its 8 neighboring blocks.\n * We apply smoothing only for progressive JPEG decoding, and only if\n * the coefficients it can estimate are not yet known to full precision.\n */\n\n/* Natural-order array positions of the first 5 zigzag-order coefficients */\n#define Q01_POS  1\n#define Q10_POS  8\n#define Q20_POS  16\n#define Q11_POS  9\n#define Q02_POS  2\n\n/*\n * Determine whether block smoothing is applicable and safe.\n * We also latch the current states of the coef_bits[] entries for the\n * AC coefficients; otherwise, if the input side of the decompressor\n * advances into a new scan, we might think the coefficients are known\n * more accurately than they really are.\n */\n\nLOCAL(boolean)\nsmoothing_ok (j_decompress_ptr cinfo)\n{\n  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;\n  boolean smoothing_useful = FALSE;\n  int ci, coefi;\n  jpeg_component_info *compptr;\n  JQUANT_TBL * qtable;\n  int * coef_bits;\n  int * coef_bits_latch;\n\n  if (! cinfo->progressive_mode || cinfo->coef_bits == NULL)\n    return FALSE;\n\n  /* Allocate latch area if not already done */\n  if (coef->coef_bits_latch == NULL)\n    coef->coef_bits_latch = (int *)\n      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\t  cinfo->num_components *\n\t\t\t\t  (SAVED_COEFS * SIZEOF(int)));\n  coef_bits_latch = coef->coef_bits_latch;\n\n  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n       ci++, compptr++) {\n    /* All components' quantization values must already be latched. */\n    if ((qtable = compptr->quant_table) == NULL)\n      return FALSE;\n    /* Verify DC & first 5 AC quantizers are nonzero to avoid zero-divide. */\n    if (qtable->quantval[0] == 0 ||\n\tqtable->quantval[Q01_POS] == 0 ||\n\tqtable->quantval[Q10_POS] == 0 ||\n\tqtable->quantval[Q20_POS] == 0 ||\n\tqtable->quantval[Q11_POS] == 0 ||\n\tqtable->quantval[Q02_POS] == 0)\n      return FALSE;\n    /* DC values must be at least partly known for all components. */\n    coef_bits = cinfo->coef_bits[ci];\n    if (coef_bits[0] < 0)\n      return FALSE;\n    /* Block smoothing is helpful if some AC coefficients remain inaccurate. */\n    for (coefi = 1; coefi <= 5; coefi++) {\n      coef_bits_latch[coefi] = coef_bits[coefi];\n      if (coef_bits[coefi] != 0)\n\tsmoothing_useful = TRUE;\n    }\n    coef_bits_latch += SAVED_COEFS;\n  }\n\n  return smoothing_useful;\n}\n\n\n/*\n * Variant of decompress_data for use when doing block smoothing.\n */\n\nMETHODDEF(int)\ndecompress_smooth_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)\n{\n  my_coef_ptr coef = (my_coef_ptr) cinfo->coef;\n  JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1;\n  JDIMENSION block_num, last_block_column;\n  int ci, block_row, block_rows, access_rows;\n  JBLOCKARRAY buffer;\n  JBLOCKROW buffer_ptr, prev_block_row, next_block_row;\n  JSAMPARRAY output_ptr;\n  JDIMENSION output_col;\n  jpeg_component_info *compptr;\n  inverse_DCT_method_ptr inverse_DCT;\n  boolean first_row, last_row;\n  JBLOCK workspace;\n  int *coef_bits;\n  JQUANT_TBL *quanttbl;\n  INT32 Q00,Q01,Q02,Q10,Q11,Q20, num;\n  int DC1,DC2,DC3,DC4,DC5,DC6,DC7,DC8,DC9;\n  int Al, pred;\n\n  /* Force some input to be done if we are getting ahead of the input. */\n  while (cinfo->input_scan_number <= cinfo->output_scan_number &&\n\t ! cinfo->inputctl->eoi_reached) {\n    if (cinfo->input_scan_number == cinfo->output_scan_number) {\n      /* If input is working on current scan, we ordinarily want it to\n       * have completed the current row.  But if input scan is DC,\n       * we want it to keep one row ahead so that next block row's DC\n       * values are up to date.\n       */\n      JDIMENSION delta = (cinfo->Ss == 0) ? 1 : 0;\n      if (cinfo->input_iMCU_row > cinfo->output_iMCU_row+delta)\n\tbreak;\n    }\n    if ((*cinfo->inputctl->consume_input)(cinfo) == JPEG_SUSPENDED)\n      return JPEG_SUSPENDED;\n  }\n\n  /* OK, output from the virtual arrays. */\n  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n       ci++, compptr++) {\n    /* Don't bother to IDCT an uninteresting component. */\n    if (! compptr->component_needed)\n      continue;\n    /* Count non-dummy DCT block rows in this iMCU row. */\n    if (cinfo->output_iMCU_row < last_iMCU_row) {\n      block_rows = compptr->v_samp_factor;\n      access_rows = block_rows * 2; /* this and next iMCU row */\n      last_row = FALSE;\n    } else {\n      /* NB: can't use last_row_height here; it is input-side-dependent! */\n      block_rows = (int) (compptr->height_in_blocks % compptr->v_samp_factor);\n      if (block_rows == 0) block_rows = compptr->v_samp_factor;\n      access_rows = block_rows; /* this iMCU row only */\n      last_row = TRUE;\n    }\n    /* Align the virtual buffer for this component. */\n    if (cinfo->output_iMCU_row > 0) {\n      access_rows += compptr->v_samp_factor; /* prior iMCU row too */\n      buffer = (*cinfo->mem->access_virt_barray)\n\t((j_common_ptr) cinfo, coef->whole_image[ci],\n\t (cinfo->output_iMCU_row - 1) * compptr->v_samp_factor,\n\t (JDIMENSION) access_rows, FALSE);\n      buffer += compptr->v_samp_factor;\t/* point to current iMCU row */\n      first_row = FALSE;\n    } else {\n      buffer = (*cinfo->mem->access_virt_barray)\n\t((j_common_ptr) cinfo, coef->whole_image[ci],\n\t (JDIMENSION) 0, (JDIMENSION) access_rows, FALSE);\n      first_row = TRUE;\n    }\n    /* Fetch component-dependent info */\n    coef_bits = coef->coef_bits_latch + (ci * SAVED_COEFS);\n    quanttbl = compptr->quant_table;\n    Q00 = quanttbl->quantval[0];\n    Q01 = quanttbl->quantval[Q01_POS];\n    Q10 = quanttbl->quantval[Q10_POS];\n    Q20 = quanttbl->quantval[Q20_POS];\n    Q11 = quanttbl->quantval[Q11_POS];\n    Q02 = quanttbl->quantval[Q02_POS];\n    inverse_DCT = cinfo->idct->inverse_DCT[ci];\n    output_ptr = output_buf[ci];\n    /* Loop over all DCT blocks to be processed. */\n    for (block_row = 0; block_row < block_rows; block_row++) {\n      buffer_ptr = buffer[block_row];\n      if (first_row && block_row == 0)\n\tprev_block_row = buffer_ptr;\n      else\n\tprev_block_row = buffer[block_row-1];\n      if (last_row && block_row == block_rows-1)\n\tnext_block_row = buffer_ptr;\n      else\n\tnext_block_row = buffer[block_row+1];\n      /* We fetch the surrounding DC values using a sliding-register approach.\n       * Initialize all nine here so as to do the right thing on narrow pics.\n       */\n      DC1 = DC2 = DC3 = (int) prev_block_row[0][0];\n      DC4 = DC5 = DC6 = (int) buffer_ptr[0][0];\n      DC7 = DC8 = DC9 = (int) next_block_row[0][0];\n      output_col = 0;\n      last_block_column = compptr->width_in_blocks - 1;\n      for (block_num = 0; block_num <= last_block_column; block_num++) {\n\t/* Fetch current DCT block into workspace so we can modify it. */\n\tjcopy_block_row(buffer_ptr, (JBLOCKROW) workspace, (JDIMENSION) 1);\n\t/* Update DC values */\n\tif (block_num < last_block_column) {\n\t  DC3 = (int) prev_block_row[1][0];\n\t  DC6 = (int) buffer_ptr[1][0];\n\t  DC9 = (int) next_block_row[1][0];\n\t}\n\t/* Compute coefficient estimates per K.8.\n\t * An estimate is applied only if coefficient is still zero,\n\t * and is not known to be fully accurate.\n\t */\n\t/* AC01 */\n\tif ((Al=coef_bits[1]) != 0 && workspace[1] == 0) {\n\t  num = 36 * Q00 * (DC4 - DC6);\n\t  if (num >= 0) {\n\t    pred = (int) (((Q01<<7) + num) / (Q01<<8));\n\t    if (Al > 0 && pred >= (1<<Al))\n\t      pred = (1<<Al)-1;\n\t  } else {\n\t    pred = (int) (((Q01<<7) - num) / (Q01<<8));\n\t    if (Al > 0 && pred >= (1<<Al))\n\t      pred = (1<<Al)-1;\n\t    pred = -pred;\n\t  }\n\t  workspace[1] = (JCOEF) pred;\n\t}\n\t/* AC10 */\n\tif ((Al=coef_bits[2]) != 0 && workspace[8] == 0) {\n\t  num = 36 * Q00 * (DC2 - DC8);\n\t  if (num >= 0) {\n\t    pred = (int) (((Q10<<7) + num) / (Q10<<8));\n\t    if (Al > 0 && pred >= (1<<Al))\n\t      pred = (1<<Al)-1;\n\t  } else {\n\t    pred = (int) (((Q10<<7) - num) / (Q10<<8));\n\t    if (Al > 0 && pred >= (1<<Al))\n\t      pred = (1<<Al)-1;\n\t    pred = -pred;\n\t  }\n\t  workspace[8] = (JCOEF) pred;\n\t}\n\t/* AC20 */\n\tif ((Al=coef_bits[3]) != 0 && workspace[16] == 0) {\n\t  num = 9 * Q00 * (DC2 + DC8 - 2*DC5);\n\t  if (num >= 0) {\n\t    pred = (int) (((Q20<<7) + num) / (Q20<<8));\n\t    if (Al > 0 && pred >= (1<<Al))\n\t      pred = (1<<Al)-1;\n\t  } else {\n\t    pred = (int) (((Q20<<7) - num) / (Q20<<8));\n\t    if (Al > 0 && pred >= (1<<Al))\n\t      pred = (1<<Al)-1;\n\t    pred = -pred;\n\t  }\n\t  workspace[16] = (JCOEF) pred;\n\t}\n\t/* AC11 */\n\tif ((Al=coef_bits[4]) != 0 && workspace[9] == 0) {\n\t  num = 5 * Q00 * (DC1 - DC3 - DC7 + DC9);\n\t  if (num >= 0) {\n\t    pred = (int) (((Q11<<7) + num) / (Q11<<8));\n\t    if (Al > 0 && pred >= (1<<Al))\n\t      pred = (1<<Al)-1;\n\t  } else {\n\t    pred = (int) (((Q11<<7) - num) / (Q11<<8));\n\t    if (Al > 0 && pred >= (1<<Al))\n\t      pred = (1<<Al)-1;\n\t    pred = -pred;\n\t  }\n\t  workspace[9] = (JCOEF) pred;\n\t}\n\t/* AC02 */\n\tif ((Al=coef_bits[5]) != 0 && workspace[2] == 0) {\n\t  num = 9 * Q00 * (DC4 + DC6 - 2*DC5);\n\t  if (num >= 0) {\n\t    pred = (int) (((Q02<<7) + num) / (Q02<<8));\n\t    if (Al > 0 && pred >= (1<<Al))\n\t      pred = (1<<Al)-1;\n\t  } else {\n\t    pred = (int) (((Q02<<7) - num) / (Q02<<8));\n\t    if (Al > 0 && pred >= (1<<Al))\n\t      pred = (1<<Al)-1;\n\t    pred = -pred;\n\t  }\n\t  workspace[2] = (JCOEF) pred;\n\t}\n\t/* OK, do the IDCT */\n\t(*inverse_DCT) (cinfo, compptr, (JCOEFPTR) workspace,\n\t\t\toutput_ptr, output_col);\n\t/* Advance for next column */\n\tDC1 = DC2; DC2 = DC3;\n\tDC4 = DC5; DC5 = DC6;\n\tDC7 = DC8; DC8 = DC9;\n\tbuffer_ptr++, prev_block_row++, next_block_row++;\n\toutput_col += compptr->DCT_scaled_size;\n      }\n      output_ptr += compptr->DCT_scaled_size;\n    }\n  }\n\n  if (++(cinfo->output_iMCU_row) < cinfo->total_iMCU_rows)\n    return JPEG_ROW_COMPLETED;\n  return JPEG_SCAN_COMPLETED;\n}\n\n#endif /* BLOCK_SMOOTHING_SUPPORTED */\n\n\n/*\n * Initialize coefficient buffer controller.\n */\n\nGLOBAL(void)\njinit_d_coef_controller (j_decompress_ptr cinfo, boolean need_full_buffer)\n{\n  my_coef_ptr coef;\n\n  coef = (my_coef_ptr)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\tSIZEOF(my_coef_controller));\n  cinfo->coef = (struct jpeg_d_coef_controller *) coef;\n  coef->pub.start_input_pass = start_input_pass;\n  coef->pub.start_output_pass = start_output_pass;\n#ifdef BLOCK_SMOOTHING_SUPPORTED\n  coef->coef_bits_latch = NULL;\n#endif\n\n  /* Create the coefficient buffer. */\n  if (need_full_buffer) {\n#ifdef D_MULTISCAN_FILES_SUPPORTED\n    /* Allocate a full-image virtual array for each component, */\n    /* padded to a multiple of samp_factor DCT blocks in each direction. */\n    /* Note we ask for a pre-zeroed array. */\n    int ci, access_rows;\n    jpeg_component_info *compptr;\n\n    for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n\t ci++, compptr++) {\n      access_rows = compptr->v_samp_factor;\n#ifdef BLOCK_SMOOTHING_SUPPORTED\n      /* If block smoothing could be used, need a bigger window */\n      if (cinfo->progressive_mode)\n\taccess_rows *= 3;\n#endif\n      coef->whole_image[ci] = (*cinfo->mem->request_virt_barray)\n\t((j_common_ptr) cinfo, JPOOL_IMAGE, TRUE,\n\t (JDIMENSION) jround_up((long) compptr->width_in_blocks,\n\t\t\t\t(long) compptr->h_samp_factor),\n\t (JDIMENSION) jround_up((long) compptr->height_in_blocks,\n\t\t\t\t(long) compptr->v_samp_factor),\n\t (JDIMENSION) access_rows);\n    }\n    coef->pub.consume_data = consume_data;\n    coef->pub.decompress_data = decompress_data;\n    coef->pub.coef_arrays = coef->whole_image; /* link to virtual arrays */\n#else\n    ERREXIT(cinfo, JERR_NOT_COMPILED);\n#endif\n  } else {\n    /* We only need a single-MCU buffer. */\n    JBLOCKROW buffer;\n    int i;\n\n    buffer = (JBLOCKROW)\n      (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\t  D_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK));\n    for (i = 0; i < D_MAX_BLOCKS_IN_MCU; i++) {\n      coef->MCU_buffer[i] = buffer + i;\n    }\n    coef->pub.consume_data = dummy_consume_data;\n    coef->pub.decompress_data = decompress_onepass;\n    coef->pub.coef_arrays = NULL; /* flag for no virtual arrays */\n  }\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jdcolor.c",
    "content": "/*\n * jdcolor.c\n *\n * Copyright (C) 1991-1997, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains output colorspace conversion routines.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n\n\n/* Private subobject */\n\ntypedef struct {\n  struct jpeg_color_deconverter pub; /* public fields */\n\n  /* Private state for YCC->RGB conversion */\n  int * Cr_r_tab;\t\t/* => table for Cr to R conversion */\n  int * Cb_b_tab;\t\t/* => table for Cb to B conversion */\n  INT32 * Cr_g_tab;\t\t/* => table for Cr to G conversion */\n  INT32 * Cb_g_tab;\t\t/* => table for Cb to G conversion */\n} my_color_deconverter;\n\ntypedef my_color_deconverter * my_cconvert_ptr;\n\n\n/**************** YCbCr -> RGB conversion: most common case **************/\n\n/*\n * YCbCr is defined per CCIR 601-1, except that Cb and Cr are\n * normalized to the range 0..MAXJSAMPLE rather than -0.5 .. 0.5.\n * The conversion equations to be implemented are therefore\n *\tR = Y                + 1.40200 * Cr\n *\tG = Y - 0.34414 * Cb - 0.71414 * Cr\n *\tB = Y + 1.77200 * Cb\n * where Cb and Cr represent the incoming values less CENTERJSAMPLE.\n * (These numbers are derived from TIFF 6.0 section 21, dated 3-June-92.)\n *\n * To avoid floating-point arithmetic, we represent the fractional constants\n * as integers scaled up by 2^16 (about 4 digits precision); we have to divide\n * the products by 2^16, with appropriate rounding, to get the correct answer.\n * Notice that Y, being an integral input, does not contribute any fraction\n * so it need not participate in the rounding.\n *\n * For even more speed, we avoid doing any multiplications in the inner loop\n * by precalculating the constants times Cb and Cr for all possible values.\n * For 8-bit JSAMPLEs this is very reasonable (only 256 entries per table);\n * for 12-bit samples it is still acceptable.  It's not very reasonable for\n * 16-bit samples, but if you want lossless storage you shouldn't be changing\n * colorspace anyway.\n * The Cr=>R and Cb=>B values can be rounded to integers in advance; the\n * values for the G calculation are left scaled up, since we must add them\n * together before rounding.\n */\n\n#define SCALEBITS\t16\t/* speediest right-shift on some machines */\n#define ONE_HALF\t((INT32) 1 << (SCALEBITS-1))\n#define FIX(x)\t\t((INT32) ((x) * (1L<<SCALEBITS) + 0.5))\n\n\n/*\n * Initialize tables for YCC->RGB colorspace conversion.\n */\n\nLOCAL(void)\nbuild_ycc_rgb_table (j_decompress_ptr cinfo)\n{\n  my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;\n  int i;\n  INT32 x;\n  SHIFT_TEMPS\n\n  cconvert->Cr_r_tab = (int *)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\t(MAXJSAMPLE+1) * SIZEOF(int));\n  cconvert->Cb_b_tab = (int *)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\t(MAXJSAMPLE+1) * SIZEOF(int));\n  cconvert->Cr_g_tab = (INT32 *)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\t(MAXJSAMPLE+1) * SIZEOF(INT32));\n  cconvert->Cb_g_tab = (INT32 *)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\t(MAXJSAMPLE+1) * SIZEOF(INT32));\n\n  for (i = 0, x = -CENTERJSAMPLE; i <= MAXJSAMPLE; i++, x++) {\n    /* i is the actual input pixel value, in the range 0..MAXJSAMPLE */\n    /* The Cb or Cr value we are thinking of is x = i - CENTERJSAMPLE */\n    /* Cr=>R value is nearest int to 1.40200 * x */\n    cconvert->Cr_r_tab[i] = (int)\n\t\t    RIGHT_SHIFT(FIX(1.40200) * x + ONE_HALF, SCALEBITS);\n    /* Cb=>B value is nearest int to 1.77200 * x */\n    cconvert->Cb_b_tab[i] = (int)\n\t\t    RIGHT_SHIFT(FIX(1.77200) * x + ONE_HALF, SCALEBITS);\n    /* Cr=>G value is scaled-up -0.71414 * x */\n    cconvert->Cr_g_tab[i] = (- FIX(0.71414)) * x;\n    /* Cb=>G value is scaled-up -0.34414 * x */\n    /* We also add in ONE_HALF so that need not do it in inner loop */\n    cconvert->Cb_g_tab[i] = (- FIX(0.34414)) * x + ONE_HALF;\n  }\n}\n\n\n/*\n * Convert some rows of samples to the output colorspace.\n *\n * Note that we change from noninterleaved, one-plane-per-component format\n * to interleaved-pixel format.  The output buffer is therefore three times\n * as wide as the input buffer.\n * A starting row offset is provided only for the input buffer.  The caller\n * can easily adjust the passed output_buf value to accommodate any row\n * offset required on that side.\n */\n\nMETHODDEF(void)\nycc_rgb_convert (j_decompress_ptr cinfo,\n\t\t JSAMPIMAGE input_buf, JDIMENSION input_row,\n\t\t JSAMPARRAY output_buf, int num_rows)\n{\n  my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;\n  register int y, cb, cr;\n  register JSAMPROW outptr;\n  register JSAMPROW inptr0, inptr1, inptr2;\n  register JDIMENSION col;\n  JDIMENSION num_cols = cinfo->output_width;\n  /* copy these pointers into registers if possible */\n  register JSAMPLE * range_limit = cinfo->sample_range_limit;\n  register int * Crrtab = cconvert->Cr_r_tab;\n  register int * Cbbtab = cconvert->Cb_b_tab;\n  register INT32 * Crgtab = cconvert->Cr_g_tab;\n  register INT32 * Cbgtab = cconvert->Cb_g_tab;\n  SHIFT_TEMPS\n\n  while (--num_rows >= 0) {\n    inptr0 = input_buf[0][input_row];\n    inptr1 = input_buf[1][input_row];\n    inptr2 = input_buf[2][input_row];\n    input_row++;\n    outptr = *output_buf++;\n    for (col = 0; col < num_cols; col++) {\n      y  = GETJSAMPLE(inptr0[col]);\n      cb = GETJSAMPLE(inptr1[col]);\n      cr = GETJSAMPLE(inptr2[col]);\n      /* Range-limiting is essential due to noise introduced by DCT losses. */\n      outptr[RGB_RED] =   range_limit[y + Crrtab[cr]];\n      outptr[RGB_GREEN] = range_limit[y +\n\t\t\t      ((int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr],\n\t\t\t\t\t\t SCALEBITS))];\n      outptr[RGB_BLUE] =  range_limit[y + Cbbtab[cb]];\n      outptr += RGB_PIXELSIZE;\n    }\n  }\n}\n\n\n/**************** Cases other than YCbCr -> RGB **************/\n\n\n/*\n * Color conversion for no colorspace change: just copy the data,\n * converting from separate-planes to interleaved representation.\n */\n\nMETHODDEF(void)\nnull_convert (j_decompress_ptr cinfo,\n\t      JSAMPIMAGE input_buf, JDIMENSION input_row,\n\t      JSAMPARRAY output_buf, int num_rows)\n{\n  register JSAMPROW inptr, outptr;\n  register JDIMENSION count;\n  register int num_components = cinfo->num_components;\n  JDIMENSION num_cols = cinfo->output_width;\n  int ci;\n\n  while (--num_rows >= 0) {\n    for (ci = 0; ci < num_components; ci++) {\n      inptr = input_buf[ci][input_row];\n      outptr = output_buf[0] + ci;\n      for (count = num_cols; count > 0; count--) {\n\t*outptr = *inptr++;\t/* needn't bother with GETJSAMPLE() here */\n\toutptr += num_components;\n      }\n    }\n    input_row++;\n    output_buf++;\n  }\n}\n\n\n/*\n * Color conversion for grayscale: just copy the data.\n * This also works for YCbCr -> grayscale conversion, in which\n * we just copy the Y (luminance) component and ignore chrominance.\n */\n\nMETHODDEF(void)\ngrayscale_convert (j_decompress_ptr cinfo,\n\t\t   JSAMPIMAGE input_buf, JDIMENSION input_row,\n\t\t   JSAMPARRAY output_buf, int num_rows)\n{\n  jcopy_sample_rows(input_buf[0], (int) input_row, output_buf, 0,\n\t\t    num_rows, cinfo->output_width);\n}\n\n\n/*\n * Convert grayscale to RGB: just duplicate the graylevel three times.\n * This is provided to support applications that don't want to cope\n * with grayscale as a separate case.\n */\n\nMETHODDEF(void)\ngray_rgb_convert (j_decompress_ptr cinfo,\n\t\t  JSAMPIMAGE input_buf, JDIMENSION input_row,\n\t\t  JSAMPARRAY output_buf, int num_rows)\n{\n  register JSAMPROW inptr, outptr;\n  register JDIMENSION col;\n  JDIMENSION num_cols = cinfo->output_width;\n\n  while (--num_rows >= 0) {\n    inptr = input_buf[0][input_row++];\n    outptr = *output_buf++;\n    for (col = 0; col < num_cols; col++) {\n      /* We can dispense with GETJSAMPLE() here */\n      outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col];\n      outptr += RGB_PIXELSIZE;\n    }\n  }\n}\n\n\n/*\n * Adobe-style YCCK->CMYK conversion.\n * We convert YCbCr to R=1-C, G=1-M, and B=1-Y using the same\n * conversion as above, while passing K (black) unchanged.\n * We assume build_ycc_rgb_table has been called.\n */\n\nMETHODDEF(void)\nycck_cmyk_convert (j_decompress_ptr cinfo,\n\t\t   JSAMPIMAGE input_buf, JDIMENSION input_row,\n\t\t   JSAMPARRAY output_buf, int num_rows)\n{\n  my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;\n  register int y, cb, cr;\n  register JSAMPROW outptr;\n  register JSAMPROW inptr0, inptr1, inptr2, inptr3;\n  register JDIMENSION col;\n  JDIMENSION num_cols = cinfo->output_width;\n  /* copy these pointers into registers if possible */\n  register JSAMPLE * range_limit = cinfo->sample_range_limit;\n  register int * Crrtab = cconvert->Cr_r_tab;\n  register int * Cbbtab = cconvert->Cb_b_tab;\n  register INT32 * Crgtab = cconvert->Cr_g_tab;\n  register INT32 * Cbgtab = cconvert->Cb_g_tab;\n  SHIFT_TEMPS\n\n  while (--num_rows >= 0) {\n    inptr0 = input_buf[0][input_row];\n    inptr1 = input_buf[1][input_row];\n    inptr2 = input_buf[2][input_row];\n    inptr3 = input_buf[3][input_row];\n    input_row++;\n    outptr = *output_buf++;\n    for (col = 0; col < num_cols; col++) {\n      y  = GETJSAMPLE(inptr0[col]);\n      cb = GETJSAMPLE(inptr1[col]);\n      cr = GETJSAMPLE(inptr2[col]);\n      /* Range-limiting is essential due to noise introduced by DCT losses. */\n      outptr[0] = range_limit[MAXJSAMPLE - (y + Crrtab[cr])];\t/* red */\n      outptr[1] = range_limit[MAXJSAMPLE - (y +\t\t\t/* green */\n\t\t\t      ((int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr],\n\t\t\t\t\t\t SCALEBITS)))];\n      outptr[2] = range_limit[MAXJSAMPLE - (y + Cbbtab[cb])];\t/* blue */\n      /* K passes through unchanged */\n      outptr[3] = inptr3[col];\t/* don't need GETJSAMPLE here */\n      outptr += 4;\n    }\n  }\n}\n\n\n/*\n * Empty method for start_pass.\n */\n\nMETHODDEF(void)\nstart_pass_dcolor (j_decompress_ptr cinfo)\n{\n  /* no work needed */\n}\n\n\n/*\n * Module initialization routine for output colorspace conversion.\n */\n\nGLOBAL(void)\njinit_color_deconverter (j_decompress_ptr cinfo)\n{\n  my_cconvert_ptr cconvert;\n  int ci;\n\n  cconvert = (my_cconvert_ptr)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\tSIZEOF(my_color_deconverter));\n  cinfo->cconvert = (struct jpeg_color_deconverter *) cconvert;\n  cconvert->pub.start_pass = start_pass_dcolor;\n\n  /* Make sure num_components agrees with jpeg_color_space */\n  switch (cinfo->jpeg_color_space) {\n  case JCS_GRAYSCALE:\n    if (cinfo->num_components != 1)\n      ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);\n    break;\n\n  case JCS_RGB:\n  case JCS_YCbCr:\n    if (cinfo->num_components != 3)\n      ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);\n    break;\n\n  case JCS_CMYK:\n  case JCS_YCCK:\n    if (cinfo->num_components != 4)\n      ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);\n    break;\n\n  default:\t\t\t/* JCS_UNKNOWN can be anything */\n    if (cinfo->num_components < 1)\n      ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);\n    break;\n  }\n\n  /* Set out_color_components and conversion method based on requested space.\n   * Also clear the component_needed flags for any unused components,\n   * so that earlier pipeline stages can avoid useless computation.\n   */\n\n  switch (cinfo->out_color_space) {\n  case JCS_GRAYSCALE:\n    cinfo->out_color_components = 1;\n    if (cinfo->jpeg_color_space == JCS_GRAYSCALE ||\n\tcinfo->jpeg_color_space == JCS_YCbCr) {\n      cconvert->pub.color_convert = grayscale_convert;\n      /* For color->grayscale conversion, only the Y (0) component is needed */\n      for (ci = 1; ci < cinfo->num_components; ci++)\n\tcinfo->comp_info[ci].component_needed = FALSE;\n    } else\n      ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);\n    break;\n\n  case JCS_RGB:\n    cinfo->out_color_components = RGB_PIXELSIZE;\n    if (cinfo->jpeg_color_space == JCS_YCbCr) {\n      cconvert->pub.color_convert = ycc_rgb_convert;\n      build_ycc_rgb_table(cinfo);\n    } else if (cinfo->jpeg_color_space == JCS_GRAYSCALE) {\n      cconvert->pub.color_convert = gray_rgb_convert;\n    } else if (cinfo->jpeg_color_space == JCS_RGB && RGB_PIXELSIZE == 3) {\n      cconvert->pub.color_convert = null_convert;\n    } else\n      ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);\n    break;\n\n  case JCS_CMYK:\n    cinfo->out_color_components = 4;\n    if (cinfo->jpeg_color_space == JCS_YCCK) {\n      cconvert->pub.color_convert = ycck_cmyk_convert;\n      build_ycc_rgb_table(cinfo);\n    } else if (cinfo->jpeg_color_space == JCS_CMYK) {\n      cconvert->pub.color_convert = null_convert;\n    } else\n      ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);\n    break;\n\n  default:\n    /* Permit null conversion to same output space */\n    if (cinfo->out_color_space == cinfo->jpeg_color_space) {\n      cinfo->out_color_components = cinfo->num_components;\n      cconvert->pub.color_convert = null_convert;\n    } else\t\t\t/* unsupported non-null conversion */\n      ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);\n    break;\n  }\n\n  if (cinfo->quantize_colors)\n    cinfo->output_components = 1; /* single colormapped output component */\n  else\n    cinfo->output_components = cinfo->out_color_components;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jdct.h",
    "content": "/*\n * jdct.h\n *\n * Copyright (C) 1994-1996, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This include file contains common declarations for the forward and\n * inverse DCT modules.  These declarations are private to the DCT managers\n * (jcdctmgr.c, jddctmgr.c) and the individual DCT algorithms.\n * The individual DCT algorithms are kept in separate files to ease \n * machine-dependent tuning (e.g., assembly coding).\n */\n\n\n/*\n * A forward DCT routine is given a pointer to a work area of type DCTELEM[];\n * the DCT is to be performed in-place in that buffer.  Type DCTELEM is int\n * for 8-bit samples, INT32 for 12-bit samples.  (NOTE: Floating-point DCT\n * implementations use an array of type FAST_FLOAT, instead.)\n * The DCT inputs are expected to be signed (range +-CENTERJSAMPLE).\n * The DCT outputs are returned scaled up by a factor of 8; they therefore\n * have a range of +-8K for 8-bit data, +-128K for 12-bit data.  This\n * convention improves accuracy in integer implementations and saves some\n * work in floating-point ones.\n * Quantization of the output coefficients is done by jcdctmgr.c.\n */\n\n#if BITS_IN_JSAMPLE == 8\ntypedef int DCTELEM;\t\t/* 16 or 32 bits is fine */\n#else\ntypedef INT32 DCTELEM;\t\t/* must have 32 bits */\n#endif\n\ntypedef JMETHOD(void, forward_DCT_method_ptr, (DCTELEM * data));\ntypedef JMETHOD(void, float_DCT_method_ptr, (FAST_FLOAT * data));\n\n\n/*\n * An inverse DCT routine is given a pointer to the input JBLOCK and a pointer\n * to an output sample array.  The routine must dequantize the input data as\n * well as perform the IDCT; for dequantization, it uses the multiplier table\n * pointed to by compptr->dct_table.  The output data is to be placed into the\n * sample array starting at a specified column.  (Any row offset needed will\n * be applied to the array pointer before it is passed to the IDCT code.)\n * Note that the number of samples emitted by the IDCT routine is\n * DCT_scaled_size * DCT_scaled_size.\n */\n\n/* typedef inverse_DCT_method_ptr is declared in jpegint.h */\n\n/*\n * Each IDCT routine has its own ideas about the best dct_table element type.\n */\n\ntypedef MULTIPLIER ISLOW_MULT_TYPE; /* short or int, whichever is faster */\n#if BITS_IN_JSAMPLE == 8\ntypedef MULTIPLIER IFAST_MULT_TYPE; /* 16 bits is OK, use short if faster */\n#define IFAST_SCALE_BITS  2\t/* fractional bits in scale factors */\n#else\ntypedef INT32 IFAST_MULT_TYPE;\t/* need 32 bits for scaled quantizers */\n#define IFAST_SCALE_BITS  13\t/* fractional bits in scale factors */\n#endif\ntypedef FAST_FLOAT FLOAT_MULT_TYPE; /* preferred floating type */\n\n\n/*\n * Each IDCT routine is responsible for range-limiting its results and\n * converting them to unsigned form (0..MAXJSAMPLE).  The raw outputs could\n * be quite far out of range if the input data is corrupt, so a bulletproof\n * range-limiting step is required.  We use a mask-and-table-lookup method\n * to do the combined operations quickly.  See the comments with\n * prepare_range_limit_table (in jdmaster.c) for more info.\n */\n\n#define IDCT_range_limit(cinfo)  ((cinfo)->sample_range_limit + CENTERJSAMPLE)\n\n#define RANGE_MASK  (MAXJSAMPLE * 4 + 3) /* 2 bits wider than legal samples */\n\n\n/* Short forms of external names for systems with brain-damaged linkers. */\n\n#ifdef NEED_SHORT_EXTERNAL_NAMES\n#define jpeg_fdct_islow\t\tjFDislow\n#define jpeg_fdct_ifast\t\tjFDifast\n#define jpeg_fdct_float\t\tjFDfloat\n#define jpeg_idct_islow\t\tjRDislow\n#define jpeg_idct_ifast\t\tjRDifast\n#define jpeg_idct_float\t\tjRDfloat\n#define jpeg_idct_4x4\t\tjRD4x4\n#define jpeg_idct_2x2\t\tjRD2x2\n#define jpeg_idct_1x1\t\tjRD1x1\n#endif /* NEED_SHORT_EXTERNAL_NAMES */\n\n/* Extern declarations for the forward and inverse DCT routines. */\n\nEXTERN(void) jpeg_fdct_islow JPP((DCTELEM * data));\nEXTERN(void) jpeg_fdct_ifast JPP((DCTELEM * data));\nEXTERN(void) jpeg_fdct_float JPP((FAST_FLOAT * data));\n\nEXTERN(void) jpeg_idct_islow\n    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,\n\t JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));\nEXTERN(void) jpeg_idct_ifast\n    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,\n\t JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));\nEXTERN(void) jpeg_idct_float\n    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,\n\t JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));\nEXTERN(void) jpeg_idct_4x4\n    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,\n\t JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));\nEXTERN(void) jpeg_idct_2x2\n    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,\n\t JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));\nEXTERN(void) jpeg_idct_1x1\n    JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,\n\t JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));\n\n\n/*\n * Macros for handling fixed-point arithmetic; these are used by many\n * but not all of the DCT/IDCT modules.\n *\n * All values are expected to be of type INT32.\n * Fractional constants are scaled left by CONST_BITS bits.\n * CONST_BITS is defined within each module using these macros,\n * and may differ from one module to the next.\n */\n\n#define ONE\t((INT32) 1)\n#define CONST_SCALE (ONE << CONST_BITS)\n\n/* Convert a positive real constant to an integer scaled by CONST_SCALE.\n * Caution: some C compilers fail to reduce \"FIX(constant)\" at compile time,\n * thus causing a lot of useless floating-point operations at run time.\n */\n\n#define FIX(x)\t((INT32) ((x) * CONST_SCALE + 0.5))\n\n/* Descale and correctly round an INT32 value that's scaled by N bits.\n * We assume RIGHT_SHIFT rounds towards minus infinity, so adding\n * the fudge factor is correct for either sign of X.\n */\n\n#define DESCALE(x,n)  RIGHT_SHIFT((x) + (ONE << ((n)-1)), n)\n\n/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result.\n * This macro is used only when the two inputs will actually be no more than\n * 16 bits wide, so that a 16x16->32 bit multiply can be used instead of a\n * full 32x32 multiply.  This provides a useful speedup on many machines.\n * Unfortunately there is no way to specify a 16x16->32 multiply portably\n * in C, but some C compilers will do the right thing if you provide the\n * correct combination of casts.\n */\n\n#ifdef SHORTxSHORT_32\t\t/* may work if 'int' is 32 bits */\n#define MULTIPLY16C16(var,const)  (((INT16) (var)) * ((INT16) (const)))\n#endif\n#ifdef SHORTxLCONST_32\t\t/* known to work with Microsoft C 6.0 */\n#define MULTIPLY16C16(var,const)  (((INT16) (var)) * ((INT32) (const)))\n#endif\n\n#ifndef MULTIPLY16C16\t\t/* default definition */\n#define MULTIPLY16C16(var,const)  ((var) * (const))\n#endif\n\n/* Same except both inputs are variables. */\n\n#ifdef SHORTxSHORT_32\t\t/* may work if 'int' is 32 bits */\n#define MULTIPLY16V16(var1,var2)  (((INT16) (var1)) * ((INT16) (var2)))\n#endif\n\n#ifndef MULTIPLY16V16\t\t/* default definition */\n#define MULTIPLY16V16(var1,var2)  ((var1) * (var2))\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jddctmgr.c",
    "content": "/*\n * jddctmgr.c\n *\n * Copyright (C) 1994-1996, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains the inverse-DCT management logic.\n * This code selects a particular IDCT implementation to be used,\n * and it performs related housekeeping chores.  No code in this file\n * is executed per IDCT step, only during output pass setup.\n *\n * Note that the IDCT routines are responsible for performing coefficient\n * dequantization as well as the IDCT proper.  This module sets up the\n * dequantization multiplier table needed by the IDCT routine.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n#include \"jdct.h\"\t\t/* Private declarations for DCT subsystem */\n\n\n/*\n * The decompressor input side (jdinput.c) saves away the appropriate\n * quantization table for each component at the start of the first scan\n * involving that component.  (This is necessary in order to correctly\n * decode files that reuse Q-table slots.)\n * When we are ready to make an output pass, the saved Q-table is converted\n * to a multiplier table that will actually be used by the IDCT routine.\n * The multiplier table contents are IDCT-method-dependent.  To support\n * application changes in IDCT method between scans, we can remake the\n * multiplier tables if necessary.\n * In buffered-image mode, the first output pass may occur before any data\n * has been seen for some components, and thus before their Q-tables have\n * been saved away.  To handle this case, multiplier tables are preset\n * to zeroes; the result of the IDCT will be a neutral gray level.\n */\n\n\n/* Private subobject for this module */\n\ntypedef struct {\n  struct jpeg_inverse_dct pub;\t/* public fields */\n\n  /* This array contains the IDCT method code that each multiplier table\n   * is currently set up for, or -1 if it's not yet set up.\n   * The actual multiplier tables are pointed to by dct_table in the\n   * per-component comp_info structures.\n   */\n  int cur_method[MAX_COMPONENTS];\n} my_idct_controller;\n\ntypedef my_idct_controller * my_idct_ptr;\n\n\n/* Allocated multiplier tables: big enough for any supported variant */\n\ntypedef union {\n  ISLOW_MULT_TYPE islow_array[DCTSIZE2];\n#ifdef DCT_IFAST_SUPPORTED\n  IFAST_MULT_TYPE ifast_array[DCTSIZE2];\n#endif\n#ifdef DCT_FLOAT_SUPPORTED\n  FLOAT_MULT_TYPE float_array[DCTSIZE2];\n#endif\n} multiplier_table;\n\n\n/* The current scaled-IDCT routines require ISLOW-style multiplier tables,\n * so be sure to compile that code if either ISLOW or SCALING is requested.\n */\n#ifdef DCT_ISLOW_SUPPORTED\n#define PROVIDE_ISLOW_TABLES\n#else\n#ifdef IDCT_SCALING_SUPPORTED\n#define PROVIDE_ISLOW_TABLES\n#endif\n#endif\n\n\n/*\n * Prepare for an output pass.\n * Here we select the proper IDCT routine for each component and build\n * a matching multiplier table.\n */\n\nMETHODDEF(void)\nstart_pass (j_decompress_ptr cinfo)\n{\n  my_idct_ptr idct = (my_idct_ptr) cinfo->idct;\n  int ci, i;\n  jpeg_component_info *compptr;\n  int method = 0;\n  inverse_DCT_method_ptr method_ptr = NULL;\n  JQUANT_TBL * qtbl;\n\n  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n       ci++, compptr++) {\n    /* Select the proper IDCT routine for this component's scaling */\n    switch (compptr->DCT_scaled_size) {\n#ifdef IDCT_SCALING_SUPPORTED\n    case 1:\n      method_ptr = jpeg_idct_1x1;\n      method = JDCT_ISLOW;\t/* jidctred uses islow-style table */\n      break;\n    case 2:\n      method_ptr = jpeg_idct_2x2;\n      method = JDCT_ISLOW;\t/* jidctred uses islow-style table */\n      break;\n    case 4:\n      method_ptr = jpeg_idct_4x4;\n      method = JDCT_ISLOW;\t/* jidctred uses islow-style table */\n      break;\n#endif\n    case DCTSIZE:\n      switch (cinfo->dct_method) {\n#ifdef DCT_ISLOW_SUPPORTED\n      case JDCT_ISLOW:\n\tmethod_ptr = jpeg_idct_islow;\n\tmethod = JDCT_ISLOW;\n\tbreak;\n#endif\n#ifdef DCT_IFAST_SUPPORTED\n      case JDCT_IFAST:\n\tmethod_ptr = jpeg_idct_ifast;\n\tmethod = JDCT_IFAST;\n\tbreak;\n#endif\n#ifdef DCT_FLOAT_SUPPORTED\n      case JDCT_FLOAT:\n\tmethod_ptr = jpeg_idct_float;\n\tmethod = JDCT_FLOAT;\n\tbreak;\n#endif\n      default:\n\tERREXIT(cinfo, JERR_NOT_COMPILED);\n\tbreak;\n      }\n      break;\n    default:\n      ERREXIT1(cinfo, JERR_BAD_DCTSIZE, compptr->DCT_scaled_size);\n      break;\n    }\n    idct->pub.inverse_DCT[ci] = method_ptr;\n    /* Create multiplier table from quant table.\n     * However, we can skip this if the component is uninteresting\n     * or if we already built the table.  Also, if no quant table\n     * has yet been saved for the component, we leave the\n     * multiplier table all-zero; we'll be reading zeroes from the\n     * coefficient controller's buffer anyway.\n     */\n    if (! compptr->component_needed || idct->cur_method[ci] == method)\n      continue;\n    qtbl = compptr->quant_table;\n    if (qtbl == NULL)\t\t/* happens if no data yet for component */\n      continue;\n    idct->cur_method[ci] = method;\n    switch (method) {\n#ifdef PROVIDE_ISLOW_TABLES\n    case JDCT_ISLOW:\n      {\n\t/* For LL&M IDCT method, multipliers are equal to raw quantization\n\t * coefficients, but are stored as ints to ensure access efficiency.\n\t */\n\tISLOW_MULT_TYPE * ismtbl = (ISLOW_MULT_TYPE *) compptr->dct_table;\n\tfor (i = 0; i < DCTSIZE2; i++) {\n\t  ismtbl[i] = (ISLOW_MULT_TYPE) qtbl->quantval[i];\n\t}\n      }\n      break;\n#endif\n#ifdef DCT_IFAST_SUPPORTED\n    case JDCT_IFAST:\n      {\n\t/* For AA&N IDCT method, multipliers are equal to quantization\n\t * coefficients scaled by scalefactor[row]*scalefactor[col], where\n\t *   scalefactor[0] = 1\n\t *   scalefactor[k] = cos(k*PI/16) * sqrt(2)    for k=1..7\n\t * For integer operation, the multiplier table is to be scaled by\n\t * IFAST_SCALE_BITS.\n\t */\n\tIFAST_MULT_TYPE * ifmtbl = (IFAST_MULT_TYPE *) compptr->dct_table;\n#define CONST_BITS 14\n\tstatic const INT16 aanscales[DCTSIZE2] = {\n\t  /* precomputed values scaled up by 14 bits */\n\t  16384, 22725, 21407, 19266, 16384, 12873,  8867,  4520,\n\t  22725, 31521, 29692, 26722, 22725, 17855, 12299,  6270,\n\t  21407, 29692, 27969, 25172, 21407, 16819, 11585,  5906,\n\t  19266, 26722, 25172, 22654, 19266, 15137, 10426,  5315,\n\t  16384, 22725, 21407, 19266, 16384, 12873,  8867,  4520,\n\t  12873, 17855, 16819, 15137, 12873, 10114,  6967,  3552,\n\t   8867, 12299, 11585, 10426,  8867,  6967,  4799,  2446,\n\t   4520,  6270,  5906,  5315,  4520,  3552,  2446,  1247\n\t};\n\tSHIFT_TEMPS\n\n\tfor (i = 0; i < DCTSIZE2; i++) {\n\t  ifmtbl[i] = (IFAST_MULT_TYPE)\n\t    DESCALE(MULTIPLY16V16((INT32) qtbl->quantval[i],\n\t\t\t\t  (INT32) aanscales[i]),\n\t\t    CONST_BITS-IFAST_SCALE_BITS);\n\t}\n      }\n      break;\n#endif\n#ifdef DCT_FLOAT_SUPPORTED\n    case JDCT_FLOAT:\n      {\n\t/* For float AA&N IDCT method, multipliers are equal to quantization\n\t * coefficients scaled by scalefactor[row]*scalefactor[col], where\n\t *   scalefactor[0] = 1\n\t *   scalefactor[k] = cos(k*PI/16) * sqrt(2)    for k=1..7\n\t */\n\tFLOAT_MULT_TYPE * fmtbl = (FLOAT_MULT_TYPE *) compptr->dct_table;\n\tint row, col;\n\tstatic const double aanscalefactor[DCTSIZE] = {\n\t  1.0, 1.387039845, 1.306562965, 1.175875602,\n\t  1.0, 0.785694958, 0.541196100, 0.275899379\n\t};\n\n\ti = 0;\n\tfor (row = 0; row < DCTSIZE; row++) {\n\t  for (col = 0; col < DCTSIZE; col++) {\n\t    fmtbl[i] = (FLOAT_MULT_TYPE)\n\t      ((double) qtbl->quantval[i] *\n\t       aanscalefactor[row] * aanscalefactor[col]);\n\t    i++;\n\t  }\n\t}\n      }\n      break;\n#endif\n    default:\n      ERREXIT(cinfo, JERR_NOT_COMPILED);\n      break;\n    }\n  }\n}\n\n\n/*\n * Initialize IDCT manager.\n */\n\nGLOBAL(void)\njinit_inverse_dct (j_decompress_ptr cinfo)\n{\n  my_idct_ptr idct;\n  int ci;\n  jpeg_component_info *compptr;\n\n  idct = (my_idct_ptr)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\tSIZEOF(my_idct_controller));\n  cinfo->idct = (struct jpeg_inverse_dct *) idct;\n  idct->pub.start_pass = start_pass;\n\n  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n       ci++, compptr++) {\n    /* Allocate and pre-zero a multiplier table for each component */\n    compptr->dct_table =\n      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\t  SIZEOF(multiplier_table));\n    MEMZERO(compptr->dct_table, SIZEOF(multiplier_table));\n    /* Mark multiplier table not yet set up for any method */\n    idct->cur_method[ci] = -1;\n  }\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jdhuff.c",
    "content": "/*\n * jdhuff.c\n *\n * Copyright (C) 1991-1997, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains Huffman entropy decoding routines.\n *\n * Much of the complexity here has to do with supporting input suspension.\n * If the data source module demands suspension, we want to be able to back\n * up to the start of the current MCU.  To do this, we copy state variables\n * into local working storage, and update them back to the permanent\n * storage only upon successful completion of an MCU.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n#include \"jdhuff.h\"\t\t/* Declarations shared with jdphuff.c */\n\n\n/*\n * Expanded entropy decoder object for Huffman decoding.\n *\n * The savable_state subrecord contains fields that change within an MCU,\n * but must not be updated permanently until we complete the MCU.\n */\n\ntypedef struct {\n  int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */\n} savable_state;\n\n/* This macro is to work around compilers with missing or broken\n * structure assignment.  You'll need to fix this code if you have\n * such a compiler and you change MAX_COMPS_IN_SCAN.\n */\n\n#ifndef NO_STRUCT_ASSIGN\n#define ASSIGN_STATE(dest,src)  ((dest) = (src))\n#else\n#if MAX_COMPS_IN_SCAN == 4\n#define ASSIGN_STATE(dest,src)  \\\n\t((dest).last_dc_val[0] = (src).last_dc_val[0], \\\n\t (dest).last_dc_val[1] = (src).last_dc_val[1], \\\n\t (dest).last_dc_val[2] = (src).last_dc_val[2], \\\n\t (dest).last_dc_val[3] = (src).last_dc_val[3])\n#endif\n#endif\n\n\ntypedef struct {\n  struct jpeg_entropy_decoder pub; /* public fields */\n\n  /* These fields are loaded into local variables at start of each MCU.\n   * In case of suspension, we exit WITHOUT updating them.\n   */\n  bitread_perm_state bitstate;\t/* Bit buffer at start of MCU */\n  savable_state saved;\t\t/* Other state at start of MCU */\n\n  /* These fields are NOT loaded into local working state. */\n  unsigned int restarts_to_go;\t/* MCUs left in this restart interval */\n\n  /* Pointers to derived tables (these workspaces have image lifespan) */\n  d_derived_tbl * dc_derived_tbls[NUM_HUFF_TBLS];\n  d_derived_tbl * ac_derived_tbls[NUM_HUFF_TBLS];\n\n  /* Precalculated info set up by start_pass for use in decode_mcu: */\n\n  /* Pointers to derived tables to be used for each block within an MCU */\n  d_derived_tbl * dc_cur_tbls[D_MAX_BLOCKS_IN_MCU];\n  d_derived_tbl * ac_cur_tbls[D_MAX_BLOCKS_IN_MCU];\n  /* Whether we care about the DC and AC coefficient values for each block */\n  boolean dc_needed[D_MAX_BLOCKS_IN_MCU];\n  boolean ac_needed[D_MAX_BLOCKS_IN_MCU];\n} huff_entropy_decoder;\n\ntypedef huff_entropy_decoder * huff_entropy_ptr;\n\n\n/*\n * Initialize for a Huffman-compressed scan.\n */\n\nMETHODDEF(void)\nstart_pass_huff_decoder (j_decompress_ptr cinfo)\n{\n  huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;\n  int ci, blkn, dctbl, actbl;\n  jpeg_component_info * compptr;\n\n  /* Check that the scan parameters Ss, Se, Ah/Al are OK for sequential JPEG.\n   * This ought to be an error condition, but we make it a warning because\n   * there are some baseline files out there with all zeroes in these bytes.\n   */\n  if (cinfo->Ss != 0 || cinfo->Se != DCTSIZE2-1 ||\n      cinfo->Ah != 0 || cinfo->Al != 0)\n    WARNMS(cinfo, JWRN_NOT_SEQUENTIAL);\n\n  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {\n    compptr = cinfo->cur_comp_info[ci];\n    dctbl = compptr->dc_tbl_no;\n    actbl = compptr->ac_tbl_no;\n    /* Compute derived values for Huffman tables */\n    /* We may do this more than once for a table, but it's not expensive */\n    jpeg_make_d_derived_tbl(cinfo, TRUE, dctbl,\n\t\t\t    & entropy->dc_derived_tbls[dctbl]);\n    jpeg_make_d_derived_tbl(cinfo, FALSE, actbl,\n\t\t\t    & entropy->ac_derived_tbls[actbl]);\n    /* Initialize DC predictions to 0 */\n    entropy->saved.last_dc_val[ci] = 0;\n  }\n\n  /* Precalculate decoding info for each block in an MCU of this scan */\n  for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {\n    ci = cinfo->MCU_membership[blkn];\n    compptr = cinfo->cur_comp_info[ci];\n    /* Precalculate which table to use for each block */\n    entropy->dc_cur_tbls[blkn] = entropy->dc_derived_tbls[compptr->dc_tbl_no];\n    entropy->ac_cur_tbls[blkn] = entropy->ac_derived_tbls[compptr->ac_tbl_no];\n    /* Decide whether we really care about the coefficient values */\n    if (compptr->component_needed) {\n      entropy->dc_needed[blkn] = TRUE;\n      /* we don't need the ACs if producing a 1/8th-size image */\n      entropy->ac_needed[blkn] = (compptr->DCT_scaled_size > 1);\n    } else {\n      entropy->dc_needed[blkn] = entropy->ac_needed[blkn] = FALSE;\n    }\n  }\n\n  /* Initialize bitread state variables */\n  entropy->bitstate.bits_left = 0;\n  entropy->bitstate.get_buffer = 0; /* unnecessary, but keeps Purify quiet */\n  entropy->pub.insufficient_data = FALSE;\n\n  /* Initialize restart counter */\n  entropy->restarts_to_go = cinfo->restart_interval;\n}\n\n\n/*\n * Compute the derived values for a Huffman table.\n * This routine also performs some validation checks on the table.\n *\n * Note this is also used by jdphuff.c.\n */\n\nGLOBAL(void)\njpeg_make_d_derived_tbl (j_decompress_ptr cinfo, boolean isDC, int tblno,\n\t\t\t d_derived_tbl ** pdtbl)\n{\n  JHUFF_TBL *htbl;\n  d_derived_tbl *dtbl;\n  int p, i, l, si, numsymbols;\n  int lookbits, ctr;\n  char huffsize[257];\n  unsigned int huffcode[257];\n  unsigned int code;\n\n  /* Note that huffsize[] and huffcode[] are filled in code-length order,\n   * paralleling the order of the symbols themselves in htbl->huffval[].\n   */\n\n  /* Find the input Huffman table */\n  if (tblno < 0 || tblno >= NUM_HUFF_TBLS)\n    ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tblno);\n  htbl =\n    isDC ? cinfo->dc_huff_tbl_ptrs[tblno] : cinfo->ac_huff_tbl_ptrs[tblno];\n  if (htbl == NULL)\n    ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tblno);\n\n  /* Allocate a workspace if we haven't already done so. */\n  if (*pdtbl == NULL)\n    *pdtbl = (d_derived_tbl *)\n      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\t  SIZEOF(d_derived_tbl));\n  dtbl = *pdtbl;\n  dtbl->pub = htbl;\t\t/* fill in back link */\n  \n  /* Figure C.1: make table of Huffman code length for each symbol */\n\n  p = 0;\n  for (l = 1; l <= 16; l++) {\n    i = (int) htbl->bits[l];\n    if (i < 0 || p + i > 256)\t/* protect against table overrun */\n      ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);\n    while (i--)\n      huffsize[p++] = (char) l;\n  }\n  huffsize[p] = 0;\n  numsymbols = p;\n  \n  /* Figure C.2: generate the codes themselves */\n  /* We also validate that the counts represent a legal Huffman code tree. */\n  \n  code = 0;\n  si = huffsize[0];\n  p = 0;\n  while (huffsize[p]) {\n    while (((int) huffsize[p]) == si) {\n      huffcode[p++] = code;\n      code++;\n    }\n    /* code is now 1 more than the last code used for codelength si; but\n     * it must still fit in si bits, since no code is allowed to be all ones.\n     */\n    if (((INT32) code) >= (((INT32) 1) << si))\n      ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);\n    code <<= 1;\n    si++;\n  }\n\n  /* Figure F.15: generate decoding tables for bit-sequential decoding */\n\n  p = 0;\n  for (l = 1; l <= 16; l++) {\n    if (htbl->bits[l]) {\n      /* valoffset[l] = huffval[] index of 1st symbol of code length l,\n       * minus the minimum code of length l\n       */\n      dtbl->valoffset[l] = (INT32) p - (INT32) huffcode[p];\n      p += htbl->bits[l];\n      dtbl->maxcode[l] = huffcode[p-1]; /* maximum code of length l */\n    } else {\n      dtbl->maxcode[l] = -1;\t/* -1 if no codes of this length */\n    }\n  }\n  dtbl->maxcode[17] = 0xFFFFFL; /* ensures jpeg_huff_decode terminates */\n\n  /* Compute lookahead tables to speed up decoding.\n   * First we set all the table entries to 0, indicating \"too long\";\n   * then we iterate through the Huffman codes that are short enough and\n   * fill in all the entries that correspond to bit sequences starting\n   * with that code.\n   */\n\n  MEMZERO(dtbl->look_nbits, SIZEOF(dtbl->look_nbits));\n\n  p = 0;\n  for (l = 1; l <= HUFF_LOOKAHEAD; l++) {\n    for (i = 1; i <= (int) htbl->bits[l]; i++, p++) {\n      /* l = current code's length, p = its index in huffcode[] & huffval[]. */\n      /* Generate left-justified code followed by all possible bit sequences */\n      lookbits = huffcode[p] << (HUFF_LOOKAHEAD-l);\n      for (ctr = 1 << (HUFF_LOOKAHEAD-l); ctr > 0; ctr--) {\n\tdtbl->look_nbits[lookbits] = l;\n\tdtbl->look_sym[lookbits] = htbl->huffval[p];\n\tlookbits++;\n      }\n    }\n  }\n\n  /* Validate symbols as being reasonable.\n   * For AC tables, we make no check, but accept all byte values 0..255.\n   * For DC tables, we require the symbols to be in range 0..15.\n   * (Tighter bounds could be applied depending on the data depth and mode,\n   * but this is sufficient to ensure safe decoding.)\n   */\n  if (isDC) {\n    for (i = 0; i < numsymbols; i++) {\n      int sym = htbl->huffval[i];\n      if (sym < 0 || sym > 15)\n\tERREXIT(cinfo, JERR_BAD_HUFF_TABLE);\n    }\n  }\n}\n\n\n/*\n * Out-of-line code for bit fetching (shared with jdphuff.c).\n * See jdhuff.h for info about usage.\n * Note: current values of get_buffer and bits_left are passed as parameters,\n * but are returned in the corresponding fields of the state struct.\n *\n * On most machines MIN_GET_BITS should be 25 to allow the full 32-bit width\n * of get_buffer to be used.  (On machines with wider words, an even larger\n * buffer could be used.)  However, on some machines 32-bit shifts are\n * quite slow and take time proportional to the number of places shifted.\n * (This is true with most PC compilers, for instance.)  In this case it may\n * be a win to set MIN_GET_BITS to the minimum value of 15.  This reduces the\n * average shift distance at the cost of more calls to jpeg_fill_bit_buffer.\n */\n\n#ifdef SLOW_SHIFT_32\n#define MIN_GET_BITS  15\t/* minimum allowable value */\n#else\n#define MIN_GET_BITS  (BIT_BUF_SIZE-7)\n#endif\n\n\nGLOBAL(boolean)\njpeg_fill_bit_buffer (bitread_working_state * state,\n\t\t      register bit_buf_type get_buffer, register int bits_left,\n\t\t      int nbits)\n/* Load up the bit buffer to a depth of at least nbits */\n{\n  /* Copy heavily used state fields into locals (hopefully registers) */\n  register const JOCTET * next_input_byte = state->next_input_byte;\n  register size_t bytes_in_buffer = state->bytes_in_buffer;\n  j_decompress_ptr cinfo = state->cinfo;\n\n  /* Attempt to load at least MIN_GET_BITS bits into get_buffer. */\n  /* (It is assumed that no request will be for more than that many bits.) */\n  /* We fail to do so only if we hit a marker or are forced to suspend. */\n\n  if (cinfo->unread_marker == 0) {\t/* cannot advance past a marker */\n    while (bits_left < MIN_GET_BITS) {\n      register int c;\n\n      /* Attempt to read a byte */\n      if (bytes_in_buffer == 0) {\n\tif (! (*cinfo->src->fill_input_buffer) (cinfo))\n\t  return FALSE;\n\tnext_input_byte = cinfo->src->next_input_byte;\n\tbytes_in_buffer = cinfo->src->bytes_in_buffer;\n      }\n      bytes_in_buffer--;\n      c = GETJOCTET(*next_input_byte++);\n\n      /* If it's 0xFF, check and discard stuffed zero byte */\n      if (c == 0xFF) {\n\t/* Loop here to discard any padding FF's on terminating marker,\n\t * so that we can save a valid unread_marker value.  NOTE: we will\n\t * accept multiple FF's followed by a 0 as meaning a single FF data\n\t * byte.  This data pattern is not valid according to the standard.\n\t */\n\tdo {\n\t  if (bytes_in_buffer == 0) {\n\t    if (! (*cinfo->src->fill_input_buffer) (cinfo))\n\t      return FALSE;\n\t    next_input_byte = cinfo->src->next_input_byte;\n\t    bytes_in_buffer = cinfo->src->bytes_in_buffer;\n\t  }\n\t  bytes_in_buffer--;\n\t  c = GETJOCTET(*next_input_byte++);\n\t} while (c == 0xFF);\n\n\tif (c == 0) {\n\t  /* Found FF/00, which represents an FF data byte */\n\t  c = 0xFF;\n\t} else {\n\t  /* Oops, it's actually a marker indicating end of compressed data.\n\t   * Save the marker code for later use.\n\t   * Fine point: it might appear that we should save the marker into\n\t   * bitread working state, not straight into permanent state.  But\n\t   * once we have hit a marker, we cannot need to suspend within the\n\t   * current MCU, because we will read no more bytes from the data\n\t   * source.  So it is OK to update permanent state right away.\n\t   */\n\t  cinfo->unread_marker = c;\n\t  /* See if we need to insert some fake zero bits. */\n\t  goto no_more_bytes;\n\t}\n      }\n\n      /* OK, load c into get_buffer */\n      get_buffer = (get_buffer << 8) | c;\n      bits_left += 8;\n    } /* end while */\n  } else {\n  no_more_bytes:\n    /* We get here if we've read the marker that terminates the compressed\n     * data segment.  There should be enough bits in the buffer register\n     * to satisfy the request; if so, no problem.\n     */\n    if (nbits > bits_left) {\n      /* Uh-oh.  Report corrupted data to user and stuff zeroes into\n       * the data stream, so that we can produce some kind of image.\n       * We use a nonvolatile flag to ensure that only one warning message\n       * appears per data segment.\n       */\n      if (! cinfo->entropy->insufficient_data) {\n\tWARNMS(cinfo, JWRN_HIT_MARKER);\n\tcinfo->entropy->insufficient_data = TRUE;\n      }\n      /* Fill the buffer with zero bits */\n      get_buffer <<= MIN_GET_BITS - bits_left;\n      bits_left = MIN_GET_BITS;\n    }\n  }\n\n  /* Unload the local registers */\n  state->next_input_byte = next_input_byte;\n  state->bytes_in_buffer = bytes_in_buffer;\n  state->get_buffer = get_buffer;\n  state->bits_left = bits_left;\n\n  return TRUE;\n}\n\n\n/*\n * Out-of-line code for Huffman code decoding.\n * See jdhuff.h for info about usage.\n */\n\nGLOBAL(int)\njpeg_huff_decode (bitread_working_state * state,\n\t\t  register bit_buf_type get_buffer, register int bits_left,\n\t\t  d_derived_tbl * htbl, int min_bits)\n{\n  register int l = min_bits;\n  register INT32 code;\n\n  /* HUFF_DECODE has determined that the code is at least min_bits */\n  /* bits long, so fetch that many bits in one swoop. */\n\n  CHECK_BIT_BUFFER(*state, l, return -1);\n  code = GET_BITS(l);\n\n  /* Collect the rest of the Huffman code one bit at a time. */\n  /* This is per Figure F.16 in the JPEG spec. */\n\n  while (code > htbl->maxcode[l]) {\n    code <<= 1;\n    CHECK_BIT_BUFFER(*state, 1, return -1);\n    code |= GET_BITS(1);\n    l++;\n  }\n\n  /* Unload the local registers */\n  state->get_buffer = get_buffer;\n  state->bits_left = bits_left;\n\n  /* With garbage input we may reach the sentinel value l = 17. */\n\n  if (l > 16) {\n    WARNMS(state->cinfo, JWRN_HUFF_BAD_CODE);\n    return 0;\t\t\t/* fake a zero as the safest result */\n  }\n\n  return htbl->pub->huffval[ (int) (code + htbl->valoffset[l]) ];\n}\n\n\n/*\n * Figure F.12: extend sign bit.\n * On some machines, a shift and add will be faster than a table lookup.\n */\n\n#ifdef AVOID_TABLES\n\n#define HUFF_EXTEND(x,s)  ((x) < (1<<((s)-1)) ? (x) + (((-1)<<(s)) + 1) : (x))\n\n#else\n\n#define HUFF_EXTEND(x,s)  ((x) < extend_test[s] ? (x) + extend_offset[s] : (x))\n\nstatic const int extend_test[16] =   /* entry n is 2**(n-1) */\n  { 0, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080,\n    0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000 };\n\nstatic const int extend_offset[16] = /* entry n is (-1 << n) + 1 */\n  { 0, ((-1)<<1) + 1, ((-1)<<2) + 1, ((-1)<<3) + 1, ((-1)<<4) + 1,\n    ((-1)<<5) + 1, ((-1)<<6) + 1, ((-1)<<7) + 1, ((-1)<<8) + 1,\n    ((-1)<<9) + 1, ((-1)<<10) + 1, ((-1)<<11) + 1, ((-1)<<12) + 1,\n    ((-1)<<13) + 1, ((-1)<<14) + 1, ((-1)<<15) + 1 };\n\n#endif /* AVOID_TABLES */\n\n\n/*\n * Check for a restart marker & resynchronize decoder.\n * Returns FALSE if must suspend.\n */\n\nLOCAL(boolean)\nprocess_restart (j_decompress_ptr cinfo)\n{\n  huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;\n  int ci;\n\n  /* Throw away any unused bits remaining in bit buffer; */\n  /* include any full bytes in next_marker's count of discarded bytes */\n  cinfo->marker->discarded_bytes += entropy->bitstate.bits_left / 8;\n  entropy->bitstate.bits_left = 0;\n\n  /* Advance past the RSTn marker */\n  if (! (*cinfo->marker->read_restart_marker) (cinfo))\n    return FALSE;\n\n  /* Re-initialize DC predictions to 0 */\n  for (ci = 0; ci < cinfo->comps_in_scan; ci++)\n    entropy->saved.last_dc_val[ci] = 0;\n\n  /* Reset restart counter */\n  entropy->restarts_to_go = cinfo->restart_interval;\n\n  /* Reset out-of-data flag, unless read_restart_marker left us smack up\n   * against a marker.  In that case we will end up treating the next data\n   * segment as empty, and we can avoid producing bogus output pixels by\n   * leaving the flag set.\n   */\n  if (cinfo->unread_marker == 0)\n    entropy->pub.insufficient_data = FALSE;\n\n  return TRUE;\n}\n\n\n/*\n * Decode and return one MCU's worth of Huffman-compressed coefficients.\n * The coefficients are reordered from zigzag order into natural array order,\n * but are not dequantized.\n *\n * The i'th block of the MCU is stored into the block pointed to by\n * MCU_data[i].  WE ASSUME THIS AREA HAS BEEN ZEROED BY THE CALLER.\n * (Wholesale zeroing is usually a little faster than retail...)\n *\n * Returns FALSE if data source requested suspension.  In that case no\n * changes have been made to permanent state.  (Exception: some output\n * coefficients may already have been assigned.  This is harmless for\n * this module, since we'll just re-assign them on the next call.)\n */\n\nMETHODDEF(boolean)\ndecode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)\n{\n  huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;\n  int blkn;\n  BITREAD_STATE_VARS;\n  savable_state state;\n\n  /* Process restart marker if needed; may have to suspend */\n  if (cinfo->restart_interval) {\n    if (entropy->restarts_to_go == 0)\n      if (! process_restart(cinfo))\n\treturn FALSE;\n  }\n\n  /* If we've run out of data, just leave the MCU set to zeroes.\n   * This way, we return uniform gray for the remainder of the segment.\n   */\n  if (! entropy->pub.insufficient_data) {\n\n    /* Load up working state */\n    BITREAD_LOAD_STATE(cinfo,entropy->bitstate);\n    ASSIGN_STATE(state, entropy->saved);\n\n    /* Outer loop handles each block in the MCU */\n\n    for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {\n      JBLOCKROW block = MCU_data[blkn];\n      d_derived_tbl * dctbl = entropy->dc_cur_tbls[blkn];\n      d_derived_tbl * actbl = entropy->ac_cur_tbls[blkn];\n      register int s, k, r;\n\n      /* Decode a single block's worth of coefficients */\n\n      /* Section F.2.2.1: decode the DC coefficient difference */\n      HUFF_DECODE(s, br_state, dctbl, return FALSE, label1);\n      if (s) {\n\tCHECK_BIT_BUFFER(br_state, s, return FALSE);\n\tr = GET_BITS(s);\n\ts = HUFF_EXTEND(r, s);\n      }\n\n      if (entropy->dc_needed[blkn]) {\n\t/* Convert DC difference to actual value, update last_dc_val */\n\tint ci = cinfo->MCU_membership[blkn];\n\ts += state.last_dc_val[ci];\n\tstate.last_dc_val[ci] = s;\n\t/* Output the DC coefficient (assumes jpeg_natural_order[0] = 0) */\n\t(*block)[0] = (JCOEF) s;\n      }\n\n      if (entropy->ac_needed[blkn]) {\n\n\t/* Section F.2.2.2: decode the AC coefficients */\n\t/* Since zeroes are skipped, output area must be cleared beforehand */\n\tfor (k = 1; k < DCTSIZE2; k++) {\n\t  HUFF_DECODE(s, br_state, actbl, return FALSE, label2);\n      \n\t  r = s >> 4;\n\t  s &= 15;\n      \n\t  if (s) {\n\t    k += r;\n\t    CHECK_BIT_BUFFER(br_state, s, return FALSE);\n\t    r = GET_BITS(s);\n\t    s = HUFF_EXTEND(r, s);\n\t    /* Output coefficient in natural (dezigzagged) order.\n\t     * Note: the extra entries in jpeg_natural_order[] will save us\n\t     * if k >= DCTSIZE2, which could happen if the data is corrupted.\n\t     */\n\t    (*block)[jpeg_natural_order[k]] = (JCOEF) s;\n\t  } else {\n\t    if (r != 15)\n\t      break;\n\t    k += 15;\n\t  }\n\t}\n\n      } else {\n\n\t/* Section F.2.2.2: decode the AC coefficients */\n\t/* In this path we just discard the values */\n\tfor (k = 1; k < DCTSIZE2; k++) {\n\t  HUFF_DECODE(s, br_state, actbl, return FALSE, label3);\n      \n\t  r = s >> 4;\n\t  s &= 15;\n      \n\t  if (s) {\n\t    k += r;\n\t    CHECK_BIT_BUFFER(br_state, s, return FALSE);\n\t    DROP_BITS(s);\n\t  } else {\n\t    if (r != 15)\n\t      break;\n\t    k += 15;\n\t  }\n\t}\n\n      }\n    }\n\n    /* Completed MCU, so update state */\n    BITREAD_SAVE_STATE(cinfo,entropy->bitstate);\n    ASSIGN_STATE(entropy->saved, state);\n  }\n\n  /* Account for restart interval (no-op if not using restarts) */\n  entropy->restarts_to_go--;\n\n  return TRUE;\n}\n\n\n/*\n * Module initialization routine for Huffman entropy decoding.\n */\n\nGLOBAL(void)\njinit_huff_decoder (j_decompress_ptr cinfo)\n{\n  huff_entropy_ptr entropy;\n  int i;\n\n  entropy = (huff_entropy_ptr)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\tSIZEOF(huff_entropy_decoder));\n  cinfo->entropy = (struct jpeg_entropy_decoder *) entropy;\n  entropy->pub.start_pass = start_pass_huff_decoder;\n  entropy->pub.decode_mcu = decode_mcu;\n\n  /* Mark tables unallocated */\n  for (i = 0; i < NUM_HUFF_TBLS; i++) {\n    entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL;\n  }\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jdhuff.h",
    "content": "/*\n * jdhuff.h\n *\n * Copyright (C) 1991-1997, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains declarations for Huffman entropy decoding routines\n * that are shared between the sequential decoder (jdhuff.c) and the\n * progressive decoder (jdphuff.c).  No other modules need to see these.\n */\n\n/* Short forms of external names for systems with brain-damaged linkers. */\n\n#ifdef NEED_SHORT_EXTERNAL_NAMES\n#define jpeg_make_d_derived_tbl\tjMkDDerived\n#define jpeg_fill_bit_buffer\tjFilBitBuf\n#define jpeg_huff_decode\tjHufDecode\n#endif /* NEED_SHORT_EXTERNAL_NAMES */\n\n\n/* Derived data constructed for each Huffman table */\n\n#define HUFF_LOOKAHEAD\t8\t/* # of bits of lookahead */\n\ntypedef struct {\n  /* Basic tables: (element [0] of each array is unused) */\n  INT32 maxcode[18];\t\t/* largest code of length k (-1 if none) */\n  /* (maxcode[17] is a sentinel to ensure jpeg_huff_decode terminates) */\n  INT32 valoffset[17];\t\t/* huffval[] offset for codes of length k */\n  /* valoffset[k] = huffval[] index of 1st symbol of code length k, less\n   * the smallest code of length k; so given a code of length k, the\n   * corresponding symbol is huffval[code + valoffset[k]]\n   */\n\n  /* Link to public Huffman table (needed only in jpeg_huff_decode) */\n  JHUFF_TBL *pub;\n\n  /* Lookahead tables: indexed by the next HUFF_LOOKAHEAD bits of\n   * the input data stream.  If the next Huffman code is no more\n   * than HUFF_LOOKAHEAD bits long, we can obtain its length and\n   * the corresponding symbol directly from these tables.\n   */\n  int look_nbits[1<<HUFF_LOOKAHEAD]; /* # bits, or 0 if too long */\n  UINT8 look_sym[1<<HUFF_LOOKAHEAD]; /* symbol, or unused */\n} d_derived_tbl;\n\n/* Expand a Huffman table definition into the derived format */\nEXTERN(void) jpeg_make_d_derived_tbl\n\tJPP((j_decompress_ptr cinfo, boolean isDC, int tblno,\n\t     d_derived_tbl ** pdtbl));\n\n\n/*\n * Fetching the next N bits from the input stream is a time-critical operation\n * for the Huffman decoders.  We implement it with a combination of inline\n * macros and out-of-line subroutines.  Note that N (the number of bits\n * demanded at one time) never exceeds 15 for JPEG use.\n *\n * We read source bytes into get_buffer and dole out bits as needed.\n * If get_buffer already contains enough bits, they are fetched in-line\n * by the macros CHECK_BIT_BUFFER and GET_BITS.  When there aren't enough\n * bits, jpeg_fill_bit_buffer is called; it will attempt to fill get_buffer\n * as full as possible (not just to the number of bits needed; this\n * prefetching reduces the overhead cost of calling jpeg_fill_bit_buffer).\n * Note that jpeg_fill_bit_buffer may return FALSE to indicate suspension.\n * On TRUE return, jpeg_fill_bit_buffer guarantees that get_buffer contains\n * at least the requested number of bits --- dummy zeroes are inserted if\n * necessary.\n */\n\ntypedef INT32 bit_buf_type;\t/* type of bit-extraction buffer */\n#define BIT_BUF_SIZE  32\t/* size of buffer in bits */\n\n/* If long is > 32 bits on your machine, and shifting/masking longs is\n * reasonably fast, making bit_buf_type be long and setting BIT_BUF_SIZE\n * appropriately should be a win.  Unfortunately we can't define the size\n * with something like  #define BIT_BUF_SIZE (sizeof(bit_buf_type)*8)\n * because not all machines measure sizeof in 8-bit bytes.\n */\n\ntypedef struct {\t\t/* Bitreading state saved across MCUs */\n  bit_buf_type get_buffer;\t/* current bit-extraction buffer */\n  int bits_left;\t\t/* # of unused bits in it */\n} bitread_perm_state;\n\ntypedef struct {\t\t/* Bitreading working state within an MCU */\n  /* Current data source location */\n  /* We need a copy, rather than munging the original, in case of suspension */\n  const JOCTET * next_input_byte; /* => next byte to read from source */\n  size_t bytes_in_buffer;\t/* # of bytes remaining in source buffer */\n  /* Bit input buffer --- note these values are kept in register variables,\n   * not in this struct, inside the inner loops.\n   */\n  bit_buf_type get_buffer;\t/* current bit-extraction buffer */\n  int bits_left;\t\t/* # of unused bits in it */\n  /* Pointer needed by jpeg_fill_bit_buffer. */\n  j_decompress_ptr cinfo;\t/* back link to decompress master record */\n} bitread_working_state;\n\n/* Macros to declare and load/save bitread local variables. */\n#define BITREAD_STATE_VARS  \\\n\tregister bit_buf_type get_buffer;  \\\n\tregister int bits_left;  \\\n\tbitread_working_state br_state\n\n#define BITREAD_LOAD_STATE(cinfop,permstate)  \\\n\tbr_state.cinfo = cinfop; \\\n\tbr_state.next_input_byte = cinfop->src->next_input_byte; \\\n\tbr_state.bytes_in_buffer = cinfop->src->bytes_in_buffer; \\\n\tget_buffer = permstate.get_buffer; \\\n\tbits_left = permstate.bits_left;\n\n#define BITREAD_SAVE_STATE(cinfop,permstate)  \\\n\tcinfop->src->next_input_byte = br_state.next_input_byte; \\\n\tcinfop->src->bytes_in_buffer = br_state.bytes_in_buffer; \\\n\tpermstate.get_buffer = get_buffer; \\\n\tpermstate.bits_left = bits_left\n\n/*\n * These macros provide the in-line portion of bit fetching.\n * Use CHECK_BIT_BUFFER to ensure there are N bits in get_buffer\n * before using GET_BITS, PEEK_BITS, or DROP_BITS.\n * The variables get_buffer and bits_left are assumed to be locals,\n * but the state struct might not be (jpeg_huff_decode needs this).\n *\tCHECK_BIT_BUFFER(state,n,action);\n *\t\tEnsure there are N bits in get_buffer; if suspend, take action.\n *      val = GET_BITS(n);\n *\t\tFetch next N bits.\n *      val = PEEK_BITS(n);\n *\t\tFetch next N bits without removing them from the buffer.\n *\tDROP_BITS(n);\n *\t\tDiscard next N bits.\n * The value N should be a simple variable, not an expression, because it\n * is evaluated multiple times.\n */\n\n#define CHECK_BIT_BUFFER(state,nbits,action) \\\n\t{ if (bits_left < (nbits)) {  \\\n\t    if (! jpeg_fill_bit_buffer(&(state),get_buffer,bits_left,nbits))  \\\n\t      { action; }  \\\n\t    get_buffer = (state).get_buffer; bits_left = (state).bits_left; } }\n\n#define GET_BITS(nbits) \\\n\t(((int) (get_buffer >> (bits_left -= (nbits)))) & ((1<<(nbits))-1))\n\n#define PEEK_BITS(nbits) \\\n\t(((int) (get_buffer >> (bits_left -  (nbits)))) & ((1<<(nbits))-1))\n\n#define DROP_BITS(nbits) \\\n\t(bits_left -= (nbits))\n\n/* Load up the bit buffer to a depth of at least nbits */\nEXTERN(boolean) jpeg_fill_bit_buffer\n\tJPP((bitread_working_state * state, register bit_buf_type get_buffer,\n\t     register int bits_left, int nbits));\n\n\n/*\n * Code for extracting next Huffman-coded symbol from input bit stream.\n * Again, this is time-critical and we make the main paths be macros.\n *\n * We use a lookahead table to process codes of up to HUFF_LOOKAHEAD bits\n * without looping.  Usually, more than 95% of the Huffman codes will be 8\n * or fewer bits long.  The few overlength codes are handled with a loop,\n * which need not be inline code.\n *\n * Notes about the HUFF_DECODE macro:\n * 1. Near the end of the data segment, we may fail to get enough bits\n *    for a lookahead.  In that case, we do it the hard way.\n * 2. If the lookahead table contains no entry, the next code must be\n *    more than HUFF_LOOKAHEAD bits long.\n * 3. jpeg_huff_decode returns -1 if forced to suspend.\n */\n\n#define HUFF_DECODE(result,state,htbl,failaction,slowlabel) \\\n{ register int nb, look; \\\n  if (bits_left < HUFF_LOOKAHEAD) { \\\n    if (! jpeg_fill_bit_buffer(&state,get_buffer,bits_left, 0)) {failaction;} \\\n    get_buffer = state.get_buffer; bits_left = state.bits_left; \\\n    if (bits_left < HUFF_LOOKAHEAD) { \\\n      nb = 1; goto slowlabel; \\\n    } \\\n  } \\\n  look = PEEK_BITS(HUFF_LOOKAHEAD); \\\n  if ((nb = htbl->look_nbits[look]) != 0) { \\\n    DROP_BITS(nb); \\\n    result = htbl->look_sym[look]; \\\n  } else { \\\n    nb = HUFF_LOOKAHEAD+1; \\\nslowlabel: \\\n    if ((result=jpeg_huff_decode(&state,get_buffer,bits_left,htbl,nb)) < 0) \\\n\t{ failaction; } \\\n    get_buffer = state.get_buffer; bits_left = state.bits_left; \\\n  } \\\n}\n\n/* Out-of-line case for Huffman code fetching */\nEXTERN(int) jpeg_huff_decode\n\tJPP((bitread_working_state * state, register bit_buf_type get_buffer,\n\t     register int bits_left, d_derived_tbl * htbl, int min_bits));\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jdinput.c",
    "content": "/*\n * jdinput.c\n *\n * Copyright (C) 1991-1997, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains input control logic for the JPEG decompressor.\n * These routines are concerned with controlling the decompressor's input\n * processing (marker reading and coefficient decoding).  The actual input\n * reading is done in jdmarker.c, jdhuff.c, and jdphuff.c.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n\n\n/* Private state */\n\ntypedef struct {\n  struct jpeg_input_controller pub; /* public fields */\n\n  boolean inheaders;\t\t/* TRUE until first SOS is reached */\n} my_input_controller;\n\ntypedef my_input_controller * my_inputctl_ptr;\n\n\n/* Forward declarations */\nMETHODDEF(int) consume_markers JPP((j_decompress_ptr cinfo));\n\n\n/*\n * Routines to calculate various quantities related to the size of the image.\n */\n\nLOCAL(void)\ninitial_setup (j_decompress_ptr cinfo)\n/* Called once, when first SOS marker is reached */\n{\n  int ci;\n  jpeg_component_info *compptr;\n\n  /* Make sure image isn't bigger than I can handle */\n  if ((long) cinfo->image_height > (long) JPEG_MAX_DIMENSION ||\n      (long) cinfo->image_width > (long) JPEG_MAX_DIMENSION)\n    ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) JPEG_MAX_DIMENSION);\n\n  /* For now, precision must match compiled-in value... */\n  if (cinfo->data_precision != BITS_IN_JSAMPLE)\n    ERREXIT1(cinfo, JERR_BAD_PRECISION, cinfo->data_precision);\n\n  /* Check that number of components won't exceed internal array sizes */\n  if (cinfo->num_components > MAX_COMPONENTS)\n    ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components,\n\t     MAX_COMPONENTS);\n\n  /* Compute maximum sampling factors; check factor validity */\n  cinfo->max_h_samp_factor = 1;\n  cinfo->max_v_samp_factor = 1;\n  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n       ci++, compptr++) {\n    if (compptr->h_samp_factor<=0 || compptr->h_samp_factor>MAX_SAMP_FACTOR ||\n\tcompptr->v_samp_factor<=0 || compptr->v_samp_factor>MAX_SAMP_FACTOR)\n      ERREXIT(cinfo, JERR_BAD_SAMPLING);\n    cinfo->max_h_samp_factor = MAX(cinfo->max_h_samp_factor,\n\t\t\t\t   compptr->h_samp_factor);\n    cinfo->max_v_samp_factor = MAX(cinfo->max_v_samp_factor,\n\t\t\t\t   compptr->v_samp_factor);\n  }\n\n  /* We initialize DCT_scaled_size and min_DCT_scaled_size to DCTSIZE.\n   * In the full decompressor, this will be overridden by jdmaster.c;\n   * but in the transcoder, jdmaster.c is not used, so we must do it here.\n   */\n  cinfo->min_DCT_scaled_size = DCTSIZE;\n\n  /* Compute dimensions of components */\n  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n       ci++, compptr++) {\n    compptr->DCT_scaled_size = DCTSIZE;\n    /* Size in DCT blocks */\n    compptr->width_in_blocks = (JDIMENSION)\n      jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor,\n\t\t    (long) (cinfo->max_h_samp_factor * DCTSIZE));\n    compptr->height_in_blocks = (JDIMENSION)\n      jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor,\n\t\t    (long) (cinfo->max_v_samp_factor * DCTSIZE));\n    /* downsampled_width and downsampled_height will also be overridden by\n     * jdmaster.c if we are doing full decompression.  The transcoder library\n     * doesn't use these values, but the calling application might.\n     */\n    /* Size in samples */\n    compptr->downsampled_width = (JDIMENSION)\n      jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor,\n\t\t    (long) cinfo->max_h_samp_factor);\n    compptr->downsampled_height = (JDIMENSION)\n      jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor,\n\t\t    (long) cinfo->max_v_samp_factor);\n    /* Mark component needed, until color conversion says otherwise */\n    compptr->component_needed = TRUE;\n    /* Mark no quantization table yet saved for component */\n    compptr->quant_table = NULL;\n  }\n\n  /* Compute number of fully interleaved MCU rows. */\n  cinfo->total_iMCU_rows = (JDIMENSION)\n    jdiv_round_up((long) cinfo->image_height,\n\t\t  (long) (cinfo->max_v_samp_factor*DCTSIZE));\n\n  /* Decide whether file contains multiple scans */\n  if (cinfo->comps_in_scan < cinfo->num_components || cinfo->progressive_mode)\n    cinfo->inputctl->has_multiple_scans = TRUE;\n  else\n    cinfo->inputctl->has_multiple_scans = FALSE;\n}\n\n\nLOCAL(void)\nper_scan_setup (j_decompress_ptr cinfo)\n/* Do computations that are needed before processing a JPEG scan */\n/* cinfo->comps_in_scan and cinfo->cur_comp_info[] were set from SOS marker */\n{\n  int ci, mcublks, tmp;\n  jpeg_component_info *compptr;\n  \n  if (cinfo->comps_in_scan == 1) {\n    \n    /* Noninterleaved (single-component) scan */\n    compptr = cinfo->cur_comp_info[0];\n    \n    /* Overall image size in MCUs */\n    cinfo->MCUs_per_row = compptr->width_in_blocks;\n    cinfo->MCU_rows_in_scan = compptr->height_in_blocks;\n    \n    /* For noninterleaved scan, always one block per MCU */\n    compptr->MCU_width = 1;\n    compptr->MCU_height = 1;\n    compptr->MCU_blocks = 1;\n    compptr->MCU_sample_width = compptr->DCT_scaled_size;\n    compptr->last_col_width = 1;\n    /* For noninterleaved scans, it is convenient to define last_row_height\n     * as the number of block rows present in the last iMCU row.\n     */\n    tmp = (int) (compptr->height_in_blocks % compptr->v_samp_factor);\n    if (tmp == 0) tmp = compptr->v_samp_factor;\n    compptr->last_row_height = tmp;\n    \n    /* Prepare array describing MCU composition */\n    cinfo->blocks_in_MCU = 1;\n    cinfo->MCU_membership[0] = 0;\n    \n  } else {\n    \n    /* Interleaved (multi-component) scan */\n    if (cinfo->comps_in_scan <= 0 || cinfo->comps_in_scan > MAX_COMPS_IN_SCAN)\n      ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->comps_in_scan,\n\t       MAX_COMPS_IN_SCAN);\n    \n    /* Overall image size in MCUs */\n    cinfo->MCUs_per_row = (JDIMENSION)\n      jdiv_round_up((long) cinfo->image_width,\n\t\t    (long) (cinfo->max_h_samp_factor*DCTSIZE));\n    cinfo->MCU_rows_in_scan = (JDIMENSION)\n      jdiv_round_up((long) cinfo->image_height,\n\t\t    (long) (cinfo->max_v_samp_factor*DCTSIZE));\n    \n    cinfo->blocks_in_MCU = 0;\n    \n    for (ci = 0; ci < cinfo->comps_in_scan; ci++) {\n      compptr = cinfo->cur_comp_info[ci];\n      /* Sampling factors give # of blocks of component in each MCU */\n      compptr->MCU_width = compptr->h_samp_factor;\n      compptr->MCU_height = compptr->v_samp_factor;\n      compptr->MCU_blocks = compptr->MCU_width * compptr->MCU_height;\n      compptr->MCU_sample_width = compptr->MCU_width * compptr->DCT_scaled_size;\n      /* Figure number of non-dummy blocks in last MCU column & row */\n      tmp = (int) (compptr->width_in_blocks % compptr->MCU_width);\n      if (tmp == 0) tmp = compptr->MCU_width;\n      compptr->last_col_width = tmp;\n      tmp = (int) (compptr->height_in_blocks % compptr->MCU_height);\n      if (tmp == 0) tmp = compptr->MCU_height;\n      compptr->last_row_height = tmp;\n      /* Prepare array describing MCU composition */\n      mcublks = compptr->MCU_blocks;\n      if (cinfo->blocks_in_MCU + mcublks > D_MAX_BLOCKS_IN_MCU)\n\tERREXIT(cinfo, JERR_BAD_MCU_SIZE);\n      while (mcublks-- > 0) {\n\tcinfo->MCU_membership[cinfo->blocks_in_MCU++] = ci;\n      }\n    }\n    \n  }\n}\n\n\n/*\n * Save away a copy of the Q-table referenced by each component present\n * in the current scan, unless already saved during a prior scan.\n *\n * In a multiple-scan JPEG file, the encoder could assign different components\n * the same Q-table slot number, but change table definitions between scans\n * so that each component uses a different Q-table.  (The IJG encoder is not\n * currently capable of doing this, but other encoders might.)  Since we want\n * to be able to dequantize all the components at the end of the file, this\n * means that we have to save away the table actually used for each component.\n * We do this by copying the table at the start of the first scan containing\n * the component.\n * The JPEG spec prohibits the encoder from changing the contents of a Q-table\n * slot between scans of a component using that slot.  If the encoder does so\n * anyway, this decoder will simply use the Q-table values that were current\n * at the start of the first scan for the component.\n *\n * The decompressor output side looks only at the saved quant tables,\n * not at the current Q-table slots.\n */\n\nLOCAL(void)\nlatch_quant_tables (j_decompress_ptr cinfo)\n{\n  int ci, qtblno;\n  jpeg_component_info *compptr;\n  JQUANT_TBL * qtbl;\n\n  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {\n    compptr = cinfo->cur_comp_info[ci];\n    /* No work if we already saved Q-table for this component */\n    if (compptr->quant_table != NULL)\n      continue;\n    /* Make sure specified quantization table is present */\n    qtblno = compptr->quant_tbl_no;\n    if (qtblno < 0 || qtblno >= NUM_QUANT_TBLS ||\n\tcinfo->quant_tbl_ptrs[qtblno] == NULL)\n      ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, qtblno);\n    /* OK, save away the quantization table */\n    qtbl = (JQUANT_TBL *)\n      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\t  SIZEOF(JQUANT_TBL));\n    MEMCOPY(qtbl, cinfo->quant_tbl_ptrs[qtblno], SIZEOF(JQUANT_TBL));\n    compptr->quant_table = qtbl;\n  }\n}\n\n\n/*\n * Initialize the input modules to read a scan of compressed data.\n * The first call to this is done by jdmaster.c after initializing\n * the entire decompressor (during jpeg_start_decompress).\n * Subsequent calls come from consume_markers, below.\n */\n\nMETHODDEF(void)\nstart_input_pass (j_decompress_ptr cinfo)\n{\n  per_scan_setup(cinfo);\n  latch_quant_tables(cinfo);\n  (*cinfo->entropy->start_pass) (cinfo);\n  (*cinfo->coef->start_input_pass) (cinfo);\n  cinfo->inputctl->consume_input = cinfo->coef->consume_data;\n}\n\n\n/*\n * Finish up after inputting a compressed-data scan.\n * This is called by the coefficient controller after it's read all\n * the expected data of the scan.\n */\n\nMETHODDEF(void)\nfinish_input_pass (j_decompress_ptr cinfo)\n{\n  cinfo->inputctl->consume_input = consume_markers;\n}\n\n\n/*\n * Read JPEG markers before, between, or after compressed-data scans.\n * Change state as necessary when a new scan is reached.\n * Return value is JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI.\n *\n * The consume_input method pointer points either here or to the\n * coefficient controller's consume_data routine, depending on whether\n * we are reading a compressed data segment or inter-segment markers.\n */\n\nMETHODDEF(int)\nconsume_markers (j_decompress_ptr cinfo)\n{\n  my_inputctl_ptr inputctl = (my_inputctl_ptr) cinfo->inputctl;\n  int val;\n\n  if (inputctl->pub.eoi_reached) /* After hitting EOI, read no further */\n    return JPEG_REACHED_EOI;\n\n  val = (*cinfo->marker->read_markers) (cinfo);\n\n  switch (val) {\n  case JPEG_REACHED_SOS:\t/* Found SOS */\n    if (inputctl->inheaders) {\t/* 1st SOS */\n      initial_setup(cinfo);\n      inputctl->inheaders = FALSE;\n      /* Note: start_input_pass must be called by jdmaster.c\n       * before any more input can be consumed.  jdapimin.c is\n       * responsible for enforcing this sequencing.\n       */\n    } else {\t\t\t/* 2nd or later SOS marker */\n      if (! inputctl->pub.has_multiple_scans)\n\tERREXIT(cinfo, JERR_EOI_EXPECTED); /* Oops, I wasn't expecting this! */\n      start_input_pass(cinfo);\n    }\n    break;\n  case JPEG_REACHED_EOI:\t/* Found EOI */\n    inputctl->pub.eoi_reached = TRUE;\n    if (inputctl->inheaders) {\t/* Tables-only datastream, apparently */\n      if (cinfo->marker->saw_SOF)\n\tERREXIT(cinfo, JERR_SOF_NO_SOS);\n    } else {\n      /* Prevent infinite loop in coef ctlr's decompress_data routine\n       * if user set output_scan_number larger than number of scans.\n       */\n      if (cinfo->output_scan_number > cinfo->input_scan_number)\n\tcinfo->output_scan_number = cinfo->input_scan_number;\n    }\n    break;\n  case JPEG_SUSPENDED:\n    break;\n  }\n\n  return val;\n}\n\n\n/*\n * Reset state to begin a fresh datastream.\n */\n\nMETHODDEF(void)\nreset_input_controller (j_decompress_ptr cinfo)\n{\n  my_inputctl_ptr inputctl = (my_inputctl_ptr) cinfo->inputctl;\n\n  inputctl->pub.consume_input = consume_markers;\n  inputctl->pub.has_multiple_scans = FALSE; /* \"unknown\" would be better */\n  inputctl->pub.eoi_reached = FALSE;\n  inputctl->inheaders = TRUE;\n  /* Reset other modules */\n  (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo);\n  (*cinfo->marker->reset_marker_reader) (cinfo);\n  /* Reset progression state -- would be cleaner if entropy decoder did this */\n  cinfo->coef_bits = NULL;\n}\n\n\n/*\n * Initialize the input controller module.\n * This is called only once, when the decompression object is created.\n */\n\nGLOBAL(void)\njinit_input_controller (j_decompress_ptr cinfo)\n{\n  my_inputctl_ptr inputctl;\n\n  /* Create subobject in permanent pool */\n  inputctl = (my_inputctl_ptr)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,\n\t\t\t\tSIZEOF(my_input_controller));\n  cinfo->inputctl = (struct jpeg_input_controller *) inputctl;\n  /* Initialize method pointers */\n  inputctl->pub.consume_input = consume_markers;\n  inputctl->pub.reset_input_controller = reset_input_controller;\n  inputctl->pub.start_input_pass = start_input_pass;\n  inputctl->pub.finish_input_pass = finish_input_pass;\n  /* Initialize state: can't use reset_input_controller since we don't\n   * want to try to reset other modules yet.\n   */\n  inputctl->pub.has_multiple_scans = FALSE; /* \"unknown\" would be better */\n  inputctl->pub.eoi_reached = FALSE;\n  inputctl->inheaders = TRUE;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jdmainct.c",
    "content": "/*\n * jdmainct.c\n *\n * Copyright (C) 1994-1996, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains the main buffer controller for decompression.\n * The main buffer lies between the JPEG decompressor proper and the\n * post-processor; it holds downsampled data in the JPEG colorspace.\n *\n * Note that this code is bypassed in raw-data mode, since the application\n * supplies the equivalent of the main buffer in that case.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n\n\n/*\n * In the current system design, the main buffer need never be a full-image\n * buffer; any full-height buffers will be found inside the coefficient or\n * postprocessing controllers.  Nonetheless, the main controller is not\n * trivial.  Its responsibility is to provide context rows for upsampling/\n * rescaling, and doing this in an efficient fashion is a bit tricky.\n *\n * Postprocessor input data is counted in \"row groups\".  A row group\n * is defined to be (v_samp_factor * DCT_scaled_size / min_DCT_scaled_size)\n * sample rows of each component.  (We require DCT_scaled_size values to be\n * chosen such that these numbers are integers.  In practice DCT_scaled_size\n * values will likely be powers of two, so we actually have the stronger\n * condition that DCT_scaled_size / min_DCT_scaled_size is an integer.)\n * Upsampling will typically produce max_v_samp_factor pixel rows from each\n * row group (times any additional scale factor that the upsampler is\n * applying).\n *\n * The coefficient controller will deliver data to us one iMCU row at a time;\n * each iMCU row contains v_samp_factor * DCT_scaled_size sample rows, or\n * exactly min_DCT_scaled_size row groups.  (This amount of data corresponds\n * to one row of MCUs when the image is fully interleaved.)  Note that the\n * number of sample rows varies across components, but the number of row\n * groups does not.  Some garbage sample rows may be included in the last iMCU\n * row at the bottom of the image.\n *\n * Depending on the vertical scaling algorithm used, the upsampler may need\n * access to the sample row(s) above and below its current input row group.\n * The upsampler is required to set need_context_rows TRUE at global selection\n * time if so.  When need_context_rows is FALSE, this controller can simply\n * obtain one iMCU row at a time from the coefficient controller and dole it\n * out as row groups to the postprocessor.\n *\n * When need_context_rows is TRUE, this controller guarantees that the buffer\n * passed to postprocessing contains at least one row group's worth of samples\n * above and below the row group(s) being processed.  Note that the context\n * rows \"above\" the first passed row group appear at negative row offsets in\n * the passed buffer.  At the top and bottom of the image, the required\n * context rows are manufactured by duplicating the first or last real sample\n * row; this avoids having special cases in the upsampling inner loops.\n *\n * The amount of context is fixed at one row group just because that's a\n * convenient number for this controller to work with.  The existing\n * upsamplers really only need one sample row of context.  An upsampler\n * supporting arbitrary output rescaling might wish for more than one row\n * group of context when shrinking the image; tough, we don't handle that.\n * (This is justified by the assumption that downsizing will be handled mostly\n * by adjusting the DCT_scaled_size values, so that the actual scale factor at\n * the upsample step needn't be much less than one.)\n *\n * To provide the desired context, we have to retain the last two row groups\n * of one iMCU row while reading in the next iMCU row.  (The last row group\n * can't be processed until we have another row group for its below-context,\n * and so we have to save the next-to-last group too for its above-context.)\n * We could do this most simply by copying data around in our buffer, but\n * that'd be very slow.  We can avoid copying any data by creating a rather\n * strange pointer structure.  Here's how it works.  We allocate a workspace\n * consisting of M+2 row groups (where M = min_DCT_scaled_size is the number\n * of row groups per iMCU row).  We create two sets of redundant pointers to\n * the workspace.  Labeling the physical row groups 0 to M+1, the synthesized\n * pointer lists look like this:\n *                   M+1                          M-1\n * master pointer --> 0         master pointer --> 0\n *                    1                            1\n *                   ...                          ...\n *                   M-3                          M-3\n *                   M-2                           M\n *                   M-1                          M+1\n *                    M                           M-2\n *                   M+1                          M-1\n *                    0                            0\n * We read alternate iMCU rows using each master pointer; thus the last two\n * row groups of the previous iMCU row remain un-overwritten in the workspace.\n * The pointer lists are set up so that the required context rows appear to\n * be adjacent to the proper places when we pass the pointer lists to the\n * upsampler.\n *\n * The above pictures describe the normal state of the pointer lists.\n * At top and bottom of the image, we diddle the pointer lists to duplicate\n * the first or last sample row as necessary (this is cheaper than copying\n * sample rows around).\n *\n * This scheme breaks down if M < 2, ie, min_DCT_scaled_size is 1.  In that\n * situation each iMCU row provides only one row group so the buffering logic\n * must be different (eg, we must read two iMCU rows before we can emit the\n * first row group).  For now, we simply do not support providing context\n * rows when min_DCT_scaled_size is 1.  That combination seems unlikely to\n * be worth providing --- if someone wants a 1/8th-size preview, they probably\n * want it quick and dirty, so a context-free upsampler is sufficient.\n */\n\n\n/* Private buffer controller object */\n\ntypedef struct {\n  struct jpeg_d_main_controller pub; /* public fields */\n\n  /* Pointer to allocated workspace (M or M+2 row groups). */\n  JSAMPARRAY buffer[MAX_COMPONENTS];\n\n  boolean buffer_full;\t\t/* Have we gotten an iMCU row from decoder? */\n  JDIMENSION rowgroup_ctr;\t/* counts row groups output to postprocessor */\n\n  /* Remaining fields are only used in the context case. */\n\n  /* These are the master pointers to the funny-order pointer lists. */\n  JSAMPIMAGE xbuffer[2];\t/* pointers to weird pointer lists */\n\n  int whichptr;\t\t\t/* indicates which pointer set is now in use */\n  int context_state;\t\t/* process_data state machine status */\n  JDIMENSION rowgroups_avail;\t/* row groups available to postprocessor */\n  JDIMENSION iMCU_row_ctr;\t/* counts iMCU rows to detect image top/bot */\n} my_main_controller;\n\ntypedef my_main_controller * my_main_ptr;\n\n/* context_state values: */\n#define CTX_PREPARE_FOR_IMCU\t0\t/* need to prepare for MCU row */\n#define CTX_PROCESS_IMCU\t1\t/* feeding iMCU to postprocessor */\n#define CTX_POSTPONED_ROW\t2\t/* feeding postponed row group */\n\n\n/* Forward declarations */\nMETHODDEF(void) process_data_simple_main\n\tJPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf,\n\t     JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail));\nMETHODDEF(void) process_data_context_main\n\tJPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf,\n\t     JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail));\n#ifdef QUANT_2PASS_SUPPORTED\nMETHODDEF(void) process_data_crank_post\n\tJPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf,\n\t     JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail));\n#endif\n\n\nLOCAL(void)\nalloc_funny_pointers (j_decompress_ptr cinfo)\n/* Allocate space for the funny pointer lists.\n * This is done only once, not once per pass.\n */\n{\n  my_main_ptr main = (my_main_ptr) cinfo->main;\n  int ci, rgroup;\n  int M = cinfo->min_DCT_scaled_size;\n  jpeg_component_info *compptr;\n  JSAMPARRAY xbuf;\n\n  /* Get top-level space for component array pointers.\n   * We alloc both arrays with one call to save a few cycles.\n   */\n  main->xbuffer[0] = (JSAMPIMAGE)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\tcinfo->num_components * 2 * SIZEOF(JSAMPARRAY));\n  main->xbuffer[1] = main->xbuffer[0] + cinfo->num_components;\n\n  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n       ci++, compptr++) {\n    rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) /\n      cinfo->min_DCT_scaled_size; /* height of a row group of component */\n    /* Get space for pointer lists --- M+4 row groups in each list.\n     * We alloc both pointer lists with one call to save a few cycles.\n     */\n    xbuf = (JSAMPARRAY)\n      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\t  2 * (rgroup * (M + 4)) * SIZEOF(JSAMPROW));\n    xbuf += rgroup;\t\t/* want one row group at negative offsets */\n    main->xbuffer[0][ci] = xbuf;\n    xbuf += rgroup * (M + 4);\n    main->xbuffer[1][ci] = xbuf;\n  }\n}\n\n\nLOCAL(void)\nmake_funny_pointers (j_decompress_ptr cinfo)\n/* Create the funny pointer lists discussed in the comments above.\n * The actual workspace is already allocated (in main->buffer),\n * and the space for the pointer lists is allocated too.\n * This routine just fills in the curiously ordered lists.\n * This will be repeated at the beginning of each pass.\n */\n{\n  my_main_ptr main = (my_main_ptr) cinfo->main;\n  int ci, i, rgroup;\n  int M = cinfo->min_DCT_scaled_size;\n  jpeg_component_info *compptr;\n  JSAMPARRAY buf, xbuf0, xbuf1;\n\n  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n       ci++, compptr++) {\n    rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) /\n      cinfo->min_DCT_scaled_size; /* height of a row group of component */\n    xbuf0 = main->xbuffer[0][ci];\n    xbuf1 = main->xbuffer[1][ci];\n    /* First copy the workspace pointers as-is */\n    buf = main->buffer[ci];\n    for (i = 0; i < rgroup * (M + 2); i++) {\n      xbuf0[i] = xbuf1[i] = buf[i];\n    }\n    /* In the second list, put the last four row groups in swapped order */\n    for (i = 0; i < rgroup * 2; i++) {\n      xbuf1[rgroup*(M-2) + i] = buf[rgroup*M + i];\n      xbuf1[rgroup*M + i] = buf[rgroup*(M-2) + i];\n    }\n    /* The wraparound pointers at top and bottom will be filled later\n     * (see set_wraparound_pointers, below).  Initially we want the \"above\"\n     * pointers to duplicate the first actual data line.  This only needs\n     * to happen in xbuffer[0].\n     */\n    for (i = 0; i < rgroup; i++) {\n      xbuf0[i - rgroup] = xbuf0[0];\n    }\n  }\n}\n\n\nLOCAL(void)\nset_wraparound_pointers (j_decompress_ptr cinfo)\n/* Set up the \"wraparound\" pointers at top and bottom of the pointer lists.\n * This changes the pointer list state from top-of-image to the normal state.\n */\n{\n  my_main_ptr main = (my_main_ptr) cinfo->main;\n  int ci, i, rgroup;\n  int M = cinfo->min_DCT_scaled_size;\n  jpeg_component_info *compptr;\n  JSAMPARRAY xbuf0, xbuf1;\n\n  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n       ci++, compptr++) {\n    rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) /\n      cinfo->min_DCT_scaled_size; /* height of a row group of component */\n    xbuf0 = main->xbuffer[0][ci];\n    xbuf1 = main->xbuffer[1][ci];\n    for (i = 0; i < rgroup; i++) {\n      xbuf0[i - rgroup] = xbuf0[rgroup*(M+1) + i];\n      xbuf1[i - rgroup] = xbuf1[rgroup*(M+1) + i];\n      xbuf0[rgroup*(M+2) + i] = xbuf0[i];\n      xbuf1[rgroup*(M+2) + i] = xbuf1[i];\n    }\n  }\n}\n\n\nLOCAL(void)\nset_bottom_pointers (j_decompress_ptr cinfo)\n/* Change the pointer lists to duplicate the last sample row at the bottom\n * of the image.  whichptr indicates which xbuffer holds the final iMCU row.\n * Also sets rowgroups_avail to indicate number of nondummy row groups in row.\n */\n{\n  my_main_ptr main = (my_main_ptr) cinfo->main;\n  int ci, i, rgroup, iMCUheight, rows_left;\n  jpeg_component_info *compptr;\n  JSAMPARRAY xbuf;\n\n  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n       ci++, compptr++) {\n    /* Count sample rows in one iMCU row and in one row group */\n    iMCUheight = compptr->v_samp_factor * compptr->DCT_scaled_size;\n    rgroup = iMCUheight / cinfo->min_DCT_scaled_size;\n    /* Count nondummy sample rows remaining for this component */\n    rows_left = (int) (compptr->downsampled_height % (JDIMENSION) iMCUheight);\n    if (rows_left == 0) rows_left = iMCUheight;\n    /* Count nondummy row groups.  Should get same answer for each component,\n     * so we need only do it once.\n     */\n    if (ci == 0) {\n      main->rowgroups_avail = (JDIMENSION) ((rows_left-1) / rgroup + 1);\n    }\n    /* Duplicate the last real sample row rgroup*2 times; this pads out the\n     * last partial rowgroup and ensures at least one full rowgroup of context.\n     */\n    xbuf = main->xbuffer[main->whichptr][ci];\n    for (i = 0; i < rgroup * 2; i++) {\n      xbuf[rows_left + i] = xbuf[rows_left-1];\n    }\n  }\n}\n\n\n/*\n * Initialize for a processing pass.\n */\n\nMETHODDEF(void)\nstart_pass_main (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)\n{\n  my_main_ptr main = (my_main_ptr) cinfo->main;\n\n  switch (pass_mode) {\n  case JBUF_PASS_THRU:\n    if (cinfo->upsample->need_context_rows) {\n      main->pub.process_data = process_data_context_main;\n      make_funny_pointers(cinfo); /* Create the xbuffer[] lists */\n      main->whichptr = 0;\t/* Read first iMCU row into xbuffer[0] */\n      main->context_state = CTX_PREPARE_FOR_IMCU;\n      main->iMCU_row_ctr = 0;\n    } else {\n      /* Simple case with no context needed */\n      main->pub.process_data = process_data_simple_main;\n    }\n    main->buffer_full = FALSE;\t/* Mark buffer empty */\n    main->rowgroup_ctr = 0;\n    break;\n#ifdef QUANT_2PASS_SUPPORTED\n  case JBUF_CRANK_DEST:\n    /* For last pass of 2-pass quantization, just crank the postprocessor */\n    main->pub.process_data = process_data_crank_post;\n    break;\n#endif\n  default:\n    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);\n    break;\n  }\n}\n\n\n/*\n * Process some data.\n * This handles the simple case where no context is required.\n */\n\nMETHODDEF(void)\nprocess_data_simple_main (j_decompress_ptr cinfo,\n\t\t\t  JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,\n\t\t\t  JDIMENSION out_rows_avail)\n{\n  my_main_ptr main = (my_main_ptr) cinfo->main;\n  JDIMENSION rowgroups_avail;\n\n  /* Read input data if we haven't filled the main buffer yet */\n  if (! main->buffer_full) {\n    if (! (*cinfo->coef->decompress_data) (cinfo, main->buffer))\n      return;\t\t\t/* suspension forced, can do nothing more */\n    main->buffer_full = TRUE;\t/* OK, we have an iMCU row to work with */\n  }\n\n  /* There are always min_DCT_scaled_size row groups in an iMCU row. */\n  rowgroups_avail = (JDIMENSION) cinfo->min_DCT_scaled_size;\n  /* Note: at the bottom of the image, we may pass extra garbage row groups\n   * to the postprocessor.  The postprocessor has to check for bottom\n   * of image anyway (at row resolution), so no point in us doing it too.\n   */\n\n  /* Feed the postprocessor */\n  (*cinfo->post->post_process_data) (cinfo, main->buffer,\n\t\t\t\t     &main->rowgroup_ctr, rowgroups_avail,\n\t\t\t\t     output_buf, out_row_ctr, out_rows_avail);\n\n  /* Has postprocessor consumed all the data yet? If so, mark buffer empty */\n  if (main->rowgroup_ctr >= rowgroups_avail) {\n    main->buffer_full = FALSE;\n    main->rowgroup_ctr = 0;\n  }\n}\n\n\n/*\n * Process some data.\n * This handles the case where context rows must be provided.\n */\n\nMETHODDEF(void)\nprocess_data_context_main (j_decompress_ptr cinfo,\n\t\t\t   JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,\n\t\t\t   JDIMENSION out_rows_avail)\n{\n  my_main_ptr main = (my_main_ptr) cinfo->main;\n\n  /* Read input data if we haven't filled the main buffer yet */\n  if (! main->buffer_full) {\n    if (! (*cinfo->coef->decompress_data) (cinfo,\n\t\t\t\t\t   main->xbuffer[main->whichptr]))\n      return;\t\t\t/* suspension forced, can do nothing more */\n    main->buffer_full = TRUE;\t/* OK, we have an iMCU row to work with */\n    main->iMCU_row_ctr++;\t/* count rows received */\n  }\n\n  /* Postprocessor typically will not swallow all the input data it is handed\n   * in one call (due to filling the output buffer first).  Must be prepared\n   * to exit and restart.  This switch lets us keep track of how far we got.\n   * Note that each case falls through to the next on successful completion.\n   */\n  switch (main->context_state) {\n  case CTX_POSTPONED_ROW:\n    /* Call postprocessor using previously set pointers for postponed row */\n    (*cinfo->post->post_process_data) (cinfo, main->xbuffer[main->whichptr],\n\t\t\t&main->rowgroup_ctr, main->rowgroups_avail,\n\t\t\toutput_buf, out_row_ctr, out_rows_avail);\n    if (main->rowgroup_ctr < main->rowgroups_avail)\n      return;\t\t\t/* Need to suspend */\n    main->context_state = CTX_PREPARE_FOR_IMCU;\n    if (*out_row_ctr >= out_rows_avail)\n      return;\t\t\t/* Postprocessor exactly filled output buf */\n    /*FALLTHROUGH*/\n  case CTX_PREPARE_FOR_IMCU:\n    /* Prepare to process first M-1 row groups of this iMCU row */\n    main->rowgroup_ctr = 0;\n    main->rowgroups_avail = (JDIMENSION) (cinfo->min_DCT_scaled_size - 1);\n    /* Check for bottom of image: if so, tweak pointers to \"duplicate\"\n     * the last sample row, and adjust rowgroups_avail to ignore padding rows.\n     */\n    if (main->iMCU_row_ctr == cinfo->total_iMCU_rows)\n      set_bottom_pointers(cinfo);\n    main->context_state = CTX_PROCESS_IMCU;\n    /*FALLTHROUGH*/\n  case CTX_PROCESS_IMCU:\n    /* Call postprocessor using previously set pointers */\n    (*cinfo->post->post_process_data) (cinfo, main->xbuffer[main->whichptr],\n\t\t\t&main->rowgroup_ctr, main->rowgroups_avail,\n\t\t\toutput_buf, out_row_ctr, out_rows_avail);\n    if (main->rowgroup_ctr < main->rowgroups_avail)\n      return;\t\t\t/* Need to suspend */\n    /* After the first iMCU, change wraparound pointers to normal state */\n    if (main->iMCU_row_ctr == 1)\n      set_wraparound_pointers(cinfo);\n    /* Prepare to load new iMCU row using other xbuffer list */\n    main->whichptr ^= 1;\t/* 0=>1 or 1=>0 */\n    main->buffer_full = FALSE;\n    /* Still need to process last row group of this iMCU row, */\n    /* which is saved at index M+1 of the other xbuffer */\n    main->rowgroup_ctr = (JDIMENSION) (cinfo->min_DCT_scaled_size + 1);\n    main->rowgroups_avail = (JDIMENSION) (cinfo->min_DCT_scaled_size + 2);\n    main->context_state = CTX_POSTPONED_ROW;\n  }\n}\n\n\n/*\n * Process some data.\n * Final pass of two-pass quantization: just call the postprocessor.\n * Source data will be the postprocessor controller's internal buffer.\n */\n\n#ifdef QUANT_2PASS_SUPPORTED\n\nMETHODDEF(void)\nprocess_data_crank_post (j_decompress_ptr cinfo,\n\t\t\t JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,\n\t\t\t JDIMENSION out_rows_avail)\n{\n  (*cinfo->post->post_process_data) (cinfo, (JSAMPIMAGE) NULL,\n\t\t\t\t     (JDIMENSION *) NULL, (JDIMENSION) 0,\n\t\t\t\t     output_buf, out_row_ctr, out_rows_avail);\n}\n\n#endif /* QUANT_2PASS_SUPPORTED */\n\n\n/*\n * Initialize main buffer controller.\n */\n\nGLOBAL(void)\njinit_d_main_controller (j_decompress_ptr cinfo, boolean need_full_buffer)\n{\n  my_main_ptr main;\n  int ci, rgroup, ngroups;\n  jpeg_component_info *compptr;\n\n  main = (my_main_ptr)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\tSIZEOF(my_main_controller));\n  cinfo->main = (struct jpeg_d_main_controller *) main;\n  main->pub.start_pass = start_pass_main;\n\n  if (need_full_buffer)\t\t/* shouldn't happen */\n    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);\n\n  /* Allocate the workspace.\n   * ngroups is the number of row groups we need.\n   */\n  if (cinfo->upsample->need_context_rows) {\n    if (cinfo->min_DCT_scaled_size < 2) /* unsupported, see comments above */\n      ERREXIT(cinfo, JERR_NOTIMPL);\n    alloc_funny_pointers(cinfo); /* Alloc space for xbuffer[] lists */\n    ngroups = cinfo->min_DCT_scaled_size + 2;\n  } else {\n    ngroups = cinfo->min_DCT_scaled_size;\n  }\n\n  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n       ci++, compptr++) {\n    rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) /\n      cinfo->min_DCT_scaled_size; /* height of a row group of component */\n    main->buffer[ci] = (*cinfo->mem->alloc_sarray)\n\t\t\t((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t compptr->width_in_blocks * compptr->DCT_scaled_size,\n\t\t\t (JDIMENSION) (rgroup * ngroups));\n  }\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jdmarker.c",
    "content": "/*\n * jdmarker.c\n *\n * Copyright (C) 1991-1998, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains routines to decode JPEG datastream markers.\n * Most of the complexity arises from our desire to support input\n * suspension: if not all of the data for a marker is available,\n * we must exit back to the application.  On resumption, we reprocess\n * the marker.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n\n\ntypedef enum {\t\t\t/* JPEG marker codes */\n  M_SOF0  = 0xc0,\n  M_SOF1  = 0xc1,\n  M_SOF2  = 0xc2,\n  M_SOF3  = 0xc3,\n  \n  M_SOF5  = 0xc5,\n  M_SOF6  = 0xc6,\n  M_SOF7  = 0xc7,\n  \n  M_JPG   = 0xc8,\n  M_SOF9  = 0xc9,\n  M_SOF10 = 0xca,\n  M_SOF11 = 0xcb,\n  \n  M_SOF13 = 0xcd,\n  M_SOF14 = 0xce,\n  M_SOF15 = 0xcf,\n  \n  M_DHT   = 0xc4,\n  \n  M_DAC   = 0xcc,\n  \n  M_RST0  = 0xd0,\n  M_RST1  = 0xd1,\n  M_RST2  = 0xd2,\n  M_RST3  = 0xd3,\n  M_RST4  = 0xd4,\n  M_RST5  = 0xd5,\n  M_RST6  = 0xd6,\n  M_RST7  = 0xd7,\n  \n  M_SOI   = 0xd8,\n  M_EOI   = 0xd9,\n  M_SOS   = 0xda,\n  M_DQT   = 0xdb,\n  M_DNL   = 0xdc,\n  M_DRI   = 0xdd,\n  M_DHP   = 0xde,\n  M_EXP   = 0xdf,\n  \n  M_APP0  = 0xe0,\n  M_APP1  = 0xe1,\n  M_APP2  = 0xe2,\n  M_APP3  = 0xe3,\n  M_APP4  = 0xe4,\n  M_APP5  = 0xe5,\n  M_APP6  = 0xe6,\n  M_APP7  = 0xe7,\n  M_APP8  = 0xe8,\n  M_APP9  = 0xe9,\n  M_APP10 = 0xea,\n  M_APP11 = 0xeb,\n  M_APP12 = 0xec,\n  M_APP13 = 0xed,\n  M_APP14 = 0xee,\n  M_APP15 = 0xef,\n  \n  M_JPG0  = 0xf0,\n  M_JPG13 = 0xfd,\n  M_COM   = 0xfe,\n  \n  M_TEM   = 0x01,\n  \n  M_ERROR = 0x100\n} JPEG_MARKER;\n\n\n/* Private state */\n\ntypedef struct {\n  struct jpeg_marker_reader pub; /* public fields */\n\n  /* Application-overridable marker processing methods */\n  jpeg_marker_parser_method process_COM;\n  jpeg_marker_parser_method process_APPn[16];\n\n  /* Limit on marker data length to save for each marker type */\n  unsigned int length_limit_COM;\n  unsigned int length_limit_APPn[16];\n\n  /* Status of COM/APPn marker saving */\n  jpeg_saved_marker_ptr cur_marker;\t/* NULL if not processing a marker */\n  unsigned int bytes_read;\t\t/* data bytes read so far in marker */\n  /* Note: cur_marker is not linked into marker_list until it's all read. */\n} my_marker_reader;\n\ntypedef my_marker_reader * my_marker_ptr;\n\n\n/*\n * Macros for fetching data from the data source module.\n *\n * At all times, cinfo->src->next_input_byte and ->bytes_in_buffer reflect\n * the current restart point; we update them only when we have reached a\n * suitable place to restart if a suspension occurs.\n */\n\n/* Declare and initialize local copies of input pointer/count */\n#define INPUT_VARS(cinfo)  \\\n\tstruct jpeg_source_mgr * datasrc = (cinfo)->src;  \\\n\tconst JOCTET * next_input_byte = datasrc->next_input_byte;  \\\n\tsize_t bytes_in_buffer = datasrc->bytes_in_buffer\n\n/* Unload the local copies --- do this only at a restart boundary */\n#define INPUT_SYNC(cinfo)  \\\n\t( datasrc->next_input_byte = next_input_byte,  \\\n\t  datasrc->bytes_in_buffer = bytes_in_buffer )\n\n/* Reload the local copies --- used only in MAKE_BYTE_AVAIL */\n#define INPUT_RELOAD(cinfo)  \\\n\t( next_input_byte = datasrc->next_input_byte,  \\\n\t  bytes_in_buffer = datasrc->bytes_in_buffer )\n\n/* Internal macro for INPUT_BYTE and INPUT_2BYTES: make a byte available.\n * Note we do *not* do INPUT_SYNC before calling fill_input_buffer,\n * but we must reload the local copies after a successful fill.\n */\n#define MAKE_BYTE_AVAIL(cinfo,action)  \\\n\tif (bytes_in_buffer == 0) {  \\\n\t  if (! (*datasrc->fill_input_buffer) (cinfo))  \\\n\t    { action; }  \\\n\t  INPUT_RELOAD(cinfo);  \\\n\t}\n\n/* Read a byte into variable V.\n * If must suspend, take the specified action (typically \"return FALSE\").\n */\n#define INPUT_BYTE(cinfo,V,action)  \\\n\tMAKESTMT( MAKE_BYTE_AVAIL(cinfo,action); \\\n\t\t  bytes_in_buffer--; \\\n\t\t  V = GETJOCTET(*next_input_byte++); )\n\n/* As above, but read two bytes interpreted as an unsigned 16-bit integer.\n * V should be declared unsigned int or perhaps INT32.\n */\n#define INPUT_2BYTES(cinfo,V,action)  \\\n\tMAKESTMT( MAKE_BYTE_AVAIL(cinfo,action); \\\n\t\t  bytes_in_buffer--; \\\n\t\t  V = ((unsigned int) GETJOCTET(*next_input_byte++)) << 8; \\\n\t\t  MAKE_BYTE_AVAIL(cinfo,action); \\\n\t\t  bytes_in_buffer--; \\\n\t\t  V += GETJOCTET(*next_input_byte++); )\n\n\n/*\n * Routines to process JPEG markers.\n *\n * Entry condition: JPEG marker itself has been read and its code saved\n *   in cinfo->unread_marker; input restart point is just after the marker.\n *\n * Exit: if return TRUE, have read and processed any parameters, and have\n *   updated the restart point to point after the parameters.\n *   If return FALSE, was forced to suspend before reaching end of\n *   marker parameters; restart point has not been moved.  Same routine\n *   will be called again after application supplies more input data.\n *\n * This approach to suspension assumes that all of a marker's parameters\n * can fit into a single input bufferload.  This should hold for \"normal\"\n * markers.  Some COM/APPn markers might have large parameter segments\n * that might not fit.  If we are simply dropping such a marker, we use\n * skip_input_data to get past it, and thereby put the problem on the\n * source manager's shoulders.  If we are saving the marker's contents\n * into memory, we use a slightly different convention: when forced to\n * suspend, the marker processor updates the restart point to the end of\n * what it's consumed (ie, the end of the buffer) before returning FALSE.\n * On resumption, cinfo->unread_marker still contains the marker code,\n * but the data source will point to the next chunk of marker data.\n * The marker processor must retain internal state to deal with this.\n *\n * Note that we don't bother to avoid duplicate trace messages if a\n * suspension occurs within marker parameters.  Other side effects\n * require more care.\n */\n\n\nLOCAL(boolean)\nget_soi (j_decompress_ptr cinfo)\n/* Process an SOI marker */\n{\n  int i;\n  \n  TRACEMS(cinfo, 1, JTRC_SOI);\n\n  if (cinfo->marker->saw_SOI)\n    ERREXIT(cinfo, JERR_SOI_DUPLICATE);\n\n  /* Reset all parameters that are defined to be reset by SOI */\n\n  for (i = 0; i < NUM_ARITH_TBLS; i++) {\n    cinfo->arith_dc_L[i] = 0;\n    cinfo->arith_dc_U[i] = 1;\n    cinfo->arith_ac_K[i] = 5;\n  }\n  cinfo->restart_interval = 0;\n\n  /* Set initial assumptions for colorspace etc */\n\n  cinfo->jpeg_color_space = JCS_UNKNOWN;\n  cinfo->CCIR601_sampling = FALSE; /* Assume non-CCIR sampling??? */\n\n  cinfo->saw_JFIF_marker = FALSE;\n  cinfo->JFIF_major_version = 1; /* set default JFIF APP0 values */\n  cinfo->JFIF_minor_version = 1;\n  cinfo->density_unit = 0;\n  cinfo->X_density = 1;\n  cinfo->Y_density = 1;\n  cinfo->saw_Adobe_marker = FALSE;\n  cinfo->Adobe_transform = 0;\n\n  cinfo->marker->saw_SOI = TRUE;\n\n  return TRUE;\n}\n\n\nLOCAL(boolean)\nget_sof (j_decompress_ptr cinfo, boolean is_prog, boolean is_arith)\n/* Process a SOFn marker */\n{\n  INT32 length;\n  int c, ci;\n  jpeg_component_info * compptr;\n  INPUT_VARS(cinfo);\n\n  cinfo->progressive_mode = is_prog;\n  cinfo->arith_code = is_arith;\n\n  INPUT_2BYTES(cinfo, length, return FALSE);\n\n  INPUT_BYTE(cinfo, cinfo->data_precision, return FALSE);\n  INPUT_2BYTES(cinfo, cinfo->image_height, return FALSE);\n  INPUT_2BYTES(cinfo, cinfo->image_width, return FALSE);\n  INPUT_BYTE(cinfo, cinfo->num_components, return FALSE);\n\n  length -= 8;\n\n  TRACEMS4(cinfo, 1, JTRC_SOF, cinfo->unread_marker,\n\t   (int) cinfo->image_width, (int) cinfo->image_height,\n\t   cinfo->num_components);\n\n  if (cinfo->marker->saw_SOF)\n    ERREXIT(cinfo, JERR_SOF_DUPLICATE);\n\n  /* We don't support files in which the image height is initially specified */\n  /* as 0 and is later redefined by DNL.  As long as we have to check that,  */\n  /* might as well have a general sanity check. */\n  if (cinfo->image_height <= 0 || cinfo->image_width <= 0\n      || cinfo->num_components <= 0)\n    ERREXIT(cinfo, JERR_EMPTY_IMAGE);\n\n  if (length != (cinfo->num_components * 3))\n    ERREXIT(cinfo, JERR_BAD_LENGTH);\n\n  if (cinfo->comp_info == NULL)\t/* do only once, even if suspend */\n    cinfo->comp_info = (jpeg_component_info *) (*cinfo->mem->alloc_small)\n\t\t\t((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t cinfo->num_components * SIZEOF(jpeg_component_info));\n  \n  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n       ci++, compptr++) {\n    compptr->component_index = ci;\n    INPUT_BYTE(cinfo, compptr->component_id, return FALSE);\n    INPUT_BYTE(cinfo, c, return FALSE);\n    compptr->h_samp_factor = (c >> 4) & 15;\n    compptr->v_samp_factor = (c     ) & 15;\n    INPUT_BYTE(cinfo, compptr->quant_tbl_no, return FALSE);\n\n    TRACEMS4(cinfo, 1, JTRC_SOF_COMPONENT,\n\t     compptr->component_id, compptr->h_samp_factor,\n\t     compptr->v_samp_factor, compptr->quant_tbl_no);\n  }\n\n  cinfo->marker->saw_SOF = TRUE;\n\n  INPUT_SYNC(cinfo);\n  return TRUE;\n}\n\n\nLOCAL(boolean)\nget_sos (j_decompress_ptr cinfo)\n/* Process a SOS marker */\n{\n  INT32 length;\n  int i, ci, n, c, cc;\n  jpeg_component_info * compptr;\n  INPUT_VARS(cinfo);\n\n  if (! cinfo->marker->saw_SOF)\n    ERREXIT(cinfo, JERR_SOS_NO_SOF);\n\n  INPUT_2BYTES(cinfo, length, return FALSE);\n\n  INPUT_BYTE(cinfo, n, return FALSE); /* Number of components */\n\n  TRACEMS1(cinfo, 1, JTRC_SOS, n);\n\n  if (length != (n * 2 + 6) || n < 1 || n > MAX_COMPS_IN_SCAN)\n    ERREXIT(cinfo, JERR_BAD_LENGTH);\n\n  cinfo->comps_in_scan = n;\n\n  /* Collect the component-spec parameters */\n\n  for (i = 0; i < n; i++) {\n    INPUT_BYTE(cinfo, cc, return FALSE);\n    INPUT_BYTE(cinfo, c, return FALSE);\n    \n    for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n\t ci++, compptr++) {\n      if (cc == compptr->component_id)\n\tgoto id_found;\n    }\n\n    ERREXIT1(cinfo, JERR_BAD_COMPONENT_ID, cc);\n\n  id_found:\n\n    cinfo->cur_comp_info[i] = compptr;\n    compptr->dc_tbl_no = (c >> 4) & 15;\n    compptr->ac_tbl_no = (c     ) & 15;\n    \n    TRACEMS3(cinfo, 1, JTRC_SOS_COMPONENT, cc,\n\t     compptr->dc_tbl_no, compptr->ac_tbl_no);\n  }\n\n  /* Collect the additional scan parameters Ss, Se, Ah/Al. */\n  INPUT_BYTE(cinfo, c, return FALSE);\n  cinfo->Ss = c;\n  INPUT_BYTE(cinfo, c, return FALSE);\n  cinfo->Se = c;\n  INPUT_BYTE(cinfo, c, return FALSE);\n  cinfo->Ah = (c >> 4) & 15;\n  cinfo->Al = (c     ) & 15;\n\n  TRACEMS4(cinfo, 1, JTRC_SOS_PARAMS, cinfo->Ss, cinfo->Se,\n\t   cinfo->Ah, cinfo->Al);\n\n  /* Prepare to scan data & restart markers */\n  cinfo->marker->next_restart_num = 0;\n\n  /* Count another SOS marker */\n  cinfo->input_scan_number++;\n\n  INPUT_SYNC(cinfo);\n  return TRUE;\n}\n\n\n#ifdef D_ARITH_CODING_SUPPORTED\n\nLOCAL(boolean)\nget_dac (j_decompress_ptr cinfo)\n/* Process a DAC marker */\n{\n  INT32 length;\n  int index, val;\n  INPUT_VARS(cinfo);\n\n  INPUT_2BYTES(cinfo, length, return FALSE);\n  length -= 2;\n  \n  while (length > 0) {\n    INPUT_BYTE(cinfo, index, return FALSE);\n    INPUT_BYTE(cinfo, val, return FALSE);\n\n    length -= 2;\n\n    TRACEMS2(cinfo, 1, JTRC_DAC, index, val);\n\n    if (index < 0 || index >= (2*NUM_ARITH_TBLS))\n      ERREXIT1(cinfo, JERR_DAC_INDEX, index);\n\n    if (index >= NUM_ARITH_TBLS) { /* define AC table */\n      cinfo->arith_ac_K[index-NUM_ARITH_TBLS] = (UINT8) val;\n    } else {\t\t\t/* define DC table */\n      cinfo->arith_dc_L[index] = (UINT8) (val & 0x0F);\n      cinfo->arith_dc_U[index] = (UINT8) (val >> 4);\n      if (cinfo->arith_dc_L[index] > cinfo->arith_dc_U[index])\n\tERREXIT1(cinfo, JERR_DAC_VALUE, val);\n    }\n  }\n\n  if (length != 0)\n    ERREXIT(cinfo, JERR_BAD_LENGTH);\n\n  INPUT_SYNC(cinfo);\n  return TRUE;\n}\n\n#else /* ! D_ARITH_CODING_SUPPORTED */\n\n#define get_dac(cinfo)  skip_variable(cinfo)\n\n#endif /* D_ARITH_CODING_SUPPORTED */\n\n\nLOCAL(boolean)\nget_dht (j_decompress_ptr cinfo)\n/* Process a DHT marker */\n{\n  INT32 length;\n  UINT8 bits[17];\n  UINT8 huffval[256];\n  int i, index, count;\n  JHUFF_TBL **htblptr;\n  INPUT_VARS(cinfo);\n\n  INPUT_2BYTES(cinfo, length, return FALSE);\n  length -= 2;\n  \n  while (length > 16) {\n    INPUT_BYTE(cinfo, index, return FALSE);\n\n    TRACEMS1(cinfo, 1, JTRC_DHT, index);\n      \n    bits[0] = 0;\n    count = 0;\n    for (i = 1; i <= 16; i++) {\n      INPUT_BYTE(cinfo, bits[i], return FALSE);\n      count += bits[i];\n    }\n\n    length -= 1 + 16;\n\n    TRACEMS8(cinfo, 2, JTRC_HUFFBITS,\n\t     bits[1], bits[2], bits[3], bits[4],\n\t     bits[5], bits[6], bits[7], bits[8]);\n    TRACEMS8(cinfo, 2, JTRC_HUFFBITS,\n\t     bits[9], bits[10], bits[11], bits[12],\n\t     bits[13], bits[14], bits[15], bits[16]);\n\n    /* Here we just do minimal validation of the counts to avoid walking\n     * off the end of our table space.  jdhuff.c will check more carefully.\n     */\n    if (count > 256 || ((INT32) count) > length)\n      ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);\n\n    for (i = 0; i < count; i++)\n      INPUT_BYTE(cinfo, huffval[i], return FALSE);\n\n    length -= count;\n\n    if (index & 0x10) {\t\t/* AC table definition */\n      index -= 0x10;\n      htblptr = &cinfo->ac_huff_tbl_ptrs[index];\n    } else {\t\t\t/* DC table definition */\n      htblptr = &cinfo->dc_huff_tbl_ptrs[index];\n    }\n\n    if (index < 0 || index >= NUM_HUFF_TBLS)\n      ERREXIT1(cinfo, JERR_DHT_INDEX, index);\n\n    if (*htblptr == NULL)\n      *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo);\n  \n    MEMCOPY((*htblptr)->bits, bits, SIZEOF((*htblptr)->bits));\n    MEMCOPY((*htblptr)->huffval, huffval, SIZEOF((*htblptr)->huffval));\n  }\n\n  if (length != 0)\n    ERREXIT(cinfo, JERR_BAD_LENGTH);\n\n  INPUT_SYNC(cinfo);\n  return TRUE;\n}\n\n\nLOCAL(boolean)\nget_dqt (j_decompress_ptr cinfo)\n/* Process a DQT marker */\n{\n  INT32 length;\n  int n, i, prec;\n  unsigned int tmp;\n  JQUANT_TBL *quant_ptr;\n  INPUT_VARS(cinfo);\n\n  INPUT_2BYTES(cinfo, length, return FALSE);\n  length -= 2;\n\n  while (length > 0) {\n    INPUT_BYTE(cinfo, n, return FALSE);\n    prec = n >> 4;\n    n &= 0x0F;\n\n    TRACEMS2(cinfo, 1, JTRC_DQT, n, prec);\n\n    if (n >= NUM_QUANT_TBLS)\n      ERREXIT1(cinfo, JERR_DQT_INDEX, n);\n      \n    if (cinfo->quant_tbl_ptrs[n] == NULL)\n      cinfo->quant_tbl_ptrs[n] = jpeg_alloc_quant_table((j_common_ptr) cinfo);\n    quant_ptr = cinfo->quant_tbl_ptrs[n];\n\n    for (i = 0; i < DCTSIZE2; i++) {\n      if (prec)\n\tINPUT_2BYTES(cinfo, tmp, return FALSE);\n      else\n\tINPUT_BYTE(cinfo, tmp, return FALSE);\n      /* We convert the zigzag-order table to natural array order. */\n      quant_ptr->quantval[jpeg_natural_order[i]] = (UINT16) tmp;\n    }\n\n    if (cinfo->err->trace_level >= 2) {\n      for (i = 0; i < DCTSIZE2; i += 8) {\n\tTRACEMS8(cinfo, 2, JTRC_QUANTVALS,\n\t\t quant_ptr->quantval[i],   quant_ptr->quantval[i+1],\n\t\t quant_ptr->quantval[i+2], quant_ptr->quantval[i+3],\n\t\t quant_ptr->quantval[i+4], quant_ptr->quantval[i+5],\n\t\t quant_ptr->quantval[i+6], quant_ptr->quantval[i+7]);\n      }\n    }\n\n    length -= DCTSIZE2+1;\n    if (prec) length -= DCTSIZE2;\n  }\n\n  if (length != 0)\n    ERREXIT(cinfo, JERR_BAD_LENGTH);\n\n  INPUT_SYNC(cinfo);\n  return TRUE;\n}\n\n\nLOCAL(boolean)\nget_dri (j_decompress_ptr cinfo)\n/* Process a DRI marker */\n{\n  INT32 length;\n  unsigned int tmp;\n  INPUT_VARS(cinfo);\n\n  INPUT_2BYTES(cinfo, length, return FALSE);\n  \n  if (length != 4)\n    ERREXIT(cinfo, JERR_BAD_LENGTH);\n\n  INPUT_2BYTES(cinfo, tmp, return FALSE);\n\n  TRACEMS1(cinfo, 1, JTRC_DRI, tmp);\n\n  cinfo->restart_interval = tmp;\n\n  INPUT_SYNC(cinfo);\n  return TRUE;\n}\n\n\n/*\n * Routines for processing APPn and COM markers.\n * These are either saved in memory or discarded, per application request.\n * APP0 and APP14 are specially checked to see if they are\n * JFIF and Adobe markers, respectively.\n */\n\n#define APP0_DATA_LEN\t14\t/* Length of interesting data in APP0 */\n#define APP14_DATA_LEN\t12\t/* Length of interesting data in APP14 */\n#define APPN_DATA_LEN\t14\t/* Must be the largest of the above!! */\n\n\nLOCAL(void)\nexamine_app0 (j_decompress_ptr cinfo, JOCTET FAR * data,\n\t      unsigned int datalen, INT32 remaining)\n/* Examine first few bytes from an APP0.\n * Take appropriate action if it is a JFIF marker.\n * datalen is # of bytes at data[], remaining is length of rest of marker data.\n */\n{\n  INT32 totallen = (INT32) datalen + remaining;\n\n  if (datalen >= APP0_DATA_LEN &&\n      GETJOCTET(data[0]) == 0x4A &&\n      GETJOCTET(data[1]) == 0x46 &&\n      GETJOCTET(data[2]) == 0x49 &&\n      GETJOCTET(data[3]) == 0x46 &&\n      GETJOCTET(data[4]) == 0) {\n    /* Found JFIF APP0 marker: save info */\n    cinfo->saw_JFIF_marker = TRUE;\n    cinfo->JFIF_major_version = GETJOCTET(data[5]);\n    cinfo->JFIF_minor_version = GETJOCTET(data[6]);\n    cinfo->density_unit = GETJOCTET(data[7]);\n    cinfo->X_density = (GETJOCTET(data[8]) << 8) + GETJOCTET(data[9]);\n    cinfo->Y_density = (GETJOCTET(data[10]) << 8) + GETJOCTET(data[11]);\n    /* Check version.\n     * Major version must be 1, anything else signals an incompatible change.\n     * (We used to treat this as an error, but now it's a nonfatal warning,\n     * because some bozo at Hijaak couldn't read the spec.)\n     * Minor version should be 0..2, but process anyway if newer.\n     */\n    if (cinfo->JFIF_major_version != 1)\n      WARNMS2(cinfo, JWRN_JFIF_MAJOR,\n\t      cinfo->JFIF_major_version, cinfo->JFIF_minor_version);\n    /* Generate trace messages */\n    TRACEMS5(cinfo, 1, JTRC_JFIF,\n\t     cinfo->JFIF_major_version, cinfo->JFIF_minor_version,\n\t     cinfo->X_density, cinfo->Y_density, cinfo->density_unit);\n    /* Validate thumbnail dimensions and issue appropriate messages */\n    if (GETJOCTET(data[12]) | GETJOCTET(data[13]))\n      TRACEMS2(cinfo, 1, JTRC_JFIF_THUMBNAIL,\n\t       GETJOCTET(data[12]), GETJOCTET(data[13]));\n    totallen -= APP0_DATA_LEN;\n    if (totallen !=\n\t((INT32)GETJOCTET(data[12]) * (INT32)GETJOCTET(data[13]) * (INT32) 3))\n      TRACEMS1(cinfo, 1, JTRC_JFIF_BADTHUMBNAILSIZE, (int) totallen);\n  } else if (datalen >= 6 &&\n      GETJOCTET(data[0]) == 0x4A &&\n      GETJOCTET(data[1]) == 0x46 &&\n      GETJOCTET(data[2]) == 0x58 &&\n      GETJOCTET(data[3]) == 0x58 &&\n      GETJOCTET(data[4]) == 0) {\n    /* Found JFIF \"JFXX\" extension APP0 marker */\n    /* The library doesn't actually do anything with these,\n     * but we try to produce a helpful trace message.\n     */\n    switch (GETJOCTET(data[5])) {\n    case 0x10:\n      TRACEMS1(cinfo, 1, JTRC_THUMB_JPEG, (int) totallen);\n      break;\n    case 0x11:\n      TRACEMS1(cinfo, 1, JTRC_THUMB_PALETTE, (int) totallen);\n      break;\n    case 0x13:\n      TRACEMS1(cinfo, 1, JTRC_THUMB_RGB, (int) totallen);\n      break;\n    default:\n      TRACEMS2(cinfo, 1, JTRC_JFIF_EXTENSION,\n\t       GETJOCTET(data[5]), (int) totallen);\n      break;\n    }\n  } else {\n    /* Start of APP0 does not match \"JFIF\" or \"JFXX\", or too short */\n    TRACEMS1(cinfo, 1, JTRC_APP0, (int) totallen);\n  }\n}\n\n\nLOCAL(void)\nexamine_app14 (j_decompress_ptr cinfo, JOCTET FAR * data,\n\t       unsigned int datalen, INT32 remaining)\n/* Examine first few bytes from an APP14.\n * Take appropriate action if it is an Adobe marker.\n * datalen is # of bytes at data[], remaining is length of rest of marker data.\n */\n{\n  unsigned int version, flags0, flags1, transform;\n\n  if (datalen >= APP14_DATA_LEN &&\n      GETJOCTET(data[0]) == 0x41 &&\n      GETJOCTET(data[1]) == 0x64 &&\n      GETJOCTET(data[2]) == 0x6F &&\n      GETJOCTET(data[3]) == 0x62 &&\n      GETJOCTET(data[4]) == 0x65) {\n    /* Found Adobe APP14 marker */\n    version = (GETJOCTET(data[5]) << 8) + GETJOCTET(data[6]);\n    flags0 = (GETJOCTET(data[7]) << 8) + GETJOCTET(data[8]);\n    flags1 = (GETJOCTET(data[9]) << 8) + GETJOCTET(data[10]);\n    transform = GETJOCTET(data[11]);\n    TRACEMS4(cinfo, 1, JTRC_ADOBE, version, flags0, flags1, transform);\n    cinfo->saw_Adobe_marker = TRUE;\n    cinfo->Adobe_transform = (UINT8) transform;\n  } else {\n    /* Start of APP14 does not match \"Adobe\", or too short */\n    TRACEMS1(cinfo, 1, JTRC_APP14, (int) (datalen + remaining));\n  }\n}\n\n\nMETHODDEF(boolean)\nget_interesting_appn (j_decompress_ptr cinfo)\n/* Process an APP0 or APP14 marker without saving it */\n{\n  INT32 length;\n  JOCTET b[APPN_DATA_LEN];\n  unsigned int i, numtoread;\n  INPUT_VARS(cinfo);\n\n  INPUT_2BYTES(cinfo, length, return FALSE);\n  length -= 2;\n\n  /* get the interesting part of the marker data */\n  if (length >= APPN_DATA_LEN)\n    numtoread = APPN_DATA_LEN;\n  else if (length > 0)\n    numtoread = (unsigned int) length;\n  else\n    numtoread = 0;\n  for (i = 0; i < numtoread; i++)\n    INPUT_BYTE(cinfo, b[i], return FALSE);\n  length -= numtoread;\n\n  /* process it */\n  switch (cinfo->unread_marker) {\n  case M_APP0:\n    examine_app0(cinfo, (JOCTET FAR *) b, numtoread, length);\n    break;\n  case M_APP14:\n    examine_app14(cinfo, (JOCTET FAR *) b, numtoread, length);\n    break;\n  default:\n    /* can't get here unless jpeg_save_markers chooses wrong processor */\n    ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, cinfo->unread_marker);\n    break;\n  }\n\n  /* skip any remaining data -- could be lots */\n  INPUT_SYNC(cinfo);\n  if (length > 0)\n    (*cinfo->src->skip_input_data) (cinfo, (long) length);\n\n  return TRUE;\n}\n\n\n#ifdef SAVE_MARKERS_SUPPORTED\n\nMETHODDEF(boolean)\nsave_marker (j_decompress_ptr cinfo)\n/* Save an APPn or COM marker into the marker list */\n{\n  my_marker_ptr marker = (my_marker_ptr) cinfo->marker;\n  jpeg_saved_marker_ptr cur_marker = marker->cur_marker;\n  unsigned int bytes_read, data_length;\n  JOCTET FAR * data;\n  INT32 length = 0;\n  INPUT_VARS(cinfo);\n\n  if (cur_marker == NULL) {\n    /* begin reading a marker */\n    INPUT_2BYTES(cinfo, length, return FALSE);\n    length -= 2;\n    if (length >= 0) {\t\t/* watch out for bogus length word */\n      /* figure out how much we want to save */\n      unsigned int limit;\n      if (cinfo->unread_marker == (int) M_COM)\n\tlimit = marker->length_limit_COM;\n      else\n\tlimit = marker->length_limit_APPn[cinfo->unread_marker - (int) M_APP0];\n      if ((unsigned int) length < limit)\n\tlimit = (unsigned int) length;\n      /* allocate and initialize the marker item */\n      cur_marker = (jpeg_saved_marker_ptr)\n\t(*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\t    SIZEOF(struct jpeg_marker_struct) + limit);\n      cur_marker->next = NULL;\n      cur_marker->marker = (UINT8) cinfo->unread_marker;\n      cur_marker->original_length = (unsigned int) length;\n      cur_marker->data_length = limit;\n      /* data area is just beyond the jpeg_marker_struct */\n      data = cur_marker->data = (JOCTET FAR *) (cur_marker + 1);\n      marker->cur_marker = cur_marker;\n      marker->bytes_read = 0;\n      bytes_read = 0;\n      data_length = limit;\n    } else {\n      /* deal with bogus length word */\n      bytes_read = data_length = 0;\n      data = NULL;\n    }\n  } else {\n    /* resume reading a marker */\n    bytes_read = marker->bytes_read;\n    data_length = cur_marker->data_length;\n    data = cur_marker->data + bytes_read;\n  }\n\n  while (bytes_read < data_length) {\n    INPUT_SYNC(cinfo);\t\t/* move the restart point to here */\n    marker->bytes_read = bytes_read;\n    /* If there's not at least one byte in buffer, suspend */\n    MAKE_BYTE_AVAIL(cinfo, return FALSE);\n    /* Copy bytes with reasonable rapidity */\n    while (bytes_read < data_length && bytes_in_buffer > 0) {\n      *data++ = *next_input_byte++;\n      bytes_in_buffer--;\n      bytes_read++;\n    }\n  }\n\n  /* Done reading what we want to read */\n  if (cur_marker != NULL) {\t/* will be NULL if bogus length word */\n    /* Add new marker to end of list */\n    if (cinfo->marker_list == NULL) {\n      cinfo->marker_list = cur_marker;\n    } else {\n      jpeg_saved_marker_ptr prev = cinfo->marker_list;\n      while (prev->next != NULL)\n\tprev = prev->next;\n      prev->next = cur_marker;\n    }\n    /* Reset pointer & calc remaining data length */\n    data = cur_marker->data;\n    length = cur_marker->original_length - data_length;\n  }\n  /* Reset to initial state for next marker */\n  marker->cur_marker = NULL;\n\n  /* Process the marker if interesting; else just make a generic trace msg */\n  switch (cinfo->unread_marker) {\n  case M_APP0:\n    examine_app0(cinfo, data, data_length, length);\n    break;\n  case M_APP14:\n    examine_app14(cinfo, data, data_length, length);\n    break;\n  default:\n    TRACEMS2(cinfo, 1, JTRC_MISC_MARKER, cinfo->unread_marker,\n\t     (int) (data_length + length));\n    break;\n  }\n\n  /* skip any remaining data -- could be lots */\n  INPUT_SYNC(cinfo);\t\t/* do before skip_input_data */\n  if (length > 0)\n    (*cinfo->src->skip_input_data) (cinfo, (long) length);\n\n  return TRUE;\n}\n\n#endif /* SAVE_MARKERS_SUPPORTED */\n\n\nMETHODDEF(boolean)\nskip_variable (j_decompress_ptr cinfo)\n/* Skip over an unknown or uninteresting variable-length marker */\n{\n  INT32 length;\n  INPUT_VARS(cinfo);\n\n  INPUT_2BYTES(cinfo, length, return FALSE);\n  length -= 2;\n  \n  TRACEMS2(cinfo, 1, JTRC_MISC_MARKER, cinfo->unread_marker, (int) length);\n\n  INPUT_SYNC(cinfo);\t\t/* do before skip_input_data */\n  if (length > 0)\n    (*cinfo->src->skip_input_data) (cinfo, (long) length);\n\n  return TRUE;\n}\n\n\n/*\n * Find the next JPEG marker, save it in cinfo->unread_marker.\n * Returns FALSE if had to suspend before reaching a marker;\n * in that case cinfo->unread_marker is unchanged.\n *\n * Note that the result might not be a valid marker code,\n * but it will never be 0 or FF.\n */\n\nLOCAL(boolean)\nnext_marker (j_decompress_ptr cinfo)\n{\n  int c;\n  INPUT_VARS(cinfo);\n\n  for (;;) {\n    INPUT_BYTE(cinfo, c, return FALSE);\n    /* Skip any non-FF bytes.\n     * This may look a bit inefficient, but it will not occur in a valid file.\n     * We sync after each discarded byte so that a suspending data source\n     * can discard the byte from its buffer.\n     */\n    while (c != 0xFF) {\n      cinfo->marker->discarded_bytes++;\n      INPUT_SYNC(cinfo);\n      INPUT_BYTE(cinfo, c, return FALSE);\n    }\n    /* This loop swallows any duplicate FF bytes.  Extra FFs are legal as\n     * pad bytes, so don't count them in discarded_bytes.  We assume there\n     * will not be so many consecutive FF bytes as to overflow a suspending\n     * data source's input buffer.\n     */\n    do {\n      INPUT_BYTE(cinfo, c, return FALSE);\n    } while (c == 0xFF);\n    if (c != 0)\n      break;\t\t\t/* found a valid marker, exit loop */\n    /* Reach here if we found a stuffed-zero data sequence (FF/00).\n     * Discard it and loop back to try again.\n     */\n    cinfo->marker->discarded_bytes += 2;\n    INPUT_SYNC(cinfo);\n  }\n\n  if (cinfo->marker->discarded_bytes != 0) {\n    WARNMS2(cinfo, JWRN_EXTRANEOUS_DATA, cinfo->marker->discarded_bytes, c);\n    cinfo->marker->discarded_bytes = 0;\n  }\n\n  cinfo->unread_marker = c;\n\n  INPUT_SYNC(cinfo);\n  return TRUE;\n}\n\n\nLOCAL(boolean)\nfirst_marker (j_decompress_ptr cinfo)\n/* Like next_marker, but used to obtain the initial SOI marker. */\n/* For this marker, we do not allow preceding garbage or fill; otherwise,\n * we might well scan an entire input file before realizing it ain't JPEG.\n * If an application wants to process non-JFIF files, it must seek to the\n * SOI before calling the JPEG library.\n */\n{\n  int c, c2;\n  INPUT_VARS(cinfo);\n\n  INPUT_BYTE(cinfo, c, return FALSE);\n  INPUT_BYTE(cinfo, c2, return FALSE);\n  if (c != 0xFF || c2 != (int) M_SOI)\n    ERREXIT2(cinfo, JERR_NO_SOI, c, c2);\n\n  cinfo->unread_marker = c2;\n\n  INPUT_SYNC(cinfo);\n  return TRUE;\n}\n\n\n/*\n * Read markers until SOS or EOI.\n *\n * Returns same codes as are defined for jpeg_consume_input:\n * JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI.\n */\n\nMETHODDEF(int)\nread_markers (j_decompress_ptr cinfo)\n{\n  /* Outer loop repeats once for each marker. */\n  for (;;) {\n    /* Collect the marker proper, unless we already did. */\n    /* NB: first_marker() enforces the requirement that SOI appear first. */\n    if (cinfo->unread_marker == 0) {\n      if (! cinfo->marker->saw_SOI) {\n\tif (! first_marker(cinfo))\n\t  return JPEG_SUSPENDED;\n      } else {\n\tif (! next_marker(cinfo))\n\t  return JPEG_SUSPENDED;\n      }\n    }\n    /* At this point cinfo->unread_marker contains the marker code and the\n     * input point is just past the marker proper, but before any parameters.\n     * A suspension will cause us to return with this state still true.\n     */\n    switch (cinfo->unread_marker) {\n    case M_SOI:\n      if (! get_soi(cinfo))\n\treturn JPEG_SUSPENDED;\n      break;\n\n    case M_SOF0:\t\t/* Baseline */\n    case M_SOF1:\t\t/* Extended sequential, Huffman */\n      if (! get_sof(cinfo, FALSE, FALSE))\n\treturn JPEG_SUSPENDED;\n      break;\n\n    case M_SOF2:\t\t/* Progressive, Huffman */\n      if (! get_sof(cinfo, TRUE, FALSE))\n\treturn JPEG_SUSPENDED;\n      break;\n\n    case M_SOF9:\t\t/* Extended sequential, arithmetic */\n      if (! get_sof(cinfo, FALSE, TRUE))\n\treturn JPEG_SUSPENDED;\n      break;\n\n    case M_SOF10:\t\t/* Progressive, arithmetic */\n      if (! get_sof(cinfo, TRUE, TRUE))\n\treturn JPEG_SUSPENDED;\n      break;\n\n    /* Currently unsupported SOFn types */\n    case M_SOF3:\t\t/* Lossless, Huffman */\n    case M_SOF5:\t\t/* Differential sequential, Huffman */\n    case M_SOF6:\t\t/* Differential progressive, Huffman */\n    case M_SOF7:\t\t/* Differential lossless, Huffman */\n    case M_JPG:\t\t\t/* Reserved for JPEG extensions */\n    case M_SOF11:\t\t/* Lossless, arithmetic */\n    case M_SOF13:\t\t/* Differential sequential, arithmetic */\n    case M_SOF14:\t\t/* Differential progressive, arithmetic */\n    case M_SOF15:\t\t/* Differential lossless, arithmetic */\n      ERREXIT1(cinfo, JERR_SOF_UNSUPPORTED, cinfo->unread_marker);\n      break;\n\n    case M_SOS:\n      if (! get_sos(cinfo))\n\treturn JPEG_SUSPENDED;\n      cinfo->unread_marker = 0;\t/* processed the marker */\n      return JPEG_REACHED_SOS;\n    \n    case M_EOI:\n      TRACEMS(cinfo, 1, JTRC_EOI);\n      cinfo->unread_marker = 0;\t/* processed the marker */\n      return JPEG_REACHED_EOI;\n      \n    case M_DAC:\n      if (! get_dac(cinfo))\n\treturn JPEG_SUSPENDED;\n      break;\n      \n    case M_DHT:\n      if (! get_dht(cinfo))\n\treturn JPEG_SUSPENDED;\n      break;\n      \n    case M_DQT:\n      if (! get_dqt(cinfo))\n\treturn JPEG_SUSPENDED;\n      break;\n      \n    case M_DRI:\n      if (! get_dri(cinfo))\n\treturn JPEG_SUSPENDED;\n      break;\n      \n    case M_APP0:\n    case M_APP1:\n    case M_APP2:\n    case M_APP3:\n    case M_APP4:\n    case M_APP5:\n    case M_APP6:\n    case M_APP7:\n    case M_APP8:\n    case M_APP9:\n    case M_APP10:\n    case M_APP11:\n    case M_APP12:\n    case M_APP13:\n    case M_APP14:\n    case M_APP15:\n      if (! (*((my_marker_ptr) cinfo->marker)->process_APPn[\n\t\tcinfo->unread_marker - (int) M_APP0]) (cinfo))\n\treturn JPEG_SUSPENDED;\n      break;\n      \n    case M_COM:\n      if (! (*((my_marker_ptr) cinfo->marker)->process_COM) (cinfo))\n\treturn JPEG_SUSPENDED;\n      break;\n\n    case M_RST0:\t\t/* these are all parameterless */\n    case M_RST1:\n    case M_RST2:\n    case M_RST3:\n    case M_RST4:\n    case M_RST5:\n    case M_RST6:\n    case M_RST7:\n    case M_TEM:\n      TRACEMS1(cinfo, 1, JTRC_PARMLESS_MARKER, cinfo->unread_marker);\n      break;\n\n    case M_DNL:\t\t\t/* Ignore DNL ... perhaps the wrong thing */\n      if (! skip_variable(cinfo))\n\treturn JPEG_SUSPENDED;\n      break;\n\n    default:\t\t\t/* must be DHP, EXP, JPGn, or RESn */\n      /* For now, we treat the reserved markers as fatal errors since they are\n       * likely to be used to signal incompatible JPEG Part 3 extensions.\n       * Once the JPEG 3 version-number marker is well defined, this code\n       * ought to change!\n       */\n      ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, cinfo->unread_marker);\n      break;\n    }\n    /* Successfully processed marker, so reset state variable */\n    cinfo->unread_marker = 0;\n  } /* end loop */\n}\n\n\n/*\n * Read a restart marker, which is expected to appear next in the datastream;\n * if the marker is not there, take appropriate recovery action.\n * Returns FALSE if suspension is required.\n *\n * This is called by the entropy decoder after it has read an appropriate\n * number of MCUs.  cinfo->unread_marker may be nonzero if the entropy decoder\n * has already read a marker from the data source.  Under normal conditions\n * cinfo->unread_marker will be reset to 0 before returning; if not reset,\n * it holds a marker which the decoder will be unable to read past.\n */\n\nMETHODDEF(boolean)\nread_restart_marker (j_decompress_ptr cinfo)\n{\n  /* Obtain a marker unless we already did. */\n  /* Note that next_marker will complain if it skips any data. */\n  if (cinfo->unread_marker == 0) {\n    if (! next_marker(cinfo))\n      return FALSE;\n  }\n\n  if (cinfo->unread_marker ==\n      ((int) M_RST0 + cinfo->marker->next_restart_num)) {\n    /* Normal case --- swallow the marker and let entropy decoder continue */\n    TRACEMS1(cinfo, 3, JTRC_RST, cinfo->marker->next_restart_num);\n    cinfo->unread_marker = 0;\n  } else {\n    /* Uh-oh, the restart markers have been messed up. */\n    /* Let the data source manager determine how to resync. */\n    if (! (*cinfo->src->resync_to_restart) (cinfo,\n\t\t\t\t\t    cinfo->marker->next_restart_num))\n      return FALSE;\n  }\n\n  /* Update next-restart state */\n  cinfo->marker->next_restart_num = (cinfo->marker->next_restart_num + 1) & 7;\n\n  return TRUE;\n}\n\n\n/*\n * This is the default resync_to_restart method for data source managers\n * to use if they don't have any better approach.  Some data source managers\n * may be able to back up, or may have additional knowledge about the data\n * which permits a more intelligent recovery strategy; such managers would\n * presumably supply their own resync method.\n *\n * read_restart_marker calls resync_to_restart if it finds a marker other than\n * the restart marker it was expecting.  (This code is *not* used unless\n * a nonzero restart interval has been declared.)  cinfo->unread_marker is\n * the marker code actually found (might be anything, except 0 or FF).\n * The desired restart marker number (0..7) is passed as a parameter.\n * This routine is supposed to apply whatever error recovery strategy seems\n * appropriate in order to position the input stream to the next data segment.\n * Note that cinfo->unread_marker is treated as a marker appearing before\n * the current data-source input point; usually it should be reset to zero\n * before returning.\n * Returns FALSE if suspension is required.\n *\n * This implementation is substantially constrained by wanting to treat the\n * input as a data stream; this means we can't back up.  Therefore, we have\n * only the following actions to work with:\n *   1. Simply discard the marker and let the entropy decoder resume at next\n *      byte of file.\n *   2. Read forward until we find another marker, discarding intervening\n *      data.  (In theory we could look ahead within the current bufferload,\n *      without having to discard data if we don't find the desired marker.\n *      This idea is not implemented here, in part because it makes behavior\n *      dependent on buffer size and chance buffer-boundary positions.)\n *   3. Leave the marker unread (by failing to zero cinfo->unread_marker).\n *      This will cause the entropy decoder to process an empty data segment,\n *      inserting dummy zeroes, and then we will reprocess the marker.\n *\n * #2 is appropriate if we think the desired marker lies ahead, while #3 is\n * appropriate if the found marker is a future restart marker (indicating\n * that we have missed the desired restart marker, probably because it got\n * corrupted).\n * We apply #2 or #3 if the found marker is a restart marker no more than\n * two counts behind or ahead of the expected one.  We also apply #2 if the\n * found marker is not a legal JPEG marker code (it's certainly bogus data).\n * If the found marker is a restart marker more than 2 counts away, we do #1\n * (too much risk that the marker is erroneous; with luck we will be able to\n * resync at some future point).\n * For any valid non-restart JPEG marker, we apply #3.  This keeps us from\n * overrunning the end of a scan.  An implementation limited to single-scan\n * files might find it better to apply #2 for markers other than EOI, since\n * any other marker would have to be bogus data in that case.\n */\n\nGLOBAL(boolean)\njpeg_resync_to_restart (j_decompress_ptr cinfo, int desired)\n{\n  int marker = cinfo->unread_marker;\n  int action = 1;\n  \n  /* Always put up a warning. */\n  WARNMS2(cinfo, JWRN_MUST_RESYNC, marker, desired);\n  \n  /* Outer loop handles repeated decision after scanning forward. */\n  for (;;) {\n    if (marker < (int) M_SOF0)\n      action = 2;\t\t/* invalid marker */\n    else if (marker < (int) M_RST0 || marker > (int) M_RST7)\n      action = 3;\t\t/* valid non-restart marker */\n    else {\n      if (marker == ((int) M_RST0 + ((desired+1) & 7)) ||\n\t  marker == ((int) M_RST0 + ((desired+2) & 7)))\n\taction = 3;\t\t/* one of the next two expected restarts */\n      else if (marker == ((int) M_RST0 + ((desired-1) & 7)) ||\n\t       marker == ((int) M_RST0 + ((desired-2) & 7)))\n\taction = 2;\t\t/* a prior restart, so advance */\n      else\n\taction = 1;\t\t/* desired restart or too far away */\n    }\n    TRACEMS2(cinfo, 4, JTRC_RECOVERY_ACTION, marker, action);\n    switch (action) {\n    case 1:\n      /* Discard marker and let entropy decoder resume processing. */\n      cinfo->unread_marker = 0;\n      return TRUE;\n    case 2:\n      /* Scan to the next marker, and repeat the decision loop. */\n      if (! next_marker(cinfo))\n\treturn FALSE;\n      marker = cinfo->unread_marker;\n      break;\n    case 3:\n      /* Return without advancing past this marker. */\n      /* Entropy decoder will be forced to process an empty segment. */\n      return TRUE;\n    }\n  } /* end loop */\n}\n\n\n/*\n * Reset marker processing state to begin a fresh datastream.\n */\n\nMETHODDEF(void)\nreset_marker_reader (j_decompress_ptr cinfo)\n{\n  my_marker_ptr marker = (my_marker_ptr) cinfo->marker;\n\n  cinfo->comp_info = NULL;\t\t/* until allocated by get_sof */\n  cinfo->input_scan_number = 0;\t\t/* no SOS seen yet */\n  cinfo->unread_marker = 0;\t\t/* no pending marker */\n  marker->pub.saw_SOI = FALSE;\t\t/* set internal state too */\n  marker->pub.saw_SOF = FALSE;\n  marker->pub.discarded_bytes = 0;\n  marker->cur_marker = NULL;\n}\n\n\n/*\n * Initialize the marker reader module.\n * This is called only once, when the decompression object is created.\n */\n\nGLOBAL(void)\njinit_marker_reader (j_decompress_ptr cinfo)\n{\n  my_marker_ptr marker;\n  int i;\n\n  /* Create subobject in permanent pool */\n  marker = (my_marker_ptr)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,\n\t\t\t\tSIZEOF(my_marker_reader));\n  cinfo->marker = (struct jpeg_marker_reader *) marker;\n  /* Initialize public method pointers */\n  marker->pub.reset_marker_reader = reset_marker_reader;\n  marker->pub.read_markers = read_markers;\n  marker->pub.read_restart_marker = read_restart_marker;\n  /* Initialize COM/APPn processing.\n   * By default, we examine and then discard APP0 and APP14,\n   * but simply discard COM and all other APPn.\n   */\n  marker->process_COM = skip_variable;\n  marker->length_limit_COM = 0;\n  for (i = 0; i < 16; i++) {\n    marker->process_APPn[i] = skip_variable;\n    marker->length_limit_APPn[i] = 0;\n  }\n  marker->process_APPn[0] = get_interesting_appn;\n  marker->process_APPn[14] = get_interesting_appn;\n  /* Reset marker processing state */\n  reset_marker_reader(cinfo);\n}\n\n\n/*\n * Control saving of COM and APPn markers into marker_list.\n */\n\n#ifdef SAVE_MARKERS_SUPPORTED\n\nGLOBAL(void)\njpeg_save_markers (j_decompress_ptr cinfo, int marker_code,\n\t\t   unsigned int length_limit)\n{\n  my_marker_ptr marker = (my_marker_ptr) cinfo->marker;\n  long maxlength;\n  jpeg_marker_parser_method processor;\n\n  /* Length limit mustn't be larger than what we can allocate\n   * (should only be a concern in a 16-bit environment).\n   */\n  maxlength = cinfo->mem->max_alloc_chunk - SIZEOF(struct jpeg_marker_struct);\n  if (((long) length_limit) > maxlength)\n    length_limit = (unsigned int) maxlength;\n\n  /* Choose processor routine to use.\n   * APP0/APP14 have special requirements.\n   */\n  if (length_limit) {\n    processor = save_marker;\n    /* If saving APP0/APP14, save at least enough for our internal use. */\n    if (marker_code == (int) M_APP0 && length_limit < APP0_DATA_LEN)\n      length_limit = APP0_DATA_LEN;\n    else if (marker_code == (int) M_APP14 && length_limit < APP14_DATA_LEN)\n      length_limit = APP14_DATA_LEN;\n  } else {\n    processor = skip_variable;\n    /* If discarding APP0/APP14, use our regular on-the-fly processor. */\n    if (marker_code == (int) M_APP0 || marker_code == (int) M_APP14)\n      processor = get_interesting_appn;\n  }\n\n  if (marker_code == (int) M_COM) {\n    marker->process_COM = processor;\n    marker->length_limit_COM = length_limit;\n  } else if (marker_code >= (int) M_APP0 && marker_code <= (int) M_APP15) {\n    marker->process_APPn[marker_code - (int) M_APP0] = processor;\n    marker->length_limit_APPn[marker_code - (int) M_APP0] = length_limit;\n  } else\n    ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, marker_code);\n}\n\n#endif /* SAVE_MARKERS_SUPPORTED */\n\n\n/*\n * Install a special processing method for COM or APPn markers.\n */\n\nGLOBAL(void)\njpeg_set_marker_processor (j_decompress_ptr cinfo, int marker_code,\n\t\t\t   jpeg_marker_parser_method routine)\n{\n  my_marker_ptr marker = (my_marker_ptr) cinfo->marker;\n\n  if (marker_code == (int) M_COM)\n    marker->process_COM = routine;\n  else if (marker_code >= (int) M_APP0 && marker_code <= (int) M_APP15)\n    marker->process_APPn[marker_code - (int) M_APP0] = routine;\n  else\n    ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, marker_code);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jdmaster.c",
    "content": "/*\n * jdmaster.c\n *\n * Copyright (C) 1991-1997, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains master control logic for the JPEG decompressor.\n * These routines are concerned with selecting the modules to be executed\n * and with determining the number of passes and the work to be done in each\n * pass.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n\n\n/* Private state */\n\ntypedef struct {\n  struct jpeg_decomp_master pub; /* public fields */\n\n  int pass_number;\t\t/* # of passes completed */\n\n  boolean using_merged_upsample; /* TRUE if using merged upsample/cconvert */\n\n  /* Saved references to initialized quantizer modules,\n   * in case we need to switch modes.\n   */\n  struct jpeg_color_quantizer * quantizer_1pass;\n  struct jpeg_color_quantizer * quantizer_2pass;\n} my_decomp_master;\n\ntypedef my_decomp_master * my_master_ptr;\n\n\n/*\n * Determine whether merged upsample/color conversion should be used.\n * CRUCIAL: this must match the actual capabilities of jdmerge.c!\n */\n\nLOCAL(boolean)\nuse_merged_upsample (j_decompress_ptr cinfo)\n{\n#ifdef UPSAMPLE_MERGING_SUPPORTED\n  /* Merging is the equivalent of plain box-filter upsampling */\n  if (cinfo->do_fancy_upsampling || cinfo->CCIR601_sampling)\n    return FALSE;\n  /* jdmerge.c only supports YCC=>RGB color conversion */\n  if (cinfo->jpeg_color_space != JCS_YCbCr || cinfo->num_components != 3 ||\n      cinfo->out_color_space != JCS_RGB ||\n      cinfo->out_color_components != RGB_PIXELSIZE)\n    return FALSE;\n  /* and it only handles 2h1v or 2h2v sampling ratios */\n  if (cinfo->comp_info[0].h_samp_factor != 2 ||\n      cinfo->comp_info[1].h_samp_factor != 1 ||\n      cinfo->comp_info[2].h_samp_factor != 1 ||\n      cinfo->comp_info[0].v_samp_factor >  2 ||\n      cinfo->comp_info[1].v_samp_factor != 1 ||\n      cinfo->comp_info[2].v_samp_factor != 1)\n    return FALSE;\n  /* furthermore, it doesn't work if we've scaled the IDCTs differently */\n  if (cinfo->comp_info[0].DCT_scaled_size != cinfo->min_DCT_scaled_size ||\n      cinfo->comp_info[1].DCT_scaled_size != cinfo->min_DCT_scaled_size ||\n      cinfo->comp_info[2].DCT_scaled_size != cinfo->min_DCT_scaled_size)\n    return FALSE;\n  /* ??? also need to test for upsample-time rescaling, when & if supported */\n  return TRUE;\t\t\t/* by golly, it'll work... */\n#else\n  return FALSE;\n#endif\n}\n\n\n/*\n * Compute output image dimensions and related values.\n * NOTE: this is exported for possible use by application.\n * Hence it mustn't do anything that can't be done twice.\n * Also note that it may be called before the master module is initialized!\n */\n\nGLOBAL(void)\njpeg_calc_output_dimensions (j_decompress_ptr cinfo)\n/* Do computations that are needed before master selection phase */\n{\n#ifdef IDCT_SCALING_SUPPORTED\n  int ci;\n  jpeg_component_info *compptr;\n#endif\n\n  /* Prevent application from calling me at wrong times */\n  if (cinfo->global_state != DSTATE_READY)\n    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);\n\n#ifdef IDCT_SCALING_SUPPORTED\n\n  /* Compute actual output image dimensions and DCT scaling choices. */\n  if (cinfo->scale_num * 8 <= cinfo->scale_denom) {\n    /* Provide 1/8 scaling */\n    cinfo->output_width = (JDIMENSION)\n      jdiv_round_up((long) cinfo->image_width, 8L);\n    cinfo->output_height = (JDIMENSION)\n      jdiv_round_up((long) cinfo->image_height, 8L);\n    cinfo->min_DCT_scaled_size = 1;\n  } else if (cinfo->scale_num * 4 <= cinfo->scale_denom) {\n    /* Provide 1/4 scaling */\n    cinfo->output_width = (JDIMENSION)\n      jdiv_round_up((long) cinfo->image_width, 4L);\n    cinfo->output_height = (JDIMENSION)\n      jdiv_round_up((long) cinfo->image_height, 4L);\n    cinfo->min_DCT_scaled_size = 2;\n  } else if (cinfo->scale_num * 2 <= cinfo->scale_denom) {\n    /* Provide 1/2 scaling */\n    cinfo->output_width = (JDIMENSION)\n      jdiv_round_up((long) cinfo->image_width, 2L);\n    cinfo->output_height = (JDIMENSION)\n      jdiv_round_up((long) cinfo->image_height, 2L);\n    cinfo->min_DCT_scaled_size = 4;\n  } else {\n    /* Provide 1/1 scaling */\n    cinfo->output_width = cinfo->image_width;\n    cinfo->output_height = cinfo->image_height;\n    cinfo->min_DCT_scaled_size = DCTSIZE;\n  }\n  /* In selecting the actual DCT scaling for each component, we try to\n   * scale up the chroma components via IDCT scaling rather than upsampling.\n   * This saves time if the upsampler gets to use 1:1 scaling.\n   * Note this code assumes that the supported DCT scalings are powers of 2.\n   */\n  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n       ci++, compptr++) {\n    int ssize = cinfo->min_DCT_scaled_size;\n    while (ssize < DCTSIZE &&\n\t   (compptr->h_samp_factor * ssize * 2 <=\n\t    cinfo->max_h_samp_factor * cinfo->min_DCT_scaled_size) &&\n\t   (compptr->v_samp_factor * ssize * 2 <=\n\t    cinfo->max_v_samp_factor * cinfo->min_DCT_scaled_size)) {\n      ssize = ssize * 2;\n    }\n    compptr->DCT_scaled_size = ssize;\n  }\n\n  /* Recompute downsampled dimensions of components;\n   * application needs to know these if using raw downsampled data.\n   */\n  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n       ci++, compptr++) {\n    /* Size in samples, after IDCT scaling */\n    compptr->downsampled_width = (JDIMENSION)\n      jdiv_round_up((long) cinfo->image_width *\n\t\t    (long) (compptr->h_samp_factor * compptr->DCT_scaled_size),\n\t\t    (long) (cinfo->max_h_samp_factor * DCTSIZE));\n    compptr->downsampled_height = (JDIMENSION)\n      jdiv_round_up((long) cinfo->image_height *\n\t\t    (long) (compptr->v_samp_factor * compptr->DCT_scaled_size),\n\t\t    (long) (cinfo->max_v_samp_factor * DCTSIZE));\n  }\n\n#else /* !IDCT_SCALING_SUPPORTED */\n\n  /* Hardwire it to \"no scaling\" */\n  cinfo->output_width = cinfo->image_width;\n  cinfo->output_height = cinfo->image_height;\n  /* jdinput.c has already initialized DCT_scaled_size to DCTSIZE,\n   * and has computed unscaled downsampled_width and downsampled_height.\n   */\n\n#endif /* IDCT_SCALING_SUPPORTED */\n\n  /* Report number of components in selected colorspace. */\n  /* Probably this should be in the color conversion module... */\n  switch (cinfo->out_color_space) {\n  case JCS_GRAYSCALE:\n    cinfo->out_color_components = 1;\n    break;\n  case JCS_RGB:\n#if RGB_PIXELSIZE != 3\n    cinfo->out_color_components = RGB_PIXELSIZE;\n    break;\n#endif /* else share code with YCbCr */\n  case JCS_YCbCr:\n    cinfo->out_color_components = 3;\n    break;\n  case JCS_CMYK:\n  case JCS_YCCK:\n    cinfo->out_color_components = 4;\n    break;\n  default:\t\t\t/* else must be same colorspace as in file */\n    cinfo->out_color_components = cinfo->num_components;\n    break;\n  }\n  cinfo->output_components = (cinfo->quantize_colors ? 1 :\n\t\t\t      cinfo->out_color_components);\n\n  /* See if upsampler will want to emit more than one row at a time */\n  if (use_merged_upsample(cinfo))\n    cinfo->rec_outbuf_height = cinfo->max_v_samp_factor;\n  else\n    cinfo->rec_outbuf_height = 1;\n}\n\n\n/*\n * Several decompression processes need to range-limit values to the range\n * 0..MAXJSAMPLE; the input value may fall somewhat outside this range\n * due to noise introduced by quantization, roundoff error, etc.  These\n * processes are inner loops and need to be as fast as possible.  On most\n * machines, particularly CPUs with pipelines or instruction prefetch,\n * a (subscript-check-less) C table lookup\n *\t\tx = sample_range_limit[x];\n * is faster than explicit tests\n *\t\tif (x < 0)  x = 0;\n *\t\telse if (x > MAXJSAMPLE)  x = MAXJSAMPLE;\n * These processes all use a common table prepared by the routine below.\n *\n * For most steps we can mathematically guarantee that the initial value\n * of x is within MAXJSAMPLE+1 of the legal range, so a table running from\n * -(MAXJSAMPLE+1) to 2*MAXJSAMPLE+1 is sufficient.  But for the initial\n * limiting step (just after the IDCT), a wildly out-of-range value is \n * possible if the input data is corrupt.  To avoid any chance of indexing\n * off the end of memory and getting a bad-pointer trap, we perform the\n * post-IDCT limiting thus:\n *\t\tx = range_limit[x & MASK];\n * where MASK is 2 bits wider than legal sample data, ie 10 bits for 8-bit\n * samples.  Under normal circumstances this is more than enough range and\n * a correct output will be generated; with bogus input data the mask will\n * cause wraparound, and we will safely generate a bogus-but-in-range output.\n * For the post-IDCT step, we want to convert the data from signed to unsigned\n * representation by adding CENTERJSAMPLE at the same time that we limit it.\n * So the post-IDCT limiting table ends up looking like this:\n *   CENTERJSAMPLE,CENTERJSAMPLE+1,...,MAXJSAMPLE,\n *   MAXJSAMPLE (repeat 2*(MAXJSAMPLE+1)-CENTERJSAMPLE times),\n *   0          (repeat 2*(MAXJSAMPLE+1)-CENTERJSAMPLE times),\n *   0,1,...,CENTERJSAMPLE-1\n * Negative inputs select values from the upper half of the table after\n * masking.\n *\n * We can save some space by overlapping the start of the post-IDCT table\n * with the simpler range limiting table.  The post-IDCT table begins at\n * sample_range_limit + CENTERJSAMPLE.\n *\n * Note that the table is allocated in near data space on PCs; it's small\n * enough and used often enough to justify this.\n */\n\nLOCAL(void)\nprepare_range_limit_table (j_decompress_ptr cinfo)\n/* Allocate and fill in the sample_range_limit table */\n{\n  JSAMPLE * table;\n  int i;\n\n  table = (JSAMPLE *)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t(5 * (MAXJSAMPLE+1) + CENTERJSAMPLE) * SIZEOF(JSAMPLE));\n  table += (MAXJSAMPLE+1);\t/* allow negative subscripts of simple table */\n  cinfo->sample_range_limit = table;\n  /* First segment of \"simple\" table: limit[x] = 0 for x < 0 */\n  MEMZERO(table - (MAXJSAMPLE+1), (MAXJSAMPLE+1) * SIZEOF(JSAMPLE));\n  /* Main part of \"simple\" table: limit[x] = x */\n  for (i = 0; i <= MAXJSAMPLE; i++)\n    table[i] = (JSAMPLE) i;\n  table += CENTERJSAMPLE;\t/* Point to where post-IDCT table starts */\n  /* End of simple table, rest of first half of post-IDCT table */\n  for (i = CENTERJSAMPLE; i < 2*(MAXJSAMPLE+1); i++)\n    table[i] = MAXJSAMPLE;\n  /* Second half of post-IDCT table */\n  MEMZERO(table + (2 * (MAXJSAMPLE+1)),\n\t  (2 * (MAXJSAMPLE+1) - CENTERJSAMPLE) * SIZEOF(JSAMPLE));\n  MEMCOPY(table + (4 * (MAXJSAMPLE+1) - CENTERJSAMPLE),\n\t  cinfo->sample_range_limit, CENTERJSAMPLE * SIZEOF(JSAMPLE));\n}\n\n\n/*\n * Master selection of decompression modules.\n * This is done once at jpeg_start_decompress time.  We determine\n * which modules will be used and give them appropriate initialization calls.\n * We also initialize the decompressor input side to begin consuming data.\n *\n * Since jpeg_read_header has finished, we know what is in the SOF\n * and (first) SOS markers.  We also have all the application parameter\n * settings.\n */\n\nLOCAL(void)\nmaster_selection (j_decompress_ptr cinfo)\n{\n  my_master_ptr master = (my_master_ptr) cinfo->master;\n  boolean use_c_buffer;\n  long samplesperrow;\n  JDIMENSION jd_samplesperrow;\n\n  /* Initialize dimensions and other stuff */\n  jpeg_calc_output_dimensions(cinfo);\n  prepare_range_limit_table(cinfo);\n\n  /* Width of an output scanline must be representable as JDIMENSION. */\n  samplesperrow = (long) cinfo->output_width * (long) cinfo->out_color_components;\n  jd_samplesperrow = (JDIMENSION) samplesperrow;\n  if ((long) jd_samplesperrow != samplesperrow)\n    ERREXIT(cinfo, JERR_WIDTH_OVERFLOW);\n\n  /* Initialize my private state */\n  master->pass_number = 0;\n  master->using_merged_upsample = use_merged_upsample(cinfo);\n\n  /* Color quantizer selection */\n  master->quantizer_1pass = NULL;\n  master->quantizer_2pass = NULL;\n  /* No mode changes if not using buffered-image mode. */\n  if (! cinfo->quantize_colors || ! cinfo->buffered_image) {\n    cinfo->enable_1pass_quant = FALSE;\n    cinfo->enable_external_quant = FALSE;\n    cinfo->enable_2pass_quant = FALSE;\n  }\n  if (cinfo->quantize_colors) {\n    if (cinfo->raw_data_out)\n      ERREXIT(cinfo, JERR_NOTIMPL);\n    /* 2-pass quantizer only works in 3-component color space. */\n    if (cinfo->out_color_components != 3) {\n      cinfo->enable_1pass_quant = TRUE;\n      cinfo->enable_external_quant = FALSE;\n      cinfo->enable_2pass_quant = FALSE;\n      cinfo->colormap = NULL;\n    } else if (cinfo->colormap != NULL) {\n      cinfo->enable_external_quant = TRUE;\n    } else if (cinfo->two_pass_quantize) {\n      cinfo->enable_2pass_quant = TRUE;\n    } else {\n      cinfo->enable_1pass_quant = TRUE;\n    }\n\n    if (cinfo->enable_1pass_quant) {\n#ifdef QUANT_1PASS_SUPPORTED\n      jinit_1pass_quantizer(cinfo);\n      master->quantizer_1pass = cinfo->cquantize;\n#else\n      ERREXIT(cinfo, JERR_NOT_COMPILED);\n#endif\n    }\n\n    /* We use the 2-pass code to map to external colormaps. */\n    if (cinfo->enable_2pass_quant || cinfo->enable_external_quant) {\n#ifdef QUANT_2PASS_SUPPORTED\n      jinit_2pass_quantizer(cinfo);\n      master->quantizer_2pass = cinfo->cquantize;\n#else\n      ERREXIT(cinfo, JERR_NOT_COMPILED);\n#endif\n    }\n    /* If both quantizers are initialized, the 2-pass one is left active;\n     * this is necessary for starting with quantization to an external map.\n     */\n  }\n\n  /* Post-processing: in particular, color conversion first */\n  if (! cinfo->raw_data_out) {\n    if (master->using_merged_upsample) {\n#ifdef UPSAMPLE_MERGING_SUPPORTED\n      jinit_merged_upsampler(cinfo); /* does color conversion too */\n#else\n      ERREXIT(cinfo, JERR_NOT_COMPILED);\n#endif\n    } else {\n      jinit_color_deconverter(cinfo);\n      jinit_upsampler(cinfo);\n    }\n    jinit_d_post_controller(cinfo, cinfo->enable_2pass_quant);\n  }\n  /* Inverse DCT */\n  jinit_inverse_dct(cinfo);\n  /* Entropy decoding: either Huffman or arithmetic coding. */\n  if (cinfo->arith_code) {\n    ERREXIT(cinfo, JERR_ARITH_NOTIMPL);\n  } else {\n    if (cinfo->progressive_mode) {\n#ifdef D_PROGRESSIVE_SUPPORTED\n      jinit_phuff_decoder(cinfo);\n#else\n      ERREXIT(cinfo, JERR_NOT_COMPILED);\n#endif\n    } else\n      jinit_huff_decoder(cinfo);\n  }\n\n  /* Initialize principal buffer controllers. */\n  use_c_buffer = cinfo->inputctl->has_multiple_scans || cinfo->buffered_image;\n  jinit_d_coef_controller(cinfo, use_c_buffer);\n\n  if (! cinfo->raw_data_out)\n    jinit_d_main_controller(cinfo, FALSE /* never need full buffer here */);\n\n  /* We can now tell the memory manager to allocate virtual arrays. */\n  (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo);\n\n  /* Initialize input side of decompressor to consume first scan. */\n  (*cinfo->inputctl->start_input_pass) (cinfo);\n\n#ifdef D_MULTISCAN_FILES_SUPPORTED\n  /* If jpeg_start_decompress will read the whole file, initialize\n   * progress monitoring appropriately.  The input step is counted\n   * as one pass.\n   */\n  if (cinfo->progress != NULL && ! cinfo->buffered_image &&\n      cinfo->inputctl->has_multiple_scans) {\n    int nscans;\n    /* Estimate number of scans to set pass_limit. */\n    if (cinfo->progressive_mode) {\n      /* Arbitrarily estimate 2 interleaved DC scans + 3 AC scans/component. */\n      nscans = 2 + 3 * cinfo->num_components;\n    } else {\n      /* For a nonprogressive multiscan file, estimate 1 scan per component. */\n      nscans = cinfo->num_components;\n    }\n    cinfo->progress->pass_counter = 0L;\n    cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows * nscans;\n    cinfo->progress->completed_passes = 0;\n    cinfo->progress->total_passes = (cinfo->enable_2pass_quant ? 3 : 2);\n    /* Count the input pass as done */\n    master->pass_number++;\n  }\n#endif /* D_MULTISCAN_FILES_SUPPORTED */\n}\n\n\n/*\n * Per-pass setup.\n * This is called at the beginning of each output pass.  We determine which\n * modules will be active during this pass and give them appropriate\n * start_pass calls.  We also set is_dummy_pass to indicate whether this\n * is a \"real\" output pass or a dummy pass for color quantization.\n * (In the latter case, jdapistd.c will crank the pass to completion.)\n */\n\nMETHODDEF(void)\nprepare_for_output_pass (j_decompress_ptr cinfo)\n{\n  my_master_ptr master = (my_master_ptr) cinfo->master;\n\n  if (master->pub.is_dummy_pass) {\n#ifdef QUANT_2PASS_SUPPORTED\n    /* Final pass of 2-pass quantization */\n    master->pub.is_dummy_pass = FALSE;\n    (*cinfo->cquantize->start_pass) (cinfo, FALSE);\n    (*cinfo->post->start_pass) (cinfo, JBUF_CRANK_DEST);\n    (*cinfo->main->start_pass) (cinfo, JBUF_CRANK_DEST);\n#else\n    ERREXIT(cinfo, JERR_NOT_COMPILED);\n#endif /* QUANT_2PASS_SUPPORTED */\n  } else {\n    if (cinfo->quantize_colors && cinfo->colormap == NULL) {\n      /* Select new quantization method */\n      if (cinfo->two_pass_quantize && cinfo->enable_2pass_quant) {\n\tcinfo->cquantize = master->quantizer_2pass;\n\tmaster->pub.is_dummy_pass = TRUE;\n      } else if (cinfo->enable_1pass_quant) {\n\tcinfo->cquantize = master->quantizer_1pass;\n      } else {\n\tERREXIT(cinfo, JERR_MODE_CHANGE);\n      }\n    }\n    (*cinfo->idct->start_pass) (cinfo);\n    (*cinfo->coef->start_output_pass) (cinfo);\n    if (! cinfo->raw_data_out) {\n      if (! master->using_merged_upsample)\n\t(*cinfo->cconvert->start_pass) (cinfo);\n      (*cinfo->upsample->start_pass) (cinfo);\n      if (cinfo->quantize_colors)\n\t(*cinfo->cquantize->start_pass) (cinfo, master->pub.is_dummy_pass);\n      (*cinfo->post->start_pass) (cinfo,\n\t    (master->pub.is_dummy_pass ? JBUF_SAVE_AND_PASS : JBUF_PASS_THRU));\n      (*cinfo->main->start_pass) (cinfo, JBUF_PASS_THRU);\n    }\n  }\n\n  /* Set up progress monitor's pass info if present */\n  if (cinfo->progress != NULL) {\n    cinfo->progress->completed_passes = master->pass_number;\n    cinfo->progress->total_passes = master->pass_number +\n\t\t\t\t    (master->pub.is_dummy_pass ? 2 : 1);\n    /* In buffered-image mode, we assume one more output pass if EOI not\n     * yet reached, but no more passes if EOI has been reached.\n     */\n    if (cinfo->buffered_image && ! cinfo->inputctl->eoi_reached) {\n      cinfo->progress->total_passes += (cinfo->enable_2pass_quant ? 2 : 1);\n    }\n  }\n}\n\n\n/*\n * Finish up at end of an output pass.\n */\n\nMETHODDEF(void)\nfinish_output_pass (j_decompress_ptr cinfo)\n{\n  my_master_ptr master = (my_master_ptr) cinfo->master;\n\n  if (cinfo->quantize_colors)\n    (*cinfo->cquantize->finish_pass) (cinfo);\n  master->pass_number++;\n}\n\n\n#ifdef D_MULTISCAN_FILES_SUPPORTED\n\n/*\n * Switch to a new external colormap between output passes.\n */\n\nGLOBAL(void)\njpeg_new_colormap (j_decompress_ptr cinfo)\n{\n  my_master_ptr master = (my_master_ptr) cinfo->master;\n\n  /* Prevent application from calling me at wrong times */\n  if (cinfo->global_state != DSTATE_BUFIMAGE)\n    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);\n\n  if (cinfo->quantize_colors && cinfo->enable_external_quant &&\n      cinfo->colormap != NULL) {\n    /* Select 2-pass quantizer for external colormap use */\n    cinfo->cquantize = master->quantizer_2pass;\n    /* Notify quantizer of colormap change */\n    (*cinfo->cquantize->new_color_map) (cinfo);\n    master->pub.is_dummy_pass = FALSE; /* just in case */\n  } else\n    ERREXIT(cinfo, JERR_MODE_CHANGE);\n}\n\n#endif /* D_MULTISCAN_FILES_SUPPORTED */\n\n\n/*\n * Initialize master decompression control and select active modules.\n * This is performed at the start of jpeg_start_decompress.\n */\n\nGLOBAL(void)\njinit_master_decompress (j_decompress_ptr cinfo)\n{\n  my_master_ptr master;\n\n  master = (my_master_ptr)\n      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\t  SIZEOF(my_decomp_master));\n  cinfo->master = (struct jpeg_decomp_master *) master;\n  master->pub.prepare_for_output_pass = prepare_for_output_pass;\n  master->pub.finish_output_pass = finish_output_pass;\n\n  master->pub.is_dummy_pass = FALSE;\n\n  master_selection(cinfo);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jdmerge.c",
    "content": "/*\n * jdmerge.c\n *\n * Copyright (C) 1994-1996, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains code for merged upsampling/color conversion.\n *\n * This file combines functions from jdsample.c and jdcolor.c;\n * read those files first to understand what's going on.\n *\n * When the chroma components are to be upsampled by simple replication\n * (ie, box filtering), we can save some work in color conversion by\n * calculating all the output pixels corresponding to a pair of chroma\n * samples at one time.  In the conversion equations\n *\tR = Y           + K1 * Cr\n *\tG = Y + K2 * Cb + K3 * Cr\n *\tB = Y + K4 * Cb\n * only the Y term varies among the group of pixels corresponding to a pair\n * of chroma samples, so the rest of the terms can be calculated just once.\n * At typical sampling ratios, this eliminates half or three-quarters of the\n * multiplications needed for color conversion.\n *\n * This file currently provides implementations for the following cases:\n *\tYCbCr => RGB color conversion only.\n *\tSampling ratios of 2h1v or 2h2v.\n *\tNo scaling needed at upsample time.\n *\tCorner-aligned (non-CCIR601) sampling alignment.\n * Other special cases could be added, but in most applications these are\n * the only common cases.  (For uncommon cases we fall back on the more\n * general code in jdsample.c and jdcolor.c.)\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n\n#ifdef UPSAMPLE_MERGING_SUPPORTED\n\n\n/* Private subobject */\n\ntypedef struct {\n  struct jpeg_upsampler pub;\t/* public fields */\n\n  /* Pointer to routine to do actual upsampling/conversion of one row group */\n  JMETHOD(void, upmethod, (j_decompress_ptr cinfo,\n\t\t\t   JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,\n\t\t\t   JSAMPARRAY output_buf));\n\n  /* Private state for YCC->RGB conversion */\n  int * Cr_r_tab;\t\t/* => table for Cr to R conversion */\n  int * Cb_b_tab;\t\t/* => table for Cb to B conversion */\n  INT32 * Cr_g_tab;\t\t/* => table for Cr to G conversion */\n  INT32 * Cb_g_tab;\t\t/* => table for Cb to G conversion */\n\n  /* For 2:1 vertical sampling, we produce two output rows at a time.\n   * We need a \"spare\" row buffer to hold the second output row if the\n   * application provides just a one-row buffer; we also use the spare\n   * to discard the dummy last row if the image height is odd.\n   */\n  JSAMPROW spare_row;\n  boolean spare_full;\t\t/* T if spare buffer is occupied */\n\n  JDIMENSION out_row_width;\t/* samples per output row */\n  JDIMENSION rows_to_go;\t/* counts rows remaining in image */\n} my_upsampler;\n\ntypedef my_upsampler * my_upsample_ptr;\n\n#define SCALEBITS\t16\t/* speediest right-shift on some machines */\n#define ONE_HALF\t((INT32) 1 << (SCALEBITS-1))\n#define FIX(x)\t\t((INT32) ((x) * (1L<<SCALEBITS) + 0.5))\n\n\n/*\n * Initialize tables for YCC->RGB colorspace conversion.\n * This is taken directly from jdcolor.c; see that file for more info.\n */\n\nLOCAL(void)\nbuild_ycc_rgb_table (j_decompress_ptr cinfo)\n{\n  my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;\n  int i;\n  INT32 x;\n  SHIFT_TEMPS\n\n  upsample->Cr_r_tab = (int *)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\t(MAXJSAMPLE+1) * SIZEOF(int));\n  upsample->Cb_b_tab = (int *)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\t(MAXJSAMPLE+1) * SIZEOF(int));\n  upsample->Cr_g_tab = (INT32 *)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\t(MAXJSAMPLE+1) * SIZEOF(INT32));\n  upsample->Cb_g_tab = (INT32 *)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\t(MAXJSAMPLE+1) * SIZEOF(INT32));\n\n  for (i = 0, x = -CENTERJSAMPLE; i <= MAXJSAMPLE; i++, x++) {\n    /* i is the actual input pixel value, in the range 0..MAXJSAMPLE */\n    /* The Cb or Cr value we are thinking of is x = i - CENTERJSAMPLE */\n    /* Cr=>R value is nearest int to 1.40200 * x */\n    upsample->Cr_r_tab[i] = (int)\n\t\t    RIGHT_SHIFT(FIX(1.40200) * x + ONE_HALF, SCALEBITS);\n    /* Cb=>B value is nearest int to 1.77200 * x */\n    upsample->Cb_b_tab[i] = (int)\n\t\t    RIGHT_SHIFT(FIX(1.77200) * x + ONE_HALF, SCALEBITS);\n    /* Cr=>G value is scaled-up -0.71414 * x */\n    upsample->Cr_g_tab[i] = (- FIX(0.71414)) * x;\n    /* Cb=>G value is scaled-up -0.34414 * x */\n    /* We also add in ONE_HALF so that need not do it in inner loop */\n    upsample->Cb_g_tab[i] = (- FIX(0.34414)) * x + ONE_HALF;\n  }\n}\n\n\n/*\n * Initialize for an upsampling pass.\n */\n\nMETHODDEF(void)\nstart_pass_merged_upsample (j_decompress_ptr cinfo)\n{\n  my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;\n\n  /* Mark the spare buffer empty */\n  upsample->spare_full = FALSE;\n  /* Initialize total-height counter for detecting bottom of image */\n  upsample->rows_to_go = cinfo->output_height;\n}\n\n\n/*\n * Control routine to do upsampling (and color conversion).\n *\n * The control routine just handles the row buffering considerations.\n */\n\nMETHODDEF(void)\nmerged_2v_upsample (j_decompress_ptr cinfo,\n\t\t    JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,\n\t\t    JDIMENSION in_row_groups_avail,\n\t\t    JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,\n\t\t    JDIMENSION out_rows_avail)\n/* 2:1 vertical sampling case: may need a spare row. */\n{\n  my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;\n  JSAMPROW work_ptrs[2];\n  JDIMENSION num_rows;\t\t/* number of rows returned to caller */\n\n  if (upsample->spare_full) {\n    /* If we have a spare row saved from a previous cycle, just return it. */\n    jcopy_sample_rows(& upsample->spare_row, 0, output_buf + *out_row_ctr, 0,\n\t\t      1, upsample->out_row_width);\n    num_rows = 1;\n    upsample->spare_full = FALSE;\n  } else {\n    /* Figure number of rows to return to caller. */\n    num_rows = 2;\n    /* Not more than the distance to the end of the image. */\n    if (num_rows > upsample->rows_to_go)\n      num_rows = upsample->rows_to_go;\n    /* And not more than what the client can accept: */\n    out_rows_avail -= *out_row_ctr;\n    if (num_rows > out_rows_avail)\n      num_rows = out_rows_avail;\n    /* Create output pointer array for upsampler. */\n    work_ptrs[0] = output_buf[*out_row_ctr];\n    if (num_rows > 1) {\n      work_ptrs[1] = output_buf[*out_row_ctr + 1];\n    } else {\n      work_ptrs[1] = upsample->spare_row;\n      upsample->spare_full = TRUE;\n    }\n    /* Now do the upsampling. */\n    (*upsample->upmethod) (cinfo, input_buf, *in_row_group_ctr, work_ptrs);\n  }\n\n  /* Adjust counts */\n  *out_row_ctr += num_rows;\n  upsample->rows_to_go -= num_rows;\n  /* When the buffer is emptied, declare this input row group consumed */\n  if (! upsample->spare_full)\n    (*in_row_group_ctr)++;\n}\n\n\nMETHODDEF(void)\nmerged_1v_upsample (j_decompress_ptr cinfo,\n\t\t    JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,\n\t\t    JDIMENSION in_row_groups_avail,\n\t\t    JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,\n\t\t    JDIMENSION out_rows_avail)\n/* 1:1 vertical sampling case: much easier, never need a spare row. */\n{\n  my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;\n\n  /* Just do the upsampling. */\n  (*upsample->upmethod) (cinfo, input_buf, *in_row_group_ctr,\n\t\t\t output_buf + *out_row_ctr);\n  /* Adjust counts */\n  (*out_row_ctr)++;\n  (*in_row_group_ctr)++;\n}\n\n\n/*\n * These are the routines invoked by the control routines to do\n * the actual upsampling/conversion.  One row group is processed per call.\n *\n * Note: since we may be writing directly into application-supplied buffers,\n * we have to be honest about the output width; we can't assume the buffer\n * has been rounded up to an even width.\n */\n\n\n/*\n * Upsample and color convert for the case of 2:1 horizontal and 1:1 vertical.\n */\n\nMETHODDEF(void)\nh2v1_merged_upsample (j_decompress_ptr cinfo,\n\t\t      JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,\n\t\t      JSAMPARRAY output_buf)\n{\n  my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;\n  register int y, cred, cgreen, cblue;\n  int cb, cr;\n  register JSAMPROW outptr;\n  JSAMPROW inptr0, inptr1, inptr2;\n  JDIMENSION col;\n  /* copy these pointers into registers if possible */\n  register JSAMPLE * range_limit = cinfo->sample_range_limit;\n  int * Crrtab = upsample->Cr_r_tab;\n  int * Cbbtab = upsample->Cb_b_tab;\n  INT32 * Crgtab = upsample->Cr_g_tab;\n  INT32 * Cbgtab = upsample->Cb_g_tab;\n  SHIFT_TEMPS\n\n  inptr0 = input_buf[0][in_row_group_ctr];\n  inptr1 = input_buf[1][in_row_group_ctr];\n  inptr2 = input_buf[2][in_row_group_ctr];\n  outptr = output_buf[0];\n  /* Loop for each pair of output pixels */\n  for (col = cinfo->output_width >> 1; col > 0; col--) {\n    /* Do the chroma part of the calculation */\n    cb = GETJSAMPLE(*inptr1++);\n    cr = GETJSAMPLE(*inptr2++);\n    cred = Crrtab[cr];\n    cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS);\n    cblue = Cbbtab[cb];\n    /* Fetch 2 Y values and emit 2 pixels */\n    y  = GETJSAMPLE(*inptr0++);\n    outptr[RGB_RED] =   range_limit[y + cred];\n    outptr[RGB_GREEN] = range_limit[y + cgreen];\n    outptr[RGB_BLUE] =  range_limit[y + cblue];\n    outptr += RGB_PIXELSIZE;\n    y  = GETJSAMPLE(*inptr0++);\n    outptr[RGB_RED] =   range_limit[y + cred];\n    outptr[RGB_GREEN] = range_limit[y + cgreen];\n    outptr[RGB_BLUE] =  range_limit[y + cblue];\n    outptr += RGB_PIXELSIZE;\n  }\n  /* If image width is odd, do the last output column separately */\n  if (cinfo->output_width & 1) {\n    cb = GETJSAMPLE(*inptr1);\n    cr = GETJSAMPLE(*inptr2);\n    cred = Crrtab[cr];\n    cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS);\n    cblue = Cbbtab[cb];\n    y  = GETJSAMPLE(*inptr0);\n    outptr[RGB_RED] =   range_limit[y + cred];\n    outptr[RGB_GREEN] = range_limit[y + cgreen];\n    outptr[RGB_BLUE] =  range_limit[y + cblue];\n  }\n}\n\n\n/*\n * Upsample and color convert for the case of 2:1 horizontal and 2:1 vertical.\n */\n\nMETHODDEF(void)\nh2v2_merged_upsample (j_decompress_ptr cinfo,\n\t\t      JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,\n\t\t      JSAMPARRAY output_buf)\n{\n  my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;\n  register int y, cred, cgreen, cblue;\n  int cb, cr;\n  register JSAMPROW outptr0, outptr1;\n  JSAMPROW inptr00, inptr01, inptr1, inptr2;\n  JDIMENSION col;\n  /* copy these pointers into registers if possible */\n  register JSAMPLE * range_limit = cinfo->sample_range_limit;\n  int * Crrtab = upsample->Cr_r_tab;\n  int * Cbbtab = upsample->Cb_b_tab;\n  INT32 * Crgtab = upsample->Cr_g_tab;\n  INT32 * Cbgtab = upsample->Cb_g_tab;\n  SHIFT_TEMPS\n\n  inptr00 = input_buf[0][in_row_group_ctr*2];\n  inptr01 = input_buf[0][in_row_group_ctr*2 + 1];\n  inptr1 = input_buf[1][in_row_group_ctr];\n  inptr2 = input_buf[2][in_row_group_ctr];\n  outptr0 = output_buf[0];\n  outptr1 = output_buf[1];\n  /* Loop for each group of output pixels */\n  for (col = cinfo->output_width >> 1; col > 0; col--) {\n    /* Do the chroma part of the calculation */\n    cb = GETJSAMPLE(*inptr1++);\n    cr = GETJSAMPLE(*inptr2++);\n    cred = Crrtab[cr];\n    cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS);\n    cblue = Cbbtab[cb];\n    /* Fetch 4 Y values and emit 4 pixels */\n    y  = GETJSAMPLE(*inptr00++);\n    outptr0[RGB_RED] =   range_limit[y + cred];\n    outptr0[RGB_GREEN] = range_limit[y + cgreen];\n    outptr0[RGB_BLUE] =  range_limit[y + cblue];\n    outptr0 += RGB_PIXELSIZE;\n    y  = GETJSAMPLE(*inptr00++);\n    outptr0[RGB_RED] =   range_limit[y + cred];\n    outptr0[RGB_GREEN] = range_limit[y + cgreen];\n    outptr0[RGB_BLUE] =  range_limit[y + cblue];\n    outptr0 += RGB_PIXELSIZE;\n    y  = GETJSAMPLE(*inptr01++);\n    outptr1[RGB_RED] =   range_limit[y + cred];\n    outptr1[RGB_GREEN] = range_limit[y + cgreen];\n    outptr1[RGB_BLUE] =  range_limit[y + cblue];\n    outptr1 += RGB_PIXELSIZE;\n    y  = GETJSAMPLE(*inptr01++);\n    outptr1[RGB_RED] =   range_limit[y + cred];\n    outptr1[RGB_GREEN] = range_limit[y + cgreen];\n    outptr1[RGB_BLUE] =  range_limit[y + cblue];\n    outptr1 += RGB_PIXELSIZE;\n  }\n  /* If image width is odd, do the last output column separately */\n  if (cinfo->output_width & 1) {\n    cb = GETJSAMPLE(*inptr1);\n    cr = GETJSAMPLE(*inptr2);\n    cred = Crrtab[cr];\n    cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS);\n    cblue = Cbbtab[cb];\n    y  = GETJSAMPLE(*inptr00);\n    outptr0[RGB_RED] =   range_limit[y + cred];\n    outptr0[RGB_GREEN] = range_limit[y + cgreen];\n    outptr0[RGB_BLUE] =  range_limit[y + cblue];\n    y  = GETJSAMPLE(*inptr01);\n    outptr1[RGB_RED] =   range_limit[y + cred];\n    outptr1[RGB_GREEN] = range_limit[y + cgreen];\n    outptr1[RGB_BLUE] =  range_limit[y + cblue];\n  }\n}\n\n\n/*\n * Module initialization routine for merged upsampling/color conversion.\n *\n * NB: this is called under the conditions determined by use_merged_upsample()\n * in jdmaster.c.  That routine MUST correspond to the actual capabilities\n * of this module; no safety checks are made here.\n */\n\nGLOBAL(void)\njinit_merged_upsampler (j_decompress_ptr cinfo)\n{\n  my_upsample_ptr upsample;\n\n  upsample = (my_upsample_ptr)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\tSIZEOF(my_upsampler));\n  cinfo->upsample = (struct jpeg_upsampler *) upsample;\n  upsample->pub.start_pass = start_pass_merged_upsample;\n  upsample->pub.need_context_rows = FALSE;\n\n  upsample->out_row_width = cinfo->output_width * cinfo->out_color_components;\n\n  if (cinfo->max_v_samp_factor == 2) {\n    upsample->pub.upsample = merged_2v_upsample;\n    upsample->upmethod = h2v2_merged_upsample;\n    /* Allocate a spare row buffer */\n    upsample->spare_row = (JSAMPROW)\n      (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t(size_t) (upsample->out_row_width * SIZEOF(JSAMPLE)));\n  } else {\n    upsample->pub.upsample = merged_1v_upsample;\n    upsample->upmethod = h2v1_merged_upsample;\n    /* No spare row needed */\n    upsample->spare_row = NULL;\n  }\n\n  build_ycc_rgb_table(cinfo);\n}\n\n#endif /* UPSAMPLE_MERGING_SUPPORTED */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jdphuff.c",
    "content": "/*\n * jdphuff.c\n *\n * Copyright (C) 1995-1997, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains Huffman entropy decoding routines for progressive JPEG.\n *\n * Much of the complexity here has to do with supporting input suspension.\n * If the data source module demands suspension, we want to be able to back\n * up to the start of the current MCU.  To do this, we copy state variables\n * into local working storage, and update them back to the permanent\n * storage only upon successful completion of an MCU.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n#include \"jdhuff.h\"\t\t/* Declarations shared with jdhuff.c */\n\n\n#ifdef D_PROGRESSIVE_SUPPORTED\n\n/*\n * Expanded entropy decoder object for progressive Huffman decoding.\n *\n * The savable_state subrecord contains fields that change within an MCU,\n * but must not be updated permanently until we complete the MCU.\n */\n\ntypedef struct {\n  unsigned int EOBRUN;\t\t\t/* remaining EOBs in EOBRUN */\n  int last_dc_val[MAX_COMPS_IN_SCAN];\t/* last DC coef for each component */\n} savable_state;\n\n/* This macro is to work around compilers with missing or broken\n * structure assignment.  You'll need to fix this code if you have\n * such a compiler and you change MAX_COMPS_IN_SCAN.\n */\n\n#ifndef NO_STRUCT_ASSIGN\n#define ASSIGN_STATE(dest,src)  ((dest) = (src))\n#else\n#if MAX_COMPS_IN_SCAN == 4\n#define ASSIGN_STATE(dest,src)  \\\n\t((dest).EOBRUN = (src).EOBRUN, \\\n\t (dest).last_dc_val[0] = (src).last_dc_val[0], \\\n\t (dest).last_dc_val[1] = (src).last_dc_val[1], \\\n\t (dest).last_dc_val[2] = (src).last_dc_val[2], \\\n\t (dest).last_dc_val[3] = (src).last_dc_val[3])\n#endif\n#endif\n\n\ntypedef struct {\n  struct jpeg_entropy_decoder pub; /* public fields */\n\n  /* These fields are loaded into local variables at start of each MCU.\n   * In case of suspension, we exit WITHOUT updating them.\n   */\n  bitread_perm_state bitstate;\t/* Bit buffer at start of MCU */\n  savable_state saved;\t\t/* Other state at start of MCU */\n\n  /* These fields are NOT loaded into local working state. */\n  unsigned int restarts_to_go;\t/* MCUs left in this restart interval */\n\n  /* Pointers to derived tables (these workspaces have image lifespan) */\n  d_derived_tbl * derived_tbls[NUM_HUFF_TBLS];\n\n  d_derived_tbl * ac_derived_tbl; /* active table during an AC scan */\n} phuff_entropy_decoder;\n\ntypedef phuff_entropy_decoder * phuff_entropy_ptr;\n\n/* Forward declarations */\nMETHODDEF(boolean) decode_mcu_DC_first JPP((j_decompress_ptr cinfo,\n\t\t\t\t\t    JBLOCKROW *MCU_data));\nMETHODDEF(boolean) decode_mcu_AC_first JPP((j_decompress_ptr cinfo,\n\t\t\t\t\t    JBLOCKROW *MCU_data));\nMETHODDEF(boolean) decode_mcu_DC_refine JPP((j_decompress_ptr cinfo,\n\t\t\t\t\t     JBLOCKROW *MCU_data));\nMETHODDEF(boolean) decode_mcu_AC_refine JPP((j_decompress_ptr cinfo,\n\t\t\t\t\t     JBLOCKROW *MCU_data));\n\n\n/*\n * Initialize for a Huffman-compressed scan.\n */\n\nMETHODDEF(void)\nstart_pass_phuff_decoder (j_decompress_ptr cinfo)\n{\n  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;\n  boolean is_DC_band, bad;\n  int ci, coefi, tbl;\n  int *coef_bit_ptr;\n  jpeg_component_info * compptr;\n\n  is_DC_band = (cinfo->Ss == 0);\n\n  /* Validate scan parameters */\n  bad = FALSE;\n  if (is_DC_band) {\n    if (cinfo->Se != 0)\n      bad = TRUE;\n  } else {\n    /* need not check Ss/Se < 0 since they came from unsigned bytes */\n    if (cinfo->Ss > cinfo->Se || cinfo->Se >= DCTSIZE2)\n      bad = TRUE;\n    /* AC scans may have only one component */\n    if (cinfo->comps_in_scan != 1)\n      bad = TRUE;\n  }\n  if (cinfo->Ah != 0) {\n    /* Successive approximation refinement scan: must have Al = Ah-1. */\n    if (cinfo->Al != cinfo->Ah-1)\n      bad = TRUE;\n  }\n  if (cinfo->Al > 13)\t\t/* need not check for < 0 */\n    bad = TRUE;\n  /* Arguably the maximum Al value should be less than 13 for 8-bit precision,\n   * but the spec doesn't say so, and we try to be liberal about what we\n   * accept.  Note: large Al values could result in out-of-range DC\n   * coefficients during early scans, leading to bizarre displays due to\n   * overflows in the IDCT math.  But we won't crash.\n   */\n  if (bad)\n    ERREXIT4(cinfo, JERR_BAD_PROGRESSION,\n\t     cinfo->Ss, cinfo->Se, cinfo->Ah, cinfo->Al);\n  /* Update progression status, and verify that scan order is legal.\n   * Note that inter-scan inconsistencies are treated as warnings\n   * not fatal errors ... not clear if this is right way to behave.\n   */\n  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {\n    int cindex = cinfo->cur_comp_info[ci]->component_index;\n    coef_bit_ptr = & cinfo->coef_bits[cindex][0];\n    if (!is_DC_band && coef_bit_ptr[0] < 0) /* AC without prior DC scan */\n      WARNMS2(cinfo, JWRN_BOGUS_PROGRESSION, cindex, 0);\n    for (coefi = cinfo->Ss; coefi <= cinfo->Se; coefi++) {\n      int expected = (coef_bit_ptr[coefi] < 0) ? 0 : coef_bit_ptr[coefi];\n      if (cinfo->Ah != expected)\n\tWARNMS2(cinfo, JWRN_BOGUS_PROGRESSION, cindex, coefi);\n      coef_bit_ptr[coefi] = cinfo->Al;\n    }\n  }\n\n  /* Select MCU decoding routine */\n  if (cinfo->Ah == 0) {\n    if (is_DC_band)\n      entropy->pub.decode_mcu = decode_mcu_DC_first;\n    else\n      entropy->pub.decode_mcu = decode_mcu_AC_first;\n  } else {\n    if (is_DC_band)\n      entropy->pub.decode_mcu = decode_mcu_DC_refine;\n    else\n      entropy->pub.decode_mcu = decode_mcu_AC_refine;\n  }\n\n  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {\n    compptr = cinfo->cur_comp_info[ci];\n    /* Make sure requested tables are present, and compute derived tables.\n     * We may build same derived table more than once, but it's not expensive.\n     */\n    if (is_DC_band) {\n      if (cinfo->Ah == 0) {\t/* DC refinement needs no table */\n\ttbl = compptr->dc_tbl_no;\n\tjpeg_make_d_derived_tbl(cinfo, TRUE, tbl,\n\t\t\t\t& entropy->derived_tbls[tbl]);\n      }\n    } else {\n      tbl = compptr->ac_tbl_no;\n      jpeg_make_d_derived_tbl(cinfo, FALSE, tbl,\n\t\t\t      & entropy->derived_tbls[tbl]);\n      /* remember the single active table */\n      entropy->ac_derived_tbl = entropy->derived_tbls[tbl];\n    }\n    /* Initialize DC predictions to 0 */\n    entropy->saved.last_dc_val[ci] = 0;\n  }\n\n  /* Initialize bitread state variables */\n  entropy->bitstate.bits_left = 0;\n  entropy->bitstate.get_buffer = 0; /* unnecessary, but keeps Purify quiet */\n  entropy->pub.insufficient_data = FALSE;\n\n  /* Initialize private state variables */\n  entropy->saved.EOBRUN = 0;\n\n  /* Initialize restart counter */\n  entropy->restarts_to_go = cinfo->restart_interval;\n}\n\n\n/*\n * Figure F.12: extend sign bit.\n * On some machines, a shift and add will be faster than a table lookup.\n */\n\n#ifdef AVOID_TABLES\n\n#define HUFF_EXTEND(x,s)  ((x) < (1<<((s)-1)) ? (x) + (((-1)<<(s)) + 1) : (x))\n\n#else\n\n#define HUFF_EXTEND(x,s)  ((x) < extend_test[s] ? (x) + extend_offset[s] : (x))\n\nstatic const int extend_test[16] =   /* entry n is 2**(n-1) */\n  { 0, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080,\n    0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000 };\n\nstatic const int extend_offset[16] = /* entry n is (-1 << n) + 1 */\n  { 0, ((-1)<<1) + 1, ((-1)<<2) + 1, ((-1)<<3) + 1, ((-1)<<4) + 1,\n    ((-1)<<5) + 1, ((-1)<<6) + 1, ((-1)<<7) + 1, ((-1)<<8) + 1,\n    ((-1)<<9) + 1, ((-1)<<10) + 1, ((-1)<<11) + 1, ((-1)<<12) + 1,\n    ((-1)<<13) + 1, ((-1)<<14) + 1, ((-1)<<15) + 1 };\n\n#endif /* AVOID_TABLES */\n\n\n/*\n * Check for a restart marker & resynchronize decoder.\n * Returns FALSE if must suspend.\n */\n\nLOCAL(boolean)\nprocess_restart (j_decompress_ptr cinfo)\n{\n  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;\n  int ci;\n\n  /* Throw away any unused bits remaining in bit buffer; */\n  /* include any full bytes in next_marker's count of discarded bytes */\n  cinfo->marker->discarded_bytes += entropy->bitstate.bits_left / 8;\n  entropy->bitstate.bits_left = 0;\n\n  /* Advance past the RSTn marker */\n  if (! (*cinfo->marker->read_restart_marker) (cinfo))\n    return FALSE;\n\n  /* Re-initialize DC predictions to 0 */\n  for (ci = 0; ci < cinfo->comps_in_scan; ci++)\n    entropy->saved.last_dc_val[ci] = 0;\n  /* Re-init EOB run count, too */\n  entropy->saved.EOBRUN = 0;\n\n  /* Reset restart counter */\n  entropy->restarts_to_go = cinfo->restart_interval;\n\n  /* Reset out-of-data flag, unless read_restart_marker left us smack up\n   * against a marker.  In that case we will end up treating the next data\n   * segment as empty, and we can avoid producing bogus output pixels by\n   * leaving the flag set.\n   */\n  if (cinfo->unread_marker == 0)\n    entropy->pub.insufficient_data = FALSE;\n\n  return TRUE;\n}\n\n\n/*\n * Huffman MCU decoding.\n * Each of these routines decodes and returns one MCU's worth of\n * Huffman-compressed coefficients. \n * The coefficients are reordered from zigzag order into natural array order,\n * but are not dequantized.\n *\n * The i'th block of the MCU is stored into the block pointed to by\n * MCU_data[i].  WE ASSUME THIS AREA IS INITIALLY ZEROED BY THE CALLER.\n *\n * We return FALSE if data source requested suspension.  In that case no\n * changes have been made to permanent state.  (Exception: some output\n * coefficients may already have been assigned.  This is harmless for\n * spectral selection, since we'll just re-assign them on the next call.\n * Successive approximation AC refinement has to be more careful, however.)\n */\n\n/*\n * MCU decoding for DC initial scan (either spectral selection,\n * or first pass of successive approximation).\n */\n\nMETHODDEF(boolean)\ndecode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)\n{   \n  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;\n  int Al = cinfo->Al;\n  register int s, r;\n  int blkn, ci;\n  JBLOCKROW block;\n  BITREAD_STATE_VARS;\n  savable_state state;\n  d_derived_tbl * tbl;\n  jpeg_component_info * compptr;\n\n  /* Process restart marker if needed; may have to suspend */\n  if (cinfo->restart_interval) {\n    if (entropy->restarts_to_go == 0)\n      if (! process_restart(cinfo))\n\treturn FALSE;\n  }\n\n  /* If we've run out of data, just leave the MCU set to zeroes.\n   * This way, we return uniform gray for the remainder of the segment.\n   */\n  if (! entropy->pub.insufficient_data) {\n\n    /* Load up working state */\n    BITREAD_LOAD_STATE(cinfo,entropy->bitstate);\n    ASSIGN_STATE(state, entropy->saved);\n\n    /* Outer loop handles each block in the MCU */\n\n    for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {\n      block = MCU_data[blkn];\n      ci = cinfo->MCU_membership[blkn];\n      compptr = cinfo->cur_comp_info[ci];\n      tbl = entropy->derived_tbls[compptr->dc_tbl_no];\n\n      /* Decode a single block's worth of coefficients */\n\n      /* Section F.2.2.1: decode the DC coefficient difference */\n      HUFF_DECODE(s, br_state, tbl, return FALSE, label1);\n      if (s) {\n\tCHECK_BIT_BUFFER(br_state, s, return FALSE);\n\tr = GET_BITS(s);\n\ts = HUFF_EXTEND(r, s);\n      }\n\n      /* Convert DC difference to actual value, update last_dc_val */\n      s += state.last_dc_val[ci];\n      state.last_dc_val[ci] = s;\n      /* Scale and output the coefficient (assumes jpeg_natural_order[0]=0) */\n      (*block)[0] = (JCOEF) (s << Al);\n    }\n\n    /* Completed MCU, so update state */\n    BITREAD_SAVE_STATE(cinfo,entropy->bitstate);\n    ASSIGN_STATE(entropy->saved, state);\n  }\n\n  /* Account for restart interval (no-op if not using restarts) */\n  entropy->restarts_to_go--;\n\n  return TRUE;\n}\n\n\n/*\n * MCU decoding for AC initial scan (either spectral selection,\n * or first pass of successive approximation).\n */\n\nMETHODDEF(boolean)\ndecode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)\n{   \n  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;\n  int Se = cinfo->Se;\n  int Al = cinfo->Al;\n  register int s, k, r;\n  unsigned int EOBRUN;\n  JBLOCKROW block;\n  BITREAD_STATE_VARS;\n  d_derived_tbl * tbl;\n\n  /* Process restart marker if needed; may have to suspend */\n  if (cinfo->restart_interval) {\n    if (entropy->restarts_to_go == 0)\n      if (! process_restart(cinfo))\n\treturn FALSE;\n  }\n\n  /* If we've run out of data, just leave the MCU set to zeroes.\n   * This way, we return uniform gray for the remainder of the segment.\n   */\n  if (! entropy->pub.insufficient_data) {\n\n    /* Load up working state.\n     * We can avoid loading/saving bitread state if in an EOB run.\n     */\n    EOBRUN = entropy->saved.EOBRUN;\t/* only part of saved state we need */\n\n    /* There is always only one block per MCU */\n\n    if (EOBRUN > 0)\t\t/* if it's a band of zeroes... */\n      EOBRUN--;\t\t\t/* ...process it now (we do nothing) */\n    else {\n      BITREAD_LOAD_STATE(cinfo,entropy->bitstate);\n      block = MCU_data[0];\n      tbl = entropy->ac_derived_tbl;\n\n      for (k = cinfo->Ss; k <= Se; k++) {\n\tHUFF_DECODE(s, br_state, tbl, return FALSE, label2);\n\tr = s >> 4;\n\ts &= 15;\n\tif (s) {\n\t  k += r;\n\t  CHECK_BIT_BUFFER(br_state, s, return FALSE);\n\t  r = GET_BITS(s);\n\t  s = HUFF_EXTEND(r, s);\n\t  /* Scale and output coefficient in natural (dezigzagged) order */\n\t  (*block)[jpeg_natural_order[k]] = (JCOEF) (s << Al);\n\t} else {\n\t  if (r == 15) {\t/* ZRL */\n\t    k += 15;\t\t/* skip 15 zeroes in band */\n\t  } else {\t\t/* EOBr, run length is 2^r + appended bits */\n\t    EOBRUN = 1 << r;\n\t    if (r) {\t\t/* EOBr, r > 0 */\n\t      CHECK_BIT_BUFFER(br_state, r, return FALSE);\n\t      r = GET_BITS(r);\n\t      EOBRUN += r;\n\t    }\n\t    EOBRUN--;\t\t/* this band is processed at this moment */\n\t    break;\t\t/* force end-of-band */\n\t  }\n\t}\n      }\n\n      BITREAD_SAVE_STATE(cinfo,entropy->bitstate);\n    }\n\n    /* Completed MCU, so update state */\n    entropy->saved.EOBRUN = EOBRUN;\t/* only part of saved state we need */\n  }\n\n  /* Account for restart interval (no-op if not using restarts) */\n  entropy->restarts_to_go--;\n\n  return TRUE;\n}\n\n\n/*\n * MCU decoding for DC successive approximation refinement scan.\n * Note: we assume such scans can be multi-component, although the spec\n * is not very clear on the point.\n */\n\nMETHODDEF(boolean)\ndecode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)\n{   \n  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;\n  int p1 = 1 << cinfo->Al;\t/* 1 in the bit position being coded */\n  int blkn;\n  JBLOCKROW block;\n  BITREAD_STATE_VARS;\n\n  /* Process restart marker if needed; may have to suspend */\n  if (cinfo->restart_interval) {\n    if (entropy->restarts_to_go == 0)\n      if (! process_restart(cinfo))\n\treturn FALSE;\n  }\n\n  /* Not worth the cycles to check insufficient_data here,\n   * since we will not change the data anyway if we read zeroes.\n   */\n\n  /* Load up working state */\n  BITREAD_LOAD_STATE(cinfo,entropy->bitstate);\n\n  /* Outer loop handles each block in the MCU */\n\n  for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {\n    block = MCU_data[blkn];\n\n    /* Encoded data is simply the next bit of the two's-complement DC value */\n    CHECK_BIT_BUFFER(br_state, 1, return FALSE);\n    if (GET_BITS(1))\n      (*block)[0] |= p1;\n    /* Note: since we use |=, repeating the assignment later is safe */\n  }\n\n  /* Completed MCU, so update state */\n  BITREAD_SAVE_STATE(cinfo,entropy->bitstate);\n\n  /* Account for restart interval (no-op if not using restarts) */\n  entropy->restarts_to_go--;\n\n  return TRUE;\n}\n\n\n/*\n * MCU decoding for AC successive approximation refinement scan.\n */\n\nMETHODDEF(boolean)\ndecode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)\n{   \n  phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;\n  int Se = cinfo->Se;\n  int p1 = 1 << cinfo->Al;\t/* 1 in the bit position being coded */\n  int m1 = (-1) << cinfo->Al;\t/* -1 in the bit position being coded */\n  register int s, k, r;\n  unsigned int EOBRUN;\n  JBLOCKROW block;\n  JCOEFPTR thiscoef;\n  BITREAD_STATE_VARS;\n  d_derived_tbl * tbl;\n  int num_newnz;\n  int newnz_pos[DCTSIZE2];\n\n  /* Process restart marker if needed; may have to suspend */\n  if (cinfo->restart_interval) {\n    if (entropy->restarts_to_go == 0)\n      if (! process_restart(cinfo))\n\treturn FALSE;\n  }\n\n  /* If we've run out of data, don't modify the MCU.\n   */\n  if (! entropy->pub.insufficient_data) {\n\n    /* Load up working state */\n    BITREAD_LOAD_STATE(cinfo,entropy->bitstate);\n    EOBRUN = entropy->saved.EOBRUN; /* only part of saved state we need */\n\n    /* There is always only one block per MCU */\n    block = MCU_data[0];\n    tbl = entropy->ac_derived_tbl;\n\n    /* If we are forced to suspend, we must undo the assignments to any newly\n     * nonzero coefficients in the block, because otherwise we'd get confused\n     * next time about which coefficients were already nonzero.\n     * But we need not undo addition of bits to already-nonzero coefficients;\n     * instead, we can test the current bit to see if we already did it.\n     */\n    num_newnz = 0;\n\n    /* initialize coefficient loop counter to start of band */\n    k = cinfo->Ss;\n\n    if (EOBRUN == 0) {\n      for (; k <= Se; k++) {\n\tHUFF_DECODE(s, br_state, tbl, goto undoit, label3);\n\tr = s >> 4;\n\ts &= 15;\n\tif (s) {\n\t  if (s != 1)\t\t/* size of new coef should always be 1 */\n\t    WARNMS(cinfo, JWRN_HUFF_BAD_CODE);\n\t  CHECK_BIT_BUFFER(br_state, 1, goto undoit);\n\t  if (GET_BITS(1))\n\t    s = p1;\t\t/* newly nonzero coef is positive */\n\t  else\n\t    s = m1;\t\t/* newly nonzero coef is negative */\n\t} else {\n\t  if (r != 15) {\n\t    EOBRUN = 1 << r;\t/* EOBr, run length is 2^r + appended bits */\n\t    if (r) {\n\t      CHECK_BIT_BUFFER(br_state, r, goto undoit);\n\t      r = GET_BITS(r);\n\t      EOBRUN += r;\n\t    }\n\t    break;\t\t/* rest of block is handled by EOB logic */\n\t  }\n\t  /* note s = 0 for processing ZRL */\n\t}\n\t/* Advance over already-nonzero coefs and r still-zero coefs,\n\t * appending correction bits to the nonzeroes.  A correction bit is 1\n\t * if the absolute value of the coefficient must be increased.\n\t */\n\tdo {\n\t  thiscoef = *block + jpeg_natural_order[k];\n\t  if (*thiscoef != 0) {\n\t    CHECK_BIT_BUFFER(br_state, 1, goto undoit);\n\t    if (GET_BITS(1)) {\n\t      if ((*thiscoef & p1) == 0) { /* do nothing if already set it */\n\t\tif (*thiscoef >= 0)\n\t\t  *thiscoef += p1;\n\t\telse\n\t\t  *thiscoef += m1;\n\t      }\n\t    }\n\t  } else {\n\t    if (--r < 0)\n\t      break;\t\t/* reached target zero coefficient */\n\t  }\n\t  k++;\n\t} while (k <= Se);\n\tif (s) {\n\t  int pos = jpeg_natural_order[k];\n\t  /* Output newly nonzero coefficient */\n\t  (*block)[pos] = (JCOEF) s;\n\t  /* Remember its position in case we have to suspend */\n\t  newnz_pos[num_newnz++] = pos;\n\t}\n      }\n    }\n\n    if (EOBRUN > 0) {\n      /* Scan any remaining coefficient positions after the end-of-band\n       * (the last newly nonzero coefficient, if any).  Append a correction\n       * bit to each already-nonzero coefficient.  A correction bit is 1\n       * if the absolute value of the coefficient must be increased.\n       */\n      for (; k <= Se; k++) {\n\tthiscoef = *block + jpeg_natural_order[k];\n\tif (*thiscoef != 0) {\n\t  CHECK_BIT_BUFFER(br_state, 1, goto undoit);\n\t  if (GET_BITS(1)) {\n\t    if ((*thiscoef & p1) == 0) { /* do nothing if already changed it */\n\t      if (*thiscoef >= 0)\n\t\t*thiscoef += p1;\n\t      else\n\t\t*thiscoef += m1;\n\t    }\n\t  }\n\t}\n      }\n      /* Count one block completed in EOB run */\n      EOBRUN--;\n    }\n\n    /* Completed MCU, so update state */\n    BITREAD_SAVE_STATE(cinfo,entropy->bitstate);\n    entropy->saved.EOBRUN = EOBRUN; /* only part of saved state we need */\n  }\n\n  /* Account for restart interval (no-op if not using restarts) */\n  entropy->restarts_to_go--;\n\n  return TRUE;\n\nundoit:\n  /* Re-zero any output coefficients that we made newly nonzero */\n  while (num_newnz > 0)\n    (*block)[newnz_pos[--num_newnz]] = 0;\n\n  return FALSE;\n}\n\n\n/*\n * Module initialization routine for progressive Huffman entropy decoding.\n */\n\nGLOBAL(void)\njinit_phuff_decoder (j_decompress_ptr cinfo)\n{\n  phuff_entropy_ptr entropy;\n  int *coef_bit_ptr;\n  int ci, i;\n\n  entropy = (phuff_entropy_ptr)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\tSIZEOF(phuff_entropy_decoder));\n  cinfo->entropy = (struct jpeg_entropy_decoder *) entropy;\n  entropy->pub.start_pass = start_pass_phuff_decoder;\n\n  /* Mark derived tables unallocated */\n  for (i = 0; i < NUM_HUFF_TBLS; i++) {\n    entropy->derived_tbls[i] = NULL;\n  }\n\n  /* Create progression status table */\n  cinfo->coef_bits = (int (*)[DCTSIZE2])\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\tcinfo->num_components*DCTSIZE2*SIZEOF(int));\n  coef_bit_ptr = & cinfo->coef_bits[0][0];\n  for (ci = 0; ci < cinfo->num_components; ci++) \n    for (i = 0; i < DCTSIZE2; i++)\n      *coef_bit_ptr++ = -1;\n}\n\n#endif /* D_PROGRESSIVE_SUPPORTED */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jdpostct.c",
    "content": "/*\n * jdpostct.c\n *\n * Copyright (C) 1994-1996, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains the decompression postprocessing controller.\n * This controller manages the upsampling, color conversion, and color\n * quantization/reduction steps; specifically, it controls the buffering\n * between upsample/color conversion and color quantization/reduction.\n *\n * If no color quantization/reduction is required, then this module has no\n * work to do, and it just hands off to the upsample/color conversion code.\n * An integrated upsample/convert/quantize process would replace this module\n * entirely.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n\n\n/* Private buffer controller object */\n\ntypedef struct {\n  struct jpeg_d_post_controller pub; /* public fields */\n\n  /* Color quantization source buffer: this holds output data from\n   * the upsample/color conversion step to be passed to the quantizer.\n   * For two-pass color quantization, we need a full-image buffer;\n   * for one-pass operation, a strip buffer is sufficient.\n   */\n  jvirt_sarray_ptr whole_image;\t/* virtual array, or NULL if one-pass */\n  JSAMPARRAY buffer;\t\t/* strip buffer, or current strip of virtual */\n  JDIMENSION strip_height;\t/* buffer size in rows */\n  /* for two-pass mode only: */\n  JDIMENSION starting_row;\t/* row # of first row in current strip */\n  JDIMENSION next_row;\t\t/* index of next row to fill/empty in strip */\n} my_post_controller;\n\ntypedef my_post_controller * my_post_ptr;\n\n\n/* Forward declarations */\nMETHODDEF(void) post_process_1pass\n\tJPP((j_decompress_ptr cinfo,\n\t     JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,\n\t     JDIMENSION in_row_groups_avail,\n\t     JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,\n\t     JDIMENSION out_rows_avail));\n#ifdef QUANT_2PASS_SUPPORTED\nMETHODDEF(void) post_process_prepass\n\tJPP((j_decompress_ptr cinfo,\n\t     JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,\n\t     JDIMENSION in_row_groups_avail,\n\t     JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,\n\t     JDIMENSION out_rows_avail));\nMETHODDEF(void) post_process_2pass\n\tJPP((j_decompress_ptr cinfo,\n\t     JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,\n\t     JDIMENSION in_row_groups_avail,\n\t     JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,\n\t     JDIMENSION out_rows_avail));\n#endif\n\n\n/*\n * Initialize for a processing pass.\n */\n\nMETHODDEF(void)\nstart_pass_dpost (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)\n{\n  my_post_ptr post = (my_post_ptr) cinfo->post;\n\n  switch (pass_mode) {\n  case JBUF_PASS_THRU:\n    if (cinfo->quantize_colors) {\n      /* Single-pass processing with color quantization. */\n      post->pub.post_process_data = post_process_1pass;\n      /* We could be doing buffered-image output before starting a 2-pass\n       * color quantization; in that case, jinit_d_post_controller did not\n       * allocate a strip buffer.  Use the virtual-array buffer as workspace.\n       */\n      if (post->buffer == NULL) {\n\tpost->buffer = (*cinfo->mem->access_virt_sarray)\n\t  ((j_common_ptr) cinfo, post->whole_image,\n\t   (JDIMENSION) 0, post->strip_height, TRUE);\n      }\n    } else {\n      /* For single-pass processing without color quantization,\n       * I have no work to do; just call the upsampler directly.\n       */\n      post->pub.post_process_data = cinfo->upsample->upsample;\n    }\n    break;\n#ifdef QUANT_2PASS_SUPPORTED\n  case JBUF_SAVE_AND_PASS:\n    /* First pass of 2-pass quantization */\n    if (post->whole_image == NULL)\n      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);\n    post->pub.post_process_data = post_process_prepass;\n    break;\n  case JBUF_CRANK_DEST:\n    /* Second pass of 2-pass quantization */\n    if (post->whole_image == NULL)\n      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);\n    post->pub.post_process_data = post_process_2pass;\n    break;\n#endif /* QUANT_2PASS_SUPPORTED */\n  default:\n    ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);\n    break;\n  }\n  post->starting_row = post->next_row = 0;\n}\n\n\n/*\n * Process some data in the one-pass (strip buffer) case.\n * This is used for color precision reduction as well as one-pass quantization.\n */\n\nMETHODDEF(void)\npost_process_1pass (j_decompress_ptr cinfo,\n\t\t    JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,\n\t\t    JDIMENSION in_row_groups_avail,\n\t\t    JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,\n\t\t    JDIMENSION out_rows_avail)\n{\n  my_post_ptr post = (my_post_ptr) cinfo->post;\n  JDIMENSION num_rows, max_rows;\n\n  /* Fill the buffer, but not more than what we can dump out in one go. */\n  /* Note we rely on the upsampler to detect bottom of image. */\n  max_rows = out_rows_avail - *out_row_ctr;\n  if (max_rows > post->strip_height)\n    max_rows = post->strip_height;\n  num_rows = 0;\n  (*cinfo->upsample->upsample) (cinfo,\n\t\tinput_buf, in_row_group_ctr, in_row_groups_avail,\n\t\tpost->buffer, &num_rows, max_rows);\n  /* Quantize and emit data. */\n  (*cinfo->cquantize->color_quantize) (cinfo,\n\t\tpost->buffer, output_buf + *out_row_ctr, (int) num_rows);\n  *out_row_ctr += num_rows;\n}\n\n\n#ifdef QUANT_2PASS_SUPPORTED\n\n/*\n * Process some data in the first pass of 2-pass quantization.\n */\n\nMETHODDEF(void)\npost_process_prepass (j_decompress_ptr cinfo,\n\t\t      JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,\n\t\t      JDIMENSION in_row_groups_avail,\n\t\t      JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,\n\t\t      JDIMENSION out_rows_avail)\n{\n  my_post_ptr post = (my_post_ptr) cinfo->post;\n  JDIMENSION old_next_row, num_rows;\n\n  /* Reposition virtual buffer if at start of strip. */\n  if (post->next_row == 0) {\n    post->buffer = (*cinfo->mem->access_virt_sarray)\n\t((j_common_ptr) cinfo, post->whole_image,\n\t post->starting_row, post->strip_height, TRUE);\n  }\n\n  /* Upsample some data (up to a strip height's worth). */\n  old_next_row = post->next_row;\n  (*cinfo->upsample->upsample) (cinfo,\n\t\tinput_buf, in_row_group_ctr, in_row_groups_avail,\n\t\tpost->buffer, &post->next_row, post->strip_height);\n\n  /* Allow quantizer to scan new data.  No data is emitted, */\n  /* but we advance out_row_ctr so outer loop can tell when we're done. */\n  if (post->next_row > old_next_row) {\n    num_rows = post->next_row - old_next_row;\n    (*cinfo->cquantize->color_quantize) (cinfo, post->buffer + old_next_row,\n\t\t\t\t\t (JSAMPARRAY) NULL, (int) num_rows);\n    *out_row_ctr += num_rows;\n  }\n\n  /* Advance if we filled the strip. */\n  if (post->next_row >= post->strip_height) {\n    post->starting_row += post->strip_height;\n    post->next_row = 0;\n  }\n}\n\n\n/*\n * Process some data in the second pass of 2-pass quantization.\n */\n\nMETHODDEF(void)\npost_process_2pass (j_decompress_ptr cinfo,\n\t\t    JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,\n\t\t    JDIMENSION in_row_groups_avail,\n\t\t    JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,\n\t\t    JDIMENSION out_rows_avail)\n{\n  my_post_ptr post = (my_post_ptr) cinfo->post;\n  JDIMENSION num_rows, max_rows;\n\n  /* Reposition virtual buffer if at start of strip. */\n  if (post->next_row == 0) {\n    post->buffer = (*cinfo->mem->access_virt_sarray)\n\t((j_common_ptr) cinfo, post->whole_image,\n\t post->starting_row, post->strip_height, FALSE);\n  }\n\n  /* Determine number of rows to emit. */\n  num_rows = post->strip_height - post->next_row; /* available in strip */\n  max_rows = out_rows_avail - *out_row_ctr; /* available in output area */\n  if (num_rows > max_rows)\n    num_rows = max_rows;\n  /* We have to check bottom of image here, can't depend on upsampler. */\n  max_rows = cinfo->output_height - post->starting_row;\n  if (num_rows > max_rows)\n    num_rows = max_rows;\n\n  /* Quantize and emit data. */\n  (*cinfo->cquantize->color_quantize) (cinfo,\n\t\tpost->buffer + post->next_row, output_buf + *out_row_ctr,\n\t\t(int) num_rows);\n  *out_row_ctr += num_rows;\n\n  /* Advance if we filled the strip. */\n  post->next_row += num_rows;\n  if (post->next_row >= post->strip_height) {\n    post->starting_row += post->strip_height;\n    post->next_row = 0;\n  }\n}\n\n#endif /* QUANT_2PASS_SUPPORTED */\n\n\n/*\n * Initialize postprocessing controller.\n */\n\nGLOBAL(void)\njinit_d_post_controller (j_decompress_ptr cinfo, boolean need_full_buffer)\n{\n  my_post_ptr post;\n\n  post = (my_post_ptr)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\tSIZEOF(my_post_controller));\n  cinfo->post = (struct jpeg_d_post_controller *) post;\n  post->pub.start_pass = start_pass_dpost;\n  post->whole_image = NULL;\t/* flag for no virtual arrays */\n  post->buffer = NULL;\t\t/* flag for no strip buffer */\n\n  /* Create the quantization buffer, if needed */\n  if (cinfo->quantize_colors) {\n    /* The buffer strip height is max_v_samp_factor, which is typically\n     * an efficient number of rows for upsampling to return.\n     * (In the presence of output rescaling, we might want to be smarter?)\n     */\n    post->strip_height = (JDIMENSION) cinfo->max_v_samp_factor;\n    if (need_full_buffer) {\n      /* Two-pass color quantization: need full-image storage. */\n      /* We round up the number of rows to a multiple of the strip height. */\n#ifdef QUANT_2PASS_SUPPORTED\n      post->whole_image = (*cinfo->mem->request_virt_sarray)\n\t((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE,\n\t cinfo->output_width * cinfo->out_color_components,\n\t (JDIMENSION) jround_up((long) cinfo->output_height,\n\t\t\t\t(long) post->strip_height),\n\t post->strip_height);\n#else\n      ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);\n#endif /* QUANT_2PASS_SUPPORTED */\n    } else {\n      /* One-pass color quantization: just make a strip buffer. */\n      post->buffer = (*cinfo->mem->alloc_sarray)\n\t((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t cinfo->output_width * cinfo->out_color_components,\n\t post->strip_height);\n    }\n  }\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jdsample.c",
    "content": "/*\n * jdsample.c\n *\n * Copyright (C) 1991-1996, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains upsampling routines.\n *\n * Upsampling input data is counted in \"row groups\".  A row group\n * is defined to be (v_samp_factor * DCT_scaled_size / min_DCT_scaled_size)\n * sample rows of each component.  Upsampling will normally produce\n * max_v_samp_factor pixel rows from each row group (but this could vary\n * if the upsampler is applying a scale factor of its own).\n *\n * An excellent reference for image resampling is\n *   Digital Image Warping, George Wolberg, 1990.\n *   Pub. by IEEE Computer Society Press, Los Alamitos, CA. ISBN 0-8186-8944-7.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n\n\n/* Pointer to routine to upsample a single component */\ntypedef JMETHOD(void, upsample1_ptr,\n\t\t(j_decompress_ptr cinfo, jpeg_component_info * compptr,\n\t\t JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));\n\n/* Private subobject */\n\ntypedef struct {\n  struct jpeg_upsampler pub;\t/* public fields */\n\n  /* Color conversion buffer.  When using separate upsampling and color\n   * conversion steps, this buffer holds one upsampled row group until it\n   * has been color converted and output.\n   * Note: we do not allocate any storage for component(s) which are full-size,\n   * ie do not need rescaling.  The corresponding entry of color_buf[] is\n   * simply set to point to the input data array, thereby avoiding copying.\n   */\n  JSAMPARRAY color_buf[MAX_COMPONENTS];\n\n  /* Per-component upsampling method pointers */\n  upsample1_ptr methods[MAX_COMPONENTS];\n\n  int next_row_out;\t\t/* counts rows emitted from color_buf */\n  JDIMENSION rows_to_go;\t/* counts rows remaining in image */\n\n  /* Height of an input row group for each component. */\n  int rowgroup_height[MAX_COMPONENTS];\n\n  /* These arrays save pixel expansion factors so that int_expand need not\n   * recompute them each time.  They are unused for other upsampling methods.\n   */\n  UINT8 h_expand[MAX_COMPONENTS];\n  UINT8 v_expand[MAX_COMPONENTS];\n} my_upsampler;\n\ntypedef my_upsampler * my_upsample_ptr;\n\n\n/*\n * Initialize for an upsampling pass.\n */\n\nMETHODDEF(void)\nstart_pass_upsample (j_decompress_ptr cinfo)\n{\n  my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;\n\n  /* Mark the conversion buffer empty */\n  upsample->next_row_out = cinfo->max_v_samp_factor;\n  /* Initialize total-height counter for detecting bottom of image */\n  upsample->rows_to_go = cinfo->output_height;\n}\n\n\n/*\n * Control routine to do upsampling (and color conversion).\n *\n * In this version we upsample each component independently.\n * We upsample one row group into the conversion buffer, then apply\n * color conversion a row at a time.\n */\n\nMETHODDEF(void)\nsep_upsample (j_decompress_ptr cinfo,\n\t      JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,\n\t      JDIMENSION in_row_groups_avail,\n\t      JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,\n\t      JDIMENSION out_rows_avail)\n{\n  my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;\n  int ci;\n  jpeg_component_info * compptr;\n  JDIMENSION num_rows;\n\n  /* Fill the conversion buffer, if it's empty */\n  if (upsample->next_row_out >= cinfo->max_v_samp_factor) {\n    for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n\t ci++, compptr++) {\n      /* Invoke per-component upsample method.  Notice we pass a POINTER\n       * to color_buf[ci], so that fullsize_upsample can change it.\n       */\n      (*upsample->methods[ci]) (cinfo, compptr,\n\tinput_buf[ci] + (*in_row_group_ctr * upsample->rowgroup_height[ci]),\n\tupsample->color_buf + ci);\n    }\n    upsample->next_row_out = 0;\n  }\n\n  /* Color-convert and emit rows */\n\n  /* How many we have in the buffer: */\n  num_rows = (JDIMENSION) (cinfo->max_v_samp_factor - upsample->next_row_out);\n  /* Not more than the distance to the end of the image.  Need this test\n   * in case the image height is not a multiple of max_v_samp_factor:\n   */\n  if (num_rows > upsample->rows_to_go) \n    num_rows = upsample->rows_to_go;\n  /* And not more than what the client can accept: */\n  out_rows_avail -= *out_row_ctr;\n  if (num_rows > out_rows_avail)\n    num_rows = out_rows_avail;\n\n  (*cinfo->cconvert->color_convert) (cinfo, upsample->color_buf,\n\t\t\t\t     (JDIMENSION) upsample->next_row_out,\n\t\t\t\t     output_buf + *out_row_ctr,\n\t\t\t\t     (int) num_rows);\n\n  /* Adjust counts */\n  *out_row_ctr += num_rows;\n  upsample->rows_to_go -= num_rows;\n  upsample->next_row_out += num_rows;\n  /* When the buffer is emptied, declare this input row group consumed */\n  if (upsample->next_row_out >= cinfo->max_v_samp_factor)\n    (*in_row_group_ctr)++;\n}\n\n\n/*\n * These are the routines invoked by sep_upsample to upsample pixel values\n * of a single component.  One row group is processed per call.\n */\n\n\n/*\n * For full-size components, we just make color_buf[ci] point at the\n * input buffer, and thus avoid copying any data.  Note that this is\n * safe only because sep_upsample doesn't declare the input row group\n * \"consumed\" until we are done color converting and emitting it.\n */\n\nMETHODDEF(void)\nfullsize_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,\n\t\t   JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)\n{\n  *output_data_ptr = input_data;\n}\n\n\n/*\n * This is a no-op version used for \"uninteresting\" components.\n * These components will not be referenced by color conversion.\n */\n\nMETHODDEF(void)\nnoop_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,\n\t       JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)\n{\n  *output_data_ptr = NULL;\t/* safety check */\n}\n\n\n/*\n * This version handles any integral sampling ratios.\n * This is not used for typical JPEG files, so it need not be fast.\n * Nor, for that matter, is it particularly accurate: the algorithm is\n * simple replication of the input pixel onto the corresponding output\n * pixels.  The hi-falutin sampling literature refers to this as a\n * \"box filter\".  A box filter tends to introduce visible artifacts,\n * so if you are actually going to use 3:1 or 4:1 sampling ratios\n * you would be well advised to improve this code.\n */\n\nMETHODDEF(void)\nint_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,\n\t      JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)\n{\n  my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;\n  JSAMPARRAY output_data = *output_data_ptr;\n  register JSAMPROW inptr, outptr;\n  register JSAMPLE invalue;\n  register int h;\n  JSAMPROW outend;\n  int h_expand, v_expand;\n  int inrow, outrow;\n\n  h_expand = upsample->h_expand[compptr->component_index];\n  v_expand = upsample->v_expand[compptr->component_index];\n\n  inrow = outrow = 0;\n  while (outrow < cinfo->max_v_samp_factor) {\n    /* Generate one output row with proper horizontal expansion */\n    inptr = input_data[inrow];\n    outptr = output_data[outrow];\n    outend = outptr + cinfo->output_width;\n    while (outptr < outend) {\n      invalue = *inptr++;\t/* don't need GETJSAMPLE() here */\n      for (h = h_expand; h > 0; h--) {\n\t*outptr++ = invalue;\n      }\n    }\n    /* Generate any additional output rows by duplicating the first one */\n    if (v_expand > 1) {\n      jcopy_sample_rows(output_data, outrow, output_data, outrow+1,\n\t\t\tv_expand-1, cinfo->output_width);\n    }\n    inrow++;\n    outrow += v_expand;\n  }\n}\n\n\n/*\n * Fast processing for the common case of 2:1 horizontal and 1:1 vertical.\n * It's still a box filter.\n */\n\nMETHODDEF(void)\nh2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,\n\t       JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)\n{\n  JSAMPARRAY output_data = *output_data_ptr;\n  register JSAMPROW inptr, outptr;\n  register JSAMPLE invalue;\n  JSAMPROW outend;\n  int inrow;\n\n  for (inrow = 0; inrow < cinfo->max_v_samp_factor; inrow++) {\n    inptr = input_data[inrow];\n    outptr = output_data[inrow];\n    outend = outptr + cinfo->output_width;\n    while (outptr < outend) {\n      invalue = *inptr++;\t/* don't need GETJSAMPLE() here */\n      *outptr++ = invalue;\n      *outptr++ = invalue;\n    }\n  }\n}\n\n\n/*\n * Fast processing for the common case of 2:1 horizontal and 2:1 vertical.\n * It's still a box filter.\n */\n\nMETHODDEF(void)\nh2v2_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,\n\t       JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)\n{\n  JSAMPARRAY output_data = *output_data_ptr;\n  register JSAMPROW inptr, outptr;\n  register JSAMPLE invalue;\n  JSAMPROW outend;\n  int inrow, outrow;\n\n  inrow = outrow = 0;\n  while (outrow < cinfo->max_v_samp_factor) {\n    inptr = input_data[inrow];\n    outptr = output_data[outrow];\n    outend = outptr + cinfo->output_width;\n    while (outptr < outend) {\n      invalue = *inptr++;\t/* don't need GETJSAMPLE() here */\n      *outptr++ = invalue;\n      *outptr++ = invalue;\n    }\n    jcopy_sample_rows(output_data, outrow, output_data, outrow+1,\n\t\t      1, cinfo->output_width);\n    inrow++;\n    outrow += 2;\n  }\n}\n\n\n/*\n * Fancy processing for the common case of 2:1 horizontal and 1:1 vertical.\n *\n * The upsampling algorithm is linear interpolation between pixel centers,\n * also known as a \"triangle filter\".  This is a good compromise between\n * speed and visual quality.  The centers of the output pixels are 1/4 and 3/4\n * of the way between input pixel centers.\n *\n * A note about the \"bias\" calculations: when rounding fractional values to\n * integer, we do not want to always round 0.5 up to the next integer.\n * If we did that, we'd introduce a noticeable bias towards larger values.\n * Instead, this code is arranged so that 0.5 will be rounded up or down at\n * alternate pixel locations (a simple ordered dither pattern).\n */\n\nMETHODDEF(void)\nh2v1_fancy_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,\n\t\t     JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)\n{\n  JSAMPARRAY output_data = *output_data_ptr;\n  register JSAMPROW inptr, outptr;\n  register int invalue;\n  register JDIMENSION colctr;\n  int inrow;\n\n  for (inrow = 0; inrow < cinfo->max_v_samp_factor; inrow++) {\n    inptr = input_data[inrow];\n    outptr = output_data[inrow];\n    /* Special case for first column */\n    invalue = GETJSAMPLE(*inptr++);\n    *outptr++ = (JSAMPLE) invalue;\n    *outptr++ = (JSAMPLE) ((invalue * 3 + GETJSAMPLE(*inptr) + 2) >> 2);\n\n    for (colctr = compptr->downsampled_width - 2; colctr > 0; colctr--) {\n      /* General case: 3/4 * nearer pixel + 1/4 * further pixel */\n      invalue = GETJSAMPLE(*inptr++) * 3;\n      *outptr++ = (JSAMPLE) ((invalue + GETJSAMPLE(inptr[-2]) + 1) >> 2);\n      *outptr++ = (JSAMPLE) ((invalue + GETJSAMPLE(*inptr) + 2) >> 2);\n    }\n\n    /* Special case for last column */\n    invalue = GETJSAMPLE(*inptr);\n    *outptr++ = (JSAMPLE) ((invalue * 3 + GETJSAMPLE(inptr[-1]) + 1) >> 2);\n    *outptr++ = (JSAMPLE) invalue;\n  }\n}\n\n\n/*\n * Fancy processing for the common case of 2:1 horizontal and 2:1 vertical.\n * Again a triangle filter; see comments for h2v1 case, above.\n *\n * It is OK for us to reference the adjacent input rows because we demanded\n * context from the main buffer controller (see initialization code).\n */\n\nMETHODDEF(void)\nh2v2_fancy_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,\n\t\t     JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)\n{\n  JSAMPARRAY output_data = *output_data_ptr;\n  register JSAMPROW inptr0, inptr1, outptr;\n#if BITS_IN_JSAMPLE == 8\n  register int thiscolsum, lastcolsum, nextcolsum;\n#else\n  register INT32 thiscolsum, lastcolsum, nextcolsum;\n#endif\n  register JDIMENSION colctr;\n  int inrow, outrow, v;\n\n  inrow = outrow = 0;\n  while (outrow < cinfo->max_v_samp_factor) {\n    for (v = 0; v < 2; v++) {\n      /* inptr0 points to nearest input row, inptr1 points to next nearest */\n      inptr0 = input_data[inrow];\n      if (v == 0)\t\t/* next nearest is row above */\n\tinptr1 = input_data[inrow-1];\n      else\t\t\t/* next nearest is row below */\n\tinptr1 = input_data[inrow+1];\n      outptr = output_data[outrow++];\n\n      /* Special case for first column */\n      thiscolsum = GETJSAMPLE(*inptr0++) * 3 + GETJSAMPLE(*inptr1++);\n      nextcolsum = GETJSAMPLE(*inptr0++) * 3 + GETJSAMPLE(*inptr1++);\n      *outptr++ = (JSAMPLE) ((thiscolsum * 4 + 8) >> 4);\n      *outptr++ = (JSAMPLE) ((thiscolsum * 3 + nextcolsum + 7) >> 4);\n      lastcolsum = thiscolsum; thiscolsum = nextcolsum;\n\n      for (colctr = compptr->downsampled_width - 2; colctr > 0; colctr--) {\n\t/* General case: 3/4 * nearer pixel + 1/4 * further pixel in each */\n\t/* dimension, thus 9/16, 3/16, 3/16, 1/16 overall */\n\tnextcolsum = GETJSAMPLE(*inptr0++) * 3 + GETJSAMPLE(*inptr1++);\n\t*outptr++ = (JSAMPLE) ((thiscolsum * 3 + lastcolsum + 8) >> 4);\n\t*outptr++ = (JSAMPLE) ((thiscolsum * 3 + nextcolsum + 7) >> 4);\n\tlastcolsum = thiscolsum; thiscolsum = nextcolsum;\n      }\n\n      /* Special case for last column */\n      *outptr++ = (JSAMPLE) ((thiscolsum * 3 + lastcolsum + 8) >> 4);\n      *outptr++ = (JSAMPLE) ((thiscolsum * 4 + 7) >> 4);\n    }\n    inrow++;\n  }\n}\n\n\n/*\n * Module initialization routine for upsampling.\n */\n\nGLOBAL(void)\njinit_upsampler (j_decompress_ptr cinfo)\n{\n  my_upsample_ptr upsample;\n  int ci;\n  jpeg_component_info * compptr;\n  boolean need_buffer, do_fancy;\n  int h_in_group, v_in_group, h_out_group, v_out_group;\n\n  upsample = (my_upsample_ptr)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\tSIZEOF(my_upsampler));\n  cinfo->upsample = (struct jpeg_upsampler *) upsample;\n  upsample->pub.start_pass = start_pass_upsample;\n  upsample->pub.upsample = sep_upsample;\n  upsample->pub.need_context_rows = FALSE; /* until we find out differently */\n\n  if (cinfo->CCIR601_sampling)\t/* this isn't supported */\n    ERREXIT(cinfo, JERR_CCIR601_NOTIMPL);\n\n  /* jdmainct.c doesn't support context rows when min_DCT_scaled_size = 1,\n   * so don't ask for it.\n   */\n  do_fancy = cinfo->do_fancy_upsampling && cinfo->min_DCT_scaled_size > 1;\n\n  /* Verify we can handle the sampling factors, select per-component methods,\n   * and create storage as needed.\n   */\n  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;\n       ci++, compptr++) {\n    /* Compute size of an \"input group\" after IDCT scaling.  This many samples\n     * are to be converted to max_h_samp_factor * max_v_samp_factor pixels.\n     */\n    h_in_group = (compptr->h_samp_factor * compptr->DCT_scaled_size) /\n\t\t cinfo->min_DCT_scaled_size;\n    v_in_group = (compptr->v_samp_factor * compptr->DCT_scaled_size) /\n\t\t cinfo->min_DCT_scaled_size;\n    h_out_group = cinfo->max_h_samp_factor;\n    v_out_group = cinfo->max_v_samp_factor;\n    upsample->rowgroup_height[ci] = v_in_group; /* save for use later */\n    need_buffer = TRUE;\n    if (! compptr->component_needed) {\n      /* Don't bother to upsample an uninteresting component. */\n      upsample->methods[ci] = noop_upsample;\n      need_buffer = FALSE;\n    } else if (h_in_group == h_out_group && v_in_group == v_out_group) {\n      /* Fullsize components can be processed without any work. */\n      upsample->methods[ci] = fullsize_upsample;\n      need_buffer = FALSE;\n    } else if (h_in_group * 2 == h_out_group &&\n\t       v_in_group == v_out_group) {\n      /* Special cases for 2h1v upsampling */\n      if (do_fancy && compptr->downsampled_width > 2)\n\tupsample->methods[ci] = h2v1_fancy_upsample;\n      else\n\tupsample->methods[ci] = h2v1_upsample;\n    } else if (h_in_group * 2 == h_out_group &&\n\t       v_in_group * 2 == v_out_group) {\n      /* Special cases for 2h2v upsampling */\n      if (do_fancy && compptr->downsampled_width > 2) {\n\tupsample->methods[ci] = h2v2_fancy_upsample;\n\tupsample->pub.need_context_rows = TRUE;\n      } else\n\tupsample->methods[ci] = h2v2_upsample;\n    } else if ((h_out_group % h_in_group) == 0 &&\n\t       (v_out_group % v_in_group) == 0) {\n      /* Generic integral-factors upsampling method */\n      upsample->methods[ci] = int_upsample;\n      upsample->h_expand[ci] = (UINT8) (h_out_group / h_in_group);\n      upsample->v_expand[ci] = (UINT8) (v_out_group / v_in_group);\n    } else\n      ERREXIT(cinfo, JERR_FRACT_SAMPLE_NOTIMPL);\n    if (need_buffer) {\n      upsample->color_buf[ci] = (*cinfo->mem->alloc_sarray)\n\t((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t (JDIMENSION) jround_up((long) cinfo->output_width,\n\t\t\t\t(long) cinfo->max_h_samp_factor),\n\t (JDIMENSION) cinfo->max_v_samp_factor);\n    }\n  }\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jdtrans.c",
    "content": "/*\n * jdtrans.c\n *\n * Copyright (C) 1995-1997, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains library routines for transcoding decompression,\n * that is, reading raw DCT coefficient arrays from an input JPEG file.\n * The routines in jdapimin.c will also be needed by a transcoder.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n\n\n/* Forward declarations */\nLOCAL(void) transdecode_master_selection JPP((j_decompress_ptr cinfo));\n\n\n/*\n * Read the coefficient arrays from a JPEG file.\n * jpeg_read_header must be completed before calling this.\n *\n * The entire image is read into a set of virtual coefficient-block arrays,\n * one per component.  The return value is a pointer to the array of\n * virtual-array descriptors.  These can be manipulated directly via the\n * JPEG memory manager, or handed off to jpeg_write_coefficients().\n * To release the memory occupied by the virtual arrays, call\n * jpeg_finish_decompress() when done with the data.\n *\n * An alternative usage is to simply obtain access to the coefficient arrays\n * during a buffered-image-mode decompression operation.  This is allowed\n * after any jpeg_finish_output() call.  The arrays can be accessed until\n * jpeg_finish_decompress() is called.  (Note that any call to the library\n * may reposition the arrays, so don't rely on access_virt_barray() results\n * to stay valid across library calls.)\n *\n * Returns NULL if suspended.  This case need be checked only if\n * a suspending data source is used.\n */\n\nGLOBAL(jvirt_barray_ptr *)\njpeg_read_coefficients (j_decompress_ptr cinfo)\n{\n  if (cinfo->global_state == DSTATE_READY) {\n    /* First call: initialize active modules */\n    transdecode_master_selection(cinfo);\n    cinfo->global_state = DSTATE_RDCOEFS;\n  }\n  if (cinfo->global_state == DSTATE_RDCOEFS) {\n    /* Absorb whole file into the coef buffer */\n    for (;;) {\n      int retcode;\n      /* Call progress monitor hook if present */\n      if (cinfo->progress != NULL)\n\t(*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo);\n      /* Absorb some more input */\n      retcode = (*cinfo->inputctl->consume_input) (cinfo);\n      if (retcode == JPEG_SUSPENDED)\n\treturn NULL;\n      if (retcode == JPEG_REACHED_EOI)\n\tbreak;\n      /* Advance progress counter if appropriate */\n      if (cinfo->progress != NULL &&\n\t  (retcode == JPEG_ROW_COMPLETED || retcode == JPEG_REACHED_SOS)) {\n\tif (++cinfo->progress->pass_counter >= cinfo->progress->pass_limit) {\n\t  /* startup underestimated number of scans; ratchet up one scan */\n\t  cinfo->progress->pass_limit += (long) cinfo->total_iMCU_rows;\n\t}\n      }\n    }\n    /* Set state so that jpeg_finish_decompress does the right thing */\n    cinfo->global_state = DSTATE_STOPPING;\n  }\n  /* At this point we should be in state DSTATE_STOPPING if being used\n   * standalone, or in state DSTATE_BUFIMAGE if being invoked to get access\n   * to the coefficients during a full buffered-image-mode decompression.\n   */\n  if ((cinfo->global_state == DSTATE_STOPPING ||\n       cinfo->global_state == DSTATE_BUFIMAGE) && cinfo->buffered_image) {\n    return cinfo->coef->coef_arrays;\n  }\n  /* Oops, improper usage */\n  ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);\n  return NULL;\t\t\t/* keep compiler happy */\n}\n\n\n/*\n * Master selection of decompression modules for transcoding.\n * This substitutes for jdmaster.c's initialization of the full decompressor.\n */\n\nLOCAL(void)\ntransdecode_master_selection (j_decompress_ptr cinfo)\n{\n  /* This is effectively a buffered-image operation. */\n  cinfo->buffered_image = TRUE;\n\n  /* Entropy decoding: either Huffman or arithmetic coding. */\n  if (cinfo->arith_code) {\n    ERREXIT(cinfo, JERR_ARITH_NOTIMPL);\n  } else {\n    if (cinfo->progressive_mode) {\n#ifdef D_PROGRESSIVE_SUPPORTED\n      jinit_phuff_decoder(cinfo);\n#else\n      ERREXIT(cinfo, JERR_NOT_COMPILED);\n#endif\n    } else\n      jinit_huff_decoder(cinfo);\n  }\n\n  /* Always get a full-image coefficient buffer. */\n  jinit_d_coef_controller(cinfo, TRUE);\n\n  /* We can now tell the memory manager to allocate virtual arrays. */\n  (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo);\n\n  /* Initialize input side of decompressor to consume first scan. */\n  (*cinfo->inputctl->start_input_pass) (cinfo);\n\n  /* Initialize progress monitoring. */\n  if (cinfo->progress != NULL) {\n    int nscans;\n    /* Estimate number of scans to set pass_limit. */\n    if (cinfo->progressive_mode) {\n      /* Arbitrarily estimate 2 interleaved DC scans + 3 AC scans/component. */\n      nscans = 2 + 3 * cinfo->num_components;\n    } else if (cinfo->inputctl->has_multiple_scans) {\n      /* For a nonprogressive multiscan file, estimate 1 scan per component. */\n      nscans = cinfo->num_components;\n    } else {\n      nscans = 1;\n    }\n    cinfo->progress->pass_counter = 0L;\n    cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows * nscans;\n    cinfo->progress->completed_passes = 0;\n    cinfo->progress->total_passes = 1;\n  }\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jerror.c",
    "content": "/*\n * jerror.c\n *\n * Copyright (C) 1991-1998, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains simple error-reporting and trace-message routines.\n * These are suitable for Unix-like systems and others where writing to\n * stderr is the right thing to do.  Many applications will want to replace\n * some or all of these routines.\n *\n * If you define USE_WINDOWS_MESSAGEBOX in jconfig.h or in the makefile,\n * you get a Windows-specific hack to display error messages in a dialog box.\n * It ain't much, but it beats dropping error messages into the bit bucket,\n * which is what happens to output to stderr under most Windows C compilers.\n *\n * These routines are used by both the compression and decompression code.\n */\n\n/* this is not a core library module, so it doesn't define JPEG_INTERNALS */\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n#include \"jversion.h\"\n#include \"jerror.h\"\n\n#ifdef USE_WINDOWS_MESSAGEBOX\n#include <windows.h>\n#endif\n\n#ifndef EXIT_FAILURE\t\t/* define exit() codes if not provided */\n#define EXIT_FAILURE  1\n#endif\n\n\n/*\n * Create the message string table.\n * We do this from the master message list in jerror.h by re-reading\n * jerror.h with a suitable definition for macro JMESSAGE.\n * The message table is made an external symbol just in case any applications\n * want to refer to it directly.\n */\n\n#ifdef NEED_SHORT_EXTERNAL_NAMES\n#define jpeg_std_message_table\tjMsgTable\n#endif\n\n#define JMESSAGE(code,string)\tstring ,\n\nconst char * const jpeg_std_message_table[] = {\n#include \"jerror.h\"\n  NULL\n};\n\n\n/*\n * Error exit handler: must not return to caller.\n *\n * Applications may override this if they want to get control back after\n * an error.  Typically one would longjmp somewhere instead of exiting.\n * The setjmp buffer can be made a private field within an expanded error\n * handler object.  Note that the info needed to generate an error message\n * is stored in the error object, so you can generate the message now or\n * later, at your convenience.\n * You should make sure that the JPEG object is cleaned up (with jpeg_abort\n * or jpeg_destroy) at some point.\n */\n\nMETHODDEF(void)\nerror_exit (j_common_ptr cinfo)\n{\n  /* Always display the message */\n  (*cinfo->err->output_message) (cinfo);\n\n  /* Let the memory manager delete any temp files before we die */\n  jpeg_destroy(cinfo);\n\n  exit(EXIT_FAILURE);\n}\n\n\n/*\n * Actual output of an error or trace message.\n * Applications may override this method to send JPEG messages somewhere\n * other than stderr.\n *\n * On Windows, printing to stderr is generally completely useless,\n * so we provide optional code to produce an error-dialog popup.\n * Most Windows applications will still prefer to override this routine,\n * but if they don't, it'll do something at least marginally useful.\n *\n * NOTE: to use the library in an environment that doesn't support the\n * C stdio library, you may have to delete the call to fprintf() entirely,\n * not just not use this routine.\n */\n\nMETHODDEF(void)\noutput_message (j_common_ptr cinfo)\n{\n  char buffer[JMSG_LENGTH_MAX];\n\n  /* Create the message */\n  (*cinfo->err->format_message) (cinfo, buffer);\n\n#ifdef USE_WINDOWS_MESSAGEBOX\n  /* Display it in a message dialog box */\n  MessageBox(GetActiveWindow(), buffer, \"JPEG Library Error\",\n\t     MB_OK | MB_ICONERROR);\n#else\n  /* Send it to stderr, adding a newline */\n  fprintf(stderr, \"%s\\n\", buffer);\n#endif\n}\n\n\n/*\n * Decide whether to emit a trace or warning message.\n * msg_level is one of:\n *   -1: recoverable corrupt-data warning, may want to abort.\n *    0: important advisory messages (always display to user).\n *    1: first level of tracing detail.\n *    2,3,...: successively more detailed tracing messages.\n * An application might override this method if it wanted to abort on warnings\n * or change the policy about which messages to display.\n */\n\nMETHODDEF(void)\nemit_message (j_common_ptr cinfo, int msg_level)\n{\n  struct jpeg_error_mgr * err = cinfo->err;\n\n  if (msg_level < 0) {\n    /* It's a warning message.  Since corrupt files may generate many warnings,\n     * the policy implemented here is to show only the first warning,\n     * unless trace_level >= 3.\n     */\n    if (err->num_warnings == 0 || err->trace_level >= 3)\n      (*err->output_message) (cinfo);\n    /* Always count warnings in num_warnings. */\n    err->num_warnings++;\n  } else {\n    /* It's a trace message.  Show it if trace_level >= msg_level. */\n    if (err->trace_level >= msg_level)\n      (*err->output_message) (cinfo);\n  }\n}\n\n\n/*\n * Format a message string for the most recent JPEG error or message.\n * The message is stored into buffer, which should be at least JMSG_LENGTH_MAX\n * characters.  Note that no '\\n' character is added to the string.\n * Few applications should need to override this method.\n */\n\nMETHODDEF(void)\nformat_message (j_common_ptr cinfo, char * buffer)\n{\n  struct jpeg_error_mgr * err = cinfo->err;\n  int msg_code = err->msg_code;\n  const char * msgtext = NULL;\n  const char * msgptr;\n  char ch;\n  boolean isstring;\n\n  /* Look up message string in proper table */\n  if (msg_code > 0 && msg_code <= err->last_jpeg_message) {\n    msgtext = err->jpeg_message_table[msg_code];\n  } else if (err->addon_message_table != NULL &&\n\t     msg_code >= err->first_addon_message &&\n\t     msg_code <= err->last_addon_message) {\n    msgtext = err->addon_message_table[msg_code - err->first_addon_message];\n  }\n\n  /* Defend against bogus message number */\n  if (msgtext == NULL) {\n    err->msg_parm.i[0] = msg_code;\n    msgtext = err->jpeg_message_table[0];\n  }\n\n  /* Check for string parameter, as indicated by %s in the message text */\n  isstring = FALSE;\n  msgptr = msgtext;\n  while ((ch = *msgptr++) != '\\0') {\n    if (ch == '%') {\n      if (*msgptr == 's') isstring = TRUE;\n      break;\n    }\n  }\n\n  /* Format the message into the passed buffer */\n  if (isstring)\n    sprintf(buffer, msgtext, err->msg_parm.s);\n  else\n    sprintf(buffer, msgtext,\n\t    err->msg_parm.i[0], err->msg_parm.i[1],\n\t    err->msg_parm.i[2], err->msg_parm.i[3],\n\t    err->msg_parm.i[4], err->msg_parm.i[5],\n\t    err->msg_parm.i[6], err->msg_parm.i[7]);\n}\n\n\n/*\n * Reset error state variables at start of a new image.\n * This is called during compression startup to reset trace/error\n * processing to default state, without losing any application-specific\n * method pointers.  An application might possibly want to override\n * this method if it has additional error processing state.\n */\n\nMETHODDEF(void)\nreset_error_mgr (j_common_ptr cinfo)\n{\n  cinfo->err->num_warnings = 0;\n  /* trace_level is not reset since it is an application-supplied parameter */\n  cinfo->err->msg_code = 0;\t/* may be useful as a flag for \"no error\" */\n}\n\n\n/*\n * Fill in the standard error-handling methods in a jpeg_error_mgr object.\n * Typical call is:\n *\tstruct jpeg_compress_struct cinfo;\n *\tstruct jpeg_error_mgr err;\n *\n *\tcinfo.err = jpeg_std_error(&err);\n * after which the application may override some of the methods.\n */\n\nGLOBAL(struct jpeg_error_mgr *)\njpeg_std_error (struct jpeg_error_mgr * err)\n{\n  err->error_exit = error_exit;\n  err->emit_message = emit_message;\n  err->output_message = output_message;\n  err->format_message = format_message;\n  err->reset_error_mgr = reset_error_mgr;\n\n  err->trace_level = 0;\t\t/* default = no tracing */\n  err->num_warnings = 0;\t/* no warnings emitted yet */\n  err->msg_code = 0;\t\t/* may be useful as a flag for \"no error\" */\n\n  /* Initialize message table pointers */\n  err->jpeg_message_table = jpeg_std_message_table;\n  err->last_jpeg_message = (int) JMSG_LASTMSGCODE - 1;\n\n  err->addon_message_table = NULL;\n  err->first_addon_message = 0;\t/* for safety */\n  err->last_addon_message = 0;\n\n  return err;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jerror.h",
    "content": "/*\n * jerror.h\n *\n * Copyright (C) 1994-1997, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file defines the error and message codes for the JPEG library.\n * Edit this file to add new codes, or to translate the message strings to\n * some other language.\n * A set of error-reporting macros are defined too.  Some applications using\n * the JPEG library may wish to include this file to get the error codes\n * and/or the macros.\n */\n\n/*\n * To define the enum list of message codes, include this file without\n * defining macro JMESSAGE.  To create a message string table, include it\n * again with a suitable JMESSAGE definition (see jerror.c for an example).\n */\n#ifndef JMESSAGE\n#ifndef JERROR_H\n/* First time through, define the enum list */\n#define JMAKE_ENUM_LIST\n#else\n/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */\n#define JMESSAGE(code,string)\n#endif /* JERROR_H */\n#endif /* JMESSAGE */\n\n#ifdef JMAKE_ENUM_LIST\n\ntypedef enum {\n\n#define JMESSAGE(code,string)\tcode ,\n\n#endif /* JMAKE_ENUM_LIST */\n\nJMESSAGE(JMSG_NOMESSAGE, \"Bogus message code %d\") /* Must be first entry! */\n\n/* For maintenance convenience, list is alphabetical by message code name */\nJMESSAGE(JERR_ARITH_NOTIMPL,\n\t \"Sorry, there are legal restrictions on arithmetic coding\")\nJMESSAGE(JERR_BAD_ALIGN_TYPE, \"ALIGN_TYPE is wrong, please fix\")\nJMESSAGE(JERR_BAD_ALLOC_CHUNK, \"MAX_ALLOC_CHUNK is wrong, please fix\")\nJMESSAGE(JERR_BAD_BUFFER_MODE, \"Bogus buffer control mode\")\nJMESSAGE(JERR_BAD_COMPONENT_ID, \"Invalid component ID %d in SOS\")\nJMESSAGE(JERR_BAD_DCT_COEF, \"DCT coefficient out of range\")\nJMESSAGE(JERR_BAD_DCTSIZE, \"IDCT output block size %d not supported\")\nJMESSAGE(JERR_BAD_HUFF_TABLE, \"Bogus Huffman table definition\")\nJMESSAGE(JERR_BAD_IN_COLORSPACE, \"Bogus input colorspace\")\nJMESSAGE(JERR_BAD_J_COLORSPACE, \"Bogus JPEG colorspace\")\nJMESSAGE(JERR_BAD_LENGTH, \"Bogus marker length\")\nJMESSAGE(JERR_BAD_LIB_VERSION,\n\t \"Wrong JPEG library version: library is %d, caller expects %d\")\nJMESSAGE(JERR_BAD_MCU_SIZE, \"Sampling factors too large for interleaved scan\")\nJMESSAGE(JERR_BAD_POOL_ID, \"Invalid memory pool code %d\")\nJMESSAGE(JERR_BAD_PRECISION, \"Unsupported JPEG data precision %d\")\nJMESSAGE(JERR_BAD_PROGRESSION,\n\t \"Invalid progressive parameters Ss=%d Se=%d Ah=%d Al=%d\")\nJMESSAGE(JERR_BAD_PROG_SCRIPT,\n\t \"Invalid progressive parameters at scan script entry %d\")\nJMESSAGE(JERR_BAD_SAMPLING, \"Bogus sampling factors\")\nJMESSAGE(JERR_BAD_SCAN_SCRIPT, \"Invalid scan script at entry %d\")\nJMESSAGE(JERR_BAD_STATE, \"Improper call to JPEG library in state %d\")\nJMESSAGE(JERR_BAD_STRUCT_SIZE,\n\t \"JPEG parameter struct mismatch: library thinks size is %u, caller expects %u\")\nJMESSAGE(JERR_BAD_VIRTUAL_ACCESS, \"Bogus virtual array access\")\nJMESSAGE(JERR_BUFFER_SIZE, \"Buffer passed to JPEG library is too small\")\nJMESSAGE(JERR_CANT_SUSPEND, \"Suspension not allowed here\")\nJMESSAGE(JERR_CCIR601_NOTIMPL, \"CCIR601 sampling not implemented yet\")\nJMESSAGE(JERR_COMPONENT_COUNT, \"Too many color components: %d, max %d\")\nJMESSAGE(JERR_CONVERSION_NOTIMPL, \"Unsupported color conversion request\")\nJMESSAGE(JERR_DAC_INDEX, \"Bogus DAC index %d\")\nJMESSAGE(JERR_DAC_VALUE, \"Bogus DAC value 0x%x\")\nJMESSAGE(JERR_DHT_INDEX, \"Bogus DHT index %d\")\nJMESSAGE(JERR_DQT_INDEX, \"Bogus DQT index %d\")\nJMESSAGE(JERR_EMPTY_IMAGE, \"Empty JPEG image (DNL not supported)\")\nJMESSAGE(JERR_EMS_READ, \"Read from EMS failed\")\nJMESSAGE(JERR_EMS_WRITE, \"Write to EMS failed\")\nJMESSAGE(JERR_EOI_EXPECTED, \"Didn't expect more than one scan\")\nJMESSAGE(JERR_FILE_READ, \"Input file read error\")\nJMESSAGE(JERR_FILE_WRITE, \"Output file write error --- out of disk space?\")\nJMESSAGE(JERR_FRACT_SAMPLE_NOTIMPL, \"Fractional sampling not implemented yet\")\nJMESSAGE(JERR_HUFF_CLEN_OVERFLOW, \"Huffman code size table overflow\")\nJMESSAGE(JERR_HUFF_MISSING_CODE, \"Missing Huffman code table entry\")\nJMESSAGE(JERR_IMAGE_TOO_BIG, \"Maximum supported image dimension is %u pixels\")\nJMESSAGE(JERR_INPUT_EMPTY, \"Empty input file\")\nJMESSAGE(JERR_INPUT_EOF, \"Premature end of input file\")\nJMESSAGE(JERR_MISMATCHED_QUANT_TABLE,\n\t \"Cannot transcode due to multiple use of quantization table %d\")\nJMESSAGE(JERR_MISSING_DATA, \"Scan script does not transmit all data\")\nJMESSAGE(JERR_MODE_CHANGE, \"Invalid color quantization mode change\")\nJMESSAGE(JERR_NOTIMPL, \"Not implemented yet\")\nJMESSAGE(JERR_NOT_COMPILED, \"Requested feature was omitted at compile time\")\nJMESSAGE(JERR_NO_BACKING_STORE, \"Backing store not supported\")\nJMESSAGE(JERR_NO_HUFF_TABLE, \"Huffman table 0x%02x was not defined\")\nJMESSAGE(JERR_NO_IMAGE, \"JPEG datastream contains no image\")\nJMESSAGE(JERR_NO_QUANT_TABLE, \"Quantization table 0x%02x was not defined\")\nJMESSAGE(JERR_NO_SOI, \"Not a JPEG file: starts with 0x%02x 0x%02x\")\nJMESSAGE(JERR_OUT_OF_MEMORY, \"Insufficient memory (case %d)\")\nJMESSAGE(JERR_QUANT_COMPONENTS,\n\t \"Cannot quantize more than %d color components\")\nJMESSAGE(JERR_QUANT_FEW_COLORS, \"Cannot quantize to fewer than %d colors\")\nJMESSAGE(JERR_QUANT_MANY_COLORS, \"Cannot quantize to more than %d colors\")\nJMESSAGE(JERR_SOF_DUPLICATE, \"Invalid JPEG file structure: two SOF markers\")\nJMESSAGE(JERR_SOF_NO_SOS, \"Invalid JPEG file structure: missing SOS marker\")\nJMESSAGE(JERR_SOF_UNSUPPORTED, \"Unsupported JPEG process: SOF type 0x%02x\")\nJMESSAGE(JERR_SOI_DUPLICATE, \"Invalid JPEG file structure: two SOI markers\")\nJMESSAGE(JERR_SOS_NO_SOF, \"Invalid JPEG file structure: SOS before SOF\")\nJMESSAGE(JERR_TFILE_CREATE, \"Failed to create temporary file %s\")\nJMESSAGE(JERR_TFILE_READ, \"Read failed on temporary file\")\nJMESSAGE(JERR_TFILE_SEEK, \"Seek failed on temporary file\")\nJMESSAGE(JERR_TFILE_WRITE,\n\t \"Write failed on temporary file --- out of disk space?\")\nJMESSAGE(JERR_TOO_LITTLE_DATA, \"Application transferred too few scanlines\")\nJMESSAGE(JERR_UNKNOWN_MARKER, \"Unsupported marker type 0x%02x\")\nJMESSAGE(JERR_VIRTUAL_BUG, \"Virtual array controller messed up\")\nJMESSAGE(JERR_WIDTH_OVERFLOW, \"Image too wide for this implementation\")\nJMESSAGE(JERR_XMS_READ, \"Read from XMS failed\")\nJMESSAGE(JERR_XMS_WRITE, \"Write to XMS failed\")\nJMESSAGE(JMSG_COPYRIGHT, JCOPYRIGHT)\nJMESSAGE(JMSG_VERSION, JVERSION)\nJMESSAGE(JTRC_16BIT_TABLES,\n\t \"Caution: quantization tables are too coarse for baseline JPEG\")\nJMESSAGE(JTRC_ADOBE,\n\t \"Adobe APP14 marker: version %d, flags 0x%04x 0x%04x, transform %d\")\nJMESSAGE(JTRC_APP0, \"Unknown APP0 marker (not JFIF), length %u\")\nJMESSAGE(JTRC_APP14, \"Unknown APP14 marker (not Adobe), length %u\")\nJMESSAGE(JTRC_DAC, \"Define Arithmetic Table 0x%02x: 0x%02x\")\nJMESSAGE(JTRC_DHT, \"Define Huffman Table 0x%02x\")\nJMESSAGE(JTRC_DQT, \"Define Quantization Table %d  precision %d\")\nJMESSAGE(JTRC_DRI, \"Define Restart Interval %u\")\nJMESSAGE(JTRC_EMS_CLOSE, \"Freed EMS handle %u\")\nJMESSAGE(JTRC_EMS_OPEN, \"Obtained EMS handle %u\")\nJMESSAGE(JTRC_EOI, \"End Of Image\")\nJMESSAGE(JTRC_HUFFBITS, \"        %3d %3d %3d %3d %3d %3d %3d %3d\")\nJMESSAGE(JTRC_JFIF, \"JFIF APP0 marker: version %d.%02d, density %dx%d  %d\")\nJMESSAGE(JTRC_JFIF_BADTHUMBNAILSIZE,\n\t \"Warning: thumbnail image size does not match data length %u\")\nJMESSAGE(JTRC_JFIF_EXTENSION,\n\t \"JFIF extension marker: type 0x%02x, length %u\")\nJMESSAGE(JTRC_JFIF_THUMBNAIL, \"    with %d x %d thumbnail image\")\nJMESSAGE(JTRC_MISC_MARKER, \"Miscellaneous marker 0x%02x, length %u\")\nJMESSAGE(JTRC_PARMLESS_MARKER, \"Unexpected marker 0x%02x\")\nJMESSAGE(JTRC_QUANTVALS, \"        %4u %4u %4u %4u %4u %4u %4u %4u\")\nJMESSAGE(JTRC_QUANT_3_NCOLORS, \"Quantizing to %d = %d*%d*%d colors\")\nJMESSAGE(JTRC_QUANT_NCOLORS, \"Quantizing to %d colors\")\nJMESSAGE(JTRC_QUANT_SELECTED, \"Selected %d colors for quantization\")\nJMESSAGE(JTRC_RECOVERY_ACTION, \"At marker 0x%02x, recovery action %d\")\nJMESSAGE(JTRC_RST, \"RST%d\")\nJMESSAGE(JTRC_SMOOTH_NOTIMPL,\n\t \"Smoothing not supported with nonstandard sampling ratios\")\nJMESSAGE(JTRC_SOF, \"Start Of Frame 0x%02x: width=%u, height=%u, components=%d\")\nJMESSAGE(JTRC_SOF_COMPONENT, \"    Component %d: %dhx%dv q=%d\")\nJMESSAGE(JTRC_SOI, \"Start of Image\")\nJMESSAGE(JTRC_SOS, \"Start Of Scan: %d components\")\nJMESSAGE(JTRC_SOS_COMPONENT, \"    Component %d: dc=%d ac=%d\")\nJMESSAGE(JTRC_SOS_PARAMS, \"  Ss=%d, Se=%d, Ah=%d, Al=%d\")\nJMESSAGE(JTRC_TFILE_CLOSE, \"Closed temporary file %s\")\nJMESSAGE(JTRC_TFILE_OPEN, \"Opened temporary file %s\")\nJMESSAGE(JTRC_THUMB_JPEG,\n\t \"JFIF extension marker: JPEG-compressed thumbnail image, length %u\")\nJMESSAGE(JTRC_THUMB_PALETTE,\n\t \"JFIF extension marker: palette thumbnail image, length %u\")\nJMESSAGE(JTRC_THUMB_RGB,\n\t \"JFIF extension marker: RGB thumbnail image, length %u\")\nJMESSAGE(JTRC_UNKNOWN_IDS,\n\t \"Unrecognized component IDs %d %d %d, assuming YCbCr\")\nJMESSAGE(JTRC_XMS_CLOSE, \"Freed XMS handle %u\")\nJMESSAGE(JTRC_XMS_OPEN, \"Obtained XMS handle %u\")\nJMESSAGE(JWRN_ADOBE_XFORM, \"Unknown Adobe color transform code %d\")\nJMESSAGE(JWRN_BOGUS_PROGRESSION,\n\t \"Inconsistent progression sequence for component %d coefficient %d\")\nJMESSAGE(JWRN_EXTRANEOUS_DATA,\n\t \"Corrupt JPEG data: %u extraneous bytes before marker 0x%02x\")\nJMESSAGE(JWRN_HIT_MARKER, \"Corrupt JPEG data: premature end of data segment\")\nJMESSAGE(JWRN_HUFF_BAD_CODE, \"Corrupt JPEG data: bad Huffman code\")\nJMESSAGE(JWRN_JFIF_MAJOR, \"Warning: unknown JFIF revision number %d.%02d\")\nJMESSAGE(JWRN_JPEG_EOF, \"Premature end of JPEG file\")\nJMESSAGE(JWRN_MUST_RESYNC,\n\t \"Corrupt JPEG data: found marker 0x%02x instead of RST%d\")\nJMESSAGE(JWRN_NOT_SEQUENTIAL, \"Invalid SOS parameters for sequential JPEG\")\nJMESSAGE(JWRN_TOO_MUCH_DATA, \"Application transferred too many scanlines\")\n\n#ifdef JMAKE_ENUM_LIST\n\n  JMSG_LASTMSGCODE\n} J_MESSAGE_CODE;\n\n#undef JMAKE_ENUM_LIST\n#endif /* JMAKE_ENUM_LIST */\n\n/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */\n#undef JMESSAGE\n\n\n#ifndef JERROR_H\n#define JERROR_H\n\n/* Macros to simplify using the error and trace message stuff */\n/* The first parameter is either type of cinfo pointer */\n\n/* Fatal errors (print message and exit) */\n#define ERREXIT(cinfo,code)  \\\n  ((cinfo)->err->msg_code = (code), \\\n   (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))\n#define ERREXIT1(cinfo,code,p1)  \\\n  ((cinfo)->err->msg_code = (code), \\\n   (cinfo)->err->msg_parm.i[0] = (p1), \\\n   (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))\n#define ERREXIT2(cinfo,code,p1,p2)  \\\n  ((cinfo)->err->msg_code = (code), \\\n   (cinfo)->err->msg_parm.i[0] = (p1), \\\n   (cinfo)->err->msg_parm.i[1] = (p2), \\\n   (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))\n#define ERREXIT3(cinfo,code,p1,p2,p3)  \\\n  ((cinfo)->err->msg_code = (code), \\\n   (cinfo)->err->msg_parm.i[0] = (p1), \\\n   (cinfo)->err->msg_parm.i[1] = (p2), \\\n   (cinfo)->err->msg_parm.i[2] = (p3), \\\n   (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))\n#define ERREXIT4(cinfo,code,p1,p2,p3,p4)  \\\n  ((cinfo)->err->msg_code = (code), \\\n   (cinfo)->err->msg_parm.i[0] = (p1), \\\n   (cinfo)->err->msg_parm.i[1] = (p2), \\\n   (cinfo)->err->msg_parm.i[2] = (p3), \\\n   (cinfo)->err->msg_parm.i[3] = (p4), \\\n   (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))\n#define ERREXITS(cinfo,code,str)  \\\n  ((cinfo)->err->msg_code = (code), \\\n   strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \\\n   (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))\n\n#define MAKESTMT(stuff)\t\tdo { stuff } while (0)\n\n/* Nonfatal errors (we can keep going, but the data is probably corrupt) */\n#define WARNMS(cinfo,code)  \\\n  ((cinfo)->err->msg_code = (code), \\\n   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1))\n#define WARNMS1(cinfo,code,p1)  \\\n  ((cinfo)->err->msg_code = (code), \\\n   (cinfo)->err->msg_parm.i[0] = (p1), \\\n   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1))\n#define WARNMS2(cinfo,code,p1,p2)  \\\n  ((cinfo)->err->msg_code = (code), \\\n   (cinfo)->err->msg_parm.i[0] = (p1), \\\n   (cinfo)->err->msg_parm.i[1] = (p2), \\\n   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1))\n\n/* Informational/debugging messages */\n#define TRACEMS(cinfo,lvl,code)  \\\n  ((cinfo)->err->msg_code = (code), \\\n   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))\n#define TRACEMS1(cinfo,lvl,code,p1)  \\\n  ((cinfo)->err->msg_code = (code), \\\n   (cinfo)->err->msg_parm.i[0] = (p1), \\\n   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))\n#define TRACEMS2(cinfo,lvl,code,p1,p2)  \\\n  ((cinfo)->err->msg_code = (code), \\\n   (cinfo)->err->msg_parm.i[0] = (p1), \\\n   (cinfo)->err->msg_parm.i[1] = (p2), \\\n   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))\n#define TRACEMS3(cinfo,lvl,code,p1,p2,p3)  \\\n  MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \\\n\t   _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); \\\n\t   (cinfo)->err->msg_code = (code); \\\n\t   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )\n#define TRACEMS4(cinfo,lvl,code,p1,p2,p3,p4)  \\\n  MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \\\n\t   _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \\\n\t   (cinfo)->err->msg_code = (code); \\\n\t   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )\n#define TRACEMS5(cinfo,lvl,code,p1,p2,p3,p4,p5)  \\\n  MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \\\n\t   _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \\\n\t   _mp[4] = (p5); \\\n\t   (cinfo)->err->msg_code = (code); \\\n\t   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )\n#define TRACEMS8(cinfo,lvl,code,p1,p2,p3,p4,p5,p6,p7,p8)  \\\n  MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \\\n\t   _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \\\n\t   _mp[4] = (p5); _mp[5] = (p6); _mp[6] = (p7); _mp[7] = (p8); \\\n\t   (cinfo)->err->msg_code = (code); \\\n\t   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )\n#define TRACEMSS(cinfo,lvl,code,str)  \\\n  ((cinfo)->err->msg_code = (code), \\\n   strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \\\n   (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))\n\n#endif /* JERROR_H */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jfdctflt.c",
    "content": "/*\n * jfdctflt.c\n *\n * Copyright (C) 1994-1996, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains a floating-point implementation of the\n * forward DCT (Discrete Cosine Transform).\n *\n * This implementation should be more accurate than either of the integer\n * DCT implementations.  However, it may not give the same results on all\n * machines because of differences in roundoff behavior.  Speed will depend\n * on the hardware's floating point capacity.\n *\n * A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT\n * on each column.  Direct algorithms are also available, but they are\n * much more complex and seem not to be any faster when reduced to code.\n *\n * This implementation is based on Arai, Agui, and Nakajima's algorithm for\n * scaled DCT.  Their original paper (Trans. IEICE E-71(11):1095) is in\n * Japanese, but the algorithm is described in the Pennebaker & Mitchell\n * JPEG textbook (see REFERENCES section in file README).  The following code\n * is based directly on figure 4-8 in P&M.\n * While an 8-point DCT cannot be done in less than 11 multiplies, it is\n * possible to arrange the computation so that many of the multiplies are\n * simple scalings of the final outputs.  These multiplies can then be\n * folded into the multiplications or divisions by the JPEG quantization\n * table entries.  The AA&N method leaves only 5 multiplies and 29 adds\n * to be done in the DCT itself.\n * The primary disadvantage of this method is that with a fixed-point\n * implementation, accuracy is lost due to imprecise representation of the\n * scaled quantization values.  However, that problem does not arise if\n * we use floating point arithmetic.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n#include \"jdct.h\"\t\t/* Private declarations for DCT subsystem */\n\n#ifdef DCT_FLOAT_SUPPORTED\n\n\n/*\n * This module is specialized to the case DCTSIZE = 8.\n */\n\n#if DCTSIZE != 8\n  Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */\n#endif\n\n\n/*\n * Perform the forward DCT on one block of samples.\n */\n\nGLOBAL(void)\njpeg_fdct_float (FAST_FLOAT * data)\n{\n  FAST_FLOAT tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;\n  FAST_FLOAT tmp10, tmp11, tmp12, tmp13;\n  FAST_FLOAT z1, z2, z3, z4, z5, z11, z13;\n  FAST_FLOAT *dataptr;\n  int ctr;\n\n  /* Pass 1: process rows. */\n\n  dataptr = data;\n  for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {\n    tmp0 = dataptr[0] + dataptr[7];\n    tmp7 = dataptr[0] - dataptr[7];\n    tmp1 = dataptr[1] + dataptr[6];\n    tmp6 = dataptr[1] - dataptr[6];\n    tmp2 = dataptr[2] + dataptr[5];\n    tmp5 = dataptr[2] - dataptr[5];\n    tmp3 = dataptr[3] + dataptr[4];\n    tmp4 = dataptr[3] - dataptr[4];\n    \n    /* Even part */\n    \n    tmp10 = tmp0 + tmp3;\t/* phase 2 */\n    tmp13 = tmp0 - tmp3;\n    tmp11 = tmp1 + tmp2;\n    tmp12 = tmp1 - tmp2;\n    \n    dataptr[0] = tmp10 + tmp11; /* phase 3 */\n    dataptr[4] = tmp10 - tmp11;\n    \n    z1 = (tmp12 + tmp13) * ((FAST_FLOAT) 0.707106781); /* c4 */\n    dataptr[2] = tmp13 + z1;\t/* phase 5 */\n    dataptr[6] = tmp13 - z1;\n    \n    /* Odd part */\n\n    tmp10 = tmp4 + tmp5;\t/* phase 2 */\n    tmp11 = tmp5 + tmp6;\n    tmp12 = tmp6 + tmp7;\n\n    /* The rotator is modified from fig 4-8 to avoid extra negations. */\n    z5 = (tmp10 - tmp12) * ((FAST_FLOAT) 0.382683433); /* c6 */\n    z2 = ((FAST_FLOAT) 0.541196100) * tmp10 + z5; /* c2-c6 */\n    z4 = ((FAST_FLOAT) 1.306562965) * tmp12 + z5; /* c2+c6 */\n    z3 = tmp11 * ((FAST_FLOAT) 0.707106781); /* c4 */\n\n    z11 = tmp7 + z3;\t\t/* phase 5 */\n    z13 = tmp7 - z3;\n\n    dataptr[5] = z13 + z2;\t/* phase 6 */\n    dataptr[3] = z13 - z2;\n    dataptr[1] = z11 + z4;\n    dataptr[7] = z11 - z4;\n\n    dataptr += DCTSIZE;\t\t/* advance pointer to next row */\n  }\n\n  /* Pass 2: process columns. */\n\n  dataptr = data;\n  for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {\n    tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7];\n    tmp7 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7];\n    tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6];\n    tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6];\n    tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5];\n    tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5];\n    tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4];\n    tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4];\n    \n    /* Even part */\n    \n    tmp10 = tmp0 + tmp3;\t/* phase 2 */\n    tmp13 = tmp0 - tmp3;\n    tmp11 = tmp1 + tmp2;\n    tmp12 = tmp1 - tmp2;\n    \n    dataptr[DCTSIZE*0] = tmp10 + tmp11; /* phase 3 */\n    dataptr[DCTSIZE*4] = tmp10 - tmp11;\n    \n    z1 = (tmp12 + tmp13) * ((FAST_FLOAT) 0.707106781); /* c4 */\n    dataptr[DCTSIZE*2] = tmp13 + z1; /* phase 5 */\n    dataptr[DCTSIZE*6] = tmp13 - z1;\n    \n    /* Odd part */\n\n    tmp10 = tmp4 + tmp5;\t/* phase 2 */\n    tmp11 = tmp5 + tmp6;\n    tmp12 = tmp6 + tmp7;\n\n    /* The rotator is modified from fig 4-8 to avoid extra negations. */\n    z5 = (tmp10 - tmp12) * ((FAST_FLOAT) 0.382683433); /* c6 */\n    z2 = ((FAST_FLOAT) 0.541196100) * tmp10 + z5; /* c2-c6 */\n    z4 = ((FAST_FLOAT) 1.306562965) * tmp12 + z5; /* c2+c6 */\n    z3 = tmp11 * ((FAST_FLOAT) 0.707106781); /* c4 */\n\n    z11 = tmp7 + z3;\t\t/* phase 5 */\n    z13 = tmp7 - z3;\n\n    dataptr[DCTSIZE*5] = z13 + z2; /* phase 6 */\n    dataptr[DCTSIZE*3] = z13 - z2;\n    dataptr[DCTSIZE*1] = z11 + z4;\n    dataptr[DCTSIZE*7] = z11 - z4;\n\n    dataptr++;\t\t\t/* advance pointer to next column */\n  }\n}\n\n#endif /* DCT_FLOAT_SUPPORTED */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jfdctfst.c",
    "content": "/*\n * jfdctfst.c\n *\n * Copyright (C) 1994-1996, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains a fast, not so accurate integer implementation of the\n * forward DCT (Discrete Cosine Transform).\n *\n * A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT\n * on each column.  Direct algorithms are also available, but they are\n * much more complex and seem not to be any faster when reduced to code.\n *\n * This implementation is based on Arai, Agui, and Nakajima's algorithm for\n * scaled DCT.  Their original paper (Trans. IEICE E-71(11):1095) is in\n * Japanese, but the algorithm is described in the Pennebaker & Mitchell\n * JPEG textbook (see REFERENCES section in file README).  The following code\n * is based directly on figure 4-8 in P&M.\n * While an 8-point DCT cannot be done in less than 11 multiplies, it is\n * possible to arrange the computation so that many of the multiplies are\n * simple scalings of the final outputs.  These multiplies can then be\n * folded into the multiplications or divisions by the JPEG quantization\n * table entries.  The AA&N method leaves only 5 multiplies and 29 adds\n * to be done in the DCT itself.\n * The primary disadvantage of this method is that with fixed-point math,\n * accuracy is lost due to imprecise representation of the scaled\n * quantization values.  The smaller the quantization table entry, the less\n * precise the scaled value, so this implementation does worse with high-\n * quality-setting files than with low-quality ones.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n#include \"jdct.h\"\t\t/* Private declarations for DCT subsystem */\n\n#ifdef DCT_IFAST_SUPPORTED\n\n\n/*\n * This module is specialized to the case DCTSIZE = 8.\n */\n\n#if DCTSIZE != 8\n  Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */\n#endif\n\n\n/* Scaling decisions are generally the same as in the LL&M algorithm;\n * see jfdctint.c for more details.  However, we choose to descale\n * (right shift) multiplication products as soon as they are formed,\n * rather than carrying additional fractional bits into subsequent additions.\n * This compromises accuracy slightly, but it lets us save a few shifts.\n * More importantly, 16-bit arithmetic is then adequate (for 8-bit samples)\n * everywhere except in the multiplications proper; this saves a good deal\n * of work on 16-bit-int machines.\n *\n * Again to save a few shifts, the intermediate results between pass 1 and\n * pass 2 are not upscaled, but are represented only to integral precision.\n *\n * A final compromise is to represent the multiplicative constants to only\n * 8 fractional bits, rather than 13.  This saves some shifting work on some\n * machines, and may also reduce the cost of multiplication (since there\n * are fewer one-bits in the constants).\n */\n\n#define CONST_BITS  8\n\n\n/* Some C compilers fail to reduce \"FIX(constant)\" at compile time, thus\n * causing a lot of useless floating-point operations at run time.\n * To get around this we use the following pre-calculated constants.\n * If you change CONST_BITS you may want to add appropriate values.\n * (With a reasonable C compiler, you can just rely on the FIX() macro...)\n */\n\n#if CONST_BITS == 8\n#define FIX_0_382683433  ((INT32)   98)\t\t/* FIX(0.382683433) */\n#define FIX_0_541196100  ((INT32)  139)\t\t/* FIX(0.541196100) */\n#define FIX_0_707106781  ((INT32)  181)\t\t/* FIX(0.707106781) */\n#define FIX_1_306562965  ((INT32)  334)\t\t/* FIX(1.306562965) */\n#else\n#define FIX_0_382683433  FIX(0.382683433)\n#define FIX_0_541196100  FIX(0.541196100)\n#define FIX_0_707106781  FIX(0.707106781)\n#define FIX_1_306562965  FIX(1.306562965)\n#endif\n\n\n/* We can gain a little more speed, with a further compromise in accuracy,\n * by omitting the addition in a descaling shift.  This yields an incorrectly\n * rounded result half the time...\n */\n\n#ifndef USE_ACCURATE_ROUNDING\n#undef DESCALE\n#define DESCALE(x,n)  RIGHT_SHIFT(x, n)\n#endif\n\n\n/* Multiply a DCTELEM variable by an INT32 constant, and immediately\n * descale to yield a DCTELEM result.\n */\n\n#define MULTIPLY(var,const)  ((DCTELEM) DESCALE((var) * (const), CONST_BITS))\n\n\n/*\n * Perform the forward DCT on one block of samples.\n */\n\nGLOBAL(void)\njpeg_fdct_ifast (DCTELEM * data)\n{\n  DCTELEM tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;\n  DCTELEM tmp10, tmp11, tmp12, tmp13;\n  DCTELEM z1, z2, z3, z4, z5, z11, z13;\n  DCTELEM *dataptr;\n  int ctr;\n  SHIFT_TEMPS\n\n  /* Pass 1: process rows. */\n\n  dataptr = data;\n  for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {\n    tmp0 = dataptr[0] + dataptr[7];\n    tmp7 = dataptr[0] - dataptr[7];\n    tmp1 = dataptr[1] + dataptr[6];\n    tmp6 = dataptr[1] - dataptr[6];\n    tmp2 = dataptr[2] + dataptr[5];\n    tmp5 = dataptr[2] - dataptr[5];\n    tmp3 = dataptr[3] + dataptr[4];\n    tmp4 = dataptr[3] - dataptr[4];\n    \n    /* Even part */\n    \n    tmp10 = tmp0 + tmp3;\t/* phase 2 */\n    tmp13 = tmp0 - tmp3;\n    tmp11 = tmp1 + tmp2;\n    tmp12 = tmp1 - tmp2;\n    \n    dataptr[0] = tmp10 + tmp11; /* phase 3 */\n    dataptr[4] = tmp10 - tmp11;\n    \n    z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781); /* c4 */\n    dataptr[2] = tmp13 + z1;\t/* phase 5 */\n    dataptr[6] = tmp13 - z1;\n    \n    /* Odd part */\n\n    tmp10 = tmp4 + tmp5;\t/* phase 2 */\n    tmp11 = tmp5 + tmp6;\n    tmp12 = tmp6 + tmp7;\n\n    /* The rotator is modified from fig 4-8 to avoid extra negations. */\n    z5 = MULTIPLY(tmp10 - tmp12, FIX_0_382683433); /* c6 */\n    z2 = MULTIPLY(tmp10, FIX_0_541196100) + z5; /* c2-c6 */\n    z4 = MULTIPLY(tmp12, FIX_1_306562965) + z5; /* c2+c6 */\n    z3 = MULTIPLY(tmp11, FIX_0_707106781); /* c4 */\n\n    z11 = tmp7 + z3;\t\t/* phase 5 */\n    z13 = tmp7 - z3;\n\n    dataptr[5] = z13 + z2;\t/* phase 6 */\n    dataptr[3] = z13 - z2;\n    dataptr[1] = z11 + z4;\n    dataptr[7] = z11 - z4;\n\n    dataptr += DCTSIZE;\t\t/* advance pointer to next row */\n  }\n\n  /* Pass 2: process columns. */\n\n  dataptr = data;\n  for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {\n    tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7];\n    tmp7 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7];\n    tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6];\n    tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6];\n    tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5];\n    tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5];\n    tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4];\n    tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4];\n    \n    /* Even part */\n    \n    tmp10 = tmp0 + tmp3;\t/* phase 2 */\n    tmp13 = tmp0 - tmp3;\n    tmp11 = tmp1 + tmp2;\n    tmp12 = tmp1 - tmp2;\n    \n    dataptr[DCTSIZE*0] = tmp10 + tmp11; /* phase 3 */\n    dataptr[DCTSIZE*4] = tmp10 - tmp11;\n    \n    z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781); /* c4 */\n    dataptr[DCTSIZE*2] = tmp13 + z1; /* phase 5 */\n    dataptr[DCTSIZE*6] = tmp13 - z1;\n    \n    /* Odd part */\n\n    tmp10 = tmp4 + tmp5;\t/* phase 2 */\n    tmp11 = tmp5 + tmp6;\n    tmp12 = tmp6 + tmp7;\n\n    /* The rotator is modified from fig 4-8 to avoid extra negations. */\n    z5 = MULTIPLY(tmp10 - tmp12, FIX_0_382683433); /* c6 */\n    z2 = MULTIPLY(tmp10, FIX_0_541196100) + z5; /* c2-c6 */\n    z4 = MULTIPLY(tmp12, FIX_1_306562965) + z5; /* c2+c6 */\n    z3 = MULTIPLY(tmp11, FIX_0_707106781); /* c4 */\n\n    z11 = tmp7 + z3;\t\t/* phase 5 */\n    z13 = tmp7 - z3;\n\n    dataptr[DCTSIZE*5] = z13 + z2; /* phase 6 */\n    dataptr[DCTSIZE*3] = z13 - z2;\n    dataptr[DCTSIZE*1] = z11 + z4;\n    dataptr[DCTSIZE*7] = z11 - z4;\n\n    dataptr++;\t\t\t/* advance pointer to next column */\n  }\n}\n\n#endif /* DCT_IFAST_SUPPORTED */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jfdctint.c",
    "content": "/*\n * jfdctint.c\n *\n * Copyright (C) 1991-1996, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains a slow-but-accurate integer implementation of the\n * forward DCT (Discrete Cosine Transform).\n *\n * A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT\n * on each column.  Direct algorithms are also available, but they are\n * much more complex and seem not to be any faster when reduced to code.\n *\n * This implementation is based on an algorithm described in\n *   C. Loeffler, A. Ligtenberg and G. Moschytz, \"Practical Fast 1-D DCT\n *   Algorithms with 11 Multiplications\", Proc. Int'l. Conf. on Acoustics,\n *   Speech, and Signal Processing 1989 (ICASSP '89), pp. 988-991.\n * The primary algorithm described there uses 11 multiplies and 29 adds.\n * We use their alternate method with 12 multiplies and 32 adds.\n * The advantage of this method is that no data path contains more than one\n * multiplication; this allows a very simple and accurate implementation in\n * scaled fixed-point arithmetic, with a minimal number of shifts.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n#include \"jdct.h\"\t\t/* Private declarations for DCT subsystem */\n\n#ifdef DCT_ISLOW_SUPPORTED\n\n\n/*\n * This module is specialized to the case DCTSIZE = 8.\n */\n\n#if DCTSIZE != 8\n  Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */\n#endif\n\n\n/*\n * The poop on this scaling stuff is as follows:\n *\n * Each 1-D DCT step produces outputs which are a factor of sqrt(N)\n * larger than the true DCT outputs.  The final outputs are therefore\n * a factor of N larger than desired; since N=8 this can be cured by\n * a simple right shift at the end of the algorithm.  The advantage of\n * this arrangement is that we save two multiplications per 1-D DCT,\n * because the y0 and y4 outputs need not be divided by sqrt(N).\n * In the IJG code, this factor of 8 is removed by the quantization step\n * (in jcdctmgr.c), NOT in this module.\n *\n * We have to do addition and subtraction of the integer inputs, which\n * is no problem, and multiplication by fractional constants, which is\n * a problem to do in integer arithmetic.  We multiply all the constants\n * by CONST_SCALE and convert them to integer constants (thus retaining\n * CONST_BITS bits of precision in the constants).  After doing a\n * multiplication we have to divide the product by CONST_SCALE, with proper\n * rounding, to produce the correct output.  This division can be done\n * cheaply as a right shift of CONST_BITS bits.  We postpone shifting\n * as long as possible so that partial sums can be added together with\n * full fractional precision.\n *\n * The outputs of the first pass are scaled up by PASS1_BITS bits so that\n * they are represented to better-than-integral precision.  These outputs\n * require BITS_IN_JSAMPLE + PASS1_BITS + 3 bits; this fits in a 16-bit word\n * with the recommended scaling.  (For 12-bit sample data, the intermediate\n * array is INT32 anyway.)\n *\n * To avoid overflow of the 32-bit intermediate results in pass 2, we must\n * have BITS_IN_JSAMPLE + CONST_BITS + PASS1_BITS <= 26.  Error analysis\n * shows that the values given below are the most effective.\n */\n\n#if BITS_IN_JSAMPLE == 8\n#define CONST_BITS  13\n#define PASS1_BITS  2\n#else\n#define CONST_BITS  13\n#define PASS1_BITS  1\t\t/* lose a little precision to avoid overflow */\n#endif\n\n/* Some C compilers fail to reduce \"FIX(constant)\" at compile time, thus\n * causing a lot of useless floating-point operations at run time.\n * To get around this we use the following pre-calculated constants.\n * If you change CONST_BITS you may want to add appropriate values.\n * (With a reasonable C compiler, you can just rely on the FIX() macro...)\n */\n\n#if CONST_BITS == 13\n#define FIX_0_298631336  ((INT32)  2446)\t/* FIX(0.298631336) */\n#define FIX_0_390180644  ((INT32)  3196)\t/* FIX(0.390180644) */\n#define FIX_0_541196100  ((INT32)  4433)\t/* FIX(0.541196100) */\n#define FIX_0_765366865  ((INT32)  6270)\t/* FIX(0.765366865) */\n#define FIX_0_899976223  ((INT32)  7373)\t/* FIX(0.899976223) */\n#define FIX_1_175875602  ((INT32)  9633)\t/* FIX(1.175875602) */\n#define FIX_1_501321110  ((INT32)  12299)\t/* FIX(1.501321110) */\n#define FIX_1_847759065  ((INT32)  15137)\t/* FIX(1.847759065) */\n#define FIX_1_961570560  ((INT32)  16069)\t/* FIX(1.961570560) */\n#define FIX_2_053119869  ((INT32)  16819)\t/* FIX(2.053119869) */\n#define FIX_2_562915447  ((INT32)  20995)\t/* FIX(2.562915447) */\n#define FIX_3_072711026  ((INT32)  25172)\t/* FIX(3.072711026) */\n#else\n#define FIX_0_298631336  FIX(0.298631336)\n#define FIX_0_390180644  FIX(0.390180644)\n#define FIX_0_541196100  FIX(0.541196100)\n#define FIX_0_765366865  FIX(0.765366865)\n#define FIX_0_899976223  FIX(0.899976223)\n#define FIX_1_175875602  FIX(1.175875602)\n#define FIX_1_501321110  FIX(1.501321110)\n#define FIX_1_847759065  FIX(1.847759065)\n#define FIX_1_961570560  FIX(1.961570560)\n#define FIX_2_053119869  FIX(2.053119869)\n#define FIX_2_562915447  FIX(2.562915447)\n#define FIX_3_072711026  FIX(3.072711026)\n#endif\n\n\n/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result.\n * For 8-bit samples with the recommended scaling, all the variable\n * and constant values involved are no more than 16 bits wide, so a\n * 16x16->32 bit multiply can be used instead of a full 32x32 multiply.\n * For 12-bit samples, a full 32-bit multiplication will be needed.\n */\n\n#if BITS_IN_JSAMPLE == 8\n#define MULTIPLY(var,const)  MULTIPLY16C16(var,const)\n#else\n#define MULTIPLY(var,const)  ((var) * (const))\n#endif\n\n\n/*\n * Perform the forward DCT on one block of samples.\n */\n\nGLOBAL(void)\njpeg_fdct_islow (DCTELEM * data)\n{\n  INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;\n  INT32 tmp10, tmp11, tmp12, tmp13;\n  INT32 z1, z2, z3, z4, z5;\n  DCTELEM *dataptr;\n  int ctr;\n  SHIFT_TEMPS\n\n  /* Pass 1: process rows. */\n  /* Note results are scaled up by sqrt(8) compared to a true DCT; */\n  /* furthermore, we scale the results by 2**PASS1_BITS. */\n\n  dataptr = data;\n  for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {\n    tmp0 = dataptr[0] + dataptr[7];\n    tmp7 = dataptr[0] - dataptr[7];\n    tmp1 = dataptr[1] + dataptr[6];\n    tmp6 = dataptr[1] - dataptr[6];\n    tmp2 = dataptr[2] + dataptr[5];\n    tmp5 = dataptr[2] - dataptr[5];\n    tmp3 = dataptr[3] + dataptr[4];\n    tmp4 = dataptr[3] - dataptr[4];\n    \n    /* Even part per LL&M figure 1 --- note that published figure is faulty;\n     * rotator \"sqrt(2)*c1\" should be \"sqrt(2)*c6\".\n     */\n    \n    tmp10 = tmp0 + tmp3;\n    tmp13 = tmp0 - tmp3;\n    tmp11 = tmp1 + tmp2;\n    tmp12 = tmp1 - tmp2;\n    \n    dataptr[0] = (DCTELEM) ((tmp10 + tmp11) << PASS1_BITS);\n    dataptr[4] = (DCTELEM) ((tmp10 - tmp11) << PASS1_BITS);\n    \n    z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100);\n    dataptr[2] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp13, FIX_0_765366865),\n\t\t\t\t   CONST_BITS-PASS1_BITS);\n    dataptr[6] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp12, - FIX_1_847759065),\n\t\t\t\t   CONST_BITS-PASS1_BITS);\n    \n    /* Odd part per figure 8 --- note paper omits factor of sqrt(2).\n     * cK represents cos(K*pi/16).\n     * i0..i3 in the paper are tmp4..tmp7 here.\n     */\n    \n    z1 = tmp4 + tmp7;\n    z2 = tmp5 + tmp6;\n    z3 = tmp4 + tmp6;\n    z4 = tmp5 + tmp7;\n    z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */\n    \n    tmp4 = MULTIPLY(tmp4, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */\n    tmp5 = MULTIPLY(tmp5, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */\n    tmp6 = MULTIPLY(tmp6, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */\n    tmp7 = MULTIPLY(tmp7, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */\n    z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */\n    z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */\n    z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */\n    z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */\n    \n    z3 += z5;\n    z4 += z5;\n    \n    dataptr[7] = (DCTELEM) DESCALE(tmp4 + z1 + z3, CONST_BITS-PASS1_BITS);\n    dataptr[5] = (DCTELEM) DESCALE(tmp5 + z2 + z4, CONST_BITS-PASS1_BITS);\n    dataptr[3] = (DCTELEM) DESCALE(tmp6 + z2 + z3, CONST_BITS-PASS1_BITS);\n    dataptr[1] = (DCTELEM) DESCALE(tmp7 + z1 + z4, CONST_BITS-PASS1_BITS);\n    \n    dataptr += DCTSIZE;\t\t/* advance pointer to next row */\n  }\n\n  /* Pass 2: process columns.\n   * We remove the PASS1_BITS scaling, but leave the results scaled up\n   * by an overall factor of 8.\n   */\n\n  dataptr = data;\n  for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {\n    tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7];\n    tmp7 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7];\n    tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6];\n    tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6];\n    tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5];\n    tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5];\n    tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4];\n    tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4];\n    \n    /* Even part per LL&M figure 1 --- note that published figure is faulty;\n     * rotator \"sqrt(2)*c1\" should be \"sqrt(2)*c6\".\n     */\n    \n    tmp10 = tmp0 + tmp3;\n    tmp13 = tmp0 - tmp3;\n    tmp11 = tmp1 + tmp2;\n    tmp12 = tmp1 - tmp2;\n    \n    dataptr[DCTSIZE*0] = (DCTELEM) DESCALE(tmp10 + tmp11, PASS1_BITS);\n    dataptr[DCTSIZE*4] = (DCTELEM) DESCALE(tmp10 - tmp11, PASS1_BITS);\n    \n    z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100);\n    dataptr[DCTSIZE*2] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp13, FIX_0_765366865),\n\t\t\t\t\t   CONST_BITS+PASS1_BITS);\n    dataptr[DCTSIZE*6] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp12, - FIX_1_847759065),\n\t\t\t\t\t   CONST_BITS+PASS1_BITS);\n    \n    /* Odd part per figure 8 --- note paper omits factor of sqrt(2).\n     * cK represents cos(K*pi/16).\n     * i0..i3 in the paper are tmp4..tmp7 here.\n     */\n    \n    z1 = tmp4 + tmp7;\n    z2 = tmp5 + tmp6;\n    z3 = tmp4 + tmp6;\n    z4 = tmp5 + tmp7;\n    z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */\n    \n    tmp4 = MULTIPLY(tmp4, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */\n    tmp5 = MULTIPLY(tmp5, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */\n    tmp6 = MULTIPLY(tmp6, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */\n    tmp7 = MULTIPLY(tmp7, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */\n    z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */\n    z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */\n    z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */\n    z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */\n    \n    z3 += z5;\n    z4 += z5;\n    \n    dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp4 + z1 + z3,\n\t\t\t\t\t   CONST_BITS+PASS1_BITS);\n    dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp5 + z2 + z4,\n\t\t\t\t\t   CONST_BITS+PASS1_BITS);\n    dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp6 + z2 + z3,\n\t\t\t\t\t   CONST_BITS+PASS1_BITS);\n    dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp7 + z1 + z4,\n\t\t\t\t\t   CONST_BITS+PASS1_BITS);\n    \n    dataptr++;\t\t\t/* advance pointer to next column */\n  }\n}\n\n#endif /* DCT_ISLOW_SUPPORTED */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jidctflt.c",
    "content": "/*\n * jidctflt.c\n *\n * Copyright (C) 1994-1998, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains a floating-point implementation of the\n * inverse DCT (Discrete Cosine Transform).  In the IJG code, this routine\n * must also perform dequantization of the input coefficients.\n *\n * This implementation should be more accurate than either of the integer\n * IDCT implementations.  However, it may not give the same results on all\n * machines because of differences in roundoff behavior.  Speed will depend\n * on the hardware's floating point capacity.\n *\n * A 2-D IDCT can be done by 1-D IDCT on each column followed by 1-D IDCT\n * on each row (or vice versa, but it's more convenient to emit a row at\n * a time).  Direct algorithms are also available, but they are much more\n * complex and seem not to be any faster when reduced to code.\n *\n * This implementation is based on Arai, Agui, and Nakajima's algorithm for\n * scaled DCT.  Their original paper (Trans. IEICE E-71(11):1095) is in\n * Japanese, but the algorithm is described in the Pennebaker & Mitchell\n * JPEG textbook (see REFERENCES section in file README).  The following code\n * is based directly on figure 4-8 in P&M.\n * While an 8-point DCT cannot be done in less than 11 multiplies, it is\n * possible to arrange the computation so that many of the multiplies are\n * simple scalings of the final outputs.  These multiplies can then be\n * folded into the multiplications or divisions by the JPEG quantization\n * table entries.  The AA&N method leaves only 5 multiplies and 29 adds\n * to be done in the DCT itself.\n * The primary disadvantage of this method is that with a fixed-point\n * implementation, accuracy is lost due to imprecise representation of the\n * scaled quantization values.  However, that problem does not arise if\n * we use floating point arithmetic.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n#include \"jdct.h\"\t\t/* Private declarations for DCT subsystem */\n\n#ifdef DCT_FLOAT_SUPPORTED\n\n\n/*\n * This module is specialized to the case DCTSIZE = 8.\n */\n\n#if DCTSIZE != 8\n  Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */\n#endif\n\n\n/* Dequantize a coefficient by multiplying it by the multiplier-table\n * entry; produce a float result.\n */\n\n#define DEQUANTIZE(coef,quantval)  (((FAST_FLOAT) (coef)) * (quantval))\n\n\n/*\n * Perform dequantization and inverse DCT on one block of coefficients.\n */\n\nGLOBAL(void)\njpeg_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr,\n\t\t JCOEFPTR coef_block,\n\t\t JSAMPARRAY output_buf, JDIMENSION output_col)\n{\n  FAST_FLOAT tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;\n  FAST_FLOAT tmp10, tmp11, tmp12, tmp13;\n  FAST_FLOAT z5, z10, z11, z12, z13;\n  JCOEFPTR inptr;\n  FLOAT_MULT_TYPE * quantptr;\n  FAST_FLOAT * wsptr;\n  JSAMPROW outptr;\n  JSAMPLE *range_limit = IDCT_range_limit(cinfo);\n  int ctr;\n  FAST_FLOAT workspace[DCTSIZE2]; /* buffers data between passes */\n  SHIFT_TEMPS\n\n  /* Pass 1: process columns from input, store into work array. */\n\n  inptr = coef_block;\n  quantptr = (FLOAT_MULT_TYPE *) compptr->dct_table;\n  wsptr = workspace;\n  for (ctr = DCTSIZE; ctr > 0; ctr--) {\n    /* Due to quantization, we will usually find that many of the input\n     * coefficients are zero, especially the AC terms.  We can exploit this\n     * by short-circuiting the IDCT calculation for any column in which all\n     * the AC terms are zero.  In that case each output is equal to the\n     * DC coefficient (with scale factor as needed).\n     * With typical images and quantization tables, half or more of the\n     * column DCT calculations can be simplified this way.\n     */\n    \n    if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 &&\n\tinptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 &&\n\tinptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 &&\n\tinptr[DCTSIZE*7] == 0) {\n      /* AC terms all zero */\n      FAST_FLOAT dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);\n      \n      wsptr[DCTSIZE*0] = dcval;\n      wsptr[DCTSIZE*1] = dcval;\n      wsptr[DCTSIZE*2] = dcval;\n      wsptr[DCTSIZE*3] = dcval;\n      wsptr[DCTSIZE*4] = dcval;\n      wsptr[DCTSIZE*5] = dcval;\n      wsptr[DCTSIZE*6] = dcval;\n      wsptr[DCTSIZE*7] = dcval;\n      \n      inptr++;\t\t\t/* advance pointers to next column */\n      quantptr++;\n      wsptr++;\n      continue;\n    }\n    \n    /* Even part */\n\n    tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);\n    tmp1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);\n    tmp2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);\n    tmp3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);\n\n    tmp10 = tmp0 + tmp2;\t/* phase 3 */\n    tmp11 = tmp0 - tmp2;\n\n    tmp13 = tmp1 + tmp3;\t/* phases 5-3 */\n    tmp12 = (tmp1 - tmp3) * ((FAST_FLOAT) 1.414213562) - tmp13; /* 2*c4 */\n\n    tmp0 = tmp10 + tmp13;\t/* phase 2 */\n    tmp3 = tmp10 - tmp13;\n    tmp1 = tmp11 + tmp12;\n    tmp2 = tmp11 - tmp12;\n    \n    /* Odd part */\n\n    tmp4 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);\n    tmp5 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);\n    tmp6 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);\n    tmp7 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);\n\n    z13 = tmp6 + tmp5;\t\t/* phase 6 */\n    z10 = tmp6 - tmp5;\n    z11 = tmp4 + tmp7;\n    z12 = tmp4 - tmp7;\n\n    tmp7 = z11 + z13;\t\t/* phase 5 */\n    tmp11 = (z11 - z13) * ((FAST_FLOAT) 1.414213562); /* 2*c4 */\n\n    z5 = (z10 + z12) * ((FAST_FLOAT) 1.847759065); /* 2*c2 */\n    tmp10 = ((FAST_FLOAT) 1.082392200) * z12 - z5; /* 2*(c2-c6) */\n    tmp12 = ((FAST_FLOAT) -2.613125930) * z10 + z5; /* -2*(c2+c6) */\n\n    tmp6 = tmp12 - tmp7;\t/* phase 2 */\n    tmp5 = tmp11 - tmp6;\n    tmp4 = tmp10 + tmp5;\n\n    wsptr[DCTSIZE*0] = tmp0 + tmp7;\n    wsptr[DCTSIZE*7] = tmp0 - tmp7;\n    wsptr[DCTSIZE*1] = tmp1 + tmp6;\n    wsptr[DCTSIZE*6] = tmp1 - tmp6;\n    wsptr[DCTSIZE*2] = tmp2 + tmp5;\n    wsptr[DCTSIZE*5] = tmp2 - tmp5;\n    wsptr[DCTSIZE*4] = tmp3 + tmp4;\n    wsptr[DCTSIZE*3] = tmp3 - tmp4;\n\n    inptr++;\t\t\t/* advance pointers to next column */\n    quantptr++;\n    wsptr++;\n  }\n  \n  /* Pass 2: process rows from work array, store into output array. */\n  /* Note that we must descale the results by a factor of 8 == 2**3. */\n\n  wsptr = workspace;\n  for (ctr = 0; ctr < DCTSIZE; ctr++) {\n    outptr = output_buf[ctr] + output_col;\n    /* Rows of zeroes can be exploited in the same way as we did with columns.\n     * However, the column calculation has created many nonzero AC terms, so\n     * the simplification applies less often (typically 5% to 10% of the time).\n     * And testing floats for zero is relatively expensive, so we don't bother.\n     */\n    \n    /* Even part */\n\n    tmp10 = wsptr[0] + wsptr[4];\n    tmp11 = wsptr[0] - wsptr[4];\n\n    tmp13 = wsptr[2] + wsptr[6];\n    tmp12 = (wsptr[2] - wsptr[6]) * ((FAST_FLOAT) 1.414213562) - tmp13;\n\n    tmp0 = tmp10 + tmp13;\n    tmp3 = tmp10 - tmp13;\n    tmp1 = tmp11 + tmp12;\n    tmp2 = tmp11 - tmp12;\n\n    /* Odd part */\n\n    z13 = wsptr[5] + wsptr[3];\n    z10 = wsptr[5] - wsptr[3];\n    z11 = wsptr[1] + wsptr[7];\n    z12 = wsptr[1] - wsptr[7];\n\n    tmp7 = z11 + z13;\n    tmp11 = (z11 - z13) * ((FAST_FLOAT) 1.414213562);\n\n    z5 = (z10 + z12) * ((FAST_FLOAT) 1.847759065); /* 2*c2 */\n    tmp10 = ((FAST_FLOAT) 1.082392200) * z12 - z5; /* 2*(c2-c6) */\n    tmp12 = ((FAST_FLOAT) -2.613125930) * z10 + z5; /* -2*(c2+c6) */\n\n    tmp6 = tmp12 - tmp7;\n    tmp5 = tmp11 - tmp6;\n    tmp4 = tmp10 + tmp5;\n\n    /* Final output stage: scale down by a factor of 8 and range-limit */\n\n    outptr[0] = range_limit[(int) DESCALE((INT32) (tmp0 + tmp7), 3)\n\t\t\t    & RANGE_MASK];\n    outptr[7] = range_limit[(int) DESCALE((INT32) (tmp0 - tmp7), 3)\n\t\t\t    & RANGE_MASK];\n    outptr[1] = range_limit[(int) DESCALE((INT32) (tmp1 + tmp6), 3)\n\t\t\t    & RANGE_MASK];\n    outptr[6] = range_limit[(int) DESCALE((INT32) (tmp1 - tmp6), 3)\n\t\t\t    & RANGE_MASK];\n    outptr[2] = range_limit[(int) DESCALE((INT32) (tmp2 + tmp5), 3)\n\t\t\t    & RANGE_MASK];\n    outptr[5] = range_limit[(int) DESCALE((INT32) (tmp2 - tmp5), 3)\n\t\t\t    & RANGE_MASK];\n    outptr[4] = range_limit[(int) DESCALE((INT32) (tmp3 + tmp4), 3)\n\t\t\t    & RANGE_MASK];\n    outptr[3] = range_limit[(int) DESCALE((INT32) (tmp3 - tmp4), 3)\n\t\t\t    & RANGE_MASK];\n    \n    wsptr += DCTSIZE;\t\t/* advance pointer to next row */\n  }\n}\n\n#endif /* DCT_FLOAT_SUPPORTED */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jidctfst.c",
    "content": "/*\n * jidctfst.c\n *\n * Copyright (C) 1994-1998, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains a fast, not so accurate integer implementation of the\n * inverse DCT (Discrete Cosine Transform).  In the IJG code, this routine\n * must also perform dequantization of the input coefficients.\n *\n * A 2-D IDCT can be done by 1-D IDCT on each column followed by 1-D IDCT\n * on each row (or vice versa, but it's more convenient to emit a row at\n * a time).  Direct algorithms are also available, but they are much more\n * complex and seem not to be any faster when reduced to code.\n *\n * This implementation is based on Arai, Agui, and Nakajima's algorithm for\n * scaled DCT.  Their original paper (Trans. IEICE E-71(11):1095) is in\n * Japanese, but the algorithm is described in the Pennebaker & Mitchell\n * JPEG textbook (see REFERENCES section in file README).  The following code\n * is based directly on figure 4-8 in P&M.\n * While an 8-point DCT cannot be done in less than 11 multiplies, it is\n * possible to arrange the computation so that many of the multiplies are\n * simple scalings of the final outputs.  These multiplies can then be\n * folded into the multiplications or divisions by the JPEG quantization\n * table entries.  The AA&N method leaves only 5 multiplies and 29 adds\n * to be done in the DCT itself.\n * The primary disadvantage of this method is that with fixed-point math,\n * accuracy is lost due to imprecise representation of the scaled\n * quantization values.  The smaller the quantization table entry, the less\n * precise the scaled value, so this implementation does worse with high-\n * quality-setting files than with low-quality ones.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n#include \"jdct.h\"\t\t/* Private declarations for DCT subsystem */\n\n#ifdef DCT_IFAST_SUPPORTED\n\n\n/*\n * This module is specialized to the case DCTSIZE = 8.\n */\n\n#if DCTSIZE != 8\n  Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */\n#endif\n\n\n/* Scaling decisions are generally the same as in the LL&M algorithm;\n * see jidctint.c for more details.  However, we choose to descale\n * (right shift) multiplication products as soon as they are formed,\n * rather than carrying additional fractional bits into subsequent additions.\n * This compromises accuracy slightly, but it lets us save a few shifts.\n * More importantly, 16-bit arithmetic is then adequate (for 8-bit samples)\n * everywhere except in the multiplications proper; this saves a good deal\n * of work on 16-bit-int machines.\n *\n * The dequantized coefficients are not integers because the AA&N scaling\n * factors have been incorporated.  We represent them scaled up by PASS1_BITS,\n * so that the first and second IDCT rounds have the same input scaling.\n * For 8-bit JSAMPLEs, we choose IFAST_SCALE_BITS = PASS1_BITS so as to\n * avoid a descaling shift; this compromises accuracy rather drastically\n * for small quantization table entries, but it saves a lot of shifts.\n * For 12-bit JSAMPLEs, there's no hope of using 16x16 multiplies anyway,\n * so we use a much larger scaling factor to preserve accuracy.\n *\n * A final compromise is to represent the multiplicative constants to only\n * 8 fractional bits, rather than 13.  This saves some shifting work on some\n * machines, and may also reduce the cost of multiplication (since there\n * are fewer one-bits in the constants).\n */\n\n#if BITS_IN_JSAMPLE == 8\n#define CONST_BITS  8\n#define PASS1_BITS  2\n#else\n#define CONST_BITS  8\n#define PASS1_BITS  1\t\t/* lose a little precision to avoid overflow */\n#endif\n\n/* Some C compilers fail to reduce \"FIX(constant)\" at compile time, thus\n * causing a lot of useless floating-point operations at run time.\n * To get around this we use the following pre-calculated constants.\n * If you change CONST_BITS you may want to add appropriate values.\n * (With a reasonable C compiler, you can just rely on the FIX() macro...)\n */\n\n#if CONST_BITS == 8\n#define FIX_1_082392200  ((INT32)  277)\t\t/* FIX(1.082392200) */\n#define FIX_1_414213562  ((INT32)  362)\t\t/* FIX(1.414213562) */\n#define FIX_1_847759065  ((INT32)  473)\t\t/* FIX(1.847759065) */\n#define FIX_2_613125930  ((INT32)  669)\t\t/* FIX(2.613125930) */\n#else\n#define FIX_1_082392200  FIX(1.082392200)\n#define FIX_1_414213562  FIX(1.414213562)\n#define FIX_1_847759065  FIX(1.847759065)\n#define FIX_2_613125930  FIX(2.613125930)\n#endif\n\n\n/* We can gain a little more speed, with a further compromise in accuracy,\n * by omitting the addition in a descaling shift.  This yields an incorrectly\n * rounded result half the time...\n */\n\n#ifndef USE_ACCURATE_ROUNDING\n#undef DESCALE\n#define DESCALE(x,n)  RIGHT_SHIFT(x, n)\n#endif\n\n\n/* Multiply a DCTELEM variable by an INT32 constant, and immediately\n * descale to yield a DCTELEM result.\n */\n\n#define MULTIPLY(var,const)  ((DCTELEM) DESCALE((var) * (const), CONST_BITS))\n\n\n/* Dequantize a coefficient by multiplying it by the multiplier-table\n * entry; produce a DCTELEM result.  For 8-bit data a 16x16->16\n * multiplication will do.  For 12-bit data, the multiplier table is\n * declared INT32, so a 32-bit multiply will be used.\n */\n\n#if BITS_IN_JSAMPLE == 8\n#define DEQUANTIZE(coef,quantval)  (((IFAST_MULT_TYPE) (coef)) * (quantval))\n#else\n#define DEQUANTIZE(coef,quantval)  \\\n\tDESCALE((coef)*(quantval), IFAST_SCALE_BITS-PASS1_BITS)\n#endif\n\n\n/* Like DESCALE, but applies to a DCTELEM and produces an int.\n * We assume that int right shift is unsigned if INT32 right shift is.\n */\n\n#ifdef RIGHT_SHIFT_IS_UNSIGNED\n#define ISHIFT_TEMPS\tDCTELEM ishift_temp;\n#if BITS_IN_JSAMPLE == 8\n#define DCTELEMBITS  16\t\t/* DCTELEM may be 16 or 32 bits */\n#else\n#define DCTELEMBITS  32\t\t/* DCTELEM must be 32 bits */\n#endif\n#define IRIGHT_SHIFT(x,shft)  \\\n    ((ishift_temp = (x)) < 0 ? \\\n     (ishift_temp >> (shft)) | ((~((DCTELEM) 0)) << (DCTELEMBITS-(shft))) : \\\n     (ishift_temp >> (shft)))\n#else\n#define ISHIFT_TEMPS\n#define IRIGHT_SHIFT(x,shft)\t((x) >> (shft))\n#endif\n\n#ifdef USE_ACCURATE_ROUNDING\n#define IDESCALE(x,n)  ((int) IRIGHT_SHIFT((x) + (1 << ((n)-1)), n))\n#else\n#define IDESCALE(x,n)  ((int) IRIGHT_SHIFT(x, n))\n#endif\n\n\n/*\n * Perform dequantization and inverse DCT on one block of coefficients.\n */\n\nGLOBAL(void)\njpeg_idct_ifast (j_decompress_ptr cinfo, jpeg_component_info * compptr,\n\t\t JCOEFPTR coef_block,\n\t\t JSAMPARRAY output_buf, JDIMENSION output_col)\n{\n  DCTELEM tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;\n  DCTELEM tmp10, tmp11, tmp12, tmp13;\n  DCTELEM z5, z10, z11, z12, z13;\n  JCOEFPTR inptr;\n  IFAST_MULT_TYPE * quantptr;\n  int * wsptr;\n  JSAMPROW outptr;\n  JSAMPLE *range_limit = IDCT_range_limit(cinfo);\n  int ctr;\n  int workspace[DCTSIZE2];\t/* buffers data between passes */\n  SHIFT_TEMPS\t\t\t/* for DESCALE */\n  ISHIFT_TEMPS\t\t\t/* for IDESCALE */\n\n  /* Pass 1: process columns from input, store into work array. */\n\n  inptr = coef_block;\n  quantptr = (IFAST_MULT_TYPE *) compptr->dct_table;\n  wsptr = workspace;\n  for (ctr = DCTSIZE; ctr > 0; ctr--) {\n    /* Due to quantization, we will usually find that many of the input\n     * coefficients are zero, especially the AC terms.  We can exploit this\n     * by short-circuiting the IDCT calculation for any column in which all\n     * the AC terms are zero.  In that case each output is equal to the\n     * DC coefficient (with scale factor as needed).\n     * With typical images and quantization tables, half or more of the\n     * column DCT calculations can be simplified this way.\n     */\n    \n    if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 &&\n\tinptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 &&\n\tinptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 &&\n\tinptr[DCTSIZE*7] == 0) {\n      /* AC terms all zero */\n      int dcval = (int) DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);\n\n      wsptr[DCTSIZE*0] = dcval;\n      wsptr[DCTSIZE*1] = dcval;\n      wsptr[DCTSIZE*2] = dcval;\n      wsptr[DCTSIZE*3] = dcval;\n      wsptr[DCTSIZE*4] = dcval;\n      wsptr[DCTSIZE*5] = dcval;\n      wsptr[DCTSIZE*6] = dcval;\n      wsptr[DCTSIZE*7] = dcval;\n      \n      inptr++;\t\t\t/* advance pointers to next column */\n      quantptr++;\n      wsptr++;\n      continue;\n    }\n    \n    /* Even part */\n\n    tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);\n    tmp1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);\n    tmp2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);\n    tmp3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);\n\n    tmp10 = tmp0 + tmp2;\t/* phase 3 */\n    tmp11 = tmp0 - tmp2;\n\n    tmp13 = tmp1 + tmp3;\t/* phases 5-3 */\n    tmp12 = MULTIPLY(tmp1 - tmp3, FIX_1_414213562) - tmp13; /* 2*c4 */\n\n    tmp0 = tmp10 + tmp13;\t/* phase 2 */\n    tmp3 = tmp10 - tmp13;\n    tmp1 = tmp11 + tmp12;\n    tmp2 = tmp11 - tmp12;\n    \n    /* Odd part */\n\n    tmp4 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);\n    tmp5 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);\n    tmp6 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);\n    tmp7 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);\n\n    z13 = tmp6 + tmp5;\t\t/* phase 6 */\n    z10 = tmp6 - tmp5;\n    z11 = tmp4 + tmp7;\n    z12 = tmp4 - tmp7;\n\n    tmp7 = z11 + z13;\t\t/* phase 5 */\n    tmp11 = MULTIPLY(z11 - z13, FIX_1_414213562); /* 2*c4 */\n\n    z5 = MULTIPLY(z10 + z12, FIX_1_847759065); /* 2*c2 */\n    tmp10 = MULTIPLY(z12, FIX_1_082392200) - z5; /* 2*(c2-c6) */\n    tmp12 = MULTIPLY(z10, - FIX_2_613125930) + z5; /* -2*(c2+c6) */\n\n    tmp6 = tmp12 - tmp7;\t/* phase 2 */\n    tmp5 = tmp11 - tmp6;\n    tmp4 = tmp10 + tmp5;\n\n    wsptr[DCTSIZE*0] = (int) (tmp0 + tmp7);\n    wsptr[DCTSIZE*7] = (int) (tmp0 - tmp7);\n    wsptr[DCTSIZE*1] = (int) (tmp1 + tmp6);\n    wsptr[DCTSIZE*6] = (int) (tmp1 - tmp6);\n    wsptr[DCTSIZE*2] = (int) (tmp2 + tmp5);\n    wsptr[DCTSIZE*5] = (int) (tmp2 - tmp5);\n    wsptr[DCTSIZE*4] = (int) (tmp3 + tmp4);\n    wsptr[DCTSIZE*3] = (int) (tmp3 - tmp4);\n\n    inptr++;\t\t\t/* advance pointers to next column */\n    quantptr++;\n    wsptr++;\n  }\n  \n  /* Pass 2: process rows from work array, store into output array. */\n  /* Note that we must descale the results by a factor of 8 == 2**3, */\n  /* and also undo the PASS1_BITS scaling. */\n\n  wsptr = workspace;\n  for (ctr = 0; ctr < DCTSIZE; ctr++) {\n    outptr = output_buf[ctr] + output_col;\n    /* Rows of zeroes can be exploited in the same way as we did with columns.\n     * However, the column calculation has created many nonzero AC terms, so\n     * the simplification applies less often (typically 5% to 10% of the time).\n     * On machines with very fast multiplication, it's possible that the\n     * test takes more time than it's worth.  In that case this section\n     * may be commented out.\n     */\n    \n#ifndef NO_ZERO_ROW_TEST\n    if (wsptr[1] == 0 && wsptr[2] == 0 && wsptr[3] == 0 && wsptr[4] == 0 &&\n\twsptr[5] == 0 && wsptr[6] == 0 && wsptr[7] == 0) {\n      /* AC terms all zero */\n      JSAMPLE dcval = range_limit[IDESCALE(wsptr[0], PASS1_BITS+3)\n\t\t\t\t  & RANGE_MASK];\n      \n      outptr[0] = dcval;\n      outptr[1] = dcval;\n      outptr[2] = dcval;\n      outptr[3] = dcval;\n      outptr[4] = dcval;\n      outptr[5] = dcval;\n      outptr[6] = dcval;\n      outptr[7] = dcval;\n\n      wsptr += DCTSIZE;\t\t/* advance pointer to next row */\n      continue;\n    }\n#endif\n    \n    /* Even part */\n\n    tmp10 = ((DCTELEM) wsptr[0] + (DCTELEM) wsptr[4]);\n    tmp11 = ((DCTELEM) wsptr[0] - (DCTELEM) wsptr[4]);\n\n    tmp13 = ((DCTELEM) wsptr[2] + (DCTELEM) wsptr[6]);\n    tmp12 = MULTIPLY((DCTELEM) wsptr[2] - (DCTELEM) wsptr[6], FIX_1_414213562)\n\t    - tmp13;\n\n    tmp0 = tmp10 + tmp13;\n    tmp3 = tmp10 - tmp13;\n    tmp1 = tmp11 + tmp12;\n    tmp2 = tmp11 - tmp12;\n\n    /* Odd part */\n\n    z13 = (DCTELEM) wsptr[5] + (DCTELEM) wsptr[3];\n    z10 = (DCTELEM) wsptr[5] - (DCTELEM) wsptr[3];\n    z11 = (DCTELEM) wsptr[1] + (DCTELEM) wsptr[7];\n    z12 = (DCTELEM) wsptr[1] - (DCTELEM) wsptr[7];\n\n    tmp7 = z11 + z13;\t\t/* phase 5 */\n    tmp11 = MULTIPLY(z11 - z13, FIX_1_414213562); /* 2*c4 */\n\n    z5 = MULTIPLY(z10 + z12, FIX_1_847759065); /* 2*c2 */\n    tmp10 = MULTIPLY(z12, FIX_1_082392200) - z5; /* 2*(c2-c6) */\n    tmp12 = MULTIPLY(z10, - FIX_2_613125930) + z5; /* -2*(c2+c6) */\n\n    tmp6 = tmp12 - tmp7;\t/* phase 2 */\n    tmp5 = tmp11 - tmp6;\n    tmp4 = tmp10 + tmp5;\n\n    /* Final output stage: scale down by a factor of 8 and range-limit */\n\n    outptr[0] = range_limit[IDESCALE(tmp0 + tmp7, PASS1_BITS+3)\n\t\t\t    & RANGE_MASK];\n    outptr[7] = range_limit[IDESCALE(tmp0 - tmp7, PASS1_BITS+3)\n\t\t\t    & RANGE_MASK];\n    outptr[1] = range_limit[IDESCALE(tmp1 + tmp6, PASS1_BITS+3)\n\t\t\t    & RANGE_MASK];\n    outptr[6] = range_limit[IDESCALE(tmp1 - tmp6, PASS1_BITS+3)\n\t\t\t    & RANGE_MASK];\n    outptr[2] = range_limit[IDESCALE(tmp2 + tmp5, PASS1_BITS+3)\n\t\t\t    & RANGE_MASK];\n    outptr[5] = range_limit[IDESCALE(tmp2 - tmp5, PASS1_BITS+3)\n\t\t\t    & RANGE_MASK];\n    outptr[4] = range_limit[IDESCALE(tmp3 + tmp4, PASS1_BITS+3)\n\t\t\t    & RANGE_MASK];\n    outptr[3] = range_limit[IDESCALE(tmp3 - tmp4, PASS1_BITS+3)\n\t\t\t    & RANGE_MASK];\n\n    wsptr += DCTSIZE;\t\t/* advance pointer to next row */\n  }\n}\n\n#endif /* DCT_IFAST_SUPPORTED */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jidctint.c",
    "content": "/*\n * jidctint.c\n *\n * Copyright (C) 1991-1998, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains a slow-but-accurate integer implementation of the\n * inverse DCT (Discrete Cosine Transform).  In the IJG code, this routine\n * must also perform dequantization of the input coefficients.\n *\n * A 2-D IDCT can be done by 1-D IDCT on each column followed by 1-D IDCT\n * on each row (or vice versa, but it's more convenient to emit a row at\n * a time).  Direct algorithms are also available, but they are much more\n * complex and seem not to be any faster when reduced to code.\n *\n * This implementation is based on an algorithm described in\n *   C. Loeffler, A. Ligtenberg and G. Moschytz, \"Practical Fast 1-D DCT\n *   Algorithms with 11 Multiplications\", Proc. Int'l. Conf. on Acoustics,\n *   Speech, and Signal Processing 1989 (ICASSP '89), pp. 988-991.\n * The primary algorithm described there uses 11 multiplies and 29 adds.\n * We use their alternate method with 12 multiplies and 32 adds.\n * The advantage of this method is that no data path contains more than one\n * multiplication; this allows a very simple and accurate implementation in\n * scaled fixed-point arithmetic, with a minimal number of shifts.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n#include \"jdct.h\"\t\t/* Private declarations for DCT subsystem */\n\n#ifdef DCT_ISLOW_SUPPORTED\n\n\n/*\n * This module is specialized to the case DCTSIZE = 8.\n */\n\n#if DCTSIZE != 8\n  Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */\n#endif\n\n\n/*\n * The poop on this scaling stuff is as follows:\n *\n * Each 1-D IDCT step produces outputs which are a factor of sqrt(N)\n * larger than the true IDCT outputs.  The final outputs are therefore\n * a factor of N larger than desired; since N=8 this can be cured by\n * a simple right shift at the end of the algorithm.  The advantage of\n * this arrangement is that we save two multiplications per 1-D IDCT,\n * because the y0 and y4 inputs need not be divided by sqrt(N).\n *\n * We have to do addition and subtraction of the integer inputs, which\n * is no problem, and multiplication by fractional constants, which is\n * a problem to do in integer arithmetic.  We multiply all the constants\n * by CONST_SCALE and convert them to integer constants (thus retaining\n * CONST_BITS bits of precision in the constants).  After doing a\n * multiplication we have to divide the product by CONST_SCALE, with proper\n * rounding, to produce the correct output.  This division can be done\n * cheaply as a right shift of CONST_BITS bits.  We postpone shifting\n * as long as possible so that partial sums can be added together with\n * full fractional precision.\n *\n * The outputs of the first pass are scaled up by PASS1_BITS bits so that\n * they are represented to better-than-integral precision.  These outputs\n * require BITS_IN_JSAMPLE + PASS1_BITS + 3 bits; this fits in a 16-bit word\n * with the recommended scaling.  (To scale up 12-bit sample data further, an\n * intermediate INT32 array would be needed.)\n *\n * To avoid overflow of the 32-bit intermediate results in pass 2, we must\n * have BITS_IN_JSAMPLE + CONST_BITS + PASS1_BITS <= 26.  Error analysis\n * shows that the values given below are the most effective.\n */\n\n#if BITS_IN_JSAMPLE == 8\n#define CONST_BITS  13\n#define PASS1_BITS  2\n#else\n#define CONST_BITS  13\n#define PASS1_BITS  1\t\t/* lose a little precision to avoid overflow */\n#endif\n\n/* Some C compilers fail to reduce \"FIX(constant)\" at compile time, thus\n * causing a lot of useless floating-point operations at run time.\n * To get around this we use the following pre-calculated constants.\n * If you change CONST_BITS you may want to add appropriate values.\n * (With a reasonable C compiler, you can just rely on the FIX() macro...)\n */\n\n#if CONST_BITS == 13\n#define FIX_0_298631336  ((INT32)  2446)\t/* FIX(0.298631336) */\n#define FIX_0_390180644  ((INT32)  3196)\t/* FIX(0.390180644) */\n#define FIX_0_541196100  ((INT32)  4433)\t/* FIX(0.541196100) */\n#define FIX_0_765366865  ((INT32)  6270)\t/* FIX(0.765366865) */\n#define FIX_0_899976223  ((INT32)  7373)\t/* FIX(0.899976223) */\n#define FIX_1_175875602  ((INT32)  9633)\t/* FIX(1.175875602) */\n#define FIX_1_501321110  ((INT32)  12299)\t/* FIX(1.501321110) */\n#define FIX_1_847759065  ((INT32)  15137)\t/* FIX(1.847759065) */\n#define FIX_1_961570560  ((INT32)  16069)\t/* FIX(1.961570560) */\n#define FIX_2_053119869  ((INT32)  16819)\t/* FIX(2.053119869) */\n#define FIX_2_562915447  ((INT32)  20995)\t/* FIX(2.562915447) */\n#define FIX_3_072711026  ((INT32)  25172)\t/* FIX(3.072711026) */\n#else\n#define FIX_0_298631336  FIX(0.298631336)\n#define FIX_0_390180644  FIX(0.390180644)\n#define FIX_0_541196100  FIX(0.541196100)\n#define FIX_0_765366865  FIX(0.765366865)\n#define FIX_0_899976223  FIX(0.899976223)\n#define FIX_1_175875602  FIX(1.175875602)\n#define FIX_1_501321110  FIX(1.501321110)\n#define FIX_1_847759065  FIX(1.847759065)\n#define FIX_1_961570560  FIX(1.961570560)\n#define FIX_2_053119869  FIX(2.053119869)\n#define FIX_2_562915447  FIX(2.562915447)\n#define FIX_3_072711026  FIX(3.072711026)\n#endif\n\n\n/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result.\n * For 8-bit samples with the recommended scaling, all the variable\n * and constant values involved are no more than 16 bits wide, so a\n * 16x16->32 bit multiply can be used instead of a full 32x32 multiply.\n * For 12-bit samples, a full 32-bit multiplication will be needed.\n */\n\n#if BITS_IN_JSAMPLE == 8\n#define MULTIPLY(var,const)  MULTIPLY16C16(var,const)\n#else\n#define MULTIPLY(var,const)  ((var) * (const))\n#endif\n\n\n/* Dequantize a coefficient by multiplying it by the multiplier-table\n * entry; produce an int result.  In this module, both inputs and result\n * are 16 bits or less, so either int or short multiply will work.\n */\n\n#define DEQUANTIZE(coef,quantval)  (((ISLOW_MULT_TYPE) (coef)) * (quantval))\n\n\n/*\n * Perform dequantization and inverse DCT on one block of coefficients.\n */\n\nGLOBAL(void)\njpeg_idct_islow (j_decompress_ptr cinfo, jpeg_component_info * compptr,\n\t\t JCOEFPTR coef_block,\n\t\t JSAMPARRAY output_buf, JDIMENSION output_col)\n{\n  INT32 tmp0, tmp1, tmp2, tmp3;\n  INT32 tmp10, tmp11, tmp12, tmp13;\n  INT32 z1, z2, z3, z4, z5;\n  JCOEFPTR inptr;\n  ISLOW_MULT_TYPE * quantptr;\n  int * wsptr;\n  JSAMPROW outptr;\n  JSAMPLE *range_limit = IDCT_range_limit(cinfo);\n  int ctr;\n  int workspace[DCTSIZE2];\t/* buffers data between passes */\n  SHIFT_TEMPS\n\n  /* Pass 1: process columns from input, store into work array. */\n  /* Note results are scaled up by sqrt(8) compared to a true IDCT; */\n  /* furthermore, we scale the results by 2**PASS1_BITS. */\n\n  inptr = coef_block;\n  quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;\n  wsptr = workspace;\n  for (ctr = DCTSIZE; ctr > 0; ctr--) {\n    /* Due to quantization, we will usually find that many of the input\n     * coefficients are zero, especially the AC terms.  We can exploit this\n     * by short-circuiting the IDCT calculation for any column in which all\n     * the AC terms are zero.  In that case each output is equal to the\n     * DC coefficient (with scale factor as needed).\n     * With typical images and quantization tables, half or more of the\n     * column DCT calculations can be simplified this way.\n     */\n    \n    if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 &&\n\tinptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 &&\n\tinptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 &&\n\tinptr[DCTSIZE*7] == 0) {\n      /* AC terms all zero */\n      int dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]) << PASS1_BITS;\n      \n      wsptr[DCTSIZE*0] = dcval;\n      wsptr[DCTSIZE*1] = dcval;\n      wsptr[DCTSIZE*2] = dcval;\n      wsptr[DCTSIZE*3] = dcval;\n      wsptr[DCTSIZE*4] = dcval;\n      wsptr[DCTSIZE*5] = dcval;\n      wsptr[DCTSIZE*6] = dcval;\n      wsptr[DCTSIZE*7] = dcval;\n      \n      inptr++;\t\t\t/* advance pointers to next column */\n      quantptr++;\n      wsptr++;\n      continue;\n    }\n    \n    /* Even part: reverse the even part of the forward DCT. */\n    /* The rotator is sqrt(2)*c(-6). */\n    \n    z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);\n    z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);\n    \n    z1 = MULTIPLY(z2 + z3, FIX_0_541196100);\n    tmp2 = z1 + MULTIPLY(z3, - FIX_1_847759065);\n    tmp3 = z1 + MULTIPLY(z2, FIX_0_765366865);\n    \n    z2 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);\n    z3 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]);\n\n    tmp0 = (z2 + z3) << CONST_BITS;\n    tmp1 = (z2 - z3) << CONST_BITS;\n    \n    tmp10 = tmp0 + tmp3;\n    tmp13 = tmp0 - tmp3;\n    tmp11 = tmp1 + tmp2;\n    tmp12 = tmp1 - tmp2;\n    \n    /* Odd part per figure 8; the matrix is unitary and hence its\n     * transpose is its inverse.  i0..i3 are y7,y5,y3,y1 respectively.\n     */\n    \n    tmp0 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);\n    tmp1 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);\n    tmp2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);\n    tmp3 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);\n    \n    z1 = tmp0 + tmp3;\n    z2 = tmp1 + tmp2;\n    z3 = tmp0 + tmp2;\n    z4 = tmp1 + tmp3;\n    z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */\n    \n    tmp0 = MULTIPLY(tmp0, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */\n    tmp1 = MULTIPLY(tmp1, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */\n    tmp2 = MULTIPLY(tmp2, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */\n    tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */\n    z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */\n    z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */\n    z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */\n    z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */\n    \n    z3 += z5;\n    z4 += z5;\n    \n    tmp0 += z1 + z3;\n    tmp1 += z2 + z4;\n    tmp2 += z2 + z3;\n    tmp3 += z1 + z4;\n    \n    /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */\n    \n    wsptr[DCTSIZE*0] = (int) DESCALE(tmp10 + tmp3, CONST_BITS-PASS1_BITS);\n    wsptr[DCTSIZE*7] = (int) DESCALE(tmp10 - tmp3, CONST_BITS-PASS1_BITS);\n    wsptr[DCTSIZE*1] = (int) DESCALE(tmp11 + tmp2, CONST_BITS-PASS1_BITS);\n    wsptr[DCTSIZE*6] = (int) DESCALE(tmp11 - tmp2, CONST_BITS-PASS1_BITS);\n    wsptr[DCTSIZE*2] = (int) DESCALE(tmp12 + tmp1, CONST_BITS-PASS1_BITS);\n    wsptr[DCTSIZE*5] = (int) DESCALE(tmp12 - tmp1, CONST_BITS-PASS1_BITS);\n    wsptr[DCTSIZE*3] = (int) DESCALE(tmp13 + tmp0, CONST_BITS-PASS1_BITS);\n    wsptr[DCTSIZE*4] = (int) DESCALE(tmp13 - tmp0, CONST_BITS-PASS1_BITS);\n    \n    inptr++;\t\t\t/* advance pointers to next column */\n    quantptr++;\n    wsptr++;\n  }\n  \n  /* Pass 2: process rows from work array, store into output array. */\n  /* Note that we must descale the results by a factor of 8 == 2**3, */\n  /* and also undo the PASS1_BITS scaling. */\n\n  wsptr = workspace;\n  for (ctr = 0; ctr < DCTSIZE; ctr++) {\n    outptr = output_buf[ctr] + output_col;\n    /* Rows of zeroes can be exploited in the same way as we did with columns.\n     * However, the column calculation has created many nonzero AC terms, so\n     * the simplification applies less often (typically 5% to 10% of the time).\n     * On machines with very fast multiplication, it's possible that the\n     * test takes more time than it's worth.  In that case this section\n     * may be commented out.\n     */\n    \n#ifndef NO_ZERO_ROW_TEST\n    if (wsptr[1] == 0 && wsptr[2] == 0 && wsptr[3] == 0 && wsptr[4] == 0 &&\n\twsptr[5] == 0 && wsptr[6] == 0 && wsptr[7] == 0) {\n      /* AC terms all zero */\n      JSAMPLE dcval = range_limit[(int) DESCALE((INT32) wsptr[0], PASS1_BITS+3)\n\t\t\t\t  & RANGE_MASK];\n      \n      outptr[0] = dcval;\n      outptr[1] = dcval;\n      outptr[2] = dcval;\n      outptr[3] = dcval;\n      outptr[4] = dcval;\n      outptr[5] = dcval;\n      outptr[6] = dcval;\n      outptr[7] = dcval;\n\n      wsptr += DCTSIZE;\t\t/* advance pointer to next row */\n      continue;\n    }\n#endif\n    \n    /* Even part: reverse the even part of the forward DCT. */\n    /* The rotator is sqrt(2)*c(-6). */\n    \n    z2 = (INT32) wsptr[2];\n    z3 = (INT32) wsptr[6];\n    \n    z1 = MULTIPLY(z2 + z3, FIX_0_541196100);\n    tmp2 = z1 + MULTIPLY(z3, - FIX_1_847759065);\n    tmp3 = z1 + MULTIPLY(z2, FIX_0_765366865);\n    \n    tmp0 = ((INT32) wsptr[0] + (INT32) wsptr[4]) << CONST_BITS;\n    tmp1 = ((INT32) wsptr[0] - (INT32) wsptr[4]) << CONST_BITS;\n    \n    tmp10 = tmp0 + tmp3;\n    tmp13 = tmp0 - tmp3;\n    tmp11 = tmp1 + tmp2;\n    tmp12 = tmp1 - tmp2;\n    \n    /* Odd part per figure 8; the matrix is unitary and hence its\n     * transpose is its inverse.  i0..i3 are y7,y5,y3,y1 respectively.\n     */\n    \n    tmp0 = (INT32) wsptr[7];\n    tmp1 = (INT32) wsptr[5];\n    tmp2 = (INT32) wsptr[3];\n    tmp3 = (INT32) wsptr[1];\n    \n    z1 = tmp0 + tmp3;\n    z2 = tmp1 + tmp2;\n    z3 = tmp0 + tmp2;\n    z4 = tmp1 + tmp3;\n    z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */\n    \n    tmp0 = MULTIPLY(tmp0, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */\n    tmp1 = MULTIPLY(tmp1, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */\n    tmp2 = MULTIPLY(tmp2, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */\n    tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */\n    z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */\n    z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */\n    z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */\n    z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */\n    \n    z3 += z5;\n    z4 += z5;\n    \n    tmp0 += z1 + z3;\n    tmp1 += z2 + z4;\n    tmp2 += z2 + z3;\n    tmp3 += z1 + z4;\n    \n    /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */\n    \n    outptr[0] = range_limit[(int) DESCALE(tmp10 + tmp3,\n\t\t\t\t\t  CONST_BITS+PASS1_BITS+3)\n\t\t\t    & RANGE_MASK];\n    outptr[7] = range_limit[(int) DESCALE(tmp10 - tmp3,\n\t\t\t\t\t  CONST_BITS+PASS1_BITS+3)\n\t\t\t    & RANGE_MASK];\n    outptr[1] = range_limit[(int) DESCALE(tmp11 + tmp2,\n\t\t\t\t\t  CONST_BITS+PASS1_BITS+3)\n\t\t\t    & RANGE_MASK];\n    outptr[6] = range_limit[(int) DESCALE(tmp11 - tmp2,\n\t\t\t\t\t  CONST_BITS+PASS1_BITS+3)\n\t\t\t    & RANGE_MASK];\n    outptr[2] = range_limit[(int) DESCALE(tmp12 + tmp1,\n\t\t\t\t\t  CONST_BITS+PASS1_BITS+3)\n\t\t\t    & RANGE_MASK];\n    outptr[5] = range_limit[(int) DESCALE(tmp12 - tmp1,\n\t\t\t\t\t  CONST_BITS+PASS1_BITS+3)\n\t\t\t    & RANGE_MASK];\n    outptr[3] = range_limit[(int) DESCALE(tmp13 + tmp0,\n\t\t\t\t\t  CONST_BITS+PASS1_BITS+3)\n\t\t\t    & RANGE_MASK];\n    outptr[4] = range_limit[(int) DESCALE(tmp13 - tmp0,\n\t\t\t\t\t  CONST_BITS+PASS1_BITS+3)\n\t\t\t    & RANGE_MASK];\n    \n    wsptr += DCTSIZE;\t\t/* advance pointer to next row */\n  }\n}\n\n#endif /* DCT_ISLOW_SUPPORTED */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jidctred.c",
    "content": "/*\n * jidctred.c\n *\n * Copyright (C) 1994-1998, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains inverse-DCT routines that produce reduced-size output:\n * either 4x4, 2x2, or 1x1 pixels from an 8x8 DCT block.\n *\n * The implementation is based on the Loeffler, Ligtenberg and Moschytz (LL&M)\n * algorithm used in jidctint.c.  We simply replace each 8-to-8 1-D IDCT step\n * with an 8-to-4 step that produces the four averages of two adjacent outputs\n * (or an 8-to-2 step producing two averages of four outputs, for 2x2 output).\n * These steps were derived by computing the corresponding values at the end\n * of the normal LL&M code, then simplifying as much as possible.\n *\n * 1x1 is trivial: just take the DC coefficient divided by 8.\n *\n * See jidctint.c for additional comments.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n#include \"jdct.h\"\t\t/* Private declarations for DCT subsystem */\n\n#ifdef IDCT_SCALING_SUPPORTED\n\n\n/*\n * This module is specialized to the case DCTSIZE = 8.\n */\n\n#if DCTSIZE != 8\n  Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */\n#endif\n\n\n/* Scaling is the same as in jidctint.c. */\n\n#if BITS_IN_JSAMPLE == 8\n#define CONST_BITS  13\n#define PASS1_BITS  2\n#else\n#define CONST_BITS  13\n#define PASS1_BITS  1\t\t/* lose a little precision to avoid overflow */\n#endif\n\n/* Some C compilers fail to reduce \"FIX(constant)\" at compile time, thus\n * causing a lot of useless floating-point operations at run time.\n * To get around this we use the following pre-calculated constants.\n * If you change CONST_BITS you may want to add appropriate values.\n * (With a reasonable C compiler, you can just rely on the FIX() macro...)\n */\n\n#if CONST_BITS == 13\n#define FIX_0_211164243  ((INT32)  1730)\t/* FIX(0.211164243) */\n#define FIX_0_509795579  ((INT32)  4176)\t/* FIX(0.509795579) */\n#define FIX_0_601344887  ((INT32)  4926)\t/* FIX(0.601344887) */\n#define FIX_0_720959822  ((INT32)  5906)\t/* FIX(0.720959822) */\n#define FIX_0_765366865  ((INT32)  6270)\t/* FIX(0.765366865) */\n#define FIX_0_850430095  ((INT32)  6967)\t/* FIX(0.850430095) */\n#define FIX_0_899976223  ((INT32)  7373)\t/* FIX(0.899976223) */\n#define FIX_1_061594337  ((INT32)  8697)\t/* FIX(1.061594337) */\n#define FIX_1_272758580  ((INT32)  10426)\t/* FIX(1.272758580) */\n#define FIX_1_451774981  ((INT32)  11893)\t/* FIX(1.451774981) */\n#define FIX_1_847759065  ((INT32)  15137)\t/* FIX(1.847759065) */\n#define FIX_2_172734803  ((INT32)  17799)\t/* FIX(2.172734803) */\n#define FIX_2_562915447  ((INT32)  20995)\t/* FIX(2.562915447) */\n#define FIX_3_624509785  ((INT32)  29692)\t/* FIX(3.624509785) */\n#else\n#define FIX_0_211164243  FIX(0.211164243)\n#define FIX_0_509795579  FIX(0.509795579)\n#define FIX_0_601344887  FIX(0.601344887)\n#define FIX_0_720959822  FIX(0.720959822)\n#define FIX_0_765366865  FIX(0.765366865)\n#define FIX_0_850430095  FIX(0.850430095)\n#define FIX_0_899976223  FIX(0.899976223)\n#define FIX_1_061594337  FIX(1.061594337)\n#define FIX_1_272758580  FIX(1.272758580)\n#define FIX_1_451774981  FIX(1.451774981)\n#define FIX_1_847759065  FIX(1.847759065)\n#define FIX_2_172734803  FIX(2.172734803)\n#define FIX_2_562915447  FIX(2.562915447)\n#define FIX_3_624509785  FIX(3.624509785)\n#endif\n\n\n/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result.\n * For 8-bit samples with the recommended scaling, all the variable\n * and constant values involved are no more than 16 bits wide, so a\n * 16x16->32 bit multiply can be used instead of a full 32x32 multiply.\n * For 12-bit samples, a full 32-bit multiplication will be needed.\n */\n\n#if BITS_IN_JSAMPLE == 8\n#define MULTIPLY(var,const)  MULTIPLY16C16(var,const)\n#else\n#define MULTIPLY(var,const)  ((var) * (const))\n#endif\n\n\n/* Dequantize a coefficient by multiplying it by the multiplier-table\n * entry; produce an int result.  In this module, both inputs and result\n * are 16 bits or less, so either int or short multiply will work.\n */\n\n#define DEQUANTIZE(coef,quantval)  (((ISLOW_MULT_TYPE) (coef)) * (quantval))\n\n\n/*\n * Perform dequantization and inverse DCT on one block of coefficients,\n * producing a reduced-size 4x4 output block.\n */\n\nGLOBAL(void)\njpeg_idct_4x4 (j_decompress_ptr cinfo, jpeg_component_info * compptr,\n\t       JCOEFPTR coef_block,\n\t       JSAMPARRAY output_buf, JDIMENSION output_col)\n{\n  INT32 tmp0, tmp2, tmp10, tmp12;\n  INT32 z1, z2, z3, z4;\n  JCOEFPTR inptr;\n  ISLOW_MULT_TYPE * quantptr;\n  int * wsptr;\n  JSAMPROW outptr;\n  JSAMPLE *range_limit = IDCT_range_limit(cinfo);\n  int ctr;\n  int workspace[DCTSIZE*4];\t/* buffers data between passes */\n  SHIFT_TEMPS\n\n  /* Pass 1: process columns from input, store into work array. */\n\n  inptr = coef_block;\n  quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;\n  wsptr = workspace;\n  for (ctr = DCTSIZE; ctr > 0; inptr++, quantptr++, wsptr++, ctr--) {\n    /* Don't bother to process column 4, because second pass won't use it */\n    if (ctr == DCTSIZE-4)\n      continue;\n    if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 &&\n\tinptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*5] == 0 &&\n\tinptr[DCTSIZE*6] == 0 && inptr[DCTSIZE*7] == 0) {\n      /* AC terms all zero; we need not examine term 4 for 4x4 output */\n      int dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]) << PASS1_BITS;\n      \n      wsptr[DCTSIZE*0] = dcval;\n      wsptr[DCTSIZE*1] = dcval;\n      wsptr[DCTSIZE*2] = dcval;\n      wsptr[DCTSIZE*3] = dcval;\n      \n      continue;\n    }\n    \n    /* Even part */\n    \n    tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);\n    tmp0 <<= (CONST_BITS+1);\n    \n    z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]);\n    z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]);\n\n    tmp2 = MULTIPLY(z2, FIX_1_847759065) + MULTIPLY(z3, - FIX_0_765366865);\n    \n    tmp10 = tmp0 + tmp2;\n    tmp12 = tmp0 - tmp2;\n    \n    /* Odd part */\n    \n    z1 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);\n    z2 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);\n    z3 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);\n    z4 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);\n    \n    tmp0 = MULTIPLY(z1, - FIX_0_211164243) /* sqrt(2) * (c3-c1) */\n\t + MULTIPLY(z2, FIX_1_451774981) /* sqrt(2) * (c3+c7) */\n\t + MULTIPLY(z3, - FIX_2_172734803) /* sqrt(2) * (-c1-c5) */\n\t + MULTIPLY(z4, FIX_1_061594337); /* sqrt(2) * (c5+c7) */\n    \n    tmp2 = MULTIPLY(z1, - FIX_0_509795579) /* sqrt(2) * (c7-c5) */\n\t + MULTIPLY(z2, - FIX_0_601344887) /* sqrt(2) * (c5-c1) */\n\t + MULTIPLY(z3, FIX_0_899976223) /* sqrt(2) * (c3-c7) */\n\t + MULTIPLY(z4, FIX_2_562915447); /* sqrt(2) * (c1+c3) */\n\n    /* Final output stage */\n    \n    wsptr[DCTSIZE*0] = (int) DESCALE(tmp10 + tmp2, CONST_BITS-PASS1_BITS+1);\n    wsptr[DCTSIZE*3] = (int) DESCALE(tmp10 - tmp2, CONST_BITS-PASS1_BITS+1);\n    wsptr[DCTSIZE*1] = (int) DESCALE(tmp12 + tmp0, CONST_BITS-PASS1_BITS+1);\n    wsptr[DCTSIZE*2] = (int) DESCALE(tmp12 - tmp0, CONST_BITS-PASS1_BITS+1);\n  }\n  \n  /* Pass 2: process 4 rows from work array, store into output array. */\n\n  wsptr = workspace;\n  for (ctr = 0; ctr < 4; ctr++) {\n    outptr = output_buf[ctr] + output_col;\n    /* It's not clear whether a zero row test is worthwhile here ... */\n\n#ifndef NO_ZERO_ROW_TEST\n    if (wsptr[1] == 0 && wsptr[2] == 0 && wsptr[3] == 0 &&\n\twsptr[5] == 0 && wsptr[6] == 0 && wsptr[7] == 0) {\n      /* AC terms all zero */\n      JSAMPLE dcval = range_limit[(int) DESCALE((INT32) wsptr[0], PASS1_BITS+3)\n\t\t\t\t  & RANGE_MASK];\n      \n      outptr[0] = dcval;\n      outptr[1] = dcval;\n      outptr[2] = dcval;\n      outptr[3] = dcval;\n      \n      wsptr += DCTSIZE;\t\t/* advance pointer to next row */\n      continue;\n    }\n#endif\n    \n    /* Even part */\n    \n    tmp0 = ((INT32) wsptr[0]) << (CONST_BITS+1);\n    \n    tmp2 = MULTIPLY((INT32) wsptr[2], FIX_1_847759065)\n\t + MULTIPLY((INT32) wsptr[6], - FIX_0_765366865);\n    \n    tmp10 = tmp0 + tmp2;\n    tmp12 = tmp0 - tmp2;\n    \n    /* Odd part */\n    \n    z1 = (INT32) wsptr[7];\n    z2 = (INT32) wsptr[5];\n    z3 = (INT32) wsptr[3];\n    z4 = (INT32) wsptr[1];\n    \n    tmp0 = MULTIPLY(z1, - FIX_0_211164243) /* sqrt(2) * (c3-c1) */\n\t + MULTIPLY(z2, FIX_1_451774981) /* sqrt(2) * (c3+c7) */\n\t + MULTIPLY(z3, - FIX_2_172734803) /* sqrt(2) * (-c1-c5) */\n\t + MULTIPLY(z4, FIX_1_061594337); /* sqrt(2) * (c5+c7) */\n    \n    tmp2 = MULTIPLY(z1, - FIX_0_509795579) /* sqrt(2) * (c7-c5) */\n\t + MULTIPLY(z2, - FIX_0_601344887) /* sqrt(2) * (c5-c1) */\n\t + MULTIPLY(z3, FIX_0_899976223) /* sqrt(2) * (c3-c7) */\n\t + MULTIPLY(z4, FIX_2_562915447); /* sqrt(2) * (c1+c3) */\n\n    /* Final output stage */\n    \n    outptr[0] = range_limit[(int) DESCALE(tmp10 + tmp2,\n\t\t\t\t\t  CONST_BITS+PASS1_BITS+3+1)\n\t\t\t    & RANGE_MASK];\n    outptr[3] = range_limit[(int) DESCALE(tmp10 - tmp2,\n\t\t\t\t\t  CONST_BITS+PASS1_BITS+3+1)\n\t\t\t    & RANGE_MASK];\n    outptr[1] = range_limit[(int) DESCALE(tmp12 + tmp0,\n\t\t\t\t\t  CONST_BITS+PASS1_BITS+3+1)\n\t\t\t    & RANGE_MASK];\n    outptr[2] = range_limit[(int) DESCALE(tmp12 - tmp0,\n\t\t\t\t\t  CONST_BITS+PASS1_BITS+3+1)\n\t\t\t    & RANGE_MASK];\n    \n    wsptr += DCTSIZE;\t\t/* advance pointer to next row */\n  }\n}\n\n\n/*\n * Perform dequantization and inverse DCT on one block of coefficients,\n * producing a reduced-size 2x2 output block.\n */\n\nGLOBAL(void)\njpeg_idct_2x2 (j_decompress_ptr cinfo, jpeg_component_info * compptr,\n\t       JCOEFPTR coef_block,\n\t       JSAMPARRAY output_buf, JDIMENSION output_col)\n{\n  INT32 tmp0, tmp10, z1;\n  JCOEFPTR inptr;\n  ISLOW_MULT_TYPE * quantptr;\n  int * wsptr;\n  JSAMPROW outptr;\n  JSAMPLE *range_limit = IDCT_range_limit(cinfo);\n  int ctr;\n  int workspace[DCTSIZE*2];\t/* buffers data between passes */\n  SHIFT_TEMPS\n\n  /* Pass 1: process columns from input, store into work array. */\n\n  inptr = coef_block;\n  quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;\n  wsptr = workspace;\n  for (ctr = DCTSIZE; ctr > 0; inptr++, quantptr++, wsptr++, ctr--) {\n    /* Don't bother to process columns 2,4,6 */\n    if (ctr == DCTSIZE-2 || ctr == DCTSIZE-4 || ctr == DCTSIZE-6)\n      continue;\n    if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*3] == 0 &&\n\tinptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*7] == 0) {\n      /* AC terms all zero; we need not examine terms 2,4,6 for 2x2 output */\n      int dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]) << PASS1_BITS;\n      \n      wsptr[DCTSIZE*0] = dcval;\n      wsptr[DCTSIZE*1] = dcval;\n      \n      continue;\n    }\n    \n    /* Even part */\n    \n    z1 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]);\n    tmp10 = z1 << (CONST_BITS+2);\n    \n    /* Odd part */\n\n    z1 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]);\n    tmp0 = MULTIPLY(z1, - FIX_0_720959822); /* sqrt(2) * (c7-c5+c3-c1) */\n    z1 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]);\n    tmp0 += MULTIPLY(z1, FIX_0_850430095); /* sqrt(2) * (-c1+c3+c5+c7) */\n    z1 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]);\n    tmp0 += MULTIPLY(z1, - FIX_1_272758580); /* sqrt(2) * (-c1+c3-c5-c7) */\n    z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]);\n    tmp0 += MULTIPLY(z1, FIX_3_624509785); /* sqrt(2) * (c1+c3+c5+c7) */\n\n    /* Final output stage */\n    \n    wsptr[DCTSIZE*0] = (int) DESCALE(tmp10 + tmp0, CONST_BITS-PASS1_BITS+2);\n    wsptr[DCTSIZE*1] = (int) DESCALE(tmp10 - tmp0, CONST_BITS-PASS1_BITS+2);\n  }\n  \n  /* Pass 2: process 2 rows from work array, store into output array. */\n\n  wsptr = workspace;\n  for (ctr = 0; ctr < 2; ctr++) {\n    outptr = output_buf[ctr] + output_col;\n    /* It's not clear whether a zero row test is worthwhile here ... */\n\n#ifndef NO_ZERO_ROW_TEST\n    if (wsptr[1] == 0 && wsptr[3] == 0 && wsptr[5] == 0 && wsptr[7] == 0) {\n      /* AC terms all zero */\n      JSAMPLE dcval = range_limit[(int) DESCALE((INT32) wsptr[0], PASS1_BITS+3)\n\t\t\t\t  & RANGE_MASK];\n      \n      outptr[0] = dcval;\n      outptr[1] = dcval;\n      \n      wsptr += DCTSIZE;\t\t/* advance pointer to next row */\n      continue;\n    }\n#endif\n    \n    /* Even part */\n    \n    tmp10 = ((INT32) wsptr[0]) << (CONST_BITS+2);\n    \n    /* Odd part */\n\n    tmp0 = MULTIPLY((INT32) wsptr[7], - FIX_0_720959822) /* sqrt(2) * (c7-c5+c3-c1) */\n\t + MULTIPLY((INT32) wsptr[5], FIX_0_850430095) /* sqrt(2) * (-c1+c3+c5+c7) */\n\t + MULTIPLY((INT32) wsptr[3], - FIX_1_272758580) /* sqrt(2) * (-c1+c3-c5-c7) */\n\t + MULTIPLY((INT32) wsptr[1], FIX_3_624509785); /* sqrt(2) * (c1+c3+c5+c7) */\n\n    /* Final output stage */\n    \n    outptr[0] = range_limit[(int) DESCALE(tmp10 + tmp0,\n\t\t\t\t\t  CONST_BITS+PASS1_BITS+3+2)\n\t\t\t    & RANGE_MASK];\n    outptr[1] = range_limit[(int) DESCALE(tmp10 - tmp0,\n\t\t\t\t\t  CONST_BITS+PASS1_BITS+3+2)\n\t\t\t    & RANGE_MASK];\n    \n    wsptr += DCTSIZE;\t\t/* advance pointer to next row */\n  }\n}\n\n\n/*\n * Perform dequantization and inverse DCT on one block of coefficients,\n * producing a reduced-size 1x1 output block.\n */\n\nGLOBAL(void)\njpeg_idct_1x1 (j_decompress_ptr cinfo, jpeg_component_info * compptr,\n\t       JCOEFPTR coef_block,\n\t       JSAMPARRAY output_buf, JDIMENSION output_col)\n{\n  int dcval;\n  ISLOW_MULT_TYPE * quantptr;\n  JSAMPLE *range_limit = IDCT_range_limit(cinfo);\n  SHIFT_TEMPS\n\n  /* We hardly need an inverse DCT routine for this: just take the\n   * average pixel value, which is one-eighth of the DC coefficient.\n   */\n  quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table;\n  dcval = DEQUANTIZE(coef_block[0], quantptr[0]);\n  dcval = (int) DESCALE((INT32) dcval, 3);\n\n  output_buf[0][output_col] = range_limit[dcval & RANGE_MASK];\n}\n\n#endif /* IDCT_SCALING_SUPPORTED */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jinclude.h",
    "content": "/*\n * jinclude.h\n *\n * Copyright (C) 1991-1994, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file exists to provide a single place to fix any problems with\n * including the wrong system include files.  (Common problems are taken\n * care of by the standard jconfig symbols, but on really weird systems\n * you may have to edit this file.)\n *\n * NOTE: this file is NOT intended to be included by applications using the\n * JPEG library.  Most applications need only include jpeglib.h.\n */\n\n\n/* Include auto-config file to find out which system include files we need. */\n\n#include \"jconfig.h\"\t\t/* auto configuration options */\n#define JCONFIG_INCLUDED\t/* so that jpeglib.h doesn't do it again */\n\n/*\n * We need the NULL macro and size_t typedef.\n * On an ANSI-conforming system it is sufficient to include <stddef.h>.\n * Otherwise, we get them from <stdlib.h> or <stdio.h>; we may have to\n * pull in <sys/types.h> as well.\n * Note that the core JPEG library does not require <stdio.h>;\n * only the default error handler and data source/destination modules do.\n * But we must pull it in because of the references to FILE in jpeglib.h.\n * You can remove those references if you want to compile without <stdio.h>.\n */\n\n#ifdef HAVE_STDDEF_H\n#include <stddef.h>\n#endif\n\n#ifdef HAVE_STDLIB_H\n#include <stdlib.h>\n#endif\n\n#ifdef NEED_SYS_TYPES_H\n#include <sys/types.h>\n#endif\n\n#include <stdio.h>\n\n/*\n * We need memory copying and zeroing functions, plus strncpy().\n * ANSI and System V implementations declare these in <string.h>.\n * BSD doesn't have the mem() functions, but it does have bcopy()/bzero().\n * Some systems may declare memset and memcpy in <memory.h>.\n *\n * NOTE: we assume the size parameters to these functions are of type size_t.\n * Change the casts in these macros if not!\n */\n\n#ifdef NEED_BSD_STRINGS\n\n#include <strings.h>\n#define MEMZERO(target,size)\tbzero((void *)(target), (size_t)(size))\n#define MEMCOPY(dest,src,size)\tbcopy((const void *)(src), (void *)(dest), (size_t)(size))\n\n#else /* not BSD, assume ANSI/SysV string lib */\n\n#include <string.h>\n#define MEMZERO(target,size)\tmemset((void *)(target), 0, (size_t)(size))\n#define MEMCOPY(dest,src,size)\tmemcpy((void *)(dest), (const void *)(src), (size_t)(size))\n\n#endif\n\n/*\n * In ANSI C, and indeed any rational implementation, size_t is also the\n * type returned by sizeof().  However, it seems there are some irrational\n * implementations out there, in which sizeof() returns an int even though\n * size_t is defined as long or unsigned long.  To ensure consistent results\n * we always use this SIZEOF() macro in place of using sizeof() directly.\n */\n\n#define SIZEOF(object)\t((size_t) sizeof(object))\n\n/*\n * The modules that use fread() and fwrite() always invoke them through\n * these macros.  On some systems you may need to twiddle the argument casts.\n * CAUTION: argument order is different from underlying functions!\n */\n\n#define JFREAD(file,buf,sizeofbuf)  \\\n  ((size_t) fread((void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file)))\n#define JFWRITE(file,buf,sizeofbuf)  \\\n  ((size_t) fwrite((const void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file)))\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jmemdatadst.c",
    "content": "/* Modified to work on memory rather than files. Based on:\n *\n * jdatadst.c\n *\n * Copyright (C) 1994-1996, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains compression data destination routines for the case of\n * emitting JPEG data to a file (or any stdio stream).  While these routines\n * are sufficient for most applications, some will want to use a different\n * destination manager.\n * IMPORTANT: we assume that fwrite() will correctly transcribe an array of\n * JOCTETs into 8-bit-wide elements on external storage.  If char is wider\n * than 8 bits on your machine, you may need to do some tweaking.\n */\n\n/* this is not a core library module, so it doesn't define JPEG_INTERNALS */\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n#include \"jerror.h\"\n\n/* Expanded data destination object for stdio output */\ntypedef struct {\n  struct jpeg_destination_mgr pub; /* public fields */\n   char * actualPos;        /* points to first byte not yet filled */\n\t  unsigned spaceLeft;      /* bytes still not filled in destination */\n   unsigned *pSpaceUsed; /* to answer actual compressed size */\n\t  JOCTET * buffer;\t\t/* start of buffer */\n} my_destination_mgr;\n\ntypedef my_destination_mgr * my_dest_ptr;\n\n#define OUTPUT_BUF_SIZE  4096\t/* choose an efficiently fwrite'able size */\n\n/*\n * Initialize destination --- called by jpeg_start_compress\n * before any data is actually written.\n */\nMETHODDEF(void) init_destination (j_compress_ptr cinfo) {\n  my_dest_ptr dest = (my_dest_ptr) cinfo->dest;\n\n  /* Allocate the output buffer --- it will be released when done with image */\n  dest->buffer = (JOCTET *)\n      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n          OUTPUT_BUF_SIZE * SIZEOF(JOCTET));\n\n  dest->pub.next_output_byte = dest->buffer;\n  dest->pub.free_in_buffer = OUTPUT_BUF_SIZE;\n}\n\n/*\n * Empty the output buffer --- called whenever buffer fills up.\n *\n * In typical applications, this should write the entire output buffer\n * (ignoring the current state of next_output_byte & free_in_buffer),\n * reset the pointer & count to the start of the buffer, and return TRUE\n * indicating that the buffer has been dumped.\n *\n * In applications that need to be able to suspend compression due to output\n * overrun, a FALSE return indicates that the buffer cannot be emptied now.\n * In this situation, the compressor will return to its caller (possibly with\n * an indication that it has not accepted all the supplied scanlines).  The\n * application should resume compression after it has made more room in the\n * output buffer.  Note that there are substantial restrictions on the use of\n * suspension --- see the documentation.\n *\n * When suspending, the compressor will back up to a convenient restart point\n * (typically the start of the current MCU). next_output_byte & free_in_buffer\n * indicate where the restart point will be if the current call returns FALSE.\n * Data beyond this point will be regenerated after resumption, so do not\n * write it out when emptying the buffer externally.\n */\nMETHODDEF(boolean) empty_output_buffer (j_compress_ptr cinfo) {\n  my_dest_ptr dest = (my_dest_ptr) cinfo->dest;\n  size_t nbytes;\n\n  nbytes = (OUTPUT_BUF_SIZE < dest->spaceLeft) ? OUTPUT_BUF_SIZE : dest->spaceLeft;\n  memcpy(dest->actualPos, dest->buffer, nbytes);\n  dest->actualPos = (dest->actualPos) + nbytes;\n  dest->spaceLeft = (dest->spaceLeft) - nbytes;\n  *(dest->pSpaceUsed) = *(dest->pSpaceUsed) + nbytes;\n  if (nbytes != (size_t) OUTPUT_BUF_SIZE)\n    ERREXIT(cinfo, JERR_FILE_WRITE);\n\n  dest->pub.next_output_byte = dest->buffer;\n  dest->pub.free_in_buffer = OUTPUT_BUF_SIZE;\n\n  return TRUE;\n}\n\n/*\n * Terminate destination --- called by jpeg_finish_compress\n * after all data has been written.  Usually needs to flush buffer.\n *\n * NB: *not* called by jpeg_abort or jpeg_destroy; surrounding\n * application must deal with any cleanup that should happen even\n * for error exit.\n */\nMETHODDEF(void) term_destination (j_compress_ptr cinfo) {\n  my_dest_ptr dest = (my_dest_ptr) cinfo->dest;\n  size_t datacount = OUTPUT_BUF_SIZE - dest->pub.free_in_buffer;\n  size_t nbytes;\n\n  /* Write any data remaining in the buffer */\n  if (datacount > 0) {\n    nbytes = (datacount < dest->spaceLeft) ? datacount : dest->spaceLeft;\n    memcpy(dest->actualPos, dest->buffer, nbytes);\n    dest->actualPos = dest->actualPos + nbytes;\n    dest->spaceLeft = dest->spaceLeft - nbytes;\n    *(dest->pSpaceUsed) = *(dest->pSpaceUsed) + nbytes;\n    if (nbytes != datacount)\n      ERREXIT(cinfo, JERR_FILE_WRITE);\n  }\n}\n\n/*\n * Prepare for output to a stdio stream.\n * The caller must have already opened the stream, and is responsible\n * for closing it after finishing compression.\n */\nGLOBAL(void) jpeg_mem_dest (j_compress_ptr cinfo, char * pDestination, unsigned *pDestinationSize) {\n  my_dest_ptr dest;\n\n  /* The destination object is made permanent so that multiple JPEG images\n   * can be written to the same file without re-executing jpeg_stdio_dest.\n   * This makes it dangerous to use this manager and a different destination\n   * manager serially with the same JPEG object, because their private object\n   * sizes may be different.  Caveat programmer.\n   */\n  if (cinfo->dest == NULL) { /* first time for this JPEG object? */\n    cinfo->dest = (struct jpeg_destination_mgr *)\n      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,\n        SIZEOF(my_destination_mgr));\n  }\n\n  dest = (my_dest_ptr) cinfo->dest;\n  dest->pub.init_destination = init_destination;\n  dest->pub.empty_output_buffer = empty_output_buffer;\n  dest->pub.term_destination = term_destination;\n  dest->actualPos = pDestination;\n  dest->spaceLeft = *pDestinationSize;\n  dest->pSpaceUsed = pDestinationSize;\n  *(dest->pSpaceUsed) = 0;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jmemdatasrc.c",
    "content": "/* Modified to work on memory rather than files. Based on:\n *\n * jdatasrc.c\n *\n * Copyright (C) 1994-1996, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains decompression data source routines for the case of\n * reading JPEG data from a file (or any stdio stream).  While these routines\n * are sufficient for most applications, some will want to use a different\n * source manager.\n * IMPORTANT: we assume that fread() will correctly transcribe an array of\n * JOCTETs from 8-bit-wide elements on external storage.  If char is wider\n * than 8 bits on your machine, you may need to do some tweaking.\n */\n\n/* this is not a core library module, so it doesn't define JPEG_INTERNALS */\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n#include \"jerror.h\"\n\n/* Expanded data source object for stdio input */\ntypedef struct {\n  struct jpeg_source_mgr pub;\t/* public fields */\n\t  char * pSourceData;\t/* source data start */\n         char * actualPos;        /* points to first byte not yet delivered */\n\t  unsigned bytesLeft;      /* bytes still not read in data source */\n\t  JOCTET * buffer;\t\t/* start of buffer */\n} my_source_mgr;\n\ntypedef my_source_mgr * my_src_ptr;\n\n#define INPUT_BUF_SIZE  4096\t/* choose an efficiently fread'able size */\n\n/*\n * Initialize source --- called by jpeg_read_header\n * before any data is actually read.\n */\nMETHODDEF(void) init_source (j_decompress_ptr cinfo) {\n  my_src_ptr src = (my_src_ptr) cinfo->src;\n\n  /* We don't clear the input buffer.\n   * This is correct behavior for reading a series of images from one source.\n   */\n}\n\n/*\n * Fill the input buffer --- called whenever buffer is emptied.\n *\n * In typical applications, this should read fresh data into the buffer\n * (ignoring the current state of next_input_byte & bytes_in_buffer),\n * reset the pointer & count to the start of the buffer, and return TRUE\n * indicating that the buffer has been reloaded.  It is not necessary to\n * fill the buffer entirely, only to obtain at least one more byte.\n *\n * There is no such thing as an EOF return.  If the end of the file has been\n * reached, the routine has a choice of ERREXIT() or inserting fake data into\n * the buffer.  In most cases, generating a warning message and inserting a\n * fake EOI marker is the best course of action --- this will allow the\n * decompressor to output however much of the image is there.  However,\n * the resulting error message is misleading if the real problem is an empty\n * input file, so we handle that case specially.\n *\n * In applications that need to be able to suspend compression due to input\n * not being available yet, a FALSE return indicates that no more data can be\n * obtained right now, but more may be forthcoming later.  In this situation,\n * the decompressor will return to its caller (with an indication of the\n * number of scanlines it has read, if any).  The application should resume\n * decompression after it has loaded more data into the input buffer.  Note\n * that there are substantial restrictions on the use of suspension --- see\n * the documentation.\n *\n * When suspending, the decompressor will back up to a convenient restart point\n * (typically the start of the current MCU). next_input_byte & bytes_in_buffer\n * indicate where the restart point will be if the current call returns FALSE.\n * Data beyond this point must be rescanned after resumption, so move it to\n * the front of the buffer rather than discarding it.\n */\nMETHODDEF(boolean) fill_input_buffer (j_decompress_ptr cinfo) {\n  my_src_ptr src = (my_src_ptr) cinfo->src;\n  size_t nbytes;\n\n  nbytes = (INPUT_BUF_SIZE < src->bytesLeft) ? INPUT_BUF_SIZE : src->bytesLeft;\n  memcpy(src->buffer, src->actualPos, nbytes);\n  src->actualPos = src->actualPos + nbytes;\n  src->bytesLeft = src->bytesLeft - nbytes;\n\n  if (nbytes <= 0) {\n    WARNMS(cinfo, JWRN_JPEG_EOF);\n    /* Insert a fake EOI marker */\n    src->buffer[0] = (JOCTET) 0xFF;\n    src->buffer[1] = (JOCTET) JPEG_EOI;\n    nbytes = 2;\n  }\n\n  src->pub.next_input_byte = src->buffer;\n  src->pub.bytes_in_buffer = nbytes;\n\n  return TRUE;\n}\n\n/*\n * Skip data --- used to skip over a potentially large amount of\n * uninteresting data (such as an APPn marker).\n *\n * Writers of suspendable-input applications must note that skip_input_data\n * is not granted the right to give a suspension return.  If the skip extends\n * beyond the data currently in the buffer, the buffer can be marked empty so\n * that the next read will cause a fill_input_buffer call that can suspend.\n * Arranging for additional bytes to be discarded before reloading the input\n * buffer is the application writer's problem.\n */\nMETHODDEF(void) skip_input_data (j_decompress_ptr cinfo, long num_bytes) {\n  my_src_ptr src = (my_src_ptr) cinfo->src;\n\n  /* Just a dumb implementation for now.  Could use fseek() except\n   * it doesn't work on pipes.  Not clear that being smart is worth\n   * any trouble anyway --- large skips are infrequent.\n   */\n  if (num_bytes > 0) {\n    while (num_bytes > (long) src->pub.bytes_in_buffer) {\n      num_bytes -= (long) src->pub.bytes_in_buffer;\n      (void) fill_input_buffer(cinfo);\n      /* note we assume that fill_input_buffer will never return FALSE,\n       * so suspension need not be handled.\n       */\n    }\n    src->pub.next_input_byte += (size_t) num_bytes;\n    src->pub.bytes_in_buffer -= (size_t) num_bytes;\n  }\n}\n\n/*\n * An additional method that can be provided by data source modules is the\n * resync_to_restart method for error recovery in the presence of RST markers.\n * For the moment, this source module just uses the default resync method\n * provided by the JPEG library.  That method assumes that no backtracking\n * is possible.\n */\n/*\n * Terminate source --- called by jpeg_finish_decompress\n * after all data has been read.  Often a no-op.\n *\n * NB: *not* called by jpeg_abort or jpeg_destroy; surrounding\n * application must deal with any cleanup that should happen even\n * for error exit.\n */\nMETHODDEF(void) term_source (j_decompress_ptr cinfo) {\n  /* no work necessary here */\n}\n\n/*\n * Prepare for input from a stdio stream.\n * The caller must have already opened the stream, and is responsible\n * for closing it after finishing decompression.\n */\nGLOBAL(void) jpeg_mem_src (j_decompress_ptr cinfo, char * pSourceData, unsigned sourceDataSize) {\n  my_src_ptr src;\n\n  /* The source object and input buffer are made permanent so that a series\n   * of JPEG images can be read from the same file by calling jpeg_stdio_src\n   * only before the first one.  (If we discarded the buffer at the end of\n   * one image, we'd likely lose the start of the next one.)\n   * This makes it unsafe to use this manager and a different source\n   * manager serially with the same JPEG object.  Caveat programmer.\n   */\n  if (cinfo->src == NULL) {\t/* first time for this JPEG object? */\n    cinfo->src = (struct jpeg_source_mgr *)\n      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,\n\t\t\t\t  SIZEOF(my_source_mgr));\n    src = (my_src_ptr) cinfo->src;\n    src->buffer = (JOCTET *)\n      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,\n\t\t\t\t  INPUT_BUF_SIZE * SIZEOF(JOCTET));\n  }\n\n  src = (my_src_ptr) cinfo->src;\n  src->pub.init_source = init_source;\n  src->pub.fill_input_buffer = fill_input_buffer;\n  src->pub.skip_input_data = skip_input_data;\n  src->pub.resync_to_restart = jpeg_resync_to_restart; /* use default method */\n  src->pub.term_source = term_source;\n  src->pSourceData = pSourceData;\n  src->actualPos = pSourceData;\n  src->bytesLeft = sourceDataSize;\n  src->pub.bytes_in_buffer = 0; /* forces fill_input_buffer on first read */\n  src->pub.next_input_byte = NULL; /* until buffer loaded */\n}\n/* This function allows data to be moved if necessary */\nGLOBAL(int) jpeg_mem_src_newLocationOfData (j_decompress_ptr cinfo, char * pSourceData, unsigned sourceDataSize) {\n  my_src_ptr src;\n  unsigned offset;\n\n  src = (my_src_ptr) cinfo->src;\n  offset = (src->actualPos) - (src->pSourceData);\n  src->pSourceData = pSourceData;\n  src->actualPos = pSourceData + offset;\n\n  return((src->actualPos + src->bytesLeft) == (pSourceData + sourceDataSize));\n}"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jmemmgr.c",
    "content": "/*\n * jmemmgr.c\n *\n * Copyright (C) 1991-1997, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains the JPEG system-independent memory management\n * routines.  This code is usable across a wide variety of machines; most\n * of the system dependencies have been isolated in a separate file.\n * The major functions provided here are:\n *   * pool-based allocation and freeing of memory;\n *   * policy decisions about how to divide available memory among the\n *     virtual arrays;\n *   * control logic for swapping virtual arrays between main memory and\n *     backing storage.\n * The separate system-dependent file provides the actual backing-storage\n * access code, and it contains the policy decision about how much total\n * main memory to use.\n * This file is system-dependent in the sense that some of its functions\n * are unnecessary in some systems.  For example, if there is enough virtual\n * memory so that backing storage will never be used, much of the virtual\n * array control logic could be removed.  (Of course, if you have that much\n * memory then you shouldn't care about a little bit of unused code...)\n */\n\n#define JPEG_INTERNALS\n#define AM_MEMORY_MANAGER\t/* we define jvirt_Xarray_control structs */\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n#include \"jmemsys.h\"\t\t/* import the system-dependent declarations */\n\n#ifndef NO_GETENV\n#ifndef HAVE_STDLIB_H\t\t/* <stdlib.h> should declare getenv() */\nextern char * getenv JPP((const char * name));\n#endif\n#endif\n\n\n/*\n * Some important notes:\n *   The allocation routines provided here must never return NULL.\n *   They should exit to error_exit if unsuccessful.\n *\n *   It's not a good idea to try to merge the sarray and barray routines,\n *   even though they are textually almost the same, because samples are\n *   usually stored as bytes while coefficients are shorts or ints.  Thus,\n *   in machines where byte pointers have a different representation from\n *   word pointers, the resulting machine code could not be the same.\n */\n\n\n/*\n * Many machines require storage alignment: longs must start on 4-byte\n * boundaries, doubles on 8-byte boundaries, etc.  On such machines, malloc()\n * always returns pointers that are multiples of the worst-case alignment\n * requirement, and we had better do so too.\n * There isn't any really portable way to determine the worst-case alignment\n * requirement.  This module assumes that the alignment requirement is\n * multiples of sizeof(ALIGN_TYPE).\n * By default, we define ALIGN_TYPE as double.  This is necessary on some\n * workstations (where doubles really do need 8-byte alignment) and will work\n * fine on nearly everything.  If your machine has lesser alignment needs,\n * you can save a few bytes by making ALIGN_TYPE smaller.\n * The only place I know of where this will NOT work is certain Macintosh\n * 680x0 compilers that define double as a 10-byte IEEE extended float.\n * Doing 10-byte alignment is counterproductive because longwords won't be\n * aligned well.  Put \"#define ALIGN_TYPE long\" in jconfig.h if you have\n * such a compiler.\n */\n\n#ifndef ALIGN_TYPE\t\t/* so can override from jconfig.h */\n#define ALIGN_TYPE  double\n#endif\n\n\n/*\n * We allocate objects from \"pools\", where each pool is gotten with a single\n * request to jpeg_get_small() or jpeg_get_large().  There is no per-object\n * overhead within a pool, except for alignment padding.  Each pool has a\n * header with a link to the next pool of the same class.\n * Small and large pool headers are identical except that the latter's\n * link pointer must be FAR on 80x86 machines.\n * Notice that the \"real\" header fields are union'ed with a dummy ALIGN_TYPE\n * field.  This forces the compiler to make SIZEOF(small_pool_hdr) a multiple\n * of the alignment requirement of ALIGN_TYPE.\n */\n\ntypedef union small_pool_struct * small_pool_ptr;\n\ntypedef union small_pool_struct {\n  struct {\n    small_pool_ptr next;\t/* next in list of pools */\n    size_t bytes_used;\t\t/* how many bytes already used within pool */\n    size_t bytes_left;\t\t/* bytes still available in this pool */\n  } hdr;\n  ALIGN_TYPE dummy;\t\t/* included in union to ensure alignment */\n} small_pool_hdr;\n\ntypedef union large_pool_struct FAR * large_pool_ptr;\n\ntypedef union large_pool_struct {\n  struct {\n    large_pool_ptr next;\t/* next in list of pools */\n    size_t bytes_used;\t\t/* how many bytes already used within pool */\n    size_t bytes_left;\t\t/* bytes still available in this pool */\n  } hdr;\n  ALIGN_TYPE dummy;\t\t/* included in union to ensure alignment */\n} large_pool_hdr;\n\n\n/*\n * Here is the full definition of a memory manager object.\n */\n\ntypedef struct {\n  struct jpeg_memory_mgr pub;\t/* public fields */\n\n  /* Each pool identifier (lifetime class) names a linked list of pools. */\n  small_pool_ptr small_list[JPOOL_NUMPOOLS];\n  large_pool_ptr large_list[JPOOL_NUMPOOLS];\n\n  /* Since we only have one lifetime class of virtual arrays, only one\n   * linked list is necessary (for each datatype).  Note that the virtual\n   * array control blocks being linked together are actually stored somewhere\n   * in the small-pool list.\n   */\n  jvirt_sarray_ptr virt_sarray_list;\n  jvirt_barray_ptr virt_barray_list;\n\n  /* This counts total space obtained from jpeg_get_small/large */\n  long total_space_allocated;\n\n  /* alloc_sarray and alloc_barray set this value for use by virtual\n   * array routines.\n   */\n  JDIMENSION last_rowsperchunk;\t/* from most recent alloc_sarray/barray */\n} my_memory_mgr;\n\ntypedef my_memory_mgr * my_mem_ptr;\n\n\n/*\n * The control blocks for virtual arrays.\n * Note that these blocks are allocated in the \"small\" pool area.\n * System-dependent info for the associated backing store (if any) is hidden\n * inside the backing_store_info struct.\n */\n\nstruct jvirt_sarray_control {\n  JSAMPARRAY mem_buffer;\t/* => the in-memory buffer */\n  JDIMENSION rows_in_array;\t/* total virtual array height */\n  JDIMENSION samplesperrow;\t/* width of array (and of memory buffer) */\n  JDIMENSION maxaccess;\t\t/* max rows accessed by access_virt_sarray */\n  JDIMENSION rows_in_mem;\t/* height of memory buffer */\n  JDIMENSION rowsperchunk;\t/* allocation chunk size in mem_buffer */\n  JDIMENSION cur_start_row;\t/* first logical row # in the buffer */\n  JDIMENSION first_undef_row;\t/* row # of first uninitialized row */\n  boolean pre_zero;\t\t/* pre-zero mode requested? */\n  boolean dirty;\t\t/* do current buffer contents need written? */\n  boolean b_s_open;\t\t/* is backing-store data valid? */\n  jvirt_sarray_ptr next;\t/* link to next virtual sarray control block */\n  backing_store_info b_s_info;\t/* System-dependent control info */\n};\n\nstruct jvirt_barray_control {\n  JBLOCKARRAY mem_buffer;\t/* => the in-memory buffer */\n  JDIMENSION rows_in_array;\t/* total virtual array height */\n  JDIMENSION blocksperrow;\t/* width of array (and of memory buffer) */\n  JDIMENSION maxaccess;\t\t/* max rows accessed by access_virt_barray */\n  JDIMENSION rows_in_mem;\t/* height of memory buffer */\n  JDIMENSION rowsperchunk;\t/* allocation chunk size in mem_buffer */\n  JDIMENSION cur_start_row;\t/* first logical row # in the buffer */\n  JDIMENSION first_undef_row;\t/* row # of first uninitialized row */\n  boolean pre_zero;\t\t/* pre-zero mode requested? */\n  boolean dirty;\t\t/* do current buffer contents need written? */\n  boolean b_s_open;\t\t/* is backing-store data valid? */\n  jvirt_barray_ptr next;\t/* link to next virtual barray control block */\n  backing_store_info b_s_info;\t/* System-dependent control info */\n};\n\n\n#ifdef MEM_STATS\t\t/* optional extra stuff for statistics */\n\nLOCAL(void)\nprint_mem_stats (j_common_ptr cinfo, int pool_id)\n{\n  my_mem_ptr mem = (my_mem_ptr) cinfo->mem;\n  small_pool_ptr shdr_ptr;\n  large_pool_ptr lhdr_ptr;\n\n  /* Since this is only a debugging stub, we can cheat a little by using\n   * fprintf directly rather than going through the trace message code.\n   * This is helpful because message parm array can't handle longs.\n   */\n  fprintf(stderr, \"Freeing pool %d, total space = %ld\\n\",\n\t  pool_id, mem->total_space_allocated);\n\n  for (lhdr_ptr = mem->large_list[pool_id]; lhdr_ptr != NULL;\n       lhdr_ptr = lhdr_ptr->hdr.next) {\n    fprintf(stderr, \"  Large chunk used %ld\\n\",\n\t    (long) lhdr_ptr->hdr.bytes_used);\n  }\n\n  for (shdr_ptr = mem->small_list[pool_id]; shdr_ptr != NULL;\n       shdr_ptr = shdr_ptr->hdr.next) {\n    fprintf(stderr, \"  Small chunk used %ld free %ld\\n\",\n\t    (long) shdr_ptr->hdr.bytes_used,\n\t    (long) shdr_ptr->hdr.bytes_left);\n  }\n}\n\n#endif /* MEM_STATS */\n\n\nLOCAL(void)\nout_of_memory (j_common_ptr cinfo, int which)\n/* Report an out-of-memory error and stop execution */\n/* If we compiled MEM_STATS support, report alloc requests before dying */\n{\n#ifdef MEM_STATS\n  cinfo->err->trace_level = 2;\t/* force self_destruct to report stats */\n#endif\n  ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, which);\n}\n\n\n/*\n * Allocation of \"small\" objects.\n *\n * For these, we use pooled storage.  When a new pool must be created,\n * we try to get enough space for the current request plus a \"slop\" factor,\n * where the slop will be the amount of leftover space in the new pool.\n * The speed vs. space tradeoff is largely determined by the slop values.\n * A different slop value is provided for each pool class (lifetime),\n * and we also distinguish the first pool of a class from later ones.\n * NOTE: the values given work fairly well on both 16- and 32-bit-int\n * machines, but may be too small if longs are 64 bits or more.\n */\n\nstatic const size_t first_pool_slop[JPOOL_NUMPOOLS] = \n{\n\t1600,\t\t\t/* first PERMANENT pool */\n\t16000\t\t\t/* first IMAGE pool */\n};\n\nstatic const size_t extra_pool_slop[JPOOL_NUMPOOLS] = \n{\n\t0,\t\t\t/* additional PERMANENT pools */\n\t5000\t\t\t/* additional IMAGE pools */\n};\n\n#define MIN_SLOP  50\t\t/* greater than 0 to avoid futile looping */\n\n\nMETHODDEF(void *)\nalloc_small (j_common_ptr cinfo, int pool_id, size_t sizeofobject)\n/* Allocate a \"small\" object */\n{\n  my_mem_ptr mem = (my_mem_ptr) cinfo->mem;\n  small_pool_ptr hdr_ptr, prev_hdr_ptr;\n  char * data_ptr;\n  size_t odd_bytes, min_request, slop;\n\n  /* Check for unsatisfiable request (do now to ensure no overflow below) */\n  if (sizeofobject > (size_t) (MAX_ALLOC_CHUNK-SIZEOF(small_pool_hdr)))\n    out_of_memory(cinfo, 1);\t/* request exceeds malloc's ability */\n\n  /* Round up the requested size to a multiple of SIZEOF(ALIGN_TYPE) */\n  odd_bytes = sizeofobject % SIZEOF(ALIGN_TYPE);\n  if (odd_bytes > 0)\n    sizeofobject += SIZEOF(ALIGN_TYPE) - odd_bytes;\n\n  /* See if space is available in any existing pool */\n  if (pool_id < 0 || pool_id >= JPOOL_NUMPOOLS)\n    ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id);\t/* safety check */\n  prev_hdr_ptr = NULL;\n  hdr_ptr = mem->small_list[pool_id];\n  while (hdr_ptr != NULL) {\n    if (hdr_ptr->hdr.bytes_left >= sizeofobject)\n      break;\t\t\t/* found pool with enough space */\n    prev_hdr_ptr = hdr_ptr;\n    hdr_ptr = hdr_ptr->hdr.next;\n  }\n\n  /* Time to make a new pool? */\n  if (hdr_ptr == NULL) {\n    /* min_request is what we need now, slop is what will be leftover */\n    min_request = sizeofobject + SIZEOF(small_pool_hdr);\n    if (prev_hdr_ptr == NULL)\t/* first pool in class? */\n      slop = first_pool_slop[pool_id];\n    else\n      slop = extra_pool_slop[pool_id];\n    /* Don't ask for more than MAX_ALLOC_CHUNK */\n    if (slop > (size_t) (MAX_ALLOC_CHUNK-min_request))\n      slop = (size_t) (MAX_ALLOC_CHUNK-min_request);\n    /* Try to get space, if fail reduce slop and try again */\n    for (;;) {\n      hdr_ptr = (small_pool_ptr) jpeg_get_small(cinfo, min_request + slop);\n      if (hdr_ptr != NULL)\n\tbreak;\n      slop /= 2;\n      if (slop < MIN_SLOP)\t/* give up when it gets real small */\n\tout_of_memory(cinfo, 2); /* jpeg_get_small failed */\n    }\n    mem->total_space_allocated += min_request + slop;\n    /* Success, initialize the new pool header and add to end of list */\n    hdr_ptr->hdr.next = NULL;\n    hdr_ptr->hdr.bytes_used = 0;\n    hdr_ptr->hdr.bytes_left = sizeofobject + slop;\n    if (prev_hdr_ptr == NULL)\t/* first pool in class? */\n      mem->small_list[pool_id] = hdr_ptr;\n    else\n      prev_hdr_ptr->hdr.next = hdr_ptr;\n  }\n\n  /* OK, allocate the object from the current pool */\n  data_ptr = (char *) (hdr_ptr + 1); /* point to first data byte in pool */\n  data_ptr += hdr_ptr->hdr.bytes_used; /* point to place for object */\n  hdr_ptr->hdr.bytes_used += sizeofobject;\n  hdr_ptr->hdr.bytes_left -= sizeofobject;\n\n  return (void *) data_ptr;\n}\n\n\n/*\n * Allocation of \"large\" objects.\n *\n * The external semantics of these are the same as \"small\" objects,\n * except that FAR pointers are used on 80x86.  However the pool\n * management heuristics are quite different.  We assume that each\n * request is large enough that it may as well be passed directly to\n * jpeg_get_large; the pool management just links everything together\n * so that we can free it all on demand.\n * Note: the major use of \"large\" objects is in JSAMPARRAY and JBLOCKARRAY\n * structures.  The routines that create these structures (see below)\n * deliberately bunch rows together to ensure a large request size.\n */\n\nMETHODDEF(void FAR *)\nalloc_large (j_common_ptr cinfo, int pool_id, size_t sizeofobject)\n/* Allocate a \"large\" object */\n{\n  my_mem_ptr mem = (my_mem_ptr) cinfo->mem;\n  large_pool_ptr hdr_ptr;\n  size_t odd_bytes;\n\n  /* Check for unsatisfiable request (do now to ensure no overflow below) */\n  if (sizeofobject > (size_t) (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr)))\n    out_of_memory(cinfo, 3);\t/* request exceeds malloc's ability */\n\n  /* Round up the requested size to a multiple of SIZEOF(ALIGN_TYPE) */\n  odd_bytes = sizeofobject % SIZEOF(ALIGN_TYPE);\n  if (odd_bytes > 0)\n    sizeofobject += SIZEOF(ALIGN_TYPE) - odd_bytes;\n\n  /* Always make a new pool */\n  if (pool_id < 0 || pool_id >= JPOOL_NUMPOOLS)\n    ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id);\t/* safety check */\n\n  hdr_ptr = (large_pool_ptr) jpeg_get_large(cinfo, sizeofobject +\n\t\t\t\t\t    SIZEOF(large_pool_hdr));\n  if (hdr_ptr == NULL)\n    out_of_memory(cinfo, 4);\t/* jpeg_get_large failed */\n  mem->total_space_allocated += sizeofobject + SIZEOF(large_pool_hdr);\n\n  /* Success, initialize the new pool header and add to list */\n  hdr_ptr->hdr.next = mem->large_list[pool_id];\n  /* We maintain space counts in each pool header for statistical purposes,\n   * even though they are not needed for allocation.\n   */\n  hdr_ptr->hdr.bytes_used = sizeofobject;\n  hdr_ptr->hdr.bytes_left = 0;\n  mem->large_list[pool_id] = hdr_ptr;\n\n  return (void FAR *) (hdr_ptr + 1); /* point to first data byte in pool */\n}\n\n\n/*\n * Creation of 2-D sample arrays.\n * The pointers are in near heap, the samples themselves in FAR heap.\n *\n * To minimize allocation overhead and to allow I/O of large contiguous\n * blocks, we allocate the sample rows in groups of as many rows as possible\n * without exceeding MAX_ALLOC_CHUNK total bytes per allocation request.\n * NB: the virtual array control routines, later in this file, know about\n * this chunking of rows.  The rowsperchunk value is left in the mem manager\n * object so that it can be saved away if this sarray is the workspace for\n * a virtual array.\n */\n\nMETHODDEF(JSAMPARRAY)\nalloc_sarray (j_common_ptr cinfo, int pool_id,\n\t      JDIMENSION samplesperrow, JDIMENSION numrows)\n/* Allocate a 2-D sample array */\n{\n  my_mem_ptr mem = (my_mem_ptr) cinfo->mem;\n  JSAMPARRAY result;\n  JSAMPROW workspace;\n  JDIMENSION rowsperchunk, currow, i;\n  long ltemp;\n\n  /* Calculate max # of rows allowed in one allocation chunk */\n  ltemp = (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr)) /\n\t  ((long) samplesperrow * SIZEOF(JSAMPLE));\n  if (ltemp <= 0)\n    ERREXIT(cinfo, JERR_WIDTH_OVERFLOW);\n  if (ltemp < (long) numrows)\n    rowsperchunk = (JDIMENSION) ltemp;\n  else\n    rowsperchunk = numrows;\n  mem->last_rowsperchunk = rowsperchunk;\n\n  /* Get space for row pointers (small object) */\n  result = (JSAMPARRAY) alloc_small(cinfo, pool_id,\n\t\t\t\t    (size_t) (numrows * SIZEOF(JSAMPROW)));\n\n  /* Get the rows themselves (large objects) */\n  currow = 0;\n  while (currow < numrows) {\n    rowsperchunk = MIN(rowsperchunk, numrows - currow);\n    workspace = (JSAMPROW) alloc_large(cinfo, pool_id,\n\t(size_t) ((size_t) rowsperchunk * (size_t) samplesperrow\n\t\t  * SIZEOF(JSAMPLE)));\n    for (i = rowsperchunk; i > 0; i--) {\n      result[currow++] = workspace;\n      workspace += samplesperrow;\n    }\n  }\n\n  return result;\n}\n\n\n/*\n * Creation of 2-D coefficient-block arrays.\n * This is essentially the same as the code for sample arrays, above.\n */\n\nMETHODDEF(JBLOCKARRAY)\nalloc_barray (j_common_ptr cinfo, int pool_id,\n\t      JDIMENSION blocksperrow, JDIMENSION numrows)\n/* Allocate a 2-D coefficient-block array */\n{\n  my_mem_ptr mem = (my_mem_ptr) cinfo->mem;\n  JBLOCKARRAY result;\n  JBLOCKROW workspace;\n  JDIMENSION rowsperchunk, currow, i;\n  long ltemp;\n\n  /* Calculate max # of rows allowed in one allocation chunk */\n  ltemp = (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr)) /\n\t  ((long) blocksperrow * SIZEOF(JBLOCK));\n  if (ltemp <= 0)\n    ERREXIT(cinfo, JERR_WIDTH_OVERFLOW);\n  if (ltemp < (long) numrows)\n    rowsperchunk = (JDIMENSION) ltemp;\n  else\n    rowsperchunk = numrows;\n  mem->last_rowsperchunk = rowsperchunk;\n\n  /* Get space for row pointers (small object) */\n  result = (JBLOCKARRAY) alloc_small(cinfo, pool_id,\n\t\t\t\t     (size_t) (numrows * SIZEOF(JBLOCKROW)));\n\n  /* Get the rows themselves (large objects) */\n  currow = 0;\n  while (currow < numrows) {\n    rowsperchunk = MIN(rowsperchunk, numrows - currow);\n    workspace = (JBLOCKROW) alloc_large(cinfo, pool_id,\n\t(size_t) ((size_t) rowsperchunk * (size_t) blocksperrow\n\t\t  * SIZEOF(JBLOCK)));\n    for (i = rowsperchunk; i > 0; i--) {\n      result[currow++] = workspace;\n      workspace += blocksperrow;\n    }\n  }\n\n  return result;\n}\n\n\n/*\n * About virtual array management:\n *\n * The above \"normal\" array routines are only used to allocate strip buffers\n * (as wide as the image, but just a few rows high).  Full-image-sized buffers\n * are handled as \"virtual\" arrays.  The array is still accessed a strip at a\n * time, but the memory manager must save the whole array for repeated\n * accesses.  The intended implementation is that there is a strip buffer in\n * memory (as high as is possible given the desired memory limit), plus a\n * backing file that holds the rest of the array.\n *\n * The request_virt_array routines are told the total size of the image and\n * the maximum number of rows that will be accessed at once.  The in-memory\n * buffer must be at least as large as the maxaccess value.\n *\n * The request routines create control blocks but not the in-memory buffers.\n * That is postponed until realize_virt_arrays is called.  At that time the\n * total amount of space needed is known (approximately, anyway), so free\n * memory can be divided up fairly.\n *\n * The access_virt_array routines are responsible for making a specific strip\n * area accessible (after reading or writing the backing file, if necessary).\n * Note that the access routines are told whether the caller intends to modify\n * the accessed strip; during a read-only pass this saves having to rewrite\n * data to disk.  The access routines are also responsible for pre-zeroing\n * any newly accessed rows, if pre-zeroing was requested.\n *\n * In current usage, the access requests are usually for nonoverlapping\n * strips; that is, successive access start_row numbers differ by exactly\n * num_rows = maxaccess.  This means we can get good performance with simple\n * buffer dump/reload logic, by making the in-memory buffer be a multiple\n * of the access height; then there will never be accesses across bufferload\n * boundaries.  The code will still work with overlapping access requests,\n * but it doesn't handle bufferload overlaps very efficiently.\n */\n\n\nMETHODDEF(jvirt_sarray_ptr)\nrequest_virt_sarray (j_common_ptr cinfo, int pool_id, boolean pre_zero,\n\t\t     JDIMENSION samplesperrow, JDIMENSION numrows,\n\t\t     JDIMENSION maxaccess)\n/* Request a virtual 2-D sample array */\n{\n  my_mem_ptr mem = (my_mem_ptr) cinfo->mem;\n  jvirt_sarray_ptr result;\n\n  /* Only IMAGE-lifetime virtual arrays are currently supported */\n  if (pool_id != JPOOL_IMAGE)\n    ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id);\t/* safety check */\n\n  /* get control block */\n  result = (jvirt_sarray_ptr) alloc_small(cinfo, pool_id,\n\t\t\t\t\t  SIZEOF(struct jvirt_sarray_control));\n\n  result->mem_buffer = NULL;\t/* marks array not yet realized */\n  result->rows_in_array = numrows;\n  result->samplesperrow = samplesperrow;\n  result->maxaccess = maxaccess;\n  result->pre_zero = pre_zero;\n  result->b_s_open = FALSE;\t/* no associated backing-store object */\n  result->next = mem->virt_sarray_list; /* add to list of virtual arrays */\n  mem->virt_sarray_list = result;\n\n  return result;\n}\n\n\nMETHODDEF(jvirt_barray_ptr)\nrequest_virt_barray (j_common_ptr cinfo, int pool_id, boolean pre_zero,\n\t\t     JDIMENSION blocksperrow, JDIMENSION numrows,\n\t\t     JDIMENSION maxaccess)\n/* Request a virtual 2-D coefficient-block array */\n{\n  my_mem_ptr mem = (my_mem_ptr) cinfo->mem;\n  jvirt_barray_ptr result;\n\n  /* Only IMAGE-lifetime virtual arrays are currently supported */\n  if (pool_id != JPOOL_IMAGE)\n    ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id);\t/* safety check */\n\n  /* get control block */\n  result = (jvirt_barray_ptr) alloc_small(cinfo, pool_id,\n\t\t\t\t\t  SIZEOF(struct jvirt_barray_control));\n\n  result->mem_buffer = NULL;\t/* marks array not yet realized */\n  result->rows_in_array = numrows;\n  result->blocksperrow = blocksperrow;\n  result->maxaccess = maxaccess;\n  result->pre_zero = pre_zero;\n  result->b_s_open = FALSE;\t/* no associated backing-store object */\n  result->next = mem->virt_barray_list; /* add to list of virtual arrays */\n  mem->virt_barray_list = result;\n\n  return result;\n}\n\n\nMETHODDEF(void)\nrealize_virt_arrays (j_common_ptr cinfo)\n/* Allocate the in-memory buffers for any unrealized virtual arrays */\n{\n  my_mem_ptr mem = (my_mem_ptr) cinfo->mem;\n  long space_per_minheight, maximum_space, avail_mem;\n  long minheights, max_minheights;\n  jvirt_sarray_ptr sptr;\n  jvirt_barray_ptr bptr;\n\n  /* Compute the minimum space needed (maxaccess rows in each buffer)\n   * and the maximum space needed (full image height in each buffer).\n   * These may be of use to the system-dependent jpeg_mem_available routine.\n   */\n  space_per_minheight = 0;\n  maximum_space = 0;\n  for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) {\n    if (sptr->mem_buffer == NULL) { /* if not realized yet */\n      space_per_minheight += (long) sptr->maxaccess *\n\t\t\t     (long) sptr->samplesperrow * SIZEOF(JSAMPLE);\n      maximum_space += (long) sptr->rows_in_array *\n\t\t       (long) sptr->samplesperrow * SIZEOF(JSAMPLE);\n    }\n  }\n  for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) {\n    if (bptr->mem_buffer == NULL) { /* if not realized yet */\n      space_per_minheight += (long) bptr->maxaccess *\n\t\t\t     (long) bptr->blocksperrow * SIZEOF(JBLOCK);\n      maximum_space += (long) bptr->rows_in_array *\n\t\t       (long) bptr->blocksperrow * SIZEOF(JBLOCK);\n    }\n  }\n\n  if (space_per_minheight <= 0)\n    return;\t\t\t/* no unrealized arrays, no work */\n\n  /* Determine amount of memory to actually use; this is system-dependent. */\n  avail_mem = jpeg_mem_available(cinfo, space_per_minheight, maximum_space,\n\t\t\t\t mem->total_space_allocated);\n\n  /* If the maximum space needed is available, make all the buffers full\n   * height; otherwise parcel it out with the same number of minheights\n   * in each buffer.\n   */\n  if (avail_mem >= maximum_space)\n    max_minheights = 1000000000L;\n  else {\n    max_minheights = avail_mem / space_per_minheight;\n    /* If there doesn't seem to be enough space, try to get the minimum\n     * anyway.  This allows a \"stub\" implementation of jpeg_mem_available().\n     */\n    if (max_minheights <= 0)\n      max_minheights = 1;\n  }\n\n  /* Allocate the in-memory buffers and initialize backing store as needed. */\n\n  for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) {\n    if (sptr->mem_buffer == NULL) { /* if not realized yet */\n      minheights = ((long) sptr->rows_in_array - 1L) / sptr->maxaccess + 1L;\n      if (minheights <= max_minheights) {\n\t/* This buffer fits in memory */\n\tsptr->rows_in_mem = sptr->rows_in_array;\n      } else {\n\t/* It doesn't fit in memory, create backing store. */\n\tsptr->rows_in_mem = (JDIMENSION) (max_minheights * sptr->maxaccess);\n\tjpeg_open_backing_store(cinfo, & sptr->b_s_info,\n\t\t\t\t(long) sptr->rows_in_array *\n\t\t\t\t(long) sptr->samplesperrow *\n\t\t\t\t(long) SIZEOF(JSAMPLE));\n\tsptr->b_s_open = TRUE;\n      }\n      sptr->mem_buffer = alloc_sarray(cinfo, JPOOL_IMAGE,\n\t\t\t\t      sptr->samplesperrow, sptr->rows_in_mem);\n      sptr->rowsperchunk = mem->last_rowsperchunk;\n      sptr->cur_start_row = 0;\n      sptr->first_undef_row = 0;\n      sptr->dirty = FALSE;\n    }\n  }\n\n  for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) {\n    if (bptr->mem_buffer == NULL) { /* if not realized yet */\n      minheights = ((long) bptr->rows_in_array - 1L) / bptr->maxaccess + 1L;\n      if (minheights <= max_minheights) {\n\t/* This buffer fits in memory */\n\tbptr->rows_in_mem = bptr->rows_in_array;\n      } else {\n\t/* It doesn't fit in memory, create backing store. */\n\tbptr->rows_in_mem = (JDIMENSION) (max_minheights * bptr->maxaccess);\n\tjpeg_open_backing_store(cinfo, & bptr->b_s_info,\n\t\t\t\t(long) bptr->rows_in_array *\n\t\t\t\t(long) bptr->blocksperrow *\n\t\t\t\t(long) SIZEOF(JBLOCK));\n\tbptr->b_s_open = TRUE;\n      }\n      bptr->mem_buffer = alloc_barray(cinfo, JPOOL_IMAGE,\n\t\t\t\t      bptr->blocksperrow, bptr->rows_in_mem);\n      bptr->rowsperchunk = mem->last_rowsperchunk;\n      bptr->cur_start_row = 0;\n      bptr->first_undef_row = 0;\n      bptr->dirty = FALSE;\n    }\n  }\n}\n\n\nLOCAL(void)\ndo_sarray_io (j_common_ptr cinfo, jvirt_sarray_ptr ptr, boolean writing)\n/* Do backing store read or write of a virtual sample array */\n{\n  long bytesperrow, file_offset, byte_count, rows, thisrow, i;\n\n  bytesperrow = (long) ptr->samplesperrow * SIZEOF(JSAMPLE);\n  file_offset = ptr->cur_start_row * bytesperrow;\n  /* Loop to read or write each allocation chunk in mem_buffer */\n  for (i = 0; i < (long) ptr->rows_in_mem; i += ptr->rowsperchunk) {\n    /* One chunk, but check for short chunk at end of buffer */\n    rows = MIN((long) ptr->rowsperchunk, (long) ptr->rows_in_mem - i);\n    /* Transfer no more than is currently defined */\n    thisrow = (long) ptr->cur_start_row + i;\n    rows = MIN(rows, (long) ptr->first_undef_row - thisrow);\n    /* Transfer no more than fits in file */\n    rows = MIN(rows, (long) ptr->rows_in_array - thisrow);\n    if (rows <= 0)\t\t/* this chunk might be past end of file! */\n      break;\n    byte_count = rows * bytesperrow;\n    if (writing)\n      (*ptr->b_s_info.write_backing_store) (cinfo, & ptr->b_s_info,\n\t\t\t\t\t    (void FAR *) ptr->mem_buffer[i],\n\t\t\t\t\t    file_offset, byte_count);\n    else\n      (*ptr->b_s_info.read_backing_store) (cinfo, & ptr->b_s_info,\n\t\t\t\t\t   (void FAR *) ptr->mem_buffer[i],\n\t\t\t\t\t   file_offset, byte_count);\n    file_offset += byte_count;\n  }\n}\n\n\nLOCAL(void)\ndo_barray_io (j_common_ptr cinfo, jvirt_barray_ptr ptr, boolean writing)\n/* Do backing store read or write of a virtual coefficient-block array */\n{\n  long bytesperrow, file_offset, byte_count, rows, thisrow, i;\n\n  bytesperrow = (long) ptr->blocksperrow * SIZEOF(JBLOCK);\n  file_offset = ptr->cur_start_row * bytesperrow;\n  /* Loop to read or write each allocation chunk in mem_buffer */\n  for (i = 0; i < (long) ptr->rows_in_mem; i += ptr->rowsperchunk) {\n    /* One chunk, but check for short chunk at end of buffer */\n    rows = MIN((long) ptr->rowsperchunk, (long) ptr->rows_in_mem - i);\n    /* Transfer no more than is currently defined */\n    thisrow = (long) ptr->cur_start_row + i;\n    rows = MIN(rows, (long) ptr->first_undef_row - thisrow);\n    /* Transfer no more than fits in file */\n    rows = MIN(rows, (long) ptr->rows_in_array - thisrow);\n    if (rows <= 0)\t\t/* this chunk might be past end of file! */\n      break;\n    byte_count = rows * bytesperrow;\n    if (writing)\n      (*ptr->b_s_info.write_backing_store) (cinfo, & ptr->b_s_info,\n\t\t\t\t\t    (void FAR *) ptr->mem_buffer[i],\n\t\t\t\t\t    file_offset, byte_count);\n    else\n      (*ptr->b_s_info.read_backing_store) (cinfo, & ptr->b_s_info,\n\t\t\t\t\t   (void FAR *) ptr->mem_buffer[i],\n\t\t\t\t\t   file_offset, byte_count);\n    file_offset += byte_count;\n  }\n}\n\n\nMETHODDEF(JSAMPARRAY)\naccess_virt_sarray (j_common_ptr cinfo, jvirt_sarray_ptr ptr,\n\t\t    JDIMENSION start_row, JDIMENSION num_rows,\n\t\t    boolean writable)\n/* Access the part of a virtual sample array starting at start_row */\n/* and extending for num_rows rows.  writable is true if  */\n/* caller intends to modify the accessed area. */\n{\n  JDIMENSION end_row = start_row + num_rows;\n  JDIMENSION undef_row;\n\n  /* debugging check */\n  if (end_row > ptr->rows_in_array || num_rows > ptr->maxaccess ||\n      ptr->mem_buffer == NULL)\n    ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS);\n\n  /* Make the desired part of the virtual array accessible */\n  if (start_row < ptr->cur_start_row ||\n      end_row > ptr->cur_start_row+ptr->rows_in_mem) {\n    if (! ptr->b_s_open)\n      ERREXIT(cinfo, JERR_VIRTUAL_BUG);\n    /* Flush old buffer contents if necessary */\n    if (ptr->dirty) {\n      do_sarray_io(cinfo, ptr, TRUE);\n      ptr->dirty = FALSE;\n    }\n    /* Decide what part of virtual array to access.\n     * Algorithm: if target address > current window, assume forward scan,\n     * load starting at target address.  If target address < current window,\n     * assume backward scan, load so that target area is top of window.\n     * Note that when switching from forward write to forward read, will have\n     * start_row = 0, so the limiting case applies and we load from 0 anyway.\n     */\n    if (start_row > ptr->cur_start_row) {\n      ptr->cur_start_row = start_row;\n    } else {\n      /* use long arithmetic here to avoid overflow & unsigned problems */\n      long ltemp;\n\n      ltemp = (long) end_row - (long) ptr->rows_in_mem;\n      if (ltemp < 0)\n\tltemp = 0;\t\t/* don't fall off front end of file */\n      ptr->cur_start_row = (JDIMENSION) ltemp;\n    }\n    /* Read in the selected part of the array.\n     * During the initial write pass, we will do no actual read\n     * because the selected part is all undefined.\n     */\n    do_sarray_io(cinfo, ptr, FALSE);\n  }\n  /* Ensure the accessed part of the array is defined; prezero if needed.\n   * To improve locality of access, we only prezero the part of the array\n   * that the caller is about to access, not the entire in-memory array.\n   */\n  if (ptr->first_undef_row < end_row) {\n    if (ptr->first_undef_row < start_row) {\n      if (writable)\t\t/* writer skipped over a section of array */\n\tERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS);\n      undef_row = start_row;\t/* but reader is allowed to read ahead */\n    } else {\n      undef_row = ptr->first_undef_row;\n    }\n    if (writable)\n      ptr->first_undef_row = end_row;\n    if (ptr->pre_zero) {\n      size_t bytesperrow = (size_t) ptr->samplesperrow * SIZEOF(JSAMPLE);\n      undef_row -= ptr->cur_start_row; /* make indexes relative to buffer */\n      end_row -= ptr->cur_start_row;\n      while (undef_row < end_row) {\n\tjzero_far((void FAR *) ptr->mem_buffer[undef_row], bytesperrow);\n\tundef_row++;\n      }\n    } else {\n      if (! writable)\t\t/* reader looking at undefined data */\n\tERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS);\n    }\n  }\n  /* Flag the buffer dirty if caller will write in it */\n  if (writable)\n    ptr->dirty = TRUE;\n  /* Return address of proper part of the buffer */\n  return ptr->mem_buffer + (start_row - ptr->cur_start_row);\n}\n\n\nMETHODDEF(JBLOCKARRAY)\naccess_virt_barray (j_common_ptr cinfo, jvirt_barray_ptr ptr,\n\t\t    JDIMENSION start_row, JDIMENSION num_rows,\n\t\t    boolean writable)\n/* Access the part of a virtual block array starting at start_row */\n/* and extending for num_rows rows.  writable is true if  */\n/* caller intends to modify the accessed area. */\n{\n  JDIMENSION end_row = start_row + num_rows;\n  JDIMENSION undef_row;\n\n  /* debugging check */\n  if (end_row > ptr->rows_in_array || num_rows > ptr->maxaccess ||\n      ptr->mem_buffer == NULL)\n    ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS);\n\n  /* Make the desired part of the virtual array accessible */\n  if (start_row < ptr->cur_start_row ||\n      end_row > ptr->cur_start_row+ptr->rows_in_mem) {\n    if (! ptr->b_s_open)\n      ERREXIT(cinfo, JERR_VIRTUAL_BUG);\n    /* Flush old buffer contents if necessary */\n    if (ptr->dirty) {\n      do_barray_io(cinfo, ptr, TRUE);\n      ptr->dirty = FALSE;\n    }\n    /* Decide what part of virtual array to access.\n     * Algorithm: if target address > current window, assume forward scan,\n     * load starting at target address.  If target address < current window,\n     * assume backward scan, load so that target area is top of window.\n     * Note that when switching from forward write to forward read, will have\n     * start_row = 0, so the limiting case applies and we load from 0 anyway.\n     */\n    if (start_row > ptr->cur_start_row) {\n      ptr->cur_start_row = start_row;\n    } else {\n      /* use long arithmetic here to avoid overflow & unsigned problems */\n      long ltemp;\n\n      ltemp = (long) end_row - (long) ptr->rows_in_mem;\n      if (ltemp < 0)\n\tltemp = 0;\t\t/* don't fall off front end of file */\n      ptr->cur_start_row = (JDIMENSION) ltemp;\n    }\n    /* Read in the selected part of the array.\n     * During the initial write pass, we will do no actual read\n     * because the selected part is all undefined.\n     */\n    do_barray_io(cinfo, ptr, FALSE);\n  }\n  /* Ensure the accessed part of the array is defined; prezero if needed.\n   * To improve locality of access, we only prezero the part of the array\n   * that the caller is about to access, not the entire in-memory array.\n   */\n  if (ptr->first_undef_row < end_row) {\n    if (ptr->first_undef_row < start_row) {\n      if (writable)\t\t/* writer skipped over a section of array */\n\tERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS);\n      undef_row = start_row;\t/* but reader is allowed to read ahead */\n    } else {\n      undef_row = ptr->first_undef_row;\n    }\n    if (writable)\n      ptr->first_undef_row = end_row;\n    if (ptr->pre_zero) {\n      size_t bytesperrow = (size_t) ptr->blocksperrow * SIZEOF(JBLOCK);\n      undef_row -= ptr->cur_start_row; /* make indexes relative to buffer */\n      end_row -= ptr->cur_start_row;\n      while (undef_row < end_row) {\n\tjzero_far((void FAR *) ptr->mem_buffer[undef_row], bytesperrow);\n\tundef_row++;\n      }\n    } else {\n      if (! writable)\t\t/* reader looking at undefined data */\n\tERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS);\n    }\n  }\n  /* Flag the buffer dirty if caller will write in it */\n  if (writable)\n    ptr->dirty = TRUE;\n  /* Return address of proper part of the buffer */\n  return ptr->mem_buffer + (start_row - ptr->cur_start_row);\n}\n\n\n/*\n * Release all objects belonging to a specified pool.\n */\n\nMETHODDEF(void)\nfree_pool (j_common_ptr cinfo, int pool_id)\n{\n  my_mem_ptr mem = (my_mem_ptr) cinfo->mem;\n  small_pool_ptr shdr_ptr;\n  large_pool_ptr lhdr_ptr;\n  size_t space_freed;\n\n  if (pool_id < 0 || pool_id >= JPOOL_NUMPOOLS)\n    ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id);\t/* safety check */\n\n#ifdef MEM_STATS\n  if (cinfo->err->trace_level > 1)\n    print_mem_stats(cinfo, pool_id); /* print pool's memory usage statistics */\n#endif\n\n  /* If freeing IMAGE pool, close any virtual arrays first */\n  if (pool_id == JPOOL_IMAGE) {\n    jvirt_sarray_ptr sptr;\n    jvirt_barray_ptr bptr;\n\n    for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) {\n      if (sptr->b_s_open) {\t/* there may be no backing store */\n\tsptr->b_s_open = FALSE;\t/* prevent recursive close if error */\n\t(*sptr->b_s_info.close_backing_store) (cinfo, & sptr->b_s_info);\n      }\n    }\n    mem->virt_sarray_list = NULL;\n    for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) {\n      if (bptr->b_s_open) {\t/* there may be no backing store */\n\tbptr->b_s_open = FALSE;\t/* prevent recursive close if error */\n\t(*bptr->b_s_info.close_backing_store) (cinfo, & bptr->b_s_info);\n      }\n    }\n    mem->virt_barray_list = NULL;\n  }\n\n  /* Release large objects */\n  lhdr_ptr = mem->large_list[pool_id];\n  mem->large_list[pool_id] = NULL;\n\n  while (lhdr_ptr != NULL) {\n    large_pool_ptr next_lhdr_ptr = lhdr_ptr->hdr.next;\n    space_freed = lhdr_ptr->hdr.bytes_used +\n\t\t  lhdr_ptr->hdr.bytes_left +\n\t\t  SIZEOF(large_pool_hdr);\n    jpeg_free_large(cinfo, (void FAR *) lhdr_ptr, space_freed);\n    mem->total_space_allocated -= space_freed;\n    lhdr_ptr = next_lhdr_ptr;\n  }\n\n  /* Release small objects */\n  shdr_ptr = mem->small_list[pool_id];\n  mem->small_list[pool_id] = NULL;\n\n  while (shdr_ptr != NULL) {\n    small_pool_ptr next_shdr_ptr = shdr_ptr->hdr.next;\n    space_freed = shdr_ptr->hdr.bytes_used +\n\t\t  shdr_ptr->hdr.bytes_left +\n\t\t  SIZEOF(small_pool_hdr);\n    jpeg_free_small(cinfo, (void *) shdr_ptr, space_freed);\n    mem->total_space_allocated -= space_freed;\n    shdr_ptr = next_shdr_ptr;\n  }\n}\n\n\n/*\n * Close up shop entirely.\n * Note that this cannot be called unless cinfo->mem is non-NULL.\n */\n\nMETHODDEF(void)\nself_destruct (j_common_ptr cinfo)\n{\n  int pool;\n\n  /* Close all backing store, release all memory.\n   * Releasing pools in reverse order might help avoid fragmentation\n   * with some (brain-damaged) malloc libraries.\n   */\n  for (pool = JPOOL_NUMPOOLS-1; pool >= JPOOL_PERMANENT; pool--) {\n    free_pool(cinfo, pool);\n  }\n\n  /* Release the memory manager control block too. */\n  jpeg_free_small(cinfo, (void *) cinfo->mem, SIZEOF(my_memory_mgr));\n  cinfo->mem = NULL;\t\t/* ensures I will be called only once */\n\n  jpeg_mem_term(cinfo);\t\t/* system-dependent cleanup */\n}\n\n\n/*\n * Memory manager initialization.\n * When this is called, only the error manager pointer is valid in cinfo!\n */\n\nGLOBAL(void)\njinit_memory_mgr (j_common_ptr cinfo)\n{\n  my_mem_ptr mem;\n  long max_to_use;\n  int pool;\n  size_t test_mac;\n\n  cinfo->mem = NULL;\t\t/* for safety if init fails */\n\n  /* Check for configuration errors.\n   * SIZEOF(ALIGN_TYPE) should be a power of 2; otherwise, it probably\n   * doesn't reflect any real hardware alignment requirement.\n   * The test is a little tricky: for X>0, X and X-1 have no one-bits\n   * in common if and only if X is a power of 2, ie has only one one-bit.\n   * Some compilers may give an \"unreachable code\" warning here; ignore it.\n   */\n  if ((SIZEOF(ALIGN_TYPE) & (SIZEOF(ALIGN_TYPE)-1)) != 0)\n    ERREXIT(cinfo, JERR_BAD_ALIGN_TYPE);\n  /* MAX_ALLOC_CHUNK must be representable as type size_t, and must be\n   * a multiple of SIZEOF(ALIGN_TYPE).\n   * Again, an \"unreachable code\" warning may be ignored here.\n   * But a \"constant too large\" warning means you need to fix MAX_ALLOC_CHUNK.\n   */\n  test_mac = (size_t) MAX_ALLOC_CHUNK;\n  if ((long) test_mac != MAX_ALLOC_CHUNK ||\n      (MAX_ALLOC_CHUNK % SIZEOF(ALIGN_TYPE)) != 0)\n    ERREXIT(cinfo, JERR_BAD_ALLOC_CHUNK);\n\n  max_to_use = jpeg_mem_init(cinfo); /* system-dependent initialization */\n\n  /* Attempt to allocate memory manager's control block */\n  mem = (my_mem_ptr) jpeg_get_small(cinfo, SIZEOF(my_memory_mgr));\n\n  if (mem == NULL) {\n    jpeg_mem_term(cinfo);\t/* system-dependent cleanup */\n    ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 0);\n  }\n\n  /* OK, fill in the method pointers */\n  mem->pub.alloc_small = alloc_small;\n  mem->pub.alloc_large = alloc_large;\n  mem->pub.alloc_sarray = alloc_sarray;\n  mem->pub.alloc_barray = alloc_barray;\n  mem->pub.request_virt_sarray = request_virt_sarray;\n  mem->pub.request_virt_barray = request_virt_barray;\n  mem->pub.realize_virt_arrays = realize_virt_arrays;\n  mem->pub.access_virt_sarray = access_virt_sarray;\n  mem->pub.access_virt_barray = access_virt_barray;\n  mem->pub.free_pool = free_pool;\n  mem->pub.self_destruct = self_destruct;\n\n  /* Make MAX_ALLOC_CHUNK accessible to other modules */\n  mem->pub.max_alloc_chunk = MAX_ALLOC_CHUNK;\n\n  /* Initialize working state */\n  mem->pub.max_memory_to_use = max_to_use;\n\n  for (pool = JPOOL_NUMPOOLS-1; pool >= JPOOL_PERMANENT; pool--) {\n    mem->small_list[pool] = NULL;\n    mem->large_list[pool] = NULL;\n  }\n  mem->virt_sarray_list = NULL;\n  mem->virt_barray_list = NULL;\n\n  mem->total_space_allocated = SIZEOF(my_memory_mgr);\n\n  /* Declare ourselves open for business */\n  cinfo->mem = & mem->pub;\n\n  /* Check for an environment variable JPEGMEM; if found, override the\n   * default max_memory setting from jpeg_mem_init.  Note that the\n   * surrounding application may again override this value.\n   * If your system doesn't support getenv(), define NO_GETENV to disable\n   * this feature.\n   */\n#ifndef NO_GETENV\n  { char * memenv;\n\n    if ((memenv = getenv(\"JPEGMEM\")) != NULL) {\n      char ch = 'x';\n\n      if (sscanf(memenv, \"%ld%c\", &max_to_use, &ch) > 0) {\n\tif (ch == 'm' || ch == 'M')\n\t  max_to_use *= 1000L;\n\tmem->pub.max_memory_to_use = max_to_use * 1000L;\n      }\n    }\n  }\n#endif\n\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jmemnobs.c",
    "content": "/*\n * jmemnobs.c\n *\n * Copyright (C) 1992-1996, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file provides a really simple implementation of the system-\n * dependent portion of the JPEG memory manager.  This implementation\n * assumes that no backing-store files are needed: all required space\n * can be obtained from malloc().\n * This is very portable in the sense that it'll compile on almost anything,\n * but you'd better have lots of main memory (or virtual memory) if you want\n * to process big images.\n * Note that the max_memory_to_use option is ignored by this implementation.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n#include \"jmemsys.h\"\t\t/* import the system-dependent declarations */\n\n#ifndef HAVE_STDLIB_H\t\t/* <stdlib.h> should declare malloc(),free() */\nextern void * malloc JPP((size_t size));\nextern void free JPP((void *ptr));\n#endif\n\n\n/*\n * Memory allocation and freeing are controlled by the regular library\n * routines malloc() and free().\n */\n\nGLOBAL(void *)\njpeg_get_small (j_common_ptr cinfo, size_t sizeofobject)\n{\n  return (void *) malloc(sizeofobject);\n}\n\nGLOBAL(void)\njpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)\n{\n  free(object);\n}\n\n\n/*\n * \"Large\" objects are treated the same as \"small\" ones.\n * NB: although we include FAR keywords in the routine declarations,\n * this file won't actually work in 80x86 small/medium model; at least,\n * you probably won't be able to process useful-size images in only 64KB.\n */\n\nGLOBAL(void FAR *)\njpeg_get_large (j_common_ptr cinfo, size_t sizeofobject)\n{\n  return (void FAR *) malloc(sizeofobject);\n}\n\nGLOBAL(void)\njpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)\n{\n  free(object);\n}\n\n\n/*\n * This routine computes the total memory space available for allocation.\n * Here we always say, \"we got all you want bud!\"\n */\n\nGLOBAL(long)\njpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,\n\t\t    long max_bytes_needed, long already_allocated)\n{\n  return max_bytes_needed;\n}\n\n\n/*\n * Backing store (temporary file) management.\n * Since jpeg_mem_available always promised the moon,\n * this should never be called and we can just error out.\n */\n\nGLOBAL(void)\njpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,\n\t\t\t long total_bytes_needed)\n{\n  ERREXIT(cinfo, JERR_NO_BACKING_STORE);\n}\n\n\n/*\n * These routines take care of any system-dependent initialization and\n * cleanup required.  Here, there isn't any.\n */\n\nGLOBAL(long)\njpeg_mem_init (j_common_ptr cinfo)\n{\n  return 0;\t\t\t/* just set max_memory_to_use to 0 */\n}\n\nGLOBAL(void)\njpeg_mem_term (j_common_ptr cinfo)\n{\n  /* no work */\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jmemsys.h",
    "content": "/*\n * jmemsys.h\n *\n * Copyright (C) 1992-1997, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This include file defines the interface between the system-independent\n * and system-dependent portions of the JPEG memory manager.  No other\n * modules need include it.  (The system-independent portion is jmemmgr.c;\n * there are several different versions of the system-dependent portion.)\n *\n * This file works as-is for the system-dependent memory managers supplied\n * in the IJG distribution.  You may need to modify it if you write a\n * custom memory manager.  If system-dependent changes are needed in\n * this file, the best method is to #ifdef them based on a configuration\n * symbol supplied in jconfig.h, as we have done with USE_MSDOS_MEMMGR\n * and USE_MAC_MEMMGR.\n */\n\n\n/* Short forms of external names for systems with brain-damaged linkers. */\n\n#ifdef NEED_SHORT_EXTERNAL_NAMES\n#define jpeg_get_small\t\tjGetSmall\n#define jpeg_free_small\t\tjFreeSmall\n#define jpeg_get_large\t\tjGetLarge\n#define jpeg_free_large\t\tjFreeLarge\n#define jpeg_mem_available\tjMemAvail\n#define jpeg_open_backing_store\tjOpenBackStore\n#define jpeg_mem_init\t\tjMemInit\n#define jpeg_mem_term\t\tjMemTerm\n#endif /* NEED_SHORT_EXTERNAL_NAMES */\n\n\n/*\n * These two functions are used to allocate and release small chunks of\n * memory.  (Typically the total amount requested through jpeg_get_small is\n * no more than 20K or so; this will be requested in chunks of a few K each.)\n * Behavior should be the same as for the standard library functions malloc\n * and free; in particular, jpeg_get_small must return NULL on failure.\n * On most systems, these ARE malloc and free.  jpeg_free_small is passed the\n * size of the object being freed, just in case it's needed.\n * On an 80x86 machine using small-data memory model, these manage near heap.\n */\n\nEXTERN(void *) jpeg_get_small JPP((j_common_ptr cinfo, size_t sizeofobject));\nEXTERN(void) jpeg_free_small JPP((j_common_ptr cinfo, void * object,\n\t\t\t\t  size_t sizeofobject));\n\n/*\n * These two functions are used to allocate and release large chunks of\n * memory (up to the total free space designated by jpeg_mem_available).\n * The interface is the same as above, except that on an 80x86 machine,\n * far pointers are used.  On most other machines these are identical to\n * the jpeg_get/free_small routines; but we keep them separate anyway,\n * in case a different allocation strategy is desirable for large chunks.\n */\n\nEXTERN(void FAR *) jpeg_get_large JPP((j_common_ptr cinfo,\n\t\t\t\t       size_t sizeofobject));\nEXTERN(void) jpeg_free_large JPP((j_common_ptr cinfo, void FAR * object,\n\t\t\t\t  size_t sizeofobject));\n\n/*\n * The macro MAX_ALLOC_CHUNK designates the maximum number of bytes that may\n * be requested in a single call to jpeg_get_large (and jpeg_get_small for that\n * matter, but that case should never come into play).  This macro is needed\n * to model the 64Kb-segment-size limit of far addressing on 80x86 machines.\n * On those machines, we expect that jconfig.h will provide a proper value.\n * On machines with 32-bit flat address spaces, any large constant may be used.\n *\n * NB: jmemmgr.c expects that MAX_ALLOC_CHUNK will be representable as type\n * size_t and will be a multiple of sizeof(align_type).\n */\n\n#ifndef MAX_ALLOC_CHUNK\t\t/* may be overridden in jconfig.h */\n#define MAX_ALLOC_CHUNK  1000000000L\n#endif\n\n/*\n * This routine computes the total space still available for allocation by\n * jpeg_get_large.  If more space than this is needed, backing store will be\n * used.  NOTE: any memory already allocated must not be counted.\n *\n * There is a minimum space requirement, corresponding to the minimum\n * feasible buffer sizes; jmemmgr.c will request that much space even if\n * jpeg_mem_available returns zero.  The maximum space needed, enough to hold\n * all working storage in memory, is also passed in case it is useful.\n * Finally, the total space already allocated is passed.  If no better\n * method is available, cinfo->mem->max_memory_to_use - already_allocated\n * is often a suitable calculation.\n *\n * It is OK for jpeg_mem_available to underestimate the space available\n * (that'll just lead to more backing-store access than is really necessary).\n * However, an overestimate will lead to failure.  Hence it's wise to subtract\n * a slop factor from the true available space.  5% should be enough.\n *\n * On machines with lots of virtual memory, any large constant may be returned.\n * Conversely, zero may be returned to always use the minimum amount of memory.\n */\n\nEXTERN(long) jpeg_mem_available JPP((j_common_ptr cinfo,\n\t\t\t\t     long min_bytes_needed,\n\t\t\t\t     long max_bytes_needed,\n\t\t\t\t     long already_allocated));\n\n\n/*\n * This structure holds whatever state is needed to access a single\n * backing-store object.  The read/write/close method pointers are called\n * by jmemmgr.c to manipulate the backing-store object; all other fields\n * are private to the system-dependent backing store routines.\n */\n\n#define TEMP_NAME_LENGTH   64\t/* max length of a temporary file's name */\n\n\n#ifdef USE_MSDOS_MEMMGR\t\t/* DOS-specific junk */\n\ntypedef unsigned short XMSH;\t/* type of extended-memory handles */\ntypedef unsigned short EMSH;\t/* type of expanded-memory handles */\n\ntypedef union {\n  short file_handle;\t\t/* DOS file handle if it's a temp file */\n  XMSH xms_handle;\t\t/* handle if it's a chunk of XMS */\n  EMSH ems_handle;\t\t/* handle if it's a chunk of EMS */\n} handle_union;\n\n#endif /* USE_MSDOS_MEMMGR */\n\n#ifdef USE_MAC_MEMMGR\t\t/* Mac-specific junk */\n#include <Files.h>\n#endif /* USE_MAC_MEMMGR */\n\n\ntypedef struct backing_store_struct * backing_store_ptr;\n\ntypedef struct backing_store_struct {\n  /* Methods for reading/writing/closing this backing-store object */\n  JMETHOD(void, read_backing_store, (j_common_ptr cinfo,\n\t\t\t\t     backing_store_ptr info,\n\t\t\t\t     void FAR * buffer_address,\n\t\t\t\t     long file_offset, long byte_count));\n  JMETHOD(void, write_backing_store, (j_common_ptr cinfo,\n\t\t\t\t      backing_store_ptr info,\n\t\t\t\t      void FAR * buffer_address,\n\t\t\t\t      long file_offset, long byte_count));\n  JMETHOD(void, close_backing_store, (j_common_ptr cinfo,\n\t\t\t\t      backing_store_ptr info));\n\n  /* Private fields for system-dependent backing-store management */\n#ifdef USE_MSDOS_MEMMGR\n  /* For the MS-DOS manager (jmemdos.c), we need: */\n  handle_union handle;\t\t/* reference to backing-store storage object */\n  char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */\n#else\n#ifdef USE_MAC_MEMMGR\n  /* For the Mac manager (jmemmac.c), we need: */\n  short temp_file;\t\t/* file reference number to temp file */\n  FSSpec tempSpec;\t\t/* the FSSpec for the temp file */\n  char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */\n#else\n  /* For a typical implementation with temp files, we need: */\n  FILE * temp_file;\t\t/* stdio reference to temp file */\n  char temp_name[TEMP_NAME_LENGTH]; /* name of temp file */\n#endif\n#endif\n} backing_store_info;\n\n\n/*\n * Initial opening of a backing-store object.  This must fill in the\n * read/write/close pointers in the object.  The read/write routines\n * may take an error exit if the specified maximum file size is exceeded.\n * (If jpeg_mem_available always returns a large value, this routine can\n * just take an error exit.)\n */\n\nEXTERN(void) jpeg_open_backing_store JPP((j_common_ptr cinfo,\n\t\t\t\t\t  backing_store_ptr info,\n\t\t\t\t\t  long total_bytes_needed));\n\n\n/*\n * These routines take care of any system-dependent initialization and\n * cleanup required.  jpeg_mem_init will be called before anything is\n * allocated (and, therefore, nothing in cinfo is of use except the error\n * manager pointer).  It should return a suitable default value for\n * max_memory_to_use; this may subsequently be overridden by the surrounding\n * application.  (Note that max_memory_to_use is only important if\n * jpeg_mem_available chooses to consult it ... no one else will.)\n * jpeg_mem_term may assume that all requested memory has been freed and that\n * all opened backing-store objects have been closed.\n */\n\nEXTERN(long) jpeg_mem_init JPP((j_common_ptr cinfo));\nEXTERN(void) jpeg_mem_term JPP((j_common_ptr cinfo));\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jmorecfg.h",
    "content": "/*\n * jmorecfg.h\n *\n * Copyright (C) 1991-1997, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains additional configuration options that customize the\n * JPEG software for special applications or support machine-dependent\n * optimizations.  Most users will not need to touch this file.\n */\n\n\n/*\n * Define BITS_IN_JSAMPLE as either\n *   8   for 8-bit sample values (the usual setting)\n *   12  for 12-bit sample values\n * Only 8 and 12 are legal data precisions for lossy JPEG according to the\n * JPEG standard, and the IJG code does not support anything else!\n * We do not support run-time selection of data precision, sorry.\n */\n\n#define BITS_IN_JSAMPLE  8\t/* use 8 or 12 */\n\n\n/*\n * Maximum number of components (color channels) allowed in JPEG image.\n * To meet the letter of the JPEG spec, set this to 255.  However, darn\n * few applications need more than 4 channels (maybe 5 for CMYK + alpha\n * mask).  We recommend 10 as a reasonable compromise; use 4 if you are\n * really short on memory.  (Each allowed component costs a hundred or so\n * bytes of storage, whether actually used in an image or not.)\n */\n\n#define MAX_COMPONENTS  10\t/* maximum number of image components */\n\n\n/*\n * Basic data types.\n * You may need to change these if you have a machine with unusual data\n * type sizes; for example, \"char\" not 8 bits, \"short\" not 16 bits,\n * or \"long\" not 32 bits.  We don't care whether \"int\" is 16 or 32 bits,\n * but it had better be at least 16.\n */\n\n/* Representation of a single sample (pixel element value).\n * We frequently allocate large arrays of these, so it's important to keep\n * them small.  But if you have memory to burn and access to char or short\n * arrays is very slow on your hardware, you might want to change these.\n */\n\n#if BITS_IN_JSAMPLE == 8\n/* JSAMPLE should be the smallest type that will hold the values 0..255.\n * You can use a signed char by having GETJSAMPLE mask it with 0xFF.\n */\n\n#ifdef HAVE_UNSIGNED_CHAR\n\ntypedef unsigned char JSAMPLE;\n#define GETJSAMPLE(value)  ((int) (value))\n\n#else /* not HAVE_UNSIGNED_CHAR */\n\ntypedef char JSAMPLE;\n#ifdef CHAR_IS_UNSIGNED\n#define GETJSAMPLE(value)  ((int) (value))\n#else\n#define GETJSAMPLE(value)  ((int) (value) & 0xFF)\n#endif /* CHAR_IS_UNSIGNED */\n\n#endif /* HAVE_UNSIGNED_CHAR */\n\n#define MAXJSAMPLE\t255\n#define CENTERJSAMPLE\t128\n\n#endif /* BITS_IN_JSAMPLE == 8 */\n\n\n#if BITS_IN_JSAMPLE == 12\n/* JSAMPLE should be the smallest type that will hold the values 0..4095.\n * On nearly all machines \"short\" will do nicely.\n */\n\ntypedef short JSAMPLE;\n#define GETJSAMPLE(value)  ((int) (value))\n\n#define MAXJSAMPLE\t4095\n#define CENTERJSAMPLE\t2048\n\n#endif /* BITS_IN_JSAMPLE == 12 */\n\n\n/* Representation of a DCT frequency coefficient.\n * This should be a signed value of at least 16 bits; \"short\" is usually OK.\n * Again, we allocate large arrays of these, but you can change to int\n * if you have memory to burn and \"short\" is really slow.\n */\n\ntypedef short JCOEF;\n\n\n/* Compressed datastreams are represented as arrays of JOCTET.\n * These must be EXACTLY 8 bits wide, at least once they are written to\n * external storage.  Note that when using the stdio data source/destination\n * managers, this is also the data type passed to fread/fwrite.\n */\n\n#ifdef HAVE_UNSIGNED_CHAR\n\ntypedef unsigned char JOCTET;\n#define GETJOCTET(value)  (value)\n\n#else /* not HAVE_UNSIGNED_CHAR */\n\ntypedef char JOCTET;\n#ifdef CHAR_IS_UNSIGNED\n#define GETJOCTET(value)  (value)\n#else\n#define GETJOCTET(value)  ((value) & 0xFF)\n#endif /* CHAR_IS_UNSIGNED */\n\n#endif /* HAVE_UNSIGNED_CHAR */\n\n\n/* These typedefs are used for various table entries and so forth.\n * They must be at least as wide as specified; but making them too big\n * won't cost a huge amount of memory, so we don't provide special\n * extraction code like we did for JSAMPLE.  (In other words, these\n * typedefs live at a different point on the speed/space tradeoff curve.)\n */\n\n/* UINT8 must hold at least the values 0..255. */\n\n#ifdef HAVE_UNSIGNED_CHAR\ntypedef unsigned char UINT8;\n#else /* not HAVE_UNSIGNED_CHAR */\n#ifdef CHAR_IS_UNSIGNED\ntypedef char UINT8;\n#else /* not CHAR_IS_UNSIGNED */\ntypedef short UINT8;\n#endif /* CHAR_IS_UNSIGNED */\n#endif /* HAVE_UNSIGNED_CHAR */\n\n/* UINT16 must hold at least the values 0..65535. */\n\n#ifdef HAVE_UNSIGNED_SHORT\ntypedef unsigned short UINT16;\n#else /* not HAVE_UNSIGNED_SHORT */\ntypedef unsigned int UINT16;\n#endif /* HAVE_UNSIGNED_SHORT */\n\n/* INT16 must hold at least the values -32768..32767. */\n\n#ifndef XMD_H\t\t\t/* X11/xmd.h correctly defines INT16 */\ntypedef short INT16;\n#endif\n\n/* INT32 must hold at least signed 32-bit values. */\n\n#ifndef XMD_H\t\t\t/* X11/xmd.h correctly defines INT32 */\ntypedef long INT32;\n#endif\n\n/* Datatype used for image dimensions.  The JPEG standard only supports\n * images up to 64K*64K due to 16-bit fields in SOF markers.  Therefore\n * \"unsigned int\" is sufficient on all machines.  However, if you need to\n * handle larger images and you don't mind deviating from the spec, you\n * can change this datatype.\n */\n\ntypedef unsigned int JDIMENSION;\n\n#define JPEG_MAX_DIMENSION  65500L  /* a tad under 64K to prevent overflows */\n\n\n/* These macros are used in all function definitions and extern declarations.\n * You could modify them if you need to change function linkage conventions;\n * in particular, you'll need to do that to make the library a Windows DLL.\n * Another application is to make all functions global for use with debuggers\n * or code profilers that require it.\n */\n\n/* a function called through method pointers: */\n#define METHODDEF(type)\t\tstatic type\n/* a function used only in its module: */\n#define LOCAL(type)\t\tstatic type\n/* a function referenced thru EXTERNs: */\n#define GLOBAL(type)\t\ttype\n/* a reference to a GLOBAL function: */\n#define EXTERN(type)\t\textern type\n\n\n/* This macro is used to declare a \"method\", that is, a function pointer.\n * We want to supply prototype parameters if the compiler can cope.\n * Note that the arglist parameter must be parenthesized!\n * Again, you can customize this if you need special linkage keywords.\n */\n\n#ifdef HAVE_PROTOTYPES\n#define JMETHOD(type,methodname,arglist)  type (*methodname) arglist\n#else\n#define JMETHOD(type,methodname,arglist)  type (*methodname) ()\n#endif\n\n\n/* Here is the pseudo-keyword for declaring pointers that must be \"far\"\n * on 80x86 machines.  Most of the specialized coding for 80x86 is handled\n * by just saying \"FAR *\" where such a pointer is needed.  In a few places\n * explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol.\n */\n\n#ifdef NEED_FAR_POINTERS\n#define FAR  far\n#else\n#define FAR\n#endif\n\n\n/*\n * On a few systems, type boolean and/or its values FALSE, TRUE may appear\n * in standard header files.  Or you may have conflicts with application-\n * specific header files that you want to include together with these files.\n * Defining HAVE_BOOLEAN before including jpeglib.h should make it work.\n */\n\n#ifndef HAVE_BOOLEAN\ntypedef int boolean;\n#endif\n#ifndef FALSE\t\t\t/* in case these macros already exist */\n#define FALSE\t0\t\t/* values of boolean */\n#endif\n#ifndef TRUE\n#define TRUE\t1\n#endif\n\n\n/*\n * The remaining options affect code selection within the JPEG library,\n * but they don't need to be visible to most applications using the library.\n * To minimize application namespace pollution, the symbols won't be\n * defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined.\n */\n\n#ifdef JPEG_INTERNALS\n#define JPEG_INTERNAL_OPTIONS\n#endif\n\n#ifdef JPEG_INTERNAL_OPTIONS\n\n\n/*\n * These defines indicate whether to include various optional functions.\n * Undefining some of these symbols will produce a smaller but less capable\n * library.  Note that you can leave certain source files out of the\n * compilation/linking process if you've #undef'd the corresponding symbols.\n * (You may HAVE to do that if your compiler doesn't like null source files.)\n */\n\n/* Arithmetic coding is unsupported for legal reasons.  Complaints to IBM. */\n\n/* Capability options common to encoder and decoder: */\n\n#define DCT_ISLOW_SUPPORTED\t/* slow but accurate integer algorithm */\n#define DCT_IFAST_SUPPORTED\t/* faster, less accurate integer method */\n#define DCT_FLOAT_SUPPORTED\t/* floating-point: accurate, fast on fast HW */\n\n/* Encoder capability options: */\n\n#undef  C_ARITH_CODING_SUPPORTED    /* Arithmetic coding back end? */\n#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */\n#define C_PROGRESSIVE_SUPPORTED\t    /* Progressive JPEG? (Requires MULTISCAN)*/\n#define ENTROPY_OPT_SUPPORTED\t    /* Optimization of entropy coding parms? */\n/* Note: if you selected 12-bit data precision, it is dangerous to turn off\n * ENTROPY_OPT_SUPPORTED.  The standard Huffman tables are only good for 8-bit\n * precision, so jchuff.c normally uses entropy optimization to compute\n * usable tables for higher precision.  If you don't want to do optimization,\n * you'll have to supply different default Huffman tables.\n * The exact same statements apply for progressive JPEG: the default tables\n * don't work for progressive mode.  (This may get fixed, however.)\n */\n#define INPUT_SMOOTHING_SUPPORTED   /* Input image smoothing option? */\n\n/* Decoder capability options: */\n\n#undef  D_ARITH_CODING_SUPPORTED    /* Arithmetic coding back end? */\n#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */\n#define D_PROGRESSIVE_SUPPORTED\t    /* Progressive JPEG? (Requires MULTISCAN)*/\n#define SAVE_MARKERS_SUPPORTED\t    /* jpeg_save_markers() needed? */\n#define BLOCK_SMOOTHING_SUPPORTED   /* Block smoothing? (Progressive only) */\n#define IDCT_SCALING_SUPPORTED\t    /* Output rescaling via IDCT? */\n#undef  UPSAMPLE_SCALING_SUPPORTED  /* Output rescaling at upsample stage? */\n#define UPSAMPLE_MERGING_SUPPORTED  /* Fast path for sloppy upsampling? */\n#define QUANT_1PASS_SUPPORTED\t    /* 1-pass color quantization? */\n#define QUANT_2PASS_SUPPORTED\t    /* 2-pass color quantization? */\n\n/* more capability options later, no doubt */\n\n\n/*\n * Ordering of RGB data in scanlines passed to or from the application.\n * If your application wants to deal with data in the order B,G,R, just\n * change these macros.  You can also deal with formats such as R,G,B,X\n * (one extra byte per pixel) by changing RGB_PIXELSIZE.  Note that changing\n * the offsets will also change the order in which colormap data is organized.\n * RESTRICTIONS:\n * 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats.\n * 2. These macros only affect RGB<=>YCbCr color conversion, so they are not\n *    useful if you are using JPEG color spaces other than YCbCr or grayscale.\n * 3. The color quantizer modules will not behave desirably if RGB_PIXELSIZE\n *    is not 3 (they don't understand about dummy color components!).  So you\n *    can't use color quantization if you change that value.\n */\n\n#define RGB_RED\t\t0\t/* Offset of Red in an RGB scanline element */\n#define RGB_GREEN\t1\t/* Offset of Green */\n#define RGB_BLUE\t2\t/* Offset of Blue */\n#define RGB_PIXELSIZE\t3\t/* JSAMPLEs per RGB scanline element */\n\n\n/* Definitions for speed-related optimizations. */\n\n\n/* If your compiler supports inline functions, define INLINE\n * as the inline keyword; otherwise define it as empty.\n */\n\n#ifndef INLINE\n#ifdef __GNUC__\t\t\t/* for instance, GNU C knows about inline */\n#define INLINE __inline__\n#endif\n#ifndef INLINE\n#define INLINE\t\t\t/* default is to define it as empty */\n#endif\n#endif\n\n\n/* On some machines (notably 68000 series) \"int\" is 32 bits, but multiplying\n * two 16-bit shorts is faster than multiplying two ints.  Define MULTIPLIER\n * as short on such a machine.  MULTIPLIER must be at least 16 bits wide.\n */\n\n#ifndef MULTIPLIER\n#define MULTIPLIER  int\t\t/* type for fastest integer multiply */\n#endif\n\n\n/* FAST_FLOAT should be either float or double, whichever is done faster\n * by your compiler.  (Note that this type is only used in the floating point\n * DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.)\n * Typically, float is faster in ANSI C compilers, while double is faster in\n * pre-ANSI compilers (because they insist on converting to double anyway).\n * The code below therefore chooses float if we have ANSI-style prototypes.\n */\n\n#ifndef FAST_FLOAT\n#ifdef HAVE_PROTOTYPES\n#define FAST_FLOAT  float\n#else\n#define FAST_FLOAT  double\n#endif\n#endif\n\n#endif /* JPEG_INTERNAL_OPTIONS */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jpegint.h",
    "content": "/*\n * jpegint.h\n *\n * Copyright (C) 1991-1997, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file provides common declarations for the various JPEG modules.\n * These declarations are considered internal to the JPEG library; most\n * applications using the library shouldn't need to include this file.\n */\n\n\n/* Declarations for both compression & decompression */\n\ntypedef enum {\t\t\t/* Operating modes for buffer controllers */\n\tJBUF_PASS_THRU,\t\t/* Plain stripwise operation */\n\t/* Remaining modes require a full-image buffer to have been created */\n\tJBUF_SAVE_SOURCE,\t/* Run source subobject only, save output */\n\tJBUF_CRANK_DEST,\t/* Run dest subobject only, using saved data */\n\tJBUF_SAVE_AND_PASS\t/* Run both subobjects, save output */\n} J_BUF_MODE;\n\n/* Values of global_state field (jdapi.c has some dependencies on ordering!) */\n#define CSTATE_START\t100\t/* after create_compress */\n#define CSTATE_SCANNING\t101\t/* start_compress done, write_scanlines OK */\n#define CSTATE_RAW_OK\t102\t/* start_compress done, write_raw_data OK */\n#define CSTATE_WRCOEFS\t103\t/* jpeg_write_coefficients done */\n#define DSTATE_START\t200\t/* after create_decompress */\n#define DSTATE_INHEADER\t201\t/* reading header markers, no SOS yet */\n#define DSTATE_READY\t202\t/* found SOS, ready for start_decompress */\n#define DSTATE_PRELOAD\t203\t/* reading multiscan file in start_decompress*/\n#define DSTATE_PRESCAN\t204\t/* performing dummy pass for 2-pass quant */\n#define DSTATE_SCANNING\t205\t/* start_decompress done, read_scanlines OK */\n#define DSTATE_RAW_OK\t206\t/* start_decompress done, read_raw_data OK */\n#define DSTATE_BUFIMAGE\t207\t/* expecting jpeg_start_output */\n#define DSTATE_BUFPOST\t208\t/* looking for SOS/EOI in jpeg_finish_output */\n#define DSTATE_RDCOEFS\t209\t/* reading file in jpeg_read_coefficients */\n#define DSTATE_STOPPING\t210\t/* looking for EOI in jpeg_finish_decompress */\n\n\n/* Declarations for compression modules */\n\n/* Master control module */\nstruct jpeg_comp_master {\n  JMETHOD(void, prepare_for_pass, (j_compress_ptr cinfo));\n  JMETHOD(void, pass_startup, (j_compress_ptr cinfo));\n  JMETHOD(void, finish_pass, (j_compress_ptr cinfo));\n\n  /* State variables made visible to other modules */\n  boolean call_pass_startup;\t/* True if pass_startup must be called */\n  boolean is_last_pass;\t\t/* True during last pass */\n};\n\n/* Main buffer control (downsampled-data buffer) */\nstruct jpeg_c_main_controller {\n  JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));\n  JMETHOD(void, process_data, (j_compress_ptr cinfo,\n\t\t\t       JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,\n\t\t\t       JDIMENSION in_rows_avail));\n};\n\n/* Compression preprocessing (downsampling input buffer control) */\nstruct jpeg_c_prep_controller {\n  JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));\n  JMETHOD(void, pre_process_data, (j_compress_ptr cinfo,\n\t\t\t\t   JSAMPARRAY input_buf,\n\t\t\t\t   JDIMENSION *in_row_ctr,\n\t\t\t\t   JDIMENSION in_rows_avail,\n\t\t\t\t   JSAMPIMAGE output_buf,\n\t\t\t\t   JDIMENSION *out_row_group_ctr,\n\t\t\t\t   JDIMENSION out_row_groups_avail));\n};\n\n/* Coefficient buffer control */\nstruct jpeg_c_coef_controller {\n  JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));\n  JMETHOD(boolean, compress_data, (j_compress_ptr cinfo,\n\t\t\t\t   JSAMPIMAGE input_buf));\n};\n\n/* Colorspace conversion */\nstruct jpeg_color_converter {\n  JMETHOD(void, start_pass, (j_compress_ptr cinfo));\n  JMETHOD(void, color_convert, (j_compress_ptr cinfo,\n\t\t\t\tJSAMPARRAY input_buf, JSAMPIMAGE output_buf,\n\t\t\t\tJDIMENSION output_row, int num_rows));\n};\n\n/* Downsampling */\nstruct jpeg_downsampler {\n  JMETHOD(void, start_pass, (j_compress_ptr cinfo));\n  JMETHOD(void, downsample, (j_compress_ptr cinfo,\n\t\t\t     JSAMPIMAGE input_buf, JDIMENSION in_row_index,\n\t\t\t     JSAMPIMAGE output_buf,\n\t\t\t     JDIMENSION out_row_group_index));\n\n  boolean need_context_rows;\t/* TRUE if need rows above & below */\n};\n\n/* Forward DCT (also controls coefficient quantization) */\nstruct jpeg_forward_dct {\n  JMETHOD(void, start_pass, (j_compress_ptr cinfo));\n  /* perhaps this should be an array??? */\n  JMETHOD(void, forward_DCT, (j_compress_ptr cinfo,\n\t\t\t      jpeg_component_info * compptr,\n\t\t\t      JSAMPARRAY sample_data, JBLOCKROW coef_blocks,\n\t\t\t      JDIMENSION start_row, JDIMENSION start_col,\n\t\t\t      JDIMENSION num_blocks));\n};\n\n/* Entropy encoding */\nstruct jpeg_entropy_encoder {\n  JMETHOD(void, start_pass, (j_compress_ptr cinfo, boolean gather_statistics));\n  JMETHOD(boolean, encode_mcu, (j_compress_ptr cinfo, JBLOCKROW *MCU_data));\n  JMETHOD(void, finish_pass, (j_compress_ptr cinfo));\n};\n\n/* Marker writing */\nstruct jpeg_marker_writer {\n  JMETHOD(void, write_file_header, (j_compress_ptr cinfo));\n  JMETHOD(void, write_frame_header, (j_compress_ptr cinfo));\n  JMETHOD(void, write_scan_header, (j_compress_ptr cinfo));\n  JMETHOD(void, write_file_trailer, (j_compress_ptr cinfo));\n  JMETHOD(void, write_tables_only, (j_compress_ptr cinfo));\n  /* These routines are exported to allow insertion of extra markers */\n  /* Probably only COM and APPn markers should be written this way */\n  JMETHOD(void, write_marker_header, (j_compress_ptr cinfo, int marker,\n\t\t\t\t      unsigned int datalen));\n  JMETHOD(void, write_marker_byte, (j_compress_ptr cinfo, int val));\n};\n\n\n/* Declarations for decompression modules */\n\n/* Master control module */\nstruct jpeg_decomp_master {\n  JMETHOD(void, prepare_for_output_pass, (j_decompress_ptr cinfo));\n  JMETHOD(void, finish_output_pass, (j_decompress_ptr cinfo));\n\n  /* State variables made visible to other modules */\n  boolean is_dummy_pass;\t/* True during 1st pass for 2-pass quant */\n};\n\n/* Input control module */\nstruct jpeg_input_controller {\n  JMETHOD(int, consume_input, (j_decompress_ptr cinfo));\n  JMETHOD(void, reset_input_controller, (j_decompress_ptr cinfo));\n  JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo));\n  JMETHOD(void, finish_input_pass, (j_decompress_ptr cinfo));\n\n  /* State variables made visible to other modules */\n  boolean has_multiple_scans;\t/* True if file has multiple scans */\n  boolean eoi_reached;\t\t/* True when EOI has been consumed */\n};\n\n/* Main buffer control (downsampled-data buffer) */\nstruct jpeg_d_main_controller {\n  JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode));\n  JMETHOD(void, process_data, (j_decompress_ptr cinfo,\n\t\t\t       JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,\n\t\t\t       JDIMENSION out_rows_avail));\n};\n\n/* Coefficient buffer control */\nstruct jpeg_d_coef_controller {\n  JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo));\n  JMETHOD(int, consume_data, (j_decompress_ptr cinfo));\n  JMETHOD(void, start_output_pass, (j_decompress_ptr cinfo));\n  JMETHOD(int, decompress_data, (j_decompress_ptr cinfo,\n\t\t\t\t JSAMPIMAGE output_buf));\n  /* Pointer to array of coefficient virtual arrays, or NULL if none */\n  jvirt_barray_ptr *coef_arrays;\n};\n\n/* Decompression postprocessing (color quantization buffer control) */\nstruct jpeg_d_post_controller {\n  JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode));\n  JMETHOD(void, post_process_data, (j_decompress_ptr cinfo,\n\t\t\t\t    JSAMPIMAGE input_buf,\n\t\t\t\t    JDIMENSION *in_row_group_ctr,\n\t\t\t\t    JDIMENSION in_row_groups_avail,\n\t\t\t\t    JSAMPARRAY output_buf,\n\t\t\t\t    JDIMENSION *out_row_ctr,\n\t\t\t\t    JDIMENSION out_rows_avail));\n};\n\n/* Marker reading & parsing */\nstruct jpeg_marker_reader {\n  JMETHOD(void, reset_marker_reader, (j_decompress_ptr cinfo));\n  /* Read markers until SOS or EOI.\n   * Returns same codes as are defined for jpeg_consume_input:\n   * JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI.\n   */\n  JMETHOD(int, read_markers, (j_decompress_ptr cinfo));\n  /* Read a restart marker --- exported for use by entropy decoder only */\n  jpeg_marker_parser_method read_restart_marker;\n\n  /* State of marker reader --- nominally internal, but applications\n   * supplying COM or APPn handlers might like to know the state.\n   */\n  boolean saw_SOI;\t\t/* found SOI? */\n  boolean saw_SOF;\t\t/* found SOF? */\n  int next_restart_num;\t\t/* next restart number expected (0-7) */\n  unsigned int discarded_bytes;\t/* # of bytes skipped looking for a marker */\n};\n\n/* Entropy decoding */\nstruct jpeg_entropy_decoder {\n  JMETHOD(void, start_pass, (j_decompress_ptr cinfo));\n  JMETHOD(boolean, decode_mcu, (j_decompress_ptr cinfo,\n\t\t\t\tJBLOCKROW *MCU_data));\n\n  /* This is here to share code between baseline and progressive decoders; */\n  /* other modules probably should not use it */\n  boolean insufficient_data;\t/* set TRUE after emitting warning */\n};\n\n/* Inverse DCT (also performs dequantization) */\ntypedef JMETHOD(void, inverse_DCT_method_ptr,\n\t\t(j_decompress_ptr cinfo, jpeg_component_info * compptr,\n\t\t JCOEFPTR coef_block,\n\t\t JSAMPARRAY output_buf, JDIMENSION output_col));\n\nstruct jpeg_inverse_dct {\n  JMETHOD(void, start_pass, (j_decompress_ptr cinfo));\n  /* It is useful to allow each component to have a separate IDCT method. */\n  inverse_DCT_method_ptr inverse_DCT[MAX_COMPONENTS];\n};\n\n/* Upsampling (note that upsampler must also call color converter) */\nstruct jpeg_upsampler {\n  JMETHOD(void, start_pass, (j_decompress_ptr cinfo));\n  JMETHOD(void, upsample, (j_decompress_ptr cinfo,\n\t\t\t   JSAMPIMAGE input_buf,\n\t\t\t   JDIMENSION *in_row_group_ctr,\n\t\t\t   JDIMENSION in_row_groups_avail,\n\t\t\t   JSAMPARRAY output_buf,\n\t\t\t   JDIMENSION *out_row_ctr,\n\t\t\t   JDIMENSION out_rows_avail));\n\n  boolean need_context_rows;\t/* TRUE if need rows above & below */\n};\n\n/* Colorspace conversion */\nstruct jpeg_color_deconverter {\n  JMETHOD(void, start_pass, (j_decompress_ptr cinfo));\n  JMETHOD(void, color_convert, (j_decompress_ptr cinfo,\n\t\t\t\tJSAMPIMAGE input_buf, JDIMENSION input_row,\n\t\t\t\tJSAMPARRAY output_buf, int num_rows));\n};\n\n/* Color quantization or color precision reduction */\nstruct jpeg_color_quantizer {\n  JMETHOD(void, start_pass, (j_decompress_ptr cinfo, boolean is_pre_scan));\n  JMETHOD(void, color_quantize, (j_decompress_ptr cinfo,\n\t\t\t\t JSAMPARRAY input_buf, JSAMPARRAY output_buf,\n\t\t\t\t int num_rows));\n  JMETHOD(void, finish_pass, (j_decompress_ptr cinfo));\n  JMETHOD(void, new_color_map, (j_decompress_ptr cinfo));\n};\n\n\n/* Miscellaneous useful macros */\n\n#undef MAX\n#define MAX(a,b)\t((a) > (b) ? (a) : (b))\n#undef MIN\n#define MIN(a,b)\t((a) < (b) ? (a) : (b))\n\n\n/* We assume that right shift corresponds to signed division by 2 with\n * rounding towards minus infinity.  This is correct for typical \"arithmetic\n * shift\" instructions that shift in copies of the sign bit.  But some\n * C compilers implement >> with an unsigned shift.  For these machines you\n * must define RIGHT_SHIFT_IS_UNSIGNED.\n * RIGHT_SHIFT provides a proper signed right shift of an INT32 quantity.\n * It is only applied with constant shift counts.  SHIFT_TEMPS must be\n * included in the variables of any routine using RIGHT_SHIFT.\n */\n\n#ifdef RIGHT_SHIFT_IS_UNSIGNED\n#define SHIFT_TEMPS\tINT32 shift_temp;\n#define RIGHT_SHIFT(x,shft)  \\\n\t((shift_temp = (x)) < 0 ? \\\n\t (shift_temp >> (shft)) | ((~((INT32) 0)) << (32-(shft))) : \\\n\t (shift_temp >> (shft)))\n#else\n#define SHIFT_TEMPS\n#define RIGHT_SHIFT(x,shft)\t((x) >> (shft))\n#endif\n\n\n/* Short forms of external names for systems with brain-damaged linkers. */\n\n#ifdef NEED_SHORT_EXTERNAL_NAMES\n#define jinit_compress_master\tjICompress\n#define jinit_c_master_control\tjICMaster\n#define jinit_c_main_controller\tjICMainC\n#define jinit_c_prep_controller\tjICPrepC\n#define jinit_c_coef_controller\tjICCoefC\n#define jinit_color_converter\tjICColor\n#define jinit_downsampler\tjIDownsampler\n#define jinit_forward_dct\tjIFDCT\n#define jinit_huff_encoder\tjIHEncoder\n#define jinit_phuff_encoder\tjIPHEncoder\n#define jinit_marker_writer\tjIMWriter\n#define jinit_master_decompress\tjIDMaster\n#define jinit_d_main_controller\tjIDMainC\n#define jinit_d_coef_controller\tjIDCoefC\n#define jinit_d_post_controller\tjIDPostC\n#define jinit_input_controller\tjIInCtlr\n#define jinit_marker_reader\tjIMReader\n#define jinit_huff_decoder\tjIHDecoder\n#define jinit_phuff_decoder\tjIPHDecoder\n#define jinit_inverse_dct\tjIIDCT\n#define jinit_upsampler\t\tjIUpsampler\n#define jinit_color_deconverter\tjIDColor\n#define jinit_1pass_quantizer\tjI1Quant\n#define jinit_2pass_quantizer\tjI2Quant\n#define jinit_merged_upsampler\tjIMUpsampler\n#define jinit_memory_mgr\tjIMemMgr\n#define jdiv_round_up\t\tjDivRound\n#define jround_up\t\tjRound\n#define jcopy_sample_rows\tjCopySamples\n#define jcopy_block_row\t\tjCopyBlocks\n#define jzero_far\t\tjZeroFar\n#define jpeg_zigzag_order\tjZIGTable\n#define jpeg_natural_order\tjZAGTable\n#endif /* NEED_SHORT_EXTERNAL_NAMES */\n\n\n/* Compression module initialization routines */\nEXTERN(void) jinit_compress_master JPP((j_compress_ptr cinfo));\nEXTERN(void) jinit_c_master_control JPP((j_compress_ptr cinfo,\n\t\t\t\t\t boolean transcode_only));\nEXTERN(void) jinit_c_main_controller JPP((j_compress_ptr cinfo,\n\t\t\t\t\t  boolean need_full_buffer));\nEXTERN(void) jinit_c_prep_controller JPP((j_compress_ptr cinfo,\n\t\t\t\t\t  boolean need_full_buffer));\nEXTERN(void) jinit_c_coef_controller JPP((j_compress_ptr cinfo,\n\t\t\t\t\t  boolean need_full_buffer));\nEXTERN(void) jinit_color_converter JPP((j_compress_ptr cinfo));\nEXTERN(void) jinit_downsampler JPP((j_compress_ptr cinfo));\nEXTERN(void) jinit_forward_dct JPP((j_compress_ptr cinfo));\nEXTERN(void) jinit_huff_encoder JPP((j_compress_ptr cinfo));\nEXTERN(void) jinit_phuff_encoder JPP((j_compress_ptr cinfo));\nEXTERN(void) jinit_marker_writer JPP((j_compress_ptr cinfo));\n/* Decompression module initialization routines */\nEXTERN(void) jinit_master_decompress JPP((j_decompress_ptr cinfo));\nEXTERN(void) jinit_d_main_controller JPP((j_decompress_ptr cinfo,\n\t\t\t\t\t  boolean need_full_buffer));\nEXTERN(void) jinit_d_coef_controller JPP((j_decompress_ptr cinfo,\n\t\t\t\t\t  boolean need_full_buffer));\nEXTERN(void) jinit_d_post_controller JPP((j_decompress_ptr cinfo,\n\t\t\t\t\t  boolean need_full_buffer));\nEXTERN(void) jinit_input_controller JPP((j_decompress_ptr cinfo));\nEXTERN(void) jinit_marker_reader JPP((j_decompress_ptr cinfo));\nEXTERN(void) jinit_huff_decoder JPP((j_decompress_ptr cinfo));\nEXTERN(void) jinit_phuff_decoder JPP((j_decompress_ptr cinfo));\nEXTERN(void) jinit_inverse_dct JPP((j_decompress_ptr cinfo));\nEXTERN(void) jinit_upsampler JPP((j_decompress_ptr cinfo));\nEXTERN(void) jinit_color_deconverter JPP((j_decompress_ptr cinfo));\nEXTERN(void) jinit_1pass_quantizer JPP((j_decompress_ptr cinfo));\nEXTERN(void) jinit_2pass_quantizer JPP((j_decompress_ptr cinfo));\nEXTERN(void) jinit_merged_upsampler JPP((j_decompress_ptr cinfo));\n/* Memory manager initialization */\nEXTERN(void) jinit_memory_mgr JPP((j_common_ptr cinfo));\n\n/* Utility routines in jutils.c */\nEXTERN(long) jdiv_round_up JPP((long a, long b));\nEXTERN(long) jround_up JPP((long a, long b));\nEXTERN(void) jcopy_sample_rows JPP((JSAMPARRAY input_array, int source_row,\n\t\t\t\t    JSAMPARRAY output_array, int dest_row,\n\t\t\t\t    int num_rows, JDIMENSION num_cols));\nEXTERN(void) jcopy_block_row JPP((JBLOCKROW input_row, JBLOCKROW output_row,\n\t\t\t\t  JDIMENSION num_blocks));\nEXTERN(void) jzero_far JPP((void FAR * target, size_t bytestozero));\n/* Constant tables in jutils.c */\n#if 0\t\t\t\t/* This table is not actually needed in v6a */\nextern const int jpeg_zigzag_order[]; /* natural coef order to zigzag order */\n#endif\nextern const int jpeg_natural_order[]; /* zigzag coef order to natural order */\n\n/* Suppress undefined-structure complaints if necessary. */\n\n#ifdef INCOMPLETE_TYPES_BROKEN\n#ifndef AM_MEMORY_MANAGER\t/* only jmemmgr.c defines these */\nstruct jvirt_sarray_control { long dummy; };\nstruct jvirt_barray_control { long dummy; };\n#endif\n#endif /* INCOMPLETE_TYPES_BROKEN */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jpeglib.h",
    "content": "/*\n * jpeglib.h\n *\n * Copyright (C) 1991-1998, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file defines the application interface for the JPEG library.\n * Most applications using the library need only include this file,\n * and perhaps jerror.h if they want to know the exact error codes.\n */\n\n#ifndef JPEGLIB_H\n#define JPEGLIB_H\n\n/*\n * First we include the configuration files that record how this\n * installation of the JPEG library is set up.  jconfig.h can be\n * generated automatically for many systems.  jmorecfg.h contains\n * manual configuration options that most people need not worry about.\n */\n\n#ifndef JCONFIG_INCLUDED\t/* in case jinclude.h already did */\n#include \"jconfig.h\"\t\t/* widely used configuration options */\n#endif\n#include \"jmorecfg.h\"\t\t/* seldom changed options */\n\n\n/* Version ID for the JPEG library.\n * Might be useful for tests like \"#if JPEG_LIB_VERSION >= 60\".\n */\n\n#define JPEG_LIB_VERSION  62\t/* Version 6b */\n\n\n/* Various constants determining the sizes of things.\n * All of these are specified by the JPEG standard, so don't change them\n * if you want to be compatible.\n */\n\n#define DCTSIZE\t\t    8\t/* The basic DCT block is 8x8 samples */\n#define DCTSIZE2\t    64\t/* DCTSIZE squared; # of elements in a block */\n#define NUM_QUANT_TBLS      4\t/* Quantization tables are numbered 0..3 */\n#define NUM_HUFF_TBLS       4\t/* Huffman tables are numbered 0..3 */\n#define NUM_ARITH_TBLS      16\t/* Arith-coding tables are numbered 0..15 */\n#define MAX_COMPS_IN_SCAN   4\t/* JPEG limit on # of components in one scan */\n#define MAX_SAMP_FACTOR     4\t/* JPEG limit on sampling factors */\n/* Unfortunately, some bozo at Adobe saw no reason to be bound by the standard;\n * the PostScript DCT filter can emit files with many more than 10 blocks/MCU.\n * If you happen to run across such a file, you can up D_MAX_BLOCKS_IN_MCU\n * to handle it.  We even let you do this from the jconfig.h file.  However,\n * we strongly discourage changing C_MAX_BLOCKS_IN_MCU; just because Adobe\n * sometimes emits noncompliant files doesn't mean you should too.\n */\n#define C_MAX_BLOCKS_IN_MCU   10 /* compressor's limit on blocks per MCU */\n#ifndef D_MAX_BLOCKS_IN_MCU\n#define D_MAX_BLOCKS_IN_MCU   10 /* decompressor's limit on blocks per MCU */\n#endif\n\n\n/* Data structures for images (arrays of samples and of DCT coefficients).\n * On 80x86 machines, the image arrays are too big for near pointers,\n * but the pointer arrays can fit in near memory.\n */\n\ntypedef JSAMPLE FAR *JSAMPROW;\t/* ptr to one image row of pixel samples. */\ntypedef JSAMPROW *JSAMPARRAY;\t/* ptr to some rows (a 2-D sample array) */\ntypedef JSAMPARRAY *JSAMPIMAGE;\t/* a 3-D sample array: top index is color */\n\ntypedef JCOEF JBLOCK[DCTSIZE2];\t/* one block of coefficients */\ntypedef JBLOCK FAR *JBLOCKROW;\t/* pointer to one row of coefficient blocks */\ntypedef JBLOCKROW *JBLOCKARRAY;\t\t/* a 2-D array of coefficient blocks */\ntypedef JBLOCKARRAY *JBLOCKIMAGE;\t/* a 3-D array of coefficient blocks */\n\ntypedef JCOEF FAR *JCOEFPTR;\t/* useful in a couple of places */\n\n\n/* Types for JPEG compression parameters and working tables. */\n\n\n/* DCT coefficient quantization tables. */\n\ntypedef struct {\n  /* This array gives the coefficient quantizers in natural array order\n   * (not the zigzag order in which they are stored in a JPEG DQT marker).\n   * CAUTION: IJG versions prior to v6a kept this array in zigzag order.\n   */\n  UINT16 quantval[DCTSIZE2];\t/* quantization step for each coefficient */\n  /* This field is used only during compression.  It's initialized FALSE when\n   * the table is created, and set TRUE when it's been output to the file.\n   * You could suppress output of a table by setting this to TRUE.\n   * (See jpeg_suppress_tables for an example.)\n   */\n  boolean sent_table;\t\t/* TRUE when table has been output */\n} JQUANT_TBL;\n\n\n/* Huffman coding tables. */\n\ntypedef struct {\n  /* These two fields directly represent the contents of a JPEG DHT marker */\n  UINT8 bits[17];\t\t/* bits[k] = # of symbols with codes of */\n\t\t\t\t/* length k bits; bits[0] is unused */\n  UINT8 huffval[256];\t\t/* The symbols, in order of incr code length */\n  /* This field is used only during compression.  It's initialized FALSE when\n   * the table is created, and set TRUE when it's been output to the file.\n   * You could suppress output of a table by setting this to TRUE.\n   * (See jpeg_suppress_tables for an example.)\n   */\n  boolean sent_table;\t\t/* TRUE when table has been output */\n} JHUFF_TBL;\n\n\n/* Basic info about one component (color channel). */\n\ntypedef struct {\n  /* These values are fixed over the whole image. */\n  /* For compression, they must be supplied by parameter setup; */\n  /* for decompression, they are read from the SOF marker. */\n  int component_id;\t\t/* identifier for this component (0..255) */\n  int component_index;\t\t/* its index in SOF or cinfo->comp_info[] */\n  int h_samp_factor;\t\t/* horizontal sampling factor (1..4) */\n  int v_samp_factor;\t\t/* vertical sampling factor (1..4) */\n  int quant_tbl_no;\t\t/* quantization table selector (0..3) */\n  /* These values may vary between scans. */\n  /* For compression, they must be supplied by parameter setup; */\n  /* for decompression, they are read from the SOS marker. */\n  /* The decompressor output side may not use these variables. */\n  int dc_tbl_no;\t\t/* DC entropy table selector (0..3) */\n  int ac_tbl_no;\t\t/* AC entropy table selector (0..3) */\n  \n  /* Remaining fields should be treated as private by applications. */\n  \n  /* These values are computed during compression or decompression startup: */\n  /* Component's size in DCT blocks.\n   * Any dummy blocks added to complete an MCU are not counted; therefore\n   * these values do not depend on whether a scan is interleaved or not.\n   */\n  JDIMENSION width_in_blocks;\n  JDIMENSION height_in_blocks;\n  /* Size of a DCT block in samples.  Always DCTSIZE for compression.\n   * For decompression this is the size of the output from one DCT block,\n   * reflecting any scaling we choose to apply during the IDCT step.\n   * Values of 1,2,4,8 are likely to be supported.  Note that different\n   * components may receive different IDCT scalings.\n   */\n  int DCT_scaled_size;\n  /* The downsampled dimensions are the component's actual, unpadded number\n   * of samples at the main buffer (preprocessing/compression interface), thus\n   * downsampled_width = ceil(image_width * Hi/Hmax)\n   * and similarly for height.  For decompression, IDCT scaling is included, so\n   * downsampled_width = ceil(image_width * Hi/Hmax * DCT_scaled_size/DCTSIZE)\n   */\n  JDIMENSION downsampled_width;\t /* actual width in samples */\n  JDIMENSION downsampled_height; /* actual height in samples */\n  /* This flag is used only for decompression.  In cases where some of the\n   * components will be ignored (eg grayscale output from YCbCr image),\n   * we can skip most computations for the unused components.\n   */\n  boolean component_needed;\t/* do we need the value of this component? */\n\n  /* These values are computed before starting a scan of the component. */\n  /* The decompressor output side may not use these variables. */\n  int MCU_width;\t\t/* number of blocks per MCU, horizontally */\n  int MCU_height;\t\t/* number of blocks per MCU, vertically */\n  int MCU_blocks;\t\t/* MCU_width * MCU_height */\n  int MCU_sample_width;\t\t/* MCU width in samples, MCU_width*DCT_scaled_size */\n  int last_col_width;\t\t/* # of non-dummy blocks across in last MCU */\n  int last_row_height;\t\t/* # of non-dummy blocks down in last MCU */\n\n  /* Saved quantization table for component; NULL if none yet saved.\n   * See jdinput.c comments about the need for this information.\n   * This field is currently used only for decompression.\n   */\n  JQUANT_TBL * quant_table;\n\n  /* Private per-component storage for DCT or IDCT subsystem. */\n  void * dct_table;\n} jpeg_component_info;\n\n\n/* The script for encoding a multiple-scan file is an array of these: */\n\ntypedef struct {\n  int comps_in_scan;\t\t/* number of components encoded in this scan */\n  int component_index[MAX_COMPS_IN_SCAN]; /* their SOF/comp_info[] indexes */\n  int Ss, Se;\t\t\t/* progressive JPEG spectral selection parms */\n  int Ah, Al;\t\t\t/* progressive JPEG successive approx. parms */\n} jpeg_scan_info;\n\n/* The decompressor can save APPn and COM markers in a list of these: */\n\ntypedef struct jpeg_marker_struct FAR * jpeg_saved_marker_ptr;\n\nstruct jpeg_marker_struct {\n  jpeg_saved_marker_ptr next;\t/* next in list, or NULL */\n  UINT8 marker;\t\t\t/* marker code: JPEG_COM, or JPEG_APP0+n */\n  unsigned int original_length;\t/* # bytes of data in the file */\n  unsigned int data_length;\t/* # bytes of data saved at data[] */\n  JOCTET FAR * data;\t\t/* the data contained in the marker */\n  /* the marker length word is not counted in data_length or original_length */\n};\n\n/* Known color spaces. */\n\ntypedef enum {\n\tJCS_UNKNOWN,\t\t/* error/unspecified */\n\tJCS_GRAYSCALE,\t\t/* monochrome */\n\tJCS_RGB,\t\t/* red/green/blue */\n\tJCS_YCbCr,\t\t/* Y/Cb/Cr (also known as YUV) */\n\tJCS_CMYK,\t\t/* C/M/Y/K */\n\tJCS_YCCK\t\t/* Y/Cb/Cr/K */\n} J_COLOR_SPACE;\n\n/* DCT/IDCT algorithm options. */\n\ntypedef enum {\n\tJDCT_ISLOW,\t\t/* slow but accurate integer algorithm */\n\tJDCT_IFAST,\t\t/* faster, less accurate integer method */\n\tJDCT_FLOAT\t\t/* floating-point: accurate, fast on fast HW */\n} J_DCT_METHOD;\n\n#ifndef JDCT_DEFAULT\t\t/* may be overridden in jconfig.h */\n#define JDCT_DEFAULT  JDCT_ISLOW\n#endif\n#ifndef JDCT_FASTEST\t\t/* may be overridden in jconfig.h */\n#define JDCT_FASTEST  JDCT_IFAST\n#endif\n\n/* Dithering options for decompression. */\n\ntypedef enum {\n\tJDITHER_NONE,\t\t/* no dithering */\n\tJDITHER_ORDERED,\t/* simple ordered dither */\n\tJDITHER_FS\t\t/* Floyd-Steinberg error diffusion dither */\n} J_DITHER_MODE;\n\n\n/* Common fields between JPEG compression and decompression master structs. */\n\n#define jpeg_common_fields \\\n  struct jpeg_error_mgr * err;\t/* Error handler module */\\\n  struct jpeg_memory_mgr * mem;\t/* Memory manager module */\\\n  struct jpeg_progress_mgr * progress; /* Progress monitor, or NULL if none */\\\n  void * client_data;\t\t/* Available for use by application */\\\n  boolean is_decompressor;\t/* So common code can tell which is which */\\\n  int global_state\t\t/* For checking call sequence validity */\n\n/* Routines that are to be used by both halves of the library are declared\n * to receive a pointer to this structure.  There are no actual instances of\n * jpeg_common_struct, only of jpeg_compress_struct and jpeg_decompress_struct.\n */\nstruct jpeg_common_struct {\n  jpeg_common_fields;\t\t/* Fields common to both master struct types */\n  /* Additional fields follow in an actual jpeg_compress_struct or\n   * jpeg_decompress_struct.  All three structs must agree on these\n   * initial fields!  (This would be a lot cleaner in C++.)\n   */\n};\n\ntypedef struct jpeg_common_struct * j_common_ptr;\ntypedef struct jpeg_compress_struct * j_compress_ptr;\ntypedef struct jpeg_decompress_struct * j_decompress_ptr;\n\n\n/* Master record for a compression instance */\n\nstruct jpeg_compress_struct {\n  jpeg_common_fields;\t\t/* Fields shared with jpeg_decompress_struct */\n\n  /* Destination for compressed data */\n  struct jpeg_destination_mgr * dest;\n\n  /* Description of source image --- these fields must be filled in by\n   * outer application before starting compression.  in_color_space must\n   * be correct before you can even call jpeg_set_defaults().\n   */\n\n  JDIMENSION image_width;\t/* input image width */\n  JDIMENSION image_height;\t/* input image height */\n  int input_components;\t\t/* # of color components in input image */\n  J_COLOR_SPACE in_color_space;\t/* colorspace of input image */\n\n  double input_gamma;\t\t/* image gamma of input image */\n\n  /* Compression parameters --- these fields must be set before calling\n   * jpeg_start_compress().  We recommend calling jpeg_set_defaults() to\n   * initialize everything to reasonable defaults, then changing anything\n   * the application specifically wants to change.  That way you won't get\n   * burnt when new parameters are added.  Also note that there are several\n   * helper routines to simplify changing parameters.\n   */\n\n  int data_precision;\t\t/* bits of precision in image data */\n\n  int num_components;\t\t/* # of color components in JPEG image */\n  J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */\n\n  jpeg_component_info * comp_info;\n  /* comp_info[i] describes component that appears i'th in SOF */\n  \n  JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS];\n  /* ptrs to coefficient quantization tables, or NULL if not defined */\n  \n  JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS];\n  JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS];\n  /* ptrs to Huffman coding tables, or NULL if not defined */\n  \n  UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */\n  UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */\n  UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */\n\n  int num_scans;\t\t/* # of entries in scan_info array */\n  const jpeg_scan_info * scan_info; /* script for multi-scan file, or NULL */\n  /* The default value of scan_info is NULL, which causes a single-scan\n   * sequential JPEG file to be emitted.  To create a multi-scan file,\n   * set num_scans and scan_info to point to an array of scan definitions.\n   */\n\n  boolean raw_data_in;\t\t/* TRUE=caller supplies downsampled data */\n  boolean arith_code;\t\t/* TRUE=arithmetic coding, FALSE=Huffman */\n  boolean optimize_coding;\t/* TRUE=optimize entropy encoding parms */\n  boolean CCIR601_sampling;\t/* TRUE=first samples are cosited */\n  int smoothing_factor;\t\t/* 1..100, or 0 for no input smoothing */\n  J_DCT_METHOD dct_method;\t/* DCT algorithm selector */\n\n  /* The restart interval can be specified in absolute MCUs by setting\n   * restart_interval, or in MCU rows by setting restart_in_rows\n   * (in which case the correct restart_interval will be figured\n   * for each scan).\n   */\n  unsigned int restart_interval; /* MCUs per restart, or 0 for no restart */\n  int restart_in_rows;\t\t/* if > 0, MCU rows per restart interval */\n\n  /* Parameters controlling emission of special markers. */\n\n  boolean write_JFIF_header;\t/* should a JFIF marker be written? */\n  UINT8 JFIF_major_version;\t/* What to write for the JFIF version number */\n  UINT8 JFIF_minor_version;\n  /* These three values are not used by the JPEG code, merely copied */\n  /* into the JFIF APP0 marker.  density_unit can be 0 for unknown, */\n  /* 1 for dots/inch, or 2 for dots/cm.  Note that the pixel aspect */\n  /* ratio is defined by X_density/Y_density even when density_unit=0. */\n  UINT8 density_unit;\t\t/* JFIF code for pixel size units */\n  UINT16 X_density;\t\t/* Horizontal pixel density */\n  UINT16 Y_density;\t\t/* Vertical pixel density */\n  boolean write_Adobe_marker;\t/* should an Adobe marker be written? */\n  \n  /* State variable: index of next scanline to be written to\n   * jpeg_write_scanlines().  Application may use this to control its\n   * processing loop, e.g., \"while (next_scanline < image_height)\".\n   */\n\n  JDIMENSION next_scanline;\t/* 0 .. image_height-1  */\n\n  /* Remaining fields are known throughout compressor, but generally\n   * should not be touched by a surrounding application.\n   */\n\n  /*\n   * These fields are computed during compression startup\n   */\n  boolean progressive_mode;\t/* TRUE if scan script uses progressive mode */\n  int max_h_samp_factor;\t/* largest h_samp_factor */\n  int max_v_samp_factor;\t/* largest v_samp_factor */\n\n  JDIMENSION total_iMCU_rows;\t/* # of iMCU rows to be input to coef ctlr */\n  /* The coefficient controller receives data in units of MCU rows as defined\n   * for fully interleaved scans (whether the JPEG file is interleaved or not).\n   * There are v_samp_factor * DCTSIZE sample rows of each component in an\n   * \"iMCU\" (interleaved MCU) row.\n   */\n  \n  /*\n   * These fields are valid during any one scan.\n   * They describe the components and MCUs actually appearing in the scan.\n   */\n  int comps_in_scan;\t\t/* # of JPEG components in this scan */\n  jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN];\n  /* *cur_comp_info[i] describes component that appears i'th in SOS */\n  \n  JDIMENSION MCUs_per_row;\t/* # of MCUs across the image */\n  JDIMENSION MCU_rows_in_scan;\t/* # of MCU rows in the image */\n  \n  int blocks_in_MCU;\t\t/* # of DCT blocks per MCU */\n  int MCU_membership[C_MAX_BLOCKS_IN_MCU];\n  /* MCU_membership[i] is index in cur_comp_info of component owning */\n  /* i'th block in an MCU */\n\n  int Ss, Se, Ah, Al;\t\t/* progressive JPEG parameters for scan */\n\n  /*\n   * Links to compression subobjects (methods and private variables of modules)\n   */\n  struct jpeg_comp_master * master;\n  struct jpeg_c_main_controller * main;\n  struct jpeg_c_prep_controller * prep;\n  struct jpeg_c_coef_controller * coef;\n  struct jpeg_marker_writer * marker;\n  struct jpeg_color_converter * cconvert;\n  struct jpeg_downsampler * downsample;\n  struct jpeg_forward_dct * fdct;\n  struct jpeg_entropy_encoder * entropy;\n  jpeg_scan_info * script_space; /* workspace for jpeg_simple_progression */\n  int script_space_size;\n};\n\n\n/* Master record for a decompression instance */\n\nstruct jpeg_decompress_struct {\n  jpeg_common_fields;\t\t/* Fields shared with jpeg_compress_struct */\n\n  /* Source of compressed data */\n  struct jpeg_source_mgr * src;\n\n  /* Basic description of image --- filled in by jpeg_read_header(). */\n  /* Application may inspect these values to decide how to process image. */\n\n  JDIMENSION image_width;\t/* nominal image width (from SOF marker) */\n  JDIMENSION image_height;\t/* nominal image height */\n  int num_components;\t\t/* # of color components in JPEG image */\n  J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */\n\n  /* Decompression processing parameters --- these fields must be set before\n   * calling jpeg_start_decompress().  Note that jpeg_read_header() initializes\n   * them to default values.\n   */\n\n  J_COLOR_SPACE out_color_space; /* colorspace for output */\n\n  unsigned int scale_num, scale_denom; /* fraction by which to scale image */\n\n  double output_gamma;\t\t/* image gamma wanted in output */\n\n  boolean buffered_image;\t/* TRUE=multiple output passes */\n  boolean raw_data_out;\t\t/* TRUE=downsampled data wanted */\n\n  J_DCT_METHOD dct_method;\t/* IDCT algorithm selector */\n  boolean do_fancy_upsampling;\t/* TRUE=apply fancy upsampling */\n  boolean do_block_smoothing;\t/* TRUE=apply interblock smoothing */\n\n  boolean quantize_colors;\t/* TRUE=colormapped output wanted */\n  /* the following are ignored if not quantize_colors: */\n  J_DITHER_MODE dither_mode;\t/* type of color dithering to use */\n  boolean two_pass_quantize;\t/* TRUE=use two-pass color quantization */\n  int desired_number_of_colors;\t/* max # colors to use in created colormap */\n  /* these are significant only in buffered-image mode: */\n  boolean enable_1pass_quant;\t/* enable future use of 1-pass quantizer */\n  boolean enable_external_quant;/* enable future use of external colormap */\n  boolean enable_2pass_quant;\t/* enable future use of 2-pass quantizer */\n\n  /* Description of actual output image that will be returned to application.\n   * These fields are computed by jpeg_start_decompress().\n   * You can also use jpeg_calc_output_dimensions() to determine these values\n   * in advance of calling jpeg_start_decompress().\n   */\n\n  JDIMENSION output_width;\t/* scaled image width */\n  JDIMENSION output_height;\t/* scaled image height */\n  int out_color_components;\t/* # of color components in out_color_space */\n  int output_components;\t/* # of color components returned */\n  /* output_components is 1 (a colormap index) when quantizing colors;\n   * otherwise it equals out_color_components.\n   */\n  int rec_outbuf_height;\t/* min recommended height of scanline buffer */\n  /* If the buffer passed to jpeg_read_scanlines() is less than this many rows\n   * high, space and time will be wasted due to unnecessary data copying.\n   * Usually rec_outbuf_height will be 1 or 2, at most 4.\n   */\n\n  /* When quantizing colors, the output colormap is described by these fields.\n   * The application can supply a colormap by setting colormap non-NULL before\n   * calling jpeg_start_decompress; otherwise a colormap is created during\n   * jpeg_start_decompress or jpeg_start_output.\n   * The map has out_color_components rows and actual_number_of_colors columns.\n   */\n  int actual_number_of_colors;\t/* number of entries in use */\n  JSAMPARRAY colormap;\t\t/* The color map as a 2-D pixel array */\n\n  /* State variables: these variables indicate the progress of decompression.\n   * The application may examine these but must not modify them.\n   */\n\n  /* Row index of next scanline to be read from jpeg_read_scanlines().\n   * Application may use this to control its processing loop, e.g.,\n   * \"while (output_scanline < output_height)\".\n   */\n  JDIMENSION output_scanline;\t/* 0 .. output_height-1  */\n\n  /* Current input scan number and number of iMCU rows completed in scan.\n   * These indicate the progress of the decompressor input side.\n   */\n  int input_scan_number;\t/* Number of SOS markers seen so far */\n  JDIMENSION input_iMCU_row;\t/* Number of iMCU rows completed */\n\n  /* The \"output scan number\" is the notional scan being displayed by the\n   * output side.  The decompressor will not allow output scan/row number\n   * to get ahead of input scan/row, but it can fall arbitrarily far behind.\n   */\n  int output_scan_number;\t/* Nominal scan number being displayed */\n  JDIMENSION output_iMCU_row;\t/* Number of iMCU rows read */\n\n  /* Current progression status.  coef_bits[c][i] indicates the precision\n   * with which component c's DCT coefficient i (in zigzag order) is known.\n   * It is -1 when no data has yet been received, otherwise it is the point\n   * transform (shift) value for the most recent scan of the coefficient\n   * (thus, 0 at completion of the progression).\n   * This pointer is NULL when reading a non-progressive file.\n   */\n  int (*coef_bits)[DCTSIZE2];\t/* -1 or current Al value for each coef */\n\n  /* Internal JPEG parameters --- the application usually need not look at\n   * these fields.  Note that the decompressor output side may not use\n   * any parameters that can change between scans.\n   */\n\n  /* Quantization and Huffman tables are carried forward across input\n   * datastreams when processing abbreviated JPEG datastreams.\n   */\n\n  JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS];\n  /* ptrs to coefficient quantization tables, or NULL if not defined */\n\n  JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS];\n  JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS];\n  /* ptrs to Huffman coding tables, or NULL if not defined */\n\n  /* These parameters are never carried across datastreams, since they\n   * are given in SOF/SOS markers or defined to be reset by SOI.\n   */\n\n  int data_precision;\t\t/* bits of precision in image data */\n\n  jpeg_component_info * comp_info;\n  /* comp_info[i] describes component that appears i'th in SOF */\n\n  boolean progressive_mode;\t/* TRUE if SOFn specifies progressive mode */\n  boolean arith_code;\t\t/* TRUE=arithmetic coding, FALSE=Huffman */\n\n  UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */\n  UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */\n  UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */\n\n  unsigned int restart_interval; /* MCUs per restart interval, or 0 for no restart */\n\n  /* These fields record data obtained from optional markers recognized by\n   * the JPEG library.\n   */\n  boolean saw_JFIF_marker;\t/* TRUE iff a JFIF APP0 marker was found */\n  /* Data copied from JFIF marker; only valid if saw_JFIF_marker is TRUE: */\n  UINT8 JFIF_major_version;\t/* JFIF version number */\n  UINT8 JFIF_minor_version;\n  UINT8 density_unit;\t\t/* JFIF code for pixel size units */\n  UINT16 X_density;\t\t/* Horizontal pixel density */\n  UINT16 Y_density;\t\t/* Vertical pixel density */\n  boolean saw_Adobe_marker;\t/* TRUE iff an Adobe APP14 marker was found */\n  UINT8 Adobe_transform;\t/* Color transform code from Adobe marker */\n\n  boolean CCIR601_sampling;\t/* TRUE=first samples are cosited */\n\n  /* Aside from the specific data retained from APPn markers known to the\n   * library, the uninterpreted contents of any or all APPn and COM markers\n   * can be saved in a list for examination by the application.\n   */\n  jpeg_saved_marker_ptr marker_list; /* Head of list of saved markers */\n\n  /* Remaining fields are known throughout decompressor, but generally\n   * should not be touched by a surrounding application.\n   */\n\n  /*\n   * These fields are computed during decompression startup\n   */\n  int max_h_samp_factor;\t/* largest h_samp_factor */\n  int max_v_samp_factor;\t/* largest v_samp_factor */\n\n  int min_DCT_scaled_size;\t/* smallest DCT_scaled_size of any component */\n\n  JDIMENSION total_iMCU_rows;\t/* # of iMCU rows in image */\n  /* The coefficient controller's input and output progress is measured in\n   * units of \"iMCU\" (interleaved MCU) rows.  These are the same as MCU rows\n   * in fully interleaved JPEG scans, but are used whether the scan is\n   * interleaved or not.  We define an iMCU row as v_samp_factor DCT block\n   * rows of each component.  Therefore, the IDCT output contains\n   * v_samp_factor*DCT_scaled_size sample rows of a component per iMCU row.\n   */\n\n  JSAMPLE * sample_range_limit; /* table for fast range-limiting */\n\n  /*\n   * These fields are valid during any one scan.\n   * They describe the components and MCUs actually appearing in the scan.\n   * Note that the decompressor output side must not use these fields.\n   */\n  int comps_in_scan;\t\t/* # of JPEG components in this scan */\n  jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN];\n  /* *cur_comp_info[i] describes component that appears i'th in SOS */\n\n  JDIMENSION MCUs_per_row;\t/* # of MCUs across the image */\n  JDIMENSION MCU_rows_in_scan;\t/* # of MCU rows in the image */\n\n  int blocks_in_MCU;\t\t/* # of DCT blocks per MCU */\n  int MCU_membership[D_MAX_BLOCKS_IN_MCU];\n  /* MCU_membership[i] is index in cur_comp_info of component owning */\n  /* i'th block in an MCU */\n\n  int Ss, Se, Ah, Al;\t\t/* progressive JPEG parameters for scan */\n\n  /* This field is shared between entropy decoder and marker parser.\n   * It is either zero or the code of a JPEG marker that has been\n   * read from the data source, but has not yet been processed.\n   */\n  int unread_marker;\n\n  /*\n   * Links to decompression subobjects (methods, private variables of modules)\n   */\n  struct jpeg_decomp_master * master;\n  struct jpeg_d_main_controller * main;\n  struct jpeg_d_coef_controller * coef;\n  struct jpeg_d_post_controller * post;\n  struct jpeg_input_controller * inputctl;\n  struct jpeg_marker_reader * marker;\n  struct jpeg_entropy_decoder * entropy;\n  struct jpeg_inverse_dct * idct;\n  struct jpeg_upsampler * upsample;\n  struct jpeg_color_deconverter * cconvert;\n  struct jpeg_color_quantizer * cquantize;\n};\n\n\n/* \"Object\" declarations for JPEG modules that may be supplied or called\n * directly by the surrounding application.\n * As with all objects in the JPEG library, these structs only define the\n * publicly visible methods and state variables of a module.  Additional\n * private fields may exist after the public ones.\n */\n\n\n/* Error handler object */\n\nstruct jpeg_error_mgr {\n  /* Error exit handler: does not return to caller */\n  JMETHOD(void, error_exit, (j_common_ptr cinfo));\n  /* Conditionally emit a trace or warning message */\n  JMETHOD(void, emit_message, (j_common_ptr cinfo, int msg_level));\n  /* Routine that actually outputs a trace or error message */\n  JMETHOD(void, output_message, (j_common_ptr cinfo));\n  /* Format a message string for the most recent JPEG error or message */\n  JMETHOD(void, format_message, (j_common_ptr cinfo, char * buffer));\n#define JMSG_LENGTH_MAX  200\t/* recommended size of format_message buffer */\n  /* Reset error state variables at start of a new image */\n  JMETHOD(void, reset_error_mgr, (j_common_ptr cinfo));\n  \n  /* The message ID code and any parameters are saved here.\n   * A message can have one string parameter or up to 8 int parameters.\n   */\n  int msg_code;\n#define JMSG_STR_PARM_MAX  80\n  union {\n    int i[8];\n    char s[JMSG_STR_PARM_MAX];\n  } msg_parm;\n  \n  /* Standard state variables for error facility */\n  \n  int trace_level;\t\t/* max msg_level that will be displayed */\n  \n  /* For recoverable corrupt-data errors, we emit a warning message,\n   * but keep going unless emit_message chooses to abort.  emit_message\n   * should count warnings in num_warnings.  The surrounding application\n   * can check for bad data by seeing if num_warnings is nonzero at the\n   * end of processing.\n   */\n  long num_warnings;\t\t/* number of corrupt-data warnings */\n\n  /* These fields point to the table(s) of error message strings.\n   * An application can change the table pointer to switch to a different\n   * message list (typically, to change the language in which errors are\n   * reported).  Some applications may wish to add additional error codes\n   * that will be handled by the JPEG library error mechanism; the second\n   * table pointer is used for this purpose.\n   *\n   * First table includes all errors generated by JPEG library itself.\n   * Error code 0 is reserved for a \"no such error string\" message.\n   */\n  const char * const * jpeg_message_table; /* Library errors */\n  int last_jpeg_message;    /* Table contains strings 0..last_jpeg_message */\n  /* Second table can be added by application (see cjpeg/djpeg for example).\n   * It contains strings numbered first_addon_message..last_addon_message.\n   */\n  const char * const * addon_message_table; /* Non-library errors */\n  int first_addon_message;\t/* code for first string in addon table */\n  int last_addon_message;\t/* code for last string in addon table */\n};\n\n\n/* Progress monitor object */\n\nstruct jpeg_progress_mgr {\n  JMETHOD(void, progress_monitor, (j_common_ptr cinfo));\n\n  long pass_counter;\t\t/* work units completed in this pass */\n  long pass_limit;\t\t/* total number of work units in this pass */\n  int completed_passes;\t\t/* passes completed so far */\n  int total_passes;\t\t/* total number of passes expected */\n};\n\n\n/* Data destination object for compression */\n\nstruct jpeg_destination_mgr {\n  JOCTET * next_output_byte;\t/* => next byte to write in buffer */\n  size_t free_in_buffer;\t/* # of byte spaces remaining in buffer */\n\n  JMETHOD(void, init_destination, (j_compress_ptr cinfo));\n  JMETHOD(boolean, empty_output_buffer, (j_compress_ptr cinfo));\n  JMETHOD(void, term_destination, (j_compress_ptr cinfo));\n};\n\n\n/* Data source object for decompression */\n\nstruct jpeg_source_mgr {\n  const JOCTET * next_input_byte; /* => next byte to read from buffer */\n  size_t bytes_in_buffer;\t/* # of bytes remaining in buffer */\n\n  JMETHOD(void, init_source, (j_decompress_ptr cinfo));\n  JMETHOD(boolean, fill_input_buffer, (j_decompress_ptr cinfo));\n  JMETHOD(void, skip_input_data, (j_decompress_ptr cinfo, long num_bytes));\n  JMETHOD(boolean, resync_to_restart, (j_decompress_ptr cinfo, int desired));\n  JMETHOD(void, term_source, (j_decompress_ptr cinfo));\n};\n\n\n/* Memory manager object.\n * Allocates \"small\" objects (a few K total), \"large\" objects (tens of K),\n * and \"really big\" objects (virtual arrays with backing store if needed).\n * The memory manager does not allow individual objects to be freed; rather,\n * each created object is assigned to a pool, and whole pools can be freed\n * at once.  This is faster and more convenient than remembering exactly what\n * to free, especially where malloc()/free() are not too speedy.\n * NB: alloc routines never return NULL.  They exit to error_exit if not\n * successful.\n */\n\n#define JPOOL_PERMANENT\t0\t/* lasts until master record is destroyed */\n#define JPOOL_IMAGE\t1\t/* lasts until done with image/datastream */\n#define JPOOL_NUMPOOLS\t2\n\ntypedef struct jvirt_sarray_control * jvirt_sarray_ptr;\ntypedef struct jvirt_barray_control * jvirt_barray_ptr;\n\n\nstruct jpeg_memory_mgr {\n  /* Method pointers */\n  JMETHOD(void *, alloc_small, (j_common_ptr cinfo, int pool_id,\n\t\t\t\tsize_t sizeofobject));\n  JMETHOD(void FAR *, alloc_large, (j_common_ptr cinfo, int pool_id,\n\t\t\t\t     size_t sizeofobject));\n  JMETHOD(JSAMPARRAY, alloc_sarray, (j_common_ptr cinfo, int pool_id,\n\t\t\t\t     JDIMENSION samplesperrow,\n\t\t\t\t     JDIMENSION numrows));\n  JMETHOD(JBLOCKARRAY, alloc_barray, (j_common_ptr cinfo, int pool_id,\n\t\t\t\t      JDIMENSION blocksperrow,\n\t\t\t\t      JDIMENSION numrows));\n  JMETHOD(jvirt_sarray_ptr, request_virt_sarray, (j_common_ptr cinfo,\n\t\t\t\t\t\t  int pool_id,\n\t\t\t\t\t\t  boolean pre_zero,\n\t\t\t\t\t\t  JDIMENSION samplesperrow,\n\t\t\t\t\t\t  JDIMENSION numrows,\n\t\t\t\t\t\t  JDIMENSION maxaccess));\n  JMETHOD(jvirt_barray_ptr, request_virt_barray, (j_common_ptr cinfo,\n\t\t\t\t\t\t  int pool_id,\n\t\t\t\t\t\t  boolean pre_zero,\n\t\t\t\t\t\t  JDIMENSION blocksperrow,\n\t\t\t\t\t\t  JDIMENSION numrows,\n\t\t\t\t\t\t  JDIMENSION maxaccess));\n  JMETHOD(void, realize_virt_arrays, (j_common_ptr cinfo));\n  JMETHOD(JSAMPARRAY, access_virt_sarray, (j_common_ptr cinfo,\n\t\t\t\t\t   jvirt_sarray_ptr ptr,\n\t\t\t\t\t   JDIMENSION start_row,\n\t\t\t\t\t   JDIMENSION num_rows,\n\t\t\t\t\t   boolean writable));\n  JMETHOD(JBLOCKARRAY, access_virt_barray, (j_common_ptr cinfo,\n\t\t\t\t\t    jvirt_barray_ptr ptr,\n\t\t\t\t\t    JDIMENSION start_row,\n\t\t\t\t\t    JDIMENSION num_rows,\n\t\t\t\t\t    boolean writable));\n  JMETHOD(void, free_pool, (j_common_ptr cinfo, int pool_id));\n  JMETHOD(void, self_destruct, (j_common_ptr cinfo));\n\n  /* Limit on memory allocation for this JPEG object.  (Note that this is\n   * merely advisory, not a guaranteed maximum; it only affects the space\n   * used for virtual-array buffers.)  May be changed by outer application\n   * after creating the JPEG object.\n   */\n  long max_memory_to_use;\n\n  /* Maximum allocation request accepted by alloc_large. */\n  long max_alloc_chunk;\n};\n\n\n/* Routine signature for application-supplied marker processing methods.\n * Need not pass marker code since it is stored in cinfo->unread_marker.\n */\ntypedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo));\n\n\n/* Declarations for routines called by application.\n * The JPP macro hides prototype parameters from compilers that can't cope.\n * Note JPP requires double parentheses.\n */\n\n#ifdef HAVE_PROTOTYPES\n#define JPP(arglist)\targlist\n#else\n#define JPP(arglist)\t()\n#endif\n\n\n/* Short forms of external names for systems with brain-damaged linkers.\n * We shorten external names to be unique in the first six letters, which\n * is good enough for all known systems.\n * (If your compiler itself needs names to be unique in less than 15 \n * characters, you are out of luck.  Get a better compiler.)\n */\n\n#ifdef NEED_SHORT_EXTERNAL_NAMES\n#define jpeg_std_error\t\tjStdError\n#define jpeg_CreateCompress\tjCreaCompress\n#define jpeg_CreateDecompress\tjCreaDecompress\n#define jpeg_destroy_compress\tjDestCompress\n#define jpeg_destroy_decompress\tjDestDecompress\n#define jpeg_stdio_dest\t\tjStdDest\n#define jpeg_stdio_src\t\tjStdSrc\n#define jpeg_set_defaults\tjSetDefaults\n#define jpeg_set_colorspace\tjSetColorspace\n#define jpeg_default_colorspace\tjDefColorspace\n#define jpeg_set_quality\tjSetQuality\n#define jpeg_set_linear_quality\tjSetLQuality\n#define jpeg_add_quant_table\tjAddQuantTable\n#define jpeg_quality_scaling\tjQualityScaling\n#define jpeg_simple_progression\tjSimProgress\n#define jpeg_suppress_tables\tjSuppressTables\n#define jpeg_alloc_quant_table\tjAlcQTable\n#define jpeg_alloc_huff_table\tjAlcHTable\n#define jpeg_start_compress\tjStrtCompress\n#define jpeg_write_scanlines\tjWrtScanlines\n#define jpeg_finish_compress\tjFinCompress\n#define jpeg_write_raw_data\tjWrtRawData\n#define jpeg_write_marker\tjWrtMarker\n#define jpeg_write_m_header\tjWrtMHeader\n#define jpeg_write_m_byte\tjWrtMByte\n#define jpeg_write_tables\tjWrtTables\n#define jpeg_read_header\tjReadHeader\n#define jpeg_start_decompress\tjStrtDecompress\n#define jpeg_read_scanlines\tjReadScanlines\n#define jpeg_finish_decompress\tjFinDecompress\n#define jpeg_read_raw_data\tjReadRawData\n#define jpeg_has_multiple_scans\tjHasMultScn\n#define jpeg_start_output\tjStrtOutput\n#define jpeg_finish_output\tjFinOutput\n#define jpeg_input_complete\tjInComplete\n#define jpeg_new_colormap\tjNewCMap\n#define jpeg_consume_input\tjConsumeInput\n#define jpeg_calc_output_dimensions\tjCalcDimensions\n#define jpeg_save_markers\tjSaveMarkers\n#define jpeg_set_marker_processor\tjSetMarker\n#define jpeg_read_coefficients\tjReadCoefs\n#define jpeg_write_coefficients\tjWrtCoefs\n#define jpeg_copy_critical_parameters\tjCopyCrit\n#define jpeg_abort_compress\tjAbrtCompress\n#define jpeg_abort_decompress\tjAbrtDecompress\n#define jpeg_abort\t\tjAbort\n#define jpeg_destroy\t\tjDestroy\n#define jpeg_resync_to_restart\tjResyncRestart\n#endif /* NEED_SHORT_EXTERNAL_NAMES */\n\n\n/* Default error-management setup */\nEXTERN(struct jpeg_error_mgr *) jpeg_std_error\n\tJPP((struct jpeg_error_mgr * err));\n\n/* Initialization of JPEG compression objects.\n * jpeg_create_compress() and jpeg_create_decompress() are the exported\n * names that applications should call.  These expand to calls on\n * jpeg_CreateCompress and jpeg_CreateDecompress with additional information\n * passed for version mismatch checking.\n * NB: you must set up the error-manager BEFORE calling jpeg_create_xxx.\n */\n#define jpeg_create_compress(cinfo) \\\n    jpeg_CreateCompress((cinfo), JPEG_LIB_VERSION, \\\n\t\t\t(size_t) sizeof(struct jpeg_compress_struct))\n#define jpeg_create_decompress(cinfo) \\\n    jpeg_CreateDecompress((cinfo), JPEG_LIB_VERSION, \\\n\t\t\t  (size_t) sizeof(struct jpeg_decompress_struct))\nEXTERN(void) jpeg_CreateCompress JPP((j_compress_ptr cinfo,\n\t\t\t\t      int version, size_t structsize));\nEXTERN(void) jpeg_CreateDecompress JPP((j_decompress_ptr cinfo,\n\t\t\t\t\tint version, size_t structsize));\n/* Destruction of JPEG compression objects */\nEXTERN(void) jpeg_destroy_compress JPP((j_compress_ptr cinfo));\nEXTERN(void) jpeg_destroy_decompress JPP((j_decompress_ptr cinfo));\n\n/* Standard data source and destination managers: stdio streams. */\n/* Caller is responsible for opening the file before and closing after. */\nEXTERN(void) jpeg_stdio_dest JPP((j_compress_ptr cinfo, FILE * outfile));\nEXTERN(void) jpeg_stdio_src JPP((j_decompress_ptr cinfo, FILE * infile));\n\n/* Default parameter setup for compression */\nEXTERN(void) jpeg_set_defaults JPP((j_compress_ptr cinfo));\n/* Compression parameter setup aids */\nEXTERN(void) jpeg_set_colorspace JPP((j_compress_ptr cinfo,\n\t\t\t\t      J_COLOR_SPACE colorspace));\nEXTERN(void) jpeg_default_colorspace JPP((j_compress_ptr cinfo));\nEXTERN(void) jpeg_set_quality JPP((j_compress_ptr cinfo, int quality,\n\t\t\t\t   boolean force_baseline));\nEXTERN(void) jpeg_set_linear_quality JPP((j_compress_ptr cinfo,\n\t\t\t\t\t  int scale_factor,\n\t\t\t\t\t  boolean force_baseline));\nEXTERN(void) jpeg_add_quant_table JPP((j_compress_ptr cinfo, int which_tbl,\n\t\t\t\t       const unsigned int *basic_table,\n\t\t\t\t       int scale_factor,\n\t\t\t\t       boolean force_baseline));\nEXTERN(int) jpeg_quality_scaling JPP((int quality));\nEXTERN(void) jpeg_simple_progression JPP((j_compress_ptr cinfo));\nEXTERN(void) jpeg_suppress_tables JPP((j_compress_ptr cinfo,\n\t\t\t\t       boolean suppress));\nEXTERN(JQUANT_TBL *) jpeg_alloc_quant_table JPP((j_common_ptr cinfo));\nEXTERN(JHUFF_TBL *) jpeg_alloc_huff_table JPP((j_common_ptr cinfo));\n\n/* Main entry points for compression */\nEXTERN(void) jpeg_start_compress JPP((j_compress_ptr cinfo,\n\t\t\t\t      boolean write_all_tables));\nEXTERN(JDIMENSION) jpeg_write_scanlines JPP((j_compress_ptr cinfo,\n\t\t\t\t\t     JSAMPARRAY scanlines,\n\t\t\t\t\t     JDIMENSION num_lines));\nEXTERN(void) jpeg_finish_compress JPP((j_compress_ptr cinfo));\n\n/* Replaces jpeg_write_scanlines when writing raw downsampled data. */\nEXTERN(JDIMENSION) jpeg_write_raw_data JPP((j_compress_ptr cinfo,\n\t\t\t\t\t    JSAMPIMAGE data,\n\t\t\t\t\t    JDIMENSION num_lines));\n\n/* Write a special marker.  See libjpeg.doc concerning safe usage. */\nEXTERN(void) jpeg_write_marker\n\tJPP((j_compress_ptr cinfo, int marker,\n\t     const JOCTET * dataptr, unsigned int datalen));\n/* Same, but piecemeal. */\nEXTERN(void) jpeg_write_m_header\n\tJPP((j_compress_ptr cinfo, int marker, unsigned int datalen));\nEXTERN(void) jpeg_write_m_byte\n\tJPP((j_compress_ptr cinfo, int val));\n\n/* Alternate compression function: just write an abbreviated table file */\nEXTERN(void) jpeg_write_tables JPP((j_compress_ptr cinfo));\n\n/* Decompression startup: read start of JPEG datastream to see what's there */\nEXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo,\n\t\t\t\t  boolean require_image));\n/* Return value is one of: */\n#define JPEG_SUSPENDED\t\t0 /* Suspended due to lack of input data */\n#define JPEG_HEADER_OK\t\t1 /* Found valid image datastream */\n#define JPEG_HEADER_TABLES_ONLY\t2 /* Found valid table-specs-only datastream */\n/* If you pass require_image = TRUE (normal case), you need not check for\n * a TABLES_ONLY return code; an abbreviated file will cause an error exit.\n * JPEG_SUSPENDED is only possible if you use a data source module that can\n * give a suspension return (the stdio source module doesn't).\n */\n\n/* Main entry points for decompression */\nEXTERN(boolean) jpeg_start_decompress JPP((j_decompress_ptr cinfo));\nEXTERN(JDIMENSION) jpeg_read_scanlines JPP((j_decompress_ptr cinfo,\n\t\t\t\t\t    JSAMPARRAY scanlines,\n\t\t\t\t\t    JDIMENSION max_lines));\nEXTERN(boolean) jpeg_finish_decompress JPP((j_decompress_ptr cinfo));\n\n/* Replaces jpeg_read_scanlines when reading raw downsampled data. */\nEXTERN(JDIMENSION) jpeg_read_raw_data JPP((j_decompress_ptr cinfo,\n\t\t\t\t\t   JSAMPIMAGE data,\n\t\t\t\t\t   JDIMENSION max_lines));\n\n/* Additional entry points for buffered-image mode. */\nEXTERN(boolean) jpeg_has_multiple_scans JPP((j_decompress_ptr cinfo));\nEXTERN(boolean) jpeg_start_output JPP((j_decompress_ptr cinfo,\n\t\t\t\t       int scan_number));\nEXTERN(boolean) jpeg_finish_output JPP((j_decompress_ptr cinfo));\nEXTERN(boolean) jpeg_input_complete JPP((j_decompress_ptr cinfo));\nEXTERN(void) jpeg_new_colormap JPP((j_decompress_ptr cinfo));\nEXTERN(int) jpeg_consume_input JPP((j_decompress_ptr cinfo));\n/* Return value is one of: */\n/* #define JPEG_SUSPENDED\t0    Suspended due to lack of input data */\n#define JPEG_REACHED_SOS\t1 /* Reached start of new scan */\n#define JPEG_REACHED_EOI\t2 /* Reached end of image */\n#define JPEG_ROW_COMPLETED\t3 /* Completed one iMCU row */\n#define JPEG_SCAN_COMPLETED\t4 /* Completed last iMCU row of a scan */\n\n/* Precalculate output dimensions for current decompression parameters. */\nEXTERN(void) jpeg_calc_output_dimensions JPP((j_decompress_ptr cinfo));\n\n/* Control saving of COM and APPn markers into marker_list. */\nEXTERN(void) jpeg_save_markers\n\tJPP((j_decompress_ptr cinfo, int marker_code,\n\t     unsigned int length_limit));\n\n/* Install a special processing method for COM or APPn markers. */\nEXTERN(void) jpeg_set_marker_processor\n\tJPP((j_decompress_ptr cinfo, int marker_code,\n\t     jpeg_marker_parser_method routine));\n\n/* Read or write raw DCT coefficients --- useful for lossless transcoding. */\nEXTERN(jvirt_barray_ptr *) jpeg_read_coefficients JPP((j_decompress_ptr cinfo));\nEXTERN(void) jpeg_write_coefficients JPP((j_compress_ptr cinfo,\n\t\t\t\t\t  jvirt_barray_ptr * coef_arrays));\nEXTERN(void) jpeg_copy_critical_parameters JPP((j_decompress_ptr srcinfo,\n\t\t\t\t\t\tj_compress_ptr dstinfo));\n\n/* If you choose to abort compression or decompression before completing\n * jpeg_finish_(de)compress, then you need to clean up to release memory,\n * temporary files, etc.  You can just call jpeg_destroy_(de)compress\n * if you're done with the JPEG object, but if you want to clean it up and\n * reuse it, call this:\n */\nEXTERN(void) jpeg_abort_compress JPP((j_compress_ptr cinfo));\nEXTERN(void) jpeg_abort_decompress JPP((j_decompress_ptr cinfo));\n\n/* Generic versions of jpeg_abort and jpeg_destroy that work on either\n * flavor of JPEG object.  These may be more convenient in some places.\n */\nEXTERN(void) jpeg_abort JPP((j_common_ptr cinfo));\nEXTERN(void) jpeg_destroy JPP((j_common_ptr cinfo));\n\n/* Default restart-marker-resync procedure for use by data source modules */\nEXTERN(boolean) jpeg_resync_to_restart JPP((j_decompress_ptr cinfo,\n\t\t\t\t\t    int desired));\n\n\n/* These marker codes are exported since applications and data source modules\n * are likely to want to use them.\n */\n\n#define JPEG_RST0\t0xD0\t/* RST0 marker code */\n#define JPEG_EOI\t0xD9\t/* EOI marker code */\n#define JPEG_APP0\t0xE0\t/* APP0 marker code */\n#define JPEG_COM\t0xFE\t/* COM marker code */\n\n\n/* If we have a brain-damaged compiler that emits warnings (or worse, errors)\n * for structure definitions that are never filled in, keep it quiet by\n * supplying dummy definitions for the various substructures.\n */\n\n#ifdef INCOMPLETE_TYPES_BROKEN\n#ifndef JPEG_INTERNALS\t\t/* will be defined in jpegint.h */\nstruct jvirt_sarray_control { long dummy; };\nstruct jvirt_barray_control { long dummy; };\nstruct jpeg_comp_master { long dummy; };\nstruct jpeg_c_main_controller { long dummy; };\nstruct jpeg_c_prep_controller { long dummy; };\nstruct jpeg_c_coef_controller { long dummy; };\nstruct jpeg_marker_writer { long dummy; };\nstruct jpeg_color_converter { long dummy; };\nstruct jpeg_downsampler { long dummy; };\nstruct jpeg_forward_dct { long dummy; };\nstruct jpeg_entropy_encoder { long dummy; };\nstruct jpeg_decomp_master { long dummy; };\nstruct jpeg_d_main_controller { long dummy; };\nstruct jpeg_d_coef_controller { long dummy; };\nstruct jpeg_d_post_controller { long dummy; };\nstruct jpeg_input_controller { long dummy; };\nstruct jpeg_marker_reader { long dummy; };\nstruct jpeg_entropy_decoder { long dummy; };\nstruct jpeg_inverse_dct { long dummy; };\nstruct jpeg_upsampler { long dummy; };\nstruct jpeg_color_deconverter { long dummy; };\nstruct jpeg_color_quantizer { long dummy; };\n#endif /* JPEG_INTERNALS */\n#endif /* INCOMPLETE_TYPES_BROKEN */\n\n\n/*\n * The JPEG library modules define JPEG_INTERNALS before including this file.\n * The internal structure declarations are read only when that is true.\n * Applications using the library should not include jpegint.h, but may wish\n * to include jerror.h.\n */\n\n#ifdef JPEG_INTERNALS\n#include \"jpegint.h\"\t\t/* fetch private declarations */\n#include \"jerror.h\"\t\t/* fetch error codes too */\n#endif\n\n#endif /* JPEGLIB_H */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jquant1.c",
    "content": "/*\n * jquant1.c\n *\n * Copyright (C) 1991-1996, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains 1-pass color quantization (color mapping) routines.\n * These routines provide mapping to a fixed color map using equally spaced\n * color values.  Optional Floyd-Steinberg or ordered dithering is available.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n\n#ifdef QUANT_1PASS_SUPPORTED\n\n\n/*\n * The main purpose of 1-pass quantization is to provide a fast, if not very\n * high quality, colormapped output capability.  A 2-pass quantizer usually\n * gives better visual quality; however, for quantized grayscale output this\n * quantizer is perfectly adequate.  Dithering is highly recommended with this\n * quantizer, though you can turn it off if you really want to.\n *\n * In 1-pass quantization the colormap must be chosen in advance of seeing the\n * image.  We use a map consisting of all combinations of Ncolors[i] color\n * values for the i'th component.  The Ncolors[] values are chosen so that\n * their product, the total number of colors, is no more than that requested.\n * (In most cases, the product will be somewhat less.)\n *\n * Since the colormap is orthogonal, the representative value for each color\n * component can be determined without considering the other components;\n * then these indexes can be combined into a colormap index by a standard\n * N-dimensional-array-subscript calculation.  Most of the arithmetic involved\n * can be precalculated and stored in the lookup table colorindex[].\n * colorindex[i][j] maps pixel value j in component i to the nearest\n * representative value (grid plane) for that component; this index is\n * multiplied by the array stride for component i, so that the\n * index of the colormap entry closest to a given pixel value is just\n *    sum( colorindex[component-number][pixel-component-value] )\n * Aside from being fast, this scheme allows for variable spacing between\n * representative values with no additional lookup cost.\n *\n * If gamma correction has been applied in color conversion, it might be wise\n * to adjust the color grid spacing so that the representative colors are\n * equidistant in linear space.  At this writing, gamma correction is not\n * implemented by jdcolor, so nothing is done here.\n */\n\n\n/* Declarations for ordered dithering.\n *\n * We use a standard 16x16 ordered dither array.  The basic concept of ordered\n * dithering is described in many references, for instance Dale Schumacher's\n * chapter II.2 of Graphics Gems II (James Arvo, ed. Academic Press, 1991).\n * In place of Schumacher's comparisons against a \"threshold\" value, we add a\n * \"dither\" value to the input pixel and then round the result to the nearest\n * output value.  The dither value is equivalent to (0.5 - threshold) times\n * the distance between output values.  For ordered dithering, we assume that\n * the output colors are equally spaced; if not, results will probably be\n * worse, since the dither may be too much or too little at a given point.\n *\n * The normal calculation would be to form pixel value + dither, range-limit\n * this to 0..MAXJSAMPLE, and then index into the colorindex table as usual.\n * We can skip the separate range-limiting step by extending the colorindex\n * table in both directions.\n */\n\n#define ODITHER_SIZE  16\t/* dimension of dither matrix */\n/* NB: if ODITHER_SIZE is not a power of 2, ODITHER_MASK uses will break */\n#define ODITHER_CELLS (ODITHER_SIZE*ODITHER_SIZE)\t/* # cells in matrix */\n#define ODITHER_MASK  (ODITHER_SIZE-1) /* mask for wrapping around counters */\n\ntypedef int ODITHER_MATRIX[ODITHER_SIZE][ODITHER_SIZE];\ntypedef int (*ODITHER_MATRIX_PTR)[ODITHER_SIZE];\n\nstatic const UINT8 base_dither_matrix[ODITHER_SIZE][ODITHER_SIZE] = {\n  /* Bayer's order-4 dither array.  Generated by the code given in\n   * Stephen Hawley's article \"Ordered Dithering\" in Graphics Gems I.\n   * The values in this array must range from 0 to ODITHER_CELLS-1.\n   */\n  {   0,192, 48,240, 12,204, 60,252,  3,195, 51,243, 15,207, 63,255 },\n  { 128, 64,176,112,140, 76,188,124,131, 67,179,115,143, 79,191,127 },\n  {  32,224, 16,208, 44,236, 28,220, 35,227, 19,211, 47,239, 31,223 },\n  { 160, 96,144, 80,172,108,156, 92,163, 99,147, 83,175,111,159, 95 },\n  {   8,200, 56,248,  4,196, 52,244, 11,203, 59,251,  7,199, 55,247 },\n  { 136, 72,184,120,132, 68,180,116,139, 75,187,123,135, 71,183,119 },\n  {  40,232, 24,216, 36,228, 20,212, 43,235, 27,219, 39,231, 23,215 },\n  { 168,104,152, 88,164,100,148, 84,171,107,155, 91,167,103,151, 87 },\n  {   2,194, 50,242, 14,206, 62,254,  1,193, 49,241, 13,205, 61,253 },\n  { 130, 66,178,114,142, 78,190,126,129, 65,177,113,141, 77,189,125 },\n  {  34,226, 18,210, 46,238, 30,222, 33,225, 17,209, 45,237, 29,221 },\n  { 162, 98,146, 82,174,110,158, 94,161, 97,145, 81,173,109,157, 93 },\n  {  10,202, 58,250,  6,198, 54,246,  9,201, 57,249,  5,197, 53,245 },\n  { 138, 74,186,122,134, 70,182,118,137, 73,185,121,133, 69,181,117 },\n  {  42,234, 26,218, 38,230, 22,214, 41,233, 25,217, 37,229, 21,213 },\n  { 170,106,154, 90,166,102,150, 86,169,105,153, 89,165,101,149, 85 }\n};\n\n\n/* Declarations for Floyd-Steinberg dithering.\n *\n * Errors are accumulated into the array fserrors[], at a resolution of\n * 1/16th of a pixel count.  The error at a given pixel is propagated\n * to its not-yet-processed neighbors using the standard F-S fractions,\n *\t\t...\t(here)\t7/16\n *\t\t3/16\t5/16\t1/16\n * We work left-to-right on even rows, right-to-left on odd rows.\n *\n * We can get away with a single array (holding one row's worth of errors)\n * by using it to store the current row's errors at pixel columns not yet\n * processed, but the next row's errors at columns already processed.  We\n * need only a few extra variables to hold the errors immediately around the\n * current column.  (If we are lucky, those variables are in registers, but\n * even if not, they're probably cheaper to access than array elements are.)\n *\n * The fserrors[] array is indexed [component#][position].\n * We provide (#columns + 2) entries per component; the extra entry at each\n * end saves us from special-casing the first and last pixels.\n *\n * Note: on a wide image, we might not have enough room in a PC's near data\n * segment to hold the error array; so it is allocated with alloc_large.\n */\n\n#if BITS_IN_JSAMPLE == 8\ntypedef INT16 FSERROR;\t\t/* 16 bits should be enough */\ntypedef int LOCFSERROR;\t\t/* use 'int' for calculation temps */\n#else\ntypedef INT32 FSERROR;\t\t/* may need more than 16 bits */\ntypedef INT32 LOCFSERROR;\t/* be sure calculation temps are big enough */\n#endif\n\ntypedef FSERROR FAR *FSERRPTR;\t/* pointer to error array (in FAR storage!) */\n\n\n/* Private subobject */\n\n#define MAX_Q_COMPS 4\t\t/* max components I can handle */\n\ntypedef struct {\n  struct jpeg_color_quantizer pub; /* public fields */\n\n  /* Initially allocated colormap is saved here */\n  JSAMPARRAY sv_colormap;\t/* The color map as a 2-D pixel array */\n  int sv_actual;\t\t/* number of entries in use */\n\n  JSAMPARRAY colorindex;\t/* Precomputed mapping for speed */\n  /* colorindex[i][j] = index of color closest to pixel value j in component i,\n   * premultiplied as described above.  Since colormap indexes must fit into\n   * JSAMPLEs, the entries of this array will too.\n   */\n  boolean is_padded;\t\t/* is the colorindex padded for odither? */\n\n  int Ncolors[MAX_Q_COMPS];\t/* # of values alloced to each component */\n\n  /* Variables for ordered dithering */\n  int row_index;\t\t/* cur row's vertical index in dither matrix */\n  ODITHER_MATRIX_PTR odither[MAX_Q_COMPS]; /* one dither array per component */\n\n  /* Variables for Floyd-Steinberg dithering */\n  FSERRPTR fserrors[MAX_Q_COMPS]; /* accumulated errors */\n  boolean on_odd_row;\t\t/* flag to remember which row we are on */\n} my_cquantizer;\n\ntypedef my_cquantizer * my_cquantize_ptr;\n\n\n/*\n * Policy-making subroutines for create_colormap and create_colorindex.\n * These routines determine the colormap to be used.  The rest of the module\n * only assumes that the colormap is orthogonal.\n *\n *  * select_ncolors decides how to divvy up the available colors\n *    among the components.\n *  * output_value defines the set of representative values for a component.\n *  * largest_input_value defines the mapping from input values to\n *    representative values for a component.\n * Note that the latter two routines may impose different policies for\n * different components, though this is not currently done.\n */\n\n\nLOCAL(int)\nselect_ncolors (j_decompress_ptr cinfo, int Ncolors[])\n/* Determine allocation of desired colors to components, */\n/* and fill in Ncolors[] array to indicate choice. */\n/* Return value is total number of colors (product of Ncolors[] values). */\n{\n  int nc = cinfo->out_color_components; /* number of color components */\n  int max_colors = cinfo->desired_number_of_colors;\n  int total_colors, iroot, i, j;\n  boolean changed;\n  long temp;\n  static const int RGB_order[3] = { RGB_GREEN, RGB_RED, RGB_BLUE };\n\n  /* We can allocate at least the nc'th root of max_colors per component. */\n  /* Compute floor(nc'th root of max_colors). */\n  iroot = 1;\n  do {\n    iroot++;\n    temp = iroot;\t\t/* set temp = iroot ** nc */\n    for (i = 1; i < nc; i++)\n      temp *= iroot;\n  } while (temp <= (long) max_colors); /* repeat till iroot exceeds root */\n  iroot--;\t\t\t/* now iroot = floor(root) */\n\n  /* Must have at least 2 color values per component */\n  if (iroot < 2)\n    ERREXIT1(cinfo, JERR_QUANT_FEW_COLORS, (int) temp);\n\n  /* Initialize to iroot color values for each component */\n  total_colors = 1;\n  for (i = 0; i < nc; i++) {\n    Ncolors[i] = iroot;\n    total_colors *= iroot;\n  }\n  /* We may be able to increment the count for one or more components without\n   * exceeding max_colors, though we know not all can be incremented.\n   * Sometimes, the first component can be incremented more than once!\n   * (Example: for 16 colors, we start at 2*2*2, go to 3*2*2, then 4*2*2.)\n   * In RGB colorspace, try to increment G first, then R, then B.\n   */\n  do {\n    changed = FALSE;\n    for (i = 0; i < nc; i++) {\n      j = (cinfo->out_color_space == JCS_RGB ? RGB_order[i] : i);\n      /* calculate new total_colors if Ncolors[j] is incremented */\n      temp = total_colors / Ncolors[j];\n      temp *= Ncolors[j]+1;\t/* done in long arith to avoid oflo */\n      if (temp > (long) max_colors)\n\tbreak;\t\t\t/* won't fit, done with this pass */\n      Ncolors[j]++;\t\t/* OK, apply the increment */\n      total_colors = (int) temp;\n      changed = TRUE;\n    }\n  } while (changed);\n\n  return total_colors;\n}\n\n\nLOCAL(int)\noutput_value (j_decompress_ptr cinfo, int ci, int j, int maxj)\n/* Return j'th output value, where j will range from 0 to maxj */\n/* The output values must fall in 0..MAXJSAMPLE in increasing order */\n{\n  /* We always provide values 0 and MAXJSAMPLE for each component;\n   * any additional values are equally spaced between these limits.\n   * (Forcing the upper and lower values to the limits ensures that\n   * dithering can't produce a color outside the selected gamut.)\n   */\n  return (int) (((INT32) j * MAXJSAMPLE + maxj/2) / maxj);\n}\n\n\nLOCAL(int)\nlargest_input_value (j_decompress_ptr cinfo, int ci, int j, int maxj)\n/* Return largest input value that should map to j'th output value */\n/* Must have largest(j=0) >= 0, and largest(j=maxj) >= MAXJSAMPLE */\n{\n  /* Breakpoints are halfway between values returned by output_value */\n  return (int) (((INT32) (2*j + 1) * MAXJSAMPLE + maxj) / (2*maxj));\n}\n\n\n/*\n * Create the colormap.\n */\n\nLOCAL(void)\ncreate_colormap (j_decompress_ptr cinfo)\n{\n  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;\n  JSAMPARRAY colormap;\t\t/* Created colormap */\n  int total_colors;\t\t/* Number of distinct output colors */\n  int i,j,k, nci, blksize, blkdist, ptr, val;\n\n  /* Select number of colors for each component */\n  total_colors = select_ncolors(cinfo, cquantize->Ncolors);\n\n  /* Report selected color counts */\n  if (cinfo->out_color_components == 3)\n    TRACEMS4(cinfo, 1, JTRC_QUANT_3_NCOLORS,\n\t     total_colors, cquantize->Ncolors[0],\n\t     cquantize->Ncolors[1], cquantize->Ncolors[2]);\n  else\n    TRACEMS1(cinfo, 1, JTRC_QUANT_NCOLORS, total_colors);\n\n  /* Allocate and fill in the colormap. */\n  /* The colors are ordered in the map in standard row-major order, */\n  /* i.e. rightmost (highest-indexed) color changes most rapidly. */\n\n  colormap = (*cinfo->mem->alloc_sarray)\n    ((j_common_ptr) cinfo, JPOOL_IMAGE,\n     (JDIMENSION) total_colors, (JDIMENSION) cinfo->out_color_components);\n\n  /* blksize is number of adjacent repeated entries for a component */\n  /* blkdist is distance between groups of identical entries for a component */\n  blkdist = total_colors;\n\n  for (i = 0; i < cinfo->out_color_components; i++) {\n    /* fill in colormap entries for i'th color component */\n    nci = cquantize->Ncolors[i]; /* # of distinct values for this color */\n    blksize = blkdist / nci;\n    for (j = 0; j < nci; j++) {\n      /* Compute j'th output value (out of nci) for component */\n      val = output_value(cinfo, i, j, nci-1);\n      /* Fill in all colormap entries that have this value of this component */\n      for (ptr = j * blksize; ptr < total_colors; ptr += blkdist) {\n\t/* fill in blksize entries beginning at ptr */\n\tfor (k = 0; k < blksize; k++)\n\t  colormap[i][ptr+k] = (JSAMPLE) val;\n      }\n    }\n    blkdist = blksize;\t\t/* blksize of this color is blkdist of next */\n  }\n\n  /* Save the colormap in private storage,\n   * where it will survive color quantization mode changes.\n   */\n  cquantize->sv_colormap = colormap;\n  cquantize->sv_actual = total_colors;\n}\n\n\n/*\n * Create the color index table.\n */\n\nLOCAL(void)\ncreate_colorindex (j_decompress_ptr cinfo)\n{\n  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;\n  JSAMPROW indexptr;\n  int i,j,k, nci, blksize, val, pad;\n\n  /* For ordered dither, we pad the color index tables by MAXJSAMPLE in\n   * each direction (input index values can be -MAXJSAMPLE .. 2*MAXJSAMPLE).\n   * This is not necessary in the other dithering modes.  However, we\n   * flag whether it was done in case user changes dithering mode.\n   */\n  if (cinfo->dither_mode == JDITHER_ORDERED) {\n    pad = MAXJSAMPLE*2;\n    cquantize->is_padded = TRUE;\n  } else {\n    pad = 0;\n    cquantize->is_padded = FALSE;\n  }\n\n  cquantize->colorindex = (*cinfo->mem->alloc_sarray)\n    ((j_common_ptr) cinfo, JPOOL_IMAGE,\n     (JDIMENSION) (MAXJSAMPLE+1 + pad),\n     (JDIMENSION) cinfo->out_color_components);\n\n  /* blksize is number of adjacent repeated entries for a component */\n  blksize = cquantize->sv_actual;\n\n  for (i = 0; i < cinfo->out_color_components; i++) {\n    /* fill in colorindex entries for i'th color component */\n    nci = cquantize->Ncolors[i]; /* # of distinct values for this color */\n    blksize = blksize / nci;\n\n    /* adjust colorindex pointers to provide padding at negative indexes. */\n    if (pad)\n      cquantize->colorindex[i] += MAXJSAMPLE;\n\n    /* in loop, val = index of current output value, */\n    /* and k = largest j that maps to current val */\n    indexptr = cquantize->colorindex[i];\n    val = 0;\n    k = largest_input_value(cinfo, i, 0, nci-1);\n    for (j = 0; j <= MAXJSAMPLE; j++) {\n      while (j > k)\t\t/* advance val if past boundary */\n\tk = largest_input_value(cinfo, i, ++val, nci-1);\n      /* premultiply so that no multiplication needed in main processing */\n      indexptr[j] = (JSAMPLE) (val * blksize);\n    }\n    /* Pad at both ends if necessary */\n    if (pad)\n      for (j = 1; j <= MAXJSAMPLE; j++) {\n\tindexptr[-j] = indexptr[0];\n\tindexptr[MAXJSAMPLE+j] = indexptr[MAXJSAMPLE];\n      }\n  }\n}\n\n\n/*\n * Create an ordered-dither array for a component having ncolors\n * distinct output values.\n */\n\nLOCAL(ODITHER_MATRIX_PTR)\nmake_odither_array (j_decompress_ptr cinfo, int ncolors)\n{\n  ODITHER_MATRIX_PTR odither;\n  int j,k;\n  INT32 num,den;\n\n  odither = (ODITHER_MATRIX_PTR)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\tSIZEOF(ODITHER_MATRIX));\n  /* The inter-value distance for this color is MAXJSAMPLE/(ncolors-1).\n   * Hence the dither value for the matrix cell with fill order f\n   * (f=0..N-1) should be (N-1-2*f)/(2*N) * MAXJSAMPLE/(ncolors-1).\n   * On 16-bit-int machine, be careful to avoid overflow.\n   */\n  den = 2 * ODITHER_CELLS * ((INT32) (ncolors - 1));\n  for (j = 0; j < ODITHER_SIZE; j++) {\n    for (k = 0; k < ODITHER_SIZE; k++) {\n      num = ((INT32) (ODITHER_CELLS-1 - 2*((int)base_dither_matrix[j][k])))\n\t    * MAXJSAMPLE;\n      /* Ensure round towards zero despite C's lack of consistency\n       * about rounding negative values in integer division...\n       */\n      odither[j][k] = (int) (num<0 ? -((-num)/den) : num/den);\n    }\n  }\n  return odither;\n}\n\n\n/*\n * Create the ordered-dither tables.\n * Components having the same number of representative colors may \n * share a dither table.\n */\n\nLOCAL(void)\ncreate_odither_tables (j_decompress_ptr cinfo)\n{\n  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;\n  ODITHER_MATRIX_PTR odither;\n  int i, j, nci;\n\n  for (i = 0; i < cinfo->out_color_components; i++) {\n    nci = cquantize->Ncolors[i]; /* # of distinct values for this color */\n    odither = NULL;\t\t/* search for matching prior component */\n    for (j = 0; j < i; j++) {\n      if (nci == cquantize->Ncolors[j]) {\n\todither = cquantize->odither[j];\n\tbreak;\n      }\n    }\n    if (odither == NULL)\t/* need a new table? */\n      odither = make_odither_array(cinfo, nci);\n    cquantize->odither[i] = odither;\n  }\n}\n\n\n/*\n * Map some rows of pixels to the output colormapped representation.\n */\n\nMETHODDEF(void)\ncolor_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf,\n\t\tJSAMPARRAY output_buf, int num_rows)\n/* General case, no dithering */\n{\n  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;\n  JSAMPARRAY colorindex = cquantize->colorindex;\n  register int pixcode, ci;\n  register JSAMPROW ptrin, ptrout;\n  int row;\n  JDIMENSION col;\n  JDIMENSION width = cinfo->output_width;\n  register int nc = cinfo->out_color_components;\n\n  for (row = 0; row < num_rows; row++) {\n    ptrin = input_buf[row];\n    ptrout = output_buf[row];\n    for (col = width; col > 0; col--) {\n      pixcode = 0;\n      for (ci = 0; ci < nc; ci++) {\n\tpixcode += GETJSAMPLE(colorindex[ci][GETJSAMPLE(*ptrin++)]);\n      }\n      *ptrout++ = (JSAMPLE) pixcode;\n    }\n  }\n}\n\n\nMETHODDEF(void)\ncolor_quantize3 (j_decompress_ptr cinfo, JSAMPARRAY input_buf,\n\t\t JSAMPARRAY output_buf, int num_rows)\n/* Fast path for out_color_components==3, no dithering */\n{\n  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;\n  register int pixcode;\n  register JSAMPROW ptrin, ptrout;\n  JSAMPROW colorindex0 = cquantize->colorindex[0];\n  JSAMPROW colorindex1 = cquantize->colorindex[1];\n  JSAMPROW colorindex2 = cquantize->colorindex[2];\n  int row;\n  JDIMENSION col;\n  JDIMENSION width = cinfo->output_width;\n\n  for (row = 0; row < num_rows; row++) {\n    ptrin = input_buf[row];\n    ptrout = output_buf[row];\n    for (col = width; col > 0; col--) {\n      pixcode  = GETJSAMPLE(colorindex0[GETJSAMPLE(*ptrin++)]);\n      pixcode += GETJSAMPLE(colorindex1[GETJSAMPLE(*ptrin++)]);\n      pixcode += GETJSAMPLE(colorindex2[GETJSAMPLE(*ptrin++)]);\n      *ptrout++ = (JSAMPLE) pixcode;\n    }\n  }\n}\n\n\nMETHODDEF(void)\nquantize_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,\n\t\t     JSAMPARRAY output_buf, int num_rows)\n/* General case, with ordered dithering */\n{\n  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;\n  register JSAMPROW input_ptr;\n  register JSAMPROW output_ptr;\n  JSAMPROW colorindex_ci;\n  int * dither;\t\t\t/* points to active row of dither matrix */\n  int row_index, col_index;\t/* current indexes into dither matrix */\n  int nc = cinfo->out_color_components;\n  int ci;\n  int row;\n  JDIMENSION col;\n  JDIMENSION width = cinfo->output_width;\n\n  for (row = 0; row < num_rows; row++) {\n    /* Initialize output values to 0 so can process components separately */\n    jzero_far((void FAR *) output_buf[row],\n\t      (size_t) (width * SIZEOF(JSAMPLE)));\n    row_index = cquantize->row_index;\n    for (ci = 0; ci < nc; ci++) {\n      input_ptr = input_buf[row] + ci;\n      output_ptr = output_buf[row];\n      colorindex_ci = cquantize->colorindex[ci];\n      dither = cquantize->odither[ci][row_index];\n      col_index = 0;\n\n      for (col = width; col > 0; col--) {\n\t/* Form pixel value + dither, range-limit to 0..MAXJSAMPLE,\n\t * select output value, accumulate into output code for this pixel.\n\t * Range-limiting need not be done explicitly, as we have extended\n\t * the colorindex table to produce the right answers for out-of-range\n\t * inputs.  The maximum dither is +- MAXJSAMPLE; this sets the\n\t * required amount of padding.\n\t */\n\t*output_ptr += colorindex_ci[GETJSAMPLE(*input_ptr)+dither[col_index]];\n\tinput_ptr += nc;\n\toutput_ptr++;\n\tcol_index = (col_index + 1) & ODITHER_MASK;\n      }\n    }\n    /* Advance row index for next row */\n    row_index = (row_index + 1) & ODITHER_MASK;\n    cquantize->row_index = row_index;\n  }\n}\n\n\nMETHODDEF(void)\nquantize3_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,\n\t\t      JSAMPARRAY output_buf, int num_rows)\n/* Fast path for out_color_components==3, with ordered dithering */\n{\n  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;\n  register int pixcode;\n  register JSAMPROW input_ptr;\n  register JSAMPROW output_ptr;\n  JSAMPROW colorindex0 = cquantize->colorindex[0];\n  JSAMPROW colorindex1 = cquantize->colorindex[1];\n  JSAMPROW colorindex2 = cquantize->colorindex[2];\n  int * dither0;\t\t/* points to active row of dither matrix */\n  int * dither1;\n  int * dither2;\n  int row_index, col_index;\t/* current indexes into dither matrix */\n  int row;\n  JDIMENSION col;\n  JDIMENSION width = cinfo->output_width;\n\n  for (row = 0; row < num_rows; row++) {\n    row_index = cquantize->row_index;\n    input_ptr = input_buf[row];\n    output_ptr = output_buf[row];\n    dither0 = cquantize->odither[0][row_index];\n    dither1 = cquantize->odither[1][row_index];\n    dither2 = cquantize->odither[2][row_index];\n    col_index = 0;\n\n    for (col = width; col > 0; col--) {\n      pixcode  = GETJSAMPLE(colorindex0[GETJSAMPLE(*input_ptr++) +\n\t\t\t\t\tdither0[col_index]]);\n      pixcode += GETJSAMPLE(colorindex1[GETJSAMPLE(*input_ptr++) +\n\t\t\t\t\tdither1[col_index]]);\n      pixcode += GETJSAMPLE(colorindex2[GETJSAMPLE(*input_ptr++) +\n\t\t\t\t\tdither2[col_index]]);\n      *output_ptr++ = (JSAMPLE) pixcode;\n      col_index = (col_index + 1) & ODITHER_MASK;\n    }\n    row_index = (row_index + 1) & ODITHER_MASK;\n    cquantize->row_index = row_index;\n  }\n}\n\n\nMETHODDEF(void)\nquantize_fs_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,\n\t\t    JSAMPARRAY output_buf, int num_rows)\n/* General case, with Floyd-Steinberg dithering */\n{\n  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;\n  register LOCFSERROR cur;\t/* current error or pixel value */\n  LOCFSERROR belowerr;\t\t/* error for pixel below cur */\n  LOCFSERROR bpreverr;\t\t/* error for below/prev col */\n  LOCFSERROR bnexterr;\t\t/* error for below/next col */\n  LOCFSERROR delta;\n  register FSERRPTR errorptr;\t/* => fserrors[] at column before current */\n  register JSAMPROW input_ptr;\n  register JSAMPROW output_ptr;\n  JSAMPROW colorindex_ci;\n  JSAMPROW colormap_ci;\n  int pixcode;\n  int nc = cinfo->out_color_components;\n  int dir;\t\t\t/* 1 for left-to-right, -1 for right-to-left */\n  int dirnc;\t\t\t/* dir * nc */\n  int ci;\n  int row;\n  JDIMENSION col;\n  JDIMENSION width = cinfo->output_width;\n  JSAMPLE *range_limit = cinfo->sample_range_limit;\n  SHIFT_TEMPS\n\n  for (row = 0; row < num_rows; row++) {\n    /* Initialize output values to 0 so can process components separately */\n    jzero_far((void FAR *) output_buf[row],\n\t      (size_t) (width * SIZEOF(JSAMPLE)));\n    for (ci = 0; ci < nc; ci++) {\n      input_ptr = input_buf[row] + ci;\n      output_ptr = output_buf[row];\n      if (cquantize->on_odd_row) {\n\t/* work right to left in this row */\n\tinput_ptr += (width-1) * nc; /* so point to rightmost pixel */\n\toutput_ptr += width-1;\n\tdir = -1;\n\tdirnc = -nc;\n\terrorptr = cquantize->fserrors[ci] + (width+1); /* => entry after last column */\n      } else {\n\t/* work left to right in this row */\n\tdir = 1;\n\tdirnc = nc;\n\terrorptr = cquantize->fserrors[ci]; /* => entry before first column */\n      }\n      colorindex_ci = cquantize->colorindex[ci];\n      colormap_ci = cquantize->sv_colormap[ci];\n      /* Preset error values: no error propagated to first pixel from left */\n      cur = 0;\n      /* and no error propagated to row below yet */\n      belowerr = bpreverr = 0;\n\n      for (col = width; col > 0; col--) {\n\t/* cur holds the error propagated from the previous pixel on the\n\t * current line.  Add the error propagated from the previous line\n\t * to form the complete error correction term for this pixel, and\n\t * round the error term (which is expressed * 16) to an integer.\n\t * RIGHT_SHIFT rounds towards minus infinity, so adding 8 is correct\n\t * for either sign of the error value.\n\t * Note: errorptr points to *previous* column's array entry.\n\t */\n\tcur = RIGHT_SHIFT(cur + errorptr[dir] + 8, 4);\n\t/* Form pixel value + error, and range-limit to 0..MAXJSAMPLE.\n\t * The maximum error is +- MAXJSAMPLE; this sets the required size\n\t * of the range_limit array.\n\t */\n\tcur += GETJSAMPLE(*input_ptr);\n\tcur = GETJSAMPLE(range_limit[cur]);\n\t/* Select output value, accumulate into output code for this pixel */\n\tpixcode = GETJSAMPLE(colorindex_ci[cur]);\n\t*output_ptr += (JSAMPLE) pixcode;\n\t/* Compute actual representation error at this pixel */\n\t/* Note: we can do this even though we don't have the final */\n\t/* pixel code, because the colormap is orthogonal. */\n\tcur -= GETJSAMPLE(colormap_ci[pixcode]);\n\t/* Compute error fractions to be propagated to adjacent pixels.\n\t * Add these into the running sums, and simultaneously shift the\n\t * next-line error sums left by 1 column.\n\t */\n\tbnexterr = cur;\n\tdelta = cur * 2;\n\tcur += delta;\t\t/* form error * 3 */\n\terrorptr[0] = (FSERROR) (bpreverr + cur);\n\tcur += delta;\t\t/* form error * 5 */\n\tbpreverr = belowerr + cur;\n\tbelowerr = bnexterr;\n\tcur += delta;\t\t/* form error * 7 */\n\t/* At this point cur contains the 7/16 error value to be propagated\n\t * to the next pixel on the current line, and all the errors for the\n\t * next line have been shifted over. We are therefore ready to move on.\n\t */\n\tinput_ptr += dirnc;\t/* advance input ptr to next column */\n\toutput_ptr += dir;\t/* advance output ptr to next column */\n\terrorptr += dir;\t/* advance errorptr to current column */\n      }\n      /* Post-loop cleanup: we must unload the final error value into the\n       * final fserrors[] entry.  Note we need not unload belowerr because\n       * it is for the dummy column before or after the actual array.\n       */\n      errorptr[0] = (FSERROR) bpreverr; /* unload prev err into array */\n    }\n    cquantize->on_odd_row = (cquantize->on_odd_row ? FALSE : TRUE);\n  }\n}\n\n\n/*\n * Allocate workspace for Floyd-Steinberg errors.\n */\n\nLOCAL(void)\nalloc_fs_workspace (j_decompress_ptr cinfo)\n{\n  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;\n  size_t arraysize;\n  int i;\n\n  arraysize = (size_t) ((cinfo->output_width + 2) * SIZEOF(FSERROR));\n  for (i = 0; i < cinfo->out_color_components; i++) {\n    cquantize->fserrors[i] = (FSERRPTR)\n      (*cinfo->mem->alloc_large)((j_common_ptr) cinfo, JPOOL_IMAGE, arraysize);\n  }\n}\n\n\n/*\n * Initialize for one-pass color quantization.\n */\n\nMETHODDEF(void)\nstart_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan)\n{\n  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;\n  size_t arraysize;\n  int i;\n\n  /* Install my colormap. */\n  cinfo->colormap = cquantize->sv_colormap;\n  cinfo->actual_number_of_colors = cquantize->sv_actual;\n\n  /* Initialize for desired dithering mode. */\n  switch (cinfo->dither_mode) {\n  case JDITHER_NONE:\n    if (cinfo->out_color_components == 3)\n      cquantize->pub.color_quantize = color_quantize3;\n    else\n      cquantize->pub.color_quantize = color_quantize;\n    break;\n  case JDITHER_ORDERED:\n    if (cinfo->out_color_components == 3)\n      cquantize->pub.color_quantize = quantize3_ord_dither;\n    else\n      cquantize->pub.color_quantize = quantize_ord_dither;\n    cquantize->row_index = 0;\t/* initialize state for ordered dither */\n    /* If user changed to ordered dither from another mode,\n     * we must recreate the color index table with padding.\n     * This will cost extra space, but probably isn't very likely.\n     */\n    if (! cquantize->is_padded)\n      create_colorindex(cinfo);\n    /* Create ordered-dither tables if we didn't already. */\n    if (cquantize->odither[0] == NULL)\n      create_odither_tables(cinfo);\n    break;\n  case JDITHER_FS:\n    cquantize->pub.color_quantize = quantize_fs_dither;\n    cquantize->on_odd_row = FALSE; /* initialize state for F-S dither */\n    /* Allocate Floyd-Steinberg workspace if didn't already. */\n    if (cquantize->fserrors[0] == NULL)\n      alloc_fs_workspace(cinfo);\n    /* Initialize the propagated errors to zero. */\n    arraysize = (size_t) ((cinfo->output_width + 2) * SIZEOF(FSERROR));\n    for (i = 0; i < cinfo->out_color_components; i++)\n      jzero_far((void FAR *) cquantize->fserrors[i], arraysize);\n    break;\n  default:\n    ERREXIT(cinfo, JERR_NOT_COMPILED);\n    break;\n  }\n}\n\n\n/*\n * Finish up at the end of the pass.\n */\n\nMETHODDEF(void)\nfinish_pass_1_quant (j_decompress_ptr cinfo)\n{\n  /* no work in 1-pass case */\n}\n\n\n/*\n * Switch to a new external colormap between output passes.\n * Shouldn't get to this module!\n */\n\nMETHODDEF(void)\nnew_color_map_1_quant (j_decompress_ptr cinfo)\n{\n  ERREXIT(cinfo, JERR_MODE_CHANGE);\n}\n\n\n/*\n * Module initialization routine for 1-pass color quantization.\n */\n\nGLOBAL(void)\njinit_1pass_quantizer (j_decompress_ptr cinfo)\n{\n  my_cquantize_ptr cquantize;\n\n  cquantize = (my_cquantize_ptr)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\tSIZEOF(my_cquantizer));\n  cinfo->cquantize = (struct jpeg_color_quantizer *) cquantize;\n  cquantize->pub.start_pass = start_pass_1_quant;\n  cquantize->pub.finish_pass = finish_pass_1_quant;\n  cquantize->pub.new_color_map = new_color_map_1_quant;\n  cquantize->fserrors[0] = NULL; /* Flag FS workspace not allocated */\n  cquantize->odither[0] = NULL;\t/* Also flag odither arrays not allocated */\n\n  /* Make sure my internal arrays won't overflow */\n  if (cinfo->out_color_components > MAX_Q_COMPS)\n    ERREXIT1(cinfo, JERR_QUANT_COMPONENTS, MAX_Q_COMPS);\n  /* Make sure colormap indexes can be represented by JSAMPLEs */\n  if (cinfo->desired_number_of_colors > (MAXJSAMPLE+1))\n    ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXJSAMPLE+1);\n\n  /* Create the colormap and color index table. */\n  create_colormap(cinfo);\n  create_colorindex(cinfo);\n\n  /* Allocate Floyd-Steinberg workspace now if requested.\n   * We do this now since it is FAR storage and may affect the memory\n   * manager's space calculations.  If the user changes to FS dither\n   * mode in a later pass, we will allocate the space then, and will\n   * possibly overrun the max_memory_to_use setting.\n   */\n  if (cinfo->dither_mode == JDITHER_FS)\n    alloc_fs_workspace(cinfo);\n}\n\n#endif /* QUANT_1PASS_SUPPORTED */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jquant2.c",
    "content": "/*\n * jquant2.c\n *\n * Copyright (C) 1991-1996, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains 2-pass color quantization (color mapping) routines.\n * These routines provide selection of a custom color map for an image,\n * followed by mapping of the image to that color map, with optional\n * Floyd-Steinberg dithering.\n * It is also possible to use just the second pass to map to an arbitrary\n * externally-given color map.\n *\n * Note: ordered dithering is not supported, since there isn't any fast\n * way to compute intercolor distances; it's unclear that ordered dither's\n * fundamental assumptions even hold with an irregularly spaced color map.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n\n#ifdef QUANT_2PASS_SUPPORTED\n\n\n/*\n * This module implements the well-known Heckbert paradigm for color\n * quantization.  Most of the ideas used here can be traced back to\n * Heckbert's seminal paper\n *   Heckbert, Paul.  \"Color Image Quantization for Frame Buffer Display\",\n *   Proc. SIGGRAPH '82, Computer Graphics v.16 #3 (July 1982), pp 297-304.\n *\n * In the first pass over the image, we accumulate a histogram showing the\n * usage count of each possible color.  To keep the histogram to a reasonable\n * size, we reduce the precision of the input; typical practice is to retain\n * 5 or 6 bits per color, so that 8 or 4 different input values are counted\n * in the same histogram cell.\n *\n * Next, the color-selection step begins with a box representing the whole\n * color space, and repeatedly splits the \"largest\" remaining box until we\n * have as many boxes as desired colors.  Then the mean color in each\n * remaining box becomes one of the possible output colors.\n * \n * The second pass over the image maps each input pixel to the closest output\n * color (optionally after applying a Floyd-Steinberg dithering correction).\n * This mapping is logically trivial, but making it go fast enough requires\n * considerable care.\n *\n * Heckbert-style quantizers vary a good deal in their policies for choosing\n * the \"largest\" box and deciding where to cut it.  The particular policies\n * used here have proved out well in experimental comparisons, but better ones\n * may yet be found.\n *\n * In earlier versions of the IJG code, this module quantized in YCbCr color\n * space, processing the raw upsampled data without a color conversion step.\n * This allowed the color conversion math to be done only once per colormap\n * entry, not once per pixel.  However, that optimization precluded other\n * useful optimizations (such as merging color conversion with upsampling)\n * and it also interfered with desired capabilities such as quantizing to an\n * externally-supplied colormap.  We have therefore abandoned that approach.\n * The present code works in the post-conversion color space, typically RGB.\n *\n * To improve the visual quality of the results, we actually work in scaled\n * RGB space, giving G distances more weight than R, and R in turn more than\n * B.  To do everything in integer math, we must use integer scale factors.\n * The 2/3/1 scale factors used here correspond loosely to the relative\n * weights of the colors in the NTSC grayscale equation.\n * If you want to use this code to quantize a non-RGB color space, you'll\n * probably need to change these scale factors.\n */\n\n#define R_SCALE 2\t\t/* scale R distances by this much */\n#define G_SCALE 3\t\t/* scale G distances by this much */\n#define B_SCALE 1\t\t/* and B by this much */\n\n/* Relabel R/G/B as components 0/1/2, respecting the RGB ordering defined\n * in jmorecfg.h.  As the code stands, it will do the right thing for R,G,B\n * and B,G,R orders.  If you define some other weird order in jmorecfg.h,\n * you'll get compile errors until you extend this logic.  In that case\n * you'll probably want to tweak the histogram sizes too.\n */\n\n#if RGB_RED == 0\n#define C0_SCALE R_SCALE\n#endif\n#if RGB_BLUE == 0\n#define C0_SCALE B_SCALE\n#endif\n#if RGB_GREEN == 1\n#define C1_SCALE G_SCALE\n#endif\n#if RGB_RED == 2\n#define C2_SCALE R_SCALE\n#endif\n#if RGB_BLUE == 2\n#define C2_SCALE B_SCALE\n#endif\n\n\n/*\n * First we have the histogram data structure and routines for creating it.\n *\n * The number of bits of precision can be adjusted by changing these symbols.\n * We recommend keeping 6 bits for G and 5 each for R and B.\n * If you have plenty of memory and cycles, 6 bits all around gives marginally\n * better results; if you are short of memory, 5 bits all around will save\n * some space but degrade the results.\n * To maintain a fully accurate histogram, we'd need to allocate a \"long\"\n * (preferably unsigned long) for each cell.  In practice this is overkill;\n * we can get by with 16 bits per cell.  Few of the cell counts will overflow,\n * and clamping those that do overflow to the maximum value will give close-\n * enough results.  This reduces the recommended histogram size from 256Kb\n * to 128Kb, which is a useful savings on PC-class machines.\n * (In the second pass the histogram space is re-used for pixel mapping data;\n * in that capacity, each cell must be able to store zero to the number of\n * desired colors.  16 bits/cell is plenty for that too.)\n * Since the JPEG code is intended to run in small memory model on 80x86\n * machines, we can't just allocate the histogram in one chunk.  Instead\n * of a true 3-D array, we use a row of pointers to 2-D arrays.  Each\n * pointer corresponds to a C0 value (typically 2^5 = 32 pointers) and\n * each 2-D array has 2^6*2^5 = 2048 or 2^6*2^6 = 4096 entries.  Note that\n * on 80x86 machines, the pointer row is in near memory but the actual\n * arrays are in far memory (same arrangement as we use for image arrays).\n */\n\n#define MAXNUMCOLORS  (MAXJSAMPLE+1) /* maximum size of colormap */\n\n/* These will do the right thing for either R,G,B or B,G,R color order,\n * but you may not like the results for other color orders.\n */\n#define HIST_C0_BITS  5\t\t/* bits of precision in R/B histogram */\n#define HIST_C1_BITS  6\t\t/* bits of precision in G histogram */\n#define HIST_C2_BITS  5\t\t/* bits of precision in B/R histogram */\n\n/* Number of elements along histogram axes. */\n#define HIST_C0_ELEMS  (1<<HIST_C0_BITS)\n#define HIST_C1_ELEMS  (1<<HIST_C1_BITS)\n#define HIST_C2_ELEMS  (1<<HIST_C2_BITS)\n\n/* These are the amounts to shift an input value to get a histogram index. */\n#define C0_SHIFT  (BITS_IN_JSAMPLE-HIST_C0_BITS)\n#define C1_SHIFT  (BITS_IN_JSAMPLE-HIST_C1_BITS)\n#define C2_SHIFT  (BITS_IN_JSAMPLE-HIST_C2_BITS)\n\n\ntypedef UINT16 histcell;\t/* histogram cell; prefer an unsigned type */\n\ntypedef histcell FAR * histptr;\t/* for pointers to histogram cells */\n\ntypedef histcell hist1d[HIST_C2_ELEMS]; /* typedefs for the array */\ntypedef hist1d FAR * hist2d;\t/* type for the 2nd-level pointers */\ntypedef hist2d * hist3d;\t/* type for top-level pointer */\n\n\n/* Declarations for Floyd-Steinberg dithering.\n *\n * Errors are accumulated into the array fserrors[], at a resolution of\n * 1/16th of a pixel count.  The error at a given pixel is propagated\n * to its not-yet-processed neighbors using the standard F-S fractions,\n *\t\t...\t(here)\t7/16\n *\t\t3/16\t5/16\t1/16\n * We work left-to-right on even rows, right-to-left on odd rows.\n *\n * We can get away with a single array (holding one row's worth of errors)\n * by using it to store the current row's errors at pixel columns not yet\n * processed, but the next row's errors at columns already processed.  We\n * need only a few extra variables to hold the errors immediately around the\n * current column.  (If we are lucky, those variables are in registers, but\n * even if not, they're probably cheaper to access than array elements are.)\n *\n * The fserrors[] array has (#columns + 2) entries; the extra entry at\n * each end saves us from special-casing the first and last pixels.\n * Each entry is three values long, one value for each color component.\n *\n * Note: on a wide image, we might not have enough room in a PC's near data\n * segment to hold the error array; so it is allocated with alloc_large.\n */\n\n#if BITS_IN_JSAMPLE == 8\ntypedef INT16 FSERROR;\t\t/* 16 bits should be enough */\ntypedef int LOCFSERROR;\t\t/* use 'int' for calculation temps */\n#else\ntypedef INT32 FSERROR;\t\t/* may need more than 16 bits */\ntypedef INT32 LOCFSERROR;\t/* be sure calculation temps are big enough */\n#endif\n\ntypedef FSERROR FAR *FSERRPTR;\t/* pointer to error array (in FAR storage!) */\n\n\n/* Private subobject */\n\ntypedef struct {\n  struct jpeg_color_quantizer pub; /* public fields */\n\n  /* Space for the eventually created colormap is stashed here */\n  JSAMPARRAY sv_colormap;\t/* colormap allocated at init time */\n  int desired;\t\t\t/* desired # of colors = size of colormap */\n\n  /* Variables for accumulating image statistics */\n  hist3d histogram;\t\t/* pointer to the histogram */\n\n  boolean needs_zeroed;\t\t/* TRUE if next pass must zero histogram */\n\n  /* Variables for Floyd-Steinberg dithering */\n  FSERRPTR fserrors;\t\t/* accumulated errors */\n  boolean on_odd_row;\t\t/* flag to remember which row we are on */\n  int * error_limiter;\t\t/* table for clamping the applied error */\n} my_cquantizer;\n\ntypedef my_cquantizer * my_cquantize_ptr;\n\n\n/*\n * Prescan some rows of pixels.\n * In this module the prescan simply updates the histogram, which has been\n * initialized to zeroes by start_pass.\n * An output_buf parameter is required by the method signature, but no data\n * is actually output (in fact the buffer controller is probably passing a\n * NULL pointer).\n */\n\nMETHODDEF(void)\nprescan_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf,\n\t\t  JSAMPARRAY output_buf, int num_rows)\n{\n  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;\n  register JSAMPROW ptr;\n  register histptr histp;\n  register hist3d histogram = cquantize->histogram;\n  int row;\n  JDIMENSION col;\n  JDIMENSION width = cinfo->output_width;\n\n  for (row = 0; row < num_rows; row++) {\n    ptr = input_buf[row];\n    for (col = width; col > 0; col--) {\n      /* get pixel value and index into the histogram */\n      histp = & histogram[GETJSAMPLE(ptr[0]) >> C0_SHIFT]\n\t\t\t [GETJSAMPLE(ptr[1]) >> C1_SHIFT]\n\t\t\t [GETJSAMPLE(ptr[2]) >> C2_SHIFT];\n      /* increment, check for overflow and undo increment if so. */\n      if (++(*histp) <= 0)\n\t(*histp)--;\n      ptr += 3;\n    }\n  }\n}\n\n\n/*\n * Next we have the really interesting routines: selection of a colormap\n * given the completed histogram.\n * These routines work with a list of \"boxes\", each representing a rectangular\n * subset of the input color space (to histogram precision).\n */\n\ntypedef struct {\n  /* The bounds of the box (inclusive); expressed as histogram indexes */\n  int c0min, c0max;\n  int c1min, c1max;\n  int c2min, c2max;\n  /* The volume (actually 2-norm) of the box */\n  INT32 volume;\n  /* The number of nonzero histogram cells within this box */\n  long colorcount;\n} box;\n\ntypedef box * boxptr;\n\n\nLOCAL(boxptr)\nfind_biggest_color_pop (boxptr boxlist, int numboxes)\n/* Find the splittable box with the largest color population */\n/* Returns NULL if no splittable boxes remain */\n{\n  register boxptr boxp;\n  register int i;\n  register long maxc = 0;\n  boxptr which = NULL;\n  \n  for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) {\n    if (boxp->colorcount > maxc && boxp->volume > 0) {\n      which = boxp;\n      maxc = boxp->colorcount;\n    }\n  }\n  return which;\n}\n\n\nLOCAL(boxptr)\nfind_biggest_volume (boxptr boxlist, int numboxes)\n/* Find the splittable box with the largest (scaled) volume */\n/* Returns NULL if no splittable boxes remain */\n{\n  register boxptr boxp;\n  register int i;\n  register INT32 maxv = 0;\n  boxptr which = NULL;\n  \n  for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) {\n    if (boxp->volume > maxv) {\n      which = boxp;\n      maxv = boxp->volume;\n    }\n  }\n  return which;\n}\n\n\nLOCAL(void)\nupdate_box (j_decompress_ptr cinfo, boxptr boxp)\n/* Shrink the min/max bounds of a box to enclose only nonzero elements, */\n/* and recompute its volume and population */\n{\n  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;\n  hist3d histogram = cquantize->histogram;\n  histptr histp;\n  int c0,c1,c2;\n  int c0min,c0max,c1min,c1max,c2min,c2max;\n  INT32 dist0,dist1,dist2;\n  long ccount;\n  \n  c0min = boxp->c0min;  c0max = boxp->c0max;\n  c1min = boxp->c1min;  c1max = boxp->c1max;\n  c2min = boxp->c2min;  c2max = boxp->c2max;\n  \n  if (c0max > c0min)\n    for (c0 = c0min; c0 <= c0max; c0++)\n      for (c1 = c1min; c1 <= c1max; c1++) {\n\thistp = & histogram[c0][c1][c2min];\n\tfor (c2 = c2min; c2 <= c2max; c2++)\n\t  if (*histp++ != 0) {\n\t    boxp->c0min = c0min = c0;\n\t    goto have_c0min;\n\t  }\n      }\n have_c0min:\n  if (c0max > c0min)\n    for (c0 = c0max; c0 >= c0min; c0--)\n      for (c1 = c1min; c1 <= c1max; c1++) {\n\thistp = & histogram[c0][c1][c2min];\n\tfor (c2 = c2min; c2 <= c2max; c2++)\n\t  if (*histp++ != 0) {\n\t    boxp->c0max = c0max = c0;\n\t    goto have_c0max;\n\t  }\n      }\n have_c0max:\n  if (c1max > c1min)\n    for (c1 = c1min; c1 <= c1max; c1++)\n      for (c0 = c0min; c0 <= c0max; c0++) {\n\thistp = & histogram[c0][c1][c2min];\n\tfor (c2 = c2min; c2 <= c2max; c2++)\n\t  if (*histp++ != 0) {\n\t    boxp->c1min = c1min = c1;\n\t    goto have_c1min;\n\t  }\n      }\n have_c1min:\n  if (c1max > c1min)\n    for (c1 = c1max; c1 >= c1min; c1--)\n      for (c0 = c0min; c0 <= c0max; c0++) {\n\thistp = & histogram[c0][c1][c2min];\n\tfor (c2 = c2min; c2 <= c2max; c2++)\n\t  if (*histp++ != 0) {\n\t    boxp->c1max = c1max = c1;\n\t    goto have_c1max;\n\t  }\n      }\n have_c1max:\n  if (c2max > c2min)\n    for (c2 = c2min; c2 <= c2max; c2++)\n      for (c0 = c0min; c0 <= c0max; c0++) {\n\thistp = & histogram[c0][c1min][c2];\n\tfor (c1 = c1min; c1 <= c1max; c1++, histp += HIST_C2_ELEMS)\n\t  if (*histp != 0) {\n\t    boxp->c2min = c2min = c2;\n\t    goto have_c2min;\n\t  }\n      }\n have_c2min:\n  if (c2max > c2min)\n    for (c2 = c2max; c2 >= c2min; c2--)\n      for (c0 = c0min; c0 <= c0max; c0++) {\n\thistp = & histogram[c0][c1min][c2];\n\tfor (c1 = c1min; c1 <= c1max; c1++, histp += HIST_C2_ELEMS)\n\t  if (*histp != 0) {\n\t    boxp->c2max = c2max = c2;\n\t    goto have_c2max;\n\t  }\n      }\n have_c2max:\n\n  /* Update box volume.\n   * We use 2-norm rather than real volume here; this biases the method\n   * against making long narrow boxes, and it has the side benefit that\n   * a box is splittable iff norm > 0.\n   * Since the differences are expressed in histogram-cell units,\n   * we have to shift back to JSAMPLE units to get consistent distances;\n   * after which, we scale according to the selected distance scale factors.\n   */\n  dist0 = ((c0max - c0min) << C0_SHIFT) * C0_SCALE;\n  dist1 = ((c1max - c1min) << C1_SHIFT) * C1_SCALE;\n  dist2 = ((c2max - c2min) << C2_SHIFT) * C2_SCALE;\n  boxp->volume = dist0*dist0 + dist1*dist1 + dist2*dist2;\n  \n  /* Now scan remaining volume of box and compute population */\n  ccount = 0;\n  for (c0 = c0min; c0 <= c0max; c0++)\n    for (c1 = c1min; c1 <= c1max; c1++) {\n      histp = & histogram[c0][c1][c2min];\n      for (c2 = c2min; c2 <= c2max; c2++, histp++)\n\tif (*histp != 0) {\n\t  ccount++;\n\t}\n    }\n  boxp->colorcount = ccount;\n}\n\n\nLOCAL(int)\nmedian_cut (j_decompress_ptr cinfo, boxptr boxlist, int numboxes,\n\t    int desired_colors)\n/* Repeatedly select and split the largest box until we have enough boxes */\n{\n  int n,lb;\n  int c0,c1,c2,cmax;\n  register boxptr b1,b2;\n\n  while (numboxes < desired_colors) {\n    /* Select box to split.\n     * Current algorithm: by population for first half, then by volume.\n     */\n    if (numboxes*2 <= desired_colors) {\n      b1 = find_biggest_color_pop(boxlist, numboxes);\n    } else {\n      b1 = find_biggest_volume(boxlist, numboxes);\n    }\n    if (b1 == NULL)\t\t/* no splittable boxes left! */\n      break;\n    b2 = &boxlist[numboxes];\t/* where new box will go */\n    /* Copy the color bounds to the new box. */\n    b2->c0max = b1->c0max; b2->c1max = b1->c1max; b2->c2max = b1->c2max;\n    b2->c0min = b1->c0min; b2->c1min = b1->c1min; b2->c2min = b1->c2min;\n    /* Choose which axis to split the box on.\n     * Current algorithm: longest scaled axis.\n     * See notes in update_box about scaling distances.\n     */\n    c0 = ((b1->c0max - b1->c0min) << C0_SHIFT) * C0_SCALE;\n    c1 = ((b1->c1max - b1->c1min) << C1_SHIFT) * C1_SCALE;\n    c2 = ((b1->c2max - b1->c2min) << C2_SHIFT) * C2_SCALE;\n    /* We want to break any ties in favor of green, then red, blue last.\n     * This code does the right thing for R,G,B or B,G,R color orders only.\n     */\n#if RGB_RED == 0\n    cmax = c1; n = 1;\n    if (c0 > cmax) { cmax = c0; n = 0; }\n    if (c2 > cmax) { n = 2; }\n#else\n    cmax = c1; n = 1;\n    if (c2 > cmax) { cmax = c2; n = 2; }\n    if (c0 > cmax) { n = 0; }\n#endif\n    /* Choose split point along selected axis, and update box bounds.\n     * Current algorithm: split at halfway point.\n     * (Since the box has been shrunk to minimum volume,\n     * any split will produce two nonempty subboxes.)\n     * Note that lb value is max for lower box, so must be < old max.\n     */\n    switch (n) {\n    case 0:\n      lb = (b1->c0max + b1->c0min) / 2;\n      b1->c0max = lb;\n      b2->c0min = lb+1;\n      break;\n    case 1:\n      lb = (b1->c1max + b1->c1min) / 2;\n      b1->c1max = lb;\n      b2->c1min = lb+1;\n      break;\n    case 2:\n      lb = (b1->c2max + b1->c2min) / 2;\n      b1->c2max = lb;\n      b2->c2min = lb+1;\n      break;\n    }\n    /* Update stats for boxes */\n    update_box(cinfo, b1);\n    update_box(cinfo, b2);\n    numboxes++;\n  }\n  return numboxes;\n}\n\n\nLOCAL(void)\ncompute_color (j_decompress_ptr cinfo, boxptr boxp, int icolor)\n/* Compute representative color for a box, put it in colormap[icolor] */\n{\n  /* Current algorithm: mean weighted by pixels (not colors) */\n  /* Note it is important to get the rounding correct! */\n  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;\n  hist3d histogram = cquantize->histogram;\n  histptr histp;\n  int c0,c1,c2;\n  int c0min,c0max,c1min,c1max,c2min,c2max;\n  long count;\n  long total = 0;\n  long c0total = 0;\n  long c1total = 0;\n  long c2total = 0;\n  \n  c0min = boxp->c0min;  c0max = boxp->c0max;\n  c1min = boxp->c1min;  c1max = boxp->c1max;\n  c2min = boxp->c2min;  c2max = boxp->c2max;\n  \n  for (c0 = c0min; c0 <= c0max; c0++)\n    for (c1 = c1min; c1 <= c1max; c1++) {\n      histp = & histogram[c0][c1][c2min];\n      for (c2 = c2min; c2 <= c2max; c2++) {\n\tif ((count = *histp++) != 0) {\n\t  total += count;\n\t  c0total += ((c0 << C0_SHIFT) + ((1<<C0_SHIFT)>>1)) * count;\n\t  c1total += ((c1 << C1_SHIFT) + ((1<<C1_SHIFT)>>1)) * count;\n\t  c2total += ((c2 << C2_SHIFT) + ((1<<C2_SHIFT)>>1)) * count;\n\t}\n      }\n    }\n  \n  cinfo->colormap[0][icolor] = (JSAMPLE) ((c0total + (total>>1)) / total);\n  cinfo->colormap[1][icolor] = (JSAMPLE) ((c1total + (total>>1)) / total);\n  cinfo->colormap[2][icolor] = (JSAMPLE) ((c2total + (total>>1)) / total);\n}\n\n\nLOCAL(void)\nselect_colors (j_decompress_ptr cinfo, int desired_colors)\n/* Master routine for color selection */\n{\n  boxptr boxlist;\n  int numboxes;\n  int i;\n\n  /* Allocate workspace for box list */\n  boxlist = (boxptr) (*cinfo->mem->alloc_small)\n    ((j_common_ptr) cinfo, JPOOL_IMAGE, desired_colors * SIZEOF(box));\n  /* Initialize one box containing whole space */\n  numboxes = 1;\n  boxlist[0].c0min = 0;\n  boxlist[0].c0max = MAXJSAMPLE >> C0_SHIFT;\n  boxlist[0].c1min = 0;\n  boxlist[0].c1max = MAXJSAMPLE >> C1_SHIFT;\n  boxlist[0].c2min = 0;\n  boxlist[0].c2max = MAXJSAMPLE >> C2_SHIFT;\n  /* Shrink it to actually-used volume and set its statistics */\n  update_box(cinfo, & boxlist[0]);\n  /* Perform median-cut to produce final box list */\n  numboxes = median_cut(cinfo, boxlist, numboxes, desired_colors);\n  /* Compute the representative color for each box, fill colormap */\n  for (i = 0; i < numboxes; i++)\n    compute_color(cinfo, & boxlist[i], i);\n  cinfo->actual_number_of_colors = numboxes;\n  TRACEMS1(cinfo, 1, JTRC_QUANT_SELECTED, numboxes);\n}\n\n\n/*\n * These routines are concerned with the time-critical task of mapping input\n * colors to the nearest color in the selected colormap.\n *\n * We re-use the histogram space as an \"inverse color map\", essentially a\n * cache for the results of nearest-color searches.  All colors within a\n * histogram cell will be mapped to the same colormap entry, namely the one\n * closest to the cell's center.  This may not be quite the closest entry to\n * the actual input color, but it's almost as good.  A zero in the cache\n * indicates we haven't found the nearest color for that cell yet; the array\n * is cleared to zeroes before starting the mapping pass.  When we find the\n * nearest color for a cell, its colormap index plus one is recorded in the\n * cache for future use.  The pass2 scanning routines call fill_inverse_cmap\n * when they need to use an unfilled entry in the cache.\n *\n * Our method of efficiently finding nearest colors is based on the \"locally\n * sorted search\" idea described by Heckbert and on the incremental distance\n * calculation described by Spencer W. Thomas in chapter III.1 of Graphics\n * Gems II (James Arvo, ed.  Academic Press, 1991).  Thomas points out that\n * the distances from a given colormap entry to each cell of the histogram can\n * be computed quickly using an incremental method: the differences between\n * distances to adjacent cells themselves differ by a constant.  This allows a\n * fairly fast implementation of the \"brute force\" approach of computing the\n * distance from every colormap entry to every histogram cell.  Unfortunately,\n * it needs a work array to hold the best-distance-so-far for each histogram\n * cell (because the inner loop has to be over cells, not colormap entries).\n * The work array elements have to be INT32s, so the work array would need\n * 256Kb at our recommended precision.  This is not feasible in DOS machines.\n *\n * To get around these problems, we apply Thomas' method to compute the\n * nearest colors for only the cells within a small subbox of the histogram.\n * The work array need be only as big as the subbox, so the memory usage\n * problem is solved.  Furthermore, we need not fill subboxes that are never\n * referenced in pass2; many images use only part of the color gamut, so a\n * fair amount of work is saved.  An additional advantage of this\n * approach is that we can apply Heckbert's locality criterion to quickly\n * eliminate colormap entries that are far away from the subbox; typically\n * three-fourths of the colormap entries are rejected by Heckbert's criterion,\n * and we need not compute their distances to individual cells in the subbox.\n * The speed of this approach is heavily influenced by the subbox size: too\n * small means too much overhead, too big loses because Heckbert's criterion\n * can't eliminate as many colormap entries.  Empirically the best subbox\n * size seems to be about 1/512th of the histogram (1/8th in each direction).\n *\n * Thomas' article also describes a refined method which is asymptotically\n * faster than the brute-force method, but it is also far more complex and\n * cannot efficiently be applied to small subboxes.  It is therefore not\n * useful for programs intended to be portable to DOS machines.  On machines\n * with plenty of memory, filling the whole histogram in one shot with Thomas'\n * refined method might be faster than the present code --- but then again,\n * it might not be any faster, and it's certainly more complicated.\n */\n\n\n/* log2(histogram cells in update box) for each axis; this can be adjusted */\n#define BOX_C0_LOG  (HIST_C0_BITS-3)\n#define BOX_C1_LOG  (HIST_C1_BITS-3)\n#define BOX_C2_LOG  (HIST_C2_BITS-3)\n\n#define BOX_C0_ELEMS  (1<<BOX_C0_LOG) /* # of hist cells in update box */\n#define BOX_C1_ELEMS  (1<<BOX_C1_LOG)\n#define BOX_C2_ELEMS  (1<<BOX_C2_LOG)\n\n#define BOX_C0_SHIFT  (C0_SHIFT + BOX_C0_LOG)\n#define BOX_C1_SHIFT  (C1_SHIFT + BOX_C1_LOG)\n#define BOX_C2_SHIFT  (C2_SHIFT + BOX_C2_LOG)\n\n\n/*\n * The next three routines implement inverse colormap filling.  They could\n * all be folded into one big routine, but splitting them up this way saves\n * some stack space (the mindist[] and bestdist[] arrays need not coexist)\n * and may allow some compilers to produce better code by registerizing more\n * inner-loop variables.\n */\n\nLOCAL(int)\nfind_nearby_colors (j_decompress_ptr cinfo, int minc0, int minc1, int minc2,\n\t\t    JSAMPLE colorlist[])\n/* Locate the colormap entries close enough to an update box to be candidates\n * for the nearest entry to some cell(s) in the update box.  The update box\n * is specified by the center coordinates of its first cell.  The number of\n * candidate colormap entries is returned, and their colormap indexes are\n * placed in colorlist[].\n * This routine uses Heckbert's \"locally sorted search\" criterion to select\n * the colors that need further consideration.\n */\n{\n  int numcolors = cinfo->actual_number_of_colors;\n  int maxc0, maxc1, maxc2;\n  int centerc0, centerc1, centerc2;\n  int i, x, ncolors;\n  INT32 minmaxdist, min_dist, max_dist, tdist;\n  INT32 mindist[MAXNUMCOLORS];\t/* min distance to colormap entry i */\n\n  /* Compute true coordinates of update box's upper corner and center.\n   * Actually we compute the coordinates of the center of the upper-corner\n   * histogram cell, which are the upper bounds of the volume we care about.\n   * Note that since \">>\" rounds down, the \"center\" values may be closer to\n   * min than to max; hence comparisons to them must be \"<=\", not \"<\".\n   */\n  maxc0 = minc0 + ((1 << BOX_C0_SHIFT) - (1 << C0_SHIFT));\n  centerc0 = (minc0 + maxc0) >> 1;\n  maxc1 = minc1 + ((1 << BOX_C1_SHIFT) - (1 << C1_SHIFT));\n  centerc1 = (minc1 + maxc1) >> 1;\n  maxc2 = minc2 + ((1 << BOX_C2_SHIFT) - (1 << C2_SHIFT));\n  centerc2 = (minc2 + maxc2) >> 1;\n\n  /* For each color in colormap, find:\n   *  1. its minimum squared-distance to any point in the update box\n   *     (zero if color is within update box);\n   *  2. its maximum squared-distance to any point in the update box.\n   * Both of these can be found by considering only the corners of the box.\n   * We save the minimum distance for each color in mindist[];\n   * only the smallest maximum distance is of interest.\n   */\n  minmaxdist = 0x7FFFFFFFL;\n\n  for (i = 0; i < numcolors; i++) {\n    /* We compute the squared-c0-distance term, then add in the other two. */\n    x = GETJSAMPLE(cinfo->colormap[0][i]);\n    if (x < minc0) {\n      tdist = (x - minc0) * C0_SCALE;\n      min_dist = tdist*tdist;\n      tdist = (x - maxc0) * C0_SCALE;\n      max_dist = tdist*tdist;\n    } else if (x > maxc0) {\n      tdist = (x - maxc0) * C0_SCALE;\n      min_dist = tdist*tdist;\n      tdist = (x - minc0) * C0_SCALE;\n      max_dist = tdist*tdist;\n    } else {\n      /* within cell range so no contribution to min_dist */\n      min_dist = 0;\n      if (x <= centerc0) {\n\ttdist = (x - maxc0) * C0_SCALE;\n\tmax_dist = tdist*tdist;\n      } else {\n\ttdist = (x - minc0) * C0_SCALE;\n\tmax_dist = tdist*tdist;\n      }\n    }\n\n    x = GETJSAMPLE(cinfo->colormap[1][i]);\n    if (x < minc1) {\n      tdist = (x - minc1) * C1_SCALE;\n      min_dist += tdist*tdist;\n      tdist = (x - maxc1) * C1_SCALE;\n      max_dist += tdist*tdist;\n    } else if (x > maxc1) {\n      tdist = (x - maxc1) * C1_SCALE;\n      min_dist += tdist*tdist;\n      tdist = (x - minc1) * C1_SCALE;\n      max_dist += tdist*tdist;\n    } else {\n      /* within cell range so no contribution to min_dist */\n      if (x <= centerc1) {\n\ttdist = (x - maxc1) * C1_SCALE;\n\tmax_dist += tdist*tdist;\n      } else {\n\ttdist = (x - minc1) * C1_SCALE;\n\tmax_dist += tdist*tdist;\n      }\n    }\n\n    x = GETJSAMPLE(cinfo->colormap[2][i]);\n    if (x < minc2) {\n      tdist = (x - minc2) * C2_SCALE;\n      min_dist += tdist*tdist;\n      tdist = (x - maxc2) * C2_SCALE;\n      max_dist += tdist*tdist;\n    } else if (x > maxc2) {\n      tdist = (x - maxc2) * C2_SCALE;\n      min_dist += tdist*tdist;\n      tdist = (x - minc2) * C2_SCALE;\n      max_dist += tdist*tdist;\n    } else {\n      /* within cell range so no contribution to min_dist */\n      if (x <= centerc2) {\n\ttdist = (x - maxc2) * C2_SCALE;\n\tmax_dist += tdist*tdist;\n      } else {\n\ttdist = (x - minc2) * C2_SCALE;\n\tmax_dist += tdist*tdist;\n      }\n    }\n\n    mindist[i] = min_dist;\t/* save away the results */\n    if (max_dist < minmaxdist)\n      minmaxdist = max_dist;\n  }\n\n  /* Now we know that no cell in the update box is more than minmaxdist\n   * away from some colormap entry.  Therefore, only colors that are\n   * within minmaxdist of some part of the box need be considered.\n   */\n  ncolors = 0;\n  for (i = 0; i < numcolors; i++) {\n    if (mindist[i] <= minmaxdist)\n      colorlist[ncolors++] = (JSAMPLE) i;\n  }\n  return ncolors;\n}\n\n\nLOCAL(void)\nfind_best_colors (j_decompress_ptr cinfo, int minc0, int minc1, int minc2,\n\t\t  int numcolors, JSAMPLE colorlist[], JSAMPLE bestcolor[])\n/* Find the closest colormap entry for each cell in the update box,\n * given the list of candidate colors prepared by find_nearby_colors.\n * Return the indexes of the closest entries in the bestcolor[] array.\n * This routine uses Thomas' incremental distance calculation method to\n * find the distance from a colormap entry to successive cells in the box.\n */\n{\n  int ic0, ic1, ic2;\n  int i, icolor;\n  register INT32 * bptr;\t/* pointer into bestdist[] array */\n  JSAMPLE * cptr;\t\t/* pointer into bestcolor[] array */\n  INT32 dist0, dist1;\t\t/* initial distance values */\n  register INT32 dist2;\t\t/* current distance in inner loop */\n  INT32 xx0, xx1;\t\t/* distance increments */\n  register INT32 xx2;\n  INT32 inc0, inc1, inc2;\t/* initial values for increments */\n  /* This array holds the distance to the nearest-so-far color for each cell */\n  INT32 bestdist[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS];\n\n  /* Initialize best-distance for each cell of the update box */\n  bptr = bestdist;\n  for (i = BOX_C0_ELEMS*BOX_C1_ELEMS*BOX_C2_ELEMS-1; i >= 0; i--)\n    *bptr++ = 0x7FFFFFFFL;\n  \n  /* For each color selected by find_nearby_colors,\n   * compute its distance to the center of each cell in the box.\n   * If that's less than best-so-far, update best distance and color number.\n   */\n  \n  /* Nominal steps between cell centers (\"x\" in Thomas article) */\n#define STEP_C0  ((1 << C0_SHIFT) * C0_SCALE)\n#define STEP_C1  ((1 << C1_SHIFT) * C1_SCALE)\n#define STEP_C2  ((1 << C2_SHIFT) * C2_SCALE)\n  \n  for (i = 0; i < numcolors; i++) {\n    icolor = GETJSAMPLE(colorlist[i]);\n    /* Compute (square of) distance from minc0/c1/c2 to this color */\n    inc0 = (minc0 - GETJSAMPLE(cinfo->colormap[0][icolor])) * C0_SCALE;\n    dist0 = inc0*inc0;\n    inc1 = (minc1 - GETJSAMPLE(cinfo->colormap[1][icolor])) * C1_SCALE;\n    dist0 += inc1*inc1;\n    inc2 = (minc2 - GETJSAMPLE(cinfo->colormap[2][icolor])) * C2_SCALE;\n    dist0 += inc2*inc2;\n    /* Form the initial difference increments */\n    inc0 = inc0 * (2 * STEP_C0) + STEP_C0 * STEP_C0;\n    inc1 = inc1 * (2 * STEP_C1) + STEP_C1 * STEP_C1;\n    inc2 = inc2 * (2 * STEP_C2) + STEP_C2 * STEP_C2;\n    /* Now loop over all cells in box, updating distance per Thomas method */\n    bptr = bestdist;\n    cptr = bestcolor;\n    xx0 = inc0;\n    for (ic0 = BOX_C0_ELEMS-1; ic0 >= 0; ic0--) {\n      dist1 = dist0;\n      xx1 = inc1;\n      for (ic1 = BOX_C1_ELEMS-1; ic1 >= 0; ic1--) {\n\tdist2 = dist1;\n\txx2 = inc2;\n\tfor (ic2 = BOX_C2_ELEMS-1; ic2 >= 0; ic2--) {\n\t  if (dist2 < *bptr) {\n\t    *bptr = dist2;\n\t    *cptr = (JSAMPLE) icolor;\n\t  }\n\t  dist2 += xx2;\n\t  xx2 += 2 * STEP_C2 * STEP_C2;\n\t  bptr++;\n\t  cptr++;\n\t}\n\tdist1 += xx1;\n\txx1 += 2 * STEP_C1 * STEP_C1;\n      }\n      dist0 += xx0;\n      xx0 += 2 * STEP_C0 * STEP_C0;\n    }\n  }\n}\n\n\nLOCAL(void)\nfill_inverse_cmap (j_decompress_ptr cinfo, int c0, int c1, int c2)\n/* Fill the inverse-colormap entries in the update box that contains */\n/* histogram cell c0/c1/c2.  (Only that one cell MUST be filled, but */\n/* we can fill as many others as we wish.) */\n{\n  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;\n  hist3d histogram = cquantize->histogram;\n  int minc0, minc1, minc2;\t/* lower left corner of update box */\n  int ic0, ic1, ic2;\n  register JSAMPLE * cptr;\t/* pointer into bestcolor[] array */\n  register histptr cachep;\t/* pointer into main cache array */\n  /* This array lists the candidate colormap indexes. */\n  JSAMPLE colorlist[MAXNUMCOLORS];\n  int numcolors;\t\t/* number of candidate colors */\n  /* This array holds the actually closest colormap index for each cell. */\n  JSAMPLE bestcolor[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS];\n\n  /* Convert cell coordinates to update box ID */\n  c0 >>= BOX_C0_LOG;\n  c1 >>= BOX_C1_LOG;\n  c2 >>= BOX_C2_LOG;\n\n  /* Compute true coordinates of update box's origin corner.\n   * Actually we compute the coordinates of the center of the corner\n   * histogram cell, which are the lower bounds of the volume we care about.\n   */\n  minc0 = (c0 << BOX_C0_SHIFT) + ((1 << C0_SHIFT) >> 1);\n  minc1 = (c1 << BOX_C1_SHIFT) + ((1 << C1_SHIFT) >> 1);\n  minc2 = (c2 << BOX_C2_SHIFT) + ((1 << C2_SHIFT) >> 1);\n  \n  /* Determine which colormap entries are close enough to be candidates\n   * for the nearest entry to some cell in the update box.\n   */\n  numcolors = find_nearby_colors(cinfo, minc0, minc1, minc2, colorlist);\n\n  /* Determine the actually nearest colors. */\n  find_best_colors(cinfo, minc0, minc1, minc2, numcolors, colorlist,\n\t\t   bestcolor);\n\n  /* Save the best color numbers (plus 1) in the main cache array */\n  c0 <<= BOX_C0_LOG;\t\t/* convert ID back to base cell indexes */\n  c1 <<= BOX_C1_LOG;\n  c2 <<= BOX_C2_LOG;\n  cptr = bestcolor;\n  for (ic0 = 0; ic0 < BOX_C0_ELEMS; ic0++) {\n    for (ic1 = 0; ic1 < BOX_C1_ELEMS; ic1++) {\n      cachep = & histogram[c0+ic0][c1+ic1][c2];\n      for (ic2 = 0; ic2 < BOX_C2_ELEMS; ic2++) {\n\t*cachep++ = (histcell) (GETJSAMPLE(*cptr++) + 1);\n      }\n    }\n  }\n}\n\n\n/*\n * Map some rows of pixels to the output colormapped representation.\n */\n\nMETHODDEF(void)\npass2_no_dither (j_decompress_ptr cinfo,\n\t\t JSAMPARRAY input_buf, JSAMPARRAY output_buf, int num_rows)\n/* This version performs no dithering */\n{\n  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;\n  hist3d histogram = cquantize->histogram;\n  register JSAMPROW inptr, outptr;\n  register histptr cachep;\n  register int c0, c1, c2;\n  int row;\n  JDIMENSION col;\n  JDIMENSION width = cinfo->output_width;\n\n  for (row = 0; row < num_rows; row++) {\n    inptr = input_buf[row];\n    outptr = output_buf[row];\n    for (col = width; col > 0; col--) {\n      /* get pixel value and index into the cache */\n      c0 = GETJSAMPLE(*inptr++) >> C0_SHIFT;\n      c1 = GETJSAMPLE(*inptr++) >> C1_SHIFT;\n      c2 = GETJSAMPLE(*inptr++) >> C2_SHIFT;\n      cachep = & histogram[c0][c1][c2];\n      /* If we have not seen this color before, find nearest colormap entry */\n      /* and update the cache */\n      if (*cachep == 0)\n\tfill_inverse_cmap(cinfo, c0,c1,c2);\n      /* Now emit the colormap index for this cell */\n      *outptr++ = (JSAMPLE) (*cachep - 1);\n    }\n  }\n}\n\n\nMETHODDEF(void)\npass2_fs_dither (j_decompress_ptr cinfo,\n\t\t JSAMPARRAY input_buf, JSAMPARRAY output_buf, int num_rows)\n/* This version performs Floyd-Steinberg dithering */\n{\n  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;\n  hist3d histogram = cquantize->histogram;\n  register LOCFSERROR cur0, cur1, cur2;\t/* current error or pixel value */\n  LOCFSERROR belowerr0, belowerr1, belowerr2; /* error for pixel below cur */\n  LOCFSERROR bpreverr0, bpreverr1, bpreverr2; /* error for below/prev col */\n  register FSERRPTR errorptr;\t/* => fserrors[] at column before current */\n  JSAMPROW inptr;\t\t/* => current input pixel */\n  JSAMPROW outptr;\t\t/* => current output pixel */\n  histptr cachep;\n  int dir;\t\t\t/* +1 or -1 depending on direction */\n  int dir3;\t\t\t/* 3*dir, for advancing inptr & errorptr */\n  int row;\n  JDIMENSION col;\n  JDIMENSION width = cinfo->output_width;\n  JSAMPLE *range_limit = cinfo->sample_range_limit;\n  int *error_limit = cquantize->error_limiter;\n  JSAMPROW colormap0 = cinfo->colormap[0];\n  JSAMPROW colormap1 = cinfo->colormap[1];\n  JSAMPROW colormap2 = cinfo->colormap[2];\n  SHIFT_TEMPS\n\n  for (row = 0; row < num_rows; row++) {\n    inptr = input_buf[row];\n    outptr = output_buf[row];\n    if (cquantize->on_odd_row) {\n      /* work right to left in this row */\n      inptr += (width-1) * 3;\t/* so point to rightmost pixel */\n      outptr += width-1;\n      dir = -1;\n      dir3 = -3;\n      errorptr = cquantize->fserrors + (width+1)*3; /* => entry after last column */\n      cquantize->on_odd_row = FALSE; /* flip for next time */\n    } else {\n      /* work left to right in this row */\n      dir = 1;\n      dir3 = 3;\n      errorptr = cquantize->fserrors; /* => entry before first real column */\n      cquantize->on_odd_row = TRUE; /* flip for next time */\n    }\n    /* Preset error values: no error propagated to first pixel from left */\n    cur0 = cur1 = cur2 = 0;\n    /* and no error propagated to row below yet */\n    belowerr0 = belowerr1 = belowerr2 = 0;\n    bpreverr0 = bpreverr1 = bpreverr2 = 0;\n\n    for (col = width; col > 0; col--) {\n      /* curN holds the error propagated from the previous pixel on the\n       * current line.  Add the error propagated from the previous line\n       * to form the complete error correction term for this pixel, and\n       * round the error term (which is expressed * 16) to an integer.\n       * RIGHT_SHIFT rounds towards minus infinity, so adding 8 is correct\n       * for either sign of the error value.\n       * Note: errorptr points to *previous* column's array entry.\n       */\n      cur0 = RIGHT_SHIFT(cur0 + errorptr[dir3+0] + 8, 4);\n      cur1 = RIGHT_SHIFT(cur1 + errorptr[dir3+1] + 8, 4);\n      cur2 = RIGHT_SHIFT(cur2 + errorptr[dir3+2] + 8, 4);\n      /* Limit the error using transfer function set by init_error_limit.\n       * See comments with init_error_limit for rationale.\n       */\n      cur0 = error_limit[cur0];\n      cur1 = error_limit[cur1];\n      cur2 = error_limit[cur2];\n      /* Form pixel value + error, and range-limit to 0..MAXJSAMPLE.\n       * The maximum error is +- MAXJSAMPLE (or less with error limiting);\n       * this sets the required size of the range_limit array.\n       */\n      cur0 += GETJSAMPLE(inptr[0]);\n      cur1 += GETJSAMPLE(inptr[1]);\n      cur2 += GETJSAMPLE(inptr[2]);\n      cur0 = GETJSAMPLE(range_limit[cur0]);\n      cur1 = GETJSAMPLE(range_limit[cur1]);\n      cur2 = GETJSAMPLE(range_limit[cur2]);\n      /* Index into the cache with adjusted pixel value */\n      cachep = & histogram[cur0>>C0_SHIFT][cur1>>C1_SHIFT][cur2>>C2_SHIFT];\n      /* If we have not seen this color before, find nearest colormap */\n      /* entry and update the cache */\n      if (*cachep == 0)\n\tfill_inverse_cmap(cinfo, cur0>>C0_SHIFT,cur1>>C1_SHIFT,cur2>>C2_SHIFT);\n      /* Now emit the colormap index for this cell */\n      { register int pixcode = *cachep - 1;\n\t*outptr = (JSAMPLE) pixcode;\n\t/* Compute representation error for this pixel */\n\tcur0 -= GETJSAMPLE(colormap0[pixcode]);\n\tcur1 -= GETJSAMPLE(colormap1[pixcode]);\n\tcur2 -= GETJSAMPLE(colormap2[pixcode]);\n      }\n      /* Compute error fractions to be propagated to adjacent pixels.\n       * Add these into the running sums, and simultaneously shift the\n       * next-line error sums left by 1 column.\n       */\n      { register LOCFSERROR bnexterr, delta;\n\n\tbnexterr = cur0;\t/* Process component 0 */\n\tdelta = cur0 * 2;\n\tcur0 += delta;\t\t/* form error * 3 */\n\terrorptr[0] = (FSERROR) (bpreverr0 + cur0);\n\tcur0 += delta;\t\t/* form error * 5 */\n\tbpreverr0 = belowerr0 + cur0;\n\tbelowerr0 = bnexterr;\n\tcur0 += delta;\t\t/* form error * 7 */\n\tbnexterr = cur1;\t/* Process component 1 */\n\tdelta = cur1 * 2;\n\tcur1 += delta;\t\t/* form error * 3 */\n\terrorptr[1] = (FSERROR) (bpreverr1 + cur1);\n\tcur1 += delta;\t\t/* form error * 5 */\n\tbpreverr1 = belowerr1 + cur1;\n\tbelowerr1 = bnexterr;\n\tcur1 += delta;\t\t/* form error * 7 */\n\tbnexterr = cur2;\t/* Process component 2 */\n\tdelta = cur2 * 2;\n\tcur2 += delta;\t\t/* form error * 3 */\n\terrorptr[2] = (FSERROR) (bpreverr2 + cur2);\n\tcur2 += delta;\t\t/* form error * 5 */\n\tbpreverr2 = belowerr2 + cur2;\n\tbelowerr2 = bnexterr;\n\tcur2 += delta;\t\t/* form error * 7 */\n      }\n      /* At this point curN contains the 7/16 error value to be propagated\n       * to the next pixel on the current line, and all the errors for the\n       * next line have been shifted over.  We are therefore ready to move on.\n       */\n      inptr += dir3;\t\t/* Advance pixel pointers to next column */\n      outptr += dir;\n      errorptr += dir3;\t\t/* advance errorptr to current column */\n    }\n    /* Post-loop cleanup: we must unload the final error values into the\n     * final fserrors[] entry.  Note we need not unload belowerrN because\n     * it is for the dummy column before or after the actual array.\n     */\n    errorptr[0] = (FSERROR) bpreverr0; /* unload prev errs into array */\n    errorptr[1] = (FSERROR) bpreverr1;\n    errorptr[2] = (FSERROR) bpreverr2;\n  }\n}\n\n\n/*\n * Initialize the error-limiting transfer function (lookup table).\n * The raw F-S error computation can potentially compute error values of up to\n * +- MAXJSAMPLE.  But we want the maximum correction applied to a pixel to be\n * much less, otherwise obviously wrong pixels will be created.  (Typical\n * effects include weird fringes at color-area boundaries, isolated bright\n * pixels in a dark area, etc.)  The standard advice for avoiding this problem\n * is to ensure that the \"corners\" of the color cube are allocated as output\n * colors; then repeated errors in the same direction cannot cause cascading\n * error buildup.  However, that only prevents the error from getting\n * completely out of hand; Aaron Giles reports that error limiting improves\n * the results even with corner colors allocated.\n * A simple clamping of the error values to about +- MAXJSAMPLE/8 works pretty\n * well, but the smoother transfer function used below is even better.  Thanks\n * to Aaron Giles for this idea.\n */\n\nLOCAL(void)\ninit_error_limit (j_decompress_ptr cinfo)\n/* Allocate and fill in the error_limiter table */\n{\n  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;\n  int * table;\n  int in, out;\n\n  table = (int *) (*cinfo->mem->alloc_small)\n    ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE*2+1) * SIZEOF(int));\n  table += MAXJSAMPLE;\t\t/* so can index -MAXJSAMPLE .. +MAXJSAMPLE */\n  cquantize->error_limiter = table;\n\n#define STEPSIZE ((MAXJSAMPLE+1)/16)\n  /* Map errors 1:1 up to +- MAXJSAMPLE/16 */\n  out = 0;\n  for (in = 0; in < STEPSIZE; in++, out++) {\n    table[in] = out; table[-in] = -out;\n  }\n  /* Map errors 1:2 up to +- 3*MAXJSAMPLE/16 */\n  for (; in < STEPSIZE*3; in++, out += (in&1) ? 0 : 1) {\n    table[in] = out; table[-in] = -out;\n  }\n  /* Clamp the rest to final out value (which is (MAXJSAMPLE+1)/8) */\n  for (; in <= MAXJSAMPLE; in++) {\n    table[in] = out; table[-in] = -out;\n  }\n#undef STEPSIZE\n}\n\n\n/*\n * Finish up at the end of each pass.\n */\n\nMETHODDEF(void)\nfinish_pass1 (j_decompress_ptr cinfo)\n{\n  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;\n\n  /* Select the representative colors and fill in cinfo->colormap */\n  cinfo->colormap = cquantize->sv_colormap;\n  select_colors(cinfo, cquantize->desired);\n  /* Force next pass to zero the color index table */\n  cquantize->needs_zeroed = TRUE;\n}\n\n\nMETHODDEF(void)\nfinish_pass2 (j_decompress_ptr cinfo)\n{\n  /* no work */\n}\n\n\n/*\n * Initialize for each processing pass.\n */\n\nMETHODDEF(void)\nstart_pass_2_quant (j_decompress_ptr cinfo, boolean is_pre_scan)\n{\n  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;\n  hist3d histogram = cquantize->histogram;\n  int i;\n\n  /* Only F-S dithering or no dithering is supported. */\n  /* If user asks for ordered dither, give him F-S. */\n  if (cinfo->dither_mode != JDITHER_NONE)\n    cinfo->dither_mode = JDITHER_FS;\n\n  if (is_pre_scan) {\n    /* Set up method pointers */\n    cquantize->pub.color_quantize = prescan_quantize;\n    cquantize->pub.finish_pass = finish_pass1;\n    cquantize->needs_zeroed = TRUE; /* Always zero histogram */\n  } else {\n    /* Set up method pointers */\n    if (cinfo->dither_mode == JDITHER_FS)\n      cquantize->pub.color_quantize = pass2_fs_dither;\n    else\n      cquantize->pub.color_quantize = pass2_no_dither;\n    cquantize->pub.finish_pass = finish_pass2;\n\n    /* Make sure color count is acceptable */\n    i = cinfo->actual_number_of_colors;\n    if (i < 1)\n      ERREXIT1(cinfo, JERR_QUANT_FEW_COLORS, 1);\n    if (i > MAXNUMCOLORS)\n      ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXNUMCOLORS);\n\n    if (cinfo->dither_mode == JDITHER_FS) {\n      size_t arraysize = (size_t) ((cinfo->output_width + 2) *\n\t\t\t\t   (3 * SIZEOF(FSERROR)));\n      /* Allocate Floyd-Steinberg workspace if we didn't already. */\n      if (cquantize->fserrors == NULL)\n\tcquantize->fserrors = (FSERRPTR) (*cinfo->mem->alloc_large)\n\t  ((j_common_ptr) cinfo, JPOOL_IMAGE, arraysize);\n      /* Initialize the propagated errors to zero. */\n      jzero_far((void FAR *) cquantize->fserrors, arraysize);\n      /* Make the error-limit table if we didn't already. */\n      if (cquantize->error_limiter == NULL)\n\tinit_error_limit(cinfo);\n      cquantize->on_odd_row = FALSE;\n    }\n\n  }\n  /* Zero the histogram or inverse color map, if necessary */\n  if (cquantize->needs_zeroed) {\n    for (i = 0; i < HIST_C0_ELEMS; i++) {\n      jzero_far((void FAR *) histogram[i],\n\t\tHIST_C1_ELEMS*HIST_C2_ELEMS * SIZEOF(histcell));\n    }\n    cquantize->needs_zeroed = FALSE;\n  }\n}\n\n\n/*\n * Switch to a new external colormap between output passes.\n */\n\nMETHODDEF(void)\nnew_color_map_2_quant (j_decompress_ptr cinfo)\n{\n  my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;\n\n  /* Reset the inverse color map */\n  cquantize->needs_zeroed = TRUE;\n}\n\n\n/*\n * Module initialization routine for 2-pass color quantization.\n */\n\nGLOBAL(void)\njinit_2pass_quantizer (j_decompress_ptr cinfo)\n{\n  my_cquantize_ptr cquantize;\n  int i;\n\n  cquantize = (my_cquantize_ptr)\n    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,\n\t\t\t\tSIZEOF(my_cquantizer));\n  cinfo->cquantize = (struct jpeg_color_quantizer *) cquantize;\n  cquantize->pub.start_pass = start_pass_2_quant;\n  cquantize->pub.new_color_map = new_color_map_2_quant;\n  cquantize->fserrors = NULL;\t/* flag optional arrays not allocated */\n  cquantize->error_limiter = NULL;\n\n  /* Make sure jdmaster didn't give me a case I can't handle */\n  if (cinfo->out_color_components != 3)\n    ERREXIT(cinfo, JERR_NOTIMPL);\n\n  /* Allocate the histogram/inverse colormap storage */\n  cquantize->histogram = (hist3d) (*cinfo->mem->alloc_small)\n    ((j_common_ptr) cinfo, JPOOL_IMAGE, HIST_C0_ELEMS * SIZEOF(hist2d));\n  for (i = 0; i < HIST_C0_ELEMS; i++) {\n    cquantize->histogram[i] = (hist2d) (*cinfo->mem->alloc_large)\n      ((j_common_ptr) cinfo, JPOOL_IMAGE,\n       HIST_C1_ELEMS*HIST_C2_ELEMS * SIZEOF(histcell));\n  }\n  cquantize->needs_zeroed = TRUE; /* histogram is garbage now */\n\n  /* Allocate storage for the completed colormap, if required.\n   * We do this now since it is FAR storage and may affect\n   * the memory manager's space calculations.\n   */\n  if (cinfo->enable_2pass_quant) {\n    /* Make sure color count is acceptable */\n    int desired = cinfo->desired_number_of_colors;\n    /* Lower bound on # of colors ... somewhat arbitrary as long as > 0 */\n    if (desired < 8)\n      ERREXIT1(cinfo, JERR_QUANT_FEW_COLORS, 8);\n    /* Make sure colormap indexes can be represented by JSAMPLEs */\n    if (desired > MAXNUMCOLORS)\n      ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXNUMCOLORS);\n    cquantize->sv_colormap = (*cinfo->mem->alloc_sarray)\n      ((j_common_ptr) cinfo,JPOOL_IMAGE, (JDIMENSION) desired, (JDIMENSION) 3);\n    cquantize->desired = desired;\n  } else\n    cquantize->sv_colormap = NULL;\n\n  /* Only F-S dithering or no dithering is supported. */\n  /* If user asks for ordered dither, give him F-S. */\n  if (cinfo->dither_mode != JDITHER_NONE)\n    cinfo->dither_mode = JDITHER_FS;\n\n  /* Allocate Floyd-Steinberg workspace if necessary.\n   * This isn't really needed until pass 2, but again it is FAR storage.\n   * Although we will cope with a later change in dither_mode,\n   * we do not promise to honor max_memory_to_use if dither_mode changes.\n   */\n  if (cinfo->dither_mode == JDITHER_FS) {\n    cquantize->fserrors = (FSERRPTR) (*cinfo->mem->alloc_large)\n      ((j_common_ptr) cinfo, JPOOL_IMAGE,\n       (size_t) ((cinfo->output_width + 2) * (3 * SIZEOF(FSERROR))));\n    /* Might as well create the error-limiting table too. */\n    init_error_limit(cinfo);\n  }\n}\n\n#endif /* QUANT_2PASS_SUPPORTED */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jutils.c",
    "content": "/*\n * jutils.c\n *\n * Copyright (C) 1991-1996, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains tables and miscellaneous utility routines needed\n * for both compression and decompression.\n * Note we prefix all global names with \"j\" to minimize conflicts with\n * a surrounding application.\n */\n\n#define JPEG_INTERNALS\n#include \"jinclude.h\"\n#include \"jpeglib.h\"\n\n\n/*\n * jpeg_zigzag_order[i] is the zigzag-order position of the i'th element\n * of a DCT block read in natural order (left to right, top to bottom).\n */\n\n#if 0\t\t\t\t/* This table is not actually needed in v6a */\n\nconst int jpeg_zigzag_order[DCTSIZE2] = {\n   0,  1,  5,  6, 14, 15, 27, 28,\n   2,  4,  7, 13, 16, 26, 29, 42,\n   3,  8, 12, 17, 25, 30, 41, 43,\n   9, 11, 18, 24, 31, 40, 44, 53,\n  10, 19, 23, 32, 39, 45, 52, 54,\n  20, 22, 33, 38, 46, 51, 55, 60,\n  21, 34, 37, 47, 50, 56, 59, 61,\n  35, 36, 48, 49, 57, 58, 62, 63\n};\n\n#endif\n\n/*\n * jpeg_natural_order[i] is the natural-order position of the i'th element\n * of zigzag order.\n *\n * When reading corrupted data, the Huffman decoders could attempt\n * to reference an entry beyond the end of this array (if the decoded\n * zero run length reaches past the end of the block).  To prevent\n * wild stores without adding an inner-loop test, we put some extra\n * \"63\"s after the real entries.  This will cause the extra coefficient\n * to be stored in location 63 of the block, not somewhere random.\n * The worst case would be a run-length of 15, which means we need 16\n * fake entries.\n */\n\nconst int jpeg_natural_order[DCTSIZE2+16] = {\n  0,  1,  8, 16,  9,  2,  3, 10,\n 17, 24, 32, 25, 18, 11,  4,  5,\n 12, 19, 26, 33, 40, 48, 41, 34,\n 27, 20, 13,  6,  7, 14, 21, 28,\n 35, 42, 49, 56, 57, 50, 43, 36,\n 29, 22, 15, 23, 30, 37, 44, 51,\n 58, 59, 52, 45, 38, 31, 39, 46,\n 53, 60, 61, 54, 47, 55, 62, 63,\n 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */\n 63, 63, 63, 63, 63, 63, 63, 63\n};\n\n\n/*\n * Arithmetic utilities\n */\n\nGLOBAL(long)\njdiv_round_up (long a, long b)\n/* Compute a/b rounded up to next integer, ie, ceil(a/b) */\n/* Assumes a >= 0, b > 0 */\n{\n  return (a + b - 1L) / b;\n}\n\n\nGLOBAL(long)\njround_up (long a, long b)\n/* Compute a rounded up to next multiple of b, ie, ceil(a/b)*b */\n/* Assumes a >= 0, b > 0 */\n{\n  a += b - 1L;\n  return a - (a % b);\n}\n\n\n/* On normal machines we can apply MEMCOPY() and MEMZERO() to sample arrays\n * and coefficient-block arrays.  This won't work on 80x86 because the arrays\n * are FAR and we're assuming a small-pointer memory model.  However, some\n * DOS compilers provide far-pointer versions of memcpy() and memset() even\n * in the small-model libraries.  These will be used if USE_FMEM is defined.\n * Otherwise, the routines below do it the hard way.  (The performance cost\n * is not all that great, because these routines aren't very heavily used.)\n */\n\n#ifndef NEED_FAR_POINTERS\t/* normal case, same as regular macros */\n#define FMEMCOPY(dest,src,size)\tMEMCOPY(dest,src,size)\n#define FMEMZERO(target,size)\tMEMZERO(target,size)\n#else\t\t\t\t/* 80x86 case, define if we can */\n#ifdef USE_FMEM\n#define FMEMCOPY(dest,src,size)\t_fmemcpy((void FAR *)(dest), (const void FAR *)(src), (size_t)(size))\n#define FMEMZERO(target,size)\t_fmemset((void FAR *)(target), 0, (size_t)(size))\n#endif\n#endif\n\n\nGLOBAL(void)\njcopy_sample_rows (JSAMPARRAY input_array, int source_row,\n\t\t   JSAMPARRAY output_array, int dest_row,\n\t\t   int num_rows, JDIMENSION num_cols)\n/* Copy some rows of samples from one place to another.\n * num_rows rows are copied from input_array[source_row++]\n * to output_array[dest_row++]; these areas may overlap for duplication.\n * The source and destination arrays must be at least as wide as num_cols.\n */\n{\n  register JSAMPROW inptr, outptr;\n#ifdef FMEMCOPY\n  register size_t count = (size_t) (num_cols * SIZEOF(JSAMPLE));\n#else\n  register JDIMENSION count;\n#endif\n  register int row;\n\n  input_array += source_row;\n  output_array += dest_row;\n\n  for (row = num_rows; row > 0; row--) {\n    inptr = *input_array++;\n    outptr = *output_array++;\n#ifdef FMEMCOPY\n    FMEMCOPY(outptr, inptr, count);\n#else\n    for (count = num_cols; count > 0; count--)\n      *outptr++ = *inptr++;\t/* needn't bother with GETJSAMPLE() here */\n#endif\n  }\n}\n\n\nGLOBAL(void)\njcopy_block_row (JBLOCKROW input_row, JBLOCKROW output_row,\n\t\t JDIMENSION num_blocks)\n/* Copy a row of coefficient blocks from one place to another. */\n{\n#ifdef FMEMCOPY\n  FMEMCOPY(output_row, input_row, num_blocks * (DCTSIZE2 * SIZEOF(JCOEF)));\n#else\n  register JCOEFPTR inptr, outptr;\n  register long count;\n\n  inptr = (JCOEFPTR) input_row;\n  outptr = (JCOEFPTR) output_row;\n  for (count = (long) num_blocks * DCTSIZE2; count > 0; count--) {\n    *outptr++ = *inptr++;\n  }\n#endif\n}\n\n\nGLOBAL(void)\njzero_far (void FAR * target, size_t bytestozero)\n/* Zero out a chunk of FAR memory. */\n/* This might be sample-array data, block-array data, or alloc_large data. */\n{\n#ifdef FMEMZERO\n  FMEMZERO(target, bytestozero);\n#else\n  register char FAR * ptr = (char FAR *) target;\n  register size_t count;\n\n  for (count = bytestozero; count > 0; count--) {\n    *ptr++ = 0;\n  }\n#endif\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JPEGReadWriter2Plugin/jversion.h",
    "content": "/*\n * jversion.h\n *\n * Copyright (C) 1991-1998, Thomas G. Lane.\n * This file is part of the Independent JPEG Group's software.\n * For conditions of distribution and use, see the accompanying README file.\n *\n * This file contains software version identification.\n */\n\n\n#define JVERSION\t\"6b  27-Mar-1998\"\n\n#define JCOPYRIGHT\t\"Copyright (C) 1998, Thomas G. Lane\"\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/JoystickTabletPlugin/JoystickTabletPlugin.h",
    "content": "/* joystick & graphics tablet support */\n\n/* module initialization/shutdown */\nint joystickInit(void);\nint joystickShutdown(void);\n\nint joystickRead(int stickIndex);\n/*** tablet support ***/\nint tabletGetParameters(int cursorIndex, int result[]);\nint tabletRead(int cursorIndex, int result[]);\nint tabletResultSize(void);\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/LocalePlugin/LocalePlugin.h",
    "content": "/****************************************************************************\n*   PROJECT: Common include\n*   FILE:    LocalePlugin.h\n*   CONTENT: \n*\n*   AUTHOR:   tim@rowledge.org\n*   ADDRESS: \n*   EMAIL:   \n*   RCSID:   $Id: LocalePlugin.h\n*\n*/\n/* Locale support definitions */\n\nsqInt sqLocInitialize(void);\n\n/************** Country and language ******************/\n\n/* write the country code into the string ptr. ISO 3166 is the relevant source\n * here; see http://www.unicode.org/onlinedat/countries.html for details.\n * Using the 3 character Alpha-3 codes */\nvoid\tsqLocGetCountryInto(char * str);\n\n/* write the 3 char string describing the language in use into string ptr.\n * ISO 639 is the relevant source here;\n * see http://www.w3.org/WAI/ER/IG/ert/iso639.html\n * for details */\nvoid\tsqLocGetLanguageInto(char * str);\n\n\n/***************** Currency ********************/\n\n/* return true if the currency symbol is to be placed in front of the currency\n * amount */\nsqInt\tsqLocCurrencyNotation(void);\n\n/* return the length in chars of the curency symbol string */\nsqInt\tsqLocCurrencySymbolSize(void);\n/* write the currency symbol into the string ptr */\nvoid\tsqLocGetCurrencySymbolInto(char * str);\n\n\n/***************** Numbers and measurements **************/\n\n/* return true if the metric measurements system is to be used, false otherwise\n * (USA is about it) */\nsqInt\tsqLocMeasurementMetric(void);\n\n/* write the 1 char used for digit grouping into string ptr.\n * Usually this is . or ,  as in 1,000,000 */\nvoid\tsqLocGetDigitGroupingSymbolInto(char * str);\n/* write the 1 char used for decimal separation into string ptr.\n * Usually this is . or , */\nvoid\tsqLocGetDecimalSymbolInto(char * str);\n\n\n/****************** time and date *********************/\n\n/* return in minutes the offset between thisVM and UTC. */\nsqInt\tsqLocGetVMOffsetToUTC(void);\n\n/* return in minutes the offset between the currenct timezone and UTC */\nsqInt\tsqLocGetTimezoneOffset(void);\n\n/* return true if DST is in use, false otherwise */\nsqInt\tsqLocDaylightSavings(void);\n\n/* return the size in chars of the long date format string */\nsqInt\tsqLocLongDateFormatSize(void);\n/*Write the string describing the long date formatting into string ptr.\n * Format is made up of\n * \t\td day, m month, y year,\n * \t\tdouble symbol is null padded, single not padded (m=6, mm=06)\n * \t\tdddd weekday\n * \t\tmmmm month name */\nvoid\tsqLocGetLongDateFormatInto(char * str);\n\n/* return the size in chars of the short date format string */\nsqInt\tsqLocShortDateFormatSize();\n/*Write the string describing the short date formatting into string ptr.\n * Format is made up of\n * \t\td day, m month, y year,\n * \t\tdouble symbol is null padded, single not padded (m=6, mm=06)\n * \t\tdddd weekday\n * \t\tmmmm month name */\nvoid\tsqLocGetShortDateFormatInto(char * str);\n\n/* return the size in chars of the time format string */\nsqInt\tsqLocTimeFormatSize(void);\n/* write the string describing the time formatting into string ptr.\n/* Format is made up of\n * \t\th hour (h 12, H 24), m minute, s seconds, x (am/pm String)\n * \t\tdouble symbol is null padded, single not padded (h=6, hh=06)  */\nvoid\tsqLocGetTimeFormatInto(char * str);\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/MIDIPlugin/MIDIPlugin.h",
    "content": "/* MIDI primitives */\n\n/* module initialization/shutdown */\nint midiInit(void);\nint midiShutdown(void);\n\nint sqMIDIGetClock(void);\nint sqMIDIGetPortCount(void);\nint sqMIDIGetPortDirectionality(int portNum);\nint sqMIDIGetPortName(int portNum, int namePtr, int length);\nint sqMIDIClosePort(int portNum);\nint sqMIDIOpenPort(int portNum, int readSemaIndex, int interfaceClockRate);\nint sqMIDIParameterSet(int whichParameter, int newValue);\nint sqMIDIParameterGet(int whichParameter);\nint sqMIDIPortReadInto(int portNum, int count, int bufferPtr);\nint sqMIDIPortWriteFromAt(int portNum, int count, int bufferPtr, int time);\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/COPYING",
    "content": "Original license for libMPEG3 was GPL. But on nov 1st 2000, then author granted\nthe following change to the Squeak community.\n\n___Nov 1st_____ 2000\n\nTo whom it may concern:\n\nI hereby grant and jointly license my software, ________LibMPEG3_______, under\nthe terms of either the GNU Lesser General Public License, also known as the\n\"LGPL\", or the Squeak License set forth below, at the option of the licensee or\nany sublicensees. Thus, my software may be reproduced, distributed and derivative\nworks made there from pursuant to the terms of either:\n\n\ta) the GNU Lesser General Public License as published by the Free\n\tSoftware Foundation; either version 2.1, or (at your option) any\n\tlater version; or\n\n\tb) the Squeak License; either as published on\n\thttp://www.squeak.org/license.html, as of the date of this license,\n\tor (at your option) any later version.\n\nMy software is distributed in the hope that it will be useful, but WITHOUT ANY\nWARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A\nPARTICULAR PURPOSE.  See either the GNU Lesser General Public License or the\nSqueak License.\n\n\n\n\n\n\n__________(Signed)____________\n\nAdam Williams\n\n\n\n\n\t\t  GNU LESSER GENERAL PUBLIC LICENSE\n\t\t       Version 2.1, February 1999\n\n Copyright (C) 1991, 1999 Free Software Foundation, Inc.\n     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n[This is the first released version of the Lesser GPL.  It also counts\n as the successor of the GNU Library Public License, version 2, hence\n the version number 2.1.]\n\n\n\n\t\t  GNU LESSER GENERAL PUBLIC LICENSE\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n  0. This License Agreement applies to any software library or other\nprogram which contains a notice placed by the copyright holder or\nother authorized party saying it may be distributed under the terms of\nthis Lesser General Public License (also called \"this License\").\nEach licensee is addressed as \"you\".\n\n  A \"library\" means a collection of software functions and/or data\nprepared so as to be conveniently linked with application programs\n(which use some of those functions and data) to form executables.\n\n  The \"Library\", below, refers to any such software library or work\nwhich has been distributed under these terms.  A \"work based on the\nLibrary\" means either the Library or any derivative work under\ncopyright law: that is to say, a work containing the Library or a\nportion of it, either verbatim or with modifications and/or translated\nstraightforwardly into another language.  (Hereinafter, translation is\nincluded without limitation in the term \"modification\".)\n\n  \"Source code\" for a work means the preferred form of the work for\nmaking modifications to it.  For a library, complete source code means\nall the source code for all modules it contains, plus any associated\ninterface definition files, plus the scripts used to control compilation\nand installation of the library.\n\n  Activities other than copying, distribution and modification are not\ncovered by this License; they are outside its scope.  The act of\nrunning a program using the Library is not restricted, and output from\nsuch a program is covered only if its contents constitute a work based\non the Library (independent of the use of the Library in a tool for\nwriting it).  Whether that is true depends on what the Library does\nand what the program that uses the Library does.\n  \n  1. You may copy and distribute verbatim copies of the Library's\ncomplete source code as you receive it, in any medium, provided that\nyou conspicuously and appropriately publish on each copy an\nappropriate copyright notice and disclaimer of warranty; keep intact\nall the notices that refer to this License and to the absence of any\nwarranty; and distribute a copy of this License along with the\nLibrary.\n\n  You may charge a fee for the physical act of transferring a copy,\nand you may at your option offer warranty protection in exchange for a\nfee.\n\n  2. You may modify your copy or copies of the Library or any portion\nof it, thus forming a work based on the Library, and copy and\ndistribute such modifications or work under the terms of Section 1\nabove, provided that you also meet all of these conditions:\n\n    a) The modified work must itself be a software library.\n\n    b) You must cause the files modified to carry prominent notices\n    stating that you changed the files and the date of any change.\n\n    c) You must cause the whole of the work to be licensed at no\n    charge to all third parties under the terms of this License.\n\n    d) If a facility in the modified Library refers to a function or a\n    table of data to be supplied by an application program that uses\n    the facility, other than as an argument passed when the facility\n    is invoked, then you must make a good faith effort to ensure that,\n    in the event an application does not supply such function or\n    table, the facility still operates, and performs whatever part of\n    its purpose remains meaningful.\n\n    (For example, a function in a library to compute square roots has\n    a purpose that is entirely well-defined independent of the\n    application.  Therefore, Subsection 2d requires that any\n    application-supplied function or table used by this function must\n    be optional: if the application does not supply it, the square\n    root function must still compute square roots.)\n\nThese requirements apply to the modified work as a whole.  If\nidentifiable sections of that work are not derived from the Library,\nand can be reasonably considered independent and separate works in\nthemselves, then this License, and its terms, do not apply to those\nsections when you distribute them as separate works.  But when you\ndistribute the same sections as part of a whole which is a work based\non the Library, the distribution of the whole must be on the terms of\nthis License, whose permissions for other licensees extend to the\nentire whole, and thus to each and every part regardless of who wrote\nit.\n\nThus, it is not the intent of this section to claim rights or contest\nyour rights to work written entirely by you; rather, the intent is to\nexercise the right to control the distribution of derivative or\ncollective works based on the Library.\n\nIn addition, mere aggregation of another work not based on the Library\nwith the Library (or with a work based on the Library) on a volume of\na storage or distribution medium does not bring the other work under\nthe scope of this License.\n\n  3. You may opt to apply the terms of the ordinary GNU General Public\nLicense instead of this License to a given copy of the Library.  To do\nthis, you must alter all the notices that refer to this License, so\nthat they refer to the ordinary GNU General Public License, version 2,\ninstead of to this License.  (If a newer version than version 2 of the\nordinary GNU General Public License has appeared, then you can specify\nthat version instead if you wish.)  Do not make any other change in\nthese notices.\n\n  Once this change is made in a given copy, it is irreversible for\nthat copy, so the ordinary GNU General Public License applies to all\nsubsequent copies and derivative works made from that copy.\n\n  This option is useful when you wish to copy part of the code of\nthe Library into a program that is not a library.\n\n  4. You may copy and distribute the Library (or a portion or\nderivative of it, under Section 2) in object code or executable form\nunder the terms of Sections 1 and 2 above provided that you accompany\nit with the complete corresponding machine-readable source code, which\nmust be distributed under the terms of Sections 1 and 2 above on a\nmedium customarily used for software interchange.\n\n  If distribution of object code is made by offering access to copy\nfrom a designated place, then offering equivalent access to copy the\nsource code from the same place satisfies the requirement to\ndistribute the source code, even though third parties are not\ncompelled to copy the source along with the object code.\n\n  5. A program that contains no derivative of any portion of the\nLibrary, but is designed to work with the Library by being compiled or\nlinked with it, is called a \"work that uses the Library\".  Such a\nwork, in isolation, is not a derivative work of the Library, and\ntherefore falls outside the scope of this License.\n\n  However, linking a \"work that uses the Library\" with the Library\ncreates an executable that is a derivative of the Library (because it\ncontains portions of the Library), rather than a \"work that uses the\nlibrary\".  The executable is therefore covered by this License.\nSection 6 states terms for distribution of such executables.\n\n  When a \"work that uses the Library\" uses material from a header file\nthat is part of the Library, the object code for the work may be a\nderivative work of the Library even though the source code is not.\nWhether this is true is especially significant if the work can be\nlinked without the Library, or if the work is itself a library.  The\nthreshold for this to be true is not precisely defined by law.\n\n  If such an object file uses only numerical parameters, data\nstructure layouts and accessors, and small macros and small inline\nfunctions (ten lines or less in length), then the use of the object\nfile is unrestricted, regardless of whether it is legally a derivative\nwork.  (Executables containing this object code plus portions of the\nLibrary will still fall under Section 6.)\n\n  Otherwise, if the work is a derivative of the Library, you may\ndistribute the object code for the work under the terms of Section 6.\nAny executables containing that work also fall under Section 6,\nwhether or not they are linked directly with the Library itself.\n\n  6. As an exception to the Sections above, you may also combine or\nlink a \"work that uses the Library\" with the Library to produce a\nwork containing portions of the Library, and distribute that work\nunder terms of your choice, provided that the terms permit\nmodification of the work for the customer's own use and reverse\nengineering for debugging such modifications.\n\n  You must give prominent notice with each copy of the work that the\nLibrary is used in it and that the Library and its use are covered by\nthis License.  You must supply a copy of this License.  If the work\nduring execution displays copyright notices, you must include the\ncopyright notice for the Library among them, as well as a reference\ndirecting the user to the copy of this License.  Also, you must do one\nof these things:\n\n    a) Accompany the work with the complete corresponding\n    machine-readable source code for the Library including whatever\n    changes were used in the work (which must be distributed under\n    Sections 1 and 2 above); and, if the work is an executable linked\n    with the Library, with the complete machine-readable \"work that\n    uses the Library\", as object code and/or source code, so that the\n    user can modify the Library and then relink to produce a modified\n    executable containing the modified Library.  (It is understood\n    that the user who changes the contents of definitions files in the\n    Library will not necessarily be able to recompile the application\n    to use the modified definitions.)\n\n    b) Use a suitable shared library mechanism for linking with the\n    Library.  A suitable mechanism is one that (1) uses at run time a\n    copy of the library already present on the user's computer system,\n    rather than copying library functions into the executable, and (2)\n    will operate properly with a modified version of the library, if\n    the user installs one, as long as the modified version is\n    interface-compatible with the version that the work was made with.\n\n    c) Accompany the work with a written offer, valid for at\n    least three years, to give the same user the materials\n    specified in Subsection 6a, above, for a charge no more\n    than the cost of performing this distribution.\n\n    d) If distribution of the work is made by offering access to copy\n    from a designated place, offer equivalent access to copy the above\n    specified materials from the same place.\n\n    e) Verify that the user has already received a copy of these\n    materials or that you have already sent this user a copy.\n\n  For an executable, the required form of the \"work that uses the\nLibrary\" must include any data and utility programs needed for\nreproducing the executable from it.  However, as a special exception,\nthe materials to be distributed need not include anything that is\nnormally distributed (in either source or binary form) with the major\ncomponents (compiler, kernel, and so on) of the operating system on\nwhich the executable runs, unless that component itself accompanies\nthe executable.\n\n  It may happen that this requirement contradicts the license\nrestrictions of other proprietary libraries that do not normally\naccompany the operating system.  Such a contradiction means you cannot\nuse both them and the Library together in an executable that you\ndistribute.\n\n  7. You may place library facilities that are a work based on the\nLibrary side-by-side in a single library together with other library\nfacilities not covered by this License, and distribute such a combined\nlibrary, provided that the separate distribution of the work based on\nthe Library and of the other library facilities is otherwise\npermitted, and provided that you do these two things:\n\n    a) Accompany the combined library with a copy of the same work\n    based on the Library, uncombined with any other library\n    facilities.  This must be distributed under the terms of the\n    Sections above.\n\n    b) Give prominent notice with the combined library of the fact\n    that part of it is a work based on the Library, and explaining\n    where to find the accompanying uncombined form of the same work.\n\n  8. You may not copy, modify, sublicense, link with, or distribute\nthe Library except as expressly provided under this License.  Any\nattempt otherwise to copy, modify, sublicense, link with, or\ndistribute the Library is void, and will automatically terminate your\nrights under this License.  However, parties who have received copies,\nor rights, from you under this License will not have their licenses\nterminated so long as such parties remain in full compliance.\n\n  9. You are not required to accept this License, since you have not\nsigned it.  However, nothing else grants you permission to modify or\ndistribute the Library or its derivative works.  These actions are\nprohibited by law if you do not accept this License.  Therefore, by\nmodifying or distributing the Library (or any work based on the\nLibrary), you indicate your acceptance of this License to do so, and\nall its terms and conditions for copying, distributing or modifying\nthe Library or works based on it.\n\n  10. Each time you redistribute the Library (or any work based on the\nLibrary), the recipient automatically receives a license from the\noriginal licensor to copy, distribute, link with or modify the Library\nsubject to these terms and conditions.  You may not impose any further\nrestrictions on the recipients' exercise of the rights granted herein.\nYou are not responsible for enforcing compliance by third parties with\nthis License.\n\n  11. If, as a consequence of a court judgment or allegation of patent\ninfringement or for any other reason (not limited to patent issues),\nconditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot\ndistribute so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you\nmay not distribute the Library at all.  For example, if a patent\nlicense would not permit royalty-free redistribution of the Library by\nall those who receive copies directly or indirectly through you, then\nthe only way you could satisfy both it and this License would be to\nrefrain entirely from distribution of the Library.\n\nIf any portion of this section is held invalid or unenforceable under any\nparticular circumstance, the balance of the section is intended to apply,\nand the section as a whole is intended to apply in other circumstances.\n\nIt is not the purpose of this section to induce you to infringe any\npatents or other property right claims or to contest validity of any\nsuch claims; this section has the sole purpose of protecting the\nintegrity of the free software distribution system which is\nimplemented by public license practices.  Many people have made\ngenerous contributions to the wide range of software distributed\nthrough that system in reliance on consistent application of that\nsystem; it is up to the author/donor to decide if he or she is willing\nto distribute software through any other system and a licensee cannot\nimpose that choice.\n\nThis section is intended to make thoroughly clear what is believed to\nbe a consequence of the rest of this License.\n\n  12. If the distribution and/or use of the Library is restricted in\ncertain countries either by patents or by copyrighted interfaces, the\noriginal copyright holder who places the Library under this License may add\nan explicit geographical distribution limitation excluding those countries,\nso that distribution is permitted only in or among countries not thus\nexcluded.  In such case, this License incorporates the limitation as if\nwritten in the body of this License.\n\n  13. The Free Software Foundation may publish revised and/or new\nversions of the Lesser General Public License from time to time.\nSuch new versions will be similar in spirit to the present version,\nbut may differ in detail to address new problems or concerns.\n\nEach version is given a distinguishing version number.  If the Library\nspecifies a version number of this License which applies to it and\n\"any later version\", you have the option of following the terms and\nconditions either of that version or of any later version published by\nthe Free Software Foundation.  If the Library does not specify a\nlicense version number, you may choose any version ever published by\nthe Free Software Foundation.\n\n  14. If you wish to incorporate parts of the Library into other free\nprograms whose distribution conditions are incompatible with these,\nwrite to the author to ask for permission.  For software which is\ncopyrighted by the Free Software Foundation, write to the Free\nSoftware Foundation; we sometimes make exceptions for this.  Our\ndecision will be guided by the two goals of preserving the free status\nof all derivatives of our free software and of promoting the sharing\nand reuse of software generally.\n\n\t\t\t    NO WARRANTY\n\n  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO\nWARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.\nEXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR\nOTHER PARTIES PROVIDE THE LIBRARY \"AS IS\" WITHOUT WARRANTY OF ANY\nKIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE\nLIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME\nTHE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN\nWRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY\nAND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU\nFOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR\nCONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE\nLIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING\nRENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A\nFAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF\nSUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH\nDAMAGES.\n\n\t\t     END OF TERMS AND CONDITIONS\n\t\t     \n\t\t     \nSqueak License.\n\n\nApple Computer, Inc. Software License\nPLEASE READ THIS SOFTWARE LICENSE AGREEMENT \"LICENSE\" CAREFULLY BEFORE\nDOWNLOADING THIS SOFTWARE. BY DOWNLOADING THIS SOFTWARE YOU ARE AGREEING TO BE\nBOUND BY THE TERMS OF THIS LICENSE. IF YOU DO NOT AGREE TO THE TERMS OF THIS\nLICENSE, DO NOT DOWNLOAD.\n\n1. License. The software, documentation and any fonts which you will receive by\ndownloading this software (the \"Apple Software\") are licensed, not sold, to you\nby Apple Computer, Inc. or its local subsidiary, if any. Apple and/or Apple's\nlicensor(s) retain title to the Apple Software, and the Apple Software and any\ncopies which this License authorizes you to make are subject to this License.\nThis License grants no right or license under any trademarks, service marks, or\ntradenames of Apple.\n\n2. Permitted Uses and Restrictions. This License allows you to copy, install and\nuse the Apple Software on an unlimited number of computers under your direct\ncontrol. You may modify and create derivative works of the Apple Software\n(\"Modified Software\"), however, you may not modify or create derivative works of\nthe fonts provided by Apple (\"Fonts\"). You may distribute and sublicense such\nModified Software only under the terms of a valid, binding license that makes no\nrepresentations or warranties on behalf of Apple, and is no less protective of\nApple and Apple's rights than this License. You may distribute and sublicense the\nFonts only as a part of and for use with Modified Software, and not as a part of\nor for use with Modified Software that is distributed or sublicensed for a fee or\nfor other valuable consideration. If the Modified Software contains\nmodifications, overwrites, replacements, deletions, additions, or ports to new\nplatforms of: (1) the methods of existing class objects or their existing\nrelationships, or (2) any part of the virtual machine, then for so long as the\nModified Software is distributed or sublicensed to others, such modified,\noverwritten, replaced, deleted, added and ported portions of the Modified\nSoftware must be made publicly available, preferably by means of download from a\nwebsite, at no charge under the terms set forth in Exhibit A below. You may\ntransfer your rights under this License provided you transfer this License and a\ncopy of the Apple Software to a party who agrees to accept the terms of this\nLicense and destroy any other copies of the Apple Software in your possession.\nYour rights under this License will terminate automatically without notice from\nApple if you fail to comply with any term(s) of this License.\n\n3. Disclaimer Of Warranty. The Apple Software is pre-release, and untested, or\nnot fully tested. The Apple Software may contain errors that could cause failures\nor loss of data, and may be incomplete or contain inaccuracies. You expressly\nacknowledge and agree that use of the Apple Software is at your sole risk. You\nacknowledge that Apple has not publicly announced, nor promised or guaranteed to\nyou, that Apple will release a final, commercial or any future pre-release\nversion of the Apple Software to you or anyone in the future, and that Apple has\nno express or implied obligation to announce or introduce a final, commercial or\nany future pre-release version of the Apple Software or any similar or compatible\nproduct, or to continue to offer or support the Apple Software in the future. The\nApple Software is provided \"AS-IS\" and without warranty of any kind and Apple and\nApple's licensor(s) (for the purposes of Sections 3 and 4, Apple and Apple's\nlicensor(s) shall be collectively referred to as \"Apple\") EXPRESSLY DISCLAIM ALL\nWARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES AND/OR CONDITIONS OF MERCHANTABILITY OR SATISFACTORY\nQUALITY AND FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY\nRIGHTS. APPLE DOES NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE APPLE SOFTWARE\nWILL MEET YOUR REQUIREMENTS, OR THAT THE OPERATION OF THE APPLE SOFTWARE WILL BE\nUNINTERRUPTED OR ERROR-FREE, OR THAT DEFECTS IN THE APPLE SOFTWARE WILL BE\nCORRECTED. FURTHERMORE, APPLE DOES NOT WARRANT OR MAKE ANY REPRESENTATIONS\nREGARDING THE USE OR THE RESULTS OF THE USE OF THE APPLE SOFTWARE OR RELATED\nDOCUMENTATION IN TERMS OF THEIR CORRECTNESS, ACCURACY, RELIABILITY, OR OTHERWISE.\nNO ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY APPLE OR AN APPLE AUTHORIZED\nREPRESENTATIVE SHALL CREATE A WARRANTY OR IN ANY WAY INCREASE THE SCOPE OF THIS\nWARRANTY. SHOULD THE APPLE SOFTWARE PROVE DEFECTIVE, YOU (AND NOT APPLE OR AN\nAPPLE AUTHORIZED REPRESENTATIVE) ASSUME THE ENTIRE COST OF ALL NECESSARY\nSERVICING, REPAIR OR CORRECTION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF\nIMPLIED WARRANTIES, SO THE ABOVE EXCLUSION MAY NOT APPLY TO YOU. THE TERMS OF\nTHIS DISCLAIMER DO NOT AFFECT OR PREJUDICE THE STATUTORY RIGHTS OF A CONSUMER\nACQUIRING APPLE PRODUCTS OTHERWISE THAN IN THE COURSE OF A BUSINESS, NEITHER DO\nTHEY LIMIT OR EXCLUDE ANY LIABILITY FOR DEATH OR PERSONAL INJURY CAUSED BY\nAPPLE'S NEGLIGENCE.\n\n4. Limitation of Liability. UNDER NO CIRCUMSTANCES, INCLUDING NEGLIGENCE, SHALL\nAPPLE BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES\nARISING OUT OF OR RELATING TO THIS LICENSE. SOME JURISDICTIONS DO NOT ALLOW THE\nLIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES SO THIS LIMITATION MAY NOT\nAPPLY TO YOU. In no event shall Apple's total liability to you for all damages\nexceed the amount of fifty dollars ($50.00).\n\n5. Indemnification. You agree to indemnify and hold Apple harmless from any and\nall damages, liabilities, costs and expenses (including but not limited to\nattorneys' fees and costs of suit) incurred by Apple as a result of any claim,\nproceeding, and/or judgment to the extent it arises out of or is connected in any\nmanner with the operation, use, distribution or modification of Modified\nSoftware, or the combination of Apple Software or Modified Software with other\nprograms; provided that Apple notifies Licensee of any such claim or proceeding\nin writing, tenders to Licensee the opportunity to defend or settle such claim or\nproceeding at Licensee's expense, and cooperates with Licensee in defending or\nsettling such claim or proceeding.\n\n6. Export Law Assurances. You may not use or otherwise export or reexport the\nApple Software except as authorized by United States law and the laws of the\njurisdiction in which the Apple Software was obtained. In particular, but without\nlimitation, the Apple Software may not be exported or reexported (i) into (or to\na national or resident of) any U.S. embargoed country or (ii) to anyone on the\nU.S. Treasury Department's list of Specially Designated Nationals or the U.S.\nDepartment of Commerce's Table of Denial Orders. By using the Apple Software, you\nrepresent and warrant that you are not located in, under control of, or a\nnational or resident of any such country or on any such list.\n\n7. Government End Users. If the Apple Software is supplied to the United States\nGovernment, the Apple Software is classified as \"restricted computer software\" as\ndefined in clause 52.227-19 of the FAR. The United States Government's rights to\nthe Apple Software are as provided in clause 52.227-19 of the FAR.\n\n8. Controlling Law and Severability. If there is a local subsidiary of Apple in\nthe country in which the Apple Software License was obtained, then the local law\nin which the subsidiary sits shall govern this License. Otherwise, this License\nshall be governed by the laws of the United States and the State of California.\nIf for any reason a court of competent jurisdiction finds any provision, or\nportion thereof, to be unenforceable, the remainder of this License shall\ncontinue in full force and effect.\n\n9. Complete Agreement. This License constitutes the entire agreement between the\nparties with respect to the use of the Apple Software and supersedes all prior or\ncontemporaneous understandings regarding such subject matter. No amendment to or\nmodification of this License will be binding unless in writing and signed by\nApple.\n\nWhere the Licensee is located in the province of Quebec, Canada, the following\nclause applies: The parties hereto confirm that they have requested that this\nAgreement and all related documents be drafted in English. Les parties ont exig\nque le prsent contrat et tous les documents connexes soient rdigs en anglais.\n\n\nEXHIBIT A\nLicense. You may copy, install, use, modify and create derivative works of the\n[Modified Software] \"Changed Software\" (but you may not modify or create\nderivative works of the [Fonts]) and distribute and sublicense such Changed\nSoftware, provided however, that if the Changed Software contains modifications,\noverwrites, replacements, deletions, additions, or ports to new platforms of: (1)\nthe methods of existing classes objects or their existing relationships, or (2)\nany part of the virtual machine, then for so long as the Changed Software is\ndistributed or sublicensed to others, such modified, overwritten, replaced,\ndeleted, added and ported portions of the Changed Software must be made publicly\navailable, preferably by means of download from a website, at no charge under the\nterms of a license that makes no representations or warranties on behalf of any\nthird party, is no less protective of [the licensors of the Modified Software]\nand its licensors, and contains the terms set forth in Exhibit A below [which\nshould contain the terms of this Exhibit A]. You may distribute and sublicense\nthe [Fonts] only as a part of and for use with Changed Software, and not as a\npart of or for use with Changed Software that is distributed or sublicensed for a\nfee or for other valuable consideration.\n\n\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/JMMMpegBuffer.1.cs",
    "content": "'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 26 February 2006 at 1:16:15 pm'!\rObject subclass: #MPEGFile\r\tinstanceVariableNames: 'pathToFile fileBits fileIndex endianness buffer '\r\tclassVariableNames: 'Registry '\r\tpoolDictionaries: ''\r\tcategory: 'Movies-Kernel'!\rObject subclass: #MPEGPlayer\r\tinstanceVariableNames: 'external form startTime clockBias frameRate lastDelay noSound sampleRate audioPlayerProcess videoPlayerProcess playerProcessPriority soundQueue timeCheck semaphoreForSound errorForSoundStart morph volume buffer isBuffer '\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Movies-Kernel'!\r\r!MPEGFile methodsFor: 'access' stamp: 'JMM 1/20/2006 18:12'!\rbuffer\r\t^buffer! !\r\r!MPEGFile methodsFor: 'access' stamp: 'JMM 1/20/2006 23:15'!\risBufferBased\r\t^(buffer == nil) not ! !\r\r!MPEGFile methodsFor: 'initialize-release' stamp: 'JMM 1/20/2006 18:11'!\ropenBuffer: aByteArray\r\tpathToFile := nil.\r\tbuffer _ aByteArray.\r\tfileBits := self primFileOpenABuffer: aByteArray size: aByteArray size.\r\tfileBits notNil ifTrue: \r\t\t[fileIndex := Smalltalk registerExternalObject: fileBits.\r\t\tself register.]\r\t! !\r\r!MPEGFile methodsFor: 'primitives' stamp: 'JMM 1/20/2006 17:52'!\rprimFileOpenABuffer: buffer size: aSize\r\t\"Open the file\"\r\t<primitive: 'primitiveMPEG3OpenABuffer' module: 'Mpeg3Plugin'>\r\tself primitiveFailed! !\r\r\r!MPEGFile class methodsFor: 'instance creation' stamp: 'JMM 1/20/2006 18:18'!\ropenBuffer: aBuffer \r\t^self new openBuffer: aBuffer! !\r\r!MPEGFile class methodsFor: 'instance creation' stamp: 'JMM 1/20/2006 23:05'!\ropenFileUseBuffer: aPath \r\t| bar bytes |\r\tbar _ StandardFileStream oldFileNamed: aPath.\r\tbar binary.\r\tbytes _ bar contents.\r\t^self new openBuffer: bytes! !\r\r\r!MPEGPlayer methodsFor: 'access' stamp: 'JMM 1/20/2006 18:10'!\rexternal\r\t[external hasVideo] on: Error do: \r\t\t[self isBuffer\r\t\t\tifTrue:\r\t\t\t[external := MPEGFile openBuffer: external buffer]\r\t\t\tifFalse: \r\t\t\t\t[(MPEGFile isFileValidMPEG: external fileName) \r\t\t\t\t\tifFalse: [^self error: 'Mpeg File is invalid'].\r\t\t\t\texternal := MPEGFile openFile: external fileName]].\r\t^external! !\r\r!MPEGPlayer methodsFor: 'access' stamp: 'JMM 1/20/2006 18:05'!\risBuffer\r\t^isBuffer == true! !\r\r!MPEGPlayer methodsFor: 'initialize-release' stamp: 'JMM 1/20/2006 18:17'!\rinitializeWithBuffer: aBuffer form: aForm\r\tisBuffer := true.\r\tbuffer := aBuffer.\r\tself initialize: aBuffer.\r\tself form: aForm.\r\t^self! !\r\r!MPEGPlayer methodsFor: 'initialize-release' stamp: 'JMM 1/20/2006 18:07'!\rinitializeWithBuffer: aBuffer morph: aMorphic\r\tisBuffer _ true.\r\tbuffer _ aBuffer.\r\tself initialize: aBuffer.\r\tself morph: aMorphic.\r\t^self! !\r\r!MPEGPlayer methodsFor: 'initialize-release' stamp: 'JMM 1/20/2006 18:54'!\rinitialize: aPath\r\r\tself halt.\r\tself isBuffer ifTrue: \r\t\t[external := MPEGFile openBuffer: buffer]\r\t ifFalse: \r\t\t[(MPEGFile isFileValidMPEG: aPath) ifFalse: [^nil].\r\t\texternal := MPEGFile openFile: aPath.].\r\tself playerProcessPriority: Processor userSchedulingPriority.\r\tself lastDelay: 10.\r\tvolume := 1.0.\r\terrorForSoundStart := 500.\r\tsemaphoreForSound := Semaphore new.\r\tself startTime: (Array new: self totalVideoStreams).\r\tself clockBias: (Array new: self totalVideoStreams withAll: 0).! !\r\r\r!MPEGPlayer class methodsFor: 'instance creation' stamp: 'JMM 1/20/2006 18:16'!\rplayBuffer: aBuffer onForm: aForm\r\t^self new initializeWithBuffer: aBuffer morph: aForm! !\r\r!MPEGPlayer class methodsFor: 'instance creation' stamp: 'JMM 1/20/2006 18:06'!\rplayBuffer: aBuffer onMorph: aMorph\r\t^self new initializeWithBuffer: aBuffer morph: aMorph! !\r\rObject subclass: #MPEGPlayer\r\tinstanceVariableNames: 'external form startTime clockBias frameRate lastDelay noSound sampleRate audioPlayerProcess videoPlayerProcess playerProcessPriority soundQueue timeCheck semaphoreForSound errorForSoundStart morph volume buffer isBuffer'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Movies-Kernel'!\rObject subclass: #MPEGFile\r\tinstanceVariableNames: 'pathToFile fileBits fileIndex endianness buffer'\r\tclassVariableNames: 'Registry'\r\tpoolDictionaries: ''\r\tcategory: 'Movies-Kernel'!\r"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/JMMMpegBufferTest.1.cs",
    "content": "'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 26 February 2006 at 1:16:22 pm'!\r\r!MPEGDisplayMorph methodsFor: 'accessing' stamp: 'JMM 1/20/2006 23:15'!\risThereAFile\r\tmpegFile isBufferBased ifTrue: [^true].\r\t^(FileStream isAFileNamed: mpegFile fileName)! !\r\r!MPEGDisplayMorph methodsFor: 'accessing' stamp: 'JMM 1/20/2006 23:15'!\rmoviePosition\r\t\"Answer a number between 0.0 and 1.0 indicating the current position within the movie.\"\r\r\tmpegFile ifNil: [^ 0.0].\r\tmpegFile fileHandle ifNil: [^ 0.0].\r\tself isThereAFile ifFalse: [^0.0].\r\tmpegFile hasVideo\r\t\tifTrue: [^ ((mpegFile videoGetFrame: 0) asFloat / (mpegFile videoFrames: 0)) min: 1.0].\r\tsoundTrack ifNotNil: [^ soundTrack soundPosition].\r\t^ 0.0\r! !\r\r!MPEGDisplayMorph methodsFor: 'accessing' stamp: 'JMM 1/20/2006 23:16'!\rtotalFrames\r\t\"Answer the total number of frames in this movie.\"\r\r\tmpegFile ifNil: [^ 0].\r\tmpegFile fileHandle ifNil: [^ 0].\r\tself isThereAFile ifFalse: [^ 0].\r\tmpegFile hasVideo ifFalse: [^ 0].\r\t^ mpegFile videoFrames: 0! !\r\r!MPEGDisplayMorph methodsFor: 'accessing' stamp: 'JMM 1/20/2006 23:16'!\rtotalSeconds\r\t\"Answer the total number of seconds in this movie.\"\r\r\tmpegFile ifNil: [^ 0].\r\tmpegFile fileHandle ifNil: [^ 0].\r\tself isThereAFile ifFalse: [^ 0].\r\tmpegFile hasVideo ifFalse: [^ 0].\r\t^ self totalFrames asFloat / (mpegFile videoFrameRate: 0)! !\r\r!MPEGDisplayMorph methodsFor: 'commands' stamp: 'JMM 1/20/2006 23:09'!\rstartPlaying\r\t\"Start playing the movie at the current position.\"\r\r\t| frameIndex |\r\tself stopPlaying.\r\tstopFrame := nil.\r\tself mpegFileIsOpen ifFalse: [^ self].\r\r\t (mpegFile fileName notNil) ifTrue:\r\t\t[(FileStream isAFileNamed: mpegFile fileName) ifFalse: [ | newFileResult newFileName |\r\t\tself inform: 'Path changed. Enter new one for: ', (FileDirectory localNameFor: mpegFile fileName).\r\t\tnewFileResult := StandardFileMenu oldFile.\r\t\tnewFileName := newFileResult directory fullNameFor: newFileResult name.\t\r\t\tmpegFile openFile: newFileName]].\r\t\r\tmpegFile hasAudio\r\t\tifTrue:\r\t\t\t[mpegFile hasVideo ifTrue:\r\t\t\t\t[\"set movie frame position from soundTrack position\"\r\t\t\t\tsoundTrack reset.  \"ensure file is open before positioning\"\r\t\t\t\tsoundTrack soundPosition: (mpegFile videoGetFrame: 0) asFloat / (mpegFile videoFrames: 0).\r\t\t\t\t\"now set frame index from the soundtrack position for best sync\"\r\t\t\t\tframeIndex := ((soundTrack millisecondsSinceStart * desiredFrameRate) // 1000).\r\t\t\t\tframeIndex := (frameIndex max: 0) min: ((mpegFile videoFrames: 0) - 3).\r\t\t\t\tmpegFile videoSetFrame: frameIndex stream: 0].\r\r\t\t\tSoundPlayer stopReverb.\r\t\t\tsoundTrack volume: volume.\r\t\t\tsoundTrack repeat: repeat.\r\t\t\tsoundTrack resumePlaying.\r\t\t\tstartFrame := startMSecs := 0]\r\t\tifFalse:\r\t\t\t[soundTrack := nil.\r\t\t\tstartFrame := mpegFile videoGetFrame: 0.\r\t\t\tstartMSecs := Time millisecondClockValue].\r\trunning := true! !\r\r!MPEGDisplayMorph methodsFor: 'file open/close' stamp: 'JMM 1/20/2006 23:02'!\ropenFileNamed: mpegFileName\r\t\"Try to open the MPEG file with the given name. Answer true if successful.\"\r\r\t| e |\r\tself closeFile.\r\t(FileDirectory default fileExists: mpegFileName)\r\t\tifFalse: [self inform: ('File not found: {1}' translated format: {mpegFileName}). ^ false].\r\r\t(MPEGFile isFileValidMPEG: mpegFileName)\r\t\tifTrue: [mpegFile := MPEGFile openFileUseBuffer: mpegFileName]\r\t\tifFalse: [\r\t\t\t(JPEGMovieFile isJPEGMovieFile: mpegFileName)\r\t\t\t\tifTrue: [mpegFile := JPEGMovieFile new openFileNamed: mpegFileName]\r\t\t\t\tifFalse: [self inform: ('Not an MPEG or JPEG movie file: {1}' translated format: {mpegFileName}). ^ false]].\r\tmpegFile fileHandle ifNil: [^ false].\r\r\t\"initialize soundTrack\"\r\tmpegFile hasAudio\r\t\tifTrue: [soundTrack := mpegFile audioPlayerForChannel: 1]\r\t\tifFalse: [soundTrack := nil].\r\r\tmpegFile hasVideo\r\t\tifTrue: [  \"set screen size and display first frame\"\r\t\t\tdesiredFrameRate := mpegFile videoFrameRate: 0.\r\t\t\tsoundTrack ifNotNil: [  \"compute frame rate from length of audio track\"\r\t\t\t\tdesiredFrameRate := (mpegFile videoFrames: 0) / soundTrack duration].\r\t\t\te := (mpegFile videoFrameWidth: 0)@(mpegFile videoFrameHeight: 0).\r\t\t\tframeBuffer := Form extent: e depth: (Display depth max: 16).\r\t\t\tsuper extent: e.\r\t\t\tself nextFrame]\r\t\tifFalse: [  \"hide screen for audio-only files\"\r\t\t\tsuper extent: 250@0].\r! !\r\r"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/JMMMpegPluginBuffer.1.cs",
    "content": "'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 26 February 2006 at 1:16:10 pm'!\r\r!Mpeg3Plugin methodsFor: 'primitives' stamp: 'JMM 1/20/2006 19:07'!\rprimitiveMPEG3CheckSig: path\r\t| result sz storage |\r\r\t\"int mpeg3_check_sig(char *path)\"\r\tself var: #storage declareC: 'char storage[1024] '.\r\tself primitive: 'primitiveMPEG3CheckSig'\r\t\tparameters: #(String).\r\tsz _ interpreterProxy byteSizeOf: path cPtrAsOop.\r\tself cCode: 'sqFilenameFromStringOpen(storage, path, sz)'.\r\tself cCode: 'result = mpeg3_check_sig(storage)'.\r\t^result asOop: Boolean\r! !\r\r!Mpeg3Plugin methodsFor: 'primitives' stamp: 'JMM 1/20/2006 18:38'!\rprimitiveMPEG3OpenABuffer: path size: size\r\t| mpeg3Oop index |\r\r\tself var: #index declareC: 'mpeg3_t ** index'.\r\tself primitive: 'primitiveMPEG3OpenABuffer'\r\t\tparameters: #(String SmallInteger).\r\tmpeg3Oop := interpreterProxy instantiateClass: interpreterProxy classByteArray\r\t\t\t\t\tindexableSize: 4.\t\r\tindex := self cCoerce: (interpreterProxy firstIndexableField: mpeg3Oop)\r\t\t\t\t\t\tto: 'mpeg3_t **'.\r\tself cCode: '*index = mpeg3_open(path,size); makeFileEntry(*index)'.\r\t^mpeg3Oop.\r! !\r\r!Mpeg3Plugin methodsFor: 'primitives' stamp: 'JMM 1/20/2006 19:11'!\rprimitiveMPEG3Open: path\r\t| mpeg3Oop index sz storage |\r\r\t\"mpeg3_t* mpeg3_open(char *path)\"\r\tself var: #index declareC: 'mpeg3_t ** index'.\r\tself var: #storage declareC: 'char storage[1024]'.\r\tself primitive: 'primitiveMPEG3Open'\r\t\tparameters: #(String).\r\tsz := interpreterProxy byteSizeOf: path cPtrAsOop.\r\tself cCode: 'sqFilenameFromStringOpen(storage, path, sz)'.\r\tmpeg3Oop := interpreterProxy instantiateClass: interpreterProxy classByteArray\r\t\t\t\t\tindexableSize: 4.\r\tindex := self cCoerce: (interpreterProxy firstIndexableField: mpeg3Oop)\r\t\t\t\t\t\tto: 'mpeg3_t **'.\r\tself cCode: '*index = mpeg3_open(storage,0); makeFileEntry(*index)'.\r\t^mpeg3Oop.\r! !\r\r"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/JMMMpegPluginaddBufferOffsetting.1.cs",
    "content": "'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 26 February 2006 at 1:12:11 pm'!\r\r!Mpeg3Plugin methodsFor: 'primitives' stamp: 'JMM 2/26/2006 13:02'!\rprimitiveMPEG3ReadFrame: fileHandle buffer: aBuffer bufferOffset: aBufferOffset x: xNumber y: yNumber w: width h: height ow: outWidth oh: outHeight colorModel: model stream: aNumber bytesPerRow: aByteNumber \r\t| file result outputRowsPtr bufferBaseAddr |\r\r\t\"int mpeg3_read_frame(mpeg3_t *file, \r\t\tunsigned char **output_rows, \r\t\tint in_x, \r\t\tint in_y, \r\t\tint in_w, \r\t\tint in_h, \r\t\tint out_w, \r\t\tint out_h, \r\t\tint color_model,\r\t\tint stream)\"\r\r\tself primitive: 'primitiveMPEG3ReadFrameBufferOffset'\r\t\tparameters: #(Oop WordArray  SmallInteger SmallInteger  SmallInteger  SmallInteger  SmallInteger  SmallInteger  SmallInteger  SmallInteger  SmallInteger SmallInteger).\r\tself var: #file declareC: 'mpeg3_t * file'.\r\tself var: #bufferBaseAddr declareC: 'unsigned char *bufferBaseAddr'.\r\tself var: #outputRowsPtr declareC: 'unsigned char  ** outputRowsPtr'.\r\r\tfile := self mpeg3tValueOf: fileHandle.\r\tfile = nil ifTrue: [^0].\r\taNumber < 0 ifTrue: [ interpreterProxy success: false.  ^nil ].\r\taNumber >= (self cCode: 'result = mpeg3_total_vstreams(file)') ifTrue: [\r\t\tinterpreterProxy success: false.  ^0 ].\r\r\tbufferBaseAddr := self cCoerce: aBuffer to: 'unsigned char *'.\r\tself cCode: 'outputRowsPtr = (unsigned char **) memoryAllocate(1,sizeof(unsigned char*) * outHeight)'.\r\r\t0 to: outHeight-1 do: [:i | outputRowsPtr at: i put: (bufferBaseAddr + aBufferOffset + (aByteNumber*i))].\r\t\t\r\tself cCode: 'result = mpeg3_read_frame(file,outputRowsPtr,xNumber,yNumber,width,height,outWidth,outHeight,model,aNumber)'.\r\tself cCode: 'memoryFree(outputRowsPtr)'.\r\t^result asSmallIntegerObj\r! !\r\r"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/JMMMpegaddBufferOffsetting.1.cs",
    "content": "'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 26 February 2006 at 1:12:11 pm'!\r\r!MPEGFile methodsFor: 'primitives' stamp: 'JMM 2/26/2006 13:08'!\rprimVideoReadNextFrameFor: aFileHandle into: aFormBuffer offset: aBufferOffsetInBytes x: x y: y width: width height: height outWidth: aTargetWidth outHeight: aTargetHeight colorModel: colorModel stream: aStream bytesPerRow: aByteCount\r\t<primitive: 'primitiveMPEG3ReadFrameBufferOffset' module: 'Mpeg3Plugin'>\r\r! !\r\r\r\r"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/Mpeg3Plugin.h",
    "content": "\t#include \"changesForSqueak.h\"\n\t#include \"libmpeg3.h\"\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/README",
    "content": "/********************************************************\n * LibMPEG3\n * Author: Adam Williams <broadcast@earthling.net>\n * Page: heroine.linuxbox.com\n * Page: http://www.smalltalkconsulting.com/html/mpeg3source.html (for Squeak)\n *\n    LibMPEG3 was originally licenced under GPL. It was relicensed by\n    the author under the LGPL and the Squeak license on Nov 1st, 2000\n    \n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA \n    \n    Also licensed under the Squeak license.\n    http://www.squeak.org/license.html\n *\n *******************************************************/\n\n\n/**********************************************************\n * Credits:\n *********************************************************/\n\nPort to Squeak and Macintosh \n\n\tBy John M McIntosh (johnmci@smalltalkconsulting.com)\n\nProblems:\n\n\tStreams where the multiplexing packet size changes at random.\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/docs/index.html",
    "content": "<TITLE>LibMPEG3</TITLE>\n\n<CENTER>\n<FONT FACE=HELVETICA SIZE=+4><B>Using LibMPEG3 to make your own MPEG applications</B></FONT><P>\n\n<TABLE>\n<TR>\n<TD>\n<CODE>\nAuthor: Adam Williams    broadcast@earthling.net<BR>\nHomepage: heroinewarrior.com<BR>\n</CODE>\n</TD>\n</TR>\n</TABLE>\n</CENTER>\n\n<P>\n\n\nLibMPEG3 decodes the many many derivatives of MPEG standards into\nuncompressed data suitable for editing and playback.<P>\n\nlibmpeg3 currently decodes:<P>\n\n<BLOCKQUOTE>MPEG-2 video<BR>\nMPEG-1 video<BR>\nmp3 audio<BR>\nmp2 audio<BR>\nac3 audio (not in Squeak)<BR>\nMPEG-2 system streams<BR>\nMPEG-1 system streams\n</BLOCKQUOTE><P>\n\nThe video output can be in many different color models and frame\nsizes.  The audio output can be in twos compliment or floating\npoint.<P>\n\n\n\n\n\n\n\n\n\n<FONT FACE=HELVETICA SIZE=+4><B>STEP 1: Verifying file compatibility</B></FONT><P>\n\nPrograms using libmpeg3 must <CODE>#include \"libmpeg3.h\"</CODE>.<P>\n\nCall <CODE>mpeg3_check_sig</CODE> to verify if the file can be read by\nlibmpeg3.  This returns a 1 if it is compatible and 0 if it isn't.<P>\n\n\n\n\n\n\n\n\n\n\n\n<FONT FACE=HELVETICA SIZE=+4><B>STEP 2: Open the file</B></FONT><P>\n\nYou need an <CODE>mpeg3_t*</CODE> file descriptor:<P>\n<CODE>\nmpeg3_t* file;\n</CODE>\n<P>\n\nThen you need to open the file:<P>\n\n<CODE>file = mpeg3_open(char *path);</CODE><P>\n\n<CODE>mpeg3_open</CODE> returns a NULL if the file couldn't be opened\nfor some reason.  Be sure to check this.  Everything you do with\nlibmpeg3 requires passing the <CODE>file</CODE> pointer.<P>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<FONT FACE=HELVETICA SIZE=+4><B>STEP 3: How many CPUs do you want to use?</B></FONT><P>\n\nCall <CODE>mpeg3_set_cpus(mpeg3_t *file, int cpus)</CODE> to set how\nmany CPUs should be devoted to video decompression.  LibMPEG3 can use\nany number.  If you don't call this right after opening the file, the\nCPU number defaults to 1.<P>\n\n\n\n\n\n\n\n<FONT FACE=HELVETICA SIZE=+4><B>STEP 4: Get some information about the file.</B></FONT><P>\n\nThere are a number of queries for the audio components of the stream:<P>\n\n<CODE><PRE>\nint mpeg3_has_audio(mpeg3_t *file);\nint mpeg3_total_astreams(mpeg3_t *file);             // Number of multiplexed audio streams\nint mpeg3_audio_channels(mpeg3_t *file, int stream);\nint mpeg3_sample_rate(mpeg3_t *file, int stream);\nlong mpeg3_audio_samples(mpeg3_t *file, int stream); // Total length\n</PRE></CODE>\n\nThe audio is presented as a number of <B>streams</B> starting at 0 and\nincluding <CODE>mpeg3_total_astreams</CODE> - 1.  Each stream contains a\ncertain number of <B>channels</B> starting at 0 and including\n<CODE>mpeg3_audio_channels</CODE> - 1.\n\nThe methodology is first determine if the file has audio, then get\nthe number of streams in the file, then for each stream get the number\nof channels, sample rate, and length.<P>\n\nThere are also queries for the video components:<P>\n\n<CODE><PRE>\nint mpeg3_has_video(mpeg3_t *file);\nint mpeg3_total_vstreams(mpeg3_t *file);            // Number of multiplexed video streams\nint mpeg3_video_width(mpeg3_t *file, int stream);\nint mpeg3_video_height(mpeg3_t *file, int stream);\nfloat mpeg3_frame_rate(mpeg3_t *file, int stream);  // Frames/sec\nlong mpeg3_video_frames(mpeg3_t *file, int stream); // Total length\n</PRE></CODE>\n\nThe video behavior is the same as with audio, except that video has no\nsubdivision under <B>streams</B>.  Frame rate is a floating point\nnumber of frames per second.<P>\n\n\n\n\n\n\n\n<FONT FACE=HELVETICA SIZE=+4><B>STEP 5: Seeking to a point in the file</B></FONT><P>\n\nEach audio stream and each video stream has a position in the file\nindependant of each other stream.  A variety of methods are available\nfor specifying the position of a stream: percentage, frame, sample. \nWhich method you use depends on whether you're seeking audio or video\nand whether you're seeking all tracks to a percentage of the file.<P>\n\nThe preferred seeking method if you're writing a player is:<P>\n\n<CODE><PRE>\nint mpeg3_seek_percentage(mpeg3_t *file, double percentage);\ndouble mpeg3_tell_percentage(mpeg3_t *file);\n</PRE></CODE>\n\nThis seeks all tracks to a percentage of the file length.  The\npercentage is from 0 to 1.<P>\n\nThe alternative is absolute seeking.  The audio seeking is handled\nby:<P>\n\n<CODE><PRE>\nint mpeg3_set_sample(mpeg3_t *file, long sample, int stream);    // Seek\nlong mpeg3_get_sample(mpeg3_t *file, int stream);    // Tell current position\n</PRE></CODE>\n\nand the video seeking is handled by:<P>\n\n<CODE><PRE>\nint mpeg3_set_frame(mpeg3_t *file, long frame, int stream); // Seek\nlong mpeg3_get_frame(mpeg3_t *file, int stream);            // Tell current position\n</PRE></CODE>\n\n\nYou can either perform percentage seeking or absolute seeking but not\nboth on the same file handle.  Once you perform either method, the file\nbecomes configured for that method.<P>\n\nIf you're in percentage seeking mode and you want the current time\nstamp in the file you can't use mpeg3_tell_percentage because you don't\nknow how many seconds the total length is.  The\n<CODE>mpeg3_audio_samples</CODE> and <CODE>mpeg3_video_frames</CODE>\ncommands don't work in percentage seeking.  Instead use\n\n<CODE><PRE>\ndouble mpeg3_get_time(mpeg3_t *file);\n</PRE></CODE>\n\nwhich gives you the last timecode read in seconds.  The MPEG standard\nspecifies timecodes being placed in the streams.<P>\n\n\n\n\n\n\n\n\n\n\n\n<FONT FACE=HELVETICA SIZE=+4><B>STEP 6: Read the data</B></FONT><P>\n\nTo read <B>audio</B> data use:<P>\n\n<CODE><PRE>\nint mpeg3_read_audio(mpeg3_t *file, \n\t\tfloat *output_f,      // Pointer to pre-allocated buffer of floats\n\t\tshort *output_i,      // Pointer to pre-allocated buffer if int16's\n\t\tint channel,          // Channel to decode\n\t\tlong samples,         // Number of samples to decode\n\t\tint stream);          // Stream containing the channel\n</PRE></CODE>\n\nThis decodes a buffer of sequential floats or int16's for a single\nchannel, depending on which *output... parameter has a nonzero\nargument.  To get a floating point buffer pass a pre-allocated buffer\nto <CODE>output_f</CODE> and NULL to <CODE>output_i</CODE>. To get an\nint16 buffer pass NULL to <CODE>output_f</CODE> and a pre-allocated\nbuffer to <CODE>output_i</CODE>.<P>\n\nAfter reading an audio buffer, the current position in the one stream\nis advanced.  How then, do you read more than one channel of audio\ndata?  Use\n\n<CODE><PRE>\nmpeg3_reread_audio(mpeg3_t *file, \n\t\tfloat *output_f,      /* Pointer to pre-allocated buffer of floats */\n\t\tshort *output_i,      /* Pointer to pre-allocated buffer of int16's */\n\t\tint channel,          /* Channel to decode */\n\t\tlong samples,         /* Number of samples to decode */\n\t\tint stream);\n</PRE></CODE>\n\nto read each remaining channel after the first channel.<P>\n\nTo read <B>video</B> data there are two methods.  RGB frames or YUV\nframes.  To get an RGB frame use:<BR>\n\n<CODE><PRE>\nint mpeg3_read_frame(mpeg3_t *file, \n\t\tunsigned char **output_rows, // Array of pointers to the start of each output row\n\t\tint in_x,                    // Location in input frame to take picture\n\t\tint in_y, \n\t\tint in_w, \n\t\tint in_h, \n\t\tint out_w,                   // Dimensions of output_rows\n\t\tint out_h, \n\t\tint color_model,             // One of the color model #defines given above.\n\t\tint stream);\n</PRE></CODE>\n\nThe video decoding works like a camcorder taking copy of a movie\nscreen.  The decoder \"sees\" a region of the movie screen defined by\n<CODE>in_x, in_y, in_w, in_h</CODE> and transfers it to the frame\nbuffer defined by <CODE>**output_rows</CODE>.  The input values must be\nwithin the boundaries given by <CODE>mpeg3_video_width</CODE> and\n<CODE>mpeg3_video_height</CODE>.  The size of the frame buffer is\ndefined by <CODE>out_w, out_h</CODE>.  Although the input dimensions\nare constrained, the frame buffer can be any size.<P>\n\n<CODE>color_model</CODE> defines which RGB color model the picture\nshould be decoded to and the possible values are given in\n<B>libmpeg3.h</B>.  The frame buffer pointed to by\n<CODE>output_rows</CODE> must have enough memory allocated to store the\ncolor model you select.<P>\n\n<B>You must allocate 4 extra bytes in the last output_row.</B>  This is\nscratch area for the MMX routines.<P>\n\n<CODE>mpeg3_read_frame</CODE> advances the position in the one stream by 1 frame.<P>\n\nThe alternative is YUV frames:<BR>\n\n<CODE><PRE>\nint mpeg3_read_yuvframe(mpeg3_t *file,\n\t\tchar *y_output,\n\t\tchar *u_output,\n\t\tchar *v_output,\n\t\tint in_x,\n\t\tint in_y,\n\t\tint in_w,\n\t\tint in_h,\n\t\tint stream);\n</PRE></CODE>\n\nThe behavior of in_x, in_y, in_w, in_h is identical to mpeg3_read_frame\nexcept here you have no control over the output frame size.  <B>You\nmust allocate in_w * in_h for the y_output, and in_w * in_h / 4 for the\nchroma outputs.</B><P>\n\n\n\n\n\n<FONT FACE=HELVETICA SIZE=+4><B>STEP 7: Close the file</B></FONT><P>\n\nBe sure to close the file with <CODE>mpeg3_close(mpeg3_t *file)</CODE>\nwhen you're done with it.\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/examplesSqueak.txt",
    "content": "\"Find a file\"\n\nMPEGFile isFileValidMPEG: 'randomalien.mpg'.\n\n\"Explore the file\"\n\n| foo | \nfoo _ MPEGFile openFile: 'randomalien.mpg'.\nfoo hasVideo.\nfoo hasAudio.\nfoo endOfVideo: 0.\nfoo endOfAudio: 0.\nfoo audioChannels: 0.\nfoo audioSamples: 0.\nfoo audioGetSample: 0.\nfoo audioSampleRate: 0.\nfoo videoFrameRate: 0.\nfoo videoGetFrame: 0.\nfoo audioGetSample: 0.\nfoo getTimeCode.\nfoo videoPreviousFrame: 0.\nfoo videoSetCPUs: 1.\nfoo videoSetFrame: 44 stream: 0.\nfoo setMMX: true.  \nfoo audioSetSample: 44 stream: 0.\nfoo totalAudioStreams.\nfoo totalVideoStreams.\nfoo videoFrames: 0.\nfoo videoFrameHeight: 0.\nfoo videoFrameWidth: 0.\nfoo seekPercentage: 0.5.\nfoo getPercentage.\nfoo videoSetCPUs: 1.\nfoo setMMX: true. \nfoo closeFile.\n\n-----------------------------------\n\"Simply get the video start at 700 and run 50 frames then debug\"\n\"Better code is in the player, don't use this code, but it's an example\"\n\n| foo x y counter fum | \n\nfoo _ MPEGFile openFile: 'randomalien.mpg'.\nstream _ 0.\ncounter _ 0.\ny _ foo videoFrameHeight: stream.\nx _ foo videoFrameWidth: stream.\nfum _ Form extent: x@y depth: 32.\nframes _ foo videoFrames: stream.\nfoo videoSetFrame: 700 stream: stream.\n[foo endOfVideo: stream] whileFalse: \n\t[foo videoReadNextFrameInto: fum bits \n\t\twidth: fum width height: fum height stream: stream.\n\t\tfum displayOn: Display.\n\t(counter _ counter + 1) == 50 ifTrue: [self halt]].\nfoo closeFile.\n\n-----------------------------------\n\"Play the audio\"\n\"There is more than one way to do this\"\n\"This is my first technically correct try\"\n\"DO not use this code, better code is in the player\"\n\n| foo buffer sound soundOther | \n\nfoo _ MPEGFile openFile: 'randomalien.mpg'.\nchannels _ foo audioChannels: 0.\nsampleRate _ foo audioSampleRate: 0.\ntotalSamples _ foo audioSamples: 0.\nbuffer _ ByteArray new: 1024*1024*1.\nSoundPlayer startPlayerProcessBufferSize:  8192 rate: sampleRate stereo: true.\n\nresult _ foo audioReadBuffer: buffer stream: 0 channel: 0 samples: 1024*1024//2.\nsound _ SampledSound samples: \n\t\t\t(SampledSound convertBytesTo16BitSamples: buffer mostSignificantByteFirst: true)\n\t\t samplingRate: sampleRate.\n\nresult _ foo audioReReadBuffer: buffer stream: 0 channel: 1 samples: 1024*1024//2.\nsoundOther _ SampledSound samples: \n\t\t\t(SampledSound convertBytesTo16BitSamples: buffer mostSignificantByteFirst: true)\n\t\t samplingRate: sampleRate.\n\nsound _ MixedSound new\n\t\t\tadd: sound pan: 0;\n\t\t\tadd: soundOther pan: 1.0.\nsound play\n\n-----------------------------------\n\"Ok make it simple for Audio\"\n\n| foo |\nform _ Form extent: 320@240 depth: 16.\nfoo _ MPEGPlayer playFile: 'randomAlien.mpg' onForm: form.\nfoo playAudioStreamWaitTilDone: 0.\n\n-----------------------------------\n\"Ok make it simple for Video\"\n| foo |\nform _ Form extent: 320@240 depth: 32.\nfoo _ MPEGPlayer playFile: 'randomAlien.mpg' onForm: form.\nfoo playVideoStreamWaitTilDone: 0.\n\n-----------------------------------\n\"Play the video in the background\"\n| foo |\nform _ Form extent: 320@240 depth: 16.\nfoo _ MPEGPlayer playFile: 'randomAlien.mpg' onForm: form.\nfoo playVideoStream: 0.\nfoo inspect.\n\n-----------------------------------\n\"Play both in the background\"\n| foo |\nform _ Form extent: 320@240 depth: 16.\nfoo _ MPEGPlayer playFile: 'randomAlien.mpg' onForm: form.\nfoo playStream: 0.\nfoo inspect.\n\n-------------------------\n\" In Morphic do \" \n| foo |\nform _ Form extent: 320@240 depth: 32.\nmorph _ SketchMorph withForm: form.\nmorph openInWorld.\nfoo _ MPEGPlayer playFile: 'randomAlien.mpg' onMorph: morph.\nfoo morph: morph.\nfoo playStream: 0.\nfoo inspect.\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/Makefile",
    "content": "### automatically generated by ./mkMakefile\n### settings for building libmpeg by itself\n\nLIBMPEG_CC=cc\nLIBMPEG_CFLAGS=\nLIBMPEG_LINKLIB=ar rcs\nLIBMPEG_NASM=nasm -f elf\nLIBMPEG_SOURCE_DIR=.\nLIBMPEG_BUILD_DIR=.\nLIBMPEG_OBJECT_EXT=o\nLIBMPEG_LIBRARY_EXT=a\n\n\n### default rule: build the library\ndefault : libmpeg3.a\n\n\n### Update the makefile when needed\nMakefile : mkMakefile\n\t./mkMakefile \n\n#### automatically generated by ./mkMakefile\n# flags for compiling libmpeg\nLIBMPEG_CFLAGS += -I$(LIBMPEG_SOURCE_DIR) -I$(LIBMPEG_SOURCE_DIR)/audio -I$(LIBMPEG_SOURCE_DIR)/video\n\n# a file that indicates the build tree has been created\nLIBMPEG_BUILD_DIR_CREATED=$(LIBMPEG_BUILD_DIR)/tree.created\n\nLIBMPEG_CFLAGS += -DNOPTHREADS\n\n$(LIBMPEG_BUILD_DIR_CREATED):\n\tmkdir -p $(LIBMPEG_BUILD_DIR)\n\tmkdir -p $(LIBMPEG_BUILD_DIR)/audio\n\tmkdir -p $(LIBMPEG_BUILD_DIR)/video\n\ttouch $(LIBMPEG_BUILD_DIR_CREATED)\n$(LIBMPEG_BUILD_DIR)/bitstream.$(LIBMPEG_OBJECT_EXT): $(LIBMPEG_BUILD_DIR_CREATED) $(LIBMPEG_SOURCE_DIR)/bitstream.c\n\t$(LIBMPEG_CC) -o $(LIBMPEG_BUILD_DIR)/bitstream.$(LIBMPEG_OBJECT_EXT) -c $(LIBMPEG_SOURCE_DIR)/bitstream.c  $(LIBMPEG_CFLAGS) \n\n$(LIBMPEG_BUILD_DIR)/libmpeg3.$(LIBMPEG_OBJECT_EXT): $(LIBMPEG_BUILD_DIR_CREATED) $(LIBMPEG_SOURCE_DIR)/libmpeg3.c\n\t$(LIBMPEG_CC) -o $(LIBMPEG_BUILD_DIR)/libmpeg3.$(LIBMPEG_OBJECT_EXT) -c $(LIBMPEG_SOURCE_DIR)/libmpeg3.c  $(LIBMPEG_CFLAGS) \n\n$(LIBMPEG_BUILD_DIR)/mpeg3atrack.$(LIBMPEG_OBJECT_EXT): $(LIBMPEG_BUILD_DIR_CREATED) $(LIBMPEG_SOURCE_DIR)/mpeg3atrack.c\n\t$(LIBMPEG_CC) -o $(LIBMPEG_BUILD_DIR)/mpeg3atrack.$(LIBMPEG_OBJECT_EXT) -c $(LIBMPEG_SOURCE_DIR)/mpeg3atrack.c  $(LIBMPEG_CFLAGS) \n\n$(LIBMPEG_BUILD_DIR)/mpeg3demux.$(LIBMPEG_OBJECT_EXT): $(LIBMPEG_BUILD_DIR_CREATED) $(LIBMPEG_SOURCE_DIR)/mpeg3demux.c\n\t$(LIBMPEG_CC) -o $(LIBMPEG_BUILD_DIR)/mpeg3demux.$(LIBMPEG_OBJECT_EXT) -c $(LIBMPEG_SOURCE_DIR)/mpeg3demux.c  $(LIBMPEG_CFLAGS) \n\n$(LIBMPEG_BUILD_DIR)/mpeg3io.$(LIBMPEG_OBJECT_EXT): $(LIBMPEG_BUILD_DIR_CREATED) $(LIBMPEG_SOURCE_DIR)/mpeg3io.c\n\t$(LIBMPEG_CC) -o $(LIBMPEG_BUILD_DIR)/mpeg3io.$(LIBMPEG_OBJECT_EXT) -c $(LIBMPEG_SOURCE_DIR)/mpeg3io.c  $(LIBMPEG_CFLAGS) \n\n$(LIBMPEG_BUILD_DIR)/mpeg3title.$(LIBMPEG_OBJECT_EXT): $(LIBMPEG_BUILD_DIR_CREATED) $(LIBMPEG_SOURCE_DIR)/mpeg3title.c\n\t$(LIBMPEG_CC) -o $(LIBMPEG_BUILD_DIR)/mpeg3title.$(LIBMPEG_OBJECT_EXT) -c $(LIBMPEG_SOURCE_DIR)/mpeg3title.c  $(LIBMPEG_CFLAGS) \n\n$(LIBMPEG_BUILD_DIR)/mpeg3vtrack.$(LIBMPEG_OBJECT_EXT): $(LIBMPEG_BUILD_DIR_CREATED) $(LIBMPEG_SOURCE_DIR)/mpeg3vtrack.c\n\t$(LIBMPEG_CC) -o $(LIBMPEG_BUILD_DIR)/mpeg3vtrack.$(LIBMPEG_OBJECT_EXT) -c $(LIBMPEG_SOURCE_DIR)/mpeg3vtrack.c  $(LIBMPEG_CFLAGS) \n\n$(LIBMPEG_BUILD_DIR)/changesForSqueak.$(LIBMPEG_OBJECT_EXT): $(LIBMPEG_BUILD_DIR_CREATED) $(LIBMPEG_SOURCE_DIR)/changesForSqueak.c\n\t$(LIBMPEG_CC) -o $(LIBMPEG_BUILD_DIR)/changesForSqueak.$(LIBMPEG_OBJECT_EXT) -c $(LIBMPEG_SOURCE_DIR)/changesForSqueak.c  $(LIBMPEG_CFLAGS) \n\n$(LIBMPEG_BUILD_DIR)/audio/dct.$(LIBMPEG_OBJECT_EXT): $(LIBMPEG_BUILD_DIR_CREATED) $(LIBMPEG_SOURCE_DIR)/audio/dct.c\n\t$(LIBMPEG_CC) -o $(LIBMPEG_BUILD_DIR)/audio/dct.$(LIBMPEG_OBJECT_EXT) -c $(LIBMPEG_SOURCE_DIR)/audio/dct.c  $(LIBMPEG_CFLAGS) \n\n$(LIBMPEG_BUILD_DIR)/audio/header.$(LIBMPEG_OBJECT_EXT): $(LIBMPEG_BUILD_DIR_CREATED) $(LIBMPEG_SOURCE_DIR)/audio/header.c\n\t$(LIBMPEG_CC) -o $(LIBMPEG_BUILD_DIR)/audio/header.$(LIBMPEG_OBJECT_EXT) -c $(LIBMPEG_SOURCE_DIR)/audio/header.c  $(LIBMPEG_CFLAGS) \n\n$(LIBMPEG_BUILD_DIR)/audio/layer2.$(LIBMPEG_OBJECT_EXT): $(LIBMPEG_BUILD_DIR_CREATED) $(LIBMPEG_SOURCE_DIR)/audio/layer2.c\n\t$(LIBMPEG_CC) -o $(LIBMPEG_BUILD_DIR)/audio/layer2.$(LIBMPEG_OBJECT_EXT) -c $(LIBMPEG_SOURCE_DIR)/audio/layer2.c  $(LIBMPEG_CFLAGS) \n\n$(LIBMPEG_BUILD_DIR)/audio/layer3.$(LIBMPEG_OBJECT_EXT): $(LIBMPEG_BUILD_DIR_CREATED) $(LIBMPEG_SOURCE_DIR)/audio/layer3.c\n\t$(LIBMPEG_CC) -o $(LIBMPEG_BUILD_DIR)/audio/layer3.$(LIBMPEG_OBJECT_EXT) -c $(LIBMPEG_SOURCE_DIR)/audio/layer3.c  $(LIBMPEG_CFLAGS) \n\n$(LIBMPEG_BUILD_DIR)/audio/mpeg3audio.$(LIBMPEG_OBJECT_EXT): $(LIBMPEG_BUILD_DIR_CREATED) $(LIBMPEG_SOURCE_DIR)/audio/mpeg3audio.c\n\t$(LIBMPEG_CC) -o $(LIBMPEG_BUILD_DIR)/audio/mpeg3audio.$(LIBMPEG_OBJECT_EXT) -c $(LIBMPEG_SOURCE_DIR)/audio/mpeg3audio.c  $(LIBMPEG_CFLAGS) \n\n$(LIBMPEG_BUILD_DIR)/audio/pcm.$(LIBMPEG_OBJECT_EXT): $(LIBMPEG_BUILD_DIR_CREATED) $(LIBMPEG_SOURCE_DIR)/audio/pcm.c\n\t$(LIBMPEG_CC) -o $(LIBMPEG_BUILD_DIR)/audio/pcm.$(LIBMPEG_OBJECT_EXT) -c $(LIBMPEG_SOURCE_DIR)/audio/pcm.c  $(LIBMPEG_CFLAGS) \n\n$(LIBMPEG_BUILD_DIR)/audio/synthesizers.$(LIBMPEG_OBJECT_EXT): $(LIBMPEG_BUILD_DIR_CREATED) $(LIBMPEG_SOURCE_DIR)/audio/synthesizers.c\n\t$(LIBMPEG_CC) -o $(LIBMPEG_BUILD_DIR)/audio/synthesizers.$(LIBMPEG_OBJECT_EXT) -c $(LIBMPEG_SOURCE_DIR)/audio/synthesizers.c  $(LIBMPEG_CFLAGS) \n\n$(LIBMPEG_BUILD_DIR)/audio/tables.$(LIBMPEG_OBJECT_EXT): $(LIBMPEG_BUILD_DIR_CREATED) $(LIBMPEG_SOURCE_DIR)/audio/tables.c\n\t$(LIBMPEG_CC) -o $(LIBMPEG_BUILD_DIR)/audio/tables.$(LIBMPEG_OBJECT_EXT) -c $(LIBMPEG_SOURCE_DIR)/audio/tables.c  $(LIBMPEG_CFLAGS) \n\n$(LIBMPEG_BUILD_DIR)/video/getpicture.$(LIBMPEG_OBJECT_EXT): $(LIBMPEG_BUILD_DIR_CREATED) $(LIBMPEG_SOURCE_DIR)/video/getpicture.c\n\t$(LIBMPEG_CC) -o $(LIBMPEG_BUILD_DIR)/video/getpicture.$(LIBMPEG_OBJECT_EXT) -c $(LIBMPEG_SOURCE_DIR)/video/getpicture.c  $(LIBMPEG_CFLAGS) \n\n$(LIBMPEG_BUILD_DIR)/video/headers.$(LIBMPEG_OBJECT_EXT): $(LIBMPEG_BUILD_DIR_CREATED) $(LIBMPEG_SOURCE_DIR)/video/headers.c\n\t$(LIBMPEG_CC) -o $(LIBMPEG_BUILD_DIR)/video/headers.$(LIBMPEG_OBJECT_EXT) -c $(LIBMPEG_SOURCE_DIR)/video/headers.c  $(LIBMPEG_CFLAGS) \n\n$(LIBMPEG_BUILD_DIR)/video/idct.$(LIBMPEG_OBJECT_EXT): $(LIBMPEG_BUILD_DIR_CREATED) $(LIBMPEG_SOURCE_DIR)/video/idct.c\n\t$(LIBMPEG_CC) -o $(LIBMPEG_BUILD_DIR)/video/idct.$(LIBMPEG_OBJECT_EXT) -c $(LIBMPEG_SOURCE_DIR)/video/idct.c  $(LIBMPEG_CFLAGS) \n\n$(LIBMPEG_BUILD_DIR)/video/macroblocks.$(LIBMPEG_OBJECT_EXT): $(LIBMPEG_BUILD_DIR_CREATED) $(LIBMPEG_SOURCE_DIR)/video/macroblocks.c\n\t$(LIBMPEG_CC) -o $(LIBMPEG_BUILD_DIR)/video/macroblocks.$(LIBMPEG_OBJECT_EXT) -c $(LIBMPEG_SOURCE_DIR)/video/macroblocks.c  $(LIBMPEG_CFLAGS) \n\n$(LIBMPEG_BUILD_DIR)/video/mmxtest.$(LIBMPEG_OBJECT_EXT): $(LIBMPEG_BUILD_DIR_CREATED) $(LIBMPEG_SOURCE_DIR)/video/mmxtest.c\n\t$(LIBMPEG_CC) -o $(LIBMPEG_BUILD_DIR)/video/mmxtest.$(LIBMPEG_OBJECT_EXT) -c $(LIBMPEG_SOURCE_DIR)/video/mmxtest.c  $(LIBMPEG_CFLAGS) \n\n$(LIBMPEG_BUILD_DIR)/video/motion.$(LIBMPEG_OBJECT_EXT): $(LIBMPEG_BUILD_DIR_CREATED) $(LIBMPEG_SOURCE_DIR)/video/motion.c\n\t$(LIBMPEG_CC) -o $(LIBMPEG_BUILD_DIR)/video/motion.$(LIBMPEG_OBJECT_EXT) -c $(LIBMPEG_SOURCE_DIR)/video/motion.c  $(LIBMPEG_CFLAGS) \n\n$(LIBMPEG_BUILD_DIR)/video/mpeg3video.$(LIBMPEG_OBJECT_EXT): $(LIBMPEG_BUILD_DIR_CREATED) $(LIBMPEG_SOURCE_DIR)/video/mpeg3video.c\n\t$(LIBMPEG_CC) -o $(LIBMPEG_BUILD_DIR)/video/mpeg3video.$(LIBMPEG_OBJECT_EXT) -c $(LIBMPEG_SOURCE_DIR)/video/mpeg3video.c  $(LIBMPEG_CFLAGS) \n\n$(LIBMPEG_BUILD_DIR)/video/output.$(LIBMPEG_OBJECT_EXT): $(LIBMPEG_BUILD_DIR_CREATED) $(LIBMPEG_SOURCE_DIR)/video/output.c\n\t$(LIBMPEG_CC) -o $(LIBMPEG_BUILD_DIR)/video/output.$(LIBMPEG_OBJECT_EXT) -c $(LIBMPEG_SOURCE_DIR)/video/output.c  $(LIBMPEG_CFLAGS) \n\n$(LIBMPEG_BUILD_DIR)/video/reconstruct.$(LIBMPEG_OBJECT_EXT): $(LIBMPEG_BUILD_DIR_CREATED) $(LIBMPEG_SOURCE_DIR)/video/reconstruct.c\n\t$(LIBMPEG_CC) -o $(LIBMPEG_BUILD_DIR)/video/reconstruct.$(LIBMPEG_OBJECT_EXT) -c $(LIBMPEG_SOURCE_DIR)/video/reconstruct.c  $(LIBMPEG_CFLAGS) \n\n$(LIBMPEG_BUILD_DIR)/video/seek.$(LIBMPEG_OBJECT_EXT): $(LIBMPEG_BUILD_DIR_CREATED) $(LIBMPEG_SOURCE_DIR)/video/seek.c\n\t$(LIBMPEG_CC) -o $(LIBMPEG_BUILD_DIR)/video/seek.$(LIBMPEG_OBJECT_EXT) -c $(LIBMPEG_SOURCE_DIR)/video/seek.c  $(LIBMPEG_CFLAGS) \n\n$(LIBMPEG_BUILD_DIR)/video/slice.$(LIBMPEG_OBJECT_EXT): $(LIBMPEG_BUILD_DIR_CREATED) $(LIBMPEG_SOURCE_DIR)/video/slice.c\n\t$(LIBMPEG_CC) -o $(LIBMPEG_BUILD_DIR)/video/slice.$(LIBMPEG_OBJECT_EXT) -c $(LIBMPEG_SOURCE_DIR)/video/slice.c  $(LIBMPEG_CFLAGS) \n\n$(LIBMPEG_BUILD_DIR)/video/vlc.$(LIBMPEG_OBJECT_EXT): $(LIBMPEG_BUILD_DIR_CREATED) $(LIBMPEG_SOURCE_DIR)/video/vlc.c\n\t$(LIBMPEG_CC) -o $(LIBMPEG_BUILD_DIR)/video/vlc.$(LIBMPEG_OBJECT_EXT) -c $(LIBMPEG_SOURCE_DIR)/video/vlc.c  $(LIBMPEG_CFLAGS) \n\n$(LIBMPEG_BUILD_DIR)/libmpeg3.$(LIBMPEG_LIBRARY_EXT):  $(LIBMPEG_BUILD_DIR)/bitstream.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/libmpeg3.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/mpeg3atrack.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/mpeg3demux.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/mpeg3io.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/mpeg3title.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/mpeg3vtrack.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/changesForSqueak.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/audio/dct.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/audio/header.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/audio/layer2.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/audio/layer3.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/audio/mpeg3audio.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/audio/pcm.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/audio/synthesizers.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/audio/tables.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/video/getpicture.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/video/headers.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/video/idct.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/video/macroblocks.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/video/mmxtest.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/video/motion.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/video/mpeg3video.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/video/output.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/video/reconstruct.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/video/seek.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/video/slice.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/video/vlc.$(LIBMPEG_OBJECT_EXT)\n\t$(LIBMPEG_LINKLIB) $(LIBMPEG_BUILD_DIR)/libmpeg3.$(LIBMPEG_LIBRARY_EXT)  $(LIBMPEG_BUILD_DIR)/bitstream.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/libmpeg3.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/mpeg3atrack.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/mpeg3demux.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/mpeg3io.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/mpeg3title.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/mpeg3vtrack.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/changesForSqueak.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/audio/dct.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/audio/header.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/audio/layer2.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/audio/layer3.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/audio/mpeg3audio.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/audio/pcm.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/audio/synthesizers.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/audio/tables.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/video/getpicture.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/video/headers.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/video/idct.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/video/macroblocks.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/video/mmxtest.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/video/motion.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/video/mpeg3video.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/video/output.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/video/reconstruct.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/video/seek.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/video/slice.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/video/vlc.$(LIBMPEG_OBJECT_EXT)\n\nclean: clean_libmpeg\n\nclean_libmpeg:\n\trm -f $(LIBMPEG_BUILD_DIR)/*.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/*/*.$(LIBMPEG_OBJECT_EXT) $(LIBMPEG_BUILD_DIR)/libmpeg3.$(LIBMPEG_LIBRARY_EXT) $(LIBMPEG_BUILD_DIR_CREATED)\n\n#### end of rules generated by ./mkMakefile\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/audio/ac3.h",
    "content": "#ifndef AC3_H\n#define AC3_H\n\n#define MAX_AC3_FRAMESIZE 1920 * 2 + 512\n\n//extern int mpeg3_ac3_samplerates[3];\n\n/* Exponent strategy constants */\n#define MPEG3_EXP_REUSE (0)\n#define MPEG3_EXP_D15   (1)\n#define MPEG3_EXP_D25   (2)\n#define MPEG3_EXP_D45   (3)\n\n/* Delta bit allocation constants */\n#define DELTA_BIT_REUSE (0)\n#define DELTA_BIT_NEW (1)\n#define DELTA_BIT_NONE (2)\n#define DELTA_BIT_RESERVED (3)\n\n\ntypedef float mpeg3ac3_stream_samples_t[6][256];\n\ntypedef struct\n{\n/* Bit stream identification == 0x8 */\n\tint bsid;\t\n/* Bit stream mode */\n\tint bsmod;\n/* Audio coding mode */\n\tint acmod;\n/* If we're using the centre channel then */\n/* centre mix level */\n\t\tint cmixlev;\n/* If we're using the surround channel then */\n/* surround mix level */\n\t\tint surmixlev;\n/* If we're in 2/0 mode then */\n/* Dolby surround mix level - NOT USED - */\n\t\tint dsurmod;\n/* Low frequency effects on */\n\tint lfeon;\n/* Dialogue Normalization level */\n\tint dialnorm;\n/* Compression exists */\n\tint compre;\n/* Compression level */\n\t\tint compr;\n/* Language code exists */\n\tint langcode;\n/* Language code */\n\t\tint langcod;\n/* Audio production info exists*/\n\tunsigned int audprodie;\n\t\tint mixlevel;\n\t\tint roomtyp;\n/* If we're in dual mono mode (acmod == 0) then extra stuff */\n\t\tint dialnorm2;\n\t\tint compr2e;\n\t\t\tint compr2;\n\t\tint langcod2e;\n\t\t\tint langcod2;\n\t\tint audprodi2e;\n\t\t\tint mixlevel2;\n\t\t\tint roomtyp2;\n/* Copyright bit */\n\tint copyrightb;\n/* Original bit */\n\tint origbs;\n/* Timecode 1 exists */\n\tint timecod1e;\n/* Timecode 1 */\n\t\tunsigned int timecod1;\n/* Timecode 2 exists */\n\tint timecod2e;\n/* Timecode 2 */\n\t\tunsigned int timecod2;\n/* Additional bit stream info exists */\n\tint addbsie;\n/* Additional bit stream length - 1 (in bytes) */\n\t\tint addbsil;\n/* Additional bit stream information (max 64 bytes) */\n\t\tunsigned char addbsi[64];\n\n/* Information not in the AC-3 bitstream, but derived */\n/* Number of channels (excluding LFE)\n * Derived from acmod */\n\tint nfchans;\n} mpeg3_ac3bsi_t;\n\ntypedef struct \n{\n/* block switch bit indexed by channel num */\n\tunsigned short blksw[5];\n/* dither enable bit indexed by channel num */\n\tunsigned short dithflag[5];\n/* dynamic range gain exists */\n\tint dynrnge;\n/* dynamic range gain */\n\t\tint dynrng;\n/* if acmod==0 then */\n/* dynamic range 2 gain exists */\n\tint dynrng2e;\n/* dynamic range 2 gain */\n\t\tint dynrng2;\n/* coupling strategy exists */\n\tint cplstre;\n/* coupling in use */\n\t\tint cplinu;\n/* channel coupled */\n\t\t\tunsigned short chincpl[5];\n/* if acmod==2 then */\n/* Phase flags in use */\n\t\t\t\tint phsflginu;\n/* coupling begin frequency code */\n\t\t\tint cplbegf;\n/* coupling end frequency code */\n\t\t\tint cplendf;\n/* coupling band structure bits */\n\t\t\tunsigned short cplbndstrc[18];\n/* Do coupling co-ords exist for this channel? */\n\t\t\tunsigned short cplcoe[5];\n/* Master coupling co-ordinate */\n\t\t\tunsigned short mstrcplco[5];\n/* Per coupling band coupling co-ordinates */\n\t\t\tunsigned short cplcoexp[5][18];\n\t\t\tunsigned short cplcomant[5][18];\n/* Phase flags for dual mono */\n\t\t\tunsigned short phsflg[18];\n/* Is there a rematrixing strategy */\n\tunsigned int rematstr;\n/* Rematrixing bits */\n\t\tunsigned short rematflg[4];\n/* Coupling exponent strategy */\n\tint cplexpstr;\n/* Exponent strategy for full bandwidth channels */\n\tunsigned short chexpstr[5];\n/* Exponent strategy for lfe channel */\n\tint lfeexpstr;\n/* Channel bandwidth for independent channels */\n\tunsigned short chbwcod[5];\n/* The absolute coupling exponent */\n\t\tint cplabsexp;\n/* Coupling channel exponents (D15 mode gives 18 * 12 /3  encoded exponents */\n\t\tunsigned short cplexps[18 * 12 / 3];\n/* fbw channel exponents */\n\tunsigned short exps[5][252 / 3];\n/* channel gain range */\n\tunsigned short gainrng[5];\n/* low frequency exponents */\n\tunsigned short lfeexps[3];\n\n/* Bit allocation info */\n\tint baie;\n/* Slow decay code */\n\t\tint sdcycod;\n/* Fast decay code */\n\t\tint fdcycod;\n/* Slow gain code */\n\t\tint sgaincod;\n/* dB per bit code */\n\t\tint dbpbcod;\n/* masking floor code */\n\t\tint floorcod;\n\n/* SNR offset info */\n\tint snroffste;\n/* coarse SNR offset */\n\t\tint csnroffst;\n/* coupling fine SNR offset */\n\t\tint cplfsnroffst;\n/* coupling fast gain code */\n\t\tint cplfgaincod;\n/* fbw fine SNR offset */\n\t\tunsigned short fsnroffst[5];\n/* fbw fast gain code */\n\t\tunsigned short fgaincod[5];\n/* lfe fine SNR offset */\n\t\tint lfefsnroffst;\n/* lfe fast gain code */\n\t\tint lfefgaincod;\n\t\n/* Coupling leak info */\n\tint cplleake;\n/* coupling fast leak initialization */\n\t\tint cplfleak;\n/* coupling slow leak initialization */\n\t\tint cplsleak;\n\t\n/* delta bit allocation info */\n\tint deltbaie;\n/* coupling delta bit allocation exists */\n\t\tint cpldeltbae;\n/* fbw delta bit allocation exists */\n\t\tunsigned short deltbae[5];\n/* number of cpl delta bit segments */\n\t\tint cpldeltnseg;\n/* coupling delta bit allocation offset */\n\t\t\tunsigned short cpldeltoffst[8];\n/* coupling delta bit allocation length */\n\t\t\tunsigned short cpldeltlen[8];\n/* coupling delta bit allocation length */\n\t\t\tunsigned short cpldeltba[8];\n/* number of delta bit segments */\n\t\tunsigned short deltnseg[5];\n/* fbw delta bit allocation offset */\n\t\t\tunsigned short deltoffst[5][8];\n/* fbw delta bit allocation length */\n\t\t\tunsigned short deltlen[5][8];\n/* fbw delta bit allocation length */\n\t\t\tunsigned short deltba[5][8];\n\n/* skip length exists */\n\tint skiple;\n/* skip length */\n\tint skipl;\n\n/* channel mantissas */\n\tshort chmant[5][256];\n\n/* coupling mantissas */\n\tunsigned short cplmant[256];\n\n/* coupling mantissas */\n\tunsigned short lfemant[7];\n\n/*  -- Information not in the bitstream, but derived thereof  -- */\n\n/* Number of coupling sub-bands */\n\tint ncplsubnd;\n\n/* Number of combined coupling sub-bands\n * Derived from ncplsubnd and cplbndstrc */\n\tint ncplbnd;\n\n/* Number of exponent groups by channel\n * Derived from strmant, endmant */\n\tint nchgrps[5];\n\n/* Number of coupling exponent groups\n * Derived from cplbegf, cplendf, cplexpstr */\n\tint ncplgrps;\n\t\t\t\n/* End mantissa numbers of fbw channels */\n\tunsigned short endmant[5];\n\n/* Start and end mantissa numbers for the coupling channel */\n\tint cplstrtmant;\n\tint cplendmant;\n\n/* Decoded exponent info */\n\tunsigned short fbw_exp[5][256];\n\tunsigned short cpl_exp[256];\n\tunsigned short lfe_exp[7];\n\n/* Bit allocation pointer results */\n\tunsigned short fbw_bap[5][256];\n/*FIXME figure out exactly how many entries there should be (253-37?)  */\n\tunsigned short cpl_bap[256];\n\tunsigned short lfe_bap[7];\n} mpeg3_ac3audblk_t;\n\n/* Bit allocation data */\ntypedef struct\n{\n\tint sdecay;\n\tint fdecay;\n\tint sgain;\n\tint dbknee;\n\tint floor;\n\tshort psd[256];\n\tshort bndpsd[256];\n\tshort excite[256];\n\tshort mask[256];\n} mpeg3_ac3_bitallocation_t;\n\n/* Mantissa data */\ntypedef struct\n{\n\tunsigned short m_1[3];\n\tunsigned short m_2[3];\n\tunsigned short m_4[2];\n\tunsigned short m_1_pointer;\n\tunsigned short m_2_pointer;\n\tunsigned short m_4_pointer;\n} mpeg3_ac3_mantissa_t;\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/audio/dct.c",
    "content": "/* \n *\n *  This file is part of libmpeg3\n *\t\n * LibMPEG3\n * Author: Adam Williams <broadcast@earthling.net>\n * Page: heroine.linuxbox.com\n * Page: http://www.smalltalkconsulting.com/html/mpeg3source.html (for Squeak)\n *\n    LibMPEG3 was originally licenced under GPL. It was relicensed by\n    the author under the LGPL and the Squeak license on Nov 1st, 2000\n    \n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA \n    \n    Also licensed under the Squeak license.\n    http://www.squeak.org/license.html\n */\n\n/*\n * Discrete Cosine Tansform (DCT) for subband synthesis\n * optimized for machines with no auto-increment. \n * The performance is highly compiler dependend. Maybe\n * the dct64.c version for 'normal' processor may be faster\n * even for Intel processors.\n */\n\n#include \"mpeg3audio.h\"\n#include \"tables.h\"\n\n#include <math.h>\n\nint mpeg3audio_dct64_1(float *out0, float *out1, float *b1, float *b2, float *samples)\n{\n\tregister float *costab = mpeg3_pnts[0];\n\n\tb1[0x00] = samples[0x00] + samples[0x1F];\n\tb1[0x01] = samples[0x01] + samples[0x1E];\n\tb1[0x1F] = (samples[0x00] - samples[0x1F]) * costab[0x0];\n\tb1[0x1E] = (samples[0x01] - samples[0x1E]) * costab[0x1];\n\n\tb1[0x02] = samples[0x02] + samples[0x1D];\n\tb1[0x03] = samples[0x03] + samples[0x1C];\n\tb1[0x1D] = (samples[0x02] - samples[0x1D]) * costab[0x2];\n\tb1[0x1C] = (samples[0x03] - samples[0x1C]) * costab[0x3];\n\n\tb1[0x04] = samples[0x04] + samples[0x1B];\n\tb1[0x05] = samples[0x05] + samples[0x1A];\n\tb1[0x1B] = (samples[0x04] - samples[0x1B]) * costab[0x4];\n\tb1[0x1A] = (samples[0x05] - samples[0x1A]) * costab[0x5];\n\n\tb1[0x06] = samples[0x06] + samples[0x19];\n\tb1[0x07] = samples[0x07] + samples[0x18];\n\tb1[0x19] = (samples[0x06] - samples[0x19]) * costab[0x6];\n\tb1[0x18] = (samples[0x07] - samples[0x18]) * costab[0x7];\n\n\tb1[0x08] = samples[0x08] + samples[0x17];\n\tb1[0x09] = samples[0x09] + samples[0x16];\n\tb1[0x17] = (samples[0x08] - samples[0x17]) * costab[0x8];\n\tb1[0x16] = (samples[0x09] - samples[0x16]) * costab[0x9];\n\n\tb1[0x0A] = samples[0x0A] + samples[0x15];\n\tb1[0x0B] = samples[0x0B] + samples[0x14];\n\tb1[0x15] = (samples[0x0A] - samples[0x15]) * costab[0xA];\n\tb1[0x14] = (samples[0x0B] - samples[0x14]) * costab[0xB];\n\n\tb1[0x0C] = samples[0x0C] + samples[0x13];\n\tb1[0x0D] = samples[0x0D] + samples[0x12];\n\tb1[0x13] = (samples[0x0C] - samples[0x13]) * costab[0xC];\n\tb1[0x12] = (samples[0x0D] - samples[0x12]) * costab[0xD];\n\n\tb1[0x0E] = samples[0x0E] + samples[0x11];\n\tb1[0x0F] = samples[0x0F] + samples[0x10];\n\tb1[0x11] = (samples[0x0E] - samples[0x11]) * costab[0xE];\n\tb1[0x10] = (samples[0x0F] - samples[0x10]) * costab[0xF];\n\n\tcostab = mpeg3_pnts[1];\n\n\tb2[0x00] = b1[0x00] + b1[0x0F]; \n\tb2[0x01] = b1[0x01] + b1[0x0E]; \n\tb2[0x0F] = (b1[0x00] - b1[0x0F]) * costab[0];\n\tb2[0x0E] = (b1[0x01] - b1[0x0E]) * costab[1];\n\n\tb2[0x02] = b1[0x02] + b1[0x0D]; \n\tb2[0x03] = b1[0x03] + b1[0x0C]; \n\tb2[0x0D] = (b1[0x02] - b1[0x0D]) * costab[2];\n\tb2[0x0C] = (b1[0x03] - b1[0x0C]) * costab[3];\n\n\tb2[0x04] = b1[0x04] + b1[0x0B]; \n\tb2[0x05] = b1[0x05] + b1[0x0A]; \n\tb2[0x0B] = (b1[0x04] - b1[0x0B]) * costab[4];\n\tb2[0x0A] = (b1[0x05] - b1[0x0A]) * costab[5];\n\n\tb2[0x06] = b1[0x06] + b1[0x09]; \n\tb2[0x07] = b1[0x07] + b1[0x08]; \n\tb2[0x09] = (b1[0x06] - b1[0x09]) * costab[6];\n\tb2[0x08] = (b1[0x07] - b1[0x08]) * costab[7];\n\n\t/* */\n\n\tb2[0x10] = b1[0x10] + b1[0x1F];\n\tb2[0x11] = b1[0x11] + b1[0x1E];\n\tb2[0x1F] = (b1[0x1F] - b1[0x10]) * costab[0];\n\tb2[0x1E] = (b1[0x1E] - b1[0x11]) * costab[1];\n\n\tb2[0x12] = b1[0x12] + b1[0x1D];\n\tb2[0x13] = b1[0x13] + b1[0x1C];\n\tb2[0x1D] = (b1[0x1D] - b1[0x12]) * costab[2];\n\tb2[0x1C] = (b1[0x1C] - b1[0x13]) * costab[3];\n\n\tb2[0x14] = b1[0x14] + b1[0x1B];\n\tb2[0x15] = b1[0x15] + b1[0x1A];\n\tb2[0x1B] = (b1[0x1B] - b1[0x14]) * costab[4];\n\tb2[0x1A] = (b1[0x1A] - b1[0x15]) * costab[5];\n\n\tb2[0x16] = b1[0x16] + b1[0x19];\n\tb2[0x17] = b1[0x17] + b1[0x18];\n\tb2[0x19] = (b1[0x19] - b1[0x16]) * costab[6];\n\tb2[0x18] = (b1[0x18] - b1[0x17]) * costab[7];\n\n \tcostab = mpeg3_pnts[2];\n\n\tb1[0x00] = b2[0x00] + b2[0x07];\n\tb1[0x07] = (b2[0x00] - b2[0x07]) * costab[0];\n\tb1[0x01] = b2[0x01] + b2[0x06];\n\tb1[0x06] = (b2[0x01] - b2[0x06]) * costab[1];\n\tb1[0x02] = b2[0x02] + b2[0x05];\n\tb1[0x05] = (b2[0x02] - b2[0x05]) * costab[2];\n\tb1[0x03] = b2[0x03] + b2[0x04];\n\tb1[0x04] = (b2[0x03] - b2[0x04]) * costab[3];\n\n\tb1[0x08] = b2[0x08] + b2[0x0F];\n\tb1[0x0F] = (b2[0x0F] - b2[0x08]) * costab[0];\n\tb1[0x09] = b2[0x09] + b2[0x0E];\n\tb1[0x0E] = (b2[0x0E] - b2[0x09]) * costab[1];\n\tb1[0x0A] = b2[0x0A] + b2[0x0D];\n\tb1[0x0D] = (b2[0x0D] - b2[0x0A]) * costab[2];\n\tb1[0x0B] = b2[0x0B] + b2[0x0C];\n\tb1[0x0C] = (b2[0x0C] - b2[0x0B]) * costab[3];\n\n\tb1[0x10] = b2[0x10] + b2[0x17];\n\tb1[0x17] = (b2[0x10] - b2[0x17]) * costab[0];\n\tb1[0x11] = b2[0x11] + b2[0x16];\n\tb1[0x16] = (b2[0x11] - b2[0x16]) * costab[1];\n\tb1[0x12] = b2[0x12] + b2[0x15];\n\tb1[0x15] = (b2[0x12] - b2[0x15]) * costab[2];\n\tb1[0x13] = b2[0x13] + b2[0x14];\n\tb1[0x14] = (b2[0x13] - b2[0x14]) * costab[3];\n\n\tb1[0x18] = b2[0x18] + b2[0x1F];\n\tb1[0x1F] = (b2[0x1F] - b2[0x18]) * costab[0];\n\tb1[0x19] = b2[0x19] + b2[0x1E];\n\tb1[0x1E] = (b2[0x1E] - b2[0x19]) * costab[1];\n\tb1[0x1A] = b2[0x1A] + b2[0x1D];\n\tb1[0x1D] = (b2[0x1D] - b2[0x1A]) * costab[2];\n\tb1[0x1B] = b2[0x1B] + b2[0x1C];\n\tb1[0x1C] = (b2[0x1C] - b2[0x1B]) * costab[3];\n\n\t{\n\t\tregister float const cos0 = mpeg3_pnts[3][0];\n  \t\tregister float const cos1 = mpeg3_pnts[3][1];\n\n\t\tb2[0x00] = b1[0x00] + b1[0x03];\n\t\tb2[0x03] = (b1[0x00] - b1[0x03]) * cos0;\n\t\tb2[0x01] = b1[0x01] + b1[0x02];\n\t\tb2[0x02] = (b1[0x01] - b1[0x02]) * cos1;\n\n\t\tb2[0x04] = b1[0x04] + b1[0x07];\n\t\tb2[0x07] = (b1[0x07] - b1[0x04]) * cos0;\n\t\tb2[0x05] = b1[0x05] + b1[0x06];\n\t\tb2[0x06] = (b1[0x06] - b1[0x05]) * cos1;\n\n\t\tb2[0x08] = b1[0x08] + b1[0x0B];\n\t\tb2[0x0B] = (b1[0x08] - b1[0x0B]) * cos0;\n\t\tb2[0x09] = b1[0x09] + b1[0x0A];\n\t\tb2[0x0A] = (b1[0x09] - b1[0x0A]) * cos1;\n\n\t\tb2[0x0C] = b1[0x0C] + b1[0x0F];\n\t\tb2[0x0F] = (b1[0x0F] - b1[0x0C]) * cos0;\n\t\tb2[0x0D] = b1[0x0D] + b1[0x0E];\n\t\tb2[0x0E] = (b1[0x0E] - b1[0x0D]) * cos1;\n\n\t\tb2[0x10] = b1[0x10] + b1[0x13];\n\t\tb2[0x13] = (b1[0x10] - b1[0x13]) * cos0;\n\t\tb2[0x11] = b1[0x11] + b1[0x12];\n\t\tb2[0x12] = (b1[0x11] - b1[0x12]) * cos1;\n\n\t\tb2[0x14] = b1[0x14] + b1[0x17];\n\t\tb2[0x17] = (b1[0x17] - b1[0x14]) * cos0;\n\t\tb2[0x15] = b1[0x15] + b1[0x16];\n\t\tb2[0x16] = (b1[0x16] - b1[0x15]) * cos1;\n\n\t\tb2[0x18] = b1[0x18] + b1[0x1B];\n\t\tb2[0x1B] = (b1[0x18] - b1[0x1B]) * cos0;\n\t\tb2[0x19] = b1[0x19] + b1[0x1A];\n\t\tb2[0x1A] = (b1[0x19] - b1[0x1A]) * cos1;\n\n\t\tb2[0x1C] = b1[0x1C] + b1[0x1F];\n\t\tb2[0x1F] = (b1[0x1F] - b1[0x1C]) * cos0;\n\t\tb2[0x1D] = b1[0x1D] + b1[0x1E];\n\t\tb2[0x1E] = (b1[0x1E] - b1[0x1D]) * cos1;\n \t}\n\n \t{\n\t\tregister float const cos0 = mpeg3_pnts[4][0];\n\n\t\tb1[0x00] = b2[0x00] + b2[0x01];\n\t\tb1[0x01] = (b2[0x00] - b2[0x01]) * cos0;\n\t\tb1[0x02] = b2[0x02] + b2[0x03];\n\t\tb1[0x03] = (b2[0x03] - b2[0x02]) * cos0;\n\t\tb1[0x02] += b1[0x03];\n\n\t\tb1[0x04] = b2[0x04] + b2[0x05];\n\t\tb1[0x05] = (b2[0x04] - b2[0x05]) * cos0;\n\t\tb1[0x06] = b2[0x06] + b2[0x07];\n\t\tb1[0x07] = (b2[0x07] - b2[0x06]) * cos0;\n\t\tb1[0x06] += b1[0x07];\n\t\tb1[0x04] += b1[0x06];\n\t\tb1[0x06] += b1[0x05];\n\t\tb1[0x05] += b1[0x07];\n\n\t\tb1[0x08] = b2[0x08] + b2[0x09];\n\t\tb1[0x09] = (b2[0x08] - b2[0x09]) * cos0;\n\t\tb1[0x0A] = b2[0x0A] + b2[0x0B];\n\t\tb1[0x0B] = (b2[0x0B] - b2[0x0A]) * cos0;\n\t\tb1[0x0A] += b1[0x0B];\n\n\t\tb1[0x0C] = b2[0x0C] + b2[0x0D];\n\t\tb1[0x0D] = (b2[0x0C] - b2[0x0D]) * cos0;\n\t\tb1[0x0E] = b2[0x0E] + b2[0x0F];\n\t\tb1[0x0F] = (b2[0x0F] - b2[0x0E]) * cos0;\n\t\tb1[0x0E] += b1[0x0F];\n\t\tb1[0x0C] += b1[0x0E];\n\t\tb1[0x0E] += b1[0x0D];\n\t\tb1[0x0D] += b1[0x0F];\n\n\t\tb1[0x10] = b2[0x10] + b2[0x11];\n\t\tb1[0x11] = (b2[0x10] - b2[0x11]) * cos0;\n\t\tb1[0x12] = b2[0x12] + b2[0x13];\n\t\tb1[0x13] = (b2[0x13] - b2[0x12]) * cos0;\n\t\tb1[0x12] += b1[0x13];\n\n\t\tb1[0x14] = b2[0x14] + b2[0x15];\n\t\tb1[0x15] = (b2[0x14] - b2[0x15]) * cos0;\n\t\tb1[0x16] = b2[0x16] + b2[0x17];\n\t\tb1[0x17] = (b2[0x17] - b2[0x16]) * cos0;\n\t\tb1[0x16] += b1[0x17];\n\t\tb1[0x14] += b1[0x16];\n\t\tb1[0x16] += b1[0x15];\n\t\tb1[0x15] += b1[0x17];\n\n\t\tb1[0x18] = b2[0x18] + b2[0x19];\n\t\tb1[0x19] = (b2[0x18] - b2[0x19]) * cos0;\n\t\tb1[0x1A] = b2[0x1A] + b2[0x1B];\n\t\tb1[0x1B] = (b2[0x1B] - b2[0x1A]) * cos0;\n\t\tb1[0x1A] += b1[0x1B];\n\n\t\tb1[0x1C] = b2[0x1C] + b2[0x1D];\n\t\tb1[0x1D] = (b2[0x1C] - b2[0x1D]) * cos0;\n\t\tb1[0x1E] = b2[0x1E] + b2[0x1F];\n\t\tb1[0x1F] = (b2[0x1F] - b2[0x1E]) * cos0;\n\t\tb1[0x1E] += b1[0x1F];\n\t\tb1[0x1C] += b1[0x1E];\n\t\tb1[0x1E] += b1[0x1D];\n\t\tb1[0x1D] += b1[0x1F];\n \t}\n\n\tout0[0x10*16] = b1[0x00];\n\tout0[0x10*12] = b1[0x04];\n\tout0[0x10* 8] = b1[0x02];\n\tout0[0x10* 4] = b1[0x06];\n\tout0[0x10* 0] = b1[0x01];\n\tout1[0x10* 0] = b1[0x01];\n\tout1[0x10* 4] = b1[0x05];\n\tout1[0x10* 8] = b1[0x03];\n\tout1[0x10*12] = b1[0x07];\n\n\tout0[0x10*14] = b1[0x08] + b1[0x0C];\n\tout0[0x10*10] = b1[0x0C] + b1[0x0a];\n\tout0[0x10* 6] = b1[0x0A] + b1[0x0E];\n\tout0[0x10* 2] = b1[0x0E] + b1[0x09];\n\tout1[0x10* 2] = b1[0x09] + b1[0x0D];\n\tout1[0x10* 6] = b1[0x0D] + b1[0x0B];\n\tout1[0x10*10] = b1[0x0B] + b1[0x0F];\n\tout1[0x10*14] = b1[0x0F];\n\n\t{ \n\t\tregister float tmp;\n\t\ttmp = b1[0x18] + b1[0x1C];\n\t\tout0[0x10*15] = tmp + b1[0x10];\n\t\tout0[0x10*13] = tmp + b1[0x14];\n\t\ttmp = b1[0x1C] + b1[0x1A];\n\t\tout0[0x10*11] = tmp + b1[0x14];\n\t\tout0[0x10* 9] = tmp + b1[0x12];\n\t\ttmp = b1[0x1A] + b1[0x1E];\n\t\tout0[0x10* 7] = tmp + b1[0x12];\n\t\tout0[0x10* 5] = tmp + b1[0x16];\n\t\ttmp = b1[0x1E] + b1[0x19];\n\t\tout0[0x10* 3] = tmp + b1[0x16];\n\t\tout0[0x10* 1] = tmp + b1[0x11];\n\t\ttmp = b1[0x19] + b1[0x1D];\n\t\tout1[0x10* 1] = tmp + b1[0x11];\n\t\tout1[0x10* 3] = tmp + b1[0x15]; \n\t\ttmp = b1[0x1D] + b1[0x1B];\n\t\tout1[0x10* 5] = tmp + b1[0x15];\n\t\tout1[0x10* 7] = tmp + b1[0x13];\n\t\ttmp = b1[0x1B] + b1[0x1F];\n\t\tout1[0x10* 9] = tmp + b1[0x13];\n\t\tout1[0x10*11] = tmp + b1[0x17];\n\t\tout1[0x10*13] = b1[0x17] + b1[0x1F];\n\t\tout1[0x10*15] = b1[0x1F];\n\t}\n\treturn 0;\n}\n\n/*\n * the call via dct64 is a trick to force GCC to use\n * (new) registers for the b1,b2 pointer to the bufs[xx] field\n */\nint mpeg3audio_dct64(float *a, float *b, float *c)\n{\n\tfloat bufs[0x40];\n\treturn mpeg3audio_dct64_1(a, b, bufs, bufs + 0x20, c);\n}\n\n/*//////////////////////////////////////////////////////////////// */\n/* */\n/* 9 Point Inverse Discrete Cosine Transform */\n/* */\n/* This piece of code is Copyright 1997 Mikko Tommila and is freely usable */\n/* by anybody. The algorithm itself is of course in the public domain. */\n/* */\n/* Again derived heuristically from the 9-point WFTA. */\n/* */\n/* The algorithm is optimized (?) for speed, not for small rounding errors or */\n/* good readability. */\n/* */\n/* 36 additions, 11 multiplications */\n/* */\n/* Again this is very likely sub-optimal. */\n/* */\n/* The code is optimized to use a minimum number of temporary variables, */\n/* so it should compile quite well even on 8-register Intel x86 processors. */\n/* This makes the code quite obfuscated and very difficult to understand. */\n/* */\n/* References: */\n/* [1] S. Winograd: \"On Computing the Discrete Fourier Transform\", */\n/*     Mathematics of Computation, Volume 32, Number 141, January 1978, */\n/*     Pages 175-199 */\n\n\n/*------------------------------------------------------------------*/\n/*                                                                  */\n/*    Function: Calculation of the inverse MDCT                     */\n/*                                                                  */\n/*------------------------------------------------------------------*/\n\nint mpeg3audio_dct36(float *inbuf, float *o1, float *o2, float *wintab, float *tsbuf)\n{\n    float tmp[18];\n\n\t{\n    \tregister float *in = inbuf;\n\n    \tin[17]+=in[16]; in[16]+=in[15]; in[15]+=in[14];\n    \tin[14]+=in[13]; in[13]+=in[12]; in[12]+=in[11];\n    \tin[11]+=in[10]; in[10]+=in[9];  in[9] +=in[8];\n    \tin[8] +=in[7];  in[7] +=in[6];  in[6] +=in[5];\n    \tin[5] +=in[4];  in[4] +=in[3];  in[3] +=in[2];\n    \tin[2] +=in[1];  in[1] +=in[0];\n\n    \tin[17]+=in[15]; in[15]+=in[13]; in[13]+=in[11]; in[11]+=in[9];\n    \tin[9] +=in[7];  in[7] +=in[5];  in[5] +=in[3];  in[3] +=in[1];\n\n\n    \t{\n    \t\tfloat t3;\n    \t\t{ \n    \t\t\tfloat t0, t1, t2;\n\n    \t\t\tt0 = mpeg3_COS6_2 * (in[8] + in[16] - in[4]);\n    \t\t\tt1 = mpeg3_COS6_2 * in[12];\n\n    \t\t\tt3 = in[0];\n    \t\t\tt2 = t3 - t1 - t1;\n    \t\t\ttmp[1] = tmp[7] = t2 - t0;\n    \t\t\ttmp[4]          = t2 + t0 + t0;\n    \t\t\tt3 += t1;\n\n    \t\t\tt2 = mpeg3_COS6_1 * (in[10] + in[14] - in[2]);\n    \t\t\ttmp[1] -= t2;\n    \t\t\ttmp[7] += t2;\n    \t\t}\n    \t\t{\n    \t\t\tfloat t0, t1, t2;\n\n    \t\t\tt0 = mpeg3_cos9[0] * (in[4] + in[8] );\n    \t\t\tt1 = mpeg3_cos9[1] * (in[8] - in[16]);\n    \t\t\tt2 = mpeg3_cos9[2] * (in[4] + in[16]);\n\n    \t\t\ttmp[2] = tmp[6] = t3 - t0      - t2;\n    \t\t\ttmp[0] = tmp[8] = t3 + t0 + t1;\n    \t\t\ttmp[3] = tmp[5] = t3      - t1 + t2;\n    \t\t}\n    \t}\n    \t{\n    \t\tfloat t1, t2, t3;\n\n    \t\tt1 = mpeg3_cos18[0] * (in[2]  + in[10]);\n    \t\tt2 = mpeg3_cos18[1] * (in[10] - in[14]);\n    \t\tt3 = mpeg3_COS6_1   * in[6];\n\n    \t\t{\n        \t\tfloat t0 = t1 + t2 + t3;\n        \t\ttmp[0] += t0;\n        \t\ttmp[8] -= t0;\n    \t\t}\n\n    \t\tt2 -= t3;\n    \t\tt1 -= t3;\n\n    \t\tt3 = mpeg3_cos18[2] * (in[2] + in[14]);\n\n    \t\tt1 += t3;\n    \t\ttmp[3] += t1;\n    \t\ttmp[5] -= t1;\n\n    \t\tt2 -= t3;\n    \t\ttmp[2] += t2;\n    \t\ttmp[6] -= t2;\n    \t}\n\n\n    \t{\n    \t\tfloat t0, t1, t2, t3, t4, t5, t6, t7;\n\n    \t\tt1 = mpeg3_COS6_2 * in[13];\n    \t\tt2 = mpeg3_COS6_2 * (in[9] + in[17] - in[5]);\n\n    \t\tt3 = in[1] + t1;\n    \t\tt4 = in[1] - t1 - t1;\n    \t\tt5 = t4 - t2;\n\n    \t\tt0 = mpeg3_cos9[0] * (in[5] + in[9]);\n    \t\tt1 = mpeg3_cos9[1] * (in[9] - in[17]);\n\n    \t\ttmp[13] = (t4 + t2 + t2) * mpeg3_tfcos36[17-13];\n    \t\tt2 = mpeg3_cos9[2] * (in[5] + in[17]);\n\n    \t\tt6 = t3 - t0 - t2;\n    \t\tt0 += t3 + t1;\n    \t\tt3 += t2 - t1;\n\n    \t\tt2 = mpeg3_cos18[0] * (in[3]  + in[11]);\n    \t\tt4 = mpeg3_cos18[1] * (in[11] - in[15]);\n    \t\tt7 = mpeg3_COS6_1 * in[7];\n\n    \t\tt1 = t2 + t4 + t7;\n    \t\ttmp[17] = (t0 + t1) * mpeg3_tfcos36[17-17];\n    \t\ttmp[9]  = (t0 - t1) * mpeg3_tfcos36[17-9];\n    \t\tt1 = mpeg3_cos18[2] * (in[3] + in[15]);\n    \t\tt2 += t1 - t7;\n\n    \t\ttmp[14] = (t3 + t2) * mpeg3_tfcos36[17-14];\n    \t\tt0 = mpeg3_COS6_1 * (in[11] + in[15] - in[3]);\n    \t\ttmp[12] = (t3 - t2) * mpeg3_tfcos36[17-12];\n\n    \t\tt4 -= t1 + t7;\n\n    \t\ttmp[16] = (t5 - t0) * mpeg3_tfcos36[17-16];\n    \t\ttmp[10] = (t5 + t0) * mpeg3_tfcos36[17-10];\n    \t\ttmp[15] = (t6 + t4) * mpeg3_tfcos36[17-15];\n    \t\ttmp[11] = (t6 - t4) * mpeg3_tfcos36[17-11];\n\t    }\n\n#define MACRO(v) \\\n\t{ \\\n    \tfloat tmpval; \\\n    \ttmpval = tmp[(v)] + tmp[17-(v)]; \\\n    \tout2[9+(v)] = tmpval * w[27+(v)]; \\\n    \tout2[8-(v)] = tmpval * w[26-(v)]; \\\n    \ttmpval = tmp[(v)] - tmp[17-(v)]; \\\n    \tts[SBLIMIT*(8-(v))] = out1[8-(v)] + tmpval * w[8-(v)]; \\\n    \tts[SBLIMIT*(9+(v))] = out1[9+(v)] + tmpval * w[9+(v)]; \\\n\t}\n\n\t\t{\n\t\t\tregister float *out2 = o2;\n\t\t\tregister float *w = wintab;\n\t\t\tregister float *out1 = o1;\n\t\t\tregister float *ts = tsbuf;\n\n\t\t\tMACRO(0);\n\t\t\tMACRO(1);\n\t\t\tMACRO(2);\n\t\t\tMACRO(3);\n\t\t\tMACRO(4);\n\t\t\tMACRO(5);\n\t\t\tMACRO(6);\n\t\t\tMACRO(7);\n\t\t\tMACRO(8);\n\t\t}\n\t}\n\treturn 0;\n}\n\n/*\n * new DCT12\n */\nint mpeg3audio_dct12(float *in,float *rawout1,float *rawout2,register float *wi,register float *ts)\n{\n#define DCT12_PART1 \\\n            in5 = in[5*3]; \\\n    in5 += (in4 = in[4*3]); \\\n    in4 += (in3 = in[3*3]); \\\n    in3 += (in2 = in[2*3]); \\\n    in2 += (in1 = in[1*3]); \\\n    in1 += (in0 = in[0*3]); \\\n                            \\\n    in5 += in3; in3 += in1; \\\n                            \\\n    in2 *= mpeg3_COS6_1; \\\n    in3 *= mpeg3_COS6_1; \\\n\n#define DCT12_PART2 \\\n\tin0 += in4 * mpeg3_COS6_2; \\\n                    \t \\\n\tin4 = in0 + in2;     \\\n\tin0 -= in2;          \\\n                    \t \\\n\tin1 += in5 * mpeg3_COS6_2; \\\n                    \t \\\n\tin5 = (in1 + in3) * mpeg3_tfcos12[0]; \\\n\tin1 = (in1 - in3) * mpeg3_tfcos12[2]; \\\n                    \t\\\n\tin3 = in4 + in5;    \\\n\tin4 -= in5;         \\\n                    \t\\\n\tin2 = in0 + in1;    \\\n\tin0 -= in1;\n\n\n\t{\n    \tfloat in0,in1,in2,in3,in4,in5;\n    \tregister float *out1 = rawout1;\n    \tts[SBLIMIT*0] = out1[0]; ts[SBLIMIT*1] = out1[1]; ts[SBLIMIT*2] = out1[2];\n    \tts[SBLIMIT*3] = out1[3]; ts[SBLIMIT*4] = out1[4]; ts[SBLIMIT*5] = out1[5];\n\n    \tDCT12_PART1\n\n    \t{\n    \t\tfloat tmp0,tmp1 = (in0 - in4);\n    \t\t{\n        \t\tfloat tmp2 = (in1 - in5) * mpeg3_tfcos12[1];\n        \t\ttmp0 = tmp1 + tmp2;\n        \t\ttmp1 -= tmp2;\n    \t\t}\n    \t\tts[(17-1)*SBLIMIT] = out1[17-1] + tmp0 * wi[11-1];\n    \t\tts[(12+1)*SBLIMIT] = out1[12+1] + tmp0 * wi[6+1];\n    \t\tts[(6 +1)*SBLIMIT] = out1[6 +1] + tmp1 * wi[1];\n    \t\tts[(11-1)*SBLIMIT] = out1[11-1] + tmp1 * wi[5-1];\n    \t}\n\n    \tDCT12_PART2\n\n    \tts[(17-0)*SBLIMIT] = out1[17-0] + in2 * wi[11-0];\n    \tts[(12+0)*SBLIMIT] = out1[12+0] + in2 * wi[6+0];\n    \tts[(12+2)*SBLIMIT] = out1[12+2] + in3 * wi[6+2];\n    \tts[(17-2)*SBLIMIT] = out1[17-2] + in3 * wi[11-2];\n\n    \tts[(6+0)*SBLIMIT]  = out1[6+0] + in0 * wi[0];\n    \tts[(11-0)*SBLIMIT] = out1[11-0] + in0 * wi[5-0];\n    \tts[(6+2)*SBLIMIT]  = out1[6+2] + in4 * wi[2];\n    \tts[(11-2)*SBLIMIT] = out1[11-2] + in4 * wi[5-2];\n    }\n\n\tin++;\n\n\t{\n    \t float in0,in1,in2,in3,in4,in5;\n    \t register float *out2 = rawout2;\n\n    \t DCT12_PART1\n\n    \t {\n    \t\t float tmp0,tmp1 = (in0 - in4);\n    \t\t {\n        \t\t float tmp2 = (in1 - in5) * mpeg3_tfcos12[1];\n        \t\t tmp0 = tmp1 + tmp2;\n        \t\t tmp1 -= tmp2;\n    \t\t }\n    \t\t out2[5-1] = tmp0 * wi[11-1];\n    \t\t out2[0+1] = tmp0 * wi[6+1];\n    \t\t ts[(12+1)*SBLIMIT] += tmp1 * wi[1];\n    \t\t ts[(17-1)*SBLIMIT] += tmp1 * wi[5-1];\n    \t }\n\n    \t DCT12_PART2\n\n    \t out2[5-0] = in2 * wi[11-0];\n    \t out2[0+0] = in2 * wi[6+0];\n    \t out2[0+2] = in3 * wi[6+2];\n    \t out2[5-2] = in3 * wi[11-2];\n\n    \t ts[(12+0)*SBLIMIT] += in0 * wi[0];\n    \t ts[(17-0)*SBLIMIT] += in0 * wi[5-0];\n    \t ts[(12+2)*SBLIMIT] += in4 * wi[2];\n    \t ts[(17-2)*SBLIMIT] += in4 * wi[5-2];\n\t}\n\n    in++; \n\n\t{\n    \tfloat in0,in1,in2,in3,in4,in5;\n    \tregister float *out2 = rawout2;\n    \tout2[12]=out2[13]=out2[14]=out2[15]=out2[16]=out2[17]=0.0;\n\n    \tDCT12_PART1\n\n    \t{\n    \t\tfloat tmp0,tmp1 = (in0 - in4);\n    \t\t{\n        \t\tfloat tmp2 = (in1 - in5) * mpeg3_tfcos12[1];\n        \t\ttmp0 = tmp1 + tmp2;\n        \t\ttmp1 -= tmp2;\n    \t\t}\n    \t\tout2[11-1] = tmp0 * wi[11-1];\n    \t\tout2[6 +1] = tmp0 * wi[6+1];\n    \t\tout2[0+1] += tmp1 * wi[1];\n    \t\tout2[5-1] += tmp1 * wi[5-1];\n    \t}\n\n    \tDCT12_PART2\n\n    \tout2[11-0] = in2 * wi[11-0];\n    \tout2[6 +0] = in2 * wi[6+0];\n    \tout2[6 +2] = in3 * wi[6+2];\n    \tout2[11-2] = in3 * wi[11-2];\n\n    \tout2[0+0] += in0 * wi[0];\n    \tout2[5-0] += in0 * wi[5-0];\n    \tout2[0+2] += in4 * wi[2];\n    \tout2[5-2] += in4 * wi[5-2];\n\t}\n\treturn 0;\n}\n\n/* AC3 IMDCT tables */\n\n/* Twiddle factors for IMDCT */\nstatic float mpeg3_xcos1[AC3_N / 4];\nstatic float mpeg3_xsin1[AC3_N / 4];\nstatic float mpeg3_xcos2[AC3_N / 8];\nstatic float mpeg3_xsin2[AC3_N / 8];\n\n\n/* 128 point bit-reverse LUT */\nstatic unsigned char mpeg3_bit_reverse_512[] = \n{\n\t0x00, 0x40, 0x20, 0x60, 0x10, 0x50, 0x30, 0x70, \n\t0x08, 0x48, 0x28, 0x68, 0x18, 0x58, 0x38, 0x78, \n\t0x04, 0x44, 0x24, 0x64, 0x14, 0x54, 0x34, 0x74, \n\t0x0c, 0x4c, 0x2c, 0x6c, 0x1c, 0x5c, 0x3c, 0x7c, \n\t0x02, 0x42, 0x22, 0x62, 0x12, 0x52, 0x32, 0x72, \n\t0x0a, 0x4a, 0x2a, 0x6a, 0x1a, 0x5a, 0x3a, 0x7a, \n\t0x06, 0x46, 0x26, 0x66, 0x16, 0x56, 0x36, 0x76, \n\t0x0e, 0x4e, 0x2e, 0x6e, 0x1e, 0x5e, 0x3e, 0x7e, \n\t0x01, 0x41, 0x21, 0x61, 0x11, 0x51, 0x31, 0x71, \n\t0x09, 0x49, 0x29, 0x69, 0x19, 0x59, 0x39, 0x79, \n\t0x05, 0x45, 0x25, 0x65, 0x15, 0x55, 0x35, 0x75, \n\t0x0d, 0x4d, 0x2d, 0x6d, 0x1d, 0x5d, 0x3d, 0x7d, \n\t0x03, 0x43, 0x23, 0x63, 0x13, 0x53, 0x33, 0x73, \n\t0x0b, 0x4b, 0x2b, 0x6b, 0x1b, 0x5b, 0x3b, 0x7b, \n\t0x07, 0x47, 0x27, 0x67, 0x17, 0x57, 0x37, 0x77, \n\t0x0f, 0x4f, 0x2f, 0x6f, 0x1f, 0x5f, 0x3f, 0x7f\n};\n\nstatic unsigned char mpeg3_bit_reverse_256[] = \n{\n\t0x00, 0x20, 0x10, 0x30, 0x08, 0x28, 0x18, 0x38, \n\t0x04, 0x24, 0x14, 0x34, 0x0c, 0x2c, 0x1c, 0x3c, \n\t0x02, 0x22, 0x12, 0x32, 0x0a, 0x2a, 0x1a, 0x3a, \n\t0x06, 0x26, 0x16, 0x36, 0x0e, 0x2e, 0x1e, 0x3e, \n\t0x01, 0x21, 0x11, 0x31, 0x09, 0x29, 0x19, 0x39, \n\t0x05, 0x25, 0x15, 0x35, 0x0d, 0x2d, 0x1d, 0x3d, \n\t0x03, 0x23, 0x13, 0x33, 0x0b, 0x2b, 0x1b, 0x3b, \n\t0x07, 0x27, 0x17, 0x37, 0x0f, 0x2f, 0x1f, 0x3f\n};\n\n/* Windowing function for Modified DCT - Thank you acroread */\nstatic float mpeg3_window[] = \n{\n\t0.00014, 0.00024, 0.00037, 0.00051, 0.00067, 0.00086, 0.00107, 0.00130,\n\t0.00157, 0.00187, 0.00220, 0.00256, 0.00297, 0.00341, 0.00390, 0.00443,\n\t0.00501, 0.00564, 0.00632, 0.00706, 0.00785, 0.00871, 0.00962, 0.01061,\n\t0.01166, 0.01279, 0.01399, 0.01526, 0.01662, 0.01806, 0.01959, 0.02121,\n\t0.02292, 0.02472, 0.02662, 0.02863, 0.03073, 0.03294, 0.03527, 0.03770,\n\t0.04025, 0.04292, 0.04571, 0.04862, 0.05165, 0.05481, 0.05810, 0.06153,\n\t0.06508, 0.06878, 0.07261, 0.07658, 0.08069, 0.08495, 0.08935, 0.09389,\n\t0.09859, 0.10343, 0.10842, 0.11356, 0.11885, 0.12429, 0.12988, 0.13563,\n\t0.14152, 0.14757, 0.15376, 0.16011, 0.16661, 0.17325, 0.18005, 0.18699,\n\t0.19407, 0.20130, 0.20867, 0.21618, 0.22382, 0.23161, 0.23952, 0.24757,\n\t0.25574, 0.26404, 0.27246, 0.28100, 0.28965, 0.29841, 0.30729, 0.31626,\n\t0.32533, 0.33450, 0.34376, 0.35311, 0.36253, 0.37204, 0.38161, 0.39126,\n\t0.40096, 0.41072, 0.42054, 0.43040, 0.44030, 0.45023, 0.46020, 0.47019,\n\t0.48020, 0.49022, 0.50025, 0.51028, 0.52031, 0.53033, 0.54033, 0.55031,\n\t0.56026, 0.57019, 0.58007, 0.58991, 0.59970, 0.60944, 0.61912, 0.62873,\n\t0.63827, 0.64774, 0.65713, 0.66643, 0.67564, 0.68476, 0.69377, 0.70269,\n\t0.71150, 0.72019, 0.72877, 0.73723, 0.74557, 0.75378, 0.76186, 0.76981,\n\t0.77762, 0.78530, 0.79283, 0.80022, 0.80747, 0.81457, 0.82151, 0.82831,\n\t0.83496, 0.84145, 0.84779, 0.85398, 0.86001, 0.86588, 0.87160, 0.87716,\n\t0.88257, 0.88782, 0.89291, 0.89785, 0.90264, 0.90728, 0.91176, 0.91610,\n\t0.92028, 0.92432, 0.92822, 0.93197, 0.93558, 0.93906, 0.94240, 0.94560,\n\t0.94867, 0.95162, 0.95444, 0.95713, 0.95971, 0.96217, 0.96451, 0.96674,\n\t0.96887, 0.97089, 0.97281, 0.97463, 0.97635, 0.97799, 0.97953, 0.98099,\n\t0.98236, 0.98366, 0.98488, 0.98602, 0.98710, 0.98811, 0.98905, 0.98994,\n\t0.99076, 0.99153, 0.99225, 0.99291, 0.99353, 0.99411, 0.99464, 0.99513,\n\t0.99558, 0.99600, 0.99639, 0.99674, 0.99706, 0.99736, 0.99763, 0.99788,\n\t0.99811, 0.99831, 0.99850, 0.99867, 0.99882, 0.99895, 0.99908, 0.99919,\n\t0.99929, 0.99938, 0.99946, 0.99953, 0.99959, 0.99965, 0.99969, 0.99974,\n\t0.99978, 0.99981, 0.99984, 0.99986, 0.99988, 0.99990, 0.99992, 0.99993,\n\t0.99994, 0.99995, 0.99996, 0.99997, 0.99998, 0.99998, 0.99998, 0.99999,\n\t0.99999, 0.99999, 0.99999, 1.00000, 1.00000, 1.00000, 1.00000, 1.00000,\n\t1.00000, 1.00000, 1.00000, 1.00000, 1.00000, 1.00000, 1.00000, 1.00000 \n};\n\nmpeg3_complex_t cmplx_mult(mpeg3_complex_t a, mpeg3_complex_t b)\n{\n\tmpeg3_complex_t ret;\n\n\tret.real = a.real * b.real - a.imag * b.imag;\n\tret.imag = a.real * b.imag + a.imag * b.real;\n\n\treturn ret;\n}\n\nint mpeg3audio_imdct_init(mpeg3audio_t *audio)\n{\n\tint i, k;\n\tmpeg3_complex_t angle_step;\n\tmpeg3_complex_t current_angle;\n\n/* Twiddle factors to turn IFFT into IMDCT */\n\tfor(i = 0; i < AC3_N / 4; i++)\n\t{\n\t\tmpeg3_xcos1[i] = -cos(2.0f * M_PI * (8 * i + 1 ) / ( 8 * AC3_N)); \n\t\tmpeg3_xsin1[i] = -sin(2.0f * M_PI * (8 * i + 1 ) / ( 8 * AC3_N));\n\t}\n\t\n/* More twiddle factors to turn IFFT into IMDCT */\n\tfor(i = 0; i < AC3_N / 8; i++)\n\t{\n\t\tmpeg3_xcos2[i] = -cos(2.0f * M_PI * (8 * i + 1 ) / ( 4 * AC3_N)); \n\t\tmpeg3_xsin2[i] = -sin(2.0f * M_PI * (8 * i + 1 ) / ( 4 * AC3_N));\n\t}\n\n/* Canonical twiddle factors for FFT */\n\taudio->ac3_w[0] = audio->ac3_w_1;\n\taudio->ac3_w[1] = audio->ac3_w_2;\n\taudio->ac3_w[2] = audio->ac3_w_4;\n\taudio->ac3_w[3] = audio->ac3_w_8;\n\taudio->ac3_w[4] = audio->ac3_w_16;\n\taudio->ac3_w[5] = audio->ac3_w_32;\n\taudio->ac3_w[6] = audio->ac3_w_64;\n\n\tfor(i = 0; i < 7; i++)\n\t{\n\t\tangle_step.real = cos(-2.0f * M_PI / (1 << (i + 1)));\n\t\tangle_step.imag = sin(-2.0f * M_PI / (1 << (i + 1)));\n\n\t\tcurrent_angle.real = 1.0f;\n\t\tcurrent_angle.imag = 0.0f;\n\n\t\tfor (k = 0; k < 1 << i; k++)\n\t\t{\n\t\t\taudio->ac3_w[i][k] = current_angle;\n\t\t\tcurrent_angle = cmplx_mult(current_angle, angle_step);\n\t\t}\n\t}\n\treturn 0;\n}\n\n\ninline void swap_cmplx(mpeg3_complex_t *a, mpeg3_complex_t *b)\n{\n\tmpeg3_complex_t tmp;\n\n\ttmp = *a;\n\t*a = *b;\n\t*b = tmp;\n}\n \nvoid mpeg3audio_ac3_imdct_do_512(mpeg3audio_t *audio, \n\t\tfloat data[], \n\t\tfloat *y, \n\t\tint step, \n\t\tfloat *delay)\n{\n\tint i, k;\n\tint p, q;\n\tint m;\n\tint two_m;\n\tint two_m_plus_one;\n\n\tfloat tmp_a_i;\n\tfloat tmp_a_r;\n\tfloat tmp_b_i;\n\tfloat tmp_b_r;\n\n\tfloat *y_ptr;\n\tfloat *delay_ptr;\n\tfloat *window_ptr;\n\tmpeg3_complex_t *buf = audio->ac3_imdct_buf;\n\n/* Pre IFFT complex multiply plus IFFT cmplx conjugate  */\n\tfor(i = 0; i < AC3_N / 4; i++)\n\t{\n\t\tbuf[i].real =   (data[AC3_N / 2 - 2 * i - 1] * mpeg3_xcos1[i]) - (data[2 * i] * mpeg3_xsin1[i]);\n\t    buf[i].imag = -((data[2 * i] * mpeg3_xcos1[i]) + (data[AC3_N / 2 - 2 * i - 1] * mpeg3_xsin1[i]));\n\t}\n\n/* Bit reversed shuffling */\n\tfor(i = 0; i < AC3_N / 4; i++)\n\t{ \n\t\tk = mpeg3_bit_reverse_512[i];\n\t\tif(k < i)\n\t\t\tswap_cmplx(&buf[i], &buf[k]);\n\t}\n\n/* FFT Merge */\n\tfor(m = 0; m < 7; m++)\n\t{\n\t\tif(m)\n\t\t\ttwo_m = (1 << m);\n\t\telse\n\t\t\ttwo_m = 1;\n\n\t\ttwo_m_plus_one = (1 << (m + 1));\n\n\t\tfor(k = 0; k < two_m; k++)\n\t\t{\n\t\t\tfor(i = 0; i < AC3_N / 4; i += two_m_plus_one)\n\t\t\t{\n\t\t\t\tp = k + i;\n\t\t\t\tq = p + two_m;\n\t\t\t\ttmp_a_r = buf[p].real;\n\t\t\t\ttmp_a_i = buf[p].imag;\n\t\t\t\ttmp_b_r = buf[q].real * audio->ac3_w[m][k].real - buf[q].imag * audio->ac3_w[m][k].imag;\n\t\t\t\ttmp_b_i = buf[q].imag * audio->ac3_w[m][k].real + buf[q].real * audio->ac3_w[m][k].imag;\n\t\t\t\tbuf[p].real = tmp_a_r + tmp_b_r;\n\t\t\t\tbuf[p].imag = tmp_a_i + tmp_b_i;\n\t\t\t\tbuf[q].real = tmp_a_r - tmp_b_r;\n\t\t\t\tbuf[q].imag = tmp_a_i - tmp_b_i;\n\t\t\t}\n\t\t}\n\t}\n\n/* Post IFFT complex multiply  plus IFFT complex conjugate*/\n\tfor(i = 0; i < AC3_N / 4; i++)\n\t{\n\t\ttmp_a_r =  buf[i].real;\n\t\ttmp_a_i = -buf[i].imag;\n\t\tbuf[i].real = (tmp_a_r * mpeg3_xcos1[i])  -  (tmp_a_i  * mpeg3_xsin1[i]);\n\t\tbuf[i].imag = (tmp_a_r * mpeg3_xsin1[i])  +  (tmp_a_i  * mpeg3_xcos1[i]);\n\t}\n\n\ty_ptr = y;\n\tdelay_ptr = delay;\n\twindow_ptr = mpeg3_window;\n\n/* Window and convert to real valued signal */\n\tfor(i = 0; i < AC3_N / 8; i++) \n\t{ \n\t\t*y_ptr = -buf[AC3_N / 8 + i].imag     * *window_ptr++ + *delay_ptr++;\n\t\ty_ptr += step;\n\t\t*y_ptr =  buf[AC3_N / 8 - i - 1].real * *window_ptr++ + *delay_ptr++;\n\t\ty_ptr += step;\n\t}\n\n\tfor(i = 0; i < AC3_N / 8; i++) \n\t{ \n\t\t*y_ptr = -buf[i].real                * *window_ptr++ + *delay_ptr++;\n\t\ty_ptr += step;\n\t\t*y_ptr = buf[AC3_N / 4 - i - 1].imag * *window_ptr++ + *delay_ptr++;\n\t\ty_ptr += step;\n\t}\n\n/* The trailing edge of the window goes into the delay line */\n\tdelay_ptr = delay;\n\n\tfor(i = 0; i < AC3_N / 8; i++)\n\t{\n\t\t*delay_ptr++  = -buf[AC3_N / 8 + i].real     * *--window_ptr; \n\t\t*delay_ptr++  =  buf[AC3_N / 8 - i - 1].imag * *--window_ptr; \n\t}\n\n\tfor(i = 0; i < AC3_N / 8; i++) \n\t{\n\t\t*delay_ptr++  =  buf[i].imag                 * *--window_ptr; \n\t\t*delay_ptr++  = -buf[AC3_N / 4 - i - 1].real * *--window_ptr; \n\t}\n}\n\nvoid mpeg3audio_ac3_imdct_do_256(mpeg3audio_t *audio, \n\tfloat data[], \n\tfloat *y, \n\tint step, \n\tfloat *delay)\n{\n\tint i, k;\n\tint p, q;\n\tint m;\n\tint two_m;\n\tint two_m_plus_one;\n\tmpeg3_complex_t *buf = audio->ac3_imdct_buf;\n\tfloat *y_ptr;\n\tfloat *delay_ptr;\n\tfloat *window_ptr;\n\n\tfloat tmp_a_i;\n\tfloat tmp_a_r;\n\tfloat tmp_b_i;\n\tfloat tmp_b_r;\n\n\tmpeg3_complex_t *buf_1, *buf_2;\n\n\tbuf_1 = &buf[0];\n\tbuf_2 = &buf[64];\n\n/* Pre IFFT complex multiply plus IFFT cmplx conjugate */\n\tfor(k = 0; k < AC3_N / 8; k++)\n\t{\n\t\tp = 2 * (AC3_N / 4 - 2 * k - 1);\n\t\tq = 2 * (2 * k);\n\n\t\tbuf_1[k].real =    data[p] * mpeg3_xcos2[k] - data[q] * mpeg3_xsin2[k];\n\t    buf_1[k].imag = - (data[q] * mpeg3_xcos2[k] + data[p] * mpeg3_xsin2[k]); \n\t\tbuf_2[k].real =    data[p + 1] * mpeg3_xcos2[k] - data[q + 1] * mpeg3_xsin2[k];\n\t    buf_2[k].imag = - (data[q + 1] * mpeg3_xcos2[k] + data[p + 1] * mpeg3_xsin2[k]); \n\t}\n\n/* IFFT Bit reversed shuffling */\n\tfor(i = 0; i < AC3_N / 8; i++)\n\t{\n\t\tk = mpeg3_bit_reverse_256[i];\n\t\tif(k < i)\n\t\t{\n\t\t\tswap_cmplx(&buf_1[i], &buf_1[k]);\n\t\t\tswap_cmplx(&buf_2[i], &buf_2[k]);\n\t\t}\n\t}\n\n/* FFT Merge */\n\tfor(m = 0; m < 6; m++)\n\t{\n\t\tif(m)\n\t\t\ttwo_m = (1 << m);\n\t\telse\n\t\t\ttwo_m = 1;\n\n\t\ttwo_m_plus_one = (1 << (m + 1));\n\n\t\tfor(k = 0; k < two_m; k++)\n\t\t{\n\t\t\tfor(i = 0; i < AC3_N / 8; i += two_m_plus_one)\n\t\t\t{\n\t\t\t\tp = k + i;\n\t\t\t\tq = p + two_m;\n/* Do block 1 */\n\t\t\t\ttmp_a_r = buf_1[p].real;\n\t\t\t\ttmp_a_i = buf_1[p].imag;\n\t\t\t\ttmp_b_r = buf_1[q].real * audio->ac3_w[m][k].real - buf_1[q].imag * audio->ac3_w[m][k].imag;\n\t\t\t\ttmp_b_i = buf_1[q].imag * audio->ac3_w[m][k].real + buf_1[q].real * audio->ac3_w[m][k].imag;\n\t\t\t\tbuf_1[p].real = tmp_a_r + tmp_b_r;\n\t\t\t\tbuf_1[p].imag = tmp_a_i + tmp_b_i;\n\t\t\t\tbuf_1[q].real = tmp_a_r - tmp_b_r;\n\t\t\t\tbuf_1[q].imag = tmp_a_i - tmp_b_i;\n\n/* Do block 2 */\n\t\t\t\ttmp_a_r = buf_2[p].real;\n\t\t\t\ttmp_a_i = buf_2[p].imag;\n\t\t\t\ttmp_b_r = buf_2[q].real * audio->ac3_w[m][k].real - buf_2[q].imag * audio->ac3_w[m][k].imag;\n\t\t\t\ttmp_b_i = buf_2[q].imag * audio->ac3_w[m][k].real + buf_2[q].real * audio->ac3_w[m][k].imag;\n\t\t\t\tbuf_2[p].real = tmp_a_r + tmp_b_r;\n\t\t\t\tbuf_2[p].imag = tmp_a_i + tmp_b_i;\n\t\t\t\tbuf_2[q].real = tmp_a_r - tmp_b_r;\n\t\t\t\tbuf_2[q].imag = tmp_a_i - tmp_b_i;\n\t\t\t}\n\t\t}\n\t}\n\n/* Post IFFT complex multiply */\n\tfor(i = 0; i < AC3_N / 8; i++)\n\t{\n\t\ttmp_a_r =  buf_1[i].real;\n\t\ttmp_a_i = -buf_1[i].imag;\n\t\tbuf_1[i].real = (tmp_a_r * mpeg3_xcos2[i])  -  (tmp_a_i  * mpeg3_xsin2[i]);\n\t\tbuf_1[i].imag = (tmp_a_r * mpeg3_xsin2[i])  +  (tmp_a_i  * mpeg3_xcos2[i]);\n\t\ttmp_a_r =  buf_2[i].real;\n\t\ttmp_a_i = -buf_2[i].imag;\n\t\tbuf_2[i].real = (tmp_a_r * mpeg3_xcos2[i])  -  (tmp_a_i  * mpeg3_xsin2[i]);\n\t    buf_2[i].imag = (tmp_a_r * mpeg3_xsin2[i])  +  (tmp_a_i  * mpeg3_xcos2[i]);\n\t}\n\n/* Window and convert to real valued signal */\n\ty_ptr = y;\n\tdelay_ptr = delay;\n\twindow_ptr = mpeg3_window;\n\n\tfor(i = 0; i < AC3_N / 8; i++) \n\t{ \n\t\t*y_ptr = -buf[AC3_N / 8 + i].imag     * *window_ptr++ + *delay_ptr++;\n\t\ty_ptr += step;\n\t\t*y_ptr =  buf[AC3_N / 8 - i - 1].real * *window_ptr++ + *delay_ptr++;\n\t\ty_ptr += step;\n\t}\n\n\tfor(i = 0; i < AC3_N / 8; i++) \n\t{ \n\t\t*y_ptr = -buf[i].real                * *window_ptr++ + *delay_ptr++;\n\t\ty_ptr += step;\n\t\t*y_ptr = buf[AC3_N / 4 - i - 1].imag * *window_ptr++ + *delay_ptr++;\n\t\ty_ptr += step;\n\t}\n\n/* The trailing edge of the window goes into the delay line */\n\tdelay_ptr = delay;\n\n\tfor(i = 0; i < AC3_N / 8; i++)\n\t{\n\t\t*delay_ptr++  = -buf[AC3_N / 8 + i].real     * *--window_ptr; \n\t\t*delay_ptr++  =  buf[AC3_N / 8 - i - 1].imag * *--window_ptr; \n\t}\n\n\tfor(i = 0; i < AC3_N / 8; i++) \n\t{\n\t\t*delay_ptr++  =  buf[i].imag                 * *--window_ptr; \n\t\t*delay_ptr++  = -buf[AC3_N / 4 - i - 1].real * *--window_ptr; \n\t}\n}\n\nint mpeg3audio_ac3_imdct(mpeg3audio_t *audio, \n\t\tmpeg3_ac3bsi_t *bsi,\n\t\tmpeg3_ac3audblk_t *audblk, \n\t\tmpeg3ac3_stream_samples_t samples)\n{\n\tint i;\n\n\tfor(i = 0; i < bsi->nfchans; i++)\n\t{\n\t\tif(audblk->blksw[i])\n\t\t\tmpeg3audio_ac3_imdct_do_256(audio, \n\t\t\t\tsamples[i], \n\t\t\t\taudio->pcm_sample + audio->pcm_point + i, \n\t\t\t\tbsi->nfchans, \n\t\t\t\taudio->ac3_delay[i]);\n\t\telse\n\t\t\tmpeg3audio_ac3_imdct_do_512(audio, \n\t\t\t\tsamples[i], \n\t\t\t\taudio->pcm_sample + audio->pcm_point + i, \n\t\t\t\tbsi->nfchans, \n\t\t\t\taudio->ac3_delay[i]);\n\t}\n\taudio->pcm_point += AC3_N / 2 * bsi->nfchans;\n\treturn 0;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/audio/header.c",
    "content": "/* \n *\n *  This file is part of libmpeg3\n *\t\n * LibMPEG3\n * Author: Adam Williams <broadcast@earthling.net>\n * Page: heroine.linuxbox.com\n * Page: http://www.smalltalkconsulting.com/html/mpeg3source.html (for Squeak)\n *\n    LibMPEG3 was originally licenced under GPL. It was relicensed by\n    the author under the LGPL and the Squeak license on Nov 1st, 2000\n    \n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA \n    \n    Also licensed under the Squeak license.\n    http://www.squeak.org/license.html\n */\n /*  Changed Sept 15th by John M McIntosh to support Macintosh & Squeak\n */\n\n#include \"mpeg3audio.h\"\n#include \"tables.h\"\n\n#include <stdio.h>\n\n/* Return 1 if the head check doesn't find a header. */\nint mpeg3audio_head_check(unsigned long head)\n{\n    if((head & 0xffe00000) != 0xffe00000) return 1;\n    if(!((head >> 17) & 3)) return 1;\n    if(((head >> 12) & 0xf) == 0xf) return 1;\n\tif(!((head >> 12) & 0xf)) return 1;\n    if(((head >> 10) & 0x3) == 0x3 ) return 1;\n\tif(((head >> 19) & 1) == 1 && ((head >> 17) & 3) == 3 && ((head >> 16) & 1) == 1)\n\t\treturn 1;\n    if((head & 0xffff0000) == 0xfffe0000) return 1;\n\n    return 0;\n}\n\nint mpeg3audio_decode_header(mpeg3audio_t *audio)\n{\n    if(audio->newhead & (1 << 20)) \n\t{\n        audio->lsf = (audio->newhead & (1 << 19)) ? 0x0 : 0x1;\n        audio->mpeg35 = 0;\n    }\n    else \n\t{\n    \taudio->lsf = 1;\n    \taudio->mpeg35 = 1;\n    }\n\n    audio->layer = 4 - ((audio->newhead >> 17) & 3);\n    if(audio->mpeg35) \n        audio->sampling_frequency_code = 6 + ((audio->newhead >> 10) & 0x3);\n    else\n        audio->sampling_frequency_code = ((audio->newhead >> 10) & 0x3) + (audio->lsf * 3);\n\n    audio->error_protection = ((audio->newhead >> 16) & 0x1) ^ 0x1;\n\n    audio->bitrate_index = ((audio->newhead >> 12) & 0xf);\n    audio->padding   = ((audio->newhead >> 9) & 0x1);\n    audio->extension = ((audio->newhead >> 8) & 0x1);\n    audio->mode      = ((audio->newhead >> 6) & 0x3);\n    audio->mode_ext  = ((audio->newhead >> 4) & 0x3);\n    audio->copyright = ((audio->newhead >> 3) & 0x1);\n    audio->original  = ((audio->newhead >> 2) & 0x1);\n    audio->emphasis  = audio->newhead & 0x3;\n    audio->channels    = (audio->mode == MPG_MD_MONO) ? 1 : 2;\n\tif(audio->channels > 1) \n\t\taudio->single = -1;\n\telse\n\t\taudio->single = 3;\n\n\taudio->prev_framesize = audio->framesize;\n\n    if(!audio->bitrate_index) return 1;\n\taudio->bitrate = 1000 * mpeg3_tabsel_123[audio->lsf][audio->layer - 1][audio->bitrate_index];\n\n    switch(audio->layer) \n\t{\n      \tcase 1:\n        \taudio->framesize  = (long)mpeg3_tabsel_123[audio->lsf][0][audio->bitrate_index] * 12000;\n        \taudio->framesize /= mpeg3_freqs[audio->sampling_frequency_code];\n        \taudio->framesize  = ((audio->framesize + audio->padding) << 2) - 4;\n        \tbreak;\n      \tcase 2:\n        \taudio->framesize = (long)mpeg3_tabsel_123[audio->lsf][1][audio->bitrate_index] * 144000;\n        \taudio->framesize /= mpeg3_freqs[audio->sampling_frequency_code];\n        \taudio->framesize += audio->padding - 4;\n        \tbreak;\n      \tcase 3:\n        \tif(audio->lsf)\n        \t  \taudio->ssize = (audio->channels == 1) ? 9 : 17;\n        \telse\n        \t  \taudio->ssize = (audio->channels == 1) ? 17 : 32;\n        \tif(audio->error_protection)\n        \t  \taudio->ssize += 2;\n        \taudio->framesize  = (long)mpeg3_tabsel_123[audio->lsf][2][audio->bitrate_index] * 144000;\n        \taudio->framesize /= mpeg3_freqs[audio->sampling_frequency_code] << (audio->lsf);\n        \taudio->framesize = audio->framesize + audio->padding - 4;\n        \tbreak; \n      \tdefault:\n        \treturn 1;\n    }\n\n\tif(audio->framesize > MAXFRAMESIZE) return 1;\n\n\treturn 0;\n}\n\nint mpeg3audio_read_frame_body(mpeg3audio_t *audio)\n{\n\tint i;\n\tfor(i = 0; i < audio->framesize; i++)\n\t{\n\t\taudio->bsbuf[i] = mpeg3bits_getbits(audio->astream, 8);\n\t}\n\treturn 0;\n}\n\n/* Seek to the start of the previous header */\nint mpeg3audio_prev_header(mpeg3audio_t *audio)\n{\n\tint result = 0, i, len = audio->avg_framesize;\n\n\tfor(i = 0; i < len && !result; i++)\n\t{\n\t\tmpeg3bits_getbits_reverse(audio->astream, 8);\n\t}\n/* Get reading in the forward direction again. */\n\tresult |= mpeg3bits_refill(audio->astream);\n\treturn result;\n}\n\n/* Read the next header */\nint mpeg3audio_read_header(mpeg3audio_t *audio)\n{\n\tunsigned int code;\n\tint i;\n    int try2 = 0;\n\tint result = 0;\n\n\tswitch(audio->format)\n\t{\n\t\tcase AUDIO_AC3:\n\t\t\t//JMM result = mpeg3audio_read_ac3_header(audio);\n\t\t\tbreak;\n\n\t\tcase AUDIO_MPEG:\n/* Layer 1 not supported */\n\t\t\tif(audio->layer == 1)\n\t\t\t{\n\t\t\t\tfprintf(stderr, \"mpeg3audio_new: layer 1 not supported\\n\");\n\t\t\t\tresult = 1;\n\t\t\t}\n\t\t\taudio->newhead = mpeg3bits_showbits(audio->astream, 32);\n\t\t\tif(!mpeg3bits_eof(audio->astream) &&\n\t\t\t\t(mpeg3audio_head_check(audio->newhead) || mpeg3audio_decode_header(audio)))\n\t\t\t{\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\ttry2++;\n\t\t\t\t\tmpeg3bits_getbyte_noptr(audio->astream);\n\t\t\t\t\taudio->newhead = mpeg3bits_showbits(audio->astream, 32);\n\t\t\t\t}while(!mpeg3bits_eof(audio->astream) && \n\t\t\t\ttry2 < 65536 && \n\t\t\t\t\t(mpeg3audio_head_check(audio->newhead) || mpeg3audio_decode_header(audio)));\n    \t\t}\n\n/* Skip the 4 bytes containing the header */\n\t\t\tmpeg3bits_getbits(audio->astream, 32);\n\t\t\tbreak;\n\t\t\n\t\tcase AUDIO_PCM:\n\t\t\tmpeg3audio_read_pcm_header(audio);\n\t\t\tbreak;\n\t}\n\treturn mpeg3bits_eof(audio->astream);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/audio/huffman.h",
    "content": "#ifndef HUFFMAN_H\n#define HUFFMAN_H\n\n/*\n * huffman tables ... recalcualted to work with my optimzed\n * decoder scheme (MH)\n * \n * probably we could save a few bytes of memory, because the \n * smaller tables are often the part of a bigger table\n */\n\nstruct newhuff \n{\n  unsigned int linbits;\n  short *table;\n};\n\nstatic short mpeg3_tab0[] = \n{ \n   0\n};\n\nstatic short mpeg3_tab1[] =\n{\n  -5,  -3,  -1,  17,   1,  16,   0\n};\n\nstatic short mpeg3_tab2[] =\n{\n -15, -11,  -9,  -5,  -3,  -1,  34,   2,  18,  -1,  33,  32,  17,  -1,   1,\n  16,   0\n};\n\nstatic short mpeg3_tab3[] =\n{\n -13, -11,  -9,  -5,  -3,  -1,  34,   2,  18,  -1,  33,  32,  16,  17,  -1,\n   1,   0\n};\n\nstatic short mpeg3_tab5[] =\n{\n -29, -25, -23, -15,  -7,  -5,  -3,  -1,  51,  35,  50,  49,  -3,  -1,  19,\n   3,  -1,  48,  34,  -3,  -1,  18,  33,  -1,   2,  32,  17,  -1,   1,  16,\n   0\n};\n\nstatic short mpeg3_tab6[] =\n{\n -25, -19, -13,  -9,  -5,  -3,  -1,  51,   3,  35,  -1,  50,  48,  -1,  19,\n  49,  -3,  -1,  34,   2,  18,  -3,  -1,  33,  32,   1,  -1,  17,  -1,  16,\n   0\n};\n\nstatic short mpeg3_tab7[] =\n{\n -69, -65, -57, -39, -29, -17, -11,  -7,  -3,  -1,  85,  69,  -1,  84,  83,\n  -1,  53,  68,  -3,  -1,  37,  82,  21,  -5,  -1,  81,  -1,   5,  52,  -1,\n  80,  -1,  67,  51,  -5,  -3,  -1,  36,  66,  20,  -1,  65,  64, -11,  -7,\n  -3,  -1,   4,  35,  -1,  50,   3,  -1,  19,  49,  -3,  -1,  48,  34,  18,\n  -5,  -1,  33,  -1,   2,  32,  17,  -1,   1,  16,   0\n};\n\nstatic short mpeg3_tab8[] =\n{\n -65, -63, -59, -45, -31, -19, -13,  -7,  -5,  -3,  -1,  85,  84,  69,  83,\n  -3,  -1,  53,  68,  37,  -3,  -1,  82,   5,  21,  -5,  -1,  81,  -1,  52,\n  67,  -3,  -1,  80,  51,  36,  -5,  -3,  -1,  66,  20,  65,  -3,  -1,   4,\n  64,  -1,  35,  50,  -9,  -7,  -3,  -1,  19,  49,  -1,   3,  48,  34,  -1,\n   2,  32,  -1,  18,  33,  17,  -3,  -1,   1,  16,   0\n};\n\nstatic short mpeg3_tab9[] =\n{\n -63, -53, -41, -29, -19, -11,  -5,  -3,  -1,  85,  69,  53,  -1,  83,  -1,\n  84,   5,  -3,  -1,  68,  37,  -1,  82,  21,  -3,  -1,  81,  52,  -1,  67,\n  -1,  80,   4,  -7,  -3,  -1,  36,  66,  -1,  51,  64,  -1,  20,  65,  -5,\n  -3,  -1,  35,  50,  19,  -1,  49,  -1,   3,  48,  -5,  -3,  -1,  34,   2,\n  18,  -1,  33,  32,  -3,  -1,  17,   1,  -1,  16,   0\n};\n\nstatic short mpeg3_tab10[] =\n{\n-125,-121,-111, -83, -55, -35, -21, -13,  -7,  -3,  -1, 119, 103,  -1, 118,\n  87,  -3,  -1, 117, 102,  71,  -3,  -1, 116,  86,  -1, 101,  55,  -9,  -3,\n  -1, 115,  70,  -3,  -1,  85,  84,  99,  -1,  39, 114, -11,  -5,  -3,  -1,\n 100,   7, 112,  -1,  98,  -1,  69,  53,  -5,  -1,   6,  -1,  83,  68,  23,\n -17,  -5,  -1, 113,  -1,  54,  38,  -5,  -3,  -1,  37,  82,  21,  -1,  81,\n  -1,  52,  67,  -3,  -1,  22,  97,  -1,  96,  -1,   5,  80, -19, -11,  -7,\n  -3,  -1,  36,  66,  -1,  51,   4,  -1,  20,  65,  -3,  -1,  64,  35,  -1,\n  50,   3,  -3,  -1,  19,  49,  -1,  48,  34,  -7,  -3,  -1,  18,  33,  -1,\n   2,  32,  17,  -1,   1,  16,   0\n};\n\nstatic short mpeg3_tab11[] =\n{\n-121,-113, -89, -59, -43, -27, -17,  -7,  -3,  -1, 119, 103,  -1, 118, 117,\n  -3,  -1, 102,  71,  -1, 116,  -1,  87,  85,  -5,  -3,  -1,  86, 101,  55,\n  -1, 115,  70,  -9,  -7,  -3,  -1,  69,  84,  -1,  53,  83,  39,  -1, 114,\n  -1, 100,   7,  -5,  -1, 113,  -1,  23, 112,  -3,  -1,  54,  99,  -1,  96,\n  -1,  68,  37, -13,  -7,  -5,  -3,  -1,  82,   5,  21,  98,  -3,  -1,  38,\n   6,  22,  -5,  -1,  97,  -1,  81,  52,  -5,  -1,  80,  -1,  67,  51,  -1,\n  36,  66, -15, -11,  -7,  -3,  -1,  20,  65,  -1,   4,  64,  -1,  35,  50,\n  -1,  19,  49,  -5,  -3,  -1,   3,  48,  34,  33,  -5,  -1,  18,  -1,   2,\n  32,  17,  -3,  -1,   1,  16,   0\n};\n\nstatic short mpeg3_tab12[] =\n{\n-115, -99, -73, -45, -27, -17,  -9,  -5,  -3,  -1, 119, 103, 118,  -1,  87,\n 117,  -3,  -1, 102,  71,  -1, 116, 101,  -3,  -1,  86,  55,  -3,  -1, 115,\n  85,  39,  -7,  -3,  -1, 114,  70,  -1, 100,  23,  -5,  -1, 113,  -1,   7,\n 112,  -1,  54,  99, -13,  -9,  -3,  -1,  69,  84,  -1,  68,  -1,   6,   5,\n  -1,  38,  98,  -5,  -1,  97,  -1,  22,  96,  -3,  -1,  53,  83,  -1,  37,\n  82, -17,  -7,  -3,  -1,  21,  81,  -1,  52,  67,  -5,  -3,  -1,  80,   4,\n  36,  -1,  66,  20,  -3,  -1,  51,  65,  -1,  35,  50, -11,  -7,  -5,  -3,\n  -1,  64,   3,  48,  19,  -1,  49,  34,  -1,  18,  33,  -7,  -5,  -3,  -1,\n   2,  32,   0,  17,  -1,   1,  16\n};\n\nstatic short mpeg3_tab13[] =\n{\n-509,-503,-475,-405,-333,-265,-205,-153,-115, -83, -53, -35, -21, -13,  -9,\n  -7,  -5,  -3,  -1, 254, 252, 253, 237, 255,  -1, 239, 223,  -3,  -1, 238,\n 207,  -1, 222, 191,  -9,  -3,  -1, 251, 206,  -1, 220,  -1, 175, 233,  -1,\n 236, 221,  -9,  -5,  -3,  -1, 250, 205, 190,  -1, 235, 159,  -3,  -1, 249,\n 234,  -1, 189, 219, -17,  -9,  -3,  -1, 143, 248,  -1, 204,  -1, 174, 158,\n  -5,  -1, 142,  -1, 127, 126, 247,  -5,  -1, 218,  -1, 173, 188,  -3,  -1,\n 203, 246, 111, -15,  -7,  -3,  -1, 232,  95,  -1, 157, 217,  -3,  -1, 245,\n 231,  -1, 172, 187,  -9,  -3,  -1,  79, 244,  -3,  -1, 202, 230, 243,  -1,\n  63,  -1, 141, 216, -21,  -9,  -3,  -1,  47, 242,  -3,  -1, 110, 156,  15,\n  -5,  -3,  -1, 201,  94, 171,  -3,  -1, 125, 215,  78, -11,  -5,  -3,  -1,\n 200, 214,  62,  -1, 185,  -1, 155, 170,  -1,  31, 241, -23, -13,  -5,  -1,\n 240,  -1, 186, 229,  -3,  -1, 228, 140,  -1, 109, 227,  -5,  -1, 226,  -1,\n  46,  14,  -1,  30, 225, -15,  -7,  -3,  -1, 224,  93,  -1, 213, 124,  -3,\n  -1, 199,  77,  -1, 139, 184,  -7,  -3,  -1, 212, 154,  -1, 169, 108,  -1,\n 198,  61, -37, -21,  -9,  -5,  -3,  -1, 211, 123,  45,  -1, 210,  29,  -5,\n  -1, 183,  -1,  92, 197,  -3,  -1, 153, 122, 195,  -7,  -5,  -3,  -1, 167,\n 151,  75, 209,  -3,  -1,  13, 208,  -1, 138, 168, -11,  -7,  -3,  -1,  76,\n 196,  -1, 107, 182,  -1,  60,  44,  -3,  -1, 194,  91,  -3,  -1, 181, 137,\n  28, -43, -23, -11,  -5,  -1, 193,  -1, 152,  12,  -1, 192,  -1, 180, 106,\n  -5,  -3,  -1, 166, 121,  59,  -1, 179,  -1, 136,  90, -11,  -5,  -1,  43,\n  -1, 165, 105,  -1, 164,  -1, 120, 135,  -5,  -1, 148,  -1, 119, 118, 178,\n -11,  -3,  -1,  27, 177,  -3,  -1,  11, 176,  -1, 150,  74,  -7,  -3,  -1,\n  58, 163,  -1,  89, 149,  -1,  42, 162, -47, -23,  -9,  -3,  -1,  26, 161,\n  -3,  -1,  10, 104, 160,  -5,  -3,  -1, 134,  73, 147,  -3,  -1,  57,  88,\n  -1, 133, 103,  -9,  -3,  -1,  41, 146,  -3,  -1,  87, 117,  56,  -5,  -1,\n 131,  -1, 102,  71,  -3,  -1, 116,  86,  -1, 101, 115, -11,  -3,  -1,  25,\n 145,  -3,  -1,   9, 144,  -1,  72, 132,  -7,  -5,  -1, 114,  -1,  70, 100,\n  40,  -1, 130,  24, -41, -27, -11,  -5,  -3,  -1,  55,  39,  23,  -1, 113,\n  -1,  85,   7,  -7,  -3,  -1, 112,  54,  -1,  99,  69,  -3,  -1,  84,  38,\n  -1,  98,  53,  -5,  -1, 129,  -1,   8, 128,  -3,  -1,  22,  97,  -1,   6,\n  96, -13,  -9,  -5,  -3,  -1,  83,  68,  37,  -1,  82,   5,  -1,  21,  81,\n  -7,  -3,  -1,  52,  67,  -1,  80,  36,  -3,  -1,  66,  51,  20, -19, -11,\n  -5,  -1,  65,  -1,   4,  64,  -3,  -1,  35,  50,  19,  -3,  -1,  49,   3,\n  -1,  48,  34,  -3,  -1,  18,  33,  -1,   2,  32,  -3,  -1,  17,   1,  16,\n   0\n};\n\nstatic short mpeg3_tab15[] =\n{\n-495,-445,-355,-263,-183,-115, -77, -43, -27, -13,  -7,  -3,  -1, 255, 239,\n  -1, 254, 223,  -1, 238,  -1, 253, 207,  -7,  -3,  -1, 252, 222,  -1, 237,\n 191,  -1, 251,  -1, 206, 236,  -7,  -3,  -1, 221, 175,  -1, 250, 190,  -3,\n  -1, 235, 205,  -1, 220, 159, -15,  -7,  -3,  -1, 249, 234,  -1, 189, 219,\n  -3,  -1, 143, 248,  -1, 204, 158,  -7,  -3,  -1, 233, 127,  -1, 247, 173,\n  -3,  -1, 218, 188,  -1, 111,  -1, 174,  15, -19, -11,  -3,  -1, 203, 246,\n  -3,  -1, 142, 232,  -1,  95, 157,  -3,  -1, 245, 126,  -1, 231, 172,  -9,\n  -3,  -1, 202, 187,  -3,  -1, 217, 141,  79,  -3,  -1, 244,  63,  -1, 243,\n 216, -33, -17,  -9,  -3,  -1, 230,  47,  -1, 242,  -1, 110, 240,  -3,  -1,\n  31, 241,  -1, 156, 201,  -7,  -3,  -1,  94, 171,  -1, 186, 229,  -3,  -1,\n 125, 215,  -1,  78, 228, -15,  -7,  -3,  -1, 140, 200,  -1,  62, 109,  -3,\n  -1, 214, 227,  -1, 155, 185,  -7,  -3,  -1,  46, 170,  -1, 226,  30,  -5,\n  -1, 225,  -1,  14, 224,  -1,  93, 213, -45, -25, -13,  -7,  -3,  -1, 124,\n 199,  -1,  77, 139,  -1, 212,  -1, 184, 154,  -7,  -3,  -1, 169, 108,  -1,\n 198,  61,  -1, 211, 210,  -9,  -5,  -3,  -1,  45,  13,  29,  -1, 123, 183,\n  -5,  -1, 209,  -1,  92, 208,  -1, 197, 138, -17,  -7,  -3,  -1, 168,  76,\n  -1, 196, 107,  -5,  -1, 182,  -1, 153,  12,  -1,  60, 195,  -9,  -3,  -1,\n 122, 167,  -1, 166,  -1, 192,  11,  -1, 194,  -1,  44,  91, -55, -29, -15,\n  -7,  -3,  -1, 181,  28,  -1, 137, 152,  -3,  -1, 193,  75,  -1, 180, 106,\n  -5,  -3,  -1,  59, 121, 179,  -3,  -1, 151, 136,  -1,  43,  90, -11,  -5,\n  -1, 178,  -1, 165,  27,  -1, 177,  -1, 176, 105,  -7,  -3,  -1, 150,  74,\n  -1, 164, 120,  -3,  -1, 135,  58, 163, -17,  -7,  -3,  -1,  89, 149,  -1,\n  42, 162,  -3,  -1,  26, 161,  -3,  -1,  10, 160, 104,  -7,  -3,  -1, 134,\n  73,  -1, 148,  57,  -5,  -1, 147,  -1, 119,   9,  -1,  88, 133, -53, -29,\n -13,  -7,  -3,  -1,  41, 103,  -1, 118, 146,  -1, 145,  -1,  25, 144,  -7,\n  -3,  -1,  72, 132,  -1,  87, 117,  -3,  -1,  56, 131,  -1, 102,  71,  -7,\n  -3,  -1,  40, 130,  -1,  24, 129,  -7,  -3,  -1, 116,   8,  -1, 128,  86,\n  -3,  -1, 101,  55,  -1, 115,  70, -17,  -7,  -3,  -1,  39, 114,  -1, 100,\n  23,  -3,  -1,  85, 113,  -3,  -1,   7, 112,  54,  -7,  -3,  -1,  99,  69,\n  -1,  84,  38,  -3,  -1,  98,  22,  -3,  -1,   6,  96,  53, -33, -19,  -9,\n  -5,  -1,  97,  -1,  83,  68,  -1,  37,  82,  -3,  -1,  21,  81,  -3,  -1,\n   5,  80,  52,  -7,  -3,  -1,  67,  36,  -1,  66,  51,  -1,  65,  -1,  20,\n   4,  -9,  -3,  -1,  35,  50,  -3,  -1,  64,   3,  19,  -3,  -1,  49,  48,\n  34,  -9,  -7,  -3,  -1,  18,  33,  -1,   2,  32,  17,  -3,  -1,   1,  16,\n   0\n};\n\nstatic short mpeg3_tab16[] =\n{\n-509,-503,-461,-323,-103, -37, -27, -15,  -7,  -3,  -1, 239, 254,  -1, 223,\n 253,  -3,  -1, 207, 252,  -1, 191, 251,  -5,  -1, 175,  -1, 250, 159,  -3,\n  -1, 249, 248, 143,  -7,  -3,  -1, 127, 247,  -1, 111, 246, 255,  -9,  -5,\n  -3,  -1,  95, 245,  79,  -1, 244, 243, -53,  -1, 240,  -1,  63, -29, -19,\n -13,  -7,  -5,  -1, 206,  -1, 236, 221, 222,  -1, 233,  -1, 234, 217,  -1,\n 238,  -1, 237, 235,  -3,  -1, 190, 205,  -3,  -1, 220, 219, 174, -11,  -5,\n  -1, 204,  -1, 173, 218,  -3,  -1, 126, 172, 202,  -5,  -3,  -1, 201, 125,\n  94, 189, 242, -93,  -5,  -3,  -1,  47,  15,  31,  -1, 241, -49, -25, -13,\n  -5,  -1, 158,  -1, 188, 203,  -3,  -1, 142, 232,  -1, 157, 231,  -7,  -3,\n  -1, 187, 141,  -1, 216, 110,  -1, 230, 156, -13,  -7,  -3,  -1, 171, 186,\n  -1, 229, 215,  -1,  78,  -1, 228, 140,  -3,  -1, 200,  62,  -1, 109,  -1,\n 214, 155, -19, -11,  -5,  -3,  -1, 185, 170, 225,  -1, 212,  -1, 184, 169,\n  -5,  -1, 123,  -1, 183, 208, 227,  -7,  -3,  -1,  14, 224,  -1,  93, 213,\n  -3,  -1, 124, 199,  -1,  77, 139, -75, -45, -27, -13,  -7,  -3,  -1, 154,\n 108,  -1, 198,  61,  -3,  -1,  92, 197,  13,  -7,  -3,  -1, 138, 168,  -1,\n 153,  76,  -3,  -1, 182, 122,  60, -11,  -5,  -3,  -1,  91, 137,  28,  -1,\n 192,  -1, 152, 121,  -1, 226,  -1,  46,  30, -15,  -7,  -3,  -1, 211,  45,\n  -1, 210, 209,  -5,  -1,  59,  -1, 151, 136,  29,  -7,  -3,  -1, 196, 107,\n  -1, 195, 167,  -1,  44,  -1, 194, 181, -23, -13,  -7,  -3,  -1, 193,  12,\n  -1,  75, 180,  -3,  -1, 106, 166, 179,  -5,  -3,  -1,  90, 165,  43,  -1,\n 178,  27, -13,  -5,  -1, 177,  -1,  11, 176,  -3,  -1, 105, 150,  -1,  74,\n 164,  -5,  -3,  -1, 120, 135, 163,  -3,  -1,  58,  89,  42, -97, -57, -33,\n -19, -11,  -5,  -3,  -1, 149, 104, 161,  -3,  -1, 134, 119, 148,  -5,  -3,\n  -1,  73,  87, 103, 162,  -5,  -1,  26,  -1,  10, 160,  -3,  -1,  57, 147,\n  -1,  88, 133,  -9,  -3,  -1,  41, 146,  -3,  -1, 118,   9,  25,  -5,  -1,\n 145,  -1, 144,  72,  -3,  -1, 132, 117,  -1,  56, 131, -21, -11,  -5,  -3,\n  -1, 102,  40, 130,  -3,  -1,  71, 116,  24,  -3,  -1, 129, 128,  -3,  -1,\n   8,  86,  55,  -9,  -5,  -1, 115,  -1, 101,  70,  -1,  39, 114,  -5,  -3,\n  -1, 100,  85,   7,  23, -23, -13,  -5,  -1, 113,  -1, 112,  54,  -3,  -1,\n  99,  69,  -1,  84,  38,  -3,  -1,  98,  22,  -1,  97,  -1,   6,  96,  -9,\n  -5,  -1,  83,  -1,  53,  68,  -1,  37,  82,  -1,  81,  -1,  21,   5, -33,\n -23, -13,  -7,  -3,  -1,  52,  67,  -1,  80,  36,  -3,  -1,  66,  51,  20,\n  -5,  -1,  65,  -1,   4,  64,  -1,  35,  50,  -3,  -1,  19,  49,  -3,  -1,\n   3,  48,  34,  -3,  -1,  18,  33,  -1,   2,  32,  -3,  -1,  17,   1,  16,\n   0\n};\n\nstatic short mpeg3_tab24[] =\n{\n-451,-117, -43, -25, -15,  -7,  -3,  -1, 239, 254,  -1, 223, 253,  -3,  -1,\n 207, 252,  -1, 191, 251,  -5,  -1, 250,  -1, 175, 159,  -1, 249, 248,  -9,\n  -5,  -3,  -1, 143, 127, 247,  -1, 111, 246,  -3,  -1,  95, 245,  -1,  79,\n 244, -71,  -7,  -3,  -1,  63, 243,  -1,  47, 242,  -5,  -1, 241,  -1,  31,\n 240, -25,  -9,  -1,  15,  -3,  -1, 238, 222,  -1, 237, 206,  -7,  -3,  -1,\n 236, 221,  -1, 190, 235,  -3,  -1, 205, 220,  -1, 174, 234, -15,  -7,  -3,\n  -1, 189, 219,  -1, 204, 158,  -3,  -1, 233, 173,  -1, 218, 188,  -7,  -3,\n  -1, 203, 142,  -1, 232, 157,  -3,  -1, 217, 126,  -1, 231, 172, 255,-235,\n-143, -77, -45, -25, -15,  -7,  -3,  -1, 202, 187,  -1, 141, 216,  -5,  -3,\n  -1,  14, 224,  13, 230,  -5,  -3,  -1, 110, 156, 201,  -1,  94, 186,  -9,\n  -5,  -1, 229,  -1, 171, 125,  -1, 215, 228,  -3,  -1, 140, 200,  -3,  -1,\n  78,  46,  62, -15,  -7,  -3,  -1, 109, 214,  -1, 227, 155,  -3,  -1, 185,\n 170,  -1, 226,  30,  -7,  -3,  -1, 225,  93,  -1, 213, 124,  -3,  -1, 199,\n  77,  -1, 139, 184, -31, -15,  -7,  -3,  -1, 212, 154,  -1, 169, 108,  -3,\n  -1, 198,  61,  -1, 211,  45,  -7,  -3,  -1, 210,  29,  -1, 123, 183,  -3,\n  -1, 209,  92,  -1, 197, 138, -17,  -7,  -3,  -1, 168, 153,  -1,  76, 196,\n  -3,  -1, 107, 182,  -3,  -1, 208,  12,  60,  -7,  -3,  -1, 195, 122,  -1,\n 167,  44,  -3,  -1, 194,  91,  -1, 181,  28, -57, -35, -19,  -7,  -3,  -1,\n 137, 152,  -1, 193,  75,  -5,  -3,  -1, 192,  11,  59,  -3,  -1, 176,  10,\n  26,  -5,  -1, 180,  -1, 106, 166,  -3,  -1, 121, 151,  -3,  -1, 160,   9,\n 144,  -9,  -3,  -1, 179, 136,  -3,  -1,  43,  90, 178,  -7,  -3,  -1, 165,\n  27,  -1, 177, 105,  -1, 150, 164, -17,  -9,  -5,  -3,  -1,  74, 120, 135,\n  -1,  58, 163,  -3,  -1,  89, 149,  -1,  42, 162,  -7,  -3,  -1, 161, 104,\n  -1, 134, 119,  -3,  -1,  73, 148,  -1,  57, 147, -63, -31, -15,  -7,  -3,\n  -1,  88, 133,  -1,  41, 103,  -3,  -1, 118, 146,  -1,  25, 145,  -7,  -3,\n  -1,  72, 132,  -1,  87, 117,  -3,  -1,  56, 131,  -1, 102,  40, -17,  -7,\n  -3,  -1, 130,  24,  -1,  71, 116,  -5,  -1, 129,  -1,   8, 128,  -1,  86,\n 101,  -7,  -5,  -1,  23,  -1,   7, 112, 115,  -3,  -1,  55,  39, 114, -15,\n  -7,  -3,  -1,  70, 100,  -1,  85, 113,  -3,  -1,  54,  99,  -1,  69,  84,\n  -7,  -3,  -1,  38,  98,  -1,  22,  97,  -5,  -3,  -1,   6,  96,  53,  -1,\n  83,  68, -51, -37, -23, -15,  -9,  -3,  -1,  37,  82,  -1,  21,  -1,   5,\n  80,  -1,  81,  -1,  52,  67,  -3,  -1,  36,  66,  -1,  51,  20,  -9,  -5,\n  -1,  65,  -1,   4,  64,  -1,  35,  50,  -1,  19,  49,  -7,  -5,  -3,  -1,\n   3,  48,  34,  18,  -1,  33,  -1,   2,  32,  -3,  -1,  17,   1,  -1,  16,\n   0\n};\n\nstatic short mpeg3_tab_c0[] =\n{\n -29, -21, -13,  -7,  -3,  -1,  11,  15,  -1,  13,  14,  -3,  -1,   7,   5,\n   9,  -3,  -1,   6,   3,  -1,  10,  12,  -3,  -1,   2,   1,  -1,   4,   8,\n   0\n};\n\nstatic short mpeg3_tab_c1[] =\n{\n -15,  -7,  -3,  -1,  15,  14,  -1,  13,  12,  -3,  -1,  11,  10,  -1,   9,\n   8,  -7,  -3,  -1,   7,   6,  -1,   5,   4,  -3,  -1,   3,   2,  -1,   1,\n   0\n};\n\n\n\nstatic struct newhuff mpeg3_ht[] = \n{\n { /* 0 */ 0 , mpeg3_tab0  } ,\n { /* 2 */ 0 , mpeg3_tab1  } ,\n { /* 3 */ 0 , mpeg3_tab2  } ,\n { /* 3 */ 0 , mpeg3_tab3  } ,\n { /* 0 */ 0 , mpeg3_tab0  } ,\n { /* 4 */ 0 , mpeg3_tab5  } ,\n { /* 4 */ 0 , mpeg3_tab6  } ,\n { /* 6 */ 0 , mpeg3_tab7  } ,\n { /* 6 */ 0 , mpeg3_tab8  } ,\n { /* 6 */ 0 , mpeg3_tab9  } ,\n { /* 8 */ 0 , mpeg3_tab10 } ,\n { /* 8 */ 0 , mpeg3_tab11 } ,\n { /* 8 */ 0 , mpeg3_tab12 } ,\n { /* 16 */ 0 , mpeg3_tab13 } ,\n { /* 0  */ 0 , mpeg3_tab0  } ,\n { /* 16 */ 0 , mpeg3_tab15 } ,\n\n { /* 16 */ 1 , mpeg3_tab16 } ,\n { /* 16 */ 2 , mpeg3_tab16 } ,\n { /* 16 */ 3 , mpeg3_tab16 } ,\n { /* 16 */ 4 , mpeg3_tab16 } ,\n { /* 16 */ 6 , mpeg3_tab16 } ,\n { /* 16 */ 8 , mpeg3_tab16 } ,\n { /* 16 */ 10, mpeg3_tab16 } ,\n { /* 16 */ 13, mpeg3_tab16 } ,\n { /* 16 */ 4 , mpeg3_tab24 } ,\n { /* 16 */ 5 , mpeg3_tab24 } ,\n { /* 16 */ 6 , mpeg3_tab24 } ,\n { /* 16 */ 7 , mpeg3_tab24 } ,\n { /* 16 */ 8 , mpeg3_tab24 } ,\n { /* 16 */ 9 , mpeg3_tab24 } ,\n { /* 16 */ 11, mpeg3_tab24 } ,\n { /* 16 */ 13, mpeg3_tab24 }\n};\n\nstatic struct newhuff mpeg3_htc[] = \n{\n { /* 1 , 1 , */ 0 , mpeg3_tab_c0 } ,\n { /* 1 , 1 , */ 0 , mpeg3_tab_c1 }\n};\n\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/audio/layer1.c",
    "content": "/* \n *\n *  This file is part of libmpeg3\n *\t\n * LibMPEG3\n * Author: Adam Williams <broadcast@earthling.net>\n * Page: heroine.linuxbox.com\n * Page: http://www.smalltalkconsulting.com/html/mpeg3source.html (for Squeak)\n *\n    LibMPEG3 was originally licenced under GPL. It was relicensed by\n    the author under the LGPL and the Squeak license on Nov 1st, 2000\n    \n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA \n    \n    Also licensed under the Squeak license.\n    http://www.squeak.org/license.html\n */\n \n #include \"mpeg3audio.h\"\n\nint mpeg3audio_dolayer1(mpeg3audio_t *audio)\n{\n\t;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/audio/layer2.c",
    "content": "/* \n *\n *  This file is part of libmpeg3\n *\t\n * LibMPEG3\n * Author: Adam Williams <broadcast@earthling.net>\n * Page: heroine.linuxbox.com\n * Page: http://www.smalltalkconsulting.com/html/mpeg3source.html (for Squeak)\n *\n    LibMPEG3 was originally licenced under GPL. It was relicensed by\n    the author under the LGPL and the Squeak license on Nov 1st, 2000\n    \n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA \n    \n    Also licensed under the Squeak license.\n    http://www.squeak.org/license.html\n */\n \n/*\n * most other tables are calculated on program start (which is (of course)\n * not ISO-conform) .. \n * Layer-3 huffman table is in huffman.h\n */\n\n#include \"mpeg3audio.h\"\n#include \"tables.h\"\n\nstruct al_table alloc_0[] = {\n\t{4,0},{5,3},{3,-3},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},{9,-255},{10,-511},\n\t{11,-1023},{12,-2047},{13,-4095},{14,-8191},{15,-16383},{16,-32767},\n\t{4,0},{5,3},{3,-3},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},{9,-255},{10,-511},\n\t{11,-1023},{12,-2047},{13,-4095},{14,-8191},{15,-16383},{16,-32767},\n\t{4,0},{5,3},{3,-3},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},{9,-255},{10,-511},\n\t{11,-1023},{12,-2047},{13,-4095},{14,-8191},{15,-16383},{16,-32767},\n\t{4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},\n\t{9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{16,-32767},\n\t{4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},\n\t{9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{16,-32767},\n\t{4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},\n\t{9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{16,-32767},\n\t{4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},\n\t{9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{16,-32767},\n\t{4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},\n\t{9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{16,-32767},\n\t{4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},\n\t{9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{16,-32767},\n\t{4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},\n\t{9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{16,-32767},\n\t{4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},\n\t{9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{16,-32767},\n\t{3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767},\n\t{3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767},\n\t{3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767},\n\t{3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767},\n\t{3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767},\n\t{3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767},\n\t{3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767},\n\t{3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767},\n\t{3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767},\n\t{3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767},\n\t{3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767},\n\t{3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767},\n\t{2,0},{5,3},{7,5},{16,-32767},\n\t{2,0},{5,3},{7,5},{16,-32767},\n\t{2,0},{5,3},{7,5},{16,-32767},\n\t{2,0},{5,3},{7,5},{16,-32767} };\n\nstruct al_table alloc_1[] = {\n\t{4,0},{5,3},{3,-3},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},{9,-255},{10,-511},\n\t{11,-1023},{12,-2047},{13,-4095},{14,-8191},{15,-16383},{16,-32767},\n\t{4,0},{5,3},{3,-3},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},{9,-255},{10,-511},\n\t{11,-1023},{12,-2047},{13,-4095},{14,-8191},{15,-16383},{16,-32767},\n\t{4,0},{5,3},{3,-3},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},{9,-255},{10,-511},\n\t{11,-1023},{12,-2047},{13,-4095},{14,-8191},{15,-16383},{16,-32767},\n\t{4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},\n\t{9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{16,-32767},\n\t{4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},\n\t{9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{16,-32767},\n\t{4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},\n\t{9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{16,-32767},\n\t{4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},\n\t{9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{16,-32767},\n\t{4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},\n\t{9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{16,-32767},\n\t{4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},\n\t{9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{16,-32767},\n\t{4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},\n\t{9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{16,-32767},\n\t{4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},\n\t{9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{16,-32767},\n\t{3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767},\n\t{3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767},\n\t{3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767},\n\t{3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767},\n\t{3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767},\n\t{3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767},\n\t{3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767},\n\t{3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767},\n\t{3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767},\n\t{3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767},\n\t{3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767},\n\t{3,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{16,-32767},\n\t{2,0},{5,3},{7,5},{16,-32767},\n\t{2,0},{5,3},{7,5},{16,-32767},\n\t{2,0},{5,3},{7,5},{16,-32767},\n\t{2,0},{5,3},{7,5},{16,-32767},\n\t{2,0},{5,3},{7,5},{16,-32767},\n\t{2,0},{5,3},{7,5},{16,-32767},\n\t{2,0},{5,3},{7,5},{16,-32767} };\n\nstruct al_table alloc_2[] = {\n\t{4,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},{9,-255},\n\t{10,-511},{11,-1023},{12,-2047},{13,-4095},{14,-8191},{15,-16383},\n\t{4,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},{9,-255},\n\t{10,-511},{11,-1023},{12,-2047},{13,-4095},{14,-8191},{15,-16383},\n\t{3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},\n\t{3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},\n\t{3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},\n\t{3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},\n\t{3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},\n\t{3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63} };\n\nstruct al_table alloc_3[] = {\n\t{4,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},{9,-255},\n\t{10,-511},{11,-1023},{12,-2047},{13,-4095},{14,-8191},{15,-16383},\n\t{4,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},{9,-255},\n\t{10,-511},{11,-1023},{12,-2047},{13,-4095},{14,-8191},{15,-16383},\n\t{3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},\n\t{3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},\n\t{3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},\n\t{3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},\n\t{3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},\n\t{3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},\n\t{3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},\n\t{3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},\n\t{3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},\n\t{3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63} };\n\nstruct al_table alloc_4[] = {\n\t{4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},\n\t\t{9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{14,-8191},\n\t{4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},\n\t\t{9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{14,-8191},\n\t{4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},\n\t\t{9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{14,-8191},\n\t{4,0},{5,3},{7,5},{3,-3},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},{8,-127},\n\t\t{9,-255},{10,-511},{11,-1023},{12,-2047},{13,-4095},{14,-8191},\n\t{3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},\n\t{3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},\n\t{3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},\n\t{3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},\n\t{3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},\n\t{3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},\n\t{3,0},{5,3},{7,5},{10,9},{4,-7},{5,-15},{6,-31},{7,-63},\n\t{2,0},{5,3},{7,5},{10,9},\n\t{2,0},{5,3},{7,5},{10,9},\n\t{2,0},{5,3},{7,5},{10,9},\n\t{2,0},{5,3},{7,5},{10,9},\n\t{2,0},{5,3},{7,5},{10,9},\n\t{2,0},{5,3},{7,5},{10,9},\n\t{2,0},{5,3},{7,5},{10,9},\n\t{2,0},{5,3},{7,5},{10,9},\n\t{2,0},{5,3},{7,5},{10,9},\n\t{2,0},{5,3},{7,5},{10,9},\n\t{2,0},{5,3},{7,5},{10,9},\n    {2,0},{5,3},{7,5},{10,9},\n    {2,0},{5,3},{7,5},{10,9},\n    {2,0},{5,3},{7,5},{10,9},\n    {2,0},{5,3},{7,5},{10,9},\n    {2,0},{5,3},{7,5},{10,9},\n    {2,0},{5,3},{7,5},{10,9},\n    {2,0},{5,3},{7,5},{10,9},\n    {2,0},{5,3},{7,5},{10,9}  };\n\n\nint mpeg3audio_II_select_table(mpeg3audio_t *audio)\n{\n  \tstatic int translate[3][2][16] =\n\t   {{{ 0,2,2,2,2,2,2,0,0,0,1,1,1,1,1,0},\n    \t { 0,2,2,0,0,0,1,1,1,1,1,1,1,1,1,0}},\n    \t{{ 0,2,2,2,2,2,2,0,0,0,0,0,0,0,0,0},\n    \t { 0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0}},\n    \t{{ 0,3,3,3,3,3,3,0,0,0,1,1,1,1,1,0},\n    \t { 0,3,3,0,0,0,1,1,1,1,1,1,1,1,1,0}}};\n  \tint table, sblim;\n  \tstatic struct al_table *tables[5] =\n       \t{alloc_0, alloc_1, alloc_2, alloc_3, alloc_4};\n  \tstatic int sblims[5] = {27, 30, 8, 12, 30};\n\n  \tif(audio->lsf) \n\t\ttable = 4;\n  \telse\n    \ttable = translate[audio->sampling_frequency_code][2 - audio->channels][audio->bitrate_index];\n  \tsblim = sblims[table];\n\n\taudio->alloc = tables[table];\n\taudio->II_sblimit = sblim;\n\treturn 0;\n}\n\nint mpeg3audio_II_step_one(mpeg3audio_t *audio, unsigned int *bit_alloc, int *scale)\n{\n    int stereo = audio->channels - 1;\n    int sblimit = audio->II_sblimit;\n    int jsbound = audio->jsbound;\n    int sblimit2 = audio->II_sblimit << stereo;\n    struct al_table *alloc1 = audio->alloc;\n    int i, result = 0;\n    unsigned int *scfsi_buf = audio->layer2_scfsi_buf;\n    unsigned int *scfsi, *bita;\n    int sc, step;\n\n    bita = bit_alloc;\n    if(stereo)\n    {\n/* Stereo */\n    \tfor(i = jsbound;i ; i--, alloc1 += (1 << step))\n    \t{\n        \t*bita++ = (char)mpeg3bits_getbits(audio->astream, step = alloc1->bits);\n        \t*bita++ = (char)mpeg3bits_getbits(audio->astream, step);\n    \t}\n    \tfor(i = sblimit-jsbound; i; i--, alloc1 += (1 << step))\n    \t{\n        \tbita[0] = (char)mpeg3bits_getbits(audio->astream, step = alloc1->bits);\n        \tbita[1] = bita[0];\n        \tbita += 2;\n    \t}\n    \tbita = bit_alloc;\n    \tscfsi = scfsi_buf;\n    \tfor(i = sblimit2; i; i--)\n        \tif(*bita++) *scfsi++ = (char)mpeg3bits_getbits(audio->astream, 2);\n    }\n    else \n    {\n/* mono */\n      \tfor(i = sblimit; i; i--, alloc1 += (1 << step))\n        *bita++ = (char)mpeg3bits_getbits(audio->astream, step = alloc1->bits);\n      \tbita = bit_alloc;\n      \tscfsi = scfsi_buf;\n      \tfor(i = sblimit; i; i--) if (*bita++) *scfsi++ = (char)mpeg3bits_getbits(audio->astream, 2);\n    }\n\n    bita = bit_alloc;\n    scfsi = scfsi_buf;\n    for(i = sblimit2; i; i--) \n\t{\n      \tif(*bita++)\n        \tswitch(*scfsi++) \n        \t{\n        \t  case 0: \n                \t*scale++ = mpeg3bits_getbits(audio->astream, 6);\n                \t*scale++ = mpeg3bits_getbits(audio->astream, 6);\n                \t*scale++ = mpeg3bits_getbits(audio->astream, 6);\n                \tbreak;\n        \t  case 1 : \n                \t*scale++ = sc = mpeg3bits_getbits(audio->astream, 6);\n                \t*scale++ = sc;\n                \t*scale++ = mpeg3bits_getbits(audio->astream, 6);\n                \tbreak;\n        \t  case 2: \n                \t*scale++ = sc = mpeg3bits_getbits(audio->astream, 6);\n                \t*scale++ = sc;\n                \t*scale++ = sc;\n                \tbreak;\n        \t  default:              /* case 3 */\n                \t*scale++ = mpeg3bits_getbits(audio->astream, 6);\n                \t*scale++ = sc = mpeg3bits_getbits(audio->astream, 6);\n                \t*scale++ = sc;\n                \tbreak;\n        \t}\n\t}\n\treturn result | mpeg3bits_error(audio->astream);\n}\n\nint mpeg3audio_II_step_two(mpeg3audio_t *audio, unsigned int *bit_alloc, float fraction[2][4][SBLIMIT], int *scale, int x1)\n{\n    int i, j, k, ba, result = 0;\n    int channels = audio->channels;\n    int sblimit = audio->II_sblimit;\n    int jsbound = audio->jsbound;\n    struct al_table *alloc2, *alloc1 = audio->alloc;\n    unsigned int *bita = bit_alloc;\n    int d1, step, test;\n\n    for(i = 0; i < jsbound; i++, alloc1 += (1 << step))\n    {\n    \tstep = alloc1->bits;\n    \tfor(j = 0; j < channels; j++)\n    \t{\n        \tif(ba = *bita++)\n        \t{\n        \t\tk = (alloc2 = alloc1 + ba)->bits;\n        \t\tif((d1 = alloc2->d) < 0) \n        \t\t{\n            \t\tfloat cm = mpeg3_muls[k][scale[x1]];\n\n            \t\tfraction[j][0][i] = ((float)((int)mpeg3bits_getbits(audio->astream, k) + d1)) * cm;\n            \t\tfraction[j][1][i] = ((float)((int)mpeg3bits_getbits(audio->astream, k) + d1)) * cm;\n            \t\tfraction[j][2][i] = ((float)((int)mpeg3bits_getbits(audio->astream, k) + d1)) * cm;\n        \t\t}\n        \t\telse \n        \t\t{\n            \t\tstatic int *table[] = \n\t\t\t\t\t\t{0, 0, 0, mpeg3_grp_3tab, 0, mpeg3_grp_5tab, 0, 0, 0, mpeg3_grp_9tab};\n            \t\tunsigned int idx, *tab, m = scale[x1];\n\t\t\t\t\t\n            \t\tidx = (unsigned int)mpeg3bits_getbits(audio->astream, k);\n            \t\ttab = (unsigned int*)(table[d1] + idx + idx + idx);\n            \t\tfraction[j][0][i] = mpeg3_muls[*tab++][m];\n            \t\tfraction[j][1][i] = mpeg3_muls[*tab++][m];\n            \t\tfraction[j][2][i] = mpeg3_muls[*tab][m];  \n        \t\t}\n        \t\tscale += 3;\n        \t}\n          \telse\n        \t\tfraction[j][0][i] = fraction[j][1][i] = fraction[j][2][i] = 0.0;\n    \t}\n    }\n\n    for(i = jsbound; i < sblimit; i++, alloc1 += (1 << step))\n    {\n    \tstep = alloc1->bits;\n/* channel 1 and channel 2 bitalloc are the same */\n    \tbita++;\t\t\n    \tif((ba = *bita++))\n    \t{\n        \tk=(alloc2 = alloc1+ba)->bits;\n        \tif((d1 = alloc2->d) < 0)\n        \t{\n        \t\tfloat cm;\n\t\t\t\t\n        \t\tcm = mpeg3_muls[k][scale[x1 + 3]];\n        \t\tfraction[1][0][i] = (fraction[0][0][i] = (float)((int)mpeg3bits_getbits(audio->astream, k) + d1)) * cm;\n        \t\tfraction[1][1][i] = (fraction[0][1][i] = (float)((int)mpeg3bits_getbits(audio->astream, k) + d1)) * cm;\n        \t\tfraction[1][2][i] = (fraction[0][2][i] = (float)((int)mpeg3bits_getbits(audio->astream, k) + d1)) * cm;\n        \t\tcm = mpeg3_muls[k][scale[x1]];\n        \t\tfraction[0][0][i] *= cm; \n\t\t\t\tfraction[0][1][i] *= cm; \n\t\t\t\tfraction[0][2][i] *= cm;\n        \t}\n        \telse\n        \t{\n        \t  static int *table[] = {0, 0, 0, mpeg3_grp_3tab, 0, mpeg3_grp_5tab, 0, 0, 0, mpeg3_grp_9tab};\n        \t  unsigned int idx, *tab, m1, m2;\n\t\t\t  \n        \t  m1 = scale[x1]; \n\t\t\t  m2 = scale[x1+3];\n        \t  idx = (unsigned int)mpeg3bits_getbits(audio->astream, k);\n        \t  tab = (unsigned int*)(table[d1] + idx + idx + idx);\n        \t  fraction[0][0][i] = mpeg3_muls[*tab][m1]; \n\t\t\t  fraction[1][0][i] = mpeg3_muls[*tab++][m2];\n        \t  fraction[0][1][i] = mpeg3_muls[*tab][m1]; \n\t\t\t  fraction[1][1][i] = mpeg3_muls[*tab++][m2];\n        \t  fraction[0][2][i] = mpeg3_muls[*tab][m1]; \n\t\t\t  fraction[1][2][i] = mpeg3_muls[*tab][m2];\n        \t}\n        \tscale += 6;\n      \t}\n    \telse \n\t\t{\n        \tfraction[0][0][i] = fraction[0][1][i] = fraction[0][2][i] =\n        \tfraction[1][0][i] = fraction[1][1][i] = fraction[1][2][i] = 0.0;\n    \t}\n/* \n   should we use individual scalefac for channel 2 or\n   is the current way the right one , where we just copy channel 1 to\n   channel 2 ?? \n   The current 'strange' thing is, that we throw away the scalefac\n   values for the second channel ...!!\n-> changed .. now we use the scalefac values of channel one !! \n*/\n    }\n\n    if(sblimit > SBLIMIT) sblimit = SBLIMIT;\n\n    for(i = sblimit; i < SBLIMIT; i++)\n      \tfor(j = 0; j < channels; j++)\n        \tfraction[j][0][i] = fraction[j][1][i] = fraction[j][2][i] = 0.0;\n\n\treturn result | mpeg3bits_error(audio->astream);\n}\n\nint mpeg3audio_dolayer2(mpeg3audio_t *audio)\n{\n\tint i, j, result = 0;\n\tint channels = audio->channels;\n\tfloat fraction[2][4][SBLIMIT]; /* pick_table clears unused subbands */\n\tunsigned int bit_alloc[64];\n\tint scale[192];\n\tint single = audio->single;\n\n \tif(audio->error_protection)\n\t\tmpeg3bits_getbits(audio->astream, 16);\n\n\tmpeg3audio_II_select_table(audio);\n\n  \taudio->jsbound = (audio->mode == MPG_MD_JOINT_STEREO) ?\n     \t(audio->mode_ext << 2) + 4 : audio->II_sblimit;\n\n  \tif(channels == 1 || single == 3)\n    \tsingle = 0;\n\n  \tresult |= mpeg3audio_II_step_one(audio, bit_alloc, scale);\n\n\tfor(i = 0; i < SCALE_BLOCK && !result; i++)\n\t{\n    \tresult |= mpeg3audio_II_step_two(audio, bit_alloc, fraction, scale, i >> 2);\n\n    \tfor(j = 0; j < 3; j++) \n    \t{\n    \t\tif(single >= 0)\n    \t\t{\n/* Monaural */\n        \t\tmpeg3audio_synth_mono(audio, fraction[single][j], audio->pcm_sample, &(audio->pcm_point));\n    \t\t}\n    \t\telse \n\t\t\t{\n/* Stereo */\n        \t\tint p1 = audio->pcm_point;\n        \t\tmpeg3audio_synth_stereo(audio, fraction[0][j], 0, audio->pcm_sample, &p1);\n        \t\tmpeg3audio_synth_stereo(audio, fraction[1][j], 1, audio->pcm_sample, &(audio->pcm_point));\n    \t\t}\n\n    \t\tif(audio->pcm_point / audio->channels >= audio->pcm_allocated - MPEG3AUDIO_PADDING * audio->channels)\n\t\t\t{\n/* Need more room */\n\t\t\t\tmpeg3audio_replace_buffer(audio, audio->pcm_allocated + MPEG3AUDIO_PADDING * audio->channels);\n\t\t\t}\n    \t}\n\t}\n\n\n  \treturn result;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/audio/layer3.c",
    "content": "/* \n *\n *  This file is part of libmpeg3\n *\t\n * LibMPEG3\n * Author: Adam Williams <broadcast@earthling.net>\n * Page: heroine.linuxbox.com\n * Page: http://www.smalltalkconsulting.com/html/mpeg3source.html (for Squeak)\n *\n    LibMPEG3 was originally licenced under GPL. It was relicensed by\n    the author under the LGPL and the Squeak license on Nov 1st, 2000\n    \n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA \n    \n    Also licensed under the Squeak license.\n    http://www.squeak.org/license.html\n */\n \n#include \"huffman.h\"\n#include \"mpeg3audio.h\"\n#include \"tables.h\"\n\n#include <stdio.h>\n#include <string.h>\n\nstruct gr_info_s {\n      int scfsi;\n      unsigned part2_3_length;\n      unsigned big_values;\n      unsigned scalefac_compress;\n      unsigned block_type;\n      unsigned mixed_block_flag;\n      unsigned table_select[3];\n      unsigned subblock_gain[3];\n      unsigned maxband[3];\n      unsigned maxbandl;\n      unsigned maxb;\n      unsigned region1start;\n      unsigned region2start;\n      unsigned preflag;\n      unsigned scalefac_scale;\n      unsigned count1table_select;\n      float *full_gain[3];\n      float *pow2gain;\n};\n\nstruct mpeg3_III_sideinfo\n{\n\tunsigned main_data_begin;\n\tunsigned private_bits;\n\tstruct \n\t{\n    \tstruct gr_info_s gr[2];\n\t} ch[2];\n};\n\nint mpeg3audio_III_get_scale_factors_1(mpeg3audio_t *audio,\n\t\tint *scf, \n\t\tstruct gr_info_s *gr_info, \n\t\tint ch, \n\t\tint gr)\n{\n\tstatic unsigned char slen[2][16] = \n\t\t{{0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4},\n\t\t {0, 1, 2, 3, 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 2, 3}};\n\tint numbits;\n\tint num0 = slen[0][gr_info->scalefac_compress];\n\tint num1 = slen[1][gr_info->scalefac_compress];\n\n    if (gr_info->block_type == 2) \n\t{\n\t\tint i = 18;\n\t\tnumbits = (num0 + num1) * 18;\n\n\t\tif (gr_info->mixed_block_flag) \n\t\t{\n\t\t\tfor(i = 8; i; i--)\n\t\t\t\t*scf++ = mpeg3bits_getbits(audio->astream, num0);\n\t\t\ti = 9;\n/* num0 * 17 + num1 * 18 */\n\t\t\tnumbits -= num0; \n\t\t}\n\n\t\tfor( ; i; i--)\n\t\t\t*scf++ = mpeg3bits_getbits(audio->astream, num0);\n\t\tfor(i = 18; i; i--)\n\t\t\t*scf++ = mpeg3bits_getbits(audio->astream, num1);\n/* short[13][0..2] = 0 */\n\t\t*scf++ = 0; \n\t\t*scf++ = 0; \n\t\t*scf++ = 0; \n    }\n    else \n\t{\n    \tint i;\n    \tint scfsi = gr_info->scfsi;\n\n    \tif(scfsi < 0)\n\t\t{ \n/* scfsi < 0 => granule == 0 */\n\t\t\tfor(i = 11; i; i--)\n\t\t\t{\n\t\t\t\t*scf++ = mpeg3bits_getbits(audio->astream, num0);\n\t\t\t}\n\t\t\tfor(i = 10; i; i--)\n\t\t\t\t*scf++ = mpeg3bits_getbits(audio->astream, num1);\n\t\t\tnumbits = (num0 + num1) * 10 + num0;\n\t\t\t*scf++ = 0;\n    \t}\n    \telse \n\t\t{\n    \t\tnumbits = 0;\n    \t\tif(!(scfsi & 0x8)) \n\t\t\t{\n        \t\tfor(i = 0; i < 6; i++)\n\t\t\t\t{\n        \t\t\t*scf++ = mpeg3bits_getbits(audio->astream, num0);\n\t\t\t\t}\n        \t\tnumbits += num0 * 6;\n    \t\t}\n    \t\telse \n\t\t\t{\n        \t\tscf += 6; \n    \t\t}\n\n    \t\tif(!(scfsi & 0x4)) \n\t\t\t{\n        \t\tfor(i = 0; i < 5; i++)\n        \t\t  *scf++ = mpeg3bits_getbits(audio->astream, num0);\n        \t\tnumbits += num0 * 5;\n    \t\t}\n    \t\telse \n\t\t\t{\n\t\t\t\tscf += 5;\n    \t\t}\n\n    \t\tif(!(scfsi & 0x2)) \n\t\t\t{\n        \t    for(i = 0; i < 5; i++)\n        \t\t\t*scf++ = mpeg3bits_getbits(audio->astream, num1);\n        \t    numbits += num1 * 5;\n    \t\t}\n    \t\telse \n\t\t\t{\n        \t    scf += 5; \n    \t\t}\n\n    \t\tif(!(scfsi & 0x1)) \n\t\t\t{\n        \t    for(i = 0; i < 5; i++)\n        \t\t\t*scf++ = mpeg3bits_getbits(audio->astream, num1);\n        \t    numbits += num1 * 5;\n    \t\t}\n    \t\telse \n\t\t\t{\n        \t    scf += 5;\n    \t\t}\n    \t\t*scf++ = 0;  /* no l[21] in original sources */\n    \t}\n    }\n    return numbits;\n}\n\nint mpeg3audio_III_get_scale_factors_2(mpeg3audio_t *audio,\n\t\tint *scf,\n\t\tstruct gr_info_s *gr_info,\n\t\tint i_stereo)\n{\n\tunsigned char *pnt;\n\tint i, j, n = 0, numbits = 0;\n\tunsigned int slen;\n\tstatic unsigned char stab[3][6][4] = \n\t{{{ 6, 5, 5,5 }, { 6, 5, 7,3 }, { 11,10,0,0},\n      { 7, 7, 7,0 }, { 6, 6, 6,3 }, {  8, 8,5,0}},\n\t {{ 9, 9, 9,9 }, { 9, 9,12,6 }, { 18,18,0,0},\n      {12,12,12,0 }, {12, 9, 9,6 }, { 15,12,9,0}},\n\t {{ 6, 9, 9,9 }, { 6, 9,12,6 }, { 15,18,0,0},\n      { 6,15,12,0 }, { 6,12, 9,6 }, {  6,18,9,0}}}; \n\n/* i_stereo AND second channel -> do_layer3() checks this */\n\tif(i_stereo) \n      \tslen = mpeg3_i_slen2[gr_info->scalefac_compress >> 1];\n\telse\n      \tslen = mpeg3_n_slen2[gr_info->scalefac_compress];\n\n  \tgr_info->preflag = (slen >> 15) & 0x1;\n\n\tn = 0;  \n\tif(gr_info->block_type == 2 ) \n\t{\n    \tn++;\n    \tif(gr_info->mixed_block_flag)\n    \t  \tn++;\n\t}\n\n\tpnt = stab[n][(slen >> 12) & 0x7];\n\n\tfor(i = 0; i < 4; i++)\n\t{\n    \tint num = slen & 0x7;\n    \tslen >>= 3;\n    \tif(num) \n\t\t{\n    \t\tfor(j = 0; j < (int)(pnt[i]); j++)\n        \t    *scf++ = mpeg3bits_getbits(audio->astream, num);\n    \t\tnumbits += pnt[i] * num;\n    \t}\n    \telse \n\t\t{\n    \t    for(j = 0; j < (int)(pnt[i]); j++)\n        \t\t*scf++ = 0;\n    \t}\n\t}\n  \n\tn = (n << 1) + 1;\n\tfor(i = 0; i < n; i++)\n\t\t*scf++ = 0;\n\n  \treturn numbits;\n}\n\nstatic int pretab1[22] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,2,3,3,3,2,0};\nstatic int pretab2[22] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};\n\n/*\n * Dequantize samples (includes huffman decoding)\n *\n * 24 is enough because tab13 has max. a 19 bit huffvector\n */\n\n#define BITSHIFT ((sizeof(long) - 1) * 8)\n#define REFRESH_MASK \\\n\twhile(num < BITSHIFT) \\\n\t{ \\\n\t\tmask |= mpeg3bits_getbits(audio->astream, 8) << (BITSHIFT - num); \\\n\t\tnum += 8; \\\n\t\tpart2remain -= 8; \\\n\t}\n\nint mpeg3audio_III_dequantize_sample(mpeg3audio_t *audio,\n\t\tfloat xr[SBLIMIT][SSLIMIT],\n\t\tint *scf,\n   \t\tstruct gr_info_s *gr_info,\n\t\tint sfreq,\n\t\tint part2bits)\n{\n\tint shift = 1 + gr_info->scalefac_scale;\n\tfloat *xrpnt = (float*)xr;\n\tint l[3],l3;\n\tint part2remain = gr_info->part2_3_length - part2bits;\n\tint *me;\n\tint num = mpeg3bits_getbitoffset(audio->astream);\n\tlong mask = mpeg3bits_getbits(audio->astream, num);\n//printf(\"III_dequantize_sample 1 %08x %d\\n\", mask, num);\n\tmask = mask << (BITSHIFT + 8 - num);\n\tpart2remain -= num;\n\n  \t{\n    \tint bv       = gr_info->big_values;\n    \tint region1  = gr_info->region1start;\n    \tint region2  = gr_info->region2start;\n\n    \tl3 = ((576 >> 1) - bv) >> 1;   \n\n/*\n * we may lose the 'odd' bit here !! \n * check this later again \n */\n\n    \tif(bv <= region1) \n\t\t{\n    \t    l[0] = bv; \n\t\t\tl[1] = 0; \n\t\t\tl[2] = 0;\n    \t}\n    \telse \n\t\t{\n    \t\tl[0] = region1;\n    \t\tif(bv <= region2) \n\t\t\t{\n        \t    l[1] = bv - l[0];  l[2] = 0;\n    \t\t}\n    \t\telse \n\t\t\t{\n        \t    l[1] = region2 - l[0]; \n\t\t\t\tl[2] = bv - region2;\n    \t\t}\n    \t}\n\t}\n \n  \tif(gr_info->block_type == 2) \n\t{\n/*\n * decoding with short or mixed mode BandIndex table \n */\n    \tint i, max[4];\n    \tint step = 0, lwin = 3, cb = 0;\n    \tregister float v = 0.0;\n    \tregister int *m, mc;\n\n    \tif(gr_info->mixed_block_flag) \n\t\t{\n    \t\tmax[3] = -1;\n    \t\tmax[0] = max[1] = max[2] = 2;\n    \t\tm = mpeg3_map[sfreq][0];\n    \t\tme = mpeg3_mapend[sfreq][0];\n    \t}\n    \telse \n\t\t{\n    \t\tmax[0] = max[1] = max[2] = max[3] = -1;\n/* max[3] not floatly needed in this case */\n    \t\tm = mpeg3_map[sfreq][1];\n    \t\tme = mpeg3_mapend[sfreq][1];\n    \t}\n\n\t\tmc = 0;\n\t\tfor(i = 0; i < 2; i++) \n\t\t{\n\t\t\tint lp = l[i];\n\t\t\tstruct newhuff *h = mpeg3_ht + gr_info->table_select[i];\n\t\t\tfor( ; lp; lp--, mc--) \n\t\t\t{\n    \t\t\tregister int x,y;\n    \t\t\tif(!mc) \n\t\t\t\t{\n    \t\t\t\tmc    = *m++;\n    \t\t\t\txrpnt = ((float*)xr) + (*m++);\n    \t\t\t\tlwin  = *m++;\n    \t\t\t\tcb    = *m++;\n    \t\t\t\tif(lwin == 3) \n\t\t\t\t\t{\n        \t\t\t\tv = gr_info->pow2gain[(*scf++) << shift];\n        \t\t\t\tstep = 1;\n    \t\t\t\t}\n    \t\t\t\telse \n\t\t\t\t\t{\n        \t\t\t\tv = gr_info->full_gain[lwin][(*scf++) << shift];\n        \t\t\t\tstep = 3;\n    \t\t\t\t}\n    \t\t\t}\n\n        \t\t{\n        \t\t\tregister short *val = h->table;\n        \t\t\tREFRESH_MASK;\n        \t\t\twhile((y = *val++) < 0) \n\t\t\t\t\t{\n            \t\t\tif (mask < 0)\n            \t\t\t\tval -= y;\n            \t\t\tnum--;\n            \t\t\tmask <<= 1;\n        \t\t\t}\n        \t\t\tx = y >> 4;\n        \t\t\ty &= 0xf;\n        \t\t}\n\n        \t\tif(x == 15 && h->linbits) \n\t\t\t\t{\n        \t\t\tmax[lwin] = cb;\n        \t\t\tREFRESH_MASK;\n        \t\t\tx += ((unsigned long)mask) >> (BITSHIFT + 8 - h->linbits);\n        \t\t\tnum -= h->linbits + 1;\n        \t\t\tmask <<= h->linbits;\n        \t\t\tif(mask < 0)\n            \t\t\t*xrpnt = -mpeg3_ispow[x] * v;\n        \t\t\telse\n            \t\t\t*xrpnt =  mpeg3_ispow[x] * v;\n        \t\t\tmask <<= 1;\n        \t\t}\n        \t\telse \n\t\t\t\tif(x) \n\t\t\t\t{\n        \t\t\tmax[lwin] = cb;\n        \t\t\tif(mask < 0)\n            \t\t\t*xrpnt = -mpeg3_ispow[x] * v;\n        \t\t\telse\n            \t\t\t*xrpnt =  mpeg3_ispow[x] * v;\n        \t\t\tnum--;\n        \t\t\tmask <<= 1;\n        \t\t}\n        \t\telse\n        \t\t\t*xrpnt = 0.0;\n\n        \t\txrpnt += step;\n        \t\tif(y == 15 && h->linbits) \n\t\t\t\t{\n        \t\t\tmax[lwin] = cb;\n        \t\t\tREFRESH_MASK;\n        \t\t\ty += ((unsigned long) mask) >> (BITSHIFT + 8 - h->linbits);\n        \t\t\tnum -= h->linbits + 1;\n        \t\t\tmask <<= h->linbits;\n        \t\t\tif(mask < 0)\n            \t\t\t*xrpnt = -mpeg3_ispow[y] * v;\n        \t\t\telse\n            \t\t\t*xrpnt =  mpeg3_ispow[y] * v;\n        \t\t\tmask <<= 1;\n        \t\t}\n        \t\telse \n\t\t\t\tif(y) \n\t\t\t\t{\n        \t\t\tmax[lwin] = cb;\n        \t\t\tif(mask < 0)\n            \t\t\t*xrpnt = -mpeg3_ispow[y] * v;\n        \t\t\telse\n            \t\t\t*xrpnt =  mpeg3_ispow[y] * v;\n        \t\t\tnum--;\n        \t\t\tmask <<= 1;\n        \t\t}\n        \t\telse\n        \t\t\t*xrpnt = 0.0;\n        \t\txrpnt += step;\n    \t\t}\n    \t}\n\n    \tfor( ;l3 && (part2remain + num > 0); l3--) \n\t\t{\n    \t\tstruct newhuff *h = mpeg3_htc + gr_info->count1table_select;\n    \t\tregister short *val = h->table, a;\n\n    \t\tREFRESH_MASK;\n    \t\twhile((a = *val++) < 0) \n\t\t\t{\n        \t\tif (mask < 0)\n        \t\t\tval -= a;\n        \t\tnum--;\n        \t\tmask <<= 1;\n    \t\t}\n\t        if(part2remain + num <= 0) \n\t\t\t{\n\t\t\t\tnum -= part2remain + num;\n\t\t\t\tbreak;\n      \t\t}\n\n    \t\tfor(i = 0; i < 4; i++) \n\t\t\t{\n        \t\tif(!(i & 1)) \n\t\t\t\t{\n        \t\t\tif(!mc) \n\t\t\t\t\t{\n            \t\t\tmc = *m++;\n            \t\t\txrpnt = ((float*)xr) + (*m++);\n            \t\t\tlwin = *m++;\n            \t\t\tcb = *m++;\n            \t\t\tif(lwin == 3) \n\t\t\t\t\t\t{\n            \t\t\t\tv = gr_info->pow2gain[(*scf++) << shift];\n            \t\t\t\tstep = 1;\n            \t\t\t}\n            \t\t\telse \n\t\t\t\t\t\t{\n            \t\t\t\tv = gr_info->full_gain[lwin][(*scf++) << shift];\n            \t\t\t\tstep = 3;\n            \t\t\t}\n        \t\t\t}\n        \t\t\tmc--;\n        \t\t}\n        \t\tif((a & (0x8 >> i))) \n\t\t\t\t{\n        \t\t\tmax[lwin] = cb;\n        \t\t\tif(part2remain + num <= 0) \n\t\t\t\t\t{\n            \t\t\tbreak;\n        \t\t\t}\n        \t\t\tif(mask < 0) \n            \t\t\t*xrpnt = -v;\n        \t\t\telse\n            \t\t\t*xrpnt = v;\n        \t\t\tnum--;\n        \t\t\tmask <<= 1;\n        \t\t}\n        \t\telse\n        \t\t  *xrpnt = 0.0;\n        \t\txrpnt += step;\n    \t\t}\n    \t}\n\n    \tif(lwin < 3) \n\t\t{ \n/* short band? */\n    \t\twhile(1) \n\t\t\t{\n        \t\tfor( ;mc > 0; mc--) \n\t\t\t\t{\n/* short band -> step=3 */\n        \t\t\t*xrpnt = 0.0; \n\t\t\t\t\txrpnt += 3; \n        \t\t\t*xrpnt = 0.0; \n\t\t\t\t\txrpnt += 3;\n        \t\t}\n        \t\tif(m >= me)\n        \t\t\tbreak;\n        \t\tmc    = *m++;\n        \t\txrpnt = ((float*)xr) + *m++;\n/* optimize: field will be set to zero at the end of the function */\n        \t\tif(*m++ == 0)\n        \t\t\tbreak; \n/* cb */\n        \t\tm++; \n    \t\t}\n    \t}\n\n    \tgr_info->maxband[0] = max[0] + 1;\n    \tgr_info->maxband[1] = max[1] + 1;\n    \tgr_info->maxband[2] = max[2] + 1;\n    \tgr_info->maxbandl = max[3] + 1;\n\n    \t{\n    \t\tint rmax = max[0] > max[1] ? max[0] : max[1];\n    \t\trmax = (rmax > max[2] ? rmax : max[2]) + 1;\n    \t\tgr_info->maxb = rmax ? mpeg3_shortLimit[sfreq][rmax] : mpeg3_longLimit[sfreq][max[3] + 1];\n    \t}\n\n\t}\n\telse \n\t{\n/*\n * decoding with 'long' BandIndex table (block_type != 2)\n */\n    \tint *pretab = gr_info->preflag ? pretab1 : pretab2;\n    \tint i, max = -1;\n    \tint cb = 0;\n    \tint *m = mpeg3_map[sfreq][2];\n    \tregister float v = 0.0;\n    \tint mc = 0;\n\n/*\n * long hash table values\n */\n    \tfor(i = 0; i < 3; i++) \n\t\t{\n    \t\tint lp = l[i];\n    \t\tstruct newhuff *h = mpeg3_ht + gr_info->table_select[i];\n\n    \t\tfor(; lp; lp--, mc--) \n\t\t\t{\n        \t\tint x, y;\n\n\t\t\t\tif(!mc) \n\t\t\t\t{\n\t\t\t\t\tmc = *m++;\n\t\t\t\t\tcb = *m++;\n\t\t\t\t\tif(cb == 21)\n    \t\t\t\t  \tv = 0.0;\n\t\t\t\t\telse\n    \t\t\t\t  \tv = gr_info->pow2gain[((*scf++) + (*pretab++)) << shift];\n\t\t\t\t}\n    \t\t\t{\n    \t\t\t\tregister short *val = h->table;\n    \t\t\t\tREFRESH_MASK;\n    \t\t\t\twhile((y = *val++) < 0) \n\t\t\t\t\t{\n        \t\t\t\tif(mask < 0)\n        \t\t\t\t\tval -= y;\n        \t\t\t\tnum--;\n        \t\t\t\tmask <<= 1;\n    \t\t\t\t}\n    \t\t\t\tx = y >> 4;\n    \t\t\t\ty &= 0xf;\n    \t\t\t}\n\n        \t\tif(x == 15 && h->linbits) \n\t\t\t\t{\n        \t\t\tmax = cb;\n\t\t\t\t\tREFRESH_MASK;\n        \t\t\tx += ((unsigned long) mask) >> (BITSHIFT + 8 - h->linbits);\n        \t\t\tnum -= h->linbits + 1;\n        \t\t\tmask <<= h->linbits;\n        \t\t\tif(mask < 0)\n            \t\t\t*xrpnt++ = -mpeg3_ispow[x] * v;\n        \t\t\telse\n            \t\t\t*xrpnt++ =  mpeg3_ispow[x] * v;\n        \t\t\tmask <<= 1;\n        \t\t}\n        \t\telse \n\t\t\t\tif(x) \n\t\t\t\t{\n        \t\t\tmax = cb;\n        \t\t\tif(mask < 0)\n            \t\t\t*xrpnt++ = -mpeg3_ispow[x] * v;\n        \t\t\telse\n            \t\t\t*xrpnt++ =  mpeg3_ispow[x] * v;\n        \t\t\tnum--;\n        \t\t\tmask <<= 1;\n        \t\t}\n        \t\telse\n        \t\t\t*xrpnt++ = 0.0;\n\n       \t\t\tif(y == 15 && h->linbits) \n\t\t\t\t{\n        \t\t\tmax = cb;\n\t\t\t\t\tREFRESH_MASK;\n        \t\t\ty += ((unsigned long) mask) >> (BITSHIFT + 8 - h->linbits);\n        \t\t\tnum -= h->linbits + 1;\n        \t\t\tmask <<= h->linbits;\n        \t\t\tif(mask < 0)\n            \t\t\t*xrpnt++ = -mpeg3_ispow[y] * v;\n        \t\t\telse\n            \t\t\t*xrpnt++ =  mpeg3_ispow[y] * v;\n        \t\t\tmask <<= 1;\n        \t\t}\n        \t\telse \n\t\t\t\tif(y) \n\t\t\t\t{\n        \t\t  max = cb;\n        \t\t  if(mask < 0)\n            \t\t  *xrpnt++ = -mpeg3_ispow[y] * v;\n        \t\t  else\n            \t\t  *xrpnt++ =  mpeg3_ispow[y] * v;\n        \t\t  num--;\n        \t\t  mask <<= 1;\n        \t\t}\n        \t\telse\n        \t\t\t*xrpnt++ = 0.0;\n    \t\t}\n    \t}\n\n/*\n * short (count1table) values\n */\n    \tfor( ; l3 && (part2remain + num > 0); l3--) \n\t\t{\n    \t\tstruct newhuff *h = mpeg3_htc + gr_info->count1table_select;\n    \t\tregister short *val = h->table, a;\n\n    \t\tREFRESH_MASK;\n    \t\twhile((a = *val++) < 0) \n\t\t\t{\n        \t\tif(mask < 0)\n        \t\t\tval -= a;\n        \t\tnum--;\n        \t\tmask <<= 1;\n    \t\t}\n    \t\tif(part2remain + num <= 0) \n\t\t\t{\n\t\t\t\tnum -= part2remain + num;\n        \t\tbreak;\n    \t\t}\n\n    \t\tfor(i = 0; i < 4; i++) \n\t\t\t{\n        \t\tif(!(i & 1)) \n\t\t\t\t{\n        \t\t\tif(!mc) \n\t\t\t\t\t{\n            \t\t\tmc = *m++;\n            \t\t\tcb = *m++;\n            \t\t\tif(cb == 21)\n            \t\t    \tv = 0.0;\n            \t\t\telse\n            \t\t\t\tv = gr_info->pow2gain[((*scf++) + (*pretab++)) << shift];\n        \t\t\t}\n        \t\t\tmc--;\n        \t\t}\n        \t\tif((a & (0x8 >> i)))\n\t\t\t\t{\n        \t\t\tmax = cb;\n        \t\t\tif(part2remain + num <= 0) \n\t\t\t\t\t{\n            \t\t\tbreak;\n        \t\t\t}\n        \t\t\tif(mask < 0)\n            \t\t\t*xrpnt++ = -v;\n        \t\t\telse\n            \t\t\t*xrpnt++ = v;\n        \t\t\tnum--;\n        \t\t\tmask <<= 1;\n        \t\t}\n        \t\telse\n        \t\t\t*xrpnt++ = 0.0;\n    \t\t}\n    \t}\n\n    \tgr_info->maxbandl = max + 1;\n    \tgr_info->maxb = mpeg3_longLimit[sfreq][gr_info->maxbandl];\n\t}\n\n\tpart2remain += num;\n\n//printf(\"III_dequantize_sample 2 %d %04x\\n\", num, mpeg3bits_showbits(audio->astream, 16));\n\tmpeg3bits_start_reverse(audio->astream);\n\tmpeg3bits_getbits_reverse(audio->astream, num);\n\tmpeg3bits_start_forward(audio->astream);\n//printf(\"III_dequantize_sample 3 %d %04x\\n\", audio->astream->bit_number, mpeg3bits_showbits(audio->astream, 16));\n\tnum = 0;\n\n\twhile(xrpnt < &xr[SBLIMIT][0]) \n      \t*xrpnt++ = 0.0;\n\n\twhile(part2remain > 16)\n\t{\n    \tmpeg3bits_getbits(audio->astream, 16); /* Dismiss stuffing Bits */\n    \tpart2remain -= 16;\n\t}\n\tif(part2remain > 0)\n\t{\n      \tmpeg3bits_getbits(audio->astream, part2remain);\n\t}\n\telse \n\tif(part2remain < 0) \n\t{\n      \tfprintf(stderr,\"mpeg3audio_III_dequantize_sample: Can't rewind stream %d bits!\\n\", -part2remain);\n      \treturn 1; /* -> error */\n\t}\n\treturn 0;\n}\n\nint mpeg3audio_III_get_side_info(mpeg3audio_t *audio,\n\t\tstruct mpeg3_III_sideinfo *si,\n\t\tint channels,\n \t\tint ms_stereo,\n\t\tlong sfreq,\n\t\tint single,\n\t\tint lsf)\n{\n\tint ch, gr;\n\tint powdiff = (single == 3) ? 4 : 0;\n\tstatic const int tabs[2][5] = { { 2,9,5,3,4 } , { 1,8,1,2,9 } };\n\tconst int *tab = tabs[lsf];\n\n\tsi->main_data_begin = mpeg3bits_getbits(audio->astream, tab[1]);\n\tif(channels == 1)\n\t\tsi->private_bits = mpeg3bits_getbits(audio->astream, tab[2]);\n\telse \n    \tsi->private_bits = mpeg3bits_getbits(audio->astream, tab[3]);\n\tif(!lsf)\n\t{\n\t\tfor(ch = 0; ch < channels; ch++)\n\t\t{\n    \t\tsi->ch[ch].gr[0].scfsi = -1;\n    \t\tsi->ch[ch].gr[1].scfsi = mpeg3bits_getbits(audio->astream, 4);\n\t\t}\n\t}\n\n\tfor(gr = 0; gr < tab[0]; gr++) \n\t{\n\t\tfor(ch = 0; ch < channels; ch++)\n\t\t{\n\t\t\tregister struct gr_info_s *gr_info = &(si->ch[ch].gr[gr]);\n\n\t\t\tgr_info->part2_3_length = mpeg3bits_getbits(audio->astream, 12);\n\t\t\tgr_info->big_values = mpeg3bits_getbits(audio->astream, 9);\n\t\t\tif(gr_info->big_values > 288) \n\t\t\t{\n\t\t\t\tfprintf(stderr,\"mpeg3_III_get_side_info: big_values too large!\\n\");\n\t\t\t\tgr_info->big_values = 288;\n\t\t\t}\n\t\t\tgr_info->pow2gain = mpeg3_gainpow2 + 256 - mpeg3bits_getbits(audio->astream, 8) + powdiff;\n\t\t\tif(ms_stereo)\n\t\t\t\tgr_info->pow2gain += 2;\n\t\t\tgr_info->scalefac_compress = mpeg3bits_getbits(audio->astream, tab[4]);\n\n\t\t\tif(mpeg3bits_getbits(audio->astream, 1)) \n\t\t\t{\n/* window switch flag  */\n\t\t\t\tint i;\n\t\t\t\tgr_info->block_type       = mpeg3bits_getbits(audio->astream, 2);\n\t\t\t\tgr_info->mixed_block_flag = mpeg3bits_getbits(audio->astream, 1);\n\t\t\t\tgr_info->table_select[0]  = mpeg3bits_getbits(audio->astream, 5);\n\t\t\t\tgr_info->table_select[1]  = mpeg3bits_getbits(audio->astream, 5);\n/*\n * table_select[2] not needed, because there is no region2,\n * but to satisfy some verifications tools we set it either.\n */\n        \t\tgr_info->table_select[2] = 0;\n        \t\tfor(i = 0; i < 3; i++)\n        \t    \tgr_info->full_gain[i] = gr_info->pow2gain + (mpeg3bits_getbits(audio->astream, 3) << 3);\n\n        \t\tif(gr_info->block_type == 0) \n\t\t\t\t{\n        \t\t\tfprintf(stderr,\"Blocktype == 0 and window-switching == 1 not allowed.\\n\");\n        \t\t\treturn 1;\n        \t\t}\n\n/* region_count/start parameters are implicit in this case. */       \n\t\t\t\tif(!lsf || gr_info->block_type == 2)\n        \t   \t\tgr_info->region1start = 36 >> 1;\n\t\t\t\telse \n\t\t\t\t{\n/* check this again for 2.5 and sfreq=8 */\n        \t\t\tif(sfreq == 8)\n\t\t\t\t\t\tgr_info->region1start = 108 >> 1;\n        \t\t\telse\n\t\t\t\t\t\tgr_info->region1start = 54 >> 1;\n        \t\t}\n        \t\tgr_info->region2start = 576 >> 1;\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tint i, r0c, r1c;\n\t\t\t\tfor(i = 0; i < 3; i++)\n\t\t\t\t\tgr_info->table_select[i] = mpeg3bits_getbits(audio->astream, 5);\n\n\t\t\t\tr0c = mpeg3bits_getbits(audio->astream, 4);\n\t\t\t\tr1c = mpeg3bits_getbits(audio->astream, 3);\n\t\t\t\tgr_info->region1start = mpeg3_bandInfo[sfreq].longIdx[r0c + 1] >> 1 ;\n\t\t\t\tgr_info->region2start = mpeg3_bandInfo[sfreq].longIdx[r0c + 1 + r1c + 1] >> 1;\n\t\t\t\tgr_info->block_type = 0;\n\t\t\t\tgr_info->mixed_block_flag = 0;\n\t\t\t}\n\t\t\tif(!lsf) gr_info->preflag = mpeg3bits_getbits(audio->astream, 1);\n\t\t\tgr_info->scalefac_scale = mpeg3bits_getbits(audio->astream, 1);\n\t\t\tgr_info->count1table_select = mpeg3bits_getbits(audio->astream, 1);\n\t\t}\n\t}\n\treturn 0;\n}\n\nint mpeg3audio_III_hybrid(mpeg3audio_t *audio,\n\t\tfloat fsIn[SBLIMIT][SSLIMIT],\n\t\tfloat tsOut[SSLIMIT][SBLIMIT],\n\t   int ch,\n\t   struct gr_info_s *gr_info)\n{\n\tfloat *tspnt = (float *) tsOut;\n\tfloat *rawout1,*rawout2;\n\tint bt, sb = 0;\n\n\t\n\t{\n    \tint b = audio->mp3_blc[ch];\n    \trawout1 = audio->mp3_block[b][ch];\n    \tb = -b + 1;\n    \trawout2 = audio->mp3_block[b][ch];\n    \taudio->mp3_blc[ch] = b;\n\t}\n  \n\tif(gr_info->mixed_block_flag) \n\t{\n    \tsb = 2;\n    \tmpeg3audio_dct36(fsIn[0], rawout1, rawout2, mpeg3_win[0], tspnt);\n    \tmpeg3audio_dct36(fsIn[1], rawout1 + 18, rawout2 + 18, mpeg3_win1[0], tspnt + 1);\n    \trawout1 += 36; \n\t\trawout2 += 36; \n\t\ttspnt += 2;\n\t}\n\n\tbt = gr_info->block_type;\n\tif(bt == 2) \n\t{\n    \tfor( ; sb < gr_info->maxb; sb += 2, tspnt += 2, rawout1 += 36, rawout2 += 36) \n\t\t{\n    \t\tmpeg3audio_dct12(fsIn[sb]  ,rawout1   ,rawout2   ,mpeg3_win[2] ,tspnt);\n    \t\tmpeg3audio_dct12(fsIn[sb + 1], rawout1 + 18, rawout2 + 18, mpeg3_win1[2], tspnt + 1);\n    \t}\n\t}\n\telse \n\t{\n    \tfor( ; sb < gr_info->maxb; sb += 2, tspnt += 2, rawout1 += 36, rawout2 += 36) \n\t\t{\n    \t\tmpeg3audio_dct36(fsIn[sb], rawout1, rawout2, mpeg3_win[bt], tspnt);\n    \t\tmpeg3audio_dct36(fsIn[sb + 1], rawout1 + 18, rawout2 + 18, mpeg3_win1[bt], tspnt + 1);\n    \t}\n\t}\n\n\tfor( ; sb < SBLIMIT; sb++, tspnt++) \n\t{\n    \tint i;\n    \tfor(i = 0; i < SSLIMIT; i++) \n\t\t{\n    \t\ttspnt[i * SBLIMIT] = *rawout1++;\n    \t\t*rawout2++ = 0.0;\n    \t}\n\t}\n\treturn 0;\n}\n\nint mpeg3audio_III_antialias(mpeg3audio_t *audio,\n\t\tfloat xr[SBLIMIT][SSLIMIT],\n\t\tstruct gr_info_s *gr_info)\n{\n\tint sblim;\n\n\tif(gr_info->block_type == 2) \n\t{\n    \tif(!gr_info->mixed_block_flag) \n        \treturn;\n    \tsblim = 1; \n\t}\n\telse \n\t{\n        sblim = gr_info->maxb-1;\n\t}\n\n/* 31 alias-reduction operations between each pair of sub-bands */\n/* with 8 butterflies between each pair                         */\n\n\t{\n    \tint sb;\n    \tfloat *xr1 = (float*)xr[1];\n\n    \tfor(sb = sblim; sb; sb--, xr1 += 10) \n\t\t{\n    \t\tint ss;\n    \t\tfloat *cs, *ca;\n    \t\tfloat *xr2;\n    \t\tcs = mpeg3_aa_cs;\n\t\t\tca = mpeg3_aa_ca;\n    \t\txr2 = xr1;\n\n    \t\tfor(ss = 7; ss >= 0; ss--)\n    \t\t{       \n/* upper and lower butterfly inputs */\n        \t\tregister float bu, bd;\n        \t\tbu = *--xr2;\n\t\t\t\tbd = *xr1;\n        \t\t*xr2   = (bu * (*cs)   ) - (bd * (*ca)   );\n        \t\t*xr1++ = (bd * (*cs++) ) + (bu * (*ca++) );\n    \t\t}\n    \t}\n    }\n\treturn 0;\n}\n\n/* \n * III_stereo: calculate float channel values for Joint-I-Stereo-mode\n */\nint mpeg3audio_III_i_stereo(mpeg3audio_t *audio, \n\t\tfloat xr_buf[2][SBLIMIT][SSLIMIT],\n\t\tint *scalefac,\n   \t\tstruct gr_info_s *gr_info,\n\t\tint sfreq,\n\t\tint ms_stereo,\n\t\tint lsf)\n{\n\tfloat (*xr)[SBLIMIT*SSLIMIT] = (float (*)[SBLIMIT*SSLIMIT] ) xr_buf;\n\tstruct mpeg3_bandInfoStruct *bi = &mpeg3_bandInfo[sfreq];\n\tconst float *tab1, *tab2;\n\n    int tab;\n/* TODO: optimize as static */\n    static const float *tabs[3][2][2] = \n\t{ \n       { { mpeg3_tan1_1, mpeg3_tan2_1 }     , { mpeg3_tan1_2, mpeg3_tan2_2 } },\n       { { mpeg3_pow1_1[0], mpeg3_pow2_1[0] } , { mpeg3_pow1_2[0], mpeg3_pow2_2[0] } } ,\n       { { mpeg3_pow1_1[1], mpeg3_pow2_1[1] } , { mpeg3_pow1_2[1], mpeg3_pow2_2[1] } } \n    };\n\n    tab = lsf + (gr_info->scalefac_compress & lsf);\n    tab1 = tabs[tab][ms_stereo][0];\n    tab2 = tabs[tab][ms_stereo][1];\n\n    if(gr_info->block_type == 2) \n\t{\n    \tint lwin,do_l = 0;\n    \tif(gr_info->mixed_block_flag)\n        \tdo_l = 1;\n\n    \tfor(lwin = 0; lwin < 3; lwin++) \n\t\t{ \n/* process each window */\n/* get first band with zero values */\n/* sfb is minimal 3 for mixed mode */\n        \tint is_p, sb, idx, sfb = gr_info->maxband[lwin];  \n        \tif(sfb > 3) do_l = 0;\n\n        \tfor( ; sfb < 12 ; sfb++) \n\t\t\t{\n/* scale: 0-15 */ \n        \t\tis_p = scalefac[sfb * 3 + lwin - gr_info->mixed_block_flag]; \n        \t\tif(is_p != 7) \n\t\t\t\t{\n            \t\tfloat t1, t2;\n            \t\tsb  = bi->shortDiff[sfb];\n            \t\tidx = bi->shortIdx[sfb] + lwin;\n            \t\tt1  = tab1[is_p]; \n\t\t\t\t\tt2 = tab2[is_p];\n            \t\tfor( ; sb > 0; sb--, idx += 3) \n\t\t\t\t\t{\n            \t\t\tfloat v = xr[0][idx];\n            \t\t\txr[0][idx] = v * t1;\n            \t\t\txr[1][idx] = v * t2;\n            \t\t}\n        \t\t}\n\t\t\t}\n\n/* in the original: copy 10 to 11 , here: copy 11 to 12 \nmaybe still wrong??? (copy 12 to 13?) */\n/* scale: 0-15 */\n        \tis_p = scalefac[11 * 3 + lwin - gr_info->mixed_block_flag]; \n        \tsb   = bi->shortDiff[12];\n        \tidx  = bi->shortIdx[12] + lwin;\n        \tif(is_p != 7) \n\t\t\t{\n        \t\tfloat t1, t2;\n        \t\tt1 = tab1[is_p]; \n\t\t\t\tt2 = tab2[is_p];\n        \t\tfor( ; sb > 0; sb--, idx += 3) \n\t\t\t\t{  \n            \t\tfloat v = xr[0][idx];\n            \t\txr[0][idx] = v * t1;\n            \t\txr[1][idx] = v * t2;\n        \t\t}\n        \t}\n    \t} /* end for(lwin; .. ; . ) */\n\n/* also check l-part, if ALL bands in the three windows are 'empty'\n* and mode = mixed_mode \n*/\n\t\tif(do_l) \n\t\t{\n\t\t\tint sfb = gr_info->maxbandl;\n\t\t\tint idx = bi->longIdx[sfb];\n\n\t\t\tfor ( ; sfb < 8; sfb++) \n\t\t\t{\n\t\t\t\tint sb = bi->longDiff[sfb];\n/* scale: 0-15 */\n\t\t\t\tint is_p = scalefac[sfb]; \n\t\t\t\tif(is_p != 7) \n\t\t\t\t{\n\t\t\t\t\tfloat t1, t2;\n\t\t\t\t\tt1 = tab1[is_p]; \n\t\t\t\t\tt2 = tab2[is_p];\n\t\t\t\t\tfor( ; sb > 0; sb--, idx++) \n\t\t\t\t\t{\n\t\t\t\t\t\tfloat v = xr[0][idx];\n\t\t\t\t\t\txr[0][idx] = v * t1;\n\t\t\t\t\t\txr[1][idx] = v * t2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t   idx += sb;\n\t\t\t}\n    \t}     \n\t} \n    else \n\t{ \n/* ((gr_info->block_type != 2)) */\n\t\tint sfb = gr_info->maxbandl;\n\t\tint is_p, idx = bi->longIdx[sfb];\n\t\tfor( ; sfb < 21; sfb++) \n\t\t{\n\t\t\tint sb = bi->longDiff[sfb];\n/* scale: 0-15 */\n\t\t\tis_p = scalefac[sfb]; \n\t\t\tif(is_p != 7) \n\t\t\t{\n        \t\tfloat t1, t2;\n        \t\tt1 = tab1[is_p]; \n\t\t\t\tt2 = tab2[is_p];\n        \t\tfor( ; sb > 0; sb--, idx++) \n\t\t\t\t{\n\t\t\t\t\t float v = xr[0][idx];\n            \t\t xr[0][idx] = v * t1;\n            \t\t xr[1][idx] = v * t2;\n        \t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\tidx += sb;\n      \t}\n\n    \tis_p = scalefac[20];\n    \tif(is_p != 7) \n\t\t{  \n/* copy l-band 20 to l-band 21 */\n        \tint sb;\n        \tfloat t1 = tab1[is_p], t2 = tab2[is_p]; \n\n        \tfor(sb = bi->longDiff[21]; sb > 0; sb--, idx++)\n\t\t\t{\n        \t\tfloat v = xr[0][idx];\n        \t\txr[0][idx] = v * t1;\n        \t\txr[1][idx] = v * t2;\n        \t}\n    \t}\n    } /* ... */\n}\n\n/* Read just the frame after a seek. */\nint mpeg3audio_read_layer3_frame(mpeg3audio_t *audio)\n{\n\tint result = 0;\n\n\tresult = mpeg3audio_read_header(audio);\n\tif(!result)\n\t{\n\t\taudio->bsbufold = audio->bsbuf;\n\t\taudio->bsbuf = audio->bsspace[audio->bsnum] + 512;\n\t\taudio->bsnum ^= 1;\n\t\tresult = mpeg3bits_read_buffer(audio->astream, audio->bsbuf, audio->framesize);\n\t}\n\n\treturn result;\n}\n\nint mpeg3audio_dolayer3(mpeg3audio_t *audio)\n{\n\tint gr, ch, ss;\n\tint scalefacs[2][39]; /* max 39 for short[13][3] mode, mixed: 38, long: 22 */\n\tstruct mpeg3_III_sideinfo sideinfo;\n\tint channels = audio->channels;\n\tint single = audio->single;\n\tint ms_stereo, i_stereo;\n\tint sfreq = audio->sampling_frequency_code;\n\tint stereo1, granules;\n\tint i;\n\n/* flip/init buffer */\n\taudio->bsbufold = audio->bsbuf;\n\taudio->bsbuf = audio->bsspace[audio->bsnum] + 512;\n\taudio->bsnum ^= 1;\n\n/* read main data into memory */\n\tif(mpeg3bits_read_buffer(audio->astream, audio->bsbuf, audio->framesize))\n\t\treturn 1;\n\tmpeg3bits_use_ptr(audio->astream, audio->bsbuf);\n\n/* CRC must be skipped here for proper alignment with the backstep */\n \tif(audio->error_protection)\n\t\tmpeg3bits_getbits(audio->astream, 16);\n\n\tif(channels == 1)\n\t{\n/* stream is mono */\n    \tstereo1 = 1;\n    \tsingle = 0;\n\t}\n \telse\n\t{\n/* Stereo */\n    \tstereo1 = 2;\n\t}\n\n\tif(audio->mode == MPG_MD_JOINT_STEREO)\n\t{\n    \tms_stereo = (audio->mode_ext & 0x2) >> 1;\n    \ti_stereo  = audio->mode_ext & 0x1;\n\t}\n\telse\n    \tms_stereo = i_stereo = 0;\n\n  \tif(audio->lsf)\n\t{\n    \tgranules = 1;\n  \t}\n  \telse \n\t{\n    \tgranules = 2;\n  \t}\n\n  \tif(mpeg3audio_III_get_side_info(audio, &sideinfo, channels, ms_stereo, sfreq, single, audio->lsf))\n\t\treturn 1;\n\n/* Step back */\n\tif(sideinfo.main_data_begin >= 512)\n\t\treturn 1;\n\n\tif(sideinfo.main_data_begin)\n\t{\n\t\tmemcpy(audio->bsbuf + audio->ssize - sideinfo.main_data_begin, \n\t\t\taudio->bsbufold + audio->prev_framesize - sideinfo.main_data_begin, \n\t\t\tsideinfo.main_data_begin);\n\t\tmpeg3bits_use_ptr(audio->astream, audio->bsbuf + audio->ssize - sideinfo.main_data_begin);\n\t}\n\n  \tfor(gr = 0; gr < granules; gr++)\n\t{\n    \tfloat hybridIn [2][SBLIMIT][SSLIMIT];\n    \tfloat hybridOut[2][SSLIMIT][SBLIMIT];\n\n    \t{\n\t\t\tstruct gr_info_s *gr_info = &(sideinfo.ch[0].gr[gr]);\n\t\t\tlong part2bits;\n\t\t\tif(audio->lsf)\n\t\t\t\tpart2bits = mpeg3audio_III_get_scale_factors_2(audio, scalefacs[0], gr_info, 0);\n\t\t\telse\n\t\t\t\tpart2bits = mpeg3audio_III_get_scale_factors_1(audio, scalefacs[0], gr_info, 0, gr);\n//printf(\"dolayer3 4 %04x\\n\", mpeg3bits_showbits(audio->astream, 16));\n\n\t\t\tif(mpeg3audio_III_dequantize_sample(audio, hybridIn[0], scalefacs[0], gr_info, sfreq, part2bits))\n\t\t\t{\n\t\t\t\tmpeg3bits_use_demuxer(audio->astream);\n\t\t\t\treturn 1;\n\t\t\t}\n//printf(\"dolayer3 5 %04x\\n\", mpeg3bits_showbits(audio->astream, 16));\n    \t}\n\n      \tif(channels == 2) \n\t\t{\n    \t\tstruct gr_info_s *gr_info = &(sideinfo.ch[1].gr[gr]);\n    \t\tlong part2bits;\n    \t\tif(audio->lsf) \n        \t\tpart2bits = mpeg3audio_III_get_scale_factors_2(audio, scalefacs[1], gr_info, i_stereo);\n    \t\telse\n        \t\tpart2bits = mpeg3audio_III_get_scale_factors_1(audio, scalefacs[1], gr_info, 1, gr);\n\n    \t\tif(mpeg3audio_III_dequantize_sample(audio, hybridIn[1], scalefacs[1], gr_info, sfreq, part2bits))\n\t\t\t{\n\t\t\t\tmpeg3bits_use_demuxer(audio->astream);\n        \t\treturn 1;\n\t\t\t}\n\n    \t\tif(ms_stereo)\n\t\t\t{\n        \t\tint i;\n        \t\tint maxb = sideinfo.ch[0].gr[gr].maxb;\n        \t\tif(sideinfo.ch[1].gr[gr].maxb > maxb)\n            \t\tmaxb = sideinfo.ch[1].gr[gr].maxb;\n        \t\tfor(i = 0; i < SSLIMIT * maxb; i++)\n\t\t\t\t{\n        \t\t\tfloat tmp0 = ((float*)hybridIn[0])[i];\n        \t\t\tfloat tmp1 = ((float*)hybridIn[1])[i];\n        \t\t\t((float*)hybridIn[0])[i] = tmp0 + tmp1;\n        \t\t\t((float*)hybridIn[1])[i] = tmp0 - tmp1;\n        \t\t}\n    \t  \t}\n\n    \t\tif(i_stereo)\n        \t\tmpeg3audio_III_i_stereo(audio, hybridIn, scalefacs[1], gr_info, sfreq, ms_stereo, audio->lsf);\n\n    \t\tif(ms_stereo || i_stereo || (single == 3)) \n\t\t\t{\n        \t\tif(gr_info->maxb > sideinfo.ch[0].gr[gr].maxb) \n        \t\t\tsideinfo.ch[0].gr[gr].maxb = gr_info->maxb;\n        \t\telse\n        \t\t\tgr_info->maxb = sideinfo.ch[0].gr[gr].maxb;\n    \t\t}\n\n    \t\tswitch(single) \n\t\t\t{\n        \t\tcase 3:\n        \t\t\t{\n            \t\t\tregister int i;\n            \t\t\tregister float *in0 = (float*)hybridIn[0], *in1 = (float*)hybridIn[1];\n/* *0.5 done by pow-scale */\n            \t\t\tfor(i = 0; i < SSLIMIT * gr_info->maxb; i++, in0++)\n            \t\t\t\t*in0 = (*in0 + *in1++); \n        \t\t\t}\n        \t\t\tbreak;\n        \t\tcase 1:\n        \t\t\t{\n            \t\t\tregister int i;\n            \t\t\tregister float *in0 = (float*)hybridIn[0], *in1 = (float*)hybridIn[1];\n            \t\t\tfor(i = 0; i < SSLIMIT * gr_info->maxb; i++)\n            \t\t\t\t*in0++ = *in1++;\n        \t\t\t}\n        \t\t\tbreak;\n    \t\t}\n\t\t}\n\n    \tfor(ch = 0; ch < stereo1; ch++)\n\t\t{\n    \t\tstruct gr_info_s *gr_info = &(sideinfo.ch[ch].gr[gr]);\n    \t\tmpeg3audio_III_antialias(audio, hybridIn[ch], gr_info);\n    \t\tmpeg3audio_III_hybrid(audio, hybridIn[ch], hybridOut[ch], ch, gr_info);\n    \t}\n\n    \tfor(ss = 0; ss < SSLIMIT; ss++)\n\t\t{\n    \t\tif(single >= 0)\n\t\t\t{\n\t\t\t\tmpeg3audio_synth_mono(audio, hybridOut[0][ss], audio->pcm_sample, &(audio->pcm_point));\n    \t\t}\n    \t\telse \n\t\t\t{\n        \t\tint p1 = audio->pcm_point;\n        \t\tmpeg3audio_synth_stereo(audio, hybridOut[0][ss], 0, audio->pcm_sample, &p1);\n        \t\tmpeg3audio_synth_stereo(audio, hybridOut[1][ss], 1, audio->pcm_sample, &(audio->pcm_point));\n    \t\t}\n\n    \t\tif(audio->pcm_point / audio->channels >= audio->pcm_allocated - MPEG3AUDIO_PADDING * audio->channels)\n\t\t\t{\n/* Need more room */\n\t\t\t\tmpeg3audio_replace_buffer(audio, audio->pcm_allocated + MPEG3AUDIO_PADDING * audio->channels);\n\t\t\t}\n    \t}\n\t}\n\n\tmpeg3bits_use_demuxer(audio->astream);\n\treturn 0;\n}\n\n\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/audio/mpeg3audio.c",
    "content": "/* \n *\n *  This file is part of libmpeg3\n *\t\n * LibMPEG3\n * Author: Adam Williams <broadcast@earthling.net>\n * Page: heroine.linuxbox.com\n * Page: http://www.smalltalkconsulting.com/html/mpeg3source.html (for Squeak)\n *\n    LibMPEG3 was originally licenced under GPL. It was relicensed by\n    the author under the LGPL and the Squeak license on Nov 1st, 2000\n    \n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA \n    \n    Also licensed under the Squeak license.\n    http://www.squeak.org/license.html\n */\n /*  Changed Sept 15th by John M McIntosh to support Macintosh & Squeak\n */\n\n#include \"libmpeg3.h\"\n#include \"mpeg3private.h\"\n#include \"mpeg3protos.h\"\n\n#include \"mpeg3audio.h\"\n#include \"tables.h\"\n\n#include <math.h>\n#include <stdlib.h>\n\nmpeg3audio_t* mpeg3audio_allocate_struct(mpeg3_t *file, mpeg3_atrack_t *track)\n{\n\tmpeg3audio_t *audio = (mpeg3audio_t *) memoryAllocate(1, sizeof(mpeg3audio_t));\n\taudio->file = file;\n\taudio->track = track;\n\taudio->astream = mpeg3bits_new_stream(file, track->demuxer);\n\taudio->outscale = 1;\n\taudio->bsbuf = audio->bsspace[1];\n\taudio->init = 1;\n\taudio->bo = 1;\n\taudio->channels = 1;\n\treturn audio;\n}\n\n\nint mpeg3audio_delete_struct(mpeg3audio_t *audio)\n{\n\tmpeg3bits_delete_stream(audio->astream);\n\tif(audio->pcm_sample) memoryFree(audio->pcm_sample);\n\tmemoryFree(audio);\n\treturn 0;\n}\n\nint mpeg3audio_replace_buffer(mpeg3audio_t *audio, long new_allocation)\n{\n\tlong i;\n\n\tif(!audio->pcm_sample)\n\t{\n\t\taudio->pcm_sample = (float *) memoryAllocate(1,sizeof(float) * new_allocation * audio->channels);\n\t\taudio->pcm_allocated = new_allocation;\n\t}\n\telse\n\t{\n\t\tfloat *new_samples = (float *) memoryAllocate(1,sizeof(float) * new_allocation * audio->channels);\n\t\tfor(i = 0; i < audio->pcm_allocated * audio->channels; i++)\n\t\t{\n\t\t\tnew_samples[i] = audio->pcm_sample[i];\n\t\t}\n\t\tmemoryFree(audio->pcm_sample);\n\t\taudio->pcm_sample = new_samples;\n\t\taudio->pcm_allocated = new_allocation;\n\t}\n\treturn 0;\n}\n\nint mpeg3audio_read_frame(mpeg3audio_t *audio)\n{\n\tint result = 0;\n\tresult = mpeg3audio_read_header(audio);\n\n\tif(!result)\n\t{\n\t\tswitch(audio->format)\n\t\t{\n\t\t\tcase AUDIO_AC3:\n\t\t\t\t//JMM result = mpeg3audio_do_ac3(audio);\n\t\t\t\tresult = -1; //JMM \n\t\t\t\tbreak;\t\n\t\t\t\t\n\t\t\tcase AUDIO_MPEG:\n\t\t\t\tswitch(audio->layer)\n\t\t\t\t{\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\tresult = mpeg3audio_dolayer2(audio);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\tresult = mpeg3audio_dolayer3(audio);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tresult = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase AUDIO_PCM:\n\t\t\t\tresult = mpeg3audio_do_pcm(audio);\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tif(!result)\n\t{\n/* Byte align the stream */\n\t\tmpeg3bits_byte_align(audio->astream);\n\t}\n\treturn result;\n}\n\n/* Get the length but also initialize the frame sizes. */\nint mpeg3audio_get_length(mpeg3audio_t *audio, mpeg3_atrack_t *track)\n{\n\tlong result = 0;\n\tlong framesize1 = 0, total1 = 0;\n\tlong framesize2 = 0, total2 = 0;\n\tlong total_framesize = 0, total_frames = 0;\n\tlong byte_limit = 131072;  /* Total bytes to gather information from */\n\tlong total_bytes = 0;\n\tlong major_framesize;     /* Bigger framesize + header */\n\tlong minor_framesize;     /* Smaller framesize + header */\n\tlong major_total;\n\tlong minor_total;\n\tmpeg3_t *file = (mpeg3_t *) audio->file;\n\n/* Get the frame sizes */\n\tmpeg3bits_seek_start(audio->astream);\n\taudio->pcm_point = 0;\n\tresult = mpeg3audio_read_frame(audio); /* Stores the framesize */\n\taudio->samples_per_frame = audio->pcm_point / audio->channels;\n\n\tswitch(audio->format)\n\t{\n\t\tcase AUDIO_AC3:\n\t\t\taudio->avg_framesize = audio->framesize;\n\t\t\tbreak;\n\n\t\tcase AUDIO_MPEG:\n\t\t\tframesize1 = audio->framesize;\n\t\t\ttotal_bytes += audio->framesize;\n\t\t\ttotal1 = 1;\n\n\t\t\twhile(!result && total_bytes < byte_limit)\n\t\t\t{\n\t\t\t\taudio->pcm_point = 0;\n\t\t\t\tresult = mpeg3audio_read_frame(audio);\n\t\t\t\ttotal_bytes += audio->framesize;\n\t\t\t\tif(audio->framesize != framesize1)\n\t\t\t\t{\n\t\t\t\t\tframesize2 = audio->framesize;\n\t\t\t\t\ttotal2 = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttotal1++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\twhile(!result && total_bytes < byte_limit)\n\t\t\t{\n\t\t\t\taudio->pcm_point = 0;\n\t\t\t\tresult = mpeg3audio_read_frame(audio);\n\t\t\t\ttotal_bytes += audio->framesize;\n\t\t\t\tif(audio->framesize != framesize2)\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttotal2++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\taudio->pcm_point = 0;\n\t\t\tresult = mpeg3audio_read_frame(audio);\n\t\t\tif(audio->framesize != framesize1 && audio->framesize != framesize2)\n\t\t\t{\n/* Variable bit rate.  Get the average frame size. */\n\t\t\t\twhile(!result && total_bytes < byte_limit)\n\t\t\t\t{\n\t\t\t\t\taudio->pcm_point = 0;\n\t\t\t\t\tresult = mpeg3audio_read_frame(audio);\n\t\t\t\t\ttotal_bytes += audio->framesize;\n\t\t\t\t\tif(!result)\n\t\t\t\t\t{\n\t\t\t\t\t\ttotal_framesize += audio->framesize;\n\t\t\t\t\t\ttotal_frames++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\taudio->avg_framesize = 4 + (float)(total_framesize + framesize1 + framesize2) / (total_frames + total1 + total2);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmajor_framesize = framesize2 > framesize1 ? framesize2 : framesize1;\n\t\t\t\tmajor_total = framesize2 > framesize1 ? total2 : total1;\n\t\t\t\tminor_framesize = framesize2 > framesize1 ? framesize1 : framesize2;\n\t\t\t\tminor_total = framesize2 > framesize1 ? total1 : total2;\n/* Add the headers to the framesizes */\n\t\t\t\taudio->avg_framesize = 4 + (float)(major_framesize * major_total + minor_framesize * minor_total) / (major_total + minor_total);\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase AUDIO_PCM:\n\t\t\tbreak;\n\t}\n\n/* Estimate the total samples */\n\tif(file->is_audio_stream)\n\t{\n/* From the raw file */\n\t\tresult = (long)((float)mpeg3demuxer_total_bytes(audio->astream->demuxer) / audio->avg_framesize * audio->samples_per_frame);\n\t}\n\telse\n\t{\n/* Gross approximation from a multiplexed file. */\n\t\tresult = (long)(mpeg3demux_length(audio->astream->demuxer) * track->sample_rate);\n/*\t\tresult = (long)((float)mpeg3_video_frames(file, 0) / mpeg3_frame_rate(file, 0) * track->sample_rate); */\n/* We would scan the multiplexed packets here for the right timecode if only */\n/* they had meaningful timecode. */\n\t}\n\n\taudio->pcm_point = 0;\n\tmpeg3bits_seek_start(audio->astream);\n\tmpeg3audio_reset_synths(audio);\n\treturn result;\n}\n\nint mpeg3audio_seek(mpeg3audio_t *audio, long position)\n{\n\tint result = 0;\n\tmpeg3_t *file = (mpeg3_t *) audio->file;\n\tmpeg3_atrack_t *track = (mpeg3_atrack_t *) audio->track;\n\tlong frame_number;\n\tlong byte_position = 0;\n\tdouble time_position;\n\n/* Sample seek wasn't requested */\n\tif(audio->sample_seek < 0)\n\t{\n\t\taudio->pcm_position = position;\n\t\taudio->pcm_size = 0;\n\t\treturn 0;\n\t}\n\n/* Can't slide buffer.  Seek instead. */\n\tif(!file->is_audio_stream)\n\t{\n/* Seek in a multiplexed stream using the multiplexer. */\n\t   \ttime_position = (double)position / track->sample_rate;\n\t\tresult |= mpeg3bits_seek_time(audio->astream, time_position);\n\t   \taudio->pcm_position = mpeg3bits_packet_time(audio->astream) * track->sample_rate;\n/*printf(\"wanted %f got %f\\n\", time_position, mpeg3bits_packet_time(audio->astream)); */\n\t}\n\telse\n\t{\n/* Seek in an elemental stream.  This algorithm achieves sample accuracy on fixed bitrates. */\n/* Forget about variable bitrates or program streams. */\n\t\tframe_number = position / audio->samples_per_frame;\n\t\tbyte_position = (long)(audio->avg_framesize * frame_number);\n\t   \taudio->pcm_position = frame_number * audio->samples_per_frame;\n\n\t\tif(byte_position < audio->avg_framesize * 2)\n\t\t{\n\t\t\tresult |= mpeg3bits_seek_start(audio->astream);\n\t\t\taudio->pcm_position = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tresult |= mpeg3bits_seek_byte(audio->astream, byte_position);\n\t\t}\n\t}\n\n/* Arm the backstep buffer for layer 3 if not at the beginning already. */\n\tif(byte_position >= audio->avg_framesize * 2 && audio->layer == 3 && !result)\n\t{\n\t\tresult |= mpeg3audio_prev_header(audio);\n\t\tresult |= mpeg3audio_read_layer3_frame(audio);\n\t}\n\n/* Reset the tables. */\n\tmpeg3audio_reset_synths(audio);\n\taudio->pcm_size = 0;\n\taudio->pcm_point = 0;\n\treturn result;\n}\n\n/* ================================================================ */\n/*                                    ENTRY POINTS */\n/* ================================================================ */\n\n\n\n\nmpeg3audio_t* mpeg3audio_new(mpeg3_t *file, mpeg3_atrack_t *track, int format)\n{\n\tmpeg3audio_t *audio = mpeg3audio_allocate_struct(file, track);\n\tint result = 0;\n\n/* Init tables */\n\tmpeg3audio_new_decode_tables(audio);\n\taudio->percentage_seek = -1;\n\taudio->sample_seek = -1;\n\taudio->format = format;\n\n/* Determine the format of the stream */\n\tif(format == AUDIO_UNKNOWN)\n\t{\n\t\tif(((mpeg3bits_showbits(audio->astream, 32) & 0xffff0000) >> 16) == MPEG3_AC3_START_CODE)\n\t\t\taudio->format = AUDIO_AC3;\n\t\telse\n\t\t\taudio->format = AUDIO_MPEG;\n\t}\n\n/* get channel count */\n\tresult = mpeg3audio_read_header(audio);\n\n/* Set up the sample buffer */\n\tmpeg3audio_replace_buffer(audio, 262144);\n\n/* Copy information to the mpeg struct */\n\tif(!result)\n\t{\n\t\ttrack->channels = audio->channels;\n\n\t\tswitch(audio->format)\n\t\t{\n\t\t\tcase AUDIO_AC3:\n\t\t\t\t//JMM track->sample_rate = mpeg3_ac3_samplerates[audio->sampling_frequency_code];\n\t\t\t\tbreak;\n\n\t\t\tcase AUDIO_MPEG:\n\t\t\t\ttrack->sample_rate = mpeg3_freqs[audio->sampling_frequency_code];\n\t\t\t\tbreak;\n\n\t\t\tcase AUDIO_PCM:\n\t\t\t\ttrack->sample_rate = 48000;\n\t\t\t\tbreak;\n\t\t}\n\n\t\ttrack->total_samples = mpeg3audio_get_length(audio, track);\n\t\tresult |= mpeg3bits_seek_start(audio->astream);\n\t}\n\telse\n\t{\n\t\tmpeg3audio_delete_struct(audio);\n\t\taudio = 0;\n\t}\n\n\treturn audio;\n}\n\nint mpeg3audio_delete(mpeg3audio_t *audio)\n{\n\tmpeg3audio_delete_struct(audio);\n\treturn 0;\n}\n\nint mpeg3audio_seek_percentage(mpeg3audio_t *audio, double percentage)\n{\n\taudio->percentage_seek = percentage;\n\treturn 0;\n}\n\nint mpeg3audio_seek_sample(mpeg3audio_t *audio, long sample)\n{\n\taudio->sample_seek = sample;\n\treturn 0;\n}\n\n/* Read raw frames for concatenation purposes */\nint mpeg3audio_read_raw(mpeg3audio_t *audio, unsigned char *output, long *size, long max_size)\n{\n\tint result = 0;\n\tint i;\n\t*size = 0;\n\n\tswitch(audio->format)\n\t{\n\t\tcase AUDIO_AC3:\n/* Just write the AC3 stream */\n\t\t\tif(mpeg3bits_read_buffer(audio->astream, output, audio->framesize))\n\t\t\t\treturn 1;\n\t\t\t*size = audio->framesize;\n\t\t\tbreak;\n\n\t\tcase AUDIO_MPEG:\n/* Fix the mpeg stream */\n\t\t\tresult = mpeg3audio_read_header(audio);\n\t\t\tif(!result)\n\t\t\t{\n\t\t\t\tif(max_size < 4) return 1;\n\t\t\t\t*output++ = (audio->newhead & 0xff000000) >> 24;\n\t\t\t\t*output++ = (audio->newhead & 0xff0000) >> 16;\n\t\t\t\t*output++ = (audio->newhead & 0xff00) >> 8;\n\t\t\t\t*output++ = (audio->newhead & 0xff);\n\t\t\t\t*size += 4;\n\n\t\t\t\tif(max_size < 4 + audio->framesize) return 1;\n\t\t\t\tif(mpeg3bits_read_buffer(audio->astream, output, audio->framesize))\n\t\t\t\t\treturn 1;\n\n\t\t\t\t*size += audio->framesize;\n\t\t\t}\n\t\t\tbreak;\n\t\t\n\t\tcase AUDIO_PCM:\n\t\t\tif(mpeg3bits_read_buffer(audio->astream, output, audio->framesize))\n\t\t\t\treturn 1;\n\t\t\t*size = audio->framesize;\n\t\t\tbreak;\n\t}\n\treturn result;\n}\n\n/* Channel is 0 to channels - 1 */\nint mpeg3audio_decode_audio(mpeg3audio_t *audio, \n\t\tfloat *output_f, \n\t\tshort *output_i, \n\t\tint channel, \n\t\tlong start_position, \n\t\tlong len)\n{\n\tlong allocation_needed = len + MPEG3AUDIO_PADDING;\n\tlong i, j, result = 0;\n\tmpeg3_t *file = (mpeg3_t *) audio->file;\n\tmpeg3_atrack_t *atrack = (mpeg3_atrack_t *) audio->track;\n\tlong attempts;\n\n/* Create new buffer */\n\tif(audio->pcm_allocated < allocation_needed)\n\t{\n\t\tmpeg3audio_replace_buffer(audio, allocation_needed);\n\t}\n\n/* There was a percentage seek */\n\tif(audio->percentage_seek >= 0)\n\t{\n\t\tmpeg3bits_seek_percentage(audio->astream, audio->percentage_seek);\n/* Force the pcm buffer to be reread. */\n\t\taudio->pcm_position = start_position;\n\t\taudio->pcm_size = 0;\n\t\taudio->percentage_seek = -1;\n\t}\n\telse\n\t{\n/* Entire output is in buffer so don't do anything. */\n\t\tif(start_position >= audio->pcm_position && start_position < audio->pcm_position + audio->pcm_size &&\n\t\t\tstart_position + len <= audio->pcm_size)\n\t\t{\n\t\t\t;\n\t\t}\n\t\telse\n/* Output starts in buffer but ends later so slide it back. */\n\t\tif(start_position <= audio->pcm_position + audio->pcm_size &&\n\t\t\tstart_position >= audio->pcm_position)\n\t\t{\n\t\t\tfor(i = 0, j = (start_position - audio->pcm_position) * audio->channels;\n\t\t\t\tj < audio->pcm_size * audio->channels;\n\t\t\t\ti++, j++)\n\t\t\t{\n\t\t\t\taudio->pcm_sample[i] = audio->pcm_sample[j];\n\t\t\t}\n\n\t\t\taudio->pcm_point = i;\n\t\t\taudio->pcm_size -= start_position - audio->pcm_position;\n\t\t\taudio->pcm_position = start_position;\n\t\t}\n\t\telse\n\t\t{\n/* Output is outside buffer completely. */\n\t\t\tresult = mpeg3audio_seek(audio, start_position);\n\t\t\taudio->sample_seek = -1;\n/* Check sanity */\n\t\t\tif(start_position < audio->pcm_position) audio->pcm_position = start_position;\n\t\t}\n\t\taudio->sample_seek = -1;\n\t}\n\n\n\n\n\n/* Read packets until the buffer is full. */\n\tif(!result)\n\t{\n\t\tattempts = 0;\n\t\twhile(attempts < 6 &&\n\t\t\t!mpeg3bits_eof(audio->astream) &&\n\t\t\taudio->pcm_size + audio->pcm_position < start_position + len)\n\t\t{\n\t\t\tresult = mpeg3audio_read_frame(audio);\n\t\t\tif(result) attempts++;\n\t\t\taudio->pcm_size = audio->pcm_point / audio->channels;\n\t\t}\n\t}\n\n\n\n\n\n/* Copy the buffer to the output */\n\tif(output_f)\n\t{\n\t\tfor(i = 0, j = (start_position - audio->pcm_position) * audio->channels + channel; \n\t\t\ti < len && j < audio->pcm_size * audio->channels; \n\t\t\ti++, j += audio->channels)\n\t\t{\n\t\t\toutput_f[i] = audio->pcm_sample[j];\n\t\t}\n\t\tfor( ; i < len; i++)\n\t\t{\n\t\t\toutput_f[i] = 0;\n\t\t}\n\t}\n\telse\n\tif(output_i)\n\t{\n\t\tint sample;\n\t\tfor(i = 0, j = (start_position - audio->pcm_position) * audio->channels + channel; \n\t\t\ti < len && j < audio->pcm_size * audio->channels; \n\t\t\ti++, j += audio->channels)\n\t\t{\n\t\t\tsample = (int)(audio->pcm_sample[j] * 32767);\n\t\t\tif(sample > 32767) sample = 32767;\n\t\t\telse \n\t\t\tif(sample < -32768) sample = -32768;\n\t\t\t\n\t\t\toutput_i[i] = sample;\n\t\t}\n\t\tfor( ; i < len; i++)\n\t\t{\n\t\t\toutput_i[i] = 0;\n\t\t}\n\t}\n\n\tif(audio->pcm_point > 0)\n\t\treturn 0;\n\telse\n\t\treturn result;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/audio/mpeg3audio.h",
    "content": " /*  Changed Sept 15th by John M McIntosh to support Macintosh & Squeak\n */\n\n#ifndef MPEG3AUDIO_H\n#define MPEG3AUDIO_H\n\n#include \"ac3.h\"\n#include \"bitstream.h\"\n#ifndef M_PI\n#define M_PI\t\t3.14159265358979323846\n#define M_SQRT2\t\t1.41421356237309504880\n#endif\n\n#define MAXFRAMESIZE 1792\n#define HDRCMPMASK 0xfffffd00\n#define SBLIMIT 32\n#define SSLIMIT 18\n#define SCALE_BLOCK 12\n#define MPEG3AUDIO_PADDING 1024\n\n/* Values for mode */\n#define MPG_MD_STEREO\t\t\t0\n#define MPG_MD_JOINT_STEREO \t1\n#define MPG_MD_DUAL_CHANNEL \t2\n#define MPG_MD_MONO \t\t\t3\n\n/* IMDCT variables */\ntypedef struct\n{\n\tfloat real;\n\tfloat imag;\n} mpeg3_complex_t;\n\n#define AC3_N 512\n\nstruct al_table \n{\n\tshort bits;\n\tshort d;\n};\n\ntypedef struct\n{\n\tvoid* file;\n\tvoid* track;\n\tmpeg3_bits_t *astream;\n\n/* In order of importance */\n\tint format;               /* format of audio */\n\tint layer;                /* layer if mpeg */\n\tint channels;\n\tlong outscale;\n\tlong framenum;\n\tlong prev_framesize;\n\tlong framesize;           /* For mp3 current framesize without header.  For AC3 current framesize with header. */\n\tfloat avg_framesize;      /* Includes the 4 byte header */\n\tfloat *pcm_sample;        /* Interlaced output from synthesizer in floats */\n\tint pcm_point;            /* Float offset in pcm_sample to write to */\n\tlong pcm_position;        /* Sample start of pcm_samples in file */\n\tlong pcm_size;            /* Number of pcm samples in the buffer */\n\tlong pcm_allocated;       /* Allocated number of samples in pcm_samples */\n\tint sample_seek;\n\tdouble percentage_seek;\n\tunsigned long oldhead;\n\tunsigned long newhead;\n\tunsigned long firsthead;\n\tint bsnum;\n\tint lsf;\n\tint mpeg35;\n\tint sampling_frequency_code;\n\tint bitrate_index;\n\tint bitrate;\n\tint samples_per_frame;\n\tint padding;\n\tint extension;\n\tint mode;\n\tint mode_ext;\n\tint copyright;\n\tint original;\n\tint emphasis;\n\tint error_protection;\n\n/* Back step buffers for mp3 */\n\tunsigned char bsspace[2][MAXFRAMESIZE + 512]; /* MAXFRAMESIZE */\n\tunsigned char *bsbuf, *bsbufold;\n\tlong ssize;\n\tint init;\n\tint single;\n    struct al_table *alloc;\n    int II_sblimit;\n    int jsbound;\n\tint bo;                      /* Static variable in synthesizer */\n\n/* MP3 Static arrays here */\n\tfloat synth_stereo_buffs[2][2][0x110];\n\tfloat synth_mono_buff[64];\n\tunsigned int layer2_scfsi_buf[64];\n\n\tfloat mp3_block[2][2][SBLIMIT * SSLIMIT];\n\tint mp3_blc[2];\n\n/* AC3 specific stuff.  AC3 also shares objects with MPEG */\n\tunsigned int ac3_framesize_code;\n\tmpeg3_ac3bsi_t ac3_bsi;\n\tmpeg3_ac3audblk_t ac3_audblk;\n\tmpeg3_ac3_bitallocation_t ac3_bit_allocation;\n\tmpeg3_ac3_mantissa_t ac3_mantissa;\n\tmpeg3_complex_t ac3_imdct_buf[AC3_N / 4];\n\n/* Delay buffer for DCT interleaving */\n\tfloat ac3_delay[6][AC3_N / 2];\n/* Twiddle factor LUT */\n\tmpeg3_complex_t *ac3_w[7];\n\tmpeg3_complex_t ac3_w_1[1];\n\tmpeg3_complex_t ac3_w_2[2];\n\tmpeg3_complex_t ac3_w_4[4];\n\tmpeg3_complex_t ac3_w_8[8];\n\tmpeg3_complex_t ac3_w_16[16];\n\tmpeg3_complex_t ac3_w_32[32];\n\tmpeg3_complex_t ac3_w_64[64];\n\tint ac3_lfsr_state;\n\tunsigned char ac3_buffer[MAX_AC3_FRAMESIZE];\n\tmpeg3ac3_stream_samples_t ac3_samples;\n} mpeg3audio_t;\n\n\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/audio/pcm.c",
    "content": "/* \n *\n *  This file is part of libmpeg3\n *\t\n * LibMPEG3\n * Author: Adam Williams <broadcast@earthling.net>\n * Page: heroine.linuxbox.com\n * Page: http://www.smalltalkconsulting.com/html/mpeg3source.html (for Squeak)\n *\n    LibMPEG3 was originally licenced under GPL. It was relicensed by\n    the author under the LGPL and the Squeak license on Nov 1st, 2000\n    \n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA \n    \n    Also licensed under the Squeak license.\n    http://www.squeak.org/license.html\n */\n \n  /*  Changed Sept 15th by John M McIntosh to support Macintosh & Squeak\n */\n\n#include \"mpeg3audio.h\"\n#include \"mpeg3private.inc\"\n\nint mpeg3audio_read_pcm_header(mpeg3audio_t *audio)\n{\n\tunsigned int code;\n\t\n\tcode = mpeg3bits_getbits(audio->astream, 16);\n\twhile(!mpeg3bits_eof(audio->astream) && code != MPEG3_PCM_START_CODE)\n\t{\n\t\tcode <<= 8;\n\t\tcode &= 0xffff;\n\t\tcode |= mpeg3bits_getbits(audio->astream, 8);\n\t}\n\n\taudio->avg_framesize = audio->framesize = 0x7db;\n\taudio->channels = 2;\n\t\n\treturn mpeg3bits_eof(audio->astream);\n}\n\nint mpeg3audio_do_pcm(mpeg3audio_t *audio)\n{\n\tint i, j, k;\n\tMPEG3_INT16 sample;\n\tint frame_samples = (audio->framesize - 3) / audio->channels / 2;\n\n\tif(mpeg3bits_read_buffer(audio->astream, audio->ac3_buffer, frame_samples * audio->channels * 2))\n\t\treturn 1;\n\n/* Need more room */\n\tif(audio->pcm_point / audio->channels >= audio->pcm_allocated - MPEG3AUDIO_PADDING * audio->channels)\n\t{\n\t\tmpeg3audio_replace_buffer(audio, audio->pcm_allocated + MPEG3AUDIO_PADDING * audio->channels);\n\t}\n\n\tk = 0;\n\tfor(i = 0; i < frame_samples; i++)\n\t{\n\t\tfor(j = 0; j < audio->channels; j++)\n\t\t{\n\t\t\tsample = ((MPEG3_INT16)(audio->ac3_buffer[k++])) << 8;\n\t\t\tsample |= audio->ac3_buffer[k++];\n\t\t\taudio->pcm_sample[audio->pcm_point + i * audio->channels + j] = \n\t\t\t\t(float)sample / 32767;\n\t\t}\n\t}\n\taudio->pcm_point += frame_samples * audio->channels;\n\treturn 0;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/audio/synthesizers.c",
    "content": "/* \n *\n *  This file is part of libmpeg3\n *\t\n * LibMPEG3\n * Author: Adam Williams <broadcast@earthling.net>\n * Page: heroine.linuxbox.com\n * Page: http://www.smalltalkconsulting.com/html/mpeg3source.html (for Squeak)\n *\n    LibMPEG3 was originally licenced under GPL. It was relicensed by\n    the author under the LGPL and the Squeak license on Nov 1st, 2000\n    \n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA \n    \n    Also licensed under the Squeak license.\n    http://www.squeak.org/license.html\n */\n \n#include \"mpeg3audio.h\"\n#include \"tables.h\"\n\n#define WRITE_SAMPLE(samples, sum) \\\n{ \\\n\t(*samples) = (sum); \\\n}\n\nint mpeg3audio_synth_stereo(mpeg3audio_t *audio, float *bandPtr, int channel, float *out, int *pnt)\n{\n\tconst int step = 2;\n\tfloat *samples = out + *pnt;\n    register float sum;\n\tfloat *b0, (*buf)[0x110];\n\tint bo1;\n\n\tif(!channel)\n\t{\n    \taudio->bo--;\n    \taudio->bo &= 0xf;\n    \tbuf = audio->synth_stereo_buffs[0];\n\t}\n\telse \n\t{\n    \tsamples++;\n    \tbuf = audio->synth_stereo_buffs[1];\n\t}\n\n\tif(audio->bo & 0x1)\n\t{\n    \tb0 = buf[0];\n    \tbo1 = audio->bo;\n    \tmpeg3audio_dct64(buf[1] + ((audio->bo + 1) & 0xf), buf[0] + audio->bo, bandPtr);\n\t}\n\telse \n\t{\n    \tb0 = buf[1];\n    \tbo1 = audio->bo + 1;\n    \tmpeg3audio_dct64(buf[0] + audio->bo, buf[1] + audio->bo + 1, bandPtr);\n\t}\n\n/*printf(\"%f %f %f\\n\", buf[0][0], buf[1][0], bandPtr[0]); */\n\n\t{\n    \tregister int j;\n    \tfloat *window = mpeg3_decwin + 16 - bo1;\n\n    \tfor(j = 16; j; j--, b0 += 0x10, window += 0x20, samples += step)\n    \t{\n    \t\tsum  = window[0x0] * b0[0x0];\n    \t\tsum -= window[0x1] * b0[0x1];\n    \t\tsum += window[0x2] * b0[0x2];\n    \t\tsum -= window[0x3] * b0[0x3];\n    \t\tsum += window[0x4] * b0[0x4];\n    \t\tsum -= window[0x5] * b0[0x5];\n    \t\tsum += window[0x6] * b0[0x6];\n    \t\tsum -= window[0x7] * b0[0x7];\n    \t\tsum += window[0x8] * b0[0x8];\n    \t\tsum -= window[0x9] * b0[0x9];\n    \t\tsum += window[0xA] * b0[0xA];\n    \t\tsum -= window[0xB] * b0[0xB];\n    \t\tsum += window[0xC] * b0[0xC];\n    \t\tsum -= window[0xD] * b0[0xD];\n    \t\tsum += window[0xE] * b0[0xE];\n    \t\tsum -= window[0xF] * b0[0xF];\n\n    \t\tWRITE_SAMPLE(samples, sum);\n      \t}\n\n    \tsum  = window[0x0] * b0[0x0];\n    \tsum += window[0x2] * b0[0x2];\n    \tsum += window[0x4] * b0[0x4];\n    \tsum += window[0x6] * b0[0x6];\n    \tsum += window[0x8] * b0[0x8];\n    \tsum += window[0xA] * b0[0xA];\n    \tsum += window[0xC] * b0[0xC];\n    \tsum += window[0xE] * b0[0xE];\n    \tWRITE_SAMPLE(samples, sum);\n    \tb0 -= 0x10;\n\t\twindow -= 0x20;\n\t\tsamples += step;\n      \twindow += bo1 << 1;\n\n    \tfor(j = 15; j; j--, b0 -= 0x10, window -= 0x20, samples += step)\n    \t{\n    \t\tsum = -window[-0x1] * b0[0x0];\n    \t\tsum -= window[-0x2] * b0[0x1];\n    \t\tsum -= window[-0x3] * b0[0x2];\n    \t\tsum -= window[-0x4] * b0[0x3];\n    \t\tsum -= window[-0x5] * b0[0x4];\n    \t\tsum -= window[-0x6] * b0[0x5];\n    \t\tsum -= window[-0x7] * b0[0x6];\n    \t\tsum -= window[-0x8] * b0[0x7];\n    \t\tsum -= window[-0x9] * b0[0x8];\n    \t\tsum -= window[-0xA] * b0[0x9];\n    \t\tsum -= window[-0xB] * b0[0xA];\n    \t\tsum -= window[-0xC] * b0[0xB];\n    \t\tsum -= window[-0xD] * b0[0xC];\n    \t\tsum -= window[-0xE] * b0[0xD];\n    \t\tsum -= window[-0xF] * b0[0xE];\n    \t\tsum -= window[-0x0] * b0[0xF];\n\n    \t\tWRITE_SAMPLE(samples, sum);\n    \t}\n\t}\n\t*pnt += 64;\n\n\treturn 0;\n}\n\nint mpeg3audio_synth_mono(mpeg3audio_t *audio, float *bandPtr, float *samples, int *pnt)\n{\n\tfloat *samples_tmp = audio->synth_mono_buff;\n\tfloat *tmp1 = samples_tmp;\n\tint i, ret;\n\tint pnt1 = 0;\n\n\tret = mpeg3audio_synth_stereo(audio, bandPtr, 0, samples_tmp, &pnt1);\n\tsamples += *pnt;\n\n\tfor(i = 0; i < 32; i++)\n\t{\n    \t*samples = *tmp1;\n    \tsamples++;\n    \ttmp1 += 2;\n\t}\n\t*pnt += 32;\n\n\treturn ret;\n}\n\n\n/* Call this after every seek to reset the buffers */\nint mpeg3audio_reset_synths(mpeg3audio_t *audio)\n{\n\tint i, j, k;\n\tfor(i = 0; i < 2; i++)\n\t{\n\t\tfor(j = 0; j < 2; j++)\n\t\t{\n\t\t\tfor(k = 0; k < 0x110; k++)\n\t\t\t{\n\t\t\t\taudio->synth_stereo_buffs[i][j][k] = 0;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i = 0; i < 64; i++)\n\t{\n\t\taudio->synth_mono_buff[i] = 0;\n\t\taudio->layer2_scfsi_buf[i] = 0;\n\t}\n\tfor(i = 0; i < 2; i++)\n\t{\n\t\tfor(j = 0; j < 2; j++)\n\t\t{\n\t\t\tfor(k = 0; k < SBLIMIT * SSLIMIT; k++)\n\t\t\t{\n\t\t\t\taudio->mp3_block[i][j][k] = 0;\n\t\t\t}\n\t\t}\n\t}\n\taudio->mp3_blc[0] = 0;\n\taudio->mp3_blc[1] = 0;\n\tfor(i = 0; i < audio->channels; i++)\n\t{\n\t\tfor(j = 0; j < AC3_N / 2; j++)\n\t\t{\n\t\t\taudio->ac3_delay[i][j] = 0;\n\t\t}\n\t}\n\treturn 0;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/audio/tables.c",
    "content": "/* \n *\n *  This file is part of libmpeg3\n *\t\n * LibMPEG3\n * Author: Adam Williams <broadcast@earthling.net>\n * Page: heroine.linuxbox.com\n * Page: http://www.smalltalkconsulting.com/html/mpeg3source.html (for Squeak)\n *\n    LibMPEG3 was originally licenced under GPL. It was relicensed by\n    the author under the LGPL and the Squeak license on Nov 1st, 2000\n    \n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA \n    \n    Also licensed under the Squeak license.\n    http://www.squeak.org/license.html\n */\n \n#include \"mpeg3audio.h\"\n#include \"tables.h\"\n\n#include <math.h>\n\n/* Bitrate indexes */\nint mpeg3_tabsel_123[2][3][16] = {\n   { {0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,},\n     {0,32,48,56, 64, 80, 96,112,128,160,192,224,256,320,384,},\n     {0,32,40,48, 56, 64, 80, 96,112,128,160,192,224,256,320,} },\n\n   { {0,32,48,56,64,80,96,112,128,144,160,176,192,224,256,},\n     {0,8,16,24,32,40,48,56,64,80,96,112,128,144,160,},\n     {0,8,16,24,32,40,48,56,64,80,96,112,128,144,160,} }\n};\n\nlong mpeg3_freqs[9] = { 44100, 48000, 32000, 22050, 24000, 16000 , 11025 , 12000 , 8000 };\n\n#ifdef USE_3DNOW\nfloat mpeg3_decwin[2 * (512 + 32)];\nfloat mpeg3_cos64[32], mpeg3_cos32[16], mpeg3_cos16[8], mpeg3_cos8[4], mpeg3_cos4[2];\n#else\nfloat mpeg3_decwin[512 + 32];\nfloat mpeg3_cos64[16], mpeg3_cos32[8], mpeg3_cos16[4], mpeg3_cos8[2], mpeg3_cos4[1];\n#endif\n\nfloat *mpeg3_pnts[] = { mpeg3_cos64, mpeg3_cos32, mpeg3_cos16, mpeg3_cos8, mpeg3_cos4 };\n\nint mpeg3_grp_3tab[32 * 3] = { 0, };   /* used: 27 */\nint mpeg3_grp_5tab[128 * 3] = { 0, };  /* used: 125 */\nint mpeg3_grp_9tab[1024 * 3] = { 0, }; /* used: 729 */\nfloat mpeg3_muls[27][64];\t/* also used by layer 1 */\nfloat mpeg3_gainpow2[256 + 118 + 4];\nfloat mpeg3_ispow[8207];\nfloat mpeg3_aa_ca[8], mpeg3_aa_cs[8];\nfloat mpeg3_win[4][36];\nfloat mpeg3_win1[4][36];\nfloat mpeg3_COS1[12][6];\nfloat mpeg3_COS9[9];\nfloat mpeg3_COS6_1, mpeg3_COS6_2;\nfloat mpeg3_tfcos36[9];\nfloat mpeg3_tfcos12[3];\nfloat mpeg3_cos9[3], mpeg3_cos18[3];\nfloat mpeg3_tan1_1[16], mpeg3_tan2_1[16], mpeg3_tan1_2[16], mpeg3_tan2_2[16];\nfloat mpeg3_pow1_1[2][16], mpeg3_pow2_1[2][16], mpeg3_pow1_2[2][16], mpeg3_pow2_2[2][16];\n\n\nlong mpeg3_intwinbase[] = {\n     0,    -1,    -1,    -1,    -1,    -1,    -1,    -2,    -2,    -2,\n    -2,    -3,    -3,    -4,    -4,    -5,    -5,    -6,    -7,    -7,\n    -8,    -9,   -10,   -11,   -13,   -14,   -16,   -17,   -19,   -21,\n   -24,   -26,   -29,   -31,   -35,   -38,   -41,   -45,   -49,   -53,\n   -58,   -63,   -68,   -73,   -79,   -85,   -91,   -97,  -104,  -111,\n  -117,  -125,  -132,  -139,  -147,  -154,  -161,  -169,  -176,  -183,\n  -190,  -196,  -202,  -208,  -213,  -218,  -222,  -225,  -227,  -228,\n  -228,  -227,  -224,  -221,  -215,  -208,  -200,  -189,  -177,  -163,\n  -146,  -127,  -106,   -83,   -57,   -29,     2,    36,    72,   111,\n   153,   197,   244,   294,   347,   401,   459,   519,   581,   645,\n   711,   779,   848,   919,   991,  1064,  1137,  1210,  1283,  1356,\n  1428,  1498,  1567,  1634,  1698,  1759,  1817,  1870,  1919,  1962,\n  2001,  2032,  2057,  2075,  2085,  2087,  2080,  2063,  2037,  2000,\n  1952,  1893,  1822,  1739,  1644,  1535,  1414,  1280,  1131,   970,\n   794,   605,   402,   185,   -45,  -288,  -545,  -814, -1095, -1388,\n -1692, -2006, -2330, -2663, -3004, -3351, -3705, -4063, -4425, -4788,\n -5153, -5517, -5879, -6237, -6589, -6935, -7271, -7597, -7910, -8209,\n -8491, -8755, -8998, -9219, -9416, -9585, -9727, -9838, -9916, -9959,\n -9966, -9935, -9863, -9750, -9592, -9389, -9139, -8840, -8492, -8092,\n -7640, -7134, -6574, -5959, -5288, -4561, -3776, -2935, -2037, -1082,\n   -70,   998,  2122,  3300,  4533,  5818,  7154,  8540,  9975, 11455,\n 12980, 14548, 16155, 17799, 19478, 21189, 22929, 24694, 26482, 28289,\n 30112, 31947, 33791, 35640, 37489, 39336, 41176, 43006, 44821, 46617,\n 48390, 50137, 51853, 53534, 55178, 56778, 58333, 59838, 61289, 62684,\n 64019, 65290, 66494, 67629, 68692, 69679, 70590, 71420, 72169, 72835,\n 73415, 73908, 74313, 74630, 74856, 74992, 75038 };\n\nint mpeg3_longLimit[9][23];\nint mpeg3_shortLimit[9][14];\n\nstruct mpeg3_bandInfoStruct mpeg3_bandInfo[9] = \n{ \n\n/* MPEG 1.0 */\n { {0,4,8,12,16,20,24,30,36,44,52,62,74, 90,110,134,162,196,238,288,342,418,576},\n   {4,4,4,4,4,4,6,6,8, 8,10,12,16,20,24,28,34,42,50,54, 76,158},\n   {0,4*3,8*3,12*3,16*3,22*3,30*3,40*3,52*3,66*3, 84*3,106*3,136*3,192*3},\n   {4,4,4,4,6,8,10,12,14,18,22,30,56} } ,\n\n { {0,4,8,12,16,20,24,30,36,42,50,60,72, 88,106,128,156,190,230,276,330,384,576},\n   {4,4,4,4,4,4,6,6,6, 8,10,12,16,18,22,28,34,40,46,54, 54,192},\n   {0,4*3,8*3,12*3,16*3,22*3,28*3,38*3,50*3,64*3, 80*3,100*3,126*3,192*3},\n   {4,4,4,4,6,6,10,12,14,16,20,26,66} } ,\n\n { {0,4,8,12,16,20,24,30,36,44,54,66,82,102,126,156,194,240,296,364,448,550,576} ,\n   {4,4,4,4,4,4,6,6,8,10,12,16,20,24,30,38,46,56,68,84,102, 26} ,\n   {0,4*3,8*3,12*3,16*3,22*3,30*3,42*3,58*3,78*3,104*3,138*3,180*3,192*3} ,\n   {4,4,4,4,6,8,12,16,20,26,34,42,12} }  ,\n\n/* MPEG 2.0 */\n { {0,6,12,18,24,30,36,44,54,66,80,96,116,140,168,200,238,284,336,396,464,522,576},\n   {6,6,6,6,6,6,8,10,12,14,16,20,24,28,32,38,46,52,60,68,58,54 } ,\n   {0,4*3,8*3,12*3,18*3,24*3,32*3,42*3,56*3,74*3,100*3,132*3,174*3,192*3} ,\n   {4,4,4,6,6,8,10,14,18,26,32,42,18 } } ,\n\n { {0,6,12,18,24,30,36,44,54,66,80,96,114,136,162,194,232,278,330,394,464,540,576},\n   {6,6,6,6,6,6,8,10,12,14,16,18,22,26,32,38,46,52,64,70,76,36 } ,\n   {0,4*3,8*3,12*3,18*3,26*3,36*3,48*3,62*3,80*3,104*3,136*3,180*3,192*3} ,\n   {4,4,4,6,8,10,12,14,18,24,32,44,12 } } ,\n\n { {0,6,12,18,24,30,36,44,54,66,80,96,116,140,168,200,238,284,336,396,464,522,576},\n   {6,6,6,6,6,6,8,10,12,14,16,20,24,28,32,38,46,52,60,68,58,54 },\n   {0,4*3,8*3,12*3,18*3,26*3,36*3,48*3,62*3,80*3,104*3,134*3,174*3,192*3},\n   {4,4,4,6,8,10,12,14,18,24,30,40,18 } } ,\n/* MPEG 2.5 */\n { {0,6,12,18,24,30,36,44,54,66,80,96,116,140,168,200,238,284,336,396,464,522,576} ,\n   {6,6,6,6,6,6,8,10,12,14,16,20,24,28,32,38,46,52,60,68,58,54},\n   {0,12,24,36,54,78,108,144,186,240,312,402,522,576},\n   {4,4,4,6,8,10,12,14,18,24,30,40,18} },\n { {0,6,12,18,24,30,36,44,54,66,80,96,116,140,168,200,238,284,336,396,464,522,576} ,\n   {6,6,6,6,6,6,8,10,12,14,16,20,24,28,32,38,46,52,60,68,58,54},\n   {0,12,24,36,54,78,108,144,186,240,312,402,522,576},\n   {4,4,4,6,8,10,12,14,18,24,30,40,18} },\n { {0,12,24,36,48,60,72,88,108,132,160,192,232,280,336,400,476,566,568,570,572,574,576},\n   {12,12,12,12,12,12,16,20,24,28,32,40,48,56,64,76,90,2,2,2,2,2},\n   {0, 24, 48, 72,108,156,216,288,372,480,486,492,498,576},\n   {8,8,8,12,16,20,24,28,36,2,2,2,26} } ,\n};\n\nint mpeg3_mapbuf0[9][152];\nint mpeg3_mapbuf1[9][156];\nint mpeg3_mapbuf2[9][44];\nint *mpeg3_map[9][3];\nint *mpeg3_mapend[9][3];\n\nunsigned int mpeg3_n_slen2[512]; /* MPEG 2.0 slen for 'normal' mode */\nunsigned int mpeg3_i_slen2[256]; /* MPEG 2.0 slen for intensity stereo */\n\nint mpeg3audio_init_layer2(mpeg3audio_t *audio)\n{\n\tstatic double mulmul[27] = \n\t{\n    \t0.0 , -2.0/3.0 , 2.0/3.0 ,\n    \t2.0/7.0 , 2.0/15.0 , 2.0/31.0, 2.0/63.0 , 2.0/127.0 , 2.0/255.0 ,\n    \t2.0/511.0 , 2.0/1023.0 , 2.0/2047.0 , 2.0/4095.0 , 2.0/8191.0 ,\n    \t2.0/16383.0 , 2.0/32767.0 , 2.0/65535.0 ,\n    \t-4.0/5.0 , -2.0/5.0 , 2.0/5.0, 4.0/5.0 ,\n    \t-8.0/9.0 , -4.0/9.0 , -2.0/9.0 , 2.0/9.0 , 4.0/9.0 , 8.0/9.0 \n\t};\n\tstatic int base[3][9] = \n\t{\n    \t{ 1 , 0, 2 , } ,\n    \t{ 17, 18, 0 , 19, 20 , } ,\n    \t{ 21, 1, 22, 23, 0, 24, 25, 2, 26 } \n\t};\n\tstatic int tablen[3] = { 3, 5, 9 };\n\tstatic int *itable, *tables[3] = {mpeg3_grp_3tab, mpeg3_grp_5tab, mpeg3_grp_9tab};\n\tint i, j, k, l, len;\n\tfloat *table;\n\n\tfor(i = 0; i < 3; i++)\n\t{\n    \titable = tables[i];\n    \tlen = tablen[i];\n    \tfor(j = 0; j < len; j++)\n    \t\tfor(k = 0; k < len; k++)\n        \t\tfor(l = 0; l < len; l++)\n        \t\t{\n        \t\t\t*itable++ = base[i][l];\n        \t\t\t*itable++ = base[i][k];\n        \t\t\t*itable++ = base[i][j];\n        \t\t}\n\t}\n\n\tfor(k = 0; k < 27; k++)\n\t{\n    \tdouble m = mulmul[k];\n    \ttable = mpeg3_muls[k];\n    \tfor(j = 3, i = 0; i < 63; i++, j--)\n    \t    *table++ = m * pow(2.0, (double)j / 3.0);\n    \t*table++ = 0.0;\n\t}\n\treturn 0;\n}\n\nint mpeg3audio_init_layer3(mpeg3audio_t *audio)\n{\n\tint i, j, k, l;\n\tint down_sample_sblimit = 32;\n\n\taudio->mp3_block[0][0][0] = 0;\n\taudio->mp3_blc[0] = 0;\n\taudio->mp3_blc[1] = 0;\n\n\tfor(i = -256; i < 118 + 4; i++)\n\t  \tmpeg3_gainpow2[i + 256] = pow((double)2.0, -0.25 * (double)(i + 210));\n\n\tfor(i = 0; i < 8207; i++)\n\t    mpeg3_ispow[i] = pow((double)i, (double)4.0 / 3.0);\n\n\tfor(i = 0; i < 8; i++) \n\t{\n\t\tstatic double Ci[8] = {-0.6,-0.535,-0.33,-0.185,-0.095,-0.041,-0.0142,-0.0037};\n\t\tdouble sq = sqrt(1.0+Ci[i]*Ci[i]);\n\t\tmpeg3_aa_cs[i] = 1.0/sq;\n\t\tmpeg3_aa_ca[i] = Ci[i]/sq;\n\t}\n\n\tfor(i = 0; i < 18; i++) \n\t{\n\t\tmpeg3_win[0][i]    = mpeg3_win[1][i]    = 0.5 * sin( M_PI / 72.0 * (double)(2 * (i + 0)  + 1) ) / cos (M_PI * (double)(2 * (i + 0)  + 19) / 72.0);\n\t\tmpeg3_win[0][i+18] = mpeg3_win[3][i+18] = 0.5 * sin( M_PI / 72.0 * (double)(2 * (i + 18) + 1) ) / cos (M_PI * (double)(2 * (i + 18) + 19) / 72.0);\n\t}\n\tfor(i = 0; i < 6; i++) \n\t{\n\t\tmpeg3_win[1][i + 18] = 0.5 / cos ( M_PI * (double) (2*(i+18)+19) / 72.0 );\n\t\tmpeg3_win[3][i + 12] = 0.5 / cos ( M_PI * (double) (2*(i+12)+19) / 72.0 );\n\t\tmpeg3_win[1][i + 24] = 0.5 * sin( M_PI / 24.0 * (double)(2 * i + 13) ) / cos (M_PI * (double)(2 * (i + 24)+ 19) / 72.0 );\n\t\tmpeg3_win[1][i + 30] = mpeg3_win[3][i] = 0.0;\n\t\tmpeg3_win[3][i + 6 ] = 0.5 * sin( M_PI / 24.0 * (double)(2 * i + 1) )  / cos (M_PI * (double)(2 * (i + 6 )+ 19) / 72.0 );\n\t}\n\n\tfor(i = 0; i < 9; i++)\n\t  \tmpeg3_COS9[i] = cos(M_PI / 18.0 * (double)i);\n\n\tfor(i = 0; i < 9; i++)\n\t  \tmpeg3_tfcos36[i] = 0.5 / cos (M_PI * (double) (i*2+1) / 36.0);\n\tfor(i = 0; i < 3; i++)\n\t  \tmpeg3_tfcos12[i] = 0.5 / cos (M_PI * (double) (i*2+1) / 12.0);\n\n\tmpeg3_COS6_1 = cos( M_PI / 6.0 * (double) 1);\n\tmpeg3_COS6_2 = cos( M_PI / 6.0 * (double) 2);\n\n\tmpeg3_cos9[0]  = cos(1.0 * M_PI / 9.0);\n\tmpeg3_cos9[1]  = cos(5.0 * M_PI / 9.0);\n\tmpeg3_cos9[2]  = cos(7.0 * M_PI / 9.0);\n\tmpeg3_cos18[0] = cos(1.0 * M_PI / 18.0);\n\tmpeg3_cos18[1] = cos(11.0 * M_PI / 18.0);\n\tmpeg3_cos18[2] = cos(13.0 * M_PI / 18.0);\n\n\tfor(i = 0; i < 12; i++) \n\t{\n\t\tmpeg3_win[2][i]  = 0.5 * sin(M_PI / 24.0 * (double) (2 * i + 1)) / cos(M_PI * (double)(2 * i + 7) / 24.0);\n\t\tfor(j = 0; j < 6; j++)\n    \t\tmpeg3_COS1[i][j] = cos(M_PI / 24.0 * (double) ((2 * i + 7) * (2 * j + 1)));\n\t}\n\n\tfor(j = 0; j < 4; j++) \n\t{\n\t\tstatic int len[4] = {36, 36, 12, 36};\n\t\tfor(i = 0; i < len[j]; i += 2)\n    \t  \tmpeg3_win1[j][i] = + mpeg3_win[j][i];\n\t\tfor(i = 1; i < len[j]; i += 2)\n    \t  \tmpeg3_win1[j][i] = - mpeg3_win[j][i];\n\t}\n\n\tfor(i = 0; i < 16; i++) \n\t{\n\t\tdouble t = tan( (double) i * M_PI / 12.0 );\n\t\tmpeg3_tan1_1[i] = t / (1.0 + t);\n\t\tmpeg3_tan2_1[i] = 1.0 / (1.0 + t);\n\t\tmpeg3_tan1_2[i] = M_SQRT2 * t / (1.0 + t);\n\t\tmpeg3_tan2_2[i] = M_SQRT2 / (1.0 + t);\n\n\t\tfor(j = 0; j < 2; j++) \n\t\t{\n    \t\tdouble base = pow(2.0, -0.25 * (j + 1.0));\n    \t\tdouble p1 = 1.0,p2 = 1.0;\n    \t\tif(i > 0) \n\t\t\t{\n    \t\t\tif( i & 1 )\n        \t\t  p1 = pow(base, (i + 1.0) * 0.5);\n    \t\t\telse\n        \t\t  p2 = pow(base, i * 0.5);\n    \t\t}\n    \t\tmpeg3_pow1_1[j][i] = p1;\n    \t\tmpeg3_pow2_1[j][i] = p2;\n    \t\tmpeg3_pow1_2[j][i] = M_SQRT2 * p1;\n    \t\tmpeg3_pow2_2[j][i] = M_SQRT2 * p2;\n\t\t}\n\t}\n\n\tfor(j = 0; j < 9; j++) \n\t{\n\t\tstruct mpeg3_bandInfoStruct *bi = &mpeg3_bandInfo[j];\n\t\tint *mp;\n\t\tint cb,lwin;\n\t\tint *bdf;\n\n\t\tmp = mpeg3_map[j][0] = mpeg3_mapbuf0[j];\n\t\tbdf = bi->longDiff;\n\t\tfor(i = 0, cb = 0; cb < 8; cb++, i += *bdf++) \n\t\t{\n\t\t\t*mp++ = (*bdf) >> 1;\n\t\t\t*mp++ = i;\n\t\t\t*mp++ = 3;\n\t\t\t*mp++ = cb;\n\t \t}\n\t\tbdf = bi->shortDiff + 3;\n\t\tfor(cb = 3; cb < 13; cb++) \n\t\t{\n\t\t\tint l = (*bdf++) >> 1;\n\t\t\tfor(lwin = 0; lwin < 3; lwin++) \n\t\t\t{\n    \t\t\t*mp++ = l;\n    \t\t\t*mp++ = i + lwin;\n    \t\t\t*mp++ = lwin;\n    \t\t\t*mp++ = cb;\n\t\t\t}\n\t\t\ti += 6 * l;\n\t\t}\n\t \tmpeg3_mapend[j][0] = mp;\n\n\t\tmp = mpeg3_map[j][1] = mpeg3_mapbuf1[j];\n\t\tbdf = bi->shortDiff+0;\n\t\tfor(i = 0,cb = 0; cb < 13; cb++) \n\t\t{\n\t\t    int l = (*bdf++) >> 1;\n\t\t    for(lwin = 0; lwin < 3; lwin++) \n\t\t    {\n    \t    \t*mp++ = l;\n    \t    \t*mp++ = i + lwin;\n    \t    \t*mp++ = lwin;\n    \t    \t*mp++ = cb;\n\t\t    }\n\t\t    i += 6 * l;\n\t\t}\n\t\tmpeg3_mapend[j][1] = mp;\n\n\t\tmp = mpeg3_map[j][2] = mpeg3_mapbuf2[j];\n\t\tbdf = bi->longDiff;\n\t\tfor(cb = 0; cb < 22 ; cb++) \n\t\t{\n\t\t  *mp++ = (*bdf++) >> 1;\n\t\t  *mp++ = cb;\n\t\t}\n\t\tmpeg3_mapend[j][2] = mp;\n\t}\n\n\tfor(j = 0; j < 9; j++) \n\t{\n\t\tfor(i = 0; i < 23; i++) \n\t\t{\n    \t\tmpeg3_longLimit[j][i] = (mpeg3_bandInfo[j].longIdx[i] - 1 + 8) / 18 + 1;\n    \t\tif(mpeg3_longLimit[j][i] > (down_sample_sblimit))\n    \t\t\tmpeg3_longLimit[j][i] = down_sample_sblimit;\n\t\t}\n\t\tfor(i = 0; i < 14; i++) \n\t\t{\n    \t\tmpeg3_shortLimit[j][i] = (mpeg3_bandInfo[j].shortIdx[i] - 1) / 18 + 1;\n    \t\tif(mpeg3_shortLimit[j][i] > (down_sample_sblimit) )\n    \t\t\tmpeg3_shortLimit[j][i] = down_sample_sblimit;\n\t\t}\n\t}\n\n\tfor(i = 0; i < 5; i++) \n\t{\n\t\tfor(j = 0; j < 6; j++) \n\t\t{\n    \t\tfor(k = 0; k < 6; k++) \n\t\t\t{\n    \t\t\tint n = k + j * 6 + i * 36;\n    \t\t\tmpeg3_i_slen2[n] = i | (j << 3) | (k << 6) | (3 << 12);\n    \t\t}\n\t\t}\n\t}\n\tfor(i = 0; i < 4; i++) \n\t{\n\t\tfor(j = 0; j < 4; j++) \n\t\t{\n    \t\tfor(k = 0; k < 4; k++) \n\t\t\t{\n    \t\t\tint n = k + j * 4 + i * 16;\n    \t\t\tmpeg3_i_slen2[n+180] = i | (j << 3) | (k << 6) | (4 << 12);\n    \t\t}\n\t\t}\n\t}\n\tfor(i = 0; i < 4; i++) \n\t{\n\t\tfor(j = 0; j < 3; j++) \n\t\t{\n    \t\tint n = j + i * 3;\n    \t\tmpeg3_i_slen2[n + 244] = i | (j << 3) | (5 << 12);\n    \t\tmpeg3_n_slen2[n + 500] = i | (j << 3) | (2 << 12) | (1 << 15);\n\t\t}\n\t}\n\n\tfor(i = 0; i < 5; i++) \n\t{\n\t\tfor(j = 0; j < 5; j++) \n\t\t{\n    \t\tfor(k = 0; k < 4; k++) \n\t\t\t{\n    \t\t\tfor(l = 0; l < 4; l++) \n\t\t\t\t{\n        \t\t\tint n = l + k * 4 + j * 16 + i * 80;\n        \t\t\tmpeg3_n_slen2[n] = i | (j << 3) | ( k << 6) | (l << 9) | (0 << 12);\n    \t\t\t}\n    \t\t}\n\t\t}\n\t}\n\tfor(i = 0; i < 5; i++) \n\t{\n\t\tfor(j = 0; j < 5; j++) \n\t\t{\n    \t\tfor(k = 0; k < 4; k++) \n\t\t\t{\n    \t\t\tint n = k + j * 4 + i * 20;\n    \t\t\tmpeg3_n_slen2[n + 400] = i | (j << 3) | (k << 6) | (1 << 12);\n    \t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n\nint mpeg3audio_new_decode_tables(mpeg3audio_t *audio)\n{\n\tint i, j, k, kr, divv;\n\tfloat *costab;\n\tint idx;\n\tlong scaleval = audio->outscale;\n\t\n  \n\tfor(i = 0; i < 5; i++)\n\t{\n    \tkr = 0x10 >> i; \n\t\tdivv = 0x40 >> i;\n    \tcostab = mpeg3_pnts[i];\n    \tfor(k = 0; k < kr; k++)\n    \t\tcostab[k] = 1.0 / (2.0 * cos(M_PI * ((double)k * 2.0 + 1.0) / (double)divv));\n\n#ifdef USE_3DNOW\n    \tfor(k = 0; k < kr; k++)\n    \t\tcostab[k + kr] = -costab[k];\n#endif\n\n\t}\n\n\tidx = 0;\n\tscaleval = -scaleval;\n\tfor(i = 0, j = 0; i < 256; i++, j++,idx += 32)\n\t{\n    \tif(idx < 512 + 16)\n    \t\tmpeg3_decwin[idx+16] = mpeg3_decwin[idx] = (double)mpeg3_intwinbase[j] / 65536.0 * (double)scaleval;\n\n    \tif(i % 32 == 31)\n    \t\tidx -= 1023;\n    \tif(i % 64 == 63)\n    \t\tscaleval = -scaleval;\n\t}\n\n\tfor( ; i < 512; i++, j--, idx += 32)\n\t{\n    \tif(idx < 512 + 16)\n    \t\tmpeg3_decwin[idx + 16] = mpeg3_decwin[idx] = (double)mpeg3_intwinbase[j] / 65536.0 * (double)scaleval;\n\n    \tif(i % 32 == 31)\n    \t\tidx -= 1023;\n    \tif(i % 64 == 63)\n    \t\tscaleval = -scaleval;\n\t}\n\n#ifdef USE_3DNOW\n\tif(!param.down_sample) \n\t{\n    \tfor(i = 0; i < 512 + 32; i++) \n\t\t{\n    \t\tmpeg3_decwin[512 + 31 - i] *= 65536.0; /* allows faster clipping in 3dnow code */\n    \t\tmpeg3_decwin[512 + 32 + i] = mpeg3_decwin[512 + 31 - i];\n    \t}\n\t}\n#endif\n\n/* Initialize AC3 */\n\taudio->ac3_lfsr_state = 1;\n\tmpeg3audio_imdct_init(audio);\n/* Initialize MPEG */\n\tmpeg3audio_init_layer2(audio); /* inits also shared tables with layer1 */\n\tmpeg3audio_init_layer3(audio);\n\treturn 0;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/audio/tables.h",
    "content": "#ifndef TABLES_H\n#define TABLES_H\n\nextern int mpeg3_tabsel_123[2][3][16];\n\nextern long mpeg3_freqs[9];\n\nstruct mpeg3_bandInfoStruct \n{\n\tint longIdx[23];\n\tint longDiff[22];\n\tint shortIdx[14];\n\tint shortDiff[13];\n};\n\n\nextern float mpeg3_decwin[512 + 32];\nextern float mpeg3_cos64[16], mpeg3_cos32[8], mpeg3_cos16[4], mpeg3_cos8[2], mpeg3_cos4[1];\n\nextern float *mpeg3_pnts[5];\n\nextern int mpeg3_grp_3tab[32 * 3];   /* used: 27 */\nextern int mpeg3_grp_5tab[128 * 3];  /* used: 125 */\nextern int mpeg3_grp_9tab[1024 * 3]; /* used: 729 */\nextern float mpeg3_muls[27][64];\t/* also used by layer 1 */\nextern float mpeg3_gainpow2[256 + 118 + 4];\nextern long mpeg3_intwinbase[257];\nextern float mpeg3_ispow[8207];\nextern float mpeg3_aa_ca[8], mpeg3_aa_cs[8];\nextern float mpeg3_win[4][36];\nextern float mpeg3_win1[4][36];\nextern float mpeg3_COS1[12][6];\nextern float mpeg3_COS9[9];\nextern float mpeg3_COS6_1, mpeg3_COS6_2;\nextern float mpeg3_tfcos36[9];\nextern float mpeg3_tfcos12[3];\nextern float mpeg3_cos9[3], mpeg3_cos18[3];\nextern float mpeg3_tan1_1[16], mpeg3_tan2_1[16], mpeg3_tan1_2[16], mpeg3_tan2_2[16];\nextern float mpeg3_pow1_1[2][16], mpeg3_pow2_1[2][16], mpeg3_pow1_2[2][16], mpeg3_pow2_2[2][16];\n\nextern int mpeg3_longLimit[9][23];\nextern int mpeg3_shortLimit[9][14];\n\nextern struct mpeg3_bandInfoStruct mpeg3_bandInfo[9];\n\nextern int mpeg3_mapbuf0[9][152];\nextern int mpeg3_mapbuf1[9][156];\nextern int mpeg3_mapbuf2[9][44];\nextern int *mpeg3_map[9][3];\nextern int *mpeg3_mapend[9][3];\n\nextern unsigned int mpeg3_n_slen2[512]; /* MPEG 2.0 slen for 'normal' mode */\nextern unsigned int mpeg3_i_slen2[256]; /* MPEG 2.0 slen for intensity stereo */\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/bitstream.c",
    "content": "/* \n *\n *  This file is part of libmpeg3\n *\t\n * LibMPEG3\n * Author: Adam Williams <broadcast@earthling.net>\n * Page: heroine.linuxbox.com\n * Page: http://www.smalltalkconsulting.com/html/mpeg3source.html (for Squeak)\n *\n    LibMPEG3 was originally licenced under GPL. It was relicensed by\n    the author under the LGPL and the Squeak license on Nov 1st, 2000\n    \n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA \n    \n    Also licensed under the Squeak license.\n    http://www.squeak.org/license.html\n */\n \n /*  Changed Sept 15th by John M McIntosh to support Macintosh & Squeak\n */\n#include \"mpeg3private.h\"\n#include \"mpeg3protos.h\"\n\n#include <stdlib.h>\n\nmpeg3_bits_t* mpeg3bits_new_stream(mpeg3_t *file, mpeg3_demuxer_t *demuxer)\n{\n\tmpeg3_bits_t *stream = (mpeg3_bits_t *) memoryAllocate(1,sizeof(mpeg3_bits_t));\n\tstream->bfr = 0;\n\tstream->bfr_size = 0;\n\tstream->bit_number = 0;\n\tstream->file = file;\n\tstream->demuxer = demuxer;\n\tstream->input_ptr = 0;\n\treturn stream;\n}\n\nint mpeg3bits_delete_stream(mpeg3_bits_t* stream)\n{\n\tmemoryFree(stream);\n\treturn 0;\n}\n\n\n/* Fill a buffer.  Only works if bit_number is on an 8 bit boundary */\nint mpeg3bits_read_buffer(mpeg3_bits_t* stream, unsigned char *buffer, int bytes)\n{\n\tint result, i = 0;\n\twhile(stream->bit_number > 0)\n\t{\n\t\tstream->bit_number -= 8;\n\t\tmpeg3demux_read_prev_char(stream->demuxer);\n\t}\n\n\tstream->bit_number = 0;\n\tstream->bfr_size = 0;\n\tstream->bfr = 0;\n\tresult = mpeg3demux_read_data(stream->demuxer, buffer, bytes);\n\treturn result;\n}\n\n/* For mp3 decompression use a pointer in a buffer for getbits. */\nint mpeg3bits_use_ptr(mpeg3_bits_t* stream, unsigned char *buffer)\n{\n\tstream->bfr_size = stream->bit_number = 0;\n\tstream->bfr = 0;\n\tstream->input_ptr = buffer;\n\treturn 0;\n}\n\n/* Go back to using the demuxer for getbits in mp3. */\nint mpeg3bits_use_demuxer(mpeg3_bits_t* stream)\n{\n\tif(stream->input_ptr)\n\t{\n\t\tstream->bfr_size = stream->bit_number = 0;\n\t\tstream->input_ptr = 0;\n\t\tstream->bfr = 0;\n\t}\n\n\treturn 0;\n}\n\n/* Reconfigure for reverse operation */\n/* Default is forward operation */\nvoid mpeg3bits_start_reverse(mpeg3_bits_t* stream)\n{\n\tint i;\n\tfor(i = 0; i < stream->bfr_size; i += 8)\n\t\tif(stream->input_ptr)\n\t\t\tstream->input_ptr--;\n\t\telse\n\t\t\tmpeg3demux_read_prev_char(stream->demuxer);\n}\n\n/* Reconfigure for forward operation */\nvoid mpeg3bits_start_forward(mpeg3_bits_t* stream)\n{\n\tint i;\n\tfor(i = 0; i < stream->bfr_size; i += 8)\n\t\tif(stream->input_ptr)\n\t\t\tstream->input_ptr++;\n\t\telse\n\t\t\tmpeg3demux_read_char(stream->demuxer);\n}\n\n/* Erase the buffer with the next 4 bytes in the file. */\nint mpeg3bits_refill(mpeg3_bits_t* stream)\n{\n\tstream->bit_number = 32;\n\tstream->bfr_size = 32;\n\n\tif(stream->input_ptr)\n\t{\n\t\tstream->bfr = (unsigned int)(*stream->input_ptr++) << 24;\n\t\tstream->bfr |= (unsigned int)(*stream->input_ptr++) << 16;\n\t\tstream->bfr |= (unsigned int)(*stream->input_ptr++) << 8;\n\t\tstream->bfr |= *stream->input_ptr++;\n\t}\n\telse\n\t{\n\t\tstream->bfr = mpeg3demux_read_char(stream->demuxer) << 24;\n\t\tstream->bfr |= mpeg3demux_read_char(stream->demuxer) << 16;\n\t\tstream->bfr |= mpeg3demux_read_char(stream->demuxer) << 8;\n\t\tstream->bfr |= mpeg3demux_read_char(stream->demuxer);\n\t}\n\treturn mpeg3demux_eof(stream->demuxer);\n}\n\n/* Erase the buffer with the previous 4 bytes in the file. */\nint mpeg3bits_refill_backwards(mpeg3_bits_t* stream)\n{\n\tstream->bit_number = 0;\n\tstream->bfr_size = 32;\n\tstream->bfr = mpeg3demux_read_prev_char(stream->demuxer);\n\tstream->bfr |= (unsigned int)mpeg3demux_read_prev_char(stream->demuxer) << 8;\n\tstream->bfr |= (unsigned int)mpeg3demux_read_prev_char(stream->demuxer) << 16;\n\tstream->bfr |= (unsigned int)mpeg3demux_read_prev_char(stream->demuxer) << 24;\n\treturn mpeg3demux_eof(stream->demuxer);\n}\n\nint mpeg3bits_byte_align(mpeg3_bits_t *stream)\n{\n\tstream->bit_number = (stream->bit_number + 7) & 0xf8;\n\treturn 0;\n}\n\nint mpeg3bits_seek_end(mpeg3_bits_t* stream)\n{\n\tstream->bfr_size = stream->bit_number = 0;\n\treturn mpeg3demux_seek_byte(stream->demuxer, mpeg3demuxer_total_bytes(stream->demuxer));\n}\n\nint mpeg3bits_seek_start(mpeg3_bits_t* stream)\n{\n\tstream->bfr_size = stream->bit_number = 0;\n\treturn mpeg3demux_seek_byte(stream->demuxer, 0);\n}\n\nint mpeg3bits_seek_time(mpeg3_bits_t* stream, double time_position)\n{\n\tstream->bfr_size = stream->bit_number = 0;\n\treturn mpeg3demux_seek_time(stream->demuxer, time_position);\n}\n\nint mpeg3bits_seek_byte(mpeg3_bits_t* stream, long position)\n{\n\tstream->bfr_size = stream->bit_number = 0;\n\treturn mpeg3demux_seek_byte(stream->demuxer, position);\n}\n\nint mpeg3bits_seek_percentage(mpeg3_bits_t* stream, double percentage)\n{\n\tstream->bfr_size = stream->bit_number = 0;\n\treturn mpeg3demux_seek_percentage(stream->demuxer, percentage);\n}\n\nint mpeg3bits_tell(mpeg3_bits_t* stream)\n{\n\treturn mpeg3demux_tell(stream->demuxer);\n}\n\nint mpeg3bits_getbitoffset(mpeg3_bits_t *stream)\n{\n\treturn stream->bit_number & 7;\n}\n\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/bitstream.h",
    "content": "#ifndef BITSTREAM_H\n#define BITSTREAM_H\n\n#include \"mpeg3demux.h\"\n\n//                                    next bit in forward direction\n//                                  next bit in reverse direction |\n//                                                              v v\n// | | | | | | | | | | | | | | | | | | | | | | | | | | |1|1|1|1|1|1| */\n//                                                     ^         ^\n//                                                     |         bit_number = 1\n//                                                     bfr_size = 6\n\ntypedef struct\n{\n\tunsigned MPEG3_INT32 bfr;  /* bfr = buffer for bits */\n\tint bit_number;   /* position of pointer in bfr */\n\tint bfr_size;    /* number of bits in bfr.  Should always be a multiple of 8 */\n\tvoid *file;    /* Mpeg2 file */\n\tmpeg3_demuxer_t *demuxer;   /* Mpeg2 demuxer */\n/* If the input ptr is true, data is read from it instead of the demuxer. */\n\tunsigned char *input_ptr;\n} mpeg3_bits_t;\n\nunsigned int mpeg3demux_read_char_packet(mpeg3_demuxer_t *demuxer);\nunsigned int mpeg3demux_read_prev_char_packet(mpeg3_demuxer_t *demuxer);\n\n/* ======================================================================== */\n/*                                 Entry Points */\n/* ======================================================================== */\n\n#define mpeg3bits_tell_percentage(stream) mpeg3demux_tell_percentage((stream)->demuxer)\n\n#define mpeg3bits_packet_time(stream) mpeg3demux_current_time((stream)->demuxer)\n\n#define mpeg3bits_time_offset(stream) mepg2demux_time_offset((stream)->demuxer)\n\n#define mpeg3bits_error(stream) mpeg3demux_error((stream)->demuxer)\n\n#define mpeg3bits_eof(stream) mpeg3demux_eof((stream)->demuxer)\n\n#define mpeg3bits_bof(stream) mpeg3demux_bof((stream)->demuxer)\n\n/* Read bytes backward from the file until the reverse_bits is full. */\nstatic inline void mpeg3bits_fill_reverse_bits(mpeg3_bits_t* stream, int bits)\n{\n// Right justify\n\twhile(stream->bit_number > 7)\n\t{\n\t\tstream->bfr >>= 8;\n\t\tstream->bfr_size -= 8;\n\t\tstream->bit_number -= 8;\n\t}\n\n// Insert bytes before bfr_size\n\twhile(stream->bfr_size - stream->bit_number < bits)\n\t{\n\t\tif(stream->input_ptr)\n\t\t\tstream->bfr |= (unsigned int)(*--stream->input_ptr) << stream->bfr_size;\n\t\telse\n\t\t\tstream->bfr |= (unsigned int)mpeg3demux_read_prev_char(stream->demuxer) << stream->bfr_size;\n\t\tstream->bfr_size += 8;\n\t}\n}\n\n/* Read bytes forward from the file until the forward_bits is full. */\nstatic inline void mpeg3bits_fill_bits(mpeg3_bits_t* stream, int bits)\n{\n\twhile(stream->bit_number < bits)\n\t{\n\t\tstream->bfr <<= 8;\n\t\tif(stream->input_ptr)\n\t\t{\n\t\t\tstream->bfr |= *stream->input_ptr++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tstream->bfr |= mpeg3demux_read_char(stream->demuxer);\n\t\t}\n\t\tstream->bit_number += 8;\n\t\tstream->bfr_size += 8;\n\t\tif(stream->bfr_size > 32) stream->bfr_size = 32;\n\t}\n}\n\n/* Return 8 bits, advancing the file position. */\nstatic inline unsigned int mpeg3bits_getbyte_noptr(mpeg3_bits_t* stream)\n{\n\tif(stream->bit_number < 8)\n\t{\n\t\tstream->bfr <<= 8;\n\t\tif(stream->input_ptr)\n\t\t\tstream->bfr |= *stream->input_ptr++;\n\t\telse\n\t\t\tstream->bfr |= mpeg3demux_read_char(stream->demuxer);\n\n\t\tstream->bfr_size += 8;\n\t\tif(stream->bfr_size > 32) stream->bfr_size = 32;\n\n\t\treturn (stream->bfr >> stream->bit_number) & 0xff;\n\t}\n\treturn (stream->bfr >> (stream->bit_number -= 8)) & 0xff;\n}\n\nstatic inline unsigned int mpeg3bits_getbit_noptr(mpeg3_bits_t* stream)\n{\n\tif(!stream->bit_number)\n\t{\n\t\tstream->bfr <<= 8;\n\t\tstream->bfr |= mpeg3demux_read_char(stream->demuxer);\n\n\t\tstream->bfr_size += 8;\n\t\tif(stream->bfr_size > 32) stream->bfr_size = 32;\n\n\t\tstream->bit_number = 7;\n\n\t\treturn (stream->bfr >> 7) & 0x1;\n\t}\n\treturn (stream->bfr >> (--stream->bit_number)) & (0x1);\n}\n\n/* Return n number of bits, advancing the file position. */\n/* Use in place of flushbits */\nstatic inline unsigned int mpeg3bits_getbits(mpeg3_bits_t* stream, int bits)\n{\n\tif(bits <= 0) return 0;\n\tmpeg3bits_fill_bits(stream, bits);\n\treturn (stream->bfr >> (stream->bit_number -= bits)) & (0xffffffff >> (32 - bits));\n}\n\nstatic inline unsigned int mpeg3bits_showbits24_noptr(mpeg3_bits_t* stream)\n{\n\twhile(stream->bit_number < 24)\n\t{\n\t\tstream->bfr <<= 8;\n\t\tstream->bfr |= mpeg3demux_read_char(stream->demuxer);\n\t\tstream->bit_number += 8;\n\t\tstream->bfr_size += 8;\n\t\tif(stream->bfr_size > 32) stream->bfr_size = 32;\n\t}\n\treturn (stream->bfr >> (stream->bit_number - 24)) & 0xffffff;\n}\n\nstatic inline unsigned int mpeg3bits_showbits32_noptr(mpeg3_bits_t* stream)\n{\n\twhile(stream->bit_number < 32)\n\t{\n\t\tstream->bfr <<= 8;\n\t\tstream->bfr |= mpeg3demux_read_char(stream->demuxer);\n\t\tstream->bit_number += 8;\n\t\tstream->bfr_size += 8;\n\t\tif(stream->bfr_size > 32) stream->bfr_size = 32;\n\t}\n\treturn stream->bfr;\n}\n\nstatic inline unsigned int mpeg3bits_showbits(mpeg3_bits_t* stream, int bits)\n{\n\tmpeg3bits_fill_bits(stream, bits);\n\treturn (stream->bfr >> (stream->bit_number - bits)) & (0xffffffff >> (32 - bits));\n}\n\nstatic inline unsigned int mpeg3bits_getbits_reverse(mpeg3_bits_t* stream, int bits)\n{\n\tunsigned int result;\n\tmpeg3bits_fill_reverse_bits(stream, bits);\n\tresult = (stream->bfr >> stream->bit_number) & (0xffffffff >> (32 - bits));\n\tstream->bit_number += bits;\n\treturn result;\n}\n\nstatic inline unsigned int mpeg3bits_showbits_reverse(mpeg3_bits_t* stream, int bits)\n{\n\tunsigned int result;\n\tmpeg3bits_fill_reverse_bits(stream, bits);\n\tresult = (stream->bfr >> stream->bit_number) & (0xffffffff >> (32 - bits));\n\treturn result;\n}\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/changesForSqueak.c",
    "content": "/****************************************************************************\n*   PROJECT: Changes for Squeak \n*   FILE:    changesForSqueak.c\n*   CONTENT: \n*\n*   AUTHOR:  John McIntosh, and others.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: changesForSqueak.c 506 2003-02-08 18:23:30Z johnmci $\n*\n*   NOTES: See change log below.\n*\t12/27/2001 JMM added support to build as a OS-X Bundle, a bit werid because its a mixture of unix and mac OS\n*****************************************************************************/\n/* Squeak on MPEG\n   by John M McIntosh johnmci#smalltalkconsulting.com  Sept 2000\n   \n   For the macintosh I've \n   1) coded up #ifdef for TARGET_OS_MAC\n   2) Coded around the pthreads\n   3) ignored most of mpeg3io_device\n   4) some changes to make CodeWarrior 5 happy\n   \n   In General\n   \n   1) Added some casts\n   2) had some problems with Mpeg3_stream_coeffs_t\n   3) coded up memoryAllocate/memoryFree versus malloc/cmalloc/free\n   4) created a mpeg3_generate_toc_for_Squeak\n   5) Ignore perror\n   \n*/\n// Nov 2nd, 2000  JMM changed memoryAllocate, use calloc\n// Sept 7nd, 2001 JMM added carbon logic\n// May 31st, 2002 JMM a few additions to make it compile on the mac with latest code\n\n#include <string.h>\n#include \"mpeg3private.h\"\n#include \"changesForSqueak.h\"\n\n#if defined(TARGET_OS_MAC) && !defined ( __APPLE__ ) && !defined ( __MACH__ )\n#include <Memory.h>\n#include <QuickDraw.h>\n#include \"sq.h\"\n#endif\n\n#ifdef WIN32\n#include <windows.h>\n#endif\n\nmpeg3_demuxer_t* mpeg3_new_demuxer(mpeg3_t *file, int do_audio, int do_video, int stream_id);\nmpeg3_title_t* mpeg3_new_title(mpeg3_t *file, char *path);\nmpeg3demux_timecode_t* mpeg3_append_timecode(mpeg3_demuxer_t *demuxer, \n\t\tmpeg3_title_t *title, \n\t\tlong prev_byte, \n\t\tdouble prev_time, \n\t\tlong next_byte, \n\t\tdouble next_time,\n\t\tint dont_store);\nvoid appendStringToBufferIfPossible(char *buffer,char *append,int bufferSize);\n\t\t\n\nstatic long counter = 0;\n\nvoid * memoryAllocate(int number,unsigned size) {\n    void * stuff;\n#if defined(TARGET_OS_MAC) && !defined ( __APPLE__ ) && !defined ( __MACH__ )\n#if TARGET_API_MAC_CARBON\n    stuff = (void *) NewPtrClear(size*number);\n#else\n    stuff = (void *) NewPtrSysClear(size*number);\n#endif\n//    if (stuff == nil) Debugger();\n#else\n    stuff = (void *) calloc(size,number);\n#endif\n    counter++;\n    return stuff;\n}\n\nvoid memoryFree(void *stuff) {\n    counter--;\n#if defined(TARGET_OS_MAC) && !defined ( __APPLE__ ) && !defined ( __MACH__ )\n    DisposePtr((char *)stuff);\n#else\n    free(stuff);\n#endif\n}\n\n\n\n#if (defined(TARGET_OS_MAC) && !defined ( __APPLE__ ) && !defined ( __MACH__ )) || defined(WIN32)\n#define NEEDSTRFUNCS\n#endif\n\n#ifdef NEEDSTRFUNCS\nvoid perror(const char * string) {\n\n}\nint\t\t\tstrncasecmp(const char *str1, const char *str2, size_t nchars);\nint\t\t\tstrcasecmp (const char *str1, const char *str2);\n\nint\t\t\tstrncasecmp(const char *s1, const char *s2, size_t len)\n{\n  /* Return true if the two strings are the same, not considering case. */\n\tint i, c1, c2;\n\n\tfor (i = 0; i < len; i++) {\n\t\tc1 = s1[i];\n\t\tc2 = s2[i];\n\t\tif ((c1 >= 'a') && (c1 <= 'z')) {\n\t\t\tc1 = c1 - ('a' - 'A');\n\t\t}\n\t\tif ((c2 >= 'a') && (c2 <= 'z')) {\n\t\t\tc2 = c2 - ('a' - 'A');\n\t\t}\n\t\tif (c1 != c2) return 0;\n\t}\n\treturn 1;\n}\n\nint\t\t\tstrcasecmp (const char *str1, const char *str2) {\n\tif (strlen(str1) != strlen(str2)) return 0;\n    return strncasecmp(str1,str2,strlen(str1));\n}\n\n\n#endif\n\n#ifdef WIN32\nint bzero(char* block, long size) {\n\tZeroMemory(block,size);\n}\n#endif\n\n\n#if defined(TARGET_OS_MAC) && !defined ( __APPLE__ ) && !defined ( __MACH__ )\nint bzero(char *block,long size) {\n    BlockZero(block,size);\n}\n\nint main ()\n{\n} \n\n#endif\n\n#if defined(TARGET_OS_MAC) && defined ( __APPLE__ ) && defined ( __MACH__ )\nint isSystem9_0_or_better(void)\n{\n    return 1;\n}\n#endif \n\nvoid appendStringToBufferIfPossible(char *buffer,char *append,int bufferSize) \n{\n\tif (strlen(append) + strlen(buffer) < bufferSize) \n\t\tstrcat(buffer,append);\n\n}\n\nint mpeg3_generate_toc_for_Squeak(mpeg3_t *file, int timecode_search, int print_streams, char *buffer, int bufferSize) {\n\tmpeg3_demuxer_t *demuxer;\n\tint i;\n\tchar temp_buffer[256];\n\tif(file)\n\t{\n\t\tbuffer[0] = 0x00;\n\t\tdemuxer = mpeg3_new_demuxer(file, 0, 0, -1);\n\t\tmpeg3demux_create_title_for_Squeak(demuxer, timecode_search, buffer, bufferSize);\n/* Just print the first title's streams */\n\t\tif(print_streams) mpeg3demux_print_streams_for_Squeak(demuxer, buffer,bufferSize);\n\n\t\tsprintf(temp_buffer, \"SIZE: %ld\\n\", demuxer->titles[demuxer->current_title]->total_bytes);\n\t\tappendStringToBufferIfPossible(buffer,temp_buffer,bufferSize);\t\t\n\t\tsprintf(temp_buffer, \"PACKETSIZE: %ld\\n\", demuxer->packet_size);\n\t\tappendStringToBufferIfPossible(buffer,temp_buffer,bufferSize);\t\t\n\n\t\tmpeg3demux_print_timecodes(demuxer->titles[demuxer->current_title], buffer);\n\n\t\tmpeg3_delete_demuxer(demuxer);\n\t\treturn 0;\n\t}\n\treturn 1;\n}\n/* Create a title. */\n/* Build a table of timecodes contained in the program stream. */\n/* If toc is 0 just read the first and last timecode. */\nint mpeg3demux_create_title_for_Squeak(mpeg3_demuxer_t *demuxer, int timecode_search, char *buffer,int buffer_size)\n{\n\tint result = 0, done = 0, counter_start, counter;\n\tmpeg3_t *file = (mpeg3_t *) demuxer->file;\n\tlong next_byte=0, prev_byte=0;\n\tdouble next_time, prev_time, absolute_time;\n\tlong i;\n\tmpeg3_title_t *title;\n\tunsigned long test_header = 0;\n\tmpeg3demux_timecode_t *timecode = 0;\n\tchar temp_buffer[256];\n\t\n\tdemuxer->error_flag = 0;\n\tdemuxer->generating_timecode = 1;\n\n/* Create a single title */\n\tif(!demuxer->total_titles)\n\t{\n\t\tdemuxer->titles[0] = mpeg3_new_title(file, file->fs->path);\n\t\tdemuxer->total_titles = 1;\n\t\tmpeg3demux_open_title(demuxer, 0);\n\t}\n\ttitle = demuxer->titles[0];\n\ttitle->total_bytes = mpeg3io_total_bytes(title->fs);\n\n\n/* Get the packet size from the file */\n\tif(file->is_program_stream)\n\t{\n\t\tmpeg3io_seek(title->fs, 4);\n\t\tfor(i = 0; i < MPEG3_MAX_PACKSIZE && \n\t\t\ttest_header != MPEG3_PACK_START_CODE; i++)\n\t\t{\n\t\t\ttest_header <<= 8;\n\t\t\ttest_header |= mpeg3io_read_char(title->fs);\n\t\t}\n\t\tif(i < MPEG3_MAX_PACKSIZE) demuxer->packet_size = i;\n\t\tmpeg3io_seek(title->fs, 0);\n\t}\n\telse\n\t\tdemuxer->packet_size = file->packet_size;\n\n/* Get timecodes for the title */\n\tif(file->is_transport_stream || file->is_program_stream)\n\t{\n\t\tmpeg3io_seek(title->fs, 0);\n\t\twhile(!done && !result && !mpeg3io_eof(title->fs))\n\t\t{\n\t\t\tnext_byte = mpeg3io_tell(title->fs);\n\t\t\tresult = mpeg3_read_next_packet(demuxer);\n\n\t\t\tif(!result)\n\t\t\t{\n\t\t\t\tnext_time = demuxer->time;\n\t\t\t\tsprintf(temp_buffer,\"%f %f\\n\", next_time, prev_time);\n\t \t\t\tappendStringToBufferIfPossible(buffer,temp_buffer,buffer_size);\t\n\t\t\t\tif(next_time < prev_time || \n\t\t\t\t\tnext_time - prev_time > MPEG3_CONTIGUOUS_THRESHOLD ||\n\t\t\t\t\t!title->timecode_table_size)\n\t\t\t\t{\n/* Discontinuous */\n\t\t\t\t\ttimecode = mpeg3_append_timecode(demuxer, \n\t\t\t\t\t\ttitle, \n\t\t\t\t\t\tprev_byte, \n\t\t\t\t\t\tprev_time, \n\t\t\t\t\t\tnext_byte, \n\t\t\t\t\t\tnext_time,\n\t\t\t\t\t\t0);\n \n  \t\t\tsprintf(temp_buffer,\"timecode: %ld %ld %f %f\\n\",\n   \t\t\t\ttimecode->start_byte,\n   \t\t\t\ttimecode->end_byte,\n   \t\t\t\ttimecode->start_time,\n  \t\t\t\ttimecode->end_time);\n \t\t\tappendStringToBufferIfPossible(buffer,temp_buffer,buffer_size);\t\n\n\n\t\t\t\t\tcounter_start = next_time;\n\t\t\t\t}\n\t\t\t\tprev_time = next_time;\n\t\t\t\tprev_byte = next_byte;\n\t\t\t\tcounter = next_time;\n\t\t\t}\n\n/* Just get the first bytes if not building a toc to get the stream ID's. */\n\t\t\tif(next_byte > 0x100000 && \n\t\t\t\t(!timecode_search || !buffer)) done = 1;\n\t\t}\n\n/* Get the last timecode */\n\t\tif(!buffer || !timecode_search)\n\t\t{\n\t\t\tresult = mpeg3io_seek(title->fs, title->total_bytes);\n\t\t\tif(!result) result = mpeg3_read_prev_packet(demuxer);\n\t\t}\n\n\t\tif(title->timecode_table && timecode)\n\t\t{\n\t\t\ttimecode->end_byte = title->total_bytes;\n//\t\t\ttimecode->end_byte = mpeg3io_tell(title->fs)/*  + demuxer->packet_size */;\n\t\t\ttimecode->end_time = demuxer->time;\n\t\t\ttimecode->absolute_end_time = timecode->end_time - timecode->start_time;\n\t\t}\n\t}\n\n\tmpeg3io_seek(title->fs, 0);\n\tdemuxer->generating_timecode = 0;\n\treturn 0;\n}\n\nint mpeg3demux_print_streams_for_Squeak(mpeg3_demuxer_t *demuxer, char *buffer,int buffer_size)\n{\n\tint i;\n\tchar temp_buffer[256];\n\t\n/* Print the stream information */\n\tfor(i = 0; i < MPEG3_MAX_STREAMS; i++)\n\t{\n\t\tif(demuxer->astream_table[i]) {\n\t\t\tsprintf(temp_buffer, \"ASTREAM: %d %d\\n\", i, demuxer->astream_table[i]);\n\t\t\tappendStringToBufferIfPossible(buffer,temp_buffer,buffer_size);\t\n\t\t}\t\n\n\t\tif(demuxer->vstream_table[i]) {\n\t\t\tsprintf(temp_buffer, \"VSTREAM: %d %d\\n\", i, demuxer->vstream_table[i]);\n\t\t\tappendStringToBufferIfPossible(buffer,temp_buffer,buffer_size);\t\n\t\t}\t\n\t}\n\treturn 0;\n}\n\nmpeg3_css_t* mpeg3_new_css()\n{\n\treturn 0;\n}\n\nint mpeg3_delete_css(mpeg3_css_t *css)\n{\n\treturn 0;\n}\n\nint mpeg3_get_keys(mpeg3_css_t *css, char *path)\n{\n\treturn 1;\n}\n\nint mpeg3_decrypt_packet(mpeg3_css_t *css, unsigned char *sector)\n{\n\treturn 1;\n}\n\n\n/*** System Attributes ***/\n\nint IsImageName(char *name) {\n\tchar *suffix;\n\n\tsuffix = strrchr(name, '.');  /* pointer to last period in name */\n\tif (suffix == NULL) return 0;\n\tif (strcmp(suffix, \".ima\") == 0) return 1;\n\tif (strcmp(suffix, \".image\") == 0) return 1;\n\tif (strcmp(suffix, \".IMA\") == 0) return 1;\n\tif (strcmp(suffix, \".IMAGE\") == 0) return 1;\n\treturn 0;\n}\n\n\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/changesForSqueak.h",
    "content": "#include \"mpeg3private.h\"\nint mpeg3_generate_toc_for_Squeak(mpeg3_t *file, int timecode_search, int print_streams, char *buffer, int buffer_size);\nvoid * memoryAllocate(int number,unsigned size);\nvoid memoryFree(void *stuff);\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/configure",
    "content": "#!/bin/sh\n\nUSE_MMX=1\n\nfor ac_option\ndo\ncase \"$ac_option\" in\n\t--no-mmx)\n\t\tUSE_MMX=0\n\t\t;;\n\n\n\t-h | --help | -help)\n\tcat << EOF\nOptions:\n\t--no-mmx           Compile libmpeg3 with no MMX support.\nEOF\n\t\texit 0\n\t\t;;\n\n\t*)\n\t\t;;\nesac\ndone\n\n\necho \"Configuring libmpeg3\"\n\ncat > global_config << EOF\n# DO NOT EDIT.  EDIT ./configure INSTEAD AND RERUN IT.\nEOF\n\n\nif test -z \"$CFLAGS\"; then\n\techo >> global_config \"CFLAGS = -O3 -funroll-loops -fomit-frame-pointer -I. -Ivideo -Iaudio\"\n#\techo >> global_config \"CFLAGS = -g -I. -Ivideo -Iaudio\"\nfi\n\ncat >> global_config << EOF\nCC = gcc\nNASM = nasm\nEOF\n\n\nif [ ${USE_MMX} = 1 ]; then\ncat >> global_config << EOF\nCFLAGS += -DHAVE_MMX\nMMXOBJS = \\\n\tvideo/mmxidct.o \\\n\tvideo/reconmmx.o\nMMXOBJS2 = \\\n\tmmxidct.o \\\n\treconmmx.o\nEOF\nfi\n\n\n\n\necho \"done\"\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/dump.c",
    "content": "#include \"libmpeg3.h\"\n#include <stdlib.h>\n#include <string.h>\n#include <Types.h>\n#include <Fonts.h>\n#include <Memory.h>\n#include <Windows.h>\n#include <Quickdraw.h>\n#include <TextEdit.h>\n#include <Dialogs.h>\n#include <QDOffscreen.h>\n#include <Quickdraw.h>\n#include <Memory.h>\n#include <profiler.h>\n\nvoid * memoryAllocate(int number,unsigned size);\nvoid memoryFree(void *stuff);\n\nint\t\t\tstrncasecmp(const char *str1, const char *str2, size_t nchars);\nint\t\t\tstrcasecmp (const char *str1, const char *str2);\ninline BitMap * GetPortBitMapForCopyBits (CGrafPtr w) { return &((GrafPtr)w)->portBits;}\ninline Rect *GetPortBounds(CGrafPtr w,Rect *r) { *r = w->portRect; return &w->portRect;} \n\nvoid mpeg3video_init_scantables(mpeg3video_t *video);\nWindowPtr\tpWindow;\nGWorldPtr   gpGWOffScreen = NULL;\t\t\t\t\nlong counter = 0;\n\n#define BUFSIZE 1000000\nint main2();\n\nint main ()\n{\n\tint ret;\n\tRect windRect;\n\tlong start,end,amount;\n\t\n\t/* Initialize all the needed managers. */\n\tInitGraf(&qd.thePort);\n\tInitFonts();\n\tInitWindows();\n\tInitMenus();\n\tTEInit();\n\tInitDialogs(nil);\n\tInitCursor();\n\n\t//ProfilerInit(collectDetailed, bestTimeBase, 1000, 50);\n\t//ProfilerSetStatus(true);\n\n\twindRect = qd.screenBits.bounds;\n\tInsetRect(&windRect, 50, 50);\n\tpWindow = NewCWindow(nil, &windRect, \"\\pMpeg\", true, documentProc, (WindowPtr) -1, false, 0);\n    \n    start = TickCount();\n    main2();\n    end = TickCount();\n    amount = end - start;\n    fprintf(stderr, \"Time taken %d memoryAllocator %d \\n\", amount,counter);\n\n   //\tProfilerDump(\"\\pProfile.out\");\n     \n    do {\n\t} while (!Button());\n\n\n}\n\nint main2()\n{\n\tmpeg3_t *file;\n\tint i, result = 0;\n\tunsigned char *output, **output_rows;\n\tfloat *audio_output_f;\n\tshort *audio_output_i;\n\tlong \t\t\ttotal_samples = 0;\n\tRect \t\t\tsourceRect;\n\tOSErr           error;\n\tPixMapHandle \thPixmap;\n    Ptr       \t\tgBaseLocation;\n\tlong\t\t\ttargetRowBytes;\n\t\n\tfile = mpeg3_open(\"randomAlien.mpg\");\n\tif(file)\n\t{\n\n\t\tmpeg3_set_cpus(file, 1);\n  \t\t//audio_output_f = (float *) memoryAllocate(1,BUFSIZE * sizeof(float)); \n\t\t//audio_output_i = (short *) memoryAllocate(1,BUFSIZE * sizeof(short));\n \t\t//mpeg3_set_sample(file, 11229518, 0); \n        //result = mpeg3_read_audio(file, audio_output_f, 0, 0, BUFSIZE, 0); \n    \t// result = mpeg3_read_audio(file, 0, audio_output_i, 1, BUFSIZE, 0);\n \t\t// fwrite(audio_output_i, BUFSIZE, 1, stdout);\n\n  \t\t//mpeg3_set_frame(file, 1000, 0);\n  \t\t\n\t\tsourceRect.top = 0;\n\t\tsourceRect.left = 0;\n\t\tsourceRect.bottom = mpeg3_video_height(file, 0);\n\t\tsourceRect.right = mpeg3_video_width(file, 0);\n\n\t\terror = NewGWorld (&gpGWOffScreen, 32, &sourceRect, NULL, NULL,  keepLocal);\n\t\tif (error != noErr)\n\t\t\t{\n\t\t    DebugStr (\"\\pUnable to allocate off screen image\");\n\t\t \t}\n\t \n\t\thPixmap = GetGWorldPixMap (gpGWOffScreen);\n\t\terror = LockPixels (hPixmap);\n\t\tgBaseLocation = GetPixBaseAddr(hPixmap);\n\t\ttargetRowBytes = ((**hPixmap).rowBytes & 0x3FFF)/4;\n\n  \t\toutput_rows = (unsigned char **) memoryAllocate(1,sizeof(unsigned char*) * mpeg3_video_height(file, 0));\n  \t\tfor(i = 0; i < mpeg3_video_height(file, 0); i++)\n  \t\t\toutput_rows[i] = (unsigned char*) gBaseLocation + i * targetRowBytes*4;\n\n\t\tfor (i=0;i < mpeg3_video_frames(file, 0);i++) {\n\t\t\tresult = mpeg3_read_frame(file, \n \t\t\t\t\toutput_rows, \n \t\t\t\t\t0, \n \t\t\t\t\t0, \n \t\t\t\t\tmpeg3_video_width(file, 0), \n\t\t\t\t\tmpeg3_video_height(file, 0), \n \t\t\t\t\tmpeg3_video_width(file, 0), \n \t\t\t\t\tmpeg3_video_height(file, 0), \n\t\t\t\t\tMPEG3_RGBAF8888, \n \t\t\t\t\t0);\n  \t    \tCopyBits (GetPortBitMapForCopyBits(gpGWOffScreen), GetPortBitMapForCopyBits(GetWindowPort(pWindow)), &sourceRect, &sourceRect, srcCopy, NULL); \n\t\t}\n\t\tUnlockPixels (hPixmap);\n\t\tDisposeGWorld(gpGWOffScreen);\n        memoryFree(output_rows);\n        \n\t\tfprintf(stderr, \"Audio streams: %d\\n\", mpeg3_total_astreams(file));\n\t\tfor(i = 0; i < mpeg3_total_astreams(file); i++)\n\t\t{\n\t\t\t fprintf(stderr, \"  Stream %d: channels %d sample rate %d total samples %ld\\n\", \n\t\t\t\ti, \n\t\t\t\tmpeg3_audio_channels(file, i), \n\t\t\t\tmpeg3_sample_rate(file, i),\n\t\t\t\tmpeg3_audio_samples(file, i));\n\t\t}\n\t\tfprintf(stderr, \"Video streams: %d\\n\", mpeg3_total_vstreams(file));\n\t\tfor(i = 0; i < mpeg3_total_vstreams(file); i++)\n\t\t{\n\t\t\tfprintf(stderr, \"  Stream %d: width %d height %d frame rate %0.3f total frames %ld\\n\", \n\t\t\t\ti, \n\t\t\t\tmpeg3_video_width(file, i), \n\t\t\t\tmpeg3_video_height(file, i), \n\t\t\t\tmpeg3_frame_rate(file, i),\n\t\t\t\tmpeg3_video_frames(file, i));\n\t\t}\n\t\t\n\t\tmpeg3_close(file);\n\t}\n\treturn 0;\n}\nint\t\t\tstrncasecmp(const char *str1, const char *str2, size_t nchars)\n{\n    return strncmp(str1,str2,nchars);\n}\nint\t\t\tstrcasecmp (const char *str1, const char *str2) {\n    return strcmp(str1,str2);\n}\n\n\nvoid * memoryAllocate(int number,unsigned size) {\n    char * stuff;\n    stuff = NewPtrClear(size*number);\n    if (stuff == 0L) \n        Debugger();\n    counter ++;\n    return stuff;\n}\n\nvoid memoryFree(void *stuff) {\n    counter --;\n    DisposePtr((char *)stuff);\n}\n\nint bzero(char *block,long size) {\n    BlockZero(block,size);\n}\n\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/dump2.c",
    "content": "#include \"libmpeg3.h\"\n#include <stdlib.h>\n\n#define BUFSIZE 10000000\n\nint main(int argc, char *argv[])\n{\n\tmpeg3_t *file;\n\tint i, result = 0;\n\tunsigned char *output, **output_rows;\n\tfloat *audio_output_f;\n\tshort *audio_output_i;\n\tlong total_samples = 0;\n\n\tif(argc < 2)\n\t{\n\t\tprintf(\"Need an MPEG stream.\\n\");\n\t\texit(1);\n\t}\n\n\tfile = mpeg3_open(argv[1]);\n\tif(file)\n\t{\n\t\tfprintf(stderr, \"MMX supported %d\\n\", file->have_mmx);\n\t\tfprintf(stderr, \"Audio streams: %d\\n\", mpeg3_total_astreams(file));\n\t\tfor(i = 0; i < mpeg3_total_astreams(file); i++)\n\t\t{\n\t\t\tfprintf(stderr, \"  Stream %d: channels %d sample rate %d total samples %ld\\n\", \n\t\t\t\ti, \n\t\t\t\tmpeg3_audio_channels(file, i), \n\t\t\t\tmpeg3_sample_rate(file, i),\n\t\t\t\tmpeg3_audio_samples(file, i));\n\t\t}\n\t\tfprintf(stderr, \"Video streams: %d\\n\", mpeg3_total_vstreams(file));\n\t\tfor(i = 0; i < mpeg3_total_vstreams(file); i++)\n\t\t{\n\t\t\tfprintf(stderr, \"  Stream %d: width %d height %d frame rate %0.3f total frames %ld\\n\", \n\t\t\t\ti, \n\t\t\t\tmpeg3_video_width(file, i), \n\t\t\t\tmpeg3_video_height(file, i), \n\t\t\t\tmpeg3_frame_rate(file, i),\n\t\t\t\tmpeg3_video_frames(file, i));\n\t\t}\n\n\t\tmpeg3_set_cpus(file, 1);\n/* \t\taudio_output_f = malloc(BUFSIZE * sizeof(float)); */\n\t\taudio_output_i = malloc(BUFSIZE * sizeof(short));\n/*\t\tmpeg3_set_sample(file, 11229518, 0); */\n/*  \t\tresult = mpeg3_read_audio(file, audio_output_f, 0, 0, BUFSIZE, 0); */\n//\t\tresult = mpeg3_read_audio(file, 0, audio_output_i, 1, BUFSIZE, 0);\n \t\tfwrite(audio_output_i, BUFSIZE, 1, stdout);\n\n  \t\toutput = malloc(mpeg3_video_width(file, 0) * mpeg3_video_height(file, 0) * 3 + 4);\n  \t\toutput_rows = malloc(sizeof(unsigned char*) * mpeg3_video_height(file, 0));\n  \t\tfor(i = 0; i < mpeg3_video_height(file, 0); i++)\n  \t\t\toutput_rows[i] = &output[i * mpeg3_video_width(file, 0) * 3];\n// \t\tmpeg3_set_frame(file, 1000, 0);\n \t\tresult = mpeg3_read_frame(file, \n \t\t\t\t\toutput_rows, \n \t\t\t\t\t0, \n \t\t\t\t\t0, \n \t\t\t\t\tmpeg3_video_width(file, 0), \n\t\t\t\t\tmpeg3_video_height(file, 0), \n \t\t\t\t\tmpeg3_video_width(file, 0), \n \t\t\t\t\tmpeg3_video_height(file, 0), \n\t\t\t\t\tMPEG3_RGB888, \n \t\t\t\t\t0);\n\n\t\tmpeg3_close(file);\n\t}\n\treturn 0;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/global_config",
    "content": "# DO NOT EDIT.  EDIT ./configure INSTEAD AND RERUN IT.\nCFLAGS = -O3 -funroll-loops -fomit-frame-pointer -I. -Ivideo -Iaudio\nCC = gcc\nNASM = nasm\nCFLAGS += -DHAVE_MMX\nMMXOBJS = \tvideo/mmxidct.o \tvideo/reconmmx.o\nMMXOBJS2 = \tmmxidct.o \treconmmx.o\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/ioctl.h",
    "content": "/* sys/ioctl.h */\n\n#ifndef _SYS_IOCTL_H\n#define _SYS_IOCTL_H\n\n#include <sys/cdefs.h>\n\n/* /dev/windows ioctls */\n\n#define WINDOWS_POST\t0\t/* Set write() behavior to PostMessage() */\n#define WINDOWS_SEND\t1\t/* Set write() behavior to SendMessage() */\n#define WINDOWS_HWND\t2\t/* Set hWnd for read() calls */\n\n__BEGIN_DECLS\n\nint ioctl (int __fd, int __cmd, void *);\n\n__END_DECLS\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/libmpeg3.c",
    "content": "/* \n *\n *  This file is part of libmpeg3\n *\t\n * LibMPEG3\n * Author: Adam Williams <broadcast@earthling.net>\n * Page: heroine.linuxbox.com\n * Page: http://www.smalltalkconsulting.com/html/mpeg3source.html (for Squeak)\n *\n    LibMPEG3 was originally licenced under GPL. It was relicensed by\n    the author under the LGPL and the Squeak license on Nov 1st, 2000\n    \n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA \n    \n    Also licensed under the Squeak license.\n    http://www.squeak.org/license.html\n */\n \n  /*  Changed Sept 15th by John M McIntosh to support Macintosh & Squeak\n  \t  Changed Dec 3rd 2001 by John M McIntosh to ignore extents on file names\n  \t  \n */\n\n#include \"libmpeg3.h\"\n#include \"mpeg3protos.h\"\n\n#include <stdlib.h>\n#include <string.h>\n\n#define MAX(a, b) ((a) > (b) ? (a) : (b))\n\nmpeg3_t* mpeg3_new(char *path,int size)\n{\n\tint i;\n\tmpeg3_t *file = (mpeg3_t *) memoryAllocate(1, sizeof(mpeg3_t));\n\tfile->cpus = 1;\n\tfile->fs = mpeg3_new_fs(path,size);\n\tfile->have_mmx = mpeg3_mmx_test();\n\tfile->demuxer = mpeg3_new_demuxer(file, 0, 0, -1);\n\treturn file;\n}\n\nint mpeg3_delete(mpeg3_t *file)\n{\n\tint i;\n\n\tfor(i = 0; i < file->total_vstreams; i++)\n\t\tmpeg3_delete_vtrack(file, file->vtrack[i]);\n\n\tfor(i = 0; i < file->total_astreams; i++)\n\t\tmpeg3_delete_atrack(file, file->atrack[i]);\n\n\tmpeg3_delete_fs(file->fs);\n\tmpeg3_delete_demuxer(file->demuxer);\n\tmemoryFree(file);\n}\n\nint mpeg3_check_sig(char *path)\n{\n\tmpeg3_fs_t *fs;\n\tunsigned int bits;\n\tchar *ext;\n\tint result = 0;\n\n\tfs = mpeg3_new_fs(path,0);\n\tif(mpeg3io_open_file(fs))\n\t{\n/* File not found */\n\t\treturn 0;\n\t}\n\n\tbits = mpeg3io_read_int32(fs);\n/* Test header */\n\tif(bits == MPEG3_TOC_PREFIX || bits == MPEG3_TOC_PREFIXLOWER)\n\t{\n\t\tresult = 1;\n\t}\n\telse\n\tif((((bits >> 24) & 0xff) == MPEG3_SYNC_BYTE) ||\n\t\t(bits == MPEG3_PACK_START_CODE) ||\n\t\t((bits & 0xfff00000) == 0xfff00000) ||\n\t\t(bits == MPEG3_SEQUENCE_START_CODE) ||\n\t\t(bits == MPEG3_PICTURE_START_CODE) ||\n\t\t/*JMM (((bits & 0xffff0000) >> 16) == MPEG3_AC3_START_CODE) || */\n\t\t((bits >> 8) == MPEG3_ID3_PREFIX) ||\n\t\t(bits == MPEG3_RIFF_CODE))\n\t{\n\t\tresult = 1;\n\n\t\t/* JMM Don't want extends, too ugly \n\t\text = strrchr(path, '.');\n\t\tif(ext)\n\t\t{\n/* Test file extension. \n\t\t\tif(strncasecmp(ext, \".mp2\", 4) && \n\t\t\t\tstrncasecmp(ext, \".mp3\", 4) &&\n\t\t\t\tstrncasecmp(ext, \".m1v\", 4) &&\n\t\t\t\tstrncasecmp(ext, \".m2v\", 4) &&\n\t\t\t\tstrncasecmp(ext, \".m2s\", 4) &&\n\t\t\t\tstrncasecmp(ext, \".mpg\", 4) &&\n\t\t\t\tstrncasecmp(ext, \".vob\", 4) &&\n\t\t\t\tstrncasecmp(ext, \".mpeg\", 4) /* JMM &&\n\t\t\t\tstrncasecmp(ext, \".ac3\", 4) )\n\t\t\t\tresult = 0;\n\t\t} */\n\t}\n\n\tmpeg3io_close_file(fs);\n\tmpeg3_delete_fs(fs);\n\treturn result;\n}\n\nmpeg3_t* mpeg3_open_copy(char *path, mpeg3_t *old_file,int size)\n{\n\tmpeg3_t *file = 0;\n\tunsigned int bits;\n\tint i, done;\n\n/* Initialize the file structure */\n\tfile = mpeg3_new(path,size);\n\n/* Need to perform authentication before reading a single byte. */\n\tif(mpeg3io_open_file(file->fs))\n\t{\n\t\tmpeg3_delete(file);\n\t\treturn 0;\n\t}\n\n/* =============================== Create the title objects ========================= */\n\tbits = mpeg3io_read_int32(file->fs);\n\n\tif(bits == MPEG3_TOC_PREFIX || bits == MPEG3_TOC_PREFIXLOWER)   /* TOCV */\n\t{\n/* Table of contents for another file */\n\t\tif(mpeg3_read_toc(file))\n\t\t{\n\t\t\tmpeg3_delete(file);\n\t\t\treturn 0;\n\t\t}\n\t\tmpeg3io_close_file(file->fs);\n\t}\n\telse\n\tif(((bits >> 24) & 0xff) == MPEG3_SYNC_BYTE)\n\t{\n/* Transport stream */\n\t\tfile->packet_size = MPEG3_TS_PACKET_SIZE;\n\t\tfile->is_transport_stream = 1;\n\t}\n\telse\n\tif(bits == MPEG3_PACK_START_CODE)\n\t{\n/* Program stream */\n\t\tfile->packet_size = MPEG3_DVD_PACKET_SIZE;\n\t\tfile->is_program_stream = 1;\n\t}\n\telse\n\tif((bits & 0xfff00000) == 0xfff00000 ||\n\t\t((bits >> 8) == MPEG3_ID3_PREFIX) ||\n\t\t(bits == MPEG3_RIFF_CODE))\n\t{\n/* MPEG Audio only */\n\t\tfile->packet_size = MPEG3_DVD_PACKET_SIZE;\n\t\tfile->has_audio = 1;\n\t\tfile->is_audio_stream = 1;\n\t}\n\telse\n\tif(bits == MPEG3_SEQUENCE_START_CODE ||\n\t\tbits == MPEG3_PICTURE_START_CODE)\n\t{\n/* Video only */\n\t\tfile->packet_size = MPEG3_DVD_PACKET_SIZE;\n\t\tfile->is_video_stream = 1;\n\t}\n\telse\n\tif(((bits & 0xffff0000) >> 16) == MPEG3_AC3_START_CODE)\n\t{\n/* AC3 Audio only */\n\t\tfile->packet_size = MPEG3_DVD_PACKET_SIZE;\n\t\tfile->has_audio = 1;\n\t\tfile->is_audio_stream = 1;\n\t}\n\telse\n\t{\n/*  file->packet_size = MPEG3_DVD_PACKET_SIZE; */\n/*  file->is_audio_stream = 1; */\n\t\tmpeg3_delete(file);\n\t\tfprintf(stderr, \"mpeg3_open: not an MPEG 2 stream\\n\");\n\t\treturn 0;\n\t}\n\n/* Create title */\n/* Copy timecodes from an old demuxer */\n\tif(old_file && mpeg3_get_demuxer(old_file))\n\t{\n\t\tmpeg3demux_copy_titles(file->demuxer, mpeg3_get_demuxer(old_file));\n\t}\n\telse\n/* Start from scratch */\n\tif(!file->demuxer->total_titles)\n\t{\n\t\tmpeg3demux_create_title(file->demuxer, 0, 0);\n\t}\n\n/* =============================== Get title information ========================= */\n\tif(file->is_transport_stream || file->is_program_stream)\n\t{\n/* Create video tracks */\n/* Video must be created before audio because audio uses the video timecode */\n/* to get its length. */\n\t\tfor(i = 0; i < MPEG3_MAX_STREAMS; i++)\n\t\t{\n\t\t\tif(file->demuxer->vstream_table[i])\n\t\t\t{\n\t\t\t\tfile->vtrack[file->total_vstreams] = mpeg3_new_vtrack(file, i, file->demuxer);\n\t\t\t\tif(file->vtrack[file->total_vstreams]) file->total_vstreams++;\n\t\t\t}\n\t\t}\n\n/* Create audio tracks */\n\t\tfor(i = 0; i < MPEG3_MAX_STREAMS; i++)\n\t\t{\n\t\t\tif(file->demuxer->astream_table[i])\n\t\t\t{\n\t\t\t\tfile->atrack[file->total_astreams] = mpeg3_new_atrack(file, \n\t\t\t\t\ti, \n\t\t\t\t\tfile->demuxer->astream_table[i], \n\t\t\t\t\tfile->demuxer);\n\t\t\t\tif(file->atrack[file->total_astreams]) file->total_astreams++;\n\t\t\t}\n\t\t}\n\t}\n\telse\n\tif(file->is_video_stream)\n\t{\n/* Create video tracks */\n\t\tfile->vtrack[0] = mpeg3_new_vtrack(file, -1, file->demuxer);\n\t\tif(file->vtrack[0]) file->total_vstreams++;\n\t}\n\telse\n\tif(file->is_audio_stream)\n\t{\n/* Create audio tracks */\n\t\tfile->atrack[0] = mpeg3_new_atrack(file, -1, AUDIO_UNKNOWN, file->demuxer);\n\t\tif(file->atrack[0]) file->total_astreams++;\n\t}\n\n\tif(file->total_vstreams) file->has_video = 1;\n\tif(file->total_astreams) file->has_audio = 1;\n\n\tmpeg3io_close_file(file->fs);\n\treturn file;\n}\n\nmpeg3_t* mpeg3_open(char *path,int size)\n{\n\treturn mpeg3_open_copy(path, 0,size);\n}\n\nint mpeg3_close(mpeg3_t *file)\n{\n/* File is closed in the same procedure it is opened in. */\n\tmpeg3_delete(file);\n\treturn 0;\n}\n\nint mpeg3_set_cpus(mpeg3_t *file, int cpus)\n{\n\tint i;\n\tfile->cpus = cpus;\n\tfor(i = 0; i < file->total_vstreams; i++)\n\t\tmpeg3video_set_cpus(file->vtrack[i]->video, cpus);\n\treturn 0;\n}\n\nint mpeg3_set_mmx(mpeg3_t *file, int use_mmx)\n{\n\tint i;\n\tfile->have_mmx = use_mmx;\n\tfor(i = 0; i < file->total_vstreams; i++)\n\t\tmpeg3video_set_mmx(file->vtrack[i]->video, use_mmx);\n\treturn 0;\n}\n\nint mpeg3_generate_toc(FILE *output, char *path, int timecode_search, int print_streams)\n{\n\tmpeg3_t *file = mpeg3_open(path,0);\n\tmpeg3_demuxer_t *demuxer;\n\tint i;\n\n\tif(file)\n\t{\n\t\tfprintf(output, \"TOCVERSION 2\\n\"\n\t\t\t\"PATH: %s\\n\", path);\n\t\tdemuxer = mpeg3_new_demuxer(file, 0, 0, -1);\n\t\tmpeg3demux_create_title(demuxer, timecode_search, output);\n/* Just print the first title's streams */\n\t\tif(print_streams) mpeg3demux_print_streams(demuxer, output);\n\n\t\tfprintf(output, \"SIZE: %ld\\n\", demuxer->titles[demuxer->current_title]->total_bytes);\n\t\tfprintf(output, \"PACKETSIZE: %ld\\n\", demuxer->packet_size);\n\n\t\tmpeg3demux_print_timecodes(demuxer->titles[demuxer->current_title], output);\n\n\t\tmpeg3_delete_demuxer(demuxer);\n\t\tmpeg3_close(file);\n\t\treturn 0;\n\t}\n\treturn 1;\n}\n\nint mpeg3_read_toc(mpeg3_t *file)\n{\n\tchar string[MPEG3_STRLEN];\n\tint number1;\n\n/* Test version number */\n\tfile->is_program_stream = 1;\n\tmpeg3io_seek(file->fs, 0);\n\t\n//\tfscanf(file->fs->fd, \"%s %d\", string, &number1);\n//  Jan 20th 2006, John M Mcintosh (johnmci@smalltalkconsulting.com  move logic to mpeg3io.c\n\n\tmpeg3io_scanf(file->fs,\"%s %d\",string,&number1);\n\tif(number1 > 2 || number1 < 2) return 1;\n\n/* Read titles */\n\tmpeg3demux_read_titles(file->demuxer);\n\treturn 0;\n}\n\nint mpeg3_has_audio(mpeg3_t *file)\n{\n\treturn file->has_audio;\n}\n\nint mpeg3_total_astreams(mpeg3_t *file)\n{\n\treturn file->total_astreams;\n}\n\nint mpeg3_audio_channels(mpeg3_t *file,\n\t\tint stream)\n{\n\tif(file->has_audio)\n\t\treturn file->atrack[stream]->channels;\n\treturn -1;\n}\n\nint mpeg3_sample_rate(mpeg3_t *file,\n\t\tint stream)\n{\n\tif(file->has_audio)\n\t\treturn file->atrack[stream]->sample_rate;\n\treturn -1;\n}\n\nlong mpeg3_get_sample(mpeg3_t *file,\n\t\tint stream)\n{\n\tif(file->has_audio)\n\t\treturn file->atrack[stream]->current_position;\n\treturn -1;\n}\n\nint mpeg3_set_sample(mpeg3_t *file, \n\t\tlong sample,\n\t\tint stream)\n{\n\tif(file->has_audio)\n\t{\n\t\tfile->atrack[stream]->current_position = sample;\n\t\tmpeg3audio_seek_sample(file->atrack[stream]->audio, sample);\n\t\treturn 0;\n\t}\n\treturn -1;\n}\n\nlong mpeg3_audio_samples(mpeg3_t *file,\n\t\tint stream)\n{\n\tif(file->has_audio)\n\t\treturn file->atrack[stream]->total_samples;\n\treturn -1;\n}\n\nint mpeg3_has_video(mpeg3_t *file)\n{\n\treturn file->has_video;\n}\n\nint mpeg3_total_vstreams(mpeg3_t *file)\n{\n\treturn file->total_vstreams;\n}\n\nint mpeg3_video_width(mpeg3_t *file,\n\t\tint stream)\n{\n\tif(file->has_video)\n\t\treturn file->vtrack[stream]->width;\n\treturn -1;\n}\n\nint mpeg3_video_height(mpeg3_t *file,\n\t\tint stream)\n{\n\tif(file->has_video)\n\t\treturn file->vtrack[stream]->height;\n\treturn -1;\n}\n\nfloat mpeg3_frame_rate(mpeg3_t *file,\n\t\tint stream)\n{\n\tif(file->has_video)\n\t\treturn file->vtrack[stream]->frame_rate;\n\treturn -1;\n}\n\nlong mpeg3_video_frames(mpeg3_t *file,\n\t\tint stream)\n{\n\tif(file->has_video)\n\t\treturn file->vtrack[stream]->total_frames;\n\treturn -1;\n}\n\nlong mpeg3_get_frame(mpeg3_t *file,\n\t\tint stream)\n{\n\tif(file->has_video)\n\t\treturn file->vtrack[stream]->current_position;\n\treturn -1;\n}\n\nint mpeg3_set_frame(mpeg3_t *file, \n\t\tlong frame,\n\t\tint stream)\n{\n\tif(file->has_video)\n\t{\n\t\tfile->vtrack[stream]->current_position = frame;\n\t\tmpeg3video_seek_frame(file->vtrack[stream]->video, frame);\n\t\treturn 0;\n\t}\n\treturn -1;\n}\n\nint mpeg3_seek_percentage(mpeg3_t *file, double percentage)\n{\n\tint i;\n\tfor(i = 0; i < file->total_astreams; i++)\n\t{\n\t\tmpeg3audio_seek_percentage(file->atrack[i]->audio, percentage);\n\t}\n\n\tfor(i = 0; i < file->total_vstreams; i++)\n\t{\n\t\tmpeg3video_seek_percentage(file->vtrack[i]->video, percentage);\n\t}\n\treturn 0;\n}\n\nint mpeg3_previous_frame(mpeg3_t *file, int stream)\n{\n\tfile->last_type_read = 2;\n\tfile->last_stream_read = stream;\n\n\tif(file->has_video)\n\t\treturn mpeg3video_previous_frame(file->vtrack[stream]->video);\n}\n\ndouble mpeg3_tell_percentage(mpeg3_t *file)\n{\n\tdouble percent = 0;\n\tif(file->last_type_read == 1)\n\t{\n\t\tpercent = mpeg3demux_tell_percentage(file->atrack[file->last_stream_read]->demuxer);\n\t}\n\n\tif(file->last_type_read == 2)\n\t{\n\t\tpercent = mpeg3demux_tell_percentage(file->vtrack[file->last_stream_read]->demuxer);\n\t}\n\treturn percent;\n}\n\ndouble mpeg3_get_time(mpeg3_t *file)\n{\n\tdouble atime = 0, vtime = 0;\n\n\tif(file->is_transport_stream || file->is_program_stream)\n\t{\n/* Timecode only available in transport stream */\n\t\tif(file->last_type_read == 1)\n\t\t{\n\t\t\tatime = mpeg3demux_get_time(file->atrack[file->last_stream_read]->demuxer);\n\t\t}\n\t\telse\n\t\tif(file->last_type_read == 2)\n\t\t{\n\t\t\tvtime = mpeg3demux_get_time(file->vtrack[file->last_stream_read]->demuxer);\n\t\t}\n\t}\n\telse\n\t{\n/* Use percentage and total time */\n\t\tif(file->has_audio)\n\t\t{\n\t\t\tatime = mpeg3demux_tell_percentage(file->atrack[0]->demuxer) * \n\t\t\t\t\t\tmpeg3_audio_samples(file, 0) / mpeg3_sample_rate(file, 0);\n\t\t}\n\n\t\tif(file->has_video)\n\t\t{\n\t\t\tvtime = mpeg3demux_tell_percentage(file->vtrack[0]->demuxer) *\n\t\t\t\t\t\tmpeg3_video_frames(file, 0) / mpeg3_frame_rate(file, 0);\n\t\t}\n\t}\n\n\treturn MAX(atime, vtime);\n}\n\nint mpeg3_end_of_audio(mpeg3_t *file, int stream)\n{\n\tint result = 0;\n\tresult = mpeg3demux_eof(file->atrack[stream]->demuxer);\n\treturn result;\n}\n\nint mpeg3_end_of_video(mpeg3_t *file, int stream)\n{\n\tint result = 0;\n\tresult = mpeg3demux_eof(file->vtrack[stream]->demuxer);\n\treturn result;\n}\n\n\nint mpeg3_read_frame(mpeg3_t *file, \n\t\tunsigned char **output_rows, \n\t\tint in_x, \n\t\tint in_y, \n\t\tint in_w, \n\t\tint in_h, \n\t\tint out_w, \n\t\tint out_h, \n\t\tint color_model,\n\t\tint stream)\n{\n\tint result = -1;\n\n\n\tif(file->has_video)\n\t{\n\t\tresult = mpeg3video_read_frame(file->vtrack[stream]->video, \n\t\t\t\t\tfile->vtrack[stream]->current_position, \n\t\t\t\t\toutput_rows,\n\t\t\t\t\tin_x, \n\t\t\t\t\tin_y, \n\t\t\t\t\tin_w, \n\t\t\t\t\tin_h, \n\t\t\t\t\tout_w,\n\t\t\t\t\tout_h,\n\t\t\t\t\tcolor_model);\n\t\tfile->last_type_read = 2;\n\t\tfile->last_stream_read = stream;\n\t\tfile->vtrack[stream]->current_position++;\n\t}\n\n\n\treturn result;\n}\n\nint mpeg3_drop_frames(mpeg3_t *file, long frames, int stream)\n{\n\tint result = -1;\n\n\tif(file->has_video)\n\t{\n\t\tresult = mpeg3video_drop_frames(file->vtrack[stream]->video, \n\t\t\t\t\t\tframes);\n\t\tif(frames > 0) file->vtrack[stream]->current_position += frames;\n\t\tfile->last_type_read = 2;\n\t\tfile->last_stream_read = stream;\n\t}\n\treturn result;\n}\n\nint mpeg3_read_yuvframe(mpeg3_t *file,\n\t\tchar *y_output,\n\t\tchar *u_output,\n\t\tchar *v_output,\n\t\tint in_x, \n\t\tint in_y,\n\t\tint in_w,\n\t\tint in_h,\n\t\tint stream)\n{\n\tint result = -1;\n\n//printf(\"mpeg3_read_yuvframe 1 %d %d\\n\", mpeg3demux_tell(file->vtrack[stream]->demuxer), mpeg3demuxer_total_bytes(file->vtrack[stream]->demuxer));\n\tif(file->has_video)\n\t{\n\t\tresult = mpeg3video_read_yuvframe(file->vtrack[stream]->video, \n\t\t\t\t\tfile->vtrack[stream]->current_position, \n\t\t\t\t\ty_output,\n\t\t\t\t\tu_output,\n\t\t\t\t\tv_output,\n\t\t\t\t\tin_x,\n\t\t\t\t\tin_y,\n\t\t\t\t\tin_w,\n\t\t\t\t\tin_h);\n\t\tfile->last_type_read = 2;\n\t\tfile->last_stream_read = stream;\n\t\tfile->vtrack[stream]->current_position++;\n\t}\n//printf(\"mpeg3_read_yuvframe 2 %d %d\\n\", mpeg3demux_tell(file->vtrack[stream]->demuxer), mpeg3demuxer_total_bytes(file->vtrack[stream]->demuxer));\n\treturn result;\n}\n\n\nint mpeg3_read_audio(mpeg3_t *file, \n\t\tfloat *output_f, \n\t\tshort *output_i, \n\t\tint channel, \n\t\tlong samples,\n\t\tint stream)\n{\n\tint result = -1;\n\n//printf(\"mpeg3_read_audio 1 %d %d\\n\", mpeg3demux_tell(file->atrack[stream]->demuxer), mpeg3demuxer_total_bytes(file->atrack[stream]->demuxer));\n\tif(file->has_audio)\n\t{\n\t\tresult = mpeg3audio_decode_audio(file->atrack[stream]->audio, \n\t\t\t\t\toutput_f, \n\t\t\t\t\toutput_i, \n\t\t\t\t\tchannel, \n\t\t\t\t\tfile->atrack[stream]->current_position, \n\t\t\t\t\tsamples);\n\t\tfile->last_type_read = 1;\n\t\tfile->last_stream_read = stream;\n\t\tfile->atrack[stream]->current_position += samples;\n\t}\n//printf(\"mpeg3_read_audio 2 %d %d\\n\", mpeg3demux_tell(file->atrack[stream]->demuxer), mpeg3demuxer_total_bytes(file->atrack[stream]->demuxer));\n\n\treturn result;\n}\n\nint mpeg3_reread_audio(mpeg3_t *file, \n\t\tfloat *output_f, \n\t\tshort *output_i, \n\t\tint channel, \n\t\tlong samples,\n\t\tint stream)\n{\n\tif(file->has_audio)\n\t{\n\t\tmpeg3_set_sample(file, \n\t\t\tfile->atrack[stream]->current_position - samples,\n\t\t\tstream);\n\t\tfile->last_type_read = 1;\n\t\tfile->last_stream_read = stream;\n\t\treturn mpeg3_read_audio(file, \n\t\t\toutput_f, \n\t\t\toutput_i, \n\t\t\tchannel, \n\t\t\tsamples,\n\t\t\tstream);\n\t}\n\treturn -1;\n}\n\nint mpeg3_read_audio_chunk(mpeg3_t *file, \n\t\tunsigned char *output, \n\t\tlong *size, \n\t\tlong max_size,\n\t\tint stream)\n{\n\tint result = 0;\n\tif(file->has_audio)\n\t{\n\t\tresult = mpeg3audio_read_raw(file->atrack[stream]->audio, output, size, max_size);\n\t\tfile->last_type_read = 1;\n\t\tfile->last_stream_read = stream;\n\t}\n\treturn result;\n}\n\nint mpeg3_read_video_chunk(mpeg3_t *file, \n\t\tunsigned char *output, \n\t\tlong *size, \n\t\tlong max_size,\n\t\tint stream)\n{\n\tint result = 0;\n\tif(file->has_video)\n\t{\n\t\tresult = mpeg3video_read_raw(file->vtrack[stream]->video, output, size, max_size);\n\t\tfile->last_type_read = 2;\n\t\tfile->last_stream_read = stream;\n\t}\n\treturn result;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/libmpeg3.h",
    "content": " /*  Changed Sept 15th by John M McIntosh to support Macintosh & Squeak\n */\n\n#ifndef LIBMPEG3_H\n#define LIBMPEG3_H\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#include \"mpeg3private.h\"\n\n\n/* Supported color models for mpeg3_read_frame */\n#define MPEG3_RGB565 2\n#define MPEG3_RGB555 14  //JMM for mac\n#define MPEG3_RGBI555 16  //SVP for intel\n#define MPEG3_BGR888 0\n#define MPEG3_BGRA8888 1\n#define MPEG3_RGB888 3\n#define MPEG3_RGBA8888 4  \n#define MPEG3_ARGB8888 13  //JMM for mac\n#define MPEG3_RGBA16161616 5\n\n/* Color models for the 601 to RGB conversion */\n/* 601 not implemented for scalar code */\n#define MPEG3_601_RGB565 11\n#define MPEG3_601_RGB555 15 //JMM for Squeak\n#define MPEG3_601_RGBI555 17 //SVP for intel\n#define MPEG3_601_BGR888 7\n#define MPEG3_601_BGRA8888 8\n#define MPEG3_601_RGB888 9\n#define MPEG3_601_RGBA8888 10\n#define MPEG3_601_ARGB8888 12 //JMM for Squeak\n\n/* Check for file compatibility.  Return 1 if compatible. */\nint mpeg3_check_sig(char *path);\n\n/* Open the MPEG3 stream. */\nmpeg3_t* mpeg3_open(char *path,int size);\n\n/* Open the MPEG3 stream and copy the tables from an already open stream. */\n/* Eliminates the initial timecode search. */\nmpeg3_t* mpeg3_open_copy(char *path, mpeg3_t *old_file,int size);\nint mpeg3_close(mpeg3_t *file);\n\n/* Performance */\nint mpeg3_set_cpus(mpeg3_t *file, int cpus);\nint mpeg3_set_mmx(mpeg3_t *file, int use_mmx);\n\n/* Query the MPEG3 stream about audio. */\nint mpeg3_has_audio(mpeg3_t *file);\nint mpeg3_total_astreams(mpeg3_t *file);             /* Number of multiplexed audio streams */\nint mpeg3_audio_channels(mpeg3_t *file, int stream);\nint mpeg3_sample_rate(mpeg3_t *file, int stream);\n\n/* Total length obtained from the timecode. */\n/* For DVD files, this is unreliable. */\nlong mpeg3_audio_samples(mpeg3_t *file, int stream); \nint mpeg3_set_sample(mpeg3_t *file, long sample, int stream);    /* Seek to a sample */\nlong mpeg3_get_sample(mpeg3_t *file, int stream);    /* Tell current position */\n\n/* Read a PCM buffer of audio from 1 channel and advance the position. */\n/* Return a 1 if error. */\n/* Stream defines the number of the multiplexed stream to read. */\nint mpeg3_read_audio(mpeg3_t *file, \n\t\tfloat *output_f,      /* Pointer to pre-allocated buffer of floats */\n\t\tshort *output_i,      /* Pointer to pre-allocated buffer of int16's */\n\t\tint channel,          /* Channel to decode */\n\t\tlong samples,         /* Number of samples to decode */\n\t\tint stream);          /* Stream containing the channel */\n\n/* Reread the last PCM buffer from a different channel and advance the position */\nint mpeg3_reread_audio(mpeg3_t *file, \n\t\tfloat *output_f,      /* Pointer to pre-allocated buffer of floats */\n\t\tshort *output_i,      /* Pointer to pre-allocated buffer of int16's */\n\t\tint channel,          /* Channel to decode */\n\t\tlong samples,         /* Number of samples to decode */\n\t\tint stream);          /* Stream containing the channel */\n\n/* Read the next compressed audio chunk.  Store the size in size and return a  */\n/* 1 if error. */\n/* Stream defines the number of the multiplexed stream to read. */\nint mpeg3_read_audio_chunk(mpeg3_t *file, \n\t\tunsigned char *output, \n\t\tlong *size, \n\t\tlong max_size,\n\t\tint stream);\n\n/* Query the stream about video. */\nint mpeg3_has_video(mpeg3_t *file);\nint mpeg3_total_vstreams(mpeg3_t *file);            /* Number of multiplexed video streams */\nint mpeg3_video_width(mpeg3_t *file, int stream);\nint mpeg3_video_height(mpeg3_t *file, int stream);\nfloat mpeg3_frame_rate(mpeg3_t *file, int stream);  /* Frames/sec */\n\n/* Total length.   */\n/* For DVD files, this is 1 indicating only percentage seeking is available. */\nlong mpeg3_video_frames(mpeg3_t *file, int stream);\nint mpeg3_set_frame(mpeg3_t *file, long frame, int stream); /* Seek to a frame */\nint mpeg3_skip_frames();\nlong mpeg3_get_frame(mpeg3_t *file, int stream);            /* Tell current position */\n\n/* Seek all the tracks based on a percentage of the total bytes in the  */\n/* file or the total */\n/* time in a toc if one exists.  Percentage is a 0 to 1 double. */\n/* This eliminates the need for tocs and 64 bit longs but doesn't  */\n/* give frame accuracy. */\nint mpeg3_seek_percentage(mpeg3_t *file, double percentage);\ndouble mpeg3_tell_percentage(mpeg3_t *file);\nint mpeg3_previous_frame(mpeg3_t *file, int stream);\nint mpeg3_end_of_audio(mpeg3_t *file, int stream);\nint mpeg3_end_of_video(mpeg3_t *file, int stream);\n\n/* Give the seconds time in the last packet read */\ndouble mpeg3_get_time(mpeg3_t *file);\n\n/* Read a frame.  The dimensions of the input area and output frame must be supplied. */\n/* The frame is taken from the input area and scaled to fit the output frame in 1 step. */\n/* Stream defines the number of the multiplexed stream to read. */\n/* The last row of **output_rows must contain 4 extra bytes for scratch work. */\nint mpeg3_read_frame(mpeg3_t *file, \n\t\tunsigned char **output_rows, /* Array of pointers to the start of each output row */\n\t\tint in_x,                    /* Location in input frame to take picture */\n\t\tint in_y, \n\t\tint in_w, \n\t\tint in_h, \n\t\tint out_w,                   /* Dimensions of output_rows */\n\t\tint out_h, \n\t\tint color_model,             /* One of the color model #defines */\n\t\tint stream);\n\n/* Read a YUV frame.  The 3 planes are copied into the y, u, and v buffers provided. */\n/* The input is cropped to the dimensions given but not scaled. */\nint mpeg3_read_yuvframe(mpeg3_t *file,\n\t\tchar *y_output,\n\t\tchar *u_output,\n\t\tchar *v_output,\n\t\tint in_x,\n\t\tint in_y,\n\t\tint in_w,\n\t\tint in_h,\n\t\tint stream);\n\nint mpeg3_drop_frames(mpeg3_t *file, long frames, int stream);\n\n/* Read the next compressed frame including headers. */\n/* Store the size in size and return a 1 if error. */\n/* Stream defines the number of the multiplexed stream to read. */\nint mpeg3_read_video_chunk(mpeg3_t *file, \n\t\tunsigned char *output, \n\t\tlong *size, \n\t\tlong max_size,\n\t\tint stream);\n\n/* Master control */\nint mpeg3_total_programs();\nint mpeg3_set_program(int program);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/make_package",
    "content": "#!/bin/sh\n\nVERSION=1.2.1\n\nrm -r /tmp/libmpeg3-$VERSION\nmkdir -p /tmp/libmpeg3-$VERSION\nmake clean\ncp -rd * /tmp/libmpeg3-$VERSION\ncd /tmp\ntar zcf libmpeg3-$VERSION.tar.gz libmpeg3-$VERSION\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/mpeg3atrack.c",
    "content": "/* \n *\n *  This file is part of libmpeg3\n *\t\n * LibMPEG3\n * Author: Adam Williams <broadcast@earthling.net>\n * Page: heroine.linuxbox.com\n * Page: http://www.smalltalkconsulting.com/html/mpeg3source.html (for Squeak)\n *\n    LibMPEG3 was originally licenced under GPL. It was relicensed by\n    the author under the LGPL and the Squeak license on Nov 1st, 2000\n    \n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA \n    \n    Also licensed under the Squeak license.\n    http://www.squeak.org/license.html\n */\n \n /*  Changed Sept 15th by John M McIntosh to support Macintosh & Squeak\n */\n#include \"libmpeg3.h\"\n#include \"mpeg3protos.h\"\n\n#include <stdlib.h>\n\nmpeg3_atrack_t* mpeg3_new_atrack(mpeg3_t *file, int stream_id, int format, mpeg3_demuxer_t *demuxer)\n{\n\tmpeg3_atrack_t *new_atrack;\n\n\tnew_atrack = (mpeg3_atrack_t *) memoryAllocate(1, sizeof(mpeg3_atrack_t));\n\tnew_atrack->channels = 0;\n\tnew_atrack->sample_rate = 0;\n\tnew_atrack->total_samples = 0;\n\tnew_atrack->current_position = 0;\n\tnew_atrack->demuxer = mpeg3_new_demuxer(file, 1, 0, stream_id);\n\tif(demuxer) mpeg3demux_copy_titles(new_atrack->demuxer, demuxer);\n\tnew_atrack->audio = mpeg3audio_new(file, new_atrack, format);\n\n\tif(!new_atrack->audio)\n\t{\n/* Failed */\n\t\tmpeg3_delete_atrack(file, new_atrack);\n\t\tnew_atrack = 0;\n\t}\n\treturn new_atrack;\n}\n\nint mpeg3_delete_atrack(mpeg3_t *file, mpeg3_atrack_t *atrack)\n{\n\tif(atrack->audio)\n\t\tmpeg3audio_delete(atrack->audio);\n\tif(atrack->demuxer)\n\t\tmpeg3_delete_demuxer(atrack->demuxer);\n\tmemoryFree(atrack);\n}\n\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/mpeg3atrack.h",
    "content": " /*  Changed Sept 15th by John M McIntosh to support Macintosh & Squeak\n */\n#ifndef MPEG3ATRACK_H\n#define MPEG3ATRACK_H\n\n#include \"mpeg3demux.h\"\n#include \"mpeg3audio.h\"\n\n\ntypedef struct\n{\n\tint channels;\n\tint sample_rate;\n\tmpeg3_demuxer_t *demuxer;\n\tmpeg3audio_t *audio;\n\tlong current_position;\n\tlong total_samples;\n} mpeg3_atrack_t;\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/mpeg3cat.c",
    "content": "/*  Changed Sept 15th by John M McIntosh to support Macintosh & Squeak\n *\n * Concatenate elementary streams */\n\n#include \"libmpeg3.h\"\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n#define MPEG3_SEQUENCE_START_CODE        0x000001b3\n#define BUFFER_SIZE            1000000\n\nint main(int argc, char *argv[])\n{\n\tchar inpath[1024];\n\tmpeg3_t *in;\n\tint current_file, current_output_file = 0, i;\n\tunsigned int bits;\n\tunsigned char *buffer;\n\tlong output_size;\n\tint result = 0;\n\tlong total_frames = 0;\n\tint do_audio = 0, do_video = 0;\n\tint stream = 0;\n\n\tif(argc < 2)\n\t{\n\t\tfprintf(stderr, \"Concatenate elementary streams or demultiplex a program stream.\\n\"\n\t\t\t\"Usage: mpeg3cat -[av0123456789] <infile> [infile...] > <outfile>\\n\\n\"\n\t\t\t\"Example: Concatenate 2 video files: mpeg3cat xena1.m2v xena2.m2v > xena.m2v\\n\"\n\t\t\t\"         Extract audio stream 0: mpeg3cat -a0 xena.vob > war_cry.ac3\\n\");\n\t\texit(1);\n\t}\n\n\tfor(i = 1; i < argc; i++)\n\t{\n\t\tif(argv[i][0] == '-')\n\t\t{\n\t\t\tif(argv[i][1] != 'a' && argv[i][1] != 'v')\n\t\t\t{\n\t\t\t\tfprintf(stderr, \"invalid option %s\\n\", argv[i]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(argv[i][1] == 'a') do_audio = 1;\n\t\t\t\telse\n\t\t\t\tif(argv[i][1] == 'v') do_video = 1;\n\t\t\t\t\n\t\t\t\tif(argv[i][2] != 0)\n\t\t\t\t{\n\t\t\t\t\tstream = argv[i][2] - 48;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tbuffer = (unsigned char *) malloc(BUFFER_SIZE);\n\n\tfor(current_file = 1; current_file < argc; current_file++)\n\t{\n\t\tif(argv[current_file][0] == '-') continue;\n\n\t\tstrcpy(inpath, argv[current_file]);\n\t\tif(!(in = mpeg3_open(inpath)))\n\t\t{\n\t\t\tfprintf(stderr, \"Skipping %s\\n\", inpath);\n\t\t\tcontinue;\n\t\t}\n\n\t\tif((mpeg3_has_audio(in) && in->is_audio_stream) || \n\t\t\t(do_audio && !in->is_audio_stream && !in->is_video_stream))\n\t\t{\n\t\t\tdo_audio = 1;\n/* Add audio stream to end */\n\t\t\twhile(!mpeg3_read_audio_chunk(in, buffer, \n\t\t\t\t&output_size, \n\t\t\t\tBUFFER_SIZE,\n\t\t\t\tstream))\n\t\t\t{\n\t\t\t\tresult = !fwrite(buffer, output_size, 1, stdout);\n\t\t\t\tif(result)\n\t\t\t\t{\n\t\t\t\t\tperror(\"fwrite audio chunk\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\tif((mpeg3_has_video(in) && in->is_video_stream) ||\n\t\t\t(do_video && !in->is_video_stream && !in->is_audio_stream))\n\t\t{\n/* Add video stream to end */\n\t\t\tint hour, minute, second, frame;\n\t\t\tlong gop_frame;\n\t\t\tunsigned long code;\n\t\t\tfloat carry;\n\t\t\tint i, offset;\n\t\t\t\n\t\t\tdo_video = 1;\n\t\t\twhile(!mpeg3_read_video_chunk(in, \n\t\t\t\tbuffer, \n\t\t\t\t&output_size, \n\t\t\t\tBUFFER_SIZE,\n\t\t\t\tstream) &&\n\t\t\t\toutput_size >= 4)\n\t\t\t{\n\t\t\t\tcode = (unsigned long)buffer[output_size - 4] << 24; \n\t\t\t\tcode |= (unsigned long)buffer[output_size - 3] << 16; \n\t\t\t\tcode |= (unsigned long)buffer[output_size - 2] << 8; \n\t\t\t\tcode |= (unsigned long)buffer[output_size - 1]; \n\n/* Got a frame at the end of this buffer. */\n\t\t\t\tif(code == MPEG3_PICTURE_START_CODE)\n\t\t\t\t{\n\t\t\t\t\ttotal_frames++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\tif(code == MPEG3_SEQUENCE_END_CODE)\n\t\t\t\t{\n/* Got a sequence end code at the end of this buffer. */\n\t\t\t\t\toutput_size -= 4;\n\t\t\t\t}\n\n\t\t\t\tcode = (unsigned long)buffer[0] << 24;\n\t\t\t\tcode |= (unsigned long)buffer[1] << 16;\n\t\t\t\tcode |= (unsigned long)buffer[2] << 8;\n\t\t\t\tcode |= buffer[3];\n\n\t\t\t\ti = 0;\n\t\t\t\toffset = 0;\n\t\t\t\tif(code == MPEG3_SEQUENCE_START_CODE && current_output_file > 0)\n\t\t\t\t{\n/* Skip the sequence start code */\n\t\t\t\t\ti += 4;\n\t\t\t\t\twhile(i < output_size && \n\t\t\t\t\t\tcode != MPEG3_GOP_START_CODE)\n\t\t\t\t\t{\n\t\t\t\t\t\tcode <<= 8;\n\t\t\t\t\t\tcode |= buffer[i++];\n\t\t\t\t\t}\n\t\t\t\t\ti -= 4;\n\t\t\t\t\toffset = i;\n\t\t\t\t}\n\n/* Search for GOP header to fix */\n\t\t\t\tcode = (unsigned long)buffer[i++] << 24;\n\t\t\t\tcode |= (unsigned long)buffer[i++] << 16;\n\t\t\t\tcode |= (unsigned long)buffer[i++] << 8;\n\t\t\t\tcode |= buffer[i++];\n\t\t\t\twhile(i < output_size &&\n\t\t\t\t\tcode != MPEG3_GOP_START_CODE)\n\t\t\t\t{\n\t\t\t\t\tcode <<= 8;\n\t\t\t\t\tcode |= buffer[i++];\n\t\t\t\t}\n\n\t\t\t\tif(code == MPEG3_GOP_START_CODE)\n\t\t\t\t{\n/* Get the time code */\n\t\t\t\t\tcode = (unsigned long)buffer[i] << 24;\n\t\t\t\t\tcode |= (unsigned long)buffer[i + 1] << 16;\n\t\t\t\t\tcode |= (unsigned long)buffer[i + 2] << 8;\n\t\t\t\t\tcode |= (unsigned long)buffer[i + 3];\n\n\t\t\t\t\thour = code >> 26 & 0x1f;\n\t\t\t\t\tminute = code >> 20 & 0x3f;\n\t\t\t\t\tsecond = code >> 13 & 0x3f;\n\t\t\t\t\tframe = code >> 7 & 0x3f;\n\n\t\t\t\t\tgop_frame = (long)(hour * 3600 * mpeg3_frame_rate(in, stream) +\n\t\t\t\t\t\t\tminute * 60 * mpeg3_frame_rate(in, stream) +\n\t\t\t\t\t\t\tsecond * mpeg3_frame_rate(in, stream) + \n\t\t\t\t\t\t\tframe);\n/* fprintf(stderr, \"old: %02d:%02d:%02d:%02d \", hour, minute, second, frame); */\n/* Write a new time code */\n\t\t\t\t\thour = (long)((float)(total_frames - 1) / mpeg3_frame_rate(in, stream) / 3600);\n\t\t\t\t\tcarry = hour * 3600 * mpeg3_frame_rate(in, stream);\n\t\t\t\t\tminute = (long)((float)(total_frames - 1 - carry) / mpeg3_frame_rate(in, stream) / 60);\n\t\t\t\t\tcarry += minute * 60 * mpeg3_frame_rate(in, stream);\n\t\t\t\t\tsecond = (long)((float)(total_frames - 1 - carry) / mpeg3_frame_rate(in, stream));\n\t\t\t\t\tcarry += second * mpeg3_frame_rate(in, stream);\n\t\t\t\t\tframe = (total_frames - 1 - carry);\n\n\t\t\t\t\tbuffer[i] = ((code >> 24) & 0x80) | (hour << 2) | (minute >> 4);\n\t\t\t\t\tbuffer[i + 1] = ((code >> 16) & 0x08) | ((minute & 0xf) << 4) | (second >> 3);\n\t\t\t\t\tbuffer[i + 2] = ((second & 0x7) << 5) | (frame >> 1);\n\t\t\t\t\tbuffer[i + 3] = (code & 0x7f) | ((frame & 0x1) << 7);\n/* fprintf(stderr, \"new: %02d:%02d:%02d:%02d\\n\", hour, minute, second, frame); */\n\t\t\t\t}\n\n/* Write the frame */\n\t\t\t\tresult = !fwrite(buffer + offset, output_size - offset, 1, stdout);\n\t\t\t\tif(result)\n\t\t\t\t{\n\t\t\t\t\tperror(\"fwrite video chunk\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfprintf(stderr, \"Unsupported stream type.\\n\");\n\t\t\tmpeg3_close(in);\n\t\t\tin = 0;\n\t\t\tcontinue;\n\t\t}\n\t\t\n\t\tmpeg3_close(in);\n\t\tin = 0;\n\t\tcurrent_output_file++;\n\t}\n\n/* Terminate output */\n\tif(current_output_file > 0 && do_video)\n\t{\n/*fprintf(stderr, \"\\n\"); */\n/* Write new end of sequence */\n\t\tbuffer[0] = MPEG3_SEQUENCE_END_CODE >> 24;\n\t\tbuffer[1] = (MPEG3_SEQUENCE_END_CODE >> 16) & 0xff;\n\t\tbuffer[2] = (MPEG3_SEQUENCE_END_CODE >> 8) & 0xff;\n\t\tbuffer[3] = MPEG3_SEQUENCE_END_CODE & 0xff;\n\t\tresult = !fwrite(buffer, 4, 1, stdout);\n\t}\n\n\texit(0);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/mpeg3css.h",
    "content": "#ifndef MPEG3CSS_H\n#define MPEG3CSS_H\n\n\n#include \"mpeg3private.inc\"\n\nstruct mpeg3_block \n{\n    char    huh;\n};\n\nstruct mpeg3_playkey {\n    char    huh;\n};\n\ntypedef struct\n{\n    char    huh;\n} mpeg3_css_t;\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/mpeg3demux.c",
    "content": "/* \n *\n *  This file is part of libmpeg3\n *\t\n * LibMPEG3\n * Author: Adam Williams <broadcast@earthling.net>\n * Page: heroine.linuxbox.com\n * Page: http://www.smalltalkconsulting.com/html/mpeg3source.html (for Squeak)\n *\n    LibMPEG3 was originally licenced under GPL. It was relicensed by\n    the author under the LGPL and the Squeak license on Nov 1st, 2000\n    \n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA \n    \n    Also licensed under the Squeak license.\n    http://www.squeak.org/license.html\n */\n \n /*  Changed Sept 15th by John M McIntosh to support Macintosh & Squeak\n */\n#include \"libmpeg3.h\"\n#include \"mpeg3io.h\"\n#include \"mpeg3protos.h\"\n\n#include <math.h>\n#include <stdlib.h>\n#include <string.h>\n\n#define ABS(x) ((x) >= 0 ? (x) : -(x))\n\n/* Don't advance pointer */\nstatic inline unsigned char mpeg3packet_next_char(mpeg3_demuxer_t *demuxer)\n{\n\treturn demuxer->raw_data[demuxer->raw_offset];\n}\n\nunsigned char mpeg3packet_read_char(mpeg3_demuxer_t *demuxer)\n{\n\tunsigned char result = demuxer->raw_data[demuxer->raw_offset++];\n\treturn result;\n}\n\nstatic inline unsigned int mpeg3packet_read_int16(mpeg3_demuxer_t *demuxer)\n{\n\tunsigned int a, b, result;\n\ta = demuxer->raw_data[demuxer->raw_offset++];\n\tb = demuxer->raw_data[demuxer->raw_offset++];\n\tresult = (a << 8) | b;\n\n\treturn result;\n}\n\nstatic inline unsigned int mpeg3packet_next_int24(mpeg3_demuxer_t *demuxer)\n{\n\tunsigned int a, b, c, result;\n\ta = demuxer->raw_data[demuxer->raw_offset];\n\tb = demuxer->raw_data[demuxer->raw_offset + 1];\n\tc = demuxer->raw_data[demuxer->raw_offset + 2];\n\tresult = (a << 16) | (b << 8) | c;\n\n\treturn result;\n}\n\nstatic inline unsigned int mpeg3packet_read_int24(mpeg3_demuxer_t *demuxer)\n{\n\tunsigned int a, b, c, result;\n\ta = demuxer->raw_data[demuxer->raw_offset++];\n\tb = demuxer->raw_data[demuxer->raw_offset++];\n\tc = demuxer->raw_data[demuxer->raw_offset++];\n\tresult = (a << 16) | (b << 8) | c;\n\n\treturn result;\n}\n\nstatic inline unsigned int mpeg3packet_read_int32(mpeg3_demuxer_t *demuxer)\n{\n\tunsigned int a, b, c, d, result;\n\ta = demuxer->raw_data[demuxer->raw_offset++];\n\tb = demuxer->raw_data[demuxer->raw_offset++];\n\tc = demuxer->raw_data[demuxer->raw_offset++];\n\td = demuxer->raw_data[demuxer->raw_offset++];\n\tresult = (a << 24) | (b << 16) | (c << 8) | d;\n\n\treturn result;\n}\n\nstatic inline unsigned int mpeg3packet_skip(mpeg3_demuxer_t *demuxer, long length)\n{\n\tdemuxer->raw_offset += length;\n\treturn 0;\n}\n\nint mpeg3_get_adaptation_field(mpeg3_demuxer_t *demuxer)\n{\n\tlong length;\n\tint pcr_flag;\n\n\tdemuxer->adaptation_fields++;\n/* get adaptation field length */\n\tlength = mpeg3packet_read_char(demuxer);\n/* get first byte */\n  \tpcr_flag = (mpeg3packet_read_char(demuxer) >> 4) & 1;           \n\n\tif(pcr_flag)\n\t{\n    \tunsigned long clk_ref_base = mpeg3packet_read_int32(demuxer);\n    \tunsigned int clk_ref_ext = mpeg3packet_read_int16(demuxer);\n\n\t\tif (clk_ref_base > 0x7fffffff)\n\t\t{   /* correct for invalid numbers */\n\t\t\tclk_ref_base = 0;               /* ie. longer than 32 bits when multiplied by 2 */\n\t\t\tclk_ref_ext = 0;                /* multiplied by 2 corresponds to shift left 1 (<<=1) */\n\t\t}\n\t\telse \n\t\t{\n\t\t\tclk_ref_base <<= 1; /* Create space for bit */\n\t\t\tclk_ref_base |= (clk_ref_ext >> 15);          /* Take bit */\n\t\t\tclk_ref_ext &= 0x01ff;                        /* Only lower 9 bits */\n\t\t}\n\t\tdemuxer->time = clk_ref_base + clk_ref_ext / 300;\n\t    if(length) mpeg3packet_skip(demuxer, length - 7);\n\t}\n\telse\n\tmpeg3packet_skip(demuxer, length - 1);\n\n\treturn 0;\n}\n\nint mpeg3_get_program_association_table(mpeg3_demuxer_t *demuxer)\n{\n\tdemuxer->program_association_tables++;\n\tdemuxer->table_id = mpeg3packet_read_char(demuxer);\n\tdemuxer->section_length = mpeg3packet_read_int16(demuxer) & 0xfff;\n\tdemuxer->transport_stream_id = mpeg3packet_read_int16(demuxer);\n\tmpeg3packet_skip(demuxer, demuxer->raw_size - demuxer->raw_offset);\n\treturn 0;\n}\n\nint mpeg3packet_get_data_buffer(mpeg3_demuxer_t *demuxer)\n{\n\twhile(demuxer->raw_offset < demuxer->raw_size && demuxer->data_size < demuxer->data_allocated)\n\t{\n\t\tdemuxer->data_buffer[demuxer->data_size++] = demuxer->raw_data[demuxer->raw_offset++];\n\t}\n\treturn 0;\n}\n\nint mpeg3_get_pes_packet_header(mpeg3_demuxer_t *demuxer, unsigned long *pts, unsigned long *dts)\n{\n\tunsigned int pes_header_bytes = 0;\n\tunsigned int pts_dts_flags;\n\tint pes_header_data_length;\n\n/* drop first 8 bits */\n\tmpeg3packet_read_char(demuxer);  \n\tpts_dts_flags = (mpeg3packet_read_char(demuxer) >> 6) & 0x3;\n\tpes_header_data_length = mpeg3packet_read_char(demuxer);\n\n/* Get Presentation Time stamps and Decoding Time Stamps */\n\tif(pts_dts_flags == 2)\n\t{\n\t\t*pts = (mpeg3packet_read_char(demuxer) >> 1) & 7;  /* Only low 4 bits (7==1111) */\n\t\t*pts <<= 15;\n\t\t*pts |= (mpeg3packet_read_int16(demuxer) >> 1);\n\t\t*pts <<= 15;\n\t\t*pts |= (mpeg3packet_read_int16(demuxer) >> 1);\n\t\tpes_header_bytes += 5;\n\t}\n\telse if(pts_dts_flags == 3)\n\t{      \n\t\t*pts = (mpeg3packet_read_char(demuxer) >> 1) & 7;  /* Only low 4 bits (7==1111) */\n\t\t*pts <<= 15;\n\t\t*pts |= (mpeg3packet_read_int16(demuxer) >> 1);\n\t\t*pts <<= 15;\n\t\t*pts |= (mpeg3packet_read_int16(demuxer) >> 1);\n\t\t*dts = (mpeg3packet_read_char(demuxer) >> 1) & 7;  /* Only low 4 bits (7==1111) */\n\t\t*dts <<= 15;\n\t\t*dts |= (mpeg3packet_read_int16(demuxer) >> 1);\n\t\t*dts <<= 15;\n\t\t*dts |= (mpeg3packet_read_int16(demuxer) >> 1);\n\t\tpes_header_bytes += 10;\n  }\n/* extract other stuff here! */\n  \n\tmpeg3packet_skip(demuxer, pes_header_data_length - pes_header_bytes);\n\treturn 0;\n}\n\nint get_unknown_data(mpeg3_demuxer_t *demuxer)\n{\n\tmpeg3packet_skip(demuxer, demuxer->raw_size - demuxer->raw_offset);\n\treturn 0;\n}\n\nint mpeg3_get_pes_packet_data(mpeg3_demuxer_t *demuxer, unsigned int stream_id)\n{\n\tunsigned long pts = 0, dts = 0;\n\n\tif((stream_id >> 4) == 12 || (stream_id >> 4) == 13)\n\t{\n/* Just pick the first available stream if no ID is set */\n\t\tif(demuxer->astream == -1)\n\t\t    demuxer->astream = (stream_id & 0x0f);\n\n    \tif((stream_id & 0x0f) == demuxer->astream && demuxer->do_audio)\n\t\t{\n\t\t\tmpeg3_get_pes_packet_header(demuxer, &pts, &dts);\n\t\t\tdemuxer->pes_audio_time = pts;\n\t\t\tdemuxer->audio_pid = demuxer->pid;\n\t\t\treturn mpeg3packet_get_data_buffer(demuxer);\n    \t}\n\t}\n\telse \n\tif((stream_id >> 4)==14)\n\t{\n/* Just pick the first available stream if no ID is set */\n\t\tif(demuxer->vstream == -1)\n\t\t\tdemuxer->vstream = (stream_id & 0x0f);\n\n\t\tif((stream_id & 0x0f) == demuxer->vstream && demuxer->do_video)\n\t\t{\n\t\t\tmpeg3_get_pes_packet_header(demuxer, &pts, &dts);\n\t\t\tdemuxer->pes_video_time = pts;\n\t\t\tdemuxer->video_pid = demuxer->pid;\n\t\t\treturn mpeg3packet_get_data_buffer(demuxer);\n\t\t}\n\t}\n\telse \n\t{\n\t\treturn get_unknown_data(demuxer);\n\t}\n\n\tmpeg3packet_skip(demuxer, demuxer->raw_size - demuxer->raw_offset);\n\n\treturn 0;\n}\n\nint mpeg3_get_pes_packet(mpeg3_demuxer_t *demuxer)\n{\n\tunsigned int stream_id;\n\n\tdemuxer->pes_packets++;\n\tstream_id = mpeg3packet_read_char(demuxer);\n/* Skip startcode */\n\tmpeg3packet_read_int24(demuxer);\n/* Skip pes packet length */\n\tmpeg3packet_read_int16(demuxer);\n\n\tif(stream_id != MPEG3_PRIVATE_STREAM_2 && stream_id != MPEG3_PADDING_STREAM)\n\t{\n\t\treturn mpeg3_get_pes_packet_data(demuxer, stream_id);\n\t}\n\telse\n\tif(stream_id == MPEG3_PRIVATE_STREAM_2)\n\t{\n/* Dump private data! */\n\t\tfprintf(stderr, \"stream_id == MPEG3_PRIVATE_STREAM_2\\n\");\n\t\tmpeg3packet_skip(demuxer, demuxer->raw_size - demuxer->raw_offset);\n\t\treturn 0;\n\t}\n\telse\n\tif(stream_id == MPEG3_PADDING_STREAM)\n\t{\n\t\tmpeg3packet_skip(demuxer, demuxer->raw_size - demuxer->raw_offset);\n\t\treturn 0;\n\t}\n\telse\n\t{\n    \tfprintf(stderr, \"unknown stream_id in pes packet\");\n\t\treturn 1;\n\t}\n\treturn 0;\n}\n\nint mpeg3_get_payload(mpeg3_demuxer_t *demuxer)\n{\n\tif(demuxer->payload_unit_start_indicator)\n\t{\n    \tif(demuxer->pid==0) mpeg3_get_program_association_table(demuxer);\n    \telse \n\t\tif(mpeg3packet_next_int24(demuxer) == MPEG3_PACKET_START_CODE_PREFIX) mpeg3_get_pes_packet(demuxer);\n    \telse \n\t\tmpeg3packet_skip(demuxer, demuxer->raw_size - demuxer->raw_offset);\n\t}\n\telse\n\t{\n    \tif(demuxer->pid == demuxer->audio_pid && demuxer->do_audio)\n\t\t{\n\t\t\tmpeg3packet_get_data_buffer(demuxer);\n\t\t}\n    \telse \n\t\tif(demuxer->pid == demuxer->video_pid && demuxer->do_video)\n\t\t{\n\t\t\tmpeg3packet_get_data_buffer(demuxer);\n\t\t}\n    \telse \n\t\tmpeg3packet_skip(demuxer, demuxer->raw_size - demuxer->raw_offset);\n\t}\n\treturn 0;\n}\n\n/* Read a transport packet */\nint mpeg3_read_transport(mpeg3_demuxer_t *demuxer)\n{\n\tmpeg3_title_t *title = demuxer->titles[demuxer->current_title];\n\tint result = mpeg3io_read_data(demuxer->raw_data, demuxer->packet_size, title->fs);\n\tunsigned int bits;\n\tint table_entry;\n\n\tdemuxer->raw_size = demuxer->packet_size;\n\tdemuxer->raw_offset = 0;\n\tif(result)\n\t{\n\t\tperror(\"mpeg3_read_transport\");\n\t\treturn 1;\n\t}\n\n/* Sync byte */\n\tif(mpeg3packet_read_char(demuxer) != MPEG3_SYNC_BYTE)\n\t{\n\t\tfprintf(stderr, \"mpeg3packet_read_char(demuxer) != MPEG3_SYNC_BYTE\\n\");\n\t\treturn 1;\n\t}\n\n/* \tbits = \tmpeg3packet_read_int24(demuxer) & 0x0000ffff; */\n/* \tdemuxer->transport_error_indicator = bits >> 15; */\n/* \tdemuxer->payload_unit_start_indicator = (bits >> 14) & 1; */\n/* \tdemuxer->pid = bits & 0x00001fff; */\n/* \tdemuxer->transport_scrambling_control = (mpeg3packet_next_char(demuxer) >> 6) & 0x3; */\n/* \tdemuxer->adaptation_field_control = (mpeg3packet_next_char(demuxer) >> 4) & 0x3; */\n/* \tdemuxer->continuity_counter = (mpeg3packet_read_char(demuxer) & 0xf); */\n\n    bits =  mpeg3packet_read_int24(demuxer) & 0x00ffffff;\n    demuxer->transport_error_indicator = (bits >> 23) & 0x1;\n    demuxer->payload_unit_start_indicator = (bits >> 22) & 0x1;\n    demuxer->pid = (bits >> 8) & 0x00001fff;\n    demuxer->transport_scrambling_control = (bits >> 6) & 0x3;\n    demuxer->adaptation_field_control = (bits >> 4) & 0x3;\n    demuxer->continuity_counter = bits & 0xf;\n\n\tif(demuxer->transport_error_indicator)\n\t{\n\t\tfprintf(stderr, \"demuxer->transport_error_indicator\\n\");\n\t\treturn 1;\n\t}\n \n    if (demuxer->pid == 0x1fff)\n\t{\n\t\tdemuxer->is_padding = 1;  /* padding; just go to next */\n\t\treturn 0;\n    }\n\telse\n\t{\n\t\tdemuxer->is_padding = 0;\n\t}\n\n/* Get pid */\n\tfor(table_entry = 0, result = 0; table_entry < demuxer->total_pids; table_entry++)\n\t{\n\t\tif(demuxer->pid == demuxer->pid_table[table_entry])\n\t\t{\n\t\t\tresult = 1;\n\t\t\tbreak;\n\t\t}\n\t}\n\n/* Not in pid table */\n\tif(!result)\n\t{\n\t\tdemuxer->pid_table[table_entry] = demuxer->pid;\n\t\tdemuxer->continuity_counters[table_entry] = demuxer->continuity_counter;  /* init */\n\t\tdemuxer->total_pids++;\n\t}\n\tresult = 0;\n\n/* Check counters */\n    if(demuxer->pid != MPEG3_PROGRAM_ASSOCIATION_TABLE && \n\t\tdemuxer->pid != MPEG3_CONDITIONAL_ACCESS_TABLE &&\n        (demuxer->adaptation_field_control == 1 || demuxer->adaptation_field_control == 3))\n\t{\n\t\tif(demuxer->continuity_counters[table_entry] != demuxer->continuity_counter)\n\t\t{\n\t\t\tfprintf(stderr, \"demuxer->continuity_counters[table_entry] != demuxer->continuity_counter\\n\");\n/* Reset it */\n\t\t\tdemuxer->continuity_counters[table_entry] = demuxer->continuity_counter;\n\t\t}\n\t\tif(++(demuxer->continuity_counters[table_entry]) > 15) demuxer->continuity_counters[table_entry] = 0;\n\t}\n\n    if(demuxer->adaptation_field_control == 2 || demuxer->adaptation_field_control == 3)\n    \tresult = mpeg3_get_adaptation_field(demuxer);\n\n    if(demuxer->adaptation_field_control == 1 || demuxer->adaptation_field_control == 3)\n    \tresult = mpeg3_get_payload(demuxer);\n\n\treturn result;\n}\n\nint mpeg3_get_system_header(mpeg3_demuxer_t *demuxer)\n{\n\tint length = mpeg3packet_read_int16(demuxer);\n\tmpeg3packet_skip(demuxer, length);\n\treturn 0;\n}\n\nunsigned long mpeg3_get_timestamp(mpeg3_demuxer_t *demuxer)\n{\n\tunsigned long timestamp;\n/* Only low 4 bits (7==1111) */\n\ttimestamp = (mpeg3packet_read_char(demuxer) >> 1) & 7;  \n\ttimestamp <<= 15;\n\ttimestamp |= (mpeg3packet_read_int16(demuxer) >> 1);\n\ttimestamp <<= 15;\n\ttimestamp |= (mpeg3packet_read_int16(demuxer) >> 1);\n\treturn timestamp;\n}\n\nint mpeg3_get_pack_header(mpeg3_demuxer_t *demuxer, unsigned int *header)\n{\n\tunsigned long i, j;\n\tunsigned long clock_ref, clock_ref_ext;\n\n/* Get the time code */\n\tif((mpeg3packet_next_char(demuxer) >> 4) == 2)\n\t{\n/* MPEG-1 */\n\t\t\tdemuxer->time = (double)mpeg3_get_timestamp(demuxer) / 90000;\n/* Skip 3 bytes */\n\t\t\tmpeg3packet_read_int24(demuxer);\n\t}\n\telse\n\tif(mpeg3packet_next_char(demuxer) & 0x40)\n\t{\n\t\ti = mpeg3packet_read_int32(demuxer);\n\t\tj = mpeg3packet_read_int16(demuxer);\n\t\tif(i & 0x40000000 || (i >> 28) == 2)\n\t\t{\n    \t\tclock_ref = ((i & 0x38000000) << 3); // JMM fix was 0x31 see http://sourceforge.net/tracker/index.php?func=detail&aid=439528&group_id=13554&atid=313554\n    \t\tclock_ref |= ((i & 0x03fff800) << 4);\n    \t\tclock_ref |= ((i & 0x000003ff) << 5);\n    \t\tclock_ref |= ((j & 0xf800) >> 11);\n    \t\tclock_ref_ext = (j >> 1) & 0x1ff;\n\n   \t\t\tdemuxer->time = (double)(clock_ref + clock_ref_ext / 300) / 90000;\n/* Skip 3 bytes */\n\t\t\tmpeg3packet_read_int24(demuxer);\n\t\t\ti = mpeg3packet_read_char(demuxer) & 0x7;\n\n/* stuffing */\n\t\t\tmpeg3packet_skip(demuxer, i);  \n\t\t}\n\t}\n\telse\n\t{\n\t\tmpeg3packet_skip(demuxer, 2);\n\t}\n\n\t*header = mpeg3packet_read_int32(demuxer);\n\tif(*header == MPEG3_SYSTEM_START_CODE)\n\t{\n    \tmpeg3_get_system_header(demuxer);\n    \t*header = mpeg3packet_read_int32(demuxer);\n\t}\n\treturn 0;\n}\n\n/* Program packet reading core */\nint mpeg3_get_ps_pes_packet(mpeg3_demuxer_t *demuxer, unsigned int *header)\n{\n\tunsigned long pts = 0, dts = 0;\n\tint stream_id;\n\tint pes_packet_length;\n\tint pes_packet_start;\n\tint i;\n\tmpeg3_t *file = (mpeg3_t *) demuxer->file;\n\n\tstream_id = *header & 0xff;\n\tpes_packet_length = mpeg3packet_read_int16(demuxer);\n\tpes_packet_start = demuxer->raw_offset;\n\n\tif(stream_id != MPEG3_PRIVATE_STREAM_2 && \n\t\tstream_id != MPEG3_PADDING_STREAM)\n\t{\n\t\tif((mpeg3packet_next_char(demuxer) >> 6) == 0x02)\n\t\t{\n/* Get MPEG-2 packet */\n\t\t\tint pes_header_bytes = 0;\n\t\t\tint scrambling = (mpeg3packet_read_char(demuxer) >> 4) & 0x3;\n    \t\tint pts_dts_flags = (mpeg3packet_read_char(demuxer) >> 6) & 0x3;\n\t\t\tint pes_header_data_length = mpeg3packet_read_char(demuxer);\n\n\t\t\tif(scrambling && (demuxer->do_audio || demuxer->do_video))\n\t\t\t{\n/* Decrypt it */\n\t\t\t\tif(mpeg3_decrypt_packet(demuxer->titles[demuxer->current_title]->fs->css, \n\t\t\t\t\tdemuxer->raw_data))\n\t\t\t\t{\n\t\t\t\t\tfprintf(stderr, \"mpeg3_get_ps_pes_packet: Decryption not available\\n\");\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t}\n\n/* Get Presentation and Decoding Time Stamps */\n\t\t\tif(pts_dts_flags == 2)\n\t\t\t{\n\t\t\t\tpts = (mpeg3packet_read_char(demuxer) >> 1) & 7;  /* Only low 4 bits (7==1111) */\n\t\t\t\tpts <<= 15;\n\t\t\t\tpts |= (mpeg3packet_read_int16(demuxer) >> 1);\n\t\t\t\tpts <<= 15;\n\t\t\t\tpts |= (mpeg3packet_read_int16(demuxer) >> 1);\n\t\t\t\tpes_header_bytes += 5;\n\t\t\t}\n    \t\telse \n\t\t\tif(pts_dts_flags == 3)\n\t\t\t{\n        \t\tpts = (mpeg3packet_read_char(demuxer) >> 1) & 7;  /* Only low 4 bits (7==1111) */\n        \t\tpts <<= 15;\n        \t\tpts |= (mpeg3packet_read_int16(demuxer) >> 1);\n        \t\tpts <<= 15;\n        \t\tpts |= (mpeg3packet_read_int16(demuxer) >> 1);\n        \t\tdts = (mpeg3packet_read_char(demuxer) >> 1) & 7;  /* Only low 4 bits (7==1111) */\n        \t\tdts <<= 15;\n        \t\tdts |= (mpeg3packet_read_int16(demuxer) >> 1);\n        \t\tdts <<= 15;\n        \t\tdts |= (mpeg3packet_read_int16(demuxer) >> 1);\n        \t\tpes_header_bytes += 10;\n    \t\t}\n\n/* Skip unknown */\n        \tmpeg3packet_skip(demuxer, pes_header_data_length - pes_header_bytes);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint pts_dts_flags;\n/* Get MPEG-1 packet */\n\t\t\twhile(mpeg3packet_next_char(demuxer) == 0xff)\n\t\t\t{\n\t\t\t\tmpeg3packet_read_char(demuxer);\n\t\t\t}\n\n/* Skip STD buffer scale */\n\t\t\tif((mpeg3packet_next_char(demuxer) & 0x40) == 0x40)\n\t\t\t{\n\t\t\t\tmpeg3packet_skip(demuxer, 2);\n\t\t\t}\n\n/* Decide which timestamps are available */\n\t\t\tpts_dts_flags = mpeg3packet_next_char(demuxer);\n\n\t\t\tif(pts_dts_flags >= 0x30)\n\t\t\t{\n/* Get the presentation and decoding time stamp */\n\t\t\t\tpts = mpeg3_get_timestamp(demuxer);\n\t\t\t\tdts = mpeg3_get_timestamp(demuxer);\n\t\t\t}\n\t\t\telse\n\t\t\tif(pts_dts_flags >= 0x20)\n\t\t\t{\n/* Get just the presentation time stamp */\n\t\t\t\tpts = mpeg3_get_timestamp(demuxer);\n\t\t\t}\n\t\t\telse\n\t\t\tif(pts_dts_flags == 0x0f)\n\t\t\t{\n/* End of timestamps */\n\t\t\t\tmpeg3packet_read_char(demuxer);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn 1;     /* Error */\n\t\t\t}\n\t\t}\n\n/* Now extract the payload. */\n\t\tif((stream_id >> 4) == 0xc || (stream_id >> 4) == 0xd)\n\t\t{\n/* Audio data */\n/* Take first stream ID if -1 */\n\t\t\tpes_packet_length -= demuxer->raw_offset - pes_packet_start;\n\t\t\tif(!demuxer->do_audio && !demuxer->do_video)\n\t\t\t\tdemuxer->astream_table[stream_id & 0x0f] = AUDIO_MPEG;\n\t\t\telse\n\t\t\tif(demuxer->astream == -1) \n\t\t\t\tdemuxer->astream = stream_id & 0x0f;\n\n\t\t\tif((stream_id & 0x0f) == demuxer->astream && demuxer->do_audio)\n\t\t\t{\n\t\t\t\tif(pts) demuxer->pes_audio_time = pts;\n\n\t\t\t\tmemcpy(&demuxer->data_buffer[demuxer->data_size],\n\t\t\t\t\t&demuxer->raw_data[demuxer->raw_offset],\n\t\t\t\t\tpes_packet_length);\n\t\t\t\tdemuxer->data_size += pes_packet_length;\n\t\t\t\tdemuxer->raw_offset += pes_packet_length;\n\t\t  \t}\n\t\t\telse \n\t\t\t{\n    \t\t\tmpeg3packet_skip(demuxer, pes_packet_length);\n\t\t\t}\n\t\t}\n    \telse \n\t\tif((stream_id >> 4) == 0xe)\n\t\t{\n/* Video data */\n/* Take first stream ID if -1 */\n\t\t\tif(!demuxer->do_audio && !demuxer->do_video) \n\t\t\t\tdemuxer->vstream_table[stream_id & 0x0f] = 1;\n\t\t\telse\n\t\t\tif(demuxer->vstream == -1) \n\t\t\t\tdemuxer->vstream = stream_id & 0x0f;\n\n\t\t\tpes_packet_length -= demuxer->raw_offset - pes_packet_start;\n    \t    if((stream_id & 0x0f) == demuxer->vstream && demuxer->do_video)\n\t\t\t{\n        \t\tif(pts) demuxer->pes_video_time = pts;\n\n\t\t\t\tmemcpy(&demuxer->data_buffer[demuxer->data_size], \n\t\t\t\t\t&demuxer->raw_data[demuxer->raw_offset],\n\t\t\t\t\tpes_packet_length);\n\t\t\t\tdemuxer->data_size += pes_packet_length;\n\t\t\t\tdemuxer->raw_offset += pes_packet_length;\n    \t  \t}\n    \t\telse \n\t\t\t{\n        \t    mpeg3packet_skip(demuxer, pes_packet_length);\n    \t\t}\n    \t}\n    \telse \n\t\tif(stream_id == 0xbd && demuxer->raw_data[demuxer->raw_offset] != 0xff)\n\t\t{\n/* DVD audio data */\n/* Get the audio format */\n\t\t\tint format;\n\t\t\tif((demuxer->raw_data[demuxer->raw_offset] & 0xf0) == 0xa0)\n\t\t\t\tformat = AUDIO_PCM;\n\t\t\telse\n\t\t\t\tformat = AUDIO_AC3;\n\n\t\t\tstream_id = demuxer->raw_data[demuxer->raw_offset] - 0x80;\n\n/* Take first stream ID if not building TOC. */\n\t\t\tif(!demuxer->do_audio && !demuxer->do_video)\n\t\t\t\tdemuxer->astream_table[stream_id] = format;\n\t\t\telse\n\t\t\tif(demuxer->astream == -1)\n\t\t\t\tdemuxer->astream = stream_id;\n\n      \t\tif(stream_id == demuxer->astream && demuxer->do_audio)\n\t\t\t{\n\t\t\t\tdemuxer->aformat = format;\n        \t\tif(pts) demuxer->pes_audio_time = pts;\n\t\t\t\tmpeg3packet_read_int32(demuxer);\n\t\t\t\tpes_packet_length -= demuxer->raw_offset - pes_packet_start;\n\n\t\t\t\tmemcpy(&demuxer->data_buffer[demuxer->data_size],\n\t\t\t\t\t&demuxer->raw_data[demuxer->raw_offset],\n\t\t\t\t\tpes_packet_length);\n\t\t\t\tdemuxer->data_size += pes_packet_length;\n\t\t\t\tdemuxer->raw_offset += pes_packet_length;\n      \t\t}\n      \t\telse\n\t\t\t{\n\t\t\t\tpes_packet_length -= demuxer->raw_offset - pes_packet_start;\n        \t    mpeg3packet_skip(demuxer, pes_packet_length);\n      \t\t}\n    \t}\n    \telse \n\t\tif(stream_id == 0xbc || 1)\n\t\t{\n\t\t\tpes_packet_length -= demuxer->raw_offset - pes_packet_start;\n        \tmpeg3packet_skip(demuxer, pes_packet_length);\n    \t}\n\t}\n  \telse \n\tif(stream_id == MPEG3_PRIVATE_STREAM_2 || stream_id == MPEG3_PADDING_STREAM)\n\t{\n\t\tpes_packet_length -= demuxer->raw_offset - pes_packet_start;\n        mpeg3packet_skip(demuxer, pes_packet_length);\n  \t}\n\n\twhile(demuxer->raw_offset + 4 < demuxer->raw_size)\n\t{\n\t\t*header = mpeg3packet_read_int32(demuxer);\n\t\tif((*header >> 8) != MPEG3_PACKET_START_CODE_PREFIX)\n\t\t\tdemuxer->raw_offset -= 3;\n\t\telse\n\t\t\tbreak;\n\t}\n\n\treturn 0;\n}\n\nint mpeg3_read_program(mpeg3_demuxer_t *demuxer)\n{\n\tint result = 0, count = 0;\n\tmpeg3_t *file = (mpeg3_t *) demuxer->file;\n\tmpeg3_title_t *title = demuxer->titles[demuxer->current_title];\n\tunsigned int header;\n\tdemuxer->raw_size = demuxer->packet_size;\n\tdemuxer->raw_offset = 0;\n\tdemuxer->data_size = 0;\n\t\n/* Search backward for it. */\n\theader = mpeg3io_read_int32(title->fs);\n\tresult = mpeg3io_eof(title->fs);\n\n\tif(!result) result = mpeg3io_seek_relative(title->fs, -4);\n\n\t// Search backwards for header\n\twhile(header != MPEG3_PACK_START_CODE && !result && count < (demuxer->packet_size))\n\t{\n\t\tresult = mpeg3io_seek_relative(title->fs, -1);\n\t\tif(!result)\n\t\t{\n\t\t\theader >>= 8;\n\t\t\theader |= mpeg3io_read_char(title->fs) << 24;\n\t\t\tresult = mpeg3io_seek_relative(title->fs, -1);\n\t\t}\n\t\tcount++;\n\t}\n\n\tif ((header != MPEG3_PACK_START_CODE) || (result) ) {\n// couldn't find MPEG3_PACK_START_CODE\n\t\treturn 1;\n\t}\n\t\n\tresult = mpeg3io_read_data(demuxer->raw_data, demuxer->packet_size, title->fs);\n\tif(result)\n\t{\n\t\tperror(\"mpeg3_read_program\");\n\t\treturn 1;\n\t}\n\t// fprintf(stderr, \"Got data %ld\\n\", title->fs->current_byte);\n\n\theader = mpeg3packet_read_int32(demuxer);\n\n\twhile(demuxer->raw_offset + 4 < demuxer->raw_size && !result)\n\t{\n\t\tif(header == MPEG3_PACK_START_CODE)\n\t\t{\n\t\t\tresult = mpeg3_get_pack_header(demuxer, &header);\n\t\t}\n\t\telse\n\t\tif((header >> 8) == MPEG3_PACKET_START_CODE_PREFIX)\n\t\t{\n\t\t\tresult = mpeg3_get_ps_pes_packet(demuxer, &header);\n\t\t}\n\t}\n\treturn result;\n}\n\ndouble mpeg3_lookup_time_offset(mpeg3_demuxer_t *demuxer, long byte)\n{\n\tint i;\n\tmpeg3_title_t *title = demuxer->titles[demuxer->current_title];\n\n\tif(!title->timecode_table_size) return 0;\n\n\tfor(i = title->timecode_table_size - 1; \n\t\ti >= 0 && title->timecode_table[i].start_byte > byte;\n\t\ti--)\n\t\t;\n\tif(i < 0) i = 0;\n\treturn title->timecode_table[i].absolute_start_time - title->timecode_table[i].start_time;\n}\n\nint mpeg3_advance_timecode(mpeg3_demuxer_t *demuxer, int reverse)\n{\n\tmpeg3_title_t *title = demuxer->titles[demuxer->current_title];\n\tint result = 0;\n\tint do_seek = 0;\n\n/* Skip timecode advancing when constructing timecode table */\n\tif(!title->timecode_table || \n\t\t!title->timecode_table_size || \n\t\tdemuxer->generating_timecode) return 0;\n\n\tif(!reverse)\n\t{\n/* Get inside the current timecode */\n\t\tif(mpeg3io_tell(title->fs) < title->timecode_table[demuxer->current_timecode].start_byte)\n\t\t{\n\t\t\tmpeg3io_seek(title->fs, title->timecode_table[demuxer->current_timecode].start_byte);\n\t\t}\n\t\t\n/* Get the next timecode */\n\t\twhile(!result && \n\t\t\t(mpeg3io_tell(title->fs) >= title->timecode_table[demuxer->current_timecode].end_byte ||\n\t\t\t\tdemuxer->current_program != title->timecode_table[demuxer->current_timecode].program))\n\t\t{\n\n/*\n * printf(\"mpeg3_advance_timecode %d %d %d %d\\n\", mpeg3io_tell(title->fs), title->timecode_table[demuxer->current_timecode].end_byte,\n *  demuxer->current_program, title->timecode_table[demuxer->current_timecode].program);\n */\n\n\t\t\tdemuxer->current_timecode++;\n\t\t\tif(demuxer->current_timecode >= title->timecode_table_size)\n\t\t\t{\n\t\t\t\tdemuxer->current_timecode = 0;\n\t\t\t\tif(demuxer->current_title + 1 < demuxer->total_titles)\n\t\t\t\t{\n\t\t\t\t\tmpeg3demux_open_title(demuxer, demuxer->current_title + 1);\n\t\t\t\t\tdo_seek = 1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tmpeg3io_seek(title->fs, mpeg3io_total_bytes(title->fs));\n\t\t\t \t\tresult = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\ttitle = demuxer->titles[demuxer->current_title];\n\t\t}\n\n\t\tif(!result && do_seek)\n\t\t{\n\t\t\tmpeg3io_seek(title->fs, title->timecode_table[demuxer->current_timecode].start_byte);\n\t\t}\n\t}\n\telse\n\t{\n/* Get the previous timecode */\n\t\twhile(!result && \n\t\t\t(mpeg3io_tell(title->fs) < title->timecode_table[demuxer->current_timecode].start_byte ||\n\t\t\t\tdemuxer->current_program != title->timecode_table[demuxer->current_timecode].program))\n\t\t{\n/*\n * if(demuxer->do_audio) printf(\"mpeg3_reverse_timecode %d %d %d %d\\n\", mpeg3io_tell(title->fs), title->timecode_table[demuxer->current_timecode].end_byte,\n * \tdemuxer->current_program, title->timecode_table[demuxer->current_timecode].program);\n */\n\t\t\tdemuxer->current_timecode--;\n\t\t\tif(demuxer->current_timecode < 0)\n\t\t\t{\n\t\t\t\tif(demuxer->current_title > 0)\n\t\t\t\t{\n\t\t\t\t\tmpeg3demux_open_title(demuxer, demuxer->current_title - 1);\n\t\t\t\t\ttitle = demuxer->titles[demuxer->current_title];\n\t\t\t\t\tdemuxer->current_timecode = title->timecode_table_size - 1;\n\t\t\t\t\tdo_seek = 1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tmpeg3io_seek(title->fs, 0);\n\t\t\t\t\tdemuxer->current_timecode = 0;\n\t\t\t\t\tresult = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif(!result && do_seek) \n\t\t\tmpeg3io_seek(title->fs, title->timecode_table[demuxer->current_timecode].start_byte);\n\t}\n\n\treturn result;\n}\n\n/* Read packet in the forward direction */\nint mpeg3_read_next_packet(mpeg3_demuxer_t *demuxer)\n{\n\tint result = 0;\n\tlong current_position;\n\tmpeg3_t *file = (mpeg3_t *) demuxer->file;\n\tmpeg3_title_t *title = demuxer->titles[demuxer->current_title];\n\tdemuxer->data_size = 0;\n\tdemuxer->data_position = 0;\n\n/* Flip the file descriptor back to the end of the packet for forward */\n/* reading. */\n\tif(demuxer->reverse)\n\t{\n\t\tresult = mpeg3io_seek_relative(title->fs, demuxer->packet_size);\n\t\tdemuxer->reverse = 0;\n\t}\n\n/* Read packets until the output buffer is full */\n\tif(!result)\n\t{\n\t\tlong p1;\t// BGF added this protection against infinite-looping here.\n\t\tdo\n\t\t{\n\t\t\tp1 = title->fs->current_byte;\n\t\t\t\n\t\t\tresult = mpeg3_advance_timecode(demuxer, 0);\n\n\t\t\tif(!result)\n\t\t\t{\n\t\t\t\tdemuxer->time_offset = mpeg3_lookup_time_offset(demuxer, mpeg3io_tell(title->fs));\n\n\t\t\t\tif(file->is_transport_stream)\n\t\t\t\t{\n\t\t\t\t\tresult = mpeg3_read_transport(demuxer);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\tif(file->is_program_stream)\n\t\t\t\t{\n\t\t\t\t\tresult = mpeg3_read_program(demuxer);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n/* Read elementary stream. */\n\t\t\t\t\tresult = mpeg3io_read_data(demuxer->data_buffer, demuxer->packet_size, title->fs);\n\t\t\t\t\tif(!result) demuxer->data_size = demuxer->packet_size;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// We can spin out on attempts to read the last packet over and over.\n\t\t\t\tif (p1 >= title->fs->current_byte) {\n\t\t\t\t\tresult = -1;\n\t\t\t\t\ttitle->fs->current_byte = title->fs->total_bytes;\t// So EOF checks start to fire.\n\t\t\t\t\tfprintf(stderr, \"Stopping demux-stream to prevent spin.\");\n\t\t\t\t}\n\t\t\t}\n\t\t} while (!result && demuxer->data_size == 0 && (demuxer->do_audio || demuxer->do_video));\n\t}\n\n\treturn result;\n}\n\n/* Read the packet right before the packet we're currently on. */\nint mpeg3_read_prev_packet(mpeg3_demuxer_t *demuxer)\n{\n\tint result = 0;\n\tmpeg3_t *file = (mpeg3_t *) demuxer->file;\n\tlong current_position;\n\tmpeg3_title_t *title = demuxer->titles[demuxer->current_title];\n\n\tdemuxer->data_size = 0;\n\tdemuxer->data_position = 0;\n\n\tdo\n\t{\n/* Rewind to the start of the packet to be read. */\n\t\tresult = mpeg3io_seek_relative(title->fs, -demuxer->packet_size);\n\n\t\tif(!result) result = mpeg3_advance_timecode(demuxer, 1);\n\t\tif(!result) demuxer->time_offset = mpeg3_lookup_time_offset(demuxer, mpeg3io_tell(title->fs));\n\n\t\tif(file->is_transport_stream && !result)\n\t\t{\n\t\t\tresult = mpeg3_read_transport(demuxer);\n\t\t\tif(!mpeg3io_bof(title->fs))\n\t\t\t/* if(!result)  */result = mpeg3io_seek_relative(title->fs, -demuxer->packet_size);\n\t\t}\n\t\telse\n\t\tif(file->is_program_stream && !result)\n\t\t{\n\n\t\t\tresult = mpeg3_read_program(demuxer);\n\t\t\tif(!mpeg3io_bof(title->fs))\n\t\t\t/* if(!result)  */result = mpeg3io_seek_relative(title->fs, -demuxer->packet_size);\n\t\t}\n\t\telse\n\t\tif(!result)\n\t\t{\n/* Elementary stream */\n/* Read the packet forwards and seek back to the start */\n\t\t\tresult = mpeg3io_read_data(demuxer->data_buffer, demuxer->packet_size, title->fs);\n\t\t\tif(!result) \n\t\t\t{\n\t\t\t\tdemuxer->data_size = demuxer->packet_size;\n\t\t\t\tresult = mpeg3io_seek_relative(title->fs, -demuxer->packet_size);\n\t\t\t}\n\t\t}\n\t}while(!result && demuxer->data_size == 0 && (demuxer->do_audio || demuxer->do_video));\n\n/* Remember that the file descriptor is at the beginning of the packet just read. */\n\tdemuxer->reverse = 1;\n\tdemuxer->error_flag = result;\n\treturn result;\n}\n\n\n/* Used for audio */\nint mpeg3demux_read_data(mpeg3_demuxer_t *demuxer, \n\t\tunsigned char *output, \n\t\tlong size)\n{\n\tlong i;\n\tint result = 0;\n\tmpeg3_t *file = (mpeg3_t *) demuxer->file;\n\tdemuxer->error_flag = 0;\n\t\n\tif(demuxer->data_position >= 0)\n\t{\n/* Read forwards */\n\t\tfor(i = 0; i < size && !result; )\n\t\t{\n\t\t\tint fragment_size = size - i;\n\t\t\tif(fragment_size > demuxer->data_size - demuxer->data_position)\n\t\t\t\tfragment_size = demuxer->data_size - demuxer->data_position;\n\t\t\tmemcpy(output + i, demuxer->data_buffer + demuxer->data_position, fragment_size);\n\t\t\tdemuxer->data_position += fragment_size;\n\t\t\ti += fragment_size;\n\n\t\t\tif(i < size)\n\t\t\t{\n\t\t\t\tresult = mpeg3_read_next_packet(demuxer);\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n/* Read backwards a full packet. */\n/* Only good for reading less than the size of a full packet, but */\n/* this routine should only be used for searching for previous markers. */\n\t\tlong current_position = demuxer->data_position;\n\t\tresult = mpeg3_read_prev_packet(demuxer);\n\t\tif(!result) demuxer->data_position = demuxer->data_size + current_position;\n\t\tmemcpy(output, demuxer->data_buffer + demuxer->data_position, size);\n\t\tdemuxer->data_position += size;\n\t}\n\n\tdemuxer->error_flag = result;\n\treturn result;\n}\n\nunsigned int mpeg3demux_read_char_packet(mpeg3_demuxer_t *demuxer)\n{\n\tdemuxer->error_flag = 0;\n\tif(demuxer->data_position >= demuxer->data_size)\n\t\tdemuxer->error_flag = mpeg3_read_next_packet(demuxer);\n\tdemuxer->next_char = demuxer->data_buffer[demuxer->data_position++];\n\treturn demuxer->next_char;\n}\n\nunsigned int mpeg3demux_read_prev_char_packet(mpeg3_demuxer_t *demuxer)\n{\n\tdemuxer->error_flag = 0;\n\tdemuxer->data_position--;\n\tif(demuxer->data_position < 0)\n\t{\n\t\tdemuxer->error_flag = mpeg3_read_prev_packet(demuxer);\n\t\tif(!demuxer->error_flag) demuxer->data_position = demuxer->data_size - 1;\n\t}\n\tdemuxer->next_char = demuxer->data_buffer[demuxer->data_position];\n\treturn demuxer->next_char;\n}\n\nmpeg3demux_timecode_t* mpeg3_append_timecode(mpeg3_demuxer_t *demuxer, \n\t\tmpeg3_title_t *title, \n\t\tlong prev_byte, \n\t\tdouble prev_time, \n\t\tlong next_byte, \n\t\tdouble next_time,\n\t\tint dont_store)\n{\n\tmpeg3demux_timecode_t *new_table;\n\tmpeg3demux_timecode_t *new_timecode = NULL, *old_timecode = NULL;\n\tlong i;\n\n\tif(!title->timecode_table || \n\t\ttitle->timecode_table_allocation <= title->timecode_table_size)\n\t{\n\t\tif(title->timecode_table_allocation == 0) \n\t\t\ttitle->timecode_table_allocation = 1;\n\t\telse\n\t\t\ttitle->timecode_table_allocation *= 2;\n\n\t\tnew_table = (mpeg3demux_timecode_t *) memoryAllocate(1, sizeof(mpeg3demux_timecode_t) * title->timecode_table_allocation);\n\t\tif(title->timecode_table)\n\t\t{\n\t\t\tfor(i = 0; i < title->timecode_table_size; i++)\n\t\t\t{\n\t\t\t\tnew_table[i] = title->timecode_table[i];\n\t\t\t}\n\n\t\t\tmemoryFree(title->timecode_table);\n\t\t}\n\t\ttitle->timecode_table = new_table;\n\t}\n\n\tif(!dont_store)\n\t{\n\t\tnew_timecode = &title->timecode_table[title->timecode_table_size];\n\t\tnew_timecode->start_byte = next_byte;\n\t\tnew_timecode->start_time = next_time;\n\t\tnew_timecode->absolute_start_time = 0;\n\n\t\tif(title->timecode_table_size > 0)\n\t\t{\n\t\t\told_timecode = &title->timecode_table[title->timecode_table_size - 1];\n\t\t\told_timecode->end_byte = prev_byte;\n\t\t\told_timecode->end_time = prev_time;\n\t\t\tnew_timecode->absolute_start_time = \n\t\t\t\tprev_time - \n\t\t\t\told_timecode->start_time + \n\t\t\t\told_timecode->absolute_start_time;\n\t\t\tnew_timecode->absolute_end_time = next_time;\n\t\t}\n\t}\n\n\ttitle->timecode_table_size++;\n\treturn new_timecode;\n}\n\nmpeg3demux_timecode_t* mpeg3demux_next_timecode(mpeg3_demuxer_t *demuxer, \n\t\tint *current_title, \n\t\tint *current_timecode,\n\t\tint current_program)\n{\n\tint done = 0;\n\twhile(!done)\n\t{\n/* Increase timecode number */\n\t\tif(*current_timecode < demuxer->titles[*current_title]->timecode_table_size - 1) \n\t\t{\n\t\t\t(*current_timecode)++;\n\t\t\tif(demuxer->titles[*current_title]->timecode_table[*current_timecode].program == current_program)\n\t\t\t\treturn &(demuxer->titles[*current_title]->timecode_table[*current_timecode]);\n\t\t}\n\t\telse\n/* Increase title number */\n\t\tif(*current_title < demuxer->total_titles - 1)\n\t\t{\n\t\t\t(*current_title)++;\n\t\t\t(*current_timecode) = 0;\n\t\t\tif(demuxer->titles[*current_title]->timecode_table[*current_timecode].program == current_program)\n\t\t\t\treturn &(demuxer->titles[*current_title]->timecode_table[*current_timecode]);\n\t\t}\n\t\telse\n/* End of disk */\n\t\t\tdone = 1;\n\t}\n\treturn 0;\n}\n\nmpeg3demux_timecode_t* mpeg3demux_prev_timecode(mpeg3_demuxer_t *demuxer, \n\t\tint *current_title, \n\t\tint *current_timecode,\n\t\tint current_program)\n{\n\tint done = 0;\n\twhile(!done)\n\t{\n/* Increase timecode number */\n\t\tif(*current_timecode > 0)\n\t\t{\n\t\t\t(*current_timecode)--;\n\t\t\tif(demuxer->titles[*current_title]->timecode_table[*current_timecode].program == current_program)\n\t\t\t\treturn &(demuxer->titles[*current_title]->timecode_table[*current_timecode]);\n\t\t}\n\t\telse\n/* Increase title number */\n\t\tif(*current_title > 0)\n\t\t{\n\t\t\t(*current_title)--;\n\t\t\t(*current_timecode) = demuxer->titles[*current_title]->timecode_table_size - 1;\n\t\t\tif(demuxer->titles[*current_title]->timecode_table[*current_timecode].program == current_program)\n\t\t\t\treturn &(demuxer->titles[*current_title]->timecode_table[*current_timecode]);\n\t\t}\n\t\telse\n/* End of disk */\n\t\t\tdone = 1;\n\t\t\n\t}\n\treturn 0;\n}\n\nint mpeg3demux_open_title(mpeg3_demuxer_t *demuxer, int title_number)\n{\n\tmpeg3_title_t *title;\n\n\tif(title_number < demuxer->total_titles)\n\t{\n\t\tif(demuxer->current_title >= 0)\n\t\t{\n\t\t\tmpeg3io_close_file(demuxer->titles[demuxer->current_title]->fs);\n\t\t\tdemuxer->current_title = -1;\n\t\t}\n\n\t\ttitle = demuxer->titles[title_number];\n\t\tif(mpeg3io_open_file(title->fs))\n\t\t{\n\t\t\tdemuxer->error_flag = 1;\n\t\t\tperror(\"mpeg3demux_open_title\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdemuxer->current_title = title_number;\n\t\t}\n\t}\n\n\tdemuxer->current_timecode = 0;\n\n\treturn demuxer->error_flag;\n}\n\n/* Assign program numbers to interleaved programs */\nint mpeg3demux_assign_programs(mpeg3_demuxer_t *demuxer)\n{\n\tint current_program = 0;\n\tint current_title = 0, previous_title;\n\tint current_timecode = 0, previous_timecode;\n\tdouble current_time, current_length;\n\tint done = 0;\n\tint interleaved = 0;\n\tmpeg3demux_timecode_t *timecode1, *timecode2;\n\tdouble program_times[MPEG3_MAX_STREAMS];\n\tint total_programs = 1;\n\tint i, j;\n\tint program_exists, last_program_assigned = 0;\n\tint total_timecodes;\n\tmpeg3_title_t **titles = demuxer->titles;\n\n\tfor(i = 0, total_timecodes = 0; i < demuxer->total_titles; i++)\n\t\ttotal_timecodes += demuxer->titles[i]->timecode_table_size;\n\n//\tif(total_timecodes < 3) return 0;\n\n/*\n * // Assign programs based on length of contiguous timecode \n * \ttimecode1 = demuxer->titles[current_title]->timecode_table;\n * \twhile(!done)\n * \t{\n * \t\tif(!timecode1) done = 1;\n * \t\telse\n * \t\tif(timecode1->end_time - timecode1->start_time < MPEG3_PROGRAM_THRESHOLD)\n * \t\t{\n * // Got interleaved section \n * \t\t\tinterleaved = 1;\n * \t\t\tprogram_times[0] = timecode1->end_time;\n * \n * \t\t\twhile(interleaved && !done)\n * \t\t\t{\n * \t\t\t\ttimecode2 = mpeg3demux_next_timecode(demuxer, \n * \t\t\t\t\t&current_title, \n * \t\t\t\t\t&current_timecode,\n * \t\t\t\t\t0);\n * \n * \t\t\t\tif(!timecode2) done = 1;\n * \t\t\t\telse\n * \t\t\t\t{\n * // Another segment of interleaved data \n * \t\t\t\t\tif(timecode2->end_time - timecode2->start_time < MPEG3_PROGRAM_THRESHOLD)\n * \t\t\t\t\t{\n * // Search program times for where the previous instance of the program left off \n * \t\t\t\t\t\tfor(program_exists = 0, i = 0; \n * \t\t\t\t\t\t\ti < total_programs && !program_exists; \n * \t\t\t\t\t\t\ti++)\n * \t\t\t\t\t\t{\n * // Got a previous instance of the program \n * \t\t\t\t\t\t\tif(program_times[i] + 0.5 > timecode2->start_time &&\n * \t\t\t\t\t\t\t\tprogram_times[i] - 0.5 < timecode2->start_time)\n * \t\t\t\t\t\t\t{\n * \t\t\t\t\t\t\t\tprogram_times[i] = timecode2->end_time;\n * \t\t\t\t\t\t\t\ttimecode2->program = i;\n * \t\t\t\t\t\t\t\tprogram_exists = 1;\n * \n * // Programs must always start at 0 for an interleaved section \n * \t\t\t\t\t\t\t\tif(i < last_program_assigned && i != 0)\n * \t\t\t\t\t\t\t\t{\n * // Shift programs in the interleaved section down until they start at 0 \n * \t\t\t\t\t\t\t\t\tfor(j = 0; j < total_programs - 1; j++)\n * \t\t\t\t\t\t\t\t\t\tprogram_times[j] = program_times[j + 1];\n * \t\t\t\t\t\t\t\t\t\n * \t\t\t\t\t\t\t\t\tfor(previous_title = current_title, previous_timecode = current_timecode;\n * \t\t\t\t\t\t\t\t\t\ttitles[previous_title]->timecode_table[previous_timecode].program > 0 && \n * \t\t\t\t\t\t\t\t\t\t(previous_title >= 0 || previous_timecode >= 0); )\n * \t\t\t\t\t\t\t\t\t{\n * \t\t\t\t\t\t\t\t\t\ttitles[previous_title]->timecode_table[previous_timecode].program--;\n * \t\t\t\t\t\t\t\t\t\tprevious_timecode--;\n * \t\t\t\t\t\t\t\t\t\tif(previous_timecode < 0 && previous_title > 0)\n * \t\t\t\t\t\t\t\t\t\t{\n * \t\t\t\t\t\t\t\t\t\t\tprevious_title--;\n * \t\t\t\t\t\t\t\t\t\t\tprevious_timecode = titles[previous_title]->timecode_table_size - 1;\n * \t\t\t\t\t\t\t\t\t\t}\n * \t\t\t\t\t\t\t\t\t}\n * \t\t\t\t\t\t\t\t}\n * \t\t\t\t\t\t\t}\n * \t\t\t\t\t\t}\n * \n * // Didn't get one \n * \t\t\t\t\t\tif(!program_exists)\n * \t\t\t\t\t\t{\n * \t\t\t\t\t\t\tprogram_times[total_programs] = timecode2->end_time;\n * \t\t\t\t\t\t\ttimecode2->program = total_programs++;\n * \t\t\t\t\t\t}\n * \t\t\t\t\t\tlast_program_assigned = timecode2->program;\n * \t\t\t\t\t}\n * // No more interleaved section \n * \t\t\t\t\telse\n * \t\t\t\t\t{\n * \t\t\t\t\t\tinterleaved = 0;\n * // Restart program table from the beginning \n * \t\t\t\t\t\ttotal_programs = 1;\n * \t\t\t\t\t\tlast_program_assigned = 0;\n * \t\t\t\t\t\ttimecode1 = mpeg3demux_next_timecode(demuxer, \n * \t\t\t\t\t\t\t&current_title, \n * \t\t\t\t\t\t\t&current_timecode,\n * \t\t\t\t\t\t\t0);\n * \t\t\t\t\t}\n * \t\t\t\t}\n * \t\t\t}\n * \t\t}\n * \t\telse\n * // Get next timecode \n * \t\t\ttimecode1 = mpeg3demux_next_timecode(demuxer, \n * \t\t\t\t&current_title, \n * \t\t\t\t&current_timecode,\n * \t\t\t\t0);\n * \t}\n * \t\n * \tdemuxer->total_programs = total_programs;\n */\n\n/* Assign absolute timecodes in each program. */\n\tfor(current_program = 0; \n\t\tcurrent_program < total_programs; \n\t\tcurrent_program++)\n\t{\n\t\tcurrent_time = 0;\n\t\tcurrent_title = 0;\n\t\tcurrent_timecode = -1;\n\t\twhile(timecode1 = mpeg3demux_next_timecode(demuxer, \n\t\t    &current_title, \n\t\t\t&current_timecode, \n\t\t\tcurrent_program))\n\t\t{\n\t\t\ttimecode1->absolute_start_time = current_time;\n\t\t\tcurrent_time += timecode1->end_time - timecode1->start_time;\n\t\t\ttimecode1->absolute_end_time = current_time;\n\t\t}\n\t}\n//for(i = 0; i < demuxer->total_titles; i++) mpeg3_dump_title(demuxer->titles[i]);\n\tdemuxer->current_program = 0;\n\treturn 0;\n}\n\n/* ==================================================================== */\n/*                            Entry points */\n/* ==================================================================== */\n\nmpeg3_demuxer_t* mpeg3_new_demuxer(mpeg3_t *file, int do_audio, int do_video, int stream_id)\n{\n\tmpeg3_demuxer_t *demuxer = (mpeg3_demuxer_t *) memoryAllocate(1, sizeof(mpeg3_demuxer_t));\n\tint i;\n\n/* The demuxer will change the default packet size for its own use. */\n\tdemuxer->file = file;\n\tdemuxer->packet_size = file->packet_size;\n\tdemuxer->do_audio = do_audio;\n\tdemuxer->do_video = do_video;\n\n/* Allocate buffer + padding */\n\tdemuxer->raw_data = (unsigned char*)memoryAllocate(1, MPEG3_MAX_PACKSIZE);\n\tdemuxer->data_buffer = (unsigned char*)memoryAllocate(1, MPEG3_MAX_PACKSIZE);\n\tdemuxer->data_allocated = MPEG3_MAX_PACKSIZE;\n/* System specific variables */\n\tdemuxer->audio_pid = stream_id;\n\tdemuxer->video_pid = stream_id;\n\tdemuxer->astream = stream_id;\n\tdemuxer->vstream = stream_id;\n\tdemuxer->current_title = -1;\n\treturn demuxer;\n}\n\nint mpeg3_delete_demuxer(mpeg3_demuxer_t *demuxer)\n{\n\tint i;\n\n\tif(demuxer->current_title >= 0)\n\t{\n\t\tmpeg3io_close_file(demuxer->titles[demuxer->current_title]->fs);\n\t}\n\n\tfor(i = 0; i < demuxer->total_titles; i++)\n\t{\n\t\tmpeg3_delete_title(demuxer->titles[i]);\n\t}\n\n\tif(demuxer->data_buffer) memoryFree(demuxer->data_buffer);\n\tmemoryFree(demuxer->raw_data);\n\tmemoryFree(demuxer);\n}\n\n/* Create a title. */\n/* Build a table of timecodes contained in the program stream. */\n/* If toc is 0 just read the first and last timecode. */\nint mpeg3demux_create_title(mpeg3_demuxer_t *demuxer, int timecode_search, FILE *toc)\n{\n\tint result = 0, done = 0, counter_start, counter;\n\tmpeg3_t *file = (mpeg3_t *) demuxer->file;\n\tlong next_byte=0, prev_byte=0;\n\tdouble next_time, prev_time, absolute_time;\n\tlong i;\n\tmpeg3_title_t *title;\n\tunsigned long test_header = 0;\n\tmpeg3demux_timecode_t *timecode = 0;\n\n\tdemuxer->error_flag = 0;\n\tdemuxer->generating_timecode = 1;\n\n/* Create a single title */\n\tif(!demuxer->total_titles)\n\t{\n\t\tdemuxer->titles[0] = mpeg3_new_title(file, file->fs->path);\n\t\tdemuxer->total_titles = 1;\n\t\tmpeg3demux_open_title(demuxer, 0);\n\t}\n\ttitle = demuxer->titles[0];\n\ttitle->total_bytes = mpeg3io_total_bytes(title->fs);\n\n\n/* Get the packet size from the file */\n\tif(file->is_program_stream)\n\t{\n\t\tmpeg3io_seek(title->fs, 4);\n\t\tfor(i = 0; i < MPEG3_MAX_PACKSIZE && \n\t\t\ttest_header != MPEG3_PACK_START_CODE; i++)\n\t\t{\n\t\t\ttest_header <<= 8;\n\t\t\ttest_header |= mpeg3io_read_char(title->fs);\n\t\t}\n\t\tif(i < MPEG3_MAX_PACKSIZE) demuxer->packet_size = i;\n\t\tmpeg3io_seek(title->fs, 0);\n\t}\n\telse\n\t\tdemuxer->packet_size = file->packet_size;\n\n/* Get timecodes for the title */\n\tif(file->is_transport_stream || file->is_program_stream)\n\t{\n\t\tmpeg3io_seek(title->fs, 0);\n\t\twhile(!done && !result && !mpeg3io_eof(title->fs))\n\t\t{\n\t\t\tnext_byte = mpeg3io_tell(title->fs);\n\t\t\tresult = mpeg3_read_next_packet(demuxer);\n\n\t\t\tif(!result)\n\t\t\t{\n\t\t\t\tnext_time = demuxer->time;\n//printf(\"%f %f\\n\", next_time, prev_time);\n\t\t\t\tif(next_time < prev_time || \n\t\t\t\t\tnext_time - prev_time > MPEG3_CONTIGUOUS_THRESHOLD ||\n\t\t\t\t\t!title->timecode_table_size)\n\t\t\t\t{\n/* Discontinuous */\n\t\t\t\t\ttimecode = mpeg3_append_timecode(demuxer, \n\t\t\t\t\t\ttitle, \n\t\t\t\t\t\tprev_byte, \n\t\t\t\t\t\tprev_time, \n\t\t\t\t\t\tnext_byte, \n\t\t\t\t\t\tnext_time,\n\t\t\t\t\t\t0);\n/*\n * printf(\"timecode: %ld %ld %f %f\\n\",\n * \t\t\t\ttimecode->start_byte,\n * \t\t\t\ttimecode->end_byte,\n * \t\t\t\ttimecode->start_time,\n * \t\t\t\ttimecode->end_time);\n */\n\n\t\t\t\t\tcounter_start = next_time;\n\t\t\t\t}\n\t\t\t\tprev_time = next_time;\n\t\t\t\tprev_byte = next_byte;\n\t\t\t\tcounter = next_time;\n\t\t\t}\n\n/* Just get the first bytes if not building a toc to get the stream ID's. */\n\t\t\tif(next_byte > 0x100000 && \n\t\t\t\t(!timecode_search || !toc)) done = 1;\n\t\t}\n\n/* Get the last timecode */\n\t\tif(!toc || !timecode_search)\n\t\t{\n\t\t\tresult = mpeg3io_seek(title->fs, title->total_bytes);\n\t\t\tif(!result) result = mpeg3_read_prev_packet(demuxer);\n\t\t}\n\n\t\tif(title->timecode_table && timecode)\n\t\t{\n\t\t\ttimecode->end_byte = title->total_bytes;\n//\t\t\ttimecode->end_byte = mpeg3io_tell(title->fs)/*  + demuxer->packet_size */;\n\t\t\ttimecode->end_time = demuxer->time;\n\t\t\ttimecode->absolute_end_time = timecode->end_time - timecode->start_time;\n\t\t}\n\t}\n\n\tmpeg3io_seek(title->fs, 0);\n\tdemuxer->generating_timecode = 0;\n\treturn 0;\n}\n\nint mpeg3demux_print_timecodes(mpeg3_title_t *title, FILE *output)\n{\n\tmpeg3demux_timecode_t *timecode;\n\tint i;\n\n\tif(title->timecode_table)\n\t{\n\t\tfor(i = 0; i < title->timecode_table_size; i++)\n\t\t{\n\t\t\ttimecode = &title->timecode_table[i];\n\n\t\t\tfprintf(output, \"REGION: %ld %ld %f %f\\n\",\n\t\t\t\ttimecode->start_byte,\n\t\t\t\ttimecode->end_byte,\n\t\t\t\ttimecode->start_time,\n\t\t\t\ttimecode->end_time);\n\t\t}\n\t}\n\treturn 0;\n}\n\n/* Read the title information from a toc */\nint mpeg3demux_read_titles(mpeg3_demuxer_t *demuxer)\n{\n\tchar string1[MPEG3_STRLEN], string2[MPEG3_STRLEN];\n\tlong start_byte, end_byte;\n\tfloat start_time, end_time;\n\tmpeg3_title_t *title = 0;\n\tmpeg3_t *file = (mpeg3_t *) demuxer->file;\n\n// Eventually use IFO file to generate titles\n\twhile(!mpeg3io_end_of_file(file->fs))   //JMM use accessors \n\t{\n\t\tmpeg3io_scanf5(file->fs, \"%s %s %ld %f %f %f\", \n\t\t\tstring1,\n\t\t\tstring2,\n\t\t\t&end_byte, \n\t\t\t&start_time, \n\t\t\t&end_time); //JMM use accessors\n\n\t\tif(!strncasecmp(string1, \"PATH:\", 5))\n\t\t{\n\t\t\ttitle = demuxer->titles[demuxer->total_titles++] = mpeg3_new_title(file, string2);\n\n\t\t\tif(demuxer->current_title < 0)\n\t\t\t\t\tmpeg3demux_open_title(demuxer, 0);\n\t\t}\n\t\telse\n\t\tif(title)\n\t\t{\n\t\t\tstart_byte = atol(string2);\n\t\t\tif(!strcasecmp(string1, \"REGION:\"))\n\t\t\t{\n\t\t\t\tmpeg3_append_timecode(demuxer, \n\t\t\t\t\ttitle, \n\t\t\t\t\t0, \n\t\t\t\t\t0, \n\t\t\t\t\t0, \n\t\t\t\t\t0,\n\t\t\t\t\t1);\n\t\t\t\ttitle->timecode_table[title->timecode_table_size - 1].start_byte = start_byte;\n\t\t\t\ttitle->timecode_table[title->timecode_table_size - 1].end_byte = end_byte;\n\t\t\t\ttitle->timecode_table[title->timecode_table_size - 1].start_time = start_time;\n\t\t\t\ttitle->timecode_table[title->timecode_table_size - 1].end_time = end_time;\n\t\t\t}\n\t\t\telse\n\t\t\tif(!strcasecmp(string1, \"ASTREAM:\"))\n\t\t\t\tdemuxer->astream_table[start_byte] = end_byte;\n\t\t\telse\n\t\t\tif(!strcasecmp(string1, \"VSTREAM:\"))\n\t\t\t\tdemuxer->vstream_table[start_byte] = end_byte;\n\t\t\telse\n\t\t\tif(!strcasecmp(string1, \"SIZE:\"))\n\t\t\t\ttitle->total_bytes = start_byte;\n\t\t\telse\n\t\t\tif(!strcasecmp(string1, \"PACKETSIZE:\"))\n\t\t\t\tdemuxer->packet_size = start_byte;\n\t\t}\n\t}\n\n\tmpeg3demux_assign_programs(demuxer);\n\treturn 0;\n}\n\nint mpeg3demux_copy_titles(mpeg3_demuxer_t *dst, mpeg3_demuxer_t *src)\n{\n\tlong i;\n\tmpeg3_t *file = (mpeg3_t *)dst->file;\n\tmpeg3_title_t *dst_title, *src_title;\n\n\tdst->packet_size = src->packet_size;\n\tdst->total_titles = src->total_titles;\n\tdst->total_programs = src->total_programs;\n\tfor(i = 0; i < MPEG3_MAX_STREAMS; i++)\n\t{\n\t\tdst->astream_table[i] = src->astream_table[i];\n\t\tdst->vstream_table[i] = src->vstream_table[i];\n\t}\n\tfor(i = 0; i < src->total_titles; i++)\n\t{\n\t\tsrc_title = src->titles[i];\n\t\tdst_title = dst->titles[i] = mpeg3_new_title(file, src->titles[i]->fs->path);\n\t\tmpeg3_copy_title(dst_title, src_title);\n\t}\n\n\tmpeg3demux_open_title(dst, src->current_title);\n\treturn 0;\n}\n\nint mpeg3demux_print_streams(mpeg3_demuxer_t *demuxer, FILE *toc)\n{\n\tint i;\n/* Print the stream information */\n\tfor(i = 0; i < MPEG3_MAX_STREAMS; i++)\n\t{\n\t\tif(demuxer->astream_table[i])\n\t\t\tfprintf(toc, \"ASTREAM: %d %d\\n\", i, demuxer->astream_table[i]);\n\n\t\tif(demuxer->vstream_table[i])\n\t\t\tfprintf(toc, \"VSTREAM: %d %d\\n\", i, demuxer->vstream_table[i]);\n\t}\n\treturn 0;\n}\n\n/* Need a timecode table to do this */\ndouble mpeg3demux_length(mpeg3_demuxer_t *demuxer)\n{\n\tmpeg3_title_t *title;\n\tint i, j;\n\tdouble length;\n\t\n\tfor(i = demuxer->total_titles - 1; i >= 0; i--)\n\t{\n\t\ttitle = demuxer->titles[i];\n\t\tfor(j = title->timecode_table_size - 1; j >= 0; j--)\n\t\t{\n\t\t\tif(title->timecode_table[j].program == demuxer->current_program)\n\t\t\t{\n\t\t\t\treturn title->timecode_table[j].end_time - \n\t\t\t\t\ttitle->timecode_table[j].start_time + \n\t\t\t\t\ttitle->timecode_table[j].absolute_start_time;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn 1;\n}\n\nint mpeg3demux_eof(mpeg3_demuxer_t *demuxer)\n{\n\tif(demuxer->current_title >= 0)\n\t{\n\t\tif(mpeg3io_eof(demuxer->titles[demuxer->current_title]->fs) &&\n\t\t\tdemuxer->current_title >= demuxer->total_titles - 1)\n\t\t\treturn 1;\n\t}\n\n\treturn 0;\n}\n\nint mpeg3demux_bof(mpeg3_demuxer_t *demuxer)\n{\n\tif(demuxer->current_title >= 0)\n\t{\n\t\tif(mpeg3io_bof(demuxer->titles[demuxer->current_title]->fs) &&\n\t\t\tdemuxer->current_title <= 0)\n\t\t\treturn 1;\n\t}\n\treturn 0;\n}\n\n\n/* For elemental streams seek to a byte */\nint mpeg3demux_seek_byte(mpeg3_demuxer_t *demuxer, long byte)\n{\n\tlong current_position;\n\tmpeg3_t *file = (mpeg3_t *) demuxer->file;\n\tmpeg3_title_t *title = demuxer->titles[demuxer->current_title];\n\t\n\tdemuxer->data_position = 0;\n\tdemuxer->data_size = 0;\n\n\tdemuxer->error_flag = mpeg3io_seek(title->fs, byte);\n\n\tif(!demuxer->error_flag && (file->is_transport_stream || file->is_program_stream))\n\t{\n/* Get on a packet boundary only for system streams. */\n\t\tcurrent_position = mpeg3io_tell(title->fs);\n\t\tif(byte % demuxer->packet_size)\n\t\t{\n\t\t\tdemuxer->error_flag |= mpeg3io_seek(title->fs, current_position - (current_position % demuxer->packet_size));\n\t\t}\n\t}\n\treturn demuxer->error_flag;\n}\n\n/* For programs streams and toc seek to a time */\nint mpeg3demux_seek_time(mpeg3_demuxer_t *demuxer, double new_time)\n{\n\tint i, j, done = 0, result = 0;\n\tdouble byte_offset, new_byte_offset;\n\tdouble guess = 0, minimum = 65535;\n\tmpeg3_title_t *title;\n\tmpeg3demux_timecode_t *timecode;\n\n\tdemuxer->error_flag = 0;\n\n\ti = 0;\n\tj = 0;\n\ttitle = demuxer->titles[i];\n\ttimecode = &title->timecode_table[j];\n\n/* Get the title and timecode of the new position */\n\twhile(!demuxer->error_flag &&\n\t\t!(timecode->absolute_start_time <= new_time &&\n\t\ttimecode->absolute_end_time > new_time &&\n\t\ttimecode->program == demuxer->current_program))\n\t{\n/* Next timecode */\n\t\tj++;\n\t\tif(j >= title->timecode_table_size)\n\t\t{\n\t\t\ti++;\n\t\t\tj = 0;\n\t\t\tif(i >= demuxer->total_titles)\n\t\t\t{\n\t\t\t\tdemuxer->error_flag = 1;\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmpeg3demux_open_title(demuxer, i);\n\t\t\t}\n\t\t}\n\n\t\ttitle = demuxer->titles[i];\n\t\ttimecode = &title->timecode_table[j];\n\t}\n\n/* Guess the new byte position */\n\tdemuxer->current_timecode = j;\n\n\tbyte_offset = ((new_time - timecode->absolute_start_time) /\n\t\t(timecode->absolute_end_time - timecode->absolute_start_time) *\n\t\t(timecode->end_byte - timecode->start_byte) +\n\t\ttimecode->start_byte);\n//printf(\"mpeg3demux_seek_time %f %f\\n\", new_time, byte_offset);\n\n\twhile(!done && !result && byte_offset >= 0)\n\t{\n\t\tresult = mpeg3demux_seek_byte(demuxer, (long)byte_offset);\n//printf(\"seek_time 0 byte %.0f want %f result %d\\n\", byte_offset, new_time, result); \n\n\t\tif(!result)\n\t\t{\n\t\t\tresult = mpeg3_read_next_packet(demuxer);\n// printf(\"seek_time 1 guess %f want %f\\n\", guess, new_time); \n\t\t\tguess = demuxer->time + demuxer->time_offset;\n\n\t\t\tif(fabs(new_time - guess) >= fabs(minimum)) done = 1;\n\t\t\telse\n\t\t\t{\n\t\t\t\tminimum = guess - new_time;\n\t\t\t\tnew_byte_offset = byte_offset + ((new_time - guess) / \n\t\t\t\t\t(timecode->end_time - timecode->start_time) *\n\t\t\t\t\t(timecode->end_byte - timecode->start_byte));\n\t\t\t\tif(labs((long)new_byte_offset - (long)byte_offset) < demuxer->packet_size) done = 1;\n\t\t\t\tbyte_offset = new_byte_offset;\n\t\t\t}\n\t\t}\n\t}\n\n/* Get one packet before the packet just read */\n\tif(!result && byte_offset > demuxer->packet_size && minimum > 0)\n\t{\n\t\tmpeg3_read_prev_packet(demuxer);\n\t\tmpeg3_read_prev_packet(demuxer);\n\t}\n//printf(\"seek_time %d %d %d\\n\", demuxer->current_title, demuxer->current_timecode, mpeg3demux_tell(demuxer));\n\tdemuxer->error_flag = result;\n\treturn result;\n}\n\nint mpeg3demux_seek_percentage(mpeg3_demuxer_t *demuxer, double percentage)\n{\n\tdouble total_bytes = 0;\n\tdouble absolute_position;\n\tlong relative_position;\n\tint i, new_title;\n\tmpeg3_title_t *title;\n\n\tdemuxer->error_flag = 0;\n\n/* Get the absolute byte position; */\n\tfor(i = 0; i < demuxer->total_titles; i++)\n\t\ttotal_bytes += demuxer->titles[i]->total_bytes;\n\n\tabsolute_position = percentage * total_bytes;\n\n/* Get the title the byte is inside */\n\tfor(new_title = 0, total_bytes = 0; new_title < demuxer->total_titles; new_title++)\n\t{\n\t\ttotal_bytes += demuxer->titles[new_title]->total_bytes;\n\t\tif(absolute_position < total_bytes) break;\n\t}\n\n\tif(new_title >= demuxer->total_titles)\n\t{\n\t\tnew_title = demuxer->total_titles - 1;\n\t}\n\n/* Got a title */\n\ttitle = demuxer->titles[new_title];\n\ttotal_bytes -= title->total_bytes;\n\trelative_position = (long)(absolute_position - total_bytes);\n\n/* Get the timecode the byte is inside */\n\tfor(demuxer->current_timecode = 0; \n\t\tdemuxer->current_timecode < title->timecode_table_size; \n\t\tdemuxer->current_timecode++)\n\t{\n\t\tif(title->timecode_table[demuxer->current_timecode].start_byte <= relative_position &&\n\t\t\ttitle->timecode_table[demuxer->current_timecode].end_byte > relative_position)\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif(demuxer->current_timecode >= title->timecode_table_size)\n\t\tdemuxer->current_timecode = title->timecode_table_size - 1;\n\n/* Get the nearest timecode in the same program */\n\twhile(demuxer->current_timecode < title->timecode_table_size - 1 &&\n\t\t\ttitle->timecode_table[demuxer->current_timecode].program != demuxer->current_program)\n\t{\n\t\tdemuxer->current_timecode++;\n\t}\n\n/* Open the new title and seek to the correct byte */\n\tif(new_title != demuxer->current_title)\n\t{\n\t\tdemuxer->error_flag = mpeg3demux_open_title(demuxer, new_title);\n\t}\n\n\tif(!demuxer->error_flag)\n\t\tdemuxer->error_flag = mpeg3io_seek(title->fs, relative_position);\n\n\treturn demuxer->error_flag;\n}\n\ndouble mpeg3demux_tell_percentage(mpeg3_demuxer_t *demuxer)\n{\n\tdouble total_bytes = 0;\n\tdouble position = 0;\n\tint i;\n\n\tdemuxer->error_flag = 0;\n\tposition = mpeg3io_tell(demuxer->titles[demuxer->current_title]->fs);\n\tfor(i = 0; i < demuxer->total_titles; i++)\n\t{\n\t\tif(i == demuxer->current_title)\n\t\t{\n\t\t\tposition += total_bytes;\n\t\t}\n\t\ttotal_bytes += demuxer->titles[i]->total_bytes;\n\t}\n\treturn position / total_bytes;\n}\n\ndouble mpeg3demux_get_time(mpeg3_demuxer_t *demuxer)\n{\n\treturn demuxer->time;\n}\n\nlong mpeg3demux_tell(mpeg3_demuxer_t *demuxer)\n{\n\treturn mpeg3io_tell(demuxer->titles[demuxer->current_title]->fs);\n}\n\nlong mpeg3demuxer_total_bytes(mpeg3_demuxer_t *demuxer)\n{\n\tmpeg3_title_t *title = demuxer->titles[demuxer->current_title];\n\treturn title->total_bytes;\n}\n\nmpeg3_demuxer_t* mpeg3_get_demuxer(mpeg3_t *file)\n{\n\tif(file->is_program_stream || file->is_transport_stream)\n\t{\n\t\tif(file->has_audio) return file->atrack[0]->demuxer;\n\t\telse\n\t\tif(file->has_video) return file->vtrack[0]->demuxer;\n\t}\n\treturn 0;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/mpeg3demux.h",
    "content": "#ifndef MPEG3DEMUX_H\n#define MPEG3DEMUX_H\n\n#include \"mpeg3title.h\"\n#include <stdio.h>\n\ntypedef struct\n{\n\tvoid* file;\n/* Data consisting of the multiplexed packet */\n\tunsigned char *raw_data;\n\tlong raw_offset;\n\tint raw_size;\n\tlong packet_size;\n/* Only one is on depending on which track owns the demultiplexer. */\n\tint do_audio;\n\tint do_video;\n/* Data consisting of the elementary stream */\n\tunsigned char *data_buffer;\n\tlong data_size;\n\tlong data_position;\n\tlong data_allocated;\n/* Remember when the file descriptor is at the beginning of the packet just read. */\n\tint reverse;\n/* Set to 1 when eof or attempt to read before beginning */\n\tint error_flag;\n/* Temp variables for returning */\n\tunsigned char next_char;\n/* Correction factor for time discontinuity */\n\tdouble time_offset;\n\tint generating_timecode;\n\n/* Titles */\n\tmpeg3_title_t *titles[MPEG3_MAX_STREAMS];\n\tint total_titles;\n\tint current_title;\n\n/* Tables of every stream ID encountered */\n\tint astream_table[MPEG3_MAX_STREAMS];  /* macro of audio format if audio  */\n\tint vstream_table[MPEG3_MAX_STREAMS];  /* 1 if video */\n\n/* Programs */\n\tint total_programs;\n\tint current_program;\n\n/* Timecode in the current title */\n\tint current_timecode;\n\n/* Byte position in the current title */\n\tlong current_byte;\n\n\tint transport_error_indicator;\n\tint payload_unit_start_indicator;\n\tint pid;\n\tint transport_scrambling_control;\n\tint adaptation_field_control;\n\tint continuity_counter;\n\tint is_padding;\n\tint pid_table[MPEG3_PIDMAX];\n\tint continuity_counters[MPEG3_PIDMAX];\n\tint total_pids;\n\tint adaptation_fields;\n\tdouble time;           /* Time in seconds */\n\tint audio_pid;\n\tint video_pid;\n\tint astream;     /* Video stream ID being decoded.  -1 = select first ID in stream */\n\tint vstream;     /* Audio stream ID being decoded.  -1 = select first ID in stream */\n\tint aformat;      /* format of the audio derived from multiplexing codes */\n\tlong program_association_tables;\n\tint table_id;\n\tint section_length;\n\tint transport_stream_id;\n\tlong pes_packets;\n\tdouble pes_audio_time;  /* Presentation Time stamps */\n\tdouble pes_video_time;  /* Presentation Time stamps */\n} mpeg3_demuxer_t;\n\n/* ========================================================================= */\n/*                             Entry points */\n/* ========================================================================= */\n\n#define mpeg3demux_error(demuxer) (((mpeg3_demuxer_t *)(demuxer))->error_flag)\n\n#define mpeg3demux_time_offset(demuxer) (((mpeg3_demuxer_t *)(demuxer))->time_offset)\n\n#define mpeg3demux_current_time(demuxer) (((mpeg3_demuxer_t *)(demuxer))->time + ((mpeg3_demuxer_t *)(demuxer))->time_offset)\n\n#define mpeg3demux_read_char(demuxer) \\\n    ((((mpeg3_demuxer_t *)(demuxer))->data_position < ((mpeg3_demuxer_t *)(demuxer))->data_size) ? \\\n    ((mpeg3_demuxer_t *)(demuxer))->data_buffer[((mpeg3_demuxer_t *)(demuxer))->data_position++] : \\\n    mpeg3demux_read_char_packet(demuxer))\n\n#define mpeg3demux_read_prev_char(demuxer) \\\n    ((((mpeg3_demuxer_t *)(demuxer))->data_position != 0) ? \\\n    ((mpeg3_demuxer_t *)(demuxer))->data_buffer[((mpeg3_demuxer_t *)(demuxer))->data_position--] : \\\n    mpeg3demux_read_prev_char_packet(demuxer))\n\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/mpeg3io.c",
    "content": "/* \n *\n *  This file is part of libmpeg3\n *\t\n * LibMPEG3\n * Author: Adam Williams <broadcast@earthling.net>\n * Page: heroine.linuxbox.com\n * Page: http://www.smalltalkconsulting.com/html/mpeg3source.html (for Squeak)\n *\n    LibMPEG3 was originally licenced under GPL. It was relicensed by\n    the author under the LGPL and the Squeak license on Nov 1st, 2000\n    \n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA \n    \n    Also licensed under the Squeak license.\n    http://www.squeak.org/license.html\n */\n \n /*  Changed Sept 15th by John M McIntosh to support Macintosh & Squeak\n */\n /*  Changed May 23 by Jason Dufair to handle mp3 files with ID3v2 tags\n     (specifically ones with binary data in them)\n     - Added mpeg3io_get_id3v2_size\n     - modified all fseek's to use the id3v2 offset\n\t \n\tChanged Jan 20th 2006 by John M McIntosh to support reading mpeg file from a buffer\n\tsetvbuf(remember,0, _IOFBF, 64*1024);  //JMM Feb 26th, 2006 for CD reader performance\n\n\t\n */\n#include \"mpeg3private.h\"\n#include \"mpeg3protos.h\"\n\n#if defined(__linux__)\n#include <mntent.h>\n#endif\n\n#if defined( TARGET_OS_MAC) && !defined ( __APPLE__ ) && !defined ( __MACH__ )\n#include <stat.h>\n#else\n#include <sys/stat.h>\n#endif\n\n#include <stdlib.h>\n#include <string.h>\n\nmpeg3_fs_t* mpeg3_new_fs(char *path,int size)\n{\n\tmpeg3_fs_t *fs = (mpeg3_fs_t *) memoryAllocate(1, sizeof(mpeg3_fs_t));\n\tfs->css = mpeg3_new_css();\n\tif (size) {\n\t\tfs->mpeg_is_in_buffer = (char *) memoryAllocate(1, size);\n\t\tfs->mpeg_is_in_buffer_file_position = 0;\n\t\tfs->mpeg_buffer_size = size;\n\t\tmemmove(fs->mpeg_is_in_buffer,path,size);\n\t\tfs->path[0] = 0x00;\n\t} else {\n\tstrcpy(fs->path, path);\n\t\tfs->mpeg_is_in_buffer = NULL;\n\t\tfs->mpeg_is_in_buffer_file_position = 0;\n\t\tfs->mpeg_buffer_size = 0;\n\t}\n\treturn fs;\n}\n\nint mpeg3_delete_fs(mpeg3_fs_t *fs)\n{\n\tmpeg3_delete_css(fs->css);\n\tif (fs->mpeg_is_in_buffer)\n\t\tmemoryFree(fs->mpeg_is_in_buffer);\n\tfs->mpeg_is_in_buffer = NULL;\n\tmemoryFree(fs);\n\treturn 0;\n}\n\nint mpeg3_copy_fs(mpeg3_fs_t *dst, mpeg3_fs_t *src)\n{\n\tstrcpy(dst->path, src->path);\n\tdst->current_byte = 0;\n\treturn 0;\n}\n\nlong mpeg3io_get_total_bytes(mpeg3_fs_t *fs)\n{\n/*\n * \tstruct stat st;\n * \tif(stat(fs->path, &st) < 0) return 0;\n * \treturn (long)st.st_size;\n */\n\tif (fs->mpeg_is_in_buffer) {\n\t\tfs->total_bytes = fs->mpeg_buffer_size - fs->id3v2_offset;\n\t\tfs->mpeg_is_in_buffer_file_position = fs->id3v2_offset;\n\t\treturn fs->total_bytes;\n\t}\n\n\tif (! fs->fd) {\t// bgf error protection for win\n\t\treturn 0;\n\t}\n\n\tfseek(fs->fd, 0, SEEK_END);\n\tfs->total_bytes = ftell(fs->fd) - fs->id3v2_offset;\n\tfseek(fs->fd, fs->id3v2_offset, SEEK_SET);\n\n\treturn fs->total_bytes;\n}\n\nint mpeg3io_get_id3v2_size(mpeg3_fs_t *fs)\n{\n  unsigned long synchsafe_size = 0;\n\n  if (fs->mpeg_is_in_buffer) {\n\tfs->mpeg_is_in_buffer_file_position = 6;\n  } else {\n\tif (! fs->fd) return 0;\n\tfseek(fs->fd, 6, SEEK_SET);\n  }\n\n  synchsafe_size = mpeg3io_read_int32(fs);\n\n  return ((synchsafe_size & 0xff) | (synchsafe_size & 0xff00) >> 1 | (synchsafe_size & 0xff0000) >> 2 | (synchsafe_size & 0xff000000) >> 3) + 10;\n}\n\nint mpeg3io_open_file(mpeg3_fs_t *fs)\n{\n        unsigned int bits;\n\n  if (!fs->mpeg_is_in_buffer) {\n/* Need to perform authentication before reading a single byte. */\n\tmpeg3_get_keys(fs->css, fs->path);\n\tif(!(fs->fd = fopen(fs->path, \"rb\")))\n\t{\n\t\tperror(\"mpeg3io_open_file\");\n\t\treturn 1;\n\t}\n\tsetvbuf(fs->fd,0, _IOFBF, 64*1024);  //JMM Feb 26th, 2006 for CD reader performance\n\t}\n\n\tbits = mpeg3io_read_int32(fs);\n\n\tif ((bits >> 8) == MPEG3_ID3_PREFIX)\n\t  {\n\t    fs->id3v2_offset = mpeg3io_get_id3v2_size(fs);\n\t  } else {\n\t    fs->id3v2_offset = 0;\n\t  }\n\n\tfs->total_bytes = mpeg3io_get_total_bytes(fs);\n\t\n\tif(!fs->total_bytes)\n\t{\n\t\tif (!fs->mpeg_is_in_buffer) {\n\t\t\tif (fs->fd) fclose(fs->fd);\n\t\t}\n\t\tfprintf(stderr, \"MP2 - empty file %s\\n\", fs->path);\n\t\tfs->fd = NULL;\n\t\treturn 1;\n\t}\n\tfs->current_byte = 0;\n\treturn 0;\n}\n\nint mpeg3io_close_file(mpeg3_fs_t *fs)\n{\n\tif (!fs->mpeg_is_in_buffer)\n\tif(fs->fd) fclose(fs->fd);\n\telse {\n\t\tif (fs->mpeg_is_in_buffer)\n\t\t\tmemoryFree(fs->mpeg_is_in_buffer);\n\t\tfs->mpeg_is_in_buffer = 0; \n\t}\n\t/* fprintf (stderr, \"MP2 closing %s\\n\", fs->path); */\n\tfs->fd = 0;\n\treturn 0;\n}\n\nint mpeg3io_read_data(unsigned char *buffer, long bytes, mpeg3_fs_t *fs)\n{\n\tint result = 0;\n\tif (fs->mpeg_is_in_buffer) {\n\t\tint normalizedBytes;\n\t\tnormalizedBytes = fs->mpeg_is_in_buffer_file_position + bytes;\n\t\tif (normalizedBytes > fs->mpeg_buffer_size) {\n\t\t\tnormalizedBytes = fs->mpeg_buffer_size - fs->mpeg_is_in_buffer_file_position;\n\t\t}\n\t\telse \n\t\t\tnormalizedBytes = bytes;\n\t\tmemmove(buffer,fs->mpeg_is_in_buffer+fs->mpeg_is_in_buffer_file_position,normalizedBytes);\n\t\tfs->mpeg_is_in_buffer_file_position += normalizedBytes;\n\t\tresult = !normalizedBytes;\n\t} else {\n\t\tresult = (fs->fd != NULL) && !fread(buffer, 1, bytes, fs->fd);\n\t}\n\tfs->current_byte += bytes;\n\treturn (result && bytes);\n}\n\nint mpeg3io_device(char *path, char *device)\n{\n\tstruct stat file_st, device_st;\n#if defined(__linux__)\n\tstruct mntent *mnt;\n#endif\n\tFILE *fp;\n\n\tif(stat(path, &file_st) < 0)\n\t{\n\t\tperror(\"mpeg3io_device\");\n\t\treturn 1;\n\t}\n\n#if defined(__linux__)\n\tfp = setmntent(MOUNTED, \"r\");\n\twhile(fp && (mnt = getmntent(fp)))\n\t{\n\t\tif(stat(mnt->mnt_fsname, &device_st) < 0) continue;\n\t\tif(device_st.st_rdev == file_st.st_dev)\n\t\t{\n\t\t\tstrncpy(device, mnt->mnt_fsname, MPEG3_STRLEN);\n\t\t\tbreak;\n\t\t}\n\t}\n\tendmntent(fp); \n#endif\n\n\treturn 0;\n}\n\nint mpeg3io_seek(mpeg3_fs_t *fs, long byte)\n{\n\tfs->current_byte = byte;\n\tif (fs->mpeg_is_in_buffer) {\n\t\tint target;\n\t\t\n\t\ttarget = byte + fs->id3v2_offset;\n\t\tif (target > fs->mpeg_buffer_size) \n\t\t\t\treturn -1;\n\t\tif (target < 0) \n\t\t\t\treturn -1;\n\t\tfs->mpeg_is_in_buffer_file_position = target;\n\t\treturn 0;\n\t}\n\t// For Squeak-Teleplace, where we only deal in static mpeg files.\n\t// No seek beyond the EOF.  Partly to protect against win32 seek woes.\n\tif (byte < 0) {\n\t\treturn -1;\n\t} else if (fs->total_bytes && (byte > fs->total_bytes)) {\n\t\t/* fprintf(stderr, \"libmpeg3 seek out of range %ld vs %ld\\n\", byte, fs->total_bytes); */\n\t\treturn -1;\n\t} else {\n\t\tif (fs->fd) {\n\t\t\treturn fseek(fs->fd, (byte + fs->id3v2_offset), SEEK_SET);\n\t\t}\n\t\tfprintf(stderr, \"MP2: seek no fd\\n\");\n\t\treturn -1;\n\t}\n}\n\nint mpeg3io_seek_relative(mpeg3_fs_t *fs, long bytes)\n{\n\tlong old_current_byte = fs->current_byte;\n\tfs->current_byte += bytes;\n\tif (fs->mpeg_is_in_buffer) {\n\t\tlong target = fs->current_byte + fs->id3v2_offset;\n\t\tif (target > fs->mpeg_buffer_size)\n\t\t\treturn -1;\n\t\tif (target < 0) {\n\t\t\treturn -1;\t\t}\n\t\tfs->mpeg_is_in_buffer_file_position = target;\n\t\treturn 0;\n\t}\n\tif (fs->current_byte < 0) {\n\t\treturn -1;\n\t} else if (fs->total_bytes && (fs->current_byte > fs->total_bytes)) {\n\t\t/*  For Squeak-Teleplace, where we only deal in static mpeg files. */\n\t\t/*  No seek beyond the EOF.  Partly to protect against win32 seek woes. */\n\t\treturn -1;\n\t}\n\n\tif (fs->fd) {\n\t\treturn fseek(fs->fd, fs->current_byte + fs->id3v2_offset, SEEK_SET);\n\t} \n\tfprintf(stderr, \"MP2: rel seek no fd\\n\");\n\treturn -1;\n}\n\nint mpeg3io_scanf (mpeg3_fs_t *fs,char *format, void * string1, void * string2) {\n\tint return_value;\n\tif (fs->mpeg_is_in_buffer) {\n\t\treturn_value = sscanf(fs->mpeg_is_in_buffer+fs->mpeg_is_in_buffer_file_position,format, string1, string2);\n\t\treturn return_value;\n\t}\n\tif (! fs->fd) {\n\t\tfprintf(stderr, \"MP2 scan3 - no file\\n\");\n\t\treturn -1;\n\t}\n\treturn_value = fscanf(fs->fd,format, string1, string2);\n\treturn return_value;\n}\n\nint mpeg3io_scanf5 (mpeg3_fs_t *fs,char *format, void * string1, void * string2, void * string3, void * string4, void * string5) {\n\tint return_value;\n\t\n\tif (fs->mpeg_is_in_buffer) {\n\t\treturn_value = sscanf(fs->mpeg_is_in_buffer+fs->mpeg_is_in_buffer_file_position,format, string1, string2, string3, string4, string5);\n\t\treturn return_value;\n\t}\n\tif (! fs->fd) {\n\t\tfprintf(stderr, \"MP2 scan5 - no file\\n\");\n\t\treturn -1;\n\t}\n\treturn_value = fscanf(fs->fd,format, string1, string2, string3, string4, string5);\n\treturn return_value;\n}\n\nint mpeg3io_end_of_file(mpeg3_fs_t *fs ) {\n\tif (fs->mpeg_is_in_buffer) {\n\t\treturn fs->mpeg_is_in_buffer_file_position == fs->mpeg_buffer_size;\n\t}\n\t\n\treturn ( ! fs->fd ) || feof(fs->fd);\n}\n\ninline int mpeg3io_fgetc(mpeg3_fs_t *fs) {\n\tif (fs->mpeg_is_in_buffer) {\n\t\tunsigned int value;\n\t\tfs->mpeg_is_in_buffer_file_position++;\n\t\tif (fs->mpeg_is_in_buffer_file_position >= fs->mpeg_buffer_size) {\n\t\t\tfs->mpeg_is_in_buffer_file_position = fs->mpeg_buffer_size;\n\t\t\treturn 0;\n\t\t}\n\t\tvalue = (unsigned int) fs->mpeg_is_in_buffer[fs->mpeg_is_in_buffer_file_position-1];\n\t\treturn value;\n\t}\n\treturn (fs->fd ? fgetc(fs->fd) : 0);\n}\n\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/mpeg3io.h",
    "content": "#ifndef MPEG3IO_H\n#define MPEG3IO_H\n\n\n#include <stdio.h>\n#include \"mpeg3css.h\"\n#include \"mpeg3private.inc\"\n\n/* Filesystem structure */\n\ntypedef struct\n{\n\tFILE *fd;\n\tmpeg3_css_t *css;          /* Encryption object */\n\tchar path[MPEG3_STRLEN];\n/* Hypothetical position of file pointer */\n\tlong current_byte;\n\tlong total_bytes;\n\tunsigned long id3v2_offset;\n\tunsigned char*\tmpeg_is_in_buffer;\n\tlong\tmpeg_is_in_buffer_file_position;\n\tlong\tmpeg_buffer_size;\n} mpeg3_fs_t;\n\n#define mpeg3io_tell(fs) (((mpeg3_fs_t *)(fs))->current_byte)\n\n// End of file\n#define mpeg3io_eof(fs) (((mpeg3_fs_t *)(fs))->current_byte >= ((mpeg3_fs_t *)(fs))->total_bytes)\n\n// Beginning of file\n#define mpeg3io_bof(fs)\t(((mpeg3_fs_t *)(fs))->current_byte < 0)\n\n#ifdef WIN32\n#define inline __inline\n#endif\n\n#define mpeg3io_total_bytes(fs) (((mpeg3_fs_t *)(fs))->total_bytes)\ninline int mpeg3io_fgetc(mpeg3_fs_t *fs);\n\nstatic inline unsigned int mpeg3io_read_int32(mpeg3_fs_t *fs)\n{\n\tint a, b, c, d;\n\tunsigned int result;\n/* Do not fread.  This breaks byte ordering. */\n\ta = (unsigned char)mpeg3io_fgetc(fs);\n\tb = (unsigned char)mpeg3io_fgetc(fs);\n\tc = (unsigned char)mpeg3io_fgetc(fs);\n\td = (unsigned char)mpeg3io_fgetc(fs);\n\tresult = ((int)a << 24) |\n\t\t\t\t\t((int)b << 16) |\n\t\t\t\t\t((int)c << 8) |\n\t\t\t\t\t((int)d);\n\tfs->current_byte += 4;\n\treturn result;\n}\n\nstatic inline unsigned int mpeg3io_read_char(mpeg3_fs_t *fs)\n{\n\tfs->current_byte++;\n\treturn mpeg3io_fgetc(fs);\n}\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/mpeg3private.h",
    "content": "  /*  Changed Sept 15th by John M McIntosh to support Macintosh & Squeak\n */\n\n#ifndef MPEG3PRIVATE_H\n#define MPEG3PRIVATE_H\n\n\n/** configuration **/\n#if defined(__MWERKS__)\n#define TARGET_MAC_OS 1\n#endif\n\n/* how should functions be inlined? */\n#ifndef INLINE\n#ifdef TARGET_MAC_OS\n#define INLINE\n#else\n#define INLINE inline\n#endif\n#endif\n\n#ifdef _MSC_VER\n/* disallow INLINE since those functions cannot be linked */\n#undef INLINE\n#define INLINE\n#endif\n\n/* use pthreads? */\n#ifndef NOPTHREADS\n#ifndef TARGET_MAC_OS\n#define USE_PTHREADS\n#endif\n#endif\n\n\n#include \"mpeg3atrack.h\"\n#include \"mpeg3css.h\"\n#include \"mpeg3io.h\"\n#include \"mpeg3private.inc\"\n#include \"mpeg3title.h\"\n#include \"mpeg3vtrack.h\"\n\ntypedef struct\n{\n\tmpeg3_fs_t *fs;      /* Store entry path here */\n\tmpeg3_demuxer_t *demuxer;        /* Master tables */\n\n/* Media specific */\n\tint has_audio;\n\tint has_video;\n\tint total_astreams;\n\tint total_vstreams;\n\tmpeg3_atrack_t *atrack[MPEG3_MAX_STREAMS];\n\tmpeg3_vtrack_t *vtrack[MPEG3_MAX_STREAMS];\n\n/* Only one of these is set to 1 to specify what kind of stream we have. */\n\tint is_transport_stream;\n\tint is_program_stream;\n\tint is_audio_stream;         /* Elemental stream */\n\tint is_video_stream;         /* Elemental stream */\n\tlong packet_size;\n/* Type and stream for getting current percentage */\n\tint last_type_read;  /* 1 - audio   2 - video */\n\tint last_stream_read;\n\n\tint program;  /* Number of program to play */\n\tint cpus;\n\tint have_mmx;\n} mpeg3_t;\n\n\n\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/mpeg3private.inc",
    "content": "#ifndef LIBMPEG3_INC\n#define LIBMPEG3_INC\n\n\n\n#define MPEG3_FLOAT32 float\n#define MPEG3_INT16   short int\n#define MPEG3_INT32   int\n#define MPEG3_INT64   long\n\n#define MPEG3_TOC_PREFIX                 0x544f4356\n#define MPEG3_TOC_PREFIXLOWER            0x746f6376\n#define MPEG3_ID3_PREFIX                 0x494433\n#define MPEG3_RIFF_CODE                  0x52494646\n#define MPEG3_PROC_CPUINFO               \"/proc/cpuinfo\"\n#define MPEG3_TS_PACKET_SIZE             188\n#define MPEG3_DVD_PACKET_SIZE            0x800\n#define MPEG3_SYNC_BYTE                  0x47\n#define MPEG3_PACK_START_CODE            0x000001ba\n#define MPEG3_SEQUENCE_START_CODE        0x000001b3\n#define MPEG3_SEQUENCE_END_CODE          0x000001b7\n#define MPEG3_SYSTEM_START_CODE          0x000001bb\n#define MPEG3_STRLEN                     1024\n#define MPEG3_PIDMAX                     20 /* Maximum number of PIDs in one stream */\n#define MPEG3_PROGRAM_ASSOCIATION_TABLE  0x00\n#define MPEG3_CONDITIONAL_ACCESS_TABLE   0x01\n#define MPEG3_PACKET_START_CODE_PREFIX   0x000001\n#define MPEG3_PRIVATE_STREAM_2           0xbf\n#define MPEG3_PADDING_STREAM             0xbe\n#define MPEG3_GOP_START_CODE             0x000001b8\n#define MPEG3_PICTURE_START_CODE         0x00000100\n#define MPEG3_EXT_START_CODE             0x000001b5\n#define MPEG3_USER_START_CODE            0x000001b2\n#define MPEG3_SLICE_MIN_START            0x00000101\n#define MPEG3_SLICE_MAX_START            0x000001af\n#define MPEG3_AC3_START_CODE             0x0b77\n#define MPEG3_PCM_START_CODE             0x0180\n#define MPEG3_MAX_CPUS                   256\n#define MPEG3_MAX_STREAMS                256\n#define MPEG3_MAX_PACKSIZE               262144\n#define MPEG3_CONTIGUOUS_THRESHOLD       10  /* Positive difference before declaring timecodes discontinuous */\n#define MPEG3_PROGRAM_THRESHOLD          5   /* Minimum number of seconds before interleaving programs */\n#define MPEG3_SEEK_THRESHOLD             16  /* Number of frames difference before absolute seeking */\n\n/* Values for audio format */\n#define AUDIO_UNKNOWN 0\n#define AUDIO_MPEG 1\n#define AUDIO_AC3  2\n#define AUDIO_PCM  3\n#define AUDIO_AAC  4\n#define AUDIO_JESUS  5\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/mpeg3protos.h",
    "content": "#ifndef MPEG3PROTOS_H\n#define MPEG3PROTOS_H\n\n/* CSS */\n\nmpeg3_css_t* mpeg3_new_css();\n\n/* DEMUX */\n\nmpeg3_demuxer_t* mpeg3_new_demuxer(mpeg3_t *file, int do_audio, int do_video, int stream_id);\nint mpeg3_delete_demuxer(mpeg3_demuxer_t *demuxer);\nint mpeg3demux_read_data(mpeg3_demuxer_t *demuxer, unsigned char *output, long size);\nunsigned int mpeg3demux_read_int32(mpeg3_demuxer_t *demuxer);\nunsigned int mpeg3demux_read_int24(mpeg3_demuxer_t *demuxer);\nunsigned int mpeg3demux_read_int16(mpeg3_demuxer_t *demuxer);\ndouble mpeg3demux_length(mpeg3_demuxer_t *demuxer);\nmpeg3_demuxer_t* mpeg3_get_demuxer(mpeg3_t *file);\nlong mpeg3demux_tell(mpeg3_demuxer_t *demuxer);\ndouble mpeg3demux_tell_percentage(mpeg3_demuxer_t *demuxer);\ndouble mpeg3demux_get_time(mpeg3_demuxer_t *demuxer);\nint mpeg3demux_eof(mpeg3_demuxer_t *demuxer);\nint mpeg3demux_bof(mpeg3_demuxer_t *demuxer);\n\n/* TITLE */\n\nmpeg3_title_t* mpeg3_new_title(mpeg3_t *file, char *path);\n\n\n/* ATRACK */\n\nmpeg3_atrack_t* mpeg3_new_atrack(mpeg3_t *file, int stream_id, int is_ac3, mpeg3_demuxer_t *demuxer);\nint mpeg3_delete_atrack(mpeg3_t *file, mpeg3_atrack_t *atrack);\n\n/* VTRACK */\n\nmpeg3_vtrack_t* mpeg3_new_vtrack(mpeg3_t *file, int stream_id, mpeg3_demuxer_t *demuxer);\nint mpeg3_delete_vtrack(mpeg3_t *file, mpeg3_vtrack_t *vtrack);\n\n/* AUDIO */\nmpeg3audio_t* mpeg3audio_new(mpeg3_t *file, mpeg3_atrack_t *track, int is_ac3);\nint mpeg3audio_delete(mpeg3audio_t *audio);\n\n\n/* VIDEO */\nmpeg3video_t* mpeg3video_new(mpeg3_t *file, mpeg3_vtrack_t *track);\nint mpeg3video_delete(mpeg3video_t *video);\nint mpeg3video_read_frame(mpeg3video_t *video, \n\t\tlong frame_number, \n\t\tunsigned char **output_rows,\n\t\tint in_x, \n\t\tint in_y, \n\t\tint in_w, \n\t\tint in_h, \n\t\tint out_w, \n\t\tint out_h, \n\t\tint color_model);\n\n/* FILESYSTEM */\n\nmpeg3_fs_t* mpeg3_new_fs(char *path,int size);\nint mpeg3_delete_fs(mpeg3_fs_t *fs);\nint mpeg3io_open_file(mpeg3_fs_t *fs);\nint mpeg3io_close_file(mpeg3_fs_t *fs);\nint mpeg3io_read_data(unsigned char *buffer, long bytes, mpeg3_fs_t *fs);\nint mpeg3io_end_of_file(mpeg3_fs_t *fs);\nint mpeg3io_scanf (mpeg3_fs_t *fs,char *format, void * string1, void * string2);\nint mpeg3io_scanf5 (mpeg3_fs_t *fs,char *format, void * string1, void * string2, void * string3, void * string4, void * string5);\nint mpeg3io_fgetc(mpeg3_fs_t *fs);\n\n/* BITSTREAM */\nmpeg3_bits_t* mpeg3bits_new_stream(mpeg3_t *file, mpeg3_demuxer_t *demuxer);\nunsigned int mpeg3bits_getbits(mpeg3_bits_t* stream, int n);\n\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/mpeg3title.c",
    "content": "/* \n *\n *  This file is part of libmpeg3\n *\t\n * LibMPEG3\n * Author: Adam Williams <broadcast@earthling.net>\n * Page: heroine.linuxbox.com\n * Page: http://www.smalltalkconsulting.com/html/mpeg3source.html (for Squeak)\n *\n    LibMPEG3 was originally licenced under GPL. It was relicensed by\n    the author under the LGPL and the Squeak license on Nov 1st, 2000\n    \n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA \n    \n    Also licensed under the Squeak license.\n    http://www.squeak.org/license.html\n */\n \n /*  Changed Sept 15th by John M McIntosh to support Macintosh & Squeak\n */\n#include \"mpeg3private.h\"\n#include \"mpeg3protos.h\"\n#include \"mpeg3title.h\"\n\n#include <stdlib.h>\n\nmpeg3_title_t* mpeg3_new_title(mpeg3_t *file, char *path)\n{\n\tmpeg3_title_t *title = (mpeg3_title_t *) memoryAllocate(1, sizeof(mpeg3_title_t));\n\t\n\tif (file->fs->mpeg_buffer_size) {\n\t\ttitle->fs = mpeg3_new_fs(file->fs->mpeg_is_in_buffer,file->fs->mpeg_buffer_size);\n\t} else {\n\t\ttitle->fs = mpeg3_new_fs(path,0);\n\t}\n\ttitle->file = file;\n\treturn title;\n}\n\nint mpeg3_delete_title(mpeg3_title_t *title)\n{\n\tmpeg3_delete_fs(title->fs);\n\tif(title->timecode_table_size)\n\t{\n\t\tmemoryFree(title->timecode_table);\n\t}\n\tmemoryFree(title);\n\treturn 0;\n}\n\n\nint mpeg3_copy_title(mpeg3_title_t *dst, mpeg3_title_t *src)\n{\n\tint i;\n\n\tmpeg3_copy_fs(dst->fs, src->fs);\n\tdst->total_bytes = src->total_bytes;\n\t\n\tif(src->timecode_table_size)\n\t{\n\t\tdst->timecode_table_allocation = src->timecode_table_allocation;\n\t\tdst->timecode_table_size = src->timecode_table_size;\n\t\tdst->timecode_table = (mpeg3demux_timecode_t *) memoryAllocate(1, sizeof(mpeg3demux_timecode_t) * dst->timecode_table_allocation);\n\n\t\tfor(i = 0; i < dst->timecode_table_size; i++)\n\t\t{\n\t\t\tdst->timecode_table[i] = src->timecode_table[i];\n\t\t}\n\t}\n}\n\nint mpeg3_dump_title(mpeg3_title_t *title)\n{\n\tint i;\n\t\n\tfor(i = 0; i < title->timecode_table_size; i++)\n\t{\n\t\tprintf(\"%f: %d - %d %f %f %d\\n\", \n\t\t\ttitle->timecode_table[i].absolute_start_time, \n\t\t\ttitle->timecode_table[i].start_byte, \n\t\t\ttitle->timecode_table[i].end_byte, \n\t\t\ttitle->timecode_table[i].start_time, \n\t\t\ttitle->timecode_table[i].end_time, \n\t\t\ttitle->timecode_table[i].program);\n\t}\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/mpeg3title.h",
    "content": "#ifndef MPEG3TITLE_H\n#define MPEG3TITLE_H\n\n#include \"mpeg3io.h\"\n\ntypedef struct\n{\n\tlong start_byte;\n\tdouble start_time;\n\tdouble absolute_start_time;\n\tdouble absolute_end_time;\n\tlong end_byte;\n\tdouble end_time;\n\tint program;\n} mpeg3demux_timecode_t;\n\ntypedef struct\n{\n\tvoid *file;\n\tmpeg3_fs_t *fs;\n\tlong total_bytes;     /* Total bytes in file.  Critical for seeking and length. */\n/* Timecode table */\n\tmpeg3demux_timecode_t *timecode_table;\n\tlong timecode_table_size;    /* Number of entries */\n\tlong timecode_table_allocation;    /* Number of available slots */\n} mpeg3_title_t;\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/mpeg3toc.c",
    "content": "/*  Changed Sept 15th by John M McIntosh to support Macintosh & Squeak\n*/\n#include \"libmpeg3.h\"\n\n#include <stdio.h>\n#include <string.h>\n\n#ifdef MACINTOSH\n#include <stat.h>\n#else\n#include <sys/stat.h>\n#endif\n\n\nint main(int argc, char *argv[])\n{\n\tint i;\n/*\tFILE *output; */\n\tchar new_path[1024], *ext;\n\tstruct stat st;\n\tlong size;\n\tint timecode_search = 0;\n\n\tif(argc < 2)\n\t{\n\t\tfprintf(stderr, \"Create a table of contents for a DVD.\\n\"\n\t\t\t\"\tUsage: mpeg3toc [-t] <filename>...\\n\"\n\t\t\t\"\t-t Perform timecode search.\\n\"\n\t\t\t\"\\n\"\n\t\t\t\"\tThe filenames should be absolute paths unless you plan\\n\"\n\t\t\t\"\tto always run your movie player from the same directory\\n\"\n\t\t\t\"\tas the filename.  Alternatively you can edit the toc by\\n\"\n\t\t\t\"\thand.\\n\"\n\t\t\t\"\tThe timecode search allows XMovie to play the Matrix.\\n\"\n\t\t\t\"Example: mpeg3toc /cd2/video_ts/vts_01_*.vob > titanic.toc\\n\");\n\t\texit(1);\n\t}\n\n\tfor(i = 1; i < argc; i++)\n\t{\n\t\tif(!strcmp(argv[i], \"-t\"))\n\t\t{\n\t\t\ttimecode_search = 1;\n\t\t}\n\t\telse\n\t\t{\n/* Get just name */\n\t\t\text = strrchr(argv[i], '/');\n\t\t\tif(ext)\n\t\t\t{\n\t\t\t\text++;\n\t\t\t\tstrcpy(new_path, ext);\n\t\t\t}\n\t\t\telse\n\t\t\t\tstrcpy(new_path, argv[i]);\n\n\n/* Replace suffix */\n\t\t\text = strrchr(new_path, '.');\n\t\t\tif(ext)\n\t\t\t{\n\t\t\t\tsprintf(ext, \".toc\");\n\t\t\t}\n\t\t\telse\n\t\t\t\tstrcat(new_path, \".toc\");\n\n/*\t\t\tfprintf(stderr, \"Creating %s\\n\", new_path); */\n\n\t\t\tstat(argv[i], &st);\n\t\t\tsize = (long)st.st_size;\n\n\t\t\tif(!size)\n\t\t\t{\n\t\t\t\tfprintf(stderr, \"%s is 0 length.  Skipping\\n\", new_path);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n/* Just want the first title's streams */\n\t\t\t\tif(mpeg3_generate_toc(stdout, argv[i], timecode_search, i == argc - 1))\n\t\t\t\t{\n\t\t\t\t\tfprintf(stderr, \"Skipping %s\\n\", argv[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/mpeg3vtrack.c",
    "content": "/* \n *\n *  This file is part of libmpeg3\n *\t\n * LibMPEG3\n * Author: Adam Williams <broadcast@earthling.net>\n * Page: heroine.linuxbox.com\n * Page: http://www.smalltalkconsulting.com/html/mpeg3source.html (for Squeak)\n *\n    LibMPEG3 was originally licenced under GPL. It was relicensed by\n    the author under the LGPL and the Squeak license on Nov 1st, 2000\n    \n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA \n    \n    Also licensed under the Squeak license.\n    http://www.squeak.org/license.html\n */\n \n /*  Changed Sept 15th by John M McIntosh to support Macintosh & Squeak\n */\n#include \"libmpeg3.h\"\n#include \"mpeg3protos.h\"\n\n#include <stdlib.h>\n\nmpeg3_vtrack_t* mpeg3_new_vtrack(mpeg3_t *file, int stream_id, mpeg3_demuxer_t *demuxer)\n{\n\tint result = 0;\n\tmpeg3_vtrack_t *new_vtrack;\n\tnew_vtrack = (mpeg3_vtrack_t *) memoryAllocate(1, sizeof(mpeg3_vtrack_t));\n\tnew_vtrack->demuxer = mpeg3_new_demuxer(file, 0, 1, stream_id);\n\tif(demuxer) mpeg3demux_copy_titles(new_vtrack->demuxer, demuxer);\n\tnew_vtrack->current_position = 0;\n\n/* Get information about the track here. */\n\tnew_vtrack->video = mpeg3video_new(file, new_vtrack);\n\tif(!new_vtrack->video)\n\t{\n/* Failed */\n\t\tmpeg3_delete_vtrack(file, new_vtrack);\n\t\tnew_vtrack = 0;\n\t}\n\treturn new_vtrack;\n}\n\nint mpeg3_delete_vtrack(mpeg3_t *file, mpeg3_vtrack_t *vtrack)\n{\n\tif(vtrack->video)\n\t\tmpeg3video_delete(vtrack->video);\n\tif(vtrack->demuxer)\n\t\tmpeg3_delete_demuxer(vtrack->demuxer);\n\tmemoryFree(vtrack);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/mpeg3vtrack.h",
    "content": " /*  Changed Sept 15th by John M McIntosh to support Macintosh & Squeak\n */\n#ifndef MPEG3_VTRACK_H\n#define MPEG3_VTRACK_H\n\n#include \"mpeg3demux.h\"\n#include \"mpeg3video.h\"\n\ntypedef struct\n{\n\tint width;\n\tint height;\n\tfloat frame_rate;\n\tmpeg3_demuxer_t *demuxer;\n\tmpeg3video_t *video;\n\tlong current_position;  /* Number of next frame to be played */\n\tlong total_frames;     /* Total frames in the file */\n} mpeg3_vtrack_t;\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/test.c",
    "content": "/* Lex's test program.... */\n\n#include <libmpeg3.h>\n#include <stdio.h>\n\n\nint main() \n{\n     mpeg3_t *file;\n     int width;\n     int height;\n     unsigned char buf[400][400] = { {0} };\n     unsigned char * rowPtrs[400];\n     int i;\n     int iter;\n     \n     \n     \n\n     file = mpeg3_open(\"/home/lex/piper.closeup.mpg\");\n     if(file == NULL) {\n\t  printf(\"couldn't open file\\n\");\n\t  return 1;\n     }\n\n     width = mpeg3_video_width(file, 0);\n     height = mpeg3_video_height(file, 0);\n     printf(\"dimensions are: %d x %d\\n\", width, height);\n\n\n     for(i=0; i<400; i++)\n\t  rowPtrs[i] = buf[i];\n\n\n     printf(\"buf = \");\n     for(i=0; i<8; i++)\n\t  printf(\" %d\", buf[0][i]);\n     printf(\"\\n\");\n\n     for(iter=0; iter<100; iter++) {\n\t  printf(\"iter = %d\\n\", iter);\n\t  \n\t  mpeg3_read_frame(file, rowPtrs,\n\t\t\t   0, 0, width, height,\n\t\t\t   width, height,\n\t\t\t   MPEG3_RGBA8888,\n\t\t\t   0);\n\n\t  printf(\"buf = \");\n\t  for(i=0; i<8; i++)\n\t       printf(\" %d\", buf[0][i]);\n\t  printf(\"\\n\");\n     }\n     \n\n     return 0;\n     \n}\n\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/testaudio.c",
    "content": "/* Lex's test program.... */\n\n#include <libmpeg3.h>\n#include <stdio.h>\n\n\nint main() \n{\n     mpeg3_t *file;\n     int width;\n     int height;\n     unsigned char buf[100000] = { 0 };\n     int i;\n     int iter;\n     \n     \n     \n\n     file = mpeg3_open(\"/home/lex/mp3/bach/lilfug.mp3\");\n     if(file == NULL) {\n\t  printf(\"couldn't open file\\n\");\n\t  return 1;\n     }\n\n\n\n     printf(\"buf = \");\n     for(i=0; i<8; i++)\n\t  printf(\" %d\", buf[i]);\n     printf(\"\\n\");\n\n     for(iter=0; iter<100; iter++) {\n\t  printf(\"iter = %d\\n\", iter);\n\n\t  mpeg3_read_audio(file, NULL,\n\t\t\t   (short *) buf,\n\t\t\t   1,\n\t\t\t   1000,\n\t\t\t   0);\n\n\t  printf(\"buf = \");\n\t  for(i=0; i<8; i++)\n\t       printf(\" %d\", buf[i]);\n\t  printf(\"\\n\");\n     }\n     \n\n     return 0;\n     \n}\n\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/timecode.h",
    "content": "#ifndef TIMECODE_H\n#define TIMECODE_H\n\ntypedef struct \n{\n\tlong hour;\n\tlong minute;\n\tlong second;\n\tlong frame;\n} mpeg3_timecode_t;\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/udump.c",
    "content": "#include \"libmpeg3.h\"\n#include <stdlib.h>\n\n#define BUFSIZE 10000000\n\nint main(int argc, char *argv[])\n{\n\tmpeg3_t *file;\n\tint i, result = 0;\n\tunsigned char *output, **output_rows;\n\tfloat *audio_output_f;\n\tshort *audio_output_i;\n\tlong total_samples = 0;\n\n\tif(argc < 2)\n\t{\n\t\tprintf(\"Need an MPEG stream.\\n\");\n\t\texit(1);\n\t}\n\n\tfile = mpeg3_open(argv[1]);\n\tif(file)\n\t{\n\t\tfprintf(stderr, \"MMX supported %d\\n\", file->have_mmx);\n\t\tfprintf(stderr, \"Audio streams: %d\\n\", mpeg3_total_astreams(file));\n\t\tfor(i = 0; i < mpeg3_total_astreams(file); i++)\n\t\t{\n\t\t\tfprintf(stderr, \"  Stream %d: channels %d sample rate %d total samples %ld\\n\", \n\t\t\t\ti, \n\t\t\t\tmpeg3_audio_channels(file, i), \n\t\t\t\tmpeg3_sample_rate(file, i),\n\t\t\t\tmpeg3_audio_samples(file, i));\n\t\t}\n\t\tfprintf(stderr, \"Video streams: %d\\n\", mpeg3_total_vstreams(file));\n\t\tfor(i = 0; i < mpeg3_total_vstreams(file); i++)\n\t\t{\n\t\t\tfprintf(stderr, \"  Stream %d: width %d height %d frame rate %0.3f total frames %ld\\n\", \n\t\t\t\ti, \n\t\t\t\tmpeg3_video_width(file, i), \n\t\t\t\tmpeg3_video_height(file, i), \n\t\t\t\tmpeg3_frame_rate(file, i),\n\t\t\t\tmpeg3_video_frames(file, i));\n\t\t}\n\n\t\tmpeg3_set_cpus(file, 1);\n/* \t\taudio_output_f = malloc(BUFSIZE * sizeof(float)); */\n\t\taudio_output_i = malloc(BUFSIZE * sizeof(short));\n/*\t\tmpeg3_set_sample(file, 11229518, 0); */\n/*  \t\tresult = mpeg3_read_audio(file, audio_output_f, 0, 0, BUFSIZE, 0); */\n//\t\tresult = mpeg3_read_audio(file, 0, audio_output_i, 1, BUFSIZE, 0);\n \t\tfwrite(audio_output_i, BUFSIZE, 1, stdout);\n\n  \t\toutput = malloc(mpeg3_video_width(file, 0) * mpeg3_video_height(file, 0) * 3 + 4);\n  \t\toutput_rows = malloc(sizeof(unsigned char*) * mpeg3_video_height(file, 0));\n  \t\tfor(i = 0; i < mpeg3_video_height(file, 0); i++)\n  \t\t\toutput_rows[i] = &output[i * mpeg3_video_width(file, 0) * 3];\n// \t\tmpeg3_set_frame(file, 1000, 0);\n \t\tresult = mpeg3_read_frame(file, \n \t\t\t\t\toutput_rows, \n \t\t\t\t\t0, \n \t\t\t\t\t0, \n \t\t\t\t\tmpeg3_video_width(file, 0), \n\t\t\t\t\tmpeg3_video_height(file, 0), \n \t\t\t\t\tmpeg3_video_width(file, 0), \n \t\t\t\t\tmpeg3_video_height(file, 0), \n\t\t\t\t\tMPEG3_RGB888, \n \t\t\t\t\t0);\n\n\t\tmpeg3_close(file);\n\t}\n\treturn 0;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/video/getpicture.c",
    "content": "/* \n *\n *  This file is part of libmpeg3\n *\t\n * LibMPEG3\n * Author: Adam Williams <broadcast@earthling.net>\n * Page: heroine.linuxbox.com\n * Page: http://www.smalltalkconsulting.com/html/mpeg3source.html (for Squeak)\n *\n    LibMPEG3 was originally licenced under GPL. It was relicensed by\n    the author under the LGPL and the Squeak license on Nov 1st, 2000\n    \n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA \n    \n    Also licensed under the Squeak license.\n    http://www.squeak.org/license.html\n */\n /*  Changed Sept 15th by John M McIntosh to support Macintosh & Squeak\n */\n#include \"mpeg3private.h\"\n\n#include \"mpeg3video.h\"\n#include \"vlc.h\"\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\nint mpeg3video_get_cbp(mpeg3_slice_t *slice)\n{\n  \tint code;\n\tmpeg3_slice_buffer_t *slice_buffer = slice->slice_buffer;\n\n  \tif((code = mpeg3slice_showbits9(slice_buffer)) >= 128)\n\t{\n    \tcode >>= 4;\n    \tmpeg3slice_flushbits(slice_buffer, mpeg3_CBPtab0[code].len);\n    \treturn mpeg3_CBPtab0[code].val;\n  \t}\n\n  \tif(code >= 8)\n\t{\n    \tcode >>= 1;\n    \tmpeg3slice_flushbits(slice_buffer, mpeg3_CBPtab1[code].len);\n    \treturn mpeg3_CBPtab1[code].val;\n  \t}\n\n  \tif(code < 1)\n\t{\n/*    \tfprintf(stderr,\"mpeg3video_get_cbp: invalid coded_block_pattern code\\n\"); */\n    \tslice->fault = 1;\n    \treturn 0;\n  \t}\n\n  \tmpeg3slice_flushbits(slice_buffer, mpeg3_CBPtab2[code].len);\n  \treturn mpeg3_CBPtab2[code].val;\n}\n\n\n/* set block to zero */\nint mpeg3video_clearblock(mpeg3_slice_t *slice, int comp, int size)\n{\n\tslice->sparse[comp] = 1;\n\n/* Compiler error */\n/*\n * \tfor(i = 0; i < size; i++)\n * \t{\n * \t\tbzero(slice->block[comp] + sizeof(short) * 64 * i, sizeof(short) * 64);\n * \t}\n */\n\n\tif(size == 6)\n\t{\n\t\tbzero(slice->block[comp], sizeof(short) * 64 * 6);\n\t}\n\telse\n\t{\n\t\tmemset(slice->block[comp], 0, sizeof(short) * 64 * size);\n\t}\n\treturn 0;\n}\n\nstatic inline int mpeg3video_getdclum(mpeg3_slice_buffer_t *slice_buffer)\n{\n\tint code, size, val;\n/* decode length */\n\tcode = mpeg3slice_showbits5(slice_buffer);\n\n\tif(code < 31)\n\t{\n    \tsize = mpeg3_DClumtab0[code].val;\n    \tmpeg3slice_flushbits(slice_buffer, mpeg3_DClumtab0[code].len);\n\t}\n\telse \n\t{\n    \tcode = mpeg3slice_showbits9(slice_buffer) - 0x1f0;\n    \tsize = mpeg3_DClumtab1[code].val;\n    \tmpeg3slice_flushbits(slice_buffer, mpeg3_DClumtab1[code].len);\n\t}\n\n\tif(size == 0) val = 0;\n\telse \n\t{\n    \tval = mpeg3slice_getbits(slice_buffer, size);\n    \tif((val & (1 << (size - 1))) == 0)  val -= (1 << size) - 1;\n\t}\n\n\treturn val;\n}\n\n\nint mpeg3video_getdcchrom(mpeg3_slice_buffer_t *slice_buffer)\n{\n\tint code, size, val;\n\n/* decode length */\n\tcode = mpeg3slice_showbits5(slice_buffer);\n\n\tif(code < 31)\n\t{\n    \tsize = mpeg3_DCchromtab0[code].val;\n    \tmpeg3slice_flushbits(slice_buffer, mpeg3_DCchromtab0[code].len);\n\t}\n\telse \n\t{\n    \tcode = mpeg3slice_showbits(slice_buffer, 10) - 0x3e0;\n    \tsize = mpeg3_DCchromtab1[code].val;\n    \tmpeg3slice_flushbits(slice_buffer, mpeg3_DCchromtab1[code].len);\n\t}\n\n\tif(size == 0) val = 0;\n\telse \n\t{\n      val = mpeg3slice_getbits(slice_buffer, size);\n      if((val & (1 << (size - 1))) == 0) val -= (1 << size) - 1;\n\t}\n\n\treturn val;\n}\n\n\n/* decode one intra coded MPEG-1 block */\n\nint mpeg3video_getintrablock(mpeg3_slice_t *slice, \n\t\tmpeg3video_t *video,\n\t\tint comp, \n\t\tint dc_dct_pred[])\n{\n\tint val, i, j=0, sign;\n\tunsigned int code;\n\tmpeg3_DCTtab_t *tab = 0;\n\tshort *bp = slice->block[comp];\n\tmpeg3_slice_buffer_t *slice_buffer = slice->slice_buffer;\n\n/* decode DC coefficients */\n  \tif(comp < 4)         \n  \t\tbp[0] = (dc_dct_pred[0] += mpeg3video_getdclum(slice_buffer)) << 3;\n  \telse \n  \tif(comp == 4)   \n  \t\tbp[0] = (dc_dct_pred[1] += mpeg3video_getdcchrom(slice_buffer)) << 3;\n\telse                \n  \t\tbp[0] = (dc_dct_pred[2] += mpeg3video_getdcchrom(slice_buffer)) << 3;\n\n#ifdef HAVE_MMX\n\tif(video->have_mmx)\n  \t\tbp[0] <<= 4;\n#endif\n\n  \tif(slice->fault) return 1;\n\n/* decode AC coefficients */\n  \tfor(i = 1; ; i++)\n\t{\n    \tcode = mpeg3slice_showbits16(slice_buffer);\n    \tif(code >= 16384)\n\t\t\ttab = &mpeg3_DCTtabnext[(code >> 12) - 4];\n    \telse \n\t\tif(code >= 1024) tab = &mpeg3_DCTtab0[(code >> 8) - 4];\n    \telse \n\t\tif(code >= 512) tab = &mpeg3_DCTtab1[(code >> 6) - 8];\n    \telse \n\t\tif(code >= 256) tab = &mpeg3_DCTtab2[(code >> 4) - 16];\n    \telse \n\t\tif(code >= 128) tab = &mpeg3_DCTtab3[(code >> 3) - 16];\n    \telse \n\t\tif(code >= 64) tab = &mpeg3_DCTtab4[(code >> 2) - 16];\n    \telse \n\t\tif(code >= 32) tab = &mpeg3_DCTtab5[(code >> 1) - 16];\n    \telse \n\t\tif(code >= 16) tab = &mpeg3_DCTtab6[code - 16];\n    \telse \n\t\t{\n/*    \t  \tfprintf(stderr, \"mpeg3video_getintrablock: invalid Huffman code\\n\"); */\n    \t  \tslice->fault = 1;\n    \t  \treturn;\n    \t}\n\n    \tmpeg3slice_flushbits(slice_buffer, tab->len);\n\n    \tif(tab->run == 64) break;  /* end_of_block */\n\n    \tif(tab->run == 65)\n\t\t{\n/* escape */\n    \t\ti += mpeg3slice_getbits(slice_buffer, 6);\n\n    \t\tif((val = mpeg3slice_getbits(slice_buffer, 8)) == 0) \n\t\t\t\tval = mpeg3slice_getbits(slice_buffer, 8);\n    \t\telse \n\t\t\tif(val == 128)         \n\t\t\t\tval = mpeg3slice_getbits(slice_buffer, 8) - 256;\n    \t\telse \n\t\t\tif(val > 128)          \n\t\t\t\tval -= 256;\n\n    \t\tif((sign = (val < 0)) != 0) val= -val;\n    \t}\n    \telse \n\t\t{\n    \t\ti += tab->run;\n    \t\tval = tab->level;\n    \t\tsign = mpeg3slice_getbit(slice_buffer);\n    \t}\n\n\t\tif(i < 64)\n\t    \tj = video->mpeg3_zigzag_scan_table[i];\n\t\telse\n\t\t{\n    \t  \tslice->fault = 1;\n    \t  \treturn;\n\t\t}\n\t\t\t\n\n#ifdef HAVE_MMX\n\t\tif(video->have_mmx)\n\t\t{\n    \t\tval = (val * slice->quant_scale * video->intra_quantizer_matrix[j]) << 1;\n    \t\tval = (val - 16) | 16;\n\t\t}\n\t\telse\n#endif\n\t\t{\n    \t\tval = (val * slice->quant_scale * video->intra_quantizer_matrix[j]) >> 3;\n    \t\tval = (val - 1) | 1;\n\t\t}\n\n    \tbp[j] = sign ? -val : val;\n\t}\n\n\tif(j != 0) \n\t{\n/* not a sparse matrix ! */\n       slice->sparse[comp] = 0;\n\t}\n\treturn 0;\n}\n\n\n/* decode one non-intra coded MPEG-1 block */\n\nint mpeg3video_getinterblock(mpeg3_slice_t *slice, \n\t\tmpeg3video_t *video, \n\t\tint comp)\n{\n\tint val, i, j=0, sign;\n\tunsigned int code;\n\tmpeg3_DCTtab_t *tab; \n\tshort *bp = slice->block[comp];\n\tmpeg3_slice_buffer_t *slice_buffer = slice->slice_buffer;\n\n/* decode AC coefficients */\n\tfor(i = 0; ; i++)\n\t{\n    \tcode = mpeg3slice_showbits16(slice_buffer);\n    \tif(code >= 16384)\n\t\t{\n    \t    if(i == 0) \n\t\t\t\ttab = &mpeg3_DCTtabfirst[(code >> 12) - 4];\n    \t    else      \n\t\t\t\ttab = &mpeg3_DCTtabnext[(code >> 12) - 4];\n    \t}\n    \telse \n\t\tif(code >= 1024) tab = &mpeg3_DCTtab0[(code >> 8) - 4];\n    \telse \n\t\tif(code >= 512)  tab = &mpeg3_DCTtab1[(code >> 6) - 8];\n    \telse \n\t\tif(code >= 256)  tab = &mpeg3_DCTtab2[(code >> 4) - 16];\n    \telse \n\t\tif(code >= 128)  tab = &mpeg3_DCTtab3[(code >> 3) - 16];\n    \telse \n\t\tif(code >= 64)   tab = &mpeg3_DCTtab4[(code >> 2) - 16];\n    \telse \n\t\tif(code >= 32)   tab = &mpeg3_DCTtab5[(code >> 1) - 16];\n    \telse \n\t\tif(code >= 16)   tab = &mpeg3_DCTtab6[code - 16];\n    \telse \n\t\t{\n// invalid Huffman code\n    \t\tslice->fault = 1;\n    \t\treturn 1;\n    \t}\n\n    \tmpeg3slice_flushbits(slice_buffer, tab->len);\n\n/* end of block */\n    \tif(tab->run == 64)\n    \t   break;   \n\n    \tif(tab->run == 65)\n\t\t{          \n/* escape  */\n    \t\ti += mpeg3slice_getbits(slice_buffer, 6);\n    \t\tif((val = mpeg3slice_getbits(slice_buffer, 8)) == 0) \n\t\t\t\tval = mpeg3slice_getbits(slice_buffer, 8);\n    \t\telse \n\t\t\tif(val == 128)  \n\t\t\t\tval = mpeg3slice_getbits(slice_buffer, 8) - 256;\n    \t\telse \n\t\t\tif(val > 128) \n\t\t\t\tval -= 256;\n\n    \t\tif((sign = (val < 0)) != 0) val = -val;\n    \t}\n    \telse \n\t\t{\n    \t\ti += tab->run;\n    \t\tval = tab->level;\n    \t\tsign = mpeg3slice_getbit(slice_buffer);\n    \t}\n\n    \tj = video->mpeg3_zigzag_scan_table[i];\n\n#ifdef HAVE_MMX\n\t\tif(video->have_mmx)\n\t\t{\n    \t\tval = (((val << 1)+1) * slice->quant_scale * video->non_intra_quantizer_matrix[j]);\n    \t\tval = (val - 16) | 16;\n\t\t}\n\t\telse\n#endif\n\t\t{\n    \t\tval = (((val << 1)+1) * slice->quant_scale * video->non_intra_quantizer_matrix[j]) >> 4;\n    \t\tval = (val - 1) | 1;\n\t\t}\n\n    \tbp[j] = sign ? -val : val;\n\t}\n\n\tif(j != 0) \n\t{\n/* not a sparse matrix ! */\n       slice->sparse[comp] = 0;\n\t}\n\treturn 0;\n}\n\n\n/* decode one intra coded MPEG-2 block */\nint mpeg3video_getmpg2intrablock(mpeg3_slice_t *slice, \n\t\tmpeg3video_t *video, \n\t\tint comp, \n\t\tint dc_dct_pred[])\n{\n\tint val, i, j=0, sign, nc;\n\tunsigned int code;\n\tmpeg3_DCTtab_t *tab;\n\tshort *bp;\n\tint *qmat;\n\tmpeg3_slice_buffer_t *slice_buffer = slice->slice_buffer;\n\n/* with data partitioning, data always goes to base layer */\n  \tbp = slice->block[comp];\n\n  \tqmat = (comp < 4 || video->chroma_format == CHROMA420)\n         ? video->intra_quantizer_matrix\n         : video->chroma_intra_quantizer_matrix;\n\n/* decode DC coefficients */\n\tif(comp < 4)           \n\t\tval = (dc_dct_pred[0] += mpeg3video_getdclum(slice_buffer));\n\telse \n\tif((comp & 1) == 0) \n\t\tval = (dc_dct_pred[1] += mpeg3video_getdcchrom(slice_buffer));\n\telse                  \n\t\tval = (dc_dct_pred[2] += mpeg3video_getdcchrom(slice_buffer));\n\n  \tif(slice->fault) return;\n#ifdef HAVE_MMX\n\tif(video->have_mmx)\n  \t\tbp[0] = val << (7 - video->dc_prec);\n\telse\n#endif\n  \t\tbp[0] = val << (3 - video->dc_prec);\n\n  \tnc = 0;\n\n/* decode AC coefficients */\n  \tfor(i = 1; ; i++)\n\t{\n    \tcode = mpeg3slice_showbits16(slice_buffer);\n\n    \tif(code >= 16384 && !video->intravlc)\n\t\t\ttab = &mpeg3_DCTtabnext[(code >> 12) - 4];\n    \telse \n\t\tif(code >= 1024)\n\t\t{\n    \t\tif(video->intravlc) \n\t\t\t\ttab = &mpeg3_DCTtab0a[(code >> 8) - 4];\n    \t\telse \n\t\t\t\ttab = &mpeg3_DCTtab0[(code >> 8) - 4];\n    \t}\n    \telse \n\t\tif(code >= 512)\n\t\t{\n    \t\tif(video->intravlc)     \n\t\t  \t  \ttab = &mpeg3_DCTtab1a[(code >> 6) - 8];\n    \t\telse              \n\t\t\t\ttab = &mpeg3_DCTtab1[(code >> 6) - 8];\n    \t}\n    \telse \n\t\tif(code >= 256) tab = &mpeg3_DCTtab2[(code >> 4) - 16];\n    \telse \n\t\tif(code >= 128) tab = &mpeg3_DCTtab3[(code >> 3) - 16];\n    \telse \n\t\tif(code >= 64)  tab = &mpeg3_DCTtab4[(code >> 2) - 16];\n    \telse \n\t\tif(code >= 32)  tab = &mpeg3_DCTtab5[(code >> 1) - 16];\n    \telse \n\t\tif(code >= 16)  tab = &mpeg3_DCTtab6[code - 16];\n    \telse \n\t\t{\n/*    \t\tfprintf(stderr,\"mpeg3video_getmpg2intrablock: invalid Huffman code\\n\"); */\n    \t\tslice->fault = 1;\n    \t\treturn 1;\n    \t}\n\n    \tmpeg3slice_flushbits(slice_buffer, tab->len);\n\n/* end_of_block */\n    \tif(tab->run == 64)\n    \t   \tbreak; \n\n    \tif(tab->run == 65)\n\t\t{\n/* escape */\n    \t  \ti += mpeg3slice_getbits(slice_buffer, 6);\n\n    \t  \tval = mpeg3slice_getbits(slice_buffer, 12);\n    \t  \tif((val & 2047) == 0)\n\t\t\t{\n// invalid signed_level (escape)\n        \t\tslice->fault = 1;\n        \t\treturn;\n    \t  \t}\n    \t  \tif((sign = (val >= 2048)) != 0) val = 4096 - val;\n    \t}\n    \telse \n\t\t{\n    \t\ti += tab->run;\n    \t\tval = tab->level;\n    \t\tsign = mpeg3slice_getbit(slice_buffer);\n    \t}\n\n    \tj = (video->altscan ? video->mpeg3_alternate_scan_table : video->mpeg3_zigzag_scan_table)[i];\n\n#ifdef HAVE_MMX\n\t\tif(video->have_mmx)\n\t    \tval = (val * slice->quant_scale * qmat[j]);\n\t\telse\n#endif\n    \t\tval = (val * slice->quant_scale * qmat[j]) >> 4;\n\n    \tbp[j] = sign ? -val : val;\n    \tnc++;\n\t}\n\n\tif(j != 0)\n\t{\n/* not a sparse matrix ! */\n    \t slice->sparse[comp] = 0;\n\t}\n\treturn 1;\n}\n\n\n/* decode one non-intra coded MPEG-2 block */\n\nint mpeg3video_getmpg2interblock(mpeg3_slice_t *slice, \n\t\tmpeg3video_t *video, \n\t\tint comp)\n{\n\tint val, i, j=0, sign, nc;\n\tunsigned int code;\n\tmpeg3_DCTtab_t *tab;\n\tshort *bp;\n\tint *qmat;\n\tmpeg3_slice_buffer_t *slice_buffer = slice->slice_buffer;\n\n/* with data partitioning, data always goes to base layer */\n  \tbp = slice->block[comp];\n\n  \tqmat = (comp < 4 || video->chroma_format == CHROMA420)\n         ? video->non_intra_quantizer_matrix\n         : video->chroma_non_intra_quantizer_matrix;\n\n  \tnc = 0;\n\n/* decode AC coefficients */\n  \tfor(i = 0; ; i++)\n\t{\n    \tcode = mpeg3slice_showbits16(slice_buffer);\n    \tif(code >= 16384)\n\t\t{\n    \t  if(i == 0) tab = &mpeg3_DCTtabfirst[(code >> 12) - 4];\n    \t  else      tab = &mpeg3_DCTtabnext[(code >> 12) - 4];\n    \t}\n    \telse \n\t\tif(code >= 1024) tab = &mpeg3_DCTtab0[(code >> 8) - 4];\n    \telse \n\t\tif(code >= 512)  tab = &mpeg3_DCTtab1[(code >> 6) - 8];\n    \telse \n\t\tif(code >= 256)  tab = &mpeg3_DCTtab2[(code >> 4) - 16];\n    \telse \n\t\tif(code >= 128)  tab = &mpeg3_DCTtab3[(code >> 3) - 16];\n    \telse \n\t\tif(code >= 64)   tab = &mpeg3_DCTtab4[(code >> 2) - 16];\n    \telse \n\t\tif(code >= 32)   tab = &mpeg3_DCTtab5[(code >> 1) - 16];\n    \telse \n\t\tif(code >= 16)   tab = &mpeg3_DCTtab6[code - 16];\n    \telse \n\t\t{\n// invalid Huffman code\n    \t\tslice->fault = 1;\n    \t\treturn;\n    \t}\n\n    \tmpeg3slice_flushbits(slice_buffer, tab->len);\n\n/* end_of_block */\n    \tif(tab->run == 64)\n       \t\tbreak;          \n\n    \tif(tab->run == 65)\n\t\t{                 \n/* escape */\n    \t\ti += mpeg3slice_getbits(slice_buffer, 6);\n    \t\tval = mpeg3slice_getbits(slice_buffer, 12);\n    \t\tif((val & 2047) == 0)\n\t\t\t{\n/*        \t\tfprintf(stderr, \"mpeg3video_getmpg2interblock: invalid signed_level (escape)\\n\"); */\n        \t\tslice->fault = 1;\n        \t\treturn 1;\n    \t\t}\n    \t\tif((sign = (val >= 2048)) != 0) val = 4096 - val;\n    \t}\n    \telse \n\t\t{\n    \t\ti += tab->run;\n    \t\tval = tab->level;\n    \t\tsign = mpeg3slice_getbit(slice_buffer);\n    \t}\n\n    \tj = (video->altscan ? video->mpeg3_alternate_scan_table : video->mpeg3_zigzag_scan_table)[i];\n\n#ifdef HAVE_MMX\n \t\tif(video->have_mmx)\n    \t\tval = (((val << 1)+1) * slice->quant_scale * qmat[j]) >> 1;\n\t\telse\n#endif\n     \t\tval = (((val << 1)+1) * slice->quant_scale * qmat[j]) >> 5;\n\n    \tbp[j] = sign ? (-val) : val ;\n    \tnc++;\n\t}\n\n\tif(j != 0) \n\t{\n      \tslice->sparse[comp] = 0;\n\t}\n\treturn 0;\n}\n\n\n/* decode all macroblocks of the current picture */\nint mpeg3video_get_macroblocks(mpeg3video_t *video, int framenum)\n{\n\tunsigned int code;\n\tmpeg3_slice_buffer_t *slice_buffer; /* Buffer being loaded */\n\tint i;\n\tint current_buffer;\n\tmpeg3_bits_t *vstream = video->vstream;\n\n/* Load every slice into a buffer array */\n\tvideo->total_slice_buffers = 0;\n\tcurrent_buffer = 0;\n\twhile(!mpeg3bits_eof(vstream) && \n\t\tmpeg3bits_showbits32_noptr(vstream) >= MPEG3_SLICE_MIN_START && \n\t\tmpeg3bits_showbits32_noptr(vstream) <= MPEG3_SLICE_MAX_START)\n\t{\n/* Initialize the buffer */\n\t\tif(current_buffer >= video->slice_buffers_initialized)\n\t\t\tmpeg3_new_slice_buffer(&(video->slice_buffers[video->slice_buffers_initialized++]));\n\t\tslice_buffer = &(video->slice_buffers[current_buffer]);\n\t\tslice_buffer->buffer_size = 0;\n\t\tslice_buffer->current_position = 0;\n\t\tslice_buffer->bits_size = 0;\n\t\tslice_buffer->done = 0;\n\n/* Read the slice into the buffer including the slice start code */\n\t\tdo\n\t\t{\n/* Expand buffer */\n\t\t\tif(slice_buffer->buffer_allocation <= slice_buffer->buffer_size)\n\t\t\t\tmpeg3_expand_slice_buffer(slice_buffer);\n\n/* Load 1 char into buffer */\n\t\t\tslice_buffer->data[slice_buffer->buffer_size++] = mpeg3bits_getbyte_noptr(vstream);\n\t\t}while(!mpeg3bits_eof(vstream) &&\n\t\t\tmpeg3bits_showbits24_noptr(vstream) != MPEG3_PACKET_START_CODE_PREFIX);\n\n/* Pad the buffer to get the last macroblock */\n\t\tif(slice_buffer->buffer_allocation <= slice_buffer->buffer_size + 4)\n\t\t\tmpeg3_expand_slice_buffer(slice_buffer);\n\n\t\tslice_buffer->data[slice_buffer->buffer_size++] = 0;\n\t\tslice_buffer->data[slice_buffer->buffer_size++] = 0;\n\t\tslice_buffer->data[slice_buffer->buffer_size++] = 1;\n\t\tslice_buffer->data[slice_buffer->buffer_size++] = 0;\n\t\tslice_buffer->bits_size = 0;\n\n#ifdef USE_PTHREADS\n        pthread_mutex_lock(&(slice_buffer->completion_lock)); \n#endif\t\n\t\tfflush(stdout);\n\t\tcurrent_buffer++;\n\t\tvideo->total_slice_buffers++;\n\t}\n\n/* Run the slice decoders */\n\tif(video->total_slice_buffers > 0)\n\t{\n\t\tfor(i = 0; i < video->total_slice_decoders; i++)\n\t\t{\n\t\t\tif(i == 0 && video->total_slice_decoders > 1)\n\t\t\t{\n\t\t\t\tvideo->slice_decoders[i].current_buffer = 0;\n\t\t\t\tvideo->slice_decoders[i].buffer_step = 1;\n\t\t\t\tvideo->slice_decoders[i].last_buffer = (video->total_slice_buffers - 1);\n\t\t\t}\n\t\t\telse\n\t\t\tif(i == 1)\n\t\t\t{\n\t\t\t\tvideo->slice_decoders[i].current_buffer = video->total_slice_buffers - 1;\n\t\t\t\tvideo->slice_decoders[i].buffer_step = -1;\n\t\t\t\tvideo->slice_decoders[i].last_buffer = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvideo->slice_decoders[i].current_buffer = i;\n\t\t\t\tvideo->slice_decoders[i].buffer_step = 1;\n\t\t\t\tvideo->slice_decoders[i].last_buffer = video->total_slice_buffers - 1;\n\t\t\t}\n#ifdef USE_PTHREADS\n\t\t\tpthread_mutex_unlock(&(video->slice_decoders[i].input_lock));\n#endif\n   \t\t}\n\t}\n\n/* Wait for the slice decoders to finish */\n\tif(video->total_slice_buffers > 0)\n\t{\n#ifdef USE_PTHREADS\n\t\tfor(i = 0; i < video->total_slice_buffers; i++)\n\t\t{\n\t\t\tpthread_mutex_lock(&(video->slice_buffers[i].completion_lock));\n\t\t\tpthread_mutex_unlock(&(video->slice_buffers[i].completion_lock));\n#else\n\t\tfor(i = 0; i < video->total_slice_decoders; i++)\n\t\t{\n\t\t\tmpeg3_slice_loop(&video->slice_decoders[i]);\n#endif\n\t\t}\n\t}\n\treturn 0;\n}\n\nint mpeg3video_allocate_decoders(mpeg3video_t *video, int decoder_count)\n{\n\tint i;\n\tmpeg3_t *file = (mpeg3_t *) video->file;\n/* Get the slice decoders */\n\tif(video->total_slice_decoders != file->cpus)\n\t{\n\t\tfor(i = 0; i < video->total_slice_decoders; i++)\n\t\t{\n\t\t\tmpeg3_delete_slice_decoder(video->slice_decoders[i]);\n\t\t}\n\n\t\tfor(i = 0; i < file->cpus && i < MPEG3_MAX_CPUS; i++)\n\t\t{\n\t\t\tmpeg3_new_slice_decoder(video, &(video->slice_decoders[i]));\n\t\t\tvideo->slice_decoders[i].thread_number = i;\n\t\t}\n\n\t\tvideo->total_slice_decoders = file->cpus;\n\t}\n\treturn 0;\n}\n\n/* decode one frame or field picture */\n\nint mpeg3video_getpicture(mpeg3video_t *video, int framenum)\n{\n\tint i, result = 0;\n\tmpeg3_t *file = (mpeg3_t *) video->file;\n\n\tif(video->pict_struct == FRAME_PICTURE && video->secondfield)\n\t{\n/* recover from illegal number of field pictures */\n    \tvideo->secondfield = 0;\n\t}\n\n\tif(!video->mpeg2)\n\t{\n\t\tvideo->current_repeat = video->repeat_count = 0;\n\t}\n\n\tmpeg3video_allocate_decoders(video, file->cpus);\n\n  \tfor(i = 0; i < 3; i++)\n\t{\n    \tif(video->pict_type == B_TYPE)\n\t\t{\n\t\t\tvideo->newframe[i] = video->auxframe[i];\n\t\t}\n    \telse \n\t\t{\n    \t  \tif(!video->secondfield && !video->current_repeat)\n\t\t\t{\n/* Swap refframes for I frames */\n        \t\tunsigned char* tmp = video->oldrefframe[i];\n        \t\tvideo->oldrefframe[i] = video->refframe[i];\n        \t\tvideo->refframe[i] = tmp;\n    \t  \t}\n\n    \t \tvideo->newframe[i] = video->refframe[i];\n    \t}\n\n    \tif(video->pict_struct == BOTTOM_FIELD)\n\t\t{\n/* Only used if fields are in different pictures */\n    \t    video->newframe[i] += (i == 0) ? video->coded_picture_width : video->chrom_width;\n\t\t}\n\t}\n\n/* The problem is when a B frame lands on the first repeat and is skipped, */\n/* the second repeat goes for the same bitmap as the skipped repeat, */\n/* so it picks up a frame from 3 frames back. */\n/* The first repeat must consititutively read a B frame if its B frame is going to be */\n/* used in a later repeat. */\n\tif(!video->current_repeat)\n\t\tif(!(video->skip_bframes && video->pict_type == B_TYPE) || \n\t\t\t(video->repeat_count >= 100 + 100 * video->skip_bframes))\n  \t\t\tresult = mpeg3video_get_macroblocks(video, framenum);\n\n/* Set the frame to display */\n\tvideo->output_src = 0;\n\tif(framenum > -1 && !result)\n\t{\n    \tif(video->pict_struct == FRAME_PICTURE || video->secondfield)\n\t\t{\n     \t  \tif(video->pict_type == B_TYPE)\n\t\t\t{\n\t\t\t\tvideo->output_src = video->auxframe;\n\t\t\t}\n     \t  \telse\n\t\t\t{\n\t\t\t\tvideo->output_src = video->oldrefframe;\n\t\t\t}\n    \t}\n    \telse \n\t\t{\n\t\t\tmpeg3video_display_second_field(video);\n\t\t}\n\t}\n\n\tif(video->mpeg2)\n\t{\n\t\tvideo->current_repeat += 100;\n\t}\n\n  \tif(video->pict_struct != FRAME_PICTURE) video->secondfield = !video->secondfield;\n\treturn result;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/video/headers.c",
    "content": "/* \n *\n *  This file is part of libmpeg3\n *\t\n * LibMPEG3\n * Author: Adam Williams <broadcast@earthling.net>\n * Page: heroine.linuxbox.com\n * Page: http://www.smalltalkconsulting.com/html/mpeg3source.html (for Squeak)\n *\n    LibMPEG3 was originally licenced under GPL. It was relicensed by\n    the author under the LGPL and the Squeak license on Nov 1st, 2000\n    \n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA \n    \n    Also licensed under the Squeak license.\n    http://www.squeak.org/license.html\n */\n /*  Changed Sept 15th by John M McIntosh to support Macintosh & Squeak\n */\n#include \"mpeg3demux.h\"\n#include \"mpeg3private.h\"\n#include \"mpeg3video.h\"\n\n#include <stdio.h>\n#include <stdlib.h>\n\nint mpeg3video_getseqhdr(mpeg3video_t *video)\n{\n\tint i;\n\tmpeg3_t *file = (mpeg3_t *) video->file;\n\n\tint aspect_ratio, picture_rate, vbv_buffer_size;\n\tint constrained_parameters_flag;\n\tint load_intra_quantizer_matrix, load_non_intra_quantizer_matrix;\n\n\tvideo->horizontal_size = mpeg3bits_getbits(video->vstream, 12);\n\tvideo->vertical_size = mpeg3bits_getbits(video->vstream, 12);\n\taspect_ratio = mpeg3bits_getbits(video->vstream, 4);\n\tvideo->framerate_code = mpeg3bits_getbits(video->vstream, 4);\n\tvideo->bitrate = mpeg3bits_getbits(video->vstream, 18);\n\tmpeg3bits_getbit_noptr(video->vstream); /* marker bit (=1) */\n\tvbv_buffer_size = mpeg3bits_getbits(video->vstream, 10);\n\tconstrained_parameters_flag = mpeg3bits_getbit_noptr(video->vstream);\n\tvideo->frame_rate = mpeg3_frame_rate_table[video->framerate_code];\n\n \tload_intra_quantizer_matrix = mpeg3bits_getbit_noptr(video->vstream);\n \tif(load_intra_quantizer_matrix)\n\t{\n    \tfor(i = 0; i < 64; i++)\n      \t\tvideo->intra_quantizer_matrix[video->mpeg3_zigzag_scan_table[i]] = mpeg3bits_getbyte_noptr(video->vstream);\n  \t}\n  \telse \n\t{\n    \tfor(i = 0; i < 64; i++)\n      \t\tvideo->intra_quantizer_matrix[i] = mpeg3_default_intra_quantizer_matrix[i];\n  \t}\n\n\tload_non_intra_quantizer_matrix = mpeg3bits_getbit_noptr(video->vstream);\n\tif(load_non_intra_quantizer_matrix)\n\t{\n    \tfor(i = 0; i < 64; i++)\n      \t\tvideo->non_intra_quantizer_matrix[video->mpeg3_zigzag_scan_table[i]] = mpeg3bits_getbyte_noptr(video->vstream);\n  \t}\n  \telse \n\t{\n    \tfor(i = 0; i < 64; i++)\n      \t\tvideo->non_intra_quantizer_matrix[i] = 16;\n  \t}\n\n/* copy luminance to chrominance matrices */\n  \tfor(i = 0; i < 64; i++)\n\t{\n    \tvideo->chroma_intra_quantizer_matrix[i] = video->intra_quantizer_matrix[i];\n   \t \tvideo->chroma_non_intra_quantizer_matrix[i] = video->non_intra_quantizer_matrix[i];\n  \t}\n\n\treturn 0;\n}\n\n\n/* decode sequence extension */\n\nint mpeg3video_sequence_extension(mpeg3video_t *video)\n{\n\tint prof_lev;\n\tint horizontal_size_extension, vertical_size_extension;\n\tint bit_rate_extension, vbv_buffer_size_extension, low_delay;\n\tint frame_rate_extension_n, frame_rate_extension_d;\n\tint pos = 0;\n\n\tvideo->mpeg2 = 1;\n\tvideo->scalable_mode = SC_NONE; /* unless overwritten by seq. scal. ext. */\n\tprof_lev = mpeg3bits_getbyte_noptr(video->vstream);\n\tvideo->prog_seq = mpeg3bits_getbit_noptr(video->vstream);\n\tvideo->chroma_format = mpeg3bits_getbits(video->vstream, 2);\n\thorizontal_size_extension = mpeg3bits_getbits(video->vstream, 2);\n\tvertical_size_extension = mpeg3bits_getbits(video->vstream, 2);\n\tbit_rate_extension = mpeg3bits_getbits(video->vstream, 12);\n\tmpeg3bits_getbit_noptr(video->vstream);\n\tvbv_buffer_size_extension = mpeg3bits_getbyte_noptr(video->vstream);\n\tlow_delay = mpeg3bits_getbit_noptr(video->vstream);\n\tframe_rate_extension_n = mpeg3bits_getbits(video->vstream, 2);\n\tframe_rate_extension_d = mpeg3bits_getbits(video->vstream, 5);\n\tvideo->horizontal_size = (horizontal_size_extension << 12) | (video->horizontal_size & 0x0fff);\n\tvideo->vertical_size = (vertical_size_extension << 12) | (video->vertical_size & 0x0fff);\n}\n\n\n/* decode sequence display extension */\n\nint mpeg3video_sequence_display_extension(mpeg3video_t *video)\n{\n\tint colour_primaries = 0, transfer_characteristics = 0;\n\tint display_horizontal_size, display_vertical_size;\n\tint pos = 0;\n\tint video_format = mpeg3bits_getbits(video->vstream, 3);\n\tint colour_description = mpeg3bits_getbit_noptr(video->vstream);\n\n\tif(colour_description)\n\t{\n    \tcolour_primaries = mpeg3bits_getbyte_noptr(video->vstream);\n    \ttransfer_characteristics = mpeg3bits_getbyte_noptr(video->vstream);\n    \tvideo->matrix_coefficients = mpeg3bits_getbyte_noptr(video->vstream);\n\t}\n\n\tdisplay_horizontal_size = mpeg3bits_getbits(video->vstream, 14);\n\tmpeg3bits_getbit_noptr(video->vstream);\n\tdisplay_vertical_size = mpeg3bits_getbits(video->vstream, 14);\n}\n\n\n/* decode quant matrix entension */\n\nint mpeg3video_quant_matrix_extension(mpeg3video_t *video)\n{\n\tint i;\n\tint load_intra_quantiser_matrix, load_non_intra_quantiser_matrix;\n\tint load_chroma_intra_quantiser_matrix;\n\tint load_chroma_non_intra_quantiser_matrix;\n\tint pos = 0;\n\n\tif((load_intra_quantiser_matrix = mpeg3bits_getbit_noptr(video->vstream)) != 0)\n\t{\n      \tfor(i = 0; i < 64; i++)\n\t\t{\n    \t\tvideo->chroma_intra_quantizer_matrix[video->mpeg3_zigzag_scan_table[i]]\n    \t\t\t= video->intra_quantizer_matrix[video->mpeg3_zigzag_scan_table[i]]\n    \t\t\t= mpeg3bits_getbyte_noptr(video->vstream);\n      \t}\n\t}\n\n\tif((load_non_intra_quantiser_matrix = mpeg3bits_getbit_noptr(video->vstream)) != 0)\n\t{\n    \tfor (i = 0; i < 64; i++)\n\t\t{\n    \t\tvideo->chroma_non_intra_quantizer_matrix[video->mpeg3_zigzag_scan_table[i]]\n    \t\t\t= video->non_intra_quantizer_matrix[video->mpeg3_zigzag_scan_table[i]]\n    \t\t\t= mpeg3bits_getbyte_noptr(video->vstream);\n    \t}\n\t}\n\n\tif((load_chroma_intra_quantiser_matrix = mpeg3bits_getbit_noptr(video->vstream)) != 0)\n\t{\n    \tfor(i = 0; i < 64; i++)\n    \t\tvideo->chroma_intra_quantizer_matrix[video->mpeg3_zigzag_scan_table[i]] = mpeg3bits_getbyte_noptr(video->vstream);\n\t}\n\n\tif((load_chroma_non_intra_quantiser_matrix = mpeg3bits_getbit_noptr(video->vstream)) != 0)\n\t{\n      \tfor(i = 0; i < 64; i++)\n    \t\tvideo->chroma_non_intra_quantizer_matrix[video->mpeg3_zigzag_scan_table[i]] = mpeg3bits_getbyte_noptr(video->vstream);\n\t}\n}\n\n\n/* decode sequence scalable extension */\n\nint mpeg3video_sequence_scalable_extension(mpeg3video_t *video)\n{\n\tint layer_id;\n\n\tvideo->scalable_mode = mpeg3bits_getbits(video->vstream, 2) + 1; /* add 1 to make SC_DP != SC_NONE */\n\tlayer_id = mpeg3bits_getbits(video->vstream, 4);\n\n\tif(video->scalable_mode == SC_SPAT)\n\t{\n    \tvideo->llw = mpeg3bits_getbits(video->vstream, 14); /* lower_layer_prediction_horizontal_size */\n    \tmpeg3bits_getbit_noptr(video->vstream);\n    \tvideo->llh = mpeg3bits_getbits(video->vstream, 14); /* lower_layer_prediction_vertical_size */\n    \tvideo->hm = mpeg3bits_getbits(video->vstream, 5);\n    \tvideo->hn = mpeg3bits_getbits(video->vstream, 5);\n    \tvideo->vm = mpeg3bits_getbits(video->vstream, 5);\n    \tvideo->vn = mpeg3bits_getbits(video->vstream, 5);\n\t}\n\n\tif(video->scalable_mode == SC_TEMP)\n      \tfprintf(stderr, \"mpeg3video_sequence_scalable_extension: temporal scalability not implemented\\n\");\n}\n\n\n/* decode picture display extension */\n\nint mpeg3video_picture_display_extension(mpeg3video_t *video)\n{\n\tint n, i;\n\tshort frame_centre_horizontal_offset[3];\n\tshort frame_centre_vertical_offset[3];\n\n\tif(video->prog_seq || video->pict_struct != FRAME_PICTURE)\n\t\tn = 1;\n\telse \n\t\tn = video->repeatfirst ? 3 : 2;\n\n\tfor(i = 0; i < n; i++)\n\t{\n    \tframe_centre_horizontal_offset[i] = (short)mpeg3bits_getbits(video->vstream, 16);\n    \tmpeg3bits_getbit_noptr(video->vstream);\n    \tframe_centre_vertical_offset[i] = (short)mpeg3bits_getbits(video->vstream, 16);\n    \tmpeg3bits_getbit_noptr(video->vstream);\n\t}\n}\n\n\n/* decode picture coding extension */\n\nint mpeg3video_picture_coding_extension(mpeg3video_t *video)\n{\n\tint chroma_420_type, composite_display_flag;\n\tint v_axis = 0, field_sequence = 0, sub_carrier = 0, burst_amplitude = 0, sub_carrier_phase = 0;\n\n\tvideo->h_forw_r_size = mpeg3bits_getbits(video->vstream, 4) - 1;\n\tvideo->v_forw_r_size = mpeg3bits_getbits(video->vstream, 4) - 1;\n\tvideo->h_back_r_size = mpeg3bits_getbits(video->vstream, 4) - 1;\n\tvideo->v_back_r_size = mpeg3bits_getbits(video->vstream, 4) - 1;\n\tvideo->dc_prec = mpeg3bits_getbits(video->vstream, 2);\n\tvideo->pict_struct = mpeg3bits_getbits(video->vstream, 2);\n\tvideo->topfirst = mpeg3bits_getbit_noptr(video->vstream);\n\tvideo->frame_pred_dct = mpeg3bits_getbit_noptr(video->vstream);\n\tvideo->conceal_mv = mpeg3bits_getbit_noptr(video->vstream);\n\tvideo->qscale_type = mpeg3bits_getbit_noptr(video->vstream);\n\tvideo->intravlc = mpeg3bits_getbit_noptr(video->vstream);\n\tvideo->altscan = mpeg3bits_getbit_noptr(video->vstream);\n\tvideo->repeatfirst = mpeg3bits_getbit_noptr(video->vstream);\n\tchroma_420_type = mpeg3bits_getbit_noptr(video->vstream);\n\tvideo->prog_frame = mpeg3bits_getbit_noptr(video->vstream);\n\n\tif(video->repeat_count > 100)\n\t\tvideo->repeat_count = 0;\n\tvideo->repeat_count += 100;\n\n\tvideo->current_repeat = 0;\n\n\tif(video->prog_seq)\n\t{\n\t\tif(video->repeatfirst)\n\t\t{\n\t\t\tif(video->topfirst)\n\t\t\t\tvideo->repeat_count += 200;\n\t\t\telse\n\t\t\t\tvideo->repeat_count += 100;\n\t\t}\n\t}\n\telse\n\tif(video->prog_frame)\n\t{\n\t\tif(video->repeatfirst)\n\t\t{\n\t\t\tvideo->repeat_count += 50;\n\t\t}\n\t}\n\n/*printf(\"mpeg3video_picture_coding_extension %d\\n\", video->repeat_count); */\n\tcomposite_display_flag = mpeg3bits_getbit_noptr(video->vstream);\n\n\tif(composite_display_flag)\n\t{\n    \tv_axis = mpeg3bits_getbit_noptr(video->vstream);\n    \tfield_sequence = mpeg3bits_getbits(video->vstream, 3);\n    \tsub_carrier = mpeg3bits_getbit_noptr(video->vstream);\n    \tburst_amplitude = mpeg3bits_getbits(video->vstream, 7);\n    \tsub_carrier_phase = mpeg3bits_getbyte_noptr(video->vstream);\n\t}\n}\n\n\n/* decode picture spatial scalable extension */\n\nint mpeg3video_picture_spatial_scalable_extension(mpeg3video_t *video)\n{\n\tvideo->pict_scal = 1; /* use spatial scalability in this picture */\n\n\tvideo->lltempref = mpeg3bits_getbits(video->vstream, 10);\n\tmpeg3bits_getbit_noptr(video->vstream);\n\tvideo->llx0 = mpeg3bits_getbits(video->vstream, 15);\n\tif(video->llx0 >= 16384) video->llx0 -= 32768;\n\tmpeg3bits_getbit_noptr(video->vstream);\n\tvideo->lly0 = mpeg3bits_getbits(video->vstream, 15);\n\tif(video->lly0 >= 16384) video->lly0 -= 32768;\n\tvideo->stwc_table_index = mpeg3bits_getbits(video->vstream, 2);\n\tvideo->llprog_frame = mpeg3bits_getbit_noptr(video->vstream);\n\tvideo->llfieldsel = mpeg3bits_getbit_noptr(video->vstream);\n}\n\n\n/* decode picture temporal scalable extension\n *\n * not implemented\n *\n */\n\nint mpeg3video_picture_temporal_scalable_extension(mpeg3video_t *video)\n{\n  \tfprintf(stderr, \"mpeg3video_picture_temporal_scalable_extension: temporal scalability not supported\\n\");\n}\n\n\n/* decode extension and user data */\n\nint mpeg3video_ext_user_data(mpeg3video_t *video)\n{\n  \tint code = mpeg3bits_next_startcode(video->vstream);\n\n\n  \twhile(code == MPEG3_EXT_START_CODE || code == MPEG3_USER_START_CODE &&\n\t\t!mpeg3bits_eof(video->vstream))\n\t{\n    \tmpeg3bits_refill(video->vstream);\n\t\t\n    \tif(code == MPEG3_EXT_START_CODE)\n\t\t{\n      \t\tint ext_id = mpeg3bits_getbits(video->vstream, 4);\n      \t\tswitch(ext_id)\n\t\t\t{\n    \t\t\tcase SEQ_ID:\n\t\t\t\t\tmpeg3video_sequence_extension(video);\n\t\t\t\t\tbreak;\n    \t\t\tcase DISP_ID:\n\t\t\t\t\tmpeg3video_sequence_display_extension(video);\n\t\t\t\t\tbreak;\n    \t\t\tcase QUANT_ID:\n\t\t\t\t\tmpeg3video_quant_matrix_extension(video);\n\t\t\t\t\tbreak;\n    \t\t\tcase SEQSCAL_ID:\n\t\t\t\t\tmpeg3video_sequence_scalable_extension(video);\n\t\t\t\t\tbreak;\n    \t\t\tcase PANSCAN_ID:\n\t\t\t\t\tmpeg3video_picture_display_extension(video);\n\t\t\t\t\tbreak;\n    \t\t\tcase CODING_ID:\n\t\t\t\t\tmpeg3video_picture_coding_extension(video);\n\t\t\t\t\tbreak;\n    \t\t\tcase SPATSCAL_ID:\n\t\t\t\t\tmpeg3video_picture_spatial_scalable_extension(video);\n\t\t\t\t\tbreak;\n    \t\t\tcase TEMPSCAL_ID:\n\t\t\t\t\tmpeg3video_picture_temporal_scalable_extension(video);\n\t\t\t\t\tbreak;\n    \t\t\tdefault:\n\t\t\t\t\tfprintf(stderr,\"mpeg3video_ext_user_data: reserved extension start code ID %d\\n\", ext_id);\n\t\t\t\t\tbreak;\n      \t\t}\n   \t\t}\n   \t\tcode = mpeg3bits_next_startcode(video->vstream);\n  \t}\n}\n\n\n/* decode group of pictures header */\n\nint mpeg3video_getgophdr(mpeg3video_t *video)\n{\n\tint drop_flag, closed_gop, broken_link;\n\n\tdrop_flag = mpeg3bits_getbit_noptr(video->vstream);\n\tvideo->gop_timecode.hour = mpeg3bits_getbits(video->vstream, 5);\n\tvideo->gop_timecode.minute = mpeg3bits_getbits(video->vstream, 6);\n\tmpeg3bits_getbit_noptr(video->vstream);\n\tvideo->gop_timecode.second = mpeg3bits_getbits(video->vstream, 6);\n\tvideo->gop_timecode.frame = mpeg3bits_getbits(video->vstream, 6);\n\tclosed_gop = mpeg3bits_getbit_noptr(video->vstream);\n\tbroken_link = mpeg3bits_getbit_noptr(video->vstream);\n\n/*\n * printf(\"%d:%d:%d:%d %d %d %d\\n\", video->gop_timecode.hour, video->gop_timecode.minute, video->gop_timecode.second, video->gop_timecode.frame, \n *  \tdrop_flag, closed_gop, broken_link);\n */\n\treturn mpeg3bits_error(video->vstream);\n}\n\n/* decode picture header */\n\nint mpeg3video_getpicturehdr(mpeg3video_t *video)\n{\n\tint temp_ref, vbv_delay;\n\n\tvideo->pict_scal = 0; /* unless overwritten by pict. spat. scal. ext. */\n\n\ttemp_ref = mpeg3bits_getbits(video->vstream, 10);\n\tvideo->pict_type = mpeg3bits_getbits(video->vstream, 3);\n\tvbv_delay = mpeg3bits_getbits(video->vstream, 16);\n\n\tif(video->pict_type == P_TYPE || video->pict_type == B_TYPE)\n\t{\n    \tvideo->full_forw = mpeg3bits_getbit_noptr(video->vstream);\n    \tvideo->forw_r_size = mpeg3bits_getbits(video->vstream, 3) - 1;\n\t}\n\n\tif(video->pict_type == B_TYPE)\n\t{\n    \tvideo->full_back = mpeg3bits_getbit_noptr(video->vstream);\n    \tvideo->back_r_size = mpeg3bits_getbits(video->vstream, 3) - 1;\n\t}\n\n/* get extra bit picture */\n\twhile(mpeg3bits_getbit_noptr(video->vstream) &&\n\t\t!mpeg3bits_eof(video->vstream)) mpeg3bits_getbyte_noptr(video->vstream);\n\treturn 0;\n}\n\n\nint mpeg3video_get_header(mpeg3video_t *video, int dont_repeat)\n{\n\tunsigned int code;\n\n/* a sequence header should be found before returning from `getheader' the */\n/* first time (this is to set horizontal/vertical size properly) */\n\n/* Repeat the frame until it's less than 1 count from repeat_count */\n\tif(video->repeat_count - video->current_repeat >= 100 && !dont_repeat)\n\t{\n\t\treturn 0;\n\t}\n\n\tif(dont_repeat)\n\t{\n\t\tvideo->repeat_count = 0;\n\t\tvideo->current_repeat = 0;\n\t}\n\telse\n\t\tvideo->repeat_count -= video->current_repeat;\n\n\twhile(1)\n\t{\n/* look for startcode */\n    \tcode = mpeg3bits_next_startcode(video->vstream);\n\t\tif(mpeg3bits_eof(video->vstream)) return 1;\n\t\tif(code != MPEG3_SEQUENCE_END_CODE) mpeg3bits_refill(video->vstream);\n \n    \tswitch(code)\n\t\t{\n    \t\tcase MPEG3_SEQUENCE_START_CODE:\n    \t\t\tvideo->found_seqhdr = 1;\n    \t\t\tmpeg3video_getseqhdr(video);  \n    \t\t\tmpeg3video_ext_user_data(video);\n    \t\t\tbreak;\n\n    \t\tcase MPEG3_GOP_START_CODE:\n    \t\t\tmpeg3video_getgophdr(video);\n    \t\t\tmpeg3video_ext_user_data(video);\n    \t\t\tbreak;\n\n    \t\tcase MPEG3_PICTURE_START_CODE:\n    \t\t\tmpeg3video_getpicturehdr(video);\n    \t\t\tmpeg3video_ext_user_data(video);\n    \t\t\tif(video->found_seqhdr) return 0;       /* Exit here */\n    \t\t\tbreak;\n\n    \t\tcase MPEG3_SEQUENCE_END_CODE:\n// Continue until the end\n\t\t\t\tmpeg3bits_refill(video->vstream);\n\t\t\t\tbreak;\n\n    \t\tdefault:\n    \t\t\tbreak;\n    \t}\n  \t}\n \treturn 1;      /* Shouldn't be reached. */\n}\n\nint mpeg3video_ext_bit_info(mpeg3_slice_buffer_t *slice_buffer)\n{\n\twhile(mpeg3slice_getbit(slice_buffer)) mpeg3slice_getbyte(slice_buffer);\n\treturn 0;\n}\n\n/* decode slice header */\nint mpeg3video_getslicehdr(mpeg3_slice_t *slice, mpeg3video_t *video)\n{\n\tint slice_vertical_position_extension, intra_slice;\n\tint qs;\n\n  \tslice_vertical_position_extension = (video->mpeg2 && video->vertical_size > 2800) ? \n\t\tmpeg3slice_getbits(slice->slice_buffer, 3) : 0;\n\n  \tif(video->scalable_mode == SC_DP) slice->pri_brk = mpeg3slice_getbits(slice->slice_buffer, 7);\n\n  \tqs = mpeg3slice_getbits(slice->slice_buffer, 5);\n  \tslice->quant_scale = video->mpeg2 ? (video->qscale_type ? mpeg3_non_linear_mquant_table[qs] : (qs << 1)) : qs;\n\n  \tif(mpeg3slice_getbit(slice->slice_buffer))\n\t{\n    \tintra_slice = mpeg3slice_getbit(slice->slice_buffer);\n    \tmpeg3slice_getbits(slice->slice_buffer, 7);\n    \tmpeg3video_ext_bit_info(slice->slice_buffer);\n  \t}\n  \telse \n\t\tintra_slice = 0;\n\n\treturn slice_vertical_position_extension;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/video/idct.c",
    "content": "/* \n *\n *  This file is part of libmpeg3\n *\t\n * LibMPEG3\n * Author: Adam Williams <broadcast@earthling.net>\n * Page: heroine.linuxbox.com\n * Page: http://www.smalltalkconsulting.com/html/mpeg3source.html (for Squeak)\n *\n    LibMPEG3 was originally licenced under GPL. It was relicensed by\n    the author under the LGPL and the Squeak license on Nov 1st, 2000\n    \n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA \n    \n    Also licensed under the Squeak license.\n    http://www.squeak.org/license.html\n */\n  /*  Changed Sept 15th by John M McIntosh to support Macintosh & Squeak\n */\n#include \"idct.h\"\n#include <stdlib.h>\n\n#ifdef _MSC_VER\n/* inline is unrecognized keyword in C mode of MSVC */\n#define inline __inline\n#endif\n\n/**********************************************************/\n/* inverse two dimensional DCT, Chen-Wang algorithm       */\n/* (cf. IEEE ASSP-32, pp. 803-816, Aug. 1984)             */\n/* 32-bit integer arithmetic (8 bit coefficients)         */\n/* 11 mults, 29 adds per DCT                              */\n/*                                      sE, 18.8.91       */\n/**********************************************************/\n/* coefficients extended to 12 bit for IEEE1180-1990      */\n/* compliance                           sE,  2.1.94       */\n/**********************************************************/\n\n/* this code assumes >> to be a two's-complement arithmetic */\n/* right shift: (-2)>>1 == -1 , (-3)>>1 == -2               */\n\n#define W1 2841 /* 2048*sqrt(2)*cos(1*pi/16) */\n#define W2 2676 /* 2048*sqrt(2)*cos(2*pi/16) */\n#define W3 2408 /* 2048*sqrt(2)*cos(3*pi/16) */\n#define W5 1609 /* 2048*sqrt(2)*cos(5*pi/16) */\n#define W6 1108 /* 2048*sqrt(2)*cos(6*pi/16) */\n#define W7 565  /* 2048*sqrt(2)*cos(7*pi/16) */\n\n/* row (horizontal) IDCT\n *\n *           7                       pi         1\n * dst[k] = sum c[l] * src[l] * cos( -- * ( k + - ) * l )\n *          l=0                      8          2\n *\n * where: c[0]    = 128\n *        c[1..7] = 128*sqrt(2)\n */\n\n \ninline \nint mpeg3video_idctrow(short *blk)\n{\n\tint x0, x1, x2, x3, x4, x5, x6, x7, x8;\n\n\t/* shortcut */\n\tif (!((x1 = blk[4]<<11) | (x2 = blk[6]) | (x3 = blk[2]) |\n          (x4 = blk[1]) | (x5 = blk[7]) | (x6 = blk[5]) | (x7 = blk[3])))\n\t{\n      blk[0]=blk[1]=blk[2]=blk[3]=blk[4]=blk[5]=blk[6]=blk[7]=blk[0]<<3;\n      return;\n\t}\n\n\tx0 = (blk[0]<<11) + 128; /* for proper rounding in the fourth stage */\n\n\t/* first stage */\n\tx8 = W7*(x4+x5);\n\tx4 = x8 + (W1-W7)*x4;\n\tx5 = x8 - (W1+W7)*x5;\n\tx8 = W3*(x6+x7);\n\tx6 = x8 - (W3-W5)*x6;\n\tx7 = x8 - (W3+W5)*x7;\n\n\t/* second stage */\n\tx8 = x0 + x1;\n\tx0 -= x1;\n\tx1 = W6*(x3+x2);\n\tx2 = x1 - (W2+W6)*x2;\n\tx3 = x1 + (W2-W6)*x3;\n\tx1 = x4 + x6;\n\tx4 -= x6;\n\tx6 = x5 + x7;\n\tx5 -= x7;\n\n\t/* third stage */\n\tx7 = x8 + x3;\n\tx8 -= x3;\n\tx3 = x0 + x2;\n\tx0 -= x2;\n\tx2 = (181*(x4+x5)+128)>>8;\n\tx4 = (181*(x4-x5)+128)>>8;\n\n\t/* fourth stage */\n\tblk[0] = (x7+x1)>>8;\n\tblk[1] = (x3+x2)>>8;\n\tblk[2] = (x0+x4)>>8;\n\tblk[3] = (x8+x6)>>8;\n\tblk[4] = (x8-x6)>>8;\n\tblk[5] = (x0-x4)>>8;\n\tblk[6] = (x3-x2)>>8;\n\tblk[7] = (x7-x1)>>8;\n}\n\n/* column (vertical) IDCT\n *\n *             7                         pi         1\n * dst[8*k] = sum c[l] * src[8*l] * cos( -- * ( k + - ) * l )\n *            l=0                        8          2\n *\n * where: c[0]    = 1/1024\n *        c[1..7] = (1/1024)*sqrt(2)\n */\n\n\ninline\nint mpeg3video_idctcol(short *blk)\n{\n  int x0, x1, x2, x3, x4, x5, x6, x7, x8;\n\n  /* shortcut */\n  if (!((x1 = (blk[8 * 4]<<8)) | (x2 = blk[8 * 6]) | (x3 = blk[8 * 2]) |\n        (x4 = blk[8*1]) | (x5 = blk[8 * 7]) | (x6 = blk[8 * 5]) | (x7 = blk[8 * 3]))){\n    blk[8*0]=blk[8*1]=blk[8 * 2]=blk[8 * 3]=blk[8 * 4]=blk[8 * 5]=blk[8 * 6]=blk[8 * 7]=\n      (blk[8*0]+32)>>6;\n    return;\n  }\n\n  x0 = (blk[8*0]<<8) + 8192;\n\n  /* first stage */\n  x8 = W7*(x4+x5) + 4;\n  x4 = (x8+(W1-W7)*x4)>>3;\n  x5 = (x8-(W1+W7)*x5)>>3;\n  x8 = W3*(x6+x7) + 4;\n  x6 = (x8-(W3-W5)*x6)>>3;\n  x7 = (x8-(W3+W5)*x7)>>3;\n  \n  /* second stage */\n  x8 = x0 + x1;\n  x0 -= x1;\n  x1 = W6*(x3+x2) + 4;\n  x2 = (x1-(W2+W6)*x2)>>3;\n  x3 = (x1+(W2-W6)*x3)>>3;\n  x1 = x4 + x6;\n  x4 -= x6;\n  x6 = x5 + x7;\n  x5 -= x7;\n  \n  /* third stage */\n  x7 = x8 + x3;\n  x8 -= x3;\n  x3 = x0 + x2;\n  x0 -= x2;\n  x2 = (181 * (x4 + x5) + 128) >> 8;\n  x4 = (181 * (x4 - x5) + 128) >> 8;\n  \n  /* fourth stage */\n  blk[8 * 0] = (x7 + x1) >> 14;\n  blk[8 * 1] = (x3 + x2) >> 14;\n  blk[8 * 2] = (x0 + x4) >> 14;\n  blk[8 * 3] = (x8 + x6) >> 14;\n  blk[8 * 4] = (x8 - x6) >> 14;\n  blk[8 * 5] = (x0 - x4) >> 14;\n  blk[8 * 6] = (x3 - x2) >> 14;\n  blk[8 * 7] = (x7 - x1) >> 14;\n}\n\n\n/* two dimensional inverse discrete cosine transform */\nvoid mpeg3video_idct_conversion(short* block)\n{\n\tint i;\n\tfor(i = 0; i < 8; i++) mpeg3video_idctrow(block + 8 * i);\n\tfor(i = 0; i < 8; i++) mpeg3video_idctcol(block + i);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/video/idct.h",
    "content": "#ifndef IDCT_H\n#define IDCT_H\n\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/video/layerdata.h",
    "content": "#ifndef LAYERDATA_H\n#define LAYERDATA_H\n\ntypedef struct \n{\n/* sequence header */\n\tint intra_quantizer_matrix[64], non_intra_quantizer_matrix[64];\n\tint chroma_intra_quantizer_matrix[64], chroma_non_intra_quantizer_matrix[64];\n\tint mpeg2;\n\tint qscale_type, altscan;      /* picture coding extension */\n\tint pict_scal;                /* picture spatial scalable extension */\n\tint scalable_mode;            /* sequence scalable extension */\n} mpeg3_layerdata_t;\n\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/video/macroblocks.c",
    "content": "/* \n *\n *  This file is part of libmpeg3\n *\t\n * LibMPEG3\n * Author: Adam Williams <broadcast@earthling.net>\n * Page: heroine.linuxbox.com\n * Page: http://www.smalltalkconsulting.com/html/mpeg3source.html (for Squeak)\n *\n    LibMPEG3 was originally licenced under GPL. It was relicensed by\n    the author under the LGPL and the Squeak license on Nov 1st, 2000\n    \n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA \n    \n    Also licensed under the Squeak license.\n    http://www.squeak.org/license.html\n */\n#include \"mpeg3video.h\"\n#include \"slice.h\"\n#include \"vlc.h\"\n\n#include <stdio.h>\n\nint mpeg3video_get_macroblock_address(mpeg3_slice_t *slice)\n{\n\tint code, val = 0;\n\tmpeg3_slice_buffer_t *slice_buffer = slice->slice_buffer;\n\n  \twhile((code = mpeg3slice_showbits(slice_buffer, 11)) < 24)\n\t{\n/* Is not macroblock_stuffing */\n    \tif(code != 15)\n\t\t{     \n/* Is macroblock_escape */\n      \t\tif(code == 8)\n\t\t\t{\n        \t\tval += 33;\n      \t\t}\n      \t\telse \n\t\t\t{\n/*        \t\tfprintf(stderr, \"mpeg3video_get_macroblock_address: invalid macroblock_address_increment code\\n\"); */\n        \t\tslice->fault = 1;\n        \t\treturn 1;\n      \t\t}\n    \t}\n\n    \tmpeg3slice_flushbits(slice_buffer, 11);\n  \t}\n\n  \tif(code >= 1024)\n\t{\n    \tmpeg3slice_flushbit(slice_buffer);\n    \treturn val + 1;\n  \t}\n\n  \tif(code >= 128)\n\t{\n    \tcode >>= 6;\n    \tmpeg3slice_flushbits(slice_buffer, mpeg3_MBAtab1[code].len);\n    \treturn val + mpeg3_MBAtab1[code].val;\n  \t}\n\n  \tcode -= 24;\n  \tmpeg3slice_flushbits(slice_buffer, mpeg3_MBAtab2[code].len);\n\n  \treturn val + mpeg3_MBAtab2[code].val;\n}\n\n/* macroblock_type for pictures with spatial scalability */\n\nstatic inline int mpeg3video_getsp_imb_type(mpeg3_slice_t *slice)\n{\n\tmpeg3_slice_buffer_t *slice_buffer = slice->slice_buffer;\n  \tunsigned int code = mpeg3slice_showbits(slice_buffer, 4);\n\tif(!code)\n\t{\n/*    \tfprintf(stderr,\"mpeg3video_getsp_imb_type: invalid macroblock_type code\\n\"); */\n    \tslice->fault = 1;\n    \treturn 0;\n  \t}\n\n  \tmpeg3slice_flushbits(slice_buffer, mpeg3_spIMBtab[code].len);\n  \treturn mpeg3_spIMBtab[code].val;\n}\n\nstatic inline int mpeg3video_getsp_pmb_type(mpeg3_slice_t *slice)\n{\n\tmpeg3_slice_buffer_t *slice_buffer = slice->slice_buffer;\n  \tint code = mpeg3slice_showbits(slice_buffer, 7);\n\tif(code < 2)\n\t{\n/*    \tfprintf(stderr,\"mpeg3video_getsp_pmb_type: invalid macroblock_type code\\n\"); */\n    \tslice->fault = 1;\n    \treturn 0;\n  \t}\n\n  \tif(code >= 16)\n\t{\n    \tcode >>= 3;\n    \tmpeg3slice_flushbits(slice_buffer, mpeg3_spPMBtab0[code].len);\n\n    \treturn mpeg3_spPMBtab0[code].val;\n  \t}\n\n  \tmpeg3slice_flushbits(slice_buffer, mpeg3_spPMBtab1[code].len);\n  \treturn mpeg3_spPMBtab1[code].val;\n}\n\nstatic inline int mpeg3video_getsp_bmb_type(mpeg3_slice_t *slice)\n{\n  \tmpeg3_VLCtab_t *p;\n\tmpeg3_slice_buffer_t *slice_buffer = slice->slice_buffer;\n  \tint code = mpeg3slice_showbits9(slice_buffer);\n\n  \tif(code >= 64) \n\t\tp = &mpeg3_spBMBtab0[(code >> 5) - 2];\n  \telse \n\tif(code >= 16) \n\t\tp = &mpeg3_spBMBtab1[(code >> 2) - 4];\n  \telse \n\tif(code >= 8)  \n\t\tp = &mpeg3_spBMBtab2[code - 8];\n  \telse \n\t{\n/*    \tfprintf(stderr,\"mpeg3video_getsp_bmb_type: invalid macroblock_type code\\n\"); */\n    \tslice->fault = 1;\n    \treturn 0;\n  \t}\n\n  \tmpeg3slice_flushbits(slice_buffer, p->len);\n  \treturn p->val;\n}\n\nstatic inline int mpeg3video_get_imb_type(mpeg3_slice_t *slice)\n{\n\tmpeg3_slice_buffer_t *slice_buffer = slice->slice_buffer;\n\tif(mpeg3slice_getbit(slice_buffer))\n\t{\n    \treturn 1;\n  \t}\n\n  \tif(!mpeg3slice_getbit(slice_buffer))\n\t{\n/*    \tfprintf(stderr,\"mpeg3video_get_imb_type: invalid macroblock_type code\\n\"); */\n    \tslice->fault = 1;\n  \t}\n\n  \treturn 17;\n}\n\nstatic inline int mpeg3video_get_pmb_type(mpeg3_slice_t *slice)\n{\n  \tint code;\n\tmpeg3_slice_buffer_t *slice_buffer = slice->slice_buffer;\n\n  \tif((code = mpeg3slice_showbits(slice_buffer, 6)) >= 8)\n\t{\n    \tcode >>= 3;\n    \tmpeg3slice_flushbits(slice_buffer, mpeg3_PMBtab0[code].len);\n    \treturn mpeg3_PMBtab0[code].val;\n  \t}\n\n  \tif(code == 0)\n\t{\n/*    \tfprintf(stderr,\"mpeg3video_get_pmb_type: invalid macroblock_type code\\n\"); */\n    \tslice->fault = 1;\n    \treturn 0;\n  \t}\n\n  \tmpeg3slice_flushbits(slice_buffer, mpeg3_PMBtab1[code].len);\n  \treturn mpeg3_PMBtab1[code].val;\n}\n\nstatic inline int mpeg3video_get_bmb_type(mpeg3_slice_t *slice)\n{\n  \tint code;\n\tmpeg3_slice_buffer_t *slice_buffer = slice->slice_buffer;\n\n  \tif((code = mpeg3slice_showbits(slice_buffer, 6)) >= 8)\n\t{\n    \tcode >>= 2;\n    \tmpeg3slice_flushbits(slice_buffer, mpeg3_BMBtab0[code].len);\n    \treturn mpeg3_BMBtab0[code].val;\n  \t}\n\n  \tif(code == 0)\n\t{\n/*    \tfprintf(stderr,\"mpeg3video_get_bmb_type: invalid macroblock_type code\\n\"); */\n    \tslice->fault = 1;\n    \treturn 0;\n  \t}\n\n  \tmpeg3slice_flushbits(slice_buffer, mpeg3_BMBtab1[code].len);\n\n\treturn mpeg3_BMBtab1[code].val;\n}\n\nstatic inline int mpeg3video_get_dmb_type(mpeg3_slice_t *slice)\n{\n  \tif(!mpeg3slice_getbit(slice->slice_buffer))\n\t{\n/*    \tfprintf(stderr,\"mpeg3video_get_dmb_type: invalid macroblock_type code\\n\"); */\n    \tslice->fault=1;\n  \t}\n\n  \treturn 1;\n}\n\n\nstatic inline int mpeg3video_get_snrmb_type(mpeg3_slice_t *slice)\n{\n\tmpeg3_slice_buffer_t *slice_buffer = slice->slice_buffer;\n    int code = mpeg3slice_showbits(slice_buffer, 3);\n\n    if(code == 0)\n    {\n/*      fprintf(stderr,\"mpeg3video_get_snrmb_type: invalid macroblock_type code\\n\"); */\n        slice->fault = 1;\n        return 0;\n    }\n\n    mpeg3slice_flushbits(slice_buffer, mpeg3_SNRMBtab[code].len);\n    return mpeg3_SNRMBtab[code].val;\n}\n\nint mpeg3video_get_mb_type(mpeg3_slice_t *slice, mpeg3video_t *video)\n{\n\tif(video->scalable_mode == SC_SNR)\n\t{\n\t\treturn mpeg3video_get_snrmb_type(slice);\n\t}\n\telse\n\t{\n    \tswitch(video->pict_type)\n\t\t{\n    \t\tcase I_TYPE: return video->pict_scal ? mpeg3video_getsp_imb_type(slice) : mpeg3video_get_imb_type(slice);\n    \t\tcase P_TYPE: return video->pict_scal ? mpeg3video_getsp_pmb_type(slice) : mpeg3video_get_pmb_type(slice);\n    \t\tcase B_TYPE: return video->pict_scal ? mpeg3video_getsp_bmb_type(slice) : mpeg3video_get_bmb_type(slice);\n    \t\tcase D_TYPE: return mpeg3video_get_dmb_type(slice);\n    \t\tdefault: \n\t\t\t\t/*fprintf(stderr, \"mpeg3video_getmbtype: unknown coding type\\n\"); */\n\t\t\t\tbreak;\n/* MPEG-1 only, not implemented */\n\t  \t}\n  \t}\n\n  \treturn 0;\n}\n\nint mpeg3video_macroblock_modes(mpeg3_slice_t *slice, \n\t\tmpeg3video_t *video, \n\t\tint *pmb_type, \n\t\tint *pstwtype, \n\t\tint *pstwclass, \n\t\tint *pmotion_type, \n\t\tint *pmv_count, \n\t\tint *pmv_format, \n\t\tint *pdmv, \n\t\tint *pmvscale,\n\t\tint *pdct_type)\n{\n\tint mb_type;\n\tint stwtype, stwcode, stwclass;\n\tint motion_type = 0, mv_count, mv_format, dmv, mvscale;\n\tint dct_type;\n\tmpeg3_slice_buffer_t *slice_buffer = slice->slice_buffer;\n\tstatic unsigned char stwc_table[3][4]\n    \t= { {6,3,7,4}, {2,1,5,4}, {2,5,7,4} };\n\tstatic unsigned char stwclass_table[9]\n    \t= {0, 1, 2, 1, 1, 2, 3, 3, 4};\n\n/* get macroblock_type */\n  \tmb_type = mpeg3video_get_mb_type(slice, video);\n\n  \tif(slice->fault) return 1;\n\n/* get spatial_temporal_weight_code */\n  \tif(mb_type & MB_WEIGHT)\n  \t{\n    \tif(video->stwc_table_index == 0)\n      \t\tstwtype = 4;\n    \telse\n    \t{\n      \t\tstwcode = mpeg3slice_getbits2(slice_buffer);\n      \t\tstwtype = stwc_table[video->stwc_table_index - 1][stwcode];\n    \t}\n  \t}\n  \telse\n    \tstwtype = (mb_type & MB_CLASS4) ? 8 : 0;\n\n/* derive spatial_temporal_weight_class (Table 7-18) */\n  \tstwclass = stwclass_table[stwtype];\n\n/* get frame/field motion type */\n  \tif(mb_type & (MB_FORWARD | MB_BACKWARD))\n\t{\n    \tif(video->pict_struct == FRAME_PICTURE)\n\t\t{ \n/* frame_motion_type */\n      \t\tmotion_type = video->frame_pred_dct ? MC_FRAME : mpeg3slice_getbits2(slice_buffer);\n    \t}\n    \telse \n\t\t{ \n/* field_motion_type */\n      \t\tmotion_type = mpeg3slice_getbits2(slice_buffer);\n    \t}\n  \t}\n  \telse \n\tif((mb_type & MB_INTRA) && video->conceal_mv)\n  \t{\n/* concealment motion vectors */\n    \tmotion_type = (video->pict_struct == FRAME_PICTURE) ? MC_FRAME : MC_FIELD;\n  \t}\n\n/* derive mv_count, mv_format and dmv, (table 6-17, 6-18) */\n  \tif(video->pict_struct == FRAME_PICTURE)\n  \t{\n    \tmv_count = (motion_type == MC_FIELD && stwclass < 2) ? 2 : 1;\n    \tmv_format = (motion_type == MC_FRAME) ? MV_FRAME : MV_FIELD;\n  \t}\n  \telse\n  \t{\n    \tmv_count = (motion_type == MC_16X8) ? 2 : 1;\n    \tmv_format = MV_FIELD;\n  \t}\n\n  \tdmv = (motion_type == MC_DMV); /* dual prime */\n\n/* field mv predictions in frame pictures have to be scaled */\n  \tmvscale = ((mv_format == MV_FIELD) && (video->pict_struct == FRAME_PICTURE));\n\n/* get dct_type (frame DCT / field DCT) */\n  \tdct_type = (video->pict_struct == FRAME_PICTURE) && \n             \t(!video->frame_pred_dct) && \n             \t(mb_type & (MB_PATTERN | MB_INTRA)) ? \n             \tmpeg3slice_getbit(slice_buffer) : 0;\n\n/* return values */\n\t*pmb_type = mb_type;\n\t*pstwtype = stwtype;\n\t*pstwclass = stwclass;\n\t*pmotion_type = motion_type;\n\t*pmv_count = mv_count;\n\t*pmv_format = mv_format;\n\t*pdmv = dmv;\n\t*pmvscale = mvscale;\n\t*pdct_type = dct_type;\n\treturn 0;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/video/mmxidct.S",
    "content": "/*\n * the input data is tranposed and each 16 bit element in the 8x8 matrix\n * is left aligned:\n * for example in 11...1110000 format\n * If the iDCT is of I macroblock then 0.5 needs to be added to the;DC Component\n * (element[0][0] of the matrix)\n */\n\n/* extrn re_matrix */\n\n/* constants */\n\n.data\n\t.align 16\n\t.type\t preSC, @object\npreSC:  .short  16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520\n        .short  22725, 31521, 29692, 26722, 22725, 17855, 12299, 6270\n        .short  21407, 29692, 27969, 25172, 21407, 16819, 11585, 5906\n        .short  19266, 26722, 25172, 22654, 19266, 15137, 10426, 5315\n        .short  16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520\n        .short  12873, 17855, 16819, 15137, 25746, 20228, 13933, 7103\n        .short  17734, 24598, 23170, 20853, 17734, 13933, 9597, 4892\n        .short  18081, 25080, 23624, 21261, 18081, 14206, 9785, 4988\n\t.size\tpreSC, 128\n\t.align  8\n\t.type\tx0005000200010001, @object\n\t.size\tx0005000200010001, 8\nx0005000200010001:\n\t.long\t0x00010001, 0x00050002\n\t.align  8\n\t.type\tx0040000000000000, @object\n\t.size\tx0040000000000000, 8\nx0040000000000000:\n\t.long\t0, 0x00400000\n\t.align  8\n\t.type\tx5a825a825a825a82, @object\n\t.size\tx5a825a825a825a82, 8\nx5a825a825a825a82:\n\t.long\t0x5a825a82, 0x5a825a82\n\t.align  8\n\t.type\tx539f539f539f539f, @object\n\t.size\tx539f539f539f539f, 8\nx539f539f539f539f:\n\t.long\t0x539f539f, 0x539f539f\n\t.align  8\n\t.type\tx4546454645464546, @object\n\t.size\tx4546454645464546, 8\nx4546454645464546:\n\t.long\t0x45464546, 0x45464546\n\t.align  8\n\t.type\tx61f861f861f861f8, @object\n\t.size\tx61f861f861f861f8, 8\nx61f861f861f861f8:\n\t.long\t0x61f861f8, 0x61f861f8\n/* Static variables */\n\t.align 8\n\t.type\t x0, @object\n\t.size\t x0, 8\nx0:\n\t.long 0, 0\n/* Procedure */\n\n\n\t.align 8\n.text\n\t.align 4\n.globl IDCT_mmx\n\t.type\t IDCT_mmx, @function\nIDCT_mmx:\n\tpushl %ebp\n\tmovl %esp, %ebp\n\tpushl %ebx\n\tpushl %ecx\n\tpushl %edx\n\tpushl %esi\n\tpushl %edi\n\n\tpushl $0    /* allocate the temp variables */\n\tpushl $0\n\tpushl $0\n\tpushl $0\n\tpushl $0\n\tpushl $0\n\tpushl $0\n\tpushl $0\n\n\tmovl 8(%ebp), %esi\t\t/* source matrix */\n\tleal preSC, %ecx\n/* column 0: even part\n * use V4, V12, V0, V8 to produce V22..V25\n */\n\tmovq 8*12(%ecx), %mm0\t\t/* maybe the first mul can be done together */\n\t\t\t\t\t\t\t\t/* with the dequantization in iHuff module */\n\tpmulhw 8*12(%esi), %mm0\t\t/* V12 */\n\tmovq 8*4(%ecx), %mm1\n\tpmulhw 8*4(%esi), %mm1\t\t/* V4 */\n\tmovq (%ecx), %mm3\n\tpsraw $1, %mm0\t\t\t/* t64=t66 */\n\tpmulhw (%esi), %mm3\t\t/* V0 */\n\tmovq 8*8(%ecx), %mm5\t\t/* duplicate V4 */\n\tmovq %mm1, %mm2\t\t\t/* added 11/1/96 */\n\tpmulhw 8*8(%esi),%mm5\t\t/* V8 */\n\tpsubsw %mm0, %mm1\t\t/* V16 */\n\tpmulhw x5a825a825a825a82, %mm1\t/* 23170 ->V18 */\n\tpaddsw %mm0, %mm2\t\t/* V17 */\n\tmovq %mm2, %mm0\t\t\t/* duplicate V17 */\n\tpsraw $1, %mm2\t\t\t/* t75=t82 */\n\tpsraw $2, %mm0\t\t\t/* t72 */\n\tmovq %mm3, %mm4\t\t\t/* duplicate V0 */\n\tpaddsw %mm5, %mm3\t\t/* V19 */\n\tpsubsw %mm5, %mm4\t\t/* V20 ;mm5 free */\n/* moved from the block below */\n\tmovq 8*10(%ecx), %mm7\n\tpsraw $1, %mm3\t\t\t/* t74=t81 */\n\tmovq %mm3, %mm6\t\t\t/* duplicate t74=t81 */\n\tpsraw $2, %mm4\t\t\t/* t77=t79 */\n\tpsubsw %mm0, %mm1\t\t/* V21 ; mm0 free */\n\tpaddsw %mm2, %mm3\t\t/* V22 */\n\tmovq %mm1, %mm5\t\t\t/* duplicate V21 */\n\tpaddsw %mm4, %mm1\t\t/* V23 */\n\tmovq %mm3, 8*4(%esi)\t\t/* V22 */\n\tpsubsw %mm5, %mm4\t\t/* V24; mm5 free */\n\tmovq %mm1, 8*12(%esi)\t\t/* V23 */\n\tpsubsw %mm2, %mm6\t\t/* V25; mm2 free */\n\tmovq %mm4, (%esi)\t\t/* V24 */\n/* keep mm6 alive all along the next block */\n\t/* movq %mm6, 8*8(%esi) \tV25 */\n/* column 0: odd part\n * use V2, V6, V10, V14 to produce V31, V39, V40, V41\n */\n/* moved above: movq 8*10(%ecx), %mm7 */\n\n\tpmulhw 8*10(%esi), %mm7\t\t/* V10 */\n\tmovq 8*6(%ecx), %mm0\n\tpmulhw 8*6(%esi), %mm0\t\t/* V6 */\n\tmovq 8*2(%ecx), %mm5\n\tmovq %mm7, %mm3\t\t\t/* duplicate V10 */\n\tpmulhw 8*2(%esi), %mm5\t\t/* V2 */\n\tmovq 8*14(%ecx), %mm4\n\tpsubsw %mm0, %mm7\t\t/* V26 */\n\tpmulhw 8*14(%esi), %mm4\t\t/* V14 */\n\tpaddsw %mm0, %mm3\t\t/* V29 ; free mm0 */\n\tmovq %mm7, %mm1\t\t\t/* duplicate V26 */\n\tpsraw $1, %mm3\t\t\t/* t91=t94 */\n\tpmulhw x539f539f539f539f,%mm7\t/* V33 */\n\tpsraw $1, %mm1\t\t\t/* t96 */\n\tmovq %mm5, %mm0\t\t\t/* duplicate V2 */\n\tpsraw $2, %mm4\t\t\t/* t85=t87 */\n\tpaddsw %mm4,%mm5\t\t/* V27 */\n\tpsubsw %mm4, %mm0\t\t/* V28 ; free mm4 */\n\tmovq %mm0, %mm2\t\t\t/* duplicate V28 */\n\tpsraw $1, %mm5\t\t\t/* t90=t93 */\n\tpmulhw x4546454645464546,%mm0\t/* V35 */\n\tpsraw $1, %mm2\t\t\t/* t97 */\n\tmovq %mm5, %mm4\t\t\t/* duplicate t90=t93 */\n\tpsubsw %mm2, %mm1\t\t/* V32 ; free mm2 */\n\tpmulhw x61f861f861f861f8,%mm1\t/* V36 */\n\tpsllw $1, %mm7\t\t\t/* t107 */\n\tpaddsw %mm3, %mm5\t\t/* V31 */\n\tpsubsw %mm3, %mm4\t\t/* V30 ; free mm3 */\n\tpmulhw x5a825a825a825a82,%mm4\t/* V34 */\n\tnop\n\tpsubsw %mm1, %mm0\t\t/* V38 */\n\tpsubsw %mm7, %mm1\t\t/* V37 ; free mm7 */\n\tpsllw $1, %mm1\t\t\t/* t114 */\n/* move from the next block */\n\tmovq %mm6, %mm3\t\t\t/* duplicate V25 */\n/* move from the next block */\n\tmovq 8*4(%esi), %mm7\t\t/* V22 */\n\tpsllw $1, %mm0\t\t\t/* t110 */\n\tpsubsw %mm5, %mm0\t\t/* V39 (mm5 needed for next block) */\n\tpsllw $2, %mm4\t\t\t/* t112 */\n/* moved from the next block */\n\tmovq 8*12(%esi), %mm2\t\t/* V23 */\n\tpsubsw %mm0, %mm4\t\t/* V40 */\n\tpaddsw %mm4, %mm1\t\t/* V41; free mm0 */\n/* moved from the next block */\n\tpsllw $1, %mm2\t\t\t/* t117=t125 */\n/* column 0: output butterfly */\n/* moved above:\n * movq %mm6, %mm3\t\t\tduplicate V25\n * movq 8*4(%esi), %mm7\t\t\tV22\n * movq 8*12(%esi), %mm2\t\tV23\n * psllw $1, %mm2\t\t\tt117=t125\n */\n\tpsubsw %mm1, %mm6\t\t/* tm6 */\n\tpaddsw %mm1, %mm3\t\t/* tm8; free mm1 */\n\tmovq %mm7, %mm1\t\t\t/* duplicate V22 */\n\tpaddsw %mm5, %mm7\t\t/* tm0 */\n\tmovq %mm3, 8*8(%esi)\t\t/* tm8; free mm3 */\n\tpsubsw %mm5, %mm1\t\t/* tm14; free mm5 */\n\tmovq %mm6, 8*6(%esi)\t\t/* tm6; free mm6 */\n\tmovq %mm2, %mm3\t\t\t/* duplicate t117=t125 */\n\tmovq (%esi), %mm6\t\t/* V24 */\n\tpaddsw %mm0, %mm2\t\t/* tm2 */\n\tmovq %mm7, (%esi)\t\t/* tm0; free mm7 */\n\tpsubsw %mm0, %mm3\t\t/* tm12; free mm0 */\n\tmovq %mm1, 8*14(%esi)\t\t/* tm14; free mm1 */\n\tpsllw $1, %mm6\t\t\t/* t119=t123 */\n\tmovq %mm2, 8*2(%esi)\t\t/* tm2; free mm2 */\n\tmovq %mm6, %mm0\t\t\t/* duplicate t119=t123 */\n\tmovq %mm3, 8*12(%esi)\t\t/* tm12; free mm3 */\n\tpaddsw %mm4, %mm6\t\t/* tm4 */\n/* moved from next block */\n\tmovq 8*5(%ecx), %mm1\n\tpsubsw %mm4, %mm0\t\t/* tm10; free mm4 */\n/* moved from next block */\n\tpmulhw 8*5(%esi), %mm1\t\t/* V5 */\n\tmovq %mm6, 8*4(%esi)\t\t/* tm4; free mm6 */\n\tmovq %mm0, 8*10(%esi)\t\t/* tm10; free mm0 */\n/* column 1: even part\n * use V5, V13, V1, V9 to produce V56..V59\n */\n/* moved to prev block:\n *\tmovq 8*5(%ecx), %mm1\n *\tpmulhw 8*5(%esi), %mm1\t\t V5\n */\n\tmovq 8*13(%ecx), %mm7\n\tpsllw $1, %mm1\t\t\t/* t128=t130 */\n\tpmulhw 8*13(%esi), %mm7\t\t/* V13 */\n\tmovq %mm1, %mm2\t\t\t/* duplicate t128=t130 */\n\tmovq 8(%ecx), %mm3\n\tpmulhw 8(%esi), %mm3\t\t/* V1 */\n\tmovq 8*9(%ecx), %mm5\n\tpsubsw %mm7, %mm1\t\t/* V50 */\n\tpmulhw 8*9(%esi), %mm5\t\t/* V9 */\n\tpaddsw %mm7, %mm2\t\t/* V51 */\n\tpmulhw x5a825a825a825a82, %mm1\t/* 23170 ->V52 */\n\tmovq %mm2, %mm6\t\t\t/* duplicate V51 */\n\tpsraw $1, %mm2\t\t\t/* t138=t144 */\n\tmovq %mm3, %mm4\t\t\t/* duplicate V1 */\n\tpsraw $2, %mm6\t\t\t/* t136 */\n\tpaddsw %mm5, %mm3\t\t/* V53 */\n\tpsubsw %mm5, %mm4\t\t/* V54 ;mm5 free */\n\tmovq %mm3, %mm7\t\t\t/* duplicate V53 */\n/* moved from next block */\n\tmovq 8*11(%ecx), %mm0\n\tpsraw $1, %mm4\t\t\t/* t140=t142 */\n\tpsubsw %mm6, %mm1\t\t/* V55 ; mm6 free */\n\tpaddsw %mm2, %mm3\t\t/* V56 */\n\tmovq %mm4, %mm5\t\t\t/* duplicate t140=t142 */\n\tpaddsw %mm1, %mm4\t\t/* V57 */\n\tmovq %mm3, 8*5(%esi)\t\t/* V56 */\n\tpsubsw %mm1, %mm5\t\t/* V58; mm1 free */\n\tmovq %mm4, 8*13(%esi)\t\t/* V57 */\n\tpsubsw %mm2, %mm7\t\t/* V59; mm2 free */\n\tmovq %mm5, 8*9(%esi)\t\t/* V58 */\n/* keep mm7 alive all along the next block\n *\tmovq %mm7, 8(%esi)\t\tV59\n * moved above\n *\tmovq 8*11(%ecx), %mm0\n */\n\tpmulhw 8*11(%esi), %mm0\t\t/* V11 */\n\tmovq 8*7(%ecx), %mm6\n\tpmulhw 8*7(%esi), %mm6\t\t/* V7 */\n\tmovq 8*15(%ecx), %mm4\n\tmovq %mm0, %mm3\t\t\t/* duplicate V11 */\n\tpmulhw 8*15(%esi), %mm4\t\t/* V15 */\n\tmovq 8*3(%ecx), %mm5\n\tpsllw $1, %mm6\t\t\t/* t146=t152 */\n\tpmulhw 8*3(%esi), %mm5\t\t/* V3 */\n\tpaddsw %mm6, %mm0\t\t/* V63 */\n/* note that V15 computation has a correction step: \n * this is a 'magic' constant that rebiases the results to be closer to the\n * expected result.  this magic constant can be refined to reduce the error\n * even more by doing the correction step in a later stage when the number\n * is actually multiplied by 16\n */\n\tpaddw x0005000200010001, %mm4\n\tpsubsw %mm6, %mm3\t\t/* V60 ; free mm6 */\n\tpsraw $1, %mm0\t\t\t/* t154=t156 */\n\tmovq %mm3, %mm1\t\t\t/* duplicate V60 */\n\tpmulhw x539f539f539f539f, %mm1\t/* V67 */\n\tmovq %mm5, %mm6\t\t\t/* duplicate V3 */\n\tpsraw $2, %mm4\t\t\t/* t148=t150 */\n\tpaddsw %mm4, %mm5\t\t/* V61 */\n\tpsubsw %mm4, %mm6\t\t/* V62 ; free mm4 */\n\tmovq %mm5, %mm4\t\t\t/* duplicate V61 */\n\tpsllw $1, %mm1\t\t\t/* t169 */\n\tpaddsw %mm0, %mm5\t\t/* V65 -> result */\n\tpsubsw %mm0, %mm4\t\t/* V64 ; free mm0 */\n\tpmulhw x5a825a825a825a82, %mm4\t/* V68 */\n\tpsraw $1, %mm3\t\t\t/* t158 */\n\tpsubsw %mm6, %mm3\t\t/* V66 */\n\tmovq %mm5, %mm2\t\t\t/* duplicate V65 */\n\tpmulhw x61f861f861f861f8, %mm3\t/* V70 */\n\tpsllw $1, %mm6\t\t\t/* t165 */\n\tpmulhw x4546454645464546, %mm6\t/* V69 */\n\tpsraw $1, %mm2\t\t\t/* t172 */\n/* moved from next block */\n\tmovq 8*5(%esi), %mm0\t\t/* V56 */\n\tpsllw $1, %mm4\t\t\t/* t174 */\n/* moved from next block */\n\tpsraw $1, %mm0\t\t\t/* t177=t188 */\n\tnop\n\tpsubsw %mm3, %mm6\t\t/* V72 */\n\tpsubsw %mm1, %mm3\t\t/* V71 ; free mm1 */\n\tpsubsw %mm2, %mm6\t\t/* V73 ; free mm2 */\n/* moved from next block */\n\tpsraw $1, %mm5\t\t\t/* t178=t189 */\n\tpsubsw %mm6, %mm4\t\t/* V74 */\n/* moved from next block */\n\tmovq %mm0, %mm1\t\t\t/* duplicate t177=t188 */\n\tpaddsw %mm4, %mm3\t\t/* V75 */\n/* moved from next block */\n\tpaddsw %mm5, %mm0\t\t/* tm1 */\n/* location\n *  5 - V56\n * 13 - V57\n *  9 - V58\n *  X - V59, mm7\n *  X - V65, mm5\n *  X - V73, mm6\n *  X - V74, mm4\n *  X - V75, mm3\n * free mm0, mm1 & mm2\n * moved above\n *\tmovq 8*5(%esi), %mm0\t\tV56\n *\tpsllw $1, %mm0\t\t\tt177=t188 ! new !!\n *\tpsllw $1, %mm5\t\t\tt178=t189 ! new !!\n *\tmovq %mm0, %mm1\t\t\tduplicate t177=t188\n *\tpaddsw %mm5, %mm0\t\ttm1\n */\n\tmovq 8*13(%esi), %mm2\t\t/* V57 */\n\tpsubsw %mm5, %mm1\t\t/* tm15; free mm5 */\n\tmovq %mm0, 8(%esi)\t\t/* tm1; free mm0 */\n\tpsraw $1, %mm7\t\t\t/* t182=t184 ! new !! */\n/* save the store as used directly in the transpose\n *\tmovq %mm1, 120(%esi)\t\ttm15; free mm1\n */\n\tmovq %mm7, %mm5\t\t\t/* duplicate t182=t184 */\n\tpsubsw %mm3, %mm7\t\t/* tm7 */\n\tpaddsw %mm3, %mm5\t\t/* tm9; free mm3 */\n\tmovq 8*9(%esi), %mm0\t\t/* V58 */\n\tmovq %mm2, %mm3\t\t\t/* duplicate V57 */\n\tmovq %mm7, 8*7(%esi)\t\t/* tm7; free mm7 */\n\tpsubsw %mm6, %mm3\t\t/* tm13 */\n\tpaddsw %mm6, %mm2\t\t/* tm3 ; free mm6 */\n/* moved up from the transpose */\n\tmovq %mm3, %mm7\n/* moved up from the transpose */\n\tpunpcklwd %mm1, %mm3\n\tmovq %mm0, %mm6\t\t\t/* duplicate V58 */\n\tmovq %mm2, 8*3(%esi)\t\t/* tm3; free mm2 */\n\tpaddsw %mm4, %mm0\t\t/* tm5 */\n\tpsubsw %mm4, %mm6\t\t/* tm11; free mm4 */\n/* moved up from the transpose */\n\tpunpckhwd %mm1, %mm7\n\tmovq %mm0, 8*5(%esi)\t\t/* tm5; free mm0 */\n/* moved up from the transpose */\n\tmovq %mm5, %mm2\n/* transpose - M4 part\n *  ---------       ---------\n * | M1 | M2 |     | M1'| M3'|\n *  ---------  -->  ---------\n * | M3 | M4 |     | M2'| M4'|\n *  ---------       ---------\n * Two alternatives: use full mmword approach so the following code can be\n * scheduled before the transpose is done without stores, or use the faster\n * half mmword stores (when possible)\n */\n\tmovd %mm3, 8*9+4(%esi)\t\t/* MS part of tmt9 */\n\tpunpcklwd %mm6, %mm5\n\tmovd %mm7, 8*13+4(%esi)\t\t/* MS part of tmt13 */\n\tpunpckhwd %mm6, %mm2\n\tmovd %mm5, 8*9(%esi)\t\t/* LS part of tmt9 */\n\tpunpckhdq %mm3, %mm5\t\t/* free mm3 */\n\tmovd %mm2, 8*13(%esi)\t\t/* LS part of tmt13 */\n\tpunpckhdq %mm7, %mm2\t\t/* free mm7 */\n/* moved up from the M3 transpose */\n\tmovq 8*8(%esi), %mm0\n/* moved up from the M3 transpose */\n\tmovq 8*10(%esi), %mm1\n/* moved up from the M3 transpose */\n\tmovq %mm0, %mm3\n/* shuffle the rest of the data, and write it with 2 mmword writes */\n\tmovq %mm5, 8*11(%esi)\t\t/* tmt11 */\n/* moved up from the M3 transpose */\n\tpunpcklwd %mm1, %mm0\n\tmovq %mm2, 8*15(%esi)\t\t/* tmt15 */\n/* moved up from the M3 transpose */\n\tpunpckhwd %mm1, %mm3\n/* transpose - M3 part\n * moved up to previous code section\n *\tmovq 8*8(%esi), %mm0\n *\tmovq 8*10(%esi), %mm1\n *\tmovq %mm0, %mm3\n *\tpunpcklwd %mm1, %mm0\n *\tpunpckhwd %mm1, %mm3\n */\n\tmovq 8*12(%esi), %mm6\n\tmovq 8*14(%esi), %mm4\n\tmovq %mm6, %mm2\n/* shuffle the data and write the lower parts of the transposed in 4 dwords */\n\tpunpcklwd %mm4, %mm6\n\tmovq %mm0, %mm1\n\tpunpckhdq %mm6, %mm1\n\tmovq %mm3, %mm7\n\tpunpckhwd %mm4, %mm2\t\t/* free mm4 */\n\tpunpckldq %mm6, %mm0\t\t/* free mm6 */\n/* moved from next block */\n\tmovq 8*13(%esi), %mm4\t\t/* tmt13 */\n\tpunpckldq %mm2, %mm3\n\tpunpckhdq %mm2, %mm7\t\t/* free mm2 */\n/* moved from next block */\n\tmovq %mm3, %mm5\t\t\t/* duplicate tmt5 */\n/* column 1: even part (after transpose)\n* moved above\n*\tmovq %mm3, %mm5\t\t\tduplicate tmt5\n*\tmovq 8*13(%esi), %mm4\t\ttmt13\n*/\n\tpsubsw %mm4, %mm3\t\t/* V134 */\n\tpmulhw x5a825a825a825a82, %mm3\t/* 23170 ->V136 */\n\tmovq 8*9(%esi), %mm6\t\t/* tmt9 */\n\tpaddsw %mm4, %mm5\t\t/* V135 ; mm4 free */\n\tmovq %mm0, %mm4\t\t\t/* duplicate tmt1 */\n\tpaddsw %mm6, %mm0\t\t/* V137 */\n\tpsubsw %mm6, %mm4\t\t/* V138 ; mm6 free */\n\tpsllw $2, %mm3\t\t\t/* t290 */\n\tpsubsw %mm5, %mm3\t\t/* V139 */\n\tmovq %mm0, %mm6\t\t\t/* duplicate V137 */\n\tpaddsw %mm5, %mm0\t\t/* V140 */\n\tmovq %mm4, %mm2\t\t\t/* duplicate V138 */\n\tpaddsw %mm3, %mm2\t\t/* V141 */\n\tpsubsw %mm3, %mm4\t\t/* V142 ; mm3 free */\n\tmovq %mm0, 8*9(%esi)\t\t/* V140 */\n\tpsubsw %mm5, %mm6\t\t/* V143 ; mm5 free */\n/* moved from next block */\n\tmovq 8*11(%esi), %mm0\t\t/* tmt11 */\n\tmovq %mm2, 8*13(%esi)\t\t/* V141 */\n/* moved from next block */\n\tmovq %mm0, %mm2\t\t\t/* duplicate tmt11 */\n/* column 1: odd part (after transpose) */\n/* moved up to the prev block\n *\tmovq 8*11(%esi), %mm0\t\ttmt11\n *\tmovq %mm0, %mm2\t\t\tduplicate tmt11\n */\n\tmovq 8*15(%esi), %mm5\t\t/* tmt15 */\n\tpsubsw %mm7, %mm0\t\t/* V144 */\n\tmovq %mm0, %mm3\t\t\t/* duplicate V144 */\n\tpaddsw %mm7, %mm2\t\t/* V147 ; free mm7 */\n\tpmulhw x539f539f539f539f, %mm0\t/* 21407-> V151 */\n\tmovq %mm1, %mm7\t\t\t/* duplicate tmt3 */\n\tpaddsw %mm5, %mm7\t\t/* V145 */\n\tpsubsw %mm5, %mm1\t\t/* V146 ; free mm5 */\n\tpsubsw %mm1, %mm3\t\t/* V150 */\n\tmovq %mm7, %mm5\t\t\t/* duplicate V145 */\n\tpmulhw x4546454645464546, %mm1\t/* 17734-> V153 */\n\tpsubsw %mm2, %mm5\t\t/* V148 */\n\tpmulhw x61f861f861f861f8, %mm3\t/* 25080-> V154 */\n\tpsllw $2, %mm0\t\t\t/* t311 */\n\tpmulhw x5a825a825a825a82, %mm5\t/* 23170-> V152 */\n\tpaddsw %mm2, %mm7\t\t/* V149 ; free mm2 */\n\tpsllw $1, %mm1\t\t\t/* t313 */\n\tnop\t/* without the nop - freeze here for one clock */\n\tmovq %mm3, %mm2\t\t\t/* duplicate V154 */\n\tpsubsw %mm0, %mm3\t\t/* V155 ; free mm0 */\n\tpsubsw %mm2, %mm1\t\t/* V156 ; free mm2 */\n/* moved from the next block */\n\tmovq %mm6, %mm2\t\t\t/* duplicate V143 */\n/* moved from the next block */\n\tmovq 8*13(%esi), %mm0\t\t/* V141 */\n\tpsllw $1, %mm1\t\t\t/* t315 */\n\tpsubsw %mm7, %mm1\t\t/* V157 (keep V149) */\n\tpsllw $2, %mm5\t\t\t/* t317 */\n\tpsubsw %mm1, %mm5\t\t/* V158 */\n\tpsllw $1, %mm3\t\t\t/* t319 */\n\tpaddsw %mm5, %mm3\t\t/* V159 */\n/* column 1: output butterfly (after transform)\n * moved to the prev block\n *\tmovq %mm6, %mm2\t\t\tduplicate V143\n *\tmovq 8*13(%esi), %mm0\t\tV141\n */\n\tpsubsw %mm3, %mm2\t\t/* V163 */\n\tpaddsw %mm3, %mm6\t\t/* V164 ; free mm3 */\n\tmovq %mm4, %mm3\t\t\t/* duplicate V142 */\n\tpsubsw %mm5, %mm4\t\t/* V165 ; free mm5 */\n\tmovq %mm2, (%esp)\t\t/* out7 */\n\tpsraw $4, %mm6\n\tpsraw $4, %mm4\n\tpaddsw %mm5, %mm3\t\t/* V162 */\n\tmovq 8*9(%esi), %mm2\t\t/* V140 */\n\tmovq %mm0, %mm5\t\t\t/* duplicate V141 */\n/* in order not to perculate this line up,\n * we read 72(%esi) very near to this location\n */\n\tmovq %mm6, 8*9(%esi)\t\t/* out9 */\n\tpaddsw %mm1, %mm0\t\t/* V161 */\n\tmovq %mm3, 8(%esp)\t\t/* out5 */\n\tpsubsw %mm1, %mm5\t\t/* V166 ; free mm1 */\n\tmovq %mm4, 8*11(%esi)\t\t/* out11 */\n\tpsraw $4, %mm5\n\tmovq %mm0, 16(%esp)\t\t/* out3 */\n\tmovq %mm2, %mm4\t\t\t/* duplicate V140 */\n\tmovq %mm5, 8*13(%esi)\t\t/* out13 */\n\tpaddsw %mm7, %mm2\t\t/* V160 */\n/* moved from the next block */\n\tmovq 8(%esi), %mm0\n\tpsubsw %mm7, %mm4\t\t/* V167 ; free mm7 */\n/* moved from the next block */\n\tmovq 8*3(%esi), %mm7\n\tpsraw $4, %mm4\n\tmovq %mm2, 24(%esp)\t\t/* out1 */\n/* moved from the next block */\n\tmovq %mm0, %mm1\n\tmovq %mm4, 8*15(%esi)\t\t/* out15 */\n/* moved from the next block */\n\tpunpcklwd %mm7, %mm0\n/* transpose - M2 parts\n * moved up to the prev block\n *\tmovq 8(%esi), %mm0\n *\tmovq 8*3(%esi), %mm7\n *\tmovq %mm0, %mm1\n *\tpunpcklwd %mm7, %mm0\n */\n\tmovq 8*5(%esi), %mm5\n\tpunpckhwd %mm7, %mm1\n\tmovq 8*7(%esi), %mm4\n\tmovq %mm5, %mm3\n/* shuffle the data and write the lower parts of the trasposed in 4 dwords */\n\tmovd %mm0, 8*8(%esi)\t\t/* LS part of tmt8 */\n\tpunpcklwd %mm4, %mm5\n\tmovd %mm1, 8*12(%esi)\t\t/* LS part of tmt12 */\n\tpunpckhwd %mm4, %mm3\n\tmovd %mm5, 8*8+4(%esi)\t\t/* MS part of tmt8 */\n\tpunpckhdq %mm5, %mm0\t\t/* tmt10 */\n\tmovd %mm3, 8*12+4(%esi)\t\t/* MS part of tmt12 */\n\tpunpckhdq %mm3, %mm1\t\t/* tmt14 */\n/* transpose - M1 parts */\n\tmovq (%esi), %mm7\n\tmovq 8*2(%esi), %mm2\n\tmovq %mm7, %mm6\n\tmovq 8*4(%esi), %mm5\n\tpunpcklwd %mm2, %mm7\n\tmovq 8*6(%esi), %mm4\n\tpunpckhwd %mm2, %mm6\t\t/* free mm2 */\n\tmovq %mm5, %mm3\n\tpunpcklwd %mm4, %mm5\n\tpunpckhwd %mm4, %mm3\t\t/* free mm4 */\n\tmovq %mm7, %mm2\n\tmovq %mm6, %mm4\n\tpunpckldq %mm5, %mm7\t\t/* tmt0 */\n\tpunpckhdq %mm5, %mm2\t\t/* tmt2 ; free mm5 */\n/* shuffle the rest of the data, and write it with 2 mmword writes */\n\tpunpckldq %mm3, %mm6\t\t/* tmt4 */\n/* moved from next block */\n\tmovq %mm2, %mm5\t\t\t/* duplicate tmt2 */\n\tpunpckhdq %mm3, %mm4\t\t/* tmt6 ; free mm3 */\n/* moved from next block */\n\tmovq %mm0, %mm3\t\t\t/* duplicate tmt10 */\n/* column 0: odd part (after transpose)\n *moved up to prev block\n *\tmovq %mm0, %mm3\t\t\tduplicate tmt10\n *\tmovq %mm2, %mm5\t\t\tduplicate tmt2\n */\n\tpsubsw %mm4, %mm0\t\t/* V110 */\n\tpaddsw %mm4, %mm3\t\t/* V113 ; free mm4 */\n\tmovq %mm0, %mm4\t\t\t/* duplicate V110 */\n\tpaddsw %mm1, %mm2\t\t/* V111 */\n\tpmulhw x539f539f539f539f, %mm0\t/* 21407-> V117 */\n\tpsubsw %mm1, %mm5\t\t/* V112 ; free mm1 */\n\tpsubsw %mm5, %mm4\t\t/* V116 */\n\tmovq %mm2, %mm1\t\t\t/* duplicate V111 */\n\tpmulhw x4546454645464546, %mm5\t/* 17734-> V119 */\n\tpsubsw %mm3, %mm2\t\t/* V114 */\n\tpmulhw x61f861f861f861f8, %mm4\t/* 25080-> V120 */\n\tpaddsw %mm3, %mm1\t\t/* V115 ; free mm3 */\n\tpmulhw x5a825a825a825a82, %mm2\t/* 23170-> V118 */\n\tpsllw $2, %mm0\t\t\t/* t266 */\n\tmovq %mm1, (%esi)\t\t/* save V115 */\n\tpsllw $1, %mm5\t\t\t/* t268 */\n\tpsubsw %mm4, %mm5\t\t/* V122 */\n\tpsubsw %mm0, %mm4\t\t/* V121 ; free mm0 */\n\tpsllw $1, %mm5\t\t\t/* t270 */\n\tpsubsw %mm1, %mm5\t\t/* V123 ; free mm1 */\n\tpsllw $2, %mm2\t\t\t/* t272 */\n\tpsubsw %mm5, %mm2\t\t/* V124 (keep V123) */\n\tpsllw $1, %mm4\t\t\t/* t274 */\n\tmovq %mm5, 8*2(%esi)\t\t/* save V123 ; free mm5 */\n\tpaddsw %mm2, %mm4\t\t/* V125 (keep V124) */\n/* column 0: even part (after transpose) */\n\tmovq 8*12(%esi), %mm0\t\t/* tmt12 */\n\tmovq %mm6, %mm3\t\t\t/* duplicate tmt4 */\n\tpsubsw %mm0, %mm6\t\t/* V100 */\n\tpaddsw %mm0, %mm3\t\t/* V101 ; free mm0 */\n\tpmulhw x5a825a825a825a82, %mm6\t/* 23170 ->V102 */\n\tmovq %mm7, %mm5\t\t\t/* duplicate tmt0 */\n\tmovq 8*8(%esi), %mm1\t\t/* tmt8 */\n\tpaddsw %mm1, %mm7\t\t/* V103 */\n\tpsubsw %mm1, %mm5\t\t/* V104 ; free mm1 */\n\tmovq %mm7, %mm0\t\t\t/* duplicate V103 */\n\tpsllw $2, %mm6\t\t\t/* t245 */\n\tpaddsw %mm3, %mm7\t\t/* V106 */\n\tmovq %mm5, %mm1\t\t\t/* duplicate V104 */\n\tpsubsw %mm3, %mm6\t\t/* V105 */\n\tpsubsw %mm3, %mm0\t\t/* V109; free mm3 */\n\tpaddsw %mm6, %mm5\t\t/* V107 */\n\tpsubsw %mm6, %mm1\t\t/* V108 ; free mm6 */\n/* column 0: output butterfly (after transform) */\n\tmovq %mm1, %mm3\t\t\t/* duplicate V108 */\n\tpaddsw %mm2, %mm1\t\t/* out4 */\n\tpsraw $4, %mm1\n\tpsubsw %mm2, %mm3\t\t/* out10 ; free mm2 */\n\tpsraw $4, %mm3\n\tmovq %mm0, %mm6\t\t\t/* duplicate V109 */\n\tmovq %mm1, 8*4(%esi)\t\t/* out4 ; free mm1 */\n\tpsubsw %mm4, %mm0\t\t/* out6 */\n\tmovq %mm3, 8*10(%esi)\t\t/* out10 ; free mm3 */\n\tpsraw $4, %mm0\n\tpaddsw %mm4, %mm6\t\t/* out8 ; free mm4 */\n\tmovq %mm7, %mm1\t\t\t/* duplicate V106 */\n\tmovq %mm0, 8*6(%esi)\t\t/* out6 ; free mm0 */\n\tpsraw $4, %mm6\n\tmovq (%esi), %mm4\t\t/* V115 */\n\tmovq %mm6, 8*8(%esi)\t\t/* out8 ; free mm6 */\n\tmovq %mm5, %mm2\t\t\t/* duplicate V107 */\n\tmovq 8*2(%esi), %mm3\t\t/* V123 */\n\tpaddsw %mm4, %mm7\t\t/* out0 */\n/* moved up from next block */\n\tmovq 16(%esp), %mm0\n\tpsraw $4, %mm7\n/* moved up from next block */\n\tmovq 8(%esp), %mm6 \n\tpsubsw %mm4, %mm1\t\t/* out14 ; free mm4 */\n\tpaddsw %mm3, %mm5\t\t/* out2 */\n\tpsraw $4, %mm1\n\tmovq %mm7, (%esi)\t\t/* out0 ; free mm7 */\n\tpsraw $4, %mm5\n\tmovq %mm1, 8*14(%esi)\t\t/* out14 ; free mm1 */\n\tpsubsw %mm3, %mm2\t\t/* out12 ; free mm3 */\n\tmovq %mm5, 8*2(%esi)\t\t/* out2 ; free mm5 */\n\tpsraw $4, %mm2\n/* moved up to the prev block */\n\tmovq (%esp), %mm4\n/* moved up to the prev block */\n\tpsraw $4, %mm0\n\tmovq %mm2, 8*12(%esi)\t\t/* out12 ; free mm2 */\n/* moved up to the prev block */\n\tpsraw $4, %mm6\n/* move back the data to its correct place\n* moved up to the prev block\n *\tmovq 16(%esp), %mm0\n *\tmovq 8(%esp), %mm6\n *\tmovq (%esp), %mm4\n *\tpsraw $4, %mm0\n *\tpsraw $4, %mm6\n*/\n\tmovq 24(%esp), %mm1\n\tpsraw $4, %mm4\n\tmovq %mm0, 8*3(%esi)\t\t/* out3 */\n\tpsraw $4, %mm1\n\tmovq %mm6, 8*5(%esi)\t\t/* out5 */\n\tmovq %mm4, 8*7(%esi)\t\t/* out7 */\n\tmovq %mm1, 8(%esi)\t\t/* out1 */\n\n\tpopl %edi    /* Pop off the temp variables */\n\tpopl %edi\n\tpopl %edi\n\tpopl %edi\n\tpopl %edi\n\tpopl %edi\n\tpopl %edi\n\tpopl %edi\n\n\tpopl %edi    /* Pop off the old variables */\n\tpopl %esi\n\tpopl %edx\n\tpopl %ecx\n\tpopl %ebx\n\tmovl %ebp, %esp\n\tpopl %ebp\n\n\tret\n.Lfe1:\n\t.size\t IDCT_mmx,.Lfe1-IDCT_mmx\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/video/mmxidct_gasp.s",
    "content": "\t/*\n\t* the input data is tranposed and each 16 bit element in the 8x8 matrix\n\t* is left aligned:\n\t* for example in 11...1110000 format\n\t* If the iDCT is of I macroblock then 0.5 needs to be added to the;DC Component\n\t* (element[0][0] of the matrix)\n\t*/\n\n\t/* extrn re_matrix */\n\n\t/* constants */\n\n\t.long\t\n\t.align\t16\n\t.type\t preSC, @object\npreSC:\t.short  16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520\n\t.short  22725, 31521, 29692, 26722, 22725, 17855, 12299, 6270\n\t.short  21407, 29692, 27969, 25172, 21407, 16819, 11585, 5906\n\t.short  19266, 26722, 25172, 22654, 19266, 15137, 10426, 5315\n\t.short  16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520\n\t.short  12873, 17855, 16819, 15137, 25746, 20228, 13933, 7103\n\t.short  17734, 24598, 23170, 20853, 17734, 13933, 9597, 4892\n\t.short  18081, 25080, 23624, 21261, 18081, 14206, 9785, 4988\n\t.size\tpreSC, 128\n\t.align\t8\n\t.type\tx0005000200010001, @object\n\t.size\tx0005000200010001, 8\nx0005000200010001:\n\t.long\t0x00010001, 0x00050002\n\t.align\t8\n\t.type\tx0040000000000000, @object\n\t.size\tx0040000000000000, 8\nx0040000000000000:\n\t.long\t0, 0x00400000\n\t.align\t8\n\t.type\tx5a825a825a825a82, @object\n\t.size\tx5a825a825a825a82, 8\nx5a825a825a825a82:\n\t.long\t0x5a825a82, 0x5a825a82\n\t.align\t8\n\t.type\tx539f539f539f539f, @object\n\t.size\tx539f539f539f539f, 8\nx539f539f539f539f:\n\t.long\t0x539f539f, 0x539f539f\n\t.align\t8\n\t.type\tx4546454645464546, @object\n\t.size\tx4546454645464546, 8\nx4546454645464546:\n\t.long\t0x45464546, 0x45464546\n\t.align\t8\n\t.type\tx61f861f861f861f8, @object\n\t.size\tx61f861f861f861f8, 8\nx61f861f861f861f8:\n\t.long\t0x61f861f8, 0x61f861f8\n\t/* Static variables */\n\t.align\t8\n\t.type\t x0, @object\n\t.size\t x0, 8\nx0:\n\t.long 0, 0\n\t/* Procedure */\n\n\n\t.align\t8\n\t.text\n\t.align\t4\n\t.globl IDCT_mmx\n\t.type\t IDCT_mmx, @function\nIDCT_mmx:\n\tpushl %ebp\n\tmovl %esp, %ebp\n\tpushl %ebx\n\tpushl %ecx\n\tpushl %edx\n\tpushl %esi\n\tpushl %edi\n\n\tpushl $0    /* allocate the temp variables */\n\tpushl $0\n\tpushl $0\n\tpushl $0\n\tpushl $0\n\tpushl $0\n\tpushl $0\n\tpushl $0\n\n\tmovl 8(%ebp), %esi\t\t/* source matrix */\n\tleal preSC, %ecx\n\t/* column 0: even part\n\t* use V4, V12, V0, V8 to produce V22..V25\n\t*/\n\tmovq 8*12(%ecx), %mm0\t\t/* maybe the first mul can be done together */\n\t/* with the dequantization in iHuff module */\n\tpmulhw 8*12(%esi), %mm0\t\t/* V12 */\n\tmovq 8*4(%ecx), %mm1\n\tpmulhw 8*4(%esi), %mm1\t\t/* V4 */\n\tmovq (%ecx), %mm3\n\tpsraw $1, %mm0\t\t\t/* t64=t66 */\n\tpmulhw (%esi), %mm3\t\t/* V0 */\n\tmovq 8*8(%ecx), %mm5\t\t/* duplicate V4 */\n\tmovq %mm1, %mm2\t\t\t/* added 11/1/96 */\n\tpmulhw 8*8(%esi),%mm5\t\t/* V8 */\n\tpsubsw %mm0, %mm1\t\t/* V16 */\n\tpmulhw x5a825a825a825a82, %mm1\t/* 23170 ->V18 */\n\tpaddsw %mm0, %mm2\t\t/* V17 */\n\tmovq %mm2, %mm0\t\t\t/* duplicate V17 */\n\tpsraw $1, %mm2\t\t\t/* t75=t82 */\n\tpsraw $2, %mm0\t\t\t/* t72 */\n\tmovq %mm3, %mm4\t\t\t/* duplicate V0 */\n\tpaddsw %mm5, %mm3\t\t/* V19 */\n\tpsubsw %mm5, %mm4\t\t/* V20 ;mm5 free */\n\t/* moved from the block below */\n\tmovq 8*10(%ecx), %mm7\n\tpsraw $1, %mm3\t\t\t/* t74=t81 */\n\tmovq %mm3, %mm6\t\t\t/* duplicate t74=t81 */\n\tpsraw $2, %mm4\t\t\t/* t77=t79 */\n\tpsubsw %mm0, %mm1\t\t/* V21 ; mm0 free */\n\tpaddsw %mm2, %mm3\t\t/* V22 */\n\tmovq %mm1, %mm5\t\t\t/* duplicate V21 */\n\tpaddsw %mm4, %mm1\t\t/* V23 */\n\tmovq %mm3, 8*4(%esi)\t\t/* V22 */\n\tpsubsw %mm5, %mm4\t\t/* V24; mm5 free */\n\tmovq %mm1, 8*12(%esi)\t\t/* V23 */\n\tpsubsw %mm2, %mm6\t\t/* V25; mm2 free */\n\tmovq %mm4, (%esi)\t\t/* V24 */\n\t/* keep mm6 alive all along the next block */\n\t/* movq %mm6, 8*8(%esi) \tV25 */\n\t/* column 0: odd part\n\t* use V2, V6, V10, V14 to produce V31, V39, V40, V41\n\t*/\n\t/* moved above: movq 8*10(%ecx), %mm7 */\n\n\tpmulhw 8*10(%esi), %mm7\t\t/* V10 */\n\tmovq 8*6(%ecx), %mm0\n\tpmulhw 8*6(%esi), %mm0\t\t/* V6 */\n\tmovq 8*2(%ecx), %mm5\n\tmovq %mm7, %mm3\t\t\t/* duplicate V10 */\n\tpmulhw 8*2(%esi), %mm5\t\t/* V2 */\n\tmovq 8*14(%ecx), %mm4\n\tpsubsw %mm0, %mm7\t\t/* V26 */\n\tpmulhw 8*14(%esi), %mm4\t\t/* V14 */\n\tpaddsw %mm0, %mm3\t\t/* V29 ; free mm0 */\n\tmovq %mm7, %mm1\t\t\t/* duplicate V26 */\n\tpsraw $1, %mm3\t\t\t/* t91=t94 */\n\tpmulhw x539f539f539f539f,%mm7\t/* V33 */\n\tpsraw $1, %mm1\t\t\t/* t96 */\n\tmovq %mm5, %mm0\t\t\t/* duplicate V2 */\n\tpsraw $2, %mm4\t\t\t/* t85=t87 */\n\tpaddsw %mm4,%mm5\t\t/* V27 */\n\tpsubsw %mm4, %mm0\t\t/* V28 ; free mm4 */\n\tmovq %mm0, %mm2\t\t\t/* duplicate V28 */\n\tpsraw $1, %mm5\t\t\t/* t90=t93 */\n\tpmulhw x4546454645464546,%mm0\t/* V35 */\n\tpsraw $1, %mm2\t\t\t/* t97 */\n\tmovq %mm5, %mm4\t\t\t/* duplicate t90=t93 */\n\tpsubsw %mm2, %mm1\t\t/* V32 ; free mm2 */\n\tpmulhw x61f861f861f861f8,%mm1\t/* V36 */\n\tpsllw $1, %mm7\t\t\t/* t107 */\n\tpaddsw %mm3, %mm5\t\t/* V31 */\n\tpsubsw %mm3, %mm4\t\t/* V30 ; free mm3 */\n\tpmulhw x5a825a825a825a82,%mm4\t/* V34 */\n\tnop\n\tpsubsw %mm1, %mm0\t\t/* V38 */\n\tpsubsw %mm7, %mm1\t\t/* V37 ; free mm7 */\n\tpsllw $1, %mm1\t\t\t/* t114 */\n\t/* move from the next block */\n\tmovq %mm6, %mm3\t\t\t/* duplicate V25 */\n\t/* move from the next block */\n\tmovq 8*4(%esi), %mm7\t\t/* V22 */\n\tpsllw $1, %mm0\t\t\t/* t110 */\n\tpsubsw %mm5, %mm0\t\t/* V39 (mm5 needed for next block) */\n\tpsllw $2, %mm4\t\t\t/* t112 */\n\t/* moved from the next block */\n\tmovq 8*12(%esi), %mm2\t\t/* V23 */\n\tpsubsw %mm0, %mm4\t\t/* V40 */\n\tpaddsw %mm4, %mm1\t\t/* V41; free mm0 */\n\t/* moved from the next block */\n\tpsllw $1, %mm2\t\t\t/* t117=t125 */\n\t/* column 0: output butterfly */\n\t/* moved above:\n\t* movq %mm6, %mm3\t\t\tduplicate V25\n\t* movq 8*4(%esi), %mm7\t\t\tV22\n\t* movq 8*12(%esi), %mm2\t\tV23\n\t* psllw $1, %mm2\t\t\tt117=t125\n\t*/\n\tpsubsw %mm1, %mm6\t\t/* tm6 */\n\tpaddsw %mm1, %mm3\t\t/* tm8; free mm1 */\n\tmovq %mm7, %mm1\t\t\t/* duplicate V22 */\n\tpaddsw %mm5, %mm7\t\t/* tm0 */\n\tmovq %mm3, 8*8(%esi)\t\t/* tm8; free mm3 */\n\tpsubsw %mm5, %mm1\t\t/* tm14; free mm5 */\n\tmovq %mm6, 8*6(%esi)\t\t/* tm6; free mm6 */\n\tmovq %mm2, %mm3\t\t\t/* duplicate t117=t125 */\n\tmovq (%esi), %mm6\t\t/* V24 */\n\tpaddsw %mm0, %mm2\t\t/* tm2 */\n\tmovq %mm7, (%esi)\t\t/* tm0; free mm7 */\n\tpsubsw %mm0, %mm3\t\t/* tm12; free mm0 */\n\tmovq %mm1, 8*14(%esi)\t\t/* tm14; free mm1 */\n\tpsllw $1, %mm6\t\t\t/* t119=t123 */\n\tmovq %mm2, 8*2(%esi)\t\t/* tm2; free mm2 */\n\tmovq %mm6, %mm0\t\t\t/* duplicate t119=t123 */\n\tmovq %mm3, 8*12(%esi)\t\t/* tm12; free mm3 */\n\tpaddsw %mm4, %mm6\t\t/* tm4 */\n\t/* moved from next block */\n\tmovq 8*5(%ecx), %mm1\n\tpsubsw %mm4, %mm0\t\t/* tm10; free mm4 */\n\t/* moved from next block */\n\tpmulhw 8*5(%esi), %mm1\t\t/* V5 */\n\tmovq %mm6, 8*4(%esi)\t\t/* tm4; free mm6 */\n\tmovq %mm0, 8*10(%esi)\t\t/* tm10; free mm0 */\n\t/* column 1: even part\n\t* use V5, V13, V1, V9 to produce V56..V59\n\t*/\n\t/* moved to prev block:\n\t*\tmovq 8*5(%ecx), %mm1\n\t*\tpmulhw 8*5(%esi), %mm1\t\t V5\n\t*/\n\tmovq 8*13(%ecx), %mm7\n\tpsllw $1, %mm1\t\t\t/* t128=t130 */\n\tpmulhw 8*13(%esi), %mm7\t\t/* V13 */\n\tmovq %mm1, %mm2\t\t\t/* duplicate t128=t130 */\n\tmovq 8(%ecx), %mm3\n\tpmulhw 8(%esi), %mm3\t\t/* V1 */\n\tmovq 8*9(%ecx), %mm5\n\tpsubsw %mm7, %mm1\t\t/* V50 */\n\tpmulhw 8*9(%esi), %mm5\t\t/* V9 */\n\tpaddsw %mm7, %mm2\t\t/* V51 */\n\tpmulhw x5a825a825a825a82, %mm1\t/* 23170 ->V52 */\n\tmovq %mm2, %mm6\t\t\t/* duplicate V51 */\n\tpsraw $1, %mm2\t\t\t/* t138=t144 */\n\tmovq %mm3, %mm4\t\t\t/* duplicate V1 */\n\tpsraw $2, %mm6\t\t\t/* t136 */\n\tpaddsw %mm5, %mm3\t\t/* V53 */\n\tpsubsw %mm5, %mm4\t\t/* V54 ;mm5 free */\n\tmovq %mm3, %mm7\t\t\t/* duplicate V53 */\n\t/* moved from next block */\n\tmovq 8*11(%ecx), %mm0\n\tpsraw $1, %mm4\t\t\t/* t140=t142 */\n\tpsubsw %mm6, %mm1\t\t/* V55 ; mm6 free */\n\tpaddsw %mm2, %mm3\t\t/* V56 */\n\tmovq %mm4, %mm5\t\t\t/* duplicate t140=t142 */\n\tpaddsw %mm1, %mm4\t\t/* V57 */\n\tmovq %mm3, 8*5(%esi)\t\t/* V56 */\n\tpsubsw %mm1, %mm5\t\t/* V58; mm1 free */\n\tmovq %mm4, 8*13(%esi)\t\t/* V57 */\n\tpsubsw %mm2, %mm7\t\t/* V59; mm2 free */\n\tmovq %mm5, 8*9(%esi)\t\t/* V58 */\n\t/* keep mm7 alive all along the next block\n\t*\tmovq %mm7, 8(%esi)\t\tV59\n\t* moved above\n\t*\tmovq 8*11(%ecx), %mm0\n\t*/\n\tpmulhw 8*11(%esi), %mm0\t\t/* V11 */\n\tmovq 8*7(%ecx), %mm6\n\tpmulhw 8*7(%esi), %mm6\t\t/* V7 */\n\tmovq 8*15(%ecx), %mm4\n\tmovq %mm0, %mm3\t\t\t/* duplicate V11 */\n\tpmulhw 8*15(%esi), %mm4\t\t/* V15 */\n\tmovq 8*3(%ecx), %mm5\n\tpsllw $1, %mm6\t\t\t/* t146=t152 */\n\tpmulhw 8*3(%esi), %mm5\t\t/* V3 */\n\tpaddsw %mm6, %mm0\t\t/* V63 */\n\t/* note that V15 computation has a correction step: \n\t* this is a0magic' constant that rebiases the results to be closer to the\n\t* expected result.  this magic constant can be refined to reduce the error\n\t* even more by doing the correction step in a later stage when the number\n\t* is actually multiplied by 16\n\t*/\n\tpaddw x0005000200010001, %mm4\n\tpsubsw %mm6, %mm3\t\t/* V60 ; free mm6 */\n\tpsraw $1, %mm0\t\t\t/* t154=t156 */\n\tmovq %mm3, %mm1\t\t\t/* duplicate V60 */\n\tpmulhw x539f539f539f539f, %mm1\t/* V67 */\n\tmovq %mm5, %mm6\t\t\t/* duplicate V3 */\n\tpsraw $2, %mm4\t\t\t/* t148=t150 */\n\tpaddsw %mm4, %mm5\t\t/* V61 */\n\tpsubsw %mm4, %mm6\t\t/* V62 ; free mm4 */\n\tmovq %mm5, %mm4\t\t\t/* duplicate V61 */\n\tpsllw $1, %mm1\t\t\t/* t169 */\n\tpaddsw %mm0, %mm5\t\t/* V65 -> result */\n\tpsubsw %mm0, %mm4\t\t/* V64 ; free mm0 */\n\tpmulhw x5a825a825a825a82, %mm4\t/* V68 */\n\tpsraw $1, %mm3\t\t\t/* t158 */\n\tpsubsw %mm6, %mm3\t\t/* V66 */\n\tmovq %mm5, %mm2\t\t\t/* duplicate V65 */\n\tpmulhw x61f861f861f861f8, %mm3\t/* V70 */\n\tpsllw $1, %mm6\t\t\t/* t165 */\n\tpmulhw x4546454645464546, %mm6\t/* V69 */\n\tpsraw $1, %mm2\t\t\t/* t172 */\n\t/* moved from next block */\n\tmovq 8*5(%esi), %mm0\t\t/* V56 */\n\tpsllw $1, %mm4\t\t\t/* t174 */\n\t/* moved from next block */\n\tpsraw $1, %mm0\t\t\t/* t177=t188 */\n\tnop\n\tpsubsw %mm3, %mm6\t\t/* V72 */\n\tpsubsw %mm1, %mm3\t\t/* V71 ; free mm1 */\n\tpsubsw %mm2, %mm6\t\t/* V73 ; free mm2 */\n\t/* moved from next block */\n\tpsraw $1, %mm5\t\t\t/* t178=t189 */\n\tpsubsw %mm6, %mm4\t\t/* V74 */\n\t/* moved from next block */\n\tmovq %mm0, %mm1\t\t\t/* duplicate t177=t188 */\n\tpaddsw %mm4, %mm3\t\t/* V75 */\n\t/* moved from next block */\n\tpaddsw %mm5, %mm0\t\t/* tm1 */\n\t/* location\n\t*  5 - V56\n\t* 13 - V57\n\t*  9 - V58\n\t*  X - V59, mm7\n\t*  X - V65, mm5\n\t*  X - V73, mm6\n\t*  X - V74, mm4\n\t*  X - V75, mm3\n\t* free mm0, mm1 & mm2\n\t* moved above\n\t*\tmovq 8*5(%esi), %mm0\t\tV56\n\t*\tpsllw $1, %mm0\t\t\tt177=t188 ! new !!\n\t*\tpsllw $1, %mm5\t\t\tt178=t189 ! new !!\n\t*\tmovq %mm0, %mm1\t\t\tduplicate t177=t188\n\t*\tpaddsw %mm5, %mm0\t\ttm1\n\t*/\n\tmovq 8*13(%esi), %mm2\t\t/* V57 */\n\tpsubsw %mm5, %mm1\t\t/* tm15; free mm5 */\n\tmovq %mm0, 8(%esi)\t\t/* tm1; free mm0 */\n\tpsraw $1, %mm7\t\t\t/* t182=t184 ! new !! */\n\t/* save the store as used directly in the transpose\n\t*\tmovq %mm1, 120(%esi)\t\ttm15; free mm1\n\t*/\n\tmovq %mm7, %mm5\t\t\t/* duplicate t182=t184 */\n\tpsubsw %mm3, %mm7\t\t/* tm7 */\n\tpaddsw %mm3, %mm5\t\t/* tm9; free mm3 */\n\tmovq 8*9(%esi), %mm0\t\t/* V58 */\n\tmovq %mm2, %mm3\t\t\t/* duplicate V57 */\n\tmovq %mm7, 8*7(%esi)\t\t/* tm7; free mm7 */\n\tpsubsw %mm6, %mm3\t\t/* tm13 */\n\tpaddsw %mm6, %mm2\t\t/* tm3 ; free mm6 */\n\t/* moved up from the transpose */\n\tmovq %mm3, %mm7\n\t/* moved up from the transpose */\n\tpunpcklwd %mm1, %mm3\n\tmovq %mm0, %mm6\t\t\t/* duplicate V58 */\n\tmovq %mm2, 8*3(%esi)\t\t/* tm3; free mm2 */\n\tpaddsw %mm4, %mm0\t\t/* tm5 */\n\tpsubsw %mm4, %mm6\t\t/* tm11; free mm4 */\n\t/* moved up from the transpose */\n\tpunpckhwd %mm1, %mm7\n\tmovq %mm0, 8*5(%esi)\t\t/* tm5; free mm0 */\n\t/* moved up from the transpose */\n\tmovq %mm5, %mm2\n\t/* transpose - M4 part\n\t*  ---------       ---------\n\t* | M1 | M2 |     | M1'| M3'|\n\t*  ---------  -->  ---------\n\t* | M3 | M4 |     | M2'| M4'|\n\t*  ---------       ---------\n\t* Two alternatives: use full mmword approach so the following code can be\n\t* scheduled before the transpose is done without stores, or use the faster\n\t* half mmword stores (when possible)\n\t*/\n\tmovd %mm3, 8*9+4(%esi)\t\t/* MS part of tmt9 */\n\tpunpcklwd %mm6, %mm5\n\tmovd %mm7, 8*13+4(%esi)\t\t/* MS part of tmt13 */\n\tpunpckhwd %mm6, %mm2\n\tmovd %mm5, 8*9(%esi)\t\t/* LS part of tmt9 */\n\tpunpckhdq %mm3, %mm5\t\t/* free mm3 */\n\tmovd %mm2, 8*13(%esi)\t\t/* LS part of tmt13 */\n\tpunpckhdq %mm7, %mm2\t\t/* free mm7 */\n\t/* moved up from the M3 transpose */\n\tmovq 8*8(%esi), %mm0\n\t/* moved up from the M3 transpose */\n\tmovq 8*10(%esi), %mm1\n\t/* moved up from the M3 transpose */\n\tmovq %mm0, %mm3\n\t/* shuffle the rest of the data, and write it with 2 mmword writes */\n\tmovq %mm5, 8*11(%esi)\t\t/* tmt11 */\n\t/* moved up from the M3 transpose */\n\tpunpcklwd %mm1, %mm0\n\tmovq %mm2, 8*15(%esi)\t\t/* tmt15 */\n\t/* moved up from the M3 transpose */\n\tpunpckhwd %mm1, %mm3\n\t/* transpose - M3 part\n\t* moved up to previous code section\n\t*\tmovq 8*8(%esi), %mm0\n\t*\tmovq 8*10(%esi), %mm1\n\t*\tmovq %mm0, %mm3\n\t*\tpunpcklwd %mm1, %mm0\n\t*\tpunpckhwd %mm1, %mm3\n\t*/\n\tmovq 8*12(%esi), %mm6\n\tmovq 8*14(%esi), %mm4\n\tmovq %mm6, %mm2\n\t/* shuffle the data and write the lower parts of the transposed in 4 dwords */\n\tpunpcklwd %mm4, %mm6\n\tmovq %mm0, %mm1\n\tpunpckhdq %mm6, %mm1\n\tmovq %mm3, %mm7\n\tpunpckhwd %mm4, %mm2\t\t/* free mm4 */\n\tpunpckldq %mm6, %mm0\t\t/* free mm6 */\n\t/* moved from next block */\n\tmovq 8*13(%esi), %mm4\t\t/* tmt13 */\n\tpunpckldq %mm2, %mm3\n\tpunpckhdq %mm2, %mm7\t\t/* free mm2 */\n\t/* moved from next block */\n\tmovq %mm3, %mm5\t\t\t/* duplicate tmt5 */\n\t/* column 1: even part (after transpose)\n\t* moved above\n\t*\tmovq %mm3, %mm5\t\t\tduplicate tmt5\n\t*\tmovq 8*13(%esi), %mm4\t\ttmt13\n\t*/\n\tpsubsw %mm4, %mm3\t\t/* V134 */\n\tpmulhw x5a825a825a825a82, %mm3\t/* 23170 ->V136 */\n\tmovq 8*9(%esi), %mm6\t\t/* tmt9 */\n\tpaddsw %mm4, %mm5\t\t/* V135 ; mm4 free */\n\tmovq %mm0, %mm4\t\t\t/* duplicate tmt1 */\n\tpaddsw %mm6, %mm0\t\t/* V137 */\n\tpsubsw %mm6, %mm4\t\t/* V138 ; mm6 free */\n\tpsllw $2, %mm3\t\t\t/* t290 */\n\tpsubsw %mm5, %mm3\t\t/* V139 */\n\tmovq %mm0, %mm6\t\t\t/* duplicate V137 */\n\tpaddsw %mm5, %mm0\t\t/* V140 */\n\tmovq %mm4, %mm2\t\t\t/* duplicate V138 */\n\tpaddsw %mm3, %mm2\t\t/* V141 */\n\tpsubsw %mm3, %mm4\t\t/* V142 ; mm3 free */\n\tmovq %mm0, 8*9(%esi)\t\t/* V140 */\n\tpsubsw %mm5, %mm6\t\t/* V143 ; mm5 free */\n\t/* moved from next block */\n\tmovq 8*11(%esi), %mm0\t\t/* tmt11 */\n\tmovq %mm2, 8*13(%esi)\t\t/* V141 */\n\t/* moved from next block */\n\tmovq %mm0, %mm2\t\t\t/* duplicate tmt11 */\n\t/* column 1: odd part (after transpose) */\n\t/* moved up to the prev block\n\t*\tmovq 8*11(%esi), %mm0\t\ttmt11\n\t*\tmovq %mm0, %mm2\t\t\tduplicate tmt11\n\t*/\n\tmovq 8*15(%esi), %mm5\t\t/* tmt15 */\n\tpsubsw %mm7, %mm0\t\t/* V144 */\n\tmovq %mm0, %mm3\t\t\t/* duplicate V144 */\n\tpaddsw %mm7, %mm2\t\t/* V147 ; free mm7 */\n\tpmulhw x539f539f539f539f, %mm0\t/* 21407-> V151 */\n\tmovq %mm1, %mm7\t\t\t/* duplicate tmt3 */\n\tpaddsw %mm5, %mm7\t\t/* V145 */\n\tpsubsw %mm5, %mm1\t\t/* V146 ; free mm5 */\n\tpsubsw %mm1, %mm3\t\t/* V150 */\n\tmovq %mm7, %mm5\t\t\t/* duplicate V145 */\n\tpmulhw x4546454645464546, %mm1\t/* 17734-> V153 */\n\tpsubsw %mm2, %mm5\t\t/* V148 */\n\tpmulhw x61f861f861f861f8, %mm3\t/* 25080-> V154 */\n\tpsllw $2, %mm0\t\t\t/* t311 */\n\tpmulhw x5a825a825a825a82, %mm5\t/* 23170-> V152 */\n\tpaddsw %mm2, %mm7\t\t/* V149 ; free mm2 */\n\tpsllw $1, %mm1\t\t\t/* t313 */\n\tnop\t/* without the nop - freeze here for one clock */\n\tmovq %mm3, %mm2\t\t\t/* duplicate V154 */\n\tpsubsw %mm0, %mm3\t\t/* V155 ; free mm0 */\n\tpsubsw %mm2, %mm1\t\t/* V156 ; free mm2 */\n\t/* moved from the next block */\n\tmovq %mm6, %mm2\t\t\t/* duplicate V143 */\n\t/* moved from the next block */\n\tmovq 8*13(%esi), %mm0\t\t/* V141 */\n\tpsllw $1, %mm1\t\t\t/* t315 */\n\tpsubsw %mm7, %mm1\t\t/* V157 (keep V149) */\n\tpsllw $2, %mm5\t\t\t/* t317 */\n\tpsubsw %mm1, %mm5\t\t/* V158 */\n\tpsllw $1, %mm3\t\t\t/* t319 */\n\tpaddsw %mm5, %mm3\t\t/* V159 */\n\t/* column 1: output butterfly (after transform)\n\t* moved to the prev block\n\t*\tmovq %mm6, %mm2\t\t\tduplicate V143\n\t*\tmovq 8*13(%esi), %mm0\t\tV141\n\t*/\n\tpsubsw %mm3, %mm2\t\t/* V163 */\n\tpaddsw %mm3, %mm6\t\t/* V164 ; free mm3 */\n\tmovq %mm4, %mm3\t\t\t/* duplicate V142 */\n\tpsubsw %mm5, %mm4\t\t/* V165 ; free mm5 */\n\tmovq %mm2, (%esp)\t\t/* out7 */\n\tpsraw $4, %mm6\n\tpsraw $4, %mm4\n\tpaddsw %mm5, %mm3\t\t/* V162 */\n\tmovq 8*9(%esi), %mm2\t\t/* V140 */\n\tmovq %mm0, %mm5\t\t\t/* duplicate V141 */\n\t/* in order not to perculate this line up,\n\t* we read 72(%esi) very near to this location\n\t*/\n\tmovq %mm6, 8*9(%esi)\t\t/* out9 */\n\tpaddsw %mm1, %mm0\t\t/* V161 */\n\tmovq %mm3, 8(%esp)\t\t/* out5 */\n\tpsubsw %mm1, %mm5\t\t/* V166 ; free mm1 */\n\tmovq %mm4, 8*11(%esi)\t\t/* out11 */\n\tpsraw $4, %mm5\n\tmovq %mm0, 16(%esp)\t\t/* out3 */\n\tmovq %mm2, %mm4\t\t\t/* duplicate V140 */\n\tmovq %mm5, 8*13(%esi)\t\t/* out13 */\n\tpaddsw %mm7, %mm2\t\t/* V160 */\n\t/* moved from the next block */\n\tmovq 8(%esi), %mm0\n\tpsubsw %mm7, %mm4\t\t/* V167 ; free mm7 */\n\t/* moved from the next block */\n\tmovq 8*3(%esi), %mm7\n\tpsraw $4, %mm4\n\tmovq %mm2, 24(%esp)\t\t/* out1 */\n\t/* moved from the next block */\n\tmovq %mm0, %mm1\n\tmovq %mm4, 8*15(%esi)\t\t/* out15 */\n\t/* moved from the next block */\n\tpunpcklwd %mm7, %mm0\n\t/* transpose - M2 parts\n\t* moved up to the prev block\n\t*\tmovq 8(%esi), %mm0\n\t*\tmovq 8*3(%esi), %mm7\n\t*\tmovq %mm0, %mm1\n\t*\tpunpcklwd %mm7, %mm0\n\t*/\n\tmovq 8*5(%esi), %mm5\n\tpunpckhwd %mm7, %mm1\n\tmovq 8*7(%esi), %mm4\n\tmovq %mm5, %mm3\n\t/* shuffle the data and write the lower parts of the trasposed in 4 dwords */\n\tmovd %mm0, 8*8(%esi)\t\t/* LS part of tmt8 */\n\tpunpcklwd %mm4, %mm5\n\tmovd %mm1, 8*12(%esi)\t\t/* LS part of tmt12 */\n\tpunpckhwd %mm4, %mm3\n\tmovd %mm5, 8*8+4(%esi)\t\t/* MS part of tmt8 */\n\tpunpckhdq %mm5, %mm0\t\t/* tmt10 */\n\tmovd %mm3, 8*12+4(%esi)\t\t/* MS part of tmt12 */\n\tpunpckhdq %mm3, %mm1\t\t/* tmt14 */\n\t/* transpose - M1 parts */\n\tmovq (%esi), %mm7\n\tmovq 8*2(%esi), %mm2\n\tmovq %mm7, %mm6\n\tmovq 8*4(%esi), %mm5\n\tpunpcklwd %mm2, %mm7\n\tmovq 8*6(%esi), %mm4\n\tpunpckhwd %mm2, %mm6\t\t/* free mm2 */\n\tmovq %mm5, %mm3\n\tpunpcklwd %mm4, %mm5\n\tpunpckhwd %mm4, %mm3\t\t/* free mm4 */\n\tmovq %mm7, %mm2\n\tmovq %mm6, %mm4\n\tpunpckldq %mm5, %mm7\t\t/* tmt0 */\n\tpunpckhdq %mm5, %mm2\t\t/* tmt2 ; free mm5 */\n\t/* shuffle the rest of the data, and write it with 2 mmword writes */\n\tpunpckldq %mm3, %mm6\t\t/* tmt4 */\n\t/* moved from next block */\n\tmovq %mm2, %mm5\t\t\t/* duplicate tmt2 */\n\tpunpckhdq %mm3, %mm4\t\t/* tmt6 ; free mm3 */\n\t/* moved from next block */\n\tmovq %mm0, %mm3\t\t\t/* duplicate tmt10 */\n\t/* column 0: odd part (after transpose)\n\t*moved up to prev block\n\t*\tmovq %mm0, %mm3\t\t\tduplicate tmt10\n\t*\tmovq %mm2, %mm5\t\t\tduplicate tmt2\n\t*/\n\tpsubsw %mm4, %mm0\t\t/* V110 */\n\tpaddsw %mm4, %mm3\t\t/* V113 ; free mm4 */\n\tmovq %mm0, %mm4\t\t\t/* duplicate V110 */\n\tpaddsw %mm1, %mm2\t\t/* V111 */\n\tpmulhw x539f539f539f539f, %mm0\t/* 21407-> V117 */\n\tpsubsw %mm1, %mm5\t\t/* V112 ; free mm1 */\n\tpsubsw %mm5, %mm4\t\t/* V116 */\n\tmovq %mm2, %mm1\t\t\t/* duplicate V111 */\n\tpmulhw x4546454645464546, %mm5\t/* 17734-> V119 */\n\tpsubsw %mm3, %mm2\t\t/* V114 */\n\tpmulhw x61f861f861f861f8, %mm4\t/* 25080-> V120 */\n\tpaddsw %mm3, %mm1\t\t/* V115 ; free mm3 */\n\tpmulhw x5a825a825a825a82, %mm2\t/* 23170-> V118 */\n\tpsllw $2, %mm0\t\t\t/* t266 */\n\tmovq %mm1, (%esi)\t\t/* save V115 */\n\tpsllw $1, %mm5\t\t\t/* t268 */\n\tpsubsw %mm4, %mm5\t\t/* V122 */\n\tpsubsw %mm0, %mm4\t\t/* V121 ; free mm0 */\n\tpsllw $1, %mm5\t\t\t/* t270 */\n\tpsubsw %mm1, %mm5\t\t/* V123 ; free mm1 */\n\tpsllw $2, %mm2\t\t\t/* t272 */\n\tpsubsw %mm5, %mm2\t\t/* V124 (keep V123) */\n\tpsllw $1, %mm4\t\t\t/* t274 */\n\tmovq %mm5, 8*2(%esi)\t\t/* save V123 ; free mm5 */\n\tpaddsw %mm2, %mm4\t\t/* V125 (keep V124) */\n\t/* column 0: even part (after transpose) */\n\tmovq 8*12(%esi), %mm0\t\t/* tmt12 */\n\tmovq %mm6, %mm3\t\t\t/* duplicate tmt4 */\n\tpsubsw %mm0, %mm6\t\t/* V100 */\n\tpaddsw %mm0, %mm3\t\t/* V101 ; free mm0 */\n\tpmulhw x5a825a825a825a82, %mm6\t/* 23170 ->V102 */\n\tmovq %mm7, %mm5\t\t\t/* duplicate tmt0 */\n\tmovq 8*8(%esi), %mm1\t\t/* tmt8 */\n\tpaddsw %mm1, %mm7\t\t/* V103 */\n\tpsubsw %mm1, %mm5\t\t/* V104 ; free mm1 */\n\tmovq %mm7, %mm0\t\t\t/* duplicate V103 */\n\tpsllw $2, %mm6\t\t\t/* t245 */\n\tpaddsw %mm3, %mm7\t\t/* V106 */\n\tmovq %mm5, %mm1\t\t\t/* duplicate V104 */\n\tpsubsw %mm3, %mm6\t\t/* V105 */\n\tpsubsw %mm3, %mm0\t\t/* V109; free mm3 */\n\tpaddsw %mm6, %mm5\t\t/* V107 */\n\tpsubsw %mm6, %mm1\t\t/* V108 ; free mm6 */\n\t/* column 0: output butterfly (after transform) */\n\tmovq %mm1, %mm3\t\t\t/* duplicate V108 */\n\tpaddsw %mm2, %mm1\t\t/* out4 */\n\tpsraw $4, %mm1\n\tpsubsw %mm2, %mm3\t\t/* out10 ; free mm2 */\n\tpsraw $4, %mm3\n\tmovq %mm0, %mm6\t\t\t/* duplicate V109 */\n\tmovq %mm1, 8*4(%esi)\t\t/* out4 ; free mm1 */\n\tpsubsw %mm4, %mm0\t\t/* out6 */\n\tmovq %mm3, 8*10(%esi)\t\t/* out10 ; free mm3 */\n\tpsraw $4, %mm0\n\tpaddsw %mm4, %mm6\t\t/* out8 ; free mm4 */\n\tmovq %mm7, %mm1\t\t\t/* duplicate V106 */\n\tmovq %mm0, 8*6(%esi)\t\t/* out6 ; free mm0 */\n\tpsraw $4, %mm6\n\tmovq (%esi), %mm4\t\t/* V115 */\n\tmovq %mm6, 8*8(%esi)\t\t/* out8 ; free mm6 */\n\tmovq %mm5, %mm2\t\t\t/* duplicate V107 */\n\tmovq 8*2(%esi), %mm3\t\t/* V123 */\n\tpaddsw %mm4, %mm7\t\t/* out0 */\n\t/* moved up from next block */\n\tmovq 16(%esp), %mm0\n\tpsraw $4, %mm7\n\t/* moved up from next block */\n\tmovq 8(%esp), %mm6 \n\tpsubsw %mm4, %mm1\t\t/* out14 ; free mm4 */\n\tpaddsw %mm3, %mm5\t\t/* out2 */\n\tpsraw $4, %mm1\n\tmovq %mm7, (%esi)\t\t/* out0 ; free mm7 */\n\tpsraw $4, %mm5\n\tmovq %mm1, 8*14(%esi)\t\t/* out14 ; free mm1 */\n\tpsubsw %mm3, %mm2\t\t/* out12 ; free mm3 */\n\tmovq %mm5, 8*2(%esi)\t\t/* out2 ; free mm5 */\n\tpsraw $4, %mm2\n\t/* moved up to the prev block */\n\tmovq (%esp), %mm4\n\t/* moved up to the prev block */\n\tpsraw $4, %mm0\n\tmovq %mm2, 8*12(%esi)\t\t/* out12 ; free mm2 */\n\t/* moved up to the prev block */\n\tpsraw $4, %mm6\n\t/* move back the data to its correct place\n\t* moved up to the prev block\n\t*\tmovq 16(%esp), %mm0\n\t*\tmovq 8(%esp), %mm6\n\t*\tmovq (%esp), %mm4\n\t*\tpsraw $4, %mm0\n\t*\tpsraw $4, %mm6\n\t*/\n\tmovq 24(%esp), %mm1\n\tpsraw $4, %mm4\n\tmovq %mm0, 8*3(%esi)\t\t/* out3 */\n\tpsraw $4, %mm1\n\tmovq %mm6, 8*5(%esi)\t\t/* out5 */\n\tmovq %mm4, 8*7(%esi)\t\t/* out7 */\n\tmovq %mm1, 8(%esi)\t\t/* out1 */\n\n\tpopl %edi    /* Pop off the temp variables */\n\tpopl %edi\n\tpopl %edi\n\tpopl %edi\n\tpopl %edi\n\tpopl %edi\n\tpopl %edi\n\tpopl %edi\n\n\tpopl %edi    /* Pop off the old variables */\n\tpopl %esi\n\tpopl %edx\n\tpopl %ecx\n\tpopl %ebx\n\tmovl %ebp, %esp\n\tpopl %ebp\n\n\tret\n\t.Lfe1:\n\t.size\t IDCT_mmx,.Lfe1-IDCT_mmx\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/video/mmxidct_orig.S",
    "content": "/*\n * the input data is tranposed and each 16 bit element in the 8x8 matrix\n * is left aligned:\n * for example in 11...1110000 format\n * If the iDCT is of I macroblock then 0.5 needs to be added to the;DC Component\n * (element[0][0] of the matrix)\n */\n\n/* extrn re_matrix */\n\n/* constants */\n\n.data\n\t.align 16\n\t.type\t preSC, @object\npreSC:  .short  16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520\n        .short  22725, 31521, 29692, 26722, 22725, 17855, 12299, 6270\n        .short  21407, 29692, 27969, 25172, 21407, 16819, 11585, 5906\n        .short  19266, 26722, 25172, 22654, 19266, 15137, 10426, 5315\n        .short  16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520\n        .short  12873, 17855, 16819, 15137, 25746, 20228, 13933, 7103\n        .short  17734, 24598, 23170, 20853, 17734, 13933, 9597, 4892\n        .short  18081, 25080, 23624, 21261, 18081, 14206, 9785, 4988\n\t.size\tpreSC, 128\n\t.align  8\n\t.type\tx0005000200010001, @object\n\t.size\tx0005000200010001, 8\nx0005000200010001:\n\t.long\t0x00010001, 0x00050002\n\t.align  8\n\t.type\tx0040000000000000, @object\n\t.size\tx0040000000000000, 8\nx0040000000000000:\n\t.long\t0, 0x00400000\n\t.align  8\n\t.type\tx5a825a825a825a82, @object\n\t.size\tx5a825a825a825a82, 8\nx5a825a825a825a82:\n\t.long\t0x5a825a82, 0x5a825a82\n\t.align  8\n\t.type\tx539f539f539f539f, @object\n\t.size\tx539f539f539f539f, 8\nx539f539f539f539f:\n\t.long\t0x539f539f, 0x539f539f\n\t.align  8\n\t.type\tx4546454645464546, @object\n\t.size\tx4546454645464546, 8\nx4546454645464546:\n\t.long\t0x45464546, 0x45464546\n\t.align  8\n\t.type\tx61f861f861f861f8, @object\n\t.size\tx61f861f861f861f8, 8\nx61f861f861f861f8:\n\t.long\t0x61f861f8, 0x61f861f8\n/* Static variables */\n\t.align 8\n\t.type\t x0, @object\n\t.size\t x0, 8\nx0:\n\t.long 0, 0\n/* Procedure */\n\n\n\t.align 8\n.text\n\t.align 4\n.globl IDCT_mmx\n\t.type\t IDCT_mmx, @function\nIDCT_mmx:\n\tpushl %ebp\n\tmovl %esp, %ebp\n\tpushl %ebx\n\tpushl %ecx\n\tpushl %edx\n\tpushl %esi\n\tpushl %edi\n\n\tpushl $0    /* allocate the temp variables */\n\tpushl $0\n\tpushl $0\n\tpushl $0\n\tpushl $0\n\tpushl $0\n\tpushl $0\n\tpushl $0\n\n\tmovl 8(%ebp), %esi\t\t/* source matrix */\n\tleal preSC, %ecx\n/* column 0: even part\n * use V4, V12, V0, V8 to produce V22..V25\n */\n\tmovq 8*12(%ecx), %mm0\t\t/* maybe the first mul can be done together */\n\t\t\t\t\t\t\t\t/* with the dequantization in iHuff module */\n\tpmulhw 8*12(%esi), %mm0\t\t/* V12 */\n\tmovq 8*4(%ecx), %mm1\n\tpmulhw 8*4(%esi), %mm1\t\t/* V4 */\n\tmovq (%ecx), %mm3\n\tpsraw $1, %mm0\t\t\t/* t64=t66 */\n\tpmulhw (%esi), %mm3\t\t/* V0 */\n\tmovq 8*8(%ecx), %mm5\t\t/* duplicate V4 */\n\tmovq %mm1, %mm2\t\t\t/* added 11/1/96 */\n\tpmulhw 8*8(%esi),%mm5\t\t/* V8 */\n\tpsubsw %mm0, %mm1\t\t/* V16 */\n\tpmulhw x5a825a825a825a82, %mm1\t/* 23170 ->V18 */\n\tpaddsw %mm0, %mm2\t\t/* V17 */\n\tmovq %mm2, %mm0\t\t\t/* duplicate V17 */\n\tpsraw $1, %mm2\t\t\t/* t75=t82 */\n\tpsraw $2, %mm0\t\t\t/* t72 */\n\tmovq %mm3, %mm4\t\t\t/* duplicate V0 */\n\tpaddsw %mm5, %mm3\t\t/* V19 */\n\tpsubsw %mm5, %mm4\t\t/* V20 ;mm5 free */\n/* moved from the block below */\n\tmovq 8*10(%ecx), %mm7\n\tpsraw $1, %mm3\t\t\t/* t74=t81 */\n\tmovq %mm3, %mm6\t\t\t/* duplicate t74=t81 */\n\tpsraw $2, %mm4\t\t\t/* t77=t79 */\n\tpsubsw %mm0, %mm1\t\t/* V21 ; mm0 free */\n\tpaddsw %mm2, %mm3\t\t/* V22 */\n\tmovq %mm1, %mm5\t\t\t/* duplicate V21 */\n\tpaddsw %mm4, %mm1\t\t/* V23 */\n\tmovq %mm3, 8*4(%esi)\t\t/* V22 */\n\tpsubsw %mm5, %mm4\t\t/* V24; mm5 free */\n\tmovq %mm1, 8*12(%esi)\t\t/* V23 */\n\tpsubsw %mm2, %mm6\t\t/* V25; mm2 free */\n\tmovq %mm4, (%esi)\t\t/* V24 */\n/* keep mm6 alive all along the next block */\n\t/* movq %mm6, 8*8(%esi) \tV25 */\n/* column 0: odd part\n * use V2, V6, V10, V14 to produce V31, V39, V40, V41\n */\n/* moved above: movq 8*10(%ecx), %mm7 */\n\n\tpmulhw 8*10(%esi), %mm7\t\t/* V10 */\n\tmovq 8*6(%ecx), %mm0\n\tpmulhw 8*6(%esi), %mm0\t\t/* V6 */\n\tmovq 8*2(%ecx), %mm5\n\tmovq %mm7, %mm3\t\t\t/* duplicate V10 */\n\tpmulhw 8*2(%esi), %mm5\t\t/* V2 */\n\tmovq 8*14(%ecx), %mm4\n\tpsubsw %mm0, %mm7\t\t/* V26 */\n\tpmulhw 8*14(%esi), %mm4\t\t/* V14 */\n\tpaddsw %mm0, %mm3\t\t/* V29 ; free mm0 */\n\tmovq %mm7, %mm1\t\t\t/* duplicate V26 */\n\tpsraw $1, %mm3\t\t\t/* t91=t94 */\n\tpmulhw x539f539f539f539f,%mm7\t/* V33 */\n\tpsraw $1, %mm1\t\t\t/* t96 */\n\tmovq %mm5, %mm0\t\t\t/* duplicate V2 */\n\tpsraw $2, %mm4\t\t\t/* t85=t87 */\n\tpaddsw %mm4,%mm5\t\t/* V27 */\n\tpsubsw %mm4, %mm0\t\t/* V28 ; free mm4 */\n\tmovq %mm0, %mm2\t\t\t/* duplicate V28 */\n\tpsraw $1, %mm5\t\t\t/* t90=t93 */\n\tpmulhw x4546454645464546,%mm0\t/* V35 */\n\tpsraw $1, %mm2\t\t\t/* t97 */\n\tmovq %mm5, %mm4\t\t\t/* duplicate t90=t93 */\n\tpsubsw %mm2, %mm1\t\t/* V32 ; free mm2 */\n\tpmulhw x61f861f861f861f8,%mm1\t/* V36 */\n\tpsllw $1, %mm7\t\t\t/* t107 */\n\tpaddsw %mm3, %mm5\t\t/* V31 */\n\tpsubsw %mm3, %mm4\t\t/* V30 ; free mm3 */\n\tpmulhw x5a825a825a825a82,%mm4\t/* V34 */\n\tnop\n\tpsubsw %mm1, %mm0\t\t/* V38 */\n\tpsubsw %mm7, %mm1\t\t/* V37 ; free mm7 */\n\tpsllw $1, %mm1\t\t\t/* t114 */\n/* move from the next block */\n\tmovq %mm6, %mm3\t\t\t/* duplicate V25 */\n/* move from the next block */\n\tmovq 8*4(%esi), %mm7\t\t/* V22 */\n\tpsllw $1, %mm0\t\t\t/* t110 */\n\tpsubsw %mm5, %mm0\t\t/* V39 (mm5 needed for next block) */\n\tpsllw $2, %mm4\t\t\t/* t112 */\n/* moved from the next block */\n\tmovq 8*12(%esi), %mm2\t\t/* V23 */\n\tpsubsw %mm0, %mm4\t\t/* V40 */\n\tpaddsw %mm4, %mm1\t\t/* V41; free mm0 */\n/* moved from the next block */\n\tpsllw $1, %mm2\t\t\t/* t117=t125 */\n/* column 0: output butterfly */\n/* moved above:\n * movq %mm6, %mm3\t\t\tduplicate V25\n * movq 8*4(%esi), %mm7\t\t\tV22\n * movq 8*12(%esi), %mm2\t\tV23\n * psllw $1, %mm2\t\t\tt117=t125\n */\n\tpsubsw %mm1, %mm6\t\t/* tm6 */\n\tpaddsw %mm1, %mm3\t\t/* tm8; free mm1 */\n\tmovq %mm7, %mm1\t\t\t/* duplicate V22 */\n\tpaddsw %mm5, %mm7\t\t/* tm0 */\n\tmovq %mm3, 8*8(%esi)\t\t/* tm8; free mm3 */\n\tpsubsw %mm5, %mm1\t\t/* tm14; free mm5 */\n\tmovq %mm6, 8*6(%esi)\t\t/* tm6; free mm6 */\n\tmovq %mm2, %mm3\t\t\t/* duplicate t117=t125 */\n\tmovq (%esi), %mm6\t\t/* V24 */\n\tpaddsw %mm0, %mm2\t\t/* tm2 */\n\tmovq %mm7, (%esi)\t\t/* tm0; free mm7 */\n\tpsubsw %mm0, %mm3\t\t/* tm12; free mm0 */\n\tmovq %mm1, 8*14(%esi)\t\t/* tm14; free mm1 */\n\tpsllw $1, %mm6\t\t\t/* t119=t123 */\n\tmovq %mm2, 8*2(%esi)\t\t/* tm2; free mm2 */\n\tmovq %mm6, %mm0\t\t\t/* duplicate t119=t123 */\n\tmovq %mm3, 8*12(%esi)\t\t/* tm12; free mm3 */\n\tpaddsw %mm4, %mm6\t\t/* tm4 */\n/* moved from next block */\n\tmovq 8*5(%ecx), %mm1\n\tpsubsw %mm4, %mm0\t\t/* tm10; free mm4 */\n/* moved from next block */\n\tpmulhw 8*5(%esi), %mm1\t\t/* V5 */\n\tmovq %mm6, 8*4(%esi)\t\t/* tm4; free mm6 */\n\tmovq %mm0, 8*10(%esi)\t\t/* tm10; free mm0 */\n/* column 1: even part\n * use V5, V13, V1, V9 to produce V56..V59\n */\n/* moved to prev block:\n *\tmovq 8*5(%ecx), %mm1\n *\tpmulhw 8*5(%esi), %mm1\t\t V5\n */\n\tmovq 8*13(%ecx), %mm7\n\tpsllw $1, %mm1\t\t\t/* t128=t130 */\n\tpmulhw 8*13(%esi), %mm7\t\t/* V13 */\n\tmovq %mm1, %mm2\t\t\t/* duplicate t128=t130 */\n\tmovq 8(%ecx), %mm3\n\tpmulhw 8(%esi), %mm3\t\t/* V1 */\n\tmovq 8*9(%ecx), %mm5\n\tpsubsw %mm7, %mm1\t\t/* V50 */\n\tpmulhw 8*9(%esi), %mm5\t\t/* V9 */\n\tpaddsw %mm7, %mm2\t\t/* V51 */\n\tpmulhw x5a825a825a825a82, %mm1\t/* 23170 ->V52 */\n\tmovq %mm2, %mm6\t\t\t/* duplicate V51 */\n\tpsraw $1, %mm2\t\t\t/* t138=t144 */\n\tmovq %mm3, %mm4\t\t\t/* duplicate V1 */\n\tpsraw $2, %mm6\t\t\t/* t136 */\n\tpaddsw %mm5, %mm3\t\t/* V53 */\n\tpsubsw %mm5, %mm4\t\t/* V54 ;mm5 free */\n\tmovq %mm3, %mm7\t\t\t/* duplicate V53 */\n/* moved from next block */\n\tmovq 8*11(%ecx), %mm0\n\tpsraw $1, %mm4\t\t\t/* t140=t142 */\n\tpsubsw %mm6, %mm1\t\t/* V55 ; mm6 free */\n\tpaddsw %mm2, %mm3\t\t/* V56 */\n\tmovq %mm4, %mm5\t\t\t/* duplicate t140=t142 */\n\tpaddsw %mm1, %mm4\t\t/* V57 */\n\tmovq %mm3, 8*5(%esi)\t\t/* V56 */\n\tpsubsw %mm1, %mm5\t\t/* V58; mm1 free */\n\tmovq %mm4, 8*13(%esi)\t\t/* V57 */\n\tpsubsw %mm2, %mm7\t\t/* V59; mm2 free */\n\tmovq %mm5, 8*9(%esi)\t\t/* V58 */\n/* keep mm7 alive all along the next block\n *\tmovq %mm7, 8(%esi)\t\tV59\n * moved above\n *\tmovq 8*11(%ecx), %mm0\n */\n\tpmulhw 8*11(%esi), %mm0\t\t/* V11 */\n\tmovq 8*7(%ecx), %mm6\n\tpmulhw 8*7(%esi), %mm6\t\t/* V7 */\n\tmovq 8*15(%ecx), %mm4\n\tmovq %mm0, %mm3\t\t\t/* duplicate V11 */\n\tpmulhw 8*15(%esi), %mm4\t\t/* V15 */\n\tmovq 8*3(%ecx), %mm5\n\tpsllw $1, %mm6\t\t\t/* t146=t152 */\n\tpmulhw 8*3(%esi), %mm5\t\t/* V3 */\n\tpaddsw %mm6, %mm0\t\t/* V63 */\n/* note that V15 computation has a correction step: \n * this is a 'magic' constant that rebiases the results to be closer to the\n * expected result.  this magic constant can be refined to reduce the error\n * even more by doing the correction step in a later stage when the number\n * is actually multiplied by 16\n */\n\tpaddw x0005000200010001, %mm4\n\tpsubsw %mm6, %mm3\t\t/* V60 ; free mm6 */\n\tpsraw $1, %mm0\t\t\t/* t154=t156 */\n\tmovq %mm3, %mm1\t\t\t/* duplicate V60 */\n\tpmulhw x539f539f539f539f, %mm1\t/* V67 */\n\tmovq %mm5, %mm6\t\t\t/* duplicate V3 */\n\tpsraw $2, %mm4\t\t\t/* t148=t150 */\n\tpaddsw %mm4, %mm5\t\t/* V61 */\n\tpsubsw %mm4, %mm6\t\t/* V62 ; free mm4 */\n\tmovq %mm5, %mm4\t\t\t/* duplicate V61 */\n\tpsllw $1, %mm1\t\t\t/* t169 */\n\tpaddsw %mm0, %mm5\t\t/* V65 -> result */\n\tpsubsw %mm0, %mm4\t\t/* V64 ; free mm0 */\n\tpmulhw x5a825a825a825a82, %mm4\t/* V68 */\n\tpsraw $1, %mm3\t\t\t/* t158 */\n\tpsubsw %mm6, %mm3\t\t/* V66 */\n\tmovq %mm5, %mm2\t\t\t/* duplicate V65 */\n\tpmulhw x61f861f861f861f8, %mm3\t/* V70 */\n\tpsllw $1, %mm6\t\t\t/* t165 */\n\tpmulhw x4546454645464546, %mm6\t/* V69 */\n\tpsraw $1, %mm2\t\t\t/* t172 */\n/* moved from next block */\n\tmovq 8*5(%esi), %mm0\t\t/* V56 */\n\tpsllw $1, %mm4\t\t\t/* t174 */\n/* moved from next block */\n\tpsraw $1, %mm0\t\t\t/* t177=t188 */\n\tnop\n\tpsubsw %mm3, %mm6\t\t/* V72 */\n\tpsubsw %mm1, %mm3\t\t/* V71 ; free mm1 */\n\tpsubsw %mm2, %mm6\t\t/* V73 ; free mm2 */\n/* moved from next block */\n\tpsraw $1, %mm5\t\t\t/* t178=t189 */\n\tpsubsw %mm6, %mm4\t\t/* V74 */\n/* moved from next block */\n\tmovq %mm0, %mm1\t\t\t/* duplicate t177=t188 */\n\tpaddsw %mm4, %mm3\t\t/* V75 */\n/* moved from next block */\n\tpaddsw %mm5, %mm0\t\t/* tm1 */\n/* location\n *  5 - V56\n * 13 - V57\n *  9 - V58\n *  X - V59, mm7\n *  X - V65, mm5\n *  X - V73, mm6\n *  X - V74, mm4\n *  X - V75, mm3\n * free mm0, mm1 & mm2\n * moved above\n *\tmovq 8*5(%esi), %mm0\t\tV56\n *\tpsllw $1, %mm0\t\t\tt177=t188 ! new !!\n *\tpsllw $1, %mm5\t\t\tt178=t189 ! new !!\n *\tmovq %mm0, %mm1\t\t\tduplicate t177=t188\n *\tpaddsw %mm5, %mm0\t\ttm1\n */\n\tmovq 8*13(%esi), %mm2\t\t/* V57 */\n\tpsubsw %mm5, %mm1\t\t/* tm15; free mm5 */\n\tmovq %mm0, 8(%esi)\t\t/* tm1; free mm0 */\n\tpsraw $1, %mm7\t\t\t/* t182=t184 ! new !! */\n/* save the store as used directly in the transpose\n *\tmovq %mm1, 120(%esi)\t\ttm15; free mm1\n */\n\tmovq %mm7, %mm5\t\t\t/* duplicate t182=t184 */\n\tpsubsw %mm3, %mm7\t\t/* tm7 */\n\tpaddsw %mm3, %mm5\t\t/* tm9; free mm3 */\n\tmovq 8*9(%esi), %mm0\t\t/* V58 */\n\tmovq %mm2, %mm3\t\t\t/* duplicate V57 */\n\tmovq %mm7, 8*7(%esi)\t\t/* tm7; free mm7 */\n\tpsubsw %mm6, %mm3\t\t/* tm13 */\n\tpaddsw %mm6, %mm2\t\t/* tm3 ; free mm6 */\n/* moved up from the transpose */\n\tmovq %mm3, %mm7\n/* moved up from the transpose */\n\tpunpcklwd %mm1, %mm3\n\tmovq %mm0, %mm6\t\t\t/* duplicate V58 */\n\tmovq %mm2, 8*3(%esi)\t\t/* tm3; free mm2 */\n\tpaddsw %mm4, %mm0\t\t/* tm5 */\n\tpsubsw %mm4, %mm6\t\t/* tm11; free mm4 */\n/* moved up from the transpose */\n\tpunpckhwd %mm1, %mm7\n\tmovq %mm0, 8*5(%esi)\t\t/* tm5; free mm0 */\n/* moved up from the transpose */\n\tmovq %mm5, %mm2\n/* transpose - M4 part\n *  ---------       ---------\n * | M1 | M2 |     | M1'| M3'|\n *  ---------  -->  ---------\n * | M3 | M4 |     | M2'| M4'|\n *  ---------       ---------\n * Two alternatives: use full mmword approach so the following code can be\n * scheduled before the transpose is done without stores, or use the faster\n * half mmword stores (when possible)\n */\n\tmovd %mm3, 8*9+4(%esi)\t\t/* MS part of tmt9 */\n\tpunpcklwd %mm6, %mm5\n\tmovd %mm7, 8*13+4(%esi)\t\t/* MS part of tmt13 */\n\tpunpckhwd %mm6, %mm2\n\tmovd %mm5, 8*9(%esi)\t\t/* LS part of tmt9 */\n\tpunpckhdq %mm3, %mm5\t\t/* free mm3 */\n\tmovd %mm2, 8*13(%esi)\t\t/* LS part of tmt13 */\n\tpunpckhdq %mm7, %mm2\t\t/* free mm7 */\n/* moved up from the M3 transpose */\n\tmovq 8*8(%esi), %mm0\n/* moved up from the M3 transpose */\n\tmovq 8*10(%esi), %mm1\n/* moved up from the M3 transpose */\n\tmovq %mm0, %mm3\n/* shuffle the rest of the data, and write it with 2 mmword writes */\n\tmovq %mm5, 8*11(%esi)\t\t/* tmt11 */\n/* moved up from the M3 transpose */\n\tpunpcklwd %mm1, %mm0\n\tmovq %mm2, 8*15(%esi)\t\t/* tmt15 */\n/* moved up from the M3 transpose */\n\tpunpckhwd %mm1, %mm3\n/* transpose - M3 part\n * moved up to previous code section\n *\tmovq 8*8(%esi), %mm0\n *\tmovq 8*10(%esi), %mm1\n *\tmovq %mm0, %mm3\n *\tpunpcklwd %mm1, %mm0\n *\tpunpckhwd %mm1, %mm3\n */\n\tmovq 8*12(%esi), %mm6\n\tmovq 8*14(%esi), %mm4\n\tmovq %mm6, %mm2\n/* shuffle the data and write the lower parts of the transposed in 4 dwords */\n\tpunpcklwd %mm4, %mm6\n\tmovq %mm0, %mm1\n\tpunpckhdq %mm6, %mm1\n\tmovq %mm3, %mm7\n\tpunpckhwd %mm4, %mm2\t\t/* free mm4 */\n\tpunpckldq %mm6, %mm0\t\t/* free mm6 */\n/* moved from next block */\n\tmovq 8*13(%esi), %mm4\t\t/* tmt13 */\n\tpunpckldq %mm2, %mm3\n\tpunpckhdq %mm2, %mm7\t\t/* free mm2 */\n/* moved from next block */\n\tmovq %mm3, %mm5\t\t\t/* duplicate tmt5 */\n/* column 1: even part (after transpose)\n* moved above\n*\tmovq %mm3, %mm5\t\t\tduplicate tmt5\n*\tmovq 8*13(%esi), %mm4\t\ttmt13\n*/\n\tpsubsw %mm4, %mm3\t\t/* V134 */\n\tpmulhw x5a825a825a825a82, %mm3\t/* 23170 ->V136 */\n\tmovq 8*9(%esi), %mm6\t\t/* tmt9 */\n\tpaddsw %mm4, %mm5\t\t/* V135 ; mm4 free */\n\tmovq %mm0, %mm4\t\t\t/* duplicate tmt1 */\n\tpaddsw %mm6, %mm0\t\t/* V137 */\n\tpsubsw %mm6, %mm4\t\t/* V138 ; mm6 free */\n\tpsllw $2, %mm3\t\t\t/* t290 */\n\tpsubsw %mm5, %mm3\t\t/* V139 */\n\tmovq %mm0, %mm6\t\t\t/* duplicate V137 */\n\tpaddsw %mm5, %mm0\t\t/* V140 */\n\tmovq %mm4, %mm2\t\t\t/* duplicate V138 */\n\tpaddsw %mm3, %mm2\t\t/* V141 */\n\tpsubsw %mm3, %mm4\t\t/* V142 ; mm3 free */\n\tmovq %mm0, 8*9(%esi)\t\t/* V140 */\n\tpsubsw %mm5, %mm6\t\t/* V143 ; mm5 free */\n/* moved from next block */\n\tmovq 8*11(%esi), %mm0\t\t/* tmt11 */\n\tmovq %mm2, 8*13(%esi)\t\t/* V141 */\n/* moved from next block */\n\tmovq %mm0, %mm2\t\t\t/* duplicate tmt11 */\n/* column 1: odd part (after transpose) */\n/* moved up to the prev block\n *\tmovq 8*11(%esi), %mm0\t\ttmt11\n *\tmovq %mm0, %mm2\t\t\tduplicate tmt11\n */\n\tmovq 8*15(%esi), %mm5\t\t/* tmt15 */\n\tpsubsw %mm7, %mm0\t\t/* V144 */\n\tmovq %mm0, %mm3\t\t\t/* duplicate V144 */\n\tpaddsw %mm7, %mm2\t\t/* V147 ; free mm7 */\n\tpmulhw x539f539f539f539f, %mm0\t/* 21407-> V151 */\n\tmovq %mm1, %mm7\t\t\t/* duplicate tmt3 */\n\tpaddsw %mm5, %mm7\t\t/* V145 */\n\tpsubsw %mm5, %mm1\t\t/* V146 ; free mm5 */\n\tpsubsw %mm1, %mm3\t\t/* V150 */\n\tmovq %mm7, %mm5\t\t\t/* duplicate V145 */\n\tpmulhw x4546454645464546, %mm1\t/* 17734-> V153 */\n\tpsubsw %mm2, %mm5\t\t/* V148 */\n\tpmulhw x61f861f861f861f8, %mm3\t/* 25080-> V154 */\n\tpsllw $2, %mm0\t\t\t/* t311 */\n\tpmulhw x5a825a825a825a82, %mm5\t/* 23170-> V152 */\n\tpaddsw %mm2, %mm7\t\t/* V149 ; free mm2 */\n\tpsllw $1, %mm1\t\t\t/* t313 */\n\tnop\t/* without the nop - freeze here for one clock */\n\tmovq %mm3, %mm2\t\t\t/* duplicate V154 */\n\tpsubsw %mm0, %mm3\t\t/* V155 ; free mm0 */\n\tpsubsw %mm2, %mm1\t\t/* V156 ; free mm2 */\n/* moved from the next block */\n\tmovq %mm6, %mm2\t\t\t/* duplicate V143 */\n/* moved from the next block */\n\tmovq 8*13(%esi), %mm0\t\t/* V141 */\n\tpsllw $1, %mm1\t\t\t/* t315 */\n\tpsubsw %mm7, %mm1\t\t/* V157 (keep V149) */\n\tpsllw $2, %mm5\t\t\t/* t317 */\n\tpsubsw %mm1, %mm5\t\t/* V158 */\n\tpsllw $1, %mm3\t\t\t/* t319 */\n\tpaddsw %mm5, %mm3\t\t/* V159 */\n/* column 1: output butterfly (after transform)\n * moved to the prev block\n *\tmovq %mm6, %mm2\t\t\tduplicate V143\n *\tmovq 8*13(%esi), %mm0\t\tV141\n */\n\tpsubsw %mm3, %mm2\t\t/* V163 */\n\tpaddsw %mm3, %mm6\t\t/* V164 ; free mm3 */\n\tmovq %mm4, %mm3\t\t\t/* duplicate V142 */\n\tpsubsw %mm5, %mm4\t\t/* V165 ; free mm5 */\n\tmovq %mm2, (%esp)\t\t/* out7 */\n\tpsraw $4, %mm6\n\tpsraw $4, %mm4\n\tpaddsw %mm5, %mm3\t\t/* V162 */\n\tmovq 8*9(%esi), %mm2\t\t/* V140 */\n\tmovq %mm0, %mm5\t\t\t/* duplicate V141 */\n/* in order not to perculate this line up,\n * we read 72(%esi) very near to this location\n */\n\tmovq %mm6, 8*9(%esi)\t\t/* out9 */\n\tpaddsw %mm1, %mm0\t\t/* V161 */\n\tmovq %mm3, 8(%esp)\t\t/* out5 */\n\tpsubsw %mm1, %mm5\t\t/* V166 ; free mm1 */\n\tmovq %mm4, 8*11(%esi)\t\t/* out11 */\n\tpsraw $4, %mm5\n\tmovq %mm0, 16(%esp)\t\t/* out3 */\n\tmovq %mm2, %mm4\t\t\t/* duplicate V140 */\n\tmovq %mm5, 8*13(%esi)\t\t/* out13 */\n\tpaddsw %mm7, %mm2\t\t/* V160 */\n/* moved from the next block */\n\tmovq 8(%esi), %mm0\n\tpsubsw %mm7, %mm4\t\t/* V167 ; free mm7 */\n/* moved from the next block */\n\tmovq 8*3(%esi), %mm7\n\tpsraw $4, %mm4\n\tmovq %mm2, 24(%esp)\t\t/* out1 */\n/* moved from the next block */\n\tmovq %mm0, %mm1\n\tmovq %mm4, 8*15(%esi)\t\t/* out15 */\n/* moved from the next block */\n\tpunpcklwd %mm7, %mm0\n/* transpose - M2 parts\n * moved up to the prev block\n *\tmovq 8(%esi), %mm0\n *\tmovq 8*3(%esi), %mm7\n *\tmovq %mm0, %mm1\n *\tpunpcklwd %mm7, %mm0\n */\n\tmovq 8*5(%esi), %mm5\n\tpunpckhwd %mm7, %mm1\n\tmovq 8*7(%esi), %mm4\n\tmovq %mm5, %mm3\n/* shuffle the data and write the lower parts of the trasposed in 4 dwords */\n\tmovd %mm0, 8*8(%esi)\t\t/* LS part of tmt8 */\n\tpunpcklwd %mm4, %mm5\n\tmovd %mm1, 8*12(%esi)\t\t/* LS part of tmt12 */\n\tpunpckhwd %mm4, %mm3\n\tmovd %mm5, 8*8+4(%esi)\t\t/* MS part of tmt8 */\n\tpunpckhdq %mm5, %mm0\t\t/* tmt10 */\n\tmovd %mm3, 8*12+4(%esi)\t\t/* MS part of tmt12 */\n\tpunpckhdq %mm3, %mm1\t\t/* tmt14 */\n/* transpose - M1 parts */\n\tmovq (%esi), %mm7\n\tmovq 8*2(%esi), %mm2\n\tmovq %mm7, %mm6\n\tmovq 8*4(%esi), %mm5\n\tpunpcklwd %mm2, %mm7\n\tmovq 8*6(%esi), %mm4\n\tpunpckhwd %mm2, %mm6\t\t/* free mm2 */\n\tmovq %mm5, %mm3\n\tpunpcklwd %mm4, %mm5\n\tpunpckhwd %mm4, %mm3\t\t/* free mm4 */\n\tmovq %mm7, %mm2\n\tmovq %mm6, %mm4\n\tpunpckldq %mm5, %mm7\t\t/* tmt0 */\n\tpunpckhdq %mm5, %mm2\t\t/* tmt2 ; free mm5 */\n/* shuffle the rest of the data, and write it with 2 mmword writes */\n\tpunpckldq %mm3, %mm6\t\t/* tmt4 */\n/* moved from next block */\n\tmovq %mm2, %mm5\t\t\t/* duplicate tmt2 */\n\tpunpckhdq %mm3, %mm4\t\t/* tmt6 ; free mm3 */\n/* moved from next block */\n\tmovq %mm0, %mm3\t\t\t/* duplicate tmt10 */\n/* column 0: odd part (after transpose)\n *moved up to prev block\n *\tmovq %mm0, %mm3\t\t\tduplicate tmt10\n *\tmovq %mm2, %mm5\t\t\tduplicate tmt2\n */\n\tpsubsw %mm4, %mm0\t\t/* V110 */\n\tpaddsw %mm4, %mm3\t\t/* V113 ; free mm4 */\n\tmovq %mm0, %mm4\t\t\t/* duplicate V110 */\n\tpaddsw %mm1, %mm2\t\t/* V111 */\n\tpmulhw x539f539f539f539f, %mm0\t/* 21407-> V117 */\n\tpsubsw %mm1, %mm5\t\t/* V112 ; free mm1 */\n\tpsubsw %mm5, %mm4\t\t/* V116 */\n\tmovq %mm2, %mm1\t\t\t/* duplicate V111 */\n\tpmulhw x4546454645464546, %mm5\t/* 17734-> V119 */\n\tpsubsw %mm3, %mm2\t\t/* V114 */\n\tpmulhw x61f861f861f861f8, %mm4\t/* 25080-> V120 */\n\tpaddsw %mm3, %mm1\t\t/* V115 ; free mm3 */\n\tpmulhw x5a825a825a825a82, %mm2\t/* 23170-> V118 */\n\tpsllw $2, %mm0\t\t\t/* t266 */\n\tmovq %mm1, (%esi)\t\t/* save V115 */\n\tpsllw $1, %mm5\t\t\t/* t268 */\n\tpsubsw %mm4, %mm5\t\t/* V122 */\n\tpsubsw %mm0, %mm4\t\t/* V121 ; free mm0 */\n\tpsllw $1, %mm5\t\t\t/* t270 */\n\tpsubsw %mm1, %mm5\t\t/* V123 ; free mm1 */\n\tpsllw $2, %mm2\t\t\t/* t272 */\n\tpsubsw %mm5, %mm2\t\t/* V124 (keep V123) */\n\tpsllw $1, %mm4\t\t\t/* t274 */\n\tmovq %mm5, 8*2(%esi)\t\t/* save V123 ; free mm5 */\n\tpaddsw %mm2, %mm4\t\t/* V125 (keep V124) */\n/* column 0: even part (after transpose) */\n\tmovq 8*12(%esi), %mm0\t\t/* tmt12 */\n\tmovq %mm6, %mm3\t\t\t/* duplicate tmt4 */\n\tpsubsw %mm0, %mm6\t\t/* V100 */\n\tpaddsw %mm0, %mm3\t\t/* V101 ; free mm0 */\n\tpmulhw x5a825a825a825a82, %mm6\t/* 23170 ->V102 */\n\tmovq %mm7, %mm5\t\t\t/* duplicate tmt0 */\n\tmovq 8*8(%esi), %mm1\t\t/* tmt8 */\n\tpaddsw %mm1, %mm7\t\t/* V103 */\n\tpsubsw %mm1, %mm5\t\t/* V104 ; free mm1 */\n\tmovq %mm7, %mm0\t\t\t/* duplicate V103 */\n\tpsllw $2, %mm6\t\t\t/* t245 */\n\tpaddsw %mm3, %mm7\t\t/* V106 */\n\tmovq %mm5, %mm1\t\t\t/* duplicate V104 */\n\tpsubsw %mm3, %mm6\t\t/* V105 */\n\tpsubsw %mm3, %mm0\t\t/* V109; free mm3 */\n\tpaddsw %mm6, %mm5\t\t/* V107 */\n\tpsubsw %mm6, %mm1\t\t/* V108 ; free mm6 */\n/* column 0: output butterfly (after transform) */\n\tmovq %mm1, %mm3\t\t\t/* duplicate V108 */\n\tpaddsw %mm2, %mm1\t\t/* out4 */\n\tpsraw $4, %mm1\n\tpsubsw %mm2, %mm3\t\t/* out10 ; free mm2 */\n\tpsraw $4, %mm3\n\tmovq %mm0, %mm6\t\t\t/* duplicate V109 */\n\tmovq %mm1, 8*4(%esi)\t\t/* out4 ; free mm1 */\n\tpsubsw %mm4, %mm0\t\t/* out6 */\n\tmovq %mm3, 8*10(%esi)\t\t/* out10 ; free mm3 */\n\tpsraw $4, %mm0\n\tpaddsw %mm4, %mm6\t\t/* out8 ; free mm4 */\n\tmovq %mm7, %mm1\t\t\t/* duplicate V106 */\n\tmovq %mm0, 8*6(%esi)\t\t/* out6 ; free mm0 */\n\tpsraw $4, %mm6\n\tmovq (%esi), %mm4\t\t/* V115 */\n\tmovq %mm6, 8*8(%esi)\t\t/* out8 ; free mm6 */\n\tmovq %mm5, %mm2\t\t\t/* duplicate V107 */\n\tmovq 8*2(%esi), %mm3\t\t/* V123 */\n\tpaddsw %mm4, %mm7\t\t/* out0 */\n/* moved up from next block */\n\tmovq 16(%esp), %mm0\n\tpsraw $4, %mm7\n/* moved up from next block */\n\tmovq 8(%esp), %mm6 \n\tpsubsw %mm4, %mm1\t\t/* out14 ; free mm4 */\n\tpaddsw %mm3, %mm5\t\t/* out2 */\n\tpsraw $4, %mm1\n\tmovq %mm7, (%esi)\t\t/* out0 ; free mm7 */\n\tpsraw $4, %mm5\n\tmovq %mm1, 8*14(%esi)\t\t/* out14 ; free mm1 */\n\tpsubsw %mm3, %mm2\t\t/* out12 ; free mm3 */\n\tmovq %mm5, 8*2(%esi)\t\t/* out2 ; free mm5 */\n\tpsraw $4, %mm2\n/* moved up to the prev block */\n\tmovq (%esp), %mm4\n/* moved up to the prev block */\n\tpsraw $4, %mm0\n\tmovq %mm2, 8*12(%esi)\t\t/* out12 ; free mm2 */\n/* moved up to the prev block */\n\tpsraw $4, %mm6\n/* move back the data to its correct place\n* moved up to the prev block\n *\tmovq 16(%esp), %mm0\n *\tmovq 8(%esp), %mm6\n *\tmovq (%esp), %mm4\n *\tpsraw $4, %mm0\n *\tpsraw $4, %mm6\n*/\n\tmovq 24(%esp), %mm1\n\tpsraw $4, %mm4\n\tmovq %mm0, 8*3(%esi)\t\t/* out3 */\n\tpsraw $4, %mm1\n\tmovq %mm6, 8*5(%esi)\t\t/* out5 */\n\tmovq %mm4, 8*7(%esi)\t\t/* out7 */\n\tmovq %mm1, 8(%esi)\t\t/* out1 */\n\n\tpopl %edi    /* Pop off the temp variables */\n\tpopl %edi\n\tpopl %edi\n\tpopl %edi\n\tpopl %edi\n\tpopl %edi\n\tpopl %edi\n\tpopl %edi\n\n\tpopl %edi    /* Pop off the old variables */\n\tpopl %esi\n\tpopl %edx\n\tpopl %ecx\n\tpopl %ebx\n\tmovl %ebp, %esp\n\tpopl %ebp\n\n\tret\n.Lfe1:\n\t.size\t IDCT_mmx,.Lfe1-IDCT_mmx\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/video/mmxtest.c",
    "content": "/* \n *\n *  This file is part of libmpeg3\n *\t\n * LibMPEG3\n * Author: Adam Williams <broadcast@earthling.net>\n * Page: heroine.linuxbox.com\n * Page: http://www.smalltalkconsulting.com/html/mpeg3source.html (for Squeak)\n *\n    LibMPEG3 was originally licenced under GPL. It was relicensed by\n    the author under the LGPL and the Squeak license on Nov 1st, 2000\n    \n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA \n    \n    Also licensed under the Squeak license.\n    http://www.squeak.org/license.html\n */\n /*  Changed Sept 15th by John M McIntosh to support Macintosh & Squeak\n */\n#include \"mpeg3private.inc\"\n\n#include <stdio.h>\n#include <string.h>\n\nint mpeg3_mmx_test()\n{\n\tint result = 0;\n\tFILE *proc;\n\tchar string[MPEG3_STRLEN];\n\n\n#ifdef HAVE_MMX\n\tif(!(proc = fopen(MPEG3_PROC_CPUINFO, \"r\")))\n\t{\n\t\treturn 0;\n\t}\n\t\n\twhile(!feof(proc))\n\t{\n\t\tfgets(string, MPEG3_STRLEN, proc);\n/* Got the flags line */\n\t\tif(!strncmp(string, \"flags\", 5))\n\t\t{\n\t\t\tchar *needle;\n\t\t\tneedle = strstr(string, \"mmx\");\n\t\t\tif(!needle) return 0;\n\t\t\tif(!strncmp(needle, \"mmx\", 3)) return 1;\n\t\t}\n\t}\n#endif\n\n\treturn 0;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/video/motion.c",
    "content": "/* \n *\n *  This file is part of libmpeg3\n *\t\n * LibMPEG3\n * Author: Adam Williams <broadcast@earthling.net>\n * Page: heroine.linuxbox.com\n * Page: http://www.smalltalkconsulting.com/html/mpeg3source.html (for Squeak)\n *\n    LibMPEG3 was originally licenced under GPL. It was relicensed by\n    the author under the LGPL and the Squeak license on Nov 1st, 2000\n    \n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA \n    \n    Also licensed under the Squeak license.\n    http://www.squeak.org/license.html\n */\n /*  Changed Sept 15th by John M McIntosh to support Macintosh & Squeak\n */\n#include \"mpeg3private.h\"\n#include \"mpeg3video.h\"\n#include \"vlc.h\"\n\n#include <stdio.h>\n\n\n/* calculate motion vector component */\n\nstatic inline void mpeg3video_calc_mv(int *pred, int r_size, int motion_code, int motion_r, int full_pel_vector)\n{\n\tint lim = 16 << r_size;\n\tint vec = full_pel_vector ? (*pred >> 1) : (*pred);\n\n\tif(motion_code > 0)\n\t{\n    \tvec += ((motion_code - 1) << r_size) + motion_r + 1;\n    \tif(vec >= lim) vec -= lim + lim;\n\t}\n\telse \n\tif(motion_code < 0)\n\t{\n    \tvec -= ((-motion_code - 1) << r_size) + motion_r + 1;\n    \tif(vec < -lim) vec += lim + lim;\n\t}\n\t*pred = full_pel_vector ? (vec << 1) : vec;\n}\n\n\n\n\n/*\nint *dmvector, * differential motion vector *\nint mvx, int mvy  * decoded mv components (always in field format) *\n*/\n#if !defined(sun)\nINLINE\n#endif\nvoid mpeg3video_calc_dmv(mpeg3video_t *video, \n\t\tint DMV[][2], \n\t\tint *dmvector, \n\t\tint mvx, \n\t\tint mvy)\n{\n\tif(video->pict_struct == FRAME_PICTURE)\n\t{\n    \tif(video->topfirst)\n\t\t{\n/* vector for prediction of top field from bottom field */\n    \t\tDMV[0][0] = ((mvx  + (mvx>0)) >> 1) + dmvector[0];\n    \t\tDMV[0][1] = ((mvy  + (mvy>0)) >> 1) + dmvector[1] - 1;\n\n/* vector for prediction of bottom field from top field */\n    \t\tDMV[1][0] = ((3 * mvx + (mvx > 0)) >> 1) + dmvector[0];\n    \t\tDMV[1][1] = ((3 * mvy + (mvy > 0)) >> 1) + dmvector[1] + 1;\n    \t}\n    \telse \n\t\t{\n/* vector for prediction of top field from bottom field */\n    \t\tDMV[0][0] = ((3 * mvx + (mvx>0)) >> 1) + dmvector[0];\n    \t\tDMV[0][1] = ((3 * mvy + (mvy>0)) >> 1) + dmvector[1] - 1;\n\n/* vector for prediction of bottom field from top field */\n    \t\tDMV[1][0] = ((mvx + (mvx>0)) >> 1) + dmvector[0];\n    \t\tDMV[1][1] = ((mvy + (mvy>0)) >> 1) + dmvector[1] + 1;\n    \t}\n\t}\n\telse \n\t{\n/* vector for prediction from field of opposite 'parity' */\n    \tDMV[0][0] = ((mvx + (mvx > 0)) >> 1) + dmvector[0];\n    \tDMV[0][1] = ((mvy + (mvy > 0)) >> 1) + dmvector[1];\n\n/* correct for vertical field shift */\n    \tif(video->pict_struct == TOP_FIELD)\n\t\t\tDMV[0][1]--;\n    \telse \n\t\t\tDMV[0][1]++;\n\t}\n}\n\nstatic inline int mpeg3video_get_mv(mpeg3_slice_t *slice)\n{\n  \tint code;\n\tmpeg3_slice_buffer_t *slice_buffer = slice->slice_buffer;\n\n  \tif(mpeg3slice_getbit(slice_buffer))\n\t{\n    \treturn 0;\n  \t}\n\n  \tif((code = mpeg3slice_showbits9(slice_buffer)) >= 64)\n\t{\n    \tcode >>= 6;\n    \tmpeg3slice_flushbits(slice_buffer, mpeg3_MVtab0[code].len);\n    \treturn mpeg3slice_getbit(slice_buffer) ? -mpeg3_MVtab0[code].val : mpeg3_MVtab0[code].val;\n  \t}\n\n  \tif(code >= 24)\n\t{\n    \tcode >>= 3;\n    \tmpeg3slice_flushbits(slice_buffer, mpeg3_MVtab1[code].len);\n\t    return mpeg3slice_getbit(slice_buffer) ? -mpeg3_MVtab1[code].val : mpeg3_MVtab1[code].val;\n  \t}\n\n  \tif((code -= 12) < 0)\n\t{\n/*    \tfprintf(stdout,\"mpeg3video_get_mv: invalid motion_vector code\\n\"); */\n    \tslice->fault = 1;\n    \treturn 1;\n  \t}\n\n  \tmpeg3slice_flushbits(slice_buffer, mpeg3_MVtab2[code].len);\n \treturn mpeg3slice_getbit(slice_buffer) ? -mpeg3_MVtab2[code].val : mpeg3_MVtab2[code].val;\n}\n\n/* get differential motion vector (for dual prime prediction) */\n\nstatic inline int mpeg3video_get_dmv(mpeg3_slice_t *slice)\n{\n\tmpeg3_slice_buffer_t *slice_buffer = slice->slice_buffer;\n  \tif(mpeg3slice_getbit(slice_buffer))\n\t{\n    \treturn mpeg3slice_getbit(slice_buffer) ? -1 : 1;\n  \t}\n  \telse \n\t{\n    \treturn 0;\n  \t}\n}\n\n\n\n/* get and decode motion vector and differential motion vector */\n\nvoid mpeg3video_motion_vector(mpeg3_slice_t *slice,\n\t\tmpeg3video_t *video, \n\t\tint *PMV, \n\t\tint *dmvector, \n\t\tint h_r_size, \n\t\tint v_r_size,\n\t\tint dmv, \n\t\tint mvscale, \n\t\tint full_pel_vector)\n{\n\tint motion_r;\n\tint motion_code = mpeg3video_get_mv(slice);\n\tmpeg3_slice_buffer_t *slice_buffer = slice->slice_buffer;\n\n\tif(slice->fault) return;\n\tmotion_r = (h_r_size != 0 && motion_code != 0) ? mpeg3slice_getbits(slice_buffer, h_r_size) : 0;\n\n  \tmpeg3video_calc_mv(&PMV[0], h_r_size, motion_code, motion_r, full_pel_vector);\n\n  \tif(dmv) dmvector[0] = mpeg3video_get_dmv(slice);\n\n  \tmotion_code = mpeg3video_get_mv(slice);\n  \tif(slice->fault)  return;\n  \tmotion_r = (v_r_size != 0 && motion_code != 0) ? mpeg3slice_getbits(slice_buffer, v_r_size) : 0;\n\n/* DIV 2 */\n  \tif(mvscale) PMV[1] >>= 1; \n\n  \tmpeg3video_calc_mv(&PMV[1], v_r_size, motion_code, motion_r, full_pel_vector);\n\n\tif(mvscale) PMV[1] <<= 1;\n\tif(dmv) dmvector[1] = mpeg3video_get_dmv(slice);\n}\n\nint mpeg3video_motion_vectors(mpeg3_slice_t *slice,\n\t\tmpeg3video_t *video, \n\t\tint PMV[2][2][2], \n\t\tint dmvector[2], \n\t\tint mv_field_sel[2][2],\n\t\tint s, \n\t\tint mv_count, \n\t\tint mv_format, \n\t\tint h_r_size, \n\t\tint v_r_size, \n\t\tint dmv, \n\t\tint mvscale)\n{\n\tint result = 0;\n\tmpeg3_slice_buffer_t *slice_buffer = slice->slice_buffer;\n\tif(mv_count == 1)\n\t{\n\t\tif(mv_format == MV_FIELD && !dmv)\n\t\t{\n\t\t\tmv_field_sel[1][s] = mv_field_sel[0][s] = mpeg3slice_getbit(slice_buffer);\n\t\t}\n\n    \tmpeg3video_motion_vector(slice, \n\t\t\tvideo, \n\t\t\tPMV[0][s], \n\t\t\tdmvector, \n\t\t\th_r_size, \n\t\t\tv_r_size, \n\t\t\tdmv, \n\t\t\tmvscale, \n\t\t\t0);\n    \tif(slice->fault) return 1;\n\n/* update other motion vector predictors */\n    \tPMV[1][s][0] = PMV[0][s][0];\n    \tPMV[1][s][1] = PMV[0][s][1];\n  \t}\n  \telse \n\t{\n    \tmv_field_sel[0][s] = mpeg3slice_getbit(slice_buffer);\n    \tmpeg3video_motion_vector(slice, \n\t\t\tvideo, \n\t\t\tPMV[0][s], \n\t\t\tdmvector, \n\t\t\th_r_size, \n\t\t\tv_r_size, \n\t\t\tdmv, \n\t\t\tmvscale, \n\t\t\t0);\n    \tif(slice->fault) return 1;\n\n    \tmv_field_sel[1][s] = mpeg3slice_getbit(slice_buffer);\n    \tmpeg3video_motion_vector(slice, \n\t\t\tvideo, \n\t\t\tPMV[1][s], \n\t\t\tdmvector, \n\t\t\th_r_size, \n\t\t\tv_r_size, \n\t\t\tdmv, \n\t\t\tmvscale, \n\t\t\t0);\n    \tif(slice->fault) return 1;\n  \t}\n\treturn 0;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/video/mpeg3video.c",
    "content": "/* \n *\n *  This file is part of libmpeg3\n *\t\n * LibMPEG3\n * Author: Adam Williams <broadcast@earthling.net>\n * Page: heroine.linuxbox.com\n * Page: http://www.smalltalkconsulting.com/html/mpeg3source.html (for Squeak)\n *\n    LibMPEG3 was originally licenced under GPL. It was relicensed by\n    the author under the LGPL and the Squeak license on Nov 1st, 2000\n    \n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA \n    \n    Also licensed under the Squeak license.\n    http://www.squeak.org/license.html\n */\n /*  Changed Sept 15th by John M McIntosh to support Macintosh & Squeak\n */\n#include \"mpeg3private.h\"\n#include \"mpeg3protos.h\"\n\n#include \"mpeg3video.h\"\n#include \"mpeg3videoprotos.h\"\n#include <stdlib.h>\n\nunsigned char mpeg3_zig_zag_scan_mmx[64] =\n{\n    0*8+0 /* 0*/, 1*8+0 /* 1*/, 0*8+1 /* 8*/, 0*8+2 /*16*/, 1*8+1 /* 9*/, 2*8+0 /* 2*/, 3*8+0 /* 3*/, 2*8+1 /*10*/,\n    1*8+2 /*17*/, 0*8+3 /*24*/, 0*8+4 /*32*/, 1*8+3 /*25*/, 2*8+2 /*18*/, 3*8+1 /*11*/, 4*8+0 /* 4*/, 5*8+0 /* 5*/,\n    4*8+1 /*12*/, 5*8+2 /*19*/, 2*8+3 /*26*/, 1*8+4 /*33*/, 0*8+5 /*40*/, 0*8+6 /*48*/, 1*8+5 /*41*/, 2*8+4 /*34*/,\n    3*8+3 /*27*/, 4*8+2 /*20*/, 5*8+1 /*13*/, 6*8+0 /* 6*/, 7*8+0 /* 7*/, 6*8+1 /*14*/, 5*8+2 /*21*/, 4*8+3 /*28*/,\n    3*8+4 /*35*/, 2*8+5 /*42*/, 1*8+6 /*49*/, 0*8+7 /*56*/, 1*8+7 /*57*/, 2*8+6 /*50*/, 3*8+5 /*43*/, 4*8+4 /*36*/,\n    5*8+3 /*29*/, 6*8+2 /*22*/, 7*8+1 /*15*/, 7*8+2 /*23*/, 6*8+3 /*30*/, 5*8+4 /*37*/, 4*8+5 /*44*/, 3*8+6 /*51*/,\n    2*8+7 /*58*/, 3*8+7 /*59*/, 4*8+6 /*52*/, 5*8+5 /*45*/, 6*8+4 /*38*/, 7*8+3 /*31*/, 7*8+4 /*39*/, 6*8+5 /*46*/,\n    7*8+6 /*53*/, 4*8+7 /*60*/, 5*8+7 /*61*/, 6*8+6 /*54*/, 7*8+5 /*47*/, 7*8+6 /*55*/, 6*8+7 /*62*/, 7*8+7 /*63*/\n};\n\n/* alternate scan */\nunsigned char mpeg3_alternate_scan_mmx[64] =\n{\n     0*8+0 /*0 */, 0*8+1 /* 8*/, 0*8+2 /*16*/, 0*8+3 /*24*/, 1*8+0 /* 1*/, 1*8+1 /* 9*/, 2*8+0 /* 2*/, 2*8+1 /*10*/,\n     1*8+2 /*17*/, 1*8+3 /*25*/, 0*8+4 /*32*/, 0*8+5 /*40*/, 0*8+6 /*48*/, 0*8+7 /*56*/, 1*8+7 /*57*/, 1*8+6 /*49*/,\n     1*8+5 /*41*/, 1*8+4 /*33*/, 2*8+3 /*26*/, 2*8+2 /*18*/, 3*8+0 /* 3*/, 3*8+1 /*11*/, 4*8+0 /* 4*/, 4*8+1 /*12*/,\n     3*8+2 /*19*/, 3*8+3 /*27*/, 2*8+4 /*34*/, 2*8+5 /*42*/, 2*8+6 /*50*/, 2*8+7 /*58*/, 3*8+4 /*35*/, 3*8+5 /*43*/,\n     3*8+6 /*51*/, 3*8+7 /*59*/, 4*8+2 /*20*/, 4*8+3 /*28*/, 5*8+0 /* 5*/, 5*8+1 /*13*/, 6*8+0 /* 6*/, 6*8+1 /*14*/,\n     5*8+2 /*21*/, 5*8+3 /*29*/, 4*8+4 /*36*/, 4*8+5 /*44*/, 4*8+6 /*52*/, 4*8+7 /*60*/, 5*8+4 /*37*/, 5*8+5 /*45*/,\n     5*8+6 /*53*/, 5*8+7 /*61*/, 6*8+2 /*22*/, 6*8+3 /*30*/, 7*8+0 /* 7*/, 7*8+1 /*15*/, 7*8+2 /*23*/, 7*8+3 /*31*/,\n     6*8+4 /*38*/, 6*8+5 /*46*/, 6*8+6 /*54*/, 6*8+7 /*62*/, 7*8+4 /*39*/, 7*8+5 /*47*/, 7*8+6 /*55*/, 7*8+6 /*63*/\n};\n\n\n\n/* zig-zag scan */\nunsigned char mpeg3_zig_zag_scan_nommx[64] =\n{\n  0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5, \n  12, 19, 26, 33, 40, 48, 41, 34, 27, 20, 13, 6, 7, 14, 21, 28, \n  35, 42, 49, 56, 57, 50, 43, 36, 29, 22, 15, 23, 30, 37, 44, 51, \n  58, 59, 52, 45, 38, 31, 39, 46, 53, 60, 61, 54, 47, 55, 62, 63\n};\n\n/* alternate scan */\nunsigned char mpeg3_alternate_scan_nommx[64] =\n{\n  0, 8, 16, 24, 1, 9, 2, 10, 17, 25, 32, 40, 48, 56, 57, 49, \n  41, 33, 26, 18, 3, 11, 4, 12, 19, 27, 34, 42, 50, 58, 35, 43, \n  51, 59, 20, 28, 5, 13, 6, 14, 21, 29, 36, 44, 52, 60, 37, 45, \n  53, 61, 22, 30, 7, 15, 23, 31, 38, 46, 54, 62, 39, 47, 55, 63\n};\n\n/* default intra quantization matrix */\nunsigned char mpeg3_default_intra_quantizer_matrix[64] =\n{\n  8, 16, 19, 22, 26, 27, 29, 34,\n  16, 16, 22, 24, 27, 29, 34, 37,\n  19, 22, 26, 27, 29, 34, 34, 38,\n  22, 22, 26, 27, 29, 34, 37, 40,\n  22, 26, 27, 29, 32, 35, 40, 48,\n  26, 27, 29, 32, 35, 40, 48, 58,\n  26, 27, 29, 34, 38, 46, 56, 69,\n  27, 29, 35, 38, 46, 56, 69, 83\n};\n\nunsigned char mpeg3_non_linear_mquant_table[32] = \n{\n   0, 1, 2, 3, 4, 5, 6, 7,\n   8, 10, 12, 14, 16, 18, 20, 22, \n  24, 28, 32, 36, 40, 44, 48, 52, \n  56, 64, 72, 80, 88, 96, 104, 112\n};\n\ndouble mpeg3_frame_rate_table[16] =\n{\n  0.0,   /* Pad */\n  24000.0/1001.0,       /* Official frame rates */\n  24.0,\n  25.0,\n  30000.0/1001.0,\n  30.0,\n  50.0,\n  ((60.0*1000.0)/1001.0),\n  60.0,\n\n  1,                    /* Unofficial economy rates */\n  5, \n  10,\n  12,\n  15,\n  0,\n  0,\n};\n\nint mpeg3video_initdecoder(mpeg3video_t *video)\n{\n\tint blk_cnt_tab[3] = {6, 8, 12};\n\tint cc;\n  \tint i;\n\tlong size[4], padding[2];         /* Size of Y, U, and V buffers */\n\n\tif(!video->mpeg2)\n\t{\n/* force MPEG-1 parameters */\n    \tvideo->prog_seq = 1;\n    \tvideo->prog_frame = 1;\n    \tvideo->pict_struct = FRAME_PICTURE;\n    \tvideo->frame_pred_dct = 1;\n    \tvideo->chroma_format = CHROMA420;\n    \tvideo->matrix_coefficients = 5;\n\t}\n\n/* Get dimensions rounded to nearest multiple of coded macroblocks */\n\tvideo->mb_width = (video->horizontal_size + 15) / 16;\n\tvideo->mb_height = (video->mpeg2 && !video->prog_seq) ? \n\t\t\t\t\t(2 * ((video->vertical_size + 31) / 32)) : \n\t\t\t\t\t((video->vertical_size + 15) / 16);\n\tvideo->coded_picture_width = 16 * video->mb_width;\n\tvideo->coded_picture_height = 16 * video->mb_height;\n\tvideo->chrom_width = (video->chroma_format == CHROMA444) ? \n\t\t\t\t\tvideo->coded_picture_width : \n\t\t\t\t\t(video->coded_picture_width >> 1);\n\tvideo->chrom_height = (video->chroma_format != CHROMA420) ? \n\t\t\t\t\tvideo->coded_picture_height : \n                    (video->coded_picture_height >> 1);\n\tvideo->blk_cnt = blk_cnt_tab[video->chroma_format - 1];\n\n/* Get sizes of YUV buffers */\n\tpadding[0] = 16 * video->coded_picture_width;\n\tsize[0] = video->coded_picture_width * video->coded_picture_height + padding[0] * 2;\n\n\tpadding[1] = 16 * video->chrom_width;\n\tsize[1] = video->chrom_width * video->chrom_height + 2 * padding[1];\n\n\tsize[2] = (video->llw * video->llh);\n\tsize[3] = (video->llw * video->llh) / 4;\n\n/* Allocate contiguous fragments for YUV buffers for hardware YUV decoding */\n\tvideo->yuv_buffer[0] = (unsigned char*)memoryAllocate(1, (size[0] + padding[0]) + 2 * (size[1] + padding[1]));\n\tvideo->yuv_buffer[1] = (unsigned char*)memoryAllocate(1, (size[0] + padding[0]) + 2 * (size[1] + padding[1]));\n\tvideo->yuv_buffer[2] = (unsigned char*)memoryAllocate(1, (size[0] + padding[0]) + 2 * (size[1] + padding[1]));\n\n    if(video->scalable_mode == SC_SPAT)\n\t{\n\t\tvideo->yuv_buffer[3] = (unsigned char*)memoryAllocate(1, size[2] + 2 * size[3]);\n\t\tvideo->yuv_buffer[4] = (unsigned char*)memoryAllocate(1, size[2] + 2 * size[3]);\n\t}\n\n/* Direct pointers to areas of contiguous fragments in YVU order per Microsoft */\t\n\tfor(cc = 0; cc < 3; cc++)\n\t{\n\t\tvideo->llframe0[cc] = 0;\n\t\tvideo->llframe1[cc] = 0;\n\t\tvideo->newframe[cc] = 0;\n\t}\n\n\tvideo->refframe[0]    = video->yuv_buffer[0];\n\tvideo->oldrefframe[0] = video->yuv_buffer[1];\n\tvideo->auxframe[0]    = video->yuv_buffer[2];\n\tvideo->refframe[2]    = video->yuv_buffer[0] + size[0] + padding[0];\n\tvideo->oldrefframe[2] = video->yuv_buffer[1] + size[0] + padding[0];\n\tvideo->auxframe[2]    = video->yuv_buffer[2] + size[0] + padding[0];\n\tvideo->refframe[1]    = video->yuv_buffer[0] + size[0] + padding[0] + size[1] + padding[1];\n\tvideo->oldrefframe[1] = video->yuv_buffer[1] + size[0] + padding[0] + size[1] + padding[1];\n\tvideo->auxframe[1]    = video->yuv_buffer[2] + size[0] + padding[0] + size[1] + padding[1];\n\n    if(video->scalable_mode == SC_SPAT)\n\t{\n/* this assumes lower layer is 4:2:0 */\n\t\tvideo->llframe0[0] = video->yuv_buffer[3] + padding[0] \t\t\t\t   ;\n\t\tvideo->llframe1[0] = video->yuv_buffer[4] + padding[0] \t\t\t\t   ;\n\t\tvideo->llframe0[2] = video->yuv_buffer[3] + padding[1] + size[2]\t\t   ;\n\t\tvideo->llframe1[2] = video->yuv_buffer[4] + padding[1] + size[2]\t\t   ;\n\t\tvideo->llframe0[1] = video->yuv_buffer[3] + padding[1] + size[2] + size[3];\n\t\tvideo->llframe1[1] = video->yuv_buffer[4] + padding[1] + size[2] + size[3];\n    }\n\n/* Initialize the YUV tables for software YUV decoding */\n\tvideo->cr_to_r = (long *) memoryAllocate(1,sizeof(long) * 256);\n\tvideo->cr_to_g = (long *) memoryAllocate(1,sizeof(long) * 256);\n\tvideo->cb_to_g = (long *) memoryAllocate(1,sizeof(long) * 256);\n\tvideo->cb_to_b = (long *) memoryAllocate(1,sizeof(long) * 256);\n\tvideo->cr_to_r_ptr = video->cr_to_r + 128;\n\tvideo->cr_to_g_ptr = video->cr_to_g + 128;\n\tvideo->cb_to_g_ptr = video->cb_to_g + 128;\n\tvideo->cb_to_b_ptr = video->cb_to_b + 128;\n\n\tfor(i = -128; i < 128; i++)\n\t{\n\t\tvideo->cr_to_r_ptr[i] = (long)( 1.371 * 65536 * i);\n\t\tvideo->cr_to_g_ptr[i] = (long)(-0.698 * 65536 * i);\n\t\tvideo->cb_to_g_ptr[i] = (long)(-0.336 * 65536 * i);\n\t\tvideo->cb_to_b_ptr[i] = (long)( 1.732 * 65536 * i);\n\t}\n\n\treturn 0;\n}\n\nint mpeg3video_deletedecoder(mpeg3video_t *video)\n{\n\tint i, padding;\n\n\tmemoryFree(video->yuv_buffer[0]);\n\tmemoryFree(video->yuv_buffer[1]);\n\tmemoryFree(video->yuv_buffer[2]);\n\n\tif(video->llframe0[0])\n\t{\n\t\tmemoryFree(video->yuv_buffer[3]);\n\t\tmemoryFree(video->yuv_buffer[4]);\n\t}\n\n\tmemoryFree(video->cr_to_r);\n\tmemoryFree(video->cr_to_g);\n\tmemoryFree(video->cb_to_g);\n\tmemoryFree(video->cb_to_b);\n\treturn 0;\n}\n\nvoid mpeg3video_init_scantables(mpeg3video_t *video)\n{\n#ifdef HAVE_MMX\n\tif(video->have_mmx)\n\t{\n\t\tvideo->mpeg3_zigzag_scan_table = mpeg3_zig_zag_scan_mmx;\n\t\tvideo->mpeg3_alternate_scan_table = mpeg3_alternate_scan_mmx;\n\t}\n\telse\n#endif\n\t{\n\t\tvideo->mpeg3_zigzag_scan_table = mpeg3_zig_zag_scan_nommx;\n\t\tvideo->mpeg3_alternate_scan_table = mpeg3_alternate_scan_nommx;\n\t}\n}\n\nmpeg3video_t* mpeg3video_allocate_struct(mpeg3_t *file, mpeg3_vtrack_t *track)\n{\n\tint i;\n\tmpeg3video_t *video = (mpeg3video_t *) memoryAllocate(1, sizeof(mpeg3video_t));\n\t\n#ifdef USE_PTHREADS\n\tpthread_mutexattr_t mutex_attr;\n#endif\n\n\tvideo->file = file;\n\tvideo->track = track;\n\tvideo->vstream = mpeg3bits_new_stream(file, track->demuxer);\n\tvideo->last_number = -1;\n\n/* First frame is all green */\n\tvideo->framenum = -1;\n\tvideo->have_mmx = file->have_mmx;\n\n\tvideo->percentage_seek = -1;\n\tvideo->frame_seek = -1;\n\n\tmpeg3video_init_scantables(video);\n\tmpeg3video_init_output();\n\n#ifdef USE_PTHREADS\n\tpthread_mutexattr_init(&mutex_attr);\n\tpthread_mutex_init(&(video->test_lock), &mutex_attr);\n\tpthread_mutex_init(&(video->slice_lock), &mutex_attr);\n#endif\n\treturn video;\n}\n\nint mpeg3video_delete_struct(mpeg3video_t *video)\n{\n\tint i;\n\tmpeg3bits_delete_stream(video->vstream);\n#ifdef USE_PTHREADS\n\tpthread_mutex_destroy(&(video->test_lock));\n\tpthread_mutex_destroy(&(video->slice_lock));\n#endif\n\tif(video->x_table)\n\t{\n\t\tmemoryFree(video->x_table);\n\t\tmemoryFree(video->y_table);\n\t}\n\tif(video->total_slice_decoders)\n\t{\n\t\tfor(i = 0; i < video->total_slice_decoders; i++)\n\t\t\tmpeg3_delete_slice_decoder(video->slice_decoders[i]);\n\t}\n\tfor(i = 0; i < video->slice_buffers_initialized; i++)\n\t\tmpeg3_delete_slice_buffer(&(video->slice_buffers[i]));\n\n\tmemoryFree(video);\n}\n\n\nint mpeg3video_read_frame_backend(mpeg3video_t *video, int skip_bframes)\n{\n\tint result = 0;\n\n\tif(mpeg3bits_eof(video->vstream)) result = 1;\n\n\tif(!result) result = mpeg3video_get_header(video, 0);\n\n//printf(\"frame type %d\\n\", video->pict_type);\n/* skip_bframes is the number of bframes we can skip successfully. */\n/* This is in case a skipped B-frame is repeated and the second repeat happens */\n/* to be a B frame we need. */\n\tvideo->skip_bframes = skip_bframes;\n\n\tif(!result)\n\t\tresult = mpeg3video_getpicture(video, video->framenum);\n\n#ifdef HAVE_MMX\n\tif(video->have_mmx)\n\t\t__asm__ __volatile__ (\"emms\");\n#endif\n\n\tif(!result)\n\t{\n\t\tvideo->last_number = video->framenum;\n\t\tvideo->framenum++;\n\t}\n\treturn result;\n}\n\nint* mpeg3video_get_scaletable(int input_w, int output_w)\n{\n\tint *result = (int *) memoryAllocate(1,sizeof(int) * output_w);\n\tfloat i;\n\tfloat scale = (float)input_w / output_w;\n\tfor(i = 0; i < output_w; i++)\n\t{\n\t\tresult[(int)i] = (int)(scale * i);\n\t}\n\treturn result;\n}\n\n/* Get the first frame read. */\nint mpeg3video_get_firstframe(mpeg3video_t *video)\n{\n\tint result = 0;\n\tif(video->framenum < 0)\n\t{\n\t\tvideo->repeat_count = video->current_repeat = 0;\n\t\tresult = mpeg3video_read_frame_backend(video, 0);\n\t\tmpeg3bits_seek_byte(video->vstream, 0);\n\t\tmpeg3video_match_refframes(video);\n\t}\n\treturn result;\n}\n\n\n/* ======================================================================= */\n/*                                    ENTRY POINTS */\n/* ======================================================================= */\n\n\n\nmpeg3video_t* mpeg3video_new(mpeg3_t *file, mpeg3_vtrack_t *track)\n{\n\tmpeg3video_t *video;\n\tint result = 0;\n\n\tvideo = mpeg3video_allocate_struct(file, track);\n\tresult = mpeg3video_get_header(video, 1);\n\n\tif(!result)\n\t{\n\t\tint hour, minute, second, frame;\n\t\tint gop_found;\n\n\t\tmpeg3video_initdecoder(video);\n\t\tvideo->decoder_initted = 1;\n\t\ttrack->width = video->horizontal_size;\n\t\ttrack->height = video->vertical_size;\n\t\ttrack->frame_rate = video->frame_rate;\n\n/* Get the length of the file from an elementary stream */\n\t\tif(file->is_video_stream)\n\t\t{\n/* Load the first GOP */\n\t\t\tmpeg3bits_seek_start(video->vstream);\n\t\t\tresult = mpeg3video_next_code(video->vstream, MPEG3_GOP_START_CODE);\n\t\t\tif(!result) mpeg3bits_getbits(video->vstream, 32);\n\t\t\tif(!result) result = mpeg3video_getgophdr(video);\n\n\t\t\thour = video->gop_timecode.hour;\n\t\t\tminute = video->gop_timecode.minute;\n\t\t\tsecond = video->gop_timecode.second;\n\t\t\tframe = video->gop_timecode.frame;\n\t\t\tvideo->first_frame = (long)(hour * 3600 * video->frame_rate + \n\t\t\t\tminute * 60 * video->frame_rate +\n\t\t\t\tsecond * video->frame_rate +\n\t\t\t\tframe);\n\n/* GOPs always have 16 frames */\n\t\t\tvideo->frames_per_gop = 16;\n\n/* Read the last GOP in the file by seeking backward. */\n\t\t\tmpeg3bits_seek_end(video->vstream);\n\t\t\tmpeg3bits_start_reverse(video->vstream);\n\t\t\tresult = mpeg3video_prev_code(video->vstream, MPEG3_GOP_START_CODE);\n\t\t\tmpeg3bits_start_forward(video->vstream);\n\t\t\tmpeg3bits_getbits(video->vstream, 8);\n\t\t\tif(!result) result = mpeg3video_getgophdr(video);\n\n\t\t\thour = video->gop_timecode.hour;\n\t\t\tminute = video->gop_timecode.minute;\n\t\t\tsecond = video->gop_timecode.second;\n\t\t\tframe = video->gop_timecode.frame;\n\n\t\t\tvideo->last_frame = (long)(hour * 3600 * video->frame_rate + \n\t\t\t\tminute * 60 * video->frame_rate +\n\t\t\t\tsecond * video->frame_rate +\n\t\t\t\tframe);\n\n/* Count number of frames to end */\n\t\t\twhile(!result)\n\t\t\t{\n\t\t\t\tresult = mpeg3video_next_code(video->vstream, MPEG3_PICTURE_START_CODE);\n\t\t\t\tif(!result)\n\t\t\t\t{\n\t\t\t\t\tmpeg3bits_getbyte_noptr(video->vstream);\n\t\t\t\t\tvideo->last_frame++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttrack->total_frames = video->last_frame - video->first_frame + 1;\n\t\t\tmpeg3bits_seek_start(video->vstream);\n\t\t}\n\t\telse\n\t\t{\n/* Gross approximation from a multiplexed file. */\n\t\t\tvideo->first_frame = 0;\n\t\t\ttrack->total_frames = video->last_frame = \n\t\t\t\t(long)(mpeg3demux_length(video->vstream->demuxer) * \n\t\t\t\t\tvideo->frame_rate);\n\t\t\tvideo->first_frame = 0;\n\t\t}\n\n\t\tvideo->maxframe = track->total_frames;\n\t\tmpeg3bits_seek_start(video->vstream);\n\t}\n\telse\n\t{\n\t\tmpeg3video_delete(video);\n\t\tvideo = 0;\n\t}\n\n\treturn video;\n}\n\nint mpeg3video_delete(mpeg3video_t *video)\n{\n\tif(video->decoder_initted)\n\t{\n\t\tmpeg3video_deletedecoder(video);\n\t}\n\tmpeg3video_delete_struct(video);\n\treturn 0;\n}\n\nint mpeg3video_set_cpus(mpeg3video_t *video, int cpus)\n{\n\treturn 0;\n}\n\nint mpeg3video_set_mmx(mpeg3video_t *video, int use_mmx)\n{\n\tvideo->have_mmx = use_mmx;\n\tmpeg3video_init_scantables(video);\n\treturn 0;\n}\n\nint mpeg3video_seek_percentage(mpeg3video_t *video, double percentage)\n{\n\tvideo->percentage_seek = percentage;\n\treturn 0;\n}\n\nint mpeg3video_previous_frame(mpeg3video_t *video)\n{\n\tif(mpeg3bits_tell_percentage(video->vstream) <= 0) return 1;\n\tmpeg3bits_start_reverse(video->vstream);\n\tmpeg3video_prev_code(video->vstream, MPEG3_PICTURE_START_CODE);\n\tmpeg3bits_getbits_reverse(video->vstream, 32);\n\t\n\tif(mpeg3bits_bof(video->vstream)) mpeg3bits_seek_percentage(video->vstream, 0);\n\tmpeg3bits_start_forward(video->vstream);\n\tvideo->repeat_count = 0;\n\treturn 0;\n}\n\nint mpeg3video_seek_frame(mpeg3video_t *video, long frame)\n{\n\tvideo->frame_seek = frame;\n\treturn 0;\n}\n\n/* Read all the way up to and including the next picture start code */\nint mpeg3video_read_raw(mpeg3video_t *video, unsigned char *output, long *size, long max_size)\n{\n\tunsigned MPEG3_INT32 code = 0;\n\tmpeg3_bits_t *vstream = video->vstream;\n\n\t*size = 0;\n\twhile(code != MPEG3_PICTURE_START_CODE && \n\t\tcode != MPEG3_SEQUENCE_END_CODE &&\n\t\t*size < max_size && \n\t\t!mpeg3bits_eof(vstream))\n\t{\n\t\tcode <<= 8;\n\t\t*output = mpeg3bits_getbyte_noptr(vstream);\n\t\tcode |= *output++;\n\t\t(*size)++;\n\t}\n\treturn mpeg3bits_eof(vstream);\n}\n\nint mpeg3video_read_frame(mpeg3video_t *video, \n\t\tlong frame_number, \n\t\tunsigned char **output_rows,\n\t\tint in_x, \n\t\tint in_y, \n\t\tint in_w, \n\t\tint in_h, \n\t\tint out_w, \n\t\tint out_h, \n\t\tint color_model)\n{\n\tint result = 0;\n\n\tvideo->want_yvu = 0;\n\tvideo->output_rows = output_rows;\n\tvideo->color_model = color_model;\n\n/* Get scaling tables */\n\tif(video->out_w != out_w || video->out_h != out_h ||\n\t\tvideo->in_w != in_w || video->in_h != in_h ||\n\t\tvideo->in_x != in_x || video->in_y != in_y)\n\t{\n\t\tif(video->x_table)\n\t\t{\n\t\t\tmemoryFree(video->x_table);\n\t\t\tmemoryFree(video->y_table);\n\t\t\tvideo->x_table = 0;\n\t\t\tvideo->y_table = 0;\n\t\t}\n\t}\n\n\tvideo->out_w = out_w;\n\tvideo->out_h = out_h;\n\tvideo->in_w = in_w;\n\tvideo->in_h = in_h;\n\tvideo->in_x = in_x;\n\tvideo->in_y = in_y;\n\n\tif(!video->x_table)\n\t{\n\t\tvideo->x_table = mpeg3video_get_scaletable(video->in_w, video->out_w);\n\t\tvideo->y_table = mpeg3video_get_scaletable(video->in_h, video->out_h);\n\t}\n\n\tmpeg3video_get_firstframe(video);\n\n\tif(!result) result = mpeg3video_seek(video);\n\n\tif(!result) result = mpeg3video_read_frame_backend(video, 0);\n\n\tif(video->output_src) mpeg3video_present_frame(video);\n\n\tvideo->percentage_seek = -1;\n\treturn result;\n}\n\nint mpeg3video_read_yuvframe(mpeg3video_t *video, \n\t\t\t\t\tlong frame_number, \n\t\t\t\t\tchar *y_output,\n\t\t\t\t\tchar *u_output,\n\t\t\t\t\tchar *v_output,\n\t\t\t\t\tint in_x,\n\t\t\t\t\tint in_y,\n\t\t\t\t\tint in_w,\n\t\t\t\t\tint in_h)\n{\n\tint result = 0;\n\n\tvideo->want_yvu = 1;\n\tvideo->y_output = y_output;\n\tvideo->u_output = u_output;\n\tvideo->v_output = v_output;\n\tvideo->in_x = in_x;\n\tvideo->in_y = in_y;\n\tvideo->in_w = in_w;\n\tvideo->in_h = in_h;\n\n\tmpeg3video_get_firstframe(video);\n\n\tif(!result) result = mpeg3video_seek(video);\n\n\tif(!result) result = mpeg3video_read_frame_backend(video, 0);\n\n\tif(video->output_src) mpeg3video_present_frame(video);\n\n\tvideo->want_yvu = 0;\n\tvideo->percentage_seek = -1;\n\treturn result;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/video/mpeg3video.h",
    "content": " /*  Changed Sept 15th by John M McIntosh to support Macintosh & Squeak\n */\n#ifndef MPEGVIDEO_H\n#define MPEGVIDEO_H\n\n#include \"bitstream.h\"\n#include \"mpeg3private.inc\"\n#include \"timecode.h\"\n\n#include \"idct.h\"\n#include \"slice.h\"\n\n/* zig-zag scan */\nextern unsigned char mpeg3_zig_zag_scan_nommx[64];\nextern unsigned char mpeg3_zig_zag_scan_mmx[64];\n\n/* alternate scan */\nextern unsigned char mpeg3_alternate_scan_nommx[64];\nextern unsigned char mpeg3_alternate_scan_mmx[64];\n\n/* default intra quantization matrix */\nextern unsigned char mpeg3_default_intra_quantizer_matrix[64];\n\n/* Frame rate table must agree with the one in the encoder */\nextern double mpeg3_frame_rate_table[16];\n\n/* non-linear quantization coefficient table */\nextern unsigned char mpeg3_non_linear_mquant_table[32];\n\n#define CHROMA420     1     /* chroma_format */\n#define CHROMA422     2\n#define CHROMA444     3\n\n#define TOP_FIELD     1     /* picture structure */\n#define BOTTOM_FIELD  2\n#define FRAME_PICTURE 3\n\n#define SEQ_ID        1     /* extension start code IDs */\n#define DISP_ID       2\n#define QUANT_ID      3\n#define SEQSCAL_ID    5\n#define PANSCAN_ID    7\n#define CODING_ID     8\n#define SPATSCAL_ID   9\n#define TEMPSCAL_ID  10\n\n#define MPERROR (-1)\n\n#define SC_NONE       0   /* scalable_mode */\n#define SC_DP         1\n#define SC_SPAT       2\n#define SC_SNR        3\n#define SC_TEMP       4\n\n#define I_TYPE        1     /* picture coding type */\n#define P_TYPE        2\n#define B_TYPE        3\n#define D_TYPE        4\n\n#define MB_INTRA      1 \t/* macroblock type */\n#define MB_PATTERN    2\n#define MB_BACKWARD   4\n#define MB_FORWARD    8\n#define MB_QUANT      16\n#define MB_WEIGHT     32\n#define MB_CLASS4     64\n\n#define MC_FIELD      1     /* motion_type */\n#define MC_FRAME      2\n#define MC_16X8       2\n#define MC_DMV        3\n\n#define MV_FIELD      0     /* mv_format */\n#define MV_FRAME      1\n\n#define CLIP(x)  ((x) >= 0 ? ((x) < 255 ? (x) : 255) : 0)\n\n/* Statically allocate as little as possible so a fake video struct */\n/* can be used for reading the GOP headers. */\n\ntypedef struct\n{\n\tvoid* file;\n\tvoid* track;\n\n/* ================================= Seeking variables ========================= */\n\tmpeg3_bits_t *vstream;\n\tint decoder_initted;\n\tunsigned char **output_rows;     /* Output frame buffer supplied by user */\n\tint in_x, in_y, in_w, in_h, out_w, out_h; /* Output dimensions */\n\tint *x_table, *y_table;          /* Location of every output pixel in the input */\n\tint color_model;\n\tint want_yvu;                    /* Want to return a YUV frame */\n\tchar *y_output, *u_output, *v_output; /* Output pointers for a YUV frame */\n\n\tmpeg3_slice_t slice_decoders[MPEG3_MAX_CPUS];  /* One slice decoder for every CPU */\n\tint total_slice_decoders;                       /* Total slice decoders in use */\n\tmpeg3_slice_buffer_t slice_buffers[MPEG3_MAX_CPUS];   /* Buffers for holding the slice data */\n\tint total_slice_buffers;         /* Total buffers in the array to be decompressed */\n\tint slice_buffers_initialized;     /* Total buffers initialized in the array */\n#ifdef USE_PTHREADS\n\tpthread_mutex_t slice_lock;      /* Lock slice array while getting the next buffer */\n\tpthread_mutex_t test_lock;\n#endif\n\tint blockreadsize;\n\tlong maxframe;         /* Max value of frame num to read */\n\tdouble percentage_seek;   /* Perform a percentage seek before the next frame is read */\n\tint frame_seek;        /* Perform a frame seek before the next frame is read */\n\tlong framenum;         /* Number of the next frame to be decoded */\n\tlong last_number;       /* Last framenum rendered */\n\tint found_seqhdr;\n\tlong bitrate;\n\tmpeg3_timecode_t gop_timecode;     /* Timecode for the last GOP header read. */\n\n/* These are only available from elementary streams. */\n\tlong frames_per_gop;       /* Frames per GOP after the first GOP. */\n\tlong first_gop_frames;     /* Frames in the first GOP. */\n\tlong first_frame;     /* Number of first frame stored in timecode */\n\tlong last_frame;      /* Last frame in file */\n\n/* ================================= Compression variables ===================== */\n/* Malloced frame buffers.  2 refframes are swapped in and out. */\n/* while only 1 auxframe is used. */\n\tunsigned char *yuv_buffer[5];  /* Make YVU buffers contiguous for all frames */\n\tunsigned char *oldrefframe[3], *refframe[3], *auxframe[3];\n\tunsigned char *llframe0[3], *llframe1[3];\n\tunsigned char *mpeg3_zigzag_scan_table;\n\tunsigned char *mpeg3_alternate_scan_table;\n// Source for the next frame presentation\n\tunsigned char **output_src;\n/* Pointers to frame buffers. */\n\tunsigned char *newframe[3];\n\tint horizontal_size, vertical_size, mb_width, mb_height;\n\tint coded_picture_width,  coded_picture_height;\n\tint chroma_format, chrom_width, chrom_height, blk_cnt;\n\tint pict_type;\n\tint forw_r_size, back_r_size, full_forw, full_back;\n\tint prog_seq, prog_frame;\n\tint h_forw_r_size, v_forw_r_size, h_back_r_size, v_back_r_size;\n\tint dc_prec, pict_struct, topfirst, frame_pred_dct, conceal_mv;\n\tint intravlc;\n\tint repeatfirst;\n\tint repeat_count;    /* Number of times to repeat the current frame * 100 since floating point is impossible in MMX */\n\tint current_repeat;  /* Number of times the current frame has been repeated * 100 */\n\tint secondfield;\n\tint skip_bframes;\n\tint stwc_table_index, llw, llh, hm, hn, vm, vn;\n\tint lltempref, llx0, lly0, llprog_frame, llfieldsel;\n\tint matrix_coefficients;\n\tint framerate_code;\n\tfloat frame_rate;\n\tlong *cr_to_r, *cr_to_g, *cb_to_g, *cb_to_b;\n\tlong *cr_to_r_ptr, *cr_to_g_ptr, *cb_to_g_ptr, *cb_to_b_ptr;\n\tint have_mmx;\n\tint intra_quantizer_matrix[64], non_intra_quantizer_matrix[64];\n\tint chroma_intra_quantizer_matrix[64], chroma_non_intra_quantizer_matrix[64];\n\tint mpeg2;\n\tint qscale_type, altscan;      /* picture coding extension */\n\tint pict_scal;                /* picture spatial scalable extension */\n\tint scalable_mode;            /* sequence scalable extension */\n} mpeg3video_t;\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/video/mpeg3videoprotos.h",
    "content": "#ifndef MPEG3VIDEOPROTOS_H\n#define MPEG3VIDEOPROTOS_H\n\nvoid mpeg3video_idct_conversion(short* block);\nunsigned int mpeg3slice_showbits(mpeg3_slice_buffer_t *slice_buffer, int bits);\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/video/output.c",
    "content": "/* \n *\n *  This file is part of libmpeg3\n *\t\n * LibMPEG3\n * Author: Adam Williams <broadcast@earthling.net>\n * Page: heroine.linuxbox.com\n * Page: http://www.smalltalkconsulting.com/html/mpeg3source.html (for Squeak)\n *\n    LibMPEG3 was originally licenced under GPL. It was relicensed by\n    the author under the LGPL and the Squeak license on Nov 1st, 2000\n    \n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA \n    \n    Also licensed under the Squeak license.\n    http://www.squeak.org/license.html\n */\n  /*  Changed Sept 15th by John M McIntosh to support Macintosh & Squeak\n      Feb/march 2001, JMM  tuning for the mac\n      I've coded up mpeg3video_ditherframeFastRGB555 and mpeg3video_ditherframeFastRGBA which\n      do specialized 16 and 32 bit Crb to rgb mapping (Intel should do this too?)\n      I also coded up clip arrays versus using CLIP() This avoid test/branchs which slows things down\n \t  May 19th, 2003, Ivo Roessling <ivo@wettinet.de> changes to asm syntax to enable compile in GCC 3.3.x\n\t  March 17th, 2006, John M McIntosh, set alpha to 0xff versus 0x00. \n */\n#include \"libmpeg3.h\"\n#include \"mpeg3video.h\"\n#include <string.h>\n\nunsigned char gClipArray[1026];\nunsigned short gClipArray16r[1026],gClipArray16g[1026],gClipArray16b[1026];\nunsigned char *gClipArray_ptr=&gClipArray[512];\nunsigned short *gClipArray_ptr16r=&gClipArray16r[512];\nunsigned short *gClipArray_ptr16g=&gClipArray16g[512];\nunsigned short *gClipArray_ptr16b=&gClipArray16b[512];\nint doClippingArrays=1;\n\nstatic unsigned char mpeg3_601_to_rgb[256];\n\n#ifdef HAVE_MMX\n\n#warning Beware of alpha this is not in the mmx code, and it appears tweak really wants it now\n\nstatic long long mpeg3_MMX_0 = 0L;\nstatic unsigned long  mpeg3_MMX_10w[]         = {0x00100010, 0x00100010};                     /*dd    00010 0010h, 000100010h */\nstatic unsigned long  mpeg3_MMX_80w[]         = {0x00800080, 0x00800080};                     /*dd    00080 0080h, 000800080h */\n\nstatic unsigned long  mpeg3_MMX_00FFw[]       = {0x00ff00ff, 0x00ff00ff};                     /*dd    000FF 00FFh, 000FF00FFh */\n\nstatic unsigned short mpeg3_MMX_Ublucoeff[]   = {0x81, 0x81, 0x81, 0x81};                     /*dd    00081 0081h, 000810081h */\nstatic unsigned short mpeg3_MMX_Vredcoeff[]   = {0x66, 0x66, 0x66, 0x66};                     /*dd    00066 0066h, 000660066h */\n\nstatic unsigned short mpeg3_MMX_Ugrncoeff[]   = {0xffe8, 0xffe8, 0xffe8, 0xffe8};             /*dd    0FFE7 FFE7h, 0FFE7FFE7h */\nstatic unsigned short mpeg3_MMX_Vgrncoeff[]   = {0xffcd, 0xffcd, 0xffcd, 0xffcd};             /*dd    0FFCC FFCCh, 0FFCCFFCCh */\n\nstatic unsigned short mpeg3_MMX_Ycoeff[]      = {0x4a, 0x4a, 0x4a, 0x4a};                     /*dd    0004A 004Ah, 0004A004Ah */\n\nstatic unsigned short mpeg3_MMX_redmask[]     = {0xf800, 0xf800, 0xf800, 0xf800};             /*dd    07c00 7c00h, 07c007c00h */\n\nstatic unsigned short mpeg3_MMX_grnmask[]     = {0x7e0, 0x7e0, 0x7e0, 0x7e0};                 /*dd    003e0 03e0h, 003e003e0h */\n\n/* Algorithm */\n/* \t\t\tr = (int)(*y + 1.371 * (*cr - 128)); */\n/* \t\t\tg = (int)(*y - 0.698 * (*cr - 128) - 0.336 * (*cb - 128)); */\n/* \t\t\tb = (int)(*y + 1.732 * (*cb - 128)); */\n\ninline void mpeg3video_rgb16_mmx(unsigned char *lum, \n\t\t\tunsigned char *cr, \n\t\t\tunsigned char *cb,\n            unsigned char *out, \n\t\t\tint rows, \n\t\t\tint cols, \n\t\t\tint mod)\n{\n\tunsigned short *row1;\n\tint x;\n    unsigned char *y;\n\tint col1;\n\n\trow1 = (unsigned short *)out;\n    col1 = cols + mod;\n    mod += cols + mod;\n    mod *= 2;\n\ty = lum + cols * rows;\n    x = 0;\n\n    __asm__ __volatile__(\t//\"align 8\\n\"\n        \"1:\\n\"\n            \"movd           (%1),                   %%mm0\\n\"  /* 4 Cb\t  0  0  0  0 u3 u2 u1 u0 */\n            \"pxor           %%mm7,                  %%mm7\\n\"\n            \"movd           (%0),                   %%mm1\\n\"  /* 4 Cr\t  0  0  0  0 v3 v2 v1 v0 */\n            \"punpcklbw      %%mm7,                  %%mm0\\n\"  /* 4 W cb   0 u3  0 u2  0 u1  0 u0 */\n            \"punpcklbw      %%mm7,                  %%mm1\\n\"  /* 4 W cr   0 v3  0 v2  0 v1  0 v0 */\n\n            \"psubw          _mpeg3_MMX_80w,          %%mm0\\n\"\n            \"psubw          _mpeg3_MMX_80w,          %%mm1\\n\"\n            \"movq           %%mm0,                  %%mm2\\n\"  /* Cb \t  0 u3  0 u2  0 u1  0 u0 */\n            \"movq           %%mm1,                  %%mm3\\n\"  /* Cr */\n            \"pmullw         _mpeg3_MMX_Ugrncoeff,    %%mm2\\n\"  /* Cb2green 0 R3  0 R2  0 R1  0 R0 */\n            \"movq           (%2),                   %%mm6\\n\"  /* L1 \t l7 L6 L5 L4 L3 L2 L1 L0 */\n            \"pmullw         _mpeg3_MMX_Ublucoeff,    %%mm0\\n\"  /* Cb2blue */\n            \"pand           _mpeg3_MMX_00FFw,        %%mm6\\n\"  /* L1 \t 00 L6 00 L4 00 L2 00 L0 */\n            \"pmullw         _mpeg3_MMX_Vgrncoeff,    %%mm3\\n\"  /* Cr2green */\n            \"movq           (%2),                   %%mm7\\n\"  /* L2 */\n            \"pmullw         _mpeg3_MMX_Vredcoeff,    %%mm1\\n\"  /* Cr2red */\n            \"psrlw          $8,                     %%mm7\\n\"  /* L2 \t 00 L7 00 L5 00 L3 00 L1 */\n            \"pmullw         _mpeg3_MMX_Ycoeff,       %%mm6\\n\"  /* lum1 */\n            \"paddw          %%mm3,                  %%mm2\\n\"  /* Cb2green + Cr2green == green */\n            \"pmullw         _mpeg3_MMX_Ycoeff,       %%mm7\\n\"  /* lum2 */\n\n            \"movq           %%mm6,                  %%mm4\\n\"  /* lum1 */\n            \"paddw          %%mm0,                  %%mm6\\n\"  /* lum1 +blue  00 B6 00 B4 00 B2 00 B0 */\n            \"movq           %%mm4,                  %%mm5\\n\"  /* lum1 */\n            \"paddw          %%mm1,                  %%mm4\\n\"  /* lum1 +red   00 R6 00 R4 00 R2 00 R0 */\n            \"paddw          %%mm2,                  %%mm5\\n\"  /* lum1 +green 00 G6 00 G4 00 G2 00 G0 */\n            \"psraw          $6,                     %%mm4\\n\"  /* R1 0 .. 64 */\n            \"movq           %%mm7,                  %%mm3\\n\"  /* lum2                       00 L7 00 L5 00 L3 00 L1 */\n            \"psraw          $6,                     %%mm5\\n\"  /* G1  - .. + */\n            \"paddw          %%mm0,                  %%mm7\\n\"  /* Lum2 +blue 00 B7 00 B5 00 B3 00 B1 */\n            \"psraw          $6,                     %%mm6\\n\"  /* B1         0 .. 64 */\n            \"packuswb       %%mm4,                  %%mm4\\n\"  /* R1 R1 */\n            \"packuswb       %%mm5,                  %%mm5\\n\"  /* G1 G1 */\n            \"packuswb       %%mm6,                  %%mm6\\n\"  /* B1 B1 */\n            \"punpcklbw      %%mm4,                  %%mm4\\n\"\n            \"punpcklbw      %%mm5,                  %%mm5\\n\"\n\n            \"pand           _mpeg3_MMX_redmask,      %%mm4\\n\"\n            \"psllw          $3,                     %%mm5\\n\"  /* GREEN       1 */\n            \"punpcklbw      %%mm6,                  %%mm6\\n\"\n            \"pand           _mpeg3_MMX_grnmask,      %%mm5\\n\"\n            \"pand           _mpeg3_MMX_redmask,      %%mm6\\n\"\n            \"por            %%mm5,                  %%mm4\\n\"  /* */\n            \"psrlw          $11,                    %%mm6\\n\"  /* BLUE\t\t 1 */\n            \"movq           %%mm3,                  %%mm5\\n\"  /* lum2 */\n            \"paddw          %%mm1,                  %%mm3\\n\"  /* lum2 +red\t 00 R7 00 R5 00 R3 00 R1 */\n            \"paddw          %%mm2,                  %%mm5\\n\"  /* lum2 +green 00 G7 00 G5 00 G3 00 G1 */\n            \"psraw          $6,                     %%mm3\\n\"  /* R2 */\n            \"por            %%mm6,                  %%mm4\\n\"  /* MM4 */\n            \"psraw          $6,                     %%mm5\\n\"  /* G2 */\n            \"movq           (%2, %3),               %%mm6\\n\"  /* L3 */\n            \"psraw          $6,                     %%mm7\\n\"\n            \"packuswb       %%mm3,                  %%mm3\\n\"\n            \"packuswb       %%mm5,                  %%mm5\\n\"\n            \"packuswb       %%mm7,                  %%mm7\\n\"\n            \"pand           _mpeg3_MMX_00FFw,        %%mm6\\n\"  /* L3 */\n            \"punpcklbw      %%mm3,                  %%mm3\\n\"\n            \"punpcklbw      %%mm5,                  %%mm5\\n\"\n            \"pmullw         _mpeg3_MMX_Ycoeff,       %%mm6\\n\"  /* lum3 */\n            \"punpcklbw      %%mm7,                  %%mm7\\n\"\n            \"psllw          $3,                     %%mm5\\n\"  /* GREEN 2 */\n            \"pand           _mpeg3_MMX_redmask,      %%mm7\\n\"\n            \"pand           _mpeg3_MMX_redmask,      %%mm3\\n\"\n            \"psrlw          $11,                    %%mm7\\n\"  /* BLUE  2 */\n            \"pand           _mpeg3_MMX_grnmask,      %%mm5\\n\"\n            \"por            %%mm7,  \t\t\t\t%%mm3\\n\"\n            \"movq           (%2,%3),\t\t\t\t%%mm7\\n\"  /* L4 */\n            \"por            %%mm5,  \t\t\t\t%%mm3\\n\"\t /* */\n            \"psrlw          $8,                     %%mm7\\n\"    /* L4 */\n            \"movq           %%mm4,  \t\t\t\t%%mm5\\n\"\n            \"punpcklwd      %%mm3,                  %%mm4\\n\"\n            \"pmullw         _mpeg3_MMX_Ycoeff,       %%mm7\\n\"    /* lum4 */\n            \"punpckhwd      %%mm3,                  %%mm5\\n\"\n\n            \"movq           %%mm4,  \t\t\t\t(%4)\\n\"\n            \"movq           %%mm5,  \t\t\t\t8(%4)\\n\"\n\n            \"movq           %%mm6,  \t\t\t\t%%mm4\\n\"\t\t/* Lum3 */\n            \"paddw          %%mm0,                  %%mm6\\n\"                /* Lum3 +blue */\n\n            \"movq           %%mm4,  \t\t\t\t%%mm5\\n\"\t\t\t\t\t\t/* Lum3 */\n            \"paddw          %%mm1,                  %%mm4\\n\"       /* Lum3 +red */\n            \"paddw          %%mm2,                  %%mm5\\n\"                        /* Lum3 +green */\n            \"psraw          $6, \t\t\t\t    %%mm4\\n\"\n            \"movq           %%mm7,   \t\t\t    %%mm3\\n\"\t/* Lum4 */\n            \"psraw          $6, \t\t\t\t    %%mm5\\n\"\n            \"paddw          %%mm0,                  %%mm7\\n\"                   /* Lum4 +blue */\n            \"psraw          $6,                     %%mm6\\n\"                        /* Lum3 +blue */\n            \"movq           %%mm3,                  %%mm0\\n\"  /* Lum4 */\n            \"packuswb       %%mm4,                  %%mm4\\n\"\n            \"paddw          %%mm1,                  %%mm3\\n\"  /* Lum4 +red */\n            \"packuswb       %%mm5,                  %%mm5\\n\"\n            \"paddw          %%mm2,                  %%mm0\\n\"         /* Lum4 +green */\n            \"packuswb       %%mm6,                  %%mm6\\n\"\n            \"punpcklbw      %%mm4,                  %%mm4\\n\"\n            \"punpcklbw      %%mm5,                  %%mm5\\n\"\n            \"punpcklbw      %%mm6,                  %%mm6\\n\"\n            \"psllw          $3,                     %%mm5\\n\" /* GREEN 3 */\n            \"pand           _mpeg3_MMX_redmask,      %%mm4\\n\"\n            \"psraw          $6,         \t\t\t%%mm3\\n\" /* psr 6 */\n            \"psraw          $6,         \t\t\t%%mm0\\n\"\n            \"pand           _mpeg3_MMX_redmask,      %%mm6\\n\" /* BLUE */\n            \"pand           _mpeg3_MMX_grnmask,      %%mm5\\n\"\n            \"psrlw          $11,                    %%mm6\\n\"  /* BLUE  3 */\n            \"por            %%mm5,  \t\t\t\t%%mm4\\n\"\n            \"psraw          $6,                     %%mm7\\n\"\n            \"por            %%mm6,      \t\t\t%%mm4\\n\"\n            \"packuswb       %%mm3,                  %%mm3\\n\"\n            \"packuswb       %%mm0,                  %%mm0\\n\"\n            \"packuswb       %%mm7,                  %%mm7\\n\"\n            \"punpcklbw      %%mm3,                  %%mm3\\n\"\n            \"punpcklbw      %%mm0,                  %%mm0\\n\"\n            \"punpcklbw      %%mm7,                  %%mm7\\n\"\n            \"pand           _mpeg3_MMX_redmask,      %%mm3\\n\"\n            \"pand           _mpeg3_MMX_redmask,      %%mm7\\n\" /* BLUE */\n            \"psllw          $3,                     %%mm0\\n\" /* GREEN 4 */\n            \"psrlw          $11,                    %%mm7\\n\"\n            \"pand           _mpeg3_MMX_grnmask,      %%mm0\\n\"\n            \"por            %%mm7,                  %%mm3\\n\"\n            \"addl           $8,                             %6\\n\"\n            \"por            %%mm0,                  %%mm3\\n\"\n\n            \"movq           %%mm4,                  %%mm5\\n\"\n\n            \"punpcklwd      %%mm3,                  %%mm4\\n\"\n            \"punpckhwd      %%mm3,                  %%mm5\\n\"\n\n            \"movq           %%mm4,                  (%4,%5,2)\\n\"\n            \"movq           %%mm5,                  8(%4,%5,2)\\n\"\n\n            \"addl           $8,                     %2\\n\"\n            \"addl           $4,                     %0\\n\"\n            \"addl           $4,                     %1\\n\"\n            \"cmpl           %3,                     %6\\n\"\n            \"leal           16(%4),                 %4\\n\"\n        \"jl             1b\\n\"\n        \"addl           %3,     %2\\n\"                   /* lum += cols */\n        \"addl           %7,     %4\\n\"                   /* row1 += mod */\n        \"movl           $0,     %6\\n\"\n        \"cmpl           %8,     %2\\n\"\n        \"jl             1b\\n\"\n        : : \"r\" (cr), \n\t\t\t\"r\" (cb), \n\t\t\t\"r\" (lum), \n\t\t\t\"r\" (cols), \n\t\t\t\"r\" (row1) ,\n\t\t\t\"r\" (col1), \n\t\t\t\"m\" (x), \n\t\t\t\"m\" (mod), \n\t\t\t\"m\" (y)\n\t\t);\n}\n\nstatic unsigned long long  mpeg3_MMX_U_80 = 0x0000008000800000LL;\nstatic unsigned long long  mpeg3_MMX_V_80 = 0x0000000000800080LL;\nstatic long long  mpeg3_MMX_U_COEF        = 0x00000058ffd30000LL;\nstatic long long  mpeg3_MMX_V_COEF        = 0x00000000ffea006fLL;\nstatic long long  mpeg3_MMX_601_Y_COEF    = 0x0000004800480048LL;\nstatic long long  mpeg3_MMX_601_Y_DIFF    = 0x0000000000000010LL;\n\ninline void mpeg3_bgra32_mmx(unsigned long y, \n\t\tunsigned long u, \n\t\tunsigned long v, \n\t\tunsigned long *output)\n{\n\tasm(\n\"\\n\"\n\"/* Output will be 0x00rrggbb with the 00 trailing so this can also be used */\\n\"\n\"/* for bgr24. */\\n\"\n\"\tmovd (%0), %%mm0;          /* Load y   0x00000000000000yy */\\n\"\n\"\tmovd (%1), %%mm1;          /* Load u    0x00000000000000cr */\\n\"\n\"\tmovq %%mm0, %%mm3;         /* Copy y to temp */\\n\"\n\"\tpsllq $16, %%mm1;          /* Shift u   0x0000000000cr0000 */\\n\"\n\"\tmovd (%2), %%mm2;          /* Load v    0x00000000000000cb */\\n\"\n\"\tpsllq $16, %%mm3;          /* Shift y */\\n\"\n\"\tmovq %%mm1, %%mm4;         /* Copy u to temp */\\n\"\n\"\tpor %%mm3, %%mm0;          /* Overlay new y byte 0x0000000000yy00yy */\\n\"\n\"\tpsllq $16, %%mm4;          /* Shift u */\\n\"\n\"\tmovq %%mm2, %%mm5;         /* Copy v to temp */\\n\"\n\"\tpsllq $16, %%mm3;          /* Shift y  */\\n\"\n\"\tpor %%mm4, %%mm1;          /* Overlay new u byte 0x000000cr00cr0000 */\\n\"\n\"\tpsllq $16, %%mm5;          /* Shift v  */\\n\"\n\"\tpor %%mm3, %%mm0;          /* Overlay new y byte 0x000000yy00yy00yy */\\n\"\n\"\tpor %%mm5, %%mm2;          /* Overlay new v byte 0x0000000000cb00cb */\\n\"\n\"\\n\"\n\"/* mm0: 0x000000yy00yy00yy mm1: 0x000000uu00uu0000 mm2: 0x0000000000vv00vv */\\n\"\n\" \tpsubw _mpeg3_MMX_U_80, %%mm1;    /* Subtract 128 from u 0x000000uu00uu0000 */\\n\"\n\" \tpmullw _mpeg3_MMX_U_COEF, %%mm1; /* Multiply u coeffs 0x0000uuuuuuuu0000 */\\n\"\n\" \tpsllw $6, %%mm0;                /* Shift y coeffs 0x0000yyy0yyy0yyy0 */\\n\"\n\" \tpsubw _mpeg3_MMX_V_80, %%mm2;    /* Subtract 128 from v 0x0000000000cb00cb */\\n\"\n\" \tpmullw _mpeg3_MMX_V_COEF, %%mm2; /* Multiply v coeffs 0x0000crcrcrcrcrcr */\\n\"\n\"\\n\"\n\"/* mm0: 0x000000yy00yy00yy mm1: 0x0000uuuuuuuu0000 mm2: 0x00000000vvvvvvvv */\\n\"\n\"\tpaddsw %%mm1, %%mm0;        /* Add u to result */\\n\"\n\"\tpaddsw %%mm2, %%mm0;        /* Add v to result 0x0000rrrrggggbbbb */\\n\"\n\"\tpsraw $6, %%mm0;           /* Demote precision */\\n\"\n\"\tpackuswb %%mm0, %%mm0;     /* Pack into ARGB 0x0000000000rrggbb */\\n\"\n\"\tmovd %%mm0, (%3);          /* Store output */\\n\"\n\"\t\\n\"\n:\n: \"r\" (&y), \"r\" (&u), \"r\" (&v), \"r\" (output));\n}\n\ninline void mpeg3_601_bgra32_mmx(unsigned long y, \n\t\tunsigned long u, \n\t\tunsigned long v, \n\t\tunsigned long *output)\n{\nasm(\"\\n\"\n\"/* Output will be 0x00rrggbb with the 00 trailing so this can also be used */\\n\"\n\"/* for bgr24. */\\n\"\n\"\tmovd (%0), %%mm0;          /* Load y   0x00000000000000yy */\\n\"\n\"\tpsubsw _mpeg3_MMX_601_Y_DIFF, %%mm0;      /* Subtract 16 from y */\\n\"\n\"\tmovd (%1), %%mm1;          /* Load u    0x00000000000000cr */\\n\"\n\"\tmovq %%mm0, %%mm3;         /* Copy y to temp */\\n\"\n\"\tpsllq $16, %%mm1;          /* Shift u   0x0000000000cr0000 */\\n\"\n\"\tmovd (%2), %%mm2;          /* Load v    0x00000000000000cb */\\n\"\n\"\tpsllq $16, %%mm3;          /* Shift y */\\n\"\n\"\tmovq %%mm1, %%mm4;         /* Copy u to temp */\\n\"\n\"\tpor %%mm3, %%mm0;          /* Overlay new y byte 0x0000000000yy00yy */\\n\"\n\"\tpsllq $16, %%mm4;          /* Shift u */\\n\"\n\"\tmovq %%mm2, %%mm5;         /* Copy v to temp */\\n\"\n\"\tpsllq $16, %%mm3;          /* Shift y  */\\n\"\n\"\tpor %%mm4, %%mm1;          /* Overlay new u byte 0x000000cr00cr0000 */\\n\"\n\"\tpsllq $16, %%mm5;          /* Shift v  */\\n\"\n\"\tpor %%mm3, %%mm0;          /* Overlay new y byte 0x000000yy00yy00yy */\\n\"\n\"\tpor %%mm5, %%mm2;          /* Overlay new v byte 0x0000000000cb00cb */\\n\"\n\"\\n\"\n\"/* mm0: 0x000000yy00yy00yy mm1: 0x000000uu00uu0000 mm2: 0x0000000000vv00vv */\\n\"\n\"\tpmullw _mpeg3_MMX_601_Y_COEF, %%mm0; /* Scale and shift y coeffs */\\n\"\n\"\tpsubw _mpeg3_MMX_U_80, %%mm1;     /* Subtract 128 from u 0x000000uu00uu0000 */\\n\"\n\" \tpmullw _mpeg3_MMX_U_COEF, %%mm1;  /* Multiply u coeffs 0x0000uuuuuuuu0000 */\\n\"\n\"\tpsubw _mpeg3_MMX_V_80, %%mm2;     /* Subtract 128 from v 0x0000000000cb00cb */\\n\"\n\" \tpmullw _mpeg3_MMX_V_COEF, %%mm2;  /* Multiply v coeffs 0x0000crcrcrcrcrcr */\\n\"\n\"\\n\"\n\"/* mm0: 0x000000yy00yy00yy mm1: 0x0000uuuuuuuu0000 mm2: 0x00000000vvvvvvvv */\\n\"\n\"\tpaddsw %%mm1, %%mm0;        /* Add u to result */\\n\"\n\"\tpaddsw %%mm2, %%mm0;        /* Add v to result 0x0000rrrrggggbbbb */\\n\"\n\"\tpsraw $6, %%mm0;           /* Demote precision */\\n\"\n\"\tpackuswb %%mm0, %%mm0;     /* Pack into ARGB 0x0000000000rrggbb */\\n\"\n\"\tmovd %%mm0, (%3);          /* Store output */\\n\"\n\"\t\\n\"\n:\n: \"r\" (&y), \"r\" (&u), \"r\" (&v), \"r\" (output));\n}\n\nstatic unsigned long long  mpeg3_MMX_U_80_RGB    = 0x0000000000800080LL;\nstatic unsigned long long  mpeg3_MMX_V_80_RGB    = 0x0000008000800000LL;\nstatic long long  mpeg3_MMX_U_COEF_RGB    = 0x00000000ffd30058LL;\nstatic long long  mpeg3_MMX_V_COEF_RGB    = 0x0000006fffea0000LL;\n\ninline void mpeg3_rgba32_mmx(unsigned long y, \n\t\tunsigned long u, \n\t\tunsigned long v, \n\t\tunsigned long *output)\n{\nasm(\"\\n\"\n\"/* Output will be 0x00bbggrr with the 00 trailing so this can also be used */\\n\"\n\"/* for rgb24. */\\n\"\n\"\tmovd (%0), %%mm0;          /* Load y   0x00000000000000yy */\\n\"\n\"\tmovd (%1), %%mm1;          /* Load v    0x00000000000000vv */\\n\"\n\"\tmovq %%mm0, %%mm3;         /* Copy y to temp */\\n\"\n\"\tpsllq $16, %%mm1;          /* Shift v   0x0000000000vv0000 */\\n\"\n\"\tmovd (%2), %%mm2;          /* Load u    0x00000000000000uu */\\n\"\n\"\tpsllq $16, %%mm3;          /* Shift y */\\n\"\n\"\tmovq %%mm1, %%mm4;         /* Copy v to temp */\\n\"\n\"\tpor %%mm3, %%mm0;          /* Overlay new y byte 0x0000000000yy00yy */\\n\"\n\"\tpsllq $16, %%mm4;          /* Shift v */\\n\"\n\"\tmovq %%mm2, %%mm5;         /* Copy u to temp */\\n\"\n\"\tpsllq $16, %%mm3;          /* Shift y  */\\n\"\n\"\tpor %%mm4, %%mm1;          /* Overlay new v byte 0x000000vv00vv0000 */\\n\"\n\"\tpsllq $16, %%mm5;          /* Shift u  */\\n\"\n\"\tpor %%mm3, %%mm0;          /* Overlay new y byte 0x000000yy00yy00yy */\\n\"\n\"\tpor %%mm5, %%mm2;          /* Overlay new u byte 0x0000000000uu00uu */\\n\"\n\"\\n\"\n\"/* mm0: 0x000000yy00yy00yy mm1: 0x000000vv00vv0000 mm2: 0x0000000000uu00uu */\\n\"\n\" \tpsubw _mpeg3_MMX_V_80_RGB, %%mm1;    /* Subtract 128 from v 0x000000vv00vv0000 */\\n\"\n\" \tpmullw _mpeg3_MMX_V_COEF_RGB, %%mm1; /* Multiply v coeffs 0x0000vvvvvvvv0000 */\\n\"\n\" \tpsllw $6, %%mm0;                /* Shift y coeffs 0x0000yyy0yyy0yyy0 */\\n\"\n\" \tpsubw _mpeg3_MMX_U_80_RGB, %%mm2;    /* Subtract 128 from u 0x0000000000uu00uu */\\n\"\n\" \tpmullw _mpeg3_MMX_U_COEF_RGB, %%mm2; /* Multiply u coeffs 0x0000uuuuuuuuuuuu */\\n\"\n\"\\n\"\n\"/* mm0: 0x000000yy00yy00yy mm1: 0x0000vvvvvvvv0000 mm2: 0x00000000uuuuuuuu */\\n\"\n\"\tpaddsw %%mm1, %%mm0;        /* Add v to result */\\n\"\n\"\tpaddsw %%mm2, %%mm0;        /* Add u to result 0x0000bbbbggggrrrr */\\n\"\n\"\tpsraw $6, %%mm0;           /* Demote precision */\\n\"\n\"\tpackuswb %%mm0, %%mm0;     /* Pack into RGBA 0x0000000000bbggrr */\\n\"\n\"\tmovd %%mm0, (%3);          /* Store output */\\n\"\n\"\t\\n\"\n:\n: \"r\" (&y), \"r\" (&v), \"r\" (&u), \"r\" (output));\n}\n\ninline void mpeg3_601_rgba32_mmx(unsigned long y, \n\t\tunsigned long u, \n\t\tunsigned long v, \n\t\tunsigned long *output)\n{\nasm(\"\\n\"\n\"/* Output will be 0x00bbggrr with the 00 trailing so this can also be used */\\n\"\n\"/* for rgb24. */\\n\"\n\"\tmovd (%0), %%mm0;          /* Load y   0x00000000000000yy */\\n\"\n\"\tpsubsw _mpeg3_MMX_601_Y_DIFF, %%mm0;      /* Subtract 16 from y */\\n\"\n\"\tmovd (%1), %%mm1;          /* Load v    0x00000000000000vv */\\n\"\n\"\tmovq %%mm0, %%mm3;         /* Copy y to temp */\\n\"\n\"\tpsllq $16, %%mm1;          /* Shift v   0x0000000000vv0000 */\\n\"\n\"\tmovd (%2), %%mm2;          /* Load u    0x00000000000000uu */\\n\"\n\"\tpsllq $16, %%mm3;          /* Shift y */\\n\"\n\"\tmovq %%mm1, %%mm4;         /* Copy v to temp */\\n\"\n\"\tpor %%mm3, %%mm0;          /* Overlay new y byte 0x0000000000yy00yy */\\n\"\n\"\tpsllq $16, %%mm4;          /* Shift v */\\n\"\n\"\tmovq %%mm2, %%mm5;         /* Copy u to temp */\\n\"\n\"\tpsllq $16, %%mm3;          /* Shift y  */\\n\"\n\"\tpor %%mm4, %%mm1;          /* Overlay new v byte 0x000000vv00vv0000 */\\n\"\n\"\tpsllq $16, %%mm5;          /* Shift u  */\\n\"\n\"\tpor %%mm3, %%mm0;          /* Overlay new y byte 0x000000yy00yy00yy */\\n\"\n\"\tpor %%mm5, %%mm2;          /* Overlay new u byte 0x0000000000uu00uu */\\n\"\n\"\\n\"\n\"/* mm0: 0x000000yy00yy00yy     mm1: 0x000000vv00vv0000     mm2: 0x0000000000uu00uu */\\n\"\n\"\tpmullw _mpeg3_MMX_601_Y_COEF, %%mm0;     /* Scale y coeffs */\\n\"\n\" \tpsubw _mpeg3_MMX_V_80_RGB, %%mm1;    /* Subtract 128 from v 0x000000vv00vv0000 */\\n\"\n\" \tpmullw _mpeg3_MMX_V_COEF_RGB, %%mm1; /* Multiply v coeffs 0x0000vvvvvvvv0000 */\\n\"\n\" \tpsubw _mpeg3_MMX_U_80_RGB, %%mm2;    /* Subtract 128 from u 0x0000000000uu00uu */\\n\"\n\" \tpmullw _mpeg3_MMX_U_COEF_RGB, %%mm2; /* Multiply u coeffs 0x0000uuuuuuuuuuuu */\\n\"\n\"\\n\"\n\"/* mm0: 0x000000yy00yy00yy mm1: 0x0000vvvvvvvv0000 mm2: 0x00000000uuuuuuuu */\\n\"\n\"\tpaddsw %%mm1, %%mm0;        /* Add v to result */\\n\"\n\"\tpaddsw %%mm2, %%mm0;        /* Add u to result 0x0000bbbbggggrrrr */\\n\"\n\"\tpsraw $6, %%mm0;           /* Demote precision */\\n\"\n\"\tpackuswb %%mm0, %%mm0;     /* Pack into RGBA 0x0000000000bbggrr */\\n\"\n\"\tmovd %%mm0, (%3);          /* Store output */\\n\"\n\"\t\\n\"\n:\n: \"r\" (&y), \"r\" (&v), \"r\" (&u), \"r\" (output));\n}\n\n#endif\n\n#define DITHER_ROW_HEAD \\\n\tfor(h = 0; h < video->out_h; h++) \\\n\t{ \\\n\t\ty_in = &src[0][(video->y_table[h] + video->in_y) * video->coded_picture_width] + video->in_x; \\\n\t\tcb_in = &src[1][((video->y_table[h] + video->in_y) >> 1) * video->chrom_width] + (video->in_x >> 2); \\\n\t\tcr_in = &src[2][((video->y_table[h] + video->in_y) >> 1) * video->chrom_width] + (video->in_x >> 1); \\\n\t\tdata = output_rows[h];\n\n#define DITHER_ROW_TAIL \\\n\t}\n\n#define DITHER_SCALE_HEAD \\\n\tfor(w = 0; w < video->out_w; w++) \\\n\t{ \\\n\t\tuv_subscript = video->x_table[w] / 2; \\\n\t\ty_l = y_in[video->x_table[w]]; \\\n\t\ty_l <<= 16; \\\n\t\tr_l = (y_l + video->cr_to_r[cr_in[uv_subscript]]) >> 16; \\\n\t\tg_l = (y_l + video->cr_to_g[cr_in[uv_subscript]] + video->cb_to_g[cb_in[uv_subscript]]) >> 16; \\\n\t\tb_l = (y_l + video->cb_to_b[cb_in[uv_subscript]]) >> 16;\n\n#define DITHER_SCALE_601_HEAD \\\n\tfor(w = 0; w < video->out_w; w++) \\\n\t{ \\\n\t\tuv_subscript = video->x_table[w] / 2; \\\n\t\ty_l = mpeg3_601_to_rgb[y_in[video->x_table[w]]]; \\\n\t\ty_l <<= 16; \\\n\t\tr_l = (y_l + video->cr_to_r[cr_in[uv_subscript]]) >> 16; \\\n\t\tg_l = (y_l + video->cr_to_g[cr_in[uv_subscript]] + video->cb_to_g[cb_in[uv_subscript]]) >> 16; \\\n\t\tb_l = (y_l + video->cb_to_b[cb_in[uv_subscript]]) >> 16;\n\n#define DITHER_SCALE_TAIL \\\n\t}\n\n#define DITHER_MMX_SCALE_HEAD \\\n\tfor(w = 0; w < video->out_w; w++) \\\n\t{ \\\n\t\tuv_subscript = video->x_table[w] / 2;\n\n#define DITHER_MMX_SCALE_TAIL \\\n\t\tdata += step; \\\n\t}\n\n#define DITHER_MMX_HEAD \\\n\tfor(w = 0; w < video->out_w; w += 2) \\\n\t{\n\n#define DITHER_MMX_TAIL \\\n\t\tdata += step; \\\n        cr_in++; \\\n        cb_in++; \\\n\t}\n\n#define DITHER_HEAD \\\n    for(w = 0; w < video->horizontal_size; w++) \\\n\t{ \\\n\t\ty_l = *y_in++; \\\n\t\ty_l <<= 16; \\\n\t\tr_l = (y_l + video->cr_to_r[*cr_in]) >> 16; \\\n\t\tg_l = (y_l + video->cr_to_g[*cr_in] + video->cb_to_g[*cb_in]) >> 16; \\\n\t\tb_l = (y_l + video->cb_to_b[*cb_in]) >> 16;\n\n#define DITHER_601_HEAD \\\n    for(w = 0; w < video->horizontal_size; w++) \\\n\t{ \\\n\t\ty_l = mpeg3_601_to_rgb[*y_in++]; \\\n\t\ty_l <<= 16; \\\n\t\tr_l = (y_l + video->cr_to_r[*cr_in]) >> 16; \\\n\t\tg_l = (y_l + video->cr_to_g[*cr_in] + video->cb_to_g[*cb_in]) >> 16; \\\n\t\tb_l = (y_l + video->cb_to_b[*cb_in]) >> 16;\n\n#define DITHER_TAIL \\\n    \tif(w & 1) \\\n\t\t{ \\\n        \tcr_in++; \\\n        \tcb_in++; \\\n    \t} \\\n    }\n\n\n#define STORE_PIXEL_BGR888 \\\n\t*data++ = clipArray_ptr[b_l]; \\\n\t*data++ = clipArray_ptr[g_l]; \\\n\t*data++ = clipArray_ptr[r_l];\n\n#define STORE_PIXEL_BGRA8888 \\\n\t*data++ = clipArray_ptr[b_l]; \\\n\t*data++ = clipArray_ptr[g_l]; \\\n\t*data++ = clipArray_ptr[r_l]; \\\n\t*data++ = 0xFF;\n\n#define STORE_PIXEL_RGB565 \\\n    foo = ((clipArray_ptr[r_l] & 0xf8) << 8) | \\\n\t\t((clipArray_ptr[g_l] & 0xfc) << 3) | \\\n\t\t((clipArray_ptr[b_l] & 0xf8) >> 3); *(unsigned short*)data = foo; data += 2;\n\n#define STORE_PIXEL_RGB555 \\\n    foo = ((clipArray_ptr[r_l] & 0xf8) << 7) | \\\n\t\t((clipArray_ptr[g_l] & 0xf8) << 2) | \\\n\t\t((clipArray_ptr[b_l] & 0xf8) >> 3); *(unsigned short*)data = foo; data += 2;\n\n#define STORE_PIXEL_RGBI555 \\\n    foo = ((clipArray_ptr[r_l] & 0xf8) << 7) | \\\n          ((clipArray_ptr[g_l] & 0xf8) << 2) | \\\n          ((clipArray_ptr[b_l] & 0xf8) >> 3); \\\n    if((unsigned long)data & 0x00000002L) { \\\n\t  data -= 2; \\\n          *(unsigned short*)data = foo; \\\n          data += 4; \\\n    } else { \\\n\t  data += 2; \\\n          *(unsigned short*)data = foo; \\\n    }\n\n\n#define STORE_PIXEL_RGB888 \\\n\t*data++ = clipArray_ptr[r_l]; \\\n\t*data++ = clipArray_ptr[g_l]; \\\n\t*data++ = clipArray_ptr[b_l];\n\n#define STORE_PIXEL_RGBA8888 \\\n\t*data++ = clipArray_ptr[r_l]; \\\n\t*data++ = clipArray_ptr[g_l]; \\\n\t*data++ = clipArray_ptr[b_l]; \\\n\t*data++ = 0xFF;\n\n#define STORE_PIXEL_ARGB8888 \\\n\t*data++ = 0xFF; \\\n\t*data++ = clipArray_ptr[r_l]; \\\n\t*data++ = clipArray_ptr[g_l]; \\\n\t*data++ = clipArray_ptr[b_l]; \n\n#define STORE_PIXEL_RGBA16161616 \\\n\t*data_s++ = clipArray_ptr[r_l]; \\\n\t*data_s++ = clipArray_ptr[g_l]; \\\n\t*data_s++ = clipArray_ptr[b_l]; \\\n\t*data_s++ = 0xFFFF;\n\n\n\n/* Only good for YUV 4:2:0 */\nint mpeg3video_ditherframe(mpeg3video_t *video, unsigned char **src, unsigned char **output_rows)\n{\n\tint h = 0;\n\tregister unsigned char *y_in, *cb_in, *cr_in;\n\tlong y_l, r_l, b_l, g_l;\n\tregister unsigned char *data,*clipArray_ptr=gClipArray_ptr;\n\tregister int uv_subscript, step, w = -1;\n\tregister short foo;\n\n#ifdef HAVE_MMX\n/* =================================== MMX ===================================== */\n\tif(video->have_mmx &&\n\t\tvideo->out_w == video->horizontal_size &&\n\t\tvideo->out_h == video->vertical_size &&\n\t\tvideo->in_w == video->out_w &&\n\t\tvideo->in_h == video->out_h &&\n\t\tvideo->in_x == 0 &&\n\t\tvideo->in_y == 0 &&\n\t\t(video->color_model == MPEG3_RGB565 || video->color_model == MPEG3_601_RGB565 ||\n\t\tvideo->color_model == MPEG3_RGB555 || video->color_model == MPEG3_601_RGB555 || \n\t\tvideo->color_model == MPEG3_RGBI555 || video->color_model == MPEG3_601_RGBI555\t))\n\t{\n/* Unscaled 16 bit */\n\t\tmpeg3video_rgb16_mmx(src[0], \n\t\t\tsrc[2], \n\t\t\tsrc[1], \n\t\t\toutput_rows[0], \n\t\t\tvideo->out_h, \n\t\t\tvideo->out_w, \n\t\t\t(output_rows[1] - output_rows[0]) / 2 - video->out_w);\n\t}\n\telse\n\tif(video->have_mmx && \n\t\t(video->color_model == MPEG3_BGRA8888 || \n\t\tvideo->color_model == MPEG3_BGR888 ||\n/*\t\tvideo->color_model == MPEG3_RGB888 || */\n\t\tvideo->color_model == MPEG3_RGBA8888 ||\n\t\tvideo->color_model == MPEG3_ARGB8888 ||\n\t\tvideo->color_model == MPEG3_601_BGR888 ||\n\t\tvideo->color_model == MPEG3_601_BGRA8888 ||\n\t\tvideo->color_model == MPEG3_601_RGB888 ||\n\t\tvideo->color_model == MPEG3_601_RGBA8888||\n\t\tvideo->color_model == MPEG3_601_ARGB8888))\n\t{\n/* Original MMX */\n\t\tif(video->color_model == MPEG3_BGRA8888 ||\n\t\t\tvideo->color_model == MPEG3_RGBA8888 ||\n\t\t\tvideo->color_model == MPEG3_ARGB8888 ||\n\t\t\tvideo->color_model == MPEG3_601_BGRA8888 ||\n\t\t\tvideo->color_model == MPEG3_601_RGBA8888 ||\n\t\t\tvideo->color_model == MPEG3_601_ARGB8888) step = 4;\n\t\telse\n\t\tif(video->color_model == MPEG3_BGR888 ||\n\t\t\tvideo->color_model == MPEG3_RGB888 ||\n\t\t\tvideo->color_model == MPEG3_601_BGR888 ||\n\t\t\tvideo->color_model == MPEG3_601_RGB888) step = 3;\n\n\t\tDITHER_ROW_HEAD\n/* Transfer row with scaling */\n\t\t\tif(video->out_w != video->horizontal_size)\n\t\t\t{\n\t\t\t\tswitch(video->color_model)\n\t\t\t\t{\n\t\t\t\t\tcase MPEG3_BGRA8888:\n\t\t\t\t\tcase MPEG3_BGR888:\n\t\t\t\t\t\tDITHER_MMX_SCALE_HEAD\n\t\t\t\t\t\t\tmpeg3_bgra32_mmx(y_in[video->x_table[w]], \n\t\t\t\t\t\t\t\tcr_in[uv_subscript], \n\t\t\t\t\t\t\t\tcb_in[uv_subscript], \n\t\t\t\t\t\t\t\t(unsigned long*)data);\n\t\t\t\t\t\tDITHER_MMX_SCALE_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase MPEG3_601_BGRA8888:\n\t\t\t\t\tcase MPEG3_601_BGR888:\n\t\t\t\t\t\tDITHER_MMX_SCALE_HEAD\n\t\t\t\t\t\t\tmpeg3_601_bgra32_mmx(y_in[video->x_table[w]], \n\t\t\t\t\t\t\t\tcr_in[uv_subscript], \n\t\t\t\t\t\t\t\tcb_in[uv_subscript], \n\t\t\t\t\t\t\t\t(unsigned long*)data);\n\t\t\t\t\t\tDITHER_MMX_SCALE_TAIL\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase MPEG3_RGBA8888:\n\t\t\t\t\tcase MPEG3_ARGB8888:\n\t\t\t\t\tcase MPEG3_RGB888:\n\t\t\t\t\t\tDITHER_MMX_SCALE_HEAD\n\t\t\t\t\t\t\tmpeg3_rgba32_mmx(y_in[video->x_table[w]], \n\t\t\t\t\t\t\t\tcr_in[uv_subscript], \n\t\t\t\t\t\t\t\tcb_in[uv_subscript], \n\t\t\t\t\t\t\t\t(unsigned long*)data);\n\t\t\t\t\t\tDITHER_MMX_SCALE_TAIL\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase MPEG3_601_RGBA8888:\n\t\t\t\t\tcase MPEG3_601_ARGB8888:\n\t\t\t\t\tcase MPEG3_601_RGB888:\n\t\t\t\t\t\tDITHER_MMX_SCALE_HEAD\n\t\t\t\t\t\t\tmpeg3_601_rgba32_mmx(y_in[video->x_table[w]], \n\t\t\t\t\t\t\t\tcr_in[uv_subscript], \n\t\t\t\t\t\t\t\tcb_in[uv_subscript], \n\t\t\t\t\t\t\t\t(unsigned long*)data);\n\t\t\t\t\t\tDITHER_MMX_SCALE_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n/* Transfer row unscaled */\n\t\t\t{\n\t\t\t\tswitch(video->color_model)\n\t\t\t\t{\n/* MMX byte swap 24 and 32 bit */\n\t\t\t\t\tcase MPEG3_BGRA8888:\n\t\t\t\t\tcase MPEG3_BGR888:\n\t\t\t\t\t\tDITHER_MMX_HEAD\n\t\t\t\t\t\t\tmpeg3_bgra32_mmx(*y_in++, \n\t\t\t\t\t\t\t\t*cr_in, \n\t\t\t\t\t\t\t\t*cb_in, \n\t\t\t\t\t\t\t\t(unsigned long*)data);\n\t\t\t\t\t\t\tdata += step;\n\t\t\t\t\t\t\tmpeg3_bgra32_mmx(*y_in++, \n\t\t\t\t\t\t\t\t*cr_in, \n\t\t\t\t\t\t\t\t*cb_in, \n\t\t\t\t\t\t\t\t(unsigned long*)data);\n\t\t\t\t\t\tDITHER_MMX_TAIL\n\t\t\t\t\t\tbreak;\n\n/* MMX 601 byte swap 24 and 32 bit */\n\t\t\t\t\tcase MPEG3_601_BGRA8888:\n\t\t\t\t\tcase MPEG3_601_BGR888:\n\t\t\t\t\t\tDITHER_MMX_HEAD\n\t\t\t\t\t\t\tmpeg3_601_bgra32_mmx(*y_in++, \n\t\t\t\t\t\t\t\t*cr_in, \n\t\t\t\t\t\t\t\t*cb_in, \n\t\t\t\t\t\t\t\t(unsigned long*)data);\n\t\t\t\t\t\t\tdata += step;\n\t\t\t\t\t\t\tmpeg3_601_bgra32_mmx(*y_in++, \n\t\t\t\t\t\t\t\t*cr_in, \n\t\t\t\t\t\t\t\t*cb_in, \n\t\t\t\t\t\t\t\t(unsigned long*)data);\n\t\t\t\t\t\tDITHER_MMX_TAIL\n\t\t\t\t\t\tbreak;\n\n/* MMX 24 and 32 bit no byte swap */\n\t\t\t\t\tcase MPEG3_RGBA8888:\n\t\t\t\t\tcase MPEG3_ARGB8888:\n\t\t\t\t\tcase MPEG3_RGB888:\n\t\t\t\t\t\tDITHER_MMX_HEAD\n\t\t\t\t\t\t\tmpeg3_rgba32_mmx(*y_in++, \n\t\t\t\t\t\t\t\t*cr_in, \n\t\t\t\t\t\t\t\t*cb_in, \n\t\t\t\t\t\t\t\t(unsigned long*)data);\n\t\t\t\t\t\t\tdata += step;\n\t\t\t\t\t\t\tmpeg3_rgba32_mmx(*y_in++, \n\t\t\t\t\t\t\t\t*cr_in, \n\t\t\t\t\t\t\t\t*cb_in, \n\t\t\t\t\t\t\t\t(unsigned long*)data);\n\t\t\t\t\t\tDITHER_MMX_TAIL\n\t\t\t\t\t\tbreak;\n\n/* MMX 601 24 and 32 bit no byte swap */\n\t\t\t\t\tcase MPEG3_601_RGBA8888:\n\t\t\t\t\tcase MPEG3_601_ARGB8888:\n\t\t\t\t\tcase MPEG3_601_RGB888:\n\t\t\t\t\t\tDITHER_MMX_HEAD\n\t\t\t\t\t\t\tmpeg3_601_rgba32_mmx(*y_in++, \n\t\t\t\t\t\t\t\t*cr_in, \n\t\t\t\t\t\t\t\t*cb_in, \n\t\t\t\t\t\t\t\t(unsigned long*)data);\n\t\t\t\t\t\t\tdata += step;\n\t\t\t\t\t\t\tmpeg3_601_rgba32_mmx(*y_in++, \n\t\t\t\t\t\t\t\t*cr_in, \n\t\t\t\t\t\t\t\t*cb_in, \n\t\t\t\t\t\t\t\t(unsigned long*)data);\n\t\t\t\t\t\tDITHER_MMX_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\tDITHER_ROW_TAIL\n\t}\n\telse\n#endif\n/* ================================== NO MMX ==================================== */\n\t{\n\t\tDITHER_ROW_HEAD\n/* Transfer row with scaling */\n\t\t\tif(video->out_w != video->horizontal_size)\n\t\t\t{\n\t\t\t\tswitch(video->color_model)\n\t\t\t\t{\n\t\t\t\t\tcase MPEG3_BGR888:\n\t\t\t\t\t\tDITHER_SCALE_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_BGR888\n\t\t\t\t\t\tDITHER_SCALE_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MPEG3_BGRA8888:\n\t\t\t\t\t\tDITHER_SCALE_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_BGRA8888\n\t\t\t\t\t\tDITHER_SCALE_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MPEG3_RGB565:\n\t\t\t\t\t\tDITHER_SCALE_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_RGB565\n\t\t\t\t\t\tDITHER_SCALE_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MPEG3_RGB555:\n\t\t\t\t\t\tDITHER_SCALE_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_RGB555\n\t\t\t\t\t\tDITHER_SCALE_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MPEG3_RGBI555:\n\t\t\t\t\t\tDITHER_SCALE_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_RGBI555\n\t\t\t\t\t\tDITHER_SCALE_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MPEG3_RGB888:\n\t\t\t\t\t\tDITHER_SCALE_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_RGB888\n\t\t\t\t\t\tDITHER_SCALE_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MPEG3_RGBA8888:\n\t\t\t\t\t\tDITHER_SCALE_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_RGBA8888\n\t\t\t\t\t\tDITHER_SCALE_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MPEG3_ARGB8888:\n\t\t\t\t\t\tDITHER_SCALE_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_ARGB8888\n\t\t\t\t\t\tDITHER_SCALE_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MPEG3_601_BGR888:\n\t\t\t\t\t\tDITHER_SCALE_601_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_BGR888\n\t\t\t\t\t\tDITHER_SCALE_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MPEG3_601_BGRA8888:\n\t\t\t\t\t\tDITHER_SCALE_601_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_BGRA8888\n\t\t\t\t\t\tDITHER_SCALE_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MPEG3_601_RGB565:\n\t\t\t\t\t\tDITHER_SCALE_601_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_RGB565\n\t\t\t\t\t\tDITHER_SCALE_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MPEG3_601_RGB555:\n\t\t\t\t\t\tDITHER_SCALE_601_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_RGB555\n\t\t\t\t\t\tDITHER_SCALE_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MPEG3_601_RGBI555:\n\t\t\t\t\t\tDITHER_SCALE_601_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_RGBI555\n\t\t\t\t\t\tDITHER_SCALE_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MPEG3_601_RGB888:\n\t\t\t\t\t\tDITHER_SCALE_601_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_RGB888\n\t\t\t\t\t\tDITHER_SCALE_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MPEG3_601_RGBA8888:\n\t\t\t\t\t\tDITHER_SCALE_601_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_RGBA8888\n\t\t\t\t\t\tDITHER_SCALE_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MPEG3_601_ARGB8888:\n\t\t\t\t\t\tDITHER_SCALE_601_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_ARGB8888\n\t\t\t\t\t\tDITHER_SCALE_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MPEG3_RGBA16161616:\n\t\t\t\t\t{\n\t\t\t\t\t\tregister unsigned short *data_s = (unsigned short*)data;\n\t\t\t\t\t\tDITHER_SCALE_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_RGBA16161616\n\t\t\t\t\t\tDITHER_SCALE_TAIL\n\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n/* Transfer row unscaled */\n\t\t\t\tswitch(video->color_model)\n\t\t\t\t{\n\t\t\t\t\tcase MPEG3_BGR888:\n\t\t\t\t\t\tDITHER_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_BGR888\n\t\t\t\t\t\tDITHER_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MPEG3_BGRA8888:\n\t\t\t\t\t\tDITHER_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_BGRA8888\n\t\t\t\t\t\tDITHER_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MPEG3_RGB565:\n\t\t\t\t\t\tDITHER_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_RGB565\n\t\t\t\t\t\tDITHER_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MPEG3_RGB555:\n\t\t\t\t\t\tDITHER_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_RGB555\n\t\t\t\t\t\tDITHER_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MPEG3_RGBI555:\n\t\t\t\t\t\tDITHER_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_RGBI555\n\t\t\t\t\t\tDITHER_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MPEG3_RGB888:\n\t\t\t\t\t\tDITHER_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_RGB888\n\t\t\t\t\t\tDITHER_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MPEG3_RGBA8888:\n\t\t\t\t\t\tDITHER_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_RGBA8888\n\t\t\t\t\t\tDITHER_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MPEG3_ARGB8888:\n\t\t\t\t\t\tDITHER_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_ARGB8888\n\t\t\t\t\t\tDITHER_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MPEG3_601_BGR888:\n\t\t\t\t\t\tDITHER_601_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_BGR888\n\t\t\t\t\t\tDITHER_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MPEG3_601_BGRA8888:\n\t\t\t\t\t\tDITHER_601_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_RGB565 /*? JMM */\n\t\t\t\t\t\tDITHER_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MPEG3_601_RGB565:\n\t\t\t\t\t\tDITHER_601_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_RGB565\n\t\t\t\t\t\tDITHER_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MPEG3_601_RGB555:\n\t\t\t\t\t\tDITHER_601_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_RGB555\n\t\t\t\t\t\tDITHER_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MPEG3_601_RGBI555:\n\t\t\t\t\t\tDITHER_601_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_RGBI555\n\t\t\t\t\t\tDITHER_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MPEG3_601_RGB888:\n\t\t\t\t\t\tDITHER_601_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_RGB888\n\t\t\t\t\t\tDITHER_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MPEG3_601_RGBA8888:\n\t\t\t\t\t\tDITHER_601_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_RGBA8888\n\t\t\t\t\t\tDITHER_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MPEG3_601_ARGB8888:\n\t\t\t\t\t\tDITHER_601_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_ARGB8888\n\t\t\t\t\t\tDITHER_TAIL\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MPEG3_RGBA16161616:\n\t\t\t\t\t{\n\t\t\t\t\t\tregister unsigned short *data_s = (unsigned short*)data;\n\t\t\t\t\t\tDITHER_HEAD\n\t\t\t\t\t\tSTORE_PIXEL_RGBA16161616\n\t\t\t\t\t\tDITHER_TAIL\n\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\tDITHER_ROW_TAIL\n\t} /* End of non-MMX */\n\n#ifdef HAVE_MMX\n\tif(video->have_mmx)\n\t\t__asm__ __volatile__ (\"emms\");\n#endif\n\treturn 0;\n}\n\nint mpeg3video_ditherframe444(mpeg3video_t *video, unsigned char *src[])\n{\n\treturn 0;\n}\n\nint mpeg3video_dithertop(mpeg3video_t *video, unsigned char *src[])\n{\n    if (video->color_model == MPEG3_RGB555) \n        return mpeg3video_ditherframeFastRGB555(video, src, video->output_rows);\n    else\n        if (video->color_model == MPEG3_ARGB8888) \n            return mpeg3video_ditherframeFastRGBA(video, src, video->output_rows);\n        else\n\treturn mpeg3video_ditherframe(video, src, video->output_rows);\n}\n\nint mpeg3video_dithertop444(mpeg3video_t *video, unsigned char *src[])\n{\n\treturn 0;\n}\n\nint mpeg3video_ditherbot(mpeg3video_t *video, unsigned char *src[])\n{\n\treturn 0;\n}\n\nint mpeg3video_ditherbot444(mpeg3video_t *video, unsigned char *src[])\n{\n\treturn 0;\n}\n\nvoid memcpy_fast(unsigned char *output, unsigned char *input, long len)\n{\n\tint i, len2;\n/* 8 byte alignment */\n/*\n * \tif(!((long)input & 0x7))\n * \t{\n * \t\tlen2 = len >> 4;\n * \t\tfor(i = 0; i < len2; )\n * \t\t{\n * \t\t\t((MPEG3_INT64*)output)[i] = ((MPEG3_INT64*)input)[i];\n * \t\t\ti++;\n * \t\t\t((MPEG3_INT64*)output)[i] = ((MPEG3_INT64*)input)[i];\n * \t\t\ti++;\n * \t\t}\n * \n * \t\tfor(i *= 16; i < len; i++)\n * \t\t{\n * \t\t\toutput[i] = input[i];\n * \t\t}\n * \t}\n * \telse\n */\n\t\tmemcpy(output, input, len);\n}\n\nint mpeg3video_init_output()\n{\n\tint i, value;\n\tfor(i = 0; i < 256; i++)\n\t{\n\t\tvalue = (int)(1.1644 * i - 255 * 0.0627 + 0.5);\n\t\tif(value < 0) value = 0;\n\t\telse\n\t\tif(value > 255) value = 255;\n\t\tmpeg3_601_to_rgb[i] = value;\n\t}\n\treturn 0;\n}\n\nint mpeg3video_ditherframeFastRGBA(mpeg3video_t *video, unsigned char **src, unsigned char **output_rows) {\n\tint h = 0;\n\tregister unsigned char *y_in, *cb_in, *cr_in, *clipArray_ptr;\n\tlong y_l, r_l, b_l, g_l;\n\tregister unsigned long *data;\n\tregister int uv_subscript, step, w = -1,t1,t2,alpha;\n    register long *cr_to_gPtr,*cr_to_rPtr,*cb_to_bPtr,*cb_to_gPtr;\n\n\tclipArray_ptr = gClipArray_ptr;\n\tcr_to_rPtr = &video->cr_to_r[0];\n\tcr_to_gPtr = &video->cr_to_g[0];\n\tcb_to_bPtr = &video->cb_to_b[0];\n\tcb_to_gPtr = &video->cb_to_g[0];\n\talpha = 0xFF000000;\n\t\n\tfor(h = 0; h < video->out_h; h++) \n    \t{ \n    \t\tt1 = video->y_table[h] + video->in_y;\n    \t\tt2 = (t1 >> 1) * video->chrom_width;\n    \t\ty_in  = &src[0][t1 * video->coded_picture_width] + video->in_x; \n    \t\tcb_in = &src[1][t2] + (video->in_x >> 2); \n    \t\tcr_in = &src[2][t2] + (video->in_x >> 1); \n    \t\tdata = (unsigned long *) output_rows[h];\n\n            if(video->out_w == video->horizontal_size) {\n                for(w = 0; w < video->horizontal_size; w++)  { \n             \t\ty_l = *y_in++; \n             \t\tr_l = g_l = b_l = y_l << 16; \n             \t\tg_l = (g_l + cr_to_gPtr[*cr_in] + cb_to_gPtr[*cb_in]) >> 16;\n             \t\tr_l = (r_l + cr_to_rPtr[*cr_in])  >> 16; \n             \t\tb_l = (b_l + cb_to_bPtr[*cb_in])  >> 16;\n                 \t*data++ = alpha |(clipArray_ptr[r_l] << 16) | (clipArray_ptr[g_l] << 8) | clipArray_ptr[b_l];\n                \tif(w & 1) { \n                    \tcr_in++; \n                    \tcb_in++; \n                \t} \n                }\n            } else {\n                for(w = 0; w < video->out_w; w++) \n            \t   { \n            \t\tuv_subscript = video->x_table[w] / 2; \n            \t\tr_l = g_l = b_l = (y_in[video->x_table[w]]) << 16; \n            \t\tt1 = cr_in[uv_subscript];\n            \t\tt2 = cb_in[uv_subscript];\n             \t\tg_l = (g_l + cr_to_gPtr[t1] + cb_to_gPtr[t2]) >> 16;\n            \t\tr_l = (r_l + cr_to_rPtr[t1]) >> 16; \n             \t\tb_l = (b_l + cb_to_bPtr[t2]) >> 16;\n                 \t*data++ = alpha | (clipArray_ptr[r_l] << 16) | (clipArray_ptr[g_l] << 8) | clipArray_ptr[b_l];\n                    }\n                }\n            }     \n    return 0;\n}\n\nint mpeg3video_ditherframeFastRGB555(mpeg3video_t *video, unsigned char **src, unsigned char **output_rows) {\n\tint h = 0;\n\tregister unsigned char *y_in, *cb_in, *cr_in, *clipArray_ptr;\n\tregister unsigned short *clipArray_ptr16r,*clipArray_ptr16g,*clipArray_ptr16b;\n\tlong y_l, r_l, b_l, g_l;\n\tregister unsigned short *data;\n\tregister int uv_subscript, step, w = -1,t1,t2,video_horizontal_size;\n    register long *cr_to_gPtr,*cr_to_rPtr,*cb_to_bPtr,*cb_to_gPtr;;\n    \n\tclipArray_ptr = gClipArray_ptr;\n\tclipArray_ptr16r = gClipArray_ptr16r;\n\tclipArray_ptr16g = gClipArray_ptr16g;\n\tclipArray_ptr16b = gClipArray_ptr16b;\n\tcr_to_rPtr = &video->cr_to_r[0];\n\tcr_to_gPtr = &video->cr_to_g[0];\n\tcb_to_bPtr = &video->cb_to_b[0];\n\tcb_to_gPtr = &video->cb_to_g[0];\n\tvideo_horizontal_size = video->horizontal_size;\n\tfor(h = 0; h < video->out_h; h++) \n    \t{ \n    \t\tt1 = video->y_table[h] + video->in_y;\n    \t\tt2 = (t1 >> 1) * video->chrom_width;\n    \t\ty_in  = &src[0][t1 * video->coded_picture_width] + video->in_x; \n    \t\tcb_in = &src[1][t2] + (video->in_x >> 2); \n    \t\tcr_in = &src[2][t2] + (video->in_x >> 1); \n    \t\tdata = (unsigned short*) output_rows[h];\n\n            if(video->out_w == video_horizontal_size) {\n                for(w = 0; w < video_horizontal_size; w++)  { \n             \t\ty_l = *y_in++; \n             \t\tr_l = g_l = b_l = y_l << 16; \n             \t\tg_l = (g_l + cr_to_gPtr[*cr_in] + cb_to_gPtr[*cb_in]) >> 16;\n             \t\tr_l = (r_l + cr_to_rPtr[*cr_in])  >> 16; \n             \t\tb_l = (b_l + cb_to_bPtr[*cb_in])  >> 16;\n                    *data++ =   clipArray_ptr16r[r_l] | \n                \t\t        clipArray_ptr16g[g_l] | \n                \t\t        clipArray_ptr16b[b_l];\n                \tif(w & 1) { \n                    \tcr_in++; \n                    \tcb_in++; \n                \t} \n                }\n            } else {\n                for(w = 0; w < video->out_w; w++) \n            \t   { \n            \t\tuv_subscript = video->x_table[w] / 2; \n            \t\tr_l = g_l = b_l = (y_in[video->x_table[w]]) << 16; \n            \t\tt1 = cr_in[uv_subscript];\n            \t\tt2 = cb_in[uv_subscript];\n             \t\tg_l = (g_l + cr_to_gPtr[t1] + cb_to_gPtr[t2]) >> 16;\n            \t\tr_l = (r_l + cr_to_rPtr[t1]) >> 16; \n             \t\tb_l = (b_l + cb_to_bPtr[t2]) >> 16;\n                    *data++ =   clipArray_ptr16r[r_l] | \n                \t\t        clipArray_ptr16g[g_l] | \n                \t\t        clipArray_ptr16b[b_l];\n                }\n            }\n        } \n            \n     \n    return 0;\n}\n\nint mpeg3video_present_frame(mpeg3video_t *video)\n{\n\tint i, j, k, l, h;\n\tunsigned char **src = video->output_src;\n\n\tif (doClippingArrays) {\n\t\tfor(h=-512;h<=512;h++) {\n\t\t\tgClipArray_ptr[h]=CLIP(h);\n\t\t\tgClipArray_ptr16r[h]=(CLIP(h) & 0xf8) << 7;\n\t\t\tgClipArray_ptr16g[h]=(CLIP(h) & 0xf8) << 2;\n\t\t\tgClipArray_ptr16b[h]=(CLIP(h) & 0xf8) >> 3;\n\t\t\tif (gClipArray_ptr[h] == 0x00) \n\t\t\t\tgClipArray_ptr[h] = 0x01;\n\t\t\tif (gClipArray_ptr16b[h] == 0x00) \n\t\t\t\tgClipArray_ptr16b[h] = 0x01;\n\t\t}\n\t\tdoClippingArrays = 0;\n\t}\n\n/* Copy YUV buffers */\n\tif(video->want_yvu)\n\t{\n\t\tlong size[2];\n\t\tlong offset[2];\n\n/* Drop a frame */\n\t\tif(!video->y_output) return 0;\n\n/* Copy a frame */\n\t\tif(video->in_x == 0 && \n\t\t\tvideo->in_w >= video->coded_picture_width)\n\t\t{\n\t\t\tsize[0] = video->coded_picture_width * video->in_h;\n\t\t\tsize[1] = video->chrom_width * (int)((float)video->in_h / 2 + 0.5);\n\t\t\toffset[0] = video->coded_picture_width * video->in_y;\n\t\t\toffset[1] = video->chrom_width * (int)((float)video->in_y / 2 + 0.5);\n\n/*\n * \t\t\tif(video->in_y > 0)\n * \t\t\t{\n * \t\t\t\toffset[1] += video->chrom_width / 2;\n * \t\t\t\tsize[1] += video->chrom_width / 2;\n * \t\t\t}\n */\n\n\t\t\tmemcpy(video->y_output, src[0] + offset[0], size[0]);\n\t\t\tmemcpy(video->u_output, src[1] + offset[1], size[1]);\n\t\t\tmemcpy(video->v_output, src[2] + offset[1], size[1]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor(i = 0, j = video->in_y; i < video->in_h; i++, j++)\n\t\t\t{\n\t\t\t\tmemcpy(video->y_output + i * video->in_w, \n\t\t\t\t\tsrc[0] + j * video->coded_picture_width + video->in_x, \n\t\t\t\t\tvideo->in_w);\n\t\t\t\tmemcpy(video->u_output + i * video->in_w / 4, \n\t\t\t\t\tsrc[1] + j * video->chrom_width / 2 + video->in_x / 4, \n\t\t\t\t\tvideo->in_w / 4);\n\t\t\t\tmemcpy(video->v_output + i * video->in_w / 4, \n\t\t\t\t\tsrc[2] + j * video->chrom_width / 2 + video->in_x / 4, \n\t\t\t\t\tvideo->in_w / 4);\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\t}\n\n/* Want RGB buffer */\n/* Copy the frame to the output with YUV to RGB conversion */\n  \tif(video->prog_seq)\n\t{\n    \tif(video->chroma_format != CHROMA444)\n\t\t{\n    \t\tif (video->color_model == MPEG3_RGB555) \n        \t    mpeg3video_ditherframeFastRGB555(video, src, video->output_rows);\n    \t\telse\n    \t\t    if (video->color_model == MPEG3_ARGB8888) \n        \t      mpeg3video_ditherframeFastRGBA(video, src, video->output_rows);\n    \t\t    else\n    \t\tmpeg3video_ditherframe(video, src, video->output_rows);\n    \t}\n    \telse\n    \t  \tmpeg3video_ditherframe444(video, src);\n  \t}\n\telse\n\t{\n   \t\tif((video->pict_struct == FRAME_PICTURE && video->topfirst) || \n\t\t\tvideo->pict_struct == BOTTOM_FIELD)\n\t\t{\n/* top field first */\n    \t\tif(video->chroma_format != CHROMA444)\n\t\t\t{\n        \t\tmpeg3video_dithertop(video, src);\n        \t\tmpeg3video_ditherbot(video, src);\n    \t\t}\n    \t\telse \n\t\t\t{\n        \t\tmpeg3video_dithertop444(video, src);\n        \t\tmpeg3video_ditherbot444(video, src);\n    \t\t}\n    \t}\n    \telse \n\t\t{\n/* bottom field first */\n    \t\tif(video->chroma_format != CHROMA444)\n\t\t\t{\n        \t\tmpeg3video_ditherbot(video, src);\n        \t\tmpeg3video_dithertop(video, src);\n    \t\t}\n    \t\telse \n\t\t\t{\n        \t\tmpeg3video_ditherbot444(video, src);\n        \t\tmpeg3video_dithertop444(video, src);\n    \t\t}\n    \t}\n  \t}\n\treturn 0;\n}\n\nint mpeg3video_display_second_field(mpeg3video_t *video)\n{\n/* Not used */\n\treturn 0;\n}\n\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/video/reconmmx.s",
    "content": "ADD_1:\t\tdd 01010101h, 01010101h\nMASK_AND:\tdd 7f7f7f7fh, 7f7f7f7fh\nPLUS_384:\tdd 01800180h, 01800180h\nPLUS_128:\tdd 00800080h, 00800080h\n\n%assign LocalFrameSize  0\n%assign RegisterStorageSize  16\n\n; Arguments:\n%assign source                    LocalFrameSize + RegisterStorageSize +  4\n%assign dest                      LocalFrameSize + RegisterStorageSize +  8\n%assign lx2                       LocalFrameSize + RegisterStorageSize + 12\n%assign h                         LocalFrameSize + RegisterStorageSize + 16\n\n; Locals (on local stack frame)\n\n\n; extern void C rec_mmx (\n;                                     unsigned char *source,\n;                                     unsigned char *dest,\n;                                     int lx2,\n;                                     int h\n;\n;  The local variables are on the stack,\n;\n\nglobal recva_mmx\nglobal recvac_mmx\nglobal rech_mmx\nglobal rechc_mmx\nglobal add_block_mmx\nglobal set_block_mmx\n\n\n  align 16\nrech_mmx:\n  push       esi\n  push       edi\n  push       ecx\n  push       ebx\n  mov        esi, [esp+source]\n  mov        edi, [esp+dest]\n  mov        ecx, [esp+h]\n  mov        ebx, [esp+lx2]\n  movq       mm5, [MASK_AND]\n  movq       mm6, [ADD_1]\n.rech1:\n  movq       mm0,[esi]\n  movq       mm1,[esi+1]\n  movq       mm2,[esi+8]\n  movq       mm3,[esi+9]\n  psrlw      mm0,1\n  psrlw      mm1,1\n  psrlw      mm2,1\n  psrlw      mm3,1\n  pand       mm0,mm5\n  pand       mm1,mm5\n  pand       mm2,mm5\n  pand       mm3,mm5\n  paddusb    mm0,mm1\n  paddusb    mm2,mm3\n  paddusb    mm0,mm6\n  paddusb    mm2,mm6\n  movq       [edi],mm0\n  add        esi,ebx\n  movq       [edi+8],mm2\n  add        edi,ebx\n  dec        ecx\n  jnz        .rech1\n  emms\n  pop        ebx\n  pop        ecx\n  pop        edi\n  pop        esi\n  ret\n\n  align 16\nrechc_mmx:\n  push       esi\n  push       edi\n  push       ecx\n  push       ebx\n;  sub        esp, LocalFrameSize\n  mov        esi, [esp+source]\n  mov        edi, [esp+dest]\n  mov        ecx, [esp+h]\n  mov        ebx, [esp+lx2]\n  movq       mm5, [MASK_AND]\n  movq       mm6, [ADD_1]\n.rechc1:\n  movq       mm0,[esi]\n  movq       mm1,[esi+1]\n  psrlw      mm0,1\n  psrlw      mm1,1\n  pand       mm0,mm5\n  pand       mm1,mm5\n  paddusb    mm0,mm1\n  paddusb    mm0,mm6\n  movq       [edi],mm0\n  add        edi,ebx\n  add        esi,ebx\n  dec        ecx\n  jnz        .rechc1\n  emms\n;  add        esp, LocalFrameSize\n  pop        ebx\n  pop        ecx\n  pop        edi\n  pop        esi\n  ret\n\n\n\n%assign RegisterStorageSize  20\n%assign source                    LocalFrameSize + RegisterStorageSize +  4\n%assign dest                      LocalFrameSize + RegisterStorageSize +  8\n%assign lx                        LocalFrameSize + RegisterStorageSize + 12\n%assign lx2                       LocalFrameSize + RegisterStorageSize + 16\n%assign h                         LocalFrameSize + RegisterStorageSize + 20\n\n  align 16\nrecva_mmx:\n  push       esi\n  push       edi\n  push       ecx\n  push       ebx\n  push       edx\n  mov        esi, [esp+source]\n  mov        edi, [esp+dest]\n  mov        ecx, [esp+h]\n  mov        ebx, [esp+lx2]\n  mov        edx, [esp+lx]\n  movq\t     mm7, [MASK_AND]\n  movq\t     mm6, [ADD_1]\n.recva1:\n  movq       mm0,[esi]\n  movq       mm1,[esi+edx]\n  movq       mm2,[esi+8]\n  movq       mm3,[esi+edx+8]\n  movq       mm4,[edi]\n  movq\t     mm5,[edi+8]\n  psrlw      mm0,1\n  psrlw      mm1,1\n  psrlw      mm2,1\n  psrlw      mm3,1\n  psrlw      mm4,1\n  psrlw      mm5,1\n  pand       mm0,mm7\n  pand       mm1,mm7\n  pand       mm2,mm7\n  pand       mm3,mm7\n  pand       mm4,mm7\n  pand       mm5,mm7\n  paddusb    mm0,mm1\n  paddusb    mm2,mm3\n  paddusb    mm0,mm6\n  paddusb    mm2,mm6\n  psrlw      mm0,1\n  psrlw      mm2,1\n  pand       mm0,mm7\n  pand       mm2,mm7\n  paddusb    mm4,mm0\n  paddusb    mm5,mm2\n  paddusb    mm4,mm6\n  paddusb    mm5,mm6\n  movq       [edi],mm4\n  movq       [edi+8],mm5\n  add        edi,ebx\n  add        esi,ebx\n  dec        ecx\n  jnz        near .recva1\n  emms\n  pop        edx\n  pop        ebx\n  pop        ecx\n  pop        edi\n  pop        esi\n  ret\n\n  align 16\nrecvac_mmx:\n  push       esi\n  push       edi\n  push       ecx\n  push       ebx\n  push       edx\n  mov        esi, [esp+source]\n  mov        edi, [esp+dest]\n  mov        ecx, [esp+h]\n  mov        ebx, [esp+lx2]\n  mov        edx, [esp+lx]\n  movq\t     mm5, [MASK_AND]\n  movq\t     mm6, [ADD_1]\n.recvac1:\n  movq       mm0,[esi]\n  movq       mm1,[esi+edx]\n  movq       mm4,[edi]\n  psrlw      mm0,1\n  psrlw      mm1,1\n  psrlw      mm4,1\n  pand       mm0,mm5\n  pand       mm1,mm5\n  pand       mm4,mm5\n  paddusb    mm0,mm1\n  paddusb    mm0,mm6\n  psrlw      mm0,1\n  pand       mm0,mm5\n  paddusb    mm4,mm0\n  paddusb    mm4,mm6\n  movq       [edi],mm4\n  add        edi,ebx\n  add        esi,ebx\n  dec        ecx\n  jnz        .recvac1\n  emms\n  pop        edx\n  pop        ebx\n  pop        ecx\n  pop        edi\n  pop        esi\n  ret\n\n%assign RegisterStorageSize  20\n%assign rfp                       LocalFrameSize + RegisterStorageSize +  4\n%assign bp                        LocalFrameSize + RegisterStorageSize +  8\n%assign iincr                     LocalFrameSize + RegisterStorageSize + 12\n\n; FIXME clipping needs to be done\n\n  align 16\nadd_block_mmx:\n  push       esi\n  push       edi\n  push       ecx\n  push       ebx\n  push       edx\n  mov        esi, [esp+bp]\n  mov        edi, [esp+rfp]\n  mov        ebx, [esp+iincr]\n;  movq       mm7, [PLUS_384]\n  mov        ecx,8\n  pxor        mm2,mm2\t\t; clear\n%rep 8\n  movq       mm0, [edi]\t\t; get dest\n  movq\t     mm1,mm0\t\t\n  punpcklbw  mm0,mm2\n  punpckhbw  mm1,mm2\n  paddsw     mm0, [esi]\n  paddsw     mm1, [esi+8]\n;  paddsw     mm0, mm7\n;  paddsw     mm1, mm7\n  packuswb   mm0,mm1\t     \n  movq\t     [edi], mm0\n  add        edi,ebx\n  add\t     esi,16\n%endrep\n  emms\n  pop        edx\n  pop\t     ebx\n  pop        ecx\n  pop        edi\n  pop        esi\n  ret\n\n  align 16\nset_block_mmx:\n  push       esi\n  push       edi\n  push       ecx\n  push       ebx\n  push       edx\n  mov        esi, [esp+bp]\n  mov        edi, [esp+rfp]\n  mov        ebx, [esp+iincr]\n  movq       mm7, [PLUS_128]\n%rep 4\n  movq       mm0, [esi]\n  movq       mm1, [esi+8]\n  paddsw     mm0, mm7\n  movq       mm2, [esi+16]\n  paddsw     mm1, mm7\n  movq       mm3, [esi+24]\n  paddsw     mm2, mm7\n  packuswb   mm0, mm1\n  paddsw     mm3, mm7\n  movq       [edi], mm0\n  packuswb   mm2, mm3\n  add        edi, ebx\n  add        esi, 32\n  movq       [edi], mm2\n  add        edi, ebx\n%endrep\n  emms\n  pop        edx\n  pop        ebx\n  pop        ecx\n  pop        edi\n  pop        esi\n  ret\n\n\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/video/reconstruct.c",
    "content": "/* \n *\n *  This file is part of libmpeg3\n *\t\n * LibMPEG3\n * Author: Adam Williams <broadcast@earthling.net>\n * Page: heroine.linuxbox.com\n * Page: http://www.smalltalkconsulting.com/html/mpeg3source.html (for Squeak)\n *\n    LibMPEG3 was originally licenced under GPL. It was relicensed by\n    the author under the LGPL and the Squeak license on Nov 1st, 2000\n    \n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA \n    \n    Also licensed under the Squeak license.\n    http://www.squeak.org/license.html\n */\n#include \"mpeg3video.h\"\n#include <stdio.h>\n\n#ifdef HAVE_MMX\n\n#ifdef HAVE_3Dnow\nstatic inline void recva_mmx(unsigned char *s, unsigned char *d, int lx, int lx2, int h)\n{\n\t__asm__(\n\t\t\".align\t8\\n\"\n\t\t\"1:\"\n\t   \t\t\"movq\t\t(%1),\t%%mm0\\n\"      /* 8 s */\n\t   \t\t\"movq\t\t8(%1),\t%%mm1\\n\"      /* 8 s */\n\t   \t\t\"movq\t\t(%4),\t%%mm2\\n\"      /* 8 s +lx */\n\t   \t\t\"movq\t\t8(%4),\t%%mm3\\n\"      /* 8 s +lx **/\n\n\t\t\t\"pavgusb %%mm2, \t%%mm0\\n\"\n\t\t\t\"addl\t\t%3,\t\t%1\\n\"\n\t\t\t\"pavgusb %%mm3, \t%%mm1\\n\"\n\n\t   \t\t\"movq\t\t(%2),\t%%mm2\\n\"      /* 8 d */\n\t   \t\t\"movq\t\t8(%2),\t%%mm3\\n\"      /* 8 d */\n\t\t\t\"pavgusb %%mm2, \t%%mm0\\n\"\n\t\t\t\"addl\t\t%3,\t\t%4\\n\"\n\t\t\t\"pavgusb %%mm3, \t%%mm1\\n\"\n\n\t\t\t\"movq\t\t%%mm0,\t(%2)\\n\"\n\t\t\t\"movq\t\t%%mm1,\t8(%2)\\n\"\n\t\t\t\"addl\t\t%3,\t\t%2\\n\"\n\t\t\"loop\t\t1b\\n\"\n      :\n      : \"c\" (h), \"r\" (s), \"r\" (d), \"r\" (lx2), \"r\" (s +lx)\n\t);\n}\n\nstatic inline void recvac_mmx(unsigned char *s, unsigned char *d, int lx,int lx2, int h)\n{\n\t__asm__(\n\t\t\".align\t8\\n\"\n\t\t\"1:\"\n\t   \t\t\"movq\t\t(%1),\t%%mm0\\n\"      /* 8 s */\n\t   \t\t\"movq\t\t(%4),\t%%mm2\\n\"      /* 8 s +lx */\n\t\t\t\"addl\t\t%3,\t\t%1\\n\"\n\t\t\t\"pavgusb %%mm2, \t%%mm0\\n\"\n\t   \t\t\"movq\t\t(%2),\t%%mm3\\n\"      /* 8 d */\n\t\t\t\"addl\t\t%3,\t\t%4\\n\"\n\t\t\t\"pavgusb %%mm3, \t%%mm0\\n\"\n\t\t\t\"movq\t\t%%mm0,\t(%2)\\n\"\n\t\t\t\"addl\t\t%3,\t\t%2\\n\"\n\t\t\"loop\t\t1b\\n\"\n      :\n      : \"c\" (h), \"r\" (s), \"r\" (d), \"r\" (lx2), \"r\" (s +lx)\n\t);\n}\n\nstatic inline void rech_mmx(unsigned char *s, unsigned char *d, int lx2, int h)\n{\n\t__asm__ (\n\t\t\".align\t8\\n\"\n\t\t\"1:\"\n\t   \t\t\"movq\t\t(%1),\t%%mm0\\n\"      /* 8 s */\n\t   \t\t\"movq\t\t8(%1),\t%%mm1\\n\"      /* 8 s */\n\t   \t\t\"movq\t\t1(%1),\t%%mm2\\n\"      /* 8 s */\n\t   \t\t\"movq\t\t9(%1),\t%%mm3\\n\"      /* 8 s */\n\n\t\t\t\"pavgusb \t%%mm2, \t%%mm0\\n\"\n\t\t\t\"addl\t\t%3,\t\t%1\\n\"\n\t\t\t\"pavgusb \t%%mm3, \t%%mm1\\n\"\n\n\t\t\t\"movq\t\t%%mm0,\t(%2)\\n\"\n\t\t\t\"movq\t\t%%mm1,\t8(%2)\\n\"\n\t\t\t\"addl\t\t%3,\t\t%2\\n\"\n\t\t\"loop\t\t1b\\n\"\n      :\n      : \"c\" (h), \"r\" (s), \"r\" (d), \"r\" (lx2)\n\t);\n}\n\nstatic inline void rechc_mmx(unsigned char *s, unsigned char *d, int lx2, int h)\n{\n\t__asm__ (\n\t\t\".align\t8\\n\"\n\t\t\"1:\"\n\t   \t\t\"movq\t\t(%1),\t%%mm0\\n\"      /* 8 s */\n\t   \t\t\"movq\t\t1(%1),\t%%mm2\\n\"      /* 8 s +1 */\n\t\t\t\"addl\t\t%3,\t\t%1\\n\"\n\t\t\t\"pavgusb \t%%mm2, \t%%mm0\\n\"\n\t\t\t\"movq\t\t%%mm0,\t(%2)\\n\"\n\t\t\t\"addl\t\t%3,\t\t%2\\n\"\n\t\t\"loop\t\t1b\\n\"\n      :\n      : \"c\" (h), \"r\" (s), \"r\" (d), \"r\" (lx2)\n\t);\n}\n\nstatic inline void recha_mmx(unsigned char *s, unsigned char *d,int lx2, int h)\n{\n\t__asm__ (\n\t\t\".align\t8\\n\"\n\t\t\"1:\"\n\t   \t\t\"movq\t\t(%1),\t%%mm0\\n\"      /* 8 s */\n\t   \t\t\"movq\t\t8(%1),\t%%mm1\\n\"      /* 8 s */\n\t   \t\t\"movq\t\t1(%1),\t%%mm2\\n\"      /* 8 s */\n\t   \t\t\"movq\t\t9(%1),\t%%mm3\\n\"      /* 8 s */\n\n\t\t\t\"pavgusb \t%%mm2, \t%%mm0\\n\"\n\t\t\t\"addl\t\t%3,\t\t%1\\n\"\n\t\t\t\"pavgusb \t%%mm3, \t%%mm1\\n\"\n\n\t   \t\t\"movq\t\t(%2),\t%%mm2\\n\"      /* 8 d */\n\t   \t\t\"movq\t\t8(%2),\t%%mm3\\n\"      /* 8 d */\n\t\t\t\"pavgusb \t%%mm2, \t%%mm0\\n\"\n\t\t\t\"pavgusb \t%%mm3, \t%%mm1\\n\"\n\n\t\t\t\"movq\t\t%%mm0,\t(%2)\\n\"\n\t\t\t\"movq\t\t%%mm1,\t8(%2)\\n\"\n\t\t\t\"addl\t\t%3,\t\t%2\\n\"\n\t\t\"loop\t\t1b\\n\"\n      :\n      : \"c\" (h), \"r\" (s), \"r\" (d), \"r\" (lx2)\n\t);\n}\n\nstatic inline void rechac_mmx(unsigned char *s,unsigned char  *d, int lx2, int h)\n{\n\t__asm__ (\n\t\t\".align\t8\\n\"\n\t\t\"1:\"\n\t   \t\t\"movq\t\t(%1),\t%%mm0\\n\"      /* 8 s */\n\t   \t\t\"movq\t\t1(%1),\t%%mm2\\n\"      /* 8 s */\n\n\t\t\t\"addl\t\t%3,\t\t%1\\n\"\n\t\t\t\"pavgusb \t%%mm2, \t%%mm0\\n\"\n\n\t   \t\t\"movq\t\t(%2),\t%%mm1\\n\"      /* 8 d */\n\t\t\t\"pavgusb \t%%mm1, \t%%mm0\\n\"\n\n\t\t\t\"movq\t\t%%mm0,\t(%2)\\n\"\n\t\t\t\"addl\t\t%3,\t\t%2\\n\"\n\t\t\"loop\t\t1b\\n\"\n      :\n      : \"c\" (h), \"r\" (s), \"r\" (d), \"r\" (lx2)\n\t);\n}\n\nstatic inline void rec4_mmx(unsigned char *s, unsigned char *d, int lx, int lx2, int h)\n{\n\t__asm__ __volatile__(\n\t   \t\"movq\t\t(%1),\t%%mm0\\n\"  /* 8 s */\n\t   \t\"movq\t\t8(%1),\t%%mm1\\n\"  /* 8 s */\n\t   \t\"movq\t\t1(%1),\t%%mm2\\n\"  /* 8 s +1*/\n\t   \t\"movq\t\t9(%1),\t%%mm3\\n\"  /* 8 s +1*/\n\t\t\".align 8\\n\"\n\t\t\"1:\"\n\t   \t\t\"movq\t\t(%4),\t%%mm4\\n\"  /* 8 s+lx */\n\t\t\t\"pavgusb \t%%mm2, \t%%mm0\\n\"\n\t   \t\t\"movq\t\t8(%4),\t%%mm5\\n\"  /* 8 s+lx */\n\t\t\t\"pavgusb \t%%mm3, \t%%mm1\\n\"\n\n\t   \t\t\"movq\t\t1(%4),\t%%mm6\\n\"  /* 8 s+lx +1*/\n\t\t\t\"pavgusb \t%%mm4, \t%%mm0\\n\"\n\t   \t\t\"movq\t\t9(%4),\t%%mm7\\n\"  /* 8 s+lx +1*/\n\t\t\t\"pavgusb \t%%mm5, \t%%mm1\\n\"\n\n\t\t\t\"pavgusb \t%%mm6, \t%%mm0\\n\"\n\t\t\t\"addl\t\t%3,\t\t%4\\n\"\n\t\t\t\"pavgusb \t%%mm7, \t%%mm1\\n\"\n\t\t\t\"movq\t\t%%mm0,\t(%2)\\n\"\n\t\t\t\"movq\t\t%%mm6,\t%%mm2\\n\"\n\t\t\t\"movq\t\t%%mm7,\t%%mm3\\n\"\n\t\t\t\"movq\t\t%%mm1,\t8(%2)\\n\"\n\t\t\t\"movq\t\t%%mm4,\t%%mm0\\n\"\n\t\t\t\"movq\t\t%%mm5,\t%%mm1\\n\"\n\t\t\t\"addl\t\t%3,\t\t%2\\n\"\n\t\t\"loop\t\t1b\\n\"\n      \t:\n\t\t: \"c\" (h), \"r\" (s), \"r\" (d), \"r\" (lx2), \"r\" (s +lx)\n\t);\n}\n\nstatic inline void rec4c_mmx(unsigned char *s, unsigned char *d, int lx, int lx2, int h)\n{\n\t__asm__ __volatile__(\n\t   \t\"movq\t\t(%1),\t%%mm0\\n\"  /* 8 s */\n\t   \t\"movq\t\t1(%1),\t%%mm2\\n\"  /* 8 s +1*/\n\t\t\".align 8\\n\"\n\t\t\"1:\"\n\t   \t\t\"movq\t\t(%4),\t%%mm4\\n\"  /* 8 s+lx */\n\t\t\t\"pavgusb \t%%mm2, \t%%mm0\\n\"\n\n\t   \t\t\"movq\t\t1(%4),\t%%mm6\\n\"  /* 8 s+lx +1*/\n\t\t\t\"pavgusb \t%%mm4, \t%%mm0\\n\"\n\n\t\t\t\"addl\t\t%3,\t\t%4\\n\"\n\t\t\t\"pavgusb \t%%mm6, \t%%mm0\\n\"\n\t\t\t\"movq\t\t%%mm0,\t(%2)\\n\"\n\t\t\t\"movq\t\t%%mm6,\t%%mm2\\n\"\n\t\t\t\"movq\t\t%%mm4,\t%%mm0\\n\"\n\t\t\t\"addl\t\t%3,\t\t%2\\n\"\n\t\t\"loop\t\t1b\\n\"\n      \t:\n\t\t: \"c\" (h), \"r\" (s), \"r\" (d), \"r\" (lx2), \"r\" (s +lx)\n\t);\n}\n\nstatic inline void rec4a_mmx(unsigned char *s, unsigned char *d, int lx, int lx2, int h)\n{\n\t__asm__ __volatile__(\n\t   \t\"movq\t\t(%1),\t%%mm0\\n\"  /* 8 s */\n\t   \t\"movq\t\t8(%1),\t%%mm1\\n\"  /* 8 s */\n\t   \t\"movq\t\t1(%1),\t%%mm2\\n\"  /* 8 s +1*/\n\t   \t\"movq\t\t9(%1),\t%%mm3\\n\"  /* 8 s +1*/\n\t\t\".align 8\\n\"\n\t\t\"1:\"\n\t   \t\t\"movq\t\t(%4),\t%%mm4\\n\"  /* 8 s+lx */\n\t\t\t\"pavgusb \t%%mm2, \t%%mm0\\n\"\n\t   \t\t\"movq\t\t8(%4),\t%%mm5\\n\"  /* 8 s+lx */\n\t\t\t\"pavgusb \t%%mm3, \t%%mm1\\n\"\n\n\t   \t\t\"movq\t\t1(%4),\t%%mm6\\n\"  /* 8 s+lx +1*/\n\t\t\t\"pavgusb \t%%mm4, \t%%mm0\\n\"\n\t   \t\t\"movq\t\t9(%4),\t%%mm7\\n\"  /* 8 s+lx +1*/\n\t\t\t\"pavgusb \t%%mm5, \t%%mm1\\n\"\n\t\t\t\"movq\t\t(%2),\t%%mm2\\n\"\n\t\t\t\"pavgusb \t%%mm6, \t%%mm0\\n\"\n\t\t\t\"movq\t\t8(%2),\t%%mm3\\n\"\n\n\t\t\t\"pavgusb \t%%mm2, \t%%mm0\\n\"\n\t\t\t\"addl\t\t%3,\t\t%4\\n\"\n\t\t\t\"pavgusb \t%%mm3, \t%%mm1\\n\"\n\t\t\t\"movq\t\t%%mm0,\t(%2)\\n\"\n\n\t\t\t\"pavgusb \t%%mm7, \t%%mm1\\n\"\n\t\t\t\"movq\t\t%%mm6,\t%%mm2\\n\"\n\t\t\t\"movq\t\t%%mm7,\t%%mm3\\n\"\n\t\t\t\"movq\t\t%%mm1,\t8(%2)\\n\"\n\t\t\t\"movq\t\t%%mm4,\t%%mm0\\n\"\n\t\t\t\"movq\t\t%%mm5,\t%%mm1\\n\"\n\t\t\t\"addl\t\t%3,\t\t%2\\n\"\n\t\t\"loop\t\t1b\\n\"\n      \t:\n\t\t: \"c\" (h), \"r\" (s), \"r\" (d), \"r\" (lx2), \"r\" (s +lx)\n\t);\n}\n\nstatic inline void rec4ac_mmx(unsigned char *s, unsigned char  *d, int lx, int lx2, int h)\n{\n\t__asm__ __volatile__(\n\t   \t\"movq\t\t(%1),\t%%mm0\\n\"  /* 8 s */\n\t   \t\"movq\t\t1(%1),\t%%mm2\\n\"  /* 8 s +1*/\n\t\t\".align 8\\n\"\n\t\t\"1:\"\n\t   \t\t\"movq\t\t(%4),\t%%mm4\\n\"  /* 8 s+lx */\n\t\t\t\"pavgusb \t%%mm2, \t%%mm0\\n\"\n\n\t   \t\t\"movq\t\t1(%4),\t%%mm6\\n\"  /* 8 s+lx +1*/\n\t\t\t\"pavgusb \t%%mm4, \t%%mm0\\n\"\n\t\t\t\"movq\t\t(%2),\t%%mm1\\n\"  /* 8 d */\n\t\t\t\"pavgusb \t%%mm6, \t%%mm0\\n\"\n\t\t\t\"addl\t\t%3,\t\t%4\\n\"\n\t\t\t\"pavgusb \t%%mm1, \t%%mm0\\n\"\n\t\t\t\"movq\t\t%%mm6,\t%%mm2\\n\"\n\t\t\t\"movq\t\t%%mm0,\t(%2)\\n\"\n\t\t\t\"movq\t\t%%mm4,\t%%mm0\\n\"\n\t\t\t\"addl\t\t%3,\t\t%2\\n\"\n\t\t\"loop\t\t1b\\n\"\n      \t:\n\t\t: \"c\" (h), \"r\" (s), \"r\" (d), \"r\" (lx2), \"r\" (s +lx)\n\t);\n}\n\n#else  // HAVE_3DNOW\n\tstatic long long ADD_1\t=\t0x0101010101010101LL;\n\tstatic long long MASK_AND = 0x7f7f7f7f7f7f7f7fLL;\n#endif\n\nstatic inline void rec_mmx(unsigned char *s, unsigned char *d, int lx2, int h)\n{\n\t__asm__ __volatile__(\n\t\t\".align 8\\n\"\n\t\t\"1:\\t\"\n\t\t\t\"movq ( %1 ),     \t%%mm0\\n\"\t\t\t/* 8 s */\n\t\t    \"movq 8( %1 ),    \t%%mm2\\n\"\t\t\t/* 16 s */\n\t\t    \"movq %%mm0,  \t\t( %2 )\\n\"   \n\t\t\t\"addl %3,\t\t\t%1\\n\"\n\t\t    \"movq %%mm2,  \t\t8( %2 )\\n\"   \n\t\t\t\"decl %0\\n\"\t\t\n\t\t    \"leal (%2, %3), %2\\n\"\n\t \t\"jnz    1b\"            \n\t\t: \n\t\t: \"c\" (h), \"r\" (s), \"r\" (d), \"r\" (lx2)\n\t);   \n}\n\n\nstatic inline void recc_mmx(unsigned char *s, unsigned char *d, int lx2, int h)\n{\n\t__asm__ __volatile__(\n\t\t\".align 8\\n\"\n\t    \"1:\\t\"\n\t    \t\"movq ( %1 ),     %%mm0\\n\"\n\t      \t\"addl %3,   \t  %1\\n\"\n\t      \t\"movq %%mm0,  \t  ( %2 )\\n\"   \n\t\t\t\"decl %0\\n\"\n\t      \t\"leal (%2, %3), %2\\n\"\n\t   \t\"jnz    1b\"            \n\t\t: \n\t\t: \"c\" (h), \"r\" (s), \"r\" (d), \"r\" (lx2)\n\t);   \n}\n\n\nstatic inline void reca_mmx(unsigned char *s, unsigned char  *d, int lx2, int h)\n{\n#ifdef HAVE_3Dnow\n\t__asm__ (\n\t\t\".align\t8\\n\"\n\t\t\"1:\"\n\t\t   \t\"movq\t\t(%1),\t%%mm0\\n\"      /* 8 s */\n\t\t\t\"movq\t\t(%2),\t%%mm2\\n\"      /* 8 d */\n\t\t   \t\"movq\t\t8(%1),\t%%mm1\\n\"      /* 8 s */\n\t\t   \t\"movq\t\t8(%2),\t%%mm3\\n\"      /* 8 d */\n\t\t\t\"pavgusb \t%%mm2, \t%%mm0\\n\"\n\t\t\t\"addl\t\t%3,\t\t%1\\n\"\n\t\t\t\"pavgusb \t%%mm3, \t%%mm1\\n\"\n\n\t\t\t\"movq\t\t%%mm0,\t(%2)\\n\"\n\t\t\t\"movq\t\t%%mm1,\t8(%2)\\n\"\n\t\t\t\"addl\t\t%3,\t\t%2\\n\"\n\t\t\"loop\t\t1b\\n\"\n\t\t:\n\t\t: \"c\" (h), \"r\" (s), \"r\" (d), \"r\" (lx2)\n\t);\n#else   /* No 3dnow */\n\t__asm__ (\n  \t\t\"movq\t     _MASK_AND, \t%%mm5\\n\"\n  \t\t\"movq\t     _ADD_1, \t%%mm6\\n\"\n\t\t\"1:\\t\"\n  \t\t\t\"movq        (%1),%%mm0\\n\"        /* Load 16 pixels from each row */\n  \t\t\t\"movq        (%2),%%mm1\\n\"\n  \t\t\t\"movq       8(%1),%%mm2\\n\"\n  \t\t\t\"movq       8(%2),%%mm3\\n\"\n  \t\t\t\"psrlw\t\t$1,%%mm0\\n\"           /* Shift pixels down */\n  \t\t\t\"psrlw\t    $1,%%mm1\\n\"\n  \t\t\t\"pand\t    %%mm5,%%mm0\\n\"        /* Zero out significant bit */\n  \t\t\t\"psrlw\t    $1,%%mm2\\n\"\n  \t\t\t\"pand\t    %%mm5,%%mm1\\n\"\n  \t\t\t\"psrlw\t    $1,%%mm3\\n\"\n  \t\t\t\"pand\t    %%mm5,%%mm2\\n\"\n  \t\t\t\"paddusb    %%mm1,%%mm0\\n\"        /* Add pixels */\n  \t\t\t\"pand\t    %%mm5,%%mm3\\n\"\n  \t\t\t\"paddusb    %%mm3,%%mm2\\n\"\n  \t\t\t\"paddusb    %%mm6,%%mm0\\n\"        /* Add 1 to results */\n  \t\t\t\"paddusb    %%mm6,%%mm2\\n\"\n  \t\t\t\"movq       %%mm0,(%2)\\n\"\n  \t\t\t\"addl       %3,%1\\n\"\n  \t\t\t\"movq\t    %%mm2, 8(%2)\\n\"\n  \t\t\t\"decl       %0\\n\"\n  \t\t\t\"leal\t\t(%2, %3), %2\\n\"\n  \t\t\"jnz        1b\\n\"\n\t\t:\n\t\t: \"c\" (h), \"r\" (s), \"r\" (d), \"r\" (lx2)\n\t);\n#endif\n}\n\n\nstatic inline void recac_mmx(unsigned char *s, unsigned char *d, int lx2, int h)\n{\n#ifdef HAVE_3Dnow\n\t__asm__ (\n\t\t\".align\t8\\n\"\n\t\t\"1:\"\n\t\t   \t\"movq\t\t(%1),\t%%mm0\\n\"      /* 8 s */\n\t   \t\t\"movq\t\t(%2),\t%%mm2\\n\"      /* 8 d */\n\t\t\t\"pavgusb \t%%mm2, \t%%mm0\\n\"\n\t\t\t\"addl\t\t%3,\t\t%1\\n\"\n\t\t\t\"movq\t\t%%mm0,\t(%2)\\n\"\n\t\t\t\"addl\t\t%3,\t\t%2\\n\"\n\t\t\"loop\t\t1b\\n\"\n\t\t:\n\t\t: \"c\" (h), \"r\" (s), \"r\" (d), \"r\" (lx2)\n\t);\n#else /* No 3dnow */\n\t__asm__ (\n  \t\t\"movq\t     _MASK_AND, \t%%mm5\\n\"\n  \t\t\"movq\t     _ADD_1, \t%%mm6\\n\"\n\t\t\"1:\\t\"\n  \t\t\t\"movq       (%1),%%mm0\\n\"\n  \t\t\t\"movq       (%2),%%mm1\\n\"\n  \t\t\t\"psrlw\t\t$1,%%mm0\\n\"\n  \t\t\t\"psrlw\t    $1,%%mm1\\n\"\n  \t\t\t\"pand\t    %%mm5,%%mm0\\n\"\n  \t\t\t\"pand\t    %%mm5,%%mm1\\n\"\n  \t\t\t\"paddusb    %%mm1,%%mm0\\n\"\n  \t\t\t\"paddusb    %%mm6,%%mm0\\n\"\n  \t\t\t\"addl       %3,%1\\n\"\n  \t\t\t\"movq       %%mm0,(%2)\\n\"\n  \t\t\t\"decl       %0\\n\"\n  \t\t\t\"leal\t\t(%2, %3), %2\\n\"\n  \t\t\"jnz        1b\\n\"\n\t\t:\n\t\t: \"c\" (h), \"r\" (s), \"r\" (d), \"r\" (lx2)\n\t\t);\n#endif\n}\n\n\nstatic inline void recv_mmx(unsigned char *s, unsigned char *d, int lx, int lx2, int h)\n{\n#ifdef HAVE_3Dnow\n\t__asm__(\n\t\t\".align\t8\\n\"\n\t\t\"1:\"\n\t   \t\t\"movq\t\t(%1),\t%%mm0\\n\"      /* 8 s */\n\t   \t\t\"movq\t\t(%4),\t%%mm2\\n\"      /* 8 s +lx */\n\t   \t\t\"movq\t\t8(%1),\t%%mm1\\n\"      /* 8 s */\n\t   \t\t\"movq\t\t8(%4),\t%%mm3\\n\"      /* 8 s +lx **/\n\n\t\t\t\"pavgusb %%mm2, \t%%mm0\\n\"\n\t\t\t\"addl\t\t%3,\t\t%1\\n\"\n\t\t\t\"pavgusb %%mm3, \t%%mm1\\n\"\n\n\t\t\t\"movq\t\t%%mm0,\t(%2)\\n\"\n\t\t\t\"addl\t\t%3,\t\t%4\\n\"\n\t\t\t\"movq\t\t%%mm1,\t8(%2)\\n\"\n\t\t\t\"addl\t\t%3,\t\t%2\\n\"\n\t\t\"loop\t\t1b\\n\"\n      :\n      : \"c\" (h), \"r\" (s), \"r\" (d), \"r\" (lx2), \"r\" (s +lx)\n\t);\n#else\n\t__asm__ (\n  \t\t\"movq\t     _MASK_AND, \t%%mm5\\n\"\n  \t\t\"movq\t     _ADD_1, \t%%mm6\\n\"\n\t\t\"1:\\t\"\n\t   \t\t\"movq\t\t(%1),\t%%mm0\\n\"      /* 8 s */\n\t   \t\t\"movq\t\t(%4),\t%%mm1\\n\"      /* 8 s +lx */\n\t   \t\t\"movq\t\t8(%1),\t%%mm2\\n\"      /* 8 s */\n\t   \t\t\"movq\t\t8(%4),\t%%mm3\\n\"      /* 8 s +lx **/\n  \t\t\t\"psrlw      $1,%%mm0\\n\"\n  \t\t\t\"psrlw      $1,%%mm1\\n\"\n  \t\t\t\"pand       %%mm5,%%mm0\\n\"\n  \t\t\t\"psrlw      $1,%%mm2\\n\"\n  \t\t\t\"pand       %%mm5,%%mm1\\n\"\n  \t\t\t\"psrlw      $1,%%mm3\\n\"\n  \t\t\t\"pand       %%mm5,%%mm2\\n\"\n  \t\t\t\"paddusb    %%mm1,%%mm0\\n\"\n  \t\t\t\"pand       %%mm5,%%mm3\\n\"\n  \t\t\t\"paddusb    %%mm3,%%mm2\\n\"\n  \t\t\t\"paddusb    %%mm6,%%mm0\\n\"\n  \t\t\t\"paddusb    %%mm6,%%mm2\\n\"\n  \t\t\t\"movq       %%mm0,(%2)\\n\"\n  \t\t\t\"addl       %3,%1\\n\"\n  \t\t\t\"movq\t    %%mm2, 8(%2)\\n\"\n  \t\t\t\"addl       %3,%4\\n\"\n  \t\t\t\"decl       %0\\n\"\n  \t\t\t\"leal\t\t(%2, %3), %2\\n\"\n  \t\t\"jnz        1b\\n\"\n      :\n      : \"c\" (h), \"r\" (s), \"r\" (d), \"r\" (lx2), \"r\" (s +lx)\n\t);\n#endif\n}\n\n\nstatic inline void recvc_mmx(unsigned char *s, unsigned char *d, int lx, int lx2, int h)\n{\n#ifdef HAVE_3Dnow\n\t__asm__(\n\t\t\".align\t8\\n\"\n\t\t\"1:\"\n\t   \t\t\"movq\t\t(%1),\t%%mm0\\n\"      /* 8 s */\n\t   \t\t\"movq\t\t(%4),\t%%mm2\\n\"      /* 8 s +lx */\n\t\t\t\"addl\t\t%3,\t\t%1\\n\"\n\t\t\t\"pavgusb %%mm2, \t%%mm0\\n\"\n\t\t\t\"addl\t\t%3,\t\t%4\\n\"\n\t\t\t\"movq\t\t%%mm0,\t(%2)\\n\"\n\t\t\t\"addl\t\t%3,\t\t%2\\n\"\n\t\t\"loop\t\t1b\\n\"\n      :\n      : \"c\" (h), \"r\" (s), \"r\" (d), \"r\" (lx2), \"r\" (s +lx)\n\t);\n#else\n\t__asm__ (\n  \t\t\"movq\t     _MASK_AND, \t%%mm5\\n\"\n  \t\t\"movq\t     _ADD_1, \t%%mm6\\n\"\n\t\t\"1:\\t\"\n\t   \t\t\"movq\t\t(%1),\t%%mm0\\n\"      /* 8 s */\n\t   \t\t\"movq\t\t(%4),\t%%mm1\\n\"      /* 8 s +lx */\n  \t\t\t\"psrlw      $1,%%mm0\\n\"\n  \t\t\t\"psrlw      $1,%%mm1\\n\"\n  \t\t\t\"pand       %%mm5,%%mm0\\n\"\n  \t\t\t\"pand       %%mm5,%%mm1\\n\"\n  \t\t\t\"paddusb    %%mm1,%%mm0\\n\"\n  \t\t\t\"addl       %3,%1\\n\"\n  \t\t\t\"paddusb    %%mm6,%%mm0\\n\"\n  \t\t\t\"addl       %3,%4\\n\"\n  \t\t\t\"movq       %%mm0,(%2)\\n\"\n  \t\t\t\"decl       %0\\n\"\n  \t\t\t\"leal\t\t(%2, %3), %2\\n\"\n  \t\t\"jnz        1b\\n\"\n      :\n      : \"c\" (h), \"r\" (s), \"r\" (d), \"r\" (lx2), \"r\" (s +lx)\n\t);\n#endif\n}\n\n#endif  // HAVE_MMX\n\nstatic inline void rec(unsigned char *s, unsigned char *d, int lx2, int h)\n{\n\tint j;\n# ifdef __POWERPC__\n        unsigned long t1,t2,t3,t4;\n#endif\n\tfor(j = 0; j < h; j++, s += lx2, d += lx2)\n\t{\n# ifdef __POWERPC__\n        t1 = *(unsigned long *) s;\n        t2 = *(((unsigned long *) s)+1);\n        t3 = *(((unsigned long *) s)+2);\n        t4 = *(((unsigned long *) s)+3);\n        *(unsigned long *) d = t1;\n        *(((unsigned long *) d)+1) = t2;\n        *(((unsigned long *) d)+2) = t3;\n        *(((unsigned long *) d)+3) = t4;\n#else\n    \td[0] = s[0]; d[1] = s[1]; d[2] = s[2]; d[3] = s[3];\n    \td[4] = s[4]; d[5] = s[5]; d[6] = s[6]; d[7] = s[7];\n    \td[8] = s[8]; d[9] = s[9]; d[10] = s[10]; d[11] = s[11];\n    \td[12] = s[12]; d[13] = s[13]; d[14] = s[14]; d[15] = s[15];\n#endif\n\t}\n}\n\n\n\nstatic inline void recc(unsigned char *s, unsigned char *d, int lx2, int h)\n{\n\tint j;\n# ifdef __POWERPC__\n        long t1,t2;\n#endif\n\tfor(j = 0; j < h; j++, s += lx2, d += lx2)\n\t{\n# ifdef __POWERPC__\n        t1 = *(long *) s;\n        t2 = *(((long *) s)+1);\n        *(long *) d = t1;\n        *(((long *) d)+1) = t2;\n#else\n    \td[0] = s[0]; d[1] = s[1]; d[2] = s[2]; d[3] = s[3];\n    \td[4] = s[4]; d[5] = s[5]; d[6] = s[6]; d[7] = s[7];\n#endif\n\t}\n}\n\nstatic inline void reca(unsigned char *s, unsigned char  *d, int lx2, int h)\n{\n\tint j;\n\tfor(j = 0; j < h; j++, s +=lx2, d +=lx2)\n\t{\n    \td[0] = (unsigned int)(d[0] + s[0] + 1) >> 1;\n    \td[1] = (unsigned int)(d[1] + s[1] + 1) >> 1;\n    \td[2] = (unsigned int)(d[2] + s[2] + 1) >> 1;\n    \td[3] = (unsigned int)(d[3] + s[3] + 1) >> 1;\n    \td[4] = (unsigned int)(d[4] + s[4] + 1) >> 1;\n    \td[5] = (unsigned int)(d[5] + s[5] + 1) >> 1;\n    \td[6] = (unsigned int)(d[6] + s[6] + 1) >> 1;\n    \td[7] = (unsigned int)(d[7] + s[7] + 1) >> 1;\n    \td[8] = (unsigned int)(d[8] + s[8] + 1) >> 1;\n    \td[9] = (unsigned int)(d[9] + s[9] + 1) >> 1;\n    \td[10] = (unsigned int)(d[10] + s[10] + 1) >> 1;\n    \td[11] = (unsigned int)(d[11] + s[11] + 1) >> 1;\n    \td[12] = (unsigned int)(d[12] + s[12] + 1) >> 1;\n    \td[13] = (unsigned int)(d[13] + s[13] + 1) >> 1;\n    \td[14] = (unsigned int)(d[14] + s[14] + 1) >> 1;\n    \td[15] = (unsigned int)(d[15] + s[15] + 1) >> 1;\n\t}\n}\n\nstatic inline void recac(unsigned char *s, unsigned char *d, int lx2, int h)\n{\n\tint j;\n\tfor(j = 0; j < h; j++, s += lx2, d += lx2)\n\t{\n    \td[0] = (unsigned int)(d[0] + s[0] + 1)>>1;\n    \td[1] = (unsigned int)(d[1] + s[1] + 1)>>1;\n    \td[2] = (unsigned int)(d[2] + s[2] + 1)>>1;\n    \td[3] = (unsigned int)(d[3] + s[3] + 1)>>1;\n    \td[4] = (unsigned int)(d[4] + s[4] + 1)>>1;\n    \td[5] = (unsigned int)(d[5] + s[5] + 1)>>1;\n    \td[6] = (unsigned int)(d[6] + s[6] + 1)>>1;\n    \td[7] = (unsigned int)(d[7] + s[7] + 1)>>1;\n\t}\n}\n\nstatic inline void recv(unsigned char *s, unsigned char *d, int lx, int lx2, int h)\n{\n\tunsigned char *dp,*sp,*sp2;\n\tint j;\n\tsp = s;\n\tsp2 = s + lx;\n\tdp = d;\n\tfor(j = 0; j < h; j++)\n\t{\n    \tdp[0] = (unsigned int)(sp[0] + sp2[0] + 1) >> 1;\n    \tdp[1] = (unsigned int)(sp[1] + sp2[1] + 1) >> 1;\n    \tdp[2] = (unsigned int)(sp[2] + sp2[2] + 1) >> 1;\n    \tdp[3] = (unsigned int)(sp[3] + sp2[3] + 1) >> 1;\n    \tdp[4] = (unsigned int)(sp[4] + sp2[4] + 1) >> 1;\n    \tdp[5] = (unsigned int)(sp[5] + sp2[5] + 1) >> 1;\n    \tdp[6] = (unsigned int)(sp[6] + sp2[6] + 1) >> 1;\n    \tdp[7] = (unsigned int)(sp[7] + sp2[7] + 1) >> 1;\n    \tdp[8] = (unsigned int)(sp[8] + sp2[8] + 1) >> 1;\n    \tdp[9] = (unsigned int)(sp[9] + sp2[9] + 1) >> 1;\n    \tdp[10] = (unsigned int)(sp[10] + sp2[10] + 1) >> 1;\n    \tdp[11] = (unsigned int)(sp[11] + sp2[11] + 1) >> 1;\n    \tdp[12] = (unsigned int)(sp[12] + sp2[12] + 1) >> 1;\n    \tdp[13] = (unsigned int)(sp[13] + sp2[13] + 1) >> 1;\n    \tdp[14] = (unsigned int)(sp[14] + sp2[14] + 1) >> 1;\n    \tdp[15] = (unsigned int)(sp[15] + sp2[15] + 1) >> 1;\n    \tsp+= lx2;\n    \tsp2+= lx2;\n    \tdp+= lx2;\n\t}\n}\n\nstatic inline void recvc(unsigned char *s, unsigned char *d, int lx, int lx2, int h)\n{\n\tunsigned char *dp,*sp,*sp2;\n\tint j;\n\n\tsp = s;\n\tsp2 = s+lx;\n\tdp = d;\n\tfor(j = 0; j < h; j++)\n\t{\n    \tdp[0] = (unsigned int)(sp[0]+sp2[0]+1)>>1;\n    \tdp[1] = (unsigned int)(sp[1]+sp2[1]+1)>>1;\n    \tdp[2] = (unsigned int)(sp[2]+sp2[2]+1)>>1;\n    \tdp[3] = (unsigned int)(sp[3]+sp2[3]+1)>>1;\n    \tdp[4] = (unsigned int)(sp[4]+sp2[4]+1)>>1;\n    \tdp[5] = (unsigned int)(sp[5]+sp2[5]+1)>>1;\n    \tdp[6] = (unsigned int)(sp[6]+sp2[6]+1)>>1;\n    \tdp[7] = (unsigned int)(sp[7]+sp2[7]+1)>>1;\n    \tsp+= lx2;\n    \tsp2+= lx2;\n    \tdp+= lx2;\n\t}\n}\n\n\nstatic inline void recva(unsigned char *s, unsigned char *d, int lx, int lx2, int h)\n{\n\tunsigned char *dp,*sp,*sp2;\n\tint j;\n\n\tsp = s;\n\tsp2 = s+lx;\n\tdp = d;\n\tfor (j=0; j<h; j++){\n    \tdp[0] = (dp[0] + ((unsigned int)(sp[0]+sp2[0]+1)>>1) + 1)>>1;\n    \tdp[1] = (dp[1] + ((unsigned int)(sp[1]+sp2[1]+1)>>1) + 1)>>1;\n    \tdp[2] = (dp[2] + ((unsigned int)(sp[2]+sp2[2]+1)>>1) + 1)>>1;\n    \tdp[3] = (dp[3] + ((unsigned int)(sp[3]+sp2[3]+1)>>1) + 1)>>1;\n    \tdp[4] = (dp[4] + ((unsigned int)(sp[4]+sp2[4]+1)>>1) + 1)>>1;\n    \tdp[5] = (dp[5] + ((unsigned int)(sp[5]+sp2[5]+1)>>1) + 1)>>1;\n    \tdp[6] = (dp[6] + ((unsigned int)(sp[6]+sp2[6]+1)>>1) + 1)>>1;\n    \tdp[7] = (dp[7] + ((unsigned int)(sp[7]+sp2[7]+1)>>1) + 1)>>1;\n    \tdp[8] = (dp[8] + ((unsigned int)(sp[8]+sp2[8]+1)>>1) + 1)>>1;\n    \tdp[9] = (dp[9] + ((unsigned int)(sp[9]+sp2[9]+1)>>1) + 1)>>1;\n    \tdp[10] = (dp[10] + ((unsigned int)(sp[10]+sp2[10]+1)>>1) + 1)>>1;\n    \tdp[11] = (dp[11] + ((unsigned int)(sp[11]+sp2[11]+1)>>1) + 1)>>1;\n    \tdp[12] = (dp[12] + ((unsigned int)(sp[12]+sp2[12]+1)>>1) + 1)>>1;\n    \tdp[13] = (dp[13] + ((unsigned int)(sp[13]+sp2[13]+1)>>1) + 1)>>1;\n    \tdp[14] = (dp[14] + ((unsigned int)(sp[14]+sp2[14]+1)>>1) + 1)>>1;\n    \tdp[15] = (dp[15] + ((unsigned int)(sp[15]+sp2[15]+1)>>1) + 1)>>1;\n    \tsp+= lx2;\n    \tsp2+= lx2;\n    \tdp+= lx2;\n\t}\n}\n\n\nstatic inline void recvac(unsigned char *s, unsigned char *d, int lx,int lx2, int h){\n  unsigned char *dp,*sp,*sp2;\n\tint j;\n\n  sp = s;\n  sp2 = s+lx;\n  dp = d;\n  for (j=0; j<h; j++){\n    dp[0] = (dp[0] + ((unsigned int)(sp[0]+sp2[0]+1)>>1) + 1)>>1;\n    dp[1] = (dp[1] + ((unsigned int)(sp[1]+sp2[1]+1)>>1) + 1)>>1;\n    dp[2] = (dp[2] + ((unsigned int)(sp[2]+sp2[2]+1)>>1) + 1)>>1;\n    dp[3] = (dp[3] + ((unsigned int)(sp[3]+sp2[3]+1)>>1) + 1)>>1;\n    dp[4] = (dp[4] + ((unsigned int)(sp[4]+sp2[4]+1)>>1) + 1)>>1;\n    dp[5] = (dp[5] + ((unsigned int)(sp[5]+sp2[5]+1)>>1) + 1)>>1;\n    dp[6] = (dp[6] + ((unsigned int)(sp[6]+sp2[6]+1)>>1) + 1)>>1;\n    dp[7] = (dp[7] + ((unsigned int)(sp[7]+sp2[7]+1)>>1) + 1)>>1;\n    sp+= lx2;\n    sp2+= lx2;\n    dp+= lx2;\n  }\n}\n\n\nstatic inline void rech(unsigned char *s, unsigned char *d, int lx2, int h){\n  unsigned char *dp,*sp;\n  unsigned int s1,s2;\n\tint j;\n\n  sp = s;\n  dp = d;\n  for (j=0; j<h; j++){\n    s1=sp[0];\n    dp[0] = (unsigned int)(s1+(s2=sp[1])+1)>>1;\n    dp[1] = (unsigned int)(s2+(s1=sp[2])+1)>>1;\n    dp[2] = (unsigned int)(s1+(s2=sp[3])+1)>>1;\n    dp[3] = (unsigned int)(s2+(s1=sp[4])+1)>>1;\n    dp[4] = (unsigned int)(s1+(s2=sp[5])+1)>>1;\n    dp[5] = (unsigned int)(s2+(s1=sp[6])+1)>>1;\n    dp[6] = (unsigned int)(s1+(s2=sp[7])+1)>>1;\n    dp[7] = (unsigned int)(s2+(s1=sp[8])+1)>>1;\n    dp[8] = (unsigned int)(s1+(s2=sp[9])+1)>>1;\n    dp[9] = (unsigned int)(s2+(s1=sp[10])+1)>>1;\n    dp[10] = (unsigned int)(s1+(s2=sp[11])+1)>>1;\n    dp[11] = (unsigned int)(s2+(s1=sp[12])+1)>>1;\n    dp[12] = (unsigned int)(s1+(s2=sp[13])+1)>>1;\n    dp[13] = (unsigned int)(s2+(s1=sp[14])+1)>>1;\n    dp[14] = (unsigned int)(s1+(s2=sp[15])+1)>>1;\n    dp[15] = (unsigned int)(s2+sp[16]+1)>>1;\n    sp+= lx2;\n    dp+= lx2;\n  }\n}\n\n\nstatic inline void rechc(unsigned char *s,unsigned char *d, int lx2, int h){\n  unsigned char *dp,*sp;\n  unsigned int s1,s2;\n\tint j;\n\n  sp = s;\n  dp = d;\n  for (j=0; j<h; j++){\n    s1=sp[0];\n    dp[0] = (unsigned int)(s1+(s2=sp[1])+1)>>1;\n    dp[1] = (unsigned int)(s2+(s1=sp[2])+1)>>1;\n    dp[2] = (unsigned int)(s1+(s2=sp[3])+1)>>1;\n    dp[3] = (unsigned int)(s2+(s1=sp[4])+1)>>1;\n    dp[4] = (unsigned int)(s1+(s2=sp[5])+1)>>1;\n    dp[5] = (unsigned int)(s2+(s1=sp[6])+1)>>1;\n    dp[6] = (unsigned int)(s1+(s2=sp[7])+1)>>1;\n    dp[7] = (unsigned int)(s2+sp[8]+1)>>1;\n    sp+= lx2;\n    dp+= lx2;\n  }\n}\n\nstatic inline void recha(unsigned char *s, unsigned char *d,int lx2, int h)\n{\n\tunsigned char *dp,*sp;\n\tunsigned int s1,s2;\n\tint j;\n\n\tsp = s;\n\tdp = d;\n\tfor (j = 0; j < h; j++)\n\t{\n    \ts1 = sp[0];\n    \tdp[0] = (dp[0] + ((unsigned int)(s1 + (s2 = sp[1]) + 1) >> 1) + 1) >> 1;\n    \tdp[1] = (dp[1] + ((unsigned int)(s2 + (s1 = sp[2]) + 1) >> 1) + 1) >> 1;\n    \tdp[2] = (dp[2] + ((unsigned int)(s1 + (s2 = sp[3]) + 1) >> 1) + 1) >> 1;\n    \tdp[3] = (dp[3] + ((unsigned int)(s2 + (s1 = sp[4]) + 1) >> 1) + 1) >> 1;\n    \tdp[4] = (dp[4] + ((unsigned int)(s1 + (s2 = sp[5]) + 1) >> 1) + 1) >> 1;\n    \tdp[5] = (dp[5] + ((unsigned int)(s2 + (s1 = sp[6]) + 1) >> 1) + 1) >> 1;\n    \tdp[6] = (dp[6] + ((unsigned int)(s1 + (s2 = sp[7]) + 1) >> 1) + 1) >> 1;\n    \tdp[7] = (dp[7] + ((unsigned int)(s2 + (s1 = sp[8]) + 1) >> 1) + 1) >> 1;\n    \tdp[8] = (dp[8] + ((unsigned int)(s1 + (s2 = sp[9]) + 1) >> 1) + 1) >> 1;\n    \tdp[9] = (dp[9] + ((unsigned int)(s2 + (s1 = sp[10]) + 1) >> 1) + 1) >> 1;\n    \tdp[10] = (dp[10] + ((unsigned int)(s1 + (s2 = sp[11]) + 1) >> 1) + 1) >> 1;\n    \tdp[11] = (dp[11] + ((unsigned int)(s2 + (s1 = sp[12]) + 1) >> 1) + 1) >> 1;\n    \tdp[12] = (dp[12] + ((unsigned int)(s1 + (s2 = sp[13]) + 1) >> 1) + 1) >> 1;\n    \tdp[13] = (dp[13] + ((unsigned int)(s2 + (s1 = sp[14]) + 1) >> 1) + 1) >> 1;\n    \tdp[14] = (dp[14] + ((unsigned int)(s1 + (s2 = sp[15]) + 1) >> 1) + 1) >> 1;\n    \tdp[15] = (dp[15] + ((unsigned int)(s2 + sp[16] + 1) >> 1) + 1) >> 1;\n    \tsp += lx2;\n    \tdp += lx2;\n\t}\n}\n\n\nstatic inline void rechac(unsigned char *s,unsigned char  *d, int lx2, int h)\n{\n\tunsigned char *dp,*sp;\n\tunsigned int s1,s2;\n\tint j;\n\n\tsp = s;\n\tdp = d;\n\tfor(j = 0; j < h; j++)\n\t{\n    \ts1 = sp[0];\n    \tdp[0] = (dp[0] + ((unsigned int)(s1 + (s2 = sp[1]) + 1) >> 1) + 1) >> 1;\n    \tdp[1] = (dp[1] + ((unsigned int)(s2 + (s1 = sp[2]) + 1) >> 1) + 1) >> 1;\n    \tdp[2] = (dp[2] + ((unsigned int)(s1 + (s2 = sp[3]) + 1) >> 1) + 1) >> 1;\n    \tdp[3] = (dp[3] + ((unsigned int)(s2 + (s1 = sp[4]) + 1) >> 1) + 1) >> 1;\n    \tdp[4] = (dp[4] + ((unsigned int)(s1 + (s2 = sp[5]) + 1) >> 1) + 1) >> 1;\n    \tdp[5] = (dp[5] + ((unsigned int)(s2 + (s1 = sp[6]) + 1) >> 1) + 1) >> 1;\n    \tdp[6] = (dp[6] + ((unsigned int)(s1 + (s2 = sp[7]) + 1) >> 1) + 1) >> 1;\n    \tdp[7] = (dp[7] + ((unsigned int)(s2 + sp[8] + 1) >> 1) + 1) >> 1;\n    \tsp += lx2;\n    \tdp += lx2;\n\t}\n}\n\n\nstatic inline void rec4(unsigned char *s, unsigned char *d, int lx, int lx2, int h)\n{\n  unsigned char *dp,*sp,*sp2;\n  unsigned int s1,s2,s3,s4;\n\tint j;\n\n  sp = s;\n  sp2 = s+lx;\n  dp = d;\n  for (j=0; j<h; j++){\n    s1=sp[0]; s3=sp2[0];\n    dp[0] = (unsigned int)(s1+(s2=sp[1])+s3+(s4=sp2[1])+2)>>2;\n    dp[1] = (unsigned int)(s2+(s1=sp[2])+s4+(s3=sp2[2])+2)>>2;\n    dp[2] = (unsigned int)(s1+(s2=sp[3])+s3+(s4=sp2[3])+2)>>2;\n    dp[3] = (unsigned int)(s2+(s1=sp[4])+s4+(s3=sp2[4])+2)>>2;\n    dp[4] = (unsigned int)(s1+(s2=sp[5])+s3+(s4=sp2[5])+2)>>2;\n    dp[5] = (unsigned int)(s2+(s1=sp[6])+s4+(s3=sp2[6])+2)>>2;\n    dp[6] = (unsigned int)(s1+(s2=sp[7])+s3+(s4=sp2[7])+2)>>2;\n    dp[7] = (unsigned int)(s2+(s1=sp[8])+s4+(s3=sp2[8])+2)>>2;\n    dp[8] = (unsigned int)(s1+(s2=sp[9])+s3+(s4=sp2[9])+2)>>2;\n    dp[9] = (unsigned int)(s2+(s1=sp[10])+s4+(s3=sp2[10])+2)>>2;\n    dp[10] = (unsigned int)(s1+(s2=sp[11])+s3+(s4=sp2[11])+2)>>2;\n    dp[11] = (unsigned int)(s2+(s1=sp[12])+s4+(s3=sp2[12])+2)>>2;\n    dp[12] = (unsigned int)(s1+(s2=sp[13])+s3+(s4=sp2[13])+2)>>2;\n    dp[13] = (unsigned int)(s2+(s1=sp[14])+s4+(s3=sp2[14])+2)>>2;\n    dp[14] = (unsigned int)(s1+(s2=sp[15])+s3+(s4=sp2[15])+2)>>2;\n    dp[15] = (unsigned int)(s2+sp[16]+s4+sp2[16]+2)>>2;\n    sp+= lx2;\n    sp2+= lx2;\n    dp+= lx2;\n  }\n}\n\n\nstatic inline void rec4c(unsigned char *s,unsigned char *d, int lx, int lx2, int h)\n{\n  unsigned char *dp,*sp,*sp2;\n  unsigned int s1,s2,s3,s4;\n\tint j;\n\n  sp = s;\n  sp2 = s+lx;\n  dp = d;\n  for (j=0; j<h; j++){\n    s1=sp[0]; s3=sp2[0];\n    dp[0] = (unsigned int)(s1+(s2=sp[1])+s3+(s4=sp2[1])+2)>>2;\n    dp[1] = (unsigned int)(s2+(s1=sp[2])+s4+(s3=sp2[2])+2)>>2;\n    dp[2] = (unsigned int)(s1+(s2=sp[3])+s3+(s4=sp2[3])+2)>>2;\n    dp[3] = (unsigned int)(s2+(s1=sp[4])+s4+(s3=sp2[4])+2)>>2;\n    dp[4] = (unsigned int)(s1+(s2=sp[5])+s3+(s4=sp2[5])+2)>>2;\n    dp[5] = (unsigned int)(s2+(s1=sp[6])+s4+(s3=sp2[6])+2)>>2;\n    dp[6] = (unsigned int)(s1+(s2=sp[7])+s3+(s4=sp2[7])+2)>>2;\n    dp[7] = (unsigned int)(s2+sp[8]+s4+sp2[8]+2)>>2;\n    sp+= lx2;\n    sp2+= lx2;\n    dp+= lx2;\n  }\n}\n\n\nstatic inline void rec4a(unsigned char *s,unsigned char *d, int lx, int lx2, int h)\n{\n  unsigned char *dp=d, *sp=s, *sp2=s+lx;\n  unsigned int s1, s2, s3, s4;\n\tint j;\n\n/*\n  sp = s;\n  sp2 = s+lx;\n  dp = d;\n*/\n  for (j=0; j<h; j++){\n    s1=sp[0]; s3=sp2[0];\n    dp[0] = (dp[0] + ((unsigned int)(s1+(s2=sp[1])+s3+(s4=sp2[1])+2)>>2) + 1)>>1;\n    dp[1] = (dp[1] + ((unsigned int)(s2+(s1=sp[2])+s4+(s3=sp2[2])+2)>>2) + 1)>>1;\n    dp[2] = (dp[2] + ((unsigned int)(s1+(s2=sp[3])+s3+(s4=sp2[3])+2)>>2) + 1)>>1;\n    dp[3] = (dp[3] + ((unsigned int)(s2+(s1=sp[4])+s4+(s3=sp2[4])+2)>>2) + 1)>>1;\n    dp[4] = (dp[4] + ((unsigned int)(s1+(s2=sp[5])+s3+(s4=sp2[5])+2)>>2) + 1)>>1;\n    dp[5] = (dp[5] + ((unsigned int)(s2+(s1=sp[6])+s4+(s3=sp2[6])+2)>>2) + 1)>>1;\n    dp[6] = (dp[6] + ((unsigned int)(s1+(s2=sp[7])+s3+(s4=sp2[7])+2)>>2) + 1)>>1;\n    dp[7] = (dp[7] + ((unsigned int)(s2+(s1=sp[8])+s4+(s3=sp2[8])+2)>>2) + 1)>>1;\n    dp[8] = (dp[8] + ((unsigned int)(s1+(s2=sp[9])+s3+(s4=sp2[9])+2)>>2) + 1)>>1;\n    dp[9] = (dp[9] + ((unsigned int)(s2+(s1=sp[10])+s4+(s3=sp2[10])+2)>>2) + 1)>>1;\n    dp[10] = (dp[10] + ((unsigned int)(s1+(s2=sp[11])+s3+(s4=sp2[11])+2)>>2) + 1)>>1;\n    dp[11] = (dp[11] + ((unsigned int)(s2+(s1=sp[12])+s4+(s3=sp2[12])+2)>>2) + 1)>>1;\n    dp[12] = (dp[12] + ((unsigned int)(s1+(s2=sp[13])+s3+(s4=sp2[13])+2)>>2) + 1)>>1;\n    dp[13] = (dp[13] + ((unsigned int)(s2+(s1=sp[14])+s4+(s3=sp2[14])+2)>>2) + 1)>>1;\n    dp[14] = (dp[14] + ((unsigned int)(s1+(s2=sp[15])+s3+(s4=sp2[15])+2)>>2) + 1)>>1;\n    dp[15] = (dp[15] + ((unsigned int)(s2+sp[16]+s4+sp2[16]+2)>>2) + 1)>>1;\n    sp+= lx2;\n    sp2+= lx2;\n    dp+= lx2;\n  }\n}\n\n\nstatic inline void rec4ac(unsigned char *s,unsigned char  *d, int lx, int lx2, int h)\n{\n  unsigned char *dp=d, *sp=s, *sp2=s+lx;\n  unsigned int s1,s2,s3,s4;\n\tint j;\n\n/*\n  sp = s;\n  sp2 = s+lx;\n  dp = d;\n*/\n\tfor (j=0; j<h; j++)\n\t{\n    \ts1=sp[0]; s3=sp2[0];\n    \tdp[0] = (dp[0] + ((unsigned int)(s1+(s2=sp[1])+s3+(s4=sp2[1])+2)>>2) + 1)>>1;\n    \tdp[1] = (dp[1] + ((unsigned int)(s2+(s1=sp[2])+s4+(s3=sp2[2])+2)>>2) + 1)>>1;\n    \tdp[2] = (dp[2] + ((unsigned int)(s1+(s2=sp[3])+s3+(s4=sp2[3])+2)>>2) + 1)>>1;\n    \tdp[3] = (dp[3] + ((unsigned int)(s2+(s1=sp[4])+s4+(s3=sp2[4])+2)>>2) + 1)>>1;\n    \tdp[4] = (dp[4] + ((unsigned int)(s1+(s2=sp[5])+s3+(s4=sp2[5])+2)>>2) + 1)>>1;\n    \tdp[5] = (dp[5] + ((unsigned int)(s2+(s1=sp[6])+s4+(s3=sp2[6])+2)>>2) + 1)>>1;\n    \tdp[6] = (dp[6] + ((unsigned int)(s1+(s2=sp[7])+s3+(s4=sp2[7])+2)>>2) + 1)>>1;\n    \tdp[7] = (dp[7] + ((unsigned int)(s2+sp[8]+s4+sp2[8]+2)>>2) + 1)>>1;\n    \tsp+= lx2;\n    \tsp2+= lx2;\n    \tdp+= lx2;\n\t}\n}\n\nstatic inline\nvoid recon_comp(mpeg3video_t *video, \n\t\tunsigned char *src, \n\t\tunsigned char *dst, \n\t\tint lx, \n\t\tint lx2,\n\t\tint w, \n\t\tint h, \n\t\tint x, \n\t\tint y, \n\t\tint dx, \n\t\tint dy, \n\t\tint addflag)\n{\n\tint switcher;\n\tunsigned char *s, *d;\n\n/* half pel scaling */\n\tswitcher = (dx & 1) << 3 | (dy & 1) << 2 | w;\n\tif(addflag) switcher |= 2; \n/* origins */\n\ts = src + lx * (y + (dy >> 1)) + x + (dx >> 1);\n\td = dst + lx * y + x;\n\n// Accelerated functions\n#ifdef HAVE_MMX\n\tif(video->have_mmx)\n\t{\n\t\tswitch(switcher)\n\t\t{\n\t\t\tcase 0x3: \treca_mmx(s, d, lx2, h);       break;\n\t\t\tcase 0x2:\trecac_mmx(s, d, lx2, h);      break;\n\t\t\tcase 0x1:\trec_mmx(s, d, lx2, h);        break;\n\t\t\tcase 0x0:\trecc_mmx(s, d, lx2, h);       break;\n\t\t\tcase 0x7:   recva(s, d, lx, lx2, h);  break;\n\t\t\tcase 0x6:   recvac(s, d, lx, lx2, h); break;\n\t\t\tcase 0x5:\trecv_mmx(s, d, lx, lx2, h);   break;\n\t\t\tcase 0x4:\trecvc_mmx(s, d, lx, lx2, h);  break;\n\t\t\tcase 0x9:\trech(s, d, lx2, h);       break;\n\t\t\tcase 0x8:   rechc(s, d, lx2, h);      break;\n\t\t}\n\t}\n\telse\n#endif\n\t{\n\t\tswitch(switcher)\n\t\t{\n\t\t\tcase 0x3: \treca(s, d, lx2, h);       break;\n\t\t\tcase 0x2:\trecac(s, d, lx2, h);      break;\n\t\t\tcase 0x1:\trec(s, d, lx2, h);        break;\n\t\t\tcase 0x0:\trecc(s, d, lx2, h);       break;\n\t\t\tcase 0x7:   recva(s, d, lx, lx2, h);  break;\n\t\t\tcase 0x6:   recvac(s, d, lx, lx2, h); break;\n\t\t\tcase 0x5:\trecv(s, d, lx, lx2, h);   break;\n\t\t\tcase 0x4:\trecvc(s, d, lx, lx2, h);  break;\n\t\t\tcase 0x9:\trech(s, d, lx2, h);       break;\n\t\t\tcase 0x8:   rechc(s, d, lx2, h);      break;\n\t\t}\n\t}\n\n// Unaccelerated functions\n\tswitch(switcher) \n\t{\n\t\tcase 0xb: \trecha(s, d, lx2, h);      break;\n\t\tcase 0xa:\trechac(s, d, lx2, h);     break;\n\t\tcase 0xf: \trec4a(s, d, lx, lx2, h);  break;\n\t\tcase 0xe:\trec4ac(s, d, lx, lx2, h); break;\n\t\tcase 0xd:\trec4(s, d, lx, lx2, h);   break;\n\t\tcase 0xc:\trec4c(s, d, lx, lx2, h);  break;\n\t }\n}\n\n/*\n\tunsigned char *src[]; * prediction source buffer *\n\tint sfield;           * prediction source field number (0 or 1) *\n\tunsigned char *dst[]; * prediction destination buffer *\n\tint dfield;           * prediction destination field number (0 or 1)*\n\tint lx,lx2;           * horizontal offsets *\n\tint w,h;              * prediction block/sub-block width, height *\n\tint x,y;              * pixel co-ordinates of top-left sample in current MB *\n\tint dx,dy;            * horizontal, vertical motion vector *\n\tint addflag;          * add prediction error to prediction ? *\n*/\nstatic void recon(mpeg3video_t *video, \n\t\tunsigned char *src[], \n\t\tint sfield, \n\t    unsigned char *dst[], \n\t\tint dfield, \n\t\tint lx,\n\t\tint lx2,\n\t    int w, \n\t\tint h, \n\t\tint x, \n\t\tint y, \n\t\tint dx, \n\t\tint dy, \n\t\tint addflag)\n{\n\n/* Y */\n\trecon_comp(video, (src[0] + (sfield ? (lx2 >> 1) : 0)), \n\t       dst[0] + (dfield ? (lx2 >> 1) : 0),\n           lx, lx2, w, h, x, y, dx, dy, addflag);\n\n\tif(video->chroma_format != CHROMA444)\n\t{\n      \tlx >>= 1; \n\t\tdx /= 2; \n\t\tlx2 >>= 1; \n\t\tw = 0; \n\t\tx >>= 1; \n\t}\n\n\tif(video->chroma_format == CHROMA420)\n\t{\n      \th >>= 1; \n\t\tdy /= 2; \n\t\ty >>= 1; \n\t}\n\n/* Cb */\n\trecon_comp(video, (src[1] + (sfield ? (lx2 >> 1) : 0)), \n\t       dst[1] + (dfield ? (lx2 >> 1) : 0),\n\t       lx, lx2, w, h, x, y, dx, dy, addflag);\n\n/* Cr */\n\trecon_comp(video, (src[2] + (sfield ? (lx2 >> 1) : 0)),\n\t       dst[2] + (dfield ? (lx2 >> 1) : 0),\n           lx, lx2, w, h, x, y, dx, dy, addflag);\n}\n\n#define WIDTH 1\n\nint mpeg3video_reconstruct(mpeg3video_t *video, \n\tint bx, \n\tint by, \n\tint mb_type, \n\tint motion_type,\n\tint PMV[2][2][2], \n\tint mv_field_sel[2][2], \n\tint dmvector[2], \n\tint stwtype)\n{\n\tint currentfield;\n\tunsigned char **predframe;\n\tint DMV[2][2];\n\tint stwtop, stwbot;\n\n\tstwtop = stwtype % 3; /* 0:temporal, 1 : (spat+temp) / 2, 2 : spatial */\n\tstwbot = stwtype / 3;\n\n\tif((mb_type & MB_FORWARD) || (video->pict_type == P_TYPE))\n\t{\n    \tif(video->pict_struct == FRAME_PICTURE)\n\t\t{\n    \t\tif((motion_type == MC_FRAME) || !(mb_type & MB_FORWARD))\n\t\t\t{\n/* frame-based prediction */\n\t\t\t\t{\n        \t\t\tif(stwtop < 2)\n        \t\t\t\trecon(video, video->oldrefframe, 0, video->newframe, 0,\n        \t    \t\t\tvideo->coded_picture_width, video->coded_picture_width << 1, WIDTH, 8, bx, by,\n            \t\t\t  \tPMV[0][0][0], PMV[0][0][1], stwtop);\n\n        \t\t\tif(stwbot < 2)\n        \t\t\t\trecon(video, video->oldrefframe, 1, video->newframe, 1,\n       \t    \t\t\t\tvideo->coded_picture_width, video->coded_picture_width << 1, WIDTH, 8, bx, by,\n            \t\t\t\tPMV[0][0][0], PMV[0][0][1], stwbot);\n    \t\t  \t}\n    \t\t}\n    \t\telse if(motion_type == MC_FIELD) /* field-based prediction */\n    \t\t{\n/* top field prediction */\n        \t\tif(stwtop < 2)\n        \t\t\trecon(video, video->oldrefframe, mv_field_sel[0][0], video->newframe, 0,\n            \t\t\tvideo->coded_picture_width << 1, video->coded_picture_width << 1, WIDTH, 8, bx, by >> 1,\n            \t\t\tPMV[0][0][0], PMV[0][0][1] >> 1, stwtop);\n\n/* bottom field prediction */\n        \t\tif(stwbot < 2)\n        \t\t\trecon(video, video->oldrefframe, mv_field_sel[1][0], video->newframe, 1,\n            \t\t\tvideo->coded_picture_width << 1, video->coded_picture_width << 1, WIDTH, 8, bx, by >> 1, \n            \t\t\tPMV[1][0][0], PMV[1][0][1] >> 1, stwbot);\n    \t\t}\n    \t\telse if(motion_type == MC_DMV)\n\t\t\t{ \n/* dual prime prediction */\n/* calculate derived motion vectors */\n        \t\tmpeg3video_calc_dmv(video, \n\t\t\t\t\tDMV,\n\t\t\t\t\tdmvector,\n\t\t\t\t\tPMV[0][0][0],\n\t\t\t\t\tPMV[0][0][1] >> 1);\n\n        \t\tif(stwtop < 2)\n\t\t\t\t{\n/* predict top field from top field */\n        \t\t\trecon(video, video->oldrefframe, 0, video->newframe, 0, \n            \t\t\tvideo->coded_picture_width << 1, video->coded_picture_width << 1, WIDTH, 8, bx, by>>1, \n            \t\t\tPMV[0][0][0], PMV[0][0][1] >> 1, 0);\n\n/* predict and add to top field from bottom field */\n        \t\t\trecon(video, video->oldrefframe, 1, video->newframe, 0, \n            \t\t\tvideo->coded_picture_width << 1, video->coded_picture_width << 1, WIDTH, 8, bx, by>>1, \n            \t\t\tDMV[0][0], DMV[0][1], 1);\n        \t\t}\n\n        \t\tif(stwbot < 2)\n        \t\t{\n/* predict bottom field from bottom field */\n        \t\t\trecon(video, video->oldrefframe, 1, video->newframe, 1, \n            \t\t\tvideo->coded_picture_width << 1, video->coded_picture_width << 1, WIDTH, 8, bx, by>>1, \n            \t\t\tPMV[0][0][0], PMV[0][0][1]>>1, 0);\n\n/* predict and add to bottom field from top field */\n        \t\t\trecon(video, video->oldrefframe, 0, video->newframe, 1, \n            \t\t\tvideo->coded_picture_width << 1, video->coded_picture_width<<1, WIDTH, 8, bx, by>>1, \n            \t\t\tDMV[1][0], DMV[1][1], 1);\n        \t\t}\n    \t\t}\n    \t  \telse\n/* invalid motion_type */\n/*        \t\tfprintf(stderr, \"reconstruct: invalid motion_type\\n\"); */\n\t\t\t\t;\n    \t}\n      \telse \n      \t{\n/* TOP_FIELD or BOTTOM_FIELD */\n/* field picture */\n    \t\tcurrentfield = (video->pict_struct == BOTTOM_FIELD);\n\n/* determine which frame to use for prediction */\n    \t\tif((video->pict_type == P_TYPE) && video->secondfield\n        \t   && (currentfield != mv_field_sel[0][0]))\n        \t\tpredframe = video->refframe; /* same frame */\n    \t\telse\n        \t \tpredframe = video->oldrefframe; /* previous frame */\n\n    \t\tif((motion_type == MC_FIELD) || !(mb_type & MB_FORWARD))\n    \t\t{\n/* field-based prediction */\n        \t\tif(stwtop < 2)\n        \t\t\trecon(video, predframe,mv_field_sel[0][0],video->newframe,0,\n            \t\t\tvideo->coded_picture_width << 1,video->coded_picture_width << 1,WIDTH,16,bx,by,\n            \t\t\tPMV[0][0][0],PMV[0][0][1],stwtop);\n    \t\t}\n    \t\telse \n\t\t\tif(motion_type == MC_16X8)\n    \t\t{\n        \t\tif(stwtop < 2)\n        \t\t{\n        \t\t\trecon(video, predframe, mv_field_sel[0][0], video->newframe, 0, \n            \t\t\tvideo->coded_picture_width << 1, video->coded_picture_width << 1, WIDTH, 8, bx, by, \n            \t\t\tPMV[0][0][0], PMV[0][0][1], stwtop);\n\n        \t\t\t/* determine which frame to use for lower half prediction */\n        \t\t\tif((video->pict_type==P_TYPE) && video->secondfield\n            \t\t   && (currentfield!=mv_field_sel[1][0]))\n            \t\t  predframe = video->refframe; /* same frame */\n        \t\t\telse\n            \t\t  predframe = video->oldrefframe; /* previous frame */\n\n        \t\t\trecon(video, predframe, mv_field_sel[1][0], video->newframe, 0, \n            \t\t\tvideo->coded_picture_width << 1, video->coded_picture_width << 1, WIDTH, 8, bx, by+8, \n            \t\t\tPMV[1][0][0], PMV[1][0][1], stwtop);\n        \t\t}\n    \t\t}\n    \t\telse \n\t\t\tif(motion_type == MC_DMV) /* dual prime prediction */\n    \t\t{\n        \t\tif(video->secondfield)\n        \t\t  \tpredframe = video->refframe; /* same frame */\n        \t\telse\n        \t\t  \tpredframe = video->oldrefframe; /* previous frame */\n\n/* calculate derived motion vectors */\n        \t\tmpeg3video_calc_dmv(video, \n\t\t\t\t\tDMV,\n\t\t\t\t\tdmvector,\n\t\t\t\t\tPMV[0][0][0],\n\t\t\t\t\tPMV[0][0][1]);\n\n/* predict from field of same parity */\n        \t\trecon(video, video->oldrefframe, currentfield, video->newframe, 0, \n        \t\t\tvideo->coded_picture_width << 1, video->coded_picture_width << 1, WIDTH, 16, bx, by, \n        \t\t\tPMV[0][0][0], PMV[0][0][1], 0);\n\n/* predict from field of opposite parity */\n        \t\trecon(video, predframe, !currentfield, video->newframe, 0, \n        \t\t\tvideo->coded_picture_width << 1, video->coded_picture_width << 1, WIDTH, 16, bx, by, \n        \t\t\tDMV[0][0], DMV[0][1], 1);\n    \t\t}\n    \t\telse\n/* invalid motion_type */\n/*        \t  fprintf(stderr, \"reconstruct: invalid motion_type\\n\"); */\n\t\t\t;\n\t\t}\n      \tstwtop = stwbot = 1;\n\t}\n\n\tif(mb_type & MB_BACKWARD)\n\t{\n    \tif(video->pict_struct == FRAME_PICTURE)\n    \t{\n    \t\tif(motion_type == MC_FRAME)\n    \t\t{\n/* frame-based prediction */\n        \t\tif(stwtop < 2)\n        \t\t\trecon(video, video->refframe, 0, video->newframe, 0, \n            \t\t\tvideo->coded_picture_width, video->coded_picture_width << 1, WIDTH, 8, bx, by, \n            \t\t\tPMV[0][1][0], PMV[0][1][1], stwtop);\n\n        \t\tif(stwbot < 2)\n        \t\t\trecon(video, video->refframe, 1, video->newframe, 1, \n\t\t\t\t\t\tvideo->coded_picture_width, video->coded_picture_width << 1, WIDTH, 8, bx, by, \n\t\t\t\t\t\tPMV[0][1][0], PMV[0][1][1], stwbot);\n    \t\t}\n    \t\telse \n\t\t\t{           \n/* field-based prediction */\n/* top field prediction */\n\t\t\t\tif(stwtop < 2)\n\t\t\t\t{\n\t\t\t\t\trecon(video, video->refframe, mv_field_sel[0][1], video->newframe, 0,\n\t\t\t\t\t\t(video->coded_picture_width << 1), (video->coded_picture_width<<1), WIDTH, 8, bx, (by >> 1),\n\t\t\t\t\t\tPMV[0][1][0], (PMV[0][1][1] >> 1), stwtop);\n\t\t\t\t}\n\n/* bottom field prediction */\n        \t\tif(stwbot < 2)\n\t\t\t\t{\n        \t\t\trecon(video, video->refframe, mv_field_sel[1][1], video->newframe, 1, (video->coded_picture_width << 1),\n\t\t\t\t\t\t(video->coded_picture_width << 1), WIDTH, 8, bx, (by>>1),\n\t\t\t\t\t\tPMV[1][1][0], (PMV[1][1][1]>>1), stwbot);\n\t\t\t\t}\n    \t\t}\n    \t}\n    \telse \n\t\t{\n/* TOP_FIELD or BOTTOM_FIELD */\n/* field picture */\n    \t\tif(motion_type == MC_FIELD)\n\t\t\t{\n/* field-based prediction */\n        \t\trecon(video, video->refframe, mv_field_sel[0][1], video->newframe, 0, \n\t    \t\t\tvideo->coded_picture_width << 1, video->coded_picture_width << 1, WIDTH, 16, bx, by, \n\t    \t\t\tPMV[0][1][0], PMV[0][1][1], stwtop);\n    \t\t}\n    \t\telse if(motion_type==MC_16X8)\n    \t\t{\n        \t\trecon(video, video->refframe, mv_field_sel[0][1], video->newframe, 0, \n        \t\t\tvideo->coded_picture_width << 1, video->coded_picture_width << 1, WIDTH, 8, bx, by, \n        \t\t\tPMV[0][1][0], PMV[0][1][1], stwtop);\n\n        \t\trecon(video, video->refframe, mv_field_sel[1][1], video->newframe, 0, \n        \t\t\tvideo->coded_picture_width << 1, video->coded_picture_width << 1, WIDTH, 8, bx, by+8, \n        \t\t\tPMV[1][1][0], PMV[1][1][1], stwtop);\n    \t\t}\n    \t\telse\n/* invalid motion_type */\n/*        \t  fprintf(stderr, \"reconstruct: invalid motion_type\\n\"); */\n\t\t\t;\n    \t}\n\t} /* mb_type & MB_BACKWARD */\n\treturn 0;\n}\n\n\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/video/seek.c",
    "content": "/* \n *\n *  This file is part of libmpeg3\n *\t\n * LibMPEG3\n * Author: Adam Williams <broadcast@earthling.net>\n * Page: heroine.linuxbox.com\n * Page: http://www.smalltalkconsulting.com/html/mpeg3source.html (for Squeak)\n *\n    LibMPEG3 was originally licenced under GPL. It was relicensed by\n    the author under the LGPL and the Squeak license on Nov 1st, 2000\n    \n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA \n    \n    Also licensed under the Squeak license.\n    http://www.squeak.org/license.html\n */\n /*  Changed Sept 15th by John M McIntosh to support Macintosh & Squeak\n */\n#include \"mpeg3private.h\"\n#include \"mpeg3protos.h\"\n#include \"mpeg3video.h\"\n#include <stdlib.h>\n#include <string.h>\n\nunsigned int mpeg3bits_next_startcode(mpeg3_bits_t* stream)\n{\n/* Perform forwards search */\n\tmpeg3bits_byte_align(stream);\n\n/* Perform search */\n\twhile((mpeg3bits_showbits32_noptr(stream) >> 8) != MPEG3_PACKET_START_CODE_PREFIX && \n\t\t!mpeg3bits_eof(stream))\n\t{\n\t\tmpeg3bits_getbyte_noptr(stream);\n\t}\n\treturn mpeg3bits_showbits32_noptr(stream);\n}\n\n/* Line up on the beginning of the next code. */\nint mpeg3video_next_code(mpeg3_bits_t* stream, unsigned int code)\n{\n\twhile(!mpeg3bits_eof(stream) && \n\t\tmpeg3bits_showbits32_noptr(stream) != code)\n\t{\n\t\tmpeg3bits_getbyte_noptr(stream);\n\t}\n\treturn mpeg3bits_eof(stream);\n}\n\n/* Line up on the beginning of the previous code. */\nint mpeg3video_prev_code(mpeg3_bits_t* stream, unsigned int code)\n{\n\twhile(!mpeg3bits_bof(stream) && \n\t\tmpeg3bits_showbits_reverse(stream, 32) != code)\n\t{\n\t\tmpeg3bits_getbits_reverse(stream, 8);\n\t}\n\treturn mpeg3bits_bof(stream);\n}\n\nlong mpeg3video_goptimecode_to_frame(mpeg3video_t *video)\n{\n/*  printf(\"mpeg3video_goptimecode_to_frame %d %d %d %d %f\\n\",  */\n/*  \tvideo->gop_timecode.hour, video->gop_timecode.minute, video->gop_timecode.second, video->gop_timecode.frame, video->frame_rate); */\n\treturn (long)(video->gop_timecode.hour * 3600 * video->frame_rate + \n\t\tvideo->gop_timecode.minute * 60 * video->frame_rate +\n\t\tvideo->gop_timecode.second * video->frame_rate +\n\t\tvideo->gop_timecode.frame) - 1 - video->first_frame;\n}\n\nint mpeg3video_match_refframes(mpeg3video_t *video)\n{\n\tunsigned char *dst, *src;\n\tint i, j, size;\n\n\tfor(i = 0; i < 3; i++)\n\t{\n\t\tif(video->newframe[i])\n\t\t{\n\t\t\tif(video->newframe[i] == video->refframe[i])\n\t\t\t{\n\t\t\t\tsrc = video->refframe[i];\n\t\t\t\tdst = video->oldrefframe[i];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsrc = video->oldrefframe[i];\n\t\t\t\tdst = video->refframe[i];\n\t\t\t}\n\n    \t\tif(i == 0)\n\t\t\t\tsize = video->coded_picture_width * video->coded_picture_height + 32 * video->coded_picture_width;\n    \t\telse \n\t\t\t\tsize = video->chrom_width * video->chrom_height + 32 * video->chrom_width;\n\n\t\t\tmemcpy(dst, src, size);\n\t\t}\n\t}\n\treturn 0;\n}\n\nint mpeg3video_seek(mpeg3video_t *video)\n{\n\tlong this_gop_start;\n\tint result = 0;\n\tint back_step;\n\tint attempts;\n\tmpeg3_t *file = (mpeg3_t *) video->file;\n\tmpeg3_bits_t *vstream = video->vstream;\n\tdouble percentage;\n\tlong frame_number;\n\tint match_refframes = 1;\n\n/* Seek to a percentage */\n\tif(video->percentage_seek >= 0)\n\t{\n\t\tpercentage = video->percentage_seek;\n\t\tvideo->percentage_seek = -1;\n\t\tmpeg3bits_seek_percentage(vstream, percentage);\n// Go to previous I-frame\n\t\tmpeg3bits_start_reverse(vstream);\n\t\tresult = mpeg3video_prev_code(vstream, MPEG3_GOP_START_CODE);\n\t\tif(!result) mpeg3bits_getbits_reverse(vstream, 32);\n\t\tmpeg3bits_start_forward(vstream);\n\n\t\tif(mpeg3bits_tell_percentage(vstream) < 0) mpeg3bits_seek_percentage(vstream, 0);\n\n// Read up to the correct percentage\n\t\tresult = 0;\n\t\twhile(!result && mpeg3bits_tell_percentage(vstream) < percentage)\n\t\t{\n\t\t\tresult = mpeg3video_read_frame_backend(video, 0);\n\t\t\tif(match_refframes)\n\t\t\t\tmpeg3video_match_refframes(video);\n\t\t\tmatch_refframes = 0;\n\t\t}\n\t}\n\telse\n/* Seek to a frame */\n\tif(video->frame_seek >= 0)\n\t{\n\t\tframe_number = video->frame_seek;\n\t\tvideo->frame_seek = -1;\n\t\tif(frame_number < 0) frame_number = 0;\n\t\tif(frame_number > video->maxframe) frame_number = video->maxframe;\n\n/* Seek to start of file */\n\t\tif(frame_number < 16)\n\t\t{\n\t\t\tvideo->repeat_count = video->current_repeat = 0;\n\t\t\tmpeg3bits_seek_start(vstream);\n\t\t\tvideo->framenum = 0;\n\t\t\tresult = mpeg3video_drop_frames(video, frame_number - video->framenum);\n\t\t}\n\t\telse\n\t\t{\n/* Seek to an I frame. */\n\t\t\tif((frame_number < video->framenum || frame_number - video->framenum > MPEG3_SEEK_THRESHOLD))\n\t\t\t{\n/* Elementary stream */\n\t\t\t\tif(file->is_video_stream)\n\t\t\t\t{\n\t\t\t\t\tmpeg3_t *file = (mpeg3_t *) video->file;\n\t\t\t\t\tmpeg3_vtrack_t *track = (mpeg3_vtrack_t *) video->track;\n\t\t\t\t\tlong byte = (long)((float)(mpeg3demuxer_total_bytes(vstream->demuxer) / \n\t\t\t\t\t\ttrack->total_frames) * \n\t\t\t\t\t\tframe_number);\n\t\t\t\t\tlong minimum = 65535;\n\t\t\t\t\tint done = 0;\n\n//printf(\"seek elementary %d\\n\", frame_number);\n/* Get GOP just before frame */\n\t\t\t\t\tdo\n\t\t\t\t\t{\n\t\t\t\t\t\tresult = mpeg3bits_seek_byte(vstream, byte);\n\t\t\t\t\t\tmpeg3bits_start_reverse(vstream);\n\t\t\t\t\t\tif(!result) result = mpeg3video_prev_code(vstream, MPEG3_GOP_START_CODE);\n\t\t\t\t\t\tmpeg3bits_start_forward(vstream);\n\t\t\t\t\t\tmpeg3bits_getbits(vstream, 8);\n\t\t\t\t\t\tif(!result) result = mpeg3video_getgophdr(video);\n\t\t\t\t\t\tthis_gop_start = mpeg3video_goptimecode_to_frame(video);\n\n//printf(\"wanted %ld guessed %ld byte %ld result %d\\n\", frame_number, this_gop_start, byte, result);\n\t\t\t\t\t\tif(labs(this_gop_start - frame_number) >= labs(minimum)) \n\t\t\t\t\t\t\tdone = 1;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tminimum = this_gop_start - frame_number;\n\t\t\t\t\t\t\tbyte += (long)((float)(frame_number - this_gop_start) * \n\t\t\t\t\t\t\t\t(float)(mpeg3demuxer_total_bytes(vstream->demuxer) / \n\t\t\t\t\t\t\t\ttrack->total_frames));\n\t\t\t\t\t\t\tif(byte < 0) byte = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}while(!result && !done);\n\n//printf(\"wanted %d guessed %d\\n\", frame_number, this_gop_start);\n\t\t\t\t\tif(!result)\n\t\t\t\t\t{\n\t\t\t\t\t\tvideo->framenum = this_gop_start;\n\t\t\t\t\t\tresult = mpeg3video_drop_frames(video, frame_number - video->framenum);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n/* System stream */\n\t\t\t\t{\n\t\t\t\t\tmpeg3bits_seek_time(vstream, (double)frame_number / video->frame_rate);\n\t\t\t\t\tpercentage = mpeg3bits_tell_percentage(vstream);\n//printf(\"seek frame %ld percentage %f byte %ld\\n\", frame_number, percentage, mpeg3bits_tell(vstream));\n\t\t\t\t\tmpeg3bits_start_reverse(vstream);\n\t\t\t\t\tmpeg3video_prev_code(vstream, MPEG3_GOP_START_CODE);\n\t\t\t\t\tmpeg3bits_getbits_reverse(vstream, 32);\n\t\t\t\t\tmpeg3bits_start_forward(vstream);\n//printf(\"seek system 1 %f\\n\", (double)frame_number / video->frame_rate);\n\n\t\t\t\t\twhile(!result && mpeg3bits_tell_percentage(vstream) < percentage)\n\t\t\t\t\t{\n\t\t\t\t\t\tresult = mpeg3video_read_frame_backend(video, 0);\n\t\t\t\t\t\tif(match_refframes)\n\t\t\t\t\t\t\tmpeg3video_match_refframes(video);\n\n//printf(\"seek system 2 %f %f\\n\", mpeg3bits_tell_percentage(vstream) / percentage);\n\t\t\t\t\t\tmatch_refframes = 0;\n\t\t\t\t\t}\n//printf(\"seek system 3 %f\\n\", (double)frame_number / video->frame_rate);\n\t\t\t\t}\n\n\t\t\t\tvideo->framenum = frame_number;\n\t\t\t}\n\t\t\telse\n// Drop frames\n\t\t\t{\n\t\t\t\tmpeg3video_drop_frames(video, frame_number - video->framenum);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result;\n}\n\nint mpeg3video_drop_frames(mpeg3video_t *video, long frames)\n{\n\tint result = 0;\n\tlong frame_number = video->framenum + frames;\n\n/* Read the selected number of frames and skip b-frames */\n\twhile(!result && frame_number > video->framenum)\n\t{\n\t\tresult = mpeg3video_read_frame_backend(video, frame_number - video->framenum);\n\t}\n\treturn result;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/video/slice.c",
    "content": "/* \n *\n *  This file is part of libmpeg3\n *\t\n * LibMPEG3\n * Author: Adam Williams <broadcast@earthling.net>\n * Page: heroine.linuxbox.com\n * Page: http://www.smalltalkconsulting.com/html/mpeg3source.html (for Squeak)\n *\n    LibMPEG3 was originally licenced under GPL. It was relicensed by\n    the author under the LGPL and the Squeak license on Nov 1st, 2000\n    \n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA \n    \n    Also licensed under the Squeak license.\n    http://www.squeak.org/license.html\n */\n /*  Changed Sept 15th by John M McIntosh to support Macintosh & Squeak\n */\n#include \"mpeg3private.h\"\n#include \"mpeg3video.h\"\n#include \"mpeg3videoprotos.h\"\n#include \"slice.h\"\n\n#include <stdlib.h>\n\n#ifdef HAVE_MMX\nstatic unsigned long long MMX_128 = 0x80008000800080LL;\n#endif\n\nint mpeg3_new_slice_buffer(mpeg3_slice_buffer_t *slice_buffer)\n{\n#ifdef USE_PTHREADS\n\tpthread_mutexattr_t mutex_attr;\n#endif\n\tslice_buffer->data = (unsigned char *) memoryAllocate(1,1024);\n\tslice_buffer->buffer_size = 0;\n\tslice_buffer->buffer_allocation = 1024;\n\tslice_buffer->current_position = 0;\n\tslice_buffer->bits_size = 0;\n\tslice_buffer->bits = 0;\n\tslice_buffer->done = 0;\n#ifdef USE_PTHREADS\n\tpthread_mutexattr_init(&mutex_attr);\n\tpthread_mutex_init(&(slice_buffer->completion_lock), &mutex_attr);\n#endif\n\treturn 0;\n}\n\nint mpeg3_delete_slice_buffer(mpeg3_slice_buffer_t *slice_buffer)\n{\n\tmemoryFree(slice_buffer->data);\n#ifdef USE_PTHREADS\n\tpthread_mutex_destroy(&(slice_buffer->completion_lock));\n#endif\n\treturn 0;\n}\n\nint mpeg3_expand_slice_buffer(mpeg3_slice_buffer_t *slice_buffer)\n{\n\tint i;\n\tunsigned char *new_buffer = (unsigned char *) memoryAllocate(1,slice_buffer->buffer_allocation * 2);\n\tfor(i = 0; i < slice_buffer->buffer_size; i++)\n\t\tnew_buffer[i] = slice_buffer->data[i];\n\tmemoryFree(slice_buffer->data);\n\tslice_buffer->data = new_buffer;\n\tslice_buffer->buffer_allocation *= 2;\n\treturn 0;\n}\n\n/* limit coefficients to -2048..2047 */\n\n/* move/add 8x8-Block from block[comp] to refframe */\n\nstatic inline int mpeg3video_addblock(mpeg3_slice_t *slice, \n\t\tmpeg3video_t *video, \n\t\tint comp, \n\t\tint bx, \n\t\tint by, \n\t\tint dct_type, \n\t\tint addflag)\n{\n\tint cc, i, iincr;\n\tunsigned char *rfp;\n\tshort *bp;\n\tint spar = slice->sparse[comp];\n/* color component index */\n  \tcc = (comp < 4) ? 0 : (comp & 1) + 1; \n\n  \tif(cc == 0)\n\t{   \n/* luminance */\n    \tif(video->pict_struct == FRAME_PICTURE)\n\t\t{\n      \t\tif(dct_type)\n\t\t\t{\n/* field DCT coding */\n        \t\trfp = video->newframe[0] + \n              \t\tvideo->coded_picture_width * (by + ((comp & 2) >> 1)) + bx + ((comp & 1) << 3);\n        \t\tiincr = (video->coded_picture_width << 1);\n      \t\t}\n      \t\telse\n\t\t\t{\n/* frame DCT coding */\n        \t\trfp = video->newframe[0] + \n             \t\tvideo->coded_picture_width * (by + ((comp & 2) << 2)) + bx + ((comp & 1) << 3);\n        \t\tiincr = video->coded_picture_width;\n      \t\t}\n\t\t}\n    \telse \n\t\t{\n/* field picture */\n      \t\trfp = video->newframe[0] + \n           \t\t(video->coded_picture_width << 1) * (by + ((comp & 2) << 2)) + bx + ((comp & 1) << 3);\n      \t\tiincr = (video->coded_picture_width << 1);\n    \t}\n \t}\n  \telse \n\t{\n/* chrominance */\n\n/* scale coordinates */\n    \tif(video->chroma_format != CHROMA444) bx >>= 1;\n    \tif(video->chroma_format == CHROMA420) by >>= 1;\n    \tif(video->pict_struct == FRAME_PICTURE)\n\t\t{\n    \t\tif(dct_type && (video->chroma_format != CHROMA420))\n\t\t\t{\n/* field DCT coding */\n        \t\trfp = video->newframe[cc]\n            \t\t  + video->chrom_width * (by + ((comp & 2) >> 1)) + bx + (comp & 8);\n        \t\tiincr = (video->chrom_width << 1);\n    \t\t}\n    \t\telse \n\t\t\t{\n/* frame DCT coding */\n        \t\trfp = video->newframe[cc]\n            \t\t  + video->chrom_width * (by + ((comp & 2) << 2)) + bx + (comp & 8);\n        \t\tiincr = video->chrom_width;\n    \t\t}\n    \t}\n    \telse \n\t\t{\n/* field picture */\n    \t\trfp = video->newframe[cc]\n            \t  + (video->chrom_width << 1) * (by + ((comp & 2) << 2)) + bx + (comp & 8);\n    \t\tiincr = (video->chrom_width << 1);\n    \t}\n  \t}\n\n  \tbp = slice->block[comp];\n\n\tif(addflag)\n\t{\n#ifdef HAVE_MMX\n\t\tif(video->have_mmx)\n\t\t{\n    \t\tif(spar)\n\t\t\t{\n    \t   __asm__ __volatile__(\n            \t\"movq       (%2),  %%mm6\\n\"  /* 4 blockvals */\n            \t\"pxor       %%mm4, %%mm4\\n\"\n            \t\"punpcklwd  %%mm6, %%mm6\\n\"\n            \t\"punpcklwd  %%mm6, %%mm6\\n\"\n            \t\".align 8\\n\"\n            \t\"1:\"\n                \t\"movq       (%1),  %%mm0\\n\"     /* 8 rindex1 */\n                \t\"movq       %%mm0, %%mm2\\n\"\n                \t\"punpcklbw  %%mm4, %%mm0\\n\"\n                \t\"punpckhbw  %%mm4, %%mm2\\n\"\n                \t\"paddw      %%mm6, %%mm0\\n\"\n                \t\"paddw      %%mm6, %%mm2\\n\"\n\n                \t\"packuswb   %%mm2, %%mm0\\n\"\n                \t\"movq       %%mm0, (%1)\\n\"\n\n                \t\"leal       (%1, %3), %1\\n\"\n            \t  \"loop       1b\\n\"\n            \t  :              /* scr   dest */\n            \t  : \"c\" (8),\"r\" (rfp), \"r\" (bp), \"r\" (iincr)\n                \t);\n    \t\t}\n    \t\telse \n\t\t\t{\n    \t   __asm__ __volatile__(\n        \t\t \"pxor    %%mm4, %%mm4\\n\"\n\n        \t\t \".align 8\\n\"\n        \t\t \"1:\"\n        \t\t   \"movq       (%2), %%mm0\\n\"   /* 8 rfp 0 1 2 3 4 5 6 7*/\n        \t\t   \"movq       (%1), %%mm6\\n\"   /* 4 blockvals 0 1 2 3 */\n\n        \t\t   \"movq       %%mm0, %%mm2\\n\"\n        \t\t   \"movq       8(%1), %%mm5\\n\"  /* 4 blockvals 0 1 2 3 */\n        \t\t   \"punpcklbw  %%mm4, %%mm0\\n\"  /* 0 2 4 6 */\n        \t\t   \"punpckhbw  %%mm4, %%mm2\\n\"  /* 1 3 5 7 */\n\n        \t\t   \"paddw      %%mm6, %%mm0\\n\"\n        \t\t   \"paddw      %%mm5, %%mm2\\n\"\n        \t\t   \"packuswb   %%mm2, %%mm0\\n\"\n\n        \t\t   \"addl       $16, %1\\n\"\n        \t\t   \"movq       %%mm0, (%2)\\n\"\n\n        \t\t   \"leal       (%2,%3), %2\\n\"\n        \t\t \"loop       1b\\n\"\n        \t\t :              /* scr   dest */\n        \t\t : \"c\" (8),\"r\" (bp), \"r\" (rfp), \"r\" (iincr)\n    \t\t);\n    \t\t}\n\t\t}\n\t\telse\n#endif\n\t\t\tfor(i = 0; i < 8; i++)\n\t\t\t{\n    \t\t\trfp[0] = CLIP(bp[0] + rfp[0]);\n    \t\t\trfp[1] = CLIP(bp[1] + rfp[1]);\n    \t\t\trfp[2] = CLIP(bp[2] + rfp[2]);\n    \t\t\trfp[3] = CLIP(bp[3] + rfp[3]);\n    \t\t\trfp[4] = CLIP(bp[4] + rfp[4]);\n    \t\t\trfp[5] = CLIP(bp[5] + rfp[5]);\n    \t\t\trfp[6] = CLIP(bp[6] + rfp[6]);\n    \t\t\trfp[7] = CLIP(bp[7] + rfp[7]);\n    \t\t\trfp += iincr;\n    \t\t\tbp += 8;\n\t\t\t}\n  \t}\n  \telse \n  \t{\n#ifdef HAVE_MMX\n\t\tif(video->have_mmx)\n\t\t{\n    \t\tif(spar) \n\t\t\t{\n            __asm__ __volatile__(\n            \t\"movd       (%2),           %%mm0\\n\"    /* \" 0 0 0  v1\" */\n            \t\"punpcklwd  %%mm0,          %%mm0\\n\"    /* \" 0 0 v1 v1\" */\n            \t\"punpcklwd  %%mm0,          %%mm0\\n\"\n            \t\"paddw      _MMX_128,        %%mm0\\n\"\n            \t\"packuswb   %%mm0,          %%mm0\\n\"\n            \t\"leal       (%0,%1,2),      %%eax\\n\"\n\n            \t\"movq        %%mm0,         (%0, %1)\\n\"\n            \t\"movq        %%mm0,         (%%eax)\\n\"\n            \t\"leal        (%%eax,%1,2),  %0\\n\"\n            \t\"movq        %%mm0,         (%%eax, %1)\\n\"\n\n            \t\"movq        %%mm0,         (%0)\\n\"\n            \t\"leal        (%0,%1,2),     %%eax\\n\"\n            \t\"movq        %%mm0,         (%0, %1)\\n\"\n\n            \t\"movq        %%mm0,         (%%eax)\\n\"\n            \t\"movq        %%mm0,         (%%eax, %1)\\n\"\n            \t:\n            \t: \"D\" (rfp), \"c\" (iincr), \"b\" (bp)\n            \t: \"eax\");\n    \t\t}\n    \t\telse \n\t\t\t{\n    \t\t__asm__ __volatile__(\n            \t\"movq        _MMX_128,%%mm4\\n\"\n            \t\".align 8\\n\"\n            \t\"1:\"\n            \t  \"movq      (%1),   %%mm0\\n\"\n            \t  \"movq      8(%1),  %%mm1\\n\"\n            \t  \"paddw     %%mm4,  %%mm0\\n\"\n\n            \t  \"movq      16(%1), %%mm2\\n\"\n            \t  \"paddw     %%mm4,  %%mm1\\n\"\n\n            \t  \"movq      24(%1), %%mm3\\n\"\n            \t  \"paddw     %%mm4,  %%mm2\\n\"\n\n            \t  \"packuswb  %%mm1,  %%mm0\\n\"\n            \t  \"paddw     %%mm4,  %%mm3\\n\"\n\n            \t  \"addl $32, %1\\n\"\n            \t  \"packuswb  %%mm3,  %%mm2\\n\"\n\n            \t  \"movq   %%mm0, (%2)\\n\"\n\n            \t  \"movq   %%mm2, (%2,%3)\\n\"\n\n            \t  \"leal       (%2,%3,2), %2\\n\"\n            \t\"loop       1b\\n\"\n            \t:\n            \t: \"c\" (4), \"r\" (bp), \"r\" (rfp), \"r\" (iincr)\n        \t);\n    \t\t}\n\t\t}\n\t\telse\n#endif\n    \t\tfor(i = 0; i < 8; i++)\n\t\t\t{\n    \t\t\trfp[0] = CLIP(bp[0] + 128);\n    \t\t\trfp[1] = CLIP(bp[1] + 128);\n    \t\t\trfp[2] = CLIP(bp[2] + 128);\n    \t\t\trfp[3] = CLIP(bp[3] + 128);\n    \t\t\trfp[4] = CLIP(bp[4] + 128);\n    \t\t\trfp[5] = CLIP(bp[5] + 128);\n    \t\t\trfp[6] = CLIP(bp[6] + 128);\n    \t\t\trfp[7] = CLIP(bp[7] + 128);\n    \t\t\trfp+= iincr;\n    \t\t\tbp += 8;\n    \t\t}\n  \t}\n\treturn 0;\n}\n\nint mpeg3_decode_slice(mpeg3_slice_t *slice)\n{\n\tmpeg3video_t *video = (mpeg3video_t *) slice->video;\n\tint comp;\n\tint mb_type, cbp, motion_type = 0, dct_type;\n\tint macroblock_address, mba_inc, mba_max;\n\tint slice_vert_pos_ext;\n\tunsigned int code;\n\tint bx, by;\n\tint dc_dct_pred[3];\n\tint mv_count, mv_format, mvscale;\n\tint pmv[2][2][2], mv_field_sel[2][2];\n\tint dmv, dmvector[2];\n\tint qs;\n\tint stwtype, stwclass; \n\tint snr_cbp;\n\tint i;\n\tmpeg3_slice_buffer_t *slice_buffer = slice->slice_buffer;\n\n/* number of macroblocks per picture */\n  \tmba_max = video->mb_width * video->mb_height;\n\n/* field picture has half as many macroblocks as frame */\n\tif(video->pict_struct != FRAME_PICTURE)\n\t    mba_max >>= 1; \n\n/* macroblock address */\n  \tmacroblock_address = 0; \n/* first macroblock in slice is not skipped */\n  \tmba_inc = 0;\n  \tslice->fault = 0;\n\n\tcode = mpeg3slice_getbits(slice_buffer, 32);\n/* decode slice header (may change quant_scale) */\n    slice_vert_pos_ext = mpeg3video_getslicehdr(slice, video);\n\n/* reset all DC coefficient and motion vector predictors */\n    dc_dct_pred[0] = dc_dct_pred[1] = dc_dct_pred[2] = 0;\n    pmv[0][0][0] = pmv[0][0][1] = pmv[1][0][0] = pmv[1][0][1] = 0;\n    pmv[0][1][0] = pmv[0][1][1] = pmv[1][1][0] = pmv[1][1][1] = 0;\n\n  \tfor(i = 0; \n\t\tslice_buffer->current_position < slice_buffer->buffer_size; \n\t\ti++)\n\t{\n\t\tif(mba_inc == 0)\n\t\t{\n/* Done */\n\t\t\tif(!mpeg3slice_showbits(slice_buffer, 23)) return 0;\n/* decode macroblock address increment */\n    \t\tmba_inc = mpeg3video_get_macroblock_address(slice);\n\n        \tif(slice->fault) return 1;\n\n    \t\tif(i == 0)\n\t\t\t{\n/* Get the macroblock_address */\n\t\t\t\tmacroblock_address = ((slice_vert_pos_ext << 7) + (code & 255) - 1) * video->mb_width + mba_inc - 1;\n/* first macroblock in slice: not skipped */\n\t\t\t\tmba_inc = 1;\n\t\t\t}\n\t\t}\n\n        if(slice->fault) return 1;\n\n    \tif(macroblock_address >= mba_max)\n\t\t{\n/* mba_inc points beyond picture dimensions */\n      \t\t/*fprintf(stderr, \"mpeg3_decode_slice: too many macroblocks in picture\\n\"); */\n      \t\treturn 1;\n    \t}\n\n/* not skipped */\n    \tif(mba_inc == 1)\n\t\t{\n\t\t\tmpeg3video_macroblock_modes(slice, \n\t\t\t\tvideo, \n\t\t\t\t&mb_type, \n\t\t\t\t&stwtype, \n\t\t\t\t&stwclass,\n        \t\t&motion_type, \n\t\t\t\t&mv_count, \n\t\t\t\t&mv_format, \n\t\t\t\t&dmv, \n\t\t\t\t&mvscale, \n\t\t\t\t&dct_type);\n\n\t\t\tif(slice->fault) return 1;\n\n      \t\tif(mb_type & MB_QUANT)\n\t\t\t{\n        \t\tqs = mpeg3slice_getbits(slice_buffer, 5);\n\n        \t\tif(video->mpeg2)\n            \t \tslice->quant_scale = video->qscale_type ? mpeg3_non_linear_mquant_table[qs] : (qs << 1);\n        \t\telse \n\t\t\t\t\tslice->quant_scale = qs;\n\n        \t\tif(video->scalable_mode == SC_DP)\n/* make sure quant_scale is valid */\n          \t\t\tslice->quant_scale = slice->quant_scale;\n      \t\t}\n\n/* motion vectors */\n\n\n/* decode forward motion vectors */\n      \t\tif((mb_type & MB_FORWARD) || ((mb_type & MB_INTRA) && video->conceal_mv))\n\t\t\t{\n        \t\tif(video->mpeg2)\n        \t\t\tmpeg3video_motion_vectors(slice, \n\t\t\t\t\t\tvideo, \n\t\t\t\t\t\tpmv, \n\t\t\t\t\t\tdmvector, \n\t\t\t\t\t\tmv_field_sel, \n            \t\t\t0, \n\t\t\t\t\t\tmv_count, \n\t\t\t\t\t\tmv_format, \n\t\t\t\t\t\tvideo->h_forw_r_size, \n\t\t\t\t\t\tvideo->v_forw_r_size, \n\t\t\t\t\t\tdmv, \n\t\t\t\t\t\tmvscale);\n        \t\telse\n        \t\t  \tmpeg3video_motion_vector(slice, \n\t\t\t\t\t\tvideo, \n\t\t\t\t\t\tpmv[0][0], \n\t\t\t\t\t\tdmvector, \n            \t\t\tvideo->forw_r_size, \n\t\t\t\t\t\tvideo->forw_r_size, \n\t\t\t\t\t\t0, \n\t\t\t\t\t\t0, \n\t\t\t\t\t\tvideo->full_forw);\n    \t\t}\n      \t\tif(slice->fault) return 1;\n\n/* decode backward motion vectors */\n    \t\tif(mb_type & MB_BACKWARD)\n\t\t\t{\n        \t\tif(video->mpeg2)\n        \t\t  \tmpeg3video_motion_vectors(slice, \n\t\t\t\t\t\tvideo, \n\t\t\t\t\t\tpmv, \n\t\t\t\t\t\tdmvector, \n\t\t\t\t\t\tmv_field_sel, \n            \t\t\t1, \n\t\t\t\t\t\tmv_count, \n\t\t\t\t\t\tmv_format, \n\t\t\t\t\t\tvideo->h_back_r_size, \n\t\t\t\t\t\tvideo->v_back_r_size, \n\t\t\t\t\t\t0, \n\t\t\t\t\t\tmvscale);\n        \t\telse\n        \t\t  \tmpeg3video_motion_vector(slice, \n\t\t\t\t\t\tvideo, \n\t\t\t\t\t\tpmv[0][1], \n\t\t\t\t\t\tdmvector, \n            \t\t\tvideo->back_r_size, \n\t\t\t\t\t\tvideo->back_r_size, \n\t\t\t\t\t\t0, \n\t\t\t\t\t\t0, \n\t\t\t\t\t\tvideo->full_back);\n    \t\t}\n\n      \t\tif(slice->fault) return 1;\n\n/* remove marker_bit */\n      \t\tif((mb_type & MB_INTRA) && video->conceal_mv)\n        \t\tmpeg3slice_flushbit(slice_buffer);\n\n/* macroblock_pattern */\n      \t\tif(mb_type & MB_PATTERN)\n\t\t\t{\n        \t\tcbp = mpeg3video_get_cbp(slice);\n        \t\tif(video->chroma_format == CHROMA422)\n\t\t\t\t{\n/* coded_block_pattern_1 */\n        \t\t  \tcbp = (cbp << 2) | mpeg3slice_getbits2(slice_buffer); \n        \t\t}\n        \t\telse\n\t\t\t\tif(video->chroma_format == CHROMA444)\n\t\t\t\t{\n/* coded_block_pattern_2 */\n        \t\t  \tcbp = (cbp << 6) | mpeg3slice_getbits(slice_buffer, 6); \n        \t\t}\n    \t\t}\n    \t\telse\n        \t  \tcbp = (mb_type & MB_INTRA) ? ((1 << video->blk_cnt) - 1) : 0;\n\n      \t\tif(slice->fault) return 1;\n/* decode blocks */\n      \t\tmpeg3video_clearblock(slice, 0, video->blk_cnt);\n      \t\tfor(comp = 0; comp < video->blk_cnt; comp++)\n\t\t\t{\n        \t\tif(cbp & (1 << (video->blk_cnt - comp - 1)))\n\t\t\t\t{\n          \t\t\tif(mb_type & MB_INTRA)\n\t\t\t\t\t{\n            \t\t\tif(video->mpeg2)\n\t\t\t\t\t\t\tmpeg3video_getmpg2intrablock(slice, video, comp, dc_dct_pred);\n            \t\t\telse\n\t\t\t\t\t\t\tmpeg3video_getintrablock(slice, video, comp, dc_dct_pred);\n          \t\t\t}\n        \t\t\telse \n\t\t\t\t\t{\n            \t\t  \tif(video->mpeg2) \n\t\t\t\t\t  \t\tmpeg3video_getmpg2interblock(slice, video, comp);\n            \t\t  \telse           \n\t\t\t\t\t  \t\tmpeg3video_getinterblock(slice, video, comp);\n        \t\t\t}\n        \t\t\tif(slice->fault) return 1;\n        \t\t}\n      \t\t}\n\n/* reset intra_dc predictors */\n\t\t\tif(!(mb_type & MB_INTRA))\n        \t  \tdc_dct_pred[0] = dc_dct_pred[1] = dc_dct_pred[2] = 0;\n\n/* reset motion vector predictors */\n    \t\tif((mb_type & MB_INTRA) && !video->conceal_mv)\n\t\t\t{\n/* intra mb without concealment motion vectors */\n        \t\tpmv[0][0][0] = pmv[0][0][1] = pmv[1][0][0] = pmv[1][0][1] = 0;\n        \t\tpmv[0][1][0] = pmv[0][1][1] = pmv[1][1][0] = pmv[1][1][1] = 0;\n    \t\t}\n\n    \t\tif((video->pict_type == P_TYPE) && !(mb_type & (MB_FORWARD | MB_INTRA)))\n\t\t\t{\n/* non-intra mb without forward mv in a P picture */\n        \t\tpmv[0][0][0] = pmv[0][0][1] = pmv[1][0][0] = pmv[1][0][1] = 0;\n\n/* derive motion_type */\n        \t\tif(video->pict_struct == FRAME_PICTURE) \n\t\t\t\t\tmotion_type = MC_FRAME;\n        \t\telse\n        \t\t{\n        \t\t\tmotion_type = MC_FIELD;\n/* predict from field of same parity */\n        \t\t\tmv_field_sel[0][0] = (video->pict_struct == BOTTOM_FIELD);\n        \t\t}\n      \t\t}\n\n    \t\tif(stwclass == 4)\n    \t\t{\n/* purely spatially predicted macroblock */\n        \t\tpmv[0][0][0] = pmv[0][0][1] = pmv[1][0][0] = pmv[1][0][1] = 0;\n        \t\tpmv[0][1][0] = pmv[0][1][1] = pmv[1][1][0] = pmv[1][1][1] = 0;\n    \t\t}\n    \t}\n    \telse \n\t\t{\n/* mba_inc!=1: skipped macroblock */\n      \t\tmpeg3video_clearblock(slice, 0, video->blk_cnt);\n\n/* reset intra_dc predictors */\n      \t\tdc_dct_pred[0] = dc_dct_pred[1] = dc_dct_pred[2] = 0;\n\n/* reset motion vector predictors */\n      \t\tif(video->pict_type == P_TYPE)\n        \t\tpmv[0][0][0] = pmv[0][0][1] = pmv[1][0][0] = pmv[1][0][1] = 0;\n\n/* derive motion_type */\n      \t\tif(video->pict_struct == FRAME_PICTURE)\n        \t\tmotion_type = MC_FRAME;\n    \t\telse\n    \t\t{\n        \t\tmotion_type = MC_FIELD;\n/* predict from field of same parity */\n        \t\tmv_field_sel[0][0] = mv_field_sel[0][1] = (video->pict_struct == BOTTOM_FIELD);\n    \t\t}\n\n/* skipped I are spatial-only predicted, */\n/* skipped P and B are temporal-only predicted */\n      \t\tstwtype = (video->pict_type == I_TYPE) ? 8 : 0;\n\n/* clear MB_INTRA */\n      \t\tmb_type &= ~MB_INTRA;\n\n/* no block data */\n      \t\tcbp = 0; \n    \t}\n\n    \tsnr_cbp = 0;\n\n/* pixel coordinates of top left corner of current macroblock */\n    \tbx = 16 * (macroblock_address % video->mb_width);\n    \tby = 16 * (macroblock_address / video->mb_width);\n\n/* motion compensation */\n    \tif(!(mb_type & MB_INTRA))\n    \t  \tmpeg3video_reconstruct(video, \n\t\t\t\tbx, \n\t\t\t\tby, \n\t\t\t\tmb_type, \n\t\t\t\tmotion_type, \n\t\t\t\tpmv, \n\t\t\t\tmv_field_sel, \n\t\t\t\tdmvector, \n\t\t\t\tstwtype);\n\n/* copy or add block data into picture */\n    \tfor(comp = 0; comp < video->blk_cnt; comp++)\n\t\t{\n      \t\tif((cbp | snr_cbp) & (1 << (video->blk_cnt - 1 - comp)))\n\t\t\t{\n#ifdef HAVE_MMX\n\t\t\t\tif(video->have_mmx)\n\t  \t  \t\t\tIDCT_mmx(slice->block[comp]);\n\t\t\t\telse\n#endif\n          \t\t\tmpeg3video_idct_conversion(slice->block[comp]);\n\n        \t\tmpeg3video_addblock(slice, \n\t\t\t\t\tvideo, \n\t\t\t\t\tcomp, \n\t\t\t\t\tbx, \n\t\t\t\t\tby, \n\t\t\t\t\tdct_type, \n\t\t\t\t\t(mb_type & MB_INTRA) == 0);\n      \t\t}\n    \t}\n\n/* advance to next macroblock */\n    \tmacroblock_address++;\n    \tmba_inc--;\n  \t}\n\n\treturn 0;\n}\n\nvoid mpeg3_slice_loop(mpeg3_slice_t *slice)\n{\n\tmpeg3video_t *video = (mpeg3video_t *) slice->video;\n\tint result = 1;\n\n\twhile(!slice->done)\n\t{\n#ifdef USE_PTHREADS\n\t\tpthread_mutex_lock(&(slice->input_lock));\n#endif\n\t\tif(!slice->done)\n\t\t{\n/* Get a buffer to decode */\n\t\t\tresult = 1;\n#ifdef USE_PTHREADS\n\t\t\tpthread_mutex_lock(&(video->slice_lock));\n#endif\n\t\t\tif(slice->buffer_step > 0)\n\t\t\t{\n\t\t\t\twhile(slice->current_buffer <= slice->last_buffer)\n\t\t\t\t{\n\t\t\t\t\tif(!video->slice_buffers[slice->current_buffer].done &&\n\t\t\t\t\t\tslice->current_buffer <= slice->last_buffer)\n\t\t\t\t\t{\n\t\t\t\t\t\tresult = 0;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tslice->current_buffer += slice->buffer_step;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\twhile(slice->current_buffer >= slice->last_buffer)\n\t\t\t\t{\n\t\t\t\t\tif(!video->slice_buffers[slice->current_buffer].done &&\n\t\t\t\t\t\tslice->current_buffer >= slice->last_buffer)\n\t\t\t\t\t{\n\t\t\t\t\t\tresult = 0;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tslice->current_buffer += slice->buffer_step;\n\t\t\t\t}\n\t\t\t}\n\n/* Got one */\n\t\t\tif(!result && slice->current_buffer >= 0 && slice->current_buffer < video->total_slice_buffers)\n\t\t\t{\n\t\t\t\tslice->slice_buffer = &(video->slice_buffers[slice->current_buffer]);\n\t\t\t\tslice->slice_buffer->done = 1;\n#ifdef USE_PTHREADS\n\t\t\t\tpthread_mutex_unlock(&(video->slice_lock));\n\t\t\t\tpthread_mutex_unlock(&(slice->input_lock));\n#endif\n\t\t\t\tmpeg3_decode_slice(slice);\n#ifdef USE_PTHREADS\n\t\t\t\tpthread_mutex_unlock(&(slice->slice_buffer->completion_lock));\n#endif\n\t\t\t}\n\t\t\telse {\n#ifdef USE_PTHREADS\n\t\t\t\tpthread_mutex_unlock(&(video->slice_lock));\n#endif\n\t\t\t}\n\t\t}\n#ifdef USE_PTHREADS\n\t\tpthread_mutex_unlock(&(slice->output_lock));\n#else\n\t\tif ((slice->current_buffer > slice->last_buffer) || (slice->last_buffer == 0))\n\t\t\tbreak;\n#endif\n\t}\n}\n\nint mpeg3_new_slice_decoder(void *video, mpeg3_slice_t *slice)\n{\n#ifdef USE_PTHREADS\n\tpthread_attr_t  attr;\n\tstruct sched_param param;\n\tpthread_mutexattr_t mutex_attr;\n#endif\n\n\tslice->video = video;\n\tslice->done = 0;\n#ifdef USE_PTHREADS\n\tpthread_mutexattr_init(&mutex_attr);\n\tpthread_mutex_init(&(slice->input_lock), &mutex_attr);\n\tpthread_mutex_lock(&(slice->input_lock));\n\tpthread_mutex_init(&(slice->output_lock), &mutex_attr);\n\tpthread_mutex_lock(&(slice->output_lock));\n\n\tpthread_attr_init(&attr);\n\tpthread_create(&(slice->tid), &attr, (void*)mpeg3_slice_loop, slice);\n#endif\n\treturn 0;\n}\n\nint mpeg3_delete_slice_decoder(mpeg3_slice_t *slice)\n{\n\tslice->done = 1;\n#ifdef USE_PTHREADS\n\tpthread_mutex_unlock(&(slice->input_lock));\n\tpthread_join(slice->tid, 0);\n\tpthread_mutex_destroy(&(slice->input_lock));\n\tpthread_mutex_destroy(&(slice->output_lock));\n#endif\n\treturn 0;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/video/slice.h",
    "content": " /*  Changed Sept 15th by John M McIntosh to support Macintosh & Squeak\n */\n#ifndef SLICE_H\n#define SLICE_H\n\n#ifdef USE_PTHREADS\n#include <pthread.h>\n#endif\n/* Array of these feeds the slice decoders */\ntypedef struct\n{\n\tunsigned char *data;   /* Buffer for holding the slice data */\n\tint buffer_size;         /* Size of buffer */\n\tint buffer_allocation;   /* Space allocated for buffer  */\n\tint current_position;    /* Position in buffer */\n\tunsigned MPEG3_INT32 bits;\n\tint bits_size;\n#ifdef USE_PTHREADS\n\tpthread_mutex_t completion_lock; /* Lock slice until completion */\n#endif\n\tint done;           /* Signal for slice decoder to skip */\n} mpeg3_slice_buffer_t;\n\n/* Each slice decoder */\ntypedef struct\n{\n\tvoid *video;     /* mpeg3video_t */\n\tmpeg3_slice_buffer_t *slice_buffer;\n\n\tint thread_number;      /* Number of this thread */\n\tint current_buffer;     /* Buffer this slice decoder is on */\n\tint buffer_step;        /* Number of buffers to skip */\n\tint last_buffer;        /* Last buffer this decoder should process */\n\tint fault;\n\tint done;\n\tint quant_scale;\n\tint pri_brk;                  /* slice/macroblock */\n\tshort block[12][64];\n\tint sparse[12];\n#ifdef USE_PTHREADS\n\tpthread_t tid;   /* ID of thread */\n\tpthread_mutex_t input_lock, output_lock;\n#endif\n} mpeg3_slice_t;\n\n#define mpeg3slice_fillbits(buffer, nbits) \\\n\twhile(((mpeg3_slice_buffer_t*)(buffer))->bits_size < (nbits)) \\\n\t{ \\\n\t\tif(((mpeg3_slice_buffer_t*)(buffer))->current_position < ((mpeg3_slice_buffer_t*)(buffer))->buffer_size) \\\n\t\t{ \\\n\t\t\t((mpeg3_slice_buffer_t*)(buffer))->bits <<= 8; \\\n\t\t\t((mpeg3_slice_buffer_t*)(buffer))->bits |= ((mpeg3_slice_buffer_t*)(buffer))->data[((mpeg3_slice_buffer_t*)(buffer))->current_position++]; \\\n\t\t} \\\n\t\t((mpeg3_slice_buffer_t*)(buffer))->bits_size += 8; \\\n\t}\n\n#define mpeg3slice_flushbits(buffer, nbits) \\\n\t{ \\\n\t\tmpeg3slice_fillbits((buffer), (nbits)); \\\n\t\t((mpeg3_slice_buffer_t*)(buffer))->bits_size -= (nbits); \\\n\t}\n\n#define mpeg3slice_flushbit(buffer) \\\n{ \\\n\tif(((mpeg3_slice_buffer_t*)(buffer))->bits_size) \\\n\t\t((mpeg3_slice_buffer_t*)(buffer))->bits_size--; \\\n\telse \\\n\tif(((mpeg3_slice_buffer_t*)(buffer))->current_position < ((mpeg3_slice_buffer_t*)(buffer))->buffer_size) \\\n\t{ \\\n\t\t((mpeg3_slice_buffer_t*)(buffer))->bits = \\\n\t\t\t((mpeg3_slice_buffer_t*)(buffer))->data[((mpeg3_slice_buffer_t*)(buffer))->current_position++]; \\\n\t\t((mpeg3_slice_buffer_t*)(buffer))->bits_size = 7; \\\n\t} \\\n}\n\nstatic inline unsigned int mpeg3slice_getbit(mpeg3_slice_buffer_t *buffer)\n{\n\tif(buffer->bits_size)\n\t\treturn (buffer->bits >> (--buffer->bits_size)) & 0x1;\n\telse\n\tif(buffer->current_position < buffer->buffer_size)\n\t{\n\t\tbuffer->bits = buffer->data[buffer->current_position++];\n\t\tbuffer->bits_size = 7;\n\t\treturn (buffer->bits >> 7) & 0x1;\n\t}\n}\n\nstatic inline unsigned int mpeg3slice_getbits2(mpeg3_slice_buffer_t *buffer)\n{\n\tif(buffer->bits_size >= 2)\n\t\treturn (buffer->bits >> (buffer->bits_size -= 2)) & 0x3;\n\telse\n\tif(buffer->current_position < buffer->buffer_size)\n\t{\n\t\tbuffer->bits <<= 8;\n\t\tbuffer->bits |= buffer->data[buffer->current_position++];\n\t\tbuffer->bits_size += 6;\n\t\treturn (buffer->bits >> buffer->bits_size)  & 0x3;\n\t}\n}\n\nstatic inline unsigned int mpeg3slice_getbyte(mpeg3_slice_buffer_t *buffer)\n{\n\tif(buffer->bits_size >= 8)\n\t\treturn (buffer->bits >> (buffer->bits_size -= 8)) & 0xff;\n\telse\n\tif(buffer->current_position < buffer->buffer_size)\n\t{\n\t\tbuffer->bits <<= 8;\n\t\tbuffer->bits |= buffer->data[buffer->current_position++];\n\t\treturn (buffer->bits >> buffer->bits_size) & 0xff;\n\t}\n}\n\n\nstatic inline unsigned int mpeg3slice_getbits(mpeg3_slice_buffer_t *slice_buffer, int bits)\n{\n\tif(bits == 1) return mpeg3slice_getbit(slice_buffer);\n\tmpeg3slice_fillbits(slice_buffer, bits);\n\treturn (slice_buffer->bits >> (slice_buffer->bits_size -= bits)) & (0xffffffff >> (32 - bits));\n}\n\nstatic inline unsigned int mpeg3slice_showbits16(mpeg3_slice_buffer_t *buffer)\n{\n\tif(buffer->bits_size >= 16)\n\t\treturn (buffer->bits >> (buffer->bits_size - 16)) & 0xffff;\n\telse\n\tif(buffer->current_position < buffer->buffer_size)\n\t{\n\t\tbuffer->bits <<= 16;\n\t\tbuffer->bits_size += 16;\n\t\tbuffer->bits |= (unsigned int)buffer->data[buffer->current_position++] << 8;\n\t\tbuffer->bits |= buffer->data[buffer->current_position++];\n\t\treturn (buffer->bits >> (buffer->bits_size - 16)) & 0xffff;\n\t}\n}\n\nstatic inline unsigned int mpeg3slice_showbits9(mpeg3_slice_buffer_t *buffer)\n{\n\tif(buffer->bits_size >= 9)\n\t\treturn (buffer->bits >> (buffer->bits_size - 9)) & 0x1ff;\n\telse\n\tif(buffer->current_position < buffer->buffer_size)\n\t{\n\t\tbuffer->bits <<= 16;\n\t\tbuffer->bits_size += 16;\n\t\tbuffer->bits |= (unsigned int)buffer->data[buffer->current_position++] << 8;\n\t\tbuffer->bits |= buffer->data[buffer->current_position++];\n\t\treturn (buffer->bits >> (buffer->bits_size - 9)) & 0x1ff;\n\t}\n}\n\nstatic inline unsigned int mpeg3slice_showbits5(mpeg3_slice_buffer_t *buffer)\n{\n\tif(buffer->bits_size >= 5)\n\t\treturn (buffer->bits >> (buffer->bits_size - 5)) & 0x1f;\n\telse\n\tif(buffer->current_position < buffer->buffer_size)\n\t{\n\t\tbuffer->bits <<= 8;\n\t\tbuffer->bits_size += 8;\n\t\tbuffer->bits |= buffer->data[buffer->current_position++];\n\t\treturn (buffer->bits >> (buffer->bits_size - 5)) & 0x1f;\n\t}\n}\n\nstatic inline unsigned int mpeg3slice_showbits(mpeg3_slice_buffer_t *slice_buffer, int bits)\n{\n\tmpeg3slice_fillbits(slice_buffer, bits);\n\treturn (slice_buffer->bits >> (slice_buffer->bits_size - bits)) & (0xffffffff >> (32 - bits));\n}\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/video/vlc.c",
    "content": "/* \n *\n *  This file is part of libmpeg3\n *\t\n * LibMPEG3\n * Author: Adam Williams <broadcast@earthling.net>\n * Page: heroine.linuxbox.com\n * Page: http://www.smalltalkconsulting.com/html/mpeg3source.html (for Squeak)\n *\n    LibMPEG3 was originally licenced under GPL. It was relicensed by\n    the author under the LGPL and the Squeak license on Nov 1st, 2000\n    \n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA \n    \n    Also licensed under the Squeak license.\n    http://www.squeak.org/license.html\n */\n#include \"mpeg3video.h\"\n#include \"vlc.h\"\n\n/* variable length code tables                                    */\n\n/* Table B-3, mb_type in P-pictures, codes 001..1xx */\nmpeg3_VLCtab_t mpeg3_PMBtab0[8] = {\n  {MPERROR,0},\n  {MB_FORWARD,3},\n  {MB_PATTERN,2}, {MB_PATTERN,2},\n  {MB_FORWARD|MB_PATTERN,1}, {MB_FORWARD|MB_PATTERN,1},\n  {MB_FORWARD|MB_PATTERN,1}, {MB_FORWARD|MB_PATTERN,1}\n};\n\n/* Table B-3, mb_type in P-pictures, codes 000001..00011x */\nmpeg3_VLCtab_t mpeg3_PMBtab1[8] = {\n  {MPERROR,0},\n  {MB_QUANT|MB_INTRA,6},\n  {MB_QUANT|MB_PATTERN,5}, {MB_QUANT|MB_PATTERN,5},\n  {MB_QUANT|MB_FORWARD|MB_PATTERN,5}, {MB_QUANT|MB_FORWARD|MB_PATTERN,5},\n  {MB_INTRA,5}, {MB_INTRA,5}\n};\n\n/* Table B-4, mb_type in B-pictures, codes 0010..11xx */\nmpeg3_VLCtab_t mpeg3_BMBtab0[16] = {\n  {MPERROR,0}, {MPERROR,0},\n  {MB_FORWARD,4},\n  {MB_FORWARD|MB_PATTERN,4},\n  {MB_BACKWARD,3}, {MB_BACKWARD,3},\n  {MB_BACKWARD|MB_PATTERN,3}, {MB_BACKWARD|MB_PATTERN,3},\n  {MB_FORWARD|MB_BACKWARD,2}, {MB_FORWARD|MB_BACKWARD,2},\n  {MB_FORWARD|MB_BACKWARD,2}, {MB_FORWARD|MB_BACKWARD,2},\n  {MB_FORWARD|MB_BACKWARD|MB_PATTERN,2},\n  {MB_FORWARD|MB_BACKWARD|MB_PATTERN,2},\n  {MB_FORWARD|MB_BACKWARD|MB_PATTERN,2},\n  {MB_FORWARD|MB_BACKWARD|MB_PATTERN,2}\n};\n\n/* Table B-4, mb_type in B-pictures, codes 000001..00011x */\nmpeg3_VLCtab_t mpeg3_BMBtab1[8] = {\n  {MPERROR,0},\n  {MB_QUANT|MB_INTRA,6},\n  {MB_QUANT|MB_BACKWARD|MB_PATTERN,6},\n  {MB_QUANT|MB_FORWARD|MB_PATTERN,6},\n  {MB_QUANT|MB_FORWARD|MB_BACKWARD|MB_PATTERN,5},\n  {MB_QUANT|MB_FORWARD|MB_BACKWARD|MB_PATTERN,5},\n  {MB_INTRA,5}, {MB_INTRA,5}\n};\n\n/* Table B-5, mb_type in spat. scal. I-pictures, codes 0001..1xxx */\nmpeg3_VLCtab_t mpeg3_spIMBtab[16] = {\n  {MPERROR,0},\n  {MB_CLASS4,4},\n  {MB_QUANT|MB_INTRA,4},\n  {MB_INTRA,4},\n  {MB_CLASS4|MB_QUANT|MB_PATTERN,2}, {MB_CLASS4|MB_QUANT|MB_PATTERN,2},\n  {MB_CLASS4|MB_QUANT|MB_PATTERN,2}, {MB_CLASS4|MB_QUANT|MB_PATTERN,2},\n  {MB_CLASS4|MB_PATTERN,1}, {MB_CLASS4|MB_PATTERN,1},\n  {MB_CLASS4|MB_PATTERN,1}, {MB_CLASS4|MB_PATTERN,1},\n  {MB_CLASS4|MB_PATTERN,1}, {MB_CLASS4|MB_PATTERN,1},\n  {MB_CLASS4|MB_PATTERN,1}, {MB_CLASS4|MB_PATTERN,1}\n};\n\n/* Table B-6, mb_type in spat. scal. P-pictures, codes 0010..11xx */\nmpeg3_VLCtab_t mpeg3_spPMBtab0[16] =\n{\n  {MPERROR,0},{MPERROR,0},\n  {MB_FORWARD,4},\n  {MB_WEIGHT|MB_FORWARD,4},\n  {MB_QUANT|MB_FORWARD|MB_PATTERN,3}, {MB_QUANT|MB_FORWARD|MB_PATTERN,3},\n  {MB_WEIGHT|MB_FORWARD|MB_PATTERN,3}, {MB_WEIGHT|MB_FORWARD|MB_PATTERN,3},\n  {MB_FORWARD|MB_PATTERN,2}, {MB_FORWARD|MB_PATTERN,2},\n  {MB_FORWARD|MB_PATTERN,2}, {MB_FORWARD|MB_PATTERN,2},\n  {MB_WEIGHT|MB_QUANT|MB_FORWARD|MB_PATTERN,2},\n  {MB_WEIGHT|MB_QUANT|MB_FORWARD|MB_PATTERN,2},\n  {MB_WEIGHT|MB_QUANT|MB_FORWARD|MB_PATTERN,2},\n  {MB_WEIGHT|MB_QUANT|MB_FORWARD|MB_PATTERN,2}\n};\n\n/* Table B-6, mb_type in spat. scal. P-pictures, codes 0000010..000111x */\nmpeg3_VLCtab_t mpeg3_spPMBtab1[16] = {\n  {MPERROR,0},{MPERROR,0},\n  {MB_CLASS4|MB_QUANT|MB_PATTERN,7},\n  {MB_CLASS4,7},\n  {MB_PATTERN,7},\n  {MB_CLASS4|MB_PATTERN,7},\n  {MB_QUANT|MB_INTRA,7},\n  {MB_INTRA,7},\n  {MB_QUANT|MB_PATTERN,6}, {MB_QUANT|MB_PATTERN,6},\n  {MB_WEIGHT|MB_QUANT|MB_PATTERN,6}, {MB_WEIGHT|MB_QUANT|MB_PATTERN,6},\n  {MB_WEIGHT,6}, {MB_WEIGHT,6},\n  {MB_WEIGHT|MB_PATTERN,6}, {MB_WEIGHT|MB_PATTERN,6}\n};\n\n/* Table B-7, mb_type in spat. scal. B-pictures, codes 0010..11xx */\nmpeg3_VLCtab_t mpeg3_spBMBtab0[14] = {\n  {MB_FORWARD,4},\n  {MB_FORWARD|MB_PATTERN,4},\n  {MB_BACKWARD,3}, {MB_BACKWARD,3},\n  {MB_BACKWARD|MB_PATTERN,3}, {MB_BACKWARD|MB_PATTERN,3},\n  {MB_FORWARD|MB_BACKWARD,2}, {MB_FORWARD|MB_BACKWARD,2},\n  {MB_FORWARD|MB_BACKWARD,2}, {MB_FORWARD|MB_BACKWARD,2},\n  {MB_FORWARD|MB_BACKWARD|MB_PATTERN,2},\n  {MB_FORWARD|MB_BACKWARD|MB_PATTERN,2},\n  {MB_FORWARD|MB_BACKWARD|MB_PATTERN,2},\n  {MB_FORWARD|MB_BACKWARD|MB_PATTERN,2}\n};\n\n/* Table B-7, mb_type in spat. scal. B-pictures, codes 0000100..000111x */\nmpeg3_VLCtab_t mpeg3_spBMBtab1[12] = {\n  {MB_QUANT|MB_FORWARD|MB_PATTERN,7},\n  {MB_QUANT|MB_BACKWARD|MB_PATTERN,7},\n  {MB_INTRA,7},\n  {MB_QUANT|MB_FORWARD|MB_BACKWARD|MB_PATTERN,7},\n  {MB_WEIGHT|MB_FORWARD,6}, {MB_WEIGHT|MB_FORWARD,6},\n  {MB_WEIGHT|MB_FORWARD|MB_PATTERN,6}, {MB_WEIGHT|MB_FORWARD|MB_PATTERN,6},\n  {MB_WEIGHT|MB_BACKWARD,6}, {MB_WEIGHT|MB_BACKWARD,6},\n  {MB_WEIGHT|MB_BACKWARD|MB_PATTERN,6}, {MB_WEIGHT|MB_BACKWARD|MB_PATTERN,6}\n};\n\n/* Table B-7, mb_type in spat. scal. B-pictures, codes 00000100x..000001111 */\nmpeg3_VLCtab_t mpeg3_spBMBtab2[8] = {\n  {MB_QUANT|MB_INTRA,8}, {MB_QUANT|MB_INTRA,8},\n  {MB_WEIGHT|MB_QUANT|MB_FORWARD|MB_PATTERN,8},\n  {MB_WEIGHT|MB_QUANT|MB_FORWARD|MB_PATTERN,8},\n  {MB_WEIGHT|MB_QUANT|MB_BACKWARD|MB_PATTERN,9},\n  {MB_CLASS4|MB_QUANT|MB_PATTERN,9},\n  {MB_CLASS4,9},\n  {MB_CLASS4|MB_PATTERN,9}\n};\n\n/* Table B-8, mb_type in spat. scal. B-pictures, codes 001..1xx */\nmpeg3_VLCtab_t mpeg3_SNRMBtab[8] = {\n  {MPERROR,0},\n  {0,3},\n  {MB_QUANT|MB_PATTERN,2}, {MB_QUANT|MB_PATTERN,2},\n  {MB_PATTERN,1}, {MB_PATTERN,1}, {MB_PATTERN,1}, {MB_PATTERN,1}\n};\n\n/* Table B-10, motion_code, codes 0001 ... 01xx */\nmpeg3_VLCtab_t mpeg3_MVtab0[8] =\n{ {MPERROR,0}, {3,3}, {2,2}, {2,2}, {1,1}, {1,1}, {1,1}, {1,1}\n};\n\n/* Table B-10, motion_code, codes 0000011 ... 000011x */\nmpeg3_VLCtab_t mpeg3_MVtab1[8] =\n{ {MPERROR,0}, {MPERROR,0}, {MPERROR,0}, {7,6}, {6,6}, {5,6}, {4,5}, {4,5}\n};\n\n/* Table B-10, motion_code, codes 0000001100 ... 000001011x */\nmpeg3_VLCtab_t mpeg3_MVtab2[12] =\n{ {16,9}, {15,9}, {14,9}, {13,9},\n  {12,9}, {11,9}, {10,8}, {10,8},\n  {9,8},  {9,8},  {8,8},  {8,8}\n};\n\n/* Table B-9, coded_block_pattern, codes 01000 ... 111xx */\nmpeg3_VLCtab_t mpeg3_CBPtab0[32] =\n{ {MPERROR,0}, {MPERROR,0}, {MPERROR,0}, {MPERROR,0},\n  {MPERROR,0}, {MPERROR,0}, {MPERROR,0}, {MPERROR,0},\n  {62,5}, {2,5},  {61,5}, {1,5},  {56,5}, {52,5}, {44,5}, {28,5},\n  {40,5}, {20,5}, {48,5}, {12,5}, {32,4}, {32,4}, {16,4}, {16,4},\n  {8,4},  {8,4},  {4,4},  {4,4},  {60,3}, {60,3}, {60,3}, {60,3}\n};\n\n/* Table B-9, coded_block_pattern, codes 00000100 ... 001111xx */\nmpeg3_VLCtab_t mpeg3_CBPtab1[64] =\n{ {MPERROR,0}, {MPERROR,0}, {MPERROR,0}, {MPERROR,0},\n  {58,8}, {54,8}, {46,8}, {30,8},\n  {57,8}, {53,8}, {45,8}, {29,8}, {38,8}, {26,8}, {37,8}, {25,8},\n  {43,8}, {23,8}, {51,8}, {15,8}, {42,8}, {22,8}, {50,8}, {14,8},\n  {41,8}, {21,8}, {49,8}, {13,8}, {35,8}, {19,8}, {11,8}, {7,8},\n  {34,7}, {34,7}, {18,7}, {18,7}, {10,7}, {10,7}, {6,7},  {6,7},\n  {33,7}, {33,7}, {17,7}, {17,7}, {9,7},  {9,7},  {5,7},  {5,7},\n  {63,6}, {63,6}, {63,6}, {63,6}, {3,6},  {3,6},  {3,6},  {3,6},\n  {36,6}, {36,6}, {36,6}, {36,6}, {24,6}, {24,6}, {24,6}, {24,6}\n};\n\n/* Table B-9, coded_block_pattern, codes 000000001 ... 000000111 */\nmpeg3_VLCtab_t mpeg3_CBPtab2[8] =\n{ {MPERROR,0}, {0,9}, {39,9}, {27,9}, {59,9}, {55,9}, {47,9}, {31,9}\n};\n\n/* Table B-1, macroblock_address_increment, codes 00010 ... 011xx */\nmpeg3_VLCtab_t mpeg3_MBAtab1[16] =\n{ {MPERROR,0}, {MPERROR,0}, {7,5}, {6,5}, {5,4}, {5,4}, {4,4}, {4,4},\n  {3,3}, {3,3}, {3,3}, {3,3}, {2,3}, {2,3}, {2,3}, {2,3}\n};\n\n/* Table B-1, macroblock_address_increment, codes 00000011000 ... 0000111xxxx */\nmpeg3_VLCtab_t mpeg3_MBAtab2[104] =\n{\n  {33,11}, {32,11}, {31,11}, {30,11}, {29,11}, {28,11}, {27,11}, {26,11},\n  {25,11}, {24,11}, {23,11}, {22,11}, {21,10}, {21,10}, {20,10}, {20,10},\n  {19,10}, {19,10}, {18,10}, {18,10}, {17,10}, {17,10}, {16,10}, {16,10},\n  {15,8},  {15,8},  {15,8},  {15,8},  {15,8},  {15,8},  {15,8},  {15,8},\n  {14,8},  {14,8},  {14,8},  {14,8},  {14,8},  {14,8},  {14,8},  {14,8},\n  {13,8},  {13,8},  {13,8},  {13,8},  {13,8},  {13,8},  {13,8},  {13,8},\n  {12,8},  {12,8},  {12,8},  {12,8},  {12,8},  {12,8},  {12,8},  {12,8},\n  {11,8},  {11,8},  {11,8},  {11,8},  {11,8},  {11,8},  {11,8},  {11,8},\n  {10,8},  {10,8},  {10,8},  {10,8},  {10,8},  {10,8},  {10,8},  {10,8},\n  {9,7},   {9,7},   {9,7},   {9,7},   {9,7},   {9,7},   {9,7},   {9,7},\n  {9,7},   {9,7},   {9,7},   {9,7},   {9,7},   {9,7},   {9,7},   {9,7},\n  {8,7},   {8,7},   {8,7},   {8,7},   {8,7},   {8,7},   {8,7},   {8,7},\n  {8,7},   {8,7},   {8,7},   {8,7},   {8,7},   {8,7},   {8,7},   {8,7}\n};\n\n/* Table B-12, dct_dc_size_luminance, codes 00xxx ... 11110 */\nmpeg3_VLCtab_t mpeg3_DClumtab0[32] =\n{ {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2},\n  {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2},\n  {0, 3}, {0, 3}, {0, 3}, {0, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3},\n  {4, 3}, {4, 3}, {4, 3}, {4, 3}, {5, 4}, {5, 4}, {6, 5}, {MPERROR, 0}\n};\n\n/* Table B-12, dct_dc_size_luminance, codes 111110xxx ... 111111111 */\nmpeg3_VLCtab_t mpeg3_DClumtab1[16] =\n{ {7, 6}, {7, 6}, {7, 6}, {7, 6}, {7, 6}, {7, 6}, {7, 6}, {7, 6},\n  {8, 7}, {8, 7}, {8, 7}, {8, 7}, {9, 8}, {9, 8}, {10,9}, {11,9}\n};\n\n/* Table B-13, dct_dc_size_chrominance, codes 00xxx ... 11110 */\nmpeg3_VLCtab_t mpeg3_DCchromtab0[32] =\n{ {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2},\n  {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2},\n  {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2},\n  {3, 3}, {3, 3}, {3, 3}, {3, 3}, {4, 4}, {4, 4}, {5, 5}, {MPERROR, 0}\n};\n\n/* Table B-13, dct_dc_size_chrominance, codes 111110xxxx ... 1111111111 */\nmpeg3_VLCtab_t mpeg3_DCchromtab1[32] =\n{ {6, 6}, {6, 6}, {6, 6}, {6, 6}, {6, 6}, {6, 6}, {6, 6}, {6, 6},\n  {6, 6}, {6, 6}, {6, 6}, {6, 6}, {6, 6}, {6, 6}, {6, 6}, {6, 6},\n  {7, 7}, {7, 7}, {7, 7}, {7, 7}, {7, 7}, {7, 7}, {7, 7}, {7, 7},\n  {8, 8}, {8, 8}, {8, 8}, {8, 8}, {9, 9}, {9, 9}, {10,10}, {11,10}\n};\n\n/* Table B-14, DCT coefficients table zero,\n * codes 0100 ... 1xxx (used for first (DC) coefficient)\n */\nmpeg3_DCTtab_t mpeg3_DCTtabfirst[12] =\n{\n  {0,2,4}, {2,1,4}, {1,1,3}, {1,1,3},\n  {0,1,1}, {0,1,1}, {0,1,1}, {0,1,1},\n  {0,1,1}, {0,1,1}, {0,1,1}, {0,1,1}\n};\n\n/* Table B-14, DCT coefficients table zero,\n * codes 0100 ... 1xxx (used for all other coefficients)\n */\nmpeg3_DCTtab_t mpeg3_DCTtabnext[12] =\n{\n  {0,2,4},  {2,1,4},  {1,1,3},  {1,1,3},\n  {64,0,2}, {64,0,2}, {64,0,2}, {64,0,2}, /* EOB */\n  {0,1,2},  {0,1,2},  {0,1,2},  {0,1,2}\n};\n\n/* Table B-14, DCT coefficients table zero,\n * codes 000001xx ... 00111xxx\n */\nmpeg3_DCTtab_t mpeg3_DCTtab0[60] =\n{\n  {65,0,6}, {65,0,6}, {65,0,6}, {65,0,6}, /* Escape */\n  {2,2,7}, {2,2,7}, {9,1,7}, {9,1,7},\n  {0,4,7}, {0,4,7}, {8,1,7}, {8,1,7},\n  {7,1,6}, {7,1,6}, {7,1,6}, {7,1,6},\n  {6,1,6}, {6,1,6}, {6,1,6}, {6,1,6},\n  {1,2,6}, {1,2,6}, {1,2,6}, {1,2,6},\n  {5,1,6}, {5,1,6}, {5,1,6}, {5,1,6},\n  {13,1,8}, {0,6,8}, {12,1,8}, {11,1,8},\n  {3,2,8}, {1,3,8}, {0,5,8}, {10,1,8},\n  {0,3,5}, {0,3,5}, {0,3,5}, {0,3,5},\n  {0,3,5}, {0,3,5}, {0,3,5}, {0,3,5},\n  {4,1,5}, {4,1,5}, {4,1,5}, {4,1,5},\n  {4,1,5}, {4,1,5}, {4,1,5}, {4,1,5},\n  {3,1,5}, {3,1,5}, {3,1,5}, {3,1,5},\n  {3,1,5}, {3,1,5}, {3,1,5}, {3,1,5}\n};\n\n/* Table B-15, DCT coefficients table one,\n * codes 000001xx ... 11111111\n*/\nmpeg3_DCTtab_t mpeg3_DCTtab0a[252] =\n{\n  {65,0,6}, {65,0,6}, {65,0,6}, {65,0,6}, /* Escape */\n  {7,1,7}, {7,1,7}, {8,1,7}, {8,1,7},\n  {6,1,7}, {6,1,7}, {2,2,7}, {2,2,7},\n  {0,7,6}, {0,7,6}, {0,7,6}, {0,7,6},\n  {0,6,6}, {0,6,6}, {0,6,6}, {0,6,6},\n  {4,1,6}, {4,1,6}, {4,1,6}, {4,1,6},\n  {5,1,6}, {5,1,6}, {5,1,6}, {5,1,6},\n  {1,5,8}, {11,1,8}, {0,11,8}, {0,10,8},\n  {13,1,8}, {12,1,8}, {3,2,8}, {1,4,8},\n  {2,1,5}, {2,1,5}, {2,1,5}, {2,1,5},\n  {2,1,5}, {2,1,5}, {2,1,5}, {2,1,5},\n  {1,2,5}, {1,2,5}, {1,2,5}, {1,2,5},\n  {1,2,5}, {1,2,5}, {1,2,5}, {1,2,5},\n  {3,1,5}, {3,1,5}, {3,1,5}, {3,1,5},\n  {3,1,5}, {3,1,5}, {3,1,5}, {3,1,5},\n  {1,1,3}, {1,1,3}, {1,1,3}, {1,1,3},\n  {1,1,3}, {1,1,3}, {1,1,3}, {1,1,3},\n  {1,1,3}, {1,1,3}, {1,1,3}, {1,1,3},\n  {1,1,3}, {1,1,3}, {1,1,3}, {1,1,3},\n  {1,1,3}, {1,1,3}, {1,1,3}, {1,1,3},\n  {1,1,3}, {1,1,3}, {1,1,3}, {1,1,3},\n  {1,1,3}, {1,1,3}, {1,1,3}, {1,1,3},\n  {1,1,3}, {1,1,3}, {1,1,3}, {1,1,3},\n  {64,0,4}, {64,0,4}, {64,0,4}, {64,0,4}, /* EOB */\n  {64,0,4}, {64,0,4}, {64,0,4}, {64,0,4},\n  {64,0,4}, {64,0,4}, {64,0,4}, {64,0,4},\n  {64,0,4}, {64,0,4}, {64,0,4}, {64,0,4},\n  {0,3,4}, {0,3,4}, {0,3,4}, {0,3,4},\n  {0,3,4}, {0,3,4}, {0,3,4}, {0,3,4},\n  {0,3,4}, {0,3,4}, {0,3,4}, {0,3,4},\n  {0,3,4}, {0,3,4}, {0,3,4}, {0,3,4},\n  {0,1,2}, {0,1,2}, {0,1,2}, {0,1,2},\n  {0,1,2}, {0,1,2}, {0,1,2}, {0,1,2},\n  {0,1,2}, {0,1,2}, {0,1,2}, {0,1,2},\n  {0,1,2}, {0,1,2}, {0,1,2}, {0,1,2},\n  {0,1,2}, {0,1,2}, {0,1,2}, {0,1,2},\n  {0,1,2}, {0,1,2}, {0,1,2}, {0,1,2},\n  {0,1,2}, {0,1,2}, {0,1,2}, {0,1,2},\n  {0,1,2}, {0,1,2}, {0,1,2}, {0,1,2},\n  {0,1,2}, {0,1,2}, {0,1,2}, {0,1,2},\n  {0,1,2}, {0,1,2}, {0,1,2}, {0,1,2},\n  {0,1,2}, {0,1,2}, {0,1,2}, {0,1,2},\n  {0,1,2}, {0,1,2}, {0,1,2}, {0,1,2},\n  {0,1,2}, {0,1,2}, {0,1,2}, {0,1,2},\n  {0,1,2}, {0,1,2}, {0,1,2}, {0,1,2},\n  {0,1,2}, {0,1,2}, {0,1,2}, {0,1,2},\n  {0,1,2}, {0,1,2}, {0,1,2}, {0,1,2},\n  {0,2,3}, {0,2,3}, {0,2,3}, {0,2,3},\n  {0,2,3}, {0,2,3}, {0,2,3}, {0,2,3},\n  {0,2,3}, {0,2,3}, {0,2,3}, {0,2,3},\n  {0,2,3}, {0,2,3}, {0,2,3}, {0,2,3},\n  {0,2,3}, {0,2,3}, {0,2,3}, {0,2,3},\n  {0,2,3}, {0,2,3}, {0,2,3}, {0,2,3},\n  {0,2,3}, {0,2,3}, {0,2,3}, {0,2,3},\n  {0,2,3}, {0,2,3}, {0,2,3}, {0,2,3},\n  {0,4,5}, {0,4,5}, {0,4,5}, {0,4,5},\n  {0,4,5}, {0,4,5}, {0,4,5}, {0,4,5},\n  {0,5,5}, {0,5,5}, {0,5,5}, {0,5,5},\n  {0,5,5}, {0,5,5}, {0,5,5}, {0,5,5},\n  {9,1,7}, {9,1,7}, {1,3,7}, {1,3,7},\n  {10,1,7}, {10,1,7}, {0,8,7}, {0,8,7},\n  {0,9,7}, {0,9,7}, {0,12,8}, {0,13,8},\n  {2,3,8}, {4,2,8}, {0,14,8}, {0,15,8}\n};\n\n/* Table B-14, DCT coefficients table zero,\n * codes 0000001000 ... 0000001111\n */\nmpeg3_DCTtab_t mpeg3_DCTtab1[8] =\n{\n  {16,1,10}, {5,2,10}, {0,7,10}, {2,3,10},\n  {1,4,10}, {15,1,10}, {14,1,10}, {4,2,10}\n};\n\n/* Table B-15, DCT coefficients table one,\n * codes 000000100x ... 000000111x\n */\nmpeg3_DCTtab_t mpeg3_DCTtab1a[8] =\n{\n  {5,2,9}, {5,2,9}, {14,1,9}, {14,1,9},\n  {2,4,10}, {16,1,10}, {15,1,9}, {15,1,9}\n};\n\n/* Table B-14/15, DCT coefficients table zero / one,\n * codes 000000010000 ... 000000011111\n */\nmpeg3_DCTtab_t mpeg3_DCTtab2[16] =\n{\n  {0,11,12}, {8,2,12}, {4,3,12}, {0,10,12},\n  {2,4,12}, {7,2,12}, {21,1,12}, {20,1,12},\n  {0,9,12}, {19,1,12}, {18,1,12}, {1,5,12},\n  {3,3,12}, {0,8,12}, {6,2,12}, {17,1,12}\n};\n\n/* Table B-14/15, DCT coefficients table zero / one,\n * codes 0000000010000 ... 0000000011111\n */\nmpeg3_DCTtab_t mpeg3_DCTtab3[16] =\n{\n  {10,2,13}, {9,2,13}, {5,3,13}, {3,4,13},\n  {2,5,13}, {1,7,13}, {1,6,13}, {0,15,13},\n  {0,14,13}, {0,13,13}, {0,12,13}, {26,1,13},\n  {25,1,13}, {24,1,13}, {23,1,13}, {22,1,13}\n};\n\n/* Table B-14/15, DCT coefficients table zero / one,\n * codes 00000000010000 ... 00000000011111\n */\nmpeg3_DCTtab_t mpeg3_DCTtab4[16] =\n{\n  {0,31,14}, {0,30,14}, {0,29,14}, {0,28,14},\n  {0,27,14}, {0,26,14}, {0,25,14}, {0,24,14},\n  {0,23,14}, {0,22,14}, {0,21,14}, {0,20,14},\n  {0,19,14}, {0,18,14}, {0,17,14}, {0,16,14}\n};\n\n/* Table B-14/15, DCT coefficients table zero / one,\n * codes 000000000010000 ... 000000000011111\n */\nmpeg3_DCTtab_t mpeg3_DCTtab5[16] =\n{\n  {0,40,15}, {0,39,15}, {0,38,15}, {0,37,15},\n  {0,36,15}, {0,35,15}, {0,34,15}, {0,33,15},\n  {0,32,15}, {1,14,15}, {1,13,15}, {1,12,15},\n  {1,11,15}, {1,10,15}, {1,9,15}, {1,8,15}\n};\n\n/* Table B-14/15, DCT coefficients table zero / one,\n * codes 0000000000010000 ... 0000000000011111\n */\nmpeg3_DCTtab_t mpeg3_DCTtab6[16] =\n{\n  {1,18,16}, {1,17,16}, {1,16,16}, {1,15,16},\n  {6,3,16}, {16,2,16}, {15,2,16}, {14,2,16},\n  {13,2,16}, {12,2,16}, {11,2,16}, {31,1,16},\n  {30,1,16}, {29,1,16}, {28,1,16}, {27,1,16}\n};\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/video/vlc.h",
    "content": "  /*  Changed Sept 15th by John M McIntosh to support Macintosh & Squeak\n */\n#ifndef VLC_H\n#define VLC_H\n\n/* variable length code tables                                    */\n\ntypedef struct {\n  char val, len;\n} mpeg3_VLCtab_t;\n\ntypedef struct {\n  char run, level, len;\n} mpeg3_DCTtab_t;\n\n/* Added 03/38/96 by Alex de Jong : avoid IRIX GNU warning */\n//#ifdef ERROR\n//#undef ERROR\n//#define ERROR 99\n//#endif\n\n/* Table B-3, mb_type in P-pictures, codes 001..1xx */\nextern mpeg3_VLCtab_t mpeg3_PMBtab0[8];\n\n/* Table B-3, mb_type in P-pictures, codes 000001..00011x */\nextern mpeg3_VLCtab_t mpeg3_PMBtab1[8];\n\n/* Table B-4, mb_type in B-pictures, codes 0010..11xx */\nextern mpeg3_VLCtab_t mpeg3_BMBtab0[16];\n\n/* Table B-4, mb_type in B-pictures, codes 000001..00011x */\nextern mpeg3_VLCtab_t mpeg3_BMBtab1[8];\n\n/* Table B-5, mb_type in spat. scal. I-pictures, codes 0001..1xxx */\nextern mpeg3_VLCtab_t mpeg3_spIMBtab[16];\n\n/* Table B-6, mb_type in spat. scal. P-pictures, codes 0010..11xx */\nextern mpeg3_VLCtab_t mpeg3_spPMBtab0[16];\n\n/* Table B-6, mb_type in spat. scal. P-pictures, codes 0000010..000111x */\nextern mpeg3_VLCtab_t mpeg3_spPMBtab1[16];\n\n/* Table B-7, mb_type in spat. scal. B-pictures, codes 0010..11xx */\nextern mpeg3_VLCtab_t mpeg3_spBMBtab0[14];\n\n/* Table B-7, mb_type in spat. scal. B-pictures, codes 0000100..000111x */\nextern mpeg3_VLCtab_t mpeg3_spBMBtab1[12];\n\n/* Table B-7, mb_type in spat. scal. B-pictures, codes 00000100x..000001111 */\nextern mpeg3_VLCtab_t mpeg3_spBMBtab2[8];\n\n/* Table B-8, mb_type in spat. scal. B-pictures, codes 001..1xx */\nextern mpeg3_VLCtab_t mpeg3_SNRMBtab[8];\n\n/* Table B-10, motion_code, codes 0001 ... 01xx */\nextern mpeg3_VLCtab_t mpeg3_MVtab0[8];\n\n/* Table B-10, motion_code, codes 0000011 ... 000011x */\nextern mpeg3_VLCtab_t mpeg3_MVtab1[8];\n\n/* Table B-10, motion_code, codes 0000001100 ... 000001011x */\nextern mpeg3_VLCtab_t mpeg3_MVtab2[12];\n\n/* Table B-9, coded_block_pattern, codes 01000 ... 111xx */\nextern mpeg3_VLCtab_t mpeg3_CBPtab0[32];\n\n/* Table B-9, coded_block_pattern, codes 00000100 ... 001111xx */\nextern mpeg3_VLCtab_t mpeg3_CBPtab1[64];\n\n/* Table B-9, coded_block_pattern, codes 000000001 ... 000000111 */\nextern mpeg3_VLCtab_t mpeg3_CBPtab2[8];\n\n/* Table B-1, macroblock_address_increment, codes 00010 ... 011xx */\nextern mpeg3_VLCtab_t mpeg3_MBAtab1[16];\n\n/* Table B-1, macroblock_address_increment, codes 00000011000 ... 0000111xxxx */\nextern mpeg3_VLCtab_t mpeg3_MBAtab2[104];\n\n/* Table B-12, dct_dc_size_luminance, codes 00xxx ... 11110 */\nextern mpeg3_VLCtab_t mpeg3_DClumtab0[32];\n\n/* Table B-12, dct_dc_size_luminance, codes 111110xxx ... 111111111 */\nextern mpeg3_VLCtab_t mpeg3_DClumtab1[16];\n\n/* Table B-13, dct_dc_size_chrominance, codes 00xxx ... 11110 */\nextern mpeg3_VLCtab_t mpeg3_DCchromtab0[32];\n\n/* Table B-13, dct_dc_size_chrominance, codes 111110xxxx ... 1111111111 */\nextern mpeg3_VLCtab_t mpeg3_DCchromtab1[32];\n\n/* Table B-14, DCT coefficients table zero,\n * codes 0100 ... 1xxx (used for first (DC) coefficient)\n */\nextern mpeg3_DCTtab_t mpeg3_DCTtabfirst[12];\n\n/* Table B-14, DCT coefficients table zero,\n * codes 0100 ... 1xxx (used for all other coefficients)\n */\nextern mpeg3_DCTtab_t mpeg3_DCTtabnext[12];\n\n/* Table B-14, DCT coefficients table zero,\n * codes 000001xx ... 00111xxx\n */\nextern mpeg3_DCTtab_t mpeg3_DCTtab0[60];\n\n/* Table B-15, DCT coefficients table one,\n * codes 000001xx ... 11111111\n*/\nextern mpeg3_DCTtab_t mpeg3_DCTtab0a[252];\n\n/* Table B-14, DCT coefficients table zero,\n * codes 0000001000 ... 0000001111\n */\nextern mpeg3_DCTtab_t mpeg3_DCTtab1[8];\n\n/* Table B-15, DCT coefficients table one,\n * codes 000000100x ... 000000111x\n */\nextern mpeg3_DCTtab_t mpeg3_DCTtab1a[8];\n\n/* Table B-14/15, DCT coefficients table zero / one,\n * codes 000000010000 ... 000000011111\n */\nextern mpeg3_DCTtab_t mpeg3_DCTtab2[16];\n\n/* Table B-14/15, DCT coefficients table zero / one,\n * codes 0000000010000 ... 0000000011111\n */\nextern mpeg3_DCTtab_t mpeg3_DCTtab3[16];\n\n/* Table B-14/15, DCT coefficients table zero / one,\n * codes 00000000010000 ... 00000000011111\n */\nextern mpeg3_DCTtab_t mpeg3_DCTtab4[16];\n\n/* Table B-14/15, DCT coefficients table zero / one,\n * codes 000000000010000 ... 000000000011111\n */\nextern mpeg3_DCTtab_t mpeg3_DCTtab5[16];\n\n/* Table B-14/15, DCT coefficients table zero / one,\n * codes 0000000000010000 ... 0000000000011111\n */\nextern mpeg3_DCTtab_t mpeg3_DCTtab6[16];\n\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Mpeg3Plugin/libmpeg/video/worksheet.c",
    "content": "#include <stdio.h>\n#include <stdlib.h>\n#include <time.h>\n\n\nstatic long long  mpeg3_MMX_601_Y_COEF = 0x0000004000400040;\n\ninline void mpeg3_601_mmx(unsigned long y, \n\t\tunsigned long *output)\n{\n\t__asm {\n/* Output will be 0x00rrggbb */\n\tmovd (y), %%mm0;          /* Load y   0x00000000000000yy */\n/*\tpmullw mpeg3_MMX_601_Y_COEF, %%mm0;   // Scale y   0x00000000000000yy */\n \tpsllw $6, %%mm0;                /* Shift y coeffs 0x0000yyy0yyy0yyy0 */\n\tmovd %%mm0, (output);          /* Store output */\n\t}\n}\n\n\nint main(int argc, char *argv[])\n{\n\tunsigned char output[1024];\n\n\tmemset(output, 0, 1024);\n\tmpeg3_601_mmx(1, (unsigned long*)output);\n\tprintf(\"%02x%02x\\n\", *(unsigned char*)&output[1], *(unsigned char*)&output[0]);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/PrintJobPlugin/PrintJobPlugin.h",
    "content": "#if defined(macintoshSqueak)\n#include \"sqMacPrinting.h\"\n#else\n#include \"sqPrinting.h\"\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/PseudoTTYPlugin/PseudoTTYPlugin.h",
    "content": "#include \"../AsynchFilePlugin/AsynchFilePlugin.h\"\n\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/QuicktimePlugin/QuicktimePlugin.h",
    "content": "/*\n *  QuicktimePlugin.h\n *  SqueakQuicktime\n *\n *  Created by John M McIntosh on 17/01/06.\n *  Copyright 2006 Corporate Smalltalk Consulting ltd.  All rights reserved, published under the Squeak-L licence\n *\n */\n\n\nvoid SetupSurface();\nint sqQuicktimeInitialize();\nint sqQuicktimeShutdown();\nlong stQuicktimeSetSurfacewidthheightrowBytesdepthmovie(char * buffer, int width, int height, int rowBytes, int depth, void *movie);\nint stQuicktimeDestroy(int sqHandle);\nint stQuicktimeSetSemaphorefor(int index, int sqHandle);\nint stQuicktimeClearSemaphore(int sqHandle);\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/RePlugin/RePlugin3-Fixes.1.cs",
    "content": "'From Squeak 3.2 of 11 July 2002 [latest update: #4917] on 17 August 2002 at 6:10:11 pm'!\n\"Change Set:\t\tRePlugin3-Fixes\nDate:\t\t\t17 August 2002\nAuthor:\t\t\ttim@sumeru.stanford.edu\n\nSome small fixes to RePlugin3 to allow compiling on Acorn\"!\n\n\n!RePlugin methodsFor: 're primitives' stamp: 'tpr 8/17/2002 18:00'!\nprimPCREExec\n\n\"<rcvr primPCREExec: searchObject>, where rcvr is an object with instance variables:\n\n\t'patternStr compileFlags pcrePtr extraPtr errorStr errorOffset matchFlags'\t\n\nApply the regular expression (stored in <pcrePtr> and <extratr>, generated from calls to primPCRECompile), to smalltalk String searchObject using <matchOptions>.  If there is no match, answer nil.  Otherwise answer a ByteArray of offsets representing the results of the match.\"\n\n\t| searchObject searchBuffer length  result matchSpacePtr matchSpaceSize |\n\tself export: true.\n\tself var:#searchBuffer\tdeclareC: 'char *searchBuffer'.\n\tself var:#matchSpacePtr\tdeclareC: 'int *matchSpacePtr'.\n\tself var:#result\t\t\tdeclareC: 'int result'.\n\t\n\t\"Load Parameters\"\n\tsearchObject _ interpreterProxy stackObjectValue: 0.\t\n\tsearchBuffer _ interpreterProxy arrayValueOf: searchObject.\n\tlength _ interpreterProxy byteSizeOf: searchObject.\n\tself loadRcvrFromStackAt: 1.\n\t\"Load Instance Variables\"\n\tpcrePtr _ self rcvrPCREBufferPtr.\n\textraPtr _ self rcvrExtraPtr.\n\tmatchFlags _ self rcvrMatchFlags.\n\tmatchSpacePtr _ self rcvrMatchSpacePtr.\n\tmatchSpaceSize _ self rcvrMatchSpaceSize.\n\n\tinterpreterProxy failed ifTrue:[^ nil].\n\t\n\tresult _ self \n\t\tcCode: 'pcre_exec((pcre *)pcrePtr, (pcre_extra *)extraPtr, \n\t\t\t\tsearchBuffer, length, 0, matchFlags, matchSpacePtr, matchSpaceSize)'.\n\n\tinterpreterProxy pop: 2; pushInteger: result.\n\n\t\"empty call so compiler doesn't bug me about variables not used\"\n\tself touch: searchBuffer; touch: matchSpacePtr; touch: matchSpaceSize; touch: length\n! !\n\n!RePlugin methodsFor: 're primitives' stamp: 'tpr 8/17/2002 18:00'!\nprimPCREExecfromto\n\n\"<rcvr primPCREExec: searchObject> from: fromInteger to: toInteger>, where rcvr is an object with instance variables:\n\n\t'patternStr compileFlags pcrePtr extraPtr errorStr errorOffset matchFlags'\t\n\nApply the regular expression (stored in <pcrePtr> and <extratr>, generated from calls to primPCRECompile), to smalltalk String searchObject using <matchOptions>, beginning at offset <fromInteger> and continuing until offset <toInteger>.  If there is no match, answer nil.  Otherwise answer a ByteArray of offsets representing the results of the match.\"\n\n\t| searchObject searchBuffer length  result matchSpacePtr matchSpaceSize fromInteger toInteger |\n\tself export: true.\n\tself var:#searchBuffer\tdeclareC: 'char *searchBuffer'.\n\tself var:#fromInteger declareC: 'int fromInteger'.\n\tself var:#toInteger declareC: 'int toInteger'.\n\tself var:#matchSpacePtr\tdeclareC: 'int *matchSpacePtr'.\n\tself var:#result\t\t\tdeclareC: 'int result'.\n\t\n\t\"Load Parameters\"\n\ttoInteger _ interpreterProxy stackIntegerValue: 0.\n\tfromInteger _ interpreterProxy stackIntegerValue: 1.\n\tsearchObject _ interpreterProxy stackObjectValue: 2.\t\n\tsearchBuffer _ interpreterProxy arrayValueOf: searchObject.\n\tlength _ interpreterProxy byteSizeOf: searchObject.\n\tself loadRcvrFromStackAt: 3.\n\n\t\"Validate parameters\"\n\tinterpreterProxy success: (1 <= fromInteger).\n\tinterpreterProxy success: (toInteger<=length).\n\tfromInteger _ fromInteger - 1. \"Smalltalk offsets are 1-based\"\n\tinterpreterProxy success: (fromInteger<=toInteger).\n\n\t\"adjust length, searchBuffer\"\n\tlength _ toInteger - fromInteger.\n\tsearchBuffer _ searchBuffer + fromInteger.\n\n\t\"Load Instance Variables\"\n\tpcrePtr _ self rcvrPCREBufferPtr.\n\textraPtr _ self rcvrExtraPtr.\n\tmatchFlags _ self rcvrMatchFlags.\n\tmatchSpacePtr _ self rcvrMatchSpacePtr.\n\tmatchSpaceSize _ self rcvrMatchSpaceSize.\n\tinterpreterProxy failed ifTrue:[^ nil].\n\t\n\tresult _ self \n\t\tcCode: 'pcre_exec((pcre *)pcrePtr, (pcre_extra *)extraPtr, \n\t\t\t\tsearchBuffer, length, 0, matchFlags, matchSpacePtr, matchSpaceSize)'.\n\tinterpreterProxy pop: 2; pushInteger: result.\n\n\t\"empty call so compiler doesn't bug me about variables not used\"\n\tself touch: searchBuffer; touch: matchSpacePtr; touch: matchSpaceSize; touch: length\n! !\n\n!RePlugin methodsFor: 'rcvr linkage' stamp: 'tpr 8/17/2002 18:01'!\nallocateStringAndSetRcvrErrorStrFromCStr: aCStrBuffer\n\n\t|length errorStrObj errorStrObjPtr |\n\tself var: #aCStrBuffer declareC: 'const char *aCStrBuffer'.\n\tself var: #errorStrObjPtr declareC: 'void *errorStrObjPtr'.\n\t\"Allocate errorStrObj\"\n\tlength _ self cCode: 'strlen(aCStrBuffer)'.\n\terrorStrObj _ interpreterProxy\n\t\t\t\tinstantiateClass: (interpreterProxy classString) \n\t\t\t\tindexableSize: length.\n\tself loadRcvrFromStackAt: 0. \"Assume garbage collection after instantiation\"\n\n\t\"Copy aCStrBuffer to errorStrObj's buffer\"\n\terrorStrObjPtr _ interpreterProxy arrayValueOf: errorStrObj.\t\n\tself cCode:'memcpy(errorStrObjPtr,aCStrBuffer,length)'.\n\tself touch: errorStrObjPtr; touch: errorStrObj.\n\t\"Set rcvrErrorStr from errorStrObj and Return\"\n\tself rcvrErrorStrFrom: errorStrObj.\n\t^errorStrObj.! !\n\n\n!RePlugin class methodsFor: 'plugin code generation' stamp: 'tpr 8/17/2002 18:02'!\ndeclareCVarsIn: cg\n\n\tcg addHeaderFile:'\"rePlugin.h\"'.\n\n\t\"Memory Managament Error Checking\"\n\tcg var: 'netMemory' \tdeclareC: 'int netMemory = 0'.\n\tcg var: 'numAllocs' \tdeclareC: 'int numAllocs = 0'.\n\tcg var: 'numFrees' \t\tdeclareC: 'int numFrees = 0'.\n\tcg var: 'lastAlloc'\t\tdeclareC: 'int lastAlloc = 0'.\n\n\t\"The receiver Object Pointer\"\n\tcg var: 'rcvr'\t\t\tdeclareC: 'int rcvr'.\n\n\t\"Instance Variables of Receiver Object\"\n\tcg var: 'patternStr'\t\tdeclareC: 'int patternStr'.\n\tcg var: 'compileFlags'\tdeclareC: 'int compileFlags'.\n\tcg var: 'pcrePtr'\t\tdeclareC: 'int pcrePtr'.\n\tcg var: 'extraPtr'\t\tdeclareC: 'int extraPtr'.\n\tcg var: 'errorStr'\t\tdeclareC: 'int errorStr'.\n\tcg var: 'errorOffset'\tdeclareC: 'int errorOffset'.\n\tcg var: 'matchFlags'\tdeclareC: 'int matchFlags'.\n\n\t\"Support Variables for Access to Receiver Instance Variables\"\n\tcg var: 'patternStrPtr' declareC: 'const char * patternStrPtr'.\n\tcg var: 'errorStrBuffer'\tdeclareC: 'const char * errorStrBuffer'.! !\n\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/RePlugin/RePlugin3-Fixes2.1.cs",
    "content": "'From Squeak3.2gamma of 15 January 2002 [latest update: #4881] on 21 August 2002 at 10:52:51 pm'!\n\"Change Set:\t\tRePlugin3-Fixes2\nDate:\t\t\t21 August 2002\nAuthor:\t\t\tian.piumarta@inria.fr\n\nAdds a cast to one method in RePlugin to avoid a compiler warning.\"!\n\n\n!RePlugin methodsFor: 'rcvr linkage' stamp: 'ikp 8/21/2002 22:40'!\nrcvrExtraPtr\n\n\t|extraObj|\n\tself inline: true.\n\textraObj _ interpreterProxy fetchPointer: 3 ofObject: rcvr.\n\t(extraObj = (interpreterProxy nilObject))\n\t\tifTrue: [^ self cCode: '(int) NULL'].\n\t^self \n\t\tcCoerce:(interpreterProxy arrayValueOf: extraObj)\n\t\tto: 'int'.! !\n\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/RePlugin/RePlugin3.3.1.cs",
    "content": "'From Squeak3.3alpha of 12 January 2002 [latest update: #4934] on 16 August 2002 at 10:56:49 pm'!\n\"Change Set:\t\tRePlugin3.3\nDate:\t\t\t16 August 2002\nAuthor:\t\t\tacg\n\nPerl-Style Regular Expressions in Smalltalk\nby Andrew C. Greenberg\n\nVersion 3.3beta\n\nI.  Regular Expressions in General\n\n\tRegular expressions are a language for specifying text to ease the searching and manipulation of text.  A complete discussion of regular expressions is beyond the scope of this document.  See Jeffrey Friedl, Mastering Regular Expressions, by O'Reilly for a relatively complete.  The regular expressions supported by this package are similar to those presently used in Perl 5.0\u00105 and Python, and are based upon Philip Hazel's excellent PCRE libraries (incorporated almost without change, subject to a free license described in Re aLicenseComment.  Thanks are due to Markus Kohler and Stephen Pair for their assistance in the initial ports of early versions of the Plugin.\n\nAn explanation of the expressions available in this package are summarized in Re aRegexComment, Re anOptionsComment and Re aGlobalSearchComment.\n\nA more detailed description of RePlugin is available downloading the file 'RePluginDoco,' which can be obtained from http://www.gate.net/~werdna/RePlugin.html, into your default directory, and then executing\n\n\t\tUtilities reconstructTextWindowsFromFileNamed: 'RePluginDoco'\n\nII. Overview of the 'Package.'\n\n\tThe following new classes are provided:\n\n\t\tClass\t\t\t\t\tDescription of Instances\n\t\t----------------------\t\t-------------------------------------------------------------------\n\t\tRe\t\t\t\t\t\tA regular expression matching engine\n\t\tReMatch\t\t\t\tResult of a search using Re\n\t\tRePattern\t\t\t\tDeprecated engine class from earlier plugin versions\n\t\tRePlugin\t\t\t\tThe Plugin 'Glue' to the PCRE Library.\n\n\t\tString\t\t\t\t\tVarious new messages were added to String, which are\n\t\t\t\t\t\t\t\tthe principal means for users to access the package. \n\nPluginCodeGenerator has been deleted from the packgage.\n\n\nIII. Some Examples.\n\n\tA. Simple Matching and Querying of Matches\n\n\tTo search a string for matches in a regular expression, use String reMatch:\n\n\t\t'just trying to catch some zzz''s before noon' matchRe: 'z+'\n\nwhich returns true if matched, and false otherwise.  If more information from a positive search result is desired, the method reMatch will return a ReMatch object corresponding to the result.\n\n\t\t'just trying to catch some zzz''s before noon' reMatch: 'z+'\n\nThe match object can be queried in various ways.  For example, to obtain details when parenthetical phrases of a regular expression are captured:\n\n\t\t|m|\n\t\tm _ 'Andy was born on 10/02/1957, and not soon enough!!'\n\t\t\treMatch: '(\\d\\d)/(\\d\\d)/((19|20)?\\d\\d)'.\n\t\tm matches\n\nanswers with:\n\t\n\t\t('10' '02' '1957' '19' )\n\nThe first message answers a ReMatch m representing the result of a search of the string for matches of re (nil would be returned if no match was found).  The third message answered a collection of the parenthetical subgroups matched, each showing the day, month and year as extracted from the string.\n\n\tB. Global Matching and String Substitutions\n\n\tYou can perform global searches to repeatedly search a string for non-overlapping occurrences of a pattern by using reMatch:collect:  For example,\n\n\t\t'this is a test' collectRe: '\\w+'\n\ncan be used to gather a collection of all words in the search string, answering:\n\n\t\tOrderedCollection ('this' 'is' 'a' 'test' )\n\nFor slightly more complex collections, you can use #reMatch:andCollect:  Additionally, you can perform global searches with text substitutions using reMatch:sub:  For example,\n\n\t\t'this is a test' reMatch: '\\w+' andReplace: [:m | '<', (m match), '>']  \n\ncan be used to replace every word in the search string with the word enclosed by matching brackets, answering:\n\n\t\t'<this> <is> <a> <test>'\n\nFurther examples and documentation can be found in the references above, and in the comments and definitions set forth in ReMatch, RePattern and String.\n\"!\n\nObject subclass: #Re\n\tinstanceVariableNames: 'pattern compiledPattern isAnchored isCaseSensitive isDollarEndOnly isDotIncludesNewline isExtended isExtra isMultiline isBeginningOfLine isEndOfLine isGreedy '\n\tclassVariableNames: ''\n\tmodule: #(Werdna Re)!\n\n!Re commentStamp: '<historical>' prior: 0!\nPerl-Style Regular Expressions in Smalltalk\n\nDocumentation\n\nThe documentation category of this method contains substantial documentation on the operation of this Class.\n\n\tRe aGeneralComment\n\tRe aGlobalSearchComment\n\tRe aRegexComment\n\tRe aRegexGoryDetailsComment\n\tRe aVersionsComment\n\tRe anReComment\n\tRe anReOverviewComment\n\n\tRe aLicenseComment\t\n\n\nExamples:\n\n\t(Re on: 'a.*y') search: 'Candy is dandy.'\n\t'a.*y' asRe search: 'Candy is dandy.'\n\t'Candy is dandy' reMatch: 'a.*y'\n\n\t(Re on: '\\w+') searchAndCollect: 'Candy is dandy.'\n\t'\\w+' asRe searchAndCollect: 'Candy is dandy.'\n\t'Candy is dandy.' reMatch: '\\w+' andCollect: [:m | m match]\n\nStructure:\n pattern \t\tString -- the string with the regular expression source code\n compiledPattern RePlugin representing a compiled pattern\n isAnchored\t\tBoolean -- representing an option setting\n is ...\t\t\tBooleans -- for the other options below\n\nList ofcommon public methods:\n\n#opt:\n\n\tsets options using Perl-style string\n\n#beAnchored \t\t\t#beNotAnchored\t\t\t\t#isAnchored\t\t\t#isAnchored:\n#beBeginningOfLine \t#beNotBeginningOfLine \t\t#isBeginningOfLine\t#isBeginningOfLine:\n#beCaseSensitive \t\t#beNotCaseSensitive \t\t\t#isCaseSensitive\t\t#isCaseSensitive:\n#beDollarEndOnly \t\t#beNotDollarEndOnly \t\t#isDollarEndOnly\t#isDollarEndOnly:\n#beDotIncludesNewline \t#beNotDotIncludesNewline \t#isDotIncludesNewLine #isDotIncludesNewline:\n#beEndOfLine \t\t\t#beNotEndOfLine \t\t\t#isEndOfLine\t\t#isEndOfLine:\n#beExtended \t\t\t#beNotExtended \t\t\t\t#isExtended\t\t\t#isExtended:\n#beExtra \t\t\t\t#beNotExtra \t\t\t\t#isExtra\t\t\t\t#isNotExtra:\n#beGreedy \t\t\t\t#beNotGreedy \t\t\t\t#isGreedy\t\t\t#isGreedy:\n#beMultiline \t\t\t#beNotMultiline \t\t\t#isMultiline\t\t\t#isMultiline:\n\n\tGetters and setters for options in traditional Smalltalk style\n\nsearch: aTargetString\nsearch aTargetString from: startInteger to: endInteger\n\n\tCompiling the pattern, if necessary, search a string (or substring) using the pattern.  Answers nil if no match.  \n\nsearchAndCollect: aTargetString\nsearch: aTargetString andCollect: aBlock\nsearch: aTargetString andCollect: aBlock matchCount: anInteger\n\n\tCompiling the pattern, if necessary, gather all (or, if specified, the first anInteger) non-overlapping matches to me in aTargetString. Answer a collection of the results of applying aBlock to each ReMatch result.\n\nsearch: aTargetString andReplace: aBlock\nsearch: aTargetString andReplace: aBlock matchCount: anInteger\n\n\tCompiling the pattern, if necessary, find all (or, if specified, the first anInteger) non-overlapping matches to me in aTargetString.  Answer a new string, created by substituting the results of applying aBlock to each ReMatch result for the matched substring.\n\n\t\n!\n]style[(44 16 109 1 1 18 2 23 2 16 2 27 2 19 2 14 2 22 3 1 19 1 12 280 11 236 30 1 6 40 687 66 8 13 8 13 7 12 5 10 1 118 18 13 9 13 13 6 9 13 13 6 13 9 1 217 8 13 13 6 9 13 13 6 13 9 1 266)bf3,bf1,f1,bf1,f1,f1LRe aGeneralComment;,f1,f1LRe aGlobalSearchComment;,f1,f1LRe aRegexComment;,f1,f1LRe aRegexGoryDetailsComment;,f1,f1LRe aVersionsComment;,f1,f1LRe anReComment;,f1,f1LRe anReOverviewComment;,bf1,f1,f1LRe aLicenseComment;,f1,bf1,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1!\n\nRe class\n\tinstanceVariableNames: ''!\nObject subclass: #ReMatch\n\tinstanceVariableNames: 'matchArray re searchString pos endpos '\n\tclassVariableNames: ''\n\tmodule: #(Werdna Re)!\n\n!ReMatch commentStamp: '<historical>' prior: 0!\nReMatch: Perl-Style Regular Expression Search Results\n\nI. Introduction\n\nThis Class is part of a package of classes providing a Smalltalk wrapper to Philip Hazel's excellent PCRE library.  The Plugin interface and Smalltalk wrapper was written by Andrew C. Greenberg.  As discussed in RePattern aGeneralComment, the functionality is essentially embodied in this class, Class RePattern and certain new messages in Class String.  A summary of the regular expression syntax can be found in RePattern aRegexComment and a summary of the compile option codes available can be found in RePattern anOptionsComment.\n\nA more detailed description of RePlugin is available downloading the file 'RePluginDoco,' which can be obtained from http://www.gate.net/~werdna/RePlugin.html, into your default directory, and then executing\n\n\t\tUtilities reconstructTextWindowsFromFileNamed: 'RePluginDoco'\n\nII. Principal Match Results\n\nThe substring of searchString matched by re is given by:\n\n\t\tm match\n\nwhich can be derived from searchString as follows:\n\n\t\tm searchString\n\t\t\tcopyFrom: (m from)\n\t\t\tto: (m to)\n\nIII. Captured Groups (and Collections of Captured Groups)\n\nThe number of substrings capturable by a parenthetical grouping in an re (regardless of the number actually matched to create m) is given by:\n\n\t\tm numGroups\n\nThe string captured by parenthetical grouping i, where 1<=i<=(m numGroups) is given by\n\n\t\tm matchAt: i\n\nand this can be generated as follows:\n\n\t\tm searchString\n\t\t\tcopyFrom: (m fromAt: i)\n\t\t\tto: (m toAt: i)\n\nAnd an array of size (m numGroups) can be generated from strings and indices accordingly:\n\n\t\tm matches\n\t\tm froms\n\t\tm tos\n!\n]style[(53 2 15 214 25 65 9 103 23 69 26 120 41 53 61 2 27 177 57 488)bf3,f1,bf2,f1,f1LRePattern aGeneralComment;,f1,f1LRePattern Comment;,f1,f1LRePattern aRegexComment;,f1,f1LRePattern anOptionsComment;,f1,f1Rhttp://www.gate.net/~werdna/RePlugin.html;,f1,f1dUtilities reconstructTextWindowsFromFileNamed: 'RePluginDoco';;,f1,bf2,f1,bf2,f1!\n\nReMatch class\n\tinstanceVariableNames: ''!\nObject subclass: #RePattern\n\tinstanceVariableNames: 'pattern compileOptions pcrePointer extraPointer errorString offset matchOptions matchSpace lastMatchResult '\n\tclassVariableNames: ''\n\tmodule: #(Werdna Re)!\n\n!RePattern commentStamp: '<historical>' prior: 0!\nRePattern: Compiled Perl-Style Regular Expressions\n\nI.  Introduction.\n\nThis Smalltalk implementation of modern Perl-Style regular expressions was compiled by Andrew Greenberg <werdna@gate.net> and contributors, based upon the excellent PCRE library by Philip Hazel. As discussed in RePattern aGeneralComment, the functionality is essentially embodied in this class, Class ReMatch and certain new messages in Class String.  A summary of the regular expression syntax can be found in RePattern aRegexComment and a summary of the compile option codes available can be found in RePattern anOptionsComment.\n\nA substantially more detailed description of RePlugin is available downloading the file \"RePluginDoco,\" which can be obtained from http://www.gate.net/~werdna/RePlugin.html, into your default directory, and then executing\n\n\t\tUtilities reconstructTextWindowsFromFileNamed: 'RePluginDoco'\n\nII.  To Search a String or Substring For Pattern Matches (Once Only):\n\nExamples:\n\n\t\t'Squeak or Squawk!!' reMatch: '^Squ(ea|aw)k'\n\t\t'Squeak or Squawk!!' reMatch: '^Squ(ea|aw)k' opt: 'imsxABEXZ'\n\t\t'Squeak or Squawk!!' reMatch: '^Squ(ea|aw)k!!' from: 11\n\nmore generally,\n\t\t\n\t\tsrchStr reMatch: patStr [opt: oStr] [from: start] [to: stop]\n\nFor a one-time search of a string (or substring) for occurences of a match pattern.  The message will be answered with nil (if there is no match) or an instance of ReMatch, which can then be queried for further details about the match.\n\nIII. Global Searching and Replacing\n\n\tThe re package provides rudimentary facilities for global searches and replacements on a string.  The following expressions\n\n\t\t'\\w+' reMatch: 'this is a test' collect: [:m | m]\n\t\t(RePattern on: '\\w+') search: 'this is a test' collect: [:m | m]\n\nreturn an ordered collection of the results of repeated non-overlapping applications of the pattern to the string, or nil if there are no matches in the string.  To produce a list of matched strings, you can for example execute the following:\n\n\t\t'\\w+' reMatch: 'this is a test' collect: [:m| m match]\n\t\t(RePattern on: '\\w+') search: 'this is a test' collect: [:m | m match]\n\nYou can also perform global search and string replacements, where the answer is a string with unmatched text left alone, and matched text replaced by the result of a call to a Block passed the ReMatch object as a single parameter.  For example,\n\n\t\t('\\w+' reMatch: 'this is a test' sub: [:m| '<', (m match), '>']\nand\n\t\t(RePattern on: '\\w+') search: 'this is a test' sub: [:m| '<', (m match), '>']\n\nreturn a string with each nonblank word surrounded by angle brackets.  For more details, see RePattern aGlobalSearchComment.\n\nIV. To Create Compiled Regular Expression Objects (For Repeated Matching):\n\n\t\t'^Squ(ea|aw)k!!$' asRePattern\n\t\t'^Squ(ea|aw)k!!$' asRePatternOpt: 'imsxAEX'\n\t\t'^Squ(ea|aw)k!!$' asRePatternOpt: 'imsxAEX' onErrorRun: aBlock\n\n\t\tRePattern on: '^Squ(ea|aw)k!!$'\n\t\tRePattern on: '^Squ(ea|aw)k!!$' opt: 'imsxAEX'\n\t\tRePattern \n\t\t\ton: '^Squ(ea|aw)k!!$' \n\t\t\topt: 'imsxAEX' \n\t\t\tonErrorRun: [:pat :offset :message | \"your code here\" ]\n\n\tEach of the preceding expressions returns an instance of RePattern, compiled for efficient  matching when the pattern is repeatedly searched against different strings.  RePattern ordinarily caches a dozen or so of the most recently compiled patterns, but nevertheless invokes a cost for the table lookup.  To avoid compile and lookup costs, use the above messages.  To perform a one-time search, see above.\n\nV. To Search a Compiled Regexp Against A String or Substring for Matches:\n\n\t\tsearchString reMatch: re [from: from] [to: to] [opt: optStr]\nor\n\t\tre search: searchString [from: from] [to: to] [opt: optStr]\n\nExamples:\n\n\t\t'Squeak or Squawk' reMatch: re.\n\t\tre search: 'Squeak or Squawk!!'.\n\t\tre search: 'Squeak or Squawk!!' opt: 'ABZ'.\n\nIf no match is found, these messages answer nil.  Otherwise, they answer with a corresponding instance of ReMatch.!\n]style[(50 1 1 17 2 211 25 65 7 103 23 69 26 1 2 131 41 53 61 2 69 499 36 2 1110 30 3 75 749 73 362 7 1)bf3,f3,f1b,bf2,f1b,f1,f1LRePattern aGeneralComment;,f1,f1LReMatch Comment;,f1,f1LRePattern aRegexComment;,f1,f1LRePattern anOptionsComment;,f1,f1b,f1,f1Rhttp://www.gate.net/~werdna/RePlugin.html;,f1,f1dUtilities reconstructTextWindowsFromFileNamed: 'RePluginDoco';;,f1,bf2,f1,bf2,bf1,f1,f1LRePattern aGlobalSearchComment;,f1,f1b,f1,f1b,f1,f1LReMatch Comment;,f1!\n\nRePattern class\n\tinstanceVariableNames: 'Patterns Options CompileObjects Front '!\nTestInterpreterPlugin subclass: #RePlugin\n\tinstanceVariableNames: 'netMemory numAllocs numFrees lastAlloc patternStr rcvr compileFlags pcrePtr extraPtr errorStr errorOffset matchFlags patternStrPtr errorStrBuffer '\n\tclassVariableNames: ''\n\tmodule: #(Werdna Re)!\n\n!RePlugin commentStamp: '<historical>' prior: 0!\n/*\tRegular Expression Plugin (This class comment becomes part of rePlugin.c)\n\n\tRePlugin translate: 'RePlugin.c' doInlining: true.\n\nSee documentation and source code for the PCRE C Library Code.  This plugin is designed to serve an object such as RePattern:\n\n\tpatternStr\t\tA 0-terminated string comprising the pattern to be compiled.\n\tcompileFlags\tAn Integer representing re compiler options\n\tPCREBuffer\t\tA ByteArray of regular expression bytecodes\n\textraPtr\t\t\tA ByteArray of match optimization data (or nil)\n\terrorString\t\tA String Object For Holding an Error Message (when compile failed)\n\terrorOffset\t\tThe index in patternStr (0-based) where the error ocurred (when compile failed)\n\tmatchFlags\t\tAn Integer representing re matcher options\n\tmatchSpaceObj\tAn Integer array for match results and workspace during matching.\n\nThe instance variables must appear in the preceding order.  MatchSpaceObj must be allocated by the calling routine and contain at least 6*(numGroups+1) bytes.\n*/\n#include \"pcre.h\"\n#include \"internal.h\"\n\n/* Slight machine-specific hack for MacOS Memory Management */\n#ifdef TARGET_OS_MAC\n#define\tmalloc(ptr) NewPtr(ptr)\n#define free(ptr) DisposePtr(aPointer)\n#endif\n\n/* Adjust malloc and free routines as used by PCRE */\nvoid rePluginFree(void * aPointer);\nvoid * rePluginMalloc(size_t anInteger);\nvoid *(*pcre_malloc)(size_t) = rePluginMalloc;\nvoid  (*pcre_free)(void *) = rePluginFree;\n!\n\nRePlugin class\n\tinstanceVariableNames: ''!\nTestCase subclass: #ReTest\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tmodule: #(Werdna Re)!\nReTest class\n\tinstanceVariableNames: ''!\n\n!Re methodsFor: 'documentation' stamp: 'acg 8/3/2002 22:57'!\naGeneralComment \"\n\nPerl-Style Regular Expressions in Smalltalk\nby Andrew C. Greenberg\n\nI.  Regular Expressions in General\n\n\tRegular expressions are a language for specifying text to ease the searching and manipulation of text.  A complete discussion of regular expressions is beyond the scope of this document.  See Jeffrey Friedl, Mastering Regular Expressions, by O'Reilly for a relatively complete.  The regular expressions supported by this package are similar to those presently used in Perl 5.0\u00105 and Python, and are based upon Philip Hazel's excellent PCRE libraries (incorporated almost without change, subject to a free license described in Re aLicenseComment.  Thanks are due to Markus Kohler and Stephen Pair for their assistance in the initial ports of early versions of the Plugin.\n\nAn explanation of the expressions available in this package are summarized in Re aRegexComment, Re anOptionsComment and Re aGlobalSearchComment.\n\nA more detailed description of RePlugin is available downloading the file 'RePluginDoco,' which can be obtained from http://www.gate.net/~werdna/RePlugin.html, into your default directory, and then executing\n\n\t\tUtilities reconstructTextWindowsFromFileNamed: 'RePluginDoco'\n\nII. Overview of the 'Package.'\n\n\tThe following new classes are provided:\n\n\t\tClass\t\t\t\t\tDescription of Instances\n\t\t----------------------\t\t-------------------------------------------------------------------\n\t\tRe\t\t\t\t\t\tA regular expression matching engine\n\t\tReMatch\t\t\t\tResult of a search using Re\n\t\tRePattern\t\t\t\tDeprecated engine class from earlier plugin versions\n\t\tRePlugin\t\t\t\tThe Plugin 'Glue' to the PCRE Library.\n\n\t\tString\t\t\t\t\tVarious new messages were added to String, which are\n\t\t\t\t\t\t\t\tthe principal means for users to access the package. \n\nPluginCodeGenerator has been deleted from the packgage.\n\n\nIII. Some Examples.\n\n\tA. Simple Matching and Querying of Matches\n\n\tTo search a string for matches in a regular expression, use String reMatch:\n\n\t\t'just trying to catch some zzz''s before noon' matchRe: 'z+'\n\nwhich returns true if matched, and false otherwise.  If more information from a positive search result is desired, the method reMatch will return a ReMatch object corresponding to the result.\n\n\t\t'just trying to catch some zzz''s before noon' reMatch: 'z+'\n\nThe match object can be queried in various ways.  For example, to obtain details when parenthetical phrases of a regular expression are captured:\n\n\t\t|m|\n\t\tm _ 'Andy was born on 10/02/1957, and not soon enough!!'\n\t\t\treMatch: '(\\d\\d)/(\\d\\d)/((19|20)?\\d\\d)'.\n\t\tm matches\n\nanswers with:\n\t\n\t\t('10' '02' '1957' '19' )\n\nThe first message answers a ReMatch m representing the result of a search of the string for matches of re (nil would be returned if no match was found).  The third message answered a collection of the parenthetical subgroups matched, each showing the day, month and year as extracted from the string.\n\n\tB. Global Matching and String Substitutions\n\n\tYou can perform global searches to repeatedly search a string for non-overlapping occurrences of a pattern by using reMatch:collect:  For example,\n\n\t\t'this is a test' collectRe: '\\w+'\n\ncan be used to gather a collection of all words in the search string, answering:\n\n\t\tOrderedCollection ('this' 'is' 'a' 'test' )\n\nFor slightly more complex collections, you can use #reMatch:andCollect:  Additionally, you can perform global searches with text substitutions using reMatch:sub:  For example,\n\n\t\t'this is a test' reMatch: '\\w+' andReplace: [:m | '<', (m match), '>']  \n\ncan be used to replace every word in the search string with the word enclosed by matching brackets, answering:\n\n\t\t'<this> <is> <a> <test>'\n\nFurther examples and documentation can be found in the references above, and in the comments and definitions set forth in ReMatch, RePattern and String.\n\"!\n]style[(19 44 24 34 211 29 289 18 206 16 2 19 5 24 119 41 53 61 2 30 224 7 34 9 59 8 46 6 179 65 291 7 442 7 268 43 832 7 2 9 5 7 2)f1b,bf3,bf2,bf1,f1,f1i,f1,f1LRe aLicenseComment;,f1,f1LRe aRegexComment;,f1,f1LRe anOptionsComment;,f1,f1LRe aGlobalSearchComment;,f1,f1Rhttp://www.gate.net/~werdna/RePlugin.html;,f1,f1dUtilities reconstructTextWindowsFromFileNamed: 'RePluginDoco';;,f1,f1b,f1,f1LReMatch Comment;,f1,f1LRePattern Comment;,f1,f1LRePlugin Comment;,f1,f1LString Comment;,f1,f1b,f1,f1LReMatch Comment;,f1,f1LReMatch Comment;,f1,f1b,f1,f1LReMatch Comment;,f1,f1LRePattern Comment;,f1,f1LString Comment;,f1! !\n\n!Re methodsFor: 'documentation' stamp: 'acg 8/3/2002 23:06'!\naGlobalSearchComment \"\n\nGlobal Searching\n\nIntroduction\n\n\tRePattern provides facilities to support global searching and global searching and replacement of search strings with semantics quite similar to that of Perl 5.004.  Global searching means that the search string is repeatedly searched for matches, beginning at the beginning of the string, and subsequently beginning the next match immediately after the preceding match terminated.  For example, if we wanted to find all words in the subject string, we could execute:\n\n\t'this is a test' reMatch: '\\w+' collect: [:m | m match]\n\nwhich returns\n\n\tOrderedCollection ('this' 'is' 'a' 'test' ).\n\nThe collect: keyword directs PCRE to repeat the search for '\\w+', and to return a collection of the result of applying each ReMatch to the block.  (In this case, the block simply returns the string that was matched.)  To do global searching and string substitution, we could execute:\n\n\t'this is a test' reMatch: '\\w+' sub: [:m | '<', m match, '>']\n\nwhich return\n\n\t '<this> <is> <a> <test>'\n\nThe sub: keyword directs PCRE to repeat the search, and to return the original string, but with each matched substring replaced by the result of applying the block to the corresponding ReMatch object.\n\nGlobal Matching Functions\n\nRePattern convenience functions provide the following general global functions:\n\n\tsearchString reMatch: pattern [opt: oStr] collect: aBlock [num: anInteger]\n\tsearchString reMatch: pattern [opt: oStr] sub: aBlock [num: anInteger]\n\nOptionally, you may specify search and compile options with oStr, and you may specify a maximum number of searches performed in the global search with anInteger.  If anInteger is less than 0, then as many searches as can be performed, will be performed.\n\nSpecial Case of the Empty Match\n\nFinally, the definition given above would infinite loop if the pattern matches an empty string.  For example:\n\n\t'abcdef' reMatch: 'x*' sub: [:m| '<', m match, '>'] \n\nwill actually match the empty string just before and after each letter of the string, even though there is no x there.  ('x+' would return nil).  Since the string ends where it begins, at the beginning of the string, repeating the search from that point would simply infinite loop.  Accordingly, RePattern gives the pattern a one-character 'bump' after matching an empty string, at which point the block is applied.  For example, the preceding would answer\n\n\t'<>a<>b<>c<>d<>e<>f<>'\n\nIn the case of global searching (but not replacement), an empty string will not result in the ReMatch being applied to the block if the empty match immediately follows a match that has already been made.  Accordingly,\n\n\t'123' reMatch: '\\d*' collect: [:m| m match]  \n\nanswers\n\n\tOrderedCollection ('123' )\n\nand not \n\t\n\tOrderedCollection ('123' '')\n\nHowever, this last caveat does not apply to substitutions, so\n\n\t'123' reMatch: '\\d*' sub: [:m| '<', m match, '>']   \n\nanswers\n\n\t'<123><>'\n\n\n\n\"!\n]style[(21 3 18 12 1 2 9 460 1 243 7 154 1 290 7 10 25 487 31 1138 1 1)f1b,f1,bf3,bf2,bf3,bf2,f1LRePattern Comment;,f1,f1u,f1,f1LReMatch Comment;,f1,f1u,f1,f1LReMatch Comment;,f1,bf2,f1,bf2,f1,bf2,f1! !\n\n!Re methodsFor: 'documentation' stamp: 'acg 8/3/2002 23:01'!\naLicenseComment \"\n\nRePlugin is Open Source Software\n\nAs noted earlier, the non-Smalltalk code on which these classes are based is Philip Hazel's excellent PCRE Package, which is distributed subject to the following license.  The Smalltalk wrapper and plugin interface is written by Andrew C. Greenberg <werdna@gate.net> and other contributors, and is distributed subject to the same terms.\n\nPCRE LICENCE\n------------\n\nPCRE is a library of functions to support regular expressions whose syntax\nand semantics are as close as possible to those of the Perl 5 language.\n\nWritten by: Philip Hazel <ph10@cam.ac.uk>\n\nUniversity of Cambridge Computing Service,\nCambridge, England. Phone: +44 1223 334714.\n\nCopyright (c) 1997-1999 University of Cambridge\n\nPermission is granted to anyone to use this software for any purpose on any\ncomputer system, and to redistribute it freely, subject to the following\nrestrictions:\n\n1. This software is distributed in the hope that it will be useful,\n   but WITHOUT ANY WARRANTY; without even the implied warranty of\n   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n2. The origin of this software must not be misrepresented, either by\n   explicit claim or by omission.\n\n3. Altered versions must be plainly marked as such, and must not be\n   misrepresented as being the original software.\n\n4. If PCRE is embedded in any software that is released under the GNU\n   General Purpose Licence (GPL), then the terms of that licence shall\n   supersede any condition above with which it is incompatible.\n\"!\n]style[(16 3 32 340 12 1127)f1b,f1,bf3,f1,bf2,f1! !\n\n!Re methodsFor: 'documentation' stamp: 'acg 8/3/2002 23:01'!\naRegexComment \"\n\nRegular Expressions\n\nA more detailed description of RePlugin is available downloading the file 'RePluginDoco,' which can be obtained from http://www.gate.net/~werdna/RePlugin.html, into your default directory, and then executing\n\n\t\tUtilities reconstructTextWindowsFromFileNamed: 'RePluginDoco'\n\n\nBasic MetaCharacters\n\nThe regular expressions recognized in this package generally track those of Perl 5.05, and are set forth in greater detail in the PCRE documentation accompanying the package.  A summary follows:\n\n\t\\\tGeneral escape character with several uses\n\t^\tAssert start of subjct (or line, in multiline mode)\n\t\tAlso used to negate class definitions\n\t$\tAssert end of subject (or line, in multiline mode)\n\t.\tmatch any character but newline (by default)\n\t[]\tclass definitions\n\t|\tstart of alternative branch\n\t()\tsubpattern\n\t?\textends the meaning of '('  (see below)\n\t\tquantifies previous extension (1 or 0 occurrences) (e.g. a?)\n\t\tminimizes previous quantifier (e.g.  a*?)\n\t*\t0 or more quantifier\n\t+\t1 or more quantifier\n\t{}\tMin/Max Quantifier  {3} {3,} {3,5}\n\nInside Character Classes\n\n\t\\\tgeneral escape character\n\t^\tnegates the class, if the first character\n\t-\tindicates character range, if not escaped or the last character\n\t\nSpecial Escape Sequences\n\n\t\\a\talarm (hex 7)\n\t\\cx\tcontrol-x, where x is any character\n\t\\e\tescape (hex 1b)\n\t\\f\tformfeed (hex 0c)\n\t\\n\tnewline\n\t\\r\tcarriage return\n\t\\t\ttab\n\t\\xhh\tCharacter with hexcode hh\n\t\\ddd\t\tCharacter with octal code ddd, or a backreference\n\n\t\\d\tmatches decimal digit\n\t\\D\tnon-decimal digit\n\t\\s\twhitespace\n\t\\S\tnon-whitespace\n\t\\w\tany 'word' character\n\t\\W\tany non-word character\n\n\t\\b\tasserts a word boundary\n\t\\B\tasserts not a non-word boundary\n\t\\A\tasserts start of subject (regardless of mode)\n\t\\Z\tasserts end of subject (regardless of mode)\n\nInternal Option Setting\n\n\tLetters enclosed within a pattern and appearing between '(?' and ')' can be used to change the imsx options.  For example.\n(?im-sx) sets caseless and multiline modes, and unsets dotall and extended modes.  See the PCRE documentation for further details.\n\nNon-Grouping Subpatterns\n\n\tGroupings can be enclosed by parentheses without text being captured by following the leading parenthesis with a question mark and colon.  for example: 'abc(?:def)*' repeats the 'def', but does not capture matches in a grouping.\n\nAssertions\n\n\tAn assertion is a test on characters that does not actually consume any characters.  There are two kinds, those that look ahead of the current position, and those that look behind.  Consider the following example:\n\n\t\\w+(?=;)\n\nwhich matches a word followed by a semicolon, but doesn't include the semicolon in the match.  Another example:\n\n\t(?<!!foo)bar\n\nfinds occurences of bar not preceded by foo.  All lookbehind assertions must be of fixed length, but not all alternatives in such an assertion need be of the same length.\n\nOnce-Only Subpatterns\n\n\t(?>\\d+)bar\n\nOnce only subpatterns 'lock up' after finding a match, to prevent backtracking in various cases.  Essentially, a subpattern ofthis type matches the string that an identical standalone pattern would match if anchored at the current point in the subject string first encountering the expression.\n\nConditional Subpatterns\n\n\t(?(condition)yes-pattern)\n\t(?(condition)yes-pattern|no-pattern) \n\nThese permit one of two subpatterns to be matched, depending upon a preceding condition.  There are two kinds of conditions: (1) a sequence of digits, specifying that a numbered subpattern has been matched; and (2) an assertion, either positive, negative, lookahead or lookbehind.\n\nComments\n\n\t(?# This is a comment)\n\nAlso, in extended mode, comments may be inserted between a '#' and a newline.\n\n\"!\n]style[(17 21 117 41 53 61 2 1 20 1 1 194 2 547 28 139 29 528 26 255 27 230 13 353 1 170 38 293 94 280 36 78 3)f1b,bf3,f1,f1Rhttp://www.gate.net/~werdna/RePlugin.html;,f1,f1dUtilities reconstructTextWindowsFromFileNamed: 'RePluginDoco';;,f1,bf3,bf2,bf3,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b! !\n\n!Re methodsFor: 'documentation' stamp: 'acg 8/4/2002 11:13'!\naRegexGoryDetailsComment \"\n\nRegular Expression Syntax -- the Gory Details\n\nIntroduction\n\nRePlugin is a Squeak Plugin providing modern regular expression matching operations similar to those found in Perl. It was written by Andrew C. Greenberg (werdna@gate.net), with contributions by Markus Kohler, Stephen Pair and others. RePlugin 2.3b (and 'the Gory Details' portion of this document) is directly taken from Version 2.04 of the excellent PCRE library by Philip Hazel with only minor modifications. \n\nThe syntax and semantics of the regular expressions supported by PCRE are described below. Regular expressions are also described in the Perl documentation and in a number of other books, some of which have copious examples. Jeffrey Friedl's 'Mastering Regular Expressions', published by O'Reilly (ISBN 1-56592-257-3), covers them in great detail. The description here is intended as reference documentation. \n\nRegular Expressions\n\nA regular expression is a pattern that is matched against a subject string from left to right. Most characters stand for themselves in a pattern, and match the corresponding characters in the subject. As a trivial example, the pattern \n\n\tThe quick brown fox\n\nmatches a portion of a subject string that is identical to itself. The power of regular expressions comes from the ability to include alternatives and repetitions in the pattern. These are encoded in the pattern by the use of meta-characters, which do not stand for themselves but instead are interpreted in some special way. \n\nThere are two different sets of meta-characters: those that are recognized anywhere in the pattern except within square brackets, and those that are recognized in square brackets. Outside square brackets, the meta-characters are as follows: \n\n  \\      general escape character with several uses\n  ^      assert start of subject (or line, in multiline mode)\n  $      assert end of subject (or line, in multiline mode)\n  .      match any character except newline (by default)\n  [      start character class definition\n  |      start of alternative branch\n  (      start subpattern\n  )      end subpattern\n  ?      extends the meaning of (\n         also 0 or 1 quantifier\n         also quantifier minimizer\n  *      0 or more quantifier\n  +      1 or more quantifier\n  {      start min/max quantifier\n\nPart of a pattern that is in square brackets is called a 'character class'. In a character class the only meta-characters are: \n\n  \\      general escape character\n  ^      negate the class, but only if the first character\n  -      indicates character range\n  ]      terminates the character class\n\nThe following sections describe the use of each of the meta-characters. \n\n\nBACKSLASH\n\nThe backslash character has several uses. Firstly, if it is followed by a non-alphameric character, it takes away any special meaning that character may have. This use of backslash as an escape character applies both inside and outside character classes. \n\nFor example, if you want to match a '*' character, you write '\\*' in the pattern. This applies whether or not the following character would otherwise be interpreted as a meta-character, so it is always safe to precede a non-alphameric with '\\' to specify that it stands for itself. In particular, if you want to match a backslash, you write '\\\\'. \n\nIf a pattern is compiled with the 'x' (beExtended) option, whitespace in the pattern (other than in a character class) and characters between a '#' outside a character class and the next newline character are ignored. An escaping backslash can be used to include a whitespace or '#' character as part of the pattern. \n\nA second use of backslash provides a way of encoding non-printing characters in patterns in a visible manner. There is no restriction on the appearance of non-printing characters, apart from the binary zero that terminates a pattern, but when a pattern is being prepared by text editing, it is usually easier to use one of the following escape sequences than the binary character it represents: \n\n  \\a     alarm, that is, the BEL character (hex 07)\n  \\cx    'control-x', where x is any character\n  \\e     escape (hex 1B)\n  \\f     formfeed (hex 0C)\n  \\n     newline (hex 0A)\n  \\r     carriage return (hex 0D)\n  \\t     tab (hex 09)\n  \\xhh   character with hex code hh\n  \\ddd   character with octal code ddd, or backreference\n\nThe precise effect of '\\cx' is as follows: if 'x' is a lower case letter, it is converted to upper case. Then bit 6 of the character (hex 40) is inverted. Thus '\\cz' becomes hex 1A, but '\\c{' becomes hex 3B, while '\\c;' becomes hex 7B. \n\nAfter '\\x', up to two hexadecimal digits are read (letters can be in upper or lower case). \n\nAfter '\\0' up to two further octal digits are read. In both cases, if there are fewer than two digits, just those that are present are used. Thus the sequence '\\0\\x\\07' specifies two binary zeros followed by a BEL character. Make sure you supply two digits after the initial zero if the character that follows is itself an octal digit. \n\nThe handling of a backslash followed by a digit other than 0 is complicated. Outside a character class, PCRE reads it and any following digits as a decimal number. If the number is less than 10, or if there have been at least that many previous capturing left parentheses in the expression, the entire sequence is taken as a back reference. A description of how this works is given later, following the discussion of parenthesized subpatterns. \n\nInside a character class, or if the decimal number is greater than 9 and there have not been that many capturing subpatterns, PCRE re-reads up to three octal digits following the backslash, and generates a single byte from the least significant 8 bits of the value. Any subsequent digits stand for themselves. For example: \n\n  \\040   is another way of writing a space\n  \\40    is the same, provided there are fewer than 40\n            previous capturing subpatterns\n  \\7     is always a back reference\n  \\11    might be a back reference, or another way of\n            writing a tab\n  \\011   is always a tab\n  \\0113  is a tab followed by the character '3'\n  \\113   is the character with octal code 113 (since there\n            can be no more than 99 back references)\n  \\377   is a byte consisting entirely of 1 bits\n  \\81    is either a back reference, or a binary zero\n            followed by the two characters '8' and '1'\n\nNote that octal values of 100 or greater must not be introduced by a leading zero, because no more than three octal digits are ever read. \n\nAll the sequences that define a single byte value can be used both inside and outside character classes. In addition, inside a character class, the sequence '\\b' is interpreted as the backspace character (hex 08). Outside a character class it has a different meaning (see below). \n\nThe third use of backslash is for specifying generic character types: \n\n  \\d     any decimal digit\n  \\D     any character that is not a decimal digit\n  \\s     any whitespace character\n  \\S     any character that is not a whitespace character\n  \\w     any 'word' character\n  \\W     any 'non-word' character\n\nEach pair of escape sequences partitions the complete set of characters into two disjoint sets. Any given character matches one, and only one, of each pair. \n\nA 'word' character is any letter or digit or the underscore character, that is, any character which can be part of a Perl 'word'. The definition of letters and digits is controlled by PCRE's character tables, and may vary if locale- specific matching is taking place (see 'Locale support' above). For example, in the 'fr' (French) locale, some character codes greater than 128 are used for accented letters, and these are matched by \\w. \n\nThese character type sequences can appear both inside and outside character classes. They each match one character of the appropriate type. If the current matching point is at the end of the subject string, all of them fail, since there is no character to match. \n\nThe fourth use of backslash is for certain simple assertions. An assertion specifies a condition that has to be met at a particular point in a match, without consuming any characters from the subject string. The use of subpatterns for more complicated assertions is described below. The backslashed assertions are \n\n  \\b     word boundary\n  \\B     not a word boundary\n  \\A     start of subject (independent of multiline mode)\n  \\Z     end of subject or newline at end (independent of multiline mode)\n  \\z     end of subject (independent of multiline mode)\n\nThese assertions may not appear in character classes (but note that '\\b' has a different meaning, namely the backspace character, inside a character class). \n\nA word boundary is a position in the subject string where the current character and the previous character do not both match \\w or \\W (i.e. one matches \\w and the other matches \\W), or the start or end of the string if the first or last character matches \\w, respectively. \n\nThe \\A, \\Z, and \\z assertions differ from the traditional circumflex and dollar (described below) in that they only ever match at the very start and end of the subject string, whatever options are set. They are not affected by the 'B' (beNotBeginningOfLine) or 'Z' (beNotEndOfLine) options. The difference between \\Z and \\z is that \\Z matches before a newline that is the last character of the string as well as at the end of the string, whereas \\z matches only at the end. \n\n\nCIRCUMFLEX AND DOLLAR\n\nOutside a character class, in the default matching mode, the circumflex character is an assertion which is true only if the current matching point is at the start of the subject string. Inside a character class, circumflex has an entirely different meaning (see below). \n\nCircumflex need not be the first character of the pattern if a number of alternatives are involved, but it should be the first thing in each alternative in which it appears if the pattern is ever to match that branch. If all possible alternatives start with a circumflex, that is, if the pattern is constrained to match only at the start of the subject, it is said to be an 'anchored' pattern. (There are also other constructs that can cause a pattern to be anchored.) \n\nA dollar character is an assertion which is true only if the current matching point is at the end of the subject string, or immediately before a newline character that is the last character in the string (by default). Dollar need not be the last character of the pattern if a number of alternatives are involved, but it should be the last item in any branch in which it appears. Dollar has no special meaning in a character class. \n\nThe meaning of dollar can be changed so that it matches only at the very end of the string, by setting the 'E' ('beDollarEndOnly') option at compile or matching time. This does not affect the \\Z assertion. \n\nThe meanings of the circumflex and dollar characters are changed if the 'm' (beMultiline) option is set. When this is the case, they match immediately after and immediately before an internal '\\n' character, respectively, in addition to matching at the start and end of the subject string. For example, the pattern /^abc$/ matches the subject string 'def\\nabc' in multiline mode, but not otherwise. Consequently, patterns that are anchored in single line mode because all branches start with '^' are not anchored in multiline mode. The 'E' (beExtended) option is ignored if 's' is set. \n\nNote that the sequences \\A, \\Z, and \\z can be used to match the start and end of the subject in both modes, and if all branches of a pattern start with \\A is it always anchored, whether 's' (beDotIncludesNewline) is set or not. \n\n\nPERIOD, DOT\n\nOutside a character class, a dot in the pattern matches any one character in the subject, including a non-printing character, but not (by default) newline. If the 's' (beDotIncludesNewline) option is set, then dots match newlines as well. The handling of dot is entirely independent of the handling of circumflex and dollar, the only relationship being that they both involve newline characters. Dot has no special meaning in a character class. \n\n\nSQUARE BRACKETS\n\nAn opening square bracket introduces a character class, terminated by a closing square bracket. A closing square bracket on its own is not special. If a closing square bracket is required as a member of the class, it should be the first data character in the class (after an initial circumflex, if present) or escaped with a backslash. \n\nA character class matches a single character in the subject; the character must be in the set of characters defined by the class, unless the first character in the class is a circumflex, in which case the subject character must not be in the set defined by the class. If a circumflex is actually required as a member of the class, ensure it is not the first character, or escape it with a backslash. \n\nFor example, the character class [aeiou] matches any lower case vowel, while [^aeiou] matches any character that is not a lower case vowel. Note that a circumflex is just a convenient notation for specifying the characters which are in the class by enumerating those that are not. It is not an assertion: it still consumes a character from the subject string, and fails if the current pointer is at the end of the string. \n\nWhen caseless matching is set, any letters in a class represent both their upper case and lower case versions, so for example, a caseless [aeiou] matches 'A' as well as 'a', and a caseless [^aeiou] does not match 'A', whereas a caseful version would. \n\nThe newline character is never treated in any special way in character classes, whatever the setting of the 's' (beDotIncludesNewline) or 'm' (beMultiline) options is. A class such as [^a] will always match a newline. \n\nThe minus (hyphen) character can be used to specify a range of characters in a character class. For example, [d-m] matches any letter between d and m, inclusive. If a minus character is required in a class, it must be escaped with a backslash or appear in a position where it cannot be interpreted as indicating a range, typically as the first or last character in the class. \n\nIt is not possible to have the literal character ']' as the end character of a range. A pattern such as [W-]46] is interpreted as a class of two characters ('W' and '-') followed by a literal string '46]', so it would match 'W46]' or '-46]'. However, if the ']' is escaped with a backslash it is interpreted as the end of range, so [W-\\]46] is interpreted as a single class containing a range followed by two separate characters. The octal or hexadecimal representation of ']' can also be used to end a range. \n\nRanges operate in ASCII collating sequence. They can also be used for characters specified numerically, for example [\\000-\\037]. If a range that includes letters is used when caseless matching is set, it matches the letters in either case. For example, [W-c] is equivalent to [][\\^_`wxyzabc], matched caselessly, and if character tables for the 'fr' locale are in use, [\\xc8-\\xcb] matches accented E characters in both cases. \n\nThe character types \\d, \\D, \\s, \\S, \\w, and \\W may also appear in a character class, and add the characters that they match to the class. For example, [\\dABCDEF] matches any hexadecimal digit. A circumflex can conveniently be used with the upper case character types to specify a more restricted set of characters than the matching lower case type. For example, the class [^\\W_] matches any letter or digit, but not underscore. \n\nAll non-alphameric characters other than \\, -, ^ (at the start) and the terminating ] are non-special in character classes, but it does no harm if they are escaped. \n\n\nVERTICAL BAR\n\nVertical bar characters are used to separate alternative patterns. For example, the pattern \n\n  gilbert|sullivan\n\nmatches either 'gilbert' or 'sullivan'. Any number of alternatives may appear, and an empty alternative is permitted (matching the empty string). The matching process tries each alternative in turn, from left to right, and the first one that succeeds is used. If the alternatives are within a subpattern (defined below), 'succeeds' means matching the rest of the main pattern as well as the alternative in the subpattern. \n\n\nINTERNAL OPTION SETTING\n\nThe settings of caseless, multiline, dotall and extended options can be changed from within the pattern by a sequence of Perl option letters enclosed between '(?' and ')'. The option letters are \n\n  i  for Caseless Matching Mode\n  m  for Multiline Mode\n  s  for Dotall Mode (Dot matches newlines)\n  x  for Extended Mode (whitespace not meaningful, comments permitted)\n\nFor example, (?im) sets caseless, multiline matching. It is also possible to unset these options by preceding the letter with a hyphen, and a combined setting and unsetting such as (?im-sx), which sets caseless and multiline while unsetting dotall and extended, is also permitted. If a letter appears both before and after the hyphen, the option is unset. \n\nThe scope of these option changes depends on where in the pattern the setting occurs. For settings that are outside any subpattern (defined below), the effect is the same as if the options were set or unset at the start of matching. The following patterns all behave in exactly the same way: \n\n  (?i)abc\n  a(?i)bc\n  ab(?i)c\n  abc(?i)\n\nwhich in turn is the same as compiling the pattern abc with 'i' set. In other words, such 'top level' settings apply to the whole pattern (unless there are other changes inside subpatterns). If there is more than one setting of the same option at top level, the rightmost setting is used. \n\nIf an option change occurs inside a subpattern, the effect is different. This is a change of behaviour in Perl 5.005. An option change inside a subpattern affects only that part of the subpattern that follows it, so \n\n  (a(?i)b)c\n\nmatches abc and aBc and no other strings (assuming 'i' is not used). By this means, options can be made to have different settings in different parts of the pattern. Any changes made in one alternative do carry on into subsequent branches within the same subpattern. For example, \n\n  (a(?i)b|c)\n\nmatches 'ab', 'aB', 'c', and 'C', even though when matching 'C' the first branch is abandoned before the option setting. This is because the effects of option settings happen at compile time. There would be some very weird behaviour otherwise. \n\nThe PCRE-specific options 'U' and 'X' can be changed in the same way as the Perl-compatible options. The (?X) flag setting is special in that it must always occur earlier in the pattern than any of the additional features it turns on, even when it is at top level. It is best put at the start. \n\n\nSUBPATTERNS\n\nSubpatterns are delimited by parentheses (round brackets), which can be nested. Marking part of a pattern as a subpattern does two things: \n\n1. It localizes a set of alternatives. For example, the pattern \n\n  cat(aract|erpillar|)\n\nmatches one of the words 'cat', 'cataract', or 'caterpillar'. Without the parentheses, it would match 'cataract', 'erpillar' or the empty string. \n\n2. It sets up the subpattern as a capturing subpattern (as defined above). When the whole pattern matches, that portion of the subject string that matchedOpening parentheses are counted from left to right (starting from 1) to obtain the numbers of the capturing subpatterns. \n\nFor example, if the string 'the red king' is matched against the pattern \n\n  the ((red|white) (king|queen))\n\nthe captured substrings are 'red king', 'red', and 'king', and are numbered 1, 2, and 3. \n\nThe fact that plain parentheses fulfil two functions is not always helpful. There are often times when a grouping subpattern is required without a capturing requirement. If an opening parenthesis is followed by '?:', the subpattern does not do any capturing, and is not counted when computing the number of any subsequent capturing subpatterns. For example, if the string 'the white queen' is matched against the pattern \n\n  the ((?:red|white) (king|queen))\n\nthe captured substrings are 'white queen' and 'queen', and are numbered 1 and 2. The maximum number of captured substrings is 99, and the maximum number of all subpatterns, both capturing and non-capturing, is 200. \n\nAs a convenient shorthand, if any option settings are required at the start of a non-capturing subpattern, the option letters may appear between the '?' and the ':'. Thus the two patterns \n\n  (?i:saturday|sunday)\n  (?:(?i)saturday|sunday)\nmatch exactly the same set of strings. Because alternative branches are tried from left to right, and options are not reset until the end of the subpattern is reached, an option setting in one branch does affect subsequent branches, so the above patterns match 'SUNDAY' as well as 'Saturday'. \n\n\nREPETITION\n\nRepetition is specified by quantifiers, which can follow any of the following items: \n\n  a single character, possibly escaped\n  the . metacharacter\n  a character class\n  a back reference (see next section)\n  a parenthesized subpattern (unless it is an assertion - see below)\n\nThe general repetition quantifier specifies a minimum and maximum number of permitted matches, by giving the two numbers in curly brackets (braces), separated by a comma. The numbers must be less than 65536, and the first must be less than or equal to the second. For example: \n\n  z{2,4}\n\nmatches 'zz', 'zzz', or 'zzzz'. A closing brace on its own is not a special character. If the second number is omitted, but the comma is present, there is no upper limit; if the second number and the comma are both omitted, the quantifier specifies an exact number of required matches. Thus \n\n  [aeiou]{3,}\n\nmatches at least 3 successive vowels, but may match many more, while \n\n  \\d{8}\n\nmatches exactly 8 digits. An opening curly bracket that appears in a position where a quantifier is not allowed, or one that does not match the syntax of a quantifier, is taken as a literal character. For example, {,6} is not a quantifier, but a literal string of four characters. \n\nThe quantifier {0} is permitted, causing the expression to behave as if the previous item and the quantifier were not present. \n\nFor convenience (and historical compatibility) the three most common quantifiers have single-character abbreviations: \n\n  *    is equivalent to {0,}\n  +    is equivalent to {1,}\n  ?    is equivalent to {0,1}\n\nIt is possible to construct infinite loops by following a subpattern that can match no characters with a quantifier that has no upper limit, for example: \n\n  (a?)*\n\nEarlier versions of Perl and PCRE used to give an error at compile time for such patterns. However, because there are cases where this can be useful, such patterns are now accepted, but if any repetition of the subpattern does in fact match no characters, the loop is forcibly broken. \n\nBy default, the quantifiers are 'greedy', that is, they match as much as possible (up to the maximum number of permitted times), without causing the rest of the pattern to fail. The classic example of where this gives problems is in trying to match comments in C programs. These appear between the sequences /* and */ and within the sequence, individual * and / characters may appear. An attempt to match C comments by applying the pattern \n\n  /\\*.*\\*/\nto the string \n\n  /* first command */  not comment  /* second comment */\n\nfails, because it matches the entire string due to the greediness of the .* item. \n\nHowever, if a quantifier is followed by a question mark, then it ceases to be greedy, and instead matches the minimum number of times possible, so the pattern \n\n  /\\*.*?\\*/\n\ndoes the right thing with the C comments. The meaning of the various quantifiers is not otherwise changed, just the preferred number of matches. Do not confuse this use of question mark with its use as a quantifier in its own right. Because it has two uses, it can sometimes appear doubled, as in \n\n  \\d??\\d\n\nwhich matches one digit by preference, but can match two if that is the only way the rest of the pattern matches. \n\nIf the 'U' option is set (an option which is not available in Perl) then the quantifiers are not greedy by default, but individual ones can be made greedy by following them with a question mark. In other words, it inverts the default behaviour. \n\nWhen a parenthesized subpattern is quantified with a minimum repeat count that is greater than 1 or with a limited maximum, more store is required for the compiled pattern, in proportion to the size of the minimum or maximum. \n\nIf a pattern starts with .* then it is implicitly anchored, since whatever follows will be tried against every character position in the subject string. PCRE treats this as though it were preceded by \\A. \n\nWhen a capturing subpattern is repeated, the value captured is the substring that matched the final iteration. For example, after \n\n  (tweedle[dume]{3}\\s*)+\n\nhas matched 'tweedledum tweedledee' the value of the captured substring is 'tweedledee'. However, if there are nested capturing subpatterns, the corresponding captured values may have been set in previous iterations. For example, after \n\n  /(a|(b))+/\n\nmatches 'aba' the value of the second captured substring is 'b'. \n\nBACK REFERENCES\n\nOutside a character class, a backslash followed by a digit greater than 0 (and possibly further digits) is a back reference to a capturing subpattern earlier (i.e. to its left) in the pattern, provided there have been that many previous capturing left parentheses. \n\nHowever, if the decimal number following the backslash is less than 10, it is always taken as a back reference, and causes an error only if there are not that many capturing left parentheses in the entire pattern. In other words, the parentheses that are referenced need not be to the left of the reference for numbers less than 10. See the section entitled 'Backslash' above for further details of the handling of digits following a backslash. \n\nA back reference matches whatever actually matched the capturing subpattern in the current subject string, rather than anything matching the subpattern itself. So the pattern \n\n  (sens|respons)e and \\1ibility\n\nmatches 'sense and sensibility' and 'response and responsibility', but not 'sense and responsibility'. If caseful matching is in force at the time of the back reference, then the case of letters is relevant. For example, \n\n  ((?i)rah)\\s+\\1\n\nmatches 'rah rah' and 'RAH RAH', but not 'RAH rah', even though the original capturing subpattern is matched caselessly. \n\nThere may be more than one back reference to the same subpattern. If a subpattern has not actually been used in a particular match, then any back references to it always fail. For example, the pattern \n\n  (a|(bc))\\2\n\nalways fails if it starts to match 'a' rather than 'bc'. Because there may be up to 99 back references, all digits following the backslash are taken as part of a potential back reference number. If the pattern continues with a digit character, then some delimiter must be used to terminate the back reference. If the 'x' (beExteded) option is set, this can be whitespace. Otherwise an empty comment can be used. \n\nA back reference that occurs inside the parentheses to which it refers fails when the subpattern is first used, so, for example, (a\\1) never matches. However, such references can be useful inside repeated subpatterns. For example, the pattern \n\n  (a|b\\1)+\n\nmatches any number of 'a's and also 'aba', 'ababaa' etc. At each iteration of the subpattern, the back reference matches the character string corresponding to the previous iteration. In order for this to work, the pattern must be such that the first iteration does not need to match the back reference. This can be done using alternation, as in the example above, or by a quantifier with a minimum of zero. \n\n\nASSERTIONS\n\nAn assertion is a test on the characters following or preceding the current matching point that does not actually consume any characters. The simple assertions coded as \\b, \\B, \\A, \\Z, \\z, ^ and $ are described above. More complicated assertions are coded as subpatterns. There are two kinds: those that look ahead of the current position in the subject string, and those that look behind it. \n\nAn assertion subpattern is matched in the normal way, except that it does not cause the current matching position to be changed. Lookahead assertions start with (?= for positive assertions and (?!! for negative assertions. For example, \n\n  \\w+(?=;)\n\nmatches a word followed by a semicolon, but does not include the semicolon in the match, and \n\n  foo(?!!bar)\n\nmatches any occurrence of 'foo' that is not followed by 'bar'. Note that the apparently similar pattern \n\n  (?!!foo)bar\n\ndoes not find an occurrence of 'bar' that is preceded by something other than 'foo'; it finds any occurrence of 'bar' whatsoever, because the assertion (?!!foo) is always true when the next three characters are 'bar'. A lookbehind assertion is needed to achieve this effect. \n\nLookbehind assertions start with (?<= for positive assertions and (?&lt!! for negative assertions. For example, \n\n  (?<!!foo)bar\n\ndoes find an occurrence of 'bar' that is not preceded by 'foo'. The contents of a lookbehind assertion are restricted such that all the strings it matches must have a fixed length. However, if there are several alternatives, they do not all have to have the same fixed length. Thus \n\n  (?<=bullock|donkey)\nis permitted, but \n\n  (?<!!dogs?|cats?)\n\ncauses an error at compile time. Branches that match different length strings are permitted only at the top level of a lookbehind assertion. This is an extension compared with Perl 5.005, which requires all branches to match the same length of string. An assertion such as \n\n  (?=ab(c|de))\n\nis not permitted, because its single top-level branch can match two different lengths, but it is acceptable if rewritten to use two top-level branches: \n\n  (?=abc|abde)\n\nThe implementation of lookbehind assertions is, for each alternative, to temporarily move the current position back by the fixed width and then try to match. If there are insufficient characters before the current position, the match is deemed to fail. Lookbehinds in conjunction with once-only subpatterns can be particularly useful for matching at the ends of strings; an example is given at the end of the section on once-only subpatterns. Several assertions (of any sort) may occur in succession. For example, \n\n  (?=\\d{3})(?<!!999)foo\n\nmatches 'foo' preceded by three digits that are not '999'. Furthermore, assertions can be nested in any combination. For example, \n\n  (?=(?<!!foo)bar)baz\n\nmatches an occurrence of 'baz' that is preceded by 'bar' which in turn is not preceded by 'foo'. \n\nAssertion subpatterns are not capturing subpatterns, and may not be repeated, because it makes no sense to assert the same thing several times. If an assertion contains capturing subpatterns within it, these are always counted for the purposes of numbering the capturing subpatterns in the whole pattern. Substring capturing is carried out for positive assertions, but it does not make sense for negative assertions. \n\nAssertions count towards the maximum of 200 parenthesized subpatterns. \n\n\nONCE-ONLY SUBPATTERNS\n\nWith both maximizing and minimizing repetition, failure of what follows normally causes the repeated item to be re-evaluated to see if a different number of repeats allows the rest of the pattern to match. Sometimes it is useful to prevent this, either to change the nature of the match, or to cause it fail earlier than it otherwise might, when the author of the pattern knows there is no point in carrying on. \n\nConsider, for example, the pattern \\d+foo when applied to the subject line \n\n  123456bar\n\nAfter matching all 6 digits and then failing to match 'foo', the normal action of the matcher is to try again with only 5 digits matching the \\d+ item, and then with 4, and so on, before ultimately failing. Once-only subpatterns provide the means for specifying that once a portion of the pattern has matched, it is not to be re-evaluated in this way, so the matcher would give up immediately on failing to match 'foo' the first time. The notation is another kind of special parenthesis, starting with (?> as in this example: \n\n  (?>\\d+)bar\n\nThis kind of parenthesis 'locks up' the part of the pattern it contains once it has matched, and a failure further into the pattern is prevented from backtracking into it. Backtracking past it to previous items, however, works as normal. \n\nAn alternative description is that a subpattern of this type matches the string of characters that an identical standalone pattern would match, if anchored at the current point in the subject string. \n\nOnce-only subpatterns are not capturing subpatterns. Simple cases such as the above example can be thought of as a maximizing repeat that must swallow everything it can. So, while both \\d+ and \\d+? are prepared to adjust the number of digits they match in order to make the rest of the pattern match, (?>\\d+) can only match an entire sequence of digits. \n\nThis construction can of course contain arbitrarily complicated subpatterns, and it can be nested. \n\nOnce-only subpatterns can be used in conjunction with lookbehind assertions to specify efficient matching at the end of the subject string. Consider a simple pattern such as \n\n  abcd$\n\nwhen applied to a long string which does not match it. Because matching proceeds from left to right, PCRE will look for each 'a' in the subject and then see if what follows matches the rest of the pattern. If the pattern is specified as \n\n  .*abcd$\n\nthen the initial .* matches the entire string at first, but when this fails, it backtracks to match all but the last character, then all but the last two characters, and so on. Once again the search for 'a' covers the entire string, from right to left, so we are no better off. However, if the pattern is written as \n\n  (?>.*)(?=abcd)\n\nthen there can be no backtracking for the .* item; it can match only the entire string. The subsequent lookbehind assertion does a single test on the last four characters. If it fails, the match fails immediately. For long strings, this approach makes a significant difference to the processing time. \n\n\nCONDITIONAL SUBPATTERNS\n\nIt is possible to cause the matching process to obey a subpattern conditionally or to choose between two alternative subpatterns, depending on the result of an assertion, or whether a previous capturing subpattern matched or not. The two possible forms of conditional subpattern are \n\n  (?(condition)yes-pattern)\n  (?(condition)yes-pattern|no-pattern)\n\nIf the condition is satisfied, the yes-pattern is used; otherwise the no-pattern (if present) is used. If there are more than two alternatives in the subpattern, a compile-time error occurs. \n\nThere are two kinds of condition. If the text between the parentheses consists of a sequence of digits, then the condition is satisfied if the capturing subpattern of that number has previously matched. Consider the following pattern, which contains non-significant white space to make it more readable (assume the 'x' (beExtended) option) and to divide it into three parts for ease of discussion: \n\n  ( \\( )?    [^()]+    (?(1) \\) )\n\nThe first part matches an optional opening parenthesis, and if that character is present, sets it as the first captured substring. The second part matches one or more characters that are not parentheses. The third part is a conditional subpattern that tests whether the first set of parentheses matched or not. If they did, that is, if subject started with an opening parenthesis, the condition is true, and so the yes-pattern is executed and a closing parenthesis is required. Otherwise, since no-pattern is not present, the subpattern matches nothing. In other words, this pattern matches a sequence of non-parentheses, optionally enclosed in parentheses. \n\nIf the condition is not a sequence of digits, it must be an assertion. This may be a positive or negative lookahead or lookbehind assertion. Consider this pattern, again containing non-significant white space, and with the two alternatives on the second line: \n\n  (?(?=[^a-z]*[a-z])\n  \\d{2}[a-z]{3}-\\d{2}  |  \\d{2}-\\d{2}-\\d{2} )\n\nThe condition is a positive lookahead assertion that matches an optional sequence of non-letters followed by a letter. In other words, it tests for the presence of at least one letter in the subject. If a letter is found, the subject is matched against the first alternative; otherwise it is matched against the second. This pattern matches strings in one of the two forms dd-aaa-dd or dd-dd-dd, where aaa are letters and dd are digits. \n\n\nCOMMENTS\n\nThe sequence (?# marks the start of a comment which continues up to the next closing parenthesis. Nested parentheses are not permitted. The characters that make up a comment play no part in the pattern matching at all. \n\nIf the 'x' (beExtended) option is set, an unescaped # character outside a character class introduces a comment that continues up to the next newline character in the pattern.\"!\n]style[(24 4 45 2 12 827 19 1761 9 6751 21 2205 11 450 15 3555 12 541 23 2425 11 2069 10 4396 15 2588 10 3372 21 3022 23 2413 8 398)f1b,f1,f3b,f1,f2b,f1,f2b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1,f1b,f1! !\n\n!Re methodsFor: 'documentation' stamp: 'acg 8/3/2002 23:04'!\naVersionsComment \"\n\nRePlugin Change History and Compatibility\n\n\n\nVersion 3.2 --\n\nMake compatible with Squeak version 3.X\nFurther revisions to front end.\nMany bug fixes.\n\nVersion 2.3b --\nSubstantially revise String convenience functions to serve as primary user interface to RePlugin. \nImplement pattern compile caching. \nImplement pattern match default caching. \nOrder of magnitude performance improvement in global substitution routines. \nImplement modern Perl5 semantics for global matching and replacement. \nMinor bug fixes. \nPermit use of compiled patterns as reMatch: parameter. \nPlugin code changed so that semantics for '\\n' and '\\r' are hard-coded across all plugins to conform to Squeak standards regardless of variations in local hardware c libraries. \nPlugin code memory management scheme modified to permit compilation on most non-Macintosh systems. \nPlugin code changed to automatically incorporate RePlugin class comment in the generated plugin header. \nRelease Wintel Plugin \nRelease HP-UX Plugin \nVersion 2.3a -- \nRelease MacPPC Plugin. \n\nLimitations\n\nThere are some size limitations in PCRE but it is hoped that they will never in practice be relevant. \nmaximum length of a compiled pattern is 65539 (sic) bytes. \nAll values in repeating quantifiers must be less than 65536. \nThe maximum number of capturing subpatterns is 99. \nThe maximum number of all parenthesized subpatterns, including capturing subpatterns, assertions, and other types of subpattern, is 200. \n\nThe maximum length of a subject string is the largest positive number that an integer variable can hold. However, PCRE uses recursion to handle subpatterns and indefinite repetition. This means that the available stack space may limit the size of a subject string that can be processed by certain patterns. \n\nDifferences From Perl\n\nThe differences described here are with respect to Perl 5.005. \n\n1. By default, a whitespace character is any character that the C library function isspace() recognizes, though it is possible to compile PCRE with alternative character type tables. Normally \\fBisspace()\\fR matches space, formfeed, newline, carriage return, horizontal tab, and vertical tab. Perl 5 no longer includes vertical tab in its set of whitespace characters. The \\v escape that was in the Perl documentation for a long time was never in fact recognized. However, the character itself was treated as whitespace at least up to 5.002. In 5.004 and 5.005 it does not match \\s. \n\n2. PCRE does not allow repeat quantifiers on lookahead assertions. Perl permits them, but they do not mean what you might think. For example, (?!!a){3} does not assert that the next three characters are not 'a'. It just asserts that the next character is not 'a' three times. \n\n3. Capturing subpatterns that occur inside negative lookahead assertions are counted, but their entries in the offsets vector are never set. Perl sets its numerical variables from any such patterns that are matched before the assertion fails to match something (thereby succeeding), but only if the negative lookahead assertion contains just one branch. \n\n4. Though binary zero characters are supported in the subject string, they are not allowed in a pattern string because it is passed as a normal C string, terminated by zero. The escape sequence '\\0' can be used in the pattern to represent a binary zero. \n\n5. The following Perl escape sequences are not supported: \\l, \\u, \\L, \\U, \\E, \\Q. In fact these are implemented by Perl's general string-handling and are not part of its pattern matching engine. \n\n6. The Perl \\G assertion is not supported as it is not relevant to single pattern matches. \n\n7. Fairly obviously, PCRE does not support the (?{code}) construction. \n\n8. There are at the time of writing some oddities in Perl 5.005_02 concerned with the settings of captured strings when part of a pattern is repeated. For example, matching 'aba' against the pattern /^(a(b)?)+$/ sets $2 to the value 'b', but matching 'aabbaa' against /^(aa(bb)?)+$/ leaves $2 unset. However, if the pattern is changed to /^(aa(b(b))?)+$/ then $2 (and $3) get set. \n\nIn Perl 5.004 $2 is set in both cases, and that is also true of PCRE. If in the future Perl changes to a consistent state that is different, PCRE may change to follow. \n\n9. Another as yet unresolved discrepancy is that in Perl 5.005_02 the pattern /^(a)?(?(1)a|b)+$/ matches the string 'a', whereas in PCRE it does not. However, in both Perl and PCRE /^(a)?a/ matched against 'a' leaves $1 unset. \n\n10. PCRE provides some extensions to the Perl regular expression facilities: \n\n(a) Although lookbehind assertions must match fixed length strings, each alternative branch of a lookbehind assertion can match a different length of string. Perl 5.005 requires them all to have the same length. \n\n(b) If 'E' is set and 's' is not set, the $ meta- character matches only at the very end of the string. \n\n(c) If 'X' is set, a backslash followed by a letter with no special meaning is faulted. \n\n(d) If 'U' is set, the greediness of the repetition quantifiers is inverted, that is, by default they are not greedy, but if followed by a question mark they are. \n\"!\n]style[(16 4 41 4 14 91 15 828 12 30 11 727 21 3340)f1b,f1,bf3,f1,f2b,f1,f2b,f1,f2b,f1,f2b,f1,bf3,f1! !\n\n!Re methodsFor: 'documentation' stamp: 'acg 8/4/2002 12:56'!\nanOptionsComment \"\n\nCompilation and Matching Options\n\nMessage Name\t\t\tCode\tExplanation\n\nbeCaseSensitive\t\t\t-i\t\tCase sensitive matching\nbeNotCaseSensitive\t\ti\t\tIgnore case during matching\nbeNotMultiline\t\t\t-m\t\tAnchor chars don't match line ending\nbeMultiline\t\t\t\tm\t\tAnchor chars match on line ending\nbeNotDotIncludesNewline\t-s\t\t'.' does not match line ending\nbeDotIncludesNewline\ts\t\t'.' matches line endings\nbeNotExtended\t\t\t-x\t\textended mode off (see below)\nbeExtended\t\t\t\tx\t\textended mode on (see below)\nbeNotDollarEndOnly\t\t-E\t\t$ matches \\n before end of line\nbeDollarEndOnly\t\t\tE\t\t$ does not match \\n before end of line\nbeGreedy\t\t\t\t-U\t\tquantifiers have ordinary meaning\nbeNotGreedy\t\t\t\tU\t\treverses meaning of * and :*, also + and :+\nbeNotExtra\t\t\t\t-X\t\tPCRE Extra mode off (see below)\t\t\nbeExtra\t\t\t\t\tX\t\tPCRE Extra mode on (see below)\nbeNotAnchored\t\t\t-A\t\tMatches may begin anywhere\nbeAnchored\t\t\t\tA\t\tMatches must start with first character\nbeBeginningOfLine\t\t-B\t\tsubject starts at beginning of a line\nbeNotBeginningOfLine\tB\t\tsubject start not at beginning of a line\nbeEndOfLine\t\t\t\t-Z\t\tsubject end may be at end of line\nbeNotEndOfLine\t\t\tZ\t\tsubject end may not be at end of a line\n\nIn extended mode (beExtended), whitespace are ignored unless escaped, and # precedes comment to next newline.  PCRE Extra mode is described in detail in the accompanying documention.  Options may be changed at any time, but a pattern recompile occurs after changing the value any option other than anchored (A), beginning of line (B) or end of line (Z).\n\nOptions may be specified using messages or by Perl-style option codes:\n\n'a.*y' asRe\n\tbeNotCaseSensitive;\n\tbeDotIncludesNewline;\n\tsearch: 'CANDY IS ', Character cr asString, 'DANDY, BUT LIQUOR IS QUICKER'\n\n'a.*y' asRe\n\topt: 'is';\n\tsearch: 'CANDY IS ', Character cr asString, 'DANDY, BUT LIQUOR IS QUICKER'\n\n\"!\n]style[(17 1 1 1 33 1 33 15 82 14 96 23 85 13 83 18 98 8 104 14 36 1 47 17 87 20 106 15 761)f1b,f1,f1b,f1,bf3,bf1,bf2u,bf1,f1,bf1,f1,bf1,f1,bf1,f1,bf1,f1,bf1,f1,bf1,f1,bf1,f1,bf1,f1,bf1,f1,bf1,f1! !\n\n!Re methodsFor: 'documentation' stamp: 'acg 8/4/2002 13:35'!\nanReComment \"\n\nRe -- The RePlugin Pattern Matching Engine\n\nI.\tIntroduction\n\nRePlugin is a Squeak Plugin providing modern regular expression matching operations similar to those found in Perl. It was written by Andrew C. Greenberg (werdna@gate.net), with contributions by Markus Kohler, Stephen Pair and others. RePlugin 3.2 (and 'the Gory Details' portion of this document) is directly taken from Version 2.04 of the excellent PCRE library by Philip Hazel with only minor modifications.  A table of Re public methods and String convenience methods is available in Re anReMethodsComment.\n\nII.\tCreating a Pattern Matching Engine Object\n\nA pattern matcher for a pattern string may be created as follows:\n\n\tRe on: '\\w+'\n\nor by using the convenient String conversion method:\n\n\t'\\w+' asRe\n\nIII.\tUsing the Pattern Matching Engine Object\n\n\tA.\tSimple Searching.  A number of methods are provided for evaluating a target string with an engine.  To search a string:\n\n\t'\\w+' asRe search: 'this will select the first word from me'.\n\nwhich will return nil if not matched, or a ReMatch object corresponding to the match result information.  A substring can be searched with the following message:\n\n\t'\\w+' asRe \n\t\tsearch: 'this will select the second word' \n\t\tfrom: 5 \n\t\tto: 10\n\n\tB.\tGlobal Searching.  Methods are provided for collecting non-overlapping matches in a string.\n\n\t'\\w+' asRe searchAndCollect: 'this will give a collection of my words'\n\nor for doing a global search with more complex matching\n\n\t'\\w+' asRe \n\t\tsearch: 'makes a list of words in brackets' \n\t\tandCollect: [:m | '<', m match, '>']\n\n\tC.\tGlobal Replacement.  Methods are provided to globally search and substitute into a string.\n\n\t'\\w+' asRe \n\t\tsearch: 'makes a string with words in brackets' \n\t\tandReplace: [:m | '<', m match, '>']\n\nThere is a special case in the instance where the empty string is matched, because the 'next' match would begin in the same place, thereby creating an infinite loop. This case is handled as in Perl 5.004, where an empty string is replaced with the result of calling the block, and the next search begins after 'bumping' the string to the next character. Accordingly, \n\n\t'Thanks Markus and Steve for all your help' reMatch: 'x*' andReplace: [:m | '!!' ].\n\nwill answer: \n\n\t'!!T!!h!!a!!n!!k!!s!! !!M!!a!!r!!k!!u!!s!! !!a!!n!!d!! !!S!!t!!e!!v!!e!! !!f!!o!!r!! !!a!!l!!l!! !!y!!o!!u!!r!! !!h!!e!!l!!p!!'\n\nIV.\tSearch Engine Options\n\nThe pattern matching engine can be modified to match in a variety of different ways.  Re anOptionsComment describes those options in greater detail. Options may be set or reset using #be... and #beNot... messages.\n\n\t'a.*y' asRe\n\t\tbeNotCaseSensitive;\n\t\tbeDotIncludesNewline;\n\t\tsearch: 'CANDY IS ', Character cr asString, \n\t\t\t'DANDY, BUT LIQUOR IS QUICKER'\n\nor by using Perl-style option characters\n\n\t'a.*y' asRe\n\t\topt: 'is';\n\t\tsearch: 'CANDY IS ', Character cr asString, \n\t\t\t'DANDY, BUT LIQUOR IS QUICKER'\n\n\"!\n]style[(11 4 42 2 15 490 22 2 47 149 48 19 413 22 304 25 732 26 1 86 19 402)f1b,f1,f3b,f1,bf2,f1,f1LRe anReMethodsComment;,f1,f2b,f1,bf2,bf1,f1,f1b,f1,f1b,f1,bf2,f2b,f1,f1LRe anOptionsComment;,f1! !\n\n!Re methodsFor: 'documentation' stamp: 'acg 8/4/2002 11:35'!\nanReOverviewComment \"\n\nRePlugin -- A Regular Expressions Plugin for Squeak\n\nIntroduction\n\nRePlugin is a Squeak Plugin providing modern regular expression matching operations similar to those found in Perl. It was written by Andrew C. Greenberg (werdna@gate.net), with contributions by Markus Kohler, Stephen Pair and others. RePlugin 3.2 (and 'the Gory Details' portion of this document) is directly taken from Version 2.04 of the excellent PCRE library by Philip Hazel with only minor modifications.\n\nRePlugin, an Overview\n\nWhile the primary functionality (and documentation) for RePlugin is found in new classes RePattern and ReMatch and the operations set forth therein, a comprehensive set of convenience functions are provided in the String class for ease of use. \n\nA Simple Example to Get You Started\n\nAfter installing RePlugin, you can execute the following in a workspace: \n\n\t'Candy is dandy, but liquor is quicker.'  reMatch: 'a.*y'\n\nThis reMatch: message directs RePlugin to search the longer string for the leftmost occurrence of the letter 'a', followed by the longest string that can be collected thereafter comprising any characters, but ending in a 'y.' The message answers: \n\n\t a ReMatch('andy is dandy')\n\n(*blush*) which is an object of type ReMatch. As you shall see later, ReMatch objects can be saved to obtain a wide range of information about the match result. When printed, as here, it conveniently identifies the substring that was actually matched, which can also be obtained from the ReMatch instance by sending it the message match. (Note that the longer string 'andy is dandy' was matched, and not the shorter 'andy'.) If there was no match of the string, for example if the subject string were \n\n\t'You got 'y', but only after the 'a''\n\nthen the message would answer nil.  A common use of regular expression matching is simply to determine as a boolean result whether the pattern has been matched (similar to the #match method).  Accordingly, a convenience function is provided:\n\n\t('Candy is dandy, but liquor is quicker.' matchRe: 'a.*y') ifTrue: ['matched'] ifFalse: ['not matched']\n\nGlobal Searching and Replacing\n\nIt is sometimes convenient to ask ReMatch to repeatedly search for non-overlapping matches of a regular expression, and to report a collection of information with respect to each of the matches found. For example, the message: \n\n\t'Stupid is as stupid does.' reMatch: 'stupid' andCollect: [:m | m match ].\n\nThis message looks for occurrences of the regular expression 'stupid' in the subject string. Each time a match is found, the corresponding match object is passed to the block associated with the collect: keyword, and the results of those computations are returned in an OrderedCollection. Since the first occurrence begins with a capital, only one match is found. (You could collect all occurrences either by using a character class or the i modifier, for example, using the reMatch:opt:collect: message.) In this case, however, the answer will be: \n\n\tOrderedCollection ('stupid' )\n\nAs a somewhat more useful example, \n\n\t'Stupid is as stupid does.' reMatch: '\\w+' andCollect: [:m | m match ].\n\ncan be used to collect an ordered collection of all non-whitespace phrases in the string, in this case: \n\n \tOrderedCollection ('Stupid' 'is' 'as' 'stupid' 'does' )\n\nThis particular form (collecting matches) is used with such frequency that a convenience function is provided:\n\n\t'Stupid is as stupid does.' collectRe: '\\w+'\n \nSometimes you will want to substitute text for the matched text, which you can accomplish with the reMatch:collect: message and some fancy footwork, or which you can do quite easily, for example, as follows: \n\n\t'Stupid is as stupid does.' reMatch: 'stupid' opt: 'i' sub: [:m | 'Andy' ].\n\nwhich answers a string replacing all occurrences of stupid (because of the opt: 'i', the search is done without regard to case) with 'Andy', yielding: \n\n\t'Andy is as Andy does.'\n\nYou can also 'capture' text by surrounding regular expression subexpressions with parentheses. For example, consider the following expression: \n\n\t'    line has leading spaces' reMatch: '^\\W+(.*)'\n\nwhich answers \n\n\ta ReMatch('     line has leading spaces')\n\nThis would have little utility, since it merely copies the line of text entirely. But since RePlugin keeps track of which text is 'captured' by which parenthetical group, which is numbered in the order the left parenthesis appears in the string. These group matches can be seperately obtained by sending the resulting match object the message 'matchAt:,' for example: \n\n\t('    line has leading spaces' reMatch: '^\\W+(.*)') matchAt: 1\n\nwhich answers \n\n\t'line has leading spaces'\n\nThat is, the line without the leading white space. Indeed, RePlugin remembers these parenthetical captures during the match, so that you can check for double words as follows: \n\n\t'this line has has a double word' reMatch: '(\\w+)\\W+\\1'\n\nwhich matches \n\n\ta ReMatch('has has')\n\nThese and other regular expression operations are discussed in substantially greater detail below. \n\n\nMatching With RePlugin\n\nThe Principal Messages\n\nYou may call RePlugin in any of the following ways: \n\n\tsubjectString reMatch: pattern [from: from] [to: to] [opt: optionString]\n\tsubjectString reMatch: [opt: optionString] sub: aBlock [num: maxMatches]\n\tsubjectString reMatch: [opt: optionString] collect: aBlock [num: maxMatches]\n\nThe keywords in square brackets are optional, in the sense that messages are available with every combination of keywords shown, with and without the optional keywords. \n\nThe first message performs a single search on the substring of subjectString from from to to, using the modifiers set forth in optionString. If from: is not specified, then 1 is used, if to: is not specified, then subjectString size is used, and if opt: is not specified, then the empty string is used. \nIt should be noted that everywhere a pattern is permitted in these operations, either a string or compiled pattern object (an Re) may be used. If a string is used, then RePlugin will first search to see if the object was recently compiled, and if so, use that object, or if not, compiles the expression and remembers it for later reuse. If a compiled pattern object (an Re) is used, then that compiled object will be used, thereby avoiding recompilations and table lookups. \n\nThe second message performs repeated searches of subjectString for nonoverlapping matches of pattern, using compile and matching options optionString until no more matches are present or maxMatches have been found. (If maxMatches is less than zero, the number of matches will be limited only by the number of matches in the string.) Then, for each match found, replace the matched substring with the result of applying the corresponding match object to aBlock. If opt: is not specified, then the empty string is used, and if num: is not specified, then the equivalent of -1 is used. \n\nThere is a special case in the instance where the empty string is matched, because the 'next' match would begin in the same place, thereby creating an infinite loop. This case is handled as in Perl 5.004, where an empty string is replaced with the result of calling the block, and the next search begins after 'bumping' the string to the next character. Accordingly, \n\n\t'Thanks Markus and Steve for all your help' reMatch: 'x*' sub: [:m | '!!' ].  \n\nwill answer: \n\n\t'!!T!!h!!a!!n!!k!!s!! !!M!!a!!r!!k!!u!!s!! !!a!!n!!d!! !!S!!t!!e!!v!!e!! !!f!!o!!r!! !!a!!l!!l!! !!y!!o!!u!!r!! !!h!!e!!l!!p!!'\n\nFinally, the third message performs repeated searches of subjectString for nonoverlapping matches of pattern, using compile and matching options optionString until no more matches are present or maxMatches have been found. (If maxMatches is less than zero, the number of matches will be limited only by the number of matches in the string.) Then, for each match found, evalute aBlock with the corresponding matchObject, and maintain and then answer an ordered collection of the results in the order they were computed. If opt: is not specified, then the empty string is used, and if num: is not specified, then the equivalent of -1 is used. \n\nreMatch:collect: handles empty string in the same manner as reMatch:sub:, with the added proviso that an empty match will not be counted if it immediately follows a non-empty match. Accordingly \n\n\t'123' reMatch: '\\d*' collect: [:m | m match]\n\nanswers \n\n\tOrderedCollection ('123' )\n\nand not 'OrderedCollection ('123' ''),' although \n\n\t'123' reMatch: '\\d*' sub: [:m | '<', m match, '>']\n\nwill answer \n\n\t '<123><>'\n\nThese null match rules mirror the semantics of Perl 5's m/.../g and s/.../g operators. \n\nUsing ReMatch to Obtain Principal Match Information\n\nThe substring of the substring matched by re is given by: \n\n\tm match\n\nThe beginning and end of the substring in searchString is given by the messages from and to, respectively, so that the substring matched (the result of m match could be obtained with: \n\n \tm searchString\n\t\tcopyFrom: (m from)\n\t\tto: (m to)\n\n\nUsing ReMatch to Obtain Captured Groups (and Collections of Captured Groups)\n\nThe number of substrings capturable by a parenthetical grouping in an re (regardless of the number actually matched to create m) is given by: \n\n\tm numGroups\n\t\nThe string captured by parenthetical grouping i, where 1<=i<=(m numGroups) is given by \n\n\tm matchAt: i\n\nand this can be generated as follows: \n\n\tm searchString\n\t\tcopyFrom: (m fromAt: i)\n\t\tto: (m toAt: i)\n\nAnd an array of size (m numGroups) can be generated from strings and indices accordingly: \n\n\tm matches\n\tm froms\n\tm tos\n\n\nEfficient Regular Expression Matching\n\nRePattern tests for regular expression matching in three stages: \n\n1. Compiles the regular expression into a convenient internal form. \n2. Searches an object string or substring for matches. \n3. Produces results of queries on a match object. \n\nIf you intend to repeatedly matching a single regular expression against many different strings, for example each line of a file or element of a collection, then repeating Step 1, the compilation, would be wasteful and inefficient. RePattern avoids recompilation by keeping track of the last dozen or so compiled regular expressions, avoiding the costly process of recompilation. Unfortunately, this adds the (less inefficient) cost of a table lookup with each regular expression match. \n\nAccordingly, RePattern permits you to generate and keep 'compiled pattern objects,' for repeated matching against subsequent strings without recompiling or searching the compilation cache. You can create an compiled pattern object with the asRePattern message: \n\n\t'\\w+' asRePattern\n\nwhich answers \n\n\tan Re('\\w+\u0000')\n\nand the resulting pattern can be used wherever a pattern string can be used, except that no recompilation or table lookup occurs. The following: \n\n\tre := '\\w+' asRePattern\n\tmyCollection do: [:i|\n\t\tTranscript show: ((i reMatch: re) match); cr]\n\nwill be substantially faster than \n\n\tmyCollection do: [:i|\n\t\tTranscript show: ((i reMatch: '\\w+') match); cr]\n\nRegular Expression Syntax Summary\n\nA regular expression (or regexp) specifies a set of strings that matches it. Regular expressions can be concatenated to form new regular expressions; if A and B are both regular expressions, then AB is also an regular expression. If a string p matches A and another string q matches B, the string pq will match AB. Thus, complex expressions are easily constructed from simpler primitive expressions. \n\nRegular expressions can contain both special and ordinary characters. Most ordinary characters, like 'A', 'a', or '0', are the simplest regular expressions; they simply match themselves. You can concatenate ordinary characters, so last matches the string 'last'. \n\nSome characters, like '|' or '(', are special. Special characters either stand for classes of ordinary characters, or affect how the regular expressions around them are interpreted. \n\nThe special characters are: \n\n'.' \n(Dot.) In the default mode, this matches any character except a newline. If the 's' option has been specified, dot matches any character at all, including a newline. \n\n'^' \n(Caret.) Matches the start of the string, and if the 'm' option has been specified, then this also matches immediately after each newline. \n\n'$' \nMatches the end of the string, and if the 'm' option has been specified, then this also matches before a newline. foo matches both 'foo' and 'foobar', while the regular expression foo$ matches only 'foo'. \n\n'*' \nCauses the resulting regexp to match 0 or more repetitions of the preceding regexp, as many repetitions as are possible. ab* will match 'a', 'ab', or 'a' followed by any number of 'b's. \n\n'+' \nCauses the resulting regexp to match 1 or more repetitions of the preceding regexp. ab+ will match 'a' followed by any non-zero number of 'b's; it will not match just 'a'. \n\n'?' \nCauses the resulting regexp to match 0 or 1 repetitions of the preceding regexp. ab? will match either 'a' or 'ab'. \n\n*?, +?, ?? \nThe '*', '+', and '?' qualifiers are all greedy; they match as much text as possible. Sometimes this behaviour isn't desired; if the regexp <.*> is matched against '<H1>title</H1>', it will match the entire string, and not just '<H1>'. Adding '?' after the qualifier makes it perform the match in non-greedy or minimal fashion; as few characters as possible will be matched. Using .*? in the previous expression will match only '<H1>'. \n\n{m,n} \nCauses the resulting regexp to match from m to n repetitions of the preceding regexp, attempting to match as many repetitions as possible. For example, a{3,5} will match from 3 to 5 'a' characters. Omitting n specifies an infinite upper bound; you can't omit m. \n\n{m,n}? \nCauses the resulting regexp to match from m to n repetitions of the preceding regexp, attempting to match as few repetitions as possible. This is the non-greedy version of the previous qualifier. For example, on the 6-character string 'aaaaaa', a{3,5} will match 5 'a' characters, while a{3,5}? will only match 3 characters. \n\n'\\' \nEither escapes special characters (permitting you to match characters like '*', '?', and so forth), or signals a special sequence; special sequences are discussed below. \n\n[] \nUsed to indicate a set of characters. Characters can be listed individually, or a range of characters can be indicated by giving two characters and separating them by a '-'. Special characters are not active inside sets. For example, [akm$] will match any of the characters 'a', 'k', 'm', or '$'; [a-z] will match any lowercase letter, and [a-zA-Z0-9] matches any letter or digit. Character classes such as \\w or \\S(defined below) are also acceptable inside a range. If you want to include a ']' or a '-' inside a set, precede it with a backslash, or place it as the first character. The pattern []] will match ']', for example. \n\nYou can match the characters not within a range by complementing the set. This is indicated by including a '^' as the first character of the set; '^' elsewhere will simply match the '^' character. For example, [^5] will match any character except '5'. \n\n'|' \nA|B, where A and B can be arbitrary regexps, creates a regular expression that will match either A or B. This can be used inside groups (see below) as well. To match a literal '|', use \\|, or enclose it inside a character class, as in [|]. \n\n(...) \nMatches whatever regular expression is inside the parentheses, and indicates the start and end of a group; the contents of a group can be retrieved after a match has been performed, and can be matched later in the string with the \\number special sequence, described below. To match the literals '(' or '')', use \\( or \\), or enclose them inside a character class: [(] [)]. \n\n(?...) \nThis is an extension notation (a '?' following a '(' is not meaningful otherwise). The first character after the '?' determines what the meaning and further syntax of the construct is. Following are the currently supported extensions: \n\n(?imsx[-imsx]) \n(One or more letters from the set 'i', 'm', 's', 'x'.) The group matches the empty string and set (or unset if the letters follow a '-') corresponding options for the regular expression or subexpression in which it is contained. \n\n(?:...) \nA non-grouping version of regular parentheses. Matches whatever regular expression is inside the parentheses, but the substring matched by the group cannot be retrieved after performing a match or referenced later in the pattern. \n\n(?#...) \nA comment; the contents of the parentheses are simply ignored. \n\n(?=...) \nMatches if ... matches next, but doesn't consume any of the string. This is called a lookahead assertion. For example, Isaac (?=Asimov) will match 'Isaac\u0000' only if it's followed by 'Asimov'. \n\n(?!!...) \nMatches if ... doesn't match next. This is a negative lookahead assertion. For example, Isaac (?!!Asimov) will match 'Isaac\u0000' only if it's not followed by 'Asimov'. \n\n(?<=...) \nMatches if ... matches, but doesn't consume any of the string. This is called a lookbehind assertion. For example, (?<=foo|fooey)bar will match 'bar' only if it's preceded by 'foo' or 'fooey'. All lookbehinds must have some fixed length, although alternatives need not be of the same length, as in the example. \n\n(?<!!...) \nMatches if ... doesn't match, and doesn't consume any of the string. This is called a negative lookbehind assertion. For example, (?<=foo|fooey)bar will match 'bar' only if it's not preceded by 'foo' or 'fooey'. \n\n(?(condition)yes-pattern) \nMatches if condition is false or if condition is true and yes-pattern matches. \n\n(?(condition)yes-pattern|no-pattern) \nMatches if condition is true and yes-pattern matches, or if condition is false and no-pattern matches. \n\nThe special sequences consist of '\\' and a character from the list below. If the ordinary character is not on the list, then the resulting regexp will match the second character. For example, \\$ matches the character '$'. \n\n\\number \nMatches the contents of the group of the same number. Groups are numbered starting from 1. For example, (.+) \\1 matches 'the the' or '55 55', but not 'the end' (note the space after the group). This special sequence can only be used to match one of the first 99 groups. If the first digit of number is 0, or number is 3 octal digits long, it will not be interpreted as a group match, but as the character with octal value number. Inside the '[' and ']' of a character class, all numeric escapes are treated as characters. \n\\A \nMatches only at the start of the string. \n\\b \nMatches the empty string, but only at the beginning or end of a word. A word is defined as a sequence of alphanumeric characters, so the end of a word is indicated by whitespace or a non-alphanumeric character. \n\\B \nMatches the empty string, but only when it is not at the beginning or end of a word. \n\\d \nMatches any decimal digit; this is equivalent to the set [0-9]. \n\\D \nMatches any non-digit character; this is equivalent to the set [^0-9]. \n\\s \nMatches any whitespace character; this is equivalent to the set [ \\t\\n\\r\\f\\v]. \n\\S \nMatches any non-whitespace character; this is equivalent to the set [^ \\t\\n\\r\\f\\v]. \n\\w \nMatches any alphanumeric character; this is equivalent to the set [a-zA-Z0-9_]. \n\\W \nMatches any non-alphanumeric character; this is equivalent to the set [^a-zA-Z0-9_]. \n\n\\Z \nMatches only at the end of the string. \n\n\\\\ \nMatches a literal backslash. \n\n\nCompiler and Matching Option Modes Summary\n\n  i  for Caseless Matching Mode\n  m  for Multiline Mode\n  s  for Dotall Mode (Dot matches newlines)\n  x  for Extended Mode (whitespace not meaningful, comments permitted)\n  A  for Anchored mode\n  B  for NOTBOL mode (see below)\n  E  for 'Dollar end only' mode (see below)\n  U  for Ungreedy mode -- greediness of operators is reversed\n  X  for PCRE 'Extra' mode (see below)\n  Z  for NOTEOL mode (see below)\n\nOptions B and Z are available only when matching. Option A is available for both matching and compiling. The remaining options are available only for compiling patterns. \"!\n]style[(19 4 51 2 12 414 21 248 36 1307 30 17815)f1b,f1,f3b,f1,f2b,f1,f2b,f1,f2b,f1,f2b,f1! !\n\n!Re methodsFor: 'accessing' stamp: 'acg 7/30/2002 21:05'!\naction\n\n\t^action! !\n\n!Re methodsFor: 'accessing' stamp: 'acg 7/30/2002 21:05'!\naction: aBlock\n\n\taction _ aBlock! !\n\n!Re methodsFor: 'accessing' stamp: 'acg 8/4/2002 10:37'!\nasRe\n\n\t^self! !\n\n!Re methodsFor: 'accessing' stamp: 'acg 7/29/2002 13:34'!\ncompiledPattern\n\n\t^compiledPattern! !\n\n!Re methodsFor: 'accessing' stamp: 'acg 7/29/2002 13:35'!\ncompiledPattern: anRePattern\n\n\t^compiledPattern _ anRePattern! !\n\n!Re methodsFor: 'accessing' stamp: 'acg 7/30/2002 12:49'!\non: aPattern\n\n\tself pattern: aPattern! !\n\n!Re methodsFor: 'accessing' stamp: 'acg 7/29/2002 14:25'!\npattern\n\n\tcompiledPattern _ nil.\n\t^pattern! !\n\n!Re methodsFor: 'accessing' stamp: 'acg 7/29/2002 13:58'!\npattern: aString\n\n\tcompiledPattern _ nil.\n\tpattern _ aString! !\n\n!Re methodsFor: 'accessing' stamp: 'acg 7/30/2002 17:39'!\nsearchLimit\n\n\t^searchLimit! !\n\n!Re methodsFor: 'accessing' stamp: 'acg 7/30/2002 17:40'!\nsearchLimit: anInteger\n\n\tsearchLimit _ anInteger! !\n\n!Re methodsFor: 'accessing' stamp: 'acg 7/30/2002 12:57'!\nsearchString\n\n\t^searchString! !\n\n!Re methodsFor: 'accessing' stamp: 'acg 7/30/2002 21:38'!\nsearchString: aString\n\n\tsearchString _ aString.! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 21:50'!\nbeAnchored \n\n\tself isAnchored: true! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 21:50'!\nbeBeginningOfLine\n\n\tself isBeginningOfLine: true! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 21:51'!\nbeCaseSensitive\n\n\tself isCaseSensitive: true! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 21:51'!\nbeDollarEndOnly\n\n\tself isDollarEndOnly: true! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 21:51'!\nbeDotIncludesNewline\n\n\tself isDotIncludesNewline: true! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 21:51'!\nbeEndOfLine\n\n\tself isEndOfLine: true! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 21:51'!\nbeExtended\n\t\n\tself isExtended: true! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 21:53'!\nbeExtra \n\n\tself isExtra: true! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 21:54'!\nbeGreedy\n\n\tself isGreedy: true! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 21:54'!\nbeMultiline\n\n\tself isMultiline: true! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 21:54'!\nbeNotAnchored \n\n\tself isAnchored: false! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 21:55'!\nbeNotBeginningOfLine\n\n\tself isBeginningOfLine: false! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 21:55'!\nbeNotCaseSensitive\n\n\tself isCaseSensitive: false! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 21:56'!\nbeNotDollarEndOnly\n\n\tself isDollarEndOnly: false! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 21:56'!\nbeNotDotIncludesNewline\n\n\tself isDotIncludesNewline: false! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 21:57'!\nbeNotEndOfLine\n\n\tself isEndOfLine: false! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 21:57'!\nbeNotExtended\n\t\n\tself isExtended: false! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 21:57'!\nbeNotExtra\n\n\tself isExtra: false! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 21:57'!\nbeNotGreedy\n\n\tself isGreedy: false! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 21:57'!\nbeNotMultiline\n\n\tself isMultiline: false! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 11:40'!\nisAnchored \n\n\t^isAnchored! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 11:55'!\nisAnchored: aBoolean\n\n\tisAnchored _ aBoolean! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 22:01'!\nisBeginningOfLine\n\n\t^isBeginningOfLine! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 22:02'!\nisBeginningOfLine: aBoolean\n\n\tisBeginningOfLine == aBoolean \n\t\tifFalse:[compiledPattern _ nil].\n\tisBeginningOfLine _ aBoolean! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 12:06'!\nisCaseSensitive\n\n\t^isCaseSensitive! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 22:04'!\nisCaseSensitive: aBoolean\n\n\tisCaseSensitive == aBoolean \n\t\tifFalse:[compiledPattern _ nil].\n\tisCaseSensitive _ aBoolean! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 11:41'!\nisDollarEndOnly \n\n\t^isDollarEndOnly! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 22:05'!\nisDollarEndOnly: aBoolean\n\n\tisDollarEndOnly == aBoolean \n\t\tifFalse:[compiledPattern _ nil].\n\tisDollarEndOnly _ aBoolean! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 14:36'!\nisDotIncludesNewline\n\n\t^isDotIncludesNewline! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 22:07'!\nisDotIncludesNewline: aBoolean\n\n\tisDotIncludesNewline == aBoolean \n\t\tifFalse:[compiledPattern _ nil].\n\tisDotIncludesNewline _ aBoolean! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 11:42'!\nisEndOfLine\n\n\t^isEndOfLine! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 11:54'!\nisEndOfLine: aBoolean\n\n\tisEndOfLine _ aBoolean! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 11:42'!\nisExtended \n\n\t^isExtended! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 22:07'!\nisExtended: aBoolean\n\n\tisExtended == aBoolean \n\t\tifFalse:[compiledPattern _ nil].\n\tisExtended _ aBoolean! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 11:42'!\nisExtra \n\n\t^isExtra! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 22:08'!\nisExtra: aBoolean\n\n\tisExtra == aBoolean \n\t\tifFalse:[compiledPattern _ nil].\n\tisExtra _ aBoolean! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 11:42'!\nisGreedy\n\n\t^isGreedy! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 22:08'!\nisGreedy: aBoolean\n\n\tisGreedy == aBoolean \n\t\tifFalse:[compiledPattern _ nil].\n\tisGreedy _ aBoolean! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 11:42'!\nisMultiline\n\n\t^isMultiline! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 7/29/2002 22:08'!\nisMultiline: aBoolean\n\n\tisMultiline == aBoolean \n\t\tifFalse:[compiledPattern _ nil].\n\tisMultiline _ aBoolean! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 8/3/2002 10:47'!\nopt: aString\n\n\t| setOrReset |\n\tsetOrReset _ true.\n\taString do: [:ch |\n\t\tch = $-\n\t\t\tifTrue: [setOrReset _ setOrReset not]\n\t\t\tifFalse: [self setOptionForPCRECharacter: ch to: setOrReset]]! !\n\n!Re methodsFor: 'accessing options' stamp: 'acg 8/3/2002 10:46'!\nsetOptionForPCRECharacter: aCharacter to: aBoolean\n\n\taCharacter = $i ifTrue: [^self isCaseSensitive: aBoolean not].\n\taCharacter = $m ifTrue:[^self isMultiline: aBoolean].\n\taCharacter = $s ifTrue:[^self isDotIncludesNewline: aBoolean].\n\taCharacter = $x ifTrue:[^self isExtended: aBoolean].\n\taCharacter = $E ifTrue:[^self isDollarEndOnly: aBoolean].\n\taCharacter = $U ifTrue:[^self isGreedy: aBoolean not].\n\taCharacter = $X ifTrue:[^self isExtra: aBoolean].\n\taCharacter = $A ifTrue:[^self isAnchored: aBoolean].\n\taCharacter = $B ifTrue:[^self isBeginningOfLine: aBoolean not].\n\taCharacter = $Z ifTrue:[^self isEndOfLine: aBoolean not].\n\tError signal: '$', aCharacter asString, ' is not a PCRE option character.'\n! !\n\n!Re methodsFor: 'constants' stamp: 'acg 7/30/2002 10:43'!\nPCREANCHORED\n\n\t^16! !\n\n!Re methodsFor: 'constants' stamp: 'acg 7/30/2002 10:43'!\nPCRECASELESS\n\n\t^1\n\n! !\n\n!Re methodsFor: 'constants' stamp: 'acg 7/30/2002 10:44'!\nPCREDOLLARENDONLY\n\n\t^32\n! !\n\n!Re methodsFor: 'constants' stamp: 'acg 7/30/2002 10:44'!\nPCREDOTALL\n\n\t^4! !\n\n!Re methodsFor: 'constants' stamp: 'acg 7/30/2002 10:44'!\nPCREEXTENDED\n\n\t^8! !\n\n!Re methodsFor: 'constants' stamp: 'acg 7/30/2002 10:44'!\nPCREEXTRA\n\n\t^64\n! !\n\n!Re methodsFor: 'constants' stamp: 'acg 7/30/2002 10:44'!\nPCREMULTILINE\n\n\t^2! !\n\n!Re methodsFor: 'constants' stamp: 'acg 7/30/2002 10:45'!\nPCRENOTBOL\n\n\t^128! !\n\n!Re methodsFor: 'constants' stamp: 'acg 7/30/2002 10:45'!\nPCRENOTEOL\n\n\t^256! !\n\n!Re methodsFor: 'constants' stamp: 'acg 7/30/2002 11:44'!\nPCREUNGREEDY\n\n\t^512! !\n\n!Re methodsFor: 'constants' stamp: 'acg 7/30/2002 11:45'!\ncodedOptionsForCompile\n\n\t| optionCode |\n\n\toptionCode _ 0.\n\tisAnchored ifTrue: [optionCode _ optionCode bitOr: self PCREANCHORED].\n\n\tisCaseSensitive ifFalse: [optionCode _ optionCode bitOr: self PCRECASELESS].\n\tisMultiline ifTrue: [optionCode _ optionCode bitOr: self PCREMULTILINE].\n\tisDotIncludesNewline ifTrue: [optionCode _ optionCode bitOr: self PCREDOTALL].\n\tisExtended ifTrue: [optionCode _ optionCode bitOr: self PCREEXTENDED].\n\tisDollarEndOnly ifTrue: [optionCode _ optionCode bitOr: self PCREDOLLARENDONLY].\n\tisExtra ifTrue: [optionCode _ optionCode bitOr: self PCREEXTRA].\n\tisGreedy ifFalse: [optionCode _ optionCode bitOr: self PCREUNGREEDY].\n\n\t^optionCode\n! !\n\n!Re methodsFor: 'constants' stamp: 'acg 7/30/2002 11:46'!\ncodedOptionsForMatch\n\n\t| optionCode |\n\n\toptionCode _ 0.\n\n\tisAnchored ifTrue: [optionCode _ optionCode bitOr: self PCREANCHORED].\n\n\tisBeginningOfLine ifFalse: [optionCode _ optionCode bitOr: self PCRENOTBOL].\n\tisEndOfLine ifFalse: [optionCode _ optionCode bitOr: self PCRENOTEOL].\n\n\t^optionCode! !\n\n!Re methodsFor: 'compiling' stamp: 'acg 8/3/2002 11:36'!\nassureCompiledPattern\n\n\tcompiledPattern ifNil: [self compile].\n\t^compiledPattern! !\n\n!Re methodsFor: 'compiling' stamp: 'acg 8/1/2002 02:48'!\ncompile\n\n\tcompiledPattern _ RePattern new \n\t\tcompile: pattern \n\t\toptCode: self codedOptionsForCompile \n\t\tonErrorRun: [:x :y :errorString | Error signal: errorString].! !\n\n!Re methodsFor: 'searching' stamp: 'acg 8/3/2002 11:56'!\ncollectFrom: aString\n\n\t^self search: aString andCollect: [:m | m match]! !\n\n!Re methodsFor: 'searching' stamp: 'acg 8/6/2002 16:31'!\ngrepFrom: inStream\n\n\t^String streamContents: [:s | self grepFrom: inStream to: s]! !\n\n!Re methodsFor: 'searching' stamp: 'acg 8/6/2002 16:19'!\ngrepFrom: inStream to: outStream\n\n\t\"String streamContents: [:s |\n\t\t'a' asRe\n\t\t\tgrepFrom: (ReadStream on: 'this is a test\nof the emergency\nbroadcast system')\n\t\t\tto: s]\"\n\n\tself grepFrom: inStream\n\t\tto: outStream\n\t\tonMatch: [:s :m | s nextPutAll: m searchString; cr]\n\t\tonNonMatch: [:s :l | ]! !\n\n!Re methodsFor: 'searching' stamp: 'acg 8/6/2002 16:16'!\ngrepFrom: inStream to: outStream onMatch: matchBlock onNonMatch: nonMatchBlock\n\n\t| m line |\n\t[inStream atEnd] whileFalse:\n\t\t[(m _ self search: (line _ inStream nextLine))\n\t\t\tifNil: [nonMatchBlock value: outStream value: line]\n\t\t\tifNotNil: [matchBlock value: outStream value: m]]! !\n\n!Re methodsFor: 'searching' stamp: 'acg 8/3/2002 11:38'!\nsearch: aString\n\n\t^(self assureCompiledPattern)\n\t\tsearch: aString \n\t\tfrom: 1 \n\t\tto: aString size \n\t\toptCode: self codedOptionsForMatch! !\n\n!Re methodsFor: 'searching' stamp: 'acg 8/3/2002 11:41'!\nsearch: aString andCollect: aBlock\n\n\t^(self assureCompiledPattern)\n\t\tsearch: aString\n\t\toptCode: self codedOptionsForMatch\n\t\tcollect: aBlock! !\n\n!Re methodsFor: 'searching' stamp: 'acg 8/3/2002 11:45'!\nsearch: aString andCollect: aBlock matchCount: anInteger\n\n\t^(self assureCompiledPattern)\n\t\tsearch: aString\n\t\toptCode: self codedOptionsForMatch\n\t\tcollect: aBlock\n\t\tnum: anInteger! !\n\n!Re methodsFor: 'searching' stamp: 'acg 8/3/2002 23:36'!\nsearch: aString andReplace: aBlock\n\n\t^(self assureCompiledPattern)\n\t\tsearch: aString\n\t\toptCode: self codedOptionsForMatch\n\t\tsub: aBlock\n! !\n\n!Re methodsFor: 'searching' stamp: 'acg 8/3/2002 11:45'!\nsearch: aString andReplace: aBlock matchCount: anInteger\n\n\t^(self assureCompiledPattern)\n\t\tsearch: searchString\n\t\toptCode: self codedOptionsForMatch\n\t\tsub: action\n\t\tnum: anInteger\n\t\n! !\n\n!Re methodsFor: 'searching' stamp: 'acg 8/3/2002 11:37'!\nsearch: aString from: fromInteger to: toInteger\n\n\t^(self assureCompiledPattern)\n\t\tsearch: aString \n\t\tfrom: fromInteger \n\t\tto: toInteger \n\t\toptCode: self codedOptionsForMatch! !\n\n!Re methodsFor: 'searching' stamp: 'acg 8/3/2002 11:47'!\nsearchAndCollect: aString\n\n\t^self search: aString andCollect: [:m | m match]! !\n\n!Re methodsFor: 'printing' stamp: 'acg 7/29/2002 13:27'!\nprintBoolean: aBoolean named: aString on: aStream\n\n\taStream nextPut:$ .\n\taBoolean ifFalse: [aStream nextPutAll: 'NOT '].\n\taStream nextPutAll: aString.\n\taStream nextPut:$.! !\n\n!Re methodsFor: 'printing' stamp: 'acg 7/30/2002 12:09'!\nprintOn: aStream\n\n\taStream nextPutAll: 'an Re'.\n\tpattern ifNotNil:\n\t\t[aStream nextPutAll: ' for '''.\n\t\taStream nextPutAll: pattern.\n\t\taStream nextPutAll: ''''].\n\taStream nextPut: $(.\n\tself printBoolean: isAnchored named: 'anchored' on: aStream.\n\taStream nextPut: $/.\n\tself printBoolean: isCaseSensitive named: 'case sensitive' on: aStream.\n\tself printBoolean: isDollarEndOnly named: 'dollar end only' on: aStream.\n\tself printBoolean: isDotIncludesNewline named: 'dot includes newline' on: aStream.\n\tself printBoolean: isExtended named: 'extended' on: aStream.\n\tself printBoolean: isExtra named: 'extra' on: aStream.\n\tself printBoolean: isGreedy named: 'greedy' on: aStream.\n\tself printBoolean: isMultiline named: 'multiline' on: aStream.\n\taStream nextPut: $/.\n\tself printBoolean: isBeginningOfLine named: 'beginning of line' on: aStream.\n\tself printBoolean: isEndOfLine named: 'end of line' on: aStream.\n\tcompiledPattern ifNil: [aStream nextPutAll: ' NOT'].\n\taStream nextPutAll: ' compiled'.\t\n\taStream nextPut: $).! !\n\n!Re methodsFor: 'private' stamp: 'acg 8/11/2002 11:19'!\nbeStrangeOption! !\n\n!Re methodsFor: 'private' stamp: 'acg 7/30/2002 17:36'!\ninitialize\n\n\tpattern _ nil.\n\tself\n\t\tbeNotAnchored;\n\t\tbeCaseSensitive;\n\t\tbeNotDollarEndOnly;\n\t\tbeNotDotIncludesNewline;\n\t\tbeNotExtended;\n\t\tbeNotExtra;\n\t\tbeNotMultiline;\n\t\tbeBeginningOfLine;\n\t\tbeEndOfLine;\n\t\tbeGreedy.\n\taction _ [:m | m match].! !\n\n\n!Re class methodsFor: 'as yet unclassified' stamp: 'acg 7/29/2002 13:31'!\nnew\n\n\t^super new initialize! !\n\n!Re class methodsFor: 'as yet unclassified' stamp: 'acg 7/30/2002 12:50'!\non: aPattern\n\n\t^self new on: aPattern! !\n\n!Re class methodsFor: 'as yet unclassified' stamp: 'acg 7/30/2002 12:51'!\non: aPattern search: aString\n\n\t^(self on: aPattern)\n\t\tsearch: aString\n\t\tfrom: 1\n\t\tto: aString size! !\n\n!Re class methodsFor: 'as yet unclassified' stamp: 'acg 8/11/2002 23:34'!\nstatus\n\n\t| code |\n\t^String streamContents: [:s |\n\t\ts nextPutAll: 'RePlugin Statuts:'; cr.\n\t\ts nextPutAll: '===================='; cr.\n\t\ts nextPutAll: 'Plugin version: '; cr.\n\t\t#( '\\n' '\\r' '\\cj' ) do: [:eachCode |\n\t\t\tcode _ 0.\n\t\t\t[code <=255 and: [(eachCode asRe search: code asCharacter asString) isNil]]\n\t\t\t\twhileTrue: [code _ code + 1].\n\t\t\ts nextPutAll: eachCode, ' = ', code hex; cr]]! !\n\n\n!ReMatch methodsFor: 'accessing' stamp: 'acg 2/26/1999 23:57'!\nendpos\n\t\"Answer the final index of the substring of searchString searched to obtain me.\"\n\n\t^endpos! !\n\n!ReMatch methodsFor: 'accessing' stamp: 'acg 2/26/1999 23:57'!\npos\n\t\"Answer the initial index of the substring of searchString searched to obtain me.\"\n\n\t^pos! !\n\n!ReMatch methodsFor: 'accessing' stamp: 'acg 2/26/1999 23:55'!\nre\n\t\"Answer the re matched to obtain me.\"\n\n\t^re! !\n\n!ReMatch methodsFor: 'accessing' stamp: 'acg 2/26/1999 23:57'!\nsearchString\n\t\"Answer the substring searched to obtain me.\"\n\n\t^searchString! !\n\n!ReMatch methodsFor: 'principal matching' stamp: 'acg 3/15/1999 01:28'!\nfrom\n\t\"Answer the initial index of the substring matched by re.\"\n\n\t^self fromAt: 0! !\n\n!ReMatch methodsFor: 'principal matching' stamp: 'acg 3/15/1999 01:28'!\nmatch\n\t\"Answer the substring matched by re.\"\n\n\t^self matchAt: 0! !\n\n!ReMatch methodsFor: 'principal matching' stamp: 'acg 3/15/1999 01:29'!\nto\n\t\"Answer the final index of the substring matched by re.\"\n\n\t^self toAt: 0! !\n\n!ReMatch methodsFor: 'subgroup matching' stamp: 'acg 3/15/1999 01:24'!\nfromAt: anInteger\n\t\"Answer the initial index of the substring matching grouping anInteger, or nil if group was not matched.\"\n\n\t| offset fromIndex |\n\toffset _ 2 * anInteger.\n\t((fromIndex _ matchArray at: (offset + 1)) < 0)\n\t\tifTrue: [^nil].\n\t^ fromIndex + pos! !\n\n!ReMatch methodsFor: 'subgroup matching' stamp: 'acg 3/15/1999 01:24'!\nmatchAt: anInteger\n\t\"Answer the substring matching grouping anInteger, or nil if group was not matched.\"\n\n\t| offset fromIndex |\n\toffset _ 2 * anInteger.\n\t((fromIndex _ matchArray at: (offset + 1)) < 0)\n\t\tifTrue: [^nil].\n\t^ searchString\n\t\tcopyFrom: (fromIndex + pos)\n\t\tto: ((matchArray at: (offset + 2)) + pos - 1).! !\n\n!ReMatch methodsFor: 'subgroup matching' stamp: 'acg 3/15/1999 01:24'!\nnumGroups\n\t\"Answer the number SubGroups (not including the entire match) potentially matched by re, whether actually matched or not.\"\n\n\t^ ((matchArray size) // 3) - 1! !\n\n!ReMatch methodsFor: 'subgroup matching' stamp: 'acg 3/15/1999 01:24'!\ntoAt: anInteger\n\t\"Answer the final index of the substring matching grouping anInteger, or nil if group was not matched.\"\n\n\t| offset |\n\toffset _ 2 * anInteger.\n\t((matchArray at: (offset + 1)) < 0)\n\t\tifTrue: [^nil].\n\t^ (matchArray at: (offset + 2)) + pos - 1! !\n\n!ReMatch methodsFor: 'subgroup collections' stamp: 'acg 2/26/1999 23:52'!\nfroms\n\t\"Answer an Array of initial indices of grouping substrings as matched, or nil, respectively.\"\n\n\t^(Array new: (self numGroups))\n\t\tcollectWithIndex: [:n :i | self fromAt: i].! !\n\n!ReMatch methodsFor: 'subgroup collections' stamp: 'acg 2/26/1999 23:53'!\nmatches\n\t\"Answer an Array of grouping substrings as matched, or nil, respectively.\"\n\n\t^(Array new: (self numGroups))\n\t\tcollectWithIndex: [:n :i | self matchAt: i].! !\n\n!ReMatch methodsFor: 'subgroup collections' stamp: 'acg 2/26/1999 23:53'!\ntos\n\t\"Answer an Array of final indices of grouping substrings as matched, or nil, respectively.\"\n\n\t^(Array new: (self numGroups))\n\t\tcollectWithIndex: [:n :i | self toAt: i].! !\n\n!ReMatch methodsFor: 'private' stamp: 'acg 3/15/1999 01:29'!\nmatchArray: anIntegerArray forRe: aRePattern \nonString: aString from: startInteger to: stopInteger \n\t\"Initialize an instance of me in accordance with the parameters.\"\n\n\tmatchArray _ anIntegerArray copy.\n\tre _ aRePattern.\n\tsearchString _ aString.\n\tpos _ startInteger.\n\tendpos _ stopInteger.\n! !\n\n!ReMatch methodsFor: 'printing' stamp: 'acg 3/7/1999 08:04'!\nprintOn: aStream\n\n\taStream nextPutAll: 'a '.\n\t(self species) printOn: aStream.\n\taStream nextPut: $(.\n\t(self match) printOn: aStream.\n\taStream nextPut: $).! !\n\n\n!ReMatch class methodsFor: 'instance creation' stamp: 'acg 2/25/1999 20:41'!\nmatchArray: anIntegerArray forRe: aRePattern \nonString: aString from: startInteger to: stopInteger \n\n\t^super new \n\t\tmatchArray: anIntegerArray \n\t\tforRe: aRePattern \n\t\tonString: aString \n\t\tfrom: startInteger \n\t\tto: stopInteger \n! !\n\n!ReMatch class methodsFor: 'pattern matching' stamp: 'acg 3/7/1999 07:56'!\nsearch: subjString match: patString opt: oStr \n\n\t|re|\n\tre _ RePattern \n\t\t\ton: patString \n\t\t\topt: (oStr select: [:ch| 'imsxAEUX' includes: ch]).\n\t^ re \n\t\tsearch: subjString \n\t\topt: (oStr select: [:ch| 'ABZ' includes: ch])! !\n\n!ReMatch class methodsFor: 'pattern matching' stamp: 'acg 3/7/1999 07:56'!\nsearch: subjString match: patString opt: oStr from: startInteger to: stopInteger \n\n\t|re|\n\tre _ RePattern \n\t\t\ton: patString \n\t\t\topt: (oStr select: [:ch| 'imsxAEUX' includes: ch]).\n\t^ re \n\t\tsearch: subjString \n\t\tfrom: startInteger\n\t\tto: stopInteger\n\t\topt: (oStr select: [:ch| 'ABZ' includes: ch])! !\n\n!ReMatch class methodsFor: 'deprecated' stamp: 'acg 2/28/1999 02:23'!\non: srchString search: subjString\n\n\t^ self \n\t\ton: srchString \n\t\tsearch: subjString \n\t\topt: ''! !\n\n!ReMatch class methodsFor: 'deprecated' stamp: 'acg 2/28/1999 02:23'!\non: srchString search: subjString from: startInteger\n\n\t^ self \n\t\ton: srchString \n\t\tsearch: subjString \n\t\tfrom: startInteger\n\t\tto: (subjString size)\n\t\topt: ''! !\n\n!ReMatch class methodsFor: 'deprecated' stamp: 'acg 2/28/1999 02:23'!\non: srchString search: subjString from: startInteger opt: optString\n\n\t^ self \n\t\ton: srchString \n\t\tsearch: subjString \n\t\tfrom: startInteger\n\t\tto: (subjString size)\n\t\topt: optString! !\n\n!ReMatch class methodsFor: 'deprecated' stamp: 'acg 2/28/1999 02:23'!\non: srchString search: subjString from: startInteger to: stopInteger\n\n\t^ self \n\t\ton: srchString \n\t\tsearch: subjString \n\t\tfrom: startInteger\n\t\tto: stopInteger\n\t\topt: ''! !\n\n!ReMatch class methodsFor: 'deprecated' stamp: 'acg 2/28/1999 04:38'!\non: srchString search: subjString from: startInteger to: stopInteger opt: optString\n\n\t|re|\n\tre _ RePattern \n\t\t\ton: srchString \n\t\t\topt: (optString select: [:ch| 'imsxAEUX' includes: ch]).\n\t^ re \n\t\tsearch: subjString \n\t\tfrom: startInteger\n\t\tto: stopInteger\n\t\topt: (optString select: [:ch| 'ABZ' includes: ch])! !\n\n!ReMatch class methodsFor: 'deprecated' stamp: 'acg 2/28/1999 04:38'!\non: srchString search: subjString opt: optString\n\n\t|re|\n\tre _ RePattern \n\t\t\ton: srchString \n\t\t\topt: (optString select: [:ch| 'imsxAEUX' includes: ch]).\n\t^ re \n\t\tsearch: subjString \n\t\topt: (optString select: [:ch| 'ABZ' includes: ch])! !\n\n\n!RePattern methodsFor: 'documentation' stamp: 'acg 8/3/2002 23:21'!\naGeneralComment \"\n\nPerl-Style Regular Expressions in Smalltalk\nby Andrew C. Greenberg\n\nUse of RePattern directly is deprecated.  For versions 3.2 and upward, class Re serves as the primary interface.  RePattern will likely be deleted or supplanted in future versions.\"!\n]style[(19 44 24 77 2 102)f1b,bf3,bf2,f1,f1LRe Comment;,f1! !\n\n!RePattern methodsFor: 'accessing' stamp: 'acg 2/28/1999 00:42'!\npattern\n\t\"Answer the pattern I am setup to match.\"\n\n\t^ pattern! !\n\n!RePattern methodsFor: 'searching' stamp: 'acg 2/27/1999 02:53'!\nsearch: aString\n\t\"Answer nil if I don't match aString using standard options.  Otherwise return an appropriate ReMatch.\"\n\n\t^ self search: aString opt: ''! !\n\n!RePattern methodsFor: 'searching' stamp: 'acg 2/26/1999 23:16'!\nsearch: aString from: anInteger\n\t\"Answer nil if I don't match the substring of aString beginning at anInteger using standard options.  Otherwise return an appropriate ReMatch.\"\n\n\t^ self\n\t\tsearch: aString\n\t\tfrom: anInteger\n\t\tto: (aString size)\n\t\topt: ''! !\n\n!RePattern methodsFor: 'searching' stamp: 'acg 2/26/1999 23:18'!\nsearch: srchString from: anInteger opt: optString\n\t\"Answer nil if I don't match the substring of srchString beginning at anInteger using options specified by optString.  Otherwise return an appropriate ReMatch.\"\n\n\t^ self\n\t\tsearch: srchString\n\t\tfrom: anInteger\n\t\tto: (srchString size)\n\t\topt: optString! !\n\n!RePattern methodsFor: 'searching' stamp: 'acg 2/26/1999 23:16'!\nsearch: aString from: posInteger to: endposInteger\n\t\"Answer nil if I don't match the substring of aString beginning at posInteger and ending at endposInteger using standard options.  Otherwise return an appropriate ReMatch.\"\n\n\t^self \n\t\tsearch: aString\n\t\tfrom: posInteger\n\t\tto: endposInteger\n\t\topt: ''! !\n\n!RePattern methodsFor: 'searching' stamp: 'acg 2/28/1999 02:02'!\nsearch: aString from: posInteger to: endposInteger opt: matchOptString\n\t\"Answer nil if I don't match the substring of srchString beginning at posInteger and ending at endposInteger using options specified by optString.  Otherwise return an appropriate ReMatch.\"\n\n\tmatchOptions _ self evalMatchString: matchOptString.\n\tlastMatchResult _ self \n\t\tprimPCREExec: aString from: posInteger to: endposInteger.\n\t(lastMatchResult < 0) ifTrue: [^nil].\n\t^ReMatch \n\t\tmatchArray: matchSpace\n\t\tforRe: self \n\t\tonString: aString\n\t\tfrom: posInteger\n\t\tto: endposInteger\n! !\n\n!RePattern methodsFor: 'searching' stamp: 'acg 2/26/1999 23:17'!\nsearch: srchString opt: optString\n\t\"Answer nil if I don't match srchString using options specified by optString.  Otherwise return an appropriate ReMatch.\"\n\n\tmatchOptions _ self evalMatchString: optString.\n\tlastMatchResult _ self \n\t\tprimPCREExec: srchString.\n\t(lastMatchResult < 0) ifTrue: [^nil].\n\t^ReMatch \n\t\tmatchArray: matchSpace\n\t\tforRe: self \n\t\tonString: srchString\n\t\tfrom: 1\n\t\tto: (srchString size)! !\n\n!RePattern methodsFor: 'global searching' stamp: 'acg 3/7/1999 16:26'!\nsearch: aString collect: aBlock\n\n\t^self search: aString opt: '' collect: aBlock\n! !\n\n!RePattern methodsFor: 'global searching' stamp: 'acg 3/7/1999 16:27'!\nsearch: aString collect: aBlock num: limitInteger\n\n\t^self search: aString opt: '' collect: aBlock num: limitInteger! !\n\n!RePattern methodsFor: 'global searching' stamp: 'acg 3/7/1999 16:25'!\nsearch: aString opt: optString collect: aBlock\n\"Sequentially search aString until no more matches are found.  Begin a subsequent search immediately where the preceding search ends, but handle empty matches specially as described below.  Answer an OrderedCollection of the result of applying aBlock to each match, or nil if no matches were found.\n\nFor example:\n\n\t(RePattern on: 'x+')\n\t\tgsearch: 'x xx xxx xxxxx xxxxxx'\n\t\topt: '' \n\t\tcollect: [:m | m match] \nAnswers: \t\n\n\tOrderedCollection ('x' 'xx' 'xxx' 'xxxxx' 'xxxxxx' )\n\nAfter an empty string is matched, a subsequent search would attain the same result.  Accordingly, we simply bump the search one character in such cases.  Additionally, we do not count as a match empty matches which are adjacent to a preceding match.\" \n\n\t| from to m results lastMatchFrom matchesSoFar |\n\taString ifNil: [^nil].\n\tfrom _ 1. to _ aString size. lastMatchFrom _ -1. matchesSoFar _ 0.\n\tresults  _ OrderedCollection new.\n\n\t[from <= (to+1)]\n\t\twhileTrue: [\n\t\t\t(m _ self search: aString from: from to: to opt: optString)\n\t\t\t\tifNil: [\n\t\t\t\t\t(0 = results size) ifTrue: [^nil].\n\t\t\t\t\t^results]\n\t\t\t\tifNotNil: [\n\t\t\t\t\tmatchesSoFar _ matchesSoFar + 1.\n\t\t\t\t\tfrom _ (m to) + 1.\n\t\t\t\t\t(0 = m match size)\n\t\t\t\t\t\tifTrue: [ \"Handle an empty match\"\n\t\t\t\t\t\t\tfrom _ from + 1.\n\t\t\t\t\t\t\t(lastMatchFrom = m from) \n\t\t\t\t\t\t\t\tifFalse: [results add:(aBlock value: m)]]\n\t\t\t\t\t\tifFalse: [ \"Handle a non-empty match\"\n\t\t\t\t\t\t\tlastMatchFrom _ from. \n\t\t\t\t\t\t\tresults add:(aBlock value: m)]]].\n\t^results! !\n\n!RePattern methodsFor: 'global searching' stamp: 'acg 3/7/1999 16:25'!\nsearch: aString opt: optString collect: aBlock num: limitInteger\n\"Sequentially search aString until no more matches are found, or limitInteger matches are found, whichever occurs first.  Begin a subsequent searche immediately where the preceding search ended, but handle empty specially as described below.  Answer an OrderedCollection of the result of applying aBlock to each match, or nil if no matches were found.\n\nFor example:\n\n\t(RePattern on: 'x+')\n\t\tgsearch: 'x  xx xxx xxxxx xxxxxx'\n\t\topt: '' \n\t\tcollect: [:m | m match] \n\t\tnum: 3 \n\nAnswers: \t\n\n\tOrderedCollection ('x' 'xx' 'xxx' )\n\nAfter an empty string is matched, a subsequent search would attain the same result.  Accordingly, we simply bump the search one character in such cases.  Additionally, we do not count as a match empty matches which are adjacent to a preceding match.\" \n\n\t| from to m results lastMatchFrom matchesSoFar |\n\taString ifNil: [^nil].\n\t((limitInteger isNil) or: [limitInteger < 0]) ifTrue: [^self gsearch: aString opt: optString].\n\tfrom _ 1. to _ aString size. lastMatchFrom _ -1. matchesSoFar _ 0.\n\tresults  _ OrderedCollection new.\n\n\t[(from <= (to+1)) and: [matchesSoFar < limitInteger]]\n\t\twhileTrue: [\n\t\t\t(m _ self search: aString from: from to: to opt: optString)\n\t\t\t\tifNil: [\n\t\t\t\t\t(0 = results size) ifTrue: [^nil].\n\t\t\t\t\t^results]\n\t\t\t\tifNotNil: [\n\t\t\t\t\tfrom _ (m to) + 1.\n\t\t\t\t\t(0 = m match size)\n\t\t\t\t\t\tifTrue: [ \"Handle an empty match\"\n\t\t\t\t\t\t\tfrom _ from + 1.\n\t\t\t\t\t\t\t(lastMatchFrom = m from) \n\t\t\t\t\t\t\t\tifFalse: [ \"empty match not adjacent preceding match\"\n\t\t\t\t\t\t\t\t\tmatchesSoFar _ matchesSoFar + 1.\n\t\t\t\t\t\t\t\t\tresults add:(aBlock value: m)]]\n\t\t\t\t\t\tifFalse: [ \"Handle a non-empty match\"\n\t\t\t\t\t\t\tmatchesSoFar _ matchesSoFar + 1.\n\t\t\t\t\t\t\tlastMatchFrom _ from. \n\t\t\t\t\t\t\tresults add:(aBlock value: m)]]].\n\n\t(0 = results size) ifTrue: [^nil].\n\t^results! !\n\n!RePattern methodsFor: 'global searching' stamp: 'acg 3/14/1999 21:18'!\nsearch: aString opt: optString sub: aBlock\n\n\t|start m result |\n\tstart _ 1.\n\tm _ self search: aString from: start opt: optString.\n\tresult _ WriteStream on: (String new).\n\t[m isNil]\n\t\twhileFalse: [\n\t\t\t((m from) > start) \n\t\t\t\tifTrue: [ result nextPutAll: (aString copyFrom: start to: ((m from) - 1))].\n\t\t\t0 = m match size\n\t\t\t\tifTrue: [\n\t\t\t\t\tstart > aString size ifTrue: [\n\t\t\t\t\t\tresult nextPutAll: (aBlock value: m). \n\t\t\t\t\t\t^result contents].\n\t\t\t\t\tresult nextPutAll: (aBlock value: m); nextPut: (aString at: start).\n\t\t\t\t\tstart _ start + 1]\n\t\t\t\tifFalse: [\n\t\t\t\t\tresult nextPutAll: (aBlock value: m).\n\t\t\t\t\tstart _ (m to) + 1].\n\t\t\tm _ self search: aString from: start opt: optString].\n\t(start <= (aString size))\n\t\tifTrue: [result nextPutAll: (aString copyFrom: start to: (aString size))].\n\t^(result contents)\n\t\t\t! !\n\n!RePattern methodsFor: 'global searching' stamp: 'acg 3/14/1999 21:51'!\nsearch: aString opt: optString  sub: aBlock num: limitInteger\n\n\t|start m result numMatchesSoFar |\n\tstart _ 1. numMatchesSoFar _ 0.\n\t((limitInteger isNil) or: [limitInteger < 0]) ifTrue: [^self gsearch: aString opt: optString].\n\tm _ self search: aString from: start opt: optString.\n\tresult _ WriteStream on: (String new).\n\t[(m isNil) or: [numMatchesSoFar >= limitInteger]]\n\t\twhileFalse: [\n\t\t\tnumMatchesSoFar _ numMatchesSoFar + 1.\n\t\t\t((m from) > start) \n\t\t\t\tifTrue: [ result _ result , (aString copyFrom: start to: ((m from) - 1))].\n\t\t\t0 = m match size\n\t\t\t\tifTrue: [\n\t\t\t\t\tstart > aString size ifTrue: [\n\t\t\t\t\t\tresult nextPutAll: (aBlock value: m). \n\t\t\t\t\t\t^result contents].\n\t\t\t\t\tresult nextPutAll: (aBlock value: m); nextPut: (aString at: start).\n\t\t\t\t\tstart _ start + 1]\n\t\t\t\tifFalse: [\n\t\t\t\t\tresult nextPutAll: (aBlock value: m).\n\t\t\t\t\tstart _ (m to) + 1].\n\t\t\tm _ self search: aString from: start opt: optString].\n\t(start <= (aString size))\n\t\tifTrue: [result nextPutAll: (aString copyFrom: start to: (aString size))].\n\t^(result contents)! !\n\n!RePattern methodsFor: 'global searching' stamp: 'acg 3/7/1999 16:28'!\nsearch: aString sub: aBlock\n\n\t^self search: aString opt: '' sub: aBlock! !\n\n!RePattern methodsFor: 'global searching' stamp: 'acg 3/7/1999 16:28'!\nsearch: aString sub: aBlock num: limitInteger\n\n\t^self search: aString opt: '' sub: aBlock num: limitInteger! !\n\n!RePattern methodsFor: 'methods for RE' stamp: 'acg 7/30/2002 11:51'!\nsearch: aString from: posInteger to: endposInteger optCode: matchOptionsInteger\n\n\t\"Answer nil if I don't match the substring of srchString beginning at posInteger and ending at endposInteger using options specified by optString.  Otherwise return an appropriate ReMatch.\"\n\n\tmatchOptions _ matchOptionsInteger.\n\tlastMatchResult _ self \n\t\tprimPCREExec: aString from: posInteger to: endposInteger.\n\t(lastMatchResult < 0) ifTrue: [^nil].\n\t^ReMatch \n\t\tmatchArray: matchSpace\n\t\tforRe: self \n\t\tonString: aString\n\t\tfrom: posInteger\n\t\tto: endposInteger\n! !\n\n!RePattern methodsFor: 'methods for RE' stamp: 'acg 7/30/2002 17:31'!\nsearch: aString optCode: anInteger collect: aBlock\n\"Sequentially search aString until no more matches are found.  Begin a subsequent search immediately where the preceding search ends, but handle empty matches specially as described below.  Answer an OrderedCollection of the result of applying aBlock to each match, or nil if no matches were found.\n\nFor example:\n\n\t(RePattern on: 'x+')\n\t\tgsearch: 'x xx xxx xxxxx xxxxxx'\n\t\topt: '' \n\t\tcollect: [:m | m match] \nAnswers: \t\n\n\tOrderedCollection ('x' 'xx' 'xxx' 'xxxxx' 'xxxxxx' )\n\nAfter an empty string is matched, a subsequent search would attain the same result.  Accordingly, we simply bump the search one character in such cases.  Additionally, we do not count as a match empty matches which are adjacent to a preceding match.\" \n\n\t| from to m results lastMatchFrom matchesSoFar |\n\taString ifNil: [^nil].\n\tfrom _ 1. to _ aString size. lastMatchFrom _ -1. matchesSoFar _ 0.\n\tresults  _ OrderedCollection new.\n\n\t[from <= (to+1)]\n\t\twhileTrue: [\n\t\t\t(m _ self search: aString from: from to: to optCode: anInteger)\n\t\t\t\tifNil: [\n\t\t\t\t\t(0 = results size) ifTrue: [^nil].\n\t\t\t\t\t^results]\n\t\t\t\tifNotNil: [\n\t\t\t\t\tmatchesSoFar _ matchesSoFar + 1.\n\t\t\t\t\tfrom _ (m to) + 1.\n\t\t\t\t\t(0 = m match size)\n\t\t\t\t\t\tifTrue: [ \"Handle an empty match\"\n\t\t\t\t\t\t\tfrom _ from + 1.\n\t\t\t\t\t\t\t(lastMatchFrom = m from) \n\t\t\t\t\t\t\t\tifFalse: [results add:(aBlock value: m)]]\n\t\t\t\t\t\tifFalse: [ \"Handle a non-empty match\"\n\t\t\t\t\t\t\tlastMatchFrom _ from. \n\t\t\t\t\t\t\tresults add:(aBlock value: m)]]].\n\t^results! !\n\n!RePattern methodsFor: 'methods for RE' stamp: 'acg 7/30/2002 17:33'!\nsearch: aString optCode: optInteger collect: aBlock num: limitInteger\n\"Sequentially search aString until no more matches are found, or limitInteger matches are found, whichever occurs first.  Begin a subsequent searche immediately where the preceding search ended, but handle empty specially as described below.  Answer an OrderedCollection of the result of applying aBlock to each match, or nil if no matches were found.\n\nFor example:\n\n\t(RePattern on: 'x+')\n\t\tgsearch: 'x  xx xxx xxxxx xxxxxx'\n\t\topt: '' \n\t\tcollect: [:m | m match] \n\t\tnum: 3 \n\nAnswers: \t\n\n\tOrderedCollection ('x' 'xx' 'xxx' )\n\nAfter an empty string is matched, a subsequent search would attain the same result.  Accordingly, we simply bump the search one character in such cases.  Additionally, we do not count as a match empty matches which are adjacent to a preceding match.\" \n\n\t| from to m results lastMatchFrom matchesSoFar |\n\taString ifNil: [^nil].\n\t((limitInteger isNil) or: [limitInteger < 0]) \n\t\tifTrue: [^self search: aString optCode: optInteger collect: aBlock].\n\tfrom _ 1. to _ aString size. lastMatchFrom _ -1. matchesSoFar _ 0.\n\tresults  _ OrderedCollection new.\n\n\t[(from <= (to+1)) and: [matchesSoFar < limitInteger]]\n\t\twhileTrue: [\n\t\t\t(m _ self search: aString from: from to: to optCode: optInteger)\n\t\t\t\tifNil: [\n\t\t\t\t\t(0 = results size) ifTrue: [^nil].\n\t\t\t\t\t^results]\n\t\t\t\tifNotNil: [\n\t\t\t\t\tfrom _ (m to) + 1.\n\t\t\t\t\t(0 = m match size)\n\t\t\t\t\t\tifTrue: [ \"Handle an empty match\"\n\t\t\t\t\t\t\tfrom _ from + 1.\n\t\t\t\t\t\t\t(lastMatchFrom = m from) \n\t\t\t\t\t\t\t\tifFalse: [ \"empty match not adjacent preceding match\"\n\t\t\t\t\t\t\t\t\tmatchesSoFar _ matchesSoFar + 1.\n\t\t\t\t\t\t\t\t\tresults add:(aBlock value: m)]]\n\t\t\t\t\t\tifFalse: [ \"Handle a non-empty match\"\n\t\t\t\t\t\t\tmatchesSoFar _ matchesSoFar + 1.\n\t\t\t\t\t\t\tlastMatchFrom _ from. \n\t\t\t\t\t\t\tresults add:(aBlock value: m)]]].\n\n\t(0 = results size) ifTrue: [^nil].\n\t^results! !\n\n!RePattern methodsFor: 'methods for RE' stamp: 'acg 7/30/2002 21:01'!\nsearch: aString optCode: anInteger sub: aBlock\n\n\t|start m result |\n\tstart _ 1.\n\tm _ self search: aString from: 1 to: aString size optCode: anInteger.\n\tresult _ WriteStream on: (String new).\n\t[m isNil]\n\t\twhileFalse: [\n\t\t\t((m from) > start) \n\t\t\t\tifTrue: [ result nextPutAll: (aString copyFrom: start to: ((m from) - 1))].\n\t\t\t0 = m match size\n\t\t\t\tifTrue: [\n\t\t\t\t\tstart > aString size ifTrue: [\n\t\t\t\t\t\tresult nextPutAll: (aBlock value: m). \n\t\t\t\t\t\t^result contents].\n\t\t\t\t\tresult nextPutAll: (aBlock value: m); nextPut: (aString at: start).\n\t\t\t\t\tstart _ start + 1]\n\t\t\t\tifFalse: [\n\t\t\t\t\tresult nextPutAll: (aBlock value: m).\n\t\t\t\t\tstart _ (m to) + 1].\n\t\t\tm _ self search: aString from: start to: aString size optCode: anInteger].\n\t(start <= (aString size))\n\t\tifTrue: [result nextPutAll: (aString copyFrom: start to: (aString size))].\n\t^(result contents)\n\t\t\t! !\n\n!RePattern methodsFor: 'methods for RE' stamp: 'acg 7/30/2002 21:19'!\nsearch: aString optCode: anInteger  sub: aBlock num: limitInteger\n\n\t|start m result numMatchesSoFar |\n\tstart _ 1. numMatchesSoFar _ 0.\n\t((limitInteger isNil) or: [limitInteger < 0]) ifTrue: \n\t\t[^self search: aString optCode: anInteger  sub: aBlock].\n\tm _ self search: aString from: start to: aString size optCode: anInteger.\n\tresult _ WriteStream on: (String new).\n\t[(m isNil) or: [numMatchesSoFar >= limitInteger]]\n\t\twhileFalse: [\n\t\t\tnumMatchesSoFar _ numMatchesSoFar + 1.\n\t\t\t((m from) > start) \n\t\t\t\tifTrue: [ result nextPutAll: (aString copyFrom: start to: ((m from) - 1))].\n\t\t\t0 = m match size\n\t\t\t\tifTrue: [\n\t\t\t\t\tstart > aString size ifTrue: [\n\t\t\t\t\t\tresult nextPutAll: (aBlock value: m). \n\t\t\t\t\t\t^result contents].\n\t\t\t\t\tresult nextPutAll: (aBlock value: m); nextPut: (aString at: start).\n\t\t\t\t\tstart _ start + 1]\n\t\t\t\tifFalse: [\n\t\t\t\t\tresult nextPutAll: (aBlock value: m).\n\t\t\t\t\tstart _ (m to) + 1].\n\t\t\tm _ self search: aString from: start to: aString size optCode: anInteger].\n\t(start <= (aString size))\n\t\tifTrue: [result nextPutAll: (aString copyFrom: start to: (aString size))].\n\t^(result contents)! !\n\n!RePattern methodsFor: 'constants' stamp: 'acg 2/24/1999 01:00'!\nPCREANCHORED\n\n\t^16! !\n\n!RePattern methodsFor: 'constants' stamp: 'acg 2/24/1999 00:59'!\nPCRECASELESS\n\n\t^1\n\n! !\n\n!RePattern methodsFor: 'constants' stamp: 'acg 2/24/1999 01:00'!\nPCREDOLLARENDONLY\n\n\t^32\n! !\n\n!RePattern methodsFor: 'constants' stamp: 'acg 2/24/1999 00:59'!\nPCREDOTALL\n\n\t^4! !\n\n!RePattern methodsFor: 'constants' stamp: 'acg 2/24/1999 00:59'!\nPCREEXTENDED\n\n\t^8! !\n\n!RePattern methodsFor: 'constants' stamp: 'acg 2/28/1999 04:35'!\nPCREEXTRA\n\n\t^64\n! !\n\n!RePattern methodsFor: 'constants' stamp: 'acg 2/24/1999 00:59'!\nPCREMULTILINE\n\n\t^2! !\n\n!RePattern methodsFor: 'constants' stamp: 'acg 2/28/1999 04:36'!\nPCRENOTBOL\n\n\t^128! !\n\n!RePattern methodsFor: 'constants' stamp: 'acg 2/28/1999 04:36'!\nPCRENOTEOL\n\n\t^256! !\n\n!RePattern methodsFor: 'constants' stamp: 'acg 2/28/1999 04:36'!\nPCREUNGREEDY\n\n\t^512! !\n\n!RePattern methodsFor: 'primitives' stamp: 'acg 8/11/2002 23:42'!\nprimGetModuleName\n\n\t<primitive: 'getModuleName' module: 'rePlugin'>\n\t^nil! !\n\n!RePattern methodsFor: 'primitives' stamp: 'acg 2/24/1999 23:48'!\nprimPCRECompile\n\n\t<primitive: 'primPCRECompile' module: 'rePlugin'>\n\t^RePlugin doPrimitive: 'primPCRECompile'! !\n\n!RePattern methodsFor: 'primitives' stamp: 'acg 2/24/1999 23:10'!\nprimPCREExec: aCharBufferObject\n\n\t<primitive: 'primPCREExec' module: 'rePlugin'>\n\t^RePlugin doPrimitive: 'primPCREExec'\n! !\n\n!RePattern methodsFor: 'primitives' stamp: 'acg 2/26/1999 20:58'!\nprimPCREExec: aCharBufferObject from: fromInteger to: toInteger\n\n\t<primitive: 'primPCREExecfromto' module: 'rePlugin'>\n\t^RePlugin doPrimitive: 'primPCREExecfromto'\n! !\n\n!RePattern methodsFor: 'primitives' stamp: 'acg 2/25/1999 00:05'!\nprimPCRENumSubPatterns\n\n\t<primitive: 'primPCRENumSubPatterns' module: 'rePlugin'>\n\t^RePlugin doPrimitive: 'primPCRENumSubPatterns'\n! !\n\n!RePattern methodsFor: 'private' stamp: 'acg 2/28/1999 01:41'!\ncompile: aString\n\t\"Initialize me so I can match aString using standard options.  If the compile fails, display an appropriate notifier and answer nil.  Otherwise answer self.\"\n\n\t^self compile: aString opt: ''.! !\n\n!RePattern methodsFor: 'private' stamp: 'acg 2/28/1999 01:40'!\ncompile: aString opt: optString\n\t\"Initialize me so I can match aString using options specified in optString.  If the compile fails, display an appropriate notifier and answer nil.  Otherwise answer self.\"\n\n\t^self \n\t\tcompile: aString \n\t\topt: optString\n\t\tonErrorRun: [:pat :off :err | self error: err. ^nil].! !\n\n!RePattern methodsFor: 'private' stamp: 'acg 7/28/2002 23:27'!\ncompile: aString opt: optString onErrorRun: aBlock\n\t\"Initialize me so I can match aString using options specified in optString.  If the compile of aString fails, send aBlock the following message:\n\n\taBlock value: aString value: anInteger value: anErrorString\n\nwhere, anInteger is the offset in aString where the error was identified, and anErrorString is a descriptive error message.  Answer nil if compiles fails, otherwise self.\"\n\n\tpattern _ (aString, (Character characterTable at: 1) asString). \"Must be Zero-Terminated\"\n\tcompileOptions _ self evalCompileString: optString onErrorRun: aBlock.\n\tpcrePointer _ extraPointer _ errorString _ offset _ nil.\n\tmatchOptions _ 0.\n\t(self primPCRECompile)\n\t\tifNotNil: [aBlock value: pattern value: offset value: errorString].\n\tmatchSpace _ IntegerArray new: 3 * ( 1 + (self primPCRENumSubPatterns)).\n\t^ self.! !\n\n!RePattern methodsFor: 'private' stamp: 'acg 7/30/2002 11:52'!\ncompile: aString optCode: anInteger onErrorRun: aBlock\n\t\"Initialize me so I can match aString using options specified in optString.  If the compile of aString fails, send aBlock the following message:\n\n\taBlock value: aString value: anInteger value: anErrorString\n\nwhere, anInteger is the offset in aString where the error was identified, and anErrorString is a descriptive error message.  Answer nil if compiles fails, otherwise self.\"\n\n\tpattern _ (aString, (Character characterTable at: 1) asString). \"Must be Zero-Terminated\"\n\tcompileOptions _ anInteger.\n\tpcrePointer _ extraPointer _ errorString _ offset _ nil.\n\tmatchOptions _ 0.\n\t(self primPCRECompile)\n\t\tifNotNil: [aBlock value: pattern value: offset value: errorString].\n\tmatchSpace _ IntegerArray new: 3 * ( 1 + (self primPCRENumSubPatterns)).\n\t^ self.! !\n\n!RePattern methodsFor: 'private' stamp: 'acg 3/12/1999 22:18'!\nevalCompileString: aString onErrorRun: aBlock\n\t\"Answer an integer recognized by PCRE, and representing the compile time codes indicated in aString.  For details about the codes, see the comments for the corresponding constant function.  If aString contains unrecognized options, sent a message to aBlock\"\n\n\t|result|\n\tresult _ 0.\n\taString doWithIndex: [:ch :index|\n\t\t\"Traditional Perl Options\"\n\t\t(ch == $i) ifTrue: [result _ result bitOr: (self PCRECASELESS)].\n\t\t(ch == $m) ifTrue: [result _ result bitOr: (self PCREMULTILINE)].\n\t\t(ch == $s) ifTrue: [result _ result bitOr: (self PCREDOTALL)].\n\t\t(ch == $x) ifTrue: [result _ result bitOr: (self PCREEXTENDED)].\n\t\t\"PCRE Extensions\"\n\t\t(ch == $A) ifTrue: [result _ result bitOr: (self PCREANCHORED)].\n\t\t(ch == $E) ifTrue: [result _ result bitOr: (self PCREDOLLARENDONLY)].\n\t\t(ch == $U) ifTrue: [result _ result bitOr: (self PCREUNGREEDY)].\n\t\t(ch == $X) ifTrue: [result _ result bitOr: (self PCREEXTRA)].\n\t\t('imsxABEUXZ' includes: ch) \n\t\t\tifFalse: [\n\t\t\t\taBlock \n\t\t\t\t\tvalue: aString \n\t\t\t\t\tvalue: index \n\t\t\t\t\tvalue: ('Invalid RE Compile Option: ', ch asString)]].\n\t^result! !\n\n!RePattern methodsFor: 'private' stamp: 'acg 2/28/1999 00:56'!\nevalMatchString: aString\n\t\"Answer an integer recognized by PCRE, and representing the match time codes indicated in aString.  For details about the codes, see the comments for the corresponding constant function.  If aString contains unrecognized options, display a notifier\"\n\n\t^self \n\t\tevalMatchString: aString\n\t\tonErrorRun: [:source :index :message | self error: message]! !\n\n!RePattern methodsFor: 'private' stamp: 'acg 3/12/1999 22:18'!\nevalMatchString: aString onErrorRun: aBlock\n\t\"Answer an integer recognized by PCRE, and representing the match time codes indicated in aString.  For details about the codes, see the comments for the corresponding constant function.  If aString contains unrecognized options, sent a message to aBlock\"\n\n\t|result|\n\tresult _ 0.\n\taString doWithIndex: [:ch :index |\n\t\t(ch == $A) ifTrue: [result _ result bitOr: (self PCREANCHORED)].\n\t\t(ch == $B) ifTrue: [result _ result bitOr: (self PCRENOTBOL)].\n\t\t(ch == $Z) ifTrue: [result _ result bitOr: (self PCRENOTEOL)].\n\t\t('imsxABEUXZ' includes: ch) \n\t\t\tifFalse: [\n\t\t\t\taBlock \n\t\t\t\t\tvalue: aString \n\t\t\t\t\tvalue: index \n\t\t\t\t\tvalue: ('Invalid RE Match Option: ', ch asString)]].\n\t^result! !\n\n!RePattern methodsFor: 'private' stamp: 'acg 2/27/1999 22:24'!\nmemoryState\n\t\"Answer a report of the malloc:/free: engine (for tracking memory leaks)\"\n\n\t^String cr, \n\t\t((self primNumAllocs) asString), ' Allocations', String cr,\n\t\t((self primNumFrees) asString), ' Frees', String cr,\n\t\t((self primNetMemory) asString), ' Net Memory Taken', String cr! !\n\n!RePattern methodsFor: 'private' stamp: 'acg 2/25/1999 08:37'!\nprimLastAlloc\n\n\t<primitive: 'primLastAlloc' module: 'rePlugin'>\n\t^RePlugin doPrimitive: 'primLastAlloc'\n! !\n\n!RePattern methodsFor: 'private' stamp: 'acg 2/21/1999 23:15'!\nprimNetMemory\n\n\t<primitive: 'primNetMemory' module: 'rePlugin'>\n\t^RePlugin doPrimitive: 'primNetMemory'\n! !\n\n!RePattern methodsFor: 'private' stamp: 'acg 2/21/1999 23:15'!\nprimNumAllocs\n\n\t<primitive: 'primNumAllocs' module: 'rePlugin'>\n\t^RePlugin doPrimitive: 'primNumAllocs'\n! !\n\n!RePattern methodsFor: 'private' stamp: 'acg 2/21/1999 23:15'!\nprimNumFrees\n\n\t<primitive: 'primNumFrees' module: 'rePlugin'>\n\t^RePlugin doPrimitive: 'primNumFrees'\n! !\n\n!RePattern methodsFor: 'printing' stamp: 'acg 3/7/1999 08:04'!\nprintOn: aStream\n\n\taStream nextPutAll: 'a '.\n\t(self species) printOn: aStream.\n\taStream nextPut: $(.\n\t(self pattern) printOn: aStream.\n\taStream nextPut: $).! !\n\n!RePattern methodsFor: 'deprecated' stamp: 'acg 3/2/1999 07:58'!\ngsearch: aString\n\n\t^self gsearch: aString opt: ''.! !\n\n!RePattern methodsFor: 'deprecated' stamp: 'acg 3/1/1999 08:33'!\ngsearch: aString collect: aBlock\n\n\t| collection |\n\tcollection _ self gsearch: aString.\n\t^collection\n\t\tifNil: [nil]\n\t\tifNotNil: [collection collect: aBlock]\n\t\t\t! !\n\n!RePattern methodsFor: 'deprecated' stamp: 'acg 3/2/1999 09:47'!\ngsearch: aString opt: optString\n\"Answer Collection of MatchObjects resulting sequential searches of aString for matches to me, or nil if there are no matches.  Do not include empty matches that are adjacent to a previous match.\"\n\n\t| from to m results lastMatchFrom |\n\taString ifNil: [^nil].\n\tfrom _ 1. to _ aString size. lastMatchFrom _ -1.\n\tresults  _ OrderedCollection new.\n\n\t[from <= (to+1)]\n\t\twhileTrue: [\n\t\t\t(m _ self search: aString from: from to: to opt: optString)\n\t\t\t\tifNil: [\n\t\t\t\t\t(0 = results size) ifTrue: [^nil].\n\t\t\t\t\t^results]\n\t\t\t\tifNotNil: [\n\t\t\t\t\tfrom _ (m to) + 1.\n\t\t\t\t\t(0 = m match size) \n\t\t\t\t\t\tifTrue: [\n\t\t\t\t\t\t\tfrom _ from + 1.\n\t\t\t\t\t\t\t(lastMatchFrom = m from) ifFalse: [results add:m]]\n\t\t\t\t\t\tifFalse: [lastMatchFrom _ from. results add:m]]].\n\t^results! !\n\n!RePattern methodsFor: 'deprecated' stamp: 'acg 3/7/1999 15:41'!\ngsearch: aString opt: optString num: limitInteger\n\"Answer Collection of MatchObjects resulting sequential searches of aString for up to limitInteger matches to me, or nil if there are no matches at all.  Do not include empty matches that are adjacent to a previous match.\"\n\n\t| from to m results lastMatchFrom matchesSoFar |\n\taString ifNil: [^nil].\n\t((limitInteger isNil) or: [limitInteger < 0]) ifTrue: [^self gsearch: aString opt: optString].\n\tfrom _ 1. to _ aString size. lastMatchFrom _ -1. matchesSoFar _ 0.\n\tresults  _ OrderedCollection new.\n\n\t[(from <= (to+1)) and: [matchesSoFar < limitInteger]]\n\t\twhileTrue: [\n\t\t\t(m _ self search: aString from: from to: to opt: optString)\n\t\t\t\tifNil: [\n\t\t\t\t\t(0 = results size) ifTrue: [^nil].\n\t\t\t\t\t^results]\n\t\t\t\tifNotNil: [\n\t\t\t\t\tfrom _ (m to) + 1.\n\t\t\t\t\t(0 = m match size) \n\t\t\t\t\t\tifTrue: [\n\t\t\t\t\t\t\tfrom _ from + 1.\n\t\t\t\t\t\t\t(lastMatchFrom = m from) ifFalse: [results add:m]]\n\t\t\t\t\t\tifFalse: [lastMatchFrom _ from. results add:m]]].\n\t^results! !\n\n!RePattern methodsFor: 'deprecated' stamp: 'acg 2/28/1999 05:21'!\ngsearch: aString sub: aBlock\n\n\t^self gsearch: aString sub: aBlock opt: ''! !\n\n!RePattern methodsFor: 'deprecated' stamp: 'acg 3/2/1999 00:55'!\ngsearch: aString sub: aBlock opt: optString\n\n\t|start m result |\n\tstart _ 1.\n\tm _ self search: aString from: start opt: optString.\n\tresult _ ''.\n\t[m isNil]\n\t\twhileFalse: [\n\t\t\t((m from) > start) \n\t\t\t\tifTrue: [ result _ result , (aString copyFrom: start to: ((m from) - 1))].\n\t\t\t0 = m match size\n\t\t\t\tifTrue: [\n\t\t\t\t\tstart > aString size ifTrue: [^ result].\n\t\t\t\t\tresult _ result , (aString at: start) asString.\n\t\t\t\t\tstart _ start + 1]\n\t\t\t\tifFalse: [\n\t\t\t\t\tresult _ result , (aBlock value: m).\n\t\t\t\t\tstart _ (m to) + 1].\n\t\t\tm _ self search: aString from: start opt: optString].\n\t(start <= (aString size))\n\t\tifTrue: [result _ result, (aString copyFrom: start)].\n\t^result\n\t\t\t! !\n\n!RePattern methodsFor: 'deprecated' stamp: 'acg 3/7/1999 16:21'!\ngsearch: aString sub: aBlock opt: optString num: limitInteger\n\n\t|start m result |\n\tstart _ 1.\n\tm _ self search: aString from: start opt: optString.\n\tresult _ ''.\n\t[m isNil]\n\t\twhileFalse: [\n\t\t\t((m from) > start) \n\t\t\t\tifTrue: [ result _ result , (aString copyFrom: start to: ((m from) - 1))].\n\t\t\t0 = m match size\n\t\t\t\tifTrue: [\n\t\t\t\t\tstart > aString size ifTrue: [^ result].\n\t\t\t\t\tresult _ result , (aString at: start) asString.\n\t\t\t\t\tstart _ start + 1]\n\t\t\t\tifFalse: [\n\t\t\t\t\tresult _ result , (aBlock value: m).\n\t\t\t\t\tstart _ (m to) + 1].\n\t\t\tm _ self search: aString from: start opt: optString].\n\t(start <= (aString size))\n\t\tifTrue: [result _ result, (aString copyFrom: start)].\n\t^result\n\t\t\t! !\n\n!RePattern methodsFor: 'deprecated' stamp: 'acg 2/27/1999 22:22'!\ninitialize: aString\n\t\"Initialize me so I can match aString using standard options.  If the compile fails, display an appropriate notifier and answer nil.  Otherwise answer self.\"\n\n\t^self initialize: aString opt: ''.! !\n\n!RePattern methodsFor: 'deprecated' stamp: 'acg 2/27/1999 22:22'!\ninitialize: aString opt: optString\n\t\"Initialize me so I can match aString using options specified in optString.  If the compile fails, display an appropriate notifier and answer nil.  Otherwise answer self.\"\n\n\t^self \n\t\tinitialize: aString \n\t\topt: optString\n\t\tonErrorRun: [:pat :off :err | self error: err. ^nil].! !\n\n!RePattern methodsFor: 'deprecated' stamp: 'acg 2/27/1999 22:21'!\ninitialize: aString opt: optString onErrorRun: aBlock\n\t\"Initialize me so I can match aString using options specified in optString.  If the compile of aString fails, send aBlock the following message:\n\n\taBlock value: aString value: anInteger value: anErrorString\n\nwhere, anInteger is the offset in aString where the error was identified, and anErrorString is a descriptive error message.  Answer nil if compiles fails, otherwise self.\"\n\n\tpattern _ (aString, (Character characterTable at: 1) asString). \"Must be Zero-Terminated\"\n\tcompileOptions _ self evalCompileString: optString onErrorRun: aBlock.\n\tpcrePointer _ extraPointer _ errorString _ offset _ nil.\n\tmatchOptions _ 0.\n\t(self primPCRECompile)\n\t\tifNotNil: [aBlock value: pattern value: offset value: errorString].\n\tmatchSpace _ IntegerArray new: 3 * ( 1 + (self primPCRENumSubPatterns)).\n\t^ self.! !\n\n!RePattern methodsFor: 'deprecated' stamp: 'acg 2/27/1999 00:34'!\ninitializePattern: aPatString\n\n\t^self\n\t\tinitializePattern: aPatString \n\t\tonErrorRun:  [:pat :off :err | self error: err. ^nil].! !\n\n!RePattern methodsFor: 'deprecated' stamp: 'acg 7/21/2002 17:26'!\ninitializePattern: aPatString onErrorRun: aBlock\n\n\t|pstr delimiter patStream optionString optionCode |\n\tpstr _ ReadStream on: aPatString.\n\n\t\"Get and check the delimiter\"\n\tdelimiter _ pstr next.\n\t('!!@#$%^&*()_+-=[]{}|;:''\"/?,.<>`~' includes: delimiter)\n\t\tifFalse: [\n\t\t\tself error: (\n\t\t\t\t'rePattern: improper delimiter ',\n\t\t\t\t(delimiter asString),\n\t\t\t\t' in pattern ',\n\t\t\t\taPatString)].\n\n\t\"Get the pattern string, permit delimiter to be escaped with $\\\"\n\tpatStream _ ReadWriteStream on: (String new: (aPatString size)).\n\tpatStream nextPutAll: (pstr upTo: delimiter).\n\t[$\\ = (pstr last)]\n\t\twhileTrue: [\n\t\t\tpatStream nextPut: delimiter. \n\t\t\tpatStream nextPutAll:(pstr upTo: delimiter)].\n\n\t\"Get and verify the option string\"\n\toptionString _ pstr upToEnd.\n\toptionCode _ 0.\n\toptionString do: [:ch | \n\t\t(ch = 'i') ifTrue: [optionCode _ optionCode bitOr: (self PCRECASELESS)].\n\t\t(ch = 'm') ifTrue: [optionCode _ optionCode bitOr: (self PCREMULTILINE)].\n\t\t(ch = 's') ifTrue: [optionCode _ optionCode bitOr: (self PCREDOTALL)].\n\t\t(ch = 'x') ifTrue: [optionCode _ optionCode bitOr: (self PCREEXTENDED)].\n\t\t('imsx' includes: ch)\n\t\t\tifFalse: [\n\t\t\t\tself error: (\n\t\t\t\t\t'rePattern: improper option ', \n\t\t\t\t\t(ch asString) ,\n\t\t\t\t\t' in pattern ',\n\t\t\t\t\toptionString)].].\n\n\t^self initialize: patStream contents opt: optionCode onErrorRun: aBlock.! !\n\n\n!RePattern class methodsFor: 'instance creation' stamp: 'acg 3/7/1999 08:00'!\non: aString\n\t\"Answer an instance of a compiled re for matching aString under Standard options.  If compile fails, display an appropriate notifier.\"\n\n\t^self \n\t\tsearch: aString \n\t\topt: ''\n\t\tifAbsentAdd:[self new compile: aString].! !\n\n!RePattern class methodsFor: 'instance creation' stamp: 'acg 3/6/1999 11:43'!\non: aString opt: optString\n\t\"Answer an instance of a compiled re for matching aString under the options specified by optString.  If compile fails, display an appropriate notifier.\"\n\n\t^ self \n\t\tsearch: aString \n\t\topt: optString\n\t\tifAbsentAdd: [self new compile: aString opt: optString]! !\n\n!RePattern class methodsFor: 'instance creation' stamp: 'acg 3/7/1999 08:00'!\non: aString opt: optString onErrorRun: aBlock\n\"Answer an instance of a compiled re for matching aString under the options specified by optString.  If compile fails, send aBlock the following message:\n\n\taBlock value: aString value: anInteger value: anErrorString\n\nwhere, anInteger is the offset in aString where the error was identified, and anErrorString is a descriptive error message.\n\"\n\n\t^self \n\t\tsearch: aString \n\t\topt: optString\n\t\tifAbsentAdd:[self new \n\t\t\tcompile: aString\n\t\t\topt: optString \n\t\t\tonErrorRun: aBlock]! !\n\n!RePattern class methodsFor: 'pattern caching' stamp: 'acg 3/6/1999 11:52'!\ndebugReport\n\n\t^ String cr,\n\t\t'Front: ', (Front asString), String cr,\n\t\t'Patterns: ', (Patterns asString), String cr,\n\t\t'Options: ', (Options asString), String cr,\n\t\t'CompileObjects: ', (CompileObjects asString), String cr.! !\n\n!RePattern class methodsFor: 'pattern caching' stamp: 'acg 8/11/2002 14:36'!\ninitialize\n\n\tself initializeCache\n\t! !\n\n!RePattern class methodsFor: 'pattern caching' stamp: 'acg 3/6/1999 21:18'!\ninitializeCache\n\n\t|size |\n\tsize _ self queueSize.\n\tPatterns _ Array new: size.\n\tOptions _ Array new: size.\n\tCompileObjects _ Array new: size.\n\tFront _ size.\n\t! !\n\n!RePattern class methodsFor: 'pattern caching' stamp: 'acg 3/6/1999 16:52'!\nprimCacheSearch: pStr opt: oStr\n\n\t<primitive: 'primCacheSearch' module: 'rePlugin'>\n\t^RePlugin doPrimitive: 'primCacheSearch'\n! !\n\n!RePattern class methodsFor: 'pattern caching' stamp: 'acg 3/6/1999 12:11'!\nqueueSize\n\n\t^10! !\n\n!RePattern class methodsFor: 'pattern caching' stamp: 'acg 3/7/1999 08:03'!\nsearch: pStr opt: oStr ifAbsentAdd: aBlock\n\n\t|result |\n\tpStr ifNil: [^nil].\n\tPatterns withIndexDo: [:p :i | \n\t\t((p = pStr) and: [(Options at: i) = oStr])\n\t\t\t\tifTrue:[^CompileObjects at: i]].\n\tresult _ aBlock value.\n\t(Front == (self queueSize))\n\t\tifTrue: [Front _ 1]\n\t\tifFalse: [Front _ Front + 1].\n\tPatterns at: Front put: pStr.\n\tOptions at: Front put: oStr.\n\tCompileObjects at: Front put: result.\n\t^result! !\n\n\n!RePlugin methodsFor: 're primitives' stamp: 'acg 3/12/1999 23:36'!\nprimPCRECompile\n\n\"<rcvr primPCRECompile>, where rcvr is an object with instance variables:\n\n\t'patternStr compileFlags pcrePtr extraPtr errorStr errorOffset matchFlags'\t\n\nCompile the regular expression in patternStr, and if the compilation is successful, attempt to optimize the compiled expression.  Store the results in <pcrePtr> and <extratr>, or fill errorStr with a meaningful errorString and errorOffset with an indicator where the error was found, applying compileFlags throughout.  Answer nil with a clean compile (regardless of whether an optimization is possible, and answer with the string otherwise.\"\n\n\n\tself export: true.\n\tself loadRcvrFromStackAt: 0.\n\tpatternStrPtr _ self rcvrPatternStrPtr.\n\tcompileFlags _ self rcvrCompileFlags.\n\tinterpreterProxy failed ifTrue:[^ nil].\n\n\tpcrePtr _ self cCode: '(int) pcre_compile(patternStrPtr, compileFlags, \n\t\t\t\t\t&errorStrBuffer, &errorOffset, NULL)'.\n\tpcrePtr\n\t\tifTrue: [\n\t\t\tself allocateByteArrayAndSetRcvrPCREPtrFromPCRE: pcrePtr.\n\t\t\textraPtr _ self cCode: '(int) pcre_study((pcre *)pcrePtr, compileFlags, &errorStrBuffer)'.\n\t\t\tself allocateByteArrayAndSetRcvrExtraPtrFrom: extraPtr.\n\t\t\tself rePluginFree: (self cCoerce: pcrePtr to: 'void *').\n\t\t\textraPtr ifTrue: [self rePluginFree: (self cCoerce: extraPtr to: 'void *')].\n\t\t\tinterpreterProxy failed ifTrue:[^ nil].\n\t\t\tinterpreterProxy pop: 1 thenPush: interpreterProxy nilObject]\n\t\tifFalse: [\n\t\t\terrorStr _ self allocateStringAndSetRcvrErrorStrFromCStr: errorStrBuffer.\n\t\t\tself rcvrErrorOffsetFrom: errorOffset.\n\t\t\tinterpreterProxy failed ifTrue:[^ nil].\n\t\t\tinterpreterProxy pop: 1 thenPush: errorStr].! !\n\n!RePlugin methodsFor: 're primitives' stamp: 'acg 2/27/1999 01:08'!\nprimPCREExec\n\n\"<rcvr primPCREExec: searchObject>, where rcvr is an object with instance variables:\n\n\t'patternStr compileFlags pcrePtr extraPtr errorStr errorOffset matchFlags'\t\n\nApply the regular expression (stored in <pcrePtr> and <extratr>, generated from calls to primPCRECompile), to smalltalk String searchObject using <matchOptions>.  If there is no match, answer nil.  Otherwise answer a ByteArray of offsets representing the results of the match.\"\n\n\t| searchObject searchBuffer length  result matchSpacePtr matchSpaceSize |\n\tself export: true.\n\tself var:#searchBuffer\tdeclareC: 'char *searchBuffer'.\n\tself var:#matchSpacePtr\tdeclareC: 'int *matchSpacePtr'.\n\tself var:#result\t\t\tdeclareC: 'int result'.\n\t\n\t\"Load Parameters\"\n\tsearchObject _ interpreterProxy stackObjectValue: 0.\t\n\tsearchBuffer _ interpreterProxy arrayValueOf: searchObject.\n\tlength _ interpreterProxy byteSizeOf: searchObject.\n\tself loadRcvrFromStackAt: 1.\n\t\"Load Instance Variables\"\n\tpcrePtr _ self rcvrPCREBufferPtr.\n\textraPtr _ self rcvrExtraPtr.\n\tmatchFlags _ self rcvrMatchFlags.\n\tmatchSpacePtr _ self rcvrMatchSpacePtr.\n\tmatchSpaceSize _ self rcvrMatchSpaceSize.\n\n\tinterpreterProxy failed ifTrue:[^ nil].\n\t\n\tresult _ self \n\t\tcCode: 'pcre_exec((pcre *)pcrePtr, (pcre_extra *)extraPtr, \n\t\t\t\tsearchBuffer, length, matchFlags, matchSpacePtr, matchSpaceSize)'.\n\n\tinterpreterProxy pop: 2; pushInteger: result.\n\n\t\"empty call so compiler doesn't bug me about variables not used\"\n\tself touch: searchBuffer; touch: matchSpacePtr; touch: matchSpaceSize; touch: length\n! !\n\n!RePlugin methodsFor: 're primitives' stamp: 'acg 2/26/1999 21:01'!\nprimPCREExecfromto\n\n\"<rcvr primPCREExec: searchObject> from: fromInteger to: toInteger>, where rcvr is an object with instance variables:\n\n\t'patternStr compileFlags pcrePtr extraPtr errorStr errorOffset matchFlags'\t\n\nApply the regular expression (stored in <pcrePtr> and <extratr>, generated from calls to primPCRECompile), to smalltalk String searchObject using <matchOptions>, beginning at offset <fromInteger> and continuing until offset <toInteger>.  If there is no match, answer nil.  Otherwise answer a ByteArray of offsets representing the results of the match.\"\n\n\t| searchObject searchBuffer length  result matchSpacePtr matchSpaceSize fromInteger toInteger |\n\tself export: true.\n\tself var:#searchBuffer\tdeclareC: 'char *searchBuffer'.\n\tself var:#fromInteger declareC: 'int fromInteger'.\n\tself var:#toInteger declareC: 'int toInteger'.\n\tself var:#matchSpacePtr\tdeclareC: 'int *matchSpacePtr'.\n\tself var:#result\t\t\tdeclareC: 'int result'.\n\t\n\t\"Load Parameters\"\n\ttoInteger _ interpreterProxy stackIntegerValue: 0.\n\tfromInteger _ interpreterProxy stackIntegerValue: 1.\n\tsearchObject _ interpreterProxy stackObjectValue: 2.\t\n\tsearchBuffer _ interpreterProxy arrayValueOf: searchObject.\n\tlength _ interpreterProxy byteSizeOf: searchObject.\n\tself loadRcvrFromStackAt: 3.\n\n\t\"Validate parameters\"\n\tinterpreterProxy success: (1 <= fromInteger).\n\tinterpreterProxy success: (toInteger<=length).\n\tfromInteger _ fromInteger - 1. \"Smalltalk offsets are 1-based\"\n\tinterpreterProxy success: (fromInteger<=toInteger).\n\n\t\"adjust length, searchBuffer\"\n\tlength _ toInteger - fromInteger.\n\tsearchBuffer _ searchBuffer + fromInteger.\n\n\t\"Load Instance Variables\"\n\tpcrePtr _ self rcvrPCREBufferPtr.\n\textraPtr _ self rcvrExtraPtr.\n\tmatchFlags _ self rcvrMatchFlags.\n\tmatchSpacePtr _ self rcvrMatchSpacePtr.\n\tmatchSpaceSize _ self rcvrMatchSpaceSize.\n\tinterpreterProxy failed ifTrue:[^ nil].\n\t\n\tresult _ self \n\t\tcCode: 'pcre_exec((pcre *)pcrePtr, (pcre_extra *)extraPtr, \n\t\t\t\tsearchBuffer, length, matchFlags, matchSpacePtr, matchSpaceSize)'.\n\tinterpreterProxy pop: 2; pushInteger: result.\n\n\t\"empty call so compiler doesn't bug me about variables not used\"\n\tself touch: searchBuffer; touch: matchSpacePtr; touch: matchSpaceSize; touch: length\n! !\n\n!RePlugin methodsFor: 're primitives' stamp: 'acg 3/12/1999 23:32'!\nprimPCRENumSubPatterns\n\n\"<rcvr primPCRENumSubPatterns>, where rcvr is an object with instance variables:\n\n\t'patternStr compileFlags pcrePtr extraPtr errorStr errorOffset matchFlags'\t\n\nReturn the number of subpatterns captured by the compiled pattern.\"\n\n\tself export: true.\n\t\n\t\"Load Parameters\"\n\tself loadRcvrFromStackAt: 0.\n\t\"Load Instance Variables\"\n\tpcrePtr _ self rcvrPCREBufferPtr.\n\tinterpreterProxy pop: 1; pushInteger: (self cCode: 'pcre_info((pcre *)pcrePtr, NULL, NULL)').\n! !\n\n!RePlugin methodsFor: 'memory management' stamp: 'acg 2/25/1999 08:36'!\nprimLastAlloc\n\t\n\tself export: true.\n\tinterpreterProxy pop:1; pushInteger: lastAlloc\n! !\n\n!RePlugin methodsFor: 'memory management' stamp: 'acg 2/21/1999 23:20'!\nprimNetMemory \n\t\n\tself export: true.\n\tinterpreterProxy pop:1; pushInteger: netMemory\n! !\n\n!RePlugin methodsFor: 'memory management' stamp: 'acg 2/21/1999 23:20'!\nprimNumAllocs\n\n\tself export: true.\n\tinterpreterProxy pop:1; pushInteger: numAllocs\n! !\n\n!RePlugin methodsFor: 'memory management' stamp: 'acg 2/21/1999 23:20'!\nprimNumFrees \n\t\n\tself export: true.\n\tinterpreterProxy pop:1; pushInteger: numFrees\n! !\n\n!RePlugin methodsFor: 'memory management' stamp: 'acg 3/5/1999 09:18'!\nrePluginFree: aPointer\n\t\"Free a block of fixed memory allocated with rePluginMalloc.  Instrumented version of C free() to facilitate leak analysis from Smalltalk.   OS-specific variations on malloc/free, such as with MacOS, are handled by adding a C macro to the header file redefining malloc/free -- see the class comment\"\n\n\tself inline: true.\n\tself var: #aPointer declareC: 'void * aPointer'.\n\tself returnTypeC: 'void'.\n\n\tnumFrees _ numFrees + 1.\n\t(aPointer)\n\t\tifTrue: [self cCode: 'free(aPointer)']\t! !\n\n!RePlugin methodsFor: 'memory management' stamp: 'acg 3/5/1999 09:19'!\nrePluginMalloc: anInteger\n\t\"Allocate a block of fixed memory using C calls to malloc().  Instrumented to facilitate leak analysis from Smalltalk.  Set global lastAlloc to anInteger.  OS-specific variations on malloc/free, such as with MacOS, are handled by adding a C macro to the header file redefining malloc/free -- see the class comment\"\n\n\t| aPointer |\n\tself inline: true.\n\tself var: #anInteger declareC: 'size_t anInteger'.\n\tself var: #aPointer declareC: 'void *aPointer'.\n\tself returnTypeC: 'void *'.\n\tnumAllocs _ numAllocs + 1.\n\t(aPointer _ self cCode: 'malloc(anInteger)')\n\t\tifTrue: [lastAlloc _ anInteger].\n\t^aPointer\n! !\n\n!RePlugin methodsFor: 'rcvr linkage' stamp: 'acg 2/27/1999 23:22'!\nallocateByteArrayAndSetRcvrExtraPtrFrom: anExtraPtr\n\n\t| extraObject extraByteArrayPtr |\n\tself var: #extraByteArrayPtr declareC: 'void *extraByteArrayPtr'.\n\n\tanExtraPtr\n\t\tifFalse: [extraObject _ interpreterProxy nilObject]\n\t\tifTrue: [\n\t\t\t\"Allocate a Smalltalk ByteArray -- lastAlloc contains the length\"\n\t\t\textraObject _ interpreterProxy\n\t\t\t\t\t\tinstantiateClass: (interpreterProxy classByteArray) \n\t\t\t\t\t\tindexableSize: (self cCode: 'sizeof(real_pcre_extra)').\n\t\t\tself loadRcvrFromStackAt: 0. \"Assume garbage collection after instantiation\"\n\n\t\t\t\"Copy from the C bytecode buffer to the Smalltalk ByteArray\"\n\t\t\textraByteArrayPtr _ interpreterProxy arrayValueOf: extraObject.\t\n\t\t\tself cCode:'memcpy(extraByteArrayPtr, (void *) anExtraPtr, sizeof(real_pcre_extra))'].\n \n\t\"Set rcvrErrorStr from errorStr and Return\"\n\tself rcvrExtraPtrFrom: extraObject.\n\tself touch: extraByteArrayPtr.\t\n\t^extraObject.\n! !\n\n!RePlugin methodsFor: 'rcvr linkage' stamp: 'acg 2/27/1999 22:57'!\nallocateByteArrayAndSetRcvrPCREPtrFromPCRE: aPCREPtr\n\n\t| patObject patByteArrayPtr |\n\tself var: #patByteArrayPtr declareC: 'void *patByteArrayPtr'.\n\n\t\"Allocate a Smalltalk ByteArray -- lastAlloc contains the length\"\n\tpatObject _ interpreterProxy\n\t\t\t\tinstantiateClass: (interpreterProxy classByteArray) \n\t\t\t\tindexableSize: lastAlloc.\n\tself loadRcvrFromStackAt: 0. \"Assume garbage collection after instantiation\"\n\n\t\"Copy from the C bytecode buffer to the Smalltalk ByteArray\"\n\tpatByteArrayPtr _ interpreterProxy arrayValueOf: patObject.\t\n\tself cCode:'memcpy(patByteArrayPtr, (void *) aPCREPtr, lastAlloc)'.\n \n\t\"Set rcvrErrorStr from errorStr and Return\"\n\tself rcvrPCREBufferFrom: patObject.\n\tself touch: patByteArrayPtr.\t\n\t^patObject.\n! !\n\n!RePlugin methodsFor: 'rcvr linkage' stamp: 'acg 2/28/1999 16:39'!\nallocateStringAndSetRcvrErrorStrFromCStr: aCStrBuffer\n\n\t|length errorStrObj errorStrObjPtr |\n\tself var: #aCStrBuffer declareC: 'char *aCStrBuffer'.\n\tself var: #errorStrObjPtr declareC: 'void *errorStrObjPtr'.\n\t\"Allocate errorStrObj\"\n\tlength _ self cCode: 'strlen(aCStrBuffer)'.\n\terrorStrObj _ interpreterProxy\n\t\t\t\tinstantiateClass: (interpreterProxy classString) \n\t\t\t\tindexableSize: length.\n\tself loadRcvrFromStackAt: 0. \"Assume garbage collection after instantiation\"\n\n\t\"Copy aCStrBuffer to errorStrObj's buffer\"\n\terrorStrObjPtr _ interpreterProxy arrayValueOf: errorStrObj.\t\n\tself cCode:'memcpy(errorStrObjPtr,aCStrBuffer,length)'.\n\tself touch: errorStrObjPtr; touch: errorStrObj.\n\t\"Set rcvrErrorStr from errorStrObj and Return\"\n\tself rcvrErrorStrFrom: errorStrObj.\n\t^errorStrObj.! !\n\n!RePlugin methodsFor: 'rcvr linkage' stamp: 'acg 2/21/1999 22:58'!\nloadRcvrFromStackAt: stackInteger\n\n\tself inline:true.\n\trcvr _ interpreterProxy stackObjectValue: stackInteger.\n! !\n\n!RePlugin methodsFor: 'rcvr linkage' stamp: 'acg 2/21/1999 21:20'!\nrcvrCompileFlags\n\n\tself inline:true.\n\t^interpreterProxy fetchInteger: 1 ofObject: rcvr.\n! !\n\n!RePlugin methodsFor: 'rcvr linkage' stamp: 'acg 2/21/1999 22:46'!\nrcvrErrorOffsetFrom: anInteger\n\n\tself inline: true.\n\tinterpreterProxy storeInteger: 5 ofObject: rcvr withValue: anInteger.\n! !\n\n!RePlugin methodsFor: 'rcvr linkage' stamp: 'acg 2/24/1999 20:53'!\nrcvrErrorStrFrom: aString\n\n\tself inline: true.\n\tinterpreterProxy \n\t\tstorePointer: 4\n\t\tofObject: rcvr \n\t\twithValue: aString.\n! !\n\n!RePlugin methodsFor: 'rcvr linkage' stamp: 'acg 2/27/1999 23:20'!\nrcvrExtraPtr\n\n\t|extraObj|\n\tself inline: true.\n\textraObj _ interpreterProxy fetchPointer: 3 ofObject: rcvr.\n\t(extraObj = (interpreterProxy nilObject))\n\t\tifTrue: [^ self cCode: 'NULL'].\n\t^self \n\t\tcCoerce:(interpreterProxy arrayValueOf: extraObj)\n\t\tto: 'int'.! !\n\n!RePlugin methodsFor: 'rcvr linkage' stamp: 'acg 2/27/1999 23:42'!\nrcvrExtraPtrFrom: aByteArrayOrNilObject\n\n\tself inline: true.\n\tinterpreterProxy \n\t\tstorePointer: 3 \n\t\tofObject: rcvr \n\t\twithValue: aByteArrayOrNilObject! !\n\n!RePlugin methodsFor: 'rcvr linkage' stamp: 'acg 2/21/1999 21:19'!\nrcvrMatchFlags\n\n\tself inline: true.\n\t^interpreterProxy fetchInteger: 6 ofObject: rcvr.\n! !\n\n!RePlugin methodsFor: 'rcvr linkage' stamp: 'acg 2/25/1999 00:49'!\nrcvrMatchSpacePtr\n\n\tself inline: true.\n\tself returnTypeC: 'int *'.\n\t^self\n\t\tcCoerce: (interpreterProxy fetchArray: 7 ofObject: rcvr)\n\t\tto: 'int *'.! !\n\n!RePlugin methodsFor: 'rcvr linkage' stamp: 'acg 2/25/1999 00:52'!\nrcvrMatchSpaceSize\n\n\tself inline: true.\n\t^(interpreterProxy byteSizeOf: (interpreterProxy fetchPointer: 7 ofObject: rcvr))//4.! !\n\n!RePlugin methodsFor: 'rcvr linkage' stamp: 'acg 2/24/1999 21:33'!\nrcvrPCREBufferFrom: aByteArray\n\n\tself inline: true.\n\tinterpreterProxy \n\t\tstorePointer: 2 \n\t\tofObject: rcvr \n\t\twithValue: aByteArray! !\n\n!RePlugin methodsFor: 'rcvr linkage' stamp: 'acg 2/24/1999 21:33'!\nrcvrPCREBufferPtr\n\n\tself inline: true.\n\t^self\n\t\tcCoerce: (interpreterProxy fetchArray: 2 ofObject: rcvr)\n\t\tto: 'int'.! !\n\n!RePlugin methodsFor: 'rcvr linkage' stamp: 'acg 2/24/1999 21:34'!\nrcvrPatternStrPtr\n\n\tself inline: true.\n\tself returnTypeC: 'char *'.\n\t^self \n\t\tcCoerce: (interpreterProxy fetchArray: 0 ofObject: rcvr) \n\t\tto: 'char *'.! !\n\n!RePlugin methodsFor: 'private' stamp: 'acg 3/12/1999 23:32'!\ntouch: anOop\n\t\"Do nothing but fool the compiler into thinking my parameter was used.  Since I am inlined, I add no overhead whatsoever.\"\n\n\tself inline: true.! !\n\n\n!RePlugin class methodsFor: 'plugin code generation' stamp: 'acg 7/27/2002 20:56'!\ndeclareCVarsIn: cg\n\n\tcg addHeaderFile:'\"rePlugin.h\"'.\n\n\t\"Memory Managament Error Checking\"\n\tcg var: 'netMemory' \tdeclareC: 'int netMemory = 0'.\n\tcg var: 'numAllocs' \tdeclareC: 'int numAllocs = 0'.\n\tcg var: 'numFrees' \t\tdeclareC: 'int numFrees = 0'.\n\tcg var: 'lastAlloc'\t\tdeclareC: 'int lastAlloc = 0'.\n\n\t\"The receiver Object Pointer\"\n\tcg var: 'rcvr'\t\t\tdeclareC: 'int rcvr'.\n\n\t\"Instance Variables of Receiver Object\"\n\tcg var: 'patternStr'\t\tdeclareC: 'int patternStr'.\n\tcg var: 'compileFlags'\tdeclareC: 'int compileFlags'.\n\tcg var: 'pcrePtr'\t\tdeclareC: 'int pcrePtr'.\n\tcg var: 'extraPtr'\t\tdeclareC: 'int extraPtr'.\n\tcg var: 'errorStr'\t\tdeclareC: 'int errorStr'.\n\tcg var: 'errorOffset'\tdeclareC: 'int errorOffset'.\n\tcg var: 'matchFlags'\tdeclareC: 'int matchFlags'.\n\n\t\"Support Variables for Access to Receiver Instance Variables\"\n\tcg var: 'patternStrPtr' declareC: 'char * patternStrPtr'.\n\tcg var: 'errorStrBuffer'\tdeclareC: 'char * errorStrBuffer'.! !\n\n!RePlugin class methodsFor: 'plugin code generation' stamp: 'acg 8/16/2002 22:51'!\nhasHeaderFile\n\t\"If there is a single intrinsic header file to be associated with the plugin, here is where you want to flag\"\n\t^true! !\n\n!RePlugin class methodsFor: 'plugin code generation' stamp: 'acg 7/27/2002 21:48'!\nmoduleName\n\n\t^'rePlugin'! !\n\n!RePlugin class methodsFor: 'plugin code generation' stamp: 'acg 7/27/2002 20:09'!\nrequiresCrossPlatformFiles\n\t\"default is ok for most, any plugin needing cross platform files must say so\"\n\t^true! !\n\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:36'!\ntestNewSuite1test1\n\t| re |\n\tre _ Re on: 'the quick brown fox'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'the quick brown fox') isNil not.\n\tself assert: (re search: 'The quick brown FOX') isNil.\n\tself assert: (re search: 'What do you know about the quick brown fox?') isNil not.\n\tself assert: (re search: 'What do you know about THE QUICK BROWN FOX?') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test10\n\t| re re2 |\n\tre _ Re on: '^(ba|b*){1,2}?bc'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'babc') isNil not.\n\tself assert: (re search: 'bbabc') isNil not.\n\tself assert: (re search: 'bababc') isNil not.\n\tself assert: (re search: 'bababbc') isNil.\n\tself assert: (re search: 'babababc') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test100\n\t| re re2 |\n\tre _ Re on: '[az-]+'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'za-') isNil not.\n\tself assert: (re search: 'b') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test101\n\t| re re2 |\n\tre _ Re on: '[a\\-z]+'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a-z') isNil not.\n\tself assert: (re search: 'b') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test102\n\t| re re2 |\n\tre _ Re on: '[a-z]+'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcdxyz') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test103\n\t| re re2 |\n\tre _ Re on: '[\\d-]+'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '12-34') isNil not.\n\tself assert: (re search: 'aaa') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test104\n\t| re re2 |\n\tre _ Re on: '[\\d-z]+'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '12-34z') isNil not.\n\tself assert: (re search: 'aaa') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:39'!\ntestNewSuite1test105\n\t| re |\n\tre _ Re on: '\\x5c'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '\\') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test106\n\t| re re2 |\n\tre _ Re on: '\\x20Z'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'the Zoo') isNil not.\n\tself assert: (re search: 'Zulu') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test107\n\t| re re2 |\n\tre _ Re on: '(abc)\\1'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcabc') isNil not.\n\tself assert: (re search: 'ABCabc') isNil not.\n\tself assert: (re search: 'abcABC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test108\n\t| re re2 |\n\tre _ Re on: 'ab{3cd'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ab{3cd') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test109\n\t| re re2 |\n\tre _ Re on: 'ab{3,cd'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ab{3,cd') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test11\n\t| re re2 |\n\tre _ Re on: '^\\ca\\cA\\c[\\c{\\c:'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPut: 16r01 asCharacter;\n\t\tnextPut: 16r01 asCharacter;\n\t\tnextPut: Character escape;\n\t\tnextPutAll: ';z'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test110\n\t| re re2 |\n\tre _ Re on: 'ab{3,4a}cd'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ab{3,4a}cd') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test111\n\t| re re2 |\n\tre _ Re on: '{4,5a}bc'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '{4,5a}bc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test112\n\t| re re2 |\n\tre _ Re on: '^a.b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'a';\n\t\tnextPut: Character linefeed;\n\t\tnextPutAll: 'b'])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'a';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'b'])) isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test113\n\t| re re2 |\n\tre _ Re on: 'abc$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: Character cr])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'def'])) isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test114\n\t| re re2 |\n\tre _ Re on: '(abc)\\123'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: 16r53 asCharacter])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test115\n\t| re re2 |\n\tre _ Re on: '(abc)\\223'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: 16r93 asCharacter])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test116\n\t| re re2 |\n\tre _ Re on: '(abc)\\323'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: 16rD3 asCharacter])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test117\n\t| re re2 |\n\tre _ Re on: '(abc)\\500'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: 16r40 asCharacter])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: 8r100 asCharacter])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test118\n\t| re re2 |\n\tre _ Re on: '(abc)\\5000'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: 16r40 asCharacter;\n\t\tnextPutAll: '0'])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: 16r40 asCharacter;\n\t\tnextPut: 16r30 asCharacter])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: 8r100 asCharacter;\n\t\tnextPutAll: '0'])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: 8r100 asCharacter;\n\t\tnextPut: 16r30 asCharacter])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: 8r100 asCharacter;\n\t\tnextPut: 8r060 asCharacter])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: 8r100 asCharacter;\n\t\tnextPut: 8r60 asCharacter])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test119\n\t| re re2 |\n\tre _ Re on: 'abc\\81'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: 8r0 asCharacter;\n\t\tnextPutAll: '81'])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: 8r0 asCharacter;\n\t\tnextPut: 16r38 asCharacter;\n\t\tnextPut: 16r31 asCharacter])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test12\n\t| re re2 |\n\tre _ Re on: '^[ab\\]cde]'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'athing') isNil not.\n\tself assert: (re search: 'bthing') isNil not.\n\tself assert: (re search: ']thing') isNil not.\n\tself assert: (re search: 'cthing') isNil not.\n\tself assert: (re search: 'dthing') isNil not.\n\tself assert: (re search: 'ething') isNil not.\n\tself assert: (re search: 'fthing') isNil.\n\tself assert: (re search: '[thing') isNil.\n\tself assert: (re search: '\\\\thing') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test120\n\t| re re2 |\n\tre _ Re on: 'abc\\91'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: 8r0 asCharacter;\n\t\tnextPutAll: '91'])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: 8r0 asCharacter;\n\t\tnextPut: 16r39 asCharacter;\n\t\tnextPut: 16r31 asCharacter])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test121\n\t| re re2 |\n\tre _ Re on: '(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)\\12\\123'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcdefghijkllS') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test122\n\t| re re2 |\n\tre _ Re on: '(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\\12\\123'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abcdefghijk';\n\t\tnextPut: 8r12 asCharacter;\n\t\tnextPutAll: 'S'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test123\n\t| re re2 |\n\tre _ Re on: 'ab\\gdef'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abgdef') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test124\n\t| re re2 |\n\tre _ Re on: 'a{0}bc'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'bc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test125\n\t| re re2 |\n\tre _ Re on: '(a|(bc)){0,0}?xyz'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'xyz') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test126\n\t| re re2 |\n\tre _ Re on: 'abc[\\10]de'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: 8r010 asCharacter;\n\t\tnextPutAll: 'de'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test127\n\t| re re2 |\n\tre _ Re on: 'abc[\\1]de'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: 8r1 asCharacter;\n\t\tnextPutAll: 'de'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test128\n\t| re re2 |\n\tre _ Re on: '(abc)[\\1]de'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: 8r1 asCharacter;\n\t\tnextPutAll: 'de'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test129\n\t| re re2 |\n\tre _ Re on: 'a.b(?s)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'a';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'b'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test13\n\t| re re2 |\n\tre _ Re on: '^[]cde]'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: ']thing') isNil not.\n\tself assert: (re search: 'cthing') isNil not.\n\tself assert: (re search: 'dthing') isNil not.\n\tself assert: (re search: 'ething') isNil not.\n\tself assert: (re search: 'athing') isNil.\n\tself assert: (re search: 'fthing') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test130\n\t| re re2 |\n\tre _ Re on: '^([^a])([^\\b])([^c]*)([^d]{3,4})'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'baNOTccccd') isNil not.\n\tself assert: (re search: 'baNOTcccd') isNil not.\n\tself assert: (re search: 'baNOTccd') isNil not.\n\tself assert: (re search: 'bacccd') isNil not.\n\tself assert: (re search: 'anything') isNil.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'b';\n\t\tnextPut: Character backspace;\n\t\tnextPutAll: 'c'])) isNil.\n\tself assert: (re search: 'baccd') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test131\n\t| re re2 |\n\tre _ Re on: '[^a]'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'Abc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test132\n\t| re re2 |\n\tre _ Re on: '[^a]'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'Abc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test133\n\t| re re2 |\n\tre _ Re on: '[^a]+'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'AAAaAbc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test134\n\t| re re2 |\n\tre _ Re on: '[^a]+'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'AAAaAbc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test135\n\t| re re2 |\n\tre _ Re on: '[^a]+'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'bbb';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'ccc'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test136\n\t| re re2 |\n\tre _ Re on: '[^k]$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: 'abk') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test137\n\t| re re2 |\n\tre _ Re on: '[^k]{2,3}$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: 'kbc') isNil not.\n\tself assert: (re search: 'kabc') isNil not.\n\tself assert: (re search: 'abk') isNil.\n\tself assert: (re search: 'akb') isNil.\n\tself assert: (re search: 'akk') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:40'!\ntestNewSuite1test138\n\t| re |\n\tre _ Re on: '^\\d{8,}\\@.+[^k]$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: '12345678@a.b.c.d'])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: '123456789@x.y.z'])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: '12345678@x.y.uk'])) isNil.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: '1234567@a.b.c.d'])) isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test139\n\t| re re2 |\n\tre _ Re on: '(a)\\1{8,}'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aaaaaaaaa') isNil not.\n\tself assert: (re search: 'aaaaaaaaaa') isNil not.\n\tself assert: (re search: 'aaaaaaa') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test14\n\t| re re2 |\n\tre _ Re on: '^[^ab\\]cde]'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'fthing') isNil not.\n\tself assert: (re search: '[thing') isNil not.\n\tself assert: (re search: '\\\\thing') isNil not.\n\tself assert: (re search: 'athing') isNil.\n\tself assert: (re search: 'bthing') isNil.\n\tself assert: (re search: ']thing') isNil.\n\tself assert: (re search: 'cthing') isNil.\n\tself assert: (re search: 'dthing') isNil.\n\tself assert: (re search: 'ething') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test140\n\t| re re2 |\n\tre _ Re on: '[^a]'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aaaabcd') isNil not.\n\tself assert: (re search: 'aaAabcd') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test141\n\t| re re2 |\n\tre _ Re on: '[^a]'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aaaabcd') isNil not.\n\tself assert: (re search: 'aaAabcd') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test142\n\t| re re2 |\n\tre _ Re on: '[^az]'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aaaabcd') isNil not.\n\tself assert: (re search: 'aaAabcd') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test143\n\t| re re2 |\n\tre _ Re on: '[^az]'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aaaabcd') isNil not.\n\tself assert: (re search: 'aaAabcd') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:41'!\ntestNewSuite1test144\n\t| re |\n\tre _ Re on: '\\000\\001\\002\\003\\004\\005\\006\\007\\010\\011\\012\\013\\014\\015\\016\\017\\020\\021\\022\\023\\024\\025\\026\\027\\030\\031\\032\\033\\034\\035\\036\\037\\040\\041\\042\\043\\044\\045\\046\\047\\050\\051\\052\\053\\054\\055\\056\\057\\060\\061\\062\\063\\064\\065\\066\\067\\070\\071\\072\\073\\074\\075\\076\\077\\100\\101\\102\\103\\104\\105\\106\\107\\110\\111\\112\\113\\114\\115\\116\\117\\120\\121\\122\\123\\124\\125\\126\\127\\130\\131\\132\\133\\134\\135\\136\\137\\140\\141\\142\\143\\144\\145\\146\\147\\150\\151\\152\\153\\154\\155\\156\\157\\160\\161\\162\\163\\164\\165\\166\\167\\170\\171\\172\\173\\174\\175\\176\\177\\200\\201\\202\\203\\204\\205\\206\\207\\210\\211\\212\\213\\214\\215\\216\\217\\220\\221\\222\\223\\224\\225\\226\\227\\230\\231\\232\\233\\234\\235\\236\\237\\240\\241\\242\\243\\244\\245\\246\\247\\250\\251\\252\\253\\254\\255\\256\\257\\260\\261\\262\\263\\264\\265\\266\\267\\270\\271\\272\\273\\274\\275\\276\\277\\300\\301\\302\\303\\304\\305\\306\\307\\310\\311\\312\\313\\314\\315\\316\\317\\320\\321\\322\\323\\324\\325\\326\\327\\330\\331\\332\\333\\334\\335\\336\\337\\340\\341\\342\\343\\344\\345\\346\\347\\350\\351\\352\\353\\354\\355\\356\\357\\360\\361\\362\\363\\364\\365\\366\\367\\370\\371\\372\\373\\374\\375\\376\\377'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: \n\t\t(String streamContents: [:s | 0 to: 255 do: [:each | s nextPut: each asCharacter]])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test145\n\t| re re2 |\n\tre _ Re on: 'P[^*]TAIRE[^*]{1,6}?LL'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'xxxxxxxxxxxPSTAIREISLLxxxxxxxxx') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test146\n\t| re re2 |\n\tre _ Re on: 'P[^*]TAIRE[^*]{1,}?LL'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'xxxxxxxxxxxPSTAIREISLLxxxxxxxxx') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test147\n\t| re re2 |\n\tre _ Re on: '(\\.\\d\\d[1-9]?)\\d+'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '1.230003938') isNil not.\n\tself assert: (re search: '1.875000282') isNil not.\n\tself assert: (re search: '1.235') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test148\n\t| re re2 |\n\tre _ Re on: '(\\.\\d\\d((?=0)|\\d(?=\\d)))'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '1.230003938') isNil not.\n\tself assert: (re search: '1.875000282') isNil not.\n\tself assert: (re search: '1.235') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test149\n\t| re re2 |\n\tre _ Re on: 'a(?)b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test15\n\t| re re2 |\n\tre _ Re on: '^[^]cde]'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'athing') isNil not.\n\tself assert: (re search: 'fthing') isNil not.\n\tself assert: (re search: ']thing') isNil.\n\tself assert: (re search: 'cthing') isNil.\n\tself assert: (re search: 'dthing') isNil.\n\tself assert: (re search: 'ething') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test150\n\t| re re2 |\n\tre _ Re on: '\\b(foo)\\s+(\\w+)'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'Food is on the foo table') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test151\n\t| re re2 |\n\tre _ Re on: 'foo(.*)bar'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'The food is under the bar in the barn.') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test152\n\t| re re2 |\n\tre _ Re on: 'foo(.*?)bar'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'The food is under the bar in the barn.') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test153\n\t| re re2 |\n\tre _ Re on: '(.*)(\\d*)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'I have 2 numbers: 53147') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test154\n\t| re re2 |\n\tre _ Re on: '(.*)(\\d+)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'I have 2 numbers: 53147') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test155\n\t| re re2 |\n\tre _ Re on: '(.*?)(\\d*)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'I have 2 numbers: 53147') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test156\n\t| re re2 |\n\tre _ Re on: '(.*?)(\\d+)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'I have 2 numbers: 53147') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test157\n\t| re re2 |\n\tre _ Re on: '(.*)(\\d+)$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'I have 2 numbers: 53147') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test158\n\t| re re2 |\n\tre _ Re on: '(.*?)(\\d+)$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'I have 2 numbers: 53147') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test159\n\t| re re2 |\n\tre _ Re on: '(.*)\\b(\\d+)$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'I have 2 numbers: 53147') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test16\n\t| re re2 |\n\tre _ Re on: '^\\'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test160\n\t| re re2 |\n\tre _ Re on: '(.*\\D)(\\d+)$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'I have 2 numbers: 53147') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test161\n\t| re re2 |\n\tre _ Re on: '^\\D*(?!!123)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABC123') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test162\n\t| re re2 |\n\tre _ Re on: '^(\\D*)(?=\\d)(?!!123)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABC445') isNil not.\n\tself assert: (re search: 'ABC123') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test163\n\t| re re2 |\n\tre _ Re on: '^[W-]46]'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'W46]789') isNil not.\n\tself assert: (re search: '-46]789') isNil not.\n\tself assert: (re search: 'Wall') isNil.\n\tself assert: (re search: 'Zebra') isNil.\n\tself assert: (re search: '42') isNil.\n\tself assert: (re search: '[abcd]') isNil.\n\tself assert: (re search: ']abcd[') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test164\n\t| re re2 |\n\tre _ Re on: '^[W-\\]46]'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'W46]789') isNil not.\n\tself assert: (re search: 'Wall') isNil not.\n\tself assert: (re search: 'Zebra') isNil not.\n\tself assert: (re search: 'Xylophone') isNil not.\n\tself assert: (re search: '42') isNil not.\n\tself assert: (re search: '[abcd]') isNil not.\n\tself assert: (re search: ']abcd[') isNil not.\n\tself assert: (re search: '\\\\backslash') isNil not.\n\tself assert: (re search: '-46]789') isNil.\n\tself assert: (re search: 'well') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test165\n\t| re re2 |\n\tre _ Re on: '\\d\\d/\\d\\d\\/\\d\\d\\d\\d'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '01/01/2000') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:43'!\ntestNewSuite1test166\n\t| re |\n\tre _ Re on: 'word (?:[a-zA-Z0-9]+ ){0,10}otherword'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'word cat dog elephant mussel cow horse canary baboon snake shark otherword') isNil not.\n\tself assert: (re search: 'word cat dog elephant mussel cow horse canary baboon snake shark') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:34'!\ntestNewSuite1test167\n\t| re |\n\tre _ Re on: 'word (?:[a-zA-Z0-9]+ ){0,300}otherword'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope otherword') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test168\n\t| re re2 |\n\tre _ Re on: '^(a){0,0}'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'bcd') isNil not.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: 'aab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test169\n\t| re re2 |\n\tre _ Re on: '^(a){0,1}'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'bcd') isNil not.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: 'aab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test17\n\t| re re2 |\n\tre _ Re on: '^'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test170\n\t| re re2 |\n\tre _ Re on: '^(a){0,2}'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'bcd') isNil not.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: 'aab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test171\n\t| re re2 |\n\tre _ Re on: '^(a){0,3}'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'bcd') isNil not.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: 'aab') isNil not.\n\tself assert: (re search: 'aaa') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test172\n\t| re re2 |\n\tre _ Re on: '^(a){0,}'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'bcd') isNil not.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: 'aab') isNil not.\n\tself assert: (re search: 'aaa') isNil not.\n\tself assert: (re search: 'aaaaaaaa') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:43'!\ntestNewSuite1test173\n\t| re |\n\tre _ Re on: '^(a){1,1}'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'bcd') isNil.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: 'aab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:35'!\ntestNewSuite1test174\n\t| re |\n\tre _ Re on: '^(a){1,2}'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'bcd') isNil.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: 'aab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:43'!\ntestNewSuite1test175\n\t| re |\n\tre _ Re on: '^(a){1,3}'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'bcd') isNil.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: 'aab') isNil not.\n\tself assert: (re search: 'aaa') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:44'!\ntestNewSuite1test176\n\t| re |\n\tre _ Re on: '^(a){1,}'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'bcd') isNil.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: 'aab') isNil not.\n\tself assert: (re search: 'aaa') isNil not.\n\tself assert: (re search: 'aaaaaaaa') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test177\n\t| re re2 |\n\tre _ Re on: '.*\\.gif'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'borfle';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'bib.gif';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'no'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test178\n\t| re re2 |\n\tre _ Re on: '.{0,}\\.gif'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'borfle';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'bib.gif';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'no'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test179\n\t| re re2 |\n\tre _ Re on: '.*\\.gif'.\n\tre\n\t\tbeMultiline.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'borfle';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'bib.gif';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'no'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test18\n\t| re re2 |\n\tre _ Re on: '^[0-9]+$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '0') isNil not.\n\tself assert: (re search: '1') isNil not.\n\tself assert: (re search: '2') isNil not.\n\tself assert: (re search: '3') isNil not.\n\tself assert: (re search: '4') isNil not.\n\tself assert: (re search: '5') isNil not.\n\tself assert: (re search: '6') isNil not.\n\tself assert: (re search: '7') isNil not.\n\tself assert: (re search: '8') isNil not.\n\tself assert: (re search: '9') isNil not.\n\tself assert: (re search: '10') isNil not.\n\tself assert: (re search: '100') isNil not.\n\tself assert: (re search: 'abc') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test180\n\t| re re2 |\n\tre _ Re on: '.*\\.gif'.\n\tre\n\t\tbeDotIncludesNewline.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'borfle';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'bib.gif';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'no'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test181\n\t| re re2 |\n\tre _ Re on: '.*\\.gif'.\n\tre\n\t\tbeMultiline;\n\t\tbeDotIncludesNewline.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'borfle';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'bib.gif';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'no'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test182\n\t| re re2 |\n\tre _ Re on: '.*$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'borfle';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'bib.gif';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'no'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test183\n\t| re re2 |\n\tre _ Re on: '.*$'.\n\tre\n\t\tbeMultiline.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'borfle';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'bib.gif';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'no'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test184\n\t| re re2 |\n\tre _ Re on: '.*$'.\n\tre\n\t\tbeDotIncludesNewline.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'borfle';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'bib.gif';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'no'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test185\n\t| re re2 |\n\tre _ Re on: '.*$'.\n\tre\n\t\tbeMultiline;\n\t\tbeDotIncludesNewline.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'borfle';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'bib.gif';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'no'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test186\n\t| re re2 |\n\tre _ Re on: '.*$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'borfle';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'bib.gif';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'no';\n\t\tnextPut: Character cr])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test187\n\t| re re2 |\n\tre _ Re on: '.*$'.\n\tre\n\t\tbeMultiline.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'borfle';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'bib.gif';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'no';\n\t\tnextPut: Character cr])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test188\n\t| re re2 |\n\tre _ Re on: '.*$'.\n\tre\n\t\tbeDotIncludesNewline.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'borfle';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'bib.gif';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'no';\n\t\tnextPut: Character cr])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test189\n\t| re re2 |\n\tre _ Re on: '.*$'.\n\tre\n\t\tbeMultiline;\n\t\tbeDotIncludesNewline.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'borfle';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'bib.gif';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'no';\n\t\tnextPut: Character cr])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test19\n\t| re re2 |\n\tre _ Re on: '^.*nter'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'enter') isNil not.\n\tself assert: (re search: 'inter') isNil not.\n\tself assert: (re search: 'uponter') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test190\n\t| re re2 |\n\tre _ Re on: '(.*X|^B)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abcde';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: '1234Xyz'])) isNil not.\n\tself assert: (re search: 'BarFoo') isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abcde';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'Bar'])) isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test191\n\t| re re2 |\n\tre _ Re on: '(.*X|^B)'.\n\tre\n\t\tbeMultiline.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abcde';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: '1234Xyz'])) isNil not.\n\tself assert: (re search: 'BarFoo') isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abcde';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'Bar'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test192\n\t| re re2 |\n\tre _ Re on: '(.*X|^B)'.\n\tre\n\t\tbeDotIncludesNewline.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abcde';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: '1234Xyz'])) isNil not.\n\tself assert: (re search: 'BarFoo') isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abcde';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'Bar'])) isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test193\n\t| re re2 |\n\tre _ Re on: '(.*X|^B)'.\n\tre\n\t\tbeMultiline;\n\t\tbeDotIncludesNewline.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abcde';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: '1234Xyz'])) isNil not.\n\tself assert: (re search: 'BarFoo') isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abcde';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'Bar'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test194\n\t| re re2 |\n\tre _ Re on: '(?s)(.*X|^B)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abcde';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: '1234Xyz'])) isNil not.\n\tself assert: (re search: 'BarFoo') isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abcde';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'Bar'])) isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test195\n\t| re re2 |\n\tre _ Re on: '(?s:.*X|^B)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abcde';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: '1234Xyz'])) isNil not.\n\tself assert: (re search: 'BarFoo') isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abcde';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'Bar'])) isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test196\n\t| re re2 |\n\tre _ Re on: '^.*B'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'B'])) isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test197\n\t| re re2 |\n\tre _ Re on: '(?s)^.*B'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'B'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test198\n\t| re re2 |\n\tre _ Re on: '(?m)^.*B'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'B'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test199\n\t| re re2 |\n\tre _ Re on: '(?ms)^.*B'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'B'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test2\n\t| re re2 |\n\tre _ Re on: 'The quick brown fox'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'the quick brown fox') isNil not.\n\tself assert: (re search: 'The quick brown FOX') isNil not.\n\tself assert: (re search: 'What do you know about the quick brown fox?') isNil not.\n\tself assert: (re search: 'What do you know about THE QUICK BROWN FOX?') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test20\n\t| re re2 |\n\tre _ Re on: '^xxx[0-9]+$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'xxx0') isNil not.\n\tself assert: (re search: 'xxx1234') isNil not.\n\tself assert: (re search: 'xxx') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test200\n\t| re re2 |\n\tre _ Re on: '(?ms)^B'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'B'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test201\n\t| re re2 |\n\tre _ Re on: '(?s)B$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'B';\n\t\tnextPut: Character cr])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test202\n\t| re re2 |\n\tre _ Re on: '^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '123456654321') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test203\n\t| re re2 |\n\tre _ Re on: '^\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '123456654321') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test204\n\t| re re2 |\n\tre _ Re on: '^[\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d]'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '123456654321') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test205\n\t| re re2 |\n\tre _ Re on: '^[abc]{12}'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcabcabcabc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test206\n\t| re re2 |\n\tre _ Re on: '^[a-c]{12}'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcabcabcabc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test207\n\t| re re2 |\n\tre _ Re on: '^(a|b|c){12}'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcabcabcabc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test208\n\t| re re2 |\n\tre _ Re on: '^[abcdefghijklmnopqrstuvwxy0123456789]'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'n') isNil not.\n\tself assert: (re search: 'z') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test209\n\t| re re2 |\n\tre _ Re on: 'abcde{0,0}'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcd') isNil not.\n\tself assert: (re search: 'abce') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 14:10'!\ntestNewSuite1test21\n\t| re |\n\tre _ Re on: '^.+[0-9][0-9][0-9]$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'x123') isNil not.\n\tself assert: (re search: 'xx123') isNil not.\n\tself assert: (re search: '123456') isNil not.\n\tself assert: (re search: '123') isNil.\n\tself assert: (re search: 'x1234') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test210\n\t| re re2 |\n\tre _ Re on: 'ab[cd]{0,0}e'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abe') isNil not.\n\tself assert: (re search: 'abcde') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test211\n\t| re re2 |\n\tre _ Re on: 'ab(c){0,0}d'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abd') isNil not.\n\tself assert: (re search: 'abcd') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test212\n\t| re re2 |\n\tre _ Re on: 'a(b*)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a') isNil not.\n\tself assert: (re search: 'ab') isNil not.\n\tself assert: (re search: 'abbbb') isNil not.\n\tself assert: (re search: 'bbbbb') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test213\n\t| re re2 |\n\tre _ Re on: 'ab\\d{0}e'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abe') isNil not.\n\tself assert: (re search: 'ab1e') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:48'!\ntestNewSuite1test214\n\t| re |\n\tre _ Re on: '\"([^\\\\\"]+|\\\\.)*\"'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: ('the \\\"quick\\\" brown fox') isNil not.\n\tself assert: ('\\\"the \\\\\\\"quick\\\\\\\" brown fox\\\"') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test215\n\t| re re2 |\n\tre _ Re on: '.*?'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test216\n\t| re re2 |\n\tre _ Re on: '\\b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test217\n\t| re re2 |\n\tre _ Re on: '\\b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test218\n\t| re re2 |\n\tre _ Re on: ''.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test219\n\t| re re2 |\n\tre _ Re on: '<tr([\\w\\W\\s\\d][^<>]{0,})><TD([\\w\\W\\s\\d][^<>]{0,})>([\\d]{0,}\\.)(.*)((<BR>([\\w\\W\\s\\d][^<>]{0,})|[\\s]{0,}))</a></TD><TD([\\w\\W\\s\\d][^<>]{0,})>([\\w\\W\\s\\d][^<>]{0,})</TD><TD([\\w\\W\\s\\d][^<>]{0,})>([\\w\\W\\s\\d][^<>]{0,})</TD></TR>'.\n\tre\n\t\tbeNotCaseSensitive;\n\t\tbeDotIncludesNewline.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '<TR BGCOLOR=''#DBE9E9''><TD align=left valign=top>43.<a href=''joblist.cfm?JobID=94 6735&Keyword=''>Word Processor<BR>(N-1286)</a></TD><TD align=left valign=top>Lega lstaff.com</TD><TD align=left valign=top>CA - Statewide</TD></TR>') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 14:11'!\ntestNewSuite1test22\n\t| re |\n\tre _ Re on: '^.+?[0-9][0-9][0-9]$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'x123') isNil not.\n\tself assert: (re search: 'xx123') isNil not.\n\tself assert: (re search: '123456') isNil not.\n\tself assert: (re search: '123') isNil.\n\tself assert: (re search: 'x1234') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test220\n\t| re re2 |\n\tre _ Re on: 'a[^a]b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'acb') isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'a';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'b'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test221\n\t| re re2 |\n\tre _ Re on: 'a.b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'acb') isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'a';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'b'])) isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test222\n\t| re re2 |\n\tre _ Re on: 'a[^a]b'.\n\tre\n\t\tbeDotIncludesNewline.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'acb') isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'a';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'b'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test223\n\t| re re2 |\n\tre _ Re on: 'a.b'.\n\tre\n\t\tbeDotIncludesNewline.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'acb') isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'a';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'b'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test224\n\t| re re2 |\n\tre _ Re on: '^(b+?|a){1,2}?c'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'bac') isNil not.\n\tself assert: (re search: 'bbac') isNil not.\n\tself assert: (re search: 'bbbac') isNil not.\n\tself assert: (re search: 'bbbbac') isNil not.\n\tself assert: (re search: 'bbbbbac') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test225\n\t| re re2 |\n\tre _ Re on: '^(b+|a){1,2}?c'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'bac') isNil not.\n\tself assert: (re search: 'bbac') isNil not.\n\tself assert: (re search: 'bbbac') isNil not.\n\tself assert: (re search: 'bbbbac') isNil not.\n\tself assert: (re search: 'bbbbbac') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 14:12'!\ntestNewSuite1test226\n\t| re |\n\tre _ Re on: '(?!!\\A)x'.\n\tre\n\t\tbeMultiline.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'x';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'b';\n\t\tnextPut: Character cr])) isNil.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'a';\n\t\tnextPut: Character backspace;\n\t\tnextPutAll: 'x';\n\t\tnextPut: Character cr])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test227\n\t| re re2 |\n\tre _ Re on: '\\x0{ab}'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPut: 8r0 asCharacter;\n\t\tnextPutAll: '{ab}'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test228\n\t| re re2 |\n\tre _ Re on: '(A|B)*?CD'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'CD') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test229\n\t| re re2 |\n\tre _ Re on: '(A|B)*CD'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'CD') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test23\n\t| re re2 |\n\tre _ Re on: '^([^!!]+)!!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc!!pqr=apquxz.ixr.zzz.ac.uk') isNil not.\n\tself assert: (re search: '!!pqr=apquxz.ixr.zzz.ac.uk') isNil.\n\tself assert: (re search: 'abc!!=apquxz.ixr.zzz.ac.uk') isNil.\n\tself assert: (re search: 'abc!!pqr=apquxz:ixr.zzz.ac.uk') isNil.\n\tself assert: (re search: 'abc!!pqr=apquxz.ixr.zzz.ac.ukk') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test230\n\t| re re2 |\n\tre _ Re on: '(AB)*?\\1'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABABAB') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test231\n\t| re re2 |\n\tre _ Re on: '(AB)*\\1'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABABAB') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test232\n\t| re re2 |\n\tre _ Re on: ' End of testinput1 '.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test24\n\t| re re2 |\n\tre _ Re on: ':'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'Well, we need a colon: somewhere') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test25\n\t| re re2 |\n\tre _ Re on: '([\\da-f:]+)$'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '0abc') isNil not.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: 'fed') isNil not.\n\tself assert: (re search: 'E') isNil not.\n\tself assert: (re search: '::') isNil not.\n\tself assert: (re search: '5f03:12C0::932e') isNil not.\n\tself assert: (re search: 'fed def') isNil not.\n\tself assert: (re search: 'Any old stuff') isNil not.\n\tself assert: (re search: '0zzz') isNil.\n\tself assert: (re search: 'gzzz') isNil.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'fed';\n\t\tnextPut: 16r20 asCharacter])) isNil.\n\tself assert: (re search: 'Any old rubbish') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test26\n\t| re re2 |\n\tre _ Re on: '^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '.1.2.3') isNil not.\n\tself assert: (re search: 'A.12.123.0') isNil not.\n\tself assert: (re search: '.1.2.3333') isNil.\n\tself assert: (re search: '1.2.3') isNil.\n\tself assert: (re search: '1234.2.3') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test27\n\t| re re2 |\n\tre _ Re on: '^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '1 IN SOA non-sp1 non-sp2(') isNil not.\n\tself assert: (re search: '1    IN    SOA    non-sp1    non-sp2   (') isNil not.\n\tself assert: (re search: '1IN SOA non-sp1 non-sp2(') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test28\n\t| re re2 |\n\tre _ Re on: '^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a.') isNil not.\n\tself assert: (re search: 'Z.') isNil not.\n\tself assert: (re search: '2.') isNil not.\n\tself assert: (re search: 'ab-c.pq-r.') isNil not.\n\tself assert: (re search: 'sxk.zzz.ac.uk.') isNil not.\n\tself assert: (re search: 'x-.y-.') isNil not.\n\tself assert: (re search: '-abc.peq.') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test29\n\t| re re2 |\n\tre _ Re on: '^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '*.a') isNil not.\n\tself assert: (re search: '*.b0-a') isNil not.\n\tself assert: (re search: '*.c3-b.c') isNil not.\n\tself assert: (re search: '*.c-a.b-c') isNil not.\n\tself assert: (re search: '*.0') isNil.\n\tself assert: (re search: '*.a-') isNil.\n\tself assert: (re search: '*.a-b.c-') isNil.\n\tself assert: (re search: '*.c-a.0-c') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:54'!\ntestNewSuite1test3\n\t| re |\n\tre _ Re on: 'abcd\\t\\n\\r\\f\\a\\e\\071\\x3b\\$\\\\\\?caxyz'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abcd';\n\t\tnextPut: Character tab;\n\t\tnextPut: Character cr;\n\t\tnextPut: Character cr;\n\t\tnextPut: Character newPage;\n\t\tnextPut: 7 asCharacter;\n\t\tnextPut: Character escape;\n\t\tnextPut: 8r071 asCharacter;\n\t\tnextPut: 16r3B asCharacter;\n\t\tnextPutAll: '$\\?caxyz'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test30\n\t| re re2 |\n\tre _ Re on: '^(?=ab(de))(abd)(e)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abde') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test31\n\t| re re2 |\n\tre _ Re on: '^(?!!(ab)de|x)(abd)(f)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abdf') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test32\n\t| re re2 |\n\tre _ Re on: '^(?=(ab(cd)))(ab)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcd') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test33\n\t| re re2 |\n\tre _ Re on: '^[\\da-f](\\.[\\da-f])*$'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a.b.c.d') isNil not.\n\tself assert: (re search: 'A.B.C.D') isNil not.\n\tself assert: (re search: 'a.b.c.1.2.3.C') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 14:16'!\ntestNewSuite1test34\n\t| re |\n\tre _ Re on: '^\\\".*\\\"\\s*(;.*)?$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '\"1234\"') isNil not.\n\tself assert: (re search: '\"abcd\" ;') isNil not.\n\tself assert: (re search: '\"\" ; rhubarb') isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: '1234';\n\t\tnextPutAll: ' : things'])) isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test35\n\t| re re2 |\n\tre _ Re on: '^$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test36\n\t| re re2 |\n\tre _ Re on: '   ^    a   (?# begins with a)  b\\sc (?# then b c) $ (?# then end)'.\n\tre\n\t\tbeExtended.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ab c') isNil not.\n\tself assert: (re search: 'abc') isNil.\n\tself assert: (re search: 'ab cde') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test37\n\t| re re2 |\n\tre _ Re on: '(?x)   ^    a   (?# begins with a)  b\\sc (?# then b c) $ (?# then end)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ab c') isNil not.\n\tself assert: (re search: 'abc') isNil.\n\tself assert: (re search: 'ab cde') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test38\n\t| re re2 |\n\tre _ Re on: '^   a\\ b[c ]d       $'.\n\tre\n\t\tbeExtended.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a bcd') isNil not.\n\tself assert: (re search: 'a b d') isNil not.\n\tself assert: (re search: 'abcd') isNil.\n\tself assert: (re search: 'ab d') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test39\n\t| re re2 |\n\tre _ Re on: '^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcdefhijklm') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test4\n\t| re re2 |\n\tre _ Re on: 'a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abxyzpqrrrabbxyyyypqAzz') isNil not.\n\tself assert: (re search: 'abxyzpqrrrabbxyyyypqAzz') isNil not.\n\tself assert: (re search: 'aabxyzpqrrrabbxyyyypqAzz') isNil not.\n\tself assert: (re search: 'aaabxyzpqrrrabbxyyyypqAzz') isNil not.\n\tself assert: (re search: 'aaaabxyzpqrrrabbxyyyypqAzz') isNil not.\n\tself assert: (re search: 'abcxyzpqrrrabbxyyyypqAzz') isNil not.\n\tself assert: (re search: 'aabcxyzpqrrrabbxyyyypqAzz') isNil not.\n\tself assert: (re search: 'aaabcxyzpqrrrabbxyyyypAzz') isNil not.\n\tself assert: (re search: 'aaabcxyzpqrrrabbxyyyypqAzz') isNil not.\n\tself assert: (re search: 'aaabcxyzpqrrrabbxyyyypqqAzz') isNil not.\n\tself assert: (re search: 'aaabcxyzpqrrrabbxyyyypqqqAzz') isNil not.\n\tself assert: (re search: 'aaabcxyzpqrrrabbxyyyypqqqqAzz') isNil not.\n\tself assert: (re search: 'aaabcxyzpqrrrabbxyyyypqqqqqAzz') isNil not.\n\tself assert: (re search: 'aaabcxyzpqrrrabbxyyyypqqqqqqAzz') isNil not.\n\tself assert: (re search: 'aaaabcxyzpqrrrabbxyyyypqAzz') isNil not.\n\tself assert: (re search: 'abxyzzpqrrrabbxyyyypqAzz') isNil not.\n\tself assert: (re search: 'aabxyzzzpqrrrabbxyyyypqAzz') isNil not.\n\tself assert: (re search: 'aaabxyzzzzpqrrrabbxyyyypqAzz') isNil not.\n\tself assert: (re search: 'aaaabxyzzzzpqrrrabbxyyyypqAzz') isNil not.\n\tself assert: (re search: 'abcxyzzpqrrrabbxyyyypqAzz') isNil not.\n\tself assert: (re search: 'aabcxyzzzpqrrrabbxyyyypqAzz') isNil not.\n\tself assert: (re search: 'aaabcxyzzzzpqrrrabbxyyyypqAzz') isNil not.\n\tself assert: (re search: 'aaaabcxyzzzzpqrrrabbxyyyypqAzz') isNil not.\n\tself assert: (re search: 'aaaabcxyzzzzpqrrrabbbxyyyypqAzz') isNil not.\n\tself assert: (re search: 'aaaabcxyzzzzpqrrrabbbxyyyyypqAzz') isNil not.\n\tself assert: (re search: 'aaabcxyzpqrrrabbxyyyypABzz') isNil not.\n\tself assert: (re search: 'aaabcxyzpqrrrabbxyyyypABBzz') isNil not.\n\tself assert: (re search: '>>>aaabxyzpqrrrabbxyyyypqAzz') isNil not.\n\tself assert: (re search: '>aaaabxyzpqrrrabbxyyyypqAzz') isNil not.\n\tself assert: (re search: '>>>>abcxyzpqrrrabbxyyyypqAzz') isNil not.\n\tself assert: (re search: 'abxyzpqrrabbxyyyypqAzz') isNil.\n\tself assert: (re search: 'abxyzpqrrrrabbxyyyypqAzz') isNil.\n\tself assert: (re search: 'abxyzpqrrrabxyyyypqAzz') isNil.\n\tself assert: (re search: 'aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz') isNil.\n\tself assert: (re search: 'aaaabcxyzzzzpqrrrabbbxyyypqAzz') isNil.\n\tself assert: (re search: 'aaabcxyzpqrrrabbxyyyypqqqqqqqAzz') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test40\n\t| re re2 |\n\tre _ Re on: '^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcdefhijklm') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test41\n\t| re re2 |\n\tre _ Re on: '^[\\w][\\W][\\s][\\S][\\d][\\D][\\b][\\n][\\c]][\\022]'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'a+ Z0+';\n\t\tnextPut: 16r08 asCharacter;\n\t\tnextPut: Character cr;\n\t\tnextPut: 16r1D asCharacter;\n\t\tnextPut: 16r12 asCharacter])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test42\n\t| re re2 |\n\tre _ Re on: '^[.^$|()*+?{,}]+'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: '.^';\n\t\tnextPutAll: '(*+)|{?,?}'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test43\n\t| re re2 |\n\tre _ Re on: '^a*\\w'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'z') isNil not.\n\tself assert: (re search: 'az') isNil not.\n\tself assert: (re search: 'aaaz') isNil not.\n\tself assert: (re search: 'a') isNil not.\n\tself assert: (re search: 'aa') isNil not.\n\tself assert: (re search: 'aaaa') isNil not.\n\tself assert: (re search: 'a+') isNil not.\n\tself assert: (re search: 'aa+') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test44\n\t| re re2 |\n\tre _ Re on: '^a*?\\w'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'z') isNil not.\n\tself assert: (re search: 'az') isNil not.\n\tself assert: (re search: 'aaaz') isNil not.\n\tself assert: (re search: 'a') isNil not.\n\tself assert: (re search: 'aa') isNil not.\n\tself assert: (re search: 'aaaa') isNil not.\n\tself assert: (re search: 'a+') isNil not.\n\tself assert: (re search: 'aa+') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test45\n\t| re re2 |\n\tre _ Re on: '^a+\\w'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'az') isNil not.\n\tself assert: (re search: 'aaaz') isNil not.\n\tself assert: (re search: 'aa') isNil not.\n\tself assert: (re search: 'aaaa') isNil not.\n\tself assert: (re search: 'aa+') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test46\n\t| re re2 |\n\tre _ Re on: '^a+?\\w'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'az') isNil not.\n\tself assert: (re search: 'aaaz') isNil not.\n\tself assert: (re search: 'aa') isNil not.\n\tself assert: (re search: 'aaaa') isNil not.\n\tself assert: (re search: 'aa+') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test47\n\t| re re2 |\n\tre _ Re on: '^\\d{8}\\w{2,}'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '1234567890') isNil not.\n\tself assert: (re search: '12345678ab') isNil not.\n\tself assert: (re search: '12345678__') isNil not.\n\tself assert: (re search: '1234567') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test48\n\t| re re2 |\n\tre _ Re on: '^[aeiou\\d]{4,5}$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'uoie') isNil not.\n\tself assert: (re search: '1234') isNil not.\n\tself assert: (re search: '12345') isNil not.\n\tself assert: (re search: 'aaaaa') isNil not.\n\tself assert: (re search: '123456') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test49\n\t| re re2 |\n\tre _ Re on: '^[aeiou\\d]{4,5}?'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'uoie') isNil not.\n\tself assert: (re search: '1234') isNil not.\n\tself assert: (re search: '12345') isNil not.\n\tself assert: (re search: 'aaaaa') isNil not.\n\tself assert: (re search: '123456') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test5\n\t| re re2 |\n\tre _ Re on: '^(abc){1,2}zz'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abczz') isNil not.\n\tself assert: (re search: 'abcabczz') isNil not.\n\tself assert: (re search: 'zz') isNil.\n\tself assert: (re search: 'abcabcabczz') isNil.\n\tself assert: (re search: '>>abczz') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test50\n\t| re re2 |\n\tre _ Re on: '\\A(abc|def)=(\\1){2,3}\\Z'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc=abcabc') isNil not.\n\tself assert: (re search: 'def=defdefdef') isNil not.\n\tself assert: (re search: 'abc=defdef') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test51\n\t| re re2 |\n\tre _ Re on: '^(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\\11*(\\3\\4)\\1(?#)2$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcdefghijkcda2') isNil not.\n\tself assert: (re search: 'abcdefghijkkkkcda2') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test52\n\t| re re2 |\n\tre _ Re on: '(cat(a(ract|tonic)|erpillar)) \\1()2(3)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'cataract cataract23') isNil not.\n\tself assert: (re search: 'catatonic catatonic23') isNil not.\n\tself assert: (re search: 'caterpillar caterpillar23') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test54\n\t| re re2 |\n\tre _ Re on: '^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'From abcd  Mon Sep 01 12:33:02 1997') isNil not.\n\tself assert: (re search: 'From abcd  Mon Sep  1 12:33:02 1997') isNil not.\n\tself assert: (re search: 'From abcd  Sep 01 12:33:02 1997') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test55\n\t| re re2 |\n\tre _ Re on: '^12.34'.\n\tre\n\t\tbeDotIncludesNewline.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: '12';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: '34'])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: '12';\n\t\tnextPut: Character linefeed;\n\t\tnextPutAll: '34'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test56\n\t| re re2 |\n\tre _ Re on: '\\w+(?=\\t)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'the quick brown';\n\t\tnextPut: Character tab;\n\t\tnextPutAll: ' fox'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test57\n\t| re re2 |\n\tre _ Re on: 'foo(?!!bar)(.*)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'foobar is foolish see?') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test58\n\t| re re2 |\n\tre _ Re on: '(?:(?!!foo)...|^.{0,2})bar(.*)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'foobar crowbar etc') isNil not.\n\tself assert: (re search: 'barrel') isNil not.\n\tself assert: (re search: '2barrel') isNil not.\n\tself assert: (re search: 'A barrel') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test59\n\t| re re2 |\n\tre _ Re on: '^(\\D*)(?=\\d)(?!!123)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc456') isNil not.\n\tself assert: (re search: 'abc123') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test6\n\t| re re2 |\n\tre _ Re on: '^(b+?|a){1,2}?c'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'bc') isNil not.\n\tself assert: (re search: 'bbc') isNil not.\n\tself assert: (re search: 'bbbc') isNil not.\n\tself assert: (re search: 'bac') isNil not.\n\tself assert: (re search: 'bbac') isNil not.\n\tself assert: (re search: 'aac') isNil not.\n\tself assert: (re search: 'abbbbbbbbbbbc') isNil not.\n\tself assert: (re search: 'bbbbbbbbbbbac') isNil not.\n\tself assert: (re search: 'aaac') isNil.\n\tself assert: (re search: 'abbbbbbbbbbbac') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test60\n\t| re re2 |\n\tre _ Re on: '^1234(?# test newlines\n  inside)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '1234') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test61\n\t| re re2 |\n\tre _ Re on: '^1234 #comment in extended re\n  '.\n\tre\n\t\tbeExtended.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '1234') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test62\n\t| re re2 |\n\tre _ Re on: '#rhubarb\n  abcd'.\n\tre\n\t\tbeExtended.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcd') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test63\n\t| re re2 |\n\tre _ Re on: '^abcd#rhubarb'.\n\tre\n\t\tbeExtended.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcd') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test64\n\t| re re2 |\n\tre _ Re on: '^(a)\\1{2,3}(.)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aaab') isNil not.\n\tself assert: (re search: 'aaaab') isNil not.\n\tself assert: (re search: 'aaaaab') isNil not.\n\tself assert: (re search: 'aaaaaab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test65\n\t| re re2 |\n\tre _ Re on: '(?!!^)abc'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'the abc') isNil not.\n\tself assert: (re search: 'abc') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test66\n\t| re re2 |\n\tre _ Re on: '(?=^)abc'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: 'the abc') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test67\n\t| re re2 |\n\tre _ Re on: '^[ab]{1,3}(ab*|b)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aabbbbb') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test68\n\t| re re2 |\n\tre _ Re on: '^[ab]{1,3}?(ab*|b)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aabbbbb') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test69\n\t| re re2 |\n\tre _ Re on: '^[ab]{1,3}?(ab*?|b)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aabbbbb') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test7\n\t| re re2 |\n\tre _ Re on: '^(b+|a){1,2}c'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'bc') isNil not.\n\tself assert: (re search: 'bbc') isNil not.\n\tself assert: (re search: 'bbbc') isNil not.\n\tself assert: (re search: 'bac') isNil not.\n\tself assert: (re search: 'bbac') isNil not.\n\tself assert: (re search: 'aac') isNil not.\n\tself assert: (re search: 'abbbbbbbbbbbc') isNil not.\n\tself assert: (re search: 'bbbbbbbbbbbac') isNil not.\n\tself assert: (re search: 'aaac') isNil.\n\tself assert: (re search: 'abbbbbbbbbbbac') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test70\n\t| re re2 |\n\tre _ Re on: '^[ab]{1,3}(ab*?|b)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aabbbbb') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test73\n\t| re re2 |\n\tre _ Re on: 'abc\\0def\\00pqr\\000xyz\\0000AB'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: 8r0 asCharacter;\n\t\tnextPutAll: 'def';\n\t\tnextPut: 8r00 asCharacter;\n\t\tnextPutAll: 'pqr';\n\t\tnextPut: 8r000 asCharacter;\n\t\tnextPutAll: 'xyz';\n\t\tnextPut: 8r000 asCharacter;\n\t\tnextPutAll: '0AB'])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc456 abc';\n\t\tnextPut: 8r0 asCharacter;\n\t\tnextPutAll: 'def';\n\t\tnextPut: 8r00 asCharacter;\n\t\tnextPutAll: 'pqr';\n\t\tnextPut: 8r000 asCharacter;\n\t\tnextPutAll: 'xyz';\n\t\tnextPut: 8r000 asCharacter;\n\t\tnextPutAll: '0ABCDE'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test74\n\t| re re2 |\n\tre _ Re on: 'abc\\x0def\\x00pqr\\x000xyz\\x0000AB'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: 16r0D asCharacter;\n\t\tnextPutAll: 'ef';\n\t\tnextPut: 16r00 asCharacter;\n\t\tnextPutAll: 'pqr';\n\t\tnextPut: 16r00 asCharacter;\n\t\tnextPutAll: '0xyz';\n\t\tnextPut: 16r00 asCharacter;\n\t\tnextPutAll: '00AB'])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc456 abc';\n\t\tnextPut: 16r0D asCharacter;\n\t\tnextPutAll: 'ef';\n\t\tnextPut: 16r00 asCharacter;\n\t\tnextPutAll: 'pqr';\n\t\tnextPut: 16r00 asCharacter;\n\t\tnextPutAll: '0xyz';\n\t\tnextPut: 16r00 asCharacter;\n\t\tnextPutAll: '00ABCDE'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test75\n\t| re re2 |\n\tre _ Re on: '^[\\000-\\037]'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPut: 8r0 asCharacter;\n\t\tnextPutAll: 'A'])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPut: 8r01 asCharacter;\n\t\tnextPutAll: 'B'])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPut: 8r037 asCharacter;\n\t\tnextPutAll: 'C'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test76\n\t| re re2 |\n\tre _ Re on: '\\0*'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPut: 8r0 asCharacter;\n\t\tnextPut: 8r0 asCharacter;\n\t\tnextPut: 8r0 asCharacter;\n\t\tnextPut: 8r0 asCharacter])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test77\n\t| re re2 |\n\tre _ Re on: 'A\\x0{2,3}Z'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'The A';\n\t\tnextPut: 16r0 asCharacter;\n\t\tnextPut: 16r0 asCharacter;\n\t\tnextPutAll: 'Z'])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'An A';\n\t\tnextPut: 8r0 asCharacter;\n\t\tnextPut: 16r0 asCharacter;\n\t\tnextPut: 8r0 asCharacter;\n\t\tnextPutAll: 'Z'])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'A';\n\t\tnextPut: 8r0 asCharacter;\n\t\tnextPutAll: 'Z'])) isNil.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'A';\n\t\tnextPut: 8r0 asCharacter;\n\t\tnextPut: 16r0 asCharacter;\n\t\tnextPut: 8r0 asCharacter;\n\t\tnextPut: 16r0 asCharacter;\n\t\tnextPutAll: 'Z'])) isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test78\n\t| re re2 |\n\tre _ Re on: '^(cow|)\\1(bell)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'cowcowbell') isNil not.\n\tself assert: (re search: 'bell') isNil not.\n\tself assert: (re search: 'cowbell') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test79\n\t| re re2 |\n\tre _ Re on: '^\\s'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPut: 8r040 asCharacter;\n\t\tnextPutAll: 'abc'])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPut: 16r0C asCharacter;\n\t\tnextPutAll: 'abc'])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'abc'])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPut: Character linefeed;\n\t\tnextPutAll: 'abc'])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPut: Character tab;\n\t\tnextPutAll: 'abc'])) isNil not.\n\tself assert: (re search: 'abc') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test8\n\t| re re2 |\n\tre _ Re on: '^(b+|a){1,2}?bc'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'bbc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test80\n\t| re re2 |\n\tre _ Re on: '^a\tb\n  \n  \f  c'.\n\tre\n\t\tbeExtended.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test81\n\t| re re2 |\n\tre _ Re on: '^(a|)\\1*b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ab') isNil not.\n\tself assert: (re search: 'aaaab') isNil not.\n\tself assert: (re search: 'b') isNil not.\n\tself assert: (re search: 'acb') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test82\n\t| re re2 |\n\tre _ Re on: '^(a|)\\1+b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aab') isNil not.\n\tself assert: (re search: 'aaaab') isNil not.\n\tself assert: (re search: 'b') isNil not.\n\tself assert: (re search: 'ab') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test83\n\t| re re2 |\n\tre _ Re on: '^(a|)\\1?b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ab') isNil not.\n\tself assert: (re search: 'aab') isNil not.\n\tself assert: (re search: 'b') isNil not.\n\tself assert: (re search: 'acb') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test84\n\t| re re2 |\n\tre _ Re on: '^(a|)\\1{2}b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aaab') isNil not.\n\tself assert: (re search: 'b') isNil not.\n\tself assert: (re search: 'ab') isNil.\n\tself assert: (re search: 'aab') isNil.\n\tself assert: (re search: 'aaaab') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test85\n\t| re re2 |\n\tre _ Re on: '^(a|)\\1{2,3}b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aaab') isNil not.\n\tself assert: (re search: 'aaaab') isNil not.\n\tself assert: (re search: 'b') isNil not.\n\tself assert: (re search: 'ab') isNil.\n\tself assert: (re search: 'aab') isNil.\n\tself assert: (re search: 'aaaaab') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test86\n\t| re re2 |\n\tre _ Re on: 'ab{1,3}bc'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abbbbc') isNil not.\n\tself assert: (re search: 'abbbc') isNil not.\n\tself assert: (re search: 'abbc') isNil not.\n\tself assert: (re search: 'abc') isNil.\n\tself assert: (re search: 'abbbbbc') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test87\n\t| re re2 |\n\tre _ Re on: '([^.]*)\\.([^:]*):[T ]+(.*)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'track1.title:TBlah blah blah') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test88\n\t| re re2 |\n\tre _ Re on: '([^.]*)\\.([^:]*):[T ]+(.*)'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'track1.title:TBlah blah blah') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test89\n\t| re re2 |\n\tre _ Re on: '([^.]*)\\.([^:]*):[t ]+(.*)'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'track1.title:TBlah blah blah') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test9\n\t| re re2 |\n\tre _ Re on: '^(b*|ba){1,2}?bc'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'babc') isNil not.\n\tself assert: (re search: 'bbabc') isNil not.\n\tself assert: (re search: 'bababc') isNil not.\n\tself assert: (re search: 'bababbc') isNil.\n\tself assert: (re search: 'babababc') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test90\n\t| re re2 |\n\tre _ Re on: '^[W-c]+$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'WXY_^abc') isNil not.\n\tself assert: (re search: 'wxy') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test91\n\t| re re2 |\n\tre _ Re on: '^[W-c]+$'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'WXY_^abc') isNil not.\n\tself assert: (re search: 'wxy_^ABC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test92\n\t| re re2 |\n\tre _ Re on: '^[\\x3f-\\x5F]+$'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'WXY_^abc') isNil not.\n\tself assert: (re search: 'wxy_^ABC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test93\n\t| re re2 |\n\tre _ Re on: '^abc$'.\n\tre\n\t\tbeMultiline.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'qqq';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'abc'])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'zzz'])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'qqq';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'abc';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'zzz'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test94\n\t| re re2 |\n\tre _ Re on: '^abc$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'qqq';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'abc'])) isNil.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'zzz'])) isNil.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'qqq';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'abc';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'zzz'])) isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test95\n\t| re re2 |\n\tre _ Re on: '\\Aabc\\Z'.\n\tre\n\t\tbeMultiline.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: Character cr])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'qqq';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'abc'])) isNil.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'zzz'])) isNil.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'qqq';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'abc';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'zzz'])) isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test96\n\t| re re2 |\n\tre _ Re on: '\\A(.)*\\Z'.\n\tre\n\t\tbeDotIncludesNewline.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'def'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test97\n\t| re re2 |\n\tre _ Re on: '\\A(.)*\\Z'.\n\tre\n\t\tbeMultiline.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'def'])) isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test98\n\t| re re2 |\n\tre _ Re on: '(?:b)|(?::+)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'b::c') isNil not.\n\tself assert: (re search: 'c::b') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite1' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite1test99\n\t| re re2 |\n\tre _ Re on: '[-az]+'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'az-') isNil not.\n\tself assert: (re search: 'b') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test1\n\t| re re2 |\n\tre _ Re on: '(a)b|'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:57'!\ntestNewSuite2test10\n\t| re |\n\tre _ Re on: '(?X)ab\\gdef'.\n\tre\n\t\tbeExtra.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test100\n\t| re re2 |\n\tre _ Re on: '(?<!!(foo)a)bar'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'bar') isNil not.\n\tself assert: (re search: 'foobbar') isNil not.\n\tself assert: (re search: 'fooabar') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test101\n\t| re re2 |\n\tre _ Re on: '^(a)?(?(1)a|b)+$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test102\n\t| re re2 |\n\tre _ Re on: '^(a\\1?){4}$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aaaaaa') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:58'!\ntestNewSuite2test103\n\t| re |\n\tre _ Re on: 'a[b-a]'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:58'!\ntestNewSuite2test104\n\t| re |\n\tre _ Re on: 'a[]b'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:59'!\ntestNewSuite2test105\n\t| re |\n\tre _ Re on: 'a['.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:59'!\ntestNewSuite2test106\n\t| re |\n\tre _ Re on: '*a'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:00'!\ntestNewSuite2test107\n\t| re |\n\tre _ Re on: '(*)b'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:00'!\ntestNewSuite2test108\n\t| re |\n\tre _ Re on: 'abc)'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:00'!\ntestNewSuite2test109\n\t| re |\n\tre _ Re on: '(abc'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:00'!\ntestNewSuite2test11\n\t| re |\n\tre _ Re on: 'x{5,4}'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:01'!\ntestNewSuite2test110\n\t| re |\n\tre _ Re on: 'a**'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:01'!\ntestNewSuite2test111\n\t| re |\n\tre _ Re on: ')('.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:01'!\ntestNewSuite2test112\n\t| re |\n\tre _ Re on: '\\1'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:01'!\ntestNewSuite2test113\n\t| re |\n\tre _ Re on: '\\2'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:02'!\ntestNewSuite2test114\n\t| re |\n\tre _ Re on: '(a)|\\2'.\n\tself should: [re compile] raise: Error.! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:03'!\ntestNewSuite2test115\n\t| re |\n\tre _ Re on: 'a[b-a]'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:03'!\ntestNewSuite2test116\n\t| re |\n\tre _ Re on: 'a[]b'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:03'!\ntestNewSuite2test117\n\t| re |\n\tre _ Re on: 'a['.\n\tre\n\t\tbeNotCaseSensitive.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:03'!\ntestNewSuite2test118\n\t| re |\n\tre _ Re on: '*a'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:03'!\ntestNewSuite2test119\n\t| re |\n\tre _ Re on: '(*)b'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:04'!\ntestNewSuite2test12\n\t| re |\n\tre _ Re on: 'z{65536}'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:11'!\ntestNewSuite2test120\n\t| re |\n\tre _ Re on: 'abc)'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:11'!\ntestNewSuite2test121\n\t| re |\n\tre _ Re on: '(abc'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:12'!\ntestNewSuite2test122\n\t| re |\n\tre _ Re on: 'a**'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:12'!\ntestNewSuite2test123\n\t| re |\n\tre _ Re on: ')('.\n\tre\n\t\tbeNotCaseSensitive.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:12'!\ntestNewSuite2test124\n\t| re |\n\tre _ Re on: ':(?:'.\n\tself should: [re compile] raise: Error.! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:13'!\ntestNewSuite2test125\n\t| re |\n\tre _ Re on: '(?<%)b'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:14'!\ntestNewSuite2test126\n\t| re |\n\tre _ Re on: 'a(?{)b'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:14'!\ntestNewSuite2test127\n\t| re |\n\tre _ Re on: 'a(?{{})b'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:15'!\ntestNewSuite2test128\n\t| re |\n\tre _ Re on: 'a(?{}})b'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:15'!\ntestNewSuite2test129\n\t| re |\n\tre _ Re on: 'a(?{\"{\"})b'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:16'!\ntestNewSuite2test13\n\t| re |\n\tre _ Re on: '[abcd'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:19'!\ntestNewSuite2test130\n\t| re |\n\tre _ Re on: 'a(?{\"{\"}})b'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:19'!\ntestNewSuite2test131\n\t| re |\n\tre _ Re on: '(?(1?)a|b)'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:20'!\ntestNewSuite2test132\n\t| re |\n\tre _ Re on: '(?(1)a|b|c)'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:20'!\ntestNewSuite2test133\n\t| re |\n\tre _ Re on: '[a[:xyz:'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:20'!\ntestNewSuite2test134\n\t| re |\n\tre _ Re on: '(?<=x+)y'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:21'!\ntestNewSuite2test135\n\t| re |\n\tre _ Re on: 'a{37,17}'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test136\n\t| re re2 |\n\tre _ Re on: 'abc'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test137\n\t| re re2 |\n\tre _ Re on: 'abc'.\n\tre\n\t\tbeStrangeOption;\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test138\n\t| re re2 |\n\tre _ Re on: 'abc'.\n\tre\n\t\tbeStrangeOption;\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test139\n\t| re re2 |\n\tre _ Re on: '(a)bc(d)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcd') isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abcd';\n\t\tnextPutAll: '2'])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abcd';\n\t\tnextPutAll: '5'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:22'!\ntestNewSuite2test14\n\t| re |\n\tre _ Re on: '[\\B]'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test140\n\t| re re2 |\n\tre _ Re on: '(.{20})'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcdefghijklmnopqrstuvwxyz') isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abcdefghijklmnopqrstuvwxyz';\n\t\tnextPutAll: '1'])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abcdefghijklmnopqrstuvwxyz';\n\t\tnextPutAll: '1'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test141\n\t| re re2 |\n\tre _ Re on: '(.{15})'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcdefghijklmnopqrstuvwxyz') isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abcdefghijklmnopqrstuvwxyz';\n\t\tnextPutAll: '1';\n\t\tnextPutAll: '1'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test142\n\t| re re2 |\n\tre _ Re on: '(.{16})'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcdefghijklmnopqrstuvwxyz') isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abcdefghijklmnopqrstuvwxyz';\n\t\tnextPutAll: '1';\n\t\tnextPutAll: '1'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test143\n\t| re re2 |\n\tre _ Re on: '^(a|(bc))de(f)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'adef';\n\t\tnextPutAll: '1';\n\t\tnextPutAll: '2';\n\t\tnextPutAll: '3';\n\t\tnextPutAll: '4'])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'bcdef';\n\t\tnextPutAll: '1';\n\t\tnextPutAll: '2';\n\t\tnextPutAll: '3';\n\t\tnextPutAll: '4'])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'adefghijk';\n\t\tnextPutAll: '0'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test144\n\t| re re2 |\n\tre _ Re on: '^abc\\00def'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: 8r00 asCharacter;\n\t\tnextPutAll: 'def';\n\t\tnextPutAll: '0'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test145\n\t| re re2 |\n\tre _ Re on: 'word ((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ \n)((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ \n)?)?)?)?)?)?)?)?)?otherword'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test146\n\t| re re2 |\n\tre _ Re on: '.*X'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test147\n\t| re re2 |\n\tre _ Re on: '.*X'.\n\tre\n\t\tbeStrangeOption;\n\t\tbeDotIncludesNewline.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test148\n\t| re re2 |\n\tre _ Re on: '(.*X|^B)'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test149\n\t| re re2 |\n\tre _ Re on: '(.*X|^B)'.\n\tre\n\t\tbeStrangeOption;\n\t\tbeDotIncludesNewline.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:22'!\ntestNewSuite2test15\n\t| re |\n\tre _ Re on: '[z-a]'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test150\n\t| re re2 |\n\tre _ Re on: '(?s)(.*X|^B)'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test151\n\t| re re2 |\n\tre _ Re on: '(?s:.*X|^B)'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test152\n\t| re re2 |\n\tre _ Re on: '\\Biss\\B'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'Mississippi') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test153\n\t| re re2 |\n\tre _ Re on: '\\Biss\\B'.\n\tre\n\t\tbeStrangeOption;\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'Mississippi') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test154\n\t| re re2 |\n\tre _ Re on: 'iss'.\n\tre\n\t\tbeStrangeOption;\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'Mississippi') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test155\n\t| re re2 |\n\tre _ Re on: '\\Biss\\B'.\n\tre\n\t\tbeStrangeOption;\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'Mississippi') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test156\n\t| re re2 |\n\tre _ Re on: '\\Biss\\B'.\n\tre\n\t\tbeStrangeOption;\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'Mississippi') isNil not.\n\tre2 _ re copy beAnchored.\n\tself assert: (re2 search: 'Mississippi') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test157\n\t| re re2 |\n\tre _ Re on: '(?<=[Ms])iss'.\n\tre\n\t\tbeStrangeOption;\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'Mississippi') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test158\n\t| re re2 |\n\tre _ Re on: '(?<=[Ms])iss'.\n\tre\n\t\tbeStrangeOption;\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'Mississippi') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test159\n\t| re re2 |\n\tre _ Re on: '^iss'.\n\tre\n\t\tbeStrangeOption;\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ississippi') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:22'!\ntestNewSuite2test16\n\t| re |\n\tre _ Re on: '^*'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test160\n\t| re re2 |\n\tre _ Re on: '.*iss'.\n\tre\n\t\tbeStrangeOption;\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abciss';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'xyzisspqr'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test161\n\t| re re2 |\n\tre _ Re on: '.i.'.\n\tre\n\t\tbeStrangeOption;\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'Mississippi') isNil not.\n\tre2 _ re copy beAnchored.\n\tself assert: (re2 search: 'Mississippi') isNil not.\n\tself assert: (re search: 'Missouri river') isNil not.\n\tre2 _ re copy beAnchored.\n\tself assert: (re2 search: 'Missouri river') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test162\n\t| re re2 |\n\tre _ Re on: '^.is'.\n\tre\n\t\tbeStrangeOption;\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'Mississippi') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test163\n\t| re re2 |\n\tre _ Re on: '^ab\\n'.\n\tre\n\t\tbeStrangeOption;\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'ab';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'ab';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'cd'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test164\n\t| re re2 |\n\tre _ Re on: '^ab\\n'.\n\tre\n\t\tbeMultiline;\n\t\tbeStrangeOption;\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'ab';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'ab';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'cd'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test165\n\t| re re2 |\n\tre _ Re on: 'abc'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test166\n\t| re re2 |\n\tre _ Re on: 'abc|bac'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test167\n\t| re re2 |\n\tre _ Re on: '(abc|bac)'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test168\n\t| re re2 |\n\tre _ Re on: '(abc|(c|dc))'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test169\n\t| re re2 |\n\tre _ Re on: '(abc|(d|de)c)'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:22'!\ntestNewSuite2test17\n\t| re |\n\tre _ Re on: '(abc'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test170\n\t| re re2 |\n\tre _ Re on: 'a*'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test171\n\t| re re2 |\n\tre _ Re on: 'a+'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test172\n\t| re re2 |\n\tre _ Re on: '(baa|a+)'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test173\n\t| re re2 |\n\tre _ Re on: 'a{0,3}'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test174\n\t| re re2 |\n\tre _ Re on: 'baa{3,}'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test175\n\t| re re2 |\n\tre _ Re on: '\"([^\\\\\"]+|\\\\.)*\"'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test176\n\t| re re2 |\n\tre _ Re on: '(abc|ab[cd])'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test177\n\t| re re2 |\n\tre _ Re on: '(a|.)'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test178\n\t| re re2 |\n\tre _ Re on: 'a|ba|\\w'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test179\n\t| re re2 |\n\tre _ Re on: 'abc(?=pqr)'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:22'!\ntestNewSuite2test18\n\t| re |\n\tre _ Re on: '(?# abc'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test180\n\t| re re2 |\n\tre _ Re on: '...(?<=abc)'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test181\n\t| re re2 |\n\tre _ Re on: 'abc(?!!pqr)'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test182\n\t| re re2 |\n\tre _ Re on: 'ab.'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test183\n\t| re re2 |\n\tre _ Re on: 'ab[xyz]'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test184\n\t| re re2 |\n\tre _ Re on: 'abc*'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test185\n\t| re re2 |\n\tre _ Re on: 'ab.c*'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test186\n\t| re re2 |\n\tre _ Re on: 'a.c*'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test187\n\t| re re2 |\n\tre _ Re on: '.c*'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test188\n\t| re re2 |\n\tre _ Re on: 'ac*'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test189\n\t| re re2 |\n\tre _ Re on: '(a.c*|b.c*)'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:23'!\ntestNewSuite2test19\n\t| re |\n\tre _ Re on: '(?z)abc'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test190\n\t| re re2 |\n\tre _ Re on: 'a.c*|aba'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test191\n\t| re re2 |\n\tre _ Re on: '.+a'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test192\n\t| re re2 |\n\tre _ Re on: '(?=abcda)a.*'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test193\n\t| re re2 |\n\tre _ Re on: '(?=a)a.*'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test194\n\t| re re2 |\n\tre _ Re on: 'a(b)*'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test195\n\t| re re2 |\n\tre _ Re on: 'a\\d*'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test196\n\t| re re2 |\n\tre _ Re on: 'ab\\d*'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test197\n\t| re re2 |\n\tre _ Re on: 'a(\\d)*'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test198\n\t| re re2 |\n\tre _ Re on: 'abcde{0,0}'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test199\n\t| re re2 |\n\tre _ Re on: 'ab\\d+'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test2\n\t| re re2 |\n\tre _ Re on: 'abc'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: 'defabc') isNil not.\n\tre2 _ re copy beAnchored.\n\tself assert: (re2 search: 'abc') isNil not.\n\tre2 _ re copy beAnchored.\n\tself assert: (re2 search: 'defabc') isNil.\n\tself assert: (re search: 'ABC') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test20\n\t| re re2 |\n\tre _ Re on: '.*b'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test200\n\t| re re2 |\n\tre _ Re on: 'a(?(1)b)'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test201\n\t| re re2 |\n\tre _ Re on: 'a(?(1)bag|big)'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test202\n\t| re re2 |\n\tre _ Re on: 'a(?(1)bag|big)*'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test203\n\t| re re2 |\n\tre _ Re on: 'a(?(1)bag|big)+'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test204\n\t| re re2 |\n\tre _ Re on: 'a(?(1)b..|b..)'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test205\n\t| re re2 |\n\tre _ Re on: 'ab\\d{0}e'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 14:26'!\ntestNewSuite2test206\n\t| re |\n\tre _ Re on: 'a?b?'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a') isNil not.\n\tself assert: (re search: 'b') isNil not.\n\tself assert: (re search: 'ab') isNil not.\n\tself assert: (re search: '\\') isNil not.\n\tself assert: (re search: 'xy') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 14:27'!\ntestNewSuite2test207\n\t| re |\n\tre _ Re on: '|-'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcd') isNil not.\n\tself assert: (re search: '-abc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:28'!\ntestNewSuite2test208\n\t| re |\n\tre _ Re on: 'a*(b+)(z)(z)'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aaaabbbbzzzz') isNil not.! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test209\n\t| re re2 |\n\tre _ Re on: '^.?abcd'.\n\tre\n\t\tbeStrangeOption;\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test21\n\t| re re2 |\n\tre _ Re on: '.*?b'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test210\n\t| re re2 |\n\tre _ Re on: '\\(             # ( at start\n  (?:           # Non-capturing bracket\n  (?>[^()]+)    # Either a sequence of non-brackets (no backtracking)\n  |             # Or\n  (?R)          # Recurse - i.e. nested bracketed string\n  )*            # Zero or more contents\n  \\)            # Closing )\n  '.\n\tre\n\t\tbeExtended.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '(abcd)') isNil not.\n\tself assert: (re search: '(abcd)xyz') isNil not.\n\tself assert: (re search: 'xyz(abcd)') isNil not.\n\tself assert: (re search: '(ab(xy)cd)pqr') isNil not.\n\tself assert: (re search: '(ab(xycd)pqr') isNil not.\n\tself assert: (re search: '() abc ()') isNil not.\n\tself assert: (re search: '12(abcde(fsh)xyz(foo(bar))lmno)89') isNil not.\n\tself assert: (re search: 'abcd') isNil.\n\tself assert: (re search: 'abcd)') isNil.\n\tself assert: (re search: '(abcd') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test211\n\t| re re2 |\n\tre _ Re on: '\\(  ( (?>[^()]+) | (?R) )* \\) '.\n\tre\n\t\tbeExtended;\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '(ab(xy)cd)pqr') isNil not.\n\tself assert: (re search: '1(abcd)(x(y)z)pqr') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test212\n\t| re re2 |\n\tre _ Re on: '\\(  (?: (?>[^()]+) | (?R) ) \\) '.\n\tre\n\t\tbeExtended.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '(abcd)') isNil not.\n\tself assert: (re search: '(ab(xy)cd)') isNil not.\n\tself assert: (re search: '(a(b(c)d)e)') isNil not.\n\tself assert: (re search: '((ab))') isNil not.\n\tself assert: (re search: '()') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test213\n\t| re re2 |\n\tre _ Re on: '\\(  (?: (?>[^()]+) | (?R) )? \\) '.\n\tre\n\t\tbeExtended.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '()') isNil not.\n\tself assert: (re search: '12(abcde(fsh)xyz(foo(bar))lmno)89') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test214\n\t| re re2 |\n\tre _ Re on: '\\(  ( (?>[^()]+) | (?R) )* \\) '.\n\tre\n\t\tbeExtended.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '(ab(xy)cd)') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test215\n\t| re re2 |\n\tre _ Re on: '\\( ( ( (?>[^()]+) | (?R) )* ) \\) '.\n\tre\n\t\tbeExtended.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '(ab(xy)cd)') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test216\n\t| re re2 |\n\tre _ Re on: '\\( (123)? ( ( (?>[^()]+) | (?R) )* ) \\) '.\n\tre\n\t\tbeExtended.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '(ab(xy)cd)') isNil not.\n\tself assert: (re search: '(123ab(xy)cd)') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test217\n\t| re re2 |\n\tre _ Re on: '\\( ( (123)? ( (?>[^()]+) | (?R) )* ) \\) '.\n\tre\n\t\tbeExtended.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '(ab(xy)cd)') isNil not.\n\tself assert: (re search: '(123ab(xy)cd)') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test218\n\t| re re2 |\n\tre _ Re on: '\\( (((((((((( ( (?>[^()]+) | (?R) )* )))))))))) \\) '.\n\tre\n\t\tbeExtended.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '(ab(xy)cd)') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test219\n\t| re re2 |\n\tre _ Re on: '\\( ( ( (?>[^()<>]+) | ((?>[^()]+)) | (?R) )* ) \\) '.\n\tre\n\t\tbeExtended.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '(abcd(xyz<p>qrs)123)') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test22\n\t| re re2 |\n\tre _ Re on: 'cat|dog|elephant'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'this sentence eventually mentions a cat') isNil not.\n\tself assert: (re search: 'this sentences rambles on and on for a while and then reaches elephant') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test220\n\t| re re2 |\n\tre _ Re on: '\\( ( ( (?>[^()]+) | ((?R)) )* ) \\) '.\n\tre\n\t\tbeExtended.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '(ab(cd)ef)') isNil not.\n\tself assert: (re search: '(ab(cd(ef)gh)ij)') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test221\n\t| re re2 |\n\tre _ Re on: '^[[:alnum:]]'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test222\n\t| re re2 |\n\tre _ Re on: '^[[:alpha:]]'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test223\n\t| re re2 |\n\tre _ Re on: '^[[:ascii:]]'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test224\n\t| re re2 |\n\tre _ Re on: '^[[:cntrl:]]'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test225\n\t| re re2 |\n\tre _ Re on: '^[[:digit:]]'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test226\n\t| re re2 |\n\tre _ Re on: '^[[:graph:]]'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test227\n\t| re re2 |\n\tre _ Re on: '^[[:lower:]]'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test228\n\t| re re2 |\n\tre _ Re on: '^[[:print:]]'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test229\n\t| re re2 |\n\tre _ Re on: '^[[:punct:]]'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test23\n\t| re re2 |\n\tre _ Re on: 'cat|dog|elephant'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'this sentence eventually mentions a cat') isNil not.\n\tself assert: (re search: 'this sentences rambles on and on for a while and then reaches elephant') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test230\n\t| re re2 |\n\tre _ Re on: '^[[:space:]]'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test231\n\t| re re2 |\n\tre _ Re on: '^[[:upper:]]'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test232\n\t| re re2 |\n\tre _ Re on: '^[[:xdigit:]]'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test233\n\t| re re2 |\n\tre _ Re on: '^[[:word:]]'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test234\n\t| re re2 |\n\tre _ Re on: '^[[:^cntrl:]]'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test235\n\t| re re2 |\n\tre _ Re on: '^[12[:^digit:]]'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test236\n\t| re re2 |\n\tre _ Re on: '[01[:alpha:]%]'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:30'!\ntestNewSuite2test237\n\t| re |\n\tre _ Re on: '[[.ch.]]'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:30'!\ntestNewSuite2test238\n\t| re |\n\tre _ Re on: '[[=ch=]]'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:30'!\ntestNewSuite2test239\n\t| re |\n\tre _ Re on: '[[:rhubarb:]]'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test24\n\t| re re2 |\n\tre _ Re on: 'cat|dog|elephant'.\n\tre\n\t\tbeNotCaseSensitive;\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'this sentence eventually mentions a CAT cat') isNil not.\n\tself assert: (re search: 'this sentences rambles on and on for a while to elephant ElePhant') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test240\n\t| re re2 |\n\tre _ Re on: '[[:upper:]]'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'A') isNil not.\n\tself assert: (re search: 'a') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test241\n\t| re re2 |\n\tre _ Re on: '[[:lower:]]'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'A') isNil not.\n\tself assert: (re search: 'a') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test242\n\t| re re2 |\n\tre _ Re on: '((?-i)[[:lower:]])[[:lower:]]'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ab') isNil not.\n\tself assert: (re search: 'aB') isNil not.\n\tself assert: (re search: 'Ab') isNil.\n\tself assert: (re search: 'AB') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:31'!\ntestNewSuite2test243\n\t| re |\n\tre _ Re on: '[\\200-\\410]'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:32'!\ntestNewSuite2test244\n\t| re |\n\tre _ Re on: '^(?(0)f|b)oo'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test245\n\t| re re2 |\n\tre _ Re on: '(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\w+)\\s+(\\270)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '\\O900 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 ABC ABC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test246\n\t| re re2 |\n\tre _ Re on: '(main(O)?)+'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'mainmain') isNil not.\n\tself assert: (re search: 'mainOmain') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite2test247\n\t| re re2 |\n\tre _ Re on: ' End of testinput2 '.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 00:28'!\ntestNewSuite2test248\n\t| re |\n\tre _ Re on: 'This one''s here because of the large output vector needed.'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 00:28'!\ntestNewSuite2test249\n\t| re |\n\tre _ Re on: '(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\d+(?:\\s|$))(\\w+)\\s+(\\270)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '\\O900 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 ABC ABC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test25\n\t| re re2 |\n\tre _ Re on: 'a|[bcd]'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 00:28'!\ntestNewSuite2test250\n\t| re |\n\tre _ Re on: 'This one''s here because Perl does this differently and PCRE can''t at present'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 00:28'!\ntestNewSuite2test251\n\t| re |\n\tre _ Re on: '(main(O)?)+'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'mainmain') isNil not.\n\tself assert: (re search: 'mainOmain') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 00:28'!\ntestNewSuite2test252\n\t| re |\n\tre _ Re on: ' End of testinput2 '.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test26\n\t| re re2 |\n\tre _ Re on: '(a|[^\\dZ])'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test27\n\t| re re2 |\n\tre _ Re on: '(a|b)*[\\s]'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:32'!\ntestNewSuite2test28\n\t| re |\n\tre _ Re on: '(ab\\2)'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:34'!\ntestNewSuite2test29\n\t| re |\n\tre _ Re on: '{4,5}abc'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test3\n\t| re re2 |\n\tre _ Re on: '^abc'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n\tre2 _ re copy beAnchored.\n\tself assert: (re2 search: 'abc') isNil not.\n\tself assert: (re search: 'defabc') isNil.\n\tre2 _ re copy beAnchored.\n\tself assert: (re2 search: 'defabc') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test30\n\t| re re2 |\n\tre _ Re on: '(a)(b)(c)\\2'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcb') isNil not.\n\tself assert: (re search: '\\O0abcb') isNil not.\n\tself assert: (re search: '\\O3abcb') isNil not.\n\tself assert: (re search: '\\O6abcb') isNil not.\n\tself assert: (re search: '\\O9abcb') isNil not.\n\tself assert: (re search: '\\O12abcb') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test31\n\t| re re2 |\n\tre _ Re on: '(a)bc|(a)(b)\\2'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: '\\O0abc') isNil not.\n\tself assert: (re search: '\\O3abc') isNil not.\n\tself assert: (re search: '\\O6abc') isNil not.\n\tself assert: (re search: 'aba') isNil not.\n\tself assert: (re search: '\\O0aba') isNil not.\n\tself assert: (re search: '\\O3aba') isNil not.\n\tself assert: (re search: '\\O6aba') isNil not.\n\tself assert: (re search: '\\O9aba') isNil not.\n\tself assert: (re search: '\\O12aba') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test32\n\t| re re2 |\n\tre _ Re on: 'abc$'.\n\tre\n\t\tbeDollarEndOnly.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: Character cr])) isNil.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'def'])) isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:34'!\ntestNewSuite2test33\n\t| re |\n\tre _ Re on: '(a)(b)(c)(d)(e)\\6'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test34\n\t| re re2 |\n\tre _ Re on: 'the quick brown fox'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'the quick brown fox') isNil not.\n\tself assert: (re search: 'this is a line with the quick brown fox') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test35\n\t| re re2 |\n\tre _ Re on: 'the quick brown fox'.\n\tre\n\t\tbeAnchored.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'the quick brown fox') isNil not.\n\tself assert: (re search: 'this is a line with the quick brown fox') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:36'!\ntestNewSuite2test36\n\t| re |\n\tre _ Re on: 'ab(?z)cd'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test37\n\t| re re2 |\n\tre _ Re on: '^abc|def'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcdef') isNil not.\n\tre2 _ re copy beNotBeginningOfLine.\n\tself assert: (re2 search: 'abcdef') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test38\n\t| re re2 |\n\tre _ Re on: '.*((abc)$|(def))'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'defabc') isNil not.\n\tre2 _ re copy beNotEndOfLine.\n\tself assert: (re2 search: 'defabc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test39\n\t| re re2 |\n\tre _ Re on: 'abc'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test4\n\t| re re2 |\n\tre _ Re on: 'a+bc'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test40\n\t| re re2 |\n\tre _ Re on: '^abc|def'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcdef') isNil not.\n\tre2 _ re copy beNotBeginningOfLine.\n\tself assert: (re2 search: 'abcdef') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test41\n\t| re re2 |\n\tre _ Re on: '.*((abc)$|(def))'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'defabc') isNil not.\n\tre2 _ re copy beNotEndOfLine.\n\tself assert: (re2 search: 'defabc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test42\n\t| re re2 |\n\tre _ Re on: 'the quick brown fox'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'the quick brown fox') isNil not.\n\tself assert: (re search: 'The Quick Brown Fox') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test43\n\t| re re2 |\n\tre _ Re on: 'the quick brown fox'.\n\tre\n\t\tbeStrangeOption;\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'the quick brown fox') isNil not.\n\tself assert: (re search: 'The Quick Brown Fox') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test44\n\t| re re2 |\n\tre _ Re on: 'abc.def'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'def'])) isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test45\n\t| re re2 |\n\tre _ Re on: 'abc$'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: Character cr])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:36'!\ntestNewSuite2test46\n\t| re |\n\tre _ Re on: '(abc)\\2'.\n\tre\n\t\tbeStrangeOption.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 14:28'!\ntestNewSuite2test47\n\t| re |\n\tre _ Re on: '(abc\\1)'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:37'!\ntestNewSuite2test48\n\t| re |\n\tre _ Re on: ')'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:37'!\ntestNewSuite2test49\n\t| re |\n\tre _ Re on: 'a[]b'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test5\n\t| re re2 |\n\tre _ Re on: 'a*bc'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test50\n\t| re re2 |\n\tre _ Re on: '[^aeiou ]{3,}'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'co-processors, and for') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test51\n\t| re re2 |\n\tre _ Re on: '<.*>'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc<def>ghi<klm>nop') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test52\n\t| re re2 |\n\tre _ Re on: '<.*?>'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc<def>ghi<klm>nop') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test53\n\t| re re2 |\n\tre _ Re on: '<.*>'.\n\tre\n\t\tbeNotGreedy.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc<def>ghi<klm>nop') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test54\n\t| re re2 |\n\tre _ Re on: '<.*>(?U)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc<def>ghi<klm>nop') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test55\n\t| re re2 |\n\tre _ Re on: '<.*?>'.\n\tre\n\t\tbeNotGreedy.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc<def>ghi<klm>nop') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test56\n\t| re re2 |\n\tre _ Re on: '={3,}'.\n\tre\n\t\tbeNotGreedy.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc========def') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test57\n\t| re re2 |\n\tre _ Re on: '(?U)={3,}?'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc========def') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test58\n\t| re re2 |\n\tre _ Re on: '(?<!!bar|cattle)foo'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'foo') isNil not.\n\tself assert: (re search: 'catfoo') isNil not.\n\tself assert: (re search: 'the barfoo') isNil.\n\tself assert: (re search: 'and cattlefoo') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:38'!\ntestNewSuite2test59\n\t| re |\n\tre _ Re on: '(?<=a+)b'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test6\n\t| re re2 |\n\tre _ Re on: 'a{3}bc'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:38'!\ntestNewSuite2test60\n\t| re |\n\tre _ Re on: '(?<=aaa|b{0,3})b'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:39'!\ntestNewSuite2test61\n\t| re |\n\tre _ Re on: '(?<!!(foo)a\\1)bar'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test62\n\t| re re2 |\n\tre _ Re on: '(?i)abc'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test63\n\t| re re2 |\n\tre _ Re on: '(a|(?m)a)'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test64\n\t| re re2 |\n\tre _ Re on: '(?i)^1234'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test65\n\t| re re2 |\n\tre _ Re on: '(^b|(?i)^d)'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test66\n\t| re re2 |\n\tre _ Re on: '(?s).*'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test67\n\t| re re2 |\n\tre _ Re on: '[abcd]'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test68\n\t| re re2 |\n\tre _ Re on: '(?i)[abcd]'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test69\n\t| re re2 |\n\tre _ Re on: '(?m)[xy]|(b|c)'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test7\n\t| re re2 |\n\tre _ Re on: '(abc|a+z)'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test70\n\t| re re2 |\n\tre _ Re on: '(^a|^b)'.\n\tre\n\t\tbeMultiline.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test71\n\t| re re2 |\n\tre _ Re on: '(?i)(^a|^b)'.\n\tre\n\t\tbeMultiline.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:39'!\ntestNewSuite2test72\n\t| re |\n\tre _ Re on: '(a)(?(1)a|b|c)'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:39'!\ntestNewSuite2test73\n\t| re |\n\tre _ Re on: '(?(?=a)a|b|c)'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:40'!\ntestNewSuite2test74\n\t| re |\n\tre _ Re on: '(?(1a)'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:40'!\ntestNewSuite2test75\n\t| re |\n\tre _ Re on: '(?(?i))'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:40'!\ntestNewSuite2test76\n\t| re |\n\tre _ Re on: '(?(abc))'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:40'!\ntestNewSuite2test77\n\t| re |\n\tre _ Re on: '(?(?<ab))'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test78\n\t| re re2 |\n\tre _ Re on: '((?s)blah)\\s+\\1'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test79\n\t| re re2 |\n\tre _ Re on: '((?i)blah)\\s+\\1'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test8\n\t| re re2 |\n\tre _ Re on: '^abc$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'def';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'abc'])) isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test80\n\t| re re2 |\n\tre _ Re on: '((?i)b)'.\n\tre\n\t\tbeStrangeOption;\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test81\n\t| re re2 |\n\tre _ Re on: '(a*b|(?i:c*(?-i)d))'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test82\n\t| re re2 |\n\tre _ Re on: 'a$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a') isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'a';\n\t\tnextPut: Character cr])) isNil not.\n\tre2 _ re copy beNotEndOfLine.\n\tself assert: (re2 search: 'a') isNil.\n\tre2 _ re copy beNotEndOfLine.\n\tself assert: (re2 search: (String streamContents: [:s | s\n\t\tnextPutAll: 'a';\n\t\tnextPut: Character cr])) isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test83\n\t| re re2 |\n\tre _ Re on: 'a$'.\n\tre\n\t\tbeMultiline.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a') isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'a';\n\t\tnextPut: Character cr])) isNil not.\n\tre2 _ re copy beNotEndOfLine.\n\tself assert: (re2 search: (String streamContents: [:s | s\n\t\tnextPutAll: 'a';\n\t\tnextPut: Character cr])) isNil not.\n\tre2 _ re copy beNotEndOfLine.\n\tself assert: (re2 search: 'a') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test84\n\t| re re2 |\n\tre _ Re on: '\\Aabc'.\n\tre\n\t\tbeMultiline.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test85\n\t| re re2 |\n\tre _ Re on: '^abc'.\n\tre\n\t\tbeMultiline;\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test86\n\t| re re2 |\n\tre _ Re on: '^((a+)(?U)([ab]+)(?-U)([bc]+)(\\w*))'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aaaaabbbbbcccccdef') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test87\n\t| re re2 |\n\tre _ Re on: '(?<=foo)[ab]'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test88\n\t| re re2 |\n\tre _ Re on: '(?<!!foo)(alpha|omega)'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test89\n\t| re re2 |\n\tre _ Re on: '(?!!alphabet)[ab]'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:40'!\ntestNewSuite2test9\n\t| re |\n\tre _ Re on: 'ab\\gdef'.\n\tre\n\t\tbeExtra.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test90\n\t| re re2 |\n\tre _ Re on: '(?<=foo\\n)^bar'.\n\tre\n\t\tbeMultiline.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test91\n\t| re re2 |\n\tre _ Re on: '(?>^abc)'.\n\tre\n\t\tbeMultiline.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'def';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'abc'])) isNil not.\n\tself assert: (re search: 'defabc') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:41'!\ntestNewSuite2test92\n\t| re |\n\tre _ Re on: '(?<=ab(c+)d)ef'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:41'!\ntestNewSuite2test93\n\t| re |\n\tre _ Re on: '(?<=ab(?<=c+)d)ef'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 13:41'!\ntestNewSuite2test94\n\t| re |\n\tre _ Re on: '(?<=ab(c|de)f)g'.\n\tself should: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test95\n\t| re re2 |\n\tre _ Re on: 'The next three are in testinput2 because they have variable length branches'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test96\n\t| re re2 |\n\tre _ Re on: '(?<=bullock|donkey)-cart'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'the bullock-cart') isNil not.\n\tself assert: (re search: 'a donkey-cart race') isNil not.\n\tself assert: (re search: 'cart') isNil.\n\tself assert: (re search: 'horse-and-cart') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test97\n\t| re re2 |\n\tre _ Re on: '(?<=ab(?i)x|y|z)'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test98\n\t| re re2 |\n\tre _ Re on: '(?>.*)(?<=(abcd)|(xyz))'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'alphabetabcd') isNil not.\n\tself assert: (re search: 'endingxyz') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite2' stamp: 'acg 8/11/2002 12:30'!\ntestNewSuite2test99\n\t| re re2 |\n\tre _ Re on: '(?<=ab(?i)x(?-i)y|(?i)z|b)ZZ'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abxyZZ') isNil not.\n\tself assert: (re search: 'abXyZZ') isNil not.\n\tself assert: (re search: 'ZZZ') isNil not.\n\tself assert: (re search: 'zZZ') isNil not.\n\tself assert: (re search: 'bZZ') isNil not.\n\tself assert: (re search: 'BZZ') isNil not.\n\tself assert: (re search: 'ZZ') isNil.\n\tself assert: (re search: 'abXYZZ') isNil.\n\tself assert: (re search: 'zzz') isNil.\n\tself assert: (re search: 'bzz') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test1\n\t| re re2 |\n\tre _ Re on: '(?<!!bar)foo'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'foo') isNil not.\n\tself assert: (re search: 'catfood') isNil not.\n\tself assert: (re search: 'arfootle') isNil not.\n\tself assert: (re search: 'rfoosh') isNil not.\n\tself assert: (re search: 'barfoo') isNil.\n\tself assert: (re search: 'towbarfoo') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test10\n\t| re re2 |\n\tre _ Re on: '((?>\\d+))(\\w)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '12345a') isNil not.\n\tself assert: (re search: '12345+') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test100\n\t| re re2 |\n\tre _ Re on: 'a[^-b]c'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'adc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 13:43'!\ntestNewSuite3test101\n\t| re |\n\tre _ Re on: 'a[^]b]c'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'adc') isNil not.\n\tself assert: (re search: 'a-c') isNil not.\n\tself assert: (re search: 'a]c') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test102\n\t| re re2 |\n\tre _ Re on: '\\ba\\b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a-') isNil not.\n\tself assert: (re search: '-a') isNil not.\n\tself assert: (re search: '-a-') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test103\n\t| re re2 |\n\tre _ Re on: '\\by\\b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'xy') isNil.\n\tself assert: (re search: 'yz') isNil.\n\tself assert: (re search: 'xyz') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test104\n\t| re re2 |\n\tre _ Re on: '\\Ba\\B'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a-') isNil.\n\tself assert: (re search: '-a') isNil.\n\tself assert: (re search: '-a-') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test105\n\t| re re2 |\n\tre _ Re on: '\\By\\b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'xy') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test106\n\t| re re2 |\n\tre _ Re on: '\\by\\B'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'yz') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test107\n\t| re re2 |\n\tre _ Re on: '\\By\\B'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'xyz') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test108\n\t| re re2 |\n\tre _ Re on: '\\w'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 13:45'!\ntestNewSuite3test109\n\t| re |\n\tre _ Re on: '\\W'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '-') isNil not.\n\tself assert: (re search: 'a') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test11\n\t| re re2 |\n\tre _ Re on: '(?>a+)b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aaab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test110\n\t| re re2 |\n\tre _ Re on: 'a\\sb'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a b') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 14:29'!\ntestNewSuite3test111\n\t| re |\n\tre _ Re on: 'a\\Sb'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a-b') isNil not.\n\tself assert: (re search: 'a b') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test112\n\t| re re2 |\n\tre _ Re on: '\\d'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '1') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 13:46'!\ntestNewSuite3test113\n\t| re |\n\tre _ Re on: '\\D'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '-') isNil not.\n\tself assert: (re search: '1') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test114\n\t| re re2 |\n\tre _ Re on: '[\\w]'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 13:46'!\ntestNewSuite3test115\n\t| re |\n\tre _ Re on: '[\\W]'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '-') isNil not.\n\tself assert: (re search: 'a') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test116\n\t| re re2 |\n\tre _ Re on: 'a[\\s]b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a b') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 13:46'!\ntestNewSuite3test117\n\t| re |\n\tre _ Re on: 'a[\\S]b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a-b') isNil not.\n\tself assert: (re search: 'a b') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test118\n\t| re re2 |\n\tre _ Re on: '[\\d]'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '1') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 13:46'!\ntestNewSuite3test119\n\t| re |\n\tre _ Re on: '[\\D]'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '-') isNil not.\n\tself assert: (re search: '1') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test12\n\t| re re2 |\n\tre _ Re on: '((?>a+)b)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aaab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test120\n\t| re re2 |\n\tre _ Re on: 'ab|cd'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: 'abcd') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test121\n\t| re re2 |\n\tre _ Re on: '()ef'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'def') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test122\n\t| re re2 |\n\tre _ Re on: '$b'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test123\n\t| re re2 |\n\tre _ Re on: 'a\\(b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a(b') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test124\n\t| re re2 |\n\tre _ Re on: 'a\\(*b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ab') isNil not.\n\tself assert: (re search: 'a((b') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 13:47'!\ntestNewSuite3test125\n\t| re |\n\tre _ Re on: 'a\\\\b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: ('a\\b') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test126\n\t| re re2 |\n\tre _ Re on: '((a))'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test127\n\t| re re2 |\n\tre _ Re on: '(a)b(c)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test128\n\t| re re2 |\n\tre _ Re on: 'a+b+c'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aabbabc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test129\n\t| re re2 |\n\tre _ Re on: 'a{1,}b{1,}c'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aabbabc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test13\n\t| re re2 |\n\tre _ Re on: '(?>(a+))b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aaab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test130\n\t| re re2 |\n\tre _ Re on: 'a.+?c'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcabc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test131\n\t| re re2 |\n\tre _ Re on: '(a+|b)*'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test132\n\t| re re2 |\n\tre _ Re on: '(a+|b){0,}'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test133\n\t| re re2 |\n\tre _ Re on: '(a+|b)+'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test134\n\t| re re2 |\n\tre _ Re on: '(a+|b){1,}'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test135\n\t| re re2 |\n\tre _ Re on: '(a+|b)?'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test136\n\t| re re2 |\n\tre _ Re on: '(a+|b){0,1}'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test137\n\t| re re2 |\n\tre _ Re on: '[^ab]*'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'cde') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test138\n\t| re re2 |\n\tre _ Re on: 'abc'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'b') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test139\n\t| re re2 |\n\tre _ Re on: '/a*/'.\n\tre\n\t\tbeStrangeOption;\n\t\tbeStrangeOption;\n\t\tbeStrangeOption;\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test14\n\t| re re2 |\n\tre _ Re on: '(?>b)+'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aaabbbccc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test140\n\t| re re2 |\n\tre _ Re on: '([abc])*d'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abbbcd') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test141\n\t| re re2 |\n\tre _ Re on: '([abc])*bcd'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcd') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test142\n\t| re re2 |\n\tre _ Re on: 'a|b|c|d|e'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'e') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test143\n\t| re re2 |\n\tre _ Re on: '(a|b|c|d|e)f'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ef') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test144\n\t| re re2 |\n\tre _ Re on: 'abcd*efg'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcdefg') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test145\n\t| re re2 |\n\tre _ Re on: 'ab*'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'xabyabbbz') isNil not.\n\tself assert: (re search: 'xayabbbz') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test146\n\t| re re2 |\n\tre _ Re on: '(ab|cd)e'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcde') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test147\n\t| re re2 |\n\tre _ Re on: '[abhgefdc]ij'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'hij') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test148\n\t| re re2 |\n\tre _ Re on: '^(ab|cd)e'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test149\n\t| re re2 |\n\tre _ Re on: '(abc|)ef'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcdef') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test15\n\t| re re2 |\n\tre _ Re on: '(?>a+|b+|c+)*c'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aaabbbbccccd') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test150\n\t| re re2 |\n\tre _ Re on: '(a|b)c*d'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcd') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test151\n\t| re re2 |\n\tre _ Re on: '(ab|ab*)bc'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test152\n\t| re re2 |\n\tre _ Re on: 'a([bc]*)c*'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test153\n\t| re re2 |\n\tre _ Re on: 'a([bc]*)(c*d)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcd') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test154\n\t| re re2 |\n\tre _ Re on: 'a([bc]+)(c*d)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcd') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test155\n\t| re re2 |\n\tre _ Re on: 'a([bc]*)(c+d)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcd') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test156\n\t| re re2 |\n\tre _ Re on: 'a[bcd]*dcdcde'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'adcdcde') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test157\n\t| re re2 |\n\tre _ Re on: 'a[bcd]+dcdcde'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcde') isNil.\n\tself assert: (re search: 'adcdcde') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test158\n\t| re re2 |\n\tre _ Re on: '(ab|a)b*c'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test159\n\t| re re2 |\n\tre _ Re on: '((a)(b)c)(d)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcd') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test16\n\t| re re2 |\n\tre _ Re on: '((?>[^()]+)|\\([^()]*\\))+'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '((abc(ade)ufh()()x') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test160\n\t| re re2 |\n\tre _ Re on: '[a-zA-Z_][a-zA-Z0-9_]*'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'alpha') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test161\n\t| re re2 |\n\tre _ Re on: '^a(bc+|b[eh])g|.h$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abh') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test162\n\t| re re2 |\n\tre _ Re on: '(bc+d$|ef*g.|h?i(j|k))'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'effgz') isNil not.\n\tself assert: (re search: 'ij') isNil not.\n\tself assert: (re search: 'reffgz') isNil not.\n\tself assert: (re search: 'effg') isNil.\n\tself assert: (re search: 'bcdd') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test163\n\t| re re2 |\n\tre _ Re on: '((((((((((a))))))))))'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test164\n\t| re re2 |\n\tre _ Re on: '((((((((((a))))))))))\\10'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aa') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test165\n\t| re re2 |\n\tre _ Re on: '(((((((((a)))))))))'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test166\n\t| re re2 |\n\tre _ Re on: 'multiple words of text'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aa') isNil.\n\tself assert: (re search: 'uh-uh') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test167\n\t| re re2 |\n\tre _ Re on: 'multiple words'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'multiple words, yeah') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test168\n\t| re re2 |\n\tre _ Re on: '(.*)c(.*)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcde') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test169\n\t| re re2 |\n\tre _ Re on: '\\((.*), (.*)\\)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '(a, b)') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test17\n\t| re re2 |\n\tre _ Re on: '\\(((?>[^()]+)|\\([^()]+\\))+\\)'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '(abc)') isNil not.\n\tself assert: (re search: '(abc(def)xyz)') isNil not.\n\tself assert: (re search: '((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test170\n\t| re re2 |\n\tre _ Re on: '[k]'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test171\n\t| re re2 |\n\tre _ Re on: 'abcd'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcd') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test172\n\t| re re2 |\n\tre _ Re on: 'a(bc)d'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcd') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test173\n\t| re re2 |\n\tre _ Re on: 'a[-]?c'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ac') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test174\n\t| re re2 |\n\tre _ Re on: '(abc)\\1'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcabc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test175\n\t| re re2 |\n\tre _ Re on: '([a-c]*)\\1'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcabc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 13:49'!\ntestNewSuite3test176\n\t| re |\n\tre _ Re on: '(a)|\\1'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a') isNil not.\n\tself assert: (re search: 'ab') isNil not.\n\tself assert: (re search: 'x') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test177\n\t| re re2 |\n\tre _ Re on: '(([a-c])b*?\\2)*'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ababbbcbc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test178\n\t| re re2 |\n\tre _ Re on: '(([a-c])b*?\\2){3}'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ababbbcbc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test179\n\t| re re2 |\n\tre _ Re on: '((\\3|b)\\2(a)x)+'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aaaxabaxbaaxbbax') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test18\n\t| re re2 |\n\tre _ Re on: 'a(?-i)b'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ab') isNil not.\n\tself assert: (re search: 'Ab') isNil.\n\tself assert: (re search: 'aB') isNil.\n\tself assert: (re search: 'AB') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test180\n\t| re re2 |\n\tre _ Re on: '((\\3|b)\\2(a)){2,}'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'bbaababbabaaaaabbaaaabba') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test181\n\t| re re2 |\n\tre _ Re on: 'abc'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABC') isNil not.\n\tself assert: (re search: 'XABCY') isNil not.\n\tself assert: (re search: 'ABABC') isNil not.\n\tself assert: (re search: 'aaxabxbaxbbx') isNil.\n\tself assert: (re search: 'XBC') isNil.\n\tself assert: (re search: 'AXC') isNil.\n\tself assert: (re search: 'ABX') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test182\n\t| re re2 |\n\tre _ Re on: 'ab*c'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test183\n\t| re re2 |\n\tre _ Re on: 'ab*bc'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABC') isNil not.\n\tself assert: (re search: 'ABBC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test184\n\t| re re2 |\n\tre _ Re on: 'ab*?bc'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABBBBC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test185\n\t| re re2 |\n\tre _ Re on: 'ab{0,}?bc'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABBBBC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test186\n\t| re re2 |\n\tre _ Re on: 'ab+?bc'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABBC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test187\n\t| re re2 |\n\tre _ Re on: 'ab+bc'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABC') isNil.\n\tself assert: (re search: 'ABQ') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test188\n\t| re re2 |\n\tre _ Re on: 'ab{1,}bc'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test189\n\t| re re2 |\n\tre _ Re on: 'ab+bc'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABBBBC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test19\n\t| re re2 |\n\tre _ Re on: '(a (?x)b c)d e'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a bcd e') isNil not.\n\tself assert: (re search: 'a b cd e') isNil.\n\tself assert: (re search: 'abcd e') isNil.\n\tself assert: (re search: 'a bcde') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test190\n\t| re re2 |\n\tre _ Re on: 'ab{1,}?bc'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABBBBC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test191\n\t| re re2 |\n\tre _ Re on: 'ab{1,3}?bc'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABBBBC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test192\n\t| re re2 |\n\tre _ Re on: 'ab{3,4}?bc'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABBBBC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test193\n\t| re re2 |\n\tre _ Re on: 'ab{4,5}?bc'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABQ') isNil.\n\tself assert: (re search: 'ABBBBC') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test194\n\t| re re2 |\n\tre _ Re on: 'ab??bc'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABBC') isNil not.\n\tself assert: (re search: 'ABC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test195\n\t| re re2 |\n\tre _ Re on: 'ab{0,1}?bc'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test196\n\t| re re2 |\n\tre _ Re on: 'ab??bc'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test197\n\t| re re2 |\n\tre _ Re on: 'ab??c'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test198\n\t| re re2 |\n\tre _ Re on: 'ab{0,1}?c'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test199\n\t| re re2 |\n\tre _ Re on: '^abc$'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABC') isNil not.\n\tself assert: (re search: 'ABBBBC') isNil.\n\tself assert: (re search: 'ABCC') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test2\n\t| re re2 |\n\tre _ Re on: '\\w{3}(?<!!bar)foo'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'catfood') isNil not.\n\tself assert: (re search: 'foo') isNil.\n\tself assert: (re search: 'barfoo') isNil.\n\tself assert: (re search: 'towbarfoo') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test20\n\t| re re2 |\n\tre _ Re on: '(a b(?x)c d (?-x)e f)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a bcde f') isNil not.\n\tself assert: (re search: 'abcdef') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test200\n\t| re re2 |\n\tre _ Re on: '^abc'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABCC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test201\n\t| re re2 |\n\tre _ Re on: '^abc$'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test202\n\t| re re2 |\n\tre _ Re on: 'abc$'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'AABC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test203\n\t| re re2 |\n\tre _ Re on: '^'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test204\n\t| re re2 |\n\tre _ Re on: '$'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test205\n\t| re re2 |\n\tre _ Re on: 'a.c'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABC') isNil not.\n\tself assert: (re search: 'AXC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test206\n\t| re re2 |\n\tre _ Re on: 'a.*?c'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'AXYZC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 13:50'!\ntestNewSuite3test207\n\t| re |\n\tre _ Re on: 'a.*c'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'AABC') isNil not.\n\tself assert: (re search: 'AXYZD') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test208\n\t| re re2 |\n\tre _ Re on: 'a[bc]d'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABD') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test209\n\t| re re2 |\n\tre _ Re on: 'a[b-d]e'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ACE') isNil not.\n\tself assert: (re search: 'ABC') isNil.\n\tself assert: (re search: 'ABD') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test21\n\t| re re2 |\n\tre _ Re on: '(a(?i)b)c'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: 'aBc') isNil not.\n\tself assert: (re search: 'abC') isNil.\n\tself assert: (re search: 'aBC') isNil.\n\tself assert: (re search: 'Abc') isNil.\n\tself assert: (re search: 'ABc') isNil.\n\tself assert: (re search: 'ABC') isNil.\n\tself assert: (re search: 'AbC') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test210\n\t| re re2 |\n\tre _ Re on: 'a[b-d]'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'AAC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test211\n\t| re re2 |\n\tre _ Re on: 'a[-b]'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'A-') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test212\n\t| re re2 |\n\tre _ Re on: 'a[b-]'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'A-') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test213\n\t| re re2 |\n\tre _ Re on: 'a]'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'A]') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test214\n\t| re re2 |\n\tre _ Re on: 'a[]]b'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'A]B') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test215\n\t| re re2 |\n\tre _ Re on: 'a[^bc]d'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'AED') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test216\n\t| re re2 |\n\tre _ Re on: 'a[^-b]c'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ADC') isNil not.\n\tself assert: (re search: 'ABD') isNil.\n\tself assert: (re search: 'A-C') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test217\n\t| re re2 |\n\tre _ Re on: 'a[^]b]c'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ADC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test218\n\t| re re2 |\n\tre _ Re on: 'ab|cd'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABC') isNil not.\n\tself assert: (re search: 'ABCD') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test219\n\t| re re2 |\n\tre _ Re on: '()ef'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'DEF') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test22\n\t| re re2 |\n\tre _ Re on: 'a(?i:b)c'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: 'aBc') isNil not.\n\tself assert: (re search: 'ABC') isNil.\n\tself assert: (re search: 'abC') isNil.\n\tself assert: (re search: 'aBC') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test220\n\t| re re2 |\n\tre _ Re on: '$b'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'A]C') isNil.\n\tself assert: (re search: 'B') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test221\n\t| re re2 |\n\tre _ Re on: 'a\\(b'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'A(B') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test222\n\t| re re2 |\n\tre _ Re on: 'a\\(*b'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'AB') isNil not.\n\tself assert: (re search: 'A((B') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 13:52'!\ntestNewSuite3test223\n\t| re re2 |\n\tre _ Re on: 'a\\\\b'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tre2 _ re copy beNotBeginningOfLine.\n\tself assert: (re2 search: 'A') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test224\n\t| re re2 |\n\tre _ Re on: '((a))'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test225\n\t| re re2 |\n\tre _ Re on: '(a)b(c)'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test226\n\t| re re2 |\n\tre _ Re on: 'a+b+c'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'AABBABC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test227\n\t| re re2 |\n\tre _ Re on: 'a{1,}b{1,}c'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'AABBABC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test228\n\t| re re2 |\n\tre _ Re on: 'a.+?c'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABCABC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test229\n\t| re re2 |\n\tre _ Re on: 'a.*?c'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABCABC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test23\n\t| re re2 |\n\tre _ Re on: 'a(?i:b)*c'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aBc') isNil not.\n\tself assert: (re search: 'aBBc') isNil not.\n\tself assert: (re search: 'aBC') isNil.\n\tself assert: (re search: 'aBBC') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test230\n\t| re re2 |\n\tre _ Re on: 'a.{0,5}?c'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABCABC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test231\n\t| re re2 |\n\tre _ Re on: '(a+|b)*'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'AB') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test232\n\t| re re2 |\n\tre _ Re on: '(a+|b){0,}'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'AB') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test233\n\t| re re2 |\n\tre _ Re on: '(a+|b)+'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'AB') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test234\n\t| re re2 |\n\tre _ Re on: '(a+|b){1,}'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'AB') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test235\n\t| re re2 |\n\tre _ Re on: '(a+|b)?'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'AB') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test236\n\t| re re2 |\n\tre _ Re on: '(a+|b){0,1}'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'AB') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test237\n\t| re re2 |\n\tre _ Re on: '(a+|b){0,1}?'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'AB') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test238\n\t| re re2 |\n\tre _ Re on: '[^ab]*'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'CDE') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test239\n\t| re re2 |\n\tre _ Re on: 'abc'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test24\n\t| re re2 |\n\tre _ Re on: 'a(?=b(?i)c)\\w\\wd'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcd') isNil not.\n\tself assert: (re search: 'abCd') isNil not.\n\tself assert: (re search: 'aBCd') isNil.\n\tself assert: (re search: 'abcD') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test240\n\t| re re2 |\n\tre _ Re on: 'a*'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test241\n\t| re re2 |\n\tre _ Re on: '([abc])*d'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABBBCD') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test242\n\t| re re2 |\n\tre _ Re on: '([abc])*bcd'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABCD') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test243\n\t| re re2 |\n\tre _ Re on: 'a|b|c|d|e'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'E') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test244\n\t| re re2 |\n\tre _ Re on: '(a|b|c|d|e)f'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'EF') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test245\n\t| re re2 |\n\tre _ Re on: 'abcd*efg'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABCDEFG') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test246\n\t| re re2 |\n\tre _ Re on: 'ab*'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'XABYABBBZ') isNil not.\n\tself assert: (re search: 'XAYABBBZ') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test247\n\t| re re2 |\n\tre _ Re on: '(ab|cd)e'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABCDE') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test248\n\t| re re2 |\n\tre _ Re on: '[abhgefdc]ij'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'HIJ') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 13:53'!\ntestNewSuite3test249\n\t| re |\n\tre _ Re on: '^(ab|cd)e'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABCDE') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test25\n\t| re re2 |\n\tre _ Re on: '(?s-i:more.*than).*million'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'more than million') isNil not.\n\tself assert: (re search: 'more than MILLION') isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'more ';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: ' than Million'])) isNil not.\n\tself assert: (re search: 'MORE THAN MILLION') isNil.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'more ';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: ' than ';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: ' million'])) isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test250\n\t| re re2 |\n\tre _ Re on: '(abc|)ef'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABCDEF') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test251\n\t| re re2 |\n\tre _ Re on: '(a|b)c*d'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABCD') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test252\n\t| re re2 |\n\tre _ Re on: '(ab|ab*)bc'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test253\n\t| re re2 |\n\tre _ Re on: 'a([bc]*)c*'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test254\n\t| re re2 |\n\tre _ Re on: 'a([bc]*)(c*d)'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABCD') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test255\n\t| re re2 |\n\tre _ Re on: 'a([bc]+)(c*d)'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABCD') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test256\n\t| re re2 |\n\tre _ Re on: 'a([bc]*)(c+d)'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABCD') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test257\n\t| re re2 |\n\tre _ Re on: 'a[bcd]*dcdcde'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ADCDCDE') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test258\n\t| re re2 |\n\tre _ Re on: 'a[bcd]+dcdcde'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test259\n\t| re re2 |\n\tre _ Re on: '(ab|a)b*c'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test26\n\t| re re2 |\n\tre _ Re on: '(?:(?s-i)more.*than).*million'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'more than million') isNil not.\n\tself assert: (re search: 'more than MILLION') isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'more ';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: ' than Million'])) isNil not.\n\tself assert: (re search: 'MORE THAN MILLION') isNil.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'more ';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: ' than ';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: ' million'])) isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test260\n\t| re re2 |\n\tre _ Re on: '((a)(b)c)(d)'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABCD') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test261\n\t| re re2 |\n\tre _ Re on: '[a-zA-Z_][a-zA-Z0-9_]*'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ALPHA') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test262\n\t| re re2 |\n\tre _ Re on: '^a(bc+|b[eh])g|.h$'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABH') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test263\n\t| re re2 |\n\tre _ Re on: '(bc+d$|ef*g.|h?i(j|k))'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'EFFGZ') isNil not.\n\tself assert: (re search: 'IJ') isNil not.\n\tself assert: (re search: 'REFFGZ') isNil not.\n\tself assert: (re search: 'ADCDCDE') isNil.\n\tself assert: (re search: 'EFFG') isNil.\n\tself assert: (re search: 'BCDD') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test264\n\t| re re2 |\n\tre _ Re on: '((((((((((a))))))))))'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'A') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test265\n\t| re re2 |\n\tre _ Re on: '((((((((((a))))))))))\\10'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'AA') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test266\n\t| re re2 |\n\tre _ Re on: '(((((((((a)))))))))'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'A') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test267\n\t| re re2 |\n\tre _ Re on: '(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'A') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test268\n\t| re re2 |\n\tre _ Re on: '(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'C') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test269\n\t| re re2 |\n\tre _ Re on: 'multiple words of text'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'AA') isNil.\n\tself assert: (re search: 'UH-UH') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test27\n\t| re re2 |\n\tre _ Re on: '(?>a(?i)b+)+c'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: 'aBbc') isNil not.\n\tself assert: (re search: 'aBBc') isNil not.\n\tself assert: (re search: 'Abc') isNil.\n\tself assert: (re search: 'abAb') isNil.\n\tself assert: (re search: 'abbC') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test270\n\t| re re2 |\n\tre _ Re on: 'multiple words'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'MULTIPLE WORDS, YEAH') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test271\n\t| re re2 |\n\tre _ Re on: '(.*)c(.*)'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABCDE') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test272\n\t| re re2 |\n\tre _ Re on: '\\((.*), (.*)\\)'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '(A, B)') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test273\n\t| re re2 |\n\tre _ Re on: '[k]'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test274\n\t| re re2 |\n\tre _ Re on: 'abcd'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABCD') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test275\n\t| re re2 |\n\tre _ Re on: 'a(bc)d'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABCD') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test276\n\t| re re2 |\n\tre _ Re on: 'a[-]?c'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'AC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test277\n\t| re re2 |\n\tre _ Re on: '(abc)\\1'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABCABC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test278\n\t| re re2 |\n\tre _ Re on: '([a-c]*)\\1'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ABCABC') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test279\n\t| re re2 |\n\tre _ Re on: 'a(?!!b).'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abad') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test28\n\t| re re2 |\n\tre _ Re on: '(?=a(?i)b)\\w\\wc'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: 'aBc') isNil not.\n\tself assert: (re search: 'Ab') isNil.\n\tself assert: (re search: 'abC') isNil.\n\tself assert: (re search: 'aBC') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test280\n\t| re re2 |\n\tre _ Re on: 'a(?=d).'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abad') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test281\n\t| re re2 |\n\tre _ Re on: 'a(?=c|d).'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abad') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test282\n\t| re re2 |\n\tre _ Re on: 'a(?:b|c|d)(.)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ace') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test283\n\t| re re2 |\n\tre _ Re on: 'a(?:b|c|d)*(.)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ace') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test284\n\t| re re2 |\n\tre _ Re on: 'a(?:b|c|d)+?(.)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ace') isNil not.\n\tself assert: (re search: 'acdbcdbe') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test285\n\t| re re2 |\n\tre _ Re on: 'a(?:b|c|d)+(.)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'acdbcdbe') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test286\n\t| re re2 |\n\tre _ Re on: 'a(?:b|c|d){2}(.)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'acdbcdbe') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test287\n\t| re re2 |\n\tre _ Re on: 'a(?:b|c|d){4,5}(.)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'acdbcdbe') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test288\n\t| re re2 |\n\tre _ Re on: 'a(?:b|c|d){4,5}?(.)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'acdbcdbe') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test289\n\t| re re2 |\n\tre _ Re on: '((foo)|(bar))*'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'foobar') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test29\n\t| re re2 |\n\tre _ Re on: '(?<=a(?i)b)(\\w\\w)c'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abxxc') isNil not.\n\tself assert: (re search: 'aBxxc') isNil not.\n\tself assert: (re search: 'Abxxc') isNil.\n\tself assert: (re search: 'ABxxc') isNil.\n\tself assert: (re search: 'abxxC') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test290\n\t| re re2 |\n\tre _ Re on: 'a(?:b|c|d){6,7}(.)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'acdbcdbe') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test291\n\t| re re2 |\n\tre _ Re on: 'a(?:b|c|d){6,7}?(.)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'acdbcdbe') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test292\n\t| re re2 |\n\tre _ Re on: 'a(?:b|c|d){5,6}(.)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'acdbcdbe') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test293\n\t| re re2 |\n\tre _ Re on: 'a(?:b|c|d){5,6}?(.)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'acdbcdbe') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test294\n\t| re re2 |\n\tre _ Re on: 'a(?:b|c|d){5,7}(.)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'acdbcdbe') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test295\n\t| re re2 |\n\tre _ Re on: 'a(?:b|c|d){5,7}?(.)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'acdbcdbe') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test296\n\t| re re2 |\n\tre _ Re on: 'a(?:b|(c|e){1,2}?|d)+?(.)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ace') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test297\n\t| re re2 |\n\tre _ Re on: '^(.+)?B'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'AB') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test298\n\t| re re2 |\n\tre _ Re on: '^([^a-z])|(\\^)$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '.') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test299\n\t| re re2 |\n\tre _ Re on: '^[<>]&'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '<&OUT') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test3\n\t| re re2 |\n\tre _ Re on: '(?<=(foo)a)bar'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'fooabar') isNil not.\n\tself assert: (re search: 'bar') isNil.\n\tself assert: (re search: 'foobbar') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test30\n\t| re re2 |\n\tre _ Re on: '(?:(a)|b)(?(1)A|B)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aA') isNil not.\n\tself assert: (re search: 'bB') isNil not.\n\tself assert: (re search: 'aB') isNil.\n\tself assert: (re search: 'bA') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test300\n\t| re re2 |\n\tre _ Re on: '^(a\\1?){4}$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aaaaaaaaaa') isNil not.\n\tself assert: (re search: 'AB') isNil.\n\tself assert: (re search: 'aaaaaaaaa') isNil.\n\tself assert: (re search: 'aaaaaaaaaaa') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test301\n\t| re re2 |\n\tre _ Re on: '^(a(?(1)\\1)){4}$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aaaaaaaaaa') isNil not.\n\tself assert: (re search: 'aaaaaaaaa') isNil.\n\tself assert: (re search: 'aaaaaaaaaaa') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test302\n\t| re re2 |\n\tre _ Re on: '(?:(f)(o)(o)|(b)(a)(r))*'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'foobar') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test303\n\t| re re2 |\n\tre _ Re on: '(?<=a)b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ab') isNil not.\n\tself assert: (re search: 'cb') isNil.\n\tself assert: (re search: 'b') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test304\n\t| re re2 |\n\tre _ Re on: '(?<!!c)b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ab') isNil not.\n\tself assert: (re search: 'b') isNil not.\n\tself assert: (re search: 'b') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test305\n\t| re re2 |\n\tre _ Re on: '(?:..)*a'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aba') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test306\n\t| re re2 |\n\tre _ Re on: '(?:..)*?a'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aba') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test307\n\t| re re2 |\n\tre _ Re on: '^(?:b|a(?=(.)))*\\1'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test308\n\t| re re2 |\n\tre _ Re on: '^(){3,5}'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test309\n\t| re re2 |\n\tre _ Re on: '^(a+)*ax'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aax') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test31\n\t| re re2 |\n\tre _ Re on: '^(a)?(?(1)a|b)+$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aa') isNil not.\n\tself assert: (re search: 'b') isNil not.\n\tself assert: (re search: 'bb') isNil not.\n\tself assert: (re search: 'ab') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test310\n\t| re re2 |\n\tre _ Re on: '^((a|b)+)*ax'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aax') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test311\n\t| re re2 |\n\tre _ Re on: '^((a|bc)+)*ax'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aax') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test312\n\t| re re2 |\n\tre _ Re on: '(a|x)*ab'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'cab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test313\n\t| re re2 |\n\tre _ Re on: '(a)*ab'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'cab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test314\n\t| re re2 |\n\tre _ Re on: '(?:(?i)a)b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test315\n\t| re re2 |\n\tre _ Re on: '((?i)a)b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test316\n\t| re re2 |\n\tre _ Re on: '(?:(?i)a)b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'Ab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test317\n\t| re re2 |\n\tre _ Re on: '((?i)a)b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'Ab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test318\n\t| re re2 |\n\tre _ Re on: '(?:(?i)a)b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'cb') isNil.\n\tself assert: (re search: 'aB') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test319\n\t| re re2 |\n\tre _ Re on: '((?i)a)b'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test32\n\t| re re2 |\n\tre _ Re on: '^(?(?=abc)\\w{3}:|\\d\\d)$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc:') isNil not.\n\tself assert: (re search: '12') isNil not.\n\tself assert: (re search: '123') isNil.\n\tself assert: (re search: 'xyz') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test320\n\t| re re2 |\n\tre _ Re on: '(?i:a)b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test321\n\t| re re2 |\n\tre _ Re on: '((?i:a))b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test322\n\t| re re2 |\n\tre _ Re on: '(?i:a)b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'Ab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test323\n\t| re re2 |\n\tre _ Re on: '((?i:a))b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'Ab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test324\n\t| re re2 |\n\tre _ Re on: '(?i:a)b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aB') isNil.\n\tself assert: (re search: 'aB') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test325\n\t| re re2 |\n\tre _ Re on: '((?i:a))b'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test326\n\t| re re2 |\n\tre _ Re on: '(?:(?-i)a)b'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test327\n\t| re re2 |\n\tre _ Re on: '((?-i)a)b'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test328\n\t| re re2 |\n\tre _ Re on: '(?:(?-i)a)b'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aB') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test329\n\t| re re2 |\n\tre _ Re on: '((?-i)a)b'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aB') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test33\n\t| re re2 |\n\tre _ Re on: '^(?(?!!abc)\\d\\d|\\w{3}:)$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc:') isNil not.\n\tself assert: (re search: '12') isNil not.\n\tself assert: (re search: '123') isNil.\n\tself assert: (re search: 'xyz') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 14:30'!\ntestNewSuite3test330\n\t| re |\n\tre _ Re on: '(?:(?-i)a)b'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aB') isNil not.\n\tself assert: (re search: 'Ab') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test331\n\t| re re2 |\n\tre _ Re on: '((?-i)a)b'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test332\n\t| re re2 |\n\tre _ Re on: '(?:(?-i)a)b'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aB') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test333\n\t| re re2 |\n\tre _ Re on: '((?-i)a)b'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aB') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test334\n\t| re re2 |\n\tre _ Re on: '(?:(?-i)a)b'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'Ab') isNil.\n\tself assert: (re search: 'AB') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test335\n\t| re re2 |\n\tre _ Re on: '((?-i)a)b'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test336\n\t| re re2 |\n\tre _ Re on: '(?-i:a)b'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test337\n\t| re re2 |\n\tre _ Re on: '((?-i:a))b'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test338\n\t| re re2 |\n\tre _ Re on: '(?-i:a)b'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aB') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test339\n\t| re re2 |\n\tre _ Re on: '((?-i:a))b'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aB') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test34\n\t| re re2 |\n\tre _ Re on: '(?(?<=foo)bar|cat)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'foobar') isNil not.\n\tself assert: (re search: 'cat') isNil not.\n\tself assert: (re search: 'fcat') isNil not.\n\tself assert: (re search: 'focat') isNil not.\n\tself assert: (re search: 'foocat') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test340\n\t| re re2 |\n\tre _ Re on: '(?-i:a)b'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'AB') isNil.\n\tself assert: (re search: 'Ab') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test341\n\t| re re2 |\n\tre _ Re on: '((?-i:a))b'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test342\n\t| re re2 |\n\tre _ Re on: '(?-i:a)b'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aB') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test343\n\t| re re2 |\n\tre _ Re on: '((?-i:a))b'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aB') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test344\n\t| re re2 |\n\tre _ Re on: '(?-i:a)b'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'Ab') isNil.\n\tself assert: (re search: 'AB') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test345\n\t| re re2 |\n\tre _ Re on: '((?-i:a))b'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test346\n\t| re re2 |\n\tre _ Re on: '((?-i:a.))b'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'AB') isNil.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'a';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'B'])) isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test347\n\t| re re2 |\n\tre _ Re on: '((?s-i:a.))b'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'a';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'B'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test348\n\t| re re2 |\n\tre _ Re on: '(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'cabbbb') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test349\n\t| re re2 |\n\tre _ Re on: '(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test35\n\t| re re2 |\n\tre _ Re on: '(?(?<!!foo)cat|bar)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'foobar') isNil not.\n\tself assert: (re search: 'cat') isNil not.\n\tself assert: (re search: 'fcat') isNil not.\n\tself assert: (re search: 'focat') isNil not.\n\tself assert: (re search: 'foocat') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test350\n\t| re re2 |\n\tre _ Re on: '(ab)\\d\\1'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'Ab4ab') isNil not.\n\tself assert: (re search: 'ab4Ab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test351\n\t| re re2 |\n\tre _ Re on: 'foo\\w*\\d{4}baz'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'foobar1234baz') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test352\n\t| re re2 |\n\tre _ Re on: 'x(~~)*(?:(?:F)?)?'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'x~~') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test353\n\t| re re2 |\n\tre _ Re on: '^a(?#xxx){3}c'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aaac') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test354\n\t| re re2 |\n\tre _ Re on: '^a (?#xxx) (?#yyy) {3}c'.\n\tre\n\t\tbeExtended.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aaac') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test355\n\t| re re2 |\n\tre _ Re on: '(?<!![cd])b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'B';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'B'])) isNil.\n\tself assert: (re search: 'dbcb') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test356\n\t| re re2 |\n\tre _ Re on: '(?<!![cd])[ab]'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'dbaacb') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test357\n\t| re re2 |\n\tre _ Re on: '(?<!!(c|d))b'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test358\n\t| re re2 |\n\tre _ Re on: '(?<!!(c|d))[ab]'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'dbaacb') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test359\n\t| re re2 |\n\tre _ Re on: '(?<!!cd)[ab]'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'cdaccb') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test36\n\t| re re2 |\n\tre _ Re on: '( \\( )? [^()]+ (?(1) \\) |) '.\n\tre\n\t\tbeExtended.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcd') isNil not.\n\tself assert: (re search: '(abcd)') isNil not.\n\tself assert: (re search: 'the quick (abcd) fox') isNil not.\n\tself assert: (re search: '(abcd') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test360\n\t| re re2 |\n\tre _ Re on: '^(?:a?b?)*$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'dbcb') isNil.\n\tself assert: (re search: 'a--') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test361\n\t| re re2 |\n\tre _ Re on: '((?s)^a(.))((?m)^b$)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'a';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'b';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'c';\n\t\tnextPut: Character cr])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test362\n\t| re re2 |\n\tre _ Re on: '((?m)^b$)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'a';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'b';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'c';\n\t\tnextPut: Character cr])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test363\n\t| re re2 |\n\tre _ Re on: '(?m)^b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'a';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'b';\n\t\tnextPut: Character cr])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test364\n\t| re re2 |\n\tre _ Re on: '(?m)^(b)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'a';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'b';\n\t\tnextPut: Character cr])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test365\n\t| re re2 |\n\tre _ Re on: '((?m)^b)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'a';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'b';\n\t\tnextPut: Character cr])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test366\n\t| re re2 |\n\tre _ Re on: '\\n((?m)^b)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'a';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'b';\n\t\tnextPut: Character cr])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test367\n\t| re re2 |\n\tre _ Re on: '((?s).)c(?!!.)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'a';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'b';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'c';\n\t\tnextPut: Character cr])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'a';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'b';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'c';\n\t\tnextPut: Character cr])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test368\n\t| re re2 |\n\tre _ Re on: '((?s)b.)c(?!!.)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'a';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'b';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'c';\n\t\tnextPut: Character cr])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'a';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'b';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'c';\n\t\tnextPut: Character cr])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test369\n\t| re re2 |\n\tre _ Re on: '^b'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test37\n\t| re re2 |\n\tre _ Re on: '( \\( )? [^()]+ (?(1) \\) ) '.\n\tre\n\t\tbeExtended.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcd') isNil not.\n\tself assert: (re search: '(abcd)') isNil not.\n\tself assert: (re search: 'the quick (abcd) fox') isNil not.\n\tself assert: (re search: '(abcd') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test370\n\t| re re2 |\n\tre _ Re on: '()^b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'a';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'b';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'c';\n\t\tnextPut: Character cr])) isNil.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'a';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'b';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'c';\n\t\tnextPut: Character cr])) isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test371\n\t| re re2 |\n\tre _ Re on: '((?m)^b)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'a';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'b';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'c';\n\t\tnextPut: Character cr])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test372\n\t| re re2 |\n\tre _ Re on: '(?(1)a|b)'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test373\n\t| re re2 |\n\tre _ Re on: '(?(1)b|a)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test374\n\t| re re2 |\n\tre _ Re on: '(x)?(?(1)a|b)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a') isNil.\n\tself assert: (re search: 'a') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test375\n\t| re re2 |\n\tre _ Re on: '(x)?(?(1)b|a)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test376\n\t| re re2 |\n\tre _ Re on: '()?(?(1)b|a)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test377\n\t| re re2 |\n\tre _ Re on: '()(?(1)b|a)'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test378\n\t| re re2 |\n\tre _ Re on: '()?(?(1)a|b)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test379\n\t| re re2 |\n\tre _ Re on: '^(\\()?blah(?(1)(\\)))$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '(blah)') isNil not.\n\tself assert: (re search: 'blah') isNil not.\n\tself assert: (re search: 'a') isNil.\n\tself assert: (re search: 'blah)') isNil.\n\tself assert: (re search: '(blah') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test38\n\t| re re2 |\n\tre _ Re on: '^(?(2)a|(1)(2))+$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '12') isNil not.\n\tself assert: (re search: '12a') isNil not.\n\tself assert: (re search: '12aa') isNil not.\n\tself assert: (re search: '1234') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test380\n\t| re re2 |\n\tre _ Re on: '^(\\(+)?blah(?(1)(\\)))$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '(blah)') isNil not.\n\tself assert: (re search: 'blah') isNil not.\n\tself assert: (re search: 'blah)') isNil.\n\tself assert: (re search: '(blah') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test381\n\t| re re2 |\n\tre _ Re on: '(?(?!!a)a|b)'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test382\n\t| re re2 |\n\tre _ Re on: '(?(?!!a)b|a)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test383\n\t| re re2 |\n\tre _ Re on: '(?(?=a)b|a)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a') isNil.\n\tself assert: (re search: 'a') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test384\n\t| re re2 |\n\tre _ Re on: '(?(?=a)a|b)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test385\n\t| re re2 |\n\tre _ Re on: '(?=(a+?))(\\1ab)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aaab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test386\n\t| re re2 |\n\tre _ Re on: '^(?=(a+?))\\1ab'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test387\n\t| re re2 |\n\tre _ Re on: '(\\w+:)+'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'one:') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test388\n\t| re re2 |\n\tre _ Re on: '$(?<=^(a))'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test389\n\t| re re2 |\n\tre _ Re on: '(?=(a+?))(\\1ab)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aaab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test39\n\t| re re2 |\n\tre _ Re on: '((?i)blah)\\s+\\1'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'blah blah') isNil not.\n\tself assert: (re search: 'BLAH BLAH') isNil not.\n\tself assert: (re search: 'Blah Blah') isNil not.\n\tself assert: (re search: 'blaH blaH') isNil not.\n\tself assert: (re search: 'blah BLAH') isNil.\n\tself assert: (re search: 'Blah blah') isNil.\n\tself assert: (re search: 'blaH blah') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test390\n\t| re re2 |\n\tre _ Re on: '^(?=(a+?))\\1ab'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aaab') isNil.\n\tself assert: (re search: 'aaab') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test391\n\t| re re2 |\n\tre _ Re on: '([\\w:]+::)?(\\w+)$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcd') isNil not.\n\tself assert: (re search: 'xy:z:::abcd') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test392\n\t| re re2 |\n\tre _ Re on: '^[^bcd]*(c+)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aexycd') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test393\n\t| re re2 |\n\tre _ Re on: '(a*)b+'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'caab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test394\n\t| re re2 |\n\tre _ Re on: '([\\w:]+::)?(\\w+)$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcd') isNil not.\n\tself assert: (re search: 'xy:z:::abcd') isNil not.\n\tself assert: (re search: 'abcd:') isNil.\n\tself assert: (re search: 'abcd:') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test395\n\t| re re2 |\n\tre _ Re on: '^[^bcd]*(c+)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aexycd') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test396\n\t| re re2 |\n\tre _ Re on: '(>a+)ab'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test397\n\t| re re2 |\n\tre _ Re on: '(?>a+)b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aaab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test398\n\t| re re2 |\n\tre _ Re on: '([[:]+)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a:[b]:') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test399\n\t| re re2 |\n\tre _ Re on: '([[=]+)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a=[b]=') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test4\n\t| re re2 |\n\tre _ Re on: '\\Aabc\\z'.\n\tre\n\t\tbeMultiline.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: Character cr])) isNil.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'qqq';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'abc'])) isNil.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'abc';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'zzz'])) isNil.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'qqq';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'abc';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'zzz'])) isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test40\n\t| re re2 |\n\tre _ Re on: '((?i)blah)\\s+(?i:\\1)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'blah blah') isNil not.\n\tself assert: (re search: 'BLAH BLAH') isNil not.\n\tself assert: (re search: 'Blah Blah') isNil not.\n\tself assert: (re search: 'blaH blaH') isNil not.\n\tself assert: (re search: 'blah BLAH') isNil not.\n\tself assert: (re search: 'Blah blah') isNil not.\n\tself assert: (re search: 'blaH blah') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test400\n\t| re re2 |\n\tre _ Re on: '([[.]+)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a.[b].') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test401\n\t| re re2 |\n\tre _ Re on: '((?>a+)b)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aaab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test402\n\t| re re2 |\n\tre _ Re on: '(?>(a+))b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aaab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test403\n\t| re re2 |\n\tre _ Re on: '((?>[^()]+)|\\([^()]*\\))+'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '((abc(ade)ufh()()x') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test404\n\t| re re2 |\n\tre _ Re on: 'a\\Z'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aaab') isNil.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'a';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'b';\n\t\tnextPut: Character cr])) isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test405\n\t| re re2 |\n\tre _ Re on: 'b\\Z'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'a';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'b';\n\t\tnextPut: Character cr])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test406\n\t| re re2 |\n\tre _ Re on: 'b\\z'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test407\n\t| re re2 |\n\tre _ Re on: 'b\\Z'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'a';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'b'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test408\n\t| re re2 |\n\tre _ Re on: 'b\\z'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'a';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'b'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test409\n\t| re re2 |\n\tre _ Re on: '^(?>(?(1)\\.|())[^\\W_](?>[a-z0-9-]*[^\\W_])?)+$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a') isNil not.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: 'a-b') isNil not.\n\tself assert: (re search: '0-9') isNil not.\n\tself assert: (re search: 'a.b') isNil not.\n\tself assert: (re search: '5.6.7') isNil not.\n\tself assert: (re search: 'the.quick.brown.fox') isNil not.\n\tself assert: (re search: 'a100.b200.300c') isNil not.\n\tself assert: (re search: '12-ab.1245') isNil not.\n\tself assert: (re search: (String streamContents: [:s | s])) isNil.\n\tself assert: (re search: '.a') isNil.\n\tself assert: (re search: '-a') isNil.\n\tself assert: (re search: 'a-') isNil.\n\tself assert: (re search: 'a.') isNil.\n\tself assert: (re search: 'a_b') isNil.\n\tself assert: (re search: 'a.-') isNil.\n\tself assert: (re search: 'a..') isNil.\n\tself assert: (re search: 'ab..bc') isNil.\n\tself assert: (re search: 'the.quick.brown.fox-') isNil.\n\tself assert: (re search: 'the.quick.brown.fox.') isNil.\n\tself assert: (re search: 'the.quick.brown.fox_') isNil.\n\tself assert: (re search: 'the.quick.brown.fox+') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test41\n\t| re re2 |\n\tre _ Re on: '(?>a*)*'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a') isNil not.\n\tself assert: (re search: 'aa') isNil not.\n\tself assert: (re search: 'aaaa') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test410\n\t| re re2 |\n\tre _ Re on: '(?>.*)(?<=(abcd|wxyz))'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'alphabetabcd') isNil not.\n\tself assert: (re search: 'endingwxyz') isNil not.\n\tself assert: (re search: 'a rather long string that doesn''t end with one of them') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 13:53'!\ntestNewSuite3test411\n\t| re |\n\tre _ Re on: 'word (?>(?:(?!!otherword)[a-zA-Z0-9]+ ){0,30})otherword'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'word cat dog elephant mussel cow horse canary baboon snake shark otherword') isNil not.\n\tself assert: (re search: 'word cat dog elephant mussel cow horse canary baboon snake shark') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 13:54'!\ntestNewSuite3test412\n\t| re |\n\tre _ Re on: 'word (?>[a-zA-Z0-9]+ ){0,30}otherword'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope otherword') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test413\n\t| re re2 |\n\tre _ Re on: '(?<=\\d{3}(?!!999))foo'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '999foo') isNil not.\n\tself assert: (re search: '123999foo') isNil not.\n\tself assert: (re search: '123abcfoo') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test414\n\t| re re2 |\n\tre _ Re on: '(?<=(?!!...999)\\d{3})foo'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '999foo') isNil not.\n\tself assert: (re search: '123999foo') isNil not.\n\tself assert: (re search: '123abcfoo') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test415\n\t| re re2 |\n\tre _ Re on: '(?<=\\d{3}(?!!999)...)foo'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '123abcfoo') isNil not.\n\tself assert: (re search: '123456foo') isNil not.\n\tself assert: (re search: '123999foo') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test416\n\t| re re2 |\n\tre _ Re on: '(?<=\\d{3}...)(?<!!999)foo'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '123abcfoo') isNil not.\n\tself assert: (re search: '123456foo') isNil not.\n\tself assert: (re search: '123999foo') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test417\n\t| re re2 |\n\tre _ Re on: '<a[\\s]+href[\\s]*=[\\s]*          # find <a href=\n ([\\\"\\''])?                       # find single or double quote\n (?(1) (.*?)\\1 | ([^\\s]+))       # if quote found, match up to next matching\n                                 # quote, otherwise match up to next space\n'.\n\tre\n\t\tbeNotCaseSensitive;\n\t\tbeDotIncludesNewline;\n\t\tbeExtended.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '<a href=abcd xyz') isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: '<a href=';\n\t\tnextPutAll: 'abcd xyz pqr';\n\t\tnextPutAll: ' cats'])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: '<a href=';\n\t\tnextPutAll: 'abcd xyz pqr';\n\t\tnextPutAll: ' cats'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test418\n\t| re re2 |\n\tre _ Re on: '<a\\s+href\\s*=\\s*                # find <a href=\n ([\"''])?                         # find single or double quote\n (?(1) (.*?)\\1 | (\\S+))          # if quote found, match up to next matching\n                                 # quote, otherwise match up to next space\n'.\n\tre\n\t\tbeNotCaseSensitive;\n\t\tbeDotIncludesNewline;\n\t\tbeExtended.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '<a href=abcd xyz') isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: '<a href=';\n\t\tnextPutAll: 'abcd xyz pqr';\n\t\tnextPutAll: ' cats'])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: '<a href       =       ';\n\t\tnextPutAll: 'abcd xyz pqr';\n\t\tnextPutAll: ' cats'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test419\n\t| re re2 |\n\tre _ Re on: '<a\\s+href(?>\\s*)=(?>\\s*)        # find <a href=\n ([\"''])?                         # find single or double quote\n (?(1) (.*?)\\1 | (\\S+))          # if quote found, match up to next matching\n                                 # quote, otherwise match up to next space\n'.\n\tre\n\t\tbeNotCaseSensitive;\n\t\tbeDotIncludesNewline;\n\t\tbeExtended.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '<a href=abcd xyz') isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: '<a href=';\n\t\tnextPutAll: 'abcd xyz pqr';\n\t\tnextPutAll: ' cats'])) isNil not.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: '<a href       =       ';\n\t\tnextPutAll: 'abcd xyz pqr';\n\t\tnextPutAll: ' cats'])) isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test42\n\t| re re2 |\n\tre _ Re on: '(abc|)+'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: 'abcabc') isNil not.\n\tself assert: (re search: 'abcabcabc') isNil not.\n\tself assert: (re search: 'xyz') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test420\n\t| re re2 |\n\tre _ Re on: '((Z)+|A)*'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ZABCDEFG') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test421\n\t| re re2 |\n\tre _ Re on: '(Z()|A)*'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ZABCDEFG') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test422\n\t| re re2 |\n\tre _ Re on: '(Z(())|A)*'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ZABCDEFG') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test423\n\t| re re2 |\n\tre _ Re on: '((?>Z)+|A)*'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ZABCDEFG') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test424\n\t| re re2 |\n\tre _ Re on: '((?>)+|A)*'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ZABCDEFG') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test425\n\t| re re2 |\n\tre _ Re on: 'a*'.\n\tre\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abbab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test426\n\t| re re2 |\n\tre _ Re on: '^[a-\\d]'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcde') isNil not.\n\tself assert: (re search: '-things') isNil not.\n\tself assert: (re search: '0digit') isNil not.\n\tself assert: (re search: 'bcdef') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test427\n\t| re re2 |\n\tre _ Re on: '^[\\d-a]'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcde') isNil not.\n\tself assert: (re search: '-things') isNil not.\n\tself assert: (re search: '0digit') isNil not.\n\tself assert: (re search: 'bcdef') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:32'!\ntestNewSuite3test428\n\t| re re2 |\n\tre _ Re on: ' End of testinput3 '.\n\tre\n\t\tbeStrangeOption;\n\t\tbeStrangeOption;\n\t\tbeStrangeOption;\n\t\tbeStrangeOption;\n\t\tbeStrangeOption;\n\t\tbeStrangeOption;\n\t\tbeStrangeOption.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test43\n\t| re re2 |\n\tre _ Re on: '([a]*)*'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a') isNil not.\n\tself assert: (re search: 'aaaaa') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test44\n\t| re re2 |\n\tre _ Re on: '([ab]*)*'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a') isNil not.\n\tself assert: (re search: 'b') isNil not.\n\tself assert: (re search: 'ababab') isNil not.\n\tself assert: (re search: 'aaaabcde') isNil not.\n\tself assert: (re search: 'bbbb') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test45\n\t| re re2 |\n\tre _ Re on: '([^a]*)*'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'b') isNil not.\n\tself assert: (re search: 'bbbb') isNil not.\n\tself assert: (re search: 'aaa') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test46\n\t| re re2 |\n\tre _ Re on: '([^ab]*)*'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'cccc') isNil not.\n\tself assert: (re search: 'abab') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test47\n\t| re re2 |\n\tre _ Re on: '([a]*?)*'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a') isNil not.\n\tself assert: (re search: 'aaaa') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test48\n\t| re re2 |\n\tre _ Re on: '([ab]*?)*'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a') isNil not.\n\tself assert: (re search: 'b') isNil not.\n\tself assert: (re search: 'abab') isNil not.\n\tself assert: (re search: 'baba') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test49\n\t| re re2 |\n\tre _ Re on: '([^a]*?)*'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'b') isNil not.\n\tself assert: (re search: 'bbbb') isNil not.\n\tself assert: (re search: 'aaa') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 13:54'!\ntestNewSuite3test5\n\t| re |\n\tre _ Re on: '(?>.*/)foo'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '/this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/foo') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test50\n\t| re re2 |\n\tre _ Re on: '([^ab]*?)*'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'c') isNil not.\n\tself assert: (re search: 'cccc') isNil not.\n\tself assert: (re search: 'baba') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test51\n\t| re re2 |\n\tre _ Re on: '(?>a*)*'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a') isNil not.\n\tself assert: (re search: 'aaabcde') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test52\n\t| re re2 |\n\tre _ Re on: '((?>a*))*'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aaaaa') isNil not.\n\tself assert: (re search: 'aabbaa') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test53\n\t| re re2 |\n\tre _ Re on: '((?>a*?))*'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aaaaa') isNil not.\n\tself assert: (re search: 'aabbaa') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test54\n\t| re re2 |\n\tre _ Re on: '(?(?=[^a-z]+[a-z])  \\d{2}-[a-z]{3}-\\d{2}  |  \\d{2}-\\d{2}-\\d{2} ) '.\n\tre\n\t\tbeExtended.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '12-sep-98') isNil not.\n\tself assert: (re search: '12-09-98') isNil not.\n\tself assert: (re search: 'sep-12-98') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test55\n\t| re re2 |\n\tre _ Re on: '(?<=(foo))bar\\1'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'foobarfoo') isNil not.\n\tself assert: (re search: 'foobarfootling') isNil not.\n\tself assert: (re search: 'foobar') isNil.\n\tself assert: (re search: 'barfoo') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test56\n\t| re re2 |\n\tre _ Re on: '(?i:saturday|sunday)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'saturday') isNil not.\n\tself assert: (re search: 'sunday') isNil not.\n\tself assert: (re search: 'Saturday') isNil not.\n\tself assert: (re search: 'Sunday') isNil not.\n\tself assert: (re search: 'SATURDAY') isNil not.\n\tself assert: (re search: 'SUNDAY') isNil not.\n\tself assert: (re search: 'SunDay') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test57\n\t| re re2 |\n\tre _ Re on: '(a(?i)bc|BB)x'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcx') isNil not.\n\tself assert: (re search: 'aBCx') isNil not.\n\tself assert: (re search: 'bbx') isNil not.\n\tself assert: (re search: 'BBx') isNil not.\n\tself assert: (re search: 'abcX') isNil.\n\tself assert: (re search: 'aBCX') isNil.\n\tself assert: (re search: 'bbX') isNil.\n\tself assert: (re search: 'BBX') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test58\n\t| re re2 |\n\tre _ Re on: '^([ab](?i)[cd]|[ef])'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ac') isNil not.\n\tself assert: (re search: 'aC') isNil not.\n\tself assert: (re search: 'bD') isNil not.\n\tself assert: (re search: 'elephant') isNil not.\n\tself assert: (re search: 'Europe') isNil not.\n\tself assert: (re search: 'frog') isNil not.\n\tself assert: (re search: 'France') isNil not.\n\tself assert: (re search: 'Africa') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test59\n\t| re re2 |\n\tre _ Re on: '^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ab') isNil not.\n\tself assert: (re search: 'aBd') isNil not.\n\tself assert: (re search: 'xy') isNil not.\n\tself assert: (re search: 'xY') isNil not.\n\tself assert: (re search: 'zebra') isNil not.\n\tself assert: (re search: 'Zambesi') isNil not.\n\tself assert: (re search: 'aCD') isNil.\n\tself assert: (re search: 'XY') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test6\n\t| re re2 |\n\tre _ Re on: '(?>.*/)foo'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '/this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test60\n\t| re re2 |\n\tre _ Re on: '(?<=foo\\n)^bar'.\n\tre\n\t\tbeMultiline.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'foo';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'bar'])) isNil not.\n\tself assert: (re search: 'bar') isNil.\n\tself assert: (re search: (String streamContents: [:s | s\n\t\tnextPutAll: 'baz';\n\t\tnextPut: Character cr;\n\t\tnextPutAll: 'bar'])) isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test61\n\t| re re2 |\n\tre _ Re on: '(?<=(?<!!foo)bar)baz'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'barbaz') isNil not.\n\tself assert: (re search: 'barbarbaz') isNil not.\n\tself assert: (re search: 'koobarbaz') isNil not.\n\tself assert: (re search: 'baz') isNil.\n\tself assert: (re search: 'foobarbaz') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 13:55'!\ntestNewSuite3test62\n\t| re |\n\tre _ Re on: 'The case of aaaaaa is missed out below because I think Perl 5.005_02 gets'.\n\tself shouldnt: [re compile] raise: Error.! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 13:58'!\ntestNewSuite3test63\n\t| re |\n\tre _ Re on: '^(a\\1?){4}$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a') isNil.\n\tself assert: (re search: 'aa') isNil.\n\tself assert: (re search: 'aaa') isNil.\n\tself assert: (re search: 'aaaa') isNil not.\n\tself assert: (re search: 'aaaaa') isNil not.\n\tself assert: (re search: 'aaaaaaa') isNil not.\n\tself assert: (re search: 'aaaaaaaa') isNil.\n\tself assert: (re search: 'aaaaaaaaa') isNil.\n\tself assert: (re search: 'aaaaaaaaaa') isNil not.\n\tself assert: (re search: 'aaaaaaaaaaa') isNil.\n\tself assert: (re search: 'aaaaaaaaaaaa') isNil.\n\tself assert: (re search: 'aaaaaaaaaaaaa') isNil.\n\tself assert: (re search: 'aaaaaaaaaaaaaa') isNil.\n\tself assert: (re search: 'aaaaaaaaaaaaaaa') isNil.\n\tself assert: (re search: 'aaaaaaaaaaaaaaaa') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 14:00'!\ntestNewSuite3test64\n\t| re |\n\tre _ Re on: '^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a') isNil.\n\tself assert: (re search: 'aa') isNil.\n\tself assert: (re search: 'aaa') isNil.\n\tself assert: (re search: 'aaaa') isNil not.\n\tself assert: (re search: 'aaaaa') isNil not.\n\tself assert: (re search: 'aaaaaa') isNil not.\n\tself assert: (re search: 'aaaaaaa') isNil not.\n\tself assert: (re search: 'aaaaaaaa') isNil.\n\tself assert: (re search: 'aaaaaaaaa') isNil.\n\tself assert: (re search: 'aaaaaaaaaa') isNil not.\n\tself assert: (re search: 'aaaaaaaaaaa') isNil.\n\tself assert: (re search: 'aaaaaaaaaaaa') isNil.\n\tself assert: (re search: 'aaaaaaaaaaaaa') isNil.\n\tself assert: (re search: 'aaaaaaaaaaaaaa') isNil.\n\tself assert: (re search: 'aaaaaaaaaaaaaaa') isNil.\n\tself assert: (re search: 'aaaaaaaaaaaaaaaa') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 14:03'!\ntestNewSuite3test65\n\t| re |\n\tre _ Re on: 'The following tests are taken from the Perl 5.005 test suite; some of them'.\n\tself shouldnt: [re compile] raise: Error.! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test66\n\t| re re2 |\n\tre _ Re on: 'abc'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: 'xabcy') isNil not.\n\tself assert: (re search: 'ababc') isNil not.\n\tself assert: (re search: 'xbc') isNil.\n\tself assert: (re search: 'axc') isNil.\n\tself assert: (re search: 'abx') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test67\n\t| re re2 |\n\tre _ Re on: 'ab*c'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test68\n\t| re re2 |\n\tre _ Re on: 'ab*bc'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: 'abbc') isNil not.\n\tself assert: (re search: 'abbbbc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test69\n\t| re re2 |\n\tre _ Re on: '.{1}'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abbbbc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test7\n\t| re re2 |\n\tre _ Re on: '(?>(\\.\\d\\d[1-9]?))\\d+'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '1.230003938') isNil not.\n\tself assert: (re search: '1.875000282') isNil not.\n\tself assert: (re search: '1.235') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test70\n\t| re re2 |\n\tre _ Re on: '.{3,4}'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abbbbc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test71\n\t| re re2 |\n\tre _ Re on: 'ab{0,}bc'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abbbbc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test72\n\t| re re2 |\n\tre _ Re on: 'ab+bc'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abbc') isNil not.\n\tself assert: (re search: 'abc') isNil.\n\tself assert: (re search: 'abq') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test73\n\t| re re2 |\n\tre _ Re on: 'ab{1,}bc'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test74\n\t| re re2 |\n\tre _ Re on: 'ab+bc'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abbbbc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test75\n\t| re re2 |\n\tre _ Re on: 'ab{1,}bc'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abbbbc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test76\n\t| re re2 |\n\tre _ Re on: 'ab{1,3}bc'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abbbbc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test77\n\t| re re2 |\n\tre _ Re on: 'ab{3,4}bc'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abbbbc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test78\n\t| re re2 |\n\tre _ Re on: 'ab{4,5}bc'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abq') isNil.\n\tself assert: (re search: 'abbbbc') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test79\n\t| re re2 |\n\tre _ Re on: 'ab?bc'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abbc') isNil not.\n\tself assert: (re search: 'abc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test8\n\t| re re2 |\n\tre _ Re on: '^((?>\\w+)|(?>\\s+))*$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'now is the time for all good men to come to the aid of the party') isNil not.\n\tself assert: (re search: 'this is not a line with only words and spaces!!') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test80\n\t| re re2 |\n\tre _ Re on: 'ab{0,1}bc'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test81\n\t| re re2 |\n\tre _ Re on: 'ab?bc'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test82\n\t| re re2 |\n\tre _ Re on: 'ab?c'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test83\n\t| re re2 |\n\tre _ Re on: 'ab{0,1}c'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test84\n\t| re re2 |\n\tre _ Re on: '^abc$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: 'abbbbc') isNil.\n\tself assert: (re search: 'abcc') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test85\n\t| re re2 |\n\tre _ Re on: '^abc'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abcc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test86\n\t| re re2 |\n\tre _ Re on: '^abc$'.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 14:02'!\ntestNewSuite3test87\n\t| re |\n\tre _ Re on: 'abc$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aabc') isNil not.\n\tself assert: (re search: 'aabc') isNil not.\n\tself assert: (re search: 'aabcd') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test88\n\t| re re2 |\n\tre _ Re on: '^'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test89\n\t| re re2 |\n\tre _ Re on: '$'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test9\n\t| re re2 |\n\tre _ Re on: '(\\d+)(\\w)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: '12345a') isNil not.\n\tself assert: (re search: '12345+') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test90\n\t| re re2 |\n\tre _ Re on: 'a.c'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abc') isNil not.\n\tself assert: (re search: 'axc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test91\n\t| re re2 |\n\tre _ Re on: 'a.*c'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'axyzc') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test92\n\t| re re2 |\n\tre _ Re on: 'a[bc]d'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'abd') isNil not.\n\tself assert: (re search: 'axyzd') isNil.\n\tself assert: (re search: 'abc') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test93\n\t| re re2 |\n\tre _ Re on: 'a[b-d]e'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'ace') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test94\n\t| re re2 |\n\tre _ Re on: 'a[b-d]'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aac') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test95\n\t| re re2 |\n\tre _ Re on: 'a[-b]'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a-') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test96\n\t| re re2 |\n\tre _ Re on: 'a[b-]'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a-') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test97\n\t| re re2 |\n\tre _ Re on: 'a]'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a]') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test98\n\t| re re2 |\n\tre _ Re on: 'a[]]b'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'a]b') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite3' stamp: 'acg 8/11/2002 12:31'!\ntestNewSuite3test99\n\t| re re2 |\n\tre _ Re on: 'a[^bc]d'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'aed') isNil not.\n\tself assert: (re search: 'abd') isNil.\n\tself assert: (re search: 'abd') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite4' stamp: 'acg 8/11/2002 12:37'!\ntestNewSuit4test1\n\t| re re2 |\n\tre _ Re on: '^[\\w]+'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'cole') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite4' stamp: 'acg 8/11/2002 12:37'!\ntestNewSuit4test10\n\t| re re2 |\n\tre _ Re on: '(.+)\\b(.+)'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'cole') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite4' stamp: 'acg 8/11/2002 12:37'!\ntestNewSuit4test12\n\t| re re2 |\n\tre _ Re on: 'cole'.\n\tre\n\t\tbeNotCaseSensitive.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'cole') isNil not.\n\tself assert: (re search: 'cole') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite4' stamp: 'acg 8/11/2002 12:37'!\ntestNewSuit4test18\n\t| re re2 |\n\tre _ Re on: ' End of testinput4 '.\n\tself shouldnt: [re compile] raise: Error.\n! !\n\n!ReTest methodsFor: 'newTestSuite4' stamp: 'acg 8/11/2002 12:37'!\ntestNewSuit4test3\n\t| re re2 |\n\tre _ Re on: '^[\\w]+'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'cole') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite4' stamp: 'acg 8/11/2002 12:37'!\ntestNewSuit4test4\n\t| re re2 |\n\tre _ Re on: '^[\\W]+'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'cole') isNil not.\n! !\n\n!ReTest methodsFor: 'newTestSuite4' stamp: 'acg 8/11/2002 14:08'!\ntestNewSuit4test6\n\t| re |\n\tre _ Re on: '[\\b]'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (16r08 asCharacter asString) isNil not.\n\tself assert: (re search: 'a') isNil.\n! !\n\n!ReTest methodsFor: 'newTestSuite4' stamp: 'acg 8/11/2002 12:37'!\ntestNewSuit4test8\n\t| re re2 |\n\tre _ Re on: '^\\w+'.\n\tself shouldnt: [re compile] raise: Error.\n\tself assert: (re search: 'cole') isNil.\n! !\n\n\n!String methodsFor: 'converting' stamp: 'acg 8/16/2002 22:48'!\nasRe\n\n\t^Re on: self! !\n\n!String methodsFor: 'regular expressions' stamp: 'acg 8/3/2002 17:23'!\nasReDo: aBlock\n\n\t^aBlock value: self asRe! !\n\n!String methodsFor: 'regular expressions' stamp: 'acg 8/4/2002 10:34'!\ncollectRe: aString\n\n\t\"Answer the collection of my substrings matching aString\"\n\n\t^aString asRe collectFrom: self! !\n\n!String methodsFor: 'regular expressions' stamp: 'acg 8/4/2002 10:34'!\nmatchRe: aString\n\n\t\"Answer whether the string is matched by the regular expression\"\n\n\t^(aString asRe search: self) isNil not! !\n\n!String methodsFor: 'regular expressions' stamp: 'acg 8/4/2002 10:32'!\nreMatch: aString\n\n\t^aString asRe search: self! !\n\n!String methodsFor: 'regular expressions' stamp: 'acg 8/4/2002 10:32'!\nreMatch: aString andCollect: aBlock\n\n\t\"Answer the collection of my substrings matching aString\"\n\n\t^aString asRe search: self andCollect: aBlock! !\n\n!String methodsFor: 'regular expressions' stamp: 'acg 8/4/2002 10:33'!\nreMatch: aString andReplace: aBlock\n\n\t\"Answer the collection of my substrings matching aString\"\n\n\t^aString asRe search: self andReplace: aBlock! !\n\n!String methodsFor: 'regular expressions' stamp: 'acg 8/4/2002 10:33'!\nreMatch: aString from: fromInteger to: toInteger\n\n\t^aString asRe search: self from: fromInteger to: toInteger! !\n\n!String methodsFor: 'regular expressions' stamp: 'acg 8/4/2002 10:33'!\nreMatch: aString replace: aBlock\n\n\t\"Answer the collection of my substrings matching aString\"\n\n\t^aString asRe search: aString andReplace: aBlock! !\n\nReTest class removeSelector: #buildTestNamed:from:!\nReTest class removeSelector: #expandDataString:!\nReTest class removeSelector: #expandParmList:!\nReTest class removeSelector: #getDataFrom:!\nReTest class removeSelector: #hasFailers:!\nReTest class removeSelector: #install!\nReTest class removeSelector: #install1!\nReTest class removeSelector: #install2!\nReTest class removeSelector: #install3!\nReTest class removeSelector: #installNew1!\nReTest class removeSelector: #installNew2!\nReTest class removeSelector: #installNew3!\nReTest class removeSelector: #installNew4!\nReTest class removeSelector: #installNew5!\nReTest class removeSelector: #installNew6!\nReTest class removeSelector: #installTestNamed:in:from:!\nReTest class removeSelector: #optionFor:!\nReTest class removeSelector: #printDataArray:to:!\nReTest class removeSelector: #testData2From:!\nReTest class removeSelector: #testDataChunkFromFileStream:!\nReTest class removeSelector: #testDataFrom:!\nReTest class removeSelector: #testDataFromFileNamed:!\nRePattern initialize!\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/RePlugin/chartables.c",
    "content": "/*************************************************\n*      Perl-Compatible Regular Expressions       *\n*************************************************/\n\n/* This file is automatically written by the dftables auxiliary \nprogram. If you edit it by hand, you might like to edit the Makefile to \nprevent its ever being regenerated.\n\nThis file is #included in the compilation of pcre.c to build the default\ncharacter tables which are used when no tables are passed to the compile\nfunction. */\n\nstatic unsigned char pcre_default_tables[] = {\n\n/* This table is a lower casing table. */\n\n    0,  1,  2,  3,  4,  5,  6,  7,\n    8,  9, 10, 11, 12, 13, 14, 15,\n   16, 17, 18, 19, 20, 21, 22, 23,\n   24, 25, 26, 27, 28, 29, 30, 31,\n   32, 33, 34, 35, 36, 37, 38, 39,\n   40, 41, 42, 43, 44, 45, 46, 47,\n   48, 49, 50, 51, 52, 53, 54, 55,\n   56, 57, 58, 59, 60, 61, 62, 63,\n   64, 97, 98, 99,100,101,102,103,\n  104,105,106,107,108,109,110,111,\n  112,113,114,115,116,117,118,119,\n  120,121,122, 91, 92, 93, 94, 95,\n   96, 97, 98, 99,100,101,102,103,\n  104,105,106,107,108,109,110,111,\n  112,113,114,115,116,117,118,119,\n  120,121,122,123,124,125,126,127,\n  128,129,130,131,132,133,134,135,\n  136,137,138,139,140,141,142,143,\n  144,145,146,147,148,149,150,151,\n  152,153,154,155,156,157,158,159,\n  160,161,162,163,164,165,166,167,\n  168,169,170,171,172,173,174,175,\n  176,177,178,179,180,181,182,183,\n  184,185,186,187,188,189,190,191,\n  192,193,194,195,196,197,198,199,\n  200,201,202,203,204,205,206,207,\n  208,209,210,211,212,213,214,215,\n  216,217,218,219,220,221,222,223,\n  224,225,226,227,228,229,230,231,\n  232,233,234,235,236,237,238,239,\n  240,241,242,243,244,245,246,247,\n  248,249,250,251,252,253,254,255,\n\n/* This table is a case flipping table. */\n\n    0,  1,  2,  3,  4,  5,  6,  7,\n    8,  9, 10, 11, 12, 13, 14, 15,\n   16, 17, 18, 19, 20, 21, 22, 23,\n   24, 25, 26, 27, 28, 29, 30, 31,\n   32, 33, 34, 35, 36, 37, 38, 39,\n   40, 41, 42, 43, 44, 45, 46, 47,\n   48, 49, 50, 51, 52, 53, 54, 55,\n   56, 57, 58, 59, 60, 61, 62, 63,\n   64, 97, 98, 99,100,101,102,103,\n  104,105,106,107,108,109,110,111,\n  112,113,114,115,116,117,118,119,\n  120,121,122, 91, 92, 93, 94, 95,\n   96, 65, 66, 67, 68, 69, 70, 71,\n   72, 73, 74, 75, 76, 77, 78, 79,\n   80, 81, 82, 83, 84, 85, 86, 87,\n   88, 89, 90,123,124,125,126,127,\n  128,129,130,131,132,133,134,135,\n  136,137,138,139,140,141,142,143,\n  144,145,146,147,148,149,150,151,\n  152,153,154,155,156,157,158,159,\n  160,161,162,163,164,165,166,167,\n  168,169,170,171,172,173,174,175,\n  176,177,178,179,180,181,182,183,\n  184,185,186,187,188,189,190,191,\n  192,193,194,195,196,197,198,199,\n  200,201,202,203,204,205,206,207,\n  208,209,210,211,212,213,214,215,\n  216,217,218,219,220,221,222,223,\n  224,225,226,227,228,229,230,231,\n  232,233,234,235,236,237,238,239,\n  240,241,242,243,244,245,246,247,\n  248,249,250,251,252,253,254,255,\n\n/* This table contains bit maps for various character classes.\nEach map is 32 bytes long and the bits run from the least\nsignificant end of each byte. The classes that have their own\nmaps are: space, xdigit, digit, upper, lower, word, graph\nprint, punct, and cntrl. Other classes are built from combinations. */\n\n  0x00,0x3e,0x00,0x00,0x01,0x00,0x00,0x00,\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n\n  0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03,\n  0x7e,0x00,0x00,0x00,0x7e,0x00,0x00,0x00,\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n\n  0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03,\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n  0xfe,0xff,0xff,0x07,0x00,0x00,0x00,0x00,\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n  0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0x07,\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n\n  0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03,\n  0xfe,0xff,0xff,0x87,0xfe,0xff,0xff,0x07,\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n\n  0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,\n  0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n\n  0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,\n  0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n\n  0x00,0x00,0x00,0x00,0xfe,0xff,0x00,0xfc,\n  0x01,0x00,0x00,0xf8,0x01,0x00,0x00,0x78,\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n\n  0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n\n/* This table identifies various classes of character by individual bits:\n  0x01   white space character\n  0x02   letter\n  0x04   decimal digit\n  0x08   hexadecimal digit\n  0x10   alphanumeric or '_'\n  0x80   regular expression metacharacter or binary zero\n*/\n\n  0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*   0-  7 */\n  0x00,0x01,0x01,0x01,0x01,0x01,0x00,0x00, /*   8- 15 */\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  16- 23 */\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  24- 31 */\n  0x01,0x00,0x00,0x00,0x80,0x00,0x00,0x00, /*    - '  */\n  0x80,0x80,0x80,0x80,0x00,0x00,0x80,0x00, /*  ( - /  */\n  0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c, /*  0 - 7  */\n  0x1c,0x1c,0x00,0x00,0x00,0x00,0x00,0x80, /*  8 - ?  */\n  0x00,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x12, /*  @ - G  */\n  0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /*  H - O  */\n  0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /*  P - W  */\n  0x12,0x12,0x12,0x80,0x00,0x00,0x80,0x10, /*  X - _  */\n  0x00,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x12, /*  ` - g  */\n  0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /*  h - o  */\n  0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /*  p - w  */\n  0x12,0x12,0x12,0x80,0x80,0x00,0x00,0x00, /*  x -127 */\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 128-135 */\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 136-143 */\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 144-151 */\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 152-159 */\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 160-167 */\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 168-175 */\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 176-183 */\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 184-191 */\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 192-199 */\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 200-207 */\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 208-215 */\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 216-223 */\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 224-231 */\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 232-239 */\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 240-247 */\n  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};/* 248-255 */\n\n/* End of chartables.c */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/RePlugin/config.h",
    "content": "/* config.h.  Generated automatically by configure.  */\n\n/* On Unix systems config.in is converted by configure into config.h. PCRE is\nwritten in Standard C, but there are a few non-standard things it can cope\nwith, allowing it to run on SunOS4 and other \"close to standard\" systems.\n\nOn a non-Unix system you should just copy this file into config.h, and set up\nthe macros the way you need them. You should normally change the definitions of\nHAVE_STRERROR and HAVE_MEMMOVE to 1. Unfortunately, because of the way autoconf\nworks, these cannot be made the defaults. If your system has bcopy() and not\nmemmove(), change the definition of HAVE_BCOPY instead of HAVE_MEMMOVE. If your\nsystem has neither bcopy() nor memmove(), leave them both as 0; an emulation\nfunction will be used. */\n\n/* Define to empty if the keyword does not work. */\n\n/* #undef const */\n\n/* Define to `unsigned' if <stddef.h> doesn't define size_t. */\n\n/* #undef size_t */\n\n/* The following two definitions are mainly for the benefit of SunOS4, which\ndoesn't have the strerror() or memmove() functions that should be present in\nall Standard C libraries. The macros HAVE_STRERROR and HAVE_MEMMOVE should\nnormally be defined with the value 1 for other systems, but unfortunately we\ncan't make this the default because \"configure\" files generated by autoconf\nwill only change 0 to 1; they won't change 1 to 0 if the functions are not\nfound. */\n\n#define HAVE_STRERROR 1\n#define HAVE_MEMMOVE 1\n\n/* There are some non-Unix systems that don't even have bcopy(). If this macro\nis false, an emulation is used. If HAVE_MEMMOVE is set to 1, the value of\nHAVE_BCOPY is not relevant. */\n\n#define HAVE_BCOPY 1\n\n/* The value of NEWLINE determines the newline character. The default is to\nleave it up to the compiler, but some sites want to force a particular value.\nOn Unix systems, \"configure\" can be used to override this default. */\n\n#ifndef NEWLINE\n#define NEWLINE '\\n'\n#endif\n\n/* End */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/RePlugin/get.c",
    "content": "/*************************************************\n*      Perl-Compatible Regular Expressions       *\n*************************************************/\n\n/*\nThis is a library of functions to support regular expressions whose syntax\nand semantics are as close as possible to those of the Perl 5 language. See\nthe file Tech.Notes for some information on the internals.\n\nWritten by: Philip Hazel <ph10@cam.ac.uk>\n\n           Copyright (c) 1997-2001 University of Cambridge\n\n-----------------------------------------------------------------------------\nPermission is granted to anyone to use this software for any purpose on any\ncomputer system, and to redistribute it freely, subject to the following\nrestrictions:\n\n1. This software is distributed in the hope that it will be useful,\n   but WITHOUT ANY WARRANTY; without even the implied warranty of\n   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n2. The origin of this software must not be misrepresented, either by\n   explicit claim or by omission.\n\n3. Altered versions must be plainly marked as such, and must not be\n   misrepresented as being the original software.\n\n4. If PCRE is embedded in any software that is released under the GNU\n   General Purpose Licence (GPL), then the terms of that licence shall\n   supersede any condition above with which it is incompatible.\n-----------------------------------------------------------------------------\n*/\n\n/* This module contains some convenience functions for extracting substrings\nfrom the subject string after a regex match has succeeded. The original idea\nfor these functions came from Scott Wimer <scottw@cgibuilder.com>. */\n\n\n/* Include the internals header, which itself includes Standard C headers plus\nthe external pcre header. */\n\n#include \"internal.h\"\n\n\n\n/*************************************************\n*      Copy captured string to given buffer      *\n*************************************************/\n\n/* This function copies a single captured substring into a given buffer.\nNote that we use memcpy() rather than strncpy() in case there are binary zeros\nin the string.\n\nArguments:\n  subject        the subject string that was matched\n  ovector        pointer to the offsets table\n  stringcount    the number of substrings that were captured\n                   (i.e. the yield of the pcre_exec call, unless\n                   that was zero, in which case it should be 1/3\n                   of the offset table size)\n  stringnumber   the number of the required substring\n  buffer         where to put the substring\n  size           the size of the buffer\n\nReturns:         if successful:\n                   the length of the copied string, not including the zero\n                   that is put on the end; can be zero\n                 if not successful:\n                   PCRE_ERROR_NOMEMORY (-6) buffer too small\n                   PCRE_ERROR_NOSUBSTRING (-7) no such captured substring\n*/\n\nint\npcre_copy_substring(const char *subject, int *ovector, int stringcount,\n  int stringnumber, char *buffer, int size)\n{\nint yield;\nif (stringnumber < 0 || stringnumber >= stringcount)\n  return PCRE_ERROR_NOSUBSTRING;\nstringnumber *= 2;\nyield = ovector[stringnumber+1] - ovector[stringnumber];\nif (size < yield + 1) return PCRE_ERROR_NOMEMORY;\nmemcpy(buffer, subject + ovector[stringnumber], yield);\nbuffer[yield] = 0;\nreturn yield;\n}\n\n\n\n/*************************************************\n*      Copy all captured strings to new store    *\n*************************************************/\n\n/* This function gets one chunk of store and builds a list of pointers and all\nof the captured substrings in it. A NULL pointer is put on the end of the list.\n\nArguments:\n  subject        the subject string that was matched\n  ovector        pointer to the offsets table\n  stringcount    the number of substrings that were captured\n                   (i.e. the yield of the pcre_exec call, unless\n                   that was zero, in which case it should be 1/3\n                   of the offset table size)\n  listptr        set to point to the list of pointers\n\nReturns:         if successful: 0\n                 if not successful:\n                   PCRE_ERROR_NOMEMORY (-6) failed to get store\n*/\n\nint\npcre_get_substring_list(const char *subject, int *ovector, int stringcount,\n  const char ***listptr)\n{\nint i;\nint size = sizeof(char *);\nint double_count = stringcount * 2;\nchar **stringlist;\nchar *p;\n\nfor (i = 0; i < double_count; i += 2)\n  size += sizeof(char *) + ovector[i+1] - ovector[i] + 1;\n\nstringlist = (char **)(pcre_malloc)(size);\nif (stringlist == NULL) return PCRE_ERROR_NOMEMORY;\n\n*listptr = (const char **)stringlist;\np = (char *)(stringlist + stringcount + 1);\n\nfor (i = 0; i < double_count; i += 2)\n  {\n  int len = ovector[i+1] - ovector[i];\n  memcpy(p, subject + ovector[i], len);\n  *stringlist++ = p;\n  p += len;\n  *p++ = 0;\n  }\n\n*stringlist = NULL;\nreturn 0;\n}\n\n\n\n/*************************************************\n*   Free store obtained by get_substring_list    *\n*************************************************/\n\n/* This function exists for the benefit of people calling PCRE from non-C\nprograms that can call its functions, but not free() or (pcre_free)() directly.\n\nArgument:   the result of a previous pcre_get_substring_list()\nReturns:    nothing\n*/\n\nvoid\npcre_free_substring_list(const char **pointer)\n{\n(pcre_free)((void *)pointer);\n}\n\n\n\n/*************************************************\n*      Copy captured string to new store         *\n*************************************************/\n\n/* This function copies a single captured substring into a piece of new\nstore\n\nArguments:\n  subject        the subject string that was matched\n  ovector        pointer to the offsets table\n  stringcount    the number of substrings that were captured\n                   (i.e. the yield of the pcre_exec call, unless\n                   that was zero, in which case it should be 1/3\n                   of the offset table size)\n  stringnumber   the number of the required substring\n  stringptr      where to put a pointer to the substring\n\nReturns:         if successful:\n                   the length of the string, not including the zero that\n                   is put on the end; can be zero\n                 if not successful:\n                   PCRE_ERROR_NOMEMORY (-6) failed to get store\n                   PCRE_ERROR_NOSUBSTRING (-7) substring not present\n*/\n\nint\npcre_get_substring(const char *subject, int *ovector, int stringcount,\n  int stringnumber, const char **stringptr)\n{\nint yield;\nchar *substring;\nif (stringnumber < 0 || stringnumber >= stringcount)\n  return PCRE_ERROR_NOSUBSTRING;\nstringnumber *= 2;\nyield = ovector[stringnumber+1] - ovector[stringnumber];\nsubstring = (char *)(pcre_malloc)(yield + 1);\nif (substring == NULL) return PCRE_ERROR_NOMEMORY;\nmemcpy(substring, subject + ovector[stringnumber], yield);\nsubstring[yield] = 0;\n*stringptr = substring;\nreturn yield;\n}\n\n\n\n/*************************************************\n*       Free store obtained by get_substring     *\n*************************************************/\n\n/* This function exists for the benefit of people calling PCRE from non-C\nprograms that can call its functions, but not free() or (pcre_free)() directly.\n\nArgument:   the result of a previous pcre_get_substring()\nReturns:    nothing\n*/\n\nvoid\npcre_free_substring(const char *pointer)\n{\n(pcre_free)((void *)pointer);\n}\n\n/* End of get.c */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/RePlugin/internal.h",
    "content": "/*************************************************\n*      Perl-Compatible Regular Expressions       *\n*************************************************/\n\n\n/* This is a library of functions to support regular expressions whose syntax\nand semantics are as close as possible to those of the Perl 5 language. See\nthe file Tech.Notes for some information on the internals.\n\nWritten by: Philip Hazel <ph10@cam.ac.uk>\n\n           Copyright (c) 1997-2001 University of Cambridge\n\n-----------------------------------------------------------------------------\nPermission is granted to anyone to use this software for any purpose on any\ncomputer system, and to redistribute it freely, subject to the following\nrestrictions:\n\n1. This software is distributed in the hope that it will be useful,\n   but WITHOUT ANY WARRANTY; without even the implied warranty of\n   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n2. The origin of this software must not be misrepresented, either by\n   explicit claim or by omission.\n\n3. Altered versions must be plainly marked as such, and must not be\n   misrepresented as being the original software.\n\n4. If PCRE is embedded in any software that is released under the GNU\n   General Purpose Licence (GPL), then the terms of that licence shall\n   supersede any condition above with which it is incompatible.\n-----------------------------------------------------------------------------\n*/\n\n/* This header contains definitions that are shared between the different\nmodules, but which are not relevant to the outside. */\n\n/* Get the definitions provided by running \"configure\" */\n\n#define\tNEWLINE\t'\\r'\n#define SQUEAK_PLUGIN\n\n#include \"config.h\"\n\n/* To cope with SunOS4 and other systems that lack memmove() but have bcopy(),\ndefine a macro for memmove() if HAVE_MEMMOVE is false, provided that HAVE_BCOPY\nis set. Otherwise, include an emulating function for those systems that have\nneither (there some non-Unix environments where this is the case). This assumes\nthat all calls to memmove are moving strings upwards in store, which is the\ncase in PCRE. */\n\n#if ! HAVE_MEMMOVE\n#undef  memmove        /* some systems may have a macro */\n#if HAVE_BCOPY\n#define memmove(a, b, c) bcopy(b, a, c)\n#else\nvoid *\npcre_memmove(unsigned char *dest, const unsigned char *src, size_t n)\n{\nint i;\ndest += n;\nsrc += n;\nfor (i = 0; i < n; ++i) *(--dest) =  *(--src);\n}\n#define memmove(a, b, c) pcre_memmove(a, b, c)\n#endif\n#endif\n\n/* Standard C headers plus the external interface definition */\n\n#include <ctype.h>\n#include <limits.h>\n#include <stddef.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include \"pcre.h\"\n\n/* In case there is no definition of offsetof() provided - though any proper\nStandard C system should have one. */\n\n#ifndef offsetof\n#define offsetof(p_type,field) ((size_t)&(((p_type *)0)->field))\n#endif\n\n/* These are the public options that can change during matching. */\n\n#define PCRE_IMS (PCRE_CASELESS|PCRE_MULTILINE|PCRE_DOTALL)\n\n/* Private options flags start at the most significant end of the four bytes,\nbut skip the top bit so we can use ints for convenience without getting tangled\nwith negative values. The public options defined in pcre.h start at the least\nsignificant end. Make sure they don't overlap, though now that we have expanded\nto four bytes there is plenty of space. */\n\n#define PCRE_FIRSTSET      0x40000000  /* first_char is set */\n#define PCRE_REQCHSET      0x20000000  /* req_char is set */\n#define PCRE_STARTLINE     0x10000000  /* start after \\n for multiline */\n#define PCRE_INGROUP       0x08000000  /* compiling inside a group */\n#define PCRE_ICHANGED      0x04000000  /* i option changes within regex */\n\n/* Options for the \"extra\" block produced by pcre_study(). */\n\n#define PCRE_STUDY_MAPPED   0x01     /* a map of starting chars exists */\n\n/* Masks for identifying the public options which are permitted at compile\ntime, run time or study time, respectively. */\n\n#define PUBLIC_OPTIONS \\\n  (PCRE_CASELESS|PCRE_EXTENDED|PCRE_ANCHORED|PCRE_MULTILINE| \\\n   PCRE_DOTALL|PCRE_DOLLAR_ENDONLY|PCRE_EXTRA|PCRE_UNGREEDY|PCRE_UTF8)\n\n#define PUBLIC_EXEC_OPTIONS \\\n  (PCRE_ANCHORED|PCRE_NOTBOL|PCRE_NOTEOL|PCRE_NOTEMPTY)\n\n#define PUBLIC_STUDY_OPTIONS 0   /* None defined */\n\n/* Magic number to provide a small check against being handed junk. */\n\n#define MAGIC_NUMBER  0x50435245UL   /* 'PCRE' */\n\n/* Miscellaneous definitions */\n\ntypedef int BOOL;\n/* tpr - needed to avoid clash with prevous defn in system headers */\n#ifndef FALSE\n#define FALSE   0\n#define TRUE    1\n#endif\n\n/* Escape items that are just an encoding of a particular data value. Note that\nESC_N is defined as yet another macro, which is set in config.h to either \\n\n(the default) or \\r (which some people want). */\n\n#ifndef ESC_E\n#define ESC_E 27\n#endif\n\n#ifndef ESC_F\n#define ESC_F '\\f'\n#endif\n\n#ifndef ESC_N\n#define ESC_N NEWLINE\n#endif\n\n#ifndef ESC_R\n#define ESC_R '\\r'\n#endif\n\n#ifndef ESC_T\n#define ESC_T '\\t'\n#endif\n\n/* These are escaped items that aren't just an encoding of a particular data\nvalue such as \\n. They must have non-zero values, as check_escape() returns\ntheir negation. Also, they must appear in the same order as in the opcode\ndefinitions below, up to ESC_z. The final one must be ESC_REF as subsequent\nvalues are used for \\1, \\2, \\3, etc. There is a test in the code for an escape\ngreater than ESC_b and less than ESC_Z to detect the types that may be\nrepeated. If any new escapes are put in-between that don't consume a character,\nthat code will have to change. */\n\nenum { ESC_A = 1, ESC_B, ESC_b, ESC_D, ESC_d, ESC_S, ESC_s, ESC_W, ESC_w,\n       ESC_Z, ESC_z, ESC_REF };\n\n/* Opcode table: OP_BRA must be last, as all values >= it are used for brackets\nthat extract substrings. Starting from 1 (i.e. after OP_END), the values up to\nOP_EOD must correspond in order to the list of escapes immediately above. */\n\nenum {\n  OP_END,            /* End of pattern */\n\n  /* Values corresponding to backslashed metacharacters */\n\n  OP_SOD,            /* Start of data: \\A */\n  OP_NOT_WORD_BOUNDARY,  /* \\B */\n  OP_WORD_BOUNDARY,      /* \\b */\n  OP_NOT_DIGIT,          /* \\D */\n  OP_DIGIT,              /* \\d */\n  OP_NOT_WHITESPACE,     /* \\S */\n  OP_WHITESPACE,         /* \\s */\n  OP_NOT_WORDCHAR,       /* \\W */\n  OP_WORDCHAR,           /* \\w */\n  OP_EODN,           /* End of data or \\n at end of data: \\Z. */\n  OP_EOD,            /* End of data: \\z */\n\n  OP_OPT,            /* Set runtime options */\n  OP_CIRC,           /* Start of line - varies with multiline switch */\n  OP_DOLL,           /* End of line - varies with multiline switch */\n  OP_ANY,            /* Match any character */\n  OP_CHARS,          /* Match string of characters */\n  OP_NOT,            /* Match anything but the following char */\n\n  OP_STAR,           /* The maximizing and minimizing versions of */\n  OP_MINSTAR,        /* all these opcodes must come in pairs, with */\n  OP_PLUS,           /* the minimizing one second. */\n  OP_MINPLUS,        /* This first set applies to single characters */\n  OP_QUERY,\n  OP_MINQUERY,\n  OP_UPTO,           /* From 0 to n matches */\n  OP_MINUPTO,\n  OP_EXACT,          /* Exactly n matches */\n\n  OP_NOTSTAR,        /* The maximizing and minimizing versions of */\n  OP_NOTMINSTAR,     /* all these opcodes must come in pairs, with */\n  OP_NOTPLUS,        /* the minimizing one second. */\n  OP_NOTMINPLUS,     /* This first set applies to \"not\" single characters */\n  OP_NOTQUERY,\n  OP_NOTMINQUERY,\n  OP_NOTUPTO,        /* From 0 to n matches */\n  OP_NOTMINUPTO,\n  OP_NOTEXACT,       /* Exactly n matches */\n\n  OP_TYPESTAR,       /* The maximizing and minimizing versions of */\n  OP_TYPEMINSTAR,    /* all these opcodes must come in pairs, with */\n  OP_TYPEPLUS,       /* the minimizing one second. These codes must */\n  OP_TYPEMINPLUS,    /* be in exactly the same order as those above. */\n  OP_TYPEQUERY,      /* This set applies to character types such as \\d */\n  OP_TYPEMINQUERY,\n  OP_TYPEUPTO,       /* From 0 to n matches */\n  OP_TYPEMINUPTO,\n  OP_TYPEEXACT,      /* Exactly n matches */\n\n  OP_CRSTAR,         /* The maximizing and minimizing versions of */\n  OP_CRMINSTAR,      /* all these opcodes must come in pairs, with */\n  OP_CRPLUS,         /* the minimizing one second. These codes must */\n  OP_CRMINPLUS,      /* be in exactly the same order as those above. */\n  OP_CRQUERY,        /* These are for character classes and back refs */\n  OP_CRMINQUERY,\n  OP_CRRANGE,        /* These are different to the three seta above. */\n  OP_CRMINRANGE,\n\n  OP_CLASS,          /* Match a character class */\n  OP_REF,            /* Match a back reference */\n  OP_RECURSE,        /* Match this pattern recursively */\n\n  OP_ALT,            /* Start of alternation */\n  OP_KET,            /* End of group that doesn't have an unbounded repeat */\n  OP_KETRMAX,        /* These two must remain together and in this */\n  OP_KETRMIN,        /* order. They are for groups the repeat for ever. */\n\n  /* The assertions must come before ONCE and COND */\n\n  OP_ASSERT,         /* Positive lookahead */\n  OP_ASSERT_NOT,     /* Negative lookahead */\n  OP_ASSERTBACK,     /* Positive lookbehind */\n  OP_ASSERTBACK_NOT, /* Negative lookbehind */\n  OP_REVERSE,        /* Move pointer back - used in lookbehind assertions */\n\n  /* ONCE and COND must come after the assertions, with ONCE first, as there's\n  a test for >= ONCE for a subpattern that isn't an assertion. */\n\n  OP_ONCE,           /* Once matched, don't back up into the subpattern */\n  OP_COND,           /* Conditional group */\n  OP_CREF,           /* Used to hold an extraction string number (cond ref) */\n\n  OP_BRAZERO,        /* These two must remain together and in this */\n  OP_BRAMINZERO,     /* order. */\n\n  OP_BRANUMBER,      /* Used for extracting brackets whose number is greater\n                        than can fit into an opcode. */\n\n  OP_BRA             /* This and greater values are used for brackets that\n                        extract substrings up to a basic limit. After that,\n                        use is made of OP_BRANUMBER. */\n};\n\n/* The highest extraction number before we have to start using additional\nbytes. (Originally PCRE didn't have support for extraction counts highter than\nthis number.) The value is limited by the number of opcodes left after OP_BRA,\ni.e. 255 - OP_BRA. We actually set it a bit lower to leave room for additional\nopcodes. */\n\n#define EXTRACT_BASIC_MAX  150\n\n/* The texts of compile-time error messages are defined as macros here so that\nthey can be accessed by the POSIX wrapper and converted into error codes.  Yes,\nI could have used error codes in the first place, but didn't feel like changing\njust to accommodate the POSIX wrapper. */\n\n#define ERR1  \"\\\\ at end of pattern\"\n#define ERR2  \"\\\\c at end of pattern\"\n#define ERR3  \"unrecognized character follows \\\\\"\n#define ERR4  \"numbers out of order in {} quantifier\"\n#define ERR5  \"number too big in {} quantifier\"\n#define ERR6  \"missing terminating ] for character class\"\n#define ERR7  \"invalid escape sequence in character class\"\n#define ERR8  \"range out of order in character class\"\n#define ERR9  \"nothing to repeat\"\n#define ERR10 \"operand of unlimited repeat could match the empty string\"\n#define ERR11 \"internal error: unexpected repeat\"\n#define ERR12 \"unrecognized character after (?\"\n#define ERR13 \"unused error\"\n#define ERR14 \"missing )\"\n#define ERR15 \"back reference to non-existent subpattern\"\n#define ERR16 \"erroffset passed as NULL\"\n#define ERR17 \"unknown option bit(s) set\"\n#define ERR18 \"missing ) after comment\"\n#define ERR19 \"parentheses nested too deeply\"\n#define ERR20 \"regular expression too large\"\n#define ERR21 \"failed to get memory\"\n#define ERR22 \"unmatched parentheses\"\n#define ERR23 \"internal error: code overflow\"\n#define ERR24 \"unrecognized character after (?<\"\n#define ERR25 \"lookbehind assertion is not fixed length\"\n#define ERR26 \"malformed number after (?(\"\n#define ERR27 \"conditional group contains more than two branches\"\n#define ERR28 \"assertion expected after (?(\"\n#define ERR29 \"(?p must be followed by )\"\n#define ERR30 \"unknown POSIX class name\"\n#define ERR31 \"POSIX collating elements are not supported\"\n#define ERR32 \"this version of PCRE is not compiled with PCRE_UTF8 support\"\n#define ERR33 \"characters with values > 255 are not yet supported in classes\"\n#define ERR34 \"character value in \\\\x{...} sequence is too large\"\n#define ERR35 \"invalid condition (?(0)\"\n\n/* All character handling must be done as unsigned characters. Otherwise there\nare problems with top-bit-set characters and functions such as isspace().\nHowever, we leave the interface to the outside world as char *, because that\nshould make things easier for callers. We define a short type for unsigned char\nto save lots of typing. I tried \"uchar\", but it causes problems on Digital\nUnix, where it is defined in sys/types, so use \"uschar\" instead. */\n\ntypedef unsigned char uschar;\n\n/* The real format of the start of the pcre block; the actual code vector\nruns on as long as necessary after the end. */\n\ntypedef struct real_pcre {\n  unsigned long int magic_number;\n  size_t size;\n  const unsigned char *tables;\n  unsigned long int options;\n  unsigned short int top_bracket;\n  unsigned short int top_backref;\n  uschar first_char;\n  uschar req_char;\n  uschar code[1];\n} real_pcre;\n\n/* The real format of the extra block returned by pcre_study(). */\n\ntypedef struct real_pcre_extra {\n  uschar options;\n  uschar start_bits[32];\n} real_pcre_extra;\n\n\n/* Structure for passing \"static\" information around between the functions\ndoing the compiling, so that they are thread-safe. */\n\ntypedef struct compile_data {\n  const uschar *lcc;            /* Points to lower casing table */\n  const uschar *fcc;            /* Points to case-flipping table */\n  const uschar *cbits;          /* Points to character type table */\n  const uschar *ctypes;         /* Points to table of type maps */\n} compile_data;\n\n/* Structure for passing \"static\" information around between the functions\ndoing the matching, so that they are thread-safe. */\n\ntypedef struct match_data {\n  int    errorcode;             /* As it says */\n  int   *offset_vector;         /* Offset vector */\n  int    offset_end;            /* One past the end */\n  int    offset_max;            /* The maximum usable for return data */\n  const uschar *lcc;            /* Points to lower casing table */\n  const uschar *ctypes;         /* Points to table of type maps */\n  BOOL   offset_overflow;       /* Set if too many extractions */\n  BOOL   notbol;                /* NOTBOL flag */\n  BOOL   noteol;                /* NOTEOL flag */\n  BOOL   utf8;                  /* UTF8 flag */\n  BOOL   endonly;               /* Dollar not before final \\n */\n  BOOL   notempty;              /* Empty string match not wanted */\n  const uschar *start_pattern;  /* For use when recursing */\n  const uschar *start_subject;  /* Start of the subject string */\n  const uschar *end_subject;    /* End of the subject string */\n  const uschar *start_match;    /* Start of this match attempt */\n  const uschar *end_match_ptr;  /* Subject position at end match */\n  int    end_offset_top;        /* Highwater mark at end of match */\n} match_data;\n\n/* Bit definitions for entries in the pcre_ctypes table. */\n\n#define ctype_space   0x01\n#define ctype_letter  0x02\n#define ctype_digit   0x04\n#define ctype_xdigit  0x08\n#define ctype_word    0x10   /* alphameric or '_' */\n#define ctype_meta    0x80   /* regexp meta char or zero (end pattern) */\n\n/* Offsets for the bitmap tables in pcre_cbits. Each table contains a set\nof bits for a class map. Some classes are built by combining these tables. */\n\n#define cbit_space     0      /* [:space:] or \\s */\n#define cbit_xdigit   32      /* [:xdigit:] */\n#define cbit_digit    64      /* [:digit:] or \\d */\n#define cbit_upper    96      /* [:upper:] */\n#define cbit_lower   128      /* [:lower:] */\n#define cbit_word    160      /* [:word:] or \\w */\n#define cbit_graph   192      /* [:graph:] */\n#define cbit_print   224      /* [:print:] */\n#define cbit_punct   256      /* [:punct:] */\n#define cbit_cntrl   288      /* [:cntrl:] */\n#define cbit_length  320      /* Length of the cbits table */\n\n/* Offsets of the various tables from the base tables pointer, and\ntotal length. */\n\n#define lcc_offset      0\n#define fcc_offset    256\n#define cbits_offset  512\n#define ctypes_offset (cbits_offset + cbit_length)\n#define tables_length (ctypes_offset + 256)\n\n/* End of internal.h */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/RePlugin/oldInternal.h",
    "content": "/*************************************************\n*      Perl-Compatible Regular Expressions       *\n*************************************************/\n\n\n/* This is a library of functions to support regular expressions whose syntax\nand semantics are as close as possible to those of the Perl 5 language. See\nthe file Tech.Notes for some information on the internals.\n\nWritten by: Philip Hazel <ph10@cam.ac.uk>\n\n           Copyright (c) 1997-2001 University of Cambridge\n\n-----------------------------------------------------------------------------\nPermission is granted to anyone to use this software for any purpose on any\ncomputer system, and to redistribute it freely, subject to the following\nrestrictions:\n\n1. This software is distributed in the hope that it will be useful,\n   but WITHOUT ANY WARRANTY; without even the implied warranty of\n   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n2. The origin of this software must not be misrepresented, either by\n   explicit claim or by omission.\n\n3. Altered versions must be plainly marked as such, and must not be\n   misrepresented as being the original software.\n\n4. If PCRE is embedded in any software that is released under the GNU\n   General Purpose Licence (GPL), then the terms of that licence shall\n   supersede any condition above with which it is incompatible.\n-----------------------------------------------------------------------------\n*/\n\n/* This header contains definitions that are shared between the different\nmodules, but which are not relevant to the outside. */\n\n/* Get the definitions provided by running \"configure\" */\n\n#define\tNEWLINE\t'\\r'\n#define SQUEAK_PLUGIN\n\n#include \"config.h\"\n\n/* To cope with SunOS4 and other systems that lack memmove() but have bcopy(),\ndefine a macro for memmove() if HAVE_MEMMOVE is false, provided that HAVE_BCOPY\nis set. Otherwise, include an emulating function for those systems that have\nneither (there some non-Unix environments where this is the case). This assumes\nthat all calls to memmove are moving strings upwards in store, which is the\ncase in PCRE. */\n\n#if ! HAVE_MEMMOVE\n#undef  memmove        /* some systems may have a macro */\n#if HAVE_BCOPY\n#define memmove(a, b, c) bcopy(b, a, c)\n#else\nvoid *\npcre_memmove(unsigned char *dest, const unsigned char *src, size_t n)\n{\nint i;\ndest += n;\nsrc += n;\nfor (i = 0; i < n; ++i) *(--dest) =  *(--src);\n}\n#define memmove(a, b, c) pcre_memmove(a, b, c)\n#endif\n#endif\n\n/* Standard C headers plus the external interface definition */\n\n#include <ctype.h>\n#include <limits.h>\n#include <stddef.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include \"pcre.h\"\n\n/* In case there is no definition of offsetof() provided - though any proper\nStandard C system should have one. */\n\n#ifndef offsetof\n#define offsetof(p_type,field) ((size_t)&(((p_type *)0)->field))\n#endif\n\n/* These are the public options that can change during matching. */\n\n#define PCRE_IMS (PCRE_CASELESS|PCRE_MULTILINE|PCRE_DOTALL)\n\n/* Private options flags start at the most significant end of the four bytes,\nbut skip the top bit so we can use ints for convenience without getting tangled\nwith negative values. The public options defined in pcre.h start at the least\nsignificant end. Make sure they don't overlap, though now that we have expanded\nto four bytes there is plenty of space. */\n\n#define PCRE_FIRSTSET      0x40000000  /* first_char is set */\n#define PCRE_REQCHSET      0x20000000  /* req_char is set */\n#define PCRE_STARTLINE     0x10000000  /* start after \\n for multiline */\n#define PCRE_INGROUP       0x08000000  /* compiling inside a group */\n#define PCRE_ICHANGED      0x04000000  /* i option changes within regex */\n\n/* Options for the \"extra\" block produced by pcre_study(). */\n\n#define PCRE_STUDY_MAPPED   0x01     /* a map of starting chars exists */\n\n/* Masks for identifying the public options which are permitted at compile\ntime, run time or study time, respectively. */\n\n#define PUBLIC_OPTIONS \\\n  (PCRE_CASELESS|PCRE_EXTENDED|PCRE_ANCHORED|PCRE_MULTILINE| \\\n   PCRE_DOTALL|PCRE_DOLLAR_ENDONLY|PCRE_EXTRA|PCRE_UNGREEDY|PCRE_UTF8)\n\n#define PUBLIC_EXEC_OPTIONS \\\n  (PCRE_ANCHORED|PCRE_NOTBOL|PCRE_NOTEOL|PCRE_NOTEMPTY)\n\n#define PUBLIC_STUDY_OPTIONS 0   /* None defined */\n\n/* Magic number to provide a small check against being handed junk. */\n\n#define MAGIC_NUMBER  0x50435245UL   /* 'PCRE' */\n\n/* Miscellaneous definitions */\n\ntypedef int BOOL;\n\n#define FALSE   0\n#define TRUE    1\n\n/* Escape items that are just an encoding of a particular data value. Note that\nESC_N is defined as yet another macro, which is set in config.h to either \\n\n(the default) or \\r (which some people want). */\n\n#ifndef ESC_E\n#define ESC_E 27\n#endif\n\n#ifndef ESC_F\n#define ESC_F '\\f'\n#endif\n\n#ifndef ESC_N\n#define ESC_N NEWLINE\n#endif\n\n#ifndef ESC_R\n#define ESC_R '\\r'\n#endif\n\n#ifndef ESC_T\n#define ESC_T '\\t'\n#endif\n\n/* These are escaped items that aren't just an encoding of a particular data\nvalue such as \\n. They must have non-zero values, as check_escape() returns\ntheir negation. Also, they must appear in the same order as in the opcode\ndefinitions below, up to ESC_z. The final one must be ESC_REF as subsequent\nvalues are used for \\1, \\2, \\3, etc. There is a test in the code for an escape\ngreater than ESC_b and less than ESC_Z to detect the types that may be\nrepeated. If any new escapes are put in-between that don't consume a character,\nthat code will have to change. */\n\nenum { ESC_A = 1, ESC_B, ESC_b, ESC_D, ESC_d, ESC_S, ESC_s, ESC_W, ESC_w,\n       ESC_Z, ESC_z, ESC_REF };\n\n/* Opcode table: OP_BRA must be last, as all values >= it are used for brackets\nthat extract substrings. Starting from 1 (i.e. after OP_END), the values up to\nOP_EOD must correspond in order to the list of escapes immediately above. */\n\nenum {\n  OP_END,            /* End of pattern */\n\n  /* Values corresponding to backslashed metacharacters */\n\n  OP_SOD,            /* Start of data: \\A */\n  OP_NOT_WORD_BOUNDARY,  /* \\B */\n  OP_WORD_BOUNDARY,      /* \\b */\n  OP_NOT_DIGIT,          /* \\D */\n  OP_DIGIT,              /* \\d */\n  OP_NOT_WHITESPACE,     /* \\S */\n  OP_WHITESPACE,         /* \\s */\n  OP_NOT_WORDCHAR,       /* \\W */\n  OP_WORDCHAR,           /* \\w */\n  OP_EODN,           /* End of data or \\n at end of data: \\Z. */\n  OP_EOD,            /* End of data: \\z */\n\n  OP_OPT,            /* Set runtime options */\n  OP_CIRC,           /* Start of line - varies with multiline switch */\n  OP_DOLL,           /* End of line - varies with multiline switch */\n  OP_ANY,            /* Match any character */\n  OP_CHARS,          /* Match string of characters */\n  OP_NOT,            /* Match anything but the following char */\n\n  OP_STAR,           /* The maximizing and minimizing versions of */\n  OP_MINSTAR,        /* all these opcodes must come in pairs, with */\n  OP_PLUS,           /* the minimizing one second. */\n  OP_MINPLUS,        /* This first set applies to single characters */\n  OP_QUERY,\n  OP_MINQUERY,\n  OP_UPTO,           /* From 0 to n matches */\n  OP_MINUPTO,\n  OP_EXACT,          /* Exactly n matches */\n\n  OP_NOTSTAR,        /* The maximizing and minimizing versions of */\n  OP_NOTMINSTAR,     /* all these opcodes must come in pairs, with */\n  OP_NOTPLUS,        /* the minimizing one second. */\n  OP_NOTMINPLUS,     /* This first set applies to \"not\" single characters */\n  OP_NOTQUERY,\n  OP_NOTMINQUERY,\n  OP_NOTUPTO,        /* From 0 to n matches */\n  OP_NOTMINUPTO,\n  OP_NOTEXACT,       /* Exactly n matches */\n\n  OP_TYPESTAR,       /* The maximizing and minimizing versions of */\n  OP_TYPEMINSTAR,    /* all these opcodes must come in pairs, with */\n  OP_TYPEPLUS,       /* the minimizing one second. These codes must */\n  OP_TYPEMINPLUS,    /* be in exactly the same order as those above. */\n  OP_TYPEQUERY,      /* This set applies to character types such as \\d */\n  OP_TYPEMINQUERY,\n  OP_TYPEUPTO,       /* From 0 to n matches */\n  OP_TYPEMINUPTO,\n  OP_TYPEEXACT,      /* Exactly n matches */\n\n  OP_CRSTAR,         /* The maximizing and minimizing versions of */\n  OP_CRMINSTAR,      /* all these opcodes must come in pairs, with */\n  OP_CRPLUS,         /* the minimizing one second. These codes must */\n  OP_CRMINPLUS,      /* be in exactly the same order as those above. */\n  OP_CRQUERY,        /* These are for character classes and back refs */\n  OP_CRMINQUERY,\n  OP_CRRANGE,        /* These are different to the three seta above. */\n  OP_CRMINRANGE,\n\n  OP_CLASS,          /* Match a character class */\n  OP_REF,            /* Match a back reference */\n  OP_RECURSE,        /* Match this pattern recursively */\n\n  OP_ALT,            /* Start of alternation */\n  OP_KET,            /* End of group that doesn't have an unbounded repeat */\n  OP_KETRMAX,        /* These two must remain together and in this */\n  OP_KETRMIN,        /* order. They are for groups the repeat for ever. */\n\n  /* The assertions must come before ONCE and COND */\n\n  OP_ASSERT,         /* Positive lookahead */\n  OP_ASSERT_NOT,     /* Negative lookahead */\n  OP_ASSERTBACK,     /* Positive lookbehind */\n  OP_ASSERTBACK_NOT, /* Negative lookbehind */\n  OP_REVERSE,        /* Move pointer back - used in lookbehind assertions */\n\n  /* ONCE and COND must come after the assertions, with ONCE first, as there's\n  a test for >= ONCE for a subpattern that isn't an assertion. */\n\n  OP_ONCE,           /* Once matched, don't back up into the subpattern */\n  OP_COND,           /* Conditional group */\n  OP_CREF,           /* Used to hold an extraction string number (cond ref) */\n\n  OP_BRAZERO,        /* These two must remain together and in this */\n  OP_BRAMINZERO,     /* order. */\n\n  OP_BRANUMBER,      /* Used for extracting brackets whose number is greater\n                        than can fit into an opcode. */\n\n  OP_BRA             /* This and greater values are used for brackets that\n                        extract substrings up to a basic limit. After that,\n                        use is made of OP_BRANUMBER. */\n};\n\n/* The highest extraction number before we have to start using additional\nbytes. (Originally PCRE didn't have support for extraction counts highter than\nthis number.) The value is limited by the number of opcodes left after OP_BRA,\ni.e. 255 - OP_BRA. We actually set it a bit lower to leave room for additional\nopcodes. */\n\n#define EXTRACT_BASIC_MAX  150\n\n/* The texts of compile-time error messages are defined as macros here so that\nthey can be accessed by the POSIX wrapper and converted into error codes.  Yes,\nI could have used error codes in the first place, but didn't feel like changing\njust to accommodate the POSIX wrapper. */\n\n#define ERR1  \"\\\\ at end of pattern\"\n#define ERR2  \"\\\\c at end of pattern\"\n#define ERR3  \"unrecognized character follows \\\\\"\n#define ERR4  \"numbers out of order in {} quantifier\"\n#define ERR5  \"number too big in {} quantifier\"\n#define ERR6  \"missing terminating ] for character class\"\n#define ERR7  \"invalid escape sequence in character class\"\n#define ERR8  \"range out of order in character class\"\n#define ERR9  \"nothing to repeat\"\n#define ERR10 \"operand of unlimited repeat could match the empty string\"\n#define ERR11 \"internal error: unexpected repeat\"\n#define ERR12 \"unrecognized character after (?\"\n#define ERR13 \"unused error\"\n#define ERR14 \"missing )\"\n#define ERR15 \"back reference to non-existent subpattern\"\n#define ERR16 \"erroffset passed as NULL\"\n#define ERR17 \"unknown option bit(s) set\"\n#define ERR18 \"missing ) after comment\"\n#define ERR19 \"parentheses nested too deeply\"\n#define ERR20 \"regular expression too large\"\n#define ERR21 \"failed to get memory\"\n#define ERR22 \"unmatched parentheses\"\n#define ERR23 \"internal error: code overflow\"\n#define ERR24 \"unrecognized character after (?<\"\n#define ERR25 \"lookbehind assertion is not fixed length\"\n#define ERR26 \"malformed number after (?(\"\n#define ERR27 \"conditional group contains more than two branches\"\n#define ERR28 \"assertion expected after (?(\"\n#define ERR29 \"(?p must be followed by )\"\n#define ERR30 \"unknown POSIX class name\"\n#define ERR31 \"POSIX collating elements are not supported\"\n#define ERR32 \"this version of PCRE is not compiled with PCRE_UTF8 support\"\n#define ERR33 \"characters with values > 255 are not yet supported in classes\"\n#define ERR34 \"character value in \\\\x{...} sequence is too large\"\n#define ERR35 \"invalid condition (?(0)\"\n\n/* All character handling must be done as unsigned characters. Otherwise there\nare problems with top-bit-set characters and functions such as isspace().\nHowever, we leave the interface to the outside world as char *, because that\nshould make things easier for callers. We define a short type for unsigned char\nto save lots of typing. I tried \"uchar\", but it causes problems on Digital\nUnix, where it is defined in sys/types, so use \"uschar\" instead. */\n\ntypedef unsigned char uschar;\n\n/* The real format of the start of the pcre block; the actual code vector\nruns on as long as necessary after the end. */\n\ntypedef struct real_pcre {\n  unsigned long int magic_number;\n  size_t size;\n  const unsigned char *tables;\n  unsigned long int options;\n  unsigned short int top_bracket;\n  unsigned short int top_backref;\n  uschar first_char;\n  uschar req_char;\n  uschar code[1];\n} real_pcre;\n\n/* The real format of the extra block returned by pcre_study(). */\n\ntypedef struct real_pcre_extra {\n  uschar options;\n  uschar start_bits[32];\n} real_pcre_extra;\n\n\n/* Structure for passing \"static\" information around between the functions\ndoing the compiling, so that they are thread-safe. */\n\ntypedef struct compile_data {\n  const uschar *lcc;            /* Points to lower casing table */\n  const uschar *fcc;            /* Points to case-flipping table */\n  const uschar *cbits;          /* Points to character type table */\n  const uschar *ctypes;         /* Points to table of type maps */\n} compile_data;\n\n/* Structure for passing \"static\" information around between the functions\ndoing the matching, so that they are thread-safe. */\n\ntypedef struct match_data {\n  int    errorcode;             /* As it says */\n  int   *offset_vector;         /* Offset vector */\n  int    offset_end;            /* One past the end */\n  int    offset_max;            /* The maximum usable for return data */\n  const uschar *lcc;            /* Points to lower casing table */\n  const uschar *ctypes;         /* Points to table of type maps */\n  BOOL   offset_overflow;       /* Set if too many extractions */\n  BOOL   notbol;                /* NOTBOL flag */\n  BOOL   noteol;                /* NOTEOL flag */\n  BOOL   utf8;                  /* UTF8 flag */\n  BOOL   endonly;               /* Dollar not before final \\n */\n  BOOL   notempty;              /* Empty string match not wanted */\n  const uschar *start_pattern;  /* For use when recursing */\n  const uschar *start_subject;  /* Start of the subject string */\n  const uschar *end_subject;    /* End of the subject string */\n  const uschar *start_match;    /* Start of this match attempt */\n  const uschar *end_match_ptr;  /* Subject position at end match */\n  int    end_offset_top;        /* Highwater mark at end of match */\n} match_data;\n\n/* Bit definitions for entries in the pcre_ctypes table. */\n\n#define ctype_space   0x01\n#define ctype_letter  0x02\n#define ctype_digit   0x04\n#define ctype_xdigit  0x08\n#define ctype_word    0x10   /* alphameric or '_' */\n#define ctype_meta    0x80   /* regexp meta char or zero (end pattern) */\n\n/* Offsets for the bitmap tables in pcre_cbits. Each table contains a set\nof bits for a class map. Some classes are built by combining these tables. */\n\n#define cbit_space     0      /* [:space:] or \\s */\n#define cbit_xdigit   32      /* [:xdigit:] */\n#define cbit_digit    64      /* [:digit:] or \\d */\n#define cbit_upper    96      /* [:upper:] */\n#define cbit_lower   128      /* [:lower:] */\n#define cbit_word    160      /* [:word:] or \\w */\n#define cbit_graph   192      /* [:graph:] */\n#define cbit_print   224      /* [:print:] */\n#define cbit_punct   256      /* [:punct:] */\n#define cbit_cntrl   288      /* [:cntrl:] */\n#define cbit_length  320      /* Length of the cbits table */\n\n/* Offsets of the various tables from the base tables pointer, and\ntotal length. */\n\n#define lcc_offset      0\n#define fcc_offset    256\n#define cbits_offset  512\n#define ctypes_offset (cbits_offset + cbit_length)\n#define tables_length (ctypes_offset + 256)\n\n/* End of internal.h */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/RePlugin/pcre.c",
    "content": "/*************************************************\n*      Perl-Compatible Regular Expressions       *\n*************************************************/\n\n/*\nThis is a library of functions to support regular expressions whose syntax\nand semantics are as close as possible to those of the Perl 5 language. See\nthe file Tech.Notes for some information on the internals.\n\nWritten by: Philip Hazel <ph10@cam.ac.uk>\n\n           Copyright (c) 1997-2001 University of Cambridge\n\n-----------------------------------------------------------------------------\nPermission is granted to anyone to use this software for any purpose on any\ncomputer system, and to redistribute it freely, subject to the following\nrestrictions:\n\n1. This software is distributed in the hope that it will be useful,\n   but WITHOUT ANY WARRANTY; without even the implied warranty of\n   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n2. The origin of this software must not be misrepresented, either by\n   explicit claim or by omission.\n\n3. Altered versions must be plainly marked as such, and must not be\n   misrepresented as being the original software.\n\n4. If PCRE is embedded in any software that is released under the GNU\n   General Purpose Licence (GPL), then the terms of that licence shall\n   supersede any condition above with which it is incompatible.\n-----------------------------------------------------------------------------\n*/\n\n\n/* Define DEBUG to get debugging output on stdout. */\n\n/* #define DEBUG */\n\n/* Use a macro for debugging printing, 'cause that eliminates the use of #ifdef\ninline, and there are *still* stupid compilers about that don't like indented\npre-processor statements. I suppose it's only been 10 years... */\n\n#ifdef DEBUG\n#define DPRINTF(p) printf p\n#else\n#define DPRINTF(p) /*nothing*/\n#endif\n\n/* Include the internals header, which itself includes Standard C headers plus\nthe external pcre header. */\n\n#include \"internal.h\"\n\n\n/* Allow compilation as C++ source code, should anybody want to do that. */\n\n#ifdef __cplusplus\n#define class pcre_class\n#endif\n\n\n/* Maximum number of items on the nested bracket stacks at compile time. This\napplies to the nesting of all kinds of parentheses. It does not limit\nun-nested, non-capturing parentheses. This number can be made bigger if\nnecessary - it is used to dimension one int and one unsigned char vector at\ncompile time. */\n\n#define BRASTACK_SIZE 200\n\n\n/* The number of bytes in a literal character string above which we can't add\nany more is different when UTF-8 characters may be encountered. */\n\n#ifdef SUPPORT_UTF8\n#define MAXLIT 250\n#else\n#define MAXLIT 255\n#endif\n\n\n/* Min and max values for the common repeats; for the maxima, 0 => infinity */\n\nstatic const char rep_min[] = { 0, 0, 1, 1, 0, 0 };\nstatic const char rep_max[] = { 0, 0, 0, 0, 1, 1 };\n\n/* Text forms of OP_ values and things, for debugging (not all used) */\n\n#ifdef DEBUG\nstatic const char *OP_names[] = {\n  \"End\", \"\\\\A\", \"\\\\B\", \"\\\\b\", \"\\\\D\", \"\\\\d\",\n  \"\\\\S\", \"\\\\s\", \"\\\\W\", \"\\\\w\", \"\\\\Z\", \"\\\\z\",\n  \"Opt\", \"^\", \"$\", \"Any\", \"chars\", \"not\",\n  \"*\", \"*?\", \"+\", \"+?\", \"?\", \"??\", \"{\", \"{\", \"{\",\n  \"*\", \"*?\", \"+\", \"+?\", \"?\", \"??\", \"{\", \"{\", \"{\",\n  \"*\", \"*?\", \"+\", \"+?\", \"?\", \"??\", \"{\", \"{\", \"{\",\n  \"*\", \"*?\", \"+\", \"+?\", \"?\", \"??\", \"{\", \"{\",\n  \"class\", \"Ref\", \"Recurse\",\n  \"Alt\", \"Ket\", \"KetRmax\", \"KetRmin\", \"Assert\", \"Assert not\",\n  \"AssertB\", \"AssertB not\", \"Reverse\", \"Once\", \"Cond\", \"Cref\",\n  \"Brazero\", \"Braminzero\", \"Branumber\", \"Bra\"\n};\n#endif\n\n/* Table for handling escaped characters in the range '0'-'z'. Positive returns\nare simple data values; negative values are for special things like \\d and so\non. Zero means further processing is needed (for things like \\x), or the escape\nis invalid. */\n\nstatic const short int escapes[] = {\n    0,      0,      0,      0,      0,      0,      0,      0,   /* 0 - 7 */\n    0,      0,    ':',    ';',    '<',    '=',    '>',    '?',   /* 8 - ? */\n  '@', -ESC_A, -ESC_B,      0, -ESC_D,      0,      0,      0,   /* @ - G */\n    0,      0,      0,      0,      0,      0,      0,      0,   /* H - O */\n    0,      0,      0, -ESC_S,      0,      0,      0, -ESC_W,   /* P - W */\n    0,      0, -ESC_Z,    '[',   '\\\\',    ']',    '^',    '_',   /* X - _ */\n  '`',      7, -ESC_b,      0, -ESC_d,  ESC_E,  ESC_F,      0,   /* ` - g */\n    0,      0,      0,      0,      0,      0,  ESC_N,      0,   /* h - o */\n    0,      0,  ESC_R, -ESC_s,  ESC_T,      0,      0, -ESC_w,   /* p - w */\n    0,      0, -ESC_z                                            /* x - z */\n};\n\n/* Tables of names of POSIX character classes and their lengths. The list is\nterminated by a zero length entry. The first three must be alpha, upper, lower,\nas this is assumed for handling case independence. */\n\nstatic const char *posix_names[] = {\n  \"alpha\", \"lower\", \"upper\",\n  \"alnum\", \"ascii\", \"cntrl\", \"digit\", \"graph\",\n  \"print\", \"punct\", \"space\", \"word\",  \"xdigit\" };\n\nstatic const uschar posix_name_lengths[] = {\n  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 6, 0 };\n\n/* Table of class bit maps for each POSIX class; up to three may be combined\nto form the class. */\n\nstatic const int posix_class_maps[] = {\n  cbit_lower, cbit_upper, -1,             /* alpha */\n  cbit_lower, -1,         -1,             /* lower */\n  cbit_upper, -1,         -1,             /* upper */\n  cbit_digit, cbit_lower, cbit_upper,     /* alnum */\n  cbit_print, cbit_cntrl, -1,             /* ascii */\n  cbit_cntrl, -1,         -1,             /* cntrl */\n  cbit_digit, -1,         -1,             /* digit */\n  cbit_graph, -1,         -1,             /* graph */\n  cbit_print, -1,         -1,             /* print */\n  cbit_punct, -1,         -1,             /* punct */\n  cbit_space, -1,         -1,             /* space */\n  cbit_word,  -1,         -1,             /* word */\n  cbit_xdigit,-1,         -1              /* xdigit */\n};\n\n\n/* Definition to allow mutual recursion */\n\nstatic BOOL\n  compile_regex(int, int, int *, uschar **, const uschar **, const char **,\n    BOOL, int, int *, int *, compile_data *);\n\n/* Structure for building a chain of data that actually lives on the\nstack, for holding the values of the subject pointer at the start of each\nsubpattern, so as to detect when an empty string has been matched by a\nsubpattern - to break infinite loops. */\n\ntypedef struct eptrblock {\n  struct eptrblock *prev;\n  const uschar *saved_eptr;\n} eptrblock;\n\n/* Flag bits for the match() function */\n\n#define match_condassert   0x01    /* Called to check a condition assertion */\n#define match_isgroup      0x02    /* Set if start of bracketed group */\n\n\n\n/*************************************************\n*               Global variables                 *\n*************************************************/\n\n/* PCRE is thread-clean and doesn't use any global variables in the normal\nsense. However, it calls memory allocation and free functions via the two\nindirections below, which are can be changed by the caller, but are shared\nbetween all threads. */\n\n#ifndef SQUEAK_PLUGIN\nvoid *(*pcre_malloc)(size_t) = malloc;\nvoid  (*pcre_free)(void *) = free;\n#endif\n\n\n/*************************************************\n*    Macros and tables for character handling    *\n*************************************************/\n\n/* When UTF-8 encoding is being used, a character is no longer just a single\nbyte. The macros for character handling generate simple sequences when used in\nbyte-mode, and more complicated ones for UTF-8 characters. */\n\n#ifndef SUPPORT_UTF8\n#define GETCHARINC(c, eptr) c = *eptr++;\n#define GETCHARLEN(c, eptr, len) c = *eptr;\n#define BACKCHAR(eptr)\n\n#else   /* SUPPORT_UTF8 */\n\n/* Get the next UTF-8 character, advancing the pointer */\n\n#define GETCHARINC(c, eptr) \\\n  c = *eptr++; \\\n  if (md->utf8 && (c & 0xc0) == 0xc0) \\\n    { \\\n    int a = utf8_table4[c & 0x3f];  /* Number of additional bytes */ \\\n    int s = 6*a; \\\n    c = (c & utf8_table3[a]) << s; \\\n    while (a-- > 0) \\\n      { \\\n      s -= 6; \\\n      c |= (*eptr++ & 0x3f) << s; \\\n      } \\\n    }\n\n/* Get the next UTF-8 character, not advancing the pointer, setting length */\n\n#define GETCHARLEN(c, eptr, len) \\\n  c = *eptr; \\\n  len = 1; \\\n  if (md->utf8 && (c & 0xc0) == 0xc0) \\\n    { \\\n    int i; \\\n    int a = utf8_table4[c & 0x3f];  /* Number of additional bytes */ \\\n    int s = 6*a; \\\n    c = (c & utf8_table3[a]) << s; \\\n    for (i = 1; i <= a; i++) \\\n      { \\\n      s -= 6; \\\n      c |= (eptr[i] & 0x3f) << s; \\\n      } \\\n    len += a; \\\n    }\n\n/* If the pointer is not at the start of a character, move it back until\nit is. */\n\n#define BACKCHAR(eptr) while((*eptr & 0xc0) == 0x80) eptr--;\n\n#endif\n\n\n\n/*************************************************\n*             Default character tables           *\n*************************************************/\n\n/* A default set of character tables is included in the PCRE binary. Its source\nis built by the maketables auxiliary program, which uses the default C ctypes\nfunctions, and put in the file chartables.c. These tables are used by PCRE\nwhenever the caller of pcre_compile() does not provide an alternate set of\ntables. */\n\n#include \"chartables.c\"\n\n\n\n#ifdef SUPPORT_UTF8\n/*************************************************\n*           Tables for UTF-8 support             *\n*************************************************/\n\n/* These are the breakpoints for different numbers of bytes in a UTF-8\ncharacter. */\n\nstatic int utf8_table1[] = { 0x7f, 0x7ff, 0xffff, 0x1fffff, 0x3ffffff, 0x7fffffff};\n\n/* These are the indicator bits and the mask for the data bits to set in the\nfirst byte of a character, indexed by the number of additional bytes. */\n\nstatic int utf8_table2[] = { 0,    0xc0, 0xe0, 0xf0, 0xf8, 0xfc};\nstatic int utf8_table3[] = { 0xff, 0x1f, 0x0f, 0x07, 0x03, 0x01};\n\n/* Table of the number of extra characters, indexed by the first character\nmasked with 0x3f. The highest number for a valid UTF-8 character is in fact\n0x3d. */\n\nstatic uschar utf8_table4[] = {\n  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,\n  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,\n  2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,\n  3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5 };\n\n\n/*************************************************\n*       Convert character value to UTF-8         *\n*************************************************/\n\n/* This function takes an integer value in the range 0 - 0x7fffffff\nand encodes it as a UTF-8 character in 0 to 6 bytes.\n\nArguments:\n  cvalue     the character value\n  buffer     pointer to buffer for result - at least 6 bytes long\n\nReturns:     number of characters placed in the buffer\n*/\n\nstatic int\nord2utf8(int cvalue, uschar *buffer)\n{\nregister int i, j;\nfor (i = 0; i < sizeof(utf8_table1)/sizeof(int); i++)\n  if (cvalue <= utf8_table1[i]) break;\nbuffer += i;\nfor (j = i; j > 0; j--)\n {\n *buffer-- = 0x80 | (cvalue & 0x3f);\n cvalue >>= 6;\n }\n*buffer = utf8_table2[i] | cvalue;\nreturn i + 1;\n}\n#endif\n\n\n\n/*************************************************\n*          Return version string                 *\n*************************************************/\n\n#define STRING(a)  # a\n#define XSTRING(s) STRING(s)\n\nconst char *\npcre_version(void)\n{\nreturn XSTRING(PCRE_MAJOR) \".\" XSTRING(PCRE_MINOR) \" \" XSTRING(PCRE_DATE);\n}\n\n\n\n\n/*************************************************\n* (Obsolete) Return info about compiled pattern  *\n*************************************************/\n\n/* This is the original \"info\" function. It picks potentially useful data out\nof the private structure, but its interface was too rigid. It remains for\nbackwards compatibility. The public options are passed back in an int - though\nthe re->options field has been expanded to a long int, all the public options\nat the low end of it, and so even on 16-bit systems this will still be OK.\nTherefore, I haven't changed the API for pcre_info().\n\nArguments:\n  external_re   points to compiled code\n  optptr        where to pass back the options\n  first_char    where to pass back the first character,\n                or -1 if multiline and all branches start ^,\n                or -2 otherwise\n\nReturns:        number of capturing subpatterns\n                or negative values on error\n*/\n\nint\npcre_info(const pcre *external_re, int *optptr, int *first_char)\n{\nconst real_pcre *re = (const real_pcre *)external_re;\nif (re == NULL) return PCRE_ERROR_NULL;\nif (re->magic_number != MAGIC_NUMBER) return PCRE_ERROR_BADMAGIC;\nif (optptr != NULL) *optptr = (int)(re->options & PUBLIC_OPTIONS);\nif (first_char != NULL)\n  *first_char = ((re->options & PCRE_FIRSTSET) != 0)? re->first_char :\n     ((re->options & PCRE_STARTLINE) != 0)? -1 : -2;\nreturn re->top_bracket;\n}\n\n\n\n/*************************************************\n*        Return info about compiled pattern      *\n*************************************************/\n\n/* This is a newer \"info\" function which has an extensible interface so\nthat additional items can be added compatibly.\n\nArguments:\n  external_re      points to compiled code\n  external_study   points to study data, or NULL\n  what             what information is required\n  where            where to put the information\n\nReturns:           0 if data returned, negative on error\n*/\n\nint\npcre_fullinfo(const pcre *external_re, const pcre_extra *study_data, int what,\n  void *where)\n{\nconst real_pcre *re = (const real_pcre *)external_re;\nconst real_pcre_extra *study = (const real_pcre_extra *)study_data;\n\nif (re == NULL || where == NULL) return PCRE_ERROR_NULL;\nif (re->magic_number != MAGIC_NUMBER) return PCRE_ERROR_BADMAGIC;\n\nswitch (what)\n  {\n  case PCRE_INFO_OPTIONS:\n  *((unsigned long int *)where) = re->options & PUBLIC_OPTIONS;\n  break;\n\n  case PCRE_INFO_SIZE:\n  *((size_t *)where) = re->size;\n  break;\n\n  case PCRE_INFO_CAPTURECOUNT:\n  *((int *)where) = re->top_bracket;\n  break;\n\n  case PCRE_INFO_BACKREFMAX:\n  *((int *)where) = re->top_backref;\n  break;\n\n  case PCRE_INFO_FIRSTCHAR:\n  *((int *)where) =\n    ((re->options & PCRE_FIRSTSET) != 0)? re->first_char :\n    ((re->options & PCRE_STARTLINE) != 0)? -1 : -2;\n  break;\n\n  case PCRE_INFO_FIRSTTABLE:\n  *((const uschar **)where) =\n    (study != NULL && (study->options & PCRE_STUDY_MAPPED) != 0)?\n      study->start_bits : NULL;\n  break;\n\n  case PCRE_INFO_LASTLITERAL:\n  *((int *)where) =\n    ((re->options & PCRE_REQCHSET) != 0)? re->req_char : -1;\n  break;\n\n  default: return PCRE_ERROR_BADOPTION;\n  }\n\nreturn 0;\n}\n\n\n\n#ifdef DEBUG\n/*************************************************\n*        Debugging function to print chars       *\n*************************************************/\n\n/* Print a sequence of chars in printable format, stopping at the end of the\nsubject if the requested.\n\nArguments:\n  p           points to characters\n  length      number to print\n  is_subject  TRUE if printing from within md->start_subject\n  md          pointer to matching data block, if is_subject is TRUE\n\nReturns:     nothing\n*/\n\nstatic void\npchars(const uschar *p, int length, BOOL is_subject, match_data *md)\n{\nint c;\nif (is_subject && length > md->end_subject - p) length = md->end_subject - p;\nwhile (length-- > 0)\n  if (isprint(c = *(p++))) printf(\"%c\", c); else printf(\"\\\\x%02x\", c);\n}\n#endif\n\n\n\n\n/*************************************************\n*            Handle escapes                      *\n*************************************************/\n\n/* This function is called when a \\ has been encountered. It either returns a\npositive value for a simple escape such as \\n, or a negative value which\nencodes one of the more complicated things such as \\d. When UTF-8 is enabled,\na positive value greater than 255 may be returned. On entry, ptr is pointing at\nthe \\. On exit, it is on the final character of the escape sequence.\n\nArguments:\n  ptrptr     points to the pattern position pointer\n  errorptr   points to the pointer to the error message\n  bracount   number of previous extracting brackets\n  options    the options bits\n  isclass    TRUE if inside a character class\n  cd         pointer to char tables block\n\nReturns:     zero or positive => a data character\n             negative => a special escape sequence\n             on error, errorptr is set\n*/\n\nstatic int\ncheck_escape(const uschar **ptrptr, const char **errorptr, int bracount,\n  int options, BOOL isclass, compile_data *cd)\n{\nconst uschar *ptr = *ptrptr;\nint c, i;\n\n/* If backslash is at the end of the pattern, it's an error. */\n\nc = *(++ptr);\nif (c == 0) *errorptr = ERR1;\n\n/* Digits or letters may have special meaning; all others are literals. */\n\nelse if (c < '0' || c > 'z') {}\n\n/* Do an initial lookup in a table. A non-zero result is something that can be\nreturned immediately. Otherwise further processing may be required. */\n\nelse if ((i = escapes[c - '0']) != 0) c = i;\n\n/* Escapes that need further processing, or are illegal. */\n\nelse\n  {\n  const uschar *oldptr;\n  switch (c)\n    {\n    /* The handling of escape sequences consisting of a string of digits\n    starting with one that is not zero is not straightforward. By experiment,\n    the way Perl works seems to be as follows:\n\n    Outside a character class, the digits are read as a decimal number. If the\n    number is less than 10, or if there are that many previous extracting\n    left brackets, then it is a back reference. Otherwise, up to three octal\n    digits are read to form an escaped byte. Thus \\123 is likely to be octal\n    123 (cf \\0123, which is octal 012 followed by the literal 3). If the octal\n    value is greater than 377, the least significant 8 bits are taken. Inside a\n    character class, \\ followed by a digit is always an octal number. */\n\n    case '1': case '2': case '3': case '4': case '5':\n    case '6': case '7': case '8': case '9':\n\n    if (!isclass)\n      {\n      oldptr = ptr;\n      c -= '0';\n      while ((cd->ctypes[ptr[1]] & ctype_digit) != 0)\n        c = c * 10 + *(++ptr) - '0';\n      if (c < 10 || c <= bracount)\n        {\n        c = -(ESC_REF + c);\n        break;\n        }\n      ptr = oldptr;      /* Put the pointer back and fall through */\n      }\n\n    /* Handle an octal number following \\. If the first digit is 8 or 9, Perl\n    generates a binary zero byte and treats the digit as a following literal.\n    Thus we have to pull back the pointer by one. */\n\n    if ((c = *ptr) >= '8')\n      {\n      ptr--;\n      c = 0;\n      break;\n      }\n\n    /* \\0 always starts an octal number, but we may drop through to here with a\n    larger first octal digit. */\n\n    case '0':\n    c -= '0';\n    while(i++ < 2 && (cd->ctypes[ptr[1]] & ctype_digit) != 0 &&\n      ptr[1] != '8' && ptr[1] != '9')\n        c = c * 8 + *(++ptr) - '0';\n    c &= 255;     /* Take least significant 8 bits */\n    break;\n\n    /* \\x is complicated when UTF-8 is enabled. \\x{ddd} is a character number\n    which can be greater than 0xff, but only if the ddd are hex digits. */\n\n    case 'x':\n#ifdef SUPPORT_UTF8\n    if (ptr[1] == '{' && (options & PCRE_UTF8) != 0)\n      {\n      const uschar *pt = ptr + 2;\n      register int count = 0;\n      c = 0;\n      while ((cd->ctypes[*pt] & ctype_xdigit) != 0)\n        {\n        count++;\n        c = c * 16 + cd->lcc[*pt] -\n          (((cd->ctypes[*pt] & ctype_digit) != 0)? '0' : 'W');\n        pt++;\n        }\n      if (*pt == '}')\n        {\n        if (c < 0 || count > 8) *errorptr = ERR34;\n        ptr = pt;\n        break;\n        }\n      /* If the sequence of hex digits does not end with '}', then we don't\n      recognize this construct; fall through to the normal \\x handling. */\n      }\n#endif\n\n    /* Read just a single hex char */\n\n    c = 0;\n    while (i++ < 2 && (cd->ctypes[ptr[1]] & ctype_xdigit) != 0)\n      {\n      ptr++;\n      c = c * 16 + cd->lcc[*ptr] -\n        (((cd->ctypes[*ptr] & ctype_digit) != 0)? '0' : 'W');\n      }\n    break;\n\n    /* Other special escapes not starting with a digit are straightforward */\n\n    case 'c':\n    c = *(++ptr);\n    if (c == 0)\n      {\n      *errorptr = ERR2;\n      return 0;\n      }\n\n    /* A letter is upper-cased; then the 0x40 bit is flipped */\n\n    if (c >= 'a' && c <= 'z') c = cd->fcc[c];\n    c ^= 0x40;\n    break;\n\n    /* PCRE_EXTRA enables extensions to Perl in the matter of escapes. Any\n    other alphameric following \\ is an error if PCRE_EXTRA was set; otherwise,\n    for Perl compatibility, it is a literal. This code looks a bit odd, but\n    there used to be some cases other than the default, and there may be again\n    in future, so I haven't \"optimized\" it. */\n\n    default:\n    if ((options & PCRE_EXTRA) != 0) switch(c)\n      {\n      default:\n      *errorptr = ERR3;\n      break;\n      }\n    break;\n    }\n  }\n\n*ptrptr = ptr;\nreturn c;\n}\n\n\n\n/*************************************************\n*            Check for counted repeat            *\n*************************************************/\n\n/* This function is called when a '{' is encountered in a place where it might\nstart a quantifier. It looks ahead to see if it really is a quantifier or not.\nIt is only a quantifier if it is one of the forms {ddd} {ddd,} or {ddd,ddd}\nwhere the ddds are digits.\n\nArguments:\n  p         pointer to the first char after '{'\n  cd        pointer to char tables block\n\nReturns:    TRUE or FALSE\n*/\n\nstatic BOOL\nis_counted_repeat(const uschar *p, compile_data *cd)\n{\nif ((cd->ctypes[*p++] & ctype_digit) == 0) return FALSE;\nwhile ((cd->ctypes[*p] & ctype_digit) != 0) p++;\nif (*p == '}') return TRUE;\n\nif (*p++ != ',') return FALSE;\nif (*p == '}') return TRUE;\n\nif ((cd->ctypes[*p++] & ctype_digit) == 0) return FALSE;\nwhile ((cd->ctypes[*p] & ctype_digit) != 0) p++;\nreturn (*p == '}');\n}\n\n\n\n/*************************************************\n*         Read repeat counts                     *\n*************************************************/\n\n/* Read an item of the form {n,m} and return the values. This is called only\nafter is_counted_repeat() has confirmed that a repeat-count quantifier exists,\nso the syntax is guaranteed to be correct, but we need to check the values.\n\nArguments:\n  p          pointer to first char after '{'\n  minp       pointer to int for min\n  maxp       pointer to int for max\n             returned as -1 if no max\n  errorptr   points to pointer to error message\n  cd         pointer to character tables clock\n\nReturns:     pointer to '}' on success;\n             current ptr on error, with errorptr set\n*/\n\nstatic const uschar *\nread_repeat_counts(const uschar *p, int *minp, int *maxp,\n  const char **errorptr, compile_data *cd)\n{\nint min = 0;\nint max = -1;\n\nwhile ((cd->ctypes[*p] & ctype_digit) != 0) min = min * 10 + *p++ - '0';\n\nif (*p == '}') max = min; else\n  {\n  if (*(++p) != '}')\n    {\n    max = 0;\n    while((cd->ctypes[*p] & ctype_digit) != 0) max = max * 10 + *p++ - '0';\n    if (max < min)\n      {\n      *errorptr = ERR4;\n      return p;\n      }\n    }\n  }\n\n/* Do paranoid checks, then fill in the required variables, and pass back the\npointer to the terminating '}'. */\n\nif (min > 65535 || max > 65535)\n  *errorptr = ERR5;\nelse\n  {\n  *minp = min;\n  *maxp = max;\n  }\nreturn p;\n}\n\n\n\n/*************************************************\n*        Find the fixed length of a pattern      *\n*************************************************/\n\n/* Scan a pattern and compute the fixed length of subject that will match it,\nif the length is fixed. This is needed for dealing with backward assertions.\n\nArguments:\n  code     points to the start of the pattern (the bracket)\n  options  the compiling options\n\nReturns:   the fixed length, or -1 if there is no fixed length\n*/\n\nstatic int\nfind_fixedlength(uschar *code, int options)\n{\nint length = -1;\n\nregister int branchlength = 0;\nregister uschar *cc = code + 3;\n\n/* Scan along the opcodes for this branch. If we get to the end of the\nbranch, check the length against that of the other branches. */\n\nfor (;;)\n  {\n  int d;\n  register int op = *cc;\n  if (op >= OP_BRA) op = OP_BRA;\n\n  switch (op)\n    {\n    case OP_BRA:\n    case OP_ONCE:\n    case OP_COND:\n    d = find_fixedlength(cc, options);\n    if (d < 0) return -1;\n    branchlength += d;\n    do cc += (cc[1] << 8) + cc[2]; while (*cc == OP_ALT);\n    cc += 3;\n    break;\n\n    /* Reached end of a branch; if it's a ket it is the end of a nested\n    call. If it's ALT it is an alternation in a nested call. If it is\n    END it's the end of the outer call. All can be handled by the same code. */\n\n    case OP_ALT:\n    case OP_KET:\n    case OP_KETRMAX:\n    case OP_KETRMIN:\n    case OP_END:\n    if (length < 0) length = branchlength;\n      else if (length != branchlength) return -1;\n    if (*cc != OP_ALT) return length;\n    cc += 3;\n    branchlength = 0;\n    break;\n\n    /* Skip over assertive subpatterns */\n\n    case OP_ASSERT:\n    case OP_ASSERT_NOT:\n    case OP_ASSERTBACK:\n    case OP_ASSERTBACK_NOT:\n    do cc += (cc[1] << 8) + cc[2]; while (*cc == OP_ALT);\n    cc += 3;\n    break;\n\n    /* Skip over things that don't match chars */\n\n    case OP_REVERSE:\n    case OP_BRANUMBER:\n    case OP_CREF:\n    cc++;\n    /* Fall through */\n\n    case OP_OPT:\n    cc++;\n    /* Fall through */\n\n    case OP_SOD:\n    case OP_EOD:\n    case OP_EODN:\n    case OP_CIRC:\n    case OP_DOLL:\n    case OP_NOT_WORD_BOUNDARY:\n    case OP_WORD_BOUNDARY:\n    cc++;\n    break;\n\n    /* Handle char strings. In UTF-8 mode we must count characters, not bytes.\n    This requires a scan of the string, unfortunately. We assume valid UTF-8\n    strings, so all we do is reduce the length by one for byte whose bits are\n    10xxxxxx. */\n\n    case OP_CHARS:\n    branchlength += *(++cc);\n#ifdef SUPPORT_UTF8\n    for (d = 1; d <= *cc; d++)\n      if ((cc[d] & 0xc0) == 0x80) branchlength--;\n#endif\n    cc += *cc + 1;\n    break;\n\n    /* Handle exact repetitions */\n\n    case OP_EXACT:\n    case OP_TYPEEXACT:\n    branchlength += (cc[1] << 8) + cc[2];\n    cc += 4;\n    break;\n\n    /* Handle single-char matchers */\n\n    case OP_NOT_DIGIT:\n    case OP_DIGIT:\n    case OP_NOT_WHITESPACE:\n    case OP_WHITESPACE:\n    case OP_NOT_WORDCHAR:\n    case OP_WORDCHAR:\n    case OP_ANY:\n    branchlength++;\n    cc++;\n    break;\n\n\n    /* Check a class for variable quantification */\n\n    case OP_CLASS:\n    cc += 33;\n\n    switch (*cc)\n      {\n      case OP_CRSTAR:\n      case OP_CRMINSTAR:\n      case OP_CRQUERY:\n      case OP_CRMINQUERY:\n      return -1;\n\n      case OP_CRRANGE:\n      case OP_CRMINRANGE:\n      if ((cc[1] << 8) + cc[2] != (cc[3] << 8) + cc[4]) return -1;\n      branchlength += (cc[1] << 8) + cc[2];\n      cc += 5;\n      break;\n\n      default:\n      branchlength++;\n      }\n    break;\n\n    /* Anything else is variable length */\n\n    default:\n    return -1;\n    }\n  }\n/* Control never gets here */\n}\n\n\n\n\n/*************************************************\n*           Check for POSIX class syntax         *\n*************************************************/\n\n/* This function is called when the sequence \"[:\" or \"[.\" or \"[=\" is\nencountered in a character class. It checks whether this is followed by an\noptional ^ and then a sequence of letters, terminated by a matching \":]\" or\n\".]\" or \"=]\".\n\nArgument:\n  ptr      pointer to the initial [\n  endptr   where to return the end pointer\n  cd       pointer to compile data\n\nReturns:   TRUE or FALSE\n*/\n\nstatic BOOL\ncheck_posix_syntax(const uschar *ptr, const uschar **endptr, compile_data *cd)\n{\nint terminator;          /* Don't combine these lines; the Solaris cc */\nterminator = *(++ptr);   /* compiler warns about \"non-constant\" initializer. */\nif (*(++ptr) == '^') ptr++;\nwhile ((cd->ctypes[*ptr] & ctype_letter) != 0) ptr++;\nif (*ptr == terminator && ptr[1] == ']')\n  {\n  *endptr = ptr;\n  return TRUE;\n  }\nreturn FALSE;\n}\n\n\n\n\n/*************************************************\n*          Check POSIX class name                *\n*************************************************/\n\n/* This function is called to check the name given in a POSIX-style class entry\nsuch as [:alnum:].\n\nArguments:\n  ptr        points to the first letter\n  len        the length of the name\n\nReturns:     a value representing the name, or -1 if unknown\n*/\n\nstatic int\ncheck_posix_name(const uschar *ptr, int len)\n{\nregister int yield = 0;\nwhile (posix_name_lengths[yield] != 0)\n  {\n  if (len == posix_name_lengths[yield] &&\n    strncmp((const char *)ptr, posix_names[yield], len) == 0) return yield;\n  yield++;\n  }\nreturn -1;\n}\n\n\n\n\n/*************************************************\n*           Compile one branch                   *\n*************************************************/\n\n/* Scan the pattern, compiling it into the code vector.\n\nArguments:\n  options      the option bits\n  brackets     points to number of extracting brackets used\n  code         points to the pointer to the current code point\n  ptrptr       points to the current pattern pointer\n  errorptr     points to pointer to error message\n  optchanged   set to the value of the last OP_OPT item compiled\n  reqchar      set to the last literal character required, else -1\n  countlits    set to count of mandatory literal characters\n  cd           contains pointers to tables\n\nReturns:       TRUE on success\n               FALSE, with *errorptr set on error\n*/\n\nstatic BOOL\ncompile_branch(int options, int *brackets, uschar **codeptr,\n  const uschar **ptrptr, const char **errorptr, int *optchanged,\n  int *reqchar, int *countlits, compile_data *cd)\n{\nint repeat_type, op_type;\nint repeat_min, repeat_max;\nint bravalue, length;\nint greedy_default, greedy_non_default;\nint prevreqchar;\nint condcount = 0;\nint subcountlits = 0;\nregister int c;\nregister uschar *code = *codeptr;\nuschar *tempcode;\nconst uschar *ptr = *ptrptr;\nconst uschar *tempptr;\nuschar *previous = NULL;\nuschar class[32];\n\n/* Set up the default and non-default settings for greediness */\n\ngreedy_default = ((options & PCRE_UNGREEDY) != 0);\ngreedy_non_default = greedy_default ^ 1;\n\n/* Initialize no required char, and count of literals */\n\n*reqchar = prevreqchar = -1;\n*countlits = 0;\n\n/* Switch on next character until the end of the branch */\n\nfor (;; ptr++)\n  {\n  BOOL negate_class;\n  int class_charcount;\n  int class_lastchar;\n  int newoptions;\n  int skipbytes;\n  int subreqchar;\n\n  c = *ptr;\n  if ((options & PCRE_EXTENDED) != 0)\n    {\n    if ((cd->ctypes[c] & ctype_space) != 0) continue;\n    if (c == '#')\n      {\n      /* The space before the ; is to avoid a warning on a silly compiler\n      on the Macintosh. */\n      while ((c = *(++ptr)) != 0 && c != NEWLINE) ;\n      continue;\n      }\n    }\n\n  switch(c)\n    {\n    /* The branch terminates at end of string, |, or ). */\n\n    case 0:\n    case '|':\n    case ')':\n    *codeptr = code;\n    *ptrptr = ptr;\n    return TRUE;\n\n    /* Handle single-character metacharacters */\n\n    case '^':\n    previous = NULL;\n    *code++ = OP_CIRC;\n    break;\n\n    case '$':\n    previous = NULL;\n    *code++ = OP_DOLL;\n    break;\n\n    case '.':\n    previous = code;\n    *code++ = OP_ANY;\n    break;\n\n    /* Character classes. These always build a 32-byte bitmap of the permitted\n    characters, except in the special case where there is only one character.\n    For negated classes, we build the map as usual, then invert it at the end.\n    */\n\n    case '[':\n    previous = code;\n    *code++ = OP_CLASS;\n\n    /* If the first character is '^', set the negation flag and skip it. */\n\n    if ((c = *(++ptr)) == '^')\n      {\n      negate_class = TRUE;\n      c = *(++ptr);\n      }\n    else negate_class = FALSE;\n\n    /* Keep a count of chars so that we can optimize the case of just a single\n    character. */\n\n    class_charcount = 0;\n    class_lastchar = -1;\n\n    /* Initialize the 32-char bit map to all zeros. We have to build the\n    map in a temporary bit of store, in case the class contains only 1\n    character, because in that case the compiled code doesn't use the\n    bit map. */\n\n    memset(class, 0, 32 * sizeof(uschar));\n\n    /* Process characters until ] is reached. By writing this as a \"do\" it\n    means that an initial ] is taken as a data character. */\n\n    do\n      {\n      if (c == 0)\n        {\n        *errorptr = ERR6;\n        goto FAILED;\n        }\n\n      /* Handle POSIX class names. Perl allows a negation extension of the\n      form [:^name]. A square bracket that doesn't match the syntax is\n      treated as a literal. We also recognize the POSIX constructions\n      [.ch.] and [=ch=] (\"collating elements\") and fault them, as Perl\n      5.6 does. */\n\n      if (c == '[' &&\n          (ptr[1] == ':' || ptr[1] == '.' || ptr[1] == '=') &&\n          check_posix_syntax(ptr, &tempptr, cd))\n        {\n        BOOL local_negate = FALSE;\n        int posix_class, i;\n        register const uschar *cbits = cd->cbits;\n\n        if (ptr[1] != ':')\n          {\n          *errorptr = ERR31;\n          goto FAILED;\n          }\n\n        ptr += 2;\n        if (*ptr == '^')\n          {\n          local_negate = TRUE;\n          ptr++;\n          }\n\n        posix_class = check_posix_name(ptr, tempptr - ptr);\n        if (posix_class < 0)\n          {\n          *errorptr = ERR30;\n          goto FAILED;\n          }\n\n        /* If matching is caseless, upper and lower are converted to\n        alpha. This relies on the fact that the class table starts with\n        alpha, lower, upper as the first 3 entries. */\n\n        if ((options & PCRE_CASELESS) != 0 && posix_class <= 2)\n          posix_class = 0;\n\n        /* Or into the map we are building up to 3 of the static class\n        tables, or their negations. */\n\n        posix_class *= 3;\n        for (i = 0; i < 3; i++)\n          {\n          int taboffset = posix_class_maps[posix_class + i];\n          if (taboffset < 0) break;\n          if (local_negate)\n            for (c = 0; c < 32; c++) class[c] |= ~cbits[c+taboffset];\n          else\n            for (c = 0; c < 32; c++) class[c] |= cbits[c+taboffset];\n          }\n\n        ptr = tempptr + 1;\n        class_charcount = 10;  /* Set > 1; assumes more than 1 per class */\n        continue;\n        }\n\n      /* Backslash may introduce a single character, or it may introduce one\n      of the specials, which just set a flag. Escaped items are checked for\n      validity in the pre-compiling pass. The sequence \\b is a special case.\n      Inside a class (and only there) it is treated as backspace. Elsewhere\n      it marks a word boundary. Other escapes have preset maps ready to\n      or into the one we are building. We assume they have more than one\n      character in them, so set class_count bigger than one. */\n\n      if (c == '\\\\')\n        {\n        c = check_escape(&ptr, errorptr, *brackets, options, TRUE, cd);\n        if (-c == ESC_b) c = '\\b';\n        else if (c < 0)\n          {\n          register const uschar *cbits = cd->cbits;\n          class_charcount = 10;\n          switch (-c)\n            {\n            case ESC_d:\n            for (c = 0; c < 32; c++) class[c] |= cbits[c+cbit_digit];\n            continue;\n\n            case ESC_D:\n            for (c = 0; c < 32; c++) class[c] |= ~cbits[c+cbit_digit];\n            continue;\n\n            case ESC_w:\n            for (c = 0; c < 32; c++) class[c] |= cbits[c+cbit_word];\n            continue;\n\n            case ESC_W:\n            for (c = 0; c < 32; c++) class[c] |= ~cbits[c+cbit_word];\n            continue;\n\n            case ESC_s:\n            for (c = 0; c < 32; c++) class[c] |= cbits[c+cbit_space];\n            continue;\n\n            case ESC_S:\n            for (c = 0; c < 32; c++) class[c] |= ~cbits[c+cbit_space];\n            continue;\n\n            default:\n            *errorptr = ERR7;\n            goto FAILED;\n            }\n          }\n\n        /* Fall through if single character, but don't at present allow\n        chars > 255 in UTF-8 mode. */\n\n#ifdef SUPPORT_UTF8\n        if (c > 255)\n          {\n          *errorptr = ERR33;\n          goto FAILED;\n          }\n#endif\n        }\n\n      /* A single character may be followed by '-' to form a range. However,\n      Perl does not permit ']' to be the end of the range. A '-' character\n      here is treated as a literal. */\n\n      if (ptr[1] == '-' && ptr[2] != ']')\n        {\n        int d;\n        ptr += 2;\n        d = *ptr;\n\n        if (d == 0)\n          {\n          *errorptr = ERR6;\n          goto FAILED;\n          }\n\n        /* The second part of a range can be a single-character escape, but\n        not any of the other escapes. Perl 5.6 treats a hyphen as a literal\n        in such circumstances. */\n\n        if (d == '\\\\')\n          {\n          const uschar *oldptr = ptr;\n          d = check_escape(&ptr, errorptr, *brackets, options, TRUE, cd);\n\n#ifdef SUPPORT_UTF8\n          if (d > 255)\n            {\n            *errorptr = ERR33;\n            goto FAILED;\n            }\n#endif\n          /* \\b is backslash; any other special means the '-' was literal */\n\n          if (d < 0)\n            {\n            if (d == -ESC_b) d = '\\b'; else\n              {\n              ptr = oldptr - 2;\n              goto SINGLE_CHARACTER;  /* A few lines below */\n              }\n            }\n          }\n\n        if (d < c)\n          {\n          *errorptr = ERR8;\n          goto FAILED;\n          }\n\n        for (; c <= d; c++)\n          {\n          class[c/8] |= (1 << (c&7));\n          if ((options & PCRE_CASELESS) != 0)\n            {\n            int uc = cd->fcc[c];           /* flip case */\n            class[uc/8] |= (1 << (uc&7));\n            }\n          class_charcount++;                /* in case a one-char range */\n          class_lastchar = c;\n          }\n        continue;   /* Go get the next char in the class */\n        }\n\n      /* Handle a lone single character - we can get here for a normal\n      non-escape char, or after \\ that introduces a single character. */\n\n      SINGLE_CHARACTER:\n\n      class [c/8] |= (1 << (c&7));\n      if ((options & PCRE_CASELESS) != 0)\n        {\n        c = cd->fcc[c];   /* flip case */\n        class[c/8] |= (1 << (c&7));\n        }\n      class_charcount++;\n      class_lastchar = c;\n      }\n\n    /* Loop until ']' reached; the check for end of string happens inside the\n    loop. This \"while\" is the end of the \"do\" above. */\n\n    while ((c = *(++ptr)) != ']');\n\n    /* If class_charcount is 1 and class_lastchar is not negative, we saw\n    precisely one character. This doesn't need the whole 32-byte bit map.\n    We turn it into a 1-character OP_CHAR if it's positive, or OP_NOT if\n    it's negative. */\n\n    if (class_charcount == 1 && class_lastchar >= 0)\n      {\n      if (negate_class)\n        {\n        code[-1] = OP_NOT;\n        }\n      else\n        {\n        code[-1] = OP_CHARS;\n        *code++ = 1;\n        }\n      *code++ = class_lastchar;\n      }\n\n    /* Otherwise, negate the 32-byte map if necessary, and copy it into\n    the code vector. */\n\n    else\n      {\n      if (negate_class)\n        for (c = 0; c < 32; c++) code[c] = ~class[c];\n      else\n        memcpy(code, class, 32);\n      code += 32;\n      }\n    break;\n\n    /* Various kinds of repeat */\n\n    case '{':\n    if (!is_counted_repeat(ptr+1, cd)) goto NORMAL_CHAR;\n    ptr = read_repeat_counts(ptr+1, &repeat_min, &repeat_max, errorptr, cd);\n    if (*errorptr != NULL) goto FAILED;\n    goto REPEAT;\n\n    case '*':\n    repeat_min = 0;\n    repeat_max = -1;\n    goto REPEAT;\n\n    case '+':\n    repeat_min = 1;\n    repeat_max = -1;\n    goto REPEAT;\n\n    case '?':\n    repeat_min = 0;\n    repeat_max = 1;\n\n    REPEAT:\n    if (previous == NULL)\n      {\n      *errorptr = ERR9;\n      goto FAILED;\n      }\n\n    /* If the next character is '?' this is a minimizing repeat, by default,\n    but if PCRE_UNGREEDY is set, it works the other way round. Advance to the\n    next character. */\n\n    if (ptr[1] == '?')\n      { repeat_type = greedy_non_default; ptr++; }\n    else repeat_type = greedy_default;\n\n    /* If previous was a string of characters, chop off the last one and use it\n    as the subject of the repeat. If there was only one character, we can\n    abolish the previous item altogether. A repeat with a zero minimum wipes\n    out any reqchar setting, backing up to the previous value. We must also\n    adjust the countlits value. */\n\n    if (*previous == OP_CHARS)\n      {\n      int len = previous[1];\n\n      if (repeat_min == 0) *reqchar = prevreqchar;\n      *countlits += repeat_min - 1;\n\n      if (len == 1)\n        {\n        c = previous[2];\n        code = previous;\n        }\n      else\n        {\n        c = previous[len+1];\n        previous[1]--;\n        code--;\n        }\n      op_type = 0;                 /* Use single-char op codes */\n      goto OUTPUT_SINGLE_REPEAT;   /* Code shared with single character types */\n      }\n\n    /* If previous was a single negated character ([^a] or similar), we use\n    one of the special opcodes, replacing it. The code is shared with single-\n    character repeats by adding a suitable offset into repeat_type. */\n\n    else if ((int)*previous == OP_NOT)\n      {\n      op_type = OP_NOTSTAR - OP_STAR;  /* Use \"not\" opcodes */\n      c = previous[1];\n      code = previous;\n      goto OUTPUT_SINGLE_REPEAT;\n      }\n\n    /* If previous was a character type match (\\d or similar), abolish it and\n    create a suitable repeat item. The code is shared with single-character\n    repeats by adding a suitable offset into repeat_type. */\n\n    else if ((int)*previous < OP_EODN || *previous == OP_ANY)\n      {\n      op_type = OP_TYPESTAR - OP_STAR;  /* Use type opcodes */\n      c = *previous;\n      code = previous;\n\n      OUTPUT_SINGLE_REPEAT:\n\n      /* If the maximum is zero then the minimum must also be zero; Perl allows\n      this case, so we do too - by simply omitting the item altogether. */\n\n      if (repeat_max == 0) goto END_REPEAT;\n\n      /* Combine the op_type with the repeat_type */\n\n      repeat_type += op_type;\n\n      /* A minimum of zero is handled either as the special case * or ?, or as\n      an UPTO, with the maximum given. */\n\n      if (repeat_min == 0)\n        {\n        if (repeat_max == -1) *code++ = OP_STAR + repeat_type;\n          else if (repeat_max == 1) *code++ = OP_QUERY + repeat_type;\n        else\n          {\n          *code++ = OP_UPTO + repeat_type;\n          *code++ = repeat_max >> 8;\n          *code++ = (repeat_max & 255);\n          }\n        }\n\n      /* The case {1,} is handled as the special case + */\n\n      else if (repeat_min == 1 && repeat_max == -1)\n        *code++ = OP_PLUS + repeat_type;\n\n      /* The case {n,n} is just an EXACT, while the general case {n,m} is\n      handled as an EXACT followed by an UPTO. An EXACT of 1 is optimized. */\n\n      else\n        {\n        if (repeat_min != 1)\n          {\n          *code++ = OP_EXACT + op_type;  /* NB EXACT doesn't have repeat_type */\n          *code++ = repeat_min >> 8;\n          *code++ = (repeat_min & 255);\n          }\n\n        /* If the mininum is 1 and the previous item was a character string,\n        we either have to put back the item that got cancelled if the string\n        length was 1, or add the character back onto the end of a longer\n        string. For a character type nothing need be done; it will just get\n        put back naturally. Note that the final character is always going to\n        get added below. */\n\n        else if (*previous == OP_CHARS)\n          {\n          if (code == previous) code += 2; else previous[1]++;\n          }\n\n        /*  For a single negated character we also have to put back the\n        item that got cancelled. */\n\n        else if (*previous == OP_NOT) code++;\n\n        /* If the maximum is unlimited, insert an OP_STAR. */\n\n        if (repeat_max < 0)\n          {\n          *code++ = c;\n          *code++ = OP_STAR + repeat_type;\n          }\n\n        /* Else insert an UPTO if the max is greater than the min. */\n\n        else if (repeat_max != repeat_min)\n          {\n          *code++ = c;\n          repeat_max -= repeat_min;\n          *code++ = OP_UPTO + repeat_type;\n          *code++ = repeat_max >> 8;\n          *code++ = (repeat_max & 255);\n          }\n        }\n\n      /* The character or character type itself comes last in all cases. */\n\n      *code++ = c;\n      }\n\n    /* If previous was a character class or a back reference, we put the repeat\n    stuff after it, but just skip the item if the repeat was {0,0}. */\n\n    else if (*previous == OP_CLASS || *previous == OP_REF)\n      {\n      if (repeat_max == 0)\n        {\n        code = previous;\n        goto END_REPEAT;\n        }\n      if (repeat_min == 0 && repeat_max == -1)\n        *code++ = OP_CRSTAR + repeat_type;\n      else if (repeat_min == 1 && repeat_max == -1)\n        *code++ = OP_CRPLUS + repeat_type;\n      else if (repeat_min == 0 && repeat_max == 1)\n        *code++ = OP_CRQUERY + repeat_type;\n      else\n        {\n        *code++ = OP_CRRANGE + repeat_type;\n        *code++ = repeat_min >> 8;\n        *code++ = repeat_min & 255;\n        if (repeat_max == -1) repeat_max = 0;  /* 2-byte encoding for max */\n        *code++ = repeat_max >> 8;\n        *code++ = repeat_max & 255;\n        }\n      }\n\n    /* If previous was a bracket group, we may have to replicate it in certain\n    cases. */\n\n    else if ((int)*previous >= OP_BRA || (int)*previous == OP_ONCE ||\n             (int)*previous == OP_COND)\n      {\n      register int i;\n      int ketoffset = 0;\n      int len = code - previous;\n      uschar *bralink = NULL;\n\n      /* If the maximum repeat count is unlimited, find the end of the bracket\n      by scanning through from the start, and compute the offset back to it\n      from the current code pointer. There may be an OP_OPT setting following\n      the final KET, so we can't find the end just by going back from the code\n      pointer. */\n\n      if (repeat_max == -1)\n        {\n        register uschar *ket = previous;\n        do ket += (ket[1] << 8) + ket[2]; while (*ket != OP_KET);\n        ketoffset = code - ket;\n        }\n\n      /* The case of a zero minimum is special because of the need to stick\n      OP_BRAZERO in front of it, and because the group appears once in the\n      data, whereas in other cases it appears the minimum number of times. For\n      this reason, it is simplest to treat this case separately, as otherwise\n      the code gets far too messy. There are several special subcases when the\n      minimum is zero. */\n\n      if (repeat_min == 0)\n        {\n        /* If we set up a required char from the bracket, we must back off\n        to the previous value and reset the countlits value too. */\n\n        if (subcountlits > 0)\n          {\n          *reqchar = prevreqchar;\n          *countlits -= subcountlits;\n          }\n\n        /* If the maximum is also zero, we just omit the group from the output\n        altogether. */\n\n        if (repeat_max == 0)\n          {\n          code = previous;\n          goto END_REPEAT;\n          }\n\n        /* If the maximum is 1 or unlimited, we just have to stick in the\n        BRAZERO and do no more at this point. */\n\n        if (repeat_max <= 1)\n          {\n          memmove(previous+1, previous, len);\n          code++;\n          *previous++ = OP_BRAZERO + repeat_type;\n          }\n\n        /* If the maximum is greater than 1 and limited, we have to replicate\n        in a nested fashion, sticking OP_BRAZERO before each set of brackets.\n        The first one has to be handled carefully because it's the original\n        copy, which has to be moved up. The remainder can be handled by code\n        that is common with the non-zero minimum case below. We just have to\n        adjust the value or repeat_max, since one less copy is required. */\n\n        else\n          {\n          int offset;\n          memmove(previous+4, previous, len);\n          code += 4;\n          *previous++ = OP_BRAZERO + repeat_type;\n          *previous++ = OP_BRA;\n\n          /* We chain together the bracket offset fields that have to be\n          filled in later when the ends of the brackets are reached. */\n\n          offset = (bralink == NULL)? 0 : previous - bralink;\n          bralink = previous;\n          *previous++ = offset >> 8;\n          *previous++ = offset & 255;\n          }\n\n        repeat_max--;\n        }\n\n      /* If the minimum is greater than zero, replicate the group as many\n      times as necessary, and adjust the maximum to the number of subsequent\n      copies that we need. */\n\n      else\n        {\n        for (i = 1; i < repeat_min; i++)\n          {\n          memcpy(code, previous, len);\n          code += len;\n          }\n        if (repeat_max > 0) repeat_max -= repeat_min;\n        }\n\n      /* This code is common to both the zero and non-zero minimum cases. If\n      the maximum is limited, it replicates the group in a nested fashion,\n      remembering the bracket starts on a stack. In the case of a zero minimum,\n      the first one was set up above. In all cases the repeat_max now specifies\n      the number of additional copies needed. */\n\n      if (repeat_max >= 0)\n        {\n        for (i = repeat_max - 1; i >= 0; i--)\n          {\n          *code++ = OP_BRAZERO + repeat_type;\n\n          /* All but the final copy start a new nesting, maintaining the\n          chain of brackets outstanding. */\n\n          if (i != 0)\n            {\n            int offset;\n            *code++ = OP_BRA;\n            offset = (bralink == NULL)? 0 : code - bralink;\n            bralink = code;\n            *code++ = offset >> 8;\n            *code++ = offset & 255;\n            }\n\n          memcpy(code, previous, len);\n          code += len;\n          }\n\n        /* Now chain through the pending brackets, and fill in their length\n        fields (which are holding the chain links pro tem). */\n\n        while (bralink != NULL)\n          {\n          int oldlinkoffset;\n          int offset = code - bralink + 1;\n          uschar *bra = code - offset;\n          oldlinkoffset = (bra[1] << 8) + bra[2];\n          bralink = (oldlinkoffset == 0)? NULL : bralink - oldlinkoffset;\n          *code++ = OP_KET;\n          *code++ = bra[1] = offset >> 8;\n          *code++ = bra[2] = (offset & 255);\n          }\n        }\n\n      /* If the maximum is unlimited, set a repeater in the final copy. We\n      can't just offset backwards from the current code point, because we\n      don't know if there's been an options resetting after the ket. The\n      correct offset was computed above. */\n\n      else code[-ketoffset] = OP_KETRMAX + repeat_type;\n      }\n\n    /* Else there's some kind of shambles */\n\n    else\n      {\n      *errorptr = ERR11;\n      goto FAILED;\n      }\n\n    /* In all case we no longer have a previous item. */\n\n    END_REPEAT:\n    previous = NULL;\n    break;\n\n\n    /* Start of nested bracket sub-expression, or comment or lookahead or\n    lookbehind or option setting or condition. First deal with special things\n    that can come after a bracket; all are introduced by ?, and the appearance\n    of any of them means that this is not a referencing group. They were\n    checked for validity in the first pass over the string, so we don't have to\n    check for syntax errors here.  */\n\n    case '(':\n    newoptions = options;\n    skipbytes = 0;\n\n    if (*(++ptr) == '?')\n      {\n      int set, unset;\n      int *optset;\n\n      switch (*(++ptr))\n        {\n        case '#':                 /* Comment; skip to ket */\n        ptr++;\n        while (*ptr != ')') ptr++;\n        continue;\n\n        case ':':                 /* Non-extracting bracket */\n        bravalue = OP_BRA;\n        ptr++;\n        break;\n\n        case '(':\n        bravalue = OP_COND;       /* Conditional group */\n        if ((cd->ctypes[*(++ptr)] & ctype_digit) != 0)\n          {\n          int condref = *ptr - '0';\n          while (*(++ptr) != ')') condref = condref*10 + *ptr - '0';\n          if (condref == 0)\n            {\n            *errorptr = ERR35;\n            goto FAILED;\n            }\n          ptr++;\n          code[3] = OP_CREF;\n          code[4] = condref >> 8;\n          code[5] = condref & 255;\n          skipbytes = 3;\n          }\n        else ptr--;\n        break;\n\n        case '=':                 /* Positive lookahead */\n        bravalue = OP_ASSERT;\n        ptr++;\n        break;\n\n        case '!':                 /* Negative lookahead */\n        bravalue = OP_ASSERT_NOT;\n        ptr++;\n        break;\n\n        case '<':                 /* Lookbehinds */\n        switch (*(++ptr))\n          {\n          case '=':               /* Positive lookbehind */\n          bravalue = OP_ASSERTBACK;\n          ptr++;\n          break;\n\n          case '!':               /* Negative lookbehind */\n          bravalue = OP_ASSERTBACK_NOT;\n          ptr++;\n          break;\n\n          default:                /* Syntax error */\n          *errorptr = ERR24;\n          goto FAILED;\n          }\n        break;\n\n        case '>':                 /* One-time brackets */\n        bravalue = OP_ONCE;\n        ptr++;\n        break;\n\n        case 'R':                 /* Pattern recursion */\n        *code++ = OP_RECURSE;\n        ptr++;\n        continue;\n\n        default:                  /* Option setting */\n        set = unset = 0;\n        optset = &set;\n\n        while (*ptr != ')' && *ptr != ':')\n          {\n          switch (*ptr++)\n            {\n            case '-': optset = &unset; break;\n\n            case 'i': *optset |= PCRE_CASELESS; break;\n            case 'm': *optset |= PCRE_MULTILINE; break;\n            case 's': *optset |= PCRE_DOTALL; break;\n            case 'x': *optset |= PCRE_EXTENDED; break;\n            case 'U': *optset |= PCRE_UNGREEDY; break;\n            case 'X': *optset |= PCRE_EXTRA; break;\n\n            default:\n            *errorptr = ERR12;\n            goto FAILED;\n            }\n          }\n\n        /* Set up the changed option bits, but don't change anything yet. */\n\n        newoptions = (options | set) & (~unset);\n\n        /* If the options ended with ')' this is not the start of a nested\n        group with option changes, so the options change at this level. At top\n        level there is nothing else to be done (the options will in fact have\n        been set from the start of compiling as a result of the first pass) but\n        at an inner level we must compile code to change the ims options if\n        necessary, and pass the new setting back so that it can be put at the\n        start of any following branches, and when this group ends, a resetting\n        item can be compiled. */\n\n        if (*ptr == ')')\n          {\n          if ((options & PCRE_INGROUP) != 0 &&\n              (options & PCRE_IMS) != (newoptions & PCRE_IMS))\n            {\n            *code++ = OP_OPT;\n            *code++ = *optchanged = newoptions & PCRE_IMS;\n            }\n          options = newoptions;  /* Change options at this level */\n          previous = NULL;       /* This item can't be repeated */\n          continue;              /* It is complete */\n          }\n\n        /* If the options ended with ':' we are heading into a nested group\n        with possible change of options. Such groups are non-capturing and are\n        not assertions of any kind. All we need to do is skip over the ':';\n        the newoptions value is handled below. */\n\n        bravalue = OP_BRA;\n        ptr++;\n        }\n      }\n\n    /* Else we have a referencing group; adjust the opcode. If the bracket\n    number is greater than EXTRACT_BASIC_MAX, we set the opcode one higher, and\n    arrange for the true number to follow later, in an OP_BRANUMBER item. */\n\n    else\n      {\n      if (++(*brackets) > EXTRACT_BASIC_MAX)\n        {\n        bravalue = OP_BRA + EXTRACT_BASIC_MAX + 1;\n        code[3] = OP_BRANUMBER;\n        code[4] = *brackets >> 8;\n        code[5] = *brackets & 255;\n        skipbytes = 3;\n        }\n      else bravalue = OP_BRA + *brackets;\n      }\n\n    /* Process nested bracketed re. Assertions may not be repeated, but other\n    kinds can be. We copy code into a non-register variable in order to be able\n    to pass its address because some compilers complain otherwise. Pass in a\n    new setting for the ims options if they have changed. */\n\n    previous = (bravalue >= OP_ONCE)? code : NULL;\n    *code = bravalue;\n    tempcode = code;\n\n    if (!compile_regex(\n         options | PCRE_INGROUP,       /* Set for all nested groups */\n         ((options & PCRE_IMS) != (newoptions & PCRE_IMS))?\n           newoptions & PCRE_IMS : -1, /* Pass ims options if changed */\n         brackets,                     /* Extracting bracket count */\n         &tempcode,                    /* Where to put code (updated) */\n         &ptr,                         /* Input pointer (updated) */\n         errorptr,                     /* Where to put an error message */\n         (bravalue == OP_ASSERTBACK ||\n          bravalue == OP_ASSERTBACK_NOT), /* TRUE if back assert */\n         skipbytes,                    /* Skip over OP_COND/OP_BRANUMBER */\n         &subreqchar,                  /* For possible last char */\n         &subcountlits,                /* For literal count */\n         cd))                          /* Tables block */\n      goto FAILED;\n\n    /* At the end of compiling, code is still pointing to the start of the\n    group, while tempcode has been updated to point past the end of the group\n    and any option resetting that may follow it. The pattern pointer (ptr)\n    is on the bracket. */\n\n    /* If this is a conditional bracket, check that there are no more than\n    two branches in the group. */\n\n    else if (bravalue == OP_COND)\n      {\n      uschar *tc = code;\n      condcount = 0;\n\n      do {\n         condcount++;\n         tc += (tc[1] << 8) | tc[2];\n         }\n      while (*tc != OP_KET);\n\n      if (condcount > 2)\n        {\n        *errorptr = ERR27;\n        goto FAILED;\n        }\n      }\n\n    /* Handle updating of the required character. If the subpattern didn't\n    set one, leave it as it was. Otherwise, update it for normal brackets of\n    all kinds, forward assertions, and conditions with two branches. Don't\n    update the literal count for forward assertions, however. If the bracket\n    is followed by a quantifier with zero repeat, we have to back off. Hence\n    the definition of prevreqchar and subcountlits outside the main loop so\n    that they can be accessed for the back off. */\n\n    if (subreqchar > 0 &&\n         (bravalue >= OP_BRA || bravalue == OP_ONCE || bravalue == OP_ASSERT ||\n         (bravalue == OP_COND && condcount == 2)))\n      {\n      prevreqchar = *reqchar;\n      *reqchar = subreqchar;\n      if (bravalue != OP_ASSERT) *countlits += subcountlits;\n      }\n\n    /* Now update the main code pointer to the end of the group. */\n\n    code = tempcode;\n\n    /* Error if hit end of pattern */\n\n    if (*ptr != ')')\n      {\n      *errorptr = ERR14;\n      goto FAILED;\n      }\n    break;\n\n    /* Check \\ for being a real metacharacter; if not, fall through and handle\n    it as a data character at the start of a string. Escape items are checked\n    for validity in the pre-compiling pass. */\n\n    case '\\\\':\n    tempptr = ptr;\n    c = check_escape(&ptr, errorptr, *brackets, options, FALSE, cd);\n\n    /* Handle metacharacters introduced by \\. For ones like \\d, the ESC_ values\n    are arranged to be the negation of the corresponding OP_values. For the\n    back references, the values are ESC_REF plus the reference number. Only\n    back references and those types that consume a character may be repeated.\n    We can test for values between ESC_b and ESC_Z for the latter; this may\n    have to change if any new ones are ever created. */\n\n    if (c < 0)\n      {\n      if (-c >= ESC_REF)\n        {\n        int number = -c - ESC_REF;\n        previous = code;\n        *code++ = OP_REF;\n        *code++ = number >> 8;\n        *code++ = number & 255;\n        }\n      else\n        {\n        previous = (-c > ESC_b && -c < ESC_Z)? code : NULL;\n        *code++ = -c;\n        }\n      continue;\n      }\n\n    /* Data character: reset and fall through */\n\n    ptr = tempptr;\n    c = '\\\\';\n\n    /* Handle a run of data characters until a metacharacter is encountered.\n    The first character is guaranteed not to be whitespace or # when the\n    extended flag is set. */\n\n    NORMAL_CHAR:\n    default:\n    previous = code;\n    *code = OP_CHARS;\n    code += 2;\n    length = 0;\n\n    do\n      {\n      if ((options & PCRE_EXTENDED) != 0)\n        {\n        if ((cd->ctypes[c] & ctype_space) != 0) continue;\n        if (c == '#')\n          {\n          /* The space before the ; is to avoid a warning on a silly compiler\n          on the Macintosh. */\n          while ((c = *(++ptr)) != 0 && c != NEWLINE) ;\n          if (c == 0) break;\n          continue;\n          }\n        }\n\n      /* Backslash may introduce a data char or a metacharacter. Escaped items\n      are checked for validity in the pre-compiling pass. Stop the string\n      before a metaitem. */\n\n      if (c == '\\\\')\n        {\n        tempptr = ptr;\n        c = check_escape(&ptr, errorptr, *brackets, options, FALSE, cd);\n        if (c < 0) { ptr = tempptr; break; }\n\n        /* If a character is > 127 in UTF-8 mode, we have to turn it into\n        two or more characters in the UTF-8 encoding. */\n\n#ifdef SUPPORT_UTF8\n        if (c > 127 && (options & PCRE_UTF8) != 0)\n          {\n          uschar buffer[8];\n          int len = ord2utf8(c, buffer);\n          for (c = 0; c < len; c++) *code++ = buffer[c];\n          length += len;\n          continue;\n          }\n#endif\n        }\n\n      /* Ordinary character or single-char escape */\n\n      *code++ = c;\n      length++;\n      }\n\n    /* This \"while\" is the end of the \"do\" above. */\n\n    while (length < MAXLIT && (cd->ctypes[c = *(++ptr)] & ctype_meta) == 0);\n\n    /* Update the last character and the count of literals */\n\n    prevreqchar = (length > 1)? code[-2] : *reqchar;\n    *reqchar = code[-1];\n    *countlits += length;\n\n    /* Compute the length and set it in the data vector, and advance to\n    the next state. */\n\n    previous[1] = length;\n    if (length < MAXLIT) ptr--;\n    break;\n    }\n  }                   /* end of big loop */\n\n/* Control never reaches here by falling through, only by a goto for all the\nerror states. Pass back the position in the pattern so that it can be displayed\nto the user for diagnosing the error. */\n\nFAILED:\n*ptrptr = ptr;\nreturn FALSE;\n}\n\n\n\n\n/*************************************************\n*     Compile sequence of alternatives           *\n*************************************************/\n\n/* On entry, ptr is pointing past the bracket character, but on return\nit points to the closing bracket, or vertical bar, or end of string.\nThe code variable is pointing at the byte into which the BRA operator has been\nstored. If the ims options are changed at the start (for a (?ims: group) or\nduring any branch, we need to insert an OP_OPT item at the start of every\nfollowing branch to ensure they get set correctly at run time, and also pass\nthe new options into every subsequent branch compile.\n\nArgument:\n  options     the option bits\n  optchanged  new ims options to set as if (?ims) were at the start, or -1\n               for no change\n  brackets    -> int containing the number of extracting brackets used\n  codeptr     -> the address of the current code pointer\n  ptrptr      -> the address of the current pattern pointer\n  errorptr    -> pointer to error message\n  lookbehind  TRUE if this is a lookbehind assertion\n  skipbytes   skip this many bytes at start (for OP_COND, OP_BRANUMBER)\n  reqchar     -> place to put the last required character, or a negative number\n  countlits   -> place to put the shortest literal count of any branch\n  cd          points to the data block with tables pointers\n\nReturns:      TRUE on success\n*/\n\nstatic BOOL\ncompile_regex(int options, int optchanged, int *brackets, uschar **codeptr,\n  const uschar **ptrptr, const char **errorptr, BOOL lookbehind, int skipbytes,\n  int *reqchar, int *countlits, compile_data *cd)\n{\nconst uschar *ptr = *ptrptr;\nuschar *code = *codeptr;\nuschar *last_branch = code;\nuschar *start_bracket = code;\nuschar *reverse_count = NULL;\nint oldoptions = options & PCRE_IMS;\nint branchreqchar, branchcountlits;\n\n*reqchar = -1;\n*countlits = INT_MAX;\ncode += 3 + skipbytes;\n\n/* Loop for each alternative branch */\n\nfor (;;)\n  {\n  int length;\n\n  /* Handle change of options */\n\n  if (optchanged >= 0)\n    {\n    *code++ = OP_OPT;\n    *code++ = optchanged;\n    options = (options & ~PCRE_IMS) | optchanged;\n    }\n\n  /* Set up dummy OP_REVERSE if lookbehind assertion */\n\n  if (lookbehind)\n    {\n    *code++ = OP_REVERSE;\n    reverse_count = code;\n    *code++ = 0;\n    *code++ = 0;\n    }\n\n  /* Now compile the branch */\n\n  if (!compile_branch(options, brackets, &code, &ptr, errorptr, &optchanged,\n      &branchreqchar, &branchcountlits, cd))\n    {\n    *ptrptr = ptr;\n    return FALSE;\n    }\n\n  /* Fill in the length of the last branch */\n\n  length = code - last_branch;\n  last_branch[1] = length >> 8;\n  last_branch[2] = length & 255;\n\n  /* Save the last required character if all branches have the same; a current\n  value of -1 means unset, while -2 means \"previous branch had no last required\n  char\".  */\n\n  if (*reqchar != -2)\n    {\n    if (branchreqchar >= 0)\n      {\n      if (*reqchar == -1) *reqchar = branchreqchar;\n      else if (*reqchar != branchreqchar) *reqchar = -2;\n      }\n    else *reqchar = -2;\n    }\n\n  /* Keep the shortest literal count */\n\n  if (branchcountlits < *countlits) *countlits = branchcountlits;\n  DPRINTF((\"literal count = %d min=%d\\n\", branchcountlits, *countlits));\n\n  /* If lookbehind, check that this branch matches a fixed-length string,\n  and put the length into the OP_REVERSE item. Temporarily mark the end of\n  the branch with OP_END. */\n\n  if (lookbehind)\n    {\n    *code = OP_END;\n    length = find_fixedlength(last_branch, options);\n    DPRINTF((\"fixed length = %d\\n\", length));\n    if (length < 0)\n      {\n      *errorptr = ERR25;\n      *ptrptr = ptr;\n      return FALSE;\n      }\n    reverse_count[0] = (length >> 8);\n    reverse_count[1] = length & 255;\n    }\n\n  /* Reached end of expression, either ')' or end of pattern. Insert a\n  terminating ket and the length of the whole bracketed item, and return,\n  leaving the pointer at the terminating char. If any of the ims options\n  were changed inside the group, compile a resetting op-code following. */\n\n  if (*ptr != '|')\n    {\n    length = code - start_bracket;\n    *code++ = OP_KET;\n    *code++ = length >> 8;\n    *code++ = length & 255;\n    if (optchanged >= 0)\n      {\n      *code++ = OP_OPT;\n      *code++ = oldoptions;\n      }\n    *codeptr = code;\n    *ptrptr = ptr;\n    return TRUE;\n    }\n\n  /* Another branch follows; insert an \"or\" node and advance the pointer. */\n\n  *code = OP_ALT;\n  last_branch = code;\n  code += 3;\n  ptr++;\n  }\n/* Control never reaches here */\n}\n\n\n\n\n/*************************************************\n*      Find first significant op code            *\n*************************************************/\n\n/* This is called by several functions that scan a compiled expression looking\nfor a fixed first character, or an anchoring op code etc. It skips over things\nthat do not influence this. For one application, a change of caseless option is\nimportant.\n\nArguments:\n  code       pointer to the start of the group\n  options    pointer to external options\n  optbit     the option bit whose changing is significant, or\n             zero if none are\n  optstop    TRUE to return on option change, otherwise change the options\n               value and continue\n\nReturns:     pointer to the first significant opcode\n*/\n\nstatic const uschar*\nfirst_significant_code(const uschar *code, int *options, int optbit,\n  BOOL optstop)\n{\nfor (;;)\n  {\n  switch ((int)*code)\n    {\n    case OP_OPT:\n    if (optbit > 0 && ((int)code[1] & optbit) != (*options & optbit))\n      {\n      if (optstop) return code;\n      *options = (int)code[1];\n      }\n    code += 2;\n    break;\n\n    case OP_CREF:\n    case OP_BRANUMBER:\n    code += 3;\n    break;\n\n    case OP_WORD_BOUNDARY:\n    case OP_NOT_WORD_BOUNDARY:\n    code++;\n    break;\n\n    case OP_ASSERT_NOT:\n    case OP_ASSERTBACK:\n    case OP_ASSERTBACK_NOT:\n    do code += (code[1] << 8) + code[2]; while (*code == OP_ALT);\n    code += 3;\n    break;\n\n    default:\n    return code;\n    }\n  }\n/* Control never reaches here */\n}\n\n\n\n\n/*************************************************\n*          Check for anchored expression         *\n*************************************************/\n\n/* Try to find out if this is an anchored regular expression. Consider each\nalternative branch. If they all start with OP_SOD or OP_CIRC, or with a bracket\nall of whose alternatives start with OP_SOD or OP_CIRC (recurse ad lib), then\nit's anchored. However, if this is a multiline pattern, then only OP_SOD\ncounts, since OP_CIRC can match in the middle.\n\nA branch is also implicitly anchored if it starts with .* and DOTALL is set,\nbecause that will try the rest of the pattern at all possible matching points,\nso there is no point trying them again.\n\nArguments:\n  code       points to start of expression (the bracket)\n  options    points to the options setting\n\nReturns:     TRUE or FALSE\n*/\n\nstatic BOOL\nis_anchored(register const uschar *code, int *options)\n{\ndo {\n   const uschar *scode = first_significant_code(code + 3, options,\n     PCRE_MULTILINE, FALSE);\n   register int op = *scode;\n   if (op >= OP_BRA || op == OP_ASSERT || op == OP_ONCE || op == OP_COND)\n     { if (!is_anchored(scode, options)) return FALSE; }\n   else if ((op == OP_TYPESTAR || op == OP_TYPEMINSTAR) &&\n            (*options & PCRE_DOTALL) != 0)\n     { if (scode[1] != OP_ANY) return FALSE; }\n   else if (op != OP_SOD &&\n           ((*options & PCRE_MULTILINE) != 0 || op != OP_CIRC))\n     return FALSE;\n   code += (code[1] << 8) + code[2];\n   }\nwhile (*code == OP_ALT);\nreturn TRUE;\n}\n\n\n\n/*************************************************\n*         Check for starting with ^ or .*        *\n*************************************************/\n\n/* This is called to find out if every branch starts with ^ or .* so that\n\"first char\" processing can be done to speed things up in multiline\nmatching and for non-DOTALL patterns that start with .* (which must start at\nthe beginning or after \\n).\n\nArgument:  points to start of expression (the bracket)\nReturns:   TRUE or FALSE\n*/\n\nstatic BOOL\nis_startline(const uschar *code)\n{\ndo {\n   const uschar *scode = first_significant_code(code + 3, NULL, 0, FALSE);\n   register int op = *scode;\n   if (op >= OP_BRA || op == OP_ASSERT || op == OP_ONCE || op == OP_COND)\n     { if (!is_startline(scode)) return FALSE; }\n   else if (op == OP_TYPESTAR || op == OP_TYPEMINSTAR)\n     { if (scode[1] != OP_ANY) return FALSE; }\n   else if (op != OP_CIRC) return FALSE;\n   code += (code[1] << 8) + code[2];\n   }\nwhile (*code == OP_ALT);\nreturn TRUE;\n}\n\n\n\n/*************************************************\n*          Check for fixed first char            *\n*************************************************/\n\n/* Try to find out if there is a fixed first character. This is called for\nunanchored expressions, as it speeds up their processing quite considerably.\nConsider each alternative branch. If they all start with the same char, or with\na bracket all of whose alternatives start with the same char (recurse ad lib),\nthen we return that char, otherwise -1.\n\nArguments:\n  code       points to start of expression (the bracket)\n  options    pointer to the options (used to check casing changes)\n\nReturns:     -1 or the fixed first char\n*/\n\nstatic int\nfind_firstchar(const uschar *code, int *options)\n{\nregister int c = -1;\ndo {\n   int d;\n   const uschar *scode = first_significant_code(code + 3, options,\n     PCRE_CASELESS, TRUE);\n   register int op = *scode;\n\n   if (op >= OP_BRA) op = OP_BRA;\n\n   switch(op)\n     {\n     default:\n     return -1;\n\n     case OP_BRA:\n     case OP_ASSERT:\n     case OP_ONCE:\n     case OP_COND:\n     if ((d = find_firstchar(scode, options)) < 0) return -1;\n     if (c < 0) c = d; else if (c != d) return -1;\n     break;\n\n     case OP_EXACT:       /* Fall through */\n     scode++;\n\n     case OP_CHARS:       /* Fall through */\n     scode++;\n\n     case OP_PLUS:\n     case OP_MINPLUS:\n     if (c < 0) c = scode[1]; else if (c != scode[1]) return -1;\n     break;\n     }\n\n   code += (code[1] << 8) + code[2];\n   }\nwhile (*code == OP_ALT);\nreturn c;\n}\n\n\n\n\n\n/*************************************************\n*        Compile a Regular Expression            *\n*************************************************/\n\n/* This function takes a string and returns a pointer to a block of store\nholding a compiled version of the expression.\n\nArguments:\n  pattern      the regular expression\n  options      various option bits\n  errorptr     pointer to pointer to error text\n  erroroffset  ptr offset in pattern where error was detected\n  tables       pointer to character tables or NULL\n\nReturns:       pointer to compiled data block, or NULL on error,\n               with errorptr and erroroffset set\n*/\n\npcre *\npcre_compile(const char *pattern, int options, const char **errorptr,\n  int *erroroffset, const unsigned char *tables)\n{\nreal_pcre *re;\nint length = 3;      /* For initial BRA plus length */\nint runlength;\nint c, reqchar, countlits;\nint bracount = 0;\nint top_backref = 0;\nint branch_extra = 0;\nint branch_newextra;\nunsigned int brastackptr = 0;\nsize_t size;\nuschar *code;\nconst uschar *ptr;\ncompile_data compile_block;\nint brastack[BRASTACK_SIZE];\nuschar bralenstack[BRASTACK_SIZE];\n\n#ifdef DEBUG\nuschar *code_base, *code_end;\n#endif\n\n/* Can't support UTF8 unless PCRE has been compiled to include the code. */\n\n#ifndef SUPPORT_UTF8\nif ((options & PCRE_UTF8) != 0)\n  {\n  *errorptr = ERR32;\n  return NULL;\n  }\n#endif\n\n/* We can't pass back an error message if errorptr is NULL; I guess the best we\ncan do is just return NULL. */\n\nif (errorptr == NULL) return NULL;\n*errorptr = NULL;\n\n/* However, we can give a message for this error */\n\nif (erroroffset == NULL)\n  {\n  *errorptr = ERR16;\n  return NULL;\n  }\n*erroroffset = 0;\n\nif ((options & ~PUBLIC_OPTIONS) != 0)\n  {\n  *errorptr = ERR17;\n  return NULL;\n  }\n\n/* Set up pointers to the individual character tables */\n\nif (tables == NULL) tables = pcre_default_tables;\ncompile_block.lcc = tables + lcc_offset;\ncompile_block.fcc = tables + fcc_offset;\ncompile_block.cbits = tables + cbits_offset;\ncompile_block.ctypes = tables + ctypes_offset;\n\n/* Reflect pattern for debugging output */\n\nDPRINTF((\"------------------------------------------------------------------\\n\"));\nDPRINTF((\"%s\\n\", pattern));\n\n/* The first thing to do is to make a pass over the pattern to compute the\namount of store required to hold the compiled code. This does not have to be\nperfect as long as errors are overestimates. At the same time we can detect any\ninternal flag settings. Make an attempt to correct for any counted white space\nif an \"extended\" flag setting appears late in the pattern. We can't be so\nclever for #-comments. */\n\nptr = (const uschar *)(pattern - 1);\nwhile ((c = *(++ptr)) != 0)\n  {\n  int min, max;\n  int class_charcount;\n  int bracket_length;\n\n  if ((options & PCRE_EXTENDED) != 0)\n    {\n    if ((compile_block.ctypes[c] & ctype_space) != 0) continue;\n    if (c == '#')\n      {\n      /* The space before the ; is to avoid a warning on a silly compiler\n      on the Macintosh. */\n      while ((c = *(++ptr)) != 0 && c != NEWLINE) ;\n      continue;\n      }\n    }\n\n  switch(c)\n    {\n    /* A backslashed item may be an escaped \"normal\" character or a\n    character type. For a \"normal\" character, put the pointers and\n    character back so that tests for whitespace etc. in the input\n    are done correctly. */\n\n    case '\\\\':\n      {\n      const uschar *save_ptr = ptr;\n      c = check_escape(&ptr, errorptr, bracount, options, FALSE, &compile_block);\n      if (*errorptr != NULL) goto PCRE_ERROR_RETURN;\n      if (c >= 0)\n        {\n        ptr = save_ptr;\n        c = '\\\\';\n        goto NORMAL_CHAR;\n        }\n      }\n    length++;\n\n    /* A back reference needs an additional 2 bytes, plus either one or 5\n    bytes for a repeat. We also need to keep the value of the highest\n    back reference. */\n\n    if (c <= -ESC_REF)\n      {\n      int refnum = -c - ESC_REF;\n      if (refnum > top_backref) top_backref = refnum;\n      length += 2;   /* For single back reference */\n      if (ptr[1] == '{' && is_counted_repeat(ptr+2, &compile_block))\n        {\n        ptr = read_repeat_counts(ptr+2, &min, &max, errorptr, &compile_block);\n        if (*errorptr != NULL) goto PCRE_ERROR_RETURN;\n        if ((min == 0 && (max == 1 || max == -1)) ||\n          (min == 1 && max == -1))\n            length++;\n        else length += 5;\n        if (ptr[1] == '?') ptr++;\n        }\n      }\n    continue;\n\n    case '^':\n    case '.':\n    case '$':\n    case '*':     /* These repeats won't be after brackets; */\n    case '+':     /* those are handled separately */\n    case '?':\n    length++;\n    continue;\n\n    /* This covers the cases of repeats after a single char, metachar, class,\n    or back reference. */\n\n    case '{':\n    if (!is_counted_repeat(ptr+1, &compile_block)) goto NORMAL_CHAR;\n    ptr = read_repeat_counts(ptr+1, &min, &max, errorptr, &compile_block);\n    if (*errorptr != NULL) goto PCRE_ERROR_RETURN;\n    if ((min == 0 && (max == 1 || max == -1)) ||\n      (min == 1 && max == -1))\n        length++;\n    else\n      {\n      length--;   /* Uncount the original char or metachar */\n      if (min == 1) length++; else if (min > 0) length += 4;\n      if (max > 0) length += 4; else length += 2;\n      }\n    if (ptr[1] == '?') ptr++;\n    continue;\n\n    /* An alternation contains an offset to the next branch or ket. If any ims\n    options changed in the previous branch(es), and/or if we are in a\n    lookbehind assertion, extra space will be needed at the start of the\n    branch. This is handled by branch_extra. */\n\n    case '|':\n    length += 3 + branch_extra;\n    continue;\n\n    /* A character class uses 33 characters. Don't worry about character types\n    that aren't allowed in classes - they'll get picked up during the compile.\n    A character class that contains only one character uses 2 or 3 bytes,\n    depending on whether it is negated or not. Notice this where we can. */\n\n    case '[':\n    class_charcount = 0;\n    if (*(++ptr) == '^') ptr++;\n    do\n      {\n      if (*ptr == '\\\\')\n        {\n        int ch = check_escape(&ptr, errorptr, bracount, options, TRUE,\n          &compile_block);\n        if (*errorptr != NULL) goto PCRE_ERROR_RETURN;\n        if (-ch == ESC_b) class_charcount++; else class_charcount = 10;\n        }\n      else class_charcount++;\n      ptr++;\n      }\n    while (*ptr != 0 && *ptr != ']');\n\n    /* Repeats for negated single chars are handled by the general code */\n\n    if (class_charcount == 1) length += 3; else\n      {\n      length += 33;\n\n      /* A repeat needs either 1 or 5 bytes. */\n\n      if (*ptr != 0 && ptr[1] == '{' && is_counted_repeat(ptr+2, &compile_block))\n        {\n        ptr = read_repeat_counts(ptr+2, &min, &max, errorptr, &compile_block);\n        if (*errorptr != NULL) goto PCRE_ERROR_RETURN;\n        if ((min == 0 && (max == 1 || max == -1)) ||\n          (min == 1 && max == -1))\n            length++;\n        else length += 5;\n        if (ptr[1] == '?') ptr++;\n        }\n      }\n    continue;\n\n    /* Brackets may be genuine groups or special things */\n\n    case '(':\n    branch_newextra = 0;\n    bracket_length = 3;\n\n    /* Handle special forms of bracket, which all start (? */\n\n    if (ptr[1] == '?')\n      {\n      int set, unset;\n      int *optset;\n\n      switch (c = ptr[2])\n        {\n        /* Skip over comments entirely */\n        case '#':\n        ptr += 3;\n        while (*ptr != 0 && *ptr != ')') ptr++;\n        if (*ptr == 0)\n          {\n          *errorptr = ERR18;\n          goto PCRE_ERROR_RETURN;\n          }\n        continue;\n\n        /* Non-referencing groups and lookaheads just move the pointer on, and\n        then behave like a non-special bracket, except that they don't increment\n        the count of extracting brackets. Ditto for the \"once only\" bracket,\n        which is in Perl from version 5.005. */\n\n        case ':':\n        case '=':\n        case '!':\n        case '>':\n        ptr += 2;\n        break;\n\n        /* A recursive call to the regex is an extension, to provide the\n        facility which can be obtained by $(?p{perl-code}) in Perl 5.6. */\n\n        case 'R':\n        if (ptr[3] != ')')\n          {\n          *errorptr = ERR29;\n          goto PCRE_ERROR_RETURN;\n          }\n        ptr += 3;\n        length += 1;\n        break;\n\n        /* Lookbehinds are in Perl from version 5.005 */\n\n        case '<':\n        if (ptr[3] == '=' || ptr[3] == '!')\n          {\n          ptr += 3;\n          branch_newextra = 3;\n          length += 3;         /* For the first branch */\n          break;\n          }\n        *errorptr = ERR24;\n        goto PCRE_ERROR_RETURN;\n\n        /* Conditionals are in Perl from version 5.005. The bracket must either\n        be followed by a number (for bracket reference) or by an assertion\n        group. */\n\n        case '(':\n        if ((compile_block.ctypes[ptr[3]] & ctype_digit) != 0)\n          {\n          ptr += 4;\n          length += 3;\n          while ((compile_block.ctypes[*ptr] & ctype_digit) != 0) ptr++;\n          if (*ptr != ')')\n            {\n            *errorptr = ERR26;\n            goto PCRE_ERROR_RETURN;\n            }\n          }\n        else   /* An assertion must follow */\n          {\n          ptr++;   /* Can treat like ':' as far as spacing is concerned */\n          if (ptr[2] != '?' ||\n             (ptr[3] != '=' && ptr[3] != '!' && ptr[3] != '<') )\n            {\n            ptr += 2;    /* To get right offset in message */\n            *errorptr = ERR28;\n            goto PCRE_ERROR_RETURN;\n            }\n          }\n        break;\n\n        /* Else loop checking valid options until ) is met. Anything else is an\n        error. If we are without any brackets, i.e. at top level, the settings\n        act as if specified in the options, so massage the options immediately.\n        This is for backward compatibility with Perl 5.004. */\n\n        default:\n        set = unset = 0;\n        optset = &set;\n        ptr += 2;\n\n        for (;; ptr++)\n          {\n          c = *ptr;\n          switch (c)\n            {\n            case 'i':\n            *optset |= PCRE_CASELESS;\n            continue;\n\n            case 'm':\n            *optset |= PCRE_MULTILINE;\n            continue;\n\n            case 's':\n            *optset |= PCRE_DOTALL;\n            continue;\n\n            case 'x':\n            *optset |= PCRE_EXTENDED;\n            continue;\n\n            case 'X':\n            *optset |= PCRE_EXTRA;\n            continue;\n\n            case 'U':\n            *optset |= PCRE_UNGREEDY;\n            continue;\n\n            case '-':\n            optset = &unset;\n            continue;\n\n            /* A termination by ')' indicates an options-setting-only item;\n            this is global at top level; otherwise nothing is done here and\n            it is handled during the compiling process on a per-bracket-group\n            basis. */\n\n            case ')':\n            if (brastackptr == 0)\n              {\n              options = (options | set) & (~unset);\n              set = unset = 0;     /* To save length */\n              }\n            /* Fall through */\n\n            /* A termination by ':' indicates the start of a nested group with\n            the given options set. This is again handled at compile time, but\n            we must allow for compiled space if any of the ims options are\n            set. We also have to allow for resetting space at the end of\n            the group, which is why 4 is added to the length and not just 2.\n            If there are several changes of options within the same group, this\n            will lead to an over-estimate on the length, but this shouldn't\n            matter very much. We also have to allow for resetting options at\n            the start of any alternations, which we do by setting\n            branch_newextra to 2. Finally, we record whether the case-dependent\n            flag ever changes within the regex. This is used by the \"required\n            character\" code. */\n\n            case ':':\n            if (((set|unset) & PCRE_IMS) != 0)\n              {\n              length += 4;\n              branch_newextra = 2;\n              if (((set|unset) & PCRE_CASELESS) != 0) options |= PCRE_ICHANGED;\n              }\n            goto END_OPTIONS;\n\n            /* Unrecognized option character */\n\n            default:\n            *errorptr = ERR12;\n            goto PCRE_ERROR_RETURN;\n            }\n          }\n\n        /* If we hit a closing bracket, that's it - this is a freestanding\n        option-setting. We need to ensure that branch_extra is updated if\n        necessary. The only values branch_newextra can have here are 0 or 2.\n        If the value is 2, then branch_extra must either be 2 or 5, depending\n        on whether this is a lookbehind group or not. */\n\n        END_OPTIONS:\n        if (c == ')')\n          {\n          if (branch_newextra == 2 && (branch_extra == 0 || branch_extra == 3))\n            branch_extra += branch_newextra;\n          continue;\n          }\n\n        /* If options were terminated by ':' control comes here. Fall through\n        to handle the group below. */\n        }\n      }\n\n    /* Extracting brackets must be counted so we can process escapes in a\n    Perlish way. If the number exceeds EXTRACT_BASIC_MAX we are going to\n    need an additional 3 bytes of store per extracting bracket. */\n\n    else\n      {\n      bracount++;\n      if (bracount > EXTRACT_BASIC_MAX) bracket_length += 3;\n      }\n\n    /* Save length for computing whole length at end if there's a repeat that\n    requires duplication of the group. Also save the current value of\n    branch_extra, and start the new group with the new value. If non-zero, this\n    will either be 2 for a (?imsx: group, or 3 for a lookbehind assertion. */\n\n    if (brastackptr >= sizeof(brastack)/sizeof(int))\n      {\n      *errorptr = ERR19;\n      goto PCRE_ERROR_RETURN;\n      }\n\n    bralenstack[brastackptr] = branch_extra;\n    branch_extra = branch_newextra;\n\n    brastack[brastackptr++] = length;\n    length += bracket_length;\n    continue;\n\n    /* Handle ket. Look for subsequent max/min; for certain sets of values we\n    have to replicate this bracket up to that many times. If brastackptr is\n    0 this is an unmatched bracket which will generate an error, but take care\n    not to try to access brastack[-1] when computing the length and restoring\n    the branch_extra value. */\n\n    case ')':\n    length += 3;\n      {\n      int minval = 1;\n      int maxval = 1;\n      int duplength;\n\n      if (brastackptr > 0)\n        {\n        duplength = length - brastack[--brastackptr];\n        branch_extra = bralenstack[brastackptr];\n        }\n      else duplength = 0;\n\n      /* Leave ptr at the final char; for read_repeat_counts this happens\n      automatically; for the others we need an increment. */\n\n      if ((c = ptr[1]) == '{' && is_counted_repeat(ptr+2, &compile_block))\n        {\n        ptr = read_repeat_counts(ptr+2, &minval, &maxval, errorptr,\n          &compile_block);\n        if (*errorptr != NULL) goto PCRE_ERROR_RETURN;\n        }\n      else if (c == '*') { minval = 0; maxval = -1; ptr++; }\n      else if (c == '+') { maxval = -1; ptr++; }\n      else if (c == '?') { minval = 0; ptr++; }\n\n      /* If the minimum is zero, we have to allow for an OP_BRAZERO before the\n      group, and if the maximum is greater than zero, we have to replicate\n      maxval-1 times; each replication acquires an OP_BRAZERO plus a nesting\n      bracket set - hence the 7. */\n\n      if (minval == 0)\n        {\n        length++;\n        if (maxval > 0) length += (maxval - 1) * (duplength + 7);\n        }\n\n      /* When the minimum is greater than zero, 1 we have to replicate up to\n      minval-1 times, with no additions required in the copies. Then, if\n      there is a limited maximum we have to replicate up to maxval-1 times\n      allowing for a BRAZERO item before each optional copy and nesting\n      brackets for all but one of the optional copies. */\n\n      else\n        {\n        length += (minval - 1) * duplength;\n        if (maxval > minval)   /* Need this test as maxval=-1 means no limit */\n          length += (maxval - minval) * (duplength + 7) - 6;\n        }\n      }\n    continue;\n\n    /* Non-special character. For a run of such characters the length required\n    is the number of characters + 2, except that the maximum run length is 255.\n    We won't get a skipped space or a non-data escape or the start of a #\n    comment as the first character, so the length can't be zero. */\n\n    NORMAL_CHAR:\n    default:\n    length += 2;\n    runlength = 0;\n    do\n      {\n      if ((options & PCRE_EXTENDED) != 0)\n        {\n        if ((compile_block.ctypes[c] & ctype_space) != 0) continue;\n        if (c == '#')\n          {\n          /* The space before the ; is to avoid a warning on a silly compiler\n          on the Macintosh. */\n          while ((c = *(++ptr)) != 0 && c != NEWLINE) ;\n          continue;\n          }\n        }\n\n      /* Backslash may introduce a data char or a metacharacter; stop the\n      string before the latter. */\n\n      if (c == '\\\\')\n        {\n        const uschar *saveptr = ptr;\n        c = check_escape(&ptr, errorptr, bracount, options, FALSE,\n          &compile_block);\n        if (*errorptr != NULL) goto PCRE_ERROR_RETURN;\n        if (c < 0) { ptr = saveptr; break; }\n\n#ifdef SUPPORT_UTF8\n        if (c > 127 && (options & PCRE_UTF8) != 0)\n          {\n          int i;\n          for (i = 0; i < sizeof(utf8_table1)/sizeof(int); i++)\n            if (c <= utf8_table1[i]) break;\n          runlength += i;\n          }\n#endif\n        }\n\n      /* Ordinary character or single-char escape */\n\n      runlength++;\n      }\n\n    /* This \"while\" is the end of the \"do\" above. */\n\n    while (runlength < MAXLIT &&\n      (compile_block.ctypes[c = *(++ptr)] & ctype_meta) == 0);\n\n    ptr--;\n    length += runlength;\n    continue;\n    }\n  }\n\nlength += 4;    /* For final KET and END */\n\nif (length > 65539)\n  {\n  *errorptr = ERR20;\n  return NULL;\n  }\n\n/* Compute the size of data block needed and get it, either from malloc or\nexternally provided function. We specify \"code[0]\" in the offsetof() expression\nrather than just \"code\", because it has been reported that one broken compiler\nfails on \"code\" because it is also an independent variable. It should make no\ndifference to the value of the offsetof(). */\n\nsize = length + offsetof(real_pcre, code[0]);\nre = (real_pcre *)(pcre_malloc)(size);\n\nif (re == NULL)\n  {\n  *errorptr = ERR21;\n  return NULL;\n  }\n\n/* Put in the magic number, and save the size, options, and table pointer */\n\nre->magic_number = MAGIC_NUMBER;\nre->size = size;\nre->options = options;\nre->tables = tables;\n\n/* Set up a starting, non-extracting bracket, then compile the expression. On\nerror, *errorptr will be set non-NULL, so we don't need to look at the result\nof the function here. */\n\nptr = (const uschar *)pattern;\ncode = re->code;\n*code = OP_BRA;\nbracount = 0;\n(void)compile_regex(options, -1, &bracount, &code, &ptr, errorptr, FALSE, 0,\n  &reqchar, &countlits, &compile_block);\nre->top_bracket = bracount;\nre->top_backref = top_backref;\n\n/* If not reached end of pattern on success, there's an excess bracket. */\n\nif (*errorptr == NULL && *ptr != 0) *errorptr = ERR22;\n\n/* Fill in the terminating state and check for disastrous overflow, but\nif debugging, leave the test till after things are printed out. */\n\n*code++ = OP_END;\n\n#ifndef DEBUG\nif (code - re->code > length) *errorptr = ERR23;\n#endif\n\n/* Give an error if there's back reference to a non-existent capturing\nsubpattern. */\n\nif (top_backref > re->top_bracket) *errorptr = ERR15;\n\n/* Failed to compile */\n\nif (*errorptr != NULL)\n  {\n  (pcre_free)(re);\n  PCRE_ERROR_RETURN:\n  *erroroffset = ptr - (const uschar *)pattern;\n  return NULL;\n  }\n\n/* If the anchored option was not passed, set flag if we can determine that the\npattern is anchored by virtue of ^ characters or \\A or anything else (such as\nstarting with .* when DOTALL is set).\n\nOtherwise, see if we can determine what the first character has to be, because\nthat speeds up unanchored matches no end. If not, see if we can set the\nPCRE_STARTLINE flag. This is helpful for multiline matches when all branches\nstart with ^. and also when all branches start with .* for non-DOTALL matches.\n*/\n\nif ((options & PCRE_ANCHORED) == 0)\n  {\n  int temp_options = options;\n  if (is_anchored(re->code, &temp_options))\n    re->options |= PCRE_ANCHORED;\n  else\n    {\n    int ch = find_firstchar(re->code, &temp_options);\n    if (ch >= 0)\n      {\n      re->first_char = ch;\n      re->options |= PCRE_FIRSTSET;\n      }\n    else if (is_startline(re->code))\n      re->options |= PCRE_STARTLINE;\n    }\n  }\n\n/* Save the last required character if there are at least two literal\ncharacters on all paths, or if there is no first character setting. */\n\nif (reqchar >= 0 && (countlits > 1 || (re->options & PCRE_FIRSTSET) == 0))\n  {\n  re->req_char = reqchar;\n  re->options |= PCRE_REQCHSET;\n  }\n\n/* Print out the compiled data for debugging */\n\n#ifdef DEBUG\n\nprintf(\"Length = %d top_bracket = %d top_backref = %d\\n\",\n  length, re->top_bracket, re->top_backref);\n\nif (re->options != 0)\n  {\n  printf(\"%s%s%s%s%s%s%s%s%s\\n\",\n    ((re->options & PCRE_ANCHORED) != 0)? \"anchored \" : \"\",\n    ((re->options & PCRE_CASELESS) != 0)? \"caseless \" : \"\",\n    ((re->options & PCRE_ICHANGED) != 0)? \"case state changed \" : \"\",\n    ((re->options & PCRE_EXTENDED) != 0)? \"extended \" : \"\",\n    ((re->options & PCRE_MULTILINE) != 0)? \"multiline \" : \"\",\n    ((re->options & PCRE_DOTALL) != 0)? \"dotall \" : \"\",\n    ((re->options & PCRE_DOLLAR_ENDONLY) != 0)? \"endonly \" : \"\",\n    ((re->options & PCRE_EXTRA) != 0)? \"extra \" : \"\",\n    ((re->options & PCRE_UNGREEDY) != 0)? \"ungreedy \" : \"\");\n  }\n\nif ((re->options & PCRE_FIRSTSET) != 0)\n  {\n  if (isprint(re->first_char)) printf(\"First char = %c\\n\", re->first_char);\n    else printf(\"First char = \\\\x%02x\\n\", re->first_char);\n  }\n\nif ((re->options & PCRE_REQCHSET) != 0)\n  {\n  if (isprint(re->req_char)) printf(\"Req char = %c\\n\", re->req_char);\n    else printf(\"Req char = \\\\x%02x\\n\", re->req_char);\n  }\n\ncode_end = code;\ncode_base = code = re->code;\n\nwhile (code < code_end)\n  {\n  int charlength;\n\n  printf(\"%3d \", code - code_base);\n\n  if (*code >= OP_BRA)\n    {\n    if (*code - OP_BRA > EXTRACT_BASIC_MAX)\n      printf(\"%3d Bra extra\", (code[1] << 8) + code[2]);\n    else\n      printf(\"%3d Bra %d\", (code[1] << 8) + code[2], *code - OP_BRA);\n    code += 2;\n    }\n\n  else switch(*code)\n    {\n    case OP_OPT:\n    printf(\" %.2x %s\", code[1], OP_names[*code]);\n    code++;\n    break;\n\n    case OP_CHARS:\n    charlength = *(++code);\n    printf(\"%3d \", charlength);\n    while (charlength-- > 0)\n      if (isprint(c = *(++code))) printf(\"%c\", c); else printf(\"\\\\x%02x\", c);\n    break;\n\n    case OP_KETRMAX:\n    case OP_KETRMIN:\n    case OP_ALT:\n    case OP_KET:\n    case OP_ASSERT:\n    case OP_ASSERT_NOT:\n    case OP_ASSERTBACK:\n    case OP_ASSERTBACK_NOT:\n    case OP_ONCE:\n    case OP_REVERSE:\n    case OP_BRANUMBER:\n    case OP_COND:\n    case OP_CREF:\n    printf(\"%3d %s\", (code[1] << 8) + code[2], OP_names[*code]);\n    code += 2;\n    break;\n\n    case OP_STAR:\n    case OP_MINSTAR:\n    case OP_PLUS:\n    case OP_MINPLUS:\n    case OP_QUERY:\n    case OP_MINQUERY:\n    case OP_TYPESTAR:\n    case OP_TYPEMINSTAR:\n    case OP_TYPEPLUS:\n    case OP_TYPEMINPLUS:\n    case OP_TYPEQUERY:\n    case OP_TYPEMINQUERY:\n    if (*code >= OP_TYPESTAR)\n      printf(\"    %s\", OP_names[code[1]]);\n    else if (isprint(c = code[1])) printf(\"    %c\", c);\n      else printf(\"    \\\\x%02x\", c);\n    printf(\"%s\", OP_names[*code++]);\n    break;\n\n    case OP_EXACT:\n    case OP_UPTO:\n    case OP_MINUPTO:\n    if (isprint(c = code[3])) printf(\"    %c{\", c);\n      else printf(\"    \\\\x%02x{\", c);\n    if (*code != OP_EXACT) printf(\"0,\");\n    printf(\"%d}\", (code[1] << 8) + code[2]);\n    if (*code == OP_MINUPTO) printf(\"?\");\n    code += 3;\n    break;\n\n    case OP_TYPEEXACT:\n    case OP_TYPEUPTO:\n    case OP_TYPEMINUPTO:\n    printf(\"    %s{\", OP_names[code[3]]);\n    if (*code != OP_TYPEEXACT) printf(\",\");\n    printf(\"%d}\", (code[1] << 8) + code[2]);\n    if (*code == OP_TYPEMINUPTO) printf(\"?\");\n    code += 3;\n    break;\n\n    case OP_NOT:\n    if (isprint(c = *(++code))) printf(\"    [^%c]\", c);\n      else printf(\"    [^\\\\x%02x]\", c);\n    break;\n\n    case OP_NOTSTAR:\n    case OP_NOTMINSTAR:\n    case OP_NOTPLUS:\n    case OP_NOTMINPLUS:\n    case OP_NOTQUERY:\n    case OP_NOTMINQUERY:\n    if (isprint(c = code[1])) printf(\"    [^%c]\", c);\n      else printf(\"    [^\\\\x%02x]\", c);\n    printf(\"%s\", OP_names[*code++]);\n    break;\n\n    case OP_NOTEXACT:\n    case OP_NOTUPTO:\n    case OP_NOTMINUPTO:\n    if (isprint(c = code[3])) printf(\"    [^%c]{\", c);\n      else printf(\"    [^\\\\x%02x]{\", c);\n    if (*code != OP_NOTEXACT) printf(\",\");\n    printf(\"%d}\", (code[1] << 8) + code[2]);\n    if (*code == OP_NOTMINUPTO) printf(\"?\");\n    code += 3;\n    break;\n\n    case OP_REF:\n    printf(\"    \\\\%d\", (code[1] << 8) | code[2]);\n    code += 3;\n    goto CLASS_REF_REPEAT;\n\n    case OP_CLASS:\n      {\n      int i, min, max;\n      code++;\n      printf(\"    [\");\n\n      for (i = 0; i < 256; i++)\n        {\n        if ((code[i/8] & (1 << (i&7))) != 0)\n          {\n          int j;\n          for (j = i+1; j < 256; j++)\n            if ((code[j/8] & (1 << (j&7))) == 0) break;\n          if (i == '-' || i == ']') printf(\"\\\\\");\n          if (isprint(i)) printf(\"%c\", i); else printf(\"\\\\x%02x\", i);\n          if (--j > i)\n            {\n            printf(\"-\");\n            if (j == '-' || j == ']') printf(\"\\\\\");\n            if (isprint(j)) printf(\"%c\", j); else printf(\"\\\\x%02x\", j);\n            }\n          i = j;\n          }\n        }\n      printf(\"]\");\n      code += 32;\n\n      CLASS_REF_REPEAT:\n\n      switch(*code)\n        {\n        case OP_CRSTAR:\n        case OP_CRMINSTAR:\n        case OP_CRPLUS:\n        case OP_CRMINPLUS:\n        case OP_CRQUERY:\n        case OP_CRMINQUERY:\n        printf(\"%s\", OP_names[*code]);\n        break;\n\n        case OP_CRRANGE:\n        case OP_CRMINRANGE:\n        min = (code[1] << 8) + code[2];\n        max = (code[3] << 8) + code[4];\n        if (max == 0) printf(\"{%d,}\", min);\n        else printf(\"{%d,%d}\", min, max);\n        if (*code == OP_CRMINRANGE) printf(\"?\");\n        code += 4;\n        break;\n\n        default:\n        code--;\n        }\n      }\n    break;\n\n    /* Anything else is just a one-node item */\n\n    default:\n    printf(\"    %s\", OP_names[*code]);\n    break;\n    }\n\n  code++;\n  printf(\"\\n\");\n  }\nprintf(\"------------------------------------------------------------------\\n\");\n\n/* This check is done here in the debugging case so that the code that\nwas compiled can be seen. */\n\nif (code - re->code > length)\n  {\n  *errorptr = ERR23;\n  (pcre_free)(re);\n  *erroroffset = ptr - (uschar *)pattern;\n  return NULL;\n  }\n#endif\n\nreturn (pcre *)re;\n}\n\n\n\n/*************************************************\n*          Match a back-reference                *\n*************************************************/\n\n/* If a back reference hasn't been set, the length that is passed is greater\nthan the number of characters left in the string, so the match fails.\n\nArguments:\n  offset      index into the offset vector\n  eptr        points into the subject\n  length      length to be matched\n  md          points to match data block\n  ims         the ims flags\n\nReturns:      TRUE if matched\n*/\n\nstatic BOOL\nmatch_ref(int offset, register const uschar *eptr, int length, match_data *md,\n  unsigned long int ims)\n{\nconst uschar *p = md->start_subject + md->offset_vector[offset];\n\n#ifdef DEBUG\nif (eptr >= md->end_subject)\n  printf(\"matching subject <null>\");\nelse\n  {\n  printf(\"matching subject \");\n  pchars(eptr, length, TRUE, md);\n  }\nprintf(\" against backref \");\npchars(p, length, FALSE, md);\nprintf(\"\\n\");\n#endif\n\n/* Always fail if not enough characters left */\n\nif (length > md->end_subject - eptr) return FALSE;\n\n/* Separate the caselesss case for speed */\n\nif ((ims & PCRE_CASELESS) != 0)\n  {\n  while (length-- > 0)\n    if (md->lcc[*p++] != md->lcc[*eptr++]) return FALSE;\n  }\nelse\n  { while (length-- > 0) if (*p++ != *eptr++) return FALSE; }\n\nreturn TRUE;\n}\n\n\n\n/*************************************************\n*         Match from current position            *\n*************************************************/\n\n/* On entry ecode points to the first opcode, and eptr to the first character\nin the subject string, while eptrb holds the value of eptr at the start of the\nlast bracketed group - used for breaking infinite loops matching zero-length\nstrings.\n\nArguments:\n   eptr        pointer in subject\n   ecode       position in code\n   offset_top  current top pointer\n   md          pointer to \"static\" info for the match\n   ims         current /i, /m, and /s options\n   eptrb       pointer to chain of blocks containing eptr at start of\n                 brackets - for testing for empty matches\n   flags       can contain\n                 match_condassert - this is an assertion condition\n                 match_isgroup - this is the start of a bracketed group\n\nReturns:       TRUE if matched\n*/\n\nstatic BOOL\nmatch(register const uschar *eptr, register const uschar *ecode,\n  int offset_top, match_data *md, unsigned long int ims, eptrblock *eptrb,\n  int flags)\n{\nunsigned long int original_ims = ims;   /* Save for resetting on ')' */\neptrblock newptrb;\n\n/* At the start of a bracketed group, add the current subject pointer to the\nstack of such pointers, to be re-instated at the end of the group when we hit\nthe closing ket. When match() is called in other circumstances, we don't add to\nthe stack. */\n\nif ((flags & match_isgroup) != 0)\n  {\n  newptrb.prev = eptrb;\n  newptrb.saved_eptr = eptr;\n  eptrb = &newptrb;\n  }\n\n/* Now start processing the operations. */\n\nfor (;;)\n  {\n  int op = (int)*ecode;\n  int min, max, ctype;\n  register int i;\n  register int c;\n  BOOL minimize = FALSE;\n\n  /* Opening capturing bracket. If there is space in the offset vector, save\n  the current subject position in the working slot at the top of the vector. We\n  mustn't change the current values of the data slot, because they may be set\n  from a previous iteration of this group, and be referred to by a reference\n  inside the group.\n\n  If the bracket fails to match, we need to restore this value and also the\n  values of the final offsets, in case they were set by a previous iteration of\n  the same bracket.\n\n  If there isn't enough space in the offset vector, treat this as if it were a\n  non-capturing bracket. Don't worry about setting the flag for the error case\n  here; that is handled in the code for KET. */\n\n  if (op > OP_BRA)\n    {\n    int offset;\n    int number = op - OP_BRA;\n\n    /* For extended extraction brackets (large number), we have to fish out the\n    number from a dummy opcode at the start. */\n\n    if (number > EXTRACT_BASIC_MAX) number = (ecode[4] << 8) | ecode[5];\n    offset = number << 1;\n\n#ifdef DEBUG\n    printf(\"start bracket %d subject=\", number);\n    pchars(eptr, 16, TRUE, md);\n    printf(\"\\n\");\n#endif\n\n    if (offset < md->offset_max)\n      {\n      int save_offset1 = md->offset_vector[offset];\n      int save_offset2 = md->offset_vector[offset+1];\n      int save_offset3 = md->offset_vector[md->offset_end - number];\n\n      DPRINTF((\"saving %d %d %d\\n\", save_offset1, save_offset2, save_offset3));\n      md->offset_vector[md->offset_end - number] = eptr - md->start_subject;\n\n      do\n        {\n        if (match(eptr, ecode+3, offset_top, md, ims, eptrb, match_isgroup))\n          return TRUE;\n        ecode += (ecode[1] << 8) + ecode[2];\n        }\n      while (*ecode == OP_ALT);\n\n      DPRINTF((\"bracket %d failed\\n\", number));\n\n      md->offset_vector[offset] = save_offset1;\n      md->offset_vector[offset+1] = save_offset2;\n      md->offset_vector[md->offset_end - number] = save_offset3;\n\n      return FALSE;\n      }\n\n    /* Insufficient room for saving captured contents */\n\n    else op = OP_BRA;\n    }\n\n  /* Other types of node can be handled by a switch */\n\n  switch(op)\n    {\n    case OP_BRA:     /* Non-capturing bracket: optimized */\n    DPRINTF((\"start bracket 0\\n\"));\n    do\n      {\n      if (match(eptr, ecode+3, offset_top, md, ims, eptrb, match_isgroup))\n        return TRUE;\n      ecode += (ecode[1] << 8) + ecode[2];\n      }\n    while (*ecode == OP_ALT);\n    DPRINTF((\"bracket 0 failed\\n\"));\n    return FALSE;\n\n    /* Conditional group: compilation checked that there are no more than\n    two branches. If the condition is false, skipping the first branch takes us\n    past the end if there is only one branch, but that's OK because that is\n    exactly what going to the ket would do. */\n\n    case OP_COND:\n    if (ecode[3] == OP_CREF)         /* Condition is extraction test */\n      {\n      int offset = (ecode[4] << 9) | (ecode[5] << 1); /* Doubled ref number */\n      return match(eptr,\n        ecode + ((offset < offset_top && md->offset_vector[offset] >= 0)?\n          6 : 3 + (ecode[1] << 8) + ecode[2]),\n        offset_top, md, ims, eptrb, match_isgroup);\n      }\n\n    /* The condition is an assertion. Call match() to evaluate it - setting\n    the final argument TRUE causes it to stop at the end of an assertion. */\n\n    else\n      {\n      if (match(eptr, ecode+3, offset_top, md, ims, NULL,\n          match_condassert | match_isgroup))\n        {\n        ecode += 3 + (ecode[4] << 8) + ecode[5];\n        while (*ecode == OP_ALT) ecode += (ecode[1] << 8) + ecode[2];\n        }\n      else ecode += (ecode[1] << 8) + ecode[2];\n      return match(eptr, ecode+3, offset_top, md, ims, eptrb, match_isgroup);\n      }\n    /* Control never reaches here */\n\n    /* Skip over conditional reference or large extraction number data if\n    encountered. */\n\n    case OP_CREF:\n    case OP_BRANUMBER:\n    ecode += 3;\n    break;\n\n    /* End of the pattern. If PCRE_NOTEMPTY is set, fail if we have matched\n    an empty string - recursion will then try other alternatives, if any. */\n\n    case OP_END:\n    if (md->notempty && eptr == md->start_match) return FALSE;\n    md->end_match_ptr = eptr;          /* Record where we ended */\n    md->end_offset_top = offset_top;   /* and how many extracts were taken */\n    return TRUE;\n\n    /* Change option settings */\n\n    case OP_OPT:\n    ims = ecode[1];\n    ecode += 2;\n    DPRINTF((\"ims set to %02lx\\n\", ims));\n    break;\n\n    /* Assertion brackets. Check the alternative branches in turn - the\n    matching won't pass the KET for an assertion. If any one branch matches,\n    the assertion is true. Lookbehind assertions have an OP_REVERSE item at the\n    start of each branch to move the current point backwards, so the code at\n    this level is identical to the lookahead case. */\n\n    case OP_ASSERT:\n    case OP_ASSERTBACK:\n    do\n      {\n      if (match(eptr, ecode+3, offset_top, md, ims, NULL, match_isgroup)) break;\n      ecode += (ecode[1] << 8) + ecode[2];\n      }\n    while (*ecode == OP_ALT);\n    if (*ecode == OP_KET) return FALSE;\n\n    /* If checking an assertion for a condition, return TRUE. */\n\n    if ((flags & match_condassert) != 0) return TRUE;\n\n    /* Continue from after the assertion, updating the offsets high water\n    mark, since extracts may have been taken during the assertion. */\n\n    do ecode += (ecode[1] << 8) + ecode[2]; while (*ecode == OP_ALT);\n    ecode += 3;\n    offset_top = md->end_offset_top;\n    continue;\n\n    /* Negative assertion: all branches must fail to match */\n\n    case OP_ASSERT_NOT:\n    case OP_ASSERTBACK_NOT:\n    do\n      {\n      if (match(eptr, ecode+3, offset_top, md, ims, NULL, match_isgroup))\n        return FALSE;\n      ecode += (ecode[1] << 8) + ecode[2];\n      }\n    while (*ecode == OP_ALT);\n\n    if ((flags & match_condassert) != 0) return TRUE;\n\n    ecode += 3;\n    continue;\n\n    /* Move the subject pointer back. This occurs only at the start of\n    each branch of a lookbehind assertion. If we are too close to the start to\n    move back, this match function fails. When working with UTF-8 we move\n    back a number of characters, not bytes. */\n\n    case OP_REVERSE:\n#ifdef SUPPORT_UTF8\n    c = (ecode[1] << 8) + ecode[2];\n    for (i = 0; i < c; i++)\n      {\n      eptr--;\n      BACKCHAR(eptr)\n      }\n#else\n    eptr -= (ecode[1] << 8) + ecode[2];\n#endif\n\n    if (eptr < md->start_subject) return FALSE;\n    ecode += 3;\n    break;\n\n    /* Recursion matches the current regex, nested. If there are any capturing\n    brackets started but not finished, we have to save their starting points\n    and reinstate them after the recursion. However, we don't know how many\n    such there are (offset_top records the completed total) so we just have\n    to save all the potential data. There may be up to 99 such values, which\n    is a bit large to put on the stack, but using malloc for small numbers\n    seems expensive. As a compromise, the stack is used when there are fewer\n    than 16 values to store; otherwise malloc is used. A problem is what to do\n    if the malloc fails ... there is no way of returning to the top level with\n    an error. Save the top 15 values on the stack, and accept that the rest\n    may be wrong. */\n\n    case OP_RECURSE:\n      {\n      BOOL rc;\n      int *save;\n      int stacksave[15];\n\n      c = md->offset_max;\n\n      if (c < 16) save = stacksave; else\n        {\n        save = (int *)(pcre_malloc)((c+1) * sizeof(int));\n        if (save == NULL)\n          {\n          save = stacksave;\n          c = 15;\n          }\n        }\n\n      for (i = 1; i <= c; i++)\n        save[i] = md->offset_vector[md->offset_end - i];\n      rc = match(eptr, md->start_pattern, offset_top, md, ims, eptrb,\n        match_isgroup);\n      for (i = 1; i <= c; i++)\n        md->offset_vector[md->offset_end - i] = save[i];\n      if (save != stacksave) (pcre_free)(save);\n      if (!rc) return FALSE;\n\n      /* In case the recursion has set more capturing values, save the final\n      number, then move along the subject till after the recursive match,\n      and advance one byte in the pattern code. */\n\n      offset_top = md->end_offset_top;\n      eptr = md->end_match_ptr;\n      ecode++;\n      }\n    break;\n\n    /* \"Once\" brackets are like assertion brackets except that after a match,\n    the point in the subject string is not moved back. Thus there can never be\n    a move back into the brackets. Check the alternative branches in turn - the\n    matching won't pass the KET for this kind of subpattern. If any one branch\n    matches, we carry on as at the end of a normal bracket, leaving the subject\n    pointer. */\n\n    case OP_ONCE:\n      {\n      const uschar *prev = ecode;\n      const uschar *saved_eptr = eptr;\n\n      do\n        {\n        if (match(eptr, ecode+3, offset_top, md, ims, eptrb, match_isgroup))\n          break;\n        ecode += (ecode[1] << 8) + ecode[2];\n        }\n      while (*ecode == OP_ALT);\n\n      /* If hit the end of the group (which could be repeated), fail */\n\n      if (*ecode != OP_ONCE && *ecode != OP_ALT) return FALSE;\n\n      /* Continue as from after the assertion, updating the offsets high water\n      mark, since extracts may have been taken. */\n\n      do ecode += (ecode[1] << 8) + ecode[2]; while (*ecode == OP_ALT);\n\n      offset_top = md->end_offset_top;\n      eptr = md->end_match_ptr;\n\n      /* For a non-repeating ket, just continue at this level. This also\n      happens for a repeating ket if no characters were matched in the group.\n      This is the forcible breaking of infinite loops as implemented in Perl\n      5.005. If there is an options reset, it will get obeyed in the normal\n      course of events. */\n\n      if (*ecode == OP_KET || eptr == saved_eptr)\n        {\n        ecode += 3;\n        break;\n        }\n\n      /* The repeating kets try the rest of the pattern or restart from the\n      preceding bracket, in the appropriate order. We need to reset any options\n      that changed within the bracket before re-running it, so check the next\n      opcode. */\n\n      if (ecode[3] == OP_OPT)\n        {\n        ims = (ims & ~PCRE_IMS) | ecode[4];\n        DPRINTF((\"ims set to %02lx at group repeat\\n\", ims));\n        }\n\n      if (*ecode == OP_KETRMIN)\n        {\n        if (match(eptr, ecode+3, offset_top, md, ims, eptrb, 0) ||\n            match(eptr, prev, offset_top, md, ims, eptrb, match_isgroup))\n              return TRUE;\n        }\n      else  /* OP_KETRMAX */\n        {\n        if (match(eptr, prev, offset_top, md, ims, eptrb, match_isgroup) ||\n            match(eptr, ecode+3, offset_top, md, ims, eptrb, 0)) return TRUE;\n        }\n      }\n    return FALSE;\n\n    /* An alternation is the end of a branch; scan along to find the end of the\n    bracketed group and go to there. */\n\n    case OP_ALT:\n    do ecode += (ecode[1] << 8) + ecode[2]; while (*ecode == OP_ALT);\n    break;\n\n    /* BRAZERO and BRAMINZERO occur just before a bracket group, indicating\n    that it may occur zero times. It may repeat infinitely, or not at all -\n    i.e. it could be ()* or ()? in the pattern. Brackets with fixed upper\n    repeat limits are compiled as a number of copies, with the optional ones\n    preceded by BRAZERO or BRAMINZERO. */\n\n    case OP_BRAZERO:\n      {\n      const uschar *next = ecode+1;\n      if (match(eptr, next, offset_top, md, ims, eptrb, match_isgroup))\n        return TRUE;\n      do next += (next[1] << 8) + next[2]; while (*next == OP_ALT);\n      ecode = next + 3;\n      }\n    break;\n\n    case OP_BRAMINZERO:\n      {\n      const uschar *next = ecode+1;\n      do next += (next[1] << 8) + next[2]; while (*next == OP_ALT);\n      if (match(eptr, next+3, offset_top, md, ims, eptrb, match_isgroup))\n        return TRUE;\n      ecode++;\n      }\n    break;\n\n    /* End of a group, repeated or non-repeating. If we are at the end of\n    an assertion \"group\", stop matching and return TRUE, but record the\n    current high water mark for use by positive assertions. Do this also\n    for the \"once\" (not-backup up) groups. */\n\n    case OP_KET:\n    case OP_KETRMIN:\n    case OP_KETRMAX:\n      {\n      const uschar *prev = ecode - (ecode[1] << 8) - ecode[2];\n      const uschar *saved_eptr = eptrb->saved_eptr;\n\n      eptrb = eptrb->prev;    /* Back up the stack of bracket start pointers */\n\n      if (*prev == OP_ASSERT || *prev == OP_ASSERT_NOT ||\n          *prev == OP_ASSERTBACK || *prev == OP_ASSERTBACK_NOT ||\n          *prev == OP_ONCE)\n        {\n        md->end_match_ptr = eptr;      /* For ONCE */\n        md->end_offset_top = offset_top;\n        return TRUE;\n        }\n\n      /* In all other cases except a conditional group we have to check the\n      group number back at the start and if necessary complete handling an\n      extraction by setting the offsets and bumping the high water mark. */\n\n      if (*prev != OP_COND)\n        {\n        int offset;\n        int number = *prev - OP_BRA;\n\n        /* For extended extraction brackets (large number), we have to fish out\n        the number from a dummy opcode at the start. */\n\n        if (number > EXTRACT_BASIC_MAX) number = (prev[4] << 8) | prev[5];\n        offset = number << 1;\n\n#ifdef DEBUG\n        printf(\"end bracket %d\", number);\n        printf(\"\\n\");\n#endif\n\n        if (number > 0)\n          {\n          if (offset >= md->offset_max) md->offset_overflow = TRUE; else\n            {\n            md->offset_vector[offset] =\n              md->offset_vector[md->offset_end - number];\n            md->offset_vector[offset+1] = eptr - md->start_subject;\n            if (offset_top <= offset) offset_top = offset + 2;\n            }\n          }\n        }\n\n      /* Reset the value of the ims flags, in case they got changed during\n      the group. */\n\n      ims = original_ims;\n      DPRINTF((\"ims reset to %02lx\\n\", ims));\n\n      /* For a non-repeating ket, just continue at this level. This also\n      happens for a repeating ket if no characters were matched in the group.\n      This is the forcible breaking of infinite loops as implemented in Perl\n      5.005. If there is an options reset, it will get obeyed in the normal\n      course of events. */\n\n      if (*ecode == OP_KET || eptr == saved_eptr)\n        {\n        ecode += 3;\n        break;\n        }\n\n      /* The repeating kets try the rest of the pattern or restart from the\n      preceding bracket, in the appropriate order. */\n\n      if (*ecode == OP_KETRMIN)\n        {\n        if (match(eptr, ecode+3, offset_top, md, ims, eptrb, 0) ||\n            match(eptr, prev, offset_top, md, ims, eptrb, match_isgroup))\n              return TRUE;\n        }\n      else  /* OP_KETRMAX */\n        {\n        if (match(eptr, prev, offset_top, md, ims, eptrb, match_isgroup) ||\n            match(eptr, ecode+3, offset_top, md, ims, eptrb, 0)) return TRUE;\n        }\n      }\n    return FALSE;\n\n    /* Start of subject unless notbol, or after internal newline if multiline */\n\n    case OP_CIRC:\n    if (md->notbol && eptr == md->start_subject) return FALSE;\n    if ((ims & PCRE_MULTILINE) != 0)\n      {\n      if (eptr != md->start_subject && eptr[-1] != NEWLINE) return FALSE;\n      ecode++;\n      break;\n      }\n    /* ... else fall through */\n\n    /* Start of subject assertion */\n\n    case OP_SOD:\n    if (eptr != md->start_subject) return FALSE;\n    ecode++;\n    break;\n\n    /* Assert before internal newline if multiline, or before a terminating\n    newline unless endonly is set, else end of subject unless noteol is set. */\n\n    case OP_DOLL:\n    if ((ims & PCRE_MULTILINE) != 0)\n      {\n      if (eptr < md->end_subject) { if (*eptr != NEWLINE) return FALSE; }\n        else { if (md->noteol) return FALSE; }\n      ecode++;\n      break;\n      }\n    else\n      {\n      if (md->noteol) return FALSE;\n      if (!md->endonly)\n        {\n        if (eptr < md->end_subject - 1 ||\n           (eptr == md->end_subject - 1 && *eptr != NEWLINE)) return FALSE;\n\n        ecode++;\n        break;\n        }\n      }\n    /* ... else fall through */\n\n    /* End of subject assertion (\\z) */\n\n    case OP_EOD:\n    if (eptr < md->end_subject) return FALSE;\n    ecode++;\n    break;\n\n    /* End of subject or ending \\n assertion (\\Z) */\n\n    case OP_EODN:\n    if (eptr < md->end_subject - 1 ||\n       (eptr == md->end_subject - 1 && *eptr != NEWLINE)) return FALSE;\n    ecode++;\n    break;\n\n    /* Word boundary assertions */\n\n    case OP_NOT_WORD_BOUNDARY:\n    case OP_WORD_BOUNDARY:\n      {\n      BOOL prev_is_word = (eptr != md->start_subject) &&\n        ((md->ctypes[eptr[-1]] & ctype_word) != 0);\n      BOOL cur_is_word = (eptr < md->end_subject) &&\n        ((md->ctypes[*eptr] & ctype_word) != 0);\n      if ((*ecode++ == OP_WORD_BOUNDARY)?\n           cur_is_word == prev_is_word : cur_is_word != prev_is_word)\n        return FALSE;\n      }\n    break;\n\n    /* Match a single character type; inline for speed */\n\n    case OP_ANY:\n    if ((ims & PCRE_DOTALL) == 0 && eptr < md->end_subject && *eptr == NEWLINE)\n      return FALSE;\n    if (eptr++ >= md->end_subject) return FALSE;\n#ifdef SUPPORT_UTF8\n    if (md->utf8)\n      while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;\n#endif\n    ecode++;\n    break;\n\n    case OP_NOT_DIGIT:\n    if (eptr >= md->end_subject ||\n       (md->ctypes[*eptr++] & ctype_digit) != 0)\n      return FALSE;\n    ecode++;\n    break;\n\n    case OP_DIGIT:\n    if (eptr >= md->end_subject ||\n       (md->ctypes[*eptr++] & ctype_digit) == 0)\n      return FALSE;\n    ecode++;\n    break;\n\n    case OP_NOT_WHITESPACE:\n    if (eptr >= md->end_subject ||\n       (md->ctypes[*eptr++] & ctype_space) != 0)\n      return FALSE;\n    ecode++;\n    break;\n\n    case OP_WHITESPACE:\n    if (eptr >= md->end_subject ||\n       (md->ctypes[*eptr++] & ctype_space) == 0)\n      return FALSE;\n    ecode++;\n    break;\n\n    case OP_NOT_WORDCHAR:\n    if (eptr >= md->end_subject ||\n       (md->ctypes[*eptr++] & ctype_word) != 0)\n      return FALSE;\n    ecode++;\n    break;\n\n    case OP_WORDCHAR:\n    if (eptr >= md->end_subject ||\n       (md->ctypes[*eptr++] & ctype_word) == 0)\n      return FALSE;\n    ecode++;\n    break;\n\n    /* Match a back reference, possibly repeatedly. Look past the end of the\n    item to see if there is repeat information following. The code is similar\n    to that for character classes, but repeated for efficiency. Then obey\n    similar code to character type repeats - written out again for speed.\n    However, if the referenced string is the empty string, always treat\n    it as matched, any number of times (otherwise there could be infinite\n    loops). */\n\n    case OP_REF:\n      {\n      int length;\n      int offset = (ecode[1] << 9) | (ecode[2] << 1); /* Doubled ref number */\n      ecode += 3;                                     /* Advance past item */\n\n      /* If the reference is unset, set the length to be longer than the amount\n      of subject left; this ensures that every attempt at a match fails. We\n      can't just fail here, because of the possibility of quantifiers with zero\n      minima. */\n\n      length = (offset >= offset_top || md->offset_vector[offset] < 0)?\n        md->end_subject - eptr + 1 :\n        md->offset_vector[offset+1] - md->offset_vector[offset];\n\n      /* Set up for repetition, or handle the non-repeated case */\n\n      switch (*ecode)\n        {\n        case OP_CRSTAR:\n        case OP_CRMINSTAR:\n        case OP_CRPLUS:\n        case OP_CRMINPLUS:\n        case OP_CRQUERY:\n        case OP_CRMINQUERY:\n        c = *ecode++ - OP_CRSTAR;\n        minimize = (c & 1) != 0;\n        min = rep_min[c];                 /* Pick up values from tables; */\n        max = rep_max[c];                 /* zero for max => infinity */\n        if (max == 0) max = INT_MAX;\n        break;\n\n        case OP_CRRANGE:\n        case OP_CRMINRANGE:\n        minimize = (*ecode == OP_CRMINRANGE);\n        min = (ecode[1] << 8) + ecode[2];\n        max = (ecode[3] << 8) + ecode[4];\n        if (max == 0) max = INT_MAX;\n        ecode += 5;\n        break;\n\n        default:               /* No repeat follows */\n        if (!match_ref(offset, eptr, length, md, ims)) return FALSE;\n        eptr += length;\n        continue;              /* With the main loop */\n        }\n\n      /* If the length of the reference is zero, just continue with the\n      main loop. */\n\n      if (length == 0) continue;\n\n      /* First, ensure the minimum number of matches are present. We get back\n      the length of the reference string explicitly rather than passing the\n      address of eptr, so that eptr can be a register variable. */\n\n      for (i = 1; i <= min; i++)\n        {\n        if (!match_ref(offset, eptr, length, md, ims)) return FALSE;\n        eptr += length;\n        }\n\n      /* If min = max, continue at the same level without recursion.\n      They are not both allowed to be zero. */\n\n      if (min == max) continue;\n\n      /* If minimizing, keep trying and advancing the pointer */\n\n      if (minimize)\n        {\n        for (i = min;; i++)\n          {\n          if (match(eptr, ecode, offset_top, md, ims, eptrb, 0))\n            return TRUE;\n          if (i >= max || !match_ref(offset, eptr, length, md, ims))\n            return FALSE;\n          eptr += length;\n          }\n        /* Control never gets here */\n        }\n\n      /* If maximizing, find the longest string and work backwards */\n\n      else\n        {\n        const uschar *pp = eptr;\n        for (i = min; i < max; i++)\n          {\n          if (!match_ref(offset, eptr, length, md, ims)) break;\n          eptr += length;\n          }\n        while (eptr >= pp)\n          {\n          if (match(eptr, ecode, offset_top, md, ims, eptrb, 0))\n            return TRUE;\n          eptr -= length;\n          }\n        return FALSE;\n        }\n      }\n    /* Control never gets here */\n\n\n\n    /* Match a character class, possibly repeatedly. Look past the end of the\n    item to see if there is repeat information following. Then obey similar\n    code to character type repeats - written out again for speed. */\n\n    case OP_CLASS:\n      {\n      const uschar *data = ecode + 1;  /* Save for matching */\n      ecode += 33;                     /* Advance past the item */\n\n      switch (*ecode)\n        {\n        case OP_CRSTAR:\n        case OP_CRMINSTAR:\n        case OP_CRPLUS:\n        case OP_CRMINPLUS:\n        case OP_CRQUERY:\n        case OP_CRMINQUERY:\n        c = *ecode++ - OP_CRSTAR;\n        minimize = (c & 1) != 0;\n        min = rep_min[c];                 /* Pick up values from tables; */\n        max = rep_max[c];                 /* zero for max => infinity */\n        if (max == 0) max = INT_MAX;\n        break;\n\n        case OP_CRRANGE:\n        case OP_CRMINRANGE:\n        minimize = (*ecode == OP_CRMINRANGE);\n        min = (ecode[1] << 8) + ecode[2];\n        max = (ecode[3] << 8) + ecode[4];\n        if (max == 0) max = INT_MAX;\n        ecode += 5;\n        break;\n\n        default:               /* No repeat follows */\n        min = max = 1;\n        break;\n        }\n\n      /* First, ensure the minimum number of matches are present. */\n\n      for (i = 1; i <= min; i++)\n        {\n        if (eptr >= md->end_subject) return FALSE;\n        GETCHARINC(c, eptr)         /* Get character; increment eptr */\n\n#ifdef SUPPORT_UTF8\n        /* We do not yet support class members > 255 */\n        if (c > 255) return FALSE;\n#endif\n\n        if ((data[c/8] & (1 << (c&7))) != 0) continue;\n        return FALSE;\n        }\n\n      /* If max == min we can continue with the main loop without the\n      need to recurse. */\n\n      if (min == max) continue;\n\n      /* If minimizing, keep testing the rest of the expression and advancing\n      the pointer while it matches the class. */\n\n      if (minimize)\n        {\n        for (i = min;; i++)\n          {\n          if (match(eptr, ecode, offset_top, md, ims, eptrb, 0))\n            return TRUE;\n          if (i >= max || eptr >= md->end_subject) return FALSE;\n          GETCHARINC(c, eptr)       /* Get character; increment eptr */\n\n#ifdef SUPPORT_UTF8\n          /* We do not yet support class members > 255 */\n          if (c > 255) return FALSE;\n#endif\n          if ((data[c/8] & (1 << (c&7))) != 0) continue;\n          return FALSE;\n          }\n        /* Control never gets here */\n        }\n\n      /* If maximizing, find the longest possible run, then work backwards. */\n\n      else\n        {\n        const uschar *pp = eptr;\n        int len = 1;\n        for (i = min; i < max; i++)\n          {\n          if (eptr >= md->end_subject) break;\n          GETCHARLEN(c, eptr, len)  /* Get character, set length if UTF-8 */\n\n#ifdef SUPPORT_UTF8\n          /* We do not yet support class members > 255 */\n          if (c > 255) break;\n#endif\n          if ((data[c/8] & (1 << (c&7))) == 0) break;\n          eptr += len;\n          }\n\n        while (eptr >= pp)\n          {\n          if (match(eptr--, ecode, offset_top, md, ims, eptrb, 0))\n            return TRUE;\n\n#ifdef SUPPORT_UTF8\n          BACKCHAR(eptr)\n#endif\n          }\n        return FALSE;\n        }\n      }\n    /* Control never gets here */\n\n    /* Match a run of characters */\n\n    case OP_CHARS:\n      {\n      register int length = ecode[1];\n      ecode += 2;\n\n#ifdef DEBUG    /* Sigh. Some compilers never learn. */\n      if (eptr >= md->end_subject)\n        printf(\"matching subject <null> against pattern \");\n      else\n        {\n        printf(\"matching subject \");\n        pchars(eptr, length, TRUE, md);\n        printf(\" against pattern \");\n        }\n      pchars(ecode, length, FALSE, md);\n      printf(\"\\n\");\n#endif\n\n      if (length > md->end_subject - eptr) return FALSE;\n      if ((ims & PCRE_CASELESS) != 0)\n        {\n        while (length-- > 0)\n          if (md->lcc[*ecode++] != md->lcc[*eptr++])\n            return FALSE;\n        }\n      else\n        {\n        while (length-- > 0) if (*ecode++ != *eptr++) return FALSE;\n        }\n      }\n    break;\n\n    /* Match a single character repeatedly; different opcodes share code. */\n\n    case OP_EXACT:\n    min = max = (ecode[1] << 8) + ecode[2];\n    ecode += 3;\n    goto REPEATCHAR;\n\n    case OP_UPTO:\n    case OP_MINUPTO:\n    min = 0;\n    max = (ecode[1] << 8) + ecode[2];\n    minimize = *ecode == OP_MINUPTO;\n    ecode += 3;\n    goto REPEATCHAR;\n\n    case OP_STAR:\n    case OP_MINSTAR:\n    case OP_PLUS:\n    case OP_MINPLUS:\n    case OP_QUERY:\n    case OP_MINQUERY:\n    c = *ecode++ - OP_STAR;\n    minimize = (c & 1) != 0;\n    min = rep_min[c];                 /* Pick up values from tables; */\n    max = rep_max[c];                 /* zero for max => infinity */\n    if (max == 0) max = INT_MAX;\n\n    /* Common code for all repeated single-character matches. We can give\n    up quickly if there are fewer than the minimum number of characters left in\n    the subject. */\n\n    REPEATCHAR:\n    if (min > md->end_subject - eptr) return FALSE;\n    c = *ecode++;\n\n    /* The code is duplicated for the caseless and caseful cases, for speed,\n    since matching characters is likely to be quite common. First, ensure the\n    minimum number of matches are present. If min = max, continue at the same\n    level without recursing. Otherwise, if minimizing, keep trying the rest of\n    the expression and advancing one matching character if failing, up to the\n    maximum. Alternatively, if maximizing, find the maximum number of\n    characters and work backwards. */\n\n    DPRINTF((\"matching %c{%d,%d} against subject %.*s\\n\", c, min, max,\n      max, eptr));\n\n    if ((ims & PCRE_CASELESS) != 0)\n      {\n      c = md->lcc[c];\n      for (i = 1; i <= min; i++)\n        if (c != md->lcc[*eptr++]) return FALSE;\n      if (min == max) continue;\n      if (minimize)\n        {\n        for (i = min;; i++)\n          {\n          if (match(eptr, ecode, offset_top, md, ims, eptrb, 0))\n            return TRUE;\n          if (i >= max || eptr >= md->end_subject ||\n              c != md->lcc[*eptr++])\n            return FALSE;\n          }\n        /* Control never gets here */\n        }\n      else\n        {\n        const uschar *pp = eptr;\n        for (i = min; i < max; i++)\n          {\n          if (eptr >= md->end_subject || c != md->lcc[*eptr]) break;\n          eptr++;\n          }\n        while (eptr >= pp)\n          if (match(eptr--, ecode, offset_top, md, ims, eptrb, 0))\n            return TRUE;\n        return FALSE;\n        }\n      /* Control never gets here */\n      }\n\n    /* Caseful comparisons */\n\n    else\n      {\n      for (i = 1; i <= min; i++) if (c != *eptr++) return FALSE;\n      if (min == max) continue;\n      if (minimize)\n        {\n        for (i = min;; i++)\n          {\n          if (match(eptr, ecode, offset_top, md, ims, eptrb, 0))\n            return TRUE;\n          if (i >= max || eptr >= md->end_subject || c != *eptr++) return FALSE;\n          }\n        /* Control never gets here */\n        }\n      else\n        {\n        const uschar *pp = eptr;\n        for (i = min; i < max; i++)\n          {\n          if (eptr >= md->end_subject || c != *eptr) break;\n          eptr++;\n          }\n        while (eptr >= pp)\n         if (match(eptr--, ecode, offset_top, md, ims, eptrb, 0))\n           return TRUE;\n        return FALSE;\n        }\n      }\n    /* Control never gets here */\n\n    /* Match a negated single character */\n\n    case OP_NOT:\n    if (eptr >= md->end_subject) return FALSE;\n    ecode++;\n    if ((ims & PCRE_CASELESS) != 0)\n      {\n      if (md->lcc[*ecode++] == md->lcc[*eptr++]) return FALSE;\n      }\n    else\n      {\n      if (*ecode++ == *eptr++) return FALSE;\n      }\n    break;\n\n    /* Match a negated single character repeatedly. This is almost a repeat of\n    the code for a repeated single character, but I haven't found a nice way of\n    commoning these up that doesn't require a test of the positive/negative\n    option for each character match. Maybe that wouldn't add very much to the\n    time taken, but character matching *is* what this is all about... */\n\n    case OP_NOTEXACT:\n    min = max = (ecode[1] << 8) + ecode[2];\n    ecode += 3;\n    goto REPEATNOTCHAR;\n\n    case OP_NOTUPTO:\n    case OP_NOTMINUPTO:\n    min = 0;\n    max = (ecode[1] << 8) + ecode[2];\n    minimize = *ecode == OP_NOTMINUPTO;\n    ecode += 3;\n    goto REPEATNOTCHAR;\n\n    case OP_NOTSTAR:\n    case OP_NOTMINSTAR:\n    case OP_NOTPLUS:\n    case OP_NOTMINPLUS:\n    case OP_NOTQUERY:\n    case OP_NOTMINQUERY:\n    c = *ecode++ - OP_NOTSTAR;\n    minimize = (c & 1) != 0;\n    min = rep_min[c];                 /* Pick up values from tables; */\n    max = rep_max[c];                 /* zero for max => infinity */\n    if (max == 0) max = INT_MAX;\n\n    /* Common code for all repeated single-character matches. We can give\n    up quickly if there are fewer than the minimum number of characters left in\n    the subject. */\n\n    REPEATNOTCHAR:\n    if (min > md->end_subject - eptr) return FALSE;\n    c = *ecode++;\n\n    /* The code is duplicated for the caseless and caseful cases, for speed,\n    since matching characters is likely to be quite common. First, ensure the\n    minimum number of matches are present. If min = max, continue at the same\n    level without recursing. Otherwise, if minimizing, keep trying the rest of\n    the expression and advancing one matching character if failing, up to the\n    maximum. Alternatively, if maximizing, find the maximum number of\n    characters and work backwards. */\n\n    DPRINTF((\"negative matching %c{%d,%d} against subject %.*s\\n\", c, min, max,\n      max, eptr));\n\n    if ((ims & PCRE_CASELESS) != 0)\n      {\n      c = md->lcc[c];\n      for (i = 1; i <= min; i++)\n        if (c == md->lcc[*eptr++]) return FALSE;\n      if (min == max) continue;\n      if (minimize)\n        {\n        for (i = min;; i++)\n          {\n          if (match(eptr, ecode, offset_top, md, ims, eptrb, 0))\n            return TRUE;\n          if (i >= max || eptr >= md->end_subject ||\n              c == md->lcc[*eptr++])\n            return FALSE;\n          }\n        /* Control never gets here */\n        }\n      else\n        {\n        const uschar *pp = eptr;\n        for (i = min; i < max; i++)\n          {\n          if (eptr >= md->end_subject || c == md->lcc[*eptr]) break;\n          eptr++;\n          }\n        while (eptr >= pp)\n          if (match(eptr--, ecode, offset_top, md, ims, eptrb, 0))\n            return TRUE;\n        return FALSE;\n        }\n      /* Control never gets here */\n      }\n\n    /* Caseful comparisons */\n\n    else\n      {\n      for (i = 1; i <= min; i++) if (c == *eptr++) return FALSE;\n      if (min == max) continue;\n      if (minimize)\n        {\n        for (i = min;; i++)\n          {\n          if (match(eptr, ecode, offset_top, md, ims, eptrb, 0))\n            return TRUE;\n          if (i >= max || eptr >= md->end_subject || c == *eptr++) return FALSE;\n          }\n        /* Control never gets here */\n        }\n      else\n        {\n        const uschar *pp = eptr;\n        for (i = min; i < max; i++)\n          {\n          if (eptr >= md->end_subject || c == *eptr) break;\n          eptr++;\n          }\n        while (eptr >= pp)\n         if (match(eptr--, ecode, offset_top, md, ims, eptrb, 0))\n           return TRUE;\n        return FALSE;\n        }\n      }\n    /* Control never gets here */\n\n    /* Match a single character type repeatedly; several different opcodes\n    share code. This is very similar to the code for single characters, but we\n    repeat it in the interests of efficiency. */\n\n    case OP_TYPEEXACT:\n    min = max = (ecode[1] << 8) + ecode[2];\n    minimize = TRUE;\n    ecode += 3;\n    goto REPEATTYPE;\n\n    case OP_TYPEUPTO:\n    case OP_TYPEMINUPTO:\n    min = 0;\n    max = (ecode[1] << 8) + ecode[2];\n    minimize = *ecode == OP_TYPEMINUPTO;\n    ecode += 3;\n    goto REPEATTYPE;\n\n    case OP_TYPESTAR:\n    case OP_TYPEMINSTAR:\n    case OP_TYPEPLUS:\n    case OP_TYPEMINPLUS:\n    case OP_TYPEQUERY:\n    case OP_TYPEMINQUERY:\n    c = *ecode++ - OP_TYPESTAR;\n    minimize = (c & 1) != 0;\n    min = rep_min[c];                 /* Pick up values from tables; */\n    max = rep_max[c];                 /* zero for max => infinity */\n    if (max == 0) max = INT_MAX;\n\n    /* Common code for all repeated single character type matches */\n\n    REPEATTYPE:\n    ctype = *ecode++;      /* Code for the character type */\n\n    /* First, ensure the minimum number of matches are present. Use inline\n    code for maximizing the speed, and do the type test once at the start\n    (i.e. keep it out of the loop). Also we can test that there are at least\n    the minimum number of bytes before we start, except when doing '.' in\n    UTF8 mode. Leave the test in in all cases; in the special case we have\n    to test after each character. */\n\n    if (min > md->end_subject - eptr) return FALSE;\n    if (min > 0) switch(ctype)\n      {\n      case OP_ANY:\n#ifdef SUPPORT_UTF8\n      if (md->utf8)\n        {\n        for (i = 1; i <= min; i++)\n          {\n          if (eptr >= md->end_subject ||\n             (*eptr++ == NEWLINE && (ims & PCRE_DOTALL) == 0))\n            return FALSE;\n          while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;\n          }\n        break;\n        }\n#endif\n      /* Non-UTF8 can be faster */\n      if ((ims & PCRE_DOTALL) == 0)\n        { for (i = 1; i <= min; i++) if (*eptr++ == NEWLINE) return FALSE; }\n      else eptr += min;\n      break;\n\n      case OP_NOT_DIGIT:\n      for (i = 1; i <= min; i++)\n        if ((md->ctypes[*eptr++] & ctype_digit) != 0) return FALSE;\n      break;\n\n      case OP_DIGIT:\n      for (i = 1; i <= min; i++)\n        if ((md->ctypes[*eptr++] & ctype_digit) == 0) return FALSE;\n      break;\n\n      case OP_NOT_WHITESPACE:\n      for (i = 1; i <= min; i++)\n        if ((md->ctypes[*eptr++] & ctype_space) != 0) return FALSE;\n      break;\n\n      case OP_WHITESPACE:\n      for (i = 1; i <= min; i++)\n        if ((md->ctypes[*eptr++] & ctype_space) == 0) return FALSE;\n      break;\n\n      case OP_NOT_WORDCHAR:\n      for (i = 1; i <= min; i++)\n        if ((md->ctypes[*eptr++] & ctype_word) != 0)\n          return FALSE;\n      break;\n\n      case OP_WORDCHAR:\n      for (i = 1; i <= min; i++)\n        if ((md->ctypes[*eptr++] & ctype_word) == 0)\n          return FALSE;\n      break;\n      }\n\n    /* If min = max, continue at the same level without recursing */\n\n    if (min == max) continue;\n\n    /* If minimizing, we have to test the rest of the pattern before each\n    subsequent match. */\n\n    if (minimize)\n      {\n      for (i = min;; i++)\n        {\n        if (match(eptr, ecode, offset_top, md, ims, eptrb, 0)) return TRUE;\n        if (i >= max || eptr >= md->end_subject) return FALSE;\n\n        c = *eptr++;\n        switch(ctype)\n          {\n          case OP_ANY:\n          if ((ims & PCRE_DOTALL) == 0 && c == NEWLINE) return FALSE;\n#ifdef SUPPORT_UTF8\n          if (md->utf8)\n            while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;\n#endif\n          break;\n\n          case OP_NOT_DIGIT:\n          if ((md->ctypes[c] & ctype_digit) != 0) return FALSE;\n          break;\n\n          case OP_DIGIT:\n          if ((md->ctypes[c] & ctype_digit) == 0) return FALSE;\n          break;\n\n          case OP_NOT_WHITESPACE:\n          if ((md->ctypes[c] & ctype_space) != 0) return FALSE;\n          break;\n\n          case OP_WHITESPACE:\n          if  ((md->ctypes[c] & ctype_space) == 0) return FALSE;\n          break;\n\n          case OP_NOT_WORDCHAR:\n          if ((md->ctypes[c] & ctype_word) != 0) return FALSE;\n          break;\n\n          case OP_WORDCHAR:\n          if ((md->ctypes[c] & ctype_word) == 0) return FALSE;\n          break;\n          }\n        }\n      /* Control never gets here */\n      }\n\n    /* If maximizing it is worth using inline code for speed, doing the type\n    test once at the start (i.e. keep it out of the loop). */\n\n    else\n      {\n      const uschar *pp = eptr;\n      switch(ctype)\n        {\n        case OP_ANY:\n\n        /* Special code is required for UTF8, but when the maximum is unlimited\n        we don't need it. */\n\n#ifdef SUPPORT_UTF8\n        if (md->utf8 && max < INT_MAX)\n          {\n          if ((ims & PCRE_DOTALL) == 0)\n            {\n            for (i = min; i < max; i++)\n              {\n              if (eptr >= md->end_subject || *eptr++ == NEWLINE) break;\n              while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;\n              }\n            }\n          else\n            {\n            for (i = min; i < max; i++)\n              {\n              eptr++;\n              while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;\n              }\n            }\n          break;\n          }\n#endif\n        /* Non-UTF8 can be faster */\n        if ((ims & PCRE_DOTALL) == 0)\n          {\n          for (i = min; i < max; i++)\n            {\n            if (eptr >= md->end_subject || *eptr == NEWLINE) break;\n            eptr++;\n            }\n          }\n        else\n          {\n          c = max - min;\n          if (c > md->end_subject - eptr) c = md->end_subject - eptr;\n          eptr += c;\n          }\n        break;\n\n        case OP_NOT_DIGIT:\n        for (i = min; i < max; i++)\n          {\n          if (eptr >= md->end_subject || (md->ctypes[*eptr] & ctype_digit) != 0)\n            break;\n          eptr++;\n          }\n        break;\n\n        case OP_DIGIT:\n        for (i = min; i < max; i++)\n          {\n          if (eptr >= md->end_subject || (md->ctypes[*eptr] & ctype_digit) == 0)\n            break;\n          eptr++;\n          }\n        break;\n\n        case OP_NOT_WHITESPACE:\n        for (i = min; i < max; i++)\n          {\n          if (eptr >= md->end_subject || (md->ctypes[*eptr] & ctype_space) != 0)\n            break;\n          eptr++;\n          }\n        break;\n\n        case OP_WHITESPACE:\n        for (i = min; i < max; i++)\n          {\n          if (eptr >= md->end_subject || (md->ctypes[*eptr] & ctype_space) == 0)\n            break;\n          eptr++;\n          }\n        break;\n\n        case OP_NOT_WORDCHAR:\n        for (i = min; i < max; i++)\n          {\n          if (eptr >= md->end_subject || (md->ctypes[*eptr] & ctype_word) != 0)\n            break;\n          eptr++;\n          }\n        break;\n\n        case OP_WORDCHAR:\n        for (i = min; i < max; i++)\n          {\n          if (eptr >= md->end_subject || (md->ctypes[*eptr] & ctype_word) == 0)\n            break;\n          eptr++;\n          }\n        break;\n        }\n\n      while (eptr >= pp)\n        {\n        if (match(eptr--, ecode, offset_top, md, ims, eptrb, 0))\n          return TRUE;\n#ifdef SUPPORT_UTF8\n        if (md->utf8)\n          while (eptr > pp && (*eptr & 0xc0) == 0x80) eptr--;\n#endif\n        }\n      return FALSE;\n      }\n    /* Control never gets here */\n\n    /* There's been some horrible disaster. */\n\n    default:\n    DPRINTF((\"Unknown opcode %d\\n\", *ecode));\n    md->errorcode = PCRE_ERROR_UNKNOWN_NODE;\n    return FALSE;\n    }\n\n  /* Do not stick any code in here without much thought; it is assumed\n  that \"continue\" in the code above comes out to here to repeat the main\n  loop. */\n\n  }             /* End of main loop */\n/* Control never reaches here */\n}\n\n\n\n\n/*************************************************\n*         Execute a Regular Expression           *\n*************************************************/\n\n/* This function applies a compiled re to a subject string and picks out\nportions of the string if it matches. Two elements in the vector are set for\neach substring: the offsets to the start and end of the substring.\n\nArguments:\n  external_re     points to the compiled expression\n  external_extra  points to \"hints\" from pcre_study() or is NULL\n  subject         points to the subject string\n  length          length of subject string (may contain binary zeros)\n  start_offset    where to start in the subject string\n  options         option bits\n  offsets         points to a vector of ints to be filled in with offsets\n  offsetcount     the number of elements in the vector\n\nReturns:          > 0 => success; value is the number of elements filled in\n                  = 0 => success, but offsets is not big enough\n                   -1 => failed to match\n                 < -1 => some kind of unexpected problem\n*/\n\nint\npcre_exec(const pcre *external_re, const pcre_extra *external_extra,\n  const char *subject, int length, int start_offset, int options, int *offsets,\n  int offsetcount)\n{\nint resetcount, ocount;\nint first_char = -1;\nint req_char = -1;\nint req_char2 = -1;\nunsigned long int ims = 0;\nmatch_data match_block;\nconst uschar *start_bits = NULL;\nconst uschar *start_match = (const uschar *)subject + start_offset;\nconst uschar *end_subject;\nconst uschar *req_char_ptr = start_match - 1;\nconst real_pcre *re = (const real_pcre *)external_re;\nconst real_pcre_extra *extra = (const real_pcre_extra *)external_extra;\nBOOL using_temporary_offsets = FALSE;\nBOOL anchored;\nBOOL startline;\n\nif ((options & ~PUBLIC_EXEC_OPTIONS) != 0) return PCRE_ERROR_BADOPTION;\n\nif (re == NULL || subject == NULL ||\n   (offsets == NULL && offsetcount > 0)) return PCRE_ERROR_NULL;\nif (re->magic_number != MAGIC_NUMBER) return PCRE_ERROR_BADMAGIC;\n\nanchored = ((re->options | options) & PCRE_ANCHORED) != 0;\nstartline = (re->options & PCRE_STARTLINE) != 0;\n\nmatch_block.start_pattern = re->code;\nmatch_block.start_subject = (const uschar *)subject;\nmatch_block.end_subject = match_block.start_subject + length;\nend_subject = match_block.end_subject;\n\nmatch_block.endonly = (re->options & PCRE_DOLLAR_ENDONLY) != 0;\nmatch_block.utf8 = (re->options & PCRE_UTF8) != 0;\n\nmatch_block.notbol = (options & PCRE_NOTBOL) != 0;\nmatch_block.noteol = (options & PCRE_NOTEOL) != 0;\nmatch_block.notempty = (options & PCRE_NOTEMPTY) != 0;\n\nmatch_block.errorcode = PCRE_ERROR_NOMATCH;     /* Default error */\n\nmatch_block.lcc = re->tables + lcc_offset;\nmatch_block.ctypes = re->tables + ctypes_offset;\n\n/* The ims options can vary during the matching as a result of the presence\nof (?ims) items in the pattern. They are kept in a local variable so that\nrestoring at the exit of a group is easy. */\n\nims = re->options & (PCRE_CASELESS|PCRE_MULTILINE|PCRE_DOTALL);\n\n/* If the expression has got more back references than the offsets supplied can\nhold, we get a temporary bit of working store to use during the matching.\nOtherwise, we can use the vector supplied, rounding down its size to a multiple\nof 3. */\n\nocount = offsetcount - (offsetcount % 3);\n\nif (re->top_backref > 0 && re->top_backref >= ocount/3)\n  {\n  ocount = re->top_backref * 3 + 3;\n  match_block.offset_vector = (int *)(pcre_malloc)(ocount * sizeof(int));\n  if (match_block.offset_vector == NULL) return PCRE_ERROR_NOMEMORY;\n  using_temporary_offsets = TRUE;\n  DPRINTF((\"Got memory to hold back references\\n\"));\n  }\nelse match_block.offset_vector = offsets;\n\nmatch_block.offset_end = ocount;\nmatch_block.offset_max = (2*ocount)/3;\nmatch_block.offset_overflow = FALSE;\n\n/* Compute the minimum number of offsets that we need to reset each time. Doing\nthis makes a huge difference to execution time when there aren't many brackets\nin the pattern. */\n\nresetcount = 2 + re->top_bracket * 2;\nif (resetcount > offsetcount) resetcount = ocount;\n\n/* Reset the working variable associated with each extraction. These should\nnever be used unless previously set, but they get saved and restored, and so we\ninitialize them to avoid reading uninitialized locations. */\n\nif (match_block.offset_vector != NULL)\n  {\n  register int *iptr = match_block.offset_vector + ocount;\n  register int *iend = iptr - resetcount/2 + 1;\n  while (--iptr >= iend) *iptr = -1;\n  }\n\n/* Set up the first character to match, if available. The first_char value is\nnever set for an anchored regular expression, but the anchoring may be forced\nat run time, so we have to test for anchoring. The first char may be unset for\nan unanchored pattern, of course. If there's no first char and the pattern was\nstudied, there may be a bitmap of possible first characters. */\n\nif (!anchored)\n  {\n  if ((re->options & PCRE_FIRSTSET) != 0)\n    {\n    first_char = re->first_char;\n    if ((ims & PCRE_CASELESS) != 0) first_char = match_block.lcc[first_char];\n    }\n  else\n    if (!startline && extra != NULL &&\n      (extra->options & PCRE_STUDY_MAPPED) != 0)\n        start_bits = extra->start_bits;\n  }\n\n/* For anchored or unanchored matches, there may be a \"last known required\ncharacter\" set. If the PCRE_CASELESS is set, implying that the match starts\ncaselessly, or if there are any changes of this flag within the regex, set up\nboth cases of the character. Otherwise set the two values the same, which will\navoid duplicate testing (which takes significant time). This covers the vast\nmajority of cases. It will be suboptimal when the case flag changes in a regex\nand the required character in fact is caseful. */\n\nif ((re->options & PCRE_REQCHSET) != 0)\n  {\n  req_char = re->req_char;\n  req_char2 = ((re->options & (PCRE_CASELESS | PCRE_ICHANGED)) != 0)?\n    (re->tables + fcc_offset)[req_char] : req_char;\n  }\n\n/* Loop for handling unanchored repeated matching attempts; for anchored regexs\nthe loop runs just once. */\n\ndo\n  {\n  int rc;\n  register int *iptr = match_block.offset_vector;\n  register int *iend = iptr + resetcount;\n\n  /* Reset the maximum number of extractions we might see. */\n\n  while (iptr < iend) *iptr++ = -1;\n\n  /* Advance to a unique first char if possible */\n\n  if (first_char >= 0)\n    {\n    if ((ims & PCRE_CASELESS) != 0)\n      while (start_match < end_subject &&\n             match_block.lcc[*start_match] != first_char)\n        start_match++;\n    else\n      while (start_match < end_subject && *start_match != first_char)\n        start_match++;\n    }\n\n  /* Or to just after \\n for a multiline match if possible */\n\n  else if (startline)\n    {\n    if (start_match > match_block.start_subject + start_offset)\n      {\n      while (start_match < end_subject && start_match[-1] != NEWLINE)\n        start_match++;\n      }\n    }\n\n  /* Or to a non-unique first char after study */\n\n  else if (start_bits != NULL)\n    {\n    while (start_match < end_subject)\n      {\n      register int c = *start_match;\n      if ((start_bits[c/8] & (1 << (c&7))) == 0) start_match++; else break;\n      }\n    }\n\n#ifdef DEBUG  /* Sigh. Some compilers never learn. */\n  printf(\">>>> Match against: \");\n  pchars(start_match, end_subject - start_match, TRUE, &match_block);\n  printf(\"\\n\");\n#endif\n\n  /* If req_char is set, we know that that character must appear in the subject\n  for the match to succeed. If the first character is set, req_char must be\n  later in the subject; otherwise the test starts at the match point. This\n  optimization can save a huge amount of backtracking in patterns with nested\n  unlimited repeats that aren't going to match. We don't know what the state of\n  case matching may be when this character is hit, so test for it in both its\n  cases if necessary. However, the different cased versions will not be set up\n  unless PCRE_CASELESS was given or the casing state changes within the regex.\n  Writing separate code makes it go faster, as does using an autoincrement and\n  backing off on a match. */\n\n  if (req_char >= 0)\n    {\n    register const uschar *p = start_match + ((first_char >= 0)? 1 : 0);\n\n    /* We don't need to repeat the search if we haven't yet reached the\n    place we found it at last time. */\n\n    if (p > req_char_ptr)\n      {\n      /* Do a single test if no case difference is set up */\n\n      if (req_char == req_char2)\n        {\n        while (p < end_subject)\n          {\n          if (*p++ == req_char) { p--; break; }\n          }\n        }\n\n      /* Otherwise test for either case */\n\n      else\n        {\n        while (p < end_subject)\n          {\n          register int pp = *p++;\n          if (pp == req_char || pp == req_char2) { p--; break; }\n          }\n        }\n\n      /* If we can't find the required character, break the matching loop */\n\n      if (p >= end_subject) break;\n\n      /* If we have found the required character, save the point where we\n      found it, so that we don't search again next time round the loop if\n      the start hasn't passed this character yet. */\n\n      req_char_ptr = p;\n      }\n    }\n\n  /* When a match occurs, substrings will be set for all internal extractions;\n  we just need to set up the whole thing as substring 0 before returning. If\n  there were too many extractions, set the return code to zero. In the case\n  where we had to get some local store to hold offsets for backreferences, copy\n  those back references that we can. In this case there need not be overflow\n  if certain parts of the pattern were not used. */\n\n  match_block.start_match = start_match;\n  if (!match(start_match, re->code, 2, &match_block, ims, NULL, match_isgroup))\n    continue;\n\n  /* Copy the offset information from temporary store if necessary */\n\n  if (using_temporary_offsets)\n    {\n    if (offsetcount >= 4)\n      {\n      memcpy(offsets + 2, match_block.offset_vector + 2,\n        (offsetcount - 2) * sizeof(int));\n      DPRINTF((\"Copied offsets from temporary memory\\n\"));\n      }\n    if (match_block.end_offset_top > offsetcount)\n      match_block.offset_overflow = TRUE;\n\n    DPRINTF((\"Freeing temporary memory\\n\"));\n    (pcre_free)(match_block.offset_vector);\n    }\n\n  rc = match_block.offset_overflow? 0 : match_block.end_offset_top/2;\n\n  if (offsetcount < 2) rc = 0; else\n    {\n    offsets[0] = start_match - match_block.start_subject;\n    offsets[1] = match_block.end_match_ptr - match_block.start_subject;\n    }\n\n  DPRINTF((\">>>> returning %d\\n\", rc));\n  return rc;\n  }\n\n/* This \"while\" is the end of the \"do\" above */\n\nwhile (!anchored &&\n       match_block.errorcode == PCRE_ERROR_NOMATCH &&\n       start_match++ < end_subject);\n\nif (using_temporary_offsets)\n  {\n  DPRINTF((\"Freeing temporary memory\\n\"));\n  (pcre_free)(match_block.offset_vector);\n  }\n\nDPRINTF((\">>>> returning %d\\n\", match_block.errorcode));\n\nreturn match_block.errorcode;\n}\n\n/* End of pcre.c */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/RePlugin/pcre.h",
    "content": "/*************************************************\n*       Perl-Compatible Regular Expressions      *\n*************************************************/\n\n/* Copyright (c) 1997-2001 University of Cambridge */\n\n#ifndef _PCRE_H\n#define _PCRE_H\n\n/* The file pcre.h is build by \"configure\". Do not edit it; instead\nmake changes to pcre.in. */\n\n#define PCRE_MAJOR          3\n#define PCRE_MINOR          9\n#define PCRE_DATE           02-Jan-2002\n\n/* Win32 uses DLL by default */\n\n#ifdef _WIN32\n#define STATIC\n# ifdef STATIC\n#  define PCRE_DL_IMPORT\n# else\n#  define PCRE_DL_IMPORT __declspec(dllimport)\n# endif\n#else\n# define PCRE_DL_IMPORT\n#endif\n\n/* Have to include stdlib.h in order to ensure that size_t is defined;\nit is needed here for malloc. */\n\n#include <stdlib.h>\n\n/* Allow for C++ users */\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Options */\n\n#define PCRE_CASELESS        0x0001\n#define PCRE_MULTILINE       0x0002\n#define PCRE_DOTALL          0x0004\n#define PCRE_EXTENDED        0x0008\n#define PCRE_ANCHORED        0x0010\n#define PCRE_DOLLAR_ENDONLY  0x0020\n#define PCRE_EXTRA           0x0040\n#define PCRE_NOTBOL          0x0080\n#define PCRE_NOTEOL          0x0100\n#define PCRE_UNGREEDY        0x0200\n#define PCRE_NOTEMPTY        0x0400\n#define PCRE_UTF8            0x0800\n\n/* Exec-time and get-time error codes */\n\n#define PCRE_ERROR_NOMATCH        (-1)\n#define PCRE_ERROR_NULL           (-2)\n#define PCRE_ERROR_BADOPTION      (-3)\n#define PCRE_ERROR_BADMAGIC       (-4)\n#define PCRE_ERROR_UNKNOWN_NODE   (-5)\n#define PCRE_ERROR_NOMEMORY       (-6)\n#define PCRE_ERROR_NOSUBSTRING    (-7)\n\n/* Request types for pcre_fullinfo() */\n\n#define PCRE_INFO_OPTIONS         0\n#define PCRE_INFO_SIZE            1\n#define PCRE_INFO_CAPTURECOUNT    2\n#define PCRE_INFO_BACKREFMAX      3\n#define PCRE_INFO_FIRSTCHAR       4\n#define PCRE_INFO_FIRSTTABLE      5\n#define PCRE_INFO_LASTLITERAL     6\n\n/* Types */\n\nstruct real_pcre;        /* declaration; the definition is private  */\nstruct real_pcre_extra;  /* declaration; the definition is private */\n\ntypedef struct real_pcre pcre;\ntypedef struct real_pcre_extra pcre_extra;\n\n/* Store get and free functions. These can be set to alternative malloc/free\nfunctions if required. Some magic is required for Win32 DLL; it is null on\nother OS. */\n\nPCRE_DL_IMPORT extern void *(*pcre_malloc)(size_t);\nPCRE_DL_IMPORT extern void  (*pcre_free)(void *);\n\n#undef PCRE_DL_IMPORT\n\n/* Functions */\n\nextern pcre *pcre_compile(const char *, int, const char **, int *,\n              const unsigned char *);\nextern int  pcre_copy_substring(const char *, int *, int, int, char *, int);\nextern int  pcre_exec(const pcre *, const pcre_extra *, const char *,\n              int, int, int, int *, int);\nextern void pcre_free_substring(const char *);\nextern void pcre_free_substring_list(const char **);\nextern int  pcre_get_substring(const char *, int *, int, int, const char **);\nextern int  pcre_get_substring_list(const char *, int *, int, const char ***);\nextern int  pcre_info(const pcre *, int *, int *);\nextern int  pcre_fullinfo(const pcre *, const pcre_extra *, int, void *);\nextern const unsigned char *pcre_maketables(void);\nextern pcre_extra *pcre_study(const pcre *, int, const char **);\nextern const char *pcre_version(void);\n\n#ifdef __cplusplus\n}  /* extern \"C\" */\n#endif\n\n#endif /* End of pcre.h */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/RePlugin/rePlugin.h",
    "content": "/*\tRegular Expression Plugin (This class comment becomes part of rePlugin.c)\n\n\tRePlugin translate: 'RePlugin.c' doInlining: true.\n\nSee documentation and source code for the PCRE C Library Code.  This plugin is designed to serve an object such as RePattern:\n\n\tpatternStr\t\tA 0-terminated string comprising the pattern to be compiled.\n\tcompileFlags\tAn Integer representing re compiler options\n\tPCREBuffer\t\tA ByteArray of regular expression bytecodes\n\textraPtr\t\t\tA ByteArray of match optimization data (or nil)\n\terrorString\t\tA String Object For Holding an Error Message (when compile failed) \n\terrorOffset\t\tThe index in patternStr (0-based) where the error ocurred (when compile failed)\n\tmatchFlags\t\tAn Integer representing re matcher options\n\tmatchSpaceObj\tAn Integer array for match results and workspace during matching.\n\nThe instance variables must appear in the preceding order.  MatchSpaceObj must be allocated by the calling routine and contain at least 6*(numGroups+1) bytes.\n*/\n#include \"pcre.h\"\n#include \"internal.h\"\n\n/* Adjust malloc and free routines as used by PCRE */\nstatic void rePluginFree(void * aPointer);\nstatic void * rePluginMalloc(size_t anInteger);\nvoid *(*pcre_malloc)(size_t) = rePluginMalloc;\nvoid  (*pcre_free)(void *) = rePluginFree;\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/RePlugin/study.c",
    "content": "/*************************************************\n*      Perl-Compatible Regular Expressions       *\n*************************************************/\n\n/*\nThis is a library of functions to support regular expressions whose syntax\nand semantics are as close as possible to those of the Perl 5 language. See\nthe file Tech.Notes for some information on the internals.\n\nWritten by: Philip Hazel <ph10@cam.ac.uk>\n\n           Copyright (c) 1997-2001 University of Cambridge\n\n-----------------------------------------------------------------------------\nPermission is granted to anyone to use this software for any purpose on any\ncomputer system, and to redistribute it freely, subject to the following\nrestrictions:\n\n1. This software is distributed in the hope that it will be useful,\n   but WITHOUT ANY WARRANTY; without even the implied warranty of\n   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n2. The origin of this software must not be misrepresented, either by\n   explicit claim or by omission.\n\n3. Altered versions must be plainly marked as such, and must not be\n   misrepresented as being the original software.\n\n4. If PCRE is embedded in any software that is released under the GNU\n   General Purpose Licence (GPL), then the terms of that licence shall\n   supersede any condition above with which it is incompatible.\n-----------------------------------------------------------------------------\n*/\n\n\n/* Include the internals header, which itself includes Standard C headers plus\nthe external pcre header. */\n\n#include \"internal.h\"\n\n\n\n/*************************************************\n*      Set a bit and maybe its alternate case    *\n*************************************************/\n\n/* Given a character, set its bit in the table, and also the bit for the other\nversion of a letter if we are caseless.\n\nArguments:\n  start_bits    points to the bit map\n  c             is the character\n  caseless      the caseless flag\n  cd            the block with char table pointers\n\nReturns:        nothing\n*/\n\nstatic void\nset_bit(uschar *start_bits, int c, BOOL caseless, compile_data *cd)\n{\nstart_bits[c/8] |= (1 << (c&7));\nif (caseless && (cd->ctypes[c] & ctype_letter) != 0)\n  start_bits[cd->fcc[c]/8] |= (1 << (cd->fcc[c]&7));\n}\n\n\n\n/*************************************************\n*          Create bitmap of starting chars       *\n*************************************************/\n\n/* This function scans a compiled unanchored expression and attempts to build a\nbitmap of the set of initial characters. If it can't, it returns FALSE. As time\ngoes by, we may be able to get more clever at doing this.\n\nArguments:\n  code         points to an expression\n  start_bits   points to a 32-byte table, initialized to 0\n  caseless     the current state of the caseless flag\n  cd           the block with char table pointers\n\nReturns:       TRUE if table built, FALSE otherwise\n*/\n\nstatic BOOL\nset_start_bits(const uschar *code, uschar *start_bits, BOOL caseless,\n  compile_data *cd)\n{\nregister int c;\n\n/* This next statement and the later reference to dummy are here in order to\ntrick the optimizer of the IBM C compiler for OS/2 into generating correct\ncode. Apparently IBM isn't going to fix the problem, and we would rather not\ndisable optimization (in this module it actually makes a big difference, and\nthe pcre module can use all the optimization it can get). */\n\nvolatile int dummy;\n\ndo\n  {\n  const uschar *tcode = code + 3;\n  BOOL try_next = TRUE;\n\n  while (try_next)\n    {\n    /* If a branch starts with a bracket or a positive lookahead assertion,\n    recurse to set bits from within them. That's all for this branch. */\n\n    if ((int)*tcode >= OP_BRA || *tcode == OP_ASSERT)\n      {\n      if (!set_start_bits(tcode, start_bits, caseless, cd))\n        return FALSE;\n      try_next = FALSE;\n      }\n\n    else switch(*tcode)\n      {\n      default:\n      return FALSE;\n\n      /* Skip over extended extraction bracket number */\n\n      case OP_BRANUMBER:\n      tcode += 3;\n      break;\n\n      /* Skip over lookbehind and negative lookahead assertions */\n\n      case OP_ASSERT_NOT:\n      case OP_ASSERTBACK:\n      case OP_ASSERTBACK_NOT:\n      do tcode += (tcode[1] << 8) + tcode[2]; while (*tcode == OP_ALT);\n      tcode += 3;\n      break;\n\n      /* Skip over an option setting, changing the caseless flag */\n\n      case OP_OPT:\n      caseless = (tcode[1] & PCRE_CASELESS) != 0;\n      tcode += 2;\n      break;\n\n      /* BRAZERO does the bracket, but carries on. */\n\n      case OP_BRAZERO:\n      case OP_BRAMINZERO:\n      if (!set_start_bits(++tcode, start_bits, caseless, cd))\n        return FALSE;\n      dummy = 1;\n      do tcode += (tcode[1] << 8) + tcode[2]; while (*tcode == OP_ALT);\n      tcode += 3;\n      break;\n\n      /* Single-char * or ? sets the bit and tries the next item */\n\n      case OP_STAR:\n      case OP_MINSTAR:\n      case OP_QUERY:\n      case OP_MINQUERY:\n      set_bit(start_bits, tcode[1], caseless, cd);\n      tcode += 2;\n      break;\n\n      /* Single-char upto sets the bit and tries the next */\n\n      case OP_UPTO:\n      case OP_MINUPTO:\n      set_bit(start_bits, tcode[3], caseless, cd);\n      tcode += 4;\n      break;\n\n      /* At least one single char sets the bit and stops */\n\n      case OP_EXACT:       /* Fall through */\n      tcode++;\n\n      case OP_CHARS:       /* Fall through */\n      tcode++;\n\n      case OP_PLUS:\n      case OP_MINPLUS:\n      set_bit(start_bits, tcode[1], caseless, cd);\n      try_next = FALSE;\n      break;\n\n      /* Single character type sets the bits and stops */\n\n      case OP_NOT_DIGIT:\n      for (c = 0; c < 32; c++)\n        start_bits[c] |= ~cd->cbits[c+cbit_digit];\n      try_next = FALSE;\n      break;\n\n      case OP_DIGIT:\n      for (c = 0; c < 32; c++)\n        start_bits[c] |= cd->cbits[c+cbit_digit];\n      try_next = FALSE;\n      break;\n\n      case OP_NOT_WHITESPACE:\n      for (c = 0; c < 32; c++)\n        start_bits[c] |= ~cd->cbits[c+cbit_space];\n      try_next = FALSE;\n      break;\n\n      case OP_WHITESPACE:\n      for (c = 0; c < 32; c++)\n        start_bits[c] |= cd->cbits[c+cbit_space];\n      try_next = FALSE;\n      break;\n\n      case OP_NOT_WORDCHAR:\n      for (c = 0; c < 32; c++)\n        start_bits[c] |= ~cd->cbits[c+cbit_word];\n      try_next = FALSE;\n      break;\n\n      case OP_WORDCHAR:\n      for (c = 0; c < 32; c++)\n        start_bits[c] |= cd->cbits[c+cbit_word];\n      try_next = FALSE;\n      break;\n\n      /* One or more character type fudges the pointer and restarts, knowing\n      it will hit a single character type and stop there. */\n\n      case OP_TYPEPLUS:\n      case OP_TYPEMINPLUS:\n      tcode++;\n      break;\n\n      case OP_TYPEEXACT:\n      tcode += 3;\n      break;\n\n      /* Zero or more repeats of character types set the bits and then\n      try again. */\n\n      case OP_TYPEUPTO:\n      case OP_TYPEMINUPTO:\n      tcode += 2;               /* Fall through */\n\n      case OP_TYPESTAR:\n      case OP_TYPEMINSTAR:\n      case OP_TYPEQUERY:\n      case OP_TYPEMINQUERY:\n      switch(tcode[1])\n        {\n        case OP_NOT_DIGIT:\n        for (c = 0; c < 32; c++)\n          start_bits[c] |= ~cd->cbits[c+cbit_digit];\n        break;\n\n        case OP_DIGIT:\n        for (c = 0; c < 32; c++)\n          start_bits[c] |= cd->cbits[c+cbit_digit];\n        break;\n\n        case OP_NOT_WHITESPACE:\n        for (c = 0; c < 32; c++)\n          start_bits[c] |= ~cd->cbits[c+cbit_space];\n        break;\n\n        case OP_WHITESPACE:\n        for (c = 0; c < 32; c++)\n          start_bits[c] |= cd->cbits[c+cbit_space];\n        break;\n\n        case OP_NOT_WORDCHAR:\n        for (c = 0; c < 32; c++)\n          start_bits[c] |= ~cd->cbits[c+cbit_word];\n        break;\n\n        case OP_WORDCHAR:\n        for (c = 0; c < 32; c++)\n          start_bits[c] |= cd->cbits[c+cbit_word];\n        break;\n        }\n\n      tcode += 2;\n      break;\n\n      /* Character class: set the bits and either carry on or not,\n      according to the repeat count. */\n\n      case OP_CLASS:\n        {\n        tcode++;\n        for (c = 0; c < 32; c++) start_bits[c] |= tcode[c];\n        tcode += 32;\n        switch (*tcode)\n          {\n          case OP_CRSTAR:\n          case OP_CRMINSTAR:\n          case OP_CRQUERY:\n          case OP_CRMINQUERY:\n          tcode++;\n          break;\n\n          case OP_CRRANGE:\n          case OP_CRMINRANGE:\n          if (((tcode[1] << 8) + tcode[2]) == 0) tcode += 5;\n            else try_next = FALSE;\n          break;\n\n          default:\n          try_next = FALSE;\n          break;\n          }\n        }\n      break; /* End of class handling */\n\n      }      /* End of switch */\n    }        /* End of try_next loop */\n\n  code += (code[1] << 8) + code[2];   /* Advance to next branch */\n  }\nwhile (*code == OP_ALT);\nreturn TRUE;\n}\n\n\n\n/*************************************************\n*          Study a compiled expression           *\n*************************************************/\n\n/* This function is handed a compiled expression that it must study to produce\ninformation that will speed up the matching. It returns a pcre_extra block\nwhich then gets handed back to pcre_exec().\n\nArguments:\n  re        points to the compiled expression\n  options   contains option bits\n  errorptr  points to where to place error messages;\n            set NULL unless error\n\nReturns:    pointer to a pcre_extra block,\n            NULL on error or if no optimization possible\n*/\n\npcre_extra *\npcre_study(const pcre *external_re, int options, const char **errorptr)\n{\nuschar start_bits[32];\nreal_pcre_extra *extra;\nconst real_pcre *re = (const real_pcre *)external_re;\ncompile_data compile_block;\n\n*errorptr = NULL;\n\nif (re == NULL || re->magic_number != MAGIC_NUMBER)\n  {\n  *errorptr = \"argument is not a compiled regular expression\";\n  return NULL;\n  }\n\nif ((options & ~PUBLIC_STUDY_OPTIONS) != 0)\n  {\n  *errorptr = \"unknown or incorrect option bit(s) set\";\n  return NULL;\n  }\n\n/* For an anchored pattern, or an unchored pattern that has a first char, or a\nmultiline pattern that matches only at \"line starts\", no further processing at\npresent. */\n\nif ((re->options & (PCRE_ANCHORED|PCRE_FIRSTSET|PCRE_STARTLINE)) != 0)\n  return NULL;\n\n/* Set the character tables in the block which is passed around */\n\ncompile_block.lcc = re->tables + lcc_offset;\ncompile_block.fcc = re->tables + fcc_offset;\ncompile_block.cbits = re->tables + cbits_offset;\ncompile_block.ctypes = re->tables + ctypes_offset;\n\n/* See if we can find a fixed set of initial characters for the pattern. */\n\nmemset(start_bits, 0, 32 * sizeof(uschar));\nif (!set_start_bits(re->code, start_bits, (re->options & PCRE_CASELESS) != 0,\n  &compile_block)) return NULL;\n\n/* Get an \"extra\" block and put the information therein. */\n\nextra = (real_pcre_extra *)(pcre_malloc)(sizeof(real_pcre_extra));\n\nif (extra == NULL)\n  {\n  *errorptr = \"failed to get memory\";\n  return NULL;\n  }\n\nextra->options = PCRE_STUDY_MAPPED;\nmemcpy(extra->start_bits, start_bits, sizeof(start_bits));\n\nreturn (pcre_extra *)extra;\n}\n\n/* End of study.c */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/SecurityPlugin/SecurityPlugin.h",
    "content": "/* security plugin header file */\n\n/* image writing */\nint ioDisableImageWrite(void);\nint ioCanWriteImage(void);\n\n/* untrusted and secure directory locations */\nchar *ioGetSecureUserDirectory(void);\nchar *ioGetUntrustedUserDirectory(void);\n\n/* following must be called by the VM before interpret() */\nint ioInitSecurity(void);\nint ioCanListenOnPort(int s, int port);\nint ioCanConnectToPort(int netAddr, int port);\nint ioCanCreateSocketOfType(int netType, int socketType);\nint ioCanCreateSocketOfType(int netType, int socketType);\nint ioCanConnectToPort(int netAddr, int port);\nint ioDisableSocketAccess();\nint ioHasSocketAccess();\nint ioCanCreatePathOfSize(char* pathString, int pathStringLength);\nint ioCanDeleteFileOfSize(char* pathString, int pathStringLength);\nint ioCanDeletePathOfSize(char* pathString, int pathStringLength);\nint ioCanGetFileTypeOfSize(char* pathString, int pathStringLength);\nint ioCanListPathOfSize(char* pathString, int pathStringLength);\nint ioCanOpenAsyncFileOfSizeWritable(char* pathString, int pathStringLength, int writeFlag);\nint ioCanOpenFileOfSizeWritable(char* pathString, int pathStringLength, int writeFlag);\nint ioCanRenameFileOfSize(char* pathString, int pathStringLength);\nint ioCanRenameImage(void);\nint ioCanSetFileTypeOfSize(char* pathString, int pathStringLength);\nint ioDisableFileAccess(void);\nint ioHasFileAccess(void);\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/SerialPlugin/SerialPlugin.h",
    "content": "/* serial port primitives */\n\n/* module initialization/shutdown */\nint serialPortInit(void);\nint serialPortShutdown(void);\n\n#pragma export on\nint serialPortClose(int portNum);\nint serialPortCount(void);\nint serialPortOpen(\n  int portNum, int baudRate, int stopBitsType, int parityType, int dataBits,\n  int inFlowCtrl, int outFlowCtrl, int xOnChar, int xOffChar);\nint serialPortReadInto(int portNum, int count, int bufferPtr);\nint serialPortWriteFrom(int portNum, int count, int bufferPtr);\n#pragma export off\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/SocketPlugin/SocketPlugin.h",
    "content": "/* squeak socket support header file */\n\n/* module initialization/shutdown */\nsqInt socketInit(void);\nsqInt socketShutdown(void);\n\ntypedef struct\n{\n  int\tsessionID;\n  int\tsocketType;  /* 0 = TCP, 1 = UDP */\n  void\t*privateSocketPtr;\n}  SQSocket, *SocketPtr;\n\n/* networking primitives */\nsqInt sqNetworkInit(sqInt resolverSemaIndex);\nvoid  sqNetworkShutdown(void);\nvoid  sqResolverAbort(void);\nvoid  sqResolverAddrLookupResult(char *nameForAddress, sqInt nameSize);\nsqInt sqResolverAddrLookupResultSize(void);\nsqInt sqResolverError(void);\nsqInt sqResolverLocalAddress(void);\nsqInt sqResolverNameLookupResult(void);\nvoid  sqResolverStartAddrLookup(sqInt address);\nvoid  sqResolverStartNameLookup(char *hostName, sqInt nameSize);\nsqInt sqResolverStatus(void);\nvoid  sqSocketAbortConnection(SocketPtr s);\nvoid  sqSocketCloseConnection(SocketPtr s);\nsqInt sqSocketConnectionStatus(SocketPtr s);\nvoid  sqSocketConnectToPort(SocketPtr s, sqInt addr, sqInt port);\nvoid  sqSocketCreateNetTypeSocketTypeRecvBytesSendBytesSemaID(SocketPtr s, sqInt netType, sqInt socketType, sqInt recvBufSize, sqInt sendBufSize, sqInt semaIndex);\nvoid  sqSocketCreateNetTypeSocketTypeRecvBytesSendBytesSemaIDReadSemaIDWriteSemaID(SocketPtr s, sqInt netType, sqInt socketType, sqInt recvBufSize, sqInt sendBufSize, sqInt semaIndex, sqInt readSemaIndex, sqInt writeSemaIndex);\nvoid  sqSocketDestroy(SocketPtr s);\nsqInt sqSocketError(SocketPtr s);\nvoid  sqSocketListenOnPort(SocketPtr s, sqInt port);\nsqInt sqSocketLocalAddress(SocketPtr s);\nsqInt sqSocketLocalPort(SocketPtr s);\nsqInt sqSocketReceiveDataAvailable(SocketPtr s);\nsqInt sqSocketReceiveDataBufCount(SocketPtr s, char *buf, sqInt bufSize);\nsqInt sqSocketRemoteAddress(SocketPtr s);\nsqInt sqSocketRemotePort(SocketPtr s);\nsqInt sqSocketSendDataBufCount(SocketPtr s, char *buf, sqInt bufSize);\nsqInt sqSocketSendDone(SocketPtr s);\n/* ar 7/16/1999: New primitives for accept().  Note: If accept() calls are not supported simply make the calls fail and the old connection style will be used. */\nvoid  sqSocketListenOnPortBacklogSize(SocketPtr s, sqInt port, sqInt backlogSize);\nvoid  sqSocketListenOnPortBacklogSizeInterface(SocketPtr s, sqInt port, sqInt backlogSize, sqInt addr);\nvoid  sqSocketAcceptFromRecvBytesSendBytesSemaID(SocketPtr s, SocketPtr serverSocket, sqInt recvBufSize, sqInt sendBufSize, sqInt semaIndex);\nvoid  sqSocketAcceptFromRecvBytesSendBytesSemaIDReadSemaIDWriteSemaID(SocketPtr s, SocketPtr serverSocket, sqInt recvBufSize, sqInt sendBufSize, sqInt semaIndex, sqInt readSemaIndex, sqInt writeSemaIndex);\nsqInt sqSocketReceiveUDPDataBufCountaddressportmoreFlag(SocketPtr s, char *buf, sqInt bufSize,  sqInt *address,  sqInt *port, sqInt *moreFlag);\nsqInt sqSockettoHostportSendDataBufCount(SocketPtr s, sqInt address, sqInt port, char *buf, sqInt bufSize);\nsqInt sqSocketSetOptionsoptionNameStartoptionNameSizeoptionValueStartoptionValueSizereturnedValue(SocketPtr s, char *optionName, sqInt optionNameSize, char *optionValue, sqInt optionValueSize, sqInt *result);\nsqInt sqSocketGetOptionsoptionNameStartoptionNameSizereturnedValue(SocketPtr s, char *optionName, sqInt optionNameSize, sqInt *result);\n/* tpr 4/12/06 add declarations for two new socket routines */\nvoid sqSocketBindToPort(SocketPtr s, int addr, int port);\nvoid sqSocketSetReusable(SocketPtr s);\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/SoundCodecPrims/SoundCodecPrims.h",
    "content": "/* SoundCodec Plugin */\n/* prototypes */\nvoid gsmEncode(\n\tint state, int frameCount,\n\tint src, int srcIndex, int srcSize,\n\tint dst, int dstIndex, int dstSize,\n\tint *srcDelta, int *dstDelta);\n\t\nvoid gsmDecode(\n\tint state, int frameCount,\n\tint src, int srcIndex, int srcSize,\n\tint dst, int dstIndex, int dstSize,\n\tint *srcDelta, int *dstDelta);\n\t\nvoid gsmInitState(int state);\n\nint gsmStateBytes(void);\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/SoundCodecPrims/sqSoundCodecPluginBasicPrims.c",
    "content": "/*\n * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische\n * Universitaet Berlin.  See the accompanying file \"COPYRIGHT\" for\n * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.\n */\n\n/* This file was created by concatenating a number of separate header\n   and source files from Jutta Degener and Carsten Bormann implementation,\n   patch level 10. This was done to simplify Squeak source code maintenance.\n */\n\n#include <assert.h>\n#include <stdio.h>\n#include <string.h>\n\n/****** begin \"gsm.h\" *****/\n\n#ifdef __cplusplus\n#\tdefine\tNeedFunctionPrototypes\t1\n#endif\n\n#if __STDC__\n#\tdefine\tNeedFunctionPrototypes\t1\n#endif\n\n#ifdef _NO_PROTO\n#\tundef\tNeedFunctionPrototypes\n#endif\n\n#ifdef NeedFunctionPrototypes\n#   include\t<stdio.h>\t\t/* for FILE * \t*/\n#endif\n\n#undef GSM_P\n#if NeedFunctionPrototypes\n#\tdefine\tGSM_P( protos )\tprotos\n#else\n#\tdefine  GSM_P( protos )\t( /* protos */ )\n#endif\n\n/*\n *\tInterface\n */\n\ntypedef struct gsm_state * \tgsm;\ntypedef short\t\t   \tgsm_signal;\t\t/* signed 16 bit */\ntypedef unsigned char\t\tgsm_byte;\ntypedef gsm_byte \t\tgsm_frame[33];\t\t/* 33 * 8 bits\t */\n\n#define\tGSM_MAGIC\t\t0xD\t\t  \t/* 13 kbit/s RPE-LTP */\n\n#define\tGSM_PATCHLEVEL\t\t10\n#define\tGSM_MINOR\t\t0\n#define\tGSM_MAJOR\t\t1\n\n#define\tGSM_OPT_VERBOSE\t\t1\n#define\tGSM_OPT_FAST\t\t2\n#define\tGSM_OPT_LTP_CUT\t\t3\n#define\tGSM_OPT_WAV49\t\t4\n#define\tGSM_OPT_FRAME_INDEX\t5\n#define\tGSM_OPT_FRAME_CHAIN\t6\n\nextern gsm  gsm_create \tGSM_P((void));\nextern void gsm_destroy GSM_P((gsm));\t\n\nextern int  gsm_print   GSM_P((FILE *, gsm, gsm_byte  *));\nextern int  gsm_option  GSM_P((gsm, int, int *));\n\nextern void gsm_encode  GSM_P((gsm, gsm_signal *, gsm_byte  *));\nextern int  gsm_decode  GSM_P((gsm, gsm_byte   *, gsm_signal *));\n\nextern int  gsm_explode GSM_P((gsm, gsm_byte   *, gsm_signal *));\nextern void gsm_implode GSM_P((gsm, gsm_signal *, gsm_byte   *));\n\n/****** begin \"proto.h\" *****/\n\n#if __cplusplus\n#\tdefine\tNeedFunctionPrototypes\t1\n#endif\n\n#if __STDC__\n#\tdefine\tNeedFunctionPrototypes\t1\n#endif\n\n#ifdef\t_NO_PROTO\n#\tundef\tNeedFunctionPrototypes\n#endif\n\n#undef\tP\t/* gnu stdio.h actually defines this... \t*/\n#undef\tP0\n#undef\tP1\n#undef\tP2\n#undef\tP3\n#undef\tP4\n#undef\tP5\n#undef\tP6\n#undef\tP7\n#undef\tP8\n\n#if NeedFunctionPrototypes\n\n#\tdefine\tP( protos )\tprotos\n\n#\tdefine\tP0()\t\t\t\t(void)\n#\tdefine\tP1(x, a)\t\t\t(a)\n#\tdefine\tP2(x, a, b)\t\t\t(a, b)\n#\tdefine\tP3(x, a, b, c)\t\t\t(a, b, c)\n#\tdefine\tP4(x, a, b, c, d)\t\t(a, b, c, d)\t\n#\tdefine\tP5(x, a, b, c, d, e)\t\t(a, b, c, d, e)\n#\tdefine\tP6(x, a, b, c, d, e, f)\t\t(a, b, c, d, e, f)\n#\tdefine\tP7(x, a, b, c, d, e, f, g)\t(a, b, c, d, e, f, g)\n#\tdefine\tP8(x, a, b, c, d, e, f, g, h)\t(a, b, c, d, e, f, g, h)\n\n#else /* !NeedFunctionPrototypes */\n\n#\tdefine\tP( protos )\t( /* protos */ )\n\n#\tdefine\tP0()\t\t\t\t()\n#\tdefine\tP1(x, a)\t\t\tx a;\n#\tdefine\tP2(x, a, b)\t\t\tx a; b;\n#\tdefine\tP3(x, a, b, c)\t\t\tx a; b; c;\n#\tdefine\tP4(x, a, b, c, d)\t\tx a; b; c; d;\n#\tdefine\tP5(x, a, b, c, d, e)\t\tx a; b; c; d; e;\n#\tdefine\tP6(x, a, b, c, d, e, f)\t\tx a; b; c; d; e; f;\n#\tdefine\tP7(x, a, b, c, d, e, f, g)\tx a; b; c; d; e; f; g;\n#\tdefine\tP8(x, a, b, c, d, e, f, g, h)\tx a; b; c; d; e; f; g; h;\n\n#endif  /* !NeedFunctionPrototypes */\n\n/****** begin \"private.h\" *****/\n\ntypedef short\t\t\tword;\t\t/* 16 bit signed int\t*/\ntypedef long\t\t\tlongword;\t/* 32 bit signed int\t*/\n\ntypedef unsigned short\t\tuword;\t\t/* unsigned word\t*/\ntypedef unsigned long\t\tulongword;\t/* unsigned longword\t*/\n\nstruct gsm_state {\n\n\tword\t\tdp0[ 280 ];\n\n\tword\t\tz1;\t\t/* preprocessing.c, Offset_com. */\n\tlongword\tL_z2;\t\t/*                  Offset_com. */\n\tint\t\tmp;\t\t/*                  Preemphasis\t*/\n\n\tword\t\tu[8];\t\t/* short_term_aly_filter.c\t*/\n\tword\t\tLARpp[2][8]; \t/*                              */\n\tword\t\tj;\t\t/*                              */\n\n\tword            ltp_cut;        /* long_term.c, LTP crosscorr.  */\n\tword\t\tnrp; /* 40 */\t/* long_term.c, synthesis\t*/\n\tword\t\tv[9];\t\t/* short_term.c, synthesis\t*/\n\tword\t\tmsr;\t\t/* decoder.c,\tPostprocessing\t*/\n\n\tchar\t\tverbose;\t/* only used if !NDEBUG\t\t*/\n\tchar\t\tfast;\t\t/* only used if FAST\t\t*/\n\n\tchar\t\twav_fmt;\t/* only used if WAV49 defined\t*/\n\tunsigned char\tframe_index;\t/*            odd/even chaining\t*/\n\tunsigned char\tframe_chain;\t/*   half-byte to carry forward\t*/\n};\n\n\n#define\tMIN_WORD\t(-32767 - 1)\n#define\tMAX_WORD\t  32767\n\n#define\tMIN_LONGWORD\t(-2147483647 - 1)\n#define\tMAX_LONGWORD\t  2147483647\n\n#ifdef\tSASR\t\t/* flag: >> is a signed arithmetic shift right */\n#undef\tSASR\n#define\tSASR(x, by)\t((x) >> (by))\n#else\n#define\tSASR(x, by)\t((x) >= 0 ? (x) >> (by) : (~(-((x) + 1) >> (by))))\n#endif\t/* SASR */\n\n//#include \"proto.h\"\n\n/*\n *\tPrototypes from add.c\n */\nextern word\tgsm_mult \tP((word a, word b));\nextern longword gsm_L_mult \tP((word a, word b));\nextern word\tgsm_mult_r\tP((word a, word b));\n\nextern word\tgsm_div  \tP((word num, word denum));\n\nextern word\tgsm_add \tP(( word a, word b ));\nextern longword gsm_L_add \tP(( longword a, longword b ));\n\nextern word\tgsm_sub \tP((word a, word b));\nextern longword gsm_L_sub \tP((longword a, longword b));\n\nextern word\tgsm_abs \tP((word a));\n\nextern word\tgsm_norm \tP(( longword a ));\n\nextern longword gsm_L_asl  \tP((longword a, int n));\nextern word\tgsm_asl \tP((word a, int n));\n\nextern longword gsm_L_asr  \tP((longword a, int n));\nextern word\tgsm_asr  \tP((word a, int n));\n\n/*\n *  Inlined functions from add.h \n */\n\n/* \n * #define GSM_MULT_R(a, b) (* word a, word b, !(a == b == MIN_WORD) *)\t\\\n *\t(0x0FFFF & SASR(((longword)(a) * (longword)(b) + 16384), 15))\n */\n#define GSM_MULT_R(a, b) /* word a, word b, !(a == b == MIN_WORD) */\t\\\n\t(SASR( ((longword)(a) * (longword)(b) + 16384), 15 ))\n\n# define GSM_MULT(a,b)\t /* word a, word b, !(a == b == MIN_WORD) */\t\\\n\t(SASR( ((longword)(a) * (longword)(b)), 15 ))\n\n# define GSM_L_MULT(a, b) /* word a, word b */\t\\\n\t(((longword)(a) * (longword)(b)) << 1)\n\n# define GSM_L_ADD(a, b)\t\\\n\t( (a) <  0 ? ( (b) >= 0 ? (a) + (b)\t\\\n\t\t : (utmp = (ulongword)-((a) + 1) + (ulongword)-((b) + 1)) \\\n\t\t   >= MAX_LONGWORD ? MIN_LONGWORD : -(longword)utmp-2 )   \\\n\t: ((b) <= 0 ? (a) + (b)   \\\n\t          : (utmp = (ulongword)(a) + (ulongword)(b)) >= MAX_LONGWORD \\\n\t\t    ? MAX_LONGWORD : utmp))\n\n/*\n * # define GSM_ADD(a, b)\t\\\n * \t((ltmp = (longword)(a) + (longword)(b)) >= MAX_WORD \\\n * \t? MAX_WORD : ltmp <= MIN_WORD ? MIN_WORD : ltmp)\n */\n/* Nonportable, but faster: */\n\n#define\tGSM_ADD(a, b)\t\\\n\t((ulongword)((ltmp = (longword)(a) + (longword)(b)) - MIN_WORD) > \\\n\t\tMAX_WORD - MIN_WORD ? (ltmp > 0 ? MAX_WORD : MIN_WORD) : ltmp)\n\n# define GSM_SUB(a, b)\t\\\n\t((ltmp = (longword)(a) - (longword)(b)) >= MAX_WORD \\\n\t? MAX_WORD : ltmp <= MIN_WORD ? MIN_WORD : ltmp)\n\n# define GSM_ABS(a)\t((a) < 0 ? ((a) == MIN_WORD ? MAX_WORD : -(a)) : (a))\n\n/* Use these if necessary:\n\n# define GSM_MULT_R(a, b)\tgsm_mult_r(a, b)\n# define GSM_MULT(a, b)\t\tgsm_mult(a, b)\n# define GSM_L_MULT(a, b)\tgsm_L_mult(a, b)\n\n# define GSM_L_ADD(a, b)\tgsm_L_add(a, b)\n# define GSM_ADD(a, b)\t\tgsm_add(a, b)\n# define GSM_SUB(a, b)\t\tgsm_sub(a, b)\n\n# define GSM_ABS(a)\t\tgsm_abs(a)\n\n*/\n\n/*\n *  More prototypes from implementations..\n */\nextern void Gsm_Coder P((\n\t\tstruct gsm_state\t* S,\n\t\tword\t* s,\t/* [0..159] samples\t\tIN\t*/\n\t\tword\t* LARc,\t/* [0..7] LAR coefficients\tOUT\t*/\n\t\tword\t* Nc,\t/* [0..3] LTP lag\t\tOUT \t*/\n\t\tword\t* bc,\t/* [0..3] coded LTP gain\tOUT \t*/\n\t\tword\t* Mc,\t/* [0..3] RPE grid selection\tOUT     */\n\t\tword\t* xmaxc,/* [0..3] Coded maximum amplitude OUT\t*/\n\t\tword\t* xMc\t/* [13*4] normalized RPE samples OUT\t*/));\n\nextern void Gsm_Long_Term_Predictor P((\t\t/* 4x for 160 samples */\n\t\tstruct gsm_state * S,\n\t\tword\t* d,\t/* [0..39]   residual signal\tIN\t*/\n\t\tword\t* dp,\t/* [-120..-1] d'\t\tIN\t*/\n\t\tword\t* e,\t/* [0..40] \t\t\tOUT\t*/\n\t\tword\t* dpp,\t/* [0..40] \t\t\tOUT\t*/\n\t\tword\t* Nc,\t/* correlation lag\t\tOUT\t*/\n\t\tword\t* bc\t/* gain factor\t\t\tOUT\t*/));\n\nextern void Gsm_LPC_Analysis P((\n\t\tstruct gsm_state * S,\n\t\tword * s,\t /* 0..159 signals\tIN/OUT\t*/\n\t        word * LARc));   /* 0..7   LARc's\tOUT\t*/\n\nextern void Gsm_Preprocess P((\n\t\tstruct gsm_state * S,\n\t\tword * s, word * so));\n\nextern void Gsm_Encoding P((\n\t\tstruct gsm_state * S,\n\t\tword\t* e,\t\n\t\tword\t* ep,\t\n\t\tword\t* xmaxc,\n\t\tword\t* Mc,\t\n\t\tword\t* xMc));\n\nextern void Gsm_Short_Term_Analysis_Filter P((\n\t\tstruct gsm_state * S,\n\t\tword\t* LARc,\t/* coded log area ratio [0..7]  IN\t*/\n\t\tword\t* d\t/* st res. signal [0..159]\tIN/OUT\t*/));\n\nextern void Gsm_Decoder P((\n\t\tstruct gsm_state * S,\n\t\tword\t* LARcr,\t/* [0..7]\t\tIN\t*/\n\t\tword\t* Ncr,\t\t/* [0..3] \t\tIN \t*/\n\t\tword\t* bcr,\t\t/* [0..3]\t\tIN\t*/\n\t\tword\t* Mcr,\t\t/* [0..3] \t\tIN \t*/\n\t\tword\t* xmaxcr,\t/* [0..3]\t\tIN \t*/\n\t\tword\t* xMcr,\t\t/* [0..13*4]\t\tIN\t*/\n\t\tword\t* s));\t\t/* [0..159]\t\tOUT \t*/\n\nextern void Gsm_Decoding P((\n\t\tstruct gsm_state * S,\n\t\tword \txmaxcr,\n\t\tword\tMcr,\n\t\tword\t* xMcr,  \t/* [0..12]\t\tIN\t*/\n\t\tword\t* erp)); \t/* [0..39]\t\tOUT \t*/\n\nextern void Gsm_Long_Term_Synthesis_Filtering P((\n\t\tstruct gsm_state* S,\n\t\tword\tNcr,\n\t\tword\tbcr,\n\t\tword\t* erp,\t\t/* [0..39]\t\t  IN \t*/\n\t\tword\t* drp)); \t/* [-120..-1] IN, [0..40] OUT \t*/\n\nvoid Gsm_RPE_Decoding P((\n\tstruct gsm_state *S,\n\t\tword xmaxcr,\n\t\tword Mcr,\n\t\tword * xMcr,  /* [0..12], 3 bits             IN      */\n\t\tword * erp)); /* [0..39]                     OUT     */\n\nvoid Gsm_RPE_Encoding P((\n\t\tstruct gsm_state * S,\n\t\tword    * e,            /* -5..-1][0..39][40..44     IN/OUT  */\n\t\tword    * xmaxc,        /*                              OUT */\n\t\tword    * Mc,           /*                              OUT */\n\t\tword    * xMc));        /* [0..12]                      OUT */\n\nextern void Gsm_Short_Term_Synthesis_Filter P((\n\t\tstruct gsm_state * S,\n\t\tword\t* LARcr, \t/* log area ratios [0..7]  IN\t*/\n\t\tword\t* drp,\t\t/* received d [0...39]\t   IN\t*/\n\t\tword\t* s));\t\t/* signal   s [0..159]\t  OUT\t*/\n\nextern void Gsm_Update_of_reconstructed_short_time_residual_signal P((\n\t\tword\t* dpp,\t\t/* [0...39]\tIN\t*/\n\t\tword\t* ep,\t\t/* [0...39]\tIN\t*/\n\t\tword\t* dp));\t\t/* [-120...-1]  IN/OUT \t*/\n\n/*\n *  Tables from table.c\n */\n#ifndef\tGSM_TABLE_C\n\nextern word gsm_A[8], gsm_B[8], gsm_MIC[8], gsm_MAC[8];\nextern word gsm_INVA[8];\nextern word gsm_DLB[4], gsm_QLB[4];\nextern word gsm_H[11];\nextern word gsm_NRFAC[8];\nextern word gsm_FAC[8];\n\n#endif\t/* GSM_TABLE_C */\n\n/*\n *  Debugging\n */\n#ifdef NDEBUG\n\n#\tdefine\tgsm_debug_words(a, b, c, d)\t\t/* nil */\n#\tdefine\tgsm_debug_longwords(a, b, c, d)\t\t/* nil */\n#\tdefine\tgsm_debug_word(a, b)\t\t\t/* nil */\n#\tdefine\tgsm_debug_longword(a, b)\t\t/* nil */\n\n#else\t/* !NDEBUG => DEBUG */\n\n\textern void  gsm_debug_words     P((char * name, int, int, word *));\n\textern void  gsm_debug_longwords P((char * name, int, int, longword *));\n\textern void  gsm_debug_longword  P((char * name, longword));\n\textern void  gsm_debug_word      P((char * name, word));\n\n#endif /* !NDEBUG */\n\n\n/****** begin \"add.c\" *****/\n\n\n#define\tsaturate(x) \t\\\n\t((x) < MIN_WORD ? MIN_WORD : (x) > MAX_WORD ? MAX_WORD: (x))\n\nword gsm_add P2((a,b), word a, word b)\n{\n\tlongword sum = (longword)a + (longword)b;\n\treturn saturate(sum);\n}\n\nword gsm_sub P2((a,b), word a, word b)\n{\n\tlongword diff = (longword)a - (longword)b;\n\treturn saturate(diff);\n}\n\nword gsm_mult P2((a,b), word a, word b)\n{\n\tif (a == MIN_WORD && b == MIN_WORD) return MAX_WORD;\n\telse return SASR( (longword)a * (longword)b, 15 );\n}\n\nword gsm_mult_r P2((a,b), word a, word b)\n{\n\tif (b == MIN_WORD && a == MIN_WORD) return MAX_WORD;\n\telse {\n\t\tlongword prod = (longword)a * (longword)b + 16384;\n\t\tprod >>= 15;\n\t\treturn prod & 0xFFFF;\n\t}\n}\n\nword gsm_abs P1((a), word a)\n{\n\treturn a < 0 ? (a == MIN_WORD ? MAX_WORD : -a) : a;\n}\n\nlongword gsm_L_mult P2((a,b),word a, word b)\n{\n\tassert( a != MIN_WORD || b != MIN_WORD );\n\treturn ((longword)a * (longword)b) << 1;\n}\n\nlongword gsm_L_add P2((a,b), longword a, longword b)\n{\n\tif (a < 0) {\n\t\tif (b >= 0) return a + b;\n\t\telse {\n\t\t\tulongword A = (ulongword)-(a + 1) + (ulongword)-(b + 1);\n\t\t\treturn A >= MAX_LONGWORD ? MIN_LONGWORD :-(longword)A-2;\n\t\t}\n\t}\n\telse if (b <= 0) return a + b;\n\telse {\n\t\tulongword A = (ulongword)a + (ulongword)b;\n\t\treturn A > MAX_LONGWORD ? MAX_LONGWORD : A;\n\t}\n}\n\nlongword gsm_L_sub P2((a,b), longword a, longword b)\n{\n\tif (a >= 0) {\n\t\tif (b >= 0) return a - b;\n\t\telse {\n\t\t\t/* a>=0, b<0 */\n\n\t\t\tulongword A = (ulongword)a + -(b + 1);\n\t\t\treturn A >= MAX_LONGWORD ? MAX_LONGWORD : (A + 1);\n\t\t}\n\t}\n\telse if (b <= 0) return a - b;\n\telse {\n\t\t/* a<0, b>0 */  \n\n\t\tulongword A = (ulongword)-(a + 1) + b;\n\t\treturn A >= MAX_LONGWORD ? MIN_LONGWORD : -(longword)A - 1;\n\t}\n}\n\nstatic unsigned char const bitoff[ 256 ] = {\n\t 8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4,\n\t 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,\n\t 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n\t 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n\t 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n\t 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n\t 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n\t 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n\t 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n\t 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n\t 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n\t 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n\t 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n\t 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n\t 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n\t 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n};\n\nword gsm_norm P1((a), longword a )\n/*\n * the number of left shifts needed to normalize the 32 bit\n * variable L_var1 for positive values on the interval\n *\n * with minimum of\n * minimum of 1073741824  (01000000000000000000000000000000) and \n * maximum of 2147483647  (01111111111111111111111111111111)\n *\n *\n * and for negative values on the interval with\n * minimum of -2147483648 (-10000000000000000000000000000000) and\n * maximum of -1073741824 ( -1000000000000000000000000000000).\n *\n * in order to normalize the result, the following\n * operation must be done: L_norm_var1 = L_var1 << norm( L_var1 );\n *\n * (That's 'ffs', only from the left, not the right..)\n */\n{\n\tassert(a != 0);\n\n\tif (a < 0) {\n\t\tif (a <= -1073741824) return 0;\n\t\ta = ~a;\n\t}\n\n\treturn    a & 0xffff0000 \n\t\t? ( a & 0xff000000\n\t\t  ?  -1 + bitoff[ 0xFF & (a >> 24) ]\n\t\t  :   7 + bitoff[ 0xFF & (a >> 16) ] )\n\t\t: ( a & 0xff00\n\t\t  ?  15 + bitoff[ 0xFF & (a >> 8) ]\n\t\t  :  23 + bitoff[ 0xFF & a ] );\n}\n\nlongword gsm_L_asl P2((a,n), longword a, int n)\n{\n\tif (n >= 32) return 0;\n\tif (n <= -32) return -(a < 0);\n\tif (n < 0) return gsm_L_asr(a, -n);\n\treturn a << n;\n}\n\nword gsm_asl P2((a,n), word a, int n)\n{\n\tif (n >= 16) return 0;\n\tif (n <= -16) return -(a < 0);\n\tif (n < 0) return gsm_asr(a, -n);\n\treturn a << n;\n}\n\nlongword gsm_L_asr P2((a,n), longword a, int n)\n{\n\tif (n >= 32) return -(a < 0);\n\tif (n <= -32) return 0;\n\tif (n < 0) return a << -n;\n\n#\tifdef\tSASR\n\t\treturn a >> n;\n#\telse\n\t\tif (a >= 0) return a >> n;\n\t\telse return -(longword)( -(ulongword)a >> n );\n#\tendif\n}\n\nword gsm_asr P2((a,n), word a, int n)\n{\n\tif (n >= 16) return -(a < 0);\n\tif (n <= -16) return 0;\n\tif (n < 0) return a << -n;\n\n#\tifdef\tSASR\n\t\treturn a >> n;\n#\telse\n\t\tif (a >= 0) return a >> n;\n\t\telse return -(word)( -(uword)a >> n );\n#\tendif\n}\n\n/* \n *  (From p. 46, end of section 4.2.5)\n *\n *  NOTE: The following lines gives [sic] one correct implementation\n *  \t  of the div(num, denum) arithmetic operation.  Compute div\n *        which is the integer division of num by denum: with denum\n *\t  >= num > 0\n */\n\nword gsm_div P2((num,denum), word num, word denum)\n{\n\tlongword\tL_num   = num;\n\tlongword\tL_denum = denum;\n\tword\t\tdiv \t= 0;\n\tvolatile  int\t\tk \t= 15;\n\n\t/* The parameter num sometimes becomes zero.\n\t * Although this is explicitly guarded against in 4.2.5,\n\t * we assume that the result should then be zero as well.\n\t */\n\n\t/* assert(num != 0); */\n\n\tassert(num >= 0 && denum >= num);\n\tif (num == 0)\n\t    return 0;\n\n\twhile (k--) {\n\t\tdiv   <<= 1;\n\t\tL_num <<= 1;\n\n\t\tif (L_num >= L_denum) {\n\t\t\tL_num -= L_denum;\n\t\t\tdiv++;\n\t\t}\n\t}\n\n\treturn div;\n}\n\n/****** begin \"code.c\" *****/\n\n/* \n *  4.2 FIXED POINT IMPLEMENTATION OF THE RPE-LTP CODER \n */\n\nvoid Gsm_Coder P8((S,s,LARc,Nc,bc,Mc,xmaxc,xMc),\n\n\tstruct gsm_state\t* S,\n\n\tword\t* s,\t/* [0..159] samples\t\t  \tIN\t*/\n\n/*\n * The RPE-LTD coder works on a frame by frame basis.  The length of\n * the frame is equal to 160 samples.  Some computations are done\n * once per frame to produce at the output of the coder the\n * LARc[1..8] parameters which are the coded LAR coefficients and \n * also to realize the inverse filtering operation for the entire\n * frame (160 samples of signal d[0..159]).  These parts produce at\n * the output of the coder:\n */\n\n\tword\t* LARc,\t/* [0..7] LAR coefficients\t\tOUT\t*/\n\n/*\n * Procedure 4.2.11 to 4.2.18 are to be executed four times per\n * frame.  That means once for each sub-segment RPE-LTP analysis of\n * 40 samples.  These parts produce at the output of the coder:\n */\n\n\tword\t* Nc,\t/* [0..3] LTP lag\t\t\tOUT \t*/\n\tword\t* bc,\t/* [0..3] coded LTP gain\t\tOUT \t*/\n\tword\t* Mc,\t/* [0..3] RPE grid selection\t\tOUT     */\n\tword\t* xmaxc,/* [0..3] Coded maximum amplitude\tOUT\t*/\n\tword\t* xMc\t/* [13*4] normalized RPE samples\tOUT\t*/\n)\n{\n\tint\tk;\n\tword\t* dp  = S->dp0 + 120;\t/* [ -120...-1 ] */\n\tword\t* dpp = dp;\t\t/* [ 0...39 ]\t */\n\n\tstatic word e[50];\n\n\tword\tso[160];\n\n\tGsm_Preprocess\t\t\t(S, s, so);\n\tGsm_LPC_Analysis\t\t(S, so, LARc);\n\tGsm_Short_Term_Analysis_Filter\t(S, LARc, so);\n\n\tfor (k = 0; k <= 3; k++, xMc += 13) {\n\n\t\tGsm_Long_Term_Predictor\t( S,\n\t\t\t\t\t so+k*40, /* d      [0..39] IN\t*/\n\t\t\t\t\t dp,\t  /* dp  [-120..-1] IN\t*/\n\t\t\t\t\te + 5,\t  /* e      [0..39] OUT\t*/\n\t\t\t\t\tdpp,\t  /* dpp    [0..39] OUT */\n\t\t\t\t\t Nc++,\n\t\t\t\t\t bc++);\n\n\t\tGsm_RPE_Encoding\t( S,\n\t\t\t\t\te + 5,\t/* e\t  ][0..39][ IN/OUT */\n\t\t\t\t\t  xmaxc++, Mc++, xMc );\n\t\t/*\n\t\t * Gsm_Update_of_reconstructed_short_time_residual_signal\n\t\t *\t\t\t( dpp, e + 5, dp );\n\t\t */\n\n\t\t{ register int i;\n\t\t  register longword ltmp;\n\t\t  for (i = 0; i <= 39; i++)\n\t\t\tdp[ i ] = GSM_ADD( e[5 + i], dpp[i] );\n\t\t}\n\t\tdp  += 40;\n\t\tdpp += 40;\n\n\t}\n\t(void)memcpy( (char *)S->dp0, (char *)(S->dp0 + 160),\n\t\t120 * sizeof(*S->dp0) );\n}\n\n/****** begin \"decode.c\" *****/\n\n/*\n *  4.3 FIXED POINT IMPLEMENTATION OF THE RPE-LTP DECODER\n */\n\nstatic void Postprocessing P2((S,s),\n\tstruct gsm_state\t* S,\n\tregister word \t\t* s)\n{\n\tregister int\t\tk;\n\tregister word\t\tmsr = S->msr;\n\tregister longword\tltmp;\t/* for GSM_ADD */\n\tregister word\t\ttmp;\n\n\tfor (k = 160; k--; s++) {\n\t\ttmp = GSM_MULT_R( msr, 28180 );\n\t\tmsr = GSM_ADD(*s, tmp);  \t   /* Deemphasis \t     */\n\t\t*s  = GSM_ADD(msr, msr) & 0xFFF8;  /* Truncation & Upscaling */\n\t}\n\tS->msr = msr;\n}\n\nvoid Gsm_Decoder P8((S,LARcr, Ncr,bcr,Mcr,xmaxcr,xMcr,s),\n\tstruct gsm_state\t* S,\n\n\tword\t\t* LARcr,\t/* [0..7]\t\tIN\t*/\n\n\tword\t\t* Ncr,\t\t/* [0..3] \t\tIN \t*/\n\tword\t\t* bcr,\t\t/* [0..3]\t\tIN\t*/\n\tword\t\t* Mcr,\t\t/* [0..3] \t\tIN \t*/\n\tword\t\t* xmaxcr,\t/* [0..3]\t\tIN \t*/\n\tword\t\t* xMcr,\t\t/* [0..13*4]\t\tIN\t*/\n\n\tword\t\t* s)\t\t/* [0..159]\t\tOUT \t*/\n{\n\tint\t\tj, k;\n\tword\t\terp[40], wt[160];\n\tword\t\t* drp = S->dp0 + 120;\n\n\tfor (j=0; j <= 3; j++, xmaxcr++, bcr++, Ncr++, Mcr++, xMcr += 13) {\n\n\t\tGsm_RPE_Decoding( S, *xmaxcr, *Mcr, xMcr, erp );\n\t\tGsm_Long_Term_Synthesis_Filtering( S, *Ncr, *bcr, erp, drp );\n\n\t\tfor (k = 0; k <= 39; k++) wt[ j * 40 + k ] =  drp[ k ];\n\t}\n\n\tGsm_Short_Term_Synthesis_Filter( S, LARcr, wt, s );\n\tPostprocessing(S, s);\n}\n\n/****** begin \"gsm_decode.c\" *****/\n\nint gsm_decode P3((s, c, target), gsm s, gsm_byte * c, gsm_signal * target)\n{\n\tword  \tLARc[8], Nc[4], Mc[4], bc[4], xmaxc[4], xmc[13*4];\n\n#ifdef WAV49\n\tif (s->wav_fmt) {\n\n\t\tuword sr = 0;\n\n\t\ts->frame_index = !s->frame_index;\n\t\tif (s->frame_index) {\n\n\t\t\tsr = *c++;\n\t\t\tLARc[0] = sr & 0x3f;  sr >>= 6;\n\t\t\tsr |= (uword)*c++ << 2;\n\t\t\tLARc[1] = sr & 0x3f;  sr >>= 6;\n\t\t\tsr |= (uword)*c++ << 4;\n\t\t\tLARc[2] = sr & 0x1f;  sr >>= 5;\n\t\t\tLARc[3] = sr & 0x1f;  sr >>= 5;\n\t\t\tsr |= (uword)*c++ << 2;\n\t\t\tLARc[4] = sr & 0xf;  sr >>= 4;\n\t\t\tLARc[5] = sr & 0xf;  sr >>= 4;\n\t\t\tsr |= (uword)*c++ << 2;\t\t\t/* 5 */\n\t\t\tLARc[6] = sr & 0x7;  sr >>= 3;\n\t\t\tLARc[7] = sr & 0x7;  sr >>= 3;\n\t\t\tsr |= (uword)*c++ << 4;\n\t\t\tNc[0] = sr & 0x7f;  sr >>= 7;\n\t\t\tbc[0] = sr & 0x3;  sr >>= 2;\n\t\t\tMc[0] = sr & 0x3;  sr >>= 2;\n\t\t\tsr |= (uword)*c++ << 1;\n\t\t\txmaxc[0] = sr & 0x3f;  sr >>= 6;\n\t\t\txmc[0] = sr & 0x7;  sr >>= 3;\n\t\t\tsr = *c++;\n\t\t\txmc[1] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[2] = sr & 0x7;  sr >>= 3;\n\t\t\tsr |= (uword)*c++ << 2;\n\t\t\txmc[3] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[4] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[5] = sr & 0x7;  sr >>= 3;\n\t\t\tsr |= (uword)*c++ << 1;\t\t\t/* 10 */\n\t\t\txmc[6] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[7] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[8] = sr & 0x7;  sr >>= 3;\n\t\t\tsr = *c++;\n\t\t\txmc[9] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[10] = sr & 0x7;  sr >>= 3;\n\t\t\tsr |= (uword)*c++ << 2;\n\t\t\txmc[11] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[12] = sr & 0x7;  sr >>= 3;\n\t\t\tsr |= (uword)*c++ << 4;\n\t\t\tNc[1] = sr & 0x7f;  sr >>= 7;\n\t\t\tbc[1] = sr & 0x3;  sr >>= 2;\n\t\t\tMc[1] = sr & 0x3;  sr >>= 2;\n\t\t\tsr |= (uword)*c++ << 1;\n\t\t\txmaxc[1] = sr & 0x3f;  sr >>= 6;\n\t\t\txmc[13] = sr & 0x7;  sr >>= 3;\n\t\t\tsr = *c++;\t\t\t\t/* 15 */\n\t\t\txmc[14] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[15] = sr & 0x7;  sr >>= 3;\n\t\t\tsr |= (uword)*c++ << 2;\n\t\t\txmc[16] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[17] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[18] = sr & 0x7;  sr >>= 3;\n\t\t\tsr |= (uword)*c++ << 1;\n\t\t\txmc[19] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[20] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[21] = sr & 0x7;  sr >>= 3;\n\t\t\tsr = *c++;\n\t\t\txmc[22] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[23] = sr & 0x7;  sr >>= 3;\n\t\t\tsr |= (uword)*c++ << 2;\n\t\t\txmc[24] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[25] = sr & 0x7;  sr >>= 3;\n\t\t\tsr |= (uword)*c++ << 4;\t\t\t/* 20 */\n\t\t\tNc[2] = sr & 0x7f;  sr >>= 7;\n\t\t\tbc[2] = sr & 0x3;  sr >>= 2;\n\t\t\tMc[2] = sr & 0x3;  sr >>= 2;\n\t\t\tsr |= (uword)*c++ << 1;\n\t\t\txmaxc[2] = sr & 0x3f;  sr >>= 6;\n\t\t\txmc[26] = sr & 0x7;  sr >>= 3;\n\t\t\tsr = *c++;\n\t\t\txmc[27] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[28] = sr & 0x7;  sr >>= 3;\n\t\t\tsr |= (uword)*c++ << 2;\n\t\t\txmc[29] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[30] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[31] = sr & 0x7;  sr >>= 3;\n\t\t\tsr |= (uword)*c++ << 1;\n\t\t\txmc[32] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[33] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[34] = sr & 0x7;  sr >>= 3;\n\t\t\tsr = *c++;\t\t\t\t/* 25 */\n\t\t\txmc[35] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[36] = sr & 0x7;  sr >>= 3;\n\t\t\tsr |= (uword)*c++ << 2;\n\t\t\txmc[37] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[38] = sr & 0x7;  sr >>= 3;\n\t\t\tsr |= (uword)*c++ << 4;\n\t\t\tNc[3] = sr & 0x7f;  sr >>= 7;\n\t\t\tbc[3] = sr & 0x3;  sr >>= 2;\n\t\t\tMc[3] = sr & 0x3;  sr >>= 2;\n\t\t\tsr |= (uword)*c++ << 1;\n\t\t\txmaxc[3] = sr & 0x3f;  sr >>= 6;\n\t\t\txmc[39] = sr & 0x7;  sr >>= 3;\n\t\t\tsr = *c++;\n\t\t\txmc[40] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[41] = sr & 0x7;  sr >>= 3;\n\t\t\tsr |= (uword)*c++ << 2;\t\t\t/* 30 */\n\t\t\txmc[42] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[43] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[44] = sr & 0x7;  sr >>= 3;\n\t\t\tsr |= (uword)*c++ << 1;\n\t\t\txmc[45] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[46] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[47] = sr & 0x7;  sr >>= 3;\n\t\t\tsr = *c++;\n\t\t\txmc[48] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[49] = sr & 0x7;  sr >>= 3;\n\t\t\tsr |= (uword)*c++ << 2;\n\t\t\txmc[50] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[51] = sr & 0x7;  sr >>= 3;\n\n\t\t\ts->frame_chain = sr & 0xf;\n\t\t}\n\t\telse {\n\t\t\tsr = s->frame_chain;\n\t\t\tsr |= (uword)*c++ << 4;\t\t\t/* 1 */\n\t\t\tLARc[0] = sr & 0x3f;  sr >>= 6;\n\t\t\tLARc[1] = sr & 0x3f;  sr >>= 6;\n\t\t\tsr = *c++;\n\t\t\tLARc[2] = sr & 0x1f;  sr >>= 5;\n\t\t\tsr |= (uword)*c++ << 3;\n\t\t\tLARc[3] = sr & 0x1f;  sr >>= 5;\n\t\t\tLARc[4] = sr & 0xf;  sr >>= 4;\n\t\t\tsr |= (uword)*c++ << 2;\n\t\t\tLARc[5] = sr & 0xf;  sr >>= 4;\n\t\t\tLARc[6] = sr & 0x7;  sr >>= 3;\n\t\t\tLARc[7] = sr & 0x7;  sr >>= 3;\n\t\t\tsr = *c++;\t\t\t\t/* 5 */\n\t\t\tNc[0] = sr & 0x7f;  sr >>= 7;\n\t\t\tsr |= (uword)*c++ << 1;\n\t\t\tbc[0] = sr & 0x3;  sr >>= 2;\n\t\t\tMc[0] = sr & 0x3;  sr >>= 2;\n\t\t\tsr |= (uword)*c++ << 5;\n\t\t\txmaxc[0] = sr & 0x3f;  sr >>= 6;\n\t\t\txmc[0] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[1] = sr & 0x7;  sr >>= 3;\n\t\t\tsr |= (uword)*c++ << 1;\n\t\t\txmc[2] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[3] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[4] = sr & 0x7;  sr >>= 3;\n\t\t\tsr = *c++;\n\t\t\txmc[5] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[6] = sr & 0x7;  sr >>= 3;\n\t\t\tsr |= (uword)*c++ << 2;\t\t\t/* 10 */\n\t\t\txmc[7] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[8] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[9] = sr & 0x7;  sr >>= 3;\n\t\t\tsr |= (uword)*c++ << 1;\n\t\t\txmc[10] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[11] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[12] = sr & 0x7;  sr >>= 3;\n\t\t\tsr = *c++;\n\t\t\tNc[1] = sr & 0x7f;  sr >>= 7;\n\t\t\tsr |= (uword)*c++ << 1;\n\t\t\tbc[1] = sr & 0x3;  sr >>= 2;\n\t\t\tMc[1] = sr & 0x3;  sr >>= 2;\n\t\t\tsr |= (uword)*c++ << 5;\n\t\t\txmaxc[1] = sr & 0x3f;  sr >>= 6;\n\t\t\txmc[13] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[14] = sr & 0x7;  sr >>= 3;\n\t\t\tsr |= (uword)*c++ << 1;\t\t\t/* 15 */\n\t\t\txmc[15] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[16] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[17] = sr & 0x7;  sr >>= 3;\n\t\t\tsr = *c++;\n\t\t\txmc[18] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[19] = sr & 0x7;  sr >>= 3;\n\t\t\tsr |= (uword)*c++ << 2;\n\t\t\txmc[20] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[21] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[22] = sr & 0x7;  sr >>= 3;\n\t\t\tsr |= (uword)*c++ << 1;\n\t\t\txmc[23] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[24] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[25] = sr & 0x7;  sr >>= 3;\n\t\t\tsr = *c++;\n\t\t\tNc[2] = sr & 0x7f;  sr >>= 7;\n\t\t\tsr |= (uword)*c++ << 1;\t\t\t/* 20 */\n\t\t\tbc[2] = sr & 0x3;  sr >>= 2;\n\t\t\tMc[2] = sr & 0x3;  sr >>= 2;\n\t\t\tsr |= (uword)*c++ << 5;\n\t\t\txmaxc[2] = sr & 0x3f;  sr >>= 6;\n\t\t\txmc[26] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[27] = sr & 0x7;  sr >>= 3;\n\t\t\tsr |= (uword)*c++ << 1;\t\n\t\t\txmc[28] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[29] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[30] = sr & 0x7;  sr >>= 3;\n\t\t\tsr = *c++;\n\t\t\txmc[31] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[32] = sr & 0x7;  sr >>= 3;\n\t\t\tsr |= (uword)*c++ << 2;\n\t\t\txmc[33] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[34] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[35] = sr & 0x7;  sr >>= 3;\n\t\t\tsr |= (uword)*c++ << 1;\t\t\t/* 25 */\n\t\t\txmc[36] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[37] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[38] = sr & 0x7;  sr >>= 3;\n\t\t\tsr = *c++;\n\t\t\tNc[3] = sr & 0x7f;  sr >>= 7;\n\t\t\tsr |= (uword)*c++ << 1;\t\t\n\t\t\tbc[3] = sr & 0x3;  sr >>= 2;\n\t\t\tMc[3] = sr & 0x3;  sr >>= 2;\n\t\t\tsr |= (uword)*c++ << 5;\n\t\t\txmaxc[3] = sr & 0x3f;  sr >>= 6;\n\t\t\txmc[39] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[40] = sr & 0x7;  sr >>= 3;\n\t\t\tsr |= (uword)*c++ << 1;\n\t\t\txmc[41] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[42] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[43] = sr & 0x7;  sr >>= 3;\n\t\t\tsr = *c++;\t\t\t\t/* 30 */\n\t\t\txmc[44] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[45] = sr & 0x7;  sr >>= 3;\n\t\t\tsr |= (uword)*c++ << 2;\n\t\t\txmc[46] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[47] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[48] = sr & 0x7;  sr >>= 3;\n\t\t\tsr |= (uword)*c++ << 1;\n\t\t\txmc[49] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[50] = sr & 0x7;  sr >>= 3;\n\t\t\txmc[51] = sr & 0x7;  sr >>= 3;\n\t\t}\n\t}\n\telse\n#endif\n\t{\n\t\t/* GSM_MAGIC  = (*c >> 4) & 0xF; */\n\n\t\tif (((*c >> 4) & 0x0F) != GSM_MAGIC) return -1;\n\n\t\tLARc[0]  = (*c++ & 0xF) << 2;\t\t/* 1 */\n\t\tLARc[0] |= (*c >> 6) & 0x3;\n\t\tLARc[1]  = *c++ & 0x3F;\n\t\tLARc[2]  = (*c >> 3) & 0x1F;\n\t\tLARc[3]  = (*c++ & 0x7) << 2;\n\t\tLARc[3] |= (*c >> 6) & 0x3;\n\t\tLARc[4]  = (*c >> 2) & 0xF;\n\t\tLARc[5]  = (*c++ & 0x3) << 2;\n\t\tLARc[5] |= (*c >> 6) & 0x3;\n\t\tLARc[6]  = (*c >> 3) & 0x7;\n\t\tLARc[7]  = *c++ & 0x7;\n\t\tNc[0]  = (*c >> 1) & 0x7F;\n\t\tbc[0]  = (*c++ & 0x1) << 1;\n\t\tbc[0] |= (*c >> 7) & 0x1;\n\t\tMc[0]  = (*c >> 5) & 0x3;\n\t\txmaxc[0]  = (*c++ & 0x1F) << 1;\n\t\txmaxc[0] |= (*c >> 7) & 0x1;\n\t\txmc[0]  = (*c >> 4) & 0x7;\n\t\txmc[1]  = (*c >> 1) & 0x7;\n\t\txmc[2]  = (*c++ & 0x1) << 2;\n\t\txmc[2] |= (*c >> 6) & 0x3;\n\t\txmc[3]  = (*c >> 3) & 0x7;\n\t\txmc[4]  = *c++ & 0x7;\n\t\txmc[5]  = (*c >> 5) & 0x7;\n\t\txmc[6]  = (*c >> 2) & 0x7;\n\t\txmc[7]  = (*c++ & 0x3) << 1;\t\t/* 10 */\n\t\txmc[7] |= (*c >> 7) & 0x1;\n\t\txmc[8]  = (*c >> 4) & 0x7;\n\t\txmc[9]  = (*c >> 1) & 0x7;\n\t\txmc[10]  = (*c++ & 0x1) << 2;\n\t\txmc[10] |= (*c >> 6) & 0x3;\n\t\txmc[11]  = (*c >> 3) & 0x7;\n\t\txmc[12]  = *c++ & 0x7;\n\t\tNc[1]  = (*c >> 1) & 0x7F;\n\t\tbc[1]  = (*c++ & 0x1) << 1;\n\t\tbc[1] |= (*c >> 7) & 0x1;\n\t\tMc[1]  = (*c >> 5) & 0x3;\n\t\txmaxc[1]  = (*c++ & 0x1F) << 1;\n\t\txmaxc[1] |= (*c >> 7) & 0x1;\n\t\txmc[13]  = (*c >> 4) & 0x7;\n\t\txmc[14]  = (*c >> 1) & 0x7;\n\t\txmc[15]  = (*c++ & 0x1) << 2;\n\t\txmc[15] |= (*c >> 6) & 0x3;\n\t\txmc[16]  = (*c >> 3) & 0x7;\n\t\txmc[17]  = *c++ & 0x7;\n\t\txmc[18]  = (*c >> 5) & 0x7;\n\t\txmc[19]  = (*c >> 2) & 0x7;\n\t\txmc[20]  = (*c++ & 0x3) << 1;\n\t\txmc[20] |= (*c >> 7) & 0x1;\n\t\txmc[21]  = (*c >> 4) & 0x7;\n\t\txmc[22]  = (*c >> 1) & 0x7;\n\t\txmc[23]  = (*c++ & 0x1) << 2;\n\t\txmc[23] |= (*c >> 6) & 0x3;\n\t\txmc[24]  = (*c >> 3) & 0x7;\n\t\txmc[25]  = *c++ & 0x7;\n\t\tNc[2]  = (*c >> 1) & 0x7F;\n\t\tbc[2]  = (*c++ & 0x1) << 1;\t\t/* 20 */\n\t\tbc[2] |= (*c >> 7) & 0x1;\n\t\tMc[2]  = (*c >> 5) & 0x3;\n\t\txmaxc[2]  = (*c++ & 0x1F) << 1;\n\t\txmaxc[2] |= (*c >> 7) & 0x1;\n\t\txmc[26]  = (*c >> 4) & 0x7;\n\t\txmc[27]  = (*c >> 1) & 0x7;\n\t\txmc[28]  = (*c++ & 0x1) << 2;\n\t\txmc[28] |= (*c >> 6) & 0x3;\n\t\txmc[29]  = (*c >> 3) & 0x7;\n\t\txmc[30]  = *c++ & 0x7;\n\t\txmc[31]  = (*c >> 5) & 0x7;\n\t\txmc[32]  = (*c >> 2) & 0x7;\n\t\txmc[33]  = (*c++ & 0x3) << 1;\n\t\txmc[33] |= (*c >> 7) & 0x1;\n\t\txmc[34]  = (*c >> 4) & 0x7;\n\t\txmc[35]  = (*c >> 1) & 0x7;\n\t\txmc[36]  = (*c++ & 0x1) << 2;\n\t\txmc[36] |= (*c >> 6) & 0x3;\n\t\txmc[37]  = (*c >> 3) & 0x7;\n\t\txmc[38]  = *c++ & 0x7;\n\t\tNc[3]  = (*c >> 1) & 0x7F;\n\t\tbc[3]  = (*c++ & 0x1) << 1;\n\t\tbc[3] |= (*c >> 7) & 0x1;\n\t\tMc[3]  = (*c >> 5) & 0x3;\n\t\txmaxc[3]  = (*c++ & 0x1F) << 1;\n\t\txmaxc[3] |= (*c >> 7) & 0x1;\n\t\txmc[39]  = (*c >> 4) & 0x7;\n\t\txmc[40]  = (*c >> 1) & 0x7;\n\t\txmc[41]  = (*c++ & 0x1) << 2;\n\t\txmc[41] |= (*c >> 6) & 0x3;\n\t\txmc[42]  = (*c >> 3) & 0x7;\n\t\txmc[43]  = *c++ & 0x7;\t\t\t/* 30  */\n\t\txmc[44]  = (*c >> 5) & 0x7;\n\t\txmc[45]  = (*c >> 2) & 0x7;\n\t\txmc[46]  = (*c++ & 0x3) << 1;\n\t\txmc[46] |= (*c >> 7) & 0x1;\n\t\txmc[47]  = (*c >> 4) & 0x7;\n\t\txmc[48]  = (*c >> 1) & 0x7;\n\t\txmc[49]  = (*c++ & 0x1) << 2;\n\t\txmc[49] |= (*c >> 6) & 0x3;\n\t\txmc[50]  = (*c >> 3) & 0x7;\n\t\txmc[51]  = *c & 0x7;\t\t\t/* 33 */\n\t}\n\n\tGsm_Decoder(s, LARc, Nc, bc, Mc, xmaxc, xmc, target);\n\n\treturn 0;\n}\n\n/****** begin \"gsm_encode.c\" *****/\n\nvoid gsm_encode P3((s, source, c), gsm s, gsm_signal * source, gsm_byte * c)\n{\n\tword\t \tLARc[8], Nc[4], Mc[4], bc[4], xmaxc[4], xmc[13*4];\n\n\tGsm_Coder(s, source, LARc, Nc, bc, Mc, xmaxc, xmc);\n\n\n\t/*\tvariable\tsize\n\n\t\tGSM_MAGIC\t4\n\n\t\tLARc[0]\t\t6\n\t\tLARc[1]\t\t6\n\t\tLARc[2]\t\t5\n\t\tLARc[3]\t\t5\n\t\tLARc[4]\t\t4\n\t\tLARc[5]\t\t4\n\t\tLARc[6]\t\t3\n\t\tLARc[7]\t\t3\n\n\t\tNc[0]\t\t7\n\t\tbc[0]\t\t2\n\t\tMc[0]\t\t2\n\t\txmaxc[0]\t6\n\t\txmc[0]\t\t3\n\t\txmc[1]\t\t3\n\t\txmc[2]\t\t3\n\t\txmc[3]\t\t3\n\t\txmc[4]\t\t3\n\t\txmc[5]\t\t3\n\t\txmc[6]\t\t3\n\t\txmc[7]\t\t3\n\t\txmc[8]\t\t3\n\t\txmc[9]\t\t3\n\t\txmc[10]\t\t3\n\t\txmc[11]\t\t3\n\t\txmc[12]\t\t3\n\n\t\tNc[1]\t\t7\n\t\tbc[1]\t\t2\n\t\tMc[1]\t\t2\n\t\txmaxc[1]\t6\n\t\txmc[13]\t\t3\n\t\txmc[14]\t\t3\n\t\txmc[15]\t\t3\n\t\txmc[16]\t\t3\n\t\txmc[17]\t\t3\n\t\txmc[18]\t\t3\n\t\txmc[19]\t\t3\n\t\txmc[20]\t\t3\n\t\txmc[21]\t\t3\n\t\txmc[22]\t\t3\n\t\txmc[23]\t\t3\n\t\txmc[24]\t\t3\n\t\txmc[25]\t\t3\n\n\t\tNc[2]\t\t7\n\t\tbc[2]\t\t2\n\t\tMc[2]\t\t2\n\t\txmaxc[2]\t6\n\t\txmc[26]\t\t3\n\t\txmc[27]\t\t3\n\t\txmc[28]\t\t3\n\t\txmc[29]\t\t3\n\t\txmc[30]\t\t3\n\t\txmc[31]\t\t3\n\t\txmc[32]\t\t3\n\t\txmc[33]\t\t3\n\t\txmc[34]\t\t3\n\t\txmc[35]\t\t3\n\t\txmc[36]\t\t3\n\t\txmc[37]\t\t3\n\t\txmc[38]\t\t3\n\n\t\tNc[3]\t\t7\n\t\tbc[3]\t\t2\n\t\tMc[3]\t\t2\n\t\txmaxc[3]\t6\n\t\txmc[39]\t\t3\n\t\txmc[40]\t\t3\n\t\txmc[41]\t\t3\n\t\txmc[42]\t\t3\n\t\txmc[43]\t\t3\n\t\txmc[44]\t\t3\n\t\txmc[45]\t\t3\n\t\txmc[46]\t\t3\n\t\txmc[47]\t\t3\n\t\txmc[48]\t\t3\n\t\txmc[49]\t\t3\n\t\txmc[50]\t\t3\n\t\txmc[51]\t\t3\n\t*/\n\n#ifdef WAV49\n\n\tif (s->wav_fmt) {\n\t\ts->frame_index = !s->frame_index;\n\t\tif (s->frame_index) {\n\n\t\t\tuword sr;\n\n\t\t\tsr = 0;\n\t\t\tsr = sr >> 6 | LARc[0] << 10;\n\t\t\tsr = sr >> 6 | LARc[1] << 10;\n\t\t\t*c++ = sr >> 4;\n\t\t\tsr = sr >> 5 | LARc[2] << 11;\n\t\t\t*c++ = sr >> 7;\n\t\t\tsr = sr >> 5 | LARc[3] << 11;\n\t\t\tsr = sr >> 4 | LARc[4] << 12;\n\t\t\t*c++ = sr >> 6;\n\t\t\tsr = sr >> 4 | LARc[5] << 12;\n\t\t\tsr = sr >> 3 | LARc[6] << 13;\n\t\t\t*c++ = sr >> 7;\n\t\t\tsr = sr >> 3 | LARc[7] << 13;\n\t\t\tsr = sr >> 7 | Nc[0] << 9;\n\t\t\t*c++ = sr >> 5;\n\t\t\tsr = sr >> 2 | bc[0] << 14;\n\t\t\tsr = sr >> 2 | Mc[0] << 14;\n\t\t\tsr = sr >> 6 | xmaxc[0] << 10;\n\t\t\t*c++ = sr >> 3;\n\t\t\tsr = sr >> 3 | xmc[0] << 13;\n\t\t\t*c++ = sr >> 8;\n\t\t\tsr = sr >> 3 | xmc[1] << 13;\n\t\t\tsr = sr >> 3 | xmc[2] << 13;\n\t\t\tsr = sr >> 3 | xmc[3] << 13;\n\t\t\t*c++ = sr >> 7;\n\t\t\tsr = sr >> 3 | xmc[4] << 13;\n\t\t\tsr = sr >> 3 | xmc[5] << 13;\n\t\t\tsr = sr >> 3 | xmc[6] << 13;\n\t\t\t*c++ = sr >> 6;\n\t\t\tsr = sr >> 3 | xmc[7] << 13;\n\t\t\tsr = sr >> 3 | xmc[8] << 13;\n\t\t\t*c++ = sr >> 8;\n\t\t\tsr = sr >> 3 | xmc[9] << 13;\n\t\t\tsr = sr >> 3 | xmc[10] << 13;\n\t\t\tsr = sr >> 3 | xmc[11] << 13;\n\t\t\t*c++ = sr >> 7;\n\t\t\tsr = sr >> 3 | xmc[12] << 13;\n\t\t\tsr = sr >> 7 | Nc[1] << 9;\n\t\t\t*c++ = sr >> 5;\n\t\t\tsr = sr >> 2 | bc[1] << 14;\n\t\t\tsr = sr >> 2 | Mc[1] << 14;\n\t\t\tsr = sr >> 6 | xmaxc[1] << 10;\n\t\t\t*c++ = sr >> 3;\n\t\t\tsr = sr >> 3 | xmc[13] << 13;\n\t\t\t*c++ = sr >> 8;\n\t\t\tsr = sr >> 3 | xmc[14] << 13;\n\t\t\tsr = sr >> 3 | xmc[15] << 13;\n\t\t\tsr = sr >> 3 | xmc[16] << 13;\n\t\t\t*c++ = sr >> 7;\n\t\t\tsr = sr >> 3 | xmc[17] << 13;\n\t\t\tsr = sr >> 3 | xmc[18] << 13;\n\t\t\tsr = sr >> 3 | xmc[19] << 13;\n\t\t\t*c++ = sr >> 6;\n\t\t\tsr = sr >> 3 | xmc[20] << 13;\n\t\t\tsr = sr >> 3 | xmc[21] << 13;\n\t\t\t*c++ = sr >> 8;\n\t\t\tsr = sr >> 3 | xmc[22] << 13;\n\t\t\tsr = sr >> 3 | xmc[23] << 13;\n\t\t\tsr = sr >> 3 | xmc[24] << 13;\n\t\t\t*c++ = sr >> 7;\n\t\t\tsr = sr >> 3 | xmc[25] << 13;\n\t\t\tsr = sr >> 7 | Nc[2] << 9;\n\t\t\t*c++ = sr >> 5;\n\t\t\tsr = sr >> 2 | bc[2] << 14;\n\t\t\tsr = sr >> 2 | Mc[2] << 14;\n\t\t\tsr = sr >> 6 | xmaxc[2] << 10;\n\t\t\t*c++ = sr >> 3;\n\t\t\tsr = sr >> 3 | xmc[26] << 13;\n\t\t\t*c++ = sr >> 8;\n\t\t\tsr = sr >> 3 | xmc[27] << 13;\n\t\t\tsr = sr >> 3 | xmc[28] << 13;\n\t\t\tsr = sr >> 3 | xmc[29] << 13;\n\t\t\t*c++ = sr >> 7;\n\t\t\tsr = sr >> 3 | xmc[30] << 13;\n\t\t\tsr = sr >> 3 | xmc[31] << 13;\n\t\t\tsr = sr >> 3 | xmc[32] << 13;\n\t\t\t*c++ = sr >> 6;\n\t\t\tsr = sr >> 3 | xmc[33] << 13;\n\t\t\tsr = sr >> 3 | xmc[34] << 13;\n\t\t\t*c++ = sr >> 8;\n\t\t\tsr = sr >> 3 | xmc[35] << 13;\n\t\t\tsr = sr >> 3 | xmc[36] << 13;\n\t\t\tsr = sr >> 3 | xmc[37] << 13;\n\t\t\t*c++ = sr >> 7;\n\t\t\tsr = sr >> 3 | xmc[38] << 13;\n\t\t\tsr = sr >> 7 | Nc[3] << 9;\n\t\t\t*c++ = sr >> 5;\n\t\t\tsr = sr >> 2 | bc[3] << 14;\n\t\t\tsr = sr >> 2 | Mc[3] << 14;\n\t\t\tsr = sr >> 6 | xmaxc[3] << 10;\n\t\t\t*c++ = sr >> 3;\n\t\t\tsr = sr >> 3 | xmc[39] << 13;\n\t\t\t*c++ = sr >> 8;\n\t\t\tsr = sr >> 3 | xmc[40] << 13;\n\t\t\tsr = sr >> 3 | xmc[41] << 13;\n\t\t\tsr = sr >> 3 | xmc[42] << 13;\n\t\t\t*c++ = sr >> 7;\n\t\t\tsr = sr >> 3 | xmc[43] << 13;\n\t\t\tsr = sr >> 3 | xmc[44] << 13;\n\t\t\tsr = sr >> 3 | xmc[45] << 13;\n\t\t\t*c++ = sr >> 6;\n\t\t\tsr = sr >> 3 | xmc[46] << 13;\n\t\t\tsr = sr >> 3 | xmc[47] << 13;\n\t\t\t*c++ = sr >> 8;\n\t\t\tsr = sr >> 3 | xmc[48] << 13;\n\t\t\tsr = sr >> 3 | xmc[49] << 13;\n\t\t\tsr = sr >> 3 | xmc[50] << 13;\n\t\t\t*c++ = sr >> 7;\n\t\t\tsr = sr >> 3 | xmc[51] << 13;\n\t\t\tsr = sr >> 4;\n\t\t\t*c = sr >> 8;\n\t\t\ts->frame_chain = *c;\n\t\t}\n\t\telse {\n\t\t\tuword sr;\n\n\t\t\tsr = 0;\n\t\t\tsr = sr >> 4 | s->frame_chain << 12;\n\t\t\tsr = sr >> 6 | LARc[0] << 10;\n\t\t\t*c++ = sr >> 6;\n\t\t\tsr = sr >> 6 | LARc[1] << 10;\n\t\t\t*c++ = sr >> 8;\n\t\t\tsr = sr >> 5 | LARc[2] << 11;\n\t\t\tsr = sr >> 5 | LARc[3] << 11;\n\t\t\t*c++ = sr >> 6;\n\t\t\tsr = sr >> 4 | LARc[4] << 12;\n\t\t\tsr = sr >> 4 | LARc[5] << 12;\n\t\t\t*c++ = sr >> 6;\n\t\t\tsr = sr >> 3 | LARc[6] << 13;\n\t\t\tsr = sr >> 3 | LARc[7] << 13;\n\t\t\t*c++ = sr >> 8;\n\t\t\tsr = sr >> 7 | Nc[0] << 9;\n\t\t\tsr = sr >> 2 | bc[0] << 14;\n\t\t\t*c++ = sr >> 7;\n\t\t\tsr = sr >> 2 | Mc[0] << 14;\n\t\t\tsr = sr >> 6 | xmaxc[0] << 10;\n\t\t\t*c++ = sr >> 7;\n\t\t\tsr = sr >> 3 | xmc[0] << 13;\n\t\t\tsr = sr >> 3 | xmc[1] << 13;\n\t\t\tsr = sr >> 3 | xmc[2] << 13;\n\t\t\t*c++ = sr >> 6;\n\t\t\tsr = sr >> 3 | xmc[3] << 13;\n\t\t\tsr = sr >> 3 | xmc[4] << 13;\n\t\t\t*c++ = sr >> 8;\n\t\t\tsr = sr >> 3 | xmc[5] << 13;\n\t\t\tsr = sr >> 3 | xmc[6] << 13;\n\t\t\tsr = sr >> 3 | xmc[7] << 13;\n\t\t\t*c++ = sr >> 7;\n\t\t\tsr = sr >> 3 | xmc[8] << 13;\n\t\t\tsr = sr >> 3 | xmc[9] << 13;\n\t\t\tsr = sr >> 3 | xmc[10] << 13;\n\t\t\t*c++ = sr >> 6;\n\t\t\tsr = sr >> 3 | xmc[11] << 13;\n\t\t\tsr = sr >> 3 | xmc[12] << 13;\n\t\t\t*c++ = sr >> 8;\n\t\t\tsr = sr >> 7 | Nc[1] << 9;\n\t\t\tsr = sr >> 2 | bc[1] << 14;\n\t\t\t*c++ = sr >> 7;\n\t\t\tsr = sr >> 2 | Mc[1] << 14;\n\t\t\tsr = sr >> 6 | xmaxc[1] << 10;\n\t\t\t*c++ = sr >> 7;\n\t\t\tsr = sr >> 3 | xmc[13] << 13;\n\t\t\tsr = sr >> 3 | xmc[14] << 13;\n\t\t\tsr = sr >> 3 | xmc[15] << 13;\n\t\t\t*c++ = sr >> 6;\n\t\t\tsr = sr >> 3 | xmc[16] << 13;\n\t\t\tsr = sr >> 3 | xmc[17] << 13;\n\t\t\t*c++ = sr >> 8;\n\t\t\tsr = sr >> 3 | xmc[18] << 13;\n\t\t\tsr = sr >> 3 | xmc[19] << 13;\n\t\t\tsr = sr >> 3 | xmc[20] << 13;\n\t\t\t*c++ = sr >> 7;\n\t\t\tsr = sr >> 3 | xmc[21] << 13;\n\t\t\tsr = sr >> 3 | xmc[22] << 13;\n\t\t\tsr = sr >> 3 | xmc[23] << 13;\n\t\t\t*c++ = sr >> 6;\n\t\t\tsr = sr >> 3 | xmc[24] << 13;\n\t\t\tsr = sr >> 3 | xmc[25] << 13;\n\t\t\t*c++ = sr >> 8;\n\t\t\tsr = sr >> 7 | Nc[2] << 9;\n\t\t\tsr = sr >> 2 | bc[2] << 14;\n\t\t\t*c++ = sr >> 7;\n\t\t\tsr = sr >> 2 | Mc[2] << 14;\n\t\t\tsr = sr >> 6 | xmaxc[2] << 10;\n\t\t\t*c++ = sr >> 7;\n\t\t\tsr = sr >> 3 | xmc[26] << 13;\n\t\t\tsr = sr >> 3 | xmc[27] << 13;\n\t\t\tsr = sr >> 3 | xmc[28] << 13;\n\t\t\t*c++ = sr >> 6;\n\t\t\tsr = sr >> 3 | xmc[29] << 13;\n\t\t\tsr = sr >> 3 | xmc[30] << 13;\n\t\t\t*c++ = sr >> 8;\n\t\t\tsr = sr >> 3 | xmc[31] << 13;\n\t\t\tsr = sr >> 3 | xmc[32] << 13;\n\t\t\tsr = sr >> 3 | xmc[33] << 13;\n\t\t\t*c++ = sr >> 7;\n\t\t\tsr = sr >> 3 | xmc[34] << 13;\n\t\t\tsr = sr >> 3 | xmc[35] << 13;\n\t\t\tsr = sr >> 3 | xmc[36] << 13;\n\t\t\t*c++ = sr >> 6;\n\t\t\tsr = sr >> 3 | xmc[37] << 13;\n\t\t\tsr = sr >> 3 | xmc[38] << 13;\n\t\t\t*c++ = sr >> 8;\n\t\t\tsr = sr >> 7 | Nc[3] << 9;\n\t\t\tsr = sr >> 2 | bc[3] << 14;\n\t\t\t*c++ = sr >> 7;\n\t\t\tsr = sr >> 2 | Mc[3] << 14;\n\t\t\tsr = sr >> 6 | xmaxc[3] << 10;\n\t\t\t*c++ = sr >> 7;\n\t\t\tsr = sr >> 3 | xmc[39] << 13;\n\t\t\tsr = sr >> 3 | xmc[40] << 13;\n\t\t\tsr = sr >> 3 | xmc[41] << 13;\n\t\t\t*c++ = sr >> 6;\n\t\t\tsr = sr >> 3 | xmc[42] << 13;\n\t\t\tsr = sr >> 3 | xmc[43] << 13;\n\t\t\t*c++ = sr >> 8;\n\t\t\tsr = sr >> 3 | xmc[44] << 13;\n\t\t\tsr = sr >> 3 | xmc[45] << 13;\n\t\t\tsr = sr >> 3 | xmc[46] << 13;\n\t\t\t*c++ = sr >> 7;\n\t\t\tsr = sr >> 3 | xmc[47] << 13;\n\t\t\tsr = sr >> 3 | xmc[48] << 13;\n\t\t\tsr = sr >> 3 | xmc[49] << 13;\n\t\t\t*c++ = sr >> 6;\n\t\t\tsr = sr >> 3 | xmc[50] << 13;\n\t\t\tsr = sr >> 3 | xmc[51] << 13;\n\t\t\t*c++ = sr >> 8;\n\t\t}\n\t}\n\n\telse\n\n#endif\t/* WAV49 */\n\t{\n\n\t\t*c++ =   ((GSM_MAGIC & 0xF) << 4)\t\t/* 1 */\n\t\t       | ((LARc[0] >> 2) & 0xF);\n\t\t*c++ =   ((LARc[0] & 0x3) << 6)\n\t\t       | (LARc[1] & 0x3F);\n\t\t*c++ =   ((LARc[2] & 0x1F) << 3)\n\t\t       | ((LARc[3] >> 2) & 0x7);\n\t\t*c++ =   ((LARc[3] & 0x3) << 6)\n\t\t       | ((LARc[4] & 0xF) << 2)\n\t\t       | ((LARc[5] >> 2) & 0x3);\n\t\t*c++ =   ((LARc[5] & 0x3) << 6)\n\t\t       | ((LARc[6] & 0x7) << 3)\n\t\t       | (LARc[7] & 0x7);\n\t\t*c++ =   ((Nc[0] & 0x7F) << 1)\n\t\t       | ((bc[0] >> 1) & 0x1);\n\t\t*c++ =   ((bc[0] & 0x1) << 7)\n\t\t       | ((Mc[0] & 0x3) << 5)\n\t\t       | ((xmaxc[0] >> 1) & 0x1F);\n\t\t*c++ =   ((xmaxc[0] & 0x1) << 7)\n\t\t       | ((xmc[0] & 0x7) << 4)\n\t\t       | ((xmc[1] & 0x7) << 1)\n\t\t       | ((xmc[2] >> 2) & 0x1);\n\t\t*c++ =   ((xmc[2] & 0x3) << 6)\n\t\t       | ((xmc[3] & 0x7) << 3)\n\t\t       | (xmc[4] & 0x7);\n\t\t*c++ =   ((xmc[5] & 0x7) << 5)\t\t\t/* 10 */\n\t\t       | ((xmc[6] & 0x7) << 2)\n\t\t       | ((xmc[7] >> 1) & 0x3);\n\t\t*c++ =   ((xmc[7] & 0x1) << 7)\n\t\t       | ((xmc[8] & 0x7) << 4)\n\t\t       | ((xmc[9] & 0x7) << 1)\n\t\t       | ((xmc[10] >> 2) & 0x1);\n\t\t*c++ =   ((xmc[10] & 0x3) << 6)\n\t\t       | ((xmc[11] & 0x7) << 3)\n\t\t       | (xmc[12] & 0x7);\n\t\t*c++ =   ((Nc[1] & 0x7F) << 1)\n\t\t       | ((bc[1] >> 1) & 0x1);\n\t\t*c++ =   ((bc[1] & 0x1) << 7)\n\t\t       | ((Mc[1] & 0x3) << 5)\n\t\t       | ((xmaxc[1] >> 1) & 0x1F);\n\t\t*c++ =   ((xmaxc[1] & 0x1) << 7)\n\t\t       | ((xmc[13] & 0x7) << 4)\n\t\t       | ((xmc[14] & 0x7) << 1)\n\t\t       | ((xmc[15] >> 2) & 0x1);\n\t\t*c++ =   ((xmc[15] & 0x3) << 6)\n\t\t       | ((xmc[16] & 0x7) << 3)\n\t\t       | (xmc[17] & 0x7);\n\t\t*c++ =   ((xmc[18] & 0x7) << 5)\n\t\t       | ((xmc[19] & 0x7) << 2)\n\t\t       | ((xmc[20] >> 1) & 0x3);\n\t\t*c++ =   ((xmc[20] & 0x1) << 7)\n\t\t       | ((xmc[21] & 0x7) << 4)\n\t\t       | ((xmc[22] & 0x7) << 1)\n\t\t       | ((xmc[23] >> 2) & 0x1);\n\t\t*c++ =   ((xmc[23] & 0x3) << 6)\n\t\t       | ((xmc[24] & 0x7) << 3)\n\t\t       | (xmc[25] & 0x7);\n\t\t*c++ =   ((Nc[2] & 0x7F) << 1)\t\t\t/* 20 */\n\t\t       | ((bc[2] >> 1) & 0x1);\n\t\t*c++ =   ((bc[2] & 0x1) << 7)\n\t\t       | ((Mc[2] & 0x3) << 5)\n\t\t       | ((xmaxc[2] >> 1) & 0x1F);\n\t\t*c++ =   ((xmaxc[2] & 0x1) << 7)\n\t\t       | ((xmc[26] & 0x7) << 4)\n\t\t       | ((xmc[27] & 0x7) << 1)\n\t\t       | ((xmc[28] >> 2) & 0x1);\n\t\t*c++ =   ((xmc[28] & 0x3) << 6)\n\t\t       | ((xmc[29] & 0x7) << 3)\n\t\t       | (xmc[30] & 0x7);\n\t\t*c++ =   ((xmc[31] & 0x7) << 5)\n\t\t       | ((xmc[32] & 0x7) << 2)\n\t\t       | ((xmc[33] >> 1) & 0x3);\n\t\t*c++ =   ((xmc[33] & 0x1) << 7)\n\t\t       | ((xmc[34] & 0x7) << 4)\n\t\t       | ((xmc[35] & 0x7) << 1)\n\t\t       | ((xmc[36] >> 2) & 0x1);\n\t\t*c++ =   ((xmc[36] & 0x3) << 6)\n\t\t       | ((xmc[37] & 0x7) << 3)\n\t\t       | (xmc[38] & 0x7);\n\t\t*c++ =   ((Nc[3] & 0x7F) << 1)\n\t\t       | ((bc[3] >> 1) & 0x1);\n\t\t*c++ =   ((bc[3] & 0x1) << 7)\n\t\t       | ((Mc[3] & 0x3) << 5)\n\t\t       | ((xmaxc[3] >> 1) & 0x1F);\n\t\t*c++ =   ((xmaxc[3] & 0x1) << 7)\n\t\t       | ((xmc[39] & 0x7) << 4)\n\t\t       | ((xmc[40] & 0x7) << 1)\n\t\t       | ((xmc[41] >> 2) & 0x1);\n\t\t*c++ =   ((xmc[41] & 0x3) << 6)\t\t\t/* 30 */\n\t\t       | ((xmc[42] & 0x7) << 3)\n\t\t       | (xmc[43] & 0x7);\n\t\t*c++ =   ((xmc[44] & 0x7) << 5)\n\t\t       | ((xmc[45] & 0x7) << 2)\n\t\t       | ((xmc[46] >> 1) & 0x3);\n\t\t*c++ =   ((xmc[46] & 0x1) << 7)\n\t\t       | ((xmc[47] & 0x7) << 4)\n\t\t       | ((xmc[48] & 0x7) << 1)\n\t\t       | ((xmc[49] >> 2) & 0x1);\n\t\t*c++ =   ((xmc[49] & 0x3) << 6)\n\t\t       | ((xmc[50] & 0x7) << 3)\n\t\t       | (xmc[51] & 0x7);\n\n\t}\n}\n\n/****** begin \"long_term.c\" *****/\n\n/*\n *  4.2.11 .. 4.2.12 LONG TERM PREDICTOR (LTP) SECTION\n */\n\n\n/*\n * This module computes the LTP gain (bc) and the LTP lag (Nc)\n * for the long term analysis filter.   This is done by calculating a\n * maximum of the cross-correlation function between the current\n * sub-segment short term residual signal d[0..39] (output of\n * the short term analysis filter; for simplification the index\n * of this array begins at 0 and ends at 39 for each sub-segment of the\n * RPE-LTP analysis) and the previous reconstructed short term\n * residual signal dp[ -120 .. -1 ].  A dynamic scaling must be\n * performed to avoid overflow.\n */\n\n /* The next procedure exists in six versions.  First two integer\n  * version (if USE_FLOAT_MUL is not defined); then four floating\n  * point versions, twice with proper scaling (USE_FLOAT_MUL defined),\n  * once without (USE_FLOAT_MUL and FAST defined, and fast run-time\n  * option used).  Every pair has first a Cut version (see the -C\n  * option to toast or the LTP_CUT option to gsm_option()), then the\n  * uncut one.  (For a detailed explanation of why this is altogether\n  * a bad idea, see Henry Spencer and Geoff Collyer, ``#ifdef Considered\n  * Harmful''.)\n  */\n\n#ifndef  USE_FLOAT_MUL\n\n#ifdef\tLTP_CUT\n\nstatic void Cut_Calculation_of_the_LTP_parameters P5((st, d,dp,bc_out,Nc_out),\n\n\tstruct gsm_state * st,\n\n\tregister word\t* d,\t\t/* [0..39]\tIN\t*/\n\tregister word\t* dp,\t\t/* [-120..-1]\tIN\t*/\n\tword\t\t* bc_out,\t/* \t\tOUT\t*/\n\tword\t\t* Nc_out\t/* \t\tOUT\t*/\n)\n{\n\tregister int  \tk, lambda;\n\tword\t\tNc, bc;\n\tword\t\twt[40];\n\n\tlongword\tL_result;\n\tlongword\tL_max, L_power;\n\tword\t\tR, S, dmax, scal, best_k;\n\tword\t\tltp_cut;\n\n\tregister word\ttemp, wt_k;\n\n\t/*  Search of the optimum scaling of d[0..39].\n\t */\n\tdmax = 0;\n\tfor (k = 0; k <= 39; k++) {\n\t\ttemp = d[k];\n\t\ttemp = GSM_ABS( temp );\n\t\tif (temp > dmax) {\n\t\t\tdmax = temp;\n\t\t\tbest_k = k;\n\t\t}\n\t}\n\ttemp = 0;\n\tif (dmax == 0) scal = 0;\n\telse {\n\t\tassert(dmax > 0);\n\t\ttemp = gsm_norm( (longword)dmax << 16 );\n\t}\n\tif (temp > 6) scal = 0;\n\telse scal = 6 - temp;\n\tassert(scal >= 0);\n\n\t/* Search for the maximum cross-correlation and coding of the LTP lag\n\t */\n\tL_max = 0;\n\tNc    = 40;\t/* index for the maximum cross-correlation */\n\twt_k  = SASR(d[best_k], scal);\n\n\tfor (lambda = 40; lambda <= 120; lambda++) {\n\t\tL_result = (longword)wt_k * dp[best_k - lambda];\n\t\tif (L_result > L_max) {\n\t\t\tNc    = lambda;\n\t\t\tL_max = L_result;\n\t\t}\n\t}\n\t*Nc_out = Nc;\n\tL_max <<= 1;\n\n\t/*  Rescaling of L_max\n\t */\n\tassert(scal <= 100 && scal >= -100);\n\tL_max = L_max >> (6 - scal);\t/* sub(6, scal) */\n\n\tassert( Nc <= 120 && Nc >= 40);\n\n\t/*   Compute the power of the reconstructed short term residual\n\t *   signal dp[..]\n\t */\n\tL_power = 0;\n\tfor (k = 0; k <= 39; k++) {\n\n\t\tregister longword L_temp;\n\n\t\tL_temp   = SASR( dp[k - Nc], 3 );\n\t\tL_power += L_temp * L_temp;\n\t}\n\tL_power <<= 1;\t/* from L_MULT */\n\n\t/*  Normalization of L_max and L_power\n\t */\n\n\tif (L_max <= 0)  {\n\t\t*bc_out = 0;\n\t\treturn;\n\t}\n\tif (L_max >= L_power) {\n\t\t*bc_out = 3;\n\t\treturn;\n\t}\n\n\ttemp = gsm_norm( L_power );\n\n\tR = SASR( L_max   << temp, 16 );\n\tS = SASR( L_power << temp, 16 );\n\n\t/*  Coding of the LTP gain\n\t */\n\n\t/*  Table 4.3a must be used to obtain the level DLB[i] for the\n\t *  quantization of the LTP gain b to get the coded version bc.\n\t */\n\tfor (bc = 0; bc <= 2; bc++) if (R <= gsm_mult(S, gsm_DLB[bc])) break;\n\t*bc_out = bc;\n}\n\n#endif \t/* LTP_CUT */\n\nstatic void Calculation_of_the_LTP_parameters P4((d,dp,bc_out,Nc_out),\n\tregister word\t* d,\t\t/* [0..39]\tIN\t*/\n\tregister word\t* dp,\t\t/* [-120..-1]\tIN\t*/\n\tword\t\t* bc_out,\t/* \t\tOUT\t*/\n\tword\t\t* Nc_out\t/* \t\tOUT\t*/\n)\n{\n\tregister int  \tk, lambda;\n\tword\t\tNc, bc;\n\tword\t\twt[40];\n\n\tlongword\tL_max, L_power;\n\tword\t\tR, S, dmax, scal;\n\tregister word\ttemp;\n\n\t/*  Search of the optimum scaling of d[0..39].\n\t */\n\tdmax = 0;\n\n\tfor (k = 0; k <= 39; k++) {\n\t\ttemp = d[k];\n\t\ttemp = GSM_ABS( temp );\n\t\tif (temp > dmax) dmax = temp;\n\t}\n\n\ttemp = 0;\n\tif (dmax == 0) scal = 0;\n\telse {\n\t\tassert(dmax > 0);\n\t\ttemp = gsm_norm( (longword)dmax << 16 );\n\t}\n\n\tif (temp > 6) scal = 0;\n\telse scal = 6 - temp;\n\n\tassert(scal >= 0);\n\n\t/*  Initialization of a working array wt\n\t */\n\n\tfor (k = 0; k <= 39; k++) wt[k] = SASR( d[k], scal );\n\n\t/* Search for the maximum cross-correlation and coding of the LTP lag\n\t */\n\tL_max = 0;\n\tNc    = 40;\t/* index for the maximum cross-correlation */\n\n\tfor (lambda = 40; lambda <= 120; lambda++) {\n\n# undef STEP\n#\t\tdefine STEP(k) \t(longword)wt[k] * dp[k - lambda]\n\n\t\tregister longword L_result;\n\n\t\tL_result  = STEP(0)  ; L_result += STEP(1) ;\n\t\tL_result += STEP(2)  ; L_result += STEP(3) ;\n\t\tL_result += STEP(4)  ; L_result += STEP(5)  ;\n\t\tL_result += STEP(6)  ; L_result += STEP(7)  ;\n\t\tL_result += STEP(8)  ; L_result += STEP(9)  ;\n\t\tL_result += STEP(10) ; L_result += STEP(11) ;\n\t\tL_result += STEP(12) ; L_result += STEP(13) ;\n\t\tL_result += STEP(14) ; L_result += STEP(15) ;\n\t\tL_result += STEP(16) ; L_result += STEP(17) ;\n\t\tL_result += STEP(18) ; L_result += STEP(19) ;\n\t\tL_result += STEP(20) ; L_result += STEP(21) ;\n\t\tL_result += STEP(22) ; L_result += STEP(23) ;\n\t\tL_result += STEP(24) ; L_result += STEP(25) ;\n\t\tL_result += STEP(26) ; L_result += STEP(27) ;\n\t\tL_result += STEP(28) ; L_result += STEP(29) ;\n\t\tL_result += STEP(30) ; L_result += STEP(31) ;\n\t\tL_result += STEP(32) ; L_result += STEP(33) ;\n\t\tL_result += STEP(34) ; L_result += STEP(35) ;\n\t\tL_result += STEP(36) ; L_result += STEP(37) ;\n\t\tL_result += STEP(38) ; L_result += STEP(39) ;\n\n\t\tif (L_result > L_max) {\n\n\t\t\tNc    = lambda;\n\t\t\tL_max = L_result;\n\t\t}\n\t}\n\n\t*Nc_out = Nc;\n\n\tL_max <<= 1;\n\n\t/*  Rescaling of L_max\n\t */\n\tassert(scal <= 100 && scal >=  -100);\n\tL_max = L_max >> (6 - scal);\t/* sub(6, scal) */\n\n\tassert( Nc <= 120 && Nc >= 40);\n\n\t/*   Compute the power of the reconstructed short term residual\n\t *   signal dp[..]\n\t */\n\tL_power = 0;\n\tfor (k = 0; k <= 39; k++) {\n\n\t\tregister longword L_temp;\n\n\t\tL_temp   = SASR( dp[k - Nc], 3 );\n\t\tL_power += L_temp * L_temp;\n\t}\n\tL_power <<= 1;\t/* from L_MULT */\n\n\t/*  Normalization of L_max and L_power\n\t */\n\n\tif (L_max <= 0)  {\n\t\t*bc_out = 0;\n\t\treturn;\n\t}\n\tif (L_max >= L_power) {\n\t\t*bc_out = 3;\n\t\treturn;\n\t}\n\n\ttemp = gsm_norm( L_power );\n\n\tR = SASR( L_max   << temp, 16 );\n\tS = SASR( L_power << temp, 16 );\n\n\t/*  Coding of the LTP gain\n\t */\n\n\t/*  Table 4.3a must be used to obtain the level DLB[i] for the\n\t *  quantization of the LTP gain b to get the coded version bc.\n\t */\n\tfor (bc = 0; bc <= 2; bc++) if (R <= gsm_mult(S, gsm_DLB[bc])) break;\n\t*bc_out = bc;\n}\n\n#else\t/* USE_FLOAT_MUL */\n\n#ifdef\tLTP_CUT\n\nstatic void Cut_Calculation_of_the_LTP_parameters P5((st, d,dp,bc_out,Nc_out),\n\tstruct gsm_state * st,\t\t/*              IN \t*/\n\tregister word\t* d,\t\t/* [0..39]\tIN\t*/\n\tregister word\t* dp,\t\t/* [-120..-1]\tIN\t*/\n\tword\t\t* bc_out,\t/* \t\tOUT\t*/\n\tword\t\t* Nc_out\t/* \t\tOUT\t*/\n)\n{\n\tregister int  \tk, lambda;\n\tword\t\tNc, bc;\n\tword\t\tltp_cut;\n\n\tfloat\t\twt_float[40];\n\tfloat\t\tdp_float_base[120], * dp_float = dp_float_base + 120;\n\n\tlongword\tL_max, L_power;\n\tword\t\tR, S, dmax, scal;\n\tregister word\ttemp;\n\n\t/*  Search of the optimum scaling of d[0..39].\n\t */\n\tdmax = 0;\n\n\tfor (k = 0; k <= 39; k++) {\n\t\ttemp = d[k];\n\t\ttemp = GSM_ABS( temp );\n\t\tif (temp > dmax) dmax = temp;\n\t}\n\n\ttemp = 0;\n\tif (dmax == 0) scal = 0;\n\telse {\n\t\tassert(dmax > 0);\n\t\ttemp = gsm_norm( (longword)dmax << 16 );\n\t}\n\n\tif (temp > 6) scal = 0;\n\telse scal = 6 - temp;\n\n\tassert(scal >= 0);\n\tltp_cut = (longword)SASR(dmax, scal) * st->ltp_cut / 100; \n\n\n\t/*  Initialization of a working array wt\n\t */\n\n\tfor (k = 0; k < 40; k++) {\n\t\tregister word w = SASR( d[k], scal );\n\t\tif (w < 0 ? w > -ltp_cut : w < ltp_cut) {\n\t\t\twt_float[k] = 0.0;\n\t\t}\n\t\telse {\n\t\t\twt_float[k] =  w;\n\t\t}\n\t}\n\tfor (k = -120; k <  0; k++) dp_float[k] =  dp[k];\n\n\t/* Search for the maximum cross-correlation and coding of the LTP lag\n\t */\n\tL_max = 0;\n\tNc    = 40;\t/* index for the maximum cross-correlation */\n\n\tfor (lambda = 40; lambda <= 120; lambda += 9) {\n\n\t\t/*  Calculate L_result for l = lambda .. lambda + 9.\n\t\t */\n\t\tregister float *lp = dp_float - lambda;\n\n\t\tregister float\tW;\n\t\tregister float\ta = lp[-8], b = lp[-7], c = lp[-6],\n\t\t\t\td = lp[-5], e = lp[-4], f = lp[-3],\n\t\t\t\tg = lp[-2], h = lp[-1];\n\t\tregister float  E; \n\t\tregister float  S0 = 0, S1 = 0, S2 = 0, S3 = 0, S4 = 0,\n\t\t\t\tS5 = 0, S6 = 0, S7 = 0, S8 = 0;\n\n#\t\tundef STEP\n#\t\tdefine\tSTEP(K, a, b, c, d, e, f, g, h) \\\n\t\t\tif ((W = wt_float[K]) != 0.0) {\t\\\n\t\t\tE = W * a; S8 += E;\t\t\\\n\t\t\tE = W * b; S7 += E;\t\t\\\n\t\t\tE = W * c; S6 += E;\t\t\\\n\t\t\tE = W * d; S5 += E;\t\t\\\n\t\t\tE = W * e; S4 += E;\t\t\\\n\t\t\tE = W * f; S3 += E;\t\t\\\n\t\t\tE = W * g; S2 += E;\t\t\\\n\t\t\tE = W * h; S1 += E;\t\t\\\n\t\t\ta  = lp[K];\t\t\t\\\n\t\t\tE = W * a; S0 += E; } else (a = lp[K])\n\n#\t\tdefine\tSTEP_A(K)\tSTEP(K, a, b, c, d, e, f, g, h)\n#\t\tdefine\tSTEP_B(K)\tSTEP(K, b, c, d, e, f, g, h, a)\n#\t\tdefine\tSTEP_C(K)\tSTEP(K, c, d, e, f, g, h, a, b)\n#\t\tdefine\tSTEP_D(K)\tSTEP(K, d, e, f, g, h, a, b, c)\n#\t\tdefine\tSTEP_E(K)\tSTEP(K, e, f, g, h, a, b, c, d)\n#\t\tdefine\tSTEP_F(K)\tSTEP(K, f, g, h, a, b, c, d, e)\n#\t\tdefine\tSTEP_G(K)\tSTEP(K, g, h, a, b, c, d, e, f)\n#\t\tdefine\tSTEP_H(K)\tSTEP(K, h, a, b, c, d, e, f, g)\n\n\t\tSTEP_A( 0); STEP_B( 1); STEP_C( 2); STEP_D( 3);\n\t\tSTEP_E( 4); STEP_F( 5); STEP_G( 6); STEP_H( 7);\n\n\t\tSTEP_A( 8); STEP_B( 9); STEP_C(10); STEP_D(11);\n\t\tSTEP_E(12); STEP_F(13); STEP_G(14); STEP_H(15);\n\n\t\tSTEP_A(16); STEP_B(17); STEP_C(18); STEP_D(19);\n\t\tSTEP_E(20); STEP_F(21); STEP_G(22); STEP_H(23);\n\n\t\tSTEP_A(24); STEP_B(25); STEP_C(26); STEP_D(27);\n\t\tSTEP_E(28); STEP_F(29); STEP_G(30); STEP_H(31);\n\n\t\tSTEP_A(32); STEP_B(33); STEP_C(34); STEP_D(35);\n\t\tSTEP_E(36); STEP_F(37); STEP_G(38); STEP_H(39);\n\n\t\tif (S0 > L_max) { L_max = S0; Nc = lambda;     }\n\t\tif (S1 > L_max) { L_max = S1; Nc = lambda + 1; }\n\t\tif (S2 > L_max) { L_max = S2; Nc = lambda + 2; }\n\t\tif (S3 > L_max) { L_max = S3; Nc = lambda + 3; }\n\t\tif (S4 > L_max) { L_max = S4; Nc = lambda + 4; }\n\t\tif (S5 > L_max) { L_max = S5; Nc = lambda + 5; }\n\t\tif (S6 > L_max) { L_max = S6; Nc = lambda + 6; }\n\t\tif (S7 > L_max) { L_max = S7; Nc = lambda + 7; }\n\t\tif (S8 > L_max) { L_max = S8; Nc = lambda + 8; }\n\n\t}\n\t*Nc_out = Nc;\n\n\tL_max <<= 1;\n\n\t/*  Rescaling of L_max\n\t */\n\tassert(scal <= 100 && scal >=  -100);\n\tL_max = L_max >> (6 - scal);\t/* sub(6, scal) */\n\n\tassert( Nc <= 120 && Nc >= 40);\n\n\t/*   Compute the power of the reconstructed short term residual\n\t *   signal dp[..]\n\t */\n\tL_power = 0;\n\tfor (k = 0; k <= 39; k++) {\n\n\t\tregister longword L_temp;\n\n\t\tL_temp   = SASR( dp[k - Nc], 3 );\n\t\tL_power += L_temp * L_temp;\n\t}\n\tL_power <<= 1;\t/* from L_MULT */\n\n\t/*  Normalization of L_max and L_power\n\t */\n\n\tif (L_max <= 0)  {\n\t\t*bc_out = 0;\n\t\treturn;\n\t}\n\tif (L_max >= L_power) {\n\t\t*bc_out = 3;\n\t\treturn;\n\t}\n\n\ttemp = gsm_norm( L_power );\n\n\tR = SASR( L_max   << temp, 16 );\n\tS = SASR( L_power << temp, 16 );\n\n\t/*  Coding of the LTP gain\n\t */\n\n\t/*  Table 4.3a must be used to obtain the level DLB[i] for the\n\t *  quantization of the LTP gain b to get the coded version bc.\n\t */\n\tfor (bc = 0; bc <= 2; bc++) if (R <= gsm_mult(S, gsm_DLB[bc])) break;\n\t*bc_out = bc;\n}\n\n#endif /* LTP_CUT */\n\nstatic void Calculation_of_the_LTP_parameters P4((d,dp,bc_out,Nc_out),\n\tregister word\t* d,\t\t/* [0..39]\tIN\t*/\n\tregister word\t* dp,\t\t/* [-120..-1]\tIN\t*/\n\tword\t\t* bc_out,\t/* \t\tOUT\t*/\n\tword\t\t* Nc_out\t/* \t\tOUT\t*/\n)\n{\n\tregister int  \tk, lambda;\n\tword\t\tNc, bc;\n\n\tfloat\t\twt_float[40];\n\tfloat\t\tdp_float_base[120], * dp_float = dp_float_base + 120;\n\n\tlongword\tL_max, L_power;\n\tword\t\tR, S, dmax, scal;\n\tregister word\ttemp;\n\n\t/*  Search of the optimum scaling of d[0..39].\n\t */\n\tdmax = 0;\n\n\tfor (k = 0; k <= 39; k++) {\n\t\ttemp = d[k];\n\t\ttemp = GSM_ABS( temp );\n\t\tif (temp > dmax) dmax = temp;\n\t}\n\n\ttemp = 0;\n\tif (dmax == 0) scal = 0;\n\telse {\n\t\tassert(dmax > 0);\n\t\ttemp = gsm_norm( (longword)dmax << 16 );\n\t}\n\n\tif (temp > 6) scal = 0;\n\telse scal = 6 - temp;\n\n\tassert(scal >= 0);\n\n\t/*  Initialization of a working array wt\n\t */\n\n\tfor (k =    0; k < 40; k++) wt_float[k] =  SASR( d[k], scal );\n\tfor (k = -120; k <  0; k++) dp_float[k] =  dp[k];\n\n\t/* Search for the maximum cross-correlation and coding of the LTP lag\n\t */\n\tL_max = 0;\n\tNc    = 40;\t/* index for the maximum cross-correlation */\n\n\tfor (lambda = 40; lambda <= 120; lambda += 9) {\n\n\t\t/*  Calculate L_result for l = lambda .. lambda + 9.\n\t\t */\n\t\tregister float *lp = dp_float - lambda;\n\n\t\tregister float\tW;\n\t\tregister float\ta = lp[-8], b = lp[-7], c = lp[-6],\n\t\t\t\td = lp[-5], e = lp[-4], f = lp[-3],\n\t\t\t\tg = lp[-2], h = lp[-1];\n\t\tregister float  E; \n\t\tregister float  S0 = 0, S1 = 0, S2 = 0, S3 = 0, S4 = 0,\n\t\t\t\tS5 = 0, S6 = 0, S7 = 0, S8 = 0;\n\n#\t\tundef STEP\n#\t\tdefine\tSTEP(K, a, b, c, d, e, f, g, h) \\\n\t\t\tW = wt_float[K];\t\t\\\n\t\t\tE = W * a; S8 += E;\t\t\\\n\t\t\tE = W * b; S7 += E;\t\t\\\n\t\t\tE = W * c; S6 += E;\t\t\\\n\t\t\tE = W * d; S5 += E;\t\t\\\n\t\t\tE = W * e; S4 += E;\t\t\\\n\t\t\tE = W * f; S3 += E;\t\t\\\n\t\t\tE = W * g; S2 += E;\t\t\\\n\t\t\tE = W * h; S1 += E;\t\t\\\n\t\t\ta  = lp[K];\t\t\t\\\n\t\t\tE = W * a; S0 += E\n\n#\t\tdefine\tSTEP_A(K)\tSTEP(K, a, b, c, d, e, f, g, h)\n#\t\tdefine\tSTEP_B(K)\tSTEP(K, b, c, d, e, f, g, h, a)\n#\t\tdefine\tSTEP_C(K)\tSTEP(K, c, d, e, f, g, h, a, b)\n#\t\tdefine\tSTEP_D(K)\tSTEP(K, d, e, f, g, h, a, b, c)\n#\t\tdefine\tSTEP_E(K)\tSTEP(K, e, f, g, h, a, b, c, d)\n#\t\tdefine\tSTEP_F(K)\tSTEP(K, f, g, h, a, b, c, d, e)\n#\t\tdefine\tSTEP_G(K)\tSTEP(K, g, h, a, b, c, d, e, f)\n#\t\tdefine\tSTEP_H(K)\tSTEP(K, h, a, b, c, d, e, f, g)\n\n\t\tSTEP_A( 0); STEP_B( 1); STEP_C( 2); STEP_D( 3);\n\t\tSTEP_E( 4); STEP_F( 5); STEP_G( 6); STEP_H( 7);\n\n\t\tSTEP_A( 8); STEP_B( 9); STEP_C(10); STEP_D(11);\n\t\tSTEP_E(12); STEP_F(13); STEP_G(14); STEP_H(15);\n\n\t\tSTEP_A(16); STEP_B(17); STEP_C(18); STEP_D(19);\n\t\tSTEP_E(20); STEP_F(21); STEP_G(22); STEP_H(23);\n\n\t\tSTEP_A(24); STEP_B(25); STEP_C(26); STEP_D(27);\n\t\tSTEP_E(28); STEP_F(29); STEP_G(30); STEP_H(31);\n\n\t\tSTEP_A(32); STEP_B(33); STEP_C(34); STEP_D(35);\n\t\tSTEP_E(36); STEP_F(37); STEP_G(38); STEP_H(39);\n\n\t\tif (S0 > L_max) { L_max = S0; Nc = lambda;     }\n\t\tif (S1 > L_max) { L_max = S1; Nc = lambda + 1; }\n\t\tif (S2 > L_max) { L_max = S2; Nc = lambda + 2; }\n\t\tif (S3 > L_max) { L_max = S3; Nc = lambda + 3; }\n\t\tif (S4 > L_max) { L_max = S4; Nc = lambda + 4; }\n\t\tif (S5 > L_max) { L_max = S5; Nc = lambda + 5; }\n\t\tif (S6 > L_max) { L_max = S6; Nc = lambda + 6; }\n\t\tif (S7 > L_max) { L_max = S7; Nc = lambda + 7; }\n\t\tif (S8 > L_max) { L_max = S8; Nc = lambda + 8; }\n\t}\n\t*Nc_out = Nc;\n\n\tL_max <<= 1;\n\n\t/*  Rescaling of L_max\n\t */\n\tassert(scal <= 100 && scal >=  -100);\n\tL_max = L_max >> (6 - scal);\t/* sub(6, scal) */\n\n\tassert( Nc <= 120 && Nc >= 40);\n\n\t/*   Compute the power of the reconstructed short term residual\n\t *   signal dp[..]\n\t */\n\tL_power = 0;\n\tfor (k = 0; k <= 39; k++) {\n\n\t\tregister longword L_temp;\n\n\t\tL_temp   = SASR( dp[k - Nc], 3 );\n\t\tL_power += L_temp * L_temp;\n\t}\n\tL_power <<= 1;\t/* from L_MULT */\n\n\t/*  Normalization of L_max and L_power\n\t */\n\n\tif (L_max <= 0)  {\n\t\t*bc_out = 0;\n\t\treturn;\n\t}\n\tif (L_max >= L_power) {\n\t\t*bc_out = 3;\n\t\treturn;\n\t}\n\n\ttemp = gsm_norm( L_power );\n\n\tR = SASR( L_max   << temp, 16 );\n\tS = SASR( L_power << temp, 16 );\n\n\t/*  Coding of the LTP gain\n\t */\n\n\t/*  Table 4.3a must be used to obtain the level DLB[i] for the\n\t *  quantization of the LTP gain b to get the coded version bc.\n\t */\n\tfor (bc = 0; bc <= 2; bc++) if (R <= gsm_mult(S, gsm_DLB[bc])) break;\n\t*bc_out = bc;\n}\n\n#ifdef\tFAST\n#ifdef\tLTP_CUT\n\nstatic void Cut_Fast_Calculation_of_the_LTP_parameters P5((st,\n\t\t\t\t\t\t\td,dp,bc_out,Nc_out),\n\tstruct gsm_state * st,\t\t/*              IN\t*/\n\tregister word\t* d,\t\t/* [0..39]\tIN\t*/\n\tregister word\t* dp,\t\t/* [-120..-1]\tIN\t*/\n\tword\t\t* bc_out,\t/* \t\tOUT\t*/\n\tword\t\t* Nc_out\t/* \t\tOUT\t*/\n)\n{\n\tregister int  \tk, lambda;\n\tregister float\twt_float;\n\tword\t\tNc, bc;\n\tword\t\twt_max, best_k, ltp_cut;\n\n\tfloat\t\tdp_float_base[120], * dp_float = dp_float_base + 120;\n\n\tregister float\tL_result, L_max, L_power;\n\n\twt_max = 0;\n\n\tfor (k = 0; k < 40; ++k) {\n\t\tif      ( d[k] > wt_max) wt_max =  d[best_k = k];\n\t\telse if (-d[k] > wt_max) wt_max = -d[best_k = k];\n\t}\n\n\tassert(wt_max >= 0);\n\twt_float = (float)wt_max;\n\n\tfor (k = -120; k < 0; ++k) dp_float[k] = (float)dp[k];\n\n\t/* Search for the maximum cross-correlation and coding of the LTP lag\n\t */\n\tL_max = 0;\n\tNc    = 40;\t/* index for the maximum cross-correlation */\n\n\tfor (lambda = 40; lambda <= 120; lambda++) {\n\t\tL_result = wt_float * dp_float[best_k - lambda];\n\t\tif (L_result > L_max) {\n\t\t\tNc    = lambda;\n\t\t\tL_max = L_result;\n\t\t}\n\t}\n\n\t*Nc_out = Nc;\n\tif (L_max <= 0.)  {\n\t\t*bc_out = 0;\n\t\treturn;\n\t}\n\n\t/*  Compute the power of the reconstructed short term residual\n\t *  signal dp[..]\n\t */\n\tdp_float -= Nc;\n\tL_power = 0;\n\tfor (k = 0; k < 40; ++k) {\n\t\tregister float f = dp_float[k];\n\t\tL_power += f * f;\n\t}\n\n\tif (L_max >= L_power) {\n\t\t*bc_out = 3;\n\t\treturn;\n\t}\n\n\t/*  Coding of the LTP gain\n\t *  Table 4.3a must be used to obtain the level DLB[i] for the\n\t *  quantization of the LTP gain b to get the coded version bc.\n\t */\n\tlambda = L_max / L_power * 32768.;\n\tfor (bc = 0; bc <= 2; ++bc) if (lambda <= gsm_DLB[bc]) break;\n\t*bc_out = bc;\n}\n\n#endif /* LTP_CUT */\n\nstatic void Fast_Calculation_of_the_LTP_parameters P4((d,dp,bc_out,Nc_out),\n\tregister word\t* d,\t\t/* [0..39]\tIN\t*/\n\tregister word\t* dp,\t\t/* [-120..-1]\tIN\t*/\n\tword\t\t* bc_out,\t/* \t\tOUT\t*/\n\tword\t\t* Nc_out\t/* \t\tOUT\t*/\n)\n{\n\tregister int  \tk, lambda;\n\tword\t\tNc, bc;\n\n\tfloat\t\twt_float[40];\n\tfloat\t\tdp_float_base[120], * dp_float = dp_float_base + 120;\n\n\tregister float\tL_max, L_power;\n\n\tfor (k = 0; k < 40; ++k) wt_float[k] = (float)d[k];\n\tfor (k = -120; k < 0; ++k) dp_float[k] = (float)dp[k];\n\n\t/* Search for the maximum cross-correlation and coding of the LTP lag\n\t */\n\tL_max = 0;\n\tNc    = 40;\t/* index for the maximum cross-correlation */\n\n\tfor (lambda = 40; lambda <= 120; lambda += 9) {\n\n\t\t/*  Calculate L_result for l = lambda .. lambda + 9.\n\t\t */\n\t\tregister float *lp = dp_float - lambda;\n\n\t\tregister float\tW;\n\t\tregister float\ta = lp[-8], b = lp[-7], c = lp[-6],\n\t\t\t\td = lp[-5], e = lp[-4], f = lp[-3],\n\t\t\t\tg = lp[-2], h = lp[-1];\n\t\tregister float  E; \n\t\tregister float  S0 = 0, S1 = 0, S2 = 0, S3 = 0, S4 = 0,\n\t\t\t\tS5 = 0, S6 = 0, S7 = 0, S8 = 0;\n\n#\t\tundef STEP\n#\t\tdefine\tSTEP(K, a, b, c, d, e, f, g, h) \\\n\t\t\tW = wt_float[K];\t\t\\\n\t\t\tE = W * a; S8 += E;\t\t\\\n\t\t\tE = W * b; S7 += E;\t\t\\\n\t\t\tE = W * c; S6 += E;\t\t\\\n\t\t\tE = W * d; S5 += E;\t\t\\\n\t\t\tE = W * e; S4 += E;\t\t\\\n\t\t\tE = W * f; S3 += E;\t\t\\\n\t\t\tE = W * g; S2 += E;\t\t\\\n\t\t\tE = W * h; S1 += E;\t\t\\\n\t\t\ta  = lp[K];\t\t\t\\\n\t\t\tE = W * a; S0 += E\n\n#\t\tdefine\tSTEP_A(K)\tSTEP(K, a, b, c, d, e, f, g, h)\n#\t\tdefine\tSTEP_B(K)\tSTEP(K, b, c, d, e, f, g, h, a)\n#\t\tdefine\tSTEP_C(K)\tSTEP(K, c, d, e, f, g, h, a, b)\n#\t\tdefine\tSTEP_D(K)\tSTEP(K, d, e, f, g, h, a, b, c)\n#\t\tdefine\tSTEP_E(K)\tSTEP(K, e, f, g, h, a, b, c, d)\n#\t\tdefine\tSTEP_F(K)\tSTEP(K, f, g, h, a, b, c, d, e)\n#\t\tdefine\tSTEP_G(K)\tSTEP(K, g, h, a, b, c, d, e, f)\n#\t\tdefine\tSTEP_H(K)\tSTEP(K, h, a, b, c, d, e, f, g)\n\n\t\tSTEP_A( 0); STEP_B( 1); STEP_C( 2); STEP_D( 3);\n\t\tSTEP_E( 4); STEP_F( 5); STEP_G( 6); STEP_H( 7);\n\n\t\tSTEP_A( 8); STEP_B( 9); STEP_C(10); STEP_D(11);\n\t\tSTEP_E(12); STEP_F(13); STEP_G(14); STEP_H(15);\n\n\t\tSTEP_A(16); STEP_B(17); STEP_C(18); STEP_D(19);\n\t\tSTEP_E(20); STEP_F(21); STEP_G(22); STEP_H(23);\n\n\t\tSTEP_A(24); STEP_B(25); STEP_C(26); STEP_D(27);\n\t\tSTEP_E(28); STEP_F(29); STEP_G(30); STEP_H(31);\n\n\t\tSTEP_A(32); STEP_B(33); STEP_C(34); STEP_D(35);\n\t\tSTEP_E(36); STEP_F(37); STEP_G(38); STEP_H(39);\n\n\t\tif (S0 > L_max) { L_max = S0; Nc = lambda;     }\n\t\tif (S1 > L_max) { L_max = S1; Nc = lambda + 1; }\n\t\tif (S2 > L_max) { L_max = S2; Nc = lambda + 2; }\n\t\tif (S3 > L_max) { L_max = S3; Nc = lambda + 3; }\n\t\tif (S4 > L_max) { L_max = S4; Nc = lambda + 4; }\n\t\tif (S5 > L_max) { L_max = S5; Nc = lambda + 5; }\n\t\tif (S6 > L_max) { L_max = S6; Nc = lambda + 6; }\n\t\tif (S7 > L_max) { L_max = S7; Nc = lambda + 7; }\n\t\tif (S8 > L_max) { L_max = S8; Nc = lambda + 8; }\n\t}\n\t*Nc_out = Nc;\n\n\tif (L_max <= 0.)  {\n\t\t*bc_out = 0;\n\t\treturn;\n\t}\n\n\t/*  Compute the power of the reconstructed short term residual\n\t *  signal dp[..]\n\t */\n\tdp_float -= Nc;\n\tL_power = 0;\n\tfor (k = 0; k < 40; ++k) {\n\t\tregister float f = dp_float[k];\n\t\tL_power += f * f;\n\t}\n\n\tif (L_max >= L_power) {\n\t\t*bc_out = 3;\n\t\treturn;\n\t}\n\n\t/*  Coding of the LTP gain\n\t *  Table 4.3a must be used to obtain the level DLB[i] for the\n\t *  quantization of the LTP gain b to get the coded version bc.\n\t */\n\tlambda = L_max / L_power * 32768.;\n\tfor (bc = 0; bc <= 2; ++bc) if (lambda <= gsm_DLB[bc]) break;\n\t*bc_out = bc;\n}\n\n#endif\t/* FAST \t */\n#endif\t/* USE_FLOAT_MUL */\n\n\n/* 4.2.12 */\n\nstatic void Long_term_analysis_filtering P6((bc,Nc,dp,d,dpp,e),\n\tword\t\tbc,\t/* \t\t\t\t\tIN  */\n\tword\t\tNc,\t/* \t\t\t\t\tIN  */\n\tregister word\t* dp,\t/* previous d\t[-120..-1]\t\tIN  */\n\tregister word\t* d,\t/* d\t\t[0..39]\t\t\tIN  */\n\tregister word\t* dpp,\t/* estimate\t[0..39]\t\t\tOUT */\n\tregister word\t* e\t/* long term res. signal [0..39]\tOUT */\n)\n/*\n *  In this part, we have to decode the bc parameter to compute\n *  the samples of the estimate dpp[0..39].  The decoding of bc needs the\n *  use of table 4.3b.  The long term residual signal e[0..39]\n *  is then calculated to be fed to the RPE encoding section.\n */\n{\n\tregister int      k;\n\tregister longword ltmp;\n\n#\tundef STEP\n#\tdefine STEP(BP)\t\t\t\t\t\\\n\tfor (k = 0; k <= 39; k++) {\t\t\t\\\n\t\tdpp[k]  = GSM_MULT_R( BP, dp[k - Nc]);\t\\\n\t\te[k]\t= GSM_SUB( d[k], dpp[k] );\t\\\n\t}\n\n\tswitch (bc) {\n\tcase 0:\tSTEP(  3277 ); break;\n\tcase 1:\tSTEP( 11469 ); break;\n\tcase 2: STEP( 21299 ); break;\n\tcase 3: STEP( 32767 ); break; \n\t}\n}\n\nvoid Gsm_Long_Term_Predictor P7((S,d,dp,e,dpp,Nc,bc), \t/* 4x for 160 samples */\n\n\tstruct gsm_state\t* S,\n\n\tword\t* d,\t/* [0..39]   residual signal\tIN\t*/\n\tword\t* dp,\t/* [-120..-1] d'\t\tIN\t*/\n\n\tword\t* e,\t/* [0..39] \t\t\tOUT\t*/\n\tword\t* dpp,\t/* [0..39] \t\t\tOUT\t*/\n\tword\t* Nc,\t/* correlation lag\t\tOUT\t*/\n\tword\t* bc\t/* gain factor\t\t\tOUT\t*/\n)\n{\n\tassert( d  ); assert( dp ); assert( e  );\n\tassert( dpp); assert( Nc ); assert( bc );\n\n#if defined(FAST) && defined(USE_FLOAT_MUL)\n\tif (S->fast) \n#if   defined (LTP_CUT)\n\t\tif (S->ltp_cut)\n\t\t\tCut_Fast_Calculation_of_the_LTP_parameters(S,\n\t\t\t\td, dp, bc, Nc);\n\t\telse\n#endif /* LTP_CUT */\n\t\t\tFast_Calculation_of_the_LTP_parameters(d, dp, bc, Nc );\n\telse \n#endif /* FAST & USE_FLOAT_MUL */\n#ifdef LTP_CUT\n\t\tif (S->ltp_cut)\n\t\t\tCut_Calculation_of_the_LTP_parameters(S, d, dp, bc, Nc);\n\t\telse\n#endif\n\t\t\tCalculation_of_the_LTP_parameters(d, dp, bc, Nc);\n\n\tLong_term_analysis_filtering( *bc, *Nc, dp, d, dpp, e );\n}\n\n/* 4.3.2 */\nvoid Gsm_Long_Term_Synthesis_Filtering P5((S,Ncr,bcr,erp,drp),\n\tstruct gsm_state\t* S,\n\n\tword\t\t\tNcr,\n\tword\t\t\tbcr,\n\tregister word\t\t* erp,\t   /* [0..39]\t\t  \t IN */\n\tregister word\t\t* drp\t   /* [-120..-1] IN, [-120..40] OUT */\n)\n/*\n *  This procedure uses the bcr and Ncr parameter to realize the\n *  long term synthesis filtering.  The decoding of bcr needs\n *  table 4.3b.\n */\n{\n\tregister longword\tltmp;\t/* for ADD */\n\tregister int \t\tk;\n\tword\t\t\tbrp, drpp, Nr;\n\n\t/*  Check the limits of Nr.\n\t */\n\tNr = Ncr < 40 || Ncr > 120 ? S->nrp : Ncr;\n\tS->nrp = Nr;\n\tassert(Nr >= 40 && Nr <= 120);\n\n\t/*  Decoding of the LTP gain bcr\n\t */\n\tbrp = gsm_QLB[ bcr ];\n\n\t/*  Computation of the reconstructed short term residual \n\t *  signal drp[0..39]\n\t */\n\tassert(brp != MIN_WORD);\n\n\tfor (k = 0; k <= 39; k++) {\n\t\tdrpp   = GSM_MULT_R( brp, drp[ k - Nr ] );\n\t\tdrp[k] = GSM_ADD( erp[k], drpp );\n\t}\n\n\t/*\n\t *  Update of the reconstructed short term residual signal\n\t *  drp[ -1..-120 ]\n\t */\n\n\tfor (k = 0; k <= 119; k++) drp[ -120 + k ] = drp[ -80 + k ];\n}\n\n/****** begin \"lpc.c\" *****/\n\n#undef STEP\n#undef\tP\n\n/*\n *  4.2.4 .. 4.2.7 LPC ANALYSIS SECTION\n */\n\n/* 4.2.4 */\n\n\nstatic void Autocorrelation P2((s, L_ACF),\n\tword     * s,\t\t/* [0..159]\tIN/OUT  */\n \tlongword * L_ACF)\t/* [0..8]\tOUT     */\n/*\n *  The goal is to compute the array L_ACF[k].  The signal s[i] must\n *  be scaled in order to avoid an overflow situation.\n */\n{\n\tregister int\tk, i;\n\n\tword\t\ttemp, smax, scalauto;\n\n#ifdef\tUSE_FLOAT_MUL\n\tfloat\t\tfloat_s[160];\n#endif\n\n\t/*  Dynamic scaling of the array  s[0..159]\n\t */\n\n\t/*  Search for the maximum.\n\t */\n\tsmax = 0;\n\tfor (k = 0; k <= 159; k++) {\n\t\ttemp = GSM_ABS( s[k] );\n\t\tif (temp > smax) smax = temp;\n\t}\n\n\t/*  Computation of the scaling factor.\n\t */\n\tif (smax == 0) scalauto = 0;\n\telse {\n\t\tassert(smax > 0);\n\t\tscalauto = 4 - gsm_norm( (longword)smax << 16 );/* sub(4,..) */\n\t}\n\n\t/*  Scaling of the array s[0...159]\n\t */\n\n\tif (scalauto > 0) {\n\n# ifdef USE_FLOAT_MUL\n#   define SCALE(n)\t\\\n\tcase n: for (k = 0; k <= 159; k++) \\\n\t\t\tfloat_s[k] = (float)\t\\\n\t\t\t\t(s[k] = GSM_MULT_R(s[k], 16384 >> (n-1)));\\\n\t\tbreak;\n# else \n#   define SCALE(n)\t\\\n\tcase n: for (k = 0; k <= 159; k++) \\\n\t\t\ts[k] = GSM_MULT_R( s[k], 16384 >> (n-1) );\\\n\t\tbreak;\n# endif /* USE_FLOAT_MUL */\n\n\t\tswitch (scalauto) {\n\t\tSCALE(1)\n\t\tSCALE(2)\n\t\tSCALE(3)\n\t\tSCALE(4)\n\t\t}\n# undef\tSCALE\n\t}\n# ifdef\tUSE_FLOAT_MUL\n\telse for (k = 0; k <= 159; k++) float_s[k] = (float) s[k];\n# endif\n\n\t/*  Compute the L_ACF[..].\n\t */\n\t{\n# ifdef\tUSE_FLOAT_MUL\n\t\tregister float * sp = float_s;\n\t\tregister float   sl = *sp;\n\n#\t\tdefine STEP(k)\t L_ACF[k] += (longword)(sl * sp[ -(k) ]);\n# else\n\t\tword  * sp = s;\n\t\tword    sl = *sp;\n\n#\t\tdefine STEP(k)\t L_ACF[k] += ((longword)sl * sp[ -(k) ]);\n# endif\n\n#\tdefine NEXTI\t sl = *++sp\n\n\n\tfor (k = 9; k--; L_ACF[k] = 0) ;\n\n\tSTEP (0);\n\tNEXTI;\n\tSTEP(0); STEP(1);\n\tNEXTI;\n\tSTEP(0); STEP(1); STEP(2);\n\tNEXTI;\n\tSTEP(0); STEP(1); STEP(2); STEP(3);\n\tNEXTI;\n\tSTEP(0); STEP(1); STEP(2); STEP(3); STEP(4);\n\tNEXTI;\n\tSTEP(0); STEP(1); STEP(2); STEP(3); STEP(4); STEP(5);\n\tNEXTI;\n\tSTEP(0); STEP(1); STEP(2); STEP(3); STEP(4); STEP(5); STEP(6);\n\tNEXTI;\n\tSTEP(0); STEP(1); STEP(2); STEP(3); STEP(4); STEP(5); STEP(6); STEP(7);\n\n\tfor (i = 8; i <= 159; i++) {\n\n\t\tNEXTI;\n\n\t\tSTEP(0);\n\t\tSTEP(1); STEP(2); STEP(3); STEP(4);\n\t\tSTEP(5); STEP(6); STEP(7); STEP(8);\n\t}\n\n\tfor (k = 9; k--; L_ACF[k] <<= 1) ; \n\n\t}\n\t/*   Rescaling of the array s[0..159]\n\t */\n\tif (scalauto > 0) {\n\t\tassert(scalauto <= 4); \n\t\tfor (k = 160; k--; *s++ <<= scalauto) ;\n\t}\n}\n\n#if defined(USE_FLOAT_MUL) && defined(FAST)\n\nstatic void Fast_Autocorrelation P2((s, L_ACF),\n\tword * s,\t\t/* [0..159]\tIN/OUT  */\n \tlongword * L_ACF)\t/* [0..8]\tOUT     */\n{\n\tregister int\tk, i;\n\tfloat f_L_ACF[9];\n\tfloat scale;\n\n\tfloat          s_f[160];\n\tregister float *sf = s_f;\n\n\tfor (i = 0; i < 160; ++i) sf[i] = s[i];\n\tfor (k = 0; k <= 8; k++) {\n\t\tregister float L_temp2 = 0;\n\t\tregister float *sfl = sf - k;\n\t\tfor (i = k; i < 160; ++i) L_temp2 += sf[i] * sfl[i];\n\t\tf_L_ACF[k] = L_temp2;\n\t}\n\tscale = MAX_LONGWORD / f_L_ACF[0];\n\n\tfor (k = 0; k <= 8; k++) {\n\t\tL_ACF[k] = f_L_ACF[k] * scale;\n\t}\n}\n#endif\t/* defined (USE_FLOAT_MUL) && defined (FAST) */\n\n/* 4.2.5 */\n\nstatic void Reflection_coefficients P2( (L_ACF, r),\n\tlongword\t* L_ACF,\t\t/* 0...8\tIN\t*/\n\tregister word\t* r\t\t\t/* 0...7\tOUT \t*/\n)\n{\n\tregister int\ti, m, n;\n\tregister word\ttemp;\n\tregister longword ltmp;\n\tword\t\tACF[9];\t/* 0..8 */\n\tword\t\tP[  9];\t/* 0..8 */\n\tword\t\tK[  9]; /* 2..8 */\n\n\t/*  Schur recursion with 16 bits arithmetic.\n\t */\n\n\tif (L_ACF[0] == 0) {\n\t\tfor (i = 8; i--; *r++ = 0) ;\n\t\treturn;\n\t}\n\n\tassert( L_ACF[0] != 0 );\n\ttemp = gsm_norm( L_ACF[0] );\n\n\tassert(temp >= 0 && temp < 32);\n\n\t/* ? overflow ? */\n\tfor (i = 0; i <= 8; i++) ACF[i] = SASR( L_ACF[i] << temp, 16 );\n\n\t/*   Initialize array P[..] and K[..] for the recursion.\n\t */\n\n\tfor (i = 1; i <= 7; i++) K[ i ] = ACF[ i ];\n\tfor (i = 0; i <= 8; i++) P[ i ] = ACF[ i ];\n\n\t/*   Compute reflection coefficients\n\t */\n\tfor (n = 1; n <= 8; n++, r++) {\n\n\t\ttemp = P[1];\n\t\ttemp = GSM_ABS(temp);\n\t\tif (P[0] < temp) {\n\t\t\tfor (i = n; i <= 8; i++) *r++ = 0;\n\t\t\treturn;\n\t\t}\n\n\t\t*r = gsm_div( temp, P[0] );\n\n\t\tassert(*r >= 0);\n\t\tif (P[1] > 0) *r = -*r;\t\t/* r[n] = sub(0, r[n]) */\n\t\tassert (*r != MIN_WORD);\n\t\tif (n == 8) return; \n\n\t\t/*  Schur recursion\n\t\t */\n\t\ttemp = GSM_MULT_R( P[1], *r );\n\t\tP[0] = GSM_ADD( P[0], temp );\n\n\t\tfor (m = 1; m <= 8 - n; m++) {\n\t\t\ttemp     = GSM_MULT_R( K[ m   ],    *r );\n\t\t\tP[m]     = GSM_ADD(    P[ m+1 ],  temp );\n\n\t\t\ttemp     = GSM_MULT_R( P[ m+1 ],    *r );\n\t\t\tK[m]     = GSM_ADD(    K[ m   ],  temp );\n\t\t}\n\t}\n}\n\n/* 4.2.6 */\n\nstatic void Transformation_to_Log_Area_Ratios P1((r),\n\tregister word\t* r \t\t\t/* 0..7\t   IN/OUT */\n)\n/*\n *  The following scaling for r[..] and LAR[..] has been used:\n *\n *  r[..]   = integer( real_r[..]*32768. ); -1 <= real_r < 1.\n *  LAR[..] = integer( real_LAR[..] * 16384 );\n *  with -1.625 <= real_LAR <= 1.625\n */\n{\n\tregister word\ttemp;\n\tregister int\ti;\n\n\n\t/* Computation of the LAR[0..7] from the r[0..7]\n\t */\n\tfor (i = 1; i <= 8; i++, r++) {\n\n\t\ttemp = *r;\n\t\ttemp = GSM_ABS(temp);\n\t\tassert(temp >= 0);\n\n\t\tif (temp < 22118) {\n\t\t\ttemp >>= 1;\n\t\t} else if (temp < 31130) {\n\t\t\tassert( temp >= 11059 );\n\t\t\ttemp -= 11059;\n\t\t} else {\n\t\t\tassert( temp >= 26112 );\n\t\t\ttemp -= 26112;\n\t\t\ttemp <<= 2;\n\t\t}\n\n\t\t*r = *r < 0 ? -temp : temp;\n\t\tassert( *r != MIN_WORD );\n\t}\n}\n\n/* 4.2.7 */\n\nstatic void Quantization_and_coding P1((LAR),\n\tregister word * LAR    \t/* [0..7]\tIN/OUT\t*/\n)\n{\n\tregister word\ttemp;\n\tlongword\tltmp;\n\n\n\t/*  This procedure needs four tables; the following equations\n\t *  give the optimum scaling for the constants:\n\t *  \n\t *  A[0..7] = integer( real_A[0..7] * 1024 )\n\t *  B[0..7] = integer( real_B[0..7] *  512 )\n\t *  MAC[0..7] = maximum of the LARc[0..7]\n\t *  MIC[0..7] = minimum of the LARc[0..7]\n\t */\n\n#\tundef STEP\n#\tdefine\tSTEP( A, B, MAC, MIC )\t\t\\\n\t\ttemp = GSM_MULT( A,   *LAR );\t\\\n\t\ttemp = GSM_ADD(  temp,   B );\t\\\n\t\ttemp = GSM_ADD(  temp, 256 );\t\\\n\t\ttemp = SASR(     temp,   9 );\t\\\n\t\t*LAR  =  temp>MAC ? MAC - MIC : (temp<MIC ? 0 : temp - MIC); \\\n\t\tLAR++;\n\n\tSTEP(  20480,     0,  31, -32 );\n\tSTEP(  20480,     0,  31, -32 );\n\tSTEP(  20480,  2048,  15, -16 );\n\tSTEP(  20480, -2560,  15, -16 );\n\n\tSTEP(  13964,    94,   7,  -8 );\n\tSTEP(  15360, -1792,   7,  -8 );\n\tSTEP(   8534,  -341,   3,  -4 );\n\tSTEP(   9036, -1144,   3,  -4 );\n\n#\tundef\tSTEP\n}\n\nvoid Gsm_LPC_Analysis P3((S, s,LARc),\n\tstruct gsm_state *S,\n\tword \t\t * s,\t\t/* 0..159 signals\tIN/OUT\t*/\n        word \t\t * LARc)\t/* 0..7   LARc's\tOUT\t*/\n{\n\tlongword\tL_ACF[9];\n\n#if defined(USE_FLOAT_MUL) && defined(FAST)\n\tif (S->fast) Fast_Autocorrelation (s,\t  L_ACF );\n\telse\n#endif\n\tAutocorrelation\t\t\t  (s,\t  L_ACF\t);\n\tReflection_coefficients\t\t  (L_ACF, LARc\t);\n\tTransformation_to_Log_Area_Ratios (LARc);\n\tQuantization_and_coding\t\t  (LARc);\n}\n\n/****** begin \"preprocess.c\" *****/\n\n/*\t4.2.0 .. 4.2.3\tPREPROCESSING SECTION\n *  \n *  \tAfter A-law to linear conversion (or directly from the\n *   \tAto D converter) the following scaling is assumed for\n * \tinput to the RPE-LTP algorithm:\n *\n *      in:  0.1.....................12\n *\t     S.v.v.v.v.v.v.v.v.v.v.v.v.*.*.*\n *\n *\tWhere S is the sign bit, v a valid bit, and * a \"don't care\" bit.\n * \tThe original signal is called sop[..]\n *\n *      out:   0.1................... 12 \n *\t     S.S.v.v.v.v.v.v.v.v.v.v.v.v.0.0\n */\n\n\nvoid Gsm_Preprocess P3((S, s, so),\n\tstruct gsm_state * S,\n\tword\t\t * s,\n\tword \t\t * so )\t\t/* [0..159] \tIN/OUT\t*/\n{\n\n\tword       z1 = S->z1;\n\tlongword L_z2 = S->L_z2;\n\tword \t   mp = S->mp;\n\n\tword \t   \ts1;\n\tlongword      L_s2;\n\n\tlongword      L_temp;\n\n\tword\t\tmsp, lsp;\n\tword\t\tSO;\n\n\tlongword\tltmp;\t\t/* for   ADD */\n\tulongword\tutmp;\t\t/* for L_ADD */\n\n\tvolatile int\t\tk = 160;\n\n\twhile (k--) {\n\n\t/*  4.2.1   Downscaling of the input signal\n\t */\n\t\tSO = SASR( *s, 3 ) << 2;\n\t\ts++;\n\n\t\tassert (SO >= -0x4000);\t/* downscaled by     */\n\t\tassert (SO <=  0x3FFC);\t/* previous routine. */\n\n\n\t/*  4.2.2   Offset compensation\n\t * \n\t *  This part implements a high-pass filter and requires extended\n\t *  arithmetic precision for the recursive part of this filter.\n\t *  The input of this procedure is the array so[0...159] and the\n\t *  output the array sof[ 0...159 ].\n\t */\n\t\t/*   Compute the non-recursive part\n\t\t */\n\n\t\ts1 = SO - z1;\t\t\t/* s1 = gsm_sub( *so, z1 ); */\n\t\tz1 = SO;\n\n\t\tassert(s1 != MIN_WORD);\n\n\t\t/*   Compute the recursive part\n\t\t */\n\t\tL_s2 = s1;\n\t\tL_s2 <<= 15;\n\n\t\t/*   Execution of a 31 bv 16 bits multiplication\n\t\t */\n\n\t\tmsp = SASR( L_z2, 15 );\n\t\tlsp = L_z2-((longword)msp<<15); /* gsm_L_sub(L_z2,(msp<<15)); */\n\n\t\tL_s2  += GSM_MULT_R( lsp, 32735 );\n\t\tL_temp = (longword)msp * 32735; /* GSM_L_MULT(msp,32735) >> 1;*/\n\t\tL_z2   = GSM_L_ADD( L_temp, L_s2 );\n\n\t\t/*    Compute sof[k] with rounding\n\t\t */\n\t\tL_temp = GSM_L_ADD( L_z2, 16384 );\n\n\t/*   4.2.3  Preemphasis\n\t */\n\n\t\tmsp   = GSM_MULT_R( mp, -28180 );\n\t\tmp    = SASR( L_temp, 15 );\n\t\t*so++ = GSM_ADD( mp, msp );\n\t}\n\n\tS->z1   = z1;\n\tS->L_z2 = L_z2;\n\tS->mp   = mp;\n}\n\n/****** begin \"rpe.c\" *****/\n\n/*  4.2.13 .. 4.2.17  RPE ENCODING SECTION\n */\n\n/* 4.2.13 */\n\nstatic void Weighting_filter P2((e, x),\n\tregister word\t* e,\t\t/* signal [-5..0.39.44]\tIN  */\n\tword\t\t* x\t\t/* signal [0..39]\tOUT */\n)\n/*\n *  The coefficients of the weighting filter are stored in a table\n *  (see table 4.4).  The following scaling is used:\n *\n *\tH[0..10] = integer( real_H[ 0..10] * 8192 ); \n */\n{\n\t/* word\t\t\twt[ 50 ]; */\n\n\tregister longword\tL_result;\n\tregister int\t\tk /* , i */ ;\n\n\t/*  Initialization of a temporary working array wt[0...49]\n\t */\n\n\t/* for (k =  0; k <=  4; k++) wt[k] = 0;\n\t * for (k =  5; k <= 44; k++) wt[k] = *e++;\n\t * for (k = 45; k <= 49; k++) wt[k] = 0;\n\t *\n\t *  (e[-5..-1] and e[40..44] are allocated by the caller,\n\t *  are initially zero and are not written anywhere.)\n\t */\n\te -= 5;\n\n\t/*  Compute the signal x[0..39]\n\t */ \n\tfor (k = 0; k <= 39; k++) {\n\n\t\tL_result = 8192 >> 1;\n\n\t\t/* for (i = 0; i <= 10; i++) {\n\t\t *\tL_temp   = GSM_L_MULT( wt[k+i], gsm_H[i] );\n\t\t *\tL_result = GSM_L_ADD( L_result, L_temp );\n\t\t * }\n\t\t */\n\n#undef\tSTEP\n#define\tSTEP( i, H )\t(e[ k + i ] * (longword)H)\n\n\t\t/*  Every one of these multiplications is done twice --\n\t\t *  but I don't see an elegant way to optimize this. \n\t\t *  Do you?\n\t\t */\n\n#ifdef\tSTUPID_COMPILER\n\t\tL_result += STEP(\t0, \t-134 ) ;\n\t\tL_result += STEP(\t1, \t-374 )  ;\n\t               /* + STEP(\t2, \t0    )  */\n\t\tL_result += STEP(\t3, \t2054 ) ;\n\t\tL_result += STEP(\t4, \t5741 ) ;\n\t\tL_result += STEP(\t5, \t8192 ) ;\n\t\tL_result += STEP(\t6, \t5741 ) ;\n\t\tL_result += STEP(\t7, \t2054 ) ;\n\t \t       /* + STEP(\t8, \t0    )  */\n\t\tL_result += STEP(\t9, \t-374 ) ;\n\t\tL_result += STEP(\t10, \t-134 ) ;\n#else\n\t\tL_result +=\n\t\t  STEP(\t0, \t-134 ) \n\t\t+ STEP(\t1, \t-374 ) \n\t     /* + STEP(\t2, \t0    )  */\n\t\t+ STEP(\t3, \t2054 ) \n\t\t+ STEP(\t4, \t5741 ) \n\t\t+ STEP(\t5, \t8192 ) \n\t\t+ STEP(\t6, \t5741 ) \n\t\t+ STEP(\t7, \t2054 ) \n\t     /* + STEP(\t8, \t0    )  */\n\t\t+ STEP(\t9, \t-374 ) \n\t\t+ STEP(10, \t-134 )\n\t\t;\n#endif\n\n\t\t/* L_result = GSM_L_ADD( L_result, L_result ); (* scaling(x2) *)\n\t\t * L_result = GSM_L_ADD( L_result, L_result ); (* scaling(x4) *)\n\t\t *\n\t\t * x[k] = SASR( L_result, 16 );\n\t\t */\n\n\t\t/* 2 adds vs. >>16 => 14, minus one shift to compensate for\n\t\t * those we lost when replacing L_MULT by '*'.\n\t\t */\n\n\t\tL_result = SASR( L_result, 13 );\n\t\tx[k] =  (  L_result < MIN_WORD ? MIN_WORD\n\t\t\t: (L_result > MAX_WORD ? MAX_WORD : L_result ));\n\t}\n}\n\n/* 4.2.14 */\n\nstatic void RPE_grid_selection P3((x,xM,Mc_out),\n\tword\t\t* x,\t\t/* [0..39]\t\tIN  */ \n\tword\t\t* xM,\t\t/* [0..12]\t\tOUT */\n\tword\t\t* Mc_out\t/*\t\t\tOUT */\n)\n/*\n *  The signal x[0..39] is used to select the RPE grid which is\n *  represented by Mc.\n */\n{\n\t/* register word\ttemp1;\t*/\n\tregister int\t\t/* m, */  i;\n\tregister longword\tL_result, L_temp;\n\tlongword\t\tEM;\t/* xxx should be L_EM? */\n\tword\t\t\tMc;\n\n\tlongword\t\tL_common_0_3;\n\n\tEM = 0;\n\tMc = 0;\n\n\t/* for (m = 0; m <= 3; m++) {\n\t *\tL_result = 0;\n\t *\n\t *\n\t *\tfor (i = 0; i <= 12; i++) {\n\t *\n\t *\t\ttemp1    = SASR( x[m + 3*i], 2 );\n\t *\n\t *\t\tassert(temp1 != MIN_WORD);\n\t *\n\t *\t\tL_temp   = GSM_L_MULT( temp1, temp1 );\n\t *\t\tL_result = GSM_L_ADD( L_temp, L_result );\n\t *\t}\n\t * \n\t *\tif (L_result > EM) {\n\t *\t\tMc = m;\n\t *\t\tEM = L_result;\n\t *\t}\n\t * }\n\t */\n\n#undef\tSTEP\n#define\tSTEP( m, i )\t\tL_temp = SASR( x[m + 3 * i], 2 );\t\\\n\t\t\t\tL_result += L_temp * L_temp;\n\n\t/* common part of 0 and 3 */\n\n\tL_result = 0;\n\tSTEP( 0, 1 ); STEP( 0, 2 ); STEP( 0, 3 ); STEP( 0, 4 );\n\tSTEP( 0, 5 ); STEP( 0, 6 ); STEP( 0, 7 ); STEP( 0, 8 );\n\tSTEP( 0, 9 ); STEP( 0, 10); STEP( 0, 11); STEP( 0, 12);\n\tL_common_0_3 = L_result;\n\n\t/* i = 0 */\n\n\tSTEP( 0, 0 );\n\tL_result <<= 1;\t/* implicit in L_MULT */\n\tEM = L_result;\n\n\t/* i = 1 */\n\n\tL_result = 0;\n\tSTEP( 1, 0 );\n\tSTEP( 1, 1 ); STEP( 1, 2 ); STEP( 1, 3 ); STEP( 1, 4 );\n\tSTEP( 1, 5 ); STEP( 1, 6 ); STEP( 1, 7 ); STEP( 1, 8 );\n\tSTEP( 1, 9 ); STEP( 1, 10); STEP( 1, 11); STEP( 1, 12);\n\tL_result <<= 1;\n\tif (L_result > EM) {\n\t\tMc = 1;\n\t \tEM = L_result;\n\t}\n\n\t/* i = 2 */\n\n\tL_result = 0;\n\tSTEP( 2, 0 );\n\tSTEP( 2, 1 ); STEP( 2, 2 ); STEP( 2, 3 ); STEP( 2, 4 );\n\tSTEP( 2, 5 ); STEP( 2, 6 ); STEP( 2, 7 ); STEP( 2, 8 );\n\tSTEP( 2, 9 ); STEP( 2, 10); STEP( 2, 11); STEP( 2, 12);\n\tL_result <<= 1;\n\tif (L_result > EM) {\n\t\tMc = 2;\n\t \tEM = L_result;\n\t}\n\n\t/* i = 3 */\n\n\tL_result = L_common_0_3;\n\tSTEP( 3, 12 );\n\tL_result <<= 1;\n\tif (L_result > EM) {\n\t\tMc = 3;\n\t \tEM = L_result;\n\t}\n\n\t/**/\n\n\t/*  Down-sampling by a factor 3 to get the selected xM[0..12]\n\t *  RPE sequence.\n\t */\n\tfor (i = 0; i <= 12; i ++) xM[i] = x[Mc + 3*i];\n\t*Mc_out = Mc;\n}\n\n/* 4.12.15 */\n\nstatic void APCM_quantization_xmaxc_to_exp_mant P3((xmaxc,exp_out,mant_out),\n\tword\t\txmaxc,\t\t/* IN \t*/\n\tword\t\t* exp_out,\t/* OUT\t*/\n\tword\t\t* mant_out )\t/* OUT  */\n{\n\tword\texp, mant;\n\n\t/* Compute exponent and mantissa of the decoded version of xmaxc\n\t */\n\n\texp = 0;\n\tif (xmaxc > 15) exp = SASR(xmaxc, 3) - 1;\n\tmant = xmaxc - (exp << 3);\n\n\tif (mant == 0) {\n\t\texp  = -4;\n\t\tmant = 7;\n\t}\n\telse {\n\t\twhile (mant <= 7) {\n\t\t\tmant = mant << 1 | 1;\n\t\t\texp--;\n\t\t}\n\t\tmant -= 8;\n\t}\n\n\tassert( exp  >= -4 && exp <= 6 );\n\tassert( mant >= 0 && mant <= 7 );\n\n\t*exp_out  = exp;\n\t*mant_out = mant;\n}\n\nstatic void APCM_quantization P5((xM,xMc,mant_out,exp_out,xmaxc_out),\n\tword\t\t* xM,\t\t/* [0..12]\t\tIN\t*/\n\n\tword\t\t* xMc,\t\t/* [0..12]\t\tOUT\t*/\n\tword\t\t* mant_out,\t/* \t\t\tOUT\t*/\n\tword\t\t* exp_out,\t/*\t\t\tOUT\t*/\n\tword\t\t* xmaxc_out\t/*\t\t\tOUT\t*/\n)\n{\n\tint\ti, itest;\n\n\tword\txmax, xmaxc, temp, temp1, temp2;\n\tword\texp, mant;\n\n\n\t/*  Find the maximum absolute value xmax of xM[0..12].\n\t */\n\n\txmax = 0;\n\tfor (i = 0; i <= 12; i++) {\n\t\ttemp = xM[i];\n\t\ttemp = GSM_ABS(temp);\n\t\tif (temp > xmax) xmax = temp;\n\t}\n\n\t/*  Qantizing and coding of xmax to get xmaxc.\n\t */\n\n\texp   = 0;\n\ttemp  = SASR( xmax, 9 );\n\titest = 0;\n\n\tfor (i = 0; i <= 5; i++) {\n\n\t\titest |= (temp <= 0);\n\t\ttemp = SASR( temp, 1 );\n\n\t\tassert(exp <= 5);\n\t\tif (itest == 0) exp++;\t\t/* exp = add (exp, 1) */\n\t}\n\n\tassert(exp <= 6 && exp >= 0);\n\ttemp = exp + 5;\n\n\tassert(temp <= 11 && temp >= 0);\n\txmaxc = gsm_add( SASR(xmax, temp), exp << 3 );\n\n\t/*   Quantizing and coding of the xM[0..12] RPE sequence\n\t *   to get the xMc[0..12]\n\t */\n\n\tAPCM_quantization_xmaxc_to_exp_mant( xmaxc, &exp, &mant );\n\n\t/*  This computation uses the fact that the decoded version of xmaxc\n\t *  can be calculated by using the exponent and the mantissa part of\n\t *  xmaxc (logarithmic table).\n\t *  So, this method avoids any division and uses only a scaling\n\t *  of the RPE samples by a function of the exponent.  A direct \n\t *  multiplication by the inverse of the mantissa (NRFAC[0..7]\n\t *  found in table 4.5) gives the 3 bit coded version xMc[0..12]\n\t *  of the RPE samples.\n\t */\n\n\n\t/* Direct computation of xMc[0..12] using table 4.5\n\t */\n\n\tassert( exp <= 4096 && exp >= -4096);\n\tassert( mant >= 0 && mant <= 7 ); \n\n\ttemp1 = 6 - exp;\t\t/* normalization by the exponent */\n\ttemp2 = gsm_NRFAC[ mant ];  \t/* inverse mantissa \t\t */\n\n\tfor (i = 0; i <= 12; i++) {\n\n\t\tassert(temp1 >= 0 && temp1 < 16);\n\n\t\ttemp = xM[i] << temp1;\n\t\ttemp = GSM_MULT( temp, temp2 );\n\t\ttemp = SASR(temp, 12);\n\t\txMc[i] = temp + 4;\t\t/* see note below */\n\t}\n\n\t/*  NOTE: This equation is used to make all the xMc[i] positive.\n\t */\n\n\t*mant_out  = mant;\n\t*exp_out   = exp;\n\t*xmaxc_out = xmaxc;\n}\n\n/* 4.2.16 */\n\nstatic void APCM_inverse_quantization P4((xMc,mant,exp,xMp),\n\tregister word\t* xMc,\t/* [0..12]\t\t\tIN \t*/\n\tword\t\tmant,\n\tword\t\texp,\n\tregister word\t* xMp)\t/* [0..12]\t\t\tOUT \t*/\n/* \n *  This part is for decoding the RPE sequence of coded xMc[0..12]\n *  samples to obtain the xMp[0..12] array.  Table 4.6 is used to get\n *  the mantissa of xmaxc (FAC[0..7]).\n */\n{\n\tint\ti;\n\tword\ttemp, temp1, temp2, temp3;\n\tlongword\tltmp;\n\n\tassert( mant >= 0 && mant <= 7 ); \n\n\ttemp1 = gsm_FAC[ mant ];\t/* see 4.2-15 for mant */\n\ttemp2 = gsm_sub( 6, exp );\t/* see 4.2-15 for exp  */\n\ttemp3 = gsm_asl( 1, gsm_sub( temp2, 1 ));\n\n\tfor (i = 13; i--;) {\n\n\t\tassert( *xMc <= 7 && *xMc >= 0 ); \t/* 3 bit unsigned */\n\n\t\t/* temp = gsm_sub( *xMc++ << 1, 7 ); */\n\t\ttemp = (*xMc++ << 1) - 7;\t        /* restore sign   */\n\t\tassert( temp <= 7 && temp >= -7 ); \t/* 4 bit signed   */\n\n\t\ttemp <<= 12;\t\t\t\t/* 16 bit signed  */\n\t\ttemp = GSM_MULT_R( temp1, temp );\n\t\ttemp = GSM_ADD( temp, temp3 );\n\t\t*xMp++ = gsm_asr( temp, temp2 );\n\t}\n}\n\n/* 4.2.17 */\n\nstatic void RPE_grid_positioning P3((Mc,xMp,ep),\n\tword\t\tMc,\t\t/* grid position\tIN\t*/\n\tregister word\t* xMp,\t\t/* [0..12]\t\tIN\t*/\n\tregister word\t* ep\t\t/* [0..39]\t\tOUT\t*/\n)\n/*\n *  This procedure computes the reconstructed long term residual signal\n *  ep[0..39] for the LTP analysis filter.  The inputs are the Mc\n *  which is the grid position selection and the xMp[0..12] decoded\n *  RPE samples which are upsampled by a factor of 3 by inserting zero\n *  values.\n */\n{\n\tvolatile int\ti = 13;\n\n\tassert(0 <= Mc && Mc <= 3);\n\n        switch (Mc) {\n                case 3: *ep++ = 0;\n                case 2:  do {\n                                *ep++ = 0;\n                case 1:         *ep++ = 0;\n                case 0:         *ep++ = *xMp++;\n                         } while (--i);\n        }\n        while (++Mc < 4) *ep++ = 0;\n\n\t/*\n\n\tint i, k;\n\tfor (k = 0; k <= 39; k++) ep[k] = 0;\n\tfor (i = 0; i <= 12; i++) {\n\t\tep[ Mc + (3*i) ] = xMp[i];\n\t}\n\t*/\n}\n\n/* 4.2.18 */\n\n/*  This procedure adds the reconstructed long term residual signal\n *  ep[0..39] to the estimated signal dpp[0..39] from the long term\n *  analysis filter to compute the reconstructed short term residual\n *  signal dp[-40..-1]; also the reconstructed short term residual\n *  array dp[-120..-41] is updated.\n */\n\n#if 0\t/* Has been inlined in code.c */\nvoid Gsm_Update_of_reconstructed_short_time_residual_signal P3((dpp, ep, dp),\n\tword\t* dpp,\t\t/* [0...39]\tIN\t*/\n\tword\t* ep,\t\t/* [0...39]\tIN\t*/\n\tword\t* dp)\t\t/* [-120...-1]  IN/OUT \t*/\n{\n\tint \t\tk;\n\n\tfor (k = 0; k <= 79; k++) \n\t\tdp[ -120 + k ] = dp[ -80 + k ];\n\n\tfor (k = 0; k <= 39; k++)\n\t\tdp[ -40 + k ] = gsm_add( ep[k], dpp[k] );\n}\n#endif\t/* Has been inlined in code.c */\n\nvoid Gsm_RPE_Encoding P5((S,e,xmaxc,Mc,xMc),\n\n\tstruct gsm_state * S,\n\n\tword\t* e,\t\t/* -5..-1][0..39][40..44\tIN/OUT  */\n\tword\t* xmaxc,\t/* \t\t\t\tOUT */\n\tword\t* Mc,\t\t/* \t\t\t  \tOUT */\n\tword\t* xMc)\t\t/* [0..12]\t\t\tOUT */\n{\n\tword\tx[40];\n\tword\txM[13], xMp[13];\n\tword\tmant, exp;\n\n\tWeighting_filter(e, x);\n\tRPE_grid_selection(x, xM, Mc);\n\n\tAPCM_quantization(\txM, xMc, &mant, &exp, xmaxc);\n\tAPCM_inverse_quantization(  xMc,  mant,  exp, xMp);\n\n\tRPE_grid_positioning( *Mc, xMp, e );\n\n}\n\nvoid Gsm_RPE_Decoding P5((S, xmaxcr, Mcr, xMcr, erp),\n\tstruct gsm_state\t* S,\n\n\tword \t\txmaxcr,\n\tword\t\tMcr,\n\tword\t\t* xMcr,  /* [0..12], 3 bits \t\tIN\t*/\n\tword\t\t* erp\t /* [0..39]\t\t\tOUT \t*/\n)\n{\n\tword\texp, mant;\n\tword\txMp[ 13 ];\n\n\tAPCM_quantization_xmaxc_to_exp_mant( xmaxcr, &exp, &mant );\n\tAPCM_inverse_quantization( xMcr, mant, exp, xMp );\n\tRPE_grid_positioning( Mcr, xMp, erp );\n\n}\n\n/****** begin \"short_term.c\" *****/\n\n/*\n *  SHORT TERM ANALYSIS FILTERING SECTION\n */\n\n/* 4.2.8 */\n\nstatic void Decoding_of_the_coded_Log_Area_Ratios P2((LARc,LARpp),\n\tword \t* LARc,\t\t/* coded log area ratio\t[0..7] \tIN\t*/\n\tword\t* LARpp)\t/* out: decoded ..\t\t\t*/\n{\n\tregister word\ttemp1 /* , temp2 */;\n\tregister long\tltmp;\t/* for GSM_ADD */\n\n\t/*  This procedure requires for efficient implementation\n\t *  two tables.\n \t *\n\t *  INVA[1..8] = integer( (32768 * 8) / real_A[1..8])\n\t *  MIC[1..8]  = minimum value of the LARc[1..8]\n\t */\n\n\t/*  Compute the LARpp[1..8]\n\t */\n\n\t/* \tfor (i = 1; i <= 8; i++, B++, MIC++, INVA++, LARc++, LARpp++) {\n\t *\n\t *\t\ttemp1  = GSM_ADD( *LARc, *MIC ) << 10;\n\t *\t\ttemp2  = *B << 1;\n\t *\t\ttemp1  = GSM_SUB( temp1, temp2 );\n\t *\n\t *\t\tassert(*INVA != MIN_WORD);\n\t *\n\t *\t\ttemp1  = GSM_MULT_R( *INVA, temp1 );\n\t *\t\t*LARpp = GSM_ADD( temp1, temp1 );\n\t *\t}\n\t */\n\n#undef\tSTEP\n#define\tSTEP( B, MIC, INVA )\t\\\n\t\ttemp1    = GSM_ADD( *LARc++, MIC ) << 10;\t\\\n\t\ttemp1    = GSM_SUB( temp1, B << 1 );\t\t\\\n\t\ttemp1    = GSM_MULT_R( INVA, temp1 );\t\t\\\n\t\t*LARpp++ = GSM_ADD( temp1, temp1 );\n\n\tSTEP(      0,  -32,  13107 );\n\tSTEP(      0,  -32,  13107 );\n\tSTEP(   2048,  -16,  13107 );\n\tSTEP(  -2560,  -16,  13107 );\n\n\tSTEP(     94,   -8,  19223 );\n\tSTEP(  -1792,   -8,  17476 );\n\tSTEP(   -341,   -4,  31454 );\n\tSTEP(  -1144,   -4,  29708 );\n\n\t/* NOTE: the addition of *MIC is used to restore\n\t * \t the sign of *LARc.\n\t */\n}\n\n/* 4.2.9 */\n/* Computation of the quantized reflection coefficients \n */\n\n/* 4.2.9.1  Interpolation of the LARpp[1..8] to get the LARp[1..8]\n */\n\n/*\n *  Within each frame of 160 analyzed speech samples the short term\n *  analysis and synthesis filters operate with four different sets of\n *  coefficients, derived from the previous set of decoded LARs(LARpp(j-1))\n *  and the actual set of decoded LARs (LARpp(j))\n *\n * (Initial value: LARpp(j-1)[1..8] = 0.)\n */\n\nstatic void Coefficients_0_12 P3((LARpp_j_1, LARpp_j, LARp),\n\tregister word * LARpp_j_1,\n\tregister word * LARpp_j,\n\tregister word * LARp)\n{\n\tregister int \ti;\n\tregister longword ltmp;\n\n\tfor (i = 1; i <= 8; i++, LARp++, LARpp_j_1++, LARpp_j++) {\n\t\t*LARp = GSM_ADD( SASR( *LARpp_j_1, 2 ), SASR( *LARpp_j, 2 ));\n\t\t*LARp = GSM_ADD( *LARp,  SASR( *LARpp_j_1, 1));\n\t}\n}\n\nstatic void Coefficients_13_26 P3((LARpp_j_1, LARpp_j, LARp),\n\tregister word * LARpp_j_1,\n\tregister word * LARpp_j,\n\tregister word * LARp)\n{\n\tregister int i;\n\tregister longword ltmp;\n\tfor (i = 1; i <= 8; i++, LARpp_j_1++, LARpp_j++, LARp++) {\n\t\t*LARp = GSM_ADD( SASR( *LARpp_j_1, 1), SASR( *LARpp_j, 1 ));\n\t}\n}\n\nstatic void Coefficients_27_39 P3((LARpp_j_1, LARpp_j, LARp),\n\tregister word * LARpp_j_1,\n\tregister word * LARpp_j,\n\tregister word * LARp)\n{\n\tregister int i;\n\tregister longword ltmp;\n\n\tfor (i = 1; i <= 8; i++, LARpp_j_1++, LARpp_j++, LARp++) {\n\t\t*LARp = GSM_ADD( SASR( *LARpp_j_1, 2 ), SASR( *LARpp_j, 2 ));\n\t\t*LARp = GSM_ADD( *LARp, SASR( *LARpp_j, 1 ));\n\t}\n}\n\n\nstatic void Coefficients_40_159 P2((LARpp_j, LARp),\n\tregister word * LARpp_j,\n\tregister word * LARp)\n{\n\tregister int i;\n\n\tfor (i = 1; i <= 8; i++, LARp++, LARpp_j++)\n\t\t*LARp = *LARpp_j;\n}\n\n/* 4.2.9.2 */\n\nstatic void LARp_to_rp P1((LARp),\n\tregister word * LARp)\t/* [0..7] IN/OUT  */\n/*\n *  The input of this procedure is the interpolated LARp[0..7] array.\n *  The reflection coefficients, rp[i], are used in the analysis\n *  filter and in the synthesis filter.\n */\n{\n\tregister int \t\ti;\n\tregister word\t\ttemp;\n\tregister longword\tltmp;\n\n\tfor (i = 1; i <= 8; i++, LARp++) {\n\n\t\t/* temp = GSM_ABS( *LARp );\n\t         *\n\t\t * if (temp < 11059) temp <<= 1;\n\t\t * else if (temp < 20070) temp += 11059;\n\t\t * else temp = GSM_ADD( temp >> 2, 26112 );\n\t\t *\n\t\t * *LARp = *LARp < 0 ? -temp : temp;\n\t\t */\n\n\t\tif (*LARp < 0) {\n\t\t\ttemp = *LARp == MIN_WORD ? MAX_WORD : -(*LARp);\n\t\t\t*LARp = - ((temp < 11059) ? temp << 1\n\t\t\t\t: ((temp < 20070) ? temp + 11059\n\t\t\t\t:  GSM_ADD( temp >> 2, 26112 )));\n\t\t} else {\n\t\t\ttemp  = *LARp;\n\t\t\t*LARp =    (temp < 11059) ? temp << 1\n\t\t\t\t: ((temp < 20070) ? temp + 11059\n\t\t\t\t:  GSM_ADD( temp >> 2, 26112 ));\n\t\t}\n\t}\n}\n\n\n/* 4.2.10 */\nstatic void Short_term_analysis_filtering P4((S,rp,k_n,s),\n\tstruct gsm_state * S,\n\tregister word\t* rp,\t/* [0..7]\tIN\t*/\n\tregister int \tk_n, \t/*   k_end - k_start\t*/\n\tregister word\t* s\t/* [0..n-1]\tIN/OUT\t*/\n)\n/*\n *  This procedure computes the short term residual signal d[..] to be fed\n *  to the RPE-LTP loop from the s[..] signal and from the local rp[..]\n *  array (quantized reflection coefficients).  As the call of this\n *  procedure can be done in many ways (see the interpolation of the LAR\n *  coefficient), it is assumed that the computation begins with index\n *  k_start (for arrays d[..] and s[..]) and stops with index k_end\n *  (k_start and k_end are defined in 4.2.9.1).  This procedure also\n *  needs to keep the array u[0..7] in memory for each call.\n */\n{\n\tregister word\t\t* u = S->u;\n\tregister int\t\ti;\n\tregister word\t\tdi, zzz, ui, sav, rpi;\n\tregister longword \tltmp;\n\n\tfor (; k_n--; s++) {\n\n\t\tdi = sav = *s;\n\n\t\tfor (i = 0; i < 8; i++) {\t\t/* YYY */\n\n\t\t\tui    = u[i];\n\t\t\trpi   = rp[i];\n\t\t\tu[i]  = sav;\n\n\t\t\tzzz   = GSM_MULT_R(rpi, di);\n\t\t\tsav   = GSM_ADD(   ui,  zzz);\n\n\t\t\tzzz   = GSM_MULT_R(rpi, ui);\n\t\t\tdi    = GSM_ADD(   di,  zzz );\n\t\t}\n\n\t\t*s = di;\n\t}\n}\n\n#if defined(USE_FLOAT_MUL) && defined(FAST)\n\nstatic void Fast_Short_term_analysis_filtering P4((S,rp,k_n,s),\n\tstruct gsm_state * S,\n\tregister word\t* rp,\t/* [0..7]\tIN\t*/\n\tregister int \tk_n, \t/*   k_end - k_start\t*/\n\tregister word\t* s\t/* [0..n-1]\tIN/OUT\t*/\n)\n{\n\tregister word\t\t* u = S->u;\n\tregister int\t\ti;\n\n\tfloat \t  uf[8],\n\t\t rpf[8];\n\n\tregister float scalef = 3.0517578125e-5;\n\tregister float\t\tsav, di, temp;\n\n\tfor (i = 0; i < 8; ++i) {\n\t\tuf[i]  = u[i];\n\t\trpf[i] = rp[i] * scalef;\n\t}\n\tfor (; k_n--; s++) {\n\t\tsav = di = *s;\n\t\tfor (i = 0; i < 8; ++i) {\n\t\t\tregister float rpfi = rpf[i];\n\t\t\tregister float ufi  = uf[i];\n\n\t\t\tuf[i] = sav;\n\t\t\ttemp  = rpfi * di + ufi;\n\t\t\tdi   += rpfi * ufi;\n\t\t\tsav   = temp;\n\t\t}\n\t\t*s = di;\n\t}\n\tfor (i = 0; i < 8; ++i) u[i] = uf[i];\n}\n#endif /* ! (defined (USE_FLOAT_MUL) && defined (FAST)) */\n\nstatic void Short_term_synthesis_filtering P5((S,rrp,k,wt,sr),\n\tstruct gsm_state * S,\n\tregister word\t* rrp,\t/* [0..7]\tIN\t*/\n\tregister int\tk,\t/* k_end - k_start\t*/\n\tregister word\t* wt,\t/* [0..k-1]\tIN\t*/\n\tregister word\t* sr\t/* [0..k-1]\tOUT\t*/\n)\n{\n\tregister word\t\t* v = S->v;\n\tregister int\t\ti;\n\tregister word\t\tsri, tmp1, tmp2;\n\tregister longword\tltmp;\t/* for GSM_ADD  & GSM_SUB */\n\n\twhile (k--) {\n\t\tsri = *wt++;\n\t\tfor (i = 8; i--;) {\n\n\t\t\t/* sri = GSM_SUB( sri, gsm_mult_r( rrp[i], v[i] ) );\n\t\t\t */\n\t\t\ttmp1 = rrp[i];\n\t\t\ttmp2 = v[i];\n\t\t\ttmp2 =  ( tmp1 == MIN_WORD && tmp2 == MIN_WORD\n\t\t\t\t? MAX_WORD\n\t\t\t\t: 0x0FFFF & (( (longword)tmp1 * (longword)tmp2\n\t\t\t\t\t     + 16384) >> 15)) ;\n\n\t\t\tsri  = GSM_SUB( sri, tmp2 );\n\n\t\t\t/* v[i+1] = GSM_ADD( v[i], gsm_mult_r( rrp[i], sri ) );\n\t\t\t */\n\t\t\ttmp1  = ( tmp1 == MIN_WORD && sri == MIN_WORD\n\t\t\t\t? MAX_WORD\n\t\t\t\t: 0x0FFFF & (( (longword)tmp1 * (longword)sri\n\t\t\t\t\t     + 16384) >> 15)) ;\n\n\t\t\tv[i+1] = GSM_ADD( v[i], tmp1);\n\t\t}\n\t\t*sr++ = v[0] = sri;\n\t}\n}\n\n\n#if defined(FAST) && defined(USE_FLOAT_MUL)\n\nstatic void Fast_Short_term_synthesis_filtering P5((S,rrp,k,wt,sr),\n\tstruct gsm_state * S,\n\tregister word\t* rrp,\t/* [0..7]\tIN\t*/\n\tregister int\tk,\t/* k_end - k_start\t*/\n\tregister word\t* wt,\t/* [0..k-1]\tIN\t*/\n\tregister word\t* sr\t/* [0..k-1]\tOUT\t*/\n)\n{\n\tregister word\t\t* v = S->v;\n\tregister int\t\ti;\n\n\tfloat va[9], rrpa[8];\n\tregister float scalef = 3.0517578125e-5, temp;\n\n\tfor (i = 0; i < 8; ++i) {\n\t\tva[i]   = v[i];\n\t\trrpa[i] = (float)rrp[i] * scalef;\n\t}\n\twhile (k--) {\n\t\tregister float sri = *wt++;\n\t\tfor (i = 8; i--;) {\n\t\t\tsri -= rrpa[i] * va[i];\n\t\t\tif     (sri < -32768.) sri = -32768.;\n\t\t\telse if (sri > 32767.) sri =  32767.;\n\n\t\t\ttemp = va[i] + rrpa[i] * sri;\n\t\t\tif     (temp < -32768.) temp = -32768.;\n\t\t\telse if (temp > 32767.) temp =  32767.;\n\t\t\tva[i+1] = temp;\n\t\t}\n\t\t*sr++ = va[0] = sri;\n\t}\n\tfor (i = 0; i < 9; ++i) v[i] = va[i];\n}\n\n#endif /* defined(FAST) && defined(USE_FLOAT_MUL) */\n\nvoid Gsm_Short_Term_Analysis_Filter P3((S,LARc,s),\n\n\tstruct gsm_state * S,\n\n\tword\t* LARc,\t\t/* coded log area ratio [0..7]  IN\t*/\n\tword\t* s\t\t/* signal [0..159]\t\tIN/OUT\t*/\n)\n{\n\tword\t\t* LARpp_j\t= S->LARpp[ S->j      ];\n\tword\t\t* LARpp_j_1\t= S->LARpp[ S->j ^= 1 ];\n\n\tword\t\tLARp[8];\n\n#undef\tFILTER\n#if \tdefined(FAST) && defined(USE_FLOAT_MUL)\n# \tdefine\tFILTER \t(* (S->fast\t\t\t\\\n\t\t\t   ? Fast_Short_term_analysis_filtering\t\\\n\t\t    \t   : Short_term_analysis_filtering\t))\n\n#else\n# \tdefine\tFILTER\tShort_term_analysis_filtering\n#endif\n\n\tDecoding_of_the_coded_Log_Area_Ratios( LARc, LARpp_j );\n\n\tCoefficients_0_12(  LARpp_j_1, LARpp_j, LARp );\n\tLARp_to_rp( LARp );\n\tFILTER( S, LARp, 13, s);\n\n\tCoefficients_13_26( LARpp_j_1, LARpp_j, LARp);\n\tLARp_to_rp( LARp );\n\tFILTER( S, LARp, 14, s + 13);\n\n\tCoefficients_27_39( LARpp_j_1, LARpp_j, LARp);\n\tLARp_to_rp( LARp );\n\tFILTER( S, LARp, 13, s + 27);\n\n\tCoefficients_40_159( LARpp_j, LARp);\n\tLARp_to_rp( LARp );\n\tFILTER( S, LARp, 120, s + 40);\n}\n\nvoid Gsm_Short_Term_Synthesis_Filter P4((S, LARcr, wt, s),\n\tstruct gsm_state * S,\n\n\tword\t* LARcr,\t/* received log area ratios [0..7] IN  */\n\tword\t* wt,\t\t/* received d [0..159]\t\t   IN  */\n\n\tword\t* s\t\t/* signal   s [0..159]\t\t  OUT  */\n)\n{\n\tword\t\t* LARpp_j\t= S->LARpp[ S->j     ];\n\tword\t\t* LARpp_j_1\t= S->LARpp[ S->j ^=1 ];\n\n\tword\t\tLARp[8];\n\n#undef\tFILTER\n#if \tdefined(FAST) && defined(USE_FLOAT_MUL)\n\n# \tdefine\tFILTER \t(* (S->fast\t\t\t\\\n\t\t\t   ? Fast_Short_term_synthesis_filtering\t\\\n\t\t    \t   : Short_term_synthesis_filtering\t))\n#else\n#\tdefine\tFILTER\tShort_term_synthesis_filtering\n#endif\n\n\tDecoding_of_the_coded_Log_Area_Ratios( LARcr, LARpp_j );\n\n\tCoefficients_0_12( LARpp_j_1, LARpp_j, LARp );\n\tLARp_to_rp( LARp );\n\tFILTER( S, LARp, 13, wt, s );\n\n\tCoefficients_13_26( LARpp_j_1, LARpp_j, LARp);\n\tLARp_to_rp( LARp );\n\tFILTER( S, LARp, 14, wt + 13, s + 13 );\n\n\tCoefficients_27_39( LARpp_j_1, LARpp_j, LARp);\n\tLARp_to_rp( LARp );\n\tFILTER( S, LARp, 13, wt + 27, s + 27 );\n\n\tCoefficients_40_159( LARpp_j, LARp );\n\tLARp_to_rp( LARp );\n\tFILTER(S, LARp, 120, wt + 40, s + 40);\n}\n\n/****** begin \"table.c\" *****/\n\n/*  Most of these tables are inlined at their point of use.\n */\n\n/*  4.4 TABLES USED IN THE FIXED POINT IMPLEMENTATION OF THE RPE-LTP\n *      CODER AND DECODER\n *\n *\t(Most of them inlined, so watch out.)\n */\n\n/*  Table 4.1  Quantization of the Log.-Area Ratios\n */\n/* i \t\t     1      2      3        4      5      6        7       8 */\nword gsm_A[8]   = {20480, 20480, 20480,  20480,  13964,  15360,   8534,  9036};\nword gsm_B[8]   = {    0,     0,  2048,  -2560,     94,  -1792,   -341, -1144};\nword gsm_MIC[8] = { -32,   -32,   -16,    -16,     -8,     -8,     -4,    -4 };\nword gsm_MAC[8] = {  31,    31,    15,     15,      7,      7,      3,     3 };\n\n\n/*  Table 4.2  Tabulation  of 1/A[1..8]\n */\nword gsm_INVA[8]={ 13107, 13107,  13107, 13107,  19223, 17476,  31454, 29708 };\n\n\n/*   Table 4.3a  Decision level of the LTP gain quantizer\n */\n/*  bc\t\t      0\t        1\t  2\t     3\t\t\t*/\nword gsm_DLB[4] = {  6554,    16384,\t26214,\t   32767\t};\n\n\n/*   Table 4.3b   Quantization levels of the LTP gain quantizer\n */\n/* bc\t\t      0          1        2          3\t\t\t*/\nword gsm_QLB[4] = {  3277,    11469,\t21299,\t   32767\t};\n\n\n/*   Table 4.4\t Coefficients of the weighting filter\n */\n/* i\t\t    0      1   2    3   4      5      6     7   8   9    10  */\nword gsm_H[11] = {-134, -374, 0, 2054, 5741, 8192, 5741, 2054, 0, -374, -134 };\n\n\n/*   Table 4.5 \t Normalized inverse mantissa used to compute xM/xmax \n */\n/* i\t\t \t0        1    2      3      4      5     6      7   */\nword gsm_NRFAC[8] = { 29128, 26215, 23832, 21846, 20165, 18725, 17476, 16384 };\n\n\n/*   Table 4.6\t Normalized direct mantissa used to compute xM/xmax\n */\n/* i                  0      1       2      3      4      5      6      7   */\nword gsm_FAC[8]\t= { 18431, 20479, 22527, 24575, 26623, 28671, 30719, 32767 };\n\n\n/***** Squeak Interface Code Starts Here *****/\n\n/* prototypes */\nvoid gsmEncode(\n\tint state, int frameCount,\n\tint src, int srcIndex, int srcSize,\n\tint dst, int dstIndex, int dstSize,\n\tint *srcDelta, int *dstDelta);\n\t\nvoid gsmDecode(\n\tint state, int frameCount,\n\tint src, int srcIndex, int srcSize,\n\tint dst, int dstIndex, int dstSize,\n\tint *srcDelta, int *dstDelta);\n\t\nvoid gsmInitState(int state);\n\nint gsmStateBytes(void);\n\n/* glue functions */\n\nvoid gsmEncode(\n  int state, int frameCount,\n  int src, int srcIndex, int srcSize,\n  int dst, int dstIndex, int dstSize,\n  int *srcDelta, int *dstDelta) {\n  \tint maxSrcFrames, maxDstFrames, srcPtr, dstPtr, i;\n\n\tmaxSrcFrames = (srcSize + 1 - srcIndex) / 160;\n\tmaxDstFrames = (dstSize + 1 - dstIndex) / 33;\n\tif (frameCount > maxSrcFrames) frameCount = maxSrcFrames;\n\tif (frameCount > maxDstFrames) frameCount = maxDstFrames;\n\n\tsrcPtr = src + 4 + ((srcIndex - 1) * 2);\n\tdstPtr = dst + 4 + (dstIndex - 1);\n\tfor (i = 1; i <= frameCount; i++) {\n\t\tgsm_encode((gsm) state, (short *) srcPtr, (unsigned char *) dstPtr);\n\t\tsrcPtr += 160 * 2;\n\t\tdstPtr += 33;\n\t}\n\t*srcDelta = frameCount * 160;\n\t*dstDelta = frameCount * 33;\n}\n\nvoid gsmDecode(\n  int state, int frameCount,\n  int src, int srcIndex, int srcSize,\n  int dst, int dstIndex, int dstSize,\n  int *srcDelta, int *dstDelta) {\n  \tint maxSrcFrames, maxDstFrames, srcPtr, dstPtr, i;\n\n\tmaxSrcFrames = (srcSize + 1 - srcIndex) / 33;\n\tmaxDstFrames = (dstSize + 1 - dstIndex) / 160;\n\tif (frameCount > maxSrcFrames) frameCount = maxSrcFrames;\n\tif (frameCount > maxDstFrames) frameCount = maxDstFrames;\n\n\tsrcPtr = src + 4 + (srcIndex - 1);\n\tdstPtr = dst + 4 + ((dstIndex - 1) * 2);\n\tfor (i = 1; i <= frameCount; i++) {\n\t\tgsm_decode((gsm) state, (unsigned char *) srcPtr, (short *) dstPtr);\n\t\tsrcPtr += 33;\n\t\tdstPtr += 160 * 2;\n\t}\n\t*srcDelta = frameCount * 33;\n\t*dstDelta = frameCount * 160;\n}\n\nvoid gsmInitState(int state) {\n\t/* Initialize the given GSM state record. */\n\tmemset((char *) state, 0, sizeof(struct gsm_state));\n\t((gsm) state)->nrp = 40;\n}\n\nint gsmStateBytes(void) {\n\t/* Return the size of a GSM state record in bytes. */\n\treturn sizeof(struct gsm_state);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/SoundGenerationPlugin/SoundGenerationPlugin.h",
    "content": "/* obsolete primitives for backward compatibility */\nint primFMSoundmixSampleCountintostartingAtpan(void);\nint oldprimSampledSoundmixSampleCountintostartingAtleftVolrightVol(void);\nint primPluckedSoundmixSampleCountintostartingAtpan(void);\nint primSampledSoundmixSampleCountintostartingAtpan(void);\nint primWaveTableSoundmixSampleCountintostartingAtpan(void);\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/SoundGenerationPlugin/sqOldSoundPrims.c",
    "content": "/* Automatically generated from Squeak on (4 January 1998 3:05:25 am ) */\n\n#include \"sq.h\"\n\n\n/* Memory Access Macros */\n#define byteAt(i) (*((unsigned char *) (i)))\n#define byteAtput(i, val) (*((unsigned char *) (i)) = val)\n#define longAt(i) (*((int *) (i)))\n#define longAtput(i, val) (*((int *) (i)) = val)\n\n/*** Imported Functions/Variables ***/\nextern int stackValue(int);\nextern int successFlag;\n\n/*** Variables ***/\n\n/*** Function Prototypes ***/\nint primFMSoundmixSampleCountintostartingAtpan(void);\nint primPluckedSoundmixSampleCountintostartingAtpan(void);\nint primSampledSoundmixSampleCountintostartingAtpan(void);\nint primWaveTableSoundmixSampleCountintostartingAtpan(void);\nint oldprimSampledSoundmixSampleCountintostartingAtleftVolrightVol(void);\n\nint primFMSoundmixSampleCountintostartingAtpan(void) {\n    int rcvr;\n    int n;\n    short int *aSoundBuffer;\n    int startIndex;\n    int pan;\n    int mySample;\n    int sample;\n    int lastIndex;\n    int channelIndex;\n    int i;\n    short int *waveTable;\n    int waveTableSize;\n    int count;\n    int amplitude;\n    int increment;\n    int index;\n    int modulation;\n    int offsetIncrement;\n    int offsetIndex;\n\n\trcvr = stackValue(4);\n\tn = checkedIntegerValueOf(stackValue(3));\n\taSoundBuffer = arrayValueOf(stackValue(2));\n\tstartIndex = checkedIntegerValueOf(stackValue(1));\n\tpan = checkedIntegerValueOf(stackValue(0));\n\twaveTable = fetchArrayofObject(1, rcvr);\n\twaveTableSize = fetchIntegerofObject(2, rcvr);\n\tcount = fetchIntegerofObject(4, rcvr);\n\tamplitude = fetchIntegerofObject(6, rcvr);\n\tincrement = fetchIntegerofObject(8, rcvr);\n\tindex = fetchIntegerofObject(9, rcvr);\n\tmodulation = fetchIntegerofObject(11, rcvr);\n\toffsetIncrement = fetchIntegerofObject(14, rcvr);\n\toffsetIndex = fetchIntegerofObject(15, rcvr);\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tlastIndex = (startIndex + n) - 1;\n\tfor (i = startIndex; i <= lastIndex; i += 1) {\n\t\tmySample = (amplitude * (waveTable[index - 1])) / 1000;\n\t\tif (pan > 0) {\n\t\t\tchannelIndex = 2 * i;\n\t\t\tsample = (aSoundBuffer[channelIndex - 1]) + ((mySample * pan) / 1000);\n\t\t\tif (sample > 32767) {\n\t\t\t\tsample = 32767;\n\t\t\t}\n\t\t\tif (sample < -32767) {\n\t\t\t\tsample = -32767;\n\t\t\t}\n\t\t\taSoundBuffer[channelIndex - 1] = sample;\n\t\t}\n\t\tif (pan < 1000) {\n\t\t\tchannelIndex = (2 * i) - 1;\n\t\t\tsample = (aSoundBuffer[channelIndex - 1]) + ((mySample * (1000 - pan)) / 1000);\n\t\t\tif (sample > 32767) {\n\t\t\t\tsample = 32767;\n\t\t\t}\n\t\t\tif (sample < -32767) {\n\t\t\t\tsample = -32767;\n\t\t\t}\n\t\t\taSoundBuffer[channelIndex - 1] = sample;\n\t\t}\n\t\tindex = (index + increment) + ((modulation * (waveTable[offsetIndex - 1])) / 1000000);\n\t\tif (index > waveTableSize) {\n\t\t\tindex -= waveTableSize;\n\t\t}\n\t\tif (index < 1) {\n\t\t\tindex += waveTableSize;\n\t\t}\n\t\toffsetIndex += offsetIncrement;\n\t\tif (offsetIndex > waveTableSize) {\n\t\t\toffsetIndex -= waveTableSize;\n\t\t}\n\t}\n\tcount -= n;\n\tstoreIntegerofObjectwithValue(4, rcvr, count);\n\tstoreIntegerofObjectwithValue(9, rcvr, index);\n\tstoreIntegerofObjectwithValue(15, rcvr, offsetIndex);\n\tpop(4);\n}\n\nint primPluckedSoundmixSampleCountintostartingAtpan(void) {\n    int rcvr;\n    int n;\n    short int *aSoundBuffer;\n    int startIndex;\n    int pan;\n    int lastIndex;\n    int channelIndex;\n    int i;\n    int sample;\n    int mySample;\n    int thisIndex;\n    int nextIndex;\n    int count;\n    short int *ring;\n    int ringSize;\n    int ringIndx;\n\n\trcvr = stackValue(4);\n\tn = checkedIntegerValueOf(stackValue(3));\n\taSoundBuffer = arrayValueOf(stackValue(2));\n\tstartIndex = checkedIntegerValueOf(stackValue(1));\n\tpan = checkedIntegerValueOf(stackValue(0));\n\tcount = fetchIntegerofObject(2, rcvr);\n\tring = fetchArrayofObject(4, rcvr);\n\tringSize = fetchIntegerofObject(5, rcvr);\n\tringIndx = fetchIntegerofObject(6, rcvr);\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tlastIndex = (startIndex + n) - 1;\n\tthisIndex = ringIndx;\n\tfor (i = startIndex; i <= lastIndex; i += 1) {\n\t\tnextIndex = (thisIndex % ringSize) + 1;\n\t\tmySample = ((ring[thisIndex - 1]) + (ring[nextIndex - 1])) / 2;\n\t\tring[thisIndex - 1] = mySample;\n\t\tthisIndex = nextIndex;\n\t\tif (pan > 0) {\n\t\t\tchannelIndex = 2 * i;\n\t\t\tsample = (aSoundBuffer[channelIndex - 1]) + ((mySample * pan) / 1000);\n\t\t\tif (sample > 32767) {\n\t\t\t\tsample = 32767;\n\t\t\t}\n\t\t\tif (sample < -32767) {\n\t\t\t\tsample = -32767;\n\t\t\t}\n\t\t\taSoundBuffer[channelIndex - 1] = sample;\n\t\t}\n\t\tif (pan < 1000) {\n\t\t\tchannelIndex = (2 * i) - 1;\n\t\t\tsample = (aSoundBuffer[channelIndex - 1]) + ((mySample * (1000 - pan)) / 1000);\n\t\t\tif (sample > 32767) {\n\t\t\t\tsample = 32767;\n\t\t\t}\n\t\t\tif (sample < -32767) {\n\t\t\t\tsample = -32767;\n\t\t\t}\n\t\t\taSoundBuffer[channelIndex - 1] = sample;\n\t\t}\n\t}\n\tringIndx = nextIndex;\n\tcount -= n;\n\tstoreIntegerofObjectwithValue(2, rcvr, count);\n\tstoreIntegerofObjectwithValue(6, rcvr, ringIndx);\n\tpop(4);\n}\n\nint primSampledSoundmixSampleCountintostartingAtpan(void) {\n    int rcvr;\n    int n;\n    short int *aSoundBuffer;\n    int startIndex;\n    int pan;\n    int lastIndex;\n    int i;\n    int channelIndex;\n    int sample;\n    int sampleIndex;\n    int thisSample;\n    short int *samples;\n    int samplesSize;\n    int incrementTimes1000;\n    int count;\n    int indexTimes1000;\n\n\trcvr = stackValue(4);\n\tn = checkedIntegerValueOf(stackValue(3));\n\taSoundBuffer = arrayValueOf(stackValue(2));\n\tstartIndex = checkedIntegerValueOf(stackValue(1));\n\tpan = checkedIntegerValueOf(stackValue(0));\n\tsamples = fetchArrayofObject(1, rcvr);\n\tsamplesSize = fetchIntegerofObject(2, rcvr);\n\tincrementTimes1000 = fetchIntegerofObject(3, rcvr);\n\tcount = fetchIntegerofObject(5, rcvr);\n\tindexTimes1000 = fetchIntegerofObject(6, rcvr);\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tlastIndex = (startIndex + n) - 1;\n\ti = startIndex;\n\tsampleIndex = indexTimes1000 / 1000;\n\twhile ((sampleIndex <= samplesSize) && (i <= lastIndex)) {\n\t\tthisSample = samples[sampleIndex - 1];\n\t\tif (pan > 0) {\n\t\t\tchannelIndex = 2 * i;\n\t\t\tsample = (aSoundBuffer[channelIndex - 1]) + ((thisSample * pan) / 1000);\n\t\t\tif (sample > 32767) {\n\t\t\t\tsample = 32767;\n\t\t\t}\n\t\t\tif (sample < -32767) {\n\t\t\t\tsample = -32767;\n\t\t\t}\n\t\t\taSoundBuffer[channelIndex - 1] = sample;\n\t\t}\n\t\tif (pan < 1000) {\n\t\t\tchannelIndex = (2 * i) - 1;\n\t\t\tsample = (aSoundBuffer[channelIndex - 1]) + ((thisSample * (1000 - pan)) / 1000);\n\t\t\tif (sample > 32767) {\n\t\t\t\tsample = 32767;\n\t\t\t}\n\t\t\tif (sample < -32767) {\n\t\t\t\tsample = -32767;\n\t\t\t}\n\t\t\taSoundBuffer[channelIndex - 1] = sample;\n\t\t}\n\t\tindexTimes1000 += incrementTimes1000;\n\t\tsampleIndex = indexTimes1000 / 1000;\n\t\ti += 1;\n\t}\n\tcount -= n;\n\tstoreIntegerofObjectwithValue(5, rcvr, count);\n\tstoreIntegerofObjectwithValue(6, rcvr, indexTimes1000);\n\tpop(4);\n}\n\nint primWaveTableSoundmixSampleCountintostartingAtpan(void) {\n    int rcvr;\n    int n;\n    short int *aSoundBuffer;\n    int startIndex;\n    int pan;\n    int lastIndex;\n    int channelIndex;\n    int i;\n    int mySample;\n    int sample;\n    short int *waveTable;\n    int waveTableSize;\n    int count;\n    int amplitude;\n    int increment;\n    int index;\n\n\trcvr = stackValue(4);\n\tn = checkedIntegerValueOf(stackValue(3));\n\taSoundBuffer = arrayValueOf(stackValue(2));\n\tstartIndex = checkedIntegerValueOf(stackValue(1));\n\tpan = checkedIntegerValueOf(stackValue(0));\n\twaveTable = fetchArrayofObject(1, rcvr);\n\twaveTableSize = fetchIntegerofObject(2, rcvr);\n\tcount = fetchIntegerofObject(4, rcvr);\n\tamplitude = fetchIntegerofObject(6, rcvr);\n\tincrement = fetchIntegerofObject(8, rcvr);\n\tindex = fetchIntegerofObject(9, rcvr);\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tlastIndex = (startIndex + n) - 1;\n\tfor (i = startIndex; i <= lastIndex; i += 1) {\n\t\tmySample = (amplitude * (waveTable[index - 1])) / 1000;\n\t\tif (pan > 0) {\n\t\t\tchannelIndex = 2 * i;\n\t\t\tsample = (aSoundBuffer[channelIndex - 1]) + ((mySample * pan) / 1000);\n\t\t\tif (sample > 32767) {\n\t\t\t\tsample = 32767;\n\t\t\t}\n\t\t\tif (sample < -32767) {\n\t\t\t\tsample = -32767;\n\t\t\t}\n\t\t\taSoundBuffer[channelIndex - 1] = sample;\n\t\t}\n\t\tif (pan < 1000) {\n\t\t\tchannelIndex = (2 * i) - 1;\n\t\t\tsample = (aSoundBuffer[channelIndex - 1]) + ((mySample * (1000 - pan)) / 1000);\n\t\t\tif (sample > 32767) {\n\t\t\t\tsample = 32767;\n\t\t\t}\n\t\t\tif (sample < -32767) {\n\t\t\t\tsample = -32767;\n\t\t\t}\n\t\t\taSoundBuffer[channelIndex - 1] = sample;\n\t\t}\n\t\tindex += increment;\n\t\tif (index > waveTableSize) {\n\t\t\tindex -= waveTableSize;\n\t\t}\n\t}\n\tcount -= n;\n\tstoreIntegerofObjectwithValue(4, rcvr, count);\n\tstoreIntegerofObjectwithValue(9, rcvr, index);\n\tpop(4);\n}\n\nint oldprimSampledSoundmixSampleCountintostartingAtleftVolrightVol(void) {\n    int rcvr;\n    int n;\n    short int *aSoundBuffer;\n    int startIndex;\n    int leftVol;\n    int rightVol;\n    int sliceIndex;\n    int sampleIndex;\n    int sample;\n    int s;\n    int lastIndex;\n    int i;\n    int scaledVol;\n    int scaledVolIncr;\n    int scaledVolLimit;\n    int count;\n    short int *samples;\n    int samplesSize;\n    int incrementTimes1000;\n    int indexTimes1000;\n\n\trcvr = stackValue(5);\n\tn = checkedIntegerValueOf(stackValue(4));\n\taSoundBuffer = arrayValueOf(stackValue(3));\n\taSoundBuffer -= 1;\n\tstartIndex = checkedIntegerValueOf(stackValue(2));\n\tleftVol = checkedIntegerValueOf(stackValue(1));\n\trightVol = checkedIntegerValueOf(stackValue(0));\n\tscaledVol = fetchIntegerofObject(3, rcvr);\n\tscaledVolIncr = fetchIntegerofObject(4, rcvr);\n\tscaledVolLimit = fetchIntegerofObject(5, rcvr);\n\tcount = fetchIntegerofObject(7, rcvr);\n\tsamples = fetchArrayofObject(8, rcvr);\n\tsamples -= 1;\n\tsamplesSize = fetchIntegerofObject(10, rcvr);\n\tincrementTimes1000 = fetchIntegerofObject(11, rcvr);\n\tindexTimes1000 = fetchIntegerofObject(12, rcvr);\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tlastIndex = (startIndex + n) - 1;\n\tsliceIndex = startIndex;\n\tsampleIndex = indexTimes1000 / 1000;\n\twhile ((sampleIndex <= samplesSize) && (sliceIndex <= lastIndex)) {\n\t\tsample = ((int) ((samples[sampleIndex]) * scaledVol) >> 15);\n\t\tif (leftVol > 0) {\n\t\t\ti = (2 * sliceIndex) - 1;\n\t\t\ts = (aSoundBuffer[i]) + (((int) (sample * leftVol) >> 15));\n\t\t\tif (s > 32767) {\n\t\t\t\ts = 32767;\n\t\t\t}\n\t\t\tif (s < -32767) {\n\t\t\t\ts = -32767;\n\t\t\t}\n\t\t\taSoundBuffer[i] = s;\n\t\t}\n\t\tif (rightVol > 0) {\n\t\t\ti = 2 * sliceIndex;\n\t\t\ts = (aSoundBuffer[i]) + (((int) (sample * rightVol) >> 15));\n\t\t\tif (s > 32767) {\n\t\t\t\ts = 32767;\n\t\t\t}\n\t\t\tif (s < -32767) {\n\t\t\t\ts = -32767;\n\t\t\t}\n\t\t\taSoundBuffer[i] = s;\n\t\t}\n\t\tif (scaledVolIncr != 0) {\n\t\t\tscaledVol += scaledVolIncr;\n\t\t\tif (((scaledVolIncr > 0) && (scaledVol >= scaledVolLimit)) || ((scaledVolIncr < 0) && (scaledVol <= scaledVolLimit))) {\n\t\t\t\tscaledVol = scaledVolLimit;\n\t\t\t\tscaledVolIncr = 0;\n\t\t\t}\n\t\t}\n\t\tindexTimes1000 += incrementTimes1000;\n\t\tsampleIndex = indexTimes1000 / 1000;\n\t\tsliceIndex += 1;\n\t}\n\tcount -= n;\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tstoreIntegerofObjectwithValue(3, rcvr, scaledVol);\n\tstoreIntegerofObjectwithValue(4, rcvr, scaledVolIncr);\n\tstoreIntegerofObjectwithValue(7, rcvr, count);\n\tstoreIntegerofObjectwithValue(12, rcvr, indexTimes1000);\n\tpop(5);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/SoundPlugin/SoundPlugin.h",
    "content": "/* SoundPlugin.h - header for Sound Plugins :-) tim@sumeru.stanford.edu */\n\n/* module initialization/shutdown */\nsqInt soundInit(void);\nsqInt soundShutdown(void);\n\n/* sound output */\nsqInt snd_AvailableSpace(void);\nsqInt snd_InsertSamplesFromLeadTime(sqInt frameCount, void *srcBufPtr, sqInt samplesOfLeadTime);\nsqInt snd_PlaySamplesFromAtLength(sqInt frameCount, void *srcBufPtr, sqInt startIndex);\nsqInt snd_PlaySilence(void);\nsqInt snd_Start(sqInt frameCount, sqInt samplesPerSec, sqInt stereo, sqInt semaIndex);\nsqInt snd_Stop(void);\n\n/* sound input */\nint snd_SetRecordLevel(sqInt level);\nsqInt snd_StartRecording(sqInt desiredSamplesPerSec, sqInt stereo, sqInt semaIndex);\nsqInt snd_StopRecording(void);\ndouble snd_GetRecordingSampleRate(void);\nsqInt snd_RecordSamplesIntoAtLength(void *buf, sqInt startSliceIndex, sqInt bufferSizeInBytes);\nvoid snd_Volume(double *left, double *right);  /* johnmci@smalltalkconsulting.com Nov 6th 2000 */\nvoid snd_SetVolume(double left, double right); /* johnmci@smalltalkconsulting.com Nov 6th 2000 */\n\n/* mixer interface */\nsqInt snd_GetSwitch(sqInt identifier, sqInt captureFlag, sqInt channel);\nsqInt snd_SetSwitch(sqInt identifier, sqInt captureFlag, sqInt parameter);\nsqInt snd_SetDevice(sqInt identifier, char *name);\n\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Squeak3D/b3d.h",
    "content": "/****************************************************************************\n*   PROJECT: Balloon 3D Graphics Subsystem for Squeak\n*   FILE:    b3d.h\n*   CONTENT: Main include file\n*\n*   AUTHOR:  Andreas Raab (ar)\n*   ADDRESS: Walt Disney Imagineering, Glendale, CA\n*   EMAIL:   andreasr@wdi.disney.com\n*   RCSID:   $Id: b3d.h 2 2001-10-24 23:11:49Z rowledge $\n*\n*   NOTES:\n*\n*\n*****************************************************************************/\n#ifndef __B3D_H\n#define __B3D_H\n\n#ifdef DEBUG\n#define b3dDebug 1\n#else\n#define b3dDebug 0\n#endif\n\n#define b3dDoStats 1\n\n/* primary include file */\n\n#include \"b3dTypes.h\"\n#include \"b3dAlloc.h\"\n\ntypedef int (*b3dDrawBufferFunction) (int leftX, int rightX, int yValue);\n\ntypedef struct B3DRasterizerState {\n\n\t/* The three sources for allocating \n\t   temporary rasterizer objects */\n\tB3DFaceAllocList *faceAlloc;\n\tB3DEdgeAllocList *edgeAlloc;\n\tB3DAttrAllocList *attrAlloc;\n\n\t/* The active edge table */\n\tB3DActiveEdgeTable *aet;\n\t/* The list for newly added edges */\n\tB3DPrimitiveEdgeList *addedEdges;\n\n\t/* The fill list */\n\tB3DFillList *fillList;\n\n\t/* The input objects for the rasterizer */\n\tint nObjects;\n\tB3DPrimitiveObject **objects;\n\n\t/* The input textures for the rasterizer */\n\tint nTextures;\n\tB3DTexture *textures;\n\n\t/* Length and location of span buffer to use */\n\tint spanSize;\n\tunsigned int *spanBuffer;\n\n\t/* Function to call on drawing the output buffer */\n\tb3dDrawBufferFunction spanDrawer;\n\n} B3DRasterizerState;\n\nextern B3DRasterizerState *currentState;\n\n/* from b3dInit.c */\nint b3dInitializeEdgeAllocator(void* base, int length);\nint b3dInitializeFaceAllocator(void* base, int length);\nint b3dInitializeAttrAllocator(void* base, int length);\nint b3dInitializeAET(void* base, int length);\nint b3dInitializeEdgeList(void* base, int length);\nint b3dInitializeFillList(void* base, int length);\nint b3dSetupObjects(B3DRasterizerState *state);\n\nint b3dAddPolygonObject(void *objBase, int objLength, int objFlags, int textureIndex,\n\t\t\t\t\t\t  B3DPrimitiveVertex *vtxPointer, int nVertices,\n\t\t\t\t\t\t  B3DPrimitiveViewport *vp);\n\nint b3dAddIndexedQuadObject(void *objBase, int objLength, int objFlags, int textureIndex,\n\t\t\t\t\t\t  B3DPrimitiveVertex *vtxPointer, int nVertices,\n\t\t\t\t\t\t  B3DInputQuad *quadPtr, int nQuads,\n\t\t\t\t\t\t  B3DPrimitiveViewport *vp);\n\nint b3dAddIndexedTriangleObject(void *objBase, int objLength, int objFlags, int textureIndex,\n\t\t\t\t\t\t  B3DPrimitiveVertex *vtxPointer, int nVertices,\n\t\t\t\t\t\t  B3DInputFace *facePtr, int nFaces,\n\t\t\t\t\t\t  B3DPrimitiveViewport *vp);\n\nint b3dLoadTexture(B3DTexture *texture,\n\t\t\t\t   int width, int height, int depth, unsigned int *bits,\n\t\t\t\t   int cmSize, unsigned int *colormap);\n\n\n/* from b3dRemap.c */\nint b3dValidateAndRemapState(B3DRasterizerState *state);\n\n/* from b3dDraw.c */\ntypedef void (*b3dPixelDrawer) (int leftX, int rightX, int yValue, B3DPrimitiveFace *face);\nextern b3dPixelDrawer B3D_FILL_FUNCTIONS[];\n\n/* from b3dMain.c */\nvoid b3dAbort(char *msg);\nint b3dMainLoop(B3DRasterizerState *state, int stopReason);\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Squeak3D/b3dAlloc.c",
    "content": "/****************************************************************************\n*   PROJECT: Balloon 3D Graphics Subsystem for Squeak\n*   FILE:    b3dAlloc.c\n*   CONTENT: Memory allocation for the Balloon 3D rasterizer\n*\n*   AUTHOR:  Andreas Raab (ar)\n*   ADDRESS: Walt Disney Imagineering, Glendale, CA\n*   EMAIL:   andreasr@wdi.disney.com\n*   RCSID:   $Id: b3dAlloc.c 2 2001-10-24 23:11:49Z rowledge $\n*\n*   NOTES:\n*\n*\n*****************************************************************************/\n#include <assert.h>\n#include \"b3d.h\"\n\n#ifdef DEBUG_ALLOC\n/* DEBUG versions of allocators */\nB3DPrimitiveFace *dbg_b3dAllocFace(B3DFaceAllocList *list)\n{\n\tB3DPrimitiveFace *result;\n\tif(list->firstFree) {\n\t\tresult = list->firstFree;\n\t\tlist->firstFree = list->firstFree->nextFree;\n\t    if(result->flags & B3D_ALLOC_FLAG)\n\t\t\tb3dAbort(\"list->firstFree has allocation bit set\");\n\t} else {\n\t\tif(list->size < list->max) {\n\t\t\tresult = list->data + list->size;\n\t\t\tlist->size++;\n\t\t} else return NULL;\n\t}\n\tresult->nextFree = NULL;\n\tresult->flags = B3D_ALLOC_FLAG;\n\tlist->nFree--;\n\treturn result;\n}\n\nB3DPrimitiveEdge *dbg_b3dAllocEdge(B3DEdgeAllocList *list)\n{\n\tB3DPrimitiveEdge *result;\n\tif(list->firstFree) {\n\t\tresult = list->firstFree;\n\t\tlist->firstFree = list->firstFree->nextFree;\n\t    if(result->flags & B3D_ALLOC_FLAG)\n\t\t\tb3dAbort(\"list->firstFree has allocation bit set\");\n\t} else {\n\t\tif(list->size < list->max) {\n\t\t\tresult = list->data + list->size;\n\t\t\tlist->size++;\n\t\t} else return NULL;\n\t}\n\tresult->nextFree = NULL;\n\tresult->flags = B3D_ALLOC_FLAG;\n\tlist->nFree--;\n\treturn result;\n}\n\nvoid dbg_b3dFreeFace(B3DFaceAllocList *list, B3DPrimitiveFace *face)\n{\n\tif(face < list->data || face >= (list->data + list->size))\n\t\tb3dAbort(\"face to free is not in list\");\n\tif( ! (face->flags & B3D_ALLOC_FLAG) )\n\t\tb3dAbort(\"face to free has no allocation flag set\");\n\tface->flags = 0;\n\tface->nextFree = list->firstFree;\n\tlist->firstFree = face;\n\tlist->nFree++;\n}\n\nvoid dbg_b3dFreeEdge(B3DEdgeAllocList *list, B3DPrimitiveEdge *edge)\n{\n\tif(edge < list->data || edge >= (list->data + list->size))\n\t\tb3dAbort(\"edge to free is not in list\");\n\tif( ! (edge->flags & B3D_ALLOC_FLAG) )\n\t\tb3dAbort(\"edge to free has no allocation flag set\");\n\tedge->flags = 0;\n\tedge->nextFree = list->firstFree;\n\tlist->firstFree = edge;\n\tlist->nFree++;\n}\n\nB3DPrimitiveAttribute *dbg_b3dAllocSingleAttr(B3DAttrAllocList *list)\n{\n\tB3DPrimitiveAttribute *result;\n\tif(list->firstFree) {\n\t\tresult = list->firstFree;\n\t\tlist->firstFree = list->firstFree->next;\n\t} else {\n\t\tif(list->size < list->max) {\n\t\t\tresult = list->data + list->size;\n\t\t\tlist->size++;\n\t\t} else return NULL;\n\t}\n\tlist->nFree--;\n\treturn result;\n}\n\nint dbg_b3dAllocAttrib(B3DAttrAllocList *attrList, B3DPrimitiveFace *face)\n{\n\tB3DPrimitiveAttribute *firstAttr, *nextAttr;\n\tint i, nAttrs = 0;\n\n\tassert(face->attributes == NULL);\n\tif(face->flags & B3D_FACE_RGB) nAttrs += 3;\n\tif(face->flags & B3D_FACE_ALPHA) nAttrs += 1;\n\tif(face->flags & B3D_FACE_STW) nAttrs += 3;\n\tif(!nAttrs) return 1;\n\tfirstAttr = nextAttr = NULL;\n\tfor(i=0;i<nAttrs; i++) {\n\t\tnextAttr = dbg_b3dAllocSingleAttr(attrList);\n\t\tif(!nextAttr) return 0;\n\t\tnextAttr->next = firstAttr;\n\t\tfirstAttr = nextAttr;\n\t}\n\tface->attributes = firstAttr;\n\treturn 1;\n}\n\nvoid dbg_b3dFreeAttrib(B3DAttrAllocList *list, B3DPrimitiveFace *face)\n{\n\tB3DPrimitiveAttribute *attr, *nextAttr = face->attributes;\n\twhile(nextAttr) {\n\t\tattr = nextAttr;\n\t\tnextAttr = attr->next;\n\t\tif(attr < list->data || attr >= (list->data + list->size))\n\t\t\tb3dAbort(\"attributes to free are not in list\");\n\t\tattr->next = list->firstFree;\n\t\tlist->firstFree = attr;\n\t\tlist->nFree++;\n\t}\n}\n\n\n#endif /* DEBUG */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Squeak3D/b3dAlloc.h",
    "content": "/****************************************************************************\n*   PROJECT: Balloon 3D Graphics Subsystem for Squeak\n*   FILE:    b3dAlloc.h\n*   CONTENT: Memory allocation for the Balloon 3D rasterizer\n*\n*   AUTHOR:  Andreas Raab (ar)\n*   ADDRESS: Walt Disney Imagineering, Glendale, CA\n*   EMAIL:   andreasr@wdi.disney.com\n*   RCSID:   $Id: b3dAlloc.h 2 2001-10-24 23:11:49Z rowledge $\n*\n*   NOTES:\n*\n*\n*****************************************************************************/\n#ifndef B3D_ALLOC_H\n#define B3D_ALLOC_H\n\n#include \"b3dTypes.h\"\n\n/************************ Allocator definitions ************************/\n#define B3D_EDGE_ALLOC_MAGIC 0x45443341\ntypedef struct B3DEdgeAllocList {\n\tint magic;\n\tvoid *This;\n\tint max; /* Note: size is ALWAYS less than max */\n\tint size;\n \tint nFree;\n\tB3DPrimitiveEdge *firstFree; /* pointer to the first free edge (< max) */\n\tB3DPrimitiveEdge data[1];\n} B3DEdgeAllocList;\n\n#define B3D_FACE_ALLOC_MAGIC 0x46443341\ntypedef struct B3DFaceAllocList {\n\tint magic;\n\tvoid *This;\n\tint max; /* Note: size is ALWAYS less than max */\n\tint size;\n\tint nFree;\n\tB3DPrimitiveFace *firstFree; /* pointer to the first free face (< max) */\n\tB3DPrimitiveFace data[1];\n} B3DFaceAllocList;\n\n#define B3D_ATTR_ALLOC_MAGIC  0x41443341\ntypedef struct B3DAttrAllocList {\n\tint magic;\n\tvoid *This;\n\tint max; /* Note: size is ALWAYS less than max */\n\tint size;\n\tint nFree;\n\tB3DPrimitiveAttribute *firstFree; /* pointer to the first free attribute (< max) */\n\tB3DPrimitiveAttribute data[1];\n} B3DAttrAllocList;\n\n/* The mapping from face flags to the number of attributes needed */\nextern int B3D_ATTRIBUTE_SIZES[B3D_MAX_ATTRIBUTES];\n#define B3D_FACE_ATTRIB_SIZE(face) (B3D_ATTRIBUTE_SIZES[(face->flags >> B3D_ATTR_SHIFT) & B3D_ATTR_MASK])\n\n#ifdef DEBUG_ALLOC\n\nB3DPrimitiveFace *dbg_b3dAllocFace(B3DFaceAllocList *list);\nB3DPrimitiveEdge *dbg_b3dAllocEdge(B3DEdgeAllocList *list);\nint dbg_b3dAllocAttrib(B3DAttrAllocList *attrList, B3DPrimitiveFace *face);\nvoid dbg_b3dFreeFace(B3DFaceAllocList *list, B3DPrimitiveFace *face);\nvoid dbg_b3dFreeEdge(B3DEdgeAllocList *list, B3DPrimitiveEdge *edge);\nvoid dbg_b3dFreeAttrib(B3DAttrAllocList *list, B3DPrimitiveFace *face);\n\n#define b3dAllocFace(list, face) face = dbg_b3dAllocFace(list);\n#define b3dAllocEdge(list, edge) edge = dbg_b3dAllocEdge(list);\n#define b3dAllocAttrib(attrList, face, result) result = dbg_b3dAllocAttrib(attrList, face);\n#define b3dFreeFace(list, face) dbg_b3dFreeFace(list, face);\n#define b3dFreeEdge(list, edge) dbg_b3dFreeEdge(list, edge);\n#define b3dFreeAttrib(list, face) dbg_b3dFreeAttrib(list, face);\n\n#else /* RELEASE */\n\n#define b3dAlloc(list,object) \\\n{\\\n\tif(list->firstFree) { \\\n\t\tobject = list->firstFree; \\\n\t\tlist->firstFree = object->nextFree; \\\n\t\tobject->flags = B3D_ALLOC_FLAG; \\\n\t\tlist->nFree--;\\\n\t} else { \\\n\t\tif(list->size < list->max) { \\\n\t\t\tobject = list->data + list->size; \\\n\t\t\tlist->size++;\\\n\t\t\tobject->flags = B3D_ALLOC_FLAG;\\\n\t\t\tlist->nFree--;\\\n\t\t} else object = NULL;\\\n\t}\\\n}\n\n#define b3dFree(list, object) \\\n{\\\n\tobject->flags = 0;\\\n\tobject->nextFree = list->firstFree; \\\n\tlist->firstFree = object;\\\n\tlist->nFree++;\\\n}\n\n#define b3dAllocFace(list, face) b3dAlloc(list,face)\n#define b3dAllocEdge(list, edge) b3dAlloc(list, edge)\n#define b3dFreeFace(list, face) b3dFree(list, face)\n#define b3dFreeEdge(list, edge) b3dFree(list, edge)\n\n#define b3dAllocSingleAttr(list,object) \\\n{\\\n\tif(list->firstFree) { \\\n\t\tobject = list->firstFree; \\\n\t\tlist->firstFree = object->next; \\\n\t\tlist->nFree--;\\\n\t} else { \\\n\t\tif(list->size < list->max) { \\\n\t\t\tobject = list->data + list->size; \\\n\t\t\tlist->size++;\\\n\t\t\tlist->nFree--;\\\n\t\t} else object = NULL;\\\n\t}\\\n}\n\n#define b3dAllocAttrib(attrList,face, result) \\\n{\\\n\tB3DPrimitiveAttribute *firstAttr, *nextAttr;\\\n\tint nAttrs = 0;\\\n\\\n\tif(face->flags & B3D_FACE_RGB) nAttrs += 3;\\\n\tif(face->flags & B3D_FACE_ALPHA) nAttrs += 1;\\\n\tif(face->flags & B3D_FACE_STW) nAttrs += 3;\\\n\tfirstAttr = nextAttr = NULL;\\\n\twhile(nAttrs--) {\\\n\t\tb3dAllocSingleAttr(attrList, nextAttr);\\\n\t\tif(!nextAttr) break;\\\n\t\tnextAttr->next = firstAttr;\\\n\t\tfirstAttr = nextAttr;\\\n\t};\\\n\tface->attributes = firstAttr;\\\n\tresult = nextAttr != NULL;\\\n}\n\n\n#define b3dFreeAttrib(list, face) \\\n{\\\n\tB3DPrimitiveAttribute *attr, *nextAttr = face->attributes;\\\n\twhile(nextAttr) {\\\n\t\tattr = nextAttr;\\\n\t\tnextAttr = attr->next;\\\n\t\tattr->next = list->firstFree;\\\n\t\tlist->firstFree = attr;\\\n\t\tlist->nFree++;\\\n\t}\\\n}\n\n#endif\n\n#endif /* ifndef B3D_ALLOC_H */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Squeak3D/b3dDraw.c",
    "content": "/****************************************************************************\n*   PROJECT: Balloon 3D Graphics Subsystem for Squeak\n*   FILE:    b3dDraw.c\n*   CONTENT: Pixel drawing functions for the B3D rasterizer\n*\n*   AUTHOR:  Andreas Raab (ar)\n*   ADDRESS: Walt Disney Imagineering, Glendale, CA\n*   EMAIL:   andreasr@wdi.disney.com\n*   RCSID:   $Id: b3dDraw.c 2 2001-10-24 23:11:49Z rowledge $\n*\n*   NOTES:  LOTS of stuff missing here...\n*\n*\t- A note on RGBA interpolation:\n*\tFor low polygon models it makes sense to compute both, the left and\n*\tthe right attribute value if there might be any overflow at all.\n*\tSince we're usually drawing many pixels in a row we can clamp the\n*\tleft and right value and thus be safe during the interpolation stage.\n*\n*****************************************************************************/\n#include \"b3d.h\"\n\n#define rasterPosX rasterPos[0]\n#define rasterPosY rasterPos[1]\n\n#define redValue   color[RED_INDEX]\n#define greenValue color[GREEN_INDEX]\n#define blueValue  color[BLUE_INDEX]\n#define alphaValue color[ALPHA_INDEX]\n\n/* The following defines the maximum number of pixels \n   we treat in one loop. This value should be carefully\n   chosen: Setting it high will increase speed for larger\n   polygons but reduce speed for smaller ones. Setting\n   it low will do the opposite. Also, since I'm assuming\n   a smart compiler, the code size will probably increase\n   with this number (if loops are unrolled by the compiler).\n\n   The current value of 5 should be a good median (32 pixels\n   are processed at most and we'll have the overhead of 5\n   tests for a one-pixel polygon).\n*/\n#define MAX_PIXEL_SHIFT 5\n\n\n/* USE_MULTBL: Replace up a couple of multiplications by table lookups.\n\tOn PowerPC, the lookup seems to be slightly slower.\n\tOn Intel, the lookup is way faster.\n*/\n#ifndef USE_MULTBL\n# ifdef __POWERPC__\n#  define USE_MULTBL 0\n# else\n#  define USE_MULTBL 1\n# endif\n#endif\n\n/* Clamp the given value */\n#define CLAMP(value, min, max)\\\n\tif((value) < (min)) (value) = (min); \\\n\telse if((value) > (max)) (value) = (max);\n\n/* Clamp a set of fixed point RGB values */\n#define CLAMP_RGB(r,g,b) \\\n\tCLAMP(r,B3D_FixedHalf, (255 << B3D_IntToFixedShift) + B3D_FixedHalf)\\\n\tCLAMP(g,B3D_FixedHalf, (255 << B3D_IntToFixedShift) + B3D_FixedHalf)\\\n\tCLAMP(b,B3D_FixedHalf, (255 << B3D_IntToFixedShift) + B3D_FixedHalf)\n\n\n#ifdef DEBUG_ATTR\ndouble attrValueAt(B3DPrimitiveFace *face, B3DPrimitiveAttribute *attr, double xValue, double yValue)\n{\n\treturn \n\t\t(attr->value +\n\t\t\t((xValue - face->v0->rasterPosX) * attr->dvdx) +\n\t\t\t((yValue - face->v0->rasterPosY) * attr->dvdy));\n}\n#else\n#define attrValueAt(face,attr,xValue,yValue) \\\n\t\t((attr)->value + \\\n\t\t\t(((double)(xValue) - (face)->v0->rasterPosX) * (attr)->dvdx) + \\\n\t\t\t(((double)(yValue) - (face)->v0->rasterPosY) * (attr)->dvdy))\n#endif\n\n\n#define SETUP_RGB \\\n\trValue = (int)(attrValueAt(face, attr, floatX, floatY) * B3D_FloatToFixed); \\\n\tdeltaR = (int) (attr->dvdx * B3D_FloatToFixed);  \\\n\tattr = attr->next; \\\n\tgValue = (int)(attrValueAt(face, attr, floatX, floatY) * B3D_FloatToFixed);\\\n\tdeltaG = (int) (attr->dvdx * B3D_FloatToFixed); \\\n\tattr = attr->next; \\\n\tbValue = (int)(attrValueAt(face, attr, floatX, floatY) * B3D_FloatToFixed); \\\n\tdeltaB = (int) (attr->dvdx * B3D_FloatToFixed); \\\n\tattr = attr->next;\\\n\tCLAMP_RGB(rValue, gValue, bValue);\n\n#define SETUP_STW \\\n\twValue = attrValueAt(face, attr, floatX, floatY); \\\n\twDelta = attr->dvdx; \\\n\tattr = attr->next; \\\n\tsValue = attrValueAt(face, attr, floatX, floatY); \\\n\tsDelta = attr->dvdx; \\\n\tattr = attr->next; \\\n\ttValue = attrValueAt(face, attr, floatX, floatY); \\\n\ttDelta = attr->dvdx; \\\n\tattr = attr->next;\n\n#define STEP_STW \\\n\tsValue += sDelta;\\\n\ttValue += tDelta;\\\n\twValue += wDelta;\n\n\n/* Load the four neighbouring texels into tex00, tex01, tex10, and tex11 */\n#define LOAD_4_RGB_TEXEL_32(fixedS, fixedT, texture) \\\n{\\\n\tint sIndex, tIndex;\\\n\\\n\tif(texture->sMask) {\\\n\t\tsIndex = (fixedS >> B3D_FixedToIntShift) & texture->sMask;\\\n\t} else {\\\n\t\tsIndex = (fixedS >> B3D_FixedToIntShift) % texture->width;\\\n\t}\\\n\tif(texture->tMask) {\\\n\t\ttIndex = (fixedT >> B3D_FixedToIntShift) & texture->tMask;\\\n\t} else {\\\n\t\ttIndex = (fixedT >> B3D_FixedToIntShift) % texture->height;\\\n\t}\\\n\t/* Load the 4 texels, wrapping if necessary */\\\n\ttex00 = (struct b3dPixelColor *) texture->data + (tIndex * texture->width) + sIndex;\\\n\ttex01 = tex00 + 1;\\\n\ttex10 = tex00 + texture->width;\\\n\ttex11 = tex10 + 1;\\\n\tif(sIndex+1 == texture->width) {\\\n\t\ttex01 -= texture->width;\\\n\t\ttex11 -= texture->width;\\\n\t}\\\n\tif(tIndex+1 == texture->height) {\\\n\t\tint tsize = texture->height * texture->width;\\\n\t\ttex10 -= tsize;\\\n\t\ttex11 -= tsize;\\\n\t}\\\n}\n\n\n#if USE_MULTBL /* Use a 16x256 table for lookups */\n\nunsigned short MULTBL[17][256];\n\nstatic int multblInit = 0;\n\nstatic void MULTBL_Init(void)\n{\n\tint i,j;\n\tfor(i=0;i<17;i++)\n\t\tfor(j=0; j<256; j++)\n\t\t\tMULTBL[i][j] = (i*j) >> 4;\n\tmultblInit = 1;\n}\n\n#define INIT_MULTBL { if (!multblInit) MULTBL_Init(); }\n\n#define DO_RGB_INTERPOLATION(sf, si, tf, ti) \\\n\ttr = (MULTBL[ti][(MULTBL[si][tex00->redValue] + MULTBL[sf][tex01->redValue])] + \\\n\t\t\tMULTBL[tf][(MULTBL[si][tex10->redValue] + MULTBL[sf][tex11->redValue])]);\\\n\ttg = (MULTBL[ti][(MULTBL[si][tex00->greenValue] + MULTBL[sf][tex01->greenValue])] + \\\n\t\t\tMULTBL[tf][(MULTBL[si][tex10->greenValue] + MULTBL[sf][tex11->greenValue])]);\\\n\ttb = (MULTBL[ti][(MULTBL[si][tex00->blueValue] + MULTBL[sf][tex01->blueValue])] + \\\n\t\t\tMULTBL[tf][(MULTBL[si][tex10->blueValue] + MULTBL[sf][tex11->blueValue])]);\n\n#define DO_RGBA_INTERPOLATION(sf, si, tf, ti)\\\n\ttr = (MULTBL[ti][(MULTBL[si][tex00->redValue] + MULTBL[sf][tex01->redValue])] + \\\n\t\t\tMULTBL[tf][(MULTBL[si][tex10->redValue] + MULTBL[sf][tex11->redValue])]);\\\n\ttg = (MULTBL[ti][(MULTBL[si][tex00->greenValue] + MULTBL[sf][tex01->greenValue])] + \\\n\t\t\tMULTBL[tf][(MULTBL[si][tex10->greenValue] + MULTBL[sf][tex11->greenValue])]);\\\n\ttb = (MULTBL[ti][(MULTBL[si][tex00->blueValue] + MULTBL[sf][tex01->blueValue])] + \\\n\t\t\tMULTBL[tf][(MULTBL[si][tex10->blueValue] + MULTBL[sf][tex11->blueValue])]); \\\n\tta = (MULTBL[ti][(MULTBL[si][tex00->alphaValue] + MULTBL[sf][tex01->alphaValue])] + \\\n\t\t\tMULTBL[tf][(MULTBL[si][tex10->alphaValue] + MULTBL[sf][tex11->alphaValue])]);\n\n#else\n\n#define INIT_MULTBL\n\n#define DO_RGB_INTERPOLATION(sf, si, tf, ti) \\\n\ttr = (ti * (si * tex00->redValue + sf * tex01->redValue) +\\\n\t\t\ttf * (si * tex10->redValue + sf * tex11->redValue)) >> 8;\\\n\ttg = (ti * (si * tex00->greenValue + sf * tex01->greenValue) +\\\n\t\t\ttf * (si * tex10->greenValue + sf * tex11->greenValue)) >> 8;\\\n\ttb = (ti * (si * tex00->blueValue + sf * tex01->blueValue) +\\\n\t\t\ttf * (si * tex10->blueValue + sf * tex11->blueValue)) >> 8;\\\n\n#define DO_RGBA_INTERPOLATION(sf, si, tf, ti) \\\n\ttr = (ti * (si * tex00->redValue + sf * tex01->redValue) +\\\n\t\t\ttf * (si * tex10->redValue + sf * tex11->redValue)) >> 8;\\\n\ttg = (ti * (si * tex00->greenValue + sf * tex01->greenValue) +\\\n\t\t\ttf * (si * tex10->greenValue + sf * tex11->greenValue)) >> 8;\\\n\ttb = (ti * (si * tex00->blueValue + sf * tex01->blueValue) +\\\n\t\t\ttf * (si * tex10->blueValue + sf * tex11->blueValue)) >> 8;\\\n\tta = (ti * (si * tex00->alphaValue + sf * tex01->alphaValue) +\\\n\t\t\ttf * (si * tex10->alphaValue + sf * tex11->alphaValue)) >> 8;\n\n#endif /* No MULTBL */\n\n#define INTERPOLATE_RGB_TEXEL(fixedS, fixedT)\\\n{\tint sf, si, tf, ti;\\\n\tsf = (fixedS >> (B3D_FixedToIntShift - 4)) & 15; si = 16 - sf;\\\n\ttf = (fixedT >> (B3D_FixedToIntShift - 4)) & 15; ti = 16 - tf;\\\n\tDO_RGB_INTERPOLATION(sf, si, tf, ti)\\\n}\n\nvoid b3dNoDraw     (int leftX, int rightX, int yValue, B3DPrimitiveFace *face);\nvoid b3dDrawRGB    (int leftX, int rightX, int yValue, B3DPrimitiveFace *face);\nvoid b3dDrawRGBA   (int leftX, int rightX, int yValue, B3DPrimitiveFace *face);\nvoid b3dDrawSTW    (int leftX, int rightX, int yValue, B3DPrimitiveFace *face);\nvoid b3dDrawSTWA   (int leftX, int rightX, int yValue, B3DPrimitiveFace *face);\nvoid b3dDrawSTWRGB (int leftX, int rightX, int yValue, B3DPrimitiveFace *face);\nvoid b3dDrawSTWARGB(int leftX, int rightX, int yValue, B3DPrimitiveFace *face);\n\nb3dPixelDrawer B3D_FILL_FUNCTIONS[B3D_MAX_ATTRIBUTES] = {\n\tb3dNoDraw,      /* No attributes */\n\tb3dDrawRGB,     /* B3D_FACE_RGB */\n\tb3dNoDraw,      /* B3D_FACE_ALPHA -- IGNORED!!! */\n\tb3dDrawRGBA,    /* B3D_FACE_RGB | B3D_FACE_ALPHA */\n\tb3dDrawSTW,     /* B3D_FACE_STW */\n\tb3dDrawSTWRGB,  /* B3D_FACE_STW | B3D_FACE_RGB */\n\tb3dDrawSTWA,    /* B3D_FACE_STW | B3D_FACE_ALPHA */\n\tb3dDrawSTWARGB  /* B3D_FACE_STW | B3D_FACE_RGB | B3D_FACE_ALPHA */\n};\n\nvoid b3dNoDraw(int leftX, int rightX, int yValue, B3DPrimitiveFace *face)\n{\n\tif(b3dDebug)\n\t\tb3dAbort(\"b3dNoDraw called!\");\n}\n\nvoid b3dDrawRGBFlat(int leftX, int rightX, int yValue, B3DPrimitiveFace *face)\n{\n\tstruct b3dPixelColor { B3DPrimitiveColor color; } pv, *bits;\n\tint rValue, gValue, bValue;\n\tint deltaR, deltaG, deltaB;\n\n\n\t{\n\t\tB3DPrimitiveAttribute *attr = face->attributes;\n\t\t/* Ughh ... I'm having a sampling problem somewhere.\n\t\t   In theory, the faces should be sampled *exactly* at integer\n\t\t   values (the necessary offset should be done before) so that\n\t\t   we always sample inside the triangle. For some reason that\n\t\t   doesn't quite work yet and that's why here is the strange\n\t\t   0.5 offset and the awful lot of tests. At some time I'll\n\t\t   review this but for now I have more important things to do.\n\t\t*/\n\t\tdouble floatX = leftX;\n\t\tdouble floatY = yValue+0.5;\n\n\t\tif(b3dDebug)\n\t\t\tif(!attr) b3dAbort(\"face has no RGB attributes\");\n\n\t\tSETUP_RGB;\n\t}\n\n\tbits = (struct b3dPixelColor *) currentState->spanBuffer;\n\tpv.redValue   = (unsigned char) (rValue >> B3D_FixedToIntShift);\n\tpv.greenValue = (unsigned char) (gValue >> B3D_FixedToIntShift);\n\tpv.blueValue  = (unsigned char) (bValue >> B3D_FixedToIntShift);\n\tpv.alphaValue = 255;\n\n\twhile(leftX <= rightX) {\n\t\tbits[leftX++] = pv;\n\t}\n}\n\nvoid b3dDrawRGB(int leftX, int rightX, int yValue, B3DPrimitiveFace *face)\n{\n\tstruct b3dPixelColor { B3DPrimitiveColor color; } pv, *bits;\n\tint rValue, gValue, bValue;\n\tint deltaR, deltaG, deltaB;\n\tint deltaX, pixelShift;\n\n\t{\n\t\tB3DPrimitiveAttribute *attr = face->attributes;\n\t\t/* Ughh ... I'm having a sampling problem somewhere.\n\t\t   In theory, the faces should be sampled *exactly* at integer\n\t\t   values (the necessary offset should be done before) so that\n\t\t   we always sample inside the triangle. For some reason that\n\t\t   doesn't quite work yet and that's why here is the strange\n\t\t   0.5 offset and the awful lot of tests. At some time I'll\n\t\t   review this but for now I have more important things to do.\n\t\t*/\n\t\tdouble floatX = leftX;\n\t\tdouble floatY = yValue+0.5;\n\n\t\tif(b3dDebug)\n\t\t\tif(!attr) b3dAbort(\"face has no RGB attributes\");\n\n\t\tSETUP_RGB;\n\t}\n\n\tbits = (struct b3dPixelColor *) currentState->spanBuffer;\n\tpv.alphaValue = 255;\n\n\t/*\tReduce the overhead of clamping by precomputing \n\t\tthe deltas for each power of two step. A good question here\n\t\tis whether or not it is a good idea to do 2 pixels by this... */\n\tdeltaX = rightX - leftX + 1;\n\n\t/* Now do all the powers of two except the last one pixel */\n\t/* Note: A smart compiler (== gcc) should unroll the following loop */\n\tfor(pixelShift= MAX_PIXEL_SHIFT; pixelShift> 0; pixelShift--) {\n\t\tint nPixels = 1 << pixelShift;\n\t\t/* Note: The 'if' here is possible since \n\t\t   we have dealt with huge polys above */\n\t\twhile(deltaX >= nPixels) {\t\n\t\t\t{\t/* Compute right most values of color interpolation */\n\t\t\t\tint maxR = rValue + (deltaR << pixelShift);\n\t\t\t\tint maxG = gValue + (deltaG << pixelShift);\n\t\t\t\tint maxB = bValue + (deltaB << pixelShift);\n\t\t\t\t/* Clamp those guys */\n\t\t\t\tCLAMP_RGB(maxR, maxG, maxB);\n\t\t\t\t/* And compute the actual delta */\n\t\t\t\tdeltaR = (maxR - rValue) >> pixelShift;\n\t\t\t\tdeltaG = (maxG - gValue) >> pixelShift;\n\t\t\t\tdeltaB = (maxB - bValue) >> pixelShift;\n\t\t\t}\n\t\t\t/* Do the inner loop */\n\t\t\t{\tint n = nPixels;\n\t\t\t\twhile(n--) {\n\t\t\t\t\tpv.redValue   = (unsigned char) (rValue >> B3D_FixedToIntShift);\n\t\t\t\t\tpv.greenValue = (unsigned char) (gValue >> B3D_FixedToIntShift);\n\t\t\t\t\tpv.blueValue  = (unsigned char) (bValue >> B3D_FixedToIntShift);\n\t\t\t\t\tbits[leftX++] = pv;\n\t\t\t\t\trValue += deltaR;\n\t\t\t\t\tgValue += deltaG;\n\t\t\t\t\tbValue += deltaB;\n\t\t\t\t}\n\t\t\t}\n\t\t\t/* Finally, adjust the number of pixels left */\n\t\t\tdeltaX -= nPixels;\n\t\t}\n\t}\n\t/* The last pixel is done separately */\n\tif(deltaX) {\n\t\tpv.redValue   = (unsigned char) (rValue >> B3D_FixedToIntShift);\n\t\tpv.greenValue = (unsigned char) (gValue >> B3D_FixedToIntShift);\n\t\tpv.blueValue  = (unsigned char) (bValue >> B3D_FixedToIntShift);\n\t\tbits[leftX++] = pv;\n\t}\n}\n\nvoid b3dDrawSTWRGB(int leftX, int rightX, int yValue, B3DPrimitiveFace *face)\n{\n\tstruct b3dPixelColor { B3DPrimitiveColor color; } pv, *bits, *tex00, *tex10, *tex01, *tex11;\n\tdouble sValue, tValue, wValue, sDelta, tDelta, wDelta, oneOverW;\n\tint rValue, gValue, bValue;\n\tint deltaR, deltaG, deltaB;\n\tint tr, tg, tb, ta;\n\tint fixedLeftS, fixedRightS, fixedLeftT, fixedRightT, fixedDeltaS, fixedDeltaT;\n\tint deltaX, pixelShift;\n\n\tB3DTexture *texture = face->texture;\n\n\tINIT_MULTBL;\n\n\tif(!texture || 0) {\n\t\t/* If no texture simply draw RGB */\n\t\tb3dDrawRGB(leftX, rightX, yValue, face);\n\t\treturn;\n\t}\n\tif(texture->depth < 16 && (texture->cmSize < (1 << texture->depth)))\n\t\treturn; /* Colormap not installed */\n\n\t{\n\t\tB3DPrimitiveAttribute *attr = face->attributes;\n\t\t/* See above */\n\t\tdouble floatX = leftX;\n\t\tdouble floatY = yValue+0.5;\n\n\t\tif(b3dDebug)\n\t\t\tif(!attr) b3dAbort(\"face has no RGB attributes\");\n\n\t\tSETUP_RGB;\n\t\tSETUP_STW;\n\t}\n\n\ttr = tg = tb = ta = 255;\n\n\tbits = (struct b3dPixelColor *) currentState->spanBuffer;\n\tpv.alphaValue = 255;\n\n\t/*\tVERY Experimental: Reduce the overhead of clamping\n\t\tas well as division by W by precomputing the deltas \n\t\tfor each power of two step */\n\tdeltaX = rightX - leftX + 1;\n\tif(wValue) oneOverW = 1.0 / wValue;\n\telse oneOverW = 0.0;\n\tfixedLeftS = (int) (sValue * oneOverW * (texture->width << B3D_IntToFixedShift));\n\tfixedLeftT = (int) (tValue * oneOverW * (texture->height << B3D_IntToFixedShift));\n\n\tfor(pixelShift = MAX_PIXEL_SHIFT; pixelShift > 0; pixelShift--) {\n\t\tint nPixels = 1 << pixelShift;\n\t\twhile(deltaX >= nPixels) {\n\t\t\t{\t/* Compute right most values of color interpolation */\n\t\t\t\tint maxR = rValue + (deltaR << pixelShift);\n\t\t\t\tint maxG = gValue + (deltaG << pixelShift);\n\t\t\t\tint maxB = bValue + (deltaB << pixelShift);\n\t\t\t\t/* Clamp those guys */\n\t\t\t\tCLAMP_RGB(maxR, maxG, maxB);\n\t\t\t\t/* And compute the actual delta */\n\t\t\t\tdeltaR = (maxR - rValue) >> pixelShift;\n\t\t\t\tdeltaG = (maxG - gValue) >> pixelShift;\n\t\t\t\tdeltaB = (maxB - bValue) >> pixelShift;\n\t\t\t}\n\t\t\t/* Compute the RIGHT s/t values (the left ones are kept from the last loop) */\n\t\t\twValue += wDelta * nPixels;\n\t\t\tsValue += sDelta * nPixels;\n\t\t\ttValue += tDelta * nPixels;\n\t\t\tif(wValue) oneOverW = 1.0 / wValue;\n\t\t\telse oneOverW = 0.0;\n\t\t\tfixedRightS = (int) (sValue * oneOverW * (texture->width << B3D_IntToFixedShift));\n\t\t\tfixedDeltaS = (fixedRightS - fixedLeftS) >> pixelShift;\n\t\t\tfixedRightT = (int) (tValue * oneOverW * (texture->height << B3D_IntToFixedShift));\n\t\t\tfixedDeltaT = (fixedRightT - fixedLeftT) >> pixelShift;\n\t\t\t/* Do the inner loop */\n\t\t\t{\tint n = nPixels;\n\t\t\t\twhile(n--) {\n\t\t\t\t\t/* Do the texture load ... hmm ... there should be a way\n\t\t\t\t\t   to avoid loading the texture on each pixel... \n\t\t\t\t\t   On the other hand, the texture load does not seem\n\t\t\t\t\t   too expensive if compared with the texture interpolation.\n\t\t\t\t\t*/\n\t\t\t\t\tLOAD_4_RGB_TEXEL_32(fixedLeftS, fixedLeftT, texture);\n\t\t\t\t\t/* Do the interpolation based on tex00, tex01, tex10, tex11.\n\t\t\t\t\t   THIS seems to be one of the real bottlenecks here...\n\t\t\t\t\t*/\n\t\t\t\t\tINTERPOLATE_RGB_TEXEL(fixedLeftS, fixedLeftT);\n#if USE_MULTBL\n\t\t\t\t\tpv.redValue   = (unsigned char) (MULTBL[rValue >> (B3D_FixedToIntShift+4)][tr]);\n\t\t\t\t\tpv.greenValue = (unsigned char) (MULTBL[gValue >> (B3D_FixedToIntShift+4)][tg]);\n\t\t\t\t\tpv.blueValue  = (unsigned char) (MULTBL[bValue >> (B3D_FixedToIntShift+4)][tb]);\n#else\n\t\t\t\t\tpv.redValue   = (unsigned char) ((tr * rValue) >> (B3D_FixedToIntShift + 8));\n\t\t\t\t\tpv.greenValue = (unsigned char) ((tg * gValue) >> (B3D_FixedToIntShift + 8));\n\t\t\t\t\tpv.blueValue  = (unsigned char) ((tb * bValue) >> (B3D_FixedToIntShift + 8));\n#endif\n\t\t\t\t\tbits[leftX++] = pv;\n\t\t\t\t\trValue += deltaR;\n\t\t\t\t\tgValue += deltaG;\n\t\t\t\t\tbValue += deltaB;\n\t\t\t\t\tfixedLeftS += fixedDeltaS;\n\t\t\t\t\tfixedLeftT += fixedDeltaT;\n\t\t\t\t}\n\t\t\t}\n\t\t\t/* Finally, adjust the number of pixels left and update s/t */\n\t\t\tdeltaX -= nPixels;\n\t\t\tfixedLeftS = fixedRightS;\n\t\t\tfixedLeftT = fixedRightT;\n\t\t}\n\t}\n\t/* The last pixel is done separately */\n\tif(deltaX) {\n\t\t/* Do the texture load */\n\t\tLOAD_4_RGB_TEXEL_32(fixedLeftS, fixedLeftT, texture);\n\t\t/* Do the interpolation */\n\t\tINTERPOLATE_RGB_TEXEL(fixedLeftS, fixedLeftT);\n#if USE_MULTBL\n\t\tpv.redValue   = (unsigned char) (MULTBL[rValue >> (B3D_FixedToIntShift+4)][tr]);\n\t\tpv.greenValue = (unsigned char) (MULTBL[gValue >> (B3D_FixedToIntShift+4)][tg]);\n\t\tpv.blueValue  = (unsigned char) (MULTBL[bValue >> (B3D_FixedToIntShift+4)][tb]);\n#else\n\t\tpv.redValue   = (unsigned char) ((tr * rValue) >> (B3D_FixedToIntShift + 8));\n\t\tpv.greenValue = (unsigned char) ((tg * gValue) >> (B3D_FixedToIntShift + 8));\n\t\tpv.blueValue  = (unsigned char) ((tb * bValue) >> (B3D_FixedToIntShift + 8));\n#endif\n\t\tbits[leftX++] = pv;\n\t}\n}\n\nvoid b3dDrawSTWARGB(int leftX, int rightX, int yValue, B3DPrimitiveFace *face)\n{\n\t/* not yet implemented */\n}\n\nvoid b3dDrawRGBA(int leftX, int rightX, int yValue, B3DPrimitiveFace *face)\n{\n\t/* not yet implemented */\n}\n\nvoid b3dDrawSTW(int leftX, int rightX, int yValue, B3DPrimitiveFace *face)\n{\n\t/* not yet implemented */\n}\n\nvoid b3dDrawSTWA(int leftX, int rightX, int yValue, B3DPrimitiveFace *face)\n{\n\t/* not yet implemented */\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Squeak3D/b3dInit.c",
    "content": "/****************************************************************************\n*   PROJECT: Balloon 3D Graphics Subsystem for Squeak\n*   FILE:    b3dInit.c\n*   CONTENT: Initialization functions for the B3D rasterizer\n*\n*   AUTHOR:  Andreas Raab (ar)\n*   ADDRESS: Walt Disney Imagineering, Glendale, CA\n*   EMAIL:   andreasr@wdi.disney.com\n*   RCSID:   $Id: b3dInit.c 2 2001-10-24 23:11:49Z rowledge $\n*\n*   NOTES:\n*\n*\n*****************************************************************************/\n#include <string.h>\n#include <stdlib.h>\n#include \"b3d.h\"\n\n#define b3dCompensateWindowPos 1\n\n/* helpers */\n#define rasterPosX rasterPos[0]\n#define rasterPosY rasterPos[1]\n#define rasterPosZ rasterPos[2]\n#define rasterPosW rasterPos[3]\n\n#define windowPosX windowPos[0]\n#define windowPosY windowPos[1]\n\n#define texCoordS texCoord[0]\n#define texCoordT texCoord[1]\n\n/*************************************************************/\n/*************************************************************/\n/*************************************************************/\nint b3dInitializeEdgeAllocator(void* base, int length)\n{\n\tB3DEdgeAllocList *list = (B3DEdgeAllocList*) base;\n\tif(length < sizeof(B3DEdgeAllocList))\n\t\treturn B3D_GENERIC_ERROR;\n\tlist->magic = B3D_EDGE_ALLOC_MAGIC;\n\tlist->This = base;\n\tlist->max = (length - sizeof(B3DEdgeAllocList)) / sizeof(B3DPrimitiveEdge) + 1;\n\tlist->size = 0;\n\tlist->nFree = list->max;\n\tlist->firstFree = NULL;\n\treturn B3D_NO_ERROR;\n}\n\nint b3dInitializeFaceAllocator(void* base, int length)\n{\n\tB3DFaceAllocList *list = (B3DFaceAllocList*) base;\n\tif(length < sizeof(B3DFaceAllocList))\n\t\treturn B3D_GENERIC_ERROR;\n\tlist->magic = B3D_FACE_ALLOC_MAGIC;\n\tlist->This = base;\n\tlist->max = (length - sizeof(B3DFaceAllocList)) / sizeof(B3DPrimitiveFace) + 1;\n\tlist->size = 0;\n\tlist->nFree = list->max;\n\tlist->firstFree = NULL;\n\treturn B3D_NO_ERROR;\n}\n\nint b3dInitializeAttrAllocator(void* base, int length)\n{\n\tB3DAttrAllocList *list = (B3DAttrAllocList*) base;\n\tif(length < sizeof(B3DAttrAllocList))\n\t\treturn B3D_GENERIC_ERROR;\n\tlist->magic = B3D_ATTR_ALLOC_MAGIC;\n\tlist->This = base;\n\tlist->max = (length - sizeof(B3DAttrAllocList)) / sizeof(B3DPrimitiveAttribute) + 1;\n\tlist->size = 0;\n\tlist->nFree = list->max;\n\tlist->firstFree = NULL;\n\treturn B3D_NO_ERROR;\n}\n\nint b3dInitializeEdgeList(void* base, int length)\n{\n\tB3DPrimitiveEdgeList *list = (B3DPrimitiveEdgeList*) base;\n\tif(length < sizeof(B3DPrimitiveEdgeList))\n\t\treturn B3D_GENERIC_ERROR;\n\tlist->magic = B3D_EDGE_LIST_MAGIC;\n\tlist->This = base;\n\tlist->max = (length - sizeof(B3DPrimitiveEdgeList)) / sizeof(B3DPrimitiveEdge*) + 1;\n\tlist->size = 0;\n\treturn B3D_NO_ERROR;\n}\n\nint b3dInitializeAET(void* base, int length)\n{\n\tB3DActiveEdgeTable *aet = (B3DActiveEdgeTable *) base;\n\tif(length < sizeof(B3DActiveEdgeTable))\n\t\treturn B3D_GENERIC_ERROR;\n\taet->magic = B3D_AET_MAGIC;\n\taet->This = base;\n\taet->max = (length - sizeof(B3DActiveEdgeTable)) / sizeof(B3DPrimitiveEdge*) + 1;\n\taet->size = 0;\n\taet->leftEdge = aet->rightEdge = NULL;\n\taet->lastIntersection = &aet->tempEdge0;\n\taet->nextIntersection = &aet->tempEdge1;\n\treturn B3D_NO_ERROR;\n}\n\nint b3dInitializeFillList(void* base, int length)\n{\n\tB3DFillList *list = (B3DFillList*) base;\n\tif(length < sizeof(B3DFillList))\n\t\treturn B3D_GENERIC_ERROR;\n\tlist->magic = B3D_FILL_LIST_MAGIC;\n\tlist->This = base;\n\tlist->firstFace = list->lastFace = NULL;\n\treturn B3D_NO_ERROR;\n}\n\n/*************************************************************/\n/*************************************************************/\n/*************************************************************/\n\n/* b3dMapObjectVertices:\n\t Map all the vertices of the given object into the designated viewport.\n*/\nvoid b3dMapObjectVertices(B3DPrimitiveObject *obj, B3DPrimitiveViewport *vp)\n{\n\tdouble xScale, yScale, xOfs, yOfs;\n\tint minX, minY, maxX, maxY;\n\tdouble minZ, maxZ;\n\tB3DPrimitiveVertex *vtx;\n\tint i;\n\n\txOfs = (vp->x0 + vp->x1) * 0.5 - 0.5;\n\tyOfs = (vp->y0 + vp->y1) * 0.5 - 0.5;\n\txScale = (vp->x1 - vp->x0) * 0.5;\n\tyScale = (vp->y1 - vp->y0) * -0.5;\n\n\tminX = minY = maxX = maxY = 0x7FFFFFFF;\n\tminZ = maxZ = 0.0;\n\tvtx = obj->vertices + 1;\n\tfor(i=1; i < obj->nVertices; i++, vtx++)\n\t{\n\t\tdouble x,y,z,w;\n\t\tint scaledX, scaledY;\n\n\t\tw = vtx->rasterPosW;\n\t\tif(w) w = 1.0 / w;\n\t\tx = vtx->rasterPosX * w * xScale + xOfs;\n\t\ty = vtx->rasterPosY * w * yScale + yOfs;\n\t\tz = vtx->rasterPosZ * w;\n\n\t\tif(!b3dCompensateWindowPos) {\n\t\t\tvtx->rasterPosX = (float)x;\n\t\t\tvtx->rasterPosY = (float)y;\n\t\t}\n\t\tvtx->rasterPosZ = (float)z;\n\t\tvtx->rasterPosW = (float)w;\n\n\t\tscaledX = (int) (x * B3D_FloatToFixed);\n\t\tscaledY = (int) (y * B3D_FloatToFixed);\n\n\t\tvtx->windowPosX = scaledX;\n\t\tvtx->windowPosY = scaledY;\n\t\tif(b3dCompensateWindowPos) {\n\t\t\tvtx->rasterPosX = (float) (scaledX * B3D_FixedToFloat);\n\t\t\tvtx->rasterPosY = (float) (scaledY * B3D_FixedToFloat);\n\t\t}\n\t\t/* Update min/max */\n\t\tif(i == 1) {\n\t\t\tminX = maxX = scaledX;\n\t\t\tminY = maxY = scaledY;\n\t\t\tminZ = maxZ = z;\n\t\t} else {\n\t\t\tif(scaledX < minX) minX = scaledX;\n\t\t\telse if(scaledX > maxX) maxX = scaledX;\n\t\t\tif(scaledY < minY) minY = scaledY;\n\t\t\telse if(scaledY > maxY) maxY = scaledY;\n\t\t\tif(z < minZ) minZ = z;\n\t\t\telse if(z > maxZ) maxZ = z;\n\t\t}\n\n\t}\n\n\tobj->minX = minX >> B3D_FixedToIntShift;\n\tobj->maxX = maxX >> B3D_FixedToIntShift;\n\tobj->minY = minY >> B3D_FixedToIntShift;\n\tobj->maxY = maxY >> B3D_FixedToIntShift;\n\tobj->minZ = (float)minZ;\n\tobj->maxZ = (float)maxZ;\n}\n\n/* b3dSetupVertexOrder:\n     Setup the ordering of the vertices in each face so that\n\t   v0 sorts before v1 sorts before v2.\n\t Gather some stats on how much locally sorted and invalid\n\t faces the object includes.\n*/\n\nvoid b3dSetupVertexOrder(B3DPrimitiveObject *obj)\n{\n\tB3DInputFace *face;\n\tint i, nSorted, nInvalid;\n\tB3DPrimitiveVertex *vtx, *lastTopVtx, *newTopVtx;\n\n\tface = obj->faces;\n\tvtx = obj->vertices;\n\tnSorted = nInvalid = 0;\n\tlastTopVtx = NULL;\n\tfor(i=0;i<obj->nFaces; i++,face++)\n\t{\n\t\tB3DPrimitiveVertex *vtx0, *vtx1, *vtx2;\n\t\tint idx0, idx1, idx2;\n\t\tidx0 = face->i0;\n\t\tidx1 = face->i1;\n\t\tidx2 = face->i2;\n\t\tif(0 == (idx0 && idx1 && idx2)) {\n\t\t\tnInvalid++;\n\t\t\tcontinue;\n\t\t}\n\t\tvtx0 = vtx + idx0;\n\t\tvtx1 = vtx + idx1;\n\t\tvtx2 = vtx + idx2;\n\t\tif(vtxSortsBefore(vtx0,vtx1))\n\t\t{\n\t\t\tif(vtxSortsBefore(vtx1,vtx2)) { \n\t\t\t\tface->i0 = idx0; \n\t\t\t\tface->i1 = idx1; \n\t\t\t\tface->i2 = idx2; \n\t\t\t} else if(vtxSortsBefore(vtx0,vtx2)) {\n\t\t\t\tface->i0 = idx0;\n\t\t\t\tface->i1 = idx2;\n\t\t\t\tface->i2 = idx1;\n\t\t\t} else {\n\t\t\t\tface->i0 = idx2;\n\t\t\t\tface->i1 = idx0;\n\t\t\t\tface->i2 = idx1;\n\t\t\t}\n\t\t} else if(vtxSortsBefore(vtx0, vtx2)) {\n\t\t\tface->i0 = idx1;\n\t\t\tface->i1 = idx0;\n\t\t\tface->i2 = idx2;\n\t\t} else if(vtxSortsBefore(vtx1, vtx2)) {\n\t\t\tface->i0 = idx1;\n\t\t\tface->i1 = idx2;\n\t\t\tface->i2 = idx0;\n\t\t} else {\n\t\t\tface->i0 = idx2;\n\t\t\tface->i1 = idx1;\n\t\t\tface->i2 = idx0;\n\t\t}\n\n\t\tif(b3dDebug) {\n\t\t\tvtx0 = vtx + face->i0;\n\t\t\tvtx1 = vtx + face->i1;\n\t\t\tvtx2 = vtx + face->i2;\n\t\t\tif( !vtxSortsBefore(vtx0, vtx1) || \n\t\t\t\t!vtxSortsBefore(vtx0, vtx2) || \n\t\t\t\t!vtxSortsBefore(vtx1, vtx2))\n\t\t\t\t\tb3dAbort(\"Vertex order problem\");\n\t\t}\n\n\t\t/* Experimental: Try to estimate how many faces are already sorted. */\n\t\tnewTopVtx = vtx + face->i0;\n\t\tif(lastTopVtx)\n\t\t\tif(vtxSortsBefore(lastTopVtx, newTopVtx)) nSorted++;\n\t\tlastTopVtx = newTopVtx;\n\t}\n\n\tobj->nSortedFaces = nSorted;\n\tobj->nInvalidFaces = nInvalid;\n}\n\n\n/*************************************************************/\n/*************************************************************/\n/*************************************************************/\n\ntypedef struct stackEntry {\n\tint i, j;\n} stackEntry;\nstatic stackEntry *stack = NULL;\nstatic int stackPointer = 0;\nstatic int stackSize = 0;\n\n#define PUSH(v1, v2) {\\\n\t\tstack[stackPointer].i = v1;\\\n\t\tstack[stackPointer].j = v2;\\\n\t\tstackPointer++;\\\n\t}\n#define POP(v1, v2) { \\\n\t\tstackPointer--; \\\n\t\tv1 = stack[stackPointer].i; \\\n\t\tv2 = stack[stackPointer].j; \\\n\t}\n\n#define INIT(k) { \\\n\tif(stackSize < (k)) { \\\n\t\tstackSize = k; \\\n\t\tif(stack) free(stack); \\\n\t\tstack = calloc(stackSize, sizeof(stackEntry)); \\\n\t\tif(!stack) { \\\n\t\t\tstackSize = 0; \\\n\t\t\treturn B3D_GENERIC_ERROR; \\\n\t\t}\\\n\t} \\\n\tstackPointer = 0; \\\n}\n\n/* b3dSortInitialFaces:\n     Sort the faces of the given object according to the given sort order.\n\t Note: It is assumed that the vertex order of the faces has been setup\n\t       before.\n*/\nint b3dQuickSortInitialFaces(B3DPrimitiveObject *obj, int i, int j)\n{\n  B3DInputFace tmp, *faces = obj->faces;\n  int ij, k, l, n;\n  B3DPrimitiveVertex *di, *dj, *dij, *tt, *vtx = obj->vertices;\n\n  /* Keep us enough headroom */\n  INIT((j-i)*2);\n  PUSH(i,j);\n  while(stackPointer > 0) {\n    POP(i, j);\n    n = j + 1 - i;\n    if(n <= 1) continue;\n    /* Sort di,dj. */\n    di = vtx + faces[i].i0;\n    dj = vtx + faces[j].i0;\n    if(!vtxSortsBefore(di,dj)) {\n      tmp = faces[i]; faces[i] = faces[j]; faces[j] = tmp;\n      tt = di; di = dj; dj = tt;\n    }\n    \n    if(n <= 2) continue;\n\n    /* More than two elements. */\n    ij = (i+j) >> 1; /* ij is the midpoint of i and j. */\n    dij = vtx + faces[ij].i0;\n    /* Sort di,dij,dj.  Make dij be their median. */\n    if(vtxSortsBefore(di, dij)) {/* i.e. should di precede dij? */\n      if(!vtxSortsBefore(dij, dj)) {/* i.e., should dij precede dj?*/\n\ttmp = faces[j]; faces[j] = faces[ij]; faces[ij] = tmp;\n\tdij = dj;\n      }\n    } else { /* i.e. di should come after dij */\n      tmp = faces[i]; faces[i] = faces[ij]; faces[ij] = tmp;\n      dij = di;\n    }\n\n    if(n <= 3) continue;\n\n    /* More than three elements.\n       Find k>i and l<j such that dk,dij,dl are in reverse order.\n       Swap k and l.  Repeat this procedure until k and l pass each other.*/\n    k = i;\n    l = j;\n    \n    while(k <= l) {\n      while(k <= --l && (vtxSortsBefore(dij, vtx + faces[l].i0)));\n      while(++k <= l && (vtxSortsBefore(vtx + faces[k].i0, dij)));\n      if(k <= l) {\n\ttmp = faces[k];\n\tfaces[k] = faces[l];\n\tfaces[l] = tmp;\n      }\n    }\n    /* Now l<k (either 1 or 2 less), and di through dl are all less than \n       or equal to dk through dj.  Sort those two segments. */\n    PUSH(i, l);\n    PUSH(k, j);\n  }\n  return B3D_NO_ERROR;\n}\n/* b3dQuickSortObjects:\n\tSort the objects in the given range.\n*/\n\nint b3dQuickSortObjects(B3DPrimitiveObject **array, int i, int j)\n{\n  int ij, k, l, n;\n  B3DPrimitiveObject *di, *dj, *dij, *tmp;\n\t\n  /* Keep us enough headroom */\n  INIT((j-i)*2);\n  PUSH(i,j);\n  while(stackPointer > 0) {\n    POP(i, j);\n\n    n = j + 1 - i;\n    if(n <= 1) continue;\n    /* Sort di,dj. */\n    di = array[i];\n    dj = array[j];\n    if(!objSortsBefore(di,dj)) {\n      tmp = array[i]; array[i] = array[j]; array[j] = tmp;\n      tmp = di; di = dj; dj = tmp;\n    }\n\n    if(n <= 2) continue;\n\n    /* More than two elements. */\n    ij = (i+j) >> 1; /* ij is the midpoint of i and j. */\n    dij = array[ij];\n    /* Sort di,dij,dj.  Make dij be their median. */\n    if(objSortsBefore(di, dij)) {/* i.e. should di precede dij? */\n      if(!objSortsBefore(dij, dj)) {/* i.e., should dij precede dj?*/\n\ttmp = array[j]; array[j] = array[ij]; array[ij] = tmp;\n\tdij = dj;\n      }\n    } else { /* i.e. di should come after dij */\n      tmp = array[i]; array[i] = array[ij]; array[ij] = tmp;\n      dij = di;\n    }\n    \n    if(n <= 3) continue;\n\n    /* More than three elements.\n       Find k>i and l<j such that dk,dij,dl are in reverse order.\n       Swap k and l.  Repeat this procedure until k and l pass each other.*/\n    k = i;\n    l = j;\n\n    while(k <= l) {\n      while(k <= --l && (objSortsBefore(dij, array[l])));\n      while(++k <= l && (objSortsBefore(array[k], dij)));\n      if(k <= l) { tmp = array[k]; array[k] = array[l]; array[l] = tmp; }\n    }\n    /* Now l<k (either 1 or 2 less), and di through dl are all less than \n       or equal to dk through dj.  Sort those two segments. */\n    PUSH(i, l);\n    PUSH(k, j);\n  }\n  return B3D_NO_ERROR;\n}\n\n#undef INIT\n#undef PUSH\n#undef POP\n\n/*************************************************************/\n/*************************************************************/\n/*************************************************************/\n\n\nvoid b3dValidateObjectFaces(B3DPrimitiveObject *obj)\n{\n\tint i;\n\tB3DInputFace *face,*nextFace;\n\n\tface = obj->faces;\n\tnextFace = face + 1;\n\tfor(i=1; i < obj->nFaces; i++, face++, nextFace++) {\n\t\tif(!vtxSortsBefore(obj->vertices + face->i0, obj->vertices + nextFace->i0))\n\t\t\tb3dAbort(\"Face sorting problem\");\n\t}\n}\n\n\n#define InitObject(obj, objBase, objFlags, textureIndex) \\\n\tobj = (B3DPrimitiveObject*) objBase; \\\n\tobj->magic = B3D_PRIMITIVE_OBJECT_MAGIC; \\\n\tobj->This = objBase; \\\n\tobj->start = 0; \\\n\tobj->next = NULL; \\\n\tobj->flags = objFlags; \\\n\tobj->textureIndex = textureIndex; \\\n\tobj->texture = NULL;\n\n#define InitVertex(vtx) \\\n\t\t(vtx)->rasterPosX =\t\t\t\t\\\n\t\t(vtx)->rasterPosY =\t\t\t\t\\\n\t\t(vtx)->rasterPosZ =\t\t\t\t\\\n\t\t(vtx)->rasterPosW =\t\t\t\t\\\n\t\t(vtx)->texCoordS  =\t\t\t\t\\\n\t\t(vtx)->texCoordT  = (float) 0.0;\\\n\t\t(vtx)->windowPosX =\t\t\t\t\\\n\t\t(vtx)->windowPosY = 0x7FFFFFFF;\t\\\n\t\t(vtx)->cc.pixelValue32 = 0;\n\n\n/* b3dAddIndexedTriangleObject:\n     Create a new primitive object.\n*/\nint b3dAddIndexedTriangleObject(void *objBase, int objLength, int objFlags, int textureIndex,\n\t\t\t\t\t\t  B3DPrimitiveVertex *vtxPointer, int nVertices,\n\t\t\t\t\t\t  B3DInputFace *facePtr, int nFaces,\n\t\t\t\t\t\t  B3DPrimitiveViewport *vp)\n{\n\tB3DPrimitiveObject *obj;\n\tint sizeNeeded;\n\n\tsizeNeeded = sizeof(B3DPrimitiveObject) + \n\t\t\t\t sizeof(B3DPrimitiveVertex) * (nVertices+1) +\n\t\t\t\t sizeof(B3DInputFace) * nFaces;\n\n\tif(!objBase || objLength < sizeNeeded) \n\t\treturn B3D_GENERIC_ERROR;\n\n\tInitObject(obj, objBase, objFlags, textureIndex);\n\n\t/* copy in the primitive vertices (starting immediately after the prim object) */\n\tobj->nVertices = nVertices+1; /* For one-based indexing leave one more entry */\n\tobj->vertices = (B3DPrimitiveVertex*) (obj + 1);\n\tmemcpy(obj->vertices+1, vtxPointer, nVertices * sizeof(B3DPrimitiveVertex));\n\n\t/* copy in the input faces (starting after the vertices) */\n\tobj->nFaces = nFaces;\n\tobj->faces = (B3DInputFace*) (obj->vertices + obj->nVertices);\n\tmemcpy(obj->faces, facePtr, nFaces * sizeof(B3DInputFace));\n\n\t/* Initialize the first vertex with something useful */\n\tInitVertex(obj->vertices);\n\tb3dMapObjectVertices(obj, vp);\n\tb3dSetupVertexOrder(obj);\n\tif(b3dQuickSortInitialFaces(obj,0,obj->nFaces-1) != B3D_NO_ERROR)\n\t\treturn B3D_GENERIC_ERROR;\n\n\n\tif(b3dDebug)\n\t\tb3dValidateObjectFaces(obj);\n\n\treturn B3D_NO_ERROR;\n}\n\n/* b3dAddIndexedQuadObject:\n     Create a new primitive object.\n*/\nint b3dAddIndexedQuadObject(void *objBase, int objLength, int objFlags, int textureIndex,\n\t\t\t\t\t\t  B3DPrimitiveVertex *vtxPointer, int nVertices,\n\t\t\t\t\t\t  B3DInputQuad *quadPtr, int nQuads,\n\t\t\t\t\t\t  B3DPrimitiveViewport *vp)\n{\n\tB3DPrimitiveObject *obj;\n\tint sizeNeeded;\n\n\tsizeNeeded = sizeof(B3DPrimitiveObject) + \n\t\t\t\t sizeof(B3DPrimitiveVertex) * (nVertices+1) +\n\t\t\t\t sizeof(B3DInputFace) * nQuads * 2;\n\n\tif(!objBase || objLength < sizeNeeded) \n\t\treturn B3D_GENERIC_ERROR;\n\n\tInitObject(obj, objBase, objFlags, textureIndex);\n\n\t/* copy in the primitive vertices (starting immediately after the prim object) */\n\tobj->nVertices = nVertices+1; /* For one-based indexing leave one more entry */\n\tobj->vertices = (B3DPrimitiveVertex*) (obj + 1);\n\tmemcpy(obj->vertices+1, vtxPointer, nVertices * sizeof(B3DPrimitiveVertex));\n\n\t/* copy in the input faces (starting after the vertices) */\n\tobj->nFaces = nQuads * 2;\n\tobj->faces = (B3DInputFace*) (obj->vertices + obj->nVertices);\n\t{\n\t\tint i, nFaces = obj->nFaces;\n\t\tB3DInputQuad *src = quadPtr;\n\t\tB3DInputFace *dst = obj->faces;\n\n\t\tfor(i=0; i < nQuads; i++, src++) {\n\t\t\tdst->i0 = src->i0;\n\t\t\tdst->i1 = src->i1;\n\t\t\tdst->i2 = src->i2;\n\t\t\tdst++;\n\t\t\tdst->i0 = src->i2;\n\t\t\tdst->i1 = src->i3;\n\t\t\tdst->i2 = src->i0;\n\t\t\tdst++;\n\t\t}\n\t}\n\n\t/* Initialize the first vertex with something useful */\n\tInitVertex(obj->vertices);\n\tb3dMapObjectVertices(obj, vp);\n\tb3dSetupVertexOrder(obj);\n\tif(b3dQuickSortInitialFaces(obj,0,obj->nFaces-1) != B3D_NO_ERROR)\n\t\treturn B3D_GENERIC_ERROR;\n\n\tif(b3dDebug)\n\t\tb3dValidateObjectFaces(obj);\n\n\treturn B3D_NO_ERROR;\n}\n\n/* b3dAddPolygonObject:\n     Create a new primitive object.\n*/\nint b3dAddPolygonObject(void *objBase, int objLength, int objFlags, int textureIndex,\n\t\t\t\t\t\t  B3DPrimitiveVertex *vtxPointer, int nVertices,\n\t\t\t\t\t\t  B3DPrimitiveViewport *vp)\n{\n\tB3DPrimitiveObject *obj;\n\tint sizeNeeded;\n\n\tsizeNeeded = sizeof(B3DPrimitiveObject) + \n\t\t\t\t sizeof(B3DPrimitiveVertex) * (nVertices+1) +\n\t\t\t\t sizeof(B3DInputFace) * (nVertices - 2);\n\n\tif(!objBase || objLength < sizeNeeded) \n\t\treturn B3D_GENERIC_ERROR;\n\n\tInitObject(obj, objBase, objFlags, textureIndex);\n\n\t/* copy in the primitive vertices (starting immediately after the prim object) */\n\tobj->nVertices = nVertices+1; /* For one-based indexing leave one more entry */\n\tobj->vertices = (B3DPrimitiveVertex*) (obj + 1);\n\tmemcpy(obj->vertices+1, vtxPointer, nVertices * sizeof(B3DPrimitiveVertex));\n\n\t/* copy in the input faces (starting after the vertices) */\n\tobj->nFaces = nVertices - 2;\n\tobj->faces = (B3DInputFace*) (obj->vertices + obj->nVertices);\n\t{\n\t\tB3DInputFace *dst = obj->faces;\n\t\tint i, nFaces = obj->nFaces;\n\n\t\tfor(i=0; i < nFaces; i++, dst++) {\n\t\t\tdst->i0 = 1;\n\t\t\tdst->i1 = 2+i;\n\t\t\tdst->i2 = 3+i;\n\t\t}\n\t}\n\n\t/* Initialize the first vertex with something useful */\n\tInitVertex(obj->vertices);\n\tb3dMapObjectVertices(obj, vp);\n\tb3dSetupVertexOrder(obj);\n\tif(b3dQuickSortInitialFaces(obj,0,obj->nFaces-1) != B3D_NO_ERROR)\n\t\treturn B3D_GENERIC_ERROR;\n\n\tif(b3dDebug)\n\t\tb3dValidateObjectFaces(obj);\n\n\treturn B3D_NO_ERROR;\n}\n\n/*************************************************************/\n/*************************************************************/\n/*************************************************************/\n\nint b3dLoadTexture(B3DTexture *texture,\n\t\t\t\t   int width, int height, int depth, unsigned int *bits,\n\t\t\t\t   int cmSize, unsigned int *colormap)\n{\tint nBits;\n\n\tif(width < 1 || height < 1) return B3D_GENERIC_ERROR;\n\tif(depth != 32) return B3D_GENERIC_ERROR;\n\tif(depth != 8  && depth != 16 && depth != 32) return B3D_GENERIC_ERROR;\n\tif(depth == 8 && cmSize < 256) return B3D_GENERIC_ERROR;\n\ttexture->width = width;\n\ttexture->height = height;\n\ttexture->depth = depth;\n\ttexture->data = bits;\n\ttexture->cmSize = cmSize;\n\ttexture->colormap = colormap;\n\ttexture->rowLength = width;\n\tnBits = 1;\n\twhile((1 << nBits) < width) nBits++;\n\tif((1<<nBits) == width) {\n\t\ttexture->sMask = (1<<nBits) - 1;\n\t\ttexture->sShift = nBits;\n\t} else {\n\t\ttexture->sMask = texture->sShift = 0;\n\t}\n\twhile((1 << nBits) < height) nBits++;\n\tif((1<<nBits) == height) {\n\t\ttexture->tMask = (1<<nBits) - 1;\n\t\ttexture->tShift = nBits;\n\t} else {\n\t\ttexture->tMask = texture->tShift = 0;\n\t}\n\treturn B3D_NO_ERROR;\n}\n/*************************************************************/\n/*************************************************************/\n/*************************************************************/\n/* b3dSetupObjects:\n\tSort the objects and create a linked list between the objects.\n*/\nint b3dSetupObjects(B3DRasterizerState *state)\n{\n\tint i, textureIndex, nTextures = state->nTextures, nObjects = state->nObjects;\n\tB3DPrimitiveObject *obj, **objects = state->objects;\n\tB3DTexture *textures = state->textures;\n\n\tif(b3dQuickSortObjects(objects, 0, nObjects-1) != B3D_NO_ERROR)\n\t\treturn B3D_GENERIC_ERROR;\n\n\tfor(i=0; i<nObjects; i++) {\n\n\t\tif(b3dDebug && i) {\n\t\t\tif(!objSortsBefore(objects[i-1], objects[i]))\n\t\t\t\tb3dAbort(\"Object sorting problem\");\n\t\t}\n\n\t\tobj = objects[i];\n\t\tobj->flags &= ~(B3D_OBJECT_ACTIVE | B3D_OBJECT_DONE);\n\t\tobj->start = 0;\n\t\t/*-- Note: The following is important --*/\n\t\tobj->nFaces -= obj->nInvalidFaces;\n\t\tobj->nInvalidFaces = 0;\n\t\tif(!obj->nFaces) break;\n\t\t/*-- End --*/\n\t\ttextureIndex = obj->textureIndex - 1;\n\t\tif(textureIndex >= 0 && textureIndex < nTextures) {\n\t\t\tobj->texture = textures + textureIndex;\n\t\t\tobj->flags |= B3D_FACE_STW;\n\t\t} else obj->texture = NULL;\n\t\tobj->next = NULL;\n\t\tif(i) {\n\t\t\tobjects[i-1]->next = obj;\n\t\t\tobj->prev = objects[i-1];\n\t\t}\n\t}\n\treturn B3D_NO_ERROR;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Squeak3D/b3dMain.c",
    "content": "/****************************************************************************\n*   PROJECT: Balloon 3D Graphics Subsystem for Squeak\n*   FILE:    b3dMain.c\n*   CONTENT: Main rasterizer body\n*\n*   AUTHOR:  Andreas Raab (ar)\n*   ADDRESS: Walt Disney Imagineering, Glendale, CA\n*   EMAIL:   andreasr@wdi.disney.com\n*   RCSID:   $Id: b3dMain.c 2 2001-10-24 23:11:49Z rowledge $\n*\n*   NOTES:\n*\n*\n*****************************************************************************/\n#include <stdio.h>  /* printf() */\n#include <stdlib.h> /* exit()   */\n#include <assert.h> /* assert() */\n#include \"b3d.h\"\n\n#ifndef NULL\n#define NULL ((void*)0)\n#endif\n\n#ifdef B3D_PROFILE\nunsigned int b3dObjSetupTime;\nunsigned int b3dMapObjectTime;\nunsigned int b3dVertexOrderTime;\nunsigned int b3dSortFaceTime;\n#endif\n\n/* helpers */\n#define rasterPosX rasterPos[0]\n#define rasterPosY rasterPos[1]\n#define rasterPosZ rasterPos[2]\n#define rasterPosW rasterPos[3]\n\n#define windowPosX windowPos[0]\n#define windowPosY windowPos[1]\n\n#define texCoordS texCoord[0]\n#define texCoordT texCoord[1]\n\n#define redValue   cc.color[RED_INDEX]\n#define greenValue cc.color[GREEN_INDEX]\n#define blueValue  cc.color[BLUE_INDEX]\n#define alphaValue cc.color[ALPHA_INDEX]\n\n/* globals */\nB3DRasterizerState *currentState;\n\nB3DActiveEdgeTable *aet;\nB3DPrimitiveEdgeList *addedEdges;\n\nB3DEdgeAllocList *edgeAlloc;\nB3DFaceAllocList *faceAlloc;\nB3DAttrAllocList *attrAlloc;\n\nint nFaces = 0;\nint maxFaces = 0;\nint maxEdges = 0;\n/*************************************************************/\n/*************************************************************/\n/*************************************************************/\n\nvoid b3dAbort(char *msg){\n\tprintf(msg);\n\texit(-1);\n}\n\nvoid b3dValidateEdgeOrder(B3DPrimitiveEdgeList *list)\n{\n\tint i;\n\n\tif(list->size)\n\t\tif(list->data[0]->leftFace == list->data[0]->rightFace) {\n\t\t\tb3dAbort(\"Left face == right face\");\n\t\t}\n\tfor(i=1; i<list->size; i++) {\n\t\tif(list->data[i-1]->xValue > list->data[i]->xValue) {\n\t\t\tb3dAbort(\"Edge list is broken\");\n\t\t}\n\t\tif(list->data[i]->leftFace == list->data[i]->rightFace) {\n\t\t\tb3dAbort(\"Left face == right face\");\n\t\t}\n\t}\n}\n\nvoid b3dValidateAETOrder(B3DActiveEdgeTable *list)\n{\n\tint i;\n\n\tif(list->size)\n\t\tif(list->data[0]->leftFace == list->data[0]->rightFace) {\n\t\t\tb3dAbort(\"Left face == right face\");\n\t\t}\n\tfor(i=1; i<list->size; i++) {\n\t\tif(list->data[i-1]->xValue > list->data[i]->xValue) {\n\t\t\tb3dAbort(\"Edge list is broken\");\n\t\t}\n\t\tif(list->data[i]->leftFace == list->data[i]->rightFace) {\n\t\t\tb3dAbort(\"Left face == right face\");\n\t\t}\n\t}\n}\n\n/*************************************************************/\n/*************************************************************/\n/*************************************************************/\n/* b3dInitializeFace:\n\tAllocate a new primitive face based on the given vertices.\n\tDo the necessary initial setup, but don't set up any drawing attributes yet.\n\tReturn the newly created face.\n\tNOTE: May cause allocation of one face!\n*/\nB3DPrimitiveFace *b3dInitializeFace(B3DPrimitiveVertex *v0,\n\t\t\t\t\t\t\t\t\tB3DPrimitiveVertex *v1,\n\t\t\t\t\t\t\t\t\tB3DPrimitiveVertex *v2,\n\t\t\t\t\t\t\t\t\tB3DTexture *texture, \n\t\t\t\t\t\t\t\t\tint attrFlags)\n{\n\tB3DPrimitiveFace *face;\n\n\t/* Compute major and minor reference edges */\n\t{\n\t\tfloat majorDx = v2->rasterPosX - v0->rasterPosX;\n\t\tfloat majorDy = v2->rasterPosY - v0->rasterPosY;\n\t\tfloat minorDx = v1->rasterPosX - v0->rasterPosX;\n\t\tfloat minorDy = v1->rasterPosY - v0->rasterPosY;\n\t\tfloat area = (majorDx * minorDy) - (minorDx * majorDy);\n\n\t\tif(area > -0.001 && area < 0.001) return NULL;\n\t\t/* Now that we know the face is valid, do the actual allocation */\n\t\tb3dAllocFace(faceAlloc, face);\n\n\t\tif(b3dDebug)\n\t\t\tif(!face) b3dAbort(\"Face allocation failed\");\n\n\t\tface->v0 = v0;\n\t\tface->v1 = v1;\n\t\tface->v2 = v2;\n\t\tface->leftEdge = NULL;\n\t\tface->rightEdge = NULL;\n\t\tface->attributes = NULL;\n\t\tface->oneOverArea = (float) (1.0 / area);\n\t\tface->majorDx = majorDx;\n\t\tface->majorDy = majorDy;\n\t\tface->minorDx = minorDx;\n\t\tface->minorDy = minorDy;\n\t\tface->texture = texture;\n\t\tface->flags |= attrFlags & (B3D_ATTR_MASK << B3D_ATTR_SHIFT);\n\n\t\t{ /* Compute dzdx and dzdy */\n\t\t\tfloat majorDz = v2->rasterPosZ - v0->rasterPosZ;\n\t\t\tfloat minorDz = v1->rasterPosZ - v0->rasterPosZ;\n\n\t\t\tface->dzdx = face->oneOverArea * ((majorDz * minorDy) - (minorDz * majorDy));\n\t\t\tface->dzdy = face->oneOverArea * ((majorDx * minorDz) - (minorDx * majorDz));\n\t\t}\n\t}\n\n\t{/* Compute minZ/maxZ */\n\t\tfloat z0 = v0->rasterPosZ;\n\t\tfloat z1 = v1->rasterPosZ;\n\t\tfloat z2 = v2->rasterPosZ;\n\t\tif(z0 <= z1) {\n\t\t\tif(z1 <= z2) {\n\t\t\t\tface->minZ = z0;\n\t\t\t\tface->maxZ = z2;\n\t\t\t} else if(z0 <= z2) {\n\t\t\t\tface->minZ = z0;\n\t\t\t\tface->maxZ = z1;\n\t\t\t} else {\n\t\t\t\tface->minZ = z2;\n\t\t\t\tface->maxZ = z1;\n\t\t\t}\n\t\t} else if(z2 <= z1) {\n\t\t\tface->minZ = z2;\n\t\t\tface->maxZ = z0;\n\t\t} else if(z0 <= z2) {\n\t\t\tface->minZ = z1;\n\t\t\tface->maxZ = z0;\n\t\t} else {\n\t\t\tface->minZ = z1;\n\t\t\tface->maxZ = z0;\n\t\t}\n\t} /* End of minZ/maxZ */\n\n\treturn face;\n}\n\n/* b3dInitializePass2:\n\tDo a second initialization pass if the face is known to be visible.\n*/\nint b3dInitializePass2(B3DPrimitiveFace *face)\n{\n\tdouble majorDv, minorDv, baseValue;\n\tdouble dvdx, dvdy;\n\tB3DPrimitiveAttribute *attr;\n\tB3DPrimitiveVertex *v0 = face->v0;\n\tB3DPrimitiveVertex *v1 = face->v1;\n\tB3DPrimitiveVertex *v2 = face->v2;\n\n\t{\n\t\tint ok;\n\t\tb3dAllocAttrib(attrAlloc, face, ok);\n\t\tif(!ok) return 0; /* NOT initalized */\n\t}\n\n\tattr = face->attributes;\n\tassert(attr);\n\t\n\tif(face->flags & B3D_FACE_RGB) {\n\t\t/* Setup RGB interpolation */\n\t\tmajorDv = v2->redValue - v0->redValue;\n\t\tminorDv = v1->redValue - v0->redValue;\n\t\tdvdx = face->oneOverArea * ((majorDv * face->minorDy) - (minorDv * face->majorDy));\n\t\tdvdy = face->oneOverArea * ((minorDv * face->majorDx) - (majorDv * face->minorDx));\n\t\tattr->value = (float) v0->redValue;\n\t\tattr->dvdx  = (float) dvdx;\n\t\tattr->dvdy  = (float) dvdy;\n\t\tattr = attr->next;\n\n\t\tmajorDv = v2->greenValue - v0->greenValue;\n\t\tminorDv = v1->greenValue - v0->greenValue;\n\t\tdvdx = face->oneOverArea * ((majorDv * face->minorDy) - (minorDv * face->majorDy));\n\t\tdvdy = face->oneOverArea * ((minorDv * face->majorDx) - (majorDv * face->minorDx));\n\t\tattr->value = (float) v0->greenValue;\n\t\tattr->dvdx  = (float) dvdx;\n\t\tattr->dvdy  = (float) dvdy;\n\t\tattr = attr->next;\n\n\t\tmajorDv = v2->blueValue - v0->blueValue;\n\t\tminorDv = v1->blueValue - v0->blueValue;\n\t\tdvdx = face->oneOverArea * ((majorDv * face->minorDy) - (minorDv * face->majorDy));\n\t\tdvdy = face->oneOverArea * ((minorDv * face->majorDx) - (majorDv * face->minorDx));\n\t\tattr->value = (float) v0->blueValue;\n\t\tattr->dvdx  = (float) dvdx;\n\t\tattr->dvdy  = (float) dvdy;\n\t\tattr = attr->next;\n\t}\n\tif(face->flags & B3D_FACE_ALPHA) {\n\t\t/* Setup alpha interpolation */\n\t\tmajorDv = v2->alphaValue - v0->alphaValue;\n\t\tminorDv = v1->alphaValue - v0->alphaValue;\n\t\tdvdx = face->oneOverArea * ((majorDv * face->minorDy) - (minorDv * face->majorDy));\n\t\tdvdy = face->oneOverArea * ((minorDv * face->majorDx) - (majorDv * face->minorDx));\n\t\tattr->value = (float) v0->alphaValue;\n\t\tattr->dvdx  = (float) dvdx;\n\t\tattr->dvdy  = (float) dvdy;\n\t\tattr = attr->next;\n\t}\n\tif(face->flags & B3D_FACE_STW) {\n\t\t/* Setup texture coordinate interpolation */\n\t\tdouble w0 = v0->rasterPosW;\n\t\tdouble w1 = v1->rasterPosW;\n\t\tdouble w2 = v2->rasterPosW;\n\n\t\tmajorDv = w2 - w0;\n\t\tminorDv = w1 - w0;\n\t\tdvdx = face->oneOverArea * ((majorDv * face->minorDy) - (minorDv * face->majorDy));\n\t\tdvdy = face->oneOverArea * ((minorDv * face->majorDx) - (majorDv * face->minorDx));\n\t\tattr->value = (float) w0;\n\t\tattr->dvdx  = (float) dvdx;\n\t\tattr->dvdy  = (float) dvdy;\n\t\tattr = attr->next;\n\n\t\tbaseValue = v0->texCoordS * w0;\n\t\tmajorDv = (v2->texCoordS * w2) - baseValue;\n\t\tminorDv = (v1->texCoordS * w1) - baseValue;\n\t\tdvdx = face->oneOverArea * ((majorDv * face->minorDy) - (minorDv * face->majorDy));\n\t\tdvdy = face->oneOverArea * ((minorDv * face->majorDx) - (majorDv * face->minorDx));\n\t\tattr->value = (float) baseValue;\n\t\tattr->dvdx  = (float) dvdx;\n\t\tattr->dvdy  = (float) dvdy;\n\t\tattr = attr->next;\n\n\t\tbaseValue = v0->texCoordT * w0;\n\t\tmajorDv = (v2->texCoordT * w2) - baseValue;\n\t\tminorDv = (v1->texCoordT * w1) - baseValue;\n\t\tdvdx = face->oneOverArea * ((majorDv * face->minorDy) - (minorDv * face->majorDy));\n\t\tdvdy = face->oneOverArea * ((minorDv * face->majorDx) - (majorDv * face->minorDx));\n\t\tattr->value = (float) baseValue;\n\t\tattr->dvdx  = (float) dvdx;\n\t\tattr->dvdy  = (float) dvdy;\n\t\tattr = attr->next;\n\t}\n\tface->flags |= B3D_FACE_INITIALIZED;\n\treturn 1;\n}\n\n/* b3dInitializeEdge:\n\tInitialize the incremental values of the given edge.\n*/\n/* INLINE b3dInitializeEdge(edge) */\nvoid b3dInitializeEdge(B3DPrimitiveEdge *edge)\n{\n\tassert(edge);\n\tassert(edge->nLines);\n\tedge->xValue = edge->v0->windowPosX;\n\tedge->zValue = edge->v0->rasterPosZ;\n\tif(edge->nLines > 1) {\n\t\tedge->xIncrement = (edge->v1->windowPosX - edge->v0->windowPosX) / edge->nLines;\n\t\tedge->zIncrement = (edge->v1->rasterPosZ - edge->v0->rasterPosZ) / (float) edge->nLines;\n\t} else {\n\t\tedge->xIncrement = (edge->v1->windowPosX - edge->v0->windowPosX);\n\t\tedge->zIncrement = (edge->v1->rasterPosZ - edge->v0->rasterPosZ);\n\t}\n}\n/* --INLINE-- */\n\n\n/*************************************************************/\n/*************************************************************/\n/*************************************************************/\n\n/* b3dFirstIndexForInserting:\n\tReturn the first possible index for inserting an edge with the given x value.\n*/\n\nint b3dFirstIndexForInserting(B3DPrimitiveEdgeList *list, int xValue)\n{\n\tint low, high, index;\n\tlow = 0;\n\thigh = list->size-1;\n\twhile(low <= high) {\n\t\tindex = (low + high) >> 1;\n\t\tif(list->data[index]->xValue <= xValue)\n\t\t\tlow = index+1;\n\t\telse\n\t\t\thigh = index-1;\n\t}\n\tindex = low;\n\twhile(index > 0 && (list->data[index-1]->xValue) == xValue)\n\t\tindex--;\n\treturn index;\n}\n\n/* b3dAddEdgeBeforeIndex:\n\tInsert the edge to the list before the given index.\n*/\n/* INLINE b3dAddEdgeBeforeIndex(list, edge, index) */\nvoid b3dAddEdgeBeforeIndex(B3DPrimitiveEdgeList *list, B3DPrimitiveEdge *edge, int index)\n{\n\tint i;\n\n\tif(b3dDebug)\n\t\tif(list->size == list->max)\n\t\t\tb3dAbort(\"No more space for adding edges\");\n\n\tassert( (list->size == index) || (list->data[index]->xValue >= edge->xValue));\n\tfor(i=list->size-1; i >= index; i--)\n\t\tlist->data[i+1] = list->data[i];\n\tlist->data[index] = edge;\n\tlist->size++;\n}\n/* --INLINE-- */\n\n/* b3d2AddEdgesBeforeIndex:\n\tInsert the two edge to the list before the given index.\n*/\n/* INLINE b3dAdd2EdgesBeforeIndex(list, edge1, edge2, index) */\nvoid b3dAdd2EdgesBeforeIndex(B3DPrimitiveEdgeList *list, \n\t\t\t\t\t\t\t B3DPrimitiveEdge *edge1, \n\t\t\t\t\t\t\t B3DPrimitiveEdge *edge2, \n\t\t\t\t\t\t\t int index)\n{\n\tint i;\n\n\tif(b3dDebug)\n\t\tif(list->size+1 >= list->max)\n\t\t\tb3dAbort(\"No more space for adding edges\");\n\n\tassert( edge1->xValue == edge2->xValue);\n\tassert( (list->size == index) || (list->data[index]->xValue >= edge1->xValue));\n\n\tfor(i=list->size-1; i >= index; i--)\n\t\tlist->data[i+2] = list->data[i];\n\tlist->data[index] = edge1;\n\tlist->data[index+1] = edge2;\n\tlist->size += 2;\n}\n/* --INLINE-- */\n\n/* b3dAdjustFaceEdges:\n\tAssign left and right edges to the given face.\n*/\n/* INLINE b3dAdjustFaceEdges(face, edge1, edge2) */\nvoid b3dAdjustFaceEdges(B3DPrimitiveFace *face, B3DPrimitiveEdge *edge1, B3DPrimitiveEdge *edge2)\n{\n\tassert(face);\n\tassert(edge1);\n\tassert(edge2);\n\tif(edge1->xValue == edge2->xValue) {\n\t\tif(edge1->xIncrement <= edge2->xIncrement) {\n\t\t\tface->leftEdge = edge1;\n\t\t\tface->rightEdge = edge2;\n\t\t} else {\n\t\t\tface->leftEdge = edge2;\n\t\t\tface->rightEdge = edge1;\n\t\t}\n\t} else {\n\t\tif(edge1->xValue <= edge2->xValue) {\n\t\t\tface->leftEdge = edge1;\n\t\t\tface->rightEdge = edge2;\n\t\t} else {\n\t\t\tface->leftEdge = edge2;\n\t\t\tface->rightEdge = edge1;\n\t\t}\n\t}\n}\n/* --INLINE-- */\n\n/* b3dAddLowerEdgeFromFace:\n\tAdd a new lower edge from the given face.\n\tNOTE: oldEdge may be NULL!\n\tNOTE: May cause allocation of one edge!\n*/\nB3DPrimitiveEdge *b3dAddLowerEdgeFromFace(B3DPrimitiveFace *face, B3DPrimitiveEdge *oldEdge)\n{\n\tB3DPrimitiveVertex *v0 = face->v0;\n\tB3DPrimitiveVertex *v1 = face->v1;\n\tB3DPrimitiveVertex *v2 = face->v2;\n\tint xValue = v1->windowPosX;\n\tint index;\n\n\t/* Search the list of added edges to merge the edges from the face */\n\tindex = b3dFirstIndexForInserting(addedEdges, xValue);\n\tfor(;index<addedEdges->size; index++) {\n\t\tB3DPrimitiveEdge *edge = addedEdges->data[index];\n\t\tif(edge->xValue != xValue) break;\n\t\tif(edge->rightFace) continue;\n\t\tif((edge->v0 == v1 && edge->v1 == v2) || /* The simple test*/\n\t\t\t/* The complex test */\n\t\t\t(edge->v0->windowPosX == v1->windowPosX &&\n\t\t\t edge->v0->windowPosY == v1->windowPosY &&\n\t\t\t edge->v0->rasterPosZ == v1->rasterPosZ &&\n\t\t\t edge->v1->windowPosX == v2->windowPosX &&\n\t\t\t edge->v1->windowPosY == v2->windowPosY &&\n\t\t\t edge->v1->rasterPosZ == v2->rasterPosZ)) {\n\t\t\t/* Found the edge */\n\t\t\tif(face->leftEdge == oldEdge)\n\t\t\t\tface->leftEdge = edge;\n\t\t\telse\n\t\t\t\tface->rightEdge = edge;\n\t\t\tedge->rightFace = face;\n\t\t\treturn edge;\n\t\t}\n\t}\n\t/* Need to create a new edge.\n\t   NOTE: Index already points to the right insertion point.\n\t*/\n\t{\n\t\tB3DPrimitiveEdge *minorEdge;\n\t\tint nLines = (v2->windowPosY >> B3D_FixedToIntShift) - (v1->windowPosY >> B3D_FixedToIntShift);\n\t\tif(!nLines) return NULL; /* Edge is horizontal */\n\t\tb3dAllocEdge(edgeAlloc, minorEdge);\n\n\t\tif(b3dDebug)\n\t\t\tif(!minorEdge)\n\t\t\t\tb3dAbort(\"Edge allocation failed\");\n\n\t\tminorEdge->v0 = v1;\n\t\tminorEdge->v1 = v2;\n\t\tminorEdge->nLines = nLines;\n\t\tminorEdge->leftFace = face;\n\t\tminorEdge->rightFace = NULL;\n\t\tif(face->leftEdge == oldEdge)\n\t\t\tface->leftEdge = minorEdge;\n\t\telse\n\t\t\tface->rightEdge = minorEdge;\n\t\tb3dInitializeEdge(minorEdge);\n\t\tb3dAddEdgeBeforeIndex(addedEdges, minorEdge, index);\n\t\treturn minorEdge;\n\t}\n\t/* NOT REACHED */\n}\n\n/* b3dAddEdgesFromFace:\n\tAdd the two new edges from the given primitive face.\n\tNOTE: May cause allocation of two edges (but not three)!\n*/\nvoid b3dAddEdgesFromFace(B3DPrimitiveFace *face, int yValue)\n{\n\tint needMajor = 1;\n\tint needMinor = 1;\n\tB3DPrimitiveEdge *majorEdge = NULL;\n\tB3DPrimitiveEdge *minorEdge = NULL;\n\tB3DPrimitiveVertex *v0 = face->v0;\n\tB3DPrimitiveVertex *v1 = face->v1;\n\tB3DPrimitiveVertex *v2 = face->v2;\n\tint xValue = v0->windowPosX;\n\tint index;\n\n\t/* Search the list of added edges to merge the edges from the face */\n\tindex = b3dFirstIndexForInserting(addedEdges, xValue);\n\tfor(;index<addedEdges->size; index++) {\n\t\tB3DPrimitiveEdge *edge = addedEdges->data[index];\n\t\tif(edge->xValue != xValue) break;\n\t\tif(edge->rightFace) continue;\n\t\tif(edge->v0 != v0 &&\n\t\t\t(edge->v0->windowPosY != v0->windowPosY ||\n\t\t\t edge->v0->rasterPosZ != v0->rasterPosZ)) continue;\n\t\t/* If we come to this point the edge might be usable for merging the face */\n\t\tif(needMajor && /* Test only if major edge is needed */\n\t\t\t(edge->v1 == v2 || /* Simple test */\n\t\t\t/* A more complex test */\n\t\t\t(edge->v1->windowPosX == v2->windowPosX &&\n\t\t\t edge->v1->windowPosY == v2->windowPosY &&\n\t\t\t edge->v1->rasterPosZ == v2->rasterPosZ))) {\n\t\t\t/* Yepp. That's the new major */\n\t\t\tmajorEdge = edge;\n\t\t\tmajorEdge->rightFace = face;\n\t\t\tmajorEdge->flags  |= B3D_EDGE_RIGHT_MAJOR;\n\t\t\t\n\t\t\tif(b3dDoStats) nFaces++;\n\n\t\t\tif(!needMinor) {\n\t\t\t\tb3dAdjustFaceEdges(face, majorEdge, minorEdge);\n\t\t\t\treturn; /* done */\n\t\t\t}\n\t\t\tneedMajor = 0;\n\t\t} else if(needMinor && /* Test only if minor edge is needed */\n\t\t\t(edge->v1 == v1 || /* Simple test */\n\t\t\t/* A more complex test */\n\t\t\t(edge->v1->windowPosX == v1->windowPosX &&\n\t\t\t edge->v1->windowPosY == v1->windowPosY &&\n\t\t\t edge->v1->rasterPosZ == v1->rasterPosZ))) {\n\t\t\t/* Yepp. That's the new minor */\n\t\t\tminorEdge = edge;\n\t\t\tminorEdge->rightFace = face;\n\t\t\tminorEdge->flags |= B3D_EDGE_CONTINUE_RIGHT;\n\t\t\tif(!needMajor) {\n\t\t\t\tb3dAdjustFaceEdges(face, majorEdge, minorEdge);\n\t\t\t\treturn; /* done */\n\t\t\t}\n\t\t\tneedMinor = 0;\n\t\t}\n\t}\n\t/*  Need to create new edges.\n\t\tNote: index already points to the right insertion point in addedEdges \n\t*/\n\tif(needMajor) {\n\t\tint nLines = (v2->windowPosY >> B3D_FixedToIntShift) - (v0->windowPosY >> B3D_FixedToIntShift);\n\n\t\tif(!nLines) {\n\t\t\t/* The major edge is horizontal. */\n\t\t\tb3dFreeFace(faceAlloc, face);\n\t\t\treturn;\n\t\t}\n\t\tb3dAllocEdge(edgeAlloc, majorEdge);\n\t\tif(b3dDebug)\n\t\t\tif(!majorEdge) b3dAbort(\"Edge allocation failed\");\n\t\tmajorEdge->v0 = v0;\n\t\tmajorEdge->v1 = v2;\n\t\tmajorEdge->nLines = nLines;\n\t\tmajorEdge->leftFace = face;\n\t\tmajorEdge->rightFace = NULL;\n\t\tmajorEdge->flags  |= B3D_EDGE_LEFT_MAJOR;\n\t\tb3dInitializeEdge(majorEdge);\n\t\tif(b3dDoStats) nFaces++;\n\t}\n\n\tif(needMinor) {\n\t\tint nLines = (v1->windowPosY >> B3D_FixedToIntShift) - (v0->windowPosY >> B3D_FixedToIntShift);\n\n\t\tif(!nLines) {\n\t\t\t/* Note: If the (upper) minor edge is horizontal, use the lower one.\n\t\t\t   Note: The lower edge cannot be horizontal if the major edge isn't\n\t\t\t*/\n\t\t\tif(needMajor) {\n\t\t\t\tb3dAddEdgeBeforeIndex(addedEdges, majorEdge, index);\n\t\t\t}\n\t\t\tminorEdge = b3dAddLowerEdgeFromFace(face,NULL);\n\n\t\t\tif(b3dDebug)\n\t\t\t\tif(!minorEdge || minorEdge->nLines == 0)\n\t\t\t\t\tb3dAbort(\"minor edge is horizontal\");\n\n\t\t\tb3dAdjustFaceEdges(face, majorEdge, minorEdge);\n\t\t\treturn;\n\t\t}\n\n\t\tb3dAllocEdge(edgeAlloc, minorEdge);\n\n\t\tif(b3dDebug)\n\t\t\tif(!minorEdge) b3dAbort(\"Edge allocation failed\");\n\n\t\tminorEdge->v0 = v0;\n\t\tminorEdge->v1 = v1;\n\t\tminorEdge->nLines = nLines;\n\t\tminorEdge->leftFace = face;\n\t\tminorEdge->rightFace = NULL;\n\t\tminorEdge->flags  |= B3D_EDGE_CONTINUE_LEFT;\n\t\tb3dInitializeEdge(minorEdge);\n\t}\n\n\t/* Add the newly created edges to addedEdges */\n\tif(needMinor && needMajor) {\n\t\tb3dAdd2EdgesBeforeIndex(addedEdges, majorEdge, minorEdge, index);\n\t} else if(needMajor) {\n\t\tb3dAddEdgeBeforeIndex(addedEdges, majorEdge, index);\n\t} else {\n\t\tb3dAddEdgeBeforeIndex(addedEdges, minorEdge, index);\n\t}\n\tb3dAdjustFaceEdges(face, majorEdge, minorEdge);\n}\n\n\n/* b3dRemoveAETEdge:\n\tRemove the given edge from the AET.\n\tNOTE: May cause allocation of two edges!\n*/\n/* INLINE b3dRemoveAETEdge(aet, edge, yValue, aetPos) */\nvoid b3dRemoveAETEdge(B3DActiveEdgeTable *aet, B3DPrimitiveEdge *edge, int yValue, int aetPos)\n{\n\t/* Remove edge and add lower edges if necessary */\n\tint j;\n\tB3DPrimitiveEdge **aetData = aet->data;\n\n\tassert(aetData[aetPos] == edge);\n\n\tif(b3dDebug)\n\t\tif( (edge->v1->windowPosY >> B3D_FixedToIntShift) != yValue )\n\t\t\tb3dAbort(\"Edge exceeds range\");\n\n\t/* Remove the edge and adjust the stuff */\n\tfor(j=aetPos+1; j < aet->size; j++) aetData[j-1] = aetData[j];\n\taet->size--;\n\t/* Add new lower edges */\n\tif(edge->flags & B3D_EDGE_CONTINUE_LEFT) {\n\t\tb3dAddLowerEdgeFromFace(edge->leftFace, edge);\n\t}\n\tif(edge->flags & B3D_EDGE_CONTINUE_RIGHT) {\n\t\tb3dAddLowerEdgeFromFace(edge->rightFace, edge);\n\t}\n\tif(edge->flags & B3D_EDGE_LEFT_MAJOR) {\n\t\t/* Free left face */\n\t\tb3dFreeAttrib(attrAlloc, edge->leftFace);\n\t\tb3dFreeFace(faceAlloc, edge->leftFace);\n\t\tif(b3dDoStats) nFaces--;\n\t}\n\tif(edge->flags & B3D_EDGE_RIGHT_MAJOR) {\n\t\t/* Free right face */\n\t\tb3dFreeAttrib(attrAlloc, edge->rightFace);\n\t\tb3dFreeFace(faceAlloc, edge->rightFace);\n\t\tif(b3dDoStats) nFaces--;\n\t}\n\t/* And free old edge */\n\tb3dFreeEdge(edgeAlloc, edge);\n}\n/* --INLINE-- */\n\n/* b3dMergeAETEdgesFrom:\n\tMerge the edges from the given source into the AET.\n*/\nvoid b3dMergeAETEdgesFrom(B3DActiveEdgeTable *aet, B3DPrimitiveEdgeList *src)\n{\n\tint srcIndex, aetIndex, outIndex, i;\n\tB3DPrimitiveEdge *srcEdge, *aetEdge;\n\n\tassert(aet);\n\tassert(src);\n\tassert(src->size);\n\tassert(aet->size + src->size <= aet->max);\n\n\tif(!aet->size) {\n\t\tfor(i=0; i<src->size; i++) aet->data[i] = src->data[i];\n\t\taet->size += src->size;\n\t\treturn;\n\t}\n\n\t/* Merge the input by stepping backwards through the aet and checking each edge */\n\toutIndex = aet->size + src->size - 1;\n\tsrcIndex = src->size-1;\n\taetIndex = aet->size-1;\n\tsrcEdge = src->data[srcIndex];\n\taetEdge = aet->data[aetIndex];\n\taet->size += src->size;\n\twhile(1) {\n\t\tif(srcEdge->xValue >= aetEdge->xValue) {\n\t\t\t/* output srcEdge */\n\t\t\taet->data[outIndex--] = srcEdge;\n\t\t\tif(!srcIndex--) return;\n\t\t\tsrcEdge = src->data[srcIndex];\n\t\t} else {\n\t\t\t/* output aetEdge */\n\t\t\taet->data[outIndex--] = aetEdge;\n\t\t\tif(!aetIndex--) {\n\t\t\t\tfor(i=0; i <= srcIndex; i++) aet->data[i] = src->data[i];\n\t\t\t\treturn;\n\t\t\t}\n\t\t\taetEdge = aet->data[aetIndex];\n\t\t}\n\t}\n}\n\n/* INLINE b3dAdvanceAETEdge(edge, aetData, aetStart) */\nvoid b3dAdvanceAETEdge(B3DPrimitiveEdge *edge,\n\t\t\t\t\tB3DPrimitiveEdge **aetData,\n\t\t\t\t\tint aetStart)\n{\n\t/* Advance to next scan line */\n\tedge->zValue += edge->zIncrement;\n\tedge->xValue += edge->xIncrement;\n\t/* Check if AET sort order is okay */\n\tif(aetStart && aetData[aetStart-1]->xValue > edge->xValue) {\n\t\t/* Must resort rightEdge */\n\t\tint xValue = edge->xValue;\n\t\tint j = aetStart;\n\t\t/* Move the edge left */\n\t\twhile(j>0 && aetData[j-1]->xValue > xValue) {\n\t\t\taetData[j] = aetData[j-1];\n\t\t\tj--;\n\t\t}\n\t\taetData[j] = edge;\n\t}\n}\n/* --INLINE-- */\n\n/*************************************************************/\n/*************************************************************/\n/*************************************************************/\n#ifdef DEBUG\ndouble zValueAt(B3DPrimitiveFace *face, double xValue, double yValue)\n{\n\treturn \n\t\t(face->v0->rasterPosZ +\n\t\t\t(((double)xValue - face->v0->rasterPosX) * face->dzdx) +\n\t\t\t(((double)yValue - face->v0->rasterPosY) * face->dzdy));\n}\n#else\n#define zValueAt(face, xValue, yValue) \\\n\t\t((face)->v0->rasterPosZ + \\\n\t\t\t(((double)(xValue) - (face)->v0->rasterPosX) * (face)->dzdx) +\\\n\t\t\t(((double)(yValue) - (face)->v0->rasterPosY) * (face)->dzdy))\n#endif\n\n/*************************************************************/\n/*************************************************************/\n/*************************************************************/\n\nint b3dComputeIntersection(B3DPrimitiveFace *frontFace, \n\t\t\t\t\t\t   B3DPrimitiveFace *backFace, \n\t\t\t\t\t\t   int yValue, \n\t\t\t\t\t\t   int errorValue)\n{\n\tdouble dx1 = frontFace->rightEdge->xValue - frontFace->leftEdge->xValue;\n\tdouble dz1 = frontFace->rightEdge->zValue - frontFace->leftEdge->zValue;\n\tdouble dx2 = backFace->rightEdge->xValue - backFace->leftEdge->xValue;\n\tdouble dz2 = backFace->rightEdge->zValue - backFace->leftEdge->zValue;\n\tdouble px = backFace->leftEdge->xValue - frontFace->leftEdge->xValue;\n\tdouble pz = backFace->leftEdge->zValue - frontFace->leftEdge->zValue;\n\tdouble det = (dx1 * dz2) - (dx2 * dz1);\n\tif(det == 0.0) return errorValue;\n\t{ \n\t\tdouble det2 = ((px * dz2) - (pz * dx2)) / det;\n\t\treturn frontFace->leftEdge->xValue + (int)(dx1 * det2);\n\t}\n\t/* not reached */\n}\n\n/* b3dCheckIntersectionOfFaces:\n\tCompute the possible intersection of frontFace and backFace.\n\tStore the result in nextIntersection if it is before any other\n\tintersection. Return true if other intersections tests should\n\tbe performed, false otherwise.\n*/\nint b3dCheckIntersectionOfFaces(B3DPrimitiveFace *frontFace,\n\t\t\t\t\t\t\t\t B3DPrimitiveFace *backFace,\n\t\t\t\t\t\t\t\t int yValue,\n\t\t\t\t\t\t\t\t B3DPrimitiveEdge *leftEdge,\n\t\t\t\t\t\t\t\t B3DPrimitiveEdge *nextIntersection)\n{\n\tdouble frontZ, backZ;\n\tint xValue, rightX;\n\n\t/* Check if the backFace is completely behind the front face */\n\tif(backFace->minZ >= frontFace->maxZ) return 0; /* abort */\n\n\t/* Check if front and back face share any edges */\n\tif(frontFace->leftEdge == backFace->leftEdge) return 1; /* proceed */\n\tif(frontFace->rightEdge == backFace->rightEdge) return 1; /* proceed */\n\n\t/* Check if either front or back face are less than 1 pixel wide */\n\tif( (frontFace->leftEdge->xValue >> B3D_FixedToIntShift) ==\n\t\t(frontFace->rightEdge->xValue >> B3D_FixedToIntShift)) return 0; /* abort */\n\tif( (backFace->leftEdge->xValue >> B3D_FixedToIntShift) ==\n\t\t(backFace->rightEdge->xValue >> B3D_FixedToIntShift)) return 1; /* proceed */\n\n\t/* Choose the right x value of either front or back face,\n\t\twhichever is less (this is so we sample inside both faces) */\n\tif(frontFace->rightEdge->xValue <= backFace->rightEdge->xValue) {\n\t\trightX = frontFace->rightEdge->xValue;\n\t\tfrontZ = frontFace->rightEdge->zValue;\n\t\tbackZ = zValueAt(backFace, rightX * B3D_FixedToFloat, yValue);\n\t} else {\n\t\trightX = backFace->rightEdge->xValue;\n\t\tbackZ = backFace->rightEdge->zValue;\n\t\tfrontZ = zValueAt(frontFace, rightX * B3D_FixedToFloat, yValue);\n\t}\n\n\tif(backZ < frontZ) {\n\t\t/* possible intersection found */\n\t\txValue = b3dComputeIntersection(frontFace, backFace, yValue, leftEdge->xValue);\n\t\tif(xValue > rightX) xValue = rightX;\n\t\t/* Ignore intersections at or before the leftEdge's x value. Important. */\n\t\tif((xValue >> B3D_FixedToIntShift) <= (leftEdge->xValue >> B3D_FixedToIntShift))\n\t\t\txValue = ((leftEdge->xValue >> B3D_FixedToIntShift) + 1) << B3D_IntToFixedShift;\n\t\tif(xValue < nextIntersection->xValue) {\n\t\t\tnextIntersection->xValue = xValue;\n\t\t\tnextIntersection->leftFace = frontFace;\n\t\t\tnextIntersection->rightFace = backFace;\n\t\t}\n\t}\n\treturn 1;\n}\n\n/* b3dAdjustIntersections:\n\tCompute the possible intersections of the current front face\n\twith all active faces. Store the next intersection if any.\n*/\n/* INLINE b3dAdjustIntersections(fillList, yValue, topEdge, nextIntersection) */\nvoid b3dAdjustIntersections(B3DFillList *fillList,\n\t\t\t\t\t\t\tint yValue,\n\t\t\t\t\t\t\tB3DPrimitiveEdge *topEdge,\n\t\t\t\t\t\t\tB3DPrimitiveEdge *nextIntersection)\n{\n\tB3DPrimitiveFace *frontFace = fillList->firstFace;\n\tif(frontFace) {\n\t\tB3DPrimitiveFace *backFace = frontFace->nextFace;\n\t\tint proceed = 1;\n\t\twhile(backFace && proceed) {\n\t\t\tproceed = b3dCheckIntersectionOfFaces(frontFace, backFace, yValue, topEdge, nextIntersection);\n\t\t\tbackFace = backFace->nextFace;\n\t\t}\n\t}\n}\n/* --INLINE-- */\n\n/*************************************************************/\n/*************************************************************/\n/*************************************************************/\n\nvoid b3dValidateFillList(B3DFillList *list)\n{\n\tB3DPrimitiveFace *firstFace = list->firstFace;\n\tB3DPrimitiveFace *lastFace = list->lastFace;\n\tB3DPrimitiveFace *face;\n\n\tif(!firstFace && !lastFace) return;\n\tif(firstFace->prevFace)\n\t\tb3dAbort(\"Bad fill list\");\n\tif(lastFace->nextFace)\n\t\tb3dAbort(\"Bad fill list\");\n\tface = firstFace;\n\twhile(face != lastFace)\n\t\tface = face->nextFace;\n\t/* Validate sort order */\n\tif(firstFace == lastFace)\n\t\treturn; /* 0 or 1 element */\n\tface = firstFace->nextFace;\n\twhile(face->nextFace) {\n\t\tif(face->minZ > face->nextFace->minZ)\n\t\t\tb3dAbort(\"Fill list sorting problem\");\n\t\tface = face->nextFace;\n\t}\n}\n\n/* INLINE b3dAddFirstFill(fillList, aFace) */\nvoid b3dAddFirstFill(B3DFillList *fillList, B3DPrimitiveFace *aFace)\n{\n\tB3DPrimitiveFace *firstFace = fillList->firstFace;\n\tif(firstFace)\n\t\tfirstFace->prevFace = aFace;\n\telse\n\t\tfillList->lastFace = aFace;\n\taFace->nextFace = firstFace;\n\taFace->prevFace = NULL;\n\tfillList->firstFace = aFace;\n\tif(b3dDebug) b3dValidateFillList(fillList);\n}\n/* --INLINE-- */\n\n/* INLINE b3dAddLastFill(fillList, aFace) */\nvoid b3dAddLastFill(B3DFillList *fillList, B3DPrimitiveFace *aFace)\n{\n\tB3DPrimitiveFace *lastFace = fillList->lastFace;\n\tif(lastFace)\n\t\tlastFace->nextFace = aFace;\n\telse\n\t\tfillList->firstFace = aFace;\n\taFace->prevFace = lastFace;\n\taFace->nextFace = NULL;\n\tfillList->lastFace = aFace;\n\tif(b3dDebug) b3dValidateFillList(fillList);\n}\n/* --INLINE-- */\n\n/* INLINE b3dRemoveFill(fillList, aFace) */\nvoid b3dRemoveFill(B3DFillList *fillList, B3DPrimitiveFace *aFace)\n{\n\tif(b3dDebug) b3dValidateFillList(fillList);\n\tif(aFace->prevFace)\n\t\taFace->prevFace->nextFace = aFace->nextFace;\n\telse\n\t\tfillList->firstFace = aFace->nextFace;\n\tif(aFace->nextFace)\n\t\taFace->nextFace->prevFace = aFace->prevFace;\n\telse\n\t\tfillList->lastFace = aFace->prevFace;\n}\n/* --INLINE-- */\n\n/* INLINE b3dInsertBeforeFill(fillList, aFace, otherFace) */\nvoid b3dInsertBeforeFill(B3DFillList *fillList, B3DPrimitiveFace *aFace, B3DPrimitiveFace *otherFace)\n{\n\tassert(otherFace != fillList->firstFace);\n\n\taFace->nextFace = otherFace;\n\taFace->prevFace = otherFace->prevFace;\n\taFace->prevFace->nextFace = aFace;\n\totherFace->prevFace = aFace;\n\tif(b3dDebug) b3dValidateFillList(fillList);\n}\n/* --INLINE-- */\n\n/* INLINE b3dAddFrontFill(fillList, aFace) */\nvoid b3dAddFrontFill(B3DFillList *fillList, B3DPrimitiveFace *aFace)\n{\n\tB3DPrimitiveFace *firstFace = fillList->firstFace;\n\tif(firstFace != fillList->lastFace) {\n\t\t/* Meaning that we must find the new position for the old front face */\n\t\tB3DPrimitiveFace *backFace = firstFace->nextFace;\n\t\tfloat minZ = firstFace->minZ;\n\n\t\twhile(backFace && backFace->minZ < minZ)\n\t\t\tbackFace = backFace->nextFace;\n\n\t\t/* Insert firstFace before backFace */\n\t\tif(firstFace->nextFace != backFace) {\n\t\t\tB3DPrimitiveFace *tempFace = firstFace;\n\n\t\t\tb3dRemoveFill(fillList, tempFace);\n\t\t\tif(backFace) {\n\t\t\t\tb3dInsertBeforeFill(fillList, tempFace, backFace);\n\t\t\t} else {\n\t\t\t\tb3dAddLastFill(fillList, tempFace);\n\t\t\t}\n\t\t}\n\t}\n\tb3dAddFirstFill(fillList, aFace);\n\tif(b3dDebug) b3dValidateFillList(fillList);\n}\n/* --INLINE-- */\n\n/* INLINE b3dAddBackFill(fillList, aFace) */\nvoid b3dAddBackFill(B3DFillList *fillList, B3DPrimitiveFace *aFace)\n{\n\tB3DPrimitiveFace *firstFace = fillList->firstFace;\n\tB3DPrimitiveFace *lastFace = fillList->lastFace;\n\tB3DPrimitiveFace *face;\n\tfloat minZ = aFace->minZ;\n\n\tassert(firstFace);\n\n\tif(firstFace == lastFace || minZ >= lastFace->minZ) {\n\t\tb3dAddLastFill(fillList, aFace);\n\t} else {\n\t\t/* Try an estimation on how to search */\n\t\tif(minZ <= (firstFace->minZ + lastFace->minZ) * 0.5) {\n\t\t\t/* search front to back */\n\t\t\tface = firstFace->nextFace;\n\t\t\twhile(face->minZ < minZ) face = face->nextFace;\n\t\t} else {\n\t\t\t/* search back to front */\n\t\t\tface = lastFace->prevFace; /* already checked if lastFace->minZ <= minZ */\n\t\t\twhile(face->minZ > minZ) face = face->prevFace;\n\t\t\tface = face->nextFace;\n\t\t}\n\t\tb3dInsertBeforeFill(fillList, aFace, face);\n\t}\n\tif(b3dDebug) b3dValidateFillList(fillList);\n}\n/* --INLINE-- */\n\n/* INLINE b3dCleanupFill(fillList) */\nvoid b3dCleanupFill(B3DFillList *fillList)\n{\n\tB3DPrimitiveFace *firstFace = fillList->firstFace;\n\n\twhile(firstFace) {\n\t\tfirstFace->flags ^= B3D_FACE_ACTIVE;\n\t\tfirstFace = firstFace->nextFace;\n\t}\n\tfillList->firstFace = fillList->lastFace = NULL;\n}\n/* --INLINE-- */\n\nvoid b3dSearchForNewTopFill(B3DFillList *fillList, int scaledX, int yValue)\n{\n\tB3DPrimitiveFace *topFace = fillList->firstFace;\n\n\tif(b3dDebug) b3dValidateFillList(fillList);\n\tif(topFace) { /* only if there is any */\n\t\tB3DPrimitiveFace *face = topFace->nextFace;\n\t\tdouble xValue = scaledX * B3D_FixedToFloat;\n\t\tdouble topZ = zValueAt(topFace, xValue, yValue);\n\n\t\t/* Note: since the list is ordered we need only to search until face->minZ >= topZ */\n\t\twhile(face && face->minZ <= topZ) {\n\t\t\tdouble faceZ = zValueAt(face, xValue, yValue);\n\t\t\tif(faceZ < topZ) {\n\t\t\t\ttopZ = faceZ;\n\t\t\t\ttopFace = face;\n\t\t\t}\n\t\t\tface = face->nextFace;\n\t\t}\n\t\t/* and move the guy to front */\n\t\tb3dRemoveFill(fillList, topFace);\n\t\tb3dAddFrontFill(fillList, topFace);\n\t}\n}\n\n/* INLINE b3dToggleTopFills(fillList, edge, yValue) */\nvoid b3dToggleTopFills(B3DFillList *fillList, B3DPrimitiveEdge *edge, int yValue)\n{\n\tB3DPrimitiveFace *leftFace = edge->leftFace;\n\tB3DPrimitiveFace *rightFace = edge->rightFace;\n\tif(b3dDebug) b3dValidateFillList(fillList);\n\tassert(leftFace != rightFace);\n\tif(rightFace) {\n\t\tint xorMask = leftFace->flags ^ rightFace->flags;\n\t\tif(xorMask & B3D_FACE_ACTIVE) {\n\t\t\tif(leftFace->flags & B3D_FACE_ACTIVE) {\n\t\t\t\tb3dRemoveFill(fillList, leftFace);\n\t\t\t\tb3dAddFrontFill(fillList, rightFace);\n\t\t\t} else {\n\t\t\t\tb3dRemoveFill(fillList, rightFace);\n\t\t\t\tb3dAddFrontFill(fillList, leftFace);\n\t\t\t}\n\t\t} else {\n\t\t\tif(leftFace->flags & B3D_FACE_ACTIVE) {\n\t\t\t\tb3dRemoveFill(fillList, leftFace);\n\t\t\t\tb3dRemoveFill(fillList, rightFace);\n\t\t\t\tb3dSearchForNewTopFill(fillList, edge->xValue, yValue);\n\t\t\t} else {\n\t\t\t\tif(leftFace->dzdx <= rightFace->dzdx) {\n\t\t\t\t\tb3dAddFrontFill(fillList, leftFace);\n\t\t\t\t\tb3dAddBackFill(fillList, rightFace);\n\t\t\t\t} else {\n\t\t\t\t\tb3dAddFrontFill(fillList, rightFace);\n\t\t\t\t\tb3dAddBackFill(fillList, leftFace);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tleftFace->flags ^= B3D_FACE_ACTIVE;\n\t\trightFace->flags ^= B3D_FACE_ACTIVE;\n\t} else {\n\t\tif(leftFace->flags & B3D_FACE_ACTIVE) {\n\t\t\tb3dRemoveFill(fillList, leftFace);\n\t\t\tb3dSearchForNewTopFill(fillList, edge->xValue, yValue);\n\t\t} else {\n\t\t\tb3dAddFrontFill(fillList, leftFace);\n\t\t}\n\t\tleftFace->flags ^= B3D_FACE_ACTIVE;\n\t}\n\tif(b3dDebug) b3dValidateFillList(fillList);\n}\n/* --INLINE-- */\n\n/* INLINE b3dToggleBackFills(fillList, edge, yValue, nextIntersection) */\nvoid b3dToggleBackFills(B3DFillList *fillList, \n\t\t\t\t\t\tB3DPrimitiveEdge *edge, \n\t\t\t\t\t\tint yValue,\n\t\t\t\t\t\tB3DPrimitiveEdge *nextIntersection)\n{\n\tB3DPrimitiveFace *face = edge->leftFace;\n\tif(b3dDebug) b3dValidateFillList(fillList);\n\tif(face->flags & B3D_FACE_ACTIVE) {\n\t\tb3dRemoveFill(fillList, face);\n\t} else {\n\t\tb3dAddBackFill(fillList, face);\n\t\tb3dCheckIntersectionOfFaces(fillList->firstFace, face, yValue, edge, nextIntersection);\n\t}\n\tface->flags ^= B3D_FACE_ACTIVE;\n\tface = edge->rightFace;\n\tif(face) {\n\t\tif(face->flags & B3D_FACE_ACTIVE) {\n\t\t\tb3dRemoveFill(fillList, face);\n\t\t} else {\n\t\t\tb3dAddBackFill(fillList, face);\n\t\t\tb3dCheckIntersectionOfFaces(fillList->firstFace, face, yValue, edge, nextIntersection);\n\t\t}\n\t\tface->flags ^= B3D_FACE_ACTIVE;\n\t}\n\tif(b3dDebug) b3dValidateFillList(fillList);\n}\n/* --INLINE-- */\n\n/*************************************************************/\n/*************************************************************/\n/*************************************************************/\n\n/* INLINE b3dClearSpanBuffer(aet) */\nvoid b3dClearSpanBuffer(B3DActiveEdgeTable *aet)\n{\n\tint i, leftX, rightX;\n\tunsigned int *buffer = currentState->spanBuffer;\n\tif(aet->size && buffer) {\n\t\tleftX = aet->data[0]->xValue >> B3D_FixedToIntShift;\n\t\trightX = aet->data[aet->size-1]->xValue >> B3D_FixedToIntShift;\n\t\tif(leftX < 0) leftX = 0;\n\t\tif(rightX >= currentState->spanSize) rightX = currentState->spanSize-1;\n\t\tfor(i=leftX;i<=rightX;i++) buffer[i] = 0;\n\t}\n}\n/* --INLINE-- */\n\n/* INLINE b3dDrawSpanBuffer(aet, yValue) */\nvoid b3dDrawSpanBuffer(B3DActiveEdgeTable *aet, int yValue)\n{\n\tint leftX, rightX;\n\tif(aet->size && currentState->spanDrawer) {\n\t\tleftX = aet->data[0]->xValue >> B3D_FixedToIntShift;\n\t\trightX = aet->data[aet->size-1]->xValue >> B3D_FixedToIntShift;\n\t\tif(leftX < 0) leftX = 0;\n\t\tif(rightX > currentState->spanSize) rightX = currentState->spanSize;\n\t\tcurrentState->spanDrawer(leftX, rightX, yValue);\n\t}\n}\n/* --INLINE-- */\n\n/*************************************************************/\n/*************************************************************/\n/*************************************************************/\n/* General failure */\n#define FAIL(reason,resume) { aet->yValue = yValue; return reason | resume; }\n#define PROCEED { yValue = aet->yValue; }\n\n/* Failure adding objects */\n#define FAIL_ADDING(reason) { obj->start = objStart; FAIL(reason, B3D_RESUME_ADDING) }\n#define PROCEED_ADDING { objStart = obj->start; PROCEED }\n\n/* Failure merging objects */\n#define FAIL_MERGING(reason) { FAIL(reason, B3D_RESUME_MERGING); }\n#define PROCEED_MERGING { PROCEED }\n\n/* Failure during paint */\n#define FAIL_PAINTING(reason) { aet->start = aetStart; aet->leftEdge = leftEdge; aet->rightEdge = rightEdge; FAIL(reason, B3D_RESUME_PAINTING) }\n#define PROCEED_PAINTING(reason) { aetStart = aet->start; leftEdge = aet->leftEdge; rightEdge = aet->rightEdge; PROCEED }\n\n#define FAIL_UPDATING(reason)\n\nint b3dMainLoop(B3DRasterizerState *state, int stopReason)\n{\n\tB3DPrimitiveObject *activeStart, *passiveStart;\n\tint yValue, nextObjY, nextEdgeY;\n\tB3DFillList *fillList;\n\tB3DPrimitiveEdge *lastIntersection, *nextIntersection;\n\n\n\tif(!state)\n\t\treturn B3D_GENERIC_ERROR;\n\n\tif(!state->nObjects)\n\t\treturn B3D_NO_ERROR;\n\n\tif(b3dValidateAndRemapState(state) != B3D_NO_ERROR)\n\t\treturn B3D_GENERIC_ERROR;\n\n\tif(stopReason == B3D_NO_ERROR)\n\t\tif(b3dSetupObjects(state) != B3D_NO_ERROR)\n\t\t\treturn B3D_GENERIC_ERROR;\n\n\tif(b3dDebug) {\n\t\t/* check the sort order of objects */\n\t\tint i;\n\t\tfor(i=2; i<state->nObjects;i++)\n\t\t\tif(!objSortsBefore(state->objects[i-1], state->objects[i]))\n\t\t\t\tb3dAbort(\"Objects not sorted\");\n\t}\n\n\tcurrentState = state;\n\tfaceAlloc = state->faceAlloc;\n\tedgeAlloc = state->edgeAlloc;\n\tattrAlloc = state->attrAlloc;\n\taddedEdges = state->addedEdges;\n\tfillList = state->fillList;\n\taet = state->aet;\n\tnextIntersection = aet->nextIntersection;\n\tlastIntersection = aet->lastIntersection;\n\n\tif(b3dDoStats) nFaces = 0;\n\n\tif(stopReason == B3D_NO_ERROR) {\n\t\tactiveStart = passiveStart = state->objects[0];\n\t\tyValue = nextEdgeY = nextObjY = passiveStart->minY;\n\t} else {\n\t\tint resumeCode;\n\t\tresumeCode = stopReason & B3D_RESUME_MASK;\n\t\tif(resumeCode == B3D_RESUME_ADDING  ) goto RESUME_ADDING;\n\t\tif(resumeCode == B3D_RESUME_MERGING ) goto RESUME_MERGING;\n\t\tif(resumeCode == B3D_RESUME_PAINTING) goto RESUME_PAINTING;\n\t\tif(resumeCode == B3D_RESUME_UPDATING) goto RESUME_UPDATING;\n\t\treturn B3D_GENERIC_ERROR;\n\t}\n\n\t/**** BEGIN MAINLOOP ****/\n\twhile(activeStart || passiveStart || aet->size) {\n\nRESUME_ADDING:\n\n\t\t/* STEP 1: Add new objects if necessary */\n\t\tif(yValue == nextObjY) {\n\t\t\tnextEdgeY = nextObjY;\n\t\t\twhile(passiveStart && passiveStart->minY == nextObjY) {\n\t\t\t\tpassiveStart->flags |= B3D_OBJECT_ACTIVE;\n\t\t\t\tpassiveStart = passiveStart->next;\n\t\t\t}\n\t\t\tif(passiveStart)\n\t\t\t\tnextObjY = passiveStart->minY;\n\t\t\telse\n\t\t\t\tnextObjY = 99999;\n\t\t} /* End of adding objects */\n\n\n\n\t\t/* STEP 2: Add new edges if necessary */\n\t\tif(yValue == nextEdgeY) {\n\t\t\tB3DPrimitiveObject *obj = activeStart;\n\t\t\tint scaledY = (yValue+1) << B3D_IntToFixedShift;\n\n\t\t\tnextEdgeY = nextObjY << B3D_IntToFixedShift;\n\t\t\twhile(obj != passiveStart) {\n\t\t\t\tB3DInputFace *objFaces = obj->faces;\n\t\t\t\tB3DPrimitiveVertex *objVtx = obj->vertices;\n\t\t\t\tint objStart = obj->start;\n\t\t\t\tint objSize = obj->nFaces;\n\t\t\t\tint tempY;\n\n\t\t\t\tassert(obj->flags & B3D_OBJECT_ACTIVE);\n\n\t\t\t\twhile(objStart < objSize && ((tempY = objVtx[objFaces[objStart].i0].windowPosY) < scaledY)) {\n\t\t\t\t\t/* add edges from face at objFaces[objStart] */\n\t\t\t\t\tB3DInputFace *inputFace = objFaces + objStart;\n\t\t\t\t\tB3DPrimitiveFace *face;\n\n\t\t\t\t\t/* NOTE: If any of the following fails, \n\t\t\t\t\t         we can re-enter the main loop later on. */\n\n\t\t\t\t\tif(faceAlloc->nFree == 0)\n\t\t\t\t\t\tFAIL_ADDING(B3D_NO_MORE_FACES);\n\t\t\t\t\t\n\t\t\t\t\tif(edgeAlloc->nFree < 2)\n\t\t\t\t\t\tFAIL_ADDING(B3D_NO_MORE_EDGES);\n\n\t\t\t\t\tif(addedEdges->size+2 > addedEdges->max)\n\t\t\t\t\t\tFAIL_ADDING(B3D_NO_MORE_ADDED);\n\n\t\t\t\t\t/* Allocate a new face and do the initial setup */\n\t\t\t\t\tface = b3dInitializeFace(objVtx + inputFace->i0, \n\t\t\t\t\t\t\t\t\t\t\t objVtx + inputFace->i1,\n\t\t\t\t\t\t\t\t\t\t\t objVtx + inputFace->i2,\n\t\t\t\t\t\t\t\t\t\t\t obj->texture,\n\t\t\t\t\t\t\t\t\t\t\t obj->flags);\n\t\t\t\t\tif(face) {\n\t\t\t\t\t\tb3dAddEdgesFromFace(face, yValue);\n\t\t\t\t\t}\n\t\t\t\t\tobjStart++;\n\t\t\t\t}\n\n\t\t\t\tobj->start = objStart;\n\t\t\t\tif(objStart != objSize) {\n\t\t\t\t\tif(tempY < nextEdgeY) nextEdgeY = tempY;\n\t\t\t\t} else {\n\t\t\t\t\t/* Unlink obj from activeStart list */\n\t\t\t\t\tobj->flags |= B3D_OBJECT_DONE;\n\t\t\t\t\tif(obj == activeStart) {\n\t\t\t\t\t\tactiveStart = obj->next;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tobj->prev->next = obj->next;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tobj = obj->next;\n\t\t\t}\n\n\t\t\tnextEdgeY >>= B3D_FixedToIntShift;\n\t\t} /* End of adding edges */\n\n\n\t\t/* STEP 3: Merge all newly added edges from addedList into the AET */\n\t\tif(addedEdges->size) {\nRESUME_MERGING:\n\t\t\tif(b3dDebug)\n\t\t\t\tb3dValidateEdgeOrder(addedEdges);\n\t\t\t/* NOTE: If the following fails, we can re-enter the main loop later on. */\n\t\t\tif(aet->size + addedEdges->size > aet->max)\n\t\t\t\tFAIL_MERGING(B3D_NO_MORE_AET);\n\t\t\tb3dMergeAETEdgesFrom(aet, addedEdges);\n\t\t\tif(b3dDebug) {\n\t\t\t\tb3dValidateAETOrder(aet);\n\t\t\t}\n\t\t\taddedEdges->size = 0; /* reset added */\n\t\t} /* End of merging edges */\n\n\n\t\t/********** THIS IS THE CORE LOOP ********/\n\t\t/* while(yValue < nextEdgeY && !addedEdges->size && aet->size) { */\n\n\t\t\tif(b3dDoStats) {\n\t\t\t\t/* Gather stats */\n\t\t\t\tif(aet->size > maxEdges) maxEdges = aet->size;\n\t\t\t\tif(nFaces > maxFaces) maxFaces = nFaces;\n\t\t\t}\n\n\t\t\t/* STEP 4: Draw the current span */\n\n\t\t\t/* STEP 4a: Clear the span buffer */\n\t\t\tb3dClearSpanBuffer(aet);\n\n\t\t\t/* STEP 4b: Scan out the AET */\n\t\t\tif(aet->size) {\n\t\t\t\tB3DPrimitiveEdge *leftEdge;\n\t\t\t\tB3DPrimitiveEdge *rightEdge;\n\t\t\t\tB3DPrimitiveEdge **aetData = aet->data;\n\t\t\t\tint aetStart = 1;\n\t\t\t\tint aetSize = aet->size;\n\n\t\t\t\t/* clean up old fills if any */\n\t\t\t\tb3dCleanupFill(fillList);\n\n\t\t\t\tnextIntersection->xValue = B3D_MAX_X;\n\t\t\t\tleftEdge = aetData[0];\n\t\t\t\twhile(aetStart < aetSize) {\n\n\t\t\t\t\t/*-- Toggle the faces of the top edge (the left edge is always on top) --*/\n\t\t\t\t\tif(leftEdge == lastIntersection) {\n\t\t\t\t\t\t/* Special case if this is a intersection edge */\n\t\t\t\t\t\tassert(fillList->firstFace == leftEdge->leftFace);\n\t\t\t\t\t\tb3dRemoveFill(fillList, leftEdge->rightFace);\n\t\t\t\t\t\tb3dAddFrontFill(fillList, leftEdge->rightFace);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tb3dToggleTopFills(fillList, leftEdge, yValue);\n\t\t\t\t\t}\n\t\t\t\t\t/*-- end of toggling top edge faces --*/\n\n\t\t\t\t\t/* after getting a new top fill we must adjust intersections */\n\t\t\t\t\tb3dAdjustIntersections(fillList, yValue, leftEdge, nextIntersection);\n\n\t\t\t\t\t/*-- search for the next top edge which will be the right edge --*/\n\t\t\t\t\tassert(aetStart < aetSize);\n\t\t\t\t\tif(!fillList->firstFace)\n\t\t\t\t\t\trightEdge = aetData[aetStart++]; /* If no current top fill just use the next edge */\n\t\t\t\t\telse while(aetStart < aetSize) { /* Search for the next top edge in the AET */\n\t\t\t\t\t\trightEdge = aetData[aetStart];\n\t\t\t\t\t\t/* If we have an intersection use the intersection edge */\n\t\t\t\t\t\tif(nextIntersection->xValue <= rightEdge->xValue) {\n\t\t\t\t\t\t\trightEdge = nextIntersection;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\taetStart++;\n\t\t\t\t\t\t/* Check if this edge is on top */\n\t\t\t\t\t\tassert(fillList->firstFace);\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdouble xValue = rightEdge->xValue * B3D_FixedToFloat;\n\t\t\t\t\t\t\tB3DPrimitiveFace *topFace = fillList->firstFace;\n\t\t\t\t\t\t\tif( rightEdge->leftFace == topFace || \n\t\t\t\t\t\t\t\trightEdge->rightFace == topFace || \n\t\t\t\t\t\t\t\trightEdge->zValue < zValueAt(topFace, xValue, yValue))\n\t\t\t\t\t\t\t\tbreak; /* rightEdge is on top */\n\t\t\t\t\t\t}\n\t\t\t\t\t\t/* If the edge is not on top toggle its (back) fills */\n\t\t\t\t\t\tb3dToggleBackFills(fillList, rightEdge, yValue, nextIntersection);\n\t\t\t\t\t\trightEdge = NULL;\n\t\t\t\t\t}\n\t\t\t\t\t/*-- end of search for next top edge --*/\n\n\t\t\t\t\t/*-- Now do the drawing from leftEdge to rightEdge --*/\n\t\t\t\t\tassert(rightEdge);\n\t\t\t\t\tif(fillList->firstFace) {\n\t\t\t\t\t\t/* Note: We fill *including* leftX and rightX */\n\t\t\t\t\t\tint leftX = (leftEdge->xValue >> B3D_FixedToIntShift) + 1;\n\t\t\t\t\t\tint rightX = (rightEdge->xValue >> B3D_FixedToIntShift);\n\t\t\t\t\t\tB3DPrimitiveFace *topFace = fillList->firstFace;\n\n\t\t\t\t\t\tif(leftX < 0) leftX = 0;\n\t\t\t\t\t\tif(rightX >= currentState->spanSize) rightX = currentState->spanSize-1;\n\t\t\t\t\t\tif(leftX <= rightX) {\n\t\t\t\t\t\t\t/* Since we know now that some serious filling operation\n\t\t\t\t\t\t\t   will happen, initialize the attributes of the face if\n\t\t\t\t\t\t\t   this hasn't been done before. */\nRESUME_PAINTING:\n\t\t\t\t\t\t\tif( (topFace->flags & B3D_FACE_INITIALIZED) == 0) {\n\t\t\t\t\t\t\t\tassert(topFace->attributes == NULL);\n\t\t\t\t\t\t\t\tif(!b3dInitializePass2(topFace))\n\t\t\t\t\t\t\t\t\tFAIL_PAINTING(B3D_NO_MORE_ATTRS);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/* And dispatch on the actual pixel drawers */\n\t\t\t\t\t\t\t(*B3D_FILL_FUNCTIONS[(topFace->flags >> B3D_ATTR_SHIFT) & B3D_ATTR_MASK])\n\t\t\t\t\t\t\t\t(leftX, rightX, yValue, topFace);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t/*-- End of drawing -- */\n\n\t\t\t\t\t/* prepare for new top edge */\n\t\t\t\t\tleftEdge = rightEdge;\n\t\t\t\t\t/* use a new intersection if necessary */\n\t\t\t\t\tif(leftEdge == nextIntersection) {\n\t\t\t\t\t\tnextIntersection = lastIntersection;\n\t\t\t\t\t\tlastIntersection = leftEdge;\n\t\t\t\t\t}\n\t\t\t\t\tnextIntersection->xValue = B3D_MAX_X;\n\t\t\t\t}\n\t\t\t\t/* clean up old fills if any */\n\t\t\t\tb3dCleanupFill(fillList);\n\t\t\t}\n\n\t\t\t/* STEP 4c: Display the pixels from the span buffer */\n\t\t\tb3dDrawSpanBuffer(aet, yValue);\n\n\t\t\t/* STEP 5: Go to next y value and update AET entries */\n\t\t\tyValue++;\n\t\t\tif(aet->size) {\n\t\t\t\tint aetStart = 0;\n\t\t\t\tint aetSize = aet->size;\n\t\t\t\tB3DPrimitiveEdge **aetData = aet->data;\n\n\t\t\t\taetStart = 0;\n\t\t\t\twhile(aetStart < aetSize) {\n\t\t\t\t\tB3DPrimitiveEdge *edge = aetData[aetStart];\n\n\t\t\t\t\tif(--(edge->nLines)) {\n\t\t\t\t\t\t/* Advance to next scan line and resort edge */\n\t\t\t\t\t\tb3dAdvanceAETEdge(edge, aetData, aetStart);\n\t\t\t\t\t\taetStart++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t/* Remove edge and add lower edges if necessary */\nRESUME_UPDATING:\n\t\t\t\t\t\tif(edgeAlloc->nFree < 2)\n\t\t\t\t\t\t\tFAIL_UPDATING(B3D_NO_MORE_EDGES);\n\t\t\t\t\t\tif(addedEdges->size + 2 > addedEdges->max)\n\t\t\t\t\t\t\tFAIL_UPDATING(B3D_NO_MORE_ADDED);\n\t\t\t\t\t\tb3dRemoveAETEdge(aet, edge, yValue, aetStart);\n\t\t\t\t\t\taetSize = aet->size;\n\t\t\t\t\t\t/* Do NOT advance aetStart here */\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t/* End of AET update */\n\t\t\tif(b3dDebug) {\n\t\t\t\tb3dValidateAETOrder(aet);\n\t\t\t}\n\n\t\t/*}*/ /******** END OF CORE LOOP ********/\n\n\t}  /**** END MAINLOOP ****/\n\n\treturn B3D_NO_ERROR;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Squeak3D/b3dRemap.c",
    "content": "/****************************************************************************\n*   PROJECT: Balloon 3D Graphics Subsystem for Squeak\n*   FILE:    b3dRemap.c\n*   CONTENT: Remapping functions for the B3D rasterizer\n*\n*   AUTHOR:  Andreas Raab (ar)\n*   ADDRESS: Walt Disney Imagineering, Glendale, CA\n*   EMAIL:   andreasr@wdi.disney.com\n*   RCSID:   $Id: b3dRemap.c 2 2001-10-24 23:11:49Z rowledge $\n*\n*   NOTES:\n*\n*\n*****************************************************************************/\n#include \"b3d.h\"\n\n/* b3dRemapFaces:\n\tRemap all allocated faces using the given offsets\n*/\n/* INLINE b3dRemapFaces(list, attrOffset, edgeOffset) */\nvoid b3dRemapFaces(B3DFaceAllocList *list, int attrOffset, int edgeOffset)\n{\n\tint i;\n\n\tfor(i=0; i<list->size;i++) {\n\t\tB3DPrimitiveFace *face = list->data + i;\n\t\tif(face->flags & B3D_ALLOC_FLAG) {\n\t\t\tif(face->attributes)\n\t\t\t\tface->attributes = (B3DPrimitiveAttribute*)((char*)face->attributes + attrOffset);\n\t\t\tif(face->leftEdge)\n\t\t\t\tface->leftEdge = (B3DPrimitiveEdge*)((char*)face->leftEdge + edgeOffset);\n\t\t\tif(face->rightEdge)\n\t\t\t\tface->rightEdge = (B3DPrimitiveEdge*)((char*)face->rightEdge + edgeOffset);\n\t\t}\n\t}\n}\n/* --INLINE-- */\n\n/* b3dRemapEdges:\n\tRemap all allocated edges using the given offset\n*/\n/* INLINE b3dRemapEdges(list, faceOffset) */\nvoid b3dRemapEdges(B3DEdgeAllocList *list, int faceOffset)\n{\n\tint i;\n\tfor(i=0; i<list->size;i++) {\n\t\tB3DPrimitiveEdge *edge = list->data + i;\n\t\tif(edge->flags & B3D_ALLOC_FLAG) {\n\t\t\tif(edge->leftFace)\n\t\t\t\tedge->leftFace = (B3DPrimitiveFace*)((char*)edge->leftFace + faceOffset);\n\t\t\tif(edge->rightFace)\n\t\t\t\tedge->rightFace  = (B3DPrimitiveFace*)((char*)edge->rightFace + faceOffset);\n\t\t}\n\t}\n}\n/* --INLINE-- */\n\n/* b3dRemapFills:\n\tRemap the fill list using the given offset\n*/\n/* INLINE b3dRemapFills(fillList, offset) */\nvoid b3dRemapFills(B3DFillList *fillList, int offset)\n{\n\tB3DPrimitiveFace *temp;\n\tif(fillList->firstFace)\n\t\tfillList->firstFace = (B3DPrimitiveFace *)((char*)fillList->firstFace + offset);\n\tif(fillList->lastFace)\n\t\tfillList->lastFace = (B3DPrimitiveFace *)((char*)fillList->lastFace  + offset);\n\ttemp = fillList->firstFace;\n\twhile(temp) {\n\t\tif(temp->nextFace)\n\t\t\ttemp->nextFace = (B3DPrimitiveFace *)((char*)temp->nextFace + offset);\n\t\tif(temp->prevFace)\n\t\t\ttemp->prevFace = (B3DPrimitiveFace *)((char*)temp->prevFace + offset);\n\t\ttemp = temp->nextFace;\n\t}\n}\n/* --INLINE-- */\n\n/* b3dRemapEdgeList:\n\tRemap all edge pointers using the given offset\n*/\n/* INLINE b3dRemapEdgeList(list, edgeOffset) */\nvoid b3dRemapEdgeList(B3DPrimitiveEdgeList *list, int edgeOffset)\n{\n\tint i;\n\tfor(i=0; i<list->size;i++) {\n\t\tlist->data[i] = (B3DPrimitiveEdge *)((char*) list->data[i] + edgeOffset);\n\t}\n}\n/* --INLINE-- */\n\n/* b3dRemapAET:\n\tRemap all edge pointers using the given offset\n*/\n/* INLINE b3dRemapAET(list, edgeOffset, aetOffset, firstEdge, lastEdge) */\nvoid b3dRemapAET(B3DActiveEdgeTable *list, int edgeOffset, int aetOffset, void *firstEdge, void *lastEdge)\n{\n\tint i;\n\tif(edgeOffset)\n\t\tfor(i=0; i<list->size;i++)\n\t\t\tlist->data[i] = (B3DPrimitiveEdge *)((char*) list->data[i] + edgeOffset);\n\n\tif((void*)list->leftEdge >= firstEdge && (void*)list->leftEdge < lastEdge)\n\t\tlist->leftEdge = (B3DPrimitiveEdge *)((char*) list->leftEdge + edgeOffset);\n\telse if(list->leftEdge)\n\t\tlist->leftEdge = (B3DPrimitiveEdge *)((char*) list->leftEdge + aetOffset);\n\n\tif((void*)list->rightEdge >= firstEdge && (void*)list->rightEdge < lastEdge)\n\t\tlist->rightEdge = (B3DPrimitiveEdge *)((char*) list->rightEdge + edgeOffset);\n\telse if(list->rightEdge)\n\t\tlist->rightEdge = (B3DPrimitiveEdge *)((char*) list->rightEdge + aetOffset);\n\n\tif(aetOffset) {\n\t\tlist->nextIntersection = (B3DPrimitiveEdge *)((char*) list->nextIntersection + aetOffset);\n\t\tlist->lastIntersection = (B3DPrimitiveEdge *)((char*) list->lastIntersection + aetOffset);\n\t}\n}\n/* --INLINE-- */\n\n/* b3dRemapEdgeVertices:\n\tRemap all vertices in the specified range using the given offset\n*/\n/* INLINE b3dRemapEdgeVertices(list, vtxOffset, firstVtx, lastVtx) */\nvoid b3dRemapEdgeVertices(B3DEdgeAllocList *list, int vtxOffset, void *firstVtx, void *lastVtx)\n{\n\tint i;\n\tfor(i=0; i<list->size; i++) {\n\t\tB3DPrimitiveEdge *edge = list->data + i;\n\t\tif((edge->flags & B3D_ALLOC_FLAG) && ((void*)edge->v0 >= (void*)firstVtx) && ((void*)edge->v0 < (void*)lastVtx)) {\n\t\t\tedge->v0 = (B3DPrimitiveVertex *)((char*) edge->v0 + vtxOffset);\n\t\t\t edge->v1 = (B3DPrimitiveVertex *)((char*) edge->v1 + vtxOffset);\n\t\t}\n\t}\n}\n/* --INLINE-- */\n\n/* b3dRemapFaceVertices:\n\tRemap all vertices in the specified range using the given offset\n*/\n/* INLINE b3dRemapFaceVertices(list, vtxOffset, firstVtx, lastVtx) */\nvoid b3dRemapFaceVertices(B3DFaceAllocList *list, int vtxOffset, void *firstVtx, void *lastVtx)\n{\n\tint i;\n\tfor(i=0; i<list->size; i++) {\n\t\tB3DPrimitiveFace *face = list->data + i;\n\t\tif((face->flags & B3D_ALLOC_FLAG) && ((void*)face->v0 >= (void*)firstVtx) && ((void*)face->v0 < (void*)lastVtx)) {\n\t\t\tface->v0 = (B3DPrimitiveVertex *)((char*) face->v0 + vtxOffset);\n\t\t\tface->v1 = (B3DPrimitiveVertex *)((char*) face->v1 + vtxOffset);\n\t\t\tface->v2 = (B3DPrimitiveVertex *)((char*) face->v2 + vtxOffset);\n\t\t}\n\t}\n}\n/* --INLINE-- */\n\n/* b3dRemapFaceFree:\n\tRemap all free faces using the given offset\n*/\n/* INLINE b3dRemapFaceFree(list, faceOffset) */\nvoid b3dRemapFaceFree(B3DFaceAllocList *list, int faceOffset)\n{\n\tB3DPrimitiveFace *freeObj;\n\tif(list->firstFree) {\n\t\tlist->firstFree = (B3DPrimitiveFace *)((char*)list->firstFree + faceOffset);\n\t\tfreeObj = list->firstFree;\n\t\twhile(freeObj->nextFree) {\n\t\t\tfreeObj->nextFree= (B3DPrimitiveFace *)((char*) freeObj->nextFree + faceOffset);\n\t\t\tfreeObj = freeObj->nextFree;\n\t\t}\n\t}\n}\n/* --INLINE-- */\n\n/* b3dRemapEdgeFree:\n\tRemap all free edges using the given offset\n*/\n/* INLINE b3dRemapEdgeFree(list, edgeOffset) */\nvoid b3dRemapEdgeFree(B3DEdgeAllocList *list, int edgeOffset)\n{\n\tB3DPrimitiveEdge *freeObj;\n\tif(list->firstFree) {\n\t\tlist->firstFree = (B3DPrimitiveEdge *)((char*)list->firstFree + edgeOffset);\n\t\tfreeObj = list->firstFree;\n\t\twhile(freeObj->nextFree) {\n\t\t\tfreeObj->nextFree = (B3DPrimitiveEdge *)((char*) freeObj->nextFree + edgeOffset);\n\t\t\tfreeObj = freeObj->nextFree;\n\t\t}\n\t}\n}\n/* --INLINE-- */\n\n/* b3dRemapAttrFree:\n\tRemap all free attributes using the given offset\n*/\n/* INLINE b3dRemapAttrFree(list, attrOffset) */\nvoid b3dRemapAttributes(B3DAttrAllocList *list, int attrOffset)\n{\n\tint i;\n\tfor(i=0; i < list->size; i++) {\n\t\tB3DPrimitiveAttribute *attr = list->data + i;\n\t\tif(attr->next)\n\t\t\tattr->next = (B3DPrimitiveAttribute *)((char*) attr->next + attrOffset);\n\t}\n}\n/* --INLINE-- */\n\n/* b3dValidateAndRemapState:\n\tValidate the rasterizer state and remap the objects if necessary.\n*/\nint b3dValidateAndRemapState(B3DRasterizerState *state)\n{\n\tint faceOffset, edgeOffset, attrOffset, aetOffset, objOffset, i;\n\tB3DPrimitiveObject *obj;\n\n\tif(!state) return B3D_GENERIC_ERROR;\n\t\n\t/* Check the magic numbers */\n\tif(state->faceAlloc->magic  != B3D_FACE_ALLOC_MAGIC) return B3D_MAGIC_ERROR;\n\tif(state->edgeAlloc->magic  != B3D_EDGE_ALLOC_MAGIC) return B3D_MAGIC_ERROR;\n\tif(state->attrAlloc->magic  != B3D_ATTR_ALLOC_MAGIC) return B3D_MAGIC_ERROR;\n\tif(state->aet->magic        != B3D_AET_MAGIC) return B3D_MAGIC_ERROR;\n\tif(state->addedEdges->magic != B3D_EDGE_LIST_MAGIC) return B3D_MAGIC_ERROR;\n\tif(state->fillList->magic   != B3D_FILL_LIST_MAGIC) return B3D_MAGIC_ERROR;\n\n\t/* Check if we need to relocate objects */\n\tfaceOffset = (int)state->faceAlloc - (int)state->faceAlloc->This;\n\tedgeOffset = (int)state->edgeAlloc - (int)state->edgeAlloc->This;\n\tattrOffset = (int)state->attrAlloc - (int)state->attrAlloc->This;\n\taetOffset = (int)state->aet - (int)state->aet->This;\n\t\n\t/* remap faces */\n\tif(attrOffset || edgeOffset)\n\t\tb3dRemapFaces(state->faceAlloc, attrOffset, edgeOffset);\n\t\n\t/* remap fills and edges */\n\tif(faceOffset) {\n\t\tb3dRemapFills(state->fillList, faceOffset);\n\t\tb3dRemapEdges(state->edgeAlloc, faceOffset);\n\t\tb3dRemapFaceFree(state->faceAlloc, faceOffset);\n\t}\n\t\n\t/* Remap AET */\n\tif(edgeOffset || aetOffset) {\n\t\tvoid *firstEdge = state->edgeAlloc->data;\n\t\tvoid *lastEdge = state->edgeAlloc->data + state->edgeAlloc->size;\n\t\tb3dRemapAET(state->aet, edgeOffset, aetOffset, firstEdge, lastEdge);\n\t}\n\n\t/* Remap addedEdges and edge free list*/\n\tif(edgeOffset) {\n\t\tb3dRemapEdgeList(state->addedEdges, edgeOffset);\n\t\tb3dRemapEdgeFree(state->edgeAlloc, edgeOffset);\n\t}\n\n\tif(attrOffset)\n\t\tb3dRemapAttributes(state->attrAlloc, attrOffset);\n\t\n\tstate->faceAlloc->This = (void*) state->faceAlloc;\n\tstate->edgeAlloc->This = (void*) state->edgeAlloc;\n\tstate->attrAlloc->This = (void*) state->attrAlloc;\n\tstate->aet->This = (void*) state->aet;\n\n\t/* Remap any vertex pointers */\n\tfor(i=0; i<state->nObjects; i++) {\n\t\tobj = state->objects[i];\n\t\tif(obj->magic != B3D_PRIMITIVE_OBJECT_MAGIC) return B3D_MAGIC_ERROR;\n\t\tobjOffset = (int)obj - (int)obj->This;\n\t\tif(objOffset) {\n\t\t\tif((obj->flags & B3D_OBJECT_ACTIVE)) {\n\t\t\t\tB3DPrimitiveVertex *firstVtx = obj->vertices;\n\t\t\t\tB3DPrimitiveVertex *lastVtx = obj->vertices + obj->nVertices;\n\t\t\t\tb3dRemapFaceVertices(state->faceAlloc, objOffset, firstVtx, lastVtx);\n\t\t\t\tb3dRemapEdgeVertices(state->edgeAlloc, objOffset, firstVtx, lastVtx);\n\t\t\t}\n\t\t\tobj->vertices = (B3DPrimitiveVertex*) (obj + 1);\n\t\t\tobj->faces = (B3DInputFace*) (obj->vertices + obj->nVertices);\n\t\t}\n\t\tobj->This = (void*) obj;\n\t}\n\n\treturn B3D_NO_ERROR;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/Squeak3D/b3dTypes.h",
    "content": "/****************************************************************************\n*   PROJECT: Balloon 3D Graphics Subsystem for Squeak\n*   FILE:    b3dTypes.h\n*   CONTENT: Type declarations for the B3D rasterizer\n*\n*   AUTHOR:  Andreas Raab (ar)\n*   ADDRESS: Walt Disney Imagineering, Glendale, CA\n*   EMAIL:   andreasr@wdi.disney.com\n*   RCSID:   $Id: b3dTypes.h 2 2001-10-24 23:11:49Z rowledge $\n*\n*   NOTES:\n*\n*\n*****************************************************************************/\n#ifndef B3D_TYPES_H\n#define B3D_TYPES_H\n\n#ifndef NULL\n#define NULL ((void*)0)\n#endif\n\n/* Error constants */\n#define B3D_NO_ERROR 0\n/* Generic error */\n#define B3D_GENERIC_ERROR -1\n/* Bad magic number */\n#define B3D_MAGIC_ERROR -2\n\n/* Note: The error codes that allow resuming\n\t\tmust be positive. They'll be combined\n\t\twith the resume codes */\n/* no more space in edge allocation list */\n#define B3D_NO_MORE_EDGES 1\n/* no more space in face allocation list */\n#define B3D_NO_MORE_FACES 2\n/* no more space in attribute allocation list */\n#define B3D_NO_MORE_ATTRS 3\n/* no more space in active edge table */\n#define B3D_NO_MORE_AET   4\n/* no more space for added edges */\n#define B3D_NO_MORE_ADDED 5\n\n/* Resume codes */\n#define B3D_RESUME_MASK 0xF0000\n/* Resume adding objects/edges */\n#define B3D_RESUME_ADDING   0x10000\n/* Resume merging added edges */\n#define B3D_RESUME_MERGING  0x20000\n/* Resume painting faces */\n#define B3D_RESUME_PAINTING 0x40000\n/* Resume updating the AET */\n#define B3D_RESUME_UPDATING 0x80000\n\n/* Factor to convert from float to fixed pt */\n#define B3D_FloatToFixed 4096.0\n/* Factor to convert from fixed pt to float */\n#define B3D_FixedToFloat 0.000244140625\n/* Shift value to convert from integer to fixed pt */\n#define B3D_IntToFixedShift 12\n#define B3D_FixedToIntShift 12\n/* 0.5 in fixed pt representation */\n#define B3D_FixedHalf 2048\n\n/* Max. possible x value */\n#define B3D_MAX_X 0x7FFFFFFF\n\n/* Allocation flag: If this flag is not set then the nextFree pointer is valid */\n#define B3D_ALLOC_FLAG 1\n\n/************************ PrimitiveColor definition ************************/\ntypedef unsigned char B3DPrimitiveColor[4];\n\n/* An ugly hack but I can't find the global defs in CodeWarrior on the Mac */\n#ifndef LSB_FIRST\n\t#define MSB_FIRST\n#endif\n\n#ifndef MSB_FIRST\n\t#define RED_INDEX 0\n\t#define GREEN_INDEX 1\n\t#define BLUE_INDEX 2\n\t#define ALPHA_INDEX 3\n#else\n\t#define ALPHA_INDEX 0\n\t#define BLUE_INDEX 1\n\t#define GREEN_INDEX 2\n\t#define RED_INDEX 3\n#endif\n\n/************************ PrimitiveVertex definition ************************/\ntypedef struct B3DPrimitiveVertex {\n\tfloat position[3];\n\tfloat normal[3];\n\tfloat texCoord[2];\n\tfloat rasterPos[4];\n\tunion {\n\t\tint pixelValue32;\n\t\tB3DPrimitiveColor color;\n\t} cc;\n\tint clipFlags;\n\tint windowPos[2];\n} B3DPrimitiveVertex;\n\n/* sort order for primitive vertices */\n#define vtxSortsBefore(vtx1, vtx2) ( (vtx1)->windowPosY == (vtx2)->windowPosY ? (vtx1)->windowPosX <= (vtx2)->windowPosX : (vtx1)->windowPosY <= (vtx2)->windowPosY)\n\n/************************ InputFace definition ************************/\n/* Note: The following is mainly so that we don't need these weird int[3] declarations. */\ntypedef struct B3DInputFace {\n\tint i0;\n\tint i1;\n\tint i2;\n} B3DInputFace;\n\ntypedef struct B3DInputQuad {\n\tint i0;\n\tint i1;\n\tint i2;\n\tint i3;\n} B3DInputQuad;\n\n/************************ PrimitiveEdge definition ************************/\n/* Edge flags:\n    B3D_EDGE_CONTINUE_LEFT  - continue with the lower edge of the left face\n\tB3D_EDGE_CONTINUE_RIGHT - continue with the lower edge of the right face\n\tB3D_EDGE_LEFT_MAJOR     - edge is major edge for left face\n\tB3D_EDGE_RIGHT_MAJOR    - edge is major edge for right face\n*/\n\n#define B3D_EDGE_CONTINUE_LEFT  0x10\n#define B3D_EDGE_CONTINUE_RIGHT 0x20\n#define B3D_EDGE_LEFT_MAJOR     0x40\n#define B3D_EDGE_RIGHT_MAJOR    0x80\n\ntypedef struct B3DPrimitiveEdge {\n\tint flags;\n\tstruct B3DPrimitiveEdge *nextFree;\n\n\t/* start/end of edge */\n\tstruct B3DPrimitiveVertex *v0;\n\tstruct B3DPrimitiveVertex *v1;\n\n\t/* left/right face of edge (NOT meant literally) */\n\tstruct B3DPrimitiveFace *leftFace;\n\tstruct B3DPrimitiveFace *rightFace;\n\n\t/* current x/z value */\n\tint xValue;\n\tfloat zValue;\n\t/* x/z increment per scan line */\n\tint xIncrement;\n\tfloat zIncrement;\n\n\t/* number of remaining scan lines */\n\tint nLines;\n} B3DPrimitiveEdge;\n\n\n/* B3DPrimitiveEdgeList: A list of pointers to primitive edges */\n#define B3D_EDGE_LIST_MAGIC  0x45553342\ntypedef struct B3DPrimitiveEdgeList {\n\tint magic;\n\tvoid *This;\n\tint start;\n\tint size;\n\tint max;\n\tB3DPrimitiveEdge *data[1];\n} B3DPrimitiveEdgeList;\n\n/* B3DActiveEdgeTable: The active edge table (basically a primitive\n\tedge table with few additional entries) */\n#define B3D_AET_MAGIC   0x41455420\ntypedef struct B3DActiveEdgeTable {\n\tint magic;\n\tvoid *This;\n\tint start;\n\tint size;\n\tint max;\n\t/* Backups for proceeding after failure */\n\tint yValue;\n\tB3DPrimitiveEdge *leftEdge;\n\tB3DPrimitiveEdge *rightEdge;\n\tB3DPrimitiveEdge *lastIntersection;\n\tB3DPrimitiveEdge *nextIntersection;\n\t/* That's where lastIntersection and nextIntersection point to */\n\tB3DPrimitiveEdge tempEdge0;\n\tB3DPrimitiveEdge tempEdge1;\n\t/* Actual data */\n\tB3DPrimitiveEdge *data[1];\n} B3DActiveEdgeTable ;\n\n/************************ PrimitiveFace definition ************************/\n\n/* Face flags:\n\tB3D_FACE_INITIALIZED - have the face attributes been initialized?!\n\tB3D_FACE_ACTIVE      - is the face currently in the fill list?!\n\tB3D_FACE_HAS_ALPHA   - can the face eventually be transparent?!\n\n    B3D_FACE_RGB         - R,G,B interpolation values\n\tB3D_FACE_ALPHA       - Alpha interpolation values\n\tB3D_FACE_STW         - S,T,W interpolation values\n*/\n\n#define B3D_FACE_INITIALIZED 0x10\n#define B3D_FACE_ACTIVE      0x20\n#define B3D_FACE_HAS_ALPHA   0x40\n\n#define B3D_FACE_RGB         0x100\n#define B3D_FACE_ALPHA       0x200\n#define B3D_FACE_STW         0x400\n\n/* # of possible combinations AND maximum (e.g., R+G+B+A+S+T+W) of attribs */\n/* NOTE: This is a really ugly hack - I'll have to fix that */\n#define B3D_MAX_ATTRIBUTES 8\n/* mask out the face attributes */\n#define B3D_ATTR_MASK 0x7\n/* shift for getting the attributes */\n#define B3D_ATTR_SHIFT 8\n\ntypedef struct B3DPrimitiveFace {\n\tint flags;\n\tstruct B3DPrimitiveFace *nextFree;\n\n\t/* The three vertices of the face */\n\tstruct B3DPrimitiveVertex *v0;\n\tstruct B3DPrimitiveVertex *v1;\n\tstruct B3DPrimitiveVertex *v2;\n\n\t/* The links for the (depth sorted) list of fills */\n\tstruct B3DPrimitiveFace *prevFace;\n\tstruct B3DPrimitiveFace *nextFace;\n\n\t/* The left and right edge of the face (not taken too literally) */\n\tstruct B3DPrimitiveEdge *leftEdge;\n\tstruct B3DPrimitiveEdge *rightEdge;\n\n\t/* The deltas for the major (e.g., v0-v2) and the first minor (e.g., v0-v1) edge */\n\tfloat majorDx, majorDy;\n\tfloat minorDx, minorDy;\n\n\t/* The inverse area covered by (twice) the triangle */\n\tfloat oneOverArea;\n\n\t/* Depth attributes are kept here since we almost always need 'em */\n\tfloat minZ, maxZ;\n\tfloat dzdx, dzdy;\n\n\t/* The pointer to the texture */\n\tstruct B3DTexture *texture;\n\t/* The pointer to the extended (per face) interpolation values */\n\tstruct B3DPrimitiveAttribute *attributes;\n} B3DPrimitiveFace;\n\n\n/* B3DFillList: A (depth-sorted) list of primitive faces */\n#define B3D_FILL_LIST_MAGIC  0x46443342\ntypedef struct B3DFillList {\n\tint magic;\n\tvoid *This;\n\tB3DPrimitiveFace *firstFace;\n\tB3DPrimitiveFace *lastFace;\n} B3DFillList;\n\n/************************ PrimitiveAttribute definition ************************/\n\ntypedef struct B3DPrimitiveAttribute {\n\t/* Note: next is either nextFree or or nextUsed */\n\tstruct B3DPrimitiveAttribute *next;\n\t/* value at the face->v0 */\n\tfloat value;\n\t/* value / dx derivative for face */\n\tfloat dvdx;\n\t/* value / dy derivative for face */\n\tfloat dvdy;\n} B3DPrimitiveAttribute;\n\n/************************ Texture definition ************************/\n#define B3D_TEXTURE_POWER_OF_2 0x10\ntypedef struct B3DTexture {\n\tint width;\n\tint height;\n\tint depth;\n\tint rowLength; /* 32bit words per scan line */\n\tint sMask;\t/* Nonzero for power of two width */\n\tint sShift;\n\tint tMask;\t/* Nonzero for power of two height */\n\tint tShift;\n\tint cmSize; /* length of color map */\n\tunsigned int *colormap;\n\tunsigned int *data;\n} B3DTexture;\n\n/************************ PrimitiveViewport definition ************************/\n\ntypedef struct B3DPrimitiveViewport {\n\tint x0, y0, x1, y1;\n} B3DPrimitiveViewport;\n\n/************************ PrimitiveObject definition ************************/\n#define B3D_OBJECT_ACTIVE 0x10\n#define B3D_OBJECT_DONE   0x20\n\n#define B3D_PRIMITIVE_OBJECT_MAGIC  0x4F443342\ntypedef struct B3DPrimitiveObject {\n\tint magic;\n\tvoid *This;\n\tint __oop__; /* actual ST oop */\n\tstruct B3DPrimitiveObject *next;\n\tstruct B3DPrimitiveObject *prev;\n\n\tint flags;\n\n\tint textureIndex;\n\tstruct B3DTexture *texture;\n\n\tint minX, maxX, minY, maxY;\n\tfloat minZ, maxZ;\n\n\tint nSortedFaces;\n\tint nInvalidFaces;\n\t\n\n\tint start;\n\tint nFaces;\n\tB3DInputFace *faces;\n\tint nVertices;\n\tB3DPrimitiveVertex *vertices;\n} B3DPrimitiveObject;\n\n/* sort order for primitive objects */\n#define objSortsBefore(obj1, obj2) ( (obj1)->minY == (obj2)->minY ? (obj1)->minX <= (obj2)->minX : (obj1)->minY <= (obj2)->minY)\n\n#endif /* ifndef B3D_TYPES_H */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/SqueakFFIPrims/sqFFI.h",
    "content": "/****************************************************************************\n*   PROJECT: Squeak foreign function interface support routines\n*   FILE:    sqFFI.h\n*   CONTENT: Declarations for the foreign function interface support routines\n*\n*   AUTHORS: Andreas Raab (ar), Eliot Miranda (eem), Josh Gargus (jcg)\n*   ADDRESS: Teleplace, Inc.\n*   EMAIL:   {andreas.raab,eliot,josh}@teleplace.com\n*\n*****************************************************************************/\n#ifndef SQ_FFI_H\n#define SQ_FFI_H\n\n/* Set the log file name for logging call-outs */\nint ffiLogFileNameOfLength(void *nameIndex, int nameLength);\nint ffiLogCallOfLength(void *nameIndex, int nameLength);\n\n/* The following are for creating, manipulating, and destroying \"manual surfaces\".          \n   These are surfaces that are managed by Squeak code, which has manual control\n   over the memory location where the image data is stored (the pointer used may\n   be obtained via FFI calls, or other means).\n\n   Upon creation, no memory is allocated for the surface.  Squeak code is\n   responsible for passing in a pointer to the memory to use.  It is OK to set\n   the pointer to different values, or to NULL.  If the pointer is NULL, then\n   BitBlt calls to ioLockSurface() will fail.\n\n   createManualFunction() returns a non-negative surface ID if successful, and\n   -1 otherwise.  The other return true for success, and false for failure.\n*/\n#include \"../SurfacePlugin/SurfacePlugin.h\"\nvoid initManualSurfaceFunctionPointers(fn_ioRegisterSurface reg, fn_ioUnregisterSurface unreg, fn_ioFindSurface find);\nint createManualSurface(int width, int height, int rowPitch, int depth, int isMSB);\nint destroyManualSurface(int surfaceID);\nint setManualSurfacePointer(int surfaceID, void* ptr);\n\n#endif /* SQ_FFI_H */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/SqueakFFIPrims/sqFFIPlugin.c",
    "content": "/****************************************************************************\n*   PROJECT: Squeak threaded foreign function interface\n*   FILE:    sqFFIPlugin.c\n*   CONTENT: C support code for the threaded FFIPlugin\n*\n*   AUTHOR:  Eliot Miranda\n*   ADDRESS: Teleplace, Inc.\n*\n*\n*****************************************************************************/\n\n#include <stdio.h>\n#if !WIN32 && !__FreeBSD__\n# include <alloca.h>\n#endif\n#include <string.h>\n\n#ifdef _MSC_VER\n# define alloca _alloca\n#endif\n\n/* this is a stub through which floating-point register arguments can be loaded\n * prior to an FFI call proper.  e.g. on the PowerPC this would be declared as\n *\textern void loadFloatRegs(double, double, double, double,\n *\t                          double, double, double, double);\n * and called with the appropriate values necessary to load the floating-point\n * argument registers.  Immediately after the actual call is made, using the\n * undisturbed register contents created by the call of loadFloatRegs.\n */\nvoid\nloadFloatRegs(void) { return; }\n\nstatic FILE *ffiLogFile = NULL;\n\nint\nffiLogFileNameOfLength(void *nameIndex, int nameLength)\n{\n\tif (nameIndex && nameLength) {\n\t\tchar *fileName;\n\t\tFILE *fp;\n\n\t\tif (!(fileName = alloca(nameLength+1)))\n\t\t\treturn 0;\n\t\tstrncpy(fileName, nameIndex, nameLength);\n\t\tfileName[nameLength] = 0;\n\t\t/* attempt to open the file and if we can't, fail */\n\t\tif (!(fp = fopen(fileName, \"at\")))\n\t\t\treturn 0;\n\t\t/* close the old log file if needed and use the new one */\n\t\tif (ffiLogFile)\n\t\t\tfclose(ffiLogFile);\n\t\tffiLogFile = fp;\n\t\tfprintf(ffiLogFile, \"------- Log started -------\\n\");\n\t\tfflush(fp);\n\t}\n\telse {\n\t\tif (ffiLogFile)\n\t\t\tfclose(ffiLogFile);\n\t\tffiLogFile = NULL;\n\t}\n\treturn 1;\n}\n\nint\nffiLogCallOfLength(void *nameIndex, int nameLength)\n{\n    if (!ffiLogFile)\n\t\treturn 0;\n    fprintf(ffiLogFile, \"%.*s\\n\", nameLength, (char *)nameIndex);\n    fflush(ffiLogFile);\n\treturn 1;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/SqueakFFIPrims/sqFFITestFuncs.c",
    "content": "/*****************************************************************************/\n/*****************************************************************************/\n/*****************************************************************************/\n/************ Test functions for the foreign function interface **************/\n/*****************************************************************************/\n/*****************************************************************************/\n/*****************************************************************************/\n#ifndef NO_FFI_TEST\n# include \"sq.h\"\n\n# define LONGLONG sqLong /* should be 64 bits */\n\ntypedef struct ffiTestPoint2 {\n\tint x;\n\tint y;\n} ffiTestPoint2;\n\ntypedef struct ffiTestPoint4 {\n\tint x;\n\tint y;\n\tint z;\n\tint w;\n} ffiTestPoint4;\n\n#pragma export on\nEXPORT(char) ffiTestChars(char c1, char c2, char c3, char c4);\nEXPORT(short) ffiTestShorts(short c1, short c2, short c3, short c4);\nEXPORT(int) ffiTestInts(int c1, int c2, int c3, int c4);\nEXPORT(int) ffiTestInts8(int c1, int c2, int c3, int c4, int c5, int c6, int c7, int c8);\nEXPORT(float) ffiTestFloats(float f1, float f2);\nEXPORT(float) ffiTestFloats7(float f1, float f2, float f3, float f4, float f5, float f6, float f7);\nEXPORT(float) ffiTestFloats13(float f1, float f2, float f3, float f4, float f5, float f6, float f7, float f8, float f9, float f10, float f11, float f12, float f13);\nEXPORT(float) ffiTestFloats14(float f1, float f2, float f3, float f4, float f5, float f6, float f7, float f8, float f9, float f10, float f11, float f12, float f13, float f14);\nEXPORT(double) ffiTestDoubles14(double f1, double f2, double f3, double f4, double f5, double f6, double f7, double f8, double f9, double f10, double f11, double f12, double f13, double f14);\nEXPORT(double) ffiTestDoubles(double d1, double d2);\nEXPORT(char *) ffiPrintString(char *string);\nEXPORT(ffiTestPoint2) ffiTestStruct64(ffiTestPoint2 pt1, ffiTestPoint2 pt2);\nEXPORT(ffiTestPoint4) ffiTestStructBig(ffiTestPoint4 pt1, ffiTestPoint4 pt2);\nEXPORT(ffiTestPoint4*) ffiTestPointers(ffiTestPoint4 *pt1, ffiTestPoint4 *pt2);\nEXPORT(LONGLONG) ffiTestLongLong(LONGLONG i1, LONGLONG i2);\nEXPORT(LONGLONG) ffiTestLongLong8(char c1, char c2, char c3, char c4, char c5, char c6, char c7, char c8, LONGLONG i1, LONGLONG i2);\nEXPORT(LONGLONG) ffiTestLongLong8a1(char c1, char c2, char c3, char c4, char c5, char c6, char c7, char c8, char c9, LONGLONG i1, LONGLONG i2);\nEXPORT(LONGLONG) ffiTestLongLong8a2(char c1, char c2, char c3, char c4, char c5, char c6, char c7, char c8, char c9,  char c10, LONGLONG i1, LONGLONG i2);\nEXPORT(LONGLONG) ffiTestLongLonga1(char c1, LONGLONG i1, LONGLONG i2);\nEXPORT(LONGLONG) ffiTestLongLonga2(char c1, char c2, LONGLONG i1, LONGLONG i2);\n#pragma export off\n\n\n/* test passing characters */\nEXPORT(char) ffiTestChars(char c1, char c2, char c3, char c4) {\n\tprintf(\"4 characters came in as\\nc1 = %c (%x)\\nc2 = %c (%x)\\nc3 = %c (%x)\\nc4 = %c (%x)\\n\", c1, c1, c2, c2, c3, c3, c4, c4);\n\treturn c1+c2;\n}\n\n/* test passing shorts */\nEXPORT(short) ffiTestShorts(short c1, short c2, short c3, short c4) {\n\tprintf(\"4 shorts came in as\\ns1 = %d (%x)\\ns2 = %d (%x)\\ns3 = %d (%x)\\ns4 = %d (%x)\\n\", c1, c1, c2, c2, c3, c3, c4, c4);\n\treturn c1+c2;\n}\n\n/* test passing ints */\nEXPORT(int) ffiTestInts(int c1, int c2, int c3, int c4) {\n\tprintf(\"4 ints came in as\\ni1 = %d (%x)\\ni2 = %d (%x)\\ni3 = %d (%x)\\ni4 = %d (%x)\\n\", c1, c1, c2, c2, c3, c3, c4, c4);\n\treturn c1+c2;\n}\n\nEXPORT(int) ffiTestInts8(int c1, int c2, int c3, int c4, int c5, int c6, int c7, int c8) {\n\tprintf(\"4 ints came in as\\ni1 = %d (%x)\\ni2 = %d (%x)\\ni3 = %d (%x)\\ni4 = %d (%x)\\ni5 = %d (%x)\\ni6 = %d (%x)\\ni7 = %d (%x)\\ni8 = %d (%x)\\n\", c1, c1, c2, c2, c3, c3, c4, c4, c5, c5, c6, c6, c7, c7, c8, c8);\n\treturn 42;\n}\n\n\n/* test passing and returning floats */\nEXPORT(float) ffiTestFloats(float f1, float f2) {\n\tprintf(\"The two floats are %f and %f\\n\", f1, f2);\n\treturn (float) (f1 + f2);\n}\n\nEXPORT(float) ffiTestFloats7(float f1, float f2, float f3, float f4, float f5, float f6, float f7) {\n\tprintf(\"The 7 floats are %f %f %f %f %f %f %f\\n\", f1, f2, f3, f4, f5, f6, f7);\n\treturn (float) (f1 + f2 + f3 + f4 + f5 + f6 + f7);\n}\n\nEXPORT(float) ffiTestFloats13(float f1, float f2, float f3, float f4, float f5, float f6, float f7, float f8, float f9, float f10, float f11, float f12, float f13) {\n\tprintf(\"The 13 floats are %f %f %f %f %f %f %f %f %f %f %f %f %f\\n\", f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13);\n\treturn (float) (f1 + f2 + f3 + f4 + f5 + f6 + f7 + f8 + f9 + f10 + f11 + f12 + f13);\n}\n\nEXPORT(float) ffiTestFloats14(float f1, float f2, float f3, float f4, float f5, float f6, float f7, float f8, float f9, float f10, float f11, float f12, float f13, float f14) {\n\tprintf(\"The 14 floats are %f %f %f %f %f %f %f %f %f %f %f %f %f\\n\", f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13);\n\treturn (float) (f1 + f2 + f3 + f4 + f5 + f6 + f7 + f8 + f9 + f10 + f11 + f12 + f13 + f14);\n}\n\nEXPORT(double) ffiTestDoubles14(double f1, double f2, double f3, double f4, double f5, double f6, double f7, double f8, double f9, double f10, double f11, double f12, double f13, double f14) {\n\tprintf(\"The 14 double are %f %f %f %f %f %f %f %f %f %f %f %f %f\\n\", f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13);\n\treturn (double) (f1 + f2 + f3 + f4 + f5 + f6 + f7 + f8 + f9 + f10 + f11 + f12 + f13 + f14);\n}\n\n/* test passing and returning doubles */\nEXPORT(double) ffiTestDoubles(double d1, double d2) {\n\tprintf(\"The two floats are %f and %f\\n\", (float)d1, (float)d2);\n\treturn d1+d2;\n}\n\n/* test passing and returning strings */\nEXPORT(char*) ffiPrintString(char *string) {\n\tprintf(\"%s\\n\", string);\n\treturn string;\n}\n\n/* test passing and returning 64bit structures */\nEXPORT(ffiTestPoint2) ffiTestStruct64(ffiTestPoint2 pt1, ffiTestPoint2 pt2) {\n\tffiTestPoint2 result;\n\tprintf(\"pt1.x = %d\\npt1.y = %d\\npt2.x = %d\\npt2.y = %d\\n\",\n\t\t\tpt1.x, pt1.y, pt2.x, pt2.y);\n\tresult.x = pt1.x + pt2.x;\n\tresult.y = pt1.y + pt2.y;\n\treturn result;\n}\n\n/* test passing and returning large structures */\nEXPORT(ffiTestPoint4) ffiTestStructBig(ffiTestPoint4 pt1, ffiTestPoint4 pt2) {\n\tffiTestPoint4 result;\n\tprintf(\"pt1.x = %d\\npt1.y = %d\\npt1.z = %d\\npt1.w = %d\\n\",\n\t\t\tpt1.x, pt1.y, pt1.z, pt1.w);\n\tprintf(\"pt2.x = %d\\npt2.y = %d\\npt2.z = %d\\npt2.w = %d\\n\",\n\t\t\tpt2.x, pt2.y, pt2.z, pt2.w);\n\tresult.x = pt1.x + pt2.x;\n\tresult.y = pt1.y + pt2.y;\n\tresult.z = pt1.z + pt2.z;\n\tresult.w = pt1.w + pt2.w;\n\treturn result;\n}\n\n/* test passing and returning pointers */\nEXPORT(ffiTestPoint4*) ffiTestPointers(ffiTestPoint4 *pt1, ffiTestPoint4 *pt2) {\n\tffiTestPoint4 *result;\n\tprintf(\"pt1.x = %d\\npt1.y = %d\\npt1.z = %d\\npt1.w = %d\\n\",\n\t\t\tpt1->x, pt1->y, pt1->z, pt1->w);\n\tprintf(\"pt2.x = %d\\npt2.y = %d\\npt2.z = %d\\npt2.w = %d\\n\",\n\t\t\tpt2->x, pt2->y, pt2->z, pt2->w);\n\tresult = (ffiTestPoint4*) malloc(sizeof(ffiTestPoint4));\n\tresult->x = pt1->x + pt2->x;\n\tresult->y = pt1->y + pt2->y;\n\tresult->z = pt1->z + pt2->z;\n\tresult->w = pt1->w + pt2->w;\n\treturn result;\n}\n\n/* test passing and returning longlongs */\nEXPORT(LONGLONG) ffiTestLongLong(LONGLONG i1, LONGLONG i2) {\n\treturn i1 + i2;\n}\n\nEXPORT(LONGLONG) ffiTestLongLonga1(char c1, LONGLONG i1, LONGLONG i2) {\n\treturn c1 + i1 + i2;\n}\n\nEXPORT(LONGLONG) ffiTestLongLonga2(char c1, char c2, LONGLONG i1, LONGLONG i2) {\n\treturn c1 + c2 + i1 + i2;\n}\n\nEXPORT(LONGLONG) ffiTestLongLong8(char c1, char c2, char c3, char c4, char c5, char c6, char c7, char c8, LONGLONG i1, LONGLONG i2) {\n\treturn c1+c2+c3+c4+c5+c6+c7+c8+i1 + i2;\n}\n\nEXPORT(LONGLONG) ffiTestLongLong8a1(char c1, char c2, char c3, char c4, char c5, char c6, char c7, char c8, char c9, LONGLONG i1, LONGLONG i2) {\n\treturn c1+c2+c3+c4+c5+c6+c7+c8+c9+i1 + i2;\n}\n\nEXPORT(LONGLONG) ffiTestLongLong8a2(char c1, char c2, char c3, char c4, char c5, char c6, char c7, char c8, char c9, char c10, LONGLONG i1, LONGLONG i2) {\n\treturn c1+c2+c3+c4+c5+c6+c7+c8+c9+c10+i1 + i2;\n}\n\n#endif /* NO_FFI_TEST */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/SqueakFFIPrims/sqManualSurface.c",
    "content": "#include \"sqFFI.h\"\r\n#include \"sq.h\"\r\n\r\n#include \"sqVirtualMachine.h\"\r\nextern struct VirtualMachine* interpreterProxy;\r\n\r\n/* Need separate cases for GNU C and MSVC. */\r\n#ifdef DEBUG \r\n#warning \"DEBUG printing enabled\"\r\n#define DPRINTF(x) warnPrintf x\r\n#elif defined(_DEBUG)\r\n#pragma message ( \"DEBUG printing enabled\" )\r\n#define DPRINTF(x) warnPrintf x\r\n#else\r\n#define DPRINTF(x)\r\n#endif\r\n\r\n#ifndef NULL\r\n#define NULL 0\r\n#endif\r\n#ifndef FALSE\r\n#define FALSE 0\r\n#endif\r\n#ifndef TRUE\r\n#define TRUE 1\r\n#endif\r\n\r\n/* Don't want to mess with EXPORT status of functions in SurfacePlugin.c,\r\n   we use function-pointers here. */\r\nstatic fn_ioRegisterSurface registerSurface = NULL;\r\nstatic fn_ioUnregisterSurface unregisterSurface = NULL;\r\nstatic fn_ioFindSurface findSurface = NULL;\r\nvoid initSurfacePluginFunctionPointers()\r\n{\r\n\tregisterSurface = (fn_ioRegisterSurface) interpreterProxy->ioLoadFunctionFrom(\"ioRegisterSurface\",\"SurfacePlugin\");\r\n\tunregisterSurface = (fn_ioUnregisterSurface) interpreterProxy->ioLoadFunctionFrom(\"ioUnregisterSurface\",\"SurfacePlugin\");\r\n\tfindSurface = (fn_ioFindSurface) interpreterProxy->ioLoadFunctionFrom(\"ioFindSurface\",\"SurfacePlugin\");\r\n}\r\n\r\n/* This is the structure that represents a \"manual surface\".  These are \r\n   created/destroyed by new primitives in this plugin.  During it's life-time,\r\n   it may be touched directly from Squeak code to set/clear \"ptr\", and also\r\n   treated as a generic surface via BitBlt's use of the SurfacePlugin. */\r\ntypedef struct {\r\n\tint width;\r\n\tint height;\r\n\tint rowPitch;\r\n\tint depth;\r\n\tint isMSB;\r\n\tvoid* ptr;\r\n\tint isLocked;\r\n} ManualSurface;\r\n\r\n/* Create the dispatch-table that SurfacePlugin will use to interact with\r\n   instances of \"struct ManualSurface\" */\r\nstatic int manualSurfaceGetFormat(ManualSurface* surface, int* width, int* height, int* depth, int* isMSB);\r\nstatic void* manualSurfaceLock(ManualSurface* surface, int *pitch, int x, int y, int w, int h);\r\nstatic int manualSurfaceUnlock(ManualSurface* surface, int x, int y, int w, int h);\r\nstatic int manualSurfaceShow(ManualSurface* surface, int x, int y, int w, int h);\r\nstatic sqSurfaceDispatch manualSurfaceDispatch = {\r\n  1,\r\n  0,\r\n  (fn_getSurfaceFormat) manualSurfaceGetFormat,\r\n  (fn_lockSurface) manualSurfaceLock,\r\n  (fn_unlockSurface) manualSurfaceUnlock,\r\n  (fn_showSurface) manualSurfaceShow\r\n};\r\n\r\n/* sqSurfaceDispatch functions *****************************************************************************/\r\n\r\nint manualSurfaceGetFormat(ManualSurface* surface, int* width, int* height, int* depth, int* isMSB) {\r\n\t*width = surface->width;\r\n\t*height = surface->height;\r\n\t*depth = surface->depth;\r\n\t*isMSB = surface->isMSB;\r\n\tDPRINTF((\"Getting Surface Format: %lx %d %d %d %d\\n\", ((int) surface), *width, *height, *depth, *isMSB));\r\n\treturn 1;\r\n}\r\n\r\nvoid* manualSurfaceLock(ManualSurface* surface, int *pitch, int x, int y, int w, int h) {\r\n\t/* Ideally, would be atomic.  But it doens't matter for the forseeable future,\r\n\t   since it is only called via BitBlt primitives. */\r\n\tint wasLocked = surface->isLocked;\r\n\tsurface->isLocked = 1; \r\n\t\r\n\t/* Can't lock if it was already locked. */\r\n\tif (wasLocked) return NULL;\r\n\t\r\n\t/* If there is no pointer, the lock-attempt fails. */\r\n\tif (!surface->ptr) {\r\n\t\tsurface->isLocked = 0;\r\n\t\treturn NULL;\r\n\t}\r\n\t\r\n\t/* Success!  Return the pointer. */\r\n\t*pitch = surface->rowPitch;\r\n\tDPRINTF((\"Locked Surface: %lx Input Rect: %d %d %d %d  Row Pitch: %d\\n\", ((int) surface), x, y, w, h, *pitch));\r\n\treturn surface->ptr;\r\n}\r\n\r\nint manualSurfaceUnlock(ManualSurface* surface, int x, int y, int w, int h) {\r\n    surface->isLocked = 0;\r\n\tDPRINTF((\"Unlocked Surface: %lx Rect: %d %d %d %d\\n\", ((int) surface), x, y, w, h));\r\n\treturn 1;\t\r\n}\r\n\r\nint manualSurfaceShow(ManualSurface* surface, int x, int y, int w, int h) {\r\n\t/* Unsupported */\r\n\treturn 0;\r\n}\r\n\r\n/* primitive interface functions (i.e. called from Squeak) *********************************************/\r\n\r\n/* Answer non-negative surfaceID if successful, and -1 for failure. */\r\nint createManualSurface(int width, int height, int rowPitch, int depth, int isMSB) {\r\n\tManualSurface* newSurface;\r\n\tint surfaceID;\r\n\tint result;\r\n\t\r\n\tif (width < 0) return -1;\r\n\tif (height < 0) return -1;\r\n\tif (rowPitch < (width*depth)/8) return -1;\r\n\tif (depth < 1 || depth > 32) return -1;\r\n\tif (!registerSurface) return -1; /* failure... couldn't init function-pointer */\r\n\t\r\n\tnewSurface = (ManualSurface*)malloc(sizeof(ManualSurface));\r\n\tif (!newSurface) return -1;\r\n\tnewSurface->width = width;\r\n\tnewSurface->height = height;\r\n\tnewSurface->rowPitch = rowPitch;\r\n\tnewSurface->depth = depth;\r\n\tnewSurface->isMSB = isMSB;\r\n\tnewSurface->ptr = NULL;\r\n\tnewSurface->isLocked = FALSE;\r\n\t\r\n\tresult = registerSurface((int)newSurface, &manualSurfaceDispatch, &surfaceID);\r\n\tif (!result) {\r\n\t\t/* Failed to register surface. */\r\n\t\tfree(newSurface);\r\n\t\treturn -1;\r\n\t}\r\n\telse {\r\n\t\treturn surfaceID;\r\n\t}\r\n}\r\n\r\nint destroyManualSurface(int surfaceID) {\r\n\tif (!unregisterSurface) return 0; /* failure... couldn't init function-pointer */\r\n\telse return unregisterSurface(surfaceID);\r\n}\r\n\r\nint setManualSurfacePointer(int surfaceID, void* ptr) {\r\n\tint surfaceHandle;\r\n\tManualSurface *surface;\r\n\tint result;\r\n\tif (!findSurface) return FALSE; /* failure... couldn't init function-pointer */\r\n\tresult = findSurface(surfaceID, NULL, &surfaceHandle);\r\n\tif (!result) return FALSE; /* failed to find surface */\r\n\tsurface = (ManualSurface*)surfaceHandle;\t\r\n\tif (surface->isLocked) return FALSE; /* can't set pointer while surface is locked */\r\n\tsurface->ptr = ptr;\r\n\tDPRINTF((\"Set Surface: %lx Pointer: %lx\\n\", surfaceID, ((int)ptr) ));\r\n\treturn TRUE;\r\n}\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/SqueakSSL/SqueakSSL.h",
    "content": "#ifndef SqueakSSL_H\r\n#define SqueakSSL_H\r\n\r\n/*************************/\r\n/* SSL connection states */\r\n/*************************/\r\n\r\n#define SQSSL_UNUSED 0\r\n#define SQSSL_ACCEPTING 1\r\n#define SQSSL_CONNECTING 2\r\n#define SQSSL_CONNECTED 3\r\n\r\n/********************************************/\r\n/* Return codes from the core SSL functions */\r\n/********************************************/\r\n\r\n#define SQSSL_OK 0\r\n#define SQSSL_NEED_MORE_DATA -1\r\n#define SQSSL_INVALID_STATE -2\r\n#define SQSSL_BUFFER_TOO_SMALL -3\r\n#define SQSSL_INPUT_TOO_LARGE -4\r\n#define SQSSL_GENERIC_ERROR -5\r\n#define SQSSL_OUT_OF_MEMORY -6\r\n\r\n/**************************************/\r\n/* SqueakSSL certificate status bits. */\r\n/**************************************/\r\n\r\n#define SQSSL_NO_CERTIFICATE -1\r\n#define SQSSL_OTHER_ISSUE    0x0001\r\n#define SQSSL_UNTRUSTED_ROOT 0x0002\r\n#define SQSSL_CERT_EXPIRED   0x0004\r\n#define SQSSL_WRONG_USAGE    0x0008\r\n#define SQSSL_INVALID_CN     0x0010\r\n#define SQSSL_CERT_REVOKED   0x0020\r\n\r\n\r\n/****************************************/\r\n/* SqueakSSL getInt/setInt property IDs */\r\n/****************************************/\r\n#define SQSSL_PROP_VERSION  0\r\n#define SQSSL_PROP_LOGLEVEL 1\r\n#define SQSSL_PROP_SSLSTATE 2\r\n#define SQSSL_PROP_CERTSTATE 3\r\n\r\n/**********************************************/\r\n/* SqueakSSL getString/setString property IDs */\r\n/**********************************************/\r\n#define SQSSL_PROP_PEERNAME 0\r\n#define SQSSL_PROP_CERTNAME 1\r\n\r\n/* sqCreateSSL: Creates a new SSL instance.\r\n\tArguments: None.\r\n\tReturns: SSL handle.\r\n*/\r\nsqInt sqCreateSSL(void);\r\n\r\n/* sqDestroySSL: Destroys an SSL instance.\r\n\tArguments:\r\n\t\thandle - the SSL handle\r\n\tReturns: Non-zero if successful.\r\n*/\r\nsqInt sqDestroySSL(sqInt handle);\r\n\r\n/* sqAcceptSSL: Start/continue an SSL server handshake.\r\n\tArguments:\r\n\t\thandle - the SSL handle\r\n\t\tsrcBuf - the input token sent by the remote peer\r\n\t\tsrcLen - the size of the input token\r\n\t\tdstBuf - the output buffer for a new token\r\n\t\tdstLen - the size of the output buffer\r\n\tReturns: The size of the output token or an error code.\r\n*/\r\nsqInt sqAcceptSSL(sqInt handle, char* srcBuf, sqInt srcLen, char *dstBuf, sqInt dstLen);\r\n\r\n/* sqConnectSSL: Start/continue an SSL client handshake.\r\n\tArguments:\r\n\t\thandle - the SSL handle\r\n\t\tsrcBuf - the input token sent by the remote peer\r\n\t\tsrcLen - the size of the input token\r\n\t\tdstBuf - the output buffer for a new token\r\n\t\tdstLen - the size of the output buffer\r\n\tReturns: The size of the output token or an error code.\r\n*/\r\nsqInt sqConnectSSL(sqInt handle, char* srcBuf, sqInt srcLen, char *dstBuf, sqInt dstLen);\r\n\r\n/* sqEncryptSSL: Encrypt data for SSL transmission.\r\n\tArguments:\r\n\t\thandle - the SSL handle\r\n\t\tsrcBuf - the unencrypted input data\r\n\t\tsrcLen - the size of the input data\r\n\t\tdstBuf - the output buffer for the encrypted contents\r\n\t\tdstLen - the size of the output buffer\r\n\tReturns: The size of the output generated or an error code.\r\n*/\r\nsqInt sqEncryptSSL(sqInt handle, char* srcBuf, sqInt srcLen, char *dstBuf, sqInt dstLen);\r\n\r\n/* sqDecryptSSL: Decrypt data for SSL transmission.\r\n\tArguments:\r\n\t\thandle - the SSL handle\r\n\t\tsrcBuf - the encrypted input data\r\n\t\tsrcLen - the size of the input data\r\n\t\tdstBuf - the output buffer for the decrypted contents\r\n\t\tdstLen - the size of the output buffer\r\n\tReturns: The size of the output generated or an error code.\r\n*/\r\nsqInt sqDecryptSSL(sqInt handle, char* srcBuf, sqInt srcLen, char *dstBuf, sqInt dstLen);\r\n\r\n/* sqGetStringPropertySSL: Retrieve a string property from SSL.\r\n\tArguments:\r\n\t\thandle - the ssl handle\r\n\t\tpropID - the property id to retrieve\r\n\tReturns: The string value of the property.\r\n*/\r\nchar* sqGetStringPropertySSL(sqInt handle, int propID);\r\n\r\n/* sqSetStringPropertySSL: Set a string property in SSL.\r\n\tArguments:\r\n\t\thandle - the ssl handle\r\n\t\tpropID - the property id to retrieve\r\n\t\tpropName - the property string\r\n\t\tpropLen  - the length of the property string\r\n\tReturns: Non-zero if successful.\r\n*/\r\nsqInt sqSetStringPropertySSL(sqInt handle, int propID, char *propName, sqInt propLen);\r\n\r\n/* sqGetIntPropertySSL: Retrieve an integer property from SSL.\r\n\tArguments:\r\n\t\thandle - the ssl handle\r\n\t\tpropID - the property id to retrieve\r\n\tReturns: The integer value of the property.\r\n*/\r\nsqInt sqGetIntPropertySSL(sqInt handle, sqInt propID);\r\n\r\n/* sqSetIntPropertySSL: Set an integer property in SSL.\r\n\tArguments:\r\n\t\thandle - the ssl handle\r\n\t\tpropID - the property id to retrieve\r\n\t\tpropValue - the property value\r\n\tReturns: Non-zero if successful.\r\n*/\r\nsqInt sqSetIntPropertySSL(sqInt handle, sqInt propID, sqInt propValue);\r\n\r\n#endif\r\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/SurfacePlugin/SurfacePlugin.c",
    "content": "/*\n\tThis file contains the low-level support code for OS\n\tsurfaces. Since FXBlt may operate on any of these\n\tsome functions must be provided by the client. It is\n\tcrucial that every client creating surfaces for use\n\tby Squeak registers the surfaces using the functions\n\tprovided here. Other concrete primitives (such as\n\tcreation or destroy) of surfaces can be handled by\n\tadditional support code, querying the surface handle\n\tfrom ioFindSurface but the functions provided below\n\tare critical for any BitBlt operations.\n*/\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n#include \"sqVirtualMachine.h\"\n#include \"sqConfig.h\"\n#include \"sqPlatformSpecific.h\"\n#include \"SurfacePlugin.h\"\n\n/* internal plugin support */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n#define EXPORT(returnType) static returnType\n#endif\n\ntypedef struct SqueakSurface {\n\tint handle; /* client supplied handle */\n\tsqSurfaceDispatch *dispatch;\n} SqueakSurface;\n\nstatic SqueakSurface *surfaceArray = NULL;\nstatic int numSurfaces = 0;\nstatic int maxSurfaces = 0;\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nstatic const char *moduleName = \"SurfacePlugin \"__DATE__\" (i)\";\n#else\nstatic const char *moduleName = \"SurfacePlugin \"__DATE__\" (e)\";\n#endif\n\nstatic VirtualMachine *interpreterProxy;\n#define FAIL { interpreterProxy->primitiveFail(); return 0; }\n\n#pragma export on\n/* module initialization/shutdown */\nEXPORT(int) setInterpreter(struct VirtualMachine *interpreterProxy);\nEXPORT(const char*) getModuleName(void);\nEXPORT(int) initialiseModule(void);\nEXPORT(int) shutdownModule(void);\n\n/* critical FXBlt entry points */\nEXPORT(int) ioGetSurfaceFormat (int surfaceID, int* width, int* height, int* depth, int* isMSB);\nEXPORT(int) ioLockSurface (int surfaceID, int *pitch, int x, int y, int w, int h);\nEXPORT(int) ioUnlockSurface(int surfaceID, int x, int y, int w, int h);\n\n/* interpreter entry point */\nEXPORT(int) ioShowSurface(int surfaceID, int x, int y, int w, int h);\n\n/* client entry points */\nEXPORT(int) ioRegisterSurface(int surfaceHandle, sqSurfaceDispatch *fn, int *surfaceID);\nEXPORT(int) ioUnregisterSurface(int surfaceID);\nEXPORT(int) ioFindSurface(int surfaceID, sqSurfaceDispatch *fn, int *surfaceHandle);\n#pragma export off\n\n/* ioGetSurfaceFormat:\n\tReturn information describing the given surface.\n\tReturn true if successful, false otherwise. */\nEXPORT(int) ioGetSurfaceFormat (int surfaceID, int* width, int* height, int* depth, int* isMSB)\n{\n\tSqueakSurface *surface;\n\tif(surfaceID < 0 || surfaceID >= maxSurfaces) FAIL;\n\tsurface = surfaceArray + surfaceID;\n\tif(surface->dispatch == NULL) FAIL;\n\tif(!surface->dispatch->getSurfaceFormat) FAIL;\n\treturn surface->dispatch->getSurfaceFormat(surface->handle, width, height, depth, isMSB);\n}\n\n/* ioLockSurface:\n\tLock the bits of the surface. \n\tReturn a pointer to the actual surface bits,\n\tor NULL on failure. */\nEXPORT(int) ioLockSurface (int surfaceID, int *pitch, int x, int y, int w, int h)\n{\n\tSqueakSurface *surface;\n\tif(surfaceID < 0 || surfaceID >= maxSurfaces) FAIL;\n\tsurface = surfaceArray + surfaceID;\n\tif(surface->dispatch == NULL) FAIL;\n\tif(!surface->dispatch->lockSurface) FAIL;\n\treturn surface->dispatch->lockSurface(surface->handle, pitch, x, y, w, h);\n}\n\n/* ioUnlockSurface:\n\tUnlock the bits of the surface. \n\tThe return value is ignored. */\nEXPORT(int) ioUnlockSurface(int surfaceID, int x, int y, int w, int h)\n{\n\tSqueakSurface *surface;\n\tif(surfaceID < 0 || surfaceID >= maxSurfaces) FAIL;\n\tsurface = surfaceArray + surfaceID;\n\tif(surface->dispatch == NULL) FAIL;\n\tif(!surface->dispatch->unlockSurface) FAIL;\n\treturn surface->dispatch->unlockSurface(surface->handle, x, y, w, h);\n}\n\n/* ioShowSurface:\n\tTransfer the bits of a surface to the screen. */\nEXPORT(int) ioShowSurface(int surfaceID, int x, int y, int w, int h)\n{\n\tSqueakSurface *surface;\n\tif(surfaceID < 0 || surfaceID >= maxSurfaces) FAIL;\n\tsurface = surfaceArray + surfaceID;\n\tif(surface->dispatch == NULL) FAIL;\n\tif(!surface->dispatch->showSurface) FAIL;\n\treturn surface->dispatch->showSurface(surface->handle, x, y, w, h);\n}\n\n/* ioRegisterSurface:\n\tRegister a new surface with the given handle and\n\tthe set of surface functions. The new ID is returned\n\tin surfaceID. Returns true if successful, false \n\totherwise. */\nEXPORT(int) ioRegisterSurface(int surfaceHandle, sqSurfaceDispatch *fn, int *surfaceID)\n{\n\tint index;\n\n\tif(!fn) return 0;\n\tif(fn->majorVersion != 1 && fn->minorVersion != 0) return 0;\n\tif(numSurfaces == maxSurfaces) {\n\t\tmaxSurfaces = maxSurfaces * 2 + 10;\n\t\tsurfaceArray = realloc(surfaceArray, sizeof(SqueakSurface) * maxSurfaces);\n\t\tfor(index = numSurfaces; index < maxSurfaces; index++){\n\t\t\tsurfaceArray[index].handle = 0;\n\t\t\tsurfaceArray[index].dispatch = NULL;\n\t\t}\n\t\tindex = numSurfaces;\n\t} else {\n\t\tfor(index = 0; index < maxSurfaces; index++)\n\t\t\tif(surfaceArray[index].dispatch == NULL)\n\t\t\t\tbreak;\n\t}\n\tif(index >= maxSurfaces) return 0; /* should not happen */\n\tsurfaceArray[index].handle = surfaceHandle;\n\tsurfaceArray[index].dispatch = fn;\n\t*surfaceID = index;\n\tnumSurfaces++;\n\treturn 1;\n}\n\n/* ioUnregisterSurface:\n\tUnregister the surface with the given handle.\n\tReturns true if successful, false otherwise. */\nEXPORT(int) ioUnregisterSurface(int surfaceID)\n{\n\tSqueakSurface *surface;\n\tif(surfaceID < 0 || surfaceID >= maxSurfaces) return 0;\n\tsurface = surfaceArray + surfaceID;\n\tif(surface->dispatch == NULL) return 0;\n\tsurface->handle = 0;\n\tsurface->dispatch = NULL;\n\tnumSurfaces--;\n\treturn 1;\n}\n\n/* ioFindSurface:\n\tFind the surface with the given ID, and, optionally,\n\tthe given set of surface functions. The registered handle\n\tis returned in surfaceHandle. Return true if successful\n\t(e.g., the surface has been found), false otherwise. */\nEXPORT(int) ioFindSurface(int surfaceID, sqSurfaceDispatch *fn, int *surfaceHandle)\n{\n\tSqueakSurface *surface;\n\tif(surfaceID < 0 || surfaceID >= maxSurfaces) return 0;\n\tsurface = surfaceArray + surfaceID;\n\tif(surface->dispatch == NULL) return 0;\n\tif(fn && fn != surface->dispatch) return 0;\n\t*surfaceHandle = surface->handle;\n\treturn 1;\n}\n\nEXPORT(int) setInterpreter(struct VirtualMachine* anInterpreter) {\n    int ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\nEXPORT(const char*) getModuleName(void) {\n\treturn moduleName;\n}\n\nEXPORT(int) initialiseModule() {\n\tsurfaceArray = NULL;\n\tnumSurfaces = 0;\n\tmaxSurfaces = 0;\n\treturn 1;\n}\n\nEXPORT(int) shutdownModule() {\n\t/* This module can only be shut down if no surfaces are registered */\n\tif(numSurfaces != 0) return 0;\n\tfree(surfaceArray);\n\treturn 1;\n}\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nvoid* SurfacePlugin_exports[][3] = {\n  {\"SurfacePlugin\", \"setInterpreter\", (void*)setInterpreter},\n  {\"SurfacePlugin\", \"getModuleName\", (void*)getModuleName},\n  {\"SurfacePlugin\", \"initialiseModule\", (void*)initialiseModule},\n  {\"SurfacePlugin\", \"shutdownModule\", (void*)shutdownModule},\n  {\"SurfacePlugin\", \"ioGetSurfaceFormat\", (void*)ioGetSurfaceFormat},\n  {\"SurfacePlugin\", \"ioLockSurface\", (void*)ioLockSurface},\n  {\"SurfacePlugin\", \"ioUnlockSurface\", (void*)ioUnlockSurface},\n  {\"SurfacePlugin\", \"ioShowSurface\", (void*)ioShowSurface},\n  {\"SurfacePlugin\", \"ioRegisterSurface\", (void*)ioRegisterSurface},\n  {\"SurfacePlugin\", \"ioUnregisterSurface\", (void*)ioUnregisterSurface},\n  {\"SurfacePlugin\", \"ioFindSurface\", (void*)ioFindSurface},\n  {NULL, NULL, NULL}\n};\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/SurfacePlugin/SurfacePlugin.h",
    "content": "#ifndef __SQ_DRAW_SURFACE_H\n#define __SQ_DRAW_SURFACE_H\n/* v1.0 */\n#define SQ_SURFACE_MAJOR 1\n#define SQ_SURFACE_MINOR 0\n\n/* Plugins creating their own surfaces must register these using\n   the following set of functions. The typedefs are for easier casts. */\ntypedef int (*fn_getSurfaceFormat)(int surfaceHandle, int* width, int* height, int* depth, int* isMSB);\ntypedef int (*fn_lockSurface)(int surfaceHandle, int *pitch, int x, int y, int w, int h);\ntypedef int (*fn_unlockSurface)(int surfaceHandle, int x, int y, int w, int h);\ntypedef int (*fn_showSurface)(int surfaceHandle, int x, int y, int w, int h);\n\ntypedef struct sqSurfaceDispatch {\n\t/* Version information. Must be provided by the client\n\t   so the surface manager can check if certain operations\n\t   are supported. */\n\tint majorVersion;\n\tint minorVersion;\n\n\t/* Version 1.0 */\n\tfn_getSurfaceFormat getSurfaceFormat;\n\tfn_lockSurface lockSurface;\n\tfn_unlockSurface unlockSurface;\n\tfn_showSurface showSurface;\n} sqSurfaceDispatch;\n\n/* The functions for sqSurfaceDispatch are:\n\n\tint getSurfaceFormat(int handle, int* width, int* height, int* depth, int* isMSB);\n\t\tReturn general information about the OS drawing surface.\n\t\tReturn true if successful, false otherwise.\n\n\t\tThe returned values describe the basic properties such as\n\t\twidth, height, depth and LSB vs. MSB pixels.\n\n\tint lockSurface(int handle, int *pitch, int x, int y, int w, int h);\n\t\tLock the bits of the surface.\n\t\tReturn a pointer to the actual surface bits, or NULL on failure.\n\t\tIf successful, store the pitch of the surface (e.g., the bytes\n\t\tper scan line).\n\n\t\tFor equal source/dest handles only one locking operation is performed.\n\t\tThis is to prevent locking of overlapping areas which does not work with\n\t\tcertain APIs (e.g., DirectDraw prevents locking of overlapping areas). \n\t\tA special case for non-overlapping but equal source/dest handle would \n\t\tbe possible but we would have to transfer this information over to \n\t\tunlockSurfaces somehow (currently, only one unlock operation is \n\t\tperformed for equal source and dest handles). Also, this would require\n\t\ta change in the notion of ioLockSurface() which is right now interpreted\n\t\tas a hint and not as a requirement to lock only the specific portion of\n\t\tthe surface.\n\n\t\tThe arguments in ioLockSurface() provide the implementation with\n\t\tan explicit hint what area is affected. It can be very useful to\n\t\tknow the max. affected area beforehand if getting the bits requires expensive\n\t\tcopy operations (e.g., like a roundtrip to the X server or a glReadPixel op).\n\t\tHowever, the returned pointer *MUST* point to the virtual origin of the surface\n\t\tand not to the beginning of the rectangle. The promise made by BitBlt\n\t\tis to never access data outside the given rectangle (aligned to 4byte boundaries!)\n\t\tso it is okay to return a pointer to the virtual origin that is actually outside\n\t\tthe valid memory area.\n\n\t\tThe area provided in ioLockSurface() is already clipped (e.g., it will always\n\t\tbe inside the source and dest boundingBox) but it is not aligned to word boundaries\n\t\tyet. It is up to the support code to compute accurate alignment if necessary.\n\n\tint unlockSurface(int handle, int x, int y, int w, int h);\n\t\tUnlock the bits of a (possibly modified) surface after BitBlt completed.\n\t\tThe return value is ignored.\n\n\t\tThe arguments provided specify the dirty region of the surface. If the\n\t\tsurface is unmodified all arguments are set to zero.\n\n\tint showSurface(int handle, int x, int y, int w, int h);\n\t\tDisplay the contents of the surface on the actual screen.\n\n\t\tIf ioShowSurface() is called the surface in question represents\n\t\ta Squeak DisplayScreen.\n\n\tFXBlt uses a variant of the above functions which are exported from\n\tthe surface plugin:\n\n\tint ioGetSurfaceFormat(int surfaceID, int* width, int* height, int* depth, int* isMSB);\n\tint ioLockSurface(int surfaceID, int *pitch, int x, int y, int w, int h);\n\tint ioUnlockSurface(int surfaceID, int x, int y, int w, int h);\n\n\tThese functions are looked up in the registered surfaces and invoked\n\tas appropriate. The meaning of all values is exactly the same as for\n\tthe functions specified in sqSurfaceDispatch with the exception that\n\tthe surfaceID represents the 'bits' handle of the Form that is used\n\twithin FXBlt.\n\n\tInterpreter itself uses a separate entry point for updating the display\n\n\tint ioShowSurface(int surfaceID, int x, int y, int w, int h);\n\n\tsince the management of deferred updates is currently an intrinsic\n\tproperty of the VM (which is bad - deferred updates should be a\n\tproperty of the DisplayScreen in question and not of the VM but\n\tthat's the way it is...).\n\n*/\n\n/* The following are the entry points for the surface manager:\n\n\tint ioRegisterSurface(int surfaceHandle, sqSurfaceDispatch *fn, int *surfaceID);\n\t\tRegister a new surface with the given handle and\n\t\tthe set of surface functions. The new ID is returned\n\t\tin surfaceID. Returns true if successful, false \n\t\totherwise.\n\n\tint ioUnregisterSurface(int surfaceID);\n\t\tUnregister the surface with the given handle.\n\t\tReturns true if successful, false otherwise.\n\n\tint ioFindSurface(int surfaceID, sqSurfaceDispatch *fn, int *surfaceHandle);\n\t\tFind the surface with the given ID, and, optionally,\n\t\tthe given set of surface functions. The registered handle\n\t\tis returned in surfaceHandle. Return true if successful\n\t\t(e.g., the surface has been found), false otherwise.\n\n\tThe above entry points can be looked up through the interpreter, e.g., using\n\t\tinterpreterProxy->ioLoadFunctionFrom(\"ioRegisterSurface\",\"SurfacePlugin\");\n\tThe typedefs below are for easier casts.\n*/\ntypedef int (*fn_ioRegisterSurface)(int surfaceHandle, sqSurfaceDispatch *fn, int *surfaceID);\ntypedef int (*fn_ioUnregisterSurface)(int surfaceID);\ntypedef int (*fn_ioFindSurface)(int surfaceID, sqSurfaceDispatch *fn, int *surfaceHandle);\n\n#endif /* __SQ_DRAW_SURFACE_H */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/plugins/UUIDPlugin/UUIDPlugin.h",
    "content": "/* UUID generation. Note that we typedef sqUUID as a generic 128 bit value so that platform specific code can coerce appropriately. */\n\ntypedef char sqUUID[16];\n\nint MakeUUID(sqUUID location);\nint sqUUIDInit();\nint sqUUIDShutdown();\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/vm/dispdbg.h",
    "content": "/*\n * Break-pointer debugging facilities for the StackInterpreter VM.\n * Edit this to install various debugging traps.  In a production\n * VM this header should define only the assert macros and empty\n * sendBreakpointreceiver and bytecodeDispatchDebugHook macros.\n */\n\n#include \"sqAssert.h\"\n\n#if !defined(VMBIGENDIAN)\n# error \"sqConfig.h does not define VMBIGENDIAN\"\n#elif !((VMBIGENDIAN == 1) || (VMBIGENDIAN == 0))\n# error \"sqConfig.h does not define VMBIGENDIAN as either 1 or 0\"\n#endif\n\n/*\n * various definitions of the sendBreakpointreceiver macro for break-pointing at\n * specific sends.\n */\n#if PRODUCTION /* default for no send breakpoint. */\n# define sendBreakpointreceiver(sel, len, rcvr) 0\n\n#elif 0 /* send tracing.  */\n# define sendBreakpointreceiver(sel, len, rcvr) do { \\\n\tif (sendTrace) \\\n\t\tprintf(\"%.*s\\n\", len, (char *)(sel)); \\\n} while (0)\n\n#elif 0 /* send trace/byte count.  */\n# define sendBreakpointreceiver(sel, len, rcvr) do { \\\n\tif (sendTrace) \\\n\t\tprintf(\"%u %.*s\\n\", GIV(byteCount), len, (char *)(sel)); \\\n} while (0)\n\n#elif 1 /* breakpoint without byteCount. */\n# define sendBreakpointreceiver(sel, len, rcvr) do { \\\n\tif ((len) == breakSelectorLength \\\n\t && !strncmp((char *)(sel), breakSelector, breakSelectorLength)) { \\\n\t\tsuppressHeartbeatFlag = 1; \\\n\t\twarning(\"send breakpoint (heartbeat suppressed)\"); \\\n\t\tif (0) sendTrace = 1; \\\n\t} \\\n\tif (sendTrace) { \\\n\t\tprintf(\"%.*s\\n\", len, (char *)(sel)); \\\n\t\tif (0 && !checkHeapIntegrity()) error(\"object leak\"); \\\n\t} \\\n} while (0)\n\n#elif 0 /* breakpoint with byteCount. */\n# define sendBreakpointreceiver(sel, len, rcvr) do { \\\n\tif ((len) == breakSelectorLength \\\n\t && !strncmp((char *)(sel), breakSelector, breakSelectorLength)) { \\\n\t\tsuppressHeartbeatFlag = 1; \\\n\t\twarning(\"send breakpoint (heartbeat suppressed)\"); \\\n\t\tif (0) sendTrace = 1; \\\n\t} \\\n\tif (sendTrace) \\\n\t\tprintf(\"%u %.*s\\n\", GIV(byteCount), len, (char *)(sel)); \\\n} while (0)\n#endif\n\n/*\n * various definitions of the bytecodeDispatchDebugHook macro for\n * debugging code at the bytecode dispatch switch.\n */\n#if PRODUCTION\n# define bytecodeDispatchDebugHook() 0\n\n#elif 1 /* check for valid instruction pointer */\n# define bytecodeDispatchDebugHook() do { \\\n\tif (!validInstructionPointerinMethodframePointer((usqInt)localIP, GIV(method), localFP)) \\\n\t\twarning(\"invalidInstructionPointerinMethod\"); \\\n  } while (0)\n\n#elif 0 /* check for valid stack-related pointers */\n# define DEBUG_DISABLE_HEARTBEAT 1\n# define bytecodeDispatchDebugHook() do { \\\n\tif (++GIV(byteCount) % 100000 == 0) \\\n\t\tforceInterruptCheck(); \\\n\tassertValidExecutionPointersimbar(localIP,localFP,localSP,1); \\\n  } while (0)\n\n#elif 0 /* maintain byteCount & break-point & heart-beat every 100k bytecodes */\n# define DEBUG_DISABLE_HEARTBEAT 1\n# define bytecodeDispatchDebugHook() do { \\\n\tif (++GIV(byteCount) % 100000 == 0) \\\n\t\tforceInterruptCheck(); \\\n\tif (GIV(byteCount) == -1 /*256696UL*/) { \\\n\t\tsendTrace = 1; \\\n\t\twarning(\"break byteCount reached\\n\"); \\\n\t} \\\n\tif (!((localFP < ((GIV(stackPage->baseAddress)))) \\\n\t && (localFP > (((GIV(stackPage->realStackLimit))) - (((sqInt) LargeContextSize >> 1)))))) { \\\n\t\twarning(\"invalidLocalFPInPage\"); \\\n\t\tsendTrace = 1; \\\n\t} \\\n\tif (GIV(stackLimit) != (char *)-1 && GIV(stackLimit) != GIV(stackPage->realStackLimit)) { \\\n\t\twarning(\"invalidStackLimitInPage\"); \\\n\t\tsendTrace = 1; \\\n\t} \\\n  } while (0)\n\n#elif 0 /* maintain byteCount & check for valid instruction pointer */\n# define bytecodeDispatchDebugHook() do { \\\n\tif (++GIV(byteCount) == 175779UL) \\\n\t\twarning(\"break byteCount reached\\n\"); \\\n\tif (!validInstructionPointerinMethodframePointer((usqInt)localIP, GIV(method), localFP)) \\\n\t\twarning(\"invalidInstructionPointerinMethod\"); \\\n  } while (0)\n\n#elif 0 /* maintain byteCount & check for valid instruction pointer */\n# define bytecodeDispatchDebugHook() do { \\\n\tprintf(\"%ld: %x %d\\n\", ++GIV(byteCount), localIP-GIV(method)-3, currentBytecode); \\\n\tif (!validInstructionPointerinMethodframePointer((usqInt)localIP, GIV(method), localFP)) \\\n\t\twarning(\"invalidInstructionPointerinMethod\"); \\\n\tif (sendTrace) printCallStack(); \\\n  } while (0)\n\n#elif 0 /* print current frame & instruction pointer on every bytecode. */\n# define bytecodeDispatchDebugHook() do { \\\n\tprintFrameWithSP(localFP,localSP); \\\n\tprintf(\"%d %x\\n\", localIP - GIV(method) - 3, currentBytecode); \\\n  } while (0)\n\n#elif 0 /* print current frame & pc on every bytecode if sendTrace/hit break. */\n# define bytecodeDispatchDebugHook() do { \\\n\tif (sendTrace) { \\\n\t\tprintFrameWithSP(localFP,localSP); \\\n\t\tprintf(\"%d %x\\n\", localIP - GIV(method) - 3, currentBytecode); \\\n\t} \\\n  } while (0)\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/vm/sq.h",
    "content": "/****************************************************************************\n*   PROJECT: Common include\n*   FILE:    sq.h\n*   CONTENT: \n*\n*   AUTHOR:  \n*   ADDRESS: \n*   EMAIL:   \n*   RCSID:   $Id: sq.h 1283 2005-12-31 00:51:12Z rowledge $\n*\n*/\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n# include \"squeak_adapters.h\"\n\n#include \"sqConfig.h\"\n#include \"sqMemoryAccess.h\"\n#include \"sqVirtualMachine.h\"\n\n#define true\t1\n#define false\t0\n#define null\t0  /* using \"null\" because nil is predefined in Think C */\n\n/* Pluggable primitives macros. */\n\n/* Note: All pluggable primitives are defined as\n\tEXPORT(int) somePrimitive(void)\n   If the platform requires special declaration modifiers, the EXPORT\n   macro can be redefined.\n*/\n#define EXPORT(returnType) returnType\n\n/* Image save/restore macros. */\n\n/* Note: The image file save and restore code uses these macros; they\n   can be redefined in sqPlatformSpecific.h if desired. These default\n   versions are defined in terms of the ANSI Standard C libraries.\n*/\n#define sqImageFile\t\t\t\t\t   FILE *\n#define sqImageFileClose(f)                  \t\t   fclose(f)\n#define sqImageFileOpen(fileName, mode)      \t\t   fopen(fileName, mode)\n#define sqImageFilePosition(f)               \t\t   ftell(f)\n#define sqImageFileRead(ptr, sz, count, f)   \t\t   fread(ptr, sz, count, f)\n#define sqImageFileSeek(f, pos)              \t\t   fseek(f, pos, SEEK_SET)\n#define sqImageFileWrite(ptr, sz, count, f)  \t\t   fwrite(ptr, sz, count, f)\n#define sqImageFileStartLocation(fileRef, fileName, size)  0\n\n/* Platform-dependent macros for handling object memory. */\n\n/* Note: The grow/shrink macros assume that the object memory can be extended\n   continuously at its prior end. The garbage collector cannot deal with\n   'holes' in the object memory so the support code needs to reserve the\n   virtual maximum of pages that can be allocated beforehand. The amount of\n   'extra' memory should describe the amount of memory that can be allocated\n   from the OS (including swap space if the flag is set to true) and must not\n   exceed the prior reserved memory.\n   In other words: don't you dare to report more free space then you can\n   actually allocate.\n   The default implementation assumes a fixed size memory allocated at startup.\n*/\n#define sqAllocateMemory(minHeapSize, desiredHeapSize)  malloc(desiredHeapSize)\n#define sqGrowMemoryBy(oldLimit, delta)\t\t\toldLimit\n#define sqShrinkMemoryBy(oldLimit, delta)\t\toldLimit\n#define sqMemoryExtraBytesLeft(includingSwap)\t\t0\n\n/* Platform-dependent memory size adjustment macro. */\n\n/* Note: This macro can be redefined to allows platforms with a\n   fixed application memory partition (notably, the Macintosh)\n   to reserve extra C heap memory for special applications that need\n   it (e.g., for a 3D graphics library). Since most platforms can\n   extend their application memory partition at run time if needed,\n   this macro is defined as a noop here and redefined if necessary\n   in sqPlatformSpecific.h.\n*/\n\n#define reserveExtraCHeapBytes(origHeapSize, bytesToReserve) origHeapSize\n\n/* Platform-dependent millisecond clock macros. */\n\n/* Note: The Squeak VM uses two different clock functions for timing, and\n   the Cog VMs provide a third.\n\n   The primary one, ioMSecs(), is used to implement Delay and Time\n   millisecondClockValue. The resolution of this clock\n   determines the resolution of these basic timing functions. For\n   doing real-time control of music and MIDI, a clock with resolution\n   down to one millisecond is preferred, but a coarser clock (say,\n   1/60th second) can be used in a pinch.\n\n   The function ioMicroMSecs() is used only to collect timing statistics\n   for the garbage collector and other VM facilities. (The function\n   name is meant to suggest that the function is based on a clock\n   with microsecond accuracy, even though the times it returns are\n   in units of milliseconds.) This clock must have enough precision to\n   provide accurate timings, and normally isn't called frequently\n   enough to slow down the VM. Thus, it can use a more expensive clock\n   than ioMSecs(). This function is listed in the sqVirtualMachine plugin\n   support mechanism and thus needs to be a real function, even if a macro is\n   use to point to it.\n\n   There was a third form that used to be used for quickly timing primitives in\n   order to try to keep millisecond delays up to date. That is no longer used.\n\n   By default, the basic ioMSec() clock function is defined\n   here as a macro based on the standard C library function clock().\n   Any of this can be overridden in sqPlatformSpecific.h.\n\n   The wall clock is answered by ioSeconds, which answers the number of seconds\n   since the start of the 20th century (12pm Dec 31, 1900).\n\n   The Cog VMs depend on a heartbeat to cause the VM to check for interrupts at\n   regular intervals (of the order of ever milisecond).  The heartbeat on these\n   VMs is responsible for updating a 64-bit microsecond clock with the number\n   of microseconds since the start of the 20th century (12pm Dec 31, 1900)\n   available via ioUTCMicroseconds() and ioLocalMicroseconds().  For cases\n   where exact time is required we provide ioUTCMicrosecondsNow that updates\n   the clock to return the time right now, rather than of the last heartbeat.\n*/\n\nsqInt ioMSecs(void);\n/* deprecated out of existence sqInt ioLowResMSecs(void); */\nsqInt ioMicroMSecs(void);\n\n/* duplicate the generated definition in the interpreter.  If they differ the\n * compiler will complain and catch it for us.  We use 0x1FFFFFFF instead of\n * 0x3FFFFFFF so that twice the maximum clock value remains in the positive\n * SmallInteger range.  This assumes 31 bit SmallIntegers; 0x3FFFFFFF is\n * SmallInteger maxVal.\n */\n#define MillisecondClockMask 0x1FFFFFFF\n\n#if STACKVM\nusqLong ioUTCMicrosecondsNow();\nusqLong ioUTCMicroseconds();\nusqLong ioLocalMicroseconds();\nvoid\tioUpdateVMTimezone();\nvoid\tioSynchronousCheckForEvents();\nvoid\tcheckHighPriorityTickees(usqLong);\n# if ITIMER_HEARTBEAT\t\t/* Hack; allow heartbeat to avoid */\nextern int numAsyncTickees; /* prodHighPriorityThread unless necessary */\n# endif\t\t\t\t\t\t/* see platforms/unix/vm/sqUnixHeartbeat.c */\nvoid\tioGetClockLogSizeUsecsIdxMsecsIdx(sqInt*,void**,sqInt*,void**,sqInt*);\n#endif\n\n\n/* this function should return the value of the high performance\n   counter if there is such a thing on this platform (otherwise return 0) */\nsqLong ioHighResClock(void);\n\n/* New filename converting function; used by the interpreterProxy function \n  ioFilenamefromStringofLengthresolveAliases. Most platforms can ignore the\n  resolveAlias boolean - it seems to only be of use by OSX but is crucial there.\n*/\nsqInt sqGetFilenameFromString(char * aCharBuffer, char * aFilenameString, sqInt filenameLength, sqInt aBoolean);\n\n/* Macro to provide default null behaviour for ftruncate - a non-ansi call\n   used in FilePlugin.\n   Override in sqPlatformSpecific.h for each platform that implements a\n   file truncate, or consider replacing the\n   ../Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c\n   file with a platform specific version as Win32 and RISC OS do. \n*/\n#define sqFTruncate(filenum, fileoffset) true\n\n/* Macros to support Mac browser plugin without ugly code in Interpreter. */\n\n#define insufficientMemorySpecifiedError()\terror(\"Insufficient memory for this image\")\n#define insufficientMemoryAvailableError()\terror(\"Failed to allocate memory for the heap\")\n#define unableToReadImageError()\t\terror(\"Read failed or premature end of image file\")\n#define browserPluginReturnIfNeeded()\n#define browserPluginInitialiseIfNeeded()\n\n/* Platform-specific header file may redefine earlier definitions and macros. */\n\n#include \"sqPlatformSpecific.h\"\n\n/* Interpreter entry points. */\n\n/* Disable Intel compiler inlining of error which is used for breakpoints */\n#pragma auto_inline off\nvoid error(char *s);\n#pragma auto_inline on\nsqInt checkedByteAt(sqInt byteAddress);\nsqInt checkedByteAtput(sqInt byteAddress, sqInt byte);\nsqInt checkedLongAt(sqInt byteAddress);\nsqInt checkedLongAtput(sqInt byteAddress, sqInt a32BitInteger);\nsqInt fullDisplayUpdate(void);\nsqInt interpret(void);\nsqInt primitiveFail(void);\nsqInt signalSemaphoreWithIndex(sqInt semaIndex);\nsqInt success(sqInt);\n\n/* Display, mouse, keyboard, time. */\n\nsqInt ioBeep(void);\nsqInt ioExit(void);\nsqInt ioExitWithErrorCode(int);\nsqInt ioForceDisplayUpdate(void);\nsqInt ioFormPrint(sqInt bitsAddr, sqInt width, sqInt height, sqInt depth,\n\t\t  double hScale, double vScale, sqInt landscapeFlag);\nsqInt ioSetFullScreen(sqInt fullScreen);\nsqInt ioRelinquishProcessorForMicroseconds(sqInt microSeconds);\nsqInt ioScreenSize(void);\nsqInt ioScreenDepth(void);\nsqInt ioSeconds(void);\nsqInt ioSetCursor(sqInt cursorBitsIndex, sqInt offsetX, sqInt offsetY);\nsqInt ioSetCursorWithMask(sqInt cursorBitsIndex, sqInt cursorMaskIndex, sqInt offsetX, sqInt offsetY);\nsqInt ioShowDisplay(sqInt dispBitsIndex, sqInt width, sqInt height, sqInt depth,\n\t\t    sqInt affectedL, sqInt affectedR, sqInt affectedT, sqInt affectedB);\nsqInt ioHasDisplayDepth(sqInt depth);\nsqInt ioSetDisplayMode(sqInt width, sqInt height, sqInt depth, sqInt fullscreenFlag);\n\n#if STACKVM\n/* thread subsystem support for e.g. sqExternalSemaphores.c */\nvoid ioInitThreads();\n\n/* Event polling via periodic heartbeat thread. */\nvoid  ioInitHeartbeat(void);\nint   ioHeartbeatMilliseconds(void);\nvoid  ioSetHeartbeatMilliseconds(int);\nunsigned long ioHeartbeatFrequency(int);\n\n/* Management of the external semaphore table (max size set at startup) */\n#if !defined(INITIAL_EXT_SEM_TABLE_SIZE)\n# define INITIAL_EXT_SEM_TABLE_SIZE 256\n#endif\nint   ioGetMaxExtSemTableSize(void);\nvoid  ioSetMaxExtSemTableSize(int);\n\n/* these are used both in the STACKVM & the COGMTVM */\n# if !defined(ioCurrentOSThread)\nsqOSThread ioCurrentOSThread(void);\n# endif\n# if !defined(ioOSThreadsEqual)\nint  ioOSThreadsEqual(sqOSThread,sqOSThread);\n# endif\n# if !COGMTVM\nextern sqOSThread ioVMThread;\n# define getVMOSThread() ioVMThread\n# endif\n#endif /* STACKVM */\n#if COGMTVM\n#define THRLOGSZ 256\nextern int thrlogidx;\nextern char *thrlog[];\n\n/* Debug logging that defers printing.  Use like printf, e.g.\n * TLOG(\"tryLockVMToIndex vmOwner = %d\\n\", vmOwner);\n * Requires #include \"sqAtomicOps.h\"\n * N.B. The following still isn't safe.  If enough log entries are made by other\n * threads after myindex is obtained but before asprintf completes we can get\n * two threads using the same entry.  But this is good enough for now.\n */\n#define THRLOG(...) do { int myidx, oldidx; \\\n\tdo { myidx = thrlogidx; \\\n\t\tsqCompareAndSwapRes(thrlogidx,myidx,(myidx+1)&(THRLOGSZ-1),oldidx); \\\n\t} while (myidx != oldidx); \\\n\tif (thrlog[myidx]) free(thrlog[myidx]); \\\n\tasprintf(thrlog + myidx, __VA_ARGS__); \\\n} while (0)\n\nextern sqOSThread getVMOSThread();\n/* Please read the comment for CogThreadManager in the VMMaker package for\n * documentation of this API.  N.B. code is included from sqPlatformSpecific.h\n * before the code here.  e.g.\n * # include <pthread.h>\n * # define sqOSThread pthread_t\n * # define sqOSSemaphore pthread_cond_t\n * # define ioOSThreadsEqual(a,b) pthread_equal(a,b)\n */\n# if !defined(ioGetThreadLocalThreadIndex)\nlong ioGetThreadLocalThreadIndex(void);\n# endif\n# if !defined(ioSetThreadLocalThreadIndex)\nvoid ioSetThreadLocalThreadIndex(long);\n# endif\n\n# if !defined(ioNewOSThread)\nint  ioNewOSThread(void (*func)(void *), void *);\n# endif\n# if !defined(ioExitOSThread)\nvoid ioExitOSThread(sqOSThread thread);\n# endif\n# if !defined(ioReleaseOSThreadState)\nvoid ioReleaseOSThreadState(sqOSThread thread);\n# endif\n# if !defined(ioOSThreadIsAlive)\nint  ioOSThreadIsAlive(sqOSThread);\n# endif\nint  ioNewOSSemaphore(sqOSSemaphore *);\n# if !defined(ioDestroyOSSemaphore)\nvoid ioDestroyOSSemaphore(sqOSSemaphore *);\n# endif\nvoid ioSignalOSSemaphore(sqOSSemaphore *);\nvoid ioWaitOnOSSemaphore(sqOSSemaphore *);\nint  ioNumProcessors(void);\n# if !defined(ioTransferTimeslice)\nvoid ioTransferTimeslice(void);\n# endif\n#endif /* COGMTVM */\n\n/* Profiling. */\nvoid  ioProfileStatus(sqInt *running, void **exestartpc, void **exelimitpc,\n\t\t\t\t\t  void **vmhst, long *nvmhbin, void **eahst, long *neahbin);\nvoid  ioControlProfile(int on, void **vhp, long *nvb, void **ehp, long *neb);\nlong  ioControlNewProfile(int on, unsigned long buffer_size);\nvoid  ioNewProfileStatus(sqInt *running, long *buffersize);\nlong  ioNewProfileSamplesInto(void *sampleBuffer);\nvoid  ioClearProfile(void);\n\n/* Power management. */\n\nsqInt ioDisablePowerManager(sqInt disableIfNonZero);\n\n/* User input recording I:\n   In general, either set of input function can be supported,\n   depending on the platform. This (first) set is state based\n   and should be supported even on platforms that make use\n   of the newer event driven API to support older images \n   without event support.\n*/\n\nsqInt ioGetButtonState(void);\nsqInt ioGetKeystroke(void);\nsqInt ioMousePoint(void);\nsqInt ioPeekKeystroke(void);\n/* Note: In an event driven architecture, ioProcessEvents is obsolete.\n   It can be implemented as a no-op since the image will check for\n   events in regular intervals. */\nsqInt ioProcessEvents(void);\n\n\n/* User input recording II:\n   The following functions and definition can be used on\n   platform supporting events directly.\n*/\n\n/* Event types. */\n#define EventTypeNone\t\t0\n#define EventTypeMouse\t\t1\n#define EventTypeKeyboard\t2\n#define EventTypeDragDropFiles\t3\n#define EventTypeMenu\t\t4\n#define EventTypeWindow\t\t5\n#define\tEventTypeComplex\t6\n\n/* Keypress state for keyboard events. */\n#define EventKeyChar\t0\n#define EventKeyDown\t1\n#define EventKeyUp\t2\n\n/* Button definitions. */\n#define RedButtonBit\t4\n#define YellowButtonBit\t2\n#define BlueButtonBit\t1\n\n/* Modifier definitions. */\n#define ShiftKeyBit\t1\n#define CtrlKeyBit\t2\n#define OptionKeyBit\t4\n#define CommandKeyBit\t8\n\n/* generic input event */\ntypedef struct sqInputEvent\n{\n  int type;\t\t\t/* type of event; either one of EventTypeXXX */\n  unsigned int timeStamp;\t/* time stamp */\n  /* the interpretation of the following fields depend on the type of the event */\n  int unused1;\n  int unused2;\n  int unused3;\n  int unused4;\n  int unused5;\n  int windowIndex;\t\t/* SmallInteger used in image to identify a host window structure */\n} sqInputEvent;\n\n/* mouse input event */\ntypedef struct sqMouseEvent\n{\n  int type;\t\t\t/* EventTypeMouse */\n  unsigned int timeStamp;\t/* time stamp */\n  int x;\t\t\t/* mouse position x */\n  int y;\t\t\t/* mouse position y */\n  int buttons;\t\t\t/* combination of xxxButtonBit */\n  int modifiers;\t\t/* combination of xxxKeyBit */\n  int nrClicks;\t\t\t/* number of clicks in button downs - was reserved1 */\n  int windowIndex;\t\t/* host window structure */\n} sqMouseEvent;\n\n/* keyboard input event */\ntypedef struct sqKeyboardEvent\n{\n  int type;\t\t\t/* EventTypeKeyboard */\n  unsigned int timeStamp;\t/* time stamp */\n  int charCode;\t\t\t/* character code in Mac Roman encoding */\n  int pressCode;\t\t/* press code; any of EventKeyXXX */\n  int modifiers;\t\t/* combination of xxxKeyBit */\n  int utf32Code;\t\t/* UTF-32 unicode value */\n  int reserved1;\t\t/* reserved for future use */\n  int windowIndex;\t\t/* host window structure */\n} sqKeyboardEvent;\n\n/* drop files event */\ntypedef struct sqDragDropFilesEvent\n{\n  int type;\t\t\t/* EventTypeDropFiles */\n  unsigned int timeStamp;\t/* time stamp */\n  int dragType;\t\t\t/* one of DragXXX (see below) */\n  int x;\t\t\t/* mouse position x */\n  int y;\t\t\t/* mouse position y */\n  int modifiers;\t\t/* combination of xxxKeyBit */\n  int numFiles;\t\t\t/* number of files in transaction */\n  int windowIndex;\t\t/* host window structure */\n} sqDragDropFilesEvent;\n\n#define DragEnter\t1 /* drag operation from OS entered Squeak window\t */\n#define DragMove\t2 /* drag operation from OS moved within Squeak window */\n#define DragLeave\t3 /* drag operation from OS left Squeak window\t */\n#define DragDrop\t4 /* drag operation dropped contents onto Squeak.      */\n#define DragRequest\t5 /* data request from other app. */\n\n/* menu event */\ntypedef struct sqMenuEvent\n{\n  int type;\t\t\t/* type of event; EventTypeMenu */\n  unsigned int timeStamp;\t/* time stamp */\n  /* the interpretation of the following fields depend on the type  of the event */\n  int menu;\t\t\t/* platform-dependent to indicate which menu was picked */\n  int menuItem;\t\t\t/* given a menu having 1 to N items this maps to the menu item number */\n  int reserved1;\t\t/* reserved for future use */\n  int reserved2;\t\t/* reserved for future use */\n  int reserved3;\t\t/* reserved for future use */\n  int windowIndex;\t\t/* host window structure */\n} sqMenuEvent;\n\n/* window action event */\ntypedef struct sqWindowEvent\n{\n  int type;\t\t\t/* type of event;  EventTypeWindow */\n  unsigned int timeStamp;\t/* time stamp */\n  /* the interpretation of the following fields depend on the type  of the event */\n  int action;\t\t        /* one of WindowEventXXX (see below) */\n  int value1;\t\t\t/* used for rectangle edges */\n  int value2;\t\t\t/* used for rectangle edges */\n  int value3;\t\t\t/* used for rectangle edges */\n  int value4;\t\t\t/* used for rectangle edges */\n  int windowIndex;\t\t/* host window structure */\n} sqWindowEvent;\n\n#define WindowEventMetricChange\t1 /* size or position of window changed - value1-4 are left/top/right/bottom values */\n#define WindowEventClose\t2 /* window close icon pressed */\n#define WindowEventIconise\t3 /* window iconised or hidden etc */\n#define WindowEventActivated\t4 /* window made active - some platforms only - do not rely upon this */\n#define WindowEventPaint\t5 /* window area (in value1-4) needs updating. Some platforms do not need to send this, do not rely on it in image */\n#define WindowEventStinks\t6 /* this window stinks (just to see if people read this stuff) */\n\ntypedef struct sqComplexEvent\n\t{\n\t\tint type;\t\t\t/* type of event;  EventTypeComplex */\n\t\tunsigned int timeStamp;\t/* time stamp */\n\t\t/* the interpretation of the following fields depend on the type  of the event */\n\t\tint action;\t\t        /* one of ComplexEventXXX (see below) */\n\t\tusqInt objectPointer;\t/* used to point to object */\n\t\tint unused1;\t\t\t/*  */\n\t\tint unused2;\t\t\t/*  */\n\t\tint unused3;\t\t\t/*  */\n\t\tint windowIndex;\t/* host window structure */\n\t} sqComplexEvent;\n\n#define ComplexEventTypeTouchsDown\t1 /*  */\n#define ComplexEventTypeTouchsUp\t2 /*  */\n#define ComplexEventTypeTouchsMoved\t3 /*  */\n#define ComplexEventTypeTouchsStationary 4 /*  */\n#define ComplexEventTypeTouchsCancelled\t5 /*  */\n#define ComplexEventTypeAccelerationData\t6 /*  */\n#define ComplexEventTypeLocationData\t7 /*  */\n#define ComplexEventTypeApplicationData\t8 /*  */\n\n\n/* Set an asynchronous input semaphore index for events. */\nsqInt ioSetInputSemaphore(sqInt semaIndex);\n/* Retrieve the next input event from the OS. */\nsqInt ioGetNextEvent(sqInputEvent *evt);\n\n/* Image file and VM path names. */\nextern char imageName[];\nchar *getImageName(void);\nsqInt imageNameGetLength(sqInt sqImageNameIndex, sqInt length);\nsqInt imageNamePutLength(sqInt sqImageNameIndex, sqInt length);\nsqInt imageNameSize(void);\nsqInt vmPathSize(void);\nsqInt vmPathGetLength(sqInt sqVMPathIndex, sqInt length);\nchar* ioGetLogDirectory(void);\nchar* ioGetWindowLabel(void);\n\n/* Image security traps. */\nsqInt ioCanRenameImage(void);\nsqInt ioCanWriteImage(void);\nsqInt ioDisableImageWrite(void);\n\n/* Save/restore. */\n/* Read the image from the given file starting at the given image offset */\nsqInt readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squeakFileOffsetType imageOffset);\n\n/* Clipboard (cut/copy/paste). */\nsqInt clipboardSize(void);\nsqInt clipboardReadIntoAt(sqInt count, sqInt byteArrayIndex, sqInt startIndex);\nsqInt clipboardWriteFromAt(sqInt count, sqInt byteArrayIndex, sqInt startIndex);\n\n\n/* Interpreter entry points needed by compiled primitives. */\nvoid *arrayValueOf(sqInt arrayOop);\nsqInt checkedIntegerValueOf(sqInt intOop);\nvoid *fetchArrayofObject(sqInt fieldIndex, sqInt objectPointer);\ndouble fetchFloatofObject(sqInt fieldIndex, sqInt objectPointer);\nsqInt fetchIntegerofObject(sqInt fieldIndex, sqInt objectPointer);\ndouble floatValueOf(sqInt floatOop);\nsqInt pop(sqInt nItems);\nsqInt pushInteger(sqInt integerValue);\nsqInt sizeOfSTArrayFromCPrimitive(void *cPtr);\nsqInt storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integerValue);\n\n/* System attributes. */\nsqInt attributeSize(sqInt indexNumber);\nsqInt getAttributeIntoLength(sqInt indexNumber, sqInt byteArrayIndex, sqInt length);\n\n/*** Pluggable primitive support. ***/\n\n/* NOTE: The following functions are those implemented by sqNamedPrims.c */\nvoid *ioLoadExternalFunctionOfLengthFromModuleOfLength(sqInt functionNameIndex, sqInt functionNameLength,\n\t\t\t\t\t\t       sqInt moduleNameIndex, sqInt moduleNameLength);\nsqInt  ioUnloadModuleOfLength(sqInt moduleNameIndex, sqInt moduleNameLength);\nvoid  *ioLoadFunctionFrom(const char *functionName, const char *pluginName);\nsqInt  ioShutdownAllModules(void);\nsqInt  ioUnloadModule(const char *moduleName);\nsqInt  ioUnloadModuleOfLength(sqInt moduleNameIndex, sqInt moduleNameLength);\nchar  *ioListBuiltinModule(sqInt moduleIndex);\nchar  *ioListLoadedModule(sqInt moduleIndex);\n/* The next two are FFI entries! (implemented in sqNamedPrims.c as well) */\nvoid  *ioLoadModuleOfLength(sqInt moduleNameIndex, sqInt moduleNameLength);\nvoid  *ioLoadSymbolOfLengthFromModule(sqInt functionNameIndex, sqInt functionNameLength, void *moduleHandle);\n\n/* The next three functions must be implemented by sqXYZExternalPrims.c */\n/* ioLoadModule:\n\tLoad a module from disk.\n\tWARNING: this always loads a *new* module. Don't even attempt to find\n\ta loaded one.\n\tWARNING: never primitiveFail() within, just return 0\n*/\nvoid *ioLoadModule(const char *pluginName);\n\n/* ioFindExternalFunctionIn:\n\tFind the function with the given name in the moduleHandle.\n\tWARNING: never primitiveFail() within, just return 0.\n*/\nvoid *ioFindExternalFunctionIn(const char *lookupName, void *moduleHandle);\n\n/* ioFreeModule:\n\tFree the module with the associated handle.\n\tWARNING: never primitiveFail() within, just return 0.\n*/\nsqInt ioFreeModule(void *moduleHandle);\n\n/* The Squeak version from which this interpreter was generated. */\nextern const char *interpreterVersion;\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/vm/sqAssert.h",
    "content": "/*\n * An informative assert definition that prints expression and line number.\n *\n * assert's expression is evaluated only if NDEBUG is not defined and printed\n * along with its the line number if it is false.\n *\n * asserta's expression is always evaluated but only printed if it is false and\n * NDEBUG is not defined. (asserta => assert always)\n *\n * assertf's message is printed along with its line number if NDEBUG is not\n * defined. (assertfd => assert fail)\n */\n\nextern void warning(char *);\n\n#ifdef NDEBUG /* compatible with Mac OS X (FreeBSD) /usr/include/assert.h */\n# undef assert\n# define assert(expr) 0 /* hack disabling of asserts.  Better in makefile? */\n# define asserta(expr) (expr)\n# define assertf(msg) 0\n# define PRODUCTION 1\n#elif 1\n# undef assert\n# define __stringify(foo) #foo\n# define __stringifyNum(n) __stringify(n)\n# define assert(expr)  ((expr)||(warning(#expr \" \" __stringifyNum(__LINE__)),0))\n# define asserta(expr) ((expr)||(warning(#expr \" \" __stringifyNum(__LINE__)),0))\n# define assertf(msg)  (warning(#msg \" \" __stringifyNum(__LINE__)),0)\n# define PRODUCTION 0\n#endif\n\n#define halt() warning(\"halt\")\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/vm/sqAtomicOps.h",
    "content": "/****************************************************************************\n*   PROJECT: Atomic operations for multi-threading.\n*\t\t\t Atomic reads and writes of 64-bit values (e.g. for 64-bit clock).\n*\t\t\t Atomic 32-bit increment (e.g. for signalSemaphoreWithIndex:).\n*\t\t\t\tget64(sqLong variable)\n*\t\t\t\tset64(sqLong variable, sqLong value)\n*\t\t\t\tsqAtomicAddConst(var,n)\n*\t\t\t\tsqCompareAndSwap(var,old,new)\n*   FILE:    sqAtomicOps.h\n*\n*   AUTHOR:  Eliot Miranda\n*   EMAIL:   eliot@teleplace.com\n*\n*****************************************************************************/\n\n/* Atomic access to 64-bit values allows variables to be updated safely by\n * interrupts on 32-bit systems without using locks.  This is used e.g. by\n * the heartbeat as it updates the 64-bit microsecond clocks.\n *\n * Re LP32 ILP32 LP64 ILP64 & LLP64\n * These are convenient names for different C programming models. See e.g.\n * http://www.unix.org/version2/whatsnew/lp64_wp.html. LP32 et al are models in\n * which the basic word size is 32-bits and LP64 et al are models in which the\n * basic word size is 64-bits.  gcc defines these.  Other compilers may not.\n * Here we assume that if either LP32 or ILP32 are defined as 1 then special\n * effort is required to access a 64-bit datum atomically.\n *\n * Only some compilers define LP32 et al.  If not, and __LONG_MAX__ is defined\n * we can make a good guess that __LONG_MAX__ implies 32-bits or 64-bits.\n */\n\n#if defined(__LONG_MAX__) && !defined(LP32) && !defined(ILP32) \\\n       && !defined(LP64) && !defined(ILP64) && !defined(LLP64)\n# if __LONG_MAX__ > 0xFFFFFFFF\n#\tdefine LP64 1\n# else\n#\tdefine LP32 1\n# endif\n#endif\n\n#if LP64 || ILP64 || LLP64\n\t/* On 64-bit systems 64-bit access is automatic by default. */\n# define get64(variable) variable\n# define set64(variable,value) (variable = value)\n\n#elif LP32 || ILP32\n# if TARGET_OS_IS_IPHONE\nstatic inline void\nAtomicSet(uint64_t *target, uint64_t new_value)\n{\n\twhile (true) {\n\t\tuint64_t old_value = *target;\n\t\tif (OSAtomicCompareAndSwap64Barrier(old_value, new_value, target))\n\t\t\treturn;\n\t}\n}\n\nstatic inline uint64_t\nAtomicGet(uint64_t *target)\n{\n\twhile (true) {\n\t\tint64 value = *target;\n\t\tif (OSAtomicCompareAndSwap64Barrier(value, value, target))\n\t\t\treturn value;\n\t}\n}\n#\tdefine get64(variable) AtomicGet(&(variable))\n#\tdefine set64(variable,value) AtomicSet(&(variable),value)\n\n\t/* Currently we provide definitions for x86 and GCC only.  But see below. */\n# elif defined(__GNUC__) && (defined(i386) || defined(__i386) || defined(__i386__) || defined(_X86_))\n\n/* atomic read & write of 64-bit values using SSE2 movq to/from sse register.\n * 64-bit reads & writes are only guaranteed to be atomic if aligned on a 64-bit\n * boundary.  Since 64-bit globals are so aligned a global access is atomic.\n */\n#  if __SSE2__\n/* atomic read & write of 64-bit values using sse instructions. */\n#\tdefine get64(variable) \\\n\t({ long long result; \\\n\t\tasm volatile (\"movq %1, %%xmm7;\tmovq %%xmm7, %0\"\\\n\t\t\t\t\t\t: \"=m\" (result)\t\t\t\t\t\\\n\t\t\t\t\t\t: \"m\" (variable)\t\t\t\t\\\n\t\t\t\t\t\t: \"memory\", \"%xmm7\");\t\t\t\\\n\t\tresult;})\n\n#\tdefine set64(variable,value) \\\n\t\tasm volatile (\"movq %1, %%xmm7;\tmovq %%xmm7, %0\"\\\n\t\t\t\t\t\t: \"=m\" (variable)\t\t\t\t\\\n\t\t\t\t\t\t: \"m\" (value)\t\t\t\t\t\\\n\t\t\t\t\t\t: \"memory\", \"%xmm7\")\n#  else /* __SSE2__ */\n/* atomic read & write of 64-bit values using the CMPXCHG8B instruction.\n * CMPXCHG8B m64 compares EDX:EAX with m64 and if equal loads ECX:EBX into m64.\n * If different it loads m64 into EDX:EAX.\n * Thanks to Frank http://www.exit.com/blog/archives/000361.html.\n *\n * Note that we could simply use movq which is guaranteed to provide atomic\n * reading or writing of 64-bit values aligned on a 64-bit boundary.  But we\n * can only depend on global variables being correctly aligned on systems\n * such as Mac OS X, which aligns the stack on a 128-bit boundary.\n */\n#\tinclude \"sqAssert.h\"\n\n#\tdefine lo32(x) (*(((unsigned long *)&(x))+0))\n#\tdefine hi32(x) (*(((unsigned long *)&(x))+1))\n\n#\tdefine get64(variable) \\\n\t({ long long result; \\\n\t\tassert((variable) != 0); \\\n\t\tasm volatile (\t\"xorl %%eax, %%eax\\n\\t\" \\\n\t\t\t\t\t\t\"xorl %%edx, %%edx\\n\\t\" \\\n\t\t\t\t\t\t\"xorl %%ebx, %%ebx\\n\\t\" \\\n\t\t\t\t\t\t\"xorl %%ecx, %%ecx\\n\\t\" \\\n\t\t\t\t\t\t\"lock cmpxchg8b %2\\n\\t\" \\\n\t\t\t\t\t\t\"movl %%eax, %0\\n\\t\" \\\n\t\t\t\t\t\t\"movl %%edx, %1\" \\\n\t\t\t\t\t\t\t: \"=m\" (lo32(result)), \"=m\" (hi32(result)) \\\n\t\t\t\t\t\t\t: \"o\" (variable) \\\n\t\t\t\t\t\t\t: \"memory\", \"eax\", \"ebx\", \"ecx\", \"edx\", \"cc\"); \\\n\t\tresult;})\n\n#\tdefine set64(variable,value) \\\n\t\tasm volatile (\t\"movl %0, %%eax\\n\\t\" \\\n\t\t\t\t\t\t\"movl %1, %%edx\\n\\t\" \\\n\t\t\t\t\t\t\"movl %2, %%ebx\\n\\t\" \\\n\t\t\t\t\t\t\"movl %3, %%ecx\\n\\t\" \\\n\t\t\t\t\t\t\"lock cmpxchg8b %0\" \\\n\t\t\t\t\t\t\t: \"+m\" (lo32(variable)), \"+m\" (hi32(variable)) \\\n\t\t\t\t\t\t\t: \"m\" (lo32(value)), \"m\" (hi32(value)) \\\n\t\t\t\t\t\t\t: \"memory\", \"eax\", \"ebx\", \"ecx\", \"edx\", \"cc\")\n#  endif /* __SSE2__ */\n# else /* TARGET_OS_IS_IPHONE elif x86 variants etc */\n/* Dear implementor, you have choices.  For example consider defining get64 &\n * set64 thusly\n * #define get64(var) read64(&(var))\n * #define set64(var,val) write64(&(var),val)\n * and get the JIT to generate read64 & write64 above atomic 64-bit read/write.\n */\n#\terror atomic access of 64-bit variables not yet defined for this platform\n# endif\n\n#else /* LP32 || ILP32 else LP64 || ILP64 || LLP64 */\n# error shurly shome mishtake; too drunk to shpot the programming muddle. hic.\n#endif\n\n\n\n\n/* Atomic increment of 32-bit values allows a lock-free implementation of the\n * request side of signalSemaphoreWithIndex:\n */\n\n\t/* Currently we provide definitions for x86 and GCC only.  */\n#if defined(__GNUC__) && (defined(i386) || defined(__i386) || defined(__i386__) || defined(_X86_))\n#ifdef TARGET_OS_IS_IPHONE\n#define sqAtomicAddConst(var,n) OSAtomicAdd32(n,&var)\n#else\n# define sqAtomicAddConst(var,n) \\\n\tasm volatile (\"lock addl %1, %0\" : \"=m\" (var) : \"i\" (n), \"m\" (var))\n#endif\n#else\n#ifdef TARGET_OS_IS_IPHONE\n#define sqAtomicAddConst(var,n) OSAtomicAdd32(n,&var)\n#endif\n/* Dear implementor, you have choices.  Google atomic increment and you will\n * find a number of implementations for other architectures.\n */\n#endif\n\n\n\n\n/* Atomic compare and swap of 32-bit values allows a lock-free implementation of\n * the request side of signalSemaphoreWithIndex: using tides to limit the range\n * of indices examined.\n *\n * sqCompareAndSwap(var,old,new) arranges atomically that if var's value is\n * equal to old, then var's is set to new.\n *\n * sqCompareAndSwapRes(var,old,new,res) arranges atomically that if var's value\n * is equal to old, then var's value is set to new, and that in any case, res\n * is set to the previous value of var.\n */\n\n\t/* Currently we provide definitions for x86 and GCC only.  */\n#if defined(__GNUC__) && (defined(i386) || defined(__i386) || defined(__i386__) || defined(_X86_))\n\n#ifdef TARGET_OS_IS_IPHONE\n# define sqCompareAndSwap(var,old,new) OSAtomicCompareAndSwap32(old, new, &var) \n# define sqCompareAndSwapRes(var,old,new,res) res = var; OSAtomicCompareAndSwap32(old, new, &var) \n#else\n# define sqCompareAndSwap(var,old,new) \\\n\tasm volatile (\"movl %1, %%eax; lock cmpxchg %2, %0\" \\\n\t\t\t\t\t: \"=m\"(var) \\\n\t\t\t\t\t: \"g\"(old), \"r\"(new), \"m\"(var)\\\n\t\t\t\t\t: \"memory\", \"%eax\")\n\n# define sqCompareAndSwapRes(var,old,new,res) \\\n\tasm volatile (\"movl %2, %%eax; lock cmpxchg %3, %0; movl %%eax, %1\" \\\n\t\t\t\t\t: \"=m\"(var), \"=g\"(res) \\\n\t\t\t\t\t: \"g\"(old), \"r\"(new), \"m\"(var) \\\n\t\t\t\t\t: \"memory\", \"%eax\")\n#endif\n#else\n#if TARGET_OS_IS_IPHONE\n# define sqCompareAndSwap(var,old,new) OSAtomicCompareAndSwap32(old, new, &var) \n# define sqCompareAndSwapRes(var,old,new,res) res = var; OSAtomicCompareAndSwap32(old, new, &var) \n\n#endif\n/* Dear implementor, you have choices.  Google atomic increment and you will\n * find a number of implementations for other architectures.\n */\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/vm/sqCogStackAlignment.h",
    "content": "/****************************************************************************\n *   FILE:    sqCogUnixStackAlignment.h\n *   CONTENT: Answer & check stack alignment for current plaform\n *\n *   AUTHOR:   Eliot Miranda\n *   DATE:     February 2009\n *\n * Changes: eem Wed Jul 14 17:11:01 PDT 2010\n *\t\t\tmake 16 bytes the default alignment for all x86.\n */\n \n/* 16-byte stack alignment on x86 is required for SSE instructions which\n * insist on aligned addresses for accessing 64 or 128 bit values in memory.\n */\n#if __i386__ && (__SSE2__ || __APPLE__ && __MACH__ || __linux__)\n# define STACK_ALIGN_BYTES 16\n# define LEAF_CALL_STACK_ALIGN_BYTES 12\n# define STACK_FP_ALIGN_BYTES 8\n#endif\n\n#if defined(STACK_ALIGN_BYTES)\n# if defined(_X86_) || defined(i386) || defined(__i386) || defined(__i386__)\n#  if __GNUC__\n#   define getfp() ({ register unsigned long fp;\t\t\t\t\t\\\n\t\t\t\t\t  asm volatile (\"movl %%ebp,%0\" : \"=r\"(fp) : );\t\\\n\t\t\t\t\t  fp; })\n#  else\nextern unsigned long getfp();\n#  endif\n# else\n#  error define code for your processor here\n# endif\nextern unsigned long (*ceGetSP)(); /* provided by Cogit */\n# define STACK_ALIGN_MASK (STACK_ALIGN_BYTES-1)\n# define assertCStackWellAligned() do {\t\t\t\t\t\t\t\t\t\t\\\n\textern sqInt cFramePointerInUse;\t\t\t\t\t\t\t\t\t\t\\\n\tif (cFramePointerInUse)\t\t\t\t\t\t\t\t\t\t\t\t\t\\\n\t\tassert((getfp() & STACK_ALIGN_MASK) == STACK_FP_ALIGN_BYTES);\t\t\\\n\tassert((ceGetSP() & STACK_ALIGN_MASK) == LEAF_CALL_STACK_ALIGN_BYTES);\t\\\n} while (0)\n#else /* defined(STACK_ALIGN_BYTES) */\n# define STACK_ALIGN_BYTES 4\n# define assertCStackWellAligned() 0\n#endif /* defined(STACK_ALIGN_BYTES) */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/vm/sqExternalSemaphores.c",
    "content": "/* sqExternalSemaphores.c\n *\tCross-platform thread-safe external semaphore signalling.\n *\n *\tAuthors: Eliot Miranda & Brad Fowlow\n *\n *\tCopyright (C) 2009 by Teleplace, Inc.\n *\n *\tAll rights reserved.\n *   \n *   This file is part of Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n */\n\n#include \"sq.h\"\n#include \"sqAssert.h\"\n#include \"sqAtomicOps.h\"\n#include \"sqMemoryFence.h\"\n\n/* This implements \"lock-free\" signalling of external semaphores where there is\n * no lock between the signal responder (the VM) and signal requestors, but\n * there may be spin-locking between signal requestors, depending on the implem-\n * entation of atomicAddConst.\n *\n * Freedom from locks is very helpful in making the QAudioPlugin function on\n * linux, where the absence of thread priorities for non-setuid programs means\n * we cannot run the QAudioPlugin's ticker in a separate thread and must instead\n * derive it from the interval-timer based signal-driven (software interrupt)\n * heartbeat.  If the external semaphore state is locked while the VM is\n * responding to external semaphore signal requests and the heartbeat interrupts\n * causing a locking request for an external semaphore signal request then the\n * system will deadlock, since the interrupt occurs in the VM thread.\n *\n * Lock freedom is achieved by having an array of request counters, and an array\n * of response counters, one per external semaphore index.  To request a signal\n * the requests are locked and the relevant request is incremented.  To respond\n * to a request the VM increments the corresponding response until it matches\n * the request, signalling the associated semaphore on each increment.\n */\n\n#if !COGMTVM\nsqOSThread ioVMThread; /* initialized in the various <plat>/vm/sqFooMain.c */\n#endif\nextern void forceInterruptCheck(void);\nextern sqInt doSignalSemaphoreWithIndex(sqInt semaIndex);\n\ntypedef struct {\n#if !defined(TARGET_OS_IS_IPHONE) && (x86 || x86-64) /* etc etc x86 allows atomic update of 16 bit values */\n\t\tshort requests;\n\t\tshort responses;\n#else\n\t\tlong requests;\n\t\tlong responses;\n#endif\n\t} SignalRequest;\n\nstatic SignalRequest *signalRequests = 0;\nstatic int numSignalRequests = 0;\nstatic volatile sqInt checkSignalRequests;\n\n/* The tides define the minimum range of indices into signalRequests that the\n * VM needs to scan.  With potentially thousands of indices to scan this can\n * save significant lengths of time.\n */\nstatic volatile int tideLock = 0;\nstatic volatile int useTideA = 1;\nstatic volatile sqInt lowTideA = (unsigned long)-1 >> 1, highTideA = -1;\nstatic volatile sqInt lowTideB = (unsigned long)-1 >> 1, highTideB = -1;\n\nint\nioGetMaxExtSemTableSize(void) { return numSignalRequests; }\n\n/* Setting this at any time other than start-up can potentially lose requests.\n * i.e. during the realloc new storage is allocated, the old contents are copied\n * and then pointersd are switched.  Requests occurring during copying won't\n * be seen if they occur to indices already copied.\n * We could make this safer in the linux case by disabling interrupts, but\n * there is little point.  The intended use is to set the table to some adequate\n * maximum at start-up and avoid locking altogether.\n */\nvoid\nioSetMaxExtSemTableSize(int n)\n{\n#if COGMTVM\n  if (getVMOSThread()) /* initialization is a little different in MT. Hack around for now */\n#endif\n\tassert(ioOSThreadsEqual(ioCurrentOSThread(),getVMOSThread()));\n\tif (numSignalRequests < n) {\n\t\textern sqInt highBit(sqInt);\n\t\tint sz = 1 << highBit(n);\n\t\tsignalRequests = realloc(signalRequests, sz * sizeof(SignalRequest));\n\t\tmemset(signalRequests + numSignalRequests,\n\t\t\t\t0,\n\t\t\t\t(sz - numSignalRequests) * sizeof(SignalRequest));\n\t\tnumSignalRequests = sz;\n\t}\n}\n\nvoid\nioInitExternalSemaphores(void)\n{\n\tioSetMaxExtSemTableSize(INITIAL_EXT_SEM_TABLE_SIZE);\n}\n\n/* Signal the external semaphore with the given index.  Answer non-zero on\n * success, zero otherwise.  This function is (should be) thread-safe;\n * multiple threads may attempt to signal the same semaphore without error.\n * An index of zero should be and is silently ignored.\n */\nsqInt\nsignalSemaphoreWithIndex(sqInt index)\n{\n\tint i = index - 1;\n\tint v;\n\n\t/* An index of zero should be and is silently ignored. */\n\tassert(index >= 0 && index <= numSignalRequests);\n\n\tif ((unsigned)i >= numSignalRequests)\n\t\treturn 0;\n\n\tsqLowLevelMFence();\n\tsqAtomicAddConst(signalRequests[i].requests,1);\n\tif (useTideA) {\n\t\t/* atomic if (lowTideA > i) lowTideA = i; */\n\t\twhile ((v = lowTideA) > i) {\n\t\t\tsqLowLevelMFence();\n\t\t\tsqCompareAndSwap(lowTideA, v, i);\n\t\t}\n\t\t/* atomic if (highTideA < i) highTideA = i; */\n\t\twhile ((v = highTideA) < i) {\n\t\t\tsqLowLevelMFence();\n\t\t\tsqCompareAndSwap(highTideA, v, i);\n\t\t}\n\t}\n\telse {\n\t\t/* atomic if (lowTideB > i) lowTideB = i; */\n\t\twhile ((v = lowTideB) > i) {\n\t\t\tsqLowLevelMFence();\n\t\t\tsqCompareAndSwap(lowTideB, v, i);\n\t\t}\n\t\t/* atomic if (highTideB < i) highTideB = i; */\n\t\twhile ((v = highTideB) < i) {\n\t\t\tsqLowLevelMFence();\n\t\t\tsqCompareAndSwap(highTideB, v, i);\n\t\t}\n\t}\n\n\tcheckSignalRequests = 1;\n\n\tforceInterruptCheck();\n\treturn 1;\n}\n\n/* Signal any external semaphores for which signal requests exist.\n * Answer whether a context switch occurred.\n * Note we no longer ensure the lock table has at least minTableSize elements.\n * Instead its size is settable at startup from a value in the image header via\n * ioSetMaxExtSemTableSize.  This avoids locks on the table while it grows\n * (although a lock-free implementation is possible, if tricky).  So for the\n * moment externalSemaphoreTableSize is not used.\n */\nsqInt\ndoSignalExternalSemaphores(int externalSemaphoreTableSize)\n{\n\tint i, switched;\n\n\tif (!checkSignalRequests)\n\t\treturn 0;\n\n\tswitched = 0;\n\tcheckSignalRequests = 0;\n\n\tif (useTideA) {\n\t\tuseTideA = 0;\n\t\tsqLowLevelMFence();\n\t\t/* doing this here saves a bounds check in doSignalSemaphoreWithIndex */\n\t\tif (highTideA >= externalSemaphoreTableSize)\n\t\t\thighTideA = externalSemaphoreTableSize - 1;\n\t\tfor (i = lowTideA; i <= highTideA; i++)\n\t\t\twhile (signalRequests[i].responses != signalRequests[i].requests) {\n\t\t\t\tif (doSignalSemaphoreWithIndex(i+1))\n\t\t\t\t\tswitched = 1;\n\t\t\t\t++signalRequests[i].responses;\n\t\t\t}\n\t\tlowTideA = (unsigned long)-1 >> 1, highTideA = -1;\n\t}\n\telse {\n\t\tuseTideA = 1;\n\t\tsqLowLevelMFence();\n\t\t/* doing this here saves a bounds check in doSignalSemaphoreWithIndex */\n\t\tif (highTideB >= externalSemaphoreTableSize)\n\t\t\thighTideB = externalSemaphoreTableSize - 1;\n\t\tfor (i = lowTideB; i <= highTideB; i++)\n\t\t\twhile (signalRequests[i].responses != signalRequests[i].requests) {\n\t\t\t\tif (doSignalSemaphoreWithIndex(i+1))\n\t\t\t\t\tswitched = 1;\n\t\t\t\t++signalRequests[i].responses;\n\t\t\t}\n\t\tlowTideB = (unsigned long)-1 >> 1, highTideB = -1;\n\t}\n\n\t/* If a signal came in while processing, check for signals again soon.\n\t */\n\tsqLowLevelMFence();\n\tif (checkSignalRequests)\n\t\tforceInterruptCheck();\n\n\treturn switched;\n}\n\n#if FOR_SQUEAK_VM_TESTS\n/* see e.g. tests/sqExternalSemaphores/unixmain.c */\nint\nallRequestsAreAnswered(int externalSemaphoreTableSize)\n{\n\tlong i;\n\tfor (i = 1; i < externalSemaphoreTableSize; i++)\n\t\tif (signalRequests[i].responses != signalRequests[i].requests) {\n\t\t\tprintf(\"signalRequests[%ld] requests %d responses %d\\n\",\n\t\t\t\t\ti, signalRequests[i].requests, signalRequests[i].responses);\n\t\t\treturn 0;\n\t\t}\n\treturn 1;\n}\n#endif /* FOR_SQUEAK_VM_TESTS */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/vm/sqHeapMap.c",
    "content": "/****************************************************************************\n *   PROJECT: Maintain a heap map for heap debugging, 1 bit per 32-bit word\n *            The space overhead is a maximum of 1/32 of the address space.\n *   FILE:    sqHeapMap.c\n *   CONTENT: \n *\n *   AUTHOR:  Eliot Miranda\n *   ADDRESS: \n *   EMAIL:   eliot.miranda@gmail.com\n *\n *   NOTES: The idea is to check for heap pointer integrity.  We scan the heap\n *          setting a bit in the map for each object's base header.  We then\n *          scan the heap checking that each pointer points to a base header by\n *          checking for a 1 in the heap map.\n *\n *          We can also check for leaks by scanning a third time and clearing\n *          the header bit.  Any remaining set bits indicate an unreferenced\n *          object that should have been collected.\n *\n ****************************************************************************/\n\n#include \"sqMemoryAccess.h\" \n\n#include <stdlib.h>\n\n#define ulong unsigned long\n#define uchar unsigned char\n\n#if SQ_IMAGE32\n/*\n * 32-bit address space = 2^32 bytes = 2^30 words.  If we have 256 root pages\n * then each page needs to cover 2^30 / 256 words = 4 megawords.  Each 8-bit\n * byte in the leak map covers 8 words.  So each page needs to be 4M / 8 bytes\n * = 512k bytes per page.\n */\n \n#define NUMPAGES 256\n\nstatic uchar *mapPages[256] = { 0, };\n\n#define PAGESIZE (512*1024)\n#define PAGESHIFT 24\n#define PAGEMASK 0xFFFFFF\n#define LOGWORDSIZE 2\n#define LOGBITSPERBYTE 3\n#define PAGEINDEX(a) ((a) >> PAGESHIFT)\n#define BYTEINDEX(a) (((a) & PAGEMASK) >> (LOGWORDSIZE + LOGBITSPERBYTE))\n#define BITINDEX(a) (((a) >> LOGWORDSIZE) & ((1<<LOGBITSPERBYTE)-1))\n\n/*\n * Answer non-zero if the heapMap is set at wordPointer, 0 otherwise\n */\nint\nheapMapAtWord(void *wordPointer)\n{\n\tulong address = (ulong)wordPointer;\n\tuchar *page = mapPages[PAGEINDEX(address)];\n\tif ((address & ((1<<LOGWORDSIZE)-1)))\n\t\terror(\"misaligned word\");\n\treturn page\n\t\t? page[BYTEINDEX(address)] & (1 << BITINDEX(address))\n\t\t: 0;\n}\n\n/*\n * Set the value in the map at wordPointer to bit.\n */\nvoid\nheapMapAtWordPut(void *wordPointer, int bit)\n{\n\tulong address = (ulong)wordPointer;\n\tuchar *page = mapPages[PAGEINDEX(address)];\n\tif ((address & ((1<<LOGWORDSIZE)-1)))\n\t\terror(\"misaligned word\");\n\tif (!page) {\n\t\tif (!(page = malloc(PAGESIZE))) {\n\t\t\tperror(\"malloc\");\n\t\t\texit(1);\n\t\t}\n\t\tmapPages[PAGEINDEX(address)] = page;\n\t\tmemset(page,0,PAGESIZE);\n\t}\n\tif (bit)\n\t\tpage[BYTEINDEX(address)] |= 1 << BITINDEX(address);\n\telse\n\t\tpage[BYTEINDEX(address)] &= (uchar)-1 ^ (1 << BITINDEX(address));\n}\n\n/*\n * Clear the heap map to zero.\n */\nvoid\nclearHeapMap(void)\n{\n\tint i;\n\n\tfor (i = 0; i < NUMPAGES; i++)\n\t\tif (mapPages[i])\n\t\t\tmemset(mapPages[i],0,PAGESIZE);\n}\n#else\n# error 64-bit verison not yet implemented (hint: you need another level of indirection to make the table small enough)\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/vm/sqMemoryAccess.h",
    "content": "/* sqMemoryAccess.h -- memory accessors (and associated type definitions)\n * \n * Author: Ian.Piumarta@squeakland.org\n * \n * Last edited: 2006-04-06 09:47:39 by piumarta on emilia.local\n */\n\n/* Systematic use of the macros defined in this file within the\n * Interpreter, ObjectMemory and plugins will permit all four\n * combinations of 32/64-bit image and 32/64-bit host to compile and\n * run correctly.  (Code that uses explicit casts and/or integer\n * constants in arithmetic on object pointers will invariably fail in\n * at least one of the four possible combinations.)\n */\n\n#ifndef __sqMemoryAccess_h\n#define __sqMemoryAccess_h\n\n#include <config.h>\n\n#if defined(HAVE_INTERP_H)\n# include \"interp.h\"\n#else\n# define SQ_VI_BYTES_PER_WORD 4\t\t/* build a 32-bit VM */\n# warning \n# warning ***************************************************\n# warning *\n# warning * interp.h not found -- defaulting to a 32-bit VM\n# warning *\n# warning * update your image-side VM sources to the latest\n# warning * version to avoid this message\n# warning *\n# warning ***************************************************\n# warning \n#endif\n\n#if (SQ_VI_BYTES_PER_WORD == 4)\n# define SQ_IMAGE32 1\n#else\n# define SQ_IMAGE64 1\n#endif\n\n#if (SIZEOF_VOID_P == 4)\n# define SQ_HOST32 1\n#elif (SIZEOF_VOID_P == 8)\n# define SQ_HOST64 1\n#else\n# error host is neither 32- nor 64-bit?\n#endif\n\n#if defined(SQ_IMAGE32)\n  typedef int\t\tsqInt;\n  typedef unsigned int\tusqInt;\n#elif defined(SQ_HOST64)\n  typedef long\t\tsqInt;\n  typedef unsigned long\tusqInt;\n#else\n# if (SIZEOF_LONG_LONG != 8)\n#   error long long integers are not 64-bits wide?\n# endif \n  typedef long long\t\tsqInt;\n  typedef unsigned long long\tusqInt;\n#endif\n\n#if defined(SQ_HOST64) && defined(SQ_IMAGE32)\n  extern char *sqMemoryBase;\n# define SQ_FAKE_MEMORY_OFFSET\t16 // (1*1024*1024)\t/* nonzero to debug addr xlation */\n#else\n# define sqMemoryBase 0\n#endif\n\n#ifdef USE_INLINE_MEMORY_ACCESSORS\n  /* Use static inline functions when the compiler produces efficient code for small accessors.\n     These are preferred because static type checking will prevent inadvertent confusion of pointers and oops. */\n  static inline sqInt byteAtPointer(char *ptr)\t\t\t{ return (sqInt)(*((unsigned char *)ptr)); }\n  static inline sqInt byteAtPointerput(char *ptr, int val)\t{ return (sqInt)(*((unsigned char *)ptr)= (unsigned char)val); }\n  static inline sqInt shortAtPointer(char *ptr)\t\t\t{ return (sqInt)(*((short *)ptr)); }\n  static inline sqInt shortAtPointerput(char *ptr, int val)\t{ return (sqInt)(*((short *)ptr)= (short)val); }\n  static inline sqInt intAtPointer(char *ptr)\t\t\t{ return (sqInt)(*((unsigned int *)ptr)); }\n  static inline sqInt intAtPointerput(char *ptr, int val)\t{ return (sqInt)(*((unsigned int *)ptr)= (int)val); }\n  static inline sqInt longAtPointer(char *ptr)\t\t\t{ return *(sqInt *)ptr; }\n  static inline sqInt longAtPointerput(char *ptr, sqInt val)\t{ return *(sqInt *)ptr= (sqInt)val; }\n  static inline sqInt oopAtPointer(char *ptr)\t\t\t{ return *(sqInt *)ptr; }\n  static inline sqInt oopAtPointerput(char *ptr, sqInt val)\t{ return (sqInt)(*(sqInt *)ptr= (sqInt)val); }\n# ifdef ROAR_VM\n  extern char *pointerForOop(sqInt oop);\t\t\t // xxx_dmu Renaissance\n  extern sqInt oopForPointer(void *ptr);\t\t\t // xxx_dmu Renaissance\n# else\n# if defined(sqMemoryBase) && !sqMemoryBase\n  static inline char *pointerForOop(usqInt oop)\t\t\t{ return (char *)oop; }\n  static inline sqInt oopForPointer(char *ptr)\t\t\t{ return (sqInt)ptr; }\n# else\n  static inline char *pointerForOop(usqInt oop)\t\t\t{ return sqMemoryBase + oop; }\n  static inline sqInt oopForPointer(char *ptr)\t\t\t{ return (sqInt)(ptr - sqMemoryBase); }\n# endif\n# endif // ROAR_VM\n\n  static inline sqInt byteAt(sqInt oop)\t\t\t\t{ return byteAtPointer(pointerForOop(oop)); }\n  static inline sqInt byteAtput(sqInt oop, int val)\t\t{ return byteAtPointerput(pointerForOop(oop), val); }\n  static inline sqInt shortAt(sqInt oop)\t\t\t{ return shortAtPointer(pointerForOop(oop)); }\n  static inline sqInt shortAtput(sqInt oop, int val)\t\t{ return shortAtPointerput(pointerForOop(oop), val); }\n  static inline sqInt intAt(sqInt oop)\t\t\t\t{ return intAtPointer(pointerForOop(oop)); }\n  static inline sqInt intAtput(sqInt oop, int val)\t\t{ return intAtPointerput(pointerForOop(oop), val); }\n  static inline sqInt longAt(sqInt oop)\t\t\t\t{ return longAtPointer(pointerForOop(oop)); }\n  static inline sqInt longAtput(sqInt oop, sqInt val)\t\t{ return longAtPointerput(pointerForOop(oop), val); }\n  static inline sqInt oopAt(sqInt oop)\t\t\t\t{ return oopAtPointer(pointerForOop(oop)); }\n  static inline sqInt oopAtput(sqInt oop, sqInt val)\t\t{ return oopAtPointerput(pointerForOop(oop), val); }\n#else\n  # ifdef ROAR_VM\n   # error Use the other ones for the RVM/RoarVM\n  # endif\n  /* Use macros when static inline functions aren't efficient. */\n# define byteAtPointer(ptr)\t\t((sqInt)(*((unsigned char *)(ptr))))\n# define byteAtPointerput(ptr, val)\t((sqInt)(*((unsigned char *)(ptr))= (unsigned char)(val)))\n# define shortAtPointer(ptr)\t\t((sqInt)(*((short *)(ptr))))\n# define shortAtPointerput(ptr, val)\t((sqInt)(*((short *)(ptr))= (short)(val)))\n# define intAtPointer(ptr)\t\t((sqInt)(*((int *)(ptr))))\n# define intAtPointerput(ptr, val)\t((sqInt)(*((int *)(ptr))= (int)(val)))\n# define longAtPointer(ptr)\t\t(*(sqInt *)(ptr))\n# define longAtPointerput(ptr, val)\t(*(sqInt *)(ptr)= (sqInt)(val))\n# define oopAtPointer(ptr)\t\t(*(sqInt *)(ptr))\n# define oopAtPointerput(ptr, val)\t(*(sqInt *)(ptr)= (sqInt)(val))\n# if defined(sqMemoryBase) && !sqMemoryBase\n#  define pointerForOop(oop)\t\t((char *)(oop))\n#  define oopForPointer(ptr)\t\t((sqInt)(ptr))\n# else\n#  define pointerForOop(oop)\t\t((char *)(sqMemoryBase + ((usqInt)(oop))))\n#  define oopForPointer(ptr)\t\t((sqInt)(((char *)(ptr)) - (sqMemoryBase)))\n# endif\n# define byteAt(oop)\t\t\tbyteAtPointer(pointerForOop(oop))\n# define byteAtput(oop, val)\t\tbyteAtPointerput(pointerForOop(oop), (val))\n# define shortAt(oop)\t\t\tshortAtPointer(pointerForOop(oop))\n# define shortAtput(oop, val)\t\tshortAtPointerput(pointerForOop(oop), (val))\n# define longAt(oop)\t\t\tlongAtPointer(pointerForOop(oop))\n# define longAtput(oop, val)\t\tlongAtPointerput(pointerForOop(oop), (val))\n# define intAt(oop)\t\t\tintAtPointer(pointerForOop(oop))\n# define intAtput(oop, val)\t\tintAtPointerput(pointerForOop(oop), (val))\n# define oopAt(oop)\t\t\toopAtPointer(pointerForOop(oop))\n# define oopAtput(oop, val)\t\toopAtPointerput(pointerForOop(oop), (val))\n#endif\n\n#define long32At\tintAt\n#define long32Atput\tintAtput\n\n# ifdef ROAR_VM\n  #define long32AtPointer\tintAtPointer // xxx_dmu\n  #define long32AtPointerput\tintAtPointerput // xxx_dmu\n# endif // ROAR_VM\n\n/* platform-dependent float conversion macros */\n/* Note: Second argument must be a variable name, not an expression! */\n#if defined(DOUBLE_WORD_ALIGNMENT)\n/* this is to allow strict aliasing assumption in the optimizer */\ntypedef union { double d; int i[sizeof(double) / sizeof(int)]; } _aligner;\n/* word-based copy for machines with alignment restrictions */\n# define storeFloatAtPointerfrom(intPointerToFloat, doubleVar) do { \\\n\t*((int *)(intPointerToFloat) + 0) = ((_aligner *)(&doubleVar))->i[0]; \\\n\t*((int *)(intPointerToFloat) + 1) = ((_aligner *)(&doubleVar))->i[1]; \\\n  } while (0)\n# define fetchFloatAtPointerinto(intPointerToFloat, doubleVar) do { \\\n\t((_aligner *)(&doubleVar))->i[0] = *((int *)(intPointerToFloat) + 0); \\\n\t((_aligner *)(&doubleVar))->i[1] = *((int *)(intPointerToFloat) + 1); \\\n  } while (0)\n#else /* !DOUBLE_WORD_ALIGNMENT */\n/* for machines that allow doubles to be on any word boundary */\n# define storeFloatAtPointerfrom(i, doubleVar) (*((double *) (i)) = (doubleVar))\n# define fetchFloatAtPointerinto(i, doubleVar) ((doubleVar) = *((double *) (i)))\n#endif\n\n#define storeFloatAtfrom(i, doubleVar)\tstoreFloatAtPointerfrom(pointerForOop(i), doubleVar)\n#define fetchFloatAtinto(i, doubleVar)\tfetchFloatAtPointerinto(pointerForOop(i), doubleVar)\n# define storeSingleFloatAtPointerfrom(i, floatVar) (*((float *) (i)) = (float)(floatVar))\n# define fetchSingleFloatAtPointerinto(i, floatVar) ((floatVar) = *((float *) (i)))\n#define storeSingleFloatAtfrom(i, floatVar)\tstoreSingleFloatAtPointerfrom(pointerForOop(i), floatVar)\n#define fetchSingleFloatAtinto(i, floatVar)\tfetchSingleFloatAtPointerinto(pointerForOop(i), floatVar)\n\n\n/* This doesn't belong here, but neither do 'self flag: ...'s belong in the image. */\n\n#ifdef _MSC_VER\nstatic void flag(char *ignored) {}\n#else \nstatic inline void flag(char *ignored) {}\n#endif\n\n/* heap debugging facilities in sqHeapMap.c */\nextern void clearHeapMap(void);\nextern int  heapMapAtWord(void *wordPointer);\nextern void heapMapAtWordPut(void *wordPointer, int bit);\n\n#endif /* __sqMemoryAccess_h */\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/vm/sqMemoryFence.h",
    "content": "/* sqMemoryFence.h\n *\tSupport for synchronisation above weakly-ordered memory models.\n *\n *\tAuthor: Eliot Miranda\n *\n *\tCopyright (C) 2010 by Teleplace, Inc.\n *\n *\tAll rights reserved.\n *   \n *   This file is part of Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n */\n\n/* sqLowLevelMFence is required to ensure that after completion any stores made\n * by other threads before a fence will be visible to the calling thread, and\n * vice versa.  Writers follow a write with a fence. Readers use a fence before\n * reading.  See e.g. http://en.wikipedia.org/wiki/Memory_barrier\n *\n * The only implementation directly uses mfence on x86.\n * Please add implementations for other ISAs as required.\n */\n\n#if defined(__GNUC__) && (defined(i386) || defined(__i386) || defined(__i386__) || defined(_X86_))\n# if defined(__MINGW32__) && !__SSE2__\n\t/* Andreas is fond of the gcc 2.95 MINGW but it lacks sse2 support */\n#\tdefine sqLowLevelMFence() asm volatile (\".byte 0x0f;.byte 0xae;.byte 0xf0\")\n# elif defined(TARGET_OS_IS_IPHONE)\n#\tdefine sqLowLevelMFence() __sync_synchronize()\n# else\n#\tdefine sqLowLevelMFence() asm volatile (\"mfence\")\n# endif\n#else\n# if defined(TARGET_OS_IS_IPHONE)\n#\tdefine sqLowLevelMFence() __sync_synchronize()\n# elif !defined(sqLowLevelMFence)\nextern void sqLowLevelMFence(void);\n# endif\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/vm/sqNamedPrims.c",
    "content": "/****************************************************************************\r\n*   PROJECT: Squeak \r\n*   FILE:    sqNamedPrims.c\r\n*   CONTENT: Generic (cross platform) named primitive support\r\n*\r\n*   AUTHOR:  Andreas Raab (ar)\r\n*   ADDRESS: Walt Disney Imagineering, Glendale, CA\r\n*   EMAIL:   Andreas.Raab@disney.com\r\n*   RCSID:   $Id: sqNamedPrims.c 2158 2010-03-29 01:16:36Z johnmci $\r\n*\r\n*   NOTES:\r\n*\r\n*****************************************************************************/\r\n#include \"sq.h\"\r\n\r\n\r\ntypedef struct {\r\n  char *pluginName;\r\n  char *primitiveName;\r\n  void *primitiveAddress;\r\n} sqExport;\r\n\r\n#include \"sqNamedPrims.h\"\r\n\r\n#undef DEBUG\r\n\r\n#undef DPRINTF\r\n#ifdef DEBUG\r\n#define DPRINTF(what) printf what\r\n#else\r\n#define DPRINTF(what)\r\n#endif\r\n\r\ntypedef struct ModuleEntry {\r\n\tstruct ModuleEntry *next;\r\n\tvoid *handle;\r\n\tsqInt ffiLoaded;\r\n\tchar name[1];\r\n} ModuleEntry;\r\n\r\n\r\nstatic ModuleEntry *squeakModule = NULL;\r\nstatic ModuleEntry *firstModule = NULL;\r\nstruct VirtualMachine *sqGetInterpreterProxy(void);\r\n\r\nstatic void *findLoadedModule(const char *pluginName)\n{\r\n\tModuleEntry *module;\r\n\tif(!pluginName || !pluginName[0]) return squeakModule;\r\n\tmodule = firstModule;\r\n\twhile(module) {\r\n\t\tif(strcmp(module->name, pluginName) == 0) return module;\r\n\t\tmodule = module->next;\r\n\t}\r\n\treturn NULL;\r\n}\r\n\r\nstatic ModuleEntry *addToModuleList(const char *pluginName, void* handle, sqInt ffiFlag)\r\n{\r\n\tModuleEntry *module;\r\n\r\n\tmodule = (ModuleEntry*) calloc(1, sizeof(ModuleEntry) + strlen(pluginName));\r\n\tstrcpy(module->name, pluginName);\r\n\tmodule->handle = handle;\r\n\tmodule->ffiLoaded = ffiFlag;\r\n\tmodule->next = firstModule;\r\n\tfirstModule = module;\r\n\treturn firstModule;\r\n}\r\n\r\n/*\r\n\tremoveFromList:\r\n\tRemove the given entry from the list of loaded modules.\r\n\tDo NOT free it yet.\r\n*/\r\nstatic sqInt removeFromList(ModuleEntry *entry)\r\n{\r\n\tModuleEntry *prevModule;\r\n\r\n\t/* Unlink the entry from the module chain */\r\n\tif(entry == firstModule) {\r\n\t\tfirstModule = entry->next;\r\n\t} else {\r\n\t\tprevModule = firstModule;\r\n\t\twhile(prevModule->next != entry)\r\n\t\t\tprevModule = prevModule->next;\r\n\t\tprevModule->next = entry->next;\r\n\t}\r\n\treturn 1;\r\n}\r\n\r\n/*\r\n\tfindExternalFunctionIn:\r\n\tLook up \"pluginName_functionName\" in the specified module through\r\n\tthe OS dependent call. NEVER used to search through the internal\r\n\tprimitive table.\r\n*/\r\nstatic void *findExternalFunctionIn(const char *functionName, ModuleEntry *module)\n{\r\n\tvoid *result;\r\n\r\n\tDPRINTF((\"Looking (externally) for %s in %s... \", functionName,module->name));\r\n\tif(module->handle)\r\n\t\tresult = ioFindExternalFunctionIn(functionName, module->handle);\r\n\telse\r\n\t\tresult = NULL;\r\n\tDPRINTF((\"%s\\n\", result ? \"found\" : \"not found\"));\r\n\treturn result;\r\n}\r\n\r\n/*\r\n\tfindInternalFunctionIn:\r\n\tLookup the given \"pluginName_functionName\" in the internal\r\n\tprimitive table. If it can not be found try to look it up\r\n\tby using the OS dependent mechanism (see comment below).\r\n*/\r\nstatic void *findInternalFunctionIn(const char *functionName, const char *pluginName)\r\n{\r\n  char *function, *plugin;\r\n  sqInt listIndex, index;\r\n  sqExport *exports;\r\n\r\n  DPRINTF((\"Looking (internally) for %s in %s ... \", functionName, (pluginName ? pluginName : \"<intrinsic>\")));\r\n\r\n  /* canonicalize functionName and pluginName to be NULL if not specified */\r\n  if(functionName && !functionName[0]) functionName = NULL;\r\n  if(pluginName && !pluginName[0]) pluginName = NULL;\r\n  for(listIndex=0;; listIndex++) {\r\n    exports = pluginExports[listIndex];\r\n    if(!exports) break;\r\n    for(index=0;; index++) {\r\n      plugin = exports[index].pluginName;\r\n      function = exports[index].primitiveName;\r\n      /* canonicalize plugin and function to be NULL if not specified */\r\n      if(plugin && !plugin[0]) plugin = NULL;\r\n      if(function && !function[0]) function = NULL;\r\n      if(!plugin && !function) break; /* At end of table. */\r\n      /* check for module name match */\r\n      if((pluginName == NULL) != (plugin == NULL)) continue; /* one is missing */\r\n      if(plugin && strcmp(pluginName, plugin)) continue; /* name mismatch */\r\n      /* check for function name match */\r\n      if((functionName == NULL) != (function == NULL)) continue; /* one is missing */\r\n      if(function && strcmp(functionName, function)) continue; /* name mismatch */\r\n\r\n      /* match */\r\n      DPRINTF((\"found\\n\"));\r\n      return exports[index].primitiveAddress;\r\n    }\r\n  }\r\n  DPRINTF((\"not found\\n\"));\r\n  return NULL;\r\n\r\n}\r\n\r\n\r\nstatic void *findFunctionIn(const char *functionName, ModuleEntry *module)\r\n{\r\n\tif(module->handle == squeakModule->handle)\r\n\t\treturn findInternalFunctionIn(functionName, module->name);\r\n\telse\r\n\t\treturn findExternalFunctionIn(functionName, module);\r\n}\r\n\r\n/*\r\n\tcallInitializersIn:\r\n\tCall the required initializers in the given module.\r\n\tThe module has been loaded before so the task is to\r\n\tcall a) setInterpreter() and check it's return, and\r\n\tb) initialiseModule (if defined) and check it's return\r\n\tas well.\r\n*/\r\nstatic sqInt callInitializersIn(ModuleEntry *module)\r\n{\r\n\tvoid *init0;\r\n\tvoid *init1;\r\n\tvoid *init2;\r\n\tchar *moduleName;\r\n\tsqInt okay;\r\n\r\n\tinit0 = findFunctionIn(\"getModuleName\", module);\r\n\tinit1 = findFunctionIn(\"setInterpreter\", module);\r\n\tinit2 = findFunctionIn(\"initialiseModule\", module);\r\n\r\n\tif(init0) {\r\n\t\t/* Check the compiled name of the module */\r\n\t\tmoduleName = ((char* (*) (void))init0)();\r\n\t\tif(!moduleName) {\r\n\t\t\tDPRINTF((\"ERROR: getModuleName() returned NULL\\n\"));\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tif(strncmp(moduleName, module->name, strlen(module->name)) != 0) {\r\n\t\t\tDPRINTF((\"ERROR: getModuleName returned %s (expected: %s)\\n\", moduleName, module->name));\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t} else {\r\n\t\t/* Note: older plugins may not export the compiled module name */\r\n\t\tDPRINTF((\"WARNING: getModuleName() not found in %s\\n\", module->name));\r\n\t}\r\n\tif(!init1) { \r\n\t\tDPRINTF((\"ERROR: setInterpreter() not found\\n\"));\r\n\t\treturn 0;\r\n\t}\r\n\t/* call setInterpreter */\r\n\tokay = ((sqInt (*) (struct VirtualMachine*))init1)(sqGetInterpreterProxy());\r\n\tif(!okay) {\r\n\t\tDPRINTF((\"ERROR: setInterpreter() returned false\\n\"));\r\n\t\treturn 0;\r\n\t}\r\n\tif(init2) {\r\n\t\tokay = ((sqInt (*) (void)) init2)();\r\n\t\tif(!okay) {\r\n\t\t\tDPRINTF((\"ERROR: initialiseModule() returned false\\n\"));\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}\r\n\tDPRINTF((\"SUCCESS: Module %s is now initialized\\n\", module->name));\r\n\treturn 1;\r\n}\r\n\r\n/*\r\n\tfindAndLoadModule:\r\n\tFind the module with the given name by,\r\n\t* first looking it up in some (external) shared library\r\n\t* then, by trying to find pluginName_setInterpreter.\r\n\tIf the module is found and the initialisers work, add it\r\n\tto the list of loaded modules and return the new module.\r\n\tIf anything goes wrong make sure the module is unloaded\r\n\t(WITHOUT calling shutdownModule()) and return NULL.\r\n*/\r\n\r\nstatic int moduleLoadingEnabled = 1;\r\n\r\n/* Disable module loading mechanism for the rest of current session. This operation should be not reversable! */\r\nvoid ioDisableModuleLoading() {\r\n\tmoduleLoadingEnabled = 0;\r\n}\r\n\r\nstatic ModuleEntry *findAndLoadModule(const char *pluginName, sqInt ffiLoad)\r\n{\r\n\tvoid *handle;\r\n\tModuleEntry *module;\r\n\r\n\tif (!moduleLoadingEnabled)\r\n\t\treturn NULL;\r\n\tDPRINTF((\"Looking for plugin %s\\n\", (pluginName ? pluginName : \"<intrinsic>\")));\r\n\t/* Try to load the module externally */\r\n\thandle = ioLoadModule(pluginName);\r\n\tif(ffiLoad) {\r\n\t\t/* When dealing with the FFI, don't attempt to mess around internally */\r\n\t\tif(!handle) return NULL;\r\n\t\treturn addToModuleList(pluginName, handle, ffiLoad);\r\n\t}\r\n\t/* NOT ffiLoad */\r\n\tif(!handle) {\r\n\t\t/* might be internal, so go looking for setInterpreter() */\r\n\t\tif(findInternalFunctionIn(\"setInterpreter\", pluginName))\r\n\t\t\thandle = squeakModule->handle;\r\n\t\telse\r\n\t\t\treturn NULL; /* PluginName_setInterpreter() not found */\r\n\t}\r\n\tmodule = addToModuleList(pluginName, handle, ffiLoad);\r\n\tif(!callInitializersIn(module)) {\r\n\t\t/* Initializers failed */\r\n\t\tif(handle != squeakModule->handle) {\r\n\t\t\t/* physically unload module */\r\n\t\t\tioFreeModule(handle);\r\n\t\t}\r\n\t\tremoveFromList(module); /* remove list entry */\r\n\t\tfree(module); /* give back space */\r\n\t\tmodule = NULL;\r\n\t}\r\n\treturn module;\r\n}\r\n\r\n/* findOrLoadModule:\r\n\tLook if the given module is already loaded. \r\n\tIf so, return it's handle, otherwise try to load it.\r\n*/\r\nstatic ModuleEntry *findOrLoadModule(const char *pluginName, sqInt ffiLoad)\r\n{\r\n\tModuleEntry *module;\r\n\r\n\tif(!squeakModule) {\r\n\t\t/* Load intrinsics (if possible) */\r\n\t\tsqueakModule = addToModuleList(\"\", NULL, 1);\r\n\t\tfirstModule = NULL; /* drop off module list - will never be unloaded */\r\n\t}\r\n\r\n\t/* see if the module was already loaded */\r\n\tmodule = findLoadedModule(pluginName);\r\n\tif(!module) {\r\n\t\t/* if not try loading it */\r\n\t\tmodule = findAndLoadModule(pluginName, ffiLoad);\r\n\t}\r\n\treturn module; /* module not found */\r\n}\r\n\r\n/* ioLoadFunctionFrom:\r\n\tLoad and return the given function from the specified plugin.\r\n\tReturn the function address if successful, otherwise 0.\r\n\tThis entry point is called from the interpreter proxy.\r\n*/\r\nvoid *ioLoadFunctionFrom(const char *functionName, const char *pluginName)\n{\r\n\tModuleEntry *module;\r\n\r\n\tmodule = findOrLoadModule(pluginName, 0);\r\n\tif(!module) {\r\n\t\t/* no module */\r\n\t\tDPRINTF((\"Failed to find %s (module %s was not loaded)\\n\", functionName, pluginName));\r\n\t\treturn 0;\r\n\t}\r\n\tif(!functionName) {\r\n\t\t/* only the module was requested but not any specific function */\r\n\t  return (void *)1;\r\n\t}\r\n\t/* and load the actual function */\r\n\treturn findFunctionIn(functionName, module);\r\n}\r\n\r\n/* ioLoadExternalFunctionOfLengthFromModuleOfLength\r\n\tEntry point for functions looked up through the VM.\r\n*/\r\nvoid *ioLoadExternalFunctionOfLengthFromModuleOfLength(sqInt functionNameIndex, sqInt functionNameLength,\r\n\t\t\t\t\t\t       sqInt moduleNameIndex,   sqInt moduleNameLength)\r\n{\r\n\tchar *functionNamePointer= pointerForIndex_xxx_dmu((usqInt)functionNameIndex);\r\n\tchar *moduleNamePointer= pointerForIndex_xxx_dmu((usqInt)moduleNameIndex);\r\n\tchar functionName[256];\r\n\tchar moduleName[256];\r\n\tsqInt i;\r\n\r\n\tif(functionNameLength > 255 || moduleNameLength > 255)\r\n\t\treturn 0; /* can't cope with those */\r\n\tfor(i=0; i< functionNameLength; i++)\r\n\t\tfunctionName[i] = functionNamePointer[i];\r\n\tfunctionName[functionNameLength] = 0;\r\n\tfor(i=0; i< moduleNameLength; i++)\r\n\t\tmoduleName[i] = moduleNamePointer[i];\r\n\tmoduleName[moduleNameLength] = 0;\r\n\treturn ioLoadFunctionFrom(functionName, moduleName);\r\n}\r\n\r\n/* ioLoadSymbolOfLengthFromModule\r\n\tThis entry point is exclusively for the FFI.\r\n*/\r\nvoid *ioLoadSymbolOfLengthFromModule(sqInt functionNameIndex, sqInt functionNameLength, void *moduleHandle)\r\n{\r\n\tchar *functionNamePointer= pointerForIndex_xxx_dmu((usqInt)functionNameIndex);\r\n\tchar functionName[256];\r\n\tsqInt i;\r\n\r\n\tif(functionNameLength > 255)\r\n\t\treturn 0; /* can't cope with those */\r\n\tfor(i=0; i< functionNameLength; i++)\r\n\t\tfunctionName[i] = functionNamePointer[i];\r\n\tfunctionName[functionNameLength] = 0;\r\n\tif(moduleHandle)\r\n\t\treturn ioFindExternalFunctionIn(functionName, moduleHandle);\r\n\telse\r\n\t\treturn 0;\r\n}\r\n\r\n/* ioLoadModuleOfLength\r\n\tThis entry point is exclusively for the FFI.\r\n\tIt does *NOT* call any of the initializers nor\r\n\tdoes it attempt to lookup stuff internally.\r\n*/\r\nvoid *ioLoadModuleOfLength(sqInt moduleNameIndex, sqInt moduleNameLength)\r\n{\r\n\tModuleEntry *module;\r\n\tchar *moduleNamePointer= pointerForIndex_xxx_dmu((usqInt)moduleNameIndex);\r\n\tchar moduleName[256];\r\n\tsqInt i;\r\n\r\n\tif(moduleNameLength > 255) return 0; /* can't cope with those */\r\n\tfor(i=0; i< moduleNameLength; i++)\r\n\t\tmoduleName[i] = moduleNamePointer[i];\r\n\tmoduleName[moduleNameLength] = 0;\r\n\r\n\tmodule = findOrLoadModule(moduleName, 1);\r\n\tif(module) return module->handle;\r\n\treturn 0;\r\n}\r\n\r\n/* shutdownModule:\r\n\tCall the shutdown mechanism from the specified module.\r\n*/\r\nstatic sqInt shutdownModule(ModuleEntry *module)\r\n{\r\n\tvoid* fn;\r\n\r\n\tif(module->ffiLoaded) return 1; /* don't even attempt for ffi loaded modules */\r\n\r\n\t/* load the actual function */\r\n\tfn = findFunctionIn(\"shutdownModule\", module);\r\n\tif(fn) return ((sqInt (*) (void)) fn) ();\r\n\treturn 1;\r\n}\r\n\r\n/* ioShutdownAllModules:\r\n\tCall the shutdown mechanism for all loaded modules.\r\n*/\r\nsqInt ioShutdownAllModules(void)\r\n{\r\n\tModuleEntry *entry;\r\n\tentry = firstModule;\r\n\twhile(entry) {\r\n\t\tshutdownModule(entry);\r\n\t\tentry = entry->next;\r\n\t}\r\n\treturn 1;\r\n}\r\n\r\n/* ioUnloadModule:\r\n\tUnload the module with the given name.\r\n*/\r\nsqInt ioUnloadModule(const char *moduleName)\r\n{\r\n\tModuleEntry *entry, *temp;\r\n\r\n\tif(!squeakModule) return 0; /* Nothing has been loaded */\r\n\tif(!moduleName || !moduleName[0]) return 0; /* nope */\r\n\r\n\tentry = findLoadedModule(moduleName);\r\n\tif(!entry) return 1; /* module was never loaded */\r\n\r\n\t/* Try to shutdown the module */\r\n\tif(!shutdownModule(entry)) {\r\n\t\t/* Could not shut down the module. Bail out. */\r\n\t\treturn 0;\r\n\t}\r\n\t/* Notify all interested parties about the fact */\r\n\ttemp = firstModule;\r\n\twhile(temp) {\r\n\t\tif(temp != entry) {\r\n\t\t\t/* Lookup moduleUnloaded: from the plugin */\r\n\t\t\tvoid *fn = findFunctionIn(\"moduleUnloaded\", temp);\r\n\t\t\tif(fn) {\r\n\t\t\t\t/* call it */\r\n\t\t\t\t((sqInt (*) (char *))fn)(entry->name);\r\n\t\t\t}\r\n\t\t}\r\n\t\ttemp = temp->next;\r\n\t}\r\n\t/* And actually unload it if it isn't just the VM... */\r\n\tif(entry->handle != squeakModule->handle)\r\n\t\tioFreeModule(entry->handle);\r\n\tremoveFromList(entry);\r\n\tfree(entry); /* give back space */\r\n\treturn 1;\r\n}\r\n\r\n/* ioUnloadModuleOfLength:\r\n\tEntry point for the interpreter.\r\n*/\r\nsqInt ioUnloadModuleOfLength(sqInt moduleNameIndex, sqInt moduleNameLength)\r\n{\r\n\tchar *moduleNamePointer= pointerForIndex_xxx_dmu((usqInt) moduleNameIndex);\r\n\tchar moduleName[256];\r\n\tsqInt i;\r\n\r\n\tif(moduleNameLength > 255) return 0; /* can't cope with those */\r\n\tfor(i=0; i< moduleNameLength; i++)\r\n\t\tmoduleName[i] = moduleNamePointer[i];\r\n\tmoduleName[moduleNameLength] = 0;\r\n\treturn ioUnloadModule(moduleName);\r\n}\r\n\r\n/* ioListBuiltinModule:\r\n\tReturn the name of the n-th builtin module.\r\n*/\r\n\r\nchar *ioListBuiltinModule(sqInt moduleIndex)\r\n{\r\n  sqInt index, listIndex;\r\n  char *function;\r\n  char *plugin;\r\n  sqExport *exports;\r\n\r\n  for(listIndex=0;; listIndex++) {\r\n    exports = pluginExports[listIndex];\r\n    if(!exports) break;\r\n    for(index=0;; index++) {\r\n      plugin = exports[index].pluginName;\r\n      function = exports[index].primitiveName;\r\n      if(!function && !plugin) break; /* no more plugins */\r\n      if(strcmp(function,\"setInterpreter\") == 0) {\r\n\t/* new module */\r\n\tif(--moduleIndex == 0) {\r\n\t  char *moduleName;\r\n\t  void * init0;\r\n\t  init0 = findInternalFunctionIn(\"getModuleName\", plugin);\r\n\t  if(init0) {\r\n\t    /* Check the compiled name of the module */\r\n\t    moduleName = ((char* (*) (void))init0)();\r\n\t    if(moduleName) { return moduleName;}\r\n\t  }\r\n\t  return plugin;\r\n\t}\r\n      }\r\n    }\r\n  }\r\n  return NULL;\r\n}\r\n\r\nchar *ioListLoadedModule(sqInt moduleIndex) {\r\n\tsqInt index = 1;\r\n\r\n\tModuleEntry *entry;\r\n\tentry = firstModule;\r\n\r\n\tif ( moduleIndex < 1) return (char*)NULL;\r\n\twhile(entry && index < moduleIndex) {\r\n\t\tentry = entry->next;\r\n\t\tindex = index + 1;\r\n\t}\r\n\tif ( entry ) {\r\n\t\tchar *moduleName;\r\n\t\tvoid * init0;\r\n\r\n\t\tinit0 = findFunctionIn(\"getModuleName\", entry);\r\n\t\tif(init0) {\r\n\t\t\t/* Check the compiled name of the module */\r\n\t\t\tmoduleName = ((char* (*) (void))init0)();\r\n\t\t\tif(moduleName) { return moduleName;}\r\n\t\t}\r\n\t\treturn entry->name;\r\n\t}\r\n\telse return (char*)NULL;\r\n}\r\n\n\n\nvoid rvm_callInitializersInAllModules() {\n  findOrLoadModule(\"BitBltPlugin\", 0);\n  // xxxxxx Which other modules?\n}\n\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/vm/sqTicker.c",
    "content": "/* sqTicker.c\n *\tCore cross-platform tickers.  tick.er (n): one who ticks a tickee \n *\n *\tAuthors: Eliot Miranda & Josh Gargus\n *\n *\tCopyright (C) 2010 by Teleplace, Inc.\n *\n *\tAll rights reserved.\n *   \n *   This file is part of Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n */\n\n/* High-priority and synchronous tickee function support.\n *\n * Tickers provide the ability to register a tickee function that will be\n * called at a regular interval.  There are two sets of tickers.  The high-\n * priority ticker is asynchronous and if possible, runs in a high-priority\n * thread or if not, from an interrupt.  Running from an interrupt is undesir-\n * able because it is much easier to create deadlock, for example by interrupt-\n * ing the VM when it has acquired some lock, and a tickee tries to acquire\n * the same lock.   But the use of an interrupt is forced on linux because as\n * of 2006 and the 2.6.x kernel there is no way for a non-root process to\n * create threads of different priorities.\n *\n * The synchronous ticker runs in the VM thread at the earliest opportunity once\n * the tick has occurred.  The VM calls the ticker from its event check.\n *\n * This file implements the cross-platform components, registering tickers and\n * calling tickers if deadlines have been reached.  The platform-specific heart-\n * beats implement the threads or interrupts and the clocks.\n *\n * For the moment the number of asynchronous and synchronous tickees is\n * hard-wired, but they could easily be defined by a command-line argument etc.\n */\n\n#include \"sq.h\"\n#include \"sqAssert.h\"\n#include \"sqAtomicOps.h\"\n#include \"sqMemoryFence.h\"\n\n\n#define NUM_ASYNCHRONOUS_TICKEES 4\n#define NUM_SYNCHRONOUS_TICKEES 4\n#define MicrosecondsPerMillisecond 1000\n\ntypedef struct {\n\tvoid (*tickee)(void);\n\tlong\tinProgress;\t/* used only in high-priority ticker */\n\tusqLong tickeeDeadlineUsecs;\n\tusqLong tickeePeriodUsecs;\n} Tickee;\n\nstatic int numSyncTickees = 0;\nstatic Tickee synch[NUM_SYNCHRONOUS_TICKEES];\n\n#if ITIMER_HEARTBEAT\n/* See platforms/unix/vm/sqUnixHeartbeat.c */\nstatic volatile int shouldYieldToHighPriorityTickerThread;\n#endif\n\n/* Add or remove a synchronous tickee.  If periodms is non zero add the tickee\n * calling it every periodms, aligned to roundms, if non-zero.  If periodms is\n * zero, remove tickee.\n */\nvoid\naddSynchronousTickee(void (*tickee)(void), unsigned periodms, unsigned roundms)\n{\n\tint i;\n\n\tif (!periodms) {\n\t\tfor (i = 0; i < numSyncTickees; i++)\n\t\t\tif (synch[i].tickee == tickee) {\n\t\t\t\t--numSyncTickees;\n\t\t\t\tif (i < numSyncTickees)\n\t\t\t\t\tmemmove(synch + i,\n\t\t\t\t\t\t\tsynch + i + 1,\n\t\t\t\t\t\t\tsizeof(synch[i]) * (numSyncTickees - i));\n\t\t\t\treturn;\n\t\t\t}\n\t\treturn;\n\t}\n\tfor (i = 0; i < NUM_SYNCHRONOUS_TICKEES; i++)\n\t\tif (i >= numSyncTickees\n\t\t || !synch[i].tickee\n\t\t || synch[i].tickee == tickee) {\n\t\t\tsynch[i].tickee = tickee;\n\t\t\tsynch[i].tickeePeriodUsecs = periodms * MicrosecondsPerMillisecond;\n\t\t\tsynch[i].tickeeDeadlineUsecs = synch[i].tickeePeriodUsecs\n\t\t\t\t\t\t\t\t\t\t+ ioUTCMicroseconds();\n\t\t\tif (roundms) {\n\t\t\t\tsynch[i].tickeeDeadlineUsecs -= synch[i].tickeeDeadlineUsecs\n\t\t\t\t\t\t\t\t\t\t% (roundms * MicrosecondsPerMillisecond);\n\t\t\t\tif (synch[i].tickeeDeadlineUsecs < ioUTCMicroseconds())\n\t\t\t\t\tsynch[i].tickeeDeadlineUsecs += synch[i].tickeePeriodUsecs;\n\t\t\t}\n\t\t\tif (i >= numSyncTickees)\n\t\t\t\t++numSyncTickees;\n\t\t\treturn;\n\t\t}\n\terror(\"ran out of synchronous tickee slots\");\n}\n\nvoid\nioSynchronousCheckForEvents()\n{\n\tint i;\n\n#if ITIMER_HEARTBEAT\n\textern void yieldToHighPriorityTickerThread(void);\n\tsqLowLevelMFence();\n\tif (shouldYieldToHighPriorityTickerThread)\n\t\tyieldToHighPriorityTickerThread();\n#endif\n\tfor (i = 0; i < numSyncTickees; i++)\n\t\tif (synch[i].tickee\n\t\t && ioUTCMicroseconds() >= synch[i].tickeeDeadlineUsecs) {\n\t\t\tsynch[i].tickeeDeadlineUsecs += synch[i].tickeePeriodUsecs;\n\t\t\tsynch[i].tickee();\n\t\t}\n}\n\n#if !ITIMER_HEARTBEAT\t/* Hack; allow heartbeat to avoid */\nstatic\t\t\t\t\t/* prodHighPriorityThread unless necessary */\n# endif\t\t\t\t\t/* see platforms/unix/vm/sqUnixHeartbeat.c */\nint numAsyncTickees = 0;\nstatic Tickee async[NUM_ASYNCHRONOUS_TICKEES];\n\n/* Add or remove an asynchronous tickee.  If periodms is non zero add the\n * tickee, calling it every periodms.\n *\n * N.B. addHighPriorityTickee is called from the VM thread, whereas\n * checkHighPriorityTickees is called from the high-priority heartbeat thread\n * (or an interrupt).  The above 64-bit variables must therefore be read and\n * written atomically to avoid either thread reading or writing a modified\n * half of the variable while the other half has yet to be updated.\n */\nvoid\naddHighPriorityTickee(void (*tickee)(void), unsigned periodms)\n{\n\tint i;\n\n\tif (!periodms) {\n\t\tfor (i = 0; i < numAsyncTickees; i++)\n\t\t\t/* We cannot safely copy the data to keep used tickees contiguous\n\t\t\t * because checkHighPriorityTickees could be called during the move.\n\t\t\t * This implies first checking for an existing tickee below before\n\t\t\t * using an empty slot because an empty slot can be created before\n\t\t\t * a used (and subsequently modified) tickee.\n\t\t\t */\n\t\t\tif (async[i].tickee == tickee) {\n\t\t\t\tasync[i].tickee = 0;\n\t\t\t\tsqLowLevelMFence();\n\t\t\t\treturn;\n\t\t\t}\n\t\treturn;\n\t}\n\tfor (i = 0; i < numAsyncTickees; i++)\n\t\tif (async[i].tickee == tickee)\n\t\t\tbreak;\n\tif (i >= numAsyncTickees)\n\t\tfor (i = 0; i < NUM_ASYNCHRONOUS_TICKEES; i++)\n\t\t\tif (i >= numAsyncTickees\n\t\t\t || !async[i].tickee)\n\t\t\t\tbreak;\n\tif (i >= NUM_ASYNCHRONOUS_TICKEES)\n\t\terror(\"ran out of asyncronous tickee slots\");\n\n\t/* first disable the tickee while updating the entry. */\n\tasync[i].tickee = 0;\n\tsqLowLevelMFence();\n\tasync[i].tickeePeriodUsecs = periodms * MicrosecondsPerMillisecond;\n\tasync[i].tickeeDeadlineUsecs = async[i].tickeePeriodUsecs\n\t\t\t\t\t\t\t\t+ ioUTCMicroseconds();\n\tasync[i].inProgress = 0;\n\tasync[i].tickee = tickee;\n\tif (i >= numAsyncTickees)\n\t\t++numAsyncTickees;\n\tsqLowLevelMFence();\n}\n\n/* If the heartbeat fails to invoke checkHighPriorityTickees in a timely manner\n * for wahtever reason (e.g. the user has put the machine to sleep) we need to\n * readjust the deadline, moving it forward to a delta from the current time.\n * If we don't then the heartbeat will spin calling checkHighPriorityTickees as\n * it inches forward at tickeePeriodUsecs.  But if we always base the deadline\n * on the current time and for whatever reason there is a slight hiccup then all\n * subsequent deadlines will be pushed into the future.  The HiccupThreshold of\n * 10 seconds distinguishes between the two cases; longer than 10 seconds and we\n * assume the system has slept.\n */\n#define HiccupThreshold 10000000ULL /* 10 seconds */\n\nvoid\ncheckHighPriorityTickees(usqLong utcMicrosecondClock)\n{\n\tint i;\n\n#if ITIMER_HEARTBEAT\n\textern void unblockVMThreadAfterYieldToHighPriorityTickerThread(void);\n\tshouldYieldToHighPriorityTickerThread = 1;\n#endif\n\t/* Since this runs either in a high-priority thread or in an interrupt only\n\t * one fence is needed.  Since the VM thread will not disturb any non-zero\n\t * entry (except for changing the period) we can read the entry without\n\t * locking.  But we need to lock the attempt to run the tickee in case for\n\t * any reason checkHighPriorityTickees is miscalled reentrantly.\n\t */\n\tsqLowLevelMFence();\n\tfor (i = 0; i < numAsyncTickees; i++)\n\t\tif (async[i].tickee\n\t\t && !async[i].inProgress\n\t\t && utcMicrosecondClock >= async[i].tickeeDeadlineUsecs) {\n\t\t\tint previousInProgress;\n\t\t\tsqCompareAndSwapRes(async[i].inProgress,0,1,previousInProgress);\n\t\t\tif (previousInProgress == 0) {\n\t\t\t\tassert(async[i].inProgress);\n\t\t\t\tif (async[i].tickeeDeadlineUsecs + HiccupThreshold\n\t\t\t\t\t< utcMicrosecondClock)\n\t\t\t\t\tasync[i].tickeeDeadlineUsecs\n\t\t\t\t\t\t= utcMicrosecondClock + async[i].tickeePeriodUsecs;\n\t\t\t\telse\n\t\t\t\t\tasync[i].tickeeDeadlineUsecs\n\t\t\t\t\t\t+= async[i].tickeePeriodUsecs;\n\t\t\t\tasync[i].tickee();\n\t\t\t\tasync[i].inProgress = 0;\n\t\t\t}\n\t\t}\n#if ITIMER_HEARTBEAT\n\tshouldYieldToHighPriorityTickerThread = 0;\n\tsqLowLevelMFence();\n\tunblockVMThreadAfterYieldToHighPriorityTickerThread();\n#endif\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/vm/sqVirtualMachine.c",
    "content": "#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n#include <setjmp.h>\n\n#include \"squeak_adapters.h\"\n#include \"sqVirtualMachine.h\"\n\n/*** Function prototypes ***/\n\n/* InterpreterProxy methodsFor: 'stack access' */\nsqInt  pop(sqInt nItems);\nsqInt  popthenPush(sqInt nItems, sqInt oop);\nsqInt  push(sqInt object);\nsqInt  pushBool(sqInt trueOrFalse);\nsqInt  pushFloat(double f);\nsqInt  pushInteger(sqInt integerValue);\ndouble stackFloatValue(sqInt offset);\nsqInt  stackIntegerValue(sqInt offset);\nsqInt  stackObjectValue(sqInt offset);\nsqInt  stackValue(sqInt offset);\n\n/*** variables ***/\n\n\n/* InterpreterProxy methodsFor: 'object access' */\nsqInt  argumentCountOf(sqInt methodPointer);\nvoid  *arrayValueOf(sqInt oop);\nsqInt  byteSizeOf(sqInt oop);\nvoid  *fetchArrayofObject(sqInt fieldIndex, sqInt objectPointer);\nsqInt  fetchClassOf(sqInt oop);\ndouble fetchFloatofObject(sqInt fieldIndex, sqInt objectPointer);\nsqInt  fetchIntegerofObject(sqInt fieldIndex, sqInt objectPointer);\nsqInt  fetchPointerofObject(sqInt index, sqInt oop);\n/* sqInt  fetchWordofObject(sqInt fieldIndex, sqInt oop);     *\n * has been rescinded as of VMMaker 3.8 and the 64bitclean VM *\n * work. To support old plugins we keep a valid function in   *\n * the same location in the VM struct but rename it to        *\n * something utterly horrible to scare off the natives. A new *\n * equivalent but 64 bit valid function is added as           *\n * 'fetchLong32OfObject'                                      */\nsqInt  obsoleteDontUseThisFetchWordofObject(sqInt index, sqInt oop);\nsqInt  fetchLong32ofObject(sqInt index, sqInt oop); \nvoid  *firstFixedField(sqInt oop);\nvoid  *firstIndexableField(sqInt oop);\nsqInt  literalofMethod(sqInt offset, sqInt methodPointer);\nsqInt  literalCountOf(sqInt methodPointer);\nsqInt  methodArgumentCount(void);\nsqInt  methodPrimitiveIndex(void);\nsqInt  primitiveMethod(void);\nsqInt  primitiveIndexOf(sqInt methodPointer);\nsqInt  sizeOfSTArrayFromCPrimitive(void *cPtr);\nsqInt  slotSizeOf(sqInt oop);\nsqInt  stObjectat(sqInt array, sqInt index);\nsqInt  stObjectatput(sqInt array, sqInt index, sqInt value);\nsqInt  stSizeOf(sqInt oop);\nsqInt  storeIntegerofObjectwithValue(sqInt index, sqInt oop, sqInt integer);\nsqInt  storePointerofObjectwithValue(sqInt index, sqInt oop, sqInt valuePointer);\n\n\n/* InterpreterProxy methodsFor: 'testing' */\nsqInt isKindOf(sqInt oop, char *aString);\nsqInt isMemberOf(sqInt oop, char *aString);\nsqInt isBytes(sqInt oop);\nsqInt isFloatObject(sqInt oop);\nsqInt isIndexable(sqInt oop);\nsqInt isIntegerObject(sqInt objectPointer);\nsqInt isIntegerValue(sqInt intValue);\nsqInt isPointers(sqInt oop);\nsqInt isWeak(sqInt oop);\nsqInt isWords(sqInt oop);\nsqInt isWordsOrBytes(sqInt oop);\nsqInt includesBehaviorThatOf(sqInt aClass, sqInt aSuperClass);\n#if VM_PROXY_MINOR > 10\nsqInt primitiveErrorTable(void);\n#endif\n\n#if VM_PROXY_MINOR > 10 || defined(ROAR_VM)\n  sqInt primitiveFailureCode(void);\n  sqInt tenuringIncrementalGC(void);\n  sqInt isKindOfClass(sqInt oop, sqInt aClass);\n  sqInt instanceSizeOf(sqInt aClass);\n#endif\n\nsqInt isArray(sqInt oop);\n#if IMMUTABILITY\nsqInt internalIsMutable(sqInt oop);\nsqInt internalIsImmutable(sqInt oop);\n#endif\n\n/* InterpreterProxy methodsFor: 'converting' */\nsqInt  booleanValueOf(sqInt obj);\nsqInt  checkedIntegerValueOf(sqInt intOop);\nsqInt  floatObjectOf(double aFloat);\ndouble floatValueOf(sqInt oop);\nsqInt  integerObjectOf(sqInt value);\nsqInt  integerValueOf(sqInt oop);\nsqInt  positive32BitIntegerFor(sqInt integerValue);\nsqInt  positive32BitValueOf(sqInt oop);\nsqInt  signed32BitIntegerFor(sqInt integerValue);\nsqInt  signed32BitValueOf(sqInt oop);\nsqInt  positive64BitIntegerFor(sqLong integerValue);\nsqLong positive64BitValueOf(sqInt oop);\nsqInt  signed64BitIntegerFor(sqLong integerValue);\nsqLong signed64BitValueOf(sqInt oop);\nlong  signedMachineIntegerValueOf(sqInt);\nlong  stackSignedMachineIntegerValue(sqInt);\nunsigned long  positiveMachineIntegerValueOf(sqInt);\nunsigned long  stackPositiveMachineIntegerValue(sqInt);\n\n/* InterpreterProxy methodsFor: 'special objects' */\nsqInt characterTable(void);\nsqInt displayObject(void);\nsqInt falseObject(void);\nsqInt nilObject(void);\nsqInt trueObject(void);\n\n\n/* InterpreterProxy methodsFor: 'special classes' */\nsqInt classArray(void);\nsqInt classBitmap(void);\nsqInt classByteArray(void);\nsqInt classCharacter(void);\nsqInt classFloat(void);\nsqInt classLargePositiveInteger(void);\nsqInt classLargeNegativeInteger(void);\nsqInt classPoint(void);\nsqInt classSemaphore(void);\nsqInt classSmallInteger(void);\nsqInt classString(void);\n\n\n/* InterpreterProxy methodsFor: 'instance creation' */\n# ifdef ROAR_VM\n  sqInt sqr_clone(sqInt oop);\n# else\n  sqInt clone(sqInt oop);\n# endif // ROAR_VM\nsqInt instantiateClassindexableSize(sqInt classPointer, sqInt size);\nsqInt makePointwithxValueyValue(sqInt xValue, sqInt yValue);\nsqInt popRemappableOop(void);\nsqInt pushRemappableOop(sqInt oop);\n\n\n/* InterpreterProxy methodsFor: 'other' */\nsqInt becomewith(sqInt array1, sqInt array2);\nsqInt byteSwapped(sqInt w);\nsqInt failed(void);\nsqInt fullDisplayUpdate(void);\nsqInt fullGC(void);\nsqInt incrementalGC(void);\nsqInt primitiveFail(void);\nsqInt primitiveFailFor(sqInt reasonCode);\nsqInt showDisplayBitsLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b);\nsqInt signalSemaphoreWithIndex(sqInt semaIndex);\nsqInt success(sqInt aBoolean);\nsqInt superclassOf(sqInt classPointer);\nsqInt ioMicroMSecs(void);\nusqLong ioUTCMicroseconds(void);\nsqInt forceInterruptCheck(void);\nsqInt getThisSessionID(void);\nsqInt ioFilenamefromStringofLengthresolveAliases(char* aCharBuffer, char* filenameIndex, sqInt filenameLength, sqInt resolveFlag);\nsqInt  vmEndianness(void);\t\nsqInt getInterruptPending(void);\n\n/* InterpreterProxy methodsFor: 'BitBlt support' */\nsqInt loadBitBltFrom(sqInt bbOop);\nsqInt copyBits(void);\nsqInt copyBitsFromtoat(sqInt leftX, sqInt rightX, sqInt yValue);\n\n/* InterpreterProxy methodsFor: 'FFI support' */\nsqInt classExternalAddress(void); /* Old Squeak FFI */\nsqInt classExternalData(void);\nsqInt classExternalFunction(void);\nsqInt classExternalLibrary(void);\nsqInt classExternalStructure(void);\nsqInt ioLoadModuleOfLength(sqInt moduleNameIndex, sqInt moduleNameLength);\nsqInt ioLoadSymbolOfLengthFromModule(sqInt functionNameIndex, sqInt functionNameLength, sqInt moduleHandle);\nsqInt isInMemory(sqInt address);\n\n# if VM_PROXY_MINOR > 7\nsqInt classUnsafeAlien(void); /* Alien FFI */\nvoid *startOfAlienData(sqInt);\nusqInt sizeOfAlienData(sqInt);\nsqInt getStackPointer(void);  /* Alien FFI */\nsqInt sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtrAsInt, sqInt stackPtrAsInt, sqInt regsPtrAsInt, sqInt jmpBufPtrAsInt); /* Alien FFI */\nsqInt reestablishContextPriorToCallback(sqInt callbackContext); /* Alien FFI */\nsqInt sendInvokeCallbackContext(VMCallbackContext *);\nsqInt returnAsThroughCallbackContext(int, VMCallbackContext *, sqInt);\nchar *cStringOrNullFor(sqInt);\n# endif\n\n#if VM_PROXY_MINOR > 8 || defined(ROAR_VM)\n  sqInt classAlien(void); /* Alien FFI */\n#endif\n\nvoid *ioLoadFunctionFrom(const char *fnName, const char *modName);\n\n# if VM_PROXY_MINOR > 7\n/* Proxy declarations for v1.8 */\nsqInt callbackEnter(sqInt *callbackID);\nsqInt callbackLeave(sqInt  callbackID);\nsqInt addGCRoot(sqInt *varLoc);\nsqInt removeGCRoot(sqInt *varLoc);\n\n/* Proxy declarations for v1.10 */\nsqInt methodArg(sqInt index);\nsqInt objectArg(sqInt index);\nsqInt integerArg(sqInt index);\ndouble floatArg(sqInt index);\n\n# endif // VM_PROXY_MINOR\n\n#if VM_PROXY_MINOR > 9 || defined(ROAR_VM)\n  sqInt topRemappableOop(void);\n  sqInt methodReturnValue(sqInt oop);\n#endif\n\n\nstruct VirtualMachine *VM = NULL;\n\nstatic sqInt majorVersion(void) {\n\treturn VM_PROXY_MAJOR;\n}\n\nstatic sqInt minorVersion(void) {\n\treturn VM_PROXY_MINOR;\n}\n\n#if !IMMUTABILITY\nstatic sqInt isNonIntegerObject(sqInt objectPointer)\n{\n\treturn !isIntegerObject(objectPointer);\n}\n#endif\n\n#if STACKVM\nvoid (*setInterruptCheckChain(void (*aFunction)(void)))();\n#else\nvoid (*setInterruptCheckChain(void (*aFunction)(void)))() { return 0; }\n#endif\n\n# if VM_PROXY_MINOR > 7\n#if COGMTVM\nsqInt disownVM(sqInt flags);\nsqInt ownVM(sqInt threadIdAndFlags);\n#else\nsqInt disownVM(sqInt flags) { return 1; }\nsqInt ownVM(sqInt threadIdAndFlags)\n{\n\textern sqInt amInVMThread(void);\n\treturn amInVMThread() ? 0 : -1;\n}\n#endif\n# endif // VM_PROXY_MINOR\n\nextern sqInt isYoung(sqInt);\n\n/* High-priority and synchronous ticker function support. */\nvoid addHighPriorityTickee(void (*ticker)(void), unsigned periodms);\nvoid addSynchronousTickee(void (*ticker)(void), unsigned periodms, unsigned roundms);\n\nstruct VirtualMachine* sqGetInterpreterProxy(void)\n{\n\tif(VM) return VM;\n\tVM = (struct VirtualMachine *)calloc(1, sizeof(VirtualMachine));\n\t/* Initialize Function pointers */\n\tVM->majorVersion = majorVersion;\n\tVM->minorVersion = minorVersion;\n\n\t/* InterpreterProxy methodsFor: 'stack access' */\n\tVM->pop = pop;\n\tVM->popthenPush = popthenPush;\n\tVM->push = push;\n\tVM->pushBool = pushBool;\n\tVM->pushFloat = pushFloat;\n\tVM->pushInteger = pushInteger;\n\tVM->stackFloatValue = stackFloatValue;\n\tVM->stackIntegerValue = stackIntegerValue;\n\tVM->stackObjectValue = stackObjectValue;\n\tVM->stackValue = stackValue;\n\t\n\t/* InterpreterProxy methodsFor: 'object access' */\n\tVM->argumentCountOf = argumentCountOf;\n\tVM->arrayValueOf = arrayValueOf;\n\tVM->byteSizeOf = byteSizeOf;\n\tVM->fetchArrayofObject = fetchArrayofObject;\n\tVM->fetchClassOf = fetchClassOf;\n\tVM->fetchFloatofObject = fetchFloatofObject;\n\tVM->fetchIntegerofObject = fetchIntegerofObject;\n\tVM->fetchPointerofObject = fetchPointerofObject;\n\tVM->obsoleteDontUseThisFetchWordofObject = obsoleteDontUseThisFetchWordofObject;\n\tVM->firstFixedField = firstFixedField;\n\tVM->firstIndexableField = firstIndexableField;\n\tVM->literalofMethod = literalofMethod;\n\tVM->literalCountOf = literalCountOf;\n\tVM->methodArgumentCount = methodArgumentCount;\n\tVM->methodPrimitiveIndex = methodPrimitiveIndex;\n\tVM->primitiveIndexOf = primitiveIndexOf;\n\tVM->primitiveMethod = primitiveMethod;\n\tVM->sizeOfSTArrayFromCPrimitive = sizeOfSTArrayFromCPrimitive;\n\tVM->slotSizeOf = slotSizeOf;\n\tVM->stObjectat = stObjectat;\n\tVM->stObjectatput = stObjectatput;\n\tVM->stSizeOf = stSizeOf;\n\tVM->storeIntegerofObjectwithValue = storeIntegerofObjectwithValue;\n\tVM->storePointerofObjectwithValue = storePointerofObjectwithValue;\n\t\n\t/* InterpreterProxy methodsFor: 'testing' */\n\tVM->isKindOf = isKindOf;\n\tVM->isMemberOf = isMemberOf;\n\tVM->isBytes = isBytes;\n\tVM->isFloatObject = isFloatObject;\n\tVM->isIndexable = isIndexable;\n\tVM->isIntegerObject = isIntegerObject;\n\tVM->isIntegerValue = isIntegerValue;\n\tVM->isPointers = isPointers;\n\tVM->isWeak = isWeak;\n\tVM->isWords = isWords;\n\tVM->isWordsOrBytes = isWordsOrBytes;\n\n\t/* InterpreterProxy methodsFor: 'converting' */\n\tVM->booleanValueOf = booleanValueOf;\n\tVM->checkedIntegerValueOf = checkedIntegerValueOf;\n\tVM->floatObjectOf = floatObjectOf;\n\tVM->floatValueOf = floatValueOf;\n\tVM->integerObjectOf = integerObjectOf;\n\tVM->integerValueOf = integerValueOf;\n\tVM->positive32BitIntegerFor = positive32BitIntegerFor;\n\tVM->positive32BitValueOf = positive32BitValueOf;\n\n\t/* InterpreterProxy methodsFor: 'special objects' */\n\tVM->characterTable = characterTable;\n\tVM->displayObject = displayObject;\n\tVM->falseObject = falseObject;\n\tVM->nilObject = nilObject;\n\tVM->trueObject = trueObject;\n\t\n\t/* InterpreterProxy methodsFor: 'special classes' */\n\tVM->classArray = classArray;\n\tVM->classBitmap = classBitmap;\n\tVM->classByteArray = classByteArray;\n\tVM->classCharacter = classCharacter;\n\tVM->classFloat = classFloat;\n\tVM->classLargePositiveInteger = classLargePositiveInteger;\n\tVM->classPoint = classPoint;\n\tVM->classSemaphore = classSemaphore;\n\tVM->classSmallInteger = classSmallInteger;\n\tVM->classString = classString;\n\t\n\t/* InterpreterProxy methodsFor: 'instance creation' */\n\t# ifdef ROAR_VM\n\t  VM->clone = sqr_clone;\n\t# else\n\t  VM->clone = clone;\n\t# endif\n\tVM->instantiateClassindexableSize = instantiateClassindexableSize;\n\tVM->makePointwithxValueyValue = makePointwithxValueyValue;\n\tVM->popRemappableOop = popRemappableOop;\n\tVM->pushRemappableOop = pushRemappableOop;\n\n\t/* InterpreterProxy methodsFor: 'other' */\n\tVM->becomewith = becomewith;\n\tVM->byteSwapped = byteSwapped;\n\tVM->failed = failed;\n\tVM->fullDisplayUpdate = fullDisplayUpdate;\n\tVM->fullGC = fullGC;\n\tVM->incrementalGC = incrementalGC;\n\tVM->primitiveFail = primitiveFail;\n\tVM->showDisplayBitsLeftTopRightBottom = showDisplayBitsLeftTopRightBottom;\n\tVM->signalSemaphoreWithIndex = signalSemaphoreWithIndex;\n\tVM->success = success;\n\tVM->superclassOf = superclassOf;\n\n\tVM->compilerHookVector= 0;\n\tVM->setCompilerInitialized= 0;\n\n#if VM_PROXY_MINOR > 1\n\n\t/* InterpreterProxy methodsFor: 'BitBlt support' */\n\tVM->loadBitBltFrom = loadBitBltFrom;\n\tVM->copyBits = copyBits;\n\tVM->copyBitsFromtoat = copyBitsFromtoat;\n\n#endif\n\n#if VM_PROXY_MINOR > 2\n\n\t/* InterpreterProxy methodsFor: 'FFI support' */\n\tVM->classExternalAddress = classExternalAddress;\n\tVM->classExternalData = classExternalData;\n\tVM->classExternalFunction = classExternalFunction;\n\tVM->classExternalLibrary = classExternalLibrary;\n\tVM->classExternalStructure = classExternalStructure;\n\tVM->ioLoadModuleOfLength = ioLoadModuleOfLength;\n\tVM->ioLoadSymbolOfLengthFromModule = ioLoadSymbolOfLengthFromModule;\n\tVM->isInMemory = isInMemory;\n\tVM->signed32BitIntegerFor = signed32BitIntegerFor;\n\tVM->signed32BitValueOf = signed32BitValueOf;\n\tVM->includesBehaviorThatOf = includesBehaviorThatOf;\n\tVM->classLargeNegativeInteger = classLargeNegativeInteger;\n\n#endif\n\n#if VM_PROXY_MINOR > 3\n\n\tVM->ioLoadFunctionFrom = ioLoadFunctionFrom;\n\tVM->ioMicroMSecs = ioMicroMSecs;\n\n#endif\n\n#if VM_PROXY_MINOR > 4\n\n\tVM->positive64BitIntegerFor = positive64BitIntegerFor;\n\tVM->positive64BitValueOf = positive64BitValueOf;\n\tVM->signed64BitIntegerFor = signed64BitIntegerFor;\n\tVM->signed64BitValueOf = signed64BitValueOf;\n\n#endif\n\n#if VM_PROXY_MINOR > 5\n\n\tVM->isArray = isArray;\n\tVM->forceInterruptCheck = forceInterruptCheck;\n\n#endif\n\n#if VM_PROXY_MINOR > 6\n\n\tVM->fetchLong32ofObject = fetchLong32ofObject;\n\tVM->getThisSessionID = getThisSessionID;\n\tVM->ioFilenamefromStringofLengthresolveAliases = ioFilenamefromStringofLengthresolveAliases;\n\tVM->vmEndianness = vmEndianness;\n\n#endif\n\n#if VM_PROXY_MINOR > 7\n\tVM->callbackEnter = callbackEnter;\n\tVM->callbackLeave = callbackLeave;\n\tVM->addGCRoot = addGCRoot;\n\tVM->removeGCRoot = removeGCRoot;\n#endif\n\n#if VM_PROXY_MINOR > 8\n\tVM->setInterruptCheckChain = setInterruptCheckChain;\n\tVM->classUnsafeAlien    = classUnsafeAlien;\n\tVM->sendInvokeCallbackStackRegistersJmpbuf = sendInvokeCallbackStackRegistersJmpbuf;\n\tVM->reestablishContextPriorToCallback = reestablishContextPriorToCallback;\n# if ALIEN_FFI\n\tVM->getStackPointer     = 0;\n# endif\n# if IMMUTABILITY\n\tVM->internalIsImmutable = internalIsImmutable;\n\tVM->internalIsMutable   = internalIsMutable;\n# else\n\tVM->internalIsImmutable = isIntegerObject;\n\tVM->internalIsMutable   = isNonIntegerObject;\n# endif\n#endif\n  \n#if VM_PROXY_MINOR > 8 || defined(ROAR_VM)\n \tVM->classAlien          = classAlien;\n  VM->primitiveFailFor    = primitiveFailFor;\n#endif\n\n#if VM_PROXY_MINOR > 9\n\tVM->methodArg = methodArg;\n\tVM->objectArg = objectArg;\n\tVM->integerArg = integerArg;\n\tVM->floatArg = floatArg;\n#endif\n  \n#if VM_PROXY_MINOR > 9 || defined(ROAR_VM)\n\tVM->topRemappableOop = topRemappableOop;\n\tVM->methodReturnValue = methodReturnValue;\n#endif\n\n#if VM_PROXY_MINOR > 10\n\tVM->disownVM = disownVM;\n\tVM->ownVM = ownVM;\n\tVM->addHighPriorityTickee = addHighPriorityTickee;\n\tVM->addSynchronousTickee = addSynchronousTickee;\n\tVM->utcMicroseconds = ioUTCMicroseconds;\n\tVM->isYoung = isYoung;\n\tVM->primitiveErrorTable = primitiveErrorTable;\n#endif\n\n#if VM_PROXY_MINOR > 10 || defined(ROAR_VM)\n\tVM->tenuringIncrementalGC = tenuringIncrementalGC;\n\tVM->primitiveFailureCode = primitiveFailureCode;\n\tVM->isKindOfClass = isKindOfClass;\n \tVM->instanceSizeOf = instanceSizeOf;\n#endif\n  \n#if VM_PROXY_MINOR > 11\n\tVM->sendInvokeCallbackContext = sendInvokeCallbackContext;\n\tVM->returnAsThroughCallbackContext = returnAsThroughCallbackContext;\n\tVM->signedMachineIntegerValueOf = signedMachineIntegerValueOf;\n\tVM->stackSignedMachineIntegerValue = stackSignedMachineIntegerValue;\n\tVM->positiveMachineIntegerValueOf = positiveMachineIntegerValueOf;\n\tVM->stackPositiveMachineIntegerValue = stackPositiveMachineIntegerValue;\n\tVM->getInterruptPending = getInterruptPending;\n\tVM->cStringOrNullFor = cStringOrNullFor;\n\tVM->startOfAlienData = startOfAlienData;\n\tVM->sizeOfAlienData = sizeOfAlienData;\n#endif\n\n\treturn VM;\n}\n\n/* This lives here for now but belongs somewhere else.\n * platforms/Cross/vm/sqStuff.c??\n */\n#define STDOUT_STACK_SZ 5\nstatic int stdoutStackIdx = -1;\nstatic FILE stdoutStack[STDOUT_STACK_SZ];\n\n/* N.B. As of cygwin 1.5.25 fopen(\"crash.dmp\",\"a\") DOES NOT WORK!  crash.dmp\n * contains garbled output as if the file pointer gets set to the start of the\n * file, not the end.  So we synthesize our own append mode.\n */\n#if __MINGW32__\n# include <io.h>\nstatic FILE *\nfopen_for_append(char *filename)\n{\n\tFILE *f = !access(filename, F_OK) /* access is bass ackwards */\n\t\t? fopen(filename,\"r+\")\n\t\t: fopen(filename,\"w+\");\n\tif (f)\n\t\tfseek(f,0,SEEK_END);\n\treturn f;\n}\n#elif defined(WIN32)\n# define fopen_for_append(filename) fopen(filename,\"a+t\")\n#else\n# define fopen_for_append(filename) fopen(filename,\"a+\")\n#endif\n\nvoid\npushOutputFile(char *filenameOrStdioIndex)\n{\n#ifndef STDOUT_FILENO\n# define STDOUT_FILENO 1\n# define STDERR_FILENO 2\n#endif\n\n\tFILE *output;\n\n\tif (stdoutStackIdx + 2 >= STDOUT_STACK_SZ) {\n\t\tfprintf(stderr,\"output file stack is full.\\n\");\n\t\treturn;\n\t}\n\tswitch ((unsigned)filenameOrStdioIndex) {\n\tcase STDOUT_FILENO: output = stdout; break;\n\tcase STDERR_FILENO: output = stderr; break;\n\tdefault:\n\t\tif (!(output = fopen_for_append(filenameOrStdioIndex))) {\n\t\t\tfprintf(stderr,\n\t\t\t\t\t\"could not open \\\"%s\\\" for writing.\\n\",\n\t\t\t\t\tfilenameOrStdioIndex);\n\t\t\treturn;\n\t\t}\n\t}\n\tstdoutStack[++stdoutStackIdx] = *stdout;\n\t*stdout = *output;\n}\n\nvoid\npopOutputFile()\n{\n\tif (stdoutStackIdx < 0) {\n\t\tfprintf(stderr,\"output file stack is empty.\\n\");\n\t\treturn;\n\t}\n\tfflush(stdout);\n\tif (fileno(stdout) > STDERR_FILENO) {\n\t\t/* as of Feb 2011 with fclose@@GLIBC_2.1 under e.g. CentOS 5.3, fclose\n\t\t * hangs in _IO_un_link_internal.  This hack avoids that.\n\t\t */\n#if __linux__\n\t\tclose(fileno(stdout));\n#else\n\t\tfclose(stdout);\n#endif\n\t}\n\t*stdout = stdoutStack[stdoutStackIdx--];\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Cross/vm/sqVirtualMachine.h",
    "content": "#ifndef _SqueakVM_H\n#define _SqueakVM_H\n\n# include \"squeak_adapters.h\"\n\n/* Increment the following number if you change the order of\n   functions listed or if you remove functions */\n#define VM_PROXY_MAJOR 1\n\n/* Note: You can define a different VM_PROXY_MINOR if the plugin\n   should work with older VMs. */\n#ifndef VM_PROXY_MINOR\n/* Increment the following number if you add functions at the end */\n  # error The macro VM_PROXY_MINOR was not defined, it should be 7 as far as I can tell\n/* Increment the following number if you add functions at the end */\n# define VM_PROXY_MINOR 12\n#endif\n\n#include \"sqMemoryAccess.h\"\n\n#if VM_PROXY_MINOR > 8\n# define PrimNoErr 0\n# define PrimErrGenericFailure 1\n# define PrimErrBadReceiver 2\n# define PrimErrBadArgument 3\n# define PrimErrBadIndex 4\n# define PrimErrBadNumArgs 5\n# define PrimErrInappropriate 6\n# define PrimErrUnsupported 7\n# define PrimErrNoModification 8\n# define PrimErrNoMemory 9\n# define PrimErrNoCMemory 10\n# define PrimErrNotFound 11\n# define PrimErrBadMethod 12\n# define PrimErrNamedInternal 13\n# define PrimErrObjectMayMove 14\n\n/* VMCallbackContext opaque type avoids all including setjmp.h & vmCallback.h */\ntypedef struct _VMCallbackContext *vmccp;\n#endif\n\ntypedef sqInt (*CompilerHook)();\n\nstruct VirtualMachine* sqGetInterpreterProxy(void);\n\ntypedef struct VirtualMachine {\n\tsqInt (*minorVersion)(void);\n\tsqInt (*majorVersion)(void);\n\n\t/* InterpreterProxy methodsFor: 'stack access' */\n\n\tsqInt  (*pop)(sqInt nItems);\n\tsqInt  (*popthenPush)(sqInt nItems, sqInt oop);\n\tsqInt  (*push)(sqInt object);\n\tsqInt  (*pushBool)(sqInt trueOrFalse);\n\tsqInt  (*pushFloat)(double f);\n\tsqInt  (*pushInteger)(sqInt integerValue);\n\tdouble (*stackFloatValue)(sqInt offset);\n\tsqInt  (*stackIntegerValue)(sqInt offset);\n\tsqInt  (*stackObjectValue)(sqInt offset);\n\tsqInt  (*stackValue)(sqInt offset);\n\n\t/* InterpreterProxy methodsFor: 'object access' */\n\n\tsqInt  (*argumentCountOf)(sqInt methodPointer);\n\tvoid  *(*arrayValueOf)(sqInt oop);\n\tsqInt  (*byteSizeOf)(sqInt oop);\n\tvoid  *(*fetchArrayofObject)(sqInt fieldIndex, sqInt objectPointer);\n\tsqInt  (*fetchClassOf)(sqInt oop);\n\tdouble (*fetchFloatofObject)(sqInt fieldIndex, sqInt objectPointer);\n\tsqInt  (*fetchIntegerofObject)(sqInt fieldIndex, sqInt objectPointer);\n\tsqInt  (*fetchPointerofObject)(sqInt fieldIndex, sqInt oop);\n/*  sqInt  (*fetchWordofObject)(sqInt fieldFieldIndex, sqInt oop); *\n * has been rescinded as of VMMaker 3.8 and the 64bitclean VM      *\n * work. To support old plugins we keep a valid function in        *\n * the same location in the VM struct but rename it to             *\n * something utterly horrible to scare off the natives. A new      *\n * equivalent but 64 bit valid function is added as                *\n * 'fetchLong32OfObject'                                           */\n\tsqInt  (*obsoleteDontUseThisFetchWordofObject)(sqInt fieldFieldIndex, sqInt oop);\n\tvoid  *(*firstFixedField)(sqInt oop);\n\tvoid  *(*firstIndexableField)(sqInt oop);\n\tsqInt  (*literalofMethod)(sqInt offset, sqInt methodPointer);\n\tsqInt  (*literalCountOf)(sqInt methodPointer);\n\tsqInt  (*methodArgumentCount)(void);\n\tsqInt  (*methodPrimitiveIndex)(void);\n\tsqInt  (*primitiveIndexOf)(sqInt methodPointer);\n\tsqInt  (*sizeOfSTArrayFromCPrimitive)(void *cPtr);\n\tsqInt  (*slotSizeOf)(sqInt oop);\n\tsqInt  (*stObjectat)(sqInt array, sqInt fieldIndex);\n\tsqInt  (*stObjectatput)(sqInt array, sqInt fieldIndex, sqInt value);\n\tsqInt  (*stSizeOf)(sqInt oop);\n\tsqInt  (*storeIntegerofObjectwithValue)(sqInt fieldIndex, sqInt oop, sqInt integer);\n\tsqInt  (*storePointerofObjectwithValue)(sqInt fieldIndex, sqInt oop, sqInt valuePointer);\n\n\t/* InterpreterProxy methodsFor: 'testing' */\n\n\tsqInt (*isKindOf)(sqInt oop, char *aString);\n\tsqInt (*isMemberOf)(sqInt oop, char *aString);\n\tsqInt (*isBytes)(sqInt oop);\n\tsqInt (*isFloatObject)(sqInt oop);\n\tsqInt (*isIndexable)(sqInt oop);\n\tsqInt (*isIntegerObject)(sqInt objectPointer);\n\tsqInt (*isIntegerValue)(sqInt intValue);\n\tsqInt (*isPointers)(sqInt oop);\n\tsqInt (*isWeak)(sqInt oop);\n\tsqInt (*isWords)(sqInt oop);\n\tsqInt (*isWordsOrBytes)(sqInt oop);\n\n\t/* InterpreterProxy methodsFor: 'converting' */\n\n\tsqInt  (*booleanValueOf)(sqInt obj);\n\tsqInt  (*checkedIntegerValueOf)(sqInt intOop);\n\tsqInt  (*floatObjectOf)(double aFloat);\n\tdouble (*floatValueOf)(sqInt oop);\n\tsqInt  (*integerObjectOf)(sqInt value);\n\tsqInt  (*integerValueOf)(sqInt oop);\n\tsqInt  (*positive32BitIntegerFor)(sqInt integerValue);\n\tsqInt  (*positive32BitValueOf)(sqInt oop);\n\n\t/* InterpreterProxy methodsFor: 'special objects' */\n\n\tsqInt (*characterTable)(void);\n\tsqInt (*displayObject)(void);\n\tsqInt (*falseObject)(void);\n\tsqInt (*nilObject)(void);\n\tsqInt (*trueObject)(void);\n\n\t/* InterpreterProxy methodsFor: 'special classes' */\n\n\tsqInt (*classArray)(void);\n\tsqInt (*classBitmap)(void);\n\tsqInt (*classByteArray)(void);\n\tsqInt (*classCharacter)(void);\n\tsqInt (*classFloat)(void);\n\tsqInt (*classLargePositiveInteger)(void);\n\tsqInt (*classPoint)(void);\n\tsqInt (*classSemaphore)(void);\n\tsqInt (*classSmallInteger)(void);\n\tsqInt (*classString)(void);\n\n\t/* InterpreterProxy methodsFor: 'instance creation' */\n\n\tsqInt (*clone)(sqInt oop);\n\tsqInt (*instantiateClassindexableSize)(sqInt classPointer, sqInt size);\n\tsqInt (*makePointwithxValueyValue)(sqInt xValue, sqInt yValue);\n\tsqInt (*popRemappableOop)(void);\n\tsqInt (*pushRemappableOop)(sqInt oop);\n\n\t/* InterpreterProxy methodsFor: 'other' */\n\n\tsqInt (*becomewith)(sqInt array1, sqInt array2);\n\tsqInt (*byteSwapped)(sqInt w);\n\tsqInt (*failed)(void);\n\tsqInt (*fullDisplayUpdate)(void);\n\tsqInt (*fullGC)(void);\n\tsqInt (*incrementalGC)(void);\n\tsqInt (*primitiveFail)(void);\n\tsqInt (*showDisplayBitsLeftTopRightBottom)(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b);\n\tsqInt (*signalSemaphoreWithIndex)(sqInt semaIndex);\n\tsqInt (*success)(sqInt aBoolean);\n\tsqInt (*superclassOf)(sqInt classPointer);\n\n\t/* InterpreterProxy methodsFor: 'compiler' */\n\n\tCompilerHook *(*compilerHookVector)(void);\n\tsqInt          (*setCompilerInitialized)(sqInt initFlag);\n\n#if VM_PROXY_MINOR > 1\n\n\t/* InterpreterProxy methodsFor: 'BitBlt support' */\n\n\tsqInt (*loadBitBltFrom)(sqInt bbOop);\n\tsqInt (*copyBits)(void);\n\tsqInt (*copyBitsFromtoat)(sqInt leftX, sqInt rightX, sqInt yValue);\n\n#endif\n\n#if VM_PROXY_MINOR > 2\n\n\tsqInt (*classLargeNegativeInteger)(void);\n\tsqInt (*signed32BitIntegerFor)(sqInt integerValue);\n\tsqInt (*signed32BitValueOf)(sqInt oop);\n\tsqInt (*includesBehaviorThatOf)(sqInt aClass, sqInt aSuperClass);\n\tsqInt (*primitiveMethod)(void);\n\n\t/* InterpreterProxy methodsFor: 'FFI support' */\n\n\tsqInt (*classExternalAddress)(void);\n\tsqInt (*classExternalData)(void);\n\tsqInt (*classExternalFunction)(void);\n\tsqInt (*classExternalLibrary)(void);\n\tsqInt (*classExternalStructure)(void);\n\tsqInt (*ioLoadModuleOfLength)(sqInt modIndex, sqInt modLength);\n\tsqInt (*ioLoadSymbolOfLengthFromModule)(sqInt fnIndex, sqInt fnLength, sqInt handle);\n\tsqInt (*isInMemory)(sqInt address);\n\n#endif\n\n#if VM_PROXY_MINOR > 3\n\n\tvoid *(*ioLoadFunctionFrom)(const char *fnName, const char *modName);\n\tsqInt (*ioMicroMSecs)(void);\n\n#endif\n\n#if VM_PROXY_MINOR > 4\n\n#  if !defined(sqLong)\n#   if _MSC_VER\n#     define sqLong __int64\n#     define usqLong unsigned __int64\n#   else\n#     define sqLong long long\n#     define usqLong unsigned long long\n#   endif\n#  endif\n\n\tsqInt  (*positive64BitIntegerFor)(sqLong integerValue);\n\tsqLong (*positive64BitValueOf)(sqInt oop);\n\tsqInt  (*signed64BitIntegerFor)(sqLong integerValue);\n\tsqLong (*signed64BitValueOf)(sqInt oop);\n\n#endif\n\n#if VM_PROXY_MINOR > 5\n\tsqInt (*isArray)(sqInt oop);\n\tsqInt (*forceInterruptCheck)(void);\n#endif\n\n#if VM_PROXY_MINOR > 6\n\tsqInt  (*fetchLong32ofObject)(sqInt fieldFieldIndex, sqInt oop);\n\tsqInt  (*getThisSessionID)(void);\n\tsqInt  (*ioFilenamefromStringofLengthresolveAliases)(char* aCharBuffer, char* filenameIndex, sqInt filenameLength, sqInt resolveFlag);\n\tsqInt  (*vmEndianness)(void);\t\n#endif\n\n#if VM_PROXY_MINOR > 7\n  /* New methods for proxy version 1.8 */\n\n  /* callbackEnter: Re-enter the interpreter loop for a callback.\n     Arguments:\n       callbackID: Pointer to a location receiving the callback ID\n                   used in callbackLeave\n     Returns: True if successful, false otherwise */\n  sqInt (*callbackEnter)(sqInt *callbackID);\n\n  /* callbackLeave: Leave the interpreter from a previous callback\n     Arguments:\n       callbackID: The ID of the callback received from callbackEnter()\n     Returns: True if succcessful, false otherwise. */\n  sqInt (*callbackLeave)(sqInt  callbackID);\n\n  /* addGCRoot: Add a variable location to the garbage collector.\n     The contents of the variable location will be updated accordingly.\n     Arguments:\n       varLoc: Pointer to the variable location\n     Returns: True if successful, false otherwise. */\n  sqInt (*addGCRoot)(sqInt *varLoc);\n\n  /* removeGCRoot: Remove a variable location from the garbage collector.\n     Arguments:\n       varLoc: Pointer to the variable location\n     Returns: True if successful, false otherwise.\n  */\n  sqInt (*removeGCRoot)(sqInt *varLoc);\n#endif\n\n#if VM_PROXY_MINOR > 8\n\t/* See interp.h and above for standard error codes. */\n\tvoid (*(*setInterruptCheckChain)(void (*aFunction)(void)))();\n\tsqInt  (*classUnsafeAlien)(void);\n\tsqInt  (*sendInvokeCallbackStackRegistersJmpbuf)(sqInt thunkPtrAsInt, sqInt stackPtrAsInt, sqInt regsPtrAsInt, sqInt jmpBufPtrAsInt);\n\tsqInt  (*reestablishContextPriorToCallback)(sqInt callbackContext);\n\tsqInt *(*getStackPointer)(void);\n\tsqInt  (*internalIsImmutable)(sqInt oop);\n\tsqInt  (*internalIsMutable)(sqInt oop);\n#endif\n  \n#if VM_PROXY_MINOR > 8 || defined(ROAR_VM)\n  sqInt  (*classAlien)(void);\n\tsqInt  (*primitiveFailFor)(sqInt code);\n#endif\n  \n#if VM_PROXY_MINOR > 9\n  sqInt  (*methodArg)  (sqInt index);\n  sqInt  (*objectArg)  (sqInt index);\n  sqInt  (*integerArg) (sqInt index);\n  double (*floatArg)   (sqInt index);\n#endif\n  \n#if VM_PROXY_MINOR > 9 || defined(ROAR_VM)\n  // some primitives need those\n  sqInt  (*topRemappableOop)  (void);\n  sqInt  (*methodReturnValue) (sqInt oop);\n#endif\n\n#if VM_PROXY_MINOR > 10\n# define DisownVMLockOutFullGC 1\n  sqInt\t(*disownVM)(sqInt flags);\n  sqInt\t(*ownVM)   (sqInt threadIdAndFlags);\n  void  (*addHighPriorityTickee)(void (*ticker)(void), unsigned periodms);\n  void  (*addSynchronousTickee)(void (*ticker)(void), unsigned periodms, unsigned roundms);\n  usqLong (*utcMicroseconds)(void);\n  sqInt (*isYoung) (sqInt anOop);\n  sqInt (*primitiveErrorTable)(void);\n#endif\n\n#if VM_PROXY_MINOR > 10 || defined(ROAR_VM)\n  // some primitives need those\n  sqInt (*tenuringIncrementalGC)(void);\n  sqInt (*primitiveFailureCode)(void);\n  sqInt (*isKindOfClass)(sqInt oop, sqInt aClass);\n  sqInt (*instanceSizeOf)(sqInt aClass);\n#endif\n\n#if VM_PROXY_MINOR > 11\n/* VMCallbackContext opaque type avoids all including setjmp.h & vmCallback.h */\n  sqInt (*sendInvokeCallbackContext)(vmccp);\n  sqInt (*returnAsThroughCallbackContext)(int, vmccp, sqInt);\n  long  (*signedMachineIntegerValueOf)(sqInt);\n  long  (*stackSignedMachineIntegerValue)(sqInt);\n  unsigned long  (*positiveMachineIntegerValueOf)(sqInt);\n  unsigned long  (*stackPositiveMachineIntegerValue)(sqInt);\n  sqInt\t (*getInterruptPending)(void);\n  char  *(*cStringOrNullFor)(sqInt);\n  void  *(*startOfAlienData)(sqInt);\n  usqInt (*sizeOfAlienData)(sqInt);\n#endif\n} VirtualMachine;\n\n#endif /* _SqueakVM_H */\n"
  },
  {
    "path": "vm/src/from_squeak/LICENSE",
    "content": "All contributions from Teleplace in this release are\nCopyright (c) 2010 Teleplace, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/AsynchFilePlugin/sqMacAsyncFilePrims.c",
    "content": "#include \"sq.h\"\n#include \"AsynchFilePlugin.h\"\n#include \"sqMacFileLogic.h\"\n#if TARGET_API_MAC_CARBON\n#include <Carbon/Carbon.h>\n#else\n\t#include <devices.h>\n\t#include <string.h>\n\t#include <Errors.h>\n\t#include <Files.h>\n\t#include <Strings.h>\n#endif\n\nextern struct VirtualMachine* interpreterProxy;\n#define success(bool) (interpreterProxy->success(bool))\n\n#if !TARGET_API_MAC_CARBON\n#define DisposeIOCompletionUPP(userUPP) DisposeRoutineDescriptor(userUPP)\n#else\nIOCompletionUPP NewIOCompletionUPP(IOCompletionProcPtr userRoutine);\nvoid DisposeIOCompletionUPP(IOCompletionUPP userUPP);\n#endif\n\n/* initialize/shutdown */\nint asyncFileInit() { return true; }\nint asyncFileShutdown() {return true;} \n\n/* End of adjustments for pluginized VM */\n\n/*\n  Experimental support for asynchronous file reading and writing.\n\n  When a read or write operation is initiated, control is returned to Squeak\n  immediately. A semaphore is signaled when the operation completes, at which\n  time the client can find out how many bytes were actually read or written\n  and copy the results of the read operation from the file buffer into a Squeak\n  buffer. Only one operation may be in progress on a given file at a given time,\n  but operations on different files may be done in parallel.\n\n  The semaphore is signalled once for each transfer operation that is successfully\n  started, even if that operation later fails. Write operations always write\n  their entire buffer if they succeed, but read operations may transfer less than\n  their buffer size if they are started less than a buffer's size from the end\n  of the file.\n  \n  The state of a file is kept in the following structure, which is stored directly\n  in a Squeak ByteArray object:\n\n    typedef struct {\n\t  int\t\t\t\tsessionID;\n\t  AsyncFileState\t*state;\n    } AsyncFile;\n\n  The session ID is used to detect stale files--files that were open\n  when the image was saved. The state pointer of such files is meaningless.\n  Async file handles use the same session ID as ordinary file handles.\n\n  Note: These primitives are experimental! They need not be implemented on\n  every platform, and they may be withdrawn or replaced in a future release.\n*/\n\n\n/* Async file handle (defined in header file):\n*/\n\ntypedef struct {\n\tParamBlockRec pb;  /* must be first */\n\tlong\trefNum;\n\tint\t\twritable;\n\tint\t\tsemaIndex;\n\tint\t\tstatus;\n\tint\t\tbytesTransferred;\n\tint\t\tbufferSize;\n\tchar \t*bufferPtr;\n} AsyncFileState;\n\n/*** Status Values ***/\n#define IDLE\t\t\t0\n#define LAST_OP_FAILED\t1\n#define BUSY\t\t\t2\n\n\n/*** Local Vaiables ***/\nIOCompletionUPP asyncFileCompletionProc = nil;\n\n/*** Exported Functions ***/\nint asyncFileClose(AsyncFile *f);\nint asyncFileOpen(AsyncFile *f, int fileNamePtr, int fileNameSize, int writeFlag, int semaIndex);\nint asyncFileRecordSize();\nint asyncFileReadResult(AsyncFile *f, int bufferPtr, int bufferSize);\nint asyncFileReadStart(AsyncFile *f, int fPosition, int count);\nint asyncFileWriteResult(AsyncFile *f);\nint asyncFileWriteStart(AsyncFile *f, int fPosition, int bufferPtr, int bufferSize);\n\n/*** Local Functions ***/\nvoid asyncFileAllocateBuffer(AsyncFileState *state, int byteCount);\npascal void asyncFileCompletionRoutine(AsyncFileState *state);\nvoid asyncFileInitPB(AsyncFileState *state, int fPosition);\nint asyncFileValid(AsyncFile *f);\n\nvoid asyncFileAllocateBuffer(AsyncFileState *state, int byteCount) {\n  /* Allocate a new buffer of the given size if necessary. If the current buffer\n\t is already allocated and of the desired size, do nothing. */\n\n\tif ((state->bufferPtr != nil) && (state->bufferSize == byteCount)) {\n\t\treturn;  /* buffer is already allocated and of the desired size */\n\t}\n\n\t/* free old buffer, if any */\n\tif (state->bufferPtr != nil) {\n\t\tDisposePtr(state->bufferPtr);\n\t\tstate->bufferSize = 0;\n\t\tstate->bufferPtr = nil;\n\t}\n\n\t/* allocate new buffer */\n\tstate->bufferPtr = NewPtr(byteCount);\n\tif (state->bufferPtr == nil) {\n\t\tstate->bufferSize = 0;\n\t\tsuccess(false);  /* could not allocate a buffer of size count */\n\t\treturn;\n\t}\n\tstate->bufferSize = byteCount;\n}\n\npascal void asyncFileCompletionRoutine(AsyncFileState *state) {\n  /* Called when an I/O request completes. Decides what to do based on the given state.\n\t Note that the first part of the state record is the I/O parameter block. */\n\n\tOSErr err;\n\n\terr = state->pb.ioParam.ioResult;\n\tif ((err != noErr) && (err != eofErr)) {\n\t\t/* Note: eofErr indicates that fewer than the count bytes were transfered when\n\t\t   reading because the end-of-file was encountered first; it isn't a real error. */\n\t\tstate->status = LAST_OP_FAILED;\n\t\tstate->bytesTransferred = 0;\n\t\tinterpreterProxy->signalSemaphoreWithIndex(state->semaIndex);\n\t\treturn;\n\t}\n\tstate->bytesTransferred = state->pb.ioParam.ioActCount;\n\tstate->status = IDLE;\n\tinterpreterProxy->signalSemaphoreWithIndex(state->semaIndex);\n}\n\nvoid asyncFileInitPB(AsyncFileState *state, int fPosition) {\n\tmemset(&state->pb, 0, sizeof(ParamBlockRec));\n\tstate->pb.ioParam.ioCompletion = asyncFileCompletionProc;\n\tstate->pb.ioParam.ioRefNum = state->refNum;\n\tstate->pb.ioParam.ioBuffer = state->bufferPtr;\n\tstate->pb.ioParam.ioReqCount = state->bufferSize;\n\tstate->pb.ioParam.ioPosMode = fsFromStart;\n\tstate->pb.ioParam.ioPosOffset = (fPosition < 0) ? 0 : fPosition;\n\tstate->status = BUSY;\n\tstate->bytesTransferred = 0;\n}\n\nint asyncFileValid(AsyncFile *f) {\n\tvoid* ithisSessionfn;\n\tint thisSession;\n\n\tithisSessionfn = interpreterProxy->ioLoadFunctionFrom(\"getThisSession\", \"FilePlugin\");\n\tif (ithisSessionfn != 0)\n\t\tthisSession =  ((int (*) (void)) ithisSessionfn)();\n\telse \n\t\tthisSession = 0;\n\treturn (\n\t\t(f != NULL) &&\n\t\t(f->sessionID == thisSession) &&\n\t\t(f->state != NULL) &&\n\t\t(((AsyncFileState *) f->state)->refNum != 0));\n}\n\n/*** Exported Functions ***/\n\nint asyncFileClose(AsyncFile *f) {\n  /* Close the given asynchronous file. */\n\n\tAsyncFileState *state;\n\tshort int volRefNum;\n\tOSErr err;\n\n\tif (!asyncFileValid(f)) return 0;  /* already closed */\n\tstate = f->state;\n\n\terr = GetVRefNum(state->refNum, &volRefNum);\n\tsuccess(err == noErr);\n\n\terr = FSClose(state->refNum);\n\tsuccess(err == noErr);\n\n\tif (!interpreterProxy->failed()) err = FlushVol(NULL, volRefNum);\n\tsuccess(err == noErr);\n\n    if (asyncFileCompletionProc != nil)\n        DisposeIOCompletionUPP(asyncFileCompletionProc);\n  \n\tasyncFileCompletionProc = nil;\n\tif (state->bufferPtr != nil) DisposePtr(state->bufferPtr);\n\tDisposePtr((void *) f->state);\n\tf->state = nil;\n\tf->sessionID = 0;\n\treturn 0;\n}\n\nint asyncFileOpen(AsyncFile *f, int fileNamePtr, int fileNameSize, int writeFlag, int semaIndex) {\n  /* Opens the given file using the supplied AsyncFile structure to record\n\t its state. Fails with no side effects if f is already open. Files are\n\t always opened in binary mode. */\n\n\tshort int fileRefNum;\n\tAsyncFileState *state;\n\tOSErr err;\n\tvoid * ithisSessionfn;\n\tint thisSession;\n        FSSpec\ttheSpec; \n\n\t/* don't open an already open file */\n\tif (asyncFileValid(f)) return success(false);\n\n\t/* build complete routine descriptor, if necessary */\n\tif (asyncFileCompletionProc == nil) {\n#if TARGET_API_MAC_CARBON\n\t\tasyncFileCompletionProc = NewIOCompletionUPP((pascal void (*) (union ParamBlockRec *) )asyncFileCompletionRoutine);\n#else\n\t\tasyncFileCompletionProc = NewIOCompletionProc((pascal void (*) (union ParamBlockRec *) )asyncFileCompletionRoutine);\n#endif\n\t}\n\n\t/* copy the file name into a null-terminated C string */\n\tif (fileNameSize > 1000) return success(false);\n\t\n\tmakeFSSpec((char*) fileNamePtr, fileNameSize,&theSpec);\n        \n\tf->sessionID = 0;\n\tif (writeFlag) {\n\t\t/* first try to open an existing file read/write: */\n\t\terr = FSpOpenDF(&theSpec,fsRdWrPerm, &fileRefNum); \n\t\tif (err != noErr) {\n\t\t\t/* file does not exist; must create it. */\n\t\t\terr = FSpCreate(&theSpec,'R*ch','TEXT',smSystemScript); \n\t\t\tif (err != noErr) return success(false);\n\t\t\terr = FSpOpenDF(&theSpec,fsRdWrPerm, &fileRefNum); \n\t\t\tif (err != noErr) return success(false);\n\t\t}\n\t} else {\n\t\t/* open the file read-only  */\n\t\terr = FSpOpenDF(&theSpec,fsRdPerm, &fileRefNum); \n\t\tif (err != noErr) return success(false);\n\t}\n\tf->state = (AsyncFileState *) NewPtr(sizeof(AsyncFileState));\t/* allocate state record */\n\tif (f->state == nil) {\n\t\tFSClose(fileRefNum);\n\t\treturn success(false);\n\t}\n\tithisSessionfn = interpreterProxy->ioLoadFunctionFrom(\"getThisSession\", \"FilePlugin\");\n\tif (ithisSessionfn != 0)\n\t\tthisSession =  ((int (*) (void)) ithisSessionfn)();\n\telse \n\t\tthisSession = 0;\n\tf->sessionID = thisSession;\n\tstate = (AsyncFileState *) f->state;\n\tstate->refNum = fileRefNum;\n\tstate->writable = writeFlag;\n\tstate->semaIndex = semaIndex;\n\tstate->status = IDLE;\n\tstate->bytesTransferred = 0;\n\tstate->bufferSize = 0;\n\tstate->bufferPtr = nil;\n\treturn 0;\n}\n\nint asyncFileReadResult(AsyncFile *f, int bufferPtr, int bufferSize) {\n  /* Copy up to bufferSize bytes from the buffer of the last read operation\n\t into the given Squeak buffer, and return the number of bytes copied.\n\t Negative values indicate:\n\t\t-1    -- busy; the last operation has not finished yet\n\t\t-2    -- error; the last operation failed\n\tNote that a read operation may read fewer bytes than requested if, for\n\texample, there are fewer than the requested number of bytes between the\n\tstarting file position of the read operation and the end-of-file. */\n\n\tAsyncFileState *state;\n\tint bytesRead;\n\n\tif (!asyncFileValid(f)) return success(false);\n\tstate = f->state;\n\tif (state->status == BUSY) return -1;\n\tif (state->status == LAST_OP_FAILED) return -2;\n\n\t/* copy the file buffer into the squeak buffer */\n\tbytesRead = (bufferSize < state->bytesTransferred) ? bufferSize : state->bytesTransferred;\n\tmemcpy((char *) bufferPtr, state->bufferPtr, bytesRead);\n\treturn bytesRead;\n}\n\nint asyncFileReadStart(AsyncFile *f, int fPosition, int count) {\n  /* Start an asynchronous operation to read count bytes from the given file\n\t starting at the given file position. The file's semaphore will be signalled when\n\t the operation is complete. The client may then use asyncFileReadResult() to\n\t find out if the operation succeeded and to get the data that was read. */\n\n\tAsyncFileState *state;\n\tOSErr err;\n\n\tif (!asyncFileValid(f)) return success(false);\n\tstate = f->state;\n\tif (state->status == BUSY) return success(false);  /* operation in progress */\n\n\t/* allocate a new buffer if necessary */\n\tasyncFileAllocateBuffer(state, count);\n\tif (state->bufferPtr == nil) return success(false);  /* could not allocate buffer */\n\n\tasyncFileInitPB(state, fPosition);\n\terr = PBReadAsync(&state->pb);\n\tif (err != noErr) {\n\t\tstate->status = IDLE;\n\t\tsuccess(false);\n\t\treturn 0;\n\t}\n\treturn 0;\n}\n\nint asyncFileRecordSize() {\n\treturn sizeof(AsyncFile);\n}\n\nint asyncFileWriteResult(AsyncFile *f) {\n  /* Return the number of bytes copied by the last write operation.\n\t Negative values indicate:\n\t\t-1    -- busy; the last operation has not finished yet\n\t\t-2    -- error; the last operation failed */\n\n\tAsyncFileState *state;\n\n\tif (!asyncFileValid(f)) return success(false);\n\tstate = f->state;\n\tif (state->status == BUSY) return -1;\n\tif (state->status == LAST_OP_FAILED) return -2;\n\treturn state->bytesTransferred;\n}\n\nint asyncFileWriteStart(AsyncFile *f, int fPosition, int bufferPtr, int bufferSize) {\n  /* Start an asynchronous operation to write bufferSize bytes to the given file\n\t starting at the given file position. The file's semaphore will be signalled when\n\t the operation is complete. The client may then use asyncFileWriteResult() to\n\t find out if the operation succeeded and how many bytes were actually written. */\n\n\tAsyncFileState *state;\n\tOSErr err;\n\n\tif (!asyncFileValid(f)) return success(false);\n\tstate = f->state;\n\tif (state->status == BUSY) return success(false);  /* operation in progress */\n\tif (!state->writable) return success(false);\n\n\t/* allocate a new buffer if necessary */\n\tasyncFileAllocateBuffer(state, bufferSize);\n\tif (state->bufferPtr == nil) return success(false);  /* could not allocate buffer */\n\n\t/* copy the squeak buffer into the file buffer */\n\tmemcpy(state->bufferPtr, (char *) bufferPtr, bufferSize);\n\n\tasyncFileInitPB(state, fPosition);\n\terr = PBWriteAsync(&state->pb);\n\tif (err != noErr) {\n\t\tstate->status = IDLE;\n\t\treturn success(false);\n\t}\n\treturn 0;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/B3DAcceleratorPlugin/sqMacOpenGL.c",
    "content": "/****************************************************************************\n*   PROJECT: Squeak 3D accelerator\n*   FILE:    sqMacOpenGL.c\n*   CONTENT: MacOS specific bindings for OpenGL\n*\n*   AUTHOR:  Andreas Raab (ar)\n*   ADDRESS: Walt Disney Imagineering, Glendale, CA\n*   EMAIL:   Andreas.Raab@disney.com\n*   RCSID:   $Id: sqMacOpenGL.c 1367 2006-03-21 06:49:10Z johnmci $\n* \n*   NOTES:\n*\n*\tChanges May 14th 2001 John M McIntosh Carbon support\n*   Changes Jun 2001 JMM browser internal plugin support\n* \tChanges Jan 2002 JMM carbon cleanup\n*  Feb 26th, 2002, JMM - use carbon get dominate device \n*  Apr 3rd, 2003, JMM - use BROWSERPLUGIN \n\n*\n*****************************************************************************/\n#include <stdio.h>\n#include <stdlib.h>\n\n        #include <Carbon/Carbon.h>\n\t#include <unistd.h>\n\t#include <AGL/agl.h>\n\t#include <AGL/gl.h>\n#include <OpenGL/OpenGL.h>\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n#include \"sqMacUIConstants.h\"\n#include \"B3DAcceleratorPlugin.h\"\n#include \"sqMacOpenGL.h\"\n#include \"sqOpenGLRenderer.h\"\n\n#define INTERNAL\n\n#ifdef BROWSERPLUGIN\n#include \"npapi.h\"\n#endif\nint printRendererInfo(void);\nint printFormatInfo(AGLPixelFormat info);\n\nstatic glRenderer *current = NULL;\nstatic glRenderer allRenderer[MAX_RENDERER];\ntypedef int (*eventMessageHook)(EventRecord* event);\n\n#ifdef INTERNAL\n#ifdef BROWSERPLUGIN\nint gPortX,gPortY;\nextern NP_Port *getNP_Port(void);\n#endif\nvoid StartDraw(void);\nvoid EndDraw(void);\nextern WindowPtr getSTWindow(void);\nextern int setMessageHook(eventMessageHook theHook);\nextern int setPostMessageHook(eventMessageHook theHook);\nextern GDHandle getDominateDevice(WindowPtr theWindow,Rect *windRect);\n#else\ntypedef WindowPtr (*getSTWindowFn)(void);\ngetSTWindowFn getSTWindow = 0;\neventMessageHook setMessageHook = 0;\n#endif\n\n\n/* Verbose level for debugging purposes:\n\t0 - print NO information ever\n\t1 - print critical debug errors\n\t2 - print debug warnings\n\t3 - print extra information\n\t4 - print extra warnings\n\t5 - print information about primitive execution\n\n   10 - print information about each vertex and face\n*/\nextern int verboseLevel;\n/* define forceFlush if we should fflush() before closing file */\n#define forceFlush 1\n\n#include \"sqMacFileLogic.h\"\t\n\n/* Note: Print this stuff into a file in case we lock up*/\n#undef DPRINTF3D\n# define DPRINTF3D(vLevel, args) if(vLevel <= verboseLevel) {\\\n\tchar fileName[DOCUMENT_NAME_SIZE+1]; \\\n\tsqFilenameFromStringOpen(fileName,(sqInt) &\"Squeak3D.log\", strlen(\"Squeak3D.log\")); \\\n\tFILE *fp = fopen(fileName, \"at\");\\\n\tif(fp) { fprintf args; if(forceFlush) fflush(fp); fclose(fp); }}\n        \n/* Plugin refs */\nextern struct VirtualMachine *interpreterProxy;\nstatic float blackLight[4] = { 0.0f, 0.0f, 0.0f, 0.0f };\n\n/*****************************************************************************/\n/*****************************************************************************/\n/*                      Mac event hook                                       */\n/*****************************************************************************/\n/*****************************************************************************/\n\nstatic int macEventHook(EventRecord *event) {\n\tAGLDrawable win;\n\tint result;\n\tint i,windowCode;\n\tBoolean windowHasChanged=false;\n\tWindowPtr checkMouseDown,checkMouseUp;\n\tstatic WindowPtr oldWindow = NULL;\n\n#ifdef BROWSERPLUGIN\n\tNP_Port\t*anNPPort;\n\t\n#endif\t\t\n\n\tif (oldWindow == NULL) \n\t\toldWindow = getSTWindow();\n\t\n\tresult = 0;\n\tswitch(event->what) {\n\t\tcase osEvt:\n\t\t\tif (((event->message>>24)& 0xFF) != suspendResumeMessage) return 0;\n\t\t\tDPRINTF3D(5, (fp, \"<Mac event: suspendResumeMessage>\\n\"));\n\t\t\tbreak;\n\t\tcase activateEvt:\n\t\t\tDPRINTF3D(5, (fp, \"<Mac event: activateEvt>\\n\"));\n\t\t\tbreak;\n\t\tcase updateEvt:\n\t\t\tDPRINTF3D(5, (fp, \"<Mac event: updateEvt>\\n\"));\n\t\t\tbreak;\n\t\tcase mouseDown:\n\t\t\tDPRINTF3D(5, (fp, \"<Mac event: mouseDown>\\n\"));\n\t\t\twindowCode = FindWindow(event->where, &checkMouseDown);\n\t\t\tif (windowCode == inContent)\n\t\t\t\treturn 0;\n\n\t\t\tbreak;\n\t\tcase mouseUp:\n\t\t\tDPRINTF3D(5, (fp, \"<Mac event: mouseUp>\\n\"));\n\t\t\twindowCode = FindWindow(event->where, &checkMouseUp);\n\t\t\tif (windowCode == inContent)\n\t\t\t\treturn 0;\n\n\t\t\tbreak;\n\t\tdefault: \n\t\t\t#ifdef BROWSERPLUGIN\n\t\t\tif (oldWindow != getSTWindow()) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\twindowHasChanged = true;\n\t\t\t}\n\t\t\t\n\t\t\tanNPPort = getNP_Port();\n\t\t\tif (!(anNPPort->portx == gPortX && anNPPort->porty == gPortY)) {\n\t\t\t\twindowHasChanged = true;\n\t\t\t}\n\t\t\t\n\t\t\tif (windowHasChanged) \n\t\t\t\tbreak;\n\t\t\t#endif\n\t\t\t\n\t\t\treturn 0;\n\t\t\t\n\t}\n\twin = (AGLDrawable) getSTWindow();\n\tif(!win) return 0;\n\tfor(i=0; i< MAX_RENDERER; i++) {\n\t\tglRenderer *renderer = allRenderer+i;\n\t\tif(renderer->used) {\n\t\t\tif (renderer->drawable == win || (WindowPtr) renderer->drawable == oldWindow) {\n\t\t\t\tint\t\tx,y,w,h;\n\t\t\t\tRect\tportRect;\n\t\t\t\tGLint \tbufferRect[4];\n\t\t\t\tCGrafPtr\twindowPort;\n\t\t\t\t\n\t\t\t\t#ifdef BROWSERPLUGIN\n\t\t\t\t\tStartDraw();\n\t\t\t\t\tanNPPort = getNP_Port();\n\t\t \t\t\tgPortX = anNPPort->portx;\n\t\t \t\t\tgPortY = anNPPort->porty;\n\t\t\t\t\tx = renderer->bufferRect[0] - gPortX;\n\t\t\t\t\ty = renderer->bufferRect[1] - gPortY;\n\t \t\t\t#else\n\t\t\t\t\tx = renderer->bufferRect[0];\n\t\t\t\t\ty = renderer->bufferRect[1];\n\t\t\t\t#endif \n\t\t\t\tw = renderer->bufferRect[2];\n\t\t\t\th = renderer->bufferRect[3];\n\t\t\t\t\n\t\t\t\twindowPort = GetWindowPort((WindowPtr)win);\n\t\t\t\tGetPortBounds(windowPort,&portRect);\n\t\t\t\t\n\t\t\t\tbufferRect[0] = x;\n\t\t\t\tbufferRect[1] = portRect.bottom - portRect.top - (y+h);\n\t\t\t\tbufferRect[2] = w;\n\t\t\t\tbufferRect[3] = h;\n\n\t\t\t\t// aglSetDrawable(renderer->context,nil);\n\t\t\t\trenderer->drawable = (AGLDrawable) win;\t\t\n\t\t\t\taglSetDrawable(renderer->context,windowPort);\n\t\t\t\taglSetInteger(renderer->context, AGL_BUFFER_RECT, bufferRect);\n\t\t\t\taglUpdateContext(renderer->context);\n\t\t\t\twindowHasChanged = false;\n\t\t\t\t#ifdef BROWSERPLUGIN\n\t\t\t\t\tEndDraw();\n\t\t\t\t#endif\n\t\t\t} \n\t\t}\n\t}\n\toldWindow = getSTWindow();\n\treturn result;\n}\n\n/*****************************************************************************/\n/*****************************************************************************/\n/*                      Renderer creation primitives                         */\n/*****************************************************************************/\n/*****************************************************************************/\n\nint glDestroyRenderer(int handle)\n{\n\tglRenderer *renderer = glRendererFromHandle(handle);\n\n\tif(!renderer) return 1; /* already destroyed */\n\n\t/* Now really destroy the renderer */\n\tif(renderer->drawable) {\n\t\t/* was a direct drawable */\n\t\taglSetDrawable(renderer->context, NULL);\n\t}\n\tif(renderer == current)\n\t\tglMakeCurrentRenderer(NULL);\n\taglDestroyContext(renderer->context);\n\tif(renderer->gWorld) {\n\t\tUnlockPixels(renderer->pixMap);\n\t\tDisposeGWorld(renderer->gWorld);\n\t}\n\trenderer->context = (AGLContext) NULL;\n\trenderer->drawable = (AGLDrawable) NULL;\n\trenderer->gWorld = NULL;\n\trenderer->used = 0;\n\treturn 1;\n}\n\n/*\n * Is ARB_Multisample supported?\n */\nstatic int glHasARBMultisampling () {\n\n\t/* We need an open gl connection in which to test for extensions,\n\t * so we setup a throwaway context.\n\t */\n\tGLint attrib[] = { AGL_RGBA, AGL_NONE};\n\tAGLContext ctx;\n\tAGLPixelFormat fmt = aglChoosePixelFormat(NULL, 0, attrib);\n\t\n\tif (! fmt) { return 0; }\n\tctx = aglCreateContext(fmt, NULL);\n\taglDestroyPixelFormat(fmt);\n\tif (! ctx) {\n\t\treturn 0;\n\t}\n\taglSetCurrentContext(ctx);\n\tint result = gluCheckExtension((const GLubyte*) \"GL_ARB_multisample\", glGetString(GL_EXTENSIONS));\n\taglDestroyContext(ctx);\n\t\n\treturn result;\n}\n int glCreateRendererFlags(int x, int y, int w, int h, int flags)\n{\n \tint index, i, allowSoftware, allowHardware;\n \tGLint          hwAttrib[] = { AGL_STENCIL_SIZE, 0, AGL_RGBA, AGL_DOUBLEBUFFER, AGL_ACCELERATED, AGL_DEPTH_SIZE, 16, \n\t\t\t\t      AGL_SAMPLE_BUFFERS_ARB, 1, AGL_SAMPLES_ARB, 4, AGL_MULTISAMPLE, AGL_NO_RECOVERY, AGL_NONE};\n\t\t\t\t      /* Note - we honor antialiasing requests only for hardware renderers. */\n \tGLint          swAttrib[] = { AGL_STENCIL_SIZE, 0, AGL_RGBA, AGL_PIXEL_SIZE, 0, AGL_OFFSCREEN, AGL_DEPTH_SIZE, 16, AGL_NONE };\n\tAGLPixelFormat fmt;\n\tAGLContext     ctx;\n\tGLboolean      ok;\n\tGLenum         err;\n\tAGLDrawable    win;\n\tglRenderer\t   *renderer;\n\tchar *string;\n\tGDHandle tempGDH;\n         Rect ignore;\n \tlong swapInterval = 0;\n \n #define SUPPORTED_FLAGS (B3D_HARDWARE_RENDERER | B3D_SOFTWARE_RENDERER | B3D_STENCIL_BUFFER | B3D_ANTIALIASING | B3D_STEREO | B3D_SYNCVBL)\n         if(flags & ~SUPPORTED_FLAGS) {\n             DPRINTF3D(1, (fp, \"ERROR: Unsupported renderer flags (%d)\\n\", flags));\n             return -1;\n         }\n #undef SUPPORTED_FLAGS\n \n         /* interpret renderer flags */\n         allowSoftware = (flags & B3D_SOFTWARE_RENDERER) != 0;\n         allowHardware = (flags & B3D_HARDWARE_RENDERER) != 0;\n         if(flags & B3D_STENCIL_BUFFER) {\n             hwAttrib[1] = 1;\n             swAttrib[1] = 1;\n         }\n\n\t /* enable/disable stereo requests */\n\t if(flags & B3D_STEREO) {\n\t   return -1; /* not supported for now */\n\t }\n\n\t/* Suppress the multisampling flags if antialiasing is not requested (or not supported.) */\n\tif (! ((flags & B3D_ANTIALIASING) && glHasARBMultisampling())) {\n\t\thwAttrib[7] = AGL_NONE;\n\t}\n\t\n\tfor(index=0; index < MAX_RENDERER; index++) {\n\t\tif(allRenderer[index].used == 0) break;\n\t}\n\tif(index >= MAX_RENDERER) {\n\t\tDPRINTF3D(1, (fp, \"ERROR: Maximum number of renderers (%d) exceeded\\n\", MAX_RENDERER));\n\t\treturn 0;\n\t}\n\trenderer = allRenderer+index;\n\trenderer->used = 0;\n\trenderer->finished = 0;\n\trenderer->context = NULL;\n\trenderer->drawable = NULL;\n\trenderer->gWorld = NULL;\n\n#ifdef INTERNAL\n\tif (! getSTWindow()) {\n\t\t\treturn 0;\n\t}\n        GetWindowGreatestAreaDevice(getSTWindow(),kWindowContentRgn,&tempGDH,&ignore); \n        if (tempGDH == nil) \n            return -1;\n\tswAttrib[2] = (*(*tempGDH)->gdPMap)->pixelSize;\n#else\n\tswAttrib[2] = (*(*GetMainDevice())->gdPMap)->pixelSize;\n#endif\n\tif(swAttrib[2] < 16) swAttrib[2] = 16;\n\n\t/* Choose an rgb pixel format */\n\tfor(i = 0; i<2; i++) {\n\t\tif( (i == 0) && !allowHardware) continue;\n\t\tif( (i == 1) && !allowSoftware) continue;\n\t\tctx = 0;\n\t\tif(i == 0) {\n\t\t\tDPRINTF3D(3, (fp, \"### Attempting to find hardware renderer\\n\"));\n\t\t\twin = (AGLDrawable) getSTWindow();\n\t\t\tif(!win) {\n\t\t\t\tDPRINTF3D(1, (fp, \"ERROR: stWindow is invalid (NULL)\\n\"));\n\t\t\t\tgoto FAILED;\n\t\t\t}\n\t\t\tfmt = aglChoosePixelFormat(NULL, 0, hwAttrib);\n\t\t} else {\n\t\t\tDPRINTF3D(3, (fp, \"### Attempting to find software renderer\\n\"));\n\t\t\twin = NULL;\n\t\t\tfmt = aglChoosePixelFormat(NULL, 0, swAttrib);\n\t\t}\n\t\tDPRINTF3D(3, (fp,\"\\tx: %d\\n\\ty: %d\\n\\tw: %d\\n\\th: %d\\n\", x, y, w, h));\n\n\t\tif((err = aglGetError()) != AGL_NO_ERROR) DPRINTF3D(3,(fp,\"aglGetError - %s\\n\", aglErrorString(err)));\n\t\tif(fmt == NULL) {\n\t\t\tDPRINTF3D(1, (fp, \"ERROR: aglChoosePixelFormat failed\\n\"));\n\t\t\tgoto FAILED;\n\t\t}\n\n\t\tprintFormatInfo(fmt);\n\n\t\t/* Create an AGL context */\n\t\tctx = aglCreateContext(fmt, NULL);\n\t\tif((err = aglGetError()) != AGL_NO_ERROR) DPRINTF3D(3,(fp,\"aglGetError - %s\\n\", aglErrorString(err)));\n\t\t/* The pixel format is no longer needed */\n\t\taglDestroyPixelFormat(fmt);\n\t\tif(ctx == NULL) {\n\t\t\tDPRINTF3D(1, (fp, \"ERROR: aglCreateContext failed\\n\"));\n\t\t\tgoto FAILED;\n\t\t}\n\n\t\tif(i == 0) {\n\t\t\tGLint bufferRect[4];\n\t\t\tRect\tportRect; \n\t\n#ifdef BROWSERPLUGIN\n\n\t\t\tNP_Port\t*anNPPort;\n\t\t\t\n\t\t\tStartDraw();\n \t\t\twin = (AGLDrawable) getSTWindow();\n \t\t\tanNPPort = getNP_Port();\n \t\t\t\n\t\t\tGetPortBounds(GetWindowPort((WindowPtr)win),&portRect);\n\t\t\tbufferRect[0] = x - anNPPort->portx;\n\t\t\tbufferRect[1] = portRect.bottom - portRect.top - (y+h)  + anNPPort->porty;\n\t\t\tbufferRect[2] = w;\n\t\t\tbufferRect[3] = h;\n\t\t\tEndDraw();\n#else\n\t\t\tGetPortBounds(GetWindowPort((WindowPtr)win),&portRect);\n\t\t\tbufferRect[0] = x;\n\t\t\tbufferRect[1] = portRect.bottom - portRect.top - (y+h);\n\t\t\tbufferRect[2] = w;\n\t\t\tbufferRect[3] = h;\n#endif\t\t\n\n\t\t\t/* hardware renderer; attach buffer rect and window */\n\t\t\tok = aglEnable(ctx, AGL_BUFFER_RECT);\n\t\t\tif((err = aglGetError()) != AGL_NO_ERROR) \n\t\t\t\tDPRINTF3D(3,(fp,\"aglEnable(AGL_BUFFER_RECT) failed: aglGetError - %s\\n\", aglErrorString(err)));\n\t\t\tif(!ok) goto FAILED;\n\t\t\tok = aglSetInteger(ctx, AGL_BUFFER_RECT, bufferRect);\n\t\t\tif((err = aglGetError()) != AGL_NO_ERROR) \n\t\t\t\tDPRINTF3D(3,(fp,\"aglSetInteger(AGL_BUFFER_RECT) failed: aglGetError - %s\\n\", aglErrorString(err)));\n\t\t\tif(!ok) goto FAILED;\n\t\t\t/* Attach the context to the target */\n\t\t\tok = aglSetDrawable(ctx,GetWindowPort( (WindowPtr)win));\n\t\t\tif((err = aglGetError()) != AGL_NO_ERROR) \n\t\t\t\tDPRINTF3D(3,(fp,\"aglSetDrawable() failed: aglGetError - %s\\n\", aglErrorString(err)));\n\t\t\tif(!ok) goto FAILED;\n\t\t\trenderer->drawable = (AGLDrawable) win;\n\t\t\t/* Set VBL SYNC if requested */\n\t\t\tif(flags & B3D_SYNCVBL) swapInterval = 1;\n\t\t\taglSetInteger(ctx, AGL_SWAP_INTERVAL, &swapInterval);\n\t\t\n\t\t} else {\n\t\t\t/* software renderer; attach offscreen buffer to context */\n\t\t\tRect rect;\n\t\t\tQDErr qdErr;\n\n\t\t\trenderer->depth = swAttrib[2];\n\t\t\t/* Create the offscreen gworld */\n\t\t\tSetRect(&rect, 0, 0, w, h);\n\t\t\tqdErr = NewGWorld(&renderer->gWorld, (short) renderer->depth, &rect, NULL, NULL, useTempMem);\n\t\t\tif(qdErr || !renderer->gWorld) {\n\t\t\t\tDPRINTF3D(1,(fp,\"ERROR: Failed to create new GWorld\\n\"));\n\t\t\t\trenderer->gWorld = NULL;\n\t\t\t\tgoto FAILED;\n\t\t\t}\n\t\t\trenderer->pixMap = GetGWorldPixMap(renderer->gWorld);\n\t\t\tLockPixels(renderer->pixMap);\n\t\t\trenderer->pitch = (**(renderer->pixMap)).rowBytes & 0x7FFF;\n\t\t\trenderer->bits = (unsigned char*) GetPixBaseAddr(renderer->pixMap);\n\t\t\tok = aglSetOffScreen(ctx, w, h, renderer->pitch, renderer->bits);\n\t\t\tif((err = aglGetError()) != AGL_NO_ERROR) DPRINTF3D(3,(fp,\"aglGetError - %s\\n\", aglErrorString(err)));\n\t\t\tif(!ok) {\n\t\t\t\tDPRINTF3D(1, (fp, \"ERROR: aglSetOffScreen failed\\n\"));\n\t\t\t\tgoto FAILED;\n\t\t\t}\n\t\t}\n\t\trenderer->context = ctx;\n\t\trenderer->used = 1;\n\t\trenderer->finished = 0;\n\t\trenderer->bufferRect[0] = x;\n\t\trenderer->bufferRect[1] = y;\n\t\trenderer->bufferRect[2] = w;\n\t\trenderer->bufferRect[3] = h;\n\n\t\t/* Make the context the current context */\n\t\tglMakeCurrentRenderer(renderer);\n\n\t\t/* finally, try to enable multithreaded OpenGL */\n\t\tif (0) /* disable it, because it's broken */\n\t\t{\n\t\t\tCGLContextObj cglContext = CGLGetCurrentContext();\n\t\t\tCGLError cglErr =  CGLEnable( cglContext, kCGLCEMPEngine);\n\t\t\tif (cglErr != kCGLNoError ) {\n\t\t\t\tDPRINTF3D(3,(fp,\"CGLEnable(kCGLCEMPEngine) failed: cannot set multithreaded OpenGL\\n\"));\n\t\t\t\texit(0);\n\t\t\t}\n\t\t}\n\t\t/* print some information about the context */\n\t\tstring = (char*) glGetString(GL_VENDOR);\n\t\tDPRINTF3D(3,(fp, \"\\nOpenGL vendor: %s\\n\", string));\n\t\tstring = (char*) glGetString(GL_RENDERER);\n\t\tDPRINTF3D(3,(fp, \"OpenGL renderer: %s\\n\", string));\n\t\tstring = (char*) glGetString(GL_VERSION);\n\t\tDPRINTF3D(3,(fp, \"OpenGL version: %s\\n\", string));\n\t\tstring = (char*) glGetString(GL_EXTENSIONS);\n\t\tDPRINTF3D(3,(fp, \"OpenGL extensions: %s\\n\", string));\n\t\tERROR_CHECK;\n\n\t\tDPRINTF3D(3, (fp,\"### Renderer created! (id = %d)\\n\", index));\n\t\t/* setup user context */\n\t\tglDisable(GL_LIGHTING);\n\t\tglDisable(GL_COLOR_MATERIAL);\n\t\tglDisable(GL_BLEND);\n\t\tglDisable(GL_ALPHA_TEST);\n\t\tglEnable(GL_DITHER);\n\t\tglEnable(GL_DEPTH_TEST);\n\t\tglEnable(GL_NORMALIZE);\n\t\tglDepthFunc(GL_LEQUAL);\n\t\tglClearDepth(1.0);\n\t\tglHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);\n\t\tglShadeModel(GL_SMOOTH);\n\t\tglLightModelfv(GL_LIGHT_MODEL_AMBIENT, blackLight);\n\t\tERROR_CHECK;\n\n\t\treturn index;\nFAILED:\n\t\tif(ctx) aglDestroyContext(ctx);\n\t\tif(renderer->gWorld) DisposeGWorld(renderer->gWorld);\n\t}\n\treturn -1;\n}\n\n/*****************************************************************************/\n/*****************************************************************************/\n\nint glGetIntPropertyOS(int handle, int prop)\n{\n\tGLint v;\n\tglRenderer *renderer = glRendererFromHandle(handle);\n\tif(!renderer || !glMakeCurrentRenderer(renderer)) return 0;\n\n\tswitch(prop) {\n\t\tcase -1: /* vertical blank synchronization */\n\t\t\taglGetInteger(renderer->context, AGL_SWAP_INTERVAL, &v);\n\t\t\treturn v;\n\t}\n\treturn 0;\n}\n\nint glSetIntPropertyOS(int handle, int prop, int value)\n{\n\tglRenderer *renderer = glRendererFromHandle(handle);\n\tif(!renderer || !glMakeCurrentRenderer(renderer)) return 0;\n\n\tswitch(prop) {\n\t\tcase -1: /* vertical blank synchronization */\n\t\t\taglSetInteger(renderer->context, AGL_SWAP_INTERVAL, (GLint*) &value);\n\t\t\treturn 1;\n\t}\n\treturn 0;\n}\n\n\nglRenderer *glRendererFromHandle(int handle) {\n\tDPRINTF3D(7, (fp, \"Looking for renderer id: %d\\n\", handle));\n\tif(handle < 0 || handle >= MAX_RENDERER) return NULL;\n\tif(allRenderer[handle].used) return allRenderer+handle;\n\treturn NULL;\n}\n\nint glSwapBuffers(glRenderer *renderer) {\n\tGLint err;\n\n\tif(!renderer) return 0;\n\tif(!renderer->used || !renderer->context) return 0;\n\tif(renderer->drawable) {\n#ifdef BROWSERPLUGIN\n\t\tNP_Port\t*anNPPort;\n\t\t\n\t\tanNPPort = getNP_Port();\n\t\tif (!(anNPPort->portx == gPortX && anNPPort->porty == gPortY)) {\n\t\t\treturn 0;\n\t\t}\n#endif\n\t\taglSwapBuffers(renderer->context);\n\t\tif((err = aglGetError()) != AGL_NO_ERROR) DPRINTF3D(3,(fp,\"ERROR (glSwapBuffers): aglGetError - %s\\n\", aglErrorString(err)));\n\t\tERROR_CHECK;\n\t} else {\n\t\tWindowPtr win;\n\t\tRect src, dst, portBounds;\n\t\tGrafPtr oldPort,winPort;\n\t\tBoolean portChanged;\n\t\t\n\t\t/* ensure execution for offscreen contexts */\n\t\tglFinish();\n\t\tERROR_CHECK;\n\t\t/* Copy the image to the window */\n\t\t\n\t\twin =  getSTWindow();\n\t\tif(!win) return 0;\n\t\t\n\t\twinPort = (GrafPtr) GetWindowPort((WindowRef) win);\n#ifdef BROWSERPLUGIN\n\t\tStartDraw();\n#else\n\t\tportChanged = QDSwapPort(winPort, &oldPort);\n\t\tGetPortBounds((CGrafPtr) winPort,&portBounds);\n\n//  Draw into the new port here\n\n#endif\t\t\n\t\tSetRect(&src, 0, 0, renderer->bufferRect[2], renderer->bufferRect[3]);\n\t\tSetRect(&dst, renderer->bufferRect[0], renderer->bufferRect[1], \n\t\t\t\trenderer->bufferRect[0] + renderer->bufferRect[2],\n\t\t\t\trenderer->bufferRect[1] + renderer->bufferRect[3]);\n\t\tCopyBits(GetPortBitMapForCopyBits(renderer->gWorld), GetPortBitMapForCopyBits((CGrafPtr) winPort), &src, &dst, srcCopy, NULL);\n#ifdef BROWSERPLUGIN\n\t\tEndDraw();\n#else\n\t\tif (portChanged)\n\t\t\tQDSwapPort(oldPort, NULL);\n#endif\t\t\n\t}\n\treturn 1;\n}\n\nint glMakeCurrentRenderer(glRenderer *renderer) {\n\tGLboolean ok;\n\tGLint err;\n\n\tif(current == renderer) return 1;\n\tif(renderer)\n\t\tif(!renderer->used || !renderer->context) return 0;\n\t// ERROR_CHECK;\n\tok = aglSetCurrentContext(renderer ? renderer->context : NULL);\n\tif((err = aglGetError()) != AGL_NO_ERROR) DPRINTF3D(3,(fp,\"ERROR (glMakeCurrentRenderer): aglGetError - %s\\n\", aglErrorString(err)));\n\tif(!ok) {\n\t\tDPRINTF3D(1, (fp, \"ERROR (glMakeCurrentRenderer): aglSetCurrentContext failed\\n\"));\n\t\treturn 0;\n\t}\n\t// ERROR_CHECK;\n\tcurrent = renderer;\n\treturn 1;\n}\n\nint glSetBufferRect(int handle, int x, int y, int w, int h) {\n\tglRenderer *renderer = glRendererFromHandle(handle);\n\tif(!renderer || !glMakeCurrentRenderer(renderer)) return 0;\n\tif(renderer->drawable) {\n\t\t/* hardware renderer */\n\t\tGLboolean ok;\n\t\tGLenum err;\n\t\tGLint bufferRect[4];\n\t\tRect\tportRect; \n\t\t\n#ifdef BROWSERPLUGIN\n\t\tAGLDrawable\twin;\n\t\tNP_Port\t*anNPPort;\n\n\t\tStartDraw();\n\t\twin = (AGLDrawable) getSTWindow();\n\t\tanNPPort = getNP_Port();\n\n\t\tGetPortBounds(GetWindowPort((WindowPtr)win),&portRect);\n\t\tbufferRect[0] = x - anNPPort->portx;\n\t\tbufferRect[1] = portRect.bottom - portRect.top - (y+h)  + anNPPort->porty;\n\t\tbufferRect[2] = w;\n\t\tbufferRect[3] = h;\n\n\t\tEndDraw();\n#else\n\t\tGetPortBounds(GetWindowPort((WindowPtr) renderer->drawable),&portRect);\n\t\tbufferRect[0] = x;\n\t\tbufferRect[1] = portRect.bottom - portRect.top - (y+h);\n\t\tbufferRect[2] = w;\n\t\tbufferRect[3] = h;\n#endif\n\t\tok = aglSetInteger(renderer->context, AGL_BUFFER_RECT, bufferRect);\n\t\tif((err = aglGetError()) != AGL_NO_ERROR) \n\t\t\tDPRINTF3D(3,(fp,\"aglSetInteger(AGL_BUFFER_RECT) failed: aglGetError - %s\\n\", aglErrorString(err)));\n\t\tif(!ok) return 0;\n\t} else {\n\t\t/* software renderer */\n\t\tif(renderer->bufferRect[2] != w && renderer->bufferRect[3] != h) {\n\t\t\t/* do not allow resizing the software renderer */\n\t\t\treturn 0;\n\t\t}\n\t}\n\trenderer->bufferRect[0] = x;\n\trenderer->bufferRect[1] = y;\n\trenderer->bufferRect[2] = w;\n\trenderer->bufferRect[3] = h;\n\treturn 1;\n}\n\nint glSetVerboseLevel(int level) {\n\tverboseLevel = level;\n\treturn 1;\n}\n\nint glIsOverlayRenderer(int handle) {\n#pragma unused(handle)\n  /* we never use overlay renderers */\n  return 0;\n}\n\n/***************************************************************************\n ***************************************************************************\n\t\t\t\t\tModule initializers\n ***************************************************************************\n ***************************************************************************/\n\nint glInitialize(void)\n{\n\tint i;\n\tfor(i = 0; i < MAX_RENDERER; i++) {\n\t\tallRenderer[i].used = 0;\n\t}\n#ifdef INTERNAL\n\tsetPostMessageHook(macEventHook);\n#else\n\tgetSTWindow = (getSTWindowFn) interpreterProxy->ioLoadFunctionFrom(\"getSTWindow\", \"\");\n\tif(!getSTWindow) {\n\t\tDPRINTF3D(1,(fp,\"ERROR: Failed to look up getSTWindow()\\n\"));\n\t\treturn 0;\n\t}\n\tsetMessageHook = (eventMessageHook) interpreterProxy->ioLoadFunctionFrom(\"setPostMessageHook\", \"\");\n\tif(!setMessageHook) {\n\t\tDPRINTF3D(1, (fp, \"ERROR: Failed to look up setMessageHook()\\n\"));\n\t\treturn 0;\n\t}\n\t((void (*)(void*))setMessageHook)(macEventHook);\n#endif\n\treturn 1;\n}\n\nint glShutdown(void)\n{\n\tint i;\n\tfor(i=0; i< MAX_RENDERER; i++) {\n\t\tif(allRenderer[i].used)\n\t\t\tglDestroyRenderer(i);\n\t}\n\treturn 1;\n}\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/B3DAcceleratorPlugin/sqMacOpenGL.h",
    "content": "#ifndef SQ_MAC_OPENGL_H\n#define SQ_MAC_OPENGL_H\n\n#define MAX_RENDERER 16\n\t\n#if defined(__MWERKS__) \n#include <agl.h>\n#include <gl.h>\n#else\n#include <AGL/agl.h>\n#include <AGL/gl.h>\n\n#endif\ntypedef struct glRenderer {\n\tGLint bufferRect[4];\n\tGLint viewport[4];\n\n\tint used;\n\tint finished;\n\tAGLContext context;\n\n\t/* hardware attributes */\n\tAGLDrawable drawable;\n\n\t/* software attributes */\n\tGWorldPtr gWorld;\n\tPixMapHandle pixMap;\n\tint depth;\n\tint pitch;\n\tunsigned char *bits;\n} glRenderer;\n\n#define GL_RENDERER_DEFINED 1\n\n#endif /* SQ_MAC_OPENGL_H */\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/B3DAcceleratorPlugin/sqMacOpenGLInfo.c",
    "content": "/****************************************************************************\n*   PROJECT: Squeak 3D accelerator\n*   FILE:    sqMacOpenGLInfo.c\n*   CONTENT: MacOS specific bindings for OpenGL\n*\n*   AUTHOR:  Andreas Raab (ar)\n*   ADDRESS: Walt Disney Imagineering, Glendale, CA\n*   EMAIL:   Andreas.Raab@disney.com\n*   RCSID:   $Id: sqMacOpenGLInfo.c 1708 2007-06-10 00:40:04Z johnmci $\n*\n*   NOTES:\n*\n*****************************************************************************/\n#include <stdio.h>\n#include <stdlib.h>\n\t#include <Carbon/Carbon.h>\n\t#include <AGL/gl.h>\n\t#include <AGL/agl.h>\n\n#include \"sq.h\"\n#include \"sqVirtualMachine.h\"\n#include \"sqMacUIConstants.h\"\nint printRendererInfo(void);\nint printFormatInfo(AGLPixelFormat info);\n\n/* Verbose level for debugging purposes:\n\t0 - print NO information ever\n\t1 - print critical debug errors\n\t2 - print debug warnings\n\t3 - print extra information\n\t4 - print extra warnings\n\t5 - print information about primitive execution\n\n   10 - print information about each vertex and face\n*/\nint verboseLevel = 3;\n/* define forceFlush if we should fflush() before closing file */\n#define forceFlush 1\n\n#include \"sqMacFileLogic.h\"\t\n\n/* Note: Print this stuff into a file in case we lock up*/\n/* Note: Print this stuff into a file in case we lock up*/\n#undef DPRINTF3D\n# define DPRINTF3D(vLevel, args) if(vLevel <= verboseLevel) {\\\n\tchar fileName[DOCUMENT_NAME_SIZE+1]; \\\n\tsqFilenameFromStringOpen(fileName,(sqInt) &\"Squeak3D.log\", strlen(\"Squeak3D.log\")); \\\n\tFILE *fp = fopen(fileName, \"at\");\\\n\tif(fp) { fprintf args; if(forceFlush) fflush(fp); fclose(fp); }}\n\n/*****************************************************************************/\n/*****************************************************************************/\n/*****************************************************************************/\n/*****************************************************************************/\n\nstatic void PrintBufferModes(GLint v)\n{\n\tif(v & AGL_MONOSCOPIC_BIT)   DPRINTF3D(3,(fp,\"            AGL_MONOSCOPIC_BIT\\n\"));\n\tif(v & AGL_STEREOSCOPIC_BIT) DPRINTF3D(3,(fp,\"            AGL_STEREOSCOPIC_BIT\\n\"));\n\tif(v & AGL_SINGLEBUFFER_BIT) DPRINTF3D(3,(fp,\"            AGL_SINGLEBUFFER_BIT\\n\"));\n\tif(v & AGL_DOUBLEBUFFER_BIT) DPRINTF3D(3,(fp,\"            AGL_DOUBLEBUFFER_BIT\\n\"));\n}\n\nstatic void PrintColorModes(GLint v)\n{\n\tif(v & AGL_RGB8_BIT)         DPRINTF3D(3,(fp,\"            AGL_RGB8_BIT\\n\"));\n\tif(v & AGL_RGB8_A8_BIT)      DPRINTF3D(3,(fp,\"            AGL_RGB8_A8_BIT\\n\"));\n\tif(v & AGL_BGR233_BIT)       DPRINTF3D(3,(fp,\"            AGL_BGR233_BIT\\n\"));\n\tif(v & AGL_BGR233_A8_BIT)    DPRINTF3D(3,(fp,\"            AGL_BGR233_A8_BIT\\n\"));\n\tif(v & AGL_RGB332_BIT)       DPRINTF3D(3,(fp,\"            AGL_RGB332_BIT\\n\"));\n\tif(v & AGL_RGB332_A8_BIT)    DPRINTF3D(3,(fp,\"            AGL_RGB332_A8_BIT\\n\"));\n\tif(v & AGL_RGB444_BIT)       DPRINTF3D(3,(fp,\"            AGL_RGB444_BIT\\n\"));\n\tif(v & AGL_ARGB4444_BIT)     DPRINTF3D(3,(fp,\"            AGL_ARGB4444_BIT\\n\"));\n\tif(v & AGL_RGB444_A8_BIT)    DPRINTF3D(3,(fp,\"            AGL_RGB444_A8_BIT\\n\"));\n\tif(v & AGL_RGB555_BIT)       DPRINTF3D(3,(fp,\"            AGL_RGB555_BIT\\n\"));\n\tif(v & AGL_ARGB1555_BIT)     DPRINTF3D(3,(fp,\"            AGL_ARGB1555_BIT\\n\"));\n\tif(v & AGL_RGB555_A8_BIT)    DPRINTF3D(3,(fp,\"            AGL_RGB555_A8_BIT\\n\"));\n\tif(v & AGL_RGB565_BIT)       DPRINTF3D(3,(fp,\"            AGL_RGB565_BIT\\n\"));\n\tif(v & AGL_RGB565_A8_BIT)    DPRINTF3D(3,(fp,\"            AGL_RGB565_A8_BIT\\n\"));\n\tif(v & AGL_RGB888_BIT)       DPRINTF3D(3,(fp,\"            AGL_RGB888_BIT\\n\"));\n\tif(v & AGL_ARGB8888_BIT)     DPRINTF3D(3,(fp,\"            AGL_ARGB8888_BIT\\n\"));\n\tif(v & AGL_RGB888_A8_BIT)    DPRINTF3D(3,(fp,\"            AGL_RGB888_A8_BIT\\n\"));\n\tif(v & AGL_RGB101010_BIT)    DPRINTF3D(3,(fp,\"            AGL_RGB101010_BIT\\n\"));\n\tif(v & AGL_ARGB2101010_BIT)  DPRINTF3D(3,(fp,\"            AGL_ARGB2101010_BIT\\n\"));\n\tif(v & AGL_RGB101010_A8_BIT) DPRINTF3D(3,(fp,\"            AGL_RGB101010_A8_BIT\\n\"));\n\tif(v & AGL_RGB121212_BIT)    DPRINTF3D(3,(fp,\"            AGL_RGB121212_BIT\\n\"));\n\tif(v & AGL_ARGB12121212_BIT) DPRINTF3D(3,(fp,\"            AGL_ARGB12121212_BIT\\n\"));\n\tif(v & AGL_RGB161616_BIT)    DPRINTF3D(3,(fp,\"            AGL_RGB161616_BIT\\n\"));\n\tif(v & AGL_ARGB16161616_BIT) DPRINTF3D(3,(fp,\"            AGL_ARGB16161616_BIT\\n\"));\n\tif(v & AGL_INDEX8_BIT)       DPRINTF3D(3,(fp,\"            AGL_INDEX8_BIT\\n\"));\n\tif(v & AGL_INDEX16_BIT)      DPRINTF3D(3,(fp,\"            AGL_INDEX16_BIT\\n\"));\n}\n\nstatic void PrintBitModes(GLint v)\n{\n\tif(v & AGL_0_BIT)            DPRINTF3D(3,(fp,\"            AGL_0_BIT\\n\"));\n\tif(v & AGL_1_BIT)            DPRINTF3D(3,(fp,\"            AGL_1_BIT\\n\"));\n\tif(v & AGL_2_BIT)            DPRINTF3D(3,(fp,\"            AGL_2_BIT\\n\"));\n\tif(v & AGL_3_BIT)            DPRINTF3D(3,(fp,\"            AGL_3_BIT\\n\"));\n\tif(v & AGL_4_BIT)            DPRINTF3D(3,(fp,\"            AGL_4_BIT\\n\"));\n\tif(v & AGL_5_BIT)            DPRINTF3D(3,(fp,\"            AGL_5_BIT\\n\"));\n\tif(v & AGL_6_BIT)            DPRINTF3D(3,(fp,\"            AGL_6_BIT\\n\"));\n\tif(v & AGL_8_BIT)            DPRINTF3D(3,(fp,\"            AGL_8_BIT\\n\"));\n\tif(v & AGL_10_BIT)           DPRINTF3D(3,(fp,\"            AGL_10_BIT\\n\"));\n\tif(v & AGL_12_BIT)           DPRINTF3D(3,(fp,\"            AGL_12_BIT\\n\"));\n\tif(v & AGL_16_BIT)           DPRINTF3D(3,(fp,\"            AGL_16_BIT\\n\"));\n\tif(v & AGL_24_BIT)           DPRINTF3D(3,(fp,\"            AGL_24_BIT\\n\"));\n\tif(v & AGL_32_BIT)           DPRINTF3D(3,(fp,\"            AGL_32_BIT\\n\"));\n\tif(v & AGL_48_BIT)           DPRINTF3D(3,(fp,\"            AGL_48_BIT\\n\"));\n\tif(v & AGL_64_BIT)           DPRINTF3D(3,(fp,\"            AGL_64_BIT\\n\"));\n\tif(v & AGL_96_BIT)           DPRINTF3D(3,(fp,\"            AGL_96_BIT\\n\"));\n\tif(v & AGL_128_BIT)          DPRINTF3D(3,(fp,\"            AGL_128_BIT\\n\"));\n}\n\nstatic void PrintInfoStats(AGLRendererInfo info)\n{\n\tGLint rv;\n\t\n\taglDescribeRenderer(info, AGL_RENDERER_ID, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_RENDERER_ID     : 0x%X\\n\", rv));\n\t\n\taglDescribeRenderer(info, AGL_OFFSCREEN, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_OFFSCREEN       : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribeRenderer(info, AGL_FULLSCREEN, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_FULLSCREEN      : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribeRenderer(info, AGL_WINDOW, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_WINDOW          : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribeRenderer(info, AGL_ACCELERATED, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_ACCELERATED     : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribeRenderer(info, AGL_ROBUST, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_ROBUST          : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribeRenderer(info, AGL_BACKING_STORE, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_BACKING_STORE   : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribeRenderer(info, AGL_MP_SAFE, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_MP_SAFE         : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribeRenderer(info, AGL_COMPLIANT, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_COMPLIANT       : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribeRenderer(info, AGL_MULTISCREEN, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_MULTISCREEN     : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribeRenderer(info, AGL_BUFFER_MODES, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_BUFFER_MODES    : 0x%X\\n\", rv));\n\tPrintBufferModes(rv);\n\t\n\taglDescribeRenderer(info, AGL_MIN_LEVEL, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_MIN_LEVEL       : %d\\n\", rv));\n\t\n\taglDescribeRenderer(info, AGL_MAX_LEVEL, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_MAX_LEVEL       : %d\\n\", rv));\n\t\n\taglDescribeRenderer(info, AGL_COLOR_MODES, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_COLOR_MODES     : 0x%X\\n\", rv));\n\tPrintColorModes(rv);\n\t\n\taglDescribeRenderer(info, AGL_ACCUM_MODES, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_ACCUM_MODES     : 0x%X\\n\", rv));\n\tPrintColorModes(rv);\n\t\n\taglDescribeRenderer(info, AGL_DEPTH_MODES, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_DEPTH_MODES     : 0x%X\\n\", rv));\n\tPrintBitModes(rv);\n\t\n\taglDescribeRenderer(info, AGL_STENCIL_MODES, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_STENCIL_MODES   : 0x%X\\n\", rv));\n\tPrintBitModes(rv);\n\t\n\taglDescribeRenderer(info, AGL_MAX_AUX_BUFFERS, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_MAX_AUX_BUFFERS : %d\\n\", rv));\n\t\n\taglDescribeRenderer(info, AGL_VIDEO_MEMORY, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_VIDEO_MEMORY    : %d\\n\", rv));\n\t\n\taglDescribeRenderer(info, AGL_TEXTURE_MEMORY, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_TEXTURE_MEMORY  : %d\\n\", rv));\n}\n\nstatic void CheckGetRendererInfo(GDHandle device)\n{\n\tAGLRendererInfo info, head_info;\n\tGLint inum;\n\n\thead_info =  aglQueryRendererInfo(&device, 1);\n\tif(!head_info)\n\t{\n\t\tDPRINTF3D(3,(fp,\"aglQueryRendererInfo : Info Error\\n\"));\n\t\treturn;\n\t}\n\t\n\tinfo = head_info;\n\tinum = 0;\n\twhile(info)\n\t{\n\t\tDPRINTF3D(3,(fp,\"\\n    Renderer : %d\\n\", inum));\n\t\tPrintInfoStats(info);\n\t\tinfo = aglNextRendererInfo(info);\n\t\tinum++;\n\t}\n\t\n\taglDestroyRendererInfo(head_info);\n}\n\nint printRendererInfo(void)\n{\n\tGLenum   err;\n\tGDHandle device;\n\tGLuint   dnum = 0;\n\t\n\tdevice = GetDeviceList();\n\twhile(device)\n\t{\n\t\tDPRINTF3D(3,(fp,\"\\nDevice : %d\\n\", dnum));\n\t\tCheckGetRendererInfo(device);\n\t\tdevice = GetNextDevice(device);\n\t\tdnum++;\n\t}\n\t\t\n\terr = aglGetError();\n\tif(err != AGL_NO_ERROR) DPRINTF3D(3,(fp,\"aglGetError - %s\\n\", aglErrorString(err)));\n\n   return 1;\n}\n\nint printFormatInfo(AGLPixelFormat info)\n{\n\tGLint rv;\n\n\tDPRINTF3D(3, (fp, \"\\n\\nSelected pixel format:\\n\"));\n\n\taglDescribePixelFormat(info, AGL_RENDERER_ID, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_RENDERER_ID     : 0x%X\\n\", rv));\n\t\n\taglDescribePixelFormat(info, AGL_OFFSCREEN, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_OFFSCREEN       : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribePixelFormat(info, AGL_FULLSCREEN, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_FULLSCREEN      : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribePixelFormat(info, AGL_WINDOW, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_WINDOW          : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribePixelFormat(info, AGL_ACCELERATED, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_ACCELERATED     : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribePixelFormat(info, AGL_ROBUST, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_ROBUST          : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribePixelFormat(info, AGL_BACKING_STORE, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_BACKING_STORE   : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribePixelFormat(info, AGL_MP_SAFE, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_MP_SAFE         : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribePixelFormat(info, AGL_COMPLIANT, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_COMPLIANT       : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribePixelFormat(info, AGL_MULTISCREEN, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_MULTISCREEN     : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribePixelFormat(info, AGL_BUFFER_SIZE, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_BUFFER_SIZE     : %d\\n\", rv));\n\t\n\taglDescribePixelFormat(info, AGL_LEVEL, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_LEVEL           : %d\\n\", rv));\n\n\taglDescribePixelFormat(info, AGL_PIXEL_SIZE, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_PIXEL_SIZE      : %d\\n\", rv));\n\n#if 0\n\taglDescribePixelFormat(info, AGL_ACCUM_MODES, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_ACCUM_MODES     : 0x%X\\n\", rv));\n\tPrintColorModes(rv);\n#endif\t\n\taglDescribePixelFormat(info, AGL_DEPTH_SIZE, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_DEPTH_SIZE      : %d\\n\", rv));\n\t\n\taglDescribePixelFormat(info, AGL_STENCIL_SIZE, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_STENCIL_SIZE    : %d\\n\", rv));\n\tPrintBitModes(rv);\n\t\n\taglDescribePixelFormat(info, AGL_AUX_BUFFERS, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_AUX_BUFFERS     : %d\\n\", rv));\n#if 0\n\taglDescribePixelFormat(info, AGL_VIDEO_MEMORY, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_VIDEO_MEMORY    : %d\\n\", rv));\n\t\n\taglDescribePixelFormat(info, AGL_TEXTURE_MEMORY, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_TEXTURE_MEMORY  : %d\\n\", rv));\n#endif\n\n#if 0\n\taglDescribePixelFormat(pix, AGL_BUFFER_SIZE, &rv);\n\tDPRINTF3D(3, (fp, \"\\tAGL_BUFFER_SIZE: %d\\n\", rv));\n\taglDescribePixelFormat(pix, AGL_LEVEL, &rv);\n\tDPRINTF3D(3, (fp, \"\\tAGL_LEVEL: %d\\n\", rv));\n\taglDescribePixelFormat(pix, AGL_RGBA, &rv);\n\tDPRINTF3D(3, (fp, \"\\tAGL_RGBA: %s\\n\", (rv == GL_TRUE ? \"GL_TRUE\" : \"GL_FALSE\")));\n\taglDescribePixelFormat(pix, AGL_DOUBLEBUFFER, &rv);\n\tDPRINTF3D(3, (fp, \"\\tAGL_DOUBLEBUFFER: %s\\n\", (rv == GL_TRUE ? \"GL_TRUE\" : \"GL_FALSE\")));\n\taglDescribePixelFormat(pix, AGL_STEREO, &rv);\n\tDPRINTF3D(3, (fp, \"\\tAGL_STEREO: %s\\n\", (rv == GL_TRUE ? \"GL_TRUE\" : \"GL_FALSE\")));\n\taglDescribePixelFormat(pix, AGL_AUX_BUFFERS, &rv);\n\tDPRINTF3D(3, (fp, \"\\tAGL_AUX_BUFFERS: %d\\n\", rv));\n\taglDescribePixelFormat(pix, AGL_PIXEL_SIZE, &rv);\n\tDPRINTF3D(3, (fp, \"\\tAGL_PIXEL_SIZE: %d\\n\", rv));\n\n\taglDescribePixelFormat(pix, AGL_RED_SIZE, &rv);\n\tDPRINTF3D(3, (fp, \"\\n\\tAGL_RED_SIZE: %d\\n\", rv));\n\taglDescribePixelFormat(pix, AGL_GREEN_SIZE, &rv);\n\tDPRINTF3D(3, (fp, \"\\tAGL_GREEN_SIZE: %d\\n\", rv));\n\taglDescribePixelFormat(pix, AGL_BLUE_SIZE, &rv);\n\tDPRINTF3D(3, (fp, \"\\tAGL_BLUE_SIZE: %d\\n\", rv));\n\taglDescribePixelFormat(pix, AGL_ALPHA_SIZE, &rv);\n\tDPRINTF3D(3, (fp, \"\\tAGL_ALPHA_SIZE: %d\\n\", rv));\n\n\taglDescribePixelFormat(pix, AGL_DEPTH_SIZE, &rv);\n\tDPRINTF3D(3, (fp, \"\\n\\tAGL_DEPTH_SIZE: %d\\n\", rv));\n\taglDescribePixelFormat(pix, AGL_STENCIL_SIZE, &rv);\n\tDPRINTF3D(3, (fp, \"\\tAGL_STENCIL_SIZE: %d\\n\", rv));\n\t\n\taglDescribePixelFormat(pix, AGL_ACCUM_RED_SIZE, &rv);\n\tDPRINTF3D(3, (fp, \"\\tAGL_ACCUM_RED_SIZE: %d\\n\", rv));\n\taglDescribePixelFormat(pix, AGL_ACCUM_GREEN_SIZE, &rv);\n\tDPRINTF3D(3, (fp, \"\\tAGL_ACCUM_GREEN_SIZE: %d\\n\", rv));\n\taglDescribePixelFormat(pix, AGL_ACCUM_BLUE_SIZE, &rv);\n\tDPRINTF3D(3, (fp, \"\\tAGL_ACCUM_BLUE_SIZE: %d\\n\", rv));\n\taglDescribePixelFormat(pix, AGL_ACCUM_ALPHA_SIZE, &rv);\n\tDPRINTF3D(3, (fp, \"\\tAGL_ACCUM_ALPHA_SIZE: %d\\n\", rv));\n#endif\n\treturn 1;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/ClipboardExtended/ClipboardExtendedPlugin.c",
    "content": "/* Automatically generated from Squeak on #(9 May 2006 1:40:04 am) */\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n/*** Function Prototypes ***/\nstatic VirtualMachine * getInterpreter(void);\n#pragma export on\nEXPORT(const char*) getModuleName(void);\n#pragma export off\nstatic sqInt halt(void);\n#pragma export on\nEXPORT(sqInt) ioAddClipboardData(void);\nEXPORT(sqInt) ioClearClipboard(void);\nEXPORT(sqInt) ioCreateClipboard(void);\nEXPORT(sqInt) ioGetClipboardFormat(void);\nEXPORT(sqInt) ioReadClipboardData(void);\n#pragma export off\nstatic sqInt msg(char * s);\n#pragma export on\nEXPORT(sqInt) setInterpreter(struct VirtualMachine* anInterpreter);\n#pragma export off\nstatic sqInt sqAssert(sqInt aBool);\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"ClipboardExtendedPlugin 9 May 2006 (i)\"\n#else\n\t\"ClipboardExtendedPlugin 9 May 2006 (e)\"\n#endif\n;\n\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine * getInterpreter(void) {\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*) getModuleName(void) {\n\treturn moduleName;\n}\n\nstatic sqInt halt(void) {\n\t;\n}\n\nEXPORT(sqInt) ioAddClipboardData(void) {\n\tsqInt clipboardAddress;\n\tsqInt dataLength;\n\tsqInt formatLength;\n\tsqInt clipboard;\n\tchar *data;\n\tchar *aFormat;\n\n\tclipboard = interpreterProxy->stackValue(2);\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(1)));\n\tdata = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(1))));\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\n\taFormat = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tclipboardAddress = interpreterProxy->positive32BitValueOf(clipboard);\n\tdataLength = interpreterProxy->slotSizeOf(((sqInt)(long)(data) - 4));\n\tformatLength = interpreterProxy->slotSizeOf(((sqInt)(long)(aFormat) - 4));\n\tsqPasteboardPutItemFlavordatalengthformatTypeformatLength(clipboardAddress, data, dataLength, aFormat, formatLength);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(3);\n\treturn null;\n}\n\nEXPORT(sqInt) ioClearClipboard(void) {\n\tsqInt clipboardAddress;\n\tsqInt clipboard;\n\n\tclipboard = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tclipboardAddress = interpreterProxy->positive32BitValueOf(clipboard);\n\tsqPasteboardClear(clipboardAddress);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(1);\n\treturn null;\n}\n\nEXPORT(sqInt) ioCreateClipboard(void) {\n\tsqInt clipboardAddress;\n\n\tclipboardAddress = interpreterProxy->positive32BitIntegerFor(sqCreateClipboard());\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, clipboardAddress);\n\treturn null;\n}\n\nEXPORT(sqInt) ioGetClipboardFormat(void) {\n\tsqInt itemCount;\n\tsqInt clipboardAddress;\n\tsqInt clipboard;\n\tsqInt formatNumber;\n\tsqInt _return_value;\n\n\tclipboard = interpreterProxy->stackValue(1);\n\tformatNumber = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tclipboardAddress = interpreterProxy->positive32BitValueOf(clipboard);\n\titemCount = sqPasteboardGetItemCount(clipboardAddress);\n\tif (itemCount > 0) {\n\t\t_return_value = sqPasteboardCopyItemFlavorsitemNumber(clipboardAddress, formatNumber);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, _return_value);\n\t\treturn null;\n\t}\n\t_return_value = interpreterProxy->nilObject();\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(3, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) ioReadClipboardData(void) {\n\tsqInt formatLength;\n\tsqInt clipboardAddress;\n\tsqInt clipboard;\n\tchar *format;\n\tsqInt _return_value;\n\n\tclipboard = interpreterProxy->stackValue(1);\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\n\tformat = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tclipboardAddress = interpreterProxy->positive32BitValueOf(clipboard);\n\tformatLength = interpreterProxy->slotSizeOf(((sqInt)(long)(format) - 4));\n\t_return_value = sqPasteboardCopyItemFlavorDataformatformatLength(clipboardAddress, format, formatLength);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(3, _return_value);\n\treturn null;\n}\n\nstatic sqInt msg(char * s) {\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt) setInterpreter(struct VirtualMachine* anInterpreter) {\n\tsqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\nstatic sqInt sqAssert(sqInt aBool) {\n\t/* missing DebugCode */;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\n\nvoid* ClipboardExtendedPlugin_exports[][3] = {\n\t{\"ClipboardExtendedPlugin\", \"ioClearClipboard\", (void*)ioClearClipboard},\n\t{\"ClipboardExtendedPlugin\", \"ioReadClipboardData\", (void*)ioReadClipboardData},\n\t{\"ClipboardExtendedPlugin\", \"ioCreateClipboard\", (void*)ioCreateClipboard},\n\t{\"ClipboardExtendedPlugin\", \"ioAddClipboardData\", (void*)ioAddClipboardData},\n\t{\"ClipboardExtendedPlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"ClipboardExtendedPlugin\", \"ioGetClipboardFormat\", (void*)ioGetClipboardFormat},\n\t{\"ClipboardExtendedPlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{NULL, NULL, NULL}\n};\n\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/ClipboardExtended/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>ClipboardExtendedPlugin</string>\n\t<key>CFBundleIconFile</key>\n\t<string>SqueakPlugin.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.ClipboardExtendedPlugin</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0.0b2</string>\n\t<key>CFBundleSignature</key>\n\t<string>FAST</string>\n\t<key>CFBundleVersion</key>\n\t<string>1.0.0b2</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/ClipboardExtended/JMMExtendedClipBoardPlugin.1.cs",
    "content": "'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 22 May 2007 at 7:28:42 am'!\rSmartSyntaxInterpreterPlugin subclass: #ClipboardExtendedPlugin\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'VMMaker-Plugins'!\r\r!ClipboardExtendedPlugin methodsFor: 'io' stamp: 'JSM 5/8/2006 23:39'!\rioAddClipboardData: clipboard data: data dataFormat: aFormat\r| clipboardAddress formatLength dataLength |\rself primitive: 'ioAddClipboardData' parameters: #(Oop ByteArray String).\r\rclipboardAddress := interpreterProxy positive32BitValueOf: clipboard.\r\rdataLength := interpreterProxy slotSizeOf: data cPtrAsOop.\rformatLength := interpreterProxy slotSizeOf: aFormat cPtrAsOop.\r\rself sqPasteboardPutItemFlavor: clipboardAddress data: data length: dataLength formatType: aFormat formatLength: formatLength.\r! !\r\r!ClipboardExtendedPlugin methodsFor: 'io' stamp: 'JSM 5/6/2006 18:59'!\rioClearClipboard: clipboard\r| clipboardAddress |\rself primitive: 'ioClearClipboard' parameters: #(Oop).\rclipboardAddress :=  interpreterProxy positive32BitValueOf: clipboard.\rself sqPasteboardClear: clipboardAddress.! !\r\r!ClipboardExtendedPlugin methodsFor: 'io' stamp: 'JSM 5/6/2006 19:23'!\rioCreateClipboard\r| clipboardAddress |\rself primitive: 'ioCreateClipboard' parameters: #().\r\rclipboardAddress := interpreterProxy positive32BitIntegerFor: self sqCreateClipboard.\r\r^ clipboardAddress.! !\r\r!ClipboardExtendedPlugin methodsFor: 'io' stamp: 'JSM 5/9/2006 01:39'!\rioGetClipboardFormat: clipboard formatNumber: formatNumber \r\t| clipboardAddress itemCount |\r\tself primitive: 'ioGetClipboardFormat' parameters: #(#Oop #SmallInteger ).\r\tclipboardAddress := interpreterProxy positive32BitValueOf: clipboard.\r\titemCount := self sqPasteboardGetItemCount: clipboardAddress.\r\titemCount > 0\r\t\tifTrue: [^ self sqPasteboardCopyItemFlavors: clipboardAddress itemNumber: formatNumber].\r\t^ interpreterProxy nilObject! !\r\r!ClipboardExtendedPlugin methodsFor: 'io' stamp: 'JSM 5/7/2006 13:07'!\rioReadClipboardData: clipboard format: format\r| clipboardAddress formatLength |\rself primitive: 'ioReadClipboardData' parameters: #(Oop String).\rclipboardAddress := interpreterProxy positive32BitValueOf: clipboard.\rformatLength := interpreterProxy slotSizeOf: format cPtrAsOop.\r^ self sqPasteboardCopyItemFlavorData: clipboardAddress format: format formatLength: formatLength.\r! !\r\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/ClipboardExtended/Sophie-Clipboard.st",
    "content": "Object subclass: #ExtendedClipboardInterface\r\tinstanceVariableNames: 'clipboard'\r\tclassVariableNames: 'Current MacServicesProcess'\r\tpoolDictionaries: ''\r\tcategory: 'Sophie-Clipboard'!\r\r!ExtendedClipboardInterface methodsFor: 'as yet unclassified' stamp: 'JSM 5/6/2006 15:44'!\raddClipboardData: data dataFormat: aFormat\r\t^ self primAddClipboardData: clipboard data: data dataFormat: aFormat.! !\r\r!ExtendedClipboardInterface methodsFor: 'as yet unclassified' stamp: 'JSM 5/6/2006 15:37'!\rclearClipboard\r\t^ self primClearClipboard: clipboard.! !\r\r!ExtendedClipboardInterface methodsFor: 'as yet unclassified' stamp: 'JSM 5/6/2006 15:28'!\rcreateClipboard\r\t^ self primCreateClipboard.! !\r\r!ExtendedClipboardInterface methodsFor: 'as yet unclassified' stamp: 'JSM 5/6/2006 15:38'!\rgetClipboardFormat: formatNumber\r\t^ self primGetClipboardFormat: clipboard formatNumber: formatNumber.! !\r\r!ExtendedClipboardInterface methodsFor: 'as yet unclassified' stamp: 'JSM 5/6/2006 15:35'!\rinitialize\r\tclipboard := self createClipboard.! !\r\r!ExtendedClipboardInterface methodsFor: 'as yet unclassified' stamp: 'JSM 5/6/2006 16:32'!\rprimAddClipboardData: clipboard data: data dataFormat: aFormat\r\r\t<primitive:'ioAddClipboardData' module: 'ClipboardExtendedPlugin'>\r\t^ self primitiveFailed.! !\r\r!ExtendedClipboardInterface methodsFor: 'as yet unclassified' stamp: 'JSM 5/6/2006 16:32'!\rprimClearClipboard: clipboard\r\r\t<primitive:'ioClearClipboard' module: 'ClipboardExtendedPlugin'>\r\t^ self primitiveFailed.\r! !\r\r!ExtendedClipboardInterface methodsFor: 'as yet unclassified' stamp: 'JSM 5/6/2006 18:53'!\rprimCreateClipboard\r\t<primitive:'ioCreateClipboard' module: 'ClipboardExtendedPlugin'>\r\t^ self primitiveFailed.\r! !\r\r!ExtendedClipboardInterface methodsFor: 'as yet unclassified' stamp: 'JSM 5/6/2006 16:33'!\rprimGetClipboardFormat: clipboard formatNumber: formatNumber\r\r\t<primitive:'ioGetClipboardFormat' module: 'ClipboardExtendedPlugin'>\r\t^ self primitiveFailed.\r! !\r\r!ExtendedClipboardInterface methodsFor: 'as yet unclassified' stamp: 'JSM 5/6/2006 16:33'!\rprimReadClipboardData: clipboard format: format\r\r\t<primitive:'ioReadClipboardData' module: 'ClipboardExtendedPlugin'>.\r\t^ self primitiveFailed.\r! !\r\r!ExtendedClipboardInterface methodsFor: 'as yet unclassified' stamp: 'JSM 5/6/2006 15:38'!\rreadClipboardData: format\r\t^ self primReadClipboardData: clipboard format: format.! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rExtendedClipboardInterface class\r\tinstanceVariableNames: ''!\r\r!ExtendedClipboardInterface class methodsFor: 'as yet unclassified' stamp: 'JSM 5/6/2006 15:32'!\rcurrent\r\tCurrent ifNil: [Current := self new].\r\t^Current! !\r\r!ExtendedClipboardInterface class methodsFor: 'as yet unclassified' stamp: 'JSM 5/6/2006 18:14'!\rinitialize\r\t\"ExtendedClipboardInterface initialize\"\r\tCurrent := nil.\r\tSmalltalk addToStartUpList: self after: nil.\r\tSmalltalk addToShutDownList: self after: nil.! !\r\r!ExtendedClipboardInterface class methodsFor: 'as yet unclassified' stamp: 'JSM 5/6/2006 15:33'!\rshutDown: quitting\r! !\r\r!ExtendedClipboardInterface class methodsFor: 'as yet unclassified' stamp: 'JSM 5/6/2006 15:33'!\rstartUp: resuming\r\t\"The image is either being newly started (resuming is true), or it's just been snapshotted\"\r\r\tCurrent := nil.\r\tself current.! !\r\rExtendedClipboardInterface initialize!"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/ClipboardExtended/SophieSUnitClipboard.st",
    "content": "'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 9 May 2006 at 1:45:40 am'!\rTestCase subclass: #ExtendedClipboardSunit\r\tinstanceVariableNames: 'interface'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Clipboard-Extended'!\r\r!ExtendedClipboardSunit methodsFor: 'testing' stamp: 'JSM 5/9/2006 00:43'!\rtestAddClipboardData\r\t| data |\r\tinterface clearClipboard.\r\tinterface addClipboardData:'hello' dataFormat: 'text'.\r\tinterface addClipboardData:'bye' dataFormat: 'txt'.\r\tdata := interface readClipboardData: 'text'.\r\tself should: data asString = 'hello'.\r\tdata := interface readClipboardData: 'txt'.\r\tself should: data asString = 'bye'.\r\tinterface clearClipboard.\r\tdata := interface readClipboardData: 'text'.\r\tself should: data = nil.\r\t\r\t! !\r\r!ExtendedClipboardSunit methodsFor: 'testing' stamp: 'JSM 5/9/2006 01:43'!\rtestClearClipboard\r\t| data |\r\tinterface clearClipboard.\r\tdata := interface readClipboardData: 'txt'.\r\tself assert: data = nil! !\r\r!ExtendedClipboardSunit methodsFor: 'testing' stamp: 'JSM 5/9/2006 01:43'!\rtestGetClipboardFormat\r\t| data |\r\tinterface clearClipboard.\r\tdata := interface getClipboardFormat: 1.\r\tself assert: data = nil.\r\tinterface clearClipboard.\r\tinterface addClipboardData: 'hello' dataFormat: 'com.apple.traditional-mac-plain-text'.\r\tinterface addClipboardData: 'bye' dataFormat: 'public.utf8-plain-text'.\r\tdata := interface getClipboardFormat: 1.\r\tself should: data asText = 'public.utf8-plain-text'.\r\tdata := interface getClipboardFormat: 0.\r\tself should: data asText = 'com.apple.traditional-mac-plain-text'! !\r\r\r!ExtendedClipboardSunit methodsFor: 'initialize-release' stamp: 'JSM 5/6/2006 15:54'!\rsetUp\r\tinterface _ ExtendedClipboardInterface current.\r! !\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/ClipboardExtended/sqMacExtendedClipboard.c",
    "content": "/*\n *  sqMacExtendedClipboard.c\n *  SqueakClipboardExtendedxcodeproj\n *\n *  Created by John Sterling Mcintosh on 4/21/06.\n *  Copyright 2006 Corporate Smalltalk Consulting ltd. All rights reserved.\n *  Licenced under the squeak-l NSImage\n *\n */\n#include <Carbon/Carbon.h>\n\n#include \"sqMacExtendedClipboard.h\"\n/* The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n\nextern struct VirtualMachine* interpreterProxy;\n\nvoid sqPasteboardClear( PasteboardRef inPasteboard )\n{\n\tPasteboardClear( inPasteboard );\n}\n\nint sqPasteboardGetItemCount (\tPasteboardRef inPasteboard )\n{\n\tItemCount itemCount;\n\t\n\tPasteboardSynchronize ( inPasteboard );\n\tPasteboardGetItemCount ( inPasteboard, &itemCount);\n\treturn itemCount;\n}\n\nint sqPasteboardCopyItemFlavorsitemNumber ( PasteboardRef inPasteboard, int formatNumber )\n{\n\tCFArrayRef flavorTypeArray;\t\n\tCFStringRef formatType;\n\tint formatTypeLength;\n\tPasteboardItemID itemID;\n\tOSStatus err;\n\tint flavorCount;\n\t\n\tPasteboardSynchronize ( inPasteboard );\n\terr = PasteboardGetItemIdentifier (inPasteboard,1,&itemID);\n\n\tif (err) {\n\t\treturn interpreterProxy->nilObject();\n\t}\t\t\n\n\terr = PasteboardCopyItemFlavors( inPasteboard, itemID, &flavorTypeArray );\n\t\n\tif (err) {\n\t\treturn interpreterProxy->nilObject();\n\t}\t\t\n\t\n\tflavorCount = CFArrayGetCount( flavorTypeArray );\n\tif (formatNumber > flavorCount) {\n\t\tCFRelease(flavorTypeArray);\n\t\treturn interpreterProxy->nilObject();\n\t}\n\t\n\tformatType = (CFStringRef) CFArrayGetValueAtIndex ( flavorTypeArray, formatNumber-1);\n\t\n\tformatTypeLength = CFStringGetLength (formatType);\n\t\n\tint outData = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), formatTypeLength);\n\tunsigned char* formatConverted = interpreterProxy->firstIndexableField(outData);\n\t\t\n\tCFStringGetBytes ( formatType, CFRangeMake(0,formatTypeLength), kCFStringEncodingMacRoman, 0, \n\t\t\t\t\t\t\t   false, formatConverted,formatTypeLength, NULL);\n\tCFRelease (flavorTypeArray);\n\t\n\treturn outData;\n}\n\nPasteboardRef sqCreateClipboard( void )\n{\n    static PasteboardRef sPasteboard = NULL;\n\n    if ( sPasteboard == NULL )\n    {\n        PasteboardCreate( kPasteboardClipboard, &sPasteboard );\n    }\n\n    return sPasteboard;\n}\n\nvoid sqPasteboardPutItemFlavordatalengthformatTypeformatLength ( PasteboardRef inPasteboard, char* inData, int dataLength, char* format, int formatLength)\n{\t\n\tOSStatus err;\n\n\tCFStringRef formatType = CFStringCreateWithBytes ( kCFAllocatorDefault, format, formatLength, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tkCFStringEncodingMacRoman, false);\n\tCFDataRef convertedData = CFDataCreate(NULL, inData, dataLength);\n\t\n\terr = PasteboardPutItemFlavor ( inPasteboard, 1, formatType, convertedData, kPasteboardFlavorNoFlags);\n\n\tCFRelease (convertedData);\n\tCFRelease (formatType);\n\n\tif (err) {\n\t\tinterpreterProxy->success(0);\n\t}\n}\n\t\nint sqPasteboardCopyItemFlavorDataformatformatLength ( PasteboardRef inPasteboard, char* format, int formatLength)\n{\n\tCFDataRef dataBuffer;\n\tPasteboardItemID itemID;\n\tOSStatus err;\n\t\n\tCFStringRef formatType = CFStringCreateWithBytes ( kCFAllocatorDefault, format, formatLength,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tkCFStringEncodingMacRoman, false);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\tPasteboardSynchronize ( inPasteboard );\n\terr = PasteboardGetItemIdentifier (inPasteboard,1,&itemID);\n\n\tif (err) {\n\t\treturn interpreterProxy->nilObject();\n\t}\t\t\n\n\terr = PasteboardCopyItemFlavorData ( inPasteboard, itemID, formatType, &dataBuffer);\n\t\n\tif (err) {\n\t\tCFRelease(formatType);\n\t\treturn interpreterProxy->nilObject();\n\t}\n\t\n\tint dataLength = CFDataGetLength(dataBuffer);\n\tint outData = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), dataLength );\n\tunsigned char* flavorData = interpreterProxy->firstIndexableField(outData);\n\tCFDataGetBytes (dataBuffer, CFRangeMake(0,dataLength), flavorData);\n\t\n\tCFRelease(formatType);\n\tCFRelease(dataBuffer);\n\t\t\n\treturn outData;\n}"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/ClipboardExtended/sqMacExtendedClipboard.h",
    "content": "/*\n *  sqMacExtendedClipboard.h\n *  SqueakClipboardExtendedxcodeproj\n *\n *  Created by John Sterling Mcintosh on 4/21/06.\n *  Copyright 2006 Corporate Smalltalk Consulting ltd. All rights reserved.\n *  Licenced under the squeak-l\n *\n */\n\n#include <Carbon/Carbon.h>\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/CroquetPlugin/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>CroquetPlugin</string>\n\t<key>CFBundleIconFile</key>\n\t<string>SqueakPlugin.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.CroquetPlugin</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0.0b2</string>\n\t<key>CFBundleSignature</key>\n\t<string>FAST</string>\n\t<key>CFBundleVersion</key>\n\t<string>1.0.0b2</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/CroquetPlugin/sqMacCroquet.c",
    "content": "/*\n *  sqMacCroquet.c\n *  SqueakCroquet\n *\n *  Created by John M McIntosh on 04/04/06.\n *  Copyright 2006 Corporate Smalltalk Consulting Ltd. All rights reserved.\n *  Licenced under the Squeak-L\n *  taken from Ian's unix example\n *\n */\n\n#include \"sqMacCroquet.h\"\n#include \"sqMemoryAccess.h\"\n#include <stdio.h>\n#include <fcntl.h>\n#include <unistd.h> \n\n\nsqInt ioGatherEntropy(char *buffer, sqInt bufSize)\n{\n  int fd, count= 0;\n\n  if ((fd= open(\"/dev/urandom\", O_RDONLY)) < 0)\n    return 0;\n\n  while (count < bufSize)\n    {\n      int n;\n      if ((n= read(fd, buffer + count, bufSize)) < 1)\n\tbreak;\n      count += n;\n    }\n\n  close(fd);\n\n  return count == bufSize;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/CroquetPlugin/sqMacCroquet.h",
    "content": "/*\n *  sqMacCroquet.h\n *  SqueakCroquet\n *\n *  Created by John M McIntosh on 04/04/06.\n *  Copyright 2006 Corporate Smalltalk Consulting Ltd. All rights reserved.\n *  Licenced under the Squeak-L\n *\n */\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/CurlPlugin/Info-CURLPlugin.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>CurlPlugin</string>\n\t<key>CFBundleGetInfoString</key>\n\t<string>CurlPlugin V2.0.0 for Squeak</string>\n\t<key>CFBundleIconFile</key>\n\t<string>SqueakPlugin.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.CurlPlugin</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>CurlPlugin V2.0.0 for Squeak</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>2.0.0</string>\n\t<key>CFBundleSignature</key>\n\t<string>FAST</string>\n\t<key>CFBundleVersion</key>\n\t<string>2.0.0</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/DropPlugin/sqMacDragDrop.c",
    "content": "/****************************************************************************\n*   PROJECT: Mac window, memory, keyboard interface.\n*   FILE:    sqMacDragDrop.c\n*   CONTENT: \n*\n*   AUTHOR:  John McIntosh, and others.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacDragDrop.c 1708 2007-06-10 00:40:04Z johnmci $\n*\n*   NOTES: See change log below.\n*\t1/4/2002   JMM Carbon cleanup\n*\n*****************************************************************************/\n/*\tDrag and drop support for Squeak \n\tJohn M McIntosh of Corporate Smalltalk Consulting Ltd\n\tjohnmci@smalltalkconsulting.com \n\thttp://www.smalltalkconsulting.com \n\tIn Jan of 2001 under contract to Disney\n\t\n\tDragging is only for objects into Squeak, not from Squeak outwards.\n\t\t\n    V1.0 Jan 24th 2001, JMM\n    V3.0.19 Aug 2001, JMM make a proper plugin\n\nSome of this code comes from\n\tAuthor:\t\tJohn Montbriand\n\t\t\t\tSome techniques borrowed from Pete Gontier's original FinderDragPro.\n\n\n\tCopyright: \tCopyright:  1999 by Apple Computer, Inc.\n\t\t\t\tall rights reserved.\n\t\n\tDisclaimer:\tYou may incorporate this sample code into your applications without\n\t\t\t\trestriction, though the sample code has been provided \"AS IS\" and the\n\t\t\t\tresponsibility for its operation is 100% yours.  However, what you are\n\t\t\t\tnot permitted to do is to redistribute the source as \"DSC Sample Code\"\n\t\t\t\tafter having made changes. If you're going to re-distribute the source,\n\t\t\t\twe require that you make it clear in the source that the code was\n\t\t\t\tdescended from Apple Sample Code, but that you've made changes.\n\t\n\tChange History (most recent first):\n\t9/9/99 by John Montbriand\n\t\n\tMay 8th,2002,JMM - Bert Freudenberg published some changes to make file opening easier without security\n        July 28th, 2003, JMM - fix issue with race on open doc events and squeak VM Thread.\n*  3.7.0bx Nov 24th, 2003 JMM gCurrentVMEncoding\n\t\n*/\n/*\n    need get filetype/creator\n    need DropPlugin_shutdownModule & dropShutdown\n    \n*/\n\n#include \"sq.h\"\n\n#include <Drag.h>\n#include <MacWindows.h>\n#include <Gestalt.h>\n#include <Quickdraw.h>\n\n\n#include \"sqVirtualMachine.h\"\n#include \"sqMacFileLogic.h\"\t\n#include \"sqMacUIConstants.h\"\n#include \"DropPlugin.h\"\n\n\t/* promise flavor types */\n\t\nenum {\n\tkPromisedFlavor = 'fssP',\t\t/* default promise */\n\tkPromisedFlavorFindFile = 'rWm1' /* Find File promise -- special case */\n};\n\n struct HFSFlavorSqueak {\n  OSType              fileType;               /* file type */\n  OSType              fileCreator;            /* file creator */\n  UInt16              fdFlags;                /* Finder flags */\n  FSRef               theFSRef;               /* file system Ref */\n  };\ntypedef struct HFSFlavorSqueak                HFSFlavorSqueak;\n\n volatile static Boolean gDragDropThrottleSpinLock = false;\t     /* true if waiting for Squeak to process D&D */\n static DragReceiveHandlerUPP gMainReceiveHandler = NULL;   /* receive handler for the main dialog */\n static DragTrackingHandlerUPP gMainTrackingHandler = NULL; /* tracking handler for the main dialog */\n static WindowPtr   gWindowPtr;\n \nvolatile static UInt16 gNumDropFiles=0;\n\n static HFSFlavorSqueak *dropFiles;\n\n static char tempName[DOCUMENT_NAME_SIZE + 1];  \n\n\t/* these routines are used both in the receive handler and inside of the\n\t\ttracking handler.  The following variables are shared between MyDragTrackingHandler\n\t\tand MyDragReceiveHandler.  */\n\t\t\n static Boolean gApprovedDrag = false;   /* set to true if the drag is approved */\n static Boolean gInIconBox = false;      /* set true if the drag is inside our drop box */\n \nextern struct VirtualMachine *interpreterProxy;\n pascal OSErr MyDragTrackingHandler(DragTrackingMessage message, WindowPtr theWindow, void *refCon, DragReference theDragRef);\n pascal OSErr MyDragReceiveHandler(WindowPtr theWindow, void *refcon, DragReference theDragRef);\n\n// Startup logic\n\nint dropInit(void)\n{\n \tvoid *fn;\n    Boolean  installedReceiver=false, installedTracker=false;\n    OSErr err;\n  \n    /* check for the drag manager & translucent feature??? */\n    \n\tif (gMainReceiveHandler != NULL) return 1;\n\t\t\n\tfn = interpreterProxy->ioLoadFunctionFrom(\"getSTWindow\", \"\");\n\tif (fn == 0) {\n\t    goto bail; \n\t}\n\tgWindowPtr = (WindowPtr) ((int (*) ()) fn)();\n\n\tgMainTrackingHandler = NewDragTrackingHandlerUPP(MyDragTrackingHandler);\n\tif (gMainTrackingHandler == NULL) return 0;\n\tgMainReceiveHandler = NewDragReceiveHandlerUPP(MyDragReceiveHandler);\n\tif (gMainReceiveHandler == NULL) return 0;\n\n\t\t/* install the drag handlers, don't forget to dispose of them later */\n\t\t\n\tif (!gWindowPtr) \n\t\tgoto bail;\n\t\t\n\terr = InstallTrackingHandler(gMainTrackingHandler, gWindowPtr, NULL);\n\tif (err != noErr) { \n\t    err = memFullErr; \n\t    goto bail; \n    }\n\tinstalledTracker = true;\n\terr = InstallReceiveHandler(gMainReceiveHandler, gWindowPtr, NULL);\n\t\n\tif (err != noErr) { \n\t    err = memFullErr; \n\t    goto bail; \n\t}\n\tinstalledReceiver = true;\n\treturn 1;\n\t\nbail: \n    if (installedReceiver)\n\t\tRemoveReceiveHandler(gMainReceiveHandler, gWindowPtr);\n\tif (installedTracker)\n\t\tRemoveTrackingHandler(gMainTrackingHandler, gWindowPtr);\n\t\n\tgMainTrackingHandler = NULL; \n    gMainReceiveHandler = NULL;\n    \n\treturn 0;\n}\t\n\n// Shutdown logic\n\nint dropShutdown() {\n    if (gMainReceiveHandler != NULL)\n\t\tRemoveReceiveHandler(gMainReceiveHandler, gWindowPtr);\n\tif (gMainTrackingHandler != NULL)\n\t\tRemoveTrackingHandler(gMainTrackingHandler, gWindowPtr);\n\tif (gNumDropFiles != 0 ) {\n\t    DisposePtr((char *) dropFiles);\n\t    gNumDropFiles = 0;\n\t}\n\t\n\tgMainTrackingHandler = NULL; \n    gMainReceiveHandler = NULL;\n    gDragDropThrottleSpinLock = false;\n\treturn 1;\n}\n\nint sqSecFileAccessCallback(void *function) {\n#pragma unused(function)\n\treturn 0;\n }\n\n//Primitive to get file name\n\nchar *dropRequestFileName(int dropIndex) {\n    if(dropIndex < 1 || dropIndex > gNumDropFiles) \n        return NULL;\n\t\t\n\tPathToFileViaFSRef(tempName, DOCUMENT_NAME_SIZE, &dropFiles[dropIndex-1].theFSRef,gCurrentVMEncoding);\n    if (dropIndex == gNumDropFiles) \n        gDragDropThrottleSpinLock = false;\n  return tempName;\n}\n\n//Primitive to get file stream handle.\n\nint dropRequestFileHandle(int dropIndex) {\n    sqInt  fileOop;\n\tvoid *fn;\n    char *dropName = dropRequestFileName(dropIndex);\n\n    if(!dropName)\n        return interpreterProxy->nilObject();\n \n\tfn = interpreterProxy->ioLoadFunctionFrom(\"fileOpenNamesizewritesecure\", \"FilePlugin\");\n\tif (fn == 0) {\n\t\t/* begin primitiveFail */\n        interpreterProxy->success(false);\n\t\treturn null;\n\t}\n\tfileOop = ((sqInt (*) (int, int, int, int)) fn)((int)dropName, strlen(dropName), 0,0);\n    \n  return fileOop;\n}\n\n\n/* RECEIVING DRAGS ------------------------------------------------ */\n\n\n/* ApproveDragReference is called by the drag tracking handler to determine\n\tif the contents of the drag can be handled by our receive handler.\n\n\tNote that if a flavor can't be found, it's not really an\n\terror; it only means the flavor wasn't there and we should\n\tnot accept the drag. Therefore, we translate 'badDragFlavorErr'\n\tinto a 'false' value for '*approved'. */\n\t\nstatic pascal OSErr ApproveDragReference(DragReference theDragRef, Boolean *approved) {\n\n\tOSErr err;\n\tDragAttributes dragAttrs;\n\tFlavorFlags flavorFlags;\n\tItemReference theItem;\n\t\t\n\t\t/* we cannot drag to our own window */\n\tif ((err = GetDragAttributes(theDragRef, &dragAttrs)) != noErr) \n\t    goto bail;\n\t    \n\tif ((dragAttrs & kDragInsideSenderWindow) != 0) { \n\t    err = userCanceledErr; \n\t    goto bail; \n    }\n\t\n\t\t/* gather information about the drag & a reference to item one. */\n\tif ((err = GetDragItemReferenceNumber(theDragRef, 1, &theItem)) != noErr) \n\t    goto bail;\n\t\t\n\t\t/* check for flavorTypeHFS */\n\terr = GetFlavorFlags(theDragRef, theItem, flavorTypeHFS, &flavorFlags);\n\tif (err == noErr) {\n\t\t*approved = true;\n\t\treturn noErr;\n\t} else if (err != badDragFlavorErr)\n\t\tgoto bail;\n\t\t\n\t\t/* check for flavorTypePromiseHFS */\n\terr = GetFlavorFlags(theDragRef, theItem, flavorTypePromiseHFS, &flavorFlags);\n\tif (err == noErr) {\n\t\t*approved = true;\n\t\treturn noErr;\n\t} else if (err != badDragFlavorErr)\n\t\tgoto bail;\n\t\t\n\t\t/* none of our flavors were found */\n\t*approved = false;\n\treturn noErr;\n\t\nbail:\n\t\t/* an error occured, clean up.  set result to false. */\n\t*approved = false;\n\treturn err;\n}\n\n\n\n/* MyDragTrackingHandler is called for tracking the mouse while a drag is passing over our\n\twindow.  if the drag is approved, then the drop box will be hilitied appropriately\n\tas the mouse passes over it.  */\n\npascal OSErr MyDragTrackingHandler(DragTrackingMessage message, WindowPtr theWindow, void *refCon, DragReference theDragRef) {\n#pragma unused(refCon)\n\t\t/* we're drawing into the image well if we hilite... */\n\tEventRecord\t\ttheEvent;\n    void *     fn;\n\tPoint mouse;\n\n\tswitch (message) {\n\t\n\t\tcase kDragTrackingEnterWindow:\n\t\t\t{\t\n\t\t\t\tDragAttributes currDragFlags;\n\t\t\t\t\n\t\t\t\tgApprovedDrag = false;\n\t\t\t\tif (theWindow == gWindowPtr) {\n\t\t\t\t\tif (ApproveDragReference(theDragRef, &gApprovedDrag) != noErr) break;\n\t\t\t\t\tif ( ! gApprovedDrag ) break;\n\t\t\t\t\tGetDragAttributes(theDragRef,&currDragFlags);\n\n\t\t\t\t\tif (currDragFlags) {  // if we're in the box, hilite... \n\t\t\t\t\t\tgInIconBox = true;\t\t\t\t\t\n                    \t    /* queue up an event */\n\t\t\t\t\t\tGetDragMouse (theDragRef,&mouse,NULL);\n\t\t\t\t\t\ttheEvent.what = 0;\n\t\t\t\t\t\ttheEvent.message = 0;\n\t\t\t\t\t\ttheEvent.modifiers = 0;\n\t\t\t\t\t\ttheEvent.when = 0;\n\t\t\t\t\t\ttheEvent.where = mouse;\n                    \tfn = interpreterProxy->ioLoadFunctionFrom(\"recordDragDropEvent\", \"\");\n                    \tif (fn != 0) {\n                    \t    ((int (*) (EventRecord *theEvent, int numberOfItems, int dragType)) fn)(&theEvent, gNumDropFiles,DragEnter);\n                    \t}\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase kDragTrackingInWindow:\n\t\t\tif (gApprovedDrag) {\n\t\t\t\tGetDragMouse (theDragRef,&mouse,NULL);\n\t\t\t\ttheEvent.what = 0;\n\t\t\t\ttheEvent.message = 0;\n\t\t\t\ttheEvent.modifiers = 0;\n\t\t\t\ttheEvent.when = 0;\n\t\t\t\ttheEvent.where = mouse;\n             \tfn = interpreterProxy->ioLoadFunctionFrom(\"recordDragDropEvent\", \"\");\n            \tif (fn != 0) {\n            \t    ((int (*) (EventRecord *theEvent,  int numberOfItems, int dragType)) fn)(&theEvent,gNumDropFiles,DragMove);\n            \t    \n            \t}\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase kDragTrackingLeaveWindow:\n\t\t\tif (gApprovedDrag && gInIconBox) {\n            \t    /* queue up an event */\n\t\t\t\tGetDragMouse (theDragRef,&mouse,NULL);\n\t\t\t\ttheEvent.what = 0;\n\t\t\t\ttheEvent.message = 0;\n\t\t\t\ttheEvent.modifiers = 0;\n\t\t\t\ttheEvent.when = 0;\n\t\t\t\ttheEvent.where = mouse;\n            \tfn = interpreterProxy->ioLoadFunctionFrom(\"recordDragDropEvent\", \"\");\n            \tif (fn != 0) {\n            \t    ((int (*) (EventRecord *theEvent, int numberOfItems, int dragType)) fn)(&theEvent, gNumDropFiles,DragLeave);\n            \t    \n            \t}\n\t\t\t}\n\t\t\tgApprovedDrag = gInIconBox = false;\n\t\t\tbreak;\n\t}\n\treturn noErr; // there's no point in confusing Drag Manager or its caller\n}\n\nstatic pascal OSErr SetDropFolder\n    (DragReference dragRef, FSRef *folder)\n{\n    OSErr err = noErr;\n\n    AliasHandle aliasH;\n\n    if (!(err = FSNewAliasMinimal (folder,&aliasH)))\n    {\n        HLockHi ((Handle) aliasH);\n        if (!(err = MemError ( )))\n        {\n            Size size = GetHandleSize ((Handle) aliasH);\n            if (!(err = MemError ( )))\n            {\n                AEDesc dropLoc;\n\n                if (!(err = AECreateDesc\n                    (typeAlias,*aliasH,size,&dropLoc)))\n                {\n                    OSErr err2;\n\n                    err = SetDropLocation (dragRef,&dropLoc);\n\n                    err2 = AEDisposeDesc (&dropLoc);\n                    if (!err) err = err2;\n                }\n            }\n        }\n\n        DisposeHandle ((Handle) aliasH);\n        if (!err) err = MemError ( );\n    }\n\n    return err;\n}\n\n/* MyDragReceiveHandler is the receive handler for the main window.  It is called\n\twhen a file or folder (or a promised file or folder) is dropped into the drop\n\tbox in the main window.  Here, if the drag reference has been approved in the\n\ttrack drag call, we handle three different cases:\n\t\n\t1. standard hfs flavors,\n\t\n\t2. promised flavors provided by find file, mmmm This may be a pre sherlock issue\n\t\n\t3. promised flavors provided by other applications.\n\t\n     */\n     \npascal OSErr MyDragReceiveHandler(WindowPtr theWindow, void *refcon, DragReference theDragRef) {\n\n#pragma unused(refcon)\n#pragma unused(theWindow)\n\tItemReference   theItem;\n\tPromiseHFSFlavor targetPromise;\n\tSize            theSize;\n\tOSErr           err;\n\tEventRecord\t\ttheEvent;\n\tlong            i,countActualItems;\n\tvoid *\t\t\tfn;\n\tFInfo \t\t\tfinderInfo;\n\tHFSFlavor\t\ttargetHFSFlavor;\n\t\n\t\t/* validate the drag.  Recall the receive handler will only be called after\n\t\tthe tracking handler has received a kDragTrackingInWindow event.  As a result,\n\t\tthe gApprovedDrag and gInIconBox will be defined when we arrive here.  Hence,\n\t\tthere is no need to spend extra time validating the drag at this point. */\n\t\t\n\tif ( ! (gApprovedDrag && gInIconBox) )  \n\t    return userCanceledErr; \n\n\tif (gNumDropFiles !=0 ) \n\t    DisposePtr((char *) dropFiles);\n\t    \n\tif ((err = CountDragItems(theDragRef, (UInt16 *) &gNumDropFiles)) != noErr) \n\t    return paramErr;\n\t\n\tdropFiles = (HFSFlavorSqueak *) NewPtr(sizeof(HFSFlavorSqueak)*gNumDropFiles);\n\t\n\tif (dropFiles == null) {\n\t    gNumDropFiles = 0;\n\t    return userCanceledErr;\n\t}\n\t\n    countActualItems = 0;\n    \t\t\n    for(i=1;i<=gNumDropFiles;i++) {\n\t\t/* get the first item reference */\n    \tif ((err = GetDragItemReferenceNumber(theDragRef, i, &theItem)) != noErr) \n    \t    continue;\n\n    \t\t/* try to get a  HFSFlavor*/\n    \ttheSize = sizeof(HFSFlavor);\n    \terr = GetFlavorData(theDragRef, theItem, flavorTypeHFS, &targetHFSFlavor, &theSize, 0);\n \n     \tif (err == noErr) {\n    \t\tdropFiles[countActualItems].fileType = targetHFSFlavor.fileType;\n    \t\tdropFiles[countActualItems].fileCreator = targetHFSFlavor.fileCreator;\n    \t\tdropFiles[countActualItems].fdFlags = targetHFSFlavor.fdFlags;\n\t\t\tFSpMakeFSRef(&targetHFSFlavor.fileSpec, &dropFiles[countActualItems].theFSRef);\n    \t\tcountActualItems++;\n    \t\tcontinue;\n    \t} else \n\t\t\tif (err != badDragFlavorErr) \n    \t        continue; \n    \t\n    \t\t/* try to get a  promised HFSFlavor*/\n    \ttheSize = sizeof(PromiseHFSFlavor);\n    \terr = GetFlavorData(theDragRef, theItem, flavorTypePromiseHFS, &targetPromise, &theSize, 0);\n    \tif (err != noErr) \n    \t\tcontinue;\n    \t\n    \t\t/* check for a drop from find file */\n    \tif (targetPromise.promisedFlavor == kPromisedFlavorFindFile) {\n    \t\t\t/* from find file, no need to set the file location... */\n    \t\tif (err != noErr) \n    \t\t\tcontinue;\n    \t} else {\n\t\t\tFSRef\ttargetFolder;\n\t\t\t\n\t\t\terr = FSFindFolder(kLocalDomain, kTemporaryFolderType, kDontCreateFolder, &targetFolder);\n    \t\tif (err != noErr) \n    \t\t\tcontinue;\n\t\t\terr = SetDropFolder(theDragRef, &targetFolder);\n    \t\tif (err != noErr) \n    \t\t\tcontinue;\n    \t}\n\t\tFSSpec\taFSSpec;\n\t\t\n\t\ttheSize = sizeof(FSSpec);\n\t\terr = GetFlavorData(theDragRef, theItem, targetPromise.promisedFlavor, &aFSSpec, &theSize, 0);\n\t\tif (err != noErr) \n\t\t\tcontinue;\n\t\tFSpMakeFSRef(&aFSSpec, &dropFiles[countActualItems].theFSRef);\n\t\terr = getFInfoViaFSRef(&dropFiles[countActualItems].theFSRef,&finderInfo);\n\t\tif (err != noErr) \n\t\t\tcontinue;\n\t\t\t\n\t\tdropFiles[countActualItems].fileType = finderInfo.fdType;\n\t\tdropFiles[countActualItems].fileCreator = finderInfo.fdCreator;\n\t\tdropFiles[countActualItems].fdFlags =  finderInfo.fdFlags;\n \t\tcountActualItems++;\n    }\n    \n\tgNumDropFiles = countActualItems;\n    if (gNumDropFiles == 0) {\n    \tDisposePtr((char *) dropFiles);\n    \treturn noErr;\n    }\n\t\n\t    /* queue up an event */\n\tPoint mouse;\n\t\n\tGetDragMouse (theDragRef,&mouse,NULL);\n\ttheEvent.what = 0;\n\ttheEvent.message = 0;\n\ttheEvent.modifiers = 0;\n\ttheEvent.when = 0;\n\ttheEvent.where = mouse;\n\n\tfn = interpreterProxy->ioLoadFunctionFrom(\"recordDragDropEvent\", \"\");\n\tif (fn != 0) {\n\t    ((int (*) (EventRecord *theEvent, int numberOfItems, int dragType)) fn)(&theEvent, gNumDropFiles,DragDrop);\n\t}\n\treturn noErr;\n}\n\nvoid sqSetNumberOfDropFiles(int numberOfFiles) {\n        while (gDragDropThrottleSpinLock);\n        gDragDropThrottleSpinLock = true;\n\tif (gNumDropFiles != 0 ) {\n\t    DisposePtr((char *) dropFiles);\n\t    gNumDropFiles = 0;\n\t}\n\tgNumDropFiles = numberOfFiles;\n\tdropFiles = (HFSFlavorSqueak *) NewPtr(sizeof(HFSFlavorSqueak)*gNumDropFiles);\n\tif (dropFiles == null) {\n\t    gNumDropFiles = 0;\n\t}\n    return;\n}\n\nvoid sqSetFileInformation(int dropIndex, void *dropFile) { \n    if(dropIndex < 1 || dropIndex > gNumDropFiles) \n        return;\n    memcpy(&dropFiles[dropIndex-1],(char *) dropFile,sizeof(HFSFlavorSqueak));\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/ExuperyPlugin/sqOSXExuperyPlugin.c",
    "content": "#include <unistd.h>\n#include <sys/mman.h>\n#include \"ExuperyPlugin.h\"\n#include <stdio.h>\n#include <stdlib.h>\n\nint ioMapCodeCache(int size) {\n  void *value;\n  long\terror;\n\textern int errno;\n  value = (void*) mmap(0, size,\n\t\t    PROT_READ|PROT_WRITE|PROT_EXEC,\n\t\t     MAP_ANON|MAP_SHARED,-1,0);\n  if ((int) value == -1) {\n\t\terror = errno;\n\t\tfprintf(stderr,\"ioMapCodeCache failed %i\\n\",error);\n\t\texit(-1);\n\t}\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/FileCopy.xml",
    "content": "<?xml version=\"1.0\"?>\n<?codewarrior exportversion=\"1.0\" ideversion=\"4.0\"?>\n<!DOCTYPE PROJECT [\n\n<!ELEMENT PROJECT (TARGETLIST, TARGETORDER, GROUPLIST, DESIGNLIST?)>\n<!ELEMENT TARGETLIST (TARGET+)>\n<!ELEMENT TARGET (NAME, SETTINGLIST, FILELIST?, LINKORDER?, SEGMENTLIST?, OVERLAYGROUPLIST?, SUBTARGETLIST?, SUBPROJECTLIST?)>\n<!ELEMENT NAME (#PCDATA)>\n<!ELEMENT USERSOURCETREETYPE (#PCDATA)>\n<!ELEMENT PATH (#PCDATA)>\n<!ELEMENT FILELIST (FILE*)>\n<!ELEMENT FILE (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?, ROOTFILEREF?, FILEKIND?, FILEFLAGS?)>\n<!ELEMENT PATHTYPE (#PCDATA)>\n<!ELEMENT PATHROOT (#PCDATA)>\n<!ELEMENT ACCESSPATH (#PCDATA)>\n<!ELEMENT PATHFORMAT (#PCDATA)>\n<!ELEMENT ROOTFILEREF (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)>\n<!ELEMENT FILEKIND (#PCDATA)>\n<!ELEMENT FILEFLAGS (#PCDATA)>\n<!ELEMENT FILEREF (TARGETNAME?, PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)>\n<!ELEMENT TARGETNAME (#PCDATA)>\n<!ELEMENT SETTINGLIST ((SETTING|PANELDATA)+)>\n<!ELEMENT SETTING (NAME?, (VALUE|(SETTING+)))>\n<!ELEMENT PANELDATA (NAME, VALUE)>\n<!ELEMENT VALUE (#PCDATA)>\n<!ELEMENT LINKORDER (FILEREF*)>\n<!ELEMENT SEGMENTLIST (SEGMENT+)>\n<!ELEMENT SEGMENT (NAME, ATTRIBUTES?, FILEREF*)>\n<!ELEMENT ATTRIBUTES (#PCDATA)>\n<!ELEMENT OVERLAYGROUPLIST (OVERLAYGROUP+)>\n<!ELEMENT OVERLAYGROUP (NAME, BASEADDRESS, OVERLAY*)>\n<!ELEMENT BASEADDRESS (#PCDATA)>\n<!ELEMENT OVERLAY (NAME, FILEREF*)>\n<!ELEMENT SUBTARGETLIST (SUBTARGET+)>\n<!ELEMENT SUBTARGET (TARGETNAME, ATTRIBUTES?)>\n<!ELEMENT SUBPROJECTLIST (SUBPROJECT+)>\n<!ELEMENT SUBPROJECT (FILEREF, SUBPROJECTTARGETLIST)>\n<!ELEMENT SUBPROJECTTARGETLIST (SUBPROJECTTARGET*)>\n<!ELEMENT SUBPROJECTTARGET (TARGETNAME, ATTRIBUTES?)>\n<!ELEMENT TARGETORDER (ORDEREDTARGET|ORDEREDDESIGN)*>\n<!ELEMENT ORDEREDTARGET (NAME)>\n<!ELEMENT ORDEREDDESIGN (NAME, ORDEREDTARGET+)>\n<!ELEMENT GROUPLIST (GROUP|FILEREF)*>\n<!ELEMENT GROUP (NAME, (GROUP|FILEREF)*)>\n<!ELEMENT DESIGNLIST (DESIGN+)>\n<!ELEMENT DESIGN (NAME, DESIGNDATA)>\n<!ELEMENT DESIGNDATA (#PCDATA)>\n]>\n<PROJECT>\n    <TARGETLIST>\n        <TARGET>\n            <NAME>FileCopyPlugin</NAME>\n            <SETTINGLIST>\n\n                <!-- Settings for \"Source Trees\" panel -->\n                <SETTING><NAME>UserSourceTrees</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"Custom Keywords\" panel -->\n                <SETTING><NAME>CustomColor1</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor2</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor3</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor4</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Access Paths\" panel -->\n                <SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>UserSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>::Squeak:Carbon:Stub:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>System</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>Lamie:Squeak:Squeak3.0 Folder:Squeak 3.0.19:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n                <SETTING><NAME>SystemSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MacOS Support:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MSL:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Target Settings\" panel -->\n                <SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING>\n                <SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>Targetname</NAME><VALUE>FileCopyPlugin</VALUE></SETTING>\n                <SETTING><NAME>OutputDirectory</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>SaveEntriesUsingRelativePaths</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"File Mappings\" panel -->\n                <SETTING><NAME>FileMappings</NAME>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>APPL</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>Appl</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MMLB</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MPLF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MWCD</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>RSRC</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.bh</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Balloon Help</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cpp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.exp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.fr</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>ODFRC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.h</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.idl</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>SOMobjects TS</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.p</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pas</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.r</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Rez</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.s</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PPCAsm</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>XCOF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>docu</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>rsrc</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>shlb</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>stub</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.doc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Build Extras\" panel -->\n                <SETTING><NAME>CacheModDates</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>ActivateBrowser</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>DumpBrowserInfo</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>CacheSubprojects</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>UseThirdPartyDebugger</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>DebuggerCommandLine</NAME><VALUE></VALUE></SETTING>\n                <PANELDATA><NAME>Debugger Runtime</NAME><VALUE>\n                    0002000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    00000000000000014C616D69653A53717565616B3A53717565616B332E302046\n                    6F6C6465723A53717565616B20332E30416C70686131384D5400000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    000000000000000000000000000000000D06EEF010000000000001000D06F800\n                    0002000000000000000000000D06D9E000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    00000000000000000000000000000000\n                </VALUE></PANELDATA>\n\n                <!-- Settings for \"Debugger Target\" panel -->\n                <SETTING><NAME>LogSystemMessages</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>AutoTargetDLLs</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>StopAtWatchpoints</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>PauseWhileRunning</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>PauseInterval</NAME><VALUE>5</VALUE></SETTING>\n                <SETTING><NAME>PauseUIFlags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>AltExePath</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>StopAtTempBPOnLaunch</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>CacheSymbolics</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>TempBPFunctionName</NAME><VALUE>main</VALUE></SETTING>\n                <SETTING><NAME>TempBPType</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"68K CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_68K_codesize</NAME><VALUE>Smart</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_structalignment</NAME><VALUE>MC68K</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fp_mode</NAME><VALUE>SANE</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_code68020</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_mpwc</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fourbyteints</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_IEEEdoubles</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fardata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farvtables</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_pcrelstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_macsbug</NAME><VALUE>New</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_a6frames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"68K Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_68K_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_mix</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"68K Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_68K_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_68K_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"68K Linker\" panel -->\n                <SETTING><NAME>MWLinker_68K_linksym</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_symfullpath</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_linksingle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_fastlink</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_generateMap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_glueintosegone</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"68K Project\" panel -->\n                <SETTING><NAME>MWProject_68K_type</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_outfile</NAME><VALUE>Mac OS PPC C/C++</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filecreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filetype</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_size</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_flags</NAME><VALUE>22656</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcheader</NAME><VALUE>Standard</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmulti</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_a4</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_minsize</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcsegtype</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_cfm68kcodegen</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_thedebugger</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrc_custom</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_rseg_app</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_pilot_lib</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_pilot_main_entry</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Compiler\" panel -->\n                <SETTING><NAME>MWFrontEnd_C_cplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_checkprotos</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_arm</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_trigraphs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_onlystdkeywords</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enumsalwaysint</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwpointerstyle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_prefixname</NAME><VALUE>myMacHeadersPPC</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ansistrict</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwcnewline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_wchar_type</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enableexceptions</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontreusestrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_poolstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_useRTTI</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_multibyteaware</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_unsignedchars</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_autoinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_booltruefalse</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_direct_to_som</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_som_env_check</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_alwaysinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_inlinelevel</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ecplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_objective_c</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_defer_codegen</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Warnings\" panel -->\n                <SETTING><NAME>MWWarning_C_warn_illpragma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_emptydecl</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_possunwant</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedvar</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedarg</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_extracomma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_pedantic</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warningerrors</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_hidevirtual</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_implicitconv</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_notinlined</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_structclass</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"CFM68K\" panel -->\n                <SETTING><NAME>MWCFM68K_exports</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_farthreshold</NAME><VALUE>256</VALUE></SETTING>\n                <SETTING><NAME>PCFM68K_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_mainname</NAME><VALUE>__start</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_termname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_alignment</NAME><VALUE>Align_2</VALUE></SETTING>\n\n                <!-- Settings for \"MacOS Merge Panel\" panel -->\n                <SETTING><NAME>MWMerge_MacOS_projectType</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputName</NAME><VALUE>Merge Out</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputCreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputType</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_suppressWarning</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyFragments</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_skipResources</NAME>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE>\u000e</VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"PPC CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_PPC_structalignment</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tracebacktables</NAME><VALUE>Inline</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processor</NAME><VALUE>Generic</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_readonlystrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_fpcontract</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_schedule</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_peephole</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processorspecific</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_altivec</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vectortocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vrsave</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_PPC_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_extended</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_mix</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_PPC_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_PPC_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Linker\" panel -->\n                <SETTING><NAME>MWLinker_PPC_linksym</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_symfullpath</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_permitmultdefs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmode</NAME><VALUE>Normal</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_mainname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_termname</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"PPC PEF\" panel -->\n                <SETTING><NAME>MWPEF_exports</NAME><VALUE>Pragma</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sortcode</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_expandbss</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWPEF_collapsereloads</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Project\" panel -->\n                <SETTING><NAME>MWProject_PPC_type</NAME><VALUE>SharedLibrary</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>FileCopyPlugin</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>1178686292</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>1936223330</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_size</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_minsize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_flags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcheader</NAME><VALUE>Native</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"PPCAsm Panel\" panel -->\n                <SETTING><NAME>MWAssembler_PPC_auxheader</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_symmode</NAME><VALUE>Mac</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_dialect</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_prefixfile</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_typecheck</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_warnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_casesensitive</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"Rez Compiler\" panel -->\n                <SETTING><NAME>MWRez_Language_maxwidth</NAME><VALUE>80</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_script</NAME><VALUE>Roman</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_alignment</NAME><VALUE>Align1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filtermode</NAME><VALUE>FilterSkip</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_suppresswarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_escapecontrolchars</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_prefixname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filteredtypes</NAME><VALUE>'CODE' 'DATA' 'PICT'</VALUE></SETTING>\n            </SETTINGLIST>\n            <FILELIST>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InterfaceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MathLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>myMacHeaders.pch</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FileCopyPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacFileCopy.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FileCopy.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DirectoryCopy.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FSpCompat.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FullPath.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>IterateDirectory.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MoreDesktopMgr.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MoreFiles.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MoreFilesExtras.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Search.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>CarbonAccessors.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n            </FILELIST>\n            <LINKORDER>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DirectoryCopy.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FileCopyPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FileCopy.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FSpCompat.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FullPath.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>IterateDirectory.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MoreDesktopMgr.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MoreFiles.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MoreFilesExtras.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Search.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacFileCopy.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>myMacHeaders.pch</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>CarbonAccessors.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InterfaceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MathLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n            </LINKORDER>\n        </TARGET>\n        <TARGET>\n            <NAME>FileCopyPlugin Opt</NAME>\n            <SETTINGLIST>\n\n                <!-- Settings for \"Source Trees\" panel -->\n                <SETTING><NAME>UserSourceTrees</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"Custom Keywords\" panel -->\n                <SETTING><NAME>CustomColor1</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor2</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor3</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor4</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Access Paths\" panel -->\n                <SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>UserSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>::Squeak:Carbon:Stub:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>System</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>Lamie:Squeak:Squeak3.0 Folder:Squeak 3.0.19:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n                <SETTING><NAME>SystemSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MacOS Support:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MSL:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Target Settings\" panel -->\n                <SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING>\n                <SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>Targetname</NAME><VALUE>FileCopyPlugin Opt</VALUE></SETTING>\n                <SETTING><NAME>OutputDirectory</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>SaveEntriesUsingRelativePaths</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"File Mappings\" panel -->\n                <SETTING><NAME>FileMappings</NAME>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>APPL</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>Appl</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MMLB</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MPLF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MWCD</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>RSRC</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.bh</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Balloon Help</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cpp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.exp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.fr</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>ODFRC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.h</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.idl</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>SOMobjects TS</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.p</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pas</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.r</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Rez</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.s</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PPCAsm</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>XCOF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>docu</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>rsrc</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>shlb</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>stub</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.doc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Build Extras\" panel -->\n                <SETTING><NAME>CacheModDates</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>ActivateBrowser</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>DumpBrowserInfo</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>CacheSubprojects</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>UseThirdPartyDebugger</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>DebuggerCommandLine</NAME><VALUE></VALUE></SETTING>\n                <PANELDATA><NAME>Debugger Runtime</NAME><VALUE>\n                    0002000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    00000000000000014C616D69653A53717565616B3A53717565616B332E302046\n                    6F6C6465723A53717565616B20332E30416C70686131384D5400000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    000000000000000000000000000000000D06EEF010000000000001000D06F800\n                    0002000000000000000000000D06D9E000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    00000000000000000000000000000000\n                </VALUE></PANELDATA>\n\n                <!-- Settings for \"Debugger Target\" panel -->\n                <SETTING><NAME>LogSystemMessages</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>AutoTargetDLLs</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>StopAtWatchpoints</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>PauseWhileRunning</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>PauseInterval</NAME><VALUE>5</VALUE></SETTING>\n                <SETTING><NAME>PauseUIFlags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>AltExePath</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>StopAtTempBPOnLaunch</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>CacheSymbolics</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>TempBPFunctionName</NAME><VALUE>main</VALUE></SETTING>\n                <SETTING><NAME>TempBPType</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"68K CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_68K_codesize</NAME><VALUE>Smart</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_structalignment</NAME><VALUE>MC68K</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fp_mode</NAME><VALUE>SANE</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_code68020</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_mpwc</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fourbyteints</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_IEEEdoubles</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fardata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farvtables</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_pcrelstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_macsbug</NAME><VALUE>New</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_a6frames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"68K Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_68K_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_mix</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"68K Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_68K_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_68K_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"68K Linker\" panel -->\n                <SETTING><NAME>MWLinker_68K_linksym</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_symfullpath</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_linksingle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_fastlink</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_generateMap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_glueintosegone</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"68K Project\" panel -->\n                <SETTING><NAME>MWProject_68K_type</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_outfile</NAME><VALUE>Mac OS PPC C/C++</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filecreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filetype</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_size</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_flags</NAME><VALUE>22656</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcheader</NAME><VALUE>Standard</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmulti</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_a4</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_minsize</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcsegtype</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_cfm68kcodegen</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_thedebugger</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrc_custom</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_rseg_app</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_pilot_lib</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_pilot_main_entry</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Compiler\" panel -->\n                <SETTING><NAME>MWFrontEnd_C_cplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_checkprotos</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_arm</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_trigraphs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_onlystdkeywords</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enumsalwaysint</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwpointerstyle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_prefixname</NAME><VALUE>myMacHeadersPPC</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ansistrict</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwcnewline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_wchar_type</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enableexceptions</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontreusestrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_poolstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_useRTTI</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_multibyteaware</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_unsignedchars</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_autoinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_booltruefalse</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_direct_to_som</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_som_env_check</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_alwaysinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_inlinelevel</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ecplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_objective_c</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_defer_codegen</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Warnings\" panel -->\n                <SETTING><NAME>MWWarning_C_warn_illpragma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_emptydecl</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_possunwant</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedvar</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedarg</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_extracomma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_pedantic</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warningerrors</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_hidevirtual</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_implicitconv</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_notinlined</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_structclass</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"CFM68K\" panel -->\n                <SETTING><NAME>MWCFM68K_exports</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_farthreshold</NAME><VALUE>256</VALUE></SETTING>\n                <SETTING><NAME>PCFM68K_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_mainname</NAME><VALUE>__start</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_termname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_alignment</NAME><VALUE>Align_2</VALUE></SETTING>\n\n                <!-- Settings for \"MacOS Merge Panel\" panel -->\n                <SETTING><NAME>MWMerge_MacOS_projectType</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputName</NAME><VALUE>Merge Out</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputCreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputType</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_suppressWarning</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyFragments</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_skipResources</NAME>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE>\u000e</VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"PPC CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_PPC_structalignment</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tracebacktables</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processor</NAME><VALUE>P750</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_readonlystrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_fpcontract</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_schedule</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_peephole</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processorspecific</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_altivec</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vectortocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vrsave</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_PPC_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_extended</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_mix</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_PPC_optimizationlevel</NAME><VALUE>Level4</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_PPC_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Linker\" panel -->\n                <SETTING><NAME>MWLinker_PPC_linksym</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_symfullpath</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_permitmultdefs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmode</NAME><VALUE>Normal</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_mainname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_termname</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"PPC PEF\" panel -->\n                <SETTING><NAME>MWPEF_exports</NAME><VALUE>Pragma</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sortcode</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_expandbss</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWPEF_collapsereloads</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Project\" panel -->\n                <SETTING><NAME>MWProject_PPC_type</NAME><VALUE>SharedLibrary</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>FileCopyPlugin</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>1178686292</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>1936223330</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_size</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_minsize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_flags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcheader</NAME><VALUE>Native</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"PPCAsm Panel\" panel -->\n                <SETTING><NAME>MWAssembler_PPC_auxheader</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_symmode</NAME><VALUE>Mac</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_dialect</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_prefixfile</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_typecheck</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_warnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_casesensitive</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"Rez Compiler\" panel -->\n                <SETTING><NAME>MWRez_Language_maxwidth</NAME><VALUE>80</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_script</NAME><VALUE>Roman</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_alignment</NAME><VALUE>Align1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filtermode</NAME><VALUE>FilterSkip</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_suppresswarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_escapecontrolchars</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_prefixname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filteredtypes</NAME><VALUE>'CODE' 'DATA' 'PICT'</VALUE></SETTING>\n            </SETTINGLIST>\n            <FILELIST>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InterfaceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MathLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>myMacHeaders.pch</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FileCopyPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacFileCopy.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FileCopy.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DirectoryCopy.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FSpCompat.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FullPath.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>IterateDirectory.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MoreDesktopMgr.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MoreFiles.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MoreFilesExtras.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Search.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>CarbonAccessors.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n            </FILELIST>\n            <LINKORDER>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DirectoryCopy.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FileCopyPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FileCopy.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FSpCompat.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FullPath.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>IterateDirectory.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MoreDesktopMgr.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MoreFiles.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MoreFilesExtras.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Search.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacFileCopy.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>myMacHeaders.pch</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>CarbonAccessors.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InterfaceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MathLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n            </LINKORDER>\n        </TARGET>\n    </TARGETLIST>\n\n    <TARGETORDER>\n        <ORDEREDTARGET><NAME>FileCopyPlugin</NAME></ORDEREDTARGET>\n        <ORDEREDTARGET><NAME>FileCopyPlugin Opt</NAME></ORDEREDTARGET>\n    </TARGETORDER>\n\n    <GROUPLIST>\n        <GROUP><NAME>Group 1</NAME>\n            <FILEREF>\n                <TARGETNAME>FileCopyPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>FileCopyPlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>FileCopyPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacFileCopy.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>FileCopyPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>DirectoryCopy.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>FileCopyPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>FSpCompat.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>FileCopyPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>FullPath.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>FileCopyPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>IterateDirectory.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>FileCopyPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MoreDesktopMgr.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>FileCopyPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MoreFiles.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>FileCopyPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MoreFilesExtras.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>FileCopyPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>Search.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>FileCopyPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>FileCopy.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>FileCopyPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MSL C.PPC.Lib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>FileCopyPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MSL RuntimePPC.Lib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>FileCopyPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>InterfaceLib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>FileCopyPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MathLib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>FileCopyPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>CarbonAccessors.o</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>FileCopyPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>myMacHeaders.pch</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n        </GROUP>\n    </GROUPLIST>\n\n</PROJECT>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/MoreFiles 1.5/C Headers/DirectoryCopy.h",
    "content": "/*\n**\tApple Macintosh Developer Technical Support\n**\n**\tDirectoryCopy: A robust, general purpose directory copy routine.\n**\n**\tby Jim Luther, Apple Developer Technical Support Emeritus\n**\n**\tFile:\t\tDirectoryCopy.h\n**\n**\tCopyright  1992-1999 Apple Computer, Inc.\n**\tAll rights reserved.\n**\n**\tYou may incorporate this sample code into your applications without\n**\trestriction, though the sample code has been provided \"AS IS\" and the\n**\tresponsibility for its operation is 100% yours.  However, what you are\n**\tnot permitted to do is to redistribute the source as \"DSC Sample Code\"\n**\tafter having made changes. If you're going to re-distribute the source,\n**\twe require that you make it clear in the source that the code was\n**\tdescended from Apple Sample Code, but that you've made changes.\n*/\n\n#ifndef __DIRECTORYCOPY__\n#define __DIRECTORYCOPY__\n\n#include <Types.h>\n#include <Files.h>\n\n#include \"Optimization.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*****************************************************************************/\n\nenum\n{\n\tgetNextItemOp\t\t\t= 1,\t/* couldn't access items in this directory - no access privileges */\n\tcopyDirCommentOp\t\t= 2,\t/* couldn't copy directory's Finder comment */\n\tcopyDirAccessPrivsOp\t= 3,\t/* couldn't copy directory's AFP access privileges */\n\tcopyDirFMAttributesOp\t= 4,\t/* couldn't copy directory's File Manager attributes */\n\tdirCreateOp\t\t\t\t= 5,\t/* couldn't create destination directory */\n\tfileCopyOp\t\t\t\t= 6\t\t/* couldn't copy file */\n};\n\n/*****************************************************************************/\n\ntypedef\tpascal\tBoolean\t(*CopyErrProcPtr) (OSErr error,\n\t\t\t\t\t\t\t\t\t\t   short failedOperation,\n\t\t\t\t\t\t\t\t\t\t   short srcVRefNum,\n\t\t\t\t\t\t\t\t\t\t   long srcDirID,\n\t\t\t\t\t\t\t\t\t\t   ConstStr255Param srcName,\n\t\t\t\t\t\t\t\t\t\t   short dstVRefNum,\n\t\t\t\t\t\t\t\t\t\t   long dstDirID,\n\t\t\t\t\t\t\t\t\t\t   ConstStr255Param dstName);\n/*\t Prototype for the CopyErrProc function DirectoryCopy calls.\n\tThis is the prototype for the CopyErrProc function DirectoryCopy\n\tcalls if an error condition is detected sometime during the copy.  If\n\tCopyErrProc returns false, then DirectoryCopy attempts to continue with\n\tthe directory copy operation.  If CopyErrProc returns true, then\n\tDirectoryCopy stops the directory copy operation.\n\n\terror\t\t\tinput:\tThe error result code that caused CopyErrProc to\n\t\t\t\t\t\t\tbe called.\n\tfailedOperation\tinput:\tThe operation that returned an error to\n\t\t\t\t\t\t\tDirectoryCopy.\n\tsrcVRefNum\t\tinput:\tSource volume specification.\n\tsrcDirID\t\tinput:\tSource directory ID.\n\tsrcName\t\t\tinput:\tSource file or directory name, or nil if\n\t\t\t\t\t\t\tsrcDirID specifies the directory.\n\tdstVRefNum\t\tinput:\tDestination volume specification.\n\tdstDirID\t\tinput:\tDestination directory ID.\n\tdstName\t\t\tinput:\tDestination file or directory name, or nil if\n\t\t\t\t\t\t\tdstDirID specifies the directory.\n\n\t__________\n\t\n\tAlso see:\tFilteredDirectoryCopy, FSpFilteredDirectoryCopy, DirectoryCopy, FSpDirectoryCopy\n*/\n\n#define CallCopyErrProc(userRoutine, error, failedOperation, srcVRefNum, srcDirID, srcName, dstVRefNum, dstDirID, dstName) \\\n\t\t(*(userRoutine))((error), (failedOperation), (srcVRefNum), (srcDirID), (srcName), (dstVRefNum), (dstDirID), (dstName))\n\n/*****************************************************************************/\n\ntypedef\tpascal\tBoolean\t(*CopyFilterProcPtr) (const CInfoPBRec * const cpbPtr);\n\n/*\t Prototype for the CopyFilterProc function.\n\tThis is the prototype for the CopyFilterProc function called by\n\tFilteredDirectoryCopy and GetLevelSize. If true is returned,\n\tthe file/folder is included in the copy, otherwise it is excluded.\n\t\n\tpb\tinput:\tPoints to the CInfoPBRec for the item under consideration.\n\n\t__________\n\t\n\tAlso see:\tFilteredDirectoryCopy, FSpFilteredDirectoryCopy\n*/\n\n#define CallCopyFilterProc(userRoutine, cpbPtr) (*(userRoutine))((cpbPtr))\n\n/*****************************************************************************/\n\npascal\tOSErr\tFilteredDirectoryCopy(short srcVRefNum,\n\t\t\t\t\t\t\t\t\t  long srcDirID,\n\t\t\t\t\t\t\t\t\t  ConstStr255Param srcName,\n\t\t\t\t\t\t\t\t\t  short dstVRefNum,\n\t\t\t\t\t\t\t\t\t  long dstDirID,\n\t\t\t\t\t\t\t\t\t  ConstStr255Param dstName,\n\t\t\t\t\t\t\t\t\t  ConstStr255Param copyName,\n\t\t\t\t\t\t\t\t\t  void *copyBufferPtr,\n\t\t\t\t\t\t\t\t\t  long copyBufferSize,\n\t\t\t\t\t\t\t\t\t  Boolean preflight,\n\t\t\t\t\t\t\t\t\t  CopyErrProcPtr copyErrHandler,\n\t\t\t\t\t\t\t\t\t  CopyFilterProcPtr copyFilterProc);\n/*\t Make a copy of a directory structure in a new location with item filtering.\n\tThe FilteredDirectoryCopy function makes a copy of a directory\n\tstructure in a new location. If copyBufferPtr <> NIL, it points to\n\ta buffer of copyBufferSize that is used to copy files data. The\n\tlarger the supplied buffer, the faster the copy. If\n\tcopyBufferPtr = NIL, then this routine allocates a buffer in the\n\tapplication heap. If you pass a copy buffer to this routine, make\n\tits size a multiple of 512 ($200) bytes for optimum performance.\n\t\n\tThe optional copyFilterProc parameter lets a routine you define\n\tdecide what files or directories are copied to the destination.\n\t\n\tFilteredDirectoryCopy normally creates a new directory *in* the\n\tspecified destination directory and copies the source directory's\n\tcontent into the new directory. However, if root parent directory\n\t(fsRtParID) is passed as the dstDirID parameter and NULL is\n\tpassed as the dstName parameter, DirectoryCopy renames the\n\tdestination volume to the source directory's name (truncating\n\tif the name is longer than 27 characters) and copies the source\n\tdirectory's content into the destination volume's root directory.\n\tThis special case is supported by FilteredDirectoryCopy, but\n\tnot by FSpFilteredDirectoryCopy since with FSpFilteredDirectoryCopy,\n\tthe dstName parameter can not be NULL.\n\t\n\tsrcVRefNum\t\tinput:\tSource volume specification.\n\tsrcDirID\t\tinput:\tSource directory ID.\n\tsrcName\t\t\tinput:\tSource directory name, or nil if\n\t\t\t\t\t\t\tsrcDirID specifies the directory.\n\tdstVRefNum\t\tinput:\tDestination volume specification.\n\tdstDirID\t\tinput:\tDestination directory ID.\n\tdstName\t\t\tinput:\tDestination directory name, or nil if\n\t\t\t\t\t\t\tdstDirID specifies the directory.\n\tcopyName\t\tinput:\tPoints to the new directory name if the directory\n\t\t\t\t\t\t\tis to be renamed or nil if the directory isn't to\n\t\t\t\t\t\t\tbe renamed.\n\tcopyBufferPtr\tinput:\tPoints to a buffer of copyBufferSize that\n\t\t\t\t\t\t\tis used the i/o buffer for the copy or\n\t\t\t\t\t\t\tnil if you want DirectoryCopy to allocate its\n\t\t\t\t\t\t\town buffer in the application heap.\n\tcopyBufferSize\tinput:\tThe size of the buffer pointed to\n\t\t\t\t\t\t\tby copyBufferPtr.\n\tpreflight\t\tinput:\tIf true, DirectoryCopy makes sure there are\n\t\t\t\t\t\t\tenough allocation blocks on the destination\n\t\t\t\t\t\t\tvolume to hold the directory's files before\n\t\t\t\t\t\t\tstarting the copy.\n\tcopyErrHandler\tinput:\tA pointer to the routine you want called if an\n\t\t\t\t\t\t\terror condition is detected during the copy, or\n\t\t\t\t\t\t\tnil if you don't want to handle error conditions.\n\t\t\t\t\t\t\tIf you don't handle error conditions, the first\n\t\t\t\t\t\t\terror will cause the copy to quit and\n\t\t\t\t\t\t\tDirectoryCopy will return the error.\n\t\t\t\t\t\t\tError handling is recommended...\n\tcopyFilterProc\tinput:\tA pointer to the filter routine you want called\n\t\t\t\t\t\t\tfor each item in the source directory, or NULL\n\t\t\t\t\t\t\tif you don't want to filter.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\treadErr\t\t\t\t19\t\tDriver does not respond to read requests\n\t\twritErr\t\t\t\t20\t\tDriver does not respond to write requests\n\t\tbadUnitErr\t\t\t21\t\tDriver reference number does not\n\t\t\t\t\t\t\t\t\tmatch unit table\n\t\tunitEmptyErr\t\t22\t\tDriver reference number specifies a\n\t\t\t\t\t\t\t\t\tnil handle in unit table\n\t\tabortErr\t\t\t27\t\tRequest aborted by KillIO\n\t\tnotOpenErr\t\t\t28\t\tDriver not open\n\t\tdskFulErr\t\t\t-34\t\tDestination volume is full\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\ttmfoErr\t\t\t\t-42\t\tToo many files open\n\t\tfnfErr\t\t\t\t-43\t\tSource file not found, or destination\n\t\t\t\t\t\t\t\t\tdirectory does not exist\n\t\twPrErr\t\t\t\t-44\t\tVolume locked by hardware\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t \t\t-46\t\tDestination volume is read-only\n\t\tfBsyErr\t \t\t\t-47\t\tThe source or destination file could\n\t\t\t\t\t\t\t\t\tnot be opened with the correct access\n\t\t\t\t\t\t\t\t\tmodes\n\t\tdupFNErr\t\t\t-48\t\tDestination file already exists\n\t\topWrErr\t\t\t\t-49\t\tFile already open for writing\n\t\tparamErr\t\t\t-50\t\tNo default volume or function not\n\t\t\t\t\t\t\t\t\tsupported by volume\n\t\tpermErr\t \t\t\t-54\t\tFile is already open and cannot be opened using specified deny modes\n\t\tmemFullErr\t\t\t-108\tCopy buffer could not be allocated\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\twrgVolTypErr\t\t-123\tFunction not supported by volume\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpDenyConflict\t\t-5006\tThe source or destination file could\n\t\t\t\t\t\t\t\t\tnot be opened with the correct access\n\t\t\t\t\t\t\t\t\tmodes\n\t\tafpObjectTypeErr\t-5025\tSource is a directory, directory not found\n\t\t\t\t\t\t\t\t\tor incomplete pathname\n\t\n\t__________\n\t\n\tAlso see:\tCopyErrProcPtr, CopyFilterProcPtr, FSpFilteredDirectoryCopy,\n\t\t\t\tDirectoryCopy, FSpDirectoryCopy, FileCopy, FSpFileCopy\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpFilteredDirectoryCopy(const FSSpec *srcSpec,\n\t\t\t\t\t\t\t\t\t\t const FSSpec *dstSpec,\n\t\t\t\t\t\t\t\t\t\t ConstStr255Param copyName,\n\t\t\t\t\t\t\t\t\t\t void *copyBufferPtr,\n\t\t\t\t\t\t\t\t\t\t long copyBufferSize,\n\t\t\t\t\t\t\t\t\t\t Boolean preflight,\n\t\t\t\t\t\t\t\t\t\t CopyErrProcPtr copyErrHandler,\n\t\t\t\t\t\t\t\t\t\t CopyFilterProcPtr copyFilterProc);\n/*\t Make a copy of a directory structure in a new location with item filtering.\n\tThe FSpFilteredDirectoryCopy function makes a copy of a directory\n\tstructure in a new location. If copyBufferPtr <> NIL, it points to\n\ta buffer of copyBufferSize that is used to copy files data. The\n\tlarger the supplied buffer, the faster the copy. If\n\tcopyBufferPtr = NIL, then this routine allocates a buffer in the\n\tapplication heap. If you pass a copy buffer to this routine, make\n\tits size a multiple of 512 ($200) bytes for optimum performance.\n\t\n\tThe optional copyFilterProc parameter lets a routine you define\n\tdecide what files or directories are copied to the destination.\n\t\n\tsrcSpec\t\t\tinput:\tAn FSSpec record specifying the directory to copy.\n\tdstSpec\t\t\tinput:\tAn FSSpec record specifying destination directory\n\t\t\t\t\t\t\tof the copy.\n\tcopyName\t\tinput:\tPoints to the new directory name if the directory\n\t\t\t\t\t\t\tis to be renamed or nil if the directory isn't to\n\t\t\t\t\t\t\tbe renamed.\n\tcopyBufferPtr\tinput:\tPoints to a buffer of copyBufferSize that\n\t\t\t\t\t\t\tis used the i/o buffer for the copy or\n\t\t\t\t\t\t\tnil if you want DirectoryCopy to allocate its\n\t\t\t\t\t\t\town buffer in the application heap.\n\tcopyBufferSize\tinput:\tThe size of the buffer pointed to\n\t\t\t\t\t\t\tby copyBufferPtr.\n\tpreflight\t\tinput:\tIf true, FSpDirectoryCopy makes sure there are\n\t\t\t\t\t\t\tenough allocation blocks on the destination\n\t\t\t\t\t\t\tvolume to hold the directory's files before\n\t\t\t\t\t\t\tstarting the copy.\n\tcopyErrHandler\tinput:\tA pointer to the routine you want called if an\n\t\t\t\t\t\t\terror condition is detected during the copy, or\n\t\t\t\t\t\t\tnil if you don't want to handle error conditions.\n\t\t\t\t\t\t\tIf you don't handle error conditions, the first\n\t\t\t\t\t\t\terror will cause the copy to quit and\n\t\t\t\t\t\t\tDirectoryCopy will return the error.\n\t\t\t\t\t\t\tError handling is recommended...\n\tcopyFilterProc\tinput:\tA pointer to the filter routine you want called\n\t\t\t\t\t\t\tfor each item in the source directory, or NULL\n\t\t\t\t\t\t\tif you don't want to filter.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\treadErr\t\t\t\t19\t\tDriver does not respond to read requests\n\t\twritErr\t\t\t\t20\t\tDriver does not respond to write requests\n\t\tbadUnitErr\t\t\t21\t\tDriver reference number does not\n\t\t\t\t\t\t\t\t\tmatch unit table\n\t\tunitEmptyErr\t\t22\t\tDriver reference number specifies a\n\t\t\t\t\t\t\t\t\tnil handle in unit table\n\t\tabortErr\t\t\t27\t\tRequest aborted by KillIO\n\t\tnotOpenErr\t\t\t28\t\tDriver not open\n\t\tdskFulErr\t\t\t-34\t\tDestination volume is full\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\ttmfoErr\t\t\t\t-42\t\tToo many files open\n\t\tfnfErr\t\t\t\t-43\t\tSource file not found, or destination\n\t\t\t\t\t\t\t\t\tdirectory does not exist\n\t\twPrErr\t\t\t\t-44\t\tVolume locked by hardware\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t \t\t-46\t\tDestination volume is read-only\n\t\tfBsyErr\t \t\t\t-47\t\tThe source or destination file could\n\t\t\t\t\t\t\t\t\tnot be opened with the correct access\n\t\t\t\t\t\t\t\t\tmodes\n\t\tdupFNErr\t\t\t-48\t\tDestination file already exists\n\t\topWrErr\t\t\t\t-49\t\tFile already open for writing\n\t\tparamErr\t\t\t-50\t\tNo default volume or function not\n\t\t\t\t\t\t\t\t\tsupported by volume\n\t\tpermErr\t \t\t\t-54\t\tFile is already open and cannot be opened using specified deny modes\n\t\tmemFullErr\t\t\t-108\tCopy buffer could not be allocated\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\twrgVolTypErr\t\t-123\tFunction not supported by volume\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpDenyConflict\t\t-5006\tThe source or destination file could\n\t\t\t\t\t\t\t\t\tnot be opened with the correct access\n\t\t\t\t\t\t\t\t\tmodes\n\t\tafpObjectTypeErr\t-5025\tSource is a directory, directory not found\n\t\t\t\t\t\t\t\t\tor incomplete pathname\n\t\n\t__________\n\t\n\tAlso see:\tCopyErrProcPtr, CopyFilterProcPtr, FilteredDirectoryCopy,\n\t\t\t\tDirectoryCopy, FSpDirectoryCopy, FileCopy, FSpFileCopy\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tDirectoryCopy(short srcVRefNum,\n\t\t\t\t\t\t\t  long srcDirID,\n\t\t\t\t\t\t\t  ConstStr255Param srcName,\n\t\t\t\t\t\t\t  short dstVRefNum,\n\t\t\t\t\t\t\t  long dstDirID,\n\t\t\t\t\t\t\t  ConstStr255Param dstName,\n\t\t\t\t\t\t\t  ConstStr255Param copyName,\n\t\t\t\t\t\t\t  void *copyBufferPtr,\n\t\t\t\t\t\t\t  long copyBufferSize,\n\t\t\t\t\t\t\t  Boolean preflight,\n\t\t\t\t\t\t\t  CopyErrProcPtr copyErrHandler);\n/*\t Make a copy of a directory structure in a new location.\n\tThe DirectoryCopy function makes a copy of a directory structure in a\n\tnew location. If copyBufferPtr <> NIL, it points to a buffer of\n\tcopyBufferSize that is used to copy files data.  The larger the\n\tsupplied buffer, the faster the copy.  If copyBufferPtr = NIL, then this\n\troutine allocates a buffer in the application heap. If you pass a\n\tcopy buffer to this routine, make its size a multiple of 512\n\t($200) bytes for optimum performance.\n\t\n\tDirectoryCopy normally creates a new directory *in* the specified\n\tdestination directory and copies the source directory's content into\n\tthe new directory. However, if root parent directory (fsRtParID)\n\tis passed as the dstDirID parameter and NULL is passed as the\n\tdstName parameter, DirectoryCopy renames the destination volume to\n\tthe source directory's name (truncating if the name is longer than\n\t27 characters) and copies the source directory's content into the\n\tdestination volume's root directory. This special case is supported\n\tby DirectoryCopy, but not by FSpDirectoryCopy since with\n\tFSpDirectoryCopy, the dstName parameter can not be NULL.\n\t\n\tsrcVRefNum\t\tinput:\tSource volume specification.\n\tsrcDirID\t\tinput:\tSource directory ID.\n\tsrcName\t\t\tinput:\tSource directory name, or nil if\n\t\t\t\t\t\t\tsrcDirID specifies the directory.\n\tdstVRefNum\t\tinput:\tDestination volume specification.\n\tdstDirID\t\tinput:\tDestination directory ID.\n\tdstName\t\t\tinput:\tDestination directory name, or nil if\n\t\t\t\t\t\t\tdstDirID specifies the directory.\n\tcopyName\t\tinput:\tPoints to the new directory name if the directory\n\t\t\t\t\t\t\tis to be renamed or nil if the directory isn't to\n\t\t\t\t\t\t\tbe renamed.\n\tcopyBufferPtr\tinput:\tPoints to a buffer of copyBufferSize that\n\t\t\t\t\t\t\tis used the i/o buffer for the copy or\n\t\t\t\t\t\t\tnil if you want DirectoryCopy to allocate its\n\t\t\t\t\t\t\town buffer in the application heap.\n\tcopyBufferSize\tinput:\tThe size of the buffer pointed to\n\t\t\t\t\t\t\tby copyBufferPtr.\n\tpreflight\t\tinput:\tIf true, DirectoryCopy makes sure there are\n\t\t\t\t\t\t\tenough allocation blocks on the destination\n\t\t\t\t\t\t\tvolume to hold the directory's files before\n\t\t\t\t\t\t\tstarting the copy.\n\tcopyErrHandler\tinput:\tA pointer to the routine you want called if an\n\t\t\t\t\t\t\terror condition is detected during the copy, or\n\t\t\t\t\t\t\tnil if you don't want to handle error conditions.\n\t\t\t\t\t\t\tIf you don't handle error conditions, the first\n\t\t\t\t\t\t\terror will cause the copy to quit and\n\t\t\t\t\t\t\tDirectoryCopy will return the error.\n\t\t\t\t\t\t\tError handling is recommended...\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\treadErr\t\t\t\t19\t\tDriver does not respond to read requests\n\t\twritErr\t\t\t\t20\t\tDriver does not respond to write requests\n\t\tbadUnitErr\t\t\t21\t\tDriver reference number does not\n\t\t\t\t\t\t\t\t\tmatch unit table\n\t\tunitEmptyErr\t\t22\t\tDriver reference number specifies a\n\t\t\t\t\t\t\t\t\tnil handle in unit table\n\t\tabortErr\t\t\t27\t\tRequest aborted by KillIO\n\t\tnotOpenErr\t\t\t28\t\tDriver not open\n\t\tdskFulErr\t\t\t-34\t\tDestination volume is full\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\ttmfoErr\t\t\t\t-42\t\tToo many files open\n\t\tfnfErr\t\t\t\t-43\t\tSource file not found, or destination\n\t\t\t\t\t\t\t\t\tdirectory does not exist\n\t\twPrErr\t\t\t\t-44\t\tVolume locked by hardware\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t \t\t-46\t\tDestination volume is read-only\n\t\tfBsyErr\t \t\t\t-47\t\tThe source or destination file could\n\t\t\t\t\t\t\t\t\tnot be opened with the correct access\n\t\t\t\t\t\t\t\t\tmodes\n\t\tdupFNErr\t\t\t-48\t\tDestination file already exists\n\t\topWrErr\t\t\t\t-49\t\tFile already open for writing\n\t\tparamErr\t\t\t-50\t\tNo default volume or function not\n\t\t\t\t\t\t\t\t\tsupported by volume\n\t\tpermErr\t \t\t\t-54\t\tFile is already open and cannot be opened using specified deny modes\n\t\tmemFullErr\t\t\t-108\tCopy buffer could not be allocated\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\twrgVolTypErr\t\t-123\tFunction not supported by volume\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpDenyConflict\t\t-5006\tThe source or destination file could\n\t\t\t\t\t\t\t\t\tnot be opened with the correct access\n\t\t\t\t\t\t\t\t\tmodes\n\t\tafpObjectTypeErr\t-5025\tSource is a directory, directory not found\n\t\t\t\t\t\t\t\t\tor incomplete pathname\n\t\n\t__________\n\t\n\tAlso see:\tCopyErrProcPtr, FSpDirectoryCopy, FilteredDirectoryCopy,\n\t\t\t\tFSpFilteredDirectoryCopy, FileCopy, FSpFileCopy\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpDirectoryCopy(const FSSpec *srcSpec,\n\t\t\t\t\t\t\t\t const FSSpec *dstSpec,\n\t\t\t\t\t\t\t\t ConstStr255Param copyName,\n\t\t\t\t\t\t\t\t void *copyBufferPtr,\n\t\t\t\t\t\t\t\t long copyBufferSize,\n\t\t\t\t\t\t\t\t Boolean preflight,\n\t\t\t\t\t\t\t\t CopyErrProcPtr copyErrHandler);\n/*\t Make a copy of a directory structure in a new location.\n\tThe FSpDirectoryCopy function makes a copy of a directory structure in a\n\tnew location. If copyBufferPtr <> NIL, it points to a buffer of\n\tcopyBufferSize that is used to copy files data.  The larger the\n\tsupplied buffer, the faster the copy.  If copyBufferPtr = NIL, then this\n\troutine allocates a buffer in the application heap. If you pass a\n\tcopy buffer to this routine, make its size a multiple of 512\n\t($200) bytes for optimum performance.\n\t\n\tsrcSpec\t\t\tinput:\tAn FSSpec record specifying the directory to copy.\n\tdstSpec\t\t\tinput:\tAn FSSpec record specifying destination directory\n\t\t\t\t\t\t\tof the copy.\n\tcopyName\t\tinput:\tPoints to the new directory name if the directory\n\t\t\t\t\t\t\tis to be renamed or nil if the directory isn't to\n\t\t\t\t\t\t\tbe renamed.\n\tcopyBufferPtr\tinput:\tPoints to a buffer of copyBufferSize that\n\t\t\t\t\t\t\tis used the i/o buffer for the copy or\n\t\t\t\t\t\t\tnil if you want DirectoryCopy to allocate its\n\t\t\t\t\t\t\town buffer in the application heap.\n\tcopyBufferSize\tinput:\tThe size of the buffer pointed to\n\t\t\t\t\t\t\tby copyBufferPtr.\n\tpreflight\t\tinput:\tIf true, FSpDirectoryCopy makes sure there are\n\t\t\t\t\t\t\tenough allocation blocks on the destination\n\t\t\t\t\t\t\tvolume to hold the directory's files before\n\t\t\t\t\t\t\tstarting the copy.\n\tcopyErrHandler\tinput:\tA pointer to the routine you want called if an\n\t\t\t\t\t\t\terror condition is detected during the copy, or\n\t\t\t\t\t\t\tnil if you don't want to handle error conditions.\n\t\t\t\t\t\t\tIf you don't handle error conditions, the first\n\t\t\t\t\t\t\terror will cause the copy to quit and\n\t\t\t\t\t\t\tDirectoryCopy will return the error.\n\t\t\t\t\t\t\tError handling is recommended...\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\treadErr\t\t\t\t19\t\tDriver does not respond to read requests\n\t\twritErr\t\t\t\t20\t\tDriver does not respond to write requests\n\t\tbadUnitErr\t\t\t21\t\tDriver reference number does not\n\t\t\t\t\t\t\t\t\tmatch unit table\n\t\tunitEmptyErr\t\t22\t\tDriver reference number specifies a\n\t\t\t\t\t\t\t\t\tnil handle in unit table\n\t\tabortErr\t\t\t27\t\tRequest aborted by KillIO\n\t\tnotOpenErr\t\t\t28\t\tDriver not open\n\t\tdskFulErr\t\t\t-34\t\tDestination volume is full\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\ttmfoErr\t\t\t\t-42\t\tToo many files open\n\t\tfnfErr\t\t\t\t-43\t\tSource file not found, or destination\n\t\t\t\t\t\t\t\t\tdirectory does not exist\n\t\twPrErr\t\t\t\t-44\t\tVolume locked by hardware\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t \t\t-46\t\tDestination volume is read-only\n\t\tfBsyErr\t \t\t\t-47\t\tThe source or destination file could\n\t\t\t\t\t\t\t\t\tnot be opened with the correct access\n\t\t\t\t\t\t\t\t\tmodes\n\t\tdupFNErr\t\t\t-48\t\tDestination file already exists\n\t\topWrErr\t\t\t\t-49\t\tFile already open for writing\n\t\tparamErr\t\t\t-50\t\tNo default volume or function not\n\t\t\t\t\t\t\t\t\tsupported by volume\n\t\tpermErr\t \t\t\t-54\t\tFile is already open and cannot be opened using specified deny modes\n\t\tmemFullErr\t\t\t-108\tCopy buffer could not be allocated\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\twrgVolTypErr\t\t-123\tFunction not supported by volume\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpDenyConflict\t\t-5006\tThe source or destination file could\n\t\t\t\t\t\t\t\t\tnot be opened with the correct access\n\t\t\t\t\t\t\t\t\tmodes\n\t\tafpObjectTypeErr\t-5025\tSource is a directory, directory not found\n\t\t\t\t\t\t\t\t\tor incomplete pathname\n\t\n\t__________\n\t\n\tAlso see:\tCopyErrProcPtr, DirectoryCopy, FilteredDirectoryCopy,\n\t\t\t\tFSpFilteredDirectoryCopy, FileCopy, FSpFileCopy\n*/\n\n/*****************************************************************************/\n\n#ifdef __cplusplus\n}\n#endif\n\n#include \"OptimizationEnd.h\"\n\n#endif\t/* __DIRECTORYCOPY__ */\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/MoreFiles 1.5/C Headers/FSpCompat.h",
    "content": "/*\n**\tApple Macintosh Developer Technical Support\n**\n**\tFSSpec compatibility functions.\n**\n**\tby Jim Luther, Apple Developer Technical Support Emeritus\n**\n**\tFile:\t\tFSpCompat.h\n**\n**\tCopyright  1992-1999 Apple Computer, Inc.\n**\tAll rights reserved.\n**\n**\tYou may incorporate this sample code into your applications without\n**\trestriction, though the sample code has been provided \"AS IS\" and the\n**\tresponsibility for its operation is 100% yours.  However, what you are\n**\tnot permitted to do is to redistribute the source as \"DSC Sample Code\"\n**\tafter having made changes. If you're going to re-distribute the source,\n**\twe require that you make it clear in the source that the code was\n**\tdescended from Apple Sample Code, but that you've made changes.\n*/\n\n#ifndef __FSPCOMPAT__\n#define __FSPCOMPAT__\n\n#if 0\n#include <Types.h>\n#include <Files.h>\n\n#include \"Optimization.h\"\n#endif 0\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSMakeFSSpecCompat(short vRefNum,\n\t\t\t\t\t\t\t\t   long dirID,\n\t\t\t\t\t\t\t\t   ConstStr255Param fileName,\n\t\t\t\t\t\t\t\t   FSSpec *spec);\n/*\t Initialize a FSSpec record.\n\tThe FSMakeFSSpecCompat function fills in the fields of an FSSpec record.\n\tIf the file system can't create the FSSpec, then the compatibility code\n\tcreates a FSSpec that is exactly like an FSSpec except that spec.name\n\tfor a file may not have the same capitalization as the file's catalog\n\tentry on the disk volume. That is because fileName is parsed to get the\n\tname instead of getting the name back from the file system. This works\n\tfine with System 6 where FSMakeSpec isn't available.\n\t\n\tvRefNum\t\tinput:\tVolume specification.\n\tdirID\t\tinput:\tDirectory ID.\n\tfileName\tinput:\tPointer to object name, or nil when dirID specifies\n\t\t\t\t\t\ta directory that's the object.\n\tspec\t\toutput:\tA file system specification to be filled in by\n\t\t\t\t\t\tFSMakeFSSpecCompat.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\t\n\t\tnsvErr\t\t\t\t-35\t\tVolume doesnt exist\t\n\t\tfnfErr\t\t\t\t-43\t\tFile or directory does not exist\n\t\t\t\t\t\t\t\t\t(FSSpec is still valid)\t\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpOpenDFCompat(const FSSpec *spec,\n\t\t\t\t\t\t\t\tchar permission,\n\t\t\t\t\t\t\t\tshort *refNum);\n/*\t Open a file's data fork.\n\tThe FSpOpenDFCompat function opens the data fork of the file specified\n\tby spec.\n\tDifferences from FSpOpenDF: If FSpOpenDF isn't available,\n\tFSpOpenDFCompat uses PHBOpen because System 6 doesn't support PBHOpenDF.\n\tThis means FSpOpenDFCompat could accidentally open a driver if the\n\tspec->name begins with a period.\n\t\n\tspec\t\tinput:\tAn FSSpec record specifying the file whose data\n\t\t\t\t\t\tfork is to be opened.\n\tpermission\tinput:\tA constant indicating the desired file access\n\t\t\t\t\t\tpermissions.\n\trefNum\t\toutput:\tA reference number of an access path to the file's\n\t\t\t\t\t\tdata fork.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\t\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\t\n\t\tioErr\t\t\t\t-36\t\tI/O error\t\n\t\tbdNamErr\t\t\t-37\t\tBad filename\t\n\t\ttmfoErr\t\t\t\t-42\t\tToo many files open\t\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\t\n\t\topWrErr\t\t\t\t-49\t\tFile already open for writing\t\n\t\tpermErr\t\t\t\t-54\t\tAttempt to open locked file for writing\t\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access to\n\t\t\t\t\t\t\t\t\tthe file\n\t\n\t__________\n\t\n\tSee also:\tFSpOpenAware\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpOpenRFCompat(const FSSpec *spec,\n\t\t\t\t\t\t\t\tchar permission,\n\t\t\t\t\t\t\t\tshort *refNum);\n/*\t Open a file's resource fork.\n\tThe FSpOpenRFCompat function opens the resource fork of the file\n\tspecified by spec.\n\t\n\tspec\t\tinput:\tAn FSSpec record specifying the file whose resource\n\t\t\t\t\t\tfork is to be opened.\n\tpermission\tinput:\tA constant indicating the desired file access\n\t\t\t\t\t\tpermissions.\n\trefNum\t\toutput:\tA reference number of an access path to the file's\n\t\t\t\t\t\tresource fork.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\t\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\t\n\t\tioErr\t\t\t\t-36\t\tI/O error\t\n\t\tbdNamErr\t\t\t-37\t\tBad filename\t\n\t\ttmfoErr\t\t\t\t-42\t\tToo many files open\t\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\t\n\t\topWrErr\t\t\t\t-49\t\tFile already open for writing\t\n\t\tpermErr\t\t\t\t-54\t\tAttempt to open locked file for writing\t\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access to\n\t\t\t\t\t\t\t\t\tthe file\n\t\n\t__________\n\t\n\tSee also:\tFSpOpenRFAware\n*/\n\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpCreateCompat(const FSSpec *spec,\n\t\t\t\t\t\t\t\tOSType creator,\n\t\t\t\t\t\t\t\tOSType fileType,\n\t\t\t\t\t\t\t\tScriptCode scriptTag);\n/*\t Create a new file.\n\tThe FSpCreateCompat function creates a new file with the specified\n\ttype, creator, and script code.\n\tDifferences from FSpCreate: FSpCreateCompat correctly sets the\n\tfdScript in the file's FXInfo record to scriptTag if the problem\n\tisn't fixed in the File Manager code.\n\t\n\tspec\t\tinput:\tAn FSSpec record specifying the file to create.\n\tcreator\t\tinput:\tThe creator of the new file.\n\tfileType\tinput\tThe file type of the new file.\n\tscriptCode\tinput:\tThe code of the script system in which the file\n\t\t\t\t\t\tname is to be displayed.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\t\n\t\tdirFulErr\t\t\t-33\t\tFile directory full\t\n\t\tdskFulErr\t\t\t-34\t\tDisk is full\t\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\t\n\t\tioErr\t\t\t\t-36\t\tI/O error\t\n\t\tbdNamErr\t\t\t-37\t\tBad filename\t\n\t\tfnfErr\t\t\t\t-43\t\tDirectory not found or incomplete pathname\t\n\t\twPrErr\t\t\t\t-44\t\tHardware volume lock\t\n\t\tvLckdErr\t\t\t-46\t\tSoftware volume lock\t\n\t\tdupFNErr\t\t\t-48\t\tDuplicate filename and version\t\n\t\tdirNFErrdirNFErr\t-120\tDirectory not found or incomplete pathname\t\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\t\n\t\tafpObjectTypeErr\t-5025\tA directory exists with that name\t\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpDirCreateCompat(const FSSpec *spec,\n\t\t\t\t\t\t\t\t   ScriptCode scriptTag,\n\t\t\t\t\t\t\t\t   long *createdDirID);\n/*\t Create a new directory.\n\tThe FSpDirCreateCompat function creates a new directory and returns the\n\tdirectory ID of the newDirectory.\n\t\n\tspec\t\t\tinput:\tAn FSSpec record specifying the directory to\n\t\t\t\t\t\t\tcreate.\n\tscriptCode\t\tinput:\tThe code of the script system in which the\n\t\t\t\t\t\t\tdirectory name is to be displayed.\n\tcreatedDirID\toutput:\tThe directory ID of the directory that was\n\t\t\t\t\t\t\tcreated.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\t\n\t\tdirFulErr\t\t\t-33\t\tFile directory full\t\n\t\tdskFulErr\t\t\t-34\t\tDisk is full\t\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\t\n\t\tioErr\t\t\t\t-36\t\tI/O error\t\n\t\tbdNamErr\t\t\t-37\t\tBad filename\t\n\t\tfnfErr\t\t\t\t-43\t\tDirectory not found or incomplete pathname\t\n\t\twPrErr\t\t\t\t-44\t\tHardware volume lock\t\n\t\tvLckdErr\t\t\t-46\t\tSoftware volume lock\t\n\t\tdupFNErr\t\t\t-48\t\tDuplicate filename and version\t\n\t\tdirNFErrdirNFErr\t-120\tDirectory not found or incomplete pathname\t\n\t\twrgVolTypErr\t\t-123\tNot an HFS volume\t\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\t\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpDeleteCompat(const FSSpec *spec);\n/*\t Delete a file or directory.\n\tThe FSpDeleteCompat function deletes a file or directory.\n\t\n\tspec\t\t\tinput:\tAn FSSpec record specifying the file or \n\t\t\t\t\t\t\tdirectory to delete.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\t\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\t\n\t\tioErr\t\t\t\t-36\t\tI/O error\t\n\t\tbdNamErr\t\t\t-37\t\tBad filename\t\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\t\n\t\twPrErr\t\t\t\t-44\t\tHardware volume lock\t\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\t\n\t\tvLckdErr\t\t\t-46\t\tSoftware volume lock\t\n\t\tfBsyErr\t\t\t\t-47\t\tFile busy, directory not empty, or\n\t\t\t\t\t\t\t\t\tworking directory control block open\t\n\t\tdirNFErrdirNFErr\t-120\tDirectory not found or incomplete pathname\t\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\t\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpGetFInfoCompat(const FSSpec *spec,\n\t\t\t\t\t\t\t\t  FInfo *fndrInfo);\n/*\t Get the finder information for a file.\n\tThe FSpGetFInfoCompat function gets the finder information for a file.\n\n\tspec\t\tinput:\tAn FSSpec record specifying the file.\n\tfndrInfo\toutput:\tIf the object is a file, then its FInfo.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\t\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\t\n\t\tioErr\t\t\t\t-36\t\tI/O error\t\n\t\tbdNamErr\t\t\t-37\t\tBad filename\t\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\t\n\t\tparamErr\t\t\t-50\t\tNo default volume\t\n\t\tdirNFErrdirNFErr\t-120\tDirectory not found or incomplete pathname\t\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\t\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\t\n\t\n\t__________\n\t\n\tAlso see:\tFSpGetDInfo\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpSetFInfoCompat(const FSSpec *spec,\n\t\t\t\t\t\t\t\t  const FInfo *fndrInfo);\n/*\t Set the finder information for a file.\n\tThe FSpSetFInfoCompat function sets the finder information for a file.\n\n\tspec\t\tinput:\tAn FSSpec record specifying the file.\n\tfndrInfo\tinput:\tThe FInfo.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\t\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\t\n\t\tioErr\t\t\t\t-36\t\tI/O error\t\n\t\tbdNamErr\t\t\t-37\t\tBad filename\t\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\t\n\t\twPrErr\t\t\t\t-44\t\tHardware volume lock\t\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\t\n\t\tvLckdErr\t\t\t-46\t\tSoftware volume lock\t\n\t\tdirNFErrdirNFErr\t-120\tDirectory not found or incomplete pathname\t\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\t\n\t\tafpObjectTypeErr\t-5025\tObject was a directory\t\n\t\n\t__________\n\t\n\tAlso see:\tFSpSetDInfo\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpSetFLockCompat(const FSSpec *spec);\n/*\t Lock a file.\n\tThe FSpSetFLockCompat function locks a file.\n\n\tspec\t\tinput:\tAn FSSpec record specifying the file.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\t\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\t\n\t\tioErr\t\t\t\t-36\t\tI/O error\t\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\t\n\t\twPrErr\t\t\t\t-44\t\tHardware volume lock\t\n\t\tvLckdErr\t\t\t-46\t\tSoftware volume lock\t\n\t\tdirNFErrdirNFErr\t-120\tDirectory not found or incomplete pathname\t\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access to\n\t\t\t\t\t\t\t\t\tthe file\t\n\t\tafpObjectTypeErr\t-5025\tFolder locking not supported by volume\t\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpRstFLockCompat(const FSSpec *spec);\n/*\t Unlock a file.\n\tThe FSpRstFLockCompat function unlocks a file.\n\n\tspec\t\tinput:\tAn FSSpec record specifying the file.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\t\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\t\n\t\tioErr\t\t\t\t-36\t\tI/O error\t\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\t\n\t\twPrErr\t\t\t\t-44\t\tHardware volume lock\t\n\t\tvLckdErr\t\t\t-46\t\tSoftware volume lock\t\n\t\tdirNFErrdirNFErr\t-120\tDirectory not found or incomplete pathname\t\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access to\n\t\t\t\t\t\t\t\t\tthe file\t\n\t\tafpObjectTypeErr\t-5025\tFolder locking not supported by volume\t\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpRenameCompat(const FSSpec *spec,\n\t\t\t\t\t\t\t\tConstStr255Param newName);\n/*\t Rename a file or directory.\n\tThe FSpRenameCompat function renames a file or directory.\n\n\tspec\t\tinput:\tAn FSSpec record specifying the file.\n\tnewName\t\tinput:\tThe new name of the file or directory.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\t\n\t\tdirFulErr\t\t\t-33\t\tFile directory full\t\n\t\tdskFulErr\t\t\t-34\t\tVolume is full\t\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\t\n\t\tioErr\t\t\t\t-36\t\tI/O error\t\n\t\tbdNamErr\t\t\t-37\t\tBad filename\t\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\t\n\t\twPrErr\t\t\t\t-44\t\tHardware volume lock\t\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\t\n\t\tvLckdErr\t\t\t-46\t\tSoftware volume lock\t\n\t\tdupFNErr\t\t\t-48\t\tDuplicate filename and version\t\n\t\tparamErr\t\t\t-50\t\tNo default volume\t\n\t\tfsRnErr\t\t\t\t-59\t\tProblem during rename\t\n\t\tdirNFErrdirNFErr\t-120\tDirectory not found or incomplete pathname\t\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access to\n\t\t\t\t\t\t\t\t\tthe file\t\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpCatMoveCompat(const FSSpec *source,\n\t\t\t\t\t\t\t\t const FSSpec *dest);\n/*\t Move a file or directory to a different location on on the same volume.\n\tThe FSpCatMoveCompat function moves a file or directory to a different\n\tlocation on on the same volume.\n\n\tsource\t\tinput:\tAn FSSpec record specifying the file or directory.\n\tdest\t\tinput:\tAn FSSpec record specifying the name and location\n\t\t\t\t\t\tof the directory into which the source file or\n\t\t\t\t\t\tdirectory is to be moved.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\t\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\t\n\t\tioErr\t\t\t\t-36\t\tI/O error\t\n\t\tbdNamErr\t\t\t-37\t\tBad filename or attempt to move into\n\t\t\t\t\t\t\t\t\ta file\t\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\t\n\t\twPrErr\t\t\t\t-44\t\tHardware volume lock\t\n\t\tfLckdErr\t\t\t-45\t\tTarget directory is locked\t\n\t\tvLckdErr\t\t\t-46\t\tSoftware volume lock\t\n\t\tdupFNErr\t\t\t-48\t\tDuplicate filename and version\t\n\t\tparamErr\t\t\t-50\t\tNo default volume\t\n\t\tbadMovErr\t\t\t-122\tAttempt to move into offspring\t\n\t\twrgVolTypErr\t\t-123\tNot an HFS volume\t\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access to\n\t\t\t\t\t\t\t\t\tthe file\t\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpExchangeFilesCompat(const FSSpec *source,\n\t\t\t\t\t\t\t\t\t   const FSSpec *dest);\n/*\t Exchange the data stored in two files on the same volume.\n\tThe FSpExchangeFilesCompat function swaps the data in two files by\n\tchanging the information in the volume's catalog and, if the files\n\tare open, in the file control blocks.\n\tDifferences from FSpExchangeFiles: Correctly exchanges files on volumes\n\tthat don't support PBExchangeFiles. FSpExchangeFiles attempts to support\n\tvolumes that don't support PBExchangeFiles, but in System 7, 7.0.1, 7.1,\n\tand 7 Pro, the compatibility code just doesn't work on volumes that\n\tdon't support PBExchangeFiles (even though you may get a noErr result).\n\tSystem Update 3.0 and System 7.5 and later have the problems in\n\tFSpExchangeFiles corrected.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\t\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\t\n\t\tioErr\t\t\t\t-36\t\tI/O error\t\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\t\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\t\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\t\n\t\tparamErr\t\t\t-50\t\tFunction not supported by volume\t\n\t\tvolOfflinErr\t\t-53\t\tVolume is offline\t\n\t\twrgVolTypErr\t\t-123\tNot an HFS volume\t\n\t\tdiffVolErr\t\t\t-1303\tFiles on different volumes\t\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\t\n\t\tafpObjectTypeErr\t-5025\tObject is a directory, not a file\t\n\t\tafpSameObjectErr\t-5038\tSource and destination files are the same\t\n*/\n\n/*****************************************************************************/\n\npascal\tshort\tFSpOpenResFileCompat(const FSSpec *spec,\n\t\t\t\t\t\t\t\t\t SignedByte permission);\n/*\t Open a file's resource file.\n\tThe FSpOpenResFileCompat function opens the resource file specified\n\tby spec.\n\t\n\tspec\t\t\tinput:\tAn FSSpec record specifying the file whose\n\t\t\t\t\t\t\tresource file is to be opened.\n\tpermission\t\tinput:\tA constant indicating the desired file access\n\t\t\t\t\t\t\tpermissions.\n\tfunction result\toutput:\tA resource file reference number, or if there's\n\t\t\t\t\t\t\tan error -1.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t35\t\tNo such volume\n\t\tioErr\t\t\t\t36\t\tI/O error\n\t\tbdNamErr\t\t\t37\t\tBad filename or volume name (perhaps zero\n\t\t\t\t\t\t\t\t\tlength)\n\t\teofErr\t\t\t\t39\t\tEnd of file\n\t\ttmfoErr\t\t\t\t42\t\tToo many files open\n\t\tfnfErr\t\t\t\t43\t\tFile not found\n\t\topWrErr\t\t\t\t49\t\tFile already open with write permission\n\t\tpermErr\t\t\t\t54\t\tPermissions error (on file open)\n\t\textFSErr\t\t\t58\t\tVolume belongs to an external file system\n\t\tmemFullErr\t\t\t108\tNot enough room in heap zone\n\t\tdirNFErr\t\t\t120\tDirectory not found\n\t\tmapReadErr\t\t\t199\tMap inconsistent with operation\n*/\n\n/*****************************************************************************/\n\npascal\tvoid\tFSpCreateResFileCompat(const FSSpec *spec,\n\t\t\t\t\t\t\t\t\t   OSType creator,\n\t\t\t\t\t\t\t\t\t   OSType fileType,\n\t\t\t\t\t\t\t\t\t   ScriptCode scriptTag);\n/*\t Create a resource file.\n\tThe FSpCreateResFileCompat function creates a new resource file with\n\tthe specified type, creator, and script code.\n\tDifferences from FSpCreateResFile: FSpCreateResFileCompat correctly\n\tsets the fdScript in the file's FXInfo record to scriptTag if the\n\tproblem isn't fixed in the File Manager code.\n\t\n\tspec\t\tinput:\tAn FSSpec record specifying the resource file to create.\n\tcreator\t\tinput:\tThe creator of the new file.\n\tfileType\tinput\tThe file type of the new file.\n\tscriptCode\tinput:\tThe code of the script system in which the file\n\t\t\t\t\t\tname is to be displayed.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tdirFulErr\t\t\t33\t\tDirectory full\n\t\tdskFulErr\t\t\t34\t\tDisk full\n\t\tnsvErr\t\t\t\t35\t\tNo such volume\n\t\tioErr\t\t\t\t36\t\tI/O error\n\t\tbdNamErr\t\t\t37\t\tBad filename or volume name (perhaps zero\n\t\t\t\t\t\t\t\t\tlength)\n\t\ttmfoErr\t\t\t\t42\t\tToo many files open\n\t\twPrErrw\t\t\t\t44\t\tDisk is write-protected\n\t\tfLckdErr\t\t\t45\t\tFile is locked\n*/\n\n/*****************************************************************************/\n\n#ifdef __cplusplus\n}\n#endif\n\n#include \"OptimizationEnd.h\"\n\n#endif\t/* __FSPCOMPAT__ */\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/MoreFiles 1.5/C Headers/FileCopy.h",
    "content": "/*\n**\tApple Macintosh Developer Technical Support\n**\n**\tFileCopy: A robust, general purpose file copy routine.\n**\n**\tby Jim Luther, Apple Developer Technical Support Emeritus\n**\n**\tFile:\t\tFileCopy.h\n**\n**\tCopyright  1992-1999 Apple Computer, Inc.\n**\tAll rights reserved.\n**\n**\tYou may incorporate this sample code into your applications without\n**\trestriction, though the sample code has been provided \"AS IS\" and the\n**\tresponsibility for its operation is 100% yours.  However, what you are\n**\tnot permitted to do is to redistribute the source as \"DSC Sample Code\"\n**\tafter having made changes. If you're going to re-distribute the source,\n**\twe require that you make it clear in the source that the code was\n**\tdescended from Apple Sample Code, but that you've made changes.\n*/\n\n#ifndef __FILECOPY__\n#define __FILECOPY__\n\n#include <Types.h>\n#include <Files.h>\n\n#include \"Optimization.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*****************************************************************************/\n\npascal\tOSErr\tFileCopy(short srcVRefNum,\n\t\t\t\t\t\t long srcDirID,\n\t\t\t\t\t\t ConstStr255Param srcName,\n\t\t\t\t\t\t short dstVRefNum,\n\t\t\t\t\t\t long dstDirID,\n\t\t\t\t\t\t ConstStr255Param dstPathname,\n\t\t\t\t\t\t ConstStr255Param copyName,\n\t\t\t\t\t\t void *copyBufferPtr,\n\t\t\t\t\t\t long copyBufferSize,\n\t\t\t\t\t\t Boolean preflight);\n/*\t Duplicate a file and optionally rename it.\n\tThe FileCopy function duplicates a file and optionally renames it.\n\tSince the PBHCopyFile routine is only available on some\n\tAFP server volumes under specific conditions, this routine\n\teither uses PBHCopyFile, or does all of the work PBHCopyFile\n\tdoes.  The srcVRefNum, srcDirID and srcName are used to\n\tdetermine the location of the file to copy.  The dstVRefNum\n\tdstDirID and dstPathname are used to determine the location of\n\tthe destination directory.  If copyName <> NIL, then it points\n\tto the name of the new file.  If copyBufferPtr <> NIL, it\n\tpoints to a buffer of copyBufferSize that is used to copy\n\tthe file's data.  The larger the supplied buffer, the\n\tfaster the copy.  If copyBufferPtr = NIL, then this routine\n\tallocates a buffer in the application heap. If you pass a\n\tcopy buffer to this routine, make its size a multiple of 512\n\t($200) bytes for optimum performance.\n\t\n\tsrcVRefNum\t\tinput:\tSource volume specification.\n\tsrcDirID\t\tinput:\tSource directory ID.\n\tsrcName\t\t\tinput:\tSource file name.\n\tdstVRefNum\t\tinput:\tDestination volume specification.\n\tdstDirID\t\tinput:\tDestination directory ID.\n\tdstPathname\t\tinput:\tPointer to destination directory name, or\n\t\t\t\t\t\t\tnil when dstDirID specifies a directory.\n\tcopyName\t\tinput:\tPoints to the new file name if the file is\n\t\t\t\t\t\t\tto be renamed or nil if the file isn't to\n\t\t\t\t\t\t\tbe renamed.\n\tcopyBufferPtr\tinput:\tPoints to a buffer of copyBufferSize that\n\t\t\t\t\t\t\tis used the i/o buffer for the copy or\n\t\t\t\t\t\t\tnil if you want FileCopy to allocate its\n\t\t\t\t\t\t\town buffer in the application heap.\n\tcopyBufferSize\tinput:\tThe size of the buffer pointed to\n\t\t\t\t\t\t\tby copyBufferPtr.\n\tpreflight\t\tinput:\tIf true, FileCopy makes sure there are enough\n\t\t\t\t\t\t\tallocation blocks on the destination volume to\n\t\t\t\t\t\t\thold both the data and resource forks before\n\t\t\t\t\t\t\tstarting the copy.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\treadErr\t\t\t\t19\t\tDriver does not respond to read requests\n\t\twritErr\t\t\t\t20\t\tDriver does not respond to write requests\n\t\tbadUnitErr\t\t\t21\t\tDriver reference number does not\n\t\t\t\t\t\t\t\t\tmatch unit table\n\t\tunitEmptyErr\t\t22\t\tDriver reference number specifies a\n\t\t\t\t\t\t\t\t\tnil handle in unit table\n\t\tabortErr\t\t\t27\t\tRequest aborted by KillIO\n\t\tnotOpenErr\t\t\t28\t\tDriver not open\n\t\tdskFulErr\t\t\t-34\t\tDestination volume is full\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\ttmfoErr\t\t\t\t-42\t\tToo many files open\n\t\tfnfErr\t\t\t\t-43\t\tSource file not found, or destination\n\t\t\t\t\t\t\t\t\tdirectory does not exist\n\t\twPrErr\t\t\t\t-44\t\tVolume locked by hardware\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t \t\t-46\t\tDestination volume is read-only\n\t\tfBsyErr\t \t\t\t-47\t\tThe source or destination file could\n\t\t\t\t\t\t\t\t\tnot be opened with the correct access\n\t\t\t\t\t\t\t\t\tmodes\n\t\tdupFNErr\t\t\t-48\t\tDestination file already exists\n\t\topWrErr\t\t\t\t-49\t\tFile already open for writing\n\t\tparamErr\t\t\t-50\t\tNo default volume or function not\n\t\t\t\t\t\t\t\t\tsupported by volume\n\t\tpermErr\t \t\t\t-54\t\tFile is already open and cannot be opened using specified deny modes\n\t\tmemFullErr\t\t\t-108\tCopy buffer could not be allocated\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\twrgVolTypErr\t\t-123\tFunction not supported by volume\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpDenyConflict\t\t-5006\tThe source or destination file could\n\t\t\t\t\t\t\t\t\tnot be opened with the correct access\n\t\t\t\t\t\t\t\t\tmodes\n\t\tafpObjectTypeErr\t-5025\tSource is a directory, directory not found\n\t\t\t\t\t\t\t\t\tor incomplete pathname\n\t\n\t__________\n\t\n\tAlso see:\tFSpFileCopy, DirectoryCopy, FSpDirectoryCopy\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpFileCopy(const FSSpec *srcSpec,\n\t\t\t\t\t\t\tconst FSSpec *dstSpec,\n\t\t\t\t\t\t\tConstStr255Param copyName,\n\t\t\t\t\t\t\tvoid *copyBufferPtr,\n\t\t\t\t\t\t\tlong copyBufferSize,\n\t\t\t\t\t\t\tBoolean preflight);\n/*\t Duplicate a file and optionally rename it.\n\tThe FSpFileCopy function duplicates a file and optionally renames it.\n\tSince the PBHCopyFile routine is only available on some\n\tAFP server volumes under specific conditions, this routine\n\teither uses PBHCopyFile, or does all of the work PBHCopyFile\n\tdoes.  The srcSpec is used to\n\tdetermine the location of the file to copy.  The dstSpec is\n\tused to determine the location of the\n\tdestination directory.  If copyName <> NIL, then it points\n\tto the name of the new file.  If copyBufferPtr <> NIL, it\n\tpoints to a buffer of copyBufferSize that is used to copy\n\tthe file's data.  The larger the supplied buffer, the\n\tfaster the copy.  If copyBufferPtr = NIL, then this routine\n\tallocates a buffer in the application heap. If you pass a\n\tcopy buffer to this routine, make its size a multiple of 512\n\t($200) bytes for optimum performance.\n\t\n\tsrcSpec\t\t\tinput:\tAn FSSpec record specifying the source file.\n\tdstSpec\t\t\tinput:\tAn FSSpec record specifying the destination\n\t\t\t\t\t\t\tdirectory.\n\tcopyName\t\tinput:\tPoints to the new file name if the file is\n\t\t\t\t\t\t\tto be renamed or nil if the file isn't to\n\t\t\t\t\t\t\tbe renamed.\n\tcopyBufferPtr\tinput:\tPoints to a buffer of copyBufferSize that\n\t\t\t\t\t\t\tis used the i/o buffer for the copy or\n\t\t\t\t\t\t\tnil if you want FileCopy to allocate its\n\t\t\t\t\t\t\town buffer in the application heap.\n\tcopyBufferSize\tinput:\tThe size of the buffer pointed to\n\t\t\t\t\t\t\tby copyBufferPtr.\n\tpreflight\t\tinput:\tIf true, FSpFileCopy makes sure there are\n\t\t\t\t\t\t\tenough allocation blocks on the destination\n\t\t\t\t\t\t\tvolume to hold both the data and resource forks\n\t\t\t\t\t\t\tbefore starting the copy.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\treadErr\t\t\t\t19\t\tDriver does not respond to read requests\n\t\twritErr\t\t\t\t20\t\tDriver does not respond to write requests\n\t\tbadUnitErr\t\t\t21\t\tDriver reference number does not\n\t\t\t\t\t\t\t\t\tmatch unit table\n\t\tunitEmptyErr\t\t22\t\tDriver reference number specifies a\n\t\t\t\t\t\t\t\t\tnil handle in unit table\n\t\tabortErr\t\t\t27\t\tRequest aborted by KillIO\n\t\tnotOpenErr\t\t\t28\t\tDriver not open\n\t\tdskFulErr\t\t\t-34\t\tDestination volume is full\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\ttmfoErr\t\t\t\t-42\t\tToo many files open\n\t\tfnfErr\t\t\t\t-43\t\tSource file not found, or destination\n\t\t\t\t\t\t\t\t\tdirectory does not exist\n\t\twPrErr\t\t\t\t-44\t\tVolume locked by hardware\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t \t\t-46\t\tDestination volume is read-only\n\t\tfBsyErr\t \t\t\t-47\t\tThe source or destination file could\n\t\t\t\t\t\t\t\t\tnot be opened with the correct access\n\t\t\t\t\t\t\t\t\tmodes\n\t\tdupFNErr\t\t\t-48\t\tDestination file already exists\n\t\topWrErr\t\t\t\t-49\t\tFile already open for writing\n\t\tparamErr\t\t\t-50\t\tNo default volume or function not\n\t\t\t\t\t\t\t\t\tsupported by volume\n\t\tpermErr\t \t\t\t-54\t\tFile is already open and cannot be opened using specified deny modes\n\t\tmemFullErr\t\t\t-108\tCopy buffer could not be allocated\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\twrgVolTypErr\t\t-123\tFunction not supported by volume\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpDenyConflict\t\t-5006\tThe source or destination file could\n\t\t\t\t\t\t\t\t\tnot be opened with the correct access\n\t\t\t\t\t\t\t\t\tmodes\n\t\tafpObjectTypeErr\t-5025\tSource is a directory, directory not found\n\t\t\t\t\t\t\t\t\tor incomplete pathname\n\t\n\t__________\n\t\n\tAlso see:\tFileCopy, DirectoryCopy, FSpDirectoryCopy\n*/\n\n/*****************************************************************************/\n\n#ifdef __cplusplus\n}\n#endif\n\n#include \"OptimizationEnd.h\"\n\n#endif\t/* __FILECOPY__ */\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/MoreFiles 1.5/C Headers/FullPath.h",
    "content": "/*\n**\tApple Macintosh Developer Technical Support\n**\n**\tRoutines for dealing with full pathnames... if you really must.\n**\n**\tby Jim Luther, Apple Developer Technical Support Emeritus\n**\n**\tFile:\t\tFullPath.h\n**\n**\tCopyright  1995-1999 Apple Computer, Inc.\n**\tAll rights reserved.\n**\n**\tYou may incorporate this sample code into your applications without\n**\trestriction, though the sample code has been provided \"AS IS\" and the\n**\tresponsibility for its operation is 100% yours.  However, what you are\n**\tnot permitted to do is to redistribute the source as \"DSC Sample Code\"\n**\tafter having made changes. If you're going to re-distribute the source,\n**\twe require that you make it clear in the source that the code was\n**\tdescended from Apple Sample Code, but that you've made changes.\n*/\n\n#ifndef __FULLPATH__\n#define __FULLPATH__\n\n#if 0\n#include <Types.h>\n#include <Files.h>\n\n#include \"Optimization.h\"\n#endif 0\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*\n\tIMPORTANT NOTE:\n\t\n\tThe use of full pathnames is strongly discouraged. Full pathnames are\n\tparticularly unreliable as a means of identifying files, directories\n\tor volumes within your application, for two primary reasons:\n\t\n\t \tThe user can change the name of any element in the path at\n\t\tvirtually any time.\n\t\tVolume names on the Macintosh are *not* unique. Multiple\n\t\tmounted volumes can have the same name. For this reason, the use of\n\t\ta full pathname to identify a specific volume may not produce the\n\t\tresults you expect. If more than one volume has the same name and\n\t\ta full pathname is used, the File Manager currently uses the first\n\t\tmounted volume it finds with a matching name in the volume queue.\n\t\n\tIn general, you should use a files name, parent directory ID, and\n\tvolume reference number to identify a file you want to open, delete,\n\tor otherwise manipulate.\n\t\n\tIf you need to remember the location of a particular file across\n\tsubsequent system boots, use the Alias Manager to create an alias\n\trecord describing the file. If the Alias Manager is not available, you\n\tcan save the files name, its parent directory ID, and the name of the\n\tvolume on which its located. Although none of these methods is\n\tfoolproof, they are much more reliable than using full pathnames to\n\tidentify files.\n\t\n\tNonetheless, it is sometimes useful to display a files full pathname\n\tto the user. For example, a backup utility might display a list of full\n\tpathnames of files as it copies them onto the backup medium. Or, a\n\tutility might want to display a dialog box showing the full pathname of\n\ta file when it needs the users confirmation to delete the file. No\n\tmatter how unreliable full pathnames may be from a file-specification\n\tviewpoint, users understand them more readily than volume reference\n\tnumbers or directory IDs. (Hint: Use the TruncString function from\n\tTextUtils.h with truncMiddle as the truncWhere argument to shorten\n\tfull pathnames to a displayable length.)\n\t\n\tThe following technique for constructing the full pathname of a file is\n\tintended for display purposes only. Applications that depend on any\n\tparticular structure of a full pathname are likely to fail on alternate\n\tforeign file systems or under future system software versions.\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetFullPath(short vRefNum,\n\t\t\t\t\t\t\tlong dirID,\n\t\t\t\t\t\t\tConstStr255Param name,\n\t\t\t\t\t\t\tshort *fullPathLength,\n\t\t\t\t\t\t\tHandle *fullPath);\n/*\t Get a full pathname to a volume, directory or file.\n\tThe GetFullPath function builds a full pathname to the specified\n\tobject. The full pathname is returned in the newly created handle\n\tfullPath and the length of the full pathname is returned in\n\tfullPathLength. Your program is responsible for disposing of the\n\tfullPath handle.\n\t\n\tNote that a full pathname can be made to a file/directory that does not\n\tyet exist if all directories up to that file/directory exist. In this case,\n\tGetFullPath will return a fnfErr.\n\t\n\tvRefNum\t\t\tinput:\tVolume specification.\n\tdirID\t\t\tinput:\tDirectory ID.\n\tname\t\t\tinput:\tPointer to object name, or nil when dirID\n\t\t\t\t\t\t\tspecifies a directory that's the object.\n\tfullPathLength\toutput:\tThe number of characters in the full pathname.\n\t\t\t\t\t\t\tIf the function fails to create a full\n\t\t\t\t\t\t\tpathname, it sets fullPathLength to 0.\n\tfullPath\t\toutput:\tA handle to the newly created full pathname\n\t\t\t\t\t\t\tbuffer. If the function fails to create a\n\t\t\t\t\t\t\tfull pathname, it sets fullPath to NULL.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\t\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile or directory does not exist (fullPath\n\t\t\t\t\t\t\t\t\tand fullPathLength are still valid)\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tmemFullErr\t\t\t-108\tNot enough memory\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tSee also:\tFSpGetFullPath\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpGetFullPath(const FSSpec *spec,\n\t\t\t\t\t\t\t   short *fullPathLength,\n\t\t\t\t\t\t\t   Handle *fullPath);\n/*\t Get a full pathname to a volume, directory or file.\n\tThe GetFullPath function builds a full pathname to the specified\n\tobject. The full pathname is returned in the newly created handle\n\tfullPath and the length of the full pathname is returned in\n\tfullPathLength. Your program is responsible for disposing of the\n\tfullPath handle.\n\t\n\tNote that a full pathname can be made to a file/directory that does not\n\tyet exist if all directories up to that file/directory exist. In this case,\n\tFSpGetFullPath will return a fnfErr.\n\t\n\tspec\t\t\tinput:\tAn FSSpec record specifying the object.\n\tfullPathLength\toutput:\tThe number of characters in the full pathname.\n\t\t\t\t\t\t\tIf the function fails to create a full pathname,\n\t\t\t\t\t\t\tit sets fullPathLength to 0.\n\tfullPath\t\toutput:\tA handle to the newly created full pathname\n\t\t\t\t\t\t\tbuffer. If the function fails to create a\n\t\t\t\t\t\t\tfull pathname, it sets fullPath to NULL.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\t\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile or directory does not exist (fullPath\n\t\t\t\t\t\t\t\t\tand fullPathLength are still valid)\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tmemFullErr\t\t\t-108\tNot enough memory\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tSee also:\tGetFullPath\n*/\n\n/*****************************************************************************/\n\npascal OSErr FSpLocationFromFullPath(short fullPathLength,\n\t\t\t\t\t\t\t\t\t const void *fullPath,\n\t\t\t\t\t\t\t\t\t FSSpec *spec);\n/*\t Get a FSSpec from a full pathname.\n\tThe FSpLocationFromFullPath function returns a FSSpec to the object\n\tspecified by full pathname. This function requires the Alias Manager.\n\t\n\tfullPathLength\tinput:\tThe number of characters in the full pathname\n\t\t\t\t\t\t\tof the target.\n\tfullPath\t\tinput:\tA pointer to a buffer that contains the full\n\t\t\t\t\t\t\tpathname of the target. The full pathname\n\t\t\t\t\t\t\tstarts with the name of the volume, includes\n\t\t\t\t\t\t\tall of the directory names in the path to the\n\t\t\t\t\t\t\ttarget, and ends with the target name.\n\tspec\t\t\toutput:\tAn FSSpec record specifying the object.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tThe volume is not mounted\n\t\tfnfErr\t\t\t\t-43\t\tTarget not found, but volume and parent\n\t\t\t\t\t\t\t\t\tdirectory found\n\t\tparamErr\t\t\t-50\t\tParameter error\n\t\tusrCanceledErr\t\t-128\tThe user canceled the operation\n\t\n\t__________\n\t\n\tSee also:\tLocationFromFullPath\n*/\n\n/*****************************************************************************/\n\npascal OSErr LocationFromFullPath(short fullPathLength,\n\t\t\t\t\t\t\t\t  const void *fullPath,\n\t\t\t\t\t\t\t\t  short *vRefNum,\n\t\t\t\t\t\t\t\t  long *parID,\n\t\t\t\t\t\t\t\t  Str31 name);\n/*\t Get an object's location from a full pathname.\n\tThe LocationFromFullPath function returns the volume reference number,\n\tparent directory ID and name of the object specified by full pathname.\n\tThis function requires the Alias Manager.\n\t\n\tfullPathLength\tinput:\tThe number of characters in the full pathname\n\t\t\t\t\t\t\tof the target.\n\tfullPath\t\tinput:\tA pointer to a buffer that contains the full\n\t\t\t\t\t\t\tpathname of the target. The full pathname starts\n\t\t\t\t\t\t\twith the name of the volume, includes all of\n\t\t\t\t\t\t\tthe directory names in the path to the target,\n\t\t\t\t\t\t\tand ends with the target name.\n\tvRefNum\t\t\toutput:\tThe volume reference number.\n\tparID\t\t\toutput:\tThe parent directory ID of the specified object.\n\tname\t\t\toutput:\tThe name of the specified object.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tThe volume is not mounted\n\t\tfnfErr\t\t\t\t-43\t\tTarget not found, but volume and parent\n\t\t\t\t\t\t\t\t\tdirectory found\n\t\tparamErr\t\t\t-50\t\tParameter error\n\t\tusrCanceledErr\t\t-128\tThe user canceled the operation\n\t\n\t__________\n\t\n\tSee also:\tFSpLocationFromFullPath\n*/\n\n/*****************************************************************************/\n\n#ifdef __cplusplus\n}\n#endif\n\n#include \"OptimizationEnd.h\"\n\n#endif\t/* __FULLPATH__ */"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/MoreFiles 1.5/C Headers/IterateDirectory.h",
    "content": "/*\n**\tIterateDirectory: File Manager directory iterator routines.\n**\n**\tby Jim Luther\n**\n**\tFile:\t\tIterateDirectory.h\n**\n**\tCopyright  1995-1999 Jim Luther and Apple Computer, Inc.\n**\tAll rights reserved.\n**\n**\tYou may incorporate this sample code into your applications without\n**\trestriction, though the sample code has been provided \"AS IS\" and the\n**\tresponsibility for its operation is 100% yours.\n**\n**\tIterateDirectory is designed to drop into the MoreFiles sample code\n**\tlibrary I wrote while in Apple Developer Technical Support\n*/\n\n#ifndef __ITERATEDIRECTORY__\n#define __ITERATEDIRECTORY__\n\n#include <Types.h>\n#include <Files.h>\n\n#include \"Optimization.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*****************************************************************************/\n\ntypedef\tpascal\tvoid (*IterateFilterProcPtr) (const CInfoPBRec * const cpbPtr,\n\t\t\t\t\t\t\t\t\t\t\t  Boolean *quitFlag,\n\t\t\t\t\t\t\t\t\t\t\t  void *yourDataPtr);\n/*\t Prototype for the IterateFilterProc function IterateDirectory calls.\n\tThis is the prototype for the IterateFilterProc function which is\n\tcalled once for each file and directory found by IterateDirectory. The\n\tIterateFilterProc gets a pointer to the CInfoPBRec that IterateDirectory\n\tused to call PBGetCatInfo. The IterateFilterProc can use the read-only\n\tdata in the CInfoPBRec for whatever it wants.\n\t\n\tIf the IterateFilterProc wants to stop IterateDirectory, it can set\n\tquitFlag to true (quitFlag will be passed to the IterateFilterProc\n\tfalse).\n\t\n\tThe yourDataPtr parameter can point to whatever data structure you might\n\twant to access from within the IterateFilterProc.\n\n\tcpbPtr\t\tinput:\tA pointer to the CInfoPBRec that IterateDirectory\n\t\t\t\t\t\tused to call PBGetCatInfo. The CInfoPBRec and the\n\t\t\t\t\t\tdata it points to must not be changed by your\n\t\t\t\t\t\tIterateFilterProc.\n\tquitFlag\toutput:\tYour IterateFilterProc can set quitFlag to true\n\t\t\t\t\t\tif it wants to stop IterateDirectory.\n\tyourDataPtr\tinput:\tA pointer to whatever data structure you might\n\t\t\t\t\t\twant to access from within the IterateFilterProc.\n\t\n\t__________\n\t\n\tAlso see:\tIterateDirectory, FSpIterateDirectory\n*/\n\n#define CallIterateFilterProc(userRoutine, cpbPtr, quitFlag, yourDataPtr) \\\n\t\t(*(userRoutine))((cpbPtr), (quitFlag), (yourDataPtr))\n\n/*****************************************************************************/\n\npascal\tOSErr\tIterateDirectory(short vRefNum,\n\t\t\t\t\t\t\t\t long dirID,\n\t\t\t\t\t\t\t\t ConstStr255Param name,\n\t\t\t\t\t\t\t\t unsigned short maxLevels,\n\t\t\t\t\t\t\t\t IterateFilterProcPtr iterateFilter,\n\t\t\t\t\t\t\t\t void *yourDataPtr);\n/*\t Iterate (scan) through a directory's content.\n\tThe IterateDirectory function performs a recursive iteration (scan) of\n\tthe specified directory and calls your IterateFilterProc function once\n\tfor each file and directory found.\n\t\n\tThe maxLevels parameter lets you control how deep the recursion goes.\n\tIf maxLevels is 1, IterateDirectory only scans the specified directory;\n\tif maxLevels is 2, IterateDirectory scans the specified directory and\n\tone subdirectory below the specified directory; etc. Set maxLevels to\n\tzero to scan all levels.\n\t\n\tThe yourDataPtr parameter can point to whatever data structure you might\n\twant to access from within the IterateFilterProc.\n\n\tvRefNum\t\t\tinput:\tVolume specification.\n\tdirID\t\t\tinput:\tDirectory ID.\n\tname\t\t\tinput:\tPointer to object name, or nil when dirID\n\t\t\t\t\t\t\tspecifies a directory that's the object.\n\tmaxLevels\t\tinput:\tMaximum number of directory levels to scan or\n\t\t\t\t\t\t\tzero to scan all directory levels.\n\titerateFilter\tinput:\tA pointer to the routine you want called once\n\t\t\t\t\t\t\tfor each file and directory found by\n\t\t\t\t\t\t\tIterateDirectory.\n\tyourDataPtr\t\tinput:\tA pointer to whatever data structure you might\n\t\t\t\t\t\t\twant to access from within the IterateFilterProc.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tparamErr\t\t\t-50\t\tNo default volume or iterateFilter was NULL\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\t\t\t\t\t\t\t\tor a file was passed instead of a directory\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\t\n\t__________\n\t\n\tSee also:\tIterateFilterProcPtr, FSpIterateDirectory\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpIterateDirectory(const FSSpec *spec,\n\t\t\t\t\t\t\t\t\tunsigned short maxLevels,\n\t\t\t\t\t\t\t\t\tIterateFilterProcPtr iterateFilter,\n\t\t\t\t\t\t\t\t\tvoid *yourDataPtr);\n/*\t Iterate (scan) through a directory's content.\n\tThe FSpIterateDirectory function performs a recursive iteration (scan)\n\tof the specified directory and calls your IterateFilterProc function once\n\tfor each file and directory found.\n\t\n\tThe maxLevels parameter lets you control how deep the recursion goes.\n\tIf maxLevels is 1, FSpIterateDirectory only scans the specified directory;\n\tif maxLevels is 2, FSpIterateDirectory scans the specified directory and\n\tone subdirectory below the specified directory; etc. Set maxLevels to\n\tzero to scan all levels.\n\t\n\tThe yourDataPtr parameter can point to whatever data structure you might\n\twant to access from within the IterateFilterProc.\n\n\tspec\t\t\tinput:\tAn FSSpec record specifying the directory to scan.\n\tmaxLevels\t\tinput:\tMaximum number of directory levels to scan or\n\t\t\t\t\t\t\tzero to scan all directory levels.\n\titerateFilter\tinput:\tA pointer to the routine you want called once\n\t\t\t\t\t\t\tfor each file and directory found by\n\t\t\t\t\t\t\tFSpIterateDirectory.\n\tyourDataPtr\t\tinput:\tA pointer to whatever data structure you might\n\t\t\t\t\t\t\twant to access from within the IterateFilterProc.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tparamErr\t\t\t-50\t\tNo default volume or iterateFilter was NULL\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\t\n\t__________\n\t\n\tSee also:\tIterateFilterProcPtr, IterateDirectory\n*/\n\n/*****************************************************************************/\n\n#ifdef __cplusplus\n}\n#endif\n\n#include \"OptimizationEnd.h\"\n\n#endif\t/* __ITERATEDIRECTORY__ */\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/MoreFiles 1.5/C Headers/MoreDesktopMgr.h",
    "content": "/*\n**\tApple Macintosh Developer Technical Support\n**\n**\tA collection of useful high-level Desktop Manager routines.\n**\tIf the Desktop Manager isn't available, use the Desktop file\n**\tfor 'read' operations.\n**\n**\tWe do more because we can...\n**\n**\tby Jim Luther and Nitin Ganatra, Apple Developer Technical Support Emeriti\n**\n**\tFile:\tMoreDesktopMgr.h\n**\n**\tCopyright  1992-1999 Apple Computer, Inc.\n**\tAll rights reserved.\n**\n**\tYou may incorporate this sample code into your applications without\n**\trestriction, though the sample code has been provided \"AS IS\" and the\n**\tresponsibility for its operation is 100% yours.  However, what you are\n**\tnot permitted to do is to redistribute the source as \"DSC Sample Code\"\n**\tafter having made changes. If you're going to re-distribute the source,\n**\twe require that you make it clear in the source that the code was\n**\tdescended from Apple Sample Code, but that you've made changes.\n*/\n\n#ifndef __MOREDESKTOPMGR__\n#define __MOREDESKTOPMGR__\n\n#include <Types.h>\n#include <Files.h>\n\n#include \"Optimization.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*****************************************************************************/\n\npascal\tOSErr\tDTOpen(ConstStr255Param volName,\n\t\t\t\t\t   short vRefNum,\n\t\t\t\t\t   short *dtRefNum,\n\t\t\t\t\t   Boolean *newDTDatabase);\n/*\t Open a volume's desktop database and return the desktop database refNum.\n\tThe DTOpen function opens a volume's desktop database. It returns\n\tthe reference number of the desktop database and indicates if the\n\tdesktop database was created as a result of this call (if it was created,\n\tthen it is empty).\n\n\tvolName\t\t\tinput:\tA pointer to the name of a mounted volume\n\t\t\t\t\t\t\tor nil.\n\tvRefNum\t\t\tinput:\tVolume specification.\n\tdtRefNum\t\toutput:\tThe reference number of Desktop Manager's\n\t\t\t\t\t\t\tdesktop database on the specified volume.\n\tnewDTDatabase\toutput:\ttrue if the desktop database was created as a\n\t\t\t\t\t\t\tresult of this call and thus empty.\n\t\t\t\t\t\t\tfalse if the desktop database was already created,\n\t\t\t\t\t\t\tor if it could not be determined if it was already\n\t\t\t\t\t\t\tcreated.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tparamErr\t\t\t-50\t\tVolume doesn't support this function\n\t\textFSErr\t\t\t-58\t\tExternal file system error - no file\n\t\t\t\t\t\t\t\t\tsystem claimed this call.\n\t\tdesktopDamagedErr\t-1305\tThe desktop database has become corrupted - \n\t\t\t\t\t\t\t\t\tthe Finder will fix this, but if your\n\t\t\t\t\t\t\t\t\tapplication is not running with the\n\t\t\t\t\t\t\t\t\tFinder, use PBDTReset or PBDTDelete\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tDTXGetAPPL(ConstStr255Param volName,\n\t\t\t\t\t\t   short vRefNum,\n\t\t\t\t\t\t   OSType creator,\n\t\t\t\t\t\t   Boolean searchCatalog,\n\t\t\t\t\t\t   short *applVRefNum,\n\t\t\t\t\t\t   long *applParID,\n\t\t\t\t\t\t   Str255 applName);\n/*\t Find an application on a volume that can open a file with a given creator.\n\tThe DTXGetAPPL function finds an application (file type 'APPL') with\n\tthe specified creator on the specified volume. It first tries to get\n\tthe application mapping from the desktop database. If that fails,\n\tthen it tries to find an application in the Desktop file. If that\n\tfails and searchCatalog is true, then it tries to find an application\n\twith the specified creator using the File Manager's CatSearch routine. \n\n\tvolName\t\t\tinput:\tA pointer to the name of a mounted volume\n\t\t\t\t\t\t\tor nil.\n\tvRefNum\t\t\tinput:\tVolume specification.\n\tcreator\t\t\tinput:\tThe file's creator type.\n\tsearchCatalog\tinput:\tIf true, search the catalog for the application\n\t\t\t\t\t\t\tif it isn't found in the desktop database.\n\tapplVRefNum\t\toutput:\tThe volume reference number of the volume the\n\t\t\t\t\t\t\tapplication is on.\n\tapplParID\t\toutput:\tThe parent directory ID of the application.\n\tapplName\t\toutput:\tThe name of the application.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\trfNumErr\t\t\t-51\t\tReference number invalid\n\t\textFSErr\t\t\t-58\t\tExternal file system error - no file\n\t\t\t\t\t\t\t\t\tsystem claimed this call\n\t\tdesktopDamagedErr\t-1305\tThe desktop database has become corrupted - \n\t\t\t\t\t\t\t\t\tthe Finder will fix this, but if your\n\t\t\t\t\t\t\t\t\tapplication is not running with the\n\t\t\t\t\t\t\t\t\tFinder, use PBDTReset or PBDTDelete\n\t\tafpItemNotFound\t\t-5012\tInformation not found\n\t\n\t__________\n\t\n\tAlso see:\tFSpDTGetAPPL\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpDTXGetAPPL(ConstStr255Param volName,\n\t\t\t\t\t\t\t  short vRefNum,\n\t\t\t\t\t\t\t  OSType creator,\n\t\t\t\t\t\t\t  Boolean searchCatalog,\n\t\t\t\t\t\t\t  FSSpec *spec);\n/*\t Find an application on a volume that can open a file with a given creator.\n\tThe FSpDTXGetAPPL function finds an application (file type 'APPL') with\n\tthe specified creator on the specified volume. It first tries to get\n\tthe application mapping from the desktop database. If that fails,\n\tthen it tries to find an application in the Desktop file. If that\n\tfails and searchCatalog is true, then it tries to find an application\n\twith the specified creator using the File Manager's CatSearch routine. \n\n\tvolName\t\t\tinput:\tA pointer to the name of a mounted volume\n\t\t\t\t\t\t\tor nil.\n\tvRefNum\t\t\tinput:\tVolume specification.\n\tcreator\t\t\tinput:\tThe file's creator type.\n\tsearchCatalog\tinput:\tIf true, search the catalog for the application\n\t\t\t\t\t\t\tif it isn't found in the desktop database.\n\tspec\t\t\toutput:\tFSSpec record containing the application name and\n\t\t\t\t\t\t\tlocation.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\trfNumErr\t\t\t-51\t\tReference number invalid\n\t\textFSErr\t\t\t-58\t\tExternal file system error - no file\n\t\t\t\t\t\t\t\t\tsystem claimed this call\n\t\tdesktopDamagedErr\t-1305\tThe desktop database has become corrupted - \n\t\t\t\t\t\t\t\t\tthe Finder will fix this, but if your\n\t\t\t\t\t\t\t\t\tapplication is not running with the\n\t\t\t\t\t\t\t\t\tFinder, use PBDTReset or PBDTDelete\n\t\tafpItemNotFound\t\t-5012\tInformation not found\n\t\n\t__________\n\t\n\tAlso see:\tFSpDTGetAPPL\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tDTGetAPPL(ConstStr255Param volName,\n\t\t\t\t\t\t  short vRefNum,\n\t\t\t\t\t\t  OSType creator,\n\t\t\t\t\t\t  short *applVRefNum,\n\t\t\t\t\t\t  long *applParID,\n\t\t\t\t\t\t  Str255 applName);\n/*\t Find an application on a volume that can open a file with a given creator.\n\tThe DTGetAPPL function finds an application (file type 'APPL') with\n\tthe specified creator on the specified volume. It first tries to get\n\tthe application mapping from the desktop database. If that fails,\n\tthen it tries to find an application in the Desktop file. If that\n\tfails, then it tries to find an application with the specified creator\n\tusing the File Manager's CatSearch routine. \n\n\tvolName\t\tinput:\tA pointer to the name of a mounted volume\n\t\t\t\t\t\tor nil.\n\tvRefNum\t\tinput:\tVolume specification.\n\tcreator\t\tinput:\tThe file's creator type.\n\tapplVRefNum\toutput:\tThe volume reference number of the volume the\n\t\t\t\t\t\tapplication is on.\n\tapplParID\toutput:\tThe parent directory ID of the application.\n\tapplName\toutput:\tThe name of the application.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\trfNumErr\t\t\t-51\t\tReference number invalid\n\t\textFSErr\t\t\t-58\t\tExternal file system error - no file\n\t\t\t\t\t\t\t\t\tsystem claimed this call\n\t\tdesktopDamagedErr\t-1305\tThe desktop database has become corrupted - \n\t\t\t\t\t\t\t\t\tthe Finder will fix this, but if your\n\t\t\t\t\t\t\t\t\tapplication is not running with the\n\t\t\t\t\t\t\t\t\tFinder, use PBDTReset or PBDTDelete\n\t\tafpItemNotFound\t\t-5012\tInformation not found\n\t\n\t__________\n\t\n\tAlso see:\tFSpDTGetAPPL\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpDTGetAPPL(ConstStr255Param volName,\n\t\t\t\t\t\t\t short vRefNum,\n\t\t\t\t\t\t\t OSType creator,\n\t\t\t\t\t\t\t FSSpec *spec);\n/*\t Find an application on a volume that can open a file with a given creator.\n\tThe FSpDTGetAPPL function finds an application (file type 'APPL') with\n\tthe specified creator on the specified volume. It first tries to get\n\tthe application mapping from the desktop database. If that fails,\n\tthen it tries to find an application in the Desktop file. If that\n\tfails, then it tries to find an application with the specified creator\n\tusing the File Manager's CatSearch routine. \n\n\tvolName\t\tinput:\tA pointer to the name of a mounted volume\n\t\t\t\t\t\tor nil.\n\tvRefNum\t\tinput:\tVolume specification.\n\tcreator\t\tinput:\tThe file's creator type.\n\tspec\t\toutput:\tFSSpec record containing the application name and\n\t\t\t\t\t\tlocation.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\trfNumErr\t\t\t-51\t\tReference number invalid\n\t\textFSErr\t\t\t-58\t\tExternal file system error - no file\n\t\t\t\t\t\t\t\t\tsystem claimed this call\n\t\tdesktopDamagedErr\t-1305\tThe desktop database has become corrupted - \n\t\t\t\t\t\t\t\t\tthe Finder will fix this, but if your\n\t\t\t\t\t\t\t\t\tapplication is not running with the\n\t\t\t\t\t\t\t\t\tFinder, use PBDTReset or PBDTDelete\n\t\tafpItemNotFound\t\t-5012\tInformation not found\n\t\n\t__________\n\t\n\tAlso see:\tDTGetAPPL\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tDTGetIcon(ConstStr255Param volName,\n\t\t\t\t\t\t  short vRefNum,\n\t\t\t\t\t\t  short iconType,\n\t\t\t\t\t\t  OSType fileCreator,\n\t\t\t\t\t\t  OSType fileType,\n\t\t\t\t\t\t  Handle *iconHandle);\n/*\t Get an icon from the desktop database or Desktop file.\n\tThe DTGetIcon function retrieves the specified icon and returns it in\n\ta newly created handle. The icon is retrieves from the Desktop Manager\n\tor if the Desktop Manager is not available, from the Finder's Desktop\n\tfile. Your program is responsible for disposing of the handle when it is\n\tdone using the icon.\n\n\tvolName\t\tinput:\tA pointer to the name of a mounted volume\n\t\t\t\t\t\tor nil.\n\tvRefNum\t\tinput:\tVolume specification.\n\ticonType\tinput:\tThe icon type as defined in Files.h. Valid values are:\n\t\t\t\t\t\t\tkLargeIcon\n\t\t\t\t\t\t\tkLarge4BitIcon\n\t\t\t\t\t\t\tkLarge8BitIcon\n\t\t\t\t\t\t\tkSmallIcon\n\t\t\t\t\t\t\tkSmall4BitIcon\n\t\t\t\t\t\t\tkSmall8BitIcon\n\tfileCreator\tinput:\tThe icon's creator type.\n\tfileType\tinput:\tThe icon's file type.\n\ticonHandle\toutput:\tA Handle containing the newly created icon.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tparamErr\t\t\t-50\t\tVolume doesn't support this function\n\t\trfNumErr\t\t\t-51\t\tReference number invalid\n\t\textFSErr\t\t\t-58\t\tExternal file system error - no file\n\t\t\t\t\t\t\t\t\tsystem claimed this call\n\t\tmemFullErr\t\t\t-108\ticonHandle could not be allocated\n\t\tdesktopDamagedErr\t-1305\tThe desktop database has become corrupted - \n\t\t\t\t\t\t\t\t\tthe Finder will fix this, but if your\n\t\t\t\t\t\t\t\t\tapplication is not running with the\n\t\t\t\t\t\t\t\t\tFinder, use PBDTReset or PBDTDelete\n\t\tafpItemNotFound\t\t-5012\tInformation not found\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tDTSetComment(short vRefNum,\n\t\t\t\t\t\t\t long dirID,\n\t\t\t\t\t\t\t ConstStr255Param name,\n\t\t\t\t\t\t\t ConstStr255Param comment);\n/*\t Set a file or directory's Finder comment field.\n\tThe DTSetComment function sets a file or directory's Finder comment\n\tfield. The volume must support the Desktop Manager because you only\n\thave read access to the Desktop file.\n\n\tvRefNum\tinput:\tVolume specification.\n\tdirID\tinput:\tDirectory ID.\n\tname\tinput:\tPointer to object name, or nil when dirID\n\t\t\t\t\tspecifies a directory that's the object.\n\tcomment\tinput:\tThe comment to add. Comments are limited to 200 characters;\n\t\t\t\t\tlonger comments are truncated.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tfnfErr\t\t\t\t43\t\tFile or directory doesnt exist\n\t\tparamErr\t\t\t-50\t\tVolume doesn't support this function\n\t\twPrErr\t\t\t\t44\t\tVolume is locked through hardware\n\t\tvLckdErr\t\t\t46\t\tVolume is locked through software\n\t\trfNumErr\t\t\t51\t\tReference number invalid\n\t\textFSErr\t\t\t-58\t\tExternal file system error - no file\n\t\t\t\t\t\t\t\t\tsystem claimed this call.\n\t\tdesktopDamagedErr\t-1305\tThe desktop database has become corrupted - \n\t\t\t\t\t\t\t\t\tthe Finder will fix this, but if your\n\t\t\t\t\t\t\t\t\tapplication is not running with the\n\t\t\t\t\t\t\t\t\tFinder, use PBDTReset or PBDTDelete\n\t\n\t__________\n\t\n\tAlso see:\tDTCopyComment, FSpDTCopyComment, FSpDTSetComment, DTGetComment,\n\t\t\t\tFSpDTGetComment\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpDTSetComment(const FSSpec *spec,\n\t\t\t\t\t\t\t\tConstStr255Param comment);\n/*\t Set a file or directory's Finder comment field.\n\tThe FSpDTSetComment function sets a file or directory's Finder comment\n\tfield. The volume must support the Desktop Manager because you only\n\thave read access to the Desktop file.\n\n\tspec\tinput:\tAn FSSpec record specifying the file or directory.\n\tcomment\tinput:\tThe comment to add. Comments are limited to 200 characters;\n\t\t\t\t\tlonger comments are truncated.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tfnfErr\t\t\t\t43\t\tFile or directory doesnt exist\n\t\twPrErr\t\t\t\t44\t\tVolume is locked through hardware\n\t\tvLckdErr\t\t\t46\t\tVolume is locked through software\n\t\trfNumErr\t\t\t51\t\tReference number invalid\n\t\tparamErr\t\t\t-50\t\tVolume doesn't support this function\n\t\textFSErr\t\t\t-58\t\tExternal file system error - no file\n\t\t\t\t\t\t\t\t\tsystem claimed this call.\n\t\tdesktopDamagedErr\t-1305\tThe desktop database has become corrupted - \n\t\t\t\t\t\t\t\t\tthe Finder will fix this, but if your\n\t\t\t\t\t\t\t\t\tapplication is not running with the\n\t\t\t\t\t\t\t\t\tFinder, use PBDTReset or PBDTDelete\n\t\n\t__________\n\t\n\tAlso see:\tDTCopyComment, FSpDTCopyComment, DTSetComment, DTGetComment,\n\t\t\t\tFSpDTGetComment\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tDTGetComment(short vRefNum,\n\t\t\t\t\t\t\t long dirID,\n\t\t\t\t\t\t\t ConstStr255Param name,\n\t\t\t\t\t\t\t Str255 comment);\n/*\t Get a file or directory's Finder comment field (if any).\n\tThe DTGetComment function gets a file or directory's Finder comment\n\tfield (if any) from the Desktop Manager or if the Desktop Manager is\n\tnot available, from the Finder's Desktop file.\n\n\tIMPORTANT NOTE: Inside Macintosh says that comments are up to\n\t200 characters. While that may be correct for the HFS file system's\n\tDesktop Manager, other file systems (such as Apple Photo Access) return\n\tup to 255 characters. Make sure the comment buffer is a Str255 or you'll\n\tregret it.\n\t\n\tvRefNum\tinput:\tVolume specification.\n\tdirID\tinput:\tDirectory ID.\n\tname\tinput:\tPointer to object name, or nil when dirID\n\t\t\t\t\tspecifies a directory that's the object.\n\tcomment\toutput:\tA Str255 where the comment is to be returned.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tparamErr\t\t\t-50\t\tVolume doesn't support this function\n\t\trfNumErr\t\t\t51\t\tReference number invalid\n\t\textFSErr\t\t\t-58\t\tExternal file system error - no file\n\t\t\t\t\t\t\t\t\tsystem claimed this call.\n\t\tdesktopDamagedErr\t-1305\tThe desktop database has become corrupted - \n\t\t\t\t\t\t\t\t\tthe Finder will fix this, but if your\n\t\t\t\t\t\t\t\t\tapplication is not running with the\n\t\t\t\t\t\t\t\t\tFinder, use PBDTReset or PBDTDelete\n\t\tafpItemNotFound\t\t-5012\tInformation not found\n\t\t\n\t__________\n\t\n\tAlso see:\tDTCopyComment, FSpDTCopyComment, DTSetComment, FSpDTSetComment,\n\t\t\t\tFSpDTGetComment\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpDTGetComment(const FSSpec *spec,\n\t\t\t\t\t\t\t\tStr255 comment);\n/*\t Get a file or directory's Finder comment field (if any).\n\tThe FSpDTGetComment function gets a file or directory's Finder comment\n\tfield (if any) from the Desktop Manager or if the Desktop Manager is\n\tnot available, from the Finder's Desktop file.\n\n\tIMPORTANT NOTE: Inside Macintosh says that comments are up to\n\t200 characters. While that may be correct for the HFS file system's\n\tDesktop Manager, other file systems (such as Apple Photo Access) return\n\tup to 255 characters. Make sure the comment buffer is a Str255 or you'll\n\tregret it.\n\t\n\tspec\tinput:\tAn FSSpec record specifying the file or directory.\n\tcomment\toutput:\tA Str255 where the comment is to be returned.\n\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tparamErr\t\t\t-50\t\tVolume doesn't support this function\n\t\trfNumErr\t\t\t51\t\tReference number invalid\n\t\textFSErr\t\t\t-58\t\tExternal file system error - no file\n\t\t\t\t\t\t\t\t\tsystem claimed this call.\n\t\tdesktopDamagedErr\t-1305\tThe desktop database has become corrupted - \n\t\t\t\t\t\t\t\t\tthe Finder will fix this, but if your\n\t\t\t\t\t\t\t\t\tapplication is not running with the\n\t\t\t\t\t\t\t\t\tFinder, use PBDTReset or PBDTDelete\n\t\tafpItemNotFound\t\t-5012\tInformation not found\n\t\t\n\t__________\n\t\n\tAlso see:\tDTCopyComment, FSpDTCopyComment, DTSetComment, FSpDTSetComment,\n\t\t\t\tDTGetComment\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tDTCopyComment(short srcVRefNum,\n\t\t\t\t\t\t\t  long srcDirID,\n\t\t\t\t\t\t\t  ConstStr255Param srcName,\n\t\t\t\t\t\t\t  short dstVRefNum,\n\t\t\t\t\t\t\t  long dstDirID,\n\t\t\t\t\t\t\t  ConstStr255Param dstName);\n/*\t Copy the file or folder comment from the source to the destination object.\n\tThe DTCopyComment function copies the file or folder comment from the\n\tsource to the destination object.  The destination volume must support\n\tthe Desktop Manager because you only have read access to the Desktop file.\n\t\n\tsrcVRefNum\tinput:\tSource volume specification.\n\tsrcDirID\tinput:\tSource directory ID.\n\tsrcName\t\tinput:\tPointer to source object name, or nil when srcDirID\n\t\t\t\t\t\tspecifies a directory that's the object.\n\tdstVRefNum\tinput:\tDestination volume specification.\n\tdstDirID\tinput:\tDestination directory ID.\n\tdstName\t\tinput:\tPointer to destination object name, or nil when\n\t\t\t\t\t\tdstDirID specifies a directory that's the object.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tfnfErr\t\t\t\t43\t\tFile or directory doesnt exist\n\t\twPrErr\t\t\t\t44\t\tVolume is locked through hardware\n\t\tvLckdErr\t\t\t46\t\tVolume is locked through software\n\t\tparamErr\t\t\t-50\t\tVolume doesn't support this function\n\t\trfNumErr\t\t\t51\t\tReference number invalid\n\t\tparamErr\t\t\t-50\t\tVolume doesn't support this function\n\t\textFSErr\t\t\t-58\t\tExternal file system error - no file\n\t\t\t\t\t\t\t\t\tsystem claimed this call.\n\t\tdesktopDamagedErr\t-1305\tThe desktop database has become corrupted - \n\t\t\t\t\t\t\t\t\tthe Finder will fix this, but if your\n\t\t\t\t\t\t\t\t\tapplication is not running with the\n\t\t\t\t\t\t\t\t\tFinder, use PBDTReset or PBDTDelete\n\t\tafpItemNotFound\t\t-5012\tInformation not found\n\t\t\n\t__________\n\t\n\tAlso see:\tFSpDTCopyComment, DTSetComment, FSpDTSetComment, DTGetComment,\n\t\t\t\tFSpDTGetComment\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpDTCopyComment(const FSSpec *srcSpec,\n\t\t\t\t\t\t\t\t const FSSpec *dstSpec);\n/*\t Copy the desktop database comment from the source to the destination object.\n\tThe FSpDTCopyComment function copies the desktop database comment from\n\tthe source to the destination object.  Both the source and the\n\tdestination volumes must support the Desktop Manager.\n\t\n\tsrcSpec\t\tinput:\tAn FSSpec record specifying the source object.\n\tdstSpec\t\tinput:\tAn FSSpec record specifying the destination object.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tfnfErr\t\t\t\t43\t\tFile or directory doesnt exist\n\t\twPrErr\t\t\t\t44\t\tVolume is locked through hardware\n\t\tvLckdErr\t\t\t46\t\tVolume is locked through software\n\t\tparamErr\t\t\t-50\t\tVolume doesn't support this function\n\t\trfNumErr\t\t\t51\t\tReference number invalid\n\t\tparamErr\t\t\t-50\t\tVolume doesn't support this function\n\t\textFSErr\t\t\t-58\t\tExternal file system error - no file\n\t\t\t\t\t\t\t\t\tsystem claimed this call.\n\t\tdesktopDamagedErr\t-1305\tThe desktop database has become corrupted - \n\t\t\t\t\t\t\t\t\tthe Finder will fix this, but if your\n\t\t\t\t\t\t\t\t\tapplication is not running with the\n\t\t\t\t\t\t\t\t\tFinder, use PBDTReset or PBDTDelete\n\t\tafpItemNotFound\t\t-5012\tInformation not found\n\t\t\n\t__________\n\t\n\tAlso see:\tDTCopyComment, DTSetComment, FSpDTSetComment, DTGetComment,\n\t\t\t\tFSpDTGetComment\n*/\n\n/*****************************************************************************/\n\n#ifdef __cplusplus\n}\n#endif\n\n#include \"OptimizationEnd.h\"\n\n#endif\t/* __MOREDESKTOPMGR__ */\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/MoreFiles 1.5/C Headers/MoreFiles.h",
    "content": "/*\n**\tApple Macintosh Developer Technical Support\n**\n**\tThe long lost high-level and FSSpec File Manager functions.\n**\n**\tby Jim Luther, Apple Developer Technical Support Emeritus\n**\n**\tFile:\t\tMoreFiles.h\n**\n**\tCopyright  1992-1999 Apple Computer, Inc.\n**\tAll rights reserved.\n**\n**\tYou may incorporate this sample code into your applications without\n**\trestriction, though the sample code has been provided \"AS IS\" and the\n**\tresponsibility for its operation is 100% yours.  However, what you are\n**\tnot permitted to do is to redistribute the source as \"DSC Sample Code\"\n**\tafter having made changes. If you're going to re-distribute the source,\n**\twe require that you make it clear in the source that the code was\n**\tdescended from Apple Sample Code, but that you've made changes.\n*/\n\n#ifndef __MOREFILES__\n#define __MOREFILES__\n\n#include <Types.h>\n#include <Files.h>\n\n#include \"Optimization.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*****************************************************************************/\n\npascal\tOSErr\tHGetVolParms(ConstStr255Param volName,\n\t\t\t\t\t\t\t short vRefNum,\n\t\t\t\t\t\t\t GetVolParmsInfoBuffer *volParmsInfo,\n\t\t\t\t\t\t\t long *infoSize);\n/*\t Determine the characteristics of a volume.\n\tThe HGetVolParms function returns information about the characteristics\n\tof a volume. A result of paramErr usually just means the volume doesn't\n\tsupport PBHGetVolParms and the feature you were going to check\n\tfor isn't available.\n\n\tvolName\t\t\tinput:\tA pointer to the name of a mounted volume\n\t\t\t\t\t\t\tor nil.\n\tvRefNum\t\t\tinput:\tVolume specification.\n\tvolParmsInfo\tinput:\tPointer to GetVolParmsInfoBuffer where the\n\t\t\t\t\t\t\tvolume attributes information is returned.\n\t\t\t\t\toutput:\tAtributes information.\n\tinfoSize\t\tinput:\tSize of buffer pointed to by volParmsInfo.\n\t\t\t\t\toutput: Size of data actually returned.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tparamErr\t\t\t-50\t\tVolume doesn't support this function\n\t\n\t__________\n\t\n\tAlso see the macros for checking attribute bits in MoreFilesExtras.h\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tHCreateMinimum(short vRefNum,\n\t\t\t\t\t\t\t   long dirID,\n\t\t\t\t\t\t\t   ConstStr255Param fileName);\n/*\t Create a new file with no creator or file type.\n\tThe HCreateMinimum function creates a new file without attempting to set\n\tthe creator and file type of the new file.  This function is needed to\n\tcreate a file in an AppleShare \"drop box\" where the user can make\n\tchanges, but cannot see folder or files.\n\t\n\tvRefNum\t\tinput:\tVolume specification.\n\tdirID\t\tinput:\tDirectory ID.\n\tfileName\tinput:\tThe name of the new file.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tdirFulErr\t\t\t-33\t\tFile directory full\n\t\tdskFulErr\t\t\t-34\t\tDisk is full\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tDirectory not found or incomplete pathname\n\t\twPrErr\t\t\t\t-44\t\tHardware volume lock\n\t\tvLckdErr\t\t\t-46\t\tSoftware volume lock\n\t\tdupFNErr\t\t\t-48\t\tDuplicate filename and version\n\t\tdirNFErrdirNFErr\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tA directory exists with that name\n\t\n\t__________\n\t\n\tAlso see:\tFSpCreateMinimum\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpCreateMinimum(const FSSpec *spec);\n/*\t Create a new file with no creator or file type.\n\tThe FSpCreateMinimum function creates a new file without attempting to set \n\tthe the creator and file type of the new file.  This function is needed to\n\tcreate a file in an AppleShare \"dropbox\" where the user can make\n\tchanges, but cannot see folder or files. \n\t\n\tspec\t\tinput:\tAn FSSpec record specifying the file to create.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tdirFulErr\t\t\t-33\t\tFile directory full\n\t\tdskFulErr\t\t\t-34\t\tDisk is full\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tDirectory not found or incomplete pathname\n\t\twPrErr\t\t\t\t-44\t\tHardware volume lock\n\t\tvLckdErr\t\t\t-46\t\tSoftware volume lock\n\t\tdupFNErr\t\t\t-48\t\tDuplicate filename and version\n\t\tdirNFErrdirNFErr\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tA directory exists with that name\n\t\n\t__________\n\t\n\tAlso see:\tHCreateMinimum\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tExchangeFiles(short vRefNum,\n\t\t\t\t\t\t\t  long srcDirID,\n\t\t\t\t\t\t\t  ConstStr255Param srcName,\n\t\t\t\t\t\t\t  long dstDirID,\n\t\t\t\t\t\t\t  ConstStr255Param dstName);\n/*\t Exchange the data stored in two files on the same volume.\n\tThe ExchangeFiles function swaps the data in two files on the same\n\tvolume by changing some of the information in the volume catalog and,\n\tif the files are open, in the file control blocks.\n\n\tvRefNum\t\tinput:\tVolume specification.\n\tsrcDirID\tinput:\tSource directory ID.\n\tsrcName\t\tinput:\tSource file name.\n\tdstDirID\tinput:\tDestination directory ID.\n\tdstName\t\tinput:\tDestination file name.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tFunction not supported by volume\n\t\tvolOfflinErr\t\t-53\t\tVolume is offline\n\t\twrgVolTypErr\t\t-123\tNot an HFS volume\n\t\tdiffVolErr\t\t\t-1303\tFiles on different volumes\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tObject is a directory, not a file\n\t\tafpSameObjectErr\t-5038\tSource and destination are the same\n\n\t__________\n\t\n\tAlso see:\tFSpExchangeFilesCompat\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tResolveFileIDRef(ConstStr255Param volName,\n\t\t\t\t\t\t\t\t short vRefNum,\n\t\t\t\t\t\t\t\t long fileID,\n\t\t\t\t\t\t\t\t long *parID,\n\t\t\t\t\t\t\t\t StringPtr fileName);\n/*\t Retrieve the location of the file with the specified file ID reference.\n\tThe ResolveFileIDRef function returns the filename and parent directory ID\n\tof the file with the specified file ID reference.\n\t\n\tvolName\tinput:\tA pointer to the name of a mounted volume\n\t\t\t\t\tor nil.\n\tvRefNum\tinput:\tVolume specification.\n\tfileID\tinput:\tThe file ID reference.\n\tparID\toutput:\tThe parent directory ID of the file.\n\tname\tinput:\tPoints to a buffer (minimum Str63) where the filename\n\t\t\t\t\tis to be returned or must be nil.\n\t\t\toutput:\tThe filename.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tparamErr\t\t\t-50\t\tFunction not supported by volume\n\t\tvolOfflinErr\t\t-53\t\tVolume is offline\n\t\textFSErr\t\t\t-58\t\tExternal file system error - no file\n\t\t\t\t\t\t\t\t\tsystem claimed this call.\n\t\twrgVolTypErr\t\t-123\tNot an HFS volume\n\t\tfidNotFoundErr\t\t-1300\tFile ID reference not found\n\t\tnotAFileErr\t\t\t-1302\tSpecified file is a directory\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tSpecified file is a directory\n\t\tafpIDNotFound\t\t-5034\tFile ID reference not found\n\t\tafpBadIDErr\t\t\t-5039\tFile ID reference not found\n\t\n\t__________\n\t\n\tAlso see:\tFSpResolveFileIDRef, CreateFileIDRef, FSpCreateFileIDRef,\n\t\t\t\tDeleteFileIDRef\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpResolveFileIDRef(ConstStr255Param volName,\n\t\t\t\t\t\t\t\t\tshort vRefNum,\n\t\t\t\t\t\t\t\t\tlong fileID,\n\t\t\t\t\t\t\t\t\tFSSpecPtr spec);\n/*\t Retrieve the location of the file with the specified file ID reference.\n\tThe FSpResolveFileIDRef function fills in an FSSpec with the location\n\tof the file with the specified file ID reference.\n\t\n\tvolName\tinput:\tA pointer to the name of a mounted volume\n\t\t\t\t\tor nil.\n\tvRefNum\tinput:\tVolume specification.\n\tfileID\tinput:\tThe file ID reference.\n\tspec\tinput:\tA pointer to a FSSpec record.\n\t\t\toutput:\tA file system specification to be filled in by\n\t\t\t\t\tFSpResolveFileIDRef.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tparamErr\t\t\t-50\t\tFunction not supported by volume or\n\t\t\t\t\t\t\t\t\tno default volume\n\t\tvolOfflinErr\t\t-53\t\tVolume is offline\n\t\textFSErr\t\t\t-58\t\tExternal file system error - no file\n\t\t\t\t\t\t\t\t\tsystem claimed this call.\n\t\twrgVolTypErr\t\t-123\tNot an HFS volume\n\t\tfidNotFoundErr\t\t-1300\tFile ID reference not found\n\t\tnotAFileErr\t\t\t-1302\tSpecified file is a directory\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tSpecified file is a directory\n\t\tafpIDNotFound\t\t-5034\tFile ID reference not found\n\t\tafpBadIDErr\t\t\t-5039\tFile ID reference not found\n\t\n\t__________\n\t\n\tAlso see:\tResolveFileIDRef, CreateFileIDRef, FSpCreateFileIDRef,\n\t\t\t\tDeleteFileIDRef\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tCreateFileIDRef(short vRefNum,\n\t\t\t\t\t\t\t\tlong parID,\n\t\t\t\t\t\t\t\tConstStr255Param fileName,\n\t\t\t\t\t\t\t\tlong *fileID);\n/*\t Establish a file ID reference for a file.\n\tThe CreateFileIDRef function creates a file ID reference for the\n\tspecified file, or if a file ID reference already exists, supplies\n\tthe file ID reference and returns the result code fidExists or afpIDExists.\n\n\tvRefNum\t\tinput:\tVolume specification.\n\tparID\t\tinput:\tDirectory ID.\n\tfileName\tinput:\tThe name of the file.\n\tfileID\t\toutput:\tThe file ID reference (if result is noErr,\n\t\t\t\t\t\tfidExists, or afpIDExists).\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\twPrErr\t\t\t\t-44\t\tHardware volume lock\n\t\tvLckdErr\t\t\t-46\t\tSoftware volume lock\n\t\tparamErr\t\t\t-50\t\tFunction not supported by volume\n\t\tvolOfflinErr\t\t-53\t\tVolume is offline\n\t\textFSErr\t\t\t-58\t\tExternal file system error - no file\n\t\t\t\t\t\t\t\t\tsystem claimed this call.\n\t\twrgVolTypErr\t\t-123\tNot an HFS volume\n\t\tfidExists\t\t\t-1301\tFile ID reference already exists\n\t\tnotAFileErrn\t\t-1302\tSpecified file is a directory\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tSpecified file is a directory\n\t\tafpIDExists\t\t\t-5035\tFile ID reference already exists\n\t\n\t__________\n\t\n\tAlso see:\tFSpResolveFileIDRef, ResolveFileIDRef, FSpCreateFileIDRef,\n\t\t\t\tDeleteFileIDRef\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpCreateFileIDRef(const FSSpec *spec,\n\t\t\t\t\t\t\t\t   long *fileID);\n/*\t Establish a file ID reference for a file.\n\tThe FSpCreateFileIDRef function creates a file ID reference for the\n\tspecified file, or if a file ID reference already exists, supplies\n\tthe file ID reference and returns the result code fidExists or afpIDExists.\n\n\tspec\t\tinput:\tAn FSSpec record specifying the file.\n\tfileID\t\toutput:\tThe file ID reference (if result is noErr,\n\t\t\t\t\t\tfidExists, or afpIDExists).\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\twPrErr\t\t\t\t-44\t\tHardware volume lock\n\t\tvLckdErr\t\t\t-46\t\tSoftware volume lock\n\t\tparamErr\t\t\t-50\t\tFunction not supported by volume\n\t\tvolOfflinErr\t\t-53\t\tVolume is offline\n\t\textFSErr\t\t\t-58\t\tExternal file system error - no file\n\t\t\t\t\t\t\t\t\tsystem claimed this call.\n\t\twrgVolTypErr\t\t-123\tNot an HFS volume\n\t\tfidExists\t\t\t-1301\tFile ID reference already exists\n\t\tnotAFileErrn\t\t-1302\tSpecified file is a directory\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tSpecified file is a directory\n\t\tafpIDExists\t\t\t-5035\tFile ID reference already exists\n\t\n\t__________\n\t\n\tAlso see:\tFSpResolveFileIDRef, ResolveFileIDRef, CreateFileIDRef,\n\t\t\t\tDeleteFileIDRef\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tDeleteFileIDRef(ConstStr255Param volName,\n\t\t\t\t\t\t\t\tshort vRefNum,\n\t\t\t\t\t\t\t\tlong fileID);\n/*\t Delete a file ID reference.\n\tThe DeleteFileIDRef function deletes a file ID reference.\n\n\tvolName\tinput:\tA pointer to the name of a mounted volume\n\t\t\t\t\tor nil.\n\tvRefNum\tinput:\tVolume specification.\n\tfileID\tinput:\tThe file ID reference.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\twPrErr\t\t\t\t-44\t\tHardware volume lock\n\t\tvLckdErr\t\t\t-46\t\tSoftware volume lock\n\t\tparamErr\t\t\t-50\t\tFunction not supported by volume\n\t\tvolOfflinErr\t\t-53\t\tVolume is offline\n\t\textFSErr\t\t\t-58\t\tExternal file system error - no file\n\t\t\t\t\t\t\t\t\tsystem claimed this call.\n\t\twrgVolTypErr\t\t-123\tFunction is not supported by volume\n\t\tfidNotFoundErr\t\t-1300\tFile ID reference not found\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tSpecified file is a directory\n\t\tafpIDNotFound\t\t-5034\tFile ID reference not found\n\t\n\t__________\n\t\n\tAlso see:\tFSpResolveFileIDRef, ResolveFileIDRef, CreateFileIDRef,\n\t\t\t\tFSpCreateFileIDRef\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFlushFile(short refNum);\n/*\t Write the contents of a file's access path buffer (the fork data).\n\tThe FlushFile function writes the contents of a file's access path\n\tbuffer (the fork data) to the volume. Note: some of the file's catalog\n\tinformation stored on the volume may not be correct until FlushVol\n\tis called.\n\n\trefNum\tinput:\tThe file reference number of an open file.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tioErr \t\t\t\t-36\t\tI/O error\n\t\tfnOpnErr\t\t\t-38\t\tFile not open\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\trfNumErr\t\t\t-51\t\tBad reference number\n\t\textFSErr\t\t\t-58\t\tExternal file system error - no file\n\t\t\t\t\t\t\t\t\tsystem claimed this call.\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tLockRange(short refNum,\n\t\t\t\t\t\t  long rangeLength,\n\t\t\t\t\t\t  long rangeStart);\n/*\t Lock a portion of a file.\n\tThe LockRange function locks (denies access to) a portion of a file\n\tthat was opened with shared read/write permission.\n\n\trefNum\t\tinput:\tThe file reference number of an open file.\n\trangeLength\tinput:\tThe number of bytes in the range.\n\trangeStart\tinput:\tThe starting byte in the range to lock.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tfnOpnErr\t\t\t-38\t\tFile not open\n\t\teofErr\t\t\t\t-39\t\tLogical end-of-file reached\n\t\tfLckdErr\t\t\t-45\t\tFile is locked by another user\n\t\tparamErr\t\t\t-50\t\tNegative ioReqCount\n\t\trfNumErr\t\t\t-51\t\tBad reference number\n\t\textFSErr\t\t\t-58\t\tExternal file system error - no file\n\t\t\t\t\t\t\t\t\tsystem claimed this call.\n\t\tvolGoneErr\t\t\t-124\tServer volume has been disconnected\n\t\tafpNoMoreLocks\t\t-5015\tNo more ranges can be locked\n\t\tafpRangeOverlap\t\t-5021\tPart of range is already locked\n\n\t__________\n\t\n\tAlso see:\tUnlockRange\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tUnlockRange(short refNum,\n\t\t\t\t\t\t\tlong rangeLength,\n\t\t\t\t\t\t\tlong rangeStart);\n/*\t Unlock a previously locked range.\n\tThe UnlockRange function unlocks (allows access to) a previously locked\n\tportion of a file that was opened with shared read/write permission.\n\n\trefNum\t\tinput:\tThe file reference number of an open file.\n\trangeLength\tinput:\tThe number of bytes in the range.\n\trangeStart\tinput:\tThe starting byte in the range to unlock.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tfnOpnErr\t\t\t-38\t\tFile not open\n\t\teofErr\t\t\t\t-39\t\tLogical end-of-file reached\n\t\tparamErr\t\t\t-50\t\tNegative ioReqCount\n\t\trfNumErr\t\t\t-51\t\tBad reference number\n\t\textFSErr\t\t\t-58\t\tExternal file system error - no file\n\t\t\t\t\t\t\t\t\tsystem claimed this call.\n\t\tvolGoneErr\t\t\t-124\tServer volume has been disconnected\n\t\tafpRangeNotLocked\t-5020\tSpecified range was not locked\n\n\t__________\n\t\n\tAlso see:\tLockRange\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetForeignPrivs(short vRefNum,\n\t\t\t\t\t\t\t\tlong dirID,\n\t\t\t\t\t\t\t\tConstStr255Param name,\n\t\t\t\t\t\t\t\tvoid *foreignPrivBuffer,\n\t\t\t\t\t\t\t\tlong *foreignPrivSize,\n\t\t\t\t\t\t\t\tlong *foreignPrivInfo1,\n\t\t\t\t\t\t\t\tlong *foreignPrivInfo2,\n\t\t\t\t\t\t\t\tlong *foreignPrivInfo3,\n\t\t\t\t\t\t\t\tlong *foreignPrivInfo4);\n/*\t Retrieve the native access-control information.\n\tThe GetForeignPrivs function retrieves the native access-control\n\tinformation for a file or directory stored on a volume managed by\n\ta foreign file system.\n\t\n\tvRefNum\t\t\t\tinput:\tVolume specification.\n\tdirID\t\t\t\tinput:\tDirectory ID.\n\tname\t\t\t\tinput:\tPointer to object name, or nil when dirID\n\t\t\t\t\t\t\t\tspecifies a directory that's the object.\n\tforeignPrivBuffer\tinput:\tPointer to buffer where the privilege\n\t\t\t\t\t\t\t\tinformation is returned.\n\t\t\t\t\t\toutput:\tPrivilege information.\n\tforeignPrivSize\t\tinput:\tSize of buffer pointed to by\n\t\t\t\t\t\t\t\tforeignPrivBuffer.\n\t\t\t\t\t\toutput: Amount of buffer actually used.\n\tforeignPrivInfo1\toutput:\tInformation specific to privilege model.\n\tforeignPrivInfo2\toutput:\tInformation specific to privilege model.\n\tforeignPrivInfo3\toutput:\tInformation specific to privilege model.\n\tforeignPrivInfo4\toutput:\tInformation specific to privilege model.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tparamErr\t\t\t-50\t\tVolume is HFS or MFS (that is, it has\n\t\t\t\t\t\t\t\t\tno foreign privilege model), or foreign\n\t\t\t\t\t\t\t\t\tvolume does not support these calls\n\t\n\t__________\n\t\n\tAlso see:\tFSpGetForeignPrivs, SetForeignPrivs, FSpSetForeignPrivs\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpGetForeignPrivs(const FSSpec *spec,\n\t\t\t\t\t\t\t\t   void *foreignPrivBuffer,\n\t\t\t\t\t\t\t\t   long *foreignPrivSize,\n\t\t\t\t\t\t\t\t   long *foreignPrivInfo1,\n\t\t\t\t\t\t\t\t   long *foreignPrivInfo2,\n\t\t\t\t\t\t\t\t   long *foreignPrivInfo3,\n\t\t\t\t\t\t\t\t   long *foreignPrivInfo4);\n/*\t Retrieve the native access-control information.\n\tThe FSpGetForeignPrivs function retrieves the native access-control\n\tinformation for a file or directory stored on a volume managed by\n\ta foreign file system.\n\t\n\tspec\t\t\t\tinput:\tAn FSSpec record specifying the object.\n\tforeignPrivBuffer\tinput:\tPointer to buffer where the privilege\n\t\t\t\t\t\t\t\tinformation is returned.\n\t\t\t\t\t\toutput:\tPrivilege information.\n\tforeignPrivSize\t\tinput:\tSize of buffer pointed to by\n\t\t\t\t\t\t\t\tforeignPrivBuffer.\n\t\t\t\t\t\toutput: Amount of buffer actually used.\n\tforeignPrivInfo1\toutput:\tInformation specific to privilege model.\n\tforeignPrivInfo2\toutput:\tInformation specific to privilege model.\n\tforeignPrivInfo3\toutput:\tInformation specific to privilege model.\n\tforeignPrivInfo4\toutput:\tInformation specific to privilege model.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tparamErr\t\t\t-50\t\tVolume is HFS or MFS (that is, it has\n\t\t\t\t\t\t\t\t\tno foreign privilege model), or foreign\n\t\t\t\t\t\t\t\t\tvolume does not support these calls\n\t\n\t__________\n\t\n\tAlso see:\tGetForeignPrivs, SetForeignPrivs, FSpSetForeignPrivs\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tSetForeignPrivs(short vRefNum,\n\t\t\t\t\t\t\t\tlong dirID,\n\t\t\t\t\t\t\t\tConstStr255Param name,\n\t\t\t\t\t\t\t\tconst void *foreignPrivBuffer,\n\t\t\t\t\t\t\t\tlong *foreignPrivSize,\n\t\t\t\t\t\t\t\tlong foreignPrivInfo1,\n\t\t\t\t\t\t\t\tlong foreignPrivInfo2,\n\t\t\t\t\t\t\t\tlong foreignPrivInfo3,\n\t\t\t\t\t\t\t\tlong foreignPrivInfo4);\n/*\t Change the native access-control information.\n\tThe SetForeignPrivs function changes the native access-control\n\tinformation for a file or directory stored on a volume managed by\n\ta foreign file system.\n\t\n\tvRefNum\t\t\t\tinput:\tVolume specification.\n\tdirID\t\t\t\tinput:\tDirectory ID.\n\tname\t\t\t\tinput:\tPointer to object name, or nil when dirID\n\t\t\t\t\t\t\t\tspecifies a directory that's the object.\n\tforeignPrivBuffer\tinput:\tPointer to privilege information buffer.\n\tforeignPrivSize\t\tinput:\tSize of buffer pointed to by\n\t\t\t\t\t\t\t\tforeignPrivBuffer.\n\t\t\t\t\t\toutput: Amount of buffer actually used.\n\tforeignPrivInfo1\tinput:\tInformation specific to privilege model.\n\tforeignPrivInfo2\tinput:\tInformation specific to privilege model.\n\tforeignPrivInfo3\tinput:\tInformation specific to privilege model.\n\tforeignPrivInfo4\tinput:\tInformation specific to privilege model.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tparamErr\t\t\t-50\t\tVolume is HFS or MFS (that is, it has\n\t\t\t\t\t\t\t\t\tno foreign privilege model), or foreign\n\t\t\t\t\t\t\t\t\tvolume does not support these calls\n\t\n\t__________\n\t\n\tAlso see:\tGetForeignPrivs, FSpGetForeignPrivs, FSpSetForeignPrivs\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpSetForeignPrivs(const FSSpec *spec,\n\t\t\t\t\t\t\t\t   const void *foreignPrivBuffer,\n\t\t\t\t\t\t\t\t   long *foreignPrivSize,\n\t\t\t\t\t\t\t\t   long foreignPrivInfo1,\n\t\t\t\t\t\t\t\t   long foreignPrivInfo2,\n\t\t\t\t\t\t\t\t   long foreignPrivInfo3,\n\t\t\t\t\t\t\t\t   long foreignPrivInfo4);\n/*\t Change the native access-control information.\n\tThe FSpSetForeignPrivs function changes the native access-control\n\tinformation for a file or directory stored on a volume managed by\n\ta foreign file system.\n\t\n\tspec\t\t\t\tinput:\tAn FSSpec record specifying the object.\n\tforeignPrivBuffer\tinput:\tPointer to privilege information buffer.\n\tforeignPrivSize\t\tinput:\tSize of buffer pointed to by\n\t\t\t\t\t\t\t\tforeignPrivBuffer.\n\t\t\t\t\t\toutput: Amount of buffer actually used.\n\tforeignPrivInfo1\tinput:\tInformation specific to privilege model.\n\tforeignPrivInfo2\tinput:\tInformation specific to privilege model.\n\tforeignPrivInfo3\tinput:\tInformation specific to privilege model.\n\tforeignPrivInfo4\tinput:\tInformation specific to privilege model.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tparamErr\t\t\t-50\t\tVolume is HFS or MFS (that is, it has\n\t\t\t\t\t\t\t\t\tno foreign privilege model), or foreign\n\t\t\t\t\t\t\t\t\tvolume does not support these calls\n\t\n\t__________\n\t\n\tAlso see:\tGetForeignPrivs, FSpGetForeignPrivs, SetForeignPrivs\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tHGetLogInInfo(ConstStr255Param volName,\n\t\t\t\t\t\t\t  short vRefNum,\n\t\t\t\t\t\t\t  short *loginMethod,\n\t\t\t\t\t\t\t  StringPtr userName);\n/*\t Get the login method and user name used to log on to a shared volume.\n\tThe HGetLogInInfo function retrieves the login method and user name\n\tused to log on to a particular shared volume.\n\t\n\tvolName\t\tinput:\tA pointer to the name of a mounted volume\n\t\t\t\t\t\tor nil.\n\tvRefNum\t\tinput:\tThe volume reference number.\n\tloginMethod\toutput:\tThe login method used (kNoUserAuthentication,\n\t\t\t\t\t\tkPassword, kEncryptPassword, or\n\t\t\t\t\t\tkTwoWayEncryptPassword).\n\tuserName\tinput:\tPoints to a buffer (minimum Str31) where the user\n\t\t\t\t\t\tname is to be returned or must be nil.\n\t\t\t\toutput:\tThe user name.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tSpecified volume doesnt exist\n\t\tparamErr\t\t\t-50\t\tFunction not supported by volume\n\t\n\t__________\n\t\n\tAlso see:\tHGetDirAccess, FSpGetDirAccess, HSetDirAccess,\n\t\t\t\tFSpSetDirAccess, HMapName, HMapID\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tHGetDirAccess(short vRefNum,\n\t\t\t\t\t\t\t  long dirID,\n\t\t\t\t\t\t\t  ConstStr255Param name,\n\t\t\t\t\t\t\t  long *ownerID,\n\t\t\t\t\t\t\t  long *groupID,\n\t\t\t\t\t\t\t  long *accessRights);\n/*\t Get a directory's access control information on a shared volume.\n\tThe HGetDirAccess function retrieves the directory access control\n\tinformation for a directory on a shared volume.\n\t\n\tvRefNum\t\t\tinput:\tVolume specification.\n\tdirID\t\t\tinput:\tDirectory ID.\n\tname\t\t\tinput:\tPointer to directory name, or nil if dirID\n\t\t\t\t\t\t\tspecifies the directory.\n\townerID\t\t\toutput:\tThe directory's owner ID.\n\tgroupID\t\t\toutput:\tThe directory's group ID or\n\t\t\t\t\t\t\t0 if no group affiliation.\n\taccessRights\toutput:\tThe directory's access rights.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tfnfErr\t\t\t\t-43\t\tDirectory not found\n\t\tparamErr\t\t\t-50\t\tFunction not supported by volume\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\t\t\t\t\t\t\t\tto the directory\n\t\n\t__________\n\t\n\tAlso see:\tHGetLogInInfo, FSpGetDirAccess, HSetDirAccess,\n\t\t\t\tFSpSetDirAccess, HMapName, HMapID\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpGetDirAccess(const FSSpec *spec,\n\t\t\t\t\t\t\t\tlong *ownerID,\n\t\t\t\t\t\t\t\tlong *groupID,\n\t\t\t\t\t\t\t\tlong *accessRights);\n/*\t Get a directory's access control information on a shared volume.\n\tThe FSpGetDirAccess function retrieves the directory access control\n\tinformation for a directory on a shared volume.\n\t\n\tspec\t\t\tinput:\tAn FSSpec record specifying the directory.\n\townerID\t\t\toutput:\tThe directory's owner ID.\n\tgroupID\t\t\toutput:\tThe directory's group ID or\n\t\t\t\t\t\t\t0 if no group affiliation.\n\taccessRights\toutput:\tThe directory's access rights.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tfnfErr\t\t\t\t-43\t\tDirectory not found\n\t\tparamErr\t\t\t-50\t\tFunction not supported by volume\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\t\t\t\t\t\t\t\tto the directory\n\t\n\t__________\n\t\n\tAlso see:\tHGetLogInInfo, HGetDirAccess, HSetDirAccess,\n\t\t\t\tFSpSetDirAccess, HMapName, HMapID\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tHSetDirAccess(short vRefNum,\n\t\t\t\t\t\t\t  long dirID,\n\t\t\t\t\t\t\t  ConstStr255Param name,\n\t\t\t\t\t\t\t  long ownerID,\n\t\t\t\t\t\t\t  long groupID,\n\t\t\t\t\t\t\t  long accessRights);\n/*\t Set a directory's access control information on a shared volume.\n\tThe HSetDirAccess function changes the directory access control\n\tinformation for a directory on a shared volume. You must own a directory\n\tto change its access control information.\n\t\n\tvRefNum\t\t\tinput:\tVolume specification.\n\tdirID\t\t\tinput:\tDirectory ID.\n\tname\t\t\tinput:\tPointer to directory name, or nil if dirID\n\t\t\t\t\t\t\tspecifies the directory.\n\townerID\t\t\tinput:\tThe directory's owner ID.\n\tgroupID\t\t\tinput:\tThe directory's group ID or\n\t\t\t\t\t\t\t0 if no group affiliation.\n\taccessRights\tinput:\tThe directory's access rights.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tfnfErr\t\t\t\t-43\t\tDirectory not found\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tParameter error\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\t\t\t\t\t\t\t\tto the directory\n\t\tafpObjectTypeErr\t-5025\tObject is a file, not a directory\n\t\n\t__________\n\t\n\tAlso see:\tHGetLogInInfo, HGetDirAccess, FSpGetDirAccess,\n\t\t\t\tFSpSetDirAccess, HMapName, HMapID\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpSetDirAccess(const FSSpec *spec,\n\t\t\t\t\t\t\t\tlong ownerID,\n\t\t\t\t\t\t\t\tlong groupID,\n\t\t\t\t\t\t\t\tlong accessRights);\n/*\t Set a directory's access control information on a shared volume.\n\tThe FSpSetDirAccess function changes the directory access control\n\tinformation for a directory on a shared volume. You must own a directory\n\tto change its access control information.\n\t\n\tspec\t\t\tinput:\tAn FSSpec record specifying the directory.\n\townerID\t\t\tinput:\tThe directory's owner ID.\n\tgroupID\t\t\tinput:\tThe directory's group ID or\n\t\t\t\t\t\t\t0 if no group affiliation.\n\taccessRights\tinput:\tThe directory's access rights.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tfnfErr\t\t\t\t-43\t\tDirectory not found\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tParameter error\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\t\t\t\t\t\t\t\tto the directory\n\t\tafpObjectTypeErr\t-5025\tObject is a file, not a directory\n\t\n\t__________\n\t\n\tAlso see:\tHGetLogInInfo, HGetDirAccess, FSpGetDirAccess, HSetDirAccess,\n\t\t\t\tHMapName, HMapID\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tHMapID(ConstStr255Param volName,\n\t\t\t\t\t   short vRefNum,\n\t\t\t\t\t   long ugID,\n\t\t\t\t\t   short objType,\n\t\t\t\t\t   StringPtr name);\n/*\t Map a user or group ID to a user or group name.\n\tThe HMapID function determines the name of a user or group if you know\n\tthe user or group ID.\n\t\n\tvolName\t\tinput:\tA pointer to the name of a mounted volume\n\t\t\t\t\t\tor nil.\n\tvRefNum\t\tinput:\tVolume specification.\n\tobjType\t\tinput:\tThe mapping function code: 1 if you're mapping a\n\t\t\t\t\t\tuser ID to a user name or 2 if you're mapping a\n\t\t\t\t\t\tgroup ID to a group name.\n\tname\t\tinput:\tPoints to a buffer (minimum Str31) where the user\n\t\t\t\t\t\tor group name is to be returned or must be nil.\n\t\t\t\toutput:\tThe user or group name.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tfnfErr\t\t\t\t-43\t\tUnrecognizable owner or group name\n\t\tparamErr\t\t\t-50\t\tFunction not supported by volume\n\t\n\t__________\n\t\n\tAlso see:\tHGetLogInInfo, HGetDirAccess, FSpGetDirAccess, HSetDirAccess,\n\t\t\t\tFSpSetDirAccess, HMapName\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tHMapName(ConstStr255Param volName,\n\t\t\t\t\t\t short vRefNum,\n\t\t\t\t\t\t ConstStr255Param name,\n\t\t\t\t\t\t short objType,\n\t\t\t\t\t\t long *ugID);\n/*\t Map a user or group name to a user or group ID.\n\tThe HMapName function determines the user or group ID if you know the\n\tuser or group name.\n\t\n\tvolName\t\tinput:\tA pointer to the name of a mounted volume\n\t\t\t\t\t\tor nil.\n\tvRefNum\t\tinput:\tVolume specification.\n\tname\t\tinput:\tThe user or group name.\n\tobjType\t\tinput:\tThe mapping function code: 3 if you're mapping a\n\t\t\t\t\t\tuser name to a user ID or 4 if you're mapping a\n\t\t\t\t\t\tgroup name to a group ID.\n\tugID\t\toutput:\tThe user or group ID.\n\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tfnfErr\t\t\t\t-43\t\tUnrecognizable owner or group name\n\t\tparamErr\t\t\t-50\t\tFunction not supported by volume\n\t\n\t__________\n\t\n\tAlso see:\tHGetLogInInfo, HGetDirAccess, FSpGetDirAccess, HSetDirAccess,\n\t\t\t\tFSpSetDirAccess, HMapID\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tHCopyFile(short srcVRefNum,\n\t\t\t\t\t\t  long srcDirID,\n\t\t\t\t\t\t  ConstStr255Param srcName,\n\t\t\t\t\t\t  short dstVRefNum,\n\t\t\t\t\t\t  long dstDirID,\n\t\t\t\t\t\t  ConstStr255Param dstPathname,\n\t\t\t\t\t\t  ConstStr255Param copyName);\n/*\t Duplicate a file on a file server and optionally to rename it.\n\tThe HCopyFile function duplicates a file and optionally to renames it.\n\tThe source and destination volumes must be on the same file server.\n\tThis function instructs the server to copy the file.\n\t\n\tsrcVRefNum\tinput:\tSource volume specification.\n\tsrcDirID\tinput:\tSource directory ID.\n\tsrcName\t\tinput:\tSource file name.\n\tdstVRefNum\tinput:\tDestination volume specification.\n\tdstDirID\tinput:\tDestination directory ID.\n\tdstPathname\tinput:\tPointer to destination directory name, or\n\t\t\t\t\t\tnil when dstDirID specifies a directory.\n\tcopyName\tinput:\tPoints to the new file name if the file is to be\n\t\t\t\t\t\trenamed or nil if the file isn't to be renamed.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tdskFulErr\t\t\t-34\t\tDestination volume is full\n\t\tfnfErr\t\t\t\t-43\t\tSource file not found, or destination\n\t\t\t\t\t\t\t\t\tdirectory does not exist\n\t\tvLckdErr\t \t\t-46\t\tDestination volume is read-only\n\t\tfBsyErr\t \t\t\t-47\t\tThe source or destination file could\n\t\t\t\t\t\t\t\t\tnot be opened with the correct access\n\t\t\t\t\t\t\t\t\tmodes\n\t\tdupFNErr\t\t\t-48\t\tDestination file already exists\n\t\tparamErr\t\t\t-50\t\tFunction not supported by volume\n\t\twrgVolTypErr\t\t-123\tFunction not supported by volume\n\t\tafpAccessDenied\t\t-5000\tThe user does not have the right to\n\t\t\t\t\t\t\t\t\tread the source or write to the\n\t\t\t\t\t\t\t\t\tdestination\n\t\tafpDenyConflict\t\t-5006\tThe source or destination file could\n\t\t\t\t\t\t\t\t\tnot be opened with the correct access\n\t\t\t\t\t\t\t\t\tmodes\n\t\tafpObjectTypeErr\t-5025\tSource is a directory\n\t\n\t__________\n\t\n\tAlso see:\tFSpCopyFile, FileCopy, FSpFileCopy\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpCopyFile(const FSSpec *srcSpec,\n\t\t\t\t\t\t\tconst FSSpec *dstSpec,\n\t\t\t\t\t\t\tConstStr255Param copyName);\n/*\t Duplicate a file on a file server and optionally to rename it.\n\tThe FSpCopyFile function duplicates a file and optionally to renames it.\n\tThe source and destination volumes must be on the same file server.\n\tThis function instructs the server to copy the file.\n\t\n\tsrcSpec\t\tinput:\tAn FSSpec record specifying the source file.\n\tdstSpec\t\tinput:\tAn FSSpec record specifying the destination\n\t\t\t\t\t\tdirectory.\n\tcopyName\tinput:\tPoints to the new file name if the file is to be\n\t\t\t\t\t\trenamed or nil if the file isn't to be renamed.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tdskFulErr\t\t\t-34\t\tDestination volume is full\n\t\tfnfErr\t\t\t\t-43\t\tSource file not found, or destination\n\t\t\t\t\t\t\t\t\tdirectory does not exist\n\t\tvLckdErr\t \t\t-46\t\tDestination volume is read-only\n\t\tfBsyErr\t \t\t\t-47\t\tThe source or destination file could\n\t\t\t\t\t\t\t\t\tnot be opened with the correct access\n\t\t\t\t\t\t\t\t\tmodes\n\t\tdupFNErr\t\t\t-48\t\tDestination file already exists\n\t\tparamErr\t\t\t-50\t\tFunction not supported by volume\n\t\twrgVolTypErr\t\t-123\tFunction not supported by volume\n\t\tafpAccessDenied\t\t-5000\tThe user does not have the right to\n\t\t\t\t\t\t\t\t\tread the source or write to the\n\t\t\t\t\t\t\t\t\tdestination\n\t\tafpDenyConflict\t\t-5006\tThe source or destination file could\n\t\t\t\t\t\t\t\t\tnot be opened with the correct access\n\t\t\t\t\t\t\t\t\tmodes\n\t\tafpObjectTypeErr\t-5025\tSource is a directory\n\t\n\t__________\n\t\n\tAlso see:\tHCopyFile, FileCopy, FSpFileCopy\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tHMoveRename(short vRefNum,\n\t\t\t\t\t\t\tlong srcDirID,\n\t\t\t\t\t\t\tConstStr255Param srcName,\n\t\t\t\t\t\t\tlong dstDirID,\n\t\t\t\t\t\t\tConstStr255Param dstpathName,\n\t\t\t\t\t\t\tConstStr255Param copyName);\n/*\t Move a file or directory on a file server and optionally to rename it.\n\tThe HMoveRename function moves a file or directory and optionally\n\trenames it. The source and destination locations must be on the same\n\tshared volume.\n\t\n\tvRefNum\t\tinput:\tVolume specification.\n\tsrcDirID\tinput:\tSource directory ID.\n\tsrcName\t\tinput:\tThe source object name.\n\tdstDirID\tinput:\tDestination directory ID.\n\tdstName\t\tinput:\tPointer to destination directory name, or\n\t\t\t\t\t\tnil when dstDirID specifies a directory.\n\tcopyName\tinput:\tPoints to the new name if the object is to be\n\t\t\t\t\t\trenamed or nil if the object isn't to be renamed.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tfnfErr\t\t\t\t-43\t\tSource file or directory not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tDestination volume is read-only\n\t\tdupFNErr\t\t\t-48\t\tDestination already exists\n\t\tparamErr\t\t\t-50\t\tFunction not supported by volume\n\t\tbadMovErr\t\t\t-122\tAttempted to move directory into\n\t\t\t\t\t\t\t\t\toffspring\n\t\tafpAccessDenied\t\t-5000\tThe user does not have the right to\n\t\t\t\t\t\t\t\t\tmove the file  or directory\n\t\n\t__________\n\t\n\tAlso see:\tFSpMoveRename, HMoveRenameCompat, FSpMoveRenameCompat\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpMoveRename(const FSSpec *srcSpec,\n\t\t\t\t\t\t\t  const FSSpec *dstSpec,\n\t\t\t\t\t\t\t  ConstStr255Param copyName);\n/*\t Move a file or directory on a file server and optionally to rename it.\n\tThe FSpMoveRename function moves a file or directory and optionally\n\trenames it. The source and destination locations must be on the same\n\tshared volume.\n\t\n\tsrcSpec\t\tinput:\tAn FSSpec record specifying the source object.\n\tdstSpec\t\tinput:\tAn FSSpec record specifying the destination\n\t\t\t\t\t\tdirectory.\n\tcopyName\tinput:\tPoints to the new name if the object is to be\n\t\t\t\t\t\trenamed or nil if the object isn't to be renamed.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tfnfErr\t\t\t\t-43\t\tSource file or directory not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tDestination volume is read-only\n\t\tdupFNErr\t\t\t-48\t\tDestination already exists\n\t\tparamErr\t\t\t-50\t\tFunction not supported by volume\n\t\tbadMovErr\t\t\t-122\tAttempted to move directory into\n\t\t\t\t\t\t\t\t\toffspring\n\t\tafpAccessDenied\t\t-5000\tThe user does not have the right to\n\t\t\t\t\t\t\t\t\tmove the file  or directory\n\t\n\t__________\n\t\n\tAlso see:\tHMoveRename, HMoveRenameCompat, FSpMoveRenameCompat\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetVolMountInfoSize(ConstStr255Param volName,\n\t\t\t\t\t\t\t\t\tshort vRefNum,\n\t\t\t\t\t\t\t\t\tshort *size);\n/*\t Get the size of a volume mounting information record.\n\tThe GetVolMountInfoSize function determines the how much space the\n\tprogram needs to allocate for a volume mounting information record.\n\t\n\tvolName\t\tinput:\tA pointer to the name of a mounted volume\n\t\t\t\t\t\tor nil.\n\tvRefNum\t\tinput:\tVolume specification.\n\tsize\t\toutput:\tThe space needed (in bytes) of the volume mounting\n\t\t\t\t\t\tinformation record.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tparamErr\t\t\t-50\t\tParameter error\n\t\textFSErr\t\t\t-58\t\tExternal file system error - no file\n\t\t\t\t\t\t\t\t\tsystem claimed this call.\n\n\t__________\n\t\n\tAlso see:\tGetVolMountInfo, VolumeMount BuildAFPVolMountInfo,\n\t\t\t\tRetrieveAFPVolMountInfo\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetVolMountInfo(ConstStr255Param volName,\n\t\t\t\t\t\t\t\tshort vRefNum,\n\t\t\t\t\t\t\t\tvoid *volMountInfo);\n/*\t Retrieve a volume mounting information record.\n\tThe GetVolMountInfo function retrieves a volume mounting information\n\trecord containing all the information needed to mount the volume,\n\texcept for passwords.\n\t\n\tvolName\t\t\tinput:\tA pointer to the name of a mounted volume\n\t\t\t\t\t\t\tor nil.\n\tvRefNum\t\t\tinput:\tVolume specification.\n\tvolMountInfo\toutput:\tPoints to a volume mounting information\n\t\t\t\t\t\t\trecord where the mounting information is to\n\t\t\t\t\t\t\tbe returned.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\t\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\t\n\t\tparamErr\t\t\t-50\t\tParameter error\t\n\t\textFSErr\t\t\t-58\t\tExternal file system error - no file\n\t\t\t\t\t\t\t\t\tsystem claimed this call.\n\n\t__________\n\t\n\tAlso see:\tGetVolMountInfoSize, VolumeMount, BuildAFPVolMountInfo,\n\t\t\t\tRetrieveAFPVolMountInfo\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tVolumeMount(const void *volMountInfo,\n\t\t\t\t\t\t\tshort *vRefNum);\n/*\t Mount a volume using a volume mounting information record.\n\tThe VolumeMount function mounts a volume using a volume mounting\n\tinformation record.\n\t\n\tvolMountInfo\tinput:\tPoints to a volume mounting information record.\n\tvRefNum\t\t\toutput:\tA volume reference number.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnotOpenErr\t\t\t-28\t\tAppleTalk is not open\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tparamErr\t\t\t-50\t\tParameter error; typically, zone, server,\n\t\t\t\t\t\t\t\t\tand volume name combination is not valid\n\t\t\t\t\t\t\t\t\tor not complete, or the user name is not\n\t\t\t\t\t\t\t\t\trecognized\n\t\textFSErr\t\t\t-58\t\tExternal file system error - no file\n\t\t\t\t\t\t\t\t\tsystem claimed this call.\n\t\tmemFullErr\t\t\t-108\tNot enough memory to create a new volume\n\t\t\t\t\t\t\t\t\tcontrol block for mounting the volume\n\t\tafpBadUAM\t\t\t-5002\tUser authentication method is unknown\n\t\tafpBadVersNum\t\t-5003\tWorkstation is using an AFP version that\n\t\t\t\t\t\t\t\t\tthe server doesnt recognize\n\t\tafpNoServer\t\t\t-5016\tServer is not responding\n\t\tafpUserNotAuth\t\t-5023\tUser authentication failed (usually,\n\t\t\t\t\t\t\t\t\tpassword  is not correct)\n\t\tafpPwdExpired\t\t-5042\tPassword has expired on server\n\t\tafpBadDirIDType\t\t-5060\tNot a fixed directory ID volume\n\t\tafpCantMountMoreSrvrs -5061\tMaximum number of volumes has been\n\t\t\t\t\t\t\t\t\tmounted\n\t\tafpAlreadyMounted\t-5062\tVolume already mounted\n\t\tafpSameNodeErr\t\t-5063\tAttempt to log on to a server running\n\t\t\t\t\t\t\t\t\ton the same machine\n\n\t__________\n\t\n\tAlso see:\tGetVolMountInfoSize, GetVolMountInfo, BuildAFPVolMountInfo,\n\t\t\t\tRetrieveAFPVolMountInfo\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tShare(short vRefNum,\n\t\t\t\t\t  long dirID,\n\t\t\t\t\t  ConstStr255Param name);\n/*\t Establish a local volume or directory as a share point.\n\tThe Share function establishes a local volume or directory as a\n\tshare point.\n\n\tvRefNum\t\t\tinput:\tVolume specification.\n\tdirID\t\t\tinput:\tDirectory ID.\n\tname\t\t\tinput:\tPointer to directory name, or nil if dirID\n\t\t\t\t\t\t\tspecifies the directory.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\t\n\t\ttmfoErr\t\t\t\t-42\t\tToo many share points\t\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\t\n\t\tdupFNErr\t\t\t-48\t\tAlready a share point with this name\t\n\t\tparamErr\t\t\t-50\t\tFunction not supported by volume\t\n\t\tdirNFErrdirNFErr\t-120\tDirectory not found\t\n\t\tafpAccessDenied\t\t-5000\tThis directory cannot be shared\t\n\t\tafpObjectTypeErr\t-5025\tObject was a file, not a directory\t\n\t\tafpContainsSharedErr -5033\tThe directory contains a share point\t\n\t\tafpInsideSharedErr\t-5043\tThe directory is inside a shared directory\t\n\n\t__________\n\t\n\tAlso see:\tFSpShare, Unshare, FSpUnshare\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpShare(const FSSpec *spec);\n/*\t Establish a local volume or directory as a share point.\n\tThe FSpShare function establishes a local volume or directory as a\n\tshare point.\n\n\tspec\tinput:\tAn FSSpec record specifying the share point.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\t\n\t\ttmfoErr\t\t\t\t-42\t\tToo many share points\t\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\t\n\t\tdupFNErr\t\t\t-48\t\tAlready a share point with this name\t\n\t\tparamErr\t\t\t-50\t\tFunction not supported by volume\t\n\t\tdirNFErrdirNFErr\t-120\tDirectory not found\t\n\t\tafpAccessDenied\t\t-5000\tThis directory cannot be shared\t\n\t\tafpObjectTypeErr\t-5025\tObject was a file, not a directory\t\n\t\tafpContainsSharedErr -5033\tThe directory contains a share point\t\n\t\tafpInsideSharedErr\t-5043\tThe directory is inside a shared directory\t\n\n\t__________\n\t\n\tAlso see:\tShare, Unshare, FSpUnshare\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tUnshare(short vRefNum,\n\t\t\t\t\t\tlong dirID,\n\t\t\t\t\t\tConstStr255Param name);\n/*\t Remove a share point.\n\tThe Unshare function removes a share point.\n\n\tvRefNum\t\t\tinput:\tVolume specification.\n\tdirID\t\t\tinput:\tDirectory ID.\n\tname\t\t\tinput:\tPointer to directory name, or nil if dirID\n\t\t\t\t\t\t\tspecifies the directory.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\t\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\t\n\t\tparamErr\t\t\t-50\t\tFunction not supported by volume\t\n\t\tdirNFErrdirNFErr\t-120\tDirectory not found\t\n\t\tafpObjectTypeErr\t-5025\tObject was a file, not a directory; or,\n\t\t\t\t\t\t\t\t\tthis directory is not a share point\t\n\n\t__________\n\t\n\tAlso see:\tShare, FSpShare, FSpUnshare\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpUnshare(const FSSpec *spec);\n/*\t Remove a share point.\n\tThe FSpUnshare function removes a share point.\n\n\tspec\tinput:\tAn FSSpec record specifying the share point.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\t\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\t\n\t\tparamErr\t\t\t-50\t\tFunction not supported by volume\t\n\t\tdirNFErrdirNFErr\t-120\tDirectory not found\t\n\t\tafpObjectTypeErr\t-5025\tObject was a file, not a directory; or,\n\t\t\t\t\t\t\t\t\tthis directory is not a share point\t\n\n\t__________\n\t\n\tAlso see:\tShare, FSpShare, Unshare\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetUGEntry(short objType,\n\t\t\t\t\t\t   StringPtr objName,\n\t\t\t\t\t\t   long *objID);\n/*\t Retrieve a user or group entry from the local file server.\n\tThe GetUGEntry function retrieves user or group entries from the\n\tlocal file server.\n\n\tobjType\t\tinput:\tThe object type: -1 = group; 0 = user\n\tobjName\t\tinput:\tPoints to a buffer (minimum Str31) where the user\n\t\t\t\t\t\tor group name is to be returned or must be nil.\n\t\t\t\toutput:\tThe user or group name.\n\tobjID\t\tinput:\tO to get the first user or group. If the entry objID\n\t\t\t\t\t\tlast returned by GetUGEntry is passed, then user or\n\t\t\t\t\t\tgroup whose alphabetically next in the list of entries\n\t\t\t\t\t\tis returned.\n\t\t\t\toutput:\tThe user or group ID.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\t\n\t\tfnfErr\t\t\t\t-43\t\tNo more users or groups\t\n\t\tparamErr\t\t\t-50\t\tFunction not supported; or, ioObjID is\n\t\t\t\t\t\t\t\t\tnegative\t\n\n\t__________\n\t\n\tAlso see:\tGetUGEntries\n*/\n\n/*****************************************************************************/\n\n#ifdef __cplusplus\n}\n#endif\n\n#include \"OptimizationEnd.h\"\n\n#endif\t/* __MOREFILES__ */\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/MoreFiles 1.5/C Headers/MoreFilesExtras.h",
    "content": "/*\n**\tApple Macintosh Developer Technical Support\n**\n**\tA collection of useful high-level File Manager routines.\n**\n**\tby Jim Luther, Apple Developer Technical Support Emeritus\n**\n**\tFile:\t\tMoreFilesExtras.h\n**\n**\tCopyright  1992-1999 Apple Computer, Inc.\n**\tAll rights reserved.\n**\n**\tYou may incorporate this sample code into your applications without\n**\trestriction, though the sample code has been provided \"AS IS\" and the\n**\tresponsibility for its operation is 100% yours.  However, what you are\n**\tnot permitted to do is to redistribute the source as \"DSC Sample Code\"\n**\tafter having made changes. If you're going to re-distribute the source,\n**\twe require that you make it clear in the source that the code was\n**\tdescended from Apple Sample Code, but that you've made changes.\n*/\n\n#ifndef __MOREFILESEXTRAS__\n#define __MOREFILESEXTRAS__\n\n#include <Types.h>\n#include <Files.h>\n\n#include \"Optimization.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*****************************************************************************/\n\n/*\n**\tMacros to get information out of GetVolParmsInfoBuffer\n*/\n\n/* version 1 field getters */\n#define\tGetVolParmsInfoVersion(volParms) \\\n\t\t((volParms).vMVersion)\n#define\tGetVolParmsInfoAttrib(volParms) \\\n\t\t((volParms).vMAttrib)\n#define\tGetVolParmsInfoLocalHand(volParms) \\\n\t\t((volParms).vMLocalHand)\n#define\tGetVolParmsInfoServerAdr(volParms) \\\n\t\t((volParms).vMServerAdr)\n/* version 2 field getters (assume zero result if not version >= 2) */\n#define\tGetVolParmsInfoVolumeGrade(volParms) \\\n\t\t(((volParms).vMVersion >= 2) ? (volParms).vMVolumeGrade : 0)\n#define\tGetVolParmsInfoForeignPrivID(volParms) \\\n\t\t(((volParms).vMVersion >= 2) ? (volParms).vMForeignPrivID : 0)\n/* version 3 field getters (assume zero result if not version >= 3) */\n#define\tGetVolParmsInfoExtendedAttributes(volParms) \\\n\t\t(((volParms).vMVersion >= 3) ? (volParms).vMExtendedAttributes : 0)\n\n/* attribute bits supported by all versions of GetVolParmsInfoBuffer */\n#define isNetworkVolume(volParms)\t((volParms).vMServerAdr != 0)\n#define\thasLimitFCBs(volParms)\t\t(((volParms).vMAttrib & (1L << bLimitFCBs)) != 0)\n#define\thasLocalWList(volParms)\t\t(((volParms).vMAttrib & (1L << bLocalWList)) != 0)\n#define\thasNoMiniFndr(volParms)\t\t(((volParms).vMAttrib & (1L << bNoMiniFndr)) != 0)\n#define hasNoVNEdit(volParms)\t\t(((volParms).vMAttrib & (1L << bNoVNEdit)) != 0)\n#define hasNoLclSync(volParms)\t\t(((volParms).vMAttrib & (1L << bNoLclSync)) != 0)\n#define hasTrshOffLine(volParms)\t(((volParms).vMAttrib & (1L << bTrshOffLine)) != 0)\n#define hasNoSwitchTo(volParms)\t\t(((volParms).vMAttrib & (1L << bNoSwitchTo)) != 0)\n#define hasNoDeskItems(volParms)\t(((volParms).vMAttrib & (1L << bNoDeskItems)) != 0)\n#define hasNoBootBlks(volParms)\t\t(((volParms).vMAttrib & (1L << bNoBootBlks)) != 0)\n#define hasAccessCntl(volParms)\t\t(((volParms).vMAttrib & (1L << bAccessCntl)) != 0)\n#define hasNoSysDir(volParms)\t\t(((volParms).vMAttrib & (1L << bNoSysDir)) != 0)\n#define hasExtFSVol(volParms)\t\t(((volParms).vMAttrib & (1L << bHasExtFSVol)) != 0)\n#define hasOpenDeny(volParms)\t\t(((volParms).vMAttrib & (1L << bHasOpenDeny)) != 0)\n#define hasCopyFile(volParms)\t\t(((volParms).vMAttrib & (1L << bHasCopyFile)) != 0)\n#define hasMoveRename(volParms)\t\t(((volParms).vMAttrib & (1L << bHasMoveRename)) != 0)\n#define hasDesktopMgr(volParms)\t\t(((volParms).vMAttrib & (1L << bHasDesktopMgr)) != 0)\n#define hasShortName(volParms)\t\t(((volParms).vMAttrib & (1L << bHasShortName)) != 0)\n#define hasFolderLock(volParms)\t\t(((volParms).vMAttrib & (1L << bHasFolderLock)) != 0)\n#define hasPersonalAccessPrivileges(volParms) \\\n\t\t(((volParms).vMAttrib & (1L << bHasPersonalAccessPrivileges)) != 0)\n#define hasUserGroupList(volParms)\t(((volParms).vMAttrib & (1L << bHasUserGroupList)) != 0)\n#define hasCatSearch(volParms)\t\t(((volParms).vMAttrib & (1L << bHasCatSearch)) != 0)\n#define hasFileIDs(volParms)\t\t(((volParms).vMAttrib & (1L << bHasFileIDs)) != 0)\n#define hasBTreeMgr(volParms)\t\t(((volParms).vMAttrib & (1L << bHasBTreeMgr)) != 0)\n#define hasBlankAccessPrivileges(volParms) \\\n\t\t(((volParms).vMAttrib & (1L << bHasBlankAccessPrivileges)) != 0)\n#define supportsAsyncRequests(volParms) \\\n\t\t(((volParms).vMAttrib & (1L << bSupportsAsyncRequests)) != 0)\n#define supportsTrashVolumeCache(volParms) \\\n\t\t(((volParms).vMAttrib & (1L << bSupportsTrashVolumeCache)) != 0)\n\n/* attribute bits supported by version 3 and greater versions of GetVolParmsInfoBuffer */\n#define volIsEjectable(volParms) \\\n\t\t((GetVolParmsInfoExtendedAttributes(volParms) & (1L << bIsEjectable)) != 0)\n#define volSupportsHFSPlusAPIs(volParms) \\\n\t\t((GetVolParmsInfoExtendedAttributes(volParms) & (1L << bSupportsHFSPlusAPIs)) != 0)\n#define volSupportsFSCatalogSearch(volParms) \\\n\t\t((GetVolParmsInfoExtendedAttributes(volParms) & (1L << bSupportsFSCatalogSearch)) != 0)\n#define volSupportsFSExchangeObjects(volParms) \\\n\t\t((GetVolParmsInfoExtendedAttributes(volParms) & (1L << bSupportsFSExchangeObjects)) != 0)\n#define volSupports2TBFiles(volParms) \\\n\t\t((GetVolParmsInfoExtendedAttributes(volParms) & (1L << bSupports2TBFiles)) != 0)\n#define volSupportsLongNames(volParms) \\\n\t\t((GetVolParmsInfoExtendedAttributes(volParms) & (1L << bSupportsLongNames)) != 0)\n#define volSupportsMultiScriptNames(volParms) \\\n\t\t((GetVolParmsInfoExtendedAttributes(volParms) & (1L << bSupportsMultiScriptNames)) != 0)\n#define volSupportsNamedForks(volParms) \\\n\t\t((GetVolParmsInfoExtendedAttributes(volParms) & (1L << bSupportsNamedForks)) != 0)\n#define volSupportsSubtreeIterators(volParms) \\\n\t\t((GetVolParmsInfoExtendedAttributes(volParms) & (1L << bSupportsSubtreeIterators)) != 0)\n#define volL2PCanMapFileBlocks(volParms) \\\n\t\t((GetVolParmsInfoExtendedAttributes(volParms) & (1L << bL2PCanMapFileBlocks)) != 0)\n\n/*****************************************************************************/\n\n/*\n**\tBit masks and macros to get common information out of ioACUser returned\n**\tby PBGetCatInfo (remember to clear ioACUser before calling PBGetCatInfo\n**\tsince some file systems don't bother to set this field).\n**\n**\tUse the GetDirAccessRestrictions or FSpGetDirAccessRestrictions\n**\tfunctions to retrieve the ioACUser access restrictions byte for\n**\ta folder.\n**\n**\tNote:\tThe access restriction byte returned by PBGetCatInfo is the\n**\t\t\t2's complement of the user's privileges byte returned in\n**\t\t\tioACAccess by PBHGetDirAccess.\n*/\n\nenum\n{\n\t/* mask for just the access restriction bits */\n\tacUserAccessMask\t\t= (kioACUserNoSeeFolderMask + kioACUserNoSeeFilesMask + kioACUserNoMakeChangesMask),\n\t\n\t/* common access privilege settings */\n\tacUserFull\t\t\t\t= 0x00,\t\t\t\t\t\t/* no access restiction bits on */\n\tacUserNone\t\t\t\t= acUserAccessMask,\t\t\t/* all access restiction bits on */\n\tacUserDropBox\t\t\t= kioACUserNoSeeFolderMask + kioACUserNoSeeFilesMask, /* make changes, but not see files or folders */\n\tacUserBulletinBoard\t\t= kioACUserNoMakeChangesMask /* see files and folders, but not make changes */\n};\n\n/* Macros for testing ioACUser bits */\n#define\tuserIsOwner(ioACUser)\t\\\n\t\t(((ioACUser) & kioACUserNotOwnerMask) == 0)\n#define\tuserHasFullAccess(ioACUser)\t\\\n\t\t(((ioACUser) & (acUserAccessMask)) == acUserFull)\n#define\tuserHasDropBoxAccess(ioACUser)\t\\\n\t\t(((ioACUser) & acUserAccessMask) == acUserDropBox)\n#define\tuserHasBulletinBoard(ioACUser)\t\\\n\t\t(((ioACUser) & acUserAccessMask) == acUserBulletinBoard)\n#define\tuserHasNoAccess(ioACUser)\t\t\\\n\t\t(((ioACUser) & acUserAccessMask) == acUserNone)\n\n/*****************************************************************************/\n\n/*\n**\tDeny mode permissions for use with the HOpenAware, HOpenRFAware,\n**\tFSpOpenAware, and FSpOpenRFAware functions.\n**\tNote: Common settings are the ones with comments.\n*/\n\nenum\n{\n\tdmNone\t\t\t= 0x0000,\n\tdmNoneDenyRd\t= fsRdDenyPerm,\n\tdmNoneDenyWr\t= fsWrDenyPerm,\n\tdmNoneDenyRdWr\t= (fsRdDenyPerm + fsWrDenyPerm),\n\tdmRd\t\t\t= fsRdPerm,\t\t\t\t\t\t/* Single writer, multiple readers; the readers */\n\tdmRdDenyRd\t\t= (fsRdPerm + fsRdDenyPerm),\n\tdmRdDenyWr\t\t= (fsRdPerm + fsWrDenyPerm),\t/* Browsing - equivalent to fsRdPerm */\n\tdmRdDenyRdWr\t= (fsRdPerm + fsRdDenyPerm + fsWrDenyPerm),\n\tdmWr\t\t\t= fsWrPerm,\n\tdmWrDenyRd\t\t= (fsWrPerm + fsRdDenyPerm),\n\tdmWrDenyWr\t\t= (fsWrPerm + fsWrDenyPerm),\n\tdmWrDenyRdWr\t= (fsWrPerm + fsRdDenyPerm + fsWrDenyPerm),\n\tdmRdWr\t\t\t= fsRdWrPerm,\t\t\t\t\t/* Shared access - equivalent to fsRdWrShPerm */\n\tdmRdWrDenyRd\t= (fsRdWrPerm + fsRdDenyPerm),\n\tdmRdWrDenyWr\t= (fsRdWrPerm + fsWrDenyPerm),\t/* Single writer, multiple readers; the writer */\n\tdmRdWrDenyRdWr\t= (fsRdWrPerm + fsRdDenyPerm + fsWrDenyPerm) /* Exclusive access - equivalent to fsRdWrPerm */\n};\n\t\n/*****************************************************************************/\n\n#if PRAGMA_STRUCT_ALIGN\n#pragma options align=mac68k\n#endif\n\n/*\n**\tFor those times where you need to use more than one kind of File Manager parameter\n**\tblock but don't feel like wasting stack space, here's a parameter block you can reuse.\n*/\n\nunion UniversalFMPB\n{\n\tParamBlockRec\tPB;\n\tCInfoPBRec\t\tciPB;\n\tDTPBRec\t\t\tdtPB;\n\tHParamBlockRec\thPB;\n\tCMovePBRec\t\tcmPB;\n\tWDPBRec\t\t\twdPB;\n\tFCBPBRec\t\tfcbPB;\n\tXVolumeParam\txPB;\n};\ntypedef union UniversalFMPB UniversalFMPB;\ntypedef UniversalFMPB *UniversalFMPBPtr, **UniversalFMPBHandle;\n\n\n/*\n**\tUsed by GetUGEntries to return user or group lists\n*/\n\nstruct UGEntry\n{\n\tshort\tobjType;\t/* object type: -1 = group; 0 = user */\n\tlong\tobjID;\t\t/* the user or group ID */\n\tStr31\tname;\t\t/* the user or group name */\n};\ntypedef struct UGEntry UGEntry;\ntypedef UGEntry *UGEntryPtr, **UGEntryHandle;\n\n\ntypedef unsigned char Str8[9];\n\n\n/*\n**\tI use the following records instead of the AFPVolMountInfo and AFPXVolMountInfo structures in Files.h\n*/\n\nstruct MyAFPVolMountInfo\n{\n\tshort length;\t\t\t\t/* length of this record */\n\tVolumeType media;\t\t\t/* type of media, always AppleShareMediaType */\n\tshort flags;\t\t\t\t/* 0 = normal mount; set bit 0 to inhibit greeting messages */\n\tchar nbpInterval;\t\t\t/* NBP interval parameter; 7 is a good choice */\n\tchar nbpCount;\t\t\t\t/* NBP count parameter; 5 is a good choice */\n\tshort uamType;\t\t\t\t/* User Authentication Method */\n\tshort zoneNameOffset;\t\t/* offset from start of record to zoneName */\n\tshort serverNameOffset;\t\t/* offset from start of record to serverName */\n\tshort volNameOffset;\t\t/* offset from start of record to volName */\n\tshort userNameOffset;\t\t/* offset from start of record to userName */\n\tshort userPasswordOffset;\t/* offset from start of record to userPassword */\n\tshort volPasswordOffset;\t/* offset from start of record to volPassword */\n\tStr32 zoneName;\t\t\t\t/* server's AppleTalk zone name */\t\t\t\t\t\n\tchar filler1;\t\t\t\t/* to word align volPassword */\n\tStr32 serverName;\t\t\t/* server name */\t\t\t\t\t\n\tchar filler2;\t\t\t\t/* to word align volPassword */\n\tStr27 volName;\t\t\t\t/* volume name */\t\t\t\t\t\n\tStr31 userName;\t\t\t\t/* user name (zero length Pascal string for guest) */\n\tStr8 userPassword;\t\t\t/* user password (zero length Pascal string if no user password) */\t\t\t\t\t\n\tchar filler3;\t\t\t\t/* to word align volPassword */\n\tStr8 volPassword;\t\t\t/* volume password (zero length Pascal string if no volume password) */\t\t\t\t\t\n\tchar filler4;\t\t\t\t/* to end record on word boundry */\n};\ntypedef struct MyAFPVolMountInfo MyAFPVolMountInfo;\ntypedef MyAFPVolMountInfo *MyAFPVolMountInfoPtr, **MyAFPVolMountInfoHandle;\n\nstruct MyAFPXVolMountInfo\n{\n\tshort length;\t\t\t\t/* length of this record */\n\tVolumeType media;\t\t\t/* type of media, always AppleShareMediaType */\n\tshort flags;\t\t\t\t/* bits for no messages, no reconnect, etc */\n\tchar nbpInterval;\t\t\t/* NBP interval parameter; 7 is a good choice */\n\tchar nbpCount;\t\t\t\t/* NBP count parameter; 5 is a good choice */\n\tshort uamType;\t\t\t\t/* User Authentication Method */\n\tshort zoneNameOffset;\t\t/* offset from start of record to zoneName */\n\tshort serverNameOffset;\t\t/* offset from start of record to serverName */\n\tshort volNameOffset;\t\t/* offset from start of record to volName */\n\tshort userNameOffset;\t\t/* offset from start of record to userName */\n\tshort userPasswordOffset;\t/* offset from start of record to userPassword */\n\tshort volPasswordOffset;\t/* offset from start of record to volPassword */\n\tshort extendedFlags;\t\t/* extended flags word */\n\tshort uamNameOffset;\t\t/* offset to a pascal UAM name string */\n\tshort alternateAddressOffset; /* offset to Alternate Addresses in tagged format */\n\tStr32 zoneName;\t\t\t\t/* server's AppleTalk zone name */\t\t\t\t\t\n\tchar filler1;\t\t\t\t/* to word align volPassword */\n\tStr32 serverName;\t\t\t/* server name */\t\t\t\t\t\n\tchar filler2;\t\t\t\t/* to word align volPassword */\n\tStr27 volName;\t\t\t\t/* volume name */\t\t\t\t\t\n\tStr31 userName;\t\t\t\t/* user name (zero length Pascal string for guest) */\n\tStr8 userPassword;\t\t\t/* user password (zero length Pascal string if no user password) */\t\t\t\t\t\n\tchar filler3;\t\t\t\t/* to word align volPassword */\n\tStr8 volPassword;\t\t\t/* volume password (zero length Pascal string if no volume password) */\t\t\t\t\t\n\tchar filler4;\t\t\t\t/* to word align uamNameOffset */\n\tStr32 uamName;\t\t\t\t/* UAM name */\n\tchar filler5;\t\t\t\t/* to word align alternateAddress */\n\tchar alternateAddress[kVariableLengthArray];\t/* AFPAlternateAddress */\n};\ntypedef struct MyAFPXVolMountInfo MyAFPXVolMountInfo;\ntypedef MyAFPXVolMountInfo *MyAFPXVolMountInfoPtr, **MyAFPXVolMountInfoHandle;\n\n#if PRAGMA_STRUCT_ALIGN\n#pragma options align=reset\n#endif\n\n/*****************************************************************************/\n\npascal\tvoid\tTruncPString(StringPtr destination,\n\t\t\t\t\t\t\t ConstStr255Param source,\n\t\t\t\t\t\t\t short maxLength);\n/*\t International friendly string truncate routine.\n\tThe TruncPString function copies up to maxLength characters from\n\tthe source Pascal string to the destination Pascal string. TruncPString\n\tensures that the truncated string ends on a single-byte character, or on\n\tthe last byte of a multi-byte character.\n\t\n\tdestination\t\toutput:\tdestination Pascal string.\n\tsource\t\t\tinput:\tsource Pascal string.\n\tmaxLength\t\toutput:\tThe maximum allowable length of the destination\n\t\t\t\t\t\t\tstring.\n*/\n\n/*****************************************************************************/\n\npascal\tPtr\tGetTempBuffer(long buffReqSize,\n\t\t\t\t\t\t  long *buffActSize);\n/*\t Allocate a temporary copy or search buffer.\n\tThe GetTempBuffer function allocates a temporary buffer for file system\n\toperations which is at least 1024 bytes (1K) and a multiple of\n\t1024 bytes.\n\t\n\tbuffReqSize\t\tinput:\tSize you'd like the buffer to be.\n\tbuffActSize\t\toutput:\tSize of buffer allocated.\n\tfunction result\toutput:\tPointer to memory allocated or nil if no memory\n\t\t\t\t\t\t\twas available. The caller is responsible for\n\t\t\t\t\t\t\tdisposing of this buffer with DisposePtr.\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetVolumeInfoNoName(ConstStr255Param pathname,\n\t\t\t\t\t\t\t\t\tshort vRefNum,\n\t\t\t\t\t\t\t\t\tHParmBlkPtr pb);\n/*\t Call PBHGetVInfoSync ignoring returned name.\n\tGetVolumeInfoNoName uses pathname and vRefNum to call PBHGetVInfoSync\n\tin cases where the returned volume name is not needed by the caller.\n\tThe pathname and vRefNum parameters are not touched, and the pb\n\tparameter is initialized by PBHGetVInfoSync except that ioNamePtr in\n\tthe parameter block is always returned as NULL (since it might point\n\tto GetVolumeInfoNoName's local variable tempPathname).\n\n\tI noticed using this code in several places, so here it is once.\n\tThis reduces the code size of MoreFiles.\n\n\tpathName\tinput:\tPointer to a full pathname or nil.  If you pass in a \n\t\t\t\t\t\tpartial pathname, it is ignored. A full pathname to a\n\t\t\t\t\t\tvolume must end with a colon character (:).\n\tvRefNum\t\tinput:\tVolume specification (volume reference number, working\n\t\t\t\t\t\tdirectory number, drive number, or 0).\n\tpb\t\t\tinput:\tA pointer to HParamBlockRec.\n\t\t\t\toutput:\tThe parameter block as filled in by PBHGetVInfoSync\n\t\t\t\t\t\texcept that ioNamePtr will always be NULL.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tparamErr\t\t\t-50\t\tNo default volume, or pb was NULL\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tXGetVolumeInfoNoName(ConstStr255Param pathname,\n\t\t\t\t\t\t\t\t\tshort vRefNum,\n\t\t\t\t\t\t\t\t\tXVolumeParamPtr pb);\n/*\t Call PBXGetVolInfoSync ignoring returned name.\n\tXGetVolumeInfoNoName uses pathname and vRefNum to call PBXGetVolInfoSync\n\tin cases where the returned volume name is not needed by the caller.\n\tThe pathname and vRefNum parameters are not touched, and the pb\n\tparameter is initialized by PBXGetVolInfoSync except that ioNamePtr in\n\tthe parameter block is always returned as NULL (since it might point\n\tto XGetVolumeInfoNoName's local variable tempPathname).\n\n\tpathName\tinput:\tPointer to a full pathname or nil.  If you pass in a \n\t\t\t\t\t\tpartial pathname, it is ignored. A full pathname to a\n\t\t\t\t\t\tvolume must end with a colon character (:).\n\tvRefNum\t\tinput:\tVolume specification (volume reference number, working\n\t\t\t\t\t\tdirectory number, drive number, or 0).\n\tpb\t\t\tinput:\tA pointer to HParamBlockRec.\n\t\t\t\toutput:\tThe parameter block as filled in by PBXGetVolInfoSync\n\t\t\t\t\t\texcept that ioNamePtr will always be NULL.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tparamErr\t\t\t-50\t\tNo default volume, or pb was NULL\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr GetCatInfoNoName(short vRefNum,\n\t\t\t\t\t\t\t   long dirID,\n\t\t\t\t\t\t\t   ConstStr255Param name,\n\t\t\t\t\t\t\t   CInfoPBPtr pb);\n/*\t Call PBGetCatInfoSync ignoring returned name.\n\tGetCatInfoNoName uses vRefNum, dirID and name to call PBGetCatInfoSync\n\tin cases where the returned object is not needed by the caller.\n\tThe vRefNum, dirID and name parameters are not touched, and the pb\n\tparameter is initialized by PBGetCatInfoSync except that ioNamePtr in\n\tthe parameter block is always returned as NULL (since it might point\n\tto GetCatInfoNoName's local variable tempName).\n\n\tI noticed using this code in several places, so here it is once.\n\tThis reduces the code size of MoreFiles.\n\n\tvRefNum\t\t\tinput:\tVolume specification.\n\tdirID\t\t\tinput:\tDirectory ID.\n\tname\t\t\tinput:\tPointer to object name, or nil when dirID\n\t\t\t\t\t\t\tspecifies a directory that's the object.\n\tpb\t\t\t\tinput:\tA pointer to CInfoPBRec.\n\t\t\t\t\toutput:\tThe parameter block as filled in by\n\t\t\t\t\t\t\tPBGetCatInfoSync except that ioNamePtr will\n\t\t\t\t\t\t\talways be NULL.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\t\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tDetermineVRefNum(ConstStr255Param pathname,\n\t\t\t\t\t\t\t\t short vRefNum,\n\t\t\t\t\t\t\t\t short *realVRefNum);\n/*\t Determine the real volume reference number.\n\tThe DetermineVRefNum function determines the volume reference number of\n\ta volume from a pathname, a volume specification, or a combination\n\tof the two.\n\tWARNING: Volume names on the Macintosh are *not* unique -- Multiple\n\tmounted volumes can have the same name. For this reason, the use of a\n\tvolume name or full pathname to identify a specific volume may not\n\tproduce the results you expect.  If more than one volume has the same\n\tname and a volume name or full pathname is used, the File Manager\n\tcurrently uses the first volume it finds with a matching name in the\n\tvolume queue.\n\n\tpathName\tinput:\tPointer to a full pathname or nil.  If you pass in a \n\t\t\t\t\t\tpartial pathname, it is ignored. A full pathname to a\n\t\t\t\t\t\tvolume must end with a colon character (:).\n\tvRefNum\t\tinput:\tVolume specification (volume reference number, working\n\t\t\t\t\t\tdirectory number, drive number, or 0).\n\trealVRefNum\toutput:\tThe real volume reference number.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tparamErr\t\t\t-50\t\tNo default volume\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tHGetVInfo(short volReference,\n\t\t\t\t\t\t  StringPtr volName,\n\t\t\t\t\t\t  short *vRefNum,\n\t\t\t\t\t\t  unsigned long *freeBytes,\n\t\t\t\t\t\t  unsigned long *totalBytes);\n/*\t Get information about a mounted volume.\n\tThe HGetVInfo function returns the name, volume reference number,\n\tavailable space (in bytes), and total space (in bytes) for the\n\tspecified volume. You can specify the volume by providing its drive\n\tnumber, volume reference number, or 0 for the default volume.\n\tThis routine is compatible with volumes up to 4 gigabytes.\n\t\n\tvolReference\tinput:\tThe drive number, volume reference number,\n\t\t\t\t\t\t\tor 0 for the default volume.\n\tvolName\t\t\tinput:\tA pointer to a buffer (minimum Str27) where\n\t\t\t\t\t\t\tthe volume name is to be returned or must\n\t\t\t\t\t\t\tbe nil.\n\t\t\t\t\toutput:\tThe volume name.\n\tvRefNum\t\t\toutput:\tThe volume reference number.\n\tfreeBytes\t\toutput:\tThe number of free bytes on the volume.\n\t\t\t\t\t\t\tfreeBytes is an unsigned long value.\n\ttotalBytes\t\toutput:\tThe total number of bytes on the volume.\n\t\t\t\t\t\t\ttotalBytes is an unsigned long value.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\n\t__________\n\t\n\tAlso see:\tXGetVInfo\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tXGetVInfo(short volReference,\n\t\t\t\t\t\t  StringPtr volName,\n\t\t\t\t\t\t  short *vRefNum,\n\t\t\t\t\t\t  UInt64 *freeBytes,\n\t\t\t\t\t\t  UInt64 *totalBytes);\n/*\t Get extended information about a mounted volume.\n\tThe XGetVInfo function returns the name, volume reference number,\n\tavailable space (in bytes), and total space (in bytes) for the\n\tspecified volume. You can specify the volume by providing its drive\n\tnumber, volume reference number, or 0 for the default volume.\n\tThis routine is compatible with volumes up to 2 terabytes.\n\t\n\tvolReference\tinput:\tThe drive number, volume reference number,\n\t\t\t\t\t\t\tor 0 for the default volume.\n\tvolName\t\t\tinput:\tA pointer to a buffer (minimum Str27) where\n\t\t\t\t\t\t\tthe volume name is to be returned or must\n\t\t\t\t\t\t\tbe nil.\n\t\t\t\t\toutput:\tThe volume name.\n\tvRefNum\t\t\toutput:\tThe volume reference number.\n\tfreeBytes\t\toutput:\tThe number of free bytes on the volume.\n\t\t\t\t\t\t\tfreeBytes is an UnsignedWide value.\n\ttotalBytes\t\toutput:\tThe total number of bytes on the volume.\n\t\t\t\t\t\t\ttotalBytes is an UnsignedWide value.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\n\t__________\n\t\n\tAlso see:\tHGetVInfo\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tCheckVolLock(ConstStr255Param pathname,\n\t\t\t\t\t\t\t short vRefNum);\n/*\t Determine if a volume is locked.\n\tThe CheckVolLock function determines if a volume is locked - either by\n\thardware or by software. If CheckVolLock returns noErr, then the volume\n\tis not locked.\n\n\tpathName\tinput:\tPointer to a full pathname or nil.  If you pass in a \n\t\t\t\t\t\tpartial pathname, it is ignored. A full pathname to a\n\t\t\t\t\t\tvolume must end with a colon character (:).\n\tvRefNum\t\tinput:\tVolume specification (volume reference number, working\n\t\t\t\t\t\tdirectory number, drive number, or 0).\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error - volume not locked\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\twPrErr\t\t\t\t-44\t\tVolume locked by hardware\n\t\tvLckdErr\t\t\t-46\t\tVolume locked by software\n\t\tparamErr\t\t\t-50\t\tNo default volume\n*/\n\n/*****************************************************************************/\n//\n//\tThe following routines call Mac OS routines that are not supported by\n//\tCarbon:\n//\t\n//\t\tGetDriverName\n//\t\tFindDrive\n//\t\tGetDiskBlocks\n//\t\tGetVolState\n\n#if !TARGET_API_MAC_CARBON\t//\t{\n\n/*****************************************************************************/\n\npascal\tOSErr GetDriverName(short driverRefNum,\n\t\t\t\t\t\t\tStr255 driverName);\n/*\t Get a device driver's name.\n\tThe GetDriverName function returns a device driver's name.\n\n\tdriverRefNum\tinput:\tThe driver reference number.\n\tdriverName\t\toutput:\tThe driver's name.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tbadUnitErr\t\t\t-21\t\tBad driver reference number\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFindDrive(ConstStr255Param pathname,\n\t\t\t\t\t\t  short vRefNum,\n\t\t\t\t\t\t  DrvQElPtr *driveQElementPtr);\n/*\t Find a volume's drive queue element in the drive queue.\n\tThe FindDrive function returns a pointer to a mounted volume's\n\tdrive queue element.\n\n\tpathName\t\t\tinput:\tPointer to a full pathname or nil. If you\n\t\t\t\t\t\t\t\tpass in a partial pathname, it is ignored.\n\t\t\t\t\t\t\t\tA full pathname to a volume must end with\n\t\t\t\t\t\t\t\ta colon character (:).\n\tvRefNum\t\t\t\tinput:\tVolume specification (volume reference\n\t\t\t\t\t\t\t\tnumber, working directory number, drive\n\t\t\t\t\t\t\t\tnumber, or 0).\n\tdriveQElementPtr\toutput:\tPointer to a volume's drive queue element\n\t\t\t\t\t\t\t\tin the drive queue. DO NOT change the\n\t\t\t\t\t\t\t\tDrvQEl.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tnsDrvErr\t\t\t-56\t\tNo such drive\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetDiskBlocks(ConstStr255Param pathname,\n\t\t\t\t\t\t\t  short vRefNum,\n\t\t\t\t\t\t\t  unsigned long *numBlocks);\n/*\t Return the number of physical disk blocks on a disk drive.\n\tThe GetDiskBlocks function returns the number of physical disk\n\tblocks on a disk drive. NOTE: This is not the same as volume\n\tallocation blocks!\n\n\tpathName\tinput:\tPointer to a full pathname or nil. If you\n\t\t\t\t\t\tpass in a partial pathname, it is ignored.\n\t\t\t\t\t\tA full pathname to a volume must end with\n\t\t\t\t\t\ta colon character (:).\n\tvRefNum\t\tinput:\tVolume specification (volume reference\n\t\t\t\t\t\tnumber, working directory number, drive\n\t\t\t\t\t\tnumber, or 0).\n\tnumBlocks\toutput:\tThe number of physical disk blocks on the disk drive.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tparamErr\t\t\t-50\t\tNo default volume, driver reference\n\t\t\t\t\t\t\t\t\tnumber is zero, ReturnFormatList\n\t\t\t\t\t\t\t\t\treturned zero blocks, DriveStatus\n\t\t\t\t\t\t\t\t\treturned an unknown value, or\n\t\t\t\t\t\t\t\t\tdriveQElementPtr->qType is unknown\n\t\tnsDrvErr\t\t\t-56\t\tNo such drive\n\t\tstatusErr\t\t\t18\t\tDriver does not respond to this\n\t\t\t\t\t\t\t\t\tstatus request\n\t\tbadUnitErr\t\t\t21\t\tDriver reference number does not\n\t\t\t\t\t\t\t\t\tmatch unit table\n\t\tunitEmptyErr\t\t22\t\tDriver reference number specifies\n\t\t\t\t\t\t\t\t\ta nil handle in unit table\n\t\tabortErr\t\t\t27\t\tRequest aborted by KillIO\n\t\tnotOpenErr\t\t\t28\t\tDriver not open\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetVolState(ConstStr255Param pathname,\n\t\t\t\t\t\t\tshort vRefNum,\n\t\t\t\t\t\t\tBoolean *volumeOnline,\n\t\t\t\t\t\t\tBoolean *volumeEjected,\n\t\t\t\t\t\t\tBoolean *driveEjectable,\n\t\t\t\t\t\t\tBoolean *driverWantsEject);\n/*\t Returns a volume's online and eject information.\n\tThe GetVolState function determines if a volume is online or offline,\n\tif an offline volume is ejected, and if the volume's driver is\n\tejectable or wants eject calls.\n\t\n\tpathName\t\t\tinput:\tPointer to a full pathname or nil.\n\tvRefNum\t\t\t\tinput:\tVolume specification (volume reference number,\n\t\t\t\t\t\t\t\tworking directory number, drive number, or 0).\n\tvolumeOnline\t\toutput:\tTrue if the volume is online;\n\t\t\t\t\t\t\t\tFalse if the volume is offline.\n\tvolumeEjected\t\toutput:\tTrue if the volume is ejected (ejected\n\t\t\t\t\t\t\t\tvolumes are always offline); False if the\n\t\t\t\t\t\t\t\tvolume is not ejected.\n\tdriveEjectable\t\toutput:\tTrue if the volume's drive is ejectable;\n\t\t\t\t\t\t\t\tFalse if the volume's drive is not ejectable.\n\tdriverWantsEject\toutput:\tTrue if the volume's driver wants an Eject\n\t\t\t\t\t\t\t\trequest after unmount (even if the drive\n\t\t\t\t\t\t\t\tis not ejectable); False if the volume's\n\t\t\t\t\t\t\t\tdriver does not need an eject request.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tparamErr\t\t\t-50\t\tNo default volume, or pb was NULL\n*/\n\n\t/*****************************************************************************/\n\n#endif\t//\t}\t!TARGET_API_MAC_CARBON\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetVolFileSystemID(ConstStr255Param pathname,\n\t\t\t\t\t\t\t\t   short vRefNum,\n\t\t\t\t\t\t\t\t   short *fileSystemID);\n/*\t Get a volume's file system ID.\n\tThe GetVolFileSystemID function returned the file system ID of\n\ta mounted volume. The file system ID identifies the file system\n\tthat handles requests to a particular volume. Here's a partial list\n\tof file system ID numbers (only Apple's file systems are listed):\n\t\tFSID\tFile System\n\t\t-----   -----------------------------------------------------\n\t\t$0000\tMacintosh HFS or MFS\n\t\t$0100\tProDOS File System\n\t\t$0101\tPowerTalk Mail Enclosures\n\t\t$4147\tISO 9660 File Access (through Foreign File Access)\n\t\t$4242\tHigh Sierra File Access (through Foreign File Access)\n\t\t$464D\tQuickTake File System (through Foreign File Access)\n\t\t$4953\tMacintosh PC Exchange (MS-DOS)\n\t\t$4A48\tAudio CD Access (through Foreign File Access)\n\t\t$4D4B\tApple Photo Access (through Foreign File Access)\n\t\n\tSee the Technical Note \"FL 35 - Determining Which File System\n\tIs Active\" and the \"Guide to the File System Manager\" for more\n\tinformation.\n\t\n\tpathName\t\tinput:\tPointer to a full pathname or nil.  If you pass\n\t\t\t\t\t\t\tin a partial pathname, it is ignored. A full\n\t\t\t\t\t\t\tpathname to a volume must contain at least\n\t\t\t\t\t\t\tone colon character (:) and must not start with\n\t\t\t\t\t\t\ta colon character.\n\tvRefNum\t\t\tinput:\tVolume specification (volume reference number,\n\t\t\t\t\t\t\tworking directory number, drive number, or 0).\n\tfileSystemID\toutput:\tThe volume's file system ID.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tparamErr\t\t\t-50\t\tNo default volume, or pb was NULL\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tUnmountAndEject(ConstStr255Param pathname,\n\t\t\t\t\t\t\t\tshort vRefNum);\n/*\t Unmount and eject a volume.\n\tThe UnmountAndEject function unmounts and ejects a volume. The volume\n\tis ejected only if it is ejectable and not already ejected.\n\t\n\tpathName\tinput:\tPointer to a full pathname or nil.  If you pass in a \n\t\t\t\t\t\tpartial pathname, it is ignored. A full pathname to a\n\t\t\t\t\t\tvolume must end with a colon character (:).\n\tvRefNum\t\tinput:\tVolume specification (volume reference number, working\n\t\t\t\t\t\tdirectory number, drive number, or 0).\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad volume name\n\t\tfBsyErr\t\t\t\t-47\t\tOne or more files are open\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tnsDrvErr\t\t\t-56\t\tNo such drive\n\t\textFSErr\t\t\t-58\t\tExternal file system error - no file\n\t\t\t\t\t\t\t\t\tsystem claimed this call.\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tOnLine(FSSpecPtr volumes,\n\t\t\t\t\t   short reqVolCount,\n\t\t\t\t\t   short *actVolCount,\n\t\t\t\t\t   short *volIndex);\n/*\t Return the list of volumes currently mounted.\n\tThe OnLine function returns the list of volumes currently mounted in\n\tan array of FSSpec records.\n\t\n\tA noErr result indicates that the volumes array was filled\n\t(actVolCount == reqVolCount) and there may be additional volumes\n\tmounted. A nsvErr result indicates that the end of the volume list\n\twas found and actVolCount volumes were actually found this time.\n\n\tvolumes\t\tinput:\tPointer to array of FSSpec where the volume list\n\t\t\t\t\t\tis returned.\n\treqVolCount\tinput:\tMaximum number of volumes to return\t(the number of\n\t\t\t\t\t\telements in the volumes array).\n\tactVolCount\toutput: The number of volumes actually returned.\n\tvolIndex\tinput:\tThe current volume index position. Set to 1 to\n\t\t\t\t\t\tstart with the first volume.\n\t\t\t\toutput:\tThe volume index position to get the next volume.\n\t\t\t\t\t\tPass this value the next time you call OnLine to\n\t\t\t\t\t\tstart where you left off.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error, but there are more volumes\n\t\t\t\t\t\t\t\t\tto list\n\t\tnsvErr\t\t\t\t-35\t\tNo more volumes to be listed\n\t\tparamErr\t\t\t-50\t\tvolIndex was <= 0\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr SetDefault(short newVRefNum,\n\t\t\t\t\t\t long newDirID,\n\t\t\t\t\t\t short *oldVRefNum,\n\t\t\t\t\t\t long *oldDirID);\n/*\t Set the default volume before making Standard I/O requests.\n\tThe SetDefault function sets the default volume and directory to the\n\tvolume specified by newVRefNum and the directory specified by newDirID.\n\tThe current default volume reference number and directory ID are\n\treturned in oldVRefNum and oldDir and must be used to restore the\n\tdefault volume and directory to their previous state *as soon as\n\tpossible* with the RestoreDefault function. These two functions are\n\tdesigned to be used as a wrapper around Standard I/O routines where\n\tthe location of the file is implied to be the default volume and\n\tdirectory. In other words, this is how you should use these functions:\n\t\n\t\terror = SetDefault(newVRefNum, newDirID, &oldVRefNum, &oldDirID);\n\t\tif ( error == noErr )\n\t\t{\n\t\t\t// call the Stdio functions like remove, rename, tmpfile,\n\t\t\t// fopen, freopen, etc. or non-ANSI extensions like\n\t\t\t// fdopen,fsetfileinfo, -- create, open, unlink, etc. here!\n\t\t\t\n\t\t\terror = RestoreDefault(oldVRefNum, oldDirID);\n\t\t}\n\t\n\tBy using these functions as a wrapper, you won't need to open a working\n\tdirectory (because SetDefault and RestoreDefault use HSetVol) and you\n\twon't have to worry about the effects of using HSetVol (documented in\n\tTechnical Note \"FL 11 - PBHSetVol is Dangerous\" and in the\n\tInside Macintosh: Files book in the description of the HSetVol and \n\tPBHSetVol functions) because the default volume/directory is restored\n\tbefore giving up control to code that might be affected by HSetVol.\n\t\n\tnewVRefNum\tinput:\tVolume specification (volume reference number,\n\t\t\t\t\t\tworking directory number, drive number, or 0) of\n\t\t\t\t\t\tthe new default volume.\n\tnewDirID\tinput:\tDirectory ID of the new default directory.\n\toldVRefNum\toutput: The volume specification to save for use with\n\t\t\t\t\t\tRestoreDefault.\n\toldDirID\toutput:\tThe directory ID to save for use with\n\t\t\t\t\t\tRestoreDefault.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tbdNamErr\t\t\t-37\t\tBad volume name\n\t\tfnfErr\t\t\t\t-43\t\tDirectory not found\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tafpAccessDenied\t\t-5000\tUser does not have access to the directory\n\t\n\t__________\n\t\n\tAlso see:\tRestoreDefault\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr RestoreDefault(short oldVRefNum,\n\t\t\t\t\t\t\t long oldDirID);\n/*\t Restore the default volume after making Standard C I/O requests.\n\tThe RestoreDefault function restores the default volume and directory\n\tto the volume specified by oldVRefNum and the directory specified by \n\toldDirID. The oldVRefNum and oldDirID parameters were previously\n\tobtained from the SetDefault function. These two functions are designed\n\tto be used as a wrapper around Standard C I/O routines where the\n\tlocation of the file is implied to be the default volume and directory.\n\tIn other words, this is how you should use these functions:\n\t\n\t\terror = SetDefault(newVRefNum, newDirID, &oldVRefNum, &oldDirID);\n\t\tif ( error == noErr )\n\t\t{\n\t\t\t// call the Stdio functions like remove, rename, tmpfile,\n\t\t\t// fopen, freopen, etc. or non-ANSI extensions like\n\t\t\t// fdopen,fsetfileinfo, -- create, open, unlink, etc. here!\n\t\t\t\n\t\t\terror = RestoreDefault(oldVRefNum, oldDirID);\n\t\t}\n\t\n\tBy using these functions as a wrapper, you won't need to open a working\n\tdirectory (because SetDefault and RestoreDefault use HSetVol) and you\n\twon't have to worry about the effects of using HSetVol (documented in\n\tTechnical Note \"FL 11 - PBHSetVol is Dangerous\" and in the\n\tInside Macintosh: Files book in the description of the HSetVol and \n\tPBHSetVol functions) because the default volume/directory is restored\n\tbefore giving up control to code that might be affected by HSetVol.\n\t\n\toldVRefNum\tinput: The volume specification to restore.\n\toldDirID\tinput:\tThe directory ID to restore.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tbdNamErr\t\t\t-37\t\tBad volume name\n\t\tfnfErr\t\t\t\t-43\t\tDirectory not found\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\trfNumErr\t\t\t-51\t\tBad working directory reference number\n\t\tafpAccessDenied\t\t-5000\tUser does not have access to the directory\n\t\n\t__________\n\t\n\tAlso see:\tSetDefault\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr GetDInfo(short vRefNum,\n\t\t\t\t\t   long dirID,\n\t\t\t\t\t   ConstStr255Param name,\n\t\t\t\t\t   DInfo *fndrInfo);\n/*\t Get the finder information for a directory.\n\tThe GetDInfo function gets the finder information for a directory.\n\n\tvRefNum\t\t\tinput:\tVolume specification.\n\tdirID\t\t\tinput:\tDirectory ID.\n\tname\t\t\tinput:\tPointer to object name, or nil when dirID\n\t\t\t\t\t\t\tspecifies a directory that's the object.\n\tfndrInfo\t\toutput:\tIf the object is a directory, then its DInfo.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\t\n\t__________\n\t\n\tAlso see:\tFSpGetDInfo, FSpGetFInfoCompat\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr FSpGetDInfo(const FSSpec *spec,\n\t\t\t\t\t\t  DInfo *fndrInfo);\n/*\t Get the finder information for a directory.\n\tThe FSpGetDInfo function gets the finder information for a directory.\n\n\tspec\t\tinput:\tAn FSSpec record specifying the directory.\n\tfndrInfo\toutput:\tIf the object is a directory, then its DInfo.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\t\n\t__________\n\t\n\tAlso see:\tFSpGetFInfoCompat, GetDInfo\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr SetDInfo(short vRefNum,\n\t\t\t\t\t   long dirID,\n\t\t\t\t\t   ConstStr255Param name,\n\t\t\t\t\t   const DInfo *fndrInfo);\n/*\t Set the finder information for a directory.\n\tThe SetDInfo function sets the finder information for a directory.\n\n\tvRefNum\t\t\tinput:\tVolume specification.\n\tdirID\t\t\tinput:\tDirectory ID.\n\tname\t\t\tinput:\tPointer to object name, or nil when dirID\n\t\t\t\t\t\t\tspecifies a directory that's the object.\n\tfndrInfo\t\tinput:\tThe DInfo.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tAlso see:\tFSpSetDInfo, FSpSetFInfoCompat\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr FSpSetDInfo(const FSSpec *spec,\n\t\t\t\t\t\t  const DInfo *fndrInfo);\n/*\t Set the finder information for a directory.\n\tThe FSpSetDInfo function sets the finder information for a directory.\n\n\tspec\t\tinput:\tAn FSSpec record specifying the directory.\n\tfndrInfo\tinput:\tThe DInfo.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tAlso see:\tFSpSetFInfoCompat, SetDInfo\n*/\n\n/*****************************************************************************/\n\n#if OLDROUTINENAMES\n#define\tGetDirID(vRefNum, dirID, name, theDirID, isDirectory)\t\\\n\t\tGetDirectoryID(vRefNum, dirID, name, theDirID, isDirectory)\n#endif\n\npascal\tOSErr\tGetDirectoryID(short vRefNum,\n\t\t\t\t\t\t\t   long dirID,\n\t\t\t\t\t\t\t   ConstStr255Param name,\n\t\t\t\t\t\t\t   long *theDirID,\n\t\t\t\t\t\t\t   Boolean *isDirectory);\n/*\t Get the directory ID number of the directory specified.\n\tThe GetDirectoryID function gets the directory ID number of the\n\tdirectory specified.  If a file is specified, then the parent\n\tdirectory of the file is returned and isDirectory is false.  If\n\ta directory is specified, then that directory's ID number is\n\treturned and isDirectory is true.\n\tWARNING: Volume names on the Macintosh are *not* unique -- Multiple\n\tmounted volumes can have the same name. For this reason, the use of a\n\tvolume name or full pathname to identify a specific volume may not\n\tproduce the results you expect.  If more than one volume has the same\n\tname and a volume name or full pathname is used, the File Manager\n\tcurrently uses the first volume it finds with a matching name in the\n\tvolume queue.\n\t\n\tvRefNum\t\t\tinput:\tVolume specification.\n\tdirID\t\t\tinput:\tDirectory ID.\n\tname\t\t\tinput:\tPointer to object name, or nil when dirID\n\t\t\t\t\t\t\tspecifies a directory that's the object.\n\ttheDirID\t\toutput:\tIf the object is a file, then its parent directory\n\t\t\t\t\t\t\tID. If the object is a directory, then its ID.\n\tisDirectory\t\toutput:\tTrue if object is a directory; false if\n\t\t\t\t\t\t\tobject is a file.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n*/\n\n/*****************************************************************************/\n\n#if OLDROUTINENAMES\n#define\tDirIDFromFSSpec(spec, theDirID, isDirectory)\t\\\n\t\tFSpGetDirectoryID(spec, theDirID, isDirectory)\n#endif\n\npascal\tOSErr\tFSpGetDirectoryID(const FSSpec *spec,\n\t\t\t\t\t\t\t\t  long *theDirID,\n\t\t\t\t\t\t\t\t  Boolean *isDirectory);\n/*\t Get the directory ID number of a directory.\n\tThe FSpGetDirectoryID function gets the directory ID number of the\n\tdirectory specified by spec. If spec is to a file, then the parent\n\tdirectory of the file is returned and isDirectory is false.  If\n\tspec is to a directory, then that directory's ID number is\n\treturned and isDirectory is true.\n\t\n\tspec\t\t\tinput:\tAn FSSpec record specifying the directory.\n\ttheDirID\t\toutput:\tThe directory ID.\n\tisDirectory\t\toutput:\tTrue if object is a directory; false if\n\t\t\t\t\t\t\tobject is a file.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetDirName(short vRefNum,\n\t\t\t\t\t\t   long dirID,\n\t\t\t\t\t\t   Str31 name);\n/*\t Get the name of a directory from its directory ID.\n\tThe GetDirName function gets the name of a directory from its\n\tdirectory ID.\n\n\tvRefNum\t\tinput:\tVolume specification.\n\tdirID\t\tinput:\tDirectory ID.\n\tname\t\toutput:\tPoints to a Str31 where the directory name is to be\n\t\t\t\t\t\treturned.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tparamErr\t\t\t-50\t\tNo default volume or\n\t\t\t\t\t\t\t\t\tname parameter was NULL\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetIOACUser(short vRefNum,\n\t\t\t\t\t\t\tlong dirID,\n\t\t\t\t\t\t\tConstStr255Param name,\n\t\t\t\t\t\t\tSInt8 *ioACUser);\n/*\t Get a directory's access restrictions byte.\n\tGetIOACUser returns a directory's access restrictions byte.\n\tUse the masks and macro defined in MoreFilesExtras to check for\n\tspecific access priviledges.\n\t\n\tvRefNum\t\tinput:\tVolume specification.\n\tdirID\t\tinput:\tDirectory ID.\n\tname\t\tinput:\tPointer to object name, or nil when dirID\n\t\t\t\t\t\tspecifies a directory that's the object.\n\tioACUser\toutput:\tThe access restriction byte\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpGetIOACUser(const FSSpec *spec,\n\t\t\t\t\t\t\t   SInt8 *ioACUser);\n/*\t Get a directory's access restrictions byte.\n\tFSpGetIOACUser returns a directory's access restrictions byte.\n\tUse the masks and macro defined in MoreFilesExtras to check for\n\tspecific access priviledges.\n\t\n\tspec\t\tinput:\tAn FSSpec record specifying the directory.\n\tioACUser\toutput:\tThe access restriction byte\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetParentID(short vRefNum,\n\t\t\t\t\t\t\tlong dirID,\n\t\t\t\t\t\t\tConstStr255Param name,\n\t\t\t\t\t\t\tlong *parID);\n/*\t Get the parent directory ID number of the specified object.\n\tThe GetParentID function gets the parent directory ID number of the\n\tspecified object.\n\t\n\tvRefNum\t\tinput:\tVolume specification.\n\tdirID\t\tinput:\tDirectory ID.\n\tname\t\tinput:\tPointer to object name, or nil when dirID specifies\n\t\t\t\t\t\ta directory that's the object.\n\tparID\t\toutput:\tThe parent directory ID of the specified object.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetFilenameFromPathname(ConstStr255Param pathname,\n\t\t\t\t\t\t\t\t\t\tStr255 filename);\n/*\t Get the object name from the end of a full or partial pathname.\n\tThe GetFilenameFromPathname function gets the file (or directory) name\n\tfrom the end of a full or partial pathname. Returns notAFileErr if the\n\tpathname is nil, the pathname is empty, or the pathname cannot refer to\n\ta filename (with a noErr result, the pathname could still refer to a\n\tdirectory).\n\t\n\tpathname\tinput:\tA full or partial pathname.\n\tfilename\toutput:\tThe file (or directory) name.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnotAFileErr\t\t\t-1302\tThe pathname is nil, the pathname\n\t\t\t\t\t\t\t\t\tis empty, or the pathname cannot refer\n\t\t\t\t\t\t\t\t\tto a filename\n\t\n\t__________\n\t\n\tSee also:\tGetObjectLocation.\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetObjectLocation(short vRefNum,\n\t\t\t\t\t\t\t\t  long dirID,\n\t\t\t\t\t\t\t\t  ConstStr255Param pathname,\n\t\t\t\t\t\t\t\t  short *realVRefNum,\n\t\t\t\t\t\t\t\t  long *realParID,\n\t\t\t\t\t\t\t\t  Str255 realName,\n\t\t\t\t\t\t\t\t  Boolean *isDirectory);\n/*\t Get a file system object's location.\n\tThe GetObjectLocation function gets a file system object's location -\n\tthat is, its real volume reference number, real parent directory ID,\n\tand name. While we're at it, determine if the object is a file or directory.\n\tIf GetObjectLocation returns fnfErr, then the location information\n\treturned is valid, but it describes an object that doesn't exist.\n\tYou can use the location information for another operation, such as\n\tcreating a file or directory.\n\t\n\tvRefNum\t\tinput:\tVolume specification.\n\tdirID\t\tinput:\tDirectory ID.\n\tpathname\tinput:\tPointer to object name, or nil when dirID specifies\n\t\t\t\t\t\ta directory that's the object.\n\trealVRefNum\toutput:\tThe real volume reference number.\n\trealParID\toutput:\tThe parent directory ID of the specified object.\n\trealName\toutput:\tThe name of the specified object (the case of the\n\t\t\t\t\t\tobject name may not be the same as the object's\n\t\t\t\t\t\tcatalog entry on disk - since the Macintosh file\n\t\t\t\t\t\tsystem is not case sensitive, it shouldn't matter).\n\tisDirectory\toutput:\tTrue if object is a directory; false if object\n\t\t\t\t\t\tis a file.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tnotAFileErr\t\t\t-1302\tThe pathname is nil, the pathname\n\t\t\t\t\t\t\t\t\tis empty, or the pathname cannot refer\n\t\t\t\t\t\t\t\t\tto a filename\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tSee also:\tFSMakeFSSpecCompat\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetDirItems(short vRefNum,\n\t\t\t\t\t\t\tlong dirID,\n\t\t\t\t\t\t\tConstStr255Param name,\n\t\t\t\t\t\t\tBoolean getFiles,\n\t\t\t\t\t\t\tBoolean getDirectories,\n\t\t\t\t\t\t\tFSSpecPtr items,\n\t\t\t\t\t\t\tshort reqItemCount,\n\t\t\t\t\t\t\tshort *actItemCount,\n\t\t\t\t\t\t\tshort *itemIndex);\n/*\t Return a list of items in a directory.\n\tThe GetDirItems function returns a list of items in the specified\n\tdirectory in an array of FSSpec records. File, subdirectories, or\n\tboth can be returned in the list.\n\t\n\tA noErr result indicates that the items array was filled\n\t(actItemCount == reqItemCount) and there may be additional items\n\tleft in the directory. A fnfErr result indicates that the end of\n\tthe directory list was found and actItemCount items were actually\n\tfound this time.\n\n\tvRefNum\t\t\tinput:\tVolume specification.\n\tdirID\t\t\tinput:\tDirectory ID.\n\tname\t\t\tinput:\tPointer to object name, or nil when dirID\n\t\t\t\t\t\t\tspecifies a directory that's the object.\n\tgetFiles\t\tinput:\tPass true to have files added to the items list.\n\tgetDirectories\tinput:\tPass true to have directories added to the\n\t\t\t\t\t\t\titems list.\n\titems\t\t\tinput:\tPointer to array of FSSpec where the item list\n\t\t\t\t\t\t\tis returned.\n\treqItemCount\tinput:\tMaximum number of items to return (the number\n\t\t\t\t\t\t\tof elements in the items array).\n\tactItemCount\toutput: The number of items actually returned.\n\titemIndex\t\tinput:\tThe current item index position. Set to 1 to\n\t\t\t\t\t\t\tstart with the first item in the directory.\n\t\t\t\t\toutput:\tThe item index position to get the next item.\n\t\t\t\t\t\t\tPass this value the next time you call\n\t\t\t\t\t\t\tGetDirItems to start where you left off.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error, but there are more items\n\t\t\t\t\t\t\t\t\tto list\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found, there are no more items\n\t\t\t\t\t\t\t\t\tto be listed.\n\t\tparamErr\t\t\t-50\t\tNo default volume or itemIndex was <= 0\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tDeleteDirectoryContents(short vRefNum,\n\t\t\t\t\t\t\t\t \t\tlong dirID,\n\t\t\t\t\t\t\t\t\t\tConstStr255Param name);\n/*\t Delete the contents of a directory.\n\tThe DeleteDirectoryContents function deletes the contents of a directory.\n\tAll files and subdirectories in the specified directory are deleted.\n\tIf a locked file or directory is encountered, it is unlocked and then\n\tdeleted.  If any unexpected errors are encountered,\n\tDeleteDirectoryContents quits and returns to the caller.\n\t\n\tvRefNum\tinput:\tVolume specification.\n\tdirID\tinput:\tDirectory ID.\n\tname\tinput:\tPointer to directory name, or nil when dirID specifies\n\t\t\t\t\ta directory that's the object.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\twPrErr\t\t\t\t-44\t\tHardware volume lock\t\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\t\n\t\tvLckdErr\t\t\t-46\t\tSoftware volume lock\t\n\t\tfBsyErr\t\t\t\t-47\t\tFile busy, directory not empty, or working directory control block open\t\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tAlso see:\tDeleteDirectory\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tDeleteDirectory(short vRefNum,\n\t\t\t\t\t\t\t\tlong dirID,\n\t\t\t\t\t\t\t\tConstStr255Param name);\n/*\t Delete a directory and its contents.\n\tThe DeleteDirectory function deletes a directory and its contents.\n\tAll files and subdirectories in the specified directory are deleted.\n\tIf a locked file or directory is encountered, it is unlocked and then\n\tdeleted.  After deleting the directories contents, the directory is\n\tdeleted. If any unexpected errors are encountered, DeleteDirectory\n\tquits and returns to the caller.\n\t\n\tvRefNum\tinput:\tVolume specification.\n\tdirID\tinput:\tDirectory ID.\n\tname\tinput:\tPointer to directory name, or nil when dirID specifies\n\t\t\t\t\ta directory that's the object.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\twPrErr\t\t\t\t-44\t\tHardware volume lock\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tSoftware volume lock\n\t\tfBsyErr\t\t\t\t-47\t\tFile busy, directory not empty, or working directory control block open\t\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tAlso see:\tDeleteDirectoryContents\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tCheckObjectLock(short vRefNum,\n\t\t\t\t\t\t\t\tlong dirID,\n\t\t\t\t\t\t\t\tConstStr255Param name);\n/*\t Determine if a file or directory is locked.\n\tThe CheckObjectLock function determines if a file or directory is locked.\n\tIf CheckObjectLock returns noErr, then the file or directory\n\tis not locked. If CheckObjectLock returns fLckdErr, the it is locked.\n\t\n\tvRefNum\tinput:\tVolume specification.\n\tdirID\tinput:\tDirectory ID.\n\tname\tinput:\tPointer to object name, or nil when dirID specifies\n\t\t\t\t\ta directory that's the object.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tAlso see:\tFSpCheckObjectLock\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpCheckObjectLock(const FSSpec *spec);\n/*\t Determine if a file or directory is locked.\n\tThe FSpCheckObjectLock function determines if a file or directory is locked.\n\tIf FSpCheckObjectLock returns noErr, then the file or directory\n\tis not locked.\n\t\n\tspec\tinput:\tAn FSSpec record specifying the object.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tAlso see:\tCheckObjectLock\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetFileSize(short vRefNum,\n\t\t\t\t\t\t\tlong dirID,\n\t\t\t\t\t\t\tConstStr255Param fileName,\n\t\t\t\t\t\t\tlong *dataSize,\n\t\t\t\t\t\t\tlong *rsrcSize);\n/*\t Get the logical sizes of a file's forks.\n\tThe GetFileSize function returns the logical size of a file's\n\tdata and resource fork.\n\t\n\tvRefNum\t\tinput:\tVolume specification.\n\tdirID\t\tinput:\tDirectory ID.\n\tname\t\tinput:\tThe name of the file.\n\tdataSize\toutput:\tThe number of bytes in the file's data fork.\n\trsrcSize\toutput:\tThe number of bytes in the file's resource fork.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErrdirNFErr\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tSee also:\tFSpGetFileSize\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpGetFileSize(const FSSpec *spec,\n\t\t\t\t\t\t\t   long *dataSize,\n\t\t\t\t\t\t\t   long *rsrcSize);\n/*\t Get the logical sizes of a file's forks.\n\tThe FSpGetFileSize function returns the logical size of a file's\n\tdata and resource fork.\n\t\n\tspec\t\tinput:\tAn FSSpec record specifying the file.\n\tdataSize\toutput:\tThe number of bytes in the file's data fork.\n\trsrcSize\toutput:\tThe number of bytes in the file's resource fork.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErrdirNFErr\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tSee also:\tGetFileSize\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tBumpDate(short vRefNum,\n\t\t\t\t\t\t long dirID,\n\t\t\t\t\t\t ConstStr255Param name);\n/*\t Update the modification date of a file or directory.\n\tThe BumpDate function changes the modification date of a file or\n\tdirectory to the current date/time.  If the modification date is already\n\tequal to the current date/time, then add one second to the\n\tmodification date.\n\t\n\tvRefNum\tinput:\tVolume specification.\n\tdirID\tinput:\tDirectory ID.\n\tname\tinput:\tPointer to object name, or nil when dirID specifies\n\t\t\t\t\ta directory that's the object.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tSee also:\tFSpBumpDate\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpBumpDate(const FSSpec *spec);\n/*\t Update the modification date of a file or directory.\n\tThe FSpBumpDate function changes the modification date of a file or\n\tdirectory to the current date/time.  If the modification date is already\n\tequal to the current date/time, then add one second to the\n\tmodification date.\n\t\n\tspec\tinput:\tAn FSSpec record specifying the object.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tSee also:\tBumpDate\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tChangeCreatorType(short vRefNum,\n\t\t\t\t\t\t\t\t  long dirID,\n\t\t\t\t\t\t\t\t  ConstStr255Param name,\n\t\t\t\t\t\t\t\t  OSType creator,\n\t\t\t\t\t\t\t\t  OSType fileType);\n/*\t Change the creator or file type of a file.\n\tThe ChangeCreatorType function changes the creator or file type of a file.\n\n\tvRefNum\t\tinput:\tVolume specification.\n\tdirID\t\tinput:\tDirectory ID.\n\tname\t\tinput:\tThe name of the file.\n\tcreator\t\tinput:\tThe new creator type or 0x00000000 to leave\n\t\t\t\t\t\tthe creator type alone.\n\tfileType\tinput:\tThe new file type or 0x00000000 to leave the\n\t\t\t\t\t\tfile type alone.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tnotAFileErr\t\t\t-1302\tName was not a file\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tSee also:\tFSpChangeCreatorType\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpChangeCreatorType(const FSSpec *spec,\n\t\t\t\t\t\t\t\t\t OSType creator,\n\t\t\t\t\t\t\t\t\t OSType fileType);\n/*\t Change the creator or file type of a file.\n\tThe FSpChangeCreatorType function changes the creator or file type of a file.\n\n\tspec\t\tinput:\tAn FSSpec record specifying the file.\n\tcreator\t\tinput:\tThe new creator type or 0x00000000 to leave\n\t\t\t\t\t\tthe creator type alone.\n\tfileType\tinput:\tThe new file type or 0x00000000 to leave the\n\t\t\t\t\t\tfile type alone.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tnotAFileErr\t\t\t-1302\tName was not a file\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tSee also:\tChangeCreatorType\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tChangeFDFlags(short vRefNum,\n\t\t\t\t\t\t\t  long dirID,\n\t\t\t\t\t\t\t  ConstStr255Param name,\n\t\t\t\t\t\t\t  Boolean\tsetBits,\n\t\t\t\t\t\t\t  unsigned short flagBits);\n/*\t Set or clear Finder Flag bits.\n\tThe ChangeFDFlags function sets or clears Finder Flag bits in the\n\tfdFlags field of a file or directory's FInfo record.\n\t\n\tvRefNum\t\tinput:\tVolume specification.\n\tdirID\t\tinput:\tDirectory ID.\n\tname\t\tinput:\tPointer to object name, or nil when dirID specifies\n\t\t\t\t\t\ta directory that's the object.\n\tsetBits\t\tinput:\tIf true, then set the bits specified in flagBits.\n\t\t\t\t\t\tIf false, then clear the bits specified in flagBits.\n\tflagBits\tinput:\tThe flagBits parameter specifies which Finder Flag\n\t\t\t\t\t\tbits to set or clear. If a bit in flagBits is set,\n\t\t\t\t\t\tthen the same bit in fdFlags is either set or\n\t\t\t\t\t\tcleared depending on the state of the setBits\n\t\t\t\t\t\tparameter.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tSee also:\tFSpChangeFDFlags\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpChangeFDFlags(const FSSpec *spec,\n\t\t\t\t\t\t\t\t Boolean setBits,\n\t\t\t\t\t\t\t\t unsigned short flagBits);\n/*\t Set or clear Finder Flag bits.\n\tThe FSpChangeFDFlags function sets or clears Finder Flag bits in the\n\tfdFlags field of a file or directory's FInfo record.\n\t\n\tspec\t\tinput:\tAn FSSpec record specifying the object.\n\tsetBits\t\tinput:\tIf true, then set the bits specified in flagBits.\n\t\t\t\t\t\tIf false, then clear the bits specified in flagBits.\n\tflagBits\tinput:\tThe flagBits parameter specifies which Finder Flag\n\t\t\t\t\t\tbits to set or clear. If a bit in flagBits is set,\n\t\t\t\t\t\tthen the same bit in fdFlags is either set or\n\t\t\t\t\t\tcleared depending on the state of the setBits\n\t\t\t\t\t\tparameter.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tSee also:\tChangeFDFlags\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tSetIsInvisible(short vRefNum,\n\t\t\t\t\t\t\t   long dirID,\n\t\t\t\t\t\t\t   ConstStr255Param name);\n/*\t Set the invisible Finder Flag bit.\n\tThe SetIsInvisible function sets the invisible bit in the fdFlags\n\tword of the specified file or directory's finder information.\n\t\n\tvRefNum\tinput:\tVolume specification.\n\tdirID\tinput:\tDirectory ID.\n\tname\tinput:\tPointer to object name, or nil when dirID specifies\n\t\t\t\t\ta directory that's the object.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tSee also:\tFSpSetIsInvisible, ClearIsInvisible, FSpClearIsInvisible\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpSetIsInvisible(const FSSpec *spec);\n/*\t Set the invisible Finder Flag bit.\n\tThe FSpSetIsInvisible function sets the invisible bit in the fdFlags\n\tword of the specified file or directory's finder information.\n\t\n\tspec\tinput:\tAn FSSpec record specifying the object.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tSee also:\tSetIsInvisible, ClearIsInvisible, FSpClearIsInvisible\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tClearIsInvisible(short vRefNum,\n\t\t\t\t\t\t\t\t long dirID,\n\t\t\t\t\t\t\t\t ConstStr255Param name);\n/*\t Clear the invisible Finder Flag bit.\n\tThe ClearIsInvisible function clears the invisible bit in the fdFlags\n\tword of the specified file or directory's finder information.\n\t\n\tvRefNum\tinput:\tVolume specification.\n\tdirID\tinput:\tDirectory ID.\n\tname\tinput:\tPointer to object name, or nil when dirID specifies\n\t\t\t\t\ta directory that's the object.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tSee also:\tSetIsInvisible, FSpSetIsInvisible, FSpClearIsInvisible\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpClearIsInvisible(const FSSpec *spec);\n/*\t Clear the invisible Finder Flag bit.\n\tThe FSpClearIsInvisible function clears the invisible bit in the fdFlags\n\tword of the specified file or directory's finder information.\n\t\n\tspec\tinput:\tAn FSSpec record specifying the object.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tSee also:\tSetIsInvisible, FSpSetIsInvisible, ClearIsInvisible\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tSetNameLocked(short vRefNum,\n\t\t\t\t\t\t\t  long dirID,\n\t\t\t\t\t\t\t  ConstStr255Param name);\n/*\t Set the nameLocked Finder Flag bit.\n\tThe SetNameLocked function sets the nameLocked bit in the fdFlags word\n\tof the specified file or directory's finder information.\n\t\n\tvRefNum\tinput:\tVolume specification.\n\tdirID\tinput:\tDirectory ID.\n\tname\tinput:\tPointer to object name, or nil when dirID specifies\n\t\t\t\t\ta directory that's the object.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tSee also:\tFSpSetNameLocked, ClearNameLocked, FSpClearNameLocked\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpSetNameLocked(const FSSpec *spec);\n/*\t Set the nameLocked Finder Flag bit.\n\tThe FSpSetNameLocked function sets the nameLocked bit in the fdFlags word\n\tof the specified file or directory's finder information.\n\t\n\tspec\tinput:\tAn FSSpec record specifying the object.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tSee also:\tSetNameLocked, ClearNameLocked, FSpClearNameLocked\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tClearNameLocked(short vRefNum,\n\t\t\t\t\t\t\t\tlong dirID,\n\t\t\t\t\t\t\t\tConstStr255Param name);\n/*\t Clear the nameLocked Finder Flag bit.\n\tThe ClearNameLocked function clears the nameLocked bit in the fdFlags\n\tword of the specified file or directory's finder information.\n\t\n\tvRefNum\tinput:\tVolume specification.\n\tdirID\tinput:\tDirectory ID.\n\tname\tinput:\tPointer to object name, or nil when dirID specifies\n\t\t\t\t\ta directory that's the object.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tSee also:\tSetNameLocked, FSpSetNameLocked, FSpClearNameLocked\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpClearNameLocked(const FSSpec *spec);\n/*\t Clear the nameLocked Finder Flag bit.\n\tThe FSpClearNameLocked function clears the nameLocked bit in the fdFlags\n\tword of the specified file or directory's finder information.\n\t\n\tspec\tinput:\tAn FSSpec record specifying the object.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tSee also:\tSetNameLocked, FSpSetNameLocked, ClearNameLocked\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tSetIsStationery(short vRefNum,\n\t\t\t\t\t\t\t\tlong dirID,\n\t\t\t\t\t\t\t\tConstStr255Param name);\n/*\t Set the isStationery Finder Flag bit.\n\tThe SetIsStationery function sets the isStationery bit in the\n\tfdFlags word of the specified file or directory's finder information.\n\t\n\tvRefNum\tinput:\tVolume specification.\n\tdirID\tinput:\tDirectory ID.\n\tname\tinput:\tPointer to object name, or nil when dirID specifies\n\t\t\t\t\ta directory that's the object.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tSee also:\tFSpSetIsStationery, ClearIsStationery, FSpClearIsStationery\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpSetIsStationery(const FSSpec *spec);\n/*\t Set the isStationery Finder Flag bit.\n\tThe FSpSetIsStationery function sets the isStationery bit in the\n\tfdFlags word of the specified file or directory's finder information.\n\t\n\tspec\tinput:\tAn FSSpec record specifying the object.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tSee also:\tSetIsStationery, ClearIsStationery, FSpClearIsStationery\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tClearIsStationery(short vRefNum,\n\t\t\t\t\t\t\t\t  long dirID,\n\t\t\t\t\t\t\t\t  ConstStr255Param name);\n/*\t Clear the isStationery Finder Flag bit.\n\tThe ClearIsStationery function clears the isStationery bit in the\n\tfdFlags word of the specified file or directory's finder information.\n\t\n\tvRefNum\tinput:\tVolume specification.\n\tdirID\tinput:\tDirectory ID.\n\tname\tinput:\tPointer to object name, or nil when dirID specifies\n\t\t\t\t\ta directory that's the object.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tSee also:\tSetIsStationery, FSpSetIsStationery, FSpClearIsStationery\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpClearIsStationery(const FSSpec *spec);\n/*\t Clear the isStationery Finder Flag bit.\n\tThe FSpClearIsStationery function clears the isStationery bit in the\n\tfdFlags word of the specified file or directory's finder information.\n\t\n\tspec\tinput:\tAn FSSpec record specifying the object.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tSee also:\tSetIsStationery, FSpSetIsStationery, ClearIsStationery\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tSetHasCustomIcon(short vRefNum,\n\t\t\t\t\t\t\t\t long dirID,\n\t\t\t\t\t\t\t\t ConstStr255Param name);\n/*\t Set the hasCustomIcon Finder Flag bit.\n\tThe SetHasCustomIcon function sets the hasCustomIcon bit in the\n\tfdFlags word of the specified file or directory's finder information.\n\t\n\tvRefNum\tinput:\tVolume specification.\n\tdirID\tinput:\tDirectory ID.\n\tname\tinput:\tPointer to object name, or nil when dirID specifies\n\t\t\t\t\ta directory that's the object.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tSee also:\tFSpSetHasCustomIcon, ClearHasCustomIcon, FSpClearHasCustomIcon\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpSetHasCustomIcon(const FSSpec *spec);\n/*\t Set the hasCustomIcon Finder Flag bit.\n\tThe FSpSetHasCustomIcon function sets the hasCustomIcon bit in the\n\tfdFlags word of the specified file or directory's finder information.\n\t\n\tspec\tinput:\tAn FSSpec record specifying the object.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tSee also:\tSetHasCustomIcon, ClearHasCustomIcon, FSpClearHasCustomIcon\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tClearHasCustomIcon(short vRefNum,\n\t\t\t\t\t\t\t\t   long dirID,\n\t\t\t\t\t\t\t\t   ConstStr255Param name);\n/*\t Clear the hasCustomIcon Finder Flag bit.\n\tThe ClearHasCustomIcon function clears the hasCustomIcon bit in the\n\tfdFlags word of the specified file or directory's finder information.\n\t\n\tvRefNum\tinput:\tVolume specification.\n\tdirID\tinput:\tDirectory ID.\n\tname\tinput:\tPointer to object name, or nil when dirID specifies\n\t\t\t\t\ta directory that's the object.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tSee also:\tSetHasCustomIcon, FSpSetHasCustomIcon, FSpClearHasCustomIcon\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpClearHasCustomIcon(const FSSpec *spec);\n/*\t Clear the hasCustomIcon Finder Flag bit.\n\tThe FSpClearHasCustomIcon function clears the hasCustomIcon bit in the\n\tfdFlags word of the specified file or directory's finder information.\n\t\n\tspec\tinput:\tAn FSSpec record specifying the object.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tSee also:\tSetHasCustomIcon, FSpSetHasCustomIcon, ClearHasCustomIcon\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tClearHasBeenInited(short vRefNum,\n\t\t\t\t\t\t\t\t   long dirID,\n\t\t\t\t\t\t\t\t   ConstStr255Param name);\n/*\t Clear the hasBeenInited Finder Flag bit.\n\tThe ClearHasBeenInited function clears the hasBeenInited bit in the\n\tfdFlags word of the specified file or directory's finder information.\n\t\n\tvRefNum\tinput:\tVolume specification.\n\tdirID\tinput:\tDirectory ID.\n\tname\tinput:\tPointer to object name, or nil when dirID specifies\n\t\t\t\t\ta directory that's the object.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tSee also:\tFSpClearHasBeenInited\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpClearHasBeenInited(const FSSpec *spec);\n/*\t Clear the hasBeenInited Finder Flag bit.\n\tThe FSpClearHasBeenInited function clears the hasBeenInited bit in the\n\tfdFlags word of the specified file or directory's finder information.\n\t\n\tspec\tinput:\tAn FSSpec record specifying the object.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tSee also:\tClearHasBeenInited\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tCopyFileMgrAttributes(short srcVRefNum,\n\t\t\t\t\t\t\t\t\t  long srcDirID,\n\t\t\t\t\t\t\t\t\t  ConstStr255Param srcName,\n\t\t\t\t\t\t\t\t\t  short dstVRefNum,\n\t\t\t\t\t\t\t\t\t  long dstDirID,\n\t\t\t\t\t\t\t\t\t  ConstStr255Param dstName,\n\t\t\t\t\t\t\t\t\t  Boolean copyLockBit);\n/*\t Copy all File Manager attributes from the source to the destination.\n\tThe CopyFileMgrAttributes function copies all File Manager attributes\n\tfrom the source file or directory to the destination file or directory.\n\tIf copyLockBit is true, then set the locked state of the destination\n\tto match the source.\n\n\tsrcVRefNum\tinput:\tSource volume specification.\n\tsrcDirID\tinput:\tSource directory ID.\n\tsrcName\t\tinput:\tPointer to source object name, or nil when\n\t\t\t\t\t\tsrcDirID specifies a directory that's the object.\n\tdstVRefNum\tinput:\tDestination volume specification.\n\tdstDirID\tinput:\tDestination directory ID.\n\tdstName\t\tinput:\tPointer to destination object name, or nil when\n\t\t\t\t\t\tdstDirID specifies a directory that's the object.\n\tcopyLockBit\tinput:\tIf true, set the locked state of the destination\n\t\t\t\t\t\tto match the source.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tSee also:\tFSpCopyFileMgrAttributes\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpCopyFileMgrAttributes(const FSSpec *srcSpec,\n\t\t\t\t\t\t\t\t\t\t const FSSpec *dstSpec,\n\t\t\t\t\t\t\t\t\t\t Boolean copyLockBit);\n/*\t Copy all File Manager attributes from the source to the destination.\n\tThe FSpCopyFileMgrAttributes function copies all File Manager attributes\n\tfrom the source file or directory to the destination file or directory.\n\tIf copyLockBit is true, then set the locked state of the destination\n\tto match the source.\n\n\tsrcSpec\t\tinput:\tAn FSSpec record specifying the source object.\n\tdstSpec\t\tinput:\tAn FSSpec record specifying the destination object.\n\tcopyLockBit\tinput:\tIf true, set the locked state of the destination\n\t\t\t\t\t\tto match the source.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\n\t__________\n\t\n\tSee also:\tCopyFileMgrAttributes\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tHOpenAware(short vRefNum,\n\t\t\t\t\t\t   long dirID,\n\t\t\t\t\t\t   ConstStr255Param fileName,\n\t\t\t\t\t\t   short denyModes,\n\t\t\t\t\t\t   short *refNum);\n/*\t Open the data fork of a file using deny mode permissions.\n\tThe HOpenAware function opens the data fork of a file using deny mode\n\tpermissions instead the normal File Manager permissions.  If OpenDeny\n\tis not available, then HOpenAware translates the deny modes to the\n\tclosest File Manager permissions and tries to open the file with\n\tOpenDF first, and then Open if OpenDF isn't available. By using\n\tHOpenAware with deny mode permissions, a program can be \"AppleShare\n\taware\" and fall back on the standard File Manager open calls\n\tautomatically.\n\n\tvRefNum\t\tinput:\tVolume specification.\n\tdirID\t\tinput:\tDirectory ID.\n\tfileName\tinput:\tThe name of the file.\n\tdenyModes\tinput:\tThe deny modes access under which to open the file.\n\trefNum\t\toutput:\tThe file reference number of the opened file.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\ttmfoErr\t\t\t\t-42\t\tToo many files open\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\twPrErr\t\t\t\t-44\t\tVolume locked by hardware\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\topWrErr\t\t\t\t-49\t\tFile already open for writing\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tpermErr\t \t\t\t-54\t\tFile is already open and cannot be opened using specified deny modes\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access to the file\n\t\tafpDenyConflict\t\t-5006\tRequested access permission not possible\n\t\n\t__________\n\t\n\tSee also:\tFSpOpenAware, HOpenRFAware, FSpOpenRFAware\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpOpenAware(const FSSpec *spec,\n\t\t\t\t\t\t\t short denyModes,\n\t\t\t\t\t\t\t short *refNum);\n/*\t Open the data fork of a file using deny mode permissions.\n\tThe FSpOpenAware function opens the data fork of a file using deny mode\n\tpermissions instead the normal File Manager permissions.  If OpenDeny\n\tis not available, then FSpOpenAware translates the deny modes to the\n\tclosest File Manager permissions and tries to open the file with\n\tOpenDF first, and then Open if OpenDF isn't available. By using\n\tFSpOpenAware with deny mode permissions, a program can be \"AppleShare\n\taware\" and fall back on the standard File Manager open calls\n\tautomatically.\n\n\tspec\t\tinput:\tAn FSSpec record specifying the file.\n\tdenyModes\tinput:\tThe deny modes access under which to open the file.\n\trefNum\t\toutput:\tThe file reference number of the opened file.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\ttmfoErr\t\t\t\t-42\t\tToo many files open\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\twPrErr\t\t\t\t-44\t\tVolume locked by hardware\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\topWrErr\t\t\t\t-49\t\tFile already open for writing\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tpermErr\t \t\t\t-54\t\tFile is already open and cannot be opened using specified deny modes\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access to the file\n\t\tafpDenyConflict\t\t-5006\tRequested access permission not possible\n\t\n\t__________\n\t\n\tSee also:\tHOpenAware, HOpenRFAware, FSpOpenRFAware\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tHOpenRFAware(short vRefNum,\n\t\t\t\t\t\t\t long dirID,\n\t\t\t\t\t\t\t ConstStr255Param fileName,\n\t\t\t\t\t\t\t short denyModes,\n\t\t\t\t\t\t\t short *refNum);\n/*\t Open the resource fork of a file using deny mode permissions.\n\tThe HOpenRFAware function opens the resource fork of a file using deny\n\tmode permissions instead the normal File Manager permissions.  If\n\tOpenRFDeny is not available, then HOpenRFAware translates the deny\n\tmodes to the closest File Manager permissions and tries to open the\n\tfile with OpenRF. By using HOpenRFAware with deny mode permissions,\n\ta program can be \"AppleShare aware\" and fall back on the standard\n\tFile Manager open calls automatically.\n\n\tvRefNum\t\tinput:\tVolume specification.\n\tdirID\t\tinput:\tDirectory ID.\n\tfileName\tinput:\tThe name of the file.\n\tdenyModes\tinput:\tThe deny modes access under which to open the file.\n\trefNum\t\toutput:\tThe file reference number of the opened file.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\ttmfoErr\t\t\t\t-42\t\tToo many files open\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\twPrErr\t\t\t\t-44\t\tVolume locked by hardware\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\topWrErr\t\t\t\t-49\t\tFile already open for writing\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tpermErr\t \t\t\t-54\t\tFile is already open and cannot be opened using specified deny modes\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access to the file\n\t\tafpDenyConflict\t\t-5006\tRequested access permission not possible\n\t\n\t__________\n\t\n\tSee also:\tHOpenAware, FSpOpenAware, FSpOpenRFAware\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpOpenRFAware(const FSSpec *spec,\n\t\t\t\t\t\t\t   short denyModes,\n\t\t\t\t\t\t\t   short *refNum);\n/*\t Open the resource fork of a file using deny mode permissions.\n\tThe FSpOpenRFAware function opens the resource fork of a file using deny\n\tmode permissions instead the normal File Manager permissions.  If\n\tOpenRFDeny is not available, then FSpOpenRFAware translates the deny\n\tmodes to the closest File Manager permissions and tries to open the\n\tfile with OpenRF. By using FSpOpenRFAware with deny mode permissions,\n\ta program can be \"AppleShare aware\" and fall back on the standard\n\tFile Manager open calls automatically.\n\n\tspec\t\tinput:\tAn FSSpec record specifying the file.\n\tdenyModes\tinput:\tThe deny modes access under which to open the file.\n\trefNum\t\toutput:\tThe file reference number of the opened file.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tNo such volume\n\t\ttmfoErr\t\t\t\t-42\t\tToo many files open\n\t\tfnfErr\t\t\t\t-43\t\tFile not found\n\t\twPrErr\t\t\t\t-44\t\tVolume locked by hardware\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\topWrErr\t\t\t\t-49\t\tFile already open for writing\n\t\tparamErr\t\t\t-50\t\tNo default volume\n\t\tpermErr\t \t\t\t-54\t\tFile is already open and cannot be opened using specified deny modes\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access to the file\n\t\tafpDenyConflict\t\t-5006\tRequested access permission not possible\n\t\n\t__________\n\t\n\tSee also:\tHOpenAware, FSpOpenAware, HOpenRFAware\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSReadNoCache(short refNum,\n\t\t\t\t\t\t\t  long *count,\n\t\t\t\t\t\t\t  void *buffPtr);\n/*\t Read any number of bytes from an open file requesting no caching.\n\tThe FSReadNoCache function reads any number of bytes from an open file\n\twhile asking the file system to bypass its cache mechanism.\n\t\n\trefNum\tinput:\tThe file reference number of an open file.\n\tcount\tinput:\tThe number of bytes to read.\n\t\t\toutput:\tThe number of bytes actually read.\n\tbuffPtr\tinput:\tA pointer to the data buffer into which the bytes are\n\t\t\t\t\tto be read.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\treadErr\t\t\t\t19\t\tDriver does not respond to read requests\n\t\tbadUnitErr\t\t\t21\t\tDriver reference number does not\n\t\t\t\t\t\t\t\t\tmatch unit table\n\t\tunitEmptyErr\t\t22\t\tDriver reference number specifies a\n\t\t\t\t\t\t\t\t\tnil handle in unit table\n\t\tabortErr\t\t\t27\t\tRequest aborted by KillIO\n\t\tnotOpenErr\t\t\t28\t\tDriver not open\n\t\tioErr\t\t\t\t36\t\tData does not match in read-verify mode\n\t\tfnOpnErr\t\t\t-38\t\tFile not open\n\t\trfNumErr\t\t\t-51\t\tBad reference number\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access to\n\t\t\t\t\t\t\t\t\tthe file\n\n\t__________\n\t\n\tSee also:\tFSWriteNoCache\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSWriteNoCache(short refNum,\n\t\t\t\t\t\t\t   long *count,\n\t\t\t\t\t\t\t   const void *buffPtr);\n/*\t Write any number of bytes to an open file requesting no caching.\n\tThe FSReadNoCache function writes any number of bytes to an open file\n\twhile asking the file system to bypass its cache mechanism.\n\t\n\trefNum\tinput:\tThe file reference number of an open file.\n\tcount\tinput:\tThe number of bytes to write to the file.\n\t\t\toutput:\tThe number of bytes actually written.\n\tbuffPtr\tinput:\tA pointer to the data buffer from which the bytes are\n\t\t\t\t\tto be written.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\twritErr\t\t\t\t20\t\tDriver does not respond to write requests\n\t\tbadUnitErr\t\t\t21\t\tDriver reference number does not\n\t\t\t\t\t\t\t\t\tmatch unit table\n\t\tunitEmptyErr\t\t22\t\tDriver reference number specifies a\n\t\t\t\t\t\t\t\t\tnil handle in unit table\n\t\tabortErr\t\t\t27\t\tRequest aborted by KillIO\n\t\tnotOpenErr\t\t\t28\t\tDriver not open\n\t\tdskFulErr\t\t\t-34\t\tDisk full\t\n\t\tioErr\t\t\t\t36\t\tData does not match in read-verify mode\n\t\tfnOpnErr\t\t\t-38\t\tFile not open\n\t\twPrErr\t\t\t\t-44\t\tHardware volume lock\t\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\t\n\t\tvLckdErr\t\t\t-46\t\tSoftware volume lock\t\n\t\trfNumErr\t\t\t-51\t\tBad reference number\n\t\twrPermErr\t\t\t-61\t\tRead/write permission doesnt\n\t\t\t\t\t\t\t\t\tallow writing\t\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access to\n\t\t\t\t\t\t\t\t\tthe file\n\n\t__________\n\t\n\tSee also:\tFSReadNoCache\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSWriteVerify(short refNum,\n\t\t\t\t\t\t\t  long *count,\n\t\t\t\t\t\t\t  const void *buffPtr);\n/*\t Write any number of bytes to an open file and then verify the data was written.\n\tThe FSWriteVerify function writes any number of bytes to an open file\n\tand then verifies that the data was actually written to the device.\n\t\n\trefNum\tinput:\tThe file reference number of an open file.\n\tcount\tinput:\tThe number of bytes to write to the file.\n\t\t\toutput:\tThe number of bytes actually written and verified.\n\tbuffPtr\tinput:\tA pointer to the data buffer from which the bytes are\n\t\t\t\t\tto be written.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\treadErr\t\t\t\t19\t\tDriver does not respond to read requests\n\t\twritErr\t\t\t\t20\t\tDriver does not respond to write requests\n\t\tbadUnitErr\t\t\t21\t\tDriver reference number does not\n\t\t\t\t\t\t\t\t\tmatch unit table\n\t\tunitEmptyErr\t\t22\t\tDriver reference number specifies a\n\t\t\t\t\t\t\t\t\tnil handle in unit table\n\t\tabortErr\t\t\t27\t\tRequest aborted by KillIO\n\t\tnotOpenErr\t\t\t28\t\tDriver not open\n\t\tdskFulErr\t\t\t-34\t\tDisk full\t\n\t\tioErr\t\t\t\t36\t\tData does not match in read-verify mode\n\t\tfnOpnErr\t\t\t-38\t\tFile not open\n\t\teofErr\t\t\t\t-39\t\tLogical end-of-file reached\n\t\tposErr\t\t\t\t-40\t\tAttempt to position mark before start\n\t\t\t\t\t\t\t\t\tof file\n\t\twPrErr\t\t\t\t-44\t\tHardware volume lock\t\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\t\n\t\tvLckdErr\t\t\t-46\t\tSoftware volume lock\t\n\t\trfNumErr\t\t\t-51\t\tBad reference number\n\t\tgfpErr\t\t\t\t-52\t\tError during GetFPos\n\t\twrPermErr\t\t\t-61\t\tRead/write permission doesnt\n\t\t\t\t\t\t\t\t\tallow writing\t\n\t\tmemFullErr\t\t\t-108\tNot enough room in heap zone to allocate\n\t\t\t\t\t\t\t\t\tverify buffer\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access to\n\t\t\t\t\t\t\t\t\tthe file\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tCopyFork(short srcRefNum,\n\t\t\t\t\t\t short dstRefNum,\n\t\t\t\t\t\t void *copyBufferPtr,\n\t\t\t\t\t\t long copyBufferSize);\n/*\t Copy all data from the source fork to the destination fork of open file forks.\n\tThe CopyFork function copies all data from the source fork to the\n\tdestination fork of open file forks and makes sure the destination EOF\n\tis equal to the source EOF.\n\t\n\tsrcRefNum\t\tinput:\tThe source file reference number.\n\tdstRefNum\t\tinput:\tThe destination file reference number.\n\tcopyBufferPtr\tinput:\tPointer to buffer to use during copy. The\n\t\t\t\t\t\t\tbuffer should be at least 512-bytes minimum.\n\t\t\t\t\t\t\tThe larger the buffer, the faster the copy.\n\tcopyBufferSize\tinput:\tThe size of the copy buffer.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\treadErr\t\t\t\t19\t\tDriver does not respond to read requests\n\t\twritErr\t\t\t\t20\t\tDriver does not respond to write requests\n\t\tbadUnitErr\t\t\t21\t\tDriver reference number does not\n\t\t\t\t\t\t\t\t\tmatch unit table\n\t\tunitEmptyErr\t\t22\t\tDriver reference number specifies a\n\t\t\t\t\t\t\t\t\tnil handle in unit table\n\t\tabortErr\t\t\t27\t\tRequest aborted by KillIO\n\t\tnotOpenErr\t\t\t28\t\tDriver not open\n\t\tdskFulErr\t\t\t-34\t\tDisk full\t\n\t\tioErr\t\t\t\t36\t\tData does not match in read-verify mode\n\t\tfnOpnErr\t\t\t-38\t\tFile not open\n\t\twPrErr\t\t\t\t-44\t\tHardware volume lock\t\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\t\n\t\tvLckdErr\t\t\t-46\t\tSoftware volume lock\t\n\t\trfNumErr\t\t\t-51\t\tBad reference number\n\t\twrPermErr\t\t\t-61\t\tRead/write permission doesnt\n\t\t\t\t\t\t\t\t\tallow writing\t\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access to\n\t\t\t\t\t\t\t\t\tthe file\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetFileLocation(short refNum,\n\t\t\t\t\t\t\t\tshort *vRefNum,\n\t\t\t\t\t\t\t\tlong *dirID,\n\t\t\t\t\t\t\t\tStringPtr fileName);\n/*\t Get the location of an open file.\n\tThe GetFileLocation function gets the location (volume reference number,\n\tdirectory ID, and fileName) of an open file.\n\n\trefNum\t\tinput:\tThe file reference number of an open file.\n\tvRefNum\t\toutput:\tThe volume reference number.\n\tdirID\t\toutput:\tThe parent directory ID.\n\tfileName\tinput:\tPoints to a buffer (minimum Str63) where the\n\t\t\t\t\t\tfilename is to be returned or must be nil.\n\t\t\t\toutput:\tThe filename.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tSpecified volume doesnt exist\n\t\tfnOpnErr\t\t\t-38\t\tFile not open\n\t\trfNumErr\t\t\t-51\t\tReference number specifies nonexistent\n\t\t\t\t\t\t\t\t\taccess path\n\t\n\t__________\n\t\n\tSee also:\tFSpGetFileLocation\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpGetFileLocation(short refNum,\n\t\t\t\t\t\t\t\t   FSSpec *spec);\n/*\t Get the location of an open file in an FSSpec record.\n\tThe FSpGetFileLocation function gets the location of an open file in\n\tan FSSpec record.\n\n\trefNum\t\tinput:\tThe file reference number of an open file.\n\tspec\t\toutput:\tFSSpec record containing the file name and location.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tSpecified volume doesnt exist\n\t\tfnOpnErr\t\t\t-38\t\tFile not open\n\t\trfNumErr\t\t\t-51\t\tReference number specifies nonexistent\n\t\t\t\t\t\t\t\t\taccess path\n\t\n\t__________\n\t\n\tSee also:\tGetFileLocation\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tCopyDirectoryAccess(short srcVRefNum,\n\t\t\t\t\t\t\t\t\tlong srcDirID,\n\t\t\t\t\t\t\t\t\tConstStr255Param srcName,\n\t\t\t\t\t\t\t\t\tshort dstVRefNum,\n\t\t\t\t\t\t\t\t\tlong dstDirID,\n\t\t\t\t\t\t\t\t\tConstStr255Param dstName);\n/*\t Copy the AFP directory access privileges.\n\tThe CopyDirectoryAccess function copies the AFP directory access\n\tprivileges from one directory to another. Both directories must be on\n\tthe same file server, but not necessarily on the same server volume.\n\t\n\tsrcVRefNum\tinput:\tSource volume specification.\n\tsrcDirID\tinput:\tSource directory ID.\n\tsrcName\t\tinput:\tPointer to source directory name, or nil when\n\t\t\t\t\t\tsrcDirID specifies the directory.\n\tdstVRefNum\tinput:\tDestination volume specification.\n\tdstDirID\tinput:\tDestination directory ID.\n\tdstName\t\tinput:\tPointer to destination directory name, or nil when\n\t\t\t\t\t\tdstDirID specifies the directory.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tfnfErr\t\t\t\t-43\t\tDirectory not found\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tVolume doesn't support this function\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\t\t\t\t\t\t\t\tto the directory\n\t\tafpObjectTypeErr\t-5025\tObject is a file, not a directory\n\t\n\t__________\n\t\n\tSee also:\tFSpCopyDirectoryAccess\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpCopyDirectoryAccess(const FSSpec *srcSpec,\n\t\t\t\t\t\t\t\t\t   const FSSpec *dstSpec);\n/*\t Copy the AFP directory access privileges.\n\tThe FSpCopyDirectoryAccess function copies the AFP directory access\n\tprivileges from one directory to another. Both directories must be on\n\tthe same file server, but not necessarily on the same server volume.\n\n\tsrcSpec\t\tinput:\tAn FSSpec record specifying the source directory.\n\tdstSpec\t\tinput:\tAn FSSpec record specifying the destination directory.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tfnfErr\t\t\t\t-43\t\tDirectory not found\n\t\tvLckdErr\t\t\t-46\t\tVolume is locked or read-only\n\t\tparamErr\t\t\t-50\t\tVolume doesn't support this function\n\t\tafpAccessDenied\t\t-5000\tUser does not have the correct access\n\t\t\t\t\t\t\t\t\tto the directory\n\t\tafpObjectTypeErr\t-5025\tObject is a file, not a directory\n\t\n\t__________\n\t\n\tSee also:\tCopyDirectoryAccess\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tHMoveRenameCompat(short vRefNum,\n\t\t\t\t\t\t\t\t  long srcDirID,\n\t\t\t\t\t\t\t\t  ConstStr255Param srcName,\n\t\t\t\t\t\t\t\t  long dstDirID,\n\t\t\t\t\t\t\t\t  ConstStr255Param dstpathName,\n\t\t\t\t\t\t\t\t  ConstStr255Param copyName);\n/*\t Move a file or directory and optionally rename it.\n\tThe HMoveRenameCompat function moves a file or directory and optionally\n\trenames it.  The source and destination locations must be on the same\n\tvolume. This routine works even if the volume doesn't support MoveRename.\n\t\n\tvRefNum\t\tinput:\tVolume specification.\n\tsrcDirID\tinput:\tSource directory ID.\n\tsrcName\t\tinput:\tThe source object name.\n\tdstDirID\tinput:\tDestination directory ID.\n\tdstName\t\tinput:\tPointer to destination directory name, or\n\t\t\t\t\t\tnil when dstDirID specifies a directory.\n\tcopyName\tinput:\tPoints to the new name if the object is to be\n\t\t\t\t\t\trenamed or nil if the object isn't to be renamed.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tdirFulErr\t\t\t-33\t\tFile directory full\n\t\tdskFulErr\t\t\t-34\t\tDisk is full\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename or attempt to move into\n\t\t\t\t\t\t\t\t\ta file\n\t\tfnfErr\t\t\t\t-43\t\tSource file or directory not found\n\t\twPrErr\t\t\t\t-44\t\tHardware volume lock\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tDestination volume is read-only\n\t\tfBsyErr\t\t\t\t-47\t\tFile busy, directory not empty, or\n\t\t\t\t\t\t\t\t\tworking directory control block open\n\t\tdupFNErr\t\t\t-48\t\tDestination already exists\n\t\tparamErr\t\t\t-50\t\tVolume doesn't support this function,\n\t\t\t\t\t\t\t\t\tno default volume, or source and\n\t\tvolOfflinErr\t\t-53\t\tVolume is offline\n\t\tfsRnErr\t\t\t\t-59\t\tProblem during rename\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tbadMovErr\t\t\t-122\tAttempted to move directory into\n\t\t\t\t\t\t\t\t\toffspring\n\t\twrgVolTypErr\t\t-123\tNot an HFS volume (it's a MFS volume)\n\t\tnotAFileErr\t\t\t-1302\tThe pathname is nil, the pathname\n\t\t\t\t\t\t\t\t\tis empty, or the pathname cannot refer\n\t\t\t\t\t\t\t\t\tto a filename\n\t\tdiffVolErr\t\t\t-1303\tFiles on different volumes\n\t\tafpAccessDenied\t\t-5000\tThe user does not have the right to\n\t\t\t\t\t\t\t\t\tmove the file  or directory\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\tafpSameObjectErr\t-5038\tSource and destination files are the same\n\t\n\t__________\n\t\n\tSee also:\tFSpMoveRenameCompat\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpMoveRenameCompat(const FSSpec *srcSpec,\n\t\t\t\t\t\t\t\t\tconst FSSpec *dstSpec,\n\t\t\t\t\t\t\t\t\tConstStr255Param copyName);\n/*\t Move a file or directory and optionally rename it.\n\tThe FSpMoveRenameCompat function moves a file or directory and optionally\n\trenames it.  The source and destination locations must be on the same\n\tvolume. This routine works even if the volume doesn't support MoveRename.\n\t\n\tsrcSpec\t\tinput:\tAn FSSpec record specifying the source object.\n\tdstSpec\t\tinput:\tAn FSSpec record specifying the destination\n\t\t\t\t\t\tdirectory.\n\tcopyName\tinput:\tPoints to the new name if the object is to be\n\t\t\t\t\t\trenamed or nil if the object isn't to be renamed.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tdirFulErr\t\t\t-33\t\tFile directory full\n\t\tdskFulErr\t\t\t-34\t\tDisk is full\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\tbdNamErr\t\t\t-37\t\tBad filename or attempt to move into\n\t\t\t\t\t\t\t\t\ta file\n\t\tfnfErr\t\t\t\t-43\t\tSource file or directory not found\n\t\twPrErr\t\t\t\t-44\t\tHardware volume lock\n\t\tfLckdErr\t\t\t-45\t\tFile is locked\n\t\tvLckdErr\t\t\t-46\t\tDestination volume is read-only\n\t\tfBsyErr\t\t\t\t-47\t\tFile busy, directory not empty, or\n\t\t\t\t\t\t\t\t\tworking directory control block open\n\t\tdupFNErr\t\t\t-48\t\tDestination already exists\n\t\tparamErr\t\t\t-50\t\tVolume doesn't support this function,\n\t\t\t\t\t\t\t\t\tno default volume, or source and\n\t\tvolOfflinErr\t\t-53\t\tVolume is offline\n\t\tfsRnErr\t\t\t\t-59\t\tProblem during rename\n\t\tdirNFErr\t\t\t-120\tDirectory not found or incomplete pathname\n\t\tbadMovErr\t\t\t-122\tAttempted to move directory into\n\t\t\t\t\t\t\t\t\toffspring\n\t\twrgVolTypErr\t\t-123\tNot an HFS volume (it's a MFS volume)\n\t\tnotAFileErr\t\t\t-1302\tThe pathname is nil, the pathname\n\t\t\t\t\t\t\t\t\tis empty, or the pathname cannot refer\n\t\t\t\t\t\t\t\t\tto a filename\n\t\tdiffVolErr\t\t\t-1303\tFiles on different volumes\n\t\tafpAccessDenied\t\t-5000\tThe user does not have the right to\n\t\t\t\t\t\t\t\t\tmove the file  or directory\n\t\tafpObjectTypeErr\t-5025\tDirectory not found or incomplete pathname\n\t\tafpSameObjectErr\t-5038\tSource and destination files are the same\n\t\n\t__________\n\t\n\tSee also:\tHMoveRenameCompat\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tBuildAFPVolMountInfo(short flags,\n\t\t\t\t\t\t\t\t\t char nbpInterval,\n\t\t\t\t\t\t\t\t\t char nbpCount,\n\t\t\t\t\t\t\t\t\t short uamType,\n\t\t\t\t\t\t\t\t\t Str32 zoneName,\n\t\t\t\t\t\t\t\t\t Str31 serverName,\n\t\t\t\t\t\t\t\t\t Str27 volName,\n\t\t\t\t\t\t\t\t\t Str31 userName,\n\t\t\t\t\t\t\t\t\t Str8 userPassword,\n\t\t\t\t\t\t\t\t\t Str8 volPassword,\n\t\t\t\t\t\t\t\t\t AFPVolMountInfoPtr *afpInfoPtr);\n/*\t Allocate and initializes the fields of an AFPVolMountInfo record.\n\tThe BuildAFPVolMountInfo function allocates and initializes the fields\n\tof an AFPVolMountInfo record before using that record to call\n\tthe VolumeMount function.\n\t\n\tflags\t\t\tinput:\tThe AFP mounting flags. 0 = normal mount;\n\t\t\t\t\t\t\tset bit 0 to inhibit greeting messages.\n\tnbpInterval\t\tinput:\tThe interval used for VolumeMount's\n\t\t\t\t\t\t\tNBP Lookup call. 7 is a good choice.\n\tnbpCount\t\tinput:\tThe retry count used for VolumeMount's\n\t\t\t\t\t\t\tNBP Lookup call. 5 is a good choice.\n\tuamType\t\t\tinput:\tThe user authentication method to use.\n\tzoneName\t\tinput:\tThe AppleTalk zone name of the server.\n\tserverName\t\tinput:\tThe AFP server name.\n\tvolName\t\t\tinput:\tThe AFP volume name.\n\tuserName\t\tinput:\tThe user name (zero length Pascal string for\n\t\t\t\t\t\t\tguest).\n\tuserPassWord\tinput:\tThe user password (zero length Pascal string\n\t\t\t\t\t\t\tif no user password)\n\tvolPassWord\t\tinput:\tThe volume password (zero length Pascal string\n\t\t\t\t\t\t\tif no volume password)\n\tafpInfoPtr\t\toutput:\tA pointer to the newly created and initialized\n\t\t\t\t\t\t\tAFPVolMountInfo record. If the function fails to\n\t\t\t\t\t\t\tcreate an AFPVolMountInfo record, it sets\n\t\t\t\t\t\t\tafpInfoPtr to NULL and the function result is\n\t\t\t\t\t\t\tmemFullErr. Your program is responsible\n\t\t\t\t\t\t\tfor disposing of this pointer when it is finished\n\t\t\t\t\t\t\twith it.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tmemFullErr\t\t\t-108\tmemory full error\n\t\n\t__________\n\t\n\tAlso see:\tGetVolMountInfoSize, GetVolMountInfo, VolumeMount,\n\t\t\t\tRetrieveAFPVolMountInfo, BuildAFPXVolMountInfo,\n\t\t\t\tRetrieveAFPXVolMountInfo\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tRetrieveAFPVolMountInfo(AFPVolMountInfoPtr afpInfoPtr,\n\t\t\t\t\t\t\t\t\t\tshort *flags,\n\t\t\t\t\t\t\t\t\t\tshort *uamType,\n\t\t\t\t\t\t\t\t\t\tStringPtr zoneName,\n\t\t\t\t\t\t\t\t\t\tStringPtr serverName,\n\t\t\t\t\t\t\t\t\t\tStringPtr volName,\n\t\t\t\t\t\t\t\t\t\tStringPtr userName);\n/*\t Retrieve the AFP mounting information from an AFPVolMountInfo record.\n\tThe RetrieveAFPVolMountInfo function retrieves the AFP mounting\n\tinformation returned in an AFPVolMountInfo record by the\n\tGetVolMountInfo function.\n\t\n\tafpInfoPtr\t\tinput:\tPointer to AFPVolMountInfo record that contains\n\t\t\t\t\t\t\tthe AFP mounting information.\n\tflags\t\t\toutput:\tThe AFP mounting flags.\n\tuamType\t\t\toutput:\tThe user authentication method used.\n\tzoneName\t\toutput:\tThe AppleTalk zone name of the server.\n\tserverName\t\toutput:\tThe AFP server name.\n\tvolName\t\t\toutput:\tThe AFP volume name.\n\tuserName\t\toutput:\tThe user name (zero length Pascal string for\n\t\t\t\t\t\t\tguest).\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tparamErr\t\t\t-50\t\tmedia field in AFP mounting information\n\t\t\t\t\t\t\t\t\twas not AppleShareMediaType\n\t\n\t__________\n\t\n\tAlso see:\tGetVolMountInfoSize, GetVolMountInfo, VolumeMount,\n\t\t\t\tBuildAFPVolMountInfo, BuildAFPXVolMountInfo,\n\t\t\t\tRetrieveAFPXVolMountInfo\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tBuildAFPXVolMountInfo(short flags,\n\t\t\t\t\t\t\t\t\t  char nbpInterval,\n\t\t\t\t\t\t\t\t\t  char nbpCount,\n\t\t\t\t\t\t\t\t\t  short uamType,\n\t\t\t\t\t\t\t\t\t  Str32 zoneName,\n\t\t\t\t\t\t\t\t\t  Str31 serverName,\n\t\t\t\t\t\t\t\t\t  Str27 volName,\n\t\t\t\t\t\t\t\t\t  Str31 userName,\n\t\t\t\t\t\t\t\t\t  Str8 userPassword,\n\t\t\t\t\t\t\t\t\t  Str8 volPassword,\n\t\t\t\t\t\t\t\t\t  Str32 uamName,\n\t\t\t\t\t\t\t\t\t  unsigned long alternateAddressLength,\n\t\t\t\t\t\t\t\t\t  void *alternateAddress,\n\t\t\t\t\t\t\t\t\t  AFPXVolMountInfoPtr *afpXInfoPtr);\n/*\t Allocate and initializes the fields of an AFPXVolMountInfo record.\n\tThe BuildAFPXVolMountInfo function allocates and initializes the fields\n\tof an AFPXVolMountInfo record before using that record to call\n\tthe VolumeMount function.\n\t\n\tflags\t\t\t\t\tinput:\tThe AFP mounting flags.\n\tnbpInterval\t\t\t\tinput:\tThe interval used for VolumeMount's\n\t\t\t\t\t\t\t\t\tNBP Lookup call. 7 is a good choice.\n\tnbpCount\t\t\t\tinput:\tThe retry count used for VolumeMount's\n\t\t\t\t\t\t\t\t\tNBP Lookup call. 5 is a good choice.\n\tuamType\t\t\t\t\tinput:\tThe user authentication method to use.\n\tzoneName\t\t\t\tinput:\tThe AppleTalk zone name of the server.\n\tserverName\t\t\t\tinput:\tThe AFP server name.\n\tvolName\t\t\t\t\tinput:\tThe AFP volume name.\n\tuserName\t\t\t\tinput:\tThe user name (zero length Pascal string\n\t\t\t\t\t\t\t\t\tfor guest).\n\tuserPassWord\t\t\tinput:\tThe user password (zero length Pascal\n\t\t\t\t\t\t\t\t\tstring if no user password)\n\tvolPassWord\t\t\t\tinput:\tThe volume password (zero length Pascal\n\t\t\t\t\t\t\t\t\tstring if no volume password)\n\tuamName\t\t\t\t\tinput:\tThe User Authentication Method name.\n\talternateAddressLength\tinput:\tLength of alternateAddress data.\n\talternateAddress\t\tinput\tThe AFPAlternateAddress (variable length)\n\tafpXInfoPtr\t\t\t\toutput:\tA pointer to the newly created and\n\t\t\t\t\t\t\t\t\tinitialized AFPVolMountInfo record.\n\t\t\t\t\t\t\t\t\tIf the function fails to create an\n\t\t\t\t\t\t\t\t\tAFPVolMountInfo record, it sets\n\t\t\t\t\t\t\t\t\tafpInfoPtr to NULL and the function\n\t\t\t\t\t\t\t\t\tresult is memFullErr. Your program is\n\t\t\t\t\t\t\t\t\tresponsible for disposing of this pointer\n\t\t\t\t\t\t\t\t\twhen it is finished with it.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tmemFullErr\t\t\t-108\tmemory full error\n\t\n\t__________\n\t\n\tAlso see:\tGetVolMountInfoSize, GetVolMountInfo, VolumeMount,\n\t\t\t\tBuildAFPVolMountInfo, RetrieveAFPVolMountInfo,\n\t\t\t\tRetrieveAFPXVolMountInfo\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tRetrieveAFPXVolMountInfo(AFPXVolMountInfoPtr afpXInfoPtr,\n\t\t\t\t\t\t\t\t\t\t short *flags,\n\t\t\t\t\t\t\t\t\t\t short *uamType,\n\t\t\t\t\t\t\t\t\t\t StringPtr zoneName,\n\t\t\t\t\t\t\t\t\t\t StringPtr serverName,\n\t\t\t\t\t\t\t\t\t\t StringPtr volName,\n\t\t\t\t\t\t\t\t\t\t StringPtr userName,\n\t\t\t\t\t\t\t\t\t\t StringPtr uamName,\n\t\t\t\t\t\t\t\t\t\t unsigned long *alternateAddressLength,\n\t\t\t\t\t\t\t\t\t\t AFPAlternateAddress **alternateAddress);\n/*\t Retrieve the AFP mounting information from an AFPXVolMountInfo record.\n\tThe RetrieveAFPXVolMountInfo function retrieves the AFP mounting\n\tinformation returned in an AFPXVolMountInfo record by the\n\tGetVolMountInfo function.\n\t\n\tafpXInfoPtr\t\t\t\tinput:\tPointer to AFPXVolMountInfo record that\n\t\t\t\t\t\t\t\t\tcontains the AFP mounting information.\n\tflags\t\t\t\t\toutput:\tThe AFP mounting flags.\n\tuamType\t\t\t\t\toutput:\tThe user authentication method used.\n\tzoneName\t\t\t\toutput:\tThe AppleTalk zone name of the server.\n\tserverName\t\t\t\toutput:\tThe AFP server name.\n\tvolName\t\t\t\t\toutput:\tThe AFP volume name.\n\tuserName\t\t\t\toutput:\tThe user name (zero length Pascal\n\t\t\t\t\t\t\t\t\tstring for guest).\n\tuamName\t\t\t\t\toutput:\tThe User Authentication Method name.\n\talternateAddressLength\toutput:\tLength of alternateAddress data returned.\n\talternateAddress:\t\toutput:\tA pointer to the newly created and\n\t\t\t\t\t\t\t\t\tAFPAlternateAddress record (a variable\n\t\t\t\t\t\t\t\t\tlength record). If the function fails to\n\t\t\t\t\t\t\t\t\tcreate an AFPAlternateAddress record,\n\t\t\t\t\t\t\t\t\tit sets alternateAddress to NULL and the\n\t\t\t\t\t\t\t\t\tfunction result is memFullErr. Your\n\t\t\t\t\t\t\t\t\tprogram is responsible for disposing of\n\t\t\t\t\t\t\t\t\tthis pointer when it is finished with it.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tparamErr\t\t\t-50\t\tmedia field in AFP mounting information\n\t\t\t\t\t\t\t\t\twas not AppleShareMediaType\n\t\tmemFullErr\t\t\t-108\tmemory full error\n\t\n\t__________\n\t\n\tAlso see:\tGetVolMountInfoSize, GetVolMountInfo, VolumeMount,\n\t\t\t\tBuildAFPVolMountInfo, RetrieveAFXVolMountInfo,\n\t\t\t\tBuildAFPXVolMountInfo\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetUGEntries(short objType,\n\t\t\t\t\t\t\t UGEntryPtr entries,\n\t\t\t\t\t\t\t long reqEntryCount,\n\t\t\t\t\t\t\t long *actEntryCount,\n\t\t\t\t\t\t\t long *objID);\n/*\t Retrieve a list of user or group entries from the local file server.\n\tThe GetUGEntries functions retrieves a list of user or group entries\n\tfrom the local file server.\n\n\tobjType\t\t\tinput:\tThe object type: -1 = group; 0 = user\n\tUGEntries\t\tinput:\tPointer to array of UGEntry records where the list\n\t\t\t\t\t\t\tis returned.\n\treqEntryCount\tinput:\tThe number of elements in the UGEntries array.\n\tactEntryCount\toutput:\tThe number of entries returned.\n\tobjID\t\t\tinput:\tThe current index position. Set to 0 to start with\n\t\t\t\t\t\t\tthe first entry.\n\t\t\t\t\toutput:\tThe index position to get the next entry. Pass this\n\t\t\t\t\t\t\tvalue the next time you call GetUGEntries to start\n\t\t\t\t\t\t\twhere you left off.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\t\n\t\tfnfErr\t\t\t\t-43\t\tNo more users or groups\t\n\t\tparamErr\t\t\t-50\t\tFunction not supported; or, ioObjID is\n\t\t\t\t\t\t\t\t\tnegative\t\n\n\t__________\n\t\n\tAlso see:\tGetUGEntry\n*/\n\n/*****************************************************************************/\n\n#ifdef __cplusplus\n}\n#endif\n\n#include \"OptimizationEnd.h\"\n\n#endif\t/* __MOREFILESEXTRAS__ */\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/MoreFiles 1.5/C Headers/Optimization.h",
    "content": "/*\n**\tApple Macintosh Developer Technical Support\n**\n**\tDirectoryCopy: #defines that let you make MoreFiles code more efficient.\n**\n**\tby Jim Luther, Apple Developer Technical Support Emeritus\n**\n**\tFile:\t\tOptimization.h\n**\n**\tCopyright  1992-1999 Apple Computer, Inc.\n**\tAll rights reserved.\n**\n**\tYou may incorporate this sample code into your applications without\n**\trestriction, though the sample code has been provided \"AS IS\" and the\n**\tresponsibility for its operation is 100% yours.  However, what you are\n**\tnot permitted to do is to redistribute the source as \"DSC Sample Code\"\n**\tafter having made changes. If you're going to re-distribute the source,\n**\twe require that you make it clear in the source that the code was\n**\tdescended from Apple Sample Code, but that you've made changes.\n**\n**\tThe Optimization changes to MoreFiles source and header files, along with\n**\tthis file and OptimizationEnd.h, let you optimize the code produced\n**\tby MoreFiles in several ways.\n**\n**\t1 -- MoreFiles contains extra code so that many routines can run under\n**\tMac OS systems back to System 6. If your program requires a specific\n**\tversion of Mac OS and your program checks for that version before\n**\tcalling MoreFiles routines, then you can remove a lot of compatibility\n**\tcode by defining one of the following to 1:\n**\n**\t\t__MACOSSEVENFIVEONEORLATER\t// assume Mac OS 7.5.1 or later\n**\t\t__MACOSSEVENFIVEORLATER\t\t// assume Mac OS 7.5 or later\n**\t\t__MACOSSEVENORLATER\t\t\t// assume Mac OS 7.0 or later\n**\n**\tIf you're compiling 68K code, the default is to include all compatibility code.\n**\tIf you're compiling PowerPC code (TARGET_RT_MAC_CFM), the default is __MACOSSEVENORLATER\n**\tIf you're compiling for Carbon code (TARGET_API_MAC_CARBON), the default is __MACOSSEVENFIVEONEORLATER\n**\n**\t2 -- You may disable Pascal calling conventions in all MoreFiles routines\n**\texcept for system callbacks that require Pascal calling conventions.\n**\tThis will make 68K C programs both smaller and faster. \n**\t(PowerPC compilers ignore pascal calling conventions.)\n**\tJust define __WANTPASCALELIMINATION to be 1 to turn this optimization on\n**\twhen building MoreFiles for use from C programs (you'll need to keep\n**\tPascal calling conventions when linking MoreFiles routines with Pascal\n**\tprograms).\n**\n**\t3 -- If Metrowerks compiler is used, \"#pragma internal on\" may help produce\n**\tbetter code. However, this option can also cause problems if you're\n**\ttrying to build MoreFiles as a shared library, so it is by default not used.\n**\tJust define __USEPRAGMAINTERNAL to be 1 to turn this optimization on.\n**\n**\tOriginal changes supplied by Fabrizio Oddone\n**\n**\tFile:\tOptimization.h\n*/\n\n#include <ConditionalMacros.h>\n\n// if we're compiling for Carbon, then we're running on Mac OS 8.1 or later\n#ifndef __MACOSSEVENFIVEONEORLATER\n\t#define __MACOSSEVENFIVEONEORLATER TARGET_API_MAC_CARBON\n#endif\n\n#ifndef __MACOSSEVENFIVEORLATER\n\t#define __MACOSSEVENFIVEORLATER __MACOSSEVENFIVEONEORLATER\n#endif\n\n#ifndef __MACOSSEVENORLATER\n\t#if TARGET_RT_MAC_CFM\n\t\t#define __MACOSSEVENORLATER 1\n\t#else\n\t\t#define __MACOSSEVENORLATER __MACOSSEVENFIVEORLATER\n\t#endif\n#endif\n\n\n#ifndef\t__WANTPASCALELIMINATION\n\t#define\t__WANTPASCALELIMINATION\t0\n#endif\n\n#if\t__WANTPASCALELIMINATION\n\t#define pascal\t\n#endif\n\n\n#ifndef __USEPRAGMAINTERNAL\n\t#define\t__USEPRAGMAINTERNAL\t0\n#endif\n\n#if\t__USEPRAGMAINTERNAL\n\t#if defined(__MWERKS__)\n\t\t#pragma internal on\n\t#endif\n#endif\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/MoreFiles 1.5/C Headers/OptimizationEnd.h",
    "content": "/*\n**\tApple Macintosh Developer Technical Support\n**\n**\tDirectoryCopy: #defines that let you make MoreFiles code more efficient.\n**\n**\tby Jim Luther, Apple Developer Technical Support Emeritus\n**\n**\tFile:\t\tOptimizationEnd.h\n**\n**\tCopyright  1992-1999 Apple Computer, Inc.\n**\tAll rights reserved.\n**\n**\tYou may incorporate this sample code into your applications without\n**\trestriction, though the sample code has been provided \"AS IS\" and the\n**\tresponsibility for its operation is 100% yours.  However, what you are\n**\tnot permitted to do is to redistribute the source as \"DSC Sample Code\"\n**\tafter having made changes. If you're going to re-distribute the source,\n**\twe require that you make it clear in the source that the code was\n**\tdescended from Apple Sample Code, but that you've made changes.\n**\n**\tThe Optimization changes to MoreFiles source and header files, along with\n**\tthis file and Optimization.h, let you optimize the code produced by MoreFiles\n**\tin several ways.\n**\n**\tOriginal changes supplied by Fabrizio Oddone\n*/\n\n\n#if\t__USEPRAGMAINTERNAL\n\t#if defined(__MWERKS__)\n\t\t#pragma internal reset\n\t#endif\n#endif\n\n\n#if\t__WANTPASCALELIMINATION\n\t#ifndef __COMPILINGMOREFILES\n\t\t#undef pascal\n\t#endif\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/MoreFiles 1.5/C Headers/Search.h",
    "content": "/*\n**\tApple Macintosh Developer Technical Support\n**\n**\tIndexedSearch and the PBCatSearch compatibility function.\n**\n**\tby Jim Luther, Apple Developer Technical Support Emeritus\n**\n**\tFile:\t\tSearch.h\n**\n**\tCopyright  1992-1999 Apple Computer, Inc.\n**\tAll rights reserved.\n**\n**\tYou may incorporate this sample code into your applications without\n**\trestriction, though the sample code has been provided \"AS IS\" and the\n**\tresponsibility for its operation is 100% yours.  However, what you are\n**\tnot permitted to do is to redistribute the source as \"DSC Sample Code\"\n**\tafter having made changes. If you're going to re-distribute the source,\n**\twe require that you make it clear in the source that the code was\n**\tdescended from Apple Sample Code, but that you've made changes.\n*/\n\n#ifndef __SEARCH__\n#define __SEARCH__\n\n#include <Types.h>\n#include <Files.h>\n\n#include \"Optimization.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*****************************************************************************/\n\npascal\tOSErr\tIndexedSearch(CSParamPtr pb,\n\t\t\t\t\t\t\t  long dirID);\n/*\t Search in and below a directory.\n\tThe IndexedSearch function performs an indexed search in and below the\n\tspecified directory using the same parameters (in pb) as is passed to\n\tPBCatSearch. See Inside Macintosh: Files for a description of the\n\tparameter block.\n\t\n\tpb\t\t\tinput:\tA CSParamPtr record specifying the volume to search\n\t\t\t\t\t\tand the search criteria.\n\t\t\t\toutput:\tFields in the parameter block are returned indicating\n\t\t\t\t\t\tthe number of matches found, the matches, and if the\n\t\t\t\t\t\tsearch ended with noErr, the CatPosition record that\n\t\t\t\t\t\tlets you resume a search where the last search left\n\t\t\t\t\t\toff.\n\tdirID\t\tinput:\tThe directory to search. If fsRtDirID is passed,\n\t\t\t\t\t\tthe entire volume is searched.\n\t\n\tNote:\tIf you use a high-level debugger and use ioSearchTime to limit\n\t\t\tthe length of time to run the search, you'll want to step over\n\t\t\tcalls to IndexedSearch because it installs a Time Manager task.\n\t\t\tMost high-level debuggers don't deal gracefully with interrupt\n\t\t\tdriven code.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\teofErr\t\t\t\t-39\t\tEnd of catalog found (this is normal!)\n\t\tparamErr\t\t\t-50\t\tParameter block has invalid parameters\n\t\t\t\t\t\t\t\t\t(see source for VerifyUserPB) or\n\t\t\t\t\t\t\t\t\tinvalid catPosition record was passed\n\t\textFSErr\t\t\t-58\t\tExternal file system error - no file\n\t\t\t\t\t\t\t\t\tsystem claimed this call.\n\t\tmemFullErr\t\t\t-108\tMemory could not be allocated in heap\n\t\tcatChangedErr\t\t-1304\tCatalog has changed and catalog position\n\t\t\t\t\t\t\t\t\trecord may be invalid\n\t\n\t__________\n\t\n\tSee also:\tPBCatSearch, PBCatSearchSyncCompat\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tPBCatSearchSyncCompat(CSParamPtr paramBlock);\n/*\t Search a volume using PBCatSearch or IndexedSearch.\n\tThe PBCatSearchSyncCompat function uses PBCatSearch (if available) or\n\tIndexedSearch (if PBCatSearch is not available) to search a volume\n\tusing a set of search criteria that you specify. It builds a list of all\n\tfiles or directories that meet your specifications.\n\t\n\tpb\t\t\tinput:\tA CSParamPtr record specifying the volume to search\n\t\t\t\t\t\tand the search criteria.\n\t\t\t\toutput:\tFields in the parameter block are returned indicating\n\t\t\t\t\t\tthe number of matches found, the matches, and if the\n\t\t\t\t\t\tsearch ended with noErr, the CatPosition record that\n\t\t\t\t\t\tlets you resume a search where the last search left\n\t\t\t\t\t\toff.\n\t\n\tNote:\tIf you use a high-level debugger and use ioSearchTime to limit\n\t\t\tthe length of time to run the search, you'll want to step over\n\t\t\tcalls to PBCatSearchSyncCompat because it calls IndexedSearch\n\t\t\twhich installs a Time Manager task. Most high-level debuggers\n\t\t\tdon't deal gracefully with interrupt driven code.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\teofErr\t\t\t\t-39\t\tEnd of catalog found (this is normal!)\n\t\tparamErr\t\t\t-50\t\tParameter block has invalid parameters\n\t\t\t\t\t\t\t\t\t(see source for VerifyUserPB) or\n\t\t\t\t\t\t\t\t\tinvalid catPosition record was passed\n\t\textFSErr\t\t\t-58\t\tExternal file system error - no file\n\t\t\t\t\t\t\t\t\tsystem claimed this call.\n\t\tmemFullErr\t\t\t-108\tMemory could not be allocated in heap\n\t\tcatChangedErr\t\t-1304\tCatalog has changed and catalog position\n\t\t\t\t\t\t\t\t\trecord may be invalid\n\t\tafpCatalogChanged\t-5037\tCatalog has changed and search cannot\n\t\t\t\t\t\t\t\t\tbe resumed\n\t\n\t__________\n\t\n\tSee also:\tPBCatSearch, IndexedSearch\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tNameFileSearch(ConstStr255Param volName,\n\t\t\t\t\t\t\t   short vRefNum,\n\t\t\t\t\t\t\t   ConstStr255Param fileName,\n\t\t\t\t\t\t\t   FSSpecPtr matches,\n\t\t\t\t\t\t\t   long reqMatchCount,\n\t\t\t\t\t\t\t   long *actMatchCount,\n\t\t\t\t\t\t\t   Boolean newSearch,\n\t\t\t\t\t\t\t   Boolean partial);\n/*\t Search for files by file name with PBCatSearch.\n\tThe NameFileSearch function searches for files with a specific file\n\tname on a volume that supports PBCatSearch.\n\tNote: A result of catChangedErr means the catalog has changed between\n\tsearches, but the search can be continued with the possiblity that you\n\tmay miss some matches or get duplicate matches.  For all other results\n\t(except for noErr), the search cannot be continued.\n\n\tvolName\t\t\tinput:\tA pointer to the name of a mounted volume\n\t\t\t\t\t\t\tor nil.\n\tvRefNum\t\t\tinput:\tVolume specification.\n\tfileName\t\tinput:\tThe name of the file to search for.\n\tmatches\t\t\tinput:\tPointer to array of FSSpec where the match list is\n\t\t\t\t\t\t\treturned.\n\treqMatchCount\tinput:\tMaximum number of matches to return\t(the number of\n\t\t\t\t\t\t\telements in the matches array).\n\tactMatchCount\toutput: The number of matches actually returned.\n\tnewSearch\t\tinput:\tIf true, start a new search. If false and if\n\t\t\t\t\t\t\tvRefNum is the same as the last call to\n\t\t\t\t\t\t\tNameFileSearch, then start searching at the\n\t\t\t\t\t\t\tposition where the last search left off.\n\tpartial\t\t\tinput:\tIf the partial parameter is false, then only files\n\t\t\t\t\t\t\tthat exactly match fileName will be found.  If the\n\t\t\t\t\t\t\tpartial parameter is true, then all file names that\n\t\t\t\t\t\t\tcontain fileName will be found.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\teofErr\t\t\t\t-39\t\tEnd of catalog found (this is normal!)\n\t\tparamErr\t\t\t-50\t\tParameter block has invalid parameters\n\t\t\t\t\t\t\t\t\t(see source for VerifyUserPB) or\n\t\t\t\t\t\t\t\t\tinvalid catPosition record was passed\n\t\textFSErr\t\t\t-58\t\tExternal file system error - no file\n\t\t\t\t\t\t\t\t\tsystem claimed this call.\n\t\tmemFullErr\t\t\t-108\tMemory could not be allocated in heap\n\t\tcatChangedErr\t\t-1304\tCatalog has changed and catalog position\n\t\t\t\t\t\t\t\t\trecord may be invalid\n\t\tafpCatalogChanged\t-5037\tCatalog has changed and search cannot\n\t\t\t\t\t\t\t\t\tbe resumed\n\t\n\t__________\n\t\n\tAlso see:\tCreatorTypeFileSearch\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tCreatorTypeFileSearch(ConstStr255Param volName,\n\t\t\t\t\t\t\t\t\t  short vRefNum,\n\t\t\t\t\t\t\t\t\t  OSType creator,\n\t\t\t\t\t\t\t\t\t  OSType fileType,\n\t\t\t\t\t\t\t\t\t  FSSpecPtr matches,\n\t\t\t\t\t\t\t\t\t  long reqMatchCount,\n\t\t\t\t\t\t\t\t\t  long *actMatchCount,\n\t\t\t\t\t\t\t\t\t  Boolean newSearch);\n/*\t Search for files by creator/fileType with PBCatSearch.\n\tThe CreatorTypeFileSearch function searches for files with a specific\n\tcreator or fileType on a volume that supports PBCatSearch.\n\tNote: A result of catChangedErr means the catalog has changed between\n\tsearches, but the search can be continued with the possiblity that you\n\tmay miss some matches or get duplicate matches.  For all other results\n\t(except for noErr), the search cannot be continued.\n\n\tvolName\t\t\tinput:\tA pointer to the name of a mounted volume\n\t\t\t\t\t\t\tor nil.\n\tvRefNum\t\t\tinput:\tVolume specification.\n\tcreator\t\t\tinput:\tThe creator type of the file to search for.\n\t\t\t\t\t\t\tTo ignore the creator type, pass 0x00000000 in\n\t\t\t\t\t\t\tthis field.\n\tfileType\t\tinput:\tThe file type of the file to search for.\n\t\t\t\t\t\t\tTo ignore the file type, pass 0x00000000 in\n\t\t\t\t\t\t\tthis field.\n\tmatches\t\t\tinput:\tPointer to array of FSSpec where the match list is\n\t\t\t\t\t\t\treturned.\n\treqMatchCount\tinput:\tMaximum number of matches to return\t(the number of\n\t\t\t\t\t\t\telements in the matches array).\n\tactMatchCount\toutput: The number of matches actually returned.\n\tnewSearch\t\tinput:\tIf true, start a new search. If false and if\n\t\t\t\t\t\t\tvRefNum is the same as the last call to\n\t\t\t\t\t\t\tCreatorTypeFileSearch, then start searching at the\n\t\t\t\t\t\t\tposition where the last search left off.\n\t\n\tResult Codes\n\t\tnoErr\t\t\t\t0\t\tNo error\n\t\tnsvErr\t\t\t\t-35\t\tVolume not found\n\t\tioErr\t\t\t\t-36\t\tI/O error\n\t\teofErr\t\t\t\t-39\t\tEnd of catalog found (this is normal!)\n\t\tparamErr\t\t\t-50\t\tParameter block has invalid parameters\n\t\t\t\t\t\t\t\t\t(see source for VerifyUserPB) or\n\t\t\t\t\t\t\t\t\tinvalid catPosition record was passed\n\t\textFSErr\t\t\t-58\t\tExternal file system error - no file\n\t\t\t\t\t\t\t\t\tsystem claimed this call.\n\t\tmemFullErr\t\t\t-108\tMemory could not be allocated in heap\n\t\tcatChangedErr\t\t-1304\tCatalog has changed and catalog position\n\t\t\t\t\t\t\t\t\trecord may be invalid\n\t\tafpCatalogChanged\t-5037\tCatalog has changed and search cannot\n\t\t\t\t\t\t\t\t\tbe resumed\n\t\n\t__________\n\t\n\tAlso see:\tNameFileSearch\n*/\n\n/*****************************************************************************/\n\n#ifdef __cplusplus\n}\n#endif\n\n#include \"OptimizationEnd.h\"\n\n#endif\t/* __SEARCH__ */\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/MoreFiles 1.5/MoreFilesReadMe",
    "content": "MoreFiles\n\nA collection of File Manager and related routines\n\nby Jim Luther (Apple Macintosh Developer Technical Support Emeritus)\nwith significant code contributions by Nitin Ganatra (Apple Macintosh Developer Technical Support Emeritus)\nCopyright  1992-1999 Apple Computer, Inc.\nPortions copyright  1995 Jim Luther\nAll rights reserved.\n\nYou may incorporate this sample code into your applications without restriction, though the sample code has been provided \"AS IS\" and the responsibility for its operation is 100% yours. However, what you are not permitted to do is to redistribute the source as \"DSC Sample Code\" after having made changes. If you're going to redistribute the source, we require that you make it clear in the source that the code was descended from Apple Sample Code, but that you've made changes.\n\n\nWhat is MoreFiles?\n\nMoreFiles is a collection of high-level routines written over the years to answer File Manager questions developers have sent to Apple Developer Technical Support, and to answer questions on various online services and the internet. The routines have been tested (but not stress-tested), documented, code-reviewed, and used in both my own programs, the Macintosh OS, and in many commercial products.\n\n\nImportant Note\n\nThese routines are meant to be used from an application environment. In particular, some routines use static variables which require an A5 world (if youre building 68K code) and almost all routines make calls that are unsafe at interrupt time (i.e., synchronous File Manager calls and Memory Manager calls). If you plan to use these routines from stand-alone 68K code modules, you may need to make some modifications to the code that uses static variables. Don't even think about using most of these routines from code that executes at interrupt time.\n\nNote: If you need to use the routines in FSpCompat in stand-alone 68K code, set GENERATENODATA to 1 in FSpCompat.c (or pass it in) so globals (static variables) are not used. Some routines in Search.c also use static variables.\n\n\nBuild Environments\n\nMoreFiles is built using the latest development environments I have access to and Universal Interfaces v3.3. You might have to make some minor changes to compile or link with MoreFiles.\n\nThe Pascal interfaces to MoreFiles are maintained, but have not been tested with all available Pascal development environments.\n\nNotes:\n\n Starting with MoreFiles 1.5, IDE project files and MPW make/build files are not included because: (a) many developers do not have the latest development environments, (b) IDE project files are often not comaptible with newer or older versions of IDEs.\n\n Starting with MoreFiles 1.5, you may need to link 68K programs with Math64Lib.o if your development environment doesn't support long long variables.\n\n\nFiles in the MoreFiles Package\n\nMoreFiles.c - the glue code for high-level and FSSpec style routines that were never implemented or added to the standard interface for one reason or another. If you're uncomfortable filling in parameter blocks, you'll find the code in this file very useful.\n\nMoreFiles.h and MoreFiles.p - the documentation and header files for calling the routines included in MoreFiles.c.\n\nMoreFilesExtras.c - a collection of useful File Manager utility routines.\n\nMoreFilesExtras.h and MoreFilesExtras.p - the documentation and header files for calling the routines included in MoreFilesExtras.c. I recommend that you browse through the header files - you'll probably find a routine that you've always wanted.\n\nMoreDesktopMgr.c - a collection of useful high-level Desktop Manager routines. If the Desktop Manager isn't available, the \"Desktop\" file is used for 'read' operations.\n\nMoreDesktopMgr.h and MoreDesktopMgr.p - the documentation and header files for calling the routines included in MoreDesktopMgr.c.\n\nFileCopy.c - a robust, general purpose file copy routine that does everything the right way. Copying a file on the Macintosh isn't as simple as you'd think if you want to handle all cases (i.e., file server drop boxes, preflighting disk space, etc.). This routine does it all and is fast, too.\n\nFileCopy.h and FileCopy.p - the documentation and header files for calling the routines included in FileCopy.c.\n\nDirectoryCopy.c - a general purpose recursive directory copy routine with a hook for your error handling routine and a hook for filtering what you want or don't want copied.\n\nDirectoryCopy.h and DirectoryCopy.p - the documentation and header files for calling the routines included in DirectoryCopy.c.\n\nFSpCompat.c - the glue code for FSSpec style routines that will work under System 6 as much as possible. If you still need to support System 6, you'll find the code in this file very useful.\n\nFSpCompat.h and FSpCompat.p - the documentation and header files for calling the routines included in FSpCompat.c.\n\nSearch.c - IndexedSearch and PBCatSearchSyncCompat. IndexedSearch performs an indexed search in and below the specified directory using the same parameters as is passed to PBCatSearch. PBCatSearchSyncCompat uses PBCatSearch (if available) or IndexedSearch (if PBCatSearch is not available) to search a volume. Also included are a couple of examples of how to call PBCatSearch: one that searches by creator and file type, and one that searches by file name.\n\nSearch.h and Search.p - the documentation and header files for calling the routines included in Search.c.\n\nFullPath.c - Routines for dealing with full pathnames if you really must use them. Read the warning at the top of the interface files for reasons why you shouldn't use them most of the time.\n\nFullPath.h and FullPath.p - the documentation and header files for calling the routines included in FullPath.c.\n\nIterateDirectory.c - Routines that perform a recursive iteration (scan) of a specified directory and call your IterateFilterProc function once\tfor each file and directory found. IterateDirectory lets you decide how deep you want the function to dive into the directory tree - anything from 1 level or all levels. This routine is very useful when you want to do something to each item in a directory.\n\nIterateDirectory.h and IterateDirectory.p - the documentation and header files for calling the routines included in IterateDirectory.c.\n\nOptimization.h and OptimizationEnd.h - Used to provide code opimizations to the code generated from MoreFiles sources. Notes:  If you're compiling 68K code, __MACOSSEVENFIVEONEORLATER, __MACOSSEVENFIVEORLATER, and __MACOSSEVENORLATER are by default defined to 0 so all compatibility code is included by default. If you're compiling PowerPC code (TARGET_RT_MAC_CFM), the default is __MACOSSEVENORLATER. If you're compiling for Carbon code (TARGET_API_MAC_CARBON), the default is __MACOSSEVENFIVEONEORLATER.\n\nHow to use MoreFiles\n\nYou can compile the code and link it into your programs. You can cut and paste portions of it into your programs. You can use it as example code (as sample code, many routines in MoreFiles should be modified by you to do what you want them to do). Feel free to rip MoreFiles off and modify it's code in whatever ways you find work best for you.\n\nAll exported routines use Pascal calling conventions so this code can be used from either C or Pascal and with 68K or PowerPC compliers. (Note: Pascal calling conventions can be turned off starting with MoreFiles 1.4.2. BE CAREFUL WITH THE CALLBACKS if you use this option!)\n\nYou'll also notice that all routines that make other File Manager calls return an OSErr result. I always check for error results and you should too. (Well, there's a few places where I purposely ignore errors, but they're commented in the source.)\n\n\nDocumentation\n\nThe documentation for the routines can be found in the C header files. There, you'll find a short description of each call and a complete listing of all input and output parameters. I've also included a list of possible result codes for each routine. For example, here's the documentation for one of the routines, GetFileLocation.\n\n/*****************************************************************************/\n \n    pascal  OSErr   GetFileLocation(short refNum,\n                                    short *vRefNum,\n                                    long *dirID,\n                                    StringPtr fileName);\n    /*   Get the location of an open file.\n        The GetFileLocation function gets the location (volume reference number,\n        directory ID, and fileName) of an open file.\n       \n        refNum      input:  The file reference number of an open file.\n        vRefNum     output: The volume reference number.\n        dirID       output: The parent directory ID.\n        fileName    input:  Points to a buffer (minimum Str63) where the\n                            filename is to be returned or must be nil.\n                    output:\tThe filename.\n \t\n        Result Codes\n            noErr        0  No error\n            nsvErr     -35  Specified volume doesnt exist\n            fnOpnErr   -38  File not open\n            rfNumErr   -51  Reference number specifies nonexistent\n                            access path\n        __________\n\t   \n        See also:   FSpGetFileLocation\n    */\n   \n/*****************************************************************************/\n\nSome routines have very few comments in their code because they simply make a single File Manager call. For those routines, the routine description is the comment. However, you'll find that more complicated routines have plenty of comments to clarify what and why the code is doing something. If something isn't clear, take a look at \"Inside Macintosh: Files\" and the TechNote \"Inside Macintosh: Files - Errata\" for further reference.\n\n\nRelease Notes\n\nv1.0     09/14/93\nv1.1     01/22/94\nv1.1.1  02/01/94\nv1.2     07/20/94\nv1.2.1  08/09/94\nv1.2.2  11/01/94\nv1.3     04/17/95\nv1.3.1  06/17/95\n________________________________________\n\nv1.4 12/21/95\n\nNew Routines:\n Added directory scanning functions, IterateDirectory and FSpIterateDirectory in a new files IterateDirectory.c, IterateDirectory.h and IterateDirectory.p. Check these routines out. I think you'll find them useful.\n Added SetDefault and RestoreDefault to MoreFileExtras. These routines let you set the default directory for those times when you're stuck calling standard C I/O or a library that takes only a filename.\n Added XGetVInfo to MoreFilesExtras. Like GetVInfo, this routine returns the volume name, volume reference number, and free bytes on the volume; like HGetVInfo, XGetVInfo also returns the total number of bytes on the volume. Both freeBytes and totalBytes are UnsignedWide values so this routine can report volume size information for volumes up to 2 terabytes. XGetVInfo's glue code calls through to HGetVInfo if needed to provide backwards compatibility.\n\nBugs fixed:\n Fixed bug where FileCopy could pass NULL to CopyFileMgrAttributes if PBHCopyFile was used.\n Added 68K alignment to MoreDesktopMgr.c structs.\n Added 68K alignment to MoreFilesExtras.p records.\n\nOther changes:\n Conditionalized FSpCompat.c with SystemSevenOrLater and SystemSevenFiveOrLater so the FSSpec compatibility code is only included when needed. It makes the code a little harder to read, but it removes 2K-3K of code and the overhead of additional calls when SystemSevenOrLater and SystemSevenFiveOrLater are true. See ConditionalMacros.h for an explanation of SystemSevenOrLater and SystemSevenFiveOrLater.\n Moved the code to create a full pathname from GetFullPath to FSpGetFullPath. This accomplished two goals: (1) when FSpGetFullPath is used, the input FSSpec isn't passed to FSMakeFSSpecCompat (it was already an FSSpec) and (2) the code is now smaller. While I was in the code, I changed a couple of calls from Munger to PtrToHand.\n Changed GetDirID to GetDirectoryID so that MoreFiles could be used by MacApp programs (There's a MacApp method named GetDirID).\n Changed DirIDFromFSSpec to FSpGetDirectoryID to be consistent in naming conventions.\n Added macros wrapped with \"#if OLDROUTINENAMES  #endif\" so GetDirID and DirIDFromFSSpec will still work with your old code.\n Changed alignment #if's to use PRAGMA_ALIGN_SUPPORTED instead of GENERATINGPOWERPC (will they ever stop changing?).\n Changed all occurances of filler2 to ioACUser to match the change in Universal Interfaces 2.1.\n Added type-casts from \"void *\" to \"Ptr\" in various places to get rid of compiler warnings.\n Added CallCopyErrProc to DirectoryCopy.h and DirectoryCopy.c (it just looks better that way).\n Added the \"__cplusplus\" conditional code around all .h header files so they'll work with C++.\n Built libraries with Metrowerks, THINK C, and MPW so everyone can link.\n\n________________________________________\n\nv1.4.1 1/6/96\n\nBugs fixed:\n Fixed the conditionalized code FSpCreateCompat.\n Fixed the conditionalized code FSpExchangeFilesCompat.\n Fixed the conditionalized code FSpCreateResFileCompat.\n\nOther changes:\n Changed PBStatus(&pb, false) to PBStatusSync(&pb) in GetDiskBlocks.\n________________________________________\n\nv1.4.2 3/25/96\n\nNew Routines:\n Added FSpResolveFileIDRef to MoreFiles.\n Added GetIOACUser and FSpGetIOACUser to MoreFilesExtras. These routines let you get a directory's access privileges for the current user.\n Added bit masks, macros, and function for testing ioACUser values to MoreFilesExtras.h and MoreFilesExtras.p.\n Added GetVolumeInfoNoName to MoreFilesExtras to put common calls to PBHGetVInfo in one place. Functions that call GetVolumeInfoNoName are: (in DirectoryCopy.c) PreflightDirectoryCopySpace, (in FileCopy.c) PreflightFileCopySpace, (in MoreFilesExtras.c) DetermineVRefNum, CheckVolLock, FindDrive, UnmountAndEject, (in Search.c) CheckVol.\n Added GetCatInfoNoName to MoreFilesExtras to put common calls to PBGetCatInfo in one place. Functions that call GetCatInfoNoName are: (in FileCopy.c) GetDestinationDirInfo, (in MoreDesktopMgr.c) GetCommentID, (in MoreFilesExtras.c) GetDInfo, GetDirectoryID, CheckObjectLock.\n Added TruncPString to MoreFilesExtras. This lets you shorten a Pascal string without breaking the string in the middle of a multi-byte character.\n Added FilteredDirectoryCopy and FSpFilteredDirectoryCopy to DirectoryCopy. FilteredDirectoryCopy and FSpFilteredDirectoryCopy work just like DirectoryCopy and FSpDirectoryCopy only they both take an optional CopyFilterProc parameter which can point to routine you supply. The CopyFilterProc lets your code decide what files or directories are copied to the destination. DirectoryCopy and FSpDirectoryCopy now call through to FilteredDirectoryCopy with a NULL CopyFilterProc.\n\nBugs fixed:\n Fixed minor bug in GetDiskBlocks where driveQElementPtr->dQRefNum was checked when driveQElementPtr could be NULL.\n DirectoryCopy didn't handle error conditions correctly. In some cases, DirectoryCopy would return noErr when there was a problem and in other cases, the CopyErrProc wasn't called and the function immediately failed.\n The result of DirectoryCopy's CopyErrProc was documented incorrectly.\n\nOther changes and improvements:\n Added result codes to function descriptions in the C header files (these probably aren't a perfect list of possible errors, but they should catch most of the results you'll ever see).\n Removed most of the function descriptions in Pascal interface files since they haven't been completely in sync with the C headers for some time and I don't have time to keep the documentation in both places up to date.\n Rewrote HMoveRenameCompat so it doesn't use the Temporary Items folder.\n Added parameter checking to OnLine so that it doesn't allow the volIndex parameter to be less than or equal to 0.\n Added parameter checking to GetDirItems so that it doesn't allow the itemIndex parameter to be less than or equal to 0.\n FSpExchangeFilesCompat now returns diffVolErr (instead of paramErr)\tif the source and the destination are on different volumes.\n Changed GetDirName's name parameter to Str31 and added parameter checking so that it doesn't allow a NULL name parameter.\n Forced errors returned by MoreDesktopMgr routines to be closer to what would be expected if the low-level Desktop Manager calls were used.\n Added conditionalized changes from Fabrizio Oddone so that Pascal calling conventions can be easily disabled. Disabling Pascal calling conventions reduces the code size slightly and allows C compilers to optimize parameter passing. NOTE: If you disable Pascal calling conventions, you'll have to remove the \"pascal\" keyword from all of the MoreFiles callbacks you've defined in your code.\n Changed DirectoryCopy so that you can copy the source directory's content to a disk's root directory.\n Added a build script and a make file for MPW libraries.\n Added a build script for Metrowerks CodeWarrior libraries.\n Added a build script for Symantec THINK Project Manager and Symantec Project Manager libraries.\n Renamed the Symantec and Metrowerks project files.\n Changed MoreFiles directory structure so that C headers, Pascal interfaces, and the source code aren't in the main directory.\n\nThanks to Fabrizio Oddone for supplying the conditionalized changes that optionally remove Pascal calling conventions. Thanks to Byron Han for beating the bugs out of DirectoryCopy and for suggesting and prototyping the changes needed for the \"copy to root directory\" option and the FilteredDirectoryCopy routine in DirectoryCopy.\n________________________________________\n\nv1.4.3 8/24/96\n\nBugs fixed:\n Fixed bug in GetDriverName where dctlDriver is a handle. It was not dereferenced correctly.\n Fixed the MPW build file, BuildMoreFiles, so it would correctly pass options to MoreFilesLib.make.\n GetFullPath now returns fullPathLength = 0 and fullPath = NULL as documented.\n\nOther changes and improvements:\n Added PBXGetVolInfoSync glue code to MoreFilesExtras.c when GENERATINGCFM is true. This allows building with no link errors where PBXGetVolInfoSync isn't included in your development system's standard libraries. This routine shouldn't be needed in MoreFiles at some point in the future after it has been added to your development system's standard libraries.\n Changed BuildMoreFiles and MoreFilesLib.make to use the MrC compiler instead of the PPCC compiler.\n Removed BuildMoreFiles Symantec because it's much simpler to include MoreFiles as a subproject in your Symantec project instead of building a library and then including it.\n Removed non-strict ANSI comment from PascalElim.h and used conditional code instead.\n GetFullPath and FSpGetFullPath return full pathname to directories with a trailing colon character. For example, they now return \"MyVolume:MyDirectory:\" instead of \"MyVolume:MyDirectory\".\n Changed the MoreFiles feedback email address (below) in this Read Me file.\n________________________________________\n\nv1.4.4 12/18/96\n\nBugs fixed:\n Added \"| REGISTER_RESULT_LOCATION(kRegisterD0)\" to uppFSDispatchProcInfo in PBXGetVolInfoSync. (the code produced is the same since REGISTER_RESULT_LOCATION(kRegisterD0) happens to be 0).\n Initialized ioDTReqCount before calling PBDTGetComment. See the comment in DTGetComment in MoreDesktopMgr.c for the reasons why.\n Fixed paramErr check in GetDirName in MoreFilesExtras.c so it actually works.\n Rewrote CopyDirectoryAccess in MoreFilesExtras.c for better error handling.\n Fixed error handling in GetAPPLFromDesktopFile in MoreDesktopMgr.c.\n Fixed off by one errors in GetLocalIDFromFREF and GetIconRsrcIDFromLocalID in MoreDesktopMgr.c.\n Changed IterateDirectoryLevel so that it continues iterating when it finds a directory that cannot be accessed due to an afpAccessDenied error.\n\nOther changes and improvements:\n Added const type qualifier to input-only pointer parameters. That includes changing many StringPtr parameters to ConstStr255Param (thanks to Stephen C. Gilardi for starting this project).\n General cleanup to improve readability and code generation.\n Added DTXGetAPPL to MoreDesktopMgr. DTXGetAPPL works like DTGetAPPL only it has an additional input parameter, searchCatalog. If searchCatalog is set to false, the catalog search is skipped if the\tapplication isn't found in the desktop database or desktop file. This is useful if you need to find the application quickly (the catalog search can be quite time consuming).\n Removed \"BuildMoreFiles Metrowerks\" script. I've decided that it's too hard to keep the scripts working with current IDEs.\n Removed pre-v1.4 release notes from this file because it was too big for SimpleText.\n________________________________________\n\nv1.4.5 12/20/96\n\nBugs fixed:\n Fixed logic bug in HOpenAware and HOpenRFAware. Those two functions and FileCopy (which calls them) DO NOT work in MoreFiles version 1.4.4.\n________________________________________\n\nv1.4.6 2/15/97\n\nBugs fixed:\n Fixed bug in PreflightFileCopySpace (FileCopy.c) introduced in MoreFiles version 1.4.4.\n Fixed problem between PBXGetVolInfoSync and __WANTPASCALELIMINATION conditional.\n HMoveRenameCompat from v1.4.2 through v1.4.5 worked with files but not folders, and comments were not being moved along with the file. Reverted HMoveRenameCompat to the v1.4.1 source and then fixed the possible collision in the Temporary Items folder by creating a new uniquely named subfolder in the Temporary Items folder.\n\nOther changes and improvements:\n Added GetVolState function to MoreFilesExtras. Use GetVolState to determine a volumes online and eject state and the volume drivers need for eject requests.\n Added GetVolFileSystemID function to MoreFilesExtras.\n Renamed PascalElim.h to Optimization.h since it now contains additional optimization directives.\n Added OptimizationEnd.h.\n Checks for __WANTPASCALELIMINATION now use #if instead of #ifdef to be consistent with other conditionals in MoreFiles and in Apple interfaces.\n Added #pragma internal on if __MWERKS__ is defined to Optimization.h and OptimizationEnd.h to produce better code under Metrowerks compilers.\n In Optimization.h, define __WANTPASCALELIMINATION to 0 if not already defined so __WANTPASCALELIMINATION can be passed in from the command line.\n In FSpCompat.c, define GENERATENODATA to 0 if not already defined so GENERATENODATA can be passed in from the command line.\n Added FSpDTXGetAPPL to MoreDesktopMgr.\n Added echo lines to MoreFilesLib.make so the build process can be monitored.\n________________________________________\n\nv1.4.7 3/1/98\n\nBugs fixed:\n Fixed DirectoryCopy.p header (FSpFilteredDirectoryCopy wasn't there; FSpDirectoryCopy was there twice).\n PreflightFileCopySpace, PreflightGlobals, and PreflightDirectoryCopySpace now use unsigned long values for block counts to support Mac OS Enhanced volumes which can have more than 64K of allocation blocks, and to fix problems with large files.\n\nOther changes and improvements:\n __USEPRAGMAINTERNAL is now used to control the \"#pragma internal on\" optimization and it defaults to off in Optimization.h.\n In most cases, output parameters are not changed if error occurs (for example, see ResolveFileIDRef).\n Added __MACOSSEVENFIVEONEORLATER, __MACOSSEVENFIVEORLATER, and __MACOSSEVENORLATER defines so that compatibility and bug fix code can be removed when specific versions of Mac OS are required. (FSpCompat.c is affected the most.)\n Reconditionalized FSpCompat.c so that more compatibility code can be stripped.\n Added XGetVolumeInfoNoName to MoreFilesExtras.c.\n GetFullPath and FSpGetFullPath now allow creation of full pathnames to files or directories that don't exist (all directories up to that file/directory must exist).\n Added BuildAFPXVolMountInfo and RetrieveAFPXVolMountInfo to work with new AppleShare IP clients (AppleShare client versions 3.7 and later).\n Changed API of BuildAFPVolMountInfo to closely match BuildAFPXVolMountInfo. It now allocates the space for the AFPVolMountInfo record.\n RetrieveAFPVolMountInfo now checks offsets and doesn't use them if they are zero.\n Conditionally added volume mount constants and structures (from Files.h in Universal Interfaces 3.0.1 and later) to MoreFilesExtras.h and .p.\n Added XVolumeParam to UniversalFMPB.\n Changed zoneName and serverName fields in MyAFPVolMountInfo to Str32 since AppleTalk names can be 32 characters.\n Added MyAFPXVolMountInfo to MoreFilesExtras.h.\n Added XGetVolumeInfoNoName to MoreFilesExtras.h.\n Removed Sharing.h, Sharing.p, and UpperString.p. The routines defined by these files have been defined for several years, so it's time for them to go.\n Removed FindFolderGlue.o library. The code in the FindFolderGlue.o library is supplied by all recent development environments, so it's time for it to go.\n________________________________________\n\nv1.4.8 3/24/98\n\nBugs fixed:\n Fixed conditional errors introduced in v1.4.7 in FSpCompat.c.\n Initialized realResult to noErr in FSpGetFullPath.\n Changed comment in IterateDirectory.p for MyIterateFilterProc - the CInfoPBRec parameter should be {CONST} VAR.\n________________________________________\n\nv1.4.9 9/2/98\n\nBugs fixed:\n Changed parameter order in PBXGetVolInfoSync to match that in InterfaceLib.\n CreateFileIDRef and FSpCreateFileIDRef now return the file ID when it already exists and PBCreateFileID has returned fidExists or afpIDExists. In other words, you can use the file ID if either function returns noErr, fidExists, or afpIDExists.\n________________________________________\n\nv1.5 12/6/99\n\nBugs fixed:\n Fixed off-by-one bug in TruncPString.\n\nOther changes and improvements:\n Updated sources for Universal Interfaces 3.3. This includes changes where the code uses UInt64 variables, removing all bit and mask definitions in MoreFilesExtras.h if they are already defined in Files.h, using the latest names for bits and masks, and making sure only symbols available to Carbon are used (except where the code is conditionalized for Carbon).\n Conditionalized code and headers for Carbon. If __MACOSSEVENFIVEONEORLATER is undefined, set it to TARGET_API_MAC_CARBON in Optimization.h.\n Renamed PBXGetVolInfoSync PowerPC glue code to CallPBXGetVolInfoSync, and changed it to call the real PBXGetVolInfoSync code in InterfaceLib if possible. This code is conditionalized for Carbon and 68K where PBXGetVolInfoSync is always available.\n HGetVInfo now calls through to XGetVInfo to get the best results.\n Added work-around for Alias Manager sloppy volume matching problem in FSpLocationFromFullPath.\n Added work-around for Navigation Services invalid FSSpec problem in FSpGetFullPath.\n Added copyName parameter to all DirectoryCopy routines so that the source directory's name can be changed at the destination.\n Updated GetVolParmsInfoBuffer macros in MoreFilesExtras.h.\n Conditionalized PBCatSearchSyncCompat for System 7.0 or later (hasFullExtFSDispatching is always true with Systme 7.0 and later).\n\n________________________________________\n\nThanks again (you know who you are) for the bug reports and suggestions that helped improve MoreFiles since the last version(s).\n\nTo file bug reports and enhancement requests, please go to http://developer.apple.com/bugreporter/ and include \"MoreFiles Sample Code\" in the title of your message.\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/MoreFiles 1.5/PascalInterfaces/DirectoryCopy.p",
    "content": "UNIT DirectoryCopy;\n\n{\tApple Macintosh Developer Technical Support\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tDirectoryCopy: A robust, general purpose directory copy routine.\t\t}\n{\tby Jim Luther, Apple Developer Technical Support Emeritus\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tFile:\t\tDirectoryCopy.p\t\t\t\t\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tCopyright  1992-1999 Apple Computer, Inc.\t\t\t\t\t\t\t\t}\n{\tAll rights reserved.\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tYou may incorporate this sample code into your applications without\t\t}\n{\trestriction, though the sample code has been provided \"AS IS\" and the\t}\n{\tresponsibility for its operation is 100% yours.  However, what you are\t}\n{\tnot permitted to do is to redistribute the source as \"DSC Sample Code\"\t}\n{\tafter having made changes. If you're going to re-distribute the source,\t}\n{\twe require that you make it clear in the source that the code was\t\t}\n{\tdescended from Apple Sample Code, but that you've made changes.\t\t\t}\n\n\nINTERFACE\n\n\tUSES\n\t\tTypes, Files;\n\n{***************************************************************************}\n\n\t{ DirectoryCopy failedOperation codes. }\n\tCONST\n\t\tgetNextItemOp = 1;\t\t\t{ couldn't access items in this }\n\t\t\t\t\t\t\t\t\t{ directory - no access privileges }\n\t\tcopyDirCommentOp = 2;\t\t{ couldn't copy directory's Finder }\n\t\t\t\t\t\t\t\t\t{ comment }\n\t\tcopyDirAccessPrivsOp = 3;\t{ couldn't copy directory's AFP access }\n\t\t\t\t\t\t\t\t\t{ privileges }\n\t\tcopyDirFMAttributesOp = 4;\t{ couldn't copy directory's File }\n\t\t\t\t\t\t\t\t\t{ Manager attributes }\n\t\tdirCreateOp = 5;\t\t\t{ couldn't create destination directory }\n\t\tfileCopyOp = 6;\t\t\t\t{ couldn't copy file }\n\n\n{***************************************************************************}\n\n\tTYPE\n\t\tCopyErrProcPtr = ProcPtr;\n{\tA DirectoryCopy CopyErrProc function should have the following form:\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tFUNCTION MyCopyErrProc (error: OSErr; \t\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\tfailedOperation: Integer;\t\t\t\t\t\t}\n{\t\t\t\t\t\t\tsrcVRefNum: Integer;\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\tsrcDirID: LongInt;\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\tsrcName: StringPtr;\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\tdstVRefNum: Integer;\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\tdstDirID: LongInt;\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\tdstName: StringPtr): Boolean;\t\t\t\t\t}\n\n\t\tCopyFilterProcPtr = ProcPtr;\n{\tA DirectoryCopy CopyFilterProc function should have the following form:\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tFUNCTION MyCopyFilterProc (cpbPtr: CInfoPBPtr): Boolean;\t\t\t\t}\n\n{***************************************************************************}\n\n\n\tFUNCTION FilteredDirectoryCopy (srcVRefNum: Integer;\n\t\t\t\t\t\t\t\t\tsrcDirID: LongInt;\n\t\t\t\t\t\t\t\t\tsrcName: StringPtr;\n\t\t\t\t\t\t\t\t\tdstVRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdstDirID: LongInt;\n\t\t\t\t\t\t\t\t\tdstName: StringPtr;\n\t\t\t\t\t\t\t\t\tcopyName: StringPtr;\n\t\t\t\t\t\t\t\t\tcopyBufferPtr: Ptr;\n\t\t\t\t\t\t\t\t\tcopyBufferSize: LongInt;\n\t\t\t\t\t\t\t\t\tpreflight: Boolean;\n\t\t\t\t\t\t\t\t\tcopyErrHandler: CopyErrProcPtr;\n\t\t\t\t\t\t\t\t\tcopyFilterProc: CopyFilterProcPtr): OSErr;\n\n\tFUNCTION FSpFilteredDirectoryCopy ({CONST}\n\t\t\t\t\t\t\t\t\tVAR srcSpec: FSSpec;\n\t\t\t\t\t\t\t\t\t{CONST}\n\t\t\t\t\t\t\t\t\tVAR dstSpec: FSSpec;\n\t\t\t\t\t\t\t\t\tcopyName: StringPtr;\n\t\t\t\t\t\t\t\t\tcopyBufferPtr: Ptr;\n\t\t\t\t\t\t\t\t\tcopyBufferSize: LongInt;\n\t\t\t\t\t\t\t\t\tpreflight: Boolean;\n\t\t\t\t\t\t\t\t\tcopyErrHandler: CopyErrProcPtr;\n\t\t\t\t\t\t\t\t\tcopyFilterProc: CopyFilterProcPtr): OSErr;\n\n\tFUNCTION DirectoryCopy (srcVRefNum: Integer;\n\t\t\t\t\t\t\t\t\tsrcDirID: LongInt;\n\t\t\t\t\t\t\t\t\tsrcName: StringPtr;\n\t\t\t\t\t\t\t\t\tdstVRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdstDirID: LongInt;\n\t\t\t\t\t\t\t\t\tdstName: StringPtr;\n\t\t\t\t\t\t\t\t\tcopyName: StringPtr;\n\t\t\t\t\t\t\t\t\tcopyBufferPtr: Ptr;\n\t\t\t\t\t\t\t\t\tcopyBufferSize: LongInt;\n\t\t\t\t\t\t\t\t\tpreflight: Boolean;\n\t\t\t\t\t\t\t\t\tcopyErrHandler: CopyErrProcPtr): OSErr;\n\n\tFUNCTION FSpDirectoryCopy ({CONST}\n\t\t\t\t\t\t\t\t\tVAR srcSpec: FSSpec;\n\t\t\t\t\t\t\t\t\t{CONST}\n\t\t\t\t\t\t\t\t\tVAR dstSpec: FSSpec;\n\t\t\t\t\t\t\t\t\tcopyName: StringPtr;\n\t\t\t\t\t\t\t\t\tcopyBufferPtr: Ptr;\n\t\t\t\t\t\t\t\t\tcopyBufferSize: LongInt;\n\t\t\t\t\t\t\t\t\tpreflight: Boolean;\n\t\t\t\t\t\t\t\t\tcopyErrHandler: CopyErrProcPtr): OSErr;\n\n\n{***************************************************************************}\n\n\nIMPLEMENTATION\n\nEND."
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/MoreFiles 1.5/PascalInterfaces/FSpCompat.p",
    "content": "UNIT FSpCompat;\n\n{\tApple Macintosh Developer Technical Support\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tFSSpec compatibility functions\t\t\t\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tby Jim Luther, Apple Developer Technical Support Emeritus\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tFile:\t\tFSpCompat.p\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tCopyright  1992-1999 Apple Computer, Inc.\t\t\t\t\t\t\t\t}\n{\tAll rights reserved.\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tYou may incorporate this sample code into your applications without\t\t}\n{\trestriction, though the sample code has been provided \"AS IS\" and the\t}\n{\tresponsibility for its operation is 100% yours.  However, what you are\t}\n{\tnot permitted to do is to redistribute the source as \"DSC Sample Code\"\t}\n{\tafter having made changes. If you're going to re-distribute the source,\t}\n{\twe require that you make it clear in the source that the code was\t\t}\n{\tdescended from Apple Sample Code, but that you've made changes.\t\t\t}\n\n\nINTERFACE\n\n\tUSES\n\t\tTypes, Files, Finder;\n\n{***************************************************************************}\n\n\n\tFUNCTION FSMakeFSSpecCompat (vRefNum: INTEGER;\n\t\t\t\t\t\t\t\t\tdirID: LONGINT;\n\t\t\t\t\t\t\t\t\tfileName: Str255;\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec): OSErr;\n\n\tFUNCTION FSpOpenDFCompat ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec;\n\t\t\t\t\t\t\t\t\tpermission: SignedByte;\n\t\t\t\t\t\t\t\t\tVAR refNum: INTEGER): OSErr;\n\n\tFUNCTION FSpOpenRFCompat ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec;\n\t\t\t\t\t\t\t\t\tpermission: SignedByte;\n\t\t\t\t\t\t\t\t\tVAR refNum: INTEGER): OSErr;\n\n\tFUNCTION FSpCreateCompat ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec;\n\t\t\t\t\t\t\t\t\tcreator: OSType;\n\t\t\t\t\t\t\t\t\tfileType: OSType;\n\t\t\t\t\t\t\t\t\tscriptTag: ScriptCode): OSErr;\n\n\tFUNCTION FSpDirCreateCompat ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec;\n\t\t\t\t\t\t\t\t\tscriptTag: ScriptCode;\n\t\t\t\t\t\t\t\t\tVAR createdDirID: LONGINT): OSErr;\n\n\tFUNCTION FSpDeleteCompat ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec): OSErr;\n\n\tFUNCTION FSpGetFInfoCompat ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec;\n\t\t\t\t\t\t\t\t\tVAR fndrInfo: FInfo): OSErr;\n\n\tFUNCTION FSpSetFInfoCompat ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec;\n\t\t\t\t\t\t\t\t\tfndrInfo: FInfo): OSErr;\n\n\tFUNCTION FSpSetFLockCompat ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec): OSErr;\n\n\tFUNCTION FSpRstFLockCompat ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec): OSErr;\n\n\tFUNCTION FSpRenameCompat ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec;\n\t\t\t\t\t\t\t\t\tnewName: Str255): OSErr;\n\n\tFUNCTION FSpCatMoveCompat ({CONST}\n\t\t\t\t\t\t\t\t\tVAR source: FSSpec;\n\t\t\t\t\t\t\t\t\t{CONST}\n\t\t\t\t\t\t\t\t\tVAR dest: FSSpec): OSErr;\n\n\tFUNCTION FSpExchangeFilesCompat ({CONST}\n\t\t\t\t\t\t\t\t\tVAR source: FSSpec;\n\t\t\t\t\t\t\t\t\t{CONST}\n\t\t\t\t\t\t\t\t\tVAR dest: FSSpec): OSErr;\n\n\tFUNCTION FSpOpenResFileCompat ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec;\n\t\t\t\t\t\t\t\t\tpermission: SignedByte): INTEGER;\n\n\tPROCEDURE FSpCreateResFileCompat ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec;\n\t\t\t\t\t\t\t\t\tcreator: OSType;\n\t\t\t\t\t\t\t\t\tfileType: OSType;\n\t\t\t\t\t\t\t\t\tscriptTag: ScriptCode);\n\n\n{***************************************************************************}\n\n\nIMPLEMENTATION\n\nEND."
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/MoreFiles 1.5/PascalInterfaces/FileCopy.p",
    "content": "UNIT FileCopy;\n\n{\tApple Macintosh Developer Technical Support\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tFileCopy: A robust, general purpose file copy routine.\t\t\t\t\t}\n{\tby Jim Luther, Apple Developer Technical Support Emeritus\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tFile:\t\tFileCopy.p\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tCopyright  1992-1999 Apple Computer, Inc.\t\t\t\t\t\t\t\t}\n{\tAll rights reserved.\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tYou may incorporate this sample code into your applications without\t\t}\n{\trestriction, though the sample code has been provided \"AS IS\" and the\t}\n{\tresponsibility for its operation is 100% yours.  However, what you are\t}\n{\tnot permitted to do is to redistribute the source as \"DSC Sample Code\"\t}\n{\tafter having made changes. If you're going to re-distribute the source,\t}\n{\twe require that you make it clear in the source that the code was\t\t}\n{\tdescended from Apple Sample Code, but that you've made changes.\t\t\t}\n\n\nINTERFACE\n\n\tUSES\n\t\tTypes, Files;\n\n{***************************************************************************}\n\n\n\tFUNCTION FileCopy (srcVRefNum: Integer;\n\t\t\t\t\t\t\t\t\tsrcDirID: LongInt;\n\t\t\t\t\t\t\t\t\tsrcName: Str255;\n\t\t\t\t\t\t\t\t\tdstVRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdstDirID: LongInt;\n\t\t\t\t\t\t\t\t\tdstPathname: StringPtr;\n\t\t\t\t\t\t\t\t\tcopyName: StringPtr;\n\t\t\t\t\t\t\t\t\tcopyBufferPtr: Ptr;\n\t\t\t\t\t\t\t\t\tcopyBufferSize: LongInt;\n\t\t\t\t\t\t\t\t\tpreflight: Boolean): OSErr;\n\n\tFUNCTION FSpFileCopy ({CONST}\n\t\t\t\t\t\t\t\t\tVAR srcSpec: FSSpec;\n\t\t\t\t\t\t\t\t\t{CONST}\n\t\t\t\t\t\t\t\t\tVAR dstSpec: FSSpec;\n\t\t\t\t\t\t\t\t\tcopyName: StringPtr;\n\t\t\t\t\t\t\t\t\tcopyBufferPtr: Ptr;\n\t\t\t\t\t\t\t\t\tcopyBufferSize: LongInt;\n\t\t\t\t\t\t\t\t\tpreflight: Boolean): OSErr;\n\n\n{***************************************************************************}\n\nIMPLEMENTATION\n\nEND."
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/MoreFiles 1.5/PascalInterfaces/FullPath.p",
    "content": "UNIT FullPath;\n\n{\tApple Macintosh Developer Technical Support\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tRoutines for dealing with full pathnames... if you really must.\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tby Jim Luther, Apple Developer Technical Support Emeritus\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tFile:\t\tFullPath.p\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tCopyright  1995-1999 Apple Computer, Inc.\t\t\t\t\t\t\t\t}\n{\tAll rights reserved.\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tYou may incorporate this sample code into your applications without\t\t}\n{\trestriction, though the sample code has been provided \"AS IS\" and the\t}\n{\tresponsibility for its operation is 100% yours.  However, what you are\t}\n{\tnot permitted to do is to redistribute the source as \"DSC Sample Code\"\t}\n{\tafter having made changes. If you're going to re-distribute the source,\t}\n{\twe require that you make it clear in the source that the code was\t\t}\n{\tdescended from Apple Sample Code, but that you've made changes.\t\t\t}\n\n\n{\tIMPORTANT NOTE:\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tThe use of full pathnames is strongly discouraged. Full pathnames are\t}\n{\tparticularly unreliable as a means of identifying files, directories\t}\n{\tor volumes within your application, for two primary reasons:\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\t \tThe user can change the name of any element in the path at\t\t\t}\n{\t\tvirtually any time.\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\t\tVolume names on the Macintosh are *not* unique. Multiple\t\t\t}\n{\t\tmounted volumes can have the same name. For this reason, the use of\t}\n{\t\ta full pathname to identify a specific volume may not produce the\t}\n{\t\tresults you expect. If more than one volume has the same name and\t}\n{\t\ta full pathname is used, the File Manager currently uses the first\t}\n{\t\tmounted volume it finds with a matching name in the volume queue.\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tIn general, you should use a files name, parent directory ID, and\t\t}\n{\tvolume reference number to identify a file you want to open, delete,\t}\n{\tor otherwise manipulate.\t\t\t\t\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tIf you need to remember the location of a particular file across\t\t}\n{\tsubsequent system boots, use the Alias Manager to create an alias\t\t}\n{\trecord describing the file. If the Alias Manager is not available, you\t}\n{\tcan save the files name, its parent directory ID, and the name of the\t}\n{\tvolume on which its located. Although none of these methods is\t\t\t}\n{\tfoolproof, they are much more reliable than using full pathnames to\t\t}\n{\tidentify files.\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tNonetheless, it is sometimes useful to display a files full pathname\t}\n{\tto the user. For example, a backup utility might display a list of full\t}\n{\tpathnames of files as it copies them onto the backup medium. Or, a\t\t}\n{\tutility might want to display a dialog box showing the full pathname of\t}\n{\ta file when it needs the users confirmation to delete the file. No\t\t}\n{\tmatter how unreliable full pathnames may be from a file-specification\t}\n{\tviewpoint, users understand them more readily than volume reference\t\t}\n{\tnumbers or directory IDs.\t\t\t\t\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tThe following technique for constructing the full pathname of a file is\t}\n{\tintended for display purposes only. Applications that depend on any\t\t}\n{\tparticular structure of a full pathname are likely to fail on alternate\t}\n{\tforeign file systems or under future system software versions.\t\t\t}\n\n\nINTERFACE\n\n\tUSES\n\t\tTypes, Files;\n\n{***************************************************************************}\n\n\n\tFUNCTION GetFullPath (vRefNum: INTEGER;\n\t\t\t\t\t\t\t\t\tdirID: LONGINT;\n\t\t\t\t\t\t\t\t\tname: StringPtr;\n\t\t\t\t\t\t\t\t\tVAR fullPathLength: INTEGER;\n\t\t\t\t\t\t\t\t\tVAR fullPath: Handle): OSErr;\n\n\tFUNCTION FSpGetFullPath ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec;\n\t\t\t\t\t\t\t\t\tVAR fullPathLength: INTEGER;\n\t\t\t\t\t\t\t\t\tVAR fullPath: Handle): OSErr;\n\n\tFUNCTION FSpLocationFromFullPath (fullPathLength: INTEGER;\n\t\t\t\t\t\t\t\t\tfullPath: Ptr;\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec): OSErr;\n\n\tFUNCTION LocationFromFullPath (fullPathLength: INTEGER;\n\t\t\t\t\t\t\t\t\tfullPath: Ptr;\n\t\t\t\t\t\t\t\t\tVAR vRefNum: INTEGER;\n\t\t\t\t\t\t\t\t\tVAR parID: LONGINT;\n\t\t\t\t\t\t\t\t\tVAR name: Str31): OSErr;\n\n\n{***************************************************************************}\n\n\nIMPLEMENTATION\n\nEND."
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/MoreFiles 1.5/PascalInterfaces/IterateDirectory.p",
    "content": "UNIT IterateDirectory;\n\n{\tIterateDirectory: File Manager directory iterator routines.\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tby Jim Luther\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tFile:\t\tIterateDirectory.p\t\t\t\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tCopyright  1996-1999 Jim Luther and Apple Computer, Inc.\t\t\t\t}\n{\tAll rights reserved.\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tYou may incorporate this sample code into your applications without\t\t}\n{\trestriction, though the sample code has been provided \"AS IS\" and the\t}\n{\tresponsibility for its operation is 100% yours.\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tIterateDirectory is designed to drop into the MoreFiles sample code\t\t}\n{\tlibrary I wrote while in Apple Developer Technical Support\t\t\t\t}\n\n\nINTERFACE\n\n\tUSES\n\t\tTypes, Files;\n\n{***************************************************************************}\n\n\n\tTYPE\n\t\tIterateFilterProcPtr = ProcPtr;\n{\tA IterateDirectory IterateFilterProc procedure should have the\t\t\t}\n{\tfollowing form where the CInfoPBRec should be considered a CONST\t\t}\n{\t(do not change it):\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tPROCEDURE MyIterateFilterProcPtr (VAR cpbPtr: CInfoPBRec;\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t  VAR quitFlag: Boolean;\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t  yourDataPtr: Ptr);\t\t\t\t\t}\n\n\n{***************************************************************************}\n\n\n\tFUNCTION IterateDirectory (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tname: StringPtr;\n\t\t\t\t\t\t\t\t\tmaxLevels: Integer;\n\t\t\t\t\t\t\t\t\titerateFilter: IterateFilterProcPtr;\n\t\t\t\t\t\t\t\t\tyourDataPtr: Ptr): OSErr;\n\n\tFUNCTION FSpIterateDirectory ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec;\n\t\t\t\t\t\t\t\t\tmaxLevels: Integer;\n\t\t\t\t\t\t\t\t\titerateFilter: IterateFilterProcPtr;\n\t\t\t\t\t\t\t\t\tyourDataPtr: Ptr): OSErr;\n\n\n{***************************************************************************}\n\n\nIMPLEMENTATION\n\nEND."
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/MoreFiles 1.5/PascalInterfaces/MoreDesktopMgr.p",
    "content": "UNIT MoreDesktopMgr;\n\n{\tApple Macintosh Developer Technical Support\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tA collection of useful high-level Desktop Manager routines.\t\t\t\t}\n{\tIf the Desktop Manager isn't available, use the Desktop file\t\t\t}\n{\tfor 'read' operations.\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tWe do more because we can...\t\t\t\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tby Jim Luther and Nitin Ganatra,\t\t\t\t\t\t\t\t\t\t}\n{\t\tApple Developer Technical Support Emeriti\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tFile:\t\tMoreDesktopMgr.p\t\t\t\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tCopyright  1992-1999 Apple Computer, Inc.\t\t\t\t\t\t\t\t}\n{\tAll rights reserved.\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tYou may incorporate this sample code into your applications without\t\t}\n{\trestriction, though the sample code has been provided \"AS IS\" and the\t}\n{\tresponsibility for its operation is 100% yours.  However, what you are\t}\n{\tnot permitted to do is to redistribute the source as \"DSC Sample Code\"\t}\n{\tafter having made changes. If you're going to re-distribute the source,\t}\n{\twe require that you make it clear in the source that the code was\t\t}\n{\tdescended from Apple Sample Code, but that you've made changes.\t\t\t}\n\n\nINTERFACE\n\n\tUSES\n\t\tTypes, Files;\n\n{***************************************************************************}\n\n\n\tFUNCTION DTOpen (volName: StringPtr;\n\t\t\t\t\t\t\t\t\tvRefNum: Integer;\n\t\t\t\t\t\t\t\t\tVAR dtRefNum: Integer;\n\t\t\t\t\t\t\t\t\tVAR newDTDatabase: Boolean): OSErr;\n\n\tFUNCTION DTXGetAPPL (volName: StringPtr;\n\t\t\t\t\t\t\t\t\tvRefNum: Integer;\n\t\t\t\t\t\t\t\t\tcreator: OSType;\n\t\t\t\t\t\t\t\t\tsearchCatalog: Boolean;\n\t\t\t\t\t\t\t\t\tVAR applVRefNum: Integer;\n\t\t\t\t\t\t\t\t\tVAR applParID: LongInt;\n\t\t\t\t\t\t\t\t\tVAR applName: Str255): OSErr;\n\n\tFUNCTION FSpDTXGetAPPL (volName: StringPtr;\n\t\t\t\t\t\t\t\t\tvRefNum: Integer;\n\t\t\t\t\t\t\t\t\tcreator: OSType;\n\t\t\t\t\t\t\t\t\tsearchCatalog: Boolean;\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec): OSErr;\n\n\tFUNCTION DTGetAPPL (volName: StringPtr;\n\t\t\t\t\t\t\t\t\tvRefNum: Integer;\n\t\t\t\t\t\t\t\t\tcreator: OSType;\n\t\t\t\t\t\t\t\t\tVAR applVRefNum: Integer;\n\t\t\t\t\t\t\t\t\tVAR applParID: LongInt;\n\t\t\t\t\t\t\t\t\tVAR applName: Str255): OSErr;\n\n\tFUNCTION FSpDTGetAPPL (volName: StringPtr;\n\t\t\t\t\t\t\t\t\tvRefNum: Integer;\n\t\t\t\t\t\t\t\t\tcreator: OSType;\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec): OSErr;\n\n\tFUNCTION DTGetIcon (volName: StringPtr;\n\t\t\t\t\t\t\t\t\tvRefNum: Integer;\n\t\t\t\t\t\t\t\t\ticonType: Integer;\n\t\t\t\t\t\t\t\t\tfileCreator: OSType;\n\t\t\t\t\t\t\t\t\tfileType: OSType;\n\t\t\t\t\t\t\t\t\tVAR iconHandle: Handle): OSErr;\n\n\tFUNCTION DTSetComment (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tname: StringPtr;\n\t\t\t\t\t\t\t\t\tcomment: Str255): OSErr;\n\n\tFUNCTION FSpDTSetComment ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec;\n\t\t\t\t\t\t\t\t\tcomment: Str255): OSErr;\n\n\tFUNCTION DTGetComment (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tname: StringPtr;\n\t\t\t\t\t\t\t\t\tVAR comment: Str255): OSErr;\n\n\tFUNCTION FSpDTGetComment ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec;\n\t\t\t\t\t\t\t\t\tVAR comment: Str255): OSErr;\n\n\tFUNCTION DTCopyComment (srcVRefNum: Integer;\n\t\t\t\t\t\t\t\t\tsrcDirID: LongInt;\n\t\t\t\t\t\t\t\t\tsrcName: StringPtr;\n\t\t\t\t\t\t\t\t\tdstVRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdstDirID: LongInt;\n\t\t\t\t\t\t\t\t\tdstName: StringPtr): OSErr;\n\n\tFUNCTION FSpDTCopyComment ({CONST}\n\t\t\t\t\t\t\t\t\tVAR srcSpec: FSSpec;\n\t\t\t\t\t\t\t\t\t{CONST}\n\t\t\t\t\t\t\t\t\tVAR dstSpec: FSSpec): OSErr;\n\n\n{***************************************************************************}\n\n\nIMPLEMENTATION\n\nEND."
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/MoreFiles 1.5/PascalInterfaces/MoreFiles.p",
    "content": "UNIT MoreFiles;\n\n{\tApple Macintosh Developer Technical Support\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tThe long lost high-level and FSSpec File Manager functions.\t\t\t\t}\n{\tby Jim Luther, Apple Developer Technical Support Emeritus\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tFile:\t\tMoreFiles.p\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tCopyright  1992-1999 Apple Computer, Inc.\t\t\t\t\t\t\t\t}\n{\tAll rights reserved.\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tYou may incorporate this sample code into your applications without\t\t}\n{\trestriction, though the sample code has been provided \"AS IS\" and the\t}\n{\tresponsibility for its operation is 100% yours.  However, what you are\t}\n{\tnot permitted to do is to redistribute the source as \"DSC Sample Code\"\t}\n{\tafter having made changes. If you're going to re-distribute the source,\t}\n{\twe require that you make it clear in the source that the code was\t\t}\n{\tdescended from Apple Sample Code, but that you've made changes.\t\t\t}\n\n\nINTERFACE\n\n\tUSES\n\t\tTypes, Files;\n\n{***************************************************************************}\n\n\n\tFUNCTION HGetVolParms (volName: StringPtr;\n\t\t\t\t\t\t\t\t\tvRefNum: Integer;\n\t\t\t\t\t\t\t\t\tVAR volParmsInfo: GetVolParmsInfoBuffer;\n\t\t\t\t\t\t\t\t\tVAR infoSize: LongInt): OSErr;\n\n\tFUNCTION HCreateMinimum (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tfileName: Str255): OSErr;\n\n\tFUNCTION FSpCreateMinimum ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec): OSErr;\n\n\tFUNCTION ExchangeFiles (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tsrcDirID: LongInt;\n\t\t\t\t\t\t\t\t\tsrcName: Str255;\n\t\t\t\t\t\t\t\t\tdstDirID: LongInt;\n\t\t\t\t\t\t\t\t\tdstName: Str255): OSErr;\n\n\tFUNCTION ResolveFileIDRef (volName: StringPtr;\n\t\t\t\t\t\t\t\t\tvRefNum: Integer;\n\t\t\t\t\t\t\t\t\tfileID: LongInt;\n\t\t\t\t\t\t\t\t\tVAR parID: LongInt;\n\t\t\t\t\t\t\t\t\tfileName: StringPtr): OSErr;\n\n\tFUNCTION FSpResolveFileIDRef (volName: StringPtr;\n\t\t\t\t\t\t\t\t\tvRefNum: Integer;\n\t\t\t\t\t\t\t\t\tfileID: LongInt;\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec): OSErr;\n\n\tFUNCTION CreateFileIDRef (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tparID: LongInt;\n\t\t\t\t\t\t\t\t\tfileName: Str255;\n\t\t\t\t\t\t\t\t\tVAR fileID: LongInt): OSErr;\n\n\tFUNCTION FSpCreateFileIDRef ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec;\n\t\t\t\t\t\t\t\t\tVAR fileID: LongInt): OSErr;\n\n\tFUNCTION DeleteFileIDRef (volName: StringPtr;\n\t\t\t\t\t\t\t\t\tvRefNum: Integer;\n\t\t\t\t\t\t\t\t\tfileID: LongInt): OSErr;\n\n\tFUNCTION FlushFile (refNum: Integer): OSErr;\n\n\tFUNCTION LockRange (refNum: Integer;\n\t\t\t\t\t\t\t\t\trangeLength: LongInt;\n\t\t\t\t\t\t\t\t\trangeStart: LongInt): OSErr;\n\n\tFUNCTION UnlockRange (refNum: Integer;\n\t\t\t\t\t\t\t\t\trangeLength: LongInt;\n\t\t\t\t\t\t\t\t\trangeStart: LongInt): OSErr;\n\n\tFUNCTION GetForeignPrivs (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tname: StringPtr;\n\t\t\t\t\t\t\t\t\tforeignPrivBuffer: Ptr;\n\t\t\t\t\t\t\t\t\tVAR foreignPrivSize: LongInt;\n\t\t\t\t\t\t\t\t\tVAR foreignPrivInfo1: LongInt;\n\t\t\t\t\t\t\t\t\tVAR foreignPrivInfo2: LongInt;\n\t\t\t\t\t\t\t\t\tVAR foreignPrivInfo3: LongInt;\n\t\t\t\t\t\t\t\t\tVAR foreignPrivInfo4: LongInt): OSErr;\n\n\tFUNCTION FSpGetForeignPrivs ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec;\n\t\t\t\t\t\t\t\t\tforeignPrivBuffer: Ptr;\n\t\t\t\t\t\t\t\t\tVAR foreignPrivSize: LongInt;\n\t\t\t\t\t\t\t\t\tVAR foreignPrivInfo1: LongInt;\n\t\t\t\t\t\t\t\t\tVAR foreignPrivInfo2: LongInt;\n\t\t\t\t\t\t\t\t\tVAR foreignPrivInfo3: LongInt;\n\t\t\t\t\t\t\t\t\tVAR foreignPrivInfo4: LongInt): OSErr;\n\n\tFUNCTION SetForeignPrivs (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tname: StringPtr;\n\t\t\t\t\t\t\t\t\tforeignPrivBuffer: Ptr;\n\t\t\t\t\t\t\t\t\tVAR foreignPrivSize: LongInt;\n\t\t\t\t\t\t\t\t\tforeignPrivInfo1: LongInt;\n\t\t\t\t\t\t\t\t\tforeignPrivInfo2: LongInt;\n\t\t\t\t\t\t\t\t\tforeignPrivInfo3: LongInt;\n\t\t\t\t\t\t\t\t\tforeignPrivInfo4: LongInt): OSErr;\n\n\tFUNCTION FSpSetForeignPrivs ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec;\n\t\t\t\t\t\t\t\t\tforeignPrivBuffer: Ptr;\n\t\t\t\t\t\t\t\t\tVAR foreignPrivSize: LongInt;\n\t\t\t\t\t\t\t\t\tforeignPrivInfo1: LongInt;\n\t\t\t\t\t\t\t\t\tforeignPrivInfo2: LongInt;\n\t\t\t\t\t\t\t\t\tforeignPrivInfo3: LongInt;\n\t\t\t\t\t\t\t\t\tforeignPrivInfo4: LongInt): OSErr;\n\n\tFUNCTION HGetLogInInfo (volName: StringPtr;\n\t\t\t\t\t\t\t\t\tvRefNum: Integer;\n\t\t\t\t\t\t\t\t\tVAR loginMethod: Integer;\n\t\t\t\t\t\t\t\t\tuserName: StringPtr): OSErr;\n\n\tFUNCTION HGetDirAccess (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tname: StringPtr;\n\t\t\t\t\t\t\t\t\tVAR ownerID: LongInt;\n\t\t\t\t\t\t\t\t\tVAR groupID: LongInt;\n\t\t\t\t\t\t\t\t\tVAR accessRights: LongInt): OSErr;\n\n\tFUNCTION FSpGetDirAccess ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec;\n\t\t\t\t\t\t\t\t\tVAR ownerID: LongInt;\n\t\t\t\t\t\t\t\t\tVAR groupID: LongInt;\n\t\t\t\t\t\t\t\t\tVAR accessRights: LongInt): OSErr;\n\n\tFUNCTION HSetDirAccess (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tname: StringPtr;\n\t\t\t\t\t\t\t\t\townerID: LongInt;\n\t\t\t\t\t\t\t\t\tgroupID: LongInt;\n\t\t\t\t\t\t\t\t\taccessRights: LongInt): OSErr;\n\n\tFUNCTION FSpSetDirAccess ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec;\n\t\t\t\t\t\t\t\t\townerID: LongInt;\n\t\t\t\t\t\t\t\t\tgroupID: LongInt;\n\t\t\t\t\t\t\t\t\taccessRights: LongInt): OSErr;\n\n\tFUNCTION HMapID (volName: StringPtr;\n\t\t\t\t\t\t\t\t\tvRefNum: Integer;\n\t\t\t\t\t\t\t\t\tugID: LongInt;\n\t\t\t\t\t\t\t\t\tobjType: Integer;\n\t\t\t\t\t\t\t\t\tname: StringPtr): OSErr;\n\n\tFUNCTION HMapName (volName: StringPtr;\n\t\t\t\t\t\t\t\t\tvRefNum: Integer;\n\t\t\t\t\t\t\t\t\tname: Str255;\n\t\t\t\t\t\t\t\t\tobjType: Integer;\n\t\t\t\t\t\t\t\t\tVAR ugID: LongInt): OSErr;\n\n\tFUNCTION HCopyFile (srcVRefNum: Integer;\n\t\t\t\t\t\t\t\t\tsrcDirID: LongInt;\n\t\t\t\t\t\t\t\t\tsrcName: Str255;\n\t\t\t\t\t\t\t\t\tdstVRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdstDirID: LongInt;\n\t\t\t\t\t\t\t\t\tdstPathname: StringPtr;\n\t\t\t\t\t\t\t\t\tcopyName: StringPtr): OSErr;\n\n\tFUNCTION FSpCopyFile ({CONST}\n\t\t\t\t\t\t\t\t\tVAR srcSpec: FSSpec;\n\t\t\t\t\t\t\t\t\t{CONST}\n\t\t\t\t\t\t\t\t\tVAR dstSpec: FSSpec;\n\t\t\t\t\t\t\t\t\tcopyName: StringPtr): OSErr;\n\n\tFUNCTION HMoveRename (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tsrcDirID: LongInt;\n\t\t\t\t\t\t\t\t\tsrcName: Str255;\n\t\t\t\t\t\t\t\t\tdstDirID: LongInt;\n\t\t\t\t\t\t\t\t\tdstpathName: StringPtr;\n\t\t\t\t\t\t\t\t\tcopyName: StringPtr): OSErr;\n\n\tFUNCTION FSpMoveRename ({CONST}\n\t\t\t\t\t\t\t\t\tVAR srcSpec: FSSpec;\n\t\t\t\t\t\t\t\t\t{CONST}\n\t\t\t\t\t\t\t\t\tVAR dstSpec: FSSpec;\n\t\t\t\t\t\t\t\t\tcopyName: StringPtr): OSErr;\n\n\tFUNCTION GetVolMountInfoSize (volName: StringPtr;\n\t\t\t\t\t\t\t\t\tvRefNum: Integer;\n\t\t\t\t\t\t\t\t\tVAR size: Integer): OSErr;\n\n\tFUNCTION GetVolMountInfo (volName: StringPtr;\n\t\t\t\t\t\t\t\t\tvRefNum: Integer;\n\t\t\t\t\t\t\t\t\tvolMountInfo: Ptr): OSErr;\n\n\tFUNCTION VolumeMount (volMountInfo: Ptr;\n\t\t\t\t\t\t\t\t\tVAR vRefNum: Integer): OSErr;\n\n\tFUNCTION Share (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tname: StringPtr): OSErr;\n\n\tFUNCTION FSpShare ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec): OSErr;\n\n\tFUNCTION Unshare (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tname: StringPtr): OSErr;\n\n\tFUNCTION FSpUnshare ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec): OSErr;\n\n\tFUNCTION GetUGEntry (objType: Integer;\n\t\t\t\t\t\t\t\t\tobjName: StringPtr;\n\t\t\t\t\t\t\t\t\tVAR objID: LongInt): OSErr;\n\n\n{***************************************************************************}\n\nIMPLEMENTATION\n\nEND."
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/MoreFiles 1.5/PascalInterfaces/MoreFilesExtras.p",
    "content": "UNIT MoreFilesExtras;\n\n{\tApple Macintosh Developer Technical Support\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tA collection of useful high-level File Manager routines.\t\t\t\t}\n{\tby Jim Luther, Apple Developer Technical Support Emeritus\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tFile:\t\tMoreFilesExtras.p\t\t\t\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tCopyright  1992-1999 Apple Computer, Inc.\t\t\t\t\t\t\t\t}\n{\tAll rights reserved.\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tYou may incorporate this sample code into your applications without\t\t}\n{\trestriction, though the sample code has been provided \"AS IS\" and the\t}\n{\tresponsibility for its operation is 100% yours.  However, what you are\t}\n{\tnot permitted to do is to redistribute the source as \"DSC Sample Code\"\t}\n{\tafter having made changes. If you're going to re-distribute the source,\t}\n{\twe require that you make it clear in the source that the code was\t\t}\n{\tdescended from Apple Sample Code, but that you've made changes.\t\t\t}\n\n\nINTERFACE\n\n\tUSES\n\t\tTypes, Files, Finder;\n\n{***************************************************************************}\n\n\tCONST\n\t\t{\tDeny mode permissions for use with the HOpenAware, HOpenRFAware,\t}\n\t\t{\tFSpOpenAware, and FSpOpenRFAware functions.\t\t\t\t\t\t\t}\n\t\t{\tNote: Common settings are the ones with comments.\t\t\t\t\t}\n\n\t\tdmNone = $0000;\n\t\tdmNoneDenyRd = fsRdDenyPerm;\n\t\tdmNoneDenyWr = fsWrDenyPerm;\n\t\tdmNoneDenyRdWr = fsRdDenyPerm + fsWrDenyPerm;\n\t\tdmRd = fsRdPerm;\t\t\t\t\t\t\t{ Single writer, multiple readers; the readers }\n\t\tdmRdDenyRd = fsRdPerm + fsRdDenyPerm;\n\t\tdmRdDenyWr = fsRdPerm + fsWrDenyPerm;\t\t{ Browsing - equivalent to fsRdPerm }\n\t\tdmRdDenyRdWr = fsRdPerm + fsRdDenyPerm + fsWrDenyPerm;\n\t\tdmWr = fsWrPerm;\n\t\tdmWrDenyRd = fsWrPerm + fsRdDenyPerm;\n\t\tdmWrDenyWr = fsWrPerm + fsWrDenyPerm;\n\t\tdmWrDenyRdWr = fsWrPerm + fsRdDenyPerm + fsWrDenyPerm;\n\t\tdmRdWr = fsRdWrPerm;\t\t\t\t\t\t{ Shared access - equivalent to fsRdWrShPerm }\n\t\tdmRdWrDenyRd = fsRdWrPerm + fsRdDenyPerm;\n\t\tdmRdWrDenyWr = fsRdWrPerm + fsWrDenyPerm;\t{ Single writer, multiple readers; the writer }\n\t\tdmRdWrDenyRdWr = fsRdWrPerm + fsRdDenyPerm + fsWrDenyPerm;\t{ Exclusive access - equivalent to fsRdWrPerm }\n\n\t\t{\tBit masks to get common information out of ioACUser returned by\t\t\t}\n\t\t{\tPBGetCatInfo (remember to clear ioACUser before calling PBGetCatInfo\t}\n\t\t{\tsince some file systems don't bother to set this field).\t\t\t\t}\n\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t{\tUse the GetDirAccessRestrictions or FSpGetDirAccessRestrictions\t\t\t}\n\t\t{\tfunctions to retrieve the ioACUser access restrictions byte for\t\t\t}\n\t\t{\ta folder.\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t{\tNote:\tThe access restriction byte returned by PBGetCatInfo is the\t\t}\n\t\t{\t\t\t2's complement of the user's privileges byte returned in\t\t}\n\t\t{\t\t\tioACAccess by PBHGetDirAccess.\t\t\t\t\t\t\t\t\t}\n\n\t\t{ mask for just the access restriction bits }\n\t\tacUserAccessMask = kioACUserNoSeeFolderMask + kioACUserNoSeeFilesMask + kioACUserNoMakeChangesMask;\n\n\t\t{ common access privilege settings }\n\t\tacUserFull = $00;\t\t\t\t\t\t{ no access restiction bits on }\n\t\tacUserNone = acUserAccessMask;\t\t\t{ all access restiction bits on }\n\t\tacUserDropBox = kioACUserNoSeeFolderMask + kioACUserNoSeeFilesMask; { make changes, but not see files or folders }\n\t\tacUserBulletinBoard = kioACUserNoMakeChangesMask;\t{ see files and folders, but not make changes }\n\n\n{\tFor those times where you need to use more than one kind of\t\t\t\t}\n{\tFile Manager parameter block but don't feel like wasting stack space,\t}\n{\there's a parameter block you can reuse.\t\t\t\t\t\t\t\t\t}\n\n{$PUSH}\n{$ALIGN MAC68K}\n\n\tTYPE\n\t\tUniversalFMPBHandle = ^UniversalFMPBPtr;\n\t\tUniversalFMPBPtr = ^UniversalFMPB;\n\t\tUniversalFMPB = RECORD\n\t\t\t\tCASE Integer OF\n\t\t\t\t\t1: (\n\t\t\t\t\t\t\tPB: ParamBlockRec\n\t\t\t\t\t);\n\t\t\t\t\t2: (\n\t\t\t\t\t\t\tciPB: CInfoPBRec\n\t\t\t\t\t);\n\t\t\t\t\t3: (\n\t\t\t\t\t\t\tdtPB: DTPBRec\n\t\t\t\t\t);\n\t\t\t\t\t4: (\n\t\t\t\t\t\t\thPB: HParamBlockRec\n\t\t\t\t\t);\n\t\t\t\t\t5: (\n\t\t\t\t\t\t\tcmPB: CMovePBRec\n\t\t\t\t\t);\n\t\t\t\t\t6: (\n\t\t\t\t\t\t\twdPB: WDPBRec\n\t\t\t\t\t);\n\t\t\t\t\t7: (\n\t\t\t\t\t\t\tfcbPB: FCBPBRec\n\t\t\t\t\t);\n\t\t\t\t\t8: (\n\t\t\t\t\t\t\txPB: XVolumeParam\n\t\t\t\t\t);\n\t\t\tEND;\n\n\n{\tUsed by GetUGEntries to return user or group lists.\t\t\t\t\t\t}\n\n\t\tUGEntryHandle = ^UGEntryPtr;\n\t\tUGEntryPtr = ^UGEntry;\n\t\tUGEntry = RECORD\n\t\t\t\tobjType: Integer;\n\t\t\t\tobjID: LongInt;\n\t\t\t\tname: Str31;\n\t\t\tEND;\n\n\n{\tI use the following records instead of the AFPVolMountInfo and\t\t\t}\n{\tAFPXVolMountInfo structures in Files.p\t\t\t\t\t\t\t\t\t}\n\n\t\tStr8 = STRING[8];\n\t\tMyAFPVolMountInfoHandle = ^MyAFPVolMountInfoPtr;\n\t\tMyAFPVolMountInfoPtr = ^MyAFPVolMountInfo;\n\t\tMyAFPVolMountInfo = RECORD\n\t\t\t\tlength: Integer;\t\t\t\t{ length of this record }\n\t\t\t\tmedia: VolumeType;\t\t\t\t{ type of media, always AppleShareMediaType }\n\t\t\t\tflags: Integer;\t\t\t\t\t{ 0 = normal mount; set bit 0 to inhibit greeting messages }\n\t\t\t\tnbpInterval: SignedByte;\t\t{ NBP interval parameter; 7 is a good choice }\n\t\t\t\tnbpCount: SignedByte;\t\t\t{ NBP count parameter; 5 is a good choice }\n\t\t\t\tuamType: Integer;\t\t\t\t{ User Authentication Method }\n\t\t\t\tzoneNameOffset: Integer;\t\t{ offset from start of record to zoneName }\n\t\t\t\tserverNameOffset: Integer;\t\t{ offset from start of record to serverName }\n\t\t\t\tvolNameOffset: Integer;\t\t\t{ offset from start of record to volName }\n\t\t\t\tuserNameOffset: Integer;\t\t{ offset from start of record to userName }\n\t\t\t\tuserPasswordOffset: Integer;\t{ offset from start of record to userPassword }\n\t\t\t\tvolPasswordOffset: Integer;\t\t{ offset from start of record to volPassword }\n\t\t\t\tzoneName: Str32;\t\t\t\t{ server's AppleTalk zone name }\n\t\t\t\tserverName: Str32;\t\t\t\t{ server name }\n\t\t\t\tvolName: Str27;\t\t\t\t\t{ volume name }\n\t\t\t\tuserName: Str31;\t\t\t\t{ user name (zero length Pascal string for guest) }\n\t\t\t\tuserPassword: Str8;\t\t\t\t{ user password (zero length Pascal string if no user password) }\n\t\t\t\tvolPassword: Str8;\t\t\t\t{ volume password (zero length Pascal string if no volume password) }\n\t\t\tEND;\n\t\tMyAFPXVolMountInfo = RECORD\n\t\t\t\tlength: Integer;\t\t\t\t{ length of this record }\n\t\t\t\tmedia: VolumeType;\t\t\t\t{ type of media, always AppleShareMediaType }\n\t\t\t\tflags: Integer;\t\t\t\t\t{ 0 = normal mount; set bit 0 to inhibit greeting messages }\n\t\t\t\tnbpInterval: SignedByte;\t\t{ NBP interval parameter; 7 is a good choice }\n\t\t\t\tnbpCount: SignedByte;\t\t\t{ NBP count parameter; 5 is a good choice }\n\t\t\t\tuamType: Integer;\t\t\t\t{ User Authentication Method }\n\t\t\t\tzoneNameOffset: Integer;\t\t{ offset from start of record to zoneName }\n\t\t\t\tserverNameOffset: Integer;\t\t{ offset from start of record to serverName }\n\t\t\t\tvolNameOffset: Integer;\t\t\t{ offset from start of record to volName }\n\t\t\t\tuserNameOffset: Integer;\t\t{ offset from start of record to userName }\n\t\t\t\tuserPasswordOffset: Integer;\t{ offset from start of record to userPassword }\n\t\t\t\tvolPasswordOffset: Integer;\t\t{ offset from start of record to volPassword }\n\t\t\t\textendedFlags: Integer;\t\t\t{ extended flags word }\n\t\t\t\tuamNameOffset: Integer;\t\t\t{ offset to a pascal UAM name string }\n\t\t\t\talternateAddressOffset: Integer; { offset to Alternate Addresses in tagged format }\n\t\t\t\tzoneName: Str32;\t\t\t\t{ server's AppleTalk zone name }\n\t\t\t\tserverName: Str32;\t\t\t\t{ server name }\n\t\t\t\tvolName: Str27;\t\t\t\t\t{ volume name }\n\t\t\t\tuserName: Str31;\t\t\t\t{ user name (zero length Pascal string for guest) }\n\t\t\t\tuserPassword: Str8;\t\t\t\t{ user password (zero length Pascal string if no user password) }\n\t\t\t\tvolPassword: Str8;\t\t\t\t{ volume password (zero length Pascal string if no volume password) }\n\t\t\t\tuamName: Str32;\t\t\t\t\t{ UAM name }\n\t\t\t\talternateAddress: Packed Array [0..0] OF Char; { variable length data }\n\t\t\tEND;\n\n{$ALIGN RESET}\n{$POP}\n\n\n{***************************************************************************}\n\n\t{\tFunctions to get information out of GetVolParmsInfoBuffer.\t}\n\t{\t(implemented in this Unit).\t\t\t\t\t\t\t\t\t}\n\t\n\t{ version 1 field getters }\n\tFUNCTION GetVolParmsInfoVersion(VAR volParms: GetVolParmsInfoBuffer): INTEGER;\n\tFUNCTION GetVolParmsInfoAttrib(VAR volParms: GetVolParmsInfoBuffer): LONGINT;\n\tFUNCTION GetVolParmsInfoLocalHand(VAR volParms: GetVolParmsInfoBuffer): Handle;\n\tFUNCTION GetVolParmsInfoServerAdr(VAR volParms: GetVolParmsInfoBuffer): LONGINT;\n\t{ version 2 field getters (assume zero result if not version >= 2) }\n\tFUNCTION GetVolParmsInfoVolumeGrade(VAR volParms: GetVolParmsInfoBuffer): LONGINT;\n\tFUNCTION GetVolParmsInfoForeignPrivID(VAR volParms: GetVolParmsInfoBuffer): INTEGER;\n\t{ version 3 field getters (assume zero result if not version >= 3) }\n\tFUNCTION GetVolParmsInfoExtendedAttributes(VAR volParms: GetVolParmsInfoBuffer): LONGINT;\n\t\n\t{ attribute bits supported by all versions of GetVolParmsInfoBuffer }\n\tFUNCTION isNetworkVolume (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION hasLimitFCBs (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION hasLocalWList (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION hasNoMiniFndr (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION hasNoVNEdit (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION hasNoLclSync (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION hasTrshOffLine (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION hasNoSwitchTo (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION hasNoDeskItems (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION hasNoBootBlks (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION hasAccessCntl (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION hasNoSysDir (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION hasExtFSVol (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION hasOpenDeny (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION hasCopyFile (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION hasMoveRename (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION hasDesktopMgr (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION hasShortName (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION hasFolderLock (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION hasPersonalAccessPrivileges (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION hasUserGroupList (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION hasCatSearch (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION hasFileIDs (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION hasBTreeMgr (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION hasBlankAccessPrivileges (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION supportsAsyncRequests (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION supportsTrashVolumeCache (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\n\t{ attribute bits supported by version 3 and greater versions of GetVolParmsInfoBuffer }\n\tFUNCTION volIsEjectable (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION volSupportsHFSPlusAPIs (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION volSupportsFSCatalogSearch (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION volSupportsFSExchangeObjects (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION volSupports2TBFiles (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION volSupportsLongNames (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION volSupportsMultiScriptNames (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION volSupportsNamedForks (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION volSupportsSubtreeIterators (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tFUNCTION volL2PCanMapFileBlocks (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\n\t{\tFunctions to get common information out of ioACUser.\t}\n\t{\t(implemented in this Unit).\t\t\t\t\t\t\t\t}\n\tFUNCTION userIsOwner (ioACUser: SInt8): Boolean;\n\tFUNCTION userHasFullAccess (ioACUser: SInt8): Boolean;\n\tFUNCTION userHasDropBoxAccess (ioACUser: SInt8): Boolean;\n\tFUNCTION userHasBulletinBoard (ioACUser: SInt8): Boolean;\n\tFUNCTION userHasNoAccess (ioACUser: SInt8): Boolean;\n\n\n{***************************************************************************}\n\n\n\tPROCEDURE TruncPString (destination: StringPtr;\n\t\t\t\t\t\t\t\t\tsource: StringPtr;\n\t\t\t\t\t\t\t\t\tmaxLength: Integer);\n\n\tFUNCTION GetTempBuffer (buffReqSize: LONGINT;\n\t\t\t\t\t\t\t\t\tVAR buffActSize: LONGINT): Ptr;\n\n\tFUNCTION GetVolumeInfoNoName (pathname: StringPtr;\n\t\t\t\t\t\t\t\t\tvRefNum: Integer;\n\t\t\t\t\t\t\t\t\tVAR pb: HParamBlockRec): OSErr;\n\n\tFUNCTION XGetVolumeInfoNoName(pathname: StringPtr;\n\t\t\t\t\t\t\t\t\tvRefNum: Integer;\n\t\t\t\t\t\t\t\t\tVAR pb: XVolumeParam): OSErr;\n\t\n\tFUNCTION GetCatInfoNoName (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tname: StringPtr;\n\t\t\t\t\t\t\t\t\tVAR pb: CInfoPBRec): OSErr;\n\n\tFUNCTION DetermineVRefNum (pathname: StringPtr;\n\t\t\t\t\t\t\t\t\tvRefNum: Integer;\n\t\t\t\t\t\t\t\t\tVAR realVRefNum: Integer): OSErr;\n\n\tFUNCTION HGetVInfo (volReference: Integer;\n\t\t\t\t\t\t\t\t\tvolName: StringPtr;\n\t\t\t\t\t\t\t\t\tVAR vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tVAR freeBytes: LongInt;\n\t\t\t\t\t\t\t\t\tVAR totalBytes: LongInt): OSErr;\n\n\tFUNCTION XGetVInfo (volReference: Integer;\n\t\t\t\t\t\t\t\t\tvolName: StringPtr;\n\t\t\t\t\t\t\t\t\tVAR vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tVAR freeBytes: UnsignedWide;\n\t\t\t\t\t\t\t\t\tVAR totalBytes: UnsignedWide): OSErr;\n\n\tFUNCTION CheckVolLock (pathname: StringPtr;\n\t\t\t\t\t\t\t\t\tvRefNum: Integer): OSErr;\n\n\tFUNCTION GetDriverName (driverRefNum: Integer;\n\t\t\t\t\t\t\t\t\tVAR driverName: Str255): OSErr;\n\n\tFUNCTION FindDrive (pathname: StringPtr;\n\t\t\t\t\t\t\t\t\tvRefNum: Integer;\n\t\t\t\t\t\t\t\t\tVAR driveQElementPtr: DrvQElPtr): OSErr;\n\n\tFUNCTION GetVolFileSystemID (pathname: StringPtr;\n\t\t\t\t\t\t\t\t\tvRefNum: Integer;\n\t\t\t\t\t\t\t\t\tVAR fileSystemID: Integer): OSErr;\n\t\t\t\t\t\t\t\t   \n\tFUNCTION GetVolState (pathname: StringPtr;\n\t\t\t\t\t\t\t\t\tvRefNum: Integer;\n\t\t\t\t\t\t\t\t\tVAR volumeOnline: Boolean;\n\t\t\t\t\t\t\t\t\tVAR volumeEjected: Boolean;\n\t\t\t\t\t\t\t\t\tVAR driveEjectable: Boolean;\n\t\t\t\t\t\t\t\t\tVAR driverWantsEject: Boolean): OSErr;\n\t\t\t\t\t\t\t\t   \n\tFUNCTION UnmountAndEject (pathname: StringPtr;\n\t\t\t\t\t\t\t\t\tvRefNum: Integer): OSErr;\n\n\tFUNCTION OnLine (volumes: FSSpecPtr;\n\t\t\t\t\t\t\t\t\treqVolCount: Integer;\n\t\t\t\t\t\t\t\t\tVAR actVolCount: Integer;\n\t\t\t\t\t\t\t\t\tVAR volIndex: Integer): OSErr;\n\n\tFUNCTION SetDefault (newVRefNum: Integer;\n\t\t\t\t\t\t\t\t\tnewDirID: LongInt;\n\t\t\t\t\t\t\t\t\tVAR oldVRefNum: Integer;\n\t\t\t\t\t\t\t\t\tVAR oldDirID: LongInt): OSErr;\n\n\tFUNCTION RestoreDefault (oldVRefNum: Integer;\n\t\t\t\t\t\t\t\t\toldDirID: LongInt): OSErr;\n\n\tFUNCTION GetDInfo (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tname: StringPtr;\n\t\t\t\t\t\t\t\t\tVAR fndrInfo: DInfo): OSErr;\n\n\tFUNCTION FSpGetDInfo ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec;\n\t\t\t\t\t\t\t\t\tVAR fndrInfo: DInfo): OSErr;\n\n\tFUNCTION SetDInfo (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tname: StringPtr;\n\t\t\t\t\t\t\t\t\tfndrInfo: DInfo): OSErr;\n\n\tFUNCTION FSpSetDInfo ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec;\n\t\t\t\t\t\t\t\t\tfndrInfo: DInfo): OSErr;\n\n\tFUNCTION GetDirectoryID (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tname: StringPtr;\n\t\t\t\t\t\t\t\t\tVAR theDirID: LongInt;\n\t\t\t\t\t\t\t\t\tVAR isDirectory: Boolean): OSErr;\n\n\tFUNCTION FSpGetDirectoryID ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec;\n\t\t\t\t\t\t\t\t\tVAR theDirID: LongInt;\n\t\t\t\t\t\t\t\t\tVAR isDirectory: Boolean): OSErr;\n\n\tFUNCTION GetDirName (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tVAR name: Str31): OSErr;\n\n\tFUNCTION GetIOACUser (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tname: StringPtr;\n\t\t\t\t\t\t\t\t\tVAR ioACUser: SInt8): OSErr;\n\n\tFUNCTION FSpGetIOACUser (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tname: StringPtr;\n\t\t\t\t\t\t\t\t\tVAR ioACUser: SInt8): OSErr;\n\n\tFUNCTION GetParentID (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tname: StringPtr;\n\t\t\t\t\t\t\t\t\tVAR parID: LongInt): OSErr;\n\n\tFUNCTION GetFilenameFromPathname (pathname: Str255;\n\t\t\t\t\t\t\t\t\tVAR filename: Str255): OSErr;\n\n\tFUNCTION GetObjectLocation (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tpathname: StringPtr;\n\t\t\t\t\t\t\t\t\tVAR realVRefNum: Integer;\n\t\t\t\t\t\t\t\t\tVAR realParID: LongInt;\n\t\t\t\t\t\t\t\t\tVAR realName: Str255;\n\t\t\t\t\t\t\t\t\tVAR isDirectory: Boolean): OSErr;\n\n\tFUNCTION GetDirItems (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tname: StringPtr;\n\t\t\t\t\t\t\t\t\tgetFiles: Boolean;\n\t\t\t\t\t\t\t\t\tgetDirectories: Boolean;\n\t\t\t\t\t\t\t\t\titems: FSSpecPtr;\n\t\t\t\t\t\t\t\t\treqItemCount: Integer;\n\t\t\t\t\t\t\t\t\tVAR actItemCount: Integer;\n\t\t\t\t\t\t\t\t\tVAR itemIndex: Integer): OSErr;\n\n\tFUNCTION DeleteDirectoryContents (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tname: StringPtr): OSErr;\n\n\tFUNCTION DeleteDirectory (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tname: StringPtr): OSErr;\n\n\tFUNCTION CheckObjectLock (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tname: StringPtr): OSErr;\n\n\tFUNCTION FSpCheckObjectLock ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec): OSErr;\n\n\tFUNCTION GetFileSize (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tfileName: Str255;\n\t\t\t\t\t\t\t\t\tVAR dataSize: LONGINT;\n\t\t\t\t\t\t\t\t\tVAR rsrcSize: LONGINT): OSErr;\n\n\tFUNCTION FSpGetFileSize ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec;\n\t\t\t\t\t\t\t\t\tVAR dataSize: LONGINT;\n\t\t\t\t\t\t\t\t\tVAR rsrcSize: LONGINT): OSErr;\n\n\tFUNCTION BumpDate (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tname: StringPtr): OSErr;\n\n\tFUNCTION FSpBumpDate ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec): OSErr;\n\n\n\tFUNCTION ChangeCreatorType (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tname: Str255;\n\t\t\t\t\t\t\t\t\tcreator: OSType;\n\t\t\t\t\t\t\t\t\tfileType: OSType): OSErr;\n\n\tFUNCTION FSpChangeCreatorType ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec;\n\t\t\t\t\t\t\t\t\tcreator: OSType;\n\t\t\t\t\t\t\t\t\tfileType: OSType): OSErr;\n\n\tFUNCTION ChangeFDFlags (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tname: StringPtr;\n\t\t\t\t\t\t\t\t\tsetBits: Boolean;\n\t\t\t\t\t\t\t\t\tflagBits: Integer): OSErr;\n\n\tFUNCTION FSpChangeFDFlags ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec;\n\t\t\t\t\t\t\t\t\tsetBits: Boolean;\n\t\t\t\t\t\t\t\t\tflagBits: Integer): OSErr;\n\n\tFUNCTION SetIsInvisible (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tname: StringPtr): OSErr;\n\n\tFUNCTION FSpSetIsInvisible ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec): OSErr;\n\n\tFUNCTION ClearIsInvisible (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tname: StringPtr): OSErr;\n\n\tFUNCTION FSpClearIsInvisible ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec): OSErr;\n\n\tFUNCTION SetNameLocked (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tname: StringPtr): OSErr;\n\n\tFUNCTION FSpSetNameLocked ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec): OSErr;\n\n\tFUNCTION ClearNameLocked (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tname: StringPtr): OSErr;\n\n\tFUNCTION FSpClearNameLocked ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec): OSErr;\n\n\tFUNCTION SetIsStationery (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tname: Str255): OSErr;\n\n\tFUNCTION FSpSetIsStationery ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec): OSErr;\n\n\tFUNCTION ClearIsStationery (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tname: Str255): OSErr;\n\n\tFUNCTION FSpClearIsStationery ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec): OSErr;\n\n\tFUNCTION SetHasCustomIcon (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tname: StringPtr): OSErr;\n\n\tFUNCTION FSpSetHasCustomIcon ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec): OSErr;\n\n\tFUNCTION ClearHasCustomIcon (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tname: StringPtr): OSErr;\n\n\tFUNCTION FSpClearHasCustomIcon ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec): OSErr;\n\n\tFUNCTION ClearHasBeenInited (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tname: StringPtr): OSErr;\n\n\tFUNCTION FSpClearHasBeenInited ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec): OSErr;\n\n\tFUNCTION CopyFileMgrAttributes (srcVRefNum: Integer;\n\t\t\t\t\t\t\t\t\tsrcDirID: LongInt;\n\t\t\t\t\t\t\t\t\tsrcName: StringPtr;\n\t\t\t\t\t\t\t\t\tdstVRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdstDirID: LongInt;\n\t\t\t\t\t\t\t\t\tdstName: StringPtr;\n\t\t\t\t\t\t\t\t\tcopyLockBit: Boolean): OSErr;\n\n\tFUNCTION FSpCopyFileMgrAttributes ({CONST}\n\t\t\t\t\t\t\t\t\tVAR srcSpec: FSSpec;\n\t\t\t\t\t\t\t\t\t{CONST}\n\t\t\t\t\t\t\t\t\tVAR dstSpec: FSSpec;\n\t\t\t\t\t\t\t\t\tcopyLockBit: Boolean): OSErr;\n\n\tFUNCTION HOpenAware (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tfileName: Str255;\n\t\t\t\t\t\t\t\t\tdenyModes: Integer;\n\t\t\t\t\t\t\t\t\tVAR refNum: Integer): OSErr;\n\n\tFUNCTION FSpOpenAware ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec;\n\t\t\t\t\t\t\t\t\tdenyModes: Integer;\n\t\t\t\t\t\t\t\t\tVAR refNum: Integer): OSErr;\n\n\tFUNCTION HOpenRFAware (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdirID: LongInt;\n\t\t\t\t\t\t\t\t\tfileName: Str255;\n\t\t\t\t\t\t\t\t\tdenyModes: Integer;\n\t\t\t\t\t\t\t\t\tVAR refNum: Integer): OSErr;\n\n\tFUNCTION FSpOpenRFAware ({CONST}\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec;\n\t\t\t\t\t\t\t\t\tdenyModes: Integer;\n\t\t\t\t\t\t\t\t\tVAR refNum: Integer): OSErr;\n\n\tFUNCTION FSReadNoCache (refNum: Integer;\n\t\t\t\t\t\t\t\t\tVAR count: LongInt;\n\t\t\t\t\t\t\t\t\tbuffPtr: Ptr): OSErr;\n\n\tFUNCTION FSWriteNoCache (refNum: Integer;\n\t\t\t\t\t\t\t\t\tVAR count: LongInt;\n\t\t\t\t\t\t\t\t\tbuffPtr: Ptr): OSErr;\n\n\tFUNCTION FSWriteVerify (refNum: Integer;\n\t\t\t\t\t\t\t\t\tVAR count: LongInt;\n\t\t\t\t\t\t\t\t\tbuffPtr: Ptr): OSErr;\n\n\tFUNCTION CopyFork (srcRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdstRefNum: Integer;\n\t\t\t\t\t\t\t\t\tcopyBufferPtr: Ptr;\n\t\t\t\t\t\t\t\t\tcopyBufferSize: LongInt): OSErr;\n\n\tFUNCTION GetFileLocation (refNum: Integer;\n\t\t\t\t\t\t\t\t\tVAR vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tVAR dirID: LongInt;\n\t\t\t\t\t\t\t\t\tfileName: StringPtr): OSErr;\n\n\tFUNCTION FSpGetFileLocation (refNum: Integer;\n\t\t\t\t\t\t\t\t\tVAR spec: FSSpec): OSErr;\n\n\tFUNCTION CopyDirectoryAccess (srcVRefNum: Integer;\n\t\t\t\t\t\t\t\t\tsrcDirID: LongInt;\n\t\t\t\t\t\t\t\t\tsrcName: StringPtr;\n\t\t\t\t\t\t\t\t\tdstVRefNum: Integer;\n\t\t\t\t\t\t\t\t\tdstDirID: LongInt;\n\t\t\t\t\t\t\t\t\tdstName: StringPtr): OSErr;\n\n\tFUNCTION FSpCopyDirectoryAccess ({CONST}\n\t\t\t\t\t\t\t\t\tVAR srcSpec: FSSpec;\n\t\t\t\t\t\t\t\t\t{CONST}\n\t\t\t\t\t\t\t\t\tVAR dstSpec: FSSpec): OSErr;\n\n\tFUNCTION HMoveRenameCompat (vRefNum: Integer;\n\t\t\t\t\t\t\t\t\tsrcDirID: LongInt;\n\t\t\t\t\t\t\t\t\tsrcName: Str255;\n\t\t\t\t\t\t\t\t\tdstDirID: LongInt;\n\t\t\t\t\t\t\t\t\tdstpathName: StringPtr;\n\t\t\t\t\t\t\t\t\tcopyName: StringPtr): OSErr;\n\n\tFUNCTION FSpMoveRenameCompat ({CONST}\n\t\t\t\t\t\t\t\t\tVAR srcSpec: FSSpec;\n\t\t\t\t\t\t\t\t\t{CONST}\n\t\t\t\t\t\t\t\t\tVAR dstSpec: FSSpec;\n\t\t\t\t\t\t\t\t\tcopyName: StringPtr): OSErr;\n\n\tFUNCTION BuildAFPVolMountInfo (flags: Integer;\n\t\t\t\t\t\t\t\t\tnbpInterval: SignedByte;\n\t\t\t\t\t\t\t\t\tnbpCount: SignedByte;\n\t\t\t\t\t\t\t\t\tuamType: Integer;\n\t\t\t\t\t\t\t\t\tzoneName: Str32;\n\t\t\t\t\t\t\t\t\tserverName: Str32;\n\t\t\t\t\t\t\t\t\tvolName: Str27;\n\t\t\t\t\t\t\t\t\tuserName: Str31;\n\t\t\t\t\t\t\t\t\tuserPassword: Str8;\n\t\t\t\t\t\t\t\t\tvolPassword: Str8;\n\t\t\t\t\t\t\t\t\tVAR afpInfoPtr: MyAFPVolMountInfoPtr): OSErr;\n\n\tFUNCTION RetrieveAFPVolMountInfo (afpInfoPtr: AFPVolMountInfoPtr;\n\t\t\t\t\t\t\t\t\tVAR flags: Integer;\n\t\t\t\t\t\t\t\t\tVAR uamType: Integer;\n\t\t\t\t\t\t\t\t\tzoneName: StringPtr;\n\t\t\t\t\t\t\t\t\tserverName: StringPtr;\n\t\t\t\t\t\t\t\t\tvolName: StringPtr;\n\t\t\t\t\t\t\t\t\tuserName: StringPtr): OSErr;\n\n\tFUNCTION BuildAFPXVolMountInfo (flags: Integer;\n\t\t\t\t\t\t\t\t\tnbpInterval: SignedByte;\n\t\t\t\t\t\t\t\t\tnbpCount: SignedByte;\n\t\t\t\t\t\t\t\t\tuamType: Integer;\n\t\t\t\t\t\t\t\t\tzoneName: Str32;\n\t\t\t\t\t\t\t\t\tserverName: Str32;\n\t\t\t\t\t\t\t\t\tvolName: Str27;\n\t\t\t\t\t\t\t\t\tuserName: Str31;\n\t\t\t\t\t\t\t\t\tuserPassword: Str8;\n\t\t\t\t\t\t\t\t\tvolPassword: Str8;\n\t\t\t\t\t\t\t\t\tuamName: Str32;\n\t\t\t\t\t\t\t\t\talternateAddressLength: LongInt;\n\t\t\t\t\t\t\t\t\talternateAddress: Ptr;\n\t\t\t\t\t\t\t\t\tVAR afpXInfoPtr: AFPXVolMountInfoPtr): OSErr;\n\n\tFUNCTION RetrieveAFPXVolMountInfo(afpXInfoPtr: AFPXVolMountInfoPtr;\n\t\t\t\t\t\t\t\t\tVAR flags: Integer;\n\t\t\t\t\t\t\t\t\tVAR uamType: Integer;\n\t\t\t\t\t\t\t\t\tzoneName: StringPtr;\n\t\t\t\t\t\t\t\t\tserverName: StringPtr;\n\t\t\t\t\t\t\t\t\tvolName: StringPtr;\n\t\t\t\t\t\t\t\t\tuserName: StringPtr;\n\t\t\t\t\t\t\t\t\tuamName: StringPtr;\n\t\t\t\t\t\t\t\t\tVAR alternateAddressLength: LongInt;\n\t\t\t\t\t\t\t\t\tVAR\talternateAddress: AFPAlternateAddressPtr): OSErr;\n\n\tFUNCTION GetUGEntries (objType: Integer;\n\t\t\t\t\t\t\t\t\tentries: UGEntryPtr;\n\t\t\t\t\t\t\t\t\treqEntryCount: LongInt;\n\t\t\t\t\t\t\t\t\tVAR actEntryCount: LongInt;\n\t\t\t\t\t\t\t\t\tVAR objID: LongInt): OSErr;\n\n\n{***************************************************************************}\n\n\nIMPLEMENTATION\n\n\t{\tFunctions to get information out of GetVolParmsInfoBuffer.\t}\n\t\n\tFUNCTION GetVolParmsInfoVersion(VAR volParms: GetVolParmsInfoBuffer): INTEGER;\n\tBEGIN\n\t\tGetVolParmsInfoVersion := volParms.vMVersion;\n\tEND;\n\t\n\tFUNCTION GetVolParmsInfoAttrib(VAR volParms: GetVolParmsInfoBuffer): LONGINT;\n\tBEGIN\n\t\tGetVolParmsInfoAttrib := volParms.vMAttrib;\n\tEND;\n\t\n\tFUNCTION GetVolParmsInfoLocalHand(VAR volParms: GetVolParmsInfoBuffer): Handle;\n\tBEGIN\n\t\tGetVolParmsInfoLocalHand := volParms.vMLocalHand;\n\tEND;\n\t\n\tFUNCTION GetVolParmsInfoServerAdr(VAR volParms: GetVolParmsInfoBuffer): LONGINT;\n\tBEGIN\n\t\tGetVolParmsInfoServerAdr := volParms.vMServerAdr;\n\tEND;\n\n\tFUNCTION GetVolParmsInfoVolumeGrade(VAR volParms: GetVolParmsInfoBuffer): LONGINT;\n\tBEGIN\n\t\tIF volParms.vMVersion >= 2\n\t\t\tTHEN\n\t\t\t\tGetVolParmsInfoVolumeGrade := volParms.vMVolumeGrade\n\t\t\tELSE\n\t\t\t\tGetVolParmsInfoVolumeGrade := 0;\n\tEND;\n\t\n\tFUNCTION GetVolParmsInfoForeignPrivID(VAR volParms: GetVolParmsInfoBuffer): INTEGER;\n\tBEGIN\n\t\tIF volParms.vMVersion >= 2\n\t\t\tTHEN\n\t\t\t\tGetVolParmsInfoForeignPrivID := volParms.vMForeignPrivID\n\t\t\tELSE\n\t\t\t\tGetVolParmsInfoForeignPrivID := 0;\n\tEND;\n\t\n\tFUNCTION GetVolParmsInfoExtendedAttributes(VAR volParms: GetVolParmsInfoBuffer): LONGINT;\n\tBEGIN\n\t\tIF volParms.vMVersion >= 3\n\t\t\tTHEN\n\t\t\t\tGetVolParmsInfoExtendedAttributes := volParms.vMExtendedAttributes\n\t\t\tELSE\n\t\t\t\tGetVolParmsInfoExtendedAttributes := 0;\n\tEND;\n\t\n\tFUNCTION isNetworkVolume (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\tisNetworkVolume := (volParms.vMServerAdr <> 0);\n\tEND;\n\n\tFUNCTION hasLimitFCBs (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\thasLimitFCBs := BTST(volParms.vMAttrib, bLimitFCBs);\n\tEND;\n\n\tFUNCTION hasLocalWList (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\thasLocalWList := BTST(volParms.vMAttrib, bLocalWList);\n\tEND;\n\n\tFUNCTION hasNoMiniFndr (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\thasNoMiniFndr := BTST(volParms.vMAttrib, bNoMiniFndr);\n\tEND;\n\n\tFUNCTION hasNoVNEdit (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\thasNoVNEdit := BTST(volParms.vMAttrib, bNoVNEdit);\n\tEND;\n\n\tFUNCTION hasNoLclSync (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\thasNoLclSync := BTST(volParms.vMAttrib, bNoLclSync);\n\tEND;\n\n\tFUNCTION hasTrshOffLine (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\thasTrshOffLine := BTST(volParms.vMAttrib, bTrshOffLine);\n\tEND;\n\n\tFUNCTION hasNoSwitchTo (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\thasNoSwitchTo := BTST(volParms.vMAttrib, bNoSwitchTo);\n\tEND;\n\n\tFUNCTION hasNoDeskItems (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\thasNoDeskItems := BTST(volParms.vMAttrib, bNoDeskItems);\n\tEND;\n\n\tFUNCTION hasNoBootBlks (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\thasNoBootBlks := BTST(volParms.vMAttrib, bNoBootBlks);\n\tEND;\n\n\tFUNCTION hasAccessCntl (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\thasAccessCntl := BTST(volParms.vMAttrib, bAccessCntl);\n\tEND;\n\n\tFUNCTION hasNoSysDir (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\thasNoSysDir := BTST(volParms.vMAttrib, bNoSysDir);\n\tEND;\n\n\tFUNCTION hasExtFSVol (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\thasExtFSVol := BTST(volParms.vMAttrib, bHasExtFSVol);\n\tEND;\n\n\tFUNCTION hasOpenDeny (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\thasOpenDeny := BTST(volParms.vMAttrib, bHasOpenDeny);\n\tEND;\n\n\tFUNCTION hasCopyFile (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\thasCopyFile := BTST(volParms.vMAttrib, bHasCopyFile);\n\tEND;\n\n\tFUNCTION hasMoveRename (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\thasMoveRename := BTST(volParms.vMAttrib, bHasMoveRename);\n\tEND;\n\n\tFUNCTION hasDesktopMgr (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\thasDesktopMgr := BTST(volParms.vMAttrib, bHasDesktopMgr);\n\tEND;\n\n\tFUNCTION hasShortName (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\thasShortName := BTST(volParms.vMAttrib, bHasShortName);\n\tEND;\n\n\tFUNCTION hasFolderLock (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\thasFolderLock := BTST(volParms.vMAttrib, bHasFolderLock);\n\tEND;\n\n\tFUNCTION hasPersonalAccessPrivileges (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\thasPersonalAccessPrivileges := BTST(volParms.vMAttrib, bHasPersonalAccessPrivileges);\n\tEND;\n\n\tFUNCTION hasUserGroupList (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\thasUserGroupList := BTST(volParms.vMAttrib, bHasUserGroupList);\n\tEND;\n\n\tFUNCTION hasCatSearch (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\thasCatSearch := BTST(volParms.vMAttrib, bHasCatSearch);\n\tEND;\n\n\tFUNCTION hasFileIDs (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\thasFileIDs := BTST(volParms.vMAttrib, bHasFileIDs);\n\tEND;\n\n\tFUNCTION hasBTreeMgr (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\thasBTreeMgr := BTST(volParms.vMAttrib, bHasBTreeMgr);\n\tEND;\n\n\tFUNCTION hasBlankAccessPrivileges (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\thasBlankAccessPrivileges := BTST(volParms.vMAttrib, bHasBlankAccessPrivileges);\n\tEND;\n\n\tFUNCTION supportsAsyncRequests (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\tsupportsAsyncRequests := BTST(volParms.vMAttrib, bSupportsAsyncRequests);\n\tEND;\n\n\tFUNCTION supportsTrashVolumeCache (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\tsupportsTrashVolumeCache := BTST(volParms.vMAttrib, bSupportsTrashVolumeCache);\n\tEND;\n\n\tFUNCTION volIsEjectable (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\tvolIsEjectable := BTST(GetVolParmsInfoExtendedAttributes(volParms), bIsEjectable);\n\tEND;\n\t\n\tFUNCTION volSupportsHFSPlusAPIs (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\tvolSupportsHFSPlusAPIs := BTST(GetVolParmsInfoExtendedAttributes(volParms), bSupportsHFSPlusAPIs);\n\tEND;\n\t\n\tFUNCTION volSupportsFSCatalogSearch (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\tvolSupportsFSCatalogSearch := BTST(GetVolParmsInfoExtendedAttributes(volParms), bSupportsFSCatalogSearch);\n\tEND;\n\t\n\tFUNCTION volSupportsFSExchangeObjects (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\tvolSupportsFSExchangeObjects := BTST(GetVolParmsInfoExtendedAttributes(volParms), bSupportsFSExchangeObjects);\n\tEND;\n\t\n\tFUNCTION volSupports2TBFiles (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\tvolSupports2TBFiles := BTST(GetVolParmsInfoExtendedAttributes(volParms), bSupports2TBFiles);\n\tEND;\n\t\n\tFUNCTION volSupportsLongNames (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\tvolSupportsLongNames := BTST(GetVolParmsInfoExtendedAttributes(volParms), bSupportsLongNames);\n\tEND;\n\t\n\tFUNCTION volSupportsMultiScriptNames (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\tvolSupportsMultiScriptNames := BTST(GetVolParmsInfoExtendedAttributes(volParms), bSupportsMultiScriptNames);\n\tEND;\n\t\n\tFUNCTION volSupportsNamedForks (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\tvolSupportsNamedForks := BTST(GetVolParmsInfoExtendedAttributes(volParms), bSupportsNamedForks);\n\tEND;\n\t\n\tFUNCTION volSupportsSubtreeIterators (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\tvolSupportsSubtreeIterators := BTST(GetVolParmsInfoExtendedAttributes(volParms), bSupportsSubtreeIterators);\n\tEND;\n\t\n\tFUNCTION volL2PCanMapFileBlocks (VAR volParms: GetVolParmsInfoBuffer): Boolean;\n\tBEGIN\n\t\tvolL2PCanMapFileBlocks := BTST(GetVolParmsInfoExtendedAttributes(volParms), bL2PCanMapFileBlocks);\n\tEND;\n\t\n\t{\tFunctions for testing ioACUser bits.\t}\n\n\tFUNCTION userIsOwner (ioACUser: SInt8): Boolean;\n\tBEGIN\n\t\tuserIsOwner := NOT (BTST(ioACUser, kioACUserNotOwnerMask));\n\tEND;\n\n\tFUNCTION userHasFullAccess (ioACUser: SInt8): Boolean;\n\tBEGIN\n\t\tuserHasFullAccess := BAND(ioACUser, acUserAccessMask) = acUserFull;\n\tEND;\n\n\tFUNCTION userHasDropBoxAccess (ioACUser: SInt8): Boolean;\n\tBEGIN\n\t\tuserHasDropBoxAccess := BAND(ioACUser, acUserAccessMask) = acUserDropBox;\n\tEND;\n\n\tFUNCTION userHasBulletinBoard (ioACUser: SInt8): Boolean;\n\tBEGIN\n\t\tuserHasBulletinBoard := BAND(ioACUser, acUserAccessMask) = acUserBulletinBoard;\n\tEND;\n\n\tFUNCTION userHasNoAccess (ioACUser: SInt8): Boolean;\n\tBEGIN\n\t\tuserHasNoAccess := BAND(ioACUser, acUserAccessMask) = acUserNone;\n\tEND;\n\n\nEND."
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/MoreFiles 1.5/PascalInterfaces/Search.p",
    "content": "UNIT Search;\n\n{\tApple Macintosh Developer Technical Support\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tIndexedSearch and the PBCatSearch compatibility function.\t\t\t\t}\n{\tby Jim Luther, Apple Developer Technical Support Emeritus\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tFile:\t\tSearch.p\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tCopyright  1992-1999 Apple Computer, Inc.\t\t\t\t\t\t\t\t}\n{\tAll rights reserved.\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n{\tYou may incorporate this sample code into your applications without\t\t}\n{\trestriction, though the sample code has been provided \"AS IS\" and the\t}\n{\tresponsibility for its operation is 100% yours.  However, what you are\t}\n{\tnot permitted to do is to redistribute the source as \"DSC Sample Code\"\t}\n{\tafter having made changes. If you're going to re-distribute the source,\t}\n{\twe require that you make it clear in the source that the code was\t\t}\n{\tdescended from Apple Sample Code, but that you've made changes.\t\t\t}\n\n\nINTERFACE\n\n\tUSES\n\t\tTypes, Files;\n\n{***************************************************************************}\n\n\n\tFUNCTION IndexedSearch (pb: HParmBlkPtr;\n\t\t\t\t\t\t\t\t\tdirID: LongInt): OSErr;\n\n\tFUNCTION PBCatSearchSyncCompat (paramBlock: HParmBlkPtr): OSErr;\n\n\tFUNCTION NameFileSearch (volName: StringPtr;\n\t\t\t\t\t\t\t\t\tvRefNum: Integer;\n\t\t\t\t\t\t\t\t\tfileName: Str255;\n\t\t\t\t\t\t\t\t\tmatches: FSSpecPtr;\n\t\t\t\t\t\t\t\t\treqMatchCount: LongInt;\n\t\t\t\t\t\t\t\t\tVAR actMatchCount: LongInt;\n\t\t\t\t\t\t\t\t\tnewSearch: Boolean;\n\t\t\t\t\t\t\t\t\tpartial: Boolean): OSErr;\n\n\tFUNCTION CreatorTypeFileSearch (volName: StringPtr;\n\t\t\t\t\t\t\t\t\tvRefNum: Integer;\n\t\t\t\t\t\t\t\t\tcreator: OSType;\n\t\t\t\t\t\t\t\t\tfileType: OSType;\n\t\t\t\t\t\t\t\t\tmatches: FSSpecPtr;\n\t\t\t\t\t\t\t\t\treqMatchCount: LongInt;\n\t\t\t\t\t\t\t\t\tVAR actMatchCount: LongInt;\n\t\t\t\t\t\t\t\t\tnewSearch: Boolean): OSErr;\n\n\n{***************************************************************************}\n\n\nIMPLEMENTATION\n\nEND."
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/MoreFiles 1.5/Sources/DirectoryCopy.c",
    "content": "/*\n**\tApple Macintosh Developer Technical Support\n**\n**\tDirectoryCopy: A robust, general purpose directory copy routine.\n**\n**\tby Jim Luther, Apple Developer Technical Support Emeritus\n**\n**\tFile:\t\tDirectoryCopy.c\n**\n**\tCopyright  1992-1999 Apple Computer, Inc.\n**\tAll rights reserved.\n**\n**\tYou may incorporate this sample code into your applications without\n**\trestriction, though the sample code has been provided \"AS IS\" and the\n**\tresponsibility for its operation is 100% yours.  However, what you are\n**\tnot permitted to do is to redistribute the source as \"DSC Sample Code\"\n**\tafter having made changes. If you're going to re-distribute the source,\n**\twe require that you make it clear in the source that the code was\n**\tdescended from Apple Sample Code, but that you've made changes.\n*/\n\n#include <Types.h>\n#include <Errors.h>\n#include <Memory.h>\n#include <Files.h>\n#include <Script.h>\n#include <Math64.h>\n\n#define\t__COMPILINGMOREFILES\n\n#include \"MoreFiles.h\"\n#include \"MoreFilesExtras.h\"\n#include \"MoreDesktopMgr.h\"\n#include \"FileCopy.h\"\n#include \"DirectoryCopy.h\"\n\n/*****************************************************************************/\n\n/* local constants */\n\nenum\n{\n\tdirCopyBigCopyBuffSize  = 0x00004000,\n\tdirCopyMinCopyBuffSize  = 0x00000200\n};\n\n\n/*****************************************************************************/\n\n/* local data structures */\n\n/* The EnumerateGlobals structure is used to minimize the amount of\n** stack space used when recursively calling CopyLevel and to hold\n** global information that might be needed at any time. */\n\n#if PRAGMA_STRUCT_ALIGN\n#pragma options align=mac68k\n#endif\nstruct EnumerateGlobals\n{\n\tPtr\t\t\tcopyBuffer;\t\t\t/* pointer to buffer used for file copy operations */\n\tlong\t\tbufferSize;\t\t\t/* the size of the copy buffer */\n\tCopyErrProcPtr errorHandler;\t/* pointer to error handling function */\n\tCopyFilterProcPtr copyFilterProc; /* pointer to filter function */\n\tOSErr\t\terror;\t\t\t\t/* temporary holder of results - saves 2 bytes of stack each level */\n\tBoolean\t\tbailout;\t\t\t/* set to true to by error handling function if fatal error */\n\tshort\t\tdestinationVRefNum;\t/* the destination vRefNum */\n\tStr63\t\titemName;\t\t\t/* the name of the current item */\n\tCInfoPBRec\tmyCPB;\t\t\t\t/* the parameter block used for PBGetCatInfo calls */\n};\n#if PRAGMA_STRUCT_ALIGN\n#pragma options align=reset\n#endif\n\ntypedef struct EnumerateGlobals EnumerateGlobals;\ntypedef EnumerateGlobals *EnumerateGlobalsPtr;\n\n\n/* The PreflightGlobals structure is used to minimize the amount of\n** stack space used when recursively calling GetLevelSize and to hold\n** global information that might be needed at any time. */\n\n#if PRAGMA_STRUCT_ALIGN\n#pragma options align=mac68k\n#endif\nstruct PreflightGlobals\n{\n\tOSErr\t\t\tresult;\t\t\t\t/* temporary holder of results - saves 2 bytes of stack each level */\n\tStr63\t\t\titemName;\t\t\t/* the name of the current item */\n\tCInfoPBRec\t\tmyCPB;\t\t\t\t/* the parameter block used for PBGetCatInfo calls */\n\n\tunsigned long\tdstBlksPerAllocBlk;\t/* the number of 512 byte blocks per allocation block on destination */\n\t\t\t\t\t\t\t\t\t\t\n\tunsigned long\tallocBlksNeeded;\t/* the total number of allocation blocks needed  */\n\n\tunsigned long\ttempBlocks;\t\t\t/* temporary storage for calculations (save some stack space)  */\n\tCopyFilterProcPtr copyFilterProc;\t/* pointer to filter function */\n};\n#if PRAGMA_STRUCT_ALIGN\n#pragma options align=reset\n#endif\n\ntypedef struct PreflightGlobals PreflightGlobals;\ntypedef PreflightGlobals *PreflightGlobalsPtr;\n\n/*****************************************************************************/\n\n/* static prototypes */\n\nstatic\tvoid\tGetLevelSize(long currentDirID,\n\t\t\t\t\t\t\t PreflightGlobals *theGlobals);\n\nstatic\tOSErr\tPreflightDirectoryCopySpace(short srcVRefNum,\n\t\t\t\t\t\t\t\t\t\t\tlong srcDirID,\n\t\t\t\t\t\t\t\t\t\t\tshort dstVRefNum,\n\t\t\t\t\t\t\t\t\t\t\tCopyFilterProcPtr copyFilterProc,\n\t\t\t\t\t\t\t\t\t\t\tBoolean *spaceOK);\n\nstatic\tvoid\tCopyLevel(long sourceDirID,\n\t\t\t\t\t\t  long dstDirID,\n\t\t\t\t\t\t  EnumerateGlobals *theGlobals);\n\t\t\t\t\t\t  \n/*****************************************************************************/\n\nstatic\tvoid\tGetLevelSize(long currentDirID,\n\t\t\t\t\t\t\t PreflightGlobals *theGlobals)\n{\n\tshort\tindex = 1;\n\t\n\tdo\n\t{\n\t\ttheGlobals->myCPB.dirInfo.ioFDirIndex = index;\n\t\ttheGlobals->myCPB.dirInfo.ioDrDirID = currentDirID;\t/* we need to do this every time */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* through, since GetCatInfo  */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* returns ioFlNum in this field */\n\t\ttheGlobals->result = PBGetCatInfoSync(&theGlobals->myCPB);\n\t\tif ( theGlobals->result == noErr )\n\t\t{\n\t\t\tif ( (theGlobals->copyFilterProc == NULL) ||\n\t\t\t\t CallCopyFilterProc(theGlobals->copyFilterProc, &theGlobals->myCPB) ) /* filter if filter proc was supplied */\n\t\t\t{\n\t\t\t\t/* Either there's no filter proc OR the filter proc says to use this item */\n\t\t\t\tif ( (theGlobals->myCPB.dirInfo.ioFlAttrib & kioFlAttribDirMask) != 0 )\n\t\t\t\t{\n\t\t\t\t\t/* we have a directory */\n\t\t\t\t\t\n\t\t\t\t\tGetLevelSize(theGlobals->myCPB.dirInfo.ioDrDirID, theGlobals); /* recurse */\n\t\t\t\t\ttheGlobals->result = noErr; /* clear error return on way back */\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t/* We have a file - add its allocation blocks to allocBlksNeeded. */\n\t\t\t\t\t/* Since space on Mac OS disks is always allocated in allocation blocks, */\n\t\t\t\t\t/* this takes into account rounding up to the end of an allocation block. */\n\t\t\t\t\t\n\t\t\t\t\t/* get number of 512-byte blocks needed for data fork */\n\t\t\t\t\tif ( ((unsigned long)theGlobals->myCPB.hFileInfo.ioFlLgLen & 0x000001ff) != 0 )\n\t\t\t\t\t{\n\t\t\t\t\t\ttheGlobals->tempBlocks = ((unsigned long)theGlobals->myCPB.hFileInfo.ioFlLgLen >> 9) + 1;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\ttheGlobals->tempBlocks = (unsigned long)theGlobals->myCPB.hFileInfo.ioFlLgLen >> 9;\n\t\t\t\t\t}\n\t\t\t\t\t/* now, calculate number of new allocation blocks needed for the data fork and add it to the total */\n\t\t\t\t\tif ( theGlobals->tempBlocks % theGlobals->dstBlksPerAllocBlk )\n\t\t\t\t\t{\n\t\t\t\t\t\ttheGlobals->allocBlksNeeded += (theGlobals->tempBlocks / theGlobals->dstBlksPerAllocBlk) + 1;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\ttheGlobals->allocBlksNeeded += theGlobals->tempBlocks / theGlobals->dstBlksPerAllocBlk;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t/* get number of 512-byte blocks needed for resource fork */\n\t\t\t\t\tif ( ((unsigned long)theGlobals->myCPB.hFileInfo.ioFlRLgLen & 0x000001ff) != 0 )\n\t\t\t\t\t{\n\t\t\t\t\t\ttheGlobals->tempBlocks = ((unsigned long)theGlobals->myCPB.hFileInfo.ioFlRLgLen >> 9) + 1;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\ttheGlobals->tempBlocks = (unsigned long)theGlobals->myCPB.hFileInfo.ioFlRLgLen >> 9;\n\t\t\t\t\t}\n\t\t\t\t\t/* now, calculate number of new allocation blocks needed for the resource  fork and add it to the total */\n\t\t\t\t\tif ( theGlobals->tempBlocks % theGlobals->dstBlksPerAllocBlk )\n\t\t\t\t\t{\n\t\t\t\t\t\ttheGlobals->allocBlksNeeded += (theGlobals->tempBlocks / theGlobals->dstBlksPerAllocBlk) + 1;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\ttheGlobals->allocBlksNeeded += theGlobals->tempBlocks / theGlobals->dstBlksPerAllocBlk;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t++index;\n\t} while ( theGlobals->result == noErr );\n}\n\n/*****************************************************************************/\n\nstatic\tOSErr\tPreflightDirectoryCopySpace(short srcVRefNum,\n\t\t\t\t\t\t\t\t\t\t\tlong srcDirID,\n\t\t\t\t\t\t\t\t\t\t\tshort dstVRefNum,\n\t\t\t\t\t\t\t\t\t\t\tCopyFilterProcPtr copyFilterProc,\n\t\t\t\t\t\t\t\t\t\t\tBoolean *spaceOK)\n{\n\tXVolumeParam pb;\n\tOSErr error;\n\tunsigned long dstFreeBlocks;\n\tPreflightGlobals theGlobals;\n\t\n\terror = XGetVolumeInfoNoName(NULL, dstVRefNum, &pb);\n\tif ( error == noErr )\n\t{\n\t\t/* Convert freeBytes to free disk blocks (512-byte blocks) */\n\t\tdstFreeBlocks = U32SetU(U64ShiftRight(pb.ioVFreeBytes, 9));\n\t\t\n\t\t/* get allocation block size (always multiple of 512) and divide by 512\n\t\t  to get number of 512-byte blocks per allocation block */\n\t\ttheGlobals.dstBlksPerAllocBlk = ((unsigned long)pb.ioVAlBlkSiz >> 9);\n\t\t\n\t\ttheGlobals.allocBlksNeeded = 0;\n\n\t\ttheGlobals.myCPB.dirInfo.ioNamePtr = theGlobals.itemName;\n\t\ttheGlobals.myCPB.dirInfo.ioVRefNum = srcVRefNum;\n\t\t\n\t\ttheGlobals.copyFilterProc = copyFilterProc;\n\t\t\n\t\tGetLevelSize(srcDirID, &theGlobals);\n\t\t\n\t\t/* Is there enough room on the destination volume for the source file?\t\t\t\t\t*/\n\t\t/* Note:\tThis will work because the largest number of disk blocks supported\t\t\t*/\n\t\t/*\t\t\ton a 2TB volume is 0xffffffff and (allocBlksNeeded * dstBlksPerAllocBlk)\t*/\n\t\t/*\t\t\twill always be less than 0xffffffff.\t\t\t\t\t\t\t\t\t\t*/\n\t\t*spaceOK = ((theGlobals.allocBlksNeeded * theGlobals.dstBlksPerAllocBlk) <= dstFreeBlocks);\n\t}\n\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\nstatic\tvoid\tCopyLevel(long sourceDirID,\n\t\t\t\t\t\t  long dstDirID,\n\t\t\t\t\t\t  EnumerateGlobals *theGlobals)\n{\n\tlong currentSrcDirID;\n\tlong newDirID;\n\tshort index = 1;\n\t\n\tdo\n\t{\t\n\t\t/* Get next source item at the current directory level */\n\t\t\n\t\ttheGlobals->myCPB.dirInfo.ioFDirIndex = index;\n\t\ttheGlobals->myCPB.dirInfo.ioDrDirID = sourceDirID;\n\t\ttheGlobals->error = PBGetCatInfoSync(&theGlobals->myCPB);\t\t\n\n\t\tif ( theGlobals->error == noErr )\n\t\t{\n\t\t\tif ( (theGlobals->copyFilterProc == NULL) ||\n\t\t\t\t CallCopyFilterProc(theGlobals->copyFilterProc, &theGlobals->myCPB) ) /* filter if filter proc was supplied */\n\t\t\t{\n\t\t\t\t/* Either there's no filter proc OR the filter proc says to use this item */\n\n\t\t\t\t/* We have an item.  Is it a file or directory? */\n\t\t\t\tif ( (theGlobals->myCPB.hFileInfo.ioFlAttrib & kioFlAttribDirMask) != 0 )\n\t\t\t\t{\n\t\t\t\t\t/* We have a directory */\n\t\t\t\t\t\n\t\t\t\t\t/* Create a new directory at the destination. No errors allowed! */\n\t\t\t\t\ttheGlobals->error = DirCreate(theGlobals->destinationVRefNum, dstDirID, theGlobals->itemName, &newDirID);\n\t\t\t\t\tif ( theGlobals->error == noErr )\n\t\t\t\t\t{\n\t\t\t\t\t\t/* Save the current source directory ID where we can get it when we come back\n\t\t\t\t\t\t** from recursion land. */\n\t\t\t\t\t\tcurrentSrcDirID = theGlobals->myCPB.dirInfo.ioDrDirID;\n\t\t\t\t\t\t\n\t\t\t\t\t\t/* Dive again (copy the directory level we just found below this one) */\n\t\t\t\t\t\tCopyLevel(theGlobals->myCPB.dirInfo.ioDrDirID, newDirID, theGlobals);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( !theGlobals->bailout )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/* Copy comment from old to new directory. */\n\t\t\t\t\t\t\t/* Ignore the result because we really don't care if it worked or not. */\n\t\t\t\t\t\t\t(void) DTCopyComment(theGlobals->myCPB.dirInfo.ioVRefNum, currentSrcDirID, NULL, theGlobals->destinationVRefNum, newDirID, NULL);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* Copy directory attributes (dates, etc.) to newDirID. */\n\t\t\t\t\t\t\t/* No errors allowed */\n\t\t\t\t\t\t\ttheGlobals->error = CopyFileMgrAttributes(theGlobals->myCPB.dirInfo.ioVRefNum, currentSrcDirID, NULL, theGlobals->destinationVRefNum, newDirID, NULL, true);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* handle any errors from CopyFileMgrAttributes */\n\t\t\t\t\t\t\tif ( theGlobals->error != noErr )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ( theGlobals->errorHandler != NULL )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ttheGlobals->bailout =  CallCopyErrProc(theGlobals->errorHandler, theGlobals->error, copyDirFMAttributesOp,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttheGlobals->myCPB.dirInfo.ioVRefNum, currentSrcDirID, NULL,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttheGlobals->destinationVRefNum, newDirID, NULL);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t/* If you don't handle the errors with an error handler, */\n\t\t\t\t\t\t\t\t\t/* then the copy stops here. */\n\t\t\t\t\t\t\t\t\ttheGlobals->bailout = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\t/* error handling for DirCreate */\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( theGlobals->errorHandler != NULL )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttheGlobals->bailout = CallCopyErrProc(theGlobals->errorHandler, theGlobals->error, dirCreateOp,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttheGlobals->myCPB.dirInfo.ioVRefNum, currentSrcDirID, NULL,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttheGlobals->destinationVRefNum, dstDirID, theGlobals->itemName);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/* If you don't handle the errors with an error handler, */\n\t\t\t\t\t\t\t/* then the copy stops here. */\n\t\t\t\t\t\t\ttheGlobals->bailout = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ( !theGlobals->bailout )\n\t\t\t\t\t{\n\t\t\t\t\t\t/* clear error return on way back if we aren't bailing out */\n\t\t\t\t\t\ttheGlobals->error = noErr;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t/* We have a file, so copy it */\n\t\t\t\t\t\n\t\t\t\t\ttheGlobals->error = FileCopy(theGlobals->myCPB.hFileInfo.ioVRefNum,\n\t\t\t\t\t\t\t\t\t\t\t\t theGlobals->myCPB.hFileInfo.ioFlParID,\n\t\t\t\t\t\t\t\t\t\t\t\t theGlobals->itemName,\n\t\t\t\t\t\t\t\t\t\t\t\t theGlobals->destinationVRefNum,\n\t\t\t\t\t\t\t\t\t\t\t\t dstDirID,\n\t\t\t\t\t\t\t\t\t\t\t\t NULL,\n\t\t\t\t\t\t\t\t\t\t\t\t NULL,\n\t\t\t\t\t\t\t\t\t\t\t\t theGlobals->copyBuffer,\n\t\t\t\t\t\t\t\t\t\t\t\t theGlobals->bufferSize,\n\t\t\t\t\t\t\t\t\t\t\t\t false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t/* handle any errors from FileCopy */\n\t\t\t\t\tif ( theGlobals->error != noErr )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( theGlobals->errorHandler != NULL )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttheGlobals->bailout = CallCopyErrProc(theGlobals->errorHandler, theGlobals->error, fileCopyOp,\n\t\t\t\t\t\t\t\t\t\t\t\t\ttheGlobals->myCPB.hFileInfo.ioVRefNum, theGlobals->myCPB.hFileInfo.ioFlParID, theGlobals->itemName,\n\t\t\t\t\t\t\t\t\t\t\t\t\ttheGlobals->destinationVRefNum, dstDirID, NULL);\n\t\t\t\t\t\t\tif ( !theGlobals->bailout )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* If the CopyErrProc handled the problem, clear the error here */\n\t\t\t\t\t\t\t\ttheGlobals->error = noErr;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/* If you don't handle the errors with an error handler, */\n\t\t\t\t\t\t\t/* then the copy stops here. */\n\t\t\t\t\t\t\ttheGlobals->bailout = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\t/* error handling for PBGetCatInfo */\n\t\t\t/* it's normal to get a fnfErr when indexing; that only means you've hit the end of the directory */\n\t\t\tif ( theGlobals->error != fnfErr )\n\t\t\t{\n\t\t\t\tif ( theGlobals->errorHandler != NULL )\n\t\t\t\t{ \n\t\t\t\t\ttheGlobals->bailout = CallCopyErrProc(theGlobals->errorHandler, theGlobals->error, getNextItemOp,\n\t\t\t\t\t\t\t\t\t\t\ttheGlobals->myCPB.dirInfo.ioVRefNum, sourceDirID, NULL, 0, 0, NULL);\n\t\t\t\t\tif ( !theGlobals->bailout )\n\t\t\t\t\t{\n\t\t\t\t\t\t/* If the CopyErrProc handled the problem, clear the error here */\n\t\t\t\t\t\ttheGlobals->error = noErr;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t/* If you don't handle the errors with an error handler, */\n\t\t\t\t\t/* then the copy stops here. */\n\t\t\t\t\ttheGlobals->bailout = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t++index; /* prepare to get next item */\n\t} while ( (theGlobals->error == noErr) && (!theGlobals->bailout) ); /* time to fall back a level? */\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFilteredDirectoryCopy(short srcVRefNum,\n\t\t\t\t\t\t\t\t\t  long srcDirID,\n\t\t\t\t\t\t\t\t\t  ConstStr255Param srcName,\n\t\t\t\t\t\t\t\t\t  short dstVRefNum,\n\t\t\t\t\t\t\t\t\t  long dstDirID,\n\t\t\t\t\t\t\t\t\t  ConstStr255Param dstName,\n\t\t\t\t\t\t\t\t\t  ConstStr255Param copyName,\n\t\t\t\t\t\t\t\t\t  void *copyBufferPtr,\n\t\t\t\t\t\t\t\t\t  long copyBufferSize,\n\t\t\t\t\t\t\t\t\t  Boolean preflight,\n\t\t\t\t\t\t\t\t\t  CopyErrProcPtr copyErrHandler,\n\t\t\t\t\t\t\t\t\t  CopyFilterProcPtr copyFilterProc)\n{\n\tEnumerateGlobals theGlobals;\n\tBoolean\tisDirectory;\n\tOSErr\terror;\n\tBoolean ourCopyBuffer = false;\n\tStr63\tsrcDirName, oldDiskName;\n\tBoolean spaceOK;\t\t\t\n\t\n\t/* Make sure a copy buffer is allocated. */\n\tif ( copyBufferPtr == NULL )\n\t{\n\t\t/* The caller didn't supply a copy buffer so grab one from the application heap.\n\t\t** Try to get a big copy buffer, if we can't, try for a 512-byte buffer.\n\t\t** If 512 bytes aren't available, we're in trouble. */\n\t\tcopyBufferSize = dirCopyBigCopyBuffSize;\n\t\tcopyBufferPtr = NewPtr(copyBufferSize);\n\t\tif ( copyBufferPtr == NULL )\n\t\t{\n\t\t\tcopyBufferSize = dirCopyMinCopyBuffSize;\n\t\t\tcopyBufferPtr = NewPtr(copyBufferSize);\n\t\t\tif ( copyBufferPtr == NULL )\n\t\t\t{\n\t\t\t\treturn ( memFullErr );\n\t\t\t}\n\t\t}\n\t\tourCopyBuffer = true;\n\t}\n\t\n\t/* Get the real dirID where we're copying from and make sure it is a directory. */\n\terror = GetDirectoryID(srcVRefNum, srcDirID, srcName, &srcDirID, &isDirectory);\n\tif ( error != noErr )\n\t{\n\t\tgoto ErrorExit;\n\t}\n\tif ( !isDirectory )\n\t{\n\t\terror = dirNFErr;\n\t\tgoto ErrorExit;\n\t}\n\t\n\t/* Special case destination if it is the root parent directory. */\n\t/* Since you can't create the root directory, this is needed if */\n\t/* you want to copy a directory's content to a disk's root directory. */\n\tif ( (dstDirID == fsRtParID) && (dstName == NULL) )\n\t{\n\t\tdstDirID = fsRtParID;\n\t\tisDirectory = true;\n\t\terror = noErr;\n\t}\n\telse\n\t{\n\t\t/*  Get the real dirID where we're going to put the copy and make sure it is a directory. */\n\t\terror = GetDirectoryID(dstVRefNum, dstDirID, dstName, &dstDirID, &isDirectory);\n\t\tif ( error != noErr )\n\t\t{\n\t\t\tgoto ErrorExit;\n\t\t}\n\t\tif ( !isDirectory )\n\t\t{\n\t\t\terror =  dirNFErr;\n\t\t\tgoto ErrorExit;\n\t\t}\n\t}\n\t\n\t/* Get the real vRefNum of both the source and destination */\n\terror = DetermineVRefNum(srcName, srcVRefNum, &srcVRefNum);\n\tif ( error != noErr )\n\t{\n\t\tgoto ErrorExit;\n\t}\n\terror = DetermineVRefNum(dstName, dstVRefNum, &dstVRefNum);\n\tif ( error != noErr )\n\t{\n\t\tgoto ErrorExit;\n\t}\n\t\n\tif ( preflight )\n\t{\n\t\terror = PreflightDirectoryCopySpace(srcVRefNum, srcDirID, dstVRefNum, copyFilterProc, &spaceOK);\n\t\tif ( error != noErr )\n\t\t{\n\t\t\tgoto ErrorExit;\n\t\t}\n\t\tif ( !spaceOK )\n\t\t{\n\t\t\terror = dskFulErr; /* not enough room on destination */\n\t\t\tgoto ErrorExit;\n\t\t}\n\t}\n\n\t/* Create the new directory in the destination directory with the */\n\t/* same name as the source directory. */\n\terror = GetDirName(srcVRefNum, srcDirID, srcDirName);\n\tif ( error != noErr )\n\t{\n\t\tgoto ErrorExit;\n\t}\n\t\n\t/* Again, special case destination if the destination is the */\n\t/* root parent directory. This time, we'll rename the disk to */\n\t/* the source directory name. */\n\tif ( dstDirID == fsRtParID )\n\t{\n\t\t/* Get the current name of the destination disk */\n\t\terror = GetDirName(dstVRefNum, fsRtDirID, oldDiskName);\n\t\tif ( error == noErr )\t\n\t\t{\n\t\t\t/* use the copyName as srcDirName if supplied */\n\t\t\tif ( copyName != NULL )\n\t\t\t{\n\t\t\t\t/* make a copy since copyName is a const input */\n\t\t\t\tBlockMoveData(copyName, srcDirName, sizeof(Str31));\n\t\t\t}\n\t\t\t/* Shorten the name if it's too long to be the volume name */\n\t\t\tTruncPString(srcDirName, srcDirName, 27);\n\t\t\t\n\t\t\t/* Rename the disk */\n\t\t\terror = HRename(dstVRefNum, fsRtParID, oldDiskName, srcDirName);\n\t\t\t\n\t\t\t/* and copy to the root directory */\n\t\t\tdstDirID = fsRtDirID;\n\t\t}\n\t}\n\telse\n\t{\n\t\t/* use the copyName as srcDirName if supplied */\n\t\terror = DirCreate(dstVRefNum, dstDirID, ((copyName != NULL) ? copyName : srcDirName), &dstDirID);\n\t}\n\tif ( error != noErr )\n\t{\n\t\t/* handle any errors from DirCreate */\n\t\tif ( copyErrHandler != NULL )\n\t\t{\n\t\t\tif ( CallCopyErrProc(copyErrHandler, error, dirCreateOp,\n\t\t\t\t\t\t\t\t\t\t\t\t\tsrcVRefNum, srcDirID, NULL,\n\t\t\t\t\t\t\t\t\t\t\t\t\tdstVRefNum, dstDirID, srcDirName) )\n\t\t\t{\n\t\t\t\tgoto ErrorExit;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tBoolean\tisDirectory;// JMM for Squeak\n\t\t\t\t/* If the CopyErrProc handled the problem, clear the error here */\n\t\t\t\t/* and continue */\n\t\t\t\tGetDirectoryID(dstVRefNum, dstDirID, ((copyName != NULL) ? copyName : srcDirName), &dstDirID, &isDirectory);\n\t\t\t\terror = noErr;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* If you don't handle the errors with an error handler, */\n\t\t\t/* then the copy stops here. */\n\t\t\tgoto ErrorExit;\n\t\t}\n\t}\n\t\n\t/* dstDirID is now the newly created directory! */\n\t\t\n\t/* Set up the globals we need to access from the recursive routine. */\n\ttheGlobals.copyBuffer = (Ptr)copyBufferPtr;\n\ttheGlobals.bufferSize = copyBufferSize;\n\ttheGlobals.destinationVRefNum = dstVRefNum; /* so we can get to it always */\n\ttheGlobals.myCPB.hFileInfo.ioNamePtr = (StringPtr)&theGlobals.itemName;\n\ttheGlobals.myCPB.hFileInfo.ioVRefNum = srcVRefNum;\n\ttheGlobals.errorHandler = copyErrHandler;\n\ttheGlobals.bailout = false;\n\ttheGlobals.copyFilterProc =  copyFilterProc;\n\t\t\n\t/* Here we go into recursion land... */\n\tCopyLevel(srcDirID, dstDirID, &theGlobals);\n\terror = theGlobals.error;\t/* get the result */\n\t\n\tif ( !theGlobals.bailout )\n\t{\n\t\t/* Copy comment from source to destination directory. */\n\t\t/* Ignore the result because we really don't care if it worked or not. */\n\t\t(void) DTCopyComment(srcVRefNum, srcDirID, NULL, dstVRefNum, dstDirID, NULL);\n\t\t\n\t\t/* Copy the File Manager attributes */\n\t\terror = CopyFileMgrAttributes(srcVRefNum, srcDirID, NULL,\n\t\t\t\t\tdstVRefNum, dstDirID, NULL, true);\n\t\t\n\t\t/* handle any errors from CopyFileMgrAttributes */\n\t\tif ( (error != noErr) && (copyErrHandler != NULL) )\n\t\t{\n\t\t\ttheGlobals.bailout = CallCopyErrProc(copyErrHandler, error, copyDirFMAttributesOp,\n\t\t\t\t\t\t\t\t\t\t\t\tsrcVRefNum, srcDirID, NULL,\n\t\t\t\t\t\t\t\t\t\t\t\tdstVRefNum, dstDirID, NULL);\n\t\t}\n\t}\n\nErrorExit:\n\t/* Get rid of the copy buffer if we allocated it. */\n\tif ( ourCopyBuffer )\n\t{\n\t\tDisposePtr((Ptr)copyBufferPtr);\n\t}\n\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tDirectoryCopy(short srcVRefNum,\n\t\t\t\t\t\t\t  long srcDirID,\n\t\t\t\t\t\t\t  ConstStr255Param srcName,\n\t\t\t\t\t\t\t  short dstVRefNum,\n\t\t\t\t\t\t\t  long dstDirID,\n\t\t\t\t\t\t\t  ConstStr255Param dstName,\n\t\t\t\t\t\t\t  ConstStr255Param copyName,\n\t\t\t\t\t\t\t  void *copyBufferPtr,\n\t\t\t\t\t\t\t  long copyBufferSize,\n\t\t\t\t\t\t\t  Boolean preflight,\n\t\t\t\t\t\t\t  CopyErrProcPtr copyErrHandler)\n{\n\treturn ( FilteredDirectoryCopy(srcVRefNum, srcDirID, srcName,\n\t\t\t\t\t\t\t\t   dstVRefNum, dstDirID, dstName,\n\t\t\t\t\t\t\t\t   copyName,\n\t\t\t\t\t\t\t\t   copyBufferPtr, copyBufferSize, preflight,\n\t\t\t\t\t\t\t\t   copyErrHandler, NULL) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpFilteredDirectoryCopy(const FSSpec *srcSpec,\n\t\t\t\t\t\t\t\t\t\t const FSSpec *dstSpec,\n\t\t\t\t\t\t\t\t\t\t ConstStr255Param copyName,\n\t\t\t\t\t\t\t\t\t\t void *copyBufferPtr,\n\t\t\t\t\t\t\t\t\t\t long copyBufferSize,\n\t\t\t\t\t\t\t\t\t\t Boolean preflight,\n\t\t\t\t\t\t\t\t\t\t CopyErrProcPtr copyErrHandler,\n\t\t\t\t\t\t\t\t\t\t CopyFilterProcPtr copyFilterProc)\n{\n\treturn ( FilteredDirectoryCopy(srcSpec->vRefNum, srcSpec->parID, srcSpec->name,\n\t\t\t\t\t\t\t\t   dstSpec->vRefNum, dstSpec->parID, dstSpec->name,\n\t\t\t\t\t\t\t\t   copyName,\n\t\t\t\t\t\t\t\t   copyBufferPtr, copyBufferSize, preflight,\n\t\t\t\t\t\t\t\t   copyErrHandler, copyFilterProc) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpDirectoryCopy(const FSSpec *srcSpec,\n\t\t\t\t\t\t\t\t const FSSpec *dstSpec,\n\t\t\t\t\t\t\t\t ConstStr255Param copyName,\n\t\t\t\t\t\t\t\t void *copyBufferPtr,\n\t\t\t\t\t\t\t\t long copyBufferSize,\n\t\t\t\t\t\t\t\t Boolean preflight,\n\t\t\t\t\t\t\t\t CopyErrProcPtr copyErrHandler)\n{\n\treturn ( FilteredDirectoryCopy(srcSpec->vRefNum, srcSpec->parID, srcSpec->name,\n\t\t\t\t\t\t\t\t   dstSpec->vRefNum, dstSpec->parID, dstSpec->name,\n\t\t\t\t\t\t\t\t   copyName,\n\t\t\t\t\t\t\t\t   copyBufferPtr, copyBufferSize, preflight,\n\t\t\t\t\t\t\t\t   copyErrHandler, NULL) );\n}\n\n/*****************************************************************************/\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/MoreFiles 1.5/Sources/FSpCompat.c",
    "content": "/*\n**\tApple Macintosh Developer Technical Support\n**\n**\tFSSpec compatibility functions.\n**\n**\tby Jim Luther, Apple Developer Technical Support Emeritus\n**\n**\tFile:\t\tFSpCompat.c\n**\n**\tCopyright  1992-1999 Apple Computer, Inc.\n**\tAll rights reserved.\n**\n**\tYou may incorporate this sample code into your applications without\n**\trestriction, though the sample code has been provided \"AS IS\" and the\n**\tresponsibility for its operation is 100% yours.  However, what you are\n**\tnot permitted to do is to redistribute the source as \"DSC Sample Code\"\n**\tafter having made changes. If you're going to re-distribute the source,\n**\twe require that you make it clear in the source that the code was\n**\tdescended from Apple Sample Code, but that you've made changes.\n*/\n\n/*\n**\tIf building application 68K code, set GENERATENODATA to 0 for faster code.\n**\tIf building stand-alone 68K code, set GENERATENODATA to 1 so globals\n**\t\t(static variables) are not used.\n*/\n#ifndef GENERATENODATA\n#define GENERATENODATA 0\n#endif\n\n#if 0\n#include <Types.h>\n#include <Errors.h>\n#include <LowMem.h>\n#include <Gestalt.h>\n#include <Resources.h>\n#include <Script.h>\n#endif 0\n\n#define\t__COMPILINGMOREFILES\n\n#include \"MoreFilesExtras.h\"\n#include \"FSpCompat.h\"\n\n/*****************************************************************************/\n\n/* local constants */\n\nenum {\n\tgestaltBugFixAttrsTwo\t\t\t\t\t= 'bugy',\n\tgestaltFSpExchangeFilesCompatibilityFix\t= 26,\n\tgestaltBugFixAttrsThree\t\t\t\t\t= 'bugx',\n\tgestaltFSpCreateScriptSupportFix\t\t= 1\n};\n\n/*****************************************************************************/\n\n/* static prototypes */\n\n\n#if !__MACOSSEVENORLATER\nstatic\tBoolean\tFSHasFSSpecCalls(void);\n\nstatic\tBoolean\tQTHasFSSpecCalls(void);\n#endif\t/* !__MACOSSEVENORLATER */\n\n#if !__MACOSSEVENFIVEORLATER\nstatic\tBoolean\tHasFSpExchangeFilesCompatibilityFix(void);\n\nstatic\tOSErr\tGenerateUniqueName(short volume,\n\t\t\t\t\t\t\t\t   long *startSeed,\n\t\t\t\t\t\t\t\t   long dir1,\n\t\t\t\t\t\t\t\t   long dir2,\n\t\t\t\t\t\t\t\t   StringPtr uniqueName);\n#endif\t/* !__MACOSSEVENFIVEORLATER */\n\n#if !__MACOSSEVENFIVEONEORLATER\nstatic\tBoolean\tHasFSpCreateScriptSupportFix(void);\n#endif\t/* !__MACOSSEVENFIVEONEORLATER */\n\n/*****************************************************************************/\n\n/* FSHasFSSpecCalls returns true if the file system provides FSSpec calls. */\n\n#if !__MACOSSEVENORLATER\nstatic\tBoolean\tFSHasFSSpecCalls(void)\n{\n\tlong\t\t\tresponse;\n#if !GENERATENODATA\n\tstatic Boolean\ttested = false;\n\tstatic Boolean\tresult = false;\n#else\n\tBoolean\tresult = false;\n#endif\n\t\n#if !GENERATENODATA\n\tif ( !tested )\n\t{\n\t\ttested = true;\n#endif\n\t\tif ( Gestalt(gestaltFSAttr, &response) == noErr )\n\t\t{\n\t\t\tresult = ((response & (1L << gestaltHasFSSpecCalls)) != 0);\n\t\t}\n#if !GENERATENODATA\n\t}\n#endif\n\treturn ( result );\n}\n#endif\t/* !__MACOSSEVENORLATER */\n\n/*****************************************************************************/\n\n/* QTHasFSSpecCalls returns true if QuickTime provides FSSpec calls */\n/* except for FSpExchangeFiles. */\n\n#if !__MACOSSEVENORLATER\nstatic\tBoolean\tQTHasFSSpecCalls(void)\n{\n\tlong\t\t\tresponse;\n#if !GENERATENODATA\n\tstatic Boolean\ttested = false;\n\tstatic Boolean\tresult = false;\n#else\n\tBoolean\tresult = false;\n#endif\n\t\n#if !GENERATENODATA\n\tif ( !tested )\n\t{\n\t\ttested = true;\n#endif\n\t\tresult = (Gestalt(gestaltQuickTimeVersion, &response) == noErr);\n#if !GENERATENODATA\n\t}\n#endif\n\treturn ( result );\n}\n#endif\t/* !__MACOSSEVENORLATER */\n\n/*****************************************************************************/\n\n/* HasFSpExchangeFilesCompatibilityFix returns true if FSpExchangeFiles */\n/* compatibility code has been fixed in system software. */\n/* This was fixed by System Update 3.0, so if SystemSevenFiveOrLater */\n/* is true, then we know the fix is in. */\n\n#if !__MACOSSEVENFIVEORLATER\nstatic\tBoolean\tHasFSpExchangeFilesCompatibilityFix(void)\n{\n\tlong\t\t\tresponse;\n#if !GENERATENODATA\n\tstatic Boolean\ttested = false;\n\tstatic Boolean\tresult = false;\n#else\t/* !GENERATENODATA */\n\tBoolean\tresult = false;\n#endif\t/* !GENERATENODATA */\n\t\n#if !GENERATENODATA\n\tif ( !tested )\n\t{\n\t\ttested = true;\n#endif\t/* !GENERATENODATA */\n\t\tif ( Gestalt(gestaltBugFixAttrsTwo, &response) == noErr )\n\t\t{\n\t\t\tresult = ((response & (1L << gestaltFSpExchangeFilesCompatibilityFix)) != 0);\n\t\t}\n#if !GENERATENODATA\n\t}\n#endif\t/* !GENERATENODATA */\n\treturn ( result );\n}\n#endif\t/* !__MACOSSEVENFIVEORLATER */\n\n/*****************************************************************************/\n\n/* HasFSpCreateScriptSupportFix returns true if FSpCreate and */\n/* FSpCreateResFile have been fixed in system software to correctly set */\n/* the scriptCode in the volume's catalog. */\n/* This was fixed by System 7.5 Update 1.0 */\n\n#if !__MACOSSEVENFIVEONEORLATER\nstatic\tBoolean\tHasFSpCreateScriptSupportFix(void)\n{\n\tlong\t\t\tresponse;\n#if !GENERATENODATA\n\tstatic Boolean\ttested = false;\n\tstatic Boolean\tresult = false;\n#else\n\tBoolean\tresult = false;\n#endif\t/* !GENERATENODATA */\n\t\n#if !GENERATENODATA\n\tif ( !tested )\n\t{\n\t\ttested = true;\n#endif\t/* !GENERATENODATA */\n\t\tif ( Gestalt(gestaltBugFixAttrsThree, &response) == noErr )\n\t\t{\n\t\t\tresult = ((response & (1L << gestaltFSpCreateScriptSupportFix)) != 0);\n\t\t}\n#if !GENERATENODATA\n\t}\n#endif\t/* !GENERATENODATA */\n\treturn ( result );\n}\n#endif\t/* !__MACOSSEVENFIVEONEORLATER */\n\n/*****************************************************************************/\n\n/*\n**\tFile Manager FSp calls\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSMakeFSSpecCompat(short vRefNum,\n\t\t\t\t\t\t\t\t   long dirID,\n\t\t\t\t\t\t\t\t   ConstStr255Param fileName,\n\t\t\t\t\t\t\t\t   FSSpec *spec)\n{\n\tOSErr\tresult;\n\t\n#if !__MACOSSEVENORLATER\n\tif ( !FSHasFSSpecCalls() && !QTHasFSSpecCalls() )\n\t{\n\t\tBoolean\tisDirectory;\n\t\t\n\t\tresult = GetObjectLocation(vRefNum, dirID, fileName,\n\t\t\t\t\t\t\t\t\t&(spec->vRefNum), &(spec->parID), spec->name,\n\t\t\t\t\t\t\t\t\t&isDirectory);\n\t}\n\telse\n#endif\t/* !__MACOSSEVENORLATER */\n\t{\n\t\t/* Let the file system create the FSSpec if it can since it does the job */\n\t\t/* much more efficiently than I can. */\n\t\tresult = FSMakeFSSpec(vRefNum, dirID, fileName, spec);\n\n\t\t/* Fix a bug in Macintosh PC Exchange's MakeFSSpec code where 0 is */\n\t\t/* returned in the parID field when making an FSSpec to the volume's */\n\t\t/* root directory by passing a full pathname in MakeFSSpec's */\n\t\t/* fileName parameter. Fixed in Mac OS 8.1 */\n\t\tif ( (result == noErr) && (spec->parID == 0) )\n\t\t\tspec->parID = fsRtParID;\n\t}\n\treturn ( result );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpOpenDFCompat(const FSSpec *spec,\n\t\t\t\t\t\t\t\tchar permission,\n\t\t\t\t\t\t\t\tshort *refNum)\n{\n#if !__MACOSSEVENORLATER\n\tif ( !FSHasFSSpecCalls() && !QTHasFSSpecCalls() )\n\t{\n\t\tOSErr\t\t\tresult;\n\t\tHParamBlockRec\tpb;\n\t\t\n\t\tpb.ioParam.ioVRefNum = spec->vRefNum;\n\t\tpb.fileParam.ioDirID = spec->parID;\n\t\tpb.ioParam.ioNamePtr = (StringPtr) &(spec->name);\n\t\tpb.ioParam.ioVersNum = 0;\n\t\tpb.ioParam.ioPermssn = permission;\n\t\tpb.ioParam.ioMisc = NULL;\n\t\tresult = PBHOpenSync(&pb);\t/* OpenDF not supported by System 6, so use Open */\n\t\t*refNum = pb.ioParam.ioRefNum;\n\t\treturn ( result );\n\t}\n\telse\n#endif\t/* !__MACOSSEVENORLATER */\n\t{\n\t\treturn ( FSpOpenDF(spec, permission, refNum) );\n\t}\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpOpenRFCompat(const FSSpec *spec,\n\t\t\t\t\t\t\t\tchar permission,\n\t\t\t\t\t\t\t\tshort *refNum)\n{\n#if !__MACOSSEVENORLATER\n\tif ( !FSHasFSSpecCalls() && !QTHasFSSpecCalls() )\n\t{\n\t\tOSErr\t\t\tresult;\n\t\tHParamBlockRec\tpb;\n\t\t\n\t\tpb.ioParam.ioVRefNum = spec->vRefNum;\n\t\tpb.fileParam.ioDirID = spec->parID;\n\t\tpb.ioParam.ioNamePtr = (StringPtr) &(spec->name);\n\t\tpb.ioParam.ioVersNum = 0;\n\t\tpb.ioParam.ioPermssn = permission;\n\t\tpb.ioParam.ioMisc = NULL;\n\t\tresult = PBHOpenRFSync(&pb);\n\t\t*refNum = pb.ioParam.ioRefNum;\n\t\treturn ( result );\n\t}\n\telse\n#endif\t/* !__MACOSSEVENORLATER */\n\t{\n\t\treturn ( FSpOpenRF(spec, permission, refNum) );\n\t}\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpCreateCompat(const FSSpec *spec,\n\t\t\t\t\t\t\t\tOSType creator,\n\t\t\t\t\t\t\t\tOSType fileType,\n\t\t\t\t\t\t\t\tScriptCode scriptTag)\n{\n#if !__MACOSSEVENFIVEONEORLATER\n\tOSErr\t\t\tresult;\n\tUniversalFMPB\tpb;\n\n\t\n\tif (\n#if !__MACOSSEVENORLATER\n\t\t (!FSHasFSSpecCalls() && !QTHasFSSpecCalls()) ||\n#endif\t/* !__MACOSSEVENORLATER */\n\t\t !HasFSpCreateScriptSupportFix() )\n\t{\n\t\t/*\tIf FSpCreate isn't called, this code will be executed */\n\t\tpb.hPB.fileParam.ioVRefNum = spec->vRefNum;\n\t\tpb.hPB.fileParam.ioDirID = spec->parID;\n\t\tpb.hPB.fileParam.ioNamePtr = (StringPtr) &(spec->name);\n\t\tpb.hPB.fileParam.ioFVersNum = 0;\n\t\tresult = PBHCreateSync(&(pb.hPB));\n\t\tif ( result == noErr )\n\t\t{\n\t\t\t/* get info on created item */\n\t\t\tpb.ciPB.hFileInfo.ioFDirIndex = 0;\n\t\t\tresult = PBGetCatInfoSync(&(pb.ciPB));\n\t\t\tif ( result == noErr )\n\t\t\t{\n\t\t\t\t/* Set fdScript in FXInfo */\n\t\t\t\t/* The negative script constants (smSystemScript, smCurrentScript, and smAllScripts) */\n\t\t\t\t/* don't make sense on disk, so only use scriptTag if scriptTag >= smRoman */\n\t\t\t\t/* (smRoman is 0). fdScript is valid if high bit is set (see IM-6, page 9-38) */\n\t\t\t\tpb.ciPB.hFileInfo.ioFlXFndrInfo.fdScript = (scriptTag >= smRoman) ?\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t((char)scriptTag | (char)0x80) :\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(smRoman);\n\t\t\t\t/* Set creator/fileType */\n\t\t\t\tpb.ciPB.hFileInfo.ioFlFndrInfo.fdCreator = creator;\n\t\t\t\tpb.ciPB.hFileInfo.ioFlFndrInfo.fdType = fileType;\n\t\t\t\t/* Restore ioDirID field in pb which was changed by PBGetCatInfo */\n\t\t\t\tpb.ciPB.hFileInfo.ioDirID = spec->parID;\n\t\t\t\tresult = PBSetCatInfoSync(&(pb.ciPB));\n\t\t\t}\n\t\t}\n\t\treturn ( result );\n\t}\n\telse\n#endif\t/* !__MACOSSEVENFIVEONEORLATER */\n\t{\n\t\treturn ( FSpCreate(spec, creator, fileType, scriptTag) );\n\t}\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpDirCreateCompat(const FSSpec *spec,\n\t\t\t\t\t\t\t\t   ScriptCode scriptTag,\n\t\t\t\t\t\t\t\t   long *createdDirID)\n{\n#if !__MACOSSEVENORLATER\n\tif ( !FSHasFSSpecCalls() && !QTHasFSSpecCalls() )\n\t{\n\t\tOSErr\t\t\tresult;\n\t\tUniversalFMPB\tpb;\n\t\t\n\t\tpb.hPB.fileParam.ioVRefNum = spec->vRefNum;\n\t\tpb.hPB.fileParam.ioDirID = spec->parID;\n\t\tpb.hPB.fileParam.ioNamePtr = (StringPtr) &(spec->name);\n\t\tresult = PBDirCreateSync(&(pb.hPB));\n\t\t*createdDirID = pb.hPB.fileParam.ioDirID;\n\t\tif ( result == noErr )\n\t\t{\n\t\t\t/* get info on created item */\n\t\t\tpb.ciPB.dirInfo.ioFDirIndex = 0;\n\t\t\tpb.ciPB.dirInfo.ioDrDirID = spec->parID;\n\t\t\tresult = PBGetCatInfoSync(&(pb.ciPB));\n\t\t\tif ( result == noErr )\n\t\t\t{\n\t\t\t\t/* Set frScript in DXInfo */\n\t\t\t\t/* The negative script constants (smSystemScript, smCurrentScript, and smAllScripts) */\n\t\t\t\t/* don't make sense on disk, so only use scriptTag if scriptTag >= smRoman */\n\t\t\t\t/* (smRoman is 0). frScript is valid if high bit is set (see IM-6, page 9-38) */\n\t\t\t\tpb.ciPB.dirInfo.ioDrFndrInfo.frScript = (scriptTag >= smRoman) ?\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t((char)scriptTag | (char)0x80) :\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(smRoman);\n\t\t\t\t/* Restore ioDirID field in pb which was changed by PBGetCatInfo */\n\t\t\t\tpb.ciPB.dirInfo.ioDrDirID = spec->parID;\t\t\t\n\t\t\t\tresult = PBSetCatInfoSync(&(pb.ciPB));\n\t\t\t}\n\t\t}\n\t\treturn ( result );\n\t}\n\telse\n#endif\t/* !__MACOSSEVENORLATER */\n\t{\n\t\treturn ( FSpDirCreate(spec, scriptTag, createdDirID) );\n\t}\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpDeleteCompat(const FSSpec *spec)\n{\n#if !__MACOSSEVENORLATER\n\tif ( !FSHasFSSpecCalls() && !QTHasFSSpecCalls() )\n\t{\n\t\tHParamBlockRec\tpb;\n\t\t\n\t\tpb.ioParam.ioVRefNum = spec->vRefNum;\n\t\tpb.fileParam.ioDirID = spec->parID;\n\t\tpb.ioParam.ioNamePtr = (StringPtr) &(spec->name);\n\t\tpb.ioParam.ioVersNum = 0;\n\t\treturn ( PBHDeleteSync(&pb) );\n\t}\n\telse\n#endif\t/* !__MACOSSEVENORLATER */\n\t{\n\t\treturn ( FSpDelete(spec) );\n\t}\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpGetFInfoCompat(const FSSpec *spec,\n\t\t\t\t\t\t\t\t  FInfo *fndrInfo)\n{\n#if !__MACOSSEVENORLATER\n\tif ( !FSHasFSSpecCalls() && !QTHasFSSpecCalls() )\n\t{\n\t\tOSErr\t\t\tresult;\n\t\tHParamBlockRec\tpb;\n\t\t\n\t\tpb.fileParam.ioVRefNum = spec->vRefNum;\n\t\tpb.fileParam.ioDirID = spec->parID;\n\t\tpb.fileParam.ioNamePtr = (StringPtr) &(spec->name);\n\t\tpb.fileParam.ioFVersNum = 0;\n\t\tpb.fileParam.ioFDirIndex = 0;\n\t\tresult = PBHGetFInfoSync(&pb);\n\t\t*fndrInfo = pb.fileParam.ioFlFndrInfo;\n\t\treturn ( result );\n\t}\n\telse\n#endif\t/* !__MACOSSEVENORLATER */\n\t{\n\t\treturn ( FSpGetFInfo(spec, fndrInfo) );\n\t}\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpSetFInfoCompat(const FSSpec *spec,\n\t\t\t\t\t\t\t\t  const FInfo *fndrInfo)\n{\n#if !__MACOSSEVENORLATER\n\tif ( !FSHasFSSpecCalls() && !QTHasFSSpecCalls() )\n\t{\n\t\tOSErr\t\t\tresult;\n\t\tHParamBlockRec\tpb;\n\t\t\n\t\tpb.fileParam.ioVRefNum = spec->vRefNum;\n\t\tpb.fileParam.ioDirID = spec->parID;\n\t\tpb.fileParam.ioNamePtr = (StringPtr) &(spec->name);\n\t\tpb.fileParam.ioFVersNum = 0;\n\t\tpb.fileParam.ioFDirIndex = 0;\n\t\tresult = PBHGetFInfoSync(&pb);\n\t\tif ( result == noErr )\n\t\t{\n\t\t\tpb.fileParam.ioFlFndrInfo = *fndrInfo;\n\t\t\tpb.fileParam.ioDirID = spec->parID;\n\t\t\tresult = PBHSetFInfoSync(&pb);\n\t\t}\n\t\treturn ( result );\n\t}\n\telse\n#endif\t/* !__MACOSSEVENORLATER */\n\t{\n\t\treturn ( FSpSetFInfo(spec, fndrInfo) );\n\t}\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpSetFLockCompat(const FSSpec *spec)\n{\n#if !__MACOSSEVENORLATER\n\tif ( !FSHasFSSpecCalls() && !QTHasFSSpecCalls() )\n\t{\n\t\tHParamBlockRec\tpb;\n\t\t\n\t\tpb.fileParam.ioVRefNum = spec->vRefNum;\n\t\tpb.fileParam.ioDirID = spec->parID;\n\t\tpb.fileParam.ioNamePtr = (StringPtr) &(spec->name);\n\t\tpb.fileParam.ioFVersNum = 0;\n\t\treturn ( PBHSetFLockSync(&pb) );\n\t}\n\telse\n#endif\t/* !__MACOSSEVENORLATER */\n\t{\n\t\treturn ( FSpSetFLock(spec) );\n\t}\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpRstFLockCompat(const FSSpec *spec)\n{\n#if !__MACOSSEVENORLATER\n\tif ( !FSHasFSSpecCalls() && !QTHasFSSpecCalls() )\n\t{\n\t\tHParamBlockRec\tpb;\n\t\t\n\t\tpb.fileParam.ioVRefNum = spec->vRefNum;\n\t\tpb.fileParam.ioDirID = spec->parID;\n\t\tpb.fileParam.ioNamePtr = (StringPtr) &(spec->name);\n\t\tpb.fileParam.ioFVersNum = 0;\n\t\treturn ( PBHRstFLockSync(&pb) );\n\t}\n\telse\n#endif\t/* !__MACOSSEVENORLATER */\n\t{\n\t\treturn ( FSpRstFLock(spec) );\n\t}\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpRenameCompat(const FSSpec *spec,\n\t\t\t\t\t\t\t\tConstStr255Param newName)\n{\n#if !__MACOSSEVENORLATER\n\tif ( !FSHasFSSpecCalls() && !QTHasFSSpecCalls() )\n\t{\n\t\tHParamBlockRec\tpb;\n\t\t\n\t\tpb.ioParam.ioVRefNum = spec->vRefNum;\n\t\tpb.fileParam.ioDirID = spec->parID;\n\t\tpb.ioParam.ioNamePtr = (StringPtr) &(spec->name);\n\t\tpb.ioParam.ioVersNum = 0;\n\t\tpb.ioParam.ioMisc = (Ptr) newName;\n\t\treturn ( PBHRenameSync(&pb) );\n\t}\n\telse\n#endif\t/* !__MACOSSEVENORLATER */\n\t{\n\t\treturn ( FSpRename(spec, newName) );\n\t}\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpCatMoveCompat(const FSSpec *source,\n\t\t\t\t\t\t\t\t const FSSpec *dest)\n{\n#if !__MACOSSEVENORLATER\n\tif ( !FSHasFSSpecCalls() && !QTHasFSSpecCalls() )\n\t{\n\t\tCMovePBRec\tpb;\n\t\t\n\t\t/* source and destination volume must be the same */\n\t\tif ( source->vRefNum != dest->vRefNum )\n\t\t\treturn ( paramErr );\n\t\t\n\t\tpb.ioNamePtr = (StringPtr) &(source->name);\n\t\tpb.ioVRefNum = source->vRefNum;\n\t\tpb.ioDirID = source->parID;\n\t\tpb.ioNewDirID = dest->parID;\n\t\tpb.ioNewName = (StringPtr) &(dest->name);\n\t\treturn ( PBCatMoveSync(&pb) );\n\t}\n\telse\n#endif\t/* !__MACOSSEVENORLATER */\n\t{\n\t\treturn ( FSpCatMove(source, dest) );\n\t}\n}\n\n/*****************************************************************************/\n\n/* GenerateUniqueName generates a name that is unique in both dir1 and dir2 */\n/* on the specified volume. Ripped off from Feldman's code. */\n\n#if !__MACOSSEVENFIVEORLATER\nstatic\tOSErr\tGenerateUniqueName(short volume,\n\t\t\t\t\t\t\t\t   long *startSeed,\n\t\t\t\t\t\t\t\t   long dir1,\n\t\t\t\t\t\t\t\t   long dir2,\n\t\t\t\t\t\t\t\t   StringPtr uniqueName)\n{\n\tOSErr\t\t\terror = noErr;\n\tlong\t\t\ti;\n\tCInfoPBRec\t\tcinfo;\n\tunsigned char\thexStr[16];\n\t\n\tfor ( i = 0; i < 16; ++i )\n\t{\n\t\tif ( i < 10 )\n\t\t{\n\t\t\thexStr[i] = 0x30 + i;\n\t\t}\n\t\telse\n\t\t{\n\t\t\thexStr[i] = 0x37 + i;\n\t\t}\n\t}\n\t\n\tcinfo.hFileInfo.ioVRefNum = volume;\n\tcinfo.hFileInfo.ioFDirIndex = 0;\n\tcinfo.hFileInfo.ioNamePtr = uniqueName;\n\n\twhile ( error != fnfErr )\n\t{\n\t\t(*startSeed)++;\t\t\n\t\tcinfo.hFileInfo.ioNamePtr[0] = 8;\n\t\tfor ( i = 1; i <= 8; i++ )\n\t\t{\n\t\t\tcinfo.hFileInfo.ioNamePtr[i] = hexStr[((*startSeed >> ((8-i)*4)) & 0xf)];\n\t\t}\n\t\tcinfo.hFileInfo.ioDirID = dir1;\n\t\terror = fnfErr;\n\t\tfor ( i = 1; i <= 2; i++ )\n\t\t{\n\t\t\terror = error & PBGetCatInfoSync(&cinfo);\n\t\t\tcinfo.hFileInfo.ioDirID = dir2;\n\t\t\tif ( (error != fnfErr) && (error != noErr) )\n\t\t\t{\n\t\t\t\treturn ( error );\n\t\t\t}\n\t\t}\n\t}\n\treturn ( noErr );\n}\n#endif\t/* !__MACOSSEVENFIVEORLATER */\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpExchangeFilesCompat(const FSSpec *source,\n\t\t\t\t\t\t\t\t\t   const FSSpec *dest)\n{\n#if !__MACOSSEVENFIVEORLATER\n\tif ( \n#if !__MACOSSEVENORLATER\n\t\t !FSHasFSSpecCalls() ||\n#endif\t/* !__MACOSSEVENORLATER */\n\t\t !HasFSpExchangeFilesCompatibilityFix() )\n\t{\n\t\tHParamBlockRec\t\t\tpb;\n\t\tCInfoPBRec\t\t\t\tcatInfoSource, catInfoDest;\n\t\tOSErr\t\t\t\t\tresult, result2;\n\t\tStr31\t\t\t\t\tunique1, unique2;\n\t\tStringPtr\t\t\t\tunique1Ptr, unique2Ptr, swapola;\n\t\tGetVolParmsInfoBuffer\tvolInfo;\n\t\tlong\t\t\t\t\ttheSeed, temp;\n\t\t\n\t\t/* Make sure the source and destination are on the same volume */\n\t\tif ( source->vRefNum != dest->vRefNum )\n\t\t{\n\t\t\tresult = diffVolErr;\n\t\t\tgoto errorExit3;\n\t\t}\n\t\t\n\t\t/* Try PBExchangeFiles first since it preserves the file ID reference */\n\t\tpb.fidParam.ioNamePtr = (StringPtr) &(source->name);\n\t\tpb.fidParam.ioVRefNum = source->vRefNum;\n\t\tpb.fidParam.ioDestNamePtr = (StringPtr) &(dest->name);\n\t\tpb.fidParam.ioDestDirID = dest->parID;\n\t\tpb.fidParam.ioSrcDirID = source->parID;\n\t\n\t\tresult = PBExchangeFilesSync(&pb);\n\t\n\t\t/* Note: The compatibility case won't work for files with *Btree control blocks. */\n\t\t/* Right now the only *Btree files are created by the system. */\n\t\tif ( result != noErr )\n\t\t{\n\t\t\tpb.ioParam.ioNamePtr = NULL;\n\t\t\tpb.ioParam.ioBuffer = (Ptr) &volInfo;\n\t\t\tpb.ioParam.ioReqCount = sizeof(volInfo);\n\t\t\tresult2 = PBHGetVolParmsSync(&pb);\n\t\t\t\n\t\t\t/* continue if volume has no fileID support (or no GetVolParms support) */\n\t\t\tif ( (result2 == noErr) && hasFileIDs(volInfo) )\n\t\t\t{\n\t\t\t\tgoto errorExit3;\n\t\t\t}\n\t\n\t\t\t/* Get the catalog information for each file */\n\t\t\t/* and make sure both files are *really* files */\n\t\t\tcatInfoSource.hFileInfo.ioVRefNum = source->vRefNum;\n\t\t\tcatInfoSource.hFileInfo.ioFDirIndex = 0;\n\t\t\tcatInfoSource.hFileInfo.ioNamePtr = (StringPtr) &(source->name);\n\t\t\tcatInfoSource.hFileInfo.ioDirID = source->parID;\n\t\t\tcatInfoSource.hFileInfo.ioACUser = 0; /* ioACUser used to be filler2 */\n\t\t\tresult = PBGetCatInfoSync(&catInfoSource);\n\t\t\tif ( result != noErr )\n\t\t\t{\n\t\t\t\tgoto errorExit3;\n\t\t\t}\n\t\t\tif ( (catInfoSource.hFileInfo.ioFlAttrib & kioFlAttribDirMask) != 0 )\n\t\t\t{\n\t\t\t\tresult = notAFileErr;\n\t\t\t\tgoto errorExit3;\n\t\t\t}\n\t\t\t\n\t\t\tcatInfoDest.hFileInfo.ioVRefNum = dest->vRefNum;\n\t\t\tcatInfoDest.hFileInfo.ioFDirIndex = 0;\n\t\t\tcatInfoDest.hFileInfo.ioNamePtr = (StringPtr) &(dest->name);\n\t\t\tcatInfoDest.hFileInfo.ioDirID = dest->parID;\n\t\t\tcatInfoDest.hFileInfo.ioACUser = 0; /* ioACUser used to be filler2 */\n\t\t\tresult = PBGetCatInfoSync(&catInfoDest);\n\t\t\tif ( result != noErr )\n\t\t\t{\n\t\t\t\tgoto errorExit3;\n\t\t\t}\n\t\t\tif ( (catInfoDest.hFileInfo.ioFlAttrib & kioFlAttribDirMask) != 0 )\n\t\t\t{\n\t\t\t\tresult = notAFileErr;\n\t\t\t\tgoto errorExit3;\n\t\t\t}\n\t\t\t\n\t\t\t/* generate 2 filenames that are unique in both directories */\n\t\t\ttheSeed = 0x64666A6C;\t/* a fine unlikely filename */\n\t\t\tunique1Ptr = (StringPtr)&unique1;\n\t\t\tunique2Ptr = (StringPtr)&unique2;\n\t\t\t\n\t\t\tresult = GenerateUniqueName(source->vRefNum, &theSeed, source->parID, dest->parID, unique1Ptr);\n\t\t\tif ( result != noErr )\n\t\t\t{\n\t\t\t\tgoto errorExit3;\n\t\t\t}\n\t\n\t\t\tGenerateUniqueName(source->vRefNum, &theSeed, source->parID, dest->parID, unique2Ptr);\n\t\t\tif ( result != noErr )\n\t\t\t{\n\t\t\t\tgoto errorExit3;\n\t\t\t}\n\t\n\t\t\t/* rename source to unique1 */\n\t\t\tpb.fileParam.ioNamePtr = (StringPtr) &(source->name);\n\t\t\tpb.ioParam.ioMisc = (Ptr) unique1Ptr;\n\t\t\tpb.ioParam.ioVersNum = 0;\n\t\t\tresult = PBHRenameSync(&pb);\n\t\t\tif ( result != noErr )\n\t\t\t{\n\t\t\t\tgoto errorExit3;\n\t\t\t}\n\t\t\t\n\t\t\t/* rename dest to unique2 */\n\t\t\tpb.ioParam.ioMisc = (Ptr) unique2Ptr;\n\t\t\tpb.ioParam.ioVersNum = 0;\n\t\t\tpb.fileParam.ioNamePtr = (StringPtr) &(dest->name);\n\t\t\tpb.fileParam.ioDirID = dest->parID;\n\t\t\tresult = PBHRenameSync(&pb);\n\t\t\tif ( result != noErr )\n\t\t\t{\n\t\t\t\tgoto errorExit2;\t/* back out gracefully by renaming unique1 back to source */\n\t\t\t}\n\t\t\t\t\n\t\t\t/* If files are not in same directory, swap their locations */\n\t\t\tif ( source->parID != dest->parID )\n\t\t\t{\n\t\t\t\t/* move source file to dest directory */\n\t\t\t\tpb.copyParam.ioNamePtr = unique1Ptr;\n\t\t\t\tpb.copyParam.ioNewName = NULL;\n\t\t\t\tpb.copyParam.ioNewDirID = dest->parID;\n\t\t\t\tpb.copyParam.ioDirID = source->parID;\n\t\t\t\tresult = PBCatMoveSync((CMovePBPtr) &pb);\n\t\t\t\tif ( result != noErr )\n\t\t\t\t{\n\t\t\t\t\tgoto errorExit1;\t/* back out gracefully by renaming both files to original names */\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* move dest file to source directory */\n\t\t\t\tpb.copyParam.ioNamePtr = unique2Ptr;\n\t\t\t\tpb.copyParam.ioNewDirID = source->parID;\n\t\t\t\tpb.copyParam.ioDirID = dest->parID;\n\t\t\t\tresult = PBCatMoveSync((CMovePBPtr) &pb);\n\t\t\t\tif ( result != noErr)\n\t\t\t\t{\n\t\t\t\t\t/* life is very bad.  We'll at least try to move source back */\n\t\t\t\t\tpb.copyParam.ioNamePtr = unique1Ptr;\n\t\t\t\t\tpb.copyParam.ioNewName = NULL;\n\t\t\t\t\tpb.copyParam.ioNewDirID = source->parID;\n\t\t\t\t\tpb.copyParam.ioDirID = dest->parID;\n\t\t\t\t\t(void) PBCatMoveSync((CMovePBPtr) &pb);\t/* ignore errors */\n\t\t\t\t\tgoto errorExit1;\t/* back out gracefully by renaming both files to original names */\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/* Make unique1Ptr point to file in source->parID */\n\t\t\t/* and unique2Ptr point to file in dest->parID */\n\t\t\t/* This lets us fall through to the rename code below */\n\t\t\tswapola = unique1Ptr;\n\t\t\tunique1Ptr = unique2Ptr;\n\t\t\tunique2Ptr = swapola;\n\t\n\t\t\t/* At this point, the files are in their new locations (if they were moved) */\n\t\t\t/* Source is named Unique1 (name pointed to by unique2Ptr) and is in dest->parID */\n\t\t\t/* Dest is named Unique2 (name pointed to by unique1Ptr) and is in source->parID */\n\t\t\t/* Need to swap attributes except mod date and swap names */\n\t\n\t\t\t/* swap the catalog info by re-aiming the CInfoPB's */\n\t\t\tcatInfoSource.hFileInfo.ioNamePtr = unique1Ptr;\n\t\t\tcatInfoDest.hFileInfo.ioNamePtr = unique2Ptr;\n\t\t\t\n\t\t\tcatInfoSource.hFileInfo.ioDirID = source->parID;\n\t\t\tcatInfoDest.hFileInfo.ioDirID = dest->parID;\n\t\t\t\n\t\t\t/* Swap the original mod dates with each file */\n\t\t\ttemp = catInfoSource.hFileInfo.ioFlMdDat;\n\t\t\tcatInfoSource.hFileInfo.ioFlMdDat = catInfoDest.hFileInfo.ioFlMdDat;\n\t\t\tcatInfoDest.hFileInfo.ioFlMdDat = temp;\n\t\t\t\n\t\t\t/* Here's the swap (ignore errors) */\n\t\t\t(void) PBSetCatInfoSync(&catInfoSource); \n\t\t\t(void) PBSetCatInfoSync(&catInfoDest);\n\t\t\t\n\t\t\t/* rename unique2 back to dest */\nerrorExit1:\n\t\t\tpb.ioParam.ioMisc = (Ptr) &(dest->name);\n\t\t\tpb.ioParam.ioVersNum = 0;\n\t\t\tpb.fileParam.ioNamePtr = unique2Ptr;\n\t\t\tpb.fileParam.ioDirID = dest->parID;\n\t\t\t(void) PBHRenameSync(&pb);\t/* ignore errors */\n\t\n\t\t\t/* rename unique1 back to source */\nerrorExit2:\n\t\t\tpb.ioParam.ioMisc = (Ptr) &(source->name);\n\t\t\tpb.ioParam.ioVersNum = 0;\n\t\t\tpb.fileParam.ioNamePtr = unique1Ptr;\n\t\t\tpb.fileParam.ioDirID = source->parID;\n\t\t\t(void) PBHRenameSync(&pb); /* ignore errors */\n\t\t}\nerrorExit3: { /* null statement */ }\n\t\treturn ( result );\n\t}\n\telse\n#endif\t/* !__MACOSSEVENFIVEORLATER */\n\t{\n\t\treturn ( FSpExchangeFiles(source, dest) );\n\t}\n}\n\n/*****************************************************************************/\n\n/* \n**\tResource Manager FSp calls\n*/\n\n/*****************************************************************************/\n\npascal\tshort\tFSpOpenResFileCompat(const FSSpec *spec,\n\t\t\t\t\t\t\t\t\t SignedByte permission)\n{\n#if !__MACOSSEVENORLATER\n\tif ( !FSHasFSSpecCalls() && !QTHasFSSpecCalls() )\n\t{\n\t\treturn ( HOpenResFile(spec->vRefNum, spec->parID, spec->name, permission) );\n\t}\n\telse\n#endif\t/* !__MACOSSEVENORLATER */\n\t{\n\t\treturn ( FSpOpenResFile(spec, permission) );\n\t}\n}\n\n/*****************************************************************************/\n\npascal\tvoid\tFSpCreateResFileCompat(const FSSpec *spec,\n\t\t\t\t\t\t\t\t\t   OSType creator,\n\t\t\t\t\t\t\t\t\t   OSType fileType,\n\t\t\t\t\t\t\t\t\t   ScriptCode scriptTag)\n{\t\n#if !__MACOSSEVENFIVEONEORLATER\n\tif (\n#if !__MACOSSEVENORLATER\n\t\t (!FSHasFSSpecCalls() && !QTHasFSSpecCalls()) ||\n#endif\t/* !__MACOSSEVENORLATER */\n\t\t !HasFSpCreateScriptSupportFix() )\n\t{\n\t\tOSErr\t\t\tresult;\n\t\tCInfoPBRec\t\tpb;\n\t\t\n\t\tHCreateResFile(spec->vRefNum, spec->parID, spec->name);\n\t\tif ( ResError() == noErr )\n\t\t{\n\t\t\t/* get info on created item */\n\t\t\tpb.hFileInfo.ioVRefNum = spec->vRefNum;\n\t\t\tpb.hFileInfo.ioDirID = spec->parID;\n\t\t\tpb.hFileInfo.ioNamePtr = (StringPtr) &(spec->name);\n\t\t\tpb.hFileInfo.ioFDirIndex = 0;\n\t\t\tresult = PBGetCatInfoSync(&pb);\n\t\t\tif ( result == noErr )\n\t\t\t{\n\t\t\t\t/* Set fdScript in FXInfo */\n\t\t\t\t/* The negative script constants (smSystemScript, smCurrentScript, and smAllScripts) */\n\t\t\t\t/* don't make sense on disk, so only use scriptTag if scriptTag >= smRoman */\n\t\t\t\t/* (smRoman is 0). fdScript is valid if high bit is set (see IM-6, page 9-38) */\n\t\t\t\tpb.hFileInfo.ioFlXFndrInfo.fdScript = (scriptTag >= smRoman) ?\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t((char)scriptTag | (char)0x80) :\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t(smRoman);\n\t\t\t\t/* Set creator/fileType */\n\t\t\t\tpb.hFileInfo.ioFlFndrInfo.fdCreator = creator;\n\t\t\t\tpb.hFileInfo.ioFlFndrInfo.fdType = fileType;\n\t\t\t\t\n\t\t\t\t/* Restore ioDirID field in pb which was changed by PBGetCatInfo */\n\t\t\t\tpb.hFileInfo.ioDirID = spec->parID;\n\t\t\t\tresult = PBSetCatInfoSync(&pb);\n\t\t\t}\n\t\t\t/* Set ResErr low memory global to result */\n\t\t\tLMSetResErr(result);\n\t\t}\n\t\treturn;\n\t}\n\telse\n#endif\t/* !__MACOSSEVENFIVEONEORLATER */\n\t{\n\t\tFSpCreateResFile(spec, creator, fileType, scriptTag);\n\t\treturn;\n\t}\n}\n\n/*****************************************************************************/\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/MoreFiles 1.5/Sources/FileCopy.c",
    "content": "/*\n**\tApple Macintosh Developer Technical Support\n**\n**\tFileCopy: A robust, general purpose file copy routine.\n**\n**\tby Jim Luther, Apple Developer Technical Support Emeritus\n**\n**\tFile:\t\tFileCopy.c\n**\n**\tCopyright  1992-1999 Apple Computer, Inc.\n**\tAll rights reserved.\n**\n**\tYou may incorporate this sample code into your applications without\n**\trestriction, though the sample code has been provided \"AS IS\" and the\n**\tresponsibility for its operation is 100% yours.  However, what you are\n**\tnot permitted to do is to redistribute the source as \"DSC Sample Code\"\n**\tafter having made changes. If you're going to re-distribute the source,\n**\twe require that you make it clear in the source that the code was\n**\tdescended from Apple Sample Code, but that you've made changes.\n*/\n\n#include <Types.h>\n#include <Errors.h>\n#include <Memory.h>\n#include <Files.h>\n#include <Math64.h>\n\n#define\t__COMPILINGMOREFILES\n\n#include \"MoreFiles.h\"\n#include \"MoreFilesExtras.h\"\n#include \"MoreDesktopMgr.h\"\n#include \"FileCopy.h\"\n\n/*****************************************************************************/\n\n/* local constants */\n\n/*\tThe deny-mode privileges to use when opening the source and destination files. */\n\nenum\n{\n\tsrcCopyMode = dmRdDenyWr,\n\tdstCopyMode = dmWrDenyRdWr\n};\n\n/*\tThe largest (16K) and smallest (.5K) copy buffer to use if the caller doesn't supply \n**\ttheir own copy buffer. */\n\nenum\n{\n\tbigCopyBuffSize  = 0x00004000,\n\tminCopyBuffSize  = 0x00000200\n};\n\n/*****************************************************************************/\n\n/* static prototypes */\n\nstatic\tOSErr\tGetDestinationDirInfo(short vRefNum,\n\t\t\t\t\t\t\t\t\t  long dirID,\n\t\t\t\t\t\t\t\t\t  ConstStr255Param name,\n\t\t\t\t\t\t\t\t\t  long *theDirID,\n\t\t\t\t\t\t\t\t\t  Boolean *isDirectory,\n\t\t\t\t\t\t\t\t\t  Boolean *isDropBox);\n/*\tGetDestinationDirInfo tells us if the destination is a directory, it's\n\tdirectory ID, and if it's an AppleShare drop box (write privileges only --\n\tno read or search privileges).\n\tvRefNum\t\tinput:\tVolume specification.\n\tdirID\t\tinput:\tDirectory ID.\n\tname\t\tinput:\tPointer to object name, or nil when dirID\n\t\t\t\t\t\tspecifies a directory that's the object.\n\ttheDirID\toutput:\tIf the object is a file, then its parent directory\n\t\t\t\t\t\tID. If the object is a directory, then its ID.\n\tisDirectory\toutput:\tTrue if object is a directory; false if\n\t\t\t\t\t\tobject is a file.\n\tisDropBox\toutput:\tTrue if directory is an AppleShare drop box.\n*/\n\nstatic\tOSErr\tCheckForForks(short vRefNum,\n\t\t\t\t\t\t\t  long dirID,\n\t\t\t\t\t\t\t  ConstStr255Param name,\n\t\t\t\t\t\t\t  Boolean *hasDataFork,\n\t\t\t\t\t\t\t  Boolean *hasResourceFork);\n/*\tCheckForForks tells us if there is a data or resource fork to copy.\n\tvRefNum\t\tinput:\tVolume specification of the file's current\n\t\t\t\t\t\t\tlocation.\n\tdirID\t\tinput:\tDirectory ID of the file's current location.\n\tname\t\tinput:\tThe name of the file.\n*/\n\nstatic\tOSErr\tPreflightFileCopySpace(short srcVRefNum,\n\t\t\t\t\t\t\t\t\t   long srcDirID,\n\t\t\t\t\t\t\t\t\t   ConstStr255Param srcName,\n\t\t\t\t\t\t\t\t\t   ConstStr255Param dstVolName,\n\t\t\t\t\t\t\t\t\t   short dstVRefNum,\n\t\t\t\t\t\t\t\t\t   Boolean *spaceOK);\n/*\tPreflightFileCopySpace determines if there's enough space on a\n\tvolume to copy the specified file to that volume.\n\tNote: The results of this routine are not perfect. For example if the\n\tvolume's catalog or extents overflow file grows when the new file is\n\tcreated, more allocation blocks may be needed beyond those needed for\n\tthe file's data and resource forks.\n\n\tsrcVRefNum\t\tinput:\tVolume specification of the file's current\n\t\t\t\t\t\t\tlocation.\n\tsrcDirID\t\tinput:\tDirectory ID of the file's current location.\n\tsrcName\t\t\tinput:\tThe name of the file.\n\tdstVolName\t\tinput:\tA pointer to the name of the volume where\n\t\t\t\t\t\t\tthe file will be copied or NULL.\n\tdstVRefNum\t\tinput:\tVolume specification indicating the volume\n\t\t\t\t\t\t\twhere the file will be copied.\n\tspaceOK\t\t\toutput:\ttrue if there's enough space on the volume for\n\t\t\t\t\t\t\tthe file's data and resource forks.\n*/\n\n/*****************************************************************************/\n\nstatic\tOSErr\tGetDestinationDirInfo(short vRefNum,\n\t\t\t\t\t\t\t\t\t  long dirID,\n\t\t\t\t\t\t\t\t\t  ConstStr255Param name,\n\t\t\t\t\t\t\t\t\t  long *theDirID,\n\t\t\t\t\t\t\t\t\t  Boolean *isDirectory,\n\t\t\t\t\t\t\t\t\t  Boolean *isDropBox)\n{\n\tCInfoPBRec pb;\n\tOSErr error;\n\n\tpb.dirInfo.ioACUser = 0;\t/* ioACUser used to be filler2, clear it before calling GetCatInfo */\n\terror = GetCatInfoNoName(vRefNum, dirID, name, &pb);\n\t*theDirID = pb.dirInfo.ioDrDirID;\n\t*isDirectory = (pb.dirInfo.ioFlAttrib & kioFlAttribDirMask) != 0;\n\t/* see if access priviledges are make changes, not see folder, and not see files (drop box) */\n\t*isDropBox = userHasDropBoxAccess(pb.dirInfo.ioACUser);\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\nstatic\tOSErr\tCheckForForks(short vRefNum,\n\t\t\t\t\t\t\t  long dirID,\n\t\t\t\t\t\t\t  ConstStr255Param name,\n\t\t\t\t\t\t\t  Boolean *hasDataFork,\n\t\t\t\t\t\t\t  Boolean *hasResourceFork)\n{\n\tHParamBlockRec pb;\n\tOSErr error;\n\t\n\tpb.fileParam.ioNamePtr = (StringPtr)name;\n\tpb.fileParam.ioVRefNum = vRefNum;\n\tpb.fileParam.ioFVersNum = 0;\n\tpb.fileParam.ioDirID = dirID;\n\tpb.fileParam.ioFDirIndex = 0;\n\terror = PBHGetFInfoSync(&pb);\n\t*hasDataFork = (pb.fileParam.ioFlLgLen != 0);\n\t*hasResourceFork = (pb.fileParam.ioFlRLgLen != 0);\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\nstatic\tOSErr\tPreflightFileCopySpace(short srcVRefNum,\n\t\t\t\t\t\t\t\t\t   long srcDirID,\n\t\t\t\t\t\t\t\t\t   ConstStr255Param srcName,\n\t\t\t\t\t\t\t\t\t   ConstStr255Param dstVolName,\n\t\t\t\t\t\t\t\t\t   short dstVRefNum,\n\t\t\t\t\t\t\t\t\t   Boolean *spaceOK)\n{\n\tUniversalFMPB pb;\n\tOSErr error;\n\tunsigned long dstFreeBlocks;\n\tunsigned long dstBlksPerAllocBlk;\n\tunsigned long srcDataBlks;\n\tunsigned long srcResourceBlks;\n\t\n\terror = XGetVolumeInfoNoName(dstVolName, dstVRefNum, &pb.xPB);\n\tif ( error == noErr )\n\t{\n\t\t/* get allocation block size (always multiple of 512) and divide by 512\n\t\t  to get number of 512-byte blocks per allocation block */\n\t\tdstBlksPerAllocBlk = ((unsigned long)pb.xPB.ioVAlBlkSiz >> 9);\n\t\t\n\t\t/* Convert freeBytes to free disk blocks (512-byte blocks) */\n\t\tdstFreeBlocks = U32SetU(U64ShiftRight(pb.xPB.ioVFreeBytes, 9));\n\t\t\n\t\t/* Now, get the size of the file's data resource forks */\n\t\tpb.hPB.fileParam.ioNamePtr = (StringPtr)srcName;\n\t\tpb.hPB.fileParam.ioVRefNum = srcVRefNum;\n\t\tpb.hPB.fileParam.ioFVersNum = 0;\n\t\tpb.hPB.fileParam.ioDirID = srcDirID;\n\t\tpb.hPB.fileParam.ioFDirIndex = 0;\n\t\terror = PBHGetFInfoSync(&pb.hPB);\n\t\tif ( error == noErr )\n\t\t{\n\t\t\t/* Since space on Mac OS disks is always allocated in allocation blocks, */\n\t\t\t/* this code takes into account rounding up to the end of an allocation block. */\n\n\t\t\t/* get number of 512-byte blocks needed for data fork */\n\t\t\tif ( ((unsigned long)pb.hPB.fileParam.ioFlLgLen & 0x000001ff) != 0 )\n\t\t\t{\n\t\t\t\tsrcDataBlks = ((unsigned long)pb.hPB.fileParam.ioFlLgLen >> 9) + 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsrcDataBlks = (unsigned long)pb.hPB.fileParam.ioFlLgLen >> 9;\n\t\t\t}\n\t\t\t\n\t\t\t/* now, calculate number of new allocation blocks needed */\n\t\t\tif ( srcDataBlks % dstBlksPerAllocBlk )\n\t\t\t{\n\t\t\t\tsrcDataBlks = (srcDataBlks / dstBlksPerAllocBlk) + 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsrcDataBlks /= dstBlksPerAllocBlk;\n\t\t\t}\n\t\t\n\t\t\t/* get number of 512-byte blocks needed for resource fork */\n\t\t\tif ( ((unsigned long)pb.hPB.fileParam.ioFlRLgLen & 0x000001ff) != 0 )\n\t\t\t{\n\t\t\t\tsrcResourceBlks = ((unsigned long)pb.hPB.fileParam.ioFlRLgLen >> 9) + 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsrcResourceBlks = (unsigned long)pb.hPB.fileParam.ioFlRLgLen >> 9;\n\t\t\t}\n\n\t\t\t/* now, calculate number of new allocation blocks needed */\n\t\t\tif ( srcResourceBlks % dstBlksPerAllocBlk )\n\t\t\t{\n\t\t\t\tsrcResourceBlks = (srcResourceBlks / dstBlksPerAllocBlk) + 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsrcResourceBlks /= dstBlksPerAllocBlk;\n\t\t\t}\n\t\t\t\n\t\t\t/* Is there enough room on the destination volume for the source file? */\n\t\t\t*spaceOK = ( ((srcDataBlks + srcResourceBlks) * dstBlksPerAllocBlk) <= dstFreeBlocks );\n\t\t}\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFileCopy(short srcVRefNum,\n\t\t\t\t\t\t long srcDirID,\n\t\t\t\t\t\t ConstStr255Param srcName,\n\t\t\t\t\t\t short dstVRefNum,\n\t\t\t\t\t\t long dstDirID,\n\t\t\t\t\t\t ConstStr255Param dstPathname,\n\t\t\t\t\t\t ConstStr255Param copyName,\n\t\t\t\t\t\t void *copyBufferPtr,\n\t\t\t\t\t\t long copyBufferSize,\n\t\t\t\t\t\t Boolean preflight)\n{\n\tOSErr\terr;\n\n\tshort\tsrcRefNum = 0,\t\t\t/* 0 when source data and resource fork are closed  */\n\t\t\tdstDataRefNum = 0,\t\t/* 0 when destination data fork is closed */\n\t\t\tdstRsrcRefNum = 0;\t\t/* 0 when destination resource fork is closed */\n\t\n\tStr63\tdstName;\t\t\t\t/* The filename of the destination. It might be the\n\t\t\t\t\t\t\t\t\t** source filename, it might be a new name... */\n\t\n\tGetVolParmsInfoBuffer infoBuffer; /* Where PBGetVolParms dumps its info */\n\tlong\tsrcServerAdr;\t\t\t/* AppleTalk server address of source (if any) */\n\t\n\tBoolean\tdstCreated = false,\t\t/* true when destination file has been created */\n\t\t\tourCopyBuffer = false,\t/* true if we had to allocate the copy buffer */\n\t\t\tisDirectory,\t\t\t/* true if destination is really a directory */\n\t\t\tisDropBox;\t\t\t\t/* true if destination is an AppleShare drop box */\n\t\n\tlong\ttempLong;\n\tshort\ttempInt;\n\t\n\tBoolean\tspaceOK;\t\t\t\t/* true if there's enough room to copy the file to the destination volume */\n\n\tBoolean\thasDataFork;\n\tBoolean\thasResourceFork;\n\n\t/* Preflight for size */\n\tif ( preflight )\n\t{\n\t\terr = PreflightFileCopySpace(srcVRefNum, srcDirID, srcName,\n\t\t\t\t\t\t\t\t\t dstPathname, dstVRefNum, &spaceOK);\n\t\tif ( err != noErr )\n\t\t{\n\t\t\treturn ( err );\n\t\t}\n\t\t\n\t\tif ( !spaceOK )\n\t\t{\n\t\t\treturn ( dskFulErr );\n\t\t}\n\t}\n\n\t/* get the destination's real dirID and make sure it really is a directory */\n\terr = GetDestinationDirInfo(dstVRefNum, dstDirID, dstPathname,\n\t\t\t\t\t\t\t\t&dstDirID, &isDirectory, &isDropBox);\n\tif ( err != noErr )\n\t{\n\t\tgoto ErrorExit;\n\t}\n\t\n\tif ( !isDirectory )\n\t{\n\t\treturn ( dirNFErr );\n\t}\n\n\t/* get the destination's real vRefNum */\n\terr = DetermineVRefNum(dstPathname, dstVRefNum, &dstVRefNum);\n\tif ( err != noErr )\n\t{\n\t\tgoto ErrorExit;\n\t}\n\t\n\t/* See if PBHCopyFile can be used.  Using PBHCopyFile saves time by letting the file server\n\t** copy the file if the source and destination locations are on the same file server. */\n\ttempLong = sizeof(infoBuffer);\n\terr = HGetVolParms(srcName, srcVRefNum, &infoBuffer, &tempLong);\n\tif ( (err != noErr) && (err != paramErr) )\n\t{\n\t\treturn ( err );\n\t}\n\n\tif ( (err != paramErr) && hasCopyFile(infoBuffer) )\n\t{\n\t\t/* The source volume supports PBHCopyFile. */\n\t\tsrcServerAdr = infoBuffer.vMServerAdr;\n\n\t\t/* Now, see if the destination volume is on the same file server. */\n\t\ttempLong = sizeof(infoBuffer);\n\t\terr = HGetVolParms(NULL, dstVRefNum, &infoBuffer, &tempLong);\n\t\tif ( (err != noErr) && (err != paramErr) )\n\t\t{\n\t\t\treturn ( err );\n\t\t}\n\t\tif ( (err != paramErr) && (srcServerAdr == infoBuffer.vMServerAdr) )\n\t\t{\n\t\t\t/* Source and Dest are on same server and PBHCopyFile is supported. Copy with CopyFile. */\n\t\t\terr = HCopyFile(srcVRefNum, srcDirID, srcName, dstVRefNum, dstDirID, NULL, copyName);\n\t\t\tif ( err != noErr )\n\t\t\t{\n\t\t\t\treturn ( err );\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t/* AppleShare's CopyFile clears the isAlias bit, so I still need to attempt to copy\n\t\t\t   the File's attributes to attempt to get things right. */\n\t\t\tif ( copyName != NULL )\t\t\t\t/* Did caller supply copy file name? */\n\t\t\t{\n\t\t\t\t/* Yes, use the caller supplied copy file name. */\n\t\t\t\t(void) CopyFileMgrAttributes(srcVRefNum, srcDirID, srcName,\n\t\t\t\t\t\t\t\t\t\t\t dstVRefNum, dstDirID, copyName, true);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t/* They didn't, so get the source file name and use it. */\n\t\t\t\tif ( GetFilenameFromPathname(srcName, dstName) == noErr )\n\t\t\t\t{\n\t\t\t\t\t/* */\n\t\t\t\t\t(void) CopyFileMgrAttributes(srcVRefNum, srcDirID, srcName,\n\t\t\t\t\t\t\t\t\t\t\t\t dstVRefNum, dstDirID, dstName, true);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn ( err );\n\t\t}\n\t}\n\n\t/* If we're here, then PBHCopyFile couldn't be used so we have to copy the file by hand. */\n\n\t/* Make sure a copy buffer is allocated. */\n\tif ( copyBufferPtr == NULL )\n\t{\n\t\t/* The caller didn't supply a copy buffer so grab one from the application heap.\n\t\t** Try to get a big copy buffer, if we can't, try for a 512-byte buffer.\n\t\t** If 512 bytes aren't available, we're in trouble. */\n\t\tcopyBufferSize = bigCopyBuffSize;\n\t\tcopyBufferPtr = NewPtr(copyBufferSize);\n\t\tif ( copyBufferPtr == NULL )\n\t\t{\n\t\t\tcopyBufferSize = minCopyBuffSize;\n\t\t\tcopyBufferPtr = NewPtr(copyBufferSize);\n\t\t\tif ( copyBufferPtr == NULL )\n\t\t\t{\n\t\t\t\treturn ( memFullErr );\n\t\t\t}\n\t\t}\n\t\tourCopyBuffer = true;\n\t}\n\n\t/* Open the source data fork. */\n\terr = HOpenAware(srcVRefNum, srcDirID, srcName, srcCopyMode, &srcRefNum);\n\tif ( err != noErr )\n\t\treturn ( err );\n\t\n\t/* Once a file is opened, we have to exit via ErrorExit to make sure things are cleaned up */\n\t\n\t/* See if the copy will be renamed. */\n\tif ( copyName != NULL )\t\t\t\t/* Did caller supply copy file name? */\n\t\tBlockMoveData(copyName, dstName, copyName[0] + 1);\t/* Yes, use the caller supplied copy file name. */\n\telse\n\t{\t/* They didn't, so get the source file name and use it. */\n\t\terr = GetFileLocation(srcRefNum, &tempInt, &tempLong, dstName);\n\t\tif ( err != noErr )\n\t\t{\n\t\t\tgoto ErrorExit;\n\t\t}\n\t}\n\n\t/* Create the destination file. */\n\terr = HCreateMinimum(dstVRefNum, dstDirID, dstName);\n\tif ( err != noErr )\n\t{\n\t\tgoto ErrorExit;\n\t}\n\tdstCreated = true;\t/* After creating the destination file, any\n\t\t\t\t\t\t** error conditions should delete the destination file */\n\n\t/* An AppleShare dropbox folder is a folder for which the user has the Make Changes\n\t** privilege (write access), but not See Files (read access) and See Folders (search access).\n\t** Copying a file into an AppleShare dropbox presents some special problems. Here are the\n\t** rules we have to follow to copy a file into a dropbox:\n\t**  File attributes can be changed only when both forks of a file are empty.\n\t**  DeskTop Manager comments can be added to a file only when both forks of a file \n\t**   are empty.\n\t**  A fork can be opened for write access only when both forks of a file are empty.\n\t** So, with those rules to live with, we'll do those operations now while both forks\n\t** are empty. */\n\n\tif ( isDropBox )\n\t{\n\t\t/* We only set the file attributes now if the file is being copied into a\n\t\t** drop box. In all other cases, it is better to set the attributes last\n\t\t** so that if FileCopy is modified to give up time to other processes\n\t\t** periodicly, the Finder won't try to read any bundle information (because\n\t\t** the bundle-bit will still be clear) from a partially copied file. If the\n\t\t** copy is into a drop box, we have to set the attributes now, but since the\n\t\t** destination forks are opened with write/deny-read/deny-write permissions,\n\t\t** any Finder that might see the file in the drop box won't be able to open\n\t\t** its resource fork until the resource fork is closed.\n\t\t**\n\t\t** Note: if you do modify FileCopy to give up time to other processes, don't\n\t\t** give up time between the time the destination file is created (above) and\n\t\t** the time both forks are opened (below). That way, you stand the best chance\n\t\t** of making sure the Finder doesn't read a partially copied resource fork.\n\t\t*/\n\t\t/* Copy attributes but don't lock the destination. */\n\t\terr = CopyFileMgrAttributes(srcVRefNum, srcDirID, srcName,\n\t\t\t\t\t\t\t\t\tdstVRefNum, dstDirID, dstName, false);\n\t\tif ( err != noErr )\n\t\t{\n\t\t\tgoto ErrorExit;\n\t\t}\n\t}\n\n\t/* Attempt to copy the comments while both forks are empty.\n\t** Ignore the result because we really don't care if it worked or not. */\n\t(void) DTCopyComment(srcVRefNum, srcDirID, srcName, dstVRefNum, dstDirID, dstName);\n\n\t/* See which forks we need to copy. By doing this, we won't create a data or resource fork\n\t** for the destination unless it's really needed (some foreign file systems such as\n\t** the ProDOS File System and Macintosh PC Exchange have to create additional disk\n\t** structures to support resource forks). */\n\terr = CheckForForks(srcVRefNum, srcDirID, srcName, &hasDataFork, &hasResourceFork);\n\tif ( err != noErr )\n\t{\n\t\tgoto ErrorExit;\n\t}\n\t\n\tif ( hasDataFork )\n\t{\n\t\t/* Open the destination data fork. */\n\t\terr = HOpenAware(dstVRefNum, dstDirID, dstName, dstCopyMode, &dstDataRefNum);\n\t\tif ( err != noErr )\n\t\t{\n\t\t\tgoto ErrorExit;\n\t\t}\n\t}\n\n\tif ( hasResourceFork )\n\t{\n\t\t/* Open the destination resource fork. */\n\t\terr = HOpenRFAware(dstVRefNum, dstDirID, dstName, dstCopyMode, &dstRsrcRefNum);\n\t\tif ( err != noErr )\n\t\t{\n\t\t\tgoto ErrorExit;\n\t\t}\n\t}\n\n\tif ( hasDataFork )\n\t{\n\t\t/* Copy the data fork. */\n\t\terr = CopyFork(srcRefNum, dstDataRefNum, copyBufferPtr, copyBufferSize);\n\t\tif ( err != noErr )\n\t\t{\n\t\t\tgoto ErrorExit;\n\t\t}\n\t\n\t\t/* Close both data forks and clear reference numbers. */\n\t\t(void) FSClose(srcRefNum);\n\t\t(void) FSClose(dstDataRefNum);\n\t\tsrcRefNum = dstDataRefNum = 0;\n\t}\n\telse\n\t{\n\t\t/* Close the source data fork since it was opened earlier */\n\t\t(void) FSClose(srcRefNum);\n\t\tsrcRefNum = 0;\n\t}\n\n\tif ( hasResourceFork )\n\t{\n\t\t/* Open the source resource fork. */\n\t\terr = HOpenRFAware(srcVRefNum, srcDirID, srcName, srcCopyMode, &srcRefNum);\n\t\tif ( err != noErr )\n\t\t{\n\t\t\tgoto ErrorExit;\n\t\t}\n\t\n\t\t/* Copy the resource fork. */\n\t\terr = CopyFork(srcRefNum, dstRsrcRefNum, copyBufferPtr, copyBufferSize);\n\t\tif ( err != noErr )\n\t\t{\n\t\t\tgoto ErrorExit;\n\t\t}\n\t\n\t\t/* Close both resource forks and clear reference numbers. */\n\t\t(void) FSClose(srcRefNum);\n\t\t(void) FSClose(dstRsrcRefNum);\n\t\tsrcRefNum = dstRsrcRefNum = 0;\n\t}\n\n\t/* Get rid of the copy buffer if we allocated it. */\n\tif ( ourCopyBuffer )\n\t{\n\t\tDisposePtr((Ptr)copyBufferPtr);\n\t}\n\n\t/* Attempt to copy attributes again to set mod date.  Copy lock condition this time\n\t** since we're done with the copy operation.  This operation will fail if we're copying\n\t** into an AppleShare dropbox, so we don't check for error conditions. */\n\tCopyFileMgrAttributes(srcVRefNum, srcDirID, srcName,\n\t\t\t\t\t\t\tdstVRefNum, dstDirID, dstName, true);\n\n\t/* Hey, we did it! */\n\treturn ( noErr );\n\t\nErrorExit:\n\tif ( srcRefNum != 0 )\n\t{\n\t\t(void) FSClose(srcRefNum);\t\t/* Close the source file */\n\t}\n\tif ( dstDataRefNum != 0 )\n\t{\n\t\t(void) FSClose(dstDataRefNum);\t/* Close the destination file data fork */\n\t}\n\tif ( dstRsrcRefNum != 0 )\n\t{\n\t\t(void) FSClose(dstRsrcRefNum);\t/* Close the destination file resource fork */\n\t}\n\tif ( dstCreated )\n\t{\n\t\t(void) HDelete(dstVRefNum, dstDirID, dstName);\t/* Delete dest file.  This may fail if the file \n\t\t\t\t\t\t\t\t\t\t\t\t   is in a \"drop folder\" */\n\t}\n\tif ( ourCopyBuffer )\t/* dispose of any memory we allocated */\n\t{\n\t\tDisposePtr((Ptr)copyBufferPtr);\n\t}\n\t\n\treturn ( err );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpFileCopy(const FSSpec *srcSpec,\n\t\t\t\t\t\t\tconst FSSpec *dstSpec,\n\t\t\t\t\t\t\tConstStr255Param copyName,\n\t\t\t\t\t\t\tvoid *copyBufferPtr,\n\t\t\t\t\t\t\tlong copyBufferSize,\n\t\t\t\t\t\t\tBoolean preflight)\n{\n\treturn ( FileCopy(srcSpec->vRefNum, srcSpec->parID, srcSpec->name,\n\t\t\t\t\t dstSpec->vRefNum, dstSpec->parID, dstSpec->name,\n\t\t\t\t\t copyName, copyBufferPtr, copyBufferSize, preflight) );\n}\n\n/*****************************************************************************/\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/MoreFiles 1.5/Sources/FullPath.c",
    "content": "/*\n**\tApple Macintosh Developer Technical Support\n**\n**\tRoutines for dealing with full pathnames... if you really must.\n**\n**\tby Jim Luther, Apple Developer Technical Support Emeritus\n**\n**\tFile:\t\tFullPath.c\n**\n**\tCopyright  1995-1999 Apple Computer, Inc.\n**\tAll rights reserved.\n**\n**\tYou may incorporate this sample code into your applications without\n**\trestriction, though the sample code has been provided \"AS IS\" and the\n**\tresponsibility for its operation is 100% yours.  However, what you are\n**\tnot permitted to do is to redistribute the source as \"DSC Sample Code\"\n**\tafter having made changes. If you're going to re-distribute the source,\n**\twe require that you make it clear in the source that the code was\n**\tdescended from Apple Sample Code, but that you've made changes.\n*/\n\n#if 0\n#include <Types.h>\n#include <Errors.h>\n#include <Memory.h>\n#include <Files.h>\n#include <TextUtils.h>\n#include <Aliases.h>\n#endif 0\n\n#define\t__COMPILINGMOREFILES\n\n#include \"FSpCompat.h\"\n#include \"FullPath.h\"\n\n/*\n\tIMPORTANT NOTE:\n\t\n\tThe use of full pathnames is strongly discouraged. Full pathnames are\n\tparticularly unreliable as a means of identifying files, directories\n\tor volumes within your application, for two primary reasons:\n\t\n\t \tThe user can change the name of any element in the path at virtually\n\t\tany time.\n\t\tVolume names on the Macintosh are *not* unique. Multiple\n\t\tmounted volumes can have the same name. For this reason, the use of\n\t\ta full pathname to identify a specific volume may not produce the\n\t\tresults you expect. If more than one volume has the same name and\n\t\ta full pathname is used, the File Manager currently uses the first\n\t\tmounted volume it finds with a matching name in the volume queue.\n\t\n\tIn general, you should use a files name, parent directory ID, and\n\tvolume reference number to identify a file you want to open, delete,\n\tor otherwise manipulate.\n\t\n\tIf you need to remember the location of a particular file across\n\tsubsequent system boots, use the Alias Manager to create an alias record\n\tdescribing the file. If the Alias Manager is not available, you can save\n\tthe files name, its parent directory ID, and the name of the volume on\n\twhich its located. Although none of these methods is foolproof, they are\n\tmuch more reliable than using full pathnames to identify files.\n\t\n\tNonetheless, it is sometimes useful to display a files full pathname to\n\tthe user. For example, a backup utility might display a list of full\n\tpathnames of files as it copies them onto the backup medium. Or, a\n\tutility might want to display a dialog box showing the full pathname of\n\ta file when it needs the users confirmation to delete the file. No\n\tmatter how unreliable full pathnames may be from a file-specification\n\tviewpoint, users understand them more readily than volume reference\n\tnumbers or directory IDs. (Hint: Use the TruncString function from\n\tTextUtils.h with truncMiddle as the truncWhere argument to shorten\n\tfull pathnames to a displayable length.)\n\t\n\tThe following technique for constructing the full pathname of a file is\n\tintended for display purposes only. Applications that depend on any\n\tparticular structure of a full pathname are likely to fail on alternate\n\tforeign file systems or under future system software versions.\n*/\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetFullPath(short vRefNum,\n\t\t\t\t\t\t\tlong dirID,\n\t\t\t\t\t\t\tConstStr255Param name,\n\t\t\t\t\t\t\tshort *fullPathLength,\n\t\t\t\t\t\t\tHandle *fullPath)\n{\n\tOSErr\t\tresult;\n\tFSSpec\t\tspec;\n\t\n\t*fullPathLength = 0;\n\t*fullPath = NULL;\n\t\n\tresult = FSMakeFSSpecCompat(vRefNum, dirID, name, &spec);\n\tif ( (result == noErr) || (result == fnfErr) )\n\t{\n\t\tresult = FSpGetFullPath(&spec, fullPathLength, fullPath);\n\t}\n\t\n\treturn ( result );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpGetFullPath(const FSSpec *spec,\n\t\t\t\t\t\t\t   short *fullPathLength,\n\t\t\t\t\t\t\t   Handle *fullPath)\n{\n\tOSErr\t\tresult;\n\tOSErr\t\trealResult;\n\tFSSpec\t\ttempSpec;\n\tCInfoPBRec\tpb;\n\t\n\t*fullPathLength = 0;\n\t*fullPath = NULL;\n\t\n\t\n\t/* Default to noErr */\n\trealResult = result = noErr;\n\t\n#if 0\n//The following code doesn't seem to work in OS X, the BloackMoveData crashes the\n// machine, the the FSMakeFSSpecCompat works, so go figure...  KG 4/1/01\n\n\t/* work around Nav Services \"bug\" (it returns invalid FSSpecs with empty names) */\n\tif ( spec->name[0] == 0 )\n\t{\n\t\tresult = FSMakeFSSpecCompat(spec->vRefNum, spec->parID, spec->name, &tempSpec);\n\t}\n\telse\n\t{\n\t\t/* Make a copy of the input FSSpec that can be modified */\n\t\tBlockMoveData(spec, &tempSpec, sizeof(FSSpec));\n\t}\n#endif 0\n\n\tresult = FSMakeFSSpecCompat(spec->vRefNum, spec->parID, spec->name, &tempSpec);\n\n\n\tif ( result == noErr )\n\t{\n\t\tif ( tempSpec.parID == fsRtParID )\n\t\t{\n\t\t\t/* The object is a volume */\n\t\t\t\n\t\t\t/* Add a colon to make it a full pathname */\n\t\t\t++tempSpec.name[0];\n\t\t\ttempSpec.name[tempSpec.name[0]] = ':';\n\t\t\t\n\t\t\t/* We're done */\n\t\t\tresult = PtrToHand(&tempSpec.name[1], fullPath, tempSpec.name[0]);\n\t\t\t*fullPathLength = tempSpec.name[0];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* The object isn't a volume */\n\t\t\t\n\t\t\t/* Is the object a file or a directory? */\n\t\t\tpb.dirInfo.ioNamePtr = tempSpec.name;\n\t\t\tpb.dirInfo.ioVRefNum = tempSpec.vRefNum;\n\t\t\tpb.dirInfo.ioDrDirID = tempSpec.parID;\n\t\t\tpb.dirInfo.ioFDirIndex = 0;\n\t\t\tresult = PBGetCatInfoSync(&pb);\n\t\t\t// Allow file/directory name at end of path to not exist.\n\t\t\trealResult = result;\n\t\t\tif ( (result == noErr) || (result == fnfErr) )\n\t\t\t{\n\t\t\t\t/* if the object is a directory, append a colon so full pathname ends with colon */\n\t\t\t\tif ( (result == noErr) && (pb.hFileInfo.ioFlAttrib & kioFlAttribDirMask) != 0 )\n\t\t\t\t{\n\t\t\t\t\t++tempSpec.name[0];\n\t\t\t\t\ttempSpec.name[tempSpec.name[0]] = ':';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* Put the object name in first */\n\t\t\t\tresult = PtrToHand(&tempSpec.name[1], fullPath, tempSpec.name[0]);\n\t\t\t\t*fullPathLength = tempSpec.name[0];\n\t\t\t\tif ( result == noErr )\n\t\t\t\t{\n\t\t\t\t\t/* Get the ancestor directory names */\n\t\t\t\t\tpb.dirInfo.ioNamePtr = tempSpec.name;\n\t\t\t\t\tpb.dirInfo.ioVRefNum = tempSpec.vRefNum;\n\t\t\t\t\tpb.dirInfo.ioDrParID = tempSpec.parID;\n\t\t\t\t\tdo\t/* loop until we have an error or find the root directory */\n\t\t\t\t\t{\n\t\t\t\t\t\tpb.dirInfo.ioFDirIndex = -1;\n\t\t\t\t\t\tpb.dirInfo.ioDrDirID = pb.dirInfo.ioDrParID;\n\t\t\t\t\t\tresult = PBGetCatInfoSync(&pb);\n\t\t\t\t\t\tif ( result == noErr )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/* Append colon to directory name */\n\t\t\t\t\t\t\t++tempSpec.name[0];\n\t\t\t\t\t\t\ttempSpec.name[tempSpec.name[0]] = ':';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* Add directory name to beginning of fullPath */\n\t\t\t\t\t\t\t(void) Munger(*fullPath, 0, NULL, 0, &tempSpec.name[1], tempSpec.name[0]);\n\t\t\t\t\t\t\t*fullPathLength += tempSpec.name[0];\n\t\t\t\t\t\t\tresult = MemError();\n\t\t\t\t\t\t}\n\t\t\t\t\t} while ( (result == noErr) && (pb.dirInfo.ioDrDirID != fsRtDirID) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\tif ( result == noErr )\n\t{\n\t\t/* Return the length */\n///\t\t*fullPathLength = GetHandleSize(*fullPath);\n\t\tresult = realResult;\t// return realResult in case it was fnfErr\n\t}\n\telse\n\t{\n\t\t/* Dispose of the handle and return NULL and zero length */\n\t\tif ( *fullPath != NULL )\n\t\t{\n\t\t\tDisposeHandle(*fullPath);\n\t\t}\n\t\t*fullPath = NULL;\n\t\t*fullPathLength = 0;\n\t}\n\t\n\treturn ( result );\n}\n\n/*****************************************************************************/\n\npascal OSErr FSpLocationFromFullPath(short fullPathLength,\n\t\t\t\t\t\t\t\t\t const void *fullPath,\n\t\t\t\t\t\t\t\t\t FSSpec *spec)\n{\n\tAliasHandle\talias;\n\tOSErr\t\tresult;\n\tBoolean\t\twasChanged;\n\tStr32\t\tnullString;\n\t\n\t/* Create a minimal alias from the full pathname */\n\tnullString[0] = 0;\t/* null string to indicate no zone or server name */\n\tresult = NewAliasMinimalFromFullPath(fullPathLength, fullPath, nullString, nullString, &alias);\n\tif ( result == noErr )\n\t{\n\t\t/* Let the Alias Manager resolve the alias. */\n\t\tresult = ResolveAlias(NULL, alias, spec, &wasChanged);\n\t\t\n\t\t/* work around Alias Mgr sloppy volume matching bug */\n\t\tif ( spec->vRefNum == 0 )\n\t\t{\n\t\t\t/* invalidate wrong FSSpec */\n\t\t\tspec->parID = 0;\n\t\t\tspec->name[0] =  0;\n\t\t\tresult = nsvErr;\n\t\t}\n\t\tDisposeHandle((Handle)alias);\t/* Free up memory used */\n\t}\n\treturn ( result );\n}\n\n/*****************************************************************************/\n\npascal OSErr LocationFromFullPath(short fullPathLength,\n\t\t\t\t\t\t\t\t  const void *fullPath,\n\t\t\t\t\t\t\t\t  short *vRefNum,\n\t\t\t\t\t\t\t\t  long *parID,\n\t\t\t\t\t\t\t\t  Str31 name)\n{\n\tOSErr\tresult;\n\tFSSpec\tspec;\n\t\n\tresult = FSpLocationFromFullPath(fullPathLength, fullPath, &spec);\n\tif ( result == noErr )\n\t{\n\t\t*vRefNum = spec.vRefNum;\n\t\t*parID = spec.parID;\n\t\tBlockMoveData(&spec.name[0], &name[0], spec.name[0] + 1);\n\t}\n\treturn ( result );\n}\n\n/*****************************************************************************/\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/MoreFiles 1.5/Sources/IterateDirectory.c",
    "content": "/*\n**\tIterateDirectory: File Manager directory iterator routines.\n**\n**\tby Jim Luther\n**\n**\tFile:\t\tIterateDirectory.c\n**\n**\tCopyright  1995-1999 Jim Luther and Apple Computer, Inc.\n**\tAll rights reserved.\n**\n**\tYou may incorporate this sample code into your applications without\n**\trestriction, though the sample code has been provided \"AS IS\" and the\n**\tresponsibility for its operation is 100% yours.\n**\n**\tIterateDirectory is designed to drop into the MoreFiles sample code\n**\tlibrary I wrote while in Apple Developer Technical Support\n*/\n\n#include <Types.h>\n#include <Errors.h>\n#include <Files.h>\n\n#define\t__COMPILINGMOREFILES\n\n#include \"MoreFilesExtras.h\"\n#include \"IterateDirectory.h\"\n\n/*\n**\tType definitions\n*/\n\n/* The IterateGlobals structure is used to minimize the amount of\n** stack space used when recursively calling IterateDirectoryLevel\n** and to hold global information that might be needed at any time.\n*/\n#if PRAGMA_STRUCT_ALIGN\n#pragma options align=mac68k\n#endif\nstruct IterateGlobals\n{\n\tIterateFilterProcPtr\titerateFilter;\t/* pointer to IterateFilterProc */\n\tCInfoPBRec\t\t\t\tcPB;\t\t\t/* the parameter block used for PBGetCatInfo calls */\n\tStr63\t\t\t\t\titemName;\t\t/* the name of the current item */\n\tOSErr\t\t\t\t\tresult;\t\t\t/* temporary holder of results - saves 2 bytes of stack each level */\n\tBoolean\t\t\t\t\tquitFlag;\t\t/* set to true if filter wants to kill interation */\n\tunsigned short\t\t\tmaxLevels;\t\t/* Maximum levels to iterate through */\n\tunsigned short\t\t\tcurrentLevel;\t/* The current level IterateLevel is on */\n\tvoid\t\t\t\t\t*yourDataPtr;\t/* A pointer to caller data the filter may need to access */\n};\n#if PRAGMA_STRUCT_ALIGN\n#pragma options align=reset\n#endif\n\ntypedef struct IterateGlobals IterateGlobals;\ntypedef IterateGlobals *IterateGlobalsPtr;\n\n/*****************************************************************************/\n\n/*\tStatic Prototype */\n\nstatic\tvoid\tIterateDirectoryLevel(long dirID,\n\t\t\t\t\t\t\t\t\t  IterateGlobals *theGlobals);\n\n/*****************************************************************************/\n\n/*\n**\tFunctions\n*/\n\nstatic\tvoid\tIterateDirectoryLevel(long dirID,\n\t\t\t\t\t\t\t\t\t  IterateGlobals *theGlobals)\n{\n\tif ( (theGlobals->maxLevels == 0) ||\t\t\t\t\t\t/* if maxLevels is zero, we aren't checking levels */\n\t\t (theGlobals->currentLevel < theGlobals->maxLevels) )\t/* if currentLevel < maxLevels, look at this level */\n\t{\n\t\tshort index = 1;\n\t\t\n\t\t++theGlobals->currentLevel;\t/* go to next level */\n\t\t\n\t\tdo\n\t\t{\t/* Isn't C great... What I'd give for a \"WITH theGlobals DO\" about now... */\n\t\t\n\t\t\t/* Get next source item at the current directory level */\n\t\t\t\n\t\t\ttheGlobals->cPB.dirInfo.ioFDirIndex = index;\n\t\t\ttheGlobals->cPB.dirInfo.ioDrDirID = dirID;\n\t\t\ttheGlobals->result = PBGetCatInfoSync((CInfoPBPtr)&theGlobals->cPB);\t\t\n\t\n\t\t\tif ( theGlobals->result == noErr )\n\t\t\t{\n\t\t\t\t/* Call the IterateFilterProc */\n\t\t\t\tCallIterateFilterProc(theGlobals->iterateFilter, &theGlobals->cPB, &theGlobals->quitFlag, theGlobals->yourDataPtr);\n\t\t\t\t\n\t\t\t\t/* Is it a directory? */\n\t\t\t\tif ( (theGlobals->cPB.hFileInfo.ioFlAttrib & kioFlAttribDirMask) != 0 )\n\t\t\t\t{\n\t\t\t\t\t/* We have a directory */\n\t\t\t\t\tif ( !theGlobals->quitFlag )\n\t\t\t\t\t{\n\t\t\t\t\t\t/* Dive again if the IterateFilterProc didn't say \"quit\" */\n\t\t\t\t\t\tIterateDirectoryLevel(theGlobals->cPB.dirInfo.ioDrDirID, theGlobals);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t++index; /* prepare to get next item */\n\t\t} while ( (theGlobals->result == noErr) && (!theGlobals->quitFlag) ); /* time to fall back a level? */\n\t\t\n\t\tif ( (theGlobals->result == fnfErr) ||\t/* fnfErr is OK - it only means we hit the end of this level */\n\t\t\t (theGlobals->result == afpAccessDenied) ) /* afpAccessDenied is OK, too - it only means we cannot see inside a directory */\n\t\t{\n\t\t\ttheGlobals->result = noErr;\n\t\t}\n\t\t\t\n\t\t--theGlobals->currentLevel;\t/* return to previous level as we leave */\n\t}\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tIterateDirectory(short vRefNum,\n\t\t\t\t\t\t\t\t long dirID,\n\t\t\t\t\t\t\t\t ConstStr255Param name,\n\t\t\t\t\t\t\t\t unsigned short maxLevels,\n\t\t\t\t\t\t\t\t IterateFilterProcPtr iterateFilter,\n\t\t\t\t\t\t\t\t void *yourDataPtr)\n{\n\tIterateGlobals\ttheGlobals;\n\tOSErr\t\t\tresult;\n\tlong\t\t\ttheDirID;\n\tshort\t\t\ttheVRefNum;\n\tBoolean\t\t\tisDirectory;\n\t\n\t/* Make sure there is a IterateFilter */\n\tif ( iterateFilter != NULL )\n\t{\n\t\t/* Get the real directory ID and make sure it is a directory */\n\t\tresult = GetDirectoryID(vRefNum, dirID, name, &theDirID, &isDirectory);\n\t\tif ( result == noErr )\n\t\t{\n\t\t\tif ( isDirectory == true )\n\t\t\t{\n\t\t\t\t/* Get the real vRefNum */\n\t\t\t\tresult = DetermineVRefNum(name, vRefNum, &theVRefNum);\n\t\t\t\tif ( result == noErr )\n\t\t\t\t{\n\t\t\t\t\t/* Set up the globals we need to access from the recursive routine. */\n\t\t\t\t\ttheGlobals.iterateFilter = iterateFilter;\n\t\t\t\t\ttheGlobals.cPB.hFileInfo.ioNamePtr = (StringPtr)&theGlobals.itemName;\n\t\t\t\t\ttheGlobals.cPB.hFileInfo.ioVRefNum = theVRefNum;\n\t\t\t\t\ttheGlobals.itemName[0] = 0;\n\t\t\t\t\ttheGlobals.result = noErr;\n\t\t\t\t\ttheGlobals.quitFlag = false;\n\t\t\t\t\ttheGlobals.maxLevels = maxLevels;\n\t\t\t\t\ttheGlobals.currentLevel = 0;\t/* start at level 0 */\n\t\t\t\t\ttheGlobals.yourDataPtr = yourDataPtr;\n\t\t\t\t\n\t\t\t\t\t/* Here we go into recursion land... */\n\t\t\t\t\tIterateDirectoryLevel(theDirID, &theGlobals);\n\t\t\t\t\t\n\t\t\t\t\tresult = theGlobals.result;\t/* set the result */\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tresult = dirNFErr;\t/* a file was passed instead of a directory */\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\tresult = paramErr;\t/* iterateFilter was NULL */\n\t}\n\t\n\treturn ( result );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpIterateDirectory(const FSSpec *spec,\n\t\t\t\t\t\t\t\t\tunsigned short maxLevels,\n\t\t\t\t\t\t\t\t\tIterateFilterProcPtr iterateFilter,\n\t\t\t\t\t\t\t\t\tvoid *yourDataPtr)\n{\n\treturn ( IterateDirectory(spec->vRefNum, spec->parID, spec->name,\n\t\t\t\t\t\tmaxLevels, iterateFilter, yourDataPtr) );\n}\n\n/*****************************************************************************/\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/MoreFiles 1.5/Sources/MoreDesktopMgr.c",
    "content": "/*\n**\tApple Macintosh Developer Technical Support\n**\n**\tA collection of useful high-level Desktop Manager routines.\n**\tIf the Desktop Manager isn't available, use the Desktop file\n**\tfor 'read' operations.\n**\n**\tWe do more because we can...\n**\n**\tby Jim Luther and Nitin Ganatra, Apple Developer Technical Support Emeriti\n**\n**\tFile:\tMoreDesktopMgr.c\n**\n**\tCopyright  1992-1999 Apple Computer, Inc.\n**\tAll rights reserved.\n**\n**\tYou may incorporate this sample code into your applications without\n**\trestriction, though the sample code has been provided \"AS IS\" and the\n**\tresponsibility for its operation is 100% yours.  However, what you are\n**\tnot permitted to do is to redistribute the source as \"DSC Sample Code\"\n**\tafter having made changes. If you're going to re-distribute the source,\n**\twe require that you make it clear in the source that the code was\n**\tdescended from Apple Sample Code, but that you've made changes.\n*/\n\n#include <Types.h>\n#include <Errors.h>\n#include <Memory.h>\n#include <Files.h>\n#include <Resources.h>\n#include <Icons.h>\n\n#define\t__COMPILINGMOREFILES\n\n#include \"MoreFiles.h\"\n#include \"MoreFilesExtras.h\"\n#include \"Search.h\"\n#include \"MoreDesktopMgr.h\"\n\n/*****************************************************************************/\n\n/*\tDesktop file notes:\n**\n**\t\tThe Desktop file is owned by the Finder and is normally open by the\n**\t\tFinder. That means that we only have read-only access to the Desktop\n**\t\tfile.\n**\t\tSince the Resource Manager doesn't support shared access to resource\n**\t\tfiles and we're using read-only access, we don't ever leave the\n**\t\tDesktop file open.  We open a path to it, get the data we want out\n**\t\tof it, and then close the open path. This is the only safe way to\n**\t\topen a resource file with read-only access since some other program\n**\t\tcould have it open with write access.\n**\t\tThe bundle related resources in the Desktop file are normally\n**\t\tpurgable, so when we're looking through them, we don't bother to\n**\t\trelease resources we're done looking at - closing the resource file\n**\t\t(which we always do) will release them.\n**\t\tSince we can't assume the Desktop file is named \"Desktop\"\n**\t\t(it probably is everywhere but France), we get the Desktop\n**\t\tfile's name by searching the volume's root directory for a file\n**\t\twith fileType == 'FNDR' and creator == 'ERIK'. The only problem with\n**\t\tthis scheme is that someone could create another file with that type\n**\t\tand creator in the root directory and we'd find the wrong file.\n**\t\tThe chances of this are very slim.\n*/\n\n/*****************************************************************************/\n\n/* local defines */\n\nenum\n{\n\tkBNDLResType\t= 'BNDL',\n\tkFREFResType\t= 'FREF',\n\tkIconFamResType\t= 'ICN#',\n\tkFCMTResType\t= 'FCMT',\n\tkAPPLResType\t= 'APPL'\n};\n\n/*****************************************************************************/\n\n/* local data structures */\n\n#if PRAGMA_STRUCT_ALIGN\n#pragma options align=mac68k\n#endif\n\nstruct IDRec\n{\n\tshort\t\tlocalID;\n\tshort\t\trsrcID;\n};\ntypedef struct IDRec IDRec;\ntypedef\tIDRec *IDRecPtr;\n\nstruct BundleType\n{\n\tOSType\t\ttype;\t\t\t/* 'ICN#' or 'FREF' */\n\tshort\t\tcount;\t\t\t/* number of IDRecs - 1 */\n\tIDRec\t\tidArray[1];\n};\ntypedef struct BundleType BundleType;\ntypedef BundleType *BundleTypePtr;\n\nstruct BNDLRec\n{\n\tOSType\t\tsignature;\t\t/* creator type signature */\n\tshort\t\tversionID;\t\t/* version - should always be 0 */\n\tshort\t\tnumTypes;\t\t/* number of elements in typeArray - 1 */\n\tBundleType\ttypeArray[1];\n};\ntypedef struct BNDLRec BNDLRec;\ntypedef BNDLRec **BNDLRecHandle;\n\nstruct FREFRec\n{\n\tOSType\t\tfileType;\t\t/* file type */\n\tshort\t\ticonID;\t\t\t/* icon local ID */\n\tStr255\t\tfileName;\t\t/* file name */\n};\ntypedef struct FREFRec FREFRec;\ntypedef FREFRec **FREFRecHandle;\n\nstruct APPLRec\n{\n\tOSType\t\tcreator;\t\t/* creator type signature */\n\tlong\t\tparID;\t\t\t/* parent directory ID */\n\tStr255\t\tapplName;\t\t/* application name */\n};\ntypedef struct APPLRec APPLRec;\ntypedef APPLRec *APPLRecPtr;\n\n#if PRAGMA_STRUCT_ALIGN\n#pragma options align=reset\n#endif\n\n/*****************************************************************************/\n\n/* static prototypes */\n\nstatic\tOSErr\tGetDesktopFileName(short vRefNum,\n\t\t\t\t\t\t\t\t   Str255 desktopName);\n\nstatic\tOSErr\tGetAPPLFromDesktopFile(ConstStr255Param volName,\n\t\t\t\t\t\t\t\t\t   short vRefNum,\n\t\t\t\t\t\t\t\t\t   OSType creator,\n\t\t\t\t\t\t\t\t\t   short *applVRefNum,\n\t\t\t\t\t\t\t\t\t   long *applParID,\n\t\t\t\t\t\t\t\t\t   Str255 applName);\n\nstatic\tOSErr\tFindBundleGivenCreator(OSType creator,\n\t\t\t\t\t\t\t\t\t   BNDLRecHandle *returnBndl);\n\t\t\t\t\t\t\t\t\t   \nstatic\tOSErr\tFindTypeInBundle(OSType typeToFind,\n\t\t\t\t\t\t\t\t BNDLRecHandle theBndl,\n\t\t\t\t\t\t\t\t BundleTypePtr *returnBundleType);\n\t\t\t\t\t\t\t\t\t\t \nstatic\tOSErr\tGetLocalIDFromFREF(BundleTypePtr theBundleType,\n\t\t\t\t\t\t\t\t   OSType fileType,\n\t\t\t\t\t\t\t\t   short *iconLocalID);\n\nstatic\tOSErr\tGetIconRsrcIDFromLocalID(BundleTypePtr theBundleType,\n\t\t\t\t\t\t\t\t\t\t short iconLocalID,\n\t\t\t\t\t\t\t\t\t\t short *iconRsrcID);\n\nstatic\tOSType\tDTIconToResIcon(short iconType);\n\nstatic\tOSErr\tGetIconFromDesktopFile(ConstStr255Param volName,\n\t\t\t\t\t\t\t\t\t   short vRefNum,\n\t\t\t\t\t\t\t\t\t   short iconType,\n\t\t\t\t\t\t\t\t\t   OSType fileCreator,\n\t\t\t\t\t\t\t\t\t   OSType fileType,\n\t\t\t\t\t\t\t\t\t   Handle *iconHandle);\n\nstatic\tOSErr\tGetCommentID(short vRefNum,\n\t\t\t\t\t\t\t long dirID,\n\t\t\t\t\t\t\t ConstStr255Param name,\n\t\t\t\t\t\t\t short *commentID);\n\nstatic\tOSErr\tGetCommentFromDesktopFile(short vRefNum,\n\t\t\t\t\t\t\t\t\t\t  long dirID,\n\t\t\t\t\t\t\t\t\t\t  ConstStr255Param name,\n\t\t\t\t\t\t\t\t\t\t  Str255 comment);\n\n/*****************************************************************************/\n\n/*\n**\tGetDesktopFileName\n**\n**\tGet the name of the Desktop file.\n*/\nstatic\tOSErr\tGetDesktopFileName(short vRefNum,\n\t\t\t\t\t\t\t\t   Str255 desktopName)\n{\n\tOSErr\t\t\terror;\n\tHParamBlockRec\tpb;\n\tshort\t\t\tindex;\n\tBoolean\t\t\tfound;\n\t\n\tpb.fileParam.ioNamePtr = desktopName;\n\tpb.fileParam.ioVRefNum = vRefNum;\n\tpb.fileParam.ioFVersNum = 0;\n\tindex = 1;\n\tfound = false;\n\tdo\n\t{\n\t\tpb.fileParam.ioDirID = fsRtDirID;\n\t\tpb.fileParam.ioFDirIndex = index;\n\t\terror = PBHGetFInfoSync(&pb);\n\t\tif ( error == noErr )\n\t\t{\n\t\t\tif ( (pb.fileParam.ioFlFndrInfo.fdType == 'FNDR') &&\n\t\t\t\t (pb.fileParam.ioFlFndrInfo.fdCreator == 'ERIK') )\n\t\t\t{\n\t\t\t\tfound = true;\n\t\t\t}\n\t\t}\n\t\t++index;\n\t} while ( (error == noErr) && !found );\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tDTOpen(ConstStr255Param volName,\n\t\t\t\t\t   short vRefNum,\n\t\t\t\t\t   short *dtRefNum,\n\t\t\t\t\t   Boolean *newDTDatabase)\n{\n\tOSErr error;\n\tGetVolParmsInfoBuffer volParmsInfo;\n\tlong infoSize;\n\tDTPBRec pb;\n\t\n\t/* Check for volume Desktop Manager support before calling */\n\tinfoSize = sizeof(GetVolParmsInfoBuffer);\n\terror = HGetVolParms(volName, vRefNum, &volParmsInfo, &infoSize);\n\tif ( error == noErr )\n\t{\n\t\tif ( hasDesktopMgr(volParmsInfo) )\n\t\t{\n\t\t\tpb.ioNamePtr = (StringPtr)volName;\n\t\t\tpb.ioVRefNum = vRefNum;\n\t\t\terror = PBDTOpenInform(&pb);\n\t\t\t/* PBDTOpenInform informs us if the desktop was just created */\n\t\t\t/* by leaving the low bit of ioTagInfo clear (0) */\n\t\t\t*newDTDatabase = ((pb.ioTagInfo & 1L) == 0);\n\t\t\tif ( error == paramErr )\n\t\t\t{\n\t\t\t\terror = PBDTGetPath(&pb);\n\t\t\t\t/* PBDTGetPath doesn't tell us if the database is new */\n\t\t\t\t/* so assume it is not new */\n\t\t\t\t*newDTDatabase = false;\n\t\t\t}\n\t\t\t*dtRefNum = pb.ioDTRefNum;\n\t\t}\n\t\telse\n\t\t{\n\t\t\terror = paramErr;\n\t\t}\n\t}\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\n/*\n**\tGetAPPLFromDesktopFile\n**\n**\tGet a application's location from the\n**\tDesktop file's 'APPL' resources.\n*/\nstatic\tOSErr\tGetAPPLFromDesktopFile(ConstStr255Param volName,\n\t\t\t\t\t\t\t\t\t   short vRefNum,\n\t\t\t\t\t\t\t\t\t   OSType creator,\n\t\t\t\t\t\t\t\t\t   short *applVRefNum,\n\t\t\t\t\t\t\t\t\t   long *applParID,\n\t\t\t\t\t\t\t\t\t   Str255 applName)\n{\n\tOSErr error;\n\tshort realVRefNum;\n\tStr255 desktopName;\n\tshort savedResFile;\n\tshort dfRefNum;\n\tHandle applResHandle;\n\tBoolean foundCreator;\n\tPtr applPtr;\n\tlong applSize;\n\t\n\terror = DetermineVRefNum(volName, vRefNum, &realVRefNum);\n\tif ( error == noErr )\n\t{\n\t\terror = GetDesktopFileName(realVRefNum, desktopName);\n\t\tif ( error == noErr )\n\t\t{\n\t\t\tsavedResFile = CurResFile();\n\t\t\t/*\n\t\t\t**\tOpen the 'Desktop' file in the root directory. (because\n\t\t\t**\topening the resource file could preload unwanted resources,\n\t\t\t**\tbracket the call with SetResLoad(s))\n\t\t\t*/\n\t\t\tSetResLoad(false);\n\t\t\tdfRefNum = HOpenResFile(realVRefNum, fsRtDirID, desktopName, fsRdPerm);\n\t\t\tSetResLoad(true);\n\t\t\t\n\t\t\tif ( dfRefNum != -1)\n\t\t\t{\n\t\t\t\t/* Get 'APPL' resource ID 0 */\n\t\t\t\tapplResHandle = Get1Resource(kAPPLResType, 0);\n\t\t\t\tif ( applResHandle != NULL )\n\t\t\t\t{\n\t\t\t\t\tapplSize = GetHandleSize((Handle)applResHandle);\n\t\t\t\t\tif ( applSize != 0 )\t/* make sure the APPL resource isn't empty */\n\t\t\t\t\t{\n\t\t\t\t\t\tfoundCreator = false;\n\t\t\t\t\t\tapplPtr = *applResHandle;\n\t\t\t\t\t\t\n\t\t\t\t\t\t/* APPL's don't have a count so I have to use the size as the bounds */\n\t\t\t\t\t\twhile ( (foundCreator == false) &&\n\t\t\t\t\t\t\t\t(applPtr < (*applResHandle + applSize)) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ( ((APPLRecPtr)applPtr)->creator == creator )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfoundCreator = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* fun with pointer math... */\n\t\t\t\t\t\t\t\tapplPtr += sizeof(OSType) +\n\t\t\t\t\t\t\t\t\t\t   sizeof(long) +\n\t\t\t\t\t\t\t\t\t\t   ((APPLRecPtr)applPtr)->applName[0] + 1;\n\t\t\t\t\t\t\t\t/* application mappings are word aligned within the resource */\n\t\t\t\t\t\t\t\tif ( ((unsigned long)applPtr % 2) != 0 )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tapplPtr += 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( foundCreator == true )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t*applVRefNum = realVRefNum;\n\t\t\t\t\t\t\t*applParID = ((APPLRecPtr)applPtr)->parID;\n\t\t\t\t\t\t\tBlockMoveData(((APPLRecPtr)applPtr)->applName,\n\t\t\t\t\t\t\t\t\t\t  applName,\n\t\t\t\t\t\t\t\t\t\t  ((APPLRecPtr)applPtr)->applName[0] + 1);\n\t\t\t\t\t\t\t/* error is already noErr */\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\terror = afpItemNotFound;\t/* didn't find a creator match */\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\terror = afpItemNotFound;\t/* no APPL mapping available */\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\terror = afpItemNotFound;\t/* no APPL mapping available */\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* restore the resource chain and close the Desktop file */\n\t\t\t\tUseResFile(savedResFile);\n\t\t\t\tCloseResFile(dfRefNum);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\terror = afpItemNotFound;\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tDTXGetAPPL(ConstStr255Param volName,\n\t\t\t\t\t\t   short vRefNum,\n\t\t\t\t\t\t   OSType creator,\n\t\t\t\t\t\t   Boolean searchCatalog,\n\t\t\t\t\t\t   short *applVRefNum,\n\t\t\t\t\t\t   long *applParID,\n\t\t\t\t\t\t   Str255 applName)\n{\n\tOSErr error;\n\tUniversalFMPB pb;\n\tshort dtRefNum;\n\tBoolean newDTDatabase;\n\tshort realVRefNum;\n\tshort index;\n\tBoolean applFound;\n\tFSSpec spec;\n\tlong actMatchCount;\n\t\n\t/* get the real vRefNum */\n\terror = DetermineVRefNum(volName, vRefNum, &realVRefNum);\n\tif ( error == noErr )\n\t{\n\t\terror = DTOpen(volName, vRefNum, &dtRefNum, &newDTDatabase);\n\t\tif ( error == noErr )\n\t\t{\n\t\t\tif ( !newDTDatabase )\n\t\t\t{\n\t\t\t\tindex = 0;\n\t\t\t\tapplFound = false;\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\tpb.dtPB.ioNamePtr = applName;\n\t\t\t\t\tpb.dtPB.ioDTRefNum = dtRefNum;\n\t\t\t\t\tpb.dtPB.ioIndex = index;\n\t\t\t\t\tpb.dtPB.ioFileCreator = creator;\n\t\t\t\t\terror = PBDTGetAPPLSync(&pb.dtPB);\n\t\t\t\t\tif ( error == noErr )\n\t\t\t\t\t{\n\t\t\t\t\t\t/* got a match - see if it is valid */\n\t\t\t\t\t\t\n\t\t\t\t\t\t*applVRefNum = realVRefNum; /* get the vRefNum now */\n\t\t\t\t\t\t*applParID = pb.dtPB.ioAPPLParID; /* get the parent ID now */\n\t\n\t\t\t\t\t\t/* pb.hPB.fileParam.ioNamePtr is already set */\n\t\t\t\t\t\tpb.hPB.fileParam.ioVRefNum = realVRefNum;\n\t\t\t\t\t\tpb.hPB.fileParam.ioFVersNum = 0;\n\t\t\t\t\t\tpb.hPB.fileParam.ioDirID = *applParID;\n\t\t\t\t\t\tpb.hPB.fileParam.ioFDirIndex = 0;\t/* use ioNamePtr and ioDirID */\n\t\t\t\t\t\tif ( PBHGetFInfoSync(&pb.hPB) == noErr )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ( (pb.hPB.fileParam.ioFlFndrInfo.fdCreator == creator) &&\n\t\t\t\t\t\t\t\t (pb.hPB.fileParam.ioFlFndrInfo.fdType == 'APPL') )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tapplFound = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t++index;\n\t\t\t\t} while ( (error == noErr) && !applFound );\n\t\t\t\tif ( error != noErr )\n\t\t\t\t{\n\t\t\t\t\terror = afpItemNotFound;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t/* Desktop database is empty (new), set error to try CatSearch */\n\t\t\t\terror = afpItemNotFound;\n\t\t\t}\n\t\t}\n\t\t/* acceptable errors from Desktop Manager to continue are paramErr or afpItemNotFound */\n\t\tif ( error == paramErr )\n\t\t{\n\t\t\t/* if paramErr, the volume didn't support the Desktop Manager */\n\t\t\t/* try the Desktop file */\n\t\t\t\n\t\t\terror = GetAPPLFromDesktopFile(volName, vRefNum, creator,\n\t\t\t\t\t\t\t\t\t\t\tapplVRefNum, applParID, applName);\n\t\t\tif ( error == noErr )\n\t\t\t{\n\t\t\t\t/* got a match - see if it is valid */\n\t\t\t\t\n\t\t\t\tpb.hPB.fileParam.ioNamePtr = applName;\n\t\t\t\tpb.hPB.fileParam.ioVRefNum = *applVRefNum;\n\t\t\t\tpb.hPB.fileParam.ioFVersNum = 0;\n\t\t\t\tpb.hPB.fileParam.ioDirID = *applParID;\n\t\t\t\tpb.hPB.fileParam.ioFDirIndex = 0;\t/* use ioNamePtr and ioDirID */\n\t\t\t\tif ( PBHGetFInfoSync(&pb.hPB) == noErr )\n\t\t\t\t{\n\t\t\t\t\tif ( (pb.hPB.fileParam.ioFlFndrInfo.fdCreator != creator) ||\n\t\t\t\t\t\t (pb.hPB.fileParam.ioFlFndrInfo.fdType != 'APPL') )\n\t\t\t\t\t{\n\t\t\t\t\t\terror = afpItemNotFound;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ( error == fnfErr )\n\t\t\t\t{\n\t\t\t\t\terror = afpItemNotFound;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t/* acceptable error from DesktopFile code to continue is afpItemNotFound */\n\t\tif ( (error == afpItemNotFound) && searchCatalog)\n\t\t{\n\t\t\t/* Couldn't be found in the Desktop file either, */\n\t\t\t/* try searching with CatSearch if requested */\n\t\t\t\n\t\t\terror = CreatorTypeFileSearch(NULL, realVRefNum, creator, kAPPLResType, &spec, 1,\n\t\t\t\t\t\t\t\t\t\t\t&actMatchCount, true);\n\t\t\tif ( (error == noErr) || (error == eofErr) )\n\t\t\t{\n\t\t\t\tif ( actMatchCount > 0 )\n\t\t\t\t{\n\t\t\t\t\t*applVRefNum = spec.vRefNum;\n\t\t\t\t\t*applParID = spec.parID;\n\t\t\t\t\tBlockMoveData(spec.name, applName, spec.name[0] + 1);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\terror = afpItemNotFound;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpDTXGetAPPL(ConstStr255Param volName,\n\t\t\t\t\t\t\t  short vRefNum,\n\t\t\t\t\t\t\t  OSType creator,\n\t\t\t\t\t\t\t  Boolean searchCatalog,\n\t\t\t\t\t\t\t  FSSpec *spec)\n{\n\treturn ( DTXGetAPPL(volName, vRefNum, creator, searchCatalog,\n\t\t\t\t\t\t&(spec->vRefNum), &(spec->parID), spec->name) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tDTGetAPPL(ConstStr255Param volName,\n\t\t\t\t\t\t  short vRefNum,\n\t\t\t\t\t\t  OSType creator,\n\t\t\t\t\t\t  short *applVRefNum,\n\t\t\t\t\t\t  long *applParID,\n\t\t\t\t\t\t  Str255 applName)\n{\n\t/* Call DTXGetAPPL with the \"searchCatalog\" parameter true */ \n\treturn ( DTXGetAPPL(volName, vRefNum, creator, true,\n\t\t\t\t\t\tapplVRefNum, applParID, applName) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpDTGetAPPL(ConstStr255Param volName,\n\t\t\t\t\t\t\t short vRefNum,\n\t\t\t\t\t\t\t OSType creator,\n\t\t\t\t\t\t\t FSSpec *spec)\n{\n\t/* Call DTXGetAPPL with the \"searchCatalog\" parameter true */ \n\treturn ( DTXGetAPPL(volName, vRefNum, creator, true,\n\t\t\t\t\t\t&(spec->vRefNum), &(spec->parID), spec->name) );\n}\n\n/*****************************************************************************/\n\n/*\n**\tFindBundleGivenCreator\n**\n**\tSearch the current resource file for the 'BNDL' resource with the given\n**\tcreator and return a handle to it.\n*/\nstatic\tOSErr\tFindBundleGivenCreator(OSType creator,\n\t\t\t\t\t\t\t\t\t   BNDLRecHandle *returnBndl)\n{\n\tOSErr\t\t\terror;\n\tshort\t\t\tnumOfBundles;\n\tshort\t\t\tindex;\n\tBNDLRecHandle\ttheBndl;\n\t\n\terror = afpItemNotFound;\t/* default to not found */\n\t\n\t/* Search each BNDL resource until we find the one with a matching creator. */\n\t\n\tnumOfBundles = Count1Resources(kBNDLResType);\n\tindex = 1;\n\t*returnBndl = NULL;\n\t\n\twhile ( (index <= numOfBundles) && (*returnBndl == NULL) )\n\t{\n\t\ttheBndl = (BNDLRecHandle)Get1IndResource(kBNDLResType, index);\n\t\t\n\t\tif ( theBndl != NULL )\n\t\t{\n\t\t\tif ( (*theBndl)->signature == creator )\n\t\t\t{\n\t\t\t\t/* numTypes and typeArray->count will always be the actual count minus 1, */\n\t\t\t\t/* so 0 in both fields is valid. */\n\t\t\t\tif ( ((*theBndl)->numTypes >= 0) && ((*theBndl)->typeArray->count >= 0) )\n\t\t\t\t{\n\t\t\t\t\t/* got it */\n\t\t\t\t\t*returnBndl = theBndl;\n\t\t\t\t\terror = noErr;\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t\t\n\t\tindex ++;\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\n/*\n**\tFindTypeInBundle\n**\n**\tGiven a Handle to a BNDL return a pointer to the desired type\n**\tin it. If the type is not found, or if the type's count < 0,\n**\treturn afpItemNotFound.\n*/\nstatic\tOSErr\tFindTypeInBundle(OSType typeToFind,\n\t\t\t\t\t\t\t\t BNDLRecHandle theBndl,\n\t\t\t\t\t\t\t\t BundleTypePtr *returnBundleType)\n{\n\tOSErr\t\t\terror;\n\tshort\t\t\tindex;\n\tPtr\t\t\t\tptrIterator;\t/* use a Ptr so we can do ugly pointer math */\n\t\n\terror = afpItemNotFound;\t/* default to not found */\n\t\n\tptrIterator = (Ptr)((*theBndl)->typeArray);\n\tindex = 0;\n\t*returnBundleType = NULL;\n\n\twhile ( (index < ((*theBndl)->numTypes + 1)) &&\n\t\t\t(*returnBundleType == NULL) )\n\t{\n\t\tif ( (((BundleTypePtr)ptrIterator)->type == typeToFind) &&\n\t\t\t (((BundleTypePtr)ptrIterator)->count >= 0) )\n\t\t{\n\t\t\t\t*returnBundleType = (BundleTypePtr)ptrIterator;\n\t\t\t\terror = noErr;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tptrIterator += ( sizeof(OSType) +\n\t\t\t\t\t\t\t sizeof(short) +\n\t\t\t\t\t\t\t ( sizeof(IDRec) * (((BundleTypePtr)ptrIterator)->count + 1) ) );\n\t\t\t++index;\n\t\t}\n\t}\n\t\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\n/*\n**\tGetLocalIDFromFREF\n**\n**\tGiven a pointer to a 'FREF' BundleType record, load each 'FREF' resource\n**\tlooking for a matching fileType. If a matching fileType is found, return\n**\tits icon local ID. If no match is found, return afpItemNotFound as the\n**\tfunction result.\n*/\nstatic\tOSErr\tGetLocalIDFromFREF(BundleTypePtr theBundleType,\n\t\t\t\t\t\t\t\t   OSType fileType,\n\t\t\t\t\t\t\t\t   short *iconLocalID)\n{\n\tOSErr\t\t\terror;\n\tshort\t\t\tindex;\n\tIDRecPtr\t\tidIterator;\n\tFREFRecHandle\ttheFref;\n\t\n\terror = afpItemNotFound;\t/* default to not found */\n\t\n\t/* For each localID in this type, get the FREF resource looking for fileType */\n\tindex = 0;\n\tidIterator = &theBundleType->idArray[0];\n\t*iconLocalID = 0;\n\t\n\twhile ( (index <= theBundleType->count) && (*iconLocalID == 0) )\n\t{\n\t\ttheFref = (FREFRecHandle)Get1Resource(kFREFResType, idIterator->rsrcID);\n\t\tif ( theFref != NULL )\n\t\t{\n\t\t\tif ( (*theFref)->fileType == fileType )\n\t\t\t{\n\t\t\t\t*iconLocalID = (*theFref)->iconID;\n\t\t\t\terror = noErr;\n\t\t\t}\n\t\t}\n\t\t\n\t\t++idIterator;\n\t\t++index;\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\n/*\n**\tGetIconRsrcIDFromLocalID\n**\n**\tGiven a pointer to a 'ICN#' BundleType record, look for the IDRec with\n**\tthe localID that matches iconLocalID. If a matching IDRec is found,\n**\treturn the IDRec's rsrcID field value. If no match is found, return\n**\tafpItemNotFound as the function result.\n*/\nstatic\tOSErr\tGetIconRsrcIDFromLocalID(BundleTypePtr theBundleType,\n\t\t\t\t\t\t\t\t\t\t short iconLocalID,\n\t\t\t\t\t\t\t\t\t\t short *iconRsrcID)\n{\n\tOSErr\t\terror;\n\tshort\t\tindex;\n\tIDRecPtr\tidIterator;\n\t\n\terror = afpItemNotFound;\t/* default to not found */\n\t\n\t/* Find the rsrcID of the icon family type, given the localID */\n\tindex = 0;\n\tidIterator = &theBundleType->idArray[0];\n\t*iconRsrcID = 0;\n\t\n\twhile ( (index <= theBundleType->count) && (*iconRsrcID == 0) )\n\t{\n\t\tif ( idIterator->localID == iconLocalID )\n\t\t{\n\t\t\t*iconRsrcID = idIterator->rsrcID;\n\t\t\terror = noErr;\n\t\t}\n\t\t\n\t\tidIterator ++;\n\t\tindex ++;\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\n/*\n**\tDTIconToResIcon\n**\n**\tMap a Desktop Manager icon type to the corresponding resource type.\n**\tReturn (OSType)0 if there is no corresponding resource type.\n*/\nstatic\tOSType\tDTIconToResIcon(short iconType)\n{\n\tOSType\tresType;\n\t\n\tswitch ( iconType )\n\t{\n\t\tcase kLargeIcon:\n\t\t\tresType = large1BitMask;\n\t\t\tbreak;\n\t\tcase kLarge4BitIcon:\n\t\t\tresType = large4BitData;\n\t\t\tbreak;\n\t\tcase kLarge8BitIcon:\n\t\t\tresType = large8BitData;\n\t\t\tbreak;\n\t\tcase kSmallIcon:\n\t\t\tresType = small1BitMask;\n\t\t\tbreak;\n\t\tcase kSmall4BitIcon:\n\t\t\tresType = small4BitData;\n\t\t\tbreak;\n\t\tcase kSmall8BitIcon:\n\t\t\tresType = small8BitData;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tresType = (OSType)0;\n\t\t\tbreak;\n\t}\n\t\n\treturn ( resType );\n}\n\n/*****************************************************************************/\n\n/*\n**\tGetIconFromDesktopFile\n**\n**\tINPUT a pointer to a non-existent Handle, because we'll allocate one\n**\n**\tsearch each BNDL resource for the right fileCreator and once we get it\n**\t\tfind the 'FREF' type in BNDL\n**\t\tfor each localID in the type, open the FREF resource\n**\t\t\tif the FREF is the desired fileType\n**\t\t\t\tget its icon localID\n**\t\t\t\tget the ICN# type in BNDL\n**\t\t\t\tget the icon resource number from the icon localID\n**\t\t\t\tget the icon resource type from the desktop mgr's iconType\n**\t\t\t\tget the icon of that type and number\n*/\nstatic\tOSErr\tGetIconFromDesktopFile(ConstStr255Param volName,\n\t\t\t\t\t\t\t\t\t   short vRefNum,\n\t\t\t\t\t\t\t\t\t   short iconType,\n\t\t\t\t\t\t\t\t\t   OSType fileCreator,\n\t\t\t\t\t\t\t\t\t   OSType fileType,\n\t\t\t\t\t\t\t\t\t   Handle *iconHandle)\n{\n\tOSErr\t\t\terror;\n\tshort\t\t\trealVRefNum;\n\tStr255\t\t\tdesktopName;\n\tshort\t\t\tsavedResFile;\n\tshort\t\t\tdfRefNum;\n\tBNDLRecHandle\ttheBndl = NULL;\n\tBundleTypePtr\ttheBundleType;\n\tshort\t\t\ticonLocalID;\n\tshort\t\t\ticonRsrcID;\n\tOSType\t\t\ticonRsrcType;\n\tHandle\t\t\treturnIconHandle;\t\n\tchar\t\t\tbndlState;\n\t\n\t*iconHandle = NULL;\n\t\n\terror = DetermineVRefNum(volName, vRefNum, &realVRefNum);\n\tif ( error == noErr )\n\t{\n\t\terror = GetDesktopFileName(realVRefNum, desktopName);\n\t\tif ( error == noErr )\n\t\t{\n\t\t\tsavedResFile = CurResFile();\n\t\t\n\t\t\t/*\n\t\t\t**\tOpen the 'Desktop' file in the root directory. (because\n\t\t\t**\topening the resource file could preload unwanted resources,\n\t\t\t**\tbracket the call with SetResLoad(s))\n\t\t\t*/\n\t\t\tSetResLoad(false);\n\t\t\tdfRefNum = HOpenResFile(realVRefNum, fsRtDirID, desktopName, fsRdPerm);\n\t\t\tSetResLoad(true);\n\t\t\n\t\t\tif ( dfRefNum != -1 )\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\t**\tFind the BNDL resource with the specified creator.\n\t\t\t\t*/\n\t\t\t\terror = FindBundleGivenCreator(fileCreator, &theBndl);\n\t\t\t\tif ( error == noErr )\n\t\t\t\t{\n\t\t\t\t\t/* Lock the BNDL resource so it won't be purged when other resources are loaded */\n\t\t\t\t\tbndlState = HGetState((Handle)theBndl);\n\t\t\t\t\tHLock((Handle)theBndl);\n\t\t\t\t\t\n\t\t\t\t\t/* Find the 'FREF' BundleType record in the BNDL resource. */\n\t\t\t\t\terror = FindTypeInBundle(kFREFResType, theBndl, &theBundleType);\n\t\t\t\t\tif ( error == noErr )\n\t\t\t\t\t{\n\t\t\t\t\t\t/* Find the local ID in the 'FREF' resource with the specified fileType */\n\t\t\t\t\t\terror = GetLocalIDFromFREF(theBundleType, fileType, &iconLocalID);\n\t\t\t\t\t\tif ( error == noErr )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/* Find the 'ICN#' BundleType record in the BNDL resource. */\n\t\t\t\t\t\t\terror = FindTypeInBundle(kIconFamResType, theBndl, &theBundleType);\n\t\t\t\t\t\t\tif ( error == noErr )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* Find the icon's resource ID in the 'ICN#' BundleType record */\n\t\t\t\t\t\t\t\terror = GetIconRsrcIDFromLocalID(theBundleType, iconLocalID, &iconRsrcID);\n\t\t\t\t\t\t\t\tif ( error == noErr )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t/* Map Desktop Manager icon type to resource type */\n\t\t\t\t\t\t\t\t\ticonRsrcType = DTIconToResIcon(iconType);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif ( iconRsrcType != (OSType)0 )\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t/* Load the icon */\n\t\t\t\t\t\t\t\t\t\treturnIconHandle = Get1Resource(iconRsrcType, iconRsrcID);\n\t\t\t\t\t\t\t\t\t\tif ( returnIconHandle != NULL )\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t/* Copy the resource handle, and return the copy */\n\t\t\t\t\t\t\t\t\t\t\tHandToHand(&returnIconHandle);\n\t\t\t\t\t\t\t\t\t\t\tif ( MemError() == noErr )\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t*iconHandle = returnIconHandle;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\terror = afpItemNotFound;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\terror = afpItemNotFound;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t/* Restore the state of the BNDL resource */ \n\t\t\t\t\tHSetState((Handle)theBndl, bndlState);\n\t\t\t\t}\n\t\t\t\t/* Restore the resource chain and close the Desktop file */\n\t\t\t\tUseResFile(savedResFile);\n\t\t\t\tCloseResFile(dfRefNum);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\terror = ResError(); /* could not open Desktop file */\n\t\t\t}\n\t\t}\n\t\tif ( (error != noErr) && (error != memFullErr) )\n\t\t{\n\t\t\terror = afpItemNotFound;\t/* force an error we should return */\n\t\t}\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tDTGetIcon(ConstStr255Param volName,\n\t\t\t\t\t\t  short vRefNum,\n\t\t\t\t\t\t  short iconType,\n\t\t\t\t\t\t  OSType fileCreator,\n\t\t\t\t\t\t  OSType fileType,\n\t\t\t\t\t\t  Handle *iconHandle)\n{\n\tOSErr error;\n\tDTPBRec pb;\n\tshort dtRefNum;\n\tBoolean newDTDatabase;\n\tSize bufferSize;\n\t\n\t*iconHandle = NULL;\n\terror = DTOpen(volName, vRefNum, &dtRefNum, &newDTDatabase);\n\tif ( error == noErr )\n\t{\n\t\t/* there was a desktop database and it's now open */\n\t\t\n\t\tif ( !newDTDatabase )\t/* don't bother to look in a new (empty) database */\n\t\t{\n\t\t\t/* get the buffer size for the requested icon type */\n\t\t\tswitch ( iconType )\n\t\t\t{\n\t\t\t\tcase kLargeIcon:\n\t\t\t\t\tbufferSize = kLargeIconSize;\n\t\t\t\t\tbreak;\n\t\t\t\tcase kLarge4BitIcon:\n\t\t\t\t\tbufferSize = kLarge4BitIconSize;\n\t\t\t\t\tbreak;\n\t\t\t\tcase kLarge8BitIcon:\n\t\t\t\t\tbufferSize = kLarge8BitIconSize;\n\t\t\t\t\tbreak;\n\t\t\t\tcase kSmallIcon:\n\t\t\t\t\tbufferSize = kSmallIconSize;\n\t\t\t\t\tbreak;\n\t\t\t\tcase kSmall4BitIcon:\n\t\t\t\t\tbufferSize = kSmall4BitIconSize;\n\t\t\t\t\tbreak;\n\t\t\t\tcase kSmall8BitIcon:\n\t\t\t\t\tbufferSize = kSmall8BitIconSize;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\ticonType = 0;\n\t\t\t\t\tbufferSize = 0;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( bufferSize != 0 )\n\t\t\t{\n\t\t\t\t*iconHandle = NewHandle(bufferSize);\n\t\t\t\tif ( *iconHandle != NULL )\n\t\t\t\t{\n\t\t\t\t\tHLock(*iconHandle);\n\t\t\n\t\t\t\t\tpb.ioDTRefNum = dtRefNum;\n\t\t\t\t\tpb.ioTagInfo = 0;\n\t\t\t\t\tpb.ioDTBuffer = **iconHandle;\n\t\t\t\t\tpb.ioDTReqCount = bufferSize;\n\t\t\t\t\tpb.ioIconType = iconType;\n\t\t\t\t\tpb.ioFileCreator = fileCreator;\n\t\t\t\t\tpb.ioFileType = fileType;\n\t\t\t\t\terror = PBDTGetIconSync(&pb);\n\t\n\t\t\t\t\tHUnlock(*iconHandle);\n\t\t\t\t\t\n\t\t\t\t\tif ( error != noErr )\n\t\t\t\t\t{\n\t\t\t\t\t\tDisposeHandle(*iconHandle);\t/* dispose of the allocated memory */\n\t\t\t\t\t\t*iconHandle = NULL;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\terror = memFullErr;\t/* handle could not be allocated */\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\terror = paramErr;\t/* unknown icon type requested */\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\terror = afpItemNotFound;\t/* the desktop database was empty - nothing to return */\n\t\t}\n\t}\n\telse\n\t{\n\t\t/* There is no desktop database - try the Desktop file */\n\t\t\n\t\terror = GetIconFromDesktopFile(volName, vRefNum, iconType,\n\t\t\t\t\t\t\t\t\t\tfileCreator, fileType, iconHandle);\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tDTSetComment(short vRefNum,\n\t\t\t\t\t\t\t long dirID,\n\t\t\t\t\t\t\t ConstStr255Param name,\n\t\t\t\t\t\t\t ConstStr255Param comment)\n{\n\tDTPBRec pb;\n\tOSErr error;\n\tshort dtRefNum;\n\tBoolean newDTDatabase;\n\n\terror = DTOpen(name, vRefNum, &dtRefNum, &newDTDatabase);\n\tif ( error == noErr )\n\t{\n\t\tpb.ioDTRefNum = dtRefNum;\n\t\tpb.ioNamePtr = (StringPtr)name;\n\t\tpb.ioDirID = dirID;\n\t\tpb.ioDTBuffer = (Ptr)&comment[1];\n\t\t/* Truncate the comment to 200 characters just in case */\n\t\t/* some file system doesn't range check */\n\t\tif ( comment[0] <= 200 )\n\t\t{\n\t\t\tpb.ioDTReqCount = comment[0];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpb.ioDTReqCount = 200;\n\t\t}\n\t\terror = PBDTSetCommentSync(&pb);\n\t}\n\treturn (error);\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpDTSetComment(const FSSpec *spec,\n\t\t\t\t\t\t\t  ConstStr255Param comment)\n{\n\treturn (DTSetComment(spec->vRefNum, spec->parID, spec->name, comment));\n}\n\n/*****************************************************************************/\n\n/*\n**\tGetCommentID\n**\n**\tGet the comment ID number for the Desktop file's 'FCMT' resource ID from\n**\tthe file or folders fdComment (frComment) field.\n*/\nstatic\tOSErr\tGetCommentID(short vRefNum,\n\t\t\t\t\t\t\t long dirID,\n\t\t\t\t\t\t\t ConstStr255Param name,\n\t\t\t\t\t\t\t short *commentID)\n{\n\tCInfoPBRec pb;\n\tOSErr error;\n\n\terror = GetCatInfoNoName(vRefNum, dirID, name, &pb);\n\t*commentID = pb.hFileInfo.ioFlXFndrInfo.fdComment;\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\n/*\n**\tGetCommentFromDesktopFile\n**\n**\tGet a file or directory's Finder comment field (if any) from the\n**\tDesktop file's 'FCMT' resources.\n*/\nstatic\tOSErr\tGetCommentFromDesktopFile(short vRefNum,\n\t\t\t\t\t\t\t\t\t\t  long dirID,\n\t\t\t\t\t\t\t\t\t\t  ConstStr255Param name,\n\t\t\t\t\t\t\t\t\t\t  Str255 comment)\n{\n\tOSErr error;\n\tshort commentID;\n\tshort realVRefNum;\n\tStr255 desktopName;\n\tshort savedResFile;\n\tshort dfRefNum;\n\tStringHandle commentHandle;\n\t\n\t/* Get the comment ID number */\n\terror = GetCommentID(vRefNum, dirID, name, &commentID);\n\tif ( error == noErr )\n\t{\n\t\tif ( commentID != 0 )\t/* commentID == 0 means there's no comment */\n\t\t{\n\t\t\terror = DetermineVRefNum(name, vRefNum, &realVRefNum);\n\t\t\tif ( error == noErr )\n\t\t\t{\n\t\t\t\terror = GetDesktopFileName(realVRefNum, desktopName);\n\t\t\t\tif ( error == noErr )\n\t\t\t\t{\n\t\t\t\t\tsavedResFile = CurResFile();\n\t\t\t\t\t/*\n\t\t\t\t\t**\tOpen the 'Desktop' file in the root directory. (because\n\t\t\t\t\t**\topening the resource file could preload unwanted resources,\n\t\t\t\t\t**\tbracket the call with SetResLoad(s))\n\t\t\t\t\t*/\n\t\t\t\t\tSetResLoad(false);\n\t\t\t\t\tdfRefNum = HOpenResFile(realVRefNum, fsRtDirID, desktopName, fsRdPerm);\n\t\t\t\t\tSetResLoad(true);\n\t\t\t\t\t\n\t\t\t\t\tif ( dfRefNum != -1)\n\t\t\t\t\t{\n\t\t\t\t\t\t/* Get the comment resource */\n\t\t\t\t\t\tcommentHandle = (StringHandle)Get1Resource(kFCMTResType,commentID);\n\t\t\t\t\t\tif ( commentHandle != NULL )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ( GetHandleSize((Handle)commentHandle) > 0 )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tBlockMoveData(*commentHandle, comment, *commentHandle[0] + 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\terror = afpItemNotFound;\t/* no comment available */\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\terror = afpItemNotFound;\t/* no comment available */\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t/* restore the resource chain and close the Desktop file */\n\t\t\t\t\t\tUseResFile(savedResFile);\n\t\t\t\t\t\tCloseResFile(dfRefNum);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\terror = afpItemNotFound;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\terror = afpItemNotFound;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\terror = afpItemNotFound;\t/* no comment available */\n\t\t}\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tDTGetComment(short vRefNum,\n\t\t\t\t\t\t\t long dirID,\n\t\t\t\t\t\t\t ConstStr255Param name,\n\t\t\t\t\t\t\t Str255 comment)\n{\n\tDTPBRec pb;\n\tOSErr error;\n\tshort dtRefNum;\n\tBoolean newDTDatabase;\n\n\tif (comment != NULL)\n\t{\n\t\tcomment[0] = 0;\t/* return nothing by default */\n\t\t\n\t\t/* attempt to open the desktop database */\n\t\terror = DTOpen(name, vRefNum, &dtRefNum, &newDTDatabase);\n\t\tif ( error == noErr )\n\t\t{\n\t\t\t/* There was a desktop database and it's now open */\n\t\t\t\n\t\t\tif ( !newDTDatabase )\n\t\t\t{\n\t\t\t\tpb.ioDTRefNum = dtRefNum;\n\t\t\t\tpb.ioNamePtr = (StringPtr)name;\n\t\t\t\tpb.ioDirID = dirID;\n\t\t\t\tpb.ioDTBuffer = (Ptr)&comment[1];\n\t\t\t\t/*\n\t\t\t\t**\tIMPORTANT NOTE #1: Inside Macintosh says that comments\n\t\t\t\t**\tare up to 200 characters. While that may be correct for\n\t\t\t\t**\tthe HFS file system's Desktop Manager, other file\n\t\t\t\t**\tsystems (such as Apple Photo Access) return up to\n\t\t\t\t**\t255 characters. Make sure the comment buffer is a Str255\n\t\t\t\t**\tor you'll regret it.\n\t\t\t\t**\n\t\t\t\t**\tIMPORTANT NOTE #2: Although Inside Macintosh doesn't\n\t\t\t\t**\tmention it, ioDTReqCount is a input field to\n\t\t\t\t**\tPBDTGetCommentSync. Some file systems (like HFS) ignore\n\t\t\t\t**\tioDTReqCount and always return the full comment --\n\t\t\t\t**\tothers (like AppleShare) respect ioDTReqCount and only\n\t\t\t\t**\treturn up to ioDTReqCount characters of the comment.\n\t\t\t\t*/\n\t\t\t\tpb.ioDTReqCount = sizeof(Str255) - 1;\n\t\t\t\terror = PBDTGetCommentSync(&pb);\n\t\t\t\tif (error == noErr)\n\t\t\t\t{\n\t\t\t\t\tcomment[0] = (unsigned char)pb.ioDTActCount;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* There is no desktop database - try the Desktop file */\n\t\t\terror = GetCommentFromDesktopFile(vRefNum, dirID, name, comment);\n\t\t\tif ( error != noErr )\n\t\t\t{\n\t\t\t\terror = afpItemNotFound;\t/* return an expected error */\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\terror = paramErr;\n\t}\n\t\n\treturn (error);\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpDTGetComment(const FSSpec *spec,\n\t\t\t\t\t\t\t  Str255 comment)\n{\n\treturn (DTGetComment(spec->vRefNum, spec->parID, spec->name, comment));\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tDTCopyComment(short srcVRefNum,\n\t\t\t\t\t\t\t  long srcDirID,\n\t\t\t\t\t\t\t  ConstStr255Param srcName,\n\t\t\t\t\t\t\t  short dstVRefNum,\n\t\t\t\t\t\t\t  long dstDirID,\n\t\t\t\t\t\t\t  ConstStr255Param dstName)\n/* The destination volume must support the Desktop Manager for this to work */\n{\n\tOSErr error;\n\tStr255 comment;\n\n\terror = DTGetComment(srcVRefNum, srcDirID, srcName, comment);\n\tif ( (error == noErr) && (comment[0] > 0) )\n\t{\n\t\terror = DTSetComment(dstVRefNum, dstDirID, dstName, comment);\n\t}\n\treturn (error);\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpDTCopyComment(const FSSpec *srcSpec,\n\t\t\t\t\t\t\t   const FSSpec *dstSpec)\n/* The destination volume must support the Desktop Manager for this to work */\n{\n\treturn (DTCopyComment(srcSpec->vRefNum, srcSpec->parID, srcSpec->name,\n\t\t\t\t\t\tdstSpec->vRefNum, dstSpec->parID, dstSpec->name));\n}\n\n/*****************************************************************************/\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/MoreFiles 1.5/Sources/MoreFiles.c",
    "content": "/*\n**\tApple Macintosh Developer Technical Support\n**\n**\tThe long lost high-level and FSSpec File Manager functions.\n**\n**\tby Jim Luther, Apple Developer Technical Support Emeritus\n**\n**\tFile:\t\tMoreFiles.c\n**\n**\tCopyright  1992-1999 Apple Computer, Inc.\n**\tAll rights reserved.\n**\n**\tYou may incorporate this sample code into your applications without\n**\trestriction, though the sample code has been provided \"AS IS\" and the\n**\tresponsibility for its operation is 100% yours.  However, what you are\n**\tnot permitted to do is to redistribute the source as \"DSC Sample Code\"\n**\tafter having made changes. If you're going to re-distribute the source,\n**\twe require that you make it clear in the source that the code was\n**\tdescended from Apple Sample Code, but that you've made changes.\n*/\n\n#include <Types.h>\n#include <Errors.h>\n#include <Files.h>\n\n#define\t__COMPILINGMOREFILES\n\n#include \"MoreFiles.h\"\n#include \"MoreFilesExtras.h\"\n\n/*****************************************************************************/\n\npascal\tOSErr\tHGetVolParms(ConstStr255Param volName,\n\t\t\t\t\t\t\t short vRefNum,\n\t\t\t\t\t\t\t GetVolParmsInfoBuffer *volParmsInfo,\n\t\t\t\t\t\t\t long *infoSize)\n{\n\tHParamBlockRec pb;\n\tOSErr error;\n\n\tpb.ioParam.ioNamePtr = (StringPtr)volName;\n\tpb.ioParam.ioVRefNum = vRefNum;\n\tpb.ioParam.ioBuffer = (Ptr)volParmsInfo;\n\tpb.ioParam.ioReqCount = *infoSize;\n\terror = PBHGetVolParmsSync(&pb);\n\tif ( error == noErr )\n\t{\n\t\t*infoSize = pb.ioParam.ioActCount;\n\t}\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tHCreateMinimum(short vRefNum,\n\t\t\t\t\t\t\t   long dirID,\n\t\t\t\t\t\t\t   ConstStr255Param fileName)\n{\n\tHParamBlockRec pb;\n\n\tpb.fileParam.ioNamePtr = (StringPtr)fileName;\n\tpb.fileParam.ioVRefNum = vRefNum;\n\tpb.ioParam.ioVersNum = 0;\n\tpb.fileParam.ioDirID = dirID;\n\treturn ( PBHCreateSync(&pb) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpCreateMinimum(const FSSpec *spec)\n{\n\treturn ( HCreateMinimum(spec->vRefNum, spec->parID, spec->name) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tExchangeFiles(short vRefNum,\n\t\t\t\t\t\t\t  long srcDirID,\n\t\t\t\t\t\t\t  ConstStr255Param srcName,\n\t\t\t\t\t\t\t  long dstDirID,\n\t\t\t\t\t\t\t  ConstStr255Param dstName)\n{\n\tHParamBlockRec pb;\n\n\tpb.fidParam.ioVRefNum = vRefNum;\n\tpb.fidParam.ioSrcDirID = srcDirID;\n\tpb.fidParam.ioNamePtr = (StringPtr)srcName;\n\tpb.fidParam.ioDestDirID = dstDirID;\n\tpb.fidParam.ioDestNamePtr = (StringPtr)dstName;\n\treturn ( PBExchangeFilesSync(&pb) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tResolveFileIDRef(ConstStr255Param volName,\n\t\t\t\t\t\t\t\t short vRefNum,\n\t\t\t\t\t\t\t\t long fileID,\n\t\t\t\t\t\t\t\t long *parID,\n\t\t\t\t\t\t\t\t StringPtr fileName)\n{\n\tHParamBlockRec pb;\n\tOSErr error;\n\tStr255 tempStr;\n\t\n\ttempStr[0] = 0;\n\tif ( volName != NULL )\n\t{\n\t\tBlockMoveData(volName, tempStr, volName[0] + 1);\n\t}\n\tpb.fidParam.ioNamePtr = (StringPtr)tempStr;\n\tpb.fidParam.ioVRefNum = vRefNum;\n\tpb.fidParam.ioFileID = fileID;\n\terror = PBResolveFileIDRefSync(&pb);\n\tif ( error == noErr )\n\t{\n\t\t*parID = pb.fidParam.ioSrcDirID;\n\t\tif ( fileName != NULL )\n\t\t{\n\t\t\tBlockMoveData(tempStr, fileName, tempStr[0] + 1);\n\t\t}\n\t}\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpResolveFileIDRef(ConstStr255Param volName,\n\t\t\t\t\t\t\t\t\tshort vRefNum,\n\t\t\t\t\t\t\t\t\tlong fileID,\n\t\t\t\t\t\t\t\t\tFSSpec *spec)\n{\n\tOSErr\terror;\n\t\n\terror = DetermineVRefNum(volName, vRefNum, &(spec->vRefNum));\n\tif ( error == noErr )\n\t{\n\t\terror = ResolveFileIDRef(volName, vRefNum, fileID, &(spec->parID), spec->name);\n\t}\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tCreateFileIDRef(short vRefNum,\n\t\t\t\t\t\t\t\tlong parID,\n\t\t\t\t\t\t\t\tConstStr255Param fileName,\n\t\t\t\t\t\t\t\tlong *fileID)\n{\n\tHParamBlockRec pb;\n\tOSErr error;\n\n\tpb.fidParam.ioNamePtr = (StringPtr)fileName;\n\tpb.fidParam.ioVRefNum = vRefNum;\n\tpb.fidParam.ioSrcDirID = parID;\n\terror = PBCreateFileIDRefSync(&pb);\n\tif ( (error == noErr) || (error == fidExists) || (error == afpIDExists) )\n\t{\n\t\t*fileID = pb.fidParam.ioFileID;\n\t}\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpCreateFileIDRef(const FSSpec *spec,\n\t\t\t\t\t\t\t\t   long *fileID)\n{\n\treturn ( CreateFileIDRef(spec->vRefNum, spec->parID, spec->name, fileID) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tDeleteFileIDRef(ConstStr255Param volName,\n\t\t\t\t\t\t\t\tshort vRefNum,\n\t\t\t\t\t\t\t\tlong fileID)\n{\n\tHParamBlockRec pb;\n\n\tpb.fidParam.ioNamePtr = (StringPtr)volName;\n\tpb.fidParam.ioVRefNum = vRefNum;\n\tpb.fidParam.ioFileID = fileID;\n\treturn ( PBDeleteFileIDRefSync(&pb) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFlushFile(short refNum)\n{\n\tParamBlockRec pb;\n\n\tpb.ioParam.ioRefNum = refNum;\n\treturn ( PBFlushFileSync(&pb) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tLockRange(short refNum,\n\t\t\t\t\t\t  long rangeLength,\n\t\t\t\t\t\t  long rangeStart)\n{\n\tParamBlockRec pb;\n\n\tpb.ioParam.ioRefNum = refNum;\n\tpb.ioParam.ioReqCount = rangeLength;\n\tpb.ioParam.ioPosMode = fsFromStart;\n\tpb.ioParam.ioPosOffset = rangeStart;\n\treturn ( PBLockRangeSync(&pb) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tUnlockRange(short refNum,\n\t\t\t\t\t\t\tlong rangeLength,\n\t\t\t\t\t\t\tlong rangeStart)\n{\n\tParamBlockRec pb;\n\n\tpb.ioParam.ioRefNum = refNum;\n\tpb.ioParam.ioReqCount = rangeLength;\n\tpb.ioParam.ioPosMode = fsFromStart;\n\tpb.ioParam.ioPosOffset = rangeStart;\n\treturn ( PBUnlockRangeSync(&pb) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetForeignPrivs(short vRefNum,\n\t\t\t\t\t\t\t\tlong dirID,\n\t\t\t\t\t\t\t\tConstStr255Param name,\n\t\t\t\t\t\t\t\tvoid *foreignPrivBuffer,\n\t\t\t\t\t\t\t\tlong *foreignPrivSize,\n\t\t\t\t\t\t\t\tlong *foreignPrivInfo1,\n\t\t\t\t\t\t\t\tlong *foreignPrivInfo2,\n\t\t\t\t\t\t\t\tlong *foreignPrivInfo3,\n\t\t\t\t\t\t\t\tlong *foreignPrivInfo4)\n{\n\tHParamBlockRec pb;\n\tOSErr error;\n\n\tpb.foreignPrivParam.ioNamePtr = (StringPtr)name;\n\tpb.foreignPrivParam.ioVRefNum = vRefNum;\n\tpb.foreignPrivParam.ioForeignPrivDirID = dirID;\t\n\tpb.foreignPrivParam.ioForeignPrivBuffer = (Ptr)foreignPrivBuffer;\n\tpb.foreignPrivParam.ioForeignPrivReqCount = *foreignPrivSize;\n\terror = PBGetForeignPrivsSync(&pb);\n\t*foreignPrivSize = pb.foreignPrivParam.ioForeignPrivActCount;\n\t*foreignPrivInfo1 = pb.foreignPrivParam.ioForeignPrivInfo1;\n\t*foreignPrivInfo2 = pb.foreignPrivParam.ioForeignPrivInfo2;\n\t*foreignPrivInfo3 = pb.foreignPrivParam.ioForeignPrivInfo3;\n\t*foreignPrivInfo4 = pb.foreignPrivParam.ioForeignPrivInfo4;\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpGetForeignPrivs(const FSSpec *spec,\n\t\t\t\t\t\t\t\t   void *foreignPrivBuffer,\n\t\t\t\t\t\t\t\t   long *foreignPrivSize,\n\t\t\t\t\t\t\t\t   long *foreignPrivInfo1,\n\t\t\t\t\t\t\t\t   long *foreignPrivInfo2,\n\t\t\t\t\t\t\t\t   long *foreignPrivInfo3,\n\t\t\t\t\t\t\t\t   long *foreignPrivInfo4)\n{\n\treturn ( GetForeignPrivs(spec->vRefNum, spec->parID, spec->name,\n\t\t\t\t\t\t\t foreignPrivBuffer, foreignPrivSize,\n\t\t\t\t\t\t\t foreignPrivInfo1, foreignPrivInfo2,\n\t\t\t\t\t\t\t foreignPrivInfo3, foreignPrivInfo4) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tSetForeignPrivs(short vRefNum,\n\t\t\t\t\t\t\t\tlong dirID,\n\t\t\t\t\t\t\t\tConstStr255Param name,\n\t\t\t\t\t\t\t\tconst void *foreignPrivBuffer,\n\t\t\t\t\t\t\t\tlong *foreignPrivSize,\n\t\t\t\t\t\t\t\tlong foreignPrivInfo1,\n\t\t\t\t\t\t\t\tlong foreignPrivInfo2,\n\t\t\t\t\t\t\t\tlong foreignPrivInfo3,\n\t\t\t\t\t\t\t\tlong foreignPrivInfo4)\n{\n\tHParamBlockRec pb;\n\tOSErr error;\n\n\tpb.foreignPrivParam.ioNamePtr = (StringPtr)name;\n\tpb.foreignPrivParam.ioVRefNum = vRefNum;\n\tpb.foreignPrivParam.ioForeignPrivDirID = dirID;\t\n\tpb.foreignPrivParam.ioForeignPrivBuffer = (Ptr)foreignPrivBuffer;\n\tpb.foreignPrivParam.ioForeignPrivReqCount = *foreignPrivSize;\n\tpb.foreignPrivParam.ioForeignPrivInfo1 = foreignPrivInfo1;\n\tpb.foreignPrivParam.ioForeignPrivInfo2 = foreignPrivInfo2;\n\tpb.foreignPrivParam.ioForeignPrivInfo3 = foreignPrivInfo3;\n\tpb.foreignPrivParam.ioForeignPrivInfo4 = foreignPrivInfo4;\n\terror = PBSetForeignPrivsSync(&pb);\n\tif ( error == noErr )\n\t{\n\t\t*foreignPrivSize = pb.foreignPrivParam.ioForeignPrivActCount;\n\t}\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpSetForeignPrivs(const FSSpec *spec,\n\t\t\t\t\t\t\t\t   const void *foreignPrivBuffer,\n\t\t\t\t\t\t\t\t   long *foreignPrivSize,\n\t\t\t\t\t\t\t\t   long foreignPrivInfo1,\n\t\t\t\t\t\t\t\t   long foreignPrivInfo2,\n\t\t\t\t\t\t\t\t   long foreignPrivInfo3,\n\t\t\t\t\t\t\t\t   long foreignPrivInfo4)\n{\n\treturn ( SetForeignPrivs(spec->vRefNum, spec->parID, spec->name,\n\t\t\t\t\t\t\t foreignPrivBuffer, foreignPrivSize,\n\t\t\t\t\t\t\t foreignPrivInfo1, foreignPrivInfo2,\n\t\t\t\t\t\t\t foreignPrivInfo3, foreignPrivInfo4) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tHGetLogInInfo(ConstStr255Param volName,\n\t\t\t\t\t\t\t  short vRefNum,\n\t\t\t\t\t\t\t  short *loginMethod,\n\t\t\t\t\t\t\t  StringPtr userName)\n{\n\tHParamBlockRec pb;\n\tOSErr error;\n\n\tpb.objParam.ioNamePtr = (StringPtr)volName;\n\tpb.objParam.ioVRefNum = vRefNum;\n\tpb.objParam.ioObjNamePtr = userName;\n\terror = PBHGetLogInInfoSync(&pb);\n\tif ( error == noErr )\n\t{\n\t\t*loginMethod = pb.objParam.ioObjType;\n\t}\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tHGetDirAccess(short vRefNum,\n\t\t\t\t\t\t\t  long dirID,\n\t\t\t\t\t\t\t  ConstStr255Param name,\n\t\t\t\t\t\t\t  long *ownerID,\n\t\t\t\t\t\t\t  long *groupID,\n\t\t\t\t\t\t\t  long *accessRights)\n{\n\tHParamBlockRec pb;\n\tOSErr error;\n\n\tpb.accessParam.ioNamePtr = (StringPtr)name;\n\tpb.accessParam.ioVRefNum = vRefNum;\n\tpb.fileParam.ioDirID = dirID;\n\terror = PBHGetDirAccessSync(&pb);\n\tif ( error == noErr )\n\t{\n\t\t*ownerID = pb.accessParam.ioACOwnerID;\n\t\t*groupID = pb.accessParam.ioACGroupID;\n\t\t*accessRights = pb.accessParam.ioACAccess;\n\t}\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpGetDirAccess(const FSSpec *spec,\n\t\t\t\t\t\t\t\tlong *ownerID,\n\t\t\t\t\t\t\t\tlong *groupID,\n\t\t\t\t\t\t\t\tlong *accessRights)\n{\n\treturn ( HGetDirAccess(spec->vRefNum, spec->parID, spec->name,\n\t\t\t\t\t\t   ownerID, groupID, accessRights) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tHSetDirAccess(short vRefNum,\n\t\t\t\t\t\t\t  long dirID,\n\t\t\t\t\t\t\t  ConstStr255Param name,\n\t\t\t\t\t\t\t  long ownerID,\n\t\t\t\t\t\t\t  long groupID,\n\t\t\t\t\t\t\t  long accessRights)\n{\n\tHParamBlockRec pb;\n\n\tpb.accessParam.ioNamePtr = (StringPtr)name;\n\tpb.accessParam.ioVRefNum = vRefNum;\n\tpb.fileParam.ioDirID = dirID;\n\tpb.accessParam.ioACOwnerID = ownerID;\n\tpb.accessParam.ioACGroupID = groupID;\n\tpb.accessParam.ioACAccess = accessRights;\n\treturn ( PBHSetDirAccessSync(&pb) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpSetDirAccess(const FSSpec *spec,\n\t\t\t\t\t\t\t\tlong ownerID,\n\t\t\t\t\t\t\t\tlong groupID,\n\t\t\t\t\t\t\t\tlong accessRights)\n{\n\treturn ( HSetDirAccess(spec->vRefNum, spec->parID, spec->name,\n\t\t\t\t\t\t   ownerID, groupID, accessRights) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tHMapID(ConstStr255Param volName,\n\t\t\t\t\t   short vRefNum,\n\t\t\t\t\t   long ugID,\n\t\t\t\t\t   short objType,\n\t\t\t\t\t   StringPtr name)\n{\n\tHParamBlockRec pb;\n\n\tpb.objParam.ioNamePtr = (StringPtr)volName;\n\tpb.objParam.ioVRefNum = vRefNum;\n\tpb.objParam.ioObjType = objType;\n\tpb.objParam.ioObjNamePtr = name;\n\tpb.objParam.ioObjID = ugID;\n\treturn ( PBHMapIDSync(&pb) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tHMapName(ConstStr255Param volName,\n\t\t\t\t\t\t short vRefNum,\n\t\t\t\t\t\t ConstStr255Param name,\n\t\t\t\t\t\t short objType,\n\t\t\t\t\t\t long *ugID)\n{\n\tHParamBlockRec pb;\n\tOSErr error;\n\n\tpb.objParam.ioNamePtr = (StringPtr)volName;\n\tpb.objParam.ioVRefNum = vRefNum;\n\tpb.objParam.ioObjType = objType;\n\tpb.objParam.ioObjNamePtr = (StringPtr)name;\n\terror = PBHMapNameSync(&pb);\n\tif ( error == noErr )\n\t{\n\t\t*ugID = pb.objParam.ioObjID;\n\t}\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tHCopyFile(short srcVRefNum,\n\t\t\t\t\t\t  long srcDirID,\n\t\t\t\t\t\t  ConstStr255Param srcName,\n\t\t\t\t\t\t  short dstVRefNum,\n\t\t\t\t\t\t  long dstDirID,\n\t\t\t\t\t\t  ConstStr255Param dstPathname,\n\t\t\t\t\t\t  ConstStr255Param copyName)\n{\n\tHParamBlockRec pb;\n\n\tpb.copyParam.ioVRefNum = srcVRefNum;\n\tpb.copyParam.ioDirID = srcDirID;\n\tpb.copyParam.ioNamePtr = (StringPtr)srcName;\n\tpb.copyParam.ioDstVRefNum = dstVRefNum;\n\tpb.copyParam.ioNewDirID = dstDirID;\n\tpb.copyParam.ioNewName = (StringPtr)dstPathname;\n\tpb.copyParam.ioCopyName = (StringPtr)copyName;\n\treturn ( PBHCopyFileSync(&pb) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpCopyFile(const FSSpec *srcSpec,\n\t\t\t\t\t\t\tconst FSSpec *dstSpec,\n\t\t\t\t\t\t\tConstStr255Param copyName)\n{\n\treturn ( HCopyFile(srcSpec->vRefNum, srcSpec->parID, srcSpec->name,\n\t\t\t\t\t   dstSpec->vRefNum, dstSpec->parID,\n\t\t\t\t\t   dstSpec->name, copyName) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tHMoveRename(short vRefNum,\n\t\t\t\t\t\t\tlong srcDirID,\n\t\t\t\t\t\t\tConstStr255Param srcName,\n\t\t\t\t\t\t\tlong dstDirID,\n\t\t\t\t\t\t\tConstStr255Param dstpathName,\n\t\t\t\t\t\t\tConstStr255Param copyName)\n{\n\tHParamBlockRec pb;\n\n\tpb.copyParam.ioVRefNum = vRefNum;\n\tpb.copyParam.ioDirID = srcDirID;\n\tpb.copyParam.ioNamePtr = (StringPtr)srcName;\n\tpb.copyParam.ioNewDirID = dstDirID;\n\tpb.copyParam.ioNewName = (StringPtr)dstpathName;\n\tpb.copyParam.ioCopyName = (StringPtr)copyName;\n\treturn ( PBHMoveRenameSync(&pb) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpMoveRename(const FSSpec *srcSpec,\n\t\t\t\t\t\t\t  const FSSpec *dstSpec,\n\t\t\t\t\t\t\t  ConstStr255Param copyName)\n{\n\tOSErr\terror;\n\t\n\t/* make sure the FSSpecs refer to the same volume */\n\tif ( srcSpec->vRefNum != dstSpec->vRefNum )\n\t{\n\t\terror = diffVolErr;\n\t}\n\telse\n\t{\n\t\terror = HMoveRename(srcSpec->vRefNum, srcSpec->parID, srcSpec->name, \n\t\t\t\t\t\t\tdstSpec->parID, dstSpec->name, copyName);\n\t}\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetVolMountInfoSize(ConstStr255Param volName,\n\t\t\t\t\t\t\t\t\tshort vRefNum,\n\t\t\t\t\t\t\t\t\tshort *size)\n{\n\tParamBlockRec pb;\n\n\tpb.ioParam.ioNamePtr = (StringPtr)volName;\n\tpb.ioParam.ioVRefNum = vRefNum;\n\tpb.ioParam.ioBuffer = (Ptr)size;\n\treturn ( PBGetVolMountInfoSize(&pb) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetVolMountInfo(ConstStr255Param volName,\n\t\t\t\t\t\t\t\tshort vRefNum,\n\t\t\t\t\t\t\t\tvoid *volMountInfo)\n{\n\tParamBlockRec pb;\n\n\tpb.ioParam.ioNamePtr = (StringPtr)volName;\n\tpb.ioParam.ioVRefNum = vRefNum;\n\tpb.ioParam.ioBuffer = (Ptr)volMountInfo;\n\treturn ( PBGetVolMountInfo(&pb) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tVolumeMount(const void *volMountInfo,\n\t\t\t\t\t\t\tshort *vRefNum)\n{\n\tParamBlockRec pb;\n\tOSErr error;\n\n\tpb.ioParam.ioBuffer = (Ptr)volMountInfo;\n\terror = PBVolumeMount(&pb);\n\tif ( error == noErr )\n\t{\n\t\t*vRefNum = pb.ioParam.ioVRefNum;\n\t}\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tShare(short vRefNum,\n\t\t\t\t\t  long dirID,\n\t\t\t\t\t  ConstStr255Param name)\n{\n\tHParamBlockRec pb;\n\n\tpb.fileParam.ioNamePtr = (StringPtr)name;\n\tpb.fileParam.ioVRefNum = vRefNum;\n\tpb.fileParam.ioDirID = dirID;\n\treturn ( PBShareSync(&pb) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpShare(const FSSpec *spec)\n{\n\treturn ( Share(spec->vRefNum, spec->parID, spec->name) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tUnshare(short vRefNum,\n\t\t\t\t\t\tlong dirID,\n\t\t\t\t\t\tConstStr255Param name)\n{\n\tHParamBlockRec pb;\n\n\tpb.fileParam.ioNamePtr = (StringPtr)name;\n\tpb.fileParam.ioVRefNum = vRefNum;\n\tpb.fileParam.ioDirID = dirID;\n\treturn ( PBUnshareSync(&pb) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpUnshare(const FSSpec *spec)\n{\n\treturn ( Unshare(spec->vRefNum, spec->parID, spec->name) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetUGEntry(short objType,\n\t\t\t\t\t\t   StringPtr objName,\n\t\t\t\t\t\t   long *objID)\n{\n\tHParamBlockRec pb;\n\tOSErr error;\n\n\tpb.objParam.ioObjType = objType;\n\tpb.objParam.ioObjNamePtr = objName;\n\tpb.objParam.ioObjID = *objID;\n\terror = PBGetUGEntrySync(&pb);\n\tif ( error == noErr )\n\t{\n\t\t*objID = pb.objParam.ioObjID;\n\t}\n\treturn ( error );\n}\n\n/*****************************************************************************/\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/MoreFiles 1.5/Sources/MoreFilesExtras.c",
    "content": "/*\n**\tApple Macintosh Developer Technical Support\n**\n**\tA collection of useful high-level File Manager routines.\n**\n**\tby Jim Luther, Apple Developer Technical Support Emeritus\n**\n**\tFile:\t\tMoreFilesExtras.c\n**\n**\tCopyright  1992-1999 Apple Computer, Inc.\n**\tAll rights reserved.\n**\n**\tYou may incorporate this sample code into your applications without\n**\trestriction, though the sample code has been provided \"AS IS\" and the\n**\tresponsibility for its operation is 100% yours.  However, what you are\n**\tnot permitted to do is to redistribute the source as \"DSC Sample Code\"\n**\tafter having made changes. If you're going to re-distribute the source,\n**\twe require that you make it clear in the source that the code was\n**\tdescended from Apple Sample Code, but that you've made changes.\n*/\n\n#include <Types.h>\n#include <Traps.h>\n#include <OSUtils.h>\n#include <Errors.h>\n#include <Files.h>\n#include <Devices.h>\n#include <Finder.h>\n#include <Folders.h>\n#include <FSM.h>\n#include <Disks.h>\n#include <Gestalt.h>\n#include <TextUtils.h>\n#include <Script.h>\n#include <Math64.h>\n#include <CodeFragments.h>\n#include <stddef.h>\n\n#define\t__COMPILINGMOREFILES\n\n#include \"MoreFiles.h\"\n#include \"MoreFilesExtras.h\"\n#include \"MoreDesktopMgr.h\"\n#include \"FSpCompat.h\"\n\n/*****************************************************************************/\n\n/* local data structures */\n\n/* The DeleteEnumGlobals structure is used to minimize the amount of\n** stack space used when recursively calling DeleteLevel and to hold\n** global information that might be needed at any time. */\n\n#if PRAGMA_STRUCT_ALIGN\n\t#pragma options align=mac68k\n#endif\t//\tPRAGMA_STRUCT_ALIGN\nstruct DeleteEnumGlobals\n{\n\tOSErr\t\t\terror;\t\t\t\t/* temporary holder of results - saves 2 bytes of stack each level */\n\tStr63\t\t\titemName;\t\t\t/* the name of the current item */\n\tUniversalFMPB\tmyPB;\t\t\t\t/* the parameter block used for PBGetCatInfo calls */\n};\n#if PRAGMA_STRUCT_ALIGN\n\t#pragma options align=reset\n#endif //\tPRAGMA_STRUCT_ALIGN\n\ntypedef struct DeleteEnumGlobals DeleteEnumGlobals;\ntypedef DeleteEnumGlobals *DeleteEnumGlobalsPtr;\n\n/*****************************************************************************/\n\n/*\n**\tCallPBXGetVolInfoSync is the glue code needed to make PBXGetVolInfoSync\n**\tFile Manager requests from CFM-based programs. Apple added PBXGetVolInfoSync\n**\tto InterfaceLib in Mac OS 8.5, so if __MACOSEIGHTFIVEORLATER is defined,\n**\tCallPBXGetVolInfoSync is defined back to PBXGetVolInfoSync.\n**\n**\tNon-CFM 68K programs don't needs this glue (and won't get it) because\n**\tthey instead use the inline assembly glue found in the Files.h interface\n**\tfile.\n*/\n\n#if TARGET_API_MAC_CARBON || !TARGET_RT_MAC_CFM\n\n\t// Carbon builds and 68K builds don't need this glue\n\t#define CallPBXGetVolInfoSync PBXGetVolInfoSync\n\n#else\t//\tTARGET_API_MAC_CARBON || !TARGET_RT_MAC_CFM\n\n\t#if\t__WANTPASCALELIMINATION\n\t\t#undef\tpascal\n\t#endif\t//\t__WANTPASCALELIMINATION\n\t\n\t/* This is exactly like the simple mixed mode glue in InterfaceLib in Mac OS 8.5 and 8.6 */\n\tstatic pascal OSErr PBXGetVolInfoSyncGlue(XVolumeParamPtr paramBlock)\n\t{\n\t\tenum\n\t\t{\n\t\t\tuppFSDispatchProcInfo = kRegisterBased\n\t\t\t\t | REGISTER_RESULT_LOCATION(kRegisterD0)\n\t\t\t\t | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))\n\t\t\t\t | REGISTER_ROUTINE_PARAMETER(1, kRegisterD0, SIZE_CODE(sizeof(long)))\t/* selector */\n\t\t\t\t | REGISTER_ROUTINE_PARAMETER(2, kRegisterD1, SIZE_CODE(sizeof(long)))\t/* trap word */\n\t\t\t\t | REGISTER_ROUTINE_PARAMETER(3, kRegisterA0, SIZE_CODE(sizeof(XVolumeParamPtr)))\n\t\t};\n\t\t\n\t\tstatic UniversalProcPtr\tfsDispatchTrapAddress = NULL;\n\t\t\n\t\t/* Is this the first time we've been called? */\n\t\tif ( fsDispatchTrapAddress == NULL )\n\t\t{\n\t\t\t/* Yes - Get the trap address of _FSDispatch */\n\t\t\tfsDispatchTrapAddress = NGetTrapAddress(_FSDispatch, OSTrap);\n\t\t}\n\t\treturn ( CallOSTrapUniversalProc(fsDispatchTrapAddress,\n\t\t\t\t\t\t\t\t\t\t\tuppFSDispatchProcInfo,\n\t\t\t\t\t\t\t\t\t\t\tkFSMXGetVolInfo,\n\t\t\t\t\t\t\t\t\t\t\t_FSDispatch,\n\t\t\t\t\t\t\t\t\t\t\tparamBlock) );\n\t}\n\t\n\t/*\n\t** PBXGetVolInfoSync was added to the File Manager in System software 7.5.2.\n\t** However, PBXGetVolInfoSync wasn't added to InterfaceLib until Mac OS 8.5.\n\t** This wrapper calls PBXGetVolInfoSync if it is found in InterfaceLib;\n\t** otherwise, it calls PBXGetVolInfoSyncGlue. This ensures that your program\n\t** is calling the latest implementation of PBXGetVolInfoSync.\n\t*/\n\tstatic pascal OSErr CallPBXGetVolInfoSync(XVolumeParamPtr paramBlock)\n\t{\n\t\ttypedef pascal OSErr (*PBXGetVolInfoProcPtr) (XVolumeParamPtr paramBlock);\n\t\t\n\t\tOSErr\t\t\t\t\t\tresult;\n\t\tCFragConnectionID\t\t\tconnID;\n\t\tstatic PBXGetVolInfoProcPtr\tPBXGetVolInfoSyncPtr = NULL;\n\t\t\n\t\t//* Is this the first time we've been called? */\n\t\tif ( PBXGetVolInfoSyncPtr == NULL )\n\t\t{\n\t\t\t/* Yes - Get our connection ID to InterfaceLib */\n\t\t\tresult = GetSharedLibrary(\"\\pInterfaceLib\", kPowerPCCFragArch, kLoadCFrag, &connID, NULL, NULL);\n\t\t\tif ( result == noErr )\n\t\t\t{\n\t\t\t\t/* See if PBXGetVolInfoSync is in InterfaceLib */\n\t\t\t\tif ( FindSymbol(connID, \"\\pPBXGetVolInfoSync\", &(Ptr)PBXGetVolInfoSyncPtr, NULL) != noErr )\n\t\t\t\t{\n\t\t\t\t\t/* Use glue code if symbol isn't found */\n\t\t\t\t\tPBXGetVolInfoSyncPtr = PBXGetVolInfoSyncGlue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t/* Call PBXGetVolInfoSync if present; otherwise, call PBXGetVolInfoSyncGlue */\n\t\treturn ( (*PBXGetVolInfoSyncPtr)(paramBlock) );\n\t}\n\n\t#if\t__WANTPASCALELIMINATION\n\t\t#define\tpascal\t\n\t#endif\t//\t__WANTPASCALELIMINATION\n\n#endif\t//\tTARGET_API_MAC_CARBON || !TARGET_RT_MAC_CFM\n\n/*****************************************************************************/\n\npascal\tvoid\tTruncPString(StringPtr destination,\n\t\t\t\t\t\t\t ConstStr255Param source,\n\t\t\t\t\t\t\t short maxLength)\n{\n\tshort\tcharType;\n\t\n\tif ( source != NULL && destination != NULL )\t/* don't do anything stupid */\n\t{\n\t\tif ( source[0] > maxLength )\n\t\t{\n\t\t\t/* Make sure the string isn't truncated in the middle of */\n\t\t\t/* a multi-byte character. */\n\t\t\twhile (maxLength != 0)\n\t\t\t{\n\t\t\t\t// Note: CharacterByteType's textOffset parameter is zero-based from the textPtr parameter\n\t\t\t\tcharType = CharacterByteType((Ptr)&source[1], maxLength - 1, smSystemScript);\n\t\t\t\tif ( (charType == smSingleByte) || (charType == smLastByte) )\n\t\t\t\t\tbreak;\t/* source[maxLength] is now a valid last character */ \n\t\t\t\t--maxLength;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tmaxLength = source[0];\n\t\t}\n\t\t/* Set the destination string length */\n\t\tdestination[0] = maxLength;\n\t\t/* and copy maxLength characters (if needed) */\n\t\tif ( source != destination )\n\t\t{\n\t\t\twhile ( maxLength != 0 )\n\t\t\t{\n\t\t\t\tdestination[maxLength] = source[maxLength];\n\t\t\t\t--maxLength;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/*****************************************************************************/\n\npascal\tPtr\tGetTempBuffer(long buffReqSize,\n\t\t\t\t\t\t  long *buffActSize)\n{\n\tenum\n\t{\n\t\tkSlopMemory = 0x00008000\t/* 32K - Amount of free memory to leave when allocating buffers */\n\t};\n\tPtr\ttempPtr;\n\t\n\t/* Make request a multiple of 1024 bytes */\n\tbuffReqSize = buffReqSize & 0xfffffc00;\n\t\n\tif ( buffReqSize < 0x00000400 )\n\t{\n\t\t/* Request was smaller than 1024 bytes - make it 1024 */\n\t\tbuffReqSize = 0x00000400;\n\t}\n\t\n\t/* Attempt to allocate the memory */\n\ttempPtr = NewPtr(buffReqSize);\n\t\n\t/* If request failed, go to backup plan */\n\tif ( (tempPtr == NULL) && (buffReqSize > 0x00000400) )\n\t{\n\t\t/*\n\t\t**\tTry to get largest 1024-byte block available\n\t\t**\tleaving some slop for the toolbox if possible\n\t\t*/\n\t\tlong freeMemory = (FreeMem() - kSlopMemory) & 0xfffffc00;\n\t\t\n\t\tbuffReqSize = MaxBlock() & 0xfffffc00;\n\t\t\n\t\tif ( buffReqSize > freeMemory )\n\t\t{\n\t\t\tbuffReqSize = freeMemory;\n\t\t}\n\t\t\n\t\tif ( buffReqSize == 0 )\n\t\t{\n\t\t\tbuffReqSize = 0x00000400;\n\t\t}\n\t\t\n\t\ttempPtr = NewPtr(buffReqSize);\n\t}\n\t\n\t/* Return bytes allocated */\n\tif ( tempPtr != NULL )\n\t{\n\t\t*buffActSize = buffReqSize;\n\t}\n\telse\n\t{\n\t\t*buffActSize = 0;\n\t}\n\t\n\treturn ( tempPtr );\n}\n\n/*****************************************************************************/\n\n/*\n**\tGetVolumeInfoNoName uses pathname and vRefNum to call PBHGetVInfoSync\n**\tin cases where the returned volume name is not needed by the caller.\n**\tThe pathname and vRefNum parameters are not touched, and the pb\n**\tparameter is initialized by PBHGetVInfoSync except that ioNamePtr in\n**\tthe parameter block is always returned as NULL (since it might point\n**\tto the local tempPathname).\n**\n**\tI noticed using this code in several places, so here it is once.\n**\tThis reduces the code size of MoreFiles.\n*/\npascal\tOSErr\tGetVolumeInfoNoName(ConstStr255Param pathname,\n\t\t\t\t\t\t\t\t\tshort vRefNum,\n\t\t\t\t\t\t\t\t\tHParmBlkPtr pb)\n{\n\tStr255 tempPathname;\n\tOSErr error;\n\t\n\t/* Make sure pb parameter is not NULL */ \n\tif ( pb != NULL )\n\t{\n\t\tpb->volumeParam.ioVRefNum = vRefNum;\n\t\tif ( pathname == NULL )\n\t\t{\n\t\t\tpb->volumeParam.ioNamePtr = NULL;\n\t\t\tpb->volumeParam.ioVolIndex = 0;\t\t/* use ioVRefNum only */\n\t\t}\n\t\telse\n\t\t{\n\t\t\tBlockMoveData(pathname, tempPathname, pathname[0] + 1);\t/* make a copy of the string and */\n\t\t\tpb->volumeParam.ioNamePtr = (StringPtr)tempPathname;\t/* use the copy so original isn't trashed */\n\t\t\tpb->volumeParam.ioVolIndex = -1;\t/* use ioNamePtr/ioVRefNum combination */\n\t\t}\n\t\terror = PBHGetVInfoSync(pb);\n\t\tpb->volumeParam.ioNamePtr = NULL;\t/* ioNamePtr may point to local\ttempPathname, so don't return it */\n\t}\n\telse\n\t{\n\t\terror = paramErr;\n\t}\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\n/*\n**\tXGetVolumeInfoNoName uses pathname and vRefNum to call PBXGetVolInfoSync\n**\tin cases where the returned volume name is not needed by the caller.\n**\tThe pathname and vRefNum parameters are not touched, and the pb\n**\tparameter is initialized by PBXGetVolInfoSync except that ioNamePtr in\n**\tthe parameter block is always returned as NULL (since it might point\n**\tto the local tempPathname).\n*/\npascal\tOSErr\tXGetVolumeInfoNoName(ConstStr255Param pathname,\n\t\t\t\t\t\t\t\t\tshort vRefNum,\n\t\t\t\t\t\t\t\t\tXVolumeParamPtr pb)\n{\n\tStr255 tempPathname;\n\tOSErr error;\n\t\n\t/* Make sure pb parameter is not NULL */ \n\tif ( pb != NULL )\n\t{\n\t\tpb->ioVRefNum = vRefNum;\n\t\tpb->ioXVersion = 0;\t\t\t/* this XVolumeParam version (0) */\n\t\tif ( pathname == NULL )\n\t\t{\n\t\t\tpb->ioNamePtr = NULL;\n\t\t\tpb->ioVolIndex = 0;\t\t/* use ioVRefNum only */\n\t\t}\n\t\telse\n\t\t{\n\t\t\tBlockMoveData(pathname, tempPathname, pathname[0] + 1);\t/* make a copy of the string and */\n\t\t\tpb->ioNamePtr = (StringPtr)tempPathname;\t/* use the copy so original isn't trashed */\n\t\t\tpb->ioVolIndex = -1;\t/* use ioNamePtr/ioVRefNum combination */\n\t\t}\n\t\t\n\t\t{\n#if !TARGET_API_MAC_CARBON\n\t\t\tlong response;\n\t\t\t\n\t\t\t/* Is PBXGetVolInfo available? */\n\t\t\tif ( ( Gestalt(gestaltFSAttr, &response) != noErr ) || ((response & (1L << gestaltFSSupports2TBVols)) == 0) )\n\t\t\t{\n\t\t\t\t/* No, fall back on PBHGetVInfo */\n\t\t\t\terror = PBHGetVInfoSync((HParmBlkPtr)pb);\n\t\t\t\tif ( error == noErr )\n\t\t\t\t{\n\t\t\t\t\t/* calculate the ioVTotalBytes and ioVFreeBytes fields */\n\t\t\t\t\tpb->ioVTotalBytes = U64Multiply(U64SetU(pb->ioVNmAlBlks), U64SetU(pb->ioVAlBlkSiz));\n\t\t\t\t\tpb->ioVFreeBytes = U64Multiply(U64SetU(pb->ioVFrBlk), U64SetU(pb->ioVAlBlkSiz));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n#endif\n\t\t\t{\n\t\t\t\t/* Yes, so use it */\n\t\t\t\terror = CallPBXGetVolInfoSync(pb);\n\t\t\t}\n\t\t}\n\t\tpb->ioNamePtr = NULL;\t\t/* ioNamePtr may point to local\ttempPathname, so don't return it */\n\t}\n\telse\n\t{\n\t\terror = paramErr;\n\t}\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr GetCatInfoNoName(short vRefNum,\n\t\t\t\t\t\t\t   long dirID,\n\t\t\t\t\t\t\t   ConstStr255Param name,\n\t\t\t\t\t\t\t   CInfoPBPtr pb)\n{\n\tStr31 tempName;\n\tOSErr error;\n\t\n\t/* Protection against File Sharing problem */\n\tif ( (name == NULL) || (name[0] == 0) )\n\t{\n\t\ttempName[0] = 0;\n\t\tpb->dirInfo.ioNamePtr = tempName;\n\t\tpb->dirInfo.ioFDirIndex = -1;\t/* use ioDirID */\n\t}\n\telse\n\t{\n\t\tpb->dirInfo.ioNamePtr = (StringPtr)name;\n\t\tpb->dirInfo.ioFDirIndex = 0;\t/* use ioNamePtr and ioDirID */\n\t}\n\tpb->dirInfo.ioVRefNum = vRefNum;\n\tpb->dirInfo.ioDrDirID = dirID;\n\terror = PBGetCatInfoSync(pb);\n\tpb->dirInfo.ioNamePtr = NULL;\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tDetermineVRefNum(ConstStr255Param pathname,\n\t\t\t\t\t\t\t\t short vRefNum,\n\t\t\t\t\t\t\t\t short *realVRefNum)\n{\n\tHParamBlockRec pb;\n\tOSErr error;\n\n\terror = GetVolumeInfoNoName(pathname,vRefNum, &pb);\n\tif ( error == noErr )\n\t{\n\t\t*realVRefNum = pb.volumeParam.ioVRefNum;\n\t}\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tHGetVInfo(short volReference,\n\t\t\t\t\t\t  StringPtr volName,\n\t\t\t\t\t\t  short *vRefNum,\n\t\t\t\t\t\t  unsigned long *freeBytes,\n\t\t\t\t\t\t  unsigned long *totalBytes)\n{\n\tOSErr\tresult;\n\tUInt64\tfreeBytes64;\n\tUInt64\ttotalBytes64;\n\t\n\t// get the best values possible from XGetVInfo\n\tresult = XGetVInfo(volReference, volName, vRefNum, &freeBytes64, &totalBytes64);\n\tif ( result == noErr )\n\t{\n\t\t// and pin those values if needed\n\t\tif ( UInt64ToUnsignedWide(freeBytes64).hi != 0 )\n\t\t{\n\t\t\t// pin to maximum 512-byte block aligned value\n\t\t\t*freeBytes = 0xfffffe00;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t*freeBytes = U32SetU(freeBytes64);\n\t\t}\n\t\t\n\t\tif ( UInt64ToUnsignedWide(totalBytes64).hi != 0 )\n\t\t{\n\t\t\t// pin to maximum 512-byte block aligned value\n\t\t\t*totalBytes = 0xfffffe00;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t*totalBytes = U32SetU(totalBytes64);\n\t\t}\n\t}\n\t\n\treturn ( result );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tXGetVInfo(short volReference,\n\t\t\t\t\t\t  StringPtr volName,\n\t\t\t\t\t\t  short *vRefNum,\n\t\t\t\t\t\t  UInt64 *freeBytes,\n\t\t\t\t\t\t  UInt64 *totalBytes)\n{\n\tOSErr\t\t\tresult;\n\tXVolumeParam\tpb;\n\t\n#if !TARGET_API_MAC_CARBON\n\t\n\tlong\t\t\tresponse;\n\t\n#endif\t//\t!TARGET_API_MAC_CARBON\n\t\n\tpb.ioVRefNum = volReference;\n\tpb.ioNamePtr = volName;\n\tpb.ioXVersion = 0;\t/* this XVolumeParam version (0) */\n\tpb.ioVolIndex = 0;\t/* use ioVRefNum only, return volume name */\n\t\n#if !TARGET_API_MAC_CARBON\n\n\t/* See if large volume support is available */\n\tif ( ( Gestalt(gestaltFSAttr, &response) == noErr ) && ((response & (1L << gestaltFSSupports2TBVols)) != 0) )\n\t\n#endif\t//\t!TARGET_API_MAC_CARBON\n\t\n\t{\n\t\t/* Large volume support is available */\n\t\tresult = CallPBXGetVolInfoSync(&pb);\n\t\tif ( result == noErr )\n\t\t{\n\t\t\t/* The volume name was returned in volName (if not NULL) and */\n\t\t\t/* we have the volume's vRefNum and allocation block size */\n\t\t\t*vRefNum = pb.ioVRefNum;\n\t\t\t\n\t\t\t/* return the freeBytes and totalBytes */\n\t\t\t*totalBytes = pb.ioVTotalBytes;\n\t\t\t*freeBytes = pb.ioVFreeBytes;\n\t\t}\n\t}\n\t\n#if !TARGET_API_MAC_CARBON\n\t\n\telse\n\t{\n\t\t/* No large volume support */\n\t\t/* Use PBHGetVInfoSync to get the results */\n\t\tresult = PBHGetVInfoSync((HParmBlkPtr)&pb);\n\t\tif ( result == noErr )\n\t\t{\n\t\t\tVCB\t\t\t\t*theVCB;\n\t\t\n\t\t\t/* The volume name was returned in volName (if not NULL) and */\n\t\t\t/* we have the volume's vRefNum */\n\t\t\t*vRefNum = pb.ioVRefNum;\n\t\t\t\n\t\t\t/* System 7.5 (and beyond) pins the number of allocation blocks and */\n\t\t\t/* the number of free allocation blocks returned by PBHGetVInfo to */\n\t\t\t/* a value so that when multiplied by the allocation block size, */\n\t\t\t/* the volume will look like it has $7fffffff bytes or less. This */\n\t\t\t/* was done so older applications that use signed math or that use */\n\t\t\t/* the GetVInfo function (which uses signed math) will continue to work. */\n\t\t\t/* However, the unpinned numbers (which we want) are always available */\n\t\t\t/* in the volume's VCB so we'll get those values from the VCB. */\n\t\t\t/* Note: Carbon doesn't support the VCB queue, so this code cannot be */\n\t\t\t/* used (and is conditionalized out) by Carbon applications. */\n\t\t\t\n\t\t\t/* Find the volume's VCB */\n\t\t\ttheVCB = (VCB *)(GetVCBQHdr()->qHead);\n\t\t\twhile ( theVCB != NULL )\n\t\t\t{\n\t\t\t\tif ( theVCB->vcbVRefNum == *vRefNum )\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttheVCB = (VCB *)(theVCB->qLink);\t/* next VCB */\n\t\t\t}\n\t\t\t\n\t\t\tif ( theVCB != NULL )\n\t\t\t{\n\t\t\t\t/* Found a VCB we can use. Get the un-pinned number of allocation blocks */\n\t\t\t\t/* and the number of free blocks from the VCB. */\n\t\t\t\t*freeBytes = U64Multiply(U64SetU((unsigned short)theVCB->vcbFreeBks), U64SetU((unsigned long)pb.ioVAlBlkSiz));\n\t\t\t\t*totalBytes = U64Multiply(U64SetU((unsigned short)theVCB->vcbNmAlBlks), U64SetU((unsigned long)pb.ioVAlBlkSiz));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t/* Didn't find a VCB we can use. Return the number of allocation blocks */\n\t\t\t\t/* and the number of free blocks returned by PBHGetVInfoSync. */\n\t\t\t\t*freeBytes = U64Multiply(U64SetU((unsigned short)pb.ioVFrBlk), U64SetU((unsigned long)pb.ioVAlBlkSiz));\n\t\t\t\t*totalBytes = U64Multiply(U64SetU((unsigned short)pb.ioVNmAlBlks), U64SetU((unsigned long)pb.ioVAlBlkSiz));\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n\t\n#endif\t//\t!TARGET_API_MAC_CARBON\n\t\n\treturn ( result );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tCheckVolLock(ConstStr255Param pathname,\n\t\t\t\t\t\t\t short vRefNum)\n{\n\tHParamBlockRec pb;\n\tOSErr error;\n\n\terror = GetVolumeInfoNoName(pathname,vRefNum, &pb);\n\tif ( error == noErr )\n\t{\n\t\tif ( (pb.volumeParam.ioVAtrb & kHFSVolumeHardwareLockMask) != 0 )\n\t\t{\n\t\t\terror = wPrErr;\t\t/* volume locked by hardware */\n\t\t}\n\t\telse if ( (pb.volumeParam.ioVAtrb & kHFSVolumeSoftwareLockMask) != 0 )\n\t\t{\n\t\t\terror = vLckdErr;\t/* volume locked by software */\n\t\t}\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n//\n//\tThe following routines call Mac OS routines that are not supported by\n//\tCarbon:\n//\t\n//\t\tGetDriverName\n//\t\tFindDrive\n//\t\tGetDiskBlocks\n//\t\tGetVolState\n\n#if !TARGET_API_MAC_CARBON\t//\t{\n\n\t/*****************************************************************************/\n\n\tpascal\tOSErr GetDriverName(short driverRefNum,\n\t\t\t\t\t\t\t\tStr255 driverName)\n\t{\n\t\tOSErr result;\n\t\tDCtlHandle theDctl;\n\t\tDRVRHeaderPtr dHeaderPtr;\n\t\t\n\t\ttheDctl = GetDCtlEntry(driverRefNum);\n\t\tif ( theDctl != NULL )\n\t\t{\n\t\t    if ( (**theDctl).dCtlFlags & dRAMBasedMask )\n\t\t    {\n\t\t    \t/* dctlDriver is handle - dereference */\n\t\t\t\tdHeaderPtr = *((DRVRHeaderHandle)(**theDctl).dCtlDriver);\n\t\t    }\n\t\t    else\n\t\t    {\n\t\t\t\t/* dctlDriver is pointer */\n\t\t      dHeaderPtr = (DRVRHeaderPtr)(**theDctl).dCtlDriver;\n\t\t    }\n\t\t\tBlockMoveData((*dHeaderPtr).drvrName, driverName, (*dHeaderPtr).drvrName[0] + 1);\n\t\t\tresult = noErr;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdriverName[0] = 0;\n\t\t\tresult = badUnitErr;\t/* bad reference number */\n\t\t}\n\t\t\n\t\treturn ( result );\n\t}\n\n\t/*****************************************************************************/\n\n\tpascal\tOSErr\tFindDrive(ConstStr255Param pathname,\n\t\t\t\t\t\t\t  short vRefNum,\n\t\t\t\t\t\t\t  DrvQElPtr *driveQElementPtr)\n\t{\n\t\tOSErr\t\t\tresult;\n\t\tHParamBlockRec\thPB;\n\t\tshort\t\t\tdriveNumber;\n\t\t\n\t\t*driveQElementPtr = NULL;\n\t\t\n\t\t/* First, use GetVolumeInfoNoName to determine the volume */\n\t\tresult = GetVolumeInfoNoName(pathname, vRefNum, &hPB);\n\t\tif ( result == noErr )\n\t\t{\n\t\t\t/*\n\t\t\t**\tThe volume can be either online, offline, or ejected. What we find in\n\t\t\t**\tioVDrvInfo and ioVDRefNum will tell us which it is.\n\t\t\t**\tSee Inside Macintosh: Files page 2-80 and the Technical Note\n\t\t\t**\t\"FL 34 - VCBs and Drive Numbers : The Real Story\"\n\t\t\t**\tWhere we get the drive number depends on the state of the volume.\n\t\t\t*/\n\t\t\tif ( hPB.volumeParam.ioVDrvInfo != 0 )\n\t\t\t{\n\t\t\t\t/* The volume is online and not ejected */\n\t\t\t\t/* Get the drive number */\n\t\t\t\tdriveNumber = hPB.volumeParam.ioVDrvInfo;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t/* The volume's is either offline or ejected */\n\t\t\t\t/* in either case, the volume is NOT online */\n\n\t\t\t\t/* Is it ejected or just offline? */\n\t\t\t\tif ( hPB.volumeParam.ioVDRefNum > 0 )\n\t\t\t\t{\n\t\t\t\t\t/* It's ejected, the drive number is ioVDRefNum */\n\t\t\t\t\tdriveNumber = hPB.volumeParam.ioVDRefNum;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t/* It's offline, the drive number is the negative of ioVDRefNum */\n\t\t\t\t\tdriveNumber = (short)-hPB.volumeParam.ioVDRefNum;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/* Get pointer to first element in drive queue */\n\t\t\t*driveQElementPtr = (DrvQElPtr)(GetDrvQHdr()->qHead);\n\t\t\t\n\t\t\t/* Search for a matching drive number */\n\t\t\twhile ( (*driveQElementPtr != NULL) && ((*driveQElementPtr)->dQDrive != driveNumber) )\n\t\t\t{\n\t\t\t\t*driveQElementPtr = (DrvQElPtr)(*driveQElementPtr)->qLink;\n\t\t\t}\n\t\t\t\n\t\t\tif ( *driveQElementPtr == NULL )\n\t\t\t{\n\t\t\t\t/* This should never happen since every volume must have a drive, but... */\n\t\t\t\tresult = nsDrvErr;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn ( result );\n\t}\n\n\t/*****************************************************************************/\n\n\tpascal\tOSErr\tGetDiskBlocks(ConstStr255Param pathname,\n\t\t\t\t\t\t\t\t  short vRefNum,\n\t\t\t\t\t\t\t\t  unsigned long *numBlocks)\n\t{\n\t\t/* Various constants for GetDiskBlocks() */\n\t\tenum\n\t\t{\n\t\t\t/* return format list status code */\n\t\t\tkFmtLstCode = 6,\n\t\t\t\n\t\t\t/* reference number of .SONY driver */\n\t\t\tkSonyRefNum = 0xfffb,\n\t\t\t\n\t\t\t/* values returned by DriveStatus in DrvSts.twoSideFmt */\n\t\t\tkSingleSided = 0,\n\t\t\tkDoubleSided = -1,\n\t\t\tkSingleSidedSize = 800,\t\t/* 400K */\n\t\t\tkDoubleSidedSize = 1600,\t/* 800K */\n\t\t\t\n\t\t\t/* values in DrvQEl.qType */\n\t\t\tkWordDrvSiz = 0,\n\t\t\tkLongDrvSiz = 1,\n\t\t\t\n\t\t\t/* more than enough formatListRecords */\n\t\t\tkMaxFormatListRecs = 16\n\t\t};\n\t\t\n\t\tDrvQElPtr\t\tdriveQElementPtr;\n\t\tunsigned long\tblocks;\n\t\tParamBlockRec\tpb;\n\t\tFormatListRec\tformatListRecords[kMaxFormatListRecs];\n\t\tDrvSts\t\t\tstatus;\n\t\tshort\t\t\tformatListRecIndex;\n\t\tOSErr\t\t\tresult;\n\n\t\tblocks = 0;\n\t\t\n\t\t/* Find the drive queue element for this volume */\n\t\tresult = FindDrive(pathname, vRefNum, &driveQElementPtr);\n\t\t\n\t\t/* \n\t\t**\tMake sure this is a real driver (dQRefNum < 0).\n\t\t**\tAOCE's Mail Enclosures volume uses 0 for dQRefNum which will cause\n\t\t**\tproblems if you try to use it as a driver refNum.\n\t\t*/ \n\t\tif ( (result == noErr) && (driveQElementPtr->dQRefNum >= 0) )\n\t\t{\n\t\t\tresult = paramErr;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* Attempt to get the drive's format list. */\n\t\t\t/* (see the Technical Note \"What Your Sony Drives For You\") */\n\t\t\t\n\t\t\tpb.cntrlParam.ioVRefNum = driveQElementPtr->dQDrive;\n\t\t\tpb.cntrlParam.ioCRefNum = driveQElementPtr->dQRefNum;\n\t\t\tpb.cntrlParam.csCode = kFmtLstCode;\n\t\t\tpb.cntrlParam.csParam[0] = kMaxFormatListRecs;\n\t\t\t*(long *)&pb.cntrlParam.csParam[1] = (long)&formatListRecords[0];\n\t\t\t\n\t\t\tresult = PBStatusSync(&pb);\n\t\t\t\n\t\t\tif ( result == noErr )\n\t\t\t{\n\t\t\t\t/* The drive supports ReturnFormatList status call. */\n\t\t\t\t\n\t\t\t\t/* Get the current disk's size. */\n\t\t\t\tfor( formatListRecIndex = 0;\n\t\t\t\t\t formatListRecIndex < pb.cntrlParam.csParam[0];\n\t\t    \t\t ++formatListRecIndex )\n\t\t    \t{\n\t\t    \t\tif ( (formatListRecords[formatListRecIndex].formatFlags &\n\t\t    \t\t\t  diCIFmtFlagsCurrentMask) != 0 )\n\t\t    \t\t{\n\t\t    \t\t\tblocks = formatListRecords[formatListRecIndex].volSize;\n\t\t    \t\t}\n\t\t\t\t}\n\t    \t\tif ( blocks == 0 )\n\t    \t\t{\n\t    \t\t\t/* This should never happen */\n\t    \t\t\tresult = paramErr;\n\t    \t\t}\n\t\t\t}\n\t\t\telse if ( driveQElementPtr->dQRefNum == (short)kSonyRefNum )\n\t\t\t{\n\t\t\t\t/* The drive is a non-SuperDrive floppy which only supports 400K and 800K disks */\n\t\t\t\t\n\t\t\t\tresult = DriveStatus(driveQElementPtr->dQDrive, &status);\n\t\t\t\tif ( result == noErr )\n\t\t\t\t{\n\t\t\t\t\tswitch ( status.twoSideFmt )\n\t\t\t\t\t{\n\t\t\t\t\tcase kSingleSided:\n\t\t\t\t\t\tblocks = kSingleSidedSize;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase kDoubleSided:\n\t\t\t\t\t\tblocks = kDoubleSidedSize;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t/* This should never happen */\n\t\t\t\t\t\tresult = paramErr;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t/* The drive is not a floppy and it doesn't support ReturnFormatList */\n\t\t\t\t/* so use the dQDrvSz field(s) */\n\t\t\t\t\n\t\t\t\tresult = noErr;\t/* reset result */\n\t\t\t\tswitch ( driveQElementPtr->qType )\n\t\t\t\t{\n\t\t\t\tcase kWordDrvSiz:\n\t\t\t\t\tblocks = driveQElementPtr->dQDrvSz;\n\t\t\t\t\tbreak;\n\t\t\t\tcase kLongDrvSiz:\n\t\t\t\t\tblocks = ((unsigned long)driveQElementPtr->dQDrvSz2 << 16) +\n\t\t\t\t\t\t\t driveQElementPtr->dQDrvSz;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t/* This should never happen */\n\t\t\t\t\tresult = paramErr;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( result == noErr )\n\t\t{\n\t\t\t*numBlocks = blocks;\n\t\t}\n\t\t\n\t\treturn ( result );\n\t}\n\n\t/*****************************************************************************/\n\n\tpascal\tOSErr\tGetVolState(ConstStr255Param pathname,\n\t\t\t\t\t\t\t\tshort vRefNum,\n\t\t\t\t\t\t\t\tBoolean *volumeOnline,\n\t\t\t\t\t\t\t\tBoolean *volumeEjected,\n\t\t\t\t\t\t\t\tBoolean *driveEjectable,\n\t\t\t\t\t\t\t\tBoolean *driverWantsEject)\n\t{\n\t\tHParamBlockRec pb;\n\t\tshort driveNumber;\n\t\tOSErr error;\n\n\t\terror = GetVolumeInfoNoName(pathname,vRefNum, &pb);\n\t\tif ( error == noErr )\n\t\t{\n\t\t\tif ( pb.volumeParam.ioVDrvInfo != 0 )\n\t\t\t{\n\t\t\t\t/* the volume is online and not ejected */\n\t\t\t\t*volumeOnline = true;\n\t\t\t\t*volumeEjected = false;\n\t\t\t\t\n\t\t\t\t/* Get the drive number */\n\t\t\t\tdriveNumber = pb.volumeParam.ioVDrvInfo;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t/* the volume's is either offline or ejected */\n\t\t\t\t/* in either case, the volume is NOT online */\n\t\t\t\t*volumeOnline = false;\n\n\t\t\t\t/* Is it ejected? */\n\t\t\t\t*volumeEjected = pb.volumeParam.ioVDRefNum > 0;\n\t\t\t\t\n\t\t\t\tif ( *volumeEjected )\n\t\t\t\t{\n\t\t\t\t\t/* If ejected, the drive number is ioVDRefNum */\n\t\t\t\t\tdriveNumber = pb.volumeParam.ioVDRefNum;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t/* If offline, the drive number is the negative of ioVDRefNum */\n\t\t\t\t\tdriveNumber = (short)-pb.volumeParam.ioVDRefNum;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t{\n\t\t\t\tDrvQElPtr drvQElem;\n\t\t\t\t\n\t\t\t\t/* Find the drive queue element by searching the drive queue */\n\t\t\t\tdrvQElem = (DrvQElPtr)(GetDrvQHdr()->qHead);\n\t\t\t\twhile ( (drvQElem != NULL) && (drvQElem->dQDrive != driveNumber) )\n\t\t\t\t{\n\t\t\t\t\tdrvQElem = (DrvQElPtr)drvQElem->qLink;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( drvQElem != NULL )\n\t\t\t\t{\n\t\t\t\t\t/*\n\t\t\t\t\t**\tEach drive queue element is preceded by 4 flag bytes.\n\t\t\t\t\t**\tByte 1 (the second flag byte) has bits that tell us if a\n\t\t\t\t\t**\tdrive is ejectable and if its driver wants an eject call.\n\t\t\t\t\t**\tSee Inside Macintosh: Files, page 2-85.\n\t\t\t\t\t*/\n\t\t\t\t\t{\n\t\t\t\t\t\tPtr\t\tflagBytePtr;\n\t\t\t\t\t\t\n\t\t\t\t\t\t/* point to byte 1 of the flag bytes */\n\t\t\t\t\t\tflagBytePtr = (Ptr)drvQElem;\n\t\t\t\t\t\tflagBytePtr -= 3;\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t**\tThe drive is ejectable if flag byte 1 does not contain\n\t\t\t\t\t\t**\t0x08 (nonejectable) or 0x48 (nonejectable, but wants eject call).\n\t\t\t\t\t\t*/\n\t\t\t\t\t\t\n\t\t\t\t\t\t*driveEjectable = (*flagBytePtr != 0x08) && (*flagBytePtr != 0x48);\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t**\tThe driver wants an eject call if flag byte 1 does not contain\n\t\t\t\t\t\t**\t0x08 (nonejectable). This may seem like a minor point, but some\n\t\t\t\t\t\t**\tdisk drivers use the Eject request to flush their caches to disk\n\t\t\t\t\t\t**\tand you wouldn't want to skip that step after unmounting a volume.\n\t\t\t\t\t\t*/\n\t\t\t\t\t\t\n\t\t\t\t\t\t*driverWantsEject = (*flagBytePtr != 0x08);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t/* Didn't find the drive (this should never happen) */\n\t\t\t\t\t*driveEjectable = false;\n\t\t\t\t\t*driverWantsEject = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn ( error );\n\t}\n\n\t/*****************************************************************************/\n\n#endif\t//\t}\t!TARGET_API_MAC_CARBON\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetVolFileSystemID(ConstStr255Param pathname,\n\t\t\t\t\t\t\t\t   short vRefNum,\n\t\t\t\t\t\t\t\t   short *fileSystemID)\n{\n\tHParamBlockRec pb;\n\tOSErr error;\n\n\terror = GetVolumeInfoNoName(pathname,vRefNum, &pb);\n\tif ( error == noErr )\n\t{\n\t\t*fileSystemID = pb.volumeParam.ioVFSID;\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\n//\n//\tNote:\tUnder Carbon there are no drive numbers, so you cannot call\n//\t\t\tEject with a drive number after unmounting a volume.\n//\t\t\tWhen a Carbon application calls UnmountVol, CarbonLib will make\n//\t\t\tsure ejectable media is ejected (leaving ejectable media in the\n//\t\t\tdisk drive makes no sense to Carbon applications).\n//\npascal\tOSErr\tUnmountAndEject(ConstStr255Param pathname,\n\t\t\t\t\t\t\t\tshort vRefNum)\n{\n\tHParamBlockRec pb;\n\tOSErr error;\n\n\terror = GetVolumeInfoNoName(pathname, vRefNum, &pb);\n\tif ( error == noErr )\n\t{\n\t\n#if\t!TARGET_API_MAC_CARBON\n\n\t\tshort driveNum;\n\t\tBoolean ejected, wantsEject;\n\t\tDrvQElPtr drvQElem;\n\t\t\n\t\tif ( pb.volumeParam.ioVDrvInfo != 0 )\n\t\t{\n\t\t\t/* the volume is online and not ejected */\n\t\t\tejected = false;\n\t\t\t\n\t\t\t/* Get the drive number */\n\t\t\tdriveNum = pb.volumeParam.ioVDrvInfo;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* the volume is ejected or offline */\n\t\t\t\n\t\t\t/* Is it ejected? */\n\t\t\tejected = pb.volumeParam.ioVDRefNum > 0;\n\t\t\t\n\t\t\tif ( ejected )\n\t\t\t{\n\t\t\t\t/* If ejected, the drive number is ioVDRefNum */\n\t\t\t\tdriveNum = pb.volumeParam.ioVDRefNum;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t/* If offline, the drive number is the negative of ioVDRefNum */\n\t\t\t\tdriveNum = (short)-pb.volumeParam.ioVDRefNum;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* find the drive queue element */\n\t\tdrvQElem = (DrvQElPtr)(GetDrvQHdr()->qHead);\n\t\twhile ( (drvQElem != NULL) && (drvQElem->dQDrive != driveNum) )\n\t\t{\n\t\t\tdrvQElem = (DrvQElPtr)drvQElem->qLink;\n\t\t}\n\t\t\n\t\tif ( drvQElem != NULL )\n\t\t{\n\t\t\t/* does the drive want an eject call */\n\t\t\twantsEject = (*((Ptr)((Ptr)drvQElem - 3)) != 8);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* didn't find the drive!! */\n\t\t\twantsEject = false;\n\t\t}\n\t\t\n#endif\t//\t!TARGET_API_MAC_CARBON\n\n\t\t/* unmount the volume */\n\t\tpb.volumeParam.ioNamePtr = NULL;\n\t\t/* ioVRefNum is already filled in from PBHGetVInfo */\n\t\terror = PBUnmountVol((ParmBlkPtr)&pb);\n\n#if\t!TARGET_API_MAC_CARBON\n\n\t\tif ( error == noErr )\n\t\t{\n\t\t\tif ( wantsEject && !ejected )\n\t\t\t{\n\t\t\t\t/* eject the media from the drive if needed */\n\t\t\t\tpb.volumeParam.ioVRefNum = driveNum;\n\t\t\t\terror = PBEject((ParmBlkPtr)&pb);\n\t\t\t}\n\t\t}\n\t\t\n#endif\t//\t!TARGET_API_MAC_CARBON\n\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tOnLine(FSSpecPtr volumes,\n\t\t\t\t\t   short reqVolCount,\n\t\t\t\t\t   short *actVolCount,\n\t\t\t\t\t   short *volIndex)\n{\n\tHParamBlockRec pb;\n\tOSErr error = noErr;\n\tFSSpec *endVolArray;\n\n\tif ( *volIndex > 0 )\n\t{\n\t\t*actVolCount = 0;\n\t\tfor ( endVolArray = volumes + reqVolCount; (volumes < endVolArray) && (error == noErr); ++volumes )\n\t\t{\n\t\t\tpb.volumeParam.ioNamePtr = (StringPtr) & volumes->name;\n\t\t\tpb.volumeParam.ioVolIndex = *volIndex;\n\t\t\terror = PBHGetVInfoSync(&pb);\n\t\t\tif ( error == noErr )\n\t\t\t{\n\t\t\t\tvolumes->parID = fsRtParID;\t\t/* the root directory's parent is 1 */\n\t\t\t\tvolumes->vRefNum = pb.volumeParam.ioVRefNum;\n\t\t\t\t++*volIndex;\n\t\t\t\t++*actVolCount;\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\terror = paramErr;\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr SetDefault(short newVRefNum,\n\t\t\t\t\t\t long newDirID,\n\t\t\t\t\t\t short *oldVRefNum,\n\t\t\t\t\t\t long *oldDirID)\n{\n\tOSErr\terror;\n\t\n\t/* Get the current default volume/directory. */\n\terror = HGetVol(NULL, oldVRefNum, oldDirID);\n\tif ( error == noErr )\n\t{\n\t\t/* Set the new default volume/directory */\n\t\terror = HSetVol(NULL, newVRefNum, newDirID);\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr RestoreDefault(short oldVRefNum,\n\t\t\t\t\t\t\t long oldDirID)\n{\n\tOSErr\terror;\n\t\n#if\t!TARGET_API_MAC_CARBON\n\n\tshort\tdefaultVRefNum;\n\tlong\tdefaultDirID;\n\tlong\tdefaultProcID;\n\t\n\t/* Determine if the default volume was a wdRefNum. */\n\terror = GetWDInfo(oldVRefNum, &defaultVRefNum, &defaultDirID, &defaultProcID);\n\tif ( error == noErr )\n\t{\n\t\t/* Restore the old default volume/directory, one way or the other. */\n\t\tif ( defaultDirID != fsRtDirID )\n\t\t{\n\t\t\t/* oldVRefNum was a wdRefNum - use SetVol */\n\t\t\terror = SetVol(NULL, oldVRefNum);\n\t\t}\n\t\telse\n\t\t{\n\t\t\n#endif\t//\t!TARGET_API_MAC_CARBON\n\n\t\t\t/* oldVRefNum was a real vRefNum - use HSetVol */\n\t\t\terror = HSetVol(NULL, oldVRefNum, oldDirID);\n\n#if\t!TARGET_API_MAC_CARBON\n\n\t\t}\n\t}\n#endif\t//\t!TARGET_API_MAC_CARBON\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr GetDInfo(short vRefNum,\n\t\t\t\t\t   long dirID,\n\t\t\t\t\t   ConstStr255Param name,\n\t\t\t\t\t   DInfo *fndrInfo)\n{\n\tCInfoPBRec pb;\n\tOSErr error;\n\t\n\terror = GetCatInfoNoName(vRefNum, dirID, name, &pb);\n\tif ( error == noErr )\n\t{\n\t\tif ( (pb.dirInfo.ioFlAttrib & kioFlAttribDirMask) != 0 )\n\t\t{\n\t\t\t/* it's a directory, return the DInfo */\n\t\t\t*fndrInfo = pb.dirInfo.ioDrUsrWds;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* oops, a file was passed */\n\t\t\terror = dirNFErr;\n\t\t}\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr FSpGetDInfo(const FSSpec *spec,\n\t\t\t\t\t\t  DInfo *fndrInfo)\n{\n\treturn ( GetDInfo(spec->vRefNum, spec->parID, spec->name, fndrInfo) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr SetDInfo(short vRefNum,\n\t\t\t\t\t   long dirID,\n\t\t\t\t\t   ConstStr255Param name,\n\t\t\t\t\t   const DInfo *fndrInfo)\n{\n\tCInfoPBRec pb;\n\tStr31 tempName;\n\tOSErr error;\n\n\t/* Protection against File Sharing problem */\n\tif ( (name == NULL) || (name[0] == 0) )\n\t{\n\t\ttempName[0] = 0;\n\t\tpb.dirInfo.ioNamePtr = tempName;\n\t\tpb.dirInfo.ioFDirIndex = -1;\t/* use ioDirID */\n\t}\n\telse\n\t{\n\t\tpb.dirInfo.ioNamePtr = (StringPtr)name;\n\t\tpb.dirInfo.ioFDirIndex = 0;\t/* use ioNamePtr and ioDirID */\n\t}\n\tpb.dirInfo.ioVRefNum = vRefNum;\n\tpb.dirInfo.ioDrDirID = dirID;\n\terror = PBGetCatInfoSync(&pb);\n\tif ( error == noErr )\n\t{\n\t\tif ( (pb.dirInfo.ioFlAttrib & kioFlAttribDirMask) != 0 )\n\t\t{\n\t\t\t/* it's a directory, set the DInfo */\n\t\t\tif ( pb.dirInfo.ioNamePtr == tempName )\n\t\t\t{\n\t\t\t\tpb.dirInfo.ioDrDirID = pb.dirInfo.ioDrParID;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tpb.dirInfo.ioDrDirID = dirID;\n\t\t\t}\n\t\t\tpb.dirInfo.ioDrUsrWds = *fndrInfo;\n\t\t\terror = PBSetCatInfoSync(&pb);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* oops, a file was passed */\n\t\t\terror = dirNFErr;\n\t\t}\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr FSpSetDInfo(const FSSpec *spec,\n\t\t\t\t\t\t  const DInfo *fndrInfo)\n{\n\treturn ( SetDInfo(spec->vRefNum, spec->parID, spec->name, fndrInfo) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetDirectoryID(short vRefNum,\n\t\t\t\t\t\t\t   long dirID,\n\t\t\t\t\t\t\t   ConstStr255Param name,\n\t\t\t\t\t\t\t   long *theDirID,\n\t\t\t\t\t\t\t   Boolean *isDirectory)\n{\n\tCInfoPBRec pb;\n\tOSErr error;\n\n\terror = GetCatInfoNoName(vRefNum, dirID, name, &pb);\n\tif ( error == noErr )\n\t{\n\t\t*isDirectory = (pb.hFileInfo.ioFlAttrib & kioFlAttribDirMask) != 0;\n\t\tif ( *isDirectory )\n\t\t{\n\t\t\t*theDirID = pb.dirInfo.ioDrDirID;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t*theDirID = pb.hFileInfo.ioFlParID;\n\t\t}\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpGetDirectoryID(const FSSpec *spec,\n\t\t\t\t\t\t\t\t  long *theDirID,\n\t\t\t\t\t\t\t\t  Boolean *isDirectory)\n{\n\treturn ( GetDirectoryID(spec->vRefNum, spec->parID, spec->name,\n\t\t\t theDirID, isDirectory) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetDirName(short vRefNum,\n\t\t\t\t\t\t   long dirID,\n\t\t\t\t\t\t   Str31 name)\n{\n\tCInfoPBRec pb;\n\tOSErr error;\n\n\tif ( name != NULL )\n\t{\n\t\tpb.dirInfo.ioNamePtr = name;\n\t\tpb.dirInfo.ioVRefNum = vRefNum;\n\t\tpb.dirInfo.ioDrDirID = dirID;\n\t\tpb.dirInfo.ioFDirIndex = -1;\t/* get information about ioDirID */\n\t\terror = PBGetCatInfoSync(&pb);\n\t}\n\telse\n\t{\n\t\terror = paramErr;\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetIOACUser(short vRefNum,\n\t\t\t\t\t\t\tlong dirID,\n\t\t\t\t\t\t\tConstStr255Param name,\n\t\t\t\t\t\t\tSInt8 *ioACUser)\n{\n\tCInfoPBRec pb;\n\tOSErr error;\n\t\n\t/* Clear ioACUser before calling PBGetCatInfo since some file systems\n\t** don't bother to set or clear this field. If ioACUser isn't set by the\n\t** file system, then you'll get the zero value back (full access) which\n\t** is the access you have on volumes that don't support ioACUser.\n\t*/\n\tpb.dirInfo.ioACUser = 0;\t/* ioACUser used to be filler2 */\n\terror = GetCatInfoNoName(vRefNum, dirID, name, &pb);\n\tif ( error == noErr )\n\t{\n\t\tif ( (pb.hFileInfo.ioFlAttrib & kioFlAttribDirMask) == 0 )\n\t\t{\n\t\t\t/* oops, a file was passed */\n\t\t\terror = dirNFErr;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t*ioACUser = pb.dirInfo.ioACUser;\n\t\t}\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpGetIOACUser(const FSSpec *spec,\n\t\t\t\t\t\t\t   SInt8 *ioACUser)\n{\n\treturn ( GetIOACUser(spec->vRefNum, spec->parID, spec->name, ioACUser) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetParentID(short vRefNum,\n\t\t\t\t\t\t\tlong dirID,\n\t\t\t\t\t\t\tConstStr255Param name,\n\t\t\t\t\t\t\tlong *parID)\n{\n\tCInfoPBRec pb;\n\tStr31 tempName;\n\tOSErr error;\n\tshort realVRefNum;\n\t\n\t/* Protection against File Sharing problem */\n\tif ( (name == NULL) || (name[0] == 0) )\n\t{\n\t\ttempName[0] = 0;\n\t\tpb.hFileInfo.ioNamePtr = tempName;\n\t\tpb.hFileInfo.ioFDirIndex = -1;\t/* use ioDirID */\n\t}\n\telse\n\t{\n\t\tpb.hFileInfo.ioNamePtr = (StringPtr)name;\n\t\tpb.hFileInfo.ioFDirIndex = 0;\t/* use ioNamePtr and ioDirID */\n\t}\n\tpb.hFileInfo.ioVRefNum = vRefNum;\n\tpb.hFileInfo.ioDirID = dirID;\n\terror = PBGetCatInfoSync(&pb);\n\tif ( error == noErr )\n\t{\n\t\t/*\n\t\t**\tThere's a bug in HFS where the wrong parent dir ID can be\n\t\t**\treturned if multiple separators are used at the end of a\n\t\t**\tpathname. For example, if the pathname:\n\t\t**\t\t'volumeName:System Folder:Extensions::'\n\t\t**\tis passed, the directory ID of the Extensions folder is\n\t\t**\treturned in the ioFlParID field instead of fsRtDirID. Since\n\t\t**\tmultiple separators at the end of a pathname always specifies\n\t\t**\ta directory, we only need to work-around cases where the\n\t\t**\tobject is a directory and there are multiple separators at\n\t\t**\tthe end of the name parameter.\n\t\t*/\n\t\tif ( (pb.hFileInfo.ioFlAttrib & kioFlAttribDirMask) != 0 )\n\t\t{\n\t\t\t/* Its a directory */\n\t\t\t\n\t\t\t/* is there a pathname? */\n\t\t\tif ( pb.hFileInfo.ioNamePtr == name )\t\n\t\t\t{\n\t\t\t\t/* could it contain multiple separators? */\n\t\t\t\tif ( name[0] >= 2 )\n\t\t\t\t{\n\t\t\t\t\t/* does it contain multiple separators at the end? */\n\t\t\t\t\tif ( (name[name[0]] == ':') && (name[name[0] - 1] == ':') )\n\t\t\t\t\t{\n\t\t\t\t\t\t/* OK, then do the extra stuff to get the correct parID */\n\t\t\t\t\t\t\n\t\t\t\t\t\t/* Get the real vRefNum (this should not fail) */\n\t\t\t\t\t\terror = DetermineVRefNum(name, vRefNum, &realVRefNum);\n\t\t\t\t\t\tif ( error == noErr )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/* we don't need the parent's name, but add protect against File Sharing problem */\n\t\t\t\t\t\t\ttempName[0] = 0;\n\t\t\t\t\t\t\tpb.dirInfo.ioNamePtr = tempName;\n\t\t\t\t\t\t\tpb.dirInfo.ioVRefNum = realVRefNum;\n\t\t\t\t\t\t\t/* pb.dirInfo.ioDrDirID already contains the */\n\t\t\t\t\t\t\t/* dirID of the directory object */\n\t\t\t\t\t\t\tpb.dirInfo.ioFDirIndex = -1;\t/* get information about ioDirID */\n\t\t\t\t\t\t\terror = PBGetCatInfoSync(&pb);\n\t\t\t\t\t\t\t/* now, pb.dirInfo.ioDrParID contains the correct parID */\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( error == noErr )\n\t\t{\n\t\t\t/* if no errors, then pb.hFileInfo.ioFlParID (pb.dirInfo.ioDrParID) */\n\t\t\t/* contains the parent ID */\n\t\t\t*parID = pb.hFileInfo.ioFlParID;\n\t\t}\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetFilenameFromPathname(ConstStr255Param pathname,\n\t\t\t\t\t\t\t\t\t\tStr255 filename)\n{\n\tshort\tindex;\n\tshort\tnameEnd;\n\tOSErr\terror;\n\n\t/* default to no filename */\n\tfilename[0] = 0;\n\n\t/* check for no pathname */\n\tif ( pathname != NULL )\n\t{\n\t\t/* get string length */\n\t\tindex = pathname[0];\n\t\t\n\t\t/* check for empty string */\n\t\tif ( index != 0 )\n\t\t{\n\t\t\t/* skip over last trailing colon (if any) */\n\t\t\tif ( pathname[index] == ':' )\n\t\t\t{\n\t\t\t\t--index;\n\t\t\t}\n\n\t\t\t/* save the end of the string */\n\t\t\tnameEnd = index;\n\n\t\t\t/* if pathname ends with multiple colons, then this pathname refers */\n\t\t\t/* to a directory, not a file */\n\t\t\tif ( pathname[index] != ':' )\n\t\t\t{\n\t\t\t\t/* parse backwards until we find a colon or hit the beginning of the pathname */\n\t\t\t\twhile ( (index != 0) && (pathname[index] != ':') )\n\t\t\t\t{\n\t\t\t\t\t--index;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* if we parsed to the beginning of the pathname and the pathname ended */\n\t\t\t\t/* with a colon, then pathname is a full pathname to a volume, not a file */\n\t\t\t\tif ( (index != 0) || (pathname[pathname[0]] != ':') )\n\t\t\t\t{\n\t\t\t\t\t/* get the filename and return noErr */\n\t\t\t\t\tfilename[0] = (char)(nameEnd - index);\n\t\t\t\t\tBlockMoveData(&pathname[index+1], &filename[1], nameEnd - index);\n\t\t\t\t\terror = noErr;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t/* pathname to a volume, not a file */\n\t\t\t\t\terror = notAFileErr;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t/* directory, not a file */\n\t\t\t\terror = notAFileErr;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* empty string isn't a file */\n\t\t\terror = notAFileErr;\n\t\t}\n\t}\n\telse\n\t{\n\t\t/* NULL pathname isn't a file */\n\t\terror = notAFileErr;\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetObjectLocation(short vRefNum,\n\t\t\t\t\t\t\t\t  long dirID,\n\t\t\t\t\t\t\t\t  ConstStr255Param pathname,\n\t\t\t\t\t\t\t\t  short *realVRefNum,\n\t\t\t\t\t\t\t\t  long *realParID,\n\t\t\t\t\t\t\t\t  Str255 realName,\n\t\t\t\t\t\t\t\t  Boolean *isDirectory)\n{\n\tOSErr error;\n\tCInfoPBRec pb;\n\tStr255 tempPathname;\n\t\n\t/* clear results */\n\t*realVRefNum = 0;\n\t*realParID = 0;\n\trealName[0] = 0;\n\t\n\t/*\n\t**\tGet the real vRefNum\n\t*/\n\terror = DetermineVRefNum(pathname, vRefNum, realVRefNum);\n\tif ( error == noErr )\n\t{\n\t\t/*\n\t\t**\tDetermine if the object already exists and if so,\n\t\t**\tget the real parent directory ID if it's a file\n\t\t*/\n\t\t\n\t\t/* Protection against File Sharing problem */\n\t\tif ( (pathname == NULL) || (pathname[0] == 0) )\n\t\t{\n\t\t\ttempPathname[0] = 0;\n\t\t\tpb.hFileInfo.ioNamePtr = tempPathname;\n\t\t\tpb.hFileInfo.ioFDirIndex = -1;\t/* use ioDirID */\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpb.hFileInfo.ioNamePtr = (StringPtr)pathname;\n\t\t\tpb.hFileInfo.ioFDirIndex = 0;\t/* use ioNamePtr and ioDirID */\n\t\t}\n\t\tpb.hFileInfo.ioVRefNum = vRefNum;\n\t\tpb.hFileInfo.ioDirID = dirID;\n\t\terror = PBGetCatInfoSync(&pb);\n\t\tif ( error == noErr )\n\t\t{\n\t\t\t/*\n\t\t\t**\tThe file system object is present and we have the file's real parID\n\t\t\t*/\n\t\t\t\n\t\t\t/*\tIs it a directory or a file? */\n\t\t\t*isDirectory = (pb.hFileInfo.ioFlAttrib & kioFlAttribDirMask) != 0;\n\t\t\tif ( *isDirectory )\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\t**\tIt's a directory, get its name and parent dirID, and then we're done\n\t\t\t\t*/\n\t\t\t\t\n\t\t\t\tpb.dirInfo.ioNamePtr = realName;\n\t\t\t\tpb.dirInfo.ioVRefNum = *realVRefNum;\n\t\t\t\t/* pb.dirInfo.ioDrDirID already contains the dirID of the directory object */\n\t\t\t\tpb.dirInfo.ioFDirIndex = -1;\t/* get information about ioDirID */\n\t\t\t\terror = PBGetCatInfoSync(&pb);\n\t\t\t\t\n\t\t\t\t/* get the parent ID here, because the file system can return the */\n\t\t\t\t/* wrong parent ID from the last call. */\n\t\t\t\t*realParID = pb.dirInfo.ioDrParID;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\t**\tIt's a file - use the parent directory ID from the last call\n\t\t\t\t**\tto GetCatInfoparse, get the file name, and then we're done\n\t\t\t\t*/\n\t\t\t\t*realParID = pb.hFileInfo.ioFlParID;\t\n\t\t\t\terror = GetFilenameFromPathname(pathname, realName);\n\t\t\t}\n\t\t}\n\t\telse if ( error == fnfErr )\n\t\t{\n\t\t\t/*\n\t\t\t**\tThe file system object is not present - see if its parent is present\n\t\t\t*/\n\t\t\t\n\t\t\t/*\n\t\t\t**\tParse to get the object name from end of pathname\n\t\t\t*/\n\t\t\terror = GetFilenameFromPathname(pathname, realName);\n\t\t\t\n\t\t\t/* if we can't get the object name from the end, we can't continue */\n\t\t\tif ( error == noErr )\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\t**\tWhat we want now is the pathname minus the object name\n\t\t\t\t**\tfor example:\n\t\t\t\t**\tif pathname is 'vol:dir:file' tempPathname becomes 'vol:dir:'\n\t\t\t\t**\tif pathname is 'vol:dir:file:' tempPathname becomes 'vol:dir:'\n\t\t\t\t**\tif pathname is ':dir:file' tempPathname becomes ':dir:'\n\t\t\t\t**\tif pathname is ':dir:file:' tempPathname becomes ':dir:'\n\t\t\t\t**\tif pathname is ':file' tempPathname becomes ':'\n\t\t\t\t**\tif pathname is 'file or file:' tempPathname becomes ''\n\t\t\t\t*/\n\t\t\t\t\n\t\t\t\t/* get a copy of the pathname */\n\t\t\t\tBlockMoveData(pathname, tempPathname, pathname[0] + 1);\n\t\t\t\t\n\t\t\t\t/* remove the object name */\n\t\t\t\ttempPathname[0] -= realName[0];\n\t\t\t\t/* and the trailing colon (if any) */\n\t\t\t\tif ( pathname[pathname[0]] == ':' )\n\t\t\t\t{\n\t\t\t\t\t--tempPathname[0];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* OK, now get the parent's directory ID */\n\t\t\t\t\n\t\t\t\t/* Protection against File Sharing problem */\n\t\t\t\tpb.hFileInfo.ioNamePtr = (StringPtr)tempPathname;\n\t\t\t\tif ( tempPathname[0] != 0 )\n\t\t\t\t{\n\t\t\t\t\tpb.hFileInfo.ioFDirIndex = 0;\t/* use ioNamePtr and ioDirID */\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tpb.hFileInfo.ioFDirIndex = -1;\t/* use ioDirID */\n\t\t\t\t}\n\t\t\t\tpb.hFileInfo.ioVRefNum = vRefNum;\n\t\t\t\tpb.hFileInfo.ioDirID = dirID;\n\t\t\t\terror = PBGetCatInfoSync(&pb);\n\t\t\t\t*realParID = pb.dirInfo.ioDrDirID;\n\n\t\t\t\t*isDirectory = false;\t/* we don't know what the object is really going to be */\n\t\t\t}\n\t\t\t\n\t\t\tif ( error != noErr )\n\t\t\t{\n\t\t\t\terror = dirNFErr;\t/* couldn't find parent directory */\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\terror = fnfErr;\t/* we found the parent, but not the file */\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetDirItems(short vRefNum,\n\t\t\t\t\t\t\tlong dirID,\n\t\t\t\t\t\t\tConstStr255Param name,\n\t\t\t\t\t\t\tBoolean getFiles,\n\t\t\t\t\t\t\tBoolean getDirectories,\n\t\t\t\t\t\t\tFSSpecPtr items,\n\t\t\t\t\t\t\tshort reqItemCount,\n\t\t\t\t\t\t\tshort *actItemCount,\n\t\t\t\t\t\t\tshort *itemIndex) /* start with 1, then use what's returned */\n{\n\tCInfoPBRec pb;\n\tOSErr error;\n\tlong theDirID;\n\tBoolean isDirectory;\n\tFSSpec *endItemsArray;\n\t\n\tif ( *itemIndex > 0 )\n\t{\n\t\t/* NOTE: If I could be sure that the caller passed a real vRefNum and real directory */\n\t\t/* to this routine, I could rip out calls to DetermineVRefNum and GetDirectoryID and this */\n\t\t/* routine would be much faster because of the overhead of DetermineVRefNum and */\n\t\t/* GetDirectoryID and because GetDirectoryID blows away the directory index hint the Macintosh */\n\t\t/* file system keeps for indexed calls. I can't be sure, so for maximum throughput, */\n\t\t/* pass a big array of FSSpecs so you can get the directory's contents with few calls */\n\t\t/* to this routine. */\n\t\t\n\t\t/* get the real volume reference number */\n\t\terror = DetermineVRefNum(name, vRefNum, &pb.hFileInfo.ioVRefNum);\n\t\tif ( error == noErr )\n\t\t{\n\t\t\t/* and the real directory ID of this directory (and make sure it IS a directory) */\n\t\t\terror = GetDirectoryID(vRefNum, dirID, name, &theDirID, &isDirectory);\n\t\t\tif ( error == noErr )\n\t\t\t{\n\t\t\t\tif ( isDirectory )\n\t\t\t\t{\n\t\t\t\t\t*actItemCount = 0;\n\t\t\t\t\tendItemsArray = items + reqItemCount;\n\t\t\t\t\twhile ( (items < endItemsArray) && (error == noErr) )\n\t\t\t\t\t{\n\t\t\t\t\t\tpb.hFileInfo.ioNamePtr = (StringPtr) &items->name;\n\t\t\t\t\t\tpb.hFileInfo.ioDirID = theDirID;\n\t\t\t\t\t\tpb.hFileInfo.ioFDirIndex = *itemIndex;\n\t\t\t\t\t\terror = PBGetCatInfoSync(&pb);\n\t\t\t\t\t\tif ( error == noErr )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\titems->parID = pb.hFileInfo.ioFlParID;\t/* return item's parID */\n\t\t\t\t\t\t\titems->vRefNum = pb.hFileInfo.ioVRefNum;\t/* return item's vRefNum */\n\t\t\t\t\t\t\t++*itemIndex;\t/* prepare to get next item in directory */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( (pb.hFileInfo.ioFlAttrib & kioFlAttribDirMask) != 0 )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ( getDirectories )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t++*actItemCount; /* keep this item */\n\t\t\t\t\t\t\t\t\t++items; /* point to next item */\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ( getFiles )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t++*actItemCount; /* keep this item */\n\t\t\t\t\t\t\t\t\t++items; /* point to next item */\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t/* it wasn't a directory */\n\t\t\t\t\terror = dirNFErr;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\t/* bad itemIndex */\n\t\terror = paramErr;\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\nstatic\tvoid\tDeleteLevel(long dirToDelete,\n\t\t\t\t\t\t\tDeleteEnumGlobalsPtr theGlobals)\n{\n\tlong savedDir;\n\t\n\tdo\n\t{\n\t\t/* prepare to delete directory */\n\t\ttheGlobals->myPB.ciPB.dirInfo.ioNamePtr = (StringPtr)&theGlobals->itemName;\n\t\ttheGlobals->myPB.ciPB.dirInfo.ioFDirIndex = 1;\t/* get first item */\n\t\ttheGlobals->myPB.ciPB.dirInfo.ioDrDirID = dirToDelete;\t/* in this directory */\n\t\ttheGlobals->error = PBGetCatInfoSync(&(theGlobals->myPB.ciPB));\n\t\tif ( theGlobals->error == noErr )\n\t\t{\n\t\t\tsavedDir = dirToDelete;\n\t\t\t/* We have an item.  Is it a file or directory? */\n\t\t\tif ( (theGlobals->myPB.ciPB.dirInfo.ioFlAttrib & kioFlAttribDirMask) != 0 )\n\t\t\t{\n\t\t\t\t/* it's a directory */\n\t\t\t\tsavedDir = theGlobals->myPB.ciPB.dirInfo.ioDrDirID;\t/* save dirID of directory instead */\n\t\t\t\tDeleteLevel(theGlobals->myPB.ciPB.dirInfo.ioDrDirID, theGlobals);\t/* Delete its contents */\n\t\t\t\ttheGlobals->myPB.ciPB.dirInfo.ioNamePtr = NULL;\t/* prepare to delete directory */\n\t\t\t}\n\t\t\tif ( theGlobals->error == noErr )\n\t\t\t{\n\t\t\t\ttheGlobals->myPB.ciPB.dirInfo.ioDrDirID = savedDir;\t/* restore dirID */\n\t\t\t\ttheGlobals->myPB.hPB.fileParam.ioFVersNum = 0;\t/* just in case it's used on an MFS volume... */\n\t\t\t\ttheGlobals->error = PBHDeleteSync(&(theGlobals->myPB.hPB));\t/* delete this item */\n\t\t\t\tif ( theGlobals->error == fLckdErr )\n\t\t\t\t{\n\t\t\t\t\t(void) PBHRstFLockSync(&(theGlobals->myPB.hPB));\t/* unlock it */\n\t\t\t\t\ttheGlobals->error = PBHDeleteSync(&(theGlobals->myPB.hPB));\t/* and try again */\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} while ( theGlobals->error == noErr );\n\t\n\tif ( theGlobals->error == fnfErr )\n\t{\n\t\ttheGlobals->error = noErr;\n\t}\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tDeleteDirectoryContents(short vRefNum,\n\t\t\t\t\t\t\t\t \t\tlong dirID,\n\t\t\t\t\t\t\t\t\t\tConstStr255Param name)\n{\n\tDeleteEnumGlobals theGlobals;\n\tBoolean\tisDirectory;\n\tOSErr error;\n\n\t/*  Get the real dirID and make sure it is a directory. */\n\terror = GetDirectoryID(vRefNum, dirID, name, &dirID, &isDirectory);\n\tif ( error == noErr )\n\t{\n\t\tif ( isDirectory )\n\t\t{\n\t\t\t/* Get the real vRefNum */\n\t\t\terror = DetermineVRefNum(name, vRefNum, &vRefNum);\n\t\t\tif ( error == noErr )\n\t\t\t{\n\t\t\t\t/* Set up the globals we need to access from the recursive routine. */\n\t\t\t\ttheGlobals.myPB.ciPB.dirInfo.ioVRefNum = vRefNum;\n\t\t\t\t\t\n\t\t\t\t/* Here we go into recursion land... */\n\t\t\t\tDeleteLevel(dirID, &theGlobals);\n\t\t\t\terror = theGlobals.error;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\terror = dirNFErr;\n\t\t}\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tDeleteDirectory(short vRefNum,\n\t\t\t\t\t\t\t\tlong dirID,\n\t\t\t\t\t\t\t\tConstStr255Param name)\n{\n\tOSErr error;\n\t\n\t/* Make sure a directory was specified and then delete its contents */\n\terror = DeleteDirectoryContents(vRefNum, dirID, name);\n\tif ( error == noErr )\n\t{\n\t\terror = HDelete(vRefNum, dirID, name);\n\t\tif ( error == fLckdErr )\n\t\t{\n\t\t\t(void) HRstFLock(vRefNum, dirID, name);\t/* unlock the directory locked by AppleShare */\n\t\t\terror = HDelete(vRefNum, dirID, name);\t/* and try again */\n\t\t}\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tCheckObjectLock(short vRefNum,\n\t\t\t\t\t\t\t\tlong dirID,\n\t\t\t\t\t\t\t\tConstStr255Param name)\n{\n\tCInfoPBRec pb;\n\tOSErr error;\n\t\n\terror = GetCatInfoNoName(vRefNum, dirID, name, &pb);\n\tif ( error == noErr )\n\t{\n\t\t/* check locked bit */\n\t\tif ( (pb.hFileInfo.ioFlAttrib & kioFlAttribLockedMask) != 0 )\n\t\t{\n\t\t\terror = fLckdErr;\n\t\t}\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpCheckObjectLock(const FSSpec *spec)\n{\n\treturn ( CheckObjectLock(spec->vRefNum, spec->parID, spec->name) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetFileSize(short vRefNum,\n\t\t\t\t\t\t\tlong dirID,\n\t\t\t\t\t\t\tConstStr255Param fileName,\n\t\t\t\t\t\t\tlong *dataSize,\n\t\t\t\t\t\t\tlong *rsrcSize)\n{\n\tHParamBlockRec pb;\n\tOSErr error;\n\t\n\tpb.fileParam.ioNamePtr = (StringPtr)fileName;\n\tpb.fileParam.ioVRefNum = vRefNum;\n\tpb.fileParam.ioFVersNum = 0;\n\tpb.fileParam.ioDirID = dirID;\n\tpb.fileParam.ioFDirIndex = 0;\n\terror = PBHGetFInfoSync(&pb);\n\tif ( error == noErr )\n\t{\n\t\t*dataSize = pb.fileParam.ioFlLgLen;\n\t\t*rsrcSize = pb.fileParam.ioFlRLgLen;\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpGetFileSize(const FSSpec *spec,\n\t\t\t\t\t\t\t   long *dataSize,\n\t\t\t\t\t\t\t   long *rsrcSize)\n{\n\treturn ( GetFileSize(spec->vRefNum, spec->parID, spec->name, dataSize, rsrcSize) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tBumpDate(short vRefNum,\n\t\t\t\t\t\t long dirID,\n\t\t\t\t\t\t ConstStr255Param name)\n/* Given a file or directory, change its modification date to the current date/time. */\n{\n\tCInfoPBRec pb;\n\tStr31 tempName;\n\tOSErr error;\n\tunsigned long secs;\n\n\t/* Protection against File Sharing problem */\n\tif ( (name == NULL) || (name[0] == 0) )\n\t{\n\t\ttempName[0] = 0;\n\t\tpb.hFileInfo.ioNamePtr = tempName;\n\t\tpb.hFileInfo.ioFDirIndex = -1;\t/* use ioDirID */\n\t}\n\telse\n\t{\n\t\tpb.hFileInfo.ioNamePtr = (StringPtr)name;\n\t\tpb.hFileInfo.ioFDirIndex = 0;\t/* use ioNamePtr and ioDirID */\n\t}\n\tpb.hFileInfo.ioVRefNum = vRefNum;\n\tpb.hFileInfo.ioDirID = dirID;\n\terror = PBGetCatInfoSync(&pb);\n\tif ( error == noErr )\n\t{\n\t\tGetDateTime(&secs);\n\t\t/* set mod date to current date, or one second into the future\n\t\t\tif mod date = current date */\n\t\tpb.hFileInfo.ioFlMdDat = (secs == pb.hFileInfo.ioFlMdDat) ? (++secs) : (secs);\n\t\tif ( pb.dirInfo.ioNamePtr == tempName )\n\t\t{\n\t\t\tpb.hFileInfo.ioDirID = pb.hFileInfo.ioFlParID;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpb.hFileInfo.ioDirID = dirID;\n\t\t}\n\t\terror = PBSetCatInfoSync(&pb);\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpBumpDate(const FSSpec *spec)\n{\n\treturn ( BumpDate(spec->vRefNum, spec->parID, spec->name) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tChangeCreatorType(short vRefNum,\n\t\t\t\t\t\t\t\t  long dirID,\n\t\t\t\t\t\t\t\t  ConstStr255Param name,\n\t\t\t\t\t\t\t\t  OSType creator,\n\t\t\t\t\t\t\t\t  OSType fileType)\n{\n\tCInfoPBRec pb;\n\tOSErr error;\n\tshort realVRefNum;\n\tlong parID;\n\n\tpb.hFileInfo.ioNamePtr = (StringPtr)name;\n\tpb.hFileInfo.ioVRefNum = vRefNum;\n\tpb.hFileInfo.ioDirID = dirID;\n\tpb.hFileInfo.ioFDirIndex = 0;\t/* use ioNamePtr and ioDirID */\n\terror = PBGetCatInfoSync(&pb);\n\tif ( error == noErr )\n\t{\n\t\tif ( (pb.hFileInfo.ioFlAttrib & kioFlAttribDirMask) == 0 )\t/* if file */\n\t\t{\n\t\t\tparID = pb.hFileInfo.ioFlParID;\t/* save parent dirID for BumpDate call */\n\n\t\t\t/* If creator not 0x00000000, change creator */\n\t\t\tif ( creator != (OSType)0x00000000 )\n\t\t\t{\n\t\t\t\tpb.hFileInfo.ioFlFndrInfo.fdCreator = creator;\n\t\t\t}\n\t\t\t\n\t\t\t/* If fileType not 0x00000000, change fileType */\n\t\t\tif ( fileType != (OSType)0x00000000 )\n\t\t\t{\n\t\t\t\tpb.hFileInfo.ioFlFndrInfo.fdType = fileType;\n\t\t\t}\n\t\t\t\t\n\t\t\tpb.hFileInfo.ioDirID = dirID;\n\t\t\terror = PBSetCatInfoSync(&pb);\t/* now, save the new information back to disk */\n\n\t\t\tif ( (error == noErr) && (parID != fsRtParID) ) /* can't bump fsRtParID */\n\t\t\t{\n\t\t\t\t/* get the real vRefNum in case a full pathname was passed */\n\t\t\t\terror = DetermineVRefNum(name, vRefNum, &realVRefNum);\n\t\t\t\tif ( error == noErr )\n\t\t\t\t{\n\t\t\t\t\terror = BumpDate(realVRefNum, parID, NULL);\n\t\t\t\t\t\t/* and bump the parent directory's mod date to wake up the Finder */\n\t\t\t\t\t\t/* to the change we just made */\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* it was a directory, not a file */\n\t\t\terror = notAFileErr;\n\t\t}\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpChangeCreatorType(const FSSpec *spec,\n\t\t\t\t\t\t\t\t\t OSType creator,\n\t\t\t\t\t\t\t\t\t OSType fileType)\n{\n\treturn ( ChangeCreatorType(spec->vRefNum, spec->parID, spec->name, creator, fileType) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tChangeFDFlags(short vRefNum,\n\t\t\t\t\t\t\t  long dirID,\n\t\t\t\t\t\t\t  ConstStr255Param name,\n\t\t\t\t\t\t\t  Boolean\tsetBits,\n\t\t\t\t\t\t\t  unsigned short flagBits)\n{\n\tCInfoPBRec pb;\n\tStr31 tempName;\n\tOSErr error;\n\tshort realVRefNum;\n\tlong parID;\n\n\t/* Protection against File Sharing problem */\n\tif ( (name == NULL) || (name[0] == 0) )\n\t{\n\t\ttempName[0] = 0;\n\t\tpb.hFileInfo.ioNamePtr = tempName;\n\t\tpb.hFileInfo.ioFDirIndex = -1;\t/* use ioDirID */\n\t}\n\telse\n\t{\n\t\tpb.hFileInfo.ioNamePtr = (StringPtr)name;\n\t\tpb.hFileInfo.ioFDirIndex = 0;\t/* use ioNamePtr and ioDirID */\n\t}\n\tpb.hFileInfo.ioVRefNum = vRefNum;\n\tpb.hFileInfo.ioDirID = dirID;\n\terror = PBGetCatInfoSync(&pb);\n\tif ( error == noErr )\n\t{\n\t\tparID = pb.hFileInfo.ioFlParID;\t/* save parent dirID for BumpDate call */\n\t\t\n\t\t/* set or clear the appropriate bits in the Finder flags */\n\t\tif ( setBits )\n\t\t{\n\t\t\t/* OR in the bits */\n\t\t\tpb.hFileInfo.ioFlFndrInfo.fdFlags |= flagBits;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* AND out the bits */\n\t\t\tpb.hFileInfo.ioFlFndrInfo.fdFlags &= ~flagBits;\n\t\t}\n\t\t\t\n\t\tif ( pb.dirInfo.ioNamePtr == tempName )\n\t\t{\n\t\t\tpb.hFileInfo.ioDirID = pb.hFileInfo.ioFlParID;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpb.hFileInfo.ioDirID = dirID;\n\t\t}\n\t\t\n\t\terror = PBSetCatInfoSync(&pb);\t/* now, save the new information back to disk */\n\n\t\tif ( (error == noErr) && (parID != fsRtParID) ) /* can't bump fsRtParID */\n\t\t{\n\t\t\t/* get the real vRefNum in case a full pathname was passed */\n\t\t\terror = DetermineVRefNum(name, vRefNum, &realVRefNum);\n\t\t\tif ( error == noErr )\n\t\t\t{\n\t\t\t\terror = BumpDate(realVRefNum, parID, NULL);\n\t\t\t\t\t/* and bump the parent directory's mod date to wake up the Finder */\n\t\t\t\t\t/* to the change we just made */\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpChangeFDFlags(const FSSpec *spec,\n\t\t\t\t\t\t\t\t Boolean setBits,\n\t\t\t\t\t\t\t\t unsigned short flagBits)\n{\n\treturn ( ChangeFDFlags(spec->vRefNum, spec->parID, spec->name, setBits, flagBits) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tSetIsInvisible(short vRefNum,\n\t\t\t\t\t\t\t   long dirID,\n\t\t\t\t\t\t\t   ConstStr255Param name)\n\t/* Given a file or directory, make it invisible. */\n{\n\treturn ( ChangeFDFlags(vRefNum, dirID, name, true, kIsInvisible) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpSetIsInvisible(const FSSpec *spec)\n\t/* Given a file or directory, make it invisible. */\n{\n\treturn ( ChangeFDFlags(spec->vRefNum, spec->parID, spec->name, true, kIsInvisible) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tClearIsInvisible(short vRefNum,\n\t\t\t\t\t\t\t\t long dirID,\n\t\t\t\t\t\t\t\t ConstStr255Param name)\n\t/* Given a file or directory, make it visible. */\n{\n\treturn ( ChangeFDFlags(vRefNum, dirID, name, false, kIsInvisible) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpClearIsInvisible(const FSSpec *spec)\n\t/* Given a file or directory, make it visible. */\n{\n\treturn ( ChangeFDFlags(spec->vRefNum, spec->parID, spec->name, false, kIsInvisible) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tSetNameLocked(short vRefNum,\n\t\t\t\t\t\t\t  long dirID,\n\t\t\t\t\t\t\t  ConstStr255Param name)\n\t/* Given a file or directory, lock its name. */\n{\n\treturn ( ChangeFDFlags(vRefNum, dirID, name, true, kNameLocked) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpSetNameLocked(const FSSpec *spec)\n\t/* Given a file or directory, lock its name. */\n{\n\treturn ( ChangeFDFlags(spec->vRefNum, spec->parID, spec->name, true, kNameLocked) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tClearNameLocked(short vRefNum,\n\t\t\t\t\t\t\t\tlong dirID,\n\t\t\t\t\t\t\t\tConstStr255Param name)\n\t/* Given a file or directory, unlock its name. */\n{\n\treturn ( ChangeFDFlags(vRefNum, dirID, name, false, kNameLocked) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpClearNameLocked(const FSSpec *spec)\n\t/* Given a file or directory, unlock its name. */\n{\n\treturn ( ChangeFDFlags(spec->vRefNum, spec->parID, spec->name, false, kNameLocked) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tSetIsStationery(short vRefNum,\n\t\t\t\t\t\t\t\tlong dirID,\n\t\t\t\t\t\t\t\tConstStr255Param name)\n\t/* Given a file, make it a stationery pad. */\n{\n\treturn ( ChangeFDFlags(vRefNum, dirID, name, true, kIsStationery) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpSetIsStationery(const FSSpec *spec)\n\t/* Given a file, make it a stationery pad. */\n{\n\treturn ( ChangeFDFlags(spec->vRefNum, spec->parID, spec->name, true, kIsStationery) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tClearIsStationery(short vRefNum,\n\t\t\t\t\t\t\t\t  long dirID,\n\t\t\t\t\t\t\t\t  ConstStr255Param name)\n\t/* Given a file, clear the stationery bit. */\n{\n\treturn ( ChangeFDFlags(vRefNum, dirID, name, false, kIsStationery) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpClearIsStationery(const FSSpec *spec)\n\t/* Given a file, clear the stationery bit. */\n{\n\treturn ( ChangeFDFlags(spec->vRefNum, spec->parID, spec->name, false, kIsStationery) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tSetHasCustomIcon(short vRefNum,\n\t\t\t\t\t\t\t\t long dirID,\n\t\t\t\t\t\t\t\t ConstStr255Param name)\n\t/* Given a file or directory, indicate that it has a custom icon. */\n{\n\treturn ( ChangeFDFlags(vRefNum, dirID, name, true, kHasCustomIcon) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpSetHasCustomIcon(const FSSpec *spec)\n\t/* Given a file or directory, indicate that it has a custom icon. */\n{\n\treturn ( ChangeFDFlags(spec->vRefNum, spec->parID, spec->name, true, kHasCustomIcon) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tClearHasCustomIcon(short vRefNum,\n\t\t\t\t\t\t\t\t   long dirID,\n\t\t\t\t\t\t\t\t   ConstStr255Param name)\n\t/* Given a file or directory, indicate that it does not have a custom icon. */\n{\n\treturn ( ChangeFDFlags(vRefNum, dirID, name, false, kHasCustomIcon) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpClearHasCustomIcon(const FSSpec *spec)\n\t/* Given a file or directory, indicate that it does not have a custom icon. */\n{\n\treturn ( ChangeFDFlags(spec->vRefNum, spec->parID, spec->name, false, kHasCustomIcon) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tClearHasBeenInited(short vRefNum,\n\t\t\t\t\t\t\t\t   long dirID,\n\t\t\t\t\t\t\t\t   ConstStr255Param name)\n\t/* Given a file, clear its \"has been inited\" bit. */\n{\n\treturn ( ChangeFDFlags(vRefNum, dirID, name, false, kHasBeenInited) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpClearHasBeenInited(const FSSpec *spec)\n\t/* Given a file, clear its \"has been inited\" bit. */\n{\n\treturn ( ChangeFDFlags(spec->vRefNum, spec->parID, spec->name, false, kHasBeenInited) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tCopyFileMgrAttributes(short srcVRefNum,\n\t\t\t\t\t\t\t\t\t  long srcDirID,\n\t\t\t\t\t\t\t\t\t  ConstStr255Param srcName,\n\t\t\t\t\t\t\t\t\t  short dstVRefNum,\n\t\t\t\t\t\t\t\t\t  long dstDirID,\n\t\t\t\t\t\t\t\t\t  ConstStr255Param dstName,\n\t\t\t\t\t\t\t\t\t  Boolean copyLockBit)\n{\n\tUniversalFMPB pb;\n\tStr31 tempName;\n\tOSErr error;\n\tBoolean objectIsDirectory;\n\n\tpb.ciPB.hFileInfo.ioVRefNum = srcVRefNum;\n\tpb.ciPB.hFileInfo.ioDirID = srcDirID;\n\n\t/* Protection against File Sharing problem */\n\tif ( (srcName == NULL) || (srcName[0] == 0) )\n\t{\n\t\ttempName[0] = 0;\n\t\tpb.ciPB.hFileInfo.ioNamePtr = tempName;\n\t\tpb.ciPB.hFileInfo.ioFDirIndex = -1;\t/* use ioDirID */\n\t}\n\telse\n\t{\n\t\tpb.ciPB.hFileInfo.ioNamePtr = (StringPtr)srcName;\n\t\tpb.ciPB.hFileInfo.ioFDirIndex = 0;\t/* use ioNamePtr and ioDirID */\n\t}\n\terror = PBGetCatInfoSync(&pb.ciPB);\n\tif ( error == noErr )\n\t{\n\t\tobjectIsDirectory = ( (pb.ciPB.hFileInfo.ioFlAttrib & kioFlAttribDirMask) != 0 );\n\t\tpb.ciPB.hFileInfo.ioVRefNum = dstVRefNum;\n\t\tpb.ciPB.hFileInfo.ioDirID = dstDirID;\n\t\tif ( (dstName != NULL) && (dstName[0] == 0) )\n\t\t{\n\t\t\tpb.ciPB.hFileInfo.ioNamePtr = NULL;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpb.ciPB.hFileInfo.ioNamePtr = (StringPtr)dstName;\n\t\t}\n\t\t/* don't copy the hasBeenInited bit */\n\t\tpb.ciPB.hFileInfo.ioFlFndrInfo.fdFlags = ( pb.ciPB.hFileInfo.ioFlFndrInfo.fdFlags & ~kHasBeenInited );\n\t\terror = PBSetCatInfoSync(&pb.ciPB);\n\t\tif ( (error == noErr) && (copyLockBit) && ((pb.ciPB.hFileInfo.ioFlAttrib & kioFlAttribLockedMask) != 0) )\n\t\t{\n\t\t\tpb.hPB.fileParam.ioFVersNum = 0;\n\t\t\terror = PBHSetFLockSync(&pb.hPB);\n\t\t\tif ( (error != noErr) && (objectIsDirectory) )\n\t\t\t{\n\t\t\t\terror = noErr; /* ignore lock errors if destination is directory */\n\t\t\t}\n\t\t}\n\t}\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpCopyFileMgrAttributes(const FSSpec *srcSpec,\n\t\t\t\t\t\t\t\t\t\t const FSSpec *dstSpec,\n\t\t\t\t\t\t\t\t\t\t Boolean copyLockBit)\n{\n\treturn ( CopyFileMgrAttributes(srcSpec->vRefNum, srcSpec->parID, srcSpec->name,\n\t\t\t\t\t\t\t\t   dstSpec->vRefNum, dstSpec->parID, dstSpec->name,\n\t\t\t\t\t\t\t\t   copyLockBit) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tHOpenAware(short vRefNum,\n\t\t\t\t\t\t   long dirID,\n\t\t\t\t\t\t   ConstStr255Param fileName,\n\t\t\t\t\t\t   short denyModes,\n\t\t\t\t\t\t   short *refNum)\n{\n\tHParamBlockRec pb;\n\tOSErr error;\n\tGetVolParmsInfoBuffer volParmsInfo;\n\tlong infoSize = sizeof(GetVolParmsInfoBuffer);\n\n\tpb.ioParam.ioMisc = NULL;\n\tpb.fileParam.ioFVersNum = 0;\n\tpb.fileParam.ioNamePtr = (StringPtr)fileName;\n\tpb.fileParam.ioVRefNum = vRefNum;\n\tpb.fileParam.ioDirID = dirID;\n\n\t/* get volume attributes */\n\t/* this preflighting is needed because Foreign File Access based file systems don't */\n\t/* return the correct error result to the OpenDeny call */\n\terror = HGetVolParms(fileName, vRefNum, &volParmsInfo, &infoSize);\n\tif ( (error == noErr) && hasOpenDeny(volParmsInfo) )\n\t{\n\t\t/* if volume supports OpenDeny, use it and return */\n\t\t\tpb.accessParam.ioDenyModes = denyModes;\n\t\t\terror = PBHOpenDenySync(&pb);\n\t\t\t*refNum = pb.ioParam.ioRefNum;\n\t}\n\telse if ( (error == noErr) || (error == paramErr) )\t/* paramErr is OK, it just means this volume doesn't support GetVolParms */\n\t{\n\t\t/* OpenDeny isn't supported, so try File Manager Open functions */\n\t\t\n\t\t/* If request includes write permission, then see if the volume is */\n\t\t/* locked by hardware or software. The HFS file system doesn't check */\n\t\t/* for this when a file is opened - you only find out later when you */\n\t\t/* try to write and the write fails with a wPrErr or a vLckdErr. */\n\t\t\n\t\tif ( (denyModes & dmWr) != 0 )\n\t\t{\n\t\t\terror = CheckVolLock(fileName, vRefNum);\n\t\t}\n\t\telse\n\t\t{\n\t\t\terror = noErr;\n\t\t}\n\t\t\n\t\tif ( error == noErr )\n\t\t{\n\t\t\t/* Set File Manager permissions to closest thing possible */\n\t\t\tif ( (denyModes == dmWr) || (denyModes == dmRdWr) )\n\t\t\t{\n\t\t\t\tpb.ioParam.ioPermssn = fsRdWrShPerm;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tpb.ioParam.ioPermssn = denyModes % 4;\n\t\t\t}\n\n\t\t\terror = PBHOpenDFSync(&pb);\t\t\t\t/* Try OpenDF */\n\t\t\tif ( error == paramErr )\n\t\t\t{\n\t\t\t\terror = PBHOpenSync(&pb);\t\t\t/* OpenDF not supported, so try Open */\n\t\t\t}\n\t\t\t*refNum = pb.ioParam.ioRefNum;\n\t\t}\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpOpenAware(const FSSpec *spec,\n\t\t\t\t\t\t\t short denyModes,\n\t\t\t\t\t\t\t short *refNum)\n{\n\treturn ( HOpenAware(spec->vRefNum, spec->parID, spec->name, denyModes, refNum) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tHOpenRFAware(short vRefNum,\n\t\t\t\t\t\t\t long dirID,\n\t\t\t\t\t\t\t ConstStr255Param fileName,\n\t\t\t\t\t\t\t short denyModes,\n\t\t\t\t\t\t\t short *refNum)\n{\n\tHParamBlockRec pb;\n\tOSErr error;\n\tGetVolParmsInfoBuffer volParmsInfo;\n\tlong infoSize = sizeof(GetVolParmsInfoBuffer);\n\n\tpb.ioParam.ioMisc = NULL;\n\tpb.fileParam.ioFVersNum = 0;\n\tpb.fileParam.ioNamePtr = (StringPtr)fileName;\n\tpb.fileParam.ioVRefNum = vRefNum;\n\tpb.fileParam.ioDirID = dirID;\n\n\t/* get volume attributes */\n\t/* this preflighting is needed because Foreign File Access based file systems don't */\n\t/* return the correct error result to the OpenRFDeny call */\n\terror = HGetVolParms(fileName, vRefNum, &volParmsInfo, &infoSize);\n\tif ( (error == noErr) && hasOpenDeny(volParmsInfo) )\n\t{\n\t\t/* if volume supports OpenRFDeny, use it and return */\n\t\tif ( hasOpenDeny(volParmsInfo) )\n\t\t{\n\t\t\tpb.accessParam.ioDenyModes = denyModes;\n\t\t\terror = PBHOpenRFDenySync(&pb);\n\t\t\t*refNum = pb.ioParam.ioRefNum;\n\t\t}\n\t}\n\telse if ( (error == noErr) || (error == paramErr) )\t/* paramErr is OK, it just means this volume doesn't support GetVolParms */\n\t{\n\t\t/* OpenRFDeny isn't supported, so try File Manager OpenRF function */\n\t\t\n\t\t/* If request includes write permission, then see if the volume is */\n\t\t/* locked by hardware or software. The HFS file system doesn't check */\n\t\t/* for this when a file is opened - you only find out later when you */\n\t\t/* try to write and the write fails with a wPrErr or a vLckdErr. */\n\t\t\n\t\tif ( (denyModes & dmWr) != 0 )\n\t\t{\n\t\t\terror = CheckVolLock(fileName, vRefNum);\n\t\t}\n\t\telse\n\t\t{\n\t\t\terror = noErr;\n\t\t}\n\t\t\n\t\tif ( error == noErr )\n\t\t{\n\t\t\t/* Set File Manager permissions to closest thing possible */\n\t\t\tif ( (denyModes == dmWr) || (denyModes == dmRdWr) )\n\t\t\t{\n\t\t\t\tpb.ioParam.ioPermssn = fsRdWrShPerm;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tpb.ioParam.ioPermssn = denyModes % 4;\n\t\t\t}\n\n\t\t\terror = PBHOpenRFSync(&pb);\n\t\t\t*refNum = pb.ioParam.ioRefNum;\n\t\t}\n\t}\n\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpOpenRFAware(const FSSpec *spec,\n\t\t\t\t\t\t\t   short denyModes,\n\t\t\t\t\t\t\t   short *refNum)\n{\n\treturn ( HOpenRFAware(spec->vRefNum, spec->parID, spec->name, denyModes, refNum) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSReadNoCache(short refNum,\n\t\t\t\t\t\t\t  long *count,\n\t\t\t\t\t\t\t  void *buffPtr)\n{\n\tParamBlockRec pb;\n\tOSErr error;\n\n\tpb.ioParam.ioRefNum = refNum;\n\tpb.ioParam.ioBuffer = (Ptr)buffPtr;\n\tpb.ioParam.ioReqCount = *count;\n\tpb.ioParam.ioPosMode = fsAtMark + noCacheMask;\t/* fsAtMark + noCacheMask */\n\tpb.ioParam.ioPosOffset = 0;\n\terror = PBReadSync(&pb);\n\t*count = pb.ioParam.ioActCount;\t\t\t\t/* always return count */\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSWriteNoCache(short refNum,\n\t\t\t\t\t\t\t   long *count,\n\t\t\t\t\t\t\t   const void *buffPtr)\n{\n\tParamBlockRec pb;\n\tOSErr error;\n\n\tpb.ioParam.ioRefNum = refNum;\n\tpb.ioParam.ioBuffer = (Ptr)buffPtr;\n\tpb.ioParam.ioReqCount = *count;\n\tpb.ioParam.ioPosMode = fsAtMark + noCacheMask;\t/* fsAtMark + noCacheMask */\n\tpb.ioParam.ioPosOffset = 0;\n\terror = PBWriteSync(&pb);\n\t*count = pb.ioParam.ioActCount;\t\t\t\t/* always return count */\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\n/*\n**\tSee if numBytes bytes of buffer1 are equal to buffer2.\n*/\nstatic\tBoolean EqualMemory(const void *buffer1, const void *buffer2, unsigned long numBytes)\n{\n\tregister unsigned char *b1 = (unsigned char *)buffer1;\n\tregister unsigned char *b2 = (unsigned char *)buffer2;\n\n\tif ( b1 != b2 )\t/* if buffer pointers are same, then they are equal */\n\t{\n\t\twhile ( numBytes > 0 )\n\t\t{\n\t\t\t/* compare the bytes and then increment the pointers */\n\t\t\tif ( (*b1++ - *b2++) != 0 )\n\t\t\t{\n\t\t\t\treturn ( false );\n\t\t\t}\n\t\t\t--numBytes;\n\t\t}\n\t}\n\t\n\treturn ( true );\n}\n\n/*****************************************************************************/\n\n/*\n**\tRead any number of bytes from an open file using read-verify mode.\n**\tThe FSReadVerify function reads any number of bytes from an open file\n**\tand verifies them against the data in the buffer pointed to by buffPtr.\n**\t\n**\tBecause of a bug in the HFS file system, only non-block aligned parts of\n**\tthe read are verified against the buffer data and the rest is *copied*\n**\tinto the buffer.  Thus, you shouldn't verify against your original data;\n**\tinstead, you should verify against a copy of the original data and then\n**\tcompare the read-verified copy against the original data after calling\n**\tFSReadVerify. That's why this function isn't exported - it needs the\n**\twrapper provided by FSWriteVerify.\n*/\nstatic\tOSErr\tFSReadVerify(short refNum,\n\t\t\t\t\t\t\t long *count,\n\t\t\t\t\t\t\t void *buffPtr)\n{\n\tParamBlockRec\tpb;\n\tOSErr\t\t\tresult;\n\n\tpb.ioParam.ioRefNum = refNum;\n\tpb.ioParam.ioBuffer = (Ptr)buffPtr;\n\tpb.ioParam.ioReqCount = *count;\n\tpb.ioParam.ioPosMode = fsAtMark + rdVerify;\n\tpb.ioParam.ioPosOffset = 0;\n\tresult = PBReadSync(&pb);\n\t*count = pb.ioParam.ioActCount;\t\t\t/* always return count */\n\treturn ( result );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSWriteVerify(short refNum,\n\t\t\t\t\t\t\t  long *count,\n\t\t\t\t\t\t\t  const void *buffPtr)\n{\n\tPtr\t\tverifyBuffer;\n\tlong\tposition;\n\tlong\tbufferSize;\n\tlong\tbyteCount;\n\tlong\tbytesVerified;\n\tPtr\t\tstartVerify;\n\tOSErr\tresult;\n\t\n\t/*\n\t**\tAllocate the verify buffer\n\t**\tTry to get get a large enough buffer to verify in one pass.\n\t**\tIf that fails, use GetTempBuffer to get a buffer.\n\t*/\n\tbufferSize = *count;\n\tverifyBuffer = NewPtr(bufferSize);\n\tif ( verifyBuffer == NULL )\n\t{\n\t\tverifyBuffer = GetTempBuffer(bufferSize, &bufferSize);\n\t}\n\tif ( verifyBuffer != NULL )\n\t{\t\t\n\t\t/* Save the current position */\n\t\tresult = GetFPos(refNum, &position);\n\t\tif ( result == noErr )\n\t\t{\n\t\t\t/* Write the data */\n\t\t\tresult = FSWrite(refNum, count, buffPtr);\n\t\t\tif ( result == noErr )\n\t\t\t{\n\t\t\t\t/* Restore the original position */\n\t\t\t\tresult = SetFPos(refNum, fsFromStart, position);\n\t\t\t\tif ( result == noErr )\n\t\t\t\t{\n\t\t\t\t\t/*\n\t\t\t\t\t**\t*count\t\t\t= total number of bytes to verify\n\t\t\t\t\t**\tbufferSize\t\t= the size of the verify buffer\n\t\t\t\t\t**\tbytesVerified\t= number of bytes verified\n\t\t\t\t\t**\tbyteCount\t\t= number of bytes to verify this pass\n\t\t\t\t\t**\tstartVerify\t\t= position in buffPtr\n\t\t\t\t\t*/\n\t\t\t\t\tbytesVerified = 0;\n\t\t\t\t\tstartVerify = (Ptr)buffPtr;\n\t\t\t\t\twhile ( (bytesVerified < *count) && ( result == noErr ) )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( (*count - bytesVerified) > bufferSize )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tbyteCount = bufferSize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tbyteCount = *count - bytesVerified;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t**\tCopy the write buffer into the verify buffer.\n\t\t\t\t\t\t**\tThis step is needed because the File Manager\n\t\t\t\t\t\t**\tcompares the data in any non-block aligned\n\t\t\t\t\t\t**\tdata at the beginning and end of the read-verify\n\t\t\t\t\t\t**\trequest back into the file system's cache\n\t\t\t\t\t\t**\tto the data in verify Buffer. However, the\n\t\t\t\t\t\t**\tFile Manager does not compare any full blocks\n\t\t\t\t\t\t**\tand instead copies them into the verify buffer\n\t\t\t\t\t\t**\tso we still have to compare the buffers again\n\t\t\t\t\t\t**\tafter the read-verify request completes.\n\t\t\t\t\t\t*/\n\t\t\t\t\t\tBlockMoveData(startVerify, verifyBuffer, byteCount);\n\t\t\t\t\t\t\n\t\t\t\t\t\t/* Read-verify the data back into the verify buffer */\n\t\t\t\t\t\tresult = FSReadVerify(refNum, &byteCount, verifyBuffer);\n\t\t\t\t\t\tif ( result == noErr )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/* See if the buffers are the same */\n\t\t\t\t\t\t\tif ( !EqualMemory(verifyBuffer, startVerify, byteCount) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tresult = ioErr;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstartVerify += byteCount;\n\t\t\t\t\t\t\tbytesVerified += byteCount;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tDisposePtr(verifyBuffer);\n\t}\n\telse\n\t{\n\t\tresult = memFullErr;\n\t}\n\treturn ( result );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tCopyFork(short srcRefNum,\n\t\t\t\t\t\t short dstRefNum,\n\t\t\t\t\t\t void *copyBufferPtr,\n\t\t\t\t\t\t long copyBufferSize)\n{\n\tParamBlockRec srcPB;\n\tParamBlockRec dstPB;\n\tOSErr srcError;\n\tOSErr dstError;\n\n\tif ( (copyBufferPtr == NULL) || (copyBufferSize == 0) )\n\t\treturn ( paramErr );\n\t\n\tsrcPB.ioParam.ioRefNum = srcRefNum;\n\tdstPB.ioParam.ioRefNum = dstRefNum;\n\n\t/* preallocate the destination fork and */\n\t/* ensure the destination fork's EOF is correct after the copy */\n\tsrcError = PBGetEOFSync(&srcPB);\n\tif ( srcError != noErr )\n\t\treturn ( srcError );\n\tdstPB.ioParam.ioMisc = srcPB.ioParam.ioMisc;\n\tdstError = PBSetEOFSync(&dstPB);\n\tif ( dstError != noErr )\n\t\treturn ( dstError );\n\n\t/* reset source fork's mark */\n\tsrcPB.ioParam.ioPosMode = fsFromStart;\n\tsrcPB.ioParam.ioPosOffset = 0;\n\tsrcError = PBSetFPosSync(&srcPB);\n\tif ( srcError != noErr )\n\t\treturn ( srcError );\n\n\t/* reset destination fork's mark */\n\tdstPB.ioParam.ioPosMode = fsFromStart;\n\tdstPB.ioParam.ioPosOffset = 0;\n\tdstError = PBSetFPosSync(&dstPB);\n\tif ( dstError != noErr )\n\t\treturn ( dstError );\n\n\t/* set up fields that won't change in the loop */\n\tsrcPB.ioParam.ioBuffer = (Ptr)copyBufferPtr;\n\tsrcPB.ioParam.ioPosMode = fsAtMark + noCacheMask;/* fsAtMark + noCacheMask */\n\t/* If copyBufferSize is greater than 512 bytes, make it a multiple of 512 bytes */\n\t/* This will make writes on local volumes faster */\n\tif ( (copyBufferSize >= 512) && ((copyBufferSize & 0x1ff) != 0) )\n\t{\n\t\tsrcPB.ioParam.ioReqCount = copyBufferSize & 0xfffffe00;\n\t}\n\telse\n\t{\n\t\tsrcPB.ioParam.ioReqCount = copyBufferSize;\n\t}\n\tdstPB.ioParam.ioBuffer = (Ptr)copyBufferPtr;\n\tdstPB.ioParam.ioPosMode = fsAtMark + noCacheMask;/* fsAtMark + noCacheMask */\n\n\twhile ( (srcError == noErr) && (dstError == noErr) )\n\t{\n\t\tsrcError = PBReadSync(&srcPB);\n\t\tdstPB.ioParam.ioReqCount = srcPB.ioParam.ioActCount;\n\t\tdstError = PBWriteSync(&dstPB);\n\t}\n\n\t/* make sure there were no errors at the destination */\n\tif ( dstError != noErr )\n\t\treturn ( dstError );\n\n\t/* make sure the only error at the source was eofErr */\n\tif ( srcError != eofErr )\n\t\treturn ( srcError );\n\n\treturn ( noErr );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetFileLocation(short refNum,\n\t\t\t\t\t\t\t\tshort *vRefNum,\n\t\t\t\t\t\t\t\tlong *dirID,\n\t\t\t\t\t\t\t\tStringPtr fileName)\n{\n\tFCBPBRec pb;\n\tOSErr error;\n\n\tpb.ioNamePtr = fileName;\n\tpb.ioVRefNum = 0;\n\tpb.ioRefNum = refNum;\n\tpb.ioFCBIndx = 0;\n\terror = PBGetFCBInfoSync(&pb);\n\tif ( error == noErr )\n\t{\n\t\t*vRefNum = pb.ioFCBVRefNum;\n\t\t*dirID = pb.ioFCBParID;\n\t}\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpGetFileLocation(short refNum,\n\t\t\t\t\t\t\t\t   FSSpec *spec)\n{\n\treturn ( GetFileLocation(refNum, &(spec->vRefNum), &(spec->parID), spec->name) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tCopyDirectoryAccess(short srcVRefNum,\n\t\t\t\t\t\t\t\t\tlong srcDirID,\n\t\t\t\t\t\t\t\t\tConstStr255Param srcName,\n\t\t\t\t\t\t\t\t\tshort dstVRefNum,\n\t\t\t\t\t\t\t\t\tlong dstDirID,\n\t\t\t\t\t\t\t\t\tConstStr255Param dstName)\n{\t\n\tOSErr error;\n\tGetVolParmsInfoBuffer infoBuffer;\t/* Where PBGetVolParms dumps its info */\n\tlong\tdstServerAdr;\t\t\t\t/* AppleTalk server address of destination (if any) */\n\tlong\townerID, groupID, accessRights;\n\tlong\ttempLong;\n\n\t/* See if destination supports directory access control */\n\ttempLong = sizeof(infoBuffer);\n\terror = HGetVolParms(dstName, dstVRefNum, &infoBuffer, &tempLong);\n\tif ( (error == noErr) && hasAccessCntl(infoBuffer) )\n\t{\n\t\tif ( hasAccessCntl(infoBuffer) )\n\t\t{\n\t\t\tdstServerAdr = infoBuffer.vMServerAdr;\n\t\t\t\n\t\t\t/* See if source supports directory access control and is on same server */\n\t\t\ttempLong = sizeof(infoBuffer);\n\t\t\terror = HGetVolParms(srcName, srcVRefNum, &infoBuffer, &tempLong);\n\t\t\tif ( error == noErr )\n\t\t\t{\n\t\t\t\tif ( hasAccessCntl(infoBuffer) && (dstServerAdr == infoBuffer.vMServerAdr) )\n\t\t\t\t{\n\t\t\t\t\t/* both volumes support directory access control and they are */\n\t\t\t\t\t/*  on same server, so copy the access information */\n\t\t\t\t\terror = HGetDirAccess(srcVRefNum, srcDirID, srcName, &ownerID, &groupID, &accessRights);\n\t\t\t\t\tif ( error == noErr )\n\t\t\t\t\t{\n\t\t\t\t\t\terror = HSetDirAccess(dstVRefNum, dstDirID, dstName, ownerID, groupID, accessRights);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t/* destination doesn't support directory access control or */\n\t\t\t\t\t/* they volumes aren't on the same server */\n\t\t\t\t\terror = paramErr;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* destination doesn't support directory access control */\n\t\t\terror = paramErr;\n\t\t}\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpCopyDirectoryAccess(const FSSpec *srcSpec,\n\t\t\t\t\t\t\t\t\t   const FSSpec *dstSpec)\n{\n\treturn ( CopyDirectoryAccess(srcSpec->vRefNum, srcSpec->parID, srcSpec->name,\n\t\t\t\t\t\t\t\tdstSpec->vRefNum, dstSpec->parID, dstSpec->name) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tHMoveRenameCompat(short vRefNum,\n\t\t\t\t\t\t\t\t  long srcDirID,\n\t\t\t\t\t\t\t\t  ConstStr255Param srcName,\n\t\t\t\t\t\t\t\t  long dstDirID,\n\t\t\t\t\t\t\t\t  ConstStr255Param dstpathName,\n\t\t\t\t\t\t\t\t  ConstStr255Param copyName)\n{\n\tOSErr\t\t\t\t\terror;\n\tGetVolParmsInfoBuffer\tvolParmsInfo;\n\tlong\t\t\t\t\tinfoSize;\n\tshort\t\t\t\t\trealVRefNum;\n\tlong\t\t\t\t\trealParID;\n\tStr31\t\t\t\t\trealName;\n\tBoolean\t\t\t\t\tisDirectory;\n\tlong\t\t\t\t\ttempItemsDirID;\n\tlong\t\t\t\t\tuniqueTempDirID;\n\tStr31\t\t\t\t\tuniqueTempDirName;\n\tunsigned short\t\t\tuniqueNameoverflow;\n\t\n\t/* Get volume attributes */\n\tinfoSize = sizeof(GetVolParmsInfoBuffer);\n\terror = HGetVolParms((StringPtr)srcName, vRefNum, &volParmsInfo, &infoSize);\n\tif ( (error == noErr) && hasMoveRename(volParmsInfo) )\n\t{\n\t\t/* If volume supports move and rename, so use it and return */\n\t\terror = HMoveRename(vRefNum, srcDirID, srcName, dstDirID, dstpathName, copyName);\n\t}\n\telse if ( (error == noErr) || (error == paramErr) ) /* paramErr is OK, it just means this volume doesn't support GetVolParms */\n\t{\n\t\t/* MoveRename isn't supported by this volume, so do it by hand */\n\t\t\n\t\t/* If copyName isn't supplied, we can simply CatMove and return */\n\t\tif ( copyName == NULL )\n\t\t{\n\t\t\terror = CatMove(vRefNum, srcDirID, srcName, dstDirID, dstpathName);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* Renaming is required, so we have some work to do... */\n\t\t\t\n\t\t\t/* Get the object's real name, real parent ID and real vRefNum */\n\t\t\terror = GetObjectLocation(vRefNum, srcDirID, (StringPtr)srcName,\n\t\t\t\t\t\t\t\t\t\t&realVRefNum, &realParID, realName, &isDirectory);\n\t\t\tif ( error == noErr )\n\t\t\t{\n\t\t\t\t/* Find the Temporary Items Folder on that volume */\n\t\t\t\terror = FindFolder(realVRefNum, kTemporaryFolderType, kCreateFolder,\n\t\t\t\t\t\t\t\t\t&realVRefNum, &tempItemsDirID);\n\t\t\t\tif ( error == noErr )\n\t\t\t\t{\n\t\t\t\t\t/* Create a new uniquely named folder in the temporary items folder. */\n\t\t\t\t\t/* This is done to avoid the case where 'realName' or 'copyName' already */\n\t\t\t\t\t/* exists in the temporary items folder. */\n\t\t\t\t\t\n\t\t\t\t\t/* Start with current tick count as uniqueTempDirName */\t\t\t\t\t\n\t\t\t\t\tNumToString(TickCount(), uniqueTempDirName);\n\t\t\t\t\tuniqueNameoverflow = 0;\n\t\t\t\t\tdo\n\t\t\t\t\t{\n\t\t\t\t\t\terror = DirCreate(realVRefNum, tempItemsDirID, uniqueTempDirName, &uniqueTempDirID);\n\t\t\t\t\t\tif ( error == dupFNErr )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/* Duplicate name - change the first character to the next ASCII character */\n\t\t\t\t\t\t\t++uniqueTempDirName[1];\n\t\t\t\t\t\t\t/* Make sure it isn't a colon! */\n\t\t\t\t\t\t\tif ( uniqueTempDirName[1] == ':' )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t++uniqueTempDirName[1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/* Don't go too far... */\n\t\t\t\t\t\t\t++uniqueNameoverflow;\n\t\t\t\t\t\t}\n\t\t\t\t\t} while ( (error == dupFNErr) && (uniqueNameoverflow <= 64) ); /* 64 new files per 1/60th second - not likely! */\n\t\t\t\t\tif ( error == noErr )\n\t\t\t\t\t{\n\t\t\t\t\t\t/* Move the object to the folder with uniqueTempDirID for renaming */\n\t\t\t\t\t\terror = CatMove(realVRefNum, realParID, realName, uniqueTempDirID, NULL);\n\t\t\t\t\t\tif ( error == noErr )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/* Rename the object */\t\n\t\t\t\t\t\t\terror = HRename(realVRefNum, uniqueTempDirID, realName, copyName);\n\t\t\t\t\t\t\tif ( error == noErr )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* Move object to its new home */\n\t\t\t\t\t\t\t\terror = CatMove(realVRefNum, uniqueTempDirID, copyName, dstDirID, dstpathName);\n\t\t\t\t\t\t\t\tif ( error != noErr )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t/* Error handling: rename object back to original name - ignore errors */\n\t\t\t\t\t\t\t\t\t(void) HRename(realVRefNum, uniqueTempDirID, copyName, realName);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( error != noErr )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* Error handling: move object back to original location - ignore errors */\n\t\t\t\t\t\t\t\t(void) CatMove(realVRefNum, uniqueTempDirID, realName, realParID, NULL);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t/* Done with ourTempDir, so delete it - ignore errors */\n\t\t\t\t\t\t(void) HDelete(realVRefNum, uniqueTempDirID, NULL);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tFSpMoveRenameCompat(const FSSpec *srcSpec,\n\t\t\t\t\t\t\t\t\tconst FSSpec *dstSpec,\n\t\t\t\t\t\t\t\t\tConstStr255Param copyName)\n{\n\t/* make sure the FSSpecs refer to the same volume */\n\tif (srcSpec->vRefNum != dstSpec->vRefNum)\n\t\treturn (diffVolErr);\n\treturn ( HMoveRenameCompat(srcSpec->vRefNum, srcSpec->parID, srcSpec->name,\n\t\t\t\t\t  dstSpec->parID, dstSpec->name, copyName) );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tBuildAFPVolMountInfo(short flags,\n\t\t\t\t\t\t\t\t\t char nbpInterval,\n\t\t\t\t\t\t\t\t\t char nbpCount,\n\t\t\t\t\t\t\t\t\t short uamType,\n\t\t\t\t\t\t\t\t\t Str32 zoneName,\n\t\t\t\t\t\t\t\t\t Str32 serverName,\n\t\t\t\t\t\t\t\t\t Str27 volName,\n\t\t\t\t\t\t\t\t\t Str31 userName,\n\t\t\t\t\t\t\t\t\t Str8 userPassword,\n\t\t\t\t\t\t\t\t\t Str8 volPassword,\n\t\t\t\t\t\t\t\t\t AFPVolMountInfoPtr *afpInfoPtr)\n{\n\tMyAFPVolMountInfoPtr\tinfoPtr;\n\tOSErr\t\t\t\t\terror;\n\t\n\t/* Allocate the AFPXVolMountInfo record */\n\tinfoPtr = (MyAFPVolMountInfoPtr)NewPtrClear(sizeof(MyAFPVolMountInfo));\n\tif ( infoPtr != NULL )\n\t{\n\t\t/* Fill in an AFPVolMountInfo record that can be passed to VolumeMount */\n\t\tinfoPtr->length = sizeof(MyAFPVolMountInfo);\n\t\tinfoPtr->media = AppleShareMediaType;\n\t\tinfoPtr->flags = flags;\n\t\tinfoPtr->nbpInterval = nbpInterval;\n\t\tinfoPtr->nbpCount = nbpCount;\n\t\tinfoPtr->uamType = uamType;\n\t\t\n\t\tinfoPtr->zoneNameOffset = offsetof(MyAFPVolMountInfo, zoneName);\n\t\tinfoPtr->serverNameOffset = offsetof(MyAFPVolMountInfo, serverName);\n\t\tinfoPtr->volNameOffset = offsetof(MyAFPVolMountInfo, volName);\n\t\tinfoPtr->userNameOffset = offsetof(MyAFPVolMountInfo, userName);\n\t\tinfoPtr->userPasswordOffset = offsetof(MyAFPVolMountInfo, userPassword);\n\t\tinfoPtr->volPasswordOffset = offsetof(MyAFPVolMountInfo, volPassword);\n\t\t\n\t\tBlockMoveData(zoneName, infoPtr->zoneName, sizeof(Str32));\n\t\tBlockMoveData(serverName, infoPtr->serverName, sizeof(Str32));\n\t\tBlockMoveData(volName, infoPtr->volName, sizeof(Str27));\n\t\tBlockMoveData(userName, infoPtr->userName, sizeof(Str31));\n\t\tBlockMoveData(userPassword, infoPtr->userPassword, sizeof(Str8));\n\t\tBlockMoveData(volPassword, infoPtr->volPassword, sizeof(Str8));\n\t\t\n\t\t*afpInfoPtr = (AFPVolMountInfoPtr)infoPtr;\n\t\terror = noErr;\n\t}\n\telse\n\t{\n\t\terror = memFullErr;\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tRetrieveAFPVolMountInfo(AFPVolMountInfoPtr afpInfoPtr,\n\t\t\t\t\t\t\t\t\t\tshort *flags,\n\t\t\t\t\t\t\t\t\t\tshort *uamType,\n\t\t\t\t\t\t\t\t\t\tStringPtr zoneName,\n\t\t\t\t\t\t\t\t\t\tStringPtr serverName,\n\t\t\t\t\t\t\t\t\t\tStringPtr volName,\n\t\t\t\t\t\t\t\t\t\tStringPtr userName)\n{\n\tStringPtr\ttempPtr;\n\tOSErr\t\terror;\n\t\t\n\t/* Retrieve the AFP mounting information from an AFPVolMountInfo record. */\n\tif ( afpInfoPtr->media == AppleShareMediaType )\n\t{\n\t\t*flags = afpInfoPtr->flags;\n\t\t*uamType = afpInfoPtr->uamType;\n\t\t\n\t\tif ( afpInfoPtr->zoneNameOffset != 0)\n\t\t{\n\t\t\ttempPtr = (StringPtr)((long)afpInfoPtr + afpInfoPtr->zoneNameOffset);\n\t\t\tBlockMoveData(tempPtr, zoneName, tempPtr[0] + 1);\n\t\t}\n\t\t\n\t\tif ( afpInfoPtr->serverNameOffset != 0)\n\t\t{\n\t\t\ttempPtr = (StringPtr)((long)afpInfoPtr + afpInfoPtr->serverNameOffset);\n\t\t\tBlockMoveData(tempPtr, serverName, tempPtr[0] + 1);\n\t\t}\n\t\t\n\t\tif ( afpInfoPtr->volNameOffset != 0)\n\t\t{\n\t\t\ttempPtr = (StringPtr)((long)afpInfoPtr + afpInfoPtr->volNameOffset);\n\t\t\tBlockMoveData(tempPtr, volName, tempPtr[0] + 1);\n\t\t}\n\t\t\n\t\tif ( afpInfoPtr->userNameOffset != 0)\n\t\t{\n\t\t\ttempPtr = (StringPtr)((long)afpInfoPtr + afpInfoPtr->userNameOffset);\n\t\t\tBlockMoveData(tempPtr, userName, tempPtr[0] + 1);\n\t\t}\n\t\t\n\t\terror = noErr;\n\t}\n\telse\n\t{\n\t\terror = paramErr;\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tBuildAFPXVolMountInfo(short flags,\n\t\t\t\t\t\t\t\t\t  char nbpInterval,\n\t\t\t\t\t\t\t\t\t  char nbpCount,\n\t\t\t\t\t\t\t\t\t  short uamType,\n\t\t\t\t\t\t\t\t\t  Str32 zoneName,\n\t\t\t\t\t\t\t\t\t  Str32 serverName,\n\t\t\t\t\t\t\t\t\t  Str27 volName,\n\t\t\t\t\t\t\t\t\t  Str31 userName,\n\t\t\t\t\t\t\t\t\t  Str8 userPassword,\n\t\t\t\t\t\t\t\t\t  Str8 volPassword,\n\t\t\t\t\t\t\t\t\t  Str32 uamName,\n\t\t\t\t\t\t\t\t\t  unsigned long alternateAddressLength,\n\t\t\t\t\t\t\t\t\t  void *alternateAddress,\n\t\t\t\t\t\t\t\t\t  AFPXVolMountInfoPtr *afpXInfoPtr)\n{\n\tSize\t\t\t\t\tinfoSize;\n\tMyAFPXVolMountInfoPtr\tinfoPtr;\n\tOSErr\t\t\t\t\terror;\n\t\n\t/* Calculate the size of the AFPXVolMountInfo record */\n\tinfoSize = sizeof(MyAFPXVolMountInfo) + alternateAddressLength - 1;\n\t\n\t/* Allocate the AFPXVolMountInfo record */\n\tinfoPtr = (MyAFPXVolMountInfoPtr)NewPtrClear(infoSize);\n\tif ( infoPtr != NULL )\n\t{\n\t\t/* Fill in an AFPXVolMountInfo record that can be passed to VolumeMount */\n\t\tinfoPtr->length = infoSize;\n\t\tinfoPtr->media = AppleShareMediaType;\n\t\tinfoPtr->flags = flags;\n\t\tif ( alternateAddressLength != 0 )\n\t\t{\n\t\t\t/* make sure the volMountExtendedFlagsBit is set if there's extended address info */\n\t\t\tinfoPtr->flags |= volMountExtendedFlagsMask;\n\t\t\t/* and set the only extendedFlags bit we know about */\n\t\t\tinfoPtr->extendedFlags = kAFPExtendedFlagsAlternateAddressMask;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* make sure the volMountExtendedFlagsBit is clear if there's no extended address info */\n\t\t\tinfoPtr->flags &= ~volMountExtendedFlagsMask;\n\t\t\t/* and clear the extendedFlags */\n\t\t\tinfoPtr->extendedFlags = 0;\n\t\t}\n\t\tinfoPtr->nbpInterval = nbpInterval;\n\t\tinfoPtr->nbpCount = nbpCount;\n\t\tinfoPtr->uamType = uamType;\n\t\t\n\t\tinfoPtr->zoneNameOffset = offsetof(MyAFPXVolMountInfo, zoneName);\t\t\n\t\tinfoPtr->serverNameOffset = offsetof(MyAFPXVolMountInfo, serverName);\n\t\tinfoPtr->volNameOffset = offsetof(MyAFPXVolMountInfo, volName);\n\t\tinfoPtr->userNameOffset = offsetof(MyAFPXVolMountInfo, userName);\n\t\tinfoPtr->userPasswordOffset = offsetof(MyAFPXVolMountInfo, userPassword);\n\t\tinfoPtr->volPasswordOffset = offsetof(MyAFPXVolMountInfo, volPassword);\n\t\tinfoPtr->uamNameOffset = offsetof(MyAFPXVolMountInfo, uamName);\n\t\tinfoPtr->alternateAddressOffset = offsetof(MyAFPXVolMountInfo, alternateAddress);\n\t\t\n\t\tBlockMoveData(zoneName, infoPtr->zoneName, sizeof(Str32));\n\t\tBlockMoveData(serverName, infoPtr->serverName, sizeof(Str32));\n\t\tBlockMoveData(volName, infoPtr->volName, sizeof(Str27));\n\t\tBlockMoveData(userName, infoPtr->userName, sizeof(Str31));\n\t\tBlockMoveData(userPassword, infoPtr->userPassword, sizeof(Str8));\n\t\tBlockMoveData(volPassword, infoPtr->volPassword, sizeof(Str8));\n\t\tBlockMoveData(uamName, infoPtr->uamName, sizeof(Str32));\n\t\tBlockMoveData(alternateAddress, infoPtr->alternateAddress, alternateAddressLength);\n\t\t\n\t\t*afpXInfoPtr = (AFPXVolMountInfoPtr)infoPtr;\n\t\terror = noErr;\n\t}\n\telse\n\t{\n\t\terror = memFullErr;\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tRetrieveAFPXVolMountInfo(AFPXVolMountInfoPtr afpXInfoPtr,\n\t\t\t\t\t\t\t\t\t\t short *flags,\n\t\t\t\t\t\t\t\t\t\t short *uamType,\n\t\t\t\t\t\t\t\t\t\t StringPtr zoneName,\n\t\t\t\t\t\t\t\t\t\t StringPtr serverName,\n\t\t\t\t\t\t\t\t\t\t StringPtr volName,\n\t\t\t\t\t\t\t\t\t\t StringPtr userName,\n\t\t\t\t\t\t\t\t\t\t StringPtr uamName,\n\t\t\t\t\t\t\t\t\t\t unsigned long *alternateAddressLength,\n\t\t\t\t\t\t\t\t\t\t AFPAlternateAddress **alternateAddress)\n{\n\tStringPtr\ttempPtr;\n\tPtr\t\t\talternateAddressStart;\n\tPtr\t\t\talternateAddressEnd;\n\tSize\t\talternateAddressDataSize;\n\tOSErr\t\terror;\n\tUInt8\t\taddressCount;\n\t\t\n\t/* Retrieve the AFP mounting information from an AFPVolMountInfo record. */\n\tif ( afpXInfoPtr->media == AppleShareMediaType )\n\t{\n\t\t/* default to noErr */\n\t\terror = noErr;\n\t\t\n\t\t/* Is this an extended record? */\n\t\tif ( (afpXInfoPtr->flags & volMountExtendedFlagsMask) != 0 )\n\t\t{\n\t\t\tif ( ((afpXInfoPtr->extendedFlags & kAFPExtendedFlagsAlternateAddressMask) != 0) &&\n\t\t\t\t (afpXInfoPtr->alternateAddressOffset != 0) )\n\t\t\t{\n\t\t\t\t\n\t\t\t\talternateAddressStart = (Ptr)((long)afpXInfoPtr + afpXInfoPtr->alternateAddressOffset);\n\t\t\t\talternateAddressEnd = alternateAddressStart + 1;\t/* skip over alternate address version byte */\n\t\t\t\taddressCount = *(UInt8*)alternateAddressEnd;\t\t/* get the address count */\n\t\t\t\t++alternateAddressEnd;\t\t\t\t\t\t\t\t/* skip over alternate address count byte */\n\t\t\t\t/* alternateAddressEnd now equals &AFPAlternateAddress.fAddressList[0] */\n\t\t\t\twhile ( addressCount != 0 )\n\t\t\t\t{\n\t\t\t\t\t/* parse the address list to find the end */\n\t\t\t\t\talternateAddressEnd += *(UInt8*)alternateAddressEnd;\t/* add length of each AFPTagData record */\n\t\t\t\t\t--addressCount;\n\t\t\t\t}\n\t\t\t\t/* get the size of the alternateAddressData */\n\t\t\t\talternateAddressDataSize = alternateAddressEnd - alternateAddressStart;\n\t\t\t\t/* allocate memory for it */\n\t\t\t\t*alternateAddress = (AFPAlternateAddress *)NewPtr(alternateAddressDataSize);\n\t\t\t\tif ( *alternateAddress != NULL )\n\t\t\t\t{\n\t\t\t\t\t/* and return the data */\n\t\t\t\t\tBlockMoveData(alternateAddressStart, *alternateAddress, alternateAddressDataSize);\n\t\t\t\t\t*alternateAddressLength = alternateAddressDataSize;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t/* no memory - fail now */\n\t\t\t\t\terror = memFullErr;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ( error == noErr )\t/* fill in more output parameters if everything is OK */\n\t\t\t{\n\t\t\t\tif ( afpXInfoPtr->uamNameOffset != 0 )\n\t\t\t\t{\n\t\t\t\t\ttempPtr = (StringPtr)((long)afpXInfoPtr + afpXInfoPtr->uamNameOffset);\n\t\t\t\t\tBlockMoveData(tempPtr, uamName, tempPtr[0] + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( error == noErr )\t/* fill in more output parameters if everything is OK */\n\t\t{\n\t\t\t*flags = afpXInfoPtr->flags;\n\t\t\t*uamType = afpXInfoPtr->uamType;\n\t\t\t\n\t\t\tif ( afpXInfoPtr->zoneNameOffset != 0 )\n\t\t\t{\n\t\t\t\ttempPtr = (StringPtr)((long)afpXInfoPtr + afpXInfoPtr->zoneNameOffset);\n\t\t\t\tBlockMoveData(tempPtr, zoneName, tempPtr[0] + 1);\n\t\t\t}\n\t\t\t\n\t\t\tif ( afpXInfoPtr->serverNameOffset != 0 )\n\t\t\t{\n\t\t\t\ttempPtr = (StringPtr)((long)afpXInfoPtr + afpXInfoPtr->serverNameOffset);\n\t\t\t\tBlockMoveData(tempPtr, serverName, tempPtr[0] + 1);\n\t\t\t}\n\t\t\t\n\t\t\tif ( afpXInfoPtr->volNameOffset != 0 )\n\t\t\t{\n\t\t\t\ttempPtr = (StringPtr)((long)afpXInfoPtr + afpXInfoPtr->volNameOffset);\n\t\t\t\tBlockMoveData(tempPtr, volName, tempPtr[0] + 1);\n\t\t\t}\n\t\t\t\n\t\t\tif ( afpXInfoPtr->userNameOffset != 0 )\n\t\t\t{\n\t\t\t\ttempPtr = (StringPtr)((long)afpXInfoPtr + afpXInfoPtr->userNameOffset);\n\t\t\t\tBlockMoveData(tempPtr, userName, tempPtr[0] + 1);\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\terror = paramErr;\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tGetUGEntries(short objType,\n\t\t\t\t\t\t\t UGEntryPtr entries,\n\t\t\t\t\t\t\t long reqEntryCount,\n\t\t\t\t\t\t\t long *actEntryCount,\n\t\t\t\t\t\t\t long *objID)\n{\n\tHParamBlockRec pb;\n\tOSErr error = noErr;\n\tUGEntry *endEntryArray;\n\n\tpb.objParam.ioObjType = objType;\n\t*actEntryCount = 0;\n\tfor ( endEntryArray = entries + reqEntryCount; (entries < endEntryArray) && (error == noErr); ++entries )\n\t{\n\t\tpb.objParam.ioObjNamePtr = (StringPtr)entries->name;\n\t\tpb.objParam.ioObjID = *objID;\n\t\t/* Files.h in the universal interfaces, PBGetUGEntrySync takes a CMovePBPtr */\n\t\t/* as the parameter. Inside Macintosh and the original glue used HParmBlkPtr. */\n\t\t/* A CMovePBPtr works OK, but this will be changed in the future  back to */\n\t\t/* HParmBlkPtr, so I'm just casting it here. */\n\t\terror = PBGetUGEntrySync(&pb);\n\t\tif ( error == noErr )\n\t\t{\n\t\t\tentries->objID = *objID = pb.objParam.ioObjID;\n\t\t\tentries->objType = objType;\n\t\t\t++*actEntryCount;\n\t\t}\n\t}\n\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/MoreFiles 1.5/Sources/Search.c",
    "content": "/*\n**\tApple Macintosh Developer Technical Support\n**\n**\tIndexedSearch and the PBCatSearch compatibility function.\n**\n**\tby Jim Luther, Apple Developer Technical Support Emeritus\n**\n**\tFile:\t\tSearch.c\n**\n**\tCopyright  1992-1999 Apple Computer, Inc.\n**\tAll rights reserved.\n**\n**\tYou may incorporate this sample code into your applications without\n**\trestriction, though the sample code has been provided \"AS IS\" and the\n**\tresponsibility for its operation is 100% yours.  However, what you are\n**\tnot permitted to do is to redistribute the source as \"DSC Sample Code\"\n**\tafter having made changes. If you're going to re-distribute the source,\n**\twe require that you make it clear in the source that the code was\n**\tdescended from Apple Sample Code, but that you've made changes.\n*/\n\n#include <Types.h>\n#include <Gestalt.h>\n#include <Timer.h>\n#include <Errors.h>\n#include <Memory.h>\n#include <Files.h>\n#include <TextUtils.h>\n\n#define\t__COMPILINGMOREFILES\n\n#include \"MoreFiles.h\"\n#include \"MoreFilesExtras.h\"\n#include \"Search.h\"\n\n/*****************************************************************************/\n\nenum\n{\n\t/* Number of LevelRecs to add each time the searchStack is grown */\n\t/* 20 levels is probably more than reasonable for most volumes. */\n\t/* If more are needed, they are allocated 20 levels at a time. */\n\tkAdditionalLevelRecs = 20\n};\n\n/*****************************************************************************/\n\n/*\n**\tLevelRecs are used to store the directory ID and index whenever\n**\tIndexedSearch needs to either scan a sub-directory, or return control\n**\tto the caller because the call has timed out or the number of\n**\tmatches requested has been found. LevelRecs are stored in an array\n**\tused as a stack.\n*/\nstruct\tLevelRec\n{\n\tlong\tdirModDate;\t/* for detecting most (but not all) catalog changes */\n\tlong\tdirID;\n\tshort\tindex;\n};\ntypedef struct LevelRec LevelRec;\ntypedef LevelRec *LevelRecPtr, **LevelRecHandle;\n\n\n/*\n**\tSearchPositionRec is my version of a CatPositionRec. It holds the\n**\tinformation I need to resuming searching.\n*/\n#if PRAGMA_STRUCT_ALIGN\n#pragma options align=mac68k\n#endif\nstruct SearchPositionRec\n{\n\tlong\t\t\tinitialize;\t\t/* Goofy checksum of volume information used to make */\n\t\t\t\t\t\t\t\t\t/* sure we're resuming a search on the same volume. */\n\tunsigned short\tstackDepth;\t\t/* Current depth on searchStack. */\n\tshort\t\t\tpriv[11];\t\t/* For future use... */\n};\n#if PRAGMA_STRUCT_ALIGN\n#pragma options align=reset\n#endif\ntypedef struct SearchPositionRec SearchPositionRec;\ntypedef SearchPositionRec *SearchPositionRecPtr;\n\n\n/*\n**\tExtendedTMTask is a TMTask record extended to hold the timer flag.\n*/\n#if PRAGMA_STRUCT_ALIGN\n#pragma options align=mac68k\n#endif\nstruct ExtendedTMTask\n{\n\tTMTask\t\t\ttheTask;\n\tBoolean\t\t\tstopSearch;\t\t/* the Time Mgr task will set stopSearch to */\n\t\t\t\t\t\t\t\t\t/* true when the timer expires */\n};\n#if PRAGMA_STRUCT_ALIGN\n#pragma options align=reset\n#endif\ntypedef struct ExtendedTMTask ExtendedTMTask;\ntypedef ExtendedTMTask *ExtendedTMTaskPtr;\n\n/*****************************************************************************/\n\nstatic\tOSErr\tCheckVol(ConstStr255Param pathname,\n\t\t\t\t\t\t short vRefNum,\n\t\t\t\t\t\t short *realVRefNum,\n\t\t\t\t\t\t long *volID);\n\nstatic\tOSErr\tCheckStack(unsigned short stackDepth,\n\t\t\t\t\t\t   LevelRecHandle searchStack,\n\t\t\t\t\t\t   Size *searchStackSize);\n\nstatic\tOSErr\tVerifyUserPB(CSParamPtr userPB,\n\t\t\t\t\t\t\t Boolean *includeFiles,\n\t\t\t\t\t\t\t Boolean *includeDirs,\n\t\t\t\t\t\t\t Boolean *includeNames);\n\nstatic\tBoolean\tIsSubString(ConstStr255Param aStringPtr,\n\t\t\t\t\t\t\tConstStr255Param subStringPtr);\n\nstatic\tBoolean\tCompareMasked(const long *data1,\n\t\t\t\t\t\t\t  const long *data2,\n\t\t\t\t\t\t\t  const long *mask,\n\t\t\t\t\t\t\t  short longsToCompare);\n\nstatic\tvoid\tCheckForMatches(CInfoPBPtr cPB,\n\t\t\t\t\t\t\t\tCSParamPtr userPB,\n\t\t\t\t\t\t\t\tconst Str63 matchName,\n\t\t\t\t\t\t\t\tBoolean includeFiles,\n\t\t\t\t\t\t\t\tBoolean includeDirs);\n\n#if\t__WANTPASCALELIMINATION\n#undef\tpascal\n#endif\n\n#if TARGET_RT_MAC_CFM\n\nstatic\tpascal\tvoid\tTimeOutTask(TMTaskPtr tmTaskPtr);\n\n#else\n\nstatic\tpascal\tTMTaskPtr\tGetTMTaskPtr(void);\n\nstatic\tvoid\tTimeOutTask(void);\n\n#endif\n\n#if\t__WANTPASCALELIMINATION\n#define\tpascal\t\n#endif\n\nstatic\tlong\tGetDirModDate(short vRefNum,\n\t\t\t\t\t\t\t  long dirID);\n\n/*****************************************************************************/\n\n/*\n**\tCheckVol gets the volume's real vRefNum and builds a volID. The volID\n**\tis used to help insure that calls to resume searching with IndexedSearch\n**\tare to the same volume as the last call to IndexedSearch.\n*/\nstatic\tOSErr\tCheckVol(ConstStr255Param pathname,\n\t\t\t\t\t\t short vRefNum,\n\t\t\t\t\t\t short *realVRefNum,\n\t\t\t\t\t\t long *volID)\n{\n\tHParamBlockRec pb;\n\tOSErr error;\n\n\terror = GetVolumeInfoNoName(pathname, vRefNum, &pb);\n\tif ( error == noErr )\n\t{\n\t\t/* Return the real vRefNum */\n\t\t*realVRefNum = pb.volumeParam.ioVRefNum;\n\n\t\t/* Add together a bunch of things that aren't supposed to change on */\n\t\t/* a mounted volume that's being searched and that should come up with */\n\t\t/* a fairly unique number */\n\t\t*volID = pb.volumeParam.ioVCrDate +\n\t\t\t\t pb.volumeParam.ioVRefNum +\n\t\t\t\t pb.volumeParam.ioVNmAlBlks +\n\t\t\t\t pb.volumeParam.ioVAlBlkSiz +\n\t\t\t\t pb.volumeParam.ioVFSID;\n\t}\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\n/*\n**\tCheckStack checks the size of the search stack (array) to see if there's\n**\troom to push another LevelRec. If not, CheckStack grows the stack by\n**\tanother kAdditionalLevelRecs elements.\n*/\nstatic\tOSErr\tCheckStack(unsigned short stackDepth,\n\t\t\t\t\t\t   LevelRecHandle searchStack,\n\t\t\t\t\t\t   Size *searchStackSize)\n{\n\tOSErr\tresult;\n\t\n\tif ( (*searchStackSize / sizeof(LevelRec)) == (stackDepth + 1) )\n\t{\n\t\t/* Time to grow stack */\n\t\tSetHandleSize((Handle)searchStack, *searchStackSize + (kAdditionalLevelRecs * sizeof(LevelRec)));\n\t\tresult = MemError();\t/* should be noErr */\n\t\t*searchStackSize = GetHandleSize((Handle)searchStack);\n\t}\n\telse\n\t{\n\t\tresult = noErr;\n\t}\n\t\n\treturn ( result );\n}\n\n/*****************************************************************************/\n\n/*\n**\tVerifyUserPB makes sure the parameter block passed to IndexedSearch has\n**\tvalid parameters. By making this check once, we don't have to worry about\n**\tthings like NULL pointers, strings being too long, etc.\n**\tVerifyUserPB also determines if the search includes files and/or\n**\tdirectories, and determines if a full or partial name search was requested.\n*/\nstatic\tOSErr\tVerifyUserPB(CSParamPtr userPB,\n\t\t\t\t\t\t\t Boolean *includeFiles,\n\t\t\t\t\t\t\t Boolean *includeDirs,\n\t\t\t\t\t\t\t Boolean *includeNames)\n{\n\tCInfoPBPtr\tsearchInfo1;\n\tCInfoPBPtr\tsearchInfo2;\n\t\n\tsearchInfo1 = userPB->ioSearchInfo1;\n\tsearchInfo2 = userPB->ioSearchInfo2;\n\t\n\t/* ioMatchPtr cannot be NULL */\n\tif ( userPB->ioMatchPtr == NULL )\n\t{\n\t\tgoto ParamErrExit;\n\t}\n\t\n\t/* ioSearchInfo1 cannot be NULL */\n\tif ( searchInfo1 == NULL )\n\t{\n\t\tgoto ParamErrExit;\n\t}\n\t\n\t/* If any bits except partialName, fullName, or negate are set, then */\n\t/* ioSearchInfo2 cannot be NULL because information in ioSearchInfo2 is required  */\n\tif ( ((userPB->ioSearchBits & ~(fsSBPartialName | fsSBFullName | fsSBNegate)) != 0) &&\n\t\t ( searchInfo2 == NULL ))\n\t{\n\t\tgoto ParamErrExit;\n\t}\n\t\n\t*includeFiles = false;\n\t*includeDirs = false;\n\t*includeNames = false;\n\t\n\tif ( (userPB->ioSearchBits & (fsSBPartialName | fsSBFullName)) != 0 )\n\t{\n\t\t/* If any kind of name matching is requested, then ioNamePtr in */\n\t\t/* ioSearchInfo1 cannot be NULL or a zero-length string */\n\t\tif ( (searchInfo1->hFileInfo.ioNamePtr == NULL) ||\n\t\t\t (searchInfo1->hFileInfo.ioNamePtr[0] == 0) ||\n\t\t\t (searchInfo1->hFileInfo.ioNamePtr[0] > (sizeof(Str63) - 1)) )\n\t\t{\n\t\t\tgoto ParamErrExit;\n\t\t}\n\t\t\n\t\t*includeNames = true;\n\t}\n\t\n\tif ( (userPB->ioSearchBits & fsSBFlAttrib) != 0 )\n\t{\n\t\t/* The only attributes you can search on are the directory flag */\n\t\t/* and the locked flag. */\n\t\tif ( (searchInfo2->hFileInfo.ioFlAttrib & ~(kioFlAttribDirMask | kioFlAttribLockedMask)) != 0 )\n\t\t{\n\t\t\tgoto ParamErrExit;\n\t\t}\n\t\t\n\t\t/* interested in the directory bit? */\n\t\tif ( (searchInfo2->hFileInfo.ioFlAttrib & kioFlAttribDirMask) != 0 )\n\t\t{\n\t\t\t/* yes, so do they want just directories or just files? */\n\t\t\tif ( (searchInfo1->hFileInfo.ioFlAttrib & kioFlAttribDirMask) != 0 )\n\t\t\t{\n\t\t\t\t*includeDirs = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t*includeFiles = true;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* no interest in directory bit - get both files and directories */\n\t\t\t*includeDirs = true;\n\t\t\t*includeFiles = true;\n\t\t}\n\t}\n\telse\n\t{\n\t\t/* no attribute checking - get both files and directories */\n\t\t*includeDirs = true;\n\t\t*includeFiles = true;\n\t}\n\t\n\t/* If directories are included in the search, */\n\t/* then the locked attribute cannot be requested. */\n\tif ( *includeDirs &&\n\t\t ((userPB->ioSearchBits & fsSBFlAttrib) != 0) &&\n\t\t ((searchInfo2->hFileInfo.ioFlAttrib & kioFlAttribLockedMask) != 0) )\n\t{\n\t\tgoto ParamErrExit;\n\t}\n\t\n\t/* If files are included in the search, then there cannot be */\n\t/* a search on the number of files. */\n\tif ( *includeFiles &&\n\t\t ((userPB->ioSearchBits & fsSBDrNmFls) != 0) )\n\t{\n\t\tgoto ParamErrExit;\n\t}\n\t\n\t/* If directories are included in the search, then there cannot */\n\t/* be a search on file lengths. */\n\tif ( *includeDirs &&\n\t\t ((userPB->ioSearchBits & (fsSBFlLgLen | fsSBFlPyLen | fsSBFlRLgLen | fsSBFlRPyLen)) != 0) )\n\t{\n\t\tgoto ParamErrExit;\n\t}\n\t\n\treturn ( noErr );\n\t\t \nParamErrExit:\n\treturn ( paramErr );\n}\n\n/*****************************************************************************/\n\n/*\n**\tIsSubString checks to see if a string is a substring of another string.\n**\tBoth input strings have already been converted to all uppercase using\n**\tUprString (the same non-international call the File Manager uses).\n*/\nstatic\tBoolean\tIsSubString(ConstStr255Param aStringPtr,\n\t\t\t\t\t\t\tConstStr255Param subStringPtr)\n{\n\tshort\tstrLength;\t\t/* length of string */\n\tshort\tsubStrLength;\t/* length of subString */\n\tBoolean\tfound;\t\t\t/* result of test */\n\tshort\tindex;\t\t\t/* current index into string */\n\t\n\tfound = false;\n\tstrLength = aStringPtr[0];\n\tsubStrLength = subStringPtr[0];\n\t\t\n\tif ( subStrLength <= strLength)\n\t{\n\t\tregister short\tcount;\t\t\t/* search counter */\n\t\tregister short\tstrIndex;\t\t/* running index into string */\n\t\tregister short\tsubStrIndex;\t/* running index into subString */\n\t\t\n\t\t/* start looking at first character */\n\t\tindex = 1;\n\t\t\n\t\t/* continue looking until remaining string is shorter than substring */\n\t\tcount = strLength - subStrLength + 1;\n\t\t\n\t\tdo\n\t\t{\n\t\t\tstrIndex = index;\t/* start string index at index */\n\t\t\tsubStrIndex = 1;\t/* start subString index at 1 */\n\t\t\t\n\t\t\twhile ( !found && (aStringPtr[strIndex] == subStringPtr[subStrIndex]) )\n\t\t\t{\n\t\t\t\tif ( subStrIndex == subStrLength )\n\t\t\t\t{\n\t\t\t\t\t/* all characters in subString were found */\n\t\t\t\t\tfound = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t/* check next character of substring against next character of string */\n\t\t\t\t\t++subStrIndex;\n\t\t\t\t\t++strIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ( !found )\n\t\t\t{\n\t\t\t\t/* start substring search again at next string character */\n\t\t\t\t++index;\n\t\t\t\t--count;\n\t\t\t}\n\t\t} while ( count != 0 && (!found) );\n\t}\n\t\n\treturn ( found );\n}\n\n/*****************************************************************************/\n\n/*\n**\tCompareMasked does a bitwise comparison with mask on 1 or more longs.\n**\tdata1 and data2 are first exclusive-ORed together resulting with bits set\n**\twhere they are different. That value is then ANDed with the mask resulting\n**\twith bits set if the test fails. true is returned if the tests pass.\n*/\nstatic\tBoolean\tCompareMasked(const long *data1,\n\t\t\t\t\t\t\t  const long *data2,\n\t\t\t\t\t\t\t  const long *mask,\n\t\t\t\t\t\t\t  short longsToCompare)\n{\n\tBoolean\tresult = true;\n\t\n\twhile ( (longsToCompare != 0) && (result == true) )\n\t{\n\t\t/* (*data1 ^ *data2) = bits that are different, so... */\n\t\t/* ((*data1 ^ *data2) & *mask) = bits that are different that we're interested in */\n\t\t\n\t\tif ( ((*data1 ^ *data2) & *mask) != 0 )\n\t\t\tresult = false;\n\t\t\n\t\t++data1;\n\t\t++data2;\n\t\t++mask;\n\t\t--longsToCompare;\n\t}\n\t\n\treturn ( result );\n}\n\n/*****************************************************************************/\n\n/*\n**\tCheck for matches compares the search criteria in userPB to the file\n**\tsystem object in cPB. If there's a match, then the information in cPB is\n**\tis added to the match array and the actual match count is incremented.\n*/\nstatic\tvoid\tCheckForMatches(CInfoPBPtr cPB,\n\t\t\t\t\t\t\t\tCSParamPtr userPB,\n\t\t\t\t\t\t\t\tconst Str63 matchName,\n\t\t\t\t\t\t\t\tBoolean includeFiles,\n\t\t\t\t\t\t\t\tBoolean includeDirs)\n{\n\tlong\t\tsearchBits;\n\tCInfoPBPtr\tsearchInfo1;\n\tCInfoPBPtr\tsearchInfo2;\n\tStr63\t\titemName;\t\t/* copy of object's name for partial name matching */\n\tBoolean\t\tfoundMatch;\n\t\n\tfoundMatch = false;\t\t\t/* default to no match */\n\t\n\tsearchBits = userPB->ioSearchBits;\n\tsearchInfo1 = userPB->ioSearchInfo1;\n\tsearchInfo2 = userPB->ioSearchInfo2;\n\t\n\t/* Into the if statements that go on forever... */\n\t\n\tif ( (cPB->hFileInfo.ioFlAttrib & kioFlAttribDirMask) == 0 )\n\t{\n\t\tif (!includeFiles)\n\t\t{\n\t\t\tgoto Failed;\n\t\t}\n\t}\n\telse\n\t{\n\t\tif (!includeDirs)\n\t\t{\n\t\t\tgoto Failed;\n\t\t}\n\t}\n\t\n\tif ( (searchBits & fsSBPartialName) != 0 )\n\t{\n\t\tif ( (cPB->hFileInfo.ioNamePtr[0] > 0) &&\n\t\t\t (cPB->hFileInfo.ioNamePtr[0] <= (sizeof(Str63) - 1)) )\n\t\t{\n\t\t\t/* Make uppercase copy of object name */\n\t\t\tBlockMoveData(cPB->hFileInfo.ioNamePtr,\n\t\t\t\t\t\t\titemName,\n\t\t\t\t\t\t\tcPB->hFileInfo.ioNamePtr[0] + 1);\n\t\t\t/* Use the same non-international call the File Manager uses */\n\t\t\tUpperString(itemName, true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tgoto Failed;\n\t\t}\n\t\t\n\t\t{\n\t\t\tif ( !IsSubString(itemName, matchName) )\n\t\t\t{\n\t\t\t\tgoto Failed;\n\t\t\t}\n\t\t\telse if ( searchBits == fsSBPartialName )\n\t\t\t{\n\t\t\t\t/* optimize for name matching only since it is most common way to search */\n\t\t\t\tgoto Hit;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tif ( (searchBits & fsSBFullName) != 0 )\n\t{\n\t\t/* Use the same non-international call the File Manager uses */\n\t\tif ( !EqualString(cPB->hFileInfo.ioNamePtr, matchName, false, true) )\n\t\t{\n\t\t\tgoto Failed;\n\t\t}\n\t\telse if ( searchBits == fsSBFullName )\n\t\t{\n\t\t\t/* optimize for name matching only since it is most common way to search */\n\t\t\tgoto Hit;\n\t\t}\n\t}\n\t\n\tif ( (searchBits & fsSBFlParID) != 0 )\n\t{\n\t\tif ( ((unsigned long)(cPB->hFileInfo.ioFlParID) < (unsigned long)(searchInfo1->hFileInfo.ioFlParID)) ||\n\t\t\t ((unsigned long)(cPB->hFileInfo.ioFlParID) > (unsigned long)(searchInfo2->hFileInfo.ioFlParID)) )\n\t\t{\n\t\t\tgoto Failed;\n\t\t}\n\t}\n\t\n\tif ( (searchBits & fsSBFlAttrib) != 0 )\n\t{\n\t\tif ( ((cPB->hFileInfo.ioFlAttrib ^ searchInfo1->hFileInfo.ioFlAttrib) &\n\t\t\t  searchInfo2->hFileInfo.ioFlAttrib) != 0 )\n\t\t{\n\t\t\tgoto Failed;\n\t\t}\n\t}\n\t\n\tif ( (searchBits & fsSBDrNmFls) != 0 )\n\t{\n\t\tif ( ((unsigned long)(cPB->dirInfo.ioDrNmFls) < (unsigned long)(searchInfo1->dirInfo.ioDrNmFls)) ||\n\t\t\t ((unsigned long)(cPB->dirInfo.ioDrNmFls) > (unsigned long)(searchInfo2->dirInfo.ioDrNmFls)) )\n\t\t{\n\t\t\tgoto Failed;\n\t\t}\n\t}\n\n\tif ( (searchBits & fsSBFlFndrInfo) != 0 )\t/* fsSBFlFndrInfo is same as fsSBDrUsrWds */\n\t{\n\t\tif ( !CompareMasked((long *)&(cPB->hFileInfo.ioFlFndrInfo),\n\t\t\t\t\t\t\t(long *)&(searchInfo1->hFileInfo.ioFlFndrInfo),\n\t\t\t\t\t\t\t(long *)&(searchInfo2->hFileInfo.ioFlFndrInfo),\n\t\t\t\t\t\t\tsizeof(FInfo) / sizeof(long)) )\n\t\t{\n\t\t\tgoto Failed;\n\t\t}\n\t}\n\t\n\tif ( (searchBits & fsSBFlXFndrInfo) != 0 )\t/* fsSBFlXFndrInfo is same as fsSBDrFndrInfo */\n\t{\n\t\tif ( !CompareMasked((long *)&(cPB->hFileInfo.ioFlXFndrInfo),\n\t\t\t\t\t\t\t(long *)&(searchInfo1->hFileInfo.ioFlXFndrInfo),\n\t\t\t\t\t\t\t(long *)&(searchInfo2->hFileInfo.ioFlXFndrInfo),\n\t\t\t\t\t\t\tsizeof(FXInfo) / sizeof(long)) )\n\t\t{\n\t\t\tgoto Failed;\n\t\t}\n\t}\n\t\n\tif ( (searchBits & fsSBFlLgLen) != 0 )\n\t{\n\t\tif ( ((unsigned long)(cPB->hFileInfo.ioFlLgLen) < (unsigned long)(searchInfo1->hFileInfo.ioFlLgLen)) ||\n\t\t\t ((unsigned long)(cPB->hFileInfo.ioFlLgLen) > (unsigned long)(searchInfo2->hFileInfo.ioFlLgLen)) )\n\t\t{\n\t\t\tgoto Failed;\n\t\t}\n\t}\n\n\tif ( (searchBits & fsSBFlPyLen) != 0 )\n\t{\n\t\tif ( ((unsigned long)(cPB->hFileInfo.ioFlPyLen) < (unsigned long)(searchInfo1->hFileInfo.ioFlPyLen)) ||\n\t\t\t ((unsigned long)(cPB->hFileInfo.ioFlPyLen) > (unsigned long)(searchInfo2->hFileInfo.ioFlPyLen)) )\n\t\t{\n\t\t\tgoto Failed;\n\t\t}\n\t}\n\n\tif ( (searchBits & fsSBFlRLgLen) != 0 )\n\t{\n\t\tif ( ((unsigned long)(cPB->hFileInfo.ioFlRLgLen) < (unsigned long)(searchInfo1->hFileInfo.ioFlRLgLen)) ||\n\t\t\t ((unsigned long)(cPB->hFileInfo.ioFlRLgLen) > (unsigned long)(searchInfo2->hFileInfo.ioFlRLgLen)) )\n\t\t{\n\t\t\tgoto Failed;\n\t\t}\n\t}\n\n\tif ( (searchBits & fsSBFlRPyLen) != 0 )\n\t{\n\t\tif ( ((unsigned long)(cPB->hFileInfo.ioFlRPyLen) < (unsigned long)(searchInfo1->hFileInfo.ioFlRPyLen)) ||\n\t\t\t ((unsigned long)(cPB->hFileInfo.ioFlRPyLen) > (unsigned long)(searchInfo2->hFileInfo.ioFlRPyLen)) )\n\t\t{\n\t\t\tgoto Failed;\n\t\t}\n\t}\n\n\tif ( (searchBits & fsSBFlCrDat) != 0 )\t/* fsSBFlCrDat is same as fsSBDrCrDat */\n\t{\n\t\tif ( ((unsigned long)(cPB->hFileInfo.ioFlCrDat) < (unsigned long)(searchInfo1->hFileInfo.ioFlCrDat)) ||\n\t\t\t ((unsigned long)(cPB->hFileInfo.ioFlCrDat) > (unsigned long)(searchInfo2->hFileInfo.ioFlCrDat)) )\n\t\t{\n\t\t\tgoto Failed;\n\t\t}\n\t}\n\n\tif ( (searchBits & fsSBFlMdDat) != 0 )\t/* fsSBFlMdDat is same as fsSBDrMdDat */\n\t{\n\t\tif ( ((unsigned long)(cPB->hFileInfo.ioFlMdDat) < (unsigned long)(searchInfo1->hFileInfo.ioFlMdDat)) ||\n\t\t\t ((unsigned long)(cPB->hFileInfo.ioFlMdDat) > (unsigned long)(searchInfo2->hFileInfo.ioFlMdDat)) )\n\t\t{\n\t\t\tgoto Failed;\n\t\t}\n\t}\n\n\tif ( (searchBits & fsSBFlBkDat) != 0 )\t/* fsSBFlBkDat is same as fsSBDrBkDat */\n\t{\n\t\tif ( ((unsigned long)(cPB->hFileInfo.ioFlBkDat) < (unsigned long)(searchInfo1->hFileInfo.ioFlBkDat)) ||\n\t\t\t ((unsigned long)(cPB->hFileInfo.ioFlBkDat) > (unsigned long)(searchInfo2->hFileInfo.ioFlBkDat)) )\n\t\t{\n\t\t\tgoto Failed;\n\t\t}\n\t}\n\n\t/* Hey, we passed all of the tests! */\n\t\nHit:\n\tfoundMatch = true;\n\n/* foundMatch is false if code jumps to Failed */\nFailed:\n\t/* Do we reverse our findings? */\n\tif ( (searchBits & fsSBNegate) != 0 )\n\t{\n\t\tfoundMatch = !foundMatch;\t/* matches are not, not matches are */\n\t}\n\t\n\tif ( foundMatch )\n\t{\n\n\t\t/* Move the match into the match buffer */\n\t\tuserPB->ioMatchPtr[userPB->ioActMatchCount].vRefNum = cPB->hFileInfo.ioVRefNum;\n\t\tuserPB->ioMatchPtr[userPB->ioActMatchCount].parID = cPB->hFileInfo.ioFlParID;\n\t\tif ( cPB->hFileInfo.ioNamePtr[0] > 63 )\n\t\t{\n\t\t\tcPB->hFileInfo.ioNamePtr[0] = 63;\n\t\t}\n\t\tBlockMoveData(cPB->hFileInfo.ioNamePtr,\n\t\t\t\t\t  userPB->ioMatchPtr[userPB->ioActMatchCount].name,\n\t\t\t\t\t  cPB->hFileInfo.ioNamePtr[0] + 1);\n\t\t\n\t\t/* increment the actual count */\n\t\t++(userPB->ioActMatchCount);\n\t}\n}\n\n/*****************************************************************************/\n\n/*\n**\tTimeOutTask is executed when the timer goes off. It simply sets the\n**\tstopSearch field to true. After each object is found and possibly added\n**\tto the matches buffer, stopSearch is checked to see if the search should\n**\tcontinue.\n*/\n\n#if\t__WANTPASCALELIMINATION\n#undef\tpascal\n#endif\n\n#if TARGET_RT_MAC_CFM\n\nstatic\tpascal\tvoid\tTimeOutTask(TMTaskPtr tmTaskPtr)\n{\n\t((ExtendedTMTaskPtr)tmTaskPtr)->stopSearch = true;\n}\n\n#else\n\nstatic\tpascal\tTMTaskPtr\tGetTMTaskPtr(void)\n\tONEWORDINLINE(0x2e89);\t/* MOVE.L A1,(SP) */\n\t\nstatic\tvoid\tTimeOutTask(void)\n{\n\t((ExtendedTMTaskPtr)GetTMTaskPtr())->stopSearch = true;\n}\n\n#endif\n\n#if\t__WANTPASCALELIMINATION\n#define\tpascal\t\n#endif\n\n/*****************************************************************************/\n\n/*\n**\tGetDirModDate returns the modification date of a directory. If there is\n**\tan error getting the modification date, -1 is returned to indicate\n**\tsomething went wrong.\n*/\nstatic\tlong\tGetDirModDate(short vRefNum,\n\t\t\t\t\t\t\t  long dirID)\n{\n\tCInfoPBRec pb;\n\tStr31 tempName;\n\tlong modDate;\n\n\t/* Protection against File Sharing problem */\n\ttempName[0] = 0;\n\tpb.dirInfo.ioNamePtr = tempName;\n\tpb.dirInfo.ioVRefNum = vRefNum;\n\tpb.dirInfo.ioDrDirID = dirID;\n\tpb.dirInfo.ioFDirIndex = -1;\t/* use ioDrDirID */\n\t\n\tif ( PBGetCatInfoSync(&pb) == noErr )\n\t{\n\t\tmodDate = pb.dirInfo.ioDrMdDat;\n\t}\n\telse\n\t{\n\t\tmodDate = -1;\n\t}\n\t\n\treturn ( modDate );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tIndexedSearch(CSParamPtr pb,\n\t\t\t\t\t\t\t  long dirID)\n{\n\tstatic LevelRecHandle\tsearchStack = NULL;\t\t/* static handle to LevelRec stack */\n\tstatic Size\t\t\t\tsearchStackSize = 0;\t/* size of static handle */\n\tSearchPositionRecPtr\tcatPosition;\n\tlong\t\t\t\t\tmodDate;\n\tshort\t\t\t\t\tindex;\n\tExtendedTMTask\t\t\ttimerTask;\n\tOSErr\t\t\t\t\tresult;\n\tshort\t\t\t\t\trealVRefNum;\n\tStr63\t\t\t\t\titemName;\n\tCInfoPBRec\t\t\t\tcPB;\n\tlong\t\t\t\t\ttempLong;\n\tBoolean\t\t\t\t\tincludeFiles;\n\tBoolean\t\t\t\t\tincludeDirs;\n\tBoolean\t\t\t\t\tincludeNames;\n\tStr63\t\t\t\t\tupperName;\n\t\n\ttimerTask.stopSearch = false;\t/* don't stop yet! */\n\t\n\t/* If request has a timeout, install a Time Manager task. */\n\tif ( pb->ioSearchTime != 0 )\n\t{\n\t\t/* Start timer */\n\t\ttimerTask.theTask.tmAddr = NewTimerUPP(TimeOutTask);\n\t\tInsTime((QElemPtr)&(timerTask.theTask));\n\t\tPrimeTime((QElemPtr)&(timerTask.theTask), pb->ioSearchTime);\n\t}\n\t\n\t/* Check the parameter block passed for things that we don't want to assume */\n\t/* are OK later in the code. For example, make sure pointers to data structures */\n\t/* and buffers are not NULL.  And while we're in there, see if the request */\n\t/* specified searching for files, directories, or both, and see if the search */\n\t/* was by full or partial name. */\n\tresult = VerifyUserPB(pb, &includeFiles, &includeDirs, &includeNames);\n\tif ( result == noErr )\n\t{\n\t\tpb->ioActMatchCount = 0;\t/* no matches yet */\n\t\n\t\tif ( includeNames )\n\t\t{\n\t\t\t/* The search includes seach by full or partial name. */\n\t\t\t/* Make an upper case copy of the match string to pass to */\n\t\t\t/* CheckForMatches. */\n\t\t\tBlockMoveData(pb->ioSearchInfo1->hFileInfo.ioNamePtr,\n\t\t\t\t\t\t\tupperName,\n\t\t\t\t\t\t\tpb->ioSearchInfo1->hFileInfo.ioNamePtr[0] + 1);\n\t\t\t/* Use the same non-international call the File Manager uses */\n\t\t\tUpperString(upperName, true);\n\t\t}\n\t\t\n\t\t/* Prevent casting to my type throughout code */\n\t\tcatPosition = (SearchPositionRecPtr)&pb->ioCatPosition;\n\t\t\n\t\t/* Create searchStack first time called */\n\t\tif ( searchStack == NULL )\n\t\t{\n\t\t\tsearchStack = (LevelRecHandle)NewHandle(kAdditionalLevelRecs * sizeof(LevelRec));\n\t\t}\n\t\t\n\t\t/* Make sure searchStack really exists */\n\t\tif ( searchStack != NULL )\n\t\t{\n\t\t\tsearchStackSize = GetHandleSize((Handle)searchStack);\n\t\t\t\n\t\t\t/* See if the search is a new search or a resumed search. */\n\t\t\tif ( catPosition->initialize == 0 )\n\t\t\t{\n\t\t\t\t/* New search. */\n\t\t\t\t\n\t\t\t\t/* Get the real vRefNum and fill in catPosition->initialize. */ \n\t\t\t\tresult = CheckVol(pb->ioNamePtr, pb->ioVRefNum, &realVRefNum, &catPosition->initialize);\n\t\t\t\tif ( result == noErr )\n\t\t\t\t{\n\t\t\t\t\t/* clear searchStack */\n\t\t\t\t\tcatPosition->stackDepth = 0;\n\t\t\t\t\t\n\t\t\t\t\t/* use dirID parameter passed and... */\n\t\t\t\t\tindex = -1;\t/* start with the passed directory itself! */\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t/* We're resuming a search. */\n\t\n\t\t\t\t/* Get the real vRefNum and make sure catPosition->initialize is valid. */ \n\t\t\t\tresult = CheckVol(pb->ioNamePtr, pb->ioVRefNum, &realVRefNum, &tempLong);\n\t\t\t\tif ( result == noErr )\n\t\t\t\t{\n\t\t\t\t\t/* Make sure the resumed search is to the same volume! */\n\t\t\t\t\tif ( catPosition->initialize == tempLong )\n\t\t\t\t\t{\n\t\t\t\t\t\t/* For resume, catPosition->stackDepth > 0 */\n\t\t\t\t\t\tif ( catPosition->stackDepth > 0 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/* Position catPosition->stackDepth to access last saved level */\n\t\t\t\t\t\t\t--(catPosition->stackDepth);\n\t\t\t\n\t\t\t\t\t\t\t/* Get the dirID and index for the next item */\n\t\t\t\t\t\t\tdirID = (*searchStack)[catPosition->stackDepth].dirID;\n\t\t\t\t\t\t\tindex = (*searchStack)[catPosition->stackDepth].index;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* Check the dir's mod date against the saved mode date on our \"stack\" */\n\t\t\t\t\t\t\tmodDate = GetDirModDate(realVRefNum, dirID);\n\t\t\t\t\t\t\tif ( modDate != (*searchStack)[catPosition->stackDepth].dirModDate )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tresult = catChangedErr;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/* Invalid catPosition record was passed */\n\t\t\t\t\t\t\tresult = paramErr;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t/* The volume is not the same */\n\t\t\t\t\t\tresult = catChangedErr;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ( result == noErr )\n\t\t\t{\n\t\t\t\t/* ioNamePtr and ioVRefNum only need to be set up once. */\n\t\t\t\tcPB.hFileInfo.ioNamePtr = itemName;\n\t\t\t\tcPB.hFileInfo.ioVRefNum = realVRefNum;\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t**\tHere's the loop that:\n\t\t\t\t**\t\tFinds the next item on the volume.\n\t\t\t\t**\t\tIf noErr, calls the code to check for matches and add matches\n\t\t\t\t**\t\t\tto the match buffer.\n\t\t\t\t**\t\tSets up dirID and index for to find the next item on the volume.\n\t\t\t\t**\n\t\t\t\t**\tThe looping ends when:\n\t\t\t\t**\t\t(a) an unexpected error is returned by PBGetCatInfo. All that\n\t\t\t\t**\t\t\tis expected is noErr and fnfErr (after the last item in a\n\t\t\t\t**\t\t\tdirectory is found).\n\t\t\t\t**\t\t(b) the caller specified a timeout and our Time Manager task\n\t\t\t\t**\t\t\thas fired.\n\t\t\t\t**\t\t(c) the number of matches requested by the caller has been found.\n\t\t\t\t**\t\t(d) the last item on the volume was found.\n\t\t\t\t*/\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\t/* get the next item */\n\t\t\t\t\tcPB.hFileInfo.ioFDirIndex = index;\n\t\t\t\t\tcPB.hFileInfo.ioDirID = dirID;\n\t\t\t\t\tresult = PBGetCatInfoSync(&cPB);\n\t\t\t\t\tif ( index != -1 )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( result == noErr )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/* We found something */\n\t\t\n\t\t\t\t\t\t\tCheckForMatches(&cPB, pb, upperName, includeFiles, includeDirs);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t++index;\n\t\t\t\t\t\t\tif ( (cPB.dirInfo.ioFlAttrib & kioFlAttribDirMask) != 0 )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* It's a directory */\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tresult = CheckStack(catPosition->stackDepth, searchStack, &searchStackSize);\n\t\t\t\t\t\t\t\tif ( result == noErr )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t/* Save the current state on the searchStack */\n\t\t\t\t\t\t\t\t\t/* when we come back, this is where we'll start */\n\t\t\t\t\t\t\t\t\t(*searchStack)[catPosition->stackDepth].dirID = dirID;\n\t\t\t\t\t\t\t\t\t(*searchStack)[catPosition->stackDepth].index = index;\n\t\t\t\t\t\t\t\t\t(*searchStack)[catPosition->stackDepth].dirModDate = GetDirModDate(realVRefNum, dirID);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t/* position catPosition->stackDepth for next saved level */\n\t\t\t\t\t\t\t\t\t++(catPosition->stackDepth);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t/* The next item to get is the 1st item in the child directory */\n\t\t\t\t\t\t\t\t\tdirID = cPB.dirInfo.ioDrDirID;\n\t\t\t\t\t\t\t\t\tindex = 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/* else do nothing for files */\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/* End of directory found (or we had some error and that */\n\t\t\t\t\t\t\t/* means we have to drop out of this directory). */\n\t\t\t\t\t\t\t/* Restore last thing put on stack and */\n\t\t\t\t\t\t\t/* see if we need to continue or quit. */\n\t\t\t\t\t\t\tif ( catPosition->stackDepth > 0 )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* position catPosition->stackDepth to access last saved level */\n\t\t\t\t\t\t\t\t--(catPosition->stackDepth);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tdirID = (*searchStack)[catPosition->stackDepth].dirID;\n\t\t\t\t\t\t\t\tindex = (*searchStack)[catPosition->stackDepth].index;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t/* Check the dir's mod date against the saved mode date on our \"stack\" */\n\t\t\t\t\t\t\t\tmodDate = GetDirModDate(realVRefNum, dirID);\n\t\t\t\t\t\t\t\tif ( modDate != (*searchStack)[catPosition->stackDepth].dirModDate )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tresult = catChangedErr;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t/* Going back to ancestor directory. */\n\t\t\t\t\t\t\t\t\t/* Clear error so we can continue. */\n\t\t\t\t\t\t\t\t\tresult = noErr;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* We hit the bottom of the stack, so we'll let the */\n\t\t\t\t\t\t\t\t/* the eofErr drop us out of the loop. */\n\t\t\t\t\t\t\t\tresult = eofErr;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t/* Special case for index == -1; that means that we're starting */\n\t\t\t\t\t\t/* a new search and so the first item to check is the directory */\n\t\t\t\t\t\t/* passed to us. */\n\t\t\t\t\t\tif ( result == noErr )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/* We found something */\n\t\t\n\t\t\t\t\t\t\tCheckForMatches(&cPB, pb, upperName, includeFiles, includeDirs);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* Now, set the index to 1 and then we're ready to look inside */\n\t\t\t\t\t\t\t/* the passed directory. */\n\t\t\t\t\t\t\tindex = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} while ( (!timerTask.stopSearch) &&\t/* timer hasn't fired */\n\t\t\t\t\t\t  (result == noErr) &&\t\t\t/* no unexpected errors */\n\t\t\t\t\t\t  (pb->ioReqMatchCount > pb->ioActMatchCount) ); /* we haven't found our limit */\n\t\t\t\t\n\t\t\t\t/* Did we drop out of the loop because of timeout or */\n\t\t\t\t/* ioReqMatchCount was found? */\n\t\t\t\tif ( result == noErr )\n\t\t\t\t{\n\t\t\t\t\tresult = CheckStack(catPosition->stackDepth, searchStack, &searchStackSize);\n\t\t\t\t\tif ( result == noErr )\n\t\t\t\t\t{\n\t\t\t\t\t\t/* Either there was a timeout or ioReqMatchCount was reached. */\n\t\t\t\t\t\t/* Save the dirID and index for the next time we're called. */\n\t\t\t\t\t\t\n\t\t\t\t\t\t(*searchStack)[catPosition->stackDepth].dirID = dirID;\n\t\t\t\t\t\t(*searchStack)[catPosition->stackDepth].index = index;\n\t\t\t\t\t\t(*searchStack)[catPosition->stackDepth].dirModDate = GetDirModDate(realVRefNum, dirID);\n\t\t\t\t\t\t\n\t\t\t\t\t\t/* position catPosition->stackDepth for next saved level */\n\t\t\t\t\t\t\n\t\t\t\t\t\t++(catPosition->stackDepth);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* searchStack Handle could not be allocated */\n\t\t\tresult = memFullErr;\n\t\t}\n\t}\n\t\n\tif ( pb->ioSearchTime != 0 )\n\t{\n\t\t/* Stop Time Manager task here if it was installed */\n\t\tRmvTime((QElemPtr)&(timerTask.theTask));\n\t\tDisposeTimerUPP(timerTask.theTask.tmAddr);\n\t}\n\t\n\treturn ( result );\n}\n\n/*****************************************************************************/\n\npascal OSErr PBCatSearchSyncCompat(CSParamPtr paramBlock)\n{\n\tOSErr \t\t\t\t\tresult;\n\tBoolean\t\t\t\t\tsupportsCatSearch;\n\tGetVolParmsInfoBuffer\tvolParmsInfo;\n\tlong\t\t\t\t\tinfoSize;\n#if !__MACOSSEVENORLATER\n\tstatic Boolean\t\t\tfullExtFSDispatchingtested = false;\n\tstatic Boolean\t\t\thasFullExtFSDispatching = false;\n\tlong\t\t\t\t\tresponse;\n#endif\n\t\n\tresult = noErr;\n\n#if !__MACOSSEVENORLATER\n\t/* See if File Manager will pass CatSearch requests to external file systems */\n\t/* we'll store the results in a static variable so we don't have to call Gestalt */\n\t/* everytime we're called. (System 7.0 and later always do this) */\n\tif ( !fullExtFSDispatchingtested )\n\t{\n\t\tfullExtFSDispatchingtested = true;\n\t\tif ( Gestalt(gestaltFSAttr, &response) == noErr )\n\t\t{\n\t\t\thasFullExtFSDispatching = ((response & (1L << gestaltFullExtFSDispatching)) != 0);\n\t\t}\n\t}\n#endif\n\t\n\t/* CatSearch is a per volume attribute, so we have to check each time we're */\n\t/* called to see if it is available on the volume specified. */\n\tsupportsCatSearch = false;\n#if !__MACOSSEVENORLATER\n\tif ( hasFullExtFSDispatching )\n#endif\n\t{\n\t\tinfoSize = sizeof(GetVolParmsInfoBuffer);\n\t\tresult = HGetVolParms(paramBlock->ioNamePtr, paramBlock->ioVRefNum,\n\t\t\t\t\t\t\t&volParmsInfo, &infoSize);\n\t\tif ( result == noErr )\n\t\t{\n\t\t\tsupportsCatSearch = hasCatSearch(volParmsInfo);\n\t\t}\n\t}\n\t\n\t/* noErr or paramErr is OK here. */\n\t/* paramErr just means that GetVolParms isn't supported by this volume */\n\tif ( (result == noErr) || (result == paramErr) )\n\t{\n\t\tif ( supportsCatSearch )\n\t\t{\n\t\t\t/* Volume supports CatSearch so use it. */\n\t\t\t/* CatSearch is faster than an indexed search. */\n\t\t\tresult = PBCatSearchSync(paramBlock);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* Volume doesn't support CatSearch so */\n\t\t\t/* search using IndexedSearch from root directory. */\n\t\t\tresult = IndexedSearch(paramBlock, fsRtDirID);\n\t\t}\n\t}\n\t\n\treturn ( result );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tNameFileSearch(ConstStr255Param volName,\n\t\t\t\t\t\t\t   short vRefNum,\n\t\t\t\t\t\t\t   ConstStr255Param fileName,\n\t\t\t\t\t\t\t   FSSpecPtr matches,\n\t\t\t\t\t\t\t   long reqMatchCount,\n\t\t\t\t\t\t\t   long *actMatchCount,\n\t\t\t\t\t\t\t   Boolean newSearch,\n\t\t\t\t\t\t\t   Boolean partial)\n{\n\tCInfoPBRec\t\tsearchInfo1, searchInfo2;\n\tHParamBlockRec\tpb;\n\tOSErr\t\t\terror;\n\tstatic CatPositionRec catPosition;\n\tstatic short\tlastVRefNum = 0;\n\t\n\t/* get the real volume reference number */\n\terror = DetermineVRefNum(volName, vRefNum, &vRefNum);\n\tif ( error != noErr )\n\t\treturn ( error );\n\t\n\tpb.csParam.ioNamePtr = NULL;\n\tpb.csParam.ioVRefNum = vRefNum;\n\tpb.csParam.ioMatchPtr = matches;\n\tpb.csParam.ioReqMatchCount = reqMatchCount;\n\tif ( partial )\t/* tell CatSearch what we're looking for: */\n\t{\n\t\tpb.csParam.ioSearchBits = fsSBPartialName + fsSBFlAttrib;\t/* partial name file matches or */\n\t}\n\telse\n\t{\n\t\tpb.csParam.ioSearchBits =  fsSBFullName + fsSBFlAttrib;\t\t/* full name file matches */\n\t}\n\tpb.csParam.ioSearchInfo1 = &searchInfo1;\n\tpb.csParam.ioSearchInfo2 = &searchInfo2;\n\tpb.csParam.ioSearchTime = 0;\n\tif ( (newSearch) ||\t\t\t\t/* If caller specified new search */\n\t\t (lastVRefNum != vRefNum) )\t/* or if last search was to another volume, */\n\t{\n\t\tcatPosition.initialize = 0;\t/* then search from beginning of catalog */\n\t}\n\tpb.csParam.ioCatPosition = catPosition;\n\tpb.csParam.ioOptBuffer = GetTempBuffer(0x00004000, &pb.csParam.ioOptBufSize);\n\n\t/* search for fileName */\n\tsearchInfo1.hFileInfo.ioNamePtr = (StringPtr)fileName;\n\tsearchInfo2.hFileInfo.ioNamePtr = NULL;\n\t\n\t/* only match files (not directories) */\n\tsearchInfo1.hFileInfo.ioFlAttrib = 0x00;\n\tsearchInfo2.hFileInfo.ioFlAttrib = kioFlAttribDirMask;\n\n\terror = PBCatSearchSyncCompat((CSParamPtr)&pb);\n\t\n\tif ( (error == noErr) ||\t\t\t\t\t\t\t/* If no errors or the end of catalog was */\n\t\t (error == eofErr) )\t\t\t\t\t\t\t/* found, then the call was successful so */\n\t{\n\t\t*actMatchCount = pb.csParam.ioActMatchCount;\t/* return the match count */\n\t}\n\telse\n\t{\n\t\t*actMatchCount = 0;\t\t\t\t\t\t\t/* else no matches found */\n\t}\n\t\n\tif ( (error == noErr) ||\t\t\t\t\t\t/* If no errors */\n\t\t (error == catChangedErr) )\t\t\t\t\t/* or there was a change in the catalog */\n\t{\n\t\tcatPosition = pb.csParam.ioCatPosition;\n\t\tlastVRefNum = vRefNum;\n\t\t\t/* we can probably start the next search where we stopped this time */\n\t}\n\telse\n\t{\n\t\tcatPosition.initialize = 0;\n\t\t\t/* start the next search from beginning of catalog */\n\t}\n\t\n\tif ( pb.csParam.ioOptBuffer != NULL )\n\t{\n\t\tDisposePtr(pb.csParam.ioOptBuffer);\n\t}\n\t\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n\npascal\tOSErr\tCreatorTypeFileSearch(ConstStr255Param volName,\n\t\t\t\t\t\t\t\t\t  short vRefNum,\n\t\t\t\t\t\t\t\t\t  OSType creator,\n\t\t\t\t\t\t\t\t\t  OSType fileType,\n\t\t\t\t\t\t\t\t\t  FSSpecPtr matches,\n\t\t\t\t\t\t\t\t\t  long reqMatchCount,\n\t\t\t\t\t\t\t\t\t  long *actMatchCount,\n\t\t\t\t\t\t\t\t\t  Boolean newSearch)\n{\n\tCInfoPBRec\t\tsearchInfo1, searchInfo2;\n\tHParamBlockRec\tpb;\n\tOSErr\t\t\terror;\n\tstatic CatPositionRec catPosition;\n\tstatic short\tlastVRefNum = 0;\n\t\n\t/* get the real volume reference number */\n\terror = DetermineVRefNum(volName, vRefNum, &vRefNum);\n\tif ( error != noErr )\n\t\treturn ( error );\n\t\n\tpb.csParam.ioNamePtr = NULL;\n\tpb.csParam.ioVRefNum = vRefNum;\n\tpb.csParam.ioMatchPtr = matches;\n\tpb.csParam.ioReqMatchCount = reqMatchCount;\n\tpb.csParam.ioSearchBits = fsSBFlAttrib + fsSBFlFndrInfo;\t/* Looking for finder info file matches */\n\tpb.csParam.ioSearchInfo1 = &searchInfo1;\n\tpb.csParam.ioSearchInfo2 = &searchInfo2;\n\tpb.csParam.ioSearchTime = 0;\n\tif ( (newSearch) ||\t\t\t\t/* If caller specified new search */\n\t\t (lastVRefNum != vRefNum) )\t/* or if last search was to another volume, */\n\t{\n\t\tcatPosition.initialize = 0;\t/* then search from beginning of catalog */\n\t}\n\tpb.csParam.ioCatPosition = catPosition;\n\tpb.csParam.ioOptBuffer = GetTempBuffer(0x00004000, &pb.csParam.ioOptBufSize);\n\n\t/* no fileName */\n\tsearchInfo1.hFileInfo.ioNamePtr = NULL;\n\tsearchInfo2.hFileInfo.ioNamePtr = NULL;\n\t\n\t/* only match files (not directories) */\n\tsearchInfo1.hFileInfo.ioFlAttrib = 0x00;\n\tsearchInfo2.hFileInfo.ioFlAttrib = kioFlAttribDirMask;\n\t\n\t/* search for creator; if creator = 0x00000000, ignore creator */\n\tsearchInfo1.hFileInfo.ioFlFndrInfo.fdCreator = creator;\n\tif ( creator == (OSType)0x00000000 )\n\t{\n\t\tsearchInfo2.hFileInfo.ioFlFndrInfo.fdCreator = (OSType)0x00000000;\n\t}\n\telse\n\t{\n\t\tsearchInfo2.hFileInfo.ioFlFndrInfo.fdCreator = (OSType)0xffffffff;\n\t}\n\t\n\t/* search for fileType; if fileType = 0x00000000, ignore fileType */\n\tsearchInfo1.hFileInfo.ioFlFndrInfo.fdType = fileType;\n\tif ( fileType == (OSType)0x00000000 )\n\t{\n\t\tsearchInfo2.hFileInfo.ioFlFndrInfo.fdType = (OSType)0x00000000;\n\t}\n\telse\n\t{\n\t\tsearchInfo2.hFileInfo.ioFlFndrInfo.fdType = (OSType)0xffffffff;\n\t}\n\t\n\t/* zero all other FInfo fields */\n\tsearchInfo1.hFileInfo.ioFlFndrInfo.fdFlags = 0;\n\tsearchInfo1.hFileInfo.ioFlFndrInfo.fdLocation.v = 0;\n\tsearchInfo1.hFileInfo.ioFlFndrInfo.fdLocation.h = 0;\n\tsearchInfo1.hFileInfo.ioFlFndrInfo.fdFldr = 0;\n\t\n\tsearchInfo2.hFileInfo.ioFlFndrInfo.fdFlags = 0;\n\tsearchInfo2.hFileInfo.ioFlFndrInfo.fdLocation.v = 0;\n\tsearchInfo2.hFileInfo.ioFlFndrInfo.fdLocation.h = 0;\n\tsearchInfo2.hFileInfo.ioFlFndrInfo.fdFldr = 0;\n\n\terror = PBCatSearchSyncCompat((CSParamPtr)&pb);\n\t\n\tif ( (error == noErr) ||\t\t\t\t\t\t\t/* If no errors or the end of catalog was */\n\t\t (error == eofErr) )\t\t\t\t\t\t\t/* found, then the call was successful so */\n\t{\n\t\t*actMatchCount = pb.csParam.ioActMatchCount;\t/* return the match count */\n\t}\n\telse\n\t{\n\t\t*actMatchCount = 0;\t\t\t\t\t\t\t/* else no matches found */\n\t}\n\t\n\tif ( (error == noErr) ||\t\t\t\t\t\t/* If no errors */\n\t\t (error == catChangedErr) )\t\t\t\t\t/* or there was a change in the catalog */\n\t{\n\t\tcatPosition = pb.csParam.ioCatPosition;\n\t\tlastVRefNum = vRefNum;\n\t\t\t/* we can probably start the next search where we stopped this time */\n\t}\n\telse\n\t{\n\t\tcatPosition.initialize = 0;\n\t\t\t/* start the next search from beginning of catalog */\n\t}\n\t\n\tif ( pb.csParam.ioOptBuffer != NULL )\n\t{\n\t\tDisposePtr(pb.csParam.ioOptBuffer);\n\t}\n\t\t\n\treturn ( error );\n}\n\n/*****************************************************************************/\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/sqMacFileCopy.c",
    "content": "/* Use the extra files logic from Apple to copy a directory or file to another directory or file  */\n//John M McIntosh johnmci@smalltalkconsulting.com Aug 21 2001 Chunnel build\n\n#include <string.h>\n#include \"FileCopy.h\"\n#include \"FullPath.h\"\n#include \"DirectoryCopy.h\"\n#include \"MoreFilesExtras.h\"\n#include \"FSpCompat.h\"\n#include \"sqMacFileCopy.h\"\n\n\nint sqCopyFilesizetosize(char *srcNameIndex, int srcNameSize, char *dstNameIndex, int dstNameSize) {\n\n\tOSErr error;\n\tFSSpec\tsrcSpec,dstFileSpec,dstSpec;\n\tchar *pointer;\n\tconst int desiredBufferSize = 64*1024;\n\n\tFSpLocationFromFullPath(srcNameSize,srcNameIndex,&srcSpec);\n\tFSpLocationFromFullPath(dstNameSize,dstNameIndex,&dstFileSpec);\n\tFSMakeFSSpecCompat(dstFileSpec.vRefNum, dstFileSpec.parID, \"\\p:\", &dstSpec);\n#if TARGET_API_MAC_CARBON\n\t\tpointer = NewPtr(desiredBufferSize);\n#else\n\t    pointer = NewPtr(desiredBufferSize);\n\t    if (pointer == NULL) \n\t\t    pointer = NewPtrSys(desiredBufferSize);\n\t    if (pointer == NULL) \n  \t\t\treturn false;\n #endif\n\terror = FSpFileCopy(&srcSpec,\n\t\t\t\t\t\t&dstSpec,\n\t\t\t\t\t\tdstFileSpec.name,\n\t\t\t\t\t\tpointer,\n\t\t\t\t\t\tdesiredBufferSize,\n\t\t\t\t\t\tfalse);\n\tDisposePtr((void *)pointer);\n\treturn error;\n} \n\nint sqCopyDirectorysizetosize(char *srcNameIndex, int srcNameSize, char *dstNameIndex, int dstNameSize) {\n\n\tOSErr error;\n\tFSSpec\tsrcSpec,dstSpec,dstFolderSpec;\n\tchar *pointer;\n\tconst int desiredBufferSize = 64*1024;\n    char name[256];\n\n\tmemmove(name,srcNameIndex,srcNameSize);\n\tmemmove(name+srcNameSize,\":\",1);\n\tFSpLocationFromFullPath(srcNameSize+1,name,&srcSpec);\n\tmemmove(name,dstNameIndex,dstNameSize);\n\tmemmove(name+dstNameSize,\":\",1);\n\tFSpLocationFromFullPath(dstNameSize+1,name,&dstFolderSpec);\n\tFSMakeFSSpecCompat(dstFolderSpec.vRefNum, dstFolderSpec.parID, \"\\p:\", &dstSpec);\n\n#if TARGET_API_MAC_CARBON\n\t\tpointer = NewPtr(desiredBufferSize);\n#else\n\t    pointer = NewPtr(desiredBufferSize);\n\t    if (pointer == NULL) \n\t\t    pointer = NewPtrSys(desiredBufferSize);\n\t    if (pointer == NULL) \n  \t\t\treturn false;\n #endif\n    memmove(name,dstFolderSpec.name,sizeof(dstFolderSpec.name));\n\terror = FSpDirectoryCopy(&srcSpec,\n\t\t\t\t\t\t&dstSpec,\n\t\t\t\t\t\t(ConstStr255Param) &name,\n\t\t\t\t\t\tpointer,\n\t\t\t\t\t\tdesiredBufferSize,\n\t\t\t\t\t\tfalse,\n\t\t\t\t\t\t&handleDupError);\n\n\tDisposePtr((void *)pointer);\n\treturn error;\n} \n\n\npascal Boolean handleDupError(OSErr error,\n\t\t\t\t\tshort failedOperation,\n\t\t\t\t\tshort srcVRefNum,\n\t\t\t\t\tlong srcDirID,\n\t\t\t\t\tConstStr255Param srcName,\n\t\t\t\t\tshort dstVRefNum,\n\t\t\t\t\tlong dstDirID,\n\t\t\t\t\tConstStr255Param dstName)\n{\n if (error == dupFNErr ) \n\treturn false;\n  return true; \n}"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FileCopyPlugin/sqMacFileCopy.h",
    "content": "int sqCopyFilesizetosize(char *srcNameIndex, int srcNameSize, char *dstNameIndex, int dstNameSize);\nint sqCopyDirectorysizetosize(char *srcNameIndex, int srcNameSize, char *dstNameIndex, int dstNameSize);\npascal Boolean handleDupError(OSErr error,\n\t\t\t\t\tshort failedOperation,\n\t\t\t\t\tshort srcVRefNum,\n\t\t\t\t\tlong srcDirID,\n\t\t\t\t\tConstStr255Param srcName,\n\t\t\t\t\tshort dstVRefNum,\n\t\t\t\t\tlong dstDirID,\n\t\t\t\t\tConstStr255Param dstName);\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FilePlugin/sqMacDirectory.c",
    "content": "/****************************************************************************\n*   PROJECT: Mac directory logic\n*   FILE:    sqMacDirectory.c\n*   CONTENT: \n*\n*   AUTHOR:  John McIntosh, and others.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacDirectory.c 1197 2005-05-31 05:51:16Z johnmci $\n*\n*   NOTES: See change log below.\n* \n \n Feb 2nd 2001, JMM rewrote, using more current file manager logic.\n 3.0.7 return correct response on findimage\n 3.0.10 Mimimal VM logic\n 3.0.11 April 4th fix bug in lookupPath (users never saw it)\n 3.0.14 May 2001 lookupPath needs to abort on :: can't do hardway lookup, too complicated\n 3.0.17 May 24th 2001 JMM add flush vol on flush file (needed according to apple tech notes)\n 3.0.19 Aug 2001 JMM make it a real plugin \n 3.2.1  Nov 2001 JMM build with Apple's project builder and convert to use StdCLib.\n 3.2.1B5 Dec 27,2001 JMM alter mkdir def to make cw pro 5 happy\n 3.2.1B6 Jan 2,2002 JMM make lookup faster\n 3.2.2B1 Jan 18th,2002 JMM check macroman, fix issues with squeak file offset\n 3.2.8b1 July 24th, 2002 JMM support for os-x plugin under IE 5.x\n 3.5.1b1 May 20th, 2003 JMM isDirectory ? ENTRY_FOUND versus always found because path could be a file. \n 3.7.0bx Nov 24th, 2003 JMM gCurrentVMEncoding\n */\n\n#include \"sq.h\"\n#include \"FilePlugin.h\"\n#include \"sqMacFileLogic.h\"\n#if TARGET_API_MAC_CARBON\n\t#include <Carbon/Carbon.h>\n\t#include <unistd.h>\n\t#include <sys/stat.h>\n\textern CFStringEncoding gCurrentVMEncoding;\n#else\n\t#if defined(__MWERKS__) && !defined(__APPLE__) && !defined(__MACH__)\n\t\t#include <unistd.h>\n\t\tint mkdir(const char *,int);\n\t\tint ftruncate(short int file,int offset);\n\t#endif\n\n\t#include <Files.h>\n\t#include <Strings.h>\n#endif\n\n/***\n        The interface to the directory primitive is path based.\n\tThat is, the client supplies a Squeak string describing\n\tthe path to the directory on every call. To avoid traversing\n\tthis path on every call, a cache is maintained of the last\n\tpath seen, along with the Mac volume and folder reference\n\tnumbers corresponding to that path.\n***/\n\n/*** Constants ***/\n#define ENTRY_FOUND     0\n#define NO_MORE_ENTRIES 1\n#define BAD_PATH        2\n\n#define DELIMITOR ':'\n#define MAX_PATH 2000\n\n/*** Variables ***/\nchar lastPath[MAX_PATH + 1];\nint  lastPathValid = false;\nFSSpec lastSpec;\n\n/*** Functions ***/\nint convertToSqueakTime(int macTime);\nint equalsLastPath(char *pathString, int pathStringLength);\nint recordPath(char *pathString, int pathStringLength, FSSpec *spec);\nOSErr getSpecAndFInfo(char *filename, int filenameSize,FSSpec *spec,FInfo *finderInfo);\n\nint convertToSqueakTime(int macTime) {\n\t/* Squeak epoch is Jan 1, 1901, 3 non-leap years earlier than Mac one */\n\treturn macTime + (3 * 365 * 24 * 60 * 60);\n}\n#if TARGET_API_MAC_CARBON\nint dir_Create(char *pathString, int pathStringLength) {\n\t/* Create a new directory with the given path. By default, this\n\t   directory is created in the current directory. Use\n\t   a full path name such as \"MyDisk:Working:New Folder\" to\n\t   create folders elsewhere. */\n\n    char cFileName[1001];\n\n    if (pathStringLength >= 1000) {\n        return false;\n    }\n\n    /* copy the file name into a null-terminated C string */\n    sqFilenameFromString((char *) cFileName, (int) pathString, pathStringLength);\n    \n#if defined(__MWERKS__)\n\t{\n        CFStringRef \tfilePath,lastFilePath;\n        CFURLRef \t    sillyThing,sillyThing2;\n        FSRef\t        parentFSRef;\n        UniChar         buffer[1024];\n        long            tokenLength;\n\t\tint err;\n        \n        filePath   = CFStringCreateWithBytes(kCFAllocatorDefault,(UInt8 *)cFileName,strlen(cFileName),gCurrentVMEncoding,false);\n        if (filePath == nil) \n            return false;\n        sillyThing = CFURLCreateWithFileSystemPath (kCFAllocatorDefault,filePath,kCFURLHFSPathStyle,true);\n        CFRelease(filePath);\n\n        lastFilePath = CFURLCopyLastPathComponent(sillyThing);\n        tokenLength = CFStringGetLength(lastFilePath);\n        if (tokenLength > 1024)\n            return false;\n        CFStringGetCharacters(lastFilePath,CFRangeMake(0,tokenLength),buffer);\n        CFRelease(lastFilePath);\n\n        sillyThing2 = CFURLCreateCopyDeletingLastPathComponent(kCFAllocatorDefault,sillyThing);\n\n        err = CFURLGetFSRef(sillyThing2,&parentFSRef);\n        CFRelease(sillyThing);\n        CFRelease(sillyThing2);\n        if (err == 0) {\n            return false;  \n        }\n\t\terr = FSCreateDirectoryUnicode(&parentFSRef,tokenLength,buffer,kFSCatInfoNone,NULL,NULL,NULL,NULL);\n\t\t\n    \treturn (err == noErr ? 1 : 0);\n    }\n#else\n    return mkdir(cFileName, 0777) == 0;\n#endif\n}\n \nint dir_Delete(char *pathString, int pathStringLength) {\n\t/* Delete the existing directory with the given path. */\n    char cFileName[1000];\n\n    if (pathStringLength >= 1000) {\n        return false;\n    }\n\n\tif (equalsLastPath(pathString, pathStringLength))\n\t\tlastPathValid = false;\n\n#if defined(__MWERKS__)\n\t{\n    \t/* Delete the existing directory with the given path. */\n        FSSpec spec;\n        OSErr  err;\n\n        if ((err = makeFSSpec(pathString, pathStringLength,&spec))  != noErr)\n            return false;\n            \n       \treturn FSpDelete(&spec) == noErr;\n    }\n#else\n    /* copy the file name into a null-terminated C string */\n    sqFilenameFromString(cFileName, (int) pathString, pathStringLength);\n    return rmdir(cFileName) == 0;\n#endif\n}\n\n#else\nint dir_Create(char *pathString, int pathStringLength) {\n    FSSpec spec;\n    OSErr  err;\n    long  createdDirID;\n    \n    if ((err = makeFSSpec(pathString, pathStringLength,&spec)) == -1)\n        return false;\n        \n   \treturn FSpDirCreate(&spec,smSystemScript,&createdDirID) == noErr;\n}\n\nint dir_Delete(char *pathString, int pathStringLength) {\n\t/* Delete the existing directory with the given path. */\n    FSSpec spec;\n    OSErr  err;\n\n    if ((err = makeFSSpec(pathString, pathStringLength,&spec)) == -1)\n        return false;\n        \n   \treturn FSpDelete(&spec) == noErr;\n}\n#endif\n\nint dir_Delimitor(void) {\n\treturn DELIMITOR;\n}\n\n#if TARGET_API_MAC_CARBON\n\nint dir_Lookup(char *pathString, int pathStringLength, int index,\n  /* outputs: */\n  char *name, int *nameLength, int *creationDate, int *modificationDate,\n  int *isDirectory, squeakFileOffsetType *sizeIfFile) {\n\t/* Lookup the index-th entry of the directory with the given path, starting\n\t   at the root of the file system. Set the name, name length, creation date,\n\t   creation time, directory flag, and file size (if the entry is a file).\n\t   Return:\t0 \tif a entry is found at the given index\n\t   \t\t\t1\tif the directory has fewer than index entries\n\t   \t\t\t2\tif the given path has bad syntax or does not reach a directory\n\t*/\n\n\tint okay;\n    FSSpec      spec;\n    long        parentDirectory;\n    OSErr       err;\n    Str255      longFileName;\n\t\tFSVolumeInfoParam fsVolumeParam;\n\t\tHFSUniStr255 uniStr;\n\t\tFSVolumeInfo volumeInfo;\n    \n\t/* default return values */\n\t*name             = 0;\n\t*nameLength       = 0;\n\t*creationDate     = 0;\n\t*modificationDate = 0;\n\t*isDirectory      = false;\n\t*sizeIfFile       = 0;\n\n\tif ((pathStringLength == 0)) {\n\t\t/* get volume info */\n\t\tfsVolumeParam.volumeName = &uniStr;\n\t\tfsVolumeParam.ioVRefNum = kFSInvalidVolumeRefNum;\n\t\tfsVolumeParam.volumeIndex = index;\n\t\tfsVolumeParam.whichInfo = 0;\n\t\tfsVolumeParam.volumeInfo = &volumeInfo;\n\t\tfsVolumeParam.ref = NULL;\n\t\tfsVolumeParam.whichInfo = kFSVolInfoCreateDate + kFSVolInfoModDate; \n\t\tokay = PBGetVolumeInfoSync( &fsVolumeParam) == noErr;\n/*\n\t\tFSGetVolumeInfo (kFSInvalidVolumeRefNum,\n\t\t\tindex,\n\t\t\tNULL,\n\t\t\t)\n*/\n\t\tif (okay) {\n\t\t\tCFStringRef strRef = CFStringCreateWithCharacters( kCFAllocatorDefault, uniStr.unicode, uniStr.length );\n\t\t\tCFMutableStringRef mStr = CFStringCreateMutableCopy(NULL, 0, strRef);\n\t\t\t// HFS+ imposes Unicode2.1 decomposed UTF-8 encoding on all path elements\n\t\t\tif (gCurrentVMEncoding == kCFStringEncodingUTF8) \n\t\t\t\tCFStringNormalize(mStr, kCFStringNormalizationFormKC); // pre-combined\n\t\t\tBoolean result = CFStringGetCString(mStr, name, 256, gCurrentVMEncoding); // buffer size is to see primitiveDirectoryLookup\n\t\t\tCFRelease(strRef);\n\t\t\tCFRelease(mStr);\n\t\t\tif (result == true) {\n\t\t\t\t// strncpy(name, &(uniStr.unicode), uniStr.length);\n\t\t\t\t// *nameLength       = uniStr.length;\n\t\t\t\t*nameLength       = strlen(name);\n\t\t\t\t{\t\n\t\t\t\t\tLocalDateTime local;\n\t\t\t\t\t\n\t\t\t\t\tConvertUTCToLocalDateTime(&fsVolumeParam.volumeInfo->createDate,&local);\n\t\t\t\t\t*creationDate     = convertToSqueakTime(local.lowSeconds);\n\t\t\t\t}\n\t\t\t\t{\t\n\t\t\t\t\tLocalDateTime local;\n\t\t\t\t\t\n\t\t\t\t\tConvertUTCToLocalDateTime(&fsVolumeParam.volumeInfo->modifyDate,&local);\n\t\t\t\t\t*modificationDate     = convertToSqueakTime(local.lowSeconds);\n\t\t\t\t}\n\t\t\t\t*isDirectory      = true;\n\t\t\t\t*sizeIfFile       = 0;\n\t\t\t\treturn ENTRY_FOUND;\n\t\t\t} else {\n\t\t\t\treturn NO_MORE_ENTRIES;\n\t\t\t}\n\t\t} else {\n\t\t\treturn NO_MORE_ENTRIES;\n\t\t}\n\t} else {\n\t\t/* get file or directory info */\n\t\tif (!equalsLastPath(pathString, pathStringLength)) {\n \t\t\t/* lookup and cache the refNum for this path */\n\t\t\terr = lookupPath(pathString, pathStringLength, &spec,false,true);\n \t\t\tif (err == noErr) \n\t\t\t\trecordPath(pathString, pathStringLength, &spec);\n\t\t\telse \n\t\t\t\treturn BAD_PATH;\n\t\t}\n\t    spec = lastSpec;\n\t\t*sizeIfFile   = 0;\n\t\tokay = fetchFileInfo(index,&spec,(unsigned char *) name,true,\n\t\t\t\t\t\t\t&parentDirectory,isDirectory,creationDate,\n\t\t\t\t\t\t\tmodificationDate,sizeIfFile,&longFileName);\n\t\tif (okay == noErr) {\n\t\t\tCFStringRef cfs= CFStringCreateWithPascalString(NULL, longFileName, gCurrentVMEncoding);\n\t\t\tCFMutableStringRef mStr= CFStringCreateMutableCopy(NULL, 0, cfs);\n\t\t\tCFRelease(cfs);\n\t\t\t// HFS+ imposes Unicode2.1 decomposed UTF-8 encoding on all path elements\n\t\t\tif (gCurrentVMEncoding == kCFStringEncodingUTF8) \n\t\t\t\tCFStringNormalize(mStr, kCFStringNormalizationFormKC); // pre-combined\n\t\t\tCFStringGetCString(mStr, name, 256, gCurrentVMEncoding);\n\t\t\tCFRelease(mStr);\n\n\t\t\t*nameLength       = strlen(name);\n\t\t\t*creationDate     = convertToSqueakTime(*creationDate);\n\t\t\t*modificationDate = convertToSqueakTime(*modificationDate);\n\t\t\treturn ENTRY_FOUND;\n\t\t} else\n\t\t\treturn okay == fnfErr ? NO_MORE_ENTRIES : BAD_PATH;\n\t}\n}\n\n#else \n\nint dir_Lookup(char *pathString, int pathStringLength, int index,\n  /* outputs: */\n  char *name, int *nameLength, int *creationDate, int *modificationDate,\n  int *isDirectory, squeakFileOffsetType *sizeIfFile) {\n\t/* Lookup the index-th entry of the directory with the given path, starting\n\t   at the root of the file system. Set the name, name length, creation date,\n\t   creation time, directory flag, and file size (if the entry is a file).\n\t   Return:\t0 \tif a entry is found at the given index\n\t   \t\t\t1\tif the directory has fewer than index entries\n\t   \t\t\t2\tif the given path has bad syntax or does not reach a directory\n\t*/\n\n\tint okay;\n\tHVolumeParam volumeParams;\n    FSSpec      spec;\n    long        parentDirectory;\n    OSErr       err;\n    Str255      longFileName;\n    \n\t/* default return values */\n\t*name             = 0;\n\t*nameLength       = 0;\n\t*creationDate     = 0;\n\t*modificationDate = 0;\n\t*isDirectory      = false;\n\t*sizeIfFile       = 0;\n\n\tif ((pathStringLength == 0)) {\n\t\t/* get volume info */\n\t\tvolumeParams.ioNamePtr = (unsigned char *) name;\n\t\tvolumeParams.ioVRefNum = 0;\n\t\tvolumeParams.ioVolIndex = index;\n\t\tokay = PBHGetVInfoSync((HParmBlkPtr) &volumeParams) == noErr;\n\t\tif (okay) {\n\t\t\tCopyPascalStringToC((ConstStr255Param) name,name);\n\t\t\t*nameLength       = strlen(name);\n\t\t\t*creationDate     = convertToSqueakTime(volumeParams.ioVCrDate);\n\t\t\t*modificationDate = convertToSqueakTime(volumeParams.ioVLsMod);\n\t\t\t*isDirectory      = true;\n\t\t\t*sizeIfFile       = 0;\n\t\t\treturn ENTRY_FOUND;\n\t\t} else {\n\t\t\treturn NO_MORE_ENTRIES;\n\t\t}\n\t} else {\n\t\t/* get file or directory info */\n\t\tif (!equalsLastPath(pathString, pathStringLength)) {\n \t\t\t/* lookup and cache the refNum for this path */\n\t\t\terr = lookupPath(pathString, pathStringLength, &spec,false,true);\n \t\t\tif (err == noErr) \n\t\t\t\trecordPath(pathString, pathStringLength, &spec);\n\t\t\telse \n\t\t\t\treturn BAD_PATH;\n\t\t}\n\t    spec = lastSpec;\n\t\t\t\t*sizeIfFile   = 0;\n\t\tokay = fetchFileInfo(index,&spec,(unsigned char *) name,true,&parentDirectory,isDirectory,creationDate,modificationDate,sizeIfFile,&longFileName);\n\t\tif (okay == noErr) {\n\t\t\tCopyPascalStringToC((ConstStr255Param) longFileName,name);\n\t\t\t*nameLength       = strlen(name);\n\t\t\t*creationDate     = convertToSqueakTime(*creationDate);\n\t\t\t*modificationDate = convertToSqueakTime(*modificationDate);\n\t\t\treturn ENTRY_FOUND;\n\t\t} else\n\t\t\treturn okay == fnfErr ? NO_MORE_ENTRIES : BAD_PATH;\n\t}\n}\n#endif\nOSErr getSpecAndFInfo(char *filename, int filenameSize,FSSpec *spec,FInfo *finderInfo) {\n    OSErr err;\n    \n    if ((err = makeFSSpec(filename, filenameSize,spec)) != noErr)\n        return err;\n        \n    if ((err= FSpGetFInfo(spec,finderInfo)) != noErr) \n        return err;\n        \n    return noErr;\n}\n\nint dir_SetMacFileTypeAndCreator(char *filename, int filenameSize, char *fType, char *fCreator) {\n\t/* Set the Macintosh type and creator of the given file. */\n\t/* Note: On other platforms, this is just a noop. */\n\n    FSSpec spec;\n    FInfo   finderInfo;\n    \n    if (getSpecAndFInfo(filename,filenameSize,&spec,&finderInfo) != noErr)\n        return false;\n       \n\tfinderInfo.fdType = *((int *) fType);\n\tfinderInfo.fdCreator = *((int *) fCreator);\n\t\n    return FSpSetFInfo(&spec,&finderInfo) == noErr;\n}\n\nint dir_GetMacFileTypeAndCreator(char *filename, int filenameSize, char *fType, char *fCreator) {\n\t/* Get the Macintosh type and creator of the given file. */\n\t/* Note: On other platforms, this is just a noop. */\n\n    FSSpec spec;\n    FInfo   finderInfo;\n    \n    if (getSpecAndFInfo(filename,filenameSize,&spec,&finderInfo) != noErr)\n        return false;\n       \n\t*((int *) fType) = finderInfo.fdType;\n\t*((int *) fCreator) = finderInfo.fdCreator;\n\n\treturn true;\n}\n\n\nint equalsLastPath(char *pathString, int pathStringLength) {\n\t/* Return true if the lastPath cache is valid and the\n\t   given Squeak string equals it. */\n\n\tint i, ch;\n\n\tif (!lastPathValid ||\n\t\t(pathStringLength > MAX_PATH)) {\n\t\t\treturn false;\n\t}\n\n\tfor (i = 0; i < pathStringLength; i++) {\n\t\tch = lastPath[i];\n\t\tif ((ch == 0) || (ch != pathString[i])) return false;\n\t}\n\treturn lastPath[i] == 0;\n}\n\n\n\n\nint recordPath(char *pathString, int pathStringLength, FSSpec *spec) {\n\t/* Copy the given Squeak string into the lastPath cache. */\n\n\tif (pathStringLength > MAX_PATH) {\n\t\tlastPath[0] = 0; /* set to empty string */\n\t\tlastPathValid = false;\n\t\tlastSpec = *spec;\n\t\treturn 0;\n\t}\n\tstrncpy(lastPath,pathString,pathStringLength);\n\tlastPath[pathStringLength] = 0; /* string terminator */\n\tlastPathValid = true;\n\tlastSpec = *spec;\n\treturn 0;\n}\n\n\n#if defined(__MWERKS__) \nint ftruncate(short int file,int offset)\n{\t\n\tParamBlockRec pb;\n    OSErr error;\n\n\t//JMM Foo FSSetForkSize FSSetForkPosition FSGetForkPosition\n\tpb.ioParam.ioRefNum = file;\n\tpb.ioParam.ioMisc = (char *) offset;\n\terror = PBSetEOFSync(&pb);\n\treturn error;\n}\n\n#endif\n\n#if defined(__MWERKS__) \n\n#include <ansi_files.h>\n#include <buffer_io.h>\n\nint fflush(FILE * file)\n{\n\tfpos_t\tposition;                    /* mm 970708 */\n\tParamBlockRec pb;\n    OSErr error;\n\t\n\tif (!file)\n\t\treturn(__flush_all());\n\t\n\tif (file->state.error || file->mode.file_kind == __closed_file)\n\t\treturn(EOF);\n\t\n\tif (file->mode.io_mode == __read)\t\t/* mm 980430 */\n\t\treturn 0;\t\t\t\t\t\t\t/* mm 980430 */\n\t\n\tif (file->state.io_state >= __rereading)\n\t\tfile->state.io_state = __reading;\n\t\n\tif (file->state.io_state == __reading)\n\t\tfile->buffer_len = 0;\n\t\n\tif (file->state.io_state != __writing)\n\t{\n\t\tfile->state.io_state = __neutral;  /* mm 970905 */\n\t\treturn(0);\n\t}\n\t\n#ifndef _No_Disk_File_OS_Support\n\tif (file->mode.file_kind != __disk_file || (position = ftello(file)) < 0)\n\t\tposition = 0;\n#else\n\tposition = 0;\n#endif\n\t\n\tif (__flush_buffer(file, NULL))\n\t{\n\t\tset_error(file);\n\t\treturn(EOF);\n\t}\n\t\n\tfile->state.io_state = __neutral;\n\tfile->position       = position;\n\tfile->buffer_len     = 0;\n\t\n\tpb.ioParam.ioRefNum = file->handle;\n    error = PBFlushFileSync(&pb);\n\terror = GetVRefNum(pb.ioParam.ioRefNum,&pb.volumeParam.ioVRefNum);\n\tpb.volumeParam.ioNamePtr = nil;\n\terror = PBFlushVolSync(&pb);\n\n\n\treturn(0);\n}\n\nextern __system7present();\nextern long __getcreator(long isbinary);\nextern long __gettype(long isbinary);\n\n\nstatic void set_file_type(FSSpec * spec, int binary_file)\n{\n\tCInfoPBRec\tpb;\n\tOSErr\t\t\t\tioResult;\n\t\n\tpb.hFileInfo.ioNamePtr   = spec->name;\n\tpb.hFileInfo.ioVRefNum   = spec->vRefNum;\n\tpb.hFileInfo.ioFDirIndex = 0;\n\tpb.hFileInfo.ioDirID     = spec->parID;\n\t\n\tif (!(ioResult = PBGetCatInfoSync(&pb)))\n\t{\n\t\tpb.hFileInfo.ioFlFndrInfo.fdType    = __gettype(binary_file);     /*mm-960729*/\n\t\tpb.hFileInfo.ioFlFndrInfo.fdCreator = __getcreator(binary_file);  /*mm-960729*/\n\t\tpb.hFileInfo.ioDirID                = spec->parID;\n\t\t\n\t\tioResult = PBSetCatInfoSync(&pb);\n\t}\n}\n\nint\t__open_file\t\t\t(const char * name, __std(__file_modes) mode, __std(__file_handle) * handle);\nOSErr __path2fss(const char * pathName, FSSpecPtr spec);\n\nextern OSErr\t\t\tgSqueakFileLastError; \nint\t__open_file(const char * name, __file_modes mode, __file_handle * handle)\n{\n\tFSSpec\t\t\t\t\tspec;\n\tOSErr\t\t\t\t\t\tioResult;\n\tHParamBlockRec\tpb;\n\t\n\tioResult = __path2fss(name, &spec);\n\t\n\tif (ioResult) \n\t\tgSqueakFileLastError = ioResult;\n\t\t\n\tif (__system7present())\t\t\t\t\t\t\t\t\t\t\t\t/* mm 980424 */\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* mm 980424 */\n\t\tBoolean targetIsFolder, wasAliased;\t\t\t\t\t\t\t\t/* mm 980424 */\n\t\tResolveAliasFile(&spec, true, &targetIsFolder, &wasAliased);\t/* mm 980424 */\n\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* mm 980424 */\n\t\n\tif (ioResult && (ioResult != fnfErr || mode.open_mode == __must_exist))\n\t\treturn(__io_error);\n\t\n\t\n#if TARGET_API_MAC_CARBON\n\tif (ioResult) {\n        CFStringRef \tfilePath;\n        CFURLRef \t    sillyThing, sillyThing2;\n        FSRef\t        parentFSRef;\n    \tshort int       fileRefNum;\n        OSErr           err;\n        UniChar         buffer[1024];\n        long            tokenLength;\n        \n\t\t\n        filePath   = CFStringCreateWithBytes(kCFAllocatorDefault,(UInt8 *)name,strlen(name),gCurrentVMEncoding,false);\n        if (filePath == nil) \n            return __io_error;\n        sillyThing = CFURLCreateWithFileSystemPath (kCFAllocatorDefault,filePath,kCFURLHFSPathStyle,false);\n        CFRelease(filePath);\n        sillyThing2 = CFURLCreateCopyDeletingLastPathComponent(kCFAllocatorDefault,sillyThing);\n        err = CFURLGetFSRef(sillyThing2,&parentFSRef);\n        if (err == 0) {\n            CFRelease(sillyThing);\n            CFRelease(sillyThing2);\n            return fnfErr;  \n        }\n        filePath = CFURLCopyLastPathComponent(sillyThing);\n        tokenLength = CFStringGetLength(filePath);\n        if (tokenLength > 1024) {\n            CFRelease(filePath);\n            CFRelease(sillyThing);\n            CFRelease(sillyThing2);\n            return(__io_error);\n        }\n            \n        CFStringGetCharacters(filePath,CFRangeMake(0,tokenLength),buffer);\n\n        CFRelease(filePath);\n        CFRelease(sillyThing);\n        CFRelease(sillyThing2);\n\n\t\tioResult = FSCreateFileUnicode(&parentFSRef,tokenLength,buffer,kFSCatInfoNone,NULL,NULL,&spec);  \n    \tif (ioResult)\n\t\t\tgSqueakFileLastError = ioResult;\n    \tif (ioResult)\n\t    \treturn(__io_error);\n\t    \t\n        pb.ioParam.ioNamePtr    = spec.name;\n    \tpb.ioParam.ioVRefNum    = spec.vRefNum;\n    \tpb.ioParam.ioPermssn    = (mode.io_mode == __read) ? fsRdPerm : fsRdWrPerm;\n    \tpb.ioParam.ioMisc       = 0;\n    \tpb.fileParam.ioFVersNum = 0;\n    \tpb.fileParam.ioDirID    = spec.parID;\n\t\tset_file_type(&spec, mode.binary_io);\n\t\tioResult = PBHOpenDFSync(&pb);  /* HH 10/25/97  was PBHOpenSync */\n    \t    \t\n    \tif (ioResult)\n    \t\treturn(__io_error);\n    \t\n    \t*handle = pb.ioParam.ioRefNum;\n\t\n\t    return(__no_io_error);\n\t}\n#endif\n    pb.ioParam.ioNamePtr    = spec.name;\n\tpb.ioParam.ioVRefNum    = spec.vRefNum;\n\tpb.ioParam.ioPermssn    = (mode.io_mode == __read) ? fsRdPerm : fsRdWrPerm;\n\tpb.ioParam.ioMisc       = 0;\n\tpb.fileParam.ioFVersNum = 0;\n\tpb.fileParam.ioDirID    = spec.parID;\n\t\n\tif (ioResult)\n\t{\n\t\tif (!(ioResult = PBHCreateSync(&pb)))\n\t\t{\n\t\t\tif (ioResult) \n\t\t\t\tgSqueakFileLastError = ioResult;\n\t\t\tset_file_type(&spec, mode.binary_io);\n\t\t\tioResult = PBHOpenDFSync(&pb);  /* HH 10/25/97  was PBHOpenSync */\n\t\t\tif (ioResult) \n\t\t\t\tgSqueakFileLastError = ioResult;\n\t\t}\n\t}\n\telse\n\t{\n\t\tif (!(ioResult = PBHOpenDFSync(&pb)) && mode.open_mode == __create_or_truncate)  \n\t\t                                  /* HH 10/25/97  was PBHOpenSync */\n\t\t{\n\t\t\tpb.ioParam.ioMisc = 0;\n\t\t\t\n\t\t\tioResult = PBSetEOFSync((ParmBlkPtr) &pb);\n\t\t\t\n\t\t\tif (ioResult)\n\t\t\t\tgSqueakFileLastError = ioResult;\n\n\t\t\tif (ioResult)\n\t\t\t\tPBCloseSync((ParmBlkPtr) &pb);\n\t\t} else {\n\t\t\tif (ioResult) \n\t\t\t\tgSqueakFileLastError = ioResult;\n\n\t\t}\n\t}\n\t\n\tif (ioResult)\n\t\treturn(__io_error);\n\t\n\t*handle = pb.ioParam.ioRefNum;\n\t\n\treturn(__no_io_error);\n}\n\n#endif"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FilePlugin/sqMacUnixFileInterface.c",
    "content": "/*\n *  sqMacUnixFileInterface.c\n *  SqueakVMUNIXPATHS\n *\n *  Created by John M McIntosh on 31/01/06.\n *  Copyright 2006 Corporate Smalltalk Consulting Ltd. All rights reserved, licensed under the Squeak-L license.\n *\n */\n\n#include <Carbon/Carbon.h>\n#include \"sqMacUnixFileInterface.h\"\n#include \"sqMacUIConstants.h\"\n#include \"sqUnixCharConv.h\"\n\n\textern CFStringEncoding gCurrentVMEncoding;\n\n/* sqUnixFile.c -- directory operations for Unix\n * \n *   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n */\n\n/* Author: Ian.Piumarta@INRIA.Fr\n * \n\n 3.8.15b3  Feb 19th, 2007 JMM fix bug with crash on bogus file path.\n 3.8.17b4  Apr 27th, 2007 JMM note from Tetsuya HAYASHI, tetha@st.rim.or.jp, tetha@mac.com\n\t\t\t\t\t\tI've found the latest mac vm (or recent version) fails to normalize UTF file name.\n\t\t\t\t\t\tIt seems to be the function convertChars() of sqMacUnixFileInterface.c, which normalizes only decompose when converting squeak string to unix, but I think it needs pre-combined when unix string to squeak, and I noticed normalization form should be canonical (exactly should be kCFStringNormalizationFormC) for pre-combined.\n\n */\n\n#include \"sq.h\"\n#include \"FilePlugin.h\"\n#include \"sqUnixCharConv.h\"\n#include \"sqMacEncoding.h\"\n#include \"sqMacTime.h\"\n#include \"sqMacImageIO.h\"\n\n#ifdef HAVE_DIRENT_H\n# include <dirent.h>\n# define NAMLEN(dirent) strlen((dirent)->d_name)\n#else\n# define dirent direct\n# define NAMLEN(dirent) (dirent)->d_namlen\n# ifdef HAVE_SYS_NDIR_H\n#  include <sys/ndir.h>\n# endif\n# ifdef HAVE_SYS_DIR_H\n#  include <sys/dir.h>\n# endif\n# ifdef HAVE_NDIR_H\n#  include <ndir.h>\n# endif\n#endif\n\n#ifdef HAVE_UNISTD_H\n# include <sys/types.h>\n# include <unistd.h>\n#endif\n\n#include <time.h>\n#include <errno.h>\n#include <string.h>\n#include <sys/param.h>\n#include <sys/stat.h>\n\n/***\n\tThe interface to the directory primitive is path based.\n\tThat is, the client supplies a Squeak string describing\n\tthe path to the directory on every call. To avoid traversing\n\tthis path on every call, a cache is maintained of the last\n\tpath seen, along with the Mac volume and folder reference\n\tnumbers corresponding to that path.\n***/\n\n/*** Constants ***/\n#define ENTRY_FOUND     0\n#define NO_MORE_ENTRIES 1\n#define BAD_PATH        2\n\n\n/*** Variables ***/\nstatic char lastPath[DOCUMENT_NAME_SIZE+1];\nstatic int  lastPathValid = false;\nstatic int  lastIndex= -1;\nstatic DIR *openDir= 0;\n\n\n/*** Functions ***/\n\nint convertChars(char *from, int fromLen, void *fromCode, char *to, int toLen, void *toCode, int norm, int term);\nsqInt\tioFilenamefromStringofLengthresolveAliasesRetry(char* dst, char* src, sqInt num, sqInt resolveAlias, Boolean retry);\nstatic CFURLRef makeFileSystemURLFromString(char *pathString,int length,CFStringEncoding encoding);\nstatic OSErr getFInfo(char *filename,FSCatalogInfo *catInfo,CFStringEncoding encoding);\nOSStatus SetVMPathFromApplicationDirectory();\n\nsqInt dir_Create(char *pathString, sqInt pathStringLength)\n{\n  /* Create a new directory with the given path. By default, this\n     directory is created relative to the cwd. */\n  char name[DOCUMENT_NAME_SIZE+1];\n  if (pathStringLength >= DOCUMENT_NAME_SIZE)\n    return false;\n  if (!ioFilenamefromStringofLengthresolveAliasesRetry(name,pathString, pathStringLength, false, true))\n     return false;\n  return mkdir(name, 0777) == 0;\t/* rwxrwxrwx & ~umask */\n}\n\n\nsqInt dir_Delete(char *pathString, sqInt pathStringLength)\n{\n  /* Delete the existing directory with the given path. */\n  char name[DOCUMENT_NAME_SIZE+1];\n  if (pathStringLength >= DOCUMENT_NAME_SIZE)\n    return false;\n  if (!ioFilenamefromStringofLengthresolveAliasesRetry(name,pathString, pathStringLength, false, true))\n    return false;\n  if (strcmp(lastPath, name) == 0)\n\t\tlastPath[0] = 0x00;\n\t\t\n  return rmdir(name) == 0;\n}\n\n\nsqInt dir_Delimitor(void)\n{\n  return DELIMITERInt;\n}\n\n\nstatic int maybeOpenDir(char *unixPath)\n{\n  /* if the last opendir was to the same directory, re-use the directory\n     pointer from last time.  Otherwise close the previous directory,\n     open the new one, and save its name.  Return true if the operation\n     was successful, false if not. */\n  if (!lastPathValid || strcmp(lastPath, unixPath))\n    {\n      /* invalidate the old, open the new */\n      if (lastPathValid)\n\tclosedir(openDir);\n      lastPathValid= false;\n      strcpy(lastPath, unixPath);\n      if ((openDir= opendir(unixPath)) == 0)\n\treturn false;\n      lastPathValid= true;\n      lastIndex= 0;\t/* first entry is index 1 */\n    }\n  return true;\n}\n\n\nsqInt dir_Lookup(char *pathString, sqInt pathStringLength, sqInt index,\n/* outputs: */  char *name, sqInt *nameLength, sqInt *creationDate, sqInt *modificationDate,\n\t\tsqInt *isDirectory, squeakFileOffsetType *sizeIfFile)\n{\n  /* Lookup the index-th entry of the directory with the given path, starting\n     at the root of the file system. Set the name, name length, creation date,\n     creation time, directory flag, and file size (if the entry is a file).\n     Return:\t0 \tif a entry is found at the given index\n     \t\t1\tif the directory has fewer than index entries\n\t\t2\tif the given path has bad syntax or does not reach a directory\n  */\n\n  int i;\n  int nameLen= 0;\n  struct dirent *dirEntry= 0;\n  char unixPath[DOCUMENT_NAME_SIZE+1];\n  struct stat statBuf;\n\n  /* default return values */\n  *name             = 0;\n  *nameLength       = 0;\n  *creationDate     = 0;\n  *modificationDate = 0;\n  *isDirectory      = false;\n  *sizeIfFile       = 0;\n\n  if ((pathStringLength == 0))\n    strcpy(unixPath, \".\");\n  else  {\n\tif (!ioFilenamefromStringofLengthresolveAliasesRetry(unixPath, pathString,pathStringLength, true, true))\n\t\treturn BAD_PATH;\n\t}\n\n  /* get file or directory info */\n  if (!maybeOpenDir(unixPath))\n    return BAD_PATH;\n\n  if (++lastIndex == index)\n    index= 1;\t\t/* fake that the dir is rewound and we want the first entry */\n  else\n    {\n      rewinddir(openDir);\t/* really rewind it, and read to the index */\n      lastIndex= index;\n    }\n\n  for (i= 0; i < index; i++)\n    {\n    nextEntry:\n      do\n\t{ \n\t  errno= 0; \n\t  dirEntry= readdir(openDir);\n\t}\n      while ((dirEntry == 0) && (errno == EINTR));\n\n      if (!dirEntry)\n\treturn NO_MORE_ENTRIES;\n      \n      nameLen= NAMLEN(dirEntry);\n\n      /* ignore '.' and '..' (these are not *guaranteed* to be first) */\n      if (nameLen < 3 && dirEntry->d_name[0] == '.')\n\tif (nameLen == 1 || dirEntry->d_name[1] == '.')\n\t  goto nextEntry;\n    }\n\n  *nameLength= ux2sqPath(dirEntry->d_name, nameLen, name, 256, 0);\n\n  {\n    char terminatedName[DOCUMENT_NAME_SIZE+1];\n    strncpy(terminatedName, dirEntry->d_name, nameLen);\n    terminatedName[nameLen]= '\\0';\n    strcat(unixPath, \"/\");\n    strcat(unixPath, terminatedName);\n    if (stat(unixPath, &statBuf) && lstat(unixPath, &statBuf))\n      {\n\t/* We can't stat the entry, but failing here would invalidate\n\t   the whole directory --bertf */\n\treturn ENTRY_FOUND;\n      }\n  }\n\n  /* last change time */\n  *creationDate= convertToSqueakTime(statBuf.st_ctime);\n  /* modification time */\n  *modificationDate= convertToSqueakTime(statBuf.st_mtime);\n\t{\n\t\tFSRef targetFSRef;\n\t\tBoolean\ttargetIsFolder,wasAliased;\n\t\tOSErr err;\n\t\t\n\t\terr = getFSRef(unixPath,&targetFSRef,kCFStringEncodingUTF8);\n\t\tif (!err) {\n\t\t\tFSResolveAliasFileWithMountFlags(&targetFSRef,true,&targetIsFolder,&wasAliased,kResolveAliasFileNoUI);\n\t\t\tif (wasAliased && targetIsFolder) {\n\t\t\t\t*isDirectory= true;\n\t\t\t\treturn ENTRY_FOUND;\n\t\t\t}\n\t\t}\n\t}\n  if (S_ISDIR(statBuf.st_mode))\n    *isDirectory= true;\n  else\n    *sizeIfFile= statBuf.st_size;\n\n  return ENTRY_FOUND;\n}\n\nsqInt dir_EntryLookup(char *pathString, sqInt pathStringLength, char* nameString, sqInt nameStringLength,\n/* outputs: */  char *name, sqInt *nameLength, sqInt *creationDate, sqInt *modificationDate,\n\t\tsqInt *isDirectory, squeakFileOffsetType *sizeIfFile)\n{\n  /* Lookup the given name in the given directory,\n     Set the name, name length, creation date,\n     creation time, directory flag, and file size (if the entry is a file).\n     Return:\t0 \tif a entry is found at the given index\n     \t\t1\tif there is no such entry in the directory\n\t\t2\tif the given path has bad syntax or does not reach a directory\n  */\n  \n  char unixPath[DOCUMENT_NAME_SIZE+1];\n  struct stat statBuf;\n\n  /* default return values */\n  *name             = 0;\n  *nameLength       = 0;\n  *creationDate     = 0;\n  *modificationDate = 0;\n  *isDirectory      = false;\n  *sizeIfFile       = 0;\n\n  if ((pathStringLength == 0))\n    strcpy(unixPath, \".\");\n  else  {\n\tif (!ioFilenamefromStringofLengthresolveAliasesRetry(unixPath, pathString,pathStringLength, true, true))\n\t\treturn BAD_PATH;\n\t}\n\n  char terminatedName[DOCUMENT_NAME_SIZE+1];\n  strncpy(terminatedName, nameString, nameStringLength);\n  terminatedName[nameStringLength]= '\\0';\n  strcat(unixPath, \"/\");\n  strcat(unixPath, terminatedName);\n  if (stat(unixPath, &statBuf) && lstat(unixPath, &statBuf)) {\n\treturn NO_MORE_ENTRIES;\n  }\n\n  /* To match the results of dir_Lookup, copy back the file name */\n  *nameLength = ux2sqPath(nameString, nameStringLength, name, 256, 0);\n\n  /* last change time */\n  *creationDate= convertToSqueakTime(statBuf.st_ctime);\n  /* modification time */\n  *modificationDate= convertToSqueakTime(statBuf.st_mtime);\n\t{\n\t\tFSRef targetFSRef;\n\t\tBoolean\ttargetIsFolder,wasAliased;\n\t\tOSErr err;\n\t\terr = getFSRef(unixPath,&targetFSRef,kCFStringEncodingUTF8);\n\t\tif (!err) {\n\t\t\tFSResolveAliasFileWithMountFlags(&targetFSRef,true,&targetIsFolder,&wasAliased,kResolveAliasFileNoUI);\n\t\t\tif (wasAliased && targetIsFolder) {\n\t\t\t\t*isDirectory= true;\n\t\t\t\treturn ENTRY_FOUND;\n\t\t\t}\n\t\t}\n\t}\n  if (S_ISDIR(statBuf.st_mode))\n    *isDirectory= true;\n  else\n    *sizeIfFile= statBuf.st_size;\n\n  return ENTRY_FOUND;\n}\n\n\nint wanderDownPath(char *src,int bytes,char *possiblePath, Boolean resolveLastAlias);\n\nsqInt sqGetFilenameFromString(char * aCharBuffer, char * aFilenameString, sqInt filenameLength, sqInt aBoolean){\n\tioFilenamefromStringofLengthresolveAliasesRetry(aCharBuffer,(char *) aFilenameString, filenameLength, aBoolean, true);\n\treturn 0;\n}\n\nvoid\t\tsqFilenameFromStringOpen(char *buffer,sqInt fileIndex, long fileLength) {\n\tioFilenamefromStringofLengthresolveAliasesRetry(buffer,(char *) fileIndex, fileLength, true, true);\n}\n\nvoid\t\tsqFilenameFromString(char *buffer,sqInt fileIndex, long fileLength) {\n\tioFilenamefromStringofLengthresolveAliasesRetry(buffer,(char *) fileIndex, fileLength, false, true);\n}\n\nsqInt\tioFilenamefromStringofLengthresolveAliasesRetry(char* dst, char* src, sqInt num, sqInt resolveAlias, Boolean retry) {\n int\t\tbytes;\n FSRef targetFSRef;\n OSStatus err; \n \n if (retry)\n\tbytes = sq2uxPath(src, num, dst, DOCUMENT_NAME_SIZE, 1);\n else {\n\tmemcpy(dst,src,num);\n\tdst[num] = 0x00;\n\tbytes = num;\n }\n  \t\t\n err = getFSRef(dst,&targetFSRef,kCFStringEncodingUTF8); \n if (retry) {\n\tif (err) {\n\t\tchar possiblePath[DOCUMENT_NAME_SIZE+1];\n\t\t\n\t\tbytes = wanderDownPath(dst,bytes,possiblePath,resolveAlias);\n\t\tif (bytes) \n\t\t\tstrcpy(dst,possiblePath);\n\t\treturn bytes;\n\t}\n }\n\n  if (err == 0 && resolveAlias) {\n\t\tBoolean\ttargetIsFolder,wasAliased;\n\t\terr = FSResolveAliasFileWithMountFlags(&targetFSRef,true,&targetIsFolder,&wasAliased,kResolveAliasFileNoUI);\n\t\tif (err || wasAliased == false)\n\t\t\treturn bytes; \n\t\tPathToFileViaFSRef(dst, DOCUMENT_NAME_SIZE, &targetFSRef,kCFStringEncodingUTF8);\n\t\tbytes = strlen(dst);\n\t }\n  \n return bytes;\n}\n\nstatic CFURLRef makeFileSystemURLFromString(char *pathString,int length, CFStringEncoding encoding) {\n    CFStringRef tmpStrRef;\n \tCFMutableStringRef filePath;\n    CFURLRef    sillyThing;\n\t\n\ttmpStrRef = CFStringCreateWithBytes(kCFAllocatorDefault,(UInt8 *) pathString,\n\t\t\t\t\t\t\t\t\t\tlength, encoding, true);\n    if (tmpStrRef == nil)\n        return null;\n\tfilePath = CFStringCreateMutableCopy(NULL, 0, tmpStrRef);\n\tCFRelease(tmpStrRef);\n\tif (encoding == kCFStringEncodingUTF8) \n\t\tCFStringNormalize(filePath, kCFStringNormalizationFormD); \n    sillyThing = CFURLCreateWithFileSystemPath (kCFAllocatorDefault,filePath,kCFURLPOSIXPathStyle,false);\n\tCFRelease(filePath);\n\treturn sillyThing;\n}\n\nOSErr getFSRef(char *pathString,FSRef *theFSRef,CFStringEncoding encoding)\n{\t\n    CFURLRef sillyThing;\n\n\tsillyThing = makeFileSystemURLFromString(pathString,strlen(pathString),encoding);\n\tif (sillyThing == NULL) {\n\t\treturn -2000;\n\t}\n\t\n    if (CFURLGetFSRef(sillyThing,theFSRef) == false) {\t\t\n        CFRelease(sillyThing);\n        return -3000;\n\t} \n            \n\tCFRelease(sillyThing);\n    return 0;\n}\n\n/* Returns in gCurrentVMEncoding */\n\nint getLastPathComponentInCurrentEncoding(char *pathString,char * lastPathPart,CFStringEncoding encoding) {\n    CFURLRef    sillyThing;\n    CFStringRef tmpStrRef;\n\n\tsillyThing = makeFileSystemURLFromString(pathString,strlen(pathString),encoding);\n\tif (sillyThing == NULL) \n\t\treturn -2000;\n\ttmpStrRef = CFURLCopyLastPathComponent(sillyThing);\n    CFRelease(sillyThing);\n\tCFMutableStringRef mutableStr= CFStringCreateMutableCopy(NULL, 0, tmpStrRef);\n\tCFRelease(tmpStrRef);\n\t// HFS+ imposes Unicode2.1 decomposed UTF-8 encoding on all path elements\n\tif (gCurrentVMEncoding == kCFStringEncodingUTF8) \n\t\tCFStringNormalize(mutableStr, kCFStringNormalizationFormC); // pre-combined\n  \n\tCFStringGetCString (mutableStr, lastPathPart,256, gCurrentVMEncoding);\n\tCFRelease(mutableStr);\n\treturn 0;\n}\n\n\n\nvoid PathToFileViaFSRef(char *pathName, int pathNameMax, FSRef *theFSRef,CFStringEncoding encoding) {        \n        CFURLRef sillyThing;\n        CFStringRef filePath;\n        Boolean isDirectory;\n\t\t\n\t\tpathName[0]=  0x00;\n        sillyThing =  CFURLCreateFromFSRef (kCFAllocatorDefault, theFSRef);\n\t\tif (sillyThing == NULL)\n\t\t\treturn;\n        isDirectory = CFURLHasDirectoryPath(sillyThing);\n        \n        filePath = CFURLCopyFileSystemPath (sillyThing, kCFURLPOSIXPathStyle);\n        CFRelease(sillyThing);\n        \n  \t\tCFMutableStringRef mutableStr= CFStringCreateMutableCopy(NULL, 0, filePath);\n          CFRelease(filePath);\n  \n  \t\t// HFS+ imposes Unicode2.1 decomposed UTF-8 encoding on all path elements\n  \t\tif (encoding == kCFStringEncodingUTF8) \n  \t\t\tCFStringNormalize(mutableStr, kCFStringNormalizationFormC); // pre-combined\n  \n          CFStringGetCString (mutableStr, pathName,pathNameMax, encoding);\n\t\t\tCFRelease(mutableStr);\n        \n        if (isDirectory)\n            strcat(pathName,\"/\");\n}\n\n\nstatic OSErr getFInfo(char *filename,FSCatalogInfo *catInfo,CFStringEncoding encoding) {\n   FSRef\ttheFSRef;\n   OSErr\terr;\n   \n\terr =  getFSRef(filename,&theFSRef,encoding);\n\tif (err != 0)\n\t\treturn err;\n    err = FSGetCatalogInfo (&theFSRef,kFSCatInfoFinderInfo,catInfo,nil,nil,nil);\n    return noErr;\n}\n\nOSErr getFInfoViaFSRef(FSRef *theFSRef,\tFInfo *finderInfo) {\n   OSErr\terr;\n\tFSCatalogInfo catInfo;\n\t\n\terr = FSGetCatalogInfo (theFSRef,kFSCatInfoFinderInfo,&catInfo,nil,nil,nil);\n\tmemcpy(finderInfo,&catInfo.finderInfo,sizeof(FInfo));\t\n\treturn err;\n\t\n}\nint dir_SetMacFileTypeAndCreator(char *filename, sqInt filenameSize, char *fType, char *fCreator) {\n\t/* Set the Macintosh type and creator of the given file. */\n\t/* Note: On other platforms, this is just a noop. */\n\n    FSCatalogInfo catInfo;\n\tFInfo\tfinderInfo;\n    OSErr\terr;\n    FSRef\ttheFSRef;\n\tchar\tfileNameBuffer[DOCUMENT_NAME_SIZE+1];\n\tint\t\tbytes;\n\t\n \tbytes = ioFilenamefromStringofLengthresolveAliasesRetry(fileNameBuffer,filename, filenameSize, true, true);\n\tif (bytes == 0) \n\t\treturn false;\n    if (getFInfo(fileNameBuffer,&catInfo,kCFStringEncodingUTF8) != noErr)\n        return false;\n\tmemcpy(&finderInfo,&catInfo.finderInfo,16);\n\tfinderInfo.fdType = CFSwapInt32HostToBig(*((int *) fType));\n\tfinderInfo.fdCreator = CFSwapInt32HostToBig(*((int *) fCreator));\n\tmemcpy(&catInfo.finderInfo,&finderInfo,16);\n\t\n\terr =  getFSRef(fileNameBuffer,&theFSRef,kCFStringEncodingUTF8);\n\tif (err != 0)\n\t\treturn err;\n   err = FSSetCatalogInfo (&theFSRef,kFSCatInfoFinderInfo,&catInfo);\n\n    return true;\n}\n\nint dir_GetMacFileTypeAndCreator(char *filename, sqInt filenameSize, char *fType, char *fCreator) {\n\t/* Get the Macintosh type and creator of the given file. */\n\t/* Note: On other platforms, this is just a noop. */\n\n    FSCatalogInfo catInfo;\n\tFInfo\tfinderInfo;\n\tchar\tfileNameBuffer[DOCUMENT_NAME_SIZE+1];\n\tint\t\tbytes;\n\t\n \tbytes = ioFilenamefromStringofLengthresolveAliasesRetry(fileNameBuffer,filename, filenameSize, true, true);\n\tif (bytes == 0) \n\t\treturn false;\n    \n    if (getFInfo(fileNameBuffer,&catInfo,kCFStringEncodingUTF8) != noErr)\n        return false;\n\t\t\n\tmemcpy(&finderInfo,&catInfo.finderInfo,16);\n\t*((int *) fType) = CFSwapInt32BigToHost(finderInfo.fdType);\n\t*((int *) fCreator) = CFSwapInt32BigToHost(finderInfo.fdCreator);\n\n\treturn true;\n}\n\nOSStatus SetVMPathFromApplicationDirectory() {\n\tCFBundleRef mainBundle;\n\tCFURLRef\tbundleURL,bundleURLPrefix;\n\tCFStringRef filePath;\n\n\tCFMutableStringRef vmPathString;\n\tmainBundle = CFBundleGetMainBundle();   \n\tbundleURL = CFBundleCopyBundleURL(mainBundle);\n\tbundleURLPrefix = CFURLCreateCopyDeletingLastPathComponent(NULL,bundleURL);\n\tCFRelease(bundleURL);\t\n\tfilePath = CFURLCopyFileSystemPath (bundleURLPrefix, kCFURLPOSIXPathStyle);\n\tCFRelease(bundleURLPrefix);\t\n\tvmPathString = CFStringCreateMutableCopy(NULL, 0, filePath);\n\tCFStringAppendCString(vmPathString, \"/\", kCFStringEncodingMacRoman);\n\tSetVMPathFromCFString(vmPathString);\n\tCFRelease(filePath);\n\tCFRelease(vmPathString);\n\t\n\treturn 0;\t\t\n}\n\npascal Boolean findImageFilterProc(AEDesc* theItem, void* info, \n                            NavCallBackUserData callBackUD,\n                            NavFilterModes filterMode);\n\t\t\t\t\t\t\t\nOSErr squeakFindImage(char* pathName)\n{\n    NavDialogCreationOptions    dialogOptions;\n    NavObjectFilterUPP  filterProc =  NewNavObjectFilterUPP(findImageFilterProc);\n    OSErr               anErr = noErr;\n    NavDialogRef\t\tnavDialog;\n\tFSRef fileAsFSRef;\n\t\n    //  Specify default options for dialog box\n    anErr = NavGetDefaultDialogCreationOptions(&dialogOptions);\n    if (anErr != noErr)\n\t\treturn anErr;\n\t\t\n\n\t//  Adjust the options to fit our needs\n\t//  Set default location option\n\tdialogOptions.optionFlags |= kNavSelectDefaultLocation;\n\tdialogOptions.optionFlags  |= kNavAllFilesInPopup;\n\tdialogOptions.optionFlags  |= kNavSelectAllReadableItem;\n\t//  Clear preview option\n\tdialogOptions.optionFlags  ^= kNavAllowPreviews;\n\t\n\t\t\t\t\n\t// Call NavGetFile() with specified options and\n\t// declare our app-defined functions and type list\n\tNavCreateChooseFileDialog (\n\t\t\t&dialogOptions,\n\t\t\tnil,\n\t\t\tnil,\n\t\t\tnil,\n\t\t\tfilterProc,\n\t\t\tnil,\n\t\t\t&navDialog);\n\tanErr = NavDialogRun (navDialog);\n\tif (anErr != noErr )\n\t\treturn anErr;\n\t\t\n\tNavReplyRecord outReply;\n\tanErr = NavDialogGetReply (navDialog,&outReply);\n\t\n    DisposeNavObjectFilterUPP(filterProc);\n\tNavDialogDispose(navDialog);\t\n\t\t\n\tif (anErr != noErr)\n\t\treturn anErr;\n\t\t\n\tif (!outReply.validRecord) {\n\t\tanErr = NavDisposeReply(&outReply);\n\t\treturn -1;\n\t}\n\n\t// Get the file\n\tanErr = AEGetNthPtr(&(outReply.selection), 1, typeFSRef, NULL, NULL, &fileAsFSRef, sizeof(FSRef), NULL);\n\tPathToFileViaFSRef(pathName,DOCUMENT_NAME_SIZE, &fileAsFSRef, gCurrentVMEncoding);\n\n\t//  Dispose of NavReplyRecord, resources, descriptors\n\tanErr = NavDisposeReply(&outReply);\n\n    return 0;\n}\n\n\npascal Boolean findImageFilterProc(AEDesc* theItem, void* info, \n                            NavCallBackUserData callBackUD,\n                            NavFilterModes filterMode)\n{\n#pragma unused(filterMode,callBackUD)\n    NavFileOrFolderInfo* theInfo = (NavFileOrFolderInfo*)info;\n    \n    if (theItem->descriptorType == typeFSRef) {\n        char checkSuffix[256],pathName[1024];\n        OSErr \terror;\n        Boolean check;\n\t\tFSRef theFSRef;\n\t\t\n        if (theInfo->isFolder)\n            return true;\n            \n        if (theInfo->fileAndFolder.fileInfo.finderInfo.fdType == 'STim')\n            return true;\n            \n        error = AEGetDescData(theItem,&theFSRef,sizeof(FSRef));\n\t\tif (error != noErr) \n            return true;\n\t\tPathToFileViaFSRef(pathName, 1024, &theFSRef,kCFStringEncodingUTF8);\n\t\tgetLastPathComponentInCurrentEncoding(pathName,checkSuffix,kCFStringEncodingUTF8);        \n        check = IsImageName(checkSuffix);\n\n        if (check) \n            return true;\n        else {\n           return false;\n\t\t}\n    }\n    return true;\n}\n\nint wanderDownPath(char *src,int bytes,char *parts,Boolean resolveLastAlias) {\n\tchar tokens[DOCUMENT_NAME_SIZE+1],results[DOCUMENT_NAME_SIZE+1];\n\tBoolean firstTime =  true;\n\tchar *token,*nexttoken;\n\tint\ttokenLength,numberOfBytes;\n\t\n\tparts[0] = 0x00;\n\tmemcpy(tokens,src,bytes);\n\ttokens[bytes] = 0x00;\n\ttoken = strtok((char*) tokens,\"/\");\n    if (token == 0) \n\t\treturn 0;\n    while (token)  {\n        tokenLength = strlen(token);\n        if (firstTime) {\n            firstTime = false;\n\t\t\tstrcat(parts,\"/\");\n\t\t\tstrcat(parts,token);\n\t\t\tnumberOfBytes = ioFilenamefromStringofLengthresolveAliasesRetry(results, parts, strlen(parts), true, false);\n\t\t\tstrcat(parts,\"/\");\n\t\t\tif (numberOfBytes) {\n\t\t\t\tstrcpy(parts,results);\n\t\t\t} else {\n\t\t\t\tstrcpy(parts,token);\n\t\t\t}\n\t\t\ttoken = strtok(nil,\"/\"); \n         } else {\n\t\t\tif (parts[strlen(parts)-1] != '/')\n\t\t\t\tstrcat(parts,\"/\");\n\t\t\tstrcat(parts,token);\n\t\t\tnexttoken = strtok(nil,\"/\"); \n\t\t\tif (nexttoken == nil) \n\t\t\t\tnumberOfBytes = ioFilenamefromStringofLengthresolveAliasesRetry(results, parts, strlen(parts), resolveLastAlias, false);\n\t\t\telse\n\t\t\t\tnumberOfBytes = ioFilenamefromStringofLengthresolveAliasesRetry(results, parts, strlen(parts), true, false);\n\t\t\tif (numberOfBytes) \n\t\t\t\tstrcpy(parts,results);\n\t\t\telse \n\t\t\t\tstrcpy(parts,token);\n\t\t\ttoken = nexttoken;\n         }\n    }\n\treturn strlen(parts);\n}\n\n  int sq2uxPath(char *from, int fromLen, char *to, int toLen, int term)\t\n  {\t\t\t\n\tCFStringEncoding unixEncoding = kCFStringEncodingUTF8;\n    int n= convertChars(from, fromLen, (char *) gCurrentVMEncoding, to, toLen,(char *)  unixEncoding, true, term);\t\t\n    return n;\t\t\t\t\t\t\t\t\t\n  }\n\n  int ux2sqPath(char *from, int fromLen, char *to, int toLen, int term)\t\n  {\t\t\t\t\t\t\t\t\t\t\n\tCFStringEncoding unixEncoding = kCFStringEncodingUTF8;\n    int n= convertChars(from, fromLen,(char *)  unixEncoding, to, toLen, (char *) gCurrentVMEncoding, false, term);\t\t\n    return n;\t\t\t\t\t\t\t\t\t\n  }\n\n#define min(X, Y) (  ((X)>(Y)) ? (Y) : (X) )\n\nstatic int convertCopy(char *from, int fromLen, char *to, int toLen, int term)\n{\n  int len= min(toLen - term, fromLen);\n  strncpy(to, from, len);\n  if (term) to[len]= '\\0';\n  return len;\n}\n\nint convertChars(char *from, int fromLen, void *fromCode, char *to, int toLen, void *toCode, int norm, int term)\n{\n  CFStringRef\t     cfs= CFStringCreateWithBytes(NULL, (UInt8 *) from, fromLen, (CFStringEncoding)fromCode, 0);\n  if (cfs == NULL) {\n      toLen = 0;\n\t  to[toLen]= '\\0';\n\t  return toLen;\n\t}\n\t\n  CFMutableStringRef str= CFStringCreateMutableCopy(NULL, 0, cfs);\n  CFRelease(cfs);\n  if (norm) // HFS+ imposes Unicode2.1 decomposed UTF-8 encoding on all path elements\n    CFStringNormalize(str, kCFStringNormalizationFormD); // canonical decomposition\n  else\n    CFStringNormalize(str, kCFStringNormalizationFormC); // pre-combined\n  {\n    CFRange rng= CFRangeMake(0, CFStringGetLength(str));\n    CFIndex len= 0;\n    CFIndex num= CFStringGetBytes(str, rng, (CFStringEncoding)toCode, '?', 0, (UInt8 *)to, toLen - term, &len);\n    CFRelease(str);\n    if (!num)\n      return convertCopy(from, fromLen, to, toLen, term);\n    if (term)\n      to[len]= '\\0';\n    return len;\n  }\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FilePlugin/sqMacUnixFileInterface.h",
    "content": "/*\n *  sqMacUnixFileInterface.h\n *  SqueakVMUNIXPATHS\n *\n *  Created by John M McIntosh on 31/01/06.\n *  Copyright 2006 Corporate Smalltalk Consulting Ltd. All rights reserved, released under the Squeak-L license.\n *\n */\n#include \"sqMacUIConstants.h\"\n\nOSStatus SetVMPathFromApplicationDirectory(void);\nint getLastPathComponentInCurrentEncoding(char *pathString,char * lastPathPart,CFStringEncoding encoding);\nextern UInt32 gCurrentVMEncoding;\nOSErr squeakFindImage(char *pathName);\nOSErr getFSRef(char *pathString,FSRef *theFSRef,CFStringEncoding encoding);\nvoid PathToFileViaFSRef(char *pathName, int pathNameMax, FSRef *theFSRef,CFStringEncoding encoding);\nOSErr getFInfoViaFSRef(FSRef *theFSRef,\tFInfo *finderInfo);"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/FloatMathPlugin/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>FloatMathPlugin</string>\n\t<key>CFBundleIconFile</key>\n\t<string>SqueakPlugin.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.FloatMathPlugin</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0.1b4</string>\n\t<key>CFBundleSignature</key>\n\t<string>FAST</string>\n\t<key>CFBundleVersion</key>\n\t<string>1.0.1b4</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/HostWindowPlugin/sqMacHostWindow.c",
    "content": "/*\n *  sqMacHostWindow.c\n *  SqueakVMForCarbon\n *\n *  Created by John M McIntosh on Tue Jul 20 2004.\n *\n\tJuly 15th 2005 add logic to flush QD buffers for os-x 10.4\n\t 3.8.15b3  Feb 19th, 2007 JMM add cursor set logic\n\t4.1.0b2  set window title via cfstring\n */\n\n#include \"sqVirtualMachine.h\"\n#include \"sqMacHostWindow.h\"\n#include \"sqMacWindow.h\"\n\nextern struct VirtualMachine *interpreterProxy;\nint RemoveWindowBlock(windowDescriptorBlock * thisWindow);\n\nint createWindowWidthheightoriginXyattrlength(int w,int h,int x,int y,  char * list, int listLength) {\n\tint index;\n\tlong windowClass,windowAttributes;\n\tWindowPtr window;\n\twindowDescriptorBlock *windowBlock;\n\tif (listLength != 8) return -1;\n\t\n\tmemmove(&windowClass, list, 4);\n\tmemmove(&windowAttributes, list+4, 4);\n\n\twindow = SetUpWindow(y,x,y+h,x+w,windowClass,windowAttributes);\n\tif (window == 0) return -1;\n\t\n\twindowBlock = AddWindowBlock();\n\twindowBlock->handle = (wHandleType) window;\n\t\n\tindex = windowBlock->windowIndex;\n\twindowBlock->isInvisible = !MacIsWindowVisible(window);\n\tSetUpCarbonEventForWindowIndex(index);\n\tQDBeginCGContext(GetWindowPort(windowBlock->handle),&windowBlock->context); \n//\tCreateCGContextForPort(GetWindowPort(windowBlock->handle),&windowBlock->context); \n\twindowBlock->width = w;\n\twindowBlock->height = h; \n\t\n\tsqShowWindow(index);\n\treturn index;\n}\n\nvoid setWindowTrackingRgn(int windowIndex) {\n\t\t\n\tRect rgnRect;\n\tRgnHandle rgn = NewRgn();\n\tMouseTrackingRegionID id;\n\twindowDescriptorBlock *windowBlock = windowBlockFromIndex(windowIndex);\n\t\n\tif (!windowBlock) \n\t\treturn;\n\t\t\n\tif (windowBlock->windowTrackingRef) {\n\t\tGetWindowBounds(windowBlock->handle, kWindowContentRgn, &rgnRect);\t\n\t\tSetRectRgn( rgn, rgnRect.left, rgnRect.top, rgnRect.right, rgnRect.bottom );\n\t\tChangeMouseTrackingRegion(windowBlock->windowTrackingRef,rgn, NULL);\n\t\tDisposeRgn( rgn );\t\n\t\treturn;\n\t}\n\n\tGetWindowBounds(windowBlock->handle, kWindowContentRgn, &rgnRect);\t\n\tSetRectRgn( rgn, rgnRect.left, rgnRect.top, rgnRect.right, rgnRect.bottom );\n\t\t\n\tid.signature = 'FAST';\n\tid.id = windowIndex;\n\t\t\n\tOSStatus err = CreateMouseTrackingRegion(windowBlock->handle, rgn, NULL, kMouseTrackingOptionsGlobalClip,\n\t\t\t\t\t\tid, NULL, NULL, &windowBlock->windowTrackingRef);\n\tif ( noErr == err ) {\n\t\tRetainMouseTrackingRegion( windowBlock->windowTrackingRef);\n\t\terr = SetMouseTrackingRegionEnabled( windowBlock->windowTrackingRef, TRUE );\n\t}\n\t\t\n\tDisposeRgn( rgn );\t\n}\n\n\nint closeWindow(int windowIndex) {\n\twHandleType\twindowHandle;\n\twindowHandle = windowHandleFromIndex(windowIndex);\n\tif(windowHandle == NULL) \n\t\treturn 0;\n\tif (windowBlockFromIndex(windowIndex)->context)\n\t\tQDEndCGContext(GetWindowPort(windowBlockFromIndex(windowIndex)->handle),&windowBlockFromIndex(windowIndex)->context);\n\t\t//CGContextRelease(windowBlockFromIndex(windowIndex)->context);\n\t\n\n\tif (windowBlockFromIndex(windowIndex)->windowTrackingRef) {\n\t\tReleaseMouseTrackingRegion(windowBlockFromIndex(windowIndex)->windowTrackingRef );\n\t\twindowBlockFromIndex(windowIndex)->windowTrackingRef = NULL;\n\t}\n\n\twindowBlockFromIndex(windowIndex)->context = NULL;\n\tRemoveWindowBlock(windowBlockFromIndex(windowIndex));\t\n\tDisposeWindow(windowHandle);\n\treturn 1;\n}\n\nint ioPositionOfWindow(wIndexType windowIndex)\n{\n\tRect portRect;\n\tif (windowHandleFromIndex(windowIndex) == nil)\n\t\treturn -1;\n\t\t\n\tGetPortBounds(GetWindowPort(windowHandleFromIndex(windowIndex)),&portRect);\n \tQDLocalToGlobalRect(GetWindowPort(windowHandleFromIndex(windowIndex)), &portRect);\n\treturn (portRect.left << 16) | (portRect.top & 0xFFFF);  /* left is high 16 bits; top is low 16 bits */\n}\n\nint ioPositionOfWindowSetxy(wIndexType windowIndex, int x, int y)\n{\n\tvoid *giLocker;\n\tint return_value=0;\n\tif (windowHandleFromIndex(windowIndex) == nil)\n\t\treturn -1;\n\n\tgiLocker = interpreterProxy->ioLoadFunctionFrom(\"getUIToLock\", \"\");\n\tif (giLocker != 0) {\n\t\tsqInt *foo;\n\t\tfoo = malloc(sizeof(sqInt)*7);\n\t\tfoo[0] = 4;\n\t\tfoo[1] = (sqInt) MoveWindow;\n\t\tfoo[2] = (sqInt) windowHandleFromIndex(windowIndex);\n\t\tfoo[3] = x;\n\t\tfoo[4] = y;\n\t\tfoo[5] = true;\n\t\tfoo[6] = 0;\n\t\t((sqInt (*) (void *)) giLocker)(foo);\n\t\treturn_value = interpreterProxy->positive32BitIntegerFor(foo[6]);\n\t\tfree(foo);\n\t}\n\treturn ioPositionOfWindow(windowIndex);\n}\n\nint ioSizeOfWindow(wIndexType windowIndex)\n{\n\tRect portRect;\n\tint w, h;\n\n\tif (windowHandleFromIndex(windowIndex) == nil)\n\t\treturn -1;\n\n\n\tGetPortBounds(GetWindowPort(windowHandleFromIndex(windowIndex)),&portRect);\n\tw =  portRect.right -  portRect.left;\n\th =  portRect.bottom - portRect.top;\n\treturn (w << 16) | (h & 0xFFFF);  /* w is high 16 bits; h is low 16 bits */\n}\n\nint ioSizeOfWindowSetxy(wIndexType windowIndex, int x, int y)\n{\n\tvoid * giLocker;\n\tint return_value=0;\n\tif (windowHandleFromIndex(windowIndex) == nil)\n\t\treturn -1;\n\tgiLocker = interpreterProxy->ioLoadFunctionFrom(\"getUIToLock\", \"\");\n\tif (giLocker != 0) {\n\t\tsqInt *foo;\n\t\tfoo = malloc(sizeof(sqInt)*7);\n\t\tfoo[0] = 4;\n\t\tfoo[1] = (sqInt) SizeWindow;\n\t\tfoo[2] = (sqInt) windowHandleFromIndex(windowIndex);\n\t\tfoo[3] = x;\n\t\tfoo[4] = y;\n\t\tfoo[5] = true;\n\t\tfoo[6] = 0;\n\t\t((sqInt (*) (void *)) giLocker)(foo);\n\t\treturn_value = interpreterProxy->positive32BitIntegerFor(foo[6]);\n\t\tfree(foo);\n\t}\n\tsetWindowTrackingRgn(windowIndex);\n\treturn ioSizeOfWindow(windowIndex);\n}\n\nint ioSetTitleOfWindow(int windowIndex, char * newTitle, int sizeOfTitle) {\n\tchar string[256];\n\tif (sizeOfTitle > 255) \n\t\treturn -1;\n\n\tmemcpy(string,newTitle,sizeOfTitle);\n\tstring[sizeOfTitle] = 0x00;\n\t\n\tCFStringRef windowTitleCFString = CFStringCreateWithCString (nil,string,kCFStringEncodingUTF8);\n\n\tSetWindowTitleWithCFString (windowHandleFromIndex(windowIndex),windowTitleCFString);\n\t\n\tCFRelease(windowTitleCFString);\n\treturn 1;\n}\n\nint ioCloseAllWindows(void) {\n\treturn 1;\n}\n\n\n\n/* addendum to sqPlatformSpecific.h */\n/* multiple host windows stuff */\n\nstatic windowDescriptorBlock *windowListRoot = NULL;\n\n/* end addendum to sqPlatformSpecific.h */\n\n/* simple linked list management code */\n/* window list management */\n\nwindowDescriptorBlock *windowBlockFromIndex(int windowIndex) {\nwindowDescriptorBlock *entry;\n\tentry = windowListRoot;\n\twhile(entry) {\n\t\tif(entry->windowIndex == windowIndex) return entry;\n\t\tentry = entry->next;\n\t}\n\treturn NULL;\n}\n\nwindowDescriptorBlock *windowBlockFromHandle(wHandleType windowHandle) {\nwindowDescriptorBlock *entry;\n\tentry = windowListRoot;\n\twhile(entry) {\n\t\tif(entry->handle == windowHandle) return entry;\n\t\tentry = entry->next;\n\t}\n\treturn NULL;\n}\n\n\nwHandleType windowHandleFromIndex(int windowIndex)  {\nwindowDescriptorBlock *entry;\n\tentry = windowListRoot;\n\twhile(entry) {\n\t\tif(entry->windowIndex == windowIndex) return entry->handle;\n\t\tentry = entry->next;\n\t}\n\treturn NULL;\n}\n\nint windowIndexFromHandle(wHandleType windowHandle) {\nwindowDescriptorBlock *entry;\n\tentry = windowListRoot;\n\twhile(entry) {\n\t\tif(entry->handle == windowHandle) return entry->windowIndex;\n\t\tentry = entry->next;\n\t}\n\treturn 0;\n}\n\nint windowIndexFromBlock( windowDescriptorBlock * thisWindow) {\nwindowDescriptorBlock *entry;\n\tentry = windowListRoot;\n\twhile(entry) {\n\t\tif(entry == thisWindow) return entry->windowIndex;\n\t\tentry = entry->next;\n\t}\n\treturn 0;\n}\n\nstatic int nextIndex = 1; \n\nwindowDescriptorBlock *AddWindowBlock(void) {\n/* create a new entry in the linkedlist of windows.\n * If the calloc fails, return NULL which will then go back to the\n * prim and fail it cleanly.\n * Initialize the block to a sensible state\n */\nwindowDescriptorBlock *thisWindow;\n\n\tthisWindow = (windowDescriptorBlock*) calloc(1, sizeof(windowDescriptorBlock));\n\tif ( thisWindow == NULL) {\n\t\treturn NULL;\n\t}\n\tthisWindow->next = windowListRoot;\n\tthisWindow->windowIndex = nextIndex++;\n\tthisWindow->handle = NULL;\n\twindowListRoot = thisWindow;\n\n\treturn windowListRoot;\n}\n\n/*\n * RemoveWindowBlock:\n * Remove the given entry from the list of windows.\n * free it, if found.\n */\n int RemoveWindowBlock(windowDescriptorBlock * thisWindow) {\nwindowDescriptorBlock *prevEntry;\n\n\n\t/* Unlink the entry from the module chain */\n\tif(thisWindow == windowListRoot) {\n\t\twindowListRoot = thisWindow->next;\n\t} else {\n\t\tprevEntry = windowListRoot;\n\t\twhile(prevEntry->next != thisWindow) {\n\t\t\tprevEntry = prevEntry->next;\n\t\t\tif (prevEntry == NULL) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\tprevEntry->next = thisWindow->next;\n\t}\n\tfree(thisWindow);\n\treturn 1;\n}\n\nint getCurrentIndexInUse(void) {\n\treturn nextIndex-1;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/HostWindowPlugin/sqMacHostWindow.h",
    "content": "/*\n *  sqMacHostWindow.h\n *  SqueakVMForCarbon\n *\n *  Created by John M McIntosh on Tue Jul 20 2004.\n *\n \n   3.8.15b3  Feb 19th, 2007 JMM add cursor set logic\n\n */\n\n#include <Carbon/Carbon.h>\n#include \"HostWindowPlugin.h\"\n\n/* window handle type */\n#define wHandleType WindowPtr\n#define wIndexType int \n\ntypedef struct windowDescriptorBlock {\n\tstruct windowDescriptorBlock * next;\n\twHandleType\t\thandle;\n\twIndexType\t\twindowIndex;\n\t/* extra fields to support your platform needs */\n\tCGContextRef context;\n\tMouseTrackingRef windowTrackingRef;\n\tint rememberTicker;\n\tint dirty;\n\tint sync;\n\tint locked;\n\tint\twidth;\n\tint\theight;\n\tint isInvisible;\n} windowDescriptorBlock;\n\nwindowDescriptorBlock *windowBlockFromHandle(wHandleType windowHandle);\nint windowIndexFromBlock( windowDescriptorBlock * thisWindow);\nint windowIndexFromHandle(wHandleType windowHandle);\nwHandleType windowHandleFromIndex(wIndexType windowIndex);\nwindowDescriptorBlock *AddWindowBlock(void);\nwindowDescriptorBlock *windowBlockFromIndex(int windowIndex);\nint getCurrentIndexInUse(void);\nvoid SetUpCarbonEventForWindowIndex(int index);\nvoid setWindowTrackingRgn(int windowIndex);\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/IA32ABI/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>IA32ABIPlugin</string>\n\t<key>CFBundleIconFile</key>\n\t<string>SqueakPlugin.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.IA32ABIPlugin</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.1.0</string>\n\t<key>CFBundleSignature</key>\n\t<string>FAST</string>\n\t<key>CFBundleVersion</key>\n\t<string>1.1.0</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/InternetConfigPlugin/InternetConfiguration.xml",
    "content": "<?xml version=\"1.0\"?>\n<?codewarrior exportversion=\"1.0\" ideversion=\"4.0\"?>\n<!DOCTYPE PROJECT [\n\n<!ELEMENT PROJECT (TARGETLIST, TARGETORDER, GROUPLIST, DESIGNLIST?)>\n<!ELEMENT TARGETLIST (TARGET+)>\n<!ELEMENT TARGET (NAME, SETTINGLIST, FILELIST?, LINKORDER?, SEGMENTLIST?, OVERLAYGROUPLIST?, SUBTARGETLIST?, SUBPROJECTLIST?)>\n<!ELEMENT NAME (#PCDATA)>\n<!ELEMENT USERSOURCETREETYPE (#PCDATA)>\n<!ELEMENT PATH (#PCDATA)>\n<!ELEMENT FILELIST (FILE*)>\n<!ELEMENT FILE (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?, ROOTFILEREF?, FILEKIND?, FILEFLAGS?)>\n<!ELEMENT PATHTYPE (#PCDATA)>\n<!ELEMENT PATHROOT (#PCDATA)>\n<!ELEMENT ACCESSPATH (#PCDATA)>\n<!ELEMENT PATHFORMAT (#PCDATA)>\n<!ELEMENT ROOTFILEREF (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)>\n<!ELEMENT FILEKIND (#PCDATA)>\n<!ELEMENT FILEFLAGS (#PCDATA)>\n<!ELEMENT FILEREF (TARGETNAME?, PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)>\n<!ELEMENT TARGETNAME (#PCDATA)>\n<!ELEMENT SETTINGLIST ((SETTING|PANELDATA)+)>\n<!ELEMENT SETTING (NAME?, (VALUE|(SETTING+)))>\n<!ELEMENT PANELDATA (NAME, VALUE)>\n<!ELEMENT VALUE (#PCDATA)>\n<!ELEMENT LINKORDER (FILEREF*)>\n<!ELEMENT SEGMENTLIST (SEGMENT+)>\n<!ELEMENT SEGMENT (NAME, ATTRIBUTES?, FILEREF*)>\n<!ELEMENT ATTRIBUTES (#PCDATA)>\n<!ELEMENT OVERLAYGROUPLIST (OVERLAYGROUP+)>\n<!ELEMENT OVERLAYGROUP (NAME, BASEADDRESS, OVERLAY*)>\n<!ELEMENT BASEADDRESS (#PCDATA)>\n<!ELEMENT OVERLAY (NAME, FILEREF*)>\n<!ELEMENT SUBTARGETLIST (SUBTARGET+)>\n<!ELEMENT SUBTARGET (TARGETNAME, ATTRIBUTES?)>\n<!ELEMENT SUBPROJECTLIST (SUBPROJECT+)>\n<!ELEMENT SUBPROJECT (FILEREF, SUBPROJECTTARGETLIST)>\n<!ELEMENT SUBPROJECTTARGETLIST (SUBPROJECTTARGET*)>\n<!ELEMENT SUBPROJECTTARGET (TARGETNAME, ATTRIBUTES?)>\n<!ELEMENT TARGETORDER (ORDEREDTARGET|ORDEREDDESIGN)*>\n<!ELEMENT ORDEREDTARGET (NAME)>\n<!ELEMENT ORDEREDDESIGN (NAME, ORDEREDTARGET+)>\n<!ELEMENT GROUPLIST (GROUP|FILEREF)*>\n<!ELEMENT GROUP (NAME, (GROUP|FILEREF)*)>\n<!ELEMENT DESIGNLIST (DESIGN+)>\n<!ELEMENT DESIGN (NAME, DESIGNDATA)>\n<!ELEMENT DESIGNDATA (#PCDATA)>\n]>\n<PROJECT>\n    <TARGETLIST>\n        <TARGET>\n            <NAME>InternetConfigPlugin</NAME>\n            <SETTINGLIST>\n\n                <!-- Settings for \"Source Trees\" panel -->\n                <SETTING><NAME>UserSourceTrees</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"Custom Keywords\" panel -->\n                <SETTING><NAME>CustomColor1</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor2</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor3</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor4</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Access Paths\" panel -->\n                <SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>UserSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>Mac OS X:Users:Shared:VMMaker-v2.2 Folder:src:vm:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n                <SETTING><NAME>SystemSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MacOS Support:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MSL:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Target Settings\" panel -->\n                <SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING>\n                <SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>Targetname</NAME><VALUE>InternetConfigPlugin</VALUE></SETTING>\n                <SETTING><NAME>OutputDirectory</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>SaveEntriesUsingRelativePaths</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"File Mappings\" panel -->\n                <SETTING><NAME>FileMappings</NAME>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>APPL</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>Appl</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MMLB</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MPLF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MWCD</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>RSRC</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.bh</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Balloon Help</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cpp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.exp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.fr</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>ODFRC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.h</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.idl</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>SOMobjects TS</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.p</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pas</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.r</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Rez</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.s</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PPCAsm</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>XCOF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>docu</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>rsrc</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>shlb</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>stub</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.doc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Build Extras\" panel -->\n                <SETTING><NAME>CacheModDates</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>ActivateBrowser</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>DumpBrowserInfo</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>CacheSubprojects</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>UseThirdPartyDebugger</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>DebuggerCommandLine</NAME><VALUE></VALUE></SETTING>\n                <PANELDATA><NAME>Debugger Runtime</NAME><VALUE>\n                    0002000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    00000000000000014C616D69653A53717565616B3A53717565616B332E302046\n                    6F6C6465723A53717565616B20332E31416C706861314D540000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    000000000000000000000000000000000D06EEF010000000000001000D06F800\n                    0002000000000000000000000D06D9E000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    00000000000000000000000000000000\n                </VALUE></PANELDATA>\n\n                <!-- Settings for \"Debugger Target\" panel -->\n                <SETTING><NAME>LogSystemMessages</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>AutoTargetDLLs</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>StopAtWatchpoints</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>PauseWhileRunning</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>PauseInterval</NAME><VALUE>5</VALUE></SETTING>\n                <SETTING><NAME>PauseUIFlags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>AltExePath</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>StopAtTempBPOnLaunch</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>CacheSymbolics</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>TempBPFunctionName</NAME><VALUE>main</VALUE></SETTING>\n                <SETTING><NAME>TempBPType</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"68K CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_68K_codesize</NAME><VALUE>Smart</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_structalignment</NAME><VALUE>MC68K</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fp_mode</NAME><VALUE>SANE</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_code68020</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_mpwc</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fourbyteints</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_IEEEdoubles</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fardata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farvtables</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_pcrelstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_macsbug</NAME><VALUE>New</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_a6frames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"68K Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_68K_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_mix</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"68K Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_68K_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_68K_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"68K Linker\" panel -->\n                <SETTING><NAME>MWLinker_68K_linksym</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_symfullpath</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_linksingle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_fastlink</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_generateMap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_glueintosegone</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"68K Project\" panel -->\n                <SETTING><NAME>MWProject_68K_type</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_outfile</NAME><VALUE>Mac OS PPC C/C++</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filecreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filetype</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_size</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_flags</NAME><VALUE>22656</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcheader</NAME><VALUE>Standard</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmulti</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_a4</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_minsize</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcsegtype</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_cfm68kcodegen</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_thedebugger</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrc_custom</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_rseg_app</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_pilot_lib</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_pilot_main_entry</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Compiler\" panel -->\n                <SETTING><NAME>MWFrontEnd_C_cplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_checkprotos</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_arm</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_trigraphs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_onlystdkeywords</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enumsalwaysint</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwpointerstyle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_prefixname</NAME><VALUE>myMacHeadersPPC</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ansistrict</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwcnewline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_wchar_type</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enableexceptions</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontreusestrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_poolstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_useRTTI</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_multibyteaware</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_unsignedchars</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_autoinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_booltruefalse</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_direct_to_som</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_som_env_check</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_alwaysinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_inlinelevel</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ecplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_objective_c</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_defer_codegen</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Warnings\" panel -->\n                <SETTING><NAME>MWWarning_C_warn_illpragma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_emptydecl</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_possunwant</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedvar</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedarg</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_extracomma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_pedantic</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warningerrors</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_hidevirtual</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_implicitconv</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_notinlined</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_structclass</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"CFM68K\" panel -->\n                <SETTING><NAME>MWCFM68K_exports</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_farthreshold</NAME><VALUE>256</VALUE></SETTING>\n                <SETTING><NAME>PCFM68K_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_mainname</NAME><VALUE>__start</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_termname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_alignment</NAME><VALUE>Align_2</VALUE></SETTING>\n\n                <!-- Settings for \"MacOS Merge Panel\" panel -->\n                <SETTING><NAME>MWMerge_MacOS_projectType</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputName</NAME><VALUE>Merge Out</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputCreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputType</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_suppressWarning</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyFragments</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_skipResources</NAME>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE>\nx</VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"PPC CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_PPC_structalignment</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tracebacktables</NAME><VALUE>Inline</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processor</NAME><VALUE>Generic</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_readonlystrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_fpcontract</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_schedule</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_peephole</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processorspecific</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_altivec</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vectortocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vrsave</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_PPC_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_extended</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_mix</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_PPC_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_PPC_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Linker\" panel -->\n                <SETTING><NAME>MWLinker_PPC_linksym</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_symfullpath</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_permitmultdefs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmode</NAME><VALUE>Normal</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_mainname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_termname</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"PPC PEF\" panel -->\n                <SETTING><NAME>MWPEF_exports</NAME><VALUE>Pragma</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sortcode</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_expandbss</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWPEF_collapsereloads</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Project\" panel -->\n                <SETTING><NAME>MWProject_PPC_type</NAME><VALUE>SharedLibrary</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>InternetConfigPlugin</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>1178686292</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>1936223330</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_size</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_minsize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_flags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcheader</NAME><VALUE>Native</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"PPCAsm Panel\" panel -->\n                <SETTING><NAME>MWAssembler_PPC_auxheader</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_symmode</NAME><VALUE>Mac</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_dialect</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_prefixfile</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_typecheck</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_warnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_casesensitive</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"Rez Compiler\" panel -->\n                <SETTING><NAME>MWRez_Language_maxwidth</NAME><VALUE>80</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_script</NAME><VALUE>Roman</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_alignment</NAME><VALUE>Align1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filtermode</NAME><VALUE>FilterSkip</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_suppresswarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_escapecontrolchars</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_prefixname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filteredtypes</NAME><VALUE>'CODE' 'DATA' 'PICT'</VALUE></SETTING>\n            </SETTINGLIST>\n            <FILELIST>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InterfaceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MathLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>myMacHeaders.pch</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InternetConfigPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacInternetConfiguration.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InternetConfigLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug, WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>CarbonAccessors.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacFileLogic.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacFileLogic.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n            </FILELIST>\n            <LINKORDER>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InterfaceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MathLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>myMacHeaders.pch</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InternetConfigPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacInternetConfiguration.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InternetConfigLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>CarbonAccessors.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacFileLogic.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacFileLogic.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n            </LINKORDER>\n        </TARGET>\n        <TARGET>\n            <NAME>InternetConfigPluginOpt</NAME>\n            <SETTINGLIST>\n\n                <!-- Settings for \"Source Trees\" panel -->\n                <SETTING><NAME>UserSourceTrees</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"Custom Keywords\" panel -->\n                <SETTING><NAME>CustomColor1</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor2</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor3</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor4</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Access Paths\" panel -->\n                <SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>UserSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>Mac OS X:Users:Shared:VMMaker-v2.2 Folder:src:vm:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n                <SETTING><NAME>SystemSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MacOS Support:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MSL:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Target Settings\" panel -->\n                <SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING>\n                <SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>Targetname</NAME><VALUE>InternetConfigPluginOpt</VALUE></SETTING>\n                <SETTING><NAME>OutputDirectory</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>SaveEntriesUsingRelativePaths</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"File Mappings\" panel -->\n                <SETTING><NAME>FileMappings</NAME>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>APPL</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>Appl</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MMLB</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MPLF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MWCD</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>RSRC</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.bh</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Balloon Help</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cpp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.exp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.fr</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>ODFRC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.h</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.idl</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>SOMobjects TS</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.p</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pas</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.r</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Rez</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.s</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PPCAsm</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>XCOF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>docu</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>rsrc</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>shlb</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>stub</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.doc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Build Extras\" panel -->\n                <SETTING><NAME>CacheModDates</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>ActivateBrowser</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>DumpBrowserInfo</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>CacheSubprojects</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>UseThirdPartyDebugger</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>DebuggerCommandLine</NAME><VALUE></VALUE></SETTING>\n                <PANELDATA><NAME>Debugger Runtime</NAME><VALUE>\n                    0002000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    00000000000000014C616D69653A53717565616B3A53717565616B332E302046\n                    6F6C6465723A53717565616B20332E31416C706861314D540000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    000000000000000000000000000000000D06EEF010000000000001000D06F800\n                    0002000000000000000000000D06D9E000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    00000000000000000000000000000000\n                </VALUE></PANELDATA>\n\n                <!-- Settings for \"Debugger Target\" panel -->\n                <SETTING><NAME>LogSystemMessages</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>AutoTargetDLLs</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>StopAtWatchpoints</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>PauseWhileRunning</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>PauseInterval</NAME><VALUE>5</VALUE></SETTING>\n                <SETTING><NAME>PauseUIFlags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>AltExePath</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>StopAtTempBPOnLaunch</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>CacheSymbolics</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>TempBPFunctionName</NAME><VALUE>main</VALUE></SETTING>\n                <SETTING><NAME>TempBPType</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"68K CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_68K_codesize</NAME><VALUE>Smart</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_structalignment</NAME><VALUE>MC68K</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fp_mode</NAME><VALUE>SANE</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_code68020</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_mpwc</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fourbyteints</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_IEEEdoubles</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fardata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farvtables</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_pcrelstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_macsbug</NAME><VALUE>New</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_a6frames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"68K Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_68K_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_mix</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"68K Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_68K_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_68K_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"68K Linker\" panel -->\n                <SETTING><NAME>MWLinker_68K_linksym</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_symfullpath</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_linksingle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_fastlink</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_generateMap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_glueintosegone</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"68K Project\" panel -->\n                <SETTING><NAME>MWProject_68K_type</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_outfile</NAME><VALUE>Mac OS PPC C/C++</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filecreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filetype</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_size</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_flags</NAME><VALUE>22656</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcheader</NAME><VALUE>Standard</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmulti</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_a4</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_minsize</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcsegtype</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_cfm68kcodegen</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_thedebugger</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrc_custom</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_rseg_app</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_pilot_lib</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_pilot_main_entry</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Compiler\" panel -->\n                <SETTING><NAME>MWFrontEnd_C_cplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_checkprotos</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_arm</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_trigraphs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_onlystdkeywords</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enumsalwaysint</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwpointerstyle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_prefixname</NAME><VALUE>myMacHeadersPPC</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ansistrict</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwcnewline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_wchar_type</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enableexceptions</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontreusestrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_poolstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_useRTTI</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_multibyteaware</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_unsignedchars</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_autoinline</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_booltruefalse</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_direct_to_som</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_som_env_check</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_alwaysinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_inlinelevel</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ecplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_objective_c</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_defer_codegen</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Warnings\" panel -->\n                <SETTING><NAME>MWWarning_C_warn_illpragma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_emptydecl</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_possunwant</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedvar</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedarg</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_extracomma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_pedantic</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warningerrors</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_hidevirtual</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_implicitconv</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_notinlined</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_structclass</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"CFM68K\" panel -->\n                <SETTING><NAME>MWCFM68K_exports</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_farthreshold</NAME><VALUE>256</VALUE></SETTING>\n                <SETTING><NAME>PCFM68K_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_mainname</NAME><VALUE>__start</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_termname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_alignment</NAME><VALUE>Align_2</VALUE></SETTING>\n\n                <!-- Settings for \"MacOS Merge Panel\" panel -->\n                <SETTING><NAME>MWMerge_MacOS_projectType</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputName</NAME><VALUE>Merge Out</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputCreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputType</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_suppressWarning</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyFragments</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_skipResources</NAME>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE>\nx</VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"PPC CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_PPC_structalignment</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tracebacktables</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processor</NAME><VALUE>P750</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_readonlystrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_fpcontract</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_schedule</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_peephole</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processorspecific</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_altivec</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vectortocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vrsave</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_PPC_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_extended</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_mix</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_PPC_optimizationlevel</NAME><VALUE>Level4</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_PPC_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Linker\" panel -->\n                <SETTING><NAME>MWLinker_PPC_linksym</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_symfullpath</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_permitmultdefs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmode</NAME><VALUE>Normal</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_mainname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_termname</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"PPC PEF\" panel -->\n                <SETTING><NAME>MWPEF_exports</NAME><VALUE>Pragma</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sortcode</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_expandbss</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWPEF_collapsereloads</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Project\" panel -->\n                <SETTING><NAME>MWProject_PPC_type</NAME><VALUE>SharedLibrary</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>InternetConfigPlugin</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>1178686292</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>1936223330</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_size</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_minsize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_flags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcheader</NAME><VALUE>Native</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"PPCAsm Panel\" panel -->\n                <SETTING><NAME>MWAssembler_PPC_auxheader</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_symmode</NAME><VALUE>Mac</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_dialect</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_prefixfile</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_typecheck</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_warnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_casesensitive</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"Rez Compiler\" panel -->\n                <SETTING><NAME>MWRez_Language_maxwidth</NAME><VALUE>80</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_script</NAME><VALUE>Roman</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_alignment</NAME><VALUE>Align1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filtermode</NAME><VALUE>FilterSkip</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_suppresswarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_escapecontrolchars</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_prefixname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filteredtypes</NAME><VALUE>'CODE' 'DATA' 'PICT'</VALUE></SETTING>\n            </SETTINGLIST>\n            <FILELIST>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InterfaceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MathLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>myMacHeaders.pch</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InternetConfigPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacInternetConfiguration.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InternetConfigLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug, WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>CarbonAccessors.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacFileLogic.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacFileLogic.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n            </FILELIST>\n            <LINKORDER>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InterfaceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MathLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>myMacHeaders.pch</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InternetConfigPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacInternetConfiguration.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InternetConfigLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>CarbonAccessors.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacFileLogic.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacFileLogic.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n            </LINKORDER>\n        </TARGET>\n    </TARGETLIST>\n\n    <TARGETORDER>\n        <ORDEREDTARGET><NAME>InternetConfigPlugin</NAME></ORDEREDTARGET>\n        <ORDEREDTARGET><NAME>InternetConfigPluginOpt</NAME></ORDEREDTARGET>\n    </TARGETORDER>\n\n    <GROUPLIST>\n        <GROUP><NAME>Group 1</NAME>\n            <FILEREF>\n                <TARGETNAME>InternetConfigPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacInternetConfiguration.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>InternetConfigPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacFileLogic.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>InternetConfigPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacFileLogic.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>InternetConfigPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>InternetConfigPlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>InternetConfigPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MSL C.PPC.Lib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>InternetConfigPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MSL RuntimePPC.Lib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>InternetConfigPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>InterfaceLib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>InternetConfigPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>InternetConfigLib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>InternetConfigPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MathLib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>InternetConfigPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>CarbonAccessors.o</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>InternetConfigPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>myMacHeaders.pch</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n        </GROUP>\n    </GROUPLIST>\n\n</PROJECT>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/InternetConfigPlugin/sqMacInternetConfiguration.c",
    "content": "/*  Sep 26th 2001\n\tInterface to the Internet Configuration toolkit\n\tJohn M McIntosh of Corporate Smalltalk Consulting Ltd\n\tjohnmci@smalltalkconsulting.com \n\thttp://www.smalltalkconsulting.com \n        \n    Nov 24th 2001 JMM fixed broken tempSpec code, was causing memory exception under os-x\n    3.7.0bx Nov 24th, 2003 JMM gCurrentVMEncoding\n    \n\t3.8.18b2  fix broken endian code in sqInternetGetMacintoshFileTypeAndCreatorFromkeySizeinto\n    */\n\n\n#include <InternetConfig.h>\n#include \"sq.h\"\n#include \"InternetConfigPlugin.h\"\n#include \"sqMacFileLogic.h\"\n#include \"sqMacUIConstants.h\"\n\nstatic OSType GetApplicationSignature(void);\nvoid convertPassword(unsigned char *buffer);\n\t\t\t\t\t\t\t   \nstatic ICInstance gICInstance;\nstatic Boolean gInitializedOk=false;\nvoid convertPSTRToString(unsigned char*pstr,char *target);\n\nint sqInternetConfigurationInit(void) {\n    OSStatus error;\n    OSType   signature;\n    \n    if (gInitializedOk) \n        return 1;\n        \n    if ((Ptr)ICStart==(Ptr)kUnresolvedCFragSymbolAddress) \n        return 0;\n    \n    signature = GetApplicationSignature();\n    \n    error = ICStart(&gICInstance, signature);\n    if (error != noErr) \n        return 0;\n        \n    gInitializedOk = true;\n    return 1;\n}\n\nint sqInternetConfigurationShutdown(void) {\n    if (!gInitializedOk) \n        return 1;\n    ICStop(gICInstance);\n    gInitializedOk = false;\n\treturn 1;\n}\n\nint sqInternetConfigurationGetStringKeyedBykeySizeinto(char *aKey,int keyLength, char *aString) {\n    ICAttr junkAttr;\n    long     size=0;\n    OSStatus error;\n    Str255   key;\n    char     convertedKey[256],buffer[DOCUMENT_NAME_SIZE+1];\n    ICFileSpec *tempICFileSpec;\n    \n    if (!gInitializedOk) \n        return 0;\n   if (keyLength+1 > (int) sizeof(convertedKey))\n        return 0;\n   \n    strncpy(convertedKey,aKey,keyLength);\n    convertedKey[keyLength] = 0;\n    CopyCStringToPascal(convertedKey,key);\n    \n    if (strcmp(convertedKey,\"DownLoadPath\") == 0) {\n        size = sizeof(ICFileSpec);\n        error  = ICGetPref(gICInstance, \"\\pDownloadFolder\", nil, &buffer, &size);\n        if (error == noErr || error == icTruncatedErr) {\n\t\t\tFSRef theFSRef;\n\t\t\t\n            tempICFileSpec = (ICFileSpec *) &buffer;\n\t\t\terror = FSpMakeFSRef (&tempICFileSpec->fss, &theFSRef);\n\t\t\tif(error)\n\t\t\t\treturn 0;\n\t\t\tPathToFileViaFSRef(aString, DOCUMENT_NAME_SIZE, &theFSRef,gCurrentVMEncoding);\n           size = strlen(aString);\n       } else \n            return 0;\n   } else { \n        size = 1024;\n        error  = ICGetPref(gICInstance, key, &junkAttr, &buffer, &size);\n        if (error == noErr) {\n            if (size == 0)\n                return size;\n                \n            if ((strcmp(convertedKey,\"FTPProxyPassword\") == 0||\n                strcmp(convertedKey,\"MailPassword\") == 0 ||\n                strcmp(convertedKey,\"NewsAuthPassword\") == 0)) {\n                convertPassword((unsigned char *)buffer);\n            }\n             \n            if ((strcmp(convertedKey,\"UseFTPProxy\") == 0  ||\n               strcmp(convertedKey,\"UseGopherProxy\") == 0 ||\n               strcmp(convertedKey,\"UseHTTPProxy\") == 0   ||\n               strcmp(convertedKey,\"UsePassiveFTP\") == 0  ||\n               strcmp(convertedKey,\"UseSocks\") == 0)) {\n                    if (buffer[0] == 0x01)\n                        strcpy(aString,\"1\");\n                    else\n                        strcpy(aString,\"0\");\n                    size = 1; \n            } else if (strcmp(convertedKey,\"NoProxyDomains\") == 0) {\n                convertPSTRToString((unsigned char *)buffer,aString); \n                return strlen(aString);\n            } else {\n                CopyPascalStringToC((unsigned char *)buffer,aString);\n                size--;\n            }\n        }\n    }\n    return size;\n}\n\nvoid sqInternetGetMacintoshFileTypeAndCreatorFromkeySizeinto(char * aFileName, int keyLength, char * creator){\n    Str255      filename;\n    char        convertedKey[256];\n    ICMapEntry  mapEntry;\n    OSStatus    error;\n    \n    if (!gInitializedOk)\n        goto abort;\n\n    if (keyLength+1 > (int) sizeof(convertedKey))\n        goto abort;\n   \n    strncpy(convertedKey,aFileName,keyLength);\n    convertedKey[keyLength] = 0;\n    CopyCStringToPascal(convertedKey,filename);\n    error = ICMapFilename(gICInstance,filename,&mapEntry);\n    \n    if (error != noErr)             \n        goto abort;\n\n\t*((int *) creator) = CFSwapInt32BigToHost(mapEntry.fileType);\n\t*((int *) (creator+4)) = CFSwapInt32BigToHost(mapEntry.fileCreator);\n\n    return;\n\n    abort:\n        strncpy(creator,\"********\",8);\n        return;\n}\n\n\nstatic OSType GetApplicationSignature() {\n    ProcessSerialNumber PSN;\n    ProcessInfoRec pinfo;\n    FSSpec pspec;\n    OSStatus err;\n        /* set up process serial number */\n    PSN.highLongOfPSN = 0;\n    PSN.lowLongOfPSN = kCurrentProcess;\n        /* set up info block */\n    pinfo.processInfoLength = sizeof(pinfo);\n    pinfo.processName = NULL;\n    pinfo.processAppSpec = &pspec;\n        /* grab the vrefnum and directory */\n    err = GetProcessInformation(&PSN, &pinfo);\n    if (err == noErr) {\n        return pinfo.processSignature;\n    }\n    return 0;\n}\n\n\nvoid convertPassword(unsigned char *buffer) {\n int size,i;\n \n size = buffer[0];\n for (i=0;i<size;i++) {\n    buffer[i+1] = buffer[i+1] ^ (0x55 + i + 1);\n }  \n}\n\nvoid convertPSTRToString(unsigned char*pstr,char *target) {\n    unsigned char * arrayOfpstr;\n    int    i,totalSize,size;\n    short  numberOfpstr;\n    \n    numberOfpstr = *((short *) pstr);\n    arrayOfpstr = pstr+sizeof(short);\n    totalSize = 0;\n    \n    for(i=0;i<numberOfpstr;i++) {\n        size = arrayOfpstr[0];\n        if (totalSize + size > 1024) { \n            target[totalSize] = 0x00;\n            return;\n        }    \n        memcpy(target+totalSize,(char *) arrayOfpstr+1,size);\n        totalSize += size;\n        target[totalSize++] = ',';\n        arrayOfpstr += (size+1);\n    }\n    if (totalSize > 0)\n         totalSize--;\n    target[totalSize] = 0x00;\n    return;\n}"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/JPEGReadWriter2Plugin/JConfig.h",
    "content": "/*\n\n * jconfig.doc\n\n *\n\n * Copyright (C) 1991-1994, Thomas G. Lane.\n\n * This file is part of the Independent JPEG Group's software.\n\n * For conditions of distribution and use, see the accompanying README file.\n\n *\n\n * This file documents the configuration options that are required to\n\n * customize the JPEG software for a particular system.\n\n *\n\n * The actual configuration options for a particular installation are stored\n\n * in jconfig.h.  On many machines, jconfig.h can be generated automatically\n\n * or copied from one of the \"canned\" jconfig files that we supply.  But if\n\n * you need to generate a jconfig.h file by hand, this file tells you how.\n\n *\n\n * DO NOT EDIT THIS FILE --- IT WON'T ACCOMPLISH ANYTHING.\n\n * EDIT A COPY NAMED JCONFIG.H.\n\n */\n\n\n\n\n\n/*\n\n * These symbols indicate the properties of your machine or compiler.\n\n * #define the symbol if yes, #undef it if no.\n\n */\n\n\n\n/* Does your compiler support function prototypes?\n\n * (If not, you also need to use ansi2knr, see install.doc)\n\n */\n\n#define HAVE_PROTOTYPES\n\n\n\n/* Does your compiler support the declaration \"unsigned char\" ?\n\n * How about \"unsigned short\" ?\n\n */\n\n#define HAVE_UNSIGNED_CHAR\n\n#define HAVE_UNSIGNED_SHORT\n\n\n\n/* Define \"void\" as \"char\" if your compiler doesn't know about type void.\n\n * NOTE: be sure to define void such that \"void *\" represents the most general\n\n * pointer type, e.g., that returned by malloc().\n\n */\n\n/* #define void char */\n\n\n\n/* Define \"const\" as empty if your compiler doesn't know the \"const\" keyword.\n\n */\n\n/* #define const */\n\n\n\n/* Define this if an ordinary \"char\" type is unsigned.\n\n * If you're not sure, leaving it undefined will work at some cost in speed.\n\n * If you defined HAVE_UNSIGNED_CHAR then the speed difference is minimal.\n\n */\n\n#undef CHAR_IS_UNSIGNED\n\n\n\n/* Define this if your system has an ANSI-conforming <stddef.h> file.\n\n */\n\n#define HAVE_STDDEF_H\n\n\n\n/* Define this if your system has an ANSI-conforming <stdlib.h> file.\n\n */\n\n#define HAVE_STDLIB_H\n\n\n\n/* Define this if your system does not have an ANSI/SysV <string.h>,\n\n * but does have a BSD-style <strings.h>.\n\n */\n\n#undef NEED_BSD_STRINGS\n\n\n\n/* Define this if your system does not provide typedef size_t in any of the\n\n * ANSI-standard places (stddef.h, stdlib.h, or stdio.h), but places it in\n\n * <sys/types.h> instead.\n\n */\n\n#undef NEED_SYS_TYPES_H\n\n\n\n/* For 80x86 machines, you need to define NEED_FAR_POINTERS,\n\n * unless you are using a large-data memory model or 80386 flat-memory mode.\n\n * On less brain-damaged CPUs this symbol must not be defined.\n\n * (Defining this symbol causes large data structures to be referenced through\n\n * \"far\" pointers and to be allocated with a special version of malloc.)\n\n */\n\n#undef NEED_FAR_POINTERS\n\n\n\n/* Define this if your linker needs global names to be unique in less\n\n * than the first 15 characters.\n\n */\n\n#undef NEED_SHORT_EXTERNAL_NAMES\n\n\n\n/* Although a real ANSI C compiler can deal perfectly well with pointers to\n\n * unspecified structures (see \"incomplete types\" in the spec), a few pre-ANSI\n\n * and pseudo-ANSI compilers get confused.  To keep one of these bozos happy,\n\n * define INCOMPLETE_TYPES_BROKEN.  This is not recommended unless you\n\n * actually get \"missing structure definition\" warnings or errors while\n\n * compiling the JPEG code.\n\n */\n\n#undef INCOMPLETE_TYPES_BROKEN\n\n\n\n\n\n/*\n\n * The following options affect code selection within the JPEG library,\n\n * but they don't need to be visible to applications using the library.\n\n * To minimize application namespace pollution, the symbols won't be\n\n * defined unless JPEG_INTERNALS has been defined.\n\n */\n\n\n\n#ifdef JPEG_INTERNALS\n\n\n\n/* Define this if your compiler implements \">>\" on signed values as a logical\n\n * (unsigned) shift; leave it undefined if \">>\" is a signed (arithmetic) shift,\n\n * which is the normal and rational definition.\n\n */\n\n#undef RIGHT_SHIFT_IS_UNSIGNED\n\n\n\n\n\n#endif /* JPEG_INTERNALS */\n\n\n\n\n\n/*\n\n * The remaining options do not affect the JPEG library proper,\n\n * but only the sample applications cjpeg/djpeg (see cjpeg.c, djpeg.c).\n\n * Other applications can ignore these.\n\n */\n\n\n\n#ifdef JPEG_CJPEG_DJPEG\n\n\n\n/* These defines indicate which image (non-JPEG) file formats are allowed. */\n\n\n\n#define BMP_SUPPORTED\t\t/* BMP image file format */\n\n#define GIF_SUPPORTED\t\t/* GIF image file format */\n\n#define PPM_SUPPORTED\t\t/* PBMPLUS PPM/PGM image file format */\n\n#undef RLE_SUPPORTED\t\t/* Utah RLE image file format */\n\n#define TARGA_SUPPORTED\t\t/* Targa image file format */\n\n\n\n/* Define this if you want to name both input and output files on the command\n\n * line, rather than using stdout and optionally stdin.  You MUST do this if\n\n * your system can't cope with binary I/O to stdin/stdout.  See comments at\n\n * head of cjpeg.c or djpeg.c.\n\n */\n\n#undef TWO_FILE_COMMANDLINE\n\n\n\n/* Define this if your system needs explicit cleanup of temporary files.\n\n * This is crucial under MS-DOS, where the temporary \"files\" may be areas\n\n * of extended memory; on most other systems it's not as important.\n\n */\n\n#undef NEED_SIGNAL_CATCHER\n\n\n\n/* By default, we open image files with fopen(...,\"rb\") or fopen(...,\"wb\").\n\n * This is necessary on systems that distinguish text files from binary files,\n\n * and is harmless on most systems that don't.  If you have one of the rare\n\n * systems that complains about the \"b\" spec, define this symbol.\n\n */\n\n#undef DONT_USE_B_MODE\n\n\n\n/* Define this if you want percent-done progress reports from cjpeg/djpeg.\n\n */\n\n#undef PROGRESS_REPORT\n\n\n\n\n\n#endif /* JPEG_CJPEG_DJPEG */\n\n#define USE_MAC_MEMMGR\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/JoystickTabletPlugin/HID_Error_Handler.c",
    "content": "/*\n\tFile:\t\tError Handler.c\n\n\tContains:\tImplementation of the HID utility error handlers for the HID Utilities\n    \n\tDRI: George Warner\n\n\tCopyright:\tCopyright  2002 Apple Computer, Inc., All Rights Reserved\n\n\tDisclaimer:\tIMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc.\n\t\t\t\t(\"Apple\") in consideration of your agreement to the following terms, and your\n\t\t\t\tuse, installation, modification or redistribution of this Apple software\n\t\t\t\tconstitutes acceptance of these terms.  If you do not agree with these terms,\n\t\t\t\tplease do not use, install, modify or redistribute this Apple software.\n\n\t\t\t\tIn consideration of your agreement to abide by the following terms, and subject\n\t\t\t\tto these terms, Apple grants you a personal, non-exclusive license, under Apples\n\t\t\t\tcopyrights in this original Apple software (the \"Apple Software\"), to use,\n\t\t\t\treproduce, modify and redistribute the Apple Software, with or without\n\t\t\t\tmodifications, in source and/or binary forms; provided that if you redistribute\n\t\t\t\tthe Apple Software in its entirety and without modifications, you must retain\n\t\t\t\tthis notice and the following text and disclaimers in all such redistributions of\n\t\t\t\tthe Apple Software.  Neither the name, trademarks, service marks or logos of\n\t\t\t\tApple Computer, Inc. may be used to endorse or promote products derived from the\n\t\t\t\tApple Software without specific prior written permission from Apple.  Except as\n\t\t\t\texpressly stated in this notice, no other rights or licenses, express or implied,\n\t\t\t\tare granted by Apple herein, including but not limited to any patent rights that\n\t\t\t\tmay be infringed by your derivative works or by other works in which the Apple\n\t\t\t\tSoftware may be incorporated.\n\n\t\t\t\tThe Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE MAKES NO\n\t\t\t\tWARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED\n\t\t\t\tWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n\t\t\t\tPURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN\n\t\t\t\tCOMBINATION WITH YOUR PRODUCTS.\n\n\t\t\t\tIN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR\n\t\t\t\tCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n\t\t\t\tGOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n\t\t\t\tARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION\n\t\t\t\tOF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT\n\t\t\t\t(INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN\n\t\t\t\tADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n#if !defined  (kBuildingLibrary)\n\t#define kVerboseErrors\n\n// system includes ----------------------------------------------------------\n\n\t#ifdef kVerboseErrors\n\t\t#include <Carbon/Carbon.h>\n\t#endif\n#endif // not kBuildingLibrary \n\n#include <stdio.h>\n\n// project includes ---------------------------------------------------------\n\n#include \"HID_Utilities_Internal.h\"\n\n// globals (internal/private) -----------------------------------------------\n\n// prototypes (internal/private) --------------------------------------------\n\n// functions (internal/private) ---------------------------------------------\n\n#pragma mark -\n// -------------------------------------\n\n// central error reporting\n\nvoid HIDReportErrorNum (char * strError, long numError)\n{\n\tchar errMsgCStr [256];\n\t\n\tsprintf (errMsgCStr, \"%s #%ld (0x%lx)\", strError, numError, numError); \n\n\t// out as debug string\n#ifdef kVerboseErrors\n\t{\n\t\tStr255 strErr = \"\\p\";\n\t\tCopyCStringToPascal (errMsgCStr, strErr);\n\t\tDebugStr (strErr);\n\t}\n#endif // kVerboseErrors\n}\n\n// -------------------------------------\n\nvoid HIDReportError (char * strError)\n{\n\tchar errMsgCStr [256];\n\n\tsprintf (errMsgCStr, \"%s\", strError); \n\n\t// out as debug string\n#ifdef kVerboseErrors\n\t{\n\t\tStr255 strErr = \"\\p\";\n\t\tCopyCStringToPascal (errMsgCStr, strErr);\n\t\tDebugStr (strErr);\n\t}\n#endif // kVerboseErrors\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/JoystickTabletPlugin/HID_Error_Handler.h",
    "content": "/*\n\tFile:\t\tHID_Error_Handler.h\n\n\tContains:   Definition of the interfaces to <HID_Error_Handler.c>\n    \n\tDRI: George Warner\n\n\tCopyright:\tCopyright  2002 Apple Computer, Inc., All Rights Reserved\n\n\tDisclaimer:\tIMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc.\n\t\t\t\t(\"Apple\") in consideration of your agreement to the following terms, and your\n\t\t\t\tuse, installation, modification or redistribution of this Apple software\n\t\t\t\tconstitutes acceptance of these terms.  If you do not agree with these terms,\n\t\t\t\tplease do not use, install, modify or redistribute this Apple software.\n\n\t\t\t\tIn consideration of your agreement to abide by the following terms, and subject\n\t\t\t\tto these terms, Apple grants you a personal, non-exclusive license, under Apples\n\t\t\t\tcopyrights in this original Apple software (the \"Apple Software\"), to use,\n\t\t\t\treproduce, modify and redistribute the Apple Software, with or without\n\t\t\t\tmodifications, in source and/or binary forms; provided that if you redistribute\n\t\t\t\tthe Apple Software in its entirety and without modifications, you must retain\n\t\t\t\tthis notice and the following text and disclaimers in all such redistributions of\n\t\t\t\tthe Apple Software.  Neither the name, trademarks, service marks or logos of\n\t\t\t\tApple Computer, Inc. may be used to endorse or promote products derived from the\n\t\t\t\tApple Software without specific prior written permission from Apple.  Except as\n\t\t\t\texpressly stated in this notice, no other rights or licenses, express or implied,\n\t\t\t\tare granted by Apple herein, including but not limited to any patent rights that\n\t\t\t\tmay be infringed by your derivative works or by other works in which the Apple\n\t\t\t\tSoftware may be incorporated.\n\n\t\t\t\tThe Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE MAKES NO\n\t\t\t\tWARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED\n\t\t\t\tWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n\t\t\t\tPURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN\n\t\t\t\tCOMBINATION WITH YOUR PRODUCTS.\n\n\t\t\t\tIN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR\n\t\t\t\tCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n\t\t\t\tGOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n\t\t\t\tARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION\n\t\t\t\tOF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT\n\t\t\t\t(INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN\n\t\t\t\tADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n*/\n\n// Usage notes: \n\n// include control --------------------------------------------------\n\n#ifndef Error_Handler_h\n#define Error_Handler_h\n\n// includes ---------------------------------------------------------\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n// structures (public) -----------------------------------------------\n\n// public function declarations -------------------------------------\n\n// Error reporter, can be set to report however the application desires\nextern void HIDReportError (char * strError);\n\n// Error with numeric code reporter, can be set to report however the application desires\nextern void HIDReportErrorNum (char * strError, long numError);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif // Error_Handler_h"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/JoystickTabletPlugin/HID_Name_Lookup.c",
    "content": "/*\n\tFile:\t\tHID_Name_Lookup.c\n\n\tContains:\tImplementation of the HID device name lookup functions for the HID utilites.\n    \n\tDRI: George Warner\n\n\tCopyright:\tCopyright  2002 Apple Computer, Inc., All Rights Reserved\n\n\tDisclaimer:\tIMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc.\n\t\t\t\t(\"Apple\") in consideration of your agreement to the following terms, and your\n\t\t\t\tuse, installation, modification or redistribution of this Apple software\n\t\t\t\tconstitutes acceptance of these terms.  If you do not agree with these terms,\n\t\t\t\tplease do not use, install, modify or redistribute this Apple software.\n\n\t\t\t\tIn consideration of your agreement to abide by the following terms, and subject\n\t\t\t\tto these terms, Apple grants you a personal, non-exclusive license, under Apples\n\t\t\t\tcopyrights in this original Apple software (the \"Apple Software\"), to use,\n\t\t\t\treproduce, modify and redistribute the Apple Software, with or without\n\t\t\t\tmodifications, in source and/or binary forms; provided that if you redistribute\n\t\t\t\tthe Apple Software in its entirety and without modifications, you must retain\n\t\t\t\tthis notice and the following text and disclaimers in all such redistributions of\n\t\t\t\tthe Apple Software.  Neither the name, trademarks, service marks or logos of\n\t\t\t\tApple Computer, Inc. may be used to endorse or promote products derived from the\n\t\t\t\tApple Software without specific prior written permission from Apple.  Except as\n\t\t\t\texpressly stated in this notice, no other rights or licenses, express or implied,\n\t\t\t\tare granted by Apple herein, including but not limited to any patent rights that\n\t\t\t\tmay be infringed by your derivative works or by other works in which the Apple\n\t\t\t\tSoftware may be incorporated.\n\n\t\t\t\tThe Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE MAKES NO\n\t\t\t\tWARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED\n\t\t\t\tWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n\t\t\t\tPURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN\n\t\t\t\tCOMBINATION WITH YOUR PRODUCTS.\n\n\t\t\t\tIN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR\n\t\t\t\tCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n\t\t\t\tGOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n\t\t\t\tARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION\n\t\t\t\tOF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT\n\t\t\t\t(INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN\n\t\t\t\tADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n#include \"HID_Utilities_Internal.h\"\n#include \"HID_Name_Lookup.h\"\n\n#define FAKE_IT\t1\t// set true for debugging; returns the vendor, product & cookie (or usage info) as numbers.\n\n// ---------------------------------\n// Load the element strings from the given resource (XML) file into a CFPropertyListRef\nstatic CFPropertyListRef xml_load(const CFStringRef pResourceName,const CFStringRef pResourceExtension)\n{\n\tCFPropertyListRef tCFPropertyListRef = NULL;\n\tCFURLRef resFileCFURLRef = CFBundleCopyResourceURL(CFBundleGetMainBundle(), pResourceName, pResourceExtension, NULL);\n\n\tif (NULL != resFileCFURLRef)\n\t{\n\t\tCFDataRef resCFDataRef;\n\n\t\tif (CFURLCreateDataAndPropertiesFromResource(kCFAllocatorDefault, resFileCFURLRef, &resCFDataRef, nil, nil, nil))\n\t\t{\n\t\t\tif (NULL != resCFDataRef)\n\t\t\t{\n\t\t\t\tCFStringRef errorString;\n\n\t\t\t\ttCFPropertyListRef = CFPropertyListCreateFromXMLData(kCFAllocatorDefault, resCFDataRef, kCFPropertyListImmutable, &errorString);\n\t\t\t\tif (NULL == tCFPropertyListRef)\n\t\t\t\t\tCFShow(errorString);\n\t\t\t\tCFRelease(resCFDataRef);\n\t\t\t}\n\t\t}\n\t\tCFRelease(resFileCFURLRef);\n\t}\n\treturn tCFPropertyListRef;\n}\n\n// ---------------------------------\n// Find an element string in the <HID_cookie_strings.plist> resource (XML) file\nstatic Boolean xml_search_cookie(const long pVendorID, const long pProductID, const long pCookie, char* pCstr)\n{\n\tstatic CFPropertyListRef tCFPropertyListRef = NULL;\n\tBoolean results = false;\n\n\tif (NULL == tCFPropertyListRef)\n\t\ttCFPropertyListRef = xml_load(CFSTR(\"HID_cookie_strings\"), CFSTR(\"plist\"));\n\tif (NULL != tCFPropertyListRef)\n\t{\n\t\tif (CFDictionaryGetTypeID() == CFGetTypeID(tCFPropertyListRef))\n\t\t{\n\t\t\tCFDictionaryRef vendorCFDictionaryRef;\n\t\t\tCFStringRef\tvendorKeyCFStringRef;\n\t\t\tvendorKeyCFStringRef = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR(\"%ld\"), pVendorID);\n\n\t\t\tif (CFDictionaryGetValueIfPresent(tCFPropertyListRef, vendorKeyCFStringRef, (const void**) &vendorCFDictionaryRef))\n\t\t\t{\n\t\t\t\tCFDictionaryRef productCFDictionaryRef;\n\t\t\t\tCFStringRef\tproductKeyCFStringRef;\n\t\t\t\tCFStringRef\tvendorCFStringRef;\n\n\t\t\t\tif (CFDictionaryGetValueIfPresent(vendorCFDictionaryRef, CFSTR(\"Name\"), (const void**) &vendorCFStringRef))\n\t\t\t\t{\n\t\t\t\t\t//CFShow(vendorCFStringRef);\n\t\t\t\t}\n\t\t\t\tproductKeyCFStringRef = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR(\"%ld\"), pProductID);\n\n\t\t\t\tif (CFDictionaryGetValueIfPresent(vendorCFDictionaryRef, productKeyCFStringRef, (const void**) &productCFDictionaryRef))\n\t\t\t\t{\n\t\t\t\t\tCFStringRef fullCFStringRef = NULL;\n\t\t\t\t\tCFStringRef\tcookieKeyCFStringRef;\n\t\t\t\t\tCFStringRef\tproductCFStringRef;\n\t\t\t\t\tCFStringRef\tcookieCFStringRef;\n\n\t\t\t\t\tif (CFDictionaryGetValueIfPresent(productCFDictionaryRef, CFSTR(\"Name\"), (const void**) &productCFStringRef))\n\t\t\t\t\t{\n\t\t\t\t\t\t//CFShow(productCFStringRef);\n\t\t\t\t\t}\n\t\t\t\t\tcookieKeyCFStringRef = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR(\"%ld\"), pCookie);\n\n\t\t\t\t\tif (CFDictionaryGetValueIfPresent(productCFDictionaryRef, cookieKeyCFStringRef, (const void**) &cookieCFStringRef))\n\t\t\t\t\t{\n\t\t\t\t\t\tfullCFStringRef = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR(\"%@ %@ %@\"), \n\t\t\t\t\t\t\t\t\t\t\t\t vendorCFStringRef, productCFStringRef, cookieCFStringRef);\n\t\t\t\t\t\t// CFShow(cookieCFStringRef);\n\t\t\t\t\t}\n#if FAKE_IT\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tfullCFStringRef = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR(\"%@ %@ #%@\"), \n\t\t\t\t\t\t\t\t\t\t\t\t vendorCFStringRef, productCFStringRef, cookieKeyCFStringRef);\n\t\t\t\t\t}\n#endif\n\t\t\t\t\tif (fullCFStringRef)\n\t\t\t\t\t{\n\t\t\t\t\t\t// CFShow(fullCFStringRef);\n\t\t\t\t\t\tresults = CFStringGetCString(\n\t\t\t\t\t\t\t\t   fullCFStringRef, pCstr, CFStringGetLength(fullCFStringRef) * sizeof(UniChar) + 1, kCFStringEncodingMacRoman);\n\t\t\t\t\t\tCFRelease(fullCFStringRef);\n\t\t\t\t\t}\n\t\t\t\t\tCFRelease(cookieKeyCFStringRef);\n\t\t\t\t}\n\t\t\t\tCFRelease(productKeyCFStringRef);\n\t\t\t}\n\t\t\tCFRelease(vendorKeyCFStringRef);\n\t\t}\n\t\t//++CFRelease(tCFPropertyListRef);\t// Leak this!\n\t}\n\treturn results;\n}\n\n// ---------------------------------\n// Find an element string in the <HID_device_usage_strings.plist> resource (XML) file\nstatic Boolean xml_search_usage(const long pVendorID, const long pProductID, const long pUsagePage, const long pUsage, char* pCstr)\n{\n\tstatic CFPropertyListRef tCFPropertyListRef = NULL;\n\tBoolean results = false;\n\n\tif (NULL == tCFPropertyListRef)\n\t\ttCFPropertyListRef = xml_load(CFSTR(\"HID_device_usage_strings\"), CFSTR(\"plist\"));\n\tif (NULL != tCFPropertyListRef)\n\t{\n\t\tif (CFDictionaryGetTypeID() == CFGetTypeID(tCFPropertyListRef))\n\t\t{\n\t\t\tCFDictionaryRef vendorCFDictionaryRef;\n\t\t\tCFStringRef\tvendorKeyCFStringRef;\n\t\t\tvendorKeyCFStringRef = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR(\"%ld\"), pVendorID);\n\n\t\t\tif (CFDictionaryGetValueIfPresent(tCFPropertyListRef, vendorKeyCFStringRef, (const void**) &vendorCFDictionaryRef))\n\t\t\t{\n\t\t\t\tCFDictionaryRef productCFDictionaryRef;\n\t\t\t\tCFStringRef\tproductKeyCFStringRef;\n\t\t\t\tCFStringRef\tvendorCFStringRef;\n\n\t\t\t\tif (!CFDictionaryGetValueIfPresent(vendorCFDictionaryRef, CFSTR(\"Name\"), (const void**) &vendorCFStringRef))\n\t\t\t\t{\n\t\t\t\t\tvendorCFStringRef = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR(\"v: %ld\"), pVendorID);\n\t\t\t\t\t//CFShow(vendorCFStringRef);\n\t\t\t\t}\n\t\t\t\tproductKeyCFStringRef = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR(\"%ld\"), pProductID);\n\n\t\t\t\tif (CFDictionaryGetValueIfPresent(vendorCFDictionaryRef, productKeyCFStringRef, (const void**) &productCFDictionaryRef))\n\t\t\t\t{\n\t\t\t\t\tCFStringRef fullCFStringRef = NULL;\n\t\t\t\t\tCFStringRef\tusageKeyCFStringRef;\n\t\t\t\t\tCFStringRef\tproductCFStringRef;\n\t\t\t\t\tCFStringRef\tusageCFStringRef;\n\n\t\t\t\t\tif (CFDictionaryGetValueIfPresent(productCFDictionaryRef, CFSTR(\"Name\"), (const void**) &productCFStringRef))\n\t\t\t\t\t{\n\t\t\t\t\t\t//CFShow(productCFStringRef);\n\t\t\t\t\t}\n\t\t\t\t\tusageKeyCFStringRef = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR(\"%ld:%ld\"), pUsagePage, pUsage);\n\n\t\t\t\t\tif (CFDictionaryGetValueIfPresent(productCFDictionaryRef, usageKeyCFStringRef, (const void**) &usageCFStringRef))\n\t\t\t\t\t{\n\t\t\t\t\t\tfullCFStringRef = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR(\"%@ %@ %@\"),\n\t\t\t\t\t\t\t\t\t\t\t\t vendorCFStringRef, productCFStringRef, usageCFStringRef);\n\t\t\t\t\t\t// CFShow(usageCFStringRef);\n\t\t\t\t\t}\n#if FAKE_IT\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tfullCFStringRef = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR(\"%@ %@ #%@\"),\n\t\t\t\t\t\t\t\t\t\t\t\t vendorCFStringRef, productCFStringRef, usageKeyCFStringRef);\n\t\t\t\t\t}\n#endif\n\t\t\t\t\tif (fullCFStringRef)\n\t\t\t\t\t{\n\t\t\t\t\t\t// CFShow(fullCFStringRef);\n\t\t\t\t\t\tresults = CFStringGetCString(\n\t\t\t\t\t\t\t\t   fullCFStringRef, pCstr, CFStringGetLength(fullCFStringRef) * sizeof(UniChar) + 1, kCFStringEncodingMacRoman);\n\t\t\t\t\t\tCFRelease(fullCFStringRef);\n\t\t\t\t\t}\n\t\t\t\t\tCFRelease(usageKeyCFStringRef);\n\t\t\t\t}\n\t\t\t\tCFRelease(productKeyCFStringRef);\n\t\t\t}\n\t\t\tCFRelease(vendorKeyCFStringRef);\n\t\t}\n\t\t//++CFRelease(tCFPropertyListRef);\t// Leak this!\n\t}\n\treturn results;\n}\n\n// ---------------------------------\n// set name from vendor id/product id look up\nBoolean HIDGetElementNameFromVendorProductCookie (const long pVendorID, const long pProductID, const long pCookie, char * pName)\n{\n\tBoolean result = false;\n\t*pName = 0; // clear name\n\n\tif (xml_search_cookie(pVendorID, pProductID, pCookie, pName))\n\t\treturn true;\n\t\n\tswitch (pVendorID) {\n\t\tcase kMacally:\n\t\t\tswitch (pProductID) {\n\t\t\t\tcase kiShock:\n\t\t\t\t\tresult = true;\n\t\t\t\t\tswitch (pCookie) {\n\t\t\t\t\t\tcase 3: sprintf(pName, \"D-Pad Up\"); break;\n\t\t\t\t\t\tcase 4: sprintf(pName, \"D-Pad Down\"); break;\n\t\t\t\t\t\tcase 5: sprintf(pName, \"D-Pad Left\"); break;\n\t\t\t\t\t\tcase 6: sprintf(pName, \"D-Pad Right\"); break;\n\t\t\t\t\t\tcase 7: sprintf(pName, \"Up Button\"); break;\n\t\t\t\t\t\tcase 8: sprintf(pName, \"Right Button\"); break;\n\t\t\t\t\t\tcase 9: sprintf(pName, \"Down Button\"); break;\n\t\t\t\t\t\tcase 10: sprintf(pName, \"Left Button\"); break;\n\t\t\t\t\t\tcase 11: sprintf(pName, \"C Button\"); break;\n\t\t\t\t\t\tcase 12: sprintf(pName, \"B Button [Select]\"); break;\n\t\t\t\t\t\tcase 13: sprintf(pName, \"A Button [Start]\"); break;\n\t\t\t\t\t\tcase 14: sprintf(pName, \"F Button\"); break;\n\t\t\t\t\t\tcase 15: sprintf(pName, \"R1 Trigger\"); break;\n\t\t\t\t\t\tcase 16: sprintf(pName, \"R2 Trigger\"); break;\n\t\t\t\t\t\tcase 17: sprintf(pName, \"L1 Trigger\"); break;\n\t\t\t\t\t\tcase 18: sprintf(pName, \"L2 Trigger\"); break;\n\t\t\t\t\t\tcase 19: sprintf(pName, \"Left Stick Button\"); break;\n\t\t\t\t\t\tcase 20: sprintf(pName, \"Right Stick Button\"); break;\n\t\t\t\t\t\tcase 21: sprintf(pName, \"D Button\"); break;\n\t\t\t\t\t\tcase 22: sprintf(pName, \"E Button\"); break;\n\t\t\t\t\t\tcase 23: sprintf(pName, \"Left Stick X-Axis\"); break;\n\t\t\t\t\t\tcase 24: sprintf(pName, \"Left Stick Y-Axis\"); break;\n\t\t\t\t\t\tcase 25: sprintf(pName, \"Right Stick X-Axis\"); break;\n\t\t\t\t\t\tcase 26: sprintf(pName, \"Right Stick Y-Axis\"); break;\n\t\t\t\t\t\tdefault:\n#if FAKE_IT\n\t\t\t\t\t\t\tsprintf(pName, \"#{V:Macally, P:iShock, C:%ld}#\", pCookie);\n#else\n\t\t\t\t\t\t\tresult = false;\n#endif FAKE_IT\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n#if FAKE_IT\n\t\t\t\t\tsprintf(pName, \"#{V:Macally, P:%ld, C:%ld}#\", pProductID, pCookie); break;\n#else\n\t\t\t\t\tresult = false;\n#endif FAKE_IT\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase kMacsense:\n\t\t\tswitch (pProductID) {\n\t\t\t\tcase kFunPadF107:\n\t\t\t\t\tresult = true;\n\t\t\t\t\tswitch (pCookie) {\n\t\t\t\t\t\tcase  3: sprintf(pName, \"Button 1\"); break;\n\t\t\t\t\t\tcase  4: sprintf(pName, \"Button 2\"); break;\n\t\t\t\t\t\tcase  5: sprintf(pName, \"Button 3\"); break;\n\t\t\t\t\t\tcase  6: sprintf(pName, \"Button 4\"); break;\n\t\t\t\t\t\tcase  7: sprintf(pName, \"L1 Trigger\"); break;\n\t\t\t\t\t\tcase  8: sprintf(pName, \"R1 Trigger\"); break;\n\t\t\t\t\t\tcase  9: sprintf(pName, \"L2 Trigger\"); break;\n\t\t\t\t\t\tcase 10: sprintf(pName, \"R2 Trigger\"); break;\n\t\t\t\t\t\tcase 11: sprintf(pName, \"Right Stick X-Axis\"); break;\n\t\t\t\t\t\tcase 12: sprintf(pName, \"Right Stick Y-Axis\"); break;\n\t\t\t\t\t\tcase 13: sprintf(pName, \"Left Stick X-Axis\"); break;\n\t\t\t\t\t\tcase 14: sprintf(pName, \"Left Stick Y-Axis\"); break;\n\t\t\t\t\t\tcase 15: sprintf(pName, \"Hat Switch\"); break;\n\t\t\t\t\t\tdefault:\n#if FAKE_IT\n\t\t\t\t\t\t\tsprintf(pName, \"#{V:Macsense, P:FunPad F-107, C:%ld}#\", pCookie);\n#else\n\t\t\t\t\t\t\tresult = false;\n#endif FAKE_IT\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\tdefault:\n#if FAKE_IT\n\t\t\t\t\tsprintf(pName, \"#{V:Macsense, P:%ld, C:%ld}#\", pProductID, pCookie);\n#else\n\t\t\t\t\tresult = false;\n#endif FAKE_IT\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n#if FAKE_IT\n\t\t\tsprintf(pName, \"#{V:%ld, P:%ld, C:%ld}#\", pVendorID, pProductID, pCookie);\n#else\n\t\t\tresult = false;\n#endif FAKE_IT\n\t\t\tbreak;\n\t}\n\treturn result;\n}\n\n\n// ---------------------------------\n// set name from vendor id/product id & usage look up\nBoolean HIDGetElementNameFromVendorProductUsage (const long pVendorID, const long pProductID, const long pUsagePage, const long pUsage, char * pName)\n{\n\tBoolean result = false;\n\t*pName = 0; // clear name\n\n\tif (xml_search_usage(pVendorID, pProductID, pUsagePage, pUsage, pName))\n\t\treturn true;\n\n#if FAKE_IT\n\tsprintf(pName, \"#{V:%ld, P:%ld, U:%ld:%ld}#\", pVendorID, pProductID, pUsagePage, pUsage);\n\tresult = true;\n#endif\n\t\n\treturn result;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/JoystickTabletPlugin/HID_Name_Lookup.h",
    "content": "/*\n\tFile:\t\tHID_Name_Lookup.h\n\n\tContains:\tDefinition of the HID device name lookup functions for the HID utilites.\n    \n\tDRI: George Warner\n\n\tCopyright:\tCopyright  2002 Apple Computer, Inc., All Rights Reserved\n\n\tDisclaimer:\tIMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc.\n\t\t\t\t(\"Apple\") in consideration of your agreement to the following terms, and your\n\t\t\t\tuse, installation, modification or redistribution of this Apple software\n\t\t\t\tconstitutes acceptance of these terms.  If you do not agree with these terms,\n\t\t\t\tplease do not use, install, modify or redistribute this Apple software.\n\n\t\t\t\tIn consideration of your agreement to abide by the following terms, and subject\n\t\t\t\tto these terms, Apple grants you a personal, non-exclusive license, under Apples\n\t\t\t\tcopyrights in this original Apple software (the \"Apple Software\"), to use,\n\t\t\t\treproduce, modify and redistribute the Apple Software, with or without\n\t\t\t\tmodifications, in source and/or binary forms; provided that if you redistribute\n\t\t\t\tthe Apple Software in its entirety and without modifications, you must retain\n\t\t\t\tthis notice and the following text and disclaimers in all such redistributions of\n\t\t\t\tthe Apple Software.  Neither the name, trademarks, service marks or logos of\n\t\t\t\tApple Computer, Inc. may be used to endorse or promote products derived from the\n\t\t\t\tApple Software without specific prior written permission from Apple.  Except as\n\t\t\t\texpressly stated in this notice, no other rights or licenses, express or implied,\n\t\t\t\tare granted by Apple herein, including but not limited to any patent rights that\n\t\t\t\tmay be infringed by your derivative works or by other works in which the Apple\n\t\t\t\tSoftware may be incorporated.\n\n\t\t\t\tThe Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE MAKES NO\n\t\t\t\tWARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED\n\t\t\t\tWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n\t\t\t\tPURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN\n\t\t\t\tCOMBINATION WITH YOUR PRODUCTS.\n\n\t\t\t\tIN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR\n\t\t\t\tCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n\t\t\t\tGOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n\t\t\t\tARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION\n\t\t\t\tOF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT\n\t\t\t\t(INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN\n\t\t\t\tADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n#ifndef _HID_Name_Lookup_h_\n#define _HID_Name_Lookup_h_\n\n#include \"HID_Utilities.h\"\n\n// ==================================\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n// ==================================\n// Note: Now that as the device data has now been moved into external .XML files these\n//\tconstansts should no longer be used. They will eventually be eliminated from this header.\n\n#define kMicrosoft \t\t\t\t1118\n#define kSideWinderFFB2 \t\t27\n\n#define kLogitech \t\t\t\t1133\n#define kWingManStrikeForce3D \t49797\n\t\n#define kMacally \t\t\t\t8738\n#define kiShock \t\t\t\t16400\n#define kiShockIIFFB \t\t\t16416\n\n#define kMacsense \t\t\t\t1635\n#define kFunPadF107\t\t\t\t38916\n// ==================================\n\n// set name from vendor id/product id look up (using cookies)\nextern Boolean HIDGetElementNameFromVendorProductCookie (const long vendorID, const long productID, const long cookie, char * pName);\n\n// set name from vendor id/product id look up (using usage page & usage)\nextern Boolean HIDGetElementNameFromVendorProductUsage (const long vendorID, const long productID, const long pUsagePage, const long pUsage, char * pName);\n// ==================================\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif // _HID_Name_Lookup_h_\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/JoystickTabletPlugin/HID_Queue_Utilities.c",
    "content": "/*\n\tFile:\t\tHID_Queue_Utilities.c\n\n\tContains:\tImplementation of the HID queue functions for the HID utilites.\n    \n\tDRI: George Warner\n\n\tCopyright:\tCopyright  2002 Apple Computer, Inc., All Rights Reserved\n\n\tDisclaimer:\tIMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc.\n\t\t\t\t(\"Apple\") in consideration of your agreement to the following terms, and your\n\t\t\t\tuse, installation, modification or redistribution of this Apple software\n\t\t\t\tconstitutes acceptance of these terms.  If you do not agree with these terms,\n\t\t\t\tplease do not use, install, modify or redistribute this Apple software.\n\n\t\t\t\tIn consideration of your agreement to abide by the following terms, and subject\n\t\t\t\tto these terms, Apple grants you a personal, non-exclusive license, under Apples\n\t\t\t\tcopyrights in this original Apple software (the \"Apple Software\"), to use,\n\t\t\t\treproduce, modify and redistribute the Apple Software, with or without\n\t\t\t\tmodifications, in source and/or binary forms; provided that if you redistribute\n\t\t\t\tthe Apple Software in its entirety and without modifications, you must retain\n\t\t\t\tthis notice and the following text and disclaimers in all such redistributions of\n\t\t\t\tthe Apple Software.  Neither the name, trademarks, service marks or logos of\n\t\t\t\tApple Computer, Inc. may be used to endorse or promote products derived from the\n\t\t\t\tApple Software without specific prior written permission from Apple.  Except as\n\t\t\t\texpressly stated in this notice, no other rights or licenses, express or implied,\n\t\t\t\tare granted by Apple herein, including but not limited to any patent rights that\n\t\t\t\tmay be infringed by your derivative works or by other works in which the Apple\n\t\t\t\tSoftware may be incorporated.\n\n\t\t\t\tThe Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE MAKES NO\n\t\t\t\tWARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED\n\t\t\t\tWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n\t\t\t\tPURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN\n\t\t\t\tCOMBINATION WITH YOUR PRODUCTS.\n\n\t\t\t\tIN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR\n\t\t\t\tCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n\t\t\t\tGOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n\t\t\t\tARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION\n\t\t\t\tOF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT\n\t\t\t\t(INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN\n\t\t\t\tADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n//#include <IOKit/hid/IOHIDDevice.h>\n\n#include \"HID_Utilities_Internal.h\"\n#include \"HID_Utilities_External.h\"\n\n// ==================================\n// compiler directives\n// ==================================\n#define USE_ASYNC_EVENTS TRUE\n#define REPORT_ERRORS FALSE\n// ==================================\n#if REPORT_ERRORS\n#define HIDREPORTERRORNUM(s,n) HIDReportErrorNum(s,n)\n#define HIDREPORTERROR(s)\t\tHIDReportError(s)\n#else\n#define HIDREPORTERRORNUM(s,n)\tdo {} while (false)\n#define HIDREPORTERROR(s)\t\tdo {} while (false)\n#endif\n// ==================================\n// private functions\n// ==================================\n\n// creates a queue for a device\n\nstatic IOReturn hid_CreateQueue (pRecDevice pDevice)\n{\n    IOReturn result = kIOReturnError;\t// assume failure (pessimist!)\n\n\tif (HIDIsValidDevice(pDevice))\n\t{\n\t\tif (NULL == pDevice->queue) // do we already have a queue\n\t\t{\n\t\t\tif (NULL != pDevice->interface)\n\t\t\t{\n\t\t\t\tpDevice->queue = (void *) (*(IOHIDDeviceInterface**) pDevice->interface)->allocQueue (pDevice->interface); // alloc queue\n\t\t\t\tif (pDevice->queue)\n\t\t\t\t{\n\t\t\t\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->create (pDevice->queue, 0, kDeviceQueueSize); // create actual queue\n\t\t\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\t\t\tHIDREPORTERRORNUM (\"hid_CreateQueue - Failed to create queue via create\", result);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tHIDREPORTERROR (\"hid_CreateQueue - Failed to alloc IOHIDQueueInterface ** via allocQueue\");\n\t\t\t\t\tresult = kIOReturnError; // synthesis error\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\tHIDREPORTERRORNUM (\"hid_CreateQueue - Device inteface does not exist for queue creation\", result);\n\t\t}\n\t}\n\telse\n\t\tHIDREPORTERRORNUM (\"hid_CreateQueue - Invalid Device\", result);\n    return result;\n}\n\n// ---------------------------------\n// returns true if queue is empty false otherwise\n// error if no device, empty if no queue\n\nstatic unsigned char hid_IsDeviceQueueEmpty (pRecDevice pDevice)\n{\n\tif (HIDIsValidDevice(pDevice))\t// need valid device\n\t{\n\t\tif (pDevice->queue) // and queue\n\t\t{\n\t\t\tpRecElement pElement = HIDGetFirstDeviceElement (pDevice, kHIDElementTypeIO);\n\t\t\twhile (pElement)\n\t\t\t{\n\t\t\t\tif ((*(IOHIDQueueInterface**) pDevice->queue)->hasElement (pDevice->queue, pElement->cookie))\n\t\t\t\t\treturn false;\n\t\t\t\tpElement = HIDGetNextDeviceElement (pElement, kHIDElementTypeIO);\n\t\t\t} \n\t\t}\n\t\telse\n\t\t\tHIDREPORTERROR (\"hid_IsDeviceQueueEmpty - no queue.\");\n\t}\n\telse\n\t\tHIDREPORTERROR (\"hid_IsDeviceQueueEmpty - Invalid device.\");\n\treturn true;   \n}\n\n// ---------------------------------\n// disposes and releases queue, sets queue to NULL,.\n// Note: will have no effect if device or queue do not exist\n\nstatic IOReturn hid_DisposeReleaseQueue (pRecDevice pDevice)\n{\n    IOReturn result = kIOReturnError;\t// assume failure (pessimist!)\n\n\tif (HIDIsValidDevice(pDevice))\t// need valid device\n\t{\n\t\tif (pDevice->queue) // and queue\n\t\t{\n\t\t\t// stop queue\n\t\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->stop (pDevice->queue);\n\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\tHIDREPORTERRORNUM (\"hid_DisposeReleaseQueue - Failed to stop queue.\", result);\n\t\t\t// dispose of queue\n\t\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->dispose (pDevice->queue);\n\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\tHIDREPORTERRORNUM (\"hid_DisposeReleaseQueue - Failed to dipose queue.\", result);\n\t\t\t// release the queue\n\t\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->Release (pDevice->queue);\n\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\tHIDREPORTERRORNUM (\"hid_DisposeReleaseQueue - Failed to release queue.\", result);\n\n\t\t\tpDevice->queue = NULL;\n\t\t}\n\t\telse\n\t\t\tHIDREPORTERROR (\"hid_DisposeReleaseQueue - no queue.\");\n\t}\n\telse\n\t\tHIDREPORTERROR (\"hid_DisposeReleaseQueue - Invalid device.\");\n    return result;\n}\n\n// ==================================\n// public functions\n\n// ---------------------------------\n// queues specific element, performing any device queue set up required\n// queue is started and ready to return events on exit from this function\n\nunsigned long  HIDQueueElement (pRecDevice pDevice, pRecElement pElement)\n{\n    IOReturn result = kIOReturnError;\t// assume failure (pessimist!)\n\n\tif (HIDIsValidElement(pDevice,pElement))\n\t{\n\t\tif (NULL == pDevice->interface) // must have interface\n\t\t{\n\t\t\tHIDREPORTERROR (\"HIDQueueElement - Device does not have interface.\");\n\t\t\treturn kIOReturnError;\n\t\t}\n\t\tif (NULL == pDevice->queue) // if no queue create queue\n\t\t\tresult = hid_CreateQueue (pDevice);\n\t\tif ((kIOReturnSuccess != result) || (NULL == pDevice->queue))\n\t\t{\n\t\t\tHIDREPORTERRORNUM (\"HIDQueueElement - problem creating queue.\", result);\n\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\treturn result;\n\t\t\telse\n\t\t\t\treturn kIOReturnError;\n\t\t}\n\n\t\t// stop queue\n\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->stop (pDevice->queue);\n\t\tif (kIOReturnSuccess != result)\n\t\t\tHIDREPORTERROR (\"HIDQueueElement - Failed to stop queue.\");\n\n\t\t// queue element\n\t\tif (!(*(IOHIDQueueInterface**) pDevice->queue)->hasElement (pDevice->queue, pElement->cookie))\n\t\t{\n\t\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->addElement (pDevice->queue, pElement->cookie, 0);\n\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\tHIDREPORTERROR (\"HIDQueueElement - Failed to add Element to queue.\");\n\t\t}\n\n\t\t// restart queue\n\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->start (pDevice->queue);\n\t\tif (kIOReturnSuccess != result)\n\t\t\tHIDREPORTERROR (\"HIDQueueElement - Failed to start queue.\");\n\t}\n\telse\n\t{\n\t\tHIDREPORTERROR (\"HIDQueueElement - Invalid Device and/or element.\");\n        return kIOReturnBadArgument;\n\t}\n\n   return result;\n}\n\n// ---------------------------------\n// adds all elements to queue, performing any device queue set up required\n// queue is started and ready to return events on exit from this function\n\nunsigned long  HIDQueueDevice (pRecDevice pDevice)\n{\n    IOReturn result = kIOReturnError;\t// assume failure (pessimist!)\n    pRecElement pElement;\n\n\tif (HIDIsValidDevice(pDevice))\n\t{\n\t\t// error checking\n\t\tif (NULL == pDevice)\n\t\t{\n\t\t\tHIDREPORTERROR (\"HIDQueueDevice - Device does not exist.\");\n\t\t\treturn kIOReturnBadArgument;\n\t\t}\n\t\tif (NULL == pDevice->interface) // must have interface\n\t\t{\n\t\t\tHIDREPORTERROR (\"HIDQueueDevice - Device does not have interface.\");\n\t\t\treturn kIOReturnError;\n\t\t}\n\t\tif (NULL == pDevice->queue) // if no queue create queue\n\t\t\tresult = hid_CreateQueue (pDevice);\n\t\tif ((kIOReturnSuccess != result) || (NULL == pDevice->queue))\n\t\t{\n\t\t\tHIDREPORTERRORNUM (\"HIDQueueDevice - problem creating queue.\", result);\n\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\treturn result;\n\t\t\telse\n\t\t\t\treturn kIOReturnError;\n\t\t}\n\n\t\t// stop queue\n\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->stop (pDevice->queue);\n\t\tif (kIOReturnSuccess != result)\n\t\t\tHIDREPORTERRORNUM (\"HIDQueueDevice - Failed to stop queue.\", result);\n\n\t\t// queue element\n  // pElement = HIDGetFirstDeviceElement (pDevice, kHIDElementTypeIO);\n\t\tpElement = HIDGetFirstDeviceElement (pDevice, kHIDElementTypeInput | kHIDElementTypeFeature);\n\n\t\twhile (pElement)\n\t\t{\n\t\t\tif (!(*(IOHIDQueueInterface**) pDevice->queue)->hasElement (pDevice->queue, pElement->cookie))\n\t\t\t{\n\t\t\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->addElement (pDevice->queue, pElement->cookie, 0);\n\t\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\t\tHIDREPORTERRORNUM (\"HIDQueueDevice - Failed to add element to queue.\", result);\n\t\t\t}\n\t\t\t// pElement = HIDGetNextDeviceElement (pElement, kHIDElementTypeIO);\n\t\t\tpElement = HIDGetNextDeviceElement (pElement, kHIDElementTypeInput | kHIDElementTypeFeature);\n\t\t}\n\n\t\t// start queue\n\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->start (pDevice->queue);\n\t\tif (kIOReturnSuccess != result)\n\t\t\tHIDREPORTERRORNUM (\"HIDQueueDevice - Failed to start queue.\", result);\n\t\t\n\t}\n\telse\n\t\tHIDREPORTERROR (\"HIDQueueDevice - Invalid device.\");\n\n    return result;\n}\n\n// ---------------------------------\n// removes element for queue, if last element in queue will release queue and closes device interface\n\nunsigned long  HIDDequeueElement (pRecDevice pDevice, pRecElement pElement)\n{\n    IOReturn result = kIOReturnError;\t// assume failure (pessimist!)\n\n\tif (HIDIsValidElement(pDevice,pElement))\n\t{\n\t\tif (!pDevice || !pElement)\n\t\t\tresult = kIOReturnBadArgument;\n\t\telse\n\t\t{\n\t\t\tif ((pDevice->interface) && (pDevice->queue))\n\t\t\t{\n\t\t\t\t// stop queue\n\t\t\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->stop (pDevice->queue);\n\t\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\t\tHIDREPORTERRORNUM (\"HIDDequeueElement - Failed to stop queue.\", result);\n\n\t\t\t\tif ((*(IOHIDQueueInterface**) pDevice->queue)->hasElement (pDevice->queue, pElement->cookie)) // if has element then remove\n\t\t\t\t{\n\t\t\t\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->removeElement (pDevice->queue, pElement->cookie);\n\t\t\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\t\t\tHIDREPORTERRORNUM (\"HIDDequeueElement - Failed to add element to queue\", result);\n\t\t\t\t}\n\n\t\t\t\tif (hid_IsDeviceQueueEmpty (pDevice)) // release device queue and close interface if queue empty\n\t\t\t\t{\n\t\t\t\t\tresult = hid_DisposeReleaseQueue (pDevice);\n\t\t\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\t\t\tHIDREPORTERRORNUM (\"HIDDequeueElement - Failed to dispose and release queue.\", result);\n\t\t\t\t}\n\t\t\t\telse // not empty so restart queue\n\t\t\t\t{\n\t\t\t\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->start (pDevice->queue);\n\t\t\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\t\t\tHIDREPORTERRORNUM (\"HIDDequeueElement - Failed to start queue.\", result);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tHIDREPORTERROR (\"HIDDequeueElement - No device inteface or queue.\");\n\t\t\t\treturn kIOReturnError;\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t\tHIDREPORTERROR (\"HIDDequeueElement - Invalid device.\");\n\n    return result;\n}\n\n// ---------------------------------\n// completely removes all elements from queue and releases queue and closes device interface\n// does not release device interfaces, application must call HIDReleaseDeviceList on exit\n\nunsigned long  HIDDequeueDevice (pRecDevice pDevice)\n{\n    IOReturn result = kIOReturnSuccess;\n\n    if (HIDIsValidDevice(pDevice))\n\t{\n\t\tif ((pDevice->interface) && (pDevice->queue))\n\t\t{\n\t\t\t// iterate through elements and if queued, remove\n\t\t\tpRecElement pElement = HIDGetFirstDeviceElement (pDevice, kHIDElementTypeIO);\n\t\t\twhile (pElement)\n\t\t\t{\n\t\t\t\tif ((*(IOHIDQueueInterface**) pDevice->queue)->hasElement (pDevice->queue, pElement->cookie))\n\t\t\t\t{\n\t\t\t\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->removeElement (pDevice->queue, pElement->cookie);\n\t\t\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\t\t\tHIDREPORTERRORNUM (\"HIDDequeueDevice - Failed to remove element from queue.\", result);\n\t\t\t\t}\n\t\t\t\tpElement = HIDGetNextDeviceElement (pElement, kHIDElementTypeIO);\n\t\t\t}\n\t\t}\n\t\t// ensure queue is disposed and released\n\t\t// interface will be closed and released on call to HIDReleaseDeviceList\n\t\tresult = hid_DisposeReleaseQueue (pDevice);\n\t\tif (kIOReturnSuccess != result)\n\t\t\tHIDREPORTERRORNUM (\"removeElement - Failed to dispose and release queue.\", result);\n#if USE_ASYNC_EVENTS\n\t\telse if (NULL != pDevice->queueRunLoopSource)\n\t\t{\n\t\t\tif (CFRunLoopContainsSource(CFRunLoopGetCurrent(), pDevice->queueRunLoopSource, kCFRunLoopDefaultMode))\n\t\t\t\tCFRunLoopRemoveSource(CFRunLoopGetCurrent(), pDevice->queueRunLoopSource, kCFRunLoopDefaultMode);\n\t\t\tCFRelease(pDevice->queueRunLoopSource);\n\t\t\tpDevice->queueRunLoopSource = NULL;\n\t\t}\n#endif USE_ASYNC_EVENTS\n\t}\n\telse\n\t{\n\t\tHIDREPORTERROR (\"HIDDequeueDevice - Invalid device.\");\n\t\tresult = kIOReturnBadArgument;\n\t}\n    return result;\n}\n\n// ---------------------------------\n// releases all device queues for quit or rebuild (must be called)\n// does not release device interfaces, application must call HIDReleaseDeviceList on exit\n\nunsigned long HIDReleaseAllDeviceQueues (void)\n{\n    IOReturn result = kIOReturnBadArgument;\n    pRecDevice pDevice = HIDGetFirstDevice ();\n\n    while (pDevice)\n    {\n        result = HIDDequeueDevice (pDevice);\n        if (kIOReturnSuccess != result)\n            HIDREPORTERRORNUM (\"HIDReleaseAllDeviceQueues - Could not dequeue device.\", result);\n        pDevice = HIDGetNextDevice (pDevice);\n    }\n    return result;\n}\n\n// ---------------------------------\n// Closes and releases interface to device, should be done prior to exting application\n// Note: will have no affect if device or interface do not exist\n// application will \"own\" the device if interface is not closed\n// (device may have to be plug and re-plugged in different location to get it working again without a restart)\n\nunsigned long HIDCloseReleaseInterface (pRecDevice pDevice)\n{\n\tIOReturn result = kIOReturnSuccess;\n\t\n\tif (HIDIsValidDevice(pDevice) && (NULL != pDevice->interface))\n\t{\n\t\t// close the interface\n\t\tresult = (*(IOHIDDeviceInterface**) pDevice->interface)->close (pDevice->interface);\n\t\tif (kIOReturnNotOpen == result)\n\t\t{\n\t\t\t//  do nothing as device was not opened, thus can't be closed\n\t\t}\n\t\telse if (kIOReturnSuccess != result)\n\t\t\tHIDREPORTERRORNUM (\"HIDCloseReleaseInterface - Failed to close IOHIDDeviceInterface.\", result);\n\t\t//release the interface\n\t\tresult = (*(IOHIDDeviceInterface**) pDevice->interface)->Release (pDevice->interface);\n\t\tif (kIOReturnSuccess != result)\n\t\t\tHIDREPORTERRORNUM (\"HIDCloseReleaseInterface - Failed to release interface.\", result);\n\t\tpDevice->interface = NULL;\n\t}\t\n\treturn result;\n}      \n\n// ---------------------------------\n// Get the next event in the queue for a device\n// elements or entire device should be queued prior to calling this with HIDQueueElement or HIDQueueDevice\n// returns true if an event is avialable for the element and fills out *pHIDEvent structure, returns false otherwise\n// Note: kIOReturnUnderrun returned from getNextEvent indicates an empty queue not an error condition\n// Note: application should pass in a pointer to a IOHIDEventStruct cast to a void (for CFM compatibility)\n\nunsigned char HIDGetEvent (pRecDevice pDevice, void * pHIDEvent)\n{\n    IOReturn result = kIOReturnBadArgument;\n    AbsoluteTime zeroTime = {0,0};\n\n    if (HIDIsValidDevice(pDevice))\n\t{\n\t\tif (pDevice->queue)\n\t\t{\n\t\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->getNextEvent (pDevice->queue, (IOHIDEventStruct *)pHIDEvent, zeroTime, 0);\n\t\t\tif (kIOReturnUnderrun == result)\n\t\t\t\treturn false;  // no events in queue not an error per say\n\t\t\telse if (kIOReturnSuccess != result) // actual error versus just an empty queue\n\t\t\t\tHIDREPORTERRORNUM (\"HIDGetEvent - Could not get HID event via getNextEvent.\", result);\n\t\t\telse\n\t\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\tHIDREPORTERROR (\"HIDGetEvent - queue does not exist.\");\n\t}\n\telse\n\t\tHIDREPORTERROR (\"HIDGetEvent - invalid device.\");\n\n    return false; // did not get event\n}\n\n// ---------------------------------\n// returns current value for element, polling element\n// will return 0 on error conditions which should be accounted for by application\n\nlong HIDGetElementValue (pRecDevice pDevice, pRecElement pElement)\n{\n    IOReturn result = kIOReturnBadArgument;\n    IOHIDEventStruct hidEvent;\n\n\thidEvent.value = 0;\n    hidEvent.longValueSize = 0;\n\thidEvent.longValue = nil;\n\n\tif (HIDIsValidElement(pDevice, pElement))\n\t{\n\t\tif (NULL != pDevice->interface)\n\t\t{\n\t\t\t// ++ NOTE: If the element type is feature then use queryElementValue instead of getElementValue\n\t\t\tif (kIOHIDElementTypeFeature == pElement->type)\n\t\t\t{\n\t\t\t\tresult = (*(IOHIDDeviceInterface**) pDevice->interface)->queryElementValue (pDevice->interface, pElement->cookie, &hidEvent,0,NULL,NULL,NULL);\n\t\t\t\tif (kIOReturnUnsupported == result)\t// unless it's unsuported.\n\t\t\t\t\tgoto try_getElementValue;\n\t\t\t\telse if (kIOReturnSuccess != result)\n\t\t\t\t\tHIDREPORTERRORNUM (\"HIDGetElementValue - Could not get HID element value via queryElementValue.\", result);\n\t\t\t}\n\t\t\telse if (pElement->type <= kIOHIDElementTypeInput_ScanCodes)\n\t\t\t{\ntry_getElementValue:\n\t\t\t\tresult = (*(IOHIDDeviceInterface**) pDevice->interface)->getElementValue (pDevice->interface, pElement->cookie, &hidEvent);\n\t\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\t\tHIDREPORTERRORNUM (\"HIDGetElementValue - Could not get HID element value via getElementValue.\", result);\n\t\t\t}\n\t\t\t// on 10.0.x this returns the incorrect result for negative ranges, so fix it!!!\n   // this is not required on Mac OS X 10.1+\n\t\t\tif ((pElement->min < 0) && (hidEvent.value > pElement->max)) // assume range problem\n\t\t\t\thidEvent.value = hidEvent.value + pElement->min - pElement->max - 1;\n\t\t}\n\t\telse\n\t\t\tHIDREPORTERROR (\"HIDGetElementValue - no interface for device.\");\n\t}\n\telse\n\t\tHIDREPORTERROR (\"HIDGetElementValue - invalid device and/or element.\");\n\n    // record min and max for auto scale and auto ...\n    if (hidEvent.value < pElement->calMin)\n        pElement->calMin = hidEvent.value; \n    if (hidEvent.value > pElement->calMax)\n        pElement->calMax = hidEvent.value; \n\n    // auto user scale\n    return hidEvent.value;\n}\n\n// ---------------------------------\n// Set an elements value\n// NOTE: This should only be used when a single element of a report needs to be sent.\n// If multiple elements are to be send then transactions should be used.\n\nlong HIDSetElementValue (pRecDevice pDevice, pRecElement pElement,void* pIOHIDEvent)\n{\n\tIOHIDEventStruct* pMyIOHIDEvent = (IOHIDEventStruct*) pIOHIDEvent;\n    IOReturn result = kIOReturnError;\t// assume failure (pessimist!)\n\n\tif (HIDIsValidElement(pDevice, pElement))\n\t{\n\t\tif (NULL != pDevice->interface)\n\t\t{\n\t\t\tresult = (*(IOHIDDeviceInterface**) pDevice->interface)->setElementValue (pDevice->interface, pElement->cookie, pMyIOHIDEvent, -1, nil, nil, nil);\n\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\tHIDREPORTERRORNUM (\"HIDSetElementValue - Could not set HID element value via setElementValue.\", result);\n\t\t}\n\t\telse\n\t\t\tHIDREPORTERROR (\"HIDSetElementValue - no interface for device.\");\n\t}\n\telse\n\t\tHIDREPORTERROR (\"HIDSetElementValue - invalid device and/or element.\");\n\t\n    return result;\n}\n\n// ---------------------------------\n// Set a callback to be called when a queue goes from empty to non-empty\nlong HIDSetQueueCallback (pRecDevice pDevice, IOHIDCallbackFunction callback)\n{\n    IOReturn result = kIOReturnError;\t// assume failure (pessimist!)\n\n\tif (HIDIsValidDevice(pDevice))\n\t{\n#if USE_ASYNC_EVENTS\n\t\t// if we don't have a queue runloop source\n\t\tif (NULL == pDevice->queueRunLoopSource)\n\t\t{\n\t\t\t// then create one\n\t\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->createAsyncEventSource((void *) pDevice->queue,\n\t\t\t\t(CFRunLoopSourceRef*) &pDevice->queueRunLoopSource);\n\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\tHIDREPORTERRORNUM (\"HIDSetQueueCallback - Failed to createAsyncEventSource error: \", result);\n\t\t}\n\t\t// if we have one now\n\t\tif (NULL != pDevice->queueRunLoopSource)\n\t\t{\n\t\t\t// and it's not already attached to our runloop\n\t\t\tif (!CFRunLoopContainsSource(CFRunLoopGetCurrent(), pDevice->queueRunLoopSource, kCFRunLoopDefaultMode))\n\t\t\t\t// then attach it now.\n\t\t\t\tCFRunLoopAddSource(CFRunLoopGetCurrent(), pDevice->queueRunLoopSource, kCFRunLoopDefaultMode);\n\t\t}\n\n\t\t// now install our callback\n\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->setEventCallout(pDevice->queue, callback, pDevice, pDevice);\n\t\tif (kIOReturnSuccess != result)\n\t\t\tHIDREPORTERRORNUM (\"HIDSetQueueCallback - Could not set HID queue callback via setEventCallout.\", result);\n#endif USE_ASYNC_EVENTS\n\t}\n\telse\n\t\tHIDREPORTERROR (\"HIDSetQueueCallback - invalid device and/or element.\");\n    return result;\n}\n\n#if 1\n// ---------------------------------\n// Get a report from a device\nlong HIDGetReport (pRecDevice pDevice,const IOHIDReportType reportType, const UInt32 reportID, void* reportBuffer, UInt32* reportBufferSize);\nlong HIDGetReport (pRecDevice pDevice,const IOHIDReportType reportType, const UInt32 reportID, void* reportBuffer, UInt32* reportBufferSize)\n{\n    IOReturn result = kIOReturnError;\t// assume failure (pessimist!)\n\n    if (HIDIsValidDevice(pDevice))\n    {\n\t\tif (NULL != pDevice->interface)\n\t\t{\n\t\t\tresult = (*(IOHIDDeviceInterface**) pDevice->interface)->getReport (pDevice->interface, reportType, reportID, reportBuffer, reportBufferSize, -1, nil, nil, nil);\n\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\tHIDREPORTERRORNUM (\"HIDGetReport - Could not getReport, error: \", result);\n\t\t}\n\t\telse\n\t\t\tHIDREPORTERROR (\"HIDGetReport - no interface for device.\");\n    }\n    else\n        HIDREPORTERROR (\"HIDGetReport - invalid device.\");\n\n    return result;\n}\n\n// ---------------------------------\n// Send a report to a device\nlong HIDSetReport (pRecDevice pDevice,const IOHIDReportType reportType, const UInt32 reportID, void* reportBuffer, const UInt32 reportBufferSize);\nlong HIDSetReport (pRecDevice pDevice,const IOHIDReportType reportType, const UInt32 reportID, void* reportBuffer, const UInt32 reportBufferSize)\n{\n    IOReturn result = kIOReturnError;\t// assume failure (pessimist!)\n\n    if (HIDIsValidDevice(pDevice))\n    {\n\t\tif (NULL != pDevice->interface)\n\t\t{\n\t\t\tresult = (*(IOHIDDeviceInterface**) pDevice->interface)->setReport (pDevice->interface, reportType, reportID, reportBuffer, reportBufferSize, -1, nil, nil, nil);\n\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\tHIDREPORTERRORNUM (\"HIDGetReport - Could not setReport; error: \", result);\n\t\t}\n\t\telse\n\t\t\tHIDREPORTERROR (\"HIDGetReport - no interface for device.\");\n    }\n    else\n        HIDREPORTERROR (\"HIDGetReport - invalid device.\");\n\n    return result;\n}\n#endif"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/JoystickTabletPlugin/HID_Queue_Utilities.h",
    "content": "/*\n\tFile:\t\tHID_Queue_Utilities.h\n\n\tContains:\tDefinition of the HID queue functions for the HID utilites.\n    \n\tDRI: George Warner\n\n\tCopyright:\tCopyright  2002 Apple Computer, Inc., All Rights Reserved\n\n\tDisclaimer:\tIMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc.\n\t\t\t\t(\"Apple\") in consideration of your agreement to the following terms, and your\n\t\t\t\tuse, installation, modification or redistribution of this Apple software\n\t\t\t\tconstitutes acceptance of these terms.  If you do not agree with these terms,\n\t\t\t\tplease do not use, install, modify or redistribute this Apple software.\n\n\t\t\t\tIn consideration of your agreement to abide by the following terms, and subject\n\t\t\t\tto these terms, Apple grants you a personal, non-exclusive license, under Apples\n\t\t\t\tcopyrights in this original Apple software (the \"Apple Software\"), to use,\n\t\t\t\treproduce, modify and redistribute the Apple Software, with or without\n\t\t\t\tmodifications, in source and/or binary forms; provided that if you redistribute\n\t\t\t\tthe Apple Software in its entirety and without modifications, you must retain\n\t\t\t\tthis notice and the following text and disclaimers in all such redistributions of\n\t\t\t\tthe Apple Software.  Neither the name, trademarks, service marks or logos of\n\t\t\t\tApple Computer, Inc. may be used to endorse or promote products derived from the\n\t\t\t\tApple Software without specific prior written permission from Apple.  Except as\n\t\t\t\texpressly stated in this notice, no other rights or licenses, express or implied,\n\t\t\t\tare granted by Apple herein, including but not limited to any patent rights that\n\t\t\t\tmay be infringed by your derivative works or by other works in which the Apple\n\t\t\t\tSoftware may be incorporated.\n\n\t\t\t\tThe Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE MAKES NO\n\t\t\t\tWARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED\n\t\t\t\tWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n\t\t\t\tPURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN\n\t\t\t\tCOMBINATION WITH YOUR PRODUCTS.\n\n\t\t\t\tIN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR\n\t\t\t\tCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n\t\t\t\tGOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n\t\t\t\tARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION\n\t\t\t\tOF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT\n\t\t\t\t(INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN\n\t\t\t\tADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n#ifndef _HID_Queue_Utilities_h_\n#define _HID_Queue_Utilities_h_\n\n#include \"HID_Utilities.h\"\n\n// ==================================\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n// ==================================\n\nenum\n{\n    kDeviceQueueSize = 50\t// this is wired kernel memory so should be set to as small as possible\n\t\t\t\t\t\t\t// but should account for the maximum possible events in the queue\n\t\t\t\t\t\t\t// USB updates will likely occur at 100 Hz so one must account for this rate of\n\t\t\t\t\t\t\t// if states change quickly (updates are only posted on state changes)\n};\n\n// ==================================\n// queues specific element, performing any device queue set up required\nextern unsigned long  HIDQueueElement (pRecDevice pDevice, pRecElement pElement);\n\n// adds all elements to queue, performing any device queue set up required\nextern unsigned long  HIDQueueDevice (pRecDevice pDevice);\n\n// removes element for queue, if last element in queue will release queue and device\nextern unsigned long  HIDDequeueElement (pRecDevice pDevice, pRecElement pElement);\n\n// completely removes all elements from queue and releases queue and device\nextern unsigned long  HIDDequeueDevice (pRecDevice pDevice);\n\n// releases all device queues for quit or rebuild (must be called)\nextern unsigned long  HIDReleaseAllDeviceQueues (void);\n\n// releases interface to device, should be done prior to exiting application (called from HIDReleaseDeviceList)\nextern unsigned long  HIDCloseReleaseInterface (pRecDevice pDevice);\n\n// returns true if an event is avialable for the element and fills out *pHIDEvent structure, returns false otherwise\n// pHIDEvent is a poiner to a IOHIDEventStruct, using void here for compatibility, users can cast a required\nextern unsigned char HIDGetEvent (pRecDevice pDevice, void * pHIDEvent);\n\n// returns current value for element, creating device interface as required, polling element\nextern long HIDGetElementValue (pRecDevice pDevice, pRecElement pElement);\n\n// Set an elements value\n// NOTE: This should only be used when a single element report needs to be sent.\n// If multiple elements reports are to be send then transactions should be used.\nextern long HIDSetElementValue (pRecDevice pDevice, pRecElement pElement,IOHIDEventStruct* pIOHIDEvent);\n\n// Set a callback to be called when a queue goes from empty to non-empty\nextern long HIDSetQueueCallback (pRecDevice pDevice, IOHIDCallbackFunction callback);\n\n#if 0\n// Get a report from a device\nextern long HIDGetReport (pRecDevice pDevice,const IOHIDReportType reportType, const UInt32 reportID, void* reportBuffer, UInt32* reportBufferSize);\n\n// Send a report to a device\nextern long HIDSetReport (pRecDevice pDevice,const IOHIDReportType reportType, const UInt32 reportID, void* reportBuffer, const UInt32 reportBufferSize);\n#endif\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif // _HID_Queue_Utilities_h_\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/JoystickTabletPlugin/HID_Utilities.c",
    "content": "/*\n\tFile:\t\tHID_Utilities.c\n\n\tContains:\tImplementation of HID Utilities\n    \n\tDRI: George Warner\n\n\tCopyright:\tCopyright  2002 Apple Computer, Inc., All Rights Reserved\n\n\tDisclaimer:\tIMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc.\n\t\t\t\t(\"Apple\") in consideration of your agreement to the following terms, and your\n\t\t\t\tuse, installation, modification or redistribution of this Apple software\n\t\t\t\tconstitutes acceptance of these terms.  If you do not agree with these terms,\n\t\t\t\tplease do not use, install, modify or redistribute this Apple software.\n\n\t\t\t\tIn consideration of your agreement to abide by the following terms, and subject\n\t\t\t\tto these terms, Apple grants you a personal, non-exclusive license, under Apples\n\t\t\t\tcopyrights in this original Apple software (the \"Apple Software\"), to use,\n\t\t\t\treproduce, modify and redistribute the Apple Software, with or without\n\t\t\t\tmodifications, in source and/or binary forms; provided that if you redistribute\n\t\t\t\tthe Apple Software in its entirety and without modifications, you must retain\n\t\t\t\tthis notice and the following text and disclaimers in all such redistributions of\n\t\t\t\tthe Apple Software.  Neither the name, trademarks, service marks or logos of\n\t\t\t\tApple Computer, Inc. may be used to endorse or promote products derived from the\n\t\t\t\tApple Software without specific prior written permission from Apple.  Except as\n\t\t\t\texpressly stated in this notice, no other rights or licenses, express or implied,\n\t\t\t\tare granted by Apple herein, including but not limited to any patent rights that\n\t\t\t\tmay be infringed by your derivative works or by other works in which the Apple\n\t\t\t\tSoftware may be incorporated.\n\n\t\t\t\tThe Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE MAKES NO\n\t\t\t\tWARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED\n\t\t\t\tWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n\t\t\t\tPURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN\n\t\t\t\tCOMBINATION WITH YOUR PRODUCTS.\n\n\t\t\t\tIN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR\n\t\t\t\tCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n\t\t\t\tGOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n\t\t\t\tARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION\n\t\t\t\tOF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT\n\t\t\t\t(INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN\n\t\t\t\tADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n#include \"HID_Utilities_Internal.h\"\n#include \"HID_Utilities_External.h\"\n\n#include <IOKit/IOCFPlugIn.h>\n#include <IOKit/IOKitLib.h>\n#include <IOKit/IOMessage.h>\n#include <IOKit/hid/IOHIDUsageTables.h>\n\n//================================================================================================\n#define USE_NOTIFICATIONS 1\n//================================================================================================\n// local (static) functions\n//================================================================================================\nstatic void hid_GetCollectionElements (CFMutableDictionaryRef deviceProperties, pRecElement *ppCurrentCollection);\nstatic pRecDevice hid_DisposeDevice (pRecDevice ppDevice);\n//================================================================================================\n//   globals\n//================================================================================================\n#if USE_NOTIFICATIONS\nstatic IONotificationPortRef\tgNotifyPort;\nstatic io_iterator_t\t\tgAddedIter;\nstatic CFRunLoopRef\t\tgRunLoop;\n#endif USE_NOTIFICATIONS\n\n// for element retrieval\nstatic pRecDevice gCurrentGetDevice = NULL;\nstatic Boolean gAddAsChild = false;\nstatic int gDepth = false;\n\nstatic pRecDevice gpDeviceList = NULL;\nstatic UInt32 gNumDevices = 0;\n\n#pragma mark private functions\n// ==================================\n// private functions\n\nstatic UInt32 hid_CountCurrentDevices (void);\n\n// extracts actual specific element information from each element CF dictionary entry\nstatic void hid_GetElementInfo (CFTypeRef refElement, pRecElement pElement)\n{\n\tlong number;\n\tCFTypeRef refType;\n\t// type, usagePage, usage already stored\n\trefType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementCookieKey));\n\tif (refType && CFNumberGetValue (refType, kCFNumberLongType, &number))\n\t\tpElement->cookie = (IOHIDElementCookie) number;\n\telse\n\t\tpElement->cookie = (IOHIDElementCookie) 0;\n\n\trefType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementMinKey));\n\tif (refType && CFNumberGetValue (refType, kCFNumberLongType, &number))\n\t\tpElement->min = number;\n\telse\n\t\tpElement->min = 0;\n\n\tpElement->calMax = pElement->min;\n\tpElement->userMin = kDefaultUserMin;\n\n\trefType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementMaxKey));\n\tif (refType && CFNumberGetValue (refType, kCFNumberLongType, &number))\n\t\tpElement->max = number;\n\telse\n\t\tpElement->max = 0;\n\n\tpElement->calMin = pElement->max;\n\tpElement->userMax = kDefaultUserMax;\n\n\trefType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementScaledMinKey));\n\tif (refType && CFNumberGetValue (refType, kCFNumberLongType, &number))\n\t\tpElement->scaledMin = number;\n\telse\n\t\tpElement->scaledMin = 0;\n\n\trefType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementScaledMaxKey));\n\tif (refType && CFNumberGetValue (refType, kCFNumberLongType, &number))\n\t\tpElement->scaledMax = number;\n\telse\n\t\tpElement->scaledMax = 0;\n\n\trefType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementSizeKey));\n\tif (refType && CFNumberGetValue (refType, kCFNumberLongType, &number))\n\t\tpElement->size = number;\n\telse\n\t\tpElement->size = 0;\n\n\trefType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementIsRelativeKey));\n\tif (refType)\n\t\tpElement->relative = CFBooleanGetValue (refType);\n\telse\n\t\tpElement->relative = 0;\n\n\trefType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementIsWrappingKey));\n\tif (refType)\n\t\tpElement->wrapping = CFBooleanGetValue (refType);\n\telse\n\t\tpElement->wrapping = false;\n\n\trefType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementIsNonLinearKey));\n\tif (refType)\n\t\tpElement->nonLinear = CFBooleanGetValue (refType);\n\telse\n\t\tpElement->wrapping = false;\n\n#ifdef kIOHIDElementHasPreferredStateKey\n\trefType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementHasPreferredStateKey));\n#else // Mac OS X 10.0 has spelling error\n\trefType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementHasPreferedStateKey));\n#endif\n\tif (refType)\n\t\tpElement->preferredState = CFBooleanGetValue (refType);\n\telse\n\t\tpElement->preferredState = false;\n\n\trefType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementHasNullStateKey));\n\tif (refType)\n\t\tpElement->nullState = CFBooleanGetValue (refType);\n\telse\n\t\tpElement->nullState = false;\n\n\trefType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementUnitKey));\n\tif (refType && CFNumberGetValue (refType, kCFNumberLongType, &number))\n\t\tpElement->units = number;\n\telse\n\t\tpElement->units = 0;\n\n\trefType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementUnitExponentKey));\n\tif (refType && CFNumberGetValue (refType, kCFNumberLongType, &number))\n\t\tpElement->unitExp = number;\n\telse\n\t\tpElement->unitExp = 0;\n\n\trefType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementNameKey));\n\tif (refType)\n\t\tif (!CFStringGetCString (refType, pElement->name, 256, CFStringGetSystemEncoding ()))\n\t\t\tHIDReportError (\"CFStringGetCString error retrieving pElement->name.\");\n\tif (!*pElement->name)\n\t{\n\t\t// set name from vendor id, product id & usage info look up\n\t\tif (!HIDGetElementNameFromVendorProductUsage (gCurrentGetDevice->vendorID, gCurrentGetDevice->productID, pElement->usagePage, pElement->usage, pElement->name))\n\t\t{\n\t\t\t// set name from vendor id/product id look up\n\t\t\tHIDGetElementNameFromVendorProductCookie (gCurrentGetDevice->vendorID, gCurrentGetDevice->productID, (long) pElement->cookie, pElement->name);\n\t\t\tif (!*pElement->name) { // if no name\n\t\t\t\tHIDGetUsageName (pElement->usagePage, pElement->usage, pElement->name);\n\t\t\t\tif (!*pElement->name) // if not usage\n\t\t\t\t\tsprintf (pElement->name, \"Element\");\n\t\t\t}\n\t\t}\n\t}\n}\n\n// ---------------------------------\n// examines CF dictionary vlaue in device element hierarchy to determine if it is element of interest or a collection of more elements\n// if element of interest allocate storage, add to list and retrieve element specific info\n// if collection then pass on to deconstruction collection into additional individual elements\n\nstatic void hid_AddElement (CFTypeRef refElement, pRecElement * ppElementCurrent)\n{\n\tpRecDevice pDevice = gCurrentGetDevice;\n    pRecElement pElement = NULL;\n    long elementType, usagePage, usage;\n    CFTypeRef refElementType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementTypeKey));\n    CFTypeRef refUsagePage = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementUsagePageKey));\n    CFTypeRef refUsage = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementUsageKey));\n\n    if (refElementType)\n\t\tCFNumberGetValue (refElementType, kCFNumberLongType, &elementType);\n\tif (refUsagePage)\n\t\tCFNumberGetValue (refUsagePage, kCFNumberLongType, &usagePage);\n\tif (refUsage)\n\t\tCFNumberGetValue (refUsage, kCFNumberLongType, &usage);\n\n\tif (NULL == pDevice)\n\t\treturn;\n\n    if (elementType)\n    {\n        // look at types of interest\n        if (elementType != kIOHIDElementTypeCollection)\n\t\t{\n            if (usagePage && usage) // if valid usage and page\n\t\t\t{\n\t\t\t\tswitch (usagePage) // only interested in kHIDPage_GenericDesktop and  kHIDPage_Button\n\t\t\t\t{\n\t\t\t\t\tcase kHIDPage_GenericDesktop:\n\t\t\t\t\t{\n\t\t\t\t\t\tswitch (usage) // look at usage to determine function\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase kHIDUsage_GD_X:\n\t\t\t\t\t\t\tcase kHIDUsage_GD_Y:\n\t\t\t\t\t\t\tcase kHIDUsage_GD_Z:\n\t\t\t\t\t\t\tcase kHIDUsage_GD_Rx:\n\t\t\t\t\t\t\tcase kHIDUsage_GD_Ry:\n\t\t\t\t\t\t\tcase kHIDUsage_GD_Rz:\n\t\t\t\t\t\t\t\tpElement = (pRecElement) malloc (sizeof (recElement));\n\t\t\t\t\t\t\t\tif (pElement) pDevice->axis++;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase kHIDUsage_GD_Slider:\n\t\t\t\t\t\t\t\tpElement = (pRecElement) malloc (sizeof (recElement));\n\t\t\t\t\t\t\t\tif (pElement) pDevice->sliders++;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase kHIDUsage_GD_Dial:\n\t\t\t\t\t\t\t\tpElement = (pRecElement) malloc (sizeof (recElement));\n\t\t\t\t\t\t\t\tif (pElement) pDevice->dials++;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase kHIDUsage_GD_Wheel:\n\t\t\t\t\t\t\t\tpElement = (pRecElement) malloc (sizeof (recElement));\n\t\t\t\t\t\t\t\tif (pElement) pDevice->wheels++;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase kHIDUsage_GD_Hatswitch:\n\t\t\t\t\t\t\t\tpElement = (pRecElement) malloc (sizeof (recElement));\n\t\t\t\t\t\t\t\tif (pElement) pDevice->hats++;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tpElement = (pRecElement) malloc (sizeof (recElement));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase kHIDPage_Button:\n\t\t\t\t\t\tpElement = (pRecElement) malloc (sizeof (recElement));\n\t\t\t\t\t\tif (pElement) pDevice->buttons++;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// just add a generic element\n\t\t\t\t\t\tpElement = (pRecElement) malloc (sizeof (recElement));\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n#if 0\n            else\n                HIDReportError (\"CFNumberGetValue error when getting value for refUsage or refUsagePage.\");\n#endif 0\n        }\n        else // collection\n\t\t\tpElement = (pRecElement) malloc (sizeof (recElement));\n    }\n    else\n        HIDReportError (\"CFNumberGetValue error when getting value for refElementType.\");\n\n    if (pElement) // add to list\n    {\n\t\t// this code builds a binary tree based on the collection hierarchy of inherent in the device element layout\n\t\t// it preserves the structure of the lements as collections have children and elements are siblings to each other\n\n\t\t// clear record\n\t\tbzero(pElement,sizeof(recElement));\n\n\t\t// get element info\n        pElement->type = elementType;\n        pElement->usagePage = usagePage;\n        pElement->usage = usage;\n        pElement->depth = 0;\t\t// assume root object\n        hid_GetElementInfo (refElement, pElement);\n\n\t\t// count elements\n\t\tpDevice->totalElements++;\n\n\t\tswitch (pElement->type)\n\t\t{\n\t\t\tcase kIOHIDElementTypeInput_Misc:\n\t\t\tcase kIOHIDElementTypeInput_Button:\n\t\t\tcase kIOHIDElementTypeInput_Axis:\n\t\t\tcase kIOHIDElementTypeInput_ScanCodes:\n\t\t\t\tpDevice->inputs++;\n\t\t\t\tbreak;\n\t\t\tcase kIOHIDElementTypeOutput:\n\t\t\t\tpDevice->outputs++;\n\t\t\t\tbreak;\n\t\t\tcase kIOHIDElementTypeFeature:\n\t\t\t\tpDevice->features++;\n\t\t\t\tbreak;\n\t\t\tcase kIOHIDElementTypeCollection:\n\t\t\t\tpDevice->collections++;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tHIDReportErrorNum (\"Unknown element type : \", pElement->type);\n\t\t}\n\n        if (NULL == *ppElementCurrent) // if at list head\n\t\t{\n            pDevice->pListElements = pElement; // add current element\n\t\t\t*ppElementCurrent = pElement; // set current element to element we just added\n\t\t}\n\t\telse // have exsiting structure\n\t\t{\n\t\t\tif (gAddAsChild) // if the previous element was a collection, let's add this as a child of the previous\n\t\t\t{\n\t\t\t\t// this iteration should not be needed but there maybe some untested degenerate case which this code will ensure works\n\t\t\t\twhile ((*ppElementCurrent)->pChild) // step down tree until free child node found\n\t\t\t\t\t*ppElementCurrent = (*ppElementCurrent)->pChild;\n\t\t\t\t(*ppElementCurrent)->pChild = pElement; // insert there\n\t\t\t\tpElement->depth = (*ppElementCurrent)->depth + 1;\n\t\t\t}\n\t\t\telse // add as sibling\n\t\t\t{\n\t\t\t\t// this iteration should not be needed but there maybe some untested degenerate case which this code will ensure works\n\t\t\t\twhile ((*ppElementCurrent)->pSibling) // step down tree until free sibling node found\n\t\t\t\t\t*ppElementCurrent = (*ppElementCurrent)->pSibling;\n\t\t\t\t(*ppElementCurrent)->pSibling = pElement; // insert there\n\t\t\t\tpElement->depth = (*ppElementCurrent)->depth;\n\t\t\t}\n\t\t\tpElement->pPrevious = *ppElementCurrent; // point to previous\n\t\t\t*ppElementCurrent = pElement; // set current to our collection\n\t\t}\n\n\t\tif (elementType == kIOHIDElementTypeCollection) // if this element is a collection of other elements\n\t\t{\n\t\t\tgAddAsChild = true; // add next set as children to this element\n\t\t\tgDepth++;\n\t\t\thid_GetCollectionElements ((CFMutableDictionaryRef) refElement, &pElement); // recursively process the collection\n\t\t\tgDepth--;\n\t\t}\n\t\tgAddAsChild = false; // add next as this elements sibling (when return from a collection or with non-collections)\n    }\n#if 0\n    else\n        HIDReportError (\"hid_AddElement - no element added.\");\n#endif\n}\n\n// ---------------------------------\n// collects information from each array member in device element list (each array memeber = element)\n\nstatic void hid_GetElementsCFArrayHandler (const void * value, void * parameter)\n{\n    if (CFGetTypeID (value) == CFDictionaryGetTypeID ())\n        hid_AddElement ((CFTypeRef) value, (pRecElement *) parameter);\n}\n\n// ---------------------------------\n// handles retrieval of element information from arrays of elements in device IO registry information\n\nstatic void hid_GetElements (CFTypeRef refElementCurrent, pRecElement *ppCurrentElement)\n{\n    CFTypeID type = CFGetTypeID (refElementCurrent);\n    if (type == CFArrayGetTypeID()) // if element is an array\n    {\n        CFRange range = {0, CFArrayGetCount (refElementCurrent)};\n        // CountElementsCFArrayHandler called for each array member\n        CFArrayApplyFunction (refElementCurrent, range, hid_GetElementsCFArrayHandler, ppCurrentElement);\n    }\n}\n\n// ---------------------------------\n// handles extracting element information from element collection CF types\n// used from top level element decoding and hierarchy deconstruction to flatten device element list\n\nstatic void hid_GetCollectionElements (CFMutableDictionaryRef deviceProperties, pRecElement *ppCurrentCollection)\n{\n    CFTypeRef refElementTop = CFDictionaryGetValue (deviceProperties, CFSTR(kIOHIDElementKey));\n    if (refElementTop)\n        hid_GetElements (refElementTop, ppCurrentCollection);\n    else\n        HIDReportError (\"hid_GetCollectionElements: CFDictionaryGetValue error when creating CFTypeRef for kIOHIDElementKey.\");\n}\n\n// ---------------------------------\n// use top level element usage page and usage to discern device usage page and usage setting appropriate values in device record\n\nstatic void hid_TopLevelElementHandler (const void * value, void * parameter)\n{\n    CFTypeRef refCF = 0;\n    if ((NULL == value) || (NULL == parameter))\n        return;\t// (kIOReturnBadArgument)\n    if (CFGetTypeID (value) != CFDictionaryGetTypeID ())\n        return;\t// (kIOReturnBadArgument)\n    refCF = CFDictionaryGetValue (value, CFSTR(kIOHIDElementUsagePageKey));\n    if (!CFNumberGetValue (refCF, kCFNumberLongType, &((pRecDevice) parameter)->usagePage))\n        HIDReportError (\"CFNumberGetValue error retrieving pDevice->usagePage.\");\n    refCF = CFDictionaryGetValue (value, CFSTR(kIOHIDElementUsageKey));\n    if (!CFNumberGetValue (refCF, kCFNumberLongType, &((pRecDevice) parameter)->usage))\n        HIDReportError (\"CFNumberGetValue error retrieving pDevice->usage.\");\n}\n\n// ---------------------------------\n// extracts device info from CF dictionary records in IO registry\n\nstatic void hid_GetDeviceInfo (io_object_t hidDevice, CFMutableDictionaryRef hidProperties, pRecDevice pDevice)\n{\n\tCFMutableDictionaryRef usbProperties = 0;\n\tio_registry_entry_t parent1, parent2;\n\n    // Mac OS X currently is not mirroring all USB properties to HID page so need to look at USB device page also\n    // get dictionary for usb properties: step up two levels and get CF dictionary for USB properties\n    if ((KERN_SUCCESS == IORegistryEntryGetParentEntry (hidDevice, kIOServicePlane, &parent1)) &&\n        (KERN_SUCCESS == IORegistryEntryGetParentEntry (parent1, kIOServicePlane, &parent2)) &&\n        (KERN_SUCCESS == IORegistryEntryCreateCFProperties (parent2, &usbProperties, kCFAllocatorDefault, kNilOptions)))\n    {\n        if (usbProperties)\n        {\n            CFTypeRef refCF = 0;\n            // get device info\n            // try hid dictionary first, if fail then go to usb dictionary\n\n            // get transport\n            refCF = CFDictionaryGetValue (hidProperties, CFSTR(kIOHIDTransportKey));\n            if (refCF)\n            {\n\t\t\t\tif (!CFStringGetCString (refCF, pDevice->transport, 256, CFStringGetSystemEncoding ()))\n                    HIDReportError (\"CFStringGetCString error retrieving pDevice->transport.\");\n            }\n\n            // get vendorID\n            refCF = CFDictionaryGetValue (hidProperties, CFSTR(kIOHIDVendorIDKey));\n            if (!refCF)\n                refCF = CFDictionaryGetValue (usbProperties, CFSTR(\"idVendor\"));\n            if (refCF)\n            {\n                if (!CFNumberGetValue (refCF, kCFNumberLongType, &pDevice->vendorID))\n                    HIDReportError (\"CFNumberGetValue error retrieving pDevice->vendorID.\");\n            }\n\n            // get product ID\n            refCF = CFDictionaryGetValue (hidProperties, CFSTR(kIOHIDProductIDKey));\n            if (!refCF)\n                refCF = CFDictionaryGetValue (usbProperties, CFSTR(\"idProduct\"));\n            if (refCF)\n            {\n                if (!CFNumberGetValue (refCF, kCFNumberLongType, &pDevice->productID))\n                    HIDReportError (\"CFNumberGetValue error retrieving pDevice->productID.\");\n            }\n\n            // get product version\n            refCF = CFDictionaryGetValue (hidProperties, CFSTR(kIOHIDVersionNumberKey));\n            if (refCF)\n            {\n                if (!CFNumberGetValue (refCF, kCFNumberLongType, &pDevice->version))\n                    HIDReportError (\"CFNumberGetValue error retrieving pDevice->version.\");\n            }\n\n            // get manufacturer name\n            refCF = CFDictionaryGetValue (hidProperties, CFSTR(kIOHIDManufacturerKey));\n            if (!refCF)\n                refCF = CFDictionaryGetValue (usbProperties, CFSTR(\"USB Vendor Name\"));\n            if (refCF)\n            {\n                if (!CFStringGetCString (refCF, pDevice->manufacturer, 256, CFStringGetSystemEncoding ()))\n                    HIDReportError (\"CFStringGetCString error retrieving pDevice->manufacturer.\");\n            }\n\n            // get product name\n            refCF = CFDictionaryGetValue (hidProperties, CFSTR(kIOHIDProductKey));\n            if (!refCF)\n                refCF = CFDictionaryGetValue (usbProperties, CFSTR(\"USB Product Name\"));\n            if (refCF)\n            {\n                if (!CFStringGetCString (refCF, pDevice->product, 256, CFStringGetSystemEncoding ()))\n                    HIDReportError (\"CFStringGetCString error retrieving pDevice->product.\");\n            }\n\n            // get serial\n            refCF = CFDictionaryGetValue (hidProperties, CFSTR(kIOHIDSerialNumberKey));\n            if (refCF)\n            {\n                if (!CFStringGetCString (refCF, pDevice->serial, 256, CFStringGetSystemEncoding ()))\n                    HIDReportError (\"CFStringGetCString error retrieving pDevice->serial.\");\n            }\n\n            // get location ID\n            refCF = CFDictionaryGetValue (hidProperties, CFSTR(kIOHIDLocationIDKey));\n            if (!refCF)\n                refCF = CFDictionaryGetValue (usbProperties, CFSTR(\"locationID\"));\n            if (refCF)\n            {\n                if (!CFNumberGetValue (refCF, kCFNumberLongType, &pDevice->locID))\n                    HIDReportError (\"CFNumberGetValue error retrieving pDevice->locID.\");\n            }\n\n            // get usage page and usage\n            refCF = CFDictionaryGetValue (hidProperties, CFSTR(kIOHIDPrimaryUsagePageKey));\n            if (refCF)\n            {\n                if (!CFNumberGetValue (refCF, kCFNumberLongType, &pDevice->usagePage))\n                    HIDReportError (\"CFNumberGetValue error retrieving pDevice->usagePage.\");\n                refCF = CFDictionaryGetValue (hidProperties, CFSTR(kIOHIDPrimaryUsageKey));\n                if (refCF)\n                    if (!CFNumberGetValue (refCF, kCFNumberLongType, &pDevice->usage))\n                        HIDReportError (\"CFNumberGetValue error retrieving pDevice->usage.\");\n            }\n            if (NULL == refCF) // get top level element HID usage page or usage\n            {\n                // use top level element instead\n                CFTypeRef refCFTopElement = 0;\n                refCFTopElement = CFDictionaryGetValue (hidProperties, CFSTR(kIOHIDElementKey));\n                {\n                    // refCFTopElement points to an array of element dictionaries\n                    CFRange range = {0, CFArrayGetCount (refCFTopElement)};\n                    CFArrayApplyFunction (refCFTopElement, range, hid_TopLevelElementHandler, NULL);\n                }\n            }\n        }\n        else\n            HIDReportError (\"IORegistryEntryCreateCFProperties failed to create usbProperties.\");\n\n        CFRelease (usbProperties);\n        if (kIOReturnSuccess != IOObjectRelease (parent2))\n            HIDReportError (\"IOObjectRelease error with parent2.\");\n        if (kIOReturnSuccess != IOObjectRelease (parent1))\n            HIDReportError (\"IOObjectRelease error with parent1.\");\n    }\n}\n\n// ---------------------------------\n// adds device to linked list of devices passed in (handles NULL lists properly)\n// (returns where you just stored it)\nstatic pRecDevice* hid_AddDevice (pRecDevice *ppListDeviceHead, pRecDevice pNewDevice)\n{\n\tpRecDevice* result = NULL;\n\t\n    if (NULL == *ppListDeviceHead)\n        result = ppListDeviceHead;\n    else\n    {\n        pRecDevice pDevicePrevious = NULL, pDevice = *ppListDeviceHead;\n        while (pDevice)\n        {\n            pDevicePrevious = pDevice;\n            pDevice = pDevicePrevious->pNext;\n        }\n        result = &pDevicePrevious->pNext;\n    }\n    pNewDevice->pNext = NULL;\n\n\t*result = pNewDevice;\n\n\treturn result;\n}\n\n// ---------------------------------\n// given a IO device object build a flat device record including device info and elements\n\nstatic pRecDevice hid_BuildDevice (io_object_t hidDevice)\n{\n    pRecDevice pDevice = (pRecDevice) malloc (sizeof (recDevice));\n\n    if (NULL != pDevice)\n    {\n\t\t// get dictionary for HID properties\n        CFMutableDictionaryRef hidProperties = 0;\n        kern_return_t result = IORegistryEntryCreateCFProperties (hidDevice, &hidProperties, kCFAllocatorDefault, kNilOptions);\n\n\t\t// clear record\n\t\tbzero(pDevice, sizeof(recDevice));\n\n        if ((result == KERN_SUCCESS) && (NULL != hidProperties))\n        {\n\t\t\tpRecElement pCurrentElement = NULL;\n\t\t\t// create device interface\n\t\t\tresult = HIDCreateOpenDeviceInterface (hidDevice, pDevice);\n\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\tHIDReportErrorNum (\"HIDCreateOpenDeviceInterface failed.\", result);\n            hid_GetDeviceInfo (hidDevice, hidProperties, pDevice); // hidDevice used to find parents in registry tree\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   // set current device for use in getting elements\n\t\t\tgCurrentGetDevice = pDevice;\n\t\t\t// Add all elements\n            hid_GetCollectionElements (hidProperties, &pCurrentElement);\n\t\t\tgCurrentGetDevice = NULL;\n            CFRelease (hidProperties);\n        }\n        else\n            HIDReportErrorNum (\"IORegistryEntryCreateCFProperties error when creating deviceProperties.\", result);\n    }\n    else\n        HIDReportError (\"malloc error when allocating pRecDevice.\");\n    return pDevice;\n}\n\n#if USE_NOTIFICATIONS\n//================================================================================================\n//\n//\thid_DeviceNotification\n//\n//\tThis routine will get called whenever any kIOGeneralInterest notification happens.  We are\n//\tinterested in the kIOMessageServiceIsTerminated message so that's what we look for.  Other\n//\tmessages are defined in IOMessage.h.\n//\n//================================================================================================\n//\nstatic void hid_DeviceNotification( void *refCon,\n\t\t\t\t\t\t\t\t\tio_service_t service,\n\t\t\t\t\t\t\t\t\tnatural_t messageType,\n\t\t\t\t\t\t\t\t\tvoid *messageArgument )\n{\n#pragma unused(messageArgument)\n    pRecDevice pDevice = (pRecDevice) refCon;\n\n    if (messageType == kIOMessageServiceIsTerminated)\n    {\n        printf(\"Device 0x%08x \\\"%s\\\"removed.\\n\", service, pDevice->product);\n\n        // Free the data we're no longer using now that the device is going away\n\t\thid_DisposeDevice (pDevice);\n    }\n}\n#else\n\nstatic void hid_RemovalCallbackFunction(void * target, IOReturn result, void * refcon, void * sender)\n{\n\thid_DisposeDevice ((pRecDevice) target);\n}\n\n#endif USE_NOTIFICATIONS\n\n//================================================================================================\n//\n//\thid_AddDevices\n//\n//\tThis routine is the callback for our IOServiceAddMatchingNotification.  When we get called\n//\twe will look at all the devices that were added and we will:\n//\n//\t1.  Create some private data to relate to each device.\n//\t2.  Submit an IOServiceAddInterestNotification of type kIOGeneralInterest for this device,\n//\t    using the refCon field to store a pointer to our data.  When we get called with\n//\t    this interest notification, we can grab the refCon and access our private data.\n//\n//================================================================================================\n//\n// ---------------------------------\n// given a IO device iterator, iterate it and add all its devices\n\nstatic void hid_AddDevices (void *refCon, io_iterator_t iterator)\n{\n\t// NOTE: refcon passed in is used to point to the device list head\n    pRecDevice* pListDeviceHead = (pRecDevice*) refCon;\n    IOReturn result = kIOReturnSuccess;\n    io_object_t ioHIDDeviceObject = 0;\n\n    while ((ioHIDDeviceObject = IOIteratorNext (iterator)))\n    {\n\t\tpRecDevice* pNewDeviceAt = NULL;\n\t\tpRecDevice pNewDevice = hid_BuildDevice (ioHIDDeviceObject);\n\t\tif (pNewDevice)\n\t\t{\n#if 0\t// set true for verbose output\n\t\t\tprintf(\"\\nhid_AddDevices: pNewDevice = {t: \\\"%s\\\", v: %ld, p: %ld, v: %ld, m: \\\"%s\\\", \" \\\n\t\t  \"p: \\\"%s\\\", l: %ld, u: %4.4lX:%4.4lX, #e: %ld, #f: %ld, #i: %ld, #o: %ld, \" \\\n\t\t  \"#c: %ld, #a: %ld, #b: %ld, #h: %ld, #s: %ld, #d: %ld, #w: %ld}.\",\n\t\t  pNewDevice->transport,\n\t\t  pNewDevice->vendorID,\n\t\t  pNewDevice->productID,\n\t\t  pNewDevice->version,\n\t\t  pNewDevice->manufacturer,\n\t\t  pNewDevice->product,\n\t\t  pNewDevice->locID,\n\t\t  pNewDevice->usagePage,\n\t\t  pNewDevice->usage,\n\t\t  pNewDevice->totalElements,\n\t\t  pNewDevice->features,\n\t\t  pNewDevice->inputs,\n\t\t  pNewDevice->outputs,\n\t\t  pNewDevice->collections,\n\t\t  pNewDevice->axis,\n\t\t  pNewDevice->buttons,\n\t\t  pNewDevice->hats,\n\t\t  pNewDevice->sliders,\n\t\t  pNewDevice->dials,\n\t\t  pNewDevice->wheels\n\t\t  );\n\t\t\tfflush(stdout);\n#elif\t0\t// otherwise output brief description\n\t\t\tprintf(\"\\nhid_AddDevices: pNewDevice = {m: \\\"%s\\\" p: \\\"%s\\\", vid: %ld, pid: %ld, loc: %8.8lX, usage: %4.4lX:%4.4lX}.\",\n\t\t  pNewDevice->manufacturer,\n\t\t  pNewDevice->product,\n\t\t  pNewDevice->vendorID,\n\t\t  pNewDevice->productID,\n\t\t  pNewDevice->locID,\n\t\t  pNewDevice->usagePage,\n\t\t  pNewDevice->usage\n\t\t  );\n\t\t\tfflush(stdout);\n#endif\n\t\t\tpNewDeviceAt = hid_AddDevice (pListDeviceHead, pNewDevice);\n\t\t}\n\n#if USE_NOTIFICATIONS\n        // Register for an interest notification of this device being removed. Use a reference to our\n        // private data as the refCon which will be passed to the notification callback.\n        result = IOServiceAddInterestNotification( gNotifyPort,\t\t\t\t\t// notifyPort\n\t\t\t\t\t\t\t\t\t\t\t\t   ioHIDDeviceObject,\t\t\t// service\n\t\t\t\t\t\t\t\t\t\t\t\t   kIOGeneralInterest,\t\t\t// interestType\n\t\t\t\t\t\t\t\t\t\t\t\t   hid_DeviceNotification,\t\t// callback\n\t\t\t\t\t\t\t\t\t\t\t\t   pNewDevice,\t\t\t\t\t// refCon\n\t\t\t\t\t\t\t\t\t\t\t\t   (io_object_t*) &pNewDevice->notification);\t// notification\n\t\tif (KERN_SUCCESS != result)\n\t\t\tHIDReportErrorNum (\"hid_AddDevices: IOServiceAddInterestNotification error: x0%8.8lX.\", result);\n#else\n\t\tresult = (*(IOHIDDeviceInterface**)pNewDevice->interface)->setRemovalCallback (pNewDevice->interface, hid_RemovalCallbackFunction,pNewDeviceAt,0);\n#endif USE_NOTIFICATIONS\n\n\t\t// release the device object, it is no longer needed\n\t\tresult = IOObjectRelease (ioHIDDeviceObject);\n\t\tif (KERN_SUCCESS != result)\n\t\t\tHIDReportErrorNum (\"hid_AddDevices: IOObjectRelease error with ioHIDDeviceObject.\", result);\n    }\n}\n\n// ---------------------------------\n// disposes of the element list associated with a device and the memory associated with the list\n// uses depthwise recursion to dispose both collections and elements.\n\nstatic void hid_DisposeDeviceElements (pRecElement pElement)\n{\n\tif (pElement)\n\t{\n\t\tif (pElement->pChild)\n\t\t\thid_DisposeDeviceElements (pElement->pChild);\n\t\tif (pElement->pSibling)\n\t\t\thid_DisposeDeviceElements (pElement->pSibling);\n\t\tfree (pElement);\n\t}\n}\n\n// ---------------------------------\n// disposes of a single device, closing and releaseing interface, freeing memory fro device and elements, setting device pointer to NULL\n// all your device no longer belong to us... (i.e., you do not 'own' the device anymore)\n\nstatic pRecDevice hid_DisposeDevice (pRecDevice pDevice)\n{\n    kern_return_t result = KERN_SUCCESS;\n    pRecDevice pDeviceNext = NULL;\n\n    if (HIDIsValidDevice(pDevice))\n    {\n        // save next device prior to disposing of this device\n        pDeviceNext = pDevice->pNext;\n\n\t\tresult = HIDDequeueDevice (pDevice);\n#if 0\n\t\tif (kIOReturnSuccess != result)\n\t\t\tHIDReportErrorNum (\"hid_DisposeDevice: HIDDequeueDevice error: 0x%8.8X.\", result);\n#endif 1\n\n        hid_DisposeDeviceElements (pDevice->pListElements);\n\t\tpDevice->pListElements = NULL;\n\n\t\tresult = HIDCloseReleaseInterface (pDevice); // function sanity checks interface value (now application does not own device)\n\t\tif (kIOReturnSuccess != result)\n\t\t\tHIDReportErrorNum (\"hid_DisposeDevice: HIDCloseReleaseInterface error: 0x%8.8X.\", result);\n\n#if USE_NOTIFICATIONS\n        if (pDevice->interface)\n        {\n\t\t\t// replace (*pDevice->interface)->Release(pDevice->interface);\n\t\t\tresult = IODestroyPlugInInterface (pDevice->interface);\n\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\tHIDReportErrorNum (\"hid_DisposeDevice: IODestroyPlugInInterface error: 0x%8.8X.\", result);\n        }\n\n        if (pDevice->notification)\n\t\t{\n\t\t\tresult = IOObjectRelease((io_object_t) pDevice->notification);\n\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\tHIDReportErrorNum (\"hid_DisposeDevice: IOObjectRelease error: 0x%8.8X.\", result);\n\t\t}\n#endif USE_NOTIFICATIONS\n\n\t\t// remove this device from the device list\n\t\tif (gpDeviceList == pDevice)\t// head of list?\n\t\t\tgpDeviceList = pDeviceNext;\n\t\telse\n\t\t{\n\t\t\tpRecDevice pDeviceTemp = pDeviceNext = gpDeviceList;\t// we're going to return this if we don't find ourselfs in the list\n\t\t\twhile (pDeviceTemp)\n\t\t\t{\n\t\t\t\tif (pDeviceTemp->pNext == pDevice) // found us!\n\t\t\t\t{\n\t\t\t\t\t// take us out of linked list\n\t\t\t\t\tpDeviceTemp->pNext = pDeviceNext = pDevice->pNext;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tpDeviceTemp = pDeviceTemp->pNext;\n\t\t\t}\n\t\t}\n        free (pDevice);\n    }\n\n\t// update device count\n\tgNumDevices = hid_CountCurrentDevices ();\n\n    return pDeviceNext;\n}\n\n// ---------------------------------\n// count number of devices in global device list (gpDeviceList)\nstatic UInt32 hid_CountCurrentDevices (void)\n{\n    pRecDevice pDevice = gpDeviceList;\n    UInt32 devices = 0;\n    while (pDevice)\n    {\n        devices++;\n        pDevice = pDevice->pNext;\n    }\n    return devices;\n}\n\n// ---------------------------------\n// matches type masks passed in to actual element types (which are not set up to be used as a mask\nstatic Boolean hid_MatchElementTypeMask (IOHIDElementType type, HIDElementTypeMask typeMask)\n{\n\tif (typeMask & kHIDElementTypeInput)\n\t\tif ((type == kIOHIDElementTypeInput_Misc) || (type == kIOHIDElementTypeInput_Button) || (type == kIOHIDElementTypeInput_Axis) || (type == kIOHIDElementTypeInput_ScanCodes))\n\t\t\treturn true;\n\tif (typeMask & kHIDElementTypeOutput)\n\t\tif (type == kIOHIDElementTypeOutput)\n\t\t\treturn true;\n\tif (typeMask & kHIDElementTypeFeature)\n\t\tif (type == kIOHIDElementTypeFeature)\n\t\t\treturn true;\n\tif (typeMask & kHIDElementTypeCollection)\n\t\tif (type == kIOHIDElementTypeCollection)\n\t\t\treturn true;\n\treturn false;\n}\n\n// ---------------------------------\n\nstatic pRecElement hid_GetDeviceElement (pRecElement pElement, HIDElementTypeMask typeMask)\n{\n\t// we are asking for this element\n    if (NULL != pElement)\n\t{\n\t\tif (hid_MatchElementTypeMask (pElement->type, typeMask)) // if the type match what we are looking for\n\t\t\treturn pElement; // return the element\n\t\telse\n\t\t\treturn HIDGetNextDeviceElement (pElement, typeMask); // else get the next one\n\t}\n\treturn NULL;\n}\n\n#define FAKE_IT\t0\t// set true for debugging; returns the usage & usage page as numbers\n\n// ---------------------------------\n// Load the usage strings from the <HID_usage_strings.plist> resource (XML) file into a CFPropertyListRef\nstatic CFPropertyListRef xml_load_usage_strings(void)\n{\n\tCFPropertyListRef tCFPropertyListRef = NULL;\n\tCFURLRef resFileCFURLRef = CFBundleCopyResourceURL(CFBundleGetMainBundle(), CFSTR(\"HID_usage_strings\"), CFSTR(\"plist\"), NULL);\n\n\tif (NULL != resFileCFURLRef)\n\t{\n\t\tCFDataRef resCFDataRef;\n\n\t\tif (CFURLCreateDataAndPropertiesFromResource(kCFAllocatorDefault, resFileCFURLRef, &resCFDataRef, nil, nil, nil))\n\t\t{\n\t\t\tif (NULL != resCFDataRef)\n\t\t\t{\n\t\t\t\tCFStringRef errorString;\n\n\t\t\t\ttCFPropertyListRef = CFPropertyListCreateFromXMLData(kCFAllocatorDefault, resCFDataRef, kCFPropertyListImmutable, &errorString);\n\t\t\t\tif (NULL == tCFPropertyListRef)\n\t\t\t\t\tCFShow(errorString);\n\t\t\t\tCFRelease(resCFDataRef);\n\t\t\t}\n\t\t}\n\t\tCFRelease(resFileCFURLRef);\n\t}\n\treturn tCFPropertyListRef;\n}\n\n// ---------------------------------\n// Find a usage string in the <HID_usage_strings.plist> resource (XML) file\n\nstatic Boolean xml_GetUsageName(const long valueUsagePage, const long valueUsage, char* pCstr)\n{\n\tstatic CFPropertyListRef tCFPropertyListRef = NULL;\n\tBoolean results = false;\n\n\tif (NULL == tCFPropertyListRef)\n\t\ttCFPropertyListRef = xml_load_usage_strings();\n\tif (NULL != tCFPropertyListRef)\n\t{\n\t\tif (CFDictionaryGetTypeID() == CFGetTypeID(tCFPropertyListRef))\n\t\t{\n\t\t\tCFDictionaryRef pageCFDictionaryRef;\n\t\t\tCFStringRef\tpageKeyCFStringRef;\n\t\t\tpageKeyCFStringRef = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR(\"0x%4.4lX\"), valueUsagePage);\n\n\t\t\tif (CFDictionaryGetValueIfPresent(tCFPropertyListRef, pageKeyCFStringRef, (const void**) &pageCFDictionaryRef))\n\t\t\t{\n\t\t\t\tCFStringRef\tpageCFStringRef;\n\n\t\t\t\tif (CFDictionaryGetValueIfPresent(pageCFDictionaryRef, CFSTR(\"Name\"), (const void**) &pageCFStringRef))\n\t\t\t\t{\n\t\t\t\t\t//CFShow(pageCFStringRef);\n\t\t\t\t}\n\n\t\t\t\t{\n\t\t\t\t\tCFStringRef fullCFStringRef = NULL;\n\t\t\t\t\tCFStringRef\tusageKeyCFStringRef;\n\t\t\t\t\tCFStringRef\tusageCFStringRef;\n\n\t\t\t\t\tusageKeyCFStringRef = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR(\"0x%4.4lX\"), valueUsage);\n\n\t\t\t\t\tif (CFDictionaryGetValueIfPresent(pageCFDictionaryRef, usageKeyCFStringRef, (const void**) &usageCFStringRef))\n\t\t\t\t\t{\n\t\t\t\t\t\tfullCFStringRef = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR(\"%@ %@\"),\n\t\t\t\t\t\t\t\t\t\t\t\t pageCFStringRef, usageCFStringRef);\n\t\t\t\t\t\t// CFShow(usageCFStringRef);\n\t\t\t\t\t}\n#if FAKE_IT\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tfullCFStringRef = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR(\"%@ #%@\"),\n\t\t\t\t\t\t\t\t\t\t\t\t pageCFStringRef, usageKeyCFStringRef);\n\t\t\t\t\t}\n#endif\n\t\t\t\t\tif (fullCFStringRef)\n\t\t\t\t\t{\n\t\t\t\t\t\t// CFShow(fullCFStringRef);\n\t\t\t\t\t\tresults = CFStringGetCString(\n\t\t\t\t\t\t\t\t   fullCFStringRef, pCstr, CFStringGetLength(fullCFStringRef) * sizeof(UniChar) + 1, kCFStringEncodingMacRoman);\n\t\t\t\t\t\tCFRelease(fullCFStringRef);\n\t\t\t\t\t}\n\t\t\t\t\tCFRelease(usageKeyCFStringRef);\n\t\t\t\t}\n\t\t\t}\n\t\t\tCFRelease(pageKeyCFStringRef);\n\t\t}\n\t\t//++CFRelease(tCFPropertyListRef);\t// Leak this!\n\t}\n\treturn results;\n}\n\n#pragma mark public functions\n// =================================\n// public functions\n\n// ---------------------------------\n// Create and open an interface to device, required prior to extracting values or building queues\n// Note: appliction now owns the device and must close and release it prior to exiting\n\nunsigned long HIDCreateOpenDeviceInterface (UInt32 hidDevice, pRecDevice pDevice)\n{\n    IOReturn result = kIOReturnSuccess;\n    HRESULT plugInResult = S_OK;\n    SInt32 score = 0;\n    IOCFPlugInInterface ** ppPlugInInterface = NULL;\n\n\tif (NULL == pDevice->interface)\n\t{\n\t\tresult = IOCreatePlugInInterfaceForService (hidDevice, kIOHIDDeviceUserClientTypeID,\n\t\t\t\t\t\t\t\t\t\t\t  kIOCFPlugInInterfaceID, &ppPlugInInterface, &score);\n\t\tif (kIOReturnSuccess == result)\n\t\t{\n\t\t\t// Call a method of the intermediate plug-in to create the device interface\n\t\t\tplugInResult = (*ppPlugInInterface)->QueryInterface (ppPlugInInterface,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tCFUUIDGetUUIDBytes (kIOHIDDeviceInterfaceID), (void *) &(pDevice->interface));\n\t\t\tif (S_OK != plugInResult)\n\t\t\t\tHIDReportErrorNum (\"Couldnt query HID class device interface from plugInInterface\", plugInResult);\n\t\t\tIODestroyPlugInInterface (ppPlugInInterface); // replace (*ppPlugInInterface)->Release (ppPlugInInterface)\n\t\t}\n\t\telse\n\t\t\tHIDReportErrorNum (\"Failed to create **plugInInterface via IOCreatePlugInInterfaceForService.\", result);\n\t}\n\tif (NULL != pDevice->interface)\n\t{\n\t\tresult = (*(IOHIDDeviceInterface**)pDevice->interface)->open (pDevice->interface, 0);\n\t\tif (kIOReturnSuccess != result)\n\t\t\tHIDReportErrorNum (\"Failed to open pDevice->interface via open.\", result);\n\t}\n    return result;\n}\n\n// ---------------------------------\n// builds list of device with elements (allocates memory and captures devices)\n// list is allcoated internally within HID Utilites and can be accessed via accessor functions\n// structures within list are considered flat and user accessable, but not user modifiable\n// can be called again to rebuild list to account for new devices (will do the right thing in case of disposing existing list)\n// returns true if succesful\n\nBoolean HIDBuildDeviceList (UInt32 usagePage, UInt32 usage)\n{\n    IOReturn result = kIOReturnSuccess;\n    mach_port_t masterPort = 0;\n\n    if (NULL != gpDeviceList)\n        HIDReleaseDeviceList ();\n\n    result = IOMasterPort (bootstrap_port, &masterPort);\n    if (kIOReturnSuccess != result)\n        HIDReportErrorNum (\"IOMasterPort error with bootstrap_port.\", result);\n    else\n    {\n\t\tCFMutableDictionaryRef hidMatchDictionary = NULL;\n\n\t\t// Set up matching dictionary to search the I/O Registry for HID devices we are interested in. Dictionary reference is NULL if error.\n\t\t{\n\t\t\tCFNumberRef refUsage = NULL, refUsagePage = NULL;\n\n\t\t\t// Set up a matching dictionary to search I/O Registry by class name for all HID class devices.\n\t\t\thidMatchDictionary = IOServiceMatching (kIOHIDDeviceKey);\n\t\t\tif (NULL != hidMatchDictionary)\n\t\t\t{\n\t\t\t\tif (usagePage)\n\t\t\t\t{\n\t\t\t\t\t// Add key for device type (joystick, in this case) to refine the matching dictionary.\n\t\t\t\t\trefUsagePage = CFNumberCreate (kCFAllocatorDefault, kCFNumberLongType, &usagePage);\n\t\t\t\t\tCFDictionarySetValue (hidMatchDictionary, CFSTR (kIOHIDPrimaryUsagePageKey), refUsagePage);\n\t\t\t\t\tCFRelease (refUsagePage);\n\t\t\t\t\tif (usage)\n\t\t\t\t\t{\n\t\t\t\t\t\trefUsage = CFNumberCreate (kCFAllocatorDefault, kCFNumberLongType, &usage);\n\t\t\t\t\t\tCFDictionarySetValue (hidMatchDictionary, CFSTR (kIOHIDPrimaryUsageKey), refUsage);\n\t\t\t\t\t\tCFRelease (refUsage);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tCFRetain(hidMatchDictionary);\n\t\t\t}\n\t\t\telse\n\t\t\t\tHIDReportError (\"Failed to get HID CFMutableDictionaryRef via IOServiceMatching.\");\n\t\t}\n\n#if USE_NOTIFICATIONS\n\t\t// Create a notification port and add its run loop event source to our run loop\n\t\t// This is how async notifications get set up.\n\t\t{\n\t\t\tCFRunLoopSourceRef\t\trunLoopSource;\n\n\t\t\tgNotifyPort = IONotificationPortCreate(masterPort);\n\t\t\trunLoopSource = IONotificationPortGetRunLoopSource(gNotifyPort);\n\n\t\t\tgRunLoop = CFRunLoopGetCurrent();\n\t\t\tCFRunLoopAddSource(gRunLoop, runLoopSource, kCFRunLoopDefaultMode);\n\n\t\t\t// Now set up a notification to be called when a device is first matched by I/O Kit.\n\t\t\tresult = IOServiceAddMatchingNotification(gNotifyPort,\t\t\t// notifyPort\n\t\t\t\t\t\t\t\t\t\t\t kIOFirstMatchNotification,\t\t// notificationType\n\t\t\t\t\t\t\t\t\t\t\t hidMatchDictionary,\t\t\t// matching\n\t\t\t\t\t\t\t\t\t\t\t hid_AddDevices,\t\t\t\t// callback\n\t\t\t\t\t\t\t\t\t\t\t &gpDeviceList,\t\t\t\t\t// refCon\n\t\t\t\t\t\t\t\t\t\t\t &gAddedIter\t\t\t\t\t// notification\n\t\t\t\t\t\t\t\t\t\t\t );\n\n\t\t\t// call it now to add all existing devices\n\t\t\thid_AddDevices(&gpDeviceList,gAddedIter);\n\t\t}\n#else\n\t\t{\n\t\t\tio_iterator_t hidObjectIterator = NULL;\n\n\t\t\t// Now search I/O Registry for matching devices.\n\t\t\tresult = IOServiceGetMatchingServices (masterPort, hidMatchDictionary, &hidObjectIterator);\n\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\tHIDReportErrorNum (\"Failed to create IO object iterator, error:\", result);\n\t\t\telse if (NULL == hidObjectIterator) // likely no HID devices which matched selection criteria are connected\n\t\t\t\tHIDReportError (\"Warning: Could not find any matching devices, thus iterator creation failed.\");\n\n\t\t\tif (NULL != hidObjectIterator)\n\t\t\t{\n\t\t\t\thid_AddDevices(&gpDeviceList,hidObjectIterator);\n\n\t\t\t\tresult = IOObjectRelease (hidObjectIterator); // release the iterator\n\t\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\t\tHIDReportErrorNum (\"IOObjectRelease error with hidObjectIterator.\", result);\n\n\t\t\t\tgNumDevices = hid_CountCurrentDevices ();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n#endif USE_NOTIFICATIONS\n\t\t// IOServiceGetMatchingServices consumes a reference to the dictionary, so we don't need to release the dictionary ref.\n\t\thidMatchDictionary = NULL;\n    }\n\treturn false;\n}\n\n// ---------------------------------\n// release list built by above function\n// MUST be called prior to application exit to properly release devices\n// if not called (or app crashes) devices can be recovered by pluging into different location in USB chain\n\nvoid HIDReleaseDeviceList (void)\n{\n    while (NULL != gpDeviceList)\n\t\tgpDeviceList = hid_DisposeDevice (gpDeviceList); // dispose current device return next device will set gpDeviceList to NULL\n    gNumDevices = 0;\n}\n\n// ---------------------------------\n// does a device list exist\n\nBoolean HIDHaveDeviceList (void)\n{\n    if (NULL != gpDeviceList)\n\t\treturn true;\n    return false;\n}\n\n// ---------------------------------\n// how many HID devices have been found\n// returns 0 if no device list exist\n\nUInt32 HIDCountDevices (void)\n{\n\tgNumDevices = hid_CountCurrentDevices ();\n\n    return gNumDevices;\n}\n\n// ---------------------------------\n// how many elements does a specific device have\n// returns 0 if device is invlaid or NULL\n\nUInt32 HIDCountDeviceElements (pRecDevice pDevice, HIDElementTypeMask typeMask)\n{\n\tlong count = 0;\n    if (HIDIsValidDevice(pDevice))\n\t{\n\t\tif (typeMask & kHIDElementTypeInput)\n\t\t\tcount += pDevice->inputs;\n\t\tif (typeMask & kHIDElementTypeOutput)\n\t\t\tcount += pDevice->outputs;\n\t\tif (typeMask & kHIDElementTypeFeature)\n\t\t\tcount += pDevice->features;\n\t\tif (typeMask & kHIDElementTypeCollection)\n\t\t\tcount += pDevice->collections;\n\t}\n\treturn count;\n}\n\n// ---------------------------------\n// get the first device in the device list\n// returns NULL if no list exists\n\npRecDevice HIDGetFirstDevice (void)\n{\n    return gpDeviceList;\n}\n\n// ---------------------------------\n// get next device in list given current device as parameter\n// returns NULL if end of list\n\npRecDevice HIDGetNextDevice (pRecDevice pDevice)\n{\n    if (NULL != pDevice)\n        return pDevice->pNext;\n    else\n        return NULL;\n}\n\n// ---------------------------------\n// get the first element of device passed in as parameter\n// returns NULL if no list exists or device does not exists or is NULL\npRecElement HIDGetFirstDeviceElement (pRecDevice pDevice, HIDElementTypeMask typeMask)\n{\n    if (HIDIsValidDevice(pDevice))\n\t{\n        if (hid_MatchElementTypeMask (pDevice->pListElements->type, typeMask)) // ensure first type matches\n\t\t\treturn pDevice->pListElements;\n\t\telse\n\t\t\treturn HIDGetNextDeviceElement (pDevice->pListElements, typeMask);\n\t}\n    else\n        return NULL;\n}\n\n// ---------------------------------\n// get next element of given device in list given current element as parameter\n// will walk down each collection then to next element or collection (depthwise traverse)\n// returns NULL if end of list\n// uses mask of HIDElementTypeMask to restrict element found\n// use kHIDElementTypeIO to get previous HIDGetNextDeviceElement functionality\npRecElement HIDGetNextDeviceElement (pRecElement pElement, HIDElementTypeMask typeMask)\n{\n\t// should only have elements passed in (though someone could mix calls and pass us a collection)\n\t// collection means return the next child or sibling (in that order)\n\t// element means returnt he next sibling (as elements can't have children\n    if (NULL != pElement)\n\t{\n\t\tif (pElement->pChild)\n\t\t{\n\t\t\tif (pElement->type != kIOHIDElementTypeCollection)\n\t\t\t\tHIDReportError (\"Malformed element list: found child of element.\");\n\t\t\telse\n\t\t\t\treturn hid_GetDeviceElement (pElement->pChild, typeMask); // return the child of this element\n\t\t}\n\t\telse if (pElement->pSibling)\n\t\t{\n\t\t\treturn hid_GetDeviceElement (pElement->pSibling, typeMask); //return the sibling of this element\n\t\t}\n\t\telse // at end back up correctly\n\t\t{\n\t\t\tpRecElement pPreviousElement = NULL;\n\t\t\t// malformed device ending in collection\n\t\t\tif (pElement->type == kIOHIDElementTypeCollection)\n\t\t\t\tHIDReportError (\"Malformed device: found collection at end of element chain.\");\n\t\t\t// walk back up tree to element prior to first collection ecountered and take next element\n\t\t\twhile (NULL != pElement->pPrevious)\n\t\t\t{\n\t\t\t\tpPreviousElement = pElement;\n\t\t\t\tpElement = pElement->pPrevious; // look at previous element\n\t\t\t\t\t\t\t\t\t// if we have a collection and the previous element is the branch element (should have both a colection and next element attached to it)\n\t\t // if we found a collection, which we are not at the sibling level that actually does have siblings\n\t\t\t\tif (((pElement->type == kIOHIDElementTypeCollection) && (pPreviousElement != pElement->pSibling) && pElement->pSibling) ||\n\t\t// or if we are at the top\n\t\t(NULL == pElement->pPrevious)) // at top of tree\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (NULL == pElement->pPrevious)\n\t\t\t\treturn NULL; // got to top of list with only a collection as the first element\n\t\t\t\t // now we must have been down the child route so go down the sibling route\n\t\t\tpElement = pElement->pSibling; // element of interest\n\t\t\treturn hid_GetDeviceElement (pElement, typeMask); // otherwise return this element\n\t\t}\n\t}\n\treturn NULL;\n}\n\n// ---------------------------------\n// get previous element of given device in list given current element as parameter\n// this wlaks directly up the tree to the top element and does not search at each level\n// returns NULL if beginning of list\n// uses mask of HIDElementTypeMask to restrict element found\n// use kHIDElementTypeIO to get non-collection elements\npRecElement HIDGetPreviousDeviceElement (pRecElement pElement, HIDElementTypeMask typeMask)\n{\n\tpRecElement pPreviousElement = pElement->pPrevious;\n\t// walk back up tree to element prior\n\twhile (pPreviousElement && !hid_MatchElementTypeMask (pPreviousElement->type, typeMask))\n\t{\n\t\tpElement = pPreviousElement; // look at previous element\n\t\tpPreviousElement = pElement->pPrevious;\n\t}\n\treturn pPreviousElement; // return this element\n}\n\n// ---------------------------------\n// returns C string type name given a type enumeration passed in as parameter (see IOHIDKeys.h)\n// returns \"Unknown Type\" for invalid types\n\nvoid HIDGetTypeName (IOHIDElementType theType, char * cstrName)\n{\n    switch (theType)\n    {\n        case kIOHIDElementTypeInput_Misc:\n            sprintf(cstrName, \"Miscellaneous Input\");\n            break;\n        case kIOHIDElementTypeInput_Button:\n            sprintf(cstrName, \"Button Input\");\n            break;\n        case kIOHIDElementTypeInput_Axis:\n            sprintf(cstrName, \"Axis Input\");\n            break;\n        case kIOHIDElementTypeInput_ScanCodes:\n            sprintf(cstrName, \"Scan Code Input\");\n            break;\n        case kIOHIDElementTypeOutput:\n            sprintf(cstrName, \"Output\");\n            break;\n        case kIOHIDElementTypeFeature:\n            sprintf(cstrName, \"Feature\");\n            break;\n        case kIOHIDElementTypeCollection:\n            sprintf(cstrName, \"Collection\");\n            break;\n        default:\n            sprintf(cstrName, \"Unknown Type\");\n            break;\n    }\n}\n\n// ---------------------------------\n// returns C string usage given usage page and usage passed in as parameters (see IOUSBHIDParser.h)\n// returns usage page and usage values in string form for unknown values\n\nvoid HIDGetUsageName (const long valueUsagePage, const long valueUsage, char * cstrName)\n{\n\tif (xml_GetUsageName(valueUsagePage, valueUsage, cstrName))\n\t\treturn;\n\n    switch (valueUsagePage)\n    {\n        case kHIDPage_Undefined:\n\t\t\tswitch (valueUsage)\n            {\n                default: sprintf (cstrName, \"Undefined Page, Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_GenericDesktop:\n            switch (valueUsage)\n            {\n                case kHIDUsage_GD_Pointer: sprintf (cstrName, \"Pointer\"); break;\n                case kHIDUsage_GD_Mouse: sprintf (cstrName, \"Mouse\"); break;\n                case kHIDUsage_GD_Joystick: sprintf (cstrName, \"Joystick\"); break;\n                case kHIDUsage_GD_GamePad: sprintf (cstrName, \"GamePad\"); break;\n                case kHIDUsage_GD_Keyboard: sprintf (cstrName, \"Keyboard\"); break;\n                case kHIDUsage_GD_Keypad: sprintf (cstrName, \"Keypad\"); break;\n                case kHIDUsage_GD_MultiAxisController: sprintf (cstrName, \"Multi-Axis Controller\"); break;\n\n                case kHIDUsage_GD_X: sprintf (cstrName, \"X-Axis\"); break;\n                case kHIDUsage_GD_Y: sprintf (cstrName, \"Y-Axis\"); break;\n                case kHIDUsage_GD_Z: sprintf (cstrName, \"Z-Axis\"); break;\n                case kHIDUsage_GD_Rx: sprintf (cstrName, \"X-Rotation\"); break;\n                case kHIDUsage_GD_Ry: sprintf (cstrName, \"Y-Rotation\"); break;\n                case kHIDUsage_GD_Rz: sprintf (cstrName, \"Z-Rotation\"); break;\n                case kHIDUsage_GD_Slider: sprintf (cstrName, \"Slider\"); break;\n                case kHIDUsage_GD_Dial: sprintf (cstrName, \"Dial\"); break;\n                case kHIDUsage_GD_Wheel: sprintf (cstrName, \"Wheel\"); break;\n                case kHIDUsage_GD_Hatswitch: sprintf (cstrName, \"Hatswitch\"); break;\n                case kHIDUsage_GD_CountedBuffer: sprintf (cstrName, \"Counted Buffer\"); break;\n                case kHIDUsage_GD_ByteCount: sprintf (cstrName, \"Byte Count\"); break;\n                case kHIDUsage_GD_MotionWakeup: sprintf (cstrName, \"Motion Wakeup\"); break;\n                case kHIDUsage_GD_Start: sprintf (cstrName, \"Start\"); break;\n                case kHIDUsage_GD_Select: sprintf (cstrName, \"Select\"); break;\n\n                case kHIDUsage_GD_Vx: sprintf (cstrName, \"X-Velocity\"); break;\n                case kHIDUsage_GD_Vy: sprintf (cstrName, \"Y-Velocity\"); break;\n                case kHIDUsage_GD_Vz: sprintf (cstrName, \"Z-Velocity\"); break;\n                case kHIDUsage_GD_Vbrx: sprintf (cstrName, \"X-Rotation Velocity\"); break;\n                case kHIDUsage_GD_Vbry: sprintf (cstrName, \"Y-Rotation Velocity\"); break;\n                case kHIDUsage_GD_Vbrz: sprintf (cstrName, \"Z-Rotation Velocity\"); break;\n                case kHIDUsage_GD_Vno: sprintf (cstrName, \"Vno\"); break;\n\n                case kHIDUsage_GD_SystemControl: sprintf (cstrName, \"System Control\"); break;\n                case kHIDUsage_GD_SystemPowerDown: sprintf (cstrName, \"System Power Down\"); break;\n                case kHIDUsage_GD_SystemSleep: sprintf (cstrName, \"System Sleep\"); break;\n                case kHIDUsage_GD_SystemWakeUp: sprintf (cstrName, \"System Wake Up\"); break;\n                case kHIDUsage_GD_SystemContextMenu: sprintf (cstrName, \"System Context Menu\"); break;\n                case kHIDUsage_GD_SystemMainMenu: sprintf (cstrName, \"System Main Menu\"); break;\n                case kHIDUsage_GD_SystemAppMenu: sprintf (cstrName, \"System App Menu\"); break;\n                case kHIDUsage_GD_SystemMenuHelp: sprintf (cstrName, \"System Menu Help\"); break;\n                case kHIDUsage_GD_SystemMenuExit: sprintf (cstrName, \"System Menu Exit\"); break;\n                case kHIDUsage_GD_SystemMenu: sprintf (cstrName, \"System Menu\"); break;\n                case kHIDUsage_GD_SystemMenuRight: sprintf (cstrName, \"System Menu Right\"); break;\n                case kHIDUsage_GD_SystemMenuLeft: sprintf (cstrName, \"System Menu Left\"); break;\n                case kHIDUsage_GD_SystemMenuUp: sprintf (cstrName, \"System Menu Up\"); break;\n                case kHIDUsage_GD_SystemMenuDown: sprintf (cstrName, \"System Menu Down\"); break;\n\n                case kHIDUsage_GD_DPadUp: sprintf (cstrName, \"DPad Up\"); break;\n                case kHIDUsage_GD_DPadDown: sprintf (cstrName, \"DPad Down\"); break;\n                case kHIDUsage_GD_DPadRight: sprintf (cstrName, \"DPad Right\"); break;\n                case kHIDUsage_GD_DPadLeft: sprintf (cstrName, \"DPad Left\"); break;\n\n                case kHIDUsage_GD_Reserved: sprintf (cstrName, \"Reserved\"); break;\n\n                default: sprintf (cstrName, \"Generic Desktop Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_Simulation:\n            switch (valueUsage)\n            {\n                default: sprintf (cstrName, \"Simulation Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_VR:\n            switch (valueUsage)\n            {\n                default: sprintf (cstrName, \"VR Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_Sport:\n            switch (valueUsage)\n            {\n                default: sprintf (cstrName, \"Sport Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_Game:\n            switch (valueUsage)\n            {\n                default: sprintf (cstrName, \"Game Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_KeyboardOrKeypad:\n            switch (valueUsage)\n            {\n                default: sprintf (cstrName, \"Keyboard Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_LEDs:\n            switch (valueUsage)\n            {\n\t\t\t\t// some LED usages\n\t\t\t\tcase kHIDUsage_LED_IndicatorRed: sprintf (cstrName, \"Red LED\"); break;\n\t\t\t\tcase kHIDUsage_LED_IndicatorGreen: sprintf (cstrName, \"Green LED\"); break;\n\t\t\t\tcase kHIDUsage_LED_IndicatorAmber: sprintf (cstrName, \"Amber LED\"); break;\n\t\t\t\tcase kHIDUsage_LED_GenericIndicator: sprintf (cstrName, \"Generic LED\"); break;\n\t\t\t\tcase kHIDUsage_LED_SystemSuspend: sprintf (cstrName, \"System Suspend LED\"); break;\n\t\t\t\tcase kHIDUsage_LED_ExternalPowerConnected: sprintf (cstrName, \"External Power LED\"); break;\n\t\t\t\tdefault: sprintf (cstrName, \"LED Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_Button:\n            switch (valueUsage)\n            {\n                default: sprintf (cstrName, \"Button #%ld\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_Ordinal:\n            switch (valueUsage)\n            {\n                default: sprintf (cstrName, \"Ordinal Instance %lx\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_Telephony:\n            switch (valueUsage)\n            {\n                default: sprintf (cstrName, \"Telephony Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_Consumer:\n            switch (valueUsage)\n            {\n                default: sprintf (cstrName, \"Consumer Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_Digitizer:\n            switch (valueUsage)\n            {\n                default: sprintf (cstrName, \"Digitizer Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_PID:\n\t\t\tif (((valueUsage >= 0x02) && (valueUsage <= 0x1F)) || ((valueUsage >= 0x29) && (valueUsage <= 0x2F)) ||\n\t   ((valueUsage >= 0x35) && (valueUsage <= 0x3F)) || ((valueUsage >= 0x44) && (valueUsage <= 0x4F)) ||\n\t   (valueUsage == 0x8A) || (valueUsage == 0x93)  || ((valueUsage >= 0x9D) && (valueUsage <= 0x9E)) ||\n\t   ((valueUsage >= 0xA1) && (valueUsage <= 0xA3)) || ((valueUsage >= 0xAD) && (valueUsage <= 0xFFFF)))\n                sprintf (cstrName, \"PID Reserved\");\n\t\t\telse\n\t\t\t\tswitch (valueUsage)\n\t\t\t\t{\n\t\t\t\t\tcase 0x00: sprintf (cstrName, \"PID Undefined Usage\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_PhysicalInterfaceDevice: sprintf (cstrName, \"Physical Interface Device\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_Normal: sprintf (cstrName, \"Normal Force\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_SetEffectReport: sprintf (cstrName, \"Set Effect Report\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_EffectBlockIndex: sprintf (cstrName, \"Effect Block Index\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ParamBlockOffset: sprintf (cstrName, \"Parameter Block Offset\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ROM_Flag: sprintf (cstrName, \"ROM Flag\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_EffectType: sprintf (cstrName, \"Effect Type\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ET_ConstantForce: sprintf (cstrName, \"Effect Type Constant Force\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ET_Ramp: sprintf (cstrName, \"Effect Type Ramp\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ET_CustomForceData: sprintf (cstrName, \"Effect Type Custom Force Data\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ET_Square: sprintf (cstrName, \"Effect Type Square\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ET_Sine: sprintf (cstrName, \"Effect Type Sine\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ET_Triangle: sprintf (cstrName, \"Effect Type Triangle\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ET_SawtoothUp: sprintf (cstrName, \"Effect Type Sawtooth Up\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ET_SawtoothDown: sprintf (cstrName, \"Effect Type Sawtooth Down\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ET_Spring: sprintf (cstrName, \"Effect Type Spring\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ET_Damper: sprintf (cstrName, \"Effect Type Damper\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ET_Inertia: sprintf (cstrName, \"Effect Type Inertia\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ET_Friction: sprintf (cstrName, \"Effect Type Friction\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_Duration: sprintf (cstrName, \"Effect Duration\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_SamplePeriod: sprintf (cstrName, \"Effect Sample Period\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_Gain: sprintf (cstrName, \"Effect Gain\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_TriggerButton: sprintf (cstrName, \"Effect Trigger Button\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_TriggerRepeatInterval: sprintf (cstrName, \"Effect Trigger Repeat Interval\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_AxesEnable: sprintf (cstrName, \"Axis Enable\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_DirectionEnable: sprintf (cstrName, \"Direction Enable\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_Direction: sprintf (cstrName, \"Direction\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_TypeSpecificBlockOffset: sprintf (cstrName, \"Type Specific Block Offset\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_BlockType: sprintf (cstrName, \"Block Type\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_SetEnvelopeReport: sprintf (cstrName, \"Set Envelope Report\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_AttackLevel: sprintf (cstrName, \"Envelope Attack Level\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_AttackTime: sprintf (cstrName, \"Envelope Attack Time\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_FadeLevel: sprintf (cstrName, \"Envelope Fade Level\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_FadeTime: sprintf (cstrName, \"Envelope Fade Time\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_SetConditionReport: sprintf (cstrName, \"Set Condition Report\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_CP_Offset: sprintf (cstrName, \"Condition CP Offset\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_PositiveCoefficient: sprintf (cstrName, \"Condition Positive Coefficient\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_NegativeCoefficient: sprintf (cstrName, \"Condition Negative Coefficient\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_PositiveSaturation: sprintf (cstrName, \"Condition Positive Saturation\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_NegativeSaturation: sprintf (cstrName, \"Condition Negative Saturation\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_DeadBand: sprintf (cstrName, \"Condition Dead Band\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_DownloadForceSample: sprintf (cstrName, \"Download Force Sample\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_IsochCustomForceEnable: sprintf (cstrName, \"Isoch Custom Force Enable\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_CustomForceDataReport: sprintf (cstrName, \"Custom Force Data Report\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_CustomForceData: sprintf (cstrName, \"Custom Force Data\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_CustomForceVendorDefinedData: sprintf (cstrName, \"Custom Force Vendor Defined Data\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_SetCustomForceReport: sprintf (cstrName, \"Set Custom Force Report\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_CustomForceDataOffset: sprintf (cstrName, \"Custom Force Data Offset\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_SampleCount: sprintf (cstrName, \"Custom Force Sample Count\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_SetPeriodicReport: sprintf (cstrName, \"Set Periodic Report\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_Offset: sprintf (cstrName, \"Periodic Offset\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_Magnitude: sprintf (cstrName, \"Periodic Magnitude\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_Phase: sprintf (cstrName, \"Periodic Phase\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_Period: sprintf (cstrName, \"Periodic Period\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_SetConstantForceReport: sprintf (cstrName, \"Set Constant Force Report\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_SetRampForceReport: sprintf (cstrName, \"Set Ramp Force Report\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_RampStart: sprintf (cstrName, \"Ramp Start\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_RampEnd: sprintf (cstrName, \"Ramp End\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_EffectOperationReport: sprintf (cstrName, \"Effect Operation Report\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_EffectOperation: sprintf (cstrName, \"Effect Operation\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_OpEffectStart: sprintf (cstrName, \"Op Effect Start\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_OpEffectStartSolo: sprintf (cstrName, \"Op Effect Start Solo\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_OpEffectStop: sprintf (cstrName, \"Op Effect Stop\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_LoopCount: sprintf (cstrName, \"Op Effect Loop Count\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_DeviceGainReport: sprintf (cstrName, \"Device Gain Report\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_DeviceGain: sprintf (cstrName, \"Device Gain\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_PoolReport: sprintf (cstrName, \"PID Pool Report\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_RAM_PoolSize: sprintf (cstrName, \"RAM Pool Size\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ROM_PoolSize: sprintf (cstrName, \"ROM Pool Size\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ROM_EffectBlockCount: sprintf (cstrName, \"ROM Effect Block Count\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_SimultaneousEffectsMax: sprintf (cstrName, \"Simultaneous Effects Max\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_PoolAlignment: sprintf (cstrName, \"Pool Alignment\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_PoolMoveReport: sprintf (cstrName, \"PID Pool Move Report\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_MoveSource: sprintf (cstrName, \"Move Source\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_MoveDestination: sprintf (cstrName, \"Move Destination\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_MoveLength: sprintf (cstrName, \"Move Length\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_BlockLoadReport: sprintf (cstrName, \"PID Block Load Report\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_BlockLoadStatus: sprintf (cstrName, \"Block Load Status\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_BlockLoadSuccess: sprintf (cstrName, \"Block Load Success\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_BlockLoadFull: sprintf (cstrName, \"Block Load Full\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_BlockLoadError: sprintf (cstrName, \"Block Load Error\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_BlockHandle: sprintf (cstrName, \"Block Handle\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_BlockFreeReport: sprintf (cstrName, \"PID Block Free Report\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_TypeSpecificBlockHandle: sprintf (cstrName, \"Type Specific Block Handle\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_StateReport: sprintf (cstrName, \"PID State Report\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_EffectPlaying: sprintf (cstrName, \"Effect Playing\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_DeviceControlReport: sprintf (cstrName, \"PID Device Control Report\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_DeviceControl: sprintf (cstrName, \"PID Device Control\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_DC_EnableActuators: sprintf (cstrName, \"Device Control Enable Actuators\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_DC_DisableActuators: sprintf (cstrName, \"Device Control Disable Actuators\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_DC_StopAllEffects: sprintf (cstrName, \"Device Control Stop All Effects\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_DC_DeviceReset: sprintf (cstrName, \"Device Control Reset\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_DC_DevicePause: sprintf (cstrName, \"Device Control Pause\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_DC_DeviceContinue: sprintf (cstrName, \"Device Control Continue\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_DevicePaused: sprintf (cstrName, \"Device Paused\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ActuatorsEnabled: sprintf (cstrName, \"Actuators Enabled\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_SafetySwitch: sprintf (cstrName, \"Safety Switch\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ActuatorOverrideSwitch: sprintf (cstrName, \"Actuator Override Switch\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ActuatorPower: sprintf (cstrName, \"Actuator Power\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_StartDelay: sprintf (cstrName, \"Start Delay\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_ParameterBlockSize: sprintf (cstrName, \"Parameter Block Size\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_DeviceManagedPool: sprintf (cstrName, \"Device Managed Pool\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_SharedParameterBlocks: sprintf (cstrName, \"Shared Parameter Blocks\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_CreateNewEffectReport: sprintf (cstrName, \"Create New Effect Report\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_RAM_PoolAvailable: sprintf (cstrName, \"RAM Pool Available\"); break;\n\t\t\t\t\tdefault: sprintf (cstrName, \"PID Usage 0x%lx\", valueUsage); break;\n\t\t\t\t}\n\t\t\t\t\tbreak;\n        case kHIDPage_Unicode:\n            switch (valueUsage)\n            {\n                default: sprintf (cstrName, \"Unicode Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_PowerDevice:\n\t\t\tif (((valueUsage >= 0x06) && (valueUsage <= 0x0F)) || ((valueUsage >= 0x26) && (valueUsage <= 0x2F)) ||\n\t   ((valueUsage >= 0x39) && (valueUsage <= 0x3F)) || ((valueUsage >= 0x48) && (valueUsage <= 0x4F)) ||\n\t   ((valueUsage >= 0x58) && (valueUsage <= 0x5F)) || (valueUsage == 0x6A) ||\n\t   ((valueUsage >= 0x74) && (valueUsage <= 0xFC)))\n                sprintf (cstrName, \"Power Device Reserved\");\n\t\t\telse\n\t\t\t\tswitch (valueUsage)\n\t\t\t\t{\n\t\t\t\t\tcase kHIDUsage_PD_Undefined: sprintf (cstrName, \"Power Device Undefined Usage\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_iName: sprintf (cstrName, \"Power Device Name Index\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_PresentStatus: sprintf (cstrName, \"Power Device Present Status\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_ChangedStatus: sprintf (cstrName, \"Power Device Changed Status\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_UPS: sprintf (cstrName, \"Uninterruptible Power Supply\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_PowerSupply: sprintf (cstrName, \"Power Supply\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PD_BatterySystem: sprintf (cstrName, \"Battery System Power Module\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_BatterySystemID: sprintf (cstrName, \"Battery System ID\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Battery: sprintf (cstrName, \"Battery\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_BatteryID: sprintf (cstrName, \"Battery ID\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Charger: sprintf (cstrName, \"Charger\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_ChargerID: sprintf (cstrName, \"Charger ID\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_PowerConverter: sprintf (cstrName, \"Power Converter Power Module\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_PowerConverterID: sprintf (cstrName, \"Power Converter ID\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_OutletSystem: sprintf (cstrName, \"Outlet System power module\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_OutletSystemID: sprintf (cstrName, \"Outlet System ID\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Input: sprintf (cstrName, \"Power Device Input\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_InputID: sprintf (cstrName, \"Power Device Input ID\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Output: sprintf (cstrName, \"Power Device Output\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_OutputID: sprintf (cstrName, \"Power Device Output ID\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Flow: sprintf (cstrName, \"Power Device Flow\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_FlowID: sprintf (cstrName, \"Power Device Flow ID\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Outlet: sprintf (cstrName, \"Power Device Outlet\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_OutletID: sprintf (cstrName, \"Power Device Outlet ID\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Gang: sprintf (cstrName, \"Power Device Gang\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_GangID: sprintf (cstrName, \"Power Device Gang ID\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_PowerSummary: sprintf (cstrName, \"Power Device Power Summary\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_PowerSummaryID: sprintf (cstrName, \"Power Device Power Summary ID\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PD_Voltage: sprintf (cstrName, \"Power Device Voltage\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Current: sprintf (cstrName, \"Power Device Current\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Frequency: sprintf (cstrName, \"Power Device Frequency\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_ApparentPower: sprintf (cstrName, \"Power Device Apparent Power\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_ActivePower: sprintf (cstrName, \"Power Device RMS Power\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_PercentLoad: sprintf (cstrName, \"Power Device Percent Load\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Temperature: sprintf (cstrName, \"Power Device Temperature\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Humidity: sprintf (cstrName, \"Power Device Humidity\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_BadCount: sprintf (cstrName, \"Power Device Bad Condition Count\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PD_ConfigVoltage: sprintf (cstrName, \"Power Device Nominal Voltage\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_ConfigCurrent: sprintf (cstrName, \"Power Device Nominal Current\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_ConfigFrequency: sprintf (cstrName, \"Power Device Nominal Frequency\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_ConfigApparentPower: sprintf (cstrName, \"Power Device Nominal Apparent Power\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_ConfigActivePower: sprintf (cstrName, \"Power Device Nominal RMS Power\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_ConfigPercentLoad: sprintf (cstrName, \"Power Device Nominal Percent Load\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_ConfigTemperature: sprintf (cstrName, \"Power Device Nominal Temperature\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PD_ConfigHumidity: sprintf (cstrName, \"Power Device Nominal Humidity\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_SwitchOnControl: sprintf (cstrName, \"Power Device Switch On Control\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_SwitchOffControl: sprintf (cstrName, \"Power Device Switch Off Control\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_ToggleControl: sprintf (cstrName, \"Power Device Toogle Sequence Control\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_LowVoltageTransfer: sprintf (cstrName, \"Power Device Min Transfer Voltage\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_HighVoltageTransfer: sprintf (cstrName, \"Power Device Max Transfer Voltage\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_DelayBeforeReboot: sprintf (cstrName, \"Power Device Delay Before Reboot\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_DelayBeforeStartup: sprintf (cstrName, \"Power Device Delay Before Startup\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_DelayBeforeShutdown: sprintf (cstrName, \"Power Device Delay Before Shutdown\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Test: sprintf (cstrName, \"Power Device Test Request/Result\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_ModuleReset: sprintf (cstrName, \"Power Device Reset Request/Result\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_AudibleAlarmControl: sprintf (cstrName, \"Power Device Audible Alarm Control\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PD_Present: sprintf (cstrName, \"Power Device Present\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Good: sprintf (cstrName, \"Power Device Good\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_InternalFailure: sprintf (cstrName, \"Power Device Internal Failure\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_VoltageOutOfRange: sprintf (cstrName, \"Power Device Voltage Out Of Range\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_FrequencyOutOfRange: sprintf (cstrName, \"Power Device Frequency Out Of Range\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Overload: sprintf (cstrName, \"Power Device Overload\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_OverCharged: sprintf (cstrName, \"Power Device Over Charged\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_OverTemperature: sprintf (cstrName, \"Power Device Over Temperature\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_ShutdownRequested: sprintf (cstrName, \"Power Device Shutdown Requested\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PD_ShutdownImminent: sprintf (cstrName, \"Power Device Shutdown Imminent\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_SwitchOnOff: sprintf (cstrName, \"Power Device On/Off Switch Status\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Switchable: sprintf (cstrName, \"Power Device Switchable\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Used: sprintf (cstrName, \"Power Device Used\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Boost: sprintf (cstrName, \"Power Device Boosted\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Buck: sprintf (cstrName, \"Power Device Bucked\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Initialized: sprintf (cstrName, \"Power Device Initialized\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Tested: sprintf (cstrName, \"Power Device Tested\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_AwaitingPower: sprintf (cstrName, \"Power Device Awaiting Power\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_CommunicationLost: sprintf (cstrName, \"Power Device Communication Lost\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PD_iManufacturer: sprintf (cstrName, \"Power Device Manufacturer String Index\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_iProduct: sprintf (cstrName, \"Power Device Product String Index\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_iserialNumber: sprintf (cstrName, \"Power Device Serial Number String Index\"); break;\n\t\t\t\t\tdefault: sprintf (cstrName, \"Power Device Usage 0x%lx\", valueUsage); break;\n\t\t\t\t}\n\t\t\t\t\tbreak;\n        case kHIDPage_BatterySystem:\n\t\t\tif (((valueUsage >= 0x0A) && (valueUsage <= 0x0F)) || ((valueUsage >= 0x1E) && (valueUsage <= 0x27)) ||\n\t   ((valueUsage >= 0x30) && (valueUsage <= 0x3F)) || ((valueUsage >= 0x4C) && (valueUsage <= 0x5F)) ||\n\t   ((valueUsage >= 0x6C) && (valueUsage <= 0x7F)) || ((valueUsage >= 0x90) && (valueUsage <= 0xBF)) ||\n\t   ((valueUsage >= 0xC3) && (valueUsage <= 0xCF)) || ((valueUsage >= 0xDD) && (valueUsage <= 0xEF)) ||\n\t   ((valueUsage >= 0xF2) && (valueUsage <= 0xFF)))\n                sprintf (cstrName, \"Power Device Reserved\");\n\t\t\telse\n\t\t\t\tswitch (valueUsage)\n\t\t\t\t{\n\t\t\t\t\tcase kHIDUsage_BS_Undefined: sprintf (cstrName, \"Battery System Undefined\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_SMBBatteryMode: sprintf (cstrName, \"SMB Mode\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_SMBBatteryStatus: sprintf (cstrName, \"SMB Status\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_SMBAlarmWarning: sprintf (cstrName, \"SMB Alarm Warning\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_SMBChargerMode: sprintf (cstrName, \"SMB Charger Mode\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_SMBChargerStatus: sprintf (cstrName, \"SMB Charger Status\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_SMBChargerSpecInfo: sprintf (cstrName, \"SMB Charger Extended Status\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_SMBSelectorState: sprintf (cstrName, \"SMB Selector State\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_SMBSelectorPresets: sprintf (cstrName, \"SMB Selector Presets\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_SMBSelectorInfo: sprintf (cstrName, \"SMB Selector Info\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_OptionalMfgFunction1: sprintf (cstrName, \"Battery System Optional SMB Mfg Function 1\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_OptionalMfgFunction2: sprintf (cstrName, \"Battery System Optional SMB Mfg Function 2\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_OptionalMfgFunction3: sprintf (cstrName, \"Battery System Optional SMB Mfg Function 3\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_OptionalMfgFunction4: sprintf (cstrName, \"Battery System Optional SMB Mfg Function 4\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_OptionalMfgFunction5: sprintf (cstrName, \"Battery System Optional SMB Mfg Function 5\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_ConnectionToSMBus: sprintf (cstrName, \"Battery System Connection To System Management Bus\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_OutputConnection: sprintf (cstrName, \"Battery System Output Connection Status\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_ChargerConnection: sprintf (cstrName, \"Battery System Charger Connection\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_BatteryInsertion: sprintf (cstrName, \"Battery System Battery Insertion\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_Usenext: sprintf (cstrName, \"Battery System Use Next\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_OKToUse: sprintf (cstrName, \"Battery System OK To Use\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_BatterySupported: sprintf (cstrName, \"Battery System Battery Supported\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_SelectorRevision: sprintf (cstrName, \"Battery System Selector Revision\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_ChargingIndicator: sprintf (cstrName, \"Battery System Charging Indicator\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_ManufacturerAccess: sprintf (cstrName, \"Battery System Manufacturer Access\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_RemainingCapacityLimit: sprintf (cstrName, \"Battery System Remaining Capacity Limit\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_RemainingTimeLimit: sprintf (cstrName, \"Battery System Remaining Time Limit\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_AtRate: sprintf (cstrName, \"Battery System At Rate...\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_CapacityMode: sprintf (cstrName, \"Battery System Capacity Mode\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_BroadcastToCharger: sprintf (cstrName, \"Battery System Broadcast To Charger\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_PrimaryBattery: sprintf (cstrName, \"Battery System Primary Battery\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_ChargeController: sprintf (cstrName, \"Battery System Charge Controller\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_TerminateCharge: sprintf (cstrName, \"Battery System Terminate Charge\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_TerminateDischarge: sprintf (cstrName, \"Battery System Terminate Discharge\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_BelowRemainingCapacityLimit: sprintf (cstrName, \"Battery System Below Remaining Capacity Limit\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_RemainingTimeLimitExpired: sprintf (cstrName, \"Battery System Remaining Time Limit Expired\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_Charging: sprintf (cstrName, \"Battery System Charging\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_Discharging: sprintf (cstrName, \"Battery System Discharging\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_FullyCharged: sprintf (cstrName, \"Battery System Fully Charged\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_FullyDischarged: sprintf (cstrName, \"Battery System Fully Discharged\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_ConditioningFlag: sprintf (cstrName, \"Battery System Conditioning Flag\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_AtRateOK: sprintf (cstrName, \"Battery System At Rate OK\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_SMBErrorCode: sprintf (cstrName, \"Battery System SMB Error Code\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_NeedReplacement: sprintf (cstrName, \"Battery System Need Replacement\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_AtRateTimeToFull: sprintf (cstrName, \"Battery System At Rate Time To Full\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_AtRateTimeToEmpty: sprintf (cstrName, \"Battery System At Rate Time To Empty\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_AverageCurrent: sprintf (cstrName, \"Battery System Average Current\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_Maxerror: sprintf (cstrName, \"Battery System Max Error\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_RelativeStateOfCharge: sprintf (cstrName, \"Battery System Relative State Of Charge\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_AbsoluteStateOfCharge: sprintf (cstrName, \"Battery System Absolute State Of Charge\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_RemainingCapacity: sprintf (cstrName, \"Battery System Remaining Capacity\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_FullChargeCapacity: sprintf (cstrName, \"Battery System Full Charge Capacity\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_RunTimeToEmpty: sprintf (cstrName, \"Battery System Run Time To Empty\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_AverageTimeToEmpty: sprintf (cstrName, \"Battery System Average Time To Empty\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_AverageTimeToFull: sprintf (cstrName, \"Battery System Average Time To Full\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_CycleCount: sprintf (cstrName, \"Battery System Cycle Count\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_BattPackModelLevel: sprintf (cstrName, \"Battery System Batt Pack Model Level\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_InternalChargeController: sprintf (cstrName, \"Battery System Internal Charge Controller\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_PrimaryBatterySupport: sprintf (cstrName, \"Battery System Primary Battery Support\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_DesignCapacity: sprintf (cstrName, \"Battery System Design Capacity\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_SpecificationInfo: sprintf (cstrName, \"Battery System Specification Info\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_ManufacturerDate: sprintf (cstrName, \"Battery System Manufacturer Date\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_SerialNumber: sprintf (cstrName, \"Battery System Serial Number\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_iManufacturerName: sprintf (cstrName, \"Battery System Manufacturer Name Index\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_iDevicename: sprintf (cstrName, \"Battery System Device Name Index\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_iDeviceChemistry: sprintf (cstrName, \"Battery System Device Chemistry Index\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_ManufacturerData: sprintf (cstrName, \"Battery System Manufacturer Data\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_Rechargable: sprintf (cstrName, \"Battery System Rechargable\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_WarningCapacityLimit: sprintf (cstrName, \"Battery System Warning Capacity Limit\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_CapacityGranularity1: sprintf (cstrName, \"Battery System Capacity Granularity 1\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_CapacityGranularity2: sprintf (cstrName, \"Battery System Capacity Granularity 2\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_iOEMInformation: sprintf (cstrName, \"Battery System OEM Information Index\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_InhibitCharge: sprintf (cstrName, \"Battery System Inhibit Charge\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_EnablePolling: sprintf (cstrName, \"Battery System Enable Polling\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_ResetToZero: sprintf (cstrName, \"Battery System Reset To Zero\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_ACPresent: sprintf (cstrName, \"Battery System AC Present\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_BatteryPresent: sprintf (cstrName, \"Battery System Battery Present\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_PowerFail: sprintf (cstrName, \"Battery System Power Fail\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_AlarmInhibited: sprintf (cstrName, \"Battery System Alarm Inhibited\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_ThermistorUnderRange: sprintf (cstrName, \"Battery System Thermistor Under Range\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_ThermistorHot: sprintf (cstrName, \"Battery System Thermistor Hot\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_ThermistorCold: sprintf (cstrName, \"Battery System Thermistor Cold\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_ThermistorOverRange: sprintf (cstrName, \"Battery System Thermistor Over Range\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_VoltageOutOfRange: sprintf (cstrName, \"Battery System Voltage Out Of Range\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_CurrentOutOfRange: sprintf (cstrName, \"Battery System Current Out Of Range\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_CurrentNotRegulated: sprintf (cstrName, \"Battery System Current Not Regulated\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_VoltageNotRegulated: sprintf (cstrName, \"Battery System Voltage Not Regulated\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_MasterMode: sprintf (cstrName, \"Battery System Master Mode\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_ChargerSelectorSupport: sprintf (cstrName, \"Battery System Charger Support Selector\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_ChargerSpec: sprintf (cstrName, \"attery System Charger Specification\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_Level2: sprintf (cstrName, \"Battery System Charger Level 2\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_Level3: sprintf (cstrName, \"Battery System Charger Level 3\"); break;\n\t\t\t\t\tdefault: sprintf (cstrName, \"Battery System Usage 0x%lx\", valueUsage); break;\n\t\t\t\t}\n\t\t\t\t\tbreak;\n        case kHIDPage_AlphanumericDisplay:\n            switch (valueUsage)\n            {\n                default: sprintf (cstrName, \"Alphanumeric Display Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n\t\tcase kHIDPage_BarCodeScanner:\n            switch (valueUsage)\n            {\n                default: sprintf (cstrName, \"Bar Code Scanner Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_Scale:\n            switch (valueUsage)\n            {\n                default: sprintf (cstrName, \"Scale Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_CameraControl:\n            switch (valueUsage)\n            {\n                default: sprintf (cstrName, \"Camera Control Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_Arcade:\n            switch (valueUsage)\n            {\n                default: sprintf (cstrName, \"Arcade Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n        default:\n\t\t\tif (valueUsagePage > kHIDPage_VendorDefinedStart)\n\t\t\t\tsprintf (cstrName, \"Vendor Defined Usage 0x%lx\", valueUsage);\n\t\t\telse\n\t\t\t\tsprintf (cstrName, \"Page: 0x%lx, Usage: 0x%lx\", valueUsagePage, valueUsage);\n            break;\n    }\n}\n\n// ---------------------------------\n// returns calibrated value given raw value passed in\n// calibrated value is equal to min and max values returned by HIDGetElementValue since device list built scaled to element reported min and max values\n\nSInt32 HIDCalibrateValue (SInt32 value, pRecElement pElement)\n{\n\tif (NULL != pElement)\n\t{\n\t\tfloat deviceScale = pElement->max - pElement->min;\n\t\tfloat readScale = pElement->calMax - pElement->calMin;\n\t\tif (readScale == 0)\n\t\t\treturn value; // no scaling as\n\t\telse\n\t\t\treturn ((value - pElement->calMin) * deviceScale / readScale) + pElement->min;\n\t}\n\telse\n\t\treturn 0; // bad element passed in\n}\n\n// ---------------------------------\n// returns scaled value given raw value passed in\n// scaled value is equal to current value assumed to be in the range of element reported min and max values scaled to user min and max scaled values\n\nSInt32 HIDScaleValue (SInt32 value, pRecElement pElement)\n{\n    float deviceScale = pElement->userMax - pElement->userMin;\n    float readScale = pElement->max - pElement->min;\n    if (readScale == 0)\n\t\treturn value;\n\telse\n\t\treturn (value - pElement->min) * deviceScale / readScale + pElement->userMin;\n}\n\n// ---------------------------------\n// convert an element type to a mask\nHIDElementTypeMask HIDConvertElementTypeToMask (const long type)\n{\n    HIDElementTypeMask result = kHIDElementTypeAll;\n\n    switch (type)\n    {\n        case kIOHIDElementTypeInput_Misc:\n        case kIOHIDElementTypeInput_Button:\n        case kIOHIDElementTypeInput_Axis:\n        case kIOHIDElementTypeInput_ScanCodes:\n            result = kHIDElementTypeInput;\n            break;\n        case kIOHIDElementTypeOutput:\n            result = kHIDElementTypeOutput;\n            break;\n        case kIOHIDElementTypeFeature:\n            result = kHIDElementTypeFeature;\n            break;\n        case kIOHIDElementTypeCollection:\n            result = kHIDElementTypeCollection;\n            break;\n        default:\n            result = kHIDElementTypeAll;\n            break;\n    }\n    return result;\n}\n\nBoolean HIDFindDevice(const pRecDevice pSearchDevice, pRecDevice *ppFoundDevice)\n{\n    pRecDevice pDevice, pBestDevice = NULL;\n    long bestScore = 0;\n\n    // iterate over all devices\n    pDevice = HIDGetFirstDevice();\n    while (pDevice)\n    {\n        long deviceScore = 1;\n\n        if (pSearchDevice->vendorID && (pSearchDevice->vendorID == pDevice->vendorID))\n        {\n            deviceScore += 10;\n            if (pSearchDevice->productID && (pSearchDevice->productID == pDevice->productID))\n                deviceScore += 8;\n        }\n\n        if ((pSearchDevice->usagePage && (pSearchDevice->usagePage == pDevice->usagePage)) &&\n            (pSearchDevice->usage && (pSearchDevice->usage == pDevice->usage)))\n            deviceScore += 9;\n\n        if (pSearchDevice->locID && (pSearchDevice->locID == pDevice->locID))\n            deviceScore += 5;\n\n\t\tif (deviceScore > bestScore)\n\t\t{\n\t\t\tpBestDevice = pDevice;\n\t\t\tbestScore = deviceScore;\n#if 0\t// set true to output scoring informaton\n\t\t\tprintf(\"\\n-HIDFindDevice(%ld:%ld)-I-Debug, better score: %ld.\",pSearchElement->usagePage, pSearchElement->usage, score);\n\t\t\tHIDPrintElement(pBestElement);\n#endif\n        }\n        pDevice = HIDGetNextDevice(pDevice);\n    }\n\n    if (NULL != pBestDevice)\n    {\n        *ppFoundDevice = pBestDevice;\n#if 0\t// set true to output scoring informaton\n\t\tprintf(\"\\n-HIDFindDevice(%ld:%ld)-I-Debug, best score: %ld.\",pSearchElement->usagePage, pSearchElement->usage, bestScore);\n\t\tHIDPrintElement(pBestElement);\n\t\tprintf(\"\\n\");\n#endif\n        return true;\n    }\n    else\n        return false;\n}\n\n// ---------------------------------\n// find the device and element for this action\n// Device: serial, vendorID, productID, location, usagePage, usage\n// Element: cookie, usagePage, usage,\n\nBoolean HIDFindActionDeviceAndElement(const pRecDevice pSearchDevice, const pRecElement pSearchElement,\n\t\t\t\t\t\t\t\t\t  pRecDevice *ppFoundDevice, pRecElement *ppFoundElement)\n{\n    pRecDevice pDevice, pBestDevice = NULL;\n    pRecElement pElement, pBestElement = NULL;\n\tHIDElementTypeMask hidMask = HIDConvertElementTypeToMask (pSearchElement->type);\n    long bestScore = 0;\n\n    // iterate over all devices\n    pDevice = HIDGetFirstDevice();\n    while (pDevice)\n    {\n        long deviceScore = 1;\n\n        if (pSearchDevice->vendorID && (pSearchDevice->vendorID == pDevice->vendorID))\n        {\n            deviceScore += 10;\n            if (pSearchDevice->productID && (pSearchDevice->productID == pDevice->productID))\n                deviceScore += 8;\n        }\n        if ((pSearchDevice->usagePage && (pSearchDevice->usagePage == pDevice->usagePage)) &&\n            (pSearchDevice->usage && (pSearchDevice->usage == pDevice->usage)))\n            deviceScore += 9;\n\n        if (pSearchDevice->locID && (pSearchDevice->locID == pDevice->locID))\n            deviceScore += 5;\n\n        // iterate over all elements of this device\n        pElement = HIDGetFirstDeviceElement(pDevice, hidMask);\n        while (pElement)\n        {\n            long score = deviceScore;\n\n            if ((pSearchElement->usagePage && (pSearchElement->usagePage == pElement->usagePage)) &&\n                (pSearchElement->usage && (pSearchElement->usage == pElement->usage)))\n\t\t\t{\n                score += 5;\n\n\t\t\t\tif (pSearchElement->cookie && (pSearchElement->cookie == pElement->cookie))\n\t\t\t\t\tscore += 4;\n\t\t\t}\n\t\t\telse\n\t\t\t\tscore = 0;\n#if 0\t\t// set true to output scoring informaton\n\t\t\tif (kHIDPage_KeyboardOrKeypad != pElement->usagePage)\t// skip keyboards here\n\t\t\t{\n\t\t\t\tprintf(\"\\n-HIDFindActionDeviceAndElement(%ld:%ld)-I-Debug, score: %ld.\",pSearchElement->usagePage, pSearchElement->usage, score);\n\t\t\t\tHIDPrintElement(pElement);\n\t\t\t}\n#endif\n            if (score > bestScore)\n            {\n                pBestDevice = pDevice;\n                pBestElement = pElement;\n                bestScore = score;\n#if 0\t\t// set true to output scoring informaton\n\t\t\t\tprintf(\"\\n-HIDFindActionDeviceAndElement(%ld:%ld)-I-Debug, better score: %ld.\",pSearchElement->usagePage, pSearchElement->usage, score);\n\t\t\t\tHIDPrintElement(pBestElement);\n#endif\n            }\n            pElement = HIDGetNextDeviceElement(pElement, hidMask);\n        }\n        pDevice = HIDGetNextDevice(pDevice);\n    }\n\n    if ((NULL != pBestDevice) || (NULL != pBestElement))\n    {\n        *ppFoundDevice = pBestDevice;\n        *ppFoundElement = pBestElement;\n#if 0\t\t// set true to output scoring informaton\n\t\tprintf(\"\\n-HIDFindActionDeviceAndElement(%ld:%ld)-I-Debug, best score: %ld.\",pSearchElement->usagePage, pSearchElement->usage, bestScore);\n\t\tHIDPrintElement(pBestElement);\n\t\tprintf(\"\\n\");\n#endif\n        return true;\n    }\n    else\n        return false;\n}\n\n// ---------------------------------\n// find the device and element for this action\n// Device: serial, vendorID, productID, location, usagePage, usage\n// Element: cookie, usagePage, usage,\n\nBoolean HIDFindSubElement(const pRecElement pStartElement, const pRecElement pSearchElement, pRecElement *ppFoundElement)\n{\n    pRecElement pElement, pBestElement = NULL;\n\tHIDElementTypeMask hidMask = HIDConvertElementTypeToMask (pSearchElement->type);\n    long bestScore = 0;\n\n    if ((NULL == pStartElement) || (NULL == pSearchElement) || (NULL == ppFoundElement))\n        return false;\n\n\t// iterate over all children of this element\n\tpElement = pStartElement->pChild;\n\n\twhile (pElement)\n\t{\n\t\tlong score = 0;\n#if 0\t\t// set true to output searching informaton\n\t\tprintf(\"\\n-HIDFindSubElement, search = {t:%.2lX, u:%.4lX:%.4lX}, match = {t:%.2lX, u:%.4lX:%.4lX, s:\\\"%s\\\"}\",\n\t\t pSearchElement->type, pSearchElement->usagePage, pSearchElement->usage,\n\t\t pElement->type, pElement->usagePage, pElement->usage, pElement->name);\n\t\tfflush(stdout);\n#endif\n\t\tif ((pSearchElement->usagePage && (pSearchElement->usagePage == pElement->usagePage)) && (pSearchElement->usage && (pSearchElement->usage == pElement->usage)))\n\t\t{\n\t\t\tscore += 4;\n\t\t\tif (pSearchElement->cookie && (pSearchElement->cookie == pElement->cookie))\n\t\t\t\tscore += 5;\n\t\t}\n#if 0\t\t// set true to output searching informaton\n\t\tif (kHIDPage_KeyboardOrKeypad != pElement->usagePage)\t// skip keyboards here\n\t\t{\n\t\t\tprintf(\"\\n-HIDFindSubElement(%ld:%ld)-I-Debug, score: %ld.\",pSearchElement->usagePage, pSearchElement->usage, score);\n\t\t\tHIDPrintElement(pElement);\n\t\t}\n#endif\n\t\t\n\t\tif (score > bestScore)\n\t\t{\n\t\t\tpBestElement = pElement;\n\t\t\tbestScore = score;\n#if 0\t\t// set true to output searching informaton\n\t\t\tprintf(\"\\n-HIDFindSubElement(%ld:%ld)-I-Debug, better score: %ld.\",pSearchElement->usagePage, pSearchElement->usage, score);\n\t\t\tHIDPrintElement(pBestElement);\n#endif\n\t\t}\n\t\tpElement = HIDGetNextDeviceElement(pElement, hidMask);\n\t}\n#if 0\t\t// set true to output searching informaton\n\tif (pBestElement)\n\t{\n\t\tprintf(\"\\n-HIDFindSubElement(%ld:%ld)-I-Debug, best score: %ld.\",pSearchElement->usagePage, pSearchElement->usage, bestScore);\n\t\tHIDPrintElement(pBestElement);\n\t\tprintf(\"\\n\");\n\t}\n#endif\n\t\n\t*ppFoundElement = pBestElement;\n\treturn (NULL != pBestElement);\n}\n\n// print out all of an elements information\nint HIDPrintElement(const pRecElement pElement)\n{\n\tint results;\n\tint count;\n\n\tprintf(\"\\n\");\n\n\tif (gDepth != pElement->depth)\n\t\tprintf(\"%d\",gDepth);\n\tfor (count = 0;count < pElement->depth;count++)\n\t\tprintf(\"  | \");\n\n#if 0\t// this is verbose\n\tresults =\n\t\tprintf(\"-HIDPrintElement = {name: \\\"%s\\\", t: 0x%.2lX, u:%ld:%ld, c: %ld, min/max: %ld/%ld, scaled: %ld/%ld, size: %ld, rel: %s, wrap: %s, nonLinear: %s, preferred: %s, nullState: %s, units: %ld, exp: %ld, cal: %ld/%ld, user: %ld/%ld, depth: %ld}.\",\n\t\t pElement->name,\t\t\t\t\t\t\t// name of element (c string)\n\t\t pElement->type,\t\t\t\t\t\t\t// the type defined by IOHIDElementType in IOHIDKeys.h\n\t\t pElement->usagePage,\t\t\t\t\t// usage page from IOUSBHIDParser.h which defines general usage\n\t\t pElement->usage,\t\t\t\t\t\t// usage within above page from IOUSBHIDParser.h which defines specific usage\n\t\t (long) pElement->cookie,\t\t\t\t// unique value (within device of specific vendorID and productID) which identifies element, will NOT change\n\t\t pElement->min,\t\t\t\t\t\t\t// reported min value possible\n\t\t pElement->max,\t\t\t\t\t\t\t// reported max value possible\n\t\t pElement->scaledMin,\t\t\t\t\t// reported scaled min value possible\n\t\t pElement->scaledMax,\t\t\t\t\t// reported scaled max value possible\n\t\t pElement->size,\t\t\t\t\t\t\t// size in bits of data return from element\n\t\t pElement->relative ? \"YES\" : \"NO\",\t\t// are reports relative to last report (deltas)\n\t\t pElement->wrapping ? \"YES\" : \"NO\",\t\t// does element wrap around (one value higher than max is min)\n\t\t pElement->nonLinear ? \"YES\" : \"NO\",\t\t// are the values reported non-linear relative to element movement\n\t\t pElement->preferredState ? \"YES\" : \"NO\",// does element have a preferred state (such as a button)\n\t\t pElement->nullState ? \"YES\" : \"NO\",\t\t// does element have null state\n\t\t pElement->units,\t\t\t\t\t\t// units value is reported in (not used very often)\n\t\t pElement->unitExp,\t\t\t\t\t\t// exponent for units (also not used very often)\n\t\t pElement->calMin, \t\t\t\t\t\t// min returned value (for calibrate call)\n\t\t pElement->calMax, \t\t\t\t\t\t// max returned value\n\t\t pElement->userMin, \t\t\t\t\t\t// user set min to scale to (for scale call)\n\t\t pElement->userMax, \t\t\t\t\t\t// user set max\n\t\t pElement->depth\n\t\t );\n#else\t// this is brief\n\tresults =\n\t\tprintf(\"-HIDPrintElement = {t: 0x%lX, u:%ld:%ld, c: %ld, name: \\\"%s\\\", d: %ld}.\",\n\t\t pElement->type,\t\t\t\t// the type defined by IOHIDElementType in IOHIDKeys.h\n\t\t pElement->usagePage,\t\t\t// usage page from IOUSBHIDParser.h which defines general usage\n\t\t pElement->usage,\t\t\t\t// usage within above page from IOUSBHIDParser.h which defines specific usage\n\t\t (long) pElement->cookie,\t\t// unique value (within device of specific vendorID and productID) which identifies element, will NOT change\n\t\t pElement->name,\t\t\t\t// name of element (c string)\n\t\t pElement->depth\n\t\t );\n#endif\n\tfflush(stdout);\n\treturn results;\n}\n\n// return true if this is a valid device pointer\nBoolean HIDIsValidDevice(const pRecDevice pSearchDevice)\n{\n\tpRecDevice pDevice = gpDeviceList;\n\n\twhile (pDevice)\n\t{\n\t\tif (pDevice == pSearchDevice)\n\t\t\treturn true;\n\t\tpDevice = pDevice->pNext;\n\t}\n\treturn false;\n}\n\n// return true if this is a valid element pointer for this device\nBoolean HIDIsValidElement(const pRecDevice pSearchDevice, const pRecElement pSearchElement)\n{\n\tif (HIDIsValidDevice(pSearchDevice))\n\t{\n\t\tpRecElement pRecElementTemp = HIDGetFirstDeviceElement(pSearchDevice,kHIDElementTypeAll);\n\t\twhile (pRecElementTemp)\n\t\t{\n\t\t\tif (pRecElementTemp == pSearchElement)\n\t\t\t\treturn true;\n\t\t\tpRecElementTemp = HIDGetNextDeviceElement(pRecElementTemp,kHIDElementTypeAll);\t\n\t\t}\n\t}\n\treturn false;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/JoystickTabletPlugin/HID_Utilities.h",
    "content": "/*\n\tFile:\t\tHID_Utilities.h\n\n\tContains:\tExternal interface for HID Utilities\n    \n\tDRI: George Warner\n\n\tCopyright:\tCopyright  2002 Apple Computer, Inc., All Rights Reserved\n\n\tDisclaimer:\tIMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc.\n\t\t\t\t(\"Apple\") in consideration of your agreement to the following terms, and your\n\t\t\t\tuse, installation, modification or redistribution of this Apple software\n\t\t\t\tconstitutes acceptance of these terms.  If you do not agree with these terms,\n\t\t\t\tplease do not use, install, modify or redistribute this Apple software.\n\n\t\t\t\tIn consideration of your agreement to abide by the following terms, and subject\n\t\t\t\tto these terms, Apple grants you a personal, non-exclusive license, under Apples\n\t\t\t\tcopyrights in this original Apple software (the \"Apple Software\"), to use,\n\t\t\t\treproduce, modify and redistribute the Apple Software, with or without\n\t\t\t\tmodifications, in source and/or binary forms; provided that if you redistribute\n\t\t\t\tthe Apple Software in its entirety and without modifications, you must retain\n\t\t\t\tthis notice and the following text and disclaimers in all such redistributions of\n\t\t\t\tthe Apple Software.  Neither the name, trademarks, service marks or logos of\n\t\t\t\tApple Computer, Inc. may be used to endorse or promote products derived from the\n\t\t\t\tApple Software without specific prior written permission from Apple.  Except as\n\t\t\t\texpressly stated in this notice, no other rights or licenses, express or implied,\n\t\t\t\tare granted by Apple herein, including but not limited to any patent rights that\n\t\t\t\tmay be infringed by your derivative works or by other works in which the Apple\n\t\t\t\tSoftware may be incorporated.\n\n\t\t\t\tThe Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE MAKES NO\n\t\t\t\tWARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED\n\t\t\t\tWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n\t\t\t\tPURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN\n\t\t\t\tCOMBINATION WITH YOUR PRODUCTS.\n\n\t\t\t\tIN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR\n\t\t\t\tCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n\t\t\t\tGOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n\t\t\t\tARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION\n\t\t\t\tOF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT\n\t\t\t\t(INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN\n\t\t\t\tADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n#ifndef _HID_Utilities_h_\n#define _HID_Utilities_h_\n\n#include <Carbon/Carbon.h>\n\n#include <IOKit/IOTypes.h>\n// 10.0.x\n//#include <IOKit/IOUSBHIDParser.h>\n// 10.1.x\n#include <IOKit/hid/IOHIDUsageTables.h>\n\n#include <IOKit/hid/IOHIDLib.h>\n\n// ==================================\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n// ==================================\n\nenum\n{\n    kDefaultUserMin = 0,\t\t\t\t\t// default user min and max used for scaling\n    kDefaultUserMax = 255,\n};\n\ntypedef enum HIDElementTypeMask\n{\n\tkHIDElementTypeInput\t\t\t\t= 1 << 1,\n\tkHIDElementTypeOutput            \t= 1 << 2,\n\tkHIDElementTypeFeature           \t= 1 << 3,\n\tkHIDElementTypeCollection        \t= 1 << 4,\n\tkHIDElementTypeIO\t\t\t\t\t= kHIDElementTypeInput | kHIDElementTypeOutput | kHIDElementTypeFeature,\n\tkHIDElementTypeAll\t\t\t\t\t= kHIDElementTypeIO | kHIDElementTypeCollection\n}HIDElementTypeMask;\n\nstruct recElement\n{\n    IOHIDElementType type;\t\t\t\t\t// the type defined by IOHIDElementType in IOHIDKeys.h\n    long usagePage;\t\t\t\t\t\t\t// usage page from IOUSBHIDParser.h which defines general usage\n    long usage;\t\t\t\t\t\t\t\t// usage within above page from IOUSBHIDParser.h which defines specific usage\n    IOHIDElementCookie cookie;\t\t\t\t// unique value (within device of specific vendorID and productID) which identifies element, will NOT change\n    long min;\t\t\t\t\t\t\t\t// reported min value possible\n    long max;\t\t\t\t\t\t\t\t// reported max value possible\n    long scaledMin;\t\t\t\t\t\t\t// reported scaled min value possible\n    long scaledMax;\t\t\t\t\t\t\t// reported scaled max value possible\n    long size;\t\t\t\t\t\t\t\t// size in bits of data return from element\n    Boolean relative;\t\t\t\t\t\t// are reports relative to last report (deltas)\n    Boolean wrapping;\t\t\t\t\t\t// does element wrap around (one value higher than max is min)\n    Boolean nonLinear;\t\t\t\t\t\t// are the values reported non-linear relative to element movement\n    Boolean preferredState;\t\t\t\t\t// does element have a preferred state (such as a button)\n    Boolean nullState;\t\t\t\t\t\t// does element have null state\n    long units;\t\t\t\t\t\t\t\t// units value is reported in (not used very often)\n    long unitExp;\t\t\t\t\t\t\t// exponent for units (also not used very often)\n    Str255 name;\t\t\t\t\t\t\t// name of element (not used often)\n\n// runtime variables\n    long minReport; \t\t\t\t\t\t// min returned value\n    long maxReport; \t\t\t\t\t\t// max returned value (calibrate call)\n    long userMin; \t\t\t\t\t\t\t// user set value to scale to (scale call)\n    long userMax;\t\t\t\t\t\t\t\n    \n\tstruct recElement * pPrevious;\t\t\t// previous element (NULL at list head)\n    struct recElement * pChild;\t\t\t\t// next child (only of collections)\n    struct recElement * pSibling;\t\t\t// next sibling (for elements and collections)\n\t\n};\ntypedef struct recElement recElement;\ntypedef recElement* pRecElement;\n\nstruct recDevice\n{\n    IOHIDDeviceInterface ** interface;\t\t// interface to device, NULL = no interface\n    IOHIDQueueInterface ** queue;\t\t\t// device queue, NULL = no queue\n\tCFRunLoopSourceRef\tqueueRunLoopSource;\t\t// device queue run loop source, NULL == no source\n\tIOHIDOutputTransactionInterface ** transaction;\t\t// output transaction interface, NULL == no transaction\n\tio_object_t notification;\t\t\t\t// notifications\n\tStr255 transport;\t\t\t\t\t\t// device transport\n    long vendorID;\t\t\t\t\t\t\t// id for device vendor, unique across all devices\n    long productID;\t\t\t\t\t\t\t// id for particular product, unique across all of a vendors devices\n    long version;\t\t\t\t\t\t\t// version of product\n    Str255 manufacturer;\t\t\t\t\t// name of manufacturer\n    Str255 product;\t\t\t\t\t\t\t// name of product\n    Str255 serial;\t\t\t\t\t\t\t// serial number of specific product, can be assumed unique across specific product or specific vendor (not used often)\n    long locID;\t\t\t\t\t\t\t\t// long representing location in USB (or other I/O) chain which device is pluged into, can identify specific device on machine\n    long usage;\t\t\t\t\t\t\t\t// usage page from IOUSBHID Parser.h which defines general usage\n    long usagePage;\t\t\t\t\t\t\t// usage within above page from IOUSBHID Parser.h which defines specific usage\n    long totalElements;\t\t\t\t\t\t// number of total elements (should be total of all elements on device including collections) (calculated, not reported by device)\n\tlong features;\t\t\t\t\t\t\t// number of elements of type kIOHIDElementTypeFeature\n\tlong inputs;\t\t\t\t\t\t\t// number of elements of type kIOHIDElementTypeInput_Misc or kIOHIDElementTypeInput_Button or kIOHIDElementTypeInput_Axis or kIOHIDElementTypeInput_ScanCodes\n\tlong outputs;\t\t\t\t\t\t\t// number of elements of type kIOHIDElementTypeOutput\n\tlong collections;\t\t\t\t\t\t// number of elements of type kIOHIDElementTypeCollection\n    long axis;\t\t\t\t\t\t\t\t// number of axis (calculated, not reported by device)\n    long buttons;\t\t\t\t\t\t\t// number of buttons (calculated, not reported by device)\n    long hats;\t\t\t\t\t\t\t\t// number of hat switches (calculated, not reported by device)\n    long sliders;\t\t\t\t\t\t\t// number of sliders (calculated, not reported by device)\n    long dials;\t\t\t\t\t\t\t\t// number of dials (calculated, not reported by device)\n    long wheels;\t\t\t\t\t\t\t// number of wheels (calculated, not reported by device)\n    recElement* pListElements; \t\t\t\t// head of linked list of elements \n    struct recDevice* pNext; \t\t\t\t// next device\n};\ntypedef struct recDevice recDevice;\ntypedef recDevice* pRecDevice;\n\n// ==================================\n// Create and open an interface to device, required prior to extracting values or building queues\n// Note: appliction now owns the device and must close and release it prior to exiting\nextern IOReturn HIDCreateOpenDeviceInterface (io_object_t hidDevice, pRecDevice pDevice);\n\n// builds list of device with elements (allocates memory and captures devices)\n// list is allcoated internally within HID Utilites and can be accessed via accessor functions\n// structures within list are considered flat and user accessable, butnot user modifiable\n// can be called again to rebuild list to account for new devices (will do the right thing in case of disposing existing list)\nextern Boolean HIDBuildDeviceList (UInt32 usagePage, UInt32 usage);\n\n// release list built by above function\n// MUST be called prior to application exit to properly release devices\n// if not called (or app crashes) devices can be recovered by pluging into different location in USB chain\nextern void HIDReleaseDeviceList (void);\n\n// does a device list exist\nextern Boolean HIDHaveDeviceList (void);\n\n// how many HID devices have been found\n// returns 0 if no device list exist\nextern UInt32 HIDCountDevices (void);\n\n// how many elements does a specific device have\n// returns 0 if device is invalid or NULL\n// uses mask of HIDElementTypeMask to restrict element found\n// use kHIDElementTypeIO to get non-collection elements\nextern UInt32 HIDCountDeviceElements (pRecDevice pDevice, HIDElementTypeMask typeMask);\n\n// get the first device in the device list\n// returns NULL if no list exists\nextern pRecDevice HIDGetFirstDevice (void);\n\n// get next device in list given current device as parameter\n// returns NULL if end of list\nextern pRecDevice HIDGetNextDevice (pRecDevice pDevice);\n\n// get the first element of device passed in as parameter\n// returns NULL if no list exists or device does not exists or is NULL\n// uses mask of HIDElementTypeMask to restrict element found\n// use kHIDElementTypeIO to get previous HIDGetFirstDeviceElement functionality\nextern pRecElement HIDGetFirstDeviceElement (pRecDevice pDevice, HIDElementTypeMask typeMask);\n\n// get next element of given device in list given current element as parameter\n// will walk down each collection then to next element or collection (depthwise traverse)\n// returns NULL if end of list\n// uses mask of HIDElementTypeMask to restrict element found\n// use kHIDElementTypeIO to get previous HIDGetNextDeviceElement functionality\nextern pRecElement HIDGetNextDeviceElement (pRecElement pElement, HIDElementTypeMask typeMask);\n\n// get previous element of given device in list given current element as parameter\n// this wlaks directly up the tree to the top element and does not search at each level\n// returns NULL if beginning of list\n// uses mask of HIDElementTypeMask to restrict element found\n// use kHIDElementTypeIO to get non-collection elements\nextern pRecElement HIDGetPreviousDeviceElement (pRecElement pElement, HIDElementTypeMask typeMask);\n\n// returns C string type name given a type enumeration passed in as parameter (see IOHIDKeys.h)\n// returns empty string for invlid types\nextern void HIDGetTypeName (IOHIDElementType type, char * cstrName);\n\n// returns C string usage given usage page and usage passed in as parameters (see IOUSBHIDParser.h)\n// returns usage page and usage values in string form for unknown values\nextern void HIDGetUsageName (long valueUsagePage, long valueUsage, char * cstrName);\n\n// returns calibrated value given raw value passed in\n// calibrated value is equal to min and max values returned by HIDGetElementValue since device list built scaled to element reported min and max values\nextern SInt32 HIDCalibrateValue (SInt32 value, pRecElement pElement);\n\n// returns scaled value given raw value passed in\n// scaled value is equal to current value assumed to be in the range of element reported min and max values scaled to user min and max scaled values\nextern SInt32 HIDScaleValue (SInt32 value, pRecElement pElement);\n\n// ---------------------------------\n// convert an element type to a mask\nextern HIDElementTypeMask HIDConvertElementTypeToMask (const long type);\n\n// find this device\nextern Boolean HIDFindDevice(const pRecDevice pSearchDevice, pRecDevice *ppFoundDevice);\n\n// find the device and element for this action\n// Device: serial, vendorID, productID, location, usagePage, usage\n// Element: cookie, usagePage, usage, \nextern Boolean HIDFindActionDeviceAndElement(const pRecDevice pSearchDevice, const pRecElement pSearchElement,\n\t\t\t\t\t\t\t\t\t\t  pRecDevice *ppFoundDevice, pRecElement *ppFoundElement);\n\n// find the device and element for this action\n// Device: serial, vendorID, productID, location, usagePage, usage\n// Element: cookie, usagePage, usage, \n\nextern Boolean HIDFindSubElement(const pRecElement pStartElement, const pRecElement pSearchElement, pRecElement *ppFoundElement);\n\n// print out all of an elements information\nextern int HIDPrintElement(const pRecElement pElement);\n\n// return true if this is a valid device pointer\nextern Boolean HIDIsValidDevice(const pRecDevice pSearchDevice);\n\n// return true if this is a valid element pointer for this device\nextern Boolean HIDIsValidElement(const pRecDevice pSearchDevice, const pRecElement pSearchElement);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif // _HID_Utilities_h_\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/JoystickTabletPlugin/HID_Utilities_External.h",
    "content": "/*\n\tFile:\t\tHID_Utilities_External.h\n\n\tContains:   Definition of the HID Utilities exported functions\n    \n\tDRI: George Warner\n\n\tCopyright:\tCopyright  2002 Apple Computer, Inc., All Rights Reserved\n\n\tDisclaimer:\tIMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc.\n\t\t\t\t(\"Apple\") in consideration of your agreement to the following terms, and your\n\t\t\t\tuse, installation, modification or redistribution of this Apple software\n\t\t\t\tconstitutes acceptance of these terms.  If you do not agree with these terms,\n\t\t\t\tplease do not use, install, modify or redistribute this Apple software.\n\n\t\t\t\tIn consideration of your agreement to abide by the following terms, and subject\n\t\t\t\tto these terms, Apple grants you a personal, non-exclusive license, under Apples\n\t\t\t\tcopyrights in this original Apple software (the \"Apple Software\"), to use,\n\t\t\t\treproduce, modify and redistribute the Apple Software, with or without\n\t\t\t\tmodifications, in source and/or binary forms; provided that if you redistribute\n\t\t\t\tthe Apple Software in its entirety and without modifications, you must retain\n\t\t\t\tthis notice and the following text and disclaimers in all such redistributions of\n\t\t\t\tthe Apple Software.  Neither the name, trademarks, service marks or logos of\n\t\t\t\tApple Computer, Inc. may be used to endorse or promote products derived from the\n\t\t\t\tApple Software without specific prior written permission from Apple.  Except as\n\t\t\t\texpressly stated in this notice, no other rights or licenses, express or implied,\n\t\t\t\tare granted by Apple herein, including but not limited to any patent rights that\n\t\t\t\tmay be infringed by your derivative works or by other works in which the Apple\n\t\t\t\tSoftware may be incorporated.\n\n\t\t\t\tThe Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE MAKES NO\n\t\t\t\tWARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED\n\t\t\t\tWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n\t\t\t\tPURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN\n\t\t\t\tCOMBINATION WITH YOUR PRODUCTS.\n\n\t\t\t\tIN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR\n\t\t\t\tCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n\t\t\t\tGOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n\t\t\t\tARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION\n\t\t\t\tOF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT\n\t\t\t\t(INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN\n\t\t\t\tADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n#ifndef _HID_Utilities_External_h_\n#define _HID_Utilities_External_h_\n\n// ==================================\n//includes\n\n#if TARGET_RT_MAC_CFM\n\ttypedef void (*IOHIDCallbackFunction)(void * target, unsigned long result, void* refcon, void * sender);\n#else\n\t#include <IOKit/hid/IOHIDLib.h>\n#endif TARGET_RT_MAC_CFM\n\n#include <stdio.h>\n\n#if 0\n#include <IOKit/hid/IOHIDUsageTables.h>\n\n#include \"PID.h\"\t\t\t\t// NOTE: These are now in <IOHIDUsageTables.h>\n#include \"IOHIDPowerUsage.h\"\t// NOTE: These are now in <IOHIDUsageTables.h>\n#endif\n\n// ==================================\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n// ==================================\n// Device and Element Interfaces\n\ntypedef enum HIDElementTypeMask\n{\n\tkHIDElementTypeInput\t\t\t\t= 1 << 1,\n\tkHIDElementTypeOutput            \t= 1 << 2,\n\tkHIDElementTypeFeature           \t= 1 << 3,\n\tkHIDElementTypeCollection        \t= 1 << 4,\n\tkHIDElementTypeIO\t\t\t\t\t= kHIDElementTypeInput | kHIDElementTypeOutput | kHIDElementTypeFeature,\n\tkHIDElementTypeAll\t\t\t\t\t= kHIDElementTypeIO | kHIDElementTypeCollection\n}HIDElementTypeMask;\n\nstruct recElement\n{\n    unsigned long type;\t\t\t\t\t\t// the type defined by IOHIDElementType in IOHIDKeys.h\n    long usagePage;\t\t\t\t\t\t\t// usage page from IOUSBHIDParser.h which defines general usage\n    long usage;\t\t\t\t\t\t\t\t// usage within above page from IOUSBHIDParser.h which defines specific usage\n    void * cookie;\t\t\t\t \t\t\t// unique value (within device of specific vendorID and productID) which identifies element, will NOT change\n    long min;\t\t\t\t\t\t\t\t// reported min value possible\n    long max;\t\t\t\t\t\t\t\t// reported max value possible\n    long scaledMin;\t\t\t\t\t\t\t// reported scaled min value possible\n    long scaledMax;\t\t\t\t\t\t\t// reported scaled max value possible\n    long size;\t\t\t\t\t\t\t\t// size in bits of data return from element\n    unsigned char relative;\t\t\t\t\t// are reports relative to last report (deltas)\n    unsigned char wrapping;\t\t\t\t\t// does element wrap around (one value higher than max is min)\n    unsigned char nonLinear;\t\t\t\t// are the values reported non-linear relative to element movement\n    unsigned char preferredState;\t\t\t// does element have a preferred state (such as a button)\n    unsigned char nullState;\t\t\t\t// does element have null state\n    long units;\t\t\t\t\t\t\t\t// units value is reported in (not used very often)\n    long unitExp;\t\t\t\t\t\t\t// exponent for units (also not used very often)\n    char name[256];\t\t\t\t\t\t\t// name of element (c string)\n\n// runtime variables\n    long calMin; \t\t\t\t\t\t\t// min returned value\n    long calMax; \t\t\t\t\t\t\t// max returned value (calibrate call)\n    long userMin; \t\t\t\t\t\t\t// user set value to scale to (scale call)\n    long userMax;\t\t\t\t\t\t\t\n    \n\tstruct recElement * pPrevious;\t\t\t// previous element (NULL at list head)\n    struct recElement * pChild;\t\t\t\t// next child (only of collections)\n    struct recElement * pSibling;\t\t\t// next sibling (for elements and collections)\n\n\tlong depth;\n};\ntypedef struct recElement recElement;\ntypedef recElement* pRecElement;\n\nstruct recDevice\n{\n    void * interface;\t\t\t\t\t\t// interface to device, NULL = no interface\n    void * queue;\t\t\t\t\t\t\t// device queue, NULL = no queue\n\tvoid * queueRunLoopSource;\t\t\t\t// device queue run loop source, NULL == no source\n\tvoid * transaction;\t\t\t\t\t\t// output transaction interface, NULL == no interface\n\tvoid * notification;\t\t\t\t\t// notifications\n    char transport[256];\t\t\t\t\t// device transport (c string)\n    long vendorID;\t\t\t\t\t\t\t// id for device vendor, unique across all devices\n    long productID;\t\t\t\t\t\t\t// id for particular product, unique across all of a vendors devices\n    long version;\t\t\t\t\t\t\t// version of product\n    char manufacturer[256];\t\t\t\t\t// name of manufacturer\n    char product[256];\t\t\t\t\t\t// name of product\n    char serial[256];\t\t\t\t\t\t// serial number of specific product, can be assumed unique across specific product or specific vendor (not used often)\n    long locID;\t\t\t\t\t\t\t\t// long representing location in USB (or other I/O) chain which device is pluged into, can identify specific device on machine\n    long usage;\t\t\t\t\t\t\t\t// usage page from IOUSBHID Parser.h which defines general usage\n    long usagePage;\t\t\t\t\t\t\t// usage within above page from IOUSBHID Parser.h which defines specific usage\n    long totalElements;\t\t\t\t\t\t// number of total elements (should be total of all elements on device including collections) (calculated, not reported by device)\n\tlong features;\t\t\t\t\t\t\t// number of elements of type kIOHIDElementTypeFeature\n\tlong inputs;\t\t\t\t\t\t\t// number of elements of type kIOHIDElementTypeInput_Misc or kIOHIDElementTypeInput_Button or kIOHIDElementTypeInput_Axis or kIOHIDElementTypeInput_ScanCodes\n\tlong outputs;\t\t\t\t\t\t\t// number of elements of type kIOHIDElementTypeOutput\n\tlong collections;\t\t\t\t\t\t// number of elements of type kIOHIDElementTypeCollection\n    long axis;\t\t\t\t\t\t\t\t// number of axis (calculated, not reported by device)\n    long buttons;\t\t\t\t\t\t\t// number of buttons (calculated, not reported by device)\n    long hats;\t\t\t\t\t\t\t\t// number of hat switches (calculated, not reported by device)\n    long sliders;\t\t\t\t\t\t\t// number of sliders (calculated, not reported by device)\n    long dials;\t\t\t\t\t\t\t\t// number of dials (calculated, not reported by device)\n    long wheels;\t\t\t\t\t\t\t// number of wheels (calculated, not reported by device)\n    recElement* pListElements; \t\t\t\t// head of linked list of elements \n    struct recDevice* pNext; \t\t\t\t// next device\n};\ntypedef struct recDevice recDevice;\ntypedef recDevice* pRecDevice;\n\n// ==================================\n// HID Utilities interface\n// ==================================\n// Create and open an interface to device, required prior to extracting values or building queues\n// Note: appliction now owns the device and must close and release it prior to exiting\nextern unsigned long HIDCreateOpenDeviceInterface (UInt32 hidDevice, pRecDevice pDevice);\n\n// builds list of device with elements (allocates memory and captures devices)\n// list is allcoated internally within HID Utilites and can be accessed via accessor functions\n// structures within list are considered flat and user accessable, butnot user modifiable\n// can be called again to rebuild list to account for new devices (will do the right thing in case of disposing existing list)\nextern Boolean HIDBuildDeviceList (UInt32 usagePage, UInt32 usage);\n\n// release list built by above function\n// MUST be called prior to application exit to properly release devices\n// if not called (or app crashes) devices can be recovered by pluging into different location in USB chain\nextern void HIDReleaseDeviceList (void);\n\n// does a device list exist\nextern Boolean HIDHaveDeviceList (void);\n\n// how many HID devices have been found\n// returns 0 if no device list exist\nextern UInt32 HIDCountDevices (void);\n\n// how many elements does a specific device have\n// returns 0 if device is invalid or NULL\n// uses mask of HIDElementTypeMask to restrict element found\n// use kHIDElementTypeIO to get non-collection elements\nextern UInt32 HIDCountDeviceElements (pRecDevice pDevice, HIDElementTypeMask typeMask);\n\n// get the first device in the device list\n// returns NULL if no list exists\nextern pRecDevice HIDGetFirstDevice (void);\n\n// get next device in list given current device as parameter\n// returns NULL if end of list\nextern pRecDevice HIDGetNextDevice (pRecDevice pDevice);\n\n// get the first element of device passed in as parameter\n// returns NULL if no list exists or device does not exists or is NULL\n// uses mask of HIDElementTypeMask to restrict element found\n// use kHIDElementTypeIO to get previous HIDGetFirstDeviceElement functionality\nextern pRecElement HIDGetFirstDeviceElement (pRecDevice pDevice, HIDElementTypeMask typeMask);\n\n// get next element of given device in list given current element as parameter\n// will walk down each collection then to next element or collection (depthwise traverse)\n// returns NULL if end of list\n// uses mask of HIDElementTypeMask to restrict element found\n// use kHIDElementTypeIO to get previous HIDGetNextDeviceElement functionality\nextern pRecElement HIDGetNextDeviceElement (pRecElement pElement, HIDElementTypeMask typeMask);\n\n// get previous element of given device in list given current element as parameter\n// this wlaks directly up the tree to the top element and does not search at each level\n// returns NULL if beginning of list\n// uses mask of HIDElementTypeMask to restrict element found\n// use kHIDElementTypeIO to get non-collection elements\nextern pRecElement HIDGetPreviousDeviceElement (pRecElement pElement, HIDElementTypeMask typeMask);\n\n// returns C string type name given a type enumeration passed in as parameter (see IOHIDKeys.h)\n// returns empty string for invlid types\nextern void HIDGetTypeName (IOHIDElementType theType, char * cstrName);\n\n// set name from vendor id/product id look up (using cookies)\nextern Boolean HIDGetElementNameFromVendorProductCookie (const long vendorID, const long productID, const long cookie, char * pName);\n\n// set name from vendor id/product id look up (using usage page & usage)\nextern Boolean HIDGetElementNameFromVendorProductUsage (const long vendorID, const long productID, const long pUsagePage, const long pUsage, char * pName);\n\n// returns C string usage given usage page and usage passed in as parameters (see IOUSBHIDParser.h)\n// returns usage page and usage values in string form for unknown values\nextern void HIDGetUsageName (long valueUsagePage, long valueUsage, char * cstrName);\n\n// returns calibrated value given raw value passed in\n// calibrated value is equal to min and max values returned by HIDGetElementValue since device list built scaled to element reported min and max values\nextern SInt32 HIDCalibrateValue (SInt32 value, pRecElement pElement);\n\n// returns scaled value given raw value passed in\n// scaled value is equal to current value assumed to be in the range of element reported min and max values scaled to user min and max scaled values\nextern SInt32 HIDScaleValue (SInt32 value, pRecElement pElement);\n\n// ---------------------------------\n// convert an element type to a mask\nextern HIDElementTypeMask HIDConvertElementTypeToMask (const long type);\n\n// find this device\nextern Boolean HIDFindDevice(const pRecDevice pSearchDevice, pRecDevice *ppFoundDevice);\n\n// find the device and element for this action\n// Device: serial, vendorID, productID, location, usagePage, usage\n// Element: cookie, usagePage, usage,\nextern Boolean HIDFindActionDeviceAndElement(const pRecDevice pSearchDevice, const pRecElement pSearchElement,\n\t\t\t\t\t\t\t\t\t\t\t pRecDevice *ppFoundDevice, pRecElement *ppFoundElement);\n\n// find the device and element for this action\n// Device: serial, vendorID, productID, location, usagePage, usage\n// Element: cookie, usagePage, usage,\n\nextern Boolean HIDFindSubElement(const pRecElement pStartElement, const pRecElement pSearchElement, pRecElement *ppFoundElement);\n\n// print out all of an elements information\nextern int HIDPrintElement(const pRecElement pElement);\n\n// return true if this is a valid device pointer\nextern Boolean HIDIsValidDevice(const pRecDevice pSearchDevice);\n\n// return true if this is a valid element pointer for this device\nextern Boolean HIDIsValidElement(const pRecDevice pSearchDevice, const pRecElement pSearchElement);\n\n// ==================================\n// Element Event Queue and Value Interfaces\n\nenum\n{\n    kDefaultUserMin = 0,\t\t\t\t\t// default user min and max used for scaling\n    kDefaultUserMax = 255\n};\n\nenum\n{\n    kDeviceQueueSize = 50\t// this is wired kernel memory so should be set to as small as possible\n\t\t\t\t\t\t\t// but should account for the maximum possible events in the queue\n\t\t\t\t\t\t\t// USB updates will likely occur at 100 Hz so one must account for this rate of\n\t\t\t\t\t\t\t// if states change quickly (updates are only posted on state changes)\n};\n\n// ==================================\n// queues specific element, performing any device queue set up required\nextern unsigned long  HIDQueueElement (pRecDevice pDevice, pRecElement pElement);\n\n// adds all elements to queue, performing any device queue set up required\nextern unsigned long HIDQueueDevice (pRecDevice pDevice);\n\n// removes element for queue, if last element in queue will release queue and device\nextern unsigned long HIDDequeueElement (pRecDevice pDevice, pRecElement pElement);\n\n// completely removes all elements from queue and releases queue and device\nextern unsigned long HIDDequeueDevice (pRecDevice pDevice);\n\n// releases all device queues for quit or rebuild (must be called)\nextern unsigned long HIDReleaseAllDeviceQueues (void);\n\n// releases interface to device, should be done prior to exiting application (called from HIDReleaseDeviceList)\nextern unsigned long HIDCloseReleaseInterface (pRecDevice pDevice);\n\n// returns true if an event is avialable for the element and fills out *pHIDEvent structure, returns false otherwise\n// pHIDEvent is a poiner to a IOHIDEventStruct, using void here for compatibility, users can cast a required\nextern unsigned char HIDGetEvent (pRecDevice pDevice, void * pHIDEvent);\n\n// returns current value for element, creating device interface as required, polling element\nextern long HIDGetElementValue (pRecDevice pDevice, pRecElement pElement);\n\n// Set an elements value\n// NOTE: This should only be used when a single element report needs to be sent.\n// If multiple elements reports are to be send then transactions should be used.\n// pIOHIDEvent is a poiner to a IOHIDEventStruct, using void here for compatibility, users can cast a required\nextern long HIDSetElementValue (pRecDevice pDevice, pRecElement pElement,void* pIOHIDEvent);\n\n// Set a callback to be called when a queue goes from empty to non-empty\nextern long HIDSetQueueCallback (pRecDevice pDevice, IOHIDCallbackFunction callback);\n\n#if 0\n// Get a report from a device\nextern long HIDGetReport (pRecDevice pDevice,const IOHIDReportType reportType, const unsigned long reportID, void* reportBuffer, unsigned long* reportBufferSize);\n\n// Send a report to a device\nextern long HIDSetReport (pRecDevice pDevice,const IOHIDReportType reportType, const unsigned long reportID, void* reportBuffer, const unsigned long reportBufferSize);\n#endif\n\n// ==================================\n// HUD utilities interfaces\n\n// returns calibrated value given raw value passed in\n// calibrated value is equal to min and max values returned by HIDGetElementValue since device list built scaled to element reported min and max values\nextern long HIDCalibrateValue (long value, pRecElement pElement);\n\n// returns scaled value given raw value passed in\n// scaled value is equal to current value assumed to be in the range of element reported min and max values scaled to user min and max scaled values\nextern long HIDScaleValue (long value, pRecElement pElement);\n\n// convert an element type to a mask\nextern HIDElementTypeMask HIDConvertElementTypeToMask (const long type);\n\n// find this device\nextern Boolean HIDFindDevice(const pRecDevice pSearchDevice, pRecDevice *ppFoundDevice);\n\n// find the device and element for this action\n// Device: serial, vendorID, productID, location, usagePage, usage\n// Element: cookie, usagePage, usage, \nextern Boolean HIDFindActionDeviceAndElement(const pRecDevice pSearchDevice, const pRecElement pSearchElement,\n\t\t\t\t\t\t\t\t\t\t  pRecDevice *ppFoundDevice, pRecElement *ppFoundElement);\n// find the device and element for this action\n// Device: serial, vendorID, productID, location, usagePage, usage\n// Element: cookie, usagePage, usage, \n\nextern Boolean HIDFindSubElement(const pRecElement pStartElement, const pRecElement pSearchElement, pRecElement *ppFoundElement);\n\n// print out all of an elements information\nextern int HIDPrintElement(const pRecElement pElement);\n\n// return true if this is a valid device pointer\nextern Boolean HIDIsValidDevice(const pRecDevice pSearchDevice);\n\n// return true if this is a valid element pointer for this device\nextern Boolean HIDIsValidElement(const pRecDevice pSearchDevice, const pRecElement pSearchElement);\n\n// ==================================\n// Name Lookup Interfaces\n\n// set name from vendor id/product id look up (using cookies)\nextern Boolean HIDGetElementNameFromVendorProductCookie (const long vendorID, const long productID, const long cookie, char * pName);\n\n// set name from vendor id/product id look up (using usage page & usage)\nextern Boolean HIDGetElementNameFromVendorProductUsage (const long vendorID, const long productID, const long pUsagePage, const long pUsage, char * pName);\n\n// ==================================\n// Conguration and Save Interfaces\n\nenum\n{\n    kPercentMove = 10 // precent of overall range a element must move to register\n};\n\ntypedef struct recSaveHID\n{\n    long actionCookie;\n    // device\n\t\t// need to add serial number when I have a test case\n    long vendorID;\n    long productID;\n    long locID;\n    long usage;\n    long usagePage;\n    // elements\n    long usagePageE;\n    long usageE;\n    void * cookie;\n}recSaveHID,*pRecSaveHID;\n\n// polls all devices and elements for a change greater than kPercentMove.  Times out after given time\n// returns true and pointer to device and element if found\n// returns false and NULL for both parameters if not found\nextern unsigned char HIDConfigureAction (pRecDevice * ppDevice, pRecElement * ppElement, float timeout);\n\n// take input records, save required info\n// assume file is open and at correct position.\nextern void HIDSaveElementConfig (FILE * fileRef, pRecDevice pDevice, pRecElement pElement, long actionCookie);\n\n// take file, read one record (assume file position is correct and file is open)\n// search for matching device\n// return pDevice, pElement and cookie for action\nextern long HIDRestoreElementConfig (FILE * fileRef, pRecDevice * ppDevice, pRecElement * ppElement);\n\n// Save the device & element values into the specified key in the specified applications preferences\nextern Boolean HIDSaveElementPref (CFStringRef keyCFStringRef, CFStringRef appCFStringRef, pRecDevice pDevice, pRecElement pElement);\n\n// Find the specified preference in the specified application\n// search for matching device and element\n// return pDevice, pElement that matches\n\nextern Boolean HIDRestoreElementPref (CFStringRef keyCFStringRef, CFStringRef appCFStringRef, pRecDevice * ppDevice, pRecElement * ppElement);\n\n// ==================================\n// Output Transaction interface\n\n// Create and open an transaction interface to device, required prior to extracting values or building Transactions\nextern unsigned long HIDTransactionAddElement(pRecDevice pDevice, pRecElement pElement);\n\n// removes an element from a Transaction\nextern unsigned long HIDTransactionRemoveElement(pRecDevice pDevice, pRecElement pElement);\n\n// return true if this transaction contains this element\nextern Boolean HIDTransactionHasElement(pRecDevice pDevice, pRecElement pElement);\n\n/* This changes the default value of an element, when the values of the */\n/* elements are cleared, on clear or commit, they are reset to the */\n/* default value */\n/* This call can be made on elements that are not in the transaction, but */\n/* has undefined behavior if made on elements not in the transaction */\n/* which are later added to the transaction. */\n/* In other words, an element should be added before its default is */\n/* set, for well defined behavior. */\n// pHIDEvent is a poiner to a IOHIDEventStruct, using void here for compatibility, users can cast a required\nextern unsigned long HIDTransactionSetElementDefault(pRecDevice pDevice, pRecElement pElement,IOHIDEventStruct* pValueEvent);\n\n/* Get the current setting of an element's default value */\n// pHIDEvent is a poiner to a IOHIDEventStruct, using void here for compatibility, users can cast a required\nextern unsigned long HIDTransactionGetElementDefault(pRecDevice pDevice, pRecElement pElement,IOHIDEventStruct* pValueEvent);\n\n/* Add a change to the transaction, by setting an element value */\n/* The change is not actually made until it is commited */\n/* The element must be part of the transaction or this call will fail */\n// pHIDEvent is a poiner to a IOHIDEventStruct, using void here for compatibility, users can cast a required\nextern unsigned long HIDTransactionSetElementValue(pRecDevice pDevice, pRecElement pElement,IOHIDEventStruct* pValueEvent);\n\n/* Get the current setting of an element value */\n// pHIDEvent is a poiner to a IOHIDEventStruct, using void here for compatibility, users can cast a required\nextern unsigned long HIDTransactionGetElementValue(pRecDevice pDevice, pRecElement pElement,IOHIDEventStruct* pValueEvent);\n\n/* Commit the transaction, or clear all the changes and start over */\n/* timoutMS is the timeout in milliseconds, a zero timeout will cause */\n/*\tthis call to be non-blocking (returning queue empty) if there */\n/*\tis a NULL callback, and blocking forever until the queue is */\n/*\tnon-empty if their is a valid callback */\n/* callback, if non-NULL is a callback to be called when data is */\n/*  inserted to the queue  */\n/* callbackTarget and callbackRefcon are passed to the callback */\nextern unsigned long HIDTransactionCommit(pRecDevice pDevice);\n\n/* Clear all the changes and start over */\nextern unsigned long HIDTransactionClear(pRecDevice pDevice);\n\n// ==================================\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif // _HID_Utilities_External_h_\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/JoystickTabletPlugin/HID_Utilities_Internal.h",
    "content": "/*\n\tFile:\t\tHID_Utilities_Internal.h\n\n\tContains:   Definition of HID Utilities internal functions\n    \n\tDRI: George Warner\n\n\tCopyright:\tCopyright  2002 Apple Computer, Inc., All Rights Reserved\n\n\tDisclaimer:\tIMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc.\n\t\t\t\t(\"Apple\") in consideration of your agreement to the following terms, and your\n\t\t\t\tuse, installation, modification or redistribution of this Apple software\n\t\t\t\tconstitutes acceptance of these terms.  If you do not agree with these terms,\n\t\t\t\tplease do not use, install, modify or redistribute this Apple software.\n\n\t\t\t\tIn consideration of your agreement to abide by the following terms, and subject\n\t\t\t\tto these terms, Apple grants you a personal, non-exclusive license, under Apples\n\t\t\t\tcopyrights in this original Apple software (the \"Apple Software\"), to use,\n\t\t\t\treproduce, modify and redistribute the Apple Software, with or without\n\t\t\t\tmodifications, in source and/or binary forms; provided that if you redistribute\n\t\t\t\tthe Apple Software in its entirety and without modifications, you must retain\n\t\t\t\tthis notice and the following text and disclaimers in all such redistributions of\n\t\t\t\tthe Apple Software.  Neither the name, trademarks, service marks or logos of\n\t\t\t\tApple Computer, Inc. may be used to endorse or promote products derived from the\n\t\t\t\tApple Software without specific prior written permission from Apple.  Except as\n\t\t\t\texpressly stated in this notice, no other rights or licenses, express or implied,\n\t\t\t\tare granted by Apple herein, including but not limited to any patent rights that\n\t\t\t\tmay be infringed by your derivative works or by other works in which the Apple\n\t\t\t\tSoftware may be incorporated.\n\n\t\t\t\tThe Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE MAKES NO\n\t\t\t\tWARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED\n\t\t\t\tWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n\t\t\t\tPURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN\n\t\t\t\tCOMBINATION WITH YOUR PRODUCTS.\n\n\t\t\t\tIN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR\n\t\t\t\tCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n\t\t\t\tGOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n\t\t\t\tARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION\n\t\t\t\tOF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT\n\t\t\t\t(INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN\n\t\t\t\tADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n#ifndef _HID_Utilities_Internal_h_\n#define _HID_Utilities_Internal_h_\n\n// Moved into specific \"HID_xxx.h\" files.\n\n#include \"HID_Error_Handler.h\"\n\n#endif // _HID_Utilities_Internal_h_\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/JoystickTabletPlugin/sqMacJoystickAndTablet.c",
    "content": "/* Adjustments for pluginized VM\n *\n * Note: The Mac support files have not yet been fully converted to\n * pluginization. For the time being, it is assumed that they are linked\n * with the VM. When conversion is complete, they will no longer import\n * \"sq.h\" and they will access all VM functions and variables through\n * the interpreterProxy mechanism.\n */\n\n#include \"sq.h\"\n#include \"JoystickTabletPlugin.h\"\n\n/* End of adjustments for pluginized VM */\n\n\n#pragma mark Joystick support for Mac OS X\n\n#include \"HID_Utilities.h\"\nlong HIDGetElementValue (pRecDevice pDevice, pRecElement pElement);\n\nint joystickInit(void)\n{\n    HIDBuildDeviceList(kHIDPage_GenericDesktop, 0);\n\treturn true;\n}\n \nint joystickShutdown()\n{\n    HIDReleaseDeviceList();\n    return true;\n}\n\nstatic pRecDevice getJoystickDevice(int stickIndex)\n{\n\tpRecDevice device = HIDGetFirstDevice();\n\tint stickCount = 0;\n\twhile (device)\n\t{\n\t\tif ( (device->usage == kHIDUsage_GD_Joystick) || (device->usage == kHIDUsage_GD_GamePad) )\n\t\t{\n\t\t\tstickCount++;\n\t\t\tif (stickCount == stickIndex)\n\t\t\t\treturn device;\n\t\t}\n\t\tdevice = HIDGetNextDevice(device);\n\t}\n\treturn NULL;\n}\n\n\nstatic int getScaledAxisValue(pRecDevice device, pRecElement element, int userMin, int userMax)\n{\n\tSInt32 raw = HIDGetElementValue(device, element);\n\telement -> userMin = userMin;\n\telement -> userMax = userMax;\n\treturn (int) HIDScaleValue(raw, element);\n}\n\nint joystickRead(int stickIndex)\n{\n   /* Return input word for the joystick with the given index (starting at 1).\n\tThis word is encoded as follows:\n\n    <onFlag (1 bit)><buttonFlags (5 bits)><x-value (11 bits)><y-value (11 bits)>\n\n    The highest four bits of the input word are zero. If the onFlag bit is zero,\n    there is no joystick at the given index. The x and y values are\n    11-bit signed values in the range [-1024..1023] representing the raw (unencoded)\n    joystick position.\n    */\n\n\tint onFlag = 0;\n\tint buttons = 0;\n\tint xValue = 0;\n\tint yValue = 0;\n\t\n\tpRecDevice device = getJoystickDevice(stickIndex);\t\n\tif (device)\n\t{\n\t\tonFlag = 1;\n\t\n\t\tpRecElement element = HIDGetFirstDeviceElement(device, kHIDElementTypeAll);\n\t\twhile (element)\n\t\t{\n\t\t\tswitch (element->usagePage)\n\t\t\t{\n\t\t\t\tcase kHIDPage_GenericDesktop:\n\t\t\t\t\tswitch (element->usage)\n\t\t\t\t\t{\n\t\t\t\t\t\tcase kHIDUsage_GD_X:\n\t\t\t\t\t\t\txValue = getScaledAxisValue(device, element, -1024, 1023);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase kHIDUsage_GD_Y:\n\t\t\t\t\t\t\tyValue = getScaledAxisValue(device, element, -1024, 1023);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase kHIDPage_Button:\n\t\t\t\t\t{\n\t\t\t\t\t\tint button = element->usage - kHIDUsage_Button_1;\n\t\t\t\t\t\tif ((button >= 0) && (button <= 4) ) \n\t\t\t\t\t\t\tbuttons |= (HIDGetElementValue(device, element) << button);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\telement = HIDGetNextDeviceElement(element, kHIDElementTypeAll);\t\n\t\t}\n\t}\n\treturn (onFlag << 27) | (buttons << 22) | ((yValue + 1024) << 11) | (xValue + 1024);\n}\n\n\n#pragma mark Tablet support for older versions of Mac OS\n\n/* Tablet Record (see  Apple Tech. Note 266, version 2) */\n\n#define MAX_TRANSDUCERS 4\n\ntypedef struct {\n    char\tDOFTrans;\t\t\t/* degrees of freedom and transducer type */\n    char\torientFlag;\t\t\t/* type of orientation information */\n    short\tpressLevels;\t\t/* pressure support and number of levels */\n    unsigned short xScale;\t\t/* x scale factor for screen mapping */\n    short\txTrans;\t\t\t\t/* x translation factor for screen */\n    unsigned short yScale;\t\t/* y scale factor for screen mapping */\n    short\tyTrans;\t\t\t\t/* y translation factor for screen */\n    unsigned char flags;\t\t/* proximity, update flag, and # buttons */\n    unsigned char pressThresh;\t/* pressure threshold - normally unused */\n    short\tbuttonMask;\t\t\t/* button mask of driver-reserved buttons */\n    short\terrorFlag;\t\t\t/* error code generated */\n    short\tbuttons;\t\t\t/* buttons pressed */\n    short\ttangPress;\t\t\t/* tangential pressure level */\n    short\tpressure;\t\t\t/* normal pressure level */\n    long\ttimeStamp;\t\t\t/* ticks at latest update */\n    long\txCoord;\t\t\t\t/* x coordinate in resolution units */\n    long\tyCoord;\t\t\t\t/* y coordinate in resolution units */\n    long\tzCoord;\t\t\t\t/* z coordinate in resolution units */\n    short\txTilt;\t\t\t\t/* x tilt */\n    short\tyTilt;\t\t\t\t/* y tilt */\n    short\tunused[8];\t\t\t/* remainder of unused attitude matrix */\n} TransducerRec, *TransducerRecPtr;\n\ntypedef struct {\n    char\tversion;\t\t\t/* version of this data format */\n    char\tsemaphore;\t\t\t/* for future use -- tells if drvr is enabled */\n    char\tcursors;\t\t\t/* number of cursors with tablet */\n    char\tupdateFlags;\t\t/* flags used when updating structure */\n    short\tangleRes;\t\t\t/* metric bit & angular resolution */\n    short\tspaceRes;\t\t\t/* spatial resolution of the tablet */\n    long\txDimension;\t\t\t/* x dimension in resolution units */\n    long\tyDimension;\t\t\t/* y dimension in resolution units */\n    long\tzDimension;\t\t\t/* z dimension in resolution units */\n    long\txDisplace;\t\t\t/* x displacement - minimum x value */\n    long\tyDisplace;\t\t\t/* y displacement - minimum y value */\n    long\tzDisplace;\t\t\t/* z displacement - minimum z value */\n    long\treserved;\t\t\t/* reserved */\n    long\ttabletID;\t\t\t/* contains 'TBLT' identifying the device */\n\tTransducerRec transducer[MAX_TRANSDUCERS];\n} TabletRec, *TabletRecPtr;\n\n/*** Variables ***/\n\nTabletRecPtr tablet = nil;  \t\t/* pointer to a tablet record or nil */\n\nint tabletInit(void);\nint tabletInit(void) {\n\t/* Open the tablet driver and initialize the global pointer to its status\n\t   record. Return true if a tablet exists, false otherwise. */\n\n    return false;\n}\n\nint tabletGetParameters(int cursorIndex, int result[]) {\n\t/* Fill in the integer array 'result' with tablet parameter information.\n\t   For cursor-specific parameters, such as the number of pressure levels,\n\t   return the information for the cursor with the given index, an integer\n\t   between 1 and tablet->cursors. */\n\n\tTransducerRecPtr cursorPtr;\n\tint cursor;\n\n\t/* open tablet if necessary; return false if no tablet */\n\tif (tablet == nil) {\n\t\tif (!tabletInit()) return false;\n\t}\n\n\tcursor = cursorIndex - 1;\n\tif ((cursor < 0)  || (cursor >= tablet->cursors)) {\n\t\treturn false;\n\t}\n\tcursorPtr = &tablet->transducer[cursor];\n\n\tresult[0] = tablet->xDimension;\n\tresult[1] = tablet->yDimension;\n\tresult[2] = tablet->spaceRes;\n\tresult[3] = tablet->cursors;  /* number of cursors */\n\n\tresult[4] = cursor + 1;\n\tresult[5] = cursorPtr->xScale;\n\tresult[6] = cursorPtr->xTrans;\n\tresult[7] = cursorPtr->yScale;\n\tresult[8] = cursorPtr->yTrans;\n\tresult[9] = cursorPtr->pressLevels;\n\tresult[10] = cursorPtr->pressThresh;\n\n\tif (tablet->angleRes == 0) {\n\t\tresult[11] = 0;  /* no pen tilt support */\n\t} else {\n\t\tresult[11] = tablet->angleRes >> 1;  /* number of pen tilt levels */\n\t}\n\n\treturn true;\n}\n\nint tabletRead(int cursorIndex, int result[]) {\n\t/* Fill in the integer array 'result' with the current data\n\t   the cursor with the given index, an integer between 1 and\n\t   tablet->cursors. Note that the timestamp changes only\n\t   when some new data has arrived from the tablet. */\n\n\tTransducerRecPtr cursorPtr;\n\tint cursor;\n\n\t/* open tablet if necessary; return false if no tablet */\n\tif (tablet == nil) {\n\t\tif (!tabletInit()) return false;\n\t}\n\n\tcursor = cursorIndex - 1;\n\tif ((cursor < 0)  || (cursor >= tablet->cursors)) {\n\t\treturn false;\n\t}\n\tcursorPtr = &tablet->transducer[cursor];\n\n\tresult[0] = cursor + 1;\n\tresult[1] = cursorPtr->timeStamp;\n\tresult[2] = cursorPtr->xCoord;\n\tresult[3] = cursorPtr->yCoord;\n\tresult[4] = cursorPtr->zCoord;\n\tresult[5] = cursorPtr->xTilt;\n\tresult[6] = cursorPtr->yTilt;\n\tresult[7] = (cursorPtr->DOFTrans & 0x30) >> 4;  /* cursor type; 1-pen, 2-puck, 3-eraser */\n\tresult[8] = cursorPtr->buttons;\n\tresult[9] = cursorPtr->pressure;\n\tresult[10] = cursorPtr->tangPress;\n\tresult[11] = cursorPtr->flags;\n\treturn true;\n}\n\nint tabletResultSize(void) {\n\t/* Return the size of the integer array required to hold the results of\n\t   either a tabletGetParameters() or tabletRead() call. The VM allocates\n\t   an array of this length and passes it as a parameter to be filled in. */\n\n\treturn 12;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/KedamaPlugin/English.lproj/InfoPlist.strings",
    "content": "/* Localized versions of Info.plist keys */\n\nCFBundleName = \"KedamaPlugin\";\nCFBundleShortVersionString = \"KedamaPlugin version 1.1.0\";\nCFBundleGetInfoString = \"KedamaPlugin version 1.1.0\";\nNSHumanReadableCopyright = \"http://www.squeak.org\";\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/KedamaPlugin/Info-KedamaPlugin__Upgraded_.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>KedamaPlugin</string>\n\t<key>CFBundleGetInfoString</key>\n\t<string>KedamaPlugin V1.1.0 for Squeak, see http://www.squeak.org</string>\n\t<key>CFBundleIconFile</key>\n\t<string>SqueakPlugin.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.KedamaPlugin</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>KedamaPlugin V1.1.0 for Squeak</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.1.0</string>\n\t<key>CFBundleSignature</key>\n\t<string>FAST</string>\n\t<key>CFBundleVersion</key>\n\t<string>1.1.0</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/KedamaPlugin/KedamaPlugin.st",
    "content": "'From Squeakland 3.8-05 of 7 September 2005 [latest update: #494] on 8 May 2007 at 9:50:13 am'!\rInterpreterPlugin subclass: #KedamaPlugin\r\tinstanceVariableNames: 'kedamaRandomSeed randA randM randQ randR'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'EToys-StarSqueak'!\r!KedamaPlugin commentStamp: '<historical>' prior: 0!\rKedamaPlugin is intended to be a subclass of InterpreterPlugin, which resides in the VMMaker package and hence is not in the base Vancouver image.  Thus, most methods in KedamaPlugIn won't properly, owing to their reliance on the presence of an instance variable named interpreterProxy which is expected to be inherited from SqueakPlugIn.\r\rThe code is included here anyway, just to keep all the Kedama code together, but for the KedamaPlugin code to be usable, one would first need to install the VMMaker package and then redeclare KedamaPlugIn to be a subclass of InterpreterPlugin.!\r\r\r!KedamaPlugin methodsFor: 'array arithmetic' stamp: 'yo 1/10/2005 21:26'!\rprimitiveAddArrays\r\r\t| length resultOop argOop rcvrOop isArgWords isRcvrWords wordsRcvr wordsArg wordsResult floatsArg floatsResult floatsRcvr |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #wordsRcvr declareC: 'unsigned int *wordsRcvr'.\r\tself var: #wordsArg declareC: 'unsigned int *wordsArg'.\r\tself var: #wordsResult declareC: 'unsigned int *wordsResult'.\r\tself var: #floatsRcvr declareC: 'float *floatsRcvr'.\r\tself var: #floatsArg declareC: 'float *floatsArg'.\r\tself var: #floatsResult declareC: 'float *floatsResult'.\r\r\tresultOop _ interpreterProxy stackObjectValue: 0.\r\targOop _ interpreterProxy stackObjectValue: 1.\r\trcvrOop _ interpreterProxy stackObjectValue: 2.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isWords: argOop).\r\tinterpreterProxy success: (interpreterProxy isWords: rcvrOop).\r\tinterpreterProxy success: (interpreterProxy isWords: resultOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ interpreterProxy stSizeOf: argOop.\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: rcvrOop)).\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: resultOop)).\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tisArgWords _ interpreterProxy is: argOop MemberOf: 'WordArray'.\r\tisRcvrWords _ interpreterProxy is: rcvrOop MemberOf: 'WordArray'.\r\r\tisArgWords & isRcvrWords ifTrue: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'WordArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t] ifFalse: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'KedamaFloatArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t].\r\r\tisRcvrWords ifTrue: [\r\t\tisArgWords ifTrue: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\twordsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\twordsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\twordsResult at: i put: (wordsRcvr at: i) + (wordsArg at: i).\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (wordsRcvr at: i) + (floatsArg at: i).\r\t\t\t].\r\t\t].\r\t] ifFalse: [\r\t\tisArgWords ifTrue: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\twordsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (floatsRcvr at: i) + (wordsArg at: i).\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (floatsRcvr at: i) + (floatsArg at: i).\r\t\t\t].\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 4.\r\tinterpreterProxy push: resultOop.\r! !\r\r!KedamaPlugin methodsFor: 'array arithmetic' stamp: 'yo 1/10/2005 21:26'!\rprimitiveAddScalar\r\r\t| length resultOop argOop rcvrOop isRcvrWords wordsRcvr wordsResult floatsResult floatsRcvr isArgInt intArg floatArg |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #wordsRcvr declareC: 'unsigned int *wordsRcvr'.\r\tself var: #intArg declareC: 'int intArg'.\r\tself var: #wordsResult declareC: 'unsigned int *wordsResult'.\r\tself var: #floatsRcvr declareC: 'float *floatsRcvr'.\r\tself var: #floatArg declareC: 'double floatArg'.\r\tself var: #floatsResult declareC: 'float *floatsResult'.\r\r\tresultOop _ interpreterProxy stackObjectValue: 0.\r\targOop _ interpreterProxy stackValue: 1.\r\trcvrOop _ interpreterProxy stackObjectValue: 2.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isWords: rcvrOop).\r\tinterpreterProxy success: (interpreterProxy isWords: resultOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ interpreterProxy stSizeOf: rcvrOop.\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: resultOop)).\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tisArgInt _ interpreterProxy isIntegerObject: argOop.\r\tisRcvrWords _ interpreterProxy is: rcvrOop MemberOf: 'WordArray'.\r\r\tisArgInt & isRcvrWords ifTrue: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'WordArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t] ifFalse: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'KedamaFloatArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t].\r\r\tisRcvrWords ifTrue: [\r\t\tisArgInt ifTrue: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tintArg _ interpreterProxy integerValueOf: argOop.\r\t\t\twordsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\twordsResult at: i put: (wordsRcvr at: i) + intArg.\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatArg _ interpreterProxy floatValueOf: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (wordsRcvr at: i) + floatArg.\r\t\t\t].\r\t\t].\r\t] ifFalse: [\r\t\tisArgInt ifTrue: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tintArg _ interpreterProxy integerValueOf: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (floatsRcvr at: i) + intArg.\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatArg _ interpreterProxy floatValueOf: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (floatsRcvr at: i) + floatArg.\r\t\t\t].\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 4.\r\tinterpreterProxy push: resultOop.\r! !\r\r!KedamaPlugin methodsFor: 'array arithmetic' stamp: 'yo 1/10/2005 21:26'!\rprimitiveDivArrays\r\r\t| length resultOop argOop rcvrOop isArgWords isRcvrWords wordsRcvr wordsArg wordsResult floatsArg floatsResult floatsRcvr |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #wordsRcvr declareC: 'unsigned int *wordsRcvr'.\r\tself var: #wordsArg declareC: 'unsigned int *wordsArg'.\r\tself var: #wordsResult declareC: 'unsigned int *wordsResult'.\r\tself var: #floatsRcvr declareC: 'float *floatsRcvr'.\r\tself var: #floatsArg declareC: 'float *floatsArg'.\r\tself var: #floatsResult declareC: 'float *floatsResult'.\r\r\tresultOop _ interpreterProxy stackObjectValue: 0.\r\targOop _ interpreterProxy stackObjectValue: 1.\r\trcvrOop _ interpreterProxy stackObjectValue: 2.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isWords: argOop).\r\tinterpreterProxy success: (interpreterProxy isWords: rcvrOop).\r\tinterpreterProxy success: (interpreterProxy isWords: resultOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ interpreterProxy stSizeOf: argOop.\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: rcvrOop)).\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: resultOop)).\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tisArgWords _ interpreterProxy is: argOop MemberOf: 'WordArray'.\r\tisRcvrWords _ interpreterProxy is: rcvrOop MemberOf: 'WordArray'.\r\r\tisArgWords & isRcvrWords ifTrue: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'WordArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t] ifFalse: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'KedamaFloatArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t].\r\r\tisRcvrWords ifTrue: [\r\t\tisArgWords ifTrue: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\twordsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\twordsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\twordsResult at: i put: (wordsRcvr at: i) / (wordsArg at: i).\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (wordsRcvr at: i) / (floatsArg at: i).\r\t\t\t].\r\t\t].\r\t] ifFalse: [\r\t\tisArgWords ifTrue: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\twordsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (floatsRcvr at: i) / (wordsArg at: i).\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (floatsRcvr at: i) / (floatsArg at: i).\r\t\t\t].\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 4.\r\tinterpreterProxy push: resultOop.\r! !\r\r!KedamaPlugin methodsFor: 'array arithmetic' stamp: 'yo 1/10/2005 21:26'!\rprimitiveDivScalar\r\r\t| length resultOop argOop rcvrOop isRcvrWords wordsRcvr wordsResult floatsResult floatsRcvr isArgInt intArg floatArg |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #wordsRcvr declareC: 'unsigned int *wordsRcvr'.\r\tself var: #intArg declareC: 'int intArg'.\r\tself var: #wordsResult declareC: 'unsigned int *wordsResult'.\r\tself var: #floatsRcvr declareC: 'float *floatsRcvr'.\r\tself var: #floatArg declareC: 'double floatArg'.\r\tself var: #floatsResult declareC: 'float *floatsResult'.\r\r\tresultOop _ interpreterProxy stackObjectValue: 0.\r\targOop _ interpreterProxy stackValue: 1.\r\trcvrOop _ interpreterProxy stackObjectValue: 2.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isWords: rcvrOop).\r\tinterpreterProxy success: (interpreterProxy isWords: resultOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ interpreterProxy stSizeOf: rcvrOop.\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: resultOop)).\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tisArgInt _ interpreterProxy isIntegerObject: argOop.\r\tisRcvrWords _ interpreterProxy is: rcvrOop MemberOf: 'WordArray'.\r\r\tisArgInt & isRcvrWords ifTrue: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'WordArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t] ifFalse: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'KedamaFloatArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t].\r\r\tisRcvrWords ifTrue: [\r\t\tisArgInt ifTrue: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tintArg _ interpreterProxy integerValueOf: argOop.\r\t\t\twordsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\twordsResult at: i put: (wordsRcvr at: i) // intArg.\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatArg _ interpreterProxy floatValueOf: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (wordsRcvr at: i) / floatArg.\r\t\t\t].\r\t\t].\r\t] ifFalse: [\r\t\tisArgInt ifTrue: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tintArg _ interpreterProxy integerValueOf: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (floatsRcvr at: i) / intArg.\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatArg _ interpreterProxy floatValueOf: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (floatsRcvr at: i) / floatArg.\r\t\t\t].\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 4.\r\tinterpreterProxy push: resultOop.\r! !\r\r!KedamaPlugin methodsFor: 'array arithmetic' stamp: 'yo 1/10/2005 21:26'!\rprimitiveMulArrays\r\r\t| length resultOop argOop rcvrOop isArgWords isRcvrWords wordsRcvr wordsArg wordsResult floatsArg floatsResult floatsRcvr |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #wordsRcvr declareC: 'unsigned int *wordsRcvr'.\r\tself var: #wordsArg declareC: 'unsigned int *wordsArg'.\r\tself var: #wordsResult declareC: 'unsigned int *wordsResult'.\r\tself var: #floatsRcvr declareC: 'float *floatsRcvr'.\r\tself var: #floatsArg declareC: 'float *floatsArg'.\r\tself var: #floatsResult declareC: 'float *floatsResult'.\r\r\tresultOop _ interpreterProxy stackObjectValue: 0.\r\targOop _ interpreterProxy stackObjectValue: 1.\r\trcvrOop _ interpreterProxy stackObjectValue: 2.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isWords: argOop).\r\tinterpreterProxy success: (interpreterProxy isWords: rcvrOop).\r\tinterpreterProxy success: (interpreterProxy isWords: resultOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ interpreterProxy stSizeOf: argOop.\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: rcvrOop)).\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: resultOop)).\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tisArgWords _ interpreterProxy is: argOop MemberOf: 'WordArray'.\r\tisRcvrWords _ interpreterProxy is: rcvrOop MemberOf: 'WordArray'.\r\r\tisArgWords & isRcvrWords ifTrue: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'WordArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t] ifFalse: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'KedamaFloatArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t].\r\r\tisRcvrWords ifTrue: [\r\t\tisArgWords ifTrue: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\twordsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\twordsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\twordsResult at: i put: (wordsRcvr at: i) * (wordsArg at: i).\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (wordsRcvr at: i) * (floatsArg at: i).\r\t\t\t].\r\t\t].\r\t] ifFalse: [\r\t\tisArgWords ifTrue: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\twordsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (floatsRcvr at: i) * (wordsArg at: i).\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (floatsRcvr at: i) * (floatsArg at: i).\r\t\t\t].\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 4.\r\tinterpreterProxy push: resultOop.\r! !\r\r!KedamaPlugin methodsFor: 'array arithmetic' stamp: 'yo 1/10/2005 21:26'!\rprimitiveMulScalar\r\r\t| length resultOop argOop rcvrOop isRcvrWords wordsRcvr wordsResult floatsResult floatsRcvr isArgInt intArg floatArg |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #wordsRcvr declareC: 'unsigned int *wordsRcvr'.\r\tself var: #intArg declareC: 'int intArg'.\r\tself var: #wordsResult declareC: 'unsigned int *wordsResult'.\r\tself var: #floatsRcvr declareC: 'float *floatsRcvr'.\r\tself var: #floatArg declareC: 'double floatArg'.\r\tself var: #floatsResult declareC: 'float *floatsResult'.\r\r\tresultOop _ interpreterProxy stackObjectValue: 0.\r\targOop _ interpreterProxy stackValue: 1.\r\trcvrOop _ interpreterProxy stackObjectValue: 2.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isWords: rcvrOop).\r\tinterpreterProxy success: (interpreterProxy isWords: resultOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ interpreterProxy stSizeOf: rcvrOop.\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: resultOop)).\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tisArgInt _ interpreterProxy isIntegerObject: argOop.\r\tisRcvrWords _ interpreterProxy is: rcvrOop MemberOf: 'WordArray'.\r\r\tisArgInt & isRcvrWords ifTrue: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'WordArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t] ifFalse: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'KedamaFloatArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t].\r\r\tisRcvrWords ifTrue: [\r\t\tisArgInt ifTrue: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tintArg _ interpreterProxy integerValueOf: argOop.\r\t\t\twordsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\twordsResult at: i put: (wordsRcvr at: i) * intArg.\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatArg _ interpreterProxy floatValueOf: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (wordsRcvr at: i) * floatArg.\r\t\t\t].\r\t\t].\r\t] ifFalse: [\r\t\tisArgInt ifTrue: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tintArg _ interpreterProxy integerValueOf: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (floatsRcvr at: i) * intArg.\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatArg _ interpreterProxy floatValueOf: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (floatsRcvr at: i) * floatArg.\r\t\t\t].\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 4.\r\tinterpreterProxy push: resultOop.\r! !\r\r!KedamaPlugin methodsFor: 'array arithmetic' stamp: 'yo 1/10/2005 21:25'!\rprimitiveSubArrays\r\r\t| length resultOop argOop rcvrOop isArgWords isRcvrWords wordsRcvr wordsArg wordsResult floatsArg floatsResult floatsRcvr |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #wordsRcvr declareC: 'unsigned int *wordsRcvr'.\r\tself var: #wordsArg declareC: 'unsigned int *wordsArg'.\r\tself var: #wordsResult declareC: 'unsigned int *wordsResult'.\r\tself var: #floatsRcvr declareC: 'float *floatsRcvr'.\r\tself var: #floatsArg declareC: 'float *floatsArg'.\r\tself var: #floatsResult declareC: 'float *floatsResult'.\r\r\tresultOop _ interpreterProxy stackObjectValue: 0.\r\targOop _ interpreterProxy stackObjectValue: 1.\r\trcvrOop _ interpreterProxy stackObjectValue: 2.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isWords: argOop).\r\tinterpreterProxy success: (interpreterProxy isWords: rcvrOop).\r\tinterpreterProxy success: (interpreterProxy isWords: resultOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ interpreterProxy stSizeOf: argOop.\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: rcvrOop)).\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: resultOop)).\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tisArgWords _ interpreterProxy is: argOop MemberOf: 'WordArray'.\r\tisRcvrWords _ interpreterProxy is: rcvrOop MemberOf: 'WordArray'.\r\r\tisArgWords & isRcvrWords ifTrue: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'WordArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t] ifFalse: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'KedamaFloatArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t].\r\r\tisRcvrWords ifTrue: [\r\t\tisArgWords ifTrue: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\twordsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\twordsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\twordsResult at: i put: (wordsRcvr at: i) - (wordsArg at: i).\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (wordsRcvr at: i) - (floatsArg at: i).\r\t\t\t].\r\t\t].\r\t] ifFalse: [\r\t\tisArgWords ifTrue: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\twordsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (floatsRcvr at: i) - (wordsArg at: i).\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (floatsRcvr at: i) - (floatsArg at: i).\r\t\t\t].\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 4.\r\tinterpreterProxy push: resultOop.\r! !\r\r!KedamaPlugin methodsFor: 'array arithmetic' stamp: 'yo 1/10/2005 21:25'!\rprimitiveSubScalar\r\r\t| length resultOop argOop rcvrOop isRcvrWords wordsRcvr wordsResult floatsResult floatsRcvr isArgInt intArg floatArg |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #wordsRcvr declareC: 'unsigned int *wordsRcvr'.\r\tself var: #intArg declareC: 'int intArg'.\r\tself var: #wordsResult declareC: 'unsigned int *wordsResult'.\r\tself var: #floatsRcvr declareC: 'float *floatsRcvr'.\r\tself var: #floatArg declareC: 'double floatArg'.\r\tself var: #floatsResult declareC: 'float *floatsResult'.\r\r\tresultOop _ interpreterProxy stackObjectValue: 0.\r\targOop _ interpreterProxy stackValue: 1.\r\trcvrOop _ interpreterProxy stackObjectValue: 2.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isWords: rcvrOop).\r\tinterpreterProxy success: (interpreterProxy isWords: resultOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ interpreterProxy stSizeOf: rcvrOop.\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: resultOop)).\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tisArgInt _ interpreterProxy isIntegerObject: argOop.\r\tisRcvrWords _ interpreterProxy is: rcvrOop MemberOf: 'WordArray'.\r\r\tisArgInt & isRcvrWords ifTrue: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'WordArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t] ifFalse: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'KedamaFloatArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t].\r\r\tisRcvrWords ifTrue: [\r\t\tisArgInt ifTrue: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tintArg _ interpreterProxy integerValueOf: argOop.\r\t\t\twordsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\twordsResult at: i put: (wordsRcvr at: i) - intArg.\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatArg _ interpreterProxy floatValueOf: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (wordsRcvr at: i) - floatArg.\r\t\t\t].\r\t\t].\r\t] ifFalse: [\r\t\tisArgInt ifTrue: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tintArg _ interpreterProxy integerValueOf: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (floatsRcvr at: i) - intArg.\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatArg _ interpreterProxy floatValueOf: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (floatsRcvr at: i) - floatArg.\r\t\t\t].\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 4.\r\tinterpreterProxy push: resultOop.\r! !\r\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 9/30/2004 12:08'!\rdegreesFromX: x y: y\r\r\t| tanVal theta |\r\tself inline: true.\r\tself returnTypeC: 'double'.\r\tself var: 'x' declareC: 'double x'.\r\tself var: 'y' declareC: 'double y'.\r\tself var: 'tanVal' declareC: 'double tanVal'.\r\tself var: 'theta' declareC: 'double theta'.\r\r\tx = 0.0 ifTrue: [\r\t\ty >= 0.0 ifTrue: [^ 90.0] ifFalse: [^ 270.0].\r\t] ifFalse: [\r\t\ttanVal _ y / x.\r\t\ttheta _ self cCode: 'atan(tanVal)' inSmalltalk: [tanVal arcTan].\r\t\tx >= 0.0 ifTrue: [\r\t\t\ty >= 0.0\r\t\t\t\tifTrue: [^ theta / 0.0174532925199433]\r\t\t\t\tifFalse: [^ 360.0 + (theta / 0.0174532925199433)]\r\t\t] ifFalse: [\r\t\t\t^ 180.0 + (theta / 0.0174532925199433)\r\t\t]\r\t].\r\t^ 0.0.\r\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 10/23/2004 18:36'!\rdegreesToRadians: degrees\r\r\t| headingRadians deg q |\r\tself inline: true.\r\tself returnTypeC: 'double'.\r\tself var: 'degrees' declareC: 'double degrees'.\r\tself var: 'deg' declareC: 'double deg'.\r\tself var: 'headingRadians' declareC: 'double headingRadians'.\r\tself var: 'q' declareC: 'int q'.\r\r\tdeg _ 90.0 - degrees.\r\tq _ deg / 360.0.\r\tdeg < 0.0 ifTrue: [q _ q - 1].\r\theadingRadians _ (deg - (q * 360.0)) * 0.0174532925199433.\r\t^ headingRadians.\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 9/30/2004 11:07'!\rdrawTurtlesInArray\r\r\t| visibleArray colorArray yArray xArray destHeight destWidth destBits size x y visible visibleOop colorOop yOop xOop destOop bitsIndex |\r\tself export: true.\r\tself inline: true.\r\tself var: 'destBits' declareC: 'unsigned int *destBits'.\r\tself var: 'xArray' declareC: 'float *xArray'.\r\tself var: 'yArray' declareC: 'float *yArray'.\r\tself var: 'colorArray' declareC: 'unsigned int *colorArray'.\r\tself var: 'visibleArray' declareC: 'unsigned char *visibleArray'.\r\r\tvisibleOop _ interpreterProxy stackValue: 0.\r\tcolorOop _ interpreterProxy stackValue: 1.\r\tyOop _ interpreterProxy stackValue: 2.\r\txOop _ interpreterProxy stackValue: 3.\r\tdestHeight _ interpreterProxy stackIntegerValue: 4.\r\tdestWidth _ interpreterProxy stackIntegerValue: 5.\r\tdestOop _ interpreterProxy stackValue: 6.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\r\t(interpreterProxy isWords: destOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: xOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: yOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: colorOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isBytes: visibleOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\t(destHeight * destWidth) ~= (interpreterProxy slotSizeOf: destOop) ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\tsize _ interpreterProxy slotSizeOf: xOop.\r\t(interpreterProxy slotSizeOf: yOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy slotSizeOf: colorOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy slotSizeOf: visibleOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\txArray _ interpreterProxy firstIndexableField: xOop.\r\tyArray _ interpreterProxy firstIndexableField: yOop.\r\tcolorArray _ interpreterProxy firstIndexableField: colorOop.\r\tvisibleArray _ interpreterProxy firstIndexableField: visibleOop.\r\tdestBits _ interpreterProxy firstIndexableField: destOop.\r\r\t0 to: size - 1 do: [:i |\r\t\tx _ self cCoerce: (xArray at: i) to: 'int'.\r\t\tself cCode: '' inSmalltalk: [x _ x asInteger].\r\t\ty _ self cCoerce: (yArray at: i) to: 'int'.\r\t\tself cCode: '' inSmalltalk: [y _ y asInteger].\r\t\tvisible _ (visibleArray at: i).\r\t\t((visible ~= 0) and: [((x >= 0) and: [y >= 0]) and: [(x < destWidth) and: [y < destHeight]]]) ifTrue: [\r\t\t\tbitsIndex _ ((y * destWidth) + x).\r\t\t\tdestBits at: bitsIndex put: (colorArray at: i).\r\t\t]\r\t].\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 7.\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 10/23/2004 18:37'!\rgetHeadingArrayInto\r\r\t| resultOop headingOop size headingArray resultArray heading |\r\tself export: true.\r\tself inline: true.\r\tself var: 'headingArray' declareC: 'float *headingArray'.\r\tself var: 'resultArray' declareC: 'float *resultArray'.\r\tself var: 'heading' declareC: 'double heading'.\r\r\tresultOop _ interpreterProxy stackValue: 0.\r\theadingOop _ interpreterProxy stackValue: 1.\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isWords: headingOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: resultOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\tsize _ interpreterProxy slotSizeOf: headingOop.\r\t(interpreterProxy slotSizeOf: resultOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\theadingArray _ interpreterProxy firstIndexableField: headingOop.\r\tresultArray _ interpreterProxy firstIndexableField: resultOop.\r\r\t0 to: size - 1 do: [:i |\r\t\theading _ headingArray at: i.\r\t\theading _ heading / 0.0174532925199433.\r\t\theading _ 90.0 - heading.\r\t\theading > 0.0 ifFalse: [heading _ heading + 360.0].\r\t\tresultArray at: i put: heading.\r\t].\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 2.\r\r\t! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 10/11/2004 21:17'!\rgetScalarHeading\r\r\t| headingOop headingArray heading index |\r\tself export: true.\r\tself inline: true.\r\tself var: 'headingArray' declareC: 'float *headingArray'.\r\tself var: 'heading' declareC: 'double heading'.\r\r\theadingOop _ interpreterProxy stackValue: 0.\r\tindex _ interpreterProxy stackIntegerValue: 1.\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isWords: headingOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\t(interpreterProxy slotSizeOf: headingOop) < index ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\theadingArray _ interpreterProxy firstIndexableField: headingOop.\r\r\theading _ headingArray at: index - 1.\r\theading _ self radiansToDegrees: heading.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\tinterpreterProxy pop: 3.\r\tinterpreterProxy pushFloat: heading.\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 3/7/2005 14:39'!\rinitialiseModule\r\r\tself export: true.\r\tkedamaRandomSeed _ 17.\r\r\trandA := 16r000041A7.    \" magic constant =      16807 \"\r\trandM := 16r7FFFFFFF.    \" magic constant = 2147483647 \"\r\trandQ := randM // randA.\r\trandR  := randM \\\\ randA.\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 3/7/2005 14:38'!\rkedamaRandom2: range\r\r\t| lo hi r v val |\r\tself inline: true.\r\trange < 0 ifTrue: [r _ 0 - range] ifFalse: [r _ range].\r\thi _ kedamaRandomSeed // randQ.\r\tlo _ kedamaRandomSeed \\\\ randQ. \r\tkedamaRandomSeed _ (randA * lo) - (randR * hi).\r\tv _ kedamaRandomSeed bitAnd: 65535.\r\tval _ (v * (r + 1)) >> 16.\r\trange < 0 ifTrue: [^ 0 - val] ifFalse: [^ val].\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 3/7/2005 14:02'!\rkedamaRandom: range\r\r\t| r val |\r\tself inline: true.\r\trange < 0 ifTrue: [r _ 0 - range] ifFalse: [r _ range].\r\tkedamaRandomSeed _ ((kedamaRandomSeed * 1309) + 13849) bitAnd: 65535.\r\tval _ (kedamaRandomSeed * (r + 1)) >> 16.\r\trange < 0 ifTrue: [^ 0 - val] ifFalse: [^ val].\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 3/7/2005 13:26'!\rkedamaSetRandomSeed\r\r\t| seed |\r\tself inline: true.\r\tself export: true.\r\tseed _ interpreterProxy stackIntegerValue: 0.\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\tkedamaRandomSeed _ seed bitAnd: 65536.\r\r\tinterpreterProxy pop: 1.\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 6/7/2004 12:24'!\rmakeMask\r\r\t| shiftAmount pixel maskBits dataBits dataSize maskSize dOrigin mOrigin data alpha highMask |\r\r\tself export: true.\r\tself inline: true.\r\tself var: 'dOrigin' declareC: 'unsigned int* dOrigin'.\r\tself var: 'mOrigin' declareC: 'unsigned int* mOrigin'.\r\tself var: 'highMask' declareC: 'unsigned int highMask'.\r\tself var: 'alpha' declareC: 'unsigned int alpha'.\r\tself var: 'pixel' declareC: 'unsigned int pixel'.\r\r\tshiftAmount _ interpreterProxy stackIntegerValue: 0.\r\tpixel _ interpreterProxy stackIntegerValue: 1.\r\tmaskBits _ interpreterProxy stackValue: 2.\r\tdataBits _ interpreterProxy stackValue: 3.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\tdataSize _ interpreterProxy slotSizeOf: dataBits.\r\tmaskSize _ interpreterProxy slotSizeOf: maskBits.\r\r\tdataSize = maskSize ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\tshiftAmount < -32 ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\tshiftAmount > 8 ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\tdOrigin _ interpreterProxy firstIndexableField: dataBits.\r\tmOrigin _ interpreterProxy firstIndexableField: maskBits.\r\r\thighMask _ 16rFF000000.\r\t0 to: dataSize -1 do: [:i |\r\t\tdata _ dOrigin at: i.\r\t\talpha _ data bitShift: shiftAmount.\r\t\t(alpha > 255) ifTrue: [alpha _ 255].\r\t\t(alpha < 0) ifTrue: [alpha _ 0].\r\t\tmOrigin at: i put: (((alpha << 24) bitAnd: highMask) bitOr: pixel).\r\t].\r\r\tinterpreterProxy pop: 4.\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 6/15/2004 04:57'!\rmakeMaskLog\r\r\t| max pixel maskBits dataBits dataSize maskSize dOrigin mOrigin data alpha highMask maxLog maxOop maxFirst |\r\r\tself export: true.\r\tself inline: true.\r\tself var: 'dOrigin' declareC: 'unsigned int* dOrigin'.\r\tself var: 'mOrigin' declareC: 'unsigned int* mOrigin'.\r\tself var: 'highMask' declareC: 'unsigned int highMask'.\r\tself var: 'maxFirst' declareC: 'unsigned int* maxFirst'.\r\tself var: 'max' declareC: 'unsigned int max'.\r\tself var: 'alpha' declareC: 'unsigned int alpha'.\r\tself var: 'pixel' declareC: 'unsigned int pixel'.\r\tself var: 'maxLog' declareC: 'double maxLog'.\r\r\tmaxOop _ interpreterProxy stackValue: 0.\r\tpixel _ interpreterProxy stackIntegerValue: 1.\r\tmaskBits _ interpreterProxy stackValue: 2.\r\tdataBits _ interpreterProxy stackValue: 3.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\tmaxFirst _ (interpreterProxy firstIndexableField: maxOop).\r\tmax _ maxFirst at: 0.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\tmaxLog _ self cCode: 'log(max)' inSmalltalk: [max ln].\r\r\tdataSize _ interpreterProxy slotSizeOf: dataBits.\r\tmaskSize _ interpreterProxy slotSizeOf: maskBits.\r\r\tdataSize = maskSize ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\tdOrigin _ interpreterProxy firstIndexableField: dataBits.\r\tmOrigin _ interpreterProxy firstIndexableField: maskBits.\r\r\thighMask _ 16rFF000000.\r\t0 to: dataSize -1 do: [:i |\r\t\tdata _ dOrigin at: i.\r\t\tdata = 0 ifTrue: [alpha _ 0] ifFalse: [\r\t\t\talpha _ ((255.0 / maxLog) * (self cCode: 'log(data)' inSmalltalk: [data ln])) asInteger.\r\t\t].\r\t\t(alpha > 255) ifTrue: [alpha _ 255].\r\t\tmOrigin at: i put: (((alpha << 24) bitAnd: highMask) bitOr: pixel).\r\t].\r\r\tinterpreterProxy pop: 4.\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 9/29/2004 17:27'!\rmakeTurtlesMap\r\r\t| height width yOop xOop whoOop mapOop size xArray yArray whoArray map x y mapIndex |\r\tself export: true.\r\tself inline: true.\r\r\tself var: 'xArray' declareC: 'float *xArray'.\r\tself var: 'yArray' declareC: 'float *yArray'.\r\tself var: 'whoArray' declareC: 'unsigned int *whoArray'.\r\tself var: 'map' declareC: 'unsigned int *map'.\r\r\theight _ interpreterProxy stackIntegerValue: 0.\r\twidth _ interpreterProxy stackIntegerValue: 1.\r\tyOop _ interpreterProxy stackValue: 2.\r\txOop _ interpreterProxy stackValue: 3.\r\twhoOop _ interpreterProxy stackValue: 4.\r\tmapOop _ interpreterProxy stackValue: 5.\r\r\t(interpreterProxy isWords: yOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: xOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: whoOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: mapOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\tsize _ interpreterProxy slotSizeOf: whoOop.\r\t(interpreterProxy slotSizeOf: xOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy slotSizeOf: yOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy slotSizeOf: mapOop) ~= (height * width) ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\txArray _ interpreterProxy firstIndexableField: xOop.\r\tyArray _ interpreterProxy firstIndexableField: yOop.\r\twhoArray _ interpreterProxy firstIndexableField: whoOop.\r\tmap _ interpreterProxy firstIndexableField: mapOop.\r\t\r\t0 to: (height * width) - 1 do: [:index |\r\t\tmap at: index put: 0.\r\t].\r\r\t0 to: size - 1 do: [:index |\r\t\tx _ xArray at: index.\r\t\ty _ yArray at: index.\r\t\tmapIndex _ (width * y) + x.\r\t\t(mapIndex >= 0  and: [mapIndex < (height * width)]) ifTrue: [\r\t\t\tmap at: mapIndex put: (whoArray at: index).\r\t\t].\r\t].\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 6.\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 9/29/2004 18:52'!\rprimPixelAtXY\r\r\t| height width yPos xPos bitsOop x y bits index ret |\r\tself export: true.\r\tself inline: true.\r\r\tself var: 'bits' declareC: 'unsigned int *bits'.\r\tself var: 'xPos' declareC: 'double xPos'.\r\tself var: 'yPos' declareC: 'double yPos'.\r\r\theight _ interpreterProxy stackIntegerValue: 0.\r\twidth _ interpreterProxy stackIntegerValue: 1.\r\tyPos _ interpreterProxy stackFloatValue: 2.\r\txPos _ interpreterProxy stackFloatValue: 3.\r\tbitsOop _ interpreterProxy stackValue: 4.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isWords: bitsOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy slotSizeOf: bitsOop) ~= (height * width) ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\tx _ xPos.\r\ty _ yPos.\r\tbits _ interpreterProxy firstIndexableField: bitsOop.\r\r\t((x >= 0) &  (x < width) & (y >= 0) & (y < height)) ifTrue: [\r\t\tindex _ y * width + x.\r\t\tret _ bits at: index.\r\t] ifFalse: [\r\t\tret _ 0.\r\t].\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 6.\r\tinterpreterProxy pushInteger: ret.\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 9/29/2004 18:50'!\rprimPixelAtXYPut\r\r\t| height width value yPos xPos bitsOop x y v bits index |\r\tself export: true.\r\tself inline: true.\r\r\tself var: 'bits' declareC: 'unsigned int *bits'.\r\tself var: 'xPos' declareC: 'double xPos'.\r\tself var: 'yPos' declareC: 'double yPos'.\r\r\theight _ interpreterProxy stackIntegerValue: 0.\r\twidth _ interpreterProxy stackIntegerValue: 1.\r\tvalue _ interpreterProxy stackIntegerValue: 2.\r\tyPos _ interpreterProxy stackFloatValue: 3.\r\txPos _ interpreterProxy stackFloatValue: 4.\r\tbitsOop _ interpreterProxy stackValue: 5.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isWords: bitsOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy slotSizeOf: bitsOop) ~= (height * width) ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\tx _ xPos.\r\ty _ yPos.\r\tv _ value.\r\tv > 16r3FFFFFFF ifTrue: [\r\t\tv _ 16r3FFFFFFF.\r\t].\r\tv < 0 ifTrue: [\r\t\tv _ 0.\r\t].\r\r\tbits _ interpreterProxy firstIndexableField: bitsOop.\r\r\t((x >= 0) &  (x < width) & (y >= 0) & (y < height)) ifTrue: [\r\t\tindex _ y * width + x.\r\t\tbits at: index put: v.\r\t].\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 6.\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 10/25/2004 16:42'!\rprimPixelsAtXY\r\r\t| yArray xArray bitsHeight bitsWidth bitsOop bits size x y bitsIndex destWordsOop  yArrayOop xArrayOop destWords  |\r\tself export: true.\r\tself inline: true.\r\tself var: 'destWords' declareC: 'unsigned int *destWords'.\r\tself var: 'bits' declareC: 'unsigned int *bits'.\r\tself var: 'xArray' declareC: 'float *xArray'.\r\tself var: 'yArray' declareC: 'float *yArray'.\r\r\tdestWordsOop _ interpreterProxy stackValue: 0.\r\tbitsHeight _ interpreterProxy stackIntegerValue: 1.\r\tbitsWidth _ interpreterProxy stackIntegerValue: 2.\r\tbitsOop _ interpreterProxy stackValue: 3.\r\tyArrayOop _ interpreterProxy stackValue: 4.\r\txArrayOop _ interpreterProxy stackValue: 5.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isWords: destWordsOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: xArrayOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: yArrayOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: bitsOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\t(bitsHeight * bitsWidth) ~= (interpreterProxy slotSizeOf: bitsOop) ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\tsize _ interpreterProxy slotSizeOf: xArrayOop.\r\t(interpreterProxy slotSizeOf: yArrayOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy slotSizeOf: destWordsOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\txArray _ interpreterProxy firstIndexableField: xArrayOop.\r\tyArray _ interpreterProxy firstIndexableField: yArrayOop.\r\tdestWords _ interpreterProxy firstIndexableField: destWordsOop.\r\tbits _ interpreterProxy firstIndexableField: bitsOop.\r\r\t0 to: size - 1 do: [:i |\r\t\tx _ self cCoerce: (xArray at: i) to: 'int'.\r\t\tself cCode: '' inSmalltalk: [x _ x asInteger].\r\t\ty _ self cCoerce: (yArray at: i) to: 'int'.\r\t\tself cCode: '' inSmalltalk: [y _ y asInteger].\r\t\t(((x >= 0) and: [y >= 0]) and: [(x < bitsWidth) and: [y < bitsHeight]]) ifTrue: [\r\t\t\tbitsIndex _ ((y * bitsWidth) + x).\r\t\t\tdestWords at: i put: (bits at: bitsIndex).\r\t\t]\r\t].\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 6.\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 10/23/2004 18:38'!\rprimScalarForward\r\r\t| bottomEdgeMode topEdgeMode rightEdgeMode leftEdgeMode destHeight destWidth headingOop yOop xOop size xArray yArray headingArray val dist newX newY index i |\r\tself export: true.\r\tself inline: true.\r\tself var: 'xArray' declareC: 'float *xArray'.\r\tself var: 'yArray' declareC: 'float *yArray'.\r\tself var: 'headingArray' declareC: 'float *headingArray'.\r\tself var: 'val' declareC: 'double val'.\r\tself var: 'destHeight' declareC: 'double destHeight'.\r\tself var: 'destWidth' declareC: 'double destWidth'.\r\tself var: 'dist' declareC: 'double dist'.\r\tself var: 'newX' declareC: 'double newX'.\r\tself var: 'newY' declareC: 'double newY'.\r\r\tbottomEdgeMode _ interpreterProxy stackIntegerValue: 0.\r\ttopEdgeMode _ interpreterProxy stackIntegerValue: 1.\r\trightEdgeMode _ interpreterProxy stackIntegerValue: 2.\r\tleftEdgeMode _ interpreterProxy stackIntegerValue: 3.\r\tdestHeight _ interpreterProxy stackFloatValue: 4.\r\tdestWidth _ interpreterProxy stackFloatValue: 5.\r\tval _ interpreterProxy stackFloatValue: 6.\r\theadingOop _ interpreterProxy stackValue: 7.\r\tyOop _ interpreterProxy stackValue: 8.\r\txOop _ interpreterProxy stackValue: 9.\r\tindex _ interpreterProxy stackIntegerValue: 10.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isWords: xOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: yOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: headingOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\tsize _ interpreterProxy slotSizeOf: xOop.\r\t(interpreterProxy slotSizeOf: yOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy slotSizeOf: headingOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\txArray _ interpreterProxy firstIndexableField: xOop.\r\tyArray _ interpreterProxy firstIndexableField: yOop.\r\theadingArray _ interpreterProxy firstIndexableField: headingOop.\r\r\tdist _ val.\r\ti _ index - 1.\r\tnewX _ (xArray at: i) + (dist * (headingArray at: i) cos).\r\tnewY _ (yArray at: i) - (dist * (headingArray at: i) sin).\r\tself scalarXAt: i xArray: xArray headingArray: headingArray value: newX destWidth: destWidth leftEdgeMode: leftEdgeMode rightEdgeMode: rightEdgeMode.\r\tself scalarYAt: i yArray: yArray headingArray: headingArray value: newY destHeight: destHeight topEdgeMode: topEdgeMode bottomEdgeMode: bottomEdgeMode.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 11.\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 10/25/2004 17:06'!\rprimSetPixelsAtXY\r\r\t| yArray xArray bitsHeight bitsWidth bitsOop bits size x y bitsIndex  yArrayOop xArrayOop  valueOop isValueInt intValue wordsValue value |\r\tself export: true.\r\tself inline: true.\r\tself var: 'intValue' declareC: 'unsigned int intValue'.\r\tself var: 'wordsValue' declareC: 'unsigned int *wordsValue'.\r\tself var: 'value' declareC: 'unsigned int value'.\r\tself var: 'bits' declareC: 'unsigned int *bits'.\r\tself var: 'xArray' declareC: 'float *xArray'.\r\tself var: 'yArray' declareC: 'float *yArray'.\r\r\tvalueOop _ interpreterProxy stackValue: 0.\r\tbitsHeight _ interpreterProxy stackIntegerValue: 1.\r\tbitsWidth _ interpreterProxy stackIntegerValue: 2.\r\tbitsOop _ interpreterProxy stackValue: 3.\r\tyArrayOop _ interpreterProxy stackValue: 4.\r\txArrayOop _ interpreterProxy stackValue: 5.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isWords: xArrayOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: yArrayOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: bitsOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\t(bitsHeight * bitsWidth) ~= (interpreterProxy slotSizeOf: bitsOop) ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\tsize _ interpreterProxy slotSizeOf: xArrayOop.\r\t(interpreterProxy slotSizeOf: yArrayOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\tisValueInt _ interpreterProxy isIntegerObject: valueOop.\r\tisValueInt ifTrue: [\r\t\tintValue _ interpreterProxy integerValueOf: valueOop.\r\t].\r\r\tisValueInt ifFalse: [\r\t\t(interpreterProxy is: valueOop MemberOf: 'WordArray')\r\t\t\tifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t\t(interpreterProxy slotSizeOf: valueOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t].\r\r\txArray _ interpreterProxy firstIndexableField: xArrayOop.\r\tyArray _ interpreterProxy firstIndexableField: yArrayOop.\r\tisValueInt ifFalse: [\r\t\twordsValue _ interpreterProxy firstIndexableField: valueOop.\r\t].\r\tbits _ interpreterProxy firstIndexableField: bitsOop.\r\r\tisValueInt ifTrue: [\r\t\tvalue _ intValue.\r\t].\r\r\t0 to: size - 1 do: [:i |\r\t\tx _ self cCoerce: (xArray at: i) to: 'int'.\r\t\tself cCode: '' inSmalltalk: [x _ x asInteger].\r\t\ty _ self cCoerce: (yArray at: i) to: 'int'.\r\t\tself cCode: '' inSmalltalk: [y _ y asInteger].\r\t\t(((x >= 0) and: [y >= 0]) and: [(x < bitsWidth) and: [y < bitsHeight]]) ifTrue: [\r\t\t\tbitsIndex _ ((y * bitsWidth) + x).\r\t\t\tisValueInt ifFalse: [\r\t\t\t\tvalue _ wordsValue at: i.\r\t\t\t].\r\t\t\tbits at: bitsIndex put: value.\r\t\t]\r\t].\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 6.\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 10/23/2004 18:39'!\rprimTurtlesForward\r\r\t| bottomEdgeMode topEdgeMode rightEdgeMode leftEdgeMode destHeight destWidth valOop headingOop yOop xOop isValVector size xArray yArray headingArray valArray val dist newX newY |\r\tself export: true.\r\tself inline: true.\r\tself var: 'xArray' declareC: 'float *xArray'.\r\tself var: 'yArray' declareC: 'float *yArray'.\r\tself var: 'headingArray' declareC: 'float *headingArray'.\r\tself var: 'valArray' declareC: 'float *valArray'.\r\tself var: 'val' declareC: 'double val'.\r\tself var: 'destHeight' declareC: 'double destHeight'.\r\tself var: 'destWidth' declareC: 'double destWidth'.\r\tself var: 'dist' declareC: 'double dist'.\r\tself var: 'newX' declareC: 'double newX'.\r\tself var: 'newY' declareC: 'double newY'.\r\r\tbottomEdgeMode _ interpreterProxy stackIntegerValue: 0.\r\ttopEdgeMode _ interpreterProxy stackIntegerValue: 1.\r\trightEdgeMode _ interpreterProxy stackIntegerValue: 2.\r\tleftEdgeMode _ interpreterProxy stackIntegerValue: 3.\r\tdestHeight _ interpreterProxy stackFloatValue: 4.\r\tdestWidth _ interpreterProxy stackFloatValue: 5.\r\tvalOop _ interpreterProxy stackValue: 6.\r\theadingOop _ interpreterProxy stackValue: 7.\r\tyOop _ interpreterProxy stackValue: 8.\r\txOop _ interpreterProxy stackValue: 9.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isWords: xOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: yOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: headingOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isFloatObject: valOop) ifTrue: [\r\t\tisValVector _ false.\r\t] ifFalse: [\r\t\t(interpreterProxy isWords: valOop) ifTrue: [\r\t\t\tisValVector _ true\r\t\t] ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t].\r\r\tsize _ interpreterProxy slotSizeOf: xOop.\r\t(interpreterProxy slotSizeOf: yOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\t(interpreterProxy slotSizeOf: headingOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\tisValVector ifTrue: [\r\t\t(interpreterProxy slotSizeOf: valOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t].\r\r\txArray _ interpreterProxy firstIndexableField: xOop.\r\tyArray _ interpreterProxy firstIndexableField: yOop.\r\theadingArray _ interpreterProxy firstIndexableField: headingOop.\r\tisValVector ifTrue: [\r\t\tvalArray _ interpreterProxy firstIndexableField: valOop.\r\t] ifFalse: [\r\t\tval _ interpreterProxy floatValueOf: valOop\r\t].\r\r\t0 to: size -1 do: [:i |\r\t\tisValVector ifTrue: [\r\t\t\tdist _ valArray at: i.\r\t\t] ifFalse: [\r\t\t\tdist _ val.\r\t\t].\r\t\tnewX _ (xArray at: i) + (dist * (headingArray at: i) cos).\r\t\tnewY _ (yArray at: i) - (dist * (headingArray at: i) sin).\r\t\tself scalarXAt: i xArray: xArray headingArray: headingArray value: newX destWidth: destWidth leftEdgeMode: leftEdgeMode rightEdgeMode: rightEdgeMode.\r\t\tself scalarYAt: i yArray: yArray headingArray: headingArray value: newY destHeight: destHeight topEdgeMode: topEdgeMode bottomEdgeMode: bottomEdgeMode\r\t].\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 10.\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 9/30/2004 12:19'!\rprimUpHill\r\r\t| sniffRange height width bitsOop tH tY tX bits turtleX turtleY startX endX startY endY maxVal maxValX rowOffset thisVal maxValY ret |\r\tself inline: true.\r\tself export: true.\r\r\tself var: 'bits' declareC: 'unsigned int *bits'.\r\tself var: 'tX' declareC: 'double tX'.\r\tself var: 'tY' declareC: 'double tY'.\r\tself var: 'tH' declareC: 'double tH'.\r\r\tsniffRange _ interpreterProxy stackIntegerValue: 0.\r\theight _ interpreterProxy stackIntegerValue: 1.\r\twidth _ interpreterProxy stackIntegerValue: 2.\r\tbitsOop _ interpreterProxy stackValue: 3.\r\ttH _ interpreterProxy stackFloatValue: 4.\r\ttY _ interpreterProxy stackFloatValue: 5.\r\ttX _ interpreterProxy stackFloatValue: 6.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\t(interpreterProxy isWords: bitsOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy slotSizeOf: bitsOop) ~= (height * width) ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\tbits _ interpreterProxy firstIndexableField: bitsOop.\r\r\tturtleX _ self cCode: 'tX' inSmalltalk: [tX asInteger].\r\tturtleY _ self cCode: 'tY' inSmalltalk: [tY asInteger].\r\tturtleX _ turtleX max: 0.\r\tturtleY _ turtleY max: 0.\r\tturtleX _ turtleX min: width - 1.\r\tturtleY _ turtleY min: height - 1.\r\tstartX _ turtleX - sniffRange max: 0.\r\tendX _ (turtleX + sniffRange) min: (width - 1).\r\tstartY _ (turtleY - sniffRange) max: 0.\r\tendY _ (turtleY + sniffRange) min: (height - 1).\r\tmaxVal _ bits at: turtleY * width + turtleX.\r\tmaxValX _ -1.\r\tstartY to: endY do: [:y | \r\t\trowOffset _ y * width.\r\t\tstartX to: endX do: [:x | \r\t\t\tthisVal _ bits at: rowOffset + x.\r\t\t\tthisVal > maxVal ifTrue: [\r\t\t\t\tmaxValX _ x.\r\t\t\t\tmaxValY _ y.\r\t\t\t\tmaxVal _ thisVal\r\t\t\t].\r\t\t].\r\t].\r\t-1 = maxValX\r\t\tifTrue: [ret _ self radiansToDegrees: tH]\r\t\tifFalse: [\r\t\t\tret _ (self degreesFromX: (self cCoerce: maxValX - turtleX to: 'double') y: (self cCoerce: maxValY - turtleY to: 'double')) + 90.0.\r\t\t].\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 8.\r\tinterpreterProxy pushFloat: ret.\r\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 10/11/2004 12:43'!\rradiansToDegrees: radians\r\r\t| deg degrees |\r\tself inline: true.\r\tself returnTypeC: 'double'.\r\tself var: 'degrees' declareC: 'double degrees'.\r\tself var: 'deg' declareC: 'double deg'.\r\tself var: 'radians' declareC: 'double radians'.\r\tself var: 'headingRadians' declareC: 'double headingRadians'.\r\r\tdegrees _ radians / 0.0174532925199433.\r\tdeg _ 90.0 - degrees.\r\tdeg > 0.0 ifFalse: [deg _ deg + 360.0].\r\t^ deg.\r\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 3/7/2005 14:43'!\rrandomIntoFloatArray\r\r\t| range factor floatArrayOop to from size floatArray |\r\tself export: true.\r\tself inline: true.\r\tself var: 'factor' declareC: 'double factor'.\r\tself var: 'floatArray' declareC: 'float *floatArray'.\r\r\tfactor _ interpreterProxy stackFloatValue: 0.\r\tfloatArrayOop _ interpreterProxy stackValue: 1.\r\tto _ interpreterProxy stackIntegerValue: 2.\r\tfrom _ interpreterProxy stackIntegerValue: 3.\r\trange _ interpreterProxy stackIntegerValue: 4.\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isWords: floatArrayOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\tsize _ interpreterProxy stSizeOf: floatArrayOop.\r\t(size >= to and: [from >= 1 and: [to >= from]]) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\tfloatArray _ interpreterProxy firstIndexableField: floatArrayOop.\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\tfrom to: to do: [:index |\r\t\tfloatArray at: index-1 put: (self cCoerce: (self kedamaRandom2: range) to: 'double') * factor.\r\t].\r\r\tinterpreterProxy pop: 5.\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 3/7/2005 14:43'!\rrandomIntoIntegerArray\r\r\t| range factor integerArrayOop to from size integerArray |\r\tself export: true.\r\tself inline: true.\r\tself var: 'factor' declareC: 'double factor'.\r\tself var: 'integerArray' declareC: 'unsigned int *integerArray'.\r\r\tfactor _ interpreterProxy stackFloatValue: 0.\r\tintegerArrayOop _ interpreterProxy stackValue: 1.\r\tto _ interpreterProxy stackIntegerValue: 2.\r\tfrom _ interpreterProxy stackIntegerValue: 3.\r\trange _ interpreterProxy stackIntegerValue: 4.\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isWords: integerArrayOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\tsize _ interpreterProxy stSizeOf: integerArrayOop.\r\t(size >= to and: [from >= 1 and: [to >= from]]) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\tintegerArray _ interpreterProxy firstIndexableField: integerArrayOop.\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\tfrom to: to do: [:index |\r\t\tintegerArray at: index-1 put: (self cCoerce: ((self cCoerce: (self kedamaRandom2: range) to: 'double') * factor) to: 'int').\r\t].\r\r\tinterpreterProxy pop: 5.\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 3/7/2005 14:43'!\rrandomRange\r\r\t| range ret |\r\tself export: true.\r\tself inline: true.\r\trange _ interpreterProxy stackIntegerValue: 0.\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\tret _ self kedamaRandom2: range.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\tinterpreterProxy pop: 2.\r\tinterpreterProxy pushInteger: ret.\r\t^ self.\r\r\t! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 10/23/2004 22:23'!\rscalarGetAngleTo\r\r\t| fromY fromX toY toX x y r |\r\tself export: true.\r\tself inline: true.\r\tself var: 'toX' declareC: 'double toX'.\r\tself var: 'toY' declareC: 'double toY'.\r\tself var: 'fromX' declareC: 'double fromX'.\r\tself var: 'fromY' declareC: 'double fromY'.\r\tself var: 'x' declareC: 'double x'.\r\tself var: 'y' declareC: 'double y'.\r\tself var: 'r' declareC: 'double r'.\r\r\tfromY _ interpreterProxy stackFloatValue: 0.\r\tfromX _ interpreterProxy stackFloatValue: 1.\r\ttoY _ interpreterProxy stackFloatValue: 2.\r\ttoX _ interpreterProxy stackFloatValue: 3.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\tx _ toX - fromX.\r\ty _ toY - fromY.\r\r\tr _ self degreesFromX: x y: y.\r\tr _ r + 90.0.\r\tr > 360.0 ifTrue: [r _ r - 360.0].\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 5.\r\tinterpreterProxy pushFloat: r.\r\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 10/22/2004 15:35'!\rscalarGetDistanceTo\r\r\t| fromY fromX toY toX x y r |\r\tself export: true.\r\tself inline: true.\r\tself var: 'toX' declareC: 'double toX'.\r\tself var: 'toY' declareC: 'double toY'.\r\tself var: 'fromX' declareC: 'double fromX'.\r\tself var: 'fromY' declareC: 'double fromY'.\r\tself var: 'x' declareC: 'double x'.\r\tself var: 'y' declareC: 'double y'.\r\tself var: 'r' declareC: 'double r'.\r\r\tfromY _ interpreterProxy stackFloatValue: 0.\r\tfromX _ interpreterProxy stackFloatValue: 1.\r\ttoY _ interpreterProxy stackFloatValue: 2.\r\ttoX _ interpreterProxy stackFloatValue: 3.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\tx _ fromX - toX.\r\ty _ fromY - toY.\r\r\tr _ ((x * x) + (y * y)) sqrt.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 5.\r\tinterpreterProxy pushFloat: r.\r\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 10/23/2004 18:39'!\rscalarXAt: index xArray: xArray headingArray: headingArray value: val destWidth: destWidth leftEdgeMode: leftEdgeMode rightEdgeMode: rightEdgeMode\r\r\t| newX headingRadians |\r\tself inline: true.\r\r\tself var: 'xArray' declareC: 'float* xArray'.\r\tself var: 'headingArray' declareC: 'float* headingArray'.\r\tself var: 'destWidth' declareC: 'double destWidth'.\r\tself var: 'val' declareC: 'double val'.\r\tself var: 'newX' declareC: 'double newX'.\r\tself var: 'headingRadians' declareC: 'double headingRadians'.\r\r\tnewX _ val.\r\tnewX < 0.0 ifTrue: [\r\t\tleftEdgeMode = 1 ifTrue: [\r\t\t\t\"wrap\"\r\t\t\tnewX _ newX + destWidth.\r\t\t].\r\t\tleftEdgeMode = 2 ifTrue: [\r\t\t\t\"stick\"\r\t\t\tnewX _ 0.0.\r\t\t].\r\t\tleftEdgeMode = 3 ifTrue: [\r\t\t\t\"bounce\"\r\t\t\tnewX _ 0.0 - newX.\r\t\t\theadingRadians _ headingArray at: index.\r\t\t\theadingRadians <  3.141592653589793\r\t\t\t\tifTrue: [headingArray at: index put: 3.141592653589793 - headingRadians]\r\t\t\t\tifFalse: [headingArray at: index put: 9.42477796076938 - headingRadians].\r\t\t].\r\t].\r\r\tnewX >= destWidth ifTrue: [\r\t\trightEdgeMode = 1 ifTrue: [\r\t\t\tnewX _ newX - destWidth.\r\t\t].\r\t\trightEdgeMode = 2 ifTrue: [\r\t\t\tnewX _ destWidth - 0.000001.\r\t\t].\r\t\trightEdgeMode = 3 ifTrue: [\r\t\t\tnewX _ (destWidth - 0.000001) - (newX - destWidth).\r\t\t\theadingRadians _ headingArray at: index.\r\t\t\theadingRadians < 3.141592653589793\r\t\t\t\tifTrue: [headingArray at: index put: (3.141592653589793 - headingRadians)]\r\t\t\t\tifFalse: [headingArray at: index put: (9.42477796076938 - headingRadians)].\r\t\t]\r\t].\r\txArray at: index put: newX.\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 10/23/2004 18:39'!\rscalarYAt: index yArray: yArray headingArray: headingArray value: val destHeight: destHeight topEdgeMode: topEdgeMode bottomEdgeMode: bottomEdgeMode\r\r\t| newY |\r\tself inline: true.\r\r\tself var: 'yArray' declareC: 'float* yArray'.\r\tself var: 'headingArray' declareC: 'float* headingArray'.\r\tself var: 'destHeight' declareC: 'double destHeight'.\r\tself var: 'val' declareC: 'double val'.\r\tself var: 'newY' declareC: 'double newY'.\r\r\tnewY _ val.\r\tnewY < 0.0 ifTrue: [\r\t\ttopEdgeMode = 1 ifTrue: [\r\t\t\t\"wrap\"\r\t\t\tnewY _ newY + destHeight.\r\t\t].\r\t\ttopEdgeMode = 2 ifTrue: [\r\t\t\t\"stick\"\r\t\t\tnewY _ 0.0.\r\t\t].\r\t\ttopEdgeMode = 3 ifTrue: [\r\t\t\t\"bounce\"\r\t\t\tnewY _ 0.0 - newY.\r\t\t\theadingArray at: index put: (6.283185307179586 - (headingArray at: index)).\r\t\t].\r\t].\r\r\tnewY >= destHeight ifTrue: [\r\t\tbottomEdgeMode = 1 ifTrue: [\r\t\t\tnewY _ newY - destHeight.\r\t\t].\r\t\tbottomEdgeMode = 2 ifTrue: [\r\t\t\tnewY _ destHeight - 0.000001.\r\t\t].\r\t\tbottomEdgeMode = 3 ifTrue: [\r\t\t\tnewY _ (destHeight - 0.000001) - (newY - destHeight).\r\t\t\theadingArray at: index put: (6.283185307179586 - (headingArray at: index)).\r\t\t]\r\t].\r\tyArray at: index put: newY.\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 10/23/2004 18:39'!\rsetHeadingArrayFrom\r\r\t| resultOop headingOop size headingArray resultArray heading isValVector |\r\tself export: true.\r\tself inline: true.\r\tself var: 'headingArray' declareC: 'float *headingArray'.\r\tself var: 'resultArray' declareC: 'float *resultArray'.\r\tself var: 'heading' declareC: 'double heading'.\r\r\tresultOop _ interpreterProxy stackValue: 0.\r\theadingOop _ interpreterProxy stackValue: 1.\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isWords: headingOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\tsize _ interpreterProxy slotSizeOf: headingOop.\r\t(interpreterProxy isFloatObject: resultOop) ifTrue: [\r\t\tisValVector _ false.\r\t] ifFalse: [\r\t\t(interpreterProxy isWords: resultOop) ifTrue: [\r\t\t\t(interpreterProxy slotSizeOf: resultOop) ~= size\r\t\t\t\tifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t\t\tisValVector _ true\r\t\t] ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t].\r\r\theadingArray _ interpreterProxy firstIndexableField: headingOop.\r\tisValVector ifTrue: [\r\t\tresultArray _ interpreterProxy firstIndexableField: resultOop.\r\t] ifFalse: [\r\t\theading _ interpreterProxy floatValueOf: resultOop.\r\t\theading _ self degreesToRadians: heading.\r\t].\r\r\t0 to: size - 1 do: [:i |\r\t\tisValVector ifTrue: [\r\t\t\theading _ resultArray at: i.\r\t\t\theading _ self degreesToRadians: heading.\r\t\t].\r\t\theadingArray at: i put: heading.\r\t].\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 2.\r\r\t! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 10/11/2004 14:10'!\rsetScalarHeading\r\r\t| headingOop headingArray heading index |\r\tself export: true.\r\tself inline: true.\r\tself var: 'headingArray' declareC: 'float *headingArray'.\r\tself var: 'heading' declareC: 'double heading'.\r\r\theading _ interpreterProxy stackFloatValue: 0.\r\theadingOop _ interpreterProxy stackValue: 1.\r\tindex _ interpreterProxy stackIntegerValue: 2.\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isWords: headingOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\t(interpreterProxy slotSizeOf: headingOop) < index ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\theadingArray _ interpreterProxy firstIndexableField: headingOop.\r\r\theadingArray at: index - 1 put: (self degreesToRadians: heading).\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 3.\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 1/24/2005 14:49'!\rshutdownModule\r\r\tself export: true.\r\t^ true.\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 10/23/2004 18:39'!\rturtleScalarSetX\r\r\t| xArray headingArray val destWidth xOop headingOop leftEdgeMode rightEdgeMode xIndex size |\r\tself export: true.\r\tself inline: true.\r\tself var: 'xArray' declareC: 'float *xArray'.\r\tself var: 'headingArray' declareC: 'float *headingArray'.\r\tself var: 'val' declareC: 'double val'.\r\tself var: 'destWidth' declareC: 'double destWidth'.\r\r\trightEdgeMode _ interpreterProxy stackIntegerValue: 0.\r\tleftEdgeMode _ interpreterProxy stackIntegerValue: 1.\r\tdestWidth _ interpreterProxy stackFloatValue: 2.\r\tval _ interpreterProxy stackFloatValue: 3.\r\theadingOop _ interpreterProxy stackValue: 4.\r\txIndex _ interpreterProxy stackIntegerValue: 5.\r\txOop _ interpreterProxy stackValue: 6.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isWords: xOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: headingOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\tsize _ interpreterProxy slotSizeOf: xOop.\r\t(interpreterProxy slotSizeOf: headingOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\txArray _ interpreterProxy firstIndexableField: xOop.\r\theadingArray _ interpreterProxy firstIndexableField: headingOop.\r\r\tself scalarXAt: xIndex - 1 xArray: xArray headingArray: headingArray value: val destWidth: destWidth leftEdgeMode: leftEdgeMode rightEdgeMode: rightEdgeMode.\r\t\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 7.\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 10/23/2004 18:40'!\rturtleScalarSetY\r\r\t| yArray headingArray val destHeight yOop headingOop size yIndex topEdgeMode bottomEdgeMode |\r\tself export: true.\r\tself inline: true.\r\tself var: 'yArray' declareC: 'float *yArray'.\r\tself var: 'headingArray' declareC: 'float *headingArray'.\r\tself var: 'val' declareC: 'double val'.\r\tself var: 'destHeight' declareC: 'double destHeight'.\r\r\tbottomEdgeMode _ interpreterProxy stackIntegerValue: 0.\r\ttopEdgeMode _ interpreterProxy stackIntegerValue: 1.\r\tdestHeight _ interpreterProxy stackFloatValue: 2.\r\tval _ interpreterProxy stackFloatValue: 3.\r\theadingOop _ interpreterProxy stackValue: 4.\r\tyIndex _ interpreterProxy stackIntegerValue: 5.\r\tyOop _ interpreterProxy stackValue: 6.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isWords: yOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: headingOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\tsize _ interpreterProxy slotSizeOf: yOop.\r\t(interpreterProxy slotSizeOf: headingOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\tyArray _ interpreterProxy firstIndexableField: yOop.\r\theadingArray _ interpreterProxy firstIndexableField: headingOop.\r\r\tself scalarYAt: yIndex - 1 yArray: yArray headingArray: headingArray value: val destHeight: destHeight topEdgeMode: topEdgeMode bottomEdgeMode: bottomEdgeMode.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 7.\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 10/23/2004 18:40'!\rturtlesSetX\r\r\t| xArray headingArray valArray val destWidth xOop headingOop valOop leftEdgeMode rightEdgeMode isValVector size newX |\r\tself export: true.\r\tself inline: true.\r\tself var: 'xArray' declareC: 'float *xArray'.\r\tself var: 'headingArray' declareC: 'float *headingArray'.\r\tself var: 'valArray' declareC: 'float *valArray'.\r\tself var: 'val' declareC: 'double val'.\r\tself var: 'destWidth' declareC: 'double destWidth'.\r\tself var: 'newX' declareC: 'double newX'.\r\r\trightEdgeMode _ interpreterProxy stackIntegerValue: 0.\r\tleftEdgeMode _ interpreterProxy stackIntegerValue: 1.\r\tdestWidth _ interpreterProxy stackFloatValue: 2.\r\tvalOop _ interpreterProxy stackValue: 3.\r\theadingOop _ interpreterProxy stackValue: 4.\r\txOop _ interpreterProxy stackValue: 5.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isWords: xOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: headingOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isFloatObject: valOop) ifTrue: [\r\t\tisValVector _ false\r\t] ifFalse: [\r\t\t(interpreterProxy isWords: valOop) ifTrue: [\r\t\t\tisValVector _ true\r\t\t] ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t].\r\r\tsize _ interpreterProxy slotSizeOf: xOop.\r\t(interpreterProxy slotSizeOf: headingOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\tisValVector ifTrue: [\r\t\t(interpreterProxy slotSizeOf: valOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t].\r\r\txArray _ interpreterProxy firstIndexableField: xOop.\r\theadingArray _ interpreterProxy firstIndexableField: headingOop.\r\tisValVector ifTrue: [\r\t\tvalArray _ interpreterProxy firstIndexableField: valOop.\r\t] ifFalse: [\r\t\tval _ interpreterProxy floatValueOf: valOop\r\t].\r\r\t0 to: size - 1 do: [:i |\r\t\tisValVector ifTrue: [\r\t\t\tnewX _ valArray at: i.\r\t\t] ifFalse: [\r\t\t\tnewX _ val.\r\t\t].\r\t\tself scalarXAt: i xArray: xArray headingArray: headingArray value: newX destWidth: destWidth leftEdgeMode: leftEdgeMode rightEdgeMode: rightEdgeMode.\r\t].\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 6.\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 10/23/2004 18:40'!\rturtlesSetY\r\r\t| yArray headingArray valArray val destHeight yOop headingOop valOop topEdgeMode bottomEdgeMode isValVector size newY |\r\tself export: true.\r\tself inline: true.\r\tself var: 'yArray' declareC: 'float *yArray'.\r\tself var: 'headingArray' declareC: 'float *headingArray'.\r\tself var: 'valArray' declareC: 'float *valArray'.\r\tself var: 'val' declareC: 'double val'.\r\tself var: 'destHeight' declareC: 'double destHeight'.\r\tself var: 'newY' declareC: 'double newY'.\r\r\tbottomEdgeMode _ interpreterProxy stackIntegerValue: 0.\r\ttopEdgeMode _ interpreterProxy stackIntegerValue: 1.\r\tdestHeight _ interpreterProxy stackFloatValue: 2.\r\tvalOop _ interpreterProxy stackValue: 3.\r\theadingOop _ interpreterProxy stackValue: 4.\r\tyOop _ interpreterProxy stackValue: 5.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isWords: yOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: headingOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isFloatObject: valOop) ifTrue: [\r\t\tisValVector _ false\r\t] ifFalse: [\r\t\t(interpreterProxy isWords: valOop) ifTrue: [\r\t\t\tisValVector _ true\r\t\t] ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t].\r\r\tsize _ interpreterProxy slotSizeOf: yOop.\r\t(interpreterProxy slotSizeOf: headingOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\tisValVector ifTrue: [\r\t\t(interpreterProxy slotSizeOf: valOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t].\r\r\tyArray _ interpreterProxy firstIndexableField: yOop.\r\theadingArray _ interpreterProxy firstIndexableField: headingOop.\r\tisValVector ifTrue: [\r\t\tvalArray _ interpreterProxy firstIndexableField: valOop.\r\t] ifFalse: [\r\t\tval _ interpreterProxy floatValueOf: valOop\r\t].\r\r\t0 to: size - 1 do: [:i |\r\t\tisValVector ifTrue: [\r\t\t\tnewY _ valArray at: i.\r\t\t] ifFalse: [\r\t\t\tnewY _ val.\r\t\t].\r\t\tself scalarYAt: i yArray: yArray headingArray: headingArray value: newY destHeight: destHeight topEdgeMode: topEdgeMode bottomEdgeMode: bottomEdgeMode.\r\t].\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 6.\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 10/23/2004 19:01'!\rvectorGetAngleTo\r\r\t| x y resultOop yArrayOop xArrayOop pYOop pXOop size isVector result xArray yArray pX pY ppx ppy r |\r\tself export: true.\r\tself inline: true.\r\tself var: 'x' declareC: 'double x'.\r\tself var: 'y' declareC: 'double y'.\r\tself var: 'result' declareC: 'float *result'.\r\tself var: 'xArray' declareC: 'float *xArray'.\r\tself var: 'yArray' declareC: 'float *yArray'.\r\tself var: 'pX' declareC: 'float *pX'.\r\tself var: 'pY' declareC: 'float *pY'.\r\tself var: 'ppx' declareC: 'double ppx'.\r\tself var: 'ppy' declareC: 'double ppy'.\r\r\tresultOop _ interpreterProxy stackValue: 0.\r\tyArrayOop _ interpreterProxy stackValue: 1.\r\txArrayOop _ interpreterProxy stackValue: 2.\r\tpYOop _ interpreterProxy stackValue: 3.\r\tpXOop _ interpreterProxy stackValue: 4.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isWords: resultOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: xArrayOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: yArrayOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\tsize _ interpreterProxy stSizeOf: resultOop.\r\tsize < 0 ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy stSizeOf: xArrayOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy stSizeOf: yArrayOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\t(interpreterProxy isFloatObject: pXOop) ifTrue: [\r\t\t(interpreterProxy isFloatObject: pYOop)\r\t\t\tifTrue: [isVector _ false]\r\t\t\tifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\t] ifFalse: [\r\t\t(interpreterProxy isFloatObject: pYOop)\r\t\t\tifFalse: [isVector _ true]\r\t\t\tifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t].\r\r\tisVector ifTrue: [\r\t\t(interpreterProxy stSizeOf: pXOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t\t(interpreterProxy stSizeOf: pYOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t].\r\r\tresult _ interpreterProxy firstIndexableField: resultOop.\r\txArray _ interpreterProxy firstIndexableField: xArrayOop.\r\tyArray _ interpreterProxy firstIndexableField: yArrayOop.\r\tisVector ifTrue: [\r\t\tpX _ interpreterProxy firstIndexableField: pXOop.\r\t\tpY _ interpreterProxy firstIndexableField: pYOop.\r\t].\r\r\tisVector ifFalse: [\r\t\tppx _ interpreterProxy floatValueOf: pXOop.\r\t\tppy _ interpreterProxy floatValueOf: pYOop.\r\t].\r\r\t0 to: size - 1 do: [:index |\r\t\tisVector ifTrue: [\r\t\t\tppx _ pX at: index.\r\t\t\tppy _ pY at: index.\r\t\t].\r\r\t\tx _ ppx - (xArray at: index).\r\t\ty _ ppy - (yArray at: index).\r\t\tr _ self degreesFromX: x y: y.\r\t\tr _ r + 90.0.\r\t\tr > 360.0 ifTrue: [r _ r - 360.0].\r\r\t\tresult at: index put: r.\r\t].\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 6.\r\tinterpreterProxy push: resultOop.\r\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 10/23/2004 18:20'!\rvectorGetDistanceTo\r\r\t| x y resultOop yArrayOop xArrayOop pYOop pXOop size isVector result xArray yArray pX pY ppx ppy |\r\tself export: true.\r\tself inline: true.\r\tself var: 'x' declareC: 'double x'.\r\tself var: 'y' declareC: 'double y'.\r\tself var: 'result' declareC: 'float *result'.\r\tself var: 'xArray' declareC: 'float *xArray'.\r\tself var: 'yArray' declareC: 'float *yArray'.\r\tself var: 'pX' declareC: 'float *pX'.\r\tself var: 'pY' declareC: 'float *pY'.\r\tself var: 'ppx' declareC: 'double ppx'.\r\tself var: 'ppy' declareC: 'double ppy'.\r\r\tresultOop _ interpreterProxy stackValue: 0.\r\tyArrayOop _ interpreterProxy stackValue: 1.\r\txArrayOop _ interpreterProxy stackValue: 2.\r\tpYOop _ interpreterProxy stackValue: 3.\r\tpXOop _ interpreterProxy stackValue: 4.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isWords: resultOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: xArrayOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: yArrayOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\tsize _ interpreterProxy stSizeOf: resultOop.\r\tsize < 0 ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy stSizeOf: xArrayOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy stSizeOf: yArrayOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\t(interpreterProxy isFloatObject: pXOop) ifTrue: [\r\t\t(interpreterProxy isFloatObject: pYOop)\r\t\t\tifTrue: [isVector _ false]\r\t\t\tifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\t] ifFalse: [\r\t\t(interpreterProxy isFloatObject: pYOop)\r\t\t\tifFalse: [isVector _ true]\r\t\t\tifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t].\r\r\tisVector ifTrue: [\r\t\t(interpreterProxy stSizeOf: pXOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t\t(interpreterProxy stSizeOf: pYOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t].\r\r\tresult _ interpreterProxy firstIndexableField: resultOop.\r\txArray _ interpreterProxy firstIndexableField: xArrayOop.\r\tyArray _ interpreterProxy firstIndexableField: yArrayOop.\r\tisVector ifTrue: [\r\t\tpX _ interpreterProxy firstIndexableField: pXOop.\r\t\tpY _ interpreterProxy firstIndexableField: pYOop.\r\t].\r\r\tisVector ifFalse: [\r\t\tppx _ interpreterProxy floatValueOf: pXOop.\r\t\tppy _ interpreterProxy floatValueOf: pYOop.\r\t].\r\r\t0 to: size - 1 do: [:index |\r\t\tisVector ifTrue: [\r\t\t\tppx _ pX at: index.\r\t\t\tppy _ pY at: index.\r\t\t].\r\r\t\tx _ ppx - (xArray at: index).\r\t\ty _ ppy - (yArray at: index).\r\t\tresult at: index put: ((x * x) + (y * y)) sqrt.\r\t].\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 6.\r\tinterpreterProxy push: resultOop.\r\r! !\r\r!KedamaPlugin methodsFor: 'primitives' stamp: 'yo 6/7/2004 12:02'!\rzoomBitmap\r\r\t| yFactor xFactor sHeight sWidth dst src srcSize dstSize sOrigin dOrigin srcIndex bit dstIndex srcOrigin |\r\r\tself export: true.\r\tself inline: true.\r\tself var: 'sOrigin' declareC: 'unsigned int* sOrigin'.\r\tself var: 'dOrigin' declareC: 'unsigned int* dOrigin'.\r\r\tyFactor _ interpreterProxy stackIntegerValue: 0.\r\txFactor _ interpreterProxy stackIntegerValue: 1.\r\tsHeight _ interpreterProxy stackIntegerValue: 2.\r\tsWidth _ interpreterProxy stackIntegerValue: 3.\r\tdst _ interpreterProxy stackValue: 4.\r\tsrc _ interpreterProxy stackValue: 5.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\tsrcSize _ interpreterProxy slotSizeOf: src.\r\tdstSize _ interpreterProxy slotSizeOf: dst.\r\r\t(sWidth * sHeight) = srcSize ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(srcSize * xFactor * yFactor) = dstSize ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\tsOrigin _ interpreterProxy firstIndexableField: src.\r\tdOrigin _ interpreterProxy firstIndexableField: dst.\r\r\tsrcIndex _ 0.\r\tsrcOrigin _ 0.\r\tdstIndex _ 0.\r\t0 to: sHeight - 1 do: [:sy |\r\t\t0 to: yFactor - 1 do: [:y |\r\t\t\t0 to: sWidth - 1 do: [:sx |\r\t\t\t\tbit _ sOrigin at: srcIndex.\r\t\t\t\tsrcIndex _ srcIndex + 1.\r\t\t\t\t0 to: xFactor - 1 do: [:dummy |\r\t\t\t\t\tdOrigin at: dstIndex put: bit.\r\t\t\t\t\tdstIndex _ dstIndex + 1.\r\t\t\t\t].\r\t\t\t].\r\t\t\tsrcIndex _ srcOrigin.\r\t\t].\r\t\tsrcOrigin _ srcOrigin + sWidth.\r\t\tsrcIndex _ srcOrigin.\r\t].\r\r\tinterpreterProxy pop: 6.\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rKedamaPlugin class\r\tinstanceVariableNames: ''!\r\r!KedamaPlugin class methodsFor: 'as yet unclassified' stamp: 'yo 3/7/2005 14:30'!\rdeclareCVarsIn: cg\r\r\tcg var: #kedamaRandomSeed type: 'unsigned int'.\r\tcg var: #randA type: 'unsigned int'.\r\tcg var: #randM type: 'unsigned int'.\r\tcg var: #randQ type: 'unsigned int'.\r\tcg var: #randR type: 'unsigned int'.\r! !\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/KedamaPlugin2/English.lproj/InfoPlist.strings",
    "content": "/* Localized versions of Info.plist keys */\n\nCFBundleName = \"KedamaPlugin2\";\nCFBundleShortVersionString = \"KedamaPlugin2 version 1.0.0\";\nCFBundleGetInfoString = \"KedamaPlugin2 version 1.0.0\";\nNSHumanReadableCopyright = \"http://www.squeak.org\";\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/KedamaPlugin2/Info-KedamaPlugin__Upgraded_.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>KedamaPlugin2</string>\n\t<key>CFBundleGetInfoString</key>\n\t<string>KedamaPlugin2 V1.0.0 for Squeak, see http://www.squeak.org</string>\n\t<key>CFBundleIconFile</key>\n\t<string>SqueakPlugin.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.KedamaPlugin2</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>KedamaPlugin2 V1.0.0 for Squeak</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0.0</string>\n\t<key>CFBundleSignature</key>\n\t<string>FAST</string>\n\t<key>CFBundleVersion</key>\n\t<string>1.0.0</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/KedamaPlugin2/KedamaPlugin2.st",
    "content": "'From Squeakland 3.8-05 of 7 September 2005 [latest update: #494] on 8 May 2007 at 9:50:18 am'!\rInterpreterPlugin subclass: #KedamaPlugin2\r\tinstanceVariableNames: 'kedamaRandomSeed randA randM randQ randR'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'EToys-StarSqueak'!\r\r!KedamaPlugin2 methodsFor: 'predicated array primitive' stamp: 'yo 1/19/2006 16:16'!\rprimitivePredicateAtAllPutBoolean\r\r\t| rcvrOop valOop val valuesOop values predicatesOop predicates |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #values declareC: 'unsigned char *values'.\r\tself var: #predicates declareC: 'unsigned char *predicates'.\r\r\tvalOop _ interpreterProxy stackValue: 0.\r\trcvrOop _ interpreterProxy stackObjectValue: 1.\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isIntegerValue: valOop) ifTrue: [\r\t\tval _ interpreterProxy integerValueOf: valOop.\r\t] ifFalse: [\r\t\tval _ interpreterProxy booleanValueOf: valOop.\r\t].\r\r\tvaluesOop _ interpreterProxy fetchPointer: 1 ofObject: rcvrOop.\r\tpredicatesOop _ interpreterProxy fetchPointer: 0 ofObject: rcvrOop.\r\tinterpreterProxy failed ifTrue: [^ nil].\r\t(interpreterProxy isBytes: predicatesOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isBytes: valuesOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\tvalues _ interpreterProxy firstIndexableField: valuesOop.\r\tpredicates _ interpreterProxy firstIndexableField: predicatesOop.\r\t\r\t0 to: (interpreterProxy stSizeOf: valuesOop) - 1 do:[:i |\r\t\t(predicates at: i) = 1 ifTrue: [\r\t\t\tvalues at: i put: val\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 1.\r! !\r\r!KedamaPlugin2 methodsFor: 'predicated array primitive' stamp: 'yo 10/13/2005 23:35'!\rprimitivePredicateAtAllPutColor\r\r\t| rcvrOop val valuesOop values predicatesOop predicates |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #values declareC: 'unsigned int *values'.\r\tself var: #val declareC: 'unsigned int val'.\r\tself var: #predicates declareC: 'unsigned char *predicates'.\r\r\tval _ interpreterProxy stackIntegerValue: 0.\r\trcvrOop _ interpreterProxy stackObjectValue: 1.\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\tval _ val bitOr: 16rFF000000.\r\r\tvaluesOop _ interpreterProxy fetchPointer: 1 ofObject: rcvrOop.\r\tpredicatesOop _ interpreterProxy fetchPointer: 0 ofObject: rcvrOop.\r\tinterpreterProxy failed ifTrue: [^ nil].\r\t(interpreterProxy isBytes: predicatesOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: valuesOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\tvalues _ interpreterProxy firstIndexableField: valuesOop.\r\tpredicates _ interpreterProxy firstIndexableField: predicatesOop.\r\t\r\t0 to: (interpreterProxy stSizeOf: valuesOop) - 1 do:[:i |\r\t\t(predicates at: i) = 1 ifTrue: [\r\t\t\tvalues at: i put: val\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 1.\r! !\r\r!KedamaPlugin2 methodsFor: 'predicated array primitive' stamp: 'yo 10/13/2005 23:36'!\rprimitivePredicateAtAllPutNumber\r\r\t| rcvrOop val valuesOop values predicatesOop predicates |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #values declareC: 'float *values'.\r\tself var: #val declareC: 'float val'.\r\tself var: #predicates declareC: 'unsigned char *predicates'.\r\r\tval _ interpreterProxy stackFloatValue: 0.\r\trcvrOop _ interpreterProxy stackObjectValue: 1.\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\tvaluesOop _ interpreterProxy fetchPointer: 1 ofObject: rcvrOop.\r\tpredicatesOop _ interpreterProxy fetchPointer: 0 ofObject: rcvrOop.\r\tinterpreterProxy failed ifTrue: [^ nil].\r\t(interpreterProxy isBytes: predicatesOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: valuesOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\tvalues _ interpreterProxy firstIndexableField: valuesOop.\r\tpredicates _ interpreterProxy firstIndexableField: predicatesOop.\r\t\r\t0 to: (interpreterProxy stSizeOf: valuesOop) - 1 do:[:i |\r\t\t(predicates at: i) = 1 ifTrue: [\r\t\t\tvalues at: i put: val\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 1.\r! !\r\r!KedamaPlugin2 methodsFor: 'predicated array primitive' stamp: 'yo 10/13/2005 23:33'!\rprimitivePredicateAtAllPutObject\r\r\t| rcvrOop valOop valuesOop values predicatesOop predicates |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #values declareC: 'int *values'.\r\tself var: #predicates declareC: 'unsigned char *predicates'.\r\r\tvalOop _ interpreterProxy stackValue: 0.\r\trcvrOop _ interpreterProxy stackObjectValue: 1.\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\tvaluesOop _ interpreterProxy fetchPointer: 1 ofObject: rcvrOop.\r\tpredicatesOop _ interpreterProxy fetchPointer: 0 ofObject: rcvrOop.\r\tinterpreterProxy failed ifTrue: [^ nil].\r\t(interpreterProxy isBytes: predicatesOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isPointers: valuesOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\tvalues _ interpreterProxy firstIndexableField: valuesOop.\r\tpredicates _ interpreterProxy firstIndexableField: predicatesOop.\r\t\r\t0 to: (interpreterProxy stSizeOf: valuesOop) - 1 do:[:i |\r\t\t(predicates at: i) = 1 ifTrue: [\r\t\t\tvalues at: i put: valOop\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 1.\r! !\r\r!KedamaPlugin2 methodsFor: 'predicated array primitive' stamp: 'yo 10/14/2005 00:02'!\rprimitivePredicateReplaceBytes\r\r\t| rcvrOop valuesOop values predicatesOop predicates repStart repOop stop start replacement valuesSize predicatesSize replacementSize |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #values declareC: 'unsigned char *values'.\r\tself var: #predicates declareC: 'unsigned char *predicates'.\r\tself var: #replacement declareC: 'unsigned char *replacement'.\r\r\trepStart _ interpreterProxy stackIntegerValue: 0.\r\trepOop _ interpreterProxy stackObjectValue: 1.\r\tstop _ interpreterProxy stackIntegerValue: 2.\r\tstart _ interpreterProxy stackIntegerValue: 3.\r\trcvrOop _ interpreterProxy stackObjectValue: 4.\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\tvaluesOop _ interpreterProxy fetchPointer: 1 ofObject: rcvrOop.\r\tpredicatesOop _ interpreterProxy fetchPointer: 0 ofObject: rcvrOop.\r\tinterpreterProxy failed ifTrue: [^ nil].\r\t(interpreterProxy isBytes: predicatesOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t((interpreterProxy isBytes: valuesOop) and: [interpreterProxy isBytes: repOop])\r\t\tifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\tvalues _ interpreterProxy firstIndexableField: valuesOop.\r\tpredicates _ interpreterProxy firstIndexableField: predicatesOop.\r\treplacement _ interpreterProxy firstIndexableField: repOop.\r\tvaluesSize _ interpreterProxy stSizeOf: valuesOop.\r\tpredicatesSize _ interpreterProxy stSizeOf: predicatesOop.\r\treplacementSize _ interpreterProxy stSizeOf: repOop.\r\r\tstart > stop ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\tstart < 1 ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\tstart > valuesSize ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\tstart > predicatesSize ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\tstop > valuesSize ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\tstop > predicatesSize ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\trepStart < 1 ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\trepStart > replacementSize ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t(replacementSize - repStart + 1) < (stop - start + 1) ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t\r\tstart - 1 to: stop - 1 do: [:i |\r\t\t(predicates at: i) = 1 ifTrue: [\r\t\t\tvalues at: i put: (replacement at: repStart + i - start).\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 4.\r! !\r\r!KedamaPlugin2 methodsFor: 'predicated array primitive' stamp: 'yo 1/20/2006 12:01'!\rprimitivePredicateReplaceWords\r\r\t| rcvrOop valuesOop values predicatesOop predicates repStart repOop stop start replacement valuesSize predicatesSize replacementSize vIsFloat rIsFloat floatValues floatReplacement fv |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #values declareC: 'unsigned int *values'.\r\tself var: #floatValues declareC: 'float *floatValues'.\r\tself var: #predicates declareC: 'unsigned char *predicates'.\r\tself var: #replacement declareC: 'unsigned int *replacement'.\r\tself var: #floatReplacement declareC: 'float *floatReplacement'.\r\tself var: #fv declareC: 'unsigned int fv'.\r\r\trepStart _ interpreterProxy stackIntegerValue: 0.\r\trepOop _ interpreterProxy stackObjectValue: 1.\r\tstop _ interpreterProxy stackIntegerValue: 2.\r\tstart _ interpreterProxy stackIntegerValue: 3.\r\trcvrOop _ interpreterProxy stackObjectValue: 4.\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\tvaluesOop _ interpreterProxy fetchPointer: 1 ofObject: rcvrOop.\r\tpredicatesOop _ interpreterProxy fetchPointer: 0 ofObject: rcvrOop.\r\tinterpreterProxy failed ifTrue: [^ nil].\r\t(interpreterProxy isBytes: predicatesOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(((interpreterProxy isWords: valuesOop) and: [interpreterProxy isWords: repOop]) or: [\r\t\t(interpreterProxy isPointers: valuesOop) and: [interpreterProxy isPointers: repOop]]) \r\t\t\tifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\tpredicates _ interpreterProxy firstIndexableField: predicatesOop.\r\tvaluesSize _ interpreterProxy stSizeOf: valuesOop.\r\tpredicatesSize _ interpreterProxy stSizeOf: predicatesOop.\r\treplacementSize _ interpreterProxy stSizeOf: repOop.\r\r\tstart > stop ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\tstart < 1 ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\tstart > valuesSize ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\tstart > predicatesSize ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\tstop > valuesSize ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\tstop > predicatesSize ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\trepStart < 1 ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\trepStart > replacementSize ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t(replacementSize - repStart + 1) < (stop - start + 1) ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\tvIsFloat _ interpreterProxy is: valuesOop MemberOf: 'KedamaFloatArray'.\r\trIsFloat _ interpreterProxy is: repOop MemberOf: 'KedamaFloatArray'.\r\t(vIsFloat and: [rIsFloat]) ifTrue: [\r\t\tfloatValues _ interpreterProxy firstIndexableField: valuesOop.\r\t\tfloatReplacement _  interpreterProxy firstIndexableField: repOop.\r\t\tstart - 1 to: stop - 1 do: [:i |\r\t\t\t(predicates at: i) = 1 ifTrue: [\r\t\t\t\tfloatValues at: i put: (floatReplacement at: repStart + i - start).\r\t\t\t].\r\t\t].\r\t].\r\t(vIsFloat and: [rIsFloat not]) ifTrue: [\r\t\tfloatValues _ interpreterProxy firstIndexableField: valuesOop.\r\t\treplacement _  interpreterProxy firstIndexableField: repOop.\r\t\tstart - 1 to: stop - 1 do: [:i |\r\t\t\t(predicates at: i) = 1 ifTrue: [\r\t\t\t\tfloatValues at: i put: (replacement at: repStart + i - start).\r\t\t\t].\r\t\t].\r\t].\r\t(vIsFloat not and: [rIsFloat]) ifTrue: [\r\t\tvalues _ interpreterProxy firstIndexableField: valuesOop.\r\t\tfloatReplacement _  interpreterProxy firstIndexableField: repOop.\r\t\tstart - 1 to: stop - 1 do: [:i |\r\t\t\t(predicates at: i) = 1 ifTrue: [\r\t\t\t\tfv _ self cCoerce: (floatReplacement at: repStart + i - start) to: 'unsigned int'.\r\t\t\t\tself cCode: '' inSmalltalk: [fv _ fv asInteger].\r\t\t\t\tvalues at: i put: fv.\r\t\t\t].\r\t\t].\r\t].\r\t(vIsFloat not and: [rIsFloat not]) ifTrue: [\r\t\tvalues _ interpreterProxy firstIndexableField: valuesOop.\r\t\treplacement _  interpreterProxy firstIndexableField: repOop.\r\t\tstart - 1 to: stop - 1 do: [:i |\r\t\t\t(predicates at: i) = 1 ifTrue: [\r\t\t\t\tvalues at: i put: (replacement at: repStart + i - start).\r\t\t\t].\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 4.\r! !\r\r\r!KedamaPlugin2 methodsFor: 'array arithmetic' stamp: 'yo 10/13/2005 01:28'!\rprimitiveAddArrays\r\r\t| length resultOop argOop rcvrOop isArgWords isRcvrWords wordsRcvr wordsArg wordsResult floatsArg floatsResult floatsRcvr |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #wordsRcvr declareC: 'unsigned int *wordsRcvr'.\r\tself var: #wordsArg declareC: 'unsigned int *wordsArg'.\r\tself var: #wordsResult declareC: 'unsigned int *wordsResult'.\r\tself var: #floatsRcvr declareC: 'float *floatsRcvr'.\r\tself var: #floatsArg declareC: 'float *floatsArg'.\r\tself var: #floatsResult declareC: 'float *floatsResult'.\r\r\tresultOop _ interpreterProxy stackObjectValue: 0.\r\targOop _ interpreterProxy stackObjectValue: 1.\r\trcvrOop _ interpreterProxy stackObjectValue: 2.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isWords: argOop).\r\tinterpreterProxy success: (interpreterProxy isWords: rcvrOop).\r\tinterpreterProxy success: (interpreterProxy isWords: resultOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ interpreterProxy stSizeOf: argOop.\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: rcvrOop)).\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: resultOop)).\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tisArgWords _ interpreterProxy is: argOop MemberOf: 'WordArray'.\r\tisRcvrWords _ interpreterProxy is: rcvrOop MemberOf: 'WordArray'.\r\r\tisArgWords & isRcvrWords ifTrue: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'WordArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t] ifFalse: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'KedamaFloatArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t].\r\r\tisRcvrWords ifTrue: [\r\t\tisArgWords ifTrue: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\twordsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\twordsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\twordsResult at: i put: (wordsRcvr at: i) + (wordsArg at: i).\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (wordsRcvr at: i) + (floatsArg at: i).\r\t\t\t].\r\t\t].\r\t] ifFalse: [\r\t\tisArgWords ifTrue: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\twordsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (floatsRcvr at: i) + (wordsArg at: i).\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (floatsRcvr at: i) + (floatsArg at: i).\r\t\t\t].\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 4.\r\tinterpreterProxy push: resultOop.\r! !\r\r!KedamaPlugin2 methodsFor: 'array arithmetic' stamp: 'yo 10/13/2005 01:28'!\rprimitiveAddScalar\r\r\t| length resultOop argOop rcvrOop isRcvrWords wordsRcvr wordsResult floatsResult floatsRcvr isArgInt intArg floatArg |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #wordsRcvr declareC: 'unsigned int *wordsRcvr'.\r\tself var: #intArg declareC: 'int intArg'.\r\tself var: #wordsResult declareC: 'unsigned int *wordsResult'.\r\tself var: #floatsRcvr declareC: 'float *floatsRcvr'.\r\tself var: #floatArg declareC: 'double floatArg'.\r\tself var: #floatsResult declareC: 'float *floatsResult'.\r\r\tresultOop _ interpreterProxy stackObjectValue: 0.\r\targOop _ interpreterProxy stackValue: 1.\r\trcvrOop _ interpreterProxy stackObjectValue: 2.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isWords: rcvrOop).\r\tinterpreterProxy success: (interpreterProxy isWords: resultOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ interpreterProxy stSizeOf: rcvrOop.\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: resultOop)).\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tisArgInt _ interpreterProxy isIntegerObject: argOop.\r\tisRcvrWords _ interpreterProxy is: rcvrOop MemberOf: 'WordArray'.\r\r\tisArgInt & isRcvrWords ifTrue: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'WordArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t] ifFalse: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'KedamaFloatArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t].\r\r\tisRcvrWords ifTrue: [\r\t\tisArgInt ifTrue: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tintArg _ interpreterProxy integerValueOf: argOop.\r\t\t\twordsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\twordsResult at: i put: (wordsRcvr at: i) + intArg.\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatArg _ interpreterProxy floatValueOf: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (wordsRcvr at: i) + floatArg.\r\t\t\t].\r\t\t].\r\t] ifFalse: [\r\t\tisArgInt ifTrue: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tintArg _ interpreterProxy integerValueOf: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (floatsRcvr at: i) + intArg.\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatArg _ interpreterProxy floatValueOf: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (floatsRcvr at: i) + floatArg.\r\t\t\t].\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 4.\r\tinterpreterProxy push: resultOop.\r! !\r\r!KedamaPlugin2 methodsFor: 'array arithmetic' stamp: 'yo 1/19/2006 20:20'!\rprimitiveAndByteArray\r\r\t| length rcvrOop otherOop otherArray rcvrArray length1 length2 |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #rcvrArray declareC: 'unsigned char *rcvrArray'.\r\tself var: #otherArray declareC: 'unsigned char *otherArray'.\r\r\totherOop _ interpreterProxy stackObjectValue: 0.\r\trcvrOop _ interpreterProxy stackValue: 1.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isBytes: rcvrOop).\r\tinterpreterProxy success: (interpreterProxy isBytes: otherOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength1 _ interpreterProxy stSizeOf: rcvrOop.\r\tlength2 _ interpreterProxy stSizeOf: otherOop.\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ length1.\r\tlength1 > length2 ifTrue: [\r\t\tlength _ length2.\r\t].\r\r\totherArray _ interpreterProxy firstIndexableField: otherOop.\r\trcvrArray _ interpreterProxy firstIndexableField: rcvrOop.\r\t0 to: length-1 do:[:i|\r\t\trcvrArray at: i put: (((rcvrArray at: i) + (otherArray at: i)) = 2).\r\t].\r\tinterpreterProxy pop: 1.\r! !\r\r!KedamaPlugin2 methodsFor: 'array arithmetic' stamp: 'yo 10/13/2005 01:28'!\rprimitiveDivArrays\r\r\t| length resultOop argOop rcvrOop isArgWords isRcvrWords wordsRcvr wordsArg wordsResult floatsArg floatsResult floatsRcvr |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #wordsRcvr declareC: 'unsigned int *wordsRcvr'.\r\tself var: #wordsArg declareC: 'unsigned int *wordsArg'.\r\tself var: #wordsResult declareC: 'unsigned int *wordsResult'.\r\tself var: #floatsRcvr declareC: 'float *floatsRcvr'.\r\tself var: #floatsArg declareC: 'float *floatsArg'.\r\tself var: #floatsResult declareC: 'float *floatsResult'.\r\r\tresultOop _ interpreterProxy stackObjectValue: 0.\r\targOop _ interpreterProxy stackObjectValue: 1.\r\trcvrOop _ interpreterProxy stackObjectValue: 2.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isWords: argOop).\r\tinterpreterProxy success: (interpreterProxy isWords: rcvrOop).\r\tinterpreterProxy success: (interpreterProxy isWords: resultOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ interpreterProxy stSizeOf: argOop.\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: rcvrOop)).\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: resultOop)).\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tisArgWords _ interpreterProxy is: argOop MemberOf: 'WordArray'.\r\tisRcvrWords _ interpreterProxy is: rcvrOop MemberOf: 'WordArray'.\r\r\tisArgWords & isRcvrWords ifTrue: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'WordArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t] ifFalse: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'KedamaFloatArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t].\r\r\tisRcvrWords ifTrue: [\r\t\tisArgWords ifTrue: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\twordsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\twordsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\twordsResult at: i put: (wordsRcvr at: i) / (wordsArg at: i).\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (wordsRcvr at: i) / (floatsArg at: i).\r\t\t\t].\r\t\t].\r\t] ifFalse: [\r\t\tisArgWords ifTrue: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\twordsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (floatsRcvr at: i) / (wordsArg at: i).\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (floatsRcvr at: i) / (floatsArg at: i).\r\t\t\t].\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 4.\r\tinterpreterProxy push: resultOop.\r! !\r\r!KedamaPlugin2 methodsFor: 'array arithmetic' stamp: 'yo 10/13/2005 01:28'!\rprimitiveDivScalar\r\r\t| length resultOop argOop rcvrOop isRcvrWords wordsRcvr wordsResult floatsResult floatsRcvr isArgInt intArg floatArg |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #wordsRcvr declareC: 'unsigned int *wordsRcvr'.\r\tself var: #intArg declareC: 'int intArg'.\r\tself var: #wordsResult declareC: 'unsigned int *wordsResult'.\r\tself var: #floatsRcvr declareC: 'float *floatsRcvr'.\r\tself var: #floatArg declareC: 'double floatArg'.\r\tself var: #floatsResult declareC: 'float *floatsResult'.\r\r\tresultOop _ interpreterProxy stackObjectValue: 0.\r\targOop _ interpreterProxy stackValue: 1.\r\trcvrOop _ interpreterProxy stackObjectValue: 2.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isWords: rcvrOop).\r\tinterpreterProxy success: (interpreterProxy isWords: resultOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ interpreterProxy stSizeOf: rcvrOop.\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: resultOop)).\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tisArgInt _ interpreterProxy isIntegerObject: argOop.\r\tisRcvrWords _ interpreterProxy is: rcvrOop MemberOf: 'WordArray'.\r\r\tisArgInt & isRcvrWords ifTrue: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'WordArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t] ifFalse: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'KedamaFloatArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t].\r\r\tisRcvrWords ifTrue: [\r\t\tisArgInt ifTrue: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tintArg _ interpreterProxy integerValueOf: argOop.\r\t\t\twordsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\twordsResult at: i put: (wordsRcvr at: i) // intArg.\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatArg _ interpreterProxy floatValueOf: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (wordsRcvr at: i) / floatArg.\r\t\t\t].\r\t\t].\r\t] ifFalse: [\r\t\tisArgInt ifTrue: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tintArg _ interpreterProxy integerValueOf: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (floatsRcvr at: i) / intArg.\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatArg _ interpreterProxy floatValueOf: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (floatsRcvr at: i) / floatArg.\r\t\t\t].\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 4.\r\tinterpreterProxy push: resultOop.\r! !\r\r!KedamaPlugin2 methodsFor: 'array arithmetic' stamp: 'yo 10/13/2005 20:58'!\rprimitiveEQArrays\r\r\t| length resultOop argOop rcvrOop isArgWords isRcvrWords wordsRcvr wordsArg floatsArg floatsRcvr bytesResult |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #wordsRcvr declareC: 'unsigned int *wordsRcvr'.\r\tself var: #wordsArg declareC: 'unsigned int *wordsArg'.\r\tself var: #bytesResult declareC: 'unsigned char *bytesResult'.\r\tself var: #floatsRcvr declareC: 'float *floatsRcvr'.\r\tself var: #floatsArg declareC: 'float *floatsArg'.\r\r\tresultOop _ interpreterProxy stackObjectValue: 0.\r\targOop _ interpreterProxy stackObjectValue: 1.\r\trcvrOop _ interpreterProxy stackObjectValue: 2.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isWords: argOop).\r\tinterpreterProxy success: (interpreterProxy isWords: rcvrOop).\r\tinterpreterProxy success: (interpreterProxy isBytes: resultOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ interpreterProxy stSizeOf: argOop.\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: rcvrOop)).\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: resultOop)).\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tisArgWords _ interpreterProxy is: argOop MemberOf: 'WordArray'.\r\tisRcvrWords _ interpreterProxy is: rcvrOop MemberOf: 'WordArray'.\r\r\tisRcvrWords ifTrue: [\r\t\tisArgWords ifTrue: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\twordsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (wordsRcvr at: i) = (wordsArg at: i).\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (wordsRcvr at: i) = (floatsArg at: i).\r\t\t\t].\r\t\t].\r\t] ifFalse: [\r\t\tisArgWords ifTrue: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\twordsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (floatsRcvr at: i) = (wordsArg at: i).\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (floatsRcvr at: i) = (floatsArg at: i).\r\t\t\t].\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 4.\r\tinterpreterProxy push: resultOop.\r! !\r\r!KedamaPlugin2 methodsFor: 'array arithmetic' stamp: 'yo 10/13/2005 20:58'!\rprimitiveEQScalar\r\r\t| length resultOop argOop rcvrOop isRcvrWords wordsRcvr floatsRcvr isArgInt intArg floatArg bytesResult |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #wordsRcvr declareC: 'unsigned int *wordsRcvr'.\r\tself var: #intArg declareC: 'int intArg'.\r\tself var: #bytesResult declareC: 'unsigned char *bytesResult'.\r\tself var: #floatsRcvr declareC: 'float *floatsRcvr'.\r\tself var: #floatArg declareC: 'double floatArg'.\r\r\tresultOop _ interpreterProxy stackObjectValue: 0.\r\targOop _ interpreterProxy stackValue: 1.\r\trcvrOop _ interpreterProxy stackObjectValue: 2.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isWords: rcvrOop).\r\tinterpreterProxy success: (interpreterProxy isBytes: resultOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ interpreterProxy stSizeOf: rcvrOop.\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: resultOop)).\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tisArgInt _ interpreterProxy isIntegerObject: argOop.\r\tisRcvrWords _ interpreterProxy is: rcvrOop MemberOf: 'WordArray'.\r\r\tisRcvrWords ifTrue: [\r\t\tisArgInt ifTrue: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tintArg _ interpreterProxy integerValueOf: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (wordsRcvr at: i) = intArg.\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatArg _ interpreterProxy floatValueOf: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (wordsRcvr at: i) = floatArg.\r\t\t\t].\r\t\t].\r\t] ifFalse: [\r\t\tisArgInt ifTrue: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tintArg _ interpreterProxy integerValueOf: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (floatsRcvr at: i) = intArg.\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatArg _ interpreterProxy floatValueOf: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (floatsRcvr at: i) = floatArg.\r\t\t\t].\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 4.\r\tinterpreterProxy push: resultOop.\r! !\r\r!KedamaPlugin2 methodsFor: 'array arithmetic' stamp: 'yo 10/13/2005 21:05'!\rprimitiveGEArrays\r\r\t| length resultOop argOop rcvrOop isArgWords isRcvrWords wordsRcvr wordsArg floatsArg floatsRcvr bytesResult |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #wordsRcvr declareC: 'unsigned int *wordsRcvr'.\r\tself var: #wordsArg declareC: 'unsigned int *wordsArg'.\r\tself var: #bytesResult declareC: 'unsigned char *bytesResult'.\r\tself var: #floatsRcvr declareC: 'float *floatsRcvr'.\r\tself var: #floatsArg declareC: 'float *floatsArg'.\r\r\tresultOop _ interpreterProxy stackObjectValue: 0.\r\targOop _ interpreterProxy stackObjectValue: 1.\r\trcvrOop _ interpreterProxy stackObjectValue: 2.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isWords: argOop).\r\tinterpreterProxy success: (interpreterProxy isWords: rcvrOop).\r\tinterpreterProxy success: (interpreterProxy isBytes: resultOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ interpreterProxy stSizeOf: argOop.\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: rcvrOop)).\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: resultOop)).\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tisArgWords _ interpreterProxy is: argOop MemberOf: 'WordArray'.\r\tisRcvrWords _ interpreterProxy is: rcvrOop MemberOf: 'WordArray'.\r\r\tisRcvrWords ifTrue: [\r\t\tisArgWords ifTrue: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\twordsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (wordsRcvr at: i) >= (wordsArg at: i).\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (wordsRcvr at: i) >= (floatsArg at: i).\r\t\t\t].\r\t\t].\r\t] ifFalse: [\r\t\tisArgWords ifTrue: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\twordsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (floatsRcvr at: i) >= (wordsArg at: i).\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (floatsRcvr at: i) >= (floatsArg at: i).\r\t\t\t].\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 4.\r\tinterpreterProxy push: resultOop.\r! !\r\r!KedamaPlugin2 methodsFor: 'array arithmetic' stamp: 'yo 10/13/2005 21:06'!\rprimitiveGEScalar\r\r\t| length resultOop argOop rcvrOop isRcvrWords wordsRcvr floatsRcvr isArgInt intArg floatArg bytesResult |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #wordsRcvr declareC: 'unsigned int *wordsRcvr'.\r\tself var: #intArg declareC: 'int intArg'.\r\tself var: #bytesResult declareC: 'unsigned char *bytesResult'.\r\tself var: #floatsRcvr declareC: 'float *floatsRcvr'.\r\tself var: #floatArg declareC: 'double floatArg'.\r\r\tresultOop _ interpreterProxy stackObjectValue: 0.\r\targOop _ interpreterProxy stackValue: 1.\r\trcvrOop _ interpreterProxy stackObjectValue: 2.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isWords: rcvrOop).\r\tinterpreterProxy success: (interpreterProxy isBytes: resultOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ interpreterProxy stSizeOf: rcvrOop.\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: resultOop)).\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tisArgInt _ interpreterProxy isIntegerObject: argOop.\r\tisRcvrWords _ interpreterProxy is: rcvrOop MemberOf: 'WordArray'.\r\r\tisRcvrWords ifTrue: [\r\t\tisArgInt ifTrue: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tintArg _ interpreterProxy integerValueOf: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (wordsRcvr at: i) >= intArg.\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatArg _ interpreterProxy floatValueOf: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (wordsRcvr at: i) >= floatArg.\r\t\t\t].\r\t\t].\r\t] ifFalse: [\r\t\tisArgInt ifTrue: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tintArg _ interpreterProxy integerValueOf: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (floatsRcvr at: i) >= intArg.\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatArg _ interpreterProxy floatValueOf: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (floatsRcvr at: i) >= floatArg.\r\t\t\t].\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 4.\r\tinterpreterProxy push: resultOop.\r! !\r\r!KedamaPlugin2 methodsFor: 'array arithmetic' stamp: 'yo 10/13/2005 21:05'!\rprimitiveGTArrays\r\r\t| length resultOop argOop rcvrOop isArgWords isRcvrWords wordsRcvr wordsArg floatsArg floatsRcvr bytesResult |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #wordsRcvr declareC: 'unsigned int *wordsRcvr'.\r\tself var: #wordsArg declareC: 'unsigned int *wordsArg'.\r\tself var: #bytesResult declareC: 'unsigned char *bytesResult'.\r\tself var: #floatsRcvr declareC: 'float *floatsRcvr'.\r\tself var: #floatsArg declareC: 'float *floatsArg'.\r\r\tresultOop _ interpreterProxy stackObjectValue: 0.\r\targOop _ interpreterProxy stackObjectValue: 1.\r\trcvrOop _ interpreterProxy stackObjectValue: 2.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isWords: argOop).\r\tinterpreterProxy success: (interpreterProxy isWords: rcvrOop).\r\tinterpreterProxy success: (interpreterProxy isBytes: resultOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ interpreterProxy stSizeOf: argOop.\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: rcvrOop)).\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: resultOop)).\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tisArgWords _ interpreterProxy is: argOop MemberOf: 'WordArray'.\r\tisRcvrWords _ interpreterProxy is: rcvrOop MemberOf: 'WordArray'.\r\r\tisRcvrWords ifTrue: [\r\t\tisArgWords ifTrue: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\twordsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (wordsRcvr at: i) > (wordsArg at: i).\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (wordsRcvr at: i) > (floatsArg at: i).\r\t\t\t].\r\t\t].\r\t] ifFalse: [\r\t\tisArgWords ifTrue: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\twordsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (floatsRcvr at: i) > (wordsArg at: i).\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (floatsRcvr at: i) > (floatsArg at: i).\r\t\t\t].\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 4.\r\tinterpreterProxy push: resultOop.\r! !\r\r!KedamaPlugin2 methodsFor: 'array arithmetic' stamp: 'yo 10/13/2005 21:04'!\rprimitiveGTScalar\r\r\t| length resultOop argOop rcvrOop isRcvrWords wordsRcvr floatsRcvr isArgInt intArg floatArg bytesResult |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #wordsRcvr declareC: 'unsigned int *wordsRcvr'.\r\tself var: #intArg declareC: 'int intArg'.\r\tself var: #bytesResult declareC: 'unsigned char *bytesResult'.\r\tself var: #floatsRcvr declareC: 'float *floatsRcvr'.\r\tself var: #floatArg declareC: 'double floatArg'.\r\r\tresultOop _ interpreterProxy stackObjectValue: 0.\r\targOop _ interpreterProxy stackValue: 1.\r\trcvrOop _ interpreterProxy stackObjectValue: 2.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isWords: rcvrOop).\r\tinterpreterProxy success: (interpreterProxy isBytes: resultOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ interpreterProxy stSizeOf: rcvrOop.\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: resultOop)).\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tisArgInt _ interpreterProxy isIntegerObject: argOop.\r\tisRcvrWords _ interpreterProxy is: rcvrOop MemberOf: 'WordArray'.\r\r\tisRcvrWords ifTrue: [\r\t\tisArgInt ifTrue: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tintArg _ interpreterProxy integerValueOf: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (wordsRcvr at: i) > intArg.\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatArg _ interpreterProxy floatValueOf: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (wordsRcvr at: i) > floatArg.\r\t\t\t].\r\t\t].\r\t] ifFalse: [\r\t\tisArgInt ifTrue: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tintArg _ interpreterProxy integerValueOf: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (floatsRcvr at: i) > intArg.\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatArg _ interpreterProxy floatValueOf: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (floatsRcvr at: i) > floatArg.\r\t\t\t].\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 4.\r\tinterpreterProxy push: resultOop.\r! !\r\r!KedamaPlugin2 methodsFor: 'array arithmetic' stamp: 'yo 10/13/2005 20:49'!\rprimitiveLEArrays\r\r\t| length resultOop argOop rcvrOop isArgWords isRcvrWords wordsRcvr wordsArg floatsArg floatsRcvr bytesResult |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #wordsRcvr declareC: 'unsigned int *wordsRcvr'.\r\tself var: #wordsArg declareC: 'unsigned int *wordsArg'.\r\tself var: #bytesResult declareC: 'unsigned char *bytesResult'.\r\tself var: #floatsRcvr declareC: 'float *floatsRcvr'.\r\tself var: #floatsArg declareC: 'float *floatsArg'.\r\r\tresultOop _ interpreterProxy stackObjectValue: 0.\r\targOop _ interpreterProxy stackObjectValue: 1.\r\trcvrOop _ interpreterProxy stackObjectValue: 2.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isWords: argOop).\r\tinterpreterProxy success: (interpreterProxy isWords: rcvrOop).\r\tinterpreterProxy success: (interpreterProxy isBytes: resultOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ interpreterProxy stSizeOf: argOop.\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: rcvrOop)).\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: resultOop)).\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tisArgWords _ interpreterProxy is: argOop MemberOf: 'WordArray'.\r\tisRcvrWords _ interpreterProxy is: rcvrOop MemberOf: 'WordArray'.\r\r\tisRcvrWords ifTrue: [\r\t\tisArgWords ifTrue: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\twordsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (wordsRcvr at: i) <= (wordsArg at: i).\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (wordsRcvr at: i) <= (floatsArg at: i).\r\t\t\t].\r\t\t].\r\t] ifFalse: [\r\t\tisArgWords ifTrue: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\twordsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (floatsRcvr at: i) <= (wordsArg at: i).\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (floatsRcvr at: i) <= (floatsArg at: i).\r\t\t\t].\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 4.\r\tinterpreterProxy push: resultOop.\r! !\r\r!KedamaPlugin2 methodsFor: 'array arithmetic' stamp: 'yo 10/13/2005 20:49'!\rprimitiveLEScalar\r\r\t| length resultOop argOop rcvrOop isRcvrWords wordsRcvr floatsRcvr isArgInt intArg floatArg bytesResult |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #wordsRcvr declareC: 'unsigned int *wordsRcvr'.\r\tself var: #intArg declareC: 'int intArg'.\r\tself var: #bytesResult declareC: 'unsigned char *bytesResult'.\r\tself var: #floatsRcvr declareC: 'float *floatsRcvr'.\r\tself var: #floatArg declareC: 'double floatArg'.\r\r\tresultOop _ interpreterProxy stackObjectValue: 0.\r\targOop _ interpreterProxy stackValue: 1.\r\trcvrOop _ interpreterProxy stackObjectValue: 2.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isWords: rcvrOop).\r\tinterpreterProxy success: (interpreterProxy isBytes: resultOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ interpreterProxy stSizeOf: rcvrOop.\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: resultOop)).\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tisArgInt _ interpreterProxy isIntegerObject: argOop.\r\tisRcvrWords _ interpreterProxy is: rcvrOop MemberOf: 'WordArray'.\r\r\tisRcvrWords ifTrue: [\r\t\tisArgInt ifTrue: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tintArg _ interpreterProxy integerValueOf: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (wordsRcvr at: i) <= intArg.\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatArg _ interpreterProxy floatValueOf: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (wordsRcvr at: i) <= floatArg.\r\t\t\t].\r\t\t].\r\t] ifFalse: [\r\t\tisArgInt ifTrue: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tintArg _ interpreterProxy integerValueOf: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (floatsRcvr at: i) <= intArg.\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatArg _ interpreterProxy floatValueOf: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (floatsRcvr at: i) <= floatArg.\r\t\t\t].\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 4.\r\tinterpreterProxy push: resultOop.\r! !\r\r!KedamaPlugin2 methodsFor: 'array arithmetic' stamp: 'yo 10/13/2005 20:42'!\rprimitiveLTArrays\r\r\t| length resultOop argOop rcvrOop isArgWords isRcvrWords wordsRcvr wordsArg floatsArg floatsRcvr bytesResult |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #wordsRcvr declareC: 'unsigned int *wordsRcvr'.\r\tself var: #wordsArg declareC: 'unsigned int *wordsArg'.\r\tself var: #bytesResult declareC: 'unsigned char *bytesResult'.\r\tself var: #floatsRcvr declareC: 'float *floatsRcvr'.\r\tself var: #floatsArg declareC: 'float *floatsArg'.\r\r\tresultOop _ interpreterProxy stackObjectValue: 0.\r\targOop _ interpreterProxy stackObjectValue: 1.\r\trcvrOop _ interpreterProxy stackObjectValue: 2.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isWords: argOop).\r\tinterpreterProxy success: (interpreterProxy isWords: rcvrOop).\r\tinterpreterProxy success: (interpreterProxy isBytes: resultOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ interpreterProxy stSizeOf: argOop.\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: rcvrOop)).\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: resultOop)).\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tisArgWords _ interpreterProxy is: argOop MemberOf: 'WordArray'.\r\tisRcvrWords _ interpreterProxy is: rcvrOop MemberOf: 'WordArray'.\r\r\tisRcvrWords ifTrue: [\r\t\tisArgWords ifTrue: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\twordsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (wordsRcvr at: i) < (wordsArg at: i).\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (wordsRcvr at: i) < (floatsArg at: i).\r\t\t\t].\r\t\t].\r\t] ifFalse: [\r\t\tisArgWords ifTrue: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\twordsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (floatsRcvr at: i) < (wordsArg at: i).\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (floatsRcvr at: i) < (floatsArg at: i).\r\t\t\t].\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 4.\r\tinterpreterProxy push: resultOop.\r! !\r\r!KedamaPlugin2 methodsFor: 'array arithmetic' stamp: 'yo 10/13/2005 20:41'!\rprimitiveLTScalar\r\r\t| length resultOop argOop rcvrOop isRcvrWords wordsRcvr floatsRcvr isArgInt intArg floatArg bytesResult |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #wordsRcvr declareC: 'unsigned int *wordsRcvr'.\r\tself var: #intArg declareC: 'int intArg'.\r\tself var: #bytesResult declareC: 'unsigned char *bytesResult'.\r\tself var: #floatsRcvr declareC: 'float *floatsRcvr'.\r\tself var: #floatArg declareC: 'double floatArg'.\r\r\tresultOop _ interpreterProxy stackObjectValue: 0.\r\targOop _ interpreterProxy stackValue: 1.\r\trcvrOop _ interpreterProxy stackObjectValue: 2.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isWords: rcvrOop).\r\tinterpreterProxy success: (interpreterProxy isBytes: resultOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ interpreterProxy stSizeOf: rcvrOop.\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: resultOop)).\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tisArgInt _ interpreterProxy isIntegerObject: argOop.\r\tisRcvrWords _ interpreterProxy is: rcvrOop MemberOf: 'WordArray'.\r\r\tisRcvrWords ifTrue: [\r\t\tisArgInt ifTrue: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tintArg _ interpreterProxy integerValueOf: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (wordsRcvr at: i) < intArg.\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatArg _ interpreterProxy floatValueOf: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (wordsRcvr at: i) < floatArg.\r\t\t\t].\r\t\t].\r\t] ifFalse: [\r\t\tisArgInt ifTrue: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tintArg _ interpreterProxy integerValueOf: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (floatsRcvr at: i) < intArg.\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatArg _ interpreterProxy floatValueOf: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (floatsRcvr at: i) < floatArg.\r\t\t\t].\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 4.\r\tinterpreterProxy push: resultOop.\r! !\r\r!KedamaPlugin2 methodsFor: 'array arithmetic' stamp: 'yo 10/13/2005 01:28'!\rprimitiveMulArrays\r\r\t| length resultOop argOop rcvrOop isArgWords isRcvrWords wordsRcvr wordsArg wordsResult floatsArg floatsResult floatsRcvr |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #wordsRcvr declareC: 'unsigned int *wordsRcvr'.\r\tself var: #wordsArg declareC: 'unsigned int *wordsArg'.\r\tself var: #wordsResult declareC: 'unsigned int *wordsResult'.\r\tself var: #floatsRcvr declareC: 'float *floatsRcvr'.\r\tself var: #floatsArg declareC: 'float *floatsArg'.\r\tself var: #floatsResult declareC: 'float *floatsResult'.\r\r\tresultOop _ interpreterProxy stackObjectValue: 0.\r\targOop _ interpreterProxy stackObjectValue: 1.\r\trcvrOop _ interpreterProxy stackObjectValue: 2.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isWords: argOop).\r\tinterpreterProxy success: (interpreterProxy isWords: rcvrOop).\r\tinterpreterProxy success: (interpreterProxy isWords: resultOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ interpreterProxy stSizeOf: argOop.\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: rcvrOop)).\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: resultOop)).\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tisArgWords _ interpreterProxy is: argOop MemberOf: 'WordArray'.\r\tisRcvrWords _ interpreterProxy is: rcvrOop MemberOf: 'WordArray'.\r\r\tisArgWords & isRcvrWords ifTrue: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'WordArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t] ifFalse: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'KedamaFloatArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t].\r\r\tisRcvrWords ifTrue: [\r\t\tisArgWords ifTrue: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\twordsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\twordsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\twordsResult at: i put: (wordsRcvr at: i) * (wordsArg at: i).\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (wordsRcvr at: i) * (floatsArg at: i).\r\t\t\t].\r\t\t].\r\t] ifFalse: [\r\t\tisArgWords ifTrue: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\twordsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (floatsRcvr at: i) * (wordsArg at: i).\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (floatsRcvr at: i) * (floatsArg at: i).\r\t\t\t].\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 4.\r\tinterpreterProxy push: resultOop.\r! !\r\r!KedamaPlugin2 methodsFor: 'array arithmetic' stamp: 'yo 10/13/2005 01:28'!\rprimitiveMulScalar\r\r\t| length resultOop argOop rcvrOop isRcvrWords wordsRcvr wordsResult floatsResult floatsRcvr isArgInt intArg floatArg |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #wordsRcvr declareC: 'unsigned int *wordsRcvr'.\r\tself var: #intArg declareC: 'int intArg'.\r\tself var: #wordsResult declareC: 'unsigned int *wordsResult'.\r\tself var: #floatsRcvr declareC: 'float *floatsRcvr'.\r\tself var: #floatArg declareC: 'double floatArg'.\r\tself var: #floatsResult declareC: 'float *floatsResult'.\r\r\tresultOop _ interpreterProxy stackObjectValue: 0.\r\targOop _ interpreterProxy stackValue: 1.\r\trcvrOop _ interpreterProxy stackObjectValue: 2.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isWords: rcvrOop).\r\tinterpreterProxy success: (interpreterProxy isWords: resultOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ interpreterProxy stSizeOf: rcvrOop.\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: resultOop)).\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tisArgInt _ interpreterProxy isIntegerObject: argOop.\r\tisRcvrWords _ interpreterProxy is: rcvrOop MemberOf: 'WordArray'.\r\r\tisArgInt & isRcvrWords ifTrue: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'WordArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t] ifFalse: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'KedamaFloatArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t].\r\r\tisRcvrWords ifTrue: [\r\t\tisArgInt ifTrue: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tintArg _ interpreterProxy integerValueOf: argOop.\r\t\t\twordsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\twordsResult at: i put: (wordsRcvr at: i) * intArg.\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatArg _ interpreterProxy floatValueOf: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (wordsRcvr at: i) * floatArg.\r\t\t\t].\r\t\t].\r\t] ifFalse: [\r\t\tisArgInt ifTrue: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tintArg _ interpreterProxy integerValueOf: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (floatsRcvr at: i) * intArg.\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatArg _ interpreterProxy floatValueOf: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (floatsRcvr at: i) * floatArg.\r\t\t\t].\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 4.\r\tinterpreterProxy push: resultOop.\r! !\r\r!KedamaPlugin2 methodsFor: 'array arithmetic' stamp: 'yo 10/13/2005 21:11'!\rprimitiveNEArrays\r\r\t| length resultOop argOop rcvrOop isArgWords isRcvrWords wordsRcvr wordsArg floatsArg floatsRcvr bytesResult |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #wordsRcvr declareC: 'unsigned int *wordsRcvr'.\r\tself var: #wordsArg declareC: 'unsigned int *wordsArg'.\r\tself var: #bytesResult declareC: 'unsigned char *bytesResult'.\r\tself var: #floatsRcvr declareC: 'float *floatsRcvr'.\r\tself var: #floatsArg declareC: 'float *floatsArg'.\r\r\tresultOop _ interpreterProxy stackObjectValue: 0.\r\targOop _ interpreterProxy stackObjectValue: 1.\r\trcvrOop _ interpreterProxy stackObjectValue: 2.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isWords: argOop).\r\tinterpreterProxy success: (interpreterProxy isWords: rcvrOop).\r\tinterpreterProxy success: (interpreterProxy isBytes: resultOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ interpreterProxy stSizeOf: argOop.\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: rcvrOop)).\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: resultOop)).\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tisArgWords _ interpreterProxy is: argOop MemberOf: 'WordArray'.\r\tisRcvrWords _ interpreterProxy is: rcvrOop MemberOf: 'WordArray'.\r\r\tisRcvrWords ifTrue: [\r\t\tisArgWords ifTrue: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\twordsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (wordsRcvr at: i) ~= (wordsArg at: i).\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (wordsRcvr at: i) ~= (floatsArg at: i).\r\t\t\t].\r\t\t].\r\t] ifFalse: [\r\t\tisArgWords ifTrue: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\twordsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (floatsRcvr at: i) ~= (wordsArg at: i).\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (floatsRcvr at: i) ~= (floatsArg at: i).\r\t\t\t].\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 4.\r\tinterpreterProxy push: resultOop.\r! !\r\r!KedamaPlugin2 methodsFor: 'array arithmetic' stamp: 'yo 10/13/2005 21:11'!\rprimitiveNEScalar\r\r\t| length resultOop argOop rcvrOop isRcvrWords wordsRcvr floatsRcvr isArgInt intArg floatArg bytesResult |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #wordsRcvr declareC: 'unsigned int *wordsRcvr'.\r\tself var: #intArg declareC: 'int intArg'.\r\tself var: #bytesResult declareC: 'unsigned char *bytesResult'.\r\tself var: #floatsRcvr declareC: 'float *floatsRcvr'.\r\tself var: #floatArg declareC: 'double floatArg'.\r\r\tresultOop _ interpreterProxy stackObjectValue: 0.\r\targOop _ interpreterProxy stackValue: 1.\r\trcvrOop _ interpreterProxy stackObjectValue: 2.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isWords: rcvrOop).\r\tinterpreterProxy success: (interpreterProxy isBytes: resultOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ interpreterProxy stSizeOf: rcvrOop.\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: resultOop)).\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tisArgInt _ interpreterProxy isIntegerObject: argOop.\r\tisRcvrWords _ interpreterProxy is: rcvrOop MemberOf: 'WordArray'.\r\r\tisRcvrWords ifTrue: [\r\t\tisArgInt ifTrue: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tintArg _ interpreterProxy integerValueOf: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (wordsRcvr at: i) ~= intArg.\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatArg _ interpreterProxy floatValueOf: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (wordsRcvr at: i) ~= floatArg.\r\t\t\t].\r\t\t].\r\t] ifFalse: [\r\t\tisArgInt ifTrue: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tintArg _ interpreterProxy integerValueOf: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (floatsRcvr at: i) ~= intArg.\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatArg _ interpreterProxy floatValueOf: argOop.\r\t\t\tbytesResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tbytesResult at: i put: (floatsRcvr at: i) ~= floatArg.\r\t\t\t].\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 4.\r\tinterpreterProxy push: resultOop.\r! !\r\r!KedamaPlugin2 methodsFor: 'array arithmetic' stamp: 'yo 10/13/2005 17:49'!\rprimitiveNotByteArray\r\r\t| length rcvrOop rcvrArray |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #rcvrArray declareC: 'unsigned char *rcvrArray'.\r\r\trcvrOop _ interpreterProxy stackValue: 0.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isBytes: rcvrOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ interpreterProxy stSizeOf: rcvrOop.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\trcvrArray _ interpreterProxy firstIndexableField: rcvrOop.\r\t0 to: length-1 do:[:i|\r\t\t(rcvrArray at: i) = 0 ifTrue: [\r\t\t\trcvrArray at: i put: 1\r\t\t] ifFalse: [\r\t\t\trcvrArray at: i put: 0\r\t\t].\r\t].\r! !\r\r!KedamaPlugin2 methodsFor: 'array arithmetic' stamp: 'yo 1/19/2006 20:17'!\rprimitiveOrByteArray\r\r\t| length rcvrOop otherOop otherArray rcvrArray length1 length2 |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #rcvrArray declareC: 'unsigned char *rcvrArray'.\r\tself var: #otherArray declareC: 'unsigned char *otherArray'.\r\r\totherOop _ interpreterProxy stackObjectValue: 0.\r\trcvrOop _ interpreterProxy stackValue: 1.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isBytes: rcvrOop).\r\tinterpreterProxy success: (interpreterProxy isBytes: otherOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength1 _ interpreterProxy stSizeOf: rcvrOop.\r\tlength2 _ interpreterProxy stSizeOf: otherOop.\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ length1.\r\tlength1 > length2 ifTrue: [\r\t\tlength _ length2.\r\t].\r\r\totherArray _ interpreterProxy firstIndexableField: otherOop.\r\trcvrArray _ interpreterProxy firstIndexableField: rcvrOop.\r\t0 to: length-1 do:[:i|\r\t\trcvrArray at: i put: (((rcvrArray at: i) + (otherArray at: i)) > 0).\r\t].\r\tinterpreterProxy pop: 1.\r! !\r\r!KedamaPlugin2 methodsFor: 'array arithmetic' stamp: 'yo 1/21/2006 00:21'!\rprimitiveRemArrays\r\r\t| length resultOop argOop rcvrOop isArgWords isRcvrWords wordsRcvr wordsArg wordsResult floatsArg floatsResult floatsRcvr wordRcvr wordArg wordResult floatArg floatResult floatRcvr |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #wordsRcvr declareC: 'unsigned int *wordsRcvr'.\r\tself var: #wordsArg declareC: 'unsigned int *wordsArg'.\r\tself var: #wordsResult declareC: 'unsigned int *wordsResult'.\r\tself var: #floatsRcvr declareC: 'float *floatsRcvr'.\r\tself var: #floatsArg declareC: 'float *floatsArg'.\r\tself var: #floatsResult declareC: 'float *floatsResult'.\r\tself var: #floatResult declareC: 'double floatResult'.\r\tself var: #wordResult declareC: 'unsigned int wordResult'.\r\tself var: #floatRcvr declareC: 'double floatRcvr'.\r\tself var: #floatArg declareC: 'double floatArg'.\r\tself var: #wordRcvr declareC: 'unsigned int wordRcvr'.\r\tself var: #wordArg declareC: 'unsigned int wordArg'.\r\r\r\tresultOop _ interpreterProxy stackObjectValue: 0.\r\targOop _ interpreterProxy stackObjectValue: 1.\r\trcvrOop _ interpreterProxy stackObjectValue: 2.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isWords: argOop).\r\tinterpreterProxy success: (interpreterProxy isWords: rcvrOop).\r\tinterpreterProxy success: (interpreterProxy isWords: resultOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ interpreterProxy stSizeOf: argOop.\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: rcvrOop)).\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: resultOop)).\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tisArgWords _ interpreterProxy is: argOop MemberOf: 'WordArray'.\r\tisRcvrWords _ interpreterProxy is: rcvrOop MemberOf: 'WordArray'.\r\r\tisArgWords & isRcvrWords ifTrue: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'WordArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t] ifFalse: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'KedamaFloatArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t].\r\r\tisRcvrWords ifTrue: [\r\t\tisArgWords ifTrue: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\twordsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\twordsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\twordRcvr _ (wordsRcvr at: i).\r\t\t\t\twordArg _ (wordsArg at: i).\r\t\t\t\twordResult _ wordRcvr \\\\ wordArg.\r\t\t\t\t\"In this primitive, words are supposed to be unsigned.\"\r\t\t\t\twordsResult at: i put: wordResult.\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\twordRcvr _ wordsRcvr at: i.\r\t\t\t\tfloatArg _ floatsArg at: i.\r\t\t\t\tfloatResult _ wordRcvr / floatArg.\r\t\t\t\tfloatResult _ self cCode: 'floor(floatResult)' inSmalltalk: [floatResult floor].\r\t\t\t\tfloatsResult at: i put: wordRcvr - (floatResult * floatArg).\r\t\t\t].\r\t\t].\r\t] ifFalse: [\r\t\tisArgWords ifTrue: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\twordsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatRcvr _ floatsRcvr at: i.\r\t\t\t\twordArg _ wordsArg at: i.\r\t\t\t\tfloatResult _ floatRcvr / wordArg.\r\t\t\t\tfloatResult _ self cCode: 'floor(floatResult)' inSmalltalk: [floatResult floor].\r\t\t\t\tfloatsResult at: i put: (floatRcvr - (floatResult * wordArg)).\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatRcvr _ floatsRcvr at: i.\r\t\t\t\tfloatArg _ floatsArg at: i.\r\t\t\t\tfloatResult _ floatRcvr / floatArg.\r\t\t\t\tfloatResult _ self cCode: 'floor(floatResult)' inSmalltalk: [floatResult floor].\r\t\t\t\tfloatsResult at: i put: (floatRcvr - (floatResult * floatArg)).\r\t\t\t].\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 4.\r\tinterpreterProxy push: resultOop.\r! !\r\r!KedamaPlugin2 methodsFor: 'array arithmetic' stamp: 'yo 1/21/2006 00:21'!\rprimitiveRemScalar\r\r\t| length resultOop argOop rcvrOop isRcvrWords wordsRcvr wordsResult floatsResult floatsRcvr isArgInt intArg floatArg wordRcvr floatResult floatRcvr |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #wordsRcvr declareC: 'unsigned int *wordsRcvr'.\r\tself var: #intArg declareC: 'int intArg'.\r\tself var: #wordsResult declareC: 'unsigned int *wordsResult'.\r\tself var: #floatsRcvr declareC: 'float *floatsRcvr'.\r\tself var: #floatArg declareC: 'double floatArg'.\r\tself var: #floatsResult declareC: 'float *floatsResult'.\r\tself var: #floatResult declareC: 'double floatResult'.\r\tself var: #wordResult declareC: 'unsigned int wordResult'.\r\tself var: #floatRcvr declareC: 'double floatRcvr'.\r\tself var: #floatArg declareC: 'double floatArg'.\r\tself var: #wordRcvr declareC: 'unsigned int wordRcvr'.\r\tself var: #wordArg declareC: 'unsigned int wordArg'.\r\r\r\tresultOop _ interpreterProxy stackObjectValue: 0.\r\targOop _ interpreterProxy stackValue: 1.\r\trcvrOop _ interpreterProxy stackObjectValue: 2.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isWords: rcvrOop).\r\tinterpreterProxy success: (interpreterProxy isWords: resultOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ interpreterProxy stSizeOf: rcvrOop.\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: resultOop)).\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tisArgInt _ interpreterProxy isIntegerObject: argOop.\r\tisRcvrWords _ interpreterProxy is: rcvrOop MemberOf: 'WordArray'.\r\r\tisArgInt & isRcvrWords ifTrue: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'WordArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t] ifFalse: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'KedamaFloatArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t].\r\r\tisRcvrWords ifTrue: [\r\t\tisArgInt ifTrue: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tintArg _ interpreterProxy integerValueOf: argOop.\r\t\t\twordsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\twordsResult at: i put: (wordsRcvr at: i) \\\\ intArg.\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatArg _ interpreterProxy floatValueOf: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\twordRcvr _ wordsRcvr at: i.\r\t\t\t\tfloatResult _ wordRcvr / floatArg.\r\t\t\t\tfloatResult _ self cCode: 'floor(floatResult)' inSmalltalk: [floatResult floor].\r\t\t\t\tfloatsResult at: i put: wordRcvr - (floatResult * floatArg).\r\t\t\t].\r\t\t].\r\t] ifFalse: [\r\t\tisArgInt ifTrue: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tintArg _ interpreterProxy integerValueOf: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatRcvr _ floatsRcvr at: i.\r\t\t\t\tfloatResult _ floatRcvr / intArg.\r\t\t\t\tfloatResult _ self cCode: 'floor(floatResult)' inSmalltalk: [floatResult floor].\r\t\t\t\tfloatsResult at: i put: floatRcvr - (floatResult * intArg).\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatArg _ interpreterProxy floatValueOf: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatRcvr _ floatsRcvr at: i.\r\t\t\t\tfloatResult _ floatRcvr / floatArg.\r\t\t\t\tfloatResult _ self cCode: 'floor(floatResult)' inSmalltalk: [floatResult floor].\r\t\t\t\tfloatsResult at: i put: floatRcvr - (floatResult * floatArg).\r\t\t\t].\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 4.\r\tinterpreterProxy push: resultOop.\r! !\r\r!KedamaPlugin2 methodsFor: 'array arithmetic' stamp: 'yo 10/13/2005 01:28'!\rprimitiveSubArrays\r\r\t| length resultOop argOop rcvrOop isArgWords isRcvrWords wordsRcvr wordsArg wordsResult floatsArg floatsResult floatsRcvr |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #wordsRcvr declareC: 'unsigned int *wordsRcvr'.\r\tself var: #wordsArg declareC: 'unsigned int *wordsArg'.\r\tself var: #wordsResult declareC: 'unsigned int *wordsResult'.\r\tself var: #floatsRcvr declareC: 'float *floatsRcvr'.\r\tself var: #floatsArg declareC: 'float *floatsArg'.\r\tself var: #floatsResult declareC: 'float *floatsResult'.\r\r\tresultOop _ interpreterProxy stackObjectValue: 0.\r\targOop _ interpreterProxy stackObjectValue: 1.\r\trcvrOop _ interpreterProxy stackObjectValue: 2.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isWords: argOop).\r\tinterpreterProxy success: (interpreterProxy isWords: rcvrOop).\r\tinterpreterProxy success: (interpreterProxy isWords: resultOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ interpreterProxy stSizeOf: argOop.\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: rcvrOop)).\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: resultOop)).\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tisArgWords _ interpreterProxy is: argOop MemberOf: 'WordArray'.\r\tisRcvrWords _ interpreterProxy is: rcvrOop MemberOf: 'WordArray'.\r\r\tisArgWords & isRcvrWords ifTrue: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'WordArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t] ifFalse: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'KedamaFloatArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t].\r\r\tisRcvrWords ifTrue: [\r\t\tisArgWords ifTrue: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\twordsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\twordsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\twordsResult at: i put: (wordsRcvr at: i) - (wordsArg at: i).\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (wordsRcvr at: i) - (floatsArg at: i).\r\t\t\t].\r\t\t].\r\t] ifFalse: [\r\t\tisArgWords ifTrue: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\twordsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (floatsRcvr at: i) - (wordsArg at: i).\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatsArg _ interpreterProxy firstIndexableField: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (floatsRcvr at: i) - (floatsArg at: i).\r\t\t\t].\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 4.\r\tinterpreterProxy push: resultOop.\r! !\r\r!KedamaPlugin2 methodsFor: 'array arithmetic' stamp: 'yo 10/13/2005 01:28'!\rprimitiveSubScalar\r\r\t| length resultOop argOop rcvrOop isRcvrWords wordsRcvr wordsResult floatsResult floatsRcvr isArgInt intArg floatArg |\r\r\tself export: true.\r\tself inline: true.\r\tself var: #wordsRcvr declareC: 'unsigned int *wordsRcvr'.\r\tself var: #intArg declareC: 'int intArg'.\r\tself var: #wordsResult declareC: 'unsigned int *wordsResult'.\r\tself var: #floatsRcvr declareC: 'float *floatsRcvr'.\r\tself var: #floatArg declareC: 'double floatArg'.\r\tself var: #floatsResult declareC: 'float *floatsResult'.\r\r\tresultOop _ interpreterProxy stackObjectValue: 0.\r\targOop _ interpreterProxy stackValue: 1.\r\trcvrOop _ interpreterProxy stackObjectValue: 2.\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tinterpreterProxy success: (interpreterProxy isWords: rcvrOop).\r\tinterpreterProxy success: (interpreterProxy isWords: resultOop).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tlength _ interpreterProxy stSizeOf: rcvrOop.\r\tinterpreterProxy success: (length = (interpreterProxy stSizeOf: resultOop)).\r\tinterpreterProxy failed ifTrue:[^nil].\r\r\tisArgInt _ interpreterProxy isIntegerObject: argOop.\r\tisRcvrWords _ interpreterProxy is: rcvrOop MemberOf: 'WordArray'.\r\r\tisArgInt & isRcvrWords ifTrue: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'WordArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t] ifFalse: [\r\t\t(interpreterProxy is: resultOop MemberOf: 'KedamaFloatArray') ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t].\r\r\tisRcvrWords ifTrue: [\r\t\tisArgInt ifTrue: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tintArg _ interpreterProxy integerValueOf: argOop.\r\t\t\twordsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\twordsResult at: i put: (wordsRcvr at: i) - intArg.\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\twordsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatArg _ interpreterProxy floatValueOf: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (wordsRcvr at: i) - floatArg.\r\t\t\t].\r\t\t].\r\t] ifFalse: [\r\t\tisArgInt ifTrue: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tintArg _ interpreterProxy integerValueOf: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (floatsRcvr at: i) - intArg.\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\tfloatsRcvr _ interpreterProxy firstIndexableField: rcvrOop.\r\t\t\tfloatArg _ interpreterProxy floatValueOf: argOop.\r\t\t\tfloatsResult _ interpreterProxy firstIndexableField: resultOop.\r\t\t\t0 to: length-1 do:[:i|\r\t\t\t\tfloatsResult at: i put: (floatsRcvr at: i) - floatArg.\r\t\t\t].\r\t\t].\r\t].\r\r\tinterpreterProxy pop: 4.\r\tinterpreterProxy push: resultOop.\r! !\r\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 01:28'!\rdegreesFromX: x y: y\r\r\t| tanVal theta |\r\tself inline: true.\r\tself returnTypeC: 'double'.\r\tself var: 'x' declareC: 'double x'.\r\tself var: 'y' declareC: 'double y'.\r\tself var: 'tanVal' declareC: 'double tanVal'.\r\tself var: 'theta' declareC: 'double theta'.\r\r\tx = 0.0 ifTrue: [\r\t\ty >= 0.0 ifTrue: [^ 90.0] ifFalse: [^ 270.0].\r\t] ifFalse: [\r\t\ttanVal _ y / x.\r\t\ttheta _ self cCode: 'atan(tanVal)' inSmalltalk: [tanVal arcTan].\r\t\tx >= 0.0 ifTrue: [\r\t\t\ty >= 0.0\r\t\t\t\tifTrue: [^ theta / 0.0174532925199433]\r\t\t\t\tifFalse: [^ 360.0 + (theta / 0.0174532925199433)]\r\t\t] ifFalse: [\r\t\t\t^ 180.0 + (theta / 0.0174532925199433)\r\t\t]\r\t].\r\t^ 0.0.\r\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 01:28'!\rdegreesToRadians: degrees\r\r\t| headingRadians deg q |\r\tself inline: true.\r\tself returnTypeC: 'double'.\r\tself var: 'degrees' declareC: 'double degrees'.\r\tself var: 'deg' declareC: 'double deg'.\r\tself var: 'headingRadians' declareC: 'double headingRadians'.\r\tself var: 'q' declareC: 'int q'.\r\r\tdeg _ 90.0 - degrees.\r\tq _ deg / 360.0.\r\tdeg < 0.0 ifTrue: [q _ q - 1].\r\theadingRadians _ (deg - (q * 360.0)) * 0.0174532925199433.\r\t^ headingRadians.\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 01:28'!\rdrawTurtlesInArray\r\r\t| visibleArray colorArray yArray xArray destHeight destWidth destBits size x y visible visibleOop colorOop yOop xOop destOop bitsIndex |\r\tself export: true.\r\tself inline: true.\r\tself var: 'destBits' declareC: 'unsigned int *destBits'.\r\tself var: 'xArray' declareC: 'float *xArray'.\r\tself var: 'yArray' declareC: 'float *yArray'.\r\tself var: 'colorArray' declareC: 'unsigned int *colorArray'.\r\tself var: 'visibleArray' declareC: 'unsigned char *visibleArray'.\r\r\tvisibleOop _ interpreterProxy stackValue: 0.\r\tcolorOop _ interpreterProxy stackValue: 1.\r\tyOop _ interpreterProxy stackValue: 2.\r\txOop _ interpreterProxy stackValue: 3.\r\tdestHeight _ interpreterProxy stackIntegerValue: 4.\r\tdestWidth _ interpreterProxy stackIntegerValue: 5.\r\tdestOop _ interpreterProxy stackValue: 6.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\r\t(interpreterProxy isWords: destOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: xOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: yOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: colorOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isBytes: visibleOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\t(destHeight * destWidth) ~= (interpreterProxy slotSizeOf: destOop) ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\tsize _ interpreterProxy slotSizeOf: xOop.\r\t(interpreterProxy slotSizeOf: yOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy slotSizeOf: colorOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy slotSizeOf: visibleOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\txArray _ interpreterProxy firstIndexableField: xOop.\r\tyArray _ interpreterProxy firstIndexableField: yOop.\r\tcolorArray _ interpreterProxy firstIndexableField: colorOop.\r\tvisibleArray _ interpreterProxy firstIndexableField: visibleOop.\r\tdestBits _ interpreterProxy firstIndexableField: destOop.\r\r\t0 to: size - 1 do: [:i |\r\t\tx _ self cCoerce: (xArray at: i) to: 'int'.\r\t\tself cCode: '' inSmalltalk: [x _ x asInteger].\r\t\ty _ self cCoerce: (yArray at: i) to: 'int'.\r\t\tself cCode: '' inSmalltalk: [y _ y asInteger].\r\t\tvisible _ (visibleArray at: i).\r\t\t((visible ~= 0) and: [((x >= 0) and: [y >= 0]) and: [(x < destWidth) and: [y < destHeight]]]) ifTrue: [\r\t\t\tbitsIndex _ ((y * destWidth) + x).\r\t\t\tdestBits at: bitsIndex put: (colorArray at: i).\r\t\t]\r\t].\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 7.\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 01:28'!\rgetHeadingArrayInto\r\r\t| resultOop headingOop size headingArray resultArray heading |\r\tself export: true.\r\tself inline: true.\r\tself var: 'headingArray' declareC: 'float *headingArray'.\r\tself var: 'resultArray' declareC: 'float *resultArray'.\r\tself var: 'heading' declareC: 'double heading'.\r\r\tresultOop _ interpreterProxy stackValue: 0.\r\theadingOop _ interpreterProxy stackValue: 1.\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isWords: headingOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: resultOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\tsize _ interpreterProxy slotSizeOf: headingOop.\r\t(interpreterProxy slotSizeOf: resultOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\theadingArray _ interpreterProxy firstIndexableField: headingOop.\r\tresultArray _ interpreterProxy firstIndexableField: resultOop.\r\r\t0 to: size - 1 do: [:i |\r\t\theading _ headingArray at: i.\r\t\theading _ heading / 0.0174532925199433.\r\t\theading _ 90.0 - heading.\r\t\theading > 0.0 ifFalse: [heading _ heading + 360.0].\r\t\tresultArray at: i put: heading.\r\t].\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 2.\r\r\t! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 01:28'!\rgetScalarHeading\r\r\t| headingOop headingArray heading index |\r\tself export: true.\r\tself inline: true.\r\tself var: 'headingArray' declareC: 'float *headingArray'.\r\tself var: 'heading' declareC: 'double heading'.\r\r\theadingOop _ interpreterProxy stackValue: 0.\r\tindex _ interpreterProxy stackIntegerValue: 1.\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isWords: headingOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\t(interpreterProxy slotSizeOf: headingOop) < index ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\theadingArray _ interpreterProxy firstIndexableField: headingOop.\r\r\theading _ headingArray at: index - 1.\r\theading _ self radiansToDegrees: heading.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\tinterpreterProxy pop: 3.\r\tinterpreterProxy pushFloat: heading.\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 01:28'!\rinitialiseModule\r\r\tself export: true.\r\tkedamaRandomSeed _ 17.\r\r\trandA := 16r000041A7.    \" magic constant =      16807 \"\r\trandM := 16r7FFFFFFF.    \" magic constant = 2147483647 \"\r\trandQ := randM // randA.\r\trandR  := randM \\\\ randA.\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 01:28'!\rkedamaRandom2: range\r\r\t| lo hi r v val |\r\tself inline: true.\r\trange < 0 ifTrue: [r _ 0 - range] ifFalse: [r _ range].\r\thi _ kedamaRandomSeed // randQ.\r\tlo _ kedamaRandomSeed \\\\ randQ. \r\tkedamaRandomSeed _ (randA * lo) - (randR * hi).\r\tv _ kedamaRandomSeed bitAnd: 65535.\r\tval _ (v * (r + 1)) >> 16.\r\trange < 0 ifTrue: [^ 0 - val] ifFalse: [^ val].\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 01:28'!\rkedamaRandom: range\r\r\t| r val |\r\tself inline: true.\r\trange < 0 ifTrue: [r _ 0 - range] ifFalse: [r _ range].\r\tkedamaRandomSeed _ ((kedamaRandomSeed * 1309) + 13849) bitAnd: 65535.\r\tval _ (kedamaRandomSeed * (r + 1)) >> 16.\r\trange < 0 ifTrue: [^ 0 - val] ifFalse: [^ val].\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 01:28'!\rkedamaSetRandomSeed\r\r\t| seed |\r\tself inline: true.\r\tself export: true.\r\tseed _ interpreterProxy stackIntegerValue: 0.\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\tkedamaRandomSeed _ seed bitAnd: 65536.\r\r\tinterpreterProxy pop: 1.\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 01:28'!\rmakeMask\r\r\t| shiftAmount pixel maskBits dataBits dataSize maskSize dOrigin mOrigin data alpha highMask |\r\r\tself export: true.\r\tself inline: true.\r\tself var: 'dOrigin' declareC: 'unsigned int* dOrigin'.\r\tself var: 'mOrigin' declareC: 'unsigned int* mOrigin'.\r\tself var: 'highMask' declareC: 'unsigned int highMask'.\r\tself var: 'alpha' declareC: 'unsigned int alpha'.\r\tself var: 'pixel' declareC: 'unsigned int pixel'.\r\r\tshiftAmount _ interpreterProxy stackIntegerValue: 0.\r\tpixel _ interpreterProxy stackIntegerValue: 1.\r\tmaskBits _ interpreterProxy stackValue: 2.\r\tdataBits _ interpreterProxy stackValue: 3.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\tdataSize _ interpreterProxy slotSizeOf: dataBits.\r\tmaskSize _ interpreterProxy slotSizeOf: maskBits.\r\r\tdataSize = maskSize ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\tshiftAmount < -32 ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\tshiftAmount > 8 ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\tdOrigin _ interpreterProxy firstIndexableField: dataBits.\r\tmOrigin _ interpreterProxy firstIndexableField: maskBits.\r\r\thighMask _ 16rFF000000.\r\t0 to: dataSize -1 do: [:i |\r\t\tdata _ dOrigin at: i.\r\t\talpha _ data bitShift: shiftAmount.\r\t\t(alpha > 255) ifTrue: [alpha _ 255].\r\t\t(alpha < 0) ifTrue: [alpha _ 0].\r\t\tmOrigin at: i put: (((alpha << 24) bitAnd: highMask) bitOr: pixel).\r\t].\r\r\tinterpreterProxy pop: 4.\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 01:28'!\rmakeMaskLog\r\r\t| max pixel maskBits dataBits dataSize maskSize dOrigin mOrigin data alpha highMask maxLog maxOop maxFirst |\r\r\tself export: true.\r\tself inline: true.\r\tself var: 'dOrigin' declareC: 'unsigned int* dOrigin'.\r\tself var: 'mOrigin' declareC: 'unsigned int* mOrigin'.\r\tself var: 'highMask' declareC: 'unsigned int highMask'.\r\tself var: 'maxFirst' declareC: 'unsigned int* maxFirst'.\r\tself var: 'max' declareC: 'unsigned int max'.\r\tself var: 'alpha' declareC: 'unsigned int alpha'.\r\tself var: 'pixel' declareC: 'unsigned int pixel'.\r\tself var: 'maxLog' declareC: 'double maxLog'.\r\r\tmaxOop _ interpreterProxy stackValue: 0.\r\tpixel _ interpreterProxy stackIntegerValue: 1.\r\tmaskBits _ interpreterProxy stackValue: 2.\r\tdataBits _ interpreterProxy stackValue: 3.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\tmaxFirst _ (interpreterProxy firstIndexableField: maxOop).\r\tmax _ maxFirst at: 0.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\tmaxLog _ self cCode: 'log(max)' inSmalltalk: [max ln].\r\r\tdataSize _ interpreterProxy slotSizeOf: dataBits.\r\tmaskSize _ interpreterProxy slotSizeOf: maskBits.\r\r\tdataSize = maskSize ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\tdOrigin _ interpreterProxy firstIndexableField: dataBits.\r\tmOrigin _ interpreterProxy firstIndexableField: maskBits.\r\r\thighMask _ 16rFF000000.\r\t0 to: dataSize -1 do: [:i |\r\t\tdata _ dOrigin at: i.\r\t\tdata = 0 ifTrue: [alpha _ 0] ifFalse: [\r\t\t\talpha _ ((255.0 / maxLog) * (self cCode: 'log(data)' inSmalltalk: [data ln])) asInteger.\r\t\t].\r\t\t(alpha > 255) ifTrue: [alpha _ 255].\r\t\tmOrigin at: i put: (((alpha << 24) bitAnd: highMask) bitOr: pixel).\r\t].\r\r\tinterpreterProxy pop: 4.\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 01:28'!\rmakeTurtlesMap\r\r\t| height width yOop xOop whoOop mapOop size xArray yArray whoArray map x y mapIndex |\r\tself export: true.\r\tself inline: true.\r\r\tself var: 'xArray' declareC: 'float *xArray'.\r\tself var: 'yArray' declareC: 'float *yArray'.\r\tself var: 'whoArray' declareC: 'unsigned int *whoArray'.\r\tself var: 'map' declareC: 'unsigned int *map'.\r\r\theight _ interpreterProxy stackIntegerValue: 0.\r\twidth _ interpreterProxy stackIntegerValue: 1.\r\tyOop _ interpreterProxy stackValue: 2.\r\txOop _ interpreterProxy stackValue: 3.\r\twhoOop _ interpreterProxy stackValue: 4.\r\tmapOop _ interpreterProxy stackValue: 5.\r\r\t(interpreterProxy isWords: yOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: xOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: whoOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: mapOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\tsize _ interpreterProxy slotSizeOf: whoOop.\r\t(interpreterProxy slotSizeOf: xOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy slotSizeOf: yOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy slotSizeOf: mapOop) ~= (height * width) ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\txArray _ interpreterProxy firstIndexableField: xOop.\r\tyArray _ interpreterProxy firstIndexableField: yOop.\r\twhoArray _ interpreterProxy firstIndexableField: whoOop.\r\tmap _ interpreterProxy firstIndexableField: mapOop.\r\t\r\t0 to: (height * width) - 1 do: [:index |\r\t\tmap at: index put: 0.\r\t].\r\r\t0 to: size - 1 do: [:index |\r\t\tx _ xArray at: index.\r\t\ty _ yArray at: index.\r\t\tmapIndex _ (width * y) + x.\r\t\t(mapIndex >= 0  and: [mapIndex < (height * width)]) ifTrue: [\r\t\t\tmap at: mapIndex put: (whoArray at: index).\r\t\t].\r\t].\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 6.\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 01:28'!\rprimPixelAtXY\r\r\t| height width yPos xPos bitsOop x y bits index ret |\r\tself export: true.\r\tself inline: true.\r\r\tself var: 'bits' declareC: 'unsigned int *bits'.\r\tself var: 'xPos' declareC: 'double xPos'.\r\tself var: 'yPos' declareC: 'double yPos'.\r\r\theight _ interpreterProxy stackIntegerValue: 0.\r\twidth _ interpreterProxy stackIntegerValue: 1.\r\tyPos _ interpreterProxy stackFloatValue: 2.\r\txPos _ interpreterProxy stackFloatValue: 3.\r\tbitsOop _ interpreterProxy stackValue: 4.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isWords: bitsOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy slotSizeOf: bitsOop) ~= (height * width) ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\tx _ xPos.\r\ty _ yPos.\r\tbits _ interpreterProxy firstIndexableField: bitsOop.\r\r\t((x >= 0) &  (x < width) & (y >= 0) & (y < height)) ifTrue: [\r\t\tindex _ y * width + x.\r\t\tret _ bits at: index.\r\t] ifFalse: [\r\t\tret _ 0.\r\t].\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 6.\r\tinterpreterProxy pushInteger: ret.\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 01:28'!\rprimPixelAtXYPut\r\r\t| height width value yPos xPos bitsOop x y v bits index |\r\tself export: true.\r\tself inline: true.\r\r\tself var: 'bits' declareC: 'unsigned int *bits'.\r\tself var: 'xPos' declareC: 'double xPos'.\r\tself var: 'yPos' declareC: 'double yPos'.\r\r\theight _ interpreterProxy stackIntegerValue: 0.\r\twidth _ interpreterProxy stackIntegerValue: 1.\r\tvalue _ interpreterProxy stackIntegerValue: 2.\r\tyPos _ interpreterProxy stackFloatValue: 3.\r\txPos _ interpreterProxy stackFloatValue: 4.\r\tbitsOop _ interpreterProxy stackValue: 5.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isWords: bitsOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy slotSizeOf: bitsOop) ~= (height * width) ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\tx _ xPos.\r\ty _ yPos.\r\tv _ value.\r\tv > 16r3FFFFFFF ifTrue: [\r\t\tv _ 16r3FFFFFFF.\r\t].\r\tv < 0 ifTrue: [\r\t\tv _ 0.\r\t].\r\r\tbits _ interpreterProxy firstIndexableField: bitsOop.\r\r\t((x >= 0) &  (x < width) & (y >= 0) & (y < height)) ifTrue: [\r\t\tindex _ y * width + x.\r\t\tbits at: index put: v.\r\t].\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 6.\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 01:28'!\rprimPixelsAtXY\r\r\t| yArray xArray bitsHeight bitsWidth bitsOop bits size x y bitsIndex destWordsOop  yArrayOop xArrayOop destWords  |\r\tself export: true.\r\tself inline: true.\r\tself var: 'destWords' declareC: 'unsigned int *destWords'.\r\tself var: 'bits' declareC: 'unsigned int *bits'.\r\tself var: 'xArray' declareC: 'float *xArray'.\r\tself var: 'yArray' declareC: 'float *yArray'.\r\r\tdestWordsOop _ interpreterProxy stackValue: 0.\r\tbitsHeight _ interpreterProxy stackIntegerValue: 1.\r\tbitsWidth _ interpreterProxy stackIntegerValue: 2.\r\tbitsOop _ interpreterProxy stackValue: 3.\r\tyArrayOop _ interpreterProxy stackValue: 4.\r\txArrayOop _ interpreterProxy stackValue: 5.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isWords: destWordsOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: xArrayOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: yArrayOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: bitsOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\t(bitsHeight * bitsWidth) ~= (interpreterProxy slotSizeOf: bitsOop) ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\tsize _ interpreterProxy slotSizeOf: xArrayOop.\r\t(interpreterProxy slotSizeOf: yArrayOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy slotSizeOf: destWordsOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\txArray _ interpreterProxy firstIndexableField: xArrayOop.\r\tyArray _ interpreterProxy firstIndexableField: yArrayOop.\r\tdestWords _ interpreterProxy firstIndexableField: destWordsOop.\r\tbits _ interpreterProxy firstIndexableField: bitsOop.\r\r\t0 to: size - 1 do: [:i |\r\t\tx _ self cCoerce: (xArray at: i) to: 'int'.\r\t\tself cCode: '' inSmalltalk: [x _ x asInteger].\r\t\ty _ self cCoerce: (yArray at: i) to: 'int'.\r\t\tself cCode: '' inSmalltalk: [y _ y asInteger].\r\t\t(((x >= 0) and: [y >= 0]) and: [(x < bitsWidth) and: [y < bitsHeight]]) ifTrue: [\r\t\t\tbitsIndex _ ((y * bitsWidth) + x).\r\t\t\tdestWords at: i put: (bits at: bitsIndex).\r\t\t]\r\t].\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 6.\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 01:28'!\rprimScalarForward\r\r\t| bottomEdgeMode topEdgeMode rightEdgeMode leftEdgeMode destHeight destWidth headingOop yOop xOop size xArray yArray headingArray val dist newX newY index i |\r\tself export: true.\r\tself inline: true.\r\tself var: 'xArray' declareC: 'float *xArray'.\r\tself var: 'yArray' declareC: 'float *yArray'.\r\tself var: 'headingArray' declareC: 'float *headingArray'.\r\tself var: 'val' declareC: 'double val'.\r\tself var: 'destHeight' declareC: 'double destHeight'.\r\tself var: 'destWidth' declareC: 'double destWidth'.\r\tself var: 'dist' declareC: 'double dist'.\r\tself var: 'newX' declareC: 'double newX'.\r\tself var: 'newY' declareC: 'double newY'.\r\r\tbottomEdgeMode _ interpreterProxy stackIntegerValue: 0.\r\ttopEdgeMode _ interpreterProxy stackIntegerValue: 1.\r\trightEdgeMode _ interpreterProxy stackIntegerValue: 2.\r\tleftEdgeMode _ interpreterProxy stackIntegerValue: 3.\r\tdestHeight _ interpreterProxy stackFloatValue: 4.\r\tdestWidth _ interpreterProxy stackFloatValue: 5.\r\tval _ interpreterProxy stackFloatValue: 6.\r\theadingOop _ interpreterProxy stackValue: 7.\r\tyOop _ interpreterProxy stackValue: 8.\r\txOop _ interpreterProxy stackValue: 9.\r\tindex _ interpreterProxy stackIntegerValue: 10.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isWords: xOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: yOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: headingOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\tsize _ interpreterProxy slotSizeOf: xOop.\r\t(interpreterProxy slotSizeOf: yOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy slotSizeOf: headingOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\txArray _ interpreterProxy firstIndexableField: xOop.\r\tyArray _ interpreterProxy firstIndexableField: yOop.\r\theadingArray _ interpreterProxy firstIndexableField: headingOop.\r\r\tdist _ val.\r\ti _ index - 1.\r\tnewX _ (xArray at: i) + (dist * (headingArray at: i) cos).\r\tnewY _ (yArray at: i) - (dist * (headingArray at: i) sin).\r\tself scalarXAt: i xArray: xArray headingArray: headingArray value: newX destWidth: destWidth leftEdgeMode: leftEdgeMode rightEdgeMode: rightEdgeMode.\r\tself scalarYAt: i yArray: yArray headingArray: headingArray value: newY destHeight: destHeight topEdgeMode: topEdgeMode bottomEdgeMode: bottomEdgeMode.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 11.\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 1/20/2006 14:02'!\rprimSetPixelsAtXY\r\r\t| yArray xArray bitsHeight bitsWidth bitsOop bits size x y bitsIndex  yArrayOop xArrayOop  valueOop isValueInt isValueWordArray intValue wordsValue value pArrayOop pArray floatsValue fv |\r\tself export: true.\r\tself inline: true.\t\r\tself var: 'intValue' declareC: 'unsigned int intValue'.\r\tself var: 'wordsValue' declareC: 'unsigned int *wordsValue'.\r\tself var: 'floatsValue' declareC: 'float *floatsValue'.\r\tself var: 'value' declareC: 'unsigned int value'.\r\tself var: 'floatValue' declareC: 'float floatValue'.\r\tself var: 'bits' declareC: 'unsigned int *bits'.\r\tself var: 'pArray' declareC: 'unsigned char *pArray'.\r\tself var: 'xArray' declareC: 'float *xArray'.\r\tself var: 'yArray' declareC: 'float *yArray'.\r\r\tvalueOop _ interpreterProxy stackValue: 0.\r\tbitsHeight _ interpreterProxy stackIntegerValue: 1.\r\tbitsWidth _ interpreterProxy stackIntegerValue: 2.\r\tbitsOop _ interpreterProxy stackValue: 3.\r\tyArrayOop _ interpreterProxy stackValue: 4.\r\txArrayOop _ interpreterProxy stackValue: 5.\r\tpArrayOop _ interpreterProxy stackValue: 6.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isBytes: pArrayOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: xArrayOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: yArrayOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: bitsOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\t(bitsHeight * bitsWidth) ~= (interpreterProxy slotSizeOf: bitsOop) ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\tsize _ interpreterProxy slotSizeOf: xArrayOop.\r\t(interpreterProxy slotSizeOf: pArrayOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy slotSizeOf: yArrayOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\tpArray _ interpreterProxy firstIndexableField: pArrayOop.\r\txArray _ interpreterProxy firstIndexableField: xArrayOop.\r\tyArray _ interpreterProxy firstIndexableField: yArrayOop.\r\r\tisValueInt _ interpreterProxy isIntegerObject: valueOop.\r\tisValueInt ifTrue: [\r\t\tintValue _ interpreterProxy integerValueOf: valueOop.\r\t\tvalue _ intValue.\r\t] ifFalse: [\r\t\t(interpreterProxy slotSizeOf: valueOop) ~= size\r\t\t\tifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t\tisValueWordArray _ (interpreterProxy is: valueOop MemberOf: 'WordArray').\r\t\tisValueWordArray ifTrue: [\r\t\t\twordsValue _ interpreterProxy firstIndexableField: valueOop.\r\t\t] ifFalse: [\r\t\t\tfloatsValue _ interpreterProxy firstIndexableField: valueOop.\r\t\t].\r\t].\r\tbits _ interpreterProxy firstIndexableField: bitsOop.\r\r\t0 to: size - 1 do: [:i |\r\t\t(pArray at: i) = 1 ifTrue: [\r\t\t\tx _ self cCoerce: (xArray at: i) to: 'int'.\r\t\t\tself cCode: '' inSmalltalk: [x _ x asInteger].\r\t\t\ty _ self cCoerce: (yArray at: i) to: 'int'.\r\t\t\tself cCode: '' inSmalltalk: [y _ y asInteger].\r\t\t\t(((x >= 0) and: [y >= 0]) and: [(x < bitsWidth) and: [y < bitsHeight]]) ifTrue: [\r\t\t\t\tbitsIndex _ ((y * bitsWidth) + x).\r\t\t\t\tisValueInt ifFalse: [\r\t\t\t\t\tisValueWordArray ifTrue: [\r\t\t\t\t\t\tbits at: bitsIndex put: (wordsValue at: i).\r\t\t\t\t\t] ifFalse: [\r\t\t\t\t\t\tfv _ floatsValue at: i.\r\t\t\t\t\t\tself cCode: '' inSmalltalk: [fv _ fv asInteger].\r\t\t\t\t\t\tbits at: bitsIndex put: fv.\r\t\t\t\t\t].\r\t\t\t\t] ifTrue: [\r\t\t\t\t\tbits at: bitsIndex put: value.\r\t\t\t\t].\r\t\t\t]\r\t\t].\r\t].\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 7.\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 15:47'!\rprimTurtlesForward\r\r\t| bottomEdgeMode topEdgeMode rightEdgeMode leftEdgeMode destHeight destWidth valOop headingOop yOop xOop isValVector size xArray yArray headingArray valArray val dist newX newY pOop pArray |\r\tself export: true.\r\tself inline: true.\r\tself var: 'pArray' declareC: 'unsigned char *pArray'.\r\tself var: 'xArray' declareC: 'float *xArray'.\r\tself var: 'yArray' declareC: 'float *yArray'.\r\tself var: 'headingArray' declareC: 'float *headingArray'.\r\tself var: 'valArray' declareC: 'float *valArray'.\r\tself var: 'val' declareC: 'double val'.\r\tself var: 'destHeight' declareC: 'double destHeight'.\r\tself var: 'destWidth' declareC: 'double destWidth'.\r\tself var: 'dist' declareC: 'double dist'.\r\tself var: 'newX' declareC: 'double newX'.\r\tself var: 'newY' declareC: 'double newY'.\r\r\tbottomEdgeMode _ interpreterProxy stackIntegerValue: 0.\r\ttopEdgeMode _ interpreterProxy stackIntegerValue: 1.\r\trightEdgeMode _ interpreterProxy stackIntegerValue: 2.\r\tleftEdgeMode _ interpreterProxy stackIntegerValue: 3.\r\tdestHeight _ interpreterProxy stackFloatValue: 4.\r\tdestWidth _ interpreterProxy stackFloatValue: 5.\r\tvalOop _ interpreterProxy stackValue: 6.\r\theadingOop _ interpreterProxy stackValue: 7.\r\tyOop _ interpreterProxy stackValue: 8.\r\txOop _ interpreterProxy stackValue: 9.\r\tpOop _ interpreterProxy stackValue: 10.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isBytes: pOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: xOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: yOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: headingOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isFloatObject: valOop) ifTrue: [\r\t\tisValVector _ false.\r\t] ifFalse: [\r\t\t(interpreterProxy isWords: valOop) ifTrue: [\r\t\t\tisValVector _ true\r\t\t] ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t].\r\r\tsize _ interpreterProxy slotSizeOf: xOop.\r\t(interpreterProxy slotSizeOf: yOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy slotSizeOf: headingOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy slotSizeOf: pOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\tisValVector ifTrue: [\r\t\t(interpreterProxy slotSizeOf: valOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t].\r\r\tpArray _ interpreterProxy firstIndexableField: pOop.\r\txArray _ interpreterProxy firstIndexableField: xOop.\r\tyArray _ interpreterProxy firstIndexableField: yOop.\r\theadingArray _ interpreterProxy firstIndexableField: headingOop.\r\tisValVector ifTrue: [\r\t\tvalArray _ interpreterProxy firstIndexableField: valOop.\r\t] ifFalse: [\r\t\tval _ interpreterProxy floatValueOf: valOop\r\t].\r\r\t0 to: size -1 do: [:i |\r\t\t(pArray at: i) = 1 ifTrue: [\r\t\t\tisValVector ifTrue: [\r\t\t\t\tdist _ valArray at: i.\r\t\t\t] ifFalse: [\r\t\t\t\tdist _ val.\r\t\t\t].\r\t\t\tnewX _ (xArray at: i) + (dist * (headingArray at: i) cos).\r\t\t\tnewY _ (yArray at: i) - (dist * (headingArray at: i) sin).\r\t\t\tself scalarXAt: i xArray: xArray headingArray: headingArray value: newX destWidth: destWidth leftEdgeMode: leftEdgeMode rightEdgeMode: rightEdgeMode.\r\t\t\tself scalarYAt: i yArray: yArray headingArray: headingArray value: newY destHeight: destHeight topEdgeMode: topEdgeMode bottomEdgeMode: bottomEdgeMode\r\t\t].\r\t].\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 11.\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 01:28'!\rprimUpHill\r\r\t| sniffRange height width bitsOop tH tY tX bits turtleX turtleY startX endX startY endY maxVal maxValX rowOffset thisVal maxValY ret |\r\tself inline: true.\r\tself export: true.\r\r\tself var: 'bits' declareC: 'unsigned int *bits'.\r\tself var: 'tX' declareC: 'double tX'.\r\tself var: 'tY' declareC: 'double tY'.\r\tself var: 'tH' declareC: 'double tH'.\r\r\tsniffRange _ interpreterProxy stackIntegerValue: 0.\r\theight _ interpreterProxy stackIntegerValue: 1.\r\twidth _ interpreterProxy stackIntegerValue: 2.\r\tbitsOop _ interpreterProxy stackValue: 3.\r\ttH _ interpreterProxy stackFloatValue: 4.\r\ttY _ interpreterProxy stackFloatValue: 5.\r\ttX _ interpreterProxy stackFloatValue: 6.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\t(interpreterProxy isWords: bitsOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy slotSizeOf: bitsOop) ~= (height * width) ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\tbits _ interpreterProxy firstIndexableField: bitsOop.\r\r\tturtleX _ self cCode: 'tX' inSmalltalk: [tX asInteger].\r\tturtleY _ self cCode: 'tY' inSmalltalk: [tY asInteger].\r\tturtleX _ turtleX max: 0.\r\tturtleY _ turtleY max: 0.\r\tturtleX _ turtleX min: width - 1.\r\tturtleY _ turtleY min: height - 1.\r\tstartX _ turtleX - sniffRange max: 0.\r\tendX _ (turtleX + sniffRange) min: (width - 1).\r\tstartY _ (turtleY - sniffRange) max: 0.\r\tendY _ (turtleY + sniffRange) min: (height - 1).\r\tmaxVal _ bits at: turtleY * width + turtleX.\r\tmaxValX _ -1.\r\tstartY to: endY do: [:y | \r\t\trowOffset _ y * width.\r\t\tstartX to: endX do: [:x | \r\t\t\tthisVal _ bits at: rowOffset + x.\r\t\t\tthisVal > maxVal ifTrue: [\r\t\t\t\tmaxValX _ x.\r\t\t\t\tmaxValY _ y.\r\t\t\t\tmaxVal _ thisVal\r\t\t\t].\r\t\t].\r\t].\r\t-1 = maxValX\r\t\tifTrue: [ret _ self radiansToDegrees: tH]\r\t\tifFalse: [\r\t\t\tret _ (self degreesFromX: (self cCoerce: maxValX - turtleX to: 'double') y: (self cCoerce: maxValY - turtleY to: 'double')) + 90.0.\r\t\t].\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 8.\r\tinterpreterProxy pushFloat: ret.\r\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 01:28'!\rradiansToDegrees: radians\r\r\t| deg degrees |\r\tself inline: true.\r\tself returnTypeC: 'double'.\r\tself var: 'degrees' declareC: 'double degrees'.\r\tself var: 'deg' declareC: 'double deg'.\r\tself var: 'radians' declareC: 'double radians'.\r\tself var: 'headingRadians' declareC: 'double headingRadians'.\r\r\tdegrees _ radians / 0.0174532925199433.\r\tdeg _ 90.0 - degrees.\r\tdeg > 0.0 ifFalse: [deg _ deg + 360.0].\r\t^ deg.\r\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 01:28'!\rrandomIntoFloatArray\r\r\t| range factor floatArrayOop to from size floatArray |\r\tself export: true.\r\tself inline: true.\r\tself var: 'factor' declareC: 'double factor'.\r\tself var: 'floatArray' declareC: 'float *floatArray'.\r\r\tfactor _ interpreterProxy stackFloatValue: 0.\r\tfloatArrayOop _ interpreterProxy stackValue: 1.\r\tto _ interpreterProxy stackIntegerValue: 2.\r\tfrom _ interpreterProxy stackIntegerValue: 3.\r\trange _ interpreterProxy stackIntegerValue: 4.\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isWords: floatArrayOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\tsize _ interpreterProxy stSizeOf: floatArrayOop.\r\t(size >= to and: [from >= 1 and: [to >= from]]) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\tfloatArray _ interpreterProxy firstIndexableField: floatArrayOop.\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\tfrom to: to do: [:index |\r\t\tfloatArray at: index-1 put: (self cCoerce: (self kedamaRandom2: range) to: 'double') * factor.\r\t].\r\r\tinterpreterProxy pop: 5.\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 01:28'!\rrandomIntoIntegerArray\r\r\t| range factor integerArrayOop to from size integerArray |\r\tself export: true.\r\tself inline: true.\r\tself var: 'factor' declareC: 'double factor'.\r\tself var: 'integerArray' declareC: 'unsigned int *integerArray'.\r\r\tfactor _ interpreterProxy stackFloatValue: 0.\r\tintegerArrayOop _ interpreterProxy stackValue: 1.\r\tto _ interpreterProxy stackIntegerValue: 2.\r\tfrom _ interpreterProxy stackIntegerValue: 3.\r\trange _ interpreterProxy stackIntegerValue: 4.\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isWords: integerArrayOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\tsize _ interpreterProxy stSizeOf: integerArrayOop.\r\t(size >= to and: [from >= 1 and: [to >= from]]) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\tintegerArray _ interpreterProxy firstIndexableField: integerArrayOop.\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\tfrom to: to do: [:index |\r\t\tintegerArray at: index-1 put: (self cCoerce: ((self cCoerce: (self kedamaRandom2: range) to: 'double') * factor) to: 'int').\r\t].\r\r\tinterpreterProxy pop: 5.\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 01:28'!\rrandomRange\r\r\t| range ret |\r\tself export: true.\r\tself inline: true.\r\trange _ interpreterProxy stackIntegerValue: 0.\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\tret _ self kedamaRandom2: range.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\tinterpreterProxy pop: 2.\r\tinterpreterProxy pushInteger: ret.\r\t^ self.\r\r\t! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 01:28'!\rscalarGetAngleTo\r\r\t| fromY fromX toY toX x y r |\r\tself export: true.\r\tself inline: true.\r\tself var: 'toX' declareC: 'double toX'.\r\tself var: 'toY' declareC: 'double toY'.\r\tself var: 'fromX' declareC: 'double fromX'.\r\tself var: 'fromY' declareC: 'double fromY'.\r\tself var: 'x' declareC: 'double x'.\r\tself var: 'y' declareC: 'double y'.\r\tself var: 'r' declareC: 'double r'.\r\r\tfromY _ interpreterProxy stackFloatValue: 0.\r\tfromX _ interpreterProxy stackFloatValue: 1.\r\ttoY _ interpreterProxy stackFloatValue: 2.\r\ttoX _ interpreterProxy stackFloatValue: 3.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\tx _ toX - fromX.\r\ty _ toY - fromY.\r\r\tr _ self degreesFromX: x y: y.\r\tr _ r + 90.0.\r\tr > 360.0 ifTrue: [r _ r - 360.0].\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 5.\r\tinterpreterProxy pushFloat: r.\r\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 01:28'!\rscalarGetDistanceTo\r\r\t| fromY fromX toY toX x y r |\r\tself export: true.\r\tself inline: true.\r\tself var: 'toX' declareC: 'double toX'.\r\tself var: 'toY' declareC: 'double toY'.\r\tself var: 'fromX' declareC: 'double fromX'.\r\tself var: 'fromY' declareC: 'double fromY'.\r\tself var: 'x' declareC: 'double x'.\r\tself var: 'y' declareC: 'double y'.\r\tself var: 'r' declareC: 'double r'.\r\r\tfromY _ interpreterProxy stackFloatValue: 0.\r\tfromX _ interpreterProxy stackFloatValue: 1.\r\ttoY _ interpreterProxy stackFloatValue: 2.\r\ttoX _ interpreterProxy stackFloatValue: 3.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\tx _ fromX - toX.\r\ty _ fromY - toY.\r\r\tr _ ((x * x) + (y * y)) sqrt.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 5.\r\tinterpreterProxy pushFloat: r.\r\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 01:28'!\rscalarXAt: index xArray: xArray headingArray: headingArray value: val destWidth: destWidth leftEdgeMode: leftEdgeMode rightEdgeMode: rightEdgeMode\r\r\t| newX headingRadians |\r\tself inline: true.\r\r\tself var: 'xArray' declareC: 'float* xArray'.\r\tself var: 'headingArray' declareC: 'float* headingArray'.\r\tself var: 'destWidth' declareC: 'double destWidth'.\r\tself var: 'val' declareC: 'double val'.\r\tself var: 'newX' declareC: 'double newX'.\r\tself var: 'headingRadians' declareC: 'double headingRadians'.\r\r\tnewX _ val.\r\tnewX < 0.0 ifTrue: [\r\t\tleftEdgeMode = 1 ifTrue: [\r\t\t\t\"wrap\"\r\t\t\tnewX _ newX + destWidth.\r\t\t].\r\t\tleftEdgeMode = 2 ifTrue: [\r\t\t\t\"stick\"\r\t\t\tnewX _ 0.0.\r\t\t].\r\t\tleftEdgeMode = 3 ifTrue: [\r\t\t\t\"bounce\"\r\t\t\tnewX _ 0.0 - newX.\r\t\t\theadingRadians _ headingArray at: index.\r\t\t\theadingRadians <  3.141592653589793\r\t\t\t\tifTrue: [headingArray at: index put: 3.141592653589793 - headingRadians]\r\t\t\t\tifFalse: [headingArray at: index put: 9.42477796076938 - headingRadians].\r\t\t].\r\t].\r\r\tnewX >= destWidth ifTrue: [\r\t\trightEdgeMode = 1 ifTrue: [\r\t\t\tnewX _ newX - destWidth.\r\t\t].\r\t\trightEdgeMode = 2 ifTrue: [\r\t\t\tnewX _ destWidth - 0.000001.\r\t\t].\r\t\trightEdgeMode = 3 ifTrue: [\r\t\t\tnewX _ (destWidth - 0.000001) - (newX - destWidth).\r\t\t\theadingRadians _ headingArray at: index.\r\t\t\theadingRadians < 3.141592653589793\r\t\t\t\tifTrue: [headingArray at: index put: (3.141592653589793 - headingRadians)]\r\t\t\t\tifFalse: [headingArray at: index put: (9.42477796076938 - headingRadians)].\r\t\t]\r\t].\r\txArray at: index put: newX.\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 01:28'!\rscalarYAt: index yArray: yArray headingArray: headingArray value: val destHeight: destHeight topEdgeMode: topEdgeMode bottomEdgeMode: bottomEdgeMode\r\r\t| newY |\r\tself inline: true.\r\r\tself var: 'yArray' declareC: 'float* yArray'.\r\tself var: 'headingArray' declareC: 'float* headingArray'.\r\tself var: 'destHeight' declareC: 'double destHeight'.\r\tself var: 'val' declareC: 'double val'.\r\tself var: 'newY' declareC: 'double newY'.\r\r\tnewY _ val.\r\tnewY < 0.0 ifTrue: [\r\t\ttopEdgeMode = 1 ifTrue: [\r\t\t\t\"wrap\"\r\t\t\tnewY _ newY + destHeight.\r\t\t].\r\t\ttopEdgeMode = 2 ifTrue: [\r\t\t\t\"stick\"\r\t\t\tnewY _ 0.0.\r\t\t].\r\t\ttopEdgeMode = 3 ifTrue: [\r\t\t\t\"bounce\"\r\t\t\tnewY _ 0.0 - newY.\r\t\t\theadingArray at: index put: (6.283185307179586 - (headingArray at: index)).\r\t\t].\r\t].\r\r\tnewY >= destHeight ifTrue: [\r\t\tbottomEdgeMode = 1 ifTrue: [\r\t\t\tnewY _ newY - destHeight.\r\t\t].\r\t\tbottomEdgeMode = 2 ifTrue: [\r\t\t\tnewY _ destHeight - 0.000001.\r\t\t].\r\t\tbottomEdgeMode = 3 ifTrue: [\r\t\t\tnewY _ (destHeight - 0.000001) - (newY - destHeight).\r\t\t\theadingArray at: index put: (6.283185307179586 - (headingArray at: index)).\r\t\t]\r\t].\r\tyArray at: index put: newY.\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 15:03'!\rsetHeadingArrayFrom\r\r\t| resultOop headingOop size headingArray resultArray heading isValVector pOop pArray |\r\tself export: true.\r\tself inline: true.\r\tself var: 'pArray' declareC: 'unsigned char *pArray'.\r\tself var: 'headingArray' declareC: 'float *headingArray'.\r\tself var: 'resultArray' declareC: 'float *resultArray'.\r\tself var: 'heading' declareC: 'double heading'.\r\r\tresultOop _ interpreterProxy stackValue: 0.\r\theadingOop _ interpreterProxy stackValue: 1.\r\tpOop _ interpreterProxy stackValue: 2.\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isBytes: pOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: headingOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\tsize _ interpreterProxy slotSizeOf: headingOop.\r\t(interpreterProxy isFloatObject: resultOop) ifTrue: [\r\t\tisValVector _ false.\r\t] ifFalse: [\r\t\t(interpreterProxy isWords: resultOop) ifTrue: [\r\t\t\t(interpreterProxy slotSizeOf: resultOop) ~= size\r\t\t\t\tifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t\t\tisValVector _ true\r\t\t] ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t].\r\r\tpArray _ interpreterProxy firstIndexableField: pOop.\r\theadingArray _ interpreterProxy firstIndexableField: headingOop.\r\tisValVector ifTrue: [\r\t\tresultArray _ interpreterProxy firstIndexableField: resultOop.\r\t] ifFalse: [\r\t\theading _ interpreterProxy floatValueOf: resultOop.\r\t\theading _ self degreesToRadians: heading.\r\t].\r\r\t0 to: size - 1 do: [:i |\r\t\t(pArray at: i) = 1 ifTrue: [\r\t\t\tisValVector ifTrue: [\r\t\t\t\theading _ resultArray at: i.\r\t\t\t\theading _ self degreesToRadians: heading.\r\t\t\t].\r\t\t\theadingArray at: i put: heading.\r\t\t].\r\t].\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 3.\r\r\t! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 01:28'!\rsetScalarHeading\r\r\t| headingOop headingArray heading index |\r\tself export: true.\r\tself inline: true.\r\tself var: 'headingArray' declareC: 'float *headingArray'.\r\tself var: 'heading' declareC: 'double heading'.\r\r\theading _ interpreterProxy stackFloatValue: 0.\r\theadingOop _ interpreterProxy stackValue: 1.\r\tindex _ interpreterProxy stackIntegerValue: 2.\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isWords: headingOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\t(interpreterProxy slotSizeOf: headingOop) < index ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\theadingArray _ interpreterProxy firstIndexableField: headingOop.\r\r\theadingArray at: index - 1 put: (self degreesToRadians: heading).\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 3.\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 01:28'!\rshutdownModule\r\r\tself export: true.\r\t^ true.\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 01:28'!\rturtleScalarSetX\r\r\t| xArray headingArray val destWidth xOop headingOop leftEdgeMode rightEdgeMode xIndex size |\r\tself export: true.\r\tself inline: true.\r\tself var: 'xArray' declareC: 'float *xArray'.\r\tself var: 'headingArray' declareC: 'float *headingArray'.\r\tself var: 'val' declareC: 'double val'.\r\tself var: 'destWidth' declareC: 'double destWidth'.\r\r\trightEdgeMode _ interpreterProxy stackIntegerValue: 0.\r\tleftEdgeMode _ interpreterProxy stackIntegerValue: 1.\r\tdestWidth _ interpreterProxy stackFloatValue: 2.\r\tval _ interpreterProxy stackFloatValue: 3.\r\theadingOop _ interpreterProxy stackValue: 4.\r\txIndex _ interpreterProxy stackIntegerValue: 5.\r\txOop _ interpreterProxy stackValue: 6.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isWords: xOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: headingOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\tsize _ interpreterProxy slotSizeOf: xOop.\r\t(interpreterProxy slotSizeOf: headingOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\txArray _ interpreterProxy firstIndexableField: xOop.\r\theadingArray _ interpreterProxy firstIndexableField: headingOop.\r\r\tself scalarXAt: xIndex - 1 xArray: xArray headingArray: headingArray value: val destWidth: destWidth leftEdgeMode: leftEdgeMode rightEdgeMode: rightEdgeMode.\r\t\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 7.\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 01:28'!\rturtleScalarSetY\r\r\t| yArray headingArray val destHeight yOop headingOop size yIndex topEdgeMode bottomEdgeMode |\r\tself export: true.\r\tself inline: true.\r\tself var: 'yArray' declareC: 'float *yArray'.\r\tself var: 'headingArray' declareC: 'float *headingArray'.\r\tself var: 'val' declareC: 'double val'.\r\tself var: 'destHeight' declareC: 'double destHeight'.\r\r\tbottomEdgeMode _ interpreterProxy stackIntegerValue: 0.\r\ttopEdgeMode _ interpreterProxy stackIntegerValue: 1.\r\tdestHeight _ interpreterProxy stackFloatValue: 2.\r\tval _ interpreterProxy stackFloatValue: 3.\r\theadingOop _ interpreterProxy stackValue: 4.\r\tyIndex _ interpreterProxy stackIntegerValue: 5.\r\tyOop _ interpreterProxy stackValue: 6.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isWords: yOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: headingOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\tsize _ interpreterProxy slotSizeOf: yOop.\r\t(interpreterProxy slotSizeOf: headingOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\tyArray _ interpreterProxy firstIndexableField: yOop.\r\theadingArray _ interpreterProxy firstIndexableField: headingOop.\r\r\tself scalarYAt: yIndex - 1 yArray: yArray headingArray: headingArray value: val destHeight: destHeight topEdgeMode: topEdgeMode bottomEdgeMode: bottomEdgeMode.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 7.\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 1/20/2006 22:05'!\rturtlesSetX\r\r\t| xArray headingArray valArray val destWidth xOop headingOop valOop leftEdgeMode rightEdgeMode isValVector size newX pOop pArray isWordVector wordValArray |\r\tself export: true.\r\tself inline: true.\r\t\r\tself var: 'pArray' declareC: 'unsigned char *pArray'.\r\tself var: 'xArray' declareC: 'float *xArray'.\r\tself var: 'headingArray' declareC: 'float *headingArray'.\r\tself var: 'valArray' declareC: 'float *valArray'.\r\tself var: 'wordValArray' declareC: 'unsigned int *wordValArray'.\r\tself var: 'val' declareC: 'double val'.\r\tself var: 'destWidth' declareC: 'double destWidth'.\r\tself var: 'newX' declareC: 'double newX'.\r\r\trightEdgeMode _ interpreterProxy stackIntegerValue: 0.\r\tleftEdgeMode _ interpreterProxy stackIntegerValue: 1.\r\tdestWidth _ interpreterProxy stackFloatValue: 2.\r\tvalOop _ interpreterProxy stackValue: 3.\r\theadingOop _ interpreterProxy stackValue: 4.\r\txOop _ interpreterProxy stackValue: 5.\r\tpOop _ interpreterProxy stackValue: 6.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isBytes: pOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: xOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: headingOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isFloatObject: valOop) ifTrue: [\r\t\tisValVector _ false\r\t] ifFalse: [\r\t\t(interpreterProxy isWords: valOop) ifTrue: [\r\t\t\tisValVector _ true.\r\t\t\tisWordVector _ interpreterProxy is: valOop MemberOf: 'WordArray'.\r\t\t] ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t].\r\r\tsize _ interpreterProxy slotSizeOf: xOop.\r\t(interpreterProxy slotSizeOf: pOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy slotSizeOf: headingOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\tisValVector ifTrue: [\r\t\t(interpreterProxy slotSizeOf: valOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t].\r\r\tpArray _ interpreterProxy firstIndexableField: pOop.\r\txArray _ interpreterProxy firstIndexableField: xOop.\r\theadingArray _ interpreterProxy firstIndexableField: headingOop.\r\tisValVector ifTrue: [\r\t\tisWordVector ifTrue: [\r\t\t\twordValArray _ interpreterProxy firstIndexableField: valOop.\r\t\t] ifFalse: [\r\t\t\tvalArray _ interpreterProxy firstIndexableField: valOop.\r\t\t].\r\t] ifFalse: [\r\t\tval _ interpreterProxy floatValueOf: valOop\r\t].\r\r\t0 to: size - 1 do: [:i |\r\t\t(pArray at: i) = 1 ifTrue: [\r\t\t\tisValVector ifTrue: [\r\t\t\t\tisWordVector ifTrue: [\r\t\t\t\t\tnewX _ wordValArray at: i.\r\t\t\t\t\tself cCode: '' inSmalltalk: [newX _ newX asFloat].\r\t\t\t\t] ifFalse: [\r\t\t\t\t\tnewX _ valArray at: i.\r\t\t\t\t].\r\t\t\t] ifFalse: [\r\t\t\t\tnewX _ val.\r\t\t\t].\r\t\t\tself scalarXAt: i xArray: xArray headingArray: headingArray value: newX destWidth: destWidth leftEdgeMode: leftEdgeMode rightEdgeMode: rightEdgeMode.\r\t\t].\r\t].\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 7.\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 1/20/2006 22:03'!\rturtlesSetY\r\r\t| yArray headingArray valArray val destHeight yOop headingOop valOop topEdgeMode bottomEdgeMode isValVector size newY pOop pArray isWordVector wordValArray |\r\tself export: true.\r\tself inline: true.\r\tself var: 'pArray' declareC: 'unsigned char *pArray'.\r\tself var: 'yArray' declareC: 'float *yArray'.\r\tself var: 'headingArray' declareC: 'float *headingArray'.\r\tself var: 'valArray' declareC: 'float *valArray'.\r\tself var: 'wordValArray' declareC: 'unsigned int *wordValArray'.\r\tself var: 'val' declareC: 'double val'.\r\tself var: 'destHeight' declareC: 'double destHeight'.\r\tself var: 'newY' declareC: 'double newY'.\r\r\tbottomEdgeMode _ interpreterProxy stackIntegerValue: 0.\r\ttopEdgeMode _ interpreterProxy stackIntegerValue: 1.\r\tdestHeight _ interpreterProxy stackFloatValue: 2.\r\tvalOop _ interpreterProxy stackValue: 3.\r\theadingOop _ interpreterProxy stackValue: 4.\r\tyOop _ interpreterProxy stackValue: 5.\r\tpOop _ interpreterProxy stackValue: 6.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isBytes: pOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: yOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: headingOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isFloatObject: valOop) ifTrue: [\r\t\tisValVector _ false\r\t] ifFalse: [\r\t\t(interpreterProxy isWords: valOop) ifTrue: [\r\t\t\tisValVector _ true.\r\t\t\tisWordVector _ interpreterProxy is: valOop MemberOf: 'WordArray'.\r\t\t] ifFalse: [\r\t\t\tinterpreterProxy primitiveFail. ^ nil\r\t\t].\r\t].\r\r\tsize _ interpreterProxy slotSizeOf: yOop.\r\t(interpreterProxy slotSizeOf: pOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy slotSizeOf: headingOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\tisValVector ifTrue: [\r\t\t(interpreterProxy slotSizeOf: valOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t].\r\r\tpArray _ interpreterProxy firstIndexableField: pOop.\r\tyArray _ interpreterProxy firstIndexableField: yOop.\r\theadingArray _ interpreterProxy firstIndexableField: headingOop.\r\tisValVector ifTrue: [\r\t\tisWordVector ifTrue: [\r\t\t\twordValArray _ interpreterProxy firstIndexableField: valOop.\r\t\t] ifFalse: [\r\t\t\tvalArray _ interpreterProxy firstIndexableField: valOop.\r\t\t].\r\t] ifFalse: [\r\t\tval _ interpreterProxy floatValueOf: valOop\r\t].\r\r\t0 to: size - 1 do: [:i |\r\t\t(pArray at: i) = 1 ifTrue: [\r\t\t\tisValVector ifTrue: [\r\t\t\t\tisWordVector ifTrue: [\r\t\t\t\t\tnewY _ wordValArray at: i.\r\t\t\t\t\tself cCode: '' inSmalltalk: [newY _ newY asFloat].\r\t\t\t\t] ifFalse: [\r\t\t\t\t\tnewY _ valArray at: i.\r\t\t\t\t].\r\t\t\t] ifFalse: [\r\t\t\t\tnewY _ val.\r\t\t\t].\r\t\t\tself scalarYAt: i yArray: yArray headingArray: headingArray value: newY destHeight: destHeight topEdgeMode: topEdgeMode bottomEdgeMode: bottomEdgeMode.\r\t\t].\r\t].\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 7.\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 01:28'!\rvectorGetAngleTo\r\r\t| x y resultOop yArrayOop xArrayOop pYOop pXOop size isVector result xArray yArray pX pY ppx ppy r |\r\tself export: true.\r\tself inline: true.\r\tself var: 'x' declareC: 'double x'.\r\tself var: 'y' declareC: 'double y'.\r\tself var: 'result' declareC: 'float *result'.\r\tself var: 'xArray' declareC: 'float *xArray'.\r\tself var: 'yArray' declareC: 'float *yArray'.\r\tself var: 'pX' declareC: 'float *pX'.\r\tself var: 'pY' declareC: 'float *pY'.\r\tself var: 'ppx' declareC: 'double ppx'.\r\tself var: 'ppy' declareC: 'double ppy'.\r\r\tresultOop _ interpreterProxy stackValue: 0.\r\tyArrayOop _ interpreterProxy stackValue: 1.\r\txArrayOop _ interpreterProxy stackValue: 2.\r\tpYOop _ interpreterProxy stackValue: 3.\r\tpXOop _ interpreterProxy stackValue: 4.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isWords: resultOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: xArrayOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: yArrayOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\tsize _ interpreterProxy stSizeOf: resultOop.\r\tsize < 0 ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy stSizeOf: xArrayOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy stSizeOf: yArrayOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\t(interpreterProxy isFloatObject: pXOop) ifTrue: [\r\t\t(interpreterProxy isFloatObject: pYOop)\r\t\t\tifTrue: [isVector _ false]\r\t\t\tifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\t] ifFalse: [\r\t\t(interpreterProxy isFloatObject: pYOop)\r\t\t\tifFalse: [isVector _ true]\r\t\t\tifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t].\r\r\tisVector ifTrue: [\r\t\t(interpreterProxy stSizeOf: pXOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t\t(interpreterProxy stSizeOf: pYOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t].\r\r\tresult _ interpreterProxy firstIndexableField: resultOop.\r\txArray _ interpreterProxy firstIndexableField: xArrayOop.\r\tyArray _ interpreterProxy firstIndexableField: yArrayOop.\r\tisVector ifTrue: [\r\t\tpX _ interpreterProxy firstIndexableField: pXOop.\r\t\tpY _ interpreterProxy firstIndexableField: pYOop.\r\t].\r\r\tisVector ifFalse: [\r\t\tppx _ interpreterProxy floatValueOf: pXOop.\r\t\tppy _ interpreterProxy floatValueOf: pYOop.\r\t].\r\r\t0 to: size - 1 do: [:index |\r\t\tisVector ifTrue: [\r\t\t\tppx _ pX at: index.\r\t\t\tppy _ pY at: index.\r\t\t].\r\r\t\tx _ ppx - (xArray at: index).\r\t\ty _ ppy - (yArray at: index).\r\t\tr _ self degreesFromX: x y: y.\r\t\tr _ r + 90.0.\r\t\tr > 360.0 ifTrue: [r _ r - 360.0].\r\r\t\tresult at: index put: r.\r\t].\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 6.\r\tinterpreterProxy push: resultOop.\r\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 01:28'!\rvectorGetDistanceTo\r\r\t| x y resultOop yArrayOop xArrayOop pYOop pXOop size isVector result xArray yArray pX pY ppx ppy |\r\tself export: true.\r\tself inline: true.\r\tself var: 'x' declareC: 'double x'.\r\tself var: 'y' declareC: 'double y'.\r\tself var: 'result' declareC: 'float *result'.\r\tself var: 'xArray' declareC: 'float *xArray'.\r\tself var: 'yArray' declareC: 'float *yArray'.\r\tself var: 'pX' declareC: 'float *pX'.\r\tself var: 'pY' declareC: 'float *pY'.\r\tself var: 'ppx' declareC: 'double ppx'.\r\tself var: 'ppy' declareC: 'double ppy'.\r\r\tresultOop _ interpreterProxy stackValue: 0.\r\tyArrayOop _ interpreterProxy stackValue: 1.\r\txArrayOop _ interpreterProxy stackValue: 2.\r\tpYOop _ interpreterProxy stackValue: 3.\r\tpXOop _ interpreterProxy stackValue: 4.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\t(interpreterProxy isWords: resultOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: xArrayOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy isWords: yArrayOop) ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\tsize _ interpreterProxy stSizeOf: resultOop.\r\tsize < 0 ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy stSizeOf: xArrayOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t(interpreterProxy stSizeOf: yArrayOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\r\t(interpreterProxy isFloatObject: pXOop) ifTrue: [\r\t\t(interpreterProxy isFloatObject: pYOop)\r\t\t\tifTrue: [isVector _ false]\r\t\t\tifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\t] ifFalse: [\r\t\t(interpreterProxy isFloatObject: pYOop)\r\t\t\tifFalse: [isVector _ true]\r\t\t\tifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t].\r\r\tisVector ifTrue: [\r\t\t(interpreterProxy stSizeOf: pXOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t\t(interpreterProxy stSizeOf: pYOop) ~= size ifTrue: [interpreterProxy primitiveFail. ^ nil].\r\t].\r\r\tresult _ interpreterProxy firstIndexableField: resultOop.\r\txArray _ interpreterProxy firstIndexableField: xArrayOop.\r\tyArray _ interpreterProxy firstIndexableField: yArrayOop.\r\tisVector ifTrue: [\r\t\tpX _ interpreterProxy firstIndexableField: pXOop.\r\t\tpY _ interpreterProxy firstIndexableField: pYOop.\r\t].\r\r\tisVector ifFalse: [\r\t\tppx _ interpreterProxy floatValueOf: pXOop.\r\t\tppy _ interpreterProxy floatValueOf: pYOop.\r\t].\r\r\t0 to: size - 1 do: [:index |\r\t\tisVector ifTrue: [\r\t\t\tppx _ pX at: index.\r\t\t\tppy _ pY at: index.\r\t\t].\r\r\t\tx _ ppx - (xArray at: index).\r\t\ty _ ppy - (yArray at: index).\r\t\tresult at: index put: ((x * x) + (y * y)) sqrt.\r\t].\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\tinterpreterProxy pop: 6.\r\tinterpreterProxy push: resultOop.\r\r! !\r\r!KedamaPlugin2 methodsFor: 'primitives' stamp: 'yo 10/13/2005 01:28'!\rzoomBitmap\r\r\t| yFactor xFactor sHeight sWidth dst src srcSize dstSize sOrigin dOrigin srcIndex bit dstIndex srcOrigin |\r\r\tself export: true.\r\tself inline: true.\r\tself var: 'sOrigin' declareC: 'unsigned int* sOrigin'.\r\tself var: 'dOrigin' declareC: 'unsigned int* dOrigin'.\r\r\tyFactor _ interpreterProxy stackIntegerValue: 0.\r\txFactor _ interpreterProxy stackIntegerValue: 1.\r\tsHeight _ interpreterProxy stackIntegerValue: 2.\r\tsWidth _ interpreterProxy stackIntegerValue: 3.\r\tdst _ interpreterProxy stackValue: 4.\r\tsrc _ interpreterProxy stackValue: 5.\r\r\tinterpreterProxy failed ifTrue: [^ nil].\r\r\tsrcSize _ interpreterProxy slotSizeOf: src.\r\tdstSize _ interpreterProxy slotSizeOf: dst.\r\r\t(sWidth * sHeight) = srcSize ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\t(srcSize * xFactor * yFactor) = dstSize ifFalse: [interpreterProxy primitiveFail. ^ nil].\r\r\tsOrigin _ interpreterProxy firstIndexableField: src.\r\tdOrigin _ interpreterProxy firstIndexableField: dst.\r\r\tsrcIndex _ 0.\r\tsrcOrigin _ 0.\r\tdstIndex _ 0.\r\t0 to: sHeight - 1 do: [:sy |\r\t\t0 to: yFactor - 1 do: [:y |\r\t\t\t0 to: sWidth - 1 do: [:sx |\r\t\t\t\tbit _ sOrigin at: srcIndex.\r\t\t\t\tsrcIndex _ srcIndex + 1.\r\t\t\t\t0 to: xFactor - 1 do: [:dummy |\r\t\t\t\t\tdOrigin at: dstIndex put: bit.\r\t\t\t\t\tdstIndex _ dstIndex + 1.\r\t\t\t\t].\r\t\t\t].\r\t\t\tsrcIndex _ srcOrigin.\r\t\t].\r\t\tsrcOrigin _ srcOrigin + sWidth.\r\t\tsrcIndex _ srcOrigin.\r\t].\r\r\tinterpreterProxy pop: 6.\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rKedamaPlugin2 class\r\tinstanceVariableNames: ''!\r\r!KedamaPlugin2 class methodsFor: 'as yet unclassified' stamp: 'yo 10/13/2005 01:29'!\rdeclareCVarsIn: cg\r\r\tcg var: #kedamaRandomSeed type: 'unsigned int'.\r\tcg var: #randA type: 'unsigned int'.\r\tcg var: #randM type: 'unsigned int'.\r\tcg var: #randQ type: 'unsigned int'.\r\tcg var: #randR type: 'unsigned int'.\r! !\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/LocalePlugin/Info-SqueakLocalePlugin__Upgraded_.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>LocalePlugin</string>\n\t<key>CFBundleGetInfoString</key>\n\t<string>LocalePlugin for Squeak</string>\n\t<key>CFBundleIconFile</key>\n\t<string>SqueakPlugin.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.LocalePlugin</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>LocalePlugin for Squeak</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0.1b1</string>\n\t<key>CFBundleSignature</key>\n\t<string>FAST</string>\n\t<key>CFBundleVersion</key>\n\t<string>1.0.1b1</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/LocalePlugin/LocalePlugin.proj.xml",
    "content": "<?xml version=\"1.0\"?>\r<?codewarrior exportversion=\"1.0\" ideversion=\"4.0\"?>\r<!DOCTYPE PROJECT [\r\r<!ELEMENT PROJECT (TARGETLIST, TARGETORDER, GROUPLIST, DESIGNLIST?)>\r<!ELEMENT TARGETLIST (TARGET+)>\r<!ELEMENT TARGET (NAME, SETTINGLIST, FILELIST?, LINKORDER?, SEGMENTLIST?, OVERLAYGROUPLIST?, SUBTARGETLIST?, SUBPROJECTLIST?)>\r<!ELEMENT NAME (#PCDATA)>\r<!ELEMENT USERSOURCETREETYPE (#PCDATA)>\r<!ELEMENT PATH (#PCDATA)>\r<!ELEMENT FILELIST (FILE*)>\r<!ELEMENT FILE (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?, ROOTFILEREF?, FILEKIND?, FILEFLAGS?)>\r<!ELEMENT PATHTYPE (#PCDATA)>\r<!ELEMENT PATHROOT (#PCDATA)>\r<!ELEMENT ACCESSPATH (#PCDATA)>\r<!ELEMENT PATHFORMAT (#PCDATA)>\r<!ELEMENT ROOTFILEREF (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)>\r<!ELEMENT FILEKIND (#PCDATA)>\r<!ELEMENT FILEFLAGS (#PCDATA)>\r<!ELEMENT FILEREF (TARGETNAME?, PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)>\r<!ELEMENT TARGETNAME (#PCDATA)>\r<!ELEMENT SETTINGLIST ((SETTING|PANELDATA)+)>\r<!ELEMENT SETTING (NAME?, (VALUE|(SETTING+)))>\r<!ELEMENT PANELDATA (NAME, VALUE)>\r<!ELEMENT VALUE (#PCDATA)>\r<!ELEMENT LINKORDER (FILEREF*)>\r<!ELEMENT SEGMENTLIST (SEGMENT+)>\r<!ELEMENT SEGMENT (NAME, ATTRIBUTES?, FILEREF*)>\r<!ELEMENT ATTRIBUTES (#PCDATA)>\r<!ELEMENT OVERLAYGROUPLIST (OVERLAYGROUP+)>\r<!ELEMENT OVERLAYGROUP (NAME, BASEADDRESS, OVERLAY*)>\r<!ELEMENT BASEADDRESS (#PCDATA)>\r<!ELEMENT OVERLAY (NAME, FILEREF*)>\r<!ELEMENT SUBTARGETLIST (SUBTARGET+)>\r<!ELEMENT SUBTARGET (TARGETNAME, ATTRIBUTES?)>\r<!ELEMENT SUBPROJECTLIST (SUBPROJECT+)>\r<!ELEMENT SUBPROJECT (FILEREF, SUBPROJECTTARGETLIST)>\r<!ELEMENT SUBPROJECTTARGETLIST (SUBPROJECTTARGET*)>\r<!ELEMENT SUBPROJECTTARGET (TARGETNAME, ATTRIBUTES?)>\r<!ELEMENT TARGETORDER (ORDEREDTARGET|ORDEREDDESIGN)*>\r<!ELEMENT ORDEREDTARGET (NAME)>\r<!ELEMENT ORDEREDDESIGN (NAME, ORDEREDTARGET+)>\r<!ELEMENT GROUPLIST (GROUP|FILEREF)*>\r<!ELEMENT GROUP (NAME, (GROUP|FILEREF)*)>\r<!ELEMENT DESIGNLIST (DESIGN+)>\r<!ELEMENT DESIGN (NAME, DESIGNDATA)>\r<!ELEMENT DESIGNDATA (#PCDATA)>\r]>\r<PROJECT>\r    <TARGETLIST>\r        <TARGET>\r            <NAME>LocalePlugin</NAME>\r            <SETTINGLIST>\r\r                <!-- Settings for \"Source Trees\" panel -->\r                <SETTING><NAME>UserSourceTrees</NAME><VALUE></VALUE></SETTING>\r\r                <!-- Settings for \"Custom Keywords\" panel -->\r                <SETTING><NAME>CustomColor1</NAME>\r                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\r                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\r                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\r                </SETTING>\r                <SETTING><NAME>CustomColor2</NAME>\r                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\r                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\r                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\r                </SETTING>\r                <SETTING><NAME>CustomColor3</NAME>\r                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\r                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\r                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\r                </SETTING>\r                <SETTING><NAME>CustomColor4</NAME>\r                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\r                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\r                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\r                </SETTING>\r\r                <!-- Settings for \"Access Paths\" panel -->\r                <SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>false</VALUE></SETTING>\r                <SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>false</VALUE></SETTING>\r                <SETTING><NAME>UserSearchPaths</NAME>\r                    <SETTING>\r                        <SETTING><NAME>SearchPath</NAME>\r                            <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\r                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\r                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\r                        </SETTING>\r                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\r                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\r                    </SETTING>\r                    <SETTING>\r                        <SETTING><NAME>SearchPath</NAME>\r                            <SETTING><NAME>Path</NAME><VALUE>::Squeak:SqueakAtSourceForge:squeak:platforms:Mac OS:</VALUE></SETTING>\r                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\r                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\r                        </SETTING>\r                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\r                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\r                    </SETTING>\r                    <SETTING>\r                        <SETTING><NAME>SearchPath</NAME>\r                            <SETTING><NAME>Path</NAME><VALUE>::Squeak:SqueakAtSourceForge:squeak:platforms:</VALUE></SETTING>\r                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\r                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\r                        </SETTING>\r                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\r                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\r                    </SETTING>\r                </SETTING>\r                <SETTING><NAME>SystemSearchPaths</NAME>\r                    <SETTING>\r                        <SETTING><NAME>SearchPath</NAME>\r                            <SETTING><NAME>Path</NAME><VALUE>:MacOS Support:</VALUE></SETTING>\r                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\r                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\r                        </SETTING>\r                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\r                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\r                    </SETTING>\r                    <SETTING>\r                        <SETTING><NAME>SearchPath</NAME>\r                            <SETTING><NAME>Path</NAME><VALUE>:MSL:</VALUE></SETTING>\r                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\r                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\r                        </SETTING>\r                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\r                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\r                    </SETTING>\r                </SETTING>\r\r                <!-- Settings for \"Target Settings\" panel -->\r                <SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING>\r                <SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING>\r                <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING>\r                <SETTING><NAME>Targetname</NAME><VALUE>LocalePlugin</VALUE></SETTING>\r                <SETTING><NAME>OutputDirectory</NAME>\r                    <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\r                    <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\r                    <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\r                </SETTING>\r                <SETTING><NAME>SaveEntriesUsingRelativePaths</NAME><VALUE>false</VALUE></SETTING>\r\r                <!-- Settings for \"File Mappings\" panel -->\r                <SETTING><NAME>FileMappings</NAME>\r                    <SETTING>\r                        <SETTING><NAME>FileType</NAME><VALUE>APPL</VALUE></SETTING>\r                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\r                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\r                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\r                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\r                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\r                    </SETTING>\r                    <SETTING>\r                        <SETTING><NAME>FileType</NAME><VALUE>Appl</VALUE></SETTING>\r                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\r                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\r                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\r                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\r                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\r                    </SETTING>\r                    <SETTING>\r                        <SETTING><NAME>FileType</NAME><VALUE>MMLB</VALUE></SETTING>\r                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\r                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\r                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\r                    </SETTING>\r                    <SETTING>\r                        <SETTING><NAME>FileType</NAME><VALUE>MPLF</VALUE></SETTING>\r                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\r                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\r                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\r                    </SETTING>\r                    <SETTING>\r                        <SETTING><NAME>FileType</NAME><VALUE>MWCD</VALUE></SETTING>\r                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\r                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\r                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\r                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\r                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\r                    </SETTING>\r                    <SETTING>\r                        <SETTING><NAME>FileType</NAME><VALUE>RSRC</VALUE></SETTING>\r                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\r                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\r                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\r                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\r                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\r                    </SETTING>\r                    <SETTING>\r                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\r                        <SETTING><NAME>FileExtension</NAME><VALUE>.bh</VALUE></SETTING>\r                        <SETTING><NAME>Compiler</NAME><VALUE>Balloon Help</VALUE></SETTING>\r                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\r                    </SETTING>\r                    <SETTING>\r                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\r                        <SETTING><NAME>FileExtension</NAME><VALUE>.c</VALUE></SETTING>\r                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\r                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\r                    </SETTING>\r                    <SETTING>\r                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\r                        <SETTING><NAME>FileExtension</NAME><VALUE>.c++</VALUE></SETTING>\r                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\r                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\r                    </SETTING>\r                    <SETTING>\r                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\r                        <SETTING><NAME>FileExtension</NAME><VALUE>.cc</VALUE></SETTING>\r                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\r                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\r                    </SETTING>\r                    <SETTING>\r                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\r                        <SETTING><NAME>FileExtension</NAME><VALUE>.cp</VALUE></SETTING>\r                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\r                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\r                    </SETTING>\r                    <SETTING>\r                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\r                        <SETTING><NAME>FileExtension</NAME><VALUE>.cpp</VALUE></SETTING>\r                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\r                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\r                    </SETTING>\r                    <SETTING>\r                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\r                        <SETTING><NAME>FileExtension</NAME><VALUE>.exp</VALUE></SETTING>\r                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\r                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\r                    </SETTING>\r                    <SETTING>\r                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\r                        <SETTING><NAME>FileExtension</NAME><VALUE>.fr</VALUE></SETTING>\r                        <SETTING><NAME>Compiler</NAME><VALUE>ODFRC</VALUE></SETTING>\r                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\r                    </SETTING>\r                    <SETTING>\r                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\r                        <SETTING><NAME>FileExtension</NAME><VALUE>.h</VALUE></SETTING>\r                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\r                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\r                    </SETTING>\r                    <SETTING>\r                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\r                        <SETTING><NAME>FileExtension</NAME><VALUE>.idl</VALUE></SETTING>\r                        <SETTING><NAME>Compiler</NAME><VALUE>SOMobjects TS</VALUE></SETTING>\r                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\r                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\r                    </SETTING>\r                    <SETTING>\r                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\r                        <SETTING><NAME>FileExtension</NAME><VALUE>.p</VALUE></SETTING>\r                        <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING>\r                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\r                    </SETTING>\r                    <SETTING>\r                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\r                        <SETTING><NAME>FileExtension</NAME><VALUE>.pas</VALUE></SETTING>\r                        <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING>\r                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\r                    </SETTING>\r                    <SETTING>\r                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\r                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch</VALUE></SETTING>\r                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\r                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\r                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\r                    </SETTING>\r                    <SETTING>\r                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\r                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch++</VALUE></SETTING>\r                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\r                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\r                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\r                    </SETTING>\r                    <SETTING>\r                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\r                        <SETTING><NAME>FileExtension</NAME><VALUE>.r</VALUE></SETTING>\r                        <SETTING><NAME>Compiler</NAME><VALUE>Rez</VALUE></SETTING>\r                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\r                    </SETTING>\r                    <SETTING>\r                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\r                        <SETTING><NAME>FileExtension</NAME><VALUE>.s</VALUE></SETTING>\r                        <SETTING><NAME>Compiler</NAME><VALUE>PPCAsm</VALUE></SETTING>\r                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\r                    </SETTING>\r                    <SETTING>\r                        <SETTING><NAME>FileType</NAME><VALUE>XCOF</VALUE></SETTING>\r                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\r                        <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING>\r                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\r                    </SETTING>\r                    <SETTING>\r                        <SETTING><NAME>FileType</NAME><VALUE>docu</VALUE></SETTING>\r                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\r                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\r                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\r                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\r                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\r                    </SETTING>\r                    <SETTING>\r                        <SETTING><NAME>FileType</NAME><VALUE>rsrc</VALUE></SETTING>\r                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\r                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\r                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\r                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\r                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\r                    </SETTING>\r                    <SETTING>\r                        <SETTING><NAME>FileType</NAME><VALUE>shlb</VALUE></SETTING>\r                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\r                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\r                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\r                    </SETTING>\r                    <SETTING>\r                        <SETTING><NAME>FileType</NAME><VALUE>stub</VALUE></SETTING>\r                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\r                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\r                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\r                    </SETTING>\r                    <SETTING>\r                        <SETTING><NAME>FileExtension</NAME><VALUE>.doc</VALUE></SETTING>\r                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\r                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\r                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\r                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\r                    </SETTING>\r                </SETTING>\r\r                <!-- Settings for \"Build Extras\" panel -->\r                <SETTING><NAME>CacheModDates</NAME><VALUE>true</VALUE></SETTING>\r                <SETTING><NAME>ActivateBrowser</NAME><VALUE>false</VALUE></SETTING>\r                <SETTING><NAME>DumpBrowserInfo</NAME><VALUE>false</VALUE></SETTING>\r                <SETTING><NAME>CacheSubprojects</NAME><VALUE>true</VALUE></SETTING>\r                <SETTING><NAME>UseThirdPartyDebugger</NAME><VALUE>false</VALUE></SETTING>\r                <SETTING><NAME>DebuggerCommandLine</NAME><VALUE></VALUE></SETTING>\r                <PANELDATA><NAME>Debugger Runtime</NAME><VALUE>\r                    0002000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    00000000000100013A53717565616B20332E382E38623220436C617373696300\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000010122D40100000000000010010123650\r                    000200000000000000000000101227A000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    0000000000000000000000000000000000000000000000000000000000000000\r                    00000000000000000000000000000000\r                </VALUE></PANELDATA>\r\r                <!-- Settings for \"Debugger Target\" panel -->\r                <SETTING><NAME>LogSystemMessages</NAME><VALUE>true</VALUE></SETTING>\r                <SETTING><NAME>AutoTargetDLLs</NAME><VALUE>false</VALUE></SETTING>\r                <SETTING><NAME>StopAtWatchpoints</NAME><VALUE>true</VALUE></SETTING>\r                <SETTING><NAME>PauseWhileRunning</NAME><VALUE>false</VALUE></SETTING>\r                <SETTING><NAME>PauseInterval</NAME><VALUE>5</VALUE></SETTING>\r                <SETTING><NAME>PauseUIFlags</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>AltExePath</NAME>\r                    <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING>\r                    <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>\r                    <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\r                </SETTING>\r                <SETTING><NAME>StopAtTempBPOnLaunch</NAME><VALUE>true</VALUE></SETTING>\r                <SETTING><NAME>CacheSymbolics</NAME><VALUE>true</VALUE></SETTING>\r                <SETTING><NAME>TempBPFunctionName</NAME><VALUE>main</VALUE></SETTING>\r                <SETTING><NAME>TempBPType</NAME><VALUE>false</VALUE></SETTING>\r\r                <!-- Settings for \"68K CodeGen\" panel -->\r                <SETTING><NAME>MWCodeGen_68K_codesize</NAME><VALUE>Smart</VALUE></SETTING>\r                <SETTING><NAME>MWCodeGen_68K_structalignment</NAME><VALUE>MC68K</VALUE></SETTING>\r                <SETTING><NAME>MWCodeGen_68K_fp_mode</NAME><VALUE>SANE</VALUE></SETTING>\r                <SETTING><NAME>MWCodeGen_68K_code68020</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWCodeGen_68K_profiler</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWCodeGen_68K_mpwc</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWCodeGen_68K_fourbyteints</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWCodeGen_68K_IEEEdoubles</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWCodeGen_68K_fardata</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWCodeGen_68K_farvtables</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWCodeGen_68K_farstrings</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWCodeGen_68K_pcrelstrings</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWCodeGen_68K_macsbug</NAME><VALUE>New</VALUE></SETTING>\r                <SETTING><NAME>MWCodeGen_68K_a6frames</NAME><VALUE>1</VALUE></SETTING>\r\r                <!-- Settings for \"68K Disassembler\" panel -->\r                <SETTING><NAME>MWDisassembler_68K_showcode</NAME><VALUE>1</VALUE></SETTING>\r                <SETTING><NAME>MWDisassembler_68K_mix</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWDisassembler_68K_nohex</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWDisassembler_68K_showdata</NAME><VALUE>1</VALUE></SETTING>\r                <SETTING><NAME>MWDisassembler_68K_showexceptions</NAME><VALUE>1</VALUE></SETTING>\r                <SETTING><NAME>MWDisassembler_68K_showsym</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWDisassembler_68K_shownames</NAME><VALUE>1</VALUE></SETTING>\r\r                <!-- Settings for \"68K Global Optimizer\" panel -->\r                <SETTING><NAME>GlobalOptimizer_68K_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING>\r                <SETTING><NAME>GlobalOptimizer_68K_optfor</NAME><VALUE>Speed</VALUE></SETTING>\r\r                <!-- Settings for \"68K Linker\" panel -->\r                <SETTING><NAME>MWLinker_68K_linksym</NAME><VALUE>1</VALUE></SETTING>\r                <SETTING><NAME>MWLinker_68K_symfullpath</NAME><VALUE>1</VALUE></SETTING>\r                <SETTING><NAME>MWLinker_68K_linksingle</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWLinker_68K_fastlink</NAME><VALUE>1</VALUE></SETTING>\r                <SETTING><NAME>MWLinker_68K_generateMap</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWLinker_68K_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWLinker_68K_glueintosegone</NAME><VALUE>1</VALUE></SETTING>\r                <SETTING><NAME>MWLinker_68K_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\r\r                <!-- Settings for \"68K Project\" panel -->\r                <SETTING><NAME>MWProject_68K_type</NAME><VALUE>Application</VALUE></SETTING>\r                <SETTING><NAME>MWProject_68K_outfile</NAME><VALUE>Mac OS PPC C/C++</VALUE></SETTING>\r                <SETTING><NAME>MWProject_68K_symfilename</NAME><VALUE></VALUE></SETTING>\r                <SETTING><NAME>MWProject_68K_filecreator</NAME><VALUE>1061109567</VALUE></SETTING>\r                <SETTING><NAME>MWProject_68K_filetype</NAME><VALUE>1095782476</VALUE></SETTING>\r                <SETTING><NAME>MWProject_68K_size</NAME><VALUE>384</VALUE></SETTING>\r                <SETTING><NAME>MWProject_68K_flags</NAME><VALUE>22656</VALUE></SETTING>\r                <SETTING><NAME>MWProject_68K_rsrcheader</NAME><VALUE>Standard</VALUE></SETTING>\r                <SETTING><NAME>MWProject_68K_rsrcname</NAME><VALUE></VALUE></SETTING>\r                <SETTING><NAME>MWProject_68K_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\r                <SETTING><NAME>MWProject_68K_rsrcid</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWProject_68K_rsrcmulti</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWProject_68K_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWProject_68K_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWProject_68K_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWProject_68K_a4</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWProject_68K_minsize</NAME><VALUE>384</VALUE></SETTING>\r                <SETTING><NAME>MWProject_68K_rsrcsegtype</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWProject_68K_cfm68kcodegen</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWProject_68K_stacksize</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWProject_68K_thedebugger</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWProject_68K_rsrc_custom</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWProject_68K_is_rseg_app</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWProject_68K_is_pilot_lib</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWProject_68K_pilot_main_entry</NAME><VALUE></VALUE></SETTING>\r\r                <!-- Settings for \"C/C++ Compiler\" panel -->\r                <SETTING><NAME>MWFrontEnd_C_cplusplus</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWFrontEnd_C_checkprotos</NAME><VALUE>1</VALUE></SETTING>\r                <SETTING><NAME>MWFrontEnd_C_arm</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWFrontEnd_C_trigraphs</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWFrontEnd_C_onlystdkeywords</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWFrontEnd_C_enumsalwaysint</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWFrontEnd_C_mpwpointerstyle</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWFrontEnd_C_prefixname</NAME><VALUE>myMacHeadersPPC</VALUE></SETTING>\r                <SETTING><NAME>MWFrontEnd_C_ansistrict</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWFrontEnd_C_mpwcnewline</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWFrontEnd_C_wchar_type</NAME><VALUE>1</VALUE></SETTING>\r                <SETTING><NAME>MWFrontEnd_C_enableexceptions</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWFrontEnd_C_dontreusestrings</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWFrontEnd_C_poolstrings</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWFrontEnd_C_dontinline</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWFrontEnd_C_useRTTI</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWFrontEnd_C_multibyteaware</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWFrontEnd_C_unsignedchars</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWFrontEnd_C_autoinline</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWFrontEnd_C_booltruefalse</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWFrontEnd_C_direct_to_som</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWFrontEnd_C_som_env_check</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWFrontEnd_C_alwaysinline</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWFrontEnd_C_inlinelevel</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWFrontEnd_C_ecplusplus</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWFrontEnd_C_objective_c</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWFrontEnd_C_defer_codegen</NAME><VALUE>0</VALUE></SETTING>\r\r                <!-- Settings for \"C/C++ Warnings\" panel -->\r                <SETTING><NAME>MWWarning_C_warn_illpragma</NAME><VALUE>1</VALUE></SETTING>\r                <SETTING><NAME>MWWarning_C_warn_emptydecl</NAME><VALUE>1</VALUE></SETTING>\r                <SETTING><NAME>MWWarning_C_warn_possunwant</NAME><VALUE>1</VALUE></SETTING>\r                <SETTING><NAME>MWWarning_C_warn_unusedvar</NAME><VALUE>1</VALUE></SETTING>\r                <SETTING><NAME>MWWarning_C_warn_unusedarg</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWWarning_C_warn_extracomma</NAME><VALUE>1</VALUE></SETTING>\r                <SETTING><NAME>MWWarning_C_pedantic</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWWarning_C_warningerrors</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWWarning_C_warn_hidevirtual</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWWarning_C_warn_implicitconv</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWWarning_C_warn_notinlined</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWWarning_C_warn_structclass</NAME><VALUE>0</VALUE></SETTING>\r\r                <!-- Settings for \"CFM68K\" panel -->\r                <SETTING><NAME>MWCFM68K_exports</NAME><VALUE>None</VALUE></SETTING>\r                <SETTING><NAME>MWCFM68K_olddefversion</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWCFM68K_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWCFM68K_currentversion</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWCFM68K_farthreshold</NAME><VALUE>256</VALUE></SETTING>\r                <SETTING><NAME>PCFM68K_sharedata</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWCFM68K_fragmentname</NAME><VALUE></VALUE></SETTING>\r                <SETTING><NAME>MWCFM68K_initname</NAME><VALUE></VALUE></SETTING>\r                <SETTING><NAME>MWCFM68K_mainname</NAME><VALUE>__start</VALUE></SETTING>\r                <SETTING><NAME>MWCFM68K_termname</NAME><VALUE></VALUE></SETTING>\r                <SETTING><NAME>MWCFM68K_libfolder</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWCFM68K_alignment</NAME><VALUE>Align_2</VALUE></SETTING>\r\r                <!-- Settings for \"MacOS Merge Panel\" panel -->\r                <SETTING><NAME>MWMerge_MacOS_projectType</NAME><VALUE>Application</VALUE></SETTING>\r                <SETTING><NAME>MWMerge_MacOS_outputName</NAME><VALUE>Merge Out</VALUE></SETTING>\r                <SETTING><NAME>MWMerge_MacOS_outputCreator</NAME><VALUE>1061109567</VALUE></SETTING>\r                <SETTING><NAME>MWMerge_MacOS_outputType</NAME><VALUE>1095782476</VALUE></SETTING>\r                <SETTING><NAME>MWMerge_MacOS_suppressWarning</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWMerge_MacOS_copyFragments</NAME><VALUE>1</VALUE></SETTING>\r                <SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING>\r                <SETTING><NAME>MWMerge_MacOS_skipResources</NAME>\r                    <SETTING><VALUE></VALUE></SETTING>\r                    <SETTING><VALUE></VALUE></SETTING>\r                    <SETTING><VALUE>\t</VALUE></SETTING>\r                    <SETTING><VALUE></VALUE></SETTING>\r                </SETTING>\r\r                <!-- Settings for \"PPC CodeGen\" panel -->\r                <SETTING><NAME>MWCodeGen_PPC_structalignment</NAME><VALUE>PPC</VALUE></SETTING>\r                <SETTING><NAME>MWCodeGen_PPC_tracebacktables</NAME><VALUE>Inline</VALUE></SETTING>\r                <SETTING><NAME>MWCodeGen_PPC_processor</NAME><VALUE>P750</VALUE></SETTING>\r                <SETTING><NAME>MWCodeGen_PPC_readonlystrings</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWCodeGen_PPC_tocdata</NAME><VALUE>1</VALUE></SETTING>\r                <SETTING><NAME>MWCodeGen_PPC_profiler</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWCodeGen_PPC_fpcontract</NAME><VALUE>1</VALUE></SETTING>\r                <SETTING><NAME>MWCodeGen_PPC_schedule</NAME><VALUE>1</VALUE></SETTING>\r                <SETTING><NAME>MWCodeGen_PPC_peephole</NAME><VALUE>1</VALUE></SETTING>\r                <SETTING><NAME>MWCodeGen_PPC_processorspecific</NAME><VALUE>1</VALUE></SETTING>\r                <SETTING><NAME>MWCodeGen_PPC_altivec</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWCodeGen_PPC_vectortocdata</NAME><VALUE>1</VALUE></SETTING>\r                <SETTING><NAME>MWCodeGen_PPC_vrsave</NAME><VALUE>1</VALUE></SETTING>\r\r                <!-- Settings for \"PPC Disassembler\" panel -->\r                <SETTING><NAME>MWDisassembler_PPC_showcode</NAME><VALUE>1</VALUE></SETTING>\r                <SETTING><NAME>MWDisassembler_PPC_extended</NAME><VALUE>1</VALUE></SETTING>\r                <SETTING><NAME>MWDisassembler_PPC_mix</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWDisassembler_PPC_nohex</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWDisassembler_PPC_showdata</NAME><VALUE>1</VALUE></SETTING>\r                <SETTING><NAME>MWDisassembler_PPC_showexceptions</NAME><VALUE>1</VALUE></SETTING>\r                <SETTING><NAME>MWDisassembler_PPC_showsym</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWDisassembler_PPC_shownames</NAME><VALUE>1</VALUE></SETTING>\r\r                <!-- Settings for \"PPC Global Optimizer\" panel -->\r                <SETTING><NAME>GlobalOptimizer_PPC_optimizationlevel</NAME><VALUE>Level4</VALUE></SETTING>\r                <SETTING><NAME>GlobalOptimizer_PPC_optfor</NAME><VALUE>Speed</VALUE></SETTING>\r\r                <!-- Settings for \"PPC Linker\" panel -->\r                <SETTING><NAME>MWLinker_PPC_linksym</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWLinker_PPC_symfullpath</NAME><VALUE>1</VALUE></SETTING>\r                <SETTING><NAME>MWLinker_PPC_linkmap</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWLinker_PPC_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWLinker_PPC_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWLinker_PPC_permitmultdefs</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWLinker_PPC_linkmode</NAME><VALUE>Normal</VALUE></SETTING>\r                <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE></VALUE></SETTING>\r                <SETTING><NAME>MWLinker_PPC_mainname</NAME><VALUE></VALUE></SETTING>\r                <SETTING><NAME>MWLinker_PPC_termname</NAME><VALUE></VALUE></SETTING>\r\r                <!-- Settings for \"PPC PEF\" panel -->\r                <SETTING><NAME>MWPEF_exports</NAME><VALUE>Pragma</VALUE></SETTING>\r                <SETTING><NAME>MWPEF_libfolder</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWPEF_sortcode</NAME><VALUE>None</VALUE></SETTING>\r                <SETTING><NAME>MWPEF_expandbss</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWPEF_sharedata</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWPEF_olddefversion</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWPEF_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWPEF_currentversion</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWPEF_fragmentname</NAME><VALUE></VALUE></SETTING>\r                <SETTING><NAME>MWPEF_collapsereloads</NAME><VALUE>1</VALUE></SETTING>\r\r                <!-- Settings for \"PPC Project\" panel -->\r                <SETTING><NAME>MWProject_PPC_type</NAME><VALUE>SharedLibrary</VALUE></SETTING>\r                <SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>LocalePlugin</VALUE></SETTING>\r                <SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>1178686292</VALUE></SETTING>\r                <SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>1936223330</VALUE></SETTING>\r                <SETTING><NAME>MWProject_PPC_size</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWProject_PPC_minsize</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWProject_PPC_stacksize</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWProject_PPC_flags</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWProject_PPC_symfilename</NAME><VALUE></VALUE></SETTING>\r                <SETTING><NAME>MWProject_PPC_rsrcname</NAME><VALUE></VALUE></SETTING>\r                <SETTING><NAME>MWProject_PPC_rsrcheader</NAME><VALUE>Native</VALUE></SETTING>\r                <SETTING><NAME>MWProject_PPC_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\r                <SETTING><NAME>MWProject_PPC_rsrcid</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWProject_PPC_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWProject_PPC_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWProject_PPC_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\r\r                <!-- Settings for \"PPCAsm Panel\" panel -->\r                <SETTING><NAME>MWAssembler_PPC_auxheader</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWAssembler_PPC_symmode</NAME><VALUE>Mac</VALUE></SETTING>\r                <SETTING><NAME>MWAssembler_PPC_dialect</NAME><VALUE>PPC</VALUE></SETTING>\r                <SETTING><NAME>MWAssembler_PPC_prefixfile</NAME><VALUE></VALUE></SETTING>\r                <SETTING><NAME>MWAssembler_PPC_typecheck</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWAssembler_PPC_warnings</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWAssembler_PPC_casesensitive</NAME><VALUE>0</VALUE></SETTING>\r\r                <!-- Settings for \"Rez Compiler\" panel -->\r                <SETTING><NAME>MWRez_Language_maxwidth</NAME><VALUE>80</VALUE></SETTING>\r                <SETTING><NAME>MWRez_Language_script</NAME><VALUE>Roman</VALUE></SETTING>\r                <SETTING><NAME>MWRez_Language_alignment</NAME><VALUE>Align1</VALUE></SETTING>\r                <SETTING><NAME>MWRez_Language_filtermode</NAME><VALUE>FilterSkip</VALUE></SETTING>\r                <SETTING><NAME>MWRez_Language_suppresswarnings</NAME><VALUE>0</VALUE></SETTING>\r                <SETTING><NAME>MWRez_Language_escapecontrolchars</NAME><VALUE>1</VALUE></SETTING>\r                <SETTING><NAME>MWRez_Language_prefixname</NAME><VALUE></VALUE></SETTING>\r                <SETTING><NAME>MWRez_Language_filteredtypes</NAME><VALUE>'CODE' 'DATA' 'PICT'</VALUE></SETTING>\r            </SETTINGLIST>\r            <FILELIST>\r                <FILE>\r                    <PATHTYPE>Name</PATHTYPE>\r                    <PATH>InterfaceLib</PATH>\r                    <PATHFORMAT>MacOS</PATHFORMAT>\r                    <FILEKIND>Library</FILEKIND>\r                    <FILEFLAGS>Debug</FILEFLAGS>\r                </FILE>\r                <FILE>\r                    <PATHTYPE>Name</PATHTYPE>\r                    <PATH>MSL C.PPC.Lib</PATH>\r                    <PATHFORMAT>MacOS</PATHFORMAT>\r                    <FILEKIND>Library</FILEKIND>\r                    <FILEFLAGS>Debug</FILEFLAGS>\r                </FILE>\r                <FILE>\r                    <PATHTYPE>Name</PATHTYPE>\r                    <PATH>UTCUtils</PATH>\r                    <PATHFORMAT>MacOS</PATHFORMAT>\r                    <FILEKIND>Library</FILEKIND>\r                    <FILEFLAGS>Debug</FILEFLAGS>\r                </FILE>\r                <FILE>\r                    <PATHTYPE>Name</PATHTYPE>\r                    <PATH>LocalePlugin.c</PATH>\r                    <PATHFORMAT>MacOS</PATHFORMAT>\r                    <FILEKIND>Text</FILEKIND>\r                    <FILEFLAGS>Debug</FILEFLAGS>\r                </FILE>\r                <FILE>\r                    <PATHTYPE>Name</PATHTYPE>\r                    <PATH>sqMacLocaleOS9.c</PATH>\r                    <PATHFORMAT>MacOS</PATHFORMAT>\r                    <FILEKIND>Text</FILEKIND>\r                    <FILEFLAGS>Debug</FILEFLAGS>\r                </FILE>\r                <FILE>\r                    <PATHTYPE>Name</PATHTYPE>\r                    <PATH>sqMacLocaleOS9.h</PATH>\r                    <PATHFORMAT>MacOS</PATHFORMAT>\r                    <FILEKIND>Text</FILEKIND>\r                    <FILEFLAGS></FILEFLAGS>\r                </FILE>\r                <FILE>\r                    <PATHTYPE>Name</PATHTYPE>\r                    <PATH>MSL RuntimePPC.Lib</PATH>\r                    <PATHFORMAT>MacOS</PATHFORMAT>\r                    <FILEKIND>Library</FILEKIND>\r                    <FILEFLAGS>Debug</FILEFLAGS>\r                </FILE>\r                <FILE>\r                    <PATHTYPE>Name</PATHTYPE>\r                    <PATH>MathLib</PATH>\r                    <PATHFORMAT>MacOS</PATHFORMAT>\r                    <FILEKIND>Library</FILEKIND>\r                    <FILEFLAGS>Debug</FILEFLAGS>\r                </FILE>\r                <FILE>\r                    <PATHTYPE>Name</PATHTYPE>\r                    <PATH>LocalesLib</PATH>\r                    <PATHFORMAT>MacOS</PATHFORMAT>\r                    <FILEKIND>Library</FILEKIND>\r                    <FILEFLAGS>Debug</FILEFLAGS>\r                </FILE>\r            </FILELIST>\r            <LINKORDER>\r                <FILEREF>\r                    <PATHTYPE>Name</PATHTYPE>\r                    <PATH>InterfaceLib</PATH>\r                    <PATHFORMAT>MacOS</PATHFORMAT>\r                </FILEREF>\r                <FILEREF>\r                    <PATHTYPE>Name</PATHTYPE>\r                    <PATH>MSL C.PPC.Lib</PATH>\r                    <PATHFORMAT>MacOS</PATHFORMAT>\r                </FILEREF>\r                <FILEREF>\r                    <PATHTYPE>Name</PATHTYPE>\r                    <PATH>UTCUtils</PATH>\r                    <PATHFORMAT>MacOS</PATHFORMAT>\r                </FILEREF>\r                <FILEREF>\r                    <PATHTYPE>Name</PATHTYPE>\r                    <PATH>LocalePlugin.c</PATH>\r                    <PATHFORMAT>MacOS</PATHFORMAT>\r                </FILEREF>\r                <FILEREF>\r                    <PATHTYPE>Name</PATHTYPE>\r                    <PATH>sqMacLocaleOS9.c</PATH>\r                    <PATHFORMAT>MacOS</PATHFORMAT>\r                </FILEREF>\r                <FILEREF>\r                    <PATHTYPE>Name</PATHTYPE>\r                    <PATH>sqMacLocaleOS9.h</PATH>\r                    <PATHFORMAT>MacOS</PATHFORMAT>\r                </FILEREF>\r                <FILEREF>\r                    <PATHTYPE>Name</PATHTYPE>\r                    <PATH>MSL RuntimePPC.Lib</PATH>\r                    <PATHFORMAT>MacOS</PATHFORMAT>\r                </FILEREF>\r                <FILEREF>\r                    <PATHTYPE>Name</PATHTYPE>\r                    <PATH>MathLib</PATH>\r                    <PATHFORMAT>MacOS</PATHFORMAT>\r                </FILEREF>\r                <FILEREF>\r                    <PATHTYPE>Name</PATHTYPE>\r                    <PATH>LocalesLib</PATH>\r                    <PATHFORMAT>MacOS</PATHFORMAT>\r                </FILEREF>\r            </LINKORDER>\r        </TARGET>\r    </TARGETLIST>\r\r    <TARGETORDER>\r        <ORDEREDTARGET><NAME>LocalePlugin</NAME></ORDEREDTARGET>\r    </TARGETORDER>\r\r    <GROUPLIST>\r        <GROUP><NAME>Source</NAME>\r            <FILEREF>\r                <TARGETNAME>LocalePlugin</TARGETNAME>\r                <PATHTYPE>Name</PATHTYPE>\r                <PATH>MSL RuntimePPC.Lib</PATH>\r                <PATHFORMAT>MacOS</PATHFORMAT>\r            </FILEREF>\r            <FILEREF>\r                <TARGETNAME>LocalePlugin</TARGETNAME>\r                <PATHTYPE>Name</PATHTYPE>\r                <PATH>InterfaceLib</PATH>\r                <PATHFORMAT>MacOS</PATHFORMAT>\r            </FILEREF>\r            <FILEREF>\r                <TARGETNAME>LocalePlugin</TARGETNAME>\r                <PATHTYPE>Name</PATHTYPE>\r                <PATH>MSL C.PPC.Lib</PATH>\r                <PATHFORMAT>MacOS</PATHFORMAT>\r            </FILEREF>\r            <FILEREF>\r                <TARGETNAME>LocalePlugin</TARGETNAME>\r                <PATHTYPE>Name</PATHTYPE>\r                <PATH>UTCUtils</PATH>\r                <PATHFORMAT>MacOS</PATHFORMAT>\r            </FILEREF>\r            <FILEREF>\r                <TARGETNAME>LocalePlugin</TARGETNAME>\r                <PATHTYPE>Name</PATHTYPE>\r                <PATH>MathLib</PATH>\r                <PATHFORMAT>MacOS</PATHFORMAT>\r            </FILEREF>\r            <FILEREF>\r                <TARGETNAME>LocalePlugin</TARGETNAME>\r                <PATHTYPE>Name</PATHTYPE>\r                <PATH>LocalesLib</PATH>\r                <PATHFORMAT>MacOS</PATHFORMAT>\r            </FILEREF>\r        </GROUP>\r        <FILEREF>\r            <TARGETNAME>LocalePlugin</TARGETNAME>\r            <PATHTYPE>Name</PATHTYPE>\r            <PATH>LocalePlugin.c</PATH>\r            <PATHFORMAT>MacOS</PATHFORMAT>\r        </FILEREF>\r        <FILEREF>\r            <TARGETNAME>LocalePlugin</TARGETNAME>\r            <PATHTYPE>Name</PATHTYPE>\r            <PATH>sqMacLocaleOS9.c</PATH>\r            <PATHFORMAT>MacOS</PATHFORMAT>\r        </FILEREF>\r        <FILEREF>\r            <TARGETNAME>LocalePlugin</TARGETNAME>\r            <PATHTYPE>Name</PATHTYPE>\r            <PATH>sqMacLocaleOS9.h</PATH>\r            <PATHFORMAT>MacOS</PATHFORMAT>\r        </FILEREF>\r    </GROUPLIST>\r\r</PROJECT>\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/LocalePlugin/SqueakLocale.pbproj/johnmci.mode1",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>ActivePerspectiveName</key>\n\t<string>Project</string>\n\t<key>AllowedModules</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Groups and Files Outline View</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCTaskListModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Task List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDetailModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>File and Smart Group Detail Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Detailed Build Results Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Batch Find Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Run Log</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXCVSModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Source Code Control Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Breakpoints Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDockableInspector</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Inspector</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXOpenQuicklyModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Open Quickly Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Console</string>\n\t\t</dict>\n\t</array>\n\t<key>Description</key>\n\t<string>DefaultDescriptionKey</string>\n\t<key>DockingSystemVisible</key>\n\t<false/>\n\t<key>Extension</key>\n\t<string>mode1</string>\n\t<key>FavBarConfig</key>\n\t<dict>\n\t\t<key>PBXProjectModuleGUID</key>\n\t\t<string>94AF35A4084782DD00FA5ACB</string>\n\t\t<key>XCBarModuleItemNames</key>\n\t\t<dict/>\n\t\t<key>XCBarModuleItems</key>\n\t\t<array/>\n\t</dict>\n\t<key>FirstTimeWindowDisplayed</key>\n\t<false/>\n\t<key>Identifier</key>\n\t<string>com.apple.perspectives.project.mode1</string>\n\t<key>MajorVersion</key>\n\t<integer>31</integer>\n\t<key>MinorVersion</key>\n\t<integer>1</integer>\n\t<key>Name</key>\n\t<string>Default</string>\n\t<key>Notifications</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>XCObserverAutoDisconnectKey</key>\n\t\t\t<true/>\n\t\t\t<key>XCObserverDefintionKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusErrorsKey</key>\n\t\t\t\t<integer>0</integer>\n\t\t\t</dict>\n\t\t\t<key>XCObserverFactoryKey</key>\n\t\t\t<string>XCPerspectivesSpecificationIdentifier</string>\n\t\t\t<key>XCObserverGUIDKey</key>\n\t\t\t<string>XCObserverProjectIdentifier</string>\n\t\t\t<key>XCObserverNotificationKey</key>\n\t\t\t<string>PBXStatusBuildStateMessageNotification</string>\n\t\t\t<key>XCObserverTargetKey</key>\n\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t<key>XCObserverTriggerKey</key>\n\t\t\t<string>awakenModuleWithObserver:</string>\n\t\t\t<key>XCObserverValidationKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusErrorsKey</key>\n\t\t\t\t<integer>2</integer>\n\t\t\t</dict>\n\t\t</dict>\n\t</array>\n\t<key>OpenEditors</key>\n\t<array/>\n\t<key>PerspectiveWidths</key>\n\t<array>\n\t\t<integer>-1</integer>\n\t\t<integer>-1</integer>\n\t</array>\n\t<key>Perspectives</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>ChosenToolbarItems</key>\n\t\t\t<array>\n\t\t\t\t<string>active-target-popup</string>\n\t\t\t\t<string>active-buildstyle-popup</string>\n\t\t\t\t<string>action</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>buildOrClean</string>\n\t\t\t\t<string>build-and-runOrDebug</string>\n\t\t\t\t<string>com.apple.ide.PBXToolbarStopButton</string>\n\t\t\t\t<string>get-info</string>\n\t\t\t\t<string>toggle-editor</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>com.apple.pbx.toolbar.searchfield</string>\n\t\t\t</array>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProjectWithEditor</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.project</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>66DF6BFE01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66B8BC570381F53800A8011A</string>\n\t\t\t\t\t\t\t\t<string>66DF6BFF01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66DF6C4501D7DEEE00A80119</string>\n\t\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 600}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 618}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>189 157 922 659 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>203pt</string>\n\t\t\t\t</dict>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>InfoPlist.strings</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CE0B20406471E060097A5F4</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>InfoPlist.strings</string>\n\t\t\t\t\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t\t\t\t\t<string>94405842085E5A7A004495D0</string>\n\t\t\t\t\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>9479076E0859F8950068B3F8</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94461695085E5999004F7BD5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94461696085E5999004F7BD5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>944616B9085E59BC004F7BD5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94405840085E5A7A004495D0</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t\t<key>prevStack</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>947907380858EDF80068B3F8</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947907390858EDF80068B3F8</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94461699085E5999004F7BD5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9446169B085E5999004F7BD5</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {714, 429}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>189 157 922 659 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>429pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 434}, {714, 184}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>189 157 922 659 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>184pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>714pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>94405844085E5A7A004495D0</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>94405845085E5A7A004495D0</string>\n\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProject</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.morph</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>29B97314FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 337}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 355}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>373 269 690 397 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Morph</string>\n\t\t\t<key>PreferredWidth</key>\n\t\t\t<integer>300</integer>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default.short</string>\n\t\t</dict>\n\t</array>\n\t<key>PerspectivesBarVisible</key>\n\t<false/>\n\t<key>ShelfIsVisible</key>\n\t<false/>\n\t<key>SourceDescription</key>\n\t<string>file at '/System/Library/PrivateFrameworks/DevToolsInterface.framework/Versions/A/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string>\n\t<key>StatusbarIsVisible</key>\n\t<true/>\n\t<key>TimeStamp</key>\n\t<real>140401172.60255501</real>\n\t<key>ToolbarDisplayMode</key>\n\t<integer>1</integer>\n\t<key>ToolbarIsVisible</key>\n\t<true/>\n\t<key>ToolbarSizeMode</key>\n\t<integer>2</integer>\n\t<key>Type</key>\n\t<string>Perspectives</string>\n\t<key>UpdateMessage</key>\n\t<string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the \"Metro-Morph\" feature).  You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature.  Do you wish to update to the latest Workspace defaults for project '%@'?</string>\n\t<key>WindowJustification</key>\n\t<integer>5</integer>\n\t<key>WindowOrderList</key>\n\t<array>\n\t\t<string>/Users/johnmci/Documents/SqueakLocale/SqueakLocale.pbproj</string>\n\t</array>\n\t<key>WindowString</key>\n\t<string>189 157 922 659 0 0 1440 878 </string>\n\t<key>WindowTools</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.build</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string></string>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {879, 513}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>444 70 879 795 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>513pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Build</string>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Collapse</key>\n\t\t\t\t\t\t\t\t<integer>1021</integer>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Open</key>\n\t\t\t\t\t\t\t\t<integer>1012</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 518}, {879, 236}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>444 70 879 795 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>236pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>754pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Build Results</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>9446168A085E5866004F7BD5</string>\n\t\t\t\t<string>944616CB085E59D7004F7BD5</string>\n\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.build</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>444 70 879 795 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>9446168A085E5866004F7BD5</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugger</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Debugger</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {287, 175}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{287, 0}, {560, 175}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {847, 175}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 175}, {847, 352}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debug - GLUTExamples (Underwater)</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>DebugConsoleDrawerSize</key>\n\t\t\t\t\t\t\t\t<string>{100, 120}</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleVisible</key>\n\t\t\t\t\t\t\t\t<string>None</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>DebugSTDIOWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {847, 527}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>459 148 847 568 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>527pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>527pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t\t<string>94461664085E51E6004F7BD5</string>\n\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t<string>94461665085E51E6004F7BD5</string>\n\t\t\t\t<string>94461666085E51E6004F7BD5</string>\n\t\t\t\t<string>94461667085E51E6004F7BD5</string>\n\t\t\t\t<string>94461668085E51E6004F7BD5</string>\n\t\t\t\t<string>94461669085E51E6004F7BD5</string>\n\t\t\t\t<string>9446166A085E51E6004F7BD5</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debug</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>459 148 847 568 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.find</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>LocalePlugin.h</string>\n\t\t\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {791, 416}}</string>\n\t\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t\t<string>459 42 791 674 0 0 1440 878 </string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t\t\t<string>791pt</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>416pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Project Find</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 421}, {791, 212}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>459 42 791 674 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>212pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>633pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Find</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t\t<string>9446168F085E5866004F7BD5</string>\n\t\t\t\t<string>94461690085E5866004F7BD5</string>\n\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>459 42 791 674 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>MENUSEPARATOR</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debuggerConsole</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debugger Console</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {686, 500}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>759 114 686 541 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>500pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>500pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger Console</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>94ABA92F0858D3A300079BE1</string>\n\t\t\t\t<string>9446166B085E51E6004F7BD5</string>\n\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>759 114 686 541 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>94ABA92F0858D3A300079BE1</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.run</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>3</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528B0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Run</string>\n\t\t\t\t\t\t\t\t<key>Runner</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {493, 167}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 176}, {493, 267}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {405, 443}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{414, 0}, {514, 443}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {460, 159}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>316 696 459 200 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>159pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>159pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Run Log</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2B3069F1EA900FABCE6</string>\n\t\t\t\t<string>1C0AD2B4069F1EA900FABCE6</string>\n\t\t\t\t<string>1CD0528B0623707200166675</string>\n\t\t\t\t<string>1C0AD2B5069F1EA900FABCE6</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.run</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>316 696 459 200 0 0 1280 1002 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2B3069F1EA900FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.scm</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1C78EAB3065D492600B07095</string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>0pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>SCM</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ConsoleFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 259}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 7}, {452, 259}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t\t<key>TableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>Status</string>\n\t\t\t\t\t\t\t\t\t<real>30</real>\n\t\t\t\t\t\t\t\t\t<string>FileName</string>\n\t\t\t\t\t\t\t\t\t<real>199</real>\n\t\t\t\t\t\t\t\t\t<string>Path</string>\n\t\t\t\t\t\t\t\t\t<real>197.09500122070312</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>TableFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 250}}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>262pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>266pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>SCM</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAB4065D492600B07095</string>\n\t\t\t\t<string>1C78EAB5065D492600B07095</string>\n\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.scm</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.breakpoints</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD052930623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Breakpoints</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>BreakpointsTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>enabledColumn</string>\n\t\t\t\t\t\t\t\t\t<real>16</real>\n\t\t\t\t\t\t\t\t\t<string>breakpointColumn</string>\n\t\t\t\t\t\t\t\t\t<real>482</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {506, 360}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>780 252 506 380 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>360pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>360pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Breakpoints</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<false/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2AD069F1E9B00FABCE6</string>\n\t\t\t\t<string>94ABA9B60858E18E00079BE1</string>\n\t\t\t\t<string>1CD052930623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>780 252 506 380 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2AD069F1E9B00FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.bookmarks</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>538 42 401 187 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.classBrowser</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>OptionsSetName</key>\n\t\t\t\t\t\t\t\t<string>Hierarchy, all classes</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Class Browser - NSObject</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ClassesFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {374, 96}}</string>\n\t\t\t\t\t\t\t\t<key>ClassesTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXClassNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>208</real>\n\t\t\t\t\t\t\t\t\t<string>PBXClassBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {630, 331}}</string>\n\t\t\t\t\t\t\t\t<key>MembersFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 105}, {374, 395}}</string>\n\t\t\t\t\t\t\t\t<key>MembersTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeIconColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>216</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>97</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>332pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>332pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t\t<string>1C0AD2B0069F1E9B00FABCE6</string>\n\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.classbrowser</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/LocalePlugin/SqueakLocale.pbproj/johnmci.pbxuser",
    "content": "// !$*UTF8*$!\n{\n\t66A53B2101DAF78500A80109 = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {782, 373}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {711, 373}}\";\n\t\t\tsepNavWindowFrame = \"{{61, 197}, {750, 502}}\";\n\t\t};\n\t};\n\t66B8BC5C0381F66500A8011A = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {740, 6117}}\";\n\t\t\tsepNavSelRange = \"{16850, 24}\";\n\t\t\tsepNavVisRect = \"{{0, 5935}, {740, 73}}\";\n\t\t};\n\t};\n\t66B8BC5E0381F69100A8011A = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {750, 2814}}\";\n\t\t\tsepNavSelRange = \"{1486, 20}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {750, 384}}\";\n\t\t\tsepNavWindowFrame = \"{{84, 252}, {750, 558}}\";\n\t\t};\n\t};\n\t66DF6BFD01D7DCEA00A80119 = {\n\t\tactiveBuildStyle = 66DF6C4401D7DCEA00A80119;\n\t\tactiveExecutable = 94ABA91E0858D35E00079BE1;\n\t\tactiveTarget = 94AF34E00846F91100FA5ACB;\n\t\taddToTargets = (\n\t\t\t94AF34E00846F91100FA5ACB,\n\t\t);\n\t\tbreakpoints = (\n\t\t\t94ABA9220858D37A00079BE1,\n\t\t\t94ABA9240858D37B00079BE1,\n\t\t\t947906FD0858E5030068B3F8,\n\t\t);\n\t\tcodeSenseManager = 9444E60E06E7B8740063F6CC;\n\t\texecutables = (\n\t\t\t94ABA91E0858D35E00079BE1,\n\t\t);\n\t\texpressions = (\n\t\t\tbuffer,\n\t\t);\n\t\tperUserDictionary = {\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXExecutablesDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXExecutablesDataSource_NameID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t22,\n\t\t\t\t\t300,\n\t\t\t\t\t303.5835,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXExecutablesDataSource_ActiveFlagID,\n\t\t\t\t\tPBXExecutablesDataSource_NameID,\n\t\t\t\t\tPBXExecutablesDataSource_CommentsID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t475,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t\t20,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Target_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t200,\n\t\t\t\t\t63,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXTargetDataSource_PrimaryAttribute,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXPerProjectTemplateStateSaveDate = 140401172;\n\t\t\tPBXPrepackagedSmartGroups_v2 = (\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tactivationKey = OldTargetSmartGroup;\n\t\t\t\t\tclz = PBXTargetSmartGroup;\n\t\t\t\t\tdescription = \"Displays all targets of the project.\";\n\t\t\t\t\tglobalID = 1C37FABC04509CD000000102;\n\t\t\t\t\tname = Targets;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = Targets;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXTargetSmartGroup2;\n\t\t\t\t\tdescription = \"Displays all targets of the project as well as nested build phases.\";\n\t\t\t\t\tglobalID = 1C37FBAC04509CD000000102;\n\t\t\t\t\tname = Targets;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = Targets;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXExecutablesSmartGroup;\n\t\t\t\t\tdescription = \"Displays all executables of the project.\";\n\t\t\t\t\tglobalID = 1C37FAAC04509CD000000102;\n\t\t\t\t\tname = Executables;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = Executable;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\" PBXTransientLocationAtTop \" = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXErrorsWarningsSmartGroup;\n\t\t\t\t\tdescription = \"Displays files with errors or warnings.\";\n\t\t\t\t\tglobalID = 1C08E77C0454961000C914BD;\n\t\t\t\t\tname = \"Errors and Warnings\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\tfnmatch = \"\";\n\t\t\t\t\t\timage = WarningsErrors;\n\t\t\t\t\t\trecursive = 1;\n\t\t\t\t\t\tregex = \"\";\n\t\t\t\t\t\troot = \"<PROJECT>\";\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXFilenameSmartGroup;\n\t\t\t\t\tdescription = \"Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter.\";\n\t\t\t\t\tglobalID = 1CC0EA4004350EF90044410B;\n\t\t\t\t\tname = \"Implementation Files\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\tcanSave = 1;\n\t\t\t\t\t\tfnmatch = \"\";\n\t\t\t\t\t\timage = SmartFolder;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t\trecursive = 1;\n\t\t\t\t\t\tregex = \"?*\\\\.[mcMC]\";\n\t\t\t\t\t\troot = \"<PROJECT>\";\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXFilenameSmartGroup;\n\t\t\t\t\tdescription = \"This group displays Interface Builder NIB Files.\";\n\t\t\t\t\tglobalID = 1CC0EA4004350EF90041110B;\n\t\t\t\t\tname = \"NIB Files\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\tcanSave = 1;\n\t\t\t\t\t\tfnmatch = \"*.nib\";\n\t\t\t\t\t\timage = SmartFolder;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t\trecursive = 1;\n\t\t\t\t\t\tregex = \"\";\n\t\t\t\t\t\troot = \"<PROJECT>\";\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = no;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXFindSmartGroup;\n\t\t\t\t\tdescription = \"Displays Find Results.\";\n\t\t\t\t\tglobalID = 1C37FABC05509CD000000102;\n\t\t\t\t\tname = \"Find Results\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = spyglass;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = no;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXBookmarksSmartGroup;\n\t\t\t\t\tdescription = \"Displays Project Bookmarks.\";\n\t\t\t\t\tglobalID = 1C37FABC05539CD112110102;\n\t\t\t\t\tname = Bookmarks;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = Bookmarks;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = XCSCMSmartGroup;\n\t\t\t\t\tdescription = \"Displays files with interesting SCM status.\";\n\t\t\t\t\tglobalID = E2644B35053B69B200211256;\n\t\t\t\t\tname = SCM;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = PBXRepository;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXSymbolsSmartGroup;\n\t\t\t\t\tdescription = \"Displays all symbols for the project.\";\n\t\t\t\t\tglobalID = 1C37FABC04509CD000100104;\n\t\t\t\t\tname = \"Project Symbols\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = ProjectSymbols;\n\t\t\t\t\t\tisLeaf = 1;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXFilenameSmartGroup;\n\t\t\t\t\tdescription = \"Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter.\";\n\t\t\t\t\tglobalID = PBXTemplateMarker;\n\t\t\t\t\tname = \"Simple Filter SmartGroup\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\tcanSave = 1;\n\t\t\t\t\t\tfnmatch = \"*.nib\";\n\t\t\t\t\t\timage = SmartFolder;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t\trecursive = 1;\n\t\t\t\t\t\tregex = \"\";\n\t\t\t\t\t\troot = \"<PROJECT>\";\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXFilenameSmartGroup;\n\t\t\t\t\tdescription = \"Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter.\";\n\t\t\t\t\tglobalID = PBXTemplateMarker;\n\t\t\t\t\tname = \"Simple Regular Expression SmartGroup\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\tcanSave = 1;\n\t\t\t\t\t\tfnmatch = \"\";\n\t\t\t\t\t\timage = SmartFolder;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t\trecursive = 1;\n\t\t\t\t\t\tregex = \"?*\\\\.[mcMC]\";\n\t\t\t\t\t\troot = \"<PROJECT>\";\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tclz = XDDesignSmartGroup;\n\t\t\t\t\tdescription = \"Displays Xdesign models\";\n\t\t\t\t\tglobalID = 2E4A936305E6979E00701470;\n\t\t\t\t\tname = Design;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = Design;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t);\n\t\t\tPBXWorkspaceContents = (\n\t\t\t\t{\n\t\t\t\t\tPBXProjectWorkspaceModule_StateKey_Rev39 = {\n\t\t\t\t\t\tPBXProjectWorkspaceModule_DataSourceSelectionKey_Rev6 = {\n\t\t\t\t\t\t\tBoundsStr = \"{{0, 0}, {469, 441}}\";\n\t\t\t\t\t\t\tRows = (\n\t\t\t\t\t\t\t\t9,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tVisibleRectStr = \"{{0, 0}, {469, 441}}\";\n\t\t\t\t\t\t};\n\t\t\t\t\t\tPBXProjectWorkspaceModule_EditorOpen = false;\n\t\t\t\t\t\tPBXProjectWorkspaceModule_EmbeddedNavigatorGroup = {\n\t\t\t\t\t\t\tPBXSplitModuleInNavigatorKey = {\n\t\t\t\t\t\t\t\tSplitCount = 1;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t};\n\t\t\t\t\t\tPBXProjectWorkspaceModule_GeometryKey_Rev15 = {\n\t\t\t\t\t\t\tPBXProjectWorkspaceModule_SGTM_Geometry = {\n\t\t\t\t\t\t\t\t_collapsingFrameDimension = 0;\n\t\t\t\t\t\t\t\t_indexOfCollapsedView = 0;\n\t\t\t\t\t\t\t\t_percentageOfCollapsedView = 0;\n\t\t\t\t\t\t\t\tsizes = (\n\t\t\t\t\t\t\t\t\t\"{{0, 0}, {182, 458}}\",\n\t\t\t\t\t\t\t\t\t\"{{182, 0}, {484, 458}}\",\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t};\n\t\t\t\t\t\tPBXProjectWorkspaceModule_OldDetailFrame = \"{{0, 0}, {484, 458}}\";\n\t\t\t\t\t\tPBXProjectWorkspaceModule_OldEditorFrame = \"{{0, 0}, {750, 480}}\";\n\t\t\t\t\t\tPBXProjectWorkspaceModule_OldSuperviewFrame = \"{{182, 0}, {484, 458}}\";\n\t\t\t\t\t\tPBXProjectWorkspaceModule_SGTM = {\n\t\t\t\t\t\t\tPBXBottomSmartGroupGIDs = (\n\t\t\t\t\t\t\t\t1C37FBAC04509CD000000102,\n\t\t\t\t\t\t\t\t1C37FAAC04509CD000000102,\n\t\t\t\t\t\t\t\t1C08E77C0454961000C914BD,\n\t\t\t\t\t\t\t\t1CC0EA4004350EF90044410B,\n\t\t\t\t\t\t\t\t1CC0EA4004350EF90041110B,\n\t\t\t\t\t\t\t\t1C37FABC05509CD000000102,\n\t\t\t\t\t\t\t\t1C37FABC05539CD112110102,\n\t\t\t\t\t\t\t\tE2644B35053B69B200211256,\n\t\t\t\t\t\t\t\t1C37FABC04509CD000100104,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnData = {\n\t\t\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnWidthsKey = (\n\t\t\t\t\t\t\t\t\t165,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnsKey_v4 = (\n\t\t\t\t\t\t\t\t\tMainColumn,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateKey_v7 = {\n\t\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateExpansionKey = (\n\t\t\t\t\t\t\t\t\t66DF6BFE01D7DCEA00A80119,\n\t\t\t\t\t\t\t\t\t66B8BC570381F53800A8011A,\n\t\t\t\t\t\t\t\t\t66DF6BFF01D7DCEA00A80119,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateSelectionKey = (\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateVisibleRectKey = \"{{0, 0}, {165, 440}}\";\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tPBXTopSmartGroupGIDs = (\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t);\n\t\t\t\"PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXBuildResultsModule\" = {\n\t\t\t};\n\t\t\t\"PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXDebugCLIModule\" = {\n\t\t\t};\n\t\t\t\"PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXNavigatorGroup\" = {\n\t\t\t\tPBXSplitModuleInNavigatorKey = {\n\t\t\t\t\tSplitCount = 1;\n\t\t\t\t};\n\t\t\t};\n\t\t\t\"PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXProjectWorkspaceModule\" = {\n\t\t\t\tPBXProjectWorkspaceModule_StateKey_Rev39 = {\n\t\t\t\t\tPBXProjectWorkspaceModule_DataSourceSelectionKey_Rev6 = {\n\t\t\t\t\t\tBoundsStr = \"{{0, 0}, {469, 441}}\";\n\t\t\t\t\t\tRows = (\n\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tVisibleRectStr = \"{{0, 0}, {469, 441}}\";\n\t\t\t\t\t};\n\t\t\t\t\tPBXProjectWorkspaceModule_EditorOpen = false;\n\t\t\t\t\tPBXProjectWorkspaceModule_EmbeddedNavigatorGroup = {\n\t\t\t\t\t\tPBXSplitModuleInNavigatorKey = {\n\t\t\t\t\t\t\tSplitCount = 1;\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t\tPBXProjectWorkspaceModule_GeometryKey_Rev15 = {\n\t\t\t\t\t\tPBXProjectWorkspaceModule_SGTM_Geometry = {\n\t\t\t\t\t\t\t_collapsingFrameDimension = 0;\n\t\t\t\t\t\t\t_indexOfCollapsedView = 0;\n\t\t\t\t\t\t\t_percentageOfCollapsedView = 0;\n\t\t\t\t\t\t\tsizes = (\n\t\t\t\t\t\t\t\t\"{{0, 0}, {182, 458}}\",\n\t\t\t\t\t\t\t\t\"{{182, 0}, {484, 458}}\",\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t\tPBXProjectWorkspaceModule_OldDetailFrame = \"{{0, 0}, {484, 458}}\";\n\t\t\t\t\tPBXProjectWorkspaceModule_OldEditorFrame = \"{{0, 0}, {750, 480}}\";\n\t\t\t\t\tPBXProjectWorkspaceModule_OldSuperviewFrame = \"{{182, 0}, {484, 458}}\";\n\t\t\t\t\tPBXProjectWorkspaceModule_SGTM = {\n\t\t\t\t\t\tPBXBottomSmartGroupGIDs = (\n\t\t\t\t\t\t\t1C37FBAC04509CD000000102,\n\t\t\t\t\t\t\t1C37FAAC04509CD000000102,\n\t\t\t\t\t\t\t1C08E77C0454961000C914BD,\n\t\t\t\t\t\t\t1CC0EA4004350EF90044410B,\n\t\t\t\t\t\t\t1CC0EA4004350EF90041110B,\n\t\t\t\t\t\t\t1C37FABC05509CD000000102,\n\t\t\t\t\t\t\t1C37FABC05539CD112110102,\n\t\t\t\t\t\t\tE2644B35053B69B200211256,\n\t\t\t\t\t\t\t1C37FABC04509CD000100104,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnData = {\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnWidthsKey = (\n\t\t\t\t\t\t\t\t165,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnsKey_v4 = (\n\t\t\t\t\t\t\t\tMainColumn,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t};\n\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateKey_v7 = {\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateExpansionKey = (\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateSelectionKey = (\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateVisibleRectKey = \"{{0, 0}, {165, 440}}\";\n\t\t\t\t\t\t};\n\t\t\t\t\t\tPBXTopSmartGroupGIDs = (\n\t\t\t\t\t\t);\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tPBXWorkspaceGeometries = (\n\t\t\t\t{\n\t\t\t\t\tFrame = \"{{0, 0}, {666, 458}}\";\n\t\t\t\t\tPBXProjectWorkspaceModule_GeometryKey_Rev15 = {\n\t\t\t\t\t};\n\t\t\t\t\tRubberWindowFrame = \"212 190 666 500 0 0 1024 746 \";\n\t\t\t\t},\n\t\t\t);\n\t\t\t\"PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXBuildResultsModule\" = {\n\t\t\t\tFrame = \"{{0, 0}, {480, 217}}\";\n\t\t\t\tPBXModuleWindowStatusBarHidden = YES;\n\t\t\t\tRubberWindowFrame = \"272 407 480 238 0 0 1024 746 \";\n\t\t\t};\n\t\t\t\"PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXDebugCLIModule\" = {\n\t\t\t\tFrame = \"{{0, 0}, {400, 201}}\";\n\t\t\t\tPBXModuleWindowStatusBarHidden = YES;\n\t\t\t\tRubberWindowFrame = \"50 718 400 222 0 0 1024 746 \";\n\t\t\t};\n\t\t\t\"PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXNavigatorGroup\" = {\n\t\t\t\tFrame = \"{{0, 0}, {750, 481}}\";\n\t\t\t\tPBXModuleWindowStatusBarHidden = YES;\n\t\t\t\tRubberWindowFrame = \"61 197 750 502 0 0 1024 746 \";\n\t\t\t};\n\t\t\t\"PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXProjectWorkspaceModule\" = {\n\t\t\t\tFrame = \"{{0, 0}, {666, 458}}\";\n\t\t\t\tPBXProjectWorkspaceModule_GeometryKey_Rev15 = {\n\t\t\t\t};\n\t\t\t\tRubberWindowFrame = \"212 190 666 500 0 0 1024 746 \";\n\t\t\t};\n\t\t\tPBXWorkspaceStateSaveDate = 140401172;\n\t\t};\n\t\tperUserProjectItems = {\n\t\t\t94405840085E5A7A004495D0 = 94405840085E5A7A004495D0;\n\t\t\t94405842085E5A7A004495D0 = 94405842085E5A7A004495D0;\n\t\t\t94461695085E5999004F7BD5 = 94461695085E5999004F7BD5;\n\t\t\t94461696085E5999004F7BD5 = 94461696085E5999004F7BD5;\n\t\t\t94461699085E5999004F7BD5 = 94461699085E5999004F7BD5;\n\t\t\t9446169B085E5999004F7BD5 = 9446169B085E5999004F7BD5;\n\t\t\t944616B9085E59BC004F7BD5 = 944616B9085E59BC004F7BD5;\n\t\t\t947907380858EDF80068B3F8 = 947907380858EDF80068B3F8;\n\t\t\t947907390858EDF80068B3F8 = 947907390858EDF80068B3F8;\n\t\t\t9479076E0859F8950068B3F8 = 9479076E0859F8950068B3F8;\n\t\t};\n\t\tsourceControlManager = 9444E60D06E7B8740063F6CC;\n\t\tuserBuildSettings = {\n\t\t};\n\t};\n\t94405840085E5A7A004495D0 = {\n\t\tfRef = 94405841085E5A7A004495D0;\n\t\tisa = PBXTextBookmark;\n\t\trLen = 0;\n\t\trLoc = 2147483647;\n\t\trType = 0;\n\t};\n\t94405841085E5A7A004495D0 = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = text.plist.strings;\n\t\tname = InfoPlist.strings;\n\t\tpath = /Users/johnmci/Documents/SqueakLocale/build/LocalePlugin.bundle/Contents/Resources/English.lproj/InfoPlist.strings;\n\t\trefType = 0;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94405842085E5A7A004495D0 = {\n\t\tfRef = 94405843085E5A7A004495D0;\n\t\tisa = PBXTextBookmark;\n\t\tname = \"(null): 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 263;\n\t\tvrLoc = 0;\n\t};\n\t94405843085E5A7A004495D0 = {\n\t\tisa = PBXFileReference;\n\t\tname = InfoPlist.strings;\n\t\tpath = /Users/johnmci/Documents/SqueakLocale/build/LocalePlugin.bundle/Contents/Resources/English.lproj/InfoPlist.strings;\n\t\trefType = 0;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9444E60D06E7B8740063F6CC = {\n\t\tfallbackIsa = XCSourceControlManager;\n\t\tisSCMEnabled = 0;\n\t\tisa = PBXSourceControlManager;\n\t\tscmConfiguration = {\n\t\t};\n\t\tscmType = scm.cvs;\n\t};\n\t9444E60E06E7B8740063F6CC = {\n\t\tindexTemplatePath = \"\";\n\t\tisa = PBXCodeSenseManager;\n\t};\n\t94461695085E5999004F7BD5 = {\n\t\tfRef = 94ABA8900858C3F900079BE1;\n\t\tisa = PBXTextBookmark;\n\t\tname = \"LocalePlugin.h: 79\";\n\t\trLen = 0;\n\t\trLoc = 2551;\n\t\trType = 0;\n\t\tvrLen = 1509;\n\t\tvrLoc = 1658;\n\t};\n\t94461696085E5999004F7BD5 = {\n\t\tfRef = 94ABA89A0858C5FA00079BE1;\n\t\tisa = PBXTextBookmark;\n\t\tname = locale.h;\n\t\trLen = 8;\n\t\trLoc = 162;\n\t\trType = 0;\n\t\tvrLen = 189;\n\t\tvrLoc = 0;\n\t};\n\t94461699085E5999004F7BD5 = {\n\t\tfRef = 94ABA89A0858C5FA00079BE1;\n\t\tisa = PBXTextBookmark;\n\t\tname = locale.h;\n\t\trLen = 8;\n\t\trLoc = 162;\n\t\trType = 0;\n\t\tvrLen = 189;\n\t\tvrLoc = 0;\n\t};\n\t9446169B085E5999004F7BD5 = {\n\t\tfRef = 94ABA8900858C3F900079BE1;\n\t\tisa = PBXTextBookmark;\n\t\tname = \"LocalePlugin.h: 79\";\n\t\trLen = 0;\n\t\trLoc = 2551;\n\t\trType = 0;\n\t\tvrLen = 1509;\n\t\tvrLoc = 1658;\n\t};\n\t944616B9085E59BC004F7BD5 = {\n\t\tfRef = 94ABA89B0858C5FA00079BE1;\n\t\tisa = PBXTextBookmark;\n\t\tname = \"sqMacLocaleCarbon.c: 186\";\n\t\trLen = 0;\n\t\trLoc = 5594;\n\t\trType = 0;\n\t\tvrLen = 954;\n\t\tvrLoc = 4643;\n\t};\n\t947906FD0858E5030068B3F8 = {\n\t\tfileReference = 94ABA89B0858C5FA00079BE1;\n\t\tfunctionName = \"sqLocMeasurementMetric()\";\n\t\tisa = PBXFileBreakpoint;\n\t\tlineNumber = 80;\n\t\tstate = 1;\n\t};\n\t947907380858EDF80068B3F8 = {\n\t\tfRef = 94ABA89B0858C5FA00079BE1;\n\t\tisa = PBXTextBookmark;\n\t\tname = \"sqMacLocaleCarbon.c: 80\";\n\t\trLen = 0;\n\t\trLoc = 2240;\n\t\trType = 0;\n\t\tvrLen = 1096;\n\t\tvrLoc = 1817;\n\t};\n\t947907390858EDF80068B3F8 = {\n\t\tfRef = 94ABA8870858C2CB00079BE1;\n\t\tisa = PBXTextBookmark;\n\t\tname = sqLocMeasurementMetric;\n\t\trLen = 22;\n\t\trLoc = 6712;\n\t\trType = 0;\n\t\tvrLen = 959;\n\t\tvrLoc = 6129;\n\t};\n\t9479076E0859F8950068B3F8 = {\n\t\tfRef = 94ABA8870858C2CB00079BE1;\n\t\tisa = PBXTextBookmark;\n\t\tname = instantiateClassindexableSize;\n\t\trLen = 29;\n\t\trLoc = 6270;\n\t\trType = 0;\n\t\tvrLen = 1249;\n\t\tvrLoc = 4205;\n\t};\n\t94ABA8870858C2CB00079BE1 = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1214, 4774}}\";\n\t\t\tsepNavSelRange = \"{6497, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 3004}, {380, 320}}\";\n\t\t\tsepNavWindowFrame = \"{{153, 28}, {962, 719}}\";\n\t\t};\n\t};\n\t94ABA8900858C3F900079BE1 = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {750, 1316}}\";\n\t\t\tsepNavSelRange = \"{2873, 19}\";\n\t\t\tsepNavVisRect = \"{{0, 932}, {750, 384}}\";\n\t\t};\n\t};\n\t94ABA89A0858C5FA00079BE1 = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {673, 581}}\";\n\t\t\tsepNavSelRange = \"{162, 8}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {673, 581}}\";\n\t\t\tsepNavWindowFrame = \"{{130, 49}, {962, 719}}\";\n\t\t};\n\t};\n\t94ABA89B0858C5FA00079BE1 = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {673, 2632}}\";\n\t\t\tsepNavSelRange = \"{5594, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 2224}, {673, 397}}\";\n\t\t\tsepNavWindowFrame = \"{{417, 3}, {962, 719}}\";\n\t\t};\n\t};\n\t94ABA91E0858D35E00079BE1 = {\n\t\tactiveArgIndex = 2147483647;\n\t\tactiveArgIndices = (\n\t\t);\n\t\targumentStrings = (\n\t\t);\n\t\tconfigStateDict = {\n\t\t};\n\t\tcppStopOnCatchEnabled = 0;\n\t\tcppStopOnThrowEnabled = 0;\n\t\tcustomDataFormattersEnabled = 1;\n\t\tdebuggerPlugin = GDBDebugging;\n\t\tdisassemblyDisplayState = 0;\n\t\tdylibVariantSuffix = \"\";\n\t\tenableDebugStr = 1;\n\t\tenvironmentEntries = (\n\t\t);\n\t\texecutableSystemSymbolLevel = 0;\n\t\texecutableUserSymbolLevel = 0;\n\t\tisa = PBXExecutable;\n\t\tlaunchableReference = 94ABA91F0858D35E00079BE1;\n\t\tlibgmallocEnabled = 0;\n\t\tname = Squeak;\n\t\tsavedGlobals = {\n\t\t};\n\t\tshlibInfoDictList_v2 = (\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/system/libmathCommon.A.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libSystem.B.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libicucore.A.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libauto.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libobjc.A.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libz.1.2.2.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Security.framework/Versions/A/Security;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/WebServicesCore.framework/Versions/A/WebServicesCore;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CarbonSound.framework/Versions/A/CarbonSound;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libbsm.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libcrypto.0.9.7.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreText.framework/Versions/A/CoreText;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libcups.2.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/FindByContent.framework/Versions/A/FindByContent;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRaw.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libmx.A.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libiconv.2.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libxml2.2.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HTMLRendering.framework/Versions/A/HTMLRendering;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/NavigationServices.framework/Versions/A/NavigationServices;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/AGL.framework/Versions/A/AGL;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/PrivateFrameworks/ZeroLink.framework/Versions/A/ZeroLink;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /Users/johnmci/Documents/Squeak3.8.0/build/Squeak.app/Contents/MacOS/Squeak;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacEncoding.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/interp.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacUIMenuBar.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacUIEvents.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacMain.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacUIClipBoard.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacWindow.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacUnixCommandLineInterface.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacUIAppleEvents.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacFileLogic.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacImageIO.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Components/DictionaryService.component/Contents/MacOS/DictionaryService;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacMemory.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacTime.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/UUIDPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/SurfacePlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/StarSqueakPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/SoundPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/SoundGenerationPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/SoundCodecPrims.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/SocketPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/SerialPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/SecurityPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/MiscPrimitivePlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/Matrix2x3Plugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/MIDIPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/MacMenubarPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/LargeIntegers.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/Klatt.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/JoystickTabletPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/JPEGReaderPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/Error.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/JPEGReadWriter2Plugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/InternetConfigPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/HostWindowPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/GeniePlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/FloatArrayPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/FilePlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/FFTPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/DropPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/ZipPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/DSAPrims.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/BitBltPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/B2DPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/BMPReadWriterPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/Squeak3D.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/B3DAcceleratorPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/AsynchFilePlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/ADPCMCodecPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacSerialPort.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/osExports.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqNamedPrims.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqVirtualMachine.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/aio.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacExternalPrims.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacHostWindow.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacSecurity.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqFilePluginBasicPrims.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacDirectory.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacDragDrop.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacUnixInterfaceSound.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqUnixSoundMacOSXJMM.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /Users/johnmci/Documents/Squeak3.8.0/build/Plugins/LocalePlugin.bundle/Contents/MacOS/LocalePlugin;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /Developer/Applications/Xcode.app/Contents/PlugIns/GDBMIDebugging.xcplugin/Contents/Resources/PBGDBIntrospectionSupport.A.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Library/Application Support/Apple/Developer Tools/CustomDataViews/CFDataFormatters.bundle/Contents/MacOS/CFDataFormatters\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqUnixSocket.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t);\n\t\tsourceDirectories = (\n\t\t);\n\t};\n\t94ABA91F0858D35E00079BE1 = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = wrapper.application;\n\t\tname = Squeak.app;\n\t\tpath = /Users/johnmci/Documents/Squeak3.8.0/build/Squeak.app;\n\t\trefType = 0;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94ABA9220858D37A00079BE1 = {\n\t\tfileReference = 94ABA89B0858C5FA00079BE1;\n\t\tfunctionName = \"sqLocGetCountryInto()\";\n\t\tisa = PBXFileBreakpoint;\n\t\tlineNumber = 25;\n\t\tstate = 1;\n\t};\n\t94ABA9240858D37B00079BE1 = {\n\t\tfileReference = 94ABA89B0858C5FA00079BE1;\n\t\tfunctionName = \"sqLocGetLanguageInto()\";\n\t\tisa = PBXFileBreakpoint;\n\t\tlineNumber = 41;\n\t\tstate = 1;\n\t};\n\t94AF34E00846F91100FA5ACB = {\n\t\tactiveExec = 0;\n\t};\n\t94AF34F10846F91100FA5ACB = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {923, 590}}\";\n\t\t\tsepNavSelRange = \"{284, 6}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {923, 590}}\";\n\t\t\tsepNavWindowFrame = \"{{84, 91}, {962, 719}}\";\n\t\t};\n\t};\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/LocalePlugin/SqueakLocale.pbproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 39;\n\tobjects = {\n\t\t66A53B2001DAF78500A80109 = {\n\t\t\tchildren = (\n\t\t\t\t66A53B2101DAF78500A80109,\n\t\t\t);\n\t\t\tisa = PBXVariantGroup;\n\t\t\tname = InfoPlist.strings;\n\t\t\tpath = \"\";\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66A53B2101DAF78500A80109 = {\n\t\t\tfileEncoding = 30;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = text.plist.strings;\n\t\t\tname = English;\n\t\t\tpath = resources/English.lproj/InfoPlist.strings;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66B8BC570381F53800A8011A = {\n\t\t\tchildren = (\n\t\t\t\t94AF35040846F9AB00FA5ACB,\n\t\t\t\t94AF35000846F98600FA5ACB,\n\t\t\t\t66B8BC580381F61C00A8011A,\n\t\t\t\t66B8BC5A0381F63A00A8011A,\n\t\t\t\t66B8BC5C0381F66500A8011A,\n\t\t\t\t66B8BC5E0381F69100A8011A,\n\t\t\t);\n\t\t\tisa = PBXGroup;\n\t\t\tname = platforms;\n\t\t\tpath = ../Squeak3.8.0/platforms;\n\t\t\trefType = 2;\n\t\t\tsourceTree = SOURCE_ROOT;\n\t\t};\n\t\t66B8BC580381F61C00A8011A = {\n\t\t\tfileEncoding = 30;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.h;\n\t\t\tname = sqConfig.h;\n\t\t\tpath = \"Mac OS/vm/sqConfig.h\";\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66B8BC5A0381F63A00A8011A = {\n\t\t\tfileEncoding = 30;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.h;\n\t\t\tname = sqPlatformSpecific.h;\n\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/platforms/Mac OS/vm/sqPlatformSpecific.h\";\n\t\t\trefType = 0;\n\t\t\tsourceTree = \"<absolute>\";\n\t\t};\n\t\t66B8BC5C0381F66500A8011A = {\n\t\t\tfileEncoding = 30;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.h;\n\t\t\tname = sq.h;\n\t\t\tpath = Cross/vm/sq.h;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66B8BC5E0381F69100A8011A = {\n\t\t\tfileEncoding = 30;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.h;\n\t\t\tname = sqVirtualMachine.h;\n\t\t\tpath = /Users/johnmci/Documents/Squeak3.8.0/platforms/Cross/vm/sqVirtualMachine.h;\n\t\t\trefType = 0;\n\t\t\tsourceTree = \"<absolute>\";\n\t\t};\n\t\t66C6C8E501DB1EC300A80109 = {\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = image.icns;\n\t\t\tpath = SqueakPlugin.icns;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66DF6BFD01D7DCEA00A80119 = {\n\t\t\tbuildSettings = {\n\t\t\t};\n\t\t\tbuildStyles = (\n\t\t\t\t66DF6C4301D7DCEA00A80119,\n\t\t\t\t66DF6C4401D7DCEA00A80119,\n\t\t\t);\n\t\t\thasScannedForEncodings = 1;\n\t\t\tisa = PBXProject;\n\t\t\tmainGroup = 66DF6BFE01D7DCEA00A80119;\n\t\t\tproductRefGroup = 66DF6C4501D7DEEE00A80119;\n\t\t\tprojectDirPath = \"\";\n\t\t\ttargets = (\n\t\t\t\t94AF34E00846F91100FA5ACB,\n\t\t\t);\n\t\t};\n\t\t66DF6BFE01D7DCEA00A80119 = {\n\t\t\tchildren = (\n\t\t\t\t66B8BC570381F53800A8011A,\n\t\t\t\t66DF6BFF01D7DCEA00A80119,\n\t\t\t\t66DF6C3901D7DCEA00A80119,\n\t\t\t\t66DF6C8201D7DF7E00A80119,\n\t\t\t\t66DF6C4501D7DEEE00A80119,\n\t\t\t\t94AF34F10846F91100FA5ACB,\n\t\t\t);\n\t\t\tisa = PBXGroup;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66DF6BFF01D7DCEA00A80119 = {\n\t\t\tchildren = (\n\t\t\t\t94ABA8920858C40D00079BE1,\n\t\t\t\t94ABA8900858C3F900079BE1,\n\t\t\t\t94ABA8870858C2CB00079BE1,\n\t\t\t\t94ABA89A0858C5FA00079BE1,\n\t\t\t\t94ABA89B0858C5FA00079BE1,\n\t\t\t);\n\t\t\tisa = PBXGroup;\n\t\t\tname = Sources;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66DF6C3901D7DCEA00A80119 = {\n\t\t\tchildren = (\n\t\t\t\t66A53B2001DAF78500A80109,\n\t\t\t\t66C6C8E501DB1EC300A80109,\n\t\t\t);\n\t\t\tisa = PBXGroup;\n\t\t\tname = resources;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66DF6C4301D7DCEA00A80119 = {\n\t\t\tbuildSettings = {\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_ENABLE_FIX_AND_CONTINUE = YES;\n\t\t\t\tGCC_GENERATE_DEBUGGING_SYMBOLS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tOPTIMIZATION_CFLAGS = \"-O0\";\n\t\t\t\tZERO_LINK = NO;\n\t\t\t};\n\t\t\tisa = PBXBuildStyle;\n\t\t\tname = Development;\n\t\t};\n\t\t66DF6C4401D7DCEA00A80119 = {\n\t\t\tbuildSettings = {\n\t\t\t\tCOPY_PHASE_STRIP = YES;\n\t\t\t\tGCC_ENABLE_FIX_AND_CONTINUE = NO;\n\t\t\t\tOPTIMIZATION_CFLAGS = \"-O3 -mcpu=750 -funroll-loops \";\n\t\t\t\tOTHER_CFLAGS = \"-DTARGET_OS_MAC -DNOPTHREADS\";\n\t\t\t\tZERO_LINK = NO;\n\t\t\t};\n\t\t\tisa = PBXBuildStyle;\n\t\t\tname = Deployment;\n\t\t};\n\t\t66DF6C4501D7DEEE00A80119 = {\n\t\t\tchildren = (\n\t\t\t\t94AF34F20846F91100FA5ACB,\n\t\t\t);\n\t\t\tisa = PBXGroup;\n\t\t\tname = Products;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66DF6C8201D7DF7E00A80119 = {\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = wrapper.framework;\n\t\t\tname = Carbon.framework;\n\t\t\tpath = /System/Library/Frameworks/Carbon.framework;\n\t\t\trefType = 0;\n\t\t\tsourceTree = \"<absolute>\";\n\t\t};\n//660\n//661\n//662\n//663\n//664\n//940\n//941\n//942\n//943\n//944\n\t\t94ABA8870858C2CB00079BE1 = {\n\t\t\tfileEncoding = 30;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.c;\n\t\t\tpath = LocalePlugin.c;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94ABA8880858C2CB00079BE1 = {\n\t\t\tfileRef = 94ABA8870858C2CB00079BE1;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t94ABA8900858C3F900079BE1 = {\n\t\t\tfileEncoding = 30;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.h;\n\t\t\tname = LocalePlugin.h;\n\t\t\tpath = ../Squeak3.8.0/platforms/Cross/plugins/LocalePlugin/LocalePlugin.h;\n\t\t\trefType = 2;\n\t\t\tsourceTree = SOURCE_ROOT;\n\t\t};\n\t\t94ABA8910858C3F900079BE1 = {\n\t\t\tfileRef = 94ABA8900858C3F900079BE1;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t94ABA8920858C40D00079BE1 = {\n\t\t\tfileEncoding = 30;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.h;\n\t\t\tname = sqMemoryAccess.h;\n\t\t\tpath = ../Squeak3.8.0/platforms/Cross/vm/sqMemoryAccess.h;\n\t\t\trefType = 2;\n\t\t\tsourceTree = SOURCE_ROOT;\n\t\t};\n\t\t94ABA8930858C40D00079BE1 = {\n\t\t\tfileRef = 94ABA8920858C40D00079BE1;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t94ABA89A0858C5FA00079BE1 = {\n\t\t\tfileEncoding = 4;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.h;\n\t\t\tpath = sqMacLocaleCarbon.h;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94ABA89B0858C5FA00079BE1 = {\n\t\t\tfileEncoding = 4;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.c;\n\t\t\tpath = sqMacLocaleCarbon.c;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94ABA89C0858C5FA00079BE1 = {\n\t\t\tfileRef = 94ABA89A0858C5FA00079BE1;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t94ABA89D0858C5FA00079BE1 = {\n\t\t\tfileRef = 94ABA89B0858C5FA00079BE1;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t94AF34E00846F91100FA5ACB = {\n\t\t\tbuildPhases = (\n\t\t\t\t94AF34E10846F91100FA5ACB,\n\t\t\t\t94AF34E70846F91100FA5ACB,\n\t\t\t\t94AF34EA0846F91100FA5ACB,\n\t\t\t\t94AF34EE0846F91100FA5ACB,\n\t\t\t\t94AF34F00846F91100FA5ACB,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t\t94AF34F70846F94F00FA5ACB,\n\t\t\t);\n\t\t\tbuildSettings = {\n\t\t\t\tGCC_GENERATE_DEBUGGING_SYMBOLS = NO;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 3;\n\t\t\t\tHEADER_SEARCH_PATHS = /Developer/Headers/FlatCarbon;\n\t\t\t\tINFOPLIST_FILE = \"Info-SqueakLocalePlugin__Upgraded_.plist\";\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tOTHER_REZFLAGS = \"\";\n\t\t\t\tPRODUCT_NAME = LocalePlugin;\n\t\t\t\tSECTORDER_FLAGS = \"\";\n\t\t\t\tWARNING_CFLAGS = \"-Wmost -Wno-four-char-constants -Wno-unknown-pragmas\";\n\t\t\t\tWRAPPER_EXTENSION = bundle;\n\t\t\t};\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tisa = PBXNativeTarget;\n\t\t\tname = \"SqueakLocalePlugin (Upgraded)\";\n\t\t\tproductInstallPath = \"$(USER_LIBRARY_DIR)/Bundles\";\n\t\t\tproductName = \"mpeg3PluginBundle Debug\";\n\t\t\tproductReference = 94AF34F20846F91100FA5ACB;\n\t\t\tproductType = \"com.apple.product-type.bundle\";\n\t\t};\n\t\t94AF34E10846F91100FA5ACB = {\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t94AF34E20846F91100FA5ACB,\n\t\t\t\t94AF34E30846F91100FA5ACB,\n\t\t\t\t94AF34E40846F91100FA5ACB,\n\t\t\t\t94AF34E50846F91100FA5ACB,\n\t\t\t\t94AF35010846F98600FA5ACB,\n\t\t\t\t94AF35050846F9AB00FA5ACB,\n\t\t\t\t94ABA8910858C3F900079BE1,\n\t\t\t\t94ABA8930858C40D00079BE1,\n\t\t\t\t94ABA89C0858C5FA00079BE1,\n\t\t\t);\n\t\t\tisa = PBXHeadersBuildPhase;\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t94AF34E20846F91100FA5ACB = {\n\t\t\tfileRef = 66B8BC580381F61C00A8011A;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t94AF34E30846F91100FA5ACB = {\n\t\t\tfileRef = 66B8BC5A0381F63A00A8011A;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t94AF34E40846F91100FA5ACB = {\n\t\t\tfileRef = 66B8BC5C0381F66500A8011A;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t94AF34E50846F91100FA5ACB = {\n\t\t\tfileRef = 66B8BC5E0381F69100A8011A;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t94AF34E70846F91100FA5ACB = {\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t94AF34E80846F91100FA5ACB,\n\t\t\t\t94AF34E90846F91100FA5ACB,\n\t\t\t);\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t94AF34E80846F91100FA5ACB = {\n\t\t\tfileRef = 66C6C8E501DB1EC300A80109;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t94AF34E90846F91100FA5ACB = {\n\t\t\tfileRef = 66A53B2001DAF78500A80109;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t94AF34EA0846F91100FA5ACB = {\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t94ABA8880858C2CB00079BE1,\n\t\t\t\t94ABA89D0858C5FA00079BE1,\n\t\t\t);\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t94AF34EE0846F91100FA5ACB = {\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t94AF34EF0846F91100FA5ACB,\n\t\t\t);\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t94AF34EF0846F91100FA5ACB = {\n\t\t\tfileRef = 66DF6C8201D7DF7E00A80119;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t94AF34F00846F91100FA5ACB = {\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tisa = PBXRezBuildPhase;\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t94AF34F10846F91100FA5ACB = {\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = text.xml;\n\t\t\tpath = \"Info-SqueakLocalePlugin__Upgraded_.plist\";\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94AF34F20846F91100FA5ACB = {\n\t\t\texplicitFileType = wrapper.cfbundle;\n\t\t\tincludeInIndex = 0;\n\t\t\tisa = PBXFileReference;\n\t\t\tpath = LocalePlugin.bundle;\n\t\t\trefType = 3;\n\t\t\tsourceTree = BUILT_PRODUCTS_DIR;\n\t\t};\n\t\t94AF34F70846F94F00FA5ACB = {\n\t\t\tcompilerSpec = com.apple.compilers.gcc.3_3;\n\t\t\tfileType = sourcecode.c;\n\t\t\tisEditable = 1;\n\t\t\tisa = PBXBuildRule;\n\t\t\toutputFiles = (\n\t\t\t);\n\t\t};\n\t\t94AF35000846F98600FA5ACB = {\n\t\t\tfileEncoding = 30;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.h;\n\t\t\tname = config.h;\n\t\t\tpath = \"Mac OS/vm/config.h\";\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94AF35010846F98600FA5ACB = {\n\t\t\tfileRef = 94AF35000846F98600FA5ACB;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t94AF35040846F9AB00FA5ACB = {\n\t\t\tfileEncoding = 30;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.h;\n\t\t\tname = interp.h;\n\t\t\tpath = ../Squeak3.8.0/src/vm/interp.h;\n\t\t\trefType = 2;\n\t\t\tsourceTree = SOURCE_ROOT;\n\t\t};\n\t\t94AF35050846F9AB00FA5ACB = {\n\t\t\tfileRef = 94AF35040846F9AB00FA5ACB;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t};\n\trootObject = 66DF6BFD01D7DCEA00A80119;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/LocalePlugin/sqMacLocaleCarbon.c",
    "content": "/*\n *  sqMacLocaleCarbon.c\n *  SqueakLocale\n *\n *  Created by John M McIntosh on 6/9/05.\n *\n */\n\n#include \"sqMacLocaleCarbon.h\"\n\n/* Locale support functions */\nchar * thisLocale;\nstruct lconv * localeTable;\n\nsqInt sqLocInitialize(void) {\n\tthisLocale = setlocale(LC_ALL,\"\");\n\tlocaleTable = localeconv();\n\treturn true;\n}\n/************** Country and language ******************/\n\n/* write the country code into the string ptr. ISO 3166 is the relevant source\n * here; see http://www.unicode.org/onlinedat/countries.html for details.\n * Using the 3 character Alpha-3 codes */\nvoid\tsqLocGetCountryInto(char * str) {\n\tCFLocaleRef\t\tuserLocaleRef;\n\tCFStringRef\t\tstringRef;\n\tchar\t\t\tbuffer[4];\n\t\n\tuserLocaleRef = CFLocaleCopyCurrent();\n\tstringRef = CFLocaleGetValue(userLocaleRef, kCFLocaleCountryCode);\n\tCFStringGetCString(stringRef, buffer, 4,kCFStringEncodingMacRoman);\t\n\tmemcpy(str,buffer,3);\n\tCFRelease(userLocaleRef);\n}\n\n/* write the 3 char string describing the language in use into string ptr.\n * ISO 639 is the relevant source here;\n * see http://www.w3.org/WAI/ER/IG/ert/iso639.html\n * for details */\nvoid\tsqLocGetLanguageInto(char * str) {\n\tCFLocaleRef\t\tuserLocaleRef;\n\tCFStringRef\t\tstringRef;\n\tchar\t\t\tbuffer[4];\n\t\n\tuserLocaleRef = CFLocaleCopyCurrent();\n\tstringRef = CFLocaleGetValue(userLocaleRef, kCFLocaleLanguageCode);\n\tCFStringGetCString(stringRef, buffer, 4,kCFStringEncodingMacRoman);\t\n\tmemcpy(str,buffer,3);\n\tCFRelease(userLocaleRef);\n}\n\n/***************** Currency ********************/\n\n/* return 1 (true) if the currency symbol is to be placed in front of the\n *currency amount */\nsqInt\tsqLocCurrencyNotation(void) {\n\treturn localeTable->p_cs_precedes;\n}\n\n/* return the length in chars of the curency symbol string */\nsqInt\tsqLocCurrencySymbolSize(void) {\n\treturn strlen(localeTable->currency_symbol);\n}\n/* write the currency symbol into the string ptr */\nvoid\tsqLocGetCurrencySymbolInto(char * str) {\n\tstrcpy(str, localeTable->currency_symbol);\n}\n\n\n/***************** Numbers and measurements **************/\n\n/* return true if the metric measurements system is to be used, false otherwise\n * (USA is about it) */\nsqInt\tsqLocMeasurementMetric(void) {\n\tCFLocaleRef\t\tuserLocaleRef;\n\tCFStringRef\t\tstringRef;\n\tchar\t\t\tbuffer[7];\n\t\n\tuserLocaleRef = CFLocaleCopyCurrent();\n\tstringRef = CFLocaleGetValue(userLocaleRef, kCFLocaleMeasurementSystem);\n\tCFStringGetCString(stringRef, buffer, 7,kCFStringEncodingMacRoman);\t\n\tCFRelease(userLocaleRef);\n\tif (strcmp(buffer, \"Metric\") == 0)\n\t\treturn 1;\n\telse\n\t\treturn 0;\n}\n\n/* write the 1 char used for digit grouping into string ptr.\n * Usually this is . or ,  as in 1,000,000 */\nvoid\tsqLocGetDigitGroupingSymbolInto(char * str) {\n\tstrncpy(str, localeTable->thousands_sep, 1);\n}\n/* write the 1 char used for decimal separation into string ptr.\n * Usually this is . or , */\nvoid\tsqLocGetDecimalSymbolInto(char * str) {\n\tstrncpy(str, localeTable->decimal_point, 1);\n}\n\n\n/****************** time and date *********************/\n\nsqInt\tsqLocGetVMOffsetToUTC(void) {\n\t/* return 0 for now */\n\treturn 0;\n}\n\nsqInt\tsqLocGetTimezoneOffset(void) {\n\tCFTimeZoneRef zoneRef = CFTimeZoneCopySystem ();\n\tCFAbsoluteTime  timeIs = CFAbsoluteTimeGetCurrent();\n\tCFTimeInterval interval;\n\t\n\tinterval = CFTimeZoneGetSecondsFromGMT (zoneRef,timeIs);\n\tCFRelease(zoneRef);\n\treturn ((sqInt) interval)/60;\n}\n\n/* return true if DST is in use, false otherwise */\nsqInt\tsqLocDaylightSavings(void) {\nstruct tm * timeBlock;\ntime_t theTime;\n\ttheTime = time((time_t)NULL);\n\ttimeBlock = localtime(&theTime);\n\treturn timeBlock->tm_isdst;\n}\n\nvoid dateFormatIs(char *buffer,CFDateFormatterStyle type ) {\n\tCFDateFormatterRef longFormatter = CFDateFormatterCreate(NULL, NULL, type, type);\n\tCFStringRef longStrRef = CFDateFormatterGetFormat(longFormatter);\n\tCFStringGetCString(longStrRef, buffer, 255,kCFStringEncodingMacRoman);\t\n\tCFRelease(longFormatter);\n}\n/* return the size in chars of the long date format string */\nsqInt\tsqLocLongDateFormatSize(void) {\n\tchar buffer[256];\n\tdateFormatIs(buffer,kCFDateFormatterLongStyle);\n\n\treturn strlen(buffer);\n}\n/*Write the string describing the long date formatting into string ptr.\n * Format is made up of\n * \t\td day, m month, y year,\n * \t\tdouble symbol is null padded, single not padded (m=6, mm=06)\n * \t\tdddd weekday\n * \t\tmmmm month name */\nvoid\tsqLocGetLongDateFormatInto(char * str) {\n\tchar buffer[256];\n\tdateFormatIs(buffer,kCFDateFormatterLongStyle);\n\tmemcpy(str, buffer,strlen(buffer));\n}\n\n/* return the size in chars of the short date format string */\nsqInt\tsqLocShortDateFormatSize(void) {\n\tchar buffer[256];\n\tdateFormatIs(buffer,kCFDateFormatterShortStyle);\n\n\treturn strlen(buffer);\n}\n/*Write the string describing the short date formatting into string ptr.\n * Format is made up of\n * \t\td day, m month, y year,\n * \t\tdouble symbol is null padded, single not padded (m=6, mm=06)\n * \t\tdddd weekday\n * \t\tmmmm month name */\nvoid\tsqLocGetShortDateFormatInto(char * str) {\n\tchar buffer[256];\n\tdateFormatIs(buffer,kCFDateFormatterShortStyle);\n\tmemcpy(str, buffer,strlen(buffer));\n}\n\n/* return the size in chars of the time format string */\nsqInt\tsqLocTimeFormatSize(void) {\n\tchar buffer[256];\n\tdateFormatIs(buffer,kCFDateFormatterLongStyle);\n\n\treturn strlen(buffer);\n}\n/* write the string describing the time formatting into string ptr.\n * Format is made up of\n * \t\th hour (h 12, H 24), m minute, s seconds, x (am/pm String)\n * \t\tdouble symbol is null padded, single not padded (h=6, hh=06)  */\nvoid\tsqLocGetTimeFormatInto(char * str) {\n\tchar buffer[256]; \n\tdateFormatIs(buffer,kCFDateFormatterLongStyle);\n\tmemcpy(str, buffer,strlen(buffer));\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/LocalePlugin/sqMacLocaleCarbon.h",
    "content": "/*\n *  sqMacLocaleCarbon.h\n *  SqueakLocale\n *\n *  Created by John M McIntosh on 6/9/05.\n *\n */\n\n#include <Carbon/Carbon.h>\n#include \"sqMemoryAccess.h\"\n#include <locale.h>\n#include \"sq.h\"\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/LocalePlugin/sqMacLocaleOS9.c",
    "content": "/*\r *  sqMacLocaleOS9.c\r *  SqueakLocale\r *\r *  Created by John M McIntosh on 6/9/05.\r *\r */\r\r#include \"sqMacLocaleOS9.h\"\r#include \"script.h\"\r#include <MacLocales.h>\r\r/* Locale support functions */\rIntl0Hndl   itl0;\rIntl0Rec intMarksR;\rsqInt sqLocInitialize(void) {\r    itl0 = (Intl0Hndl)GetIntlResource(0);\r\tintMarksR = **itl0;\r\treturn true;\r}\r/************** Country and language ******************/\rvoid \tgetCountryOrLanguage(char *str,LocalePartMask which);\rvoid \tgetCountryOrLanguage(char *str,LocalePartMask which){\r\tRegionCode\t\t\tregionCode;\r\tLangCode\t\t\tlanguageCode;\r\tOSStatus \t\t\terr;\r\tchar\t\t\t\tstring[18];\r\tLocaleRef \t\t\tlocale=NULL;\r\t\r\tlanguageCode = GetScriptManagerVariable(smScriptLang);\r\tregionCode = GetScriptManagerVariable(smRegionCode);\r\terr = LocaleRefFromLangOrRegionCode (languageCode, regionCode, &locale);\r\terr = LocaleRefGetPartString (locale, which, 18, string);\r\tmemcpy(str,string,3);\t\r}\r\r/* write the country code into the string ptr. ISO 3166 is the relevant source\r * here; see http://www.unicode.org/onlinedat/countries.html for details.\r * Using the 3 character Alpha-3 codes */\rvoid\tsqLocGetCountryInto(char * str) {\r\tgetCountryOrLanguage(str,kLocaleRegionMask);\r}\r\r/* write the 3 char string describing the language in use into string ptr.\r * ISO 639 is the relevant source here;\r * see http://www.w3.org/WAI/ER/IG/ert/iso639.html\r * for details */\rvoid\tsqLocGetLanguageInto(char * str) {\r\tgetCountryOrLanguage(str,kLocaleLanguageMask);\r}\r\r/***************** Currency ********************/\r\r/* return 1 (true) if the currency symbol is to be placed in front of the\r *currency amount */\rsqInt\tsqLocCurrencyNotation(void) {\r\treturn intMarksR.currFmt & currSymLead;\r}\r\r/* return the length in chars of the curency symbol string */\rsqInt\tsqLocCurrencySymbolSize(void) {\r\tchar currencySymbol[4];\r\t\r    strncpy(currencySymbol, &intMarksR.currSym1, 3);\r    currencySymbol[3] = 0x00;\r\r\treturn strlen(currencySymbol);\r}\r/* write the currency symbol into the string ptr */\rvoid\tsqLocGetCurrencySymbolInto(char * str) {\r\tchar currencySymbol[4];\r\r    strncpy(currencySymbol, &intMarksR.currSym1, 3);\r    currencySymbol[3] = 0x00;\r\tstrcpy(str, currencySymbol);\r}\r\r\r/***************** Numbers and measurements **************/\r\r/* return true if the metric measurements system is to be used, false otherwise\r * (USA is about it) */\rsqInt\tsqLocMeasurementMetric(void) {\r\treturn intMarksR.metricSys > 0;\r}\r\r/* write the 1 char used for digit grouping into string ptr.\r * Usually this is . or ,  as in 1,000,000 */\rvoid\tsqLocGetDigitGroupingSymbolInto(char * str) {\r\tstrncpy(str, &intMarksR.thousSep, 1);\r}\r/* write the 1 char used for decimal separation into string ptr.\r * Usually this is . or , */\rvoid\tsqLocGetDecimalSymbolInto(char * str) {\r\tstrncpy(str, &intMarksR.decimalPt, 1);\r}\r\r\r/****************** time and date *********************/\r\rsqInt\tsqLocGetVMOffsetToUTC(void) {\r\t/* return 0 for now */\r\treturn 0;\r}\r\rsqInt\tsqLocGetTimezoneOffset(void) {\r\tunsigned long now,utc;\r\tGetDateTime(&now);\r\tConvertLocalTimeToUTC(now,&utc);\r\treturn ((sqInt) (now-utc)/60);\r}\r\r/* return true if DST is in use, false otherwise */\rsqInt\tsqLocDaylightSavings(void) {\rstruct tm * timeBlock;\rtime_t theTime;\r\ttheTime = time((time_t)NULL);\r\ttimeBlock = localtime(&theTime);\r\treturn timeBlock->tm_isdst;\r}\r\rvoid dateFormatIs(Str255 buffer,DateForm type );\rvoid timeFormatIs(Str255 buffer,DateForm type );\r\rvoid dateFormatIs(Str255 buffer,DateForm type ) {\r    DateString (0+24*60*60+1,type,buffer,0);\r}\r\rvoid timeFormatIs(Str255 buffer,DateForm type ) {\r\tTimeString (0+24*60*60+1,true,buffer,0);\r}\r\r/* return the size in chars of the long date format string */\rsqInt\tsqLocLongDateFormatSize(void) {\r\tStr255 buffer;\r\tdateFormatIs(buffer,longDate);\r\r\treturn buffer[0];\r}\r/*Write the string describing the long date formatting into string ptr.\r * Format is made up of\r * \t\td day, m month, y year,\r * \t\tdouble symbol is null padded, single not padded (m=6, mm=06)\r * \t\tdddd weekday\r * \t\tmmmm month name */\rvoid\tsqLocGetLongDateFormatInto(char * str) {\r\tStr255 buffer;\r\tdateFormatIs(buffer,longDate);\r\tp2cstr(buffer);\r\tmemcpy(str, (char *) buffer,strlen((char*)buffer));\r}\r\r/* return the size in chars of the short date format string */\rsqInt\tsqLocShortDateFormatSize(void) {\r\tStr255 buffer;\r\tdateFormatIs(buffer,shortDate);\r\r\treturn buffer[0];\r}\r/*Write the string describing the short date formatting into string ptr.\r * Format is made up of\r * \t\td day, m month, y year,\r * \t\tdouble symbol is null padded, single not padded (m=6, mm=06)\r * \t\tdddd weekday\r * \t\tmmmm month name */\rvoid\tsqLocGetShortDateFormatInto(char * str) {\r\tStr255 buffer;\r\tdateFormatIs(buffer,shortDate);\r\tp2cstr(buffer);\r\tmemcpy(str,(char *) buffer,strlen((char*)buffer));\r}\r\r/* return the size in chars of the time format string */\rsqInt\tsqLocTimeFormatSize(void) {\r\tStr255 buffer;\r\ttimeFormatIs(buffer,shortDate);\r\r\treturn buffer[0];\r}\r/* write the string describing the time formatting into string ptr.\r * Format is made up of\r * \t\th hour (h 12, H 24), m minute, s seconds, x (am/pm String)\r * \t\tdouble symbol is null padded, single not padded (h=6, hh=06)  */\rvoid\tsqLocGetTimeFormatInto(char * str) {\r\tStr255 buffer;\r\ttimeFormatIs(buffer,shortDate);\r\tp2cstr(buffer);\r\tmemcpy(str, (char*) buffer,strlen((char*)buffer));\r}\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/LocalePlugin/sqMacLocaleOS9.h",
    "content": "/*\r *  sqMacLocaleOS9.h\r *  SqueakLocale\r *\r *  Created by John M McIntosh on 6/9/05.\r *\r */\r\r#include \"sqMemoryAccess.h\"\r#include \"sq.h\"\r#include \"LocalePlugin.h\"\r\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/MIDIPlugin/sqMacMIDI.c",
    "content": "#include \"sq.h\"\n#include \"MIDIPlugin.h\"\n    #include <Carbon/Carbon.h>\n    #include <QuickTime/QuickTimeMusic.h>\n\nextern struct VirtualMachine *interpreterProxy;\n\n/* Quicktime MIDI note allocator and channels */\n#define FIRST_DRUM_KIT 16385\n\nvoid* portNamesFn;\nvoid* portIsOpenFn;\nvoid* portSetControlFn;\nvoid* serialPortOpenFn;\nvoid* serialPortCloseFn;\nvoid* serialPortCountFn;\nvoid* serialPortReadIntoFn;\nvoid* serialPortWriteFromFn;\n\nNoteAllocator na = nil;\nNoteChannel channel[16] = {\n\tnil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil};\n\n/* Initial instruments: drums on channel 10, piano on all other channels */\nint channelInstrument[16] = {\n\t1, 1, 1, 1, 1, 1, 1, 1, 1, FIRST_DRUM_KIT, 1, 1, 1, 1, 1, 1};\n\n/* Quicktime MIDI parser state */\nenum {idle, want1of2, want2of2, want1of1, sysExclusive};\nint state = idle;\nint argByte1 = 0;\nint argByte2 = 0;\nint lastCmdByte = nil;\n\n/* number of argument bytes for each MIDI command */\nchar argumentBytes[128] = {\n\t2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n\t2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n\t2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n\t2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n\t1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n\t1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n\t2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n\t3, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n};\n\n\n/*** Private Functions ***/\nint setMidiClockRate(int portNum, int interfaceClockRate);\nint sqMIDIGetSerialPortCount(void);\n\n/*** Quicktime MIDI Support Functions ***/\nvoid closeQuicktimeMIDIPort(void);\nvoid openQuicktimeMIDIPort(void);\nvoid performMIDICmd(int cmdByte, int arg1, int arg2);\nvoid processMIDIByte(int aByte);\nvoid startMIDICommand(int cmdByte);\n\n/* initialize/shutdown */\nint midiInit() { \n\tportIsOpenFn = interpreterProxy->ioLoadFunctionFrom(\"serialPortIsOpen\", \"SerialPlugin\");\n    if (portIsOpenFn == 0) {\n    \tportIsOpenFn = interpreterProxy->ioLoadFunctionFrom(\"serialPortIsOpen\", \"\");\n\t\t   if (portIsOpenFn == 0)\n\t\t    return interpreterProxy->success(false);\n\t}\n\n\tportSetControlFn = interpreterProxy->ioLoadFunctionFrom(\"serialPortSetControl\", \"SerialPlugin\");\n    if (portSetControlFn == 0) {\n    \tportSetControlFn = interpreterProxy->ioLoadFunctionFrom(\"serialPortSetControl\", \"\");\n\t\tif (portSetControlFn == 0)\n\t\t    return interpreterProxy->success(false);\n\t}\n\n\tserialPortCloseFn = interpreterProxy->ioLoadFunctionFrom(\"serialPortClose\", \"SerialPlugin\");\n    if (serialPortCloseFn == 0) {\n    \tserialPortCloseFn = interpreterProxy->ioLoadFunctionFrom(\"serialPortClose\", \"\");\n\t\tif (serialPortCloseFn == 0)\n\t\t    return interpreterProxy->success(false);\n\t}\n\n\tserialPortCountFn = interpreterProxy->ioLoadFunctionFrom(\"serialPortCount\", \"SerialPlugin\");\n    if (serialPortCountFn == 0) {\n\t    serialPortCountFn = interpreterProxy->ioLoadFunctionFrom(\"serialPortCount\", \"\");\n\t    if (serialPortCountFn == 0)\n\t    \treturn interpreterProxy->success(false);\n\t}\n\n\tportNamesFn = interpreterProxy->ioLoadFunctionFrom(\"serialPortNames\", \"SerialPlugin\");\n    if (portNamesFn == 0) {\n    \tportNamesFn = interpreterProxy->ioLoadFunctionFrom(\"serialPortNames\", \"\");\n        if (portNamesFn == 0) \n\t\t    return interpreterProxy->success(false);\n\t}\n\n\tserialPortOpenFn = interpreterProxy->ioLoadFunctionFrom(\"serialPortOpen\", \"SerialPlugin\");\n    if (serialPortOpenFn == 0) {\n\t    serialPortOpenFn = interpreterProxy->ioLoadFunctionFrom(\"serialPortOpen\", \"\");\n        if (serialPortOpenFn == 0)\n \t\t    return interpreterProxy->success(false);\n\t}\n\n\tserialPortReadIntoFn = interpreterProxy->ioLoadFunctionFrom(\"serialPortReadInto\", \"SerialPlugin\");\n    if (serialPortReadIntoFn == 0) {\n    \tserialPortReadIntoFn = interpreterProxy->ioLoadFunctionFrom(\"serialPortReadInto\", \"\");\n        if (serialPortReadIntoFn == 0)\n            return interpreterProxy->success(false);\n\t}\n\n\tserialPortWriteFromFn = interpreterProxy->ioLoadFunctionFrom(\"serialPortWriteFrom\", \"SerialPlugin\");\n    if (serialPortWriteFromFn == 0) {\n    \tserialPortWriteFromFn = interpreterProxy->ioLoadFunctionFrom(\"serialPortWriteFrom\", \"\");\n        if (serialPortWriteFromFn == 0)\n            return interpreterProxy->success(false);\n\t}\n\n    return true; \n}\n\nint midiShutdown() {\n\treturn 1;\n}\n\n/* helper function for MIDI module */\nint sqMIDIParameter(int whichParameter, int modify, int newValue);\n\nint sqMIDIParameterSet(int whichParameter, int newValue) {\n\tsqMIDIParameter(whichParameter, true, newValue);\n\treturn 0;\n}\n\nint sqMIDIParameterGet(int whichParameter) {\n\tsqMIDIParameter(whichParameter, false, 0);\n\treturn 0;\n}\n\nint setMidiClockRate(int portNum, int interfaceClockRate) {\n#pragma unused(portNum, interfaceClockRate)\n/* Put the given port into MIDI mode, which uses a clock supplied\n   by an external MIDI interface adaptor to determine the baud rate.\n   Possible external clock rates: 31.25 KHz, 0.5 MHz, 1 MHz, or 2 MHz. */\n    return false;\n}/*** MIDI Parameters (used with sqMIDIParameter function) ***/\n\n#define sqMIDIInstalled\t\t\t\t1\n/* Read-only. Return 1 if a MIDI driver is installed, 0 if not.\n   On OMS-based MIDI drivers, this returns 1 only if the OMS\n   system is properly installed and configured. */\n\n#define sqMIDIVersion\t\t\t\t2\n/* Read-only. Return the integer version number of this MIDI driver.\n   The version numbering sequence is relative to a particular driver.\n   That is, version 3 of the Macintosh MIDI driver is not necessarily\n   related to version 3 of the Win95 MIDI driver. */\n\n#define sqMIDIHasBuffer\t\t\t\t3\n/* Read-only. Return 1 if this MIDI driver has a time-stamped output\n   buffer, 0 otherwise. Such a buffer allows the client to schedule\n   MIDI output packets to be sent later. This can allow more precise\n   timing, since the driver uses timer interrupts to send the data\n   at the right time even if the processor is in the midst of a\n   long-running Squeak primitive or is running some other application\n   or system task. */\n\n#define sqMIDIHasDurs\t\t\t\t4\n/* Read-only. Return 1 if this MIDI driver supports an extended\n   primitive for note-playing that includes the note duration and\n   schedules both the note-on and the note-off messages in the\n   driver. Otherwise, return 0. */\n\n#define sqMIDICanSetClock\t\t\t5\n/* Read-only. Return 1 if this MIDI drivers clock can be set\n   via an extended primitive, 0 if not. */\n\n#define sqMIDICanUseSemaphore\t\t6\n/* Read-only. Return 1 if this MIDI driver can signal a semaphore\n   when MIDI input arrives. Otherwise, return 0. If this driver\n   supports controller caching and it is enabled, then incoming\n   controller messages will not signal the semaphore. */\n\n#define sqMIDIEchoOn\t\t\t\t7\n/* Read-write. If this flag is set to a non-zero value, and if\n   the driver supports echoing, then incoming MIDI events will\n   be echoed immediately. If this driver does not support echoing,\n   then queries of this parameter will always return 0 and\n   attempts to change its value will do nothing. */\n\n#define sqMIDIUseControllerCache\t8\n/* Read-write. If this flag is set to a non-zero value, and if\n   the driver supports a controller cache, then the driver will\n   maintain a cache of the latest value seen for each MIDI controller,\n   and control update messages will be filtered out of the incoming\n   MIDI stream. An extended MIDI primitive allows the client to\n   poll the driver for the current value of each controller. If\n   this driver does not support a controller cache, then queries\n   of this parameter will always return 0 and attempts to change\n   its value will do nothing. */\n\n#define sqMIDIEventsAvailable\t\t9\n/* Read-only. Return the number of MIDI packets in the input queue. */\n\n#define sqMIDIFlushDriver\t\t\t10\n/* Write-only. Setting this parameter to any value forces the driver\n   to flush its I/0 buffer, discarding all unprocessed data. Reading\n   this parameter returns 0. Setting this parameter will do nothing\n   if the driver does not support buffer flushing. */\n\n#define sqMIDIClockTicksPerSec\t\t11\n/* Read-only. Return the MIDI clock rate in ticks per second. */\n\n#define sqMIDIHasInputClock\t\t\t12\n/* Read-only. Return 1 if this MIDI driver timestamps incoming\n   MIDI data with the current value of the MIDI clock, 0 otherwise.\n   If the driver does not support such timestamping, then the\n   client must read input data frequently and provide its own\n   timestamping. */\n\n/*** MIDI Functions ***/\n\nint sqMIDIClosePort(int portNum) {\n/* Close the given MIDI port. Do nothing if the port is not open.\n   Fail if there is no port of the given number.*/\n\n\tint serialPorts;\n\n\tserialPorts = sqMIDIGetSerialPortCount();\n\tif (portNum == serialPorts) {\n\t\tcloseQuicktimeMIDIPort();\n\t\treturn 0;\n\t} else {\n\n    \tif (serialPortCloseFn == 0) {\n\t\t\treturn interpreterProxy->success(false);\n\t\t}\n\n\t\treturn ((int (*) (int)) serialPortCloseFn)(portNum);\n\t}\n}\n\nint sqMIDIGetClock(void) {\n/* Return the current value of the clock used to schedule MIDI events.\n   The MIDI clock is assumed to wrap at or before half the maximum\n   positive SmallInteger value. This allows events to be scheduled\n   into the future without overflowing into LargePositiveIntegers. \n   This implementation does not support event scheduling, so it\n   just returns the value of the Squeak millisecond clock. */\n\n\treturn interpreterProxy->ioMicroMSecs();\n}\n\nint sqMIDIGetSerialPortCount(void) {\n/* Return the number of available \n   hardware ports and software entities that act like ports. Ports\n   are numbered from 0 to N-1, where N is the number returned by this\n   primitive. */\n\n    int serialPorts;\n\n    if (serialPortCountFn == 0) {\n\t\treturn 0;\n\t}\n\n\tserialPorts = ((int (*) (void)) serialPortCountFn)();\n\treturn serialPorts;  /* serial ports */\n}\n\nint sqMIDIGetPortCount(void) {\n/* Return the number of available MIDI interfaces, including both\n   hardware ports and software entities that act like ports. Ports\n   are numbered from 0 to N-1, where N is the number returned by this\n   primitive. */\n\n\treturn sqMIDIGetSerialPortCount() + 1;  /* serial ports + QuickTime Synth */\n}\n\nint sqMIDIGetPortDirectionality(int portNum) {\n/* Return an integer indicating the directionality of the given\n   port where: 1 = input, 2 = output, 3 = bidirectional. Fail if\n   there is no port of the given number. */\n\n\t\n\tint serialPorts;\n\t\n\tserialPorts = sqMIDIGetSerialPortCount();\n\tif (portNum > serialPorts) return interpreterProxy->success(false);\n\tif (portNum == serialPorts) {\n\t\treturn 2;\n\t} else {\n\t\treturn 3;\n\t}\n}\n\nint sqMIDIGetPortName(int portNum, int namePtr, int length) {\n/* Copy the name of the given MIDI port into the string at the given\n   address. Copy at most length characters, and return the number of\n   characters copied. Fail if there is no port of the given number.*/\n\n\tchar userName[256], inName[256], outName[256];\n\tint serialPorts, count;\n\t\n\tserialPorts = sqMIDIGetSerialPortCount();\n\tif (portNum > serialPorts) return interpreterProxy->success(false);\n\n\tif (portNum == serialPorts) {\n\t\tstrcpy(userName, \"QuickTime MIDI\");\n\t} else {\n \n    \tif (portNamesFn == 0) {\n\t\t\treturn 0;\n\t\t}\n\n\t\t((int (*) (int , char *, char *, char *)) portNamesFn)(portNum, userName, inName, outName);\n\t}\n\n\tcount = strlen(userName);\n\tif (count > length) count = length;\n\tmemcpy((void *) namePtr, userName, count);\n\treturn count;\n}\n\nint sqMIDIOpenPort(int portNum, int readSemaIndex, int interfaceClockRate) {\n/* Open the given port, if possible. If non-zero, readSemaphoreIndex\n   specifies the index in the external objects array of a semaphore\n   to be signalled when incoming MIDI data is available. Note that\n   not all implementations support read semaphores (this one does\n   not); see sqMIDICanUseSemaphore. The interfaceClockRate parameter\n   specifies the clock speed for an external MIDI interface\n   adaptor on platforms that use such adaptors (e.g., Macintosh).\n   Fail if there is no port of the given number.*/\n\n#pragma unused(readSemaIndex)\n\tint serialPorts;\n\tint err;\n\n\n\tserialPorts = sqMIDIGetSerialPortCount();\n\tif (portNum > serialPorts) return interpreterProxy->success(false);\n\n\tif (portNum == serialPorts) {\n\t\topenQuicktimeMIDIPort();\n\t\treturn 0;\n\t}\n\n    if (serialPortOpenFn == 0) {\n\t\treturn interpreterProxy->success(false);\n\t}\n\n\terr = ((int (*) (int , int , int , int , int , int , int , int , int ))serialPortOpenFn)(portNum, 9600, 1, 0, 8, 0, 0, 0, 0);\n\tif (!err) {\n\t\terr = setMidiClockRate(portNum, interfaceClockRate);\n\t\tif (err) {\n\t\t\tsqMIDIClosePort(portNum);\n\t\t}\n\t}   \n\treturn 0;\n}\n\nint sqMIDIParameter(int whichParameter, int modify, int newValue) {\n/* Read or write the given MIDI driver parameter. If modify is 0,\n   then newValue is ignored and the current value of the specified\n   parameter is returned. If modify is non-zero, then the specified\n   parameter is set to newValue. Note that many MIDI driver parameters\n   are read-only; attempting to set one of these parameters fails.\n   For boolean parameters, true = 1, false = 0. */\n#pragma unused(newValue)\n\n\tif (modify == 0) {\n\t\tswitch(whichParameter) {\n\t\tcase sqMIDIInstalled:\n\t\t\treturn 1;\n\t\t\tbreak;\n\t\tcase sqMIDIVersion:\n\t\t\treturn 100;\n\t\t\tbreak;\n\t\tcase sqMIDIHasBuffer:\n\t\tcase sqMIDIHasDurs:\n\t\tcase sqMIDICanSetClock:\n\t\tcase sqMIDICanUseSemaphore:\n\t\tcase sqMIDIEchoOn:\n\t\tcase sqMIDIUseControllerCache:\n\t\t\treturn 0;\n\t\t\tbreak;\n\t\tcase sqMIDIEventsAvailable:\n\t\t\treturn 1;  /* pretend that events are always available */\n\t\t\tbreak;\n\t\tcase sqMIDIFlushDriver:\n\t\t\treturn 0;\n\t\t\tbreak;\n\t\tcase sqMIDIClockTicksPerSec:\n\t\t\treturn 1000;\n\t\t\tbreak;\n\t\tcase sqMIDIHasInputClock:\n\t\t\treturn 0;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn interpreterProxy->success(false);\n\t\t}\n\t} else {\n\t\tswitch(whichParameter) {\n\t\tcase sqMIDIInstalled:\n\t\tcase sqMIDIVersion:\n\t\tcase sqMIDIHasBuffer:\n\t\tcase sqMIDIHasDurs:\n\t\tcase sqMIDICanSetClock:\n\t\tcase sqMIDICanUseSemaphore:\n\t\t\treturn interpreterProxy->success(false);\n\t\t\tbreak;\n\t\tcase sqMIDIEchoOn:\n\t\t\t/* noop; echoing not supported */\n\t\t\tbreak;\n\t\tcase sqMIDIUseControllerCache:\n\t\t\t/* noop; controller cache not supported */\n\t\t\tbreak;\n\t\tcase sqMIDIEventsAvailable:\n\t\t\treturn interpreterProxy->success(false);\n\t\t\tbreak;\n\t\tcase sqMIDIFlushDriver:\n\t\t\t/* noop; buffer flushing not supported */\n\t\t\tbreak;\n\t\tcase sqMIDIClockTicksPerSec:\n\t\t\treturn interpreterProxy->success(false);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn interpreterProxy->success(false);\n\t\t}\n\t}\n\treturn 0;\n}\n\nint sqMIDIPortReadInto(int portNum, int count, int bufferPtr) {\n/* bufferPtr is the address of the first byte of a Smalltalk\n   ByteArray of the given length. Copy up to (length - 4) bytes\n   of incoming MIDI data into that buffer, preceded by a 4-byte\n   timestamp in the units of the MIDI clock, most significant byte\n   first. Implementations that do not support timestamping of\n   incoming data as it arrives (see sqMIDIHasInputClock) simply\n   set the timestamp to the value of the MIDI clock when this\n   function is called. Return the total number of bytes read,\n   including the timestamp bytes. Return zero if no data is\n   available. Fail if the buffer is shorter than five bytes,\n   since there must be enough room for the timestamp plus at\n   least one data byte. */\n\n\tint bytesRead;\n\n\tif (count < 5) return interpreterProxy->success(false);\n\n    if (serialPortReadIntoFn == 0) {\n\t\treturn interpreterProxy->success(false);\n\t}\n\n\tbytesRead = ((int (*) (int , int , int )) serialPortReadIntoFn)(portNum, count - 4, bufferPtr + 4);\n\n\tif (bytesRead == 0) return 0;\n\t*((int *) bufferPtr) = sqMIDIGetClock();  /* set timestamp */\n\treturn bytesRead + 4;\n}\n\nint sqMIDIPortWriteFromAt(int portNum, int count, int bufferPtr, int time) {\n/* bufferPtr is the address of the first byte of a Smalltalk\n   ByteArray of the given length. Send its contents to the given\n   port when the MIDI clock reaches the given time. If time equals\n   zero, then send the data immediately. Implementations that do\n   not support a timestamped output queue, such as this one, always\n   send the data immediately; see sqMIDIHasBuffer. */\n#pragma unused(time)\n\tint serialPorts, i;\n\tunsigned char *bytePtr;\n\t\n\tserialPorts = sqMIDIGetSerialPortCount();\n\tif (portNum > serialPorts) return interpreterProxy->success(false);\n\n\tif (portNum == serialPorts) {\n\t\tif (!na) return interpreterProxy->success(false);  /* QuickTime port not open */\n\t\tbytePtr = (unsigned char *) bufferPtr;\n\t\tfor (i = 0; i < count; i++) {\n\t\t\tprocessMIDIByte(*bytePtr++);\n\t\t}\n\t\treturn count;\n\t}\n\n    if (serialPortWriteFromFn == 0) {\n\t\treturn interpreterProxy->success(false);\n\t}\n\n\treturn ((int (*) (int , int , int )) serialPortWriteFromFn)(portNum, count - 4, bufferPtr + 4);\n}\n\n/*** Quicktime MIDI Support Functions ***/\n\nvoid closeQuicktimeMIDIPort(void) {\n\tint i;\n\n\tif (!na) return;\n\tfor (i = 0; i < 16; i++) {\n\t\t/* dispose of note channels */\n\t\tif (channel[i]) NADisposeNoteChannel(na, channel[i]);\n\t\tchannel[i] = nil;\n\t}\n\tCloseComponent(na);  /* close note allocator */\n}\n\nvoid openQuicktimeMIDIPort(void) {\n\tComponentResult err;\n\tNoteRequest nr;\n\tNoteChannel nc;\n\tint i;\n\tshort shortpoly;\n\tFixed fixedtypical;\n\t\n\tcloseQuicktimeMIDIPort();\n\tna = OpenDefaultComponent('nota', 0);\n\tif (!na) return;\n\n\tfor (i = 0; i < 16; i++) {\n\t\tshortpoly = CFSwapInt16HostToBig(11);\n\t\tmemcpy(&nr.info.polyphony,&shortpoly,2);\t\t\t/* max simultaneous tones */\n\t\tfixedtypical = CFSwapInt32HostToBig(0x00010000);\n\t\tmemcpy(&nr.info.typicalPolyphony,&fixedtypical,4);\n\n\t\tNAStuffToneDescription(na, 1, &nr.tone);\n\t\terr = NANewNoteChannel(na, &nr, &nc);\n\t\tif (err || !nc) {\n\t\t\tcloseQuicktimeMIDIPort();\n\t\t\treturn;\n\t\t}\n\t\tNAResetNoteChannel(na, nc);\n\t\tNASetInstrumentNumber(na, nc, channelInstrument[i]);\n\t\tchannel[i] = nc;\n\t}\n\tstate = idle;\n\targByte1 = 0;\n\targByte2 = 0;\n\tlastCmdByte = nil;\n\treturn;\n}\n\nvoid performMIDICmd(int cmdByte, int arg1, int arg2) {\n\t/* Perform the given MIDI command with the given arguments. */\n\n\tint ch, cmd, val, instrument, bend;\n\n\tch = cmdByte & 0x0F;\n\tcmd = cmdByte & 0xF0;\n\tif (cmd == 128) {  /* note off */\n\t\tNAPlayNote(na, channel[ch], arg1, 0);\n\t}\n\tif (cmd == 144) {  /* note on */\n\t\tNAPlayNote(na, channel[ch], arg1, arg2);\n\t}\n\tif (cmd == 176) {  /* control change */\n\t\tif ((arg1 >= 32) && (arg1 <= 63)) {\n\t\t\tval = arg2 << 1;  /* LSB of controllers 0-31 */\n\t\t} else {\n\t\t\tval = arg2 << 8;  /* scale MSB to QT controller range */\n\t\t}\n\t\tNASetController(na, channel[ch], arg1, val);\n\t}\n\tif (cmd == 192) {  /* program change */\n\t\tif (ch == 9) {\n\t\t\tinstrument = FIRST_DRUM_KIT + arg1;  /* if channel 10, select a drum set */\n\t\t} else {\n\t\t\tinstrument = arg1 + 1;\n\t\t}\n\t\tNASetInstrumentNumber(na, channel[ch], instrument);\n\t\tchannelInstrument[ch] = instrument;\n\t}\n\tif (cmd == 224) {  /* pitch bend */\n\t\tbend = ((arg2 << 7) + arg1) - (64 << 7);\n\t\tbend = bend / 32;  /* default sensitivity = +/- 2 semitones */\n\t\tNASetController(na, channel[ch], kControllerPitchBend, bend);\n\t}\n}\n\nvoid processMIDIByte(int aByte) {\n\t/* Process the given incoming MIDI byte and perform any completed commands. */\n\n\tif (aByte > 247) return;  /* skip all real-time messages */\n\n\tswitch (state) {\n\tcase idle:\n\t\tif (aByte >= 128) {\n\t\t\t/* start a new command using the action table */\n\t\t\tstartMIDICommand(aByte);\n\t\t} else {\n\t\t\t/* data byte arrived in idle state: use running status if possible */\n\t\t\tif (lastCmdByte == nil) {\n\t\t\t\treturn;  /* last command byte is not defined; just skip this byte */\n\t\t\t} else {\n\t\t\t\t/* process this data as if it had the last command byte in front of it */\n\t\t\t\tstartMIDICommand(lastCmdByte);\n\t\t\t\t/* the previous line put us into a new state; we now do a recursive\n\t\t\t   \t   call to process the data byte in this new state. */\n\t\t\t\tprocessMIDIByte(aByte);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\tcase want1of2:\n\t\targByte1 = aByte;\n\t\tstate = want2of2;\n\t\tbreak;\n\tcase want2of2:\n\t\targByte2 = aByte;\n\t\tperformMIDICmd(lastCmdByte, argByte1, argByte2);\n\t\tstate = idle;\n\t\tbreak;\n\tcase want1of1:\n\t\targByte1 = aByte;\n\t\tperformMIDICmd(lastCmdByte, argByte1, 0);\n\t\tstate = idle;\n\t\tbreak;\n\tcase sysExclusive:\n\t\tif (aByte < 128) {\n\t\t\t/* skip a system exclusive data byte */\n\t\t} else {\n\t\t\tif (aByte < 248) {\n\t\t\t\t/* a system exclusive message can be terminated by any non-real-time command byte */\n\t\t\t\tstate = idle;\n\t\t\t\tif (aByte != 247) {\n\t\t\t\t\tprocessMIDIByte(aByte);\t/* if not endSysExclusive, byte is the start the next command */\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\nvoid startMIDICommand(int cmdByte) {\n\t/* Start processing a MIDI message beginning with the given command byte. */\n\n\tint argCount;\n\n\targCount = argumentBytes[cmdByte - 128];\n\tswitch (argCount) {\n\tcase 0:\t\t\t\t\t\t/* start a zero argument command (e.g., a real-time message) */\n\t\t/* Stay in the current state and don't change active status.\n\t\t   Real-time messages may arrive between data bytes without disruption. */\n\t\tperformMIDICmd(cmdByte, 0, 0);\n\t\tbreak;\n\tcase 1:\t\t\t\t\t\t/* start a one argument command */\n\t\tlastCmdByte = cmdByte;\n\t\tstate = want1of1;\n\t\tbreak;\n\tcase 2:\t\t\t\t\t\t/* start a two argument command */\n\t\tlastCmdByte = cmdByte;\n\t\tstate = want1of2;\n\t\tbreak;\n\tcase 3:\t\t\t\t\t\t/* start a variable length 'system exclusive' command */\n\t\t/* a system exclusive command clears running status */\n\t\tlastCmdByte = nil;\n\t\tstate = sysExclusive;\n\t\tbreak;\n\t}\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/MacMenubarPlugin/MacMenubarPlugin.h",
    "content": "#include <Menus.h>\n\nBoolean ioCheckMenuHandle(MenuHandle menuHandle);\n\nBoolean ioCheckMenuHandle(MenuHandle menuHandle) {\n\tint menuID;\n\tif (menuHandle == 0) return true;\n\tmenuID = GetMenuID(menuHandle);\n\tif (menuID == 0) return false;\n\treturn true;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/Mpeg3Plugin/changesetsForInMemoryBuffer/JMMMpegBuffer.1.cs",
    "content": "'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 20 January 2006 at 11:22:15 pm'!\rObject subclass: #MPEGFile\r\tinstanceVariableNames: 'pathToFile fileBits fileIndex endianness buffer '\r\tclassVariableNames: 'Registry '\r\tpoolDictionaries: ''\r\tcategory: 'Movies-Kernel'!\rObject subclass: #MPEGPlayer\r\tinstanceVariableNames: 'external form startTime clockBias frameRate lastDelay noSound sampleRate audioPlayerProcess videoPlayerProcess playerProcessPriority soundQueue timeCheck semaphoreForSound errorForSoundStart morph volume buffer isBuffer '\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Movies-Kernel'!\r\r!MPEGFile methodsFor: 'access' stamp: 'JMM 1/20/2006 18:12'!\rbuffer\r\t^buffer! !\r\r!MPEGFile methodsFor: 'access' stamp: 'JMM 1/20/2006 23:15'!\risBufferBased\r\t^(buffer == nil) not ! !\r\r!MPEGFile methodsFor: 'initialize-release' stamp: 'JMM 1/20/2006 18:11'!\ropenBuffer: aByteArray\r\tpathToFile := nil.\r\tbuffer _ aByteArray.\r\tfileBits := self primFileOpenABuffer: aByteArray size: aByteArray size.\r\tfileBits notNil ifTrue: \r\t\t[fileIndex := Smalltalk registerExternalObject: fileBits.\r\t\tself register.]\r\t! !\r\r!MPEGFile methodsFor: 'primitives' stamp: 'JMM 1/20/2006 17:52'!\rprimFileOpenABuffer: buffer size: aSize\r\t\"Open the file\"\r\t<primitive: 'primitiveMPEG3OpenABuffer' module: 'Mpeg3Plugin'>\r\tself primitiveFailed! !\r\r\r!MPEGFile class methodsFor: 'instance creation' stamp: 'JMM 1/20/2006 18:18'!\ropenBuffer: aBuffer \r\t^self new openBuffer: aBuffer! !\r\r!MPEGFile class methodsFor: 'instance creation' stamp: 'JMM 1/20/2006 23:05'!\ropenFileUseBuffer: aPath \r\t| bar bytes |\r\tbar _ StandardFileStream oldFileNamed: aPath.\r\tbar binary.\r\tbytes _ bar contents.\r\t^self new openBuffer: bytes! !\r\r\r!MPEGPlayer methodsFor: 'access' stamp: 'JMM 1/20/2006 18:10'!\rexternal\r\t[external hasVideo] on: Error do: \r\t\t[self isBuffer\r\t\t\tifTrue:\r\t\t\t[external := MPEGFile openBuffer: external buffer]\r\t\t\tifFalse: \r\t\t\t\t[(MPEGFile isFileValidMPEG: external fileName) \r\t\t\t\t\tifFalse: [^self error: 'Mpeg File is invalid'].\r\t\t\t\texternal := MPEGFile openFile: external fileName]].\r\t^external! !\r\r!MPEGPlayer methodsFor: 'access' stamp: 'JMM 1/20/2006 18:05'!\risBuffer\r\t^isBuffer == true! !\r\r!MPEGPlayer methodsFor: 'initialize-release' stamp: 'JMM 1/20/2006 18:17'!\rinitializeWithBuffer: aBuffer form: aForm\r\tisBuffer := true.\r\tbuffer := aBuffer.\r\tself initialize: aBuffer.\r\tself form: aForm.\r\t^self! !\r\r!MPEGPlayer methodsFor: 'initialize-release' stamp: 'JMM 1/20/2006 18:07'!\rinitializeWithBuffer: aBuffer morph: aMorphic\r\tisBuffer _ true.\r\tbuffer _ aBuffer.\r\tself initialize: aBuffer.\r\tself morph: aMorphic.\r\t^self! !\r\r!MPEGPlayer methodsFor: 'initialize-release' stamp: 'JMM 1/20/2006 18:54'!\rinitialize: aPath\r\r\tself halt.\r\tself isBuffer ifTrue: \r\t\t[external := MPEGFile openBuffer: buffer]\r\t ifFalse: \r\t\t[(MPEGFile isFileValidMPEG: aPath) ifFalse: [^nil].\r\t\texternal := MPEGFile openFile: aPath.].\r\tself playerProcessPriority: Processor userSchedulingPriority.\r\tself lastDelay: 10.\r\tvolume := 1.0.\r\terrorForSoundStart := 500.\r\tsemaphoreForSound := Semaphore new.\r\tself startTime: (Array new: self totalVideoStreams).\r\tself clockBias: (Array new: self totalVideoStreams withAll: 0).! !\r\r\r!MPEGPlayer class methodsFor: 'instance creation' stamp: 'JMM 1/20/2006 18:16'!\rplayBuffer: aBuffer onForm: aForm\r\t^self new initializeWithBuffer: aBuffer morph: aForm! !\r\r!MPEGPlayer class methodsFor: 'instance creation' stamp: 'JMM 1/20/2006 18:06'!\rplayBuffer: aBuffer onMorph: aMorph\r\t^self new initializeWithBuffer: aBuffer morph: aMorph! !\r\rObject subclass: #MPEGPlayer\r\tinstanceVariableNames: 'external form startTime clockBias frameRate lastDelay noSound sampleRate audioPlayerProcess videoPlayerProcess playerProcessPriority soundQueue timeCheck semaphoreForSound errorForSoundStart morph volume buffer isBuffer'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Movies-Kernel'!\rObject subclass: #MPEGFile\r\tinstanceVariableNames: 'pathToFile fileBits fileIndex endianness buffer'\r\tclassVariableNames: 'Registry'\r\tpoolDictionaries: ''\r\tcategory: 'Movies-Kernel'!\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/Mpeg3Plugin/changesetsForInMemoryBuffer/JMMMpegBufferTest.1.cs",
    "content": "'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 20 January 2006 at 11:22:22 pm'!\r\r!MPEGDisplayMorph methodsFor: 'accessing' stamp: 'JMM 1/20/2006 23:15'!\risThereAFile\r\tmpegFile isBufferBased ifTrue: [^true].\r\t^(FileStream isAFileNamed: mpegFile fileName)! !\r\r!MPEGDisplayMorph methodsFor: 'accessing' stamp: 'JMM 1/20/2006 23:15'!\rmoviePosition\r\t\"Answer a number between 0.0 and 1.0 indicating the current position within the movie.\"\r\r\tmpegFile ifNil: [^ 0.0].\r\tmpegFile fileHandle ifNil: [^ 0.0].\r\tself isThereAFile ifFalse: [^0.0].\r\tmpegFile hasVideo\r\t\tifTrue: [^ ((mpegFile videoGetFrame: 0) asFloat / (mpegFile videoFrames: 0)) min: 1.0].\r\tsoundTrack ifNotNil: [^ soundTrack soundPosition].\r\t^ 0.0\r! !\r\r!MPEGDisplayMorph methodsFor: 'accessing' stamp: 'JMM 1/20/2006 23:16'!\rtotalFrames\r\t\"Answer the total number of frames in this movie.\"\r\r\tmpegFile ifNil: [^ 0].\r\tmpegFile fileHandle ifNil: [^ 0].\r\tself isThereAFile ifFalse: [^ 0].\r\tmpegFile hasVideo ifFalse: [^ 0].\r\t^ mpegFile videoFrames: 0! !\r\r!MPEGDisplayMorph methodsFor: 'accessing' stamp: 'JMM 1/20/2006 23:16'!\rtotalSeconds\r\t\"Answer the total number of seconds in this movie.\"\r\r\tmpegFile ifNil: [^ 0].\r\tmpegFile fileHandle ifNil: [^ 0].\r\tself isThereAFile ifFalse: [^ 0].\r\tmpegFile hasVideo ifFalse: [^ 0].\r\t^ self totalFrames asFloat / (mpegFile videoFrameRate: 0)! !\r\r!MPEGDisplayMorph methodsFor: 'commands' stamp: 'JMM 1/20/2006 23:09'!\rstartPlaying\r\t\"Start playing the movie at the current position.\"\r\r\t| frameIndex |\r\tself stopPlaying.\r\tstopFrame := nil.\r\tself mpegFileIsOpen ifFalse: [^ self].\r\r\t (mpegFile fileName notNil) ifTrue:\r\t\t[(FileStream isAFileNamed: mpegFile fileName) ifFalse: [ | newFileResult newFileName |\r\t\tself inform: 'Path changed. Enter new one for: ', (FileDirectory localNameFor: mpegFile fileName).\r\t\tnewFileResult := StandardFileMenu oldFile.\r\t\tnewFileName := newFileResult directory fullNameFor: newFileResult name.\t\r\t\tmpegFile openFile: newFileName]].\r\t\r\tmpegFile hasAudio\r\t\tifTrue:\r\t\t\t[mpegFile hasVideo ifTrue:\r\t\t\t\t[\"set movie frame position from soundTrack position\"\r\t\t\t\tsoundTrack reset.  \"ensure file is open before positioning\"\r\t\t\t\tsoundTrack soundPosition: (mpegFile videoGetFrame: 0) asFloat / (mpegFile videoFrames: 0).\r\t\t\t\t\"now set frame index from the soundtrack position for best sync\"\r\t\t\t\tframeIndex := ((soundTrack millisecondsSinceStart * desiredFrameRate) // 1000).\r\t\t\t\tframeIndex := (frameIndex max: 0) min: ((mpegFile videoFrames: 0) - 3).\r\t\t\t\tmpegFile videoSetFrame: frameIndex stream: 0].\r\r\t\t\tSoundPlayer stopReverb.\r\t\t\tsoundTrack volume: volume.\r\t\t\tsoundTrack repeat: repeat.\r\t\t\tsoundTrack resumePlaying.\r\t\t\tstartFrame := startMSecs := 0]\r\t\tifFalse:\r\t\t\t[soundTrack := nil.\r\t\t\tstartFrame := mpegFile videoGetFrame: 0.\r\t\t\tstartMSecs := Time millisecondClockValue].\r\trunning := true! !\r\r!MPEGDisplayMorph methodsFor: 'file open/close' stamp: 'JMM 1/20/2006 23:02'!\ropenFileNamed: mpegFileName\r\t\"Try to open the MPEG file with the given name. Answer true if successful.\"\r\r\t| e |\r\tself closeFile.\r\t(FileDirectory default fileExists: mpegFileName)\r\t\tifFalse: [self inform: ('File not found: {1}' translated format: {mpegFileName}). ^ false].\r\r\t(MPEGFile isFileValidMPEG: mpegFileName)\r\t\tifTrue: [mpegFile := MPEGFile openFileUseBuffer: mpegFileName]\r\t\tifFalse: [\r\t\t\t(JPEGMovieFile isJPEGMovieFile: mpegFileName)\r\t\t\t\tifTrue: [mpegFile := JPEGMovieFile new openFileNamed: mpegFileName]\r\t\t\t\tifFalse: [self inform: ('Not an MPEG or JPEG movie file: {1}' translated format: {mpegFileName}). ^ false]].\r\tmpegFile fileHandle ifNil: [^ false].\r\r\t\"initialize soundTrack\"\r\tmpegFile hasAudio\r\t\tifTrue: [soundTrack := mpegFile audioPlayerForChannel: 1]\r\t\tifFalse: [soundTrack := nil].\r\r\tmpegFile hasVideo\r\t\tifTrue: [  \"set screen size and display first frame\"\r\t\t\tdesiredFrameRate := mpegFile videoFrameRate: 0.\r\t\t\tsoundTrack ifNotNil: [  \"compute frame rate from length of audio track\"\r\t\t\t\tdesiredFrameRate := (mpegFile videoFrames: 0) / soundTrack duration].\r\t\t\te := (mpegFile videoFrameWidth: 0)@(mpegFile videoFrameHeight: 0).\r\t\t\tframeBuffer := Form extent: e depth: (Display depth max: 16).\r\t\t\tsuper extent: e.\r\t\t\tself nextFrame]\r\t\tifFalse: [  \"hide screen for audio-only files\"\r\t\t\tsuper extent: 250@0].\r! !\r\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/Mpeg3Plugin/changesetsForInMemoryBuffer/JMMMpegPluginBuffer.1.cs",
    "content": "'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 20 January 2006 at 11:22:10 pm'!\r\r!Mpeg3Plugin methodsFor: 'primitives' stamp: 'JMM 1/20/2006 19:07'!\rprimitiveMPEG3CheckSig: path\r\t| result sz storage |\r\r\t\"int mpeg3_check_sig(char *path)\"\r\tself var: #storage declareC: 'char storage[1024] '.\r\tself primitive: 'primitiveMPEG3CheckSig'\r\t\tparameters: #(String).\r\tsz _ interpreterProxy byteSizeOf: path cPtrAsOop.\r\tself cCode: 'sqFilenameFromStringOpen(storage, path, sz)'.\r\tself cCode: 'result = mpeg3_check_sig(storage)'.\r\t^result asOop: Boolean\r! !\r\r!Mpeg3Plugin methodsFor: 'primitives' stamp: 'JMM 1/20/2006 18:38'!\rprimitiveMPEG3OpenABuffer: path size: size\r\t| mpeg3Oop index |\r\r\tself var: #index declareC: 'mpeg3_t ** index'.\r\tself primitive: 'primitiveMPEG3OpenABuffer'\r\t\tparameters: #(String SmallInteger).\r\tmpeg3Oop := interpreterProxy instantiateClass: interpreterProxy classByteArray\r\t\t\t\t\tindexableSize: 4.\t\r\tindex := self cCoerce: (interpreterProxy firstIndexableField: mpeg3Oop)\r\t\t\t\t\t\tto: 'mpeg3_t **'.\r\tself cCode: '*index = mpeg3_open(path,size); makeFileEntry(*index)'.\r\t^mpeg3Oop.\r! !\r\r!Mpeg3Plugin methodsFor: 'primitives' stamp: 'JMM 1/20/2006 19:11'!\rprimitiveMPEG3Open: path\r\t| mpeg3Oop index sz storage |\r\r\t\"mpeg3_t* mpeg3_open(char *path)\"\r\tself var: #index declareC: 'mpeg3_t ** index'.\r\tself var: #storage declareC: 'char storage[1024]'.\r\tself primitive: 'primitiveMPEG3Open'\r\t\tparameters: #(String).\r\tsz := interpreterProxy byteSizeOf: path cPtrAsOop.\r\tself cCode: 'sqFilenameFromStringOpen(storage, path, sz)'.\r\tmpeg3Oop := interpreterProxy instantiateClass: interpreterProxy classByteArray\r\t\t\t\t\tindexableSize: 4.\r\tindex := self cCoerce: (interpreterProxy firstIndexableField: mpeg3Oop)\r\t\t\t\t\t\tto: 'mpeg3_t **'.\r\tself cCode: '*index = mpeg3_open(storage,0); makeFileEntry(*index)'.\r\t^mpeg3Oop.\r! !\r\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/Mpeg3Plugin/mpeg3Plugin-Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>mpeg3Plugin</string>\n\t<key>CFBundleGetInfoString</key>\n\t<string>mpeg3Plugin for Squeak</string>\n\t<key>CFBundleIconFile</key>\n\t<string>SqueakPlugin.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.mpeg3Plugin</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>mpeg3Plugin for Squeak</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.6.0b1</string>\n\t<key>CFBundleSignature</key>\n\t<string>FAST</string>\n\t<key>CFBundleVersion</key>\n\t<string>1.6.0b1</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/Mpeg3Plugin/mpeglibAudioVideo.xml",
    "content": "<?xml version=\"1.0\"?>\n<?codewarrior exportversion=\"1.0\" ideversion=\"4.0\"?>\n<!DOCTYPE PROJECT [\n\n<!ELEMENT PROJECT (TARGETLIST, TARGETORDER, GROUPLIST, DESIGNLIST?)>\n<!ELEMENT TARGETLIST (TARGET+)>\n<!ELEMENT TARGET (NAME, SETTINGLIST, FILELIST?, LINKORDER?, SEGMENTLIST?, OVERLAYGROUPLIST?, SUBTARGETLIST?, SUBPROJECTLIST?)>\n<!ELEMENT NAME (#PCDATA)>\n<!ELEMENT USERSOURCETREETYPE (#PCDATA)>\n<!ELEMENT PATH (#PCDATA)>\n<!ELEMENT FILELIST (FILE*)>\n<!ELEMENT FILE (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?, ROOTFILEREF?, FILEKIND?, FILEFLAGS?)>\n<!ELEMENT PATHTYPE (#PCDATA)>\n<!ELEMENT PATHROOT (#PCDATA)>\n<!ELEMENT ACCESSPATH (#PCDATA)>\n<!ELEMENT PATHFORMAT (#PCDATA)>\n<!ELEMENT ROOTFILEREF (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)>\n<!ELEMENT FILEKIND (#PCDATA)>\n<!ELEMENT FILEFLAGS (#PCDATA)>\n<!ELEMENT FILEREF (TARGETNAME?, PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)>\n<!ELEMENT TARGETNAME (#PCDATA)>\n<!ELEMENT SETTINGLIST ((SETTING|PANELDATA)+)>\n<!ELEMENT SETTING (NAME?, (VALUE|(SETTING+)))>\n<!ELEMENT PANELDATA (NAME, VALUE)>\n<!ELEMENT VALUE (#PCDATA)>\n<!ELEMENT LINKORDER (FILEREF*)>\n<!ELEMENT SEGMENTLIST (SEGMENT+)>\n<!ELEMENT SEGMENT (NAME, ATTRIBUTES?, FILEREF*)>\n<!ELEMENT ATTRIBUTES (#PCDATA)>\n<!ELEMENT OVERLAYGROUPLIST (OVERLAYGROUP+)>\n<!ELEMENT OVERLAYGROUP (NAME, BASEADDRESS, OVERLAY*)>\n<!ELEMENT BASEADDRESS (#PCDATA)>\n<!ELEMENT OVERLAY (NAME, FILEREF*)>\n<!ELEMENT SUBTARGETLIST (SUBTARGET+)>\n<!ELEMENT SUBTARGET (TARGETNAME, ATTRIBUTES?)>\n<!ELEMENT SUBPROJECTLIST (SUBPROJECT+)>\n<!ELEMENT SUBPROJECT (FILEREF, SUBPROJECTTARGETLIST)>\n<!ELEMENT SUBPROJECTTARGETLIST (SUBPROJECTTARGET*)>\n<!ELEMENT SUBPROJECTTARGET (TARGETNAME, ATTRIBUTES?)>\n<!ELEMENT TARGETORDER (ORDEREDTARGET|ORDEREDDESIGN)*>\n<!ELEMENT ORDEREDTARGET (NAME)>\n<!ELEMENT ORDEREDDESIGN (NAME, ORDEREDTARGET+)>\n<!ELEMENT GROUPLIST (GROUP|FILEREF)*>\n<!ELEMENT GROUP (NAME, (GROUP|FILEREF)*)>\n<!ELEMENT DESIGNLIST (DESIGN+)>\n<!ELEMENT DESIGN (NAME, DESIGNDATA)>\n<!ELEMENT DESIGNDATA (#PCDATA)>\n]>\n<PROJECT>\n    <TARGETLIST>\n        <TARGET>\n            <NAME>LibMPEG3ForSqueak</NAME>\n            <SETTINGLIST>\n\n                <!-- Settings for \"Source Trees\" panel -->\n                <SETTING><NAME>UserSourceTrees</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"Custom Keywords\" panel -->\n                <SETTING><NAME>CustomColor1</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor2</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor3</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor4</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Access Paths\" panel -->\n                <SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>UserSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>Lamie:Squeak:Squeak3.0 Folder:Squeak 3.1.1:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n                <SETTING><NAME>SystemSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MSL:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MacOS Support:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Target Settings\" panel -->\n                <SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING>\n                <SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>Targetname</NAME><VALUE>LibMPEG3ForSqueak</VALUE></SETTING>\n                <SETTING><NAME>OutputDirectory</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>SaveEntriesUsingRelativePaths</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"File Mappings\" panel -->\n                <SETTING><NAME>FileMappings</NAME>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>APPL</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>Appl</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MMLB</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MPLF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MWCD</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>RSRC</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.arr</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.bh</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Balloon Help</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cpp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.exp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.h</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pl</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW Perl</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.r</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Rez</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.s</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PPCAsm</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>XCOF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>docu</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>rsrc</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>shlb</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>stub</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.doc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.o</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.ppob</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.rsrc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Build Extras\" panel -->\n                <SETTING><NAME>CacheModDates</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>ActivateBrowser</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>DumpBrowserInfo</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>CacheSubprojects</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>UseThirdPartyDebugger</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>DebuggerCommandLine</NAME><VALUE></VALUE></SETTING>\n                <PANELDATA><NAME>Debugger Runtime</NAME><VALUE>\n                    0002000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    00000000000100013A53717565616B20332E30416C70686131314D5400000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    000000000000000000000000000000000B4F1AE010000000000001000B4F23F0\n                    0002000000000000000000000B4F128000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    00000000000000000000000000000000\n                </VALUE></PANELDATA>\n\n                <!-- Settings for \"Debugger Target\" panel -->\n                <SETTING><NAME>LogSystemMessages</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>AutoTargetDLLs</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>StopAtWatchpoints</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>PauseWhileRunning</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>PauseInterval</NAME><VALUE>5</VALUE></SETTING>\n                <SETTING><NAME>PauseUIFlags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>AltExePath</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>StopAtTempBPOnLaunch</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>CacheSymbolics</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>TempBPFunctionName</NAME><VALUE>main</VALUE></SETTING>\n                <SETTING><NAME>TempBPType</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"68K CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_68K_codesize</NAME><VALUE>Large</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_structalignment</NAME><VALUE>MC68K</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fp_mode</NAME><VALUE>SANE</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_code68020</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_mpwc</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fourbyteints</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_IEEEdoubles</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fardata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farvtables</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farstrings</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_pcrelstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_macsbug</NAME><VALUE>New</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_a6frames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"68K Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_68K_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_mix</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"68K Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_68K_optimizationlevel</NAME><VALUE>Level1</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_68K_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"68K Linker\" panel -->\n                <SETTING><NAME>MWLinker_68K_linksym</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_symfullpath</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_linksingle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_fastlink</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_generateMap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_glueintosegone</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"68K Project\" panel -->\n                <SETTING><NAME>MWProject_68K_type</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_outfile</NAME><VALUE>Std C Console 68K</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filecreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filetype</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_size</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_flags</NAME><VALUE>22720</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcheader</NAME><VALUE>Standard</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmulti</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_a4</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_minsize</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcsegtype</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_cfm68kcodegen</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_thedebugger</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrc_custom</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_rseg_app</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_pilot_lib</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_pilot_main_entry</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Compiler\" panel -->\n                <SETTING><NAME>MWFrontEnd_C_cplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_checkprotos</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_arm</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_trigraphs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_onlystdkeywords</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enumsalwaysint</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwpointerstyle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_prefixname</NAME><VALUE>conditionalmacros.h</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ansistrict</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwcnewline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_wchar_type</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enableexceptions</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontreusestrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_poolstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontinline</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_useRTTI</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_multibyteaware</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_unsignedchars</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_autoinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_booltruefalse</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_direct_to_som</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_som_env_check</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_alwaysinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_inlinelevel</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ecplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_objective_c</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_defer_codegen</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Warnings\" panel -->\n                <SETTING><NAME>MWWarning_C_warn_illpragma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_emptydecl</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_possunwant</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedvar</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedarg</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_extracomma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_pedantic</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warningerrors</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_hidevirtual</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_implicitconv</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_notinlined</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_structclass</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"CFM68K\" panel -->\n                <SETTING><NAME>MWCFM68K_exports</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_farthreshold</NAME><VALUE>256</VALUE></SETTING>\n                <SETTING><NAME>PCFM68K_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_mainname</NAME><VALUE>__start</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_termname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_alignment</NAME><VALUE>Align_2</VALUE></SETTING>\n\n                <!-- Settings for \"MacOS Merge Panel\" panel -->\n                <SETTING><NAME>MWMerge_MacOS_projectType</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputName</NAME><VALUE>Merge Out</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputCreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputType</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_suppressWarning</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyFragments</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_skipResources</NAME>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE>!</VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"PPC CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_PPC_structalignment</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tracebacktables</NAME><VALUE>Inline</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processor</NAME><VALUE>Generic</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_readonlystrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_fpcontract</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_schedule</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_peephole</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processorspecific</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_altivec</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vectortocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vrsave</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_PPC_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_extended</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_mix</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_PPC_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_PPC_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Linker\" panel -->\n                <SETTING><NAME>MWLinker_PPC_linksym</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_symfullpath</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmap</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_permitmultdefs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmode</NAME><VALUE>Fast</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_mainname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_termname</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"PPC PEF\" panel -->\n                <SETTING><NAME>MWPEF_exports</NAME><VALUE>All</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sortcode</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_expandbss</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWPEF_collapsereloads</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Project\" panel -->\n                <SETTING><NAME>MWProject_PPC_type</NAME><VALUE>SharedLibrary</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>mpeg3Plugin</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>1178686292</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>1936223330</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_size</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_minsize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_flags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcheader</NAME><VALUE>Native</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"PPCAsm Panel\" panel -->\n                <SETTING><NAME>MWAssembler_PPC_auxheader</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_symmode</NAME><VALUE>Mac</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_dialect</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_prefixfile</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_typecheck</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_warnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_casesensitive</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"Rez Compiler\" panel -->\n                <SETTING><NAME>MWRez_Language_maxwidth</NAME><VALUE>80</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_script</NAME><VALUE>Roman</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_alignment</NAME><VALUE>Align1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filtermode</NAME><VALUE>FilterSkip</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_suppresswarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_escapecontrolchars</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_prefixname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filteredtypes</NAME><VALUE>'CODE' 'DATA' 'PICT'</VALUE></SETTING>\n            </SETTINGLIST>\n            <FILELIST>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InterfaceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MathLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>dct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>header.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>huffman.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>layer1.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>layer2.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>layer3.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3audio.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3audio.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>synthesizers.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>tables.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>tables.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3demux.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>bitstream.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>bitstream.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>libmpeg3.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>libmpeg3.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3atrack.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3atrack.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3io.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3io.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3private.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3protos.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3title.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3title.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3vtrack.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3vtrack.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>timecode.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>changesForSqueak.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3demux.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>pcm.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>getpicture.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>headers.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>idct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>idct.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>layerdata.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>macroblocks.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mmxtest.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>motion.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3video.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3video.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3videoprotos.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>output.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>reconstruct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>seek.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>slice.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>slice.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>vlc.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>vlc.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Mpeg3plugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Mpeg3Plugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL SIOUX.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>ac3.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3css.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>App.rsrc</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Resource</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n            </FILELIST>\n            <LINKORDER>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InterfaceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MathLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>dct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>header.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>huffman.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>layer1.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>layer2.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>layer3.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3audio.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3audio.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>synthesizers.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>tables.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>tables.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3demux.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>bitstream.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>bitstream.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>libmpeg3.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>libmpeg3.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3atrack.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3atrack.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3io.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3io.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3private.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3protos.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3title.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3title.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3vtrack.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3vtrack.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>timecode.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>changesForSqueak.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3demux.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>pcm.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>getpicture.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>headers.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>idct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>idct.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>layerdata.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>macroblocks.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mmxtest.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>motion.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3video.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3video.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3videoprotos.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>output.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>reconstruct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>seek.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>slice.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>slice.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>vlc.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>vlc.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Mpeg3plugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Mpeg3Plugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL SIOUX.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>ac3.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3css.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>App.rsrc</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n            </LINKORDER>\n        </TARGET>\n        <TARGET>\n            <NAME>LibMPEG3ForSqueakOptimized</NAME>\n            <SETTINGLIST>\n\n                <!-- Settings for \"Source Trees\" panel -->\n                <SETTING><NAME>UserSourceTrees</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"Custom Keywords\" panel -->\n                <SETTING><NAME>CustomColor1</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor2</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor3</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor4</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Access Paths\" panel -->\n                <SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>UserSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>Lamie:Squeak:Squeak3.0 Folder:Squeak 3.1.1:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n                <SETTING><NAME>SystemSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MSL:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MacOS Support:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Target Settings\" panel -->\n                <SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING>\n                <SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>Targetname</NAME><VALUE>LibMPEG3ForSqueakOptimized</VALUE></SETTING>\n                <SETTING><NAME>OutputDirectory</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>SaveEntriesUsingRelativePaths</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"File Mappings\" panel -->\n                <SETTING><NAME>FileMappings</NAME>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>APPL</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>Appl</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MMLB</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MPLF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MWCD</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>RSRC</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.arr</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.bh</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Balloon Help</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cpp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.exp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.h</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pl</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW Perl</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.r</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Rez</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.s</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PPCAsm</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>XCOF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>docu</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>rsrc</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>shlb</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>stub</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.doc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.o</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.ppob</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.rsrc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Build Extras\" panel -->\n                <SETTING><NAME>CacheModDates</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>ActivateBrowser</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>DumpBrowserInfo</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>CacheSubprojects</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>UseThirdPartyDebugger</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>DebuggerCommandLine</NAME><VALUE></VALUE></SETTING>\n                <PANELDATA><NAME>Debugger Runtime</NAME><VALUE>\n                    0002000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    00000000000000014C616D69653A53717565616B3A6D7065672070726F647563\n                    74696F6E3A53717565616B436F64653A53717565616B20332E30416C70686131\n                    3000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    000000000000000000000000000000000B4F1AE010000000000001000B4F23F0\n                    0002000000000000000000000B4F128000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    00000000000000000000000000000000\n                </VALUE></PANELDATA>\n\n                <!-- Settings for \"Debugger Target\" panel -->\n                <SETTING><NAME>LogSystemMessages</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>AutoTargetDLLs</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>StopAtWatchpoints</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>PauseWhileRunning</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>PauseInterval</NAME><VALUE>5</VALUE></SETTING>\n                <SETTING><NAME>PauseUIFlags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>AltExePath</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>StopAtTempBPOnLaunch</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>CacheSymbolics</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>TempBPFunctionName</NAME><VALUE>main</VALUE></SETTING>\n                <SETTING><NAME>TempBPType</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"68K CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_68K_codesize</NAME><VALUE>Large</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_structalignment</NAME><VALUE>MC68K</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fp_mode</NAME><VALUE>SANE</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_code68020</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_mpwc</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fourbyteints</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_IEEEdoubles</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fardata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farvtables</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farstrings</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_pcrelstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_macsbug</NAME><VALUE>New</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_a6frames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"68K Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_68K_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_mix</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"68K Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_68K_optimizationlevel</NAME><VALUE>Level1</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_68K_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"68K Linker\" panel -->\n                <SETTING><NAME>MWLinker_68K_linksym</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_symfullpath</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_linksingle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_fastlink</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_generateMap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_glueintosegone</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"68K Project\" panel -->\n                <SETTING><NAME>MWProject_68K_type</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_outfile</NAME><VALUE>Std C Console 68K</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filecreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filetype</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_size</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_flags</NAME><VALUE>22720</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcheader</NAME><VALUE>Standard</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmulti</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_a4</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_minsize</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcsegtype</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_cfm68kcodegen</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_thedebugger</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrc_custom</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_rseg_app</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_pilot_lib</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_pilot_main_entry</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Compiler\" panel -->\n                <SETTING><NAME>MWFrontEnd_C_cplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_checkprotos</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_arm</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_trigraphs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_onlystdkeywords</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enumsalwaysint</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwpointerstyle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_prefixname</NAME><VALUE>conditionalmacros.h</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ansistrict</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwcnewline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_wchar_type</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enableexceptions</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontreusestrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_poolstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_useRTTI</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_multibyteaware</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_unsignedchars</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_autoinline</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_booltruefalse</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_direct_to_som</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_som_env_check</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_alwaysinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_inlinelevel</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ecplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_objective_c</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_defer_codegen</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Warnings\" panel -->\n                <SETTING><NAME>MWWarning_C_warn_illpragma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_emptydecl</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_possunwant</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedvar</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedarg</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_extracomma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_pedantic</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warningerrors</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_hidevirtual</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_implicitconv</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_notinlined</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_structclass</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"CFM68K\" panel -->\n                <SETTING><NAME>MWCFM68K_exports</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_farthreshold</NAME><VALUE>256</VALUE></SETTING>\n                <SETTING><NAME>PCFM68K_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_mainname</NAME><VALUE>__start</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_termname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_alignment</NAME><VALUE>Align_2</VALUE></SETTING>\n\n                <!-- Settings for \"MacOS Merge Panel\" panel -->\n                <SETTING><NAME>MWMerge_MacOS_projectType</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputName</NAME><VALUE>Merge Out</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputCreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputType</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_suppressWarning</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyFragments</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_skipResources</NAME>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE>!</VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"PPC CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_PPC_structalignment</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tracebacktables</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processor</NAME><VALUE>P750</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_readonlystrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_fpcontract</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_schedule</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_peephole</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processorspecific</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_altivec</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vectortocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vrsave</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_PPC_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_extended</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_mix</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_PPC_optimizationlevel</NAME><VALUE>Level4</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_PPC_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Linker\" panel -->\n                <SETTING><NAME>MWLinker_PPC_linksym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_symfullpath</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_permitmultdefs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmode</NAME><VALUE>Fast</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_mainname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_termname</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"PPC PEF\" panel -->\n                <SETTING><NAME>MWPEF_exports</NAME><VALUE>All</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sortcode</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_expandbss</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWPEF_collapsereloads</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Project\" panel -->\n                <SETTING><NAME>MWProject_PPC_type</NAME><VALUE>SharedLibrary</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>mpeg3Plugin</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>1178686292</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>1936223330</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_size</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_minsize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_flags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcheader</NAME><VALUE>Native</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"PPCAsm Panel\" panel -->\n                <SETTING><NAME>MWAssembler_PPC_auxheader</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_symmode</NAME><VALUE>Mac</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_dialect</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_prefixfile</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_typecheck</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_warnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_casesensitive</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"Rez Compiler\" panel -->\n                <SETTING><NAME>MWRez_Language_maxwidth</NAME><VALUE>80</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_script</NAME><VALUE>Roman</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_alignment</NAME><VALUE>Align1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filtermode</NAME><VALUE>FilterSkip</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_suppresswarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_escapecontrolchars</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_prefixname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filteredtypes</NAME><VALUE>'CODE' 'DATA' 'PICT'</VALUE></SETTING>\n            </SETTINGLIST>\n            <FILELIST>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InterfaceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MathLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>dct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>header.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>huffman.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>layer1.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>layer2.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>layer3.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3audio.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3audio.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>synthesizers.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>tables.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>tables.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3demux.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>bitstream.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>bitstream.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>libmpeg3.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>libmpeg3.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3atrack.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3atrack.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3io.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3io.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3private.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3protos.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3title.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3title.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3vtrack.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3vtrack.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>timecode.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>changesForSqueak.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3demux.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>pcm.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>getpicture.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>headers.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>idct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>idct.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>layerdata.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>macroblocks.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mmxtest.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>motion.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3video.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3video.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3videoprotos.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>output.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>reconstruct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>seek.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>slice.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>slice.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>vlc.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>vlc.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Mpeg3plugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Mpeg3Plugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL SIOUX.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>ac3.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3css.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>App.rsrc</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Resource</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n            </FILELIST>\n            <LINKORDER>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InterfaceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MathLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>dct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>header.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>huffman.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>layer1.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>layer2.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>layer3.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3audio.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3audio.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>synthesizers.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>tables.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>tables.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3demux.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>bitstream.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>bitstream.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>libmpeg3.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>libmpeg3.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3atrack.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3atrack.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3io.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3io.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3private.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3protos.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3title.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3title.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3vtrack.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3vtrack.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>timecode.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>changesForSqueak.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3demux.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>pcm.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>getpicture.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>headers.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>idct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>idct.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>layerdata.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>macroblocks.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mmxtest.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>motion.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3video.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3video.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3videoprotos.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>output.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>reconstruct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>seek.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>slice.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>slice.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>vlc.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>vlc.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Mpeg3plugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Mpeg3Plugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL SIOUX.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>ac3.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3css.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>App.rsrc</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n            </LINKORDER>\n        </TARGET>\n        <TARGET>\n            <NAME>LibMpEG3 Carbon Opt</NAME>\n            <SETTINGLIST>\n\n                <!-- Settings for \"Source Trees\" panel -->\n                <SETTING><NAME>UserSourceTrees</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"Custom Keywords\" panel -->\n                <SETTING><NAME>CustomColor1</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor2</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor3</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor4</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Access Paths\" panel -->\n                <SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>UserSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>Lamie:Squeak:Squeak3.0 Folder:Squeak 3.1.1:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n                <SETTING><NAME>SystemSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MSL:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MacOS Support:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Target Settings\" panel -->\n                <SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING>\n                <SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>Targetname</NAME><VALUE>LibMpEG3 Carbon Opt</VALUE></SETTING>\n                <SETTING><NAME>OutputDirectory</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>SaveEntriesUsingRelativePaths</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"File Mappings\" panel -->\n                <SETTING><NAME>FileMappings</NAME>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>APPL</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>Appl</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MMLB</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MPLF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MWCD</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>RSRC</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.arr</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.bh</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Balloon Help</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cpp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.exp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.h</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pl</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW Perl</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.r</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Rez</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.s</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PPCAsm</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>XCOF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>docu</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>rsrc</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>shlb</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>stub</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.doc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.o</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.ppob</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.rsrc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Build Extras\" panel -->\n                <SETTING><NAME>CacheModDates</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>ActivateBrowser</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>DumpBrowserInfo</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>CacheSubprojects</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>UseThirdPartyDebugger</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>DebuggerCommandLine</NAME><VALUE></VALUE></SETTING>\n                <PANELDATA><NAME>Debugger Runtime</NAME><VALUE>\n                    0002000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    00000000000000014C616D69653A53717565616B3A6D7065672070726F647563\n                    74696F6E3A53717565616B436F64653A53717565616B20332E30416C70686131\n                    3000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    000000000000000000000000000000000B4F1AE010000000000001000B4F23F0\n                    0002000000000000000000000B4F128000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    00000000000000000000000000000000\n                </VALUE></PANELDATA>\n\n                <!-- Settings for \"Debugger Target\" panel -->\n                <SETTING><NAME>LogSystemMessages</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>AutoTargetDLLs</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>StopAtWatchpoints</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>PauseWhileRunning</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>PauseInterval</NAME><VALUE>5</VALUE></SETTING>\n                <SETTING><NAME>PauseUIFlags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>AltExePath</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>StopAtTempBPOnLaunch</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>CacheSymbolics</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>TempBPFunctionName</NAME><VALUE>main</VALUE></SETTING>\n                <SETTING><NAME>TempBPType</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"68K CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_68K_codesize</NAME><VALUE>Large</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_structalignment</NAME><VALUE>MC68K</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fp_mode</NAME><VALUE>SANE</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_code68020</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_mpwc</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fourbyteints</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_IEEEdoubles</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fardata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farvtables</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farstrings</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_pcrelstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_macsbug</NAME><VALUE>New</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_a6frames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"68K Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_68K_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_mix</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"68K Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_68K_optimizationlevel</NAME><VALUE>Level1</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_68K_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"68K Linker\" panel -->\n                <SETTING><NAME>MWLinker_68K_linksym</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_symfullpath</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_linksingle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_fastlink</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_generateMap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_glueintosegone</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"68K Project\" panel -->\n                <SETTING><NAME>MWProject_68K_type</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_outfile</NAME><VALUE>Std C Console 68K</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filecreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filetype</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_size</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_flags</NAME><VALUE>22720</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcheader</NAME><VALUE>Standard</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmulti</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_a4</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_minsize</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcsegtype</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_cfm68kcodegen</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_thedebugger</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrc_custom</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_rseg_app</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_pilot_lib</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_pilot_main_entry</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Compiler\" panel -->\n                <SETTING><NAME>MWFrontEnd_C_cplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_checkprotos</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_arm</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_trigraphs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_onlystdkeywords</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enumsalwaysint</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwpointerstyle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_prefixname</NAME><VALUE>myMacHeadersPPCCarbon</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ansistrict</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwcnewline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_wchar_type</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enableexceptions</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontreusestrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_poolstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_useRTTI</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_multibyteaware</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_unsignedchars</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_autoinline</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_booltruefalse</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_direct_to_som</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_som_env_check</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_alwaysinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_inlinelevel</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ecplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_objective_c</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_defer_codegen</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Warnings\" panel -->\n                <SETTING><NAME>MWWarning_C_warn_illpragma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_emptydecl</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_possunwant</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedvar</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedarg</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_extracomma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_pedantic</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warningerrors</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_hidevirtual</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_implicitconv</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_notinlined</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_structclass</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"CFM68K\" panel -->\n                <SETTING><NAME>MWCFM68K_exports</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_farthreshold</NAME><VALUE>256</VALUE></SETTING>\n                <SETTING><NAME>PCFM68K_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_mainname</NAME><VALUE>__start</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_termname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_alignment</NAME><VALUE>Align_2</VALUE></SETTING>\n\n                <!-- Settings for \"MacOS Merge Panel\" panel -->\n                <SETTING><NAME>MWMerge_MacOS_projectType</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputName</NAME><VALUE>Merge Out</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputCreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputType</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_suppressWarning</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyFragments</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_skipResources</NAME>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE>!</VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"PPC CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_PPC_structalignment</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tracebacktables</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processor</NAME><VALUE>P750</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_readonlystrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_fpcontract</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_schedule</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_peephole</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processorspecific</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_altivec</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vectortocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vrsave</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_PPC_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_extended</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_mix</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_PPC_optimizationlevel</NAME><VALUE>Level4</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_PPC_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Linker\" panel -->\n                <SETTING><NAME>MWLinker_PPC_linksym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_symfullpath</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_permitmultdefs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmode</NAME><VALUE>Fast</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_mainname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_termname</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"PPC PEF\" panel -->\n                <SETTING><NAME>MWPEF_exports</NAME><VALUE>All</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sortcode</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_expandbss</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWPEF_collapsereloads</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Project\" panel -->\n                <SETTING><NAME>MWProject_PPC_type</NAME><VALUE>SharedLibrary</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>mpeg3Plugin</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>1178686292</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>1936223330</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_size</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_minsize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_flags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcheader</NAME><VALUE>Native</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"PPCAsm Panel\" panel -->\n                <SETTING><NAME>MWAssembler_PPC_auxheader</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_symmode</NAME><VALUE>Mac</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_dialect</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_prefixfile</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_typecheck</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_warnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_casesensitive</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"Rez Compiler\" panel -->\n                <SETTING><NAME>MWRez_Language_maxwidth</NAME><VALUE>80</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_script</NAME><VALUE>Roman</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_alignment</NAME><VALUE>Align1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filtermode</NAME><VALUE>FilterSkip</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_suppresswarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_escapecontrolchars</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_prefixname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filteredtypes</NAME><VALUE>'CODE' 'DATA' 'PICT'</VALUE></SETTING>\n            </SETTINGLIST>\n            <FILELIST>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>dct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>header.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>huffman.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>layer1.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>layer2.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>layer3.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3audio.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3audio.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>synthesizers.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>tables.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>tables.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3demux.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>bitstream.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>bitstream.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>libmpeg3.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>libmpeg3.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3atrack.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3atrack.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3io.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3io.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3private.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3protos.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3title.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3title.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3vtrack.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3vtrack.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>timecode.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>changesForSqueak.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3demux.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>pcm.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>getpicture.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>headers.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>idct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>idct.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>layerdata.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>macroblocks.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mmxtest.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>motion.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3video.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3video.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3videoprotos.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>output.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>reconstruct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>seek.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>slice.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>slice.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>vlc.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>vlc.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Mpeg3plugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Mpeg3Plugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>ac3.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3css.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>CarbonApp.rsrc</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Resource</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.CARBON.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL SIOUX.CARBON.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>CarbonLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>myMacHeadersCarbon.pch</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n            </FILELIST>\n            <LINKORDER>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>dct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>header.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>huffman.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>layer1.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>layer2.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>layer3.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3audio.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3audio.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>synthesizers.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>tables.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>tables.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3demux.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>bitstream.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>bitstream.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>libmpeg3.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>libmpeg3.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3atrack.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3atrack.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3io.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3io.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3private.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3protos.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3title.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3title.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3vtrack.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3vtrack.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>timecode.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>changesForSqueak.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3demux.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>pcm.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>getpicture.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>headers.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>idct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>idct.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>layerdata.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>macroblocks.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mmxtest.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>motion.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3video.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3video.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3videoprotos.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>output.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>reconstruct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>seek.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>slice.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>slice.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>vlc.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>vlc.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Mpeg3plugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Mpeg3Plugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>ac3.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3css.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>CarbonApp.rsrc</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.CARBON.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL SIOUX.CARBON.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>CarbonLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>myMacHeadersCarbon.pch</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n            </LINKORDER>\n        </TARGET>\n    </TARGETLIST>\n\n    <TARGETORDER>\n        <ORDEREDTARGET><NAME>LibMPEG3ForSqueak</NAME></ORDEREDTARGET>\n        <ORDEREDTARGET><NAME>LibMPEG3ForSqueakOptimized</NAME></ORDEREDTARGET>\n        <ORDEREDTARGET><NAME>LibMpEG3 Carbon Opt</NAME></ORDEREDTARGET>\n    </TARGETORDER>\n\n    <GROUPLIST>\n        <GROUP><NAME>Sources</NAME>\n            <GROUP><NAME>Audio</NAME>\n                <FILEREF>\n                    <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>ac3.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>dct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>header.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>huffman.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>layer1.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>layer2.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>layer3.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3audio.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3audio.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>pcm.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>synthesizers.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>tables.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>tables.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n            </GROUP>\n            <GROUP><NAME>Video</NAME>\n                <FILEREF>\n                    <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>getpicture.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>headers.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>idct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>idct.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>layerdata.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>macroblocks.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mmxtest.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>motion.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3video.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3video.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>mpeg3videoprotos.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>output.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>reconstruct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>seek.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>slice.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>slice.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>vlc.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>vlc.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n            </GROUP>\n            <FILEREF>\n                <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>bitstream.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>bitstream.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>libmpeg3.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>libmpeg3.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>mpeg3atrack.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>mpeg3atrack.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>mpeg3css.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>mpeg3demux.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>mpeg3demux.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>mpeg3io.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>mpeg3io.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>mpeg3private.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>mpeg3protos.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>mpeg3title.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>mpeg3title.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>mpeg3vtrack.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>mpeg3vtrack.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>timecode.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>changesForSqueak.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>Mpeg3Plugin.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>Mpeg3plugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n        </GROUP>\n        <GROUP><NAME>ANSI Libraries</NAME>\n            <FILEREF>\n                <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MSL SIOUX.PPC.Lib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MSL C.PPC.Lib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MSL RuntimePPC.Lib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n        </GROUP>\n        <GROUP><NAME>resources</NAME>\n            <FILEREF>\n                <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>App.rsrc</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>LibMpEG3 Carbon Opt</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>CarbonApp.rsrc</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n        </GROUP>\n        <GROUP><NAME>Mac Libraries</NAME>\n            <FILEREF>\n                <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>InterfaceLib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>LibMPEG3ForSqueak</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MathLib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n        </GROUP>\n        <GROUP><NAME>Carbon</NAME>\n            <FILEREF>\n                <TARGETNAME>LibMpEG3 Carbon Opt</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>myMacHeadersCarbon.pch</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>LibMpEG3 Carbon Opt</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>CarbonLib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>LibMpEG3 Carbon Opt</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MSL C.CARBON.Lib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>LibMpEG3 Carbon Opt</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MSL SIOUX.CARBON.Lib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n        </GROUP>\n    </GROUPLIST>\n\n</PROJECT>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/Mpeg3Plugin/myMacHeadersCarbon.pch",
    "content": "/*\n   ===========================================================================\n\tMacHeaders.pch\t\t\t\t1995-1999 Metrowerks Inc. All rights reserved.\n   ===========================================================================\n\n\tScript to generate the 'MacHeaders<xxx>' precompiled header for\n\tMetrowerks C.\n\n\tRA/8/19/98\tUpdated to Universal Headers 3.1\n\tRA/7/14/99  Changed commenting style so you can built for ANSI Strict\n\n\tSupport for automatically naming the C precompiled header file ...\n*/\n\n#if __POWERPC__\n\t#pragma precompile_target \"myMacHeadersPPCCarbon\"\n#ifndef TARGET_API_MAC_CARBON\n    #define TARGET_API_MAC_CARBON 1\n    #define ACCESSOR_CALLS_ARE_FUNCTIONS 1\n    #define OPAQUE_TOOLBOX_STRUCTS 1\n#endif\n\n#elif __CFM68K__\n\t#pragma precompile_target \"myMacHeadersCFM68K\"\n\n#else\n\t#pragma precompile_target \"myMacHeaders68K\"\n#endif\n\n\n/* Now just include the \"MacHeaders.c\" source file ... */\n\n#pragma once on\n\n#include \"myMacHeaders.c\"\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/Mpeg3Plugin/resources/App.rsrc",
    "content": ""
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/Mpeg3Plugin/resources/CarbonApp.rsrc",
    "content": ""
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/Mpeg3Plugin/sqMacFileBits.c",
    "content": "/*\n *  sqMacFileBits.c\n *  mpeglibAudioVideo\n *\n *  Created by John M McIntosh on 15/02/06.\n *  Copyright 2006 __MyCompanyName__. All rights reserved.\n *\n */\n\n#include \"sqMacFileBits.h\"\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/Mpeg3Plugin/sqMacFileBits.h",
    "content": "/*\n *  macFileNameBits.c\n *  FT2Plugin support\n *\n *  Created by John M McIntosh on 21/11/05.\n * Feb 15th, 2006, use sqFilenameFromString\n *\n */\n#include \"sqVirtualMachine.h\" \n\nextern struct VirtualMachine * interpreterProxy;\n\nvoid\t\tsqFilenameFromStringOpen(char *buffer,long fileIndex, long fileLength, int flag) {\n\tinterpreterProxy->ioFilenamefromStringofLengthresolveAliases(buffer,fileIndex, fileLength, flag);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/OpenALPlugin/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>CroquetPlugin</string>\n\t<key>CFBundleIconFile</key>\n\t<string>SqueakPlugin.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.CroquetPlugin</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0.0b1</string>\n\t<key>CFBundleSignature</key>\n\t<string>FAST</string>\n\t<key>CFBundleVersion</key>\n\t<string>1.0.0b1</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/PrintJobPlugin/Info-PrintJobPlugin__Upgraded_.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>PrintJobPlugin</string>\n\t<key>CFBundleGetInfoString</key>\n\t<string>PrintJobPlugin V1.2.0 for Squeak, see http://www.squeak.org</string>\n\t<key>CFBundleIconFile</key>\n\t<string>SqueakPlugin.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.PrintJobPlugin</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>PrintJobPlugin V1.2.0 for Squeak</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.2.0</string>\n\t<key>CFBundleSignature</key>\n\t<string>FAST</string>\n\t<key>CFBundleVersion</key>\n\t<string>1.2.1</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/PrintJobPlugin/PrintJobPlugin.project.xml",
    "content": "<?xml version=\"1.0\"?>\n<?codewarrior exportversion=\"1.0\" ideversion=\"4.0\"?>\n<!DOCTYPE PROJECT [\n\n<!ELEMENT PROJECT (TARGETLIST, TARGETORDER, GROUPLIST, DESIGNLIST?)>\n<!ELEMENT TARGETLIST (TARGET+)>\n<!ELEMENT TARGET (NAME, SETTINGLIST, FILELIST?, LINKORDER?, SEGMENTLIST?, OVERLAYGROUPLIST?, SUBTARGETLIST?, SUBPROJECTLIST?)>\n<!ELEMENT NAME (#PCDATA)>\n<!ELEMENT USERSOURCETREETYPE (#PCDATA)>\n<!ELEMENT PATH (#PCDATA)>\n<!ELEMENT FILELIST (FILE*)>\n<!ELEMENT FILE (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?, ROOTFILEREF?, FILEKIND?, FILEFLAGS?)>\n<!ELEMENT PATHTYPE (#PCDATA)>\n<!ELEMENT PATHROOT (#PCDATA)>\n<!ELEMENT ACCESSPATH (#PCDATA)>\n<!ELEMENT PATHFORMAT (#PCDATA)>\n<!ELEMENT ROOTFILEREF (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)>\n<!ELEMENT FILEKIND (#PCDATA)>\n<!ELEMENT FILEFLAGS (#PCDATA)>\n<!ELEMENT FILEREF (TARGETNAME?, PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)>\n<!ELEMENT TARGETNAME (#PCDATA)>\n<!ELEMENT SETTINGLIST ((SETTING|PANELDATA)+)>\n<!ELEMENT SETTING (NAME?, (VALUE|(SETTING+)))>\n<!ELEMENT PANELDATA (NAME, VALUE)>\n<!ELEMENT VALUE (#PCDATA)>\n<!ELEMENT LINKORDER (FILEREF*)>\n<!ELEMENT SEGMENTLIST (SEGMENT+)>\n<!ELEMENT SEGMENT (NAME, ATTRIBUTES?, FILEREF*)>\n<!ELEMENT ATTRIBUTES (#PCDATA)>\n<!ELEMENT OVERLAYGROUPLIST (OVERLAYGROUP+)>\n<!ELEMENT OVERLAYGROUP (NAME, BASEADDRESS, OVERLAY*)>\n<!ELEMENT BASEADDRESS (#PCDATA)>\n<!ELEMENT OVERLAY (NAME, FILEREF*)>\n<!ELEMENT SUBTARGETLIST (SUBTARGET+)>\n<!ELEMENT SUBTARGET (TARGETNAME, ATTRIBUTES?)>\n<!ELEMENT SUBPROJECTLIST (SUBPROJECT+)>\n<!ELEMENT SUBPROJECT (FILEREF, SUBPROJECTTARGETLIST)>\n<!ELEMENT SUBPROJECTTARGETLIST (SUBPROJECTTARGET*)>\n<!ELEMENT SUBPROJECTTARGET (TARGETNAME, ATTRIBUTES?)>\n<!ELEMENT TARGETORDER (ORDEREDTARGET|ORDEREDDESIGN)*>\n<!ELEMENT ORDEREDTARGET (NAME)>\n<!ELEMENT ORDEREDDESIGN (NAME, ORDEREDTARGET+)>\n<!ELEMENT GROUPLIST (GROUP|FILEREF)*>\n<!ELEMENT GROUP (NAME, (GROUP|FILEREF)*)>\n<!ELEMENT DESIGNLIST (DESIGN+)>\n<!ELEMENT DESIGN (NAME, DESIGNDATA)>\n<!ELEMENT DESIGNDATA (#PCDATA)>\n]>\n<PROJECT>\n    <TARGETLIST>\n        <TARGET>\n            <NAME>PrintJobPluginCarbon</NAME>\n            <SETTINGLIST>\n\n                <!-- Settings for \"Source Trees\" panel -->\n                <SETTING><NAME>UserSourceTrees</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"Custom Keywords\" panel -->\n                <SETTING><NAME>CustomColor1</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor2</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor3</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor4</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Access Paths\" panel -->\n                <SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>UserSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>::</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>::::Carbon:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n                <SETTING><NAME>SystemSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MacOS Support:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MSL:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Target Settings\" panel -->\n                <SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING>\n                <SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>Targetname</NAME><VALUE>PrintJobPluginCarbon</VALUE></SETTING>\n                <SETTING><NAME>OutputDirectory</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>SaveEntriesUsingRelativePaths</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"File Mappings\" panel -->\n                <SETTING><NAME>FileMappings</NAME>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>APPL</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>Appl</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MMLB</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MPLF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MWCD</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>RSRC</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.bh</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Balloon Help</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cpp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.exp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.fr</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>ODFRC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.h</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.idl</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>SOMobjects TS</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.p</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pas</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.r</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Rez</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.s</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PPCAsm</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>XCOF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>docu</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>rsrc</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>shlb</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>stub</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.doc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Build Extras\" panel -->\n                <SETTING><NAME>CacheModDates</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>ActivateBrowser</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>DumpBrowserInfo</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>CacheSubprojects</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>UseThirdPartyDebugger</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>DebuggerCommandLine</NAME><VALUE></VALUE></SETTING>\n                <PANELDATA><NAME>Debugger Runtime</NAME><VALUE>\n                    0002000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    00000000000000014C616D69653A53717565616B3A53717565616B332E302046\n                    6F6C6465723A53717565616B20332E30416C70686131384D54436172626F6E00\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    000000000000000000000000000000000D06EEF010000000000001000D06F800\n                    0002000000000000000000000D06D9E000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    00000000000000000000000000000000\n                </VALUE></PANELDATA>\n\n                <!-- Settings for \"Debugger Target\" panel -->\n                <SETTING><NAME>LogSystemMessages</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>AutoTargetDLLs</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>StopAtWatchpoints</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>PauseWhileRunning</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>PauseInterval</NAME><VALUE>5</VALUE></SETTING>\n                <SETTING><NAME>PauseUIFlags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>AltExePath</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>StopAtTempBPOnLaunch</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>CacheSymbolics</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>TempBPFunctionName</NAME><VALUE>main</VALUE></SETTING>\n                <SETTING><NAME>TempBPType</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"68K CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_68K_codesize</NAME><VALUE>Smart</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_structalignment</NAME><VALUE>MC68K</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fp_mode</NAME><VALUE>SANE</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_code68020</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_mpwc</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fourbyteints</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_IEEEdoubles</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fardata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farvtables</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_pcrelstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_macsbug</NAME><VALUE>New</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_a6frames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"68K Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_68K_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_mix</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"68K Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_68K_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_68K_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"68K Linker\" panel -->\n                <SETTING><NAME>MWLinker_68K_linksym</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_symfullpath</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_linksingle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_fastlink</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_generateMap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_glueintosegone</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"68K Project\" panel -->\n                <SETTING><NAME>MWProject_68K_type</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_outfile</NAME><VALUE>Mac OS PPC C/C++</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filecreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filetype</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_size</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_flags</NAME><VALUE>22656</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcheader</NAME><VALUE>Standard</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmulti</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_a4</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_minsize</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcsegtype</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_cfm68kcodegen</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_thedebugger</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrc_custom</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_rseg_app</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_pilot_lib</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_pilot_main_entry</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Compiler\" panel -->\n                <SETTING><NAME>MWFrontEnd_C_cplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_checkprotos</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_arm</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_trigraphs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_onlystdkeywords</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enumsalwaysint</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwpointerstyle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_prefixname</NAME><VALUE>myMacHeadersPPCCarbon</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ansistrict</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwcnewline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_wchar_type</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enableexceptions</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontreusestrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_poolstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_useRTTI</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_multibyteaware</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_unsignedchars</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_autoinline</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_booltruefalse</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_direct_to_som</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_som_env_check</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_alwaysinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_inlinelevel</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ecplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_objective_c</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_defer_codegen</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Warnings\" panel -->\n                <SETTING><NAME>MWWarning_C_warn_illpragma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_emptydecl</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_possunwant</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedvar</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedarg</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_extracomma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_pedantic</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warningerrors</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_hidevirtual</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_implicitconv</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_notinlined</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_structclass</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"CFM68K\" panel -->\n                <SETTING><NAME>MWCFM68K_exports</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_farthreshold</NAME><VALUE>256</VALUE></SETTING>\n                <SETTING><NAME>PCFM68K_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_mainname</NAME><VALUE>__start</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_termname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_alignment</NAME><VALUE>Align_2</VALUE></SETTING>\n\n                <!-- Settings for \"MacOS Merge Panel\" panel -->\n                <SETTING><NAME>MWMerge_MacOS_projectType</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputName</NAME><VALUE>Merge Out</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputCreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputType</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_suppressWarning</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyFragments</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_skipResources</NAME>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE>!</VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"PPC CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_PPC_structalignment</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tracebacktables</NAME><VALUE>Inline</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processor</NAME><VALUE>P750</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_readonlystrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_fpcontract</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_schedule</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_peephole</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processorspecific</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_altivec</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vectortocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vrsave</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_PPC_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_extended</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_mix</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_PPC_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_PPC_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Linker\" panel -->\n                <SETTING><NAME>MWLinker_PPC_linksym</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_symfullpath</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_permitmultdefs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmode</NAME><VALUE>Normal</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_mainname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_termname</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"PPC PEF\" panel -->\n                <SETTING><NAME>MWPEF_exports</NAME><VALUE>Pragma</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sortcode</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_expandbss</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWPEF_collapsereloads</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Project\" panel -->\n                <SETTING><NAME>MWProject_PPC_type</NAME><VALUE>SharedLibrary</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>PrintJobPlugin</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>1178686292</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>1936223330</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_size</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_minsize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_flags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcheader</NAME><VALUE>Native</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"PPCAsm Panel\" panel -->\n                <SETTING><NAME>MWAssembler_PPC_auxheader</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_symmode</NAME><VALUE>Mac</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_dialect</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_prefixfile</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_typecheck</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_warnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_casesensitive</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"Rez Compiler\" panel -->\n                <SETTING><NAME>MWRez_Language_maxwidth</NAME><VALUE>80</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_script</NAME><VALUE>Roman</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_alignment</NAME><VALUE>Align1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filtermode</NAME><VALUE>FilterSkip</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_suppresswarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_escapecontrolchars</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_prefixname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filteredtypes</NAME><VALUE>'CODE' 'DATA' 'PICT'</VALUE></SETTING>\n            </SETTINGLIST>\n            <FILELIST>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SqueakCarbonApp.rsrc</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Resource</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>myMacHeadersCarbon.pch</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>PrintJobPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>PrintJobPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacPrinting.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacPrinting.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.CARBON.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL SIOUX.CARBON.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>CarbonLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n            </FILELIST>\n            <LINKORDER>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SqueakCarbonApp.rsrc</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>myMacHeadersCarbon.pch</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>PrintJobPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>PrintJobPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacPrinting.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacPrinting.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.CARBON.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL SIOUX.CARBON.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>CarbonLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n            </LINKORDER>\n        </TARGET>\n        <TARGET>\n            <NAME>PrintJobPluginCarbon Opt</NAME>\n            <SETTINGLIST>\n\n                <!-- Settings for \"Source Trees\" panel -->\n                <SETTING><NAME>UserSourceTrees</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"Custom Keywords\" panel -->\n                <SETTING><NAME>CustomColor1</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor2</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor3</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor4</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Access Paths\" panel -->\n                <SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>UserSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>::</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>::::Carbon:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n                <SETTING><NAME>SystemSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MacOS Support:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MSL:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Target Settings\" panel -->\n                <SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING>\n                <SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>Targetname</NAME><VALUE>PrintJobPluginCarbon Opt</VALUE></SETTING>\n                <SETTING><NAME>OutputDirectory</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>SaveEntriesUsingRelativePaths</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"File Mappings\" panel -->\n                <SETTING><NAME>FileMappings</NAME>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>APPL</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>Appl</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MMLB</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MPLF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MWCD</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>RSRC</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.bh</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Balloon Help</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cpp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.exp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.fr</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>ODFRC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.h</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.idl</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>SOMobjects TS</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.p</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pas</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.r</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Rez</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.s</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PPCAsm</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>XCOF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>docu</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>rsrc</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>shlb</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>stub</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.doc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Build Extras\" panel -->\n                <SETTING><NAME>CacheModDates</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>ActivateBrowser</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>DumpBrowserInfo</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>CacheSubprojects</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>UseThirdPartyDebugger</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>DebuggerCommandLine</NAME><VALUE></VALUE></SETTING>\n                <PANELDATA><NAME>Debugger Runtime</NAME><VALUE>\n                    0002000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    00000000000000014C616D69653A53717565616B3A53717565616B332E302046\n                    6F6C6465723A53717565616B20332E30416C70686131384D54436172626F6E00\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    000000000000000000000000000000000D06EEF010000000000001000D06F800\n                    0002000000000000000000000D06D9E000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    00000000000000000000000000000000\n                </VALUE></PANELDATA>\n\n                <!-- Settings for \"Debugger Target\" panel -->\n                <SETTING><NAME>LogSystemMessages</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>AutoTargetDLLs</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>StopAtWatchpoints</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>PauseWhileRunning</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>PauseInterval</NAME><VALUE>5</VALUE></SETTING>\n                <SETTING><NAME>PauseUIFlags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>AltExePath</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>StopAtTempBPOnLaunch</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>CacheSymbolics</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>TempBPFunctionName</NAME><VALUE>main</VALUE></SETTING>\n                <SETTING><NAME>TempBPType</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"68K CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_68K_codesize</NAME><VALUE>Smart</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_structalignment</NAME><VALUE>MC68K</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fp_mode</NAME><VALUE>SANE</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_code68020</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_mpwc</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fourbyteints</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_IEEEdoubles</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fardata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farvtables</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_pcrelstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_macsbug</NAME><VALUE>New</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_a6frames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"68K Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_68K_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_mix</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"68K Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_68K_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_68K_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"68K Linker\" panel -->\n                <SETTING><NAME>MWLinker_68K_linksym</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_symfullpath</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_linksingle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_fastlink</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_generateMap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_glueintosegone</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"68K Project\" panel -->\n                <SETTING><NAME>MWProject_68K_type</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_outfile</NAME><VALUE>Mac OS PPC C/C++</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filecreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filetype</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_size</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_flags</NAME><VALUE>22656</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcheader</NAME><VALUE>Standard</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmulti</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_a4</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_minsize</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcsegtype</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_cfm68kcodegen</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_thedebugger</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrc_custom</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_rseg_app</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_pilot_lib</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_pilot_main_entry</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Compiler\" panel -->\n                <SETTING><NAME>MWFrontEnd_C_cplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_checkprotos</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_arm</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_trigraphs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_onlystdkeywords</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enumsalwaysint</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwpointerstyle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_prefixname</NAME><VALUE>myMacHeadersPPCCarbon</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ansistrict</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwcnewline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_wchar_type</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enableexceptions</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontreusestrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_poolstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_useRTTI</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_multibyteaware</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_unsignedchars</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_autoinline</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_booltruefalse</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_direct_to_som</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_som_env_check</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_alwaysinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_inlinelevel</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ecplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_objective_c</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_defer_codegen</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Warnings\" panel -->\n                <SETTING><NAME>MWWarning_C_warn_illpragma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_emptydecl</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_possunwant</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedvar</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedarg</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_extracomma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_pedantic</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warningerrors</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_hidevirtual</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_implicitconv</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_notinlined</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_structclass</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"CFM68K\" panel -->\n                <SETTING><NAME>MWCFM68K_exports</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_farthreshold</NAME><VALUE>256</VALUE></SETTING>\n                <SETTING><NAME>PCFM68K_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_mainname</NAME><VALUE>__start</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_termname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_alignment</NAME><VALUE>Align_2</VALUE></SETTING>\n\n                <!-- Settings for \"MacOS Merge Panel\" panel -->\n                <SETTING><NAME>MWMerge_MacOS_projectType</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputName</NAME><VALUE>Merge Out</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputCreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputType</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_suppressWarning</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyFragments</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_skipResources</NAME>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE>!</VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"PPC CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_PPC_structalignment</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tracebacktables</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processor</NAME><VALUE>P750</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_readonlystrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_fpcontract</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_schedule</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_peephole</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processorspecific</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_altivec</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vectortocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vrsave</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_PPC_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_extended</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_mix</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_PPC_optimizationlevel</NAME><VALUE>Level4</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_PPC_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Linker\" panel -->\n                <SETTING><NAME>MWLinker_PPC_linksym</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_symfullpath</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_permitmultdefs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmode</NAME><VALUE>Normal</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_mainname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_termname</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"PPC PEF\" panel -->\n                <SETTING><NAME>MWPEF_exports</NAME><VALUE>Pragma</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sortcode</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_expandbss</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWPEF_collapsereloads</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Project\" panel -->\n                <SETTING><NAME>MWProject_PPC_type</NAME><VALUE>SharedLibrary</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>PrintJobPlugin</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>1178686292</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>1936223330</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_size</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_minsize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_flags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcheader</NAME><VALUE>Native</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"PPCAsm Panel\" panel -->\n                <SETTING><NAME>MWAssembler_PPC_auxheader</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_symmode</NAME><VALUE>Mac</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_dialect</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_prefixfile</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_typecheck</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_warnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_casesensitive</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"Rez Compiler\" panel -->\n                <SETTING><NAME>MWRez_Language_maxwidth</NAME><VALUE>80</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_script</NAME><VALUE>Roman</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_alignment</NAME><VALUE>Align1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filtermode</NAME><VALUE>FilterSkip</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_suppresswarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_escapecontrolchars</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_prefixname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filteredtypes</NAME><VALUE>'CODE' 'DATA' 'PICT'</VALUE></SETTING>\n            </SETTINGLIST>\n            <FILELIST>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SqueakCarbonApp.rsrc</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Resource</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>myMacHeadersCarbon.pch</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>PrintJobPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>PrintJobPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacPrinting.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacPrinting.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.CARBON.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL SIOUX.CARBON.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>CarbonLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n            </FILELIST>\n            <LINKORDER>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SqueakCarbonApp.rsrc</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>myMacHeadersCarbon.pch</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>PrintJobPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>PrintJobPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacPrinting.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacPrinting.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.CARBON.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL SIOUX.CARBON.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>CarbonLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n            </LINKORDER>\n        </TARGET>\n        <TARGET>\n            <NAME>PrintJobPlugin Classic</NAME>\n            <SETTINGLIST>\n\n                <!-- Settings for \"Source Trees\" panel -->\n                <SETTING><NAME>UserSourceTrees</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"Custom Keywords\" panel -->\n                <SETTING><NAME>CustomColor1</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor2</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor3</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor4</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Access Paths\" panel -->\n                <SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>UserSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>::</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>::::Carbon:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>Lamie:Squeak:SqueakAtSourceForge:squeak:platforms:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n                <SETTING><NAME>SystemSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MacOS Support:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MSL:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Target Settings\" panel -->\n                <SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING>\n                <SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>Targetname</NAME><VALUE>PrintJobPlugin Classic</VALUE></SETTING>\n                <SETTING><NAME>OutputDirectory</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>SaveEntriesUsingRelativePaths</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"File Mappings\" panel -->\n                <SETTING><NAME>FileMappings</NAME>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>APPL</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>Appl</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MMLB</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MPLF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MWCD</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>RSRC</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.bh</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Balloon Help</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cpp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.exp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.fr</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>ODFRC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.h</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.idl</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>SOMobjects TS</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.p</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pas</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.r</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Rez</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.s</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PPCAsm</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>XCOF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>docu</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>rsrc</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>shlb</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>stub</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.doc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Build Extras\" panel -->\n                <SETTING><NAME>CacheModDates</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>ActivateBrowser</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>DumpBrowserInfo</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>CacheSubprojects</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>UseThirdPartyDebugger</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>DebuggerCommandLine</NAME><VALUE></VALUE></SETTING>\n                <PANELDATA><NAME>Debugger Runtime</NAME><VALUE>\n                    0002000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    00000000000000014C616D69653A53717565616B3A53717565616B332E302046\n                    6F6C6465723A53717565616B20332E302E31383A53717565616B20564D205050\n                    4320446562756700000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    000000000000000000000000000000000D06EEF010000000000001000D06F800\n                    0002000000000000000000000D06D9E000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    00000000000000000000000000000000\n                </VALUE></PANELDATA>\n\n                <!-- Settings for \"Debugger Target\" panel -->\n                <SETTING><NAME>LogSystemMessages</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>AutoTargetDLLs</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>StopAtWatchpoints</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>PauseWhileRunning</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>PauseInterval</NAME><VALUE>5</VALUE></SETTING>\n                <SETTING><NAME>PauseUIFlags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>AltExePath</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>StopAtTempBPOnLaunch</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>CacheSymbolics</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>TempBPFunctionName</NAME><VALUE>main</VALUE></SETTING>\n                <SETTING><NAME>TempBPType</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"68K CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_68K_codesize</NAME><VALUE>Smart</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_structalignment</NAME><VALUE>MC68K</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fp_mode</NAME><VALUE>SANE</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_code68020</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_mpwc</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fourbyteints</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_IEEEdoubles</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fardata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farvtables</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_pcrelstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_macsbug</NAME><VALUE>New</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_a6frames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"68K Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_68K_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_mix</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"68K Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_68K_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_68K_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"68K Linker\" panel -->\n                <SETTING><NAME>MWLinker_68K_linksym</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_symfullpath</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_linksingle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_fastlink</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_generateMap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_glueintosegone</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"68K Project\" panel -->\n                <SETTING><NAME>MWProject_68K_type</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_outfile</NAME><VALUE>Mac OS PPC C/C++</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filecreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filetype</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_size</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_flags</NAME><VALUE>22656</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcheader</NAME><VALUE>Standard</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmulti</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_a4</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_minsize</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcsegtype</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_cfm68kcodegen</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_thedebugger</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrc_custom</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_rseg_app</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_pilot_lib</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_pilot_main_entry</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Compiler\" panel -->\n                <SETTING><NAME>MWFrontEnd_C_cplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_checkprotos</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_arm</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_trigraphs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_onlystdkeywords</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enumsalwaysint</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwpointerstyle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_prefixname</NAME><VALUE>myMacHeadersPPC</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ansistrict</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwcnewline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_wchar_type</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enableexceptions</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontreusestrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_poolstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_useRTTI</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_multibyteaware</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_unsignedchars</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_autoinline</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_booltruefalse</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_direct_to_som</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_som_env_check</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_alwaysinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_inlinelevel</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ecplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_objective_c</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_defer_codegen</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Warnings\" panel -->\n                <SETTING><NAME>MWWarning_C_warn_illpragma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_emptydecl</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_possunwant</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedvar</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedarg</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_extracomma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_pedantic</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warningerrors</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_hidevirtual</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_implicitconv</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_notinlined</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_structclass</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"CFM68K\" panel -->\n                <SETTING><NAME>MWCFM68K_exports</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_farthreshold</NAME><VALUE>256</VALUE></SETTING>\n                <SETTING><NAME>PCFM68K_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_mainname</NAME><VALUE>__start</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_termname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_alignment</NAME><VALUE>Align_2</VALUE></SETTING>\n\n                <!-- Settings for \"MacOS Merge Panel\" panel -->\n                <SETTING><NAME>MWMerge_MacOS_projectType</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputName</NAME><VALUE>Merge Out</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputCreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputType</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_suppressWarning</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyFragments</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_skipResources</NAME>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE>!</VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"PPC CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_PPC_structalignment</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tracebacktables</NAME><VALUE>Inline</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processor</NAME><VALUE>P750</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_readonlystrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_fpcontract</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_schedule</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_peephole</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processorspecific</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_altivec</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vectortocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vrsave</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_PPC_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_extended</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_mix</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_PPC_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_PPC_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Linker\" panel -->\n                <SETTING><NAME>MWLinker_PPC_linksym</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_symfullpath</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_permitmultdefs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmode</NAME><VALUE>Normal</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_mainname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_termname</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"PPC PEF\" panel -->\n                <SETTING><NAME>MWPEF_exports</NAME><VALUE>Pragma</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sortcode</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_expandbss</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWPEF_collapsereloads</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Project\" panel -->\n                <SETTING><NAME>MWProject_PPC_type</NAME><VALUE>SharedLibrary</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>PrintJobPlugin</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>1178686292</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>1936223330</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_size</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_minsize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_flags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcheader</NAME><VALUE>Native</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"PPCAsm Panel\" panel -->\n                <SETTING><NAME>MWAssembler_PPC_auxheader</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_symmode</NAME><VALUE>Mac</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_dialect</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_prefixfile</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_typecheck</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_warnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_casesensitive</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"Rez Compiler\" panel -->\n                <SETTING><NAME>MWRez_Language_maxwidth</NAME><VALUE>80</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_script</NAME><VALUE>Roman</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_alignment</NAME><VALUE>Align1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filtermode</NAME><VALUE>FilterSkip</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_suppresswarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_escapecontrolchars</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_prefixname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filteredtypes</NAME><VALUE>'CODE' 'DATA' 'PICT'</VALUE></SETTING>\n            </SETTINGLIST>\n            <FILELIST>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>PrintJobPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>PrintJobPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacPrinting.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacPrinting.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InterfaceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>myMacHeaders.pch</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>CarbonAccessors.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n            </FILELIST>\n            <LINKORDER>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>PrintJobPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>PrintJobPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacPrinting.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacPrinting.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InterfaceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>myMacHeaders.pch</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>CarbonAccessors.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n            </LINKORDER>\n        </TARGET>\n    </TARGETLIST>\n\n    <TARGETORDER>\n        <ORDEREDTARGET><NAME>PrintJobPluginCarbon</NAME></ORDEREDTARGET>\n        <ORDEREDTARGET><NAME>PrintJobPluginCarbon Opt</NAME></ORDEREDTARGET>\n        <ORDEREDTARGET><NAME>PrintJobPlugin Classic</NAME></ORDEREDTARGET>\n    </TARGETORDER>\n\n    <GROUPLIST>\n        <GROUP><NAME>Carbon</NAME>\n            <FILEREF>\n                <TARGETNAME>PrintJobPluginCarbon</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MSL C.CARBON.Lib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>PrintJobPluginCarbon</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MSL SIOUX.CARBON.Lib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>PrintJobPluginCarbon</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>CarbonLib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>PrintJobPluginCarbon</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>SqueakCarbonApp.rsrc</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>PrintJobPluginCarbon</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>myMacHeadersCarbon.pch</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n        </GROUP>\n        <GROUP><NAME>Classic</NAME>\n            <FILEREF>\n                <TARGETNAME>PrintJobPlugin Classic</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MSL C.PPC.Lib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>PrintJobPlugin Classic</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>InterfaceLib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>PrintJobPlugin Classic</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>CarbonAccessors.o</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>PrintJobPlugin Classic</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>myMacHeaders.pch</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n        </GROUP>\n        <GROUP><NAME>Group 1</NAME>\n            <FILEREF>\n                <TARGETNAME>PrintJobPluginCarbon</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MSL RuntimePPC.Lib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>PrintJobPluginCarbon</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>PrintJobPlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>PrintJobPluginCarbon</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>PrintJobPlugin.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>PrintJobPluginCarbon</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacPrinting.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>PrintJobPluginCarbon</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacPrinting.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n        </GROUP>\n    </GROUPLIST>\n\n</PROJECT>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/PrintJobPlugin/RealPrinting-JMM.7.cs",
    "content": "'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 18 January 2007 at 10:50:25 am'!\rObject subclass: #PrintJob\r\tinstanceVariableNames: 'sessionBits sessionIndex pageRect'\r\tclassVariableNames: 'Registry'\r\tpoolDictionaries: ''\r\tcategory: 'Graphics-Text'!\r\r!PrintJob commentStamp: 'JMM 2/9/2002 00:47' prior: 0!\rA simple print interface by johnmci@smalltalkconsulting.com\rOriginally written for macintosh carbon applications.\r\rUsually you invoke a utility method to print a set of forms, or postscript objects.\rBasically you invoke\rprimPrintSetup to setup printing for a set of pages.\rprintPreProcessing: totalPages to setup printing, which later must exit by \rcalling printPostProcessing\rthen you invoke pagePreProcessing to setup to print a page, which later must exit by\rcalling pagePostProcessing\rThen you invoke setForm: or setPostscript: to image a form or postscript as many \rtimes as needed, then as mentioned pagePostProcessing to close the page, and \rfinaly printPostProcessing to close the print job, with printCleanup to release all \rthe resources. !\r\r\r!PrintJob methodsFor: 'accessors' stamp: 'JMM 2/9/2002 13:50'!\rsession\r\tsessionIndex isNil ifTrue:[^nil].\r\t(Smalltalk externalObjects at: sessionIndex ifAbsent: [^nil]) == sessionBits \r\t\tifTrue: [^sessionBits]\r\t\tifFalse: [^nil].\r! !\r\r!PrintJob methodsFor: 'initialize-release' stamp: 'pe 12/16/2006 16:52'!\rinitialize\r\tpageRect := Rectangle origin: 0@0 corner: 0@0.\r\tpaperRect := Rectangle origin: 0@0 corner: 0@0.\r\tdpi := (300@300).\r\tsessionBits _ self primPrintSetup.\r\tsessionBits notNil ifTrue: \r\t\t[sessionIndex _ Smalltalk registerExternalObject: sessionBits.\r\t\tself register]\r\t! !\r\r!PrintJob methodsFor: 'logic' stamp: 'JMM 2/8/2002 00:13'!\rpagePostProcessing\r\t^self primPagePostProcessing: self session ! !\r\r!PrintJob methodsFor: 'logic' stamp: 'JMM 2/8/2002 00:14'!\rpagePreProcessing\r\t^self primPagePreProcessing: self session ! !\r\r!PrintJob methodsFor: 'logic' stamp: 'JMM 2/9/2002 01:32'!\rprintCleanup\r\t[self primPrintCleanup: self session] ensure: [self finalize]! !\r\r!PrintJob methodsFor: 'logic' stamp: 'pe 12/16/2006 16:55'!\rprintFullPageForm: aForm\r\t| status statusPostProcessing |\r\tself session isNil ifTrue: [self beep. ^-1].\r\t[status _ self printPreProcessing: 1 dpi: dpi.\r\r\t\"printPreProcessing: dpi: returns these values:\r\tTranscript show: 'pageRect: ', pageRect; cr.\r\tTranscript show: 'paperRect: ', paperRect; cr.\r\tTranscript show: 'dpi: ', dpi; cr.\t\"\r\t\r\tself pagePreProcessing.\r\tstatus ~= 0 ifTrue: [^status].\r\tself setFullPageForm: aForm]\r\t\tensure: \r\t\t\t[\r\t\t\tself pagePostProcessing.\r\t\t\tstatusPostProcessing _ self printPostProcessing.\r\t\t\tself printCleanup].\r\tstatus ~= 0 ifTrue: [^status].\r\t^statusPostProcessing.! !\r\r!PrintJob methodsFor: 'logic' stamp: 'JMM 2/9/2002 12:28'!\rprintGetFirstPageNumber\r\t^self primGetFirstPageNumber: self session ! !\r\r!PrintJob methodsFor: 'logic' stamp: 'JMM 2/9/2002 12:28'!\rprintGetLastPageNumber\r\t^self primGetLastPageNumber: self session ! !\r\r!PrintJob methodsFor: 'logic' stamp: 'JMM 2/7/2002 18:32'!\rprintPostProcessing\r\t^self primPrintPostProcessing: self session ! !\r\r!PrintJob methodsFor: 'logic' stamp: 'JMM 2/7/2002 18:32'!\rprintPreProcessing: aNumber\r\t^self primPrintPreProcessing: self session pages: aNumber! !\r\r!PrintJob methodsFor: 'logic' stamp: 'pe 12/16/2006 16:55'!\rprintPreProcessing: aNumber dpi: dpiPoint\r\t^self primPrintPreProcessing: self session pages: aNumber pageRectangle: pageRect paperRectangle: paperRect dpi: dpi! !\r\r!PrintJob methodsFor: 'logic' stamp: 'JMM 2/8/2002 21:07'!\rsetForm: aForm \r\t^self setForm: aForm scaleHeight: 1.0 scaleWidth: 1.0 \r! !\r\r!PrintJob methodsFor: 'logic' stamp: 'pe 12/12/2006 09:44'!\rsetForm: aForm at: aSymbol\r\r\t\"this is not yet generally working, for Plopp I needed just the #topCenter case. pe 12/12/2006 09:44\"\r\r\t| formRatio printRatio printExtent inRect aPoint |\r\tformRatio := aForm width asFloat / aForm height asFloat.\r\tprintRatio := pageRect width asFloat / pageRect height asFloat.\r\tprintRatio <= formRatio\r\tifTrue: [\r\t\tprintExtent := pageRect width @ (pageRect width asFloat / formRatio)]\r\tifFalse: [\r\t\tprintExtent := (pageRect height * formRatio) @ pageRect height].\r\r\tinRect := Rectangle origin: (0@0) extent: printExtent truncated.\r\taPoint := (pageRect perform: aSymbol).\r\tinRect := inRect perform: (aSymbol, ':')asSymbol with: aPoint.\r\tinRect := Rectangle origin: inRect origin extent: printExtent truncated.\r\t\r\r\t^self setForm: aForm in: inRect.! !\r\r!PrintJob methodsFor: 'logic' stamp: 'pe 12/8/2006 20:02'!\rsetForm: aForm in: inRect\r\r\taForm unhibernate.\r\t^self primPageSetForm: self session bits: aForm bits bitmapHeight: aForm height truncated bitmapWidth: aForm width truncated bitmapDepth: aForm depth truncated printHeight: inRect height truncated printWidth: inRect width truncated offsetH: inRect top truncated offsetW: inRect left truncated.! !\r\r!PrintJob methodsFor: 'logic' stamp: 'JMM 2/20/2002 11:56'!\rsetForm: aForm scaleHeight: sh scaleWidth: sw \r\t^self setForm: aForm scaleHeight: sh scaleWidth: sw offsetHeight: 0 offsetWidth: 0! !\r\r!PrintJob methodsFor: 'logic' stamp: 'JMM 2/20/2002 10:25'!\rsetForm: aForm scaleHeight: sh scaleWidth: sw offsetHeight: oh offsetWidth: ow\r\taForm unhibernate.\r\t^self primPageSetForm: self session bits: aForm bits height: aForm height width: aForm width  depth: aForm depth scaleH: sh scaleW: sw offsetH: oh offsetW: ow\r! !\r\r!PrintJob methodsFor: 'logic' stamp: 'pe 12/16/2006 16:56'!\rsetFullPageForm: aForm \r\t\r\t| formRatio printRatio printExtent inRect |\r\r\tformRatio := aForm width asFloat / aForm height asFloat.\r\tprintRatio := pageRect width asFloat / pageRect height asFloat.\r\tprintRatio <= formRatio\r\tifTrue: [\r\t\tprintExtent := pageRect width @ (pageRect width asFloat / formRatio)]\r\tifFalse: [\r\t\tprintExtent := (pageRect height * formRatio) @ pageRect height].\r\r\tinRect := (Rectangle center: pageRect center extent: printExtent truncated).\r\r\t^self setForm: aForm in: inRect.\r! !\r\r!PrintJob methodsFor: 'logic' stamp: 'JMM 2/8/2002 01:20'!\rsetPostscript: aText\r\t^self primPageSetPostscript: self session postscript: aText! !\r\r!PrintJob methodsFor: 'logic' stamp: 'JMM 2/9/2002 13:49'!\rstartJob: objects\r\t| status statusPostProcessing |\r\tself session isNil ifTrue: [^-1].\r\t[status _ self printPreProcessing: objects size.\r\tstatus ~= 0 ifTrue: [^status].\r\tself printGetFirstPageNumber to: self printGetLastPageNumber do: \r\t\t[:index | \r\t\tstatus _ self startPage: (objects at: index)]]\r\t\tensure: \r\t\t\t[statusPostProcessing _ self printPostProcessing.\r\t\t\tself printCleanup].\r\tstatus ~= 0 ifTrue: [^status].\r\t^statusPostProcessing\r! !\r\r!PrintJob methodsFor: 'logic' stamp: 'JMM 2/8/2002 22:48'!\rstartPage: aObject\r\t| status |\r\t[status _ self pagePreProcessing.\r\tstatus ~= 0 ifTrue: [^status].\r\taObject isForm \r\t\tifTrue: [status _ self setForm: aObject]\r\t\tifFalse: [status _ self setPostscript: aObject].\r\tstatus ~= 0 ifTrue: [^status]]\r\t\tensure: \r\t\t[status _ self pagePostProcessing].\r\t^status\r! !\r\r!PrintJob methodsFor: 'system primitives' stamp: 'JMM 2/9/2002 12:27'!\rprimGetFirstPageNumber: aSession\r\t\"get first page number\"\r\t<primitive: 'primitivePrintGetFirstPageNumber' module: 'PrintJobPlugin'>\r\t^0! !\r\r!PrintJob methodsFor: 'system primitives' stamp: 'JMM 2/9/2002 12:27'!\rprimGetLastPageNumber: aSession\r\t\"get last page number\"\r\t<primitive: 'primitivePrintGetLastPageNumber' module: 'PrintJobPlugin'>\r\t^0! !\r\r!PrintJob methodsFor: 'system primitives' stamp: 'JMM 2/8/2002 00:41'!\rprimPagePostProcessing: aSession \r\t\"Page post processing\"\r\t<primitive: 'primitivePagePostProcessing' module: 'PrintJobPlugin'>\r\tself primitiveFailed! !\r\r!PrintJob methodsFor: 'system primitives' stamp: 'JMM 2/8/2002 00:13'!\rprimPagePreProcessing: aSession \r\t\"Page preprocessing\"\r\t<primitive: 'primitivePagePreProcessing' module: 'PrintJobPlugin'>\r\tself primitiveFailed! !\r\r!PrintJob methodsFor: 'system primitives' stamp: 'pe 12/8/2006 19:57'!\rprimPageSetForm: aSessionHandle bits: aBitMap bitmapHeight: bh bitmapWidth: bw bitmapDepth: bd printHeight: ph printWidth: pw offsetH: oh offsetW: ow\r\t\"setup form \"\r\t<primitive: 'primitivePageSetFormPrint' module: 'PrintJobPlugin'>\r\t^nil.\r\t\"self primitiveFailed\"! !\r\r!PrintJob methodsFor: 'system primitives' stamp: 'JMM 2/20/2002 10:22'!\rprimPageSetForm: aSessionHandle bits: aBitMap height: h width: w depth: d scaleH: sh scaleW: sw offsetH: oh offsetW: ow\r\t\"setup form \"\r\t<primitive: 'primitivePageSetForm' module: 'PrintJobPlugin'>\r\tself primitiveFailed! !\r\r!PrintJob methodsFor: 'system primitives' stamp: 'JMM 2/8/2002 00:11'!\rprimPageSetPostscript: aSessionHandle postscript: aText\r\t\"setup postscript \"\r\t<primitive: 'primitivePageSetPostscript' module: 'PrintJobPlugin'>\r\tself primitiveFailed! !\r\r!PrintJob methodsFor: 'system primitives' stamp: 'JMM 2/9/2002 01:52'!\rprimPrintCleanup: aSession\r\t\"Print cleanup processing\"\r\t<primitive: 'primitivePrintCleanup' module: 'PrintJobPlugin'>\r! !\r\r!PrintJob methodsFor: 'system primitives' stamp: 'JMM 2/9/2002 01:27'!\rprimPrintPostProcessing: aSession\r\t\"Print post processing\"\r\t<primitive: 'primitivePrintPostProcessing' module: 'PrintJobPlugin'>\r! !\r\r!PrintJob methodsFor: 'system primitives' stamp: 'JMM 2/7/2002 18:32'!\rprimPrintPreProcessing: aSession pages: aNumber\r\t\"Printing preprocessing\"\r\t<primitive: 'primitivePrintPreProcessing' module: 'PrintJobPlugin'>\r\tself primitiveFailed! !\r\r!PrintJob methodsFor: 'system primitives' stamp: 'pe 12/16/2006 16:53'!\rprimPrintPreProcessing: aSession pages: aNumber pageRectangle: pageRectangle paperRectangle: paperRectangle dpi: dpiPoint\r\t\"Printing preprocessing\"\r\t<primitive: 'primitivePrintPreProcessingPageRectanglePaperRectangleDpi' module: 'PrintJobPlugin'>\r\tself primitiveFailed! !\r\r!PrintJob methodsFor: 'system primitives' stamp: 'JMM 2/9/2002 13:25'!\rprimPrintSetup\r\t\"Setup printing\"\r\t<primitive: 'primitivePrintSetup' module: 'PrintJobPlugin'>\r\t^nil! !\r\r!PrintJob methodsFor: 'system primitives' stamp: 'pe 12/16/2006 16:54'!\rprimPrintSetupPage: pageRectangle paper: paperRectangle dpi: dpiPoint\r\t\"Setup printing\"\r\t<primitive: 'primitivePrintSetupPageRectanglePaperRectangleDpi' module: 'PrintJobPlugin'>\r\r\tself halt.\t\r\r\t^nil. \"If the user pressed cancel, we don't want a primitive failed. We do the checks using session bits\"! !\r\r!PrintJob methodsFor: 'system primitives' stamp: 'pe 12/8/2006 18:53'!\rprimPrintSetupRect: aRectangle\r\t\"Setup printing\"\r\t<primitive: 'primitivePrintSetupOnRectangle' module: 'PrintJobPlugin'>\r\t\r\t^nil. \"If the user pressed cancel, we don't want a primitive failed. We do the checks using session bits\"! !\r\r!PrintJob methodsFor: 'utility' stamp: 'JMM 2/8/2002 21:28'!\rprintForms: aCollectionOfForms\r\t^self startJob: aCollectionOfForms\r\t\r! !\r\r!PrintJob methodsFor: 'utility' stamp: 'JMM 2/8/2002 21:10'!\rprintForm: aForm\r\t^self printForms: (Array with: aForm)\r! !\r\r!PrintJob methodsFor: 'utility' stamp: 'JMM 2/8/2002 21:30'!\rprintPostscriptObjects: aCollection\r\t^self startJob: aCollection\r\r! !\r\r!PrintJob methodsFor: 'utility' stamp: 'JMM 2/8/2002 22:49'!\rprintPostscript: aText\r\t^self printPostscriptObjects: (Array with: aText)\r! !\r\r!PrintJob methodsFor: 'private' stamp: 'JMM 2/9/2002 01:58'!\rfinalize\r\tself session notNil ifTrue: [self primPrintCleanup: self session].\r\tself session = sessionBits ifTrue: [Smalltalk unregisterExternalObject: sessionIndex].\r\tself unregister.\r\tsessionBits _ nil.\t\r\tsessionIndex _ 0.! !\r\r!PrintJob methodsFor: 'private' stamp: 'JMM 2/9/2002 01:29'!\rregister\r\t^self class register: self! !\r\r!PrintJob methodsFor: 'private' stamp: 'JMM 2/9/2002 01:29'!\runregister\r\t^self class unregister: self! !\r\r\r!PrintJob class methodsFor: 'utility' stamp: 'JMM 2/9/2002 00:19'!\rprintForms: forms\r\t^super new initialize printForms: forms! !\r\r!PrintJob class methodsFor: 'utility' stamp: 'JMM 2/9/2002 00:12'!\rprintForm: aForm\r\t^self printForms: (Array with: aForm)! !\r\r!PrintJob class methodsFor: 'utility' stamp: 'JMM 2/9/2002 00:48'!\rprintPostscriptObjects: aCollection\r\t^super new initialize printPostscriptObjects: aCollection! !\r\r!PrintJob class methodsFor: 'utility' stamp: 'JMM 2/9/2002 00:49'!\rprintPostscript: aString\r\t^self printPostscriptObjects: (Array with: aString)! !\r\r!PrintJob class methodsFor: 'registery' stamp: 'JMM 2/9/2002 01:21'!\rregister: anObject\r\tWeakArray isFinalizationSupported ifFalse:[^anObject].\r\tself registry add: anObject! !\r\r!PrintJob class methodsFor: 'registery' stamp: 'JMM 2/9/2002 01:21'!\rregistry\r\tWeakArray isFinalizationSupported ifFalse:[^nil].\r\t^Registry isNil\r\t\tifTrue:[Registry := WeakRegistry new]\r\t\tifFalse:[Registry].! !\r\r!PrintJob class methodsFor: 'registery' stamp: 'JMM 2/9/2002 01:21'!\runregister: anObject\r\tWeakArray isFinalizationSupported ifFalse:[^anObject].\r\tself registry remove: anObject ifAbsent:[]! !\r\rPrintJob class removeSelector: #new!\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/PrintJobPlugin/sqMacPrinting.c",
    "content": "/****************************************************************************\n*   PROJECT: Mac printing\n*   FILE:    sqMacPrinting.c\n*   CONTENT: \n*\n*   AUTHOR:  John McIntosh.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacPrinting.c 1206 2005-06-02 20:21:11Z johnmci $\n*\n*   NOTES: \n*\tTake carbon sample code, and alter it a bit\n*\tFeb 20th 2002, JMM - add offset logic, free printsession only if allocated (duh)\n*   Jun 27th 2002, JMM - use UILock code to lock UI to prevent os-x seg fault\n*       Aug 7th, 2002, JMM - fixes to build as internal\n*\n*****************************************************************************/\n#include \"sqVirtualMachine.h\"\n#include \"sqMacPrinting.h\"\n\n/*------------------------------------------------------------------------------\n\n    This sample code is the Carbon equivalent of the classic print loop\n    documented in Tech Note 1092 \"A Print Loop That Cares ...\".  This code\n    illustrates the use of functions defined in PMCore.h and PMApplication.h\n    instead of Printing.h.\n\n    You may incorporate this sample code into your applications without\n    restriction, though the sample code has been provided \"AS IS\" and the\n    responsibility for its operation is 100% yours.  However, what you are\n    not permitted to do is to redistribute the source as \"Apple Sample Code\"\n    after having made changes. If you're going to re-distribute the source,\n    we require that you make it clear in the source that the code was\n    descended from Apple Sample Code, but that you've made changes.\n    \n    Version:\t1.0.1\n    \n    Technology:\tCarbon Printing for Mac OS 8, 9 & X\n\n    Copyright  1998-2001 Apple Computer, Inc  ., All Rights Reserved\n\t\n    Change History:\n\n------------------------------------------------------------------------------*/\n/*------------------------------------------------------------------------------\n\tGlobals\n------------------------------------------------------------------------------*/\nstatic CTabHandle\tstColorTable = nil;\nstatic PixMapHandle\tstPixMap = nil;\nextern struct VirtualMachine *interpreterProxy;\n\n/*------------------------------------------------------------------------------\n\tPrototypes\n------------------------------------------------------------------------------*/\nstatic void \tSetColorEntry(int index, int red, int green, int blue);\nstatic void \tSetUpPixmap(void);\nstatic void \tFreePixmap(void);\nstatic Boolean RunningOnCarbonX(void);\nOSStatus\tDoPrintLoop(PrintingLogicPtr printJob);\nOSStatus \tDrawPage(PrintingLogicPtr printJob);\n\n#if TARGET_API_MAC_CARBON\nOSStatus \tDoPageSetupDialog(PrintingLogicPtr printJob);\nOSStatus \tDoPrintDialog(PrintingLogicPtr printJob);\nOSStatus \tFlattenAndSavePageFormat(PrintingLogicPtr printJob);\nOSStatus \tLoadAndUnflattenPageFormat(PrintingLogicPtr printJob);\nOSStatus\tDetermineNumberOfPagesInDoc(UInt32 *numPages,PrintingLogicPtr printJob);\nBoolean\t\tIncludePostScriptInSpoolFile(PrintingLogicPtr printJob);\n\n/*------------------------------------------------------------------------------\n \t\n    Description:\n        Uses PMCreateSession/PMRelease instead of PMBegin/PMEnd.  Note that the two\n        printing objects, PMPageSetup and PMPrintSettings are valid outside the\n        printing session.  This was not the case with PMBegin/PMEnd in the previous\n        version of this sample code.  Note also that no nesting of printing sessions\n        is allowed for Carbon applications running under MacOS 8 or 9.\n \t\n------------------------------------------------------------------------------*/\nint ioPrintSetup(PrintingLogicPtr *token)\n{\n    OSStatus\t\tstatus = noErr;\n    PrintingLogicPtr printJob;\n   \n    printJob = *token = calloc(1,sizeof(PrintingLogic));\n    printJob->printSession = NULL;\n    printJob->pageFormat = kPMNoPageFormat;\n    printJob->printSettings = kPMNoPrintSettings;\n    printJob->flatFormatHandle = NULL;\n    printJob->numberOfPages = 0;\n    \n    //\tInitialize the printing manager and create a printing session.\n    status = PMCreateSession(&printJob->printSession);\n    if (status != noErr) \n        return -1;\t// pointless to continue if PMCreateSession fails\n    \n    //\tDisplay the Page Setup dialog.\n    if (status == noErr) {\n        status = DoPageSetupDialog(printJob);\n    }\n    return status;\n}\n\nint ioPrintPreProcessing(PrintingLogicPtr printJob,int numberOfPages) {\n    OSStatus\t\tstatus = noErr;\n    UInt32\trealNumberOfPagesinDoc;\n    \n    //\tDisplay the Print dialog.\n    \n    if (printJob->printSession == NULL) \n        return -1;\n        \n    printJob->numberOfPages = numberOfPages;\n    printJob->allowPostscript = false;\n    \n    status = DoPrintDialog(printJob);\n    \n    if (status == noErr) {\n\t    //issues with os 9 don't do CFStringRef\tjobName = CFSTR(\"Squeak\");\n        //issues with os 9 don't do status = PMSetJobNameCFString(printJob->printSettings, jobName);\n    \n        //\tGet the user's Print dialog selection for first and last pages to print.\n        if (status == noErr)\n            { \n            status = PMGetFirstPage(printJob->printSettings, &printJob->firstPage);\n            if (status == noErr)\n                status = PMGetLastPage(printJob->printSettings, &printJob->lastPage);\n            }\n    \n        //\tCheck that the selected page range does not exceed the actual number of\n        //\tpages in the document.\n        if (status == noErr)\n            {\n            status = DetermineNumberOfPagesInDoc(&realNumberOfPagesinDoc,printJob);\n            if (realNumberOfPagesinDoc < printJob->lastPage)\n                printJob->lastPage = realNumberOfPagesinDoc;\n            }\n    \n        //\tBefore executing the print loop, tell the Carbon Printing Manager which pages\n        //\twill be spooled so that the progress dialog can reflect an accurate page count.\n        //\tThis is recommended on Mac OS X.  On Mac OS 8 and 9, we have no control over\n        //\twhat the printer driver displays.\n            \n        if (status == noErr)\n            status = PMSetFirstPage(printJob->printSettings, printJob->firstPage, false);\n        if (status == noErr)\n            status = PMSetLastPage(printJob->printSettings, printJob->lastPage, false);\n\tif (status == noErr)\n            status = PMSetPageRange(printJob->printSettings, 1, printJob->lastPage-printJob->firstPage+1);\n        //\tCheck if we can add PostScript to the spool file\n        if (status == noErr)\n            printJob->allowPostscript = IncludePostScriptInSpoolFile(printJob);\n        \n        //\tBegin a new print job.\n        status = PMSessionBeginDocument(printJob->printSession, printJob->printSettings, printJob->pageFormat);\n        }\n\n    return status;\n}\n\nint ioPagePreProcessing(PrintingLogicPtr printJob) {                                               \n    OSStatus\t\tstatus = noErr;\n\n    status = PMSessionBeginPage(printJob->printSession, printJob->pageFormat, NULL);\n    return status;\n}\n\nint ioPrint(PrintingLogicPtr printJob) {  \n    OSStatus\t\tstatus = noErr;\n\n    if (printJob->printSession == NULL) \n        return -1;\n        \n    //\tExecute the print loop.\n    if (status == noErr)\n        status = DoPrintLoop(printJob);\n \n    if(status == kPMCancel)\n        status = noErr;\n        \n    return status;\n}\n\nint ioPagePostProcessing(PrintingLogicPtr printJob) {                                               \n    OSStatus\t\tstatus = noErr;\n    \n    //\tClose the page.\n    status = PMSessionEndPage(printJob->printSession);\n    return status;\n}\n\n\nint ioPrintPostProcessing(PrintingLogicPtr printJob) {                                                                \tOSStatus\tstatus = noErr;\n\n     // Close the print job.  This dismisses the progress dialog on Mac OS X.\n    status = PMSessionEndDocument(printJob->printSession);\n    return status;\n    \n}    \n\nint ioPrintGetFirstPageNumber(PrintingLogicPtr printJob){\n    if (printJob->printSession == NULL) \n        return 0;\n    return printJob->firstPage;\n\n}\nint ioPrintGetLastPageNumber(PrintingLogicPtr printJob){\n    if (printJob->printSession == NULL) \n        return 0;\n    return printJob->lastPage;\n}\n\n\nint ioPrintCleanup(PrintingLogicPtr *token) {                                                                \tPrintingLogicPtr printJob;\n    //\tRelease the PageFormat and PrintSettings objects.  PMRelease decrements the\n    //\tref count of the allocated objects.  We let the Printing Manager decide when\n    //\tto release the allocated memory.\n    \n    printJob = *token;\n    if (printJob == nil) \n        return 0;\n        \n    if (printJob->pageFormat != kPMNoPageFormat)\n        (void)PMRelease(printJob->pageFormat);\n        \n    if (printJob->printSettings != kPMNoPrintSettings)\n        (void)PMRelease(printJob->printSettings);\n    \n    //\tTerminate the current printing session. \n    if (printJob->printSession != NULL)\n    \t(void)PMRelease(printJob->printSession);\n    \n    printJob->pageFormat = kPMNoPageFormat;\n    printJob->printSettings = kPMNoPrintSettings;\n    printJob->printSession = NULL;\n    free(printJob);\n    *token = nil;\n    \n    return 0;\n}\n\n/*------------------------------------------------------------------------------\n\n    Function:\tDoPageSetupDialog\n    \n    Parameters:\n    \n    Description:\n        If the caller passes in an empty PageFormat object, DoPageSetupDialog\n        creates a new one, otherwise it validates the one provided by the caller.\n        It then invokes the Page Setup dialog and checks for Cancel. Finally it\n        flattens the PageFormat object so it can be saved with the document.\n        Note that the PageFormat object is modified by this function.\n\t\n------------------------------------------------------------------------------*/\nOSStatus \tDoPageSetupDialog(PrintingLogicPtr printJob)\n{\n\tOSStatus\tstatus = noErr;\n\tBoolean\t\taccepted;\n        \n\t//\tSet up a valid PageFormat object.\n\tif (printJob->pageFormat == kPMNoPageFormat)\n            {\n            status = PMCreatePageFormat(&printJob->pageFormat);\n\t\t\n            //\tNote that PMPageFormat is not session-specific, but calling\n            //\tPMSessionDefaultPageFormat assigns values specific to the printer\n            //\tassociated with the current printing session.\n            if ((status == noErr) && (printJob->pageFormat != kPMNoPageFormat))\n                status = PMSessionDefaultPageFormat(printJob->printSession, printJob->pageFormat);\n            }\n\telse\n            status = PMSessionValidatePageFormat(printJob->printSession, printJob->pageFormat, kPMDontWantBoolean);\n            \n        /* This is broken\n            fn = interpreterProxy->ioLoadFunctionFrom(\"getSTWindow\", \"\");\n\t\n        if (fn != 0) {\n            WindowPtr\twindowRef;\n            windowRef = (WindowPtr) ((int (*) ()) fn)();\n            PMSessionUseSheets(printJob->printSession,windowRef,NULL);\n\t} */\n        \n\t//\tDisplay the Page Setup dialog.\t\n\tif (status == noErr)\n            {\n            void * giLocker;\n            giLocker = interpreterProxy->ioLoadFunctionFrom(\"getUIToLock\", \"\");\n            if (giLocker != 0) {\n                long *foo;\n                foo = malloc(sizeof(long)*6);\n                foo[0] = 3;\n                foo[1] = (long) PMSessionPageSetupDialog;\n                foo[2] =  (long)printJob->printSession;\n                foo[3] =  (long)printJob->pageFormat;\n                foo[4] =  (long)&accepted;\n                foo[5] = 0;\n                ((int (*) (void *)) giLocker)(foo);\n                status = foo[5];\n                free(foo);\n            } else\n                    status = PMSessionPageSetupDialog(printJob->printSession, printJob->pageFormat,\n                        &accepted);\n            \n            if (status == noErr && !accepted)\n                status = kPMCancel;\t\t// user clicked Cancel button\n            }\t\n\t\t\t\t\n\t//\tIf the user did not cancel, flatten and save the PageFormat object\n\t//\twith our document.\n\tif (status == noErr)\n            status = FlattenAndSavePageFormat(printJob);\n\n\treturn status;\n\t\n}\t//\tDoPageSetupDialog\n\n\n\n/*------------------------------------------------------------------------------\n\tFunction:\tDoPrintDialog\n\t\t\n\tParameters:\n\t\t\t\n\tDescription:\n\t\tIf the caller passes an empty PrintSettings object, DoPrintDialog creates\n\t\ta new one, otherwise it validates the one provided by the caller.\n\t\tIt then invokes the Print dialog and checks for Cancel.\n\t\tNote that the PrintSettings object is modified by this function.\n\t\t\n------------------------------------------------------------------------------*/\nOSStatus \tDoPrintDialog(PrintingLogicPtr printJob)\n{\n\tOSStatus\tstatus = noErr;\n\tBoolean\t\taccepted;\n\tUInt32\t\trealNumberOfPagesinDoc;\n\t\n\t//\tIn this sample code the caller provides a valid PageFormat reference but in\n\t//\tyour application you may want to load and unflatten the PageFormat object\n\t//\tthat was saved at PageSetup time.  See LoadAndUnflattenPageFormat below.\n\t\n\t//\tSet up a valid PrintSettings object.\n\tif (printJob->printSettings == kPMNoPrintSettings)\n            {\n            status = PMCreatePrintSettings(&printJob->printSettings);\t\n\n            //\tNote that PMPrintSettings is not session-specific, but calling\n            //\tPMSessionDefaultPrintSettings assigns values specific to the printer\n            //\tassociated with the current printing session.\n            if ((status == noErr) && (printJob->printSettings != kPMNoPrintSettings))\n                status = PMSessionDefaultPrintSettings(printJob->printSession, printJob->printSettings);\n            }\n\telse\n            status = PMSessionValidatePrintSettings(printJob->printSession, printJob->printSettings, kPMDontWantBoolean);\n\t\n\t//\tBefore displaying the Print dialog, we calculate the number of pages in the\n\t//\tdocument.  On Mac OS X this is useful because we can prime the Print dialog\n\t//\twith the actual page range of the document and prevent the user from entering\n\t//\tout-of-range numbers.  This is not possible on Mac OS 8 and 9 because the driver,\n\t//\tnot the printing manager, controls the page range fields in the Print dialog.\n\n\t//\tCalculate the number of pages required to print the entire document.\n\tif (status == noErr)\n            status = DetermineNumberOfPagesInDoc(&realNumberOfPagesinDoc,printJob);\n\n\t//\tSet a valid page range before displaying the Print dialog\n\tif (status == noErr)\n            status = PMSetPageRange(printJob->printSettings, 1, realNumberOfPagesinDoc);\n\n\t//\tDisplay the Print dialog.\n\tif (status == noErr)\n            {\n            void * giLocker;\n            giLocker = interpreterProxy->ioLoadFunctionFrom(\"getUIToLock\", \"\");\n            if (giLocker != 0) {\n                long *foo;\n                foo = malloc(sizeof(long)*7);\n                foo[0] = 4;\n                foo[1] =  (long)PMSessionPrintDialog;\n                foo[2] =  (long)printJob->printSession;\n                foo[3] =  (long)printJob->printSettings;\n                foo[4] =  (long)printJob->pageFormat;\n                foo[5] =  (long)&accepted;\n                foo[6] = 0;\n                ((int (*) (void *)) giLocker)(foo);\n                status = foo[6];\n                free(foo);\n            } else\n                status = PMSessionPrintDialog(printJob->printSession, printJob->printSettings,\n                        printJob->pageFormat, &accepted);\n            if (status == noErr && !accepted)\n                status = kPMCancel;\t\t// user clicked Cancel button\n            }\n\t\t\n\treturn status;\n\t\n}\t//\tDoPrintDialog\n\n\n/*------------------------------------------------------------------------------\n\tFunction:\n\t\tDoPrintLoop\n\t\n\tParameters:\n\t\n\tDescription:\n\t\tDoPrintLoop calculates which pages to print and executes the print\n\t\tloop, calling DrawPage for each page.\n\t\t\t\t\n------------------------------------------------------------------------------*/\nOSStatus DoPrintLoop(PrintingLogicPtr printJob)\n{\n    OSStatus\tstatus = noErr, tempErr;\n    GrafPtr\tcurrPort, printingPort;\n                 \n\t\n    //\tNote, we don't have to worry about the number of copies.  The printing\n    //\tmanager handles this.  So we just iterate through the document from the\n    //\tfirst page to be printed, to the last.\n\n    //\tNote, we don't have to deal with the classic Printing Manager's\n    //\t128-page boundary limit.\n                    \n    //\tSet up a page for printing.  Under the classic Printing Manager, applications\n    //\tcould provide a page rect different from the one in the print record to achieve\n    //\tscaling. This is no longer recommended and on Mac OS X, the PageRect argument\n    //\tis ignored.\n    \n\n    //\tSave the current QD grafport.\n    GetPort(&currPort);\n        \n    //\tGet the current graphics context, in this case a Quickdraw grafPort,\n    //\tfor drawing the page.\n    status = PMSessionGetGraphicsContext(printJob->printSession, \n            kPMGraphicsContextQuickdraw, (void**) &printingPort);\n    if (status == noErr) {\n        \n        //\tSet the printing port before drawing the page.\n        SetPort((GrafPtr) printingPort);\n                            \n        //\tDraw the page.\n        status = DrawPage(printJob);\n\n        //\tRestore the QD grafport.\n        SetPort(currPort);\n    }\n            \n    //\tOnly report a printing error once we have completed the print loop. This\n    //\tensures that every PMBeginXXX call that returns no error is followed by\n    //\ta matching PMEndXXX call, so the Printing Manager can release all temporary \n    //\tmemory and close properly.\n    tempErr = PMSessionError(printJob->printSession);\n    if(status == noErr)\n        status = tempErr;\n\n    if (status == kPMCancel) \n        status = noErr;\n            \n    return status;\n}\t//\tDoPrintLoop\n\n\n\n/*------------------------------------------------------------------------------\n\tFunction:\n\t\tFlattenAndSavePageFormat\n\t\n\tParameters:\n\t\tpageFormat\t-\ta PageFormat object\n\t\n\tDescription:\n\t\tFlattens a PageFormat object so it can be saved with the document.\n\t\tAssumes caller passes a validated PageFormat object.\n\t\t\n------------------------------------------------------------------------------*/\nOSStatus FlattenAndSavePageFormat(PrintingLogicPtr printJob)\n{\n    OSStatus\tstatus;\n    \n    printJob->flatFormatHandle = NULL;\n    \n    //\tFlatten the PageFormat object to memory.\n    status = PMFlattenPageFormat(printJob->pageFormat, &printJob->flatFormatHandle);\n\n    return status;\n}\t//\tFlattenAndSavePageFormat\n\n\n\n/*------------------------------------------------------------------------------\n    Function:\tLoadAndUnflattenPageFormat\n\t\n    Parameters:\n        pageFormat\t- PageFormat object read from document file\n\t\n    Description:\n        Gets flattened PageFormat data from the document and returns a PageFormat\n        object.\n        The function is not called in this sample code but your application\n        will need to retrieve PageFormat data saved with documents.\n\t\t\n------------------------------------------------------------------------------*/\nOSStatus\tLoadAndUnflattenPageFormat(PrintingLogicPtr printJob)\n{\n    OSStatus\tstatus = noErr;\n\n    if(printJob->flatFormatHandle){\n        //\tConvert the PageFormat flattened data into a PageFormat object.\n        status = PMUnflattenPageFormat(printJob->flatFormatHandle,&printJob->pageFormat);\n    }else{\n        printJob->pageFormat = kPMNoPageFormat;\n    }\n    \n    return status;\n}\t//\tLoadAndUnflattenPageFormat\n\n\n\n/*------------------------------------------------------------------------------\n    Function:\tDetermineNumberOfPagesInDoc\n\t\n    Parameters:\n    \tpageFormat\t- a PageFormat object addr\n        numPages\t- on return, the size of the document in pages\n\t\t\t\n    Description:\n    \tCalculates the number of pages needed to print the entire document.\n\t\t\n------------------------------------------------------------------------------*/\nOSStatus\tDetermineNumberOfPagesInDoc(UInt32 *numPages,PrintingLogicPtr printJob)\n{\n    OSStatus\tstatus;\n    PMRect\tpageRect;\n\n    //\tPMGetAdjustedPageRect returns the page size taking into account rotation,\n    //\tresolution and scaling settings.\n    status = PMGetAdjustedPageRect(printJob->pageFormat, &pageRect);\n\n    //\tIn this sample code we simply return a hard coded number.  In your application,\n    //\tyou will need to figure out how many page rects are needed to image the\n    //\tcurrent document.\n    *numPages = printJob->numberOfPages;\n\n    return status;\n    \n}\t//\tDetermineNumberOfPagesinDoc\n\n\n\n\n\n/*------------------------------------------------------------------------------\n    Function:\tIncludePostScriptInSpoolFile\n\t\n    Parameters:\n        printSession\t- current printing session\n\t\n    Description:\n    \tCheck if current printer driver supports embedding of PostScript in the spool file, and\n        if it does, instruct the Carbon Printing Manager to generate a PICT w/ PS spool file.\n                \t\t\n------------------------------------------------------------------------------*/\nBoolean IncludePostScriptInSpoolFile(PrintingLogicPtr printJob)\n{\n    Boolean\tincludePostScript = false;\n    OSStatus\tstatus;\n    CFArrayRef\tsupportedFormats = NULL;\n    SInt32\ti, numSupportedFormats;\n\n    // Get the list of spool file formats supported by the current driver.\n    // PMSessionGetDocumentFormatGeneration returns the list of formats which can be generated\n    // by the spooler (client-side) AND converted by the despooler (server-side).\n    // PMSessionGetDocumentFormatSupported only returns the list of formats which can be converted\n    // by the despooler.\n    \n    status = PMSessionGetDocumentFormatGeneration(printJob->printSession, &supportedFormats);\n    if (status == noErr)\n    {\n        // Check if PICT w/ PS is in the list of supported formats.\n        numSupportedFormats = CFArrayGetCount(supportedFormats);\n        \n        for (i=0; i < numSupportedFormats; i++)\n        {\n           /* if ( CFStringCompare(CFArrayGetValueAtIndex(supportedFormats, i),\n                kPMDocumentFormatPDF, kCFCompareCaseInsensitive) == kCFCompareEqualTo )\n                    return true;\n                    \n            if ( CFStringCompare(CFArrayGetValueAtIndex(supportedFormats, i),\n                kPMDocumentFormatPostScript, kCFCompareCaseInsensitive) == kCFCompareEqualTo )\n                    return true;*/\n                    \n            if ( CFStringCompare(CFArrayGetValueAtIndex(supportedFormats, i),\n                kPMDocumentFormatPICTPS, kCFCompareCaseInsensitive) == kCFCompareEqualTo )\n            {\n                // PICT w/ PS is supported, so tell the Printing Mgr to generate a PICT w/ PS spool file\n                \n                // Build an array of graphics contexts containing just one type, Quickdraw,\n                // meaning that we will be using a QD port to image our pages in the print loop.\n                CFStringRef\tstrings[1];\n                CFArrayRef\tarrayOfGraphicsContexts;\n\t\t\t\t\n                strings[0] = kPMGraphicsContextQuickdraw;\n                arrayOfGraphicsContexts = CFArrayCreate(kCFAllocatorDefault,\n                        (const void **)strings, 1, &kCFTypeArrayCallBacks);\n\t\t\t\t\t\t\t\t\t\t\n                if (arrayOfGraphicsContexts != NULL)\n                {\n                        // Request a PICT w/ PS spool file\n                        status = PMSessionSetDocumentFormatGeneration(printJob->printSession, kPMDocumentFormatPICTPS, \n                            arrayOfGraphicsContexts, NULL);\n\t\t\t\t\t\n                        if (status == noErr) {\n                             includePostScript = true;\t// Enable use of PS PicComments in DrawPage.\n                        }\n                        // Deallocate the array used for the list of graphics contexts.\n                            CFRelease(arrayOfGraphicsContexts);\n                }\n\t\tbreak;\n            }\n        }\n                    \n        // Deallocate the array used for the list of supported spool file formats.\n        CFRelease(supportedFormats);\n    }\n            \n    return includePostScript;\n}\t//\tIncludePostScriptInSpoolFile\n\n#else\nint ioPrintSetup(PrintingLogicPtr *token)\n{\n    OSStatus\t\tstatus = noErr;\n    PrintingLogicPtr printJob;\n   \n    printJob = *token = (PrintingLogicPtr) NewPtrClear(sizeof(PrintingLogic));\n    printJob->thePrRecHdl = (THPrint)  NewHandle (sizeof (TPrint));\n\tstatus = MemError();\n    if (status != noErr) \n        return -1;\t// pointless to continue if memory allocation fails\n    \n    //\tInitialize the printing manager and create a printing session.\n \tPrOpen(); //The PrOpen procedure prepares the current printer driver for use. \n \tstatus = PrError();\n    if (status != noErr) \n    \treturn status;\t\n \t\n \tPrintDefault(printJob->thePrRecHdl);\n\tstatus = PrError();\n    if (status != noErr) \n    \treturn status;\t\n\n\tPrValidate(printJob->thePrRecHdl);\n\tstatus = PrError();\n    if (status != noErr) \n    \treturn status;\t\n\n    //\tDisplay the Page Setup dialog.\n\tif (! PrStlDialog(printJob->thePrRecHdl)) \n  \t    goto cleanup; // user cancelled\n\n    \n    return status;\n    cleanup: \n    \tDisposeHandle ((Handle) printJob->thePrRecHdl);\n    \tprintJob->thePrRecHdl = NULL;\n    \treturn -4;\n}\n\nint ioPrintPreProcessing(PrintingLogicPtr printJob,int numberOfPages) {\n    OSStatus\t\tstatus = noErr;\n    UInt32\trealNumberOfPagesinDoc;\n        \n    if (printJob->thePrRecHdl == NULL) \n        return -1;\n        \n    printJob->numberOfPages = numberOfPages;\n    printJob->allowPostscript = false;\n    \n    if (!PrJobDialog(printJob->thePrRecHdl))\n    \treturn -2;\n    \n    if (status == noErr) {\n        //\tGet the user's Print dialog selection for first and last pages to print.\n        if (status == noErr)\n            { \n            TPPrint foo = *printJob->thePrRecHdl;\n            printJob->firstPage = foo->prJob.iFstPage;\n            printJob->lastPage =  foo->prJob.iLstPage;\n            }\n    \n        //\tCheck that the selected page range does not exceed the actual number of\n        //\tpages in the document.\n        if (status == noErr)\n            {\n            realNumberOfPagesinDoc = printJob->numberOfPages;\n            if (realNumberOfPagesinDoc < printJob->lastPage)\n                printJob->lastPage = realNumberOfPagesinDoc;\n            }\n        \n        //\tBegin a new print job.\n\t\tprintJob->thePrPort = PrOpenDoc(printJob->thePrRecHdl, nil, nil);\n\t\tstatus = PrError();\n        }\n\n    return status;\n}\n\nint ioPagePreProcessing(PrintingLogicPtr printJob) {                                               \n    OSStatus\t\tstatus = noErr;\n\n\tPrOpenPage(printJob->thePrPort, nil);\n \tstatus = PrError();\n    return status;\n}\n\nint ioPrint(PrintingLogicPtr printJob) {  \n    OSStatus\t\tstatus = noErr;\n\n    if (printJob->thePrRecHdl == NULL) \n        return -1;\n        \n    //\tExecute the print loop.\n    if (status == noErr)\n        status = DoPrintLoop(printJob);\n \n    if(status == kPMCancel)\n        status = noErr;\n        \n    return status;\n}\n\nint ioPagePostProcessing(PrintingLogicPtr printJob) {                                               \n    OSStatus\t\tstatus = noErr;\n    \n    //\tClose the page.\n\tPrClosePage(printJob->thePrPort);\n \tstatus = PrError();\n    return status;\n}\n\n\nint ioPrintPostProcessing(PrintingLogicPtr printJob) {                                                                \tOSStatus\tstatus = noErr;\n\n     // Close the print job.  This dismisses the progress dialog on Mac OS X.\n \tPrCloseDoc(printJob->thePrPort);\n \tstatus = PrError();\n    return status;\n}    \n\nint ioPrintGetFirstPageNumber(PrintingLogicPtr printJob){\n    if (printJob->thePrRecHdl == NULL) \n        return 0;\n    return printJob->firstPage;\n\n}\nint ioPrintGetLastPageNumber(PrintingLogicPtr printJob){\n    if (printJob->thePrRecHdl == NULL) \n        return 0;\n    return printJob->lastPage;\n}\n\n\nint ioPrintCleanup(PrintingLogicPtr *token) {                                                                \tPrintingLogicPtr printJob;\n    //\tRelease the PageFormat and PrintSettings objects.  PMRelease decrements the\n    //\tref count of the allocated objects.  We let the Printing Manager decide when\n    //\tto release the allocated memory.\n    \n    printJob = *token;\n    if (printJob == nil) \n        return 0;\n            \n    //\tTerminate the current printing session. \n\tPrClose();\n    \n    if(printJob->thePrRecHdl != NULL) \n \t\tDisposeHandle ((Handle) printJob->thePrRecHdl);\n   \t\n    printJob->thePrRecHdl = NULL;\n    DisposePtr((char*)printJob);\n    *token = nil;\n    \n    return 0;\n}\n\nOSStatus DoPrintLoop(PrintingLogicPtr printJob)\n{\n    OSStatus\tstatus = noErr;\n    GrafPtr\tcurrPort;\n                 \n    //\tSave the current QD grafport.\n    GetPort(&currPort);\n        \n    //\tGet the current graphics context, in this case a Quickdraw grafPort,\n    //\tfor drawing the page.\n    status = printJob->thePrPort == NULL ? -3 : noErr;\n    \n    if (status == noErr) {\n        \n        //\tSet the printing port before drawing the page.\n        SetPort((GrafPtr) printJob->thePrPort);\n                            \n        //\tDraw the page.\n        status = DrawPage(printJob);\n\n        //\tRestore the QD grafport.\n        SetPort(currPort);\n    }\n            \n    return status;\n}\t//\tDoPrintLoop\n\n#endif\n\nint ioInitPrintJob() {\n    SetUpPixmap();\n    return 1;\n}\n\nint ioShutdownPrintJob() {\n    FreePixmap();\n    return 1;\n}\n\nstatic Boolean RunningOnCarbonX(void)\n{\n    UInt32 response;\n    \n    return (Gestalt(gestaltSystemVersion, \n                    (SInt32 *) &response) == noErr)\n                && (response >= 0x01000);\n}\n\nint ioPagePostscript(PrintingLogicPtr printJob,char *postscript,int postscriptLength) {\n\n    printJob->postscript = postscript;\n    printJob->postscriptLength = postscriptLength;\n    printJob->formBitMap = NULL;\n    return ioPrint(printJob);\n}\n\nint ioPageForm(PrintingLogicPtr printJob, char *aBitMap,int h,int w,int d,float sh,float sw,int oh, int ow) {\n    printJob->formBitMap = aBitMap;\n    printJob->width = w;\n    printJob->height = h;\n    printJob->depth = d;\n    printJob->scaleH = sh;\n    printJob->scaleW = sw;\n    printJob->offsetHeight = oh;\n    printJob->offsetWidth = ow;\n    printJob->postscriptLength = 0;\n    return ioPrint(printJob);\n}\n\n/*------------------------------------------------------------------------------\n    Function:\tDrawPage\n\t\n    Parameters:\n\t\n    Description:\n        Draws the contents of a single page.  If allowPostscript is true, DrawPage\n        adds PostScript code into the spool file.  See the Printing chapter in\n        Inside Macintosh, Imaging with QuickDraw, for details about PostScript\n        PicComments.\n\t\t\n------------------------------------------------------------------------------*/\nOSStatus DrawPage(PrintingLogicPtr printJob)\n{\n    OSStatus status = noErr; \n    CGrafPtr  printerPort;\n    Rect\tdstRect = { 0, 0, 0, 0 };\n    Rect\tsrcRect = { 0, 0, 0, 0 };\n    \n    if (printJob->formBitMap != nil) {\n        dstRect.top = printJob->offsetHeight;\n        dstRect.left = printJob->offsetWidth;\n        dstRect.right = printJob->width*printJob->scaleW + printJob->offsetWidth;\n        dstRect.bottom = printJob->height*printJob->scaleH + printJob->offsetHeight;\n    \n        srcRect.right = printJob->width;\n        srcRect.bottom = printJob->height;\n\n        HLock((Handle)stPixMap);\n        (*stPixMap)->baseAddr = (void *) printJob->formBitMap;\n        (*stPixMap)->rowBytes = (((((printJob->width * printJob->depth) + 31) / 32) * 4) & 0x1FFF) | 0x8000;\n        (*stPixMap)->bounds = srcRect;\n        (*stPixMap)->pixelSize = printJob->depth;\n    \n        if (printJob->depth<=8) { \n            (*stPixMap)->cmpSize = printJob->depth;\n            (*stPixMap)->cmpCount = 1;\n        } else if (printJob->depth==16) {\n            (*stPixMap)->cmpSize = 5;\n            (*stPixMap)->cmpCount = 3;\n        } else if (printJob->depth==32) {\n            (*stPixMap)->cmpSize = 8;\n            (*stPixMap)->cmpCount = 3;\n        }\n\n        GetPort((GrafPtr *) &printerPort);\n        \n        if (RunningOnCarbonX()) {\n            CopyBits((BitMap *) *stPixMap, GetPortBitMapForCopyBits(printerPort), &srcRect, &dstRect, srcCopy, NULL);\n        } else {\n            GWorldPtr   aGWorld;\n            PixMapHandle thePix;\n            \n            NewGWorld(&aGWorld, printJob->depth, &srcRect, stColorTable, NULL, keepLocal+useTempMem);\n            thePix = GetGWorldPixMap (aGWorld);\n    \t    LockPixels(thePix);\n         \n            CopyBits((BitMap *) *stPixMap, (BitMap *) *thePix, &srcRect, &srcRect, srcCopy, NULL);\n            CopyBits((BitMap *) *thePix, GetPortBitMapForCopyBits(printerPort), &srcRect, &dstRect, srcCopy, NULL);\n    \t   \n    \t    UnlockPixels(thePix);\n            DisposeGWorld(aGWorld);\n        }\n        HUnlock((Handle)stPixMap);\n    }\n        \n#if TARGET_API_MAC_CARBON\t\n    //\tConditionally insert PostScript into the spool file.\n    if (printJob->allowPostscript && printJob->postscriptLength > 0) {\n         status = PMSessionPostScriptBegin(printJob->printSession);\n        if (status == noErr)\n        {\n            status = PMSessionPostScriptData(printJob->printSession, \n                    (char *)printJob->postscript,printJob->postscriptLength);\n            status = PMSessionPostScriptEnd(printJob->printSession);\n        }\n    }   \n#else\n\treturn PrError();\n#endif\n\t\t\n    return status;\n}\t//\tDrawPage\n\n\n\nstatic void SetUpPixmap(void) {\n\tint i, r, g, b;\n\n\tstColorTable = (CTabHandle) NewHandle(sizeof(ColorTable) + (256 * sizeof(ColorSpec)));\n\t(*stColorTable)->ctSeed = GetCTSeed();\n\t(*stColorTable)->ctFlags = 0;\n\t(*stColorTable)->ctSize = 255;\n\n\t/* 1-bit colors (monochrome) */\n\tSetColorEntry(0, 65535, 65535, 65535);\t/* white or transparent */\n\tSetColorEntry(1,     0,     0,     0);\t/* black */\n\n\t/* additional colors for 2-bit color */\n\tSetColorEntry(2, 65535, 65535, 65535);\t/* opaque white */\n\tSetColorEntry(3, 32768, 32768, 32768);\t/* 1/2 gray */\n\n\t/* additional colors for 4-bit color */\n\tSetColorEntry( 4, 65535,     0,     0);\t/* red */\n\tSetColorEntry( 5,     0, 65535,     0);\t/* green */\n\tSetColorEntry( 6,     0,     0, 65535);\t/* blue */\n\tSetColorEntry( 7,     0, 65535, 65535);\t/* cyan */\n\tSetColorEntry( 8, 65535, 65535,     0);\t/* yellow */\n\tSetColorEntry( 9, 65535,     0, 65535);\t/* magenta */\n\tSetColorEntry(10,  8192,  8192,  8192);\t/* 1/8 gray */\n\tSetColorEntry(11, 16384, 16384, 16384);\t/* 2/8 gray */\n\tSetColorEntry(12, 24576, 24576, 24576);\t/* 3/8 gray */\n\tSetColorEntry(13, 40959, 40959, 40959);\t/* 5/8 gray */\n\tSetColorEntry(14, 49151, 49151, 49151);\t/* 6/8 gray */\n\tSetColorEntry(15, 57343, 57343, 57343);\t/* 7/8 gray */\n\n\t/* additional colors for 8-bit color */\n\t/* 24 more shades of gray (does not repeat 1/8th increments) */\n\tSetColorEntry(16,  2048,  2048,  2048);\t/*  1/32 gray */\n\tSetColorEntry(17,  4096,  4096,  4096);\t/*  2/32 gray */\n\tSetColorEntry(18,  6144,  6144,  6144);\t/*  3/32 gray */\n\tSetColorEntry(19, 10240, 10240, 10240);\t/*  5/32 gray */\n\tSetColorEntry(20, 12288, 12288, 12288);\t/*  6/32 gray */\n\tSetColorEntry(21, 14336, 14336, 14336);\t/*  7/32 gray */\n\tSetColorEntry(22, 18432, 18432, 18432);\t/*  9/32 gray */\n\tSetColorEntry(23, 20480, 20480, 20480);\t/* 10/32 gray */\n\tSetColorEntry(24, 22528, 22528, 22528);\t/* 11/32 gray */\n\tSetColorEntry(25, 26624, 26624, 26624);\t/* 13/32 gray */\n\tSetColorEntry(26, 28672, 28672, 28672);\t/* 14/32 gray */\n\tSetColorEntry(27, 30720, 30720, 30720);\t/* 15/32 gray */\n\tSetColorEntry(28, 34815, 34815, 34815);\t/* 17/32 gray */\n\tSetColorEntry(29, 36863, 36863, 36863);\t/* 18/32 gray */\n\tSetColorEntry(30, 38911, 38911, 38911);\t/* 19/32 gray */\n\tSetColorEntry(31, 43007, 43007, 43007);\t/* 21/32 gray */\n\tSetColorEntry(32, 45055, 45055, 45055);\t/* 22/32 gray */\n\tSetColorEntry(33, 47103, 47103, 47103);\t/* 23/32 gray */\n\tSetColorEntry(34, 51199, 51199, 51199);\t/* 25/32 gray */\n\tSetColorEntry(35, 53247, 53247, 53247);\t/* 26/32 gray */\n\tSetColorEntry(36, 55295, 55295, 55295);\t/* 27/32 gray */\n\tSetColorEntry(37, 59391, 59391, 59391);\t/* 29/32 gray */\n\tSetColorEntry(38, 61439, 61439, 61439);\t/* 30/32 gray */\n\tSetColorEntry(39, 63487, 63487, 63487);\t/* 31/32 gray */\n\n\t/* The remainder of color table defines a color cube with six steps\n\t   for each primary color. Note that the corners of this cube repeat\n\t   previous colors, but simplifies the mapping between RGB colors and\n\t   color map indices. This color cube spans indices 40 through 255.\n\t*/\n\tfor (r = 0; r < 6; r++) {\n\t\tfor (g = 0; g < 6; g++) {\n\t\t\tfor (b = 0; b < 6; b++) {\n\t\t\t\ti = 40 + ((36 * r) + (6 * b) + g);\n\t\t\t\tSetColorEntry(i, (r * 65535) / 5, (g * 65535) / 5, (b * 65535) / 5);\n\t\t\t}\n\t\t}\n\t}\n\n\tstPixMap = NewPixMap();\n\t(*stPixMap)->pixelType = 0; /* chunky */\n\t(*stPixMap)->cmpCount = 1;\n\t(*stPixMap)->pmTable = stColorTable;\n}\n\nstatic void SetColorEntry(int index, int red, int green, int blue) {\n\t(*stColorTable)->ctTable[index].value = index;\n\t(*stColorTable)->ctTable[index].rgb.red = red;\n\t(*stColorTable)->ctTable[index].rgb.green = green;\n\t(*stColorTable)->ctTable[index].rgb.blue = blue;\n}\n\nstatic void FreePixmap(void) {\n\tif (stPixMap != nil) {\n\t\tDisposePixMap(stPixMap);\n\t\tstPixMap = nil;\n\t}\n\n\tif (stColorTable != nil) {\n\t\t//JMM disposepixmap does this DisposeHandle((void *) stColorTable);\n\t\tstColorTable = nil;\n\t}\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/PrintJobPlugin/sqMacPrinting.h",
    "content": "/****************************************************************************\n*   PROJECT: Mac printing\n*   FILE:    sqMacPrinting.h\n*   CONTENT: \n*\n*   AUTHOR:  John McIntosh.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacPrinting.h 210 2002-02-20 21:02:40Z johnmci $\n*\n*   NOTES: \n*\n*****************************************************************************/\n#if defined(__MWERKS__)\n\t#include <PMApplication.h>\n#else\n\t#if TARGET_API_MAC_CARBON\t\n#include <Carbon/Carbon.h>\n\t#else\n\t#endif\n#endif\n\ntypedef struct {\n\tUInt32\tnumberOfPages;\n        UInt32\tcurrentPage;\n        UInt32\tfirstPage;\n        UInt32\tlastPage;\n        Boolean\tallowPostscript;\n        void \t*formBitMap;\n        long\twidth;\n        long\theight;\n        long\tdepth;\n        float\tscaleW;\n        float\tscaleH;\n        long\toffsetWidth;\n        long\toffsetHeight;\n        void\t*postscript;\n        UInt32\tpostscriptLength;\n#if TARGET_API_MAC_CARBON\t\n        Handle \tflatFormatHandle;\n        PMPrintSession printSession;\n        PMPageFormat\tpageFormat;\n        PMPrintSettings printSettings;\n#else\n\t    THPrint\t\tthePrRecHdl;\n\t\tTPPrPort\tthePrPort;\n#endif\n}  PrintingLogic, *PrintingLogicPtr;\n\n\nint ioPrintSetup(PrintingLogicPtr  *printJob);\nint ioPrintPreProcessing(PrintingLogicPtr printJob,int numberOfPages);\nint ioPrint(PrintingLogicPtr printJob);\nint ioPrintPostProcessing(PrintingLogicPtr printJob);\nint ioPrintCleanup(PrintingLogicPtr *printJob);\nint ioInitPrintJob(void);\nint ioShutdownPrintJob(void);\nint ioPagePreProcessing(PrintingLogicPtr printJob);\nint ioPagePostProcessing(PrintingLogicPtr printJob);\nint ioPagePostscript(PrintingLogicPtr printJob,char *postscript,int postscriptLength);\nint ioPageForm(PrintingLogicPtr printJob, char *aBitMap,int h,int w,int d,float sh,float sw,int oh,int ow);\nint ioPrintGetFirstPageNumber(PrintingLogicPtr printJob);\nint ioPrintGetLastPageNumber(PrintingLogicPtr printJob);\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/QuicktimePlugin/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>QuicktimePlugin</string>\n\t<key>CFBundleIconFile</key>\n\t<string>SqueakPlugin.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.QuicktimePlugin</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0.1b1</string>\n\t<key>CFBundleSignature</key>\n\t<string>FAST</string>\n\t<key>CFBundleVersion</key>\n\t<string>1.0.1b1</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/QuicktimePlugin/JMMMacQuicktimePlugin.3.cs",
    "content": "'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 16 March 2006 at 11:58:44 am'!\rSmalltalk renameClassNamed: #MacQuicktimePlugin as: #QuicktimePlugin!\rSmartSyntaxInterpreterPlugin subclass: #QuicktimePlugin\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'VMMaker-Plugins'!\r\r!QuicktimePlugin methodsFor: 'system primitives' stamp: 'JMM 1/17/2006 15:53'!\rinitialiseModule\r\tself export: true.\r\t^self sqQuicktimeInitialize ! !\r\r!QuicktimePlugin methodsFor: 'system primitives' stamp: 'JMM 1/17/2006 15:53'!\rmoduleUnloaded: aModuleName \r\t\"The module with the given name was just unloaded. \r\tMake sure we have no dangling references.\"\r\tself export: true.\r\tself var: #aModuleName type: 'char *'.\r\t(aModuleName strcmp: 'QuicktimePlugin') = 0\r\t\tifTrue: [self sqQuicktimeShutdown]! !\r\r!QuicktimePlugin methodsFor: 'system primitives' stamp: 'JMM 1/17/2006 23:05'!\rprimitiveClearFrameCompletedSemaphore: data\r\r\tself primitive: 'primitiveClearFrameCompletedSemaphore' parameters: #(SmallInteger).\r\tself stQuicktimeClearSemaphore: data.\r\t^nil! !\r\r!QuicktimePlugin methodsFor: 'system primitives' stamp: 'JMM 1/17/2006 23:05'!\rprimitiveDestroyHandle: data \r\r\tself primitive: 'primitiveDestroyHandle' parameters: #(SmallInteger).\r\tself stQuicktimeDestroy: data.\r\t^nil! !\r\r!QuicktimePlugin methodsFor: 'system primitives' stamp: 'JMM 3/16/2006 09:32'!\rprimitiveDestroySurface: data \r\r\tself primitive: 'primitiveDestroySurface' parameters: #(SmallInteger).\r\tself stQuicktimeDestroySurface: data.\r\t^nil! !\r\r!QuicktimePlugin methodsFor: 'system primitives' stamp: 'JMM 1/17/2006 23:06'!\rprimitiveSetFrameCompletedSemaphore: semaIndex for: data\r\r\tself primitive: 'primitiveSetFrameCompletedSemaphore'  parameters:#(SmallInteger SmallInteger).\r\tself stQuicktimeSetSemaphore: semaIndex for: data.\r\t^nil! !\r\r!QuicktimePlugin methodsFor: 'system primitives' stamp: 'JMM 3/16/2006 11:30'!\rprimitiveSetGWorldPtrOntoExistingSurface: surfaceID gWorld: bitMapPtr width: width height: height rowBytes: rowBytes depth: depth movie: moviePtr\r\t| buffer movie |\r\r\tself primitive: 'primitiveSetGWorldPtrOntoExistingSurface'  parameters:#(SmallInteger Oop SmallInteger SmallInteger SmallInteger SmallInteger Oop).\r\tbuffer := self cCoerce: (interpreterProxy positive32BitValueOf: bitMapPtr) to: 'char *'.\r\tmovie := self cCoerce: (interpreterProxy positive32BitValueOf: moviePtr) to: 'long'.\r\tself stQuicktimeSetToExistingSurface: surfaceID gworld: buffer width: width height: height rowBytes: rowBytes depth: depth movie: movie.\r\t! !\r\r!QuicktimePlugin methodsFor: 'system primitives' stamp: 'JMM 3/16/2006 11:30'!\rprimitiveSetGWorldPtrOntoSurface: bitMapPtr width: width height: height rowBytes: rowBytes depth: depth movie: moviePtr\r\t| buffer movie results |\r\r\tself primitive: 'primitiveSetGWorldPtrOntoSurface'  parameters:#(Oop SmallInteger SmallInteger SmallInteger SmallInteger Oop).\r\tbuffer := self cCoerce: (interpreterProxy positive32BitValueOf: bitMapPtr) to: 'char *'.\r\tmovie := self cCoerce: (interpreterProxy positive32BitValueOf: moviePtr) to: 'long'.\r\tresults := self stQuicktimeSetSurface: buffer width: width height: height rowBytes: rowBytes depth: depth movie: movie.\r\t^results asOop: SmallInteger ! !\r\r\r!QuicktimePlugin class methodsFor: 'translation' stamp: 'JMM 1/17/2006 20:24'!\rhasHeaderFile\r\t\"If there is a single intrinsic header file to be associated with the plugin, here is where you want to flag\"\r\t^true! !\r\r!QuicktimePlugin class methodsFor: 'translation' stamp: 'JMM 1/17/2006 20:24'!\rrequiresCrossPlatformFiles\r\t\"If there is a single intrinsic header file to be associated with the plugin, here is where you want to flag\"\r\t^true! !\r\r\r!QuicktimePlugin class reorganize!\r('translation' hasHeaderFile requiresCrossPlatformFiles)\r!\r\rQuicktimePlugin removeSelector: #primitiveClearFrameCompletedSemaphore!\rQuicktimePlugin removeSelector: #primitiveDestoryHandle:!\rQuicktimePlugin removeSelector: #primitiveSetFrameCompletedSemaphore:!\rQuicktimePlugin removeSelector: #primitiveSetGWorldPtrOntoSurface:width:height:!\rQuicktimePlugin removeSelector: #primitiveSetGWorldPtrOntoSurface:width:height:rowBytes:!\rQuicktimePlugin removeSelector: #primitiveSetGWorldPtrOntoSurface:width:height:rowBytes:depth:!\r\r!QuicktimePlugin reorganize!\r('system primitives' initialiseModule moduleUnloaded: primitiveClearFrameCompletedSemaphore: primitiveDestroyHandle: primitiveDestroySurface: primitiveSetFrameCompletedSemaphore:for: primitiveSetGWorldPtrOntoExistingSurface:gWorld:width:height:rowBytes:depth:movie: primitiveSetGWorldPtrOntoSurface:width:height:rowBytes:depth:movie:)\r!\r\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/QuicktimePlugin/PkgInfo",
    "content": "BNDLFAST"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/QuicktimePlugin/SqueakQuicktime.xcodeproj/johnmci.mode1",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>ActivePerspectiveName</key>\n\t<string>Project</string>\n\t<key>AllowedModules</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Groups and Files Outline View</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCTaskListModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Task List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDetailModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>File and Smart Group Detail Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Detailed Build Results Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Batch Find Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Run Log</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXCVSModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Source Code Control Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Breakpoints Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDockableInspector</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Inspector</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXOpenQuicklyModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Open Quickly Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Console</string>\n\t\t</dict>\n\t</array>\n\t<key>Description</key>\n\t<string>DefaultDescriptionKey</string>\n\t<key>DockingSystemVisible</key>\n\t<false/>\n\t<key>Extension</key>\n\t<string>mode1</string>\n\t<key>FavBarConfig</key>\n\t<dict>\n\t\t<key>PBXProjectModuleGUID</key>\n\t\t<string>94AF35A4084782DD00FA5ACB</string>\n\t\t<key>XCBarModuleItemNames</key>\n\t\t<dict/>\n\t\t<key>XCBarModuleItems</key>\n\t\t<array/>\n\t</dict>\n\t<key>FirstTimeWindowDisplayed</key>\n\t<false/>\n\t<key>Identifier</key>\n\t<string>com.apple.perspectives.project.mode1</string>\n\t<key>MajorVersion</key>\n\t<integer>31</integer>\n\t<key>MinorVersion</key>\n\t<integer>1</integer>\n\t<key>Name</key>\n\t<string>Default</string>\n\t<key>Notifications</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>XCObserverAutoDisconnectKey</key>\n\t\t\t<true/>\n\t\t\t<key>XCObserverDefintionKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusErrorsKey</key>\n\t\t\t\t<integer>0</integer>\n\t\t\t</dict>\n\t\t\t<key>XCObserverFactoryKey</key>\n\t\t\t<string>XCPerspectivesSpecificationIdentifier</string>\n\t\t\t<key>XCObserverGUIDKey</key>\n\t\t\t<string>XCObserverProjectIdentifier</string>\n\t\t\t<key>XCObserverNotificationKey</key>\n\t\t\t<string>PBXStatusBuildStateMessageNotification</string>\n\t\t\t<key>XCObserverTargetKey</key>\n\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t<key>XCObserverTriggerKey</key>\n\t\t\t<string>awakenModuleWithObserver:</string>\n\t\t\t<key>XCObserverValidationKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusErrorsKey</key>\n\t\t\t\t<integer>2</integer>\n\t\t\t</dict>\n\t\t</dict>\n\t</array>\n\t<key>OpenEditors</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>Content</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t<string>94ECA626097E2D7F00C2C7BA</string>\n\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t<string>Movies.h</string>\n\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>94ECA627097E2D7F00C2C7BA</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Movies.h</string>\n\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t<string>9491968C09804F6D000FC37A</string>\n\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>94ECA675097EC7CE00C2C7BA</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t<string>1</string>\n\t\t\t\t</dict>\n\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t<true/>\n\t\t\t</dict>\n\t\t\t<key>Geometry</key>\n\t\t\t<dict>\n\t\t\t\t<key>Frame</key>\n\t\t\t\t<string>{{0, 20}, {1364, 623}}</string>\n\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t<false/>\n\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t<string>15 209 1364 664 0 0 1440 878 </string>\n\t\t\t</dict>\n\t\t</dict>\n\t</array>\n\t<key>PerspectiveWidths</key>\n\t<array>\n\t\t<integer>-1</integer>\n\t\t<integer>-1</integer>\n\t</array>\n\t<key>Perspectives</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>ChosenToolbarItems</key>\n\t\t\t<array>\n\t\t\t\t<string>active-target-popup</string>\n\t\t\t\t<string>active-buildstyle-popup</string>\n\t\t\t\t<string>action</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>buildOrClean</string>\n\t\t\t\t<string>build-and-runOrDebug</string>\n\t\t\t\t<string>com.apple.ide.PBXToolbarStopButton</string>\n\t\t\t\t<string>get-info</string>\n\t\t\t\t<string>toggle-editor</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>com.apple.pbx.toolbar.searchfield</string>\n\t\t\t</array>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProjectWithEditor</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.project</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<true/>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>339</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>66DF6BFE01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66B8BC570381F53800A8011A</string>\n\t\t\t\t\t\t\t\t<string>66DF6BFF01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66DF6C3901D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>944D6212085F458100600D6E</string>\n\t\t\t\t\t\t\t\t<string>944D6213085F458100600D6E</string>\n\t\t\t\t\t\t\t\t<string>66DF6C4501D7DEEE00A80119</string>\n\t\t\t\t\t\t\t\t<string>943173AF085CD38900DDDC64</string>\n\t\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>3</integer>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {339, 671}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {356, 689}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>339</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>338 54 1011 730 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>356pt</string>\n\t\t\t\t</dict>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>QuicktimePlugin.h</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CE0B20406471E060097A5F4</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>QuicktimePlugin.h</string>\n\t\t\t\t\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>944D6240085F473000600D6E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94ECA500097E16B400C2C7BA</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94ECA55F097E1D2B00C2C7BA</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t\t<key>prevStack</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>949CD5C5085CC32700EB8605</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94ECA4AA097E137A00C2C7BA</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94ECA566097E1D2B00C2C7BA</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {650, 626}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>338 54 1011 730 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>626pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 631}, {650, 58}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>338 54 1011 730 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>58pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>650pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>9491968A09804F6D000FC37A</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>9491968B09804F6D000FC37A</string>\n\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProject</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.morph</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>29B97314FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 337}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 355}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>373 269 690 397 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Morph</string>\n\t\t\t<key>PreferredWidth</key>\n\t\t\t<integer>300</integer>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default.short</string>\n\t\t</dict>\n\t</array>\n\t<key>PerspectivesBarVisible</key>\n\t<false/>\n\t<key>ShelfIsVisible</key>\n\t<false/>\n\t<key>SourceDescription</key>\n\t<string>file at '/System/Library/PrivateFrameworks/DevToolsInterface.framework/Versions/A/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string>\n\t<key>StatusbarIsVisible</key>\n\t<true/>\n\t<key>TimeStamp</key>\n\t<real>159403871.59758699</real>\n\t<key>ToolbarDisplayMode</key>\n\t<integer>1</integer>\n\t<key>ToolbarIsVisible</key>\n\t<true/>\n\t<key>ToolbarSizeMode</key>\n\t<integer>2</integer>\n\t<key>Type</key>\n\t<string>Perspectives</string>\n\t<key>UpdateMessage</key>\n\t<string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the \"Metro-Morph\" feature).  You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature.  Do you wish to update to the latest Workspace defaults for project '%@'?</string>\n\t<key>WindowJustification</key>\n\t<integer>5</integer>\n\t<key>WindowOrderList</key>\n\t<array>\n\t\t<string>9491969409804F6D000FC37A</string>\n\t\t<string>94ECA626097E2D7F00C2C7BA</string>\n\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t<string>/Users/johnmci/Documents/Squeak3.8.0/platforms/Mac OS/plugins/QuicktimePlugin/SqueakQuicktime.xcodeproj</string>\n\t</array>\n\t<key>WindowString</key>\n\t<string>338 54 1011 730 0 0 1440 878 </string>\n\t<key>WindowTools</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.build</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>sqMacQuicktimeInteface.c</string>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {879, 326}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>91 68 879 795 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>326pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Build</string>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Collapse</key>\n\t\t\t\t\t\t\t\t<integer>1021</integer>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Open</key>\n\t\t\t\t\t\t\t\t<integer>1012</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 331}, {879, 423}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>91 68 879 795 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>423pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>754pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Build Results</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>94E4F4CD08D0A1CA00B9E724</string>\n\t\t\t\t<string>94ECA4AC097E137A00C2C7BA</string>\n\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.build</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>91 68 879 795 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>94E4F4CD08D0A1CA00B9E724</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugger</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Debugger</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {296, 309}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 309}, {296, 395}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {296, 704}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{296, 0}, {846, 704}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debug - GLUTExamples (Underwater)</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>DebugConsoleDrawerSize</key>\n\t\t\t\t\t\t\t\t<string>{100, 120}</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleVisible</key>\n\t\t\t\t\t\t\t\t<string>None</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>DebugSTDIOWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1142, 704}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>196 68 1142 745 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>704pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>704pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t\t<string>9491968E09804F6D000FC37A</string>\n\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t<string>9491968F09804F6D000FC37A</string>\n\t\t\t\t<string>9491969009804F6D000FC37A</string>\n\t\t\t\t<string>9491969109804F6D000FC37A</string>\n\t\t\t\t<string>9491969209804F6D000FC37A</string>\n\t\t\t\t<string>9491969309804F6D000FC37A</string>\n\t\t\t\t<string>9491969409804F6D000FC37A</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debug</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>196 68 1142 745 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.find</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>QuicktimePlugin.h</string>\n\t\t\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {791, 416}}</string>\n\t\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t\t<string>51 90 791 674 0 0 1440 878 </string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t\t\t<string>791pt</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>416pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Project Find</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 421}, {791, 212}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>51 90 791 674 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>212pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>633pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Find</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t\t<string>94ECA513097E178F00C2C7BA</string>\n\t\t\t\t<string>94ECA514097E178F00C2C7BA</string>\n\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>51 90 791 674 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>MENUSEPARATOR</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debuggerConsole</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debugger Console</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {686, 500}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>635 113 686 541 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>500pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>500pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger Console</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>94ABA92F0858D3A300079BE1</string>\n\t\t\t\t<string>94ECA4B1097E13C500C2C7BA</string>\n\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>635 113 686 541 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>94ABA92F0858D3A300079BE1</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.run</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>3</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528B0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Run</string>\n\t\t\t\t\t\t\t\t<key>Runner</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {493, 167}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 176}, {493, 267}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {405, 443}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{414, 0}, {514, 443}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {460, 159}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>316 696 459 200 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>159pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>159pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Run Log</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2B3069F1EA900FABCE6</string>\n\t\t\t\t<string>1C0AD2B4069F1EA900FABCE6</string>\n\t\t\t\t<string>1CD0528B0623707200166675</string>\n\t\t\t\t<string>1C0AD2B5069F1EA900FABCE6</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.run</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>316 696 459 200 0 0 1280 1002 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2B3069F1EA900FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.scm</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1C78EAB3065D492600B07095</string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>0pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>SCM</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ConsoleFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 259}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 7}, {452, 259}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t\t<key>TableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>Status</string>\n\t\t\t\t\t\t\t\t\t<real>30</real>\n\t\t\t\t\t\t\t\t\t<string>FileName</string>\n\t\t\t\t\t\t\t\t\t<real>199</real>\n\t\t\t\t\t\t\t\t\t<string>Path</string>\n\t\t\t\t\t\t\t\t\t<real>197.09500122070312</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>TableFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 250}}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>262pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>266pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>SCM</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAB4065D492600B07095</string>\n\t\t\t\t<string>1C78EAB5065D492600B07095</string>\n\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.scm</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.breakpoints</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t\t\t<string>no</string>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {168, 350}}</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t\t\t<false/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {185, 368}}</string>\n\t\t\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>185pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{190, 0}, {554, 368}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>554pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>368pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>MajorVersion</key>\n\t\t\t<integer>2</integer>\n\t\t\t<key>MinorVersion</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Name</key>\n\t\t\t<string>Breakpoints</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CDDB66807F98D9800BB5817</string>\n\t\t\t\t<string>1CDDB66907F98D9800BB5817</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.breakpoints</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CDDB66807F98D9800BB5817</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugAnimator</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Visualizer</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugAnimator</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>100 100 700 500 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.bookmarks</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>538 42 401 187 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.classBrowser</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>OptionsSetName</key>\n\t\t\t\t\t\t\t\t<string>Hierarchy, all classes</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Class Browser - NSObject</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ClassesFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {378, 96}}</string>\n\t\t\t\t\t\t\t\t<key>ClassesTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXClassNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>208</real>\n\t\t\t\t\t\t\t\t\t<string>PBXClassBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {630, 332}}</string>\n\t\t\t\t\t\t\t\t<key>MembersFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 101}, {378, 231}}</string>\n\t\t\t\t\t\t\t\t<key>MembersTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeIconColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>216</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>101</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>312 384 630 352 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>332pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>332pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<false/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t\t<string>949CD652085CD34000EB8605</string>\n\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.classbrowser</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>312 384 630 352 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/QuicktimePlugin/SqueakQuicktime.xcodeproj/johnmci.pbxuser",
    "content": "// !$*UTF8*$!\n{\n\t66B8BC5A0381F63A00A8011A /* sqPlatformSpecific.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1064, 2114}}\";\n\t\t\tsepNavSelRange = \"{1454, 21}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {609, 594}}\";\n\t\t};\n\t};\n\t66B8BC5C0381F66500A8011A /* sq.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {740, 6117}}\";\n\t\t\tsepNavSelRange = \"{16850, 24}\";\n\t\t\tsepNavVisRect = \"{{0, 5935}, {740, 73}}\";\n\t\t};\n\t};\n\t66B8BC5E0381F69100A8011A /* sqVirtualMachine.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {866, 3010}}\";\n\t\t\tsepNavSelRange = \"{518, 32}\";\n\t\t\tsepNavVisRect = \"{{0, 73}, {711, 429}}\";\n\t\t\tsepNavWindowFrame = \"{{84, 252}, {750, 558}}\";\n\t\t};\n\t};\n\t66C6C8E501DB1EC300A80109 /* SqueakPlugin.icns */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavWindowFrame = \"{{15, 153}, {1364, 720}}\";\n\t\t};\n\t};\n\t66DF6BFD01D7DCEA00A80119 /* Project object */ = {\n\t\tactiveBuildConfigurationName = Development;\n\t\tactiveBuildStyle = 66DF6C4301D7DCEA00A80119 /* Development */;\n\t\tactiveExecutable = 94ABA91E0858D35E00079BE1 /* Squeak */;\n\t\tactiveTarget = 94AF34E00846F91100FA5ACB /* QuicktimePlugin */;\n\t\taddToTargets = (\n\t\t\t94AF34E00846F91100FA5ACB /* QuicktimePlugin */,\n\t\t);\n\t\tbreakpoints = (\n\t\t);\n\t\tcodeSenseManager = 9444E60E06E7B8740063F6CC /* Code sense */;\n\t\texecutables = (\n\t\t\t94ABA91E0858D35E00079BE1 /* Squeak */,\n\t\t);\n\t\texpressions = (\n\t\t\tbuffer,\n\t\t);\n\t\tperUserDictionary = {\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXErrorsWarningsDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXErrorsWarningsDataSource_LocationID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t300,\n\t\t\t\t\t200,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXErrorsWarningsDataSource_TypeID,\n\t\t\t\t\tPBXErrorsWarningsDataSource_MessageID,\n\t\t\t\t\tPBXErrorsWarningsDataSource_LocationID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXExecutablesDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXExecutablesDataSource_NameID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t22,\n\t\t\t\t\t300,\n\t\t\t\t\t299,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXExecutablesDataSource_ActiveFlagID,\n\t\t\t\t\tPBXExecutablesDataSource_NameID,\n\t\t\t\t\tPBXExecutablesDataSource_CommentsID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t411,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t\t20,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Target_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXFindDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFindDataSource_LocationID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t200,\n\t\t\t\t\t425.2085,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFindDataSource_MessageID,\n\t\t\t\t\tPBXFindDataSource_LocationID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t200,\n\t\t\t\t\t63,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXTargetDataSource_PrimaryAttribute,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXPerProjectTemplateStateSaveDate = 159403871;\n\t\t\tPBXPrepackagedSmartGroups_v2 = (\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tactivationKey = OldTargetSmartGroup;\n\t\t\t\t\tclz = PBXTargetSmartGroup;\n\t\t\t\t\tdescription = \"Displays all targets of the project.\";\n\t\t\t\t\tglobalID = 1C37FABC04509CD000000102;\n\t\t\t\t\tname = Targets;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = Targets;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXTargetSmartGroup2;\n\t\t\t\t\tdescription = \"Displays all targets of the project as well as nested build phases.\";\n\t\t\t\t\tglobalID = 1C37FBAC04509CD000000102;\n\t\t\t\t\tname = Targets;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = Targets;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXExecutablesSmartGroup;\n\t\t\t\t\tdescription = \"Displays all executables of the project.\";\n\t\t\t\t\tglobalID = 1C37FAAC04509CD000000102;\n\t\t\t\t\tname = Executables;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = Executable;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\" PBXTransientLocationAtTop \" = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXErrorsWarningsSmartGroup;\n\t\t\t\t\tdescription = \"Displays files with errors or warnings.\";\n\t\t\t\t\tglobalID = 1C08E77C0454961000C914BD;\n\t\t\t\t\tname = \"Errors and Warnings\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\tfnmatch = \"\";\n\t\t\t\t\t\timage = WarningsErrors;\n\t\t\t\t\t\trecursive = 1;\n\t\t\t\t\t\tregex = \"\";\n\t\t\t\t\t\troot = \"<PROJECT>\";\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXFilenameSmartGroup;\n\t\t\t\t\tdescription = \"Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter.\";\n\t\t\t\t\tglobalID = 1CC0EA4004350EF90044410B;\n\t\t\t\t\tname = \"Implementation Files\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\tcanSave = 1;\n\t\t\t\t\t\tfnmatch = \"\";\n\t\t\t\t\t\timage = SmartFolder;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t\trecursive = 1;\n\t\t\t\t\t\tregex = \"?*\\\\.[mcMC]\";\n\t\t\t\t\t\troot = \"<PROJECT>\";\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXFilenameSmartGroup;\n\t\t\t\t\tdescription = \"This group displays Interface Builder NIB Files.\";\n\t\t\t\t\tglobalID = 1CC0EA4004350EF90041110B;\n\t\t\t\t\tname = \"NIB Files\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\tcanSave = 1;\n\t\t\t\t\t\tfnmatch = \"*.nib\";\n\t\t\t\t\t\timage = SmartFolder;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t\trecursive = 1;\n\t\t\t\t\t\tregex = \"\";\n\t\t\t\t\t\troot = \"<PROJECT>\";\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = no;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXFindSmartGroup;\n\t\t\t\t\tdescription = \"Displays Find Results.\";\n\t\t\t\t\tglobalID = 1C37FABC05509CD000000102;\n\t\t\t\t\tname = \"Find Results\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = spyglass;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = no;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXBookmarksSmartGroup;\n\t\t\t\t\tdescription = \"Displays Project Bookmarks.\";\n\t\t\t\t\tglobalID = 1C37FABC05539CD112110102;\n\t\t\t\t\tname = Bookmarks;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = Bookmarks;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = XCSCMSmartGroup;\n\t\t\t\t\tdescription = \"Displays files with interesting SCM status.\";\n\t\t\t\t\tglobalID = E2644B35053B69B200211256;\n\t\t\t\t\tname = SCM;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = PBXRepository;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXSymbolsSmartGroup;\n\t\t\t\t\tdescription = \"Displays all symbols for the project.\";\n\t\t\t\t\tglobalID = 1C37FABC04509CD000100104;\n\t\t\t\t\tname = \"Project Symbols\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = ProjectSymbols;\n\t\t\t\t\t\tisLeaf = 1;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXFilenameSmartGroup;\n\t\t\t\t\tdescription = \"Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter.\";\n\t\t\t\t\tglobalID = PBXTemplateMarker;\n\t\t\t\t\tname = \"Simple Filter SmartGroup\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\tcanSave = 1;\n\t\t\t\t\t\tfnmatch = \"*.nib\";\n\t\t\t\t\t\timage = SmartFolder;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t\trecursive = 1;\n\t\t\t\t\t\tregex = \"\";\n\t\t\t\t\t\troot = \"<PROJECT>\";\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXFilenameSmartGroup;\n\t\t\t\t\tdescription = \"Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter.\";\n\t\t\t\t\tglobalID = PBXTemplateMarker;\n\t\t\t\t\tname = \"Simple Regular Expression SmartGroup\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\tcanSave = 1;\n\t\t\t\t\t\tfnmatch = \"\";\n\t\t\t\t\t\timage = SmartFolder;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t\trecursive = 1;\n\t\t\t\t\t\tregex = \"?*\\\\.[mcMC]\";\n\t\t\t\t\t\troot = \"<PROJECT>\";\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tclz = XDDesignSmartGroup;\n\t\t\t\t\tdescription = \"Displays Xdesign models\";\n\t\t\t\t\tglobalID = 2E4A936305E6979E00701470;\n\t\t\t\t\tname = Design;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = Design;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t);\n\t\t\tPBXWorkspaceContents = (\n\t\t\t\t{\n\t\t\t\t\tPBXProjectWorkspaceModule_StateKey_Rev39 = {\n\t\t\t\t\t\tPBXProjectWorkspaceModule_DataSourceSelectionKey_Rev6 = {\n\t\t\t\t\t\t\tBoundsStr = \"{{0, 0}, {469, 441}}\";\n\t\t\t\t\t\t\tRows = (\n\t\t\t\t\t\t\t\t9,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tVisibleRectStr = \"{{0, 0}, {469, 441}}\";\n\t\t\t\t\t\t};\n\t\t\t\t\t\tPBXProjectWorkspaceModule_EditorOpen = false;\n\t\t\t\t\t\tPBXProjectWorkspaceModule_EmbeddedNavigatorGroup = {\n\t\t\t\t\t\t\tPBXSplitModuleInNavigatorKey = {\n\t\t\t\t\t\t\t\tSplitCount = 1;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t};\n\t\t\t\t\t\tPBXProjectWorkspaceModule_GeometryKey_Rev15 = {\n\t\t\t\t\t\t\tPBXProjectWorkspaceModule_SGTM_Geometry = {\n\t\t\t\t\t\t\t\t_collapsingFrameDimension = 0;\n\t\t\t\t\t\t\t\t_indexOfCollapsedView = 0;\n\t\t\t\t\t\t\t\t_percentageOfCollapsedView = 0;\n\t\t\t\t\t\t\t\tsizes = (\n\t\t\t\t\t\t\t\t\t\"{{0, 0}, {182, 458}}\",\n\t\t\t\t\t\t\t\t\t\"{{182, 0}, {484, 458}}\",\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t};\n\t\t\t\t\t\tPBXProjectWorkspaceModule_OldDetailFrame = \"{{0, 0}, {484, 458}}\";\n\t\t\t\t\t\tPBXProjectWorkspaceModule_OldEditorFrame = \"{{0, 0}, {750, 480}}\";\n\t\t\t\t\t\tPBXProjectWorkspaceModule_OldSuperviewFrame = \"{{182, 0}, {484, 458}}\";\n\t\t\t\t\t\tPBXProjectWorkspaceModule_SGTM = {\n\t\t\t\t\t\t\tPBXBottomSmartGroupGIDs = (\n\t\t\t\t\t\t\t\t1C37FBAC04509CD000000102,\n\t\t\t\t\t\t\t\t1C37FAAC04509CD000000102,\n\t\t\t\t\t\t\t\t1C08E77C0454961000C914BD,\n\t\t\t\t\t\t\t\t1CC0EA4004350EF90044410B,\n\t\t\t\t\t\t\t\t1CC0EA4004350EF90041110B,\n\t\t\t\t\t\t\t\t1C37FABC05509CD000000102,\n\t\t\t\t\t\t\t\t1C37FABC05539CD112110102,\n\t\t\t\t\t\t\t\tE2644B35053B69B200211256,\n\t\t\t\t\t\t\t\t1C37FABC04509CD000100104,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnData = {\n\t\t\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnWidthsKey = (\n\t\t\t\t\t\t\t\t\t165,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnsKey_v4 = (\n\t\t\t\t\t\t\t\t\tMainColumn,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateKey_v7 = {\n\t\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateExpansionKey = (\n\t\t\t\t\t\t\t\t\t66DF6BFE01D7DCEA00A80119,\n\t\t\t\t\t\t\t\t\t66B8BC570381F53800A8011A,\n\t\t\t\t\t\t\t\t\t66DF6BFF01D7DCEA00A80119,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateSelectionKey = (\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateVisibleRectKey = \"{{0, 0}, {165, 440}}\";\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tPBXTopSmartGroupGIDs = (\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t);\n\t\t\t\"PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXBuildResultsModule\" = {\n\t\t\t};\n\t\t\t\"PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXDebugCLIModule\" = {\n\t\t\t};\n\t\t\t\"PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXNavigatorGroup\" = {\n\t\t\t\tPBXSplitModuleInNavigatorKey = {\n\t\t\t\t\tSplitCount = 1;\n\t\t\t\t};\n\t\t\t};\n\t\t\t\"PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXProjectWorkspaceModule\" = {\n\t\t\t\tPBXProjectWorkspaceModule_StateKey_Rev39 = {\n\t\t\t\t\tPBXProjectWorkspaceModule_DataSourceSelectionKey_Rev6 = {\n\t\t\t\t\t\tBoundsStr = \"{{0, 0}, {469, 441}}\";\n\t\t\t\t\t\tRows = (\n\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tVisibleRectStr = \"{{0, 0}, {469, 441}}\";\n\t\t\t\t\t};\n\t\t\t\t\tPBXProjectWorkspaceModule_EditorOpen = false;\n\t\t\t\t\tPBXProjectWorkspaceModule_EmbeddedNavigatorGroup = {\n\t\t\t\t\t\tPBXSplitModuleInNavigatorKey = {\n\t\t\t\t\t\t\tSplitCount = 1;\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t\tPBXProjectWorkspaceModule_GeometryKey_Rev15 = {\n\t\t\t\t\t\tPBXProjectWorkspaceModule_SGTM_Geometry = {\n\t\t\t\t\t\t\t_collapsingFrameDimension = 0;\n\t\t\t\t\t\t\t_indexOfCollapsedView = 0;\n\t\t\t\t\t\t\t_percentageOfCollapsedView = 0;\n\t\t\t\t\t\t\tsizes = (\n\t\t\t\t\t\t\t\t\"{{0, 0}, {182, 458}}\",\n\t\t\t\t\t\t\t\t\"{{182, 0}, {484, 458}}\",\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t\tPBXProjectWorkspaceModule_OldDetailFrame = \"{{0, 0}, {484, 458}}\";\n\t\t\t\t\tPBXProjectWorkspaceModule_OldEditorFrame = \"{{0, 0}, {750, 480}}\";\n\t\t\t\t\tPBXProjectWorkspaceModule_OldSuperviewFrame = \"{{182, 0}, {484, 458}}\";\n\t\t\t\t\tPBXProjectWorkspaceModule_SGTM = {\n\t\t\t\t\t\tPBXBottomSmartGroupGIDs = (\n\t\t\t\t\t\t\t1C37FBAC04509CD000000102,\n\t\t\t\t\t\t\t1C37FAAC04509CD000000102,\n\t\t\t\t\t\t\t1C08E77C0454961000C914BD,\n\t\t\t\t\t\t\t1CC0EA4004350EF90044410B,\n\t\t\t\t\t\t\t1CC0EA4004350EF90041110B,\n\t\t\t\t\t\t\t1C37FABC05509CD000000102,\n\t\t\t\t\t\t\t1C37FABC05539CD112110102,\n\t\t\t\t\t\t\tE2644B35053B69B200211256,\n\t\t\t\t\t\t\t1C37FABC04509CD000100104,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnData = {\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnWidthsKey = (\n\t\t\t\t\t\t\t\t165,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnsKey_v4 = (\n\t\t\t\t\t\t\t\tMainColumn,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t};\n\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateKey_v7 = {\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateExpansionKey = (\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateSelectionKey = (\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateVisibleRectKey = \"{{0, 0}, {165, 440}}\";\n\t\t\t\t\t\t};\n\t\t\t\t\t\tPBXTopSmartGroupGIDs = (\n\t\t\t\t\t\t);\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tPBXWorkspaceGeometries = (\n\t\t\t\t{\n\t\t\t\t\tFrame = \"{{0, 0}, {666, 458}}\";\n\t\t\t\t\tPBXProjectWorkspaceModule_GeometryKey_Rev15 = {\n\t\t\t\t\t};\n\t\t\t\t\tRubberWindowFrame = \"212 190 666 500 0 0 1024 746 \";\n\t\t\t\t},\n\t\t\t);\n\t\t\t\"PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXBuildResultsModule\" = {\n\t\t\t\tFrame = \"{{0, 0}, {480, 217}}\";\n\t\t\t\tPBXModuleWindowStatusBarHidden = YES;\n\t\t\t\tRubberWindowFrame = \"272 407 480 238 0 0 1024 746 \";\n\t\t\t};\n\t\t\t\"PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXDebugCLIModule\" = {\n\t\t\t\tFrame = \"{{0, 0}, {400, 201}}\";\n\t\t\t\tPBXModuleWindowStatusBarHidden = YES;\n\t\t\t\tRubberWindowFrame = \"50 718 400 222 0 0 1024 746 \";\n\t\t\t};\n\t\t\t\"PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXNavigatorGroup\" = {\n\t\t\t\tFrame = \"{{0, 0}, {750, 481}}\";\n\t\t\t\tPBXModuleWindowStatusBarHidden = YES;\n\t\t\t\tRubberWindowFrame = \"61 197 750 502 0 0 1024 746 \";\n\t\t\t};\n\t\t\t\"PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXProjectWorkspaceModule\" = {\n\t\t\t\tFrame = \"{{0, 0}, {666, 458}}\";\n\t\t\t\tPBXProjectWorkspaceModule_GeometryKey_Rev15 = {\n\t\t\t\t};\n\t\t\t\tRubberWindowFrame = \"212 190 666 500 0 0 1024 746 \";\n\t\t\t};\n\t\t\tPBXWorkspaceStateSaveDate = 159403871;\n\t\t};\n\t\tperUserProjectItems = {\n\t\t\t944D6240085F473000600D6E /* PBXTextBookmark */ = 944D6240085F473000600D6E /* PBXTextBookmark */;\n\t\t\t9491968C09804F6D000FC37A /* PBXTextBookmark */ = 9491968C09804F6D000FC37A /* PBXTextBookmark */;\n\t\t\t949CD5C5085CC32700EB8605 /* PBXTextBookmark */ = 949CD5C5085CC32700EB8605 /* PBXTextBookmark */;\n\t\t\t94ECA4AA097E137A00C2C7BA /* PBXTextBookmark */ = 94ECA4AA097E137A00C2C7BA /* PBXTextBookmark */;\n\t\t\t94ECA500097E16B400C2C7BA /* PBXTextBookmark */ = 94ECA500097E16B400C2C7BA /* PBXTextBookmark */;\n\t\t\t94ECA55F097E1D2B00C2C7BA /* PBXTextBookmark */ = 94ECA55F097E1D2B00C2C7BA /* PBXTextBookmark */;\n\t\t\t94ECA566097E1D2B00C2C7BA /* PBXTextBookmark */ = 94ECA566097E1D2B00C2C7BA /* PBXTextBookmark */;\n\t\t\t94ECA675097EC7CE00C2C7BA /* PBXTextBookmark */ = 94ECA675097EC7CE00C2C7BA /* PBXTextBookmark */;\n\t\t};\n\t\tsourceControlManager = 9444E60D06E7B8740063F6CC /* Source Control */;\n\t\tuserBuildSettings = {\n\t\t};\n\t};\n\t9444E60D06E7B8740063F6CC /* Source Control */ = {\n\t\tisa = PBXSourceControlManager;\n\t\tfallbackIsa = XCSourceControlManager;\n\t\tisSCMEnabled = 0;\n\t\tscmConfiguration = {\n\t\t};\n\t\tscmType = scm.cvs;\n\t};\n\t9444E60E06E7B8740063F6CC /* Code sense */ = {\n\t\tisa = PBXCodeSenseManager;\n\t\tindexTemplatePath = \"\";\n\t};\n\t944D6214085F458100600D6E /* English */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {659, 617}}\";\n\t\t\tsepNavSelRange = \"{177, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {659, 617}}\";\n\t\t\tsepNavWindowFrame = \"{{176, 7}, {962, 719}}\";\n\t\t};\n\t};\n\t944D6240085F473000600D6E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 949CD57E085CBE5900EB8605 /* InfoPlist.strings */;\n\t\tname = \"InfoPlist.strings: 1\";\n\t\trLen = 215;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 215;\n\t\tvrLoc = 0;\n\t};\n\t9491968C09804F6D000FC37A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9491968D09804F6D000FC37A /* Movies.h */;\n\t\tname = \"typedef CALLBACK_API( OSErr , MovieDrawingCompleteProcPtr )(Movie theMovie, long refCon);\";\n\t\trLen = 90;\n\t\trLoc = 60035;\n\t\trType = 0;\n\t\tvrLen = 2155;\n\t\tvrLoc = 61915;\n\t};\n\t9491968D09804F6D000FC37A /* Movies.h */ = {\n\t\tisa = PBXFileReference;\n\t\tname = Movies.h;\n\t\tpath = /Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/QuickTime.framework/Versions/A/Headers/Movies.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t949CD57E085CBE5900EB8605 /* InfoPlist.strings */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = text.plist.strings;\n\t\tname = InfoPlist.strings;\n\t\tpath = /Users/johnmci/Documents/SqueakSerialPortExtendedUnixPlugin/resources/English.lproj/InfoPlist.strings;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t949CD5C5085CC32700EB8605 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 949CD57E085CBE5900EB8605 /* InfoPlist.strings */;\n\t\tname = \"InfoPlist.strings: 1\";\n\t\trLen = 215;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 215;\n\t\tvrLoc = 0;\n\t};\n\t94ABA91E0858D35E00079BE1 /* Squeak */ = {\n\t\tisa = PBXExecutable;\n\t\tactiveArgIndex = 2147483647;\n\t\tactiveArgIndices = (\n\t\t);\n\t\targumentStrings = (\n\t\t);\n\t\tautoAttachOnCrash = 1;\n\t\tconfigStateDict = {\n\t\t\t\"PBXLSLaunchAction-0\" = {\n\t\t\t\tPBXLSLaunchAction = 0;\n\t\t\t\tPBXLSLaunchStartAction = 1;\n\t\t\t\tPBXLSLaunchStdioStyle = 2;\n\t\t\t\tPBXLSLaunchStyle = 0;\n\t\t\t\tclass = PBXLSRunLaunchConfig;\n\t\t\t\tdisplayName = \"Executable Runner\";\n\t\t\t\tidentifier = com.apple.Xcode.launch.runConfig;\n\t\t\t\tremoteHostInfo = \"\";\n\t\t\t\tstartActionInfo = \"\";\n\t\t\t};\n\t\t};\n\t\tcustomDataFormattersEnabled = 1;\n\t\tdebuggerPlugin = GDBDebugging;\n\t\tdisassemblyDisplayState = 0;\n\t\tdylibVariantSuffix = \"\";\n\t\tenableDebugStr = 1;\n\t\tenvironmentEntries = (\n\t\t);\n\t\texecutableSystemSymbolLevel = 0;\n\t\texecutableUserSymbolLevel = 0;\n\t\tlaunchableReference = 94ECA424097E0C2D00C2C7BA /* Squeak.app */;\n\t\tlibgmallocEnabled = 0;\n\t\tname = Squeak;\n\t\tsavedGlobals = {\n\t\t};\n\t\tsourceDirectories = (\n\t\t);\n\t};\n\t94AF34E00846F91100FA5ACB /* QuicktimePlugin */ = {\n\t\tactiveExec = 0;\n\t};\n\t94AF34F10846F91100FA5ACB /* Info.plist */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {686, 594}}\";\n\t\t\tsepNavSelRange = \"{284, 6}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {609, 594}}\";\n\t\t\tsepNavWindowFrame = \"{{84, 91}, {962, 719}}\";\n\t\t};\n\t};\n\t94AF35000846F98600FA5ACB /* config.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {673, 2590}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {673, 397}}\";\n\t\t};\n\t};\n\t94ECA1F5097DC2F800C2C7BA /* QuicktimePlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {838, 2982}}\";\n\t\t\tsepNavSelRange = \"{3982, 74}\";\n\t\t\tsepNavVisRect = \"{{0, 2142}, {838, 294}}\";\n\t\t\tsepNavWindowFrame = \"{{61, 111}, {1364, 720}}\";\n\t\t};\n\t};\n\t94ECA424097E0C2D00C2C7BA /* Squeak.app */ = {\n\t\tisa = PBXFileReference;\n\t\texplicitFileType = wrapper.application;\n\t\tname = Squeak.app;\n\t\tpath = /Users/johnmci/Documents/Squeak3.8.0/build/Development/Squeak.app;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94ECA4AA097E137A00C2C7BA /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94AF34F10846F91100FA5ACB /* Info.plist */;\n\t\tname = Quickt;\n\t\trLen = 6;\n\t\trLoc = 284;\n\t\trType = 0;\n\t\tvrLen = 758;\n\t\tvrLoc = 0;\n\t};\n\t94ECA4E7097E15F800C2C7BA /* PkgInfo */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {609, 594}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {609, 594}}\";\n\t\t};\n\t};\n\t94ECA500097E16B400C2C7BA /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94AF34F10846F91100FA5ACB /* Info.plist */;\n\t\tname = Quickt;\n\t\trLen = 6;\n\t\trLoc = 284;\n\t\trType = 0;\n\t\tvrLen = 758;\n\t\tvrLoc = 0;\n\t};\n\t94ECA52C097E197400C2C7BA /* QuicktimePlugin.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {812, 594}}\";\n\t\t\tsepNavSelRange = \"{467, 26}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {609, 594}}\";\n\t\t\tsepNavWindowFrame = \"{{38, 132}, {1364, 720}}\";\n\t\t};\n\t};\n\t94ECA546097E1BF300C2C7BA /* sqMacQuicktimeInteface.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {838, 2338}}\";\n\t\t\tsepNavSelRange = \"{4126, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 1652}, {838, 294}}\";\n\t\t\tsepNavWindowFrame = \"{{38, 132}, {1364, 720}}\";\n\t\t};\n\t};\n\t94ECA547097E1BF300C2C7BA /* sqMacQuicktimeInteface.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {698, 594}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {609, 594}}\";\n\t\t};\n\t};\n\t94ECA55F097E1D2B00C2C7BA /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 66B8BC5A0381F63A00A8011A /* sqPlatformSpecific.h */;\n\t\tname = SQUEAK_BUILTIN_PLUGIN;\n\t\trLen = 21;\n\t\trLoc = 1454;\n\t\trType = 0;\n\t\tvrLen = 1759;\n\t\tvrLoc = 0;\n\t};\n\t94ECA566097E1D2B00C2C7BA /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 66B8BC5A0381F63A00A8011A /* sqPlatformSpecific.h */;\n\t\tname = SQUEAK_BUILTIN_PLUGIN;\n\t\trLen = 21;\n\t\trLoc = 1454;\n\t\trType = 0;\n\t\tvrLen = 1759;\n\t\tvrLoc = 0;\n\t};\n\t94ECA629097E2D7F00C2C7BA /* Movies.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = Movies.h;\n\t\tpath = /Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/QuickTime.framework/Versions/A/Headers/Movies.h;\n\t\tsourceTree = \"<absolute>\";\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1568, 251258}}\";\n\t\t\tsepNavSelRange = \"{60035, 90}\";\n\t\t\tsepNavVisRect = \"{{0, 19390}, {1325, 591}}\";\n\t\t\tsepNavWindowFrame = \"{{15, 153}, {1364, 720}}\";\n\t\t};\n\t};\n\t94ECA675097EC7CE00C2C7BA /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94ECA629097E2D7F00C2C7BA /* Movies.h */;\n\t\tname = \"typedef CALLBACK_API( OSErr , MovieDrawingCompleteProcPtr )(Movie theMovie, long refCon);\";\n\t\trLen = 90;\n\t\trLoc = 60035;\n\t\trType = 0;\n\t\tvrLen = 2155;\n\t\tvrLoc = 61915;\n\t};\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/QuicktimePlugin/SqueakQuicktime.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 42;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t944D6215085F458100600D6E /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 944D6213085F458100600D6E /* InfoPlist.strings */; };\n\t\t94ABA8930858C40D00079BE1 /* sqMemoryAccess.h in Headers */ = {isa = PBXBuildFile; fileRef = 94ABA8920858C40D00079BE1 /* sqMemoryAccess.h */; };\n\t\t94AF34E20846F91100FA5ACB /* sqConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B8BC580381F61C00A8011A /* sqConfig.h */; };\n\t\t94AF34E30846F91100FA5ACB /* sqPlatformSpecific.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B8BC5A0381F63A00A8011A /* sqPlatformSpecific.h */; };\n\t\t94AF34E40846F91100FA5ACB /* sq.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B8BC5C0381F66500A8011A /* sq.h */; };\n\t\t94AF34E50846F91100FA5ACB /* sqVirtualMachine.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B8BC5E0381F69100A8011A /* sqVirtualMachine.h */; };\n\t\t94AF34E80846F91100FA5ACB /* SqueakPlugin.icns in Resources */ = {isa = PBXBuildFile; fileRef = 66C6C8E501DB1EC300A80109 /* SqueakPlugin.icns */; };\n\t\t94AF34EF0846F91100FA5ACB /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 66DF6C8201D7DF7E00A80119 /* Carbon.framework */; };\n\t\t94AF35010846F98600FA5ACB /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = 94AF35000846F98600FA5ACB /* config.h */; };\n\t\t94AF35050846F9AB00FA5ACB /* interp.h in Headers */ = {isa = PBXBuildFile; fileRef = 94AF35040846F9AB00FA5ACB /* interp.h */; };\n\t\t94ECA1F6097DC2F800C2C7BA /* QuicktimePlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94ECA1F5097DC2F800C2C7BA /* QuicktimePlugin.c */; };\n\t\t94ECA269097DCD5100C2C7BA /* SurfacePlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 94ECA268097DCD5100C2C7BA /* SurfacePlugin.h */; };\n\t\t94ECA38F097DF8A400C2C7BA /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94ECA38E097DF8A400C2C7BA /* QuickTime.framework */; };\n\t\t94ECA52D097E197400C2C7BA /* QuicktimePlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 94ECA52C097E197400C2C7BA /* QuicktimePlugin.h */; };\n\t\t94ECA548097E1BF300C2C7BA /* sqMacQuicktimeInteface.c in Sources */ = {isa = PBXBuildFile; fileRef = 94ECA546097E1BF300C2C7BA /* sqMacQuicktimeInteface.c */; };\n\t\t94ECA549097E1BF300C2C7BA /* sqMacQuicktimeInteface.h in Headers */ = {isa = PBXBuildFile; fileRef = 94ECA547097E1BF300C2C7BA /* sqMacQuicktimeInteface.h */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXBuildRule section */\n\t\t94AF34F70846F94F00FA5ACB /* PBXBuildRule */ = {\n\t\t\tisa = PBXBuildRule;\n\t\t\tcompilerSpec = com.apple.compilers.gcc.3_3;\n\t\t\tfileType = sourcecode.c;\n\t\t\tisEditable = 1;\n\t\t\toutputFiles = (\n\t\t\t);\n\t\t};\n/* End PBXBuildRule section */\n\n/* Begin PBXBuildStyle section */\n\t\t66DF6C4301D7DCEA00A80119 /* Development */ = {\n\t\t\tisa = PBXBuildStyle;\n\t\t\tbuildSettings = {\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_ENABLE_FIX_AND_CONTINUE = YES;\n\t\t\t\tGCC_GENERATE_DEBUGGING_SYMBOLS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tOPTIMIZATION_CFLAGS = \"-O0\";\n\t\t\t\tZERO_LINK = NO;\n\t\t\t};\n\t\t\tname = Development;\n\t\t};\n\t\t66DF6C4401D7DCEA00A80119 /* Deployment */ = {\n\t\t\tisa = PBXBuildStyle;\n\t\t\tbuildSettings = {\n\t\t\t\tCOPY_PHASE_STRIP = YES;\n\t\t\t\tGCC_ENABLE_FIX_AND_CONTINUE = NO;\n\t\t\t\tOPTIMIZATION_CFLAGS = \"-O3 -mcpu=750 -funroll-loops \";\n\t\t\t\tOTHER_CFLAGS = (\n\t\t\t\t\t\"-DTARGET_OS_MAC\",\n\t\t\t\t\t\"-DNOPTHREADS\",\n\t\t\t\t);\n\t\t\t\tZERO_LINK = NO;\n\t\t\t};\n\t\t\tname = Deployment;\n\t\t};\n/* End PBXBuildStyle section */\n\n/* Begin PBXFileReference section */\n\t\t66B8BC580381F61C00A8011A /* sqConfig.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sqConfig.h; path = \"Mac OS/vm/sqConfig.h\"; sourceTree = \"<group>\"; };\n\t\t66B8BC5A0381F63A00A8011A /* sqPlatformSpecific.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sqPlatformSpecific.h; path = \"/Users/johnmci/Documents/Squeak3.8.0/platforms/Mac OS/vm/sqPlatformSpecific.h\"; sourceTree = \"<absolute>\"; };\n\t\t66B8BC5C0381F66500A8011A /* sq.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sq.h; path = Cross/vm/sq.h; sourceTree = \"<group>\"; };\n\t\t66B8BC5E0381F69100A8011A /* sqVirtualMachine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sqVirtualMachine.h; path = /Users/johnmci/Documents/Squeak3.8.0/platforms/Cross/vm/sqVirtualMachine.h; sourceTree = \"<absolute>\"; };\n\t\t66C6C8E501DB1EC300A80109 /* SqueakPlugin.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = SqueakPlugin.icns; path = ../SqueakPlugin.icns; sourceTree = \"<group>\"; };\n\t\t66DF6C8201D7DF7E00A80119 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = \"<absolute>\"; };\n\t\t943173AF085CD38900DDDC64 /* QuicktimePlugin.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = QuicktimePlugin.bundle; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t944D6214085F458100600D6E /* English */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.strings; name = English; path = InfoPlist.strings; sourceTree = \"<group>\"; };\n\t\t94ABA8920858C40D00079BE1 /* sqMemoryAccess.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sqMemoryAccess.h; path = Cross/vm/sqMemoryAccess.h; sourceTree = \"<group>\"; };\n\t\t94AF34F10846F91100FA5ACB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = Info.plist; sourceTree = \"<group>\"; };\n\t\t94AF35000846F98600FA5ACB /* config.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = config.h; path = \"Mac OS/vm/config.h\"; sourceTree = \"<group>\"; };\n\t\t94AF35040846F9AB00FA5ACB /* interp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = interp.h; path = ../Squeak3.8.0/src/vm/interp.h; sourceTree = SOURCE_ROOT; };\n\t\t94ECA1F5097DC2F800C2C7BA /* QuicktimePlugin.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = QuicktimePlugin.c; sourceTree = \"<group>\"; };\n\t\t94ECA268097DCD5100C2C7BA /* SurfacePlugin.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SurfacePlugin.h; path = platforms/Cross/plugins/SurfacePlugin/SurfacePlugin.h; sourceTree = SOURCE_ROOT; };\n\t\t94ECA38E097DF8A400C2C7BA /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = \"<absolute>\"; };\n\t\t94ECA4E7097E15F800C2C7BA /* PkgInfo */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = PkgInfo; path = build/PkgInfo; sourceTree = \"<group>\"; };\n\t\t94ECA52C097E197400C2C7BA /* QuicktimePlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QuicktimePlugin.h; path = platforms/Cross/plugins/QuicktimePlugin/QuicktimePlugin.h; sourceTree = \"<group>\"; };\n\t\t94ECA546097E1BF300C2C7BA /* sqMacQuicktimeInteface.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = sqMacQuicktimeInteface.c; path = \"platforms/Mac OS/plugins/QuicktimePlugin/sqMacQuicktimeInteface.c\"; sourceTree = \"<group>\"; };\n\t\t94ECA547097E1BF300C2C7BA /* sqMacQuicktimeInteface.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sqMacQuicktimeInteface.h; path = \"platforms/Mac OS/plugins/QuicktimePlugin/sqMacQuicktimeInteface.h\"; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t94AF34EE0846F91100FA5ACB /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t94AF34EF0846F91100FA5ACB /* Carbon.framework in Frameworks */,\n\t\t\t\t94ECA38F097DF8A400C2C7BA /* QuickTime.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t66B8BC570381F53800A8011A /* platforms */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94ECA268097DCD5100C2C7BA /* SurfacePlugin.h */,\n\t\t\t\t94AF35040846F9AB00FA5ACB /* interp.h */,\n\t\t\t\t94AF35000846F98600FA5ACB /* config.h */,\n\t\t\t\t66B8BC580381F61C00A8011A /* sqConfig.h */,\n\t\t\t\t66B8BC5A0381F63A00A8011A /* sqPlatformSpecific.h */,\n\t\t\t\t66B8BC5C0381F66500A8011A /* sq.h */,\n\t\t\t\t66B8BC5E0381F69100A8011A /* sqVirtualMachine.h */,\n\t\t\t\t94ABA8920858C40D00079BE1 /* sqMemoryAccess.h */,\n\t\t\t);\n\t\t\tname = platforms;\n\t\t\tpath = ../Squeak3.8.0/platforms;\n\t\t\tsourceTree = SOURCE_ROOT;\n\t\t};\n\t\t66DF6BFE01D7DCEA00A80119 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94ECA4E7097E15F800C2C7BA /* PkgInfo */,\n\t\t\t\t94AF34F10846F91100FA5ACB /* Info.plist */,\n\t\t\t\t66B8BC570381F53800A8011A /* platforms */,\n\t\t\t\t66DF6BFF01D7DCEA00A80119 /* Sources */,\n\t\t\t\t66DF6C3901D7DCEA00A80119 /* resources */,\n\t\t\t\t66DF6C8201D7DF7E00A80119 /* Carbon.framework */,\n\t\t\t\t94ECA38E097DF8A400C2C7BA /* QuickTime.framework */,\n\t\t\t\t66DF6C4501D7DEEE00A80119 /* Products */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66DF6BFF01D7DCEA00A80119 /* Sources */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94ECA546097E1BF300C2C7BA /* sqMacQuicktimeInteface.c */,\n\t\t\t\t94ECA547097E1BF300C2C7BA /* sqMacQuicktimeInteface.h */,\n\t\t\t\t94ECA52C097E197400C2C7BA /* QuicktimePlugin.h */,\n\t\t\t\t94ECA1F5097DC2F800C2C7BA /* QuicktimePlugin.c */,\n\t\t\t);\n\t\t\tname = Sources;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66DF6C3901D7DCEA00A80119 /* resources */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t944D6212085F458100600D6E /* English.lproj */,\n\t\t\t\t66C6C8E501DB1EC300A80109 /* SqueakPlugin.icns */,\n\t\t\t);\n\t\t\tname = resources;\n\t\t\tpath = \"platforms/Mac OS/plugins/QuicktimePlugin/resources\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66DF6C4501D7DEEE00A80119 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t943173AF085CD38900DDDC64 /* QuicktimePlugin.bundle */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t944D6212085F458100600D6E /* English.lproj */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t944D6213085F458100600D6E /* InfoPlist.strings */,\n\t\t\t);\n\t\t\tpath = English.lproj;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXHeadersBuildPhase section */\n\t\t94AF34E10846F91100FA5ACB /* Headers */ = {\n\t\t\tisa = PBXHeadersBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t94AF34E20846F91100FA5ACB /* sqConfig.h in Headers */,\n\t\t\t\t94AF34E30846F91100FA5ACB /* sqPlatformSpecific.h in Headers */,\n\t\t\t\t94AF34E40846F91100FA5ACB /* sq.h in Headers */,\n\t\t\t\t94AF34E50846F91100FA5ACB /* sqVirtualMachine.h in Headers */,\n\t\t\t\t94AF35010846F98600FA5ACB /* config.h in Headers */,\n\t\t\t\t94AF35050846F9AB00FA5ACB /* interp.h in Headers */,\n\t\t\t\t94ABA8930858C40D00079BE1 /* sqMemoryAccess.h in Headers */,\n\t\t\t\t94ECA269097DCD5100C2C7BA /* SurfacePlugin.h in Headers */,\n\t\t\t\t94ECA52D097E197400C2C7BA /* QuicktimePlugin.h in Headers */,\n\t\t\t\t94ECA549097E1BF300C2C7BA /* sqMacQuicktimeInteface.h in Headers */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXHeadersBuildPhase section */\n\n/* Begin PBXNativeTarget section */\n\t\t94AF34E00846F91100FA5ACB /* QuicktimePlugin */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 94ECA1E7097DC27D00C2C7BA /* Build configuration list for PBXNativeTarget \"QuicktimePlugin\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t94AF34E10846F91100FA5ACB /* Headers */,\n\t\t\t\t94AF34E70846F91100FA5ACB /* Resources */,\n\t\t\t\t94AF34EA0846F91100FA5ACB /* Sources */,\n\t\t\t\t94AF34EE0846F91100FA5ACB /* Frameworks */,\n\t\t\t\t94AF34F00846F91100FA5ACB /* Rez */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t\t94AF34F70846F94F00FA5ACB /* PBXBuildRule */,\n\t\t\t);\n\t\t\tbuildSettings = {\n\t\t\t\tGCC_GENERATE_DEBUGGING_SYMBOLS = NO;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 3;\n\t\t\t\tHEADER_SEARCH_PATHS = /Developer/Headers/FlatCarbon;\n\t\t\t\tINFOPLIST_FILE = Info.plist;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tOTHER_REZFLAGS = \"\";\n\t\t\t\tPRODUCT_NAME = ServicesPlugin;\n\t\t\t\tSECTORDER_FLAGS = \"\";\n\t\t\t\tWARNING_CFLAGS = (\n\t\t\t\t\t\"-Wmost\",\n\t\t\t\t\t\"-Wno-four-char-constants\",\n\t\t\t\t\t\"-Wno-unknown-pragmas\",\n\t\t\t\t);\n\t\t\t\tWRAPPER_EXTENSION = bundle;\n\t\t\t};\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = QuicktimePlugin;\n\t\t\tproductInstallPath = \"$(USER_LIBRARY_DIR)/Bundles\";\n\t\t\tproductName = \"mpeg3PluginBundle Debug\";\n\t\t\tproductReference = 943173AF085CD38900DDDC64 /* QuicktimePlugin.bundle */;\n\t\t\tproductType = \"com.apple.product-type.bundle\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t66DF6BFD01D7DCEA00A80119 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tbuildConfigurationList = 94ECA1EB097DC27D00C2C7BA /* Build configuration list for PBXProject \"SqueakQuicktime\" */;\n\t\t\tbuildSettings = {\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.3;\n\t\t\t\tSDKROOT = /Developer/SDKs/MacOSX10.3.9.sdk;\n\t\t\t};\n\t\t\tbuildStyles = (\n\t\t\t\t66DF6C4301D7DCEA00A80119 /* Development */,\n\t\t\t\t66DF6C4401D7DCEA00A80119 /* Deployment */,\n\t\t\t);\n\t\t\thasScannedForEncodings = 1;\n\t\t\tmainGroup = 66DF6BFE01D7DCEA00A80119;\n\t\t\tproductRefGroup = 66DF6C4501D7DEEE00A80119 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\ttargets = (\n\t\t\t\t94AF34E00846F91100FA5ACB /* QuicktimePlugin */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t94AF34E70846F91100FA5ACB /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t94AF34E80846F91100FA5ACB /* SqueakPlugin.icns in Resources */,\n\t\t\t\t944D6215085F458100600D6E /* InfoPlist.strings in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXRezBuildPhase section */\n\t\t94AF34F00846F91100FA5ACB /* Rez */ = {\n\t\t\tisa = PBXRezBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXRezBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t94AF34EA0846F91100FA5ACB /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t94ECA1F6097DC2F800C2C7BA /* QuicktimePlugin.c in Sources */,\n\t\t\t\t94ECA548097E1BF300C2C7BA /* sqMacQuicktimeInteface.c in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin PBXVariantGroup section */\n\t\t944D6213085F458100600D6E /* InfoPlist.strings */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t944D6214085F458100600D6E /* English */,\n\t\t\t);\n\t\t\tname = InfoPlist.strings;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXVariantGroup section */\n\n/* Begin XCBuildConfiguration section */\n\t\t94ECA1E8097DC27D00C2C7BA /* Development */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_ENABLE_FIX_AND_CONTINUE = YES;\n\t\t\t\tGCC_GENERATE_DEBUGGING_SYMBOLS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tHEADER_SEARCH_PATHS = /Developer/Headers/FlatCarbon;\n\t\t\t\tINFOPLIST_FILE = Info.plist;\n\t\t\t\tOPTIMIZATION_CFLAGS = \"-O0\";\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tOTHER_REZFLAGS = \"\";\n\t\t\t\tPRODUCT_NAME = QuicktimePlugin;\n\t\t\t\tSECTORDER_FLAGS = \"\";\n\t\t\t\tWARNING_CFLAGS = (\n\t\t\t\t\t\"-Wmost\",\n\t\t\t\t\t\"-Wno-four-char-constants\",\n\t\t\t\t\t\"-Wno-unknown-pragmas\",\n\t\t\t\t);\n\t\t\t\tWRAPPER_EXTENSION = bundle;\n\t\t\t\tZERO_LINK = NO;\n\t\t\t};\n\t\t\tname = Development;\n\t\t};\n\t\t94ECA1E9097DC27D00C2C7BA /* Deployment */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCOPY_PHASE_STRIP = YES;\n\t\t\t\tGCC_ENABLE_FIX_AND_CONTINUE = NO;\n\t\t\t\tGCC_GENERATE_DEBUGGING_SYMBOLS = NO;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 3;\n\t\t\t\tHEADER_SEARCH_PATHS = /Developer/Headers/FlatCarbon;\n\t\t\t\tINFOPLIST_FILE = Info.plist;\n\t\t\t\tOPTIMIZATION_CFLAGS = \"-O3 -mcpu=750 -funroll-loops \";\n\t\t\t\tOTHER_CFLAGS = (\n\t\t\t\t\t\"-DTARGET_OS_MAC\",\n\t\t\t\t\t\"-DNOPTHREADS\",\n\t\t\t\t);\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tOTHER_REZFLAGS = \"\";\n\t\t\t\tPRODUCT_NAME = QuicktimePlugin;\n\t\t\t\tSECTORDER_FLAGS = \"\";\n\t\t\t\tWARNING_CFLAGS = (\n\t\t\t\t\t\"-Wmost\",\n\t\t\t\t\t\"-Wno-four-char-constants\",\n\t\t\t\t\t\"-Wno-unknown-pragmas\",\n\t\t\t\t);\n\t\t\t\tWRAPPER_EXTENSION = bundle;\n\t\t\t\tZERO_LINK = NO;\n\t\t\t};\n\t\t\tname = Deployment;\n\t\t};\n\t\t94ECA1EA097DC27D00C2C7BA /* Default */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tGCC_GENERATE_DEBUGGING_SYMBOLS = NO;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 3;\n\t\t\t\tHEADER_SEARCH_PATHS = /Developer/Headers/FlatCarbon;\n\t\t\t\tINFOPLIST_FILE = Info.plist;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tOTHER_REZFLAGS = \"\";\n\t\t\t\tPRODUCT_NAME = QuicktimePlugin;\n\t\t\t\tSECTORDER_FLAGS = \"\";\n\t\t\t\tWARNING_CFLAGS = (\n\t\t\t\t\t\"-Wmost\",\n\t\t\t\t\t\"-Wno-four-char-constants\",\n\t\t\t\t\t\"-Wno-unknown-pragmas\",\n\t\t\t\t);\n\t\t\t\tWRAPPER_EXTENSION = bundle;\n\t\t\t};\n\t\t\tname = Default;\n\t\t};\n\t\t94ECA1EC097DC27D00C2C7BA /* Development */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.3;\n\t\t\t\tSDKROOT = /Developer/SDKs/MacOSX10.3.9.sdk;\n\t\t\t};\n\t\t\tname = Development;\n\t\t};\n\t\t94ECA1ED097DC27D00C2C7BA /* Deployment */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.3;\n\t\t\t\tSDKROOT = /Developer/SDKs/MacOSX10.3.9.sdk;\n\t\t\t};\n\t\t\tname = Deployment;\n\t\t};\n\t\t94ECA1EE097DC27D00C2C7BA /* Default */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.3;\n\t\t\t\tSDKROOT = /Developer/SDKs/MacOSX10.3.9.sdk;\n\t\t\t};\n\t\t\tname = Default;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t94ECA1E7097DC27D00C2C7BA /* Build configuration list for PBXNativeTarget \"QuicktimePlugin\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t94ECA1E8097DC27D00C2C7BA /* Development */,\n\t\t\t\t94ECA1E9097DC27D00C2C7BA /* Deployment */,\n\t\t\t\t94ECA1EA097DC27D00C2C7BA /* Default */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Default;\n\t\t};\n\t\t94ECA1EB097DC27D00C2C7BA /* Build configuration list for PBXProject \"SqueakQuicktime\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t94ECA1EC097DC27D00C2C7BA /* Development */,\n\t\t\t\t94ECA1ED097DC27D00C2C7BA /* Deployment */,\n\t\t\t\t94ECA1EE097DC27D00C2C7BA /* Default */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Default;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 66DF6BFD01D7DCEA00A80119 /* Project object */;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/QuicktimePlugin/resources/English.lproj/InfoPlist.strings",
    "content": "/* Localized versions of Info.plist keys */\n\nCFBundleName = \"QuicktimePlugin\";\nCFBundleShortVersionString = \"QuicktimePlugin version 1.0.1B1\";\nCFBundleGetInfoString = \"QuicktimePlugin version 1.0.1B1\";\nNSHumanReadableCopyright = \"http://www.squeak.org\";\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/QuicktimePlugin/sqMacQuicktimeInteface.c",
    "content": "/*\n *  sqMacQuicktimeInteface.c\n *  SqueakQuicktime\n *\n *  Created by John M McIntosh on 17/01/06.\n *  Copyright 2006 Corporate Smalltalk Consulting ltd.  All rights reserved, published under the Squeak-L licence\n *\n */\n\n#include <Movies.h>\n#include \"sqMacQuicktimeInteface.h\"\n#include \"SurfacePlugin.h\"\n#include \"sqMemoryAccess.h\"\n#include \"sqVirtualMachine.h\"\n\ntypedef struct QuickTimeBitMapForSqueak {\n   int width, height, depth;    /* width, height, and depth */\n   int rowBytes;   /* how many bytes per scan line? */\n   MovieDrawingCompleteUPP\tmyDrawCompleteProc;\n   Movie\tmovie;\n   int\tsemaIndex;\n   void *bits;  /* where are those bits? */\n   \n} QuickTimeBitMapForSqueak;\n\nstatic fn_ioRegisterSurface registerSurface = 0;\nstatic fn_ioUnregisterSurface unregisterSurface = 0;\nstatic fn_ioFindSurface findSurface = 0;\n\nint QuicktimeGetSurfaceFormat(QuickTimeBitMapForSqueak *handle, int* width, int* height, int* depth, int* isMSB);\nint QuicktimeLockSurface(QuickTimeBitMapForSqueak *handle, int *pitch, int x, int y, int w, int h);\nint QuicktimeUnlockSurface(QuickTimeBitMapForSqueak *handle, int x, int y, int w, int h);\nint QuicktimeShowSurface(QuickTimeBitMapForSqueak *handle, int x, int y, int w, int h);\n\nstruct VirtualMachine *interpreterProxy;\n\nstatic sqSurfaceDispatch QuicktimeTargetDispatch = {\n  1,\n  0,\n  (fn_getSurfaceFormat) QuicktimeGetSurfaceFormat,\n  (fn_lockSurface) QuicktimeLockSurface,\n  (fn_unlockSurface) QuicktimeUnlockSurface,\n  (fn_showSurface) QuicktimeShowSurface\n};\n\nstatic OSErr DrawCompleteProc(Movie theMovie, long refCon) {\n\tinterpreterProxy->signalSemaphoreWithIndex(refCon);\n\treturn noErr;\n}\n\nvoid SetupSurface() {\n    registerSurface = (fn_ioRegisterSurface) interpreterProxy->ioLoadFunctionFrom(\"ioRegisterSurface\",\"SurfacePlugin\");\n    unregisterSurface = (fn_ioUnregisterSurface) interpreterProxy->ioLoadFunctionFrom(\"ioUnregisterSurface\",\"SurfacePlugin\");\n\tfindSurface = (fn_ioFindSurface) interpreterProxy->ioLoadFunctionFrom(\"ioFindSurface\",\"SurfacePlugin\");\n}\n\nsqInt sqQuicktimeInitialize()\n{\n\tSetupSurface();\n\treturn true;\n}\n\nsqInt sqQuicktimeShutdown() {\n\treturn true;\n}\n\nlong stQuicktimeSetSurfacewidthheightrowBytesdepthmovie(char * buffer, int width, int height, int rowBytes, int depth, void *movie)\n{\n\tQuickTimeBitMapForSqueak *bitMap;\n\tint sqHandle;\n\t\n\tbitMap = calloc(1, sizeof(QuickTimeBitMapForSqueak));\n\tbitMap->width = width;\n\tbitMap->height = height;\n\tbitMap->depth = depth;\n\tbitMap->rowBytes = rowBytes;\n\tbitMap->bits = buffer;\n\tbitMap->movie = movie;\n    (*registerSurface)((long) bitMap, &QuicktimeTargetDispatch, &sqHandle);\n\t\n\treturn sqHandle;\n}\n\nlong stQuicktimeSetToExistingSurfacegworldwidthheightrowBytesdepthmovie\n\t(int sqHandle, char * buffer, int width, int height, int rowBytes, int depth, void *movie)\n{\n\tQuickTimeBitMapForSqueak *bitMap;\n\t\n\t/* see if the handle really describes a MyBitmap surface */\n\tif( ! (*findSurface)(sqHandle, &QuicktimeTargetDispatch, (int*) (&bitMap)) ) {\n\t\t/* i don't know what it is but certainly not MyBitmap */\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\t\n\tbitMap->width = width;\n\tbitMap->height = height;\n\tbitMap->depth = depth;\n\tbitMap->rowBytes = rowBytes;\n\tbitMap->bits = buffer;\n\tbitMap->movie = movie;\n    (*registerSurface)((long) bitMap, &QuicktimeTargetDispatch, &sqHandle);\n\t\n\treturn sqHandle;\n}\n\nint stQuicktimeDestroySurface(int sqHandle) {\n\tQuickTimeBitMapForSqueak *myBM;\n\n\t/* see if the handle really describes a MyBitmap surface */\n\tif( ! (*findSurface)(sqHandle, &QuicktimeTargetDispatch, (int*) (&myBM)) ) {\n\t\t/* i don't know what it is but certainly not MyBitmap */\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\t/* unregister and destroy */\n\t(*unregisterSurface)(sqHandle);\n\tfree(myBM);\n}\n\nint stQuicktimeDestroy(int sqHandle) {\n\tQuickTimeBitMapForSqueak *myBM;\n\n\t/* see if the handle really describes a MyBitmap surface */\n\tif( ! (*findSurface)(sqHandle, &QuicktimeTargetDispatch, (int*) (&myBM)) ) {\n\t\t/* i don't know what it is but certainly not MyBitmap */\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\t/* unregister and destroy */\n\t(*unregisterSurface)(sqHandle);\n\tif (myBM->semaIndex && !((myBM->movie == nil) || (*myBM->movie == 0xFFFFFFFFU))) {\n\t\tDisposeMovieDrawingCompleteUPP(myBM->myDrawCompleteProc);\n \t\tSetMovieDrawingCompleteProc (myBM->movie,0,0,0);\n\t}\n\tmyBM->semaIndex = 0;\n\tfree(myBM);\n\treturn 1;\n}\n\n\nint stQuicktimeSetSemaphorefor(int index, int sqHandle) {\n//\t\tinterpreterProxy->signalSemaphoreWithIndex(state->semaIndex);\n\tQuickTimeBitMapForSqueak *myBM;\n\tif( ! (*findSurface)(sqHandle, &QuicktimeTargetDispatch, (int*) (&myBM)) ) {\n\t\t/* i don't know what it is but certainly not MyBitmap */\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif\t((myBM->movie == nil) || (*myBM->movie == 0xFFFFFFFFU))\t\n\t\treturn interpreterProxy->primitiveFail();\n\tmyBM->myDrawCompleteProc = NewMovieDrawingCompleteUPP(DrawCompleteProc);\n\tSetMovieDrawingCompleteProc (myBM->movie,movieDrawingCallWhenChanged,myBM->myDrawCompleteProc,(long) index);\n\tmyBM->semaIndex = index;\n\treturn 0;\n}\n\nint stQuicktimeClearSemaphore(int sqHandle) {\n\tQuickTimeBitMapForSqueak *myBM;\n\tif( ! (*findSurface)(sqHandle, &QuicktimeTargetDispatch, (int*) (&myBM)) ) {\n\t\t/* i don't know what it is but certainly not MyBitmap */\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif\t((myBM->movie == nil) || (*myBM->movie == 0xFFFFFFFFU))\t\n\t\treturn interpreterProxy->primitiveFail();\n\tif (myBM->semaIndex) {\n\t\tSetMovieDrawingCompleteProc (myBM->movie,0,0,0);\n\t}\n\tmyBM->semaIndex = 0;\n\treturn 1;\n}\n\nint QuicktimeGetSurfaceFormat(QuickTimeBitMapForSqueak *myBM, int *width, int *height, int *depth, int *isMSB) {\n\t/* fill in status information */\n\t*width = myBM->width;\n\t*height = myBM->height;\n\t*depth = myBM->depth;\n\t*isMSB = 1; /* or zero depending on platform or choice */\n#warning Endeness\n\treturn 1; /* success - otherwise return zero */\n}\n\nint QuicktimeLockSurface(QuickTimeBitMapForSqueak *myBM, int *pitch, int x, int y, int w, int h)\n{\n\t/* lock the region x,y - (x+w),(y+h)\n\t   the area actually used is provided so that expensive\n\t   operations (like a round trip to the X-Server) can\n\t   be avoided. See SurfacePlugin.h */\n\t/* for our simple example, only fill in the pitch. No locking is\nrequired. */\n\t*pitch = myBM->rowBytes;\n\treturn (long) myBM->bits; /* success */\n}\n\nint QuicktimeUnlockSurface(QuickTimeBitMapForSqueak *myBM, int x, int y, int w, int h) {\n\t/* Unlock a previously locked portion of myBM.\n\t   The area describes the 'dirty region' which might\n\t   need to be written back/flushed whatever. */\n\t/* for the simple example do nothing */\n\treturn 1;\n}\n\nint QuicktimeShowSurface(QuickTimeBitMapForSqueak *myBM, int x, int y, int w, int h) {\n\t/* the surface represents Display - update the portion\n\t   described in x,y,w,h */\n\t/* for our simple example we just ignore this */\n\treturn 0; /* e.g., fail */\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/QuicktimePlugin/sqMacQuicktimeInteface.h",
    "content": "/*\n *  sqMacQuicktimeInteface.h\n *  SqueakQuicktime\n *\n *  Created by John M McIntosh on 17/01/06. johnmci@smalltalkconsulting.com\n *  Copyright 2006 Corporate Smalltalk Consulting ltd.  All rights reserved, published under the Squeak-L licence\n *\n */\n\n#include <Carbon/Carbon.h>\n\n#include \"QuicktimePlugin.h\""
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SecurityPlugin/sqMacSecurity.c",
    "content": "//JMM 2/13/01 create docs folder if non-existant\n//JMM 4/4/01  look for documents/My Squeak folder versus just documents as secure location\n//JMM 5/3/01  path was wrong for unsecure folder which uncovered a bug in lookupPath\n//JMM 8/15/01 only allow call to ioInitSecurity Once, also return  proper return code\n//JMM 9/5/01  make it as a plugin\n// 3.7.0bx Nov 24th, 2003 JMM gCurrentVMEncoding\n\n#include \"sq.h\"\n#include \"sqMacFileLogic.h\"\t\n#include \"SecurityPlugin.h\"\n#include \"sqMacUIConstants.h\"\n#include \"FilePlugin.h\"\n\n#include <Files.h> \n\n#if !defined(PATH_MAX)\n# include <sys/syslimits.h>\n#endif\nextern struct VirtualMachine * interpreterProxy;\n\n#define fromSqueak(string,length) string\nvoid fixPath(char *path);\nint dir_CreateSecurity(char *pathString, int pathStringLength);\nint _ioSetFileAccess(int enable);\n\nstatic char secureUserDirectory[PATH_MAX];\nstatic char untrustedUserDirectory[PATH_MAX];\nstatic Boolean gInitialized = false;\n\n/***************************************************************************/\n/***************************************************************************/\n/***************************************************************************/\n/***************************************************************************/\n/* file security */\nstatic int allowFileAccess = 1;  /* full access to files */\n\nstatic int isAccessiblePathName(char *pathName) {\n  unsigned int i;\n  /* Check if the path/file name is subdirectory of the image path */\n  for(i=0; i<strlen(untrustedUserDirectory)-1; i++)\n    if(untrustedUserDirectory[i] != pathName[i]) return 0;\n  /* special check for the trusted directory */\n  if(pathName[i] == 0) return 1; /* allow access to trusted directory */\n  /* check last character in image path (e.g., backslash) */\n  if(untrustedUserDirectory[i] != pathName[i]) return 0;\n\nreturn 1;\n}\n\nstatic int isAccessibleFileName(char *fileName) {\n  unsigned int i;\n  /* Check if the path/file name is subdirectory of the image path */\n  for(i=0; i<strlen(untrustedUserDirectory); i++)\n    if(untrustedUserDirectory[i] != fileName[i]) return 0;\n  return 1;\n}\n\n/* directory access */\nint ioCanCreatePathOfSize(char* pathString, int pathStringLength) {\n#pragma unused(pathStringLength)\n  if(allowFileAccess) return 1;\n  return isAccessiblePathName(fromSqueak(pathString, pathStringLength));\n}\n\nint ioCanListPathOfSize(char* pathString, int pathStringLength) {\n#pragma unused(pathStringLength)\n  if(allowFileAccess) return 1;\n  return isAccessiblePathName(fromSqueak(pathString, pathStringLength));\n}\n\nint ioCanDeletePathOfSize(char* pathString, int pathStringLength) {\n#pragma unused(pathStringLength)\n  if(allowFileAccess) return 1;\n  return isAccessiblePathName(fromSqueak(pathString, pathStringLength));\n}\n\n/* file access */\nint ioCanOpenFileOfSizeWritable(char* pathString, int pathStringLength, int writeFlag) {\n#pragma unused(pathStringLength,writeFlag)\n  if(allowFileAccess) return 1;\n  return isAccessibleFileName(fromSqueak(pathString, pathStringLength));\n}\n\nint ioCanOpenAsyncFileOfSizeWritable(char* pathString, int pathStringLength, int writeFlag) {\n  return ioCanOpenFileOfSizeWritable(pathString,pathStringLength,writeFlag);\n}\nint ioCanDeleteFileOfSize(char* pathString, int pathStringLength) {\n#pragma unused(pathStringLength)\n  if(allowFileAccess) return 1;\n  return isAccessibleFileName(fromSqueak(pathString, pathStringLength));\n}\n\nint ioCanRenameFileOfSize(char* pathString, int pathStringLength) {\n#pragma unused(pathStringLength)\n  if(allowFileAccess) return 1;\n  return isAccessibleFileName(fromSqueak(pathString, pathStringLength));\n}\n\n\nint ioCanGetFileTypeOfSize(char* pathString, int pathStringLength) {\n#pragma unused(pathString,pathStringLength)\n  return 1; /* of no importance here */\n}\n\nint ioCanSetFileTypeOfSize(char* pathString, int pathStringLength) {\n#pragma unused(pathString,pathStringLength)\n  return 1; /* of no importance here */\n}\n\n/* disabling/querying */\nint ioDisableFileAccess(void) {\n  allowFileAccess = 0;\n return 0;\n}\n\nint ioHasFileAccess(void) {\n  return allowFileAccess;\n}\n\n/***************************************************************************/\n/***************************************************************************/\n/***************************************************************************/\n/***************************************************************************/\n/* image security */\n\nstatic int allowImageWrite = 1;  /* allow writing the image */\n\nint ioCanRenameImage(void) {\n  return allowImageWrite; /* only when we're allowed to save the image */\n}\n\nint ioCanWriteImage() {\n  return allowImageWrite;\n}\n\nint ioDisableImageWrite() {\n  allowImageWrite = 0;\n\treturn 0;\n}\n\n\n/***************************************************************************/\n/***************************************************************************/\n/***************************************************************************/\n/***************************************************************************/\n/* socket security - for now it's all or nothing */\nstatic int allowSocketAccess = 1; /* allow access to sockets */\n\nint ioCanCreateSocketOfType(int netType, int socketType) {\n#pragma unused(netType,socketType)\n  return allowSocketAccess;\n}\n\nint ioCanConnectToPort(int netAddr, int port) {\n#pragma unused(netAddr,port)\n  return allowSocketAccess;\n}\n\nint ioCanListenOnPort(int  s, int port) {\n#pragma unused(s,port)\n  return allowSocketAccess;\n}\n\nint ioDisableSocketAccess() {\n  allowSocketAccess = 0;\n\treturn 0;\n}\n\nint ioHasSocketAccess() {\n  return allowSocketAccess;\n}\n\n/***************************************************************************/\n/***************************************************************************/\n/***************************************************************************/\n/***************************************************************************/\n/* SecurityPlugin primitive support */\n\n\nchar *ioGetSecureUserDirectory(void) {\n  return  secureUserDirectory;\n}\n\nchar *ioGetUntrustedUserDirectory(void) {\n  return untrustedUserDirectory;\n}\n\n/* note: following is called from VM directly, not from plugin */\nint ioInitSecurity(void) {\n  extern char gSqueakUntrustedDirectoryName[],gSqueakTrustedDirectoryName[];\n  \n  if (gInitialized) return 1;\n  gInitialized  = true;\n\n  secureUserDirectory[0] = 0x00;\n  strcpy(secureUserDirectory, gSqueakTrustedDirectoryName);\n  untrustedUserDirectory[0] = 0x00;\n  strcpy(untrustedUserDirectory, gSqueakUntrustedDirectoryName);\n  return 1;\n}\n\n/***************************************************************************/\n/***************************************************************************/\n/***************************************************************************/\n/***************************************************************************/\n/* private entries for restoring rights */\nint _ioSetImageWrite(int enable);\n\nint _ioSetImageWrite(int enable) {\n  if(enable == allowImageWrite) return 1;\n  allowImageWrite = enable;\n  return 1;\n}\n\nint _ioSetFileAccess(int enable);\n\nint _ioSetFileAccess(int enable) {\n  if(enable == allowFileAccess) return 1;\n  allowFileAccess = enable;\n  return 1;\n}\n\nint _ioSetSocketAccess(int enable);\n\nint _ioSetSocketAccess(int enable) {\n  if(enable == allowSocketAccess) return 1;\n  allowSocketAccess = enable;\n  return 1;\n}\n\n\nvoid fixPath(char *path) {\n    long i;\n    for(i=strlen(path);i>0;i--) \n        if(path[i-1]==DELIMITERInt) {\n            path[i-1]=0x00;\n            return;\n        }\n}\n\nint dir_CreateSecurity(char *pathString, int pathStringLength) {\n\t/* Create a new directory with the given path. By default, this\n\t   directory is created in the current directory. Use\n\t   a full path name such as \"MyDisk:Working:New Folder\" to\n\t   create folders elsewhere. */\n\n    //JMM tests create file in Vm directory, other place, other volume\n\treturn dir_Create(pathString, pathStringLength);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SerialExtendedPlugin/Info-SerialExtendedUnixPlugin__Upgraded_.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>SerialExtendedUnixPlugin</string>\n\t<key>CFBundleGetInfoString</key>\n\t<string>SerialExtendedUnixPlugin V1.0.3 for Squeak, see http://www.squeak.org</string>\n\t<key>CFBundleIconFile</key>\n\t<string>SqueakPlugin.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.SerialExtendedUnixPlugin</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>SerialExtendedUnixPlugin V1.0.3 for Squeak</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0.3</string>\n\t<key>CFBundleSignature</key>\n\t<string>FAST</string>\n\t<key>CFBundleVersion</key>\n\t<string>1.0.3</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SerialExtendedPlugin/serialExtendedUnixPlugin.h",
    "content": "#include <termios.h>\r#include <unistd.h>\r#include <sys/types.h>\r#include <sys/stat.h>\r#include <sys/ioctl.h>\r#include <fcntl.h>\r#include <errno.h>\rint serialPortFindNamesPlusKeysstorage(int aUpperNumber, char *aByteArray);\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SerialExtendedPlugin/sqMacSerialExtended.c",
    "content": "\n#include \"sq.h\"\n#include <Carbon/Carbon.h>\n#include <IOKit/IOKitLib.h>\n#include <IOKit/serial/IOSerialKeys.h>\n#include <IOKit/IOBSD.h>\n#define MAXPATHLEN 256\n\nextern struct VirtualMachine *interpreterProxy;\n\nstatic kern_return_t FindModems(io_iterator_t *matchingServices);\nstatic void GetModemPath(io_iterator_t serialPortIterator, char *bsdPath, CFIndex maxPathSize, char *key, CFIndex maxKeySize);\nint serialPortFindNamesPlusKeysstorage(int numberOf,int storage);\n\nint serialPortFindNamesPlusKeysstorage(int numberOf,int storage) {\n    char *where;\n    int\ti;\n    io_iterator_t serialPortIterator;\n    kern_return_t  kernResult; \n    char  bsdPath[MAXPATHLEN], key[MAXPATHLEN];\n \n    where = (char *) storage;\n    kernResult = FindModems(&serialPortIterator);\n    if (kernResult != 0) \n        return kernResult;\n        \n    for(i=0;i<numberOf;i++) {\n\tGetModemPath(serialPortIterator, bsdPath, sizeof(bsdPath),key,sizeof(key));\n        if (bsdPath[0] == 0x00) \n                goto done;\n        memmove(where,key,strlen(key)+1);\n        where+= 256;\n        memmove(where,bsdPath,strlen(bsdPath)+1);\n        where+= 256;\n        \n    }\n    done:\n    IOObjectRelease(serialPortIterator); // Release the iterator.\n    return 0;\n \n}\n// Returns an iterator across all known modems. Caller is responsible for\n// releasing the iterator when iteration is complete.\nstatic kern_return_t FindModems(io_iterator_t *matchingServices)\n{\n    kern_return_t  kernResult; \n    mach_port_t   masterPort;\n    CFMutableDictionaryRef classesToMatch;\n\n/*! @function IOMasterPort\n    @abstract Returns the mach port used to initiate communication with IOKit.\n    @discussion Functions that don't specify an existing object require the IOKit master port to be passed. This function obtains that port.\n    @param bootstrapPort Pass MACH_PORT_NULL for the default.\n    @param masterPort The master port is returned.\n    @result A kern_return_t error code. */\n\n    kernResult = IOMasterPort(MACH_PORT_NULL, &masterPort);\n    if (KERN_SUCCESS != kernResult)\n    {\n        goto exit;\n    }\n        \n/*! @function IOServiceMatching\n    @abstract Create a matching dictionary that specifies an IOService class match.\n    @discussion A very common matching criteria for IOService is based on its class. IOServiceMatching will create a matching dictionary that specifies any IOService of a class, or its subclasses. The class is specified by C-string name.\n    @param name The class name, as a const C-string. Class matching is successful on IOService's of this class or any subclass.\n    @result The matching dictionary created, is returned on success, or zero on failure. The dictionary is commonly passed to IOServiceGetMatchingServices or IOServiceAddNotification which will consume a reference, otherwise it should be released with CFRelease by the caller. */\n\n    // Serial devices are instances of class IOSerialBSDClient\n    classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue);\n    if (classesToMatch == NULL)\n    {\n    }\n    else {\n/*!\n @function CFDictionarySetValue\n Sets the value of the key in the dictionary.\n @param theDict The dictionary to which the value is to be set. If this\n  parameter is not a valid mutable CFDictionary, the behavior is\n  undefined. If the dictionary is a fixed-capacity dictionary and\n  it is full before this operation, and the key does not exist in\n  the dictionary, the behavior is undefined.\n @param key The key of the value to set into the dictionary. If a key \n  which matches this key is already present in the dictionary, only\n  the value is changed (\"add if absent, replace if present\"). If\n  no key matches the given key, the key-value pair is added to the\n  dictionary. If added, the key is retained by the dictionary,\n  using the retain callback provided\n  when the dictionary was created. If the key is not of the sort\n  expected by the key retain callback, the behavior is undefined.\n @param value The value to add to or replace into the dictionary. The value\n  is retained by the dictionary using the retain callback provided\n  when the dictionary was created, and the previous value if any is\n  released. If the value is not of the sort expected by the\n  retain or release callbacks, the behavior is undefined.\n*/\n        /*CFDictionarySetValue(classesToMatch,\n                             CFSTR(kIOSerialBSDTypeKey),\n                             CFSTR(kIOSerialBSDModemType));\n        CFDictionarySetValue(classesToMatch,\n                             CFSTR(kIOSerialBSDTypeKey),\n                             CFSTR(kIOSerialBSDRS232Type));*/\n       // Each serial device object has a property with key\n        // kIOSerialBSDTypeKey and a value that is one of kIOSerialBSDAllTypes,\n        // kIOSerialBSDModemType, or kIOSerialBSDRS232Type. \n    }\n    \n    /*! @function IOServiceGetMatchingServices\n        @abstract Look up registered IOService objects that match a matching dictionary.\n        @discussion This is the preferred method of finding IOService objects currently registered by IOKit. IOServiceAddNotification can also supply this information and install a notification of new IOServices. The matching information used in the matching dictionary may vary depending on the class of service being looked up.\n        @param masterPort The master port obtained from IOMasterPort().\n        @param matching A CF dictionary containing matching information, of which one reference is consumed by this function. IOKitLib can contruct matching dictionaries for common criteria with helper functions such as IOServiceMatching, IOOpenFirmwarePathMatching.\n        @param existing An iterator handle is returned on success, and should be released by the caller when the iteration is finished.\n        @result A kern_return_t error code. */\n\n    kernResult = IOServiceGetMatchingServices(masterPort, classesToMatch, matchingServices);    \n    if (KERN_SUCCESS != kernResult)\n    {\n        goto exit;\n    }\n        \nexit:\n    return kernResult;\n}\n\n// Given an iterator across a set of modems, return the BSD path to the first one.\n// If no modems are found the path name is set to an empty string.\nstatic void GetModemPath(io_iterator_t serialPortIterator, char *bsdPath, CFIndex maxPathSize, char* key,CFIndex maxKeySize)\n{\n    io_object_t  modemService;\n    CFTypeRef bsdPathAsCFString,keyAtCFString;\n    \n    // Initialize the returned path\n    *bsdPath = '\\0';\n    \n    // Iterate across all modems found. \n        \n    modemService = IOIteratorNext(serialPortIterator);\n    if (modemService == nil)\n        return;\n \n // Get the callout device's path (/dev/cu.xxxxx). The callout device should almost always be\n // used: the dialin device (/dev/tty.xxxxx) would be used when monitoring a serial port for\n // incoming calls, e.g. a fax listener.\n \n    bsdPathAsCFString = IORegistryEntryCreateCFProperty(modemService,\n                                                            CFSTR(kIOCalloutDeviceKey),\n                                                            kCFAllocatorDefault,\n                                                            0);\n    if (bsdPathAsCFString)  {\n        Boolean result;\n            \n        // Convert the path from a CFString to a C (NUL-terminated) string for use\n        // with the POSIX open() call.\n     \n        result = CFStringGetCString(bsdPathAsCFString,\n                                        bsdPath,\n                                        maxPathSize, \n                                        kCFStringEncodingUTF8);\n        CFRelease(bsdPathAsCFString);\n    }\n    \n        \n    keyAtCFString = IORegistryEntryCreateCFProperty(modemService,\n                                                            CFSTR(kIOTTYDeviceKey),\n                                                            kCFAllocatorDefault,\n                                                            0);\n    if (keyAtCFString)  {\n        Boolean result;\n            \n        // Convert the path from a CFString to a C (NUL-terminated) string for use\n        // with the POSIX open() call.\n     \n        result = CFStringGetCString(keyAtCFString,\n                                        key,\n                                        maxKeySize, \n                                        kCFStringEncodingMacRoman);\n        CFRelease(keyAtCFString);\n        IOObjectRelease(modemService);\n    }\n    \n    IOObjectRelease(modemService);\n    return;\n}\n/* Description: This sample demonstrates how to use IOKitLib to find all serial ports on the system.\n                \n    Copyright:    Copyright 2000-2002 Apple Computer, Inc. All rights reserved.\n \n    Disclaimer:  IMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc.\n                        (\"Apple\") in consideration of your agreement to the following terms, and your\n                        use, installation, modification or redistribution of this Apple software\n                        constitutes acceptance of these terms.  If you do not agree with these terms,\n                        please do not use, install, modify or redistribute this Apple software.\n\n                        In consideration of your agreement to abide by the following terms, and subject\n                        to these terms, Apple grants you a personal, non-exclusive license, under Apple's\n                        copyrights in this original Apple software (the \"Apple Software\"), to use,\n                        reproduce, modify and redistribute the Apple Software, with or without\n                        modifications, in source and/or binary forms; provided that if you redistribute\n                        the Apple Software in its entirety and without modifications, you must retain\n                        this notice and the following text and disclaimers in all such redistributions of\n                        the Apple Software.  Neither the name, trademarks, service marks or logos of\n                        Apple Computer, Inc. may be used to endorse or promote products derived from the\n                        Apple Software without specific prior written permission from Apple.  Except as\n                        expressly stated in this notice, no other rights or licenses, express or implied,\n                        are granted by Apple herein, including but not limited to any patent rights that\n                        may be infringed by your derivative works or by other works in which the Apple\n                        Software may be incorporated.\n\n                        The Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE MAKES NO\n                        WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED\n                        WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n                        PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN\n                        COMBINATION WITH YOUR PRODUCTS.\n\n                        IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR\n                        CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n                        GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n                        ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION\n                        OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT\n                        (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN\n                        ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */\n                        "
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SerialPlugin/sqMacSerialPort.c",
    "content": "/****************************************************************************\n*   PROJECT: Squeak Headers\n*   FILE:    sqMacSerialPort.c\n*   CONTENT: \n*\n*   AUTHOR:  John Maloney, John McIntosh, and others.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacSerialPort.c 1708 2007-06-10 00:40:04Z johnmci $\n*\n*   NOTES: \n*  Feb 22nd, 2002, JMM enable 16 ports for serial, versus four, which was capped at 2?\n****************************************************************************/\n#include \"sq.h\"\n#include \"SerialPlugin.h\"\n\t#include <Carbon/Carbon.h>\nextern struct VirtualMachine *interpreterProxy;\n\n/*** Constants ***/\n#define INPUT_BUF_SIZE 1000\n\n/*** Serial Ports ***/\n#define MAX_PORTS 16\nstatic short outRefNum[MAX_PORTS] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};\n\n/*** Private Functions ***/\nint setHandshakeOptions(int portNum, int inFlowCtrl, int outFlowCtrl, int xOnChar, int xOffChar);\nint serialPortSetControl(int portNum,int control, char *data);\nint serialPortIsOpen(int portNum);\nint serialPortNames(int portNum, char *portName, char *inName, char *outName);\n\n/* initialize/shutdown */\nint serialPortInit() { return true; }\nint serialPortShutdown() {\n    int i;\n    for(i=0;i<MAX_PORTS;i++) {\n        if (serialPortIsOpen(i))\n            serialPortClose(i);\n    }\n\treturn 1;\n}\n\nEXPORT (int) serialPortCount(void) {\n  /* Return the number of serial ports available on this machine */\n    return false;\n\n }\n\nint serialPortIsOpen(int portNum) {\n\tif ((portNum < 0) || (portNum >= MAX_PORTS)) return false;\n\treturn outRefNum[portNum] != 0;\n}\n\nint serialPortSetControl(int portNum,int control, char *data) {\n#pragma unused(portNum,control,data)\n    return -1;\n}\n\nint serialPortNames(int portNum, char *portName, char *inName, char *outName) {\n/* Fill in the user name and input and output port names for the given\n   port number. Note that ports are numbered starting with zero. */\n#pragma unused(portNum,portName,inName,outName)\n\n    return false;\n }\n\nint setHandshakeOptions(\n  int portNum, int inFlowCtrl, int outFlowCtrl, int xOnChar, int xOffChar) {\n/* Set the given port's handshaking parameters. */\n#pragma unused(portNum,inFlowCtrl,outFlowCtrl,xOnChar,xOffChar)\n    return false;\n}\n/*** Serial Port Functions ***/\n\nEXPORT (int) serialPortClose(int portNum) {\n#pragma unused(portNum)\n    return false;\n}\n\nEXPORT (int) serialPortOpen(\n  int portNum, int baudRate, int stopBitsType, int parityType, int dataBits,\n  int inFlowCtrl, int outFlowCtrl, int xOnChar, int xOffChar) {\n/* Open the given serial port using the given settings. The baud rate can be\n   any number between about 224 and 57600; the driver will pick a clock\n   divisor that will generate the closest available baud rate. */\n#pragma unused(portNum,baudRate,stopBitsType,parityType,dataBits,inFlowCtrl,outFlowCtrl,xOnChar,xOffChar)\n    return false;\n}\n\nEXPORT (int) serialPortReadInto(int portNum, int count, int bufferPtr) {\n/* Read up to count bytes from the given serial port into the given byte array.\n   Read only up to the number of bytes in the port's input buffer; if fewer bytes\n   than count have been received, do not wait for additional data to arrive.\n   Return zero if no data is available. */\n#pragma unused(portNum,count,bufferPtr)\n    return false;\n}\n\nEXPORT (int) serialPortWriteFrom(int portNum, int count, int bufferPtr) {\n/* Write count bytes from the given byte array to the given serial port's\n   output buffer. Return the number of bytes written. This implementation is\n   synchronous: it doesn't return until the data has been sent. However, other\n   implementations may return before transmission is complete. */\n\n\tlong int byteCount = count;\n\tint osErr;\n\n\tif (!serialPortIsOpen(portNum)) {\n\t\treturn interpreterProxy->success(false);\n\t}\n\n\tosErr = FSWrite(outRefNum[portNum], &byteCount, (char *) bufferPtr);\n\tif (osErr != noErr) {\n\t\treturn interpreterProxy->success(false);\n\t}\n\treturn byteCount;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/ServicesPlugin/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>ServicesPlugin</string>\n\t<key>CFBundleIconFile</key>\n\t<string>SqueakPlugin.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.ServicesPlugin</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0.2b2</string>\n\t<key>CFBundleSignature</key>\n\t<string>FAST</string>\n\t<key>CFBundleVersion</key>\n\t<string>1.0.2b2</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/ServicesPlugin/JMMMacServices.5.cs",
    "content": "'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 15 February 2006 at 3:39:39 pm'!\r\"Change Set:\t\tJMMMacServices\rDate:\t\t\t13 June 2005\rAuthor:\t\t\tjohnmci@smalltalkconsulting.com\r\rMac Services, used by the Services logic to allow squeak to service requests from other application. The intial release executes the supplied UTF-8 string, then returns the result to the calling application\"!\r\rObject subclass: #MacServicesInterface\r\tinstanceVariableNames: 'servicesSemaphore servicesSemaIndex'\r\tclassVariableNames: 'Current MacServicesProcess'\r\tpoolDictionaries: ''\r\tcategory: 'Network-RemoteDirectory'!\r\r!MacServicesInterface commentStamp: '<historical>' prior: 0!\rMac Services interface.\ruses ServicesPlugin\rby\rJohn M McIntosh\rjohnmci@smalltalkconsulting.com\rJune 15th 2005\r!\r\r\r!MacServicesInterface methodsFor: 'accessing' stamp: 'JMM 9/8/2005 10:14'!\rgetBytes\r\t^self primGetBytes! !\r\r!MacServicesInterface methodsFor: 'accessing' stamp: 'JMM 6/12/2005 13:43'!\rgetTextString\r\t^self primGetTextString! !\r\r!MacServicesInterface methodsFor: 'accessing' stamp: 'JMM 6/12/2005 14:24'!\rsetBasicType\r\tself setDataTypes: 'TEXT'! !\r\r!MacServicesInterface methodsFor: 'accessing' stamp: 'JMM 9/8/2005 10:14'!\rsetBytes: aByteString\r\tself primSetBytes: aByteString! !\r\r!MacServicesInterface methodsFor: 'accessing' stamp: 'JMM 9/8/2005 10:16'!\rsetCopyOSType: aString\r\tself primSetCopyOSTypeString: aString! !\r\r!MacServicesInterface methodsFor: 'accessing' stamp: 'JMM 9/8/2005 13:03'!\rsetDataTypes: aDataTypeArray\r\t\"Needs a string of OSTypes, ie TEXTTIFF\"\r\t\"Types could be:\r  kScrapFlavorTypePicture       = 'PICT', /* contents of a PicHandle*/\r  kScrapFlavorTypeText          = 'TEXT', /* stream of characters*/\r  kScrapFlavorTypeTextStyle     = 'styl', /* see TEGetStyleScrapHandle*/\r  kScrapFlavorTypeMovie         = 'moov', /* reference to a movie*/\r  kScrapFlavorTypeSound         = 'snd ', /* see SndRecord and SndPlay*/\r  kScrapFlavorTypeUnicode       = 'utxt', /* stream of UTF16 characters*/\r  kScrapFlavorTypeUnicodeStyle  = 'ustl' /* ATSUI defines; Textension uses*/\r\r\talso other types like TIFF\r\r\t\"\r\tself primSetDataTypes: aDataTypeArray! !\r\r!MacServicesInterface methodsFor: 'accessing' stamp: 'JMM 9/8/2005 10:16'!\rsetPasteOSType: aString\r\tself primSetPasteOSTypeString: aString! !\r\r!MacServicesInterface methodsFor: 'accessing' stamp: 'JMM 9/8/2005 10:16'!\rsetPerformOSType: aString\r\tself primSetPerformOSTypeString: aString! !\r\r!MacServicesInterface methodsFor: 'accessing' stamp: 'JMM 9/8/2005 13:42'!\rsetReturnBytes: aString osType: aType\r\tself primSetReturnBytes: aString osType: aType! !\r\r!MacServicesInterface methodsFor: 'accessing' stamp: 'JMM 6/12/2005 15:14'!\rsetReturnTextString: aString\r\tself primSetReturnTextString: aString! !\r\r!MacServicesInterface methodsFor: 'accessing' stamp: 'JMM 6/12/2005 13:40'!\rsetTextString: aString\r\tself primSetTextString: aString! !\r\r!MacServicesInterface methodsFor: 'initialize-release' stamp: 'JMM 6/13/2005 21:31'!\rinitialize\r\tself installSemaphore.\r\tself setBasicType.\r\tself installServicesProcess! !\r\r!MacServicesInterface methodsFor: 'initialize-release' stamp: 'JMM 6/13/2005 21:44'!\rinstallSemaphore\r\tservicesSemaphore := Semaphore new.\r\tservicesSemaIndex := Smalltalk registerExternalObject: servicesSemaphore.\r\tself primSetSemaphore: servicesSemaIndex.\r\r! !\r\r!MacServicesInterface methodsFor: 'initialize-release' stamp: 'JMM 6/13/2005 21:27'!\rinstallServicesProcess\r\tMacServicesProcess ifNotNil: [MacServicesProcess terminate].\r\tMacServicesProcess := [self macServicesProcessLogic] forkAt: Processor userBackgroundPriority.\r! !\r\r!MacServicesInterface methodsFor: 'system primitives' stamp: 'JMM 9/8/2005 10:10'!\rprimGetBytes\r\r\t<primitive:'primitiveGetBytes' module: 'ServicesPlugin'>\r! !\r\r!MacServicesInterface methodsFor: 'system primitives' stamp: 'JMM 6/12/2005 13:42'!\rprimGetTextString\r\r\t<primitive:'primitiveGetTextString' module: 'ServicesPlugin'>\r! !\r\r!MacServicesInterface methodsFor: 'system primitives' stamp: 'JMM 9/8/2005 10:11'!\rprimSetBytes: aString\r\r\t<primitive:'primitiveSetBytes' module: 'ServicesPlugin'>\r! !\r\r!MacServicesInterface methodsFor: 'system primitives' stamp: 'JMM 9/8/2005 10:12'!\rprimSetCopyOSTypeString: aString\r\r\t<primitive:'primitiveSetCopyOSTypeString' module: 'ServicesPlugin'>\r! !\r\r!MacServicesInterface methodsFor: 'system primitives' stamp: 'JMM 6/12/2005 13:38'!\rprimSetDataTypes: typeString\r\r\t<primitive:'primitiveSetDataTypes' module: 'ServicesPlugin'>\r! !\r\r!MacServicesInterface methodsFor: 'system primitives' stamp: 'JMM 9/8/2005 10:12'!\rprimSetPasteOSTypeString: aString\r\r\t<primitive:'primitiveSetPasteOSTypeString' module: 'ServicesPlugin'>\r! !\r\r!MacServicesInterface methodsFor: 'system primitives' stamp: 'JMM 9/8/2005 10:13'!\rprimSetPerformOSTypeString: aString\r\r\t<primitive:'primitiveSetPerformOSTypeString' module: 'ServicesPlugin'>\r! !\r\r!MacServicesInterface methodsFor: 'system primitives' stamp: 'JMM 9/8/2005 13:39'!\rprimSetReturnBytes: aString osType: aType\r\r\t<primitive:'primitiveSetReturnBytes' module: 'ServicesPlugin'>\r! !\r\r!MacServicesInterface methodsFor: 'system primitives' stamp: 'JMM 6/12/2005 15:14'!\rprimSetReturnTextString: aString\r\r\t<primitive:'primitiveSetReturnTextString' module: 'ServicesPlugin'>\r! !\r\r!MacServicesInterface methodsFor: 'system primitives' stamp: 'JMM 6/13/2005 21:39'!\rprimSetSemaphore: aSemaIndex\r\r\t<primitive:'primitiveSetSemaphore' module: 'ServicesPlugin'>\r! !\r\r!MacServicesInterface methodsFor: 'system primitives' stamp: 'JMM 6/12/2005 14:30'!\rprimSetTextString: aString\r\r\t<primitive:'primitiveSetTextString' module: 'ServicesPlugin'>\r! !\r\r!MacServicesInterface methodsFor: 'process' stamp: 'JMM 9/8/2005 13:43'!\rgetDataExecuteAndReturn\r\t| string results resultsString |\r\r\tstring := self getBytes.\r\tresults := Compiler evaluate: string asString.\r\tresultsString := results printString.\r\tself setReturnBytes: resultsString asByteArray osType: 'TEXT'. ! !\r\r!MacServicesInterface methodsFor: 'process' stamp: 'JMM 9/8/2005 13:43'!\rmacServicesProcessLogic\r\r\t[servicesSemaphore wait.\r\t[self getDataExecuteAndReturn] on: Error do: [:ex | self setReturnBytes: String new osType: 'TEXT'].\r\ttrue ] whileTrue.! !\r\r\r!MacServicesInterface class methodsFor: 'accessing' stamp: 'JMM 6/13/2005 21:21'!\rcurrent\r\tCurrent ifNil: [Current := self new].\r\t^Current! !\r\r!MacServicesInterface class methodsFor: 'initialize-release' stamp: 'JMM 6/13/2005 21:21'!\rshutDown: quitting\r! !\r\r!MacServicesInterface class methodsFor: 'initialize-release' stamp: 'JMM 6/13/2005 21:34'!\rstartUp: resuming\r\t\"The image is either being newly started (resuming is true), or it's just been snapshotted\"\r\r\tCurrent := nil.\r\tself current.! !\r\r!MacServicesInterface class methodsFor: 'class initialization' stamp: 'JMM 6/13/2005 21:19'!\rinitialize\r\t\"MacServicesInterface initialize\"\r\tSmalltalk addToStartUpList: self after: nil.\r\tSmalltalk addToShutDownList: self after: nil.! !\r\rMacServicesInterface initialize!\r\r!MacServicesInterface class reorganize!\r('accessing' current)\r('initialize-release' shutDown: startUp:)\r('class initialization' initialize)\r!\r\r\r!MacServicesInterface reorganize!\r('accessing' getBytes getTextString setBasicType setBytes: setCopyOSType: setDataTypes: setPasteOSType: setPerformOSType: setReturnBytes:osType: setReturnTextString: setTextString:)\r('initialize-release' initialize installSemaphore installServicesProcess)\r('system primitives' primGetBytes primGetTextString primSetBytes: primSetCopyOSTypeString: primSetDataTypes: primSetPasteOSTypeString: primSetPerformOSTypeString: primSetReturnBytes:osType: primSetReturnTextString: primSetSemaphore: primSetTextString:)\r('process' getDataExecuteAndReturn macServicesProcessLogic)\r!\r\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/ServicesPlugin/JMMServicesPlugin.2.cs",
    "content": "'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 8 September 2005 at 3:07:58 pm'!\rSmartSyntaxInterpreterPlugin subclass: #ServicesPlugin\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'VMMaker-Plugins'!\r\r!ServicesPlugin methodsFor: 'initialize' stamp: 'JMM 6/12/2005 11:17'!\rinitialiseModule\r\tself export: true.\r\t^self sqServicesInitialize ! !\r\r!ServicesPlugin methodsFor: 'initialize' stamp: 'JMM 6/12/2005 11:17'!\rmoduleUnloaded: aModuleName \r\t\"The module with the given name was just unloaded. \r\tMake sure we have no dangling references.\"\r\tself export: true.\r\tself var: #aModuleName type: 'char *'.\r\t(aModuleName strcmp: 'ServicesPlugin') = 0\r\t\tifTrue: [self sqServicesShutdown]! !\r\r!ServicesPlugin methodsFor: 'initialize' stamp: 'JMM 9/8/2005 09:21'!\rprimitiveGetBytes\r\t\"Setup bytes, could be text, could be TIFF\"\r\t| length oop |\r\r\tself primitive: 'primitiveGetBytes'.\r\tlength := self sqServicesGetTextStringLength.\r\toop := interpreterProxy instantiateClass: interpreterProxy classByteArray indexableSize: length.\r\tself sqServicesGetTextStringInto: (interpreterProxy firstIndexableField: oop).\r\t^oop\r\r! !\r\r!ServicesPlugin methodsFor: 'initialize' stamp: 'JMM 6/12/2005 13:11'!\rprimitiveGetTextString\r\t\"Setup text string\"\r\t| length oop |\r\r\tself primitive: 'primitiveGetTextString'.\r\tlength := self sqServicesGetTextStringLength.\r\toop := interpreterProxy instantiateClass: interpreterProxy classString indexableSize: length.\r\tself sqServicesGetTextStringInto: (interpreterProxy firstIndexableField: oop).\r\t^oop\r\r! !\r\r!ServicesPlugin methodsFor: 'initialize' stamp: 'JMM 9/8/2005 09:23'!\rprimitiveSetBytes: aTextString\r\t\"Setup text string\"\r\t| dataTypesLength |\r\r\tself primitive: 'primitiveSetBytes'\r\t\tparameters: #(ByteArray).\r\tdataTypesLength := interpreterProxy slotSizeOf: aTextString cPtrAsOop.\r\tself sqServicesSetTextString:   aTextString length: dataTypesLength.\r\r! !\r\r!ServicesPlugin methodsFor: 'initialize' stamp: 'JMM 9/8/2005 09:40'!\rprimitiveSetCopyOSTypeString: aTextString\r\t\"Setup copy ostype string\"\r\r\tself primitive: 'primitiveSetCopyOSTypeString'\r\t\tparameters: #(String).\r\tself sqServicesSetCopyOSTypeString:   aTextString.\r\r! !\r\r!ServicesPlugin methodsFor: 'initialize' stamp: 'JMM 6/12/2005 11:25'!\rprimitiveSetDataTypes: dataTypes\r\t\"OSType MyAppsDataTypes[] ='TEXT','PICT','MooV','AIFF','utxt'}; \"\r\t| dataTypesLength |\r\r\tself primitive: 'primitiveSetDataTypes'\r\t\tparameters: #(String).\r\tdataTypesLength := interpreterProxy slotSizeOf: dataTypes cPtrAsOop.\r\tself sqServicesSetDataTypes:   dataTypes length: dataTypesLength.\r\r! !\r\r!ServicesPlugin methodsFor: 'initialize' stamp: 'JMM 9/8/2005 09:40'!\rprimitiveSetPasteOSTypeString: aTextString\r\t\"Setup paste ostype string\"\r\r\tself primitive: 'primitiveSetPasteOSTypeString'\r\t\tparameters: #(String).\r\tself sqServicesSetPasteOSTypeString:   aTextString.\r\r! !\r\r!ServicesPlugin methodsFor: 'initialize' stamp: 'JMM 9/8/2005 09:41'!\rprimitiveSetPerformOSTypeString: aTextString\r\t\"Setup perform ostype string\"\r\r\tself primitive: 'primitiveSetPerformOSTypeString'\r\t\tparameters: #(String).\r\tself sqServicesSetPerformOSTypeString:   aTextString.\r\r! !\r\r!ServicesPlugin methodsFor: 'initialize' stamp: 'JMM 9/8/2005 09:19'!\rprimitiveSetReturnBytes: aByteArray osType: aOSType\r\t\"Setup text string\"\r\t| dataTypesLength |\r\r\tself primitive: 'primitiveSetReturnBytes'\r\t\tparameters: #(ByteArray String).\r\tdataTypesLength := interpreterProxy slotSizeOf: aByteArray cPtrAsOop.\r\tself sqServicesSetBytes:   aByteArray length: dataTypesLength osType: aOSType.\r\r! !\r\r!ServicesPlugin methodsFor: 'initialize' stamp: 'JMM 6/12/2005 15:13'!\rprimitiveSetReturnTextString: aTextString\r\t\"Setup text string\"\r\t| dataTypesLength |\r\r\tself primitive: 'primitiveSetReturnTextString'\r\t\tparameters: #(String).\r\tdataTypesLength := interpreterProxy slotSizeOf: aTextString cPtrAsOop.\r\tself sqServicesSetReturnTextString:   aTextString length: dataTypesLength.\r\r! !\r\r!ServicesPlugin methodsFor: 'initialize' stamp: 'JMM 6/12/2005 11:33'!\rprimitiveSetSemaphore: semi\r\r\tself primitive: 'primitiveSetSemaphore'\r\t\tparameters: #(SmallInteger).\r\tself sqServicesSetSemaphore:  semi.\r\r! !\r\r!ServicesPlugin methodsFor: 'initialize' stamp: 'JMM 6/12/2005 11:44'!\rprimitiveSetTextString: aTextString\r\t\"Setup text string\"\r\t| dataTypesLength |\r\r\tself primitive: 'primitiveSetTextString'\r\t\tparameters: #(String).\r\tdataTypesLength := interpreterProxy slotSizeOf: aTextString cPtrAsOop.\r\tself sqServicesSetTextString:   aTextString length: dataTypesLength.\r\r! !\r\r\r!ServicesPlugin class methodsFor: 'translation' stamp: 'JMM 9/8/2005 09:48'!\rhasHeaderFile\r\t\"If there is a single intrinsic header file to be associated with the plugin, here is where you want to flag\"\r\t^true! !\r\r!ServicesPlugin class methodsFor: 'translation' stamp: 'JMM 9/8/2005 09:52'!\rrequiresCrossPlatformFiles\r\n\t\"default is ok for most, any plugin needing platform specific files must say so\"\r\n\t^false! !\r\r!ServicesPlugin class methodsFor: 'translation' stamp: 'JMM 6/12/2005 13:12'!\rrequiresPlatformFiles\r\t\"this plugin requires platform specific files in order to work\"\r\t^true! !\r\r\r!ServicesPlugin class reorganize!\r('translation' hasHeaderFile requiresCrossPlatformFiles requiresPlatformFiles)\r!\r\r\r!ServicesPlugin reorganize!\r('initialize' initialiseModule moduleUnloaded: primitiveGetBytes primitiveGetTextString primitiveSetBytes: primitiveSetCopyOSTypeString: primitiveSetDataTypes: primitiveSetPasteOSTypeString: primitiveSetPerformOSTypeString: primitiveSetReturnBytes:osType: primitiveSetReturnTextString: primitiveSetSemaphore: primitiveSetTextString:)\r!\r\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/ServicesPlugin/MacServicesReadMe.rtf",
    "content": "{\\rtf1\\mac\\ansicpg10000\\cocoartf824\\cocoasubrtf110\n{\\fonttbl\\f0\\froman\\fcharset77 TimesNewRomanPSMT;\\f1\\fnil\\fcharset77 LucidaGrande;}\n{\\colortbl;\\red255\\green255\\blue255;}\n\\margl1440\\margr1440\\vieww11420\\viewh12140\\viewkind0\n\\pard\\tx566\\tx1133\\tx1700\\tx2267\\tx2834\\tx3401\\tx3968\\tx4535\\tx5102\\tx5669\\tx6236\\tx6803\\ql\\qnatural\\pardirnatural\n\n\\f0\\fs28 \\cf0 MacServices\\\nJune 13th, 2005, Sept 9th, 2005\\\nJohn M McIntosh\\\njohnmci@smalltalkconsulting.com\\\n\\\nVisit my Idisk, \n\\f1\\fs24 experimental:MacServices directory\n\\f0\\fs28  \\\n\\\nThis plugin and change set, along with a 3.8.8b3 (or higher) VM allow you to enter the world of OS-X services. With this change you can select text, give it to the plugin, then select from the Services menu, and have the service grab the text. Also you can from many applications select text, invoke Squeak DoIt from the services menu and get a result back from invoking Compile on the selected text. \\\n\\\nIn the 1.0.1 plugin release and JMMMacServices.4.cs change set you can set the type of data to something other than TEXT, for example 16 bit unicode  'utxt' \\\n\\\nMacServicesInterface current setBytes:\\\n\t\t ('ackbar' convertToWithConverter: (TextConverter newForEncoding: 'utf-16')).\\\n\\\nTo make this happen on your machine. \\\n\\\nInstalll the Squeak 3.8.8beta3.app.zip (or higher) unzipped in your Application's directory and log off and back on your machine. This is the only way (unless someone discovers another way) to make os-x rebuild the list of available services, so that the Squeak DoIt item will appear in the menu. A quick check would be to check the Services menu once you sign back on to see if Squeak is there. \\\n\\\nInstall the unzipped ServicesPlugin.bundle.zip in your plugins folder by the 3.8.8b3 VM\\\n\\\nFile in the change set JMMMacServices.4.cs into a TEST image for testing. I'll note it installs a startup and shutdown method, so something bad could happen, and runs a process that is responsible for processing incoming Service requests. \\\n\\\nLaunch Apple's textedit , type in 1000 factorial, select go to Services menu and pick \\\n\"Squeak DoIt\" \\\n\\\nWhat is pending:\\\n\\\na) Right now to sent the text string you want to work with on the services menu you must invoke: MacServicesInterface current setTextString: Someone could change the logic such that selecting text, auto-runs MacServicesInterface current setTextString:   I have not done that. Contributions are welcome!\\\n\\\nb) Ability to send text to a service and get the data back automatically. For now this requires you to invoke MacServicesInterface current getTextString.  Later we may add a semaphore and loop to invoke a paste or something. Not quite sure if getting the data back works yet. \\\n\\\n\\\nc) MacServicesInterface >>macServicesProcessLogic & getDataExecuteAndReturn  both set the return string to the results of the compile printString. However this might not be what we want, perhaps you return the original string, and the results? In Apple's TextEdit it acts as a cut/paste. \\\n\\\nd) I may make Squeak a sub menu to allow you to say DoIt, DoItPaste, DoItOriginalPaste or something\\\n\\\nIn the 1.01 release I added the feature to allow you to pass bytes into and from the inteface via:\\\n\\\ngetBytes\\\nsetBytes: \\\n\\\nTo specify the data types to the Services interface you can now set \\\n\\\nsetCopyOSType:\\\nsetPasteOSType:\\\nsetPerformOSType:\\\n\\\nto use a different type from 'TEXT'\\\nSo for example if you want to invoke GRAB to get a screen image you would do \\\n\\\nMacServicesInterface current setDataTypes: 'TEXTTIFFutxt'.\\\nMacServicesInterface current setPasteOSType: 'TIFF'\\\nThen invoke the Service>>Grab \\\nThen invoke \\\n\\\nMacServicesInterface current getBytes.\\\n\\\nSay you want to paste UTF-16 to TextEdit\\\n\\\nMacServicesInterface current setCopyOSType: 'utxt'\\\nMacServicesInterface current setBytes:\\\n\t\t ('ackbar' convertToWithConverter: (TextConverter newForEncoding: 'utf-16')).\\\n\\\nIn order to use setPerformOSType:  which will allow for incoming Squeak DoIt requests to another type than 'TEXT' you must alter:\\\n\\\nMacServicesInterface >>getDataExecuteAndReturn\\\n\\\nTo change it from getBytes, to perhaps use a TextConverter to convert say utf-16 ('utxt') to a string so the Compiler evaluate: string  will work as expected. \\\n\r\\\nObservations\\\n\\\na) Invoking text as a SqueakDoIt Service causes Squeak to come to the foreground, then be hidden, yes it's annoying, but that is how the interface works. \\\n\\\nb) Not all systems work as you expect, composing in mail and invoking SqueakDoIt Service does not work as expected, not sure why. \\\n\\\nc) Invoking SqueakDoIt from an application if squeak is not running causes os-x to launch the Squeak VM that exists in your Applications folder. \\\n\\\nd) You must set the OSTYPE for cut/copy/paste between image startups to what you expect, the values default to 'TEXT'\\\n}"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/ServicesPlugin/SqueakServices.pbproj/johnmci.mode1",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>ActivePerspectiveName</key>\n\t<string>Project</string>\n\t<key>AllowedModules</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Groups and Files Outline View</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCTaskListModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Task List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDetailModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>File and Smart Group Detail Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Detailed Build Results Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Batch Find Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Run Log</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXCVSModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Source Code Control Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Breakpoints Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDockableInspector</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Inspector</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXOpenQuicklyModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Open Quickly Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Console</string>\n\t\t</dict>\n\t</array>\n\t<key>Description</key>\n\t<string>DefaultDescriptionKey</string>\n\t<key>DockingSystemVisible</key>\n\t<false/>\n\t<key>Extension</key>\n\t<string>mode1</string>\n\t<key>FavBarConfig</key>\n\t<dict>\n\t\t<key>PBXProjectModuleGUID</key>\n\t\t<string>94AF35A4084782DD00FA5ACB</string>\n\t\t<key>XCBarModuleItemNames</key>\n\t\t<dict/>\n\t\t<key>XCBarModuleItems</key>\n\t\t<array/>\n\t</dict>\n\t<key>FirstTimeWindowDisplayed</key>\n\t<false/>\n\t<key>Identifier</key>\n\t<string>com.apple.perspectives.project.mode1</string>\n\t<key>MajorVersion</key>\n\t<integer>31</integer>\n\t<key>MinorVersion</key>\n\t<integer>1</integer>\n\t<key>Name</key>\n\t<string>Default</string>\n\t<key>Notifications</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>XCObserverAutoDisconnectKey</key>\n\t\t\t<true/>\n\t\t\t<key>XCObserverDefintionKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusErrorsKey</key>\n\t\t\t\t<integer>0</integer>\n\t\t\t</dict>\n\t\t\t<key>XCObserverFactoryKey</key>\n\t\t\t<string>XCPerspectivesSpecificationIdentifier</string>\n\t\t\t<key>XCObserverGUIDKey</key>\n\t\t\t<string>XCObserverProjectIdentifier</string>\n\t\t\t<key>XCObserverNotificationKey</key>\n\t\t\t<string>PBXStatusBuildStateMessageNotification</string>\n\t\t\t<key>XCObserverTargetKey</key>\n\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t<key>XCObserverTriggerKey</key>\n\t\t\t<string>awakenModuleWithObserver:</string>\n\t\t\t<key>XCObserverValidationKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusErrorsKey</key>\n\t\t\t\t<integer>2</integer>\n\t\t\t</dict>\n\t\t</dict>\n\t</array>\n\t<key>OpenEditors</key>\n\t<array/>\n\t<key>PerspectiveWidths</key>\n\t<array>\n\t\t<integer>-1</integer>\n\t\t<integer>-1</integer>\n\t</array>\n\t<key>Perspectives</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>ChosenToolbarItems</key>\n\t\t\t<array>\n\t\t\t\t<string>active-target-popup</string>\n\t\t\t\t<string>active-buildstyle-popup</string>\n\t\t\t\t<string>action</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>buildOrClean</string>\n\t\t\t\t<string>build-and-runOrDebug</string>\n\t\t\t\t<string>com.apple.ide.PBXToolbarStopButton</string>\n\t\t\t\t<string>get-info</string>\n\t\t\t\t<string>toggle-editor</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>com.apple.pbx.toolbar.searchfield</string>\n\t\t\t</array>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProjectWithEditor</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.project</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>66DF6BFE01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66B8BC570381F53800A8011A</string>\n\t\t\t\t\t\t\t\t<string>66DF6BFF01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66DF6C3901D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>944D6212085F458100600D6E</string>\n\t\t\t\t\t\t\t\t<string>944D6213085F458100600D6E</string>\n\t\t\t\t\t\t\t\t<string>66DF6C8201D7DF7E00A80119</string>\n\t\t\t\t\t\t\t\t<string>66DF6C4501D7DEEE00A80119</string>\n\t\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>9</integer>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 693}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 711}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>429 90 908 752 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>203pt</string>\n\t\t\t\t</dict>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>sqMacServices.c</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CE0B20406471E060097A5F4</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>sqMacServices.c</string>\n\t\t\t\t\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t\t\t\t\t<string>94859C4308D0E67B0084EF9E</string>\n\t\t\t\t\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>949CD5C0085CC32700EB8605</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>944D6240085F473000600D6E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>941022CE0867E11B00AEB432</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E4F4B608D0987B00B9E724</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E4F51908D0A7C500B9E724</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E4F51B08D0A7C500B9E724</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E0B9F008D0DA420031D5D3</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E0BA3008D0DDBE0031D5D3</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t\t<key>prevStack</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>949CD574085CBE0300EB8605</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>949CD576085CBE0300EB8605</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>949CD577085CBE0300EB8605</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>949CD5C5085CC32700EB8605</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>949CD5C6085CC32700EB8605</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>944D621E085F45A500600D6E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E4F4DC08D0A2D300B9E724</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E4F51E08D0A7C500B9E724</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {700, 649}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>429 90 908 752 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>649pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 654}, {700, 58}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>429 90 908 752 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>58pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>700pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>94859C2208D0DE7C0084EF9E</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>94859C2308D0DE7C0084EF9E</string>\n\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProject</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.morph</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>29B97314FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 337}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 355}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>373 269 690 397 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Morph</string>\n\t\t\t<key>PreferredWidth</key>\n\t\t\t<integer>300</integer>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default.short</string>\n\t\t</dict>\n\t</array>\n\t<key>PerspectivesBarVisible</key>\n\t<false/>\n\t<key>ShelfIsVisible</key>\n\t<false/>\n\t<key>SourceDescription</key>\n\t<string>file at '/System/Library/PrivateFrameworks/DevToolsInterface.framework/Versions/A/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string>\n\t<key>StatusbarIsVisible</key>\n\t<true/>\n\t<key>TimeStamp</key>\n\t<real>147908219.01835099</real>\n\t<key>ToolbarDisplayMode</key>\n\t<integer>1</integer>\n\t<key>ToolbarIsVisible</key>\n\t<true/>\n\t<key>ToolbarSizeMode</key>\n\t<integer>2</integer>\n\t<key>Type</key>\n\t<string>Perspectives</string>\n\t<key>UpdateMessage</key>\n\t<string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the \"Metro-Morph\" feature).  You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature.  Do you wish to update to the latest Workspace defaults for project '%@'?</string>\n\t<key>WindowJustification</key>\n\t<integer>5</integer>\n\t<key>WindowOrderList</key>\n\t<array>\n\t\t<string>94859C4508D0E67B0084EF9E</string>\n\t\t<string>94859C4608D0E67B0084EF9E</string>\n\t\t<string>94859C3008D0E1C20084EF9E</string>\n\t\t<string>94859C3108D0E1C20084EF9E</string>\n\t\t<string>94ABA92F0858D3A300079BE1</string>\n\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t<string>94859C2A08D0DE7C0084EF9E</string>\n\t\t<string>/Users/johnmci/Documents/SqueakServicesPlugin/SqueakServices.pbproj</string>\n\t\t<string>94E4F4CD08D0A1CA00B9E724</string>\n\t</array>\n\t<key>WindowString</key>\n\t<string>429 90 908 752 0 0 1440 878 </string>\n\t<key>WindowTools</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.build</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string></string>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {879, 326}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>91 68 879 795 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>326pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Build</string>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Collapse</key>\n\t\t\t\t\t\t\t\t<integer>1021</integer>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Open</key>\n\t\t\t\t\t\t\t\t<integer>1012</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 331}, {879, 423}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>91 68 879 795 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>423pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>754pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Build Results</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>94E4F4CD08D0A1CA00B9E724</string>\n\t\t\t\t<string>94859C4408D0E67B0084EF9E</string>\n\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.build</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>91 68 879 795 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>94E4F4CD08D0A1CA00B9E724</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugger</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Debugger</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {373, 325}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 325}, {373, 379}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {373, 704}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{373, 0}, {769, 704}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debug - GLUTExamples (Underwater)</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>DebugConsoleDrawerSize</key>\n\t\t\t\t\t\t\t\t<string>{100, 120}</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleVisible</key>\n\t\t\t\t\t\t\t\t<string>None</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>DebugSTDIOWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1142, 704}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>196 68 1142 745 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>704pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>704pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t\t<string>94859C2408D0DE7C0084EF9E</string>\n\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t<string>94859C2508D0DE7C0084EF9E</string>\n\t\t\t\t<string>94859C2608D0DE7C0084EF9E</string>\n\t\t\t\t<string>94859C2708D0DE7C0084EF9E</string>\n\t\t\t\t<string>94859C2808D0DE7C0084EF9E</string>\n\t\t\t\t<string>94859C2908D0DE7C0084EF9E</string>\n\t\t\t\t<string>94859C2A08D0DE7C0084EF9E</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debug</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>196 68 1142 745 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.find</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>sqMacServices.h</string>\n\t\t\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {791, 416}}</string>\n\t\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t\t<string>51 90 791 674 0 0 1440 878 </string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t\t\t<string>791pt</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>416pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Project Find</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 421}, {791, 212}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>51 90 791 674 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>212pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>633pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Find</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t\t<string>94E4F4D608D0A1CA00B9E724</string>\n\t\t\t\t<string>94E4F4D708D0A1CA00B9E724</string>\n\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>51 90 791 674 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>MENUSEPARATOR</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debuggerConsole</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debugger Console</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {686, 500}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>759 114 686 541 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>500pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>500pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger Console</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>94ABA92F0858D3A300079BE1</string>\n\t\t\t\t<string>94859C2E08D0E1C20084EF9E</string>\n\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>759 114 686 541 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>94ABA92F0858D3A300079BE1</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.run</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>3</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528B0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Run</string>\n\t\t\t\t\t\t\t\t<key>Runner</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {493, 167}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 176}, {493, 267}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {405, 443}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{414, 0}, {514, 443}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {460, 159}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>316 696 459 200 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>159pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>159pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Run Log</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2B3069F1EA900FABCE6</string>\n\t\t\t\t<string>1C0AD2B4069F1EA900FABCE6</string>\n\t\t\t\t<string>1CD0528B0623707200166675</string>\n\t\t\t\t<string>1C0AD2B5069F1EA900FABCE6</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.run</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>316 696 459 200 0 0 1280 1002 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2B3069F1EA900FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.scm</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1C78EAB3065D492600B07095</string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>0pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>SCM</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ConsoleFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 259}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 7}, {452, 259}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t\t<key>TableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>Status</string>\n\t\t\t\t\t\t\t\t\t<real>30</real>\n\t\t\t\t\t\t\t\t\t<string>FileName</string>\n\t\t\t\t\t\t\t\t\t<real>199</real>\n\t\t\t\t\t\t\t\t\t<string>Path</string>\n\t\t\t\t\t\t\t\t\t<real>197.09500122070312</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>TableFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 250}}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>262pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>266pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>SCM</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAB4065D492600B07095</string>\n\t\t\t\t<string>1C78EAB5065D492600B07095</string>\n\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.scm</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.breakpoints</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD052930623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Breakpoints</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>BreakpointsTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>enabledColumn</string>\n\t\t\t\t\t\t\t\t\t<real>16</real>\n\t\t\t\t\t\t\t\t\t<string>breakpointColumn</string>\n\t\t\t\t\t\t\t\t\t<real>482</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {506, 360}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>780 250 506 380 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>360pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>360pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Breakpoints</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<false/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2AD069F1E9B00FABCE6</string>\n\t\t\t\t<string>94F94C8F085D4373008ACC85</string>\n\t\t\t\t<string>1CD052930623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>780 250 506 380 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2AD069F1E9B00FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.bookmarks</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>538 42 401 187 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.classBrowser</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>OptionsSetName</key>\n\t\t\t\t\t\t\t\t<string>Hierarchy, all classes</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Class Browser - NSObject</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ClassesFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {378, 96}}</string>\n\t\t\t\t\t\t\t\t<key>ClassesTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXClassNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>208</real>\n\t\t\t\t\t\t\t\t\t<string>PBXClassBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {630, 332}}</string>\n\t\t\t\t\t\t\t\t<key>MembersFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 101}, {378, 231}}</string>\n\t\t\t\t\t\t\t\t<key>MembersTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeIconColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>216</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>101</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>312 384 630 352 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>332pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>332pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<false/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t\t<string>949CD652085CD34000EB8605</string>\n\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.classbrowser</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>312 384 630 352 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/ServicesPlugin/SqueakServices.pbproj/johnmci.pbxuser",
    "content": "// !$*UTF8*$!\n{\n\t66B8BC5A0381F63A00A8011A = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1064, 2142}}\";\n\t\t\tsepNavSelRange = \"{1454, 21}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {659, 490}}\";\n\t\t};\n\t};\n\t66B8BC5C0381F66500A8011A = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {740, 6117}}\";\n\t\t\tsepNavSelRange = \"{16850, 24}\";\n\t\t\tsepNavVisRect = \"{{0, 5935}, {740, 73}}\";\n\t\t};\n\t};\n\t66B8BC5E0381F69100A8011A = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {673, 2968}}\";\n\t\t\tsepNavSelRange = \"{1486, 20}\";\n\t\t\tsepNavVisRect = \"{{0, 9}, {673, 397}}\";\n\t\t\tsepNavWindowFrame = \"{{84, 252}, {750, 558}}\";\n\t\t};\n\t};\n\t66DF6BFD01D7DCEA00A80119 = {\n\t\tactiveBuildStyle = 66DF6C4401D7DCEA00A80119;\n\t\tactiveExecutable = 94ABA91E0858D35E00079BE1;\n\t\tactiveTarget = 94AF34E00846F91100FA5ACB;\n\t\taddToTargets = (\n\t\t\t94AF34E00846F91100FA5ACB,\n\t\t);\n\t\tbreakpoints = (\n\t\t\t94E4F52F08D0B2D800B9E724,\n\t\t\t94E4F55308D0CE0000B9E724,\n\t\t\t94859C3B08D0E2FB0084EF9E,\n\t\t\t94859C3E08D0E3370084EF9E,\n\t\t);\n\t\tcodeSenseManager = 9444E60E06E7B8740063F6CC;\n\t\texecutables = (\n\t\t\t94ABA91E0858D35E00079BE1,\n\t\t);\n\t\texpressions = (\n\t\t\tbuffer,\n\t\t);\n\t\tperUserDictionary = {\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXErrorsWarningsDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXErrorsWarningsDataSource_LocationID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t300,\n\t\t\t\t\t200,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXErrorsWarningsDataSource_TypeID,\n\t\t\t\t\tPBXErrorsWarningsDataSource_MessageID,\n\t\t\t\t\tPBXErrorsWarningsDataSource_LocationID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXExecutablesDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXExecutablesDataSource_NameID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t22,\n\t\t\t\t\t300,\n\t\t\t\t\t348.5835,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXExecutablesDataSource_ActiveFlagID,\n\t\t\t\t\tPBXExecutablesDataSource_NameID,\n\t\t\t\t\tPBXExecutablesDataSource_CommentsID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t461,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t\t20,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Target_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t200,\n\t\t\t\t\t63,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXTargetDataSource_PrimaryAttribute,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXPerProjectTemplateStateSaveDate = 147906161;\n\t\t\tPBXPrepackagedSmartGroups_v2 = (\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tactivationKey = OldTargetSmartGroup;\n\t\t\t\t\tclz = PBXTargetSmartGroup;\n\t\t\t\t\tdescription = \"Displays all targets of the project.\";\n\t\t\t\t\tglobalID = 1C37FABC04509CD000000102;\n\t\t\t\t\tname = Targets;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = Targets;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXTargetSmartGroup2;\n\t\t\t\t\tdescription = \"Displays all targets of the project as well as nested build phases.\";\n\t\t\t\t\tglobalID = 1C37FBAC04509CD000000102;\n\t\t\t\t\tname = Targets;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = Targets;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXExecutablesSmartGroup;\n\t\t\t\t\tdescription = \"Displays all executables of the project.\";\n\t\t\t\t\tglobalID = 1C37FAAC04509CD000000102;\n\t\t\t\t\tname = Executables;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = Executable;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\" PBXTransientLocationAtTop \" = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXErrorsWarningsSmartGroup;\n\t\t\t\t\tdescription = \"Displays files with errors or warnings.\";\n\t\t\t\t\tglobalID = 1C08E77C0454961000C914BD;\n\t\t\t\t\tname = \"Errors and Warnings\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\tfnmatch = \"\";\n\t\t\t\t\t\timage = WarningsErrors;\n\t\t\t\t\t\trecursive = 1;\n\t\t\t\t\t\tregex = \"\";\n\t\t\t\t\t\troot = \"<PROJECT>\";\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXFilenameSmartGroup;\n\t\t\t\t\tdescription = \"Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter.\";\n\t\t\t\t\tglobalID = 1CC0EA4004350EF90044410B;\n\t\t\t\t\tname = \"Implementation Files\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\tcanSave = 1;\n\t\t\t\t\t\tfnmatch = \"\";\n\t\t\t\t\t\timage = SmartFolder;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t\trecursive = 1;\n\t\t\t\t\t\tregex = \"?*\\\\.[mcMC]\";\n\t\t\t\t\t\troot = \"<PROJECT>\";\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXFilenameSmartGroup;\n\t\t\t\t\tdescription = \"This group displays Interface Builder NIB Files.\";\n\t\t\t\t\tglobalID = 1CC0EA4004350EF90041110B;\n\t\t\t\t\tname = \"NIB Files\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\tcanSave = 1;\n\t\t\t\t\t\tfnmatch = \"*.nib\";\n\t\t\t\t\t\timage = SmartFolder;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t\trecursive = 1;\n\t\t\t\t\t\tregex = \"\";\n\t\t\t\t\t\troot = \"<PROJECT>\";\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = no;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXFindSmartGroup;\n\t\t\t\t\tdescription = \"Displays Find Results.\";\n\t\t\t\t\tglobalID = 1C37FABC05509CD000000102;\n\t\t\t\t\tname = \"Find Results\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = spyglass;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = no;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXBookmarksSmartGroup;\n\t\t\t\t\tdescription = \"Displays Project Bookmarks.\";\n\t\t\t\t\tglobalID = 1C37FABC05539CD112110102;\n\t\t\t\t\tname = Bookmarks;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = Bookmarks;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = XCSCMSmartGroup;\n\t\t\t\t\tdescription = \"Displays files with interesting SCM status.\";\n\t\t\t\t\tglobalID = E2644B35053B69B200211256;\n\t\t\t\t\tname = SCM;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = PBXRepository;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXSymbolsSmartGroup;\n\t\t\t\t\tdescription = \"Displays all symbols for the project.\";\n\t\t\t\t\tglobalID = 1C37FABC04509CD000100104;\n\t\t\t\t\tname = \"Project Symbols\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = ProjectSymbols;\n\t\t\t\t\t\tisLeaf = 1;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXFilenameSmartGroup;\n\t\t\t\t\tdescription = \"Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter.\";\n\t\t\t\t\tglobalID = PBXTemplateMarker;\n\t\t\t\t\tname = \"Simple Filter SmartGroup\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\tcanSave = 1;\n\t\t\t\t\t\tfnmatch = \"*.nib\";\n\t\t\t\t\t\timage = SmartFolder;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t\trecursive = 1;\n\t\t\t\t\t\tregex = \"\";\n\t\t\t\t\t\troot = \"<PROJECT>\";\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXFilenameSmartGroup;\n\t\t\t\t\tdescription = \"Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter.\";\n\t\t\t\t\tglobalID = PBXTemplateMarker;\n\t\t\t\t\tname = \"Simple Regular Expression SmartGroup\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\tcanSave = 1;\n\t\t\t\t\t\tfnmatch = \"\";\n\t\t\t\t\t\timage = SmartFolder;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t\trecursive = 1;\n\t\t\t\t\t\tregex = \"?*\\\\.[mcMC]\";\n\t\t\t\t\t\troot = \"<PROJECT>\";\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tclz = XDDesignSmartGroup;\n\t\t\t\t\tdescription = \"Displays Xdesign models\";\n\t\t\t\t\tglobalID = 2E4A936305E6979E00701470;\n\t\t\t\t\tname = Design;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = Design;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t);\n\t\t\tPBXWorkspaceContents = (\n\t\t\t\t{\n\t\t\t\t\tPBXProjectWorkspaceModule_StateKey_Rev39 = {\n\t\t\t\t\t\tPBXProjectWorkspaceModule_DataSourceSelectionKey_Rev6 = {\n\t\t\t\t\t\t\tBoundsStr = \"{{0, 0}, {469, 441}}\";\n\t\t\t\t\t\t\tRows = (\n\t\t\t\t\t\t\t\t9,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tVisibleRectStr = \"{{0, 0}, {469, 441}}\";\n\t\t\t\t\t\t};\n\t\t\t\t\t\tPBXProjectWorkspaceModule_EditorOpen = false;\n\t\t\t\t\t\tPBXProjectWorkspaceModule_EmbeddedNavigatorGroup = {\n\t\t\t\t\t\t\tPBXSplitModuleInNavigatorKey = {\n\t\t\t\t\t\t\t\tSplitCount = 1;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t};\n\t\t\t\t\t\tPBXProjectWorkspaceModule_GeometryKey_Rev15 = {\n\t\t\t\t\t\t\tPBXProjectWorkspaceModule_SGTM_Geometry = {\n\t\t\t\t\t\t\t\t_collapsingFrameDimension = 0;\n\t\t\t\t\t\t\t\t_indexOfCollapsedView = 0;\n\t\t\t\t\t\t\t\t_percentageOfCollapsedView = 0;\n\t\t\t\t\t\t\t\tsizes = (\n\t\t\t\t\t\t\t\t\t\"{{0, 0}, {182, 458}}\",\n\t\t\t\t\t\t\t\t\t\"{{182, 0}, {484, 458}}\",\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t};\n\t\t\t\t\t\tPBXProjectWorkspaceModule_OldDetailFrame = \"{{0, 0}, {484, 458}}\";\n\t\t\t\t\t\tPBXProjectWorkspaceModule_OldEditorFrame = \"{{0, 0}, {750, 480}}\";\n\t\t\t\t\t\tPBXProjectWorkspaceModule_OldSuperviewFrame = \"{{182, 0}, {484, 458}}\";\n\t\t\t\t\t\tPBXProjectWorkspaceModule_SGTM = {\n\t\t\t\t\t\t\tPBXBottomSmartGroupGIDs = (\n\t\t\t\t\t\t\t\t1C37FBAC04509CD000000102,\n\t\t\t\t\t\t\t\t1C37FAAC04509CD000000102,\n\t\t\t\t\t\t\t\t1C08E77C0454961000C914BD,\n\t\t\t\t\t\t\t\t1CC0EA4004350EF90044410B,\n\t\t\t\t\t\t\t\t1CC0EA4004350EF90041110B,\n\t\t\t\t\t\t\t\t1C37FABC05509CD000000102,\n\t\t\t\t\t\t\t\t1C37FABC05539CD112110102,\n\t\t\t\t\t\t\t\tE2644B35053B69B200211256,\n\t\t\t\t\t\t\t\t1C37FABC04509CD000100104,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnData = {\n\t\t\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnWidthsKey = (\n\t\t\t\t\t\t\t\t\t165,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnsKey_v4 = (\n\t\t\t\t\t\t\t\t\tMainColumn,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateKey_v7 = {\n\t\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateExpansionKey = (\n\t\t\t\t\t\t\t\t\t66DF6BFE01D7DCEA00A80119,\n\t\t\t\t\t\t\t\t\t66B8BC570381F53800A8011A,\n\t\t\t\t\t\t\t\t\t66DF6BFF01D7DCEA00A80119,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateSelectionKey = (\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateVisibleRectKey = \"{{0, 0}, {165, 440}}\";\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tPBXTopSmartGroupGIDs = (\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t);\n\t\t\t\"PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXBuildResultsModule\" = {\n\t\t\t};\n\t\t\t\"PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXDebugCLIModule\" = {\n\t\t\t};\n\t\t\t\"PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXNavigatorGroup\" = {\n\t\t\t\tPBXSplitModuleInNavigatorKey = {\n\t\t\t\t\tSplitCount = 1;\n\t\t\t\t};\n\t\t\t};\n\t\t\t\"PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXProjectWorkspaceModule\" = {\n\t\t\t\tPBXProjectWorkspaceModule_StateKey_Rev39 = {\n\t\t\t\t\tPBXProjectWorkspaceModule_DataSourceSelectionKey_Rev6 = {\n\t\t\t\t\t\tBoundsStr = \"{{0, 0}, {469, 441}}\";\n\t\t\t\t\t\tRows = (\n\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tVisibleRectStr = \"{{0, 0}, {469, 441}}\";\n\t\t\t\t\t};\n\t\t\t\t\tPBXProjectWorkspaceModule_EditorOpen = false;\n\t\t\t\t\tPBXProjectWorkspaceModule_EmbeddedNavigatorGroup = {\n\t\t\t\t\t\tPBXSplitModuleInNavigatorKey = {\n\t\t\t\t\t\t\tSplitCount = 1;\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t\tPBXProjectWorkspaceModule_GeometryKey_Rev15 = {\n\t\t\t\t\t\tPBXProjectWorkspaceModule_SGTM_Geometry = {\n\t\t\t\t\t\t\t_collapsingFrameDimension = 0;\n\t\t\t\t\t\t\t_indexOfCollapsedView = 0;\n\t\t\t\t\t\t\t_percentageOfCollapsedView = 0;\n\t\t\t\t\t\t\tsizes = (\n\t\t\t\t\t\t\t\t\"{{0, 0}, {182, 458}}\",\n\t\t\t\t\t\t\t\t\"{{182, 0}, {484, 458}}\",\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t\tPBXProjectWorkspaceModule_OldDetailFrame = \"{{0, 0}, {484, 458}}\";\n\t\t\t\t\tPBXProjectWorkspaceModule_OldEditorFrame = \"{{0, 0}, {750, 480}}\";\n\t\t\t\t\tPBXProjectWorkspaceModule_OldSuperviewFrame = \"{{182, 0}, {484, 458}}\";\n\t\t\t\t\tPBXProjectWorkspaceModule_SGTM = {\n\t\t\t\t\t\tPBXBottomSmartGroupGIDs = (\n\t\t\t\t\t\t\t1C37FBAC04509CD000000102,\n\t\t\t\t\t\t\t1C37FAAC04509CD000000102,\n\t\t\t\t\t\t\t1C08E77C0454961000C914BD,\n\t\t\t\t\t\t\t1CC0EA4004350EF90044410B,\n\t\t\t\t\t\t\t1CC0EA4004350EF90041110B,\n\t\t\t\t\t\t\t1C37FABC05509CD000000102,\n\t\t\t\t\t\t\t1C37FABC05539CD112110102,\n\t\t\t\t\t\t\tE2644B35053B69B200211256,\n\t\t\t\t\t\t\t1C37FABC04509CD000100104,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnData = {\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnWidthsKey = (\n\t\t\t\t\t\t\t\t165,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnsKey_v4 = (\n\t\t\t\t\t\t\t\tMainColumn,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t};\n\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateKey_v7 = {\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateExpansionKey = (\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateSelectionKey = (\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateVisibleRectKey = \"{{0, 0}, {165, 440}}\";\n\t\t\t\t\t\t};\n\t\t\t\t\t\tPBXTopSmartGroupGIDs = (\n\t\t\t\t\t\t);\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tPBXWorkspaceGeometries = (\n\t\t\t\t{\n\t\t\t\t\tFrame = \"{{0, 0}, {666, 458}}\";\n\t\t\t\t\tPBXProjectWorkspaceModule_GeometryKey_Rev15 = {\n\t\t\t\t\t};\n\t\t\t\t\tRubberWindowFrame = \"212 190 666 500 0 0 1024 746 \";\n\t\t\t\t},\n\t\t\t);\n\t\t\t\"PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXBuildResultsModule\" = {\n\t\t\t\tFrame = \"{{0, 0}, {480, 217}}\";\n\t\t\t\tPBXModuleWindowStatusBarHidden = YES;\n\t\t\t\tRubberWindowFrame = \"272 407 480 238 0 0 1024 746 \";\n\t\t\t};\n\t\t\t\"PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXDebugCLIModule\" = {\n\t\t\t\tFrame = \"{{0, 0}, {400, 201}}\";\n\t\t\t\tPBXModuleWindowStatusBarHidden = YES;\n\t\t\t\tRubberWindowFrame = \"50 718 400 222 0 0 1024 746 \";\n\t\t\t};\n\t\t\t\"PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXNavigatorGroup\" = {\n\t\t\t\tFrame = \"{{0, 0}, {750, 481}}\";\n\t\t\t\tPBXModuleWindowStatusBarHidden = YES;\n\t\t\t\tRubberWindowFrame = \"61 197 750 502 0 0 1024 746 \";\n\t\t\t};\n\t\t\t\"PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXProjectWorkspaceModule\" = {\n\t\t\t\tFrame = \"{{0, 0}, {666, 458}}\";\n\t\t\t\tPBXProjectWorkspaceModule_GeometryKey_Rev15 = {\n\t\t\t\t};\n\t\t\t\tRubberWindowFrame = \"212 190 666 500 0 0 1024 746 \";\n\t\t\t};\n\t\t\tPBXWorkspaceStateSaveDate = 147906161;\n\t\t};\n\t\tperUserProjectItems = {\n\t\t\t941022CE0867E11B00AEB432 = 941022CE0867E11B00AEB432;\n\t\t\t944D621E085F45A500600D6E = 944D621E085F45A500600D6E;\n\t\t\t944D6240085F473000600D6E = 944D6240085F473000600D6E;\n\t\t\t94859C4308D0E67B0084EF9E = 94859C4308D0E67B0084EF9E;\n\t\t\t949CD574085CBE0300EB8605 = 949CD574085CBE0300EB8605;\n\t\t\t949CD576085CBE0300EB8605 = 949CD576085CBE0300EB8605;\n\t\t\t949CD577085CBE0300EB8605 = 949CD577085CBE0300EB8605;\n\t\t\t949CD5C0085CC32700EB8605 = 949CD5C0085CC32700EB8605;\n\t\t\t949CD5C5085CC32700EB8605 = 949CD5C5085CC32700EB8605;\n\t\t\t949CD5C6085CC32700EB8605 = 949CD5C6085CC32700EB8605;\n\t\t\t94E0B9F008D0DA420031D5D3 = 94E0B9F008D0DA420031D5D3;\n\t\t\t94E0BA3008D0DDBE0031D5D3 = 94E0BA3008D0DDBE0031D5D3;\n\t\t\t94E4F4B608D0987B00B9E724 = 94E4F4B608D0987B00B9E724;\n\t\t\t94E4F4DC08D0A2D300B9E724 = 94E4F4DC08D0A2D300B9E724;\n\t\t\t94E4F51908D0A7C500B9E724 = 94E4F51908D0A7C500B9E724;\n\t\t\t94E4F51B08D0A7C500B9E724 = 94E4F51B08D0A7C500B9E724;\n\t\t\t94E4F51E08D0A7C500B9E724 = 94E4F51E08D0A7C500B9E724;\n\t\t};\n\t\tsourceControlManager = 9444E60D06E7B8740063F6CC;\n\t\tuserBuildSettings = {\n\t\t};\n\t};\n\t941022CE0867E11B00AEB432 = {\n\t\tfRef = 944D6214085F458100600D6E;\n\t\tisa = PBXTextBookmark;\n\t\tname = \"English: 7\";\n\t\trLen = 0;\n\t\trLoc = 251;\n\t\trType = 0;\n\t\tvrLen = 251;\n\t\tvrLoc = 0;\n\t};\n\t9444E60D06E7B8740063F6CC = {\n\t\tfallbackIsa = XCSourceControlManager;\n\t\tisSCMEnabled = 0;\n\t\tisa = PBXSourceControlManager;\n\t\tscmConfiguration = {\n\t\t};\n\t\tscmType = scm.cvs;\n\t};\n\t9444E60E06E7B8740063F6CC = {\n\t\tindexTemplatePath = \"\";\n\t\tisa = PBXCodeSenseManager;\n\t};\n\t944D6214085F458100600D6E = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {659, 490}}\";\n\t\t\tsepNavSelRange = \"{0, 251}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {659, 490}}\";\n\t\t\tsepNavWindowFrame = \"{{176, 7}, {962, 719}}\";\n\t\t};\n\t};\n\t944D621E085F45A500600D6E = {\n\t\tfRef = 944D6214085F458100600D6E;\n\t\tisa = PBXTextBookmark;\n\t\tname = \"English: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 251;\n\t\tvrLoc = 0;\n\t};\n\t944D6240085F473000600D6E = {\n\t\tfRef = 949CD57E085CBE5900EB8605;\n\t\tisa = PBXTextBookmark;\n\t\tname = \"InfoPlist.strings: 1\";\n\t\trLen = 215;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 215;\n\t\tvrLoc = 0;\n\t};\n\t94859C3B08D0E2FB0084EF9E = {\n\t\tfileReference = 949CD547085CBD4100EB8605;\n\t\tfunctionName = \"sqServicesSetByteslengthosType()\";\n\t\tisa = PBXFileBreakpoint;\n\t\tlineNumber = 116;\n\t\tstate = 1;\n\t};\n\t94859C3E08D0E3370084EF9E = {\n\t\tfileReference = 949CD547085CBD4100EB8605;\n\t\tfunctionName = \"sqServicesGetTextStringInto()\";\n\t\tisa = PBXFileBreakpoint;\n\t\tlineNumber = 142;\n\t\tstate = 1;\n\t};\n\t94859C4308D0E67B0084EF9E = {\n\t\tfRef = 949CD547085CBD4100EB8605;\n\t\tisa = PBXTextBookmark;\n\t\tname = kEventServicePerform;\n\t\trLen = 20;\n\t\trLoc = 6667;\n\t\trType = 0;\n\t\tvrLen = 1266;\n\t\tvrLoc = 5829;\n\t};\n\t949CD541085CBD1900EB8605 = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {728, 5236}}\";\n\t\t\tsepNavSelRange = \"{3298, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 1407}, {728, 672}}\";\n\t\t\tsepNavWindowFrame = \"{{60, 112}, {962, 719}}\";\n\t\t};\n\t};\n\t949CD546085CBD4100EB8605 = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {750, 384}}\";\n\t\t\tsepNavSelRange = \"{123, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {750, 384}}\";\n\t\t};\n\t};\n\t949CD547085CBD4100EB8605 = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {974, 5222}}\";\n\t\t\tsepNavSelRange = \"{6667, 20}\";\n\t\t\tsepNavVisRect = \"{{0, 2911}, {659, 617}}\";\n\t\t\tsepNavWindowFrame = \"{{176, 7}, {962, 719}}\";\n\t\t};\n\t};\n\t949CD574085CBE0300EB8605 = {\n\t\tfRef = 949CD546085CBD4100EB8605;\n\t\tisa = PBXTextBookmark;\n\t\tname = \"sqMacServices.h: 6\";\n\t\trLen = 0;\n\t\trLoc = 89;\n\t\trType = 0;\n\t\tvrLen = 125;\n\t\tvrLoc = 0;\n\t};\n\t949CD576085CBE0300EB8605 = {\n\t\tfRef = 94AF34F10846F91100FA5ACB;\n\t\tisa = PBXTextBookmark;\n\t\tname = \"Info-SqueakServicesPlugin__Upgraded_.plist: 18\";\n\t\trLen = 0;\n\t\trLoc = 632;\n\t\trType = 0;\n\t\tvrLen = 903;\n\t\tvrLoc = 0;\n\t};\n\t949CD577085CBE0300EB8605 = {\n\t\tfRef = 949CD541085CBD1900EB8605;\n\t\tisa = PBXTextBookmark;\n\t\tname = \"ServicesPlugin.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 824;\n\t\tvrLoc = 0;\n\t};\n\t949CD57E085CBE5900EB8605 = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = text.plist.strings;\n\t\tname = InfoPlist.strings;\n\t\tpath = /Users/johnmci/Documents/SqueakSerialPortExtendedUnixPlugin/resources/English.lproj/InfoPlist.strings;\n\t\trefType = 0;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t949CD5C0085CC32700EB8605 = {\n\t\tfRef = 66C6C8E501DB1EC300A80109;\n\t\tisa = PBXBookmark;\n\t};\n\t949CD5C5085CC32700EB8605 = {\n\t\tfRef = 949CD57E085CBE5900EB8605;\n\t\tisa = PBXTextBookmark;\n\t\tname = \"InfoPlist.strings: 1\";\n\t\trLen = 215;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 215;\n\t\tvrLoc = 0;\n\t};\n\t949CD5C6085CC32700EB8605 = {\n\t\tfRef = 66C6C8E501DB1EC300A80109;\n\t\tisa = PBXBookmark;\n\t};\n\t94ABA91E0858D35E00079BE1 = {\n\t\tactiveArgIndex = 2147483647;\n\t\tactiveArgIndices = (\n\t\t);\n\t\targumentStrings = (\n\t\t);\n\t\tconfigStateDict = {\n\t\t\t\"PBXLSLaunchAction-0\" = {\n\t\t\t\tPBXLSLaunchAction = 0;\n\t\t\t\tPBXLSLaunchStartAction = 1;\n\t\t\t\tPBXLSLaunchStdioStyle = 2;\n\t\t\t\tPBXLSLaunchStyle = 0;\n\t\t\t\tclass = PBXLSRunLaunchConfig;\n\t\t\t\tdisplayName = \"Executable Runner\";\n\t\t\t\tidentifier = com.apple.Xcode.launch.runConfig;\n\t\t\t\tremoteHostInfo = \"\";\n\t\t\t\tstartActionInfo = \"\";\n\t\t\t};\n\t\t};\n\t\tcppStopOnCatchEnabled = 0;\n\t\tcppStopOnThrowEnabled = 0;\n\t\tcustomDataFormattersEnabled = 1;\n\t\tdebuggerPlugin = GDBDebugging;\n\t\tdisassemblyDisplayState = 0;\n\t\tdylibVariantSuffix = \"\";\n\t\tenableDebugStr = 1;\n\t\tenvironmentEntries = (\n\t\t);\n\t\texecutableSystemSymbolLevel = 0;\n\t\texecutableUserSymbolLevel = 0;\n\t\tisa = PBXExecutable;\n\t\tlaunchableReference = 94E4F56108D0D68A00B9E724;\n\t\tlibgmallocEnabled = 0;\n\t\tname = Squeak;\n\t\tsavedGlobals = {\n\t\t\t/Users/johnmci/Documents/Squeak3.8.0/build/Plugins/ServicesPlugin.bundle/Contents/MacOS/ServicesPlugin = (\n\t\t\t\t{\n\t\t\t\t\tdataValue = \"  PBXGDB_VarObjDataValue2=0xa24e0c0, rtnCnt=1, parent=0x0, validityStatus=Valid, numChildren=0, childValidityStatus=Invalid, numViewController=0, name=MyAppsDataTypes, value=[256]\\n\";\n\t\t\t\t\tdisplay = YES;\n\t\t\t\t\tfilename = /Users/johnmci/Documents/SqueakServicesPlugin/sqMacServices.c;\n\t\t\t\t\tname = MyAppsDataTypes;\n\t\t\t\t\ttype = \"char [256]\";\n\t\t\t\t\tvalue = \"[256]\";\n\t\t\t\t\tvarobj = var108;\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdataValue = \"  PBXGDB_VarObjDataValue2=0x627dc00, rtnCnt=1, parent=0x0, validityStatus=Valid, numChildren=0, childValidityStatus=Invalid, numViewController=0, name=MyAppsDataTypes, value=[64]\n\";\n\t\t\t\t\tdisplay = YES;\n\t\t\t\t\tfilename = /Users/johnmci/Documents/SqueakServicesPlugin/sqMacServices.c;\n\t\t\t\t\tname = MyAppsDataTypes;\n\t\t\t\t\ttype = \"OSType [64]\";\n\t\t\t\t\tvalue = \"[64]\";\n\t\t\t\t\tvarobj = var7;\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdataValue = \"  PBXGDB_VarObjDataValue2=0x621fe20, rtnCnt=1, parent=0x0, validityStatus=Valid, numChildren=0, childValidityStatus=Invalid, numViewController=0, name=myEventServicePasteOSType, value=utxt\n\";\n\t\t\t\t\tdisplay = YES;\n\t\t\t\t\tfilename = /Users/johnmci/Documents/SqueakServicesPlugin/sqMacServices.c;\n\t\t\t\t\tname = myEventServicePasteOSType;\n\t\t\t\t\ttype = OSType;\n\t\t\t\t\tvalue = 1413830740;\n\t\t\t\t\tvarobj = var8;\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdataValue = \"  PBXGDB_VarObjDataValue2=0x5c68510, rtnCnt=1, parent=0x0, validityStatus=Valid, numChildren=0, childValidityStatus=Invalid, numViewController=0, name=myEventServicePerformOSType, value=utxt\n\";\n\t\t\t\t\tdisplay = YES;\n\t\t\t\t\tfilename = /Users/johnmci/Documents/SqueakServicesPlugin/sqMacServices.c;\n\t\t\t\t\tname = myEventServicePerformOSType;\n\t\t\t\t\ttype = OSType;\n\t\t\t\t\tvalue = 1413830740;\n\t\t\t\t\tvarobj = var9;\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdataValue = \"  PBXGDB_VarObjDataValue2=0x5c8aab0, rtnCnt=1, parent=0x0, validityStatus=Valid, numChildren=1, childValidityStatus=Valid, numViewController=0, name=myTextStringIn, value=0x3637d0\n    PBXGDB_VarObjDataValue2=0x62ca470, rtnCnt=1, parent=0x5c8aab0, validityStatus=Valid, numChildren=0, childValidityStatus=Invalid, numViewController=0, name=*myTextStringIn, value=0 '\\\\0'\n\";\n\t\t\t\t\tdisplay = YES;\n\t\t\t\t\tfilename = /Users/johnmci/Documents/SqueakServicesPlugin/sqMacServices.c;\n\t\t\t\t\tname = myTextStringIn;\n\t\t\t\t\ttype = \"char *\";\n\t\t\t\t\tvalue = \"0x3c87e0 \\\"1000 factorial\\\\r\\\\001CFRLCFRL\\\"\";\n\t\t\t\t\tvarobj = var10;\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdataValue = \"  PBXGDB_VarObjDataValue2=0x5ce75e0, rtnCnt=1, parent=0x0, validityStatus=Valid, numChildren=0, childValidityStatus=Invalid, numViewController=0, name=MyAppsDataTypesSize, value=4\n\";\n\t\t\t\t\tdisplay = YES;\n\t\t\t\t\tfilename = /Users/johnmci/Documents/SqueakServicesPlugin/sqMacServices.c;\n\t\t\t\t\tname = MyAppsDataTypesSize;\n\t\t\t\t\ttype = \"long int\";\n\t\t\t\t\tvalue = 4;\n\t\t\t\t\tvarobj = var12;\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdataValue = \"  PBXGDB_VarObjDataValue2=0x133fed0, rtnCnt=1, parent=0x0, validityStatus=Valid, numChildren=0, childValidityStatus=Invalid, numViewController=0, name=myTextStringInLength, value=30\n\";\n\t\t\t\t\tdisplay = YES;\n\t\t\t\t\tfilename = /Users/johnmci/Documents/SqueakServicesPlugin/sqMacServices.c;\n\t\t\t\t\tname = myTextStringInLength;\n\t\t\t\t\ttype = \"long int\";\n\t\t\t\t\tvalue = 15;\n\t\t\t\t\tvarobj = var13;\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdataValue = \"  PBXGDB_VarObjDataValue2=0x62f6370, rtnCnt=1, parent=0x0, validityStatus=Valid, numChildren=0, childValidityStatus=Invalid, numViewController=0, name=myEventServiceCopyOSType, value=utxt\n\";\n\t\t\t\t\tdisplay = YES;\n\t\t\t\t\tfilename = /Users/johnmci/Documents/SqueakServicesPlugin/sqMacServices.c;\n\t\t\t\t\tname = myEventServiceCopyOSType;\n\t\t\t\t\ttype = OSType;\n\t\t\t\t\tvalue = 1413830740;\n\t\t\t\t\tvarobj = var15;\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdataValue = \"  PBXGDB_VarObjDataValue2=0x5cd1790, rtnCnt=1, parent=0x0, validityStatus=Valid, numChildren=0, childValidityStatus=Invalid, numViewController=0, name=myTextStringOut, value=0x0\n\";\n\t\t\t\t\tdisplay = YES;\n\t\t\t\t\tfilename = /Users/johnmci/Documents/SqueakServicesPlugin/sqMacServices.c;\n\t\t\t\t\tname = myTextStringOut;\n\t\t\t\t\ttype = \"char *\";\n\t\t\t\t\tvalue = 0x0;\n\t\t\t\t\tvarobj = var16;\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdataValue = \"  PBXGDB_VarObjDataValue2=0x13f62d0, rtnCnt=1, parent=0x0, validityStatus=Valid, numChildren=0, childValidityStatus=Invalid, numViewController=0, name=specificScrap, value=0x28000000\n\";\n\t\t\t\t\tdisplay = YES;\n\t\t\t\t\tfilename = /Users/johnmci/Documents/SqueakServicesPlugin/sqMacServices.c;\n\t\t\t\t\tname = specificScrap;\n\t\t\t\t\ttype = ScrapRef;\n\t\t\t\t\tvalue = 0x8000000;\n\t\t\t\t\tvarobj = var17;\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdataValue = \"  PBXGDB_VarObjDataValue2=0x5c8a860, rtnCnt=1, parent=0x0, validityStatus=Valid, numChildren=0, childValidityStatus=Invalid, numViewController=0, name=myTextStringOutLength, value=0\n\";\n\t\t\t\t\tdisplay = YES;\n\t\t\t\t\tfilename = /Users/johnmci/Documents/SqueakServicesPlugin/sqMacServices.c;\n\t\t\t\t\tname = myTextStringOutLength;\n\t\t\t\t\ttype = \"long int\";\n\t\t\t\t\tvalue = 0;\n\t\t\t\t\tvarobj = var21;\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdataValue = \"  PBXGDB_VarObjDataValue2=0x5ca4ee0, rtnCnt=1, parent=0x0, validityStatus=Valid, numChildren=0, childValidityStatus=Invalid, numViewController=0, name=gWaiting, value=1 '\\\\001'\n\";\n\t\t\t\t\tdisplay = YES;\n\t\t\t\t\tfilename = /Users/johnmci/Documents/SqueakServicesPlugin/sqMacServices.c;\n\t\t\t\t\tname = gWaiting;\n\t\t\t\t\ttype = Boolean;\n\t\t\t\t\tvalue = \"1 '\\\\001'\";\n\t\t\t\t\tvarobj = var23;\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdataValue = \"  PBXGDB_VarObjDataValue2=0x5c550d0, rtnCnt=1, parent=0x0, validityStatus=Valid, numChildren=0, childValidityStatus=Invalid, numViewController=0, name=ghideStupidApplicationNow, value=0 '\\\\0'\n\";\n\t\t\t\t\tdisplay = YES;\n\t\t\t\t\tfilename = /Users/johnmci/Documents/SqueakServicesPlugin/sqMacServices.c;\n\t\t\t\t\tname = ghideStupidApplicationNow;\n\t\t\t\t\ttype = Boolean;\n\t\t\t\t\tvalue = \"0 '\\\\0'\";\n\t\t\t\t\tvarobj = var24;\n\t\t\t\t},\n\t\t\t);\n\t\t};\n\t\tshlibInfoDictList_v2 = (\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/system/libmathCommon.A.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libSystem.B.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libicucore.A.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libauto.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libobjc.A.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libz.1.2.2.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Security.framework/Versions/A/Security;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/WebServicesCore.framework/Versions/A/WebServicesCore;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CarbonSound.framework/Versions/A/CarbonSound;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libbsm.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libcrypto.0.9.7.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreText.framework/Versions/A/CoreText;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libcups.2.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/FindByContent.framework/Versions/A/FindByContent;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRaw.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libmx.A.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libiconv.2.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libxml2.2.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HTMLRendering.framework/Versions/A/HTMLRendering;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/NavigationServices.framework/Versions/A/NavigationServices;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/AGL.framework/Versions/A/AGL;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/PrivateFrameworks/ZeroLink.framework/Versions/A/ZeroLink;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /Users/johnmci/Documents/Squeak3.8.0/build/Squeak.app/Contents/MacOS/Squeak;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacEncoding.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/interp.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacUIMenuBar.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacUIEvents.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacMain.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacUIClipBoard.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacWindow.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacUnixCommandLineInterface.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacUIAppleEvents.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacFileLogic.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacImageIO.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Components/DictionaryService.component/Contents/MacOS/DictionaryService;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacMemory.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacTime.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/UUIDPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/SurfacePlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/StarSqueakPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/SoundPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/SoundGenerationPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/SoundCodecPrims.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/SocketPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/SerialPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/SecurityPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/MiscPrimitivePlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/Matrix2x3Plugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/MIDIPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/MacMenubarPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/LargeIntegers.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/Klatt.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/JoystickTabletPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/JPEGReaderPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/Error.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/JPEGReadWriter2Plugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/InternetConfigPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/HostWindowPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/GeniePlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/FloatArrayPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/FilePlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/FFTPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/DropPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/ZipPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/DSAPrims.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/BitBltPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/B2DPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/BMPReadWriterPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/Squeak3D.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/B3DAcceleratorPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/AsynchFilePlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/ADPCMCodecPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacSerialPort.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/osExports.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqNamedPrims.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqVirtualMachine.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/aio.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacExternalPrims.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacHostWindow.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacSecurity.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqFilePluginBasicPrims.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacDirectory.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacDragDrop.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacUnixInterfaceSound.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqUnixSoundMacOSXJMM.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /Users/johnmci/Documents/Squeak3.8.0/build/Plugins/LocalePlugin.bundle/Contents/MacOS/LocalePlugin;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /Developer/Applications/Xcode.app/Contents/PlugIns/GDBMIDebugging.xcplugin/Contents/Resources/PBGDBIntrospectionSupport.A.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Library/Application Support/Apple/Developer Tools/CustomDataViews/CFDataFormatters.bundle/Contents/MacOS/CFDataFormatters\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqUnixSocket.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /Users/johnmci/Documents/Squeak3.8.0/build/Plugins/ServicesPlugin.bundle/Contents/MacOS/ServicesPlugin;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libgcc_s.1.0.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/usr/lib/libstdc++.6.0.3.dylib\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Library/Application Support/Apple/Developer Tools/CustomDataViews/CarbonDataFormatters.bundle/Contents/MacOS/CarbonDataFormatters\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/dyld;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/PrivateFrameworks/URLMount.framework/Versions/A/URLMount;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libz.1.2.3.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t);\n\t\tsourceDirectories = (\n\t\t);\n\t};\n\t94AF34E00846F91100FA5ACB = {\n\t\tactiveExec = 0;\n\t};\n\t94AF34F10846F91100FA5ACB = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {923, 590}}\";\n\t\t\tsepNavSelRange = \"{284, 6}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {923, 590}}\";\n\t\t\tsepNavWindowFrame = \"{{84, 91}, {962, 719}}\";\n\t\t};\n\t};\n\t94AF35000846F98600FA5ACB = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {673, 2590}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {673, 397}}\";\n\t\t};\n\t};\n\t94E0B9F008D0DA420031D5D3 = {\n\t\tfRef = 949CD541085CBD1900EB8605;\n\t\tisa = PBXTextBookmark;\n\t\tname = SetReturnB;\n\t\trLen = 10;\n\t\trLoc = 6585;\n\t\trType = 0;\n\t\tvrLen = 1653;\n\t\tvrLoc = 8597;\n\t};\n\t94E0BA3008D0DDBE0031D5D3 = {\n\t\tfRef = 949CD547085CBD4100EB8605;\n\t\tisa = PBXTextBookmark;\n\t\tname = kEventServicePerform;\n\t\trLen = 20;\n\t\trLoc = 6667;\n\t\trType = 0;\n\t\tvrLen = 1266;\n\t\tvrLoc = 5829;\n\t};\n\t94E4F4B608D0987B00B9E724 = {\n\t\tfRef = 949CD546085CBD4100EB8605;\n\t\tisa = PBXTextBookmark;\n\t\tname = \"sqMacServices.h: 6\";\n\t\trLen = 0;\n\t\trLoc = 89;\n\t\trType = 0;\n\t\tvrLen = 125;\n\t\tvrLoc = 0;\n\t};\n\t94E4F4DC08D0A2D300B9E724 = {\n\t\tfRef = 949CD547085CBD4100EB8605;\n\t\tisa = PBXTextBookmark;\n\t\tname = sqServicesGetText;\n\t\trLen = 17;\n\t\trLoc = 3868;\n\t\trType = 0;\n\t\tvrLen = 580;\n\t\tvrLoc = 2903;\n\t};\n\t94E4F4E808D0A44600B9E724 = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {659, 280}}\";\n\t\t\tsepNavSelRange = \"{7, 16}\";\n\t\t\tsepNavVisRect = \"{{0, 3}, {659, 277}}\";\n\t\t\tsepNavWindowFrame = \"{{84, 99}, {1310, 711}}\";\n\t\t};\n\t};\n\t94E4F51908D0A7C500B9E724 = {\n\t\tfRef = 94E4F4E808D0A44600B9E724;\n\t\tisa = PBXTextBookmark;\n\t\tname = ServicesPlugin.h;\n\t\trLen = 16;\n\t\trLoc = 7;\n\t\trType = 0;\n\t\tvrLen = 786;\n\t\tvrLoc = 0;\n\t};\n\t94E4F51B08D0A7C500B9E724 = {\n\t\tfRef = 94AF34F10846F91100FA5ACB;\n\t\tisa = PBXTextBookmark;\n\t\tname = \"Info.plist: 29\";\n\t\trLen = 0;\n\t\trLoc = 903;\n\t\trType = 0;\n\t\tvrLen = 903;\n\t\tvrLoc = 0;\n\t};\n\t94E4F51E08D0A7C500B9E724 = {\n\t\tfRef = 94E4F4E808D0A44600B9E724;\n\t\tisa = PBXTextBookmark;\n\t\tname = ServicesPlugin.h;\n\t\trLen = 16;\n\t\trLoc = 7;\n\t\trType = 0;\n\t\tvrLen = 786;\n\t\tvrLoc = 0;\n\t};\n\t94E4F52F08D0B2D800B9E724 = {\n\t\tfileReference = 949CD547085CBD4100EB8605;\n\t\tfunctionName = \"MyServicesEventHandler()\";\n\t\tisa = PBXFileBreakpoint;\n\t\tlineNumber = 194;\n\t\tstate = 1;\n\t};\n\t94E4F55308D0CE0000B9E724 = {\n\t\tfileReference = 949CD547085CBD4100EB8605;\n\t\tfunctionName = \"MyServicesEventHandler()\";\n\t\tisa = PBXFileBreakpoint;\n\t\tlineNumber = 217;\n\t\tstate = 1;\n\t};\n\t94E4F56108D0D68A00B9E724 = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = wrapper.application;\n\t\tname = Squeak.app;\n\t\tpath = /Users/johnmci/Documents/Squeak3.8.0/build/Squeak.app;\n\t\trefType = 0;\n\t\tsourceTree = \"<absolute>\";\n\t};\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/ServicesPlugin/SqueakServices.pbproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 39;\n\tobjects = {\n\t\t66B8BC570381F53800A8011A = {\n\t\t\tchildren = (\n\t\t\t\t94AF35040846F9AB00FA5ACB,\n\t\t\t\t94AF35000846F98600FA5ACB,\n\t\t\t\t66B8BC580381F61C00A8011A,\n\t\t\t\t66B8BC5A0381F63A00A8011A,\n\t\t\t\t66B8BC5C0381F66500A8011A,\n\t\t\t\t66B8BC5E0381F69100A8011A,\n\t\t\t\t94ABA8920858C40D00079BE1,\n\t\t\t);\n\t\t\tisa = PBXGroup;\n\t\t\tname = platforms;\n\t\t\tpath = ../Squeak3.8.0/platforms;\n\t\t\trefType = 2;\n\t\t\tsourceTree = SOURCE_ROOT;\n\t\t};\n\t\t66B8BC580381F61C00A8011A = {\n\t\t\tfileEncoding = 30;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.h;\n\t\t\tname = sqConfig.h;\n\t\t\tpath = \"Mac OS/vm/sqConfig.h\";\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66B8BC5A0381F63A00A8011A = {\n\t\t\tfileEncoding = 30;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.h;\n\t\t\tname = sqPlatformSpecific.h;\n\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/platforms/Mac OS/vm/sqPlatformSpecific.h\";\n\t\t\trefType = 0;\n\t\t\tsourceTree = \"<absolute>\";\n\t\t};\n\t\t66B8BC5C0381F66500A8011A = {\n\t\t\tfileEncoding = 30;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.h;\n\t\t\tname = sq.h;\n\t\t\tpath = Cross/vm/sq.h;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66B8BC5E0381F69100A8011A = {\n\t\t\tfileEncoding = 30;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.h;\n\t\t\tname = sqVirtualMachine.h;\n\t\t\tpath = /Users/johnmci/Documents/Squeak3.8.0/platforms/Cross/vm/sqVirtualMachine.h;\n\t\t\trefType = 0;\n\t\t\tsourceTree = \"<absolute>\";\n\t\t};\n\t\t66C6C8E501DB1EC300A80109 = {\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = image.icns;\n\t\t\tpath = SqueakPlugin.icns;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66DF6BFD01D7DCEA00A80119 = {\n\t\t\tbuildSettings = {\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.3;\n\t\t\t\tSDKROOT = /Developer/SDKs/MacOSX10.3.9.sdk;\n\t\t\t};\n\t\t\tbuildStyles = (\n\t\t\t\t66DF6C4301D7DCEA00A80119,\n\t\t\t\t66DF6C4401D7DCEA00A80119,\n\t\t\t);\n\t\t\thasScannedForEncodings = 1;\n\t\t\tisa = PBXProject;\n\t\t\tmainGroup = 66DF6BFE01D7DCEA00A80119;\n\t\t\tproductRefGroup = 66DF6C4501D7DEEE00A80119;\n\t\t\tprojectDirPath = \"\";\n\t\t\ttargets = (\n\t\t\t\t94AF34E00846F91100FA5ACB,\n\t\t\t);\n\t\t};\n\t\t66DF6BFE01D7DCEA00A80119 = {\n\t\t\tchildren = (\n\t\t\t\t66B8BC570381F53800A8011A,\n\t\t\t\t66DF6BFF01D7DCEA00A80119,\n\t\t\t\t66DF6C3901D7DCEA00A80119,\n\t\t\t\t66DF6C8201D7DF7E00A80119,\n\t\t\t\t66DF6C4501D7DEEE00A80119,\n\t\t\t\t94AF34F10846F91100FA5ACB,\n\t\t\t);\n\t\t\tisa = PBXGroup;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66DF6BFF01D7DCEA00A80119 = {\n\t\t\tchildren = (\n\t\t\t\t949CD541085CBD1900EB8605,\n\t\t\t\t94E4F4E808D0A44600B9E724,\n\t\t\t\t949CD547085CBD4100EB8605,\n\t\t\t\t949CD546085CBD4100EB8605,\n\t\t\t);\n\t\t\tisa = PBXGroup;\n\t\t\tname = Sources;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66DF6C3901D7DCEA00A80119 = {\n\t\t\tchildren = (\n\t\t\t\t944D6212085F458100600D6E,\n\t\t\t\t66C6C8E501DB1EC300A80109,\n\t\t\t);\n\t\t\tisa = PBXGroup;\n\t\t\tname = resources;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66DF6C4301D7DCEA00A80119 = {\n\t\t\tbuildSettings = {\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_ENABLE_FIX_AND_CONTINUE = YES;\n\t\t\t\tGCC_GENERATE_DEBUGGING_SYMBOLS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tOPTIMIZATION_CFLAGS = \"-O0\";\n\t\t\t\tZERO_LINK = NO;\n\t\t\t};\n\t\t\tisa = PBXBuildStyle;\n\t\t\tname = Development;\n\t\t};\n\t\t66DF6C4401D7DCEA00A80119 = {\n\t\t\tbuildSettings = {\n\t\t\t\tCOPY_PHASE_STRIP = YES;\n\t\t\t\tGCC_ENABLE_FIX_AND_CONTINUE = NO;\n\t\t\t\tOPTIMIZATION_CFLAGS = \"-O3 -mcpu=750 -funroll-loops \";\n\t\t\t\tOTHER_CFLAGS = \"-DTARGET_OS_MAC -DNOPTHREADS\";\n\t\t\t\tZERO_LINK = NO;\n\t\t\t};\n\t\t\tisa = PBXBuildStyle;\n\t\t\tname = Deployment;\n\t\t};\n\t\t66DF6C4501D7DEEE00A80119 = {\n\t\t\tchildren = (\n\t\t\t\t943173AF085CD38900DDDC64,\n\t\t\t);\n\t\t\tisa = PBXGroup;\n\t\t\tname = Products;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66DF6C8201D7DF7E00A80119 = {\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = wrapper.framework;\n\t\t\tname = Carbon.framework;\n\t\t\tpath = /System/Library/Frameworks/Carbon.framework;\n\t\t\trefType = 0;\n\t\t\tsourceTree = \"<absolute>\";\n\t\t};\n//660\n//661\n//662\n//663\n//664\n//940\n//941\n//942\n//943\n//944\n\t\t943173AF085CD38900DDDC64 = {\n\t\t\texplicitFileType = wrapper.cfbundle;\n\t\t\tincludeInIndex = 0;\n\t\t\tisa = PBXFileReference;\n\t\t\tpath = ServicesPlugin.bundle;\n\t\t\trefType = 3;\n\t\t\tsourceTree = BUILT_PRODUCTS_DIR;\n\t\t};\n\t\t944D6212085F458100600D6E = {\n\t\t\tchildren = (\n\t\t\t\t944D6213085F458100600D6E,\n\t\t\t);\n\t\t\tisa = PBXGroup;\n\t\t\tname = English.lproj;\n\t\t\tpath = resources/English.lproj;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t944D6213085F458100600D6E = {\n\t\t\tchildren = (\n\t\t\t\t944D6214085F458100600D6E,\n\t\t\t);\n\t\t\tisa = PBXVariantGroup;\n\t\t\tname = InfoPlist.strings;\n\t\t\tpath = \"\";\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t944D6214085F458100600D6E = {\n\t\t\tfileEncoding = 30;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = text.plist.strings;\n\t\t\tname = English;\n\t\t\tpath = InfoPlist.strings;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t944D6215085F458100600D6E = {\n\t\t\tfileRef = 944D6213085F458100600D6E;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t949CD541085CBD1900EB8605 = {\n\t\t\tfileEncoding = 30;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.c;\n\t\t\tpath = ServicesPlugin.c;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t949CD542085CBD1A00EB8605 = {\n\t\t\tfileRef = 949CD541085CBD1900EB8605;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t949CD546085CBD4100EB8605 = {\n\t\t\tfileEncoding = 4;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.h;\n\t\t\tpath = sqMacServices.h;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t949CD547085CBD4100EB8605 = {\n\t\t\tfileEncoding = 4;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.c;\n\t\t\tpath = sqMacServices.c;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t949CD548085CBD4100EB8605 = {\n\t\t\tfileRef = 949CD546085CBD4100EB8605;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t949CD549085CBD4100EB8605 = {\n\t\t\tfileRef = 949CD547085CBD4100EB8605;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t94ABA8920858C40D00079BE1 = {\n\t\t\tfileEncoding = 30;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.h;\n\t\t\tname = sqMemoryAccess.h;\n\t\t\tpath = Cross/vm/sqMemoryAccess.h;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94ABA8930858C40D00079BE1 = {\n\t\t\tfileRef = 94ABA8920858C40D00079BE1;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t94AF34E00846F91100FA5ACB = {\n\t\t\tbuildPhases = (\n\t\t\t\t94AF34E10846F91100FA5ACB,\n\t\t\t\t94AF34E70846F91100FA5ACB,\n\t\t\t\t94AF34EA0846F91100FA5ACB,\n\t\t\t\t94AF34EE0846F91100FA5ACB,\n\t\t\t\t94AF34F00846F91100FA5ACB,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t\t94AF34F70846F94F00FA5ACB,\n\t\t\t);\n\t\t\tbuildSettings = {\n\t\t\t\tGCC_GENERATE_DEBUGGING_SYMBOLS = NO;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 3;\n\t\t\t\tHEADER_SEARCH_PATHS = /Developer/Headers/FlatCarbon;\n\t\t\t\tINFOPLIST_FILE = Info.plist;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tOTHER_REZFLAGS = \"\";\n\t\t\t\tPRODUCT_NAME = ServicesPlugin;\n\t\t\t\tSECTORDER_FLAGS = \"\";\n\t\t\t\tWARNING_CFLAGS = \"-Wmost -Wno-four-char-constants -Wno-unknown-pragmas\";\n\t\t\t\tWRAPPER_EXTENSION = bundle;\n\t\t\t};\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tisa = PBXNativeTarget;\n\t\t\tname = \"SqueakServicesPlugin (Upgraded)\";\n\t\t\tproductInstallPath = \"$(USER_LIBRARY_DIR)/Bundles\";\n\t\t\tproductName = \"mpeg3PluginBundle Debug\";\n\t\t\tproductReference = 943173AF085CD38900DDDC64;\n\t\t\tproductType = \"com.apple.product-type.bundle\";\n\t\t};\n\t\t94AF34E10846F91100FA5ACB = {\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t94AF34E20846F91100FA5ACB,\n\t\t\t\t94AF34E30846F91100FA5ACB,\n\t\t\t\t94AF34E40846F91100FA5ACB,\n\t\t\t\t94AF34E50846F91100FA5ACB,\n\t\t\t\t94AF35010846F98600FA5ACB,\n\t\t\t\t94AF35050846F9AB00FA5ACB,\n\t\t\t\t94ABA8930858C40D00079BE1,\n\t\t\t\t949CD548085CBD4100EB8605,\n\t\t\t\t94E4F4E908D0A44600B9E724,\n\t\t\t);\n\t\t\tisa = PBXHeadersBuildPhase;\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t94AF34E20846F91100FA5ACB = {\n\t\t\tfileRef = 66B8BC580381F61C00A8011A;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t94AF34E30846F91100FA5ACB = {\n\t\t\tfileRef = 66B8BC5A0381F63A00A8011A;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t94AF34E40846F91100FA5ACB = {\n\t\t\tfileRef = 66B8BC5C0381F66500A8011A;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t94AF34E50846F91100FA5ACB = {\n\t\t\tfileRef = 66B8BC5E0381F69100A8011A;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t94AF34E70846F91100FA5ACB = {\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t94AF34E80846F91100FA5ACB,\n\t\t\t\t944D6215085F458100600D6E,\n\t\t\t);\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t94AF34E80846F91100FA5ACB = {\n\t\t\tfileRef = 66C6C8E501DB1EC300A80109;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t94AF34EA0846F91100FA5ACB = {\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t949CD542085CBD1A00EB8605,\n\t\t\t\t949CD549085CBD4100EB8605,\n\t\t\t);\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t94AF34EE0846F91100FA5ACB = {\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t94AF34EF0846F91100FA5ACB,\n\t\t\t);\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t94AF34EF0846F91100FA5ACB = {\n\t\t\tfileRef = 66DF6C8201D7DF7E00A80119;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t94AF34F00846F91100FA5ACB = {\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tisa = PBXRezBuildPhase;\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t94AF34F10846F91100FA5ACB = {\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = text.xml;\n\t\t\tpath = Info.plist;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94AF34F70846F94F00FA5ACB = {\n\t\t\tcompilerSpec = com.apple.compilers.gcc.3_3;\n\t\t\tfileType = sourcecode.c;\n\t\t\tisEditable = 1;\n\t\t\tisa = PBXBuildRule;\n\t\t\toutputFiles = (\n\t\t\t);\n\t\t};\n\t\t94AF35000846F98600FA5ACB = {\n\t\t\tfileEncoding = 30;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.h;\n\t\t\tname = config.h;\n\t\t\tpath = \"Mac OS/vm/config.h\";\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94AF35010846F98600FA5ACB = {\n\t\t\tfileRef = 94AF35000846F98600FA5ACB;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t94AF35040846F9AB00FA5ACB = {\n\t\t\tfileEncoding = 30;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.h;\n\t\t\tname = interp.h;\n\t\t\tpath = ../Squeak3.8.0/src/vm/interp.h;\n\t\t\trefType = 2;\n\t\t\tsourceTree = SOURCE_ROOT;\n\t\t};\n\t\t94AF35050846F9AB00FA5ACB = {\n\t\t\tfileRef = 94AF35040846F9AB00FA5ACB;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t94E4F4E808D0A44600B9E724 = {\n\t\t\tfileEncoding = 4;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.h;\n\t\t\tpath = ServicesPlugin.h;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E4F4E908D0A44600B9E724 = {\n\t\t\tfileRef = 94E4F4E808D0A44600B9E724;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t};\n\trootObject = 66DF6BFD01D7DCEA00A80119;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/ServicesPlugin/resources/English.lproj/InfoPlist.strings",
    "content": "/* Localized versions of Info.plist keys */\n\nCFBundleName = \"ServicesPlugin\";\nCFBundleShortVersionString = \"ServicesPlugin version 1.0.0B2\";\nCFBundleGetInfoString = \"ServicesPlugin version 1.0.0B2\";\nNSHumanReadableCopyright = \"http://www.squeak.org\";\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/ServicesPlugin/sqMacServices.c",
    "content": "/*\n *  sqMacServices.c\n *  SqueakServices\n *\n *  Created by John M McIntosh on 12/06/05.\n *\n */\n\n#include \"sqMacServices.h\"\n#include \"ServicesPlugin.h\"\n\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#include <pthread.h>\n\n\nextern struct VirtualMachine *interpreterProxy;\n\nOSType\tMyAppsDataTypes[64];\nlong\tMyAppsDataTypesSize;\nOSType\tmyEventServiceCopyOSType = kScrapFlavorTypeText;\nOSType\tmyEventServicePasteOSType = kScrapFlavorTypeText;\nOSType\tmyEventServicePerformOSType = kScrapFlavorTypeText;\nchar *\tmyTextStringOut=NULL;\nlong\tmyTextStringOutLength=0;\nchar *\tmyTextStringIn=NULL;\nlong\tmyTextStringInLength=0;\nScrapRef        specificScrap=NULL; \nlong\tmySemaphore=0;\nBoolean\tgWaiting=false;\n\nEventHandlerRef\t\tmyEventRef=NULL;\n\nEventTypeSpec serviceEventList[] = {\n        { kEventClassService, kEventServiceGetTypes },\n        { kEventClassService, kEventServicePerform },\n        { kEventClassService, kEventServiceCopy }, \n        { kEventClassService, kEventServicePaste } };\n\nstatic pascal OSStatus MyServicesEventHandler (EventHandlerCallRef myHandlerChain,EventRef event, void* userData);\nvoid makeItHideLogic();\nvoid waitAFewMilliseconds();\n\nint sqServicesInitialize() {\n\tstatic Boolean initialized=false;\n\tif (initialized) \n\t\treturn 1;\n\telse \n\t\tinitialized = true;\n\t\t\n\tInstallApplicationEventHandler(NewEventHandlerUPP(MyServicesEventHandler), GetEventTypeCount(serviceEventList), serviceEventList, 0, &myEventRef);\n\treturn 1;\n}\n\nint sqServicesShutdown() {\n\tif (myEventRef) \n\t\tRemoveEventHandler(myEventRef);\n\tmyEventRef = NULL;\n\tmyTextStringInLength = 0;\n\tmyTextStringOutLength = 0;\n\tif (myTextStringIn) {\n\t\tfree(myTextStringIn);\n\t\tmyTextStringIn = NULL;\n\t}\n\tif (myTextStringOut) {\n\t\tfree(myTextStringOut);\n\t\tmyTextStringOut = NULL;\n\t}\n\n\treturn 1;\n}\n\nvoid sqServicesSetDataTypeslength(char *dataTypes, long dataTypesLength) {\n\tif (dataTypesLength > 256) \n\t\treturn;\n\tMyAppsDataTypesSize = dataTypesLength;\n\tmemcpy(MyAppsDataTypes,dataTypes,MyAppsDataTypesSize);\n}\n\nvoid sqServicesSetSemaphore(int semi){\n\tmySemaphore = semi;\n}\n\nvoid sqServicesSetTextStringlength(char *aTextString, int stringLength){\n\tif (myTextStringOut != NULL) \n\t\tfree(myTextStringOut);\n\tmyTextStringOutLength = stringLength;\n\tmyTextStringOut = malloc(myTextStringOutLength+1);\n\tmemcpy(myTextStringOut,aTextString,myTextStringOutLength);\n\tmyTextStringOut[myTextStringOutLength] = 0x00;\n}\n\nvoid sqServicesSetReturnTextStringlength(char *aTextString, int stringLength){\n\tif(specificScrap == NULL) \n\t\treturn;\n\tClearScrap (&specificScrap); \n\tPutScrapFlavor (specificScrap, kScrapFlavorTypeText,kScrapFlavorMaskNone,stringLength,aTextString);\n\tgWaiting = false;\n\tspecificScrap = NULL;\n}\n\nvoid sqServicesSetByteslengthosType(char *aByteArray, long dataTypesLength, char *aOSTypeString) {\n\tOSType\ttypeToUse;\n\t\n\tif(specificScrap == NULL) \n\t\treturn;\n\ttypeToUse = CFSwapInt32HostToBig((int) *(int *) aOSTypeString);\n\tClearScrap (&specificScrap); \n\tPutScrapFlavor (specificScrap, typeToUse ,kScrapFlavorMaskNone,dataTypesLength,aByteArray);\n\tgWaiting = false;\n\tspecificScrap = NULL;\n}\n\nvoid sqServicesSetCopyOSTypeString(char *aOSTypeString) {\n\tmyEventServiceCopyOSType = CFSwapInt32HostToBig((int) *(int *) aOSTypeString);\n}\n\nvoid sqServicesSetPasteOSTypeString(char *aOSTypeString) {\n\tmyEventServicePasteOSType = CFSwapInt32HostToBig((int) *(int *) aOSTypeString);\n}\n\nvoid sqServicesSetPerformOSTypeString(char *aOSTypeString) {\n\tmyEventServicePerformOSType = CFSwapInt32HostToBig((int) *(int *)aOSTypeString);\n}\n\nint sqServicesGetTextStringLength(void){\n\treturn myTextStringInLength;\n}\n\nvoid sqServicesGetTextStringInto(char *buffer) {\n\tmemcpy(buffer,myTextStringIn,myTextStringInLength);\n}\n\nstatic pascal OSStatus MyServicesEventHandler (EventHandlerCallRef myHandlerChain,\nEventRef event, void* userData)\n{\n    UInt32 whatHappened;\n\tOSStatus result = eventNotHandledErr; /* report failure by default */\n\n    whatHappened = GetEventKind(event);\n    switch (whatHappened)\n    {\n        case kEventServiceGetTypes:\n\t\t\t\t{\n\t\t\t\tBoolean             textSelection = true; \n\t\t\t\tCFMutableArrayRef   copyTypes, pasteTypes;\n\t\t\t\tshort               index, count;\n\t\t\t\tif (textSelection)  {\n\t\t\t\t\tGetEventParameter (event, \n\t\t\t\t\t\t\t\t\t\tkEventParamServiceCopyTypes, \n\t\t\t\t\t\t\t\t\t\ttypeCFMutableArrayRef, \n\t\t\t\t\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t\t\t\t\tsizeof (CFMutableArrayRef),\n\t\t\t\t\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t\t\t\t\t&copyTypes);  \n\t\t\t\t\t}\n\t\t\t\tGetEventParameter (event, \n\t\t\t\t\t\t\t\t\tkEventParamServicePasteTypes, \n\t\t\t\t\t\t\t\t\ttypeCFMutableArrayRef, \n\t\t\t\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t\t\t\tsizeof (CFMutableArrayRef), \n\t\t\t\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t\t\t\t&pasteTypes);  \n\t\t\t\tcount = MyAppsDataTypesSize / sizeof (OSType); \n\t\t\t\tfor ( index = 0; index < count; index++ ) {\n\t\t\t\t\tCFStringRef type = \n\t\t\t\t\t\t\t\tCreateTypeStringWithOSType (CFSwapInt32HostToBig(MyAppsDataTypes [index])); \n\t\t\t\t\tif (type) {\n\t\t\t\t\t\tif (textSelection) \n\t\t\t\t\t\t\t\tCFArrayAppendValue (copyTypes, type);  \n\t\t\t\t\t\tCFArrayAppendValue (pasteTypes, type); \n\t\t\t\t\t\tCFRelease (type);  \n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tresult = noErr; \n\t\t\t}            \n\t\tbreak;\n\t\tcase kEventServiceCopy:\n\t\t\t\t{\n\t\t\t\t\tOSStatus        status = noErr;\n\t\t\t\t\tScrapRef        scrap;\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tstatus = GetEventParameter (event,\n\t\t\t\t\t\t\t\t\t\t\t\tkEventParamScrapRef,\n\t\t\t\t\t\t\t\t\t\t\t\ttypeScrapRef,\n\t\t\t\t\t\t\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t\t\t\t\t\t\tsizeof (ScrapRef),\n\t\t\t\t\t\t\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t\t\t\t\t\t\t&scrap ); \n\t\t\t\t\tif (status != noErr) return result;\n\t\t\t\t\tstatus = ClearScrap (&scrap); \n\t\t\t\t\tif (status != noErr) return result;\n\t\t\t\t\tstatus = PutScrapFlavor (scrap,\n\t\t\t\t\t\t\t\t\t\t\tmyEventServiceCopyOSType,\n\t\t\t\t\t\t\t\t\t\t\tkScrapFlavorMaskNone,\n\t\t\t\t\t\t\t\t\t\t\tmyTextStringOutLength,\n\t\t\t\t\t\t\t\t\t\t\tmyTextStringOut); \n\t\t\t\t\tif (status != noErr) return result;\n\t\t\t\t\tresult = status; \n\t\t\t\t}\n\t\tbreak;\n\t\tcase kEventServicePaste:\n\t\t\t{\n\t\t\t\tOSStatus    status = noErr;\n\t\t\t\tScrapRef    scrap;\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tstatus = GetEventParameter (event,\n\t\t\t\t\t\t\t\t\t\tkEventParamScrapRef,\n\t\t\t\t\t\t\t\t\t\ttypeScrapRef,\n\t\t\t\t\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t\t\t\t\tsizeof (ScrapRef),\n\t\t\t\t\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t\t\t\t\t&scrap); \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\tif (status != noErr) return result;\n\t\t\t\tstatus = GetScrapFlavorSize (scrap, myEventServicePasteOSType, &myTextStringInLength); \n\t\t\t\tif (status != noErr) return result;\n\t\t\t\tif (myTextStringIn) \n\t\t\t\t\tfree(myTextStringIn);\n\t\t\t\tmyTextStringIn = malloc (myTextStringInLength); \n\t\t\t\tstatus = GetScrapFlavorData (scrap, myEventServicePasteOSType, &myTextStringInLength, myTextStringIn ); \n\n\t\t\t\tresult = status; \n\t\t\t}\n\t\tbreak;\n\t\tcase kEventServicePerform:\n\t\t\t{\n\t\t\t\tOSStatus    status = noErr;\n\t\t\t\tCFStringRef     message; \n\t\t\t\t\n\t\t\t\tstatus = GetEventParameter (event,          \n\t\t\t\t\t\t\t\tkEventParamServiceMessageName, \n\t\t\t\t\t\t\t\ttypeCFStringRef, \n\t\t\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t\t\tsizeof (CFStringRef),\n\t\t\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t\t\t&message); \n\t\t\t\tif (status != noErr) return result;\n\t\t\t\tstatus = GetEventParameter (event,         \n\t\t\t\t\t\t\t\tkEventParamScrapRef, \n\t\t\t\t\t\t\t\ttypeScrapRef, \n\t\t\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t\t\tsizeof (ScrapRef),\n\t\t\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t\t\t&specificScrap); \n \t\t\t\tif (status != noErr) return result;\n\t\t\t\tstatus = GetScrapFlavorSize (specificScrap, myEventServicePerformOSType, &myTextStringInLength); \n\t\t\t\tif (status != noErr) return result;\n\t\t\t\tif (myTextStringIn) \n\t\t\t\t\tfree(myTextStringIn);\n\t\t\t\tmyTextStringIn = malloc (myTextStringInLength); \n\t\t\t\tstatus = GetScrapFlavorData (specificScrap, myEventServicePerformOSType, &myTextStringInLength, myTextStringIn ); \n\t\t\t\tif (status != noErr) return result;\n\n\t\t\t\tif (mySemaphore)\n\t\t\t\t\tinterpreterProxy->signalSemaphoreWithIndex(mySemaphore);\n\n\t\t\t\tgWaiting = true;\n\t\t\t\twhile(gWaiting)\n\t\t\t\t\twaitAFewMilliseconds();\n\t\t\t\tmakeItHideLogic();\n\t\t\t\t\t\n\t\t\t\tresult = status; \n\t\t}\n        break;\n\t\tdefault:\n            break;\n    }\n\treturn result;\n}\n\nEventLoopTimerRef  ghideStupidApplication;\nBoolean\t\t\tghideStupidApplicationNow=false;\nstatic pascal void hideStupidApplication (EventLoopTimerRef theTimer,void* userData);\n\nstatic pascal void hideStupidApplication (EventLoopTimerRef theTimer,void* userData) {\n    if (ghideStupidApplicationNow ) {\n\t\tProcessSerialNumber psn = { 0, kCurrentProcess };\n\t\tif (IsProcessVisible(&psn))\n\t\t\tShowHideProcess( &psn, false );\n\t\tghideStupidApplicationNow = false;\n\t\tRemoveEventLoopTimer(ghideStupidApplication);\n\t}\n}\n\nvoid makeItHideLogic(int foo)\n{\n    InstallEventLoopTimer (GetMainEventLoop(),\n                       250*kEventDurationMillisecond,\n                       kEventDurationMillisecond,\n                       NewEventLoopTimerUPP(hideStupidApplication),\n                       NULL,&ghideStupidApplication);\n\tghideStupidApplicationNow = true;\n}\n\n\npthread_mutex_t sleepLock;\npthread_cond_t  sleepLockCondition;\nvoid waitAFewMilliseconds()\n{\n    static Boolean doInitialization=true;\n    const int\t   realTimeToWait = 16;\n    struct timespec tspec;\n    int err;\n    \n    if (doInitialization) {\n        doInitialization = false;\n        pthread_mutex_init(&sleepLock, NULL);\n        pthread_cond_init(&sleepLockCondition,NULL);\n    }\n\n    tspec.tv_sec=  realTimeToWait / 1000;\n    tspec.tv_nsec= (realTimeToWait % 1000)*1000000;\n    \n    err = pthread_mutex_lock(&sleepLock);\n    err = pthread_cond_timedwait_relative_np(&sleepLockCondition,&sleepLock,&tspec);\t\n    err = pthread_mutex_unlock(&sleepLock); \n}\n\n/*\t\t\t\tPasteboardRef   pasteboard;\n\t\t\t\tPasteboardItemID    item;\n\t\t\t\tCFDataRef           sourceData;\n    CFIndex             sourceSize;\n    CFMutableDataRef    returnData = NULL;\n    const UInt8*        sourceBytes;\n    UInt8*              returnBytes;\n    CFIndex i;\n\t\t\t\t\tstatus = GetEventParameter( event, kEventParamPasteboardRef, typePasteboardRef, \n\t\t\t\t\t\t\t\t\tNULL, sizeof( pasteboard ), NULL, &pasteboard );\n\t\t\t\t\tif (status != noErr) return result;\n\t\t\t\t\tPasteboardSynchronize(pasteboard);\n\t\t\t\t\t\n\t\t\t\t\tstatus = PasteboardGetItemIdentifier( pasteboard, 1, &item );\n\t\t\t\t\tstatus = PasteboardCopyItemFlavorData( pasteboard, item,  CFSTR(\"com.apple.traditional-mac-plain-text\"), &sourceData );\n\t\t\t\t   sourceSize = CFDataGetLength( sourceData );\n\t\t\t\t\t\n\t\t\t\t\t// create the translation's return data storage\n\t\t\t\t\treturnData = CFDataCreateMutable( kCFAllocatorDefault, sourceSize );        \n\t\t\t\t\tsourceBytes = CFDataGetBytePtr( sourceData );\n\t\t\t\t\treturnBytes = CFDataGetMutableBytePtr( returnData );\n\t\t\t\t\tfor(i = 0; i< sourceSize; i++ )\n\t\t\t\t\t\t\treturnBytes[i] = ( UInt8 )toupper( sourceBytes[ i ] );        \n\t\t\t\t\tstatus = PasteboardClear( pasteboard );\n\t\t\t\t\tstatus = PasteboardPutItemFlavor( pasteboard, item,  CFSTR(\"com.apple.traditional-mac-plain-text\"), returnData, kPasteboardFlavorNoFlags );\n\t\t\t\t\tPasteboardSynchronize(pasteboard);\t\t\t\t\n*/\n\n\n/*\n\t\t\t\tstatus = GetScrapFlavorSize (specificScrap, kScrapFlavorTypeText, &myTextStringInLength); \n\t\t\t\tif (status != noErr) return result;\n\t\t\t\tif (myTextStringIn) \n\t\t\t\t\tfree(myTextStringIn);\n\t\t\t\tmyTextStringIn = malloc (myTextStringInLength); \n\t\t\t\tstatus = GetScrapFlavorData (specificScrap, kScrapFlavorTypeText, &myTextStringInLength, myTextStringIn ); \n\t\t\t\tif (status != noErr) return result;\n\t\t\t\tClearScrap (&specificScrap); \n\t\t\t\tmyTextStringIn[0] = '!'; \n\t\t\t\tstatus = PutScrapFlavor (specificScrap,kScrapFlavorTypeText,kScrapFlavorMaskNone,myTextStringInLength,myTextStringIn);\n*/\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/ServicesPlugin/sqMacServices.h",
    "content": "/*\n *  sqMacServices.h\n *  SqueakServices\n *\n *  Created by John M McIntosh on 12/06/05.\n *\n */\n\n#include <Carbon/Carbon.h>"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SocketPlugin/68K/AddressXlation.h",
    "content": "/*\n \tFile:\t\tAddressXlation.h\n \n \tContains:\tTCP Manager interfaces for dnr.c\n \n \tVersion:\tUse with MacTCP 2.0.6 and Universal Interfaces 2.1b1\n\t\t\t\t\tin MPW Prerelease on ETO #17\n\n  \tCopyright:\t 1984-1995 by Apple Computer, Inc.\n \t\t\t\tAll rights reserved.\n \n \tBugs?:\t\tIf you find a problem with this file, send the file and version\n \t\t\t\tinformation (from above) and the problem description to:\n \n \t\t\t\t\tInternet:\tapple.bugs@applelink.apple.com\n \t\t\t\t\tAppleLink:\tAPPLE.BUGS\n \n*/\n\n#ifndef __ADDRESSXLATION__\n#define __ADDRESSXLATION__\n\n\n#ifndef __TYPES__\n#include <Types.h>\n#endif\n/*\t#include <ConditionalMacros.h>\t\t\t\t\t\t\t\t*/\n\n#ifndef __MACTCP__\n#include <MacTCP.h>\n#endif\n/*\t#include <AppleTalk.h>\t\t\t\t\t\t\t\t\t\t*/\n/*\t\t#include <OSUtils.h>\t\t\t\t\t\t\t\t\t*/\n/*\t\t\t#include <MixedMode.h>\t\t\t\t\t\t\t\t*/\n/*\t\t\t#include <Memory.h>\t\t\t\t\t\t\t\t\t*/\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#if STRUCTALIGNMENTSUPPORTED\n#pragma options align=mac68k\n#endif\n\n#if PRAGMA_IMPORT_SUPPORTED\n#pragma import on\n#endif\n\n/*\n\tDeveloper Notes:\n\n\t\t\tWhen the various calls are made to the dnr code, you must set up \n\t\t\ta NewRoutineDescriptor for every non-nil completion routine and/or \n\t\t\tnotifyProc parameter.  Otherwise, the 68K dnr code, will not \n\t\t\tcorrectly call your routine.\n\t\t1. For the call to EnumCache, use NewEnumResultProc to set up a \n\t\t\tuniversal procptr to pass as the enumResultProc parameter.\n\t\t2. For the calls to StrToAddr and AddrToName, use NewResultProc to \n\t\t\tset up a ResultUPP universal procptr to pass as the ResultProc \n\t\t\tparameter.\n\t\t3. For the calls to HInfo and MXInfo, use NewResultProc2Proc to\n\t\t\tset up a ResultProc2UPP universal procptr to pass as the ResultProc\n\t\t\tparameter.\n\t\t4. The DNR selector symbol HINFO has been changed to HXINFO due to\n\t\t\tconflict with the same symbol in the AddressXLation.h header\n*/\n\nenum {\n\tNUM_ALT_ADDRS\t\t\t\t= 4\n};\n\nstruct hostInfo {\n\tlong\t\t\t\t\t\t\trtnCode;\n\tchar\t\t\t\t\t\t\tcname[255];\n\tSInt8\t\t\t\t\t\t\tfiller;\t\t\t\t\t\t/* Filler for proper byte alignment\t */\n\tunsigned long\t\t\t\t\taddr[NUM_ALT_ADDRS];\n};\ntypedef struct hostInfo hostInfo;\n\n\nenum {\n\tA\t\t\t\t\t\t\t= 1,\n\tNS\t\t\t\t\t\t\t= 2,\n\tCNAME\t\t\t\t\t\t= 5,\n\tHINFO\t\t\t\t\t\t= 13,\n\tMX\t\t\t\t\t\t\t= 15,\n\tlastClass\t\t\t\t\t= 32767\n};\n\ntypedef unsigned short AddrClasses;\n\n/* Domain Name Resolver code selectors */\n\nenum {\n\tOPENRESOLVER\t\t\t\t= 1,\n\tCLOSERESOLVER\t\t\t\t= 2,\n\tSTRTOADDR\t\t\t\t\t= 3,\n\tADDRTOSTR\t\t\t\t\t= 4,\n\tENUMCACHE\t\t\t\t\t= 5,\n\tADDRTONAME\t\t\t\t\t= 6,\n\tHXINFO\t\t\t\t\t\t= 7,\t\t\t\t\t\t\t/* changed from HINFO due to symbol conflict*/\n\tMXINFO\t\t\t\t\t\t= 8\n};\n\nstruct HInfoRec {\n\tchar\t\t\t\t\t\t\tcpuType[30];\n\tchar\t\t\t\t\t\t\tosType[30];\n};\ntypedef struct HInfoRec HInfoRec;\n\nstruct MXRec {\n\tunsigned short\t\t\t\t\tpreference;\n\tchar\t\t\t\t\t\t\texchange[255];\n};\ntypedef struct MXRec MXRec;\n\nstruct returnRec {\n\tlong\t\t\t\t\t\t\trtnCode;\n\tchar\t\t\t\t\t\t\tcname[255];\n\tSInt8\t\t\t\t\t\t\tfiller;\t\t\t\t\t\t/* Filler for proper byte alignment\t */\n\tunion {\n\t\tunsigned long\t\t\t\t\taddr[NUM_ALT_ADDRS];\n\t\tstruct HInfoRec\t\t\t\t\thinfo;\n\t\tstruct MXRec\t\t\t\t\tmx;\n\t}\t\t\t\t\t\t\t\trdata;\n};\ntypedef struct returnRec returnRec;\n\nstruct cacheEntryRecord {\n\tchar\t\t\t\t\t\t\t*cname;\n\tunsigned short\t\t\t\t\tctype;\n\tunsigned short\t\t\t\t\tcacheClass;\n\tunsigned long\t\t\t\t\tttl;\n\tunion {\n\t\tchar\t\t\t\t\t\t\t*name;\n\t\tip_addr\t\t\t\t\t\t\taddr;\n\t}\t\t\t\t\t\t\t\trdata;\n};\ntypedef struct cacheEntryRecord cacheEntryRecord;\n\ntypedef pascal void (*EnumResultProcPtr)(struct cacheEntryRecord *cacheEntryRecordPtr, Ptr userDataPtr);\ntypedef pascal void (*ResultProcPtr)(struct hostInfo *hostInfoPtr, Ptr userDataPtr);\ntypedef pascal void (*ResultProc2ProcPtr)(struct returnRec *returnRecPtr, Ptr userDataPtr);\n\n#if GENERATINGCFM\ntypedef UniversalProcPtr EnumResultUPP;\ntypedef UniversalProcPtr ResultUPP;\ntypedef UniversalProcPtr ResultProc2UPP;\n#else\ntypedef EnumResultProcPtr EnumResultUPP;\ntypedef ResultProcPtr ResultUPP;\ntypedef ResultProc2ProcPtr ResultProc2UPP;\n#endif\n\nenum {\n\tuppEnumResultProcInfo = kPascalStackBased\n\t\t | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(struct cacheEntryRecord*)))\n\t\t | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Ptr))),\n\tuppResultProcInfo = kPascalStackBased\n\t\t | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(struct hostInfo*)))\n\t\t | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Ptr))),\n\tuppResultProc2ProcInfo = kPascalStackBased\n\t\t | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(struct returnRec*)))\n\t\t | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Ptr)))\n};\n\n#if GENERATINGCFM\n#define NewEnumResultProc(userRoutine)\t\t\\\n\t\t(EnumResultUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppEnumResultProcInfo, GetCurrentArchitecture())\n#define NewResultProc(userRoutine)\t\t\\\n\t\t(ResultUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppResultProcInfo, GetCurrentArchitecture())\n#define NewResultProc2Proc(userRoutine)\t\t\\\n\t\t(ResultProc2UPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppResultProc2ProcInfo, GetCurrentArchitecture())\n#else\n#define NewEnumResultProc(userRoutine)\t\t\\\n\t\t((EnumResultUPP) (userRoutine))\n#define NewResultProc(userRoutine)\t\t\\\n\t\t((ResultUPP) (userRoutine))\n#define NewResultProc2Proc(userRoutine)\t\t\\\n\t\t((ResultProc2UPP) (userRoutine))\n#endif\n\n#if GENERATINGCFM\n#define CallEnumResultProc(userRoutine, cacheEntryRecordPtr, userDataPtr)\t\t\\\n\t\tCallUniversalProc((UniversalProcPtr)(userRoutine), uppEnumResultProcInfo, (cacheEntryRecordPtr), (userDataPtr))\n#define CallResultProc(userRoutine, hostInfoPtr, userDataPtr)\t\t\\\n\t\tCallUniversalProc((UniversalProcPtr)(userRoutine), uppResultProcInfo, (hostInfoPtr), (userDataPtr))\n#define CallResultProc2Proc(userRoutine, returnRecPtr, userDataPtr)\t\t\\\n\t\tCallUniversalProc((UniversalProcPtr)(userRoutine), uppResultProc2ProcInfo, (returnRecPtr), (userDataPtr))\n#else\n#define CallEnumResultProc(userRoutine, cacheEntryRecordPtr, userDataPtr)\t\t\\\n\t\t(*(userRoutine))((cacheEntryRecordPtr), (userDataPtr))\n#define CallResultProc(userRoutine, hostInfoPtr, userDataPtr)\t\t\\\n\t\t(*(userRoutine))((hostInfoPtr), (userDataPtr))\n#define CallResultProc2Proc(userRoutine, returnRecPtr, userDataPtr)\t\t\\\n\t\t(*(userRoutine))((returnRecPtr), (userDataPtr))\n#endif\n\nextern OSErr OpenResolver(char *fileName);\nextern OSErr StrToAddr(char *hostName, struct hostInfo *hostInfoPtr, ResultUPP ResultProc, char *userDataPtr);\nextern OSErr AddrToStr(unsigned long addr, char *addrStr);\nextern OSErr EnumCache(EnumResultUPP enumResultProc, Ptr userDataPtr);\nextern OSErr AddrToName(ip_addr addr, struct hostInfo *hostInfoPtr, ResultUPP ResultProc, Ptr userDataPtr);\nextern OSErr HInfo(char *hostName, struct returnRec *returnRecPtr, ResultProc2UPP resultProc, Ptr userDataPtr);\nextern OSErr MXInfo(char *hostName, struct returnRec *returnRecPtr, ResultProc2UPP resultProc, Ptr userDataPtr);\nextern OSErr CloseResolver(void);\n/*\n\tUniversal ProcPtrs declaration for each of the dnr selector code calls.\n*/\ntypedef OSErr (*OpenResolverProcPtr)(UInt32 selector, char *filename);\ntypedef OSErr (*CloseResolverProcPtr)(UInt32 selector);\ntypedef OSErr (*StrToAddrProcPtr)(UInt32 selector, char *hostName, struct hostInfo *rtnStruct, ResultUPP resultproc, Ptr userDataPtr);\ntypedef OSErr (*AddrToStrProcPtr)(UInt32 selector, unsigned long addr, char *addrStr);\ntypedef OSErr (*EnumCacheProcPtr)(UInt32 selector, EnumResultUPP resultproc, Ptr userDataPtr);\ntypedef OSErr (*AddrToNameProcPtr)(UInt32 selector, UInt32 addr, struct hostInfo *rtnStruct, ResultUPP resultproc, Ptr userDataPtr);\ntypedef OSErr (*HInfoProcPtr)(UInt32 selector, char *hostName, struct returnRec *returnRecPtr, ResultProc2UPP resultProc, Ptr userDataPtr);\ntypedef OSErr (*MXInfoProcPtr)(UInt32 selector, char *hostName, struct returnRec *returnRecPtr, ResultProc2UPP resultProc, Ptr userDataPtr);\n\n#if GENERATINGCFM\ntypedef UniversalProcPtr OpenResolverUPP;\ntypedef UniversalProcPtr CloseResolverUPP;\ntypedef UniversalProcPtr StrToAddrUPP;\ntypedef UniversalProcPtr AddrToStrUPP;\ntypedef UniversalProcPtr EnumCacheUPP;\ntypedef UniversalProcPtr AddrToNameUPP;\ntypedef UniversalProcPtr HInfoUPP;\ntypedef UniversalProcPtr MXInfoUPP;\n#else\ntypedef OpenResolverProcPtr OpenResolverUPP;\ntypedef CloseResolverProcPtr CloseResolverUPP;\ntypedef StrToAddrProcPtr StrToAddrUPP;\ntypedef AddrToStrProcPtr AddrToStrUPP;\ntypedef EnumCacheProcPtr EnumCacheUPP;\ntypedef AddrToNameProcPtr AddrToNameUPP;\ntypedef HInfoProcPtr HInfoUPP;\ntypedef MXInfoProcPtr MXInfoUPP;\n#endif\n\nenum {\n\tuppOpenResolverProcInfo = kCStackBased\n\t\t | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))\n\t\t | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(UInt32)))\n\t\t | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(char*))),\n\tuppCloseResolverProcInfo = kCStackBased\n\t\t | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))\n\t\t | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(UInt32))),\n\tuppStrToAddrProcInfo = kCStackBased\n\t\t | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))\n\t\t | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(UInt32)))\n\t\t | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(char*)))\n\t\t | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(struct hostInfo*)))\n\t\t | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(ResultUPP)))\n\t\t | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(Ptr))),\n\tuppAddrToStrProcInfo = kCStackBased\n\t\t | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))\n\t\t | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(UInt32)))\n\t\t | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(unsigned long)))\n\t\t | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(char*))),\n\tuppEnumCacheProcInfo = kCStackBased\n\t\t | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))\n\t\t | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(UInt32)))\n\t\t | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(EnumResultUPP)))\n\t\t | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Ptr))),\n\tuppAddrToNameProcInfo = kCStackBased\n\t\t | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))\n\t\t | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(UInt32)))\n\t\t | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(UInt32)))\n\t\t | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(struct hostInfo*)))\n\t\t | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(ResultUPP)))\n\t\t | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(Ptr))),\n\tuppHInfoProcInfo = kCStackBased\n\t\t | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))\n\t\t | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(UInt32)))\n\t\t | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(char*)))\n\t\t | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(struct returnRec*)))\n\t\t | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(ResultProc2UPP)))\n\t\t | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(Ptr))),\n\tuppMXInfoProcInfo = kCStackBased\n\t\t | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))\n\t\t | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(UInt32)))\n\t\t | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(char*)))\n\t\t | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(struct returnRec*)))\n\t\t | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(ResultProc2UPP)))\n\t\t | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(Ptr)))\n};\n\n#if GENERATINGCFM\n#define CallOpenResolverProc(userRoutine, selector, filename)\t\t\\\n\t\tCallUniversalProc((UniversalProcPtr)(userRoutine), uppOpenResolverProcInfo, (selector), (filename))\n#define CallCloseResolverProc(userRoutine, selector)\t\t\\\n\t\tCallUniversalProc((UniversalProcPtr)(userRoutine), uppCloseResolverProcInfo, (selector))\n#define CallStrToAddrProc(userRoutine, selector, hostName, rtnStruct, resultproc, userDataPtr)\t\t\\\n\t\tCallUniversalProc((UniversalProcPtr)(userRoutine), uppStrToAddrProcInfo, (selector), (hostName), (rtnStruct), (resultproc), (userDataPtr))\n#define CallAddrToStrProc(userRoutine, selector, addr, addrStr)\t\t\\\n\t\tCallUniversalProc((UniversalProcPtr)(userRoutine), uppAddrToStrProcInfo, (selector), (addr), (addrStr))\n#define CallEnumCacheProc(userRoutine, selector, resultproc, userDataPtr)\t\t\\\n\t\tCallUniversalProc((UniversalProcPtr)(userRoutine), uppEnumCacheProcInfo, (selector), (resultproc), (userDataPtr))\n#define CallAddrToNameProc(userRoutine, selector, addr, rtnStruct, resultproc, userDataPtr)\t\t\\\n\t\tCallUniversalProc((UniversalProcPtr)(userRoutine), uppAddrToNameProcInfo, (selector), (addr), (rtnStruct), (resultproc), (userDataPtr))\n#define CallHInfoProc(userRoutine, selector, hostName, returnRecPtr, resultProc, userDataPtr)\t\t\\\n\t\tCallUniversalProc((UniversalProcPtr)(userRoutine), uppHInfoProcInfo, (selector), (hostName), (returnRecPtr), (resultProc), (userDataPtr))\n#define CallMXInfoProc(userRoutine, selector, hostName, returnRecPtr, resultProc, userDataPtr)\t\t\\\n\t\tCallUniversalProc((UniversalProcPtr)(userRoutine), uppMXInfoProcInfo, (selector), (hostName), (returnRecPtr), (resultProc), (userDataPtr))\n#else\n#define CallOpenResolverProc(userRoutine, selector, filename)\t\t\\\n\t\t(*(userRoutine))((selector), (filename))\n#define CallCloseResolverProc(userRoutine, selector)\t\t\\\n\t\t(*(userRoutine))((selector))\n#define CallStrToAddrProc(userRoutine, selector, hostName, rtnStruct, resultproc, userDataPtr)\t\t\\\n\t\t(*(userRoutine))((selector), (hostName), (rtnStruct), (resultproc), (userDataPtr))\n#define CallAddrToStrProc(userRoutine, selector, addr, addrStr)\t\t\\\n\t\t(*(userRoutine))((selector), (addr), (addrStr))\n#define CallEnumCacheProc(userRoutine, selector, resultproc, userDataPtr)\t\t\\\n\t\t(*(userRoutine))((selector), (resultproc), (userDataPtr))\n#define CallAddrToNameProc(userRoutine, selector, addr, rtnStruct, resultproc, userDataPtr)\t\t\\\n\t\t(*(userRoutine))((selector), (addr), (rtnStruct), (resultproc), (userDataPtr))\n#define CallHInfoProc(userRoutine, selector, hostName, returnRecPtr, resultProc, userDataPtr)\t\t\\\n\t\t(*(userRoutine))((selector), (hostName), (returnRecPtr), (resultProc), (userDataPtr))\n#define CallMXInfoProc(userRoutine, selector, hostName, returnRecPtr, resultProc, userDataPtr)\t\t\\\n\t\t(*(userRoutine))((selector), (hostName), (returnRecPtr), (resultProc), (userDataPtr))\n#endif\n\n\n#if PRAGMA_IMPORT_SUPPORTED\n#pragma import off\n#endif\n\n#if STRUCTALIGNMENTSUPPORTED\n#pragma options align=reset\n#endif\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* __ADDRESSXLATION__ */\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SocketPlugin/68K/MacTCP.h",
    "content": "/*\n \tFile:\t\tMacTCP.h\n \n \tContains:\tTCP Manager Interfaces.\n \n \tVersion:\tTechnology:\tMacTCP 2.0.6\n \t\t\t\tPackage:\tUniversal Interfaces 2.11 in MPW Prerelease on ETO #17\n \n \tCopyright:\t 1984-1995 by Apple Computer, Inc.\n \t\t\t\tAll rights reserved.\n \n \tBugs?:\t\tIf you find a problem with this file, use the Apple Bug Reporter\n \t\t\t\tstack.  Include the file and version information (from above)\n \t\t\t\tin the problem description and send to:\n \t\t\t\t\tInternet:\tapple.bugs@applelink.apple.com\n \t\t\t\t\tAppleLink:\tAPPLE.BUGS\n \n*/\n\n#ifndef __MACTCP__\n#define __MACTCP__\n\n\n#ifndef __TYPES__\n#include <Types.h>\n#endif\n/*\t#include <ConditionalMacros.h>\t\t\t\t\t\t\t\t*/\n\n#ifndef __APPLETALK__\n#include <AppleTalk.h>\n#endif\n/*\t#include <OSUtils.h>\t\t\t\t\t\t\t\t\t\t*/\n/*\t\t#include <MixedMode.h>\t\t\t\t\t\t\t\t\t*/\n/*\t\t#include <Memory.h>\t\t\t\t\t\t\t\t\t\t*/\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#if PRAGMA_ALIGN_SUPPORTED\n#pragma options align=mac68k\n#endif\n\n#if PRAGMA_IMPORT_SUPPORTED\n#pragma import on\n#endif\n\n/*\nDeveloper Notes:\n\t\t0. This MacTCP header replaces what used to be defined in the following header files\n\t\t\tMacTCPCommonTypes.h\n\t\t\tGetMyIPAddr.h\n\t\t\tMiscIPPB.h\n\t\t\tTCPPB.h\n\t\t\tUDPPB.h \n\t\t\t\n\t\t\tWhen the various control calls are made to the ip driver, you must set up a \n\t\t\tNewRoutineDescriptor for every non-nil completion routine and/or notifyProc parameter.  \n\t\t\tOtherwise, the 68K driver code, will not correctly call your routine.\n\t\t1. For ipctlGetAddr Control calls, use NewGetIPIOCompletionProc\n\t\t\tto set up a GetIPIOCompletionUPP universal procptr to pass as\n\t\t\tthe ioCompletion parameter.\n\t\t2. For the ipctlEchoICMP and ipctlLAPStats Control calls, use \n\t\t\tNewIPIOCompletion to set up a IPIOCompletionUPP universal procptr\n\t\t\tto pass in the ioCompletion field of the parameter block.\n\t\t3. For TCPCreatePB Control calls, use NewTCPNotifyProc to set up a\n\t\t\tTCPNotifyUPP universal procptr to pass in the notifyProc field\n\t\t\tof the parameter block\n\t\t4. For all of the TCP Control calls using the TCPiopb parameter block,\n\t\t\tuse NewTCPIOCompletionProc to set up a TCPIOCompletionUPP\n\t\t\tuniversal procptr to pass in the ioCompletion field of the paramter\n\t\t\tblock.\n\t\t5. For UDBCreatePB Control calls, use NewUDPNotifyProc to set up a\n\t\t\tUDPNotifyUPP universal procptr to pass in the notifyProc field\n\t\t\tof the parameter block\n\t\t6. For all of the UDP Control calls using the UDPiopb parameter block,\n\t\t\tuse NewUDPIOCompletionProc to set up a UDPIOCompletionUPP\n\t\t\tuniversal procptr to pass in the ioCompletion field of the paramter\n\t\t\tblock.\n\t\t7. For all calls implementing a notifyProc or ioCompletion routine\n\t\t\twhich was set up using a NewTCPRoutineProc call, do not call\n\t\t\tDisposeRoutineSDescriptor on the universal procptr until\n\t\t\tafter the completion or notify proc has completed.\n*/\n/* MacTCP return Codes in the range -23000 through -23049 */\n\nenum {\n\tinProgress\t\t\t\t\t= 1,\t\t\t\t\t\t\t/* I/O in progress */\n\tipBadLapErr\t\t\t\t\t= -23000,\t\t\t\t\t\t/* bad network configuration */\n\tipBadCnfgErr\t\t\t\t= -23001,\t\t\t\t\t\t/* bad IP configuration error */\n\tipNoCnfgErr\t\t\t\t\t= -23002,\t\t\t\t\t\t/* missing IP or LAP configuration error */\n\tipLoadErr\t\t\t\t\t= -23003,\t\t\t\t\t\t/* error in MacTCP load */\n\tipBadAddr\t\t\t\t\t= -23004,\t\t\t\t\t\t/* error in getting address */\n\tconnectionClosing\t\t\t= -23005,\t\t\t\t\t\t/* connection is closing */\n\tinvalidLength\t\t\t\t= -23006,\n\tconnectionExists\t\t\t= -23007,\t\t\t\t\t\t/* request conflicts with existing connection */\n\tconnectionDoesntExist\t\t= -23008,\t\t\t\t\t\t/* connection does not exist */\n\tinsufficientResources\t\t= -23009,\t\t\t\t\t\t/* insufficient resources to perform request */\n\tinvalidStreamPtr\t\t\t= -23010,\n\tstreamAlreadyOpen\t\t\t= -23011,\n\tconnectionTerminated\t\t= -23012,\n\tinvalidBufPtr\t\t\t\t= -23013,\n\tinvalidRDS\t\t\t\t\t= -23014,\n\tinvalidWDS\t\t\t\t\t= -23014,\n\topenFailed\t\t\t\t\t= -23015,\n\tcommandTimeout\t\t\t\t= -23016,\n\tduplicateSocket\t\t\t\t= -23017\n};\n\n/* Error codes from internal IP functions */\nenum {\n\tipDontFragErr\t\t\t\t= -23032,\t\t\t\t\t\t/* Packet too large to send w/o fragmenting */\n\tipDestDeadErr\t\t\t\t= -23033,\t\t\t\t\t\t/* destination not responding */\n\ticmpEchoTimeoutErr\t\t\t= -23035,\t\t\t\t\t\t/* ICMP echo timed-out */\n\tipNoFragMemErr\t\t\t\t= -23036,\t\t\t\t\t\t/* no memory to send fragmented pkt */\n\tipRouteErr\t\t\t\t\t= -23037,\t\t\t\t\t\t/* can't route packet off-net */\n\tnameSyntaxErr\t\t\t\t= -23041,\n\tcacheFault\t\t\t\t\t= -23042,\n\tnoResultProc\t\t\t\t= -23043,\n\tnoNameServer\t\t\t\t= -23044,\n\tauthNameErr\t\t\t\t\t= -23045,\n\tnoAnsErr\t\t\t\t\t= -23046,\n\tdnrErr\t\t\t\t\t\t= -23047,\n\toutOfMemory\t\t\t\t\t= -23048\n};\n\nenum {\n\tBYTES_16WORD\t\t\t\t= 2,\t\t\t\t\t\t\t/* bytes per = 16, bit ip word */\n\tBYTES_32WORD\t\t\t\t= 4,\t\t\t\t\t\t\t/* bytes per = 32, bit ip word */\n\tBYTES_64WORD\t\t\t\t= 8\t\t\t\t\t\t\t\t/* bytes per = 64, bit ip word */\n};\n\n/* 8-bit quantity */\ntypedef UInt8 b_8;\n\n/* 16-bit quantity */\ntypedef UInt16 b_16;\n\n/* 32-bit quantity */\ntypedef UInt32 b_32;\n\n/* IP address is 32-bits */\ntypedef b_32 ip_addr;\n\nstruct ip_addrbytes {\n\tunion {\n\t\tb_32\t\t\t\t\t\t\taddr;\n\t\tUInt8\t\t\t\t\t\t\tbyte[4];\n\t}\t\t\t\t\t\t\t\ta;\n};\ntypedef struct ip_addrbytes ip_addrbytes;\n\nstruct wdsEntry {\n\tunsigned short\t\t\t\t\tlength;\t\t\t\t\t\t/* length of buffer */\n\tPtr\t\t\t\t\t\t\t\tptr;\t\t\t\t\t\t/* pointer to buffer */\n};\ntypedef struct wdsEntry wdsEntry;\n\nstruct rdsEntry {\n\tunsigned short\t\t\t\t\tlength;\t\t\t\t\t\t/* length of buffer */\n\tPtr\t\t\t\t\t\t\t\tptr;\t\t\t\t\t\t/* pointer to buffer */\n};\ntypedef struct rdsEntry rdsEntry;\n\ntypedef unsigned long BufferPtr;\n\ntypedef unsigned long StreamPtr;\n\n\nenum {\n\tnetUnreach\t\t\t\t\t= 0,\n\thostUnreach\t\t\t\t\t= 1,\n\tprotocolUnreach\t\t\t\t= 2,\n\tportUnreach\t\t\t\t\t= 3,\n\tfragReqd\t\t\t\t\t= 4,\n\tsourceRouteFailed\t\t\t= 5,\n\ttimeExceeded\t\t\t\t= 6,\n\tparmProblem\t\t\t\t\t= 7,\n\tmissingOption\t\t\t\t= 8,\n\tlastICMPMsgType\t\t\t\t= 32767\n};\n\ntypedef unsigned short ICMPMsgType;\n\ntypedef b_16 ip_port;\n\nstruct ICMPReport {\n\tStreamPtr\t\t\t\t\t\tstreamPtr;\n\tip_addr\t\t\t\t\t\t\tlocalHost;\n\tip_port\t\t\t\t\t\t\tlocalPort;\n\tip_addr\t\t\t\t\t\t\tremoteHost;\n\tip_port\t\t\t\t\t\t\tremotePort;\n\tshort\t\t\t\t\t\t\treportType;\n\tunsigned short\t\t\t\t\toptionalAddlInfo;\n\tunsigned long\t\t\t\t\toptionalAddlInfoPtr;\n};\ntypedef struct ICMPReport ICMPReport;\n\n/* csCode to get our IP address */\n\nenum {\n\tipctlGetAddr\t\t\t\t= 15\n};\n\ntypedef void (*GetIPIOCompletionProcPtr)(struct GetAddrParamBlock *iopb);\n\n#if GENERATINGCFM\ntypedef UniversalProcPtr GetIPIOCompletionUPP;\n#else\ntypedef GetIPIOCompletionProcPtr GetIPIOCompletionUPP;\n#endif\n\n#define GetIPParamBlockHeader \t\\\n\tstruct QElem*\tqLink; \t\t\\\n\tshort\tqType; \t\t\t\t\\\n\tshort\tioTrap; \t\t\t\t\\\n\tPtr\tioCmdAddr; \t\t\t\t\\\n\tGetIPIOCompletionUPP\tioCompletion;  \\\n\tOSErr\tioResult; \t\t\t\\\n\tStringPtr\tioNamePtr; \t\t\\\n\tshort\tioVRefNum;\t\t\t\t\\\n\tshort\tioCRefNum;\t\t\t\t\\\n\tshort\tcsCode\nstruct GetAddrParamBlock {\n\tstruct QElem\t\t\t\t\t*qLink;\n\tshort\t\t\t\t\t\t\tqType;\n\tshort\t\t\t\t\t\t\tioTrap;\n\tPtr\t\t\t\t\t\t\t\tioCmdAddr;\n\tGetIPIOCompletionUPP\t\t\tioCompletion;\n\tOSErr\t\t\t\t\t\t\tioResult;\n\tStringPtr\t\t\t\t\t\tioNamePtr;\n\tshort\t\t\t\t\t\t\tioVRefNum;\n\tshort\t\t\t\t\t\t\tioCRefNum;\n\tshort\t\t\t\t\t\t\tcsCode;\t\t\t\t\t\t/* standard I/O header */\n\tip_addr\t\t\t\t\t\t\tourAddress;\t\t\t\t\t/* our IP address */\n\tlong\t\t\t\t\t\t\tourNetMask;\t\t\t\t\t/* our IP net mask */\n};\ntypedef struct GetAddrParamBlock GetAddrParamBlock;\n\n/* control codes */\n\nenum {\n\tipctlEchoICMP\t\t\t\t= 17,\t\t\t\t\t\t\t/* send icmp echo */\n\tipctlLAPStats\t\t\t\t= 19\t\t\t\t\t\t\t/* get lap stats */\n};\n\ntypedef void (*IPIOCompletionProcPtr)(struct ICMPParamBlock *iopb);\n\n#if GENERATINGCFM\ntypedef UniversalProcPtr IPIOCompletionUPP;\n#else\ntypedef IPIOCompletionProcPtr IPIOCompletionUPP;\n#endif\n\n#define IPParamBlockHeader \t\t\\\n\tstruct QElem*\tqLink; \t\t\\\n\tshort\tqType; \t\t\t\t\\\n\tshort\tioTrap; \t\t\t\t\\\n\tPtr\tioCmdAddr; \t\t\t\t\\\n\tIPIOCompletionUPP\tioCompletion;  \\\n\tOSErr\tioResult; \t\t\t\\\n\tStringPtr\tioNamePtr; \t\t\\\n\tshort\tioVRefNum;\t\t\t\t\\\n\tshort\tioCRefNum;\t\t\t\t\\\n\tshort\tcsCode\nstruct ICMPParamBlock {\n\tstruct QElem\t\t\t\t\t*qLink;\n\tshort\t\t\t\t\t\t\tqType;\n\tshort\t\t\t\t\t\t\tioTrap;\n\tPtr\t\t\t\t\t\t\t\tioCmdAddr;\n\tIPIOCompletionUPP\t\t\t\tioCompletion;\n\tOSErr\t\t\t\t\t\t\tioResult;\n\tStringPtr\t\t\t\t\t\tioNamePtr;\n\tshort\t\t\t\t\t\t\tioVRefNum;\n\tshort\t\t\t\t\t\t\tioCRefNum;\n\tshort\t\t\t\t\t\t\tcsCode;\t\t\t\t\t\t/* standard I/O header */\n\tshort\t\t\t\t\t\t\tparams[11];\n\tstruct {\n\t\tunsigned long\t\t\t\t\techoRequestOut;\t\t\t/* time in ticks of when the echo request went out */\n\t\tunsigned long\t\t\t\t\techoReplyIn;\t\t\t/* time in ticks of when the reply was received */\n\t\tstruct rdsEntry\t\t\t\t\techoedData;\t\t\t\t/* data received in responce */\n\t\tPtr\t\t\t\t\t\t\t\toptions;\n\t\tunsigned long\t\t\t\t\tuserDataPtr;\n\t}\t\t\t\t\t\t\t\ticmpEchoInfo;\n};\ntypedef pascal void (*ICMPEchoNotifyProcPtr)(struct ICMPParamBlock *iopb);\n\n#if GENERATINGCFM\ntypedef UniversalProcPtr ICMPEchoNotifyUPP;\n#else\ntypedef ICMPEchoNotifyProcPtr ICMPEchoNotifyUPP;\n#endif\n\nstruct IPParamBlock {\n\tstruct QElem\t\t\t\t\t*qLink;\n\tshort\t\t\t\t\t\t\tqType;\n\tshort\t\t\t\t\t\t\tioTrap;\n\tPtr\t\t\t\t\t\t\t\tioCmdAddr;\n\tIPIOCompletionUPP\t\t\t\tioCompletion;\n\tOSErr\t\t\t\t\t\t\tioResult;\n\tStringPtr\t\t\t\t\t\tioNamePtr;\n\tshort\t\t\t\t\t\t\tioVRefNum;\n\tshort\t\t\t\t\t\t\tioCRefNum;\n\tshort\t\t\t\t\t\t\tcsCode;\t\t\t\t\t\t/* standard I/O header */\n\tunion {\n\t\tstruct {\n\t\t\tip_addr\t\t\t\t\t\t\tdest;\t\t\t\t/* echo to IP address */\n\t\t\twdsEntry\t\t\t\t\t\tdata;\n\t\t\tshort\t\t\t\t\t\t\ttimeout;\n\t\t\tPtr\t\t\t\t\t\t\t\toptions;\n\t\t\tunsigned short\t\t\t\t\toptLength;\n\t\t\tICMPEchoNotifyUPP\t\t\t\ticmpCompletion;\n\t\t\tunsigned long\t\t\t\t\tuserDataPtr;\n\t\t}\t\t\t\t\t\t\t\tIPEchoPB;\n\t\tstruct {\n\t\t\tstruct LAPStats\t\t\t\t\t*lapStatsPtr;\n\t\t}\t\t\t\t\t\t\t\tLAPStatsPB;\n\t}\t\t\t\t\t\t\t\tcsParam;\n};\nunion LAPStatsAddrXlation {\n\tstruct arp_entry\t\t\t\t*arp_table;\n\tstruct nbp_entry\t\t\t\t*nbp_table;\n};\nstruct LAPStats {\n\tshort\t\t\t\t\t\t\tifType;\n\tchar\t\t\t\t\t\t\t*ifString;\n\tshort\t\t\t\t\t\t\tifMaxMTU;\n\tlong\t\t\t\t\t\t\tifSpeed;\n\tshort\t\t\t\t\t\t\tifPhyAddrLength;\n\tchar\t\t\t\t\t\t\t*ifPhysicalAddress;\n\tunion LAPStatsAddrXlation\t\tAddrXlation;\n\tshort\t\t\t\t\t\t\tslotNumber;\n};\ntypedef struct LAPStats LAPStats;\n\nstruct nbp_entry {\n\tip_addr\t\t\t\t\t\t\tip_address;\t\t\t\t\t/* IP address */\n\tAddrBlock\t\t\t\t\t\tat_address;\t\t\t\t\t/* matching AppleTalk address */\n\tBoolean\t\t\t\t\t\t\tgateway;\t\t\t\t\t/* TRUE if entry for a gateway */\n\tBoolean\t\t\t\t\t\t\tvalid;\t\t\t\t\t\t/* TRUE if LAP address is valid */\n\tBoolean\t\t\t\t\t\t\tprobing;\t\t\t\t\t/* TRUE if NBP lookup pending */\n\tSInt8\t\t\t\t\t\t\tafiller;\t\t\t\t\t/* Filler for proper byte alignment\t */\n\tlong\t\t\t\t\t\t\tage;\t\t\t\t\t\t/* ticks since cache entry verified */\n\tlong\t\t\t\t\t\t\taccess;\t\t\t\t\t\t/* ticks since last access */\n\tSInt8\t\t\t\t\t\t\tfiller[116];\t\t\t\t/* for internal use only !!! */\n};\nstruct Enet_addr {\n\tb_16\t\t\t\t\t\t\ten_hi;\n\tb_32\t\t\t\t\t\t\ten_lo;\n};\ntypedef struct Enet_addr Enet_addr;\n\nstruct arp_entry {\n\tshort\t\t\t\t\t\t\tage;\t\t\t\t\t\t/* cache aging field */\n\tb_16\t\t\t\t\t\t\tprotocol;\t\t\t\t\t/* Protocol type */\n\tip_addr\t\t\t\t\t\t\tip_address;\t\t\t\t\t/* IP address */\n\tEnet_addr\t\t\t\t\t\ten_address;\t\t\t\t\t/* matching Ethernet address */\n};\ntypedef struct arp_entry arp_entry;\n\n/* number of ARP table entries */\n\nenum {\n\tARP_TABLE_SIZE\t\t\t\t= 20\n};\n\nenum {\n\tNBP_TABLE_SIZE\t\t\t\t= 20,\t\t\t\t\t\t\t/* number of NBP table entries */\n\tNBP_MAX_NAME_SIZE\t\t\t= 16 + 10 + 2\n};\n\n/* Command codes */\nenum {\n\tTCPCreate\t\t\t\t\t= 30,\n\tTCPPassiveOpen\t\t\t\t= 31,\n\tTCPActiveOpen\t\t\t\t= 32,\n\tTCPSend\t\t\t\t\t\t= 34,\n\tTCPNoCopyRcv\t\t\t\t= 35,\n\tTCPRcvBfrReturn\t\t\t\t= 36,\n\tTCPRcv\t\t\t\t\t\t= 37,\n\tTCPClose\t\t\t\t\t= 38,\n\tTCPAbort\t\t\t\t\t= 39,\n\tTCPStatus\t\t\t\t\t= 40,\n\tTCPExtendedStat\t\t\t\t= 41,\n\tTCPRelease\t\t\t\t\t= 42,\n\tTCPGlobalInfo\t\t\t\t= 43,\n\tTCPCtlMax\t\t\t\t\t= 49\n};\n\nenum {\n\tTCPClosing\t\t\t\t\t= 1,\n\tTCPULPTimeout\t\t\t\t= 2,\n\tTCPTerminate\t\t\t\t= 3,\n\tTCPDataArrival\t\t\t\t= 4,\n\tTCPUrgent\t\t\t\t\t= 5,\n\tTCPICMPReceived\t\t\t\t= 6,\n\tlastEvent\t\t\t\t\t= 32767\n};\n\ntypedef unsigned short TCPEventCode;\n\n\nenum {\n\tTCPRemoteAbort\t\t\t\t= 2,\n\tTCPNetworkFailure\t\t\t= 3,\n\tTCPSecPrecMismatch\t\t\t= 4,\n\tTCPULPTimeoutTerminate\t\t= 5,\n\tTCPULPAbort\t\t\t\t\t= 6,\n\tTCPULPClose\t\t\t\t\t= 7,\n\tTCPServiceError\t\t\t\t= 8,\n\tlastReason\t\t\t\t\t= 32767\n};\n\ntypedef unsigned short TCPTerminationReason;\n\ntypedef pascal void (*TCPNotifyProcPtr)(StreamPtr tcpStream, unsigned short eventCode, Ptr userDataPtr, unsigned short terminReason, struct ICMPReport *icmpMsg);\n\n#if GENERATINGCFM\ntypedef UniversalProcPtr TCPNotifyUPP;\n#else\ntypedef TCPNotifyProcPtr TCPNotifyUPP;\n#endif\n\ntypedef unsigned short tcp_port;\n\n/* ValidityFlags */\n\nenum {\n\ttimeoutValue\t\t\t\t= 0x80,\n\ttimeoutAction\t\t\t\t= 0x40,\n\ttypeOfService\t\t\t\t= 0x20,\n\tprecedence\t\t\t\t\t= 0x10\n};\n\n/* TOSFlags */\nenum {\n\tlowDelay\t\t\t\t\t= 0x01,\n\tthroughPut\t\t\t\t\t= 0x02,\n\treliability\t\t\t\t\t= 0x04\n};\n\nstruct TCPCreatePB {\n\tPtr\t\t\t\t\t\t\t\trcvBuff;\n\tunsigned long\t\t\t\t\trcvBuffLen;\n\tTCPNotifyUPP\t\t\t\t\tnotifyProc;\n\tPtr\t\t\t\t\t\t\t\tuserDataPtr;\n};\ntypedef struct TCPCreatePB TCPCreatePB;\n\nstruct TCPOpenPB {\n\tSInt8\t\t\t\t\t\t\tulpTimeoutValue;\n\tSInt8\t\t\t\t\t\t\tulpTimeoutAction;\n\tSInt8\t\t\t\t\t\t\tvalidityFlags;\n\tSInt8\t\t\t\t\t\t\tcommandTimeoutValue;\n\tip_addr\t\t\t\t\t\t\tremoteHost;\n\ttcp_port\t\t\t\t\t\tremotePort;\n\tip_addr\t\t\t\t\t\t\tlocalHost;\n\ttcp_port\t\t\t\t\t\tlocalPort;\n\tSInt8\t\t\t\t\t\t\ttosFlags;\n\tSInt8\t\t\t\t\t\t\tprecedence;\n\tBoolean\t\t\t\t\t\t\tdontFrag;\n\tSInt8\t\t\t\t\t\t\ttimeToLive;\n\tSInt8\t\t\t\t\t\t\tsecurity;\n\tSInt8\t\t\t\t\t\t\toptionCnt;\n\tSInt8\t\t\t\t\t\t\toptions[40];\n\tPtr\t\t\t\t\t\t\t\tuserDataPtr;\n};\ntypedef struct TCPOpenPB TCPOpenPB;\n\nstruct TCPSendPB {\n\tSInt8\t\t\t\t\t\t\tulpTimeoutValue;\n\tSInt8\t\t\t\t\t\t\tulpTimeoutAction;\n\tSInt8\t\t\t\t\t\t\tvalidityFlags;\n\tBoolean\t\t\t\t\t\t\tpushFlag;\n\tBoolean\t\t\t\t\t\t\turgentFlag;\n\tSInt8\t\t\t\t\t\t\tfiller;\t\t\t\t\t\t/* Filler for proper byte alignment\t */\n\tPtr\t\t\t\t\t\t\t\twdsPtr;\n\tunsigned long\t\t\t\t\tsendFree;\n\tunsigned short\t\t\t\t\tsendLength;\n\tPtr\t\t\t\t\t\t\t\tuserDataPtr;\n};\ntypedef struct TCPSendPB TCPSendPB;\n\n/* for receive and return rcv buff calls */\n/*   Note: the filler in the following structure is in a different location than */\n/*         that specified in the Programmer's Guide.  */\nstruct TCPReceivePB {\n\tSInt8\t\t\t\t\t\t\tcommandTimeoutValue;\n\tBoolean\t\t\t\t\t\t\tmarkFlag;\n\tBoolean\t\t\t\t\t\t\turgentFlag;\n\tSInt8\t\t\t\t\t\t\tfiller;\t\t\t\t\t\t/* Filler for proper byte alignment  */\n\tPtr\t\t\t\t\t\t\t\trcvBuff;\n\tunsigned short\t\t\t\t\trcvBuffLen;\n\tPtr\t\t\t\t\t\t\t\trdsPtr;\n\tunsigned short\t\t\t\t\trdsLength;\n\tunsigned short\t\t\t\t\tsecondTimeStamp;\n\tPtr\t\t\t\t\t\t\t\tuserDataPtr;\n};\ntypedef struct TCPReceivePB TCPReceivePB;\n\nstruct TCPClosePB {\n\tSInt8\t\t\t\t\t\t\tulpTimeoutValue;\n\tSInt8\t\t\t\t\t\t\tulpTimeoutAction;\n\tSInt8\t\t\t\t\t\t\tvalidityFlags;\n\tSInt8\t\t\t\t\t\t\tfiller;\t\t\t\t\t\t/* Filler for proper byte alignment\t */\n\tPtr\t\t\t\t\t\t\t\tuserDataPtr;\n};\ntypedef struct TCPClosePB TCPClosePB;\n\nstruct HistoBucket {\n\tunsigned short\t\t\t\t\tvalue;\n\tunsigned long\t\t\t\t\tcounter;\n};\ntypedef struct HistoBucket HistoBucket;\n\n\nenum {\n\tNumOfHistoBuckets\t\t\t= 7\n};\n\nstruct TCPConnectionStats {\n\tunsigned long\t\t\t\t\tdataPktsRcvd;\n\tunsigned long\t\t\t\t\tdataPktsSent;\n\tunsigned long\t\t\t\t\tdataPktsResent;\n\tunsigned long\t\t\t\t\tbytesRcvd;\n\tunsigned long\t\t\t\t\tbytesRcvdDup;\n\tunsigned long\t\t\t\t\tbytesRcvdPastWindow;\n\tunsigned long\t\t\t\t\tbytesSent;\n\tunsigned long\t\t\t\t\tbytesResent;\n\tunsigned short\t\t\t\t\tnumHistoBuckets;\n\tstruct HistoBucket\t\t\t\tsentSizeHisto[NumOfHistoBuckets];\n\tunsigned short\t\t\t\t\tlastRTT;\n\tunsigned short\t\t\t\t\ttmrSRTT;\n\tunsigned short\t\t\t\t\trttVariance;\n\tunsigned short\t\t\t\t\ttmrRTO;\n\tSInt8\t\t\t\t\t\t\tsendTries;\n\tSInt8\t\t\t\t\t\t\tsourchQuenchRcvd;\n};\ntypedef struct TCPConnectionStats TCPConnectionStats;\n\nstruct TCPStatusPB {\n\tSInt8\t\t\t\t\t\t\tulpTimeoutValue;\n\tSInt8\t\t\t\t\t\t\tulpTimeoutAction;\n\tlong\t\t\t\t\t\t\tunused;\n\tip_addr\t\t\t\t\t\t\tremoteHost;\n\ttcp_port\t\t\t\t\t\tremotePort;\n\tip_addr\t\t\t\t\t\t\tlocalHost;\n\ttcp_port\t\t\t\t\t\tlocalPort;\n\tSInt8\t\t\t\t\t\t\ttosFlags;\n\tSInt8\t\t\t\t\t\t\tprecedence;\n\tSInt8\t\t\t\t\t\t\tconnectionState;\n\tSInt8\t\t\t\t\t\t\tfiller;\t\t\t\t\t\t/* Filler for proper byte alignment\t */\n\tunsigned short\t\t\t\t\tsendWindow;\n\tunsigned short\t\t\t\t\trcvWindow;\n\tunsigned short\t\t\t\t\tamtUnackedData;\n\tunsigned short\t\t\t\t\tamtUnreadData;\n\tPtr\t\t\t\t\t\t\t\tsecurityLevelPtr;\n\tunsigned long\t\t\t\t\tsendUnacked;\n\tunsigned long\t\t\t\t\tsendNext;\n\tunsigned long\t\t\t\t\tcongestionWindow;\n\tunsigned long\t\t\t\t\trcvNext;\n\tunsigned long\t\t\t\t\tsrtt;\n\tunsigned long\t\t\t\t\tlastRTT;\n\tunsigned long\t\t\t\t\tsendMaxSegSize;\n\tstruct TCPConnectionStats\t\t*connStatPtr;\n\tPtr\t\t\t\t\t\t\t\tuserDataPtr;\n};\ntypedef struct TCPStatusPB TCPStatusPB;\n\nstruct TCPAbortPB {\n\tPtr\t\t\t\t\t\t\t\tuserDataPtr;\n};\ntypedef struct TCPAbortPB TCPAbortPB;\n\nstruct TCPParam {\n\tunsigned long\t\t\t\t\ttcpRtoA;\n\tunsigned long\t\t\t\t\ttcpRtoMin;\n\tunsigned long\t\t\t\t\ttcpRtoMax;\n\tunsigned long\t\t\t\t\ttcpMaxSegSize;\n\tunsigned long\t\t\t\t\ttcpMaxConn;\n\tunsigned long\t\t\t\t\ttcpMaxWindow;\n};\ntypedef struct TCPParam TCPParam;\n\nstruct TCPStats {\n\tunsigned long\t\t\t\t\ttcpConnAttempts;\n\tunsigned long\t\t\t\t\ttcpConnOpened;\n\tunsigned long\t\t\t\t\ttcpConnAccepted;\n\tunsigned long\t\t\t\t\ttcpConnClosed;\n\tunsigned long\t\t\t\t\ttcpConnAborted;\n\tunsigned long\t\t\t\t\ttcpOctetsIn;\n\tunsigned long\t\t\t\t\ttcpOctetsOut;\n\tunsigned long\t\t\t\t\ttcpOctetsInDup;\n\tunsigned long\t\t\t\t\ttcpOctetsRetrans;\n\tunsigned long\t\t\t\t\ttcpInputPkts;\n\tunsigned long\t\t\t\t\ttcpOutputPkts;\n\tunsigned long\t\t\t\t\ttcpDupPkts;\n\tunsigned long\t\t\t\t\ttcpRetransPkts;\n};\ntypedef struct TCPStats TCPStats;\n\ntypedef StreamPtr *StreamPPtr;\n\nstruct TCPGlobalInfoPB {\n\tstruct TCPParam\t\t\t\t\t*tcpParamPtr;\n\tstruct TCPStats\t\t\t\t\t*tcpStatsPtr;\n\tStreamPPtr\t\t\t\t\t\ttcpCDBTable[1];\n\tPtr\t\t\t\t\t\t\t\tuserDataPtr;\n\tunsigned short\t\t\t\t\tmaxTCPConnections;\n};\ntypedef struct TCPGlobalInfoPB TCPGlobalInfoPB;\n\ntypedef void (*TCPIOCompletionProcPtr)(struct TCPiopb *iopb);\n\n#if GENERATINGCFM\ntypedef UniversalProcPtr TCPIOCompletionUPP;\n#else\ntypedef TCPIOCompletionProcPtr TCPIOCompletionUPP;\n#endif\n\nstruct TCPiopb {\n\tSInt8\t\t\t\t\t\t\tfill12[12];\n\tTCPIOCompletionUPP\t\t\t\tioCompletion;\n\tshort\t\t\t\t\t\t\tioResult;\n\tPtr\t\t\t\t\t\t\t\tioNamePtr;\n\tshort\t\t\t\t\t\t\tioVRefNum;\n\tshort\t\t\t\t\t\t\tioCRefNum;\n\tshort\t\t\t\t\t\t\tcsCode;\n\tStreamPtr\t\t\t\t\t\ttcpStream;\n\tunion {\n\t\tstruct TCPCreatePB\t\t\t\tcreate;\n\t\tstruct TCPOpenPB\t\t\t\topen;\n\t\tstruct TCPSendPB\t\t\t\tsend;\n\t\tstruct TCPReceivePB\t\t\t\treceive;\n\t\tstruct TCPClosePB\t\t\t\tclose;\n\t\tstruct TCPAbortPB\t\t\t\tabort;\n\t\tstruct TCPStatusPB\t\t\t\tstatus;\n\t\tstruct TCPGlobalInfoPB\t\t\tglobalInfo;\n\t}\t\t\t\t\t\t\t\tcsParam;\n};\ntypedef struct TCPiopb TCPiopb;\n\n\nenum {\n\tUDPCreate\t\t\t\t\t= 20,\n\tUDPRead\t\t\t\t\t\t= 21,\n\tUDPBfrReturn\t\t\t\t= 22,\n\tUDPWrite\t\t\t\t\t= 23,\n\tUDPRelease\t\t\t\t\t= 24,\n\tUDPMaxMTUSize\t\t\t\t= 25,\n\tUDPStatus\t\t\t\t\t= 26,\n\tUDPMultiCreate\t\t\t\t= 27,\n\tUDPMultiSend\t\t\t\t= 28,\n\tUDPMultiRead\t\t\t\t= 29,\n\tUDPCtlMax\t\t\t\t\t= 29\n};\n\nenum {\n\tUDPDataArrival\t\t\t\t= 1,\n\tUDPICMPReceived\t\t\t\t= 2,\n\tlastUDPEvent\t\t\t\t= 32767\n};\n\ntypedef unsigned short UDPEventCode;\n\ntypedef pascal void (*UDPNotifyProcPtr)(StreamPtr udpStream, unsigned short eventCode, Ptr userDataPtr, struct ICMPReport *icmpMsg);\n\n#if GENERATINGCFM\ntypedef UniversalProcPtr UDPNotifyUPP;\n#else\ntypedef UDPNotifyProcPtr UDPNotifyUPP;\n#endif\n\ntypedef unsigned short udp_port;\n\n/* for create and release calls */\nstruct UDPCreatePB {\n\tPtr\t\t\t\t\t\t\t\trcvBuff;\n\tunsigned long\t\t\t\t\trcvBuffLen;\n\tUDPNotifyUPP\t\t\t\t\tnotifyProc;\n\tunsigned short\t\t\t\t\tlocalPort;\n\tPtr\t\t\t\t\t\t\t\tuserDataPtr;\n\tudp_port\t\t\t\t\t\tendingPort;\n};\ntypedef struct UDPCreatePB UDPCreatePB;\n\nstruct UDPSendPB {\n\tunsigned short\t\t\t\t\treserved;\n\tip_addr\t\t\t\t\t\t\tremoteHost;\n\tudp_port\t\t\t\t\t\tremotePort;\n\tPtr\t\t\t\t\t\t\t\twdsPtr;\n\tBoolean\t\t\t\t\t\t\tcheckSum;\n\tSInt8\t\t\t\t\t\t\tfiller;\t\t\t\t\t\t/* Filler for proper byte alignment\t */\n\tunsigned short\t\t\t\t\tsendLength;\n\tPtr\t\t\t\t\t\t\t\tuserDataPtr;\n\tudp_port\t\t\t\t\t\tlocalPort;\n};\ntypedef struct UDPSendPB UDPSendPB;\n\n/* for receive and buffer return calls */\nstruct UDPReceivePB {\n\tunsigned short\t\t\t\t\ttimeOut;\n\tip_addr\t\t\t\t\t\t\tremoteHost;\n\tudp_port\t\t\t\t\t\tremotePort;\n\tPtr\t\t\t\t\t\t\t\trcvBuff;\n\tunsigned short\t\t\t\t\trcvBuffLen;\n\tunsigned short\t\t\t\t\tsecondTimeStamp;\n\tPtr\t\t\t\t\t\t\t\tuserDataPtr;\n\tip_addr\t\t\t\t\t\t\tdestHost;\t\t\t\t\t/* only for use with multi rcv */\n\tudp_port\t\t\t\t\t\tdestPort;\t\t\t\t\t/* only for use with multi rcv */\n};\ntypedef struct UDPReceivePB UDPReceivePB;\n\nstruct UDPMTUPB {\n\tunsigned short\t\t\t\t\tmtuSize;\n\tip_addr\t\t\t\t\t\t\tremoteHost;\n\tPtr\t\t\t\t\t\t\t\tuserDataPtr;\n};\ntypedef struct UDPMTUPB UDPMTUPB;\n\ntypedef void (*UDPIOCompletionProcPtr)(struct UDPiopb *iopb);\n\n#if GENERATINGCFM\ntypedef UniversalProcPtr UDPIOCompletionUPP;\n#else\ntypedef UDPIOCompletionProcPtr UDPIOCompletionUPP;\n#endif\n\nstruct UDPiopb {\n\tSInt8\t\t\t\t\t\t\tfill12[12];\n\tUDPIOCompletionUPP\t\t\t\tioCompletion;\n\tshort\t\t\t\t\t\t\tioResult;\n\tPtr\t\t\t\t\t\t\t\tioNamePtr;\n\tshort\t\t\t\t\t\t\tioVRefNum;\n\tshort\t\t\t\t\t\t\tioCRefNum;\n\tshort\t\t\t\t\t\t\tcsCode;\n\tStreamPtr\t\t\t\t\t\tudpStream;\n\tunion {\n\t\tstruct UDPCreatePB\t\t\t\tcreate;\n\t\tstruct UDPSendPB\t\t\t\tsend;\n\t\tstruct UDPReceivePB\t\t\t\treceive;\n\t\tstruct UDPMTUPB\t\t\t\t\tmtu;\n\t}\t\t\t\t\t\t\t\tcsParam;\n};\ntypedef struct UDPiopb UDPiopb;\n\n\n#if GENERATINGCFM\n#else\n#endif\n\nenum {\n\tuppGetIPIOCompletionProcInfo = kCStackBased\n\t\t | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(struct GetAddrParamBlock*))),\n\tuppIPIOCompletionProcInfo = kCStackBased\n\t\t | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(struct ICMPParamBlock*))),\n\tuppICMPEchoNotifyProcInfo = kPascalStackBased\n\t\t | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(struct ICMPParamBlock*))),\n\tuppTCPNotifyProcInfo = kPascalStackBased\n\t\t | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(StreamPtr)))\n\t\t | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(unsigned short)))\n\t\t | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Ptr)))\n\t\t | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(unsigned short)))\n\t\t | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(struct ICMPReport*))),\n\tuppTCPIOCompletionProcInfo = kCStackBased\n\t\t | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(struct TCPiopb*))),\n\tuppUDPNotifyProcInfo = kPascalStackBased\n\t\t | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(StreamPtr)))\n\t\t | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(unsigned short)))\n\t\t | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Ptr)))\n\t\t | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(struct ICMPReport*))),\n\tuppUDPIOCompletionProcInfo = kCStackBased\n\t\t | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(struct UDPiopb*)))\n};\n\n#if GENERATINGCFM\n#define NewGetIPIOCompletionProc(userRoutine)\t\t\\\n\t\t(GetIPIOCompletionUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGetIPIOCompletionProcInfo, GetCurrentArchitecture())\n#define NewIPIOCompletionProc(userRoutine)\t\t\\\n\t\t(IPIOCompletionUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppIPIOCompletionProcInfo, GetCurrentArchitecture())\n#define NewICMPEchoNotifyProc(userRoutine)\t\t\\\n\t\t(ICMPEchoNotifyUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMPEchoNotifyProcInfo, GetCurrentArchitecture())\n#define NewTCPNotifyProc(userRoutine)\t\t\\\n\t\t(TCPNotifyUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppTCPNotifyProcInfo, GetCurrentArchitecture())\n#define NewTCPIOCompletionProc(userRoutine)\t\t\\\n\t\t(TCPIOCompletionUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppTCPIOCompletionProcInfo, GetCurrentArchitecture())\n#define NewUDPNotifyProc(userRoutine)\t\t\\\n\t\t(UDPNotifyUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppUDPNotifyProcInfo, GetCurrentArchitecture())\n#define NewUDPIOCompletionProc(userRoutine)\t\t\\\n\t\t(UDPIOCompletionUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppUDPIOCompletionProcInfo, GetCurrentArchitecture())\n#else\n#define NewGetIPIOCompletionProc(userRoutine)\t\t\\\n\t\t((GetIPIOCompletionUPP) (userRoutine))\n#define NewIPIOCompletionProc(userRoutine)\t\t\\\n\t\t((IPIOCompletionUPP) (userRoutine))\n#define NewICMPEchoNotifyProc(userRoutine)\t\t\\\n\t\t((ICMPEchoNotifyUPP) (userRoutine))\n#define NewTCPNotifyProc(userRoutine)\t\t\\\n\t\t((TCPNotifyUPP) (userRoutine))\n#define NewTCPIOCompletionProc(userRoutine)\t\t\\\n\t\t((TCPIOCompletionUPP) (userRoutine))\n#define NewUDPNotifyProc(userRoutine)\t\t\\\n\t\t((UDPNotifyUPP) (userRoutine))\n#define NewUDPIOCompletionProc(userRoutine)\t\t\\\n\t\t((UDPIOCompletionUPP) (userRoutine))\n#endif\n\n#if GENERATINGCFM\n#define CallGetIPIOCompletionProc(userRoutine, iopb)\t\t\\\n\t\tCallUniversalProc((UniversalProcPtr)(userRoutine), uppGetIPIOCompletionProcInfo, (iopb))\n#define CallIPIOCompletionProc(userRoutine, iopb)\t\t\\\n\t\tCallUniversalProc((UniversalProcPtr)(userRoutine), uppIPIOCompletionProcInfo, (iopb))\n#define CallICMPEchoNotifyProc(userRoutine, iopb)\t\t\\\n\t\tCallUniversalProc((UniversalProcPtr)(userRoutine), uppICMPEchoNotifyProcInfo, (iopb))\n#define CallTCPNotifyProc(userRoutine, tcpStream, eventCode, userDataPtr, terminReason, icmpMsg)\t\t\\\n\t\tCallUniversalProc((UniversalProcPtr)(userRoutine), uppTCPNotifyProcInfo, (tcpStream), (eventCode), (userDataPtr), (terminReason), (icmpMsg))\n#define CallTCPIOCompletionProc(userRoutine, iopb)\t\t\\\n\t\tCallUniversalProc((UniversalProcPtr)(userRoutine), uppTCPIOCompletionProcInfo, (iopb))\n#define CallUDPNotifyProc(userRoutine, udpStream, eventCode, userDataPtr, icmpMsg)\t\t\\\n\t\tCallUniversalProc((UniversalProcPtr)(userRoutine), uppUDPNotifyProcInfo, (udpStream), (eventCode), (userDataPtr), (icmpMsg))\n#define CallUDPIOCompletionProc(userRoutine, iopb)\t\t\\\n\t\tCallUniversalProc((UniversalProcPtr)(userRoutine), uppUDPIOCompletionProcInfo, (iopb))\n#else\n#define CallGetIPIOCompletionProc(userRoutine, iopb)\t\t\\\n\t\t(*(userRoutine))((iopb))\n#define CallIPIOCompletionProc(userRoutine, iopb)\t\t\\\n\t\t(*(userRoutine))((iopb))\n#define CallICMPEchoNotifyProc(userRoutine, iopb)\t\t\\\n\t\t(*(userRoutine))((iopb))\n#define CallTCPNotifyProc(userRoutine, tcpStream, eventCode, userDataPtr, terminReason, icmpMsg)\t\t\\\n\t\t(*(userRoutine))((tcpStream), (eventCode), (userDataPtr), (terminReason), (icmpMsg))\n#define CallTCPIOCompletionProc(userRoutine, iopb)\t\t\\\n\t\t(*(userRoutine))((iopb))\n#define CallUDPNotifyProc(userRoutine, udpStream, eventCode, userDataPtr, icmpMsg)\t\t\\\n\t\t(*(userRoutine))((udpStream), (eventCode), (userDataPtr), (icmpMsg))\n#define CallUDPIOCompletionProc(userRoutine, iopb)\t\t\\\n\t\t(*(userRoutine))((iopb))\n#endif\n\n\n#if PRAGMA_IMPORT_SUPPORTED\n#pragma import off\n#endif\n\n#if PRAGMA_ALIGN_SUPPORTED\n#pragma options align=reset\n#endif\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* __MACTCP__ */\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SocketPlugin/68K/dnr.c",
    "content": "/* \t\n\n\tFile:\t\tDNR.c \n\t\n\tContains:\tDNR library for MPW\n\n  \tCopyright:\t 1989-1995 by Apple Computer, Inc., all rights reserved\n\n\tVersion:\tTechnology:\t\t\tNetworking\n\t\t\t\tPackage:\t\t\tUse with MacTCP 2.0.6 and the Universal\n\t\t\t\t\t\t\t\t\tInterfaces 2.1b1\t\n\t\t\n\tChange History (most recent first):\n\t\t<3>\t 1/23/95\trrk  \timplemented use of universal procptrs\n\t\t \t\t\t\t\t\tChanged selector name HINFO to HXINFO\n\t\t \t\t\t\t\t\tdue to conflict of name in MacTCP header\n\t\t \t\t\t\t\t\tRemoved use of TrapAvailable and exchanged\n\t\t \t\t\t\t\t\tfor the TrapExists call.\n\t\t\t\t\t\t\t\tChanged symbol codeHandle to gDNRCodeHndl\n\t\t\t\t\t\t\t\tChanged symbol dnr to gDNRCodePtr\n\tFurther modifications by Steve Falkenburg, Apple MacDTS 8/91\n\tModifications by Jim Matthews, Dartmouth College, 5/91\n\n\t\n*/\n#include \"sq.h\"\n\n#ifndef __OSUTILS__\n#include <OSUtils.h>\n#endif\n\n#ifndef __ERRORS__\n#include <Errors.h>\n#endif\n\n#ifndef __FILES__\n#include <Files.h>\n#endif\n\n#ifndef __RESOURCES__\n#include <Resources.h>\n#endif\n\n#ifndef __MEMORY__\n#include <Memory.h>\n#endif\n\n#ifndef __TRAPS__\n#include <Traps.h>\n#endif\n\n#ifndef __GESTALT__\n#include <Gestalt.h>\n#endif\n\n#ifndef __FOLDERS__\n#include <Folders.h>\n#endif\n\n#ifndef __TOOLUTILS__\n#include <ToolUtils.h>\n#endif\n\n\n#ifndef __MACTCP__\n#include \"MacTCP.h\"\n#endif\n\n#ifndef __ADDRESSXLATION__\n#include \"AddressXlation.h\"\n#endif\n\n// think C compatibility stuff\n\n#ifndef\t_GestaltDispatch\n#define\t_GestaltDispatch\t_Gestalt\n#endif\n\n\n/* RRK Modification 1/95 - commenting out the following defines as they are\n\tdefined in the DNRCalls.h header file\n*/\n\nvoid GetSystemFolder(short *vRefNumP, long *dirIDP);\nvoid GetCPanelFolder(short *vRefNumP, long *dirIDP);\nshort SearchFolderForDNRP(long targetType, long targetCreator, short vRefNum, long dirID);\nshort OpenOurRF(void);\nshort\tNumToolboxTraps(void);\nTrapType\tGetTrapType(short theTrap);\nBoolean TrapExists(short theTrap);\n\nstatic Handle \t\t\tgDNRCodeHndl = nil;\nstatic ProcPtr\t\t\tgDNRCodePtr = nil;\n\n/*\tCheck the bits of a trap number to determine its type. */\n\n/* InitGraf is always implemented (trap $A86E).  If the trap table is big\n** enough, trap $AA6E will always point to either Unimplemented or some other\n** trap, but will never be the same as InitGraf.  Thus, you can check the size\n** of the trap table by asking if the address of trap $A86E is the same as\n** $AA6E. */\n\n#pragma segment UtilMain\nshort\tNumToolboxTraps(void)\n{\n\tif (NGetTrapAddress(_InitGraf, ToolTrap) == NGetTrapAddress(0xAA6E, ToolTrap))\n\t\treturn(0x200);\n\telse\n\t\treturn(0x400);\n}\n\n#pragma segment UtilMain\nTrapType\tGetTrapType(short theTrap)\n{\n\t/* OS traps start with A0, Tool with A8 or AA. */\n\tif ((theTrap & 0x0800) == 0)\t\t\t\t\t/* per D.A. */\n\t\treturn(OSTrap);\n\telse\n\t\treturn(ToolTrap);\n}\n\nBoolean TrapExists(short theTrap)\n{\n\tTrapType\ttheTrapType;\n\n\ttheTrapType = GetTrapType(theTrap);\n\tif ((theTrapType == ToolTrap) && ((theTrap &= 0x07FF) >= NumToolboxTraps()))\n\t\ttheTrap = _Unimplemented;\n\n\treturn(NGetTrapAddress(_Unimplemented, ToolTrap) != NGetTrapAddress(theTrap, theTrapType));\n}\n\nvoid GetSystemFolder(short *vRefNumP, long *dirIDP)\n{\n\tSysEnvRec info;\n\tlong wdProcID;\n\t\n\tSysEnvirons(1, &info);\n\tif (GetWDInfo(info.sysVRefNum, vRefNumP, dirIDP, &wdProcID) != noErr) \n\t{\n\t\t*vRefNumP = 0;\n\t\t*dirIDP = 0;\n\t}\n}\n\nvoid GetCPanelFolder(short *vRefNumP, long *dirIDP)\n{\n\tBoolean hasFolderMgr = false;\n\tlong feature;\n\t\n\tif (TrapExists(_GestaltDispatch)) if (Gestalt(gestaltFindFolderAttr, &feature) == noErr) hasFolderMgr = true;\n\tif (!hasFolderMgr) \n\t{\n\t\tGetSystemFolder(vRefNumP, dirIDP);\n\t\treturn;\n\t}\n\telse \n\t{\n\t\tif (FindFolder(kOnSystemDisk, kControlPanelFolderType, kDontCreateFolder, vRefNumP, dirIDP) != noErr) \n\t\t{\n\t\t\t*vRefNumP = 0;\n\t\t\t*dirIDP = 0;\n\t\t}\n\t}\n}\n\t\n/* SearchFolderForDNRP is called to search a folder for files that might \n\tcontain the 'dnrp' resource */\nshort SearchFolderForDNRP(long targetType, long targetCreator, short vRefNum, long dirID)\n{\n\tHParamBlockRec fi;\n\tStr255 filename;\n\tshort refnum;\n\t\n\tfi.fileParam.ioCompletion = nil;\n\tfi.fileParam.ioNamePtr = filename;\n\tfi.fileParam.ioVRefNum = vRefNum;\n\tfi.fileParam.ioDirID = dirID;\n\tfi.fileParam.ioFDirIndex = 1;\n\t\n\twhile (PBHGetFInfo(&fi, false) == noErr) \n\t{\n\t\t/* scan system folder for driver resource files of specific type & creator */\n\t\tif (fi.fileParam.ioFlFndrInfo.fdType == targetType &&\n\t\t\tfi.fileParam.ioFlFndrInfo.fdCreator == targetCreator) \n\t\t{\n\t\t\t/* found the MacTCP driver file? */\n\t\t\trefnum = HOpenResFile(vRefNum, dirID, filename, fsRdPerm);\n\t\t\tif (GetIndResource('dnrp', 1) == NULL)\n\t\t\t\tCloseResFile(refnum);\n\t\t\telse\n\t\t\t\treturn refnum;\n\t\t}\n\t\t/* check next file in system folder */\n\t\tfi.fileParam.ioFDirIndex++;\n\t\tfi.fileParam.ioDirID = dirID;\t/* PBHGetFInfo() clobbers ioDirID */\n\t}\n\treturn(-1);\n}\t\n\n/* OpenOurRF is called to open the MacTCP driver resources */\n\nshort OpenOurRF(void)\n{\n\tshort refnum;\n\tshort vRefNum;\n\tlong dirID;\n\t\n\t/* first search Control Panels for MacTCP 1.1 */\n\tGetCPanelFolder(&vRefNum, &dirID);\n\trefnum = SearchFolderForDNRP('cdev', 'ztcp', vRefNum, dirID);\n\tif (refnum != -1) return(refnum);\n\t\t\n\t/* next search System Folder for MacTCP 1.0.x */\n\tGetSystemFolder(&vRefNum, &dirID);\n\trefnum = SearchFolderForDNRP('cdev', 'mtcp', vRefNum, dirID);\n\tif (refnum != -1) return(refnum);\n\t\t\n\t/* finally, search Control Panels for MacTCP 1.0.x */\n\tGetCPanelFolder(&vRefNum, &dirID);\n\trefnum = SearchFolderForDNRP('cdev', 'mtcp', vRefNum, dirID);\n\tif (refnum != -1) return(refnum);\n\t\t\n\treturn -1;\n}\t\n\n\nOSErr OpenResolver(char *fileName)\n{\n\tshort \t\t\trefnum;\n\tOSErr \t\t\trc;\n\t\n\tif (gDNRCodePtr != nil)\n\t\t/* resolver already loaded in */\n\t\treturn(noErr);\n\t\t\n\t/* open the MacTCP driver to get DNR resources. Search for it based on\n\t   creator & type rather than simply file name */\t\n\trefnum = OpenOurRF();\n\n\t/* ignore failures since the resource may have been installed in the \n\t   System file if running on a Mac 512Ke */\n\t   \n\t/* load in the DNR resource package */\n\tgDNRCodeHndl = GetIndResource('dnrp', 1);\n\tif (gDNRCodeHndl == nil)\n\t{\n\t\t/* can't open DNR */\n\t\treturn(ResError());\n\t}\n\t\n\tDetachResource(gDNRCodeHndl);\n\tif (refnum != -1) \n\t{\n\t\tCloseResFile(refnum);\n\t}\n\t\t\n\t/* lock the DNR resource since it cannot be reloated while opened */\n\tMoveHHi(gDNRCodeHndl);\n\tHLock(gDNRCodeHndl);\n\t\n\tgDNRCodePtr = (ProcPtr)*gDNRCodeHndl;\n\t\n\t/* call open resolver */\n\t// RRK modification 1/95 use CallOpenResolverProc define to call UPP\n\t\n\trc = CallOpenResolverProc(gDNRCodePtr, OPENRESOLVER, fileName);\n\tif (rc != noErr) \n\t{\n\t\t/* problem with open resolver, flush it */\n\t\tHUnlock(gDNRCodeHndl);\n\t\tDisposeHandle(gDNRCodeHndl);\n\t\tgDNRCodePtr = nil;\n\t}\n\treturn(rc);\n}\n\n\nOSErr CloseResolver(void)\n{\n\t\n\tif (gDNRCodePtr == nil)\n\t\t/* resolver not loaded error */\n\t\treturn(notOpenErr);\n\t\t\n\t/* call close resolver */\n\t// RRK modification 1/95 use CallCloseResolverProc define to call UPP\n\t// (void) (*dnr)(CLOSERESOLVER);\n\n\tCallCloseResolverProc(gDNRCodePtr, CLOSERESOLVER);\n\t\n\t/* release the DNR resource package */\n\tHUnlock(gDNRCodeHndl);\n\tDisposeHandle(gDNRCodeHndl);\n\tgDNRCodePtr = nil;\n\treturn(noErr);\n}\n\n\t// RRK modification 1/95 declare parameter resultProc to be of type \n\t// ResultProcUPP instead of a long\n\t\nOSErr StrToAddr(char *hostName, struct hostInfo *rtnStruct, \n\t\t\tResultUPP resultproc, Ptr userDataPtr)\n{\n\tif (gDNRCodePtr == nil)\n\t\t/* resolver not loaded error */\n\t\treturn(notOpenErr);\n\t\t\n\t// RRK modification 1/95 use CallStrToAddrProc define to call UPP\n\t// return((*dnr)(STRTOADDR, hostName, rtnStruct, resultproc, userDataPtr));\n\t\t\t\n\treturn (CallStrToAddrProc(gDNRCodePtr, STRTOADDR, hostName, rtnStruct, resultproc, userDataPtr));\n}\n\t\nOSErr AddrToStr(unsigned long addr, char *addrStr)\n{\n\tOSErr\terr;\n\tif (gDNRCodePtr == nil)\n\t\t/* resolver not loaded error */\n\t\treturn(notOpenErr);\n\t\t\n\t// RRK modification 1/95 use CallAddrToStrProc define to call UPP\n\t// (*dnr)(ADDRTOSTR, addr, addrStr);\n\t\n\terr = CallAddrToStrProc(gDNRCodePtr, ADDRTOSTR, addr, addrStr);\n\treturn(noErr);\n}\n\t\nOSErr EnumCache(EnumResultUPP resultproc, Ptr userDataPtr)\n{\n\n\tif (gDNRCodePtr == nil)\n\t\t/* resolver not loaded error */\n\t\treturn(notOpenErr);\n\t\t\n\t// RRK modification 1/95 use CallEnumCacheProc define to call UPP\n\t// return((*dnr)(ENUMCACHE, resultproc, userDataPtr));\n\n\treturn (CallEnumCacheProc(gDNRCodePtr, ENUMCACHE, resultproc, userDataPtr));\n}\n\t\n\t\nOSErr AddrToName(unsigned long addr, struct hostInfo *rtnStruct, \n\t\t\tResultUPP resultproc, Ptr userDataPtr)\n{\n\tif (gDNRCodePtr == nil)\n\t\t/* resolver not loaded error */\n\t\treturn(notOpenErr);\n\t\t\n\t// RRK modification 1/95 use CallAddrToNameProc define to call UPP\n\t// return((*dnr)(ADDRTONAME, addr, rtnStruct, resultproc, userDataPtr));\n\n\treturn(CallAddrToNameProc(gDNRCodePtr, ADDRTONAME, addr, rtnStruct, resultproc, userDataPtr));\n}\n\n\nextern OSErr HInfo(char *hostName, struct returnRec *returnRecPtr, \n\t\t\tResultProc2UPP resultProc, Ptr userDataPtr)\n{\n\tif (gDNRCodePtr == nil)\n\t\t/* resolver not loaded error */\n\t\treturn(notOpenErr);\n\t\t\n\t// RRK modification 1/95 use CallHInfoProc define to call UPP\n\t// return((*dnr)(HINFO, hostName, returnRecPtr, resultProc, userDataPtr));\n\n\treturn(CallHInfoProc(gDNRCodePtr, HXINFO, hostName, returnRecPtr, resultProc, userDataPtr));\n\n}\n\t\nextern OSErr MXInfo(char *hostName, struct returnRec *returnRecPtr, \n\t\t\tResultProc2UPP resultProc, Ptr userDataPtr)\n{\n\tif (gDNRCodePtr == nil)\n\t\t/* resolver not loaded error */\n\t\treturn(notOpenErr);\n\t\t\n\t// RRK modification 1/95 use CallHInfoProc define to call UPP\n\t// return((*dnr)(MXINFO, hostName, returnRecPtr, resultProc, userDataPtr));\n\n\treturn(CallMXInfoProc(gDNRCodePtr, MXINFO, hostName, returnRecPtr, resultProc, userDataPtr));\n\n}\t/* removed ; (causes syntax err in Think C 5.0 */\n\t"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SocketPlugin/68K/sqMacNetworkNOMACTCP.c",
    "content": "#include <ConditionalMacros.h>\n#if 1\n#include <OpenTransport.h>\n#include <OpenTptInternet.h>\n#include <OpenTptClient.h>\n#include <stropts.h>\n#include <Gestalt.h>\n#include <TextUtils.h>\n#include <files.h>\n#if !TARGET_API_MAC_CARBON\n    #ifndef NewOTNotifyUPP\n    \ttypedef struct OTConfiguration* OTConfigurationRef;\n    \t#define OTNotifyUPP OTNotifyProcPtr \n    \t#define NewOTNotifyUPP(userRoutine) userRoutine\n    \t#define DisposeOTNotifyUPP(userRoutine)\n    #endif\n#endif\n\n#include \"sq.h\"\n#include \"SocketPlugin.h\"\n//#define OTSERVER\n\n/*  May 1st 2000\n\tAn Open Transport 2.0 version of source code for TCP/IP & UDP support\n\tSome of this the code was descended from Apple sample source written by: Eric Okholm\n\tHowever getting it to work was done by\n\tJohn M Mcintosh of Corporate Smalltalk Consulting Ltd\n\tjohnmci@smalltalkconsulting.com \n\thttp://www.smalltalkconsulting.com \n\tIn May of 2000 under contract to Disney\n\t\n\tSome of the original source code was written by John Maloney of Disney thoughout the 1990's\n\t\n\tThe basic intent was to make the code fully interrupt driven\n\tNo limits.... Well maybe we throttle read buffers to some parcel of memory to prevent us\n\tfrom using all the memory on the box. Sends depend on lowerlayer buffering/flow control.\n\tTesting from a 500Mhz PowerBook showed we could saturate a 100MB ethernet when sending data oneway.\n\t\n\tUDP and TCP/IP are all supported.\n\tNote for TCP we turn on two options IP_REUSEADDR, and IP_KEEPALIVE.\n\tWe do NOT handle T_EXDATA  data\n\t\n\tV1.0 May 18th 2000, JMM (TCP/IP and UDP)\n\tV1.1 May 19th 2000, JMM Cleanup\n\tV1.2 may 20th 2000, JMM UDP free buffer cleanup, relook at resolver terminate to fix crash\n\tV1.3 may 23rd 2000, JMM fix T_UDERR crash\n\tV1.3.1 may 24th 2000, JMM UDP work\n\tV1.3.2 may 25th 2000, JMM socket options work\n\tV1.3.3 may 27th 2000, JMM rewrote resolver\n\tV1.3.4 Jun 7th 2000, JMM some integration\n\tV1.3.5 Jun 9th 2000, JMM Dan Ingalls found some interesting bugs with a T_GODATA on T_CONNECT.\n\tV1.3.6 Jun 10th 2000, JMM fix a fatal but in close/close pattern I made on the 9th.\n\tV1.3.7 Aug 1st 2000, JMM Some carbon work, reviewed open non-existent port logic fix so unavailable port causes immediate failure\n\tV1.3.8 Aug 29th 2000, JMM Fix problem with recusion on make me an EP.\n\tv1.3.9 Sept 28th 2000, JMM Problem with accept somewhere (so harden code)\n\tv1.3.10 Oct 4th 2000, JMM Issue with destory and free buffers, and disconnect on read with buffer restriction\n\tv1.3.11 Nov 11th 2000, JMM extra buffer for server version\n\tv1.3.12 Jan 2001, Karl Goiser Carbon changes\n\t\n\tNotes beware semaphore's lurk for socket support. Three semaphores lives in Smalltalk, waiting for\n\tconnect/disconnect/listen, sending data, and receiving data. When to tap the semaphore is based on\n\tinferences driven from the smalltalk code. We really need a call to tell us intent.\n\t\n\twaitForDisconnectUntil:\n\t    via closeAndDestroy: after primSocketCloseConnection:\n\t    \n\twaitForDataUntil:\n\t    Usually before primitiveSocketReceiveDataBufCount: after checking SocketReceiveDataAvailable\n\t    \n\twaitForSendDoneUntil:\n\t    via sendData: or sendSomeData:startIndex;count: before calls to primitiveSocketSendDataBufCount\n\t    \n\twaitForConnectionUntil:\n\t    via waitForAcceptUntil and many places afer doing primitiveSocketConnectToPort\n*/\t\t\t\t\n\t\t\t\t\n/*** Socket Type Constants ***/\n#define TCPSocketType 0\n#define UDPSocketType 1\n#define TCPListenerSocketType 2   //These are special to enable the right options for listening. Not Exposed to Smalltalk\n#define UDPListenerSocketType 3   //Very special not really linked to an EP structure.  Not Exposed to Smalltalk\n\n/*** Resolver Status Constants ***/\n#define RESOLVER_UNINITIALIZED\t0\n#define RESOLVER_SUCCESS\t\t1\n#define RESOLVER_BUSY\t\t\t2\n#define RESOLVER_ERROR\t\t\t3\n#define RESOLVER_NAMETOADDR     4\n#define RESOLVER_ADDRTONAME     5\n\n\n/*** TCP Socket Status Constants ***/\n#define InvalidSocket           -1\n#define Unconnected\t\t\t\t0\n#define WaitingForConnection\t1\n#define Connected\t\t\t\t2\n#define OtherEndClosed\t\t\t3\n#define ThisEndClosed\t\t\t4\n\n\n\t// Overall program states\nenum\n{\n\tkProgramRunning\t\t= 1,\n\tkProgramDone\t\t= 2\n};\n\n\n\t// Bit numbers in EPInfo stateFlags fields\nenum\n{\n\tkOpenInProgressBit\t\t\t\t= 0,  \n\tkUnConnected    \t\t\t\t= 1,\n\tkWaitingForConnection           = 2,\n\tkConnected                      = 3,\n\tkSendIsBlocked                  = 4,\n    kOtherEndClosed                 = 5,\n    kThisEndClosed                  = 6,\n\tkPassconBit                     = 7\n\n};\n\n\t// Bit numbers in EPInfo stateFlags2 fields\nenum\n{\n\tkFlushDisconnectInProgressBit\t= 0,\n\tkMakeEPIdle                     = 1,\n\tkEPIsBroken                     = 2,\n\tkReadFlowControl                = 3,\n\tkPassconNeeded                  = 4,\n\tkTapSemaphore                   = 5,\n\tkTapSemaphoreReadData           = 6,\n\tkTapSemaphoreWriteData          = 7\n};\n\n\t// Bit numbers in EPInfo stateFlags3 fields\nenum\n{\n    kKeepAliveOptionNeeded          = 0,\n    kSleepKilledMe                  = 1,\n    kWaitingForBind                 = 2\n}; \n\nenum\n{\n\tkOTVersion111\t\t\t\t= 0x01110000,\n\tkOTVersion112\t\t\t\t= 0x01120000,\n\tkOTVersion113\t\t\t\t= 0x01130000,\n\tkOTVersion130\t\t\t\t= 0x01300000\n};\n\nconst kTCPKeepAliveInMinutes\t\t= 10;\t\t// 10 minutes  keep alive\n#ifdef OTSERVER\nconst kReadBuffersToAllocate\t    = 256;\t\t// Memory Allocation issue how big, this means 256x mtu size * 4 But for 68K we do 1/2 size\n#else\nconst kReadBuffersToAllocate\t    = 50;\t\t// Memory Allocation issue how big, this means 50x mtu size * 4 But for 68K we do 1/2 size\n#endif\n\n\t// Endpoint Info Structure\n\nstruct EPInfo\n{\n\tEndpointRef\t\terf;\t\t\t\t//\tactual endpoint\n\tOTLink\t\t\tlink;\t\t\t\t//\tlink into an OT LIFO (atomic)\n\tOTLink          globalLink;         //  link that follows all allocated EPs\n    SInt32          outstandingSends;   //  number of sends outstanding\n    OTList          readBuffers;        //  Read buffers\n    SInt32          bytesPendingToRead; //  bytes outstanding to read\n\tSInt32\t\t\tsemaIndex;\t\t\t//\tsemaphore index\n\tSInt32          readSemaIndex;      //  read semaphore\n\tSInt32          writeSemaIndex;     //  write semaphore\n\tSInt32          UDPMaximumSize;     //  max size if a UDP endpoint\n\tSInt32\t\t\tlastError;          //  last error code\n\tUInt8\t\t\tstateFlags;\t\t\t//\tvarious status fields\n\tUInt8\t\t\tstateFlags2;\t\t//\tvarious status fields\n\tUInt8\t\t\tstateFlags3;\t\t//\tvarious status fields\n\tUInt8           socketType;         //  type of socket, tcp, udp, or tcp/udp listener\n\tInetAddress     localAddress;       //  local address at bind time (ignored used call to get current)\n\tInetAddress     remoteAddress;      //  remote address at connect (ignored used call to get current)\n\tBoolean         UDPMoreFlag;        //  UDP more of datagram flag set\n    };\ntypedef struct EPInfo EPInfo;\n\nstruct ReadBuffer                       // Structure to contain read data.\n{\n\tOTLink\t\t\tfNext;\t\t\t\t//\tlink into an OT FIFO \n\tUInt32          readBufferSize;\n\tUInt32\t\t\treadBufferOriginalSize;  \n\tchar *          readBufferData;\n\tchar *          readBufferPtr;      //Sliding pointer used to partial read buffer.\n    InetAddress     UDPAddress;         //UDP address\n\tBoolean         UDPMoreFlag;        //UDP more of datagram flag set\n};\ntypedef struct ReadBuffer ReadBuffer;\n\n\nstruct TKeepAliveOpt                    \n{\n\tUInt32\t\tlen;\n\tOTXTILevel\tlevel;\n\tOTXTIName\tname;\n\tUInt32\t\tstatus;\n\tUInt32\t\ttcpKeepAliveOn;\n\tUInt32\t\ttcpKeepAliveTimer;\n};\ntypedef struct TKeepAliveOpt TKeepAliveOpt;\n\nstruct TLingerOpt                    \n{\n\tUInt32\t\tlen;\n\tOTXTILevel\tlevel;\n\tOTXTIName\tname;\n\tUInt32\t\tstatus;\n\tUInt32\t\ttcpLingerOn;\n\tUInt32\t\ttcpLingerTimer;\n};\ntypedef struct TLingerOpt TLingerOpt;\n\n/*** Variables ***/\n\nextern struct VirtualMachine *interpreterProxy;\n\nEPInfo*\t\t\t\tgDNSResolver;               //Our resolver\nSInt32\t\t\t\tgDNSResolverStatus \t\t\t= RESOLVER_UNINITIALIZED;\nSInt32\t\t\t\tgDNSResolverError\t\t\t= noErr;\nSInt32\t\t\t    gDNSResolverSemaIndex;      //This gets changed at startup time.\nInetHostInfo\t\tgDNSHostInfo;\nInetDomainName \t\tgDNSAddrStr;                //Length of domain names? Old code was 512, but specs say 256.\nInetHost\t\t\tgDNSAddr;\nSInt32              gDNSLookupType;\n\nOTConfigurationRef\tgCfgMastertcp\t\t\t\t= NULL;\nOTConfigurationRef\tgCfgMasterudp\t\t\t\t= NULL;\nOTConfigurationRef\tgCfgMasterListener\t\t\t= NULL;\n\nOTLIFO\t\t\t\tgFreeReadBuffersLIFO;    \t//  Buffers that are free to read into\nOTLIFO*\t\t\t\tgFreeReadBuffers\t\t\t= &gFreeReadBuffersLIFO;\nSInt32\t\t\t\tgFreeReadBuffersCounter\t\t= 0;\nSInt32\t\t\t\tgSocketsAllocated\t\t\t= 0;\nUInt32\t\t\t\tgmtuSize \t\t\t\t\t= 1024; //This gets changed at startup time.\nSInt32\t\t\t\tgthisNetSession \t\t\t= 0;    //This gets changed at startup time.\nSInt32\t\t\t\tgMaxConnections\t\t\t\t= 0;    //This gets changed at startup time.\nUInt32\t\t\t\tgOTVersion;                         //Gets set to OT version, to help us with special cases.\nSInt32\t\t\t\tgProgramState\t\t\t\t= 0;    //This gets changed at startup time.\ntypedef struct OpaqueOTClientContextPtr*     gClientContext;\n\nOTLIFO\t\t\t\tgIdleEPLIFO[3];\nOTLIFO*\t\t\t\tgIdleEPs[3];\nSInt32              gIdleEPCounter[3];\nOTLIFO\t\t\t\tgBrokenEPLIFO;\nOTLIFO*\t\t\t\tgBrokenEPs\t\t\t\t\t= &gBrokenEPLIFO;\nOTLIFO\t\t\t\tgAllEPLIFO;\nOTLIFO*\t\t\t\tgAllEPs\t\t\t\t\t    = &gAllEPLIFO;\n\nOTNotifyUPP DNSNotifierUPP,NotifierSocketUPP,NotifierSocketUDPUPP,NotifierSocketListenerUPP;\n\n\n/*** Private TCP Socket Functions ***/\n\n/*** Private Resolver Functions ***/\nstatic void \t\tResolverInitialize();\nstatic void\t\t    ResolverTerminate(void);\nstatic void \t\tResolverStart ();\n\n/*** Other Private Functions ***/\nvoid               CFMTerminate (void);\nstatic Boolean\t   DestroyAllOpenSockets(void);\nstatic Boolean\t   SocketValid(SocketPtr s);\nstatic Boolean     PortNumberValid(InetPort port) ;\nstatic SInt32      unmapStatus(EPInfo *);\nstatic void        Recycle();\nstatic void        makeEPIdle(EPInfo *epi);\nstatic void        purgeReadBuffers(EPInfo *epi);\nstatic void        makeEPBrokenThenIdle(EPInfo* epi,OTResult error);\nstatic void        makeEPBroken(EPInfo* epi,OTResult error);\nstatic EPInfo*     getOrMakeMeAnEP(UInt8 aSocketType,short counter);\nstatic Boolean     makeMeAnEP(UInt8 aSocketType);\nstatic void        attemptToCloseAndDeleteThisEP (EPInfo *epi);\nstatic void\t\t   makeEPUnconnected(EPInfo* epi);\nstatic void        SetEPLastError(EPInfo* epi,OTResult error);\nstatic void        TapAllInterestedSemaphores(EPInfo *epi);\nint \t\t\t\tsocketInit(void);\nint \t\t\t\tsocketShutdown(void);\n\n\nstatic pascal void  DNSNotifier(void* context, OTEventCode event, OTResult result, void* cookie);\nstatic pascal void  NotifierSocket(void* context, OTEventCode event, OTResult result, void* cookie);\nstatic pascal void  NotifierSocketUDP(void* context, OTEventCode event, OTResult result, void* cookie);\nstatic pascal void  NotifierSocketListener(void* context, OTEventCode event, OTResult result, void* cookie);\nstatic SInt32       internalSocketCreate(SocketPtr s, SInt32 netType, SInt32  socketType, SInt32 recvBufSize, SInt32 sendBufSize, SInt32 semaIndex, SInt32 readSemaIndex, SInt32 writeSemaIndex, UInt8 aExtraSocketHint);\nstatic Boolean\t\tEPOpen(EPInfo* epi);\nstatic Boolean \t\tEPClose(EPInfo*);\nstatic void         DoListenAccept(EPInfo* acceptor,EPInfo* theServer);\nstatic void         DoConnect(EPInfo* epi,InetHost addr, InetPort port);\nstatic void         DoBind(EPInfo* epi,InetHost addr, InetPort port,UInt8 aExtraSocketHint, OTQLen queueDepth );\nstatic UInt32       ReadData(EPInfo* epi, char* specialBuffer, UInt32 specialBufferSize);\nstatic OTResult     SendData(EPInfo* epi, char* buffer, UInt32 size);\nstatic OSStatus     doAbortConnection(EPInfo* epi);\nstatic void         NoCopyReceiveWalkingBufferChain(EPInfo *epi,OTBufferInfo *bufferInfo);\nstatic UInt32       readBytes(EPInfo* epi,char *buf,UInt32 adjustedBufSize);\nstatic UInt32       readBytesUDP(EPInfo* epi,InetAddress *fromAddress, int *moreFlag, char *buf,UInt32 adjustedBufSize);\nstatic SInt32\t    lookupOptionName(EPInfo *epi, Boolean trueIfGet, char *aString, UInt32 value, SInt32 *result);\nstatic OTResult     SetFourByteOption(EPInfo* epi, Boolean trueIfGet, OTXTILevel level,  OTXTIName  name, UInt32 value, SInt32    *result);\nstatic OTResult     SetOneByteOption(EPInfo* epi, Boolean trueIfGet, OTXTILevel level,  OTXTIName  name, UInt32 value, SInt32    *result);\nstatic OTResult     SetKeepAliveOption(EPInfo* epi, Boolean trueIfGet, OTXTILevel level,  OTXTIName  name, UInt32 value, SInt32    *result);\nstatic OTResult     SetLingerOption(EPInfo* epi, Boolean trueIfGet, OTXTILevel level,  OTXTIName  name, UInt32 value, SInt32    *result);\n\n// Some diagnostic routines\n\nvoid JMMLogMessage(Str255 input);\nvoid JMMLogMessageAndNumber(Str255 msg,long number);\nvoid JMMWriteLog();\n\n/*** Network Functions ***/\n\nint socketInit() {\n\t//\n\t//Don't actually do any network work until we are newworked initialized\n\t//This prevents kicking off internet dialup connections until needed\n\t//\n\treturn true;\n}\n\nint socketShutdown() {\n\tCFMTerminate();\n\treturn true;\n}\n\nint sqNetworkInit(int resolverSemaIndex) {\n\n\t//\n\t//  Initialize the network and return 0 if successful\n\t//  Loads Open transport, allocates memory for read buffers and various other tasks\n\t//\n\t\n\tSInt32              i;\n\tOSStatus            err = noErr;\n\tInetInterfaceInfo   interfaceInformation;\n\tUInt8               aSocketType;\n    ReadBuffer          *readBufferObject;\n    long\t\t\t\tcheck68KorPPC;\n\t    \n\tif (gthisNetSession != 0) return 0;  /* noop if network is already initialized */\n\t\n\n#if TARGET_API_MAC_CARBON\n\terr = InitOpenTransportInContext (kInitOTForExtensionMask, &gClientContext);\n#else\n\terr = InitOpenTransport(); \n#endif\n\tif (err) return -1;\n\n\t\t\n\terr = Gestalt(gestaltOpenTptVersions, (long*) &gOTVersion);\n\t\n\tif (err || (gOTVersion < kOTVersion112))\n\t{\n\t\t// Please install Open Transport 1.1.2 or later\n\t\t// This might change to 1.3 since tech notes talked about \n\t\t// previous versions having problems with acksend logic.\n\t\t//\n\t\treturn -111;\n\t}\n\t\n\terr = Gestalt(gestaltSysArchitecture, (long*) &check68KorPPC);\n\tgProgramState = kProgramRunning;\n\n    // \n    //Setup the head of the idle queues\n    //\n    \n\tfor (i=0;i<3;i++) {\n\t    gIdleEPs[i] = &gIdleEPLIFO[i];\n\t    gIdleEPs[i]->fHead\t   = NULL;\n\t    gIdleEPCounter[i]      = 0;\n\t}\n\tgBrokenEPs->fHead \t\t= NULL;\n\tgFreeReadBuffers->fHead = NULL;\n\tgAllEPs->fHead          = NULL;\n\t\n\t\n\tgMaxConnections\t\t\t= 24; // Build 8 of each of listeners, tcp, udp.\n\t\n    DNSNotifierUPP = NewOTNotifyUPP(DNSNotifier);\n    NotifierSocketUPP = NewOTNotifyUPP(NotifierSocket);\n    NotifierSocketUDPUPP = NewOTNotifyUPP(NotifierSocketUDP);\n    NotifierSocketListenerUPP = NewOTNotifyUPP(NotifierSocketListener);\n\n\t\n#if TARGET_API_MAC_CARBON\n\tgDNSResolver = (EPInfo*) OTAllocMemInContext(sizeof(EPInfo), gClientContext);\n#else\n\tgDNSResolver = (EPInfo*) OTAllocMem(sizeof(EPInfo));\n#endif\n\tif (gDNSResolver == NULL) return -1;\n\t\t\n\tgDNSResolverSemaIndex = resolverSemaIndex;\n\tResolverInitialize();\n\t\n\t/* Get MTU and default selected host address */\n\t\n\tOTInetGetInterfaceInfo (&interfaceInformation,kDefaultInetInterface);\n    gmtuSize = interfaceInformation.fIfMTU;\n    \n\t\n\t//\n\t//\tOpen endpoints \n\t//\n\tgCfgMastertcp = OTCreateConfiguration(kTCPName);\n\tif (gCfgMastertcp == NULL) return -3;\n\t\n\tgCfgMasterudp = OTCreateConfiguration(kUDPName);\n\tif (gCfgMasterudp == NULL) return -4;\n\t\n\tgCfgMasterListener = OTCreateConfiguration(\"tilisten, tcp\"); //Note use of special tilisten logic\n\tif (gCfgMasterListener == NULL) return -5;\n\t\n\t//\n\t//Build all our EPs, lots of work happens lower down asyncronously\n\t//\n\taSocketType = TCPSocketType;\n\tfor (i = 0; i < gMaxConnections; i++)\t{\n\t\tmakeMeAnEP(aSocketType);\n\t\taSocketType = ++aSocketType > 2 ? TCPSocketType : aSocketType;\n\t} \n\t\n#ifdef OTSERVER\n\tfor (i = 0; i < 256; i++)\t{\n\t\tmakeMeAnEP(TCPSocketType);\n\t} \n#endif\n\n\t//\n\t//Build storage objects for read buffers\n\t//How much memory to allocate still is a mystery\n\t//\n    for (i=0;i<kReadBuffersToAllocate ;i++) { \n#if TARGET_API_MAC_CARBON\n        readBufferObject = OTAllocMemInContext(sizeof(ReadBuffer), gClientContext);\n#else\n        readBufferObject = OTAllocMem(sizeof(ReadBuffer));\n#endif\n        if (readBufferObject == nil) {\n       \t    interpreterProxy->success(false);\n            return -25;\n        } \n        \n        OTMemzero(readBufferObject,sizeof(ReadBuffer));\n        if (gestalt68k == check68KorPPC) \n        \treadBufferObject->readBufferOriginalSize = (gmtuSize > 0) ? gmtuSize*2 : 1024;\n        else\n        \treadBufferObject->readBufferOriginalSize = (gmtuSize > 0) ? gmtuSize*4 : 1024;\n        \n#if TARGET_API_MAC_CARBON\n       readBufferObject->readBufferData = readBufferObject->readBufferPtr = OTAllocMemInContext(readBufferObject->readBufferOriginalSize, gClientContext);\n#else\n       readBufferObject->readBufferData = readBufferObject->readBufferPtr = OTAllocMem(readBufferObject->readBufferOriginalSize);\n#endif\n        if ( readBufferObject->readBufferData == nil) {\n       \t    interpreterProxy->success(false);\n            return -25;\n        }\n\n        OTLIFOEnqueue(gFreeReadBuffers, &readBufferObject->fNext);\n\t\tgFreeReadBuffersCounter++;\n    }\n\n\n\t/* Success! Create a session ID that is unlikely to be\n\t   repeated. Zero is never used for a valid session number.\n\t*/\n\tgthisNetSession = clock() + time(NULL);\n\tif (gthisNetSession == 0) gthisNetSession = 1;  /* don't use 0 */\n\t\n\treturn 0;\n}\n\n\nvoid CFMTerminate (void)    /* termination either via a CFM or Squeak call*/\n{ \n    sqNetworkShutdown();\n}\n\n\nvoid sqNetworkShutdown(void) {\n\t/* shut down the network */\n    \n\tif (gthisNetSession == 0) return;  /* noop if network is already shut down */\n\tgthisNetSession = 0;\n\tgProgramState = kProgramDone;\n\tDestroyAllOpenSockets();\n#if TARGET_API_MAC_CARBON\n\tCloseOpenTransportInContext(gClientContext); \n#else\n\tCloseOpenTransport(); \n#endif\n}\n\n\n/*** Resolver Functions ***/\n\n\nstatic void\tResolverInitialize() \n{\n\tOSStatus err;\n\t\n\t//\n\t//\tPrepare to open internet services\n\t//  to invoke DNR services\n\t//\n\t\n\tOTMemzero(gDNSResolver, sizeof(EPInfo));\t\n#if TARGET_API_MAC_CARBON\n    gDNSResolver->erf = OTOpenInternetServicesInContext(kDefaultInternetServicesPath, 0, &err, gClientContext);\n#else\n    gDNSResolver->erf = OTOpenInternetServices(kDefaultInternetServicesPath, 0, &err);\n#endif\n    gDNSResolver->semaIndex = gDNSResolverSemaIndex;\n\t\n\tif (err != kOTNoError) {\n\t\tgDNSResolverStatus = RESOLVER_ERROR;\n\t\tgDNSResolverError = err;\n\t\treturn;\n\t}\n\tgDNSResolverStatus = RESOLVER_SUCCESS;\n\tgDNSResolverError = kOTNoError;\n\n    err =  OTSetAsynchronous(gDNSResolver->erf);\n    err =  OTSetNonBlocking(gDNSResolver->erf);\n    err =  OTInstallNotifier(gDNSResolver->erf, DNSNotifierUPP, gDNSResolver);\n}\n\nstatic void ResolverStart () {\n\tOSStatus err;\n\t//\n\t// Invoke DNR service Async, this meants the DNSNotifier will handle the actual \n\t// lookup and work, flags like the gDNSResolverStatus are used to indicate back\n\t// to Squeak when the work is done\n\t//\n\tif (gDNSResolver->erf == NULL) //Sleep fix, other endpoints are more explicit about this issue. \n\t    ResolverInitialize();\n\t    \n\tgDNSResolverStatus  = RESOLVER_BUSY;\n\tswitch (gDNSLookupType) {\n\t\tcase RESOLVER_NAMETOADDR: {\n\t\t    err = OTInetStringToAddress((InetSvcRef)gDNSResolver->erf, gDNSAddrStr, &gDNSHostInfo);\n\t\t\tbreak;\n\t\t}\n\t\tcase RESOLVER_ADDRTONAME: {\n\t\t\terr = OTInetAddressToName((InetSvcRef)gDNSResolver->erf, gDNSAddr, gDNSAddrStr);\n\t\t\tbreak;\n\t\t}\n    }\n\tif (err != kOTNoError)  {\n\t\tgDNSResolverStatus = RESOLVER_ERROR;\n\t\tgDNSResolverError = err;\n\t}\n}\n\nvoid ResolverTerminate(void) {\n    //JMM if the resolver is opening what happens?\n \tgDNSResolverStatus = RESOLVER_UNINITIALIZED;\n   \n\tif (gDNSResolver->erf == NULL) return;\n\tEPClose(gDNSResolver);\n\tOTMemzero(gDNSResolver, sizeof(EPInfo));\n}\n\nvoid sqResolverAbort(void) {\n\t//\n\t// Abort this running resolver request\n\t//\n\n\tif (gDNSResolverStatus == RESOLVER_BUSY) {\n\t\tResolverTerminate();\n\t\tResolverInitialize();\n\t}\n}\n\nvoid sqResolverAddrLookupResult(char *nameForAddress, int nameSize) {\n\t//\n\t// copy the name found by the last address lookup into the given string \n\t//\n\t\n\tOTMemcpy(nameForAddress, gDNSAddrStr, (UInt32) nameSize);\n\t\n}\n\nint sqResolverAddrLookupResultSize(void) {\n\t//\n\t// return the length of the looked up name\n\t//\n\treturn (long) strlen(gDNSAddrStr);\n}\n\nint sqResolverError(void) {\n\t//\n\t// Return OT error number\n\t//\n\treturn gDNSResolverError; \n}\n\nint sqResolverLocalAddress(void) {\n    //\n    // Watch out for dynamic changing of this information, so don't cache\n    //\n\tInetInterfaceInfo interfaceInformation;\n\n\tOTInetGetInterfaceInfo (&interfaceInformation,kDefaultInetInterface);\n\tgDNSResolverStatus = RESOLVER_SUCCESS;\n\tgDNSResolverError  = noErr;\n\treturn (long) interfaceInformation.fAddress;\n}\n\nint sqResolverNameLookupResult(void) {\n\t//\n\t// Return address from last lookup\n\t//\n    \n\treturn (int) gDNSAddr;\n}\n\nvoid sqResolverStartAddrLookup(int address) {\n\t//\n\t// start process to lookup name from address\n\t//\n    \n\tif (gDNSResolverStatus == RESOLVER_BUSY) return;\n\n\tgDNSAddr            = (InetHost) address;\n    gDNSLookupType      = RESOLVER_ADDRTONAME;\n\tResolverStart();\n}\n\nvoid sqResolverStartNameLookup(char *hostName, int nameSize) {\n\t//\n\t// start process to lookup address from name\n\t//\n    \n\tUInt32 len; \n\n\tif (gDNSResolverStatus == RESOLVER_BUSY) return;\n\n\tlen = (UInt32) ((nameSize <= kMaxHostNameLen) ? nameSize : kMaxHostNameLen);  //Old limit was 500  but that appeared to be wrong\n\tOTMemcpy(gDNSAddrStr, hostName, len);\n\tgDNSAddrStr[len]    = '\\0';\n    gDNSLookupType      = RESOLVER_NAMETOADDR;\n\tResolverStart();\n\t\n}\n\nint sqResolverStatus(void) {\n\t//\n\t// return resolver status, this is different from resolver error code\n\t// status is the same among implementations, error is implementation dependent\n\t//\n    \n\treturn gDNSResolverStatus;\n}\n\n//================================\n\n// Socket logic \n//\n\nvoid\tsqSocketCreateNetTypeSocketTypeRecvBytesSendBytesSemaID(\n\t\t\tSocketPtr s, int netType, int socketType,\n\t\t\tint recvBufSize, int sendBufSize, int semaIndex) {\n\t\t\t\n\t//\n\t//Old call from old image using new VM\n\t//Just make new call\n\t//\n\tsqSocketCreateNetTypeSocketTypeRecvBytesSendBytesSemaIDReadSemaIDWriteSemaID(\n  \t\t s,  netType,  socketType, recvBufSize,  sendBufSize,  semaIndex,  semaIndex,  semaIndex);\n}\n\nvoid sqSocketCreateNetTypeSocketTypeRecvBytesSendBytesSemaIDReadSemaIDWriteSemaID(\n  SocketPtr s, int netType, int socketType,\n  int recvBufSize, int sendBufSize, int semaIndex, int readSemaIndex, int writeSemaIndex)\t{\n     OSErr error; \n     netType; recvBufSize; sendBufSize;\n    \n    \n    //\n    //Create a socket given the supplied information\n    //We don't bind the socket to a local port  until \n    //we do the connection. This of course could change? \n    //\n    \n    error = internalSocketCreate( s, netType, socketType, recvBufSize,  sendBufSize, semaIndex, readSemaIndex, writeSemaIndex, (UInt8) socketType);\n    if (error != noErr) {\n\t\tinterpreterProxy->success(false); \n        return;   \n    }\n\n}\n\nstatic SInt32 internalSocketCreate(\n  SocketPtr s, SInt32 netType, SInt32 socketType,\n  SInt32 recvBufSize, SInt32 sendBufSize, SInt32 semaIndex, SInt32 readSemaIndex, SInt32 writeSemaIndex, UInt8 aExtraSocketHint)\t{\n  //\n  // Internal logic to open a socket for a connection or to listen\n  // Note how we ignore buffer sizes!\n  //\n    EPInfo*     epi;\n    socketType; netType; recvBufSize; sendBufSize;\n    \n    //\n    //Make the socket invalid and then get an idle EP\n    //Technically we only run out of EP when we run out of memory\n    //\n    \n\ts->sessionID = 0;\n\tif (gProgramState != kProgramRunning ) {\t\t\n\t    interpreterProxy->success(false);\n        return -1;\n    }\n\n\tepi = getOrMakeMeAnEP(aExtraSocketHint,0);\n\tif (epi == NULL) {\n\t\tinterpreterProxy->success(false);\n\t\treturn -1;\n\t}\n\n\tepi->outstandingSends   = 0;\n\tepi->bytesPendingToRead = 0;\n\tepi->semaIndex          = semaIndex;\n\tepi->readSemaIndex      = readSemaIndex;\n\tepi->writeSemaIndex     = writeSemaIndex;\n\tepi->stateFlags         = 0;\n\tepi->stateFlags2        = 0;\n\tepi->stateFlags3        = 0;\n\tSetEPLastError(epi,noErr);\n\tepi->socketType        = aExtraSocketHint;\n\tOTInitInetAddress(&epi->remoteAddress, 0, 0);\n    OTInitInetAddress(&epi->localAddress, 0, 0);\n    \n    if (aExtraSocketHint == UDPSocketType)\n        OTAtomicSetBit(&epi->stateFlags, kConnected); //udp is always connected\n     else\n        OTAtomicSetBit(&epi->stateFlags, kUnConnected);\n \n \ts->sessionID            = gthisNetSession;\n\ts->socketType           = (aExtraSocketHint == UDPSocketType) ? UDPSocketType : TCPSocketType;\n\ts->privateSocketPtr     = epi;\n\tgSocketsAllocated++;\n\treturn 0;\n}\n\nvoid sqSocketListenOnPort(SocketPtr s, int port) {\n    //\n    //Listen on port for a connection, this is not the approved method\n    //sqSocketListenOnPortBacklogSize is the best way if you are a server\n    //However this works ok for UDP and kinda for onetime connections in TCP\n    //\n    EPInfo* epi;\n\n\tif (!SocketValid(s) || !PortNumberValid((InetPort) port)) return;\n\tepi = (EPInfo *) s->privateSocketPtr;\n\tif (s->socketType == TCPSocketType) {\n\t\tDoBind(epi,0,(InetPort) port,TCPListenerSocketType,1);\n\t\tif (epi->localAddress.fPort != port) {//We die if we don't get the port we want\n            sqSocketDestroy(s);\n    \t    interpreterProxy->success(false);\n\t\t}\n\t} else {//udp\n\t\tDoBind(epi,0,(InetPort) port,UDPListenerSocketType,1);\n\t}\n\n}\n\nvoid\tsqSocketListenOnPortBacklogSize(SocketPtr s, int port, int backlogSize) {\n    EPInfo* epi;\n\tSInt32 sema,readSema,writeSema;\n\tOSErr error;\n    //\n    //Listen on port for a connection, this is the best method if you are\n    //a server. Works in conjunction with accept. Shouldn't drop connections\n    //OT's special listener logic queues up the listen requestions\n    //\n\tif (!SocketValid(s) || !PortNumberValid((InetPort) port)) return;\n\tif (s->socketType == TCPSocketType) {\n\t\tepi = (EPInfo *) s->privateSocketPtr;\n\t\tsema = epi->semaIndex; readSema = epi->readSemaIndex; writeSema = epi->writeSemaIndex;\n\t    makeEPIdle(epi); //Special case really need a listener EP, so put this EP back on the queue\n\t    \t\t\t\t //This may seem odd but the epi is allocated before we know what type it is.\n\t    \t\t\t\t //Would need to change Squeak to indicate type at creation!\n\t\terror = internalSocketCreate( s, 0, TCPSocketType, 0,  0, sema, readSema, writeSema, TCPListenerSocketType);\n\t\tif (error != noErr) {\n            interpreterProxy->success(false); \n            return;   \n\t\t}\n        epi = (EPInfo *) s->privateSocketPtr;\n\t\tDoBind(epi,0,(InetPort) port,TCPListenerSocketType,(OTQLen) backlogSize);\n\t\tif (epi->localAddress.fPort != port) {//The port we wanted must match, otherwise we die\n\t\t    sqSocketDestroy(s);\n    \t    interpreterProxy->success(false);\n\t\t}\n\t} else {//udp not allowed\n       \t    interpreterProxy->success(false);\n\t}\n}\n\nvoid\tsqSocketAcceptFromRecvBytesSendBytesSemaID(\n\t\t\tSocketPtr s, SocketPtr serverSocket,\n\t\t\tint recvBufSize, int sendBufSize, int semaIndex){\n\t//\n\t//Old call from old image using new VM\n\t//Just make new call\n\t//\n\n\tsqSocketAcceptFromRecvBytesSendBytesSemaIDReadSemaIDWriteSemaID(\n\t\t\t s,  serverSocket,  recvBufSize,  sendBufSize,  semaIndex,  semaIndex,  semaIndex);\n\t\t\n}\nvoid\tsqSocketAcceptFromRecvBytesSendBytesSemaIDReadSemaIDWriteSemaID(\n\t\t\tSocketPtr s, SocketPtr serverSocket,\n\t\t\tint recvBufSize, int sendBufSize, int semaIndex, int readSemaIndex, int writeSemaIndex) {\n\t//\n\t//Accept incoming request from a listener\n\t//We take information from the listener, create a new socket\n\t//and accept the incoming call\n\t//\n\t\n    EPInfo* epiSocket;\n    EPInfo* epiServerSocket;\n    Boolean\tdoLeave;\n    OSErr   error;\n    long\tcount=0;\n    \n\tif (!SocketValid(serverSocket)) return;\n\tif (serverSocket->socketType == TCPSocketType) {\n            error = internalSocketCreate( s, 0, TCPSocketType, recvBufSize,  sendBufSize, semaIndex, readSemaIndex, writeSemaIndex, TCPSocketType);\n\t\t    if (error != noErr) {\n        \t\tinterpreterProxy->success(false); \n\t\t        return;   \n\t\t    }\n\t\t    epiSocket = (EPInfo *) s->privateSocketPtr;\n    \t\tDoBind(epiSocket,0,0,TCPSocketType,0); // interrupt driven to  T_TBINDCOMPLETE\n    \t\twhile (count++ < 100 && (OTAtomicTestBit(&epiSocket->stateFlags3, kWaitingForBind) == true)) {\n#ifndef TARGET_API_MAC_CARBON\n\t\t\t    SystemTask();\n#endif\n\t\t\t    OTIdle();\n            }\n\t\t    OTAtomicSetBit(&epiSocket->stateFlags2, kPassconNeeded);\n\t\t    epiServerSocket = (EPInfo *) serverSocket->privateSocketPtr;\n\t\t\tOTAtomicSetBit(&epiServerSocket->stateFlags, kWaitingForConnection);\n\t\t\tOTAtomicSetBit(&epiServerSocket->stateFlags, kUnConnected);\n            OTAtomicClearBit(&epiServerSocket->stateFlags, kConnected);\n    \t    OTAtomicSetBit(&epiServerSocket->stateFlags2, kTapSemaphore);\n        \t\n        \tdoLeave = OTEnterNotifier(epiServerSocket->erf);\n        \tDoListenAccept(epiSocket,epiServerSocket);\n        \tif (doLeave)\n        \t\tOTLeaveNotifier(epiServerSocket->erf);\n\t} else { //udp\n\t\tinterpreterProxy->success(false); \n\t}\n}\n\nvoid sqSocketConnectToPort(SocketPtr s, int addr, int port) {\n    //\n    //Connect this socket to the given host addr and port\n    //\n    EPInfo* epi;\n\tOTResult\tepState;\n\n\tif (!SocketValid(s) || !PortNumberValid((InetPort) port)) return;\n\tepi = (EPInfo *) s->privateSocketPtr;\n\tif (s->socketType == TCPSocketType) {\n    \tDoBind(epi,(InetHost) addr,(InetPort) port,TCPSocketType,0); // interrupt driven to  T_TBINDCOMPLETE which drives T_CONNECT/DoConnect\n\t} else {//udp\n\t\tepState = OTGetEndpointState(epi->erf);\n\t\tif (epState == T_UNBND) {//Bind to remote, our side gets wildcarded\n    \t    DoBind(epi,(InetHost) addr,(InetPort) port,UDPSocketType,0); // interrupt driven to  T_TBINDCOMPLETE which drives T_CONNECT/DoConnect\n    \t} else {//Already bound to a port/interface on our side\n    \t    OTInitInetAddress(&epi->remoteAddress, (InetPort) port, (InetHost) addr);\n    \t}\n\t}\n}\n\n\nint sqSocketSendDataBufCount(SocketPtr s, int buf, int bufSize) {\n\t//\n\t// Send data really fast\n\t// We create a copy of the data and give it to OT to play with\n\t// We can get flow controlled lower down, if no flow control then we\n\t// tap the semiphore since from squeaks viewpoint data is sent, otherwise when flow control is lifted the\n\t// semaphore is tapped in the notification routine\n\t//\n\tOTResult res ;\n    EPInfo* epi;\n    Boolean doLeave;\n    char * buffer;\n \tUInt32 adjustedBufSize = bufSize > 65536 ? 65536 : (UInt32) bufSize; //? Not sure if we really need to do this limiting.\n   \t\n\tif (!SocketValid(s)) return -1;\n\t\n\tepi = (EPInfo *) s->privateSocketPtr;\n\t\n\t// If send is blocked wait for unblocking\n\tif (OTAtomicTestBit(&epi->stateFlags, kSendIsBlocked)) {\n\t    return 0;\n\t}\n\n    if (epi->socketType == UDPSocketType) {\n        //UDP adjust the buffer size again\n        adjustedBufSize = (adjustedBufSize > epi->UDPMaximumSize) ?   epi->UDPMaximumSize : adjustedBufSize;\n     }\n\n#if TARGET_API_MAC_CARBON\n\tbuffer = OTAllocMemInContext(adjustedBufSize, gClientContext);\n#else\n\tbuffer = OTAllocMem(adjustedBufSize);\n#endif\n\tif (buffer == nil) {\n\t\t//Well maybe we back off and wait awhile? \n\t\t//If we run out of memory and stress the box, well death lurks.\n\t\tadjustedBufSize = 256;\n#if TARGET_API_MAC_CARBON\n\t\tbuffer = OTAllocMemInContext(adjustedBufSize, gClientContext);\n#else\n\t\tbuffer = OTAllocMem(adjustedBufSize);\n#endif\n\t\tif (buffer == nil) {\n\t\t    interpreterProxy->success(false); //Death did lurk\n\t        SetEPLastError(epi, -1);\n\t        return -1;\n\t    } \n\t}\n\t\t\n\tOTMemcpy(buffer,(void*) buf,adjustedBufSize);\n    \n\tdoLeave = OTEnterNotifier(epi->erf);  //Avoid race condition for T_GODATA\n    res = SendData(epi,buffer,adjustedBufSize);  \t\n  \tif (doLeave)\n\t\tOTLeaveNotifier(epi->erf);\n\t\t\n  \tif (res < 0 ){\n\t    SetEPLastError(epi, res);\n\t\tinterpreterProxy->success(false); //JMM just for testing\n\t    return 0;\n\t}\n\treturn res;\n}\n\n//\n//New primitive for sending UDP data to a particular host/port\n//Avoids race conditions between binding and send in Smalltalk\n//\n\nint sqSockettoHostportSendDataBufCount(SocketPtr s, int address, int port, int buf, int bufSize) {\n sqSocketConnectToPort(s, address, port);\n return sqSocketSendDataBufCount(s, buf, bufSize);\n}\n\n//\n//Abort the socket\n//\nvoid sqSocketAbortConnection(SocketPtr s) {\n    EPInfo* epi;\n   OSStatus err;\n \n\tif (!SocketValid(s)) return;\n    if (s->socketType == UDPSocketType) {\n\t\tinterpreterProxy->success(false); \n        return;\n    }\n\tepi = (EPInfo *) s->privateSocketPtr;\n\terr = doAbortConnection(epi);\n}\n\n//\n//Acutal abort logic\n//We need to flush the queues\n//Then do a disconnect\n//\nstatic OSStatus doAbortConnection(EPInfo* epi) {\n   SInt32\t\tcount = 0;\n   OSStatus     err = kOTNoError;\n \n\tif ( OTAtomicSetBit(&epi->stateFlags2, kFlushDisconnectInProgressBit) == 0 ) {\n\t\t//Do flush and wait for it to happen\n\t\t//Should make sync?\n\t\t//\n\t\tif (epi->outstandingSends != 0) {\n\t\t    err = OTIoctl(epi->erf, I_FLUSH, (void *)FLUSHRW);\n\t\t    while (count++ < 100 && (epi->outstandingSends != 0 || OTAtomicTestBit(&epi->stateFlags, kUnConnected) == false)) {\n\t\t\t    OTIdle();\n            }\n\t    }\n        makeEPBroken(epi,0);\n\t    err = OTSndDisconnect(epi->erf, NULL);\n\t}\n\t    \n\tif (err != kOTNoError) \n\t    return err;\n\telse\n        return epi->lastError;\n}\n\n//\n//Socket close logic\n//\nvoid sqSocketCloseConnection(SocketPtr s) {\n    EPInfo* epi;\n    OSStatus err; \n\tOTResult\tepState;\n\tOTResult\tlookResult;\n    \n\tif (!SocketValid(s)) return;\n\tepi = (EPInfo *) s->privateSocketPtr;\n    if (s->socketType == UDPSocketType) {//Handle udp and return\n        OTAtomicClearBit(&epi->stateFlags, kThisEndClosed);\n        OTAtomicClearBit(&epi->stateFlags, kConnected);\n        OTAtomicClearBit(&epi->stateFlags, kOtherEndClosed);\n        OTAtomicSetBit(&epi->stateFlags, kUnConnected);\n        OTAtomicSetBit(&epi->stateFlags2, kTapSemaphore);\n\t\terr = OTUnbind(epi->erf);\n\t\tif (err != kOTNoError) { //kOTLookErr with T_DATA, book says response is to zap EP.\n\t\t    makeEPBroken(epi,err);\n\t\t}\n\t    TapAllInterestedSemaphores(epi);\n\t    return;\n    }\n\n    OTAtomicSetBit(&epi->stateFlags, kThisEndClosed);\n    OTAtomicSetBit(&epi->stateFlags2, kTapSemaphore);\n\t// old code is sync and doesn't trigger semaphore \n\t\n\tepState = OTGetEndpointState(epi->erf);\n\tif (epState == T_UNINIT || epState == T_UNBND ) {\n        OTAtomicSetBit(&epi->stateFlags, kThisEndClosed);\n        OTAtomicClearBit(&epi->stateFlags, kConnected);\n        OTAtomicClearBit(&epi->stateFlags, kOtherEndClosed);\n \t    TapAllInterestedSemaphores(epi);\n\t    return;\n\t}\n\telse\n\t    err = OTSndOrderlyDisconnect(epi->erf);\n\t    \n\tif (err == kOTNoError) {\n        if (OTAtomicTestBit(&epi->stateFlags, kOtherEndClosed)) {\n\t        OTAtomicClearBit(&epi->stateFlags, kThisEndClosed);\n\t        OTAtomicClearBit(&epi->stateFlags, kConnected);\n\t        OTAtomicClearBit(&epi->stateFlags, kOtherEndClosed);\n\t        OTAtomicSetBit(&epi->stateFlags, kUnConnected);\n\t        if (epi->outstandingSends != 0)\n\t            doAbortConnection(epi);\n\n\t\t\terr = OTUnbind(epi->erf);\n\t\t\tif (err != kOTNoError) { //kOTLookErr with T_DATA, book says response is to zap EP.\n\t\t\t    makeEPBroken(epi,err);\n\t\t\t}\n    \t    TapAllInterestedSemaphores(epi);\n        }\n\t} else {// Could get kOTLookErr with T_DISCONNECT pending \n\t\tlookResult = OTLook(epi->erf); \n\t\tif (err == kOTLookErr && lookResult == T_DISCONNECT) {\n        \terr = OTRcvDisconnect(epi->erf, NULL);\n\t        OTAtomicClearBit(&epi->stateFlags, kThisEndClosed);\n\t        OTAtomicClearBit(&epi->stateFlags, kConnected);\n\t        OTAtomicClearBit(&epi->stateFlags, kOtherEndClosed);\n\t        OTAtomicSetBit(&epi->stateFlags, kUnConnected);\n\t        if (epi->outstandingSends != 0)\n\t            doAbortConnection(epi);\n\n\t\t\terr = OTUnbind(epi->erf);\n\t\t\tif (err != kOTNoError) { //kOTLookErr with T_DATA, book says response is to zap EP.\n\t\t\t    makeEPBroken(epi,err);\n\t\t\t}\n    \t    TapAllInterestedSemaphores(epi);\n        }\n        else {\n            SetEPLastError(epi,err);\n    \t\tmakeEPBroken(epi,err);\n            TapAllInterestedSemaphores(epi);\n       }\n\t}\n}\n\n//\n//Destroy the socket here we must ensure we cleanup and put the \n//socket back on the idle or broken EP queue\n//\nvoid sqSocketDestroy(SocketPtr s) {\n    OTResult err;\n    EPInfo* epi;\n\tOTResult\tepState;\n\n    JMMWriteLog(); //Diagnostics, turned off, must fiddle recompile to turn on.\n    \n  \n    if (!SocketValid(s)) {\n    \treturn; \n    }\n\tepi = (EPInfo *) s->privateSocketPtr;\n   OTAtomicSetBit(&epi->stateFlags2, kMakeEPIdle); \n\tepState = OTGetEndpointState(epi->erf);\n\tif (epState == T_UNINIT || epState == T_UNBND ) {\n\t    makeEPIdle(epi); //Unbound already so make him idle.\n\t} else {\n\t    if (s->socketType == UDPSocketType)\n\t\t\terr = OTUnbind(epi->erf);\n\t    else \n\t\t    err = doAbortConnection(epi);\n\t\n\t\tif (err != kOTNoError) {//kOTLookErr with T_DATA, book says response is to zap EP.\n\t\t    makeEPBrokenThenIdle(epi,err);\n\t\t}\n\t}\n\tpurgeReadBuffers(epi); //JMM Oct 4th 2000 (bug?)\n\ts->sessionID = 0;\n\ts->socketType = -1;\n\ts->privateSocketPtr = nil;\n\tgSocketsAllocated--;\n }\n\n//\n//Check to see if bytes are available\n//\nint sqSocketReceiveDataAvailable(SocketPtr s)\t\t\t\t\t\t\t\n{\n    EPInfo* epi;\n    static lastTickCount=0;\n\n\tif (!SocketValid(s)) return 0;\n    epi = (EPInfo *) s->privateSocketPtr;\n    if (epi->bytesPendingToRead > 0) \n        return 1;\n   \n    if (OTAtomicTestBit(&epi->stateFlags2, kReadFlowControl)) // New case if data pending but flow controlled then go get it\n        return 1;\n    \n    OTAtomicSetBit(&epi->stateFlags2, kTapSemaphoreReadData); //Note how we imply there will be interest in semaphore\n    return 0;\n}\n\n\n//\n//Read data into the buffer supplied\n//\nint sqSocketReceiveDataBufCount(SocketPtr s, int buf, int bufSize) {\n    EPInfo* epi;\n \tUInt32  bytesRead = 0;\n    Boolean doLeave;\n    \n\tif (!SocketValid(s)) return -1; \n\t\n\tepi = (EPInfo *) s->privateSocketPtr;\n        \n \tdoLeave = OTEnterNotifier(epi->erf);  //Avoid race condition for T_DATA\n    bytesRead = readBytes(epi,(char *) buf,(UInt32) bufSize);\n    if (OTAtomicTestBit(&epi->stateFlags2, kReadFlowControl)) {\n        if (bytesRead > 0) \n            ReadData(epi,NULL,0); \n        else\n            bytesRead = ReadData(epi,(char *) buf,(UInt32) bufSize); //special case attempt read into squeak buffer\n    }\n  \tif (doLeave)\n\t\tOTLeaveNotifier(epi->erf);\n   \n\treturn (int) bytesRead;\n}\n\n//\n//New primitive to read UDP data and get data, host/port, and more flag\n//\nint sqSocketReceiveUDPDataBufCountaddressportmoreFlag(SocketPtr s, int buf, int bufSize,  int *address,  int *port, int *moreFlag) {\n    EPInfo* epi;\n \tUInt32 bytesRead = 0;\n    Boolean doLeave;\n    InetAddress fromAddress;\n    \n    OTMemzero(&fromAddress,sizeof(InetAddress));\n    *address  = 0;\n    *port = 0;\n    *moreFlag = 0;\n    \n\tif (!SocketValid(s)) return -1;\n\t\n\tepi = (EPInfo *) s->privateSocketPtr;\n        \n \tdoLeave = OTEnterNotifier(epi->erf);  //Avoid race condition for T_DATA\n    bytesRead   = readBytesUDP(epi,&fromAddress, moreFlag, (char *) buf,(UInt32) bufSize);\n    *address    = fromAddress.fHost;\n    *port       = fromAddress.fPort;\n    if (OTAtomicTestBit(&epi->stateFlags2, kReadFlowControl)) {\n         if (bytesRead > 0) \n            ReadData(epi,NULL,0); \n        else {\n            bytesRead = ReadData(epi,(char *) buf,(UInt32) bufSize);//special case attempt read into squeak buffer\n            *address    = epi->remoteAddress.fHost; //Also we happen to know the address just when into this area\n            *port       = epi->remoteAddress.fPort; //JMM more flag?\n            *moreFlag   = epi->UDPMoreFlag;\n        }\n    }\n  \tif (doLeave)\n\t\tOTLeaveNotifier(epi->erf);\n   \n\treturn (int) bytesRead;\n}\n\nint sqSocketLocalAddress(SocketPtr s) {\n    EPInfo* epi;\n    \n\tif (!SocketValid(s)) return -1;\n\tepi = (EPInfo *) s->privateSocketPtr;\n    return (int) (epi->localAddress.fHost == 0) ? sqResolverLocalAddress() : epi->localAddress.fHost;\n}\n\nint sqSocketLocalPort(SocketPtr s) {\n    EPInfo* epi;\n    \n\tif (!SocketValid(s)) return -1;\n\tepi = (EPInfo *) s->privateSocketPtr;\n\t\n\treturn epi->localAddress.fPort;\n}\n\nint sqSocketRemoteAddress(SocketPtr s) {\n    EPInfo*     epi;\n    TBind       remoteBind;\n    InetAddress remoteAddr;\n    SInt32        counter=0;\n    OSStatus    err;\n\n\tif (!SocketValid(s)) return -1;\n\tepi = (EPInfo *) s->privateSocketPtr;\n\tif (OTAtomicTestBit(&epi->stateFlags, kUnConnected) && \n\t    !OTAtomicTestBit(&epi->stateFlags, kWaitingForConnection)) return 0;\n\t\n    if (epi->socketType == UDPSocketType) {\n        return (int) epi->remoteAddress.fHost;\n    }\n    \n    //It seems the only reliable way to get the address\n    //Is to make a call\n    //\n    OTMemzero(&remoteBind,sizeof(TBind));\n    OTMemzero(&remoteAddr,sizeof(InetAddress));\n    remoteBind.addr.buf = (UInt8 *) &remoteAddr;\n    remoteBind.addr.maxlen = sizeof(InetAddress);\n    err = OTGetProtAddress(epi->erf,0,&remoteBind);\n    while (counter++ < 10 && remoteAddr.fHost == 0) {\n        OTIdle();\n    }\n    \n    if (err != kOTNoError) \n        return 0;\n    else\n        return (int) remoteAddr.fHost;\n}\n\nint sqSocketRemotePort(SocketPtr s) {\n    EPInfo* epi;\n    TBind       remoteBind;\n    InetAddress remoteAddr;\n    SInt32        counter=0;\n    OSStatus    err;\n\n\tif (!SocketValid(s)) return -1;\n\tepi = (EPInfo *) s->privateSocketPtr;\n\tif (OTAtomicTestBit(&epi->stateFlags, kUnConnected) && \n\t    !OTAtomicTestBit(&epi->stateFlags, kWaitingForConnection)) return 0;\n\t\n    if (epi->socketType == UDPSocketType) {\n        return epi->remoteAddress.fPort;\n    }\n    \n    //It seems the only reliable way to get the port\n    //Is to make a call\n    //\n    OTMemzero(&remoteBind,sizeof(TBind));\n    OTMemzero(&remoteAddr,sizeof(InetAddress));\n    remoteBind.addr.buf = (UInt8 *) &remoteAddr;\n    remoteBind.addr.maxlen = sizeof(InetAddress);\n    err = OTGetProtAddress(epi->erf,0,&remoteBind);\n    while (counter++ < 10 && remoteAddr.fHost == 0) {\n        OTIdle();\n    }\n    \n    if (err != kOTNoError) \n        return 0;\n    else\n        return remoteAddr.fPort;\n}\n\n\nint sqSocketSendDone(SocketPtr s) {\n    EPInfo* epi;\n\n\tif (!SocketValid(s)) return 1;\n\tepi = (EPInfo *) s->privateSocketPtr;\n    if (OTAtomicTestBit(&epi->stateFlags, kSendIsBlocked)) {\n\t    OTAtomicSetBit(&epi->stateFlags2, kTapSemaphoreWriteData); //Note the implied intent to use the semaphore\n        return 0;\n    }\n    else {\n        return 1;\n    }\n}\n\nint sqSocketError(SocketPtr s) {\n    EPInfo* epi;\n    \n \tif (!SocketValid(s)) return -1;\n\tepi = (EPInfo *) s->privateSocketPtr;\n    if (OTAtomicTestBit(&epi->stateFlags, kUnConnected)  && \n        !OTAtomicTestBit(&epi->stateFlags, kWaitingForConnection) \n        && epi->lastError == 0)\n\t    return kENOTCONNErr; // old code would return unconnectederror if unconnected\n\telse\n\t    return (epi->lastError);\n}\n\nint sqSocketConnectionStatus(SocketPtr s) {\n\n\tif (!SocketValid(s)) return InvalidSocket;\n\treturn unmapStatus((EPInfo *) s->privateSocketPtr);\n}\n\nstatic SInt32 unmapStatus(EPInfo *s) {\n    if (OTAtomicTestBit(&s->stateFlags3, kSleepKilledMe)) \n        {return  InvalidSocket;\n        }\n    if (OTAtomicTestBit(&s->stateFlags, kThisEndClosed)) \n        {return  ThisEndClosed;\n        }\n    if (OTAtomicTestBit(&s->stateFlags, kOtherEndClosed)) \n        {return  OtherEndClosed;\n        }\n    if (OTAtomicTestBit(&s->stateFlags, kConnected)) \n        { return  Connected;\n        }\n    if (OTAtomicTestBit(&s->stateFlags, kWaitingForConnection)) \n        {return  WaitingForConnection;\n        }\n    if (OTAtomicTestBit(&s->stateFlags, kUnConnected)) \n        {return  Unconnected;\n        }\n   return 0;\n}\n\nstatic Boolean SocketValid(SocketPtr s) {\n\tif ((s != NULL) &&\n\t\t(s->privateSocketPtr != NULL) &&\n\t\t(s->sessionID == gthisNetSession) && \n\t\t(s->socketType == TCPSocketType || s->socketType == UDPSocketType) &&\n\t\t(!OTAtomicTestBit(&(((EPInfo *)s->privateSocketPtr)->stateFlags3), kSleepKilledMe)) )\n\t\t    return true;\n\tinterpreterProxy->success(false);\n\treturn false;\n}\n\n\nstatic Boolean PortNumberValid(InetPort port) {\n\tif (port <= 65535) {\n\t\treturn true;\n\t}\n\tinterpreterProxy->success(false);\n\treturn false;\n}\n\n//Used to signal all semaphores when we've closed the socket\n//I guess the read/write/disconnect threads really want to know\n//\nstatic void TapAllInterestedSemaphores(EPInfo *epi) {\n    if (OTAtomicClearBit(&epi->stateFlags2, kTapSemaphore)) \n\t    interpreterProxy->signalSemaphoreWithIndex(epi->semaIndex); \n    if (OTAtomicClearBit(&epi->stateFlags2, kTapSemaphoreReadData)) \n\t    interpreterProxy->signalSemaphoreWithIndex(epi->readSemaIndex); \n    if (OTAtomicClearBit(&epi->stateFlags2, kTapSemaphoreWriteData)) \n\t    interpreterProxy->signalSemaphoreWithIndex(epi->writeSemaIndex); \t\t\t\t\n}\n\nstatic Boolean DestroyAllOpenSockets(void) {\n\tEPInfo      *epi;\n\tOTLink*\t\tlink;\n    ReadBuffer *aBuffer;\n\n\t//\n\t//\tStart closing connector endpoints.\n\t//\tWhile we could be rude and just close the endpoints, \n\t//\twe try to be polite and wait for all outstanding connections\n\t//\tto finish before closing the endpoints.   The is a bit easier\n\t//\ton the server which won't end up keeping around control blocks\n\t//\tfor dead connections which it doesn't know are dead.  Alternately,\n\t//\twe could just send a disconnect, but this seems cleaner.\n\t//\n\n\t(void)OTLIFOStealList(gBrokenEPs);\n\t(void)OTLIFOStealList(gIdleEPs[0]);\n\t(void)OTLIFOStealList(gIdleEPs[1]);\n\t(void)OTLIFOStealList(gIdleEPs[2]);\n\t\n    link = OTLIFODequeue(gAllEPs);\n    while (link != NULL) {\n        epi = OTGetLinkObject(link, EPInfo, globalLink);\n     \tattemptToCloseAndDeleteThisEP(epi);\n        link = OTLIFODequeue(gAllEPs);\n    }\n\n\t//\n\t//\tIf the lists are empty now, then all endpoints have been successfully closed,\n\t//\tso the client is stopped now.  (Actually we hope that is the case)\n\t//\n\t\n    //\n    //Free up all the other resources\n    //\n    link = OTLIFODequeue(gFreeReadBuffers);\n    while (link != NULL) {\n    \taBuffer = OTGetLinkObject(link, ReadBuffer, fNext);\n        OTFreeMem(aBuffer->readBufferData);\n        OTFreeMem(aBuffer); \n        link = OTLIFODequeue(gFreeReadBuffers);\n    }\n    ResolverTerminate();\n\tOTFreeMem((char*)gDNSResolver);\n\tgIdleEPs[0]->fHead\t\t= NULL;\n\tgIdleEPs[1]->fHead\t\t= NULL;\n\tgIdleEPs[2]->fHead\t\t= NULL;\n\tgBrokenEPs->fHead \t\t= NULL;\n\tOTDestroyConfiguration(gCfgMastertcp);\n\tOTDestroyConfiguration(gCfgMasterudp);\n\tOTDestroyConfiguration(gCfgMasterListener);\n\tDisposeOTNotifyUPP(DNSNotifierUPP);\n\tDisposeOTNotifyUPP(NotifierSocketUPP);\n\tDisposeOTNotifyUPP(NotifierSocketUDPUPP);\n\tDisposeOTNotifyUPP(NotifierSocketListenerUPP);\n\treturn true;\n}\n\n\n//\n//\tDoBind\n//\n//\tThis routine either binds to a wild card address and specfic port if \n//  we are doing a listen, otherwise we bind to a wild card address and \n//  wild card port if we are starting a connection to a remote host.\n//  J M M NOTE A more complex version could use port and addr\n//  Note we don't bind to the local socket until here, we could when \n//  The socket is created, but that leads to odd issues.\n//\n\nstatic void DoBind(EPInfo* epi,InetHost addr, InetPort port,UInt8 aExtraSocketHint,OTQLen queueDepth )\n{\n\tOSStatus \terr;\n\tTBind \t\tbindReq, bindResult;\n\tInetAddress\tinAddr,bindAddr;\n\t\n\tswitch (aExtraSocketHint) {\n        case TCPSocketType: {\n            // for a connection\n        \t//\tBind the endpoint to a wildcard address \n        \t//\t(assign us a port, we don't care which one).\n        \t//  NOTE A more complex version could use port and addr\n            OTInitInetAddress(&epi->remoteAddress, port, addr);\n            OTInitInetAddress(&epi->localAddress, 0, kOTAnyInetAddress);\n        \tOTInitInetAddress(&inAddr, 0, 0);\n            break;\n        }\n        case UDPSocketType: { \n            // for a connection\n        \t//\tBind the endpoint to earlier supplied information\n            OTInitInetAddress(&epi->remoteAddress, port, addr);\n        \tOTInitInetAddress(&inAddr, 0, 0);\n            break;\n        }\n        case TCPListenerSocketType: {\n            // For a listen, bind wild card address, but supplied port.\n            // Note the passed in addr should be zero\n            // Note a more complex version could supply the address\n            OTInitInetAddress(&epi->remoteAddress, 0, kOTAnyInetAddress);\n            OTInitInetAddress(&epi->localAddress, port, addr);\n        \tOTInitInetAddress(&inAddr,port, addr);\n            break;\n        }\n        case UDPListenerSocketType: {\n            // For a listen, bind wild card address, but supplied port.\n            // Note the passed in addr should be zero\n            // Note a more complex version could supply the address\n            OTInitInetAddress(&epi->remoteAddress, 0, kOTAnyInetAddress);\n            OTInitInetAddress(&epi->localAddress, port, addr);\n        \tOTInitInetAddress(&inAddr,port, addr);\n            break;\n        }\n\t}\n\n \tbindReq.addr.len    \t= sizeof(InetAddress);\n\tbindReq.addr.buf    \t= (unsigned char*) &inAddr;\n\tbindReq.qlen        \t= queueDepth; //Note queue depth for listening\n \tbindResult.addr.maxlen\t= sizeof(InetAddress);\n \tbindResult.addr.len   \t= sizeof(InetAddress);\n\tbindResult.addr.buf    \t= (unsigned char*) &bindAddr;\n\tepi->stateFlags     \t= 0;\n\tepi->stateFlags2   \t\t= 0;\n\tepi->stateFlags3    \t= 0;\n\tepi->bytesPendingToRead = 0;\n\tSetEPLastError(epi,noErr);\n\tif (aExtraSocketHint == TCPSocketType|| aExtraSocketHint == TCPListenerSocketType) {\n        OTAtomicSetBit(&epi->stateFlags, kUnConnected);\n        OTAtomicSetBit(&epi->stateFlags, kWaitingForConnection);\n        OTAtomicSetBit(&epi->stateFlags2, kTapSemaphore);\n    }\n\t\n\tOTAtomicSetBit(&epi->stateFlags3, kWaitingForBind);\n\terr = OTBind(epi->erf, &bindReq, &bindResult); // resume at T_BINDCOMPLETE\n\t\n\t// for bindReq on listen what is queueDepth now? \n\t// bindReq.qlen could have changed\n\t// But... No why to feed this back to the client!\n\t\n\tif (err != kOTNoError) {\n    \tSetEPLastError(epi,err);\n        makeEPUnconnected(epi);\n    \treturn;\n\t}\n\t\n\tOTMemcpy(&epi->localAddress,bindResult.addr.buf,sizeof(InetAddress)); //Pickup local address\n\treturn;\n}\n\n//\n//\tDoConnect\n//\n//\tThis routine attempts establish a new connection to the given\n//\taddress and port.  \n//  Called via the notifier at interrupt time.\n//\n\nstatic void DoConnect(EPInfo* epi,InetHost addr, InetPort port)\n{\n\tOSStatus err;\n\tTCall sndCall;\n\tInetAddress inAddr;\n\t\n\t//\tDon't want new connections if already shutting down.\n\tif (gProgramState != kProgramRunning ) return;\n\t\t\n\tOTInitInetAddress(&inAddr, port, addr);\n\tOTMemzero(&sndCall, sizeof(TCall));\n\tsndCall.addr.len \t= sizeof(InetAddress);\t\t\t\t\n\tsndCall.addr.buf\t= (unsigned char*) &inAddr;\n\t\n\terr = OTConnect(epi->erf, &sndCall, NULL); //resume at T_CONNECT\n\tif (err != kOTNoDataErr) {\n    \tSetEPLastError(epi,err);\n        makeEPUnconnected(epi);\n\t\treturn;\n\t}\n}\n\n\n//\n//\tDoListenAccept\n//\n//\tThe handling of a T_LISTEN is greatly simplified by use\n//\tof the tilisten module, which serializes inbound connections.\n//\tThis means that when doing an OTAccept we won't get a kOTLookErr\n//\tbecause another inbound connection arrived and created a T_LISTEN.\n//\tWithout the tilisten module, we have to use the \"8 step \n//\tlisten/accept/disconnect method\", which is documented elsewhere.\n//\n\nstatic void DoListenAccept(EPInfo* acceptor,EPInfo* theServer)\n{\n\tTCall\t\tcall;\n\tInetAddress\tcaddr;\n\tOTResult\tlookResult;\n\tOSStatus\terr;\n\t\t\t\n\tOTMemzero(&call, sizeof(TCall));\n\tcall.addr.maxlen = sizeof(InetAddress);\n\tcall.addr.buf = (unsigned char*) &caddr;\n\t\t\n\terr = OTListen(theServer->erf, &call);\n\tif (err != kOTNoError) {\n\t\t//\n\t\t//\tOnly two errors are expected at this point.\n\t\t//\tOne would be a kOTNoDataErr, indicating the inbound connection\n\t\t//\twas unavailable, temporarily hidden by a higher priority streams\n\t\t//\tmessage, etc.   The more likely error is a kOTLookErr, \n\t\t//\twhich indicates a T_DISCONNECT on the OTLook()\n\t\t//\thappens when the call we were going to process disconnected.\n\t\t//\tIn that case, go away and wait for the next T_LISTEN event.\n\t\t//\n\t\tif (err == kOTNoDataErr) return;\n\t\t\t\n\t\tlookResult = OTLook(theServer->erf); \n\t\tif (err == kOTLookErr && lookResult == T_DISCONNECT)\n        \terr = OTRcvDisconnect(theServer->erf, NULL);\n\t\telse \n\t\t    SetEPLastError(theServer,lookResult);\n\t\t\n\t\t//JMM Sept28th,2000 ? ok accept it, if we don't does this cause blockage?\n\t\tacceptor->remoteAddress = caddr;\n\t\terr = OTAccept(theServer->erf, acceptor->erf, &call);\n\t\treturn;\t\n\t}\n\t\n\tacceptor->remoteAddress = caddr;\n\t\n\terr = OTAccept(theServer->erf, acceptor->erf, &call);\n\t//\n\t//\tNote an kOTIndOutErr can occur if we are listening on the EP and handling \n\t//  off to the same EP. Sorry use the listento:backlogqueue: logic instead\n    //\n\tif (err != kOTNoError) {\n\t\t//\n\t\t//\tAgain, we have to be able to handle the connection being disconnected\n\t\t//\twhile we were trying to accept it.\n\t\t//\n\t\tlookResult = OTLook(theServer->erf);\n\t\tif (err == kOTLookErr && lookResult == T_DISCONNECT) \n        \terr = OTRcvDisconnect(theServer->erf, NULL);\n\t\telse \n\t\t    SetEPLastError(theServer,lookResult);\n\t}\n}\n\n//\n//\tEPOpen:\n//\n//\tA front end to OTAsyncOpenEndpoint.\n//\tA status bit is set so we know there is an open in progress.\n//\tIt is cleared when the notifier gets a T_OPENCOMPLETE where the context\n//\tpointer is this EPInfo.  Until that happens, this EPInfo can't be cleaned\n//\tup and released.\n//\nstatic Boolean EPOpen(EPInfo* epi)\n{\n\tOSStatus err;\n\t\n\tOTAtomicSetBit(&epi->stateFlags, kOpenInProgressBit);\n\tSetEPLastError(epi,kOTNoError);\n    epi->UDPMaximumSize = 0; //Remember to figure out the max UDP size.\n    \n\tswitch (epi->socketType) {\n\t    case TCPSocketType: {\n#if TARGET_API_MAC_CARBON\n\t\t    err = OTAsyncOpenEndpointInContext(OTCloneConfiguration(gCfgMastertcp), 0, NULL, NotifierSocketUPP, epi, gClientContext); \n#else\n\t\t    err = OTAsyncOpenEndpoint(OTCloneConfiguration(gCfgMastertcp), 0, NULL, NotifierSocketUPP, epi); \n#endif\n\t        break;\n\t    }\n\t    case UDPSocketType: {\n\t        TEndpointInfo endPointInformation;\n#if TARGET_API_MAC_CARBON\n\t\t    err = OTAsyncOpenEndpointInContext(OTCloneConfiguration(gCfgMasterudp), 0, &endPointInformation, NotifierSocketUDPUPP, epi, gClientContext); \n#else\n\t\t    err = OTAsyncOpenEndpoint(OTCloneConfiguration(gCfgMasterudp), 0, &endPointInformation, NotifierSocketUDPUPP, epi); \n#endif\n\t\t    epi->UDPMaximumSize = (endPointInformation.tsdu == T_INFINITE) ? 64*1024 : endPointInformation.tsdu;\n\t        break;\n\t    }\n\t    case TCPListenerSocketType: {\n#if TARGET_API_MAC_CARBON\n\t\t    err = OTAsyncOpenEndpointInContext(OTCloneConfiguration(gCfgMasterListener), 0, NULL, NotifierSocketListenerUPP, epi, gClientContext); \n#else\n\t\t    err = OTAsyncOpenEndpoint(OTCloneConfiguration(gCfgMasterListener), 0, NULL, NotifierSocketListenerUPP, epi); \n#endif\n\t        break;\n\t    }\n\t}\n\tif (err != kOTNoError) {\n\t\tSetEPLastError(epi,err);\n\t\tOTAtomicClearBit(&epi->stateFlags, kOpenInProgressBit);\n\t\treturn false;\n\t}\n\treturn (epi->lastError == kOTNoError);\n}\n\n\n//\n//\tEPClose\n//\n//\tThis routine is a front end to OTCloseProvider.   \n//\tCentralizing closing of endpoints makes debugging and instrumentation easier.  \n//\nstatic Boolean EPClose(EPInfo* epi)\n{\n\tOSStatus err;\n\t\n\t//\n\t//\tIf an endpoint is still being opened, we can't close it yet.\n\t//\tThere is no way to cancel an OTAsyncOpenEndpoint, so we just\n\t//\thave to wait for the T_OPENCOMPLETE event at the notifier.\n\t//\n\tif ( OTAtomicTestBit(&epi->stateFlags, kOpenInProgressBit) )\n\t\treturn false;\n\t\t\n    \n\t//\n\t//\tIf the OTAsyncOpenEndpoint failed, the endpoint ref will be NULL,\n\t//\tand we don't need to close it now. Also can be NULL or should be NULL if sleeping happened.\n\t//\n\tif (epi->erf == NULL || OTAtomicClearBit(&epi->stateFlags3, kSleepKilledMe)) {\n\t    epi->erf = NULL;\n\t\treturn true;\n\t}\n\t\t\n\tif (epi->outstandingSends == 0) {\n    \terr = OTCloseProvider(epi->erf);\n    \tepi->erf = NULL;\n    \treturn true;\n    }\n    \t\n    //\n\t//\tIf we get to this point, the endpoint did an OTSnd() with AckSends,\n\t//\tand the T_MEMORYRELEASED event hasn't been returned yet.  In order\n\t//\tto make sure we get the event, we flush the stream and then do an\n\t//\tOTDisconnect().   This should get the memory freed so we can close\n\t//\tthe endpoint safely.   Note, we set a flag so we don't do this \n\t//\tmore than once on an endpoint.\n\t//  J M M I'm not sure we'll ever get here since a flush should have been done higher up\n\t//\n\tif ( OTAtomicSetBit(&epi->stateFlags2, kFlushDisconnectInProgressBit) == 0 )\n\t{\n\t\terr = OTIoctl(epi->erf, I_FLUSH, (void *)FLUSHRW);\n\t\tif (err != kOTNoError)\n\t\t\t{} \n\t}\n\treturn false;\n\n}\n\n//\n//\tRecycle:\n//\n//\tThis routine shouldn't be necessary, but it is helpful to work around both\n//\tproblems in OpenTransport and bugs in this program.   Basicly, whenever an\n//\tunexpected error occurs which shouldn't be fatal to the program, the EPInfo\n//\tis queued on the BrokenEP queue.  When recycle is called,\n//  it will attempt to close the associated endpoint and open\n//\ta new one to replace it using the same EPInfo structure.   This process of\n//\tclosing an errant endpoint and opening a replacement is probably the most\n//\treliable way to make sure that this program and OpenTransport can recover\n//\tfrom unexpected happenings in a clean manner.\n//\n//  Mind you it can be invoked to cleanup UDP sockets that aren't closed \n//  properly due to pending traffice on a busy port.\n//  Solution mentioned in books is to close the EP.\n//\nstatic void Recycle()\n{\n\tOTLink* \tlist = OTLIFOStealList(gBrokenEPs);\n\tOTLink*\t\tlink;\n\tEPInfo*\t\tepi;\n\n\twhile ( (link = list) != NULL ) {\n\t\tlist = link->fNext;\n\t\tepi = OTGetLinkObject(link, EPInfo, link);\n\t\tif (!EPClose(epi)) {\n\t\t\tOTLIFOEnqueue(gBrokenEPs, &epi->link);\n\t\t\tcontinue;\n\t\t}\n\t\tif (gProgramState == kProgramRunning)\n\t\t    EPOpen(epi);\n\t\t else\n\t\t    makeEPIdle(epi);\n\t}\n}\n\n//\n// Make the EP idle, it either goes on an idle queue or gets broken.\n//\nstatic void    makeEPIdle(EPInfo *epi) {\n    purgeReadBuffers(epi);\n    \n    if (OTAtomicClearBit(&epi->stateFlags2, kEPIsBroken)) {\n        OTLIFOEnqueue(gBrokenEPs, &epi->link); \n    } else {\n\t    OTLIFOEnqueue(gIdleEPs[epi->socketType], &epi->link); \n   \t    OTAtomicAdd32(1, &gIdleEPCounter[epi->socketType]); \n   }\n}\n\nstatic void attemptToCloseAndDeleteThisEP (EPInfo *epi) {\n    purgeReadBuffers(epi); \n\tif (!EPClose(epi)) {\n\t\t//\tCan't close this endpoint yet, so skip it.\n\t} else \n\t    OTFreeMem((char*)epi);\n}\nstatic EPInfo* getOrMakeMeAnEP(UInt8 aSocketType,short counter) {\n\tEPInfo      *epi;\n    OTLink\t\t*link;\n    SInt32      i;\n    \n    Recycle();  //Ensure broken EP get fixed up\n    \n    if (counter > 25) \n        return nil;  // End recursion John 2000/8/29\n\n    if (gIdleEPCounter[aSocketType] < 5)   //Magic Number ensure we have at least 5 EP available.\n        makeMeAnEP(aSocketType);\n        \n    link = OTLIFODequeue(gIdleEPs[aSocketType]);\n\tif (link == NULL) {\n\t\tfor(i=0;i<10;i++) {OTIdle();};\n\t\treturn getOrMakeMeAnEP(aSocketType,counter+1); //Watch for recursive failure\n\t}\n\t\n   \tOTAtomicAdd32(-1, &gIdleEPCounter[aSocketType]);\n\tepi = OTGetLinkObject(link, EPInfo, link);\n\t\n\tif (OTAtomicTestBit(&epi->stateFlags3, kSleepKilledMe)) {\n\t//\n\t//A broken epi on the idle stack, now the only way we can \n\t//get here (I think) is to have gone to sleep which breaks\n\t//all the end points. To clean up we must now fix them\n\t//So make it idle, of course it's broken\n\t//Then recursive call to get another one\n\t//This continues until we get a good one\n\t//\n  \t    makeEPIdle(epi);\n\t    return getOrMakeMeAnEP(aSocketType,counter);  //Not a recursion issue. \n\t}\n    return epi;\n}\n\n//\n//This is where EP are actually made and opened\n//EP opening is async\n//\n\nstatic Boolean makeMeAnEP (UInt8 aSocketType) {\n\tEPInfo      *epi;\n\t\n#if TARGET_API_MAC_CARBON\n\tepi = (EPInfo*) OTAllocMemInContext(sizeof(EPInfo), gClientContext);\n#else\n\tepi = (EPInfo*) OTAllocMem(sizeof(EPInfo));\n#endif\n\tif (epi == NULL) return false;   //Death lurks\n\tOTMemzero(epi, sizeof(EPInfo));  //zero it out which makes all the pointers null\n    epi->socketType = aSocketType;\n    OTLIFOEnqueue(gAllEPs, &epi->globalLink);\n\treturn EPOpen(epi);\n}\n\nstatic void makeEPUnconnected(EPInfo *epi) {\n\tOTAtomicClearBit(&epi->stateFlags, kWaitingForConnection);\n\tOTAtomicSetBit(&epi->stateFlags, kUnConnected);\n    if (OTAtomicClearBit(&epi->stateFlags2, kTapSemaphore)) //tap to clear waitforconnection on error\n        interpreterProxy->signalSemaphoreWithIndex(epi->semaIndex);\n}\n\nstatic void makeEPConnected(EPInfo *epi) {\n\tOTAtomicClearBit(&epi->stateFlags, kWaitingForConnection);\n\tOTAtomicClearBit(&epi->stateFlags, kUnConnected);\n    OTAtomicSetBit(&epi->stateFlags, kConnected);\n    if (OTAtomicClearBit(&epi->stateFlags2, kTapSemaphore)) //tap to clear waitforconnection\n        interpreterProxy->signalSemaphoreWithIndex(epi->semaIndex);\n}\n\nstatic void makeEPBrokenThenIdle(EPInfo* epi,OTResult error) {\n    makeEPBroken(epi,error);\n    makeEPIdle(epi);\n}\n\nstatic void makeEPBroken(EPInfo* epi,OTResult error) {\n    SetEPLastError(epi,error);\n    OTAtomicSetBit(&epi->stateFlags2, kEPIsBroken);\n}\n\nstatic void SetEPLastError(EPInfo* epi,OTResult error) {\n    if (error < 0) {\n\t\tJMMLogMessageAndNumber(\"\\p NonZero Error For \",epi->semaIndex);\n\t\tJMMLogMessageAndNumber(\"\\p NonZero Error Is  \",error);\n    }\n    epi->lastError = error;\n}\n\n//\tReadData:\n//\n//\tThis routine attempts to read all available data from an endpoint.\n//\tit is not necessary for the program to handle\n//\tgetting back a T_DATA notification DURING an OTRcv() call, as would be\n//\tthe case if we read from outside the notifier.   We must read until we\n//\tget a kOTNoDataErr in order to clear the T_DATA event so we will get\n//\tanother notification of T_DATA in the future.\n//  Note we use EnterNotifier to make this possible\n//\n//\tNote for the curious we attempted to use no-copy receives to get data.  This obligates\n//\tthe program to return the buffers to OT asap.  BUT we found we overran memory!\n//  So we reverted to more expensive copies into buffers we have preallocated\n//\n//  Perhaps a seperate routine for UDP would make sense?\n//  Note May 30/00 we added a special read when we exhaust the internal buffer pool\n//  But data is still pending we allow you to read into the squeak buffer directly\n//\n\nstatic UInt32 ReadData(EPInfo* epi,char *specialReadBuffer,UInt32 specialReadSize) {\n\tOTResult  \tres;\n\tOTFlags\t  \tflags;\n\tOTResult\tepState,err;\n\tOTLink\t\t*link;\n    ReadBuffer \t*readBufferObject,simulatedReadBuffer;\n    InetAddress UDPdataFromAddress;\n\t\n    if (OTAtomicClearBit(&epi->stateFlags2, kTapSemaphoreReadData)) //tap to clear waitfordata Data Data Data\n        interpreterProxy->signalSemaphoreWithIndex(epi->readSemaIndex);\n        \n    if (specialReadSize > 0) { //Special case drop into squeak buffer, make a simulated buffer object\n        OTMemzero(&simulatedReadBuffer,sizeof(ReadBuffer));\n        simulatedReadBuffer.readBufferData = specialReadBuffer;\n        simulatedReadBuffer.readBufferSize = simulatedReadBuffer.readBufferOriginalSize = specialReadSize;\n        readBufferObject = &simulatedReadBuffer;\n    } else {\n       link = OTLIFODequeue(gFreeReadBuffers);\n            \n    \tif (link == NULL) {\n           \tOTAtomicSetBit(&epi->stateFlags2, kReadFlowControl);  //NO free buffers we are flow controled\n        \treturn; \n    \t}\n\t\tgFreeReadBuffersCounter--;\n    \treadBufferObject = OTGetLinkObject(link, ReadBuffer, fNext);\n        OTAtomicClearBit(&epi->stateFlags2, kReadFlowControl);  \n    }\n    \n    OTMemzero(&UDPdataFromAddress,sizeof(InetAddress));\n    \n\twhile (true) {\n        \n\t\treadBufferObject->readBufferPtr = readBufferObject->readBufferData;\n\t\t\n   \t    if (epi->socketType == UDPSocketType) {\n   \t        TUnitData \tUDPDataInBound;\n   \t        OTFlags     flagMeaningMore;\n            OSStatus    error;\n            \n    \t    UDPDataInBound.addr.maxlen = sizeof(InetAddress);\n    \t    UDPDataInBound.addr.len    = sizeof(InetAddress);\n    \t    UDPDataInBound.addr.buf    = (UInt8*) &readBufferObject->UDPAddress;\n    \t    UDPDataInBound.opt.maxlen  = 0;\n    \t    UDPDataInBound.opt.len     = 0;\n    \t    UDPDataInBound.opt.buf     = NULL;\n    \t    UDPDataInBound.udata.maxlen = readBufferObject->readBufferOriginalSize;\n    \t    UDPDataInBound.udata.len    = readBufferObject->readBufferOriginalSize;\n    \t    UDPDataInBound.udata.buf    = (UInt8*)readBufferObject->readBufferData;\n\t    \n\t        error =  OTRcvUData(epi->erf, &UDPDataInBound, &flagMeaningMore);\n\t        \n\t        if (error != kOTNoError) {\n\t            res = error;\n\t        } else {\n\t            if (UDPDataInBound.addr.len == 0) //Remember UDP address\n\t                readBufferObject->UDPAddress = UDPdataFromAddress;\n\t            else\n\t                UDPdataFromAddress = readBufferObject->UDPAddress;\n\t                \n\t            epi->UDPMoreFlag = readBufferObject->UDPMoreFlag = (flagMeaningMore > 0) ? true: false;\n\t            res = (SInt32) UDPDataInBound.udata.len; \n\t            OTMemcpy(&epi->remoteAddress,&readBufferObject->UDPAddress,sizeof(InetAddress));  \n\t        }\n   \t    } else {//A less complicated tcp read\n   \t        res = OTRcv(epi->erf, readBufferObject->readBufferData, readBufferObject->readBufferOriginalSize, &flags);\n   \t    }\n   \t    \n\t\t//\n\t\t//\tNote, check for 0 because can get a real 0 length receive\n\t\t//\tin some protocols (not in TCP), which is different from\n\t\t//\tgetting back a kOTNoDataErr.\n\t\t//\n\t\tif (res >= 0) {\n            if (specialReadSize > 0) \n                return (UInt32) res; //Note special case\n                \n            readBufferObject->readBufferSize = (UInt32) res;\n            \n            OTAddLast(&epi->readBuffers,&readBufferObject->fNext); //Put the buffer on the read queue\n        \tOTAtomicAdd32(res, &epi->bytesPendingToRead);\n            link = OTLIFODequeue(gFreeReadBuffers);\n                    \n        \tif (link == NULL) {\n               \tOTAtomicSetBit(&epi->stateFlags2, kReadFlowControl); //Our read flow control, OT will block lower down\n            \treturn; \n        \t}\n\t\t\tgFreeReadBuffersCounter--;\n        \treadBufferObject = OTGetLinkObject(link, ReadBuffer, fNext);\n   \t\t\tcontinue; //Loop around and get more bytes if available\n\t\t}\n\t\telse {\n            if (specialReadSize == 0) {\n                OTLIFOEnqueue(gFreeReadBuffers, &readBufferObject->fNext); //Read above didn't work so put it back on free queue\n\t\t\t\tgFreeReadBuffersCounter++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (res == kOTNoDataErr) {\n\t\t\t//\n\t\t\t//\tSince ReadData is only called from inside the notifier\n\t\t\t//\twe don't have to worry about having missed a T_DATA \n\t\t\t//\tduring the OTRcv.\n\t\t\t//  Note use of EnterNotifier logic\n\t\t\t//\n\t\t\tif (specialReadSize > 0)\n\t\t\t    OTAtomicClearBit(&epi->stateFlags2, kReadFlowControl);\n \t\t\treturn 0;\n\t\t}\n\t\tif (res == kOTLookErr) {\n\t\t\tres = OTLook(epi->erf);\n\t\t\tif (res == T_ORDREL || res == T_DISCONNECT) {\n\t\t\t\t//\tIf we got the T_ORDREL, we won't get any more inbound data.\n\t\t\t\t//\tWe return and wait for the notifier to get the T_ORDREL notification.\n\t\t\t\t//\tUpon getting it, we will notice we still need to send data and do so.\n\t\t\t\t//\tThe T_ORDREL has to be cleared before we can send. \n\t\t\t\t//\n\t\t\t\tif (specialReadSize > 0 && res == T_DISCONNECT) {\n\t\t\t\t\t//Special case? need to get disconnect \n\t\t\t\t\terr = OTRcvDisconnect(epi->erf, NULL);\n\t\t\t\t\tmakeEPUnconnected(epi);\n\t\t\t\t}\n\t\t\t\treturn 0 ;\n\t\t\t}\n\t\t\tif (res == T_GODATA) {\n\t\t\t    if (specialReadSize == 0) {\n    \t\t\t    link = OTLIFODequeue(gFreeReadBuffers);    \n                \tif (link == NULL) {\n                       \tOTAtomicSetBit(&epi->stateFlags2, kReadFlowControl);\n                    \treturn 0 ; \n                \t}\n\t\t\t\t\tgFreeReadBuffersCounter--;\n                \treadBufferObject = OTGetLinkObject(link, ReadBuffer, fNext);\n            \t} else {\n            \t    return 0;\n            \t}\n\t\t\t    continue; //OT Flow control lifted keep reading. JMM\n\t\t\t}\n\t\t} else {\n\t\t\tepState = OTGetEndpointState(epi->erf);\n\t\t\tif (res == kOTOutStateErr && epState == T_INREL) {\n\t\t\t\t//\n\t\t\t\t//\tOccasionally this problem will happen due to what appears\n\t\t\t\t//\tto be an OpenTransport notifier reentrancy problem.   \n\t\t\t\t//\tWhat has occured is that a T_ORDREL event happened and \n\t\t\t\t//\twas processed during ReadData().   This is proven by being\n\t\t\t\t//\tin the T_INREL state without having done a call to\n\t\t\t\t//\tOTRcvOrderlyDisconnect() here.   It appears to be a benign \n\t\t\t\t//\tsituation, so the way to handle it is to understand that no\n\t\t\t\t//\tmore data is going to arrive and go ahead and being our response\n\t\t\t\t//\tto the client.\n\t\t\t\t//\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (res == kOTOutStateErr && (epState == T_UNBND || epState == T_IDLE ) && specialReadSize > 0) {\n\t\t\t\t  interpreterProxy->success(false); //JMM Oct 4th 2000 special case fail if read on unbound\n\t\t\t\t  return 0;\n\t\t\t}\n\t\tbreak; //Ok error so break out of loop\n\t\t}\n\t}\n    return 0;\t\n}\n\n//\n// NOT USED HISTORICAL REASONS\n// \n/*\n\nstatic void NoCopyReceiveWalkingBufferChain(EPInfo *epi,OTBufferInfo *bufferInfo)\n{\n   OSStatus     err;\n   OTBuffer     *thisBuffer;\n   UInt32       count;\n   ReadBuffer   *readBufferObject;\n   \n    \n    thisBuffer = bufferInfo->fBuffer;\n    err = noErr;\n    while (err == noErr && thisBuffer != nil) {\n        count = thisBuffer->fLen;\n    \tOTAtomicAdd32(count, &epi->bytesPendingToRead);\n\t\treadBufferObject = OTAllocMemInContext(sizeof(ReadBuffer), gClientContext);\n        if (readBufferObject == nil) {\n\t\t\tSysBeep(5);\n            err = -1;\n            break;\n        } \n        OTMemzero(readBufferObject,sizeof(ReadBuffer));\n        readBufferObject->readBufferData = readBufferObject->readBufferPtr = OTAllocMemInContext(count, gClientContext);\n        if ( readBufferObject->readBufferData == nil) {\n\t\t\tSysBeep(5);\n             err = -1;\n            break;\n        } \n        readBufferObject->readBufferOriginalSize = readBufferObject->readBufferSize = count;\n        OTMemcpy(readBufferObject->readBufferData,thisBuffer->fData,count);\n        OTAddLast(&epi->readBuffers,&readBufferObject->fNext);\n        thisBuffer = thisBuffer->fNext;\n    }\n\n   // Clean up.  We MUST release the OTBuffer chain to Open Transport \n   // so that it crelease the OTBuffer chain to Open Transport \n   // so that it can reuse it., OTReleaseBuffer does not tolerate\n   // the parameter being nil, so we check for that case first. \n\n   if (bufferInfo->fBuffer != nil) {\n      OTReleaseBuffer(bufferInfo->fBuffer);\n   }\n\n}\n*/\n\n//\n// Read Bytes from the buffers\n// Called by Squeak to get the data\n//\nstatic UInt32  readBytes(EPInfo* epi,char *buf,UInt32 adjustedBufSize)\n{\n    //\n    // Read bytes from buffers\n    // use recursion to fill buf to adjustedBufSize or \n    // til we have no buffers left\n    // By using enterNotifier higher up we avoid race on the readBuffers list\n    //\n    \n    UInt32 \t\tincrement,bytesRead = 0;\n    ReadBuffer *aBuffer;\n    \n    aBuffer = (ReadBuffer *) OTRemoveFirst(&epi->readBuffers);\n    if (aBuffer == nil) return 0;\n    \n    if (aBuffer->readBufferSize > adjustedBufSize) {\n        bytesRead = adjustedBufSize;\n    \tOTAtomicAdd32(-bytesRead, &epi->bytesPendingToRead);\n        OTMemcpy((char *) buf,aBuffer->readBufferPtr,bytesRead);\n        aBuffer->readBufferPtr += bytesRead;\n        aBuffer->readBufferSize -= bytesRead;\n        OTAddFirst(&epi->readBuffers,&aBuffer->fNext);\n        return bytesRead;\n    }\n    else {\n        bytesRead = aBuffer->readBufferSize;\n       \tOTAtomicAdd32(-bytesRead, &epi->bytesPendingToRead);\n        OTMemcpy(buf,aBuffer->readBufferPtr,bytesRead);\n        OTLIFOEnqueue(gFreeReadBuffers, &aBuffer->fNext);\n\t\tgFreeReadBuffersCounter++;\n        increment = readBytes(epi,buf+bytesRead,adjustedBufSize-bytesRead);\n        bytesRead += increment;\n        return bytesRead;\n   }\n}\n\n\nstatic UInt32  readBytesUDP(EPInfo* epi,InetAddress *fromAddress, int * moreFlag, char *buf,UInt32 adjustedBufSize)\n{\n    //\n    // Read bytes from buffers\n    // For UDP we just drop in the read buffer and address\n    // Don't fill the entire buffer no recursion.\n    // By using enterNotifier higher up we avoid race on the readBuffers list\n    //\n    \n    UInt32      bytesRead = 0;\n    ReadBuffer  *aBuffer;\n    \n    aBuffer = (ReadBuffer *) OTRemoveFirst(&epi->readBuffers);\n    if (aBuffer == nil) return 0;\n    \n    if (aBuffer->readBufferSize > adjustedBufSize) {\n        bytesRead = adjustedBufSize;\n    \tOTAtomicAdd32(-bytesRead, &epi->bytesPendingToRead);\n        OTMemcpy((char *) buf,aBuffer->readBufferPtr,bytesRead);\n        aBuffer->readBufferPtr += bytesRead;\n        aBuffer->readBufferSize -= bytesRead;\n        OTMemcpy(fromAddress,&aBuffer->UDPAddress,sizeof(InetAddress));\n        *moreFlag = aBuffer->UDPMoreFlag;\n        OTAddFirst(&epi->readBuffers,&aBuffer->fNext);\n        return bytesRead;\n    }\n    else {\n        bytesRead = aBuffer->readBufferSize;\n       \tOTAtomicAdd32(-bytesRead, &epi->bytesPendingToRead);\n        OTMemcpy(buf,aBuffer->readBufferPtr,bytesRead);\n        OTMemcpy(fromAddress,&aBuffer->UDPAddress,sizeof(InetAddress));\n        *moreFlag = aBuffer->UDPMoreFlag;\n        OTLIFOEnqueue(gFreeReadBuffers, &aBuffer->fNext);\n\t\tgFreeReadBuffersCounter++;\n        return bytesRead;\n   }\n}\n\n//Cleanup logic\n//\n\nstatic void purgeReadBuffers(EPInfo *epi) {\n    ReadBuffer *aBuffer;\n        \n    //\n    //Put buffers for this epi back on the free queue\n    //\n    aBuffer = (ReadBuffer *) OTRemoveFirst(&epi->readBuffers);\n    \n    while (aBuffer != NULL) {\n        OTLIFOEnqueue(gFreeReadBuffers, &aBuffer->fNext);\n\t\tgFreeReadBuffersCounter++;\n        aBuffer = (ReadBuffer *) OTRemoveFirst(&epi->readBuffers);\n    }\n    epi->bytesPendingToRead = 0;\n}\n\n\n\n//\n//\tSend the Bytes (Really fast, we hope)\n//\nstatic SInt32 SendData(EPInfo* epi,char* buffer, UInt32 size)\n{\n\tOTResult res;\n\tstruct OTData *dataPtr; \n\n \t//\n\t//\tMake sure we record that we are starting a send so we don't try to close\n\t//\tthe endpoint before a T_MEMORYRELEASED event is returned.\n\t//\n\tOTAtomicAdd32(1, &epi->outstandingSends);\n\t\n\tif (epi->socketType == UDPSocketType) {\n\t\tTUnitData UDPDataOutBound;\n\n\t    UDPDataOutBound.addr.maxlen  = sizeof(InetAddress);\n\t    UDPDataOutBound.addr.len     = sizeof(InetAddress);\n\t    UDPDataOutBound.addr.buf     = (UInt8*) &epi->remoteAddress;\n\t    UDPDataOutBound.opt.maxlen   = 0;\n\t    UDPDataOutBound.opt.len      = 0;\n\t    UDPDataOutBound.opt.buf      = NULL;\n\t    UDPDataOutBound.udata.maxlen = size;\n\t    UDPDataOutBound.udata.len    = size;\n\t    UDPDataOutBound.udata.buf    = (UInt8*)buffer;\n\t    \n        res =  OTSndUData(epi->erf,&UDPDataOutBound); \n        if (res == kOTNoError ) return (SInt32) size;\n        \n        // Other Errors could be kOTFlowErr or kOTBadDataErr\n\t}\n\telse { //TCP Send\n    \t//\n    \t//\tIn OT 1.1.2 and previous versions, there is a bug with AckSends\n    \t//\twhich occurs when the same buffer is sent more than once.   In an attempt\n    \t//\tto go fast and not allocate memory, TCP may write an IP and TCP header\n    \t//\tinto the data buffer which is sent.   If the buffer is sent more than once\n    \t//\twithout being refreshed, the data may be corrupted.   To work around this,\n    \t//\tsend the data via an OTData structure, using the gather-write mechanism.\n    \t//\tThe problem does not occur in this code path, and this will not hinder performance.\n    \t//\tThe problem will be fixed in the next Open Transport release following 1.1.2.\n    \t//\n    \t//  Note the MAC OS 8.1 docs alude to a bug before 1.3 where acksends\n    \t//  cause problems if a disconnect flows just right. Unsure if this\n    \t//  will be an issue\n    \t//\n    \t\n    \tif (gOTVersion < kOTVersion113) {\n#if TARGET_API_MAC_CARBON\n    \t\tdataPtr = OTAllocMemInContext(sizeof(OTData), gClientContext);\n#else\n    \t\tdataPtr = OTAllocMem(sizeof(OTData));\n#endif\n    \t\tif (dataPtr == NULL) { //Death lurks I'm sure\n    \t\t    OTAtomicAdd32(-1, &epi->outstandingSends);\n                OTFreeMem(buffer);\n                return 0;\n            }\n\n    \t\tdataPtr->fNext = NULL;\n    \t\tdataPtr->fData = buffer;\n    \t\tdataPtr->fLen  = size;\n    \t\tres = OTSnd(epi->erf, dataPtr, kNetbufDataIsOTData, 0);\n    \t\t\n    \t\t//Note in the notification routine we cleanup the allocated dataPtr AND buffer.\n    \t}\n    \telse\n    \t{\n    \t\tres = OTSnd(epi->erf, buffer, size, 0);\n    \t\t\n    \t\t//JMM how to handle kENOMEMErr no memory right now error\n    \t\t//Book says to back off and wait but must do a timer or something\n    \t\t//Right now we'll fail the primitive higher up since the error code is bad\n    \t}\n    }\n\n\tif (res == size) return (SInt32) size;\n\n\tif (res >= 0) {\n\t\t//\n\t\t//\tImplied kOTFlowErr since not all data was accepted.\n\t\t//  But maybe we aren't blocked yet so keep sending\n\t\t//\n\t\treturn res;\n\t} else\t{\t// res < 0\n\t\n \t\tOTAtomicAdd32(-1, &epi->outstandingSends);\n        OTFreeMem(buffer);\n        \n\t    if ((epi->socketType != UDPSocketType) && (gOTVersion < kOTVersion113) )\n\t       \tOTFreeMem(dataPtr); \n\t   \n\t\tif (res == kOTFlowErr) {\n\t\t    //\n\t\t    // Flow control back off and wait for T_GODATA\n\t\t    //\n        \tOTAtomicSetBit(&epi->stateFlags, kSendIsBlocked);\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tif (res == kOTLookErr) {\n\t\t\tres = OTLook(epi->erf);\n\t\t\tif (res == T_ORDREL || res == T_GODATA || res == T_DISCONNECT)\n\t\t\t{\n\t\t\t\t//\tWait to get the T_ORDREL at the notifier and handle it there.\n\t\t\t\t//\tThen we will resume sending.\n\t\t\t\t//  Same applies for other events\n\t\t\t\t//\n                //JMM test? \n               \tOTAtomicSetBit(&epi->stateFlags, kSendIsBlocked);\n\t\t\t\treturn 0;\n\t\t\t} else \t\n\t\t    \treturn res; \n\t\t} else \n\t\t    return res;\n\t\n\t}\n}\n\n//\n//Set the options\n//\nint sqSocketSetOptionsoptionNameStartoptionNameSizeoptionValueStartoptionValueSizereturnedValue(SocketPtr s,int optionNameT, int optionNameSize, int optionValueT, int optionValueSize, int *result)\t{\n    EPInfo*     epi;\n    OTResult    error;\n    char        optionName[80],optionValue[80];\n    SInt32      anInteger;\n    \n\t*result = 0;\n\tif (!SocketValid(s)) return -1;\n    epi = (EPInfo *) s->privateSocketPtr;\n\n\tOTMemcpy(optionName,(char *) optionNameT,optionNameSize);\n\toptionName[optionNameSize] = 0x00;\n\t\n    OTMemcpy(optionValue,(char *) optionValueT,optionValueSize);\n    optionValue[optionValueSize] = 0x00;\n    CopyCStringToPascal(optionValue,(unsigned char *) optionValue);\n    StringToNum((ConstStr255Param) optionValue,&anInteger);   \n    \t\n   error = lookupOptionName(epi, false, (char *) &optionName, anInteger,(long *) result);\n   return error;\n}\n\n//\n//Get the options\n//\nint sqSocketGetOptionsoptionNameStartoptionNameSizereturnedValue(SocketPtr s,int optionNameT, int optionNameSize, int *result)\t{\n    EPInfo*     epi;\n    OTResult    error;\n    char        optionName[80];\n   \n\t*result = 0;\n\tif (!SocketValid(s)) return -1;\n    epi = (EPInfo *) s->privateSocketPtr;\n\n\tOTMemcpy(optionName,(char *) optionNameT,optionNameSize);  //NEED to fiddle with error number JMM to say readonly notvalid etc.\n\toptionName[optionNameSize] = 0x00;\n\t\n     \t\n   error = lookupOptionName(epi, true, (char *) &optionName, NULL,(long *)  result);\n   return error;\n}\n\n\n// A Number of routines to set/get options, first figureout the flags, then call the routine\n// To set or get the options. \n\nstatic SInt32\tlookupOptionName(EPInfo *epi, Boolean trueIfGet, char *aString, UInt32 value, SInt32 *result) {\n\tif (strcmp(\"TCP_MAXSEG\",aString)==0) \t\t\t\t{return SetFourByteOption(epi,trueIfGet,INET_TCP,TCP_MAXSEG,value,result);};\n\tif (strcmp(\"TCP_NODELAY\",aString)==0) \t\t\t\t{return SetFourByteOption(epi,trueIfGet,INET_TCP,TCP_NODELAY,value,result);};\n\tif (strcmp(\"TCP_ABORT_THRESHOLD\",aString)==0) \t\t{return SetFourByteOption(epi,trueIfGet,INET_TCP,TCP_ABORT_THRESHOLD,value,result);};\n\tif (strcmp(\"TCP_CONN_NOTIFY_THRESHOLD\",aString)==0) {return SetFourByteOption(epi,trueIfGet,INET_TCP,TCP_CONN_NOTIFY_THRESHOLD,value,result);};\n\tif (strcmp(\"TCP_CONN_ABORT_THRESHOLD\",aString)==0) \t{return SetFourByteOption(epi,trueIfGet,INET_TCP,TCP_CONN_ABORT_THRESHOLD,value,result);};\n\tif (strcmp(\"TCP_NOTIFY_THRESHOLD\",aString)==0) \t\t{return SetFourByteOption(epi,trueIfGet,INET_TCP,TCP_NOTIFY_THRESHOLD,value,result);};\n\tif (strcmp(\"TCP_URGENT_PTR_TYPE\",aString)==0) \t\t{return SetFourByteOption(epi,trueIfGet,INET_TCP,TCP_URGENT_PTR_TYPE,value,result);};\n\n\tif (strcmp(\"UDP_CHECKSUM\",aString)==0) \t\t\t\t{return SetFourByteOption(epi,trueIfGet,INET_UDP,UDP_CHECKSUM,value,result);};\n\n\tif (strcmp(\"SO_DEBUG\",aString)==0) \t\t\t    \t{return SetFourByteOption(epi,trueIfGet,XTI_GENERIC,XTI_DEBUG,value,result);};\n\tif (strcmp(\"SO_REUSEADDR\",aString)==0) \t\t\t    {return SetFourByteOption(epi,trueIfGet,INET_IP,IP_REUSEADDR,value,result);;};\n\tif (strcmp(\"SO_REUSEPORT\",aString)==0) \t\t\t    {return SetFourByteOption(epi,trueIfGet,INET_IP,IP_REUSEADDR,value,result);};\n\tif (strcmp(\"SO_DONTROUTE\",aString)==0) \t\t\t    {return SetFourByteOption(epi,trueIfGet,INET_IP,IP_DONTROUTE,value,result);};\n\tif (strcmp(\"SO_BROADCAST\",aString)==0) \t\t\t    {return SetFourByteOption(epi,trueIfGet,INET_IP,IP_BROADCAST,value,result);};\n\tif (strcmp(\"SO_SNDBUF\",aString)==0) \t\t\t    {return SetFourByteOption(epi,trueIfGet,XTI_GENERIC,XTI_SNDBUF,value,result);};\n\tif (strcmp(\"SO_RCVBUF\",aString)==0) \t\t\t    {return SetFourByteOption(epi,trueIfGet,XTI_GENERIC,XTI_RCVBUF,value,result);};\n\tif (strcmp(\"SO_KEEPALIVE\",aString)==0) \t\t\t   {return SetKeepAliveOption(epi,trueIfGet,INET_TCP,TCP_KEEPALIVE,value,result);};\n\tif (strcmp(\"SO_OOBINLINE\",aString)==0) \t\t\t    {return SetFourByteOption(epi,trueIfGet,INET_TCP,TCP_OOBINLINE,value,result);};\n\tif (strcmp(\"SO_PRIORITY\",aString)==0) \t\t\t     {return SetOneByteOption(epi,trueIfGet,INET_IP,IP_TOS,value,result);};\n\tif (strcmp(\"SO_LINGER\",aString)==0) \t\t\t      {return SetLingerOption(epi,trueIfGet,XTI_GENERIC,XTI_LINGER,value,result);};\n\tif (strcmp(\"SO_RCVLOWAT\",aString)==0) \t\t\t    {return SetFourByteOption(epi,trueIfGet,XTI_GENERIC,XTI_RCVLOWAT,value,result);};\n\tif (strcmp(\"SO_SNDLOWAT\",aString)==0) \t\t\t    {return SetFourByteOption(epi,trueIfGet,XTI_GENERIC,XTI_SNDLOWAT,value,result);};\t\n\t\n\tif (strcmp(\"IP_OPTIONS\",aString)==0) \t\t\t    { }; //JMM What to do here?\t\n\tif (strcmp(\"IP_TTL\",aString)==0) \t\t\t         {return SetOneByteOption(epi,trueIfGet,INET_IP,IP_TTL,value,result);};\t\n\tif (strcmp(\"IP_HDRINCL\",aString)==0) \t\t\t    {return SetFourByteOption(epi,trueIfGet,INET_IP,IP_HDRINCL,value,result);}; //NOT SUPPORT FOR IP\t\n\tif (strcmp(\"IP_RCVOPTS\",aString)==0) \t\t\t    {return SetFourByteOption(epi,trueIfGet,INET_IP,IP_RCVOPTS,value,result);};\t\n\tif (strcmp(\"IP_RCVDSTADDR\",aString)==0) \t\t\t{return SetFourByteOption(epi,trueIfGet,INET_IP,IP_RCVDSTADDR,value,result);};\t\n\tif (strcmp(\"IP_MULTICAST_IF\",aString)==0) \t\t\t{return SetFourByteOption(epi,trueIfGet,INET_IP,IP_MULTICAST_IF,value,result);};\t\n\tif (strcmp(\"IP_MULTICAST_TTL\",aString)==0) \t\t\t {return SetOneByteOption(epi,trueIfGet,INET_IP,IP_MULTICAST_TTL,value,result);};\t\n\tif (strcmp(\"IP_MULTICAST_LOOP\",aString)==0) \t     {return SetOneByteOption(epi,trueIfGet,INET_IP,IP_MULTICAST_LOOP,value,result);};\t\n/*\tif (strcmp(\"IP_ADD_MEMBERSHIP\",aString)==0) \t    { return SetJMMByteOption(epi,trueIfGet,INET_IP,IP_ADD_MEMBERSHIP,value,result);};\t\n\tif (strcmp(\"IP_DROP_MEMBERSHIP\",aString)==0) \t    { return SetJMMByteOption(epi,trueIfGet,INET_IP,IP_DROP_MEMBERSHIP,value,result);};\t\n\tif (strcmp(\"IP_BROADCAST_IF\",aString)==0) \t        {return SetFourByteOption(epi,trueIfGet,INET_IP,IP_BROADCAST_IF,value,result);};\t\n\tif (strcmp(\"IP_RCVIFADDR\",aString)==0) \t            {return SetFourByteOption(epi,trueIfGet,INET_IP,IP_RCVIFADDR,value,result);};\t*/\n\n    *result = 0;\n    return -1;\n}\n\nstatic OTResult SetFourByteOption(EPInfo* epi,Boolean trueIfGet, OTXTILevel level, OTXTIName  name, UInt32   value, SInt32    *returnValue) {\n   OTResult err;\n   UInt8    optBuffer[kOTFourByteOptionSize];\n   TOption  *option = (TOption *) &optBuffer;\n   TOptMgmt request;\n   TOptMgmt result;\n   Boolean isAsync=false;\n   \n   /* Set up the option buffer to specify the option and value to set. */\n   option->len  = kOTFourByteOptionSize;\n   option->level= level;\n   option->name = name;\n   option->status = 0;\n   option->value[0] = value;\n\n   /* Set up request parameter for OTOptionManagement */\n   request.opt.buf= (UInt8 *) option;\n   request.opt.len= sizeof(optBuffer);\n   request.opt.maxlen=sizeof(optBuffer);\n   request.flags  = trueIfGet ? T_CURRENT : T_NEGOTIATE;\n\n   /* Set up reply parameter for OTOptionManagement. */\n   result.opt.buf  = (UInt8 *) option;\n   result.opt.maxlen  = sizeof(optBuffer);\n  \n    if (OTIsSynchronous(epi->erf) == false)\t{\t// check whether ep sync or not\n\t\tisAsync = true;\t\t\t                // set flag if async\n\t\tOTSetSynchronous(epi->erf);\t\t\t        // set endpoint to sync\t\n\t}\n\t\t\t\t\n\t\t\t\t\n    err = OTOptionManagement(epi->erf, &request, &result);\n\t\n\tif (isAsync)\t\t\t\t        // restore ep state \n\t\tOTSetAsynchronous(epi->erf);\n    \n\t*returnValue = option->value[0];\n\n   if (err == noErr) {\n      if (option->status != T_SUCCESS) \n         err = option->status;\n   } \n            \n   return (err);\n}\n\nstatic OTResult SetOneByteOption(EPInfo* epi,Boolean trueIfGet, OTXTILevel level, OTXTIName  name, UInt32   value, SInt32    *returnValue) {\n   OTResult err;\n   UInt8    optBuffer[kOTFourByteOptionSize];\n   TOption  *option = (TOption *) &optBuffer;\n   TOptMgmt request;\n   TOptMgmt result;\n   Boolean isAsync=false;\n   \n   /* Set up the option buffer to specify the option and value to set. */\n   option->len  = kOTOneByteOptionSize;\n   option->level= level;\n   option->name = name;\n   option->status = 0;\n   *(unsigned char *)option->value = value;\n\n   /* Set up request parameter for OTOptionManagement */\n   request.opt.buf= (UInt8 *) option;\n   request.opt.len= kOTOneByteOptionSize;\n   request.opt.maxlen=sizeof(optBuffer);\n   request.flags  = trueIfGet ? T_CURRENT : T_NEGOTIATE;\n\n   /* Set up reply parameter for OTOptionManagement. */\n   result.opt.buf  = (UInt8 *) option;\n   result.opt.maxlen  = sizeof(optBuffer);\n   \n    if (OTIsSynchronous(epi->erf) == false)\t{\t// check whether ep sync or not\n\t\tisAsync = true;\t\t\t                // set flag if async\n\t\tOTSetSynchronous(epi->erf);\t\t\t        // set endpoint to sync\t\n\t}\n\t\t\t\t\n    err = OTOptionManagement(epi->erf, &request, &result);\n\t\n\tif (isAsync)\t\t\t\t        // restore ep state \n\t\tOTSetAsynchronous(epi->erf);\n    \n\t*returnValue = (UInt32) (*(unsigned char *)option->value);\n\n   if (err == noErr) {\n      if (option->status != T_SUCCESS) \n         err = option->status;\n   }\n            \n   return (err);\n}\n\nstatic OTResult SetKeepAliveOption(EPInfo* epi,Boolean trueIfGet, OTXTILevel level, OTXTIName  name, UInt32   value, SInt32    *returnValue) {\n   OTResult err;\n   TKeepAliveOpt  optBuffer;\n   TOption  *option = (TOption *) &optBuffer;\n   TOptMgmt request;\n   TOptMgmt result;\n   Boolean isAsync=false;\n   \n   \n   if (value == 0)\n       optBuffer.tcpKeepAliveOn = T_NO;\n   else\n        optBuffer.tcpKeepAliveOn = T_YES;\n        \n   optBuffer.tcpKeepAliveTimer = value;\n\t\t\t\t\n   /* Set up the option buffer to specify the option and value to set. */\n   option->len  = sizeof(TKeepAliveOpt);\n   option->level= level;\n   option->name = name;\n   option->status = 0;\n\n   /* Set up request parameter for OTOptionManagement */\n   request.opt.buf= (UInt8 *) option;\n   request.opt.len= sizeof(TKeepAliveOpt);\n   request.opt.maxlen=sizeof(TKeepAliveOpt);\n   request.flags  = trueIfGet ? T_CURRENT : T_NEGOTIATE;\n\n   /* Set up reply parameter for OTOptionManagement. */\n   result.opt.buf  = (UInt8 *) option;\n   result.opt.maxlen  = sizeof(TKeepAliveOpt);\n   \n    if (OTIsSynchronous(epi->erf) == false)\t{\t// check whether ep sync or not\n\t\tisAsync = true;\t\t\t                // set flag if async\n\t\tOTSetSynchronous(epi->erf);\t\t\t        // set endpoint to sync\t\n\t}\n\t\t\t\t\n    err = OTOptionManagement(epi->erf, &request, &result);\n\t\n\tif (isAsync)\t\t\t\t        // restore ep state \n\t\tOTSetAsynchronous(epi->erf);\n    \n\t*returnValue = optBuffer.tcpKeepAliveTimer;\n\n   if (err == noErr) {\n      if (option->status != T_SUCCESS) \n         err = option->status;\n   }\n            \n   return (err);\n}\n\t\t    \n\nstatic OTResult SetLingerOption(EPInfo* epi,Boolean trueIfGet, OTXTILevel level, OTXTIName  name, UInt32   value, SInt32    *returnValue) {\n   OTResult err;\n   TLingerOpt  optBuffer;\n   TOption  *option = (TOption *) &optBuffer;\n   TOptMgmt request;\n   TOptMgmt result;\n   Boolean isAsync=false;\n   \n   \n   if (value == 0)\n       optBuffer.tcpLingerOn = T_NO;\n   else\n        optBuffer.tcpLingerOn = T_YES;\n        \n   optBuffer.tcpLingerTimer = value;\n\t\t\t\t\n   /* Set up the option buffer to specify the option and value to set. */\n   option->len  = sizeof(TKeepAliveOpt);\n   option->level= level;\n   option->name = name;\n   option->status = 0;\n\n   /* Set up request parameter for OTOptionManagement */\n   request.opt.buf= (UInt8 *) option;\n   request.opt.len= sizeof(TKeepAliveOpt);\n   request.opt.maxlen=sizeof(TKeepAliveOpt);\n   request.flags  = trueIfGet ? T_CURRENT : T_NEGOTIATE;\n\n   /* Set up reply parameter for OTOptionManagement. */\n   result.opt.buf  = (UInt8 *) option;\n   result.opt.maxlen  = sizeof(TKeepAliveOpt);\n   \n    if (OTIsSynchronous(epi->erf) == false)\t{\t// check whether ep sync or not\n\t\tisAsync = true;\t\t\t                // set flag if async\n\t\tOTSetSynchronous(epi->erf);\t\t\t        // set endpoint to sync\t\n\t}\n\t\t\t\t\n    err = OTOptionManagement(epi->erf, &request, &result);\n\t\n\tif (isAsync)\t\t\t\t        // restore ep state \n\t\tOTSetAsynchronous(epi->erf);\n    \n\t*returnValue = optBuffer.tcpLingerTimer;\n\n   if (err == noErr) {\n      if (option->status != T_SUCCESS) \n         err = option->status;\n   }\n            \n   return (err);\n}\n\n\n//\n//\tNotifier:\n//\n//\tMost of the interesting networking code in this program for the resolver resides inside \n//\tthis notifier.   In order to run asynchronously and as fast as possible,\n//\tthings are done inside the notifier whenever possible.  Since almost\n//\teverything is done inside the notifier, there was little need for specical\n//\tsynchronization code.\n//\n//\tNote: The only events which are expected from the DNR are T_DNRSTRINGTOADDRCOMPLETE,\n//\tT_DNRADDRTONAMECOMPLETE, and of close sleep/reconfigure notifications.\n//\n//\n\nstatic pascal void DNSNotifier(void* context, OTEventCode event, OTResult result, void* cookie)\n{\n\tEPInfo* epi = (EPInfo*) context;\n\n\tJMMLogMessageAndNumber(\"\\p DNS Event  \",event);\n\tJMMLogMessageAndNumber(\"\\p DNS Result \",result);\n\tJMMLogMessageAndNumber(\"\\p Id \",epi->semaIndex);\n\t\n\t//\n\t//\tOnce the program is shutting down, most events would be uninteresting.\n\t//\n\tif (gProgramState != kProgramRunning)\n\t\t\treturn;\n\t\t\n\t//\n\t//\tWithin the notifier, all action is based on the event code.\n\t//\tIn this notifier, fatal errors all break out of the switch to the bottom.\n\t//\tAs long as everything goes as expected, the case returns rather than breaks.\n\t//\n\tswitch (event)\n\t{\n\t\t//\n\t\t//\tT_DNRSTRINGTOADDRCOMPLETE:\n\t\t//\n\t\t//\tThis event occurs when the DNR has finished an attempt to translate\n\t\t//\tthe server's name into an IP address we can use to connect to.\n\t\t//\n\t\tcase T_DNRSTRINGTOADDRCOMPLETE:\n\t\t{\n\t\t\tgDNSResolverError = result;\n\t\t\tif (result != kOTNoError) {\n\t\t\t\tgDNSResolverStatus = RESOLVER_ERROR;\n    \t\t\tinterpreterProxy->signalSemaphoreWithIndex(epi->semaIndex);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tgDNSAddr = gDNSHostInfo.addrs[0];\n\t\t\tgDNSResolverStatus = RESOLVER_SUCCESS;\n\t\t\tinterpreterProxy->signalSemaphoreWithIndex(epi->semaIndex);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//\n\t\t//\tT_DNRADDRTONAMECOMPLETE:\n\t\t//\n\t\t//\tThis event occurs when the DNR has finished an attempt to translate\n\t\t//\tthe  an IP address into a server name.\n\t\t//\n\t\tcase T_DNRADDRTONAMECOMPLETE:\n\t\t{\n\t\t\tgDNSResolverError = result;\n\t\t\tif (result != kOTNoError) {\n\t\t\t\tgDNSResolverStatus = RESOLVER_ERROR;\n    \t\t\tinterpreterProxy->signalSemaphoreWithIndex(epi->semaIndex);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tgDNSResolverStatus = RESOLVER_SUCCESS;\n\t\t\tinterpreterProxy->signalSemaphoreWithIndex(epi->semaIndex);\n\t\t\treturn;\n\t\t}\n\t\t\t\t\n\t\t\t\n\t\t//\n\t\t//\tkOTProviderWillClose:\n\t\t//\n\t\t//\tThis event occurs when the user changes TCP/IP in the control panel\n\t\t//\n\t\tcase kOTProviderWillClose:\n\t\tcase kOTProviderIsClosed:\n\t\t{\n\t\t\tgDNSResolverError = kOTProviderWillClose;\n\t\t\tinterpreterProxy->signalSemaphoreWithIndex(epi->semaIndex);\n\t\t\tResolverTerminate(); \n\t\t\tgDNSResolverStatus = RESOLVER_SUCCESS; //Cheat! Keep Squeak happy later we fix the resolver EP.\n\t\t\treturn;\n\t\t}\n\n\t\t\n\t\t//\n\t\t//\tdefault:\n\t\t//\n\t\t//\tThere are events which we don't handle, but we don't expect to see\n\t\t//\tany of them.  In the production version of the program, we ignore the event and try to keep running.\n\t\t//\n\t\tdefault:\n\t\t{\n\t\t\treturn;\n\t\t}\n\t}\n}\n\n\n\n//\n//\tNotifier for socket: Please note we have another notifier for sockets that do multiple listens\n//  And a different notifier for UDP sockets, however the intesting thing is that we can call\n/// This routine from othe other as a simple form of inheritence.\n//\n//\tMost of the interesting networking code in this program for socket support resides inside \n//\tthis notifier.   In order to run asynchronously and as fast as possible,\n//\tthings are done inside the notifier whenever possible.  Since almost\n//\teverything is done inside the notifier, there was little need for specical\n//\tsynchronization code.\n//\n//\tIMPORTANT NOTE:  Normal events defined by XTI (T_LISTEN, T_CONNECT, etc)\n//\tand OT completion events (T_OPENCOMPLETE, T_BINDCOMPLETE, etc.) are not\n//\treentrant.  That is, whenever our notifier is invoked with such an event,\n//\tthe notifier will not be called again by OT for another normal or completion\n//\tevent until we have returned out of the notifier - even if we make OT calls\n//\tfrom inside the notifier.   This is a useful synchronization tool.\n//\tHowever, there are two kinds of events which will cause the notifier to \n//\tbe reentered.   One is T_MEMORYRELEASED, which always happens instantly.\n//\tThe other are state change events like kOTProviderWillClose.\n//\n\nstatic pascal void NotifierSocket(void* context, OTEventCode event, OTResult result, void* cookie)\n{\n\tOSStatus err;\n\tOTResult epState;\n\tEPInfo* epi = (EPInfo*) context;\n\t\n\tJMMLogMessageAndNumber(\"\\p Event  \",event);\n\tJMMLogMessageAndNumber(\"\\p Result \",result);\n\tJMMLogMessageAndNumber(\"\\p Id \",epi->semaIndex);\n\n\t//\n\t//\tOnce the program is shutting down, most events would be uninteresting.\n\t//\tHowever, we still need T_OPENCOMPLETE and T_MEMORYRELEASED events since\n\t//\twe can't call CloseOpenTransport until all OTAsyncOpenEndpoints and\n\t//\tOTSends with AckSends have completed.   So those specific events\n\t//\tare still accepted.\n\t//\n\tif (gProgramState != kProgramRunning) {\n\t\tif ((event != T_OPENCOMPLETE) && (event != T_MEMORYRELEASED)) {\n\t\t\treturn;\n\t\t}\n\t}\n\t\n\t\n\t//\n\t//\tWithin the notifier, all action is based on the event code.\n\t//\tIn this notifier, fatal errors all break out of the switch to the bottom.\n\t//\tAs long as everything goes as expected, the case returns rather than breaks.\n\t//\n\tswitch (event)\n\t{\n\t\t//\n\t\t//\tkStreamIoctlEvent:\n\t\t//\n\t\t//\tThis event is returned when an I_FLUSH ioctl has completed.\n\t\t//\tThe flush was done in an attempt to get back all T_MEMORYRELEASED events\n\t\t//\tfor outstanding OTSnd() calls with Ack Sends.   For good measure, we\n\t\t//\tsend a disconnect now.   Errors are ignored at this point since it is\n\t\t//\tpossible that the connection will already be gone, etc.\n\t\t//\n\t\tcase kStreamIoctlEvent:\n\t\t{\n\t\t\tif (OTAtomicTestBit(&epi->stateFlags, kOpenInProgressBit) != 0) {\n\t\t\t    OTAtomicClearBit(&epi->stateFlags2, kFlushDisconnectInProgressBit);\n\t\t\t\t(void) OTSndDisconnect(epi->erf, NULL);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t//\n\t\t//\tT_ACCEPTCOMPLETE:\n\t\t//\n\t\t//\tThis event is received by the listener endpoint only when we open a port with a listen.   \n\t\t//\tThe acceptor endpoint will get a T_PASSCON event instead.\n\t\t//\n\t\tcase T_ACCEPTCOMPLETE:\n\t\t{\n            SetEPLastError(epi,result);\n\t\t\tif (result != kOTNoError) {\n\t\t\t\tmakeEPUnconnected(epi);\n        \t\treturn;\n            }\n            makeEPConnected(epi);\n\t\t\treturn;\n\t\t}\n\t\t//\n\t\t//\tT_BINDCOMPLETE:\n\t\t//\n\t\t//\tThis event is returned when an endpoint has been bound to a wildcard addr.\n\t\t//  Bind happens when we open a connection to a remote location.\n\t\t//\tNo errors are expected.   \n\t\t//\n\t\tcase T_BINDCOMPLETE:\n\t\t{\n            SetEPLastError(epi,result);\n\t\t\tOTAtomicClearBit(&epi->stateFlags3, kWaitingForBind);\n\t\t\tif (result != kOTNoError) {\n            \tmakeEPUnconnected(epi);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (epi->remoteAddress.fHost != 0) \n\t\t\t    DoConnect(epi,epi->remoteAddress.fHost, epi->remoteAddress.fPort);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//\n\t\t//\tT_CONNECT:\n\t\t//\n\t\t//\tThis event is returned when a connection is established to the server.\n\t\t//\tThe program must call OTRcvConnect() to get the conenction information\n\t\t//\tand clear the T_CONNECT event from the stream.  Since OTRcvConnect()\n\t\t//\treturns immediately (rather than via a completion event to the notifier)\n\t\t//\twe can use local stack structures for parameters.\n\t\t//\n\t\tcase T_CONNECT:\n\t\t{\n\t\t\tTCall call;\n\t\t\t\t\t\t\n            SetEPLastError(epi,result);\n\t\t\tif (result != kOTNoError) {\n\t\t\t\tmakeEPUnconnected(epi);\n  \t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t// Address of endpoint that has connection\n\t\t\t// This could be different from original request\n\t\t\t// Due to hand off to different EP say you connect to \n\t\t\t// port 80, but you end up on 49160\n\t\t\t\n\t\t\tcall.addr.maxlen = sizeof(InetAddress);\n\t\t\tcall.addr.buf = (unsigned char*) &epi->remoteAddress;  \n\t\t\tcall.opt.maxlen = 0;\n\t\t\tcall.opt.buf = NULL;\n\t\t\tcall.udata.maxlen = 0;\n\t\t\tcall.udata.buf = NULL;\n\t\t\t\n\t\t\terr = OTRcvConnect(epi->erf, &call);\n\t\t\tSetEPLastError(epi,err);\n\n\t\t\tif (err != kOTNoError) {\n\t\t\t    if (err == kOTLookErr) {\n\t\t\t        OSStatus\tlookStatus;\n\t\t\t        lookStatus = OTLook(epi->erf);\n\t\t\t        if (lookStatus == T_DISCONNECT) {\n               \t\t\terr = OTRcvDisconnect(epi->erf, NULL);\n        \t    \t\tif (err != kOTNoError) {\n        \t\t    \t\tif (err == kOTNoDisconnectErr) {\n                    \t\t\terr = OTRcvConnect(epi->erf, &call);\n                    \t\t\tSetEPLastError(epi,err);\n                       \t\t\tmakeEPUnconnected(epi);\n       \t\t    \t\t        return;\n       \t\t    \t\t    }\n\t\t\t            } else {\n                \t\t\terr = OTRcvConnect(epi->erf, &call);\n                \t\t\tSetEPLastError(epi,err);\n                   \t\t\tmakeEPUnconnected(epi);\n   \t\t    \t\t        return;\n\t\t\t            }\n\t\t\t        }\n\t\t\t        if (lookStatus == T_GODATA) { // HUH\n            \t\t\terr = OTRcvConnect(epi->erf, &call);\n            \t\t\tSetEPLastError(epi,err);\n               \t\t\tmakeEPConnected(epi);\n\t    \t\t        return;\n\t\t\t        }\n\t\t\t    }\n                //JMM book says may return kOTNoDataErr (no connecton yet) or a kOTLookErr with T_DISCONNECT\n                // BUT we had got T_GODATA WHY? \n                \n\t\t\t\tmakeEPUnconnected(epi);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tmakeEPConnected(epi);\n\t\t\treturn;\t\t\t\t// Wait for a T_DATA...\n\t\t}\n\t\t\n\t\t//\n\t\t//\tT_LISTEN:\n\t\t//\n\t\tcase T_LISTEN:\n\t\t{\n\t\t\tDoListenAccept(epi,epi);\n\t\t\treturn;\n\t\t}\n\n\t\t//\n\t\t//\tT_DATA:\n\t\t//\n\t\t//\tThe main rule for processing T_DATA's is to remember that once you have\n\t\t//\ta T_DATA, you won't get another one until you have read to a kOTNoDataErr.\n\t\t//\tThe advanced rule is to remember that you could get another T_DATA\n\t\t//\tduring an OTRcv() which will eventually return kOTNoDataErr, presenting\n\t\t//\tthe application with a synchronization issue to be most careful about.\n\t\t//\t\n\t\t//\tIn this application, since an OTRcv() calls are made from inside the notifier,\n\t\t//\tthis particular synchronization issue doesn't become a problem.\n\t\t//\n\t\tcase T_DATA:\n\t\t{\n\t\t\tif (!OTAtomicTestBit(&epi->stateFlags2, kPassconNeeded)) {\n\t\t\t    ReadData(epi,NULL,0);\n\t\t\t    return;\n\t\t\t }\n\t\t\t else {\n    \t\t\t//\n    \t\t\t//\tHere we work around a small OpenTransport bug.\n    \t\t\t//\tIt turns out, since this program does almost everything from inside the notifier,\n    \t\t\t//\tthat during a T_UNBINDCOMPLETE we can put an EPInfo back into the idle list.\n    \t\t\t//\tIf that notification is interrupted by a T_LISTEN at the notifier, we could\n    \t\t\t//\tend up starting a new connection on the endpoint before OT unwinds the stack\n    \t\t\t//\tout of the code which delivered the T_UNBINDCOMPLETE.   OT has some specific\n    \t\t\t//\tcode to protect against a T_DATA arriving before the T_PASSCON, but in this\n    \t\t\t//\tcase it gets confused and the events arrive out of order.   If we try to\n    \t\t\t//\tdo an OTRcv() at this point we will get a kOTStateChangeErr because the endpoint\n    \t\t\t//\tis still locked by the earlier OTAccept call until the T_PASSCON is delivered\n    \t\t\t//\tto us.   This is fairly benign and can be worked around easily.  What we do\n    \t\t\t//\tis note that the T_PASSCON hasn't arrived yet and defer the call to ReadData()\n    \t\t\t//\tuntil it does.\n    \t\t\t//\n    \t\t\tif ( OTAtomicSetBit(&epi->stateFlags, kPassconBit) != 0 )\n    \t\t\t{\n    \t\t\t    ReadData(epi,NULL,0);\n    \t\t\t    return;\n    \t\t\t}\n    \t\t}\n\t\t}\t\t\t\t\t\n\n\t\t//\n\t\t//\tT_PASSCON:\n\t\t//\n\t\t//\tThis event happens on the accepting endpoint, not the listening endpoint.\n\t\t//\tAt this point the connection is fully established and we can begin the\n\t\t//\tprocess of downloading data.  Note that due to a problem in OT it is \n\t\t//\tpossible for a T_DATA to beat a T_PASSCON to the notifier.  When this\n\t\t//\thappens we note it in the T_DATA case and then start processing the \n\t\t//\tdata here.  \n\t\t//\n\t\tcase T_PASSCON:\n\t\t{\n            SetEPLastError(epi,result);\n\t\t\tif (result != kOTNoError) {\n               \tOTAtomicSetBit(&epi->stateFlags, kPassconBit);\n   \t\t\t\tmakeEPUnconnected(epi);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n   \t\t\tmakeEPConnected(epi);\n                \n\t\t    if ( OTAtomicSetBit(&epi->stateFlags, kPassconBit) != 0 ){\n\t\t\t\t//\n\t\t\t\t//\tA T_DATA previously beat the T_PASSCON to our notifier.\n\t\t\t\t//\tHere we help OT out by having deferred data processing until now.\n\t\t\t\t//\n\t\t\t    ReadData(epi,NULL,0);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t//\n\t\t// T_MEMORYRELEASED\n\t\t// lower level has finished with buffer\n\t\t\t\t\n\t\tcase T_MEMORYRELEASED:\n\t\t{\n\t\t    if (cookie == nil) return;\n\t\t\tOTAtomicAdd32(-1, &epi->outstandingSends);\n\t\t\t\n\t    \tif (epi->socketType == UDPSocketType) {\n\t\t        OTFreeMem(cookie);\n\t    \t} else {//tcp\n\t\t    \tif (gOTVersion < kOTVersion113) {\n\t\t    \t\tstruct OTData *data=cookie;\n\n\t\t    \t\tOTFreeMem(data->fData);\n\t\t    \t\tOTFreeMem(data);\n\t\t    \t} else {\n\t\t        \tOTFreeMem(cookie);\n\t\t        }\n\t        }\n\t        \t\n\t\t    return;\n\t\t}\n\t\t\t\n\t\t//\n\t\t//\tT_DISCONNECT:\n\t\t//\n\t\t//\tAn inbound T_DISCONNECT event usually indicates that the other side of the\n\t\t//\tconnection did an abortive disconnect (as opposed to an orderly release).\n\t\t//\tIt also can be generated by the transport provider on the system (e.g. tcp)\n\t\t//\twhen it decides that a connection is no longer in existance.\n\t\t//\n\t\t//\tWe receive the disconnect, but this program ignores the associated reason (NULL param).\n\t\t//\tIt is possible to get back a kOTNoDisconnectErr from the OTRcvDisconnect call.\n\t\t//\tThis can happen when either (1) the disconnect on the stream is hidden by a \n\t\t//\thigher priority message, or (2) something has flushed or reset the disconnect\n\t\t//\tevent in the meantime.   This is not fatal, and the appropriate thing to do is\n\t\t//\tto pretend the T_DISCONNECT event never happened.   Any other error is unexpected\n\t\t//\tand needs to be reported so we can fix it.  Next, unbind the endpoint so we can\n\t\t//\treuse it for a new inbound connection.\n\t\t//\t\n\t\t//\tIt is possible to get an error on the unbind due to a bug in OT 1.1.1 and earlier.\n\t\t//\tThe best thing to do for that is close the endpoint and open a new one to replace it.\n\t\t//\tWe do this back in the main thread so we don't have to deal with synchronization problems.\n\t\t//\n\t\tcase T_DISCONNECT:\n\t\t{\n\t\t\tepState = OTGetEndpointState(epi->erf);\n\t\t\terr = OTRcvDisconnect(epi->erf, NULL);\n\t\t\t\n\t\t\tif (epState == T_OUTCON) { //01Aug2000 fix for bad port, will get disconnect on outgoing connection\n                makeEPUnconnected(epi);\n\t\t\t}\n\t\t\tif (err != kOTNoError) {\n\t\t\t\tif (err == kOTNoDisconnectErr) return;\n\t\t\t    makeEPBroken(epi,err);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n                ///\n                //Both sides now have closed \n                //\n            \n            OTAtomicSetBit(&epi->stateFlags, kUnConnected);\t\t\t\n\t        OTAtomicClearBit(&epi->stateFlags, kConnected);\n            OTAtomicClearBit(&epi->stateFlags, kThisEndClosed);\t\t\t\n            OTAtomicClearBit(&epi->stateFlags, kOtherEndClosed);\t\t\t\n\t\t\terr = OTUnbind(epi->erf);\n    \t    TapAllInterestedSemaphores(epi);\n\t\t\tif (err != kOTNoError) {\n\t\t\t    makeEPBroken(epi,err);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//\n\t\t//\tT_GODATA:\n\t\t//\n\t\t//\tThis event is received when flow control is lifted.   We are under flow control\n\t\t//\twhenever OTSnd() returns a kOTFlowErr or accepted less bytes than we attempted\n\t\t//\tto send.  \n\t\t//\n\t\t//\tNote, it is also possible to get a T_GODATA without having invoke flow control.\n\t\t//\tBe safe and prepare for this. \n\t\t//\n\t\tcase T_GODATA:\n\t\t{\n            if (OTAtomicClearBit(&epi->stateFlags, kSendIsBlocked)) {\n \t           if (OTAtomicClearBit(&epi->stateFlags2, kTapSemaphoreWriteData))\n  \t              interpreterProxy->signalSemaphoreWithIndex(epi->writeSemaIndex);\n            };\n\t\t\treturn;\n\t\t}\n\n\t\t\n\t\t//\n\t\t//\tT_OPENCOMPLETE:\n\t\t//\n\t\t//\tThis event occurs when an OTAsyncOpenEndpoint() completes.   Note that this event,\n\t\t//\tjust like any other async call made from outside the notifier, can occur during\n\t\t//\tthe call to OTAsyncOpenEndpoint().  That is, in the main thread the program did\n\t\t//\tthe OTAsyncOpenEndpoint(), and the notifier is invoked before control is returned\n\t\t//\tto the line of code following the call to OTAsyncOpenEndpoint().   This is one\n\t\t//\tevent we need to keep track of even if we are shutting down the program since there\n\t\t//\tis no way to cancel outstanding OTAsyncOpenEndpoint() calls.\n\t\t//\n\t\tcase T_OPENCOMPLETE:\n\t\t{\n\t\t\tTOptMgmt \t\t\toptReq;\n\t\t\tTOption             opt;\n\n\t\t\tOTAtomicClearBit(&epi->stateFlags, kOpenInProgressBit);\n\t\t\tif (result == kOTNoError)\n\t\t\t\tepi->erf = (EndpointRef) cookie;\n\t\t\telse {\n\t\t\t\tmakeEPBrokenThenIdle(epi,result);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (gProgramState != kProgramRunning) return;\n\t\t\t\n\t\t\t\t\n\t\t\t//\n\t\t\t//\tSet to blocking mode so we don't have to deal with kEAGAIN errors.\n\t\t\t//\tAsync/blocking is the best mode to write an OpenTransport application in.\n\t\t\t//\n\t\t\terr = OTSetBlocking(epi->erf);\n\t\t\tif (err != kOTNoError) {\n\t\t\t    makeEPBrokenThenIdle(epi,err);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t//\n\t\t\t//\tSet to AckSends so OT doesn't slow down to copy data sent out.\n\t\t\t//\tHowever, this requires special care when closing endpoints, so don't use\n\t\t\t//\tAckSends unless you are prepared for this.   Never, ever, close an endpoint\n\t\t\t//\twhen a send has been done but the T_MEMORYRELEASED event hasn't been returned yet.\n\t\t\t//\n\t\t\terr = OTAckSends(epi->erf);\n\t\t\tif (err != kOTNoError) {\n\t\t\t    makeEPBrokenThenIdle(epi,err);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t//\n\t\t\t//\tOption Management\n\t\t\t//\n\t\t\t//\tTurn on ip_reuseaddr so we don't have port conflicts in general.\n\t\t\t//\tWe use local stack structures here since the memory for the \n\t\t\t//\toption request structure is free upon return.   If we were to request\n\t\t\t//\tthe option return value, we would have to use static memory for it.\n\t\t\t//\n\t\t\toptReq.flags\t\t\t= T_NEGOTIATE;\n\t\t\toptReq.opt.len\t\t\t= kOTFourByteOptionSize;\n\t\t\toptReq.opt.buf\t\t\t= (unsigned char *) &opt;\n\t\t\t\n\t\t\topt.len\t\t\t\t\t= sizeof(TOption);\n\t\t\topt.level\t\t\t\t= INET_IP;\n\t\t\topt.name\t\t\t\t= IP_REUSEADDR;\n\t\t\topt.status\t\t\t\t= 0;\n\t\t\topt.value[0]\t\t\t= 1;\n\t\t\t\n            if (epi->socketType == TCPSocketType) \n                OTAtomicSetBit(&epi->stateFlags3, kKeepAliveOptionNeeded);\n                \n\t\t\terr = OTOptionManagement(epi->erf, &optReq, NULL);\n\t\t\tif (err != kOTNoError) {\n\t\t\t    makeEPBrokenThenIdle(epi,err);\n\t\t\t}\n\t\t\t\n\t\t\t//\n\t\t\t//\tCode path resumes at T_OPTMGMTCOMPLETE\n\t\t\t//\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//\n\t\t//\tT_OPTMGMTCOMPLETE:\n\t\t//\n\t\t//\tAn OTOptionManagement() call has completed.  These are used on all\n\t\t//\tendpoints to set IP_REUSEADDR.   It is also used for all endpoints\n\t\t//\tother than the listener to set TCP_KEEPALIVE which helps recover\n\t\t//\tserver resources if the other side crashes or is unreachable.\n\t\t//\n\t\tcase T_OPTMGMTCOMPLETE:\n\t\t{\n\t\t\tTOptMgmt \t\t\toptReq;\n\n\t\t\tif (result != kOTNoError) {\n\t\t\t    makeEPBrokenThenIdle(epi,result);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n            if (OTAtomicClearBit(&epi->stateFlags3, kKeepAliveOptionNeeded)) {\n                \n                TKeepAliveOpt\t\topt;\n\t\t\t\t//\n\t\t\t\t//\tTurn on TCP_KEEPALIVE so we can recover from connections which have\n\t\t\t\t//\tgone away which we don't know about.  \n\t\t\t\t//\n\t\t\t\toptReq.flags\t\t\t= T_NEGOTIATE;\n\t\t\t\toptReq.opt.len\t\t\t= sizeof(TKeepAliveOpt);\n\t\t\t\toptReq.opt.buf\t\t\t= (unsigned char *) &opt;\n\t\t\t\t\n\t\t\t\topt.len\t\t\t\t\t= sizeof(TKeepAliveOpt);\n\t\t\t\topt.level\t\t\t\t= INET_TCP;\n\t\t\t\topt.name\t\t\t\t= TCP_KEEPALIVE;\n\t\t\t\topt.status\t\t\t\t= 0;\n\t\t\t\topt.tcpKeepAliveOn\t\t= 1;\n\t\t\t\topt.tcpKeepAliveTimer\t= kTCPKeepAliveInMinutes;\t\n\t\t\t\t\n\t\t\t\terr = OTOptionManagement(epi->erf, &optReq, NULL);\n\t\t\t\tif (err != kOTNoError) {\n    \t\t\t    makeEPBrokenThenIdle(epi,result);\n                }\n                return;\n            }\n\t\t\t\t\t\t\n            makeEPIdle(epi);  //This is where more EP enter the queue of available EPs.\n            \n\t\t\treturn;\t\t\t// now wait \n\t\t}\n\t\t//\n\t\t//\tT_ORDREL:\n\t\t//\n\t\t//\tThis event occurs when an orderly release has been received on the stream.\n\t\t//\n\t\tcase T_ORDREL:\n\t\t{\n\t\t\terr = OTRcvOrderlyDisconnect(epi->erf);\n\t\t\t\n\t\t\tif (err != kOTNoError) {\n\t\t\t\t//\n\t\t\t\t//\tIt is possible for several reasons for the T_ORDREL to have disappeared,\n\t\t\t\t//\tor be temporarily hidden, when we attempt the OTRcvOrderlyDisconnect().\n\t\t\t\t//\tThe best thing to do when this happens is pretend that the event never\n\t\t\t\t//\toccured.   We will get another notification of T_ORDREL if the event\n\t\t\t\t//\tbecomes unhidden later.  Any other form of error is unexpected and \n\t\t\t\t//\tis reported back so we can correct it.\n\t\t\t\t//\n\t\t\t\tif (err == kOTNoReleaseErr)\n\t\t\t\t\treturn;\n\t\t\t\t//Can get OTLookErr with T_DISCONNECT\n    \t\t   makeEPBroken(epi,err);\n\t\t\t}\t\n\n\t\t\tif (OTAtomicTestBit(&epi->stateFlags, kThisEndClosed)) {\n                \n                ///\n                //Both sides now have closed\n                //\n                \n                OTAtomicSetBit(&epi->stateFlags, kUnConnected);\t\t\t\n    \t        OTAtomicClearBit(&epi->stateFlags, kConnected);\n                OTAtomicClearBit(&epi->stateFlags, kThisEndClosed);\t\t\t\n                OTAtomicClearBit(&epi->stateFlags, kOtherEndClosed);\t\t\t\n\t\t\t\t\n\t\t\t\tepState = OTGetEndpointState(epi->erf);\n\t\t\t\tif (epState != T_IDLE) {\n            \t    TapAllInterestedSemaphores(epi);\n\t\t\t\t    return;\n\t\t\t\t}\n\n\t\t\t\terr = OTUnbind(epi->erf);\n        \t    TapAllInterestedSemaphores(epi);\n\t\t\t\tif (err != kOTNoError) {\n\t\t\t\t    makeEPBroken(epi,err);\n\t\t\t\t}\n\t\t\t\t\n    \t\t    return;\n            } else {\n    \t\t\tOTAtomicSetBit(&epi->stateFlags, kOtherEndClosed);\n\t\t\t}\n\t\t\t\n\t\t\t//\n\t\t\t//\tSometimes our data sends get stopped with a kOTLookErr\n\t\t\t//\tbecause of a T_ORDREL from the other side (which doesn't close\n\t\t\t//\tthe connection, it just means they are done sending data).\n\t\t\t//\tIf so, we still end up in the notifier with the T_ORDREL event,\n\t\t\t//\tbut we won't resume sending data unless we explictly check\n\t\t\t//\there whether or not we need to do so.\n\t\t\t//\n             //JMM Test this? \n\n            if (OTAtomicClearBit(&epi->stateFlags, kSendIsBlocked)) {\n  \t\t    \tif (OTAtomicClearBit(&epi->stateFlags2, kTapSemaphoreWriteData))\n                \tinterpreterProxy->signalSemaphoreWithIndex(epi->writeSemaIndex);\n            };\n\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//\n\t\t//\tT_UNBINDCOMPLETE:\n\t\t//\n\t\t//\tThis event occurs on completion of an OTUnbind().\n\t\t//\tThe endpoint is ready for reuse on a new inbound connection.\n\t\t//\tNote that the OTLIFO structure has atomic queue and dequeue,\n\t\t//\twhich can be helpful for synchronization protection.  \n\t\t//\n\t\tcase T_UNBINDCOMPLETE:\n\t\t{\n\t\t\tif (result != kOTNoError) {\n\t\t\t\t//\n\t\t\t\t//\tUnbind errors can occur as a result of a bug in OT 1.1.1 and earlier\n\t\t\t\t//\tversions.   The best recovery is to put the endpoint in the broken\n\t\t\t\t//\tlist for recycling with a clean, new endpoint.\n\t\t\t\t//  Since we only support 1.1.2 we don't expect to run this code.\n\t\t\t\t//\n\t\t\t    makeEPBroken(epi,result);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t\n\t\t//\n\t\t//\tT_DISCONNECTCOMPLETE:\n\t\t//\n\t\t//\tThis event occurs on completion of an OTSndDisconnect().\n\t\t//\tCalled when we abort a socket\n\t\t//\n\t\tcase T_DISCONNECTCOMPLETE: {\n\t\t\terr = OTUnbind(epi->erf);\n\t\t\tif (err != kOTNoError) {\n\t\t\t    makeEPBroken(epi,err);\n\t\t\t}\n\n\t\t\tpurgeReadBuffers(epi);\t\t\n            TapAllInterestedSemaphores(epi); \n\t\t\tif (OTAtomicTestBit(&epi->stateFlags2, kMakeEPIdle)) { //Make EP idle if marked as such only happens via destroy. \n\t\t\t    makeEPIdle(epi);\n\t\t\t}\n\t\t\tepi->stateFlags = 0;\n\t\t\tepi->stateFlags2 = 0;\n\t\t\tepi->stateFlags3 = 0;\n            SetEPLastError(epi,result);\n        \tOTAtomicSetBit(&epi->stateFlags, kUnConnected);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//\n\t\t//Sleep sleep sleep all end points get trashed.\n\t\t//\n\t\tcase kOTProviderWillClose: // reconfig stack disconnect and close\n\t\t{\n\t\t    makeEPBroken(epi,-12345678);\n            if(OTAtomicTestBit(&epi->stateFlags, kOpenInProgressBit)) return;\n            OTSetSynchronous(epi->erf);\t\t\t        // set endpoint to sync\t\n        \tif ( OTAtomicSetBit(&epi->stateFlags2, kFlushDisconnectInProgressBit) == 0 )\n        \t\terr = OTIoctl(epi->erf, I_FLUSH, (void *)FLUSHRW);\n            OTSndDisconnect(epi->erf, NULL);\n            OTUnbind(epi->erf);\n            OTCloseProvider(epi->erf);\n            OTAtomicSetBit(&epi->stateFlags, kUnConnected);\t\t\t\n\t        OTAtomicClearBit(&epi->stateFlags, kConnected);\n            OTAtomicClearBit(&epi->stateFlags, kThisEndClosed);\t\t\t\n            OTAtomicClearBit(&epi->stateFlags, kOtherEndClosed);\t\t\t\n            OTAtomicSetBit(&epi->stateFlags3, kSleepKilledMe);\n            TapAllInterestedSemaphores(epi); \n\t\t    return;\n\t\t}\n\n\t\tcase kOTProviderIsClosed: //Sleep lurks\n\t\t{\n\t\t    makeEPBroken(epi,-12345678);\n            OTSetSynchronous(epi->erf);\t\t\t        // set endpoint to sync\t\n        \tif ( OTAtomicSetBit(&epi->stateFlags2, kFlushDisconnectInProgressBit) == 0 )\n        \t\terr = OTIoctl(epi->erf, I_FLUSH, (void *)FLUSHRW);\n            OTCloseProvider(epi->erf);\n            OTAtomicSetBit(&epi->stateFlags, kUnConnected);\t\t\t\n\t        OTAtomicClearBit(&epi->stateFlags, kConnected);\n            OTAtomicClearBit(&epi->stateFlags, kThisEndClosed);\t\t\t\n            OTAtomicClearBit(&epi->stateFlags, kOtherEndClosed);\t\t\t\n            OTAtomicSetBit(&epi->stateFlags3, kSleepKilledMe);\n            TapAllInterestedSemaphores(epi); \n\t\t\treturn;\n\t\t}\n\n\t\t//\n\t\t//\tdefault:\n\t\t//\n\t\t//\tThere are events which we don't handle, but we don't expect to see\n\t\t//\tany of them.   When running in debugging mode while developing a program,\n\t\t//\twe exit with an informational alert.   Later, in the production version\n\t\t//\tof the program, we ignore the event and try to keep running.\n\t\t//\n\t\tdefault:\n\t\t{\n\t\t\treturn;\n\t\t}\n\t}\n}\n\n\n//\n//\tNotifier for listen socket:\n//\n\n\nstatic pascal void NotifierSocketListener(void* context, OTEventCode event, OTResult result, void* cookie)\n{\n\tEPInfo* epi = (EPInfo*) context;\n\n\tif (gProgramState != kProgramRunning)\n\t{\n\t\tif ((event != T_OPENCOMPLETE) && (event != T_MEMORYRELEASED))\n\t\t{\n\t\t\treturn;\n\t\t}\n\t}\n\tJMMLogMessageAndNumber(\"\\p Listener Event  \",event);\n\tJMMLogMessageAndNumber(\"\\p Listener Result \",result);\n\tJMMLogMessageAndNumber(\"\\p Listener Id \",epi->semaIndex);\n\t\n\tswitch (event)\n\t{\n\t\t//\n\t\t//\tT_BINDCOMPLETE:\n\t\t//\n\t\t//\tWe only bind the listener endpoint, and bind failure is a fatal error.  \n\t\t//\tAcceptor endpoints are bound within the OTAccept() call when they get a connection.\n\t\t//\n\t\tcase T_BINDCOMPLETE:\n\t\t{\n            SetEPLastError(epi,result);\n\t\t\tOTAtomicClearBit(&epi->stateFlags3, kWaitingForBind);\n\t\t\tif (result != kOTNoError)\n   \t\t\t\tmakeEPUnconnected(epi);\n      \n\t\t\treturn;\n\t\t}\n\t\t\t\t\n\t\t//\n\t\t//\tT_LISTEN:\n\t\t//\n\t\tcase T_LISTEN:\n\t\t{\n            SetEPLastError(epi,result);\n   \t\t\tmakeEPConnected(epi);\n\t\t\treturn;\n\t\t}\n\t\t//\n\t\t//\tT_ACCEPTCOMPLETE:\n\t\t//\n\t\t//\tThis event is received by the listener endpoint only.   \n\t\t//\tThe acceptor endpoint will get a T_PASSCON event instead.\n\t\t//\n\t\tcase T_ACCEPTCOMPLETE:\n\t\t{\n            SetEPLastError(epi,result);\n\t\t\treturn;\n\t\t}\n\n\t\t\n\t\t//\n\t\t//\tdefault:\n\t\t//\n\t\t//\tThere are events which we don't handle, pass them onwards\n\t\t//\n\t\tdefault:\n\t\t{\n            NotifierSocket(context,  event,  result, cookie);\n\t\t\treturn;\n\t\t}\n\t}\n}\n\n\n//\n//\tNotifier for UDP listen socket:\n//\n\n\nstatic pascal void NotifierSocketUDP(void* context, OTEventCode event, OTResult result, void* cookie)\n{\n\tEPInfo* epi = (EPInfo*) context;\n\tOSStatus err;\n\n\tJMMLogMessageAndNumber(\"\\p DNS Event  \",event);\n\tJMMLogMessageAndNumber(\"\\p DNS Result \",result);\n\tJMMLogMessageAndNumber(\"\\p Id \",epi->semaIndex);\n\n\tif (gProgramState != kProgramRunning) {\n\t\tif ((event != T_OPENCOMPLETE) && (event != T_MEMORYRELEASED)) {\n\t\t\treturn;\n\t\t}\n\t}\n\t\t\n\tswitch (event)\n\t{\n\t\t//Some sort of UDP send error, too late to tell anyone?\n\t\t//\n\t\tcase T_UDERR: {  \n    \t\tTUDErr \t\tuderr;\n\t\t    InetAddress errorAddress;\n            \n            uderr.addr.maxlen   = sizeof(InetAddress);\n            uderr.addr.len      = sizeof(InetAddress);\n            uderr.addr.buf      = (UInt8 *) &errorAddress;\n            uderr.opt.maxlen    = 0;\n            uderr.opt.len       = 0;\n            uderr.opt.buf       = NULL;\n   \n\t\t    err =  OTRcvUDErr(epi->erf, &uderr);\n            if (err != kOTNoError)   \n\t\t\t\tmakeEPBroken(epi,err);\n\t\t\t\n            SetEPLastError(epi,uderr.error);\n\t\t    return;\n\t\t}\n\t\t\n\t\t//\n\t\t//\tT_DATA:\n\t\t//\n\t\t//  Got milk?\n\t\t//\n\t\t\n\t\tcase T_DATA: {\n\t\t\tReadData(epi,NULL,0);\n\t\t    return;\n\t\t}\n\t\t\n\t\t//\n\t\t//\tT_BINDCOMPLETE:\n\t\t//\n\t\t//\tThis event is returned when an endpoint has been bound.\n\t\t//\tNo errors are expected.   \n\t\t//\n\t\t\n\t\tcase T_BINDCOMPLETE:\n\t\t{\n            SetEPLastError(epi,result);\n\t\t\tOTAtomicClearBit(&epi->stateFlags3, kWaitingForBind);\n\t\t\tif (result != kOTNoError) {\n   \t\t\t\tmakeEPUnconnected(epi);\n\t\t\t\treturn;\n\t\t\t}\n   \t\t\tmakeEPConnected(epi);\n\t\t\treturn;\n\t\t}\n\n\t\t//\n\t\t//\tdefault:\n\t\t//\n\t\t//\tThere are events which we don't handle, pass them onwards to the regular notifier\n\t\t//\n\t\t\n\t\tdefault:\n\t\t{\n            NotifierSocket(context,  event,  result, cookie);\n\t\t\treturn;\n\t\t}\n    }\n}\n\n\nshort\t        gJMMFile=0;\nOTTimeStamp \tJMMStartTimeStamp;\nOTLIFO\t\t\tJMMLogBufferLIFO;    \t//  Buffers that are free to read into\nOTLIFO*\t\t\tJMMLogBufferBuffers\t\t\t= &JMMLogBufferLIFO;\n\n \nvoid JMMWriteLog() {\n\tOSErr\t\t\terror;\n\tOTLink* \t    list = OTReverseList(OTLIFOStealList(JMMLogBufferBuffers));\n\tOTLink*\t\t    link;\n\tReadBuffer      *aBuffer;\n\tlong           dummySize;\n\tchar\t\t\tCH=0x0D;\n\n\tif (true) return;\n\t\n\terror = HCreate(0,0,\"\\pJMMFOOBAR.txt\",'TEXT','TEXT');\n\terror = HOpenDF(0,0,\"\\pJMMFOOBAR.txt\",fsRdWrPerm,&gJMMFile);\n\terror = SetFPos(gJMMFile,fsFromLEOF,0);\n\n\twhile ( (link = list) != NULL ) {\n\t\tlist = link->fNext;\n    \taBuffer = OTGetLinkObject(link, ReadBuffer, fNext);\n    \terror = FSWrite(gJMMFile,(long *)&aBuffer->readBufferSize,aBuffer->readBufferData);\n    \tdummySize = 1;\n    \terror = FSWrite(gJMMFile,&dummySize,&CH);\n\t}\n\terror = FSClose(gJMMFile);\n\t\n\twhile ( (link = list) != NULL ) {\n\t\tlist = link->fNext;\n    \taBuffer = OTGetLinkObject(link, ReadBuffer, fNext);\n        OTFreeMem(aBuffer->readBufferData);\n        OTFreeMem(aBuffer); \n\t}\n\t\n}\n\nvoid JMMLogMessage(Str255 input) {\n\tStr255 \t\t\ttimeString;\n\tlong \t\t\ttimeStringLength,inputLength;\n\tUInt32\t\t\tduration;\n\tReadBuffer      *readBufferObject;\n\t\n\tif (true) return;\n\t\n\tif (gJMMFile == 0) {\n\t\tgJMMFile = 1;\n\t\tOTGetTimeStamp(&JMMStartTimeStamp);\n\t\tJMMLogBufferBuffers->fHead \t\t= NULL;\n\n\t}\n\t\n\tduration = OTElapsedMilliseconds(&JMMStartTimeStamp);\n\tNumToString(duration,timeString);\n\ttimeStringLength = (unsigned char) timeString[0];\n\tinputLength = (unsigned char) input[0];\n\t\n#if TARGET_API_MAC_CARBON\n\treadBufferObject = OTAllocMemInContext(sizeof(ReadBuffer), gClientContext);\n#else\n\treadBufferObject = OTAllocMem(sizeof(ReadBuffer));\n#endif\n\tif (readBufferObject == NULL) return;\n\tOTMemzero(readBufferObject,sizeof(ReadBuffer));\n\t\n#if TARGET_API_MAC_CARBON\n\treadBufferObject->readBufferData = OTAllocMemInContext(60, gClientContext);\n#else\n\treadBufferObject->readBufferData = OTAllocMem(60);\n#endif\n\tif (readBufferObject->readBufferData == NULL) {\n\t    OTFreeMem(readBufferObject);\n\t    return;\n\t}\n\t\n\tOTMemcpy(readBufferObject->readBufferData,timeString+1,timeStringLength);\n\tOTMemcpy(readBufferObject->readBufferData+timeStringLength,input+1,inputLength);\n\treadBufferObject->readBufferSize= timeStringLength+inputLength;\n    OTLIFOEnqueue(JMMLogBufferBuffers, &readBufferObject->fNext);\n\t\n}\n\nvoid JMMLogMessageAndNumber(Str255 msg,long number) {\n\tStr255 buffer,numberString;\n\tlong msgLength,numberLength;\n\t\n\tif (true) return;\n\t\n\tNumToString(number,numberString);\n\tnumberLength = (unsigned char) numberString[0];\n\tmsgLength = (unsigned char) msg[0];\n\t\n\tOTMemcpy(buffer+1,msg+1,msgLength);\n\tOTMemcpy(buffer+1+msgLength,numberString+1,numberLength);\n\tbuffer[0] = (unsigned char) msgLength+numberLength;\n\tJMMLogMessage(buffer);\n\n}\n\n\n/*\nThe Open Transport TCP/IP software modules provide a RawIP interface to the IP protocol\n\nhostname of '' lookup fails This is OK? Same on linux and old mac version\n\nJMM look at tlook page, not sure if we have completely understood it\n\nJMM is it legal to send a zero byte buffer need case for this?\n\n/* According to the XTI spec (\"Section 4.6 Events and TLOOK Error indication\"), \nthe SndOrderlyDisconnect and RcvOrderlyDisconnect calls can fail because of a pending T_DISCONNECT event. \nThis is XTI trying to tell you that the a connection on that endpoint broke. This can happen in this asynchronous \nwacky world of networks and your program will have to call a RcvDisconnect to acknowledge that your endpoint dropped.\n\nYou might want to check out the OTI spec, which, although it is not always written in the most lucid fashion, \ndoes contain valuable information for those involved in OpenTransport programming.\n\nFurther Information:\nTitle: X/OPEN TRANSPORT INTERFACE (XTI) VER 2 [ 1.0 ed]\nAuthor: X/OPEN \nISBN #: 0133534596\n\nA Prior to Open Transport 1.3, there was no supported way of calling Open Transport from CFM-68K code. \nWith the introduction of Open Transport 1.3, it is now possible to call the Open Transport client \ninterface from CFM-68K code. The Open Transport 1.3 SDK includes stub libraries and a document, \n\"Open Tpt CFM68K Dev. Note\", which explains Open Transport's support for CFM-68K. which is supporte for \nsyste 7.x but you can't install! No standalone installer exists. Coping the OT files kinda works\n*/\n#else\n/* Adjustments for pluginized VM\n *\n * Note: The Mac support files have not yet been fully converted to\n * pluginization. For the time being, it is assumed that they are linked\n * with the VM. When conversion is complete, they will no longer import\n * \"sq.h\" and they will access all VM functions and variables through\n * the interpreterProxy mechanism.\n */\n\n#include \"sq.h\"\n#include \"SocketPlugin.h\"\n\n/* initialize/shutdown */\nint socketInit() { return true; }\nint socketShutdown() { sqNetworkShutdown(); }\n\n/* End of adjustments for pluginized VM */\n\n#include <Events.h>\n#include <Devices.h>\n#include <Processes.h>\n#include <Traps.h>\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n#include \"MacTCP.h\"\n#include \"AddressXLation.h\"\n\n/*** Socket Type Constants ***/\n#define TCPSocketType \t\t0\n#define UDPSocketType \t\t1\n#define ListenerQueueType\t2\n\n/*** Resolver Status Constants ***/\n#define RESOLVER_UNINITIALIZED\t0\n#define RESOLVER_SUCCESS\t\t1\n#define RESOLVER_BUSY\t\t\t2\n#define RESOLVER_ERROR\t\t\t3\n\n/* Resolver State */\ntypedef struct {\n\tint\t\t\t\tsemaIndex;\n\tint\t\t\t\tstatus;\n\tint\t\t\t\terror;\n\tint\t\t\t\tlocalAddress;\n\tint\t\t\t\tremoteAddress;\n\tstruct hostInfo\thostInfo;\n} ResolverStatusRec, *ResolverStatusPtr;\n\n/*** TCP Socket Status Constants ***/\n#define Unconnected\t\t\t\t0\n#define WaitingForConnection\t1\n#define Connected\t\t\t\t2\n#define OtherEndClosed\t\t\t3\n#define ThisEndClosed\t\t\t4\n\n/*** TCP Socket State ***/\n#define SendBufferSize\t(8 * 1024)\n#define RecvBufferSize\t(8 * 1024)\ntypedef struct {\n\tTCPiopb\t\ttcpPB;\t\t\t\t/* TCP parameter block for open/send (must be first) */\n\tTCPiopb\t\tclosePB;\t\t\t/* TCP parameter block for close */\n\tStreamPtr\ttcpStream;\t\t\t/* TCP stream */\n\tvoid *\t\tnext;\t\t\t\t/* next socket in a linked list of open sockets */\n\tint\t\t\tsemaIndex;\n\tint\t\t\tconnectStatus;\n\tvoid *\t\tnextInListenerQueue; /* next socket in a ListenderQueue waiting socket list */\n\tint\t\t\tdataAvailable;\t\t/* suggests that data may be available */\n\tint\t\t\tsendInProgress;\n\tint\t\t\tlastError;\n//xxx\tchar\t\tsendBuf[SendBufferSize];\n\tchar\t\trcvBuf[1];\t\t\t/* must be last; length set when allocated */\n} TCPSockRec, *TCPSockPtr;\n\ntypedef struct {\n\tTCPiopb\t\ttcpPB;\n\tTCPSockPtr\tmySocket;\n\tstruct wdsEntry wds[2];\n\tchar\t\tdata[SendBufferSize];\n} TCPSendBuf, *TCPSendBufPtr;\n\n#define SendBufCount 8\nTCPSendBuf sendBufPool[SendBufCount];\nint nextSendBuf = 0;\n\ntypedef struct {\n\tint\t\t\tlocalAddress;\n\tint\t\t\tlocalPort;\n\tint\t\t\tclosed;\t\t\t\t/* set true by close or abort */\n\tint\t\t\tsemaIndex;\t\t\t/* semaphore of the server socket */\n\tint\t\t\tdesiredQueueLength;\n\tTCPSockPtr\twaitingSockets;\n} ListenerQueueRec, *ListenerQueuePtr;\n\n/*** UDP Socket Status Constants ***/\n#define UnknowRemoteAddrAndPort\t0\n#define Ready\t\t\t\t\t1\n\n/*** UDP Socket State ***/\ntypedef struct {\n\tvoid *\t\tnext;\t\t\t\t/* next socket in a linked list of open sockets */\n\tint\t\t\tremoteAddress;\n\tint\t\t\tremotePort;\n\tint\t\t\tsemaIndex;\n\tint\t\t\tconnectStatus;\n\tint\t\t\tdataAvailable;\t\t/* suggests that data may be available */\n\tint\t\t\tsendInProgress;\n\tint\t\t\tlastError;\n\tchar\t\tsendBuf[SendBufferSize];\n\tchar\t\trcvBuf[1];\t\t\t/* must be last; length set when allocated */\n} UDPSockRec, *UDPSockPtr;\n\n/*** Variables ***/\nextern struct VirtualMachine *interpreterProxy;\n\nshort\t\t\t\tmacTCPRefNum = 0;\nint\t\t\t\t\tmtuSize = 1024;\nTCPSockPtr \t\t\topenTCPSockets = nil;\nUDPSockPtr\t\t\topenUDPSockets = nil;\nResolverStatusRec \tresolver = {0, 0, 0, 0, 0, 0, 0};\n\nUniversalProcPtr\tmyExitHandlerProc = nil;\nUniversalProcPtr\toldExitHandlerProc = nil;\nResultUPP\t\t\tresolverDoneProc = nil;\nTCPIOCompletionUPP\ttcpCloseDoneProc = nil;\nTCPIOCompletionUPP\ttcpConnectDoneProc = nil;\nTCPNotifyUPP\t\ttcpNotifyProc = nil;\nTCPIOCompletionUPP\ttcpSendDoneProc = nil;\nUDPNotifyUPP\t\tudpNotifyProc = nil;\nUDPIOCompletionUPP\tudpSendDoneProc = nil;\n\nint\t\t\t\t\tthisNetSession = 0;\n\n/*** Private TCP Socket Functions ***/\nvoid *\t\tTCPSockCreate(void);\nvoid\t\tTCPSockDestroy(TCPSockPtr s);\nvoid\t\tTCPSockRemoveFromOpenList(TCPSockPtr s);\n\nint\t\t\tTCPSockLocalAddress(TCPSockPtr s);\nint\t\t\tTCPSockLocalPort(TCPSockPtr s);\nint\t\t\tTCPSockRemoteAddress(TCPSockPtr s);\nint\t\t\tTCPSockRemotePort(TCPSockPtr s);\n\nvoid\t\tTCPSockConnectTo(TCPSockPtr s, int addr, int port);\nvoid\t\tTCPSockListenOn(TCPSockPtr s, int port);\nvoid\t\tTCPSockAbortConnection(TCPSockPtr s);\nvoid\t\tTCPSockCloseConnection(TCPSockPtr s);\n\nint\t\t\tTCPSockDataAvailable(TCPSockPtr s);\nint\t\t\tTCPSockRecvData(TCPSockPtr s, char *buf, int bufSize);\nint\t\t\tTCPSockSendData(TCPSockPtr s, char *buf, int bufSize);\n\n/*** Private ListenerQueue Socket Functions ***/\nvoid\t\tFillListenerQueue(ListenerQueuePtr listener);\nTCPSockPtr\tFindConnectedSocket(ListenerQueuePtr listener);\nTCPSockPtr\tFindZombieSocket(ListenerQueuePtr listener);\nvoid\t\tRemoveSocketFromListenerQueue(TCPSockPtr sockToRemove, ListenerQueuePtr listener);\nListenerQueuePtr ListenerQueueCreate(TCPSockPtr tcpSocket, int port, int backlogSize);\nvoid\t\tListenerQueueDestroy(ListenerQueuePtr listener);\nint\t\t\tListenerQueueStatus(ListenerQueuePtr listener);\n\n/*** Private UDP Socket Functions ***/\nvoid *\t\tUDPSockCreate(void);\nvoid\t\tUDPSockDestroy(UDPSockPtr s);\nvoid\t\tUDPSockRemoveFromOpenList(UDPSockPtr s);\n\nint\t\t\tUDPSockLocalAddress(UDPSockPtr s);\nint\t\t\tUDPSockLocalPort(UDPSockPtr s);\nint\t\t\tUDPSockRemoteAddress(UDPSockPtr s);\nint\t\t\tUDPSockRemotePort(UDPSockPtr s);\n\nvoid\t\tUDPSockConnectTo(UDPSockPtr s, int addr, int port);\nvoid\t\tUDPSockListenOn(UDPSockPtr s, int port);\n\nint\t\t\tUDPSockRecvData(UDPSockPtr s, char *buf, int bufSize);\nint\t\t\tUDPSockSendData(UDPSockPtr s, char *buf, int bufSize);\n\n/*** Other Private Functions ***/\nvoid\t\tDestroyAllOpenSockets(void);\nvoid\t\tInitTCPCmd(int cmd, StreamPtr tcpStream, TCPiopb *paramBlkPtr);\nvoid\t\tInstallExitHandler(void);\nvoid\t\tMyExitHandler(void);\nint\t\t\tPortNumberValid(int port);\npascal void\tResolverCompletionRoutine(struct hostInfo *hostInfoPtr, char *userDataPtr);\nint\t\t\tResolverInitialize(int resolverSemaIndex);\nvoid\t\tResolverTerminate(void);\nint\t\t\tSocketValid(SocketPtr s);\nvoid\t\tTCPCloseCompletionRoutine(struct TCPiopb *s);\nvoid\t\tTCPConnectCompletionRoutine(struct TCPiopb *s);\npascal void\tTCPNotificationRoutine(\n\tStreamPtr s, unsigned short eventCode, Ptr userDataPtr,\n\tunsigned short terminReason, struct ICMPReport *icmpMsg);\nvoid\t\tTCPSendCompletionRoutine(struct TCPiopb *s);\n\n\n/*** Network Functions ***/\nvoid sqSocketCreateNetTypeSocketTypeRecvBytesSendBytesSemaIDReadSemaIDWriteSemaID(\n  SocketPtr s, int netType, int socketType,\n  int recvBufSize, int sendBufSize, int semaIndex, int readSemaIndex, int writeSemaIndex) {\n  interpreterProxy->success(false);\n}\n\nint sqSockettoHostportSendDataBufCount(SocketPtr s, int address, int port, int buf, int bufSize) {\n  interpreterProxy->success(false);\n}\n\nint sqSocketGetOptionsoptionNameStartoptionNameSizereturnedValue(SocketPtr s,int optionNameT, int optionNameSize, int *result)\t{\n  interpreterProxy->success(false);\n}\n\nvoid\tsqSocketAcceptFromRecvBytesSendBytesSemaIDReadSemaIDWriteSemaID(\n\t\t\tSocketPtr s, SocketPtr serverSocket,\n\t\t\tint recvBufSize, int sendBufSize, int semaIndex, int readSemaIndex, int writeSemaIndex) {\n  interpreterProxy->success(false);\n}\n\nint sqSocketReceiveUDPDataBufCountaddressportmoreFlag(SocketPtr s, int buf, int bufSize,  int *address,  int *port, int *moreFlag) {\n  interpreterProxy->success(false);\n}\n\nint sqSocketSetOptionsoptionNameStartoptionNameSizeoptionValueStartoptionValueSizereturnedValue(SocketPtr s,int optionNameT, int optionNameSize, int optionValueT, int optionValueSize, int *result)\t{\n  interpreterProxy->success(false);\n}\n\nint sqNetworkInit(int resolverSemaIndex) {\n\t/* initialize the network and return 0 if successful */\n\tint localAddr;\n\tUDPiopb paramBlock;\n\tOSErr err = noErr;\n\n\tif (thisNetSession != 0) return 0;  /* noop if network is already initialized */\n\n\t/* open network driver */\n\tmacTCPRefNum = 0;\n\terr = OpenDriver(\"\\p.IPP\", &macTCPRefNum);\n\tif (err != noErr) {\n\t\treturn -1;\n\t}\n\n\t/* open resolver */\n\terr = ResolverInitialize(resolverSemaIndex);\n\tif (err != noErr) {\n\t\tResolverTerminate();\n\t\treturn -1;\n\t}\n\n\t/* get local address */\n\tlocalAddr = sqResolverLocalAddress();\n\tif (sqResolverError() != noErr) {\n\t\tResolverTerminate();\n\t\treturn -1;\n\t}\n\n\t/* compute MTU (maximum transfer unit) size */\n\tmemset(&paramBlock, 0, sizeof(paramBlock));\n\tparamBlock.csCode = UDPMaxMTUSize;\n\tparamBlock.csParam.mtu.remoteHost = localAddr;\n\tparamBlock.ioCRefNum = macTCPRefNum;\n\terr = PBControlSync((ParmBlkPtr) &paramBlock);\n\tif (err == noErr) {\n\t\tmtuSize = paramBlock.csParam.mtu.mtuSize;\n\t} else {\n\t\tmtuSize = 1024;  /* guess */\n\t\tResolverTerminate();\n\t\treturn -1;\n\t}\n\n\tresolverDoneProc\t= NewResultProc(ResolverCompletionRoutine);\n\ttcpCloseDoneProc \t= NewTCPIOCompletionProc(TCPCloseCompletionRoutine);\n\ttcpConnectDoneProc\t= NewTCPIOCompletionProc(TCPConnectCompletionRoutine);\n\ttcpNotifyProc\t\t= NewTCPNotifyProc(TCPNotificationRoutine);\n\ttcpSendDoneProc\t\t= NewTCPIOCompletionProc(TCPSendCompletionRoutine);\n\n\tInstallExitHandler();\n\n\t/* Success! Create a session ID that is unlikely to be\n\t   repeated. Zero is never used for a valid session number.\n\t*/\n\tthisNetSession = clock() + time(NULL);\n\tif (thisNetSession == 0) thisNetSession = 1;  /* don't use 0 */\n\treturn 0;\n}\n\nvoid sqNetworkShutdown(void) {\n\t/* shut down the network */\n\n\tif (thisNetSession == 0) return;  /* noop if network is already shut down */\n\tSetToolTrapAddress(oldExitHandlerProc, _ExitToShell);\n\tResolverTerminate();\n\tDestroyAllOpenSockets();\n\tthisNetSession = 0;\n}\n\n/*** Squeak Generic Socket Functions ***/\n\nvoid sqSocketAbortConnection(SocketPtr s) {\n\tif (!SocketValid(s)) return;\n\tif (s->socketType == TCPSocketType) {\n\t\tTCPSockAbortConnection((TCPSockPtr) s->privateSocketPtr);\n\t\treturn;\n\t}\n\tif (s->socketType == ListenerQueueType) {\n\t\t((ListenerQueuePtr) s->privateSocketPtr)->closed = true; /* set closed flag */\n\t\treturn;\n\t}\n\tsuccess(false);\n}\n\nvoid sqSocketCloseConnection(SocketPtr s) {\n\tif (!SocketValid(s)) return;\n\tif (s->socketType == TCPSocketType) {\n\t\tTCPSockCloseConnection((TCPSockPtr) s->privateSocketPtr);\n\t\treturn;\n\t}\n\tif (s->socketType == ListenerQueueType) {\n\t\t((ListenerQueuePtr) s->privateSocketPtr)->closed = true; /* set closed flag */\n\t\treturn;\n\t}\n\tsuccess(false);\n}\n\nint sqSocketConnectionStatus(SocketPtr s) {\n\tif (!SocketValid(s)) return -1;\n\tif (s->socketType == TCPSocketType) {\n\t\treturn ((TCPSockPtr) s->privateSocketPtr)->connectStatus;\n\t}\n\tif (s->socketType == UDPSocketType) {\n\t\treturn ((UDPSockPtr) s->privateSocketPtr)->connectStatus;\n\t}\n\tif (s->socketType == ListenerQueueType) {\n\t\treturn ListenerQueueStatus((ListenerQueuePtr) s->privateSocketPtr);\n\t}\n\tsuccess(false);\n}\n\nvoid sqSocketConnectToPort(SocketPtr s, int addr, int port) {\n\tif (!SocketValid(s)) return;\n\tif (!PortNumberValid(port)) return;\n\tif (s->socketType == TCPSocketType) {\n\t\tTCPSockConnectTo((TCPSockPtr) s->privateSocketPtr, addr, port);\n\t\treturn;\n\t}\n\tif (s->socketType == UDPSocketType) {\n\t\tUDPSockConnectTo((UDPSockPtr) s->privateSocketPtr, addr, port);\n\t\treturn;\n\t}\n\tsuccess(false);\n}\n\nvoid sqSocketCreateNetTypeSocketTypeRecvBytesSendBytesSemaID(\n\t\t\tSocketPtr s, int netType, int socketType,\n\t\t\tint recvBufSize, int sendBufSize, int semaIndex) {\n\tTCPSockPtr tcpSock = nil;\n\tUDPSockPtr udpSock = nil;\n\n\t/* reference args to suppress compiler warnings about unused variables */\n\ts; netType; recvBufSize; sendBufSize;\n\n\ts->sessionID = 0;\n\tif (socketType == TCPSocketType) {\n\t\ttcpSock = TCPSockCreate();\n\t\tif (tcpSock == nil) {\n\t\t\tsuccess(false);\n\t\t} else {\n\t\t\ttcpSock->semaIndex = semaIndex;\n\t\t\ttcpSock->next = openTCPSockets;\n\t\t\topenTCPSockets = tcpSock;\n\t\t\ts->sessionID = thisNetSession;\n\t\t\ts->socketType = TCPSocketType;\n\t\t\ts->privateSocketPtr = tcpSock;\n\t\t}\n\t\treturn;\n\t}\n\tif (s->socketType == UDPSocketType) {\n\t\tudpSock = UDPSockCreate();\n\t\tif (udpSock == nil) {\n\t\t\tsuccess(false);\n\t\t} else {\n\t\t\tudpSock->semaIndex = semaIndex;\n\t\t\tudpSock->next = openUDPSockets;\n\t\t\topenUDPSockets = udpSock;\n\t\t\ts->sessionID = thisNetSession;\n\t\t\ts->socketType = UDPSocketType;\n\t\t\ts->privateSocketPtr = udpSock;\n\t\t}\n\t\treturn;\n\t}\n\tsuccess(false);\n}\n\nvoid sqSocketDestroy(SocketPtr s) {\n\tif (!SocketValid(s)) return;\n\tif (s->socketType == TCPSocketType) {\n\t\tTCPSockDestroy((TCPSockPtr) s->privateSocketPtr);\n\t}\n\tif (s->socketType == UDPSocketType) {\n\t\tUDPSockDestroy((UDPSockPtr) s->privateSocketPtr);\n\t}\n\tif (s->socketType == ListenerQueueType) {\n\t\tListenerQueueDestroy((ListenerQueuePtr) s->privateSocketPtr);\n\t}\n\ts->sessionID = 0;\n\ts->socketType = -1;\n\ts->privateSocketPtr = nil;\n}\n\nint sqSocketError(SocketPtr s) {\n\tif (!SocketValid(s)) return -1;\n\tif (s->socketType == TCPSocketType) {\n\t\treturn ((TCPSockPtr) s->privateSocketPtr)->lastError;\n\t}\n\tif (s->socketType == UDPSocketType) {\n\t\treturn ((UDPSockPtr) s->privateSocketPtr)->lastError;\n\t}\n\tif (s->socketType == ListenerQueueType) {\n\t\treturn 0;  /* ListenerQueue's themselves never get an error */\n\t}\n}\n\nvoid sqSocketListenOnPort(SocketPtr s, int port) {\n\tif (!SocketValid(s)) return;\n\tif (!PortNumberValid(port)) return;\n\tif (s->socketType == TCPSocketType) {\n\t\tTCPSockListenOn((TCPSockPtr) s->privateSocketPtr, port);\n\t\treturn;\n\t}\n\tif (s->socketType == UDPSocketType) {\n\t\tUDPSockListenOn((UDPSockPtr) s->privateSocketPtr, port);\n\t\treturn;\n\t}\n\tsuccess(false);\n}\n\nint sqSocketLocalAddress(SocketPtr s) {\n\tif (!SocketValid(s)) return -1;\n\tif (s->socketType == TCPSocketType) {\n\t\treturn TCPSockLocalAddress((TCPSockPtr) s->privateSocketPtr);\n\t}\n\tif (s->socketType == UDPSocketType) {\n\t\treturn UDPSockLocalAddress((UDPSockPtr) s->privateSocketPtr);\n\t}\n\tif (s->socketType == ListenerQueueType) {\n\t\treturn ((ListenerQueuePtr) s->privateSocketPtr)->localAddress;\n\t}\n\tsuccess(false);\n}\n\nint sqSocketLocalPort(SocketPtr s) {\n\tif (!SocketValid(s)) return -1;\n\tif (s->socketType == TCPSocketType) {\n\t\treturn TCPSockLocalPort((TCPSockPtr) s->privateSocketPtr);\n\t}\n\tif (s->socketType == UDPSocketType) {\n\t\treturn UDPSockLocalPort((UDPSockPtr) s->privateSocketPtr);\n\t}\n\tif (s->socketType == ListenerQueueType) {\n\t\treturn ((ListenerQueuePtr) s->privateSocketPtr)->localPort;\n\t}\n\tsuccess(false);\n}\n\nint sqSocketReceiveDataAvailable(SocketPtr s) {\n\tif (!SocketValid(s)) return 0;\n\tif (s->socketType == TCPSocketType) {\n\t\treturn TCPSockDataAvailable((TCPSockPtr) s->privateSocketPtr);\n\t}\n\tif (s->socketType == UDPSocketType) {\n\t\treturn ((UDPSockPtr) s->privateSocketPtr)->dataAvailable;\n\t}\n\tsuccess(false);\n}\n\nint sqSocketReceiveDataBufCount(SocketPtr s, int buf, int bufSize) {\n\tint adjustedBufSize = bufSize > 0xFFFF ? 0xFFFF : bufSize;\n\n\tif (!SocketValid(s)) return -1;\n\tif (s->socketType == TCPSocketType) {\n\t\treturn TCPSockRecvData((TCPSockPtr) s->privateSocketPtr, (char *) buf, adjustedBufSize);\n\t}\n\tif (s->socketType == UDPSocketType) {\n\t\treturn UDPSockRecvData((UDPSockPtr) s->privateSocketPtr, (char *) buf, adjustedBufSize);\n\t}\n\tsuccess(false);\n}\n\nint sqSocketRemoteAddress(SocketPtr s) {\n\tif (!SocketValid(s)) return -1;\n\tif (s->socketType == TCPSocketType) {\n\t\treturn TCPSockRemoteAddress((TCPSockPtr) s->privateSocketPtr);\n\t}\n\tif (s->socketType == UDPSocketType) {\n\t\treturn UDPSockRemoteAddress((UDPSockPtr) s->privateSocketPtr);\n\t}\n\tsuccess(false);\n}\n\nint sqSocketRemotePort(SocketPtr s) {\n\tif (!SocketValid(s)) return -1;\n\tif (s->socketType == TCPSocketType) {\n\t\treturn TCPSockRemotePort((TCPSockPtr) s->privateSocketPtr);\n\t}\n\tif (s->socketType == UDPSocketType) {\n\t\treturn UDPSockRemotePort((UDPSockPtr) s->privateSocketPtr);\n\t}\n\tsuccess(false);\n}\n\nint sqSocketSendDataBufCount(SocketPtr s, int buf, int bufSize) {\n\tint adjustedBufSize = bufSize > 0xFFFF ? 0xFFFF : bufSize;\n\n\tif (!SocketValid(s)) return -1;\n\tif (s->socketType == TCPSocketType) {\n\t\treturn TCPSockSendData((TCPSockPtr) s->privateSocketPtr, (char *) buf, adjustedBufSize);\n\t}\n\tif (s->socketType == UDPSocketType) {\n\t\treturn UDPSockSendData((UDPSockPtr) s->privateSocketPtr, (char *) buf, adjustedBufSize);\n\t}\n\tsuccess(false);\n}\n\nint sqSocketSendDone(SocketPtr s) {\n\tif (!SocketValid(s)) return 1;\n\tif (s->socketType == TCPSocketType) {\n\t\treturn !((TCPSockPtr) s->privateSocketPtr)->sendInProgress;\n\t}\n\tif (s->socketType == UDPSocketType) {\n\t\treturn !((UDPSockPtr) s->privateSocketPtr)->sendInProgress;\n\t}\n\tsuccess(false);\n}\n\n/*** Resolver Functions ***/\n\nvoid sqResolverAbort(void) {\n\tint semaIndex;\n\n\t/* abort the current request */\n\tif (resolver.status == RESOLVER_BUSY) {\n\t\tsemaIndex = resolver.semaIndex;\n\t\tResolverTerminate();\n\t\tResolverInitialize(semaIndex);\n\t}\n}\n\nvoid sqResolverAddrLookupResult(char *nameForAddress, int nameSize) {\n\t/* copy the name found by the last address lookup into the given string */\n\tmemcpy(nameForAddress, resolver.hostInfo.cname, nameSize);\n}\n\nint sqResolverAddrLookupResultSize(void) {\n\treturn strlen(resolver.hostInfo.cname);\n}\n\nint sqResolverError(void) {\n\treturn resolver.error;\n}\n\nint sqResolverLocalAddress(void) {\n\tstruct GetAddrParamBlock paramBlock;\n\n\tif (resolver.localAddress == 0) {\n\t\tresolver.remoteAddress = 0;\n\t\tmemset(&paramBlock, 0, sizeof(struct GetAddrParamBlock));\n\t\tparamBlock.ioResult = 1;\n\t\tparamBlock.csCode = ipctlGetAddr;\n\t\tparamBlock.ioCRefNum = macTCPRefNum;\n\t\tPBControlSync((ParmBlkPtr) &paramBlock);\n\t\tif (paramBlock.ioResult == noErr) {\n\t\t\tresolver.status = RESOLVER_SUCCESS;\n\t\t\tresolver.localAddress = paramBlock.ourAddress;\n\t\t\tresolver.error = noErr;\n\t\t} else {\n\t\t\tresolver.status = RESOLVER_ERROR;\n\t\t\tresolver.error = paramBlock.ioResult;\n\t\t}\n\t} else {\n\t\tresolver.status = RESOLVER_SUCCESS;\n\t\tresolver.error = noErr;\n\t}\n\treturn resolver.localAddress;\n}\n\nint sqResolverNameLookupResult(void) {\n\t/* return the result of the last successful lookup */\n\treturn resolver.remoteAddress;\n}\n\nvoid sqResolverStartAddrLookup(int address) {\n\tOSErr err;\n\n\tif (resolver.status == RESOLVER_BUSY) return;\n\n\tresolver.status = RESOLVER_BUSY;\n\tresolver.error = noErr;\n\tmemset(&resolver.hostInfo, 0, sizeof(hostInfo));\n\terr = AddrToName(address, &resolver.hostInfo, resolverDoneProc, (char *) &resolver);\n\tif (err == noErr) {\n\t\t/* address was in cache; lookup is already done */\n\t\tresolver.status = RESOLVER_SUCCESS;\n\t} else {\n\t\tif (err != cacheFault) {\n\t\t\t/* real error */\n\t\t\tresolver.status = RESOLVER_ERROR;\n\t\t\tresolver.error = err;\n\t\t}\n\t}\n}\n\nvoid sqResolverStartNameLookup(char *hostName, int nameSize) {\n\tchar name[501];\n\tint len; \n\tOSErr err;\n\n\tif (resolver.status == RESOLVER_BUSY) return;\n\n\tlen = ((nameSize <= 500) ? nameSize : 500);\n\tmemcpy(name, hostName, len);\n\tname[len] = '\\0';\n\n\tresolver.status = RESOLVER_BUSY;\n\tresolver.error = noErr;\n\tmemset(&resolver.hostInfo, 0, sizeof(hostInfo));\n\terr = StrToAddr(name, &resolver.hostInfo, resolverDoneProc, (char *) &resolver);\n\tif (err == noErr) {\n\t\t/* address was in cache; lookup is already done */\n\t\tresolver.status = RESOLVER_SUCCESS;\n\t\tresolver.remoteAddress = resolver.hostInfo.addr[0];\n\t} else {\n\t\tif (err != cacheFault) {\n\t\t\t/* real error */\n\t\t\tresolver.status = RESOLVER_ERROR;\n\t\t\tresolver.error = err;\n\t\t}\n\t}\n}\n\nint sqResolverStatus(void) {\n\treturn resolver.status;\n}\n\n/*** Private Resolver Functions ***/\n\nint ResolverInitialize(int resolverSemaIndex) {\n\tif (resolver.status != RESOLVER_UNINITIALIZED) {\n\t\tResolverTerminate();\n\t}\n\n\tmemset(&resolver, 0, sizeof(ResolverStatusRec));\n\tresolver.status = RESOLVER_UNINITIALIZED;\n\n\tresolver.error = OpenResolver(nil);\n\tif (resolver.error != noErr) {\n\t\tresolver.status = RESOLVER_ERROR;\n\t\treturn resolver.error;\n\t}\n\n\tresolver.semaIndex = resolverSemaIndex;\n\tresolver.status = RESOLVER_SUCCESS;\n\treturn noErr;\n}\n\nstatic pascal void ResolverCompletionRoutine(struct hostInfo *hostInfoPtr, char *userDataPtr) {\n\tResolverStatusPtr r = (ResolverStatusPtr) userDataPtr;\n\n\tif ((r == null) || (r->status != RESOLVER_BUSY)) return;\n\n\t/* completion routine */\n\tif (r->hostInfo.rtnCode == noErr) {\n\t\tr->status = RESOLVER_SUCCESS;\n\t\tr->remoteAddress = hostInfoPtr->addr[0];\n\t} else {\n\t\tr->status = RESOLVER_ERROR;\n\t\tr->error = hostInfoPtr->rtnCode;\n\t}\n\tsignalSemaphoreWithIndex(r->semaIndex);\n}\n\nvoid ResolverTerminate(void) {\n\tCloseResolver();\n\tmemset(&resolver, 0, sizeof(ResolverStatusRec));\n\tresolver.status = RESOLVER_UNINITIALIZED;\n}\n\n/*** Squeak TCP Socket Listen/Accept Functions ***/\n\nListenerQueuePtr ListenerQueueCreate(TCPSockPtr tcpSocket, int port, int backlogSize) {\n\tListenerQueuePtr listener;\n\n\t/* allocate a new ListenerQueue */\n\tlistener = (ListenerQueuePtr) malloc(sizeof(ListenerQueueRec));\n\tif (listener == nil) return nil;\n\n\t/* initialize it */\n\tlistener->localAddress = TCPSockLocalAddress(tcpSocket);\n\tlistener->localPort = port;\n\tlistener->closed = false;\n\tlistener->semaIndex = tcpSocket->semaIndex;\n\tlistener->desiredQueueLength = (backlogSize < 1) ? 1 : backlogSize;\n\tlistener->waitingSockets = nil;\n\n\t/* add the given socket to the new ListenerQueue */\n\ttcpSocket->nextInListenerQueue = listener->waitingSockets;\n\tlistener->waitingSockets = tcpSocket;\n\tTCPSockListenOn(tcpSocket, listener->localPort);\n\n\t/* create additional waiting sockets in necessary to fill the ListenerQueue */\n\tFillListenerQueue(listener);\n\treturn listener;\n}\n\nvoid ListenerQueueDestroy(ListenerQueuePtr listener) {\n\tTCPSockPtr thisSock, nextSock;\n\n\t/* destroy all sockets in this ListenerQueue's waiting socket list */\n\tthisSock = listener->waitingSockets;\n\twhile (thisSock != nil) {\n\t\tnextSock = thisSock->nextInListenerQueue;\n\t\tTCPSockDestroy(thisSock);\n\t\tthisSock = nextSock;\n\t}\n\n\t/* clear a few fields, just in case of a dangling reference */\n\tlistener->closed = true;\n\tlistener->semaIndex = 0;\n\tlistener->waitingSockets = nil;\n\n\t/* free the ListenerQueue */\n\tfree(listener);\n}\n\nint ListenerQueueStatus(ListenerQueuePtr listener) {\n\tTCPSockPtr sock;\n\n\tif (listener == nil) {\n\t\tsuccess(false);\n\t\treturn Unconnected;\n\t}\n\n\tif (listener->closed) return Unconnected;\n\n\t/* check for zombie sockets; if there is one, clean up the queue */\n\tif (FindZombieSocket(listener) != nil) {\n\t\tFillListenerQueue(listener);  /* removes zombies and refills queue */\n\t}\n\n\t/* scan queue for a connected socket */\n\tsock = FindConnectedSocket(listener);\n\treturn (sock == nil) ? WaitingForConnection : Connected;\n}\n\nvoid FillListenerQueue(ListenerQueuePtr listener) {\n\tTCPSockPtr sock, newSock;\n\tint count, socksToAdd;\n\n\t/* remove from the queue and destroy any zombie sockets */\n\twhile ((sock = FindZombieSocket(listener)) != nil) {\n\t\tRemoveSocketFromListenerQueue(sock, listener);\n\t\tTCPSockDestroy(sock);\n\t}\n\n\t/* count the number of remaining sockets */\n\tcount = 0;\n\tsock = listener->waitingSockets;\n\twhile (sock != nil) {\n\t\tcount++;\n\t\tsock = sock->nextInListenerQueue;\n\t}\n\n\t/* create enough new sockets up to fill ListenerQueue to desired size */\n\tsocksToAdd = listener->desiredQueueLength - count;\n\twhile (socksToAdd > 0) {\n\t\tnewSock = TCPSockCreate();\n\t\tif (newSock!= nil) {\n\t\t\t/* set semaphore of the new socket*/\n\t\t\tnewSock->semaIndex = listener->semaIndex;\n\n\t\t\t/* record new socket in openTCPSockets */\n\t\t\tnewSock->next = openTCPSockets;\n\t\t\topenTCPSockets = newSock;\n\n\t\t\t/* add new socket to the listener queue and start it listening */\n\t\t\tnewSock->nextInListenerQueue = listener->waitingSockets;\n\t\t\tlistener->waitingSockets = newSock;\n\t\t\tTCPSockListenOn(newSock, listener->localPort);\n\t\t}\n\t\tsocksToAdd--;\n\t}\n}\n\nTCPSockPtr FindConnectedSocket(ListenerQueuePtr listener) {\n  /* Return the first connected socket in the given ListenerQueue,\n     or nil if there isn't one. */\n\n\tTCPSockPtr sock;\n\n\tsock = listener->waitingSockets;\n\twhile (sock != nil) {\n\t\tif (sock->connectStatus == Connected) return sock;\n\t\tsock = sock->nextInListenerQueue;\n\t}\n\treturn nil;\n}\n\nTCPSockPtr FindZombieSocket(ListenerQueuePtr listener) {\n  /* Return the first socket in the given ListenerQueue that is not connected or\n     waiting for a connection (we call this a zombie), or nil if there isn't one.\n     Zombies are created when a connection is made but broken again before an\n     accept has been done. Since a zombie are no longer waiting for a connection,\n     it takes the place of listening socket. If the queue became filled with zombies\n     no connections could get through. Thus, zombies must be eliminated. As the\n     saying goes: \"the only good zombie is a dead zombie.\" */\n\n\tTCPSockPtr sock;\n\n\tsock = listener->waitingSockets;\n\twhile (sock != nil) {\n\t\tif ((sock->connectStatus != WaitingForConnection) &&\n\t\t\t(sock->connectStatus != Connected)) return sock;\n\t\tsock = sock->nextInListenerQueue;\n\t}\n\treturn nil;\n}\n\nvoid sqSocketAcceptFromRecvBytesSendBytesSemaID(\n  SocketPtr s, SocketPtr serverSocket,\n  int recvBufSize, int sendBufSize, int semaIndex) {\n  /* Accept a connection for the given server socket. The server socket must\n     have been turned into a listener queue via sqSocketListenOnPortBacklogSize().\n     If successful, s is initialized to newly connected socket using the\n     given paramenters, and a new listening socket will be created and added\n     to the ListenerQueue to maintain the desired queue length. Note that MacTCP\n     allows multiple sockets to be listening on the same port number and, indeed,\n     this is the only way to support the Unix socket notion of a socket backlog. */\n\n\tListenerQueuePtr listener;\n\tTCPSockPtr connectedSock;\n\n\t/* server socket must be a valid ListenerQueue */\n\tif ((serverSocket == nil) ||\n\t\t(serverSocket->sessionID != thisNetSession) ||\n\t\t(serverSocket->socketType != ListenerQueueType) ||\n\t\t(serverSocket->privateSocketPtr == nil)) {\n\t\t\tsuccess(false);\n\t\t\treturn;\n\t}\n\n\t/* result socket must be a new, unintialized socket */\n\tif ((s == nil) ||\n\t\t(s->sessionID != 0) ||\n\t\t(s->socketType != 0) ||\n\t\t(s->privateSocketPtr != nil)) {\n\t\t\tsuccess(false);\n\t\t\treturn;\n\t}\n\n\t/* look for a connected socket */\n\tlistener = (ListenerQueuePtr) serverSocket->privateSocketPtr;\n\tconnectedSock = FindConnectedSocket(listener);\n\tif (connectedSock == nil) {\n\t\tsuccess(false);\n\t} else {\n\t\t/* remove connected socket from the listener queue */\n\t\tRemoveSocketFromListenerQueue(connectedSock, listener);\n\n\t\t/* fill in the result socket handle */\n\t\tconnectedSock->semaIndex = semaIndex;\n\t\ts->sessionID = thisNetSession;\n\t\ts->socketType = TCPSocketType;\n\t\ts->privateSocketPtr = connectedSock;\n\t}\n\n\t/* ensure that the queue has the desired number of listenening sockets */\n\tFillListenerQueue(listener);\n}\n\nvoid RemoveSocketFromListenerQueue(TCPSockPtr sockToRemove, ListenerQueuePtr listener) {\n\tTCPSockPtr lastSock, thisSock;\n\n\tif (sockToRemove == nil) return;\n\n\tif (listener->waitingSockets == sockToRemove) {\n\t\tlistener->waitingSockets = sockToRemove->nextInListenerQueue;\n\t\tsockToRemove->nextInListenerQueue = nil;\n\t\treturn;\n\t}\n\n\tlastSock = listener->waitingSockets;\n\tthisSock = lastSock->nextInListenerQueue;\n\twhile (thisSock != nil) {\n\t\tif (thisSock == sockToRemove) {\n\t\t\tlastSock->nextInListenerQueue = sockToRemove->nextInListenerQueue;\n\t\t\tsockToRemove->nextInListenerQueue = nil;\n\t\t\treturn;\n\t\t}\n\t\tlastSock = thisSock;\n\t\tthisSock = lastSock->nextInListenerQueue;\n\t}\n}\n\nvoid sqSocketListenOnPortBacklogSize(SocketPtr s, int port, int backlogSize) {\n\tTCPSockPtr tcpSocket;\n\tListenerQueuePtr listener;\n\n\t/* s must be an TCP socket that is initialized but unconnected */\n\tif ((!SocketValid(s)) || (s->socketType != TCPSocketType)) {\n\t\tsuccess(false);\n\t\treturn;\n\t}\n\ttcpSocket = (TCPSockPtr) s->privateSocketPtr;\n\tif (tcpSocket->connectStatus != Unconnected) {\n\t\tsuccess(false);\n\t\treturn;\n\t}\n\n\t/* make sure the port number is in range */\n\tif (!PortNumberValid(port)) {;\n\t\tsuccess(false);\n\t\treturn;\n\t}\n\n\t/* create a new listener on the given with the given backlog size */\n\tlistener = ListenerQueueCreate((TCPSockPtr) s->privateSocketPtr, port, backlogSize);\n\tif (listener == nil) {\n\t\tsuccess(false);\n\t\treturn;\n\t}\n\n\t/* mutate s into a listener socket: replace the original TCP socket in s with\n\t   the new listener, and change the type of s to ListenerQueueType */\n\ts->socketType = ListenerQueueType;\n\ts->privateSocketPtr = listener;\n}\n\n/*** Private TCP Socket Functions ***/\n\nvoid * TCPSockCreate(void) {\n\tTCPiopb paramBlock;\n\tTCPSockPtr s = nil;\n\tint minRcvBufSize, rcvBufSize;\n\tOSErr err = noErr;\n\n\trcvBufSize = RecvBufferSize;\n\tminRcvBufSize = (4 * mtuSize) + 1024;\n\tif (rcvBufSize < minRcvBufSize) rcvBufSize = minRcvBufSize;\n\n\ts = (TCPSockPtr) malloc(sizeof(TCPSockRec) + rcvBufSize);\n\tif (s == nil) return nil;  /* allocation failed */\n\tmemset(s, 0, sizeof(TCPSockRec) + rcvBufSize);\n\n\tInitTCPCmd(TCPCreate, nil, &paramBlock);\n\tparamBlock.csParam.create.rcvBuff = s->rcvBuf;\n\tparamBlock.csParam.create.rcvBuffLen = rcvBufSize;\n\tparamBlock.csParam.create.notifyProc = tcpNotifyProc;\n\tparamBlock.csParam.create.userDataPtr = (Ptr) s;\n\terr = PBControlSync((ParmBlkPtr) &paramBlock);\n\tif (err != noErr) {\n\t\tfree(s);\n\t\treturn nil;\n\t}\n\ts->tcpStream = paramBlock.tcpStream;\n\treturn s;\n}\n\nint TCPSockDataAvailable(TCPSockPtr s) {\n\tTCPiopb paramBlock;\n\tOSErr err = noErr;\n\n\tif ((s == nil) || (s->tcpStream == nil)) {\n\t\treturn false;  /* already destroyed */\n\t}\n\n\tInitTCPCmd(TCPStatus, s->tcpStream, &paramBlock);\n\terr = PBControlSync((ParmBlkPtr) &paramBlock);\n\tif (err != noErr) {\n\t\treturn 0;\n\t}\n\treturn paramBlock.csParam.status.amtUnreadData > 0;\n}\n\nvoid TCPSockDestroy(TCPSockPtr s) {\n\tTCPiopb paramBlock;\n\tOSErr err = noErr;\n\n\tif ((s == nil) || (s->tcpStream == nil)) {\n\t\treturn;  /* already destroyed */\n\t}\n\n\tInitTCPCmd(TCPRelease, s->tcpStream, &paramBlock);\n\terr = PBControlSync((ParmBlkPtr) &paramBlock);\n\tTCPSockRemoveFromOpenList(s);\n\ts->tcpStream = nil;\n\tfree(s);\n}\n\nint TCPSockLocalAddress(TCPSockPtr s) {\n\tTCPiopb paramBlock;\n\n\tif ((s == nil) || (s->tcpStream == nil)) {\n\t\treturn 0;  /* already destroyed */\n\t}\n\n\tInitTCPCmd(TCPStatus, s->tcpStream, &paramBlock);\n\ts->lastError = PBControlSync((ParmBlkPtr) &paramBlock);\n\tif (s->lastError != noErr) {\n\t\treturn 0;\n\t}\n\treturn paramBlock.csParam.status.localHost;\n}\n\nint TCPSockLocalPort(TCPSockPtr s) {\n\tTCPiopb paramBlock;\n\n\tif ((s == nil) || (s->tcpStream == nil)) {\n\t\treturn 0;  /* already destroyed */\n\t}\n\n\tInitTCPCmd(TCPStatus, s->tcpStream, &paramBlock);\n\ts->lastError = PBControlSync((ParmBlkPtr) &paramBlock);\n\tif (s->lastError != noErr) {\n\t\treturn 0;\n\t}\n\treturn paramBlock.csParam.status.localPort;\n}\n\nint TCPSockRemoteAddress(TCPSockPtr s) {\n\tTCPiopb paramBlock;\n\n\tif ((s == nil) || (s->tcpStream == nil)) {\n\t\treturn 0;  /* already destroyed */\n\t}\n\n\tInitTCPCmd(TCPStatus, s->tcpStream, &paramBlock);\n\ts->lastError = PBControlSync((ParmBlkPtr) &paramBlock);\n\tif (s->lastError != noErr) {\n\t\treturn 0;\n\t}\n\treturn paramBlock.csParam.status.remoteHost;\n}\n\nint TCPSockRemotePort(TCPSockPtr s) {\n\tTCPiopb paramBlock;\n\n\tif ((s == nil) || (s->tcpStream == nil)) {\n\t\treturn 0;  /* already destroyed */\n\t}\n\n\tInitTCPCmd(TCPStatus, s->tcpStream, &paramBlock);\n\ts->lastError = PBControlSync((ParmBlkPtr) &paramBlock);\n\tif (s->lastError != noErr) {\n\t\treturn 0;\n\t}\n\treturn paramBlock.csParam.status.remotePort;\n}\n\nvoid TCPSockRemoveFromOpenList(TCPSockPtr s) {\n\tTCPSockPtr thisSock, nextSock, previousSock;\n\n\tpreviousSock = nil;\n\tfor (thisSock = openTCPSockets; thisSock != nil; thisSock = nextSock) {\n\t\tnextSock = thisSock->next;\n\t\tif (thisSock == s) {\n\t\t\tif (previousSock == nil) {\n\t\t\t\topenTCPSockets = nextSock;\n\t\t\t} else {\n\t\t\t\tpreviousSock->next = nextSock;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tpreviousSock = thisSock;\n\t}\n}\n\nvoid TCPSockConnectTo(TCPSockPtr s, int addr, int port) {\n\tif ((s == nil) || (s->tcpStream == nil)) return;  /* socket destroyed */\n\n\tInitTCPCmd(TCPActiveOpen, s->tcpStream, &s->tcpPB);\n\ts->tcpPB.csParam.open.remoteHost = addr;\n\ts->tcpPB.csParam.open.remotePort = port;\n\ts->connectStatus = WaitingForConnection;\n\ts->tcpPB.ioCompletion = tcpConnectDoneProc;\n\ts->lastError = PBControlAsync((ParmBlkPtr) &s->tcpPB);\n\tif (s->lastError != noErr) {\n\t\ts->connectStatus = Unconnected;\n\t}\n}\n\nvoid TCPSockListenOn(TCPSockPtr s, int port) {\n\tif ((s == nil) || (s->tcpStream == nil)) return;  /* socket destroyed */\n\n\tInitTCPCmd(TCPPassiveOpen, s->tcpStream, &s->tcpPB);\n\ts->tcpPB.csParam.open.localPort = port;\n\ts->connectStatus = WaitingForConnection;\n\ts->tcpPB.ioCompletion = tcpConnectDoneProc;\n\ts->lastError = PBControlAsync((ParmBlkPtr) &s->tcpPB);\n\tif (s->lastError != noErr) {\n\t\ts->connectStatus = Unconnected;\n\t}\n}\n\nvoid TCPSockCloseConnection(TCPSockPtr s) {\n\t/* Note: This operation uses a dedicated parameter block so that it\n\t   can be invoked even in the previous send is not yet complete.\n\t   It will eventually use a completion routine to delete the\n\t   socket automatically. For now, this is the client's responsibility.\n\t*/\n\tif ((s == nil) || (s->tcpStream == nil)) return;  /* socket destroyed */\n\n\tInitTCPCmd(TCPClose, s->tcpStream, &s->closePB);\n//\ts->closePB.ioCompletion = tcpCloseDoneProc;\n\ts->connectStatus = ThisEndClosed; // xxx remove when making this async\n\ts->lastError = PBControlSync((ParmBlkPtr) &s->closePB);\n}\n\nvoid TCPSockAbortConnection(TCPSockPtr s) {\n\tTCPiopb paramBlock;\n\n\tif ((s == nil) || (s->tcpStream == nil)) return;  /* socket destroyed */\n\n\tInitTCPCmd(TCPAbort, s->tcpStream, &paramBlock);\n\ts->lastError = PBControlSync((ParmBlkPtr) &paramBlock);\n\ts->connectStatus = Unconnected;\n}\n\nint TCPSockRecvData(TCPSockPtr s, char *buf, int bufSize) {\n\tTCPiopb paramBlock;  /* use local parameter block since send may be using one in socket */\n\tOSErr err = noErr;\n\tint bytesRead;\n\n\tif ((s->connectStatus == Unconnected) || (s->connectStatus == WaitingForConnection)) {\n\t\tsuccess(false);\n\t\treturn 0;  /* fail if not connected */\n\t}\n\tif (!TCPSockDataAvailable(s)) return 0;  /* no data available */\n\n\tInitTCPCmd(TCPRcv, s->tcpStream, &paramBlock);\n\tparamBlock.csParam.receive.commandTimeoutValue = 1; /* finish in one second, data or not */\n\tparamBlock.csParam.receive.rcvBuff = buf;\n\tparamBlock.csParam.receive.rcvBuffLen = bufSize;\n\ts->lastError = noErr;\n\terr = PBControlSync((ParmBlkPtr) &paramBlock);  /* synchronous */\n\tif (err == noErr) {\n\t\tbytesRead = paramBlock.csParam.receive.rcvBuffLen;\n\t} else {\n\t\t/* if err == commandTimeout, no data was available */\n\t\tbytesRead = 0;\n\t\tif (!((err == commandTimeout) || (err == connectionClosing))) {\n\t\t\ts->lastError = err;\n\t\t}\n\t}\n\ts->dataAvailable = (bytesRead != 0);  /* if we got data, there may be more */\n\treturn bytesRead;\n}\n\nint xxxGOODTCPSockSendData(TCPSockPtr s, char *buf, int bufSize);\nint xxxGOODTCPSockSendData(TCPSockPtr s, char *buf, int bufSize) {\n\tint sendCount;\n\tstruct wdsEntry wds[2];\n\n\tbuf;  /* xxx avoid compiler complaint about unreferenced vars */\n\n\t/* copy client data into sendBuf to allow asynchronous send */\n\tsendCount = (bufSize <= SendBufferSize) ? bufSize : SendBufferSize;\n//xxx\tmemcpy(s->sendBuf, buf, sendCount);\n\n\t/* set up WDS entry; zero length marks end of chunk list */\n\twds[0].length = sendCount;\n//xxx\t\twds[0].ptr = s->sendBuf;\n\twds[1].length = 0;\n\n\tInitTCPCmd(TCPSend, s->tcpStream, &s->tcpPB);\n\ts->tcpPB.csParam.send.wdsPtr = (Ptr) &wds;\n\ts->tcpPB.csParam.send.pushFlag = true;\n\ts->sendInProgress = true;\n\ts->tcpPB.ioCompletion = tcpSendDoneProc;\n\ts->lastError = PBControlAsync((ParmBlkPtr) &s->tcpPB);\n\tif (s->lastError != noErr) {\n\t\ts->sendInProgress = false;\n\t\treturn 0;\n\t}\n\treturn sendCount;\n}\n\nint TCPSockSendData(TCPSockPtr s, char *buf, int bufSize) {\n\tTCPSendBufPtr sendBuf;\n\tint sendCount;\n\n\tif ((s->connectStatus == Unconnected) || (s->connectStatus == WaitingForConnection)) {\n\t\tsuccess(false);\n\t\treturn 0;  /* fail if not connected */\n\t}\n\n\tsendBuf = &sendBufPool[nextSendBuf++];\n\tif (nextSendBuf >= SendBufCount) nextSendBuf = 0;\n\tsendBuf->mySocket = s;\n\n\t/* copy client data into sendBuf to allow asynchronous send */\n\tsendCount = (bufSize <= SendBufferSize) ? bufSize : SendBufferSize;\n\tmemcpy(sendBuf->data, buf, sendCount);\n\n\t/* set up WDS entry; zero length marks end of chunk list */\n\tsendBuf->wds[0].length = sendCount;\n\tsendBuf->wds[0].ptr = sendBuf->data;\n\tsendBuf->wds[1].length = 0;\n\n\tInitTCPCmd(TCPSend, s->tcpStream, &sendBuf->tcpPB);\n\tsendBuf->tcpPB.csParam.send.wdsPtr = (Ptr) &sendBuf->wds;\n\tsendBuf->tcpPB.csParam.send.pushFlag = true;\n\tsendBuf->tcpPB.ioCompletion = tcpSendDoneProc;\n\ts->sendInProgress = true;\n\ts->lastError = PBControlAsync((ParmBlkPtr) &sendBuf->tcpPB);\n\tif (s->lastError != noErr) {\n\t\ts->sendInProgress = false;\n\t\treturn 0;\n\t}\n\treturn sendCount;\n}\n\n/*** Private General Utilities ***/\n\nvoid DestroyAllOpenSockets(void) {\n\twhile (openTCPSockets != nil) {\n\t\tTCPSockDestroy(openTCPSockets);  /* removes socket from the list */\n\t}\n\twhile (openUDPSockets != nil) {\n\t\tUDPSockDestroy(openUDPSockets);  /* removes socket from the list */\n\t}\n}\n\nvoid InstallExitHandler(void) {\n\t/* Install a handler to release all open sockets when terminating this\n\t   application. The handler will be called even if you type 'es' to\n\t   MacsBug or use Command-Option-Escape for force the program to exit.\n\t   The handler is only installed the first time the network is initialized.\n\t*/\n\n\tif (oldExitHandlerProc == nil) {\n\t\toldExitHandlerProc = GetToolTrapAddress(_ExitToShell);\n\t\tmyExitHandlerProc = \n\t\t\tNewRoutineDescriptor((ProcPtr) MyExitHandler, kPascalStackBased, GetCurrentISA());\n\t\tSetToolTrapAddress(myExitHandlerProc, _ExitToShell);\n\t}\n}\n\nvoid MyExitHandler(void) {\n\tSetCurrentA5();\n\tif (thisNetSession == 0) return;  /* noop if network is already shut down */\n\tSetToolTrapAddress(oldExitHandlerProc, _ExitToShell);\n\tResolverTerminate();\n\tDestroyAllOpenSockets();\n\tExitToShell();\n}\n\nint PortNumberValid(int port) {\n\tif (port < 0xFFFF) {\n\t\treturn true;\n\t}\n\tsuccess(false);\n\treturn false;\n}\n\nint SocketValid(SocketPtr s) {\n\tif ((s != NULL) &&\n\t\t(s->privateSocketPtr != NULL) &&\n\t\t(s->sessionID == thisNetSession)) {\n\t\t\tif (s->socketType == TCPSocketType) {\n\t\t\t\tif (((TCPSockPtr) s->privateSocketPtr)->tcpStream != nil) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t}\n\tsuccess(false);\n\treturn false;\n}\n\n/*** Private TCP Utilities ***/\n\nvoid InitTCPCmd(int cmd, StreamPtr tcpStream, TCPiopb *paramBlkPtr) {\n\tmemset(paramBlkPtr, 0, sizeof(TCPiopb));\n\tparamBlkPtr->csCode = cmd;\n\tparamBlkPtr->tcpStream = tcpStream;\n\tparamBlkPtr->ioCRefNum = macTCPRefNum;\n\tparamBlkPtr->ioResult = 1;\n}\n\nvoid TCPCloseCompletionRoutine(struct TCPiopb *pbPtr) {\n\tTCPSockPtr s = (TCPSockPtr) pbPtr;\n\n\ts->lastError = s->tcpPB.ioResult;\n\tif (s->lastError == noErr) {\n\t\tif (s->connectStatus == OtherEndClosed) {\n\t\t\ts->connectStatus = Unconnected;\n\t\t} else {\n\t\t\ts->connectStatus = ThisEndClosed;\n\t\t}\n\t}\n\tsignalSemaphoreWithIndex(s->semaIndex);\n}\n\nvoid TCPConnectCompletionRoutine(struct TCPiopb *pbPtr) {\n\tTCPSockPtr s = (TCPSockPtr) pbPtr;\n\n\ts->lastError = s->tcpPB.ioResult;\n\tif (s->lastError == noErr) {\n\t\ts->connectStatus = Connected;\n\t} else {\n\t\ts->connectStatus = Unconnected;\n\t}\n\tsignalSemaphoreWithIndex(s->semaIndex);\n}\n\npascal void TCPNotificationRoutine(\n\tStreamPtr s, unsigned short eventCode, Ptr userDataPtr,\n\tunsigned short terminReason, struct ICMPReport *icmpMsg) {\n\t/* called when data arrives or stream status changes */\n\n\t/* reference args to suppress compiler warnings about unused variables */\n\ts; terminReason; icmpMsg;\n\n\tif (eventCode == TCPDataArrival) {\n\t\tTCPSockPtr tcpSock = (TCPSockPtr) userDataPtr;\n\t\ttcpSock->dataAvailable = true;\n\t\tsignalSemaphoreWithIndex(tcpSock->semaIndex);\n\t\treturn;\n\t}\n\tif (eventCode == TCPClosing) {\n\t\tTCPSockPtr tcpSock = (TCPSockPtr) userDataPtr;\n\t\tif (tcpSock->connectStatus == ThisEndClosed) {\n\t\t\ttcpSock->connectStatus = Unconnected;\n\t\t} else {\n\t\t\ttcpSock->connectStatus = OtherEndClosed;\n\t\t}\n\t\tsignalSemaphoreWithIndex(tcpSock->semaIndex);\n\t\treturn;\n\t}\n\tif (eventCode == TCPTerminate) {\n\t\tTCPSockPtr tcpSock = (TCPSockPtr) userDataPtr;\n\t\ttcpSock->connectStatus = Unconnected;\n\t\tsignalSemaphoreWithIndex(tcpSock->semaIndex);\n\t\treturn;\n\t}\n}\n\nvoid TCPSendCompletionRoutine(struct TCPiopb *pbPtr) {\n//xxx\tTCPSockPtr s = (TCPSockPtr) pbPtr;\nTCPSockPtr s = ((TCPSendBufPtr) pbPtr)->mySocket;\n\n\ts->lastError = s->tcpPB.ioResult;\n\ts->sendInProgress = false;\n\tsignalSemaphoreWithIndex(s->semaIndex);\n}\n\n/*** Private UDP Socket Functions (not yet implemented) ***/\n\nvoid * UDPSockCreate(void) {\n\treturn nil;\n}\n\nvoid UDPSockDestroy(UDPSockPtr s) {\n\ts;\n}\n\nint UDPSockLocalAddress(UDPSockPtr s) {\n\ts;\n}\n\nint UDPSockLocalPort(UDPSockPtr s) {\n\ts;\n}\n\nint UDPSockRemoteAddress(UDPSockPtr s) {\n\ts;\n}\n\nint UDPSockRemotePort(UDPSockPtr s) {\n\ts;\n}\n\nvoid UDPSockConnectTo(UDPSockPtr s, int addr, int port) {\n\ts; addr; port;\n}\n\nvoid UDPSockListenOn(UDPSockPtr s, int port) {\n\ts; port;\n}\n\nint UDPSockRecvData(UDPSockPtr s, char *buf, int bufSize) {\n\ts; buf; bufSize;\n}\n\nint UDPSockSendData(UDPSockPtr s, char *buf, int bufSize) {\n\ts; buf; bufSize;\n}\n\n#endif"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SocketPlugin/sqMacNetwork.c",
    "content": "#if TARGET_API_MAC_CARBON\n#include <Carbon/Carbon.h>\n#else\n\t#include <OpenTransport.h>\n\t#include <OpenTptInternet.h>\n\t#include <OpenTptClient.h>\n\t#if defined(__MWERKS__) \n\t\t#include <stropts.h>\n\t#else\n\t\t#include <OpenTransportProviders.h>\n\t#endif\n\t#include <Gestalt.h>\n\t#include <TextUtils.h>\n\t#include <files.h>\n\t#if !TARGET_API_MAC_CARBON\n\t    #ifndef NewOTNotifyUPP\n\t    \ttypedef struct OTConfiguration* OTConfigurationRef;\n\t    \t#define OTNotifyUPP OTNotifyProcPtr \n\t    \t#define NewOTNotifyUPP(userRoutine) userRoutine\n\t    \t#define DisposeOTNotifyUPP(userRoutine)\n\t    #endif\n\t#endif\n#endif\n#include \"sq.h\"\n#include \"SocketPlugin.h\"\n//#define OTSERVER\n\n/*  May 1st 2000\n\tAn Open Transport 2.0 version of source code for TCP/IP & UDP support\n\tSome of this the code was descended from Apple sample source written by: Eric Okholm\n\tHowever getting it to work was done by\n\tJohn M Mcintosh of Corporate Smalltalk Consulting Ltd\n\tjohnmci@smalltalkconsulting.com \n\thttp://www.smalltalkconsulting.com \n\tIn May of 2000 under contract to Disney\n\t\n\tSome of the original source code was written by John Maloney of Disney thoughout the 1990's\n\t\n\tThe basic intent was to make the code fully interrupt driven\n\tNo limits.... Well maybe we throttle read buffers to some parcel of memory to prevent us\n\tfrom using all the memory on the box. Sends depend on lowerlayer buffering/flow control.\n\tTesting from a 500Mhz PowerBook showed we could saturate a 100MB ethernet when sending data oneway.\n\t\n\tUDP and TCP/IP are all supported.\n\tNote for TCP we turn on two options IP_REUSEADDR, and IP_KEEPALIVE.\n\tWe do NOT handle T_EXDATA  data\n\t\n\tV1.0 May 18th 2000, JMM (TCP/IP and UDP)\n\tV1.1 May 19th 2000, JMM Cleanup\n\tV1.2 may 20th 2000, JMM UDP free buffer cleanup, relook at resolver terminate to fix crash\n\tV1.3 may 23rd 2000, JMM fix T_UDERR crash\n\tV1.3.1 may 24th 2000, JMM UDP work\n\tV1.3.2 may 25th 2000, JMM socket options work\n\tV1.3.3 may 27th 2000, JMM rewrote resolver\n\tV1.3.4 Jun 7th 2000, JMM some integration\n\tV1.3.5 Jun 9th 2000, JMM Dan Ingalls found some interesting bugs with a T_GODATA on T_CONNECT.\n\tV1.3.6 Jun 10th 2000, JMM fix a fatal but in close/close pattern I made on the 9th.\n\tV1.3.7 Aug 1st 2000, JMM Some carbon work, reviewed open non-existent port logic fix so unavailable port causes immediate failure\n\tV1.3.8 Aug 29th 2000, JMM Fix problem with recusion on make me an EP.\n\tv1.3.9 Sept 28th 2000, JMM Problem with accept somewhere (so harden code)\n\tv1.3.10 Oct 4th 2000, JMM Issue with destory and free buffers, and disconnect on read with buffer restriction\n\tv1.3.11 Nov 11th 2000, JMM extra buffer for server version\n\tv1.3.12 Jan 2001, Karl Goiser Carbon changes\n        v1.3.13 Sept 2002, JMM fixes for wildcard  port binding, and IP_ADD_MEMBERSHIP logic\n\tv1.4.00 Feb 2003, JMM watch out for async port fetch info not working under os-x\n\tV1.5.00 Dec 2003, JMM add sqSocketListenOnPortBacklogSizeInterface logic\n\t\n\tNotes beware semaphore's lurk for socket support. Three semaphores lives in Smalltalk, waiting for\n\tconnect/disconnect/listen, sending data, and receiving data. When to tap the semaphore is based on\n\tinferences driven from the smalltalk code. We really need a call to tell us intent.\n\t\n\twaitForDisconnectUntil:\n\t    via closeAndDestroy: after primSocketCloseConnection:\n\t    \n\twaitForDataUntil:\n\t    Usually before primitiveSocketReceiveDataBufCount: after checking SocketReceiveDataAvailable\n\t    \n\twaitForSendDoneUntil:\n\t    via sendData: or sendSomeData:startIndex;count: before calls to primitiveSocketSendDataBufCount\n\t    \n\twaitForConnectionUntil:\n\t    via waitForAcceptUntil and many places afer doing primitiveSocketConnectToPort\n*/\t\t\t\t\n\t\t\t\t\n/*** Socket Type Constants ***/\n#define TCPSocketType 0\n#define UDPSocketType 1\n#define TCPListenerSocketType 2   //These are special to enable the right options for listening. Not Exposed to Smalltalk\n#define UDPListenerSocketType 3   //Very special not really linked to an EP structure.  Not Exposed to Smalltalk\n\n/*** Resolver Status Constants ***/\n#define RESOLVER_UNINITIALIZED\t0\n#define RESOLVER_SUCCESS\t\t1\n#define RESOLVER_BUSY\t\t\t2\n#define RESOLVER_ERROR\t\t\t3\n#define RESOLVER_NAMETOADDR     4\n#define RESOLVER_ADDRTONAME     5\n\n\n/*** TCP Socket Status Constants ***/\n#define InvalidSocket           -1\n#define Unconnected\t\t\t\t0\n#define WaitingForConnection\t1\n#define Connected\t\t\t\t2\n#define OtherEndClosed\t\t\t3\n#define ThisEndClosed\t\t\t4\n\n\n\t// Overall program states\nenum\n{\n\tkProgramRunning\t\t= 1,\n\tkProgramDone\t\t= 2\n};\n\n\n\t// Bit numbers in EPInfo stateFlags fields\nenum\n{\n\tkOpenInProgressBit\t\t\t\t= 0,  \n\tkUnConnected    \t\t\t\t= 1,\n\tkWaitingForConnection           = 2,\n\tkConnected                      = 3,\n\tkSendIsBlocked                  = 4,\n    kOtherEndClosed                 = 5,\n    kThisEndClosed                  = 6,\n\tkPassconBit                     = 7\n\n};\n\n\t// Bit numbers in EPInfo stateFlags2 fields\nenum\n{\n\tkFlushDisconnectInProgressBit\t= 0,\n\tkMakeEPIdle                     = 1,\n\tkEPIsBroken                     = 2,\n\tkReadFlowControl                = 3,\n\tkPassconNeeded                  = 4,\n\tkTapSemaphore                   = 5,\n\tkTapSemaphoreReadData           = 6,\n\tkTapSemaphoreWriteData          = 7\n};\n\n\t// Bit numbers in EPInfo stateFlags3 fields\nenum\n{\n    kKeepAliveOptionNeeded          = 0,\n    kSleepKilledMe                  = 1,\n    kWaitingForBind                 = 2\n}; \n\nenum\n{\n\tkOTVersion111\t\t\t\t= 0x01110000,\n\tkOTVersion112\t\t\t\t= 0x01120000,\n\tkOTVersion113\t\t\t\t= 0x01130000,\n\tkOTVersion130\t\t\t\t= 0x01300000\n};\n\nconst kTCPKeepAliveInMinutes\t\t= 10;\t\t// 10 minutes  keep alive\n#ifdef OTSERVER\nconst kReadBuffersToAllocate\t    = 256;\t\t// Memory Allocation issue how big, this means 256x mtu size * 4 But for 68K we do 1/2 size\n#else\nconst kReadBuffersToAllocate\t    = 50;\t\t// Memory Allocation issue how big, this means 50x mtu size * 4 But for 68K we do 1/2 size\n#endif\n\n\t// Endpoint Info Structure\n\nstruct EPInfo\n{\n\tEndpointRef\t\terf;\t\t\t\t//\tactual endpoint\n\tOTLink\t\t\tlink;\t\t\t\t//\tlink into an OT LIFO (atomic)\n\tOTLink          globalLink;         //  link that follows all allocated EPs\n    SInt32          outstandingSends;   //  number of sends outstanding\n    OTList          readBuffers;        //  Read buffers\n    SInt32          bytesPendingToRead; //  bytes outstanding to read\n\tSInt32\t\t\tsemaIndex;\t\t\t//\tsemaphore index\n\tSInt32          readSemaIndex;      //  read semaphore\n\tSInt32          writeSemaIndex;     //  write semaphore\n\tSInt32          UDPMaximumSize;     //  max size if a UDP endpoint\n\tSInt32\t\t\tlastError;          //  last error code\n\tUInt8\t\t\tstateFlags;\t\t\t//\tvarious status fields\n\tUInt8\t\t\tstateFlags2;\t\t//\tvarious status fields\n\tUInt8\t\t\tstateFlags3;\t\t//\tvarious status fields\n\tUInt8           socketType;         //  type of socket, tcp, udp, or tcp/udp listener\n\tInetAddress     localAddress;       //  local address at bind time (ignored used call to get current)\n\tInetAddress     remoteAddress;      //  remote address at connect (ignored used call to get current)\n\tBoolean         UDPMoreFlag;        //  UDP more of datagram flag set\n    };\ntypedef struct EPInfo EPInfo;\n\nstruct ReadBuffer                       // Structure to contain read data.\n{\n\tOTLink\t\t\tfNext;\t\t\t\t//\tlink into an OT FIFO \n\tUInt32          readBufferSize;\n\tUInt32\t\t\treadBufferOriginalSize;  \n\tchar *          readBufferData;\n\tchar *          readBufferPtr;      //Sliding pointer used to partial read buffer.\n    InetAddress     UDPAddress;         //UDP address\n\tBoolean         UDPMoreFlag;        //UDP more of datagram flag set\n};\ntypedef struct ReadBuffer ReadBuffer;\n\n\nstruct TKeepAliveOpt                    \n{\n\tUInt32\t\tlen;\n\tOTXTILevel\tlevel;\n\tOTXTIName\tname;\n\tUInt32\t\tstatus;\n\tUInt32\t\ttcpKeepAliveOn;\n\tUInt32\t\ttcpKeepAliveTimer;\n};\ntypedef struct TKeepAliveOpt TKeepAliveOpt;\n\nstruct TLingerOpt                    \n{\n\tUInt32\t\tlen;\n\tOTXTILevel\tlevel;\n\tOTXTIName\tname;\n\tUInt32\t\tstatus;\n\tUInt32\t\ttcpLingerOn;\n\tUInt32\t\ttcpLingerTimer;\n};\ntypedef struct TLingerOpt TLingerOpt;\n\n/*** Variables ***/\n\nextern struct VirtualMachine *interpreterProxy;\n\nEPInfo*\t\t\t\tgDNSResolver;               //Our resolver\nSInt32\t\t\t\tgDNSResolverStatus \t\t\t= RESOLVER_UNINITIALIZED;\nSInt32\t\t\t\tgDNSResolverError\t\t\t= noErr;\nSInt32\t\t\t    gDNSResolverSemaIndex;      //This gets changed at startup time.\nInetHostInfo\t\tgDNSHostInfo;\nInetDomainName \t\tgDNSAddrStr;                //Length of domain names? Old code was 512, but specs say 256.\nInetHost\t\t\tgDNSAddr;\nSInt32              gDNSLookupType;\n\nOTConfigurationRef\tgCfgMastertcp\t\t\t\t= NULL;\nOTConfigurationRef\tgCfgMasterudp\t\t\t\t= NULL;\nOTConfigurationRef\tgCfgMasterListener\t\t\t= NULL;\n\nOTLIFO\t\t\t\tgFreeReadBuffersLIFO;    \t//  Buffers that are free to read into\nOTLIFO*\t\t\t\tgFreeReadBuffers\t\t\t= &gFreeReadBuffersLIFO;\nSInt32\t\t\t\tgFreeReadBuffersCounter\t\t= 0;\nSInt32\t\t\t\tgSocketsAllocated\t\t\t= 0;\nUInt32\t\t\t\tgmtuSize \t\t\t\t\t= 1024; //This gets changed at startup time.\nSInt32\t\t\t\tgthisNetSession \t\t\t= 0;    //This gets changed at startup time.\nSInt32\t\t\t\tgMaxConnections\t\t\t\t= 0;    //This gets changed at startup time.\nUInt32\t\t\t\tgOTVersion;                         //Gets set to OT version, to help us with special cases.\nSInt32\t\t\t\tgProgramState\t\t\t\t= 0;    //This gets changed at startup time.\nOTClientContextPtr     gClientContext;\n\nOTLIFO\t\t\t\tgIdleEPLIFO[3];\nOTLIFO*\t\t\t\tgIdleEPs[3];\nSInt32              gIdleEPCounter[3];\nOTLIFO\t\t\t\tgBrokenEPLIFO;\nOTLIFO*\t\t\t\tgBrokenEPs\t\t\t\t\t= &gBrokenEPLIFO;\nOTLIFO\t\t\t\tgAllEPLIFO;\nOTLIFO*\t\t\t\tgAllEPs\t\t\t\t\t    = &gAllEPLIFO;\n\nOTNotifyUPP DNSNotifierUPP,NotifierSocketUPP,NotifierSocketUDPUPP,NotifierSocketListenerUPP;\n\n\n/*** Private TCP Socket Functions ***/\n\n/*** Private Resolver Functions ***/\nstatic void \t\tResolverInitialize();\nstatic void\t\t    ResolverTerminate(void);\nstatic void \t\tResolverStart ();\n\n/*** Other Private Functions ***/\nvoid               CFMTerminate (void);\nstatic Boolean\t   DestroyAllOpenSockets(void);\nstatic Boolean\t   SocketValid(SocketPtr s);\nstatic Boolean     PortNumberValid(InetPort port) ;\nstatic SInt32      unmapStatus(EPInfo *);\nstatic void        Recycle();\nstatic void        makeEPIdle(EPInfo *epi);\nstatic void        purgeReadBuffers(EPInfo *epi);\nstatic void        makeEPBrokenThenIdle(EPInfo* epi,OTResult error);\nstatic void        makeEPBroken(EPInfo* epi,OTResult error);\nstatic EPInfo*     getOrMakeMeAnEP(UInt8 aSocketType,short counter);\nstatic Boolean     makeMeAnEP(UInt8 aSocketType);\nstatic void        attemptToCloseAndDeleteThisEP (EPInfo *epi);\nstatic void\t\t   makeEPUnconnected(EPInfo* epi);\nstatic void        SetEPLastError(EPInfo* epi,OTResult error);\nstatic void        TapAllInterestedSemaphores(EPInfo *epi);\nint \t\t\t\tsocketInit(void);\nint \t\t\t\tsocketShutdown(void);\n\n\nstatic pascal void  DNSNotifier(void* context, OTEventCode event, OTResult result, void* cookie);\nstatic pascal void  NotifierSocket(void* context, OTEventCode event, OTResult result, void* cookie);\nstatic pascal void  NotifierSocketUDP(void* context, OTEventCode event, OTResult result, void* cookie);\nstatic pascal void  NotifierSocketListener(void* context, OTEventCode event, OTResult result, void* cookie);\nstatic SInt32       internalSocketCreate(SocketPtr s, SInt32 netType, SInt32  socketType, SInt32 recvBufSize, SInt32 sendBufSize, SInt32 semaIndex, SInt32 readSemaIndex, SInt32 writeSemaIndex, UInt8 aExtraSocketHint);\nstatic Boolean\t\tEPOpen(EPInfo* epi);\nstatic Boolean \t\tEPClose(EPInfo*);\nstatic void         DoListenAccept(EPInfo* acceptor,EPInfo* theServer);\nstatic void         DoConnect(EPInfo* epi,InetHost addr, InetPort port);\nstatic void         DoBind(EPInfo* epi,InetHost addr, InetPort port,UInt8 aExtraSocketHint, OTQLen queueDepth );\nstatic UInt32       ReadData(EPInfo* epi, char* specialBuffer, UInt32 specialBufferSize);\nstatic OTResult     SendData(EPInfo* epi, char* buffer, UInt32 size);\nstatic OSStatus     doAbortConnection(EPInfo* epi);\nstatic void         NoCopyReceiveWalkingBufferChain(EPInfo *epi,OTBufferInfo *bufferInfo);\nstatic UInt32       readBytes(EPInfo* epi,char *buf,UInt32 adjustedBufSize);\nstatic UInt32       readBytesUDP(EPInfo* epi,InetAddress *fromAddress, int *moreFlag, char *buf,UInt32 adjustedBufSize);\nstatic SInt32\t    lookupOptionName(EPInfo *epi, Boolean trueIfGet, char *aString, UInt32 value, SInt32 *result);\nstatic OTResult     SetEightByteOption(EPInfo* epi, Boolean trueIfGet, OTXTILevel level,  OTXTIName  name, char * value, SInt32    *result);\nstatic OTResult     SetFourByteOption(EPInfo* epi, Boolean trueIfGet, OTXTILevel level,  OTXTIName  name, UInt32 value, SInt32    *result);\nstatic OTResult     SetOneByteOption(EPInfo* epi, Boolean trueIfGet, OTXTILevel level,  OTXTIName  name, UInt32 value, SInt32    *result);\nstatic OTResult     SetKeepAliveOption(EPInfo* epi, Boolean trueIfGet, OTXTILevel level,  OTXTIName  name, UInt32 value, SInt32    *result);\nstatic OTResult     SetLingerOption(EPInfo* epi, Boolean trueIfGet, OTXTILevel level,  OTXTIName  name, UInt32 value, SInt32    *result);\n\n// Some diagnostic routines\n\nvoid JMMLogMessage(Str255 input);\nvoid JMMLogMessageAndNumber(Str255 msg,long number);\nvoid JMMWriteLog();\n\n/*** Network Functions ***/\n\nint socketInit() {\n\t//\n\t//Don't actually do any network work until we are newworked initialized\n\t//This prevents kicking off internet dialup connections until needed\n\t//\n\treturn true;\n}\n\nint socketShutdown() {\n\tCFMTerminate();\n\treturn true;\n}\n\nint sqNetworkInit(int resolverSemaIndex) {\n\n\t//\n\t//  Initialize the network and return 0 if successful\n\t//  Loads Open transport, allocates memory for read buffers and various other tasks\n\t//\n\t\n\tSInt32              i;\n\tOSStatus            err = noErr;\n\tInetInterfaceInfo   interfaceInformation;\n\tUInt8               aSocketType;\n    ReadBuffer          *readBufferObject;\n    long\t\t\t\tcheck68KorPPC;\n\t    \n\tif (gthisNetSession != 0) return 0;  /* noop if network is already initialized */\n\t\n\n#if TARGET_API_MAC_CARBON\n\terr = InitOpenTransportInContext (kInitOTForExtensionMask, &gClientContext);\n#else\n\terr = InitOpenTransport(); \n#endif\n\tif (err) return -1;\n\n\t\t\n\terr = Gestalt(gestaltOpenTptVersions, (long*) &gOTVersion);\n\t\n\tif (err || (gOTVersion < kOTVersion112))\n\t{\n\t\t// Please install Open Transport 1.1.2 or later\n\t\t// This might change to 1.3 since tech notes talked about \n\t\t// previous versions having problems with acksend logic.\n\t\t//\n\t\treturn -111;\n\t}\n\t\n\terr = Gestalt(gestaltSysArchitecture, (long*) &check68KorPPC);\n\tgProgramState = kProgramRunning;\n\n    // \n    //Setup the head of the idle queues\n    //\n    \n\tfor (i=0;i<3;i++) {\n\t    gIdleEPs[i] = &gIdleEPLIFO[i];\n\t    gIdleEPs[i]->fHead\t   = NULL;\n\t    gIdleEPCounter[i]      = 0;\n\t}\n\tgBrokenEPs->fHead \t\t= NULL;\n\tgFreeReadBuffers->fHead = NULL;\n\tgAllEPs->fHead          = NULL;\n\t\n\t\n\tgMaxConnections\t\t\t= 24; // Build 8 of each of listeners, tcp, udp.\n\t\n    DNSNotifierUPP = NewOTNotifyUPP(DNSNotifier);\n    NotifierSocketUPP = NewOTNotifyUPP(NotifierSocket);\n    NotifierSocketUDPUPP = NewOTNotifyUPP(NotifierSocketUDP);\n    NotifierSocketListenerUPP = NewOTNotifyUPP(NotifierSocketListener);\n\n\t\n#if TARGET_API_MAC_CARBON\n\tgDNSResolver = (EPInfo*) OTAllocMemInContext(sizeof(EPInfo), gClientContext);\n#else\n\tgDNSResolver = (EPInfo*) OTAllocMem(sizeof(EPInfo));\n#endif\n\tif (gDNSResolver == NULL) return -1;\n\t\t\n\tgDNSResolverSemaIndex = resolverSemaIndex;\n\tResolverInitialize();\n\t\n\t/* Get MTU and default selected host address */\n\t\n\tOTInetGetInterfaceInfo (&interfaceInformation,kDefaultInetInterface);\n    gmtuSize = interfaceInformation.fIfMTU;\n    \n\t\n\t//\n\t//\tOpen endpoints \n\t//\n\tgCfgMastertcp = OTCreateConfiguration(kTCPName);\n\tif (gCfgMastertcp == NULL) return -3;\n\t\n\tgCfgMasterudp = OTCreateConfiguration(kUDPName);\n\tif (gCfgMasterudp == NULL) return -4;\n\t\n\tgCfgMasterListener = OTCreateConfiguration(\"tilisten, tcp\"); //Note use of special tilisten logic\n\tif (gCfgMasterListener == NULL) return -5;\n\t\n\t//\n\t//Build all our EPs, lots of work happens lower down asyncronously\n\t//\n\taSocketType = TCPSocketType;\n\tfor (i = 0; i < gMaxConnections; i++)\t{\n\t\tmakeMeAnEP(aSocketType);\n\t\taSocketType = ++aSocketType > 2 ? TCPSocketType : aSocketType;\n\t} \n\t\n#ifdef OTSERVER\n\tfor (i = 0; i < 256; i++)\t{\n\t\tmakeMeAnEP(TCPSocketType);\n\t} \n#endif\n\n\t//\n\t//Build storage objects for read buffers\n\t//How much memory to allocate still is a mystery\n\t//\n    for (i=0;i<kReadBuffersToAllocate ;i++) { \n#if TARGET_API_MAC_CARBON\n        readBufferObject = OTAllocMemInContext(sizeof(ReadBuffer), gClientContext);\n#else\n        readBufferObject = OTAllocMem(sizeof(ReadBuffer));\n#endif\n        if (readBufferObject == nil) {\n       \t    interpreterProxy->success(false);\n            return -25;\n        } \n        \n        OTMemzero(readBufferObject,sizeof(ReadBuffer));\n        if (gestalt68k == check68KorPPC) \n        \treadBufferObject->readBufferOriginalSize = (gmtuSize > 0) ? gmtuSize*2 : 1024;\n        else\n        \treadBufferObject->readBufferOriginalSize = (gmtuSize > 0) ? gmtuSize*4 : 1024;\n        \n#if TARGET_API_MAC_CARBON\n       readBufferObject->readBufferData = readBufferObject->readBufferPtr = OTAllocMemInContext(readBufferObject->readBufferOriginalSize, gClientContext);\n#else\n       readBufferObject->readBufferData = readBufferObject->readBufferPtr = OTAllocMem(readBufferObject->readBufferOriginalSize);\n#endif\n        if ( readBufferObject->readBufferData == nil) {\n       \t    interpreterProxy->success(false);\n            return -25;\n        }\n\n        OTLIFOEnqueue(gFreeReadBuffers, &readBufferObject->fNext);\n\t\tgFreeReadBuffersCounter++;\n    }\n\n\n\t/* Success! Create a session ID that is unlikely to be\n\t   repeated. Zero is never used for a valid session number.\n\t*/\n\tgthisNetSession = ioLowResMSecs() + time(NULL);\n\tif (gthisNetSession == 0) gthisNetSession = 1;  /* don't use 0 */\n\t\n\treturn 0;\n}\n\n\nvoid CFMTerminate (void)    /* termination either via a CFM or Squeak call*/\n{ \n    sqNetworkShutdown();\n}\n\n\nvoid sqNetworkShutdown(void) {\n\t/* shut down the network */\n    \n\tif (gthisNetSession == 0) return;  /* noop if network is already shut down */\n\tgthisNetSession = 0;\n\tgProgramState = kProgramDone;\n\tDestroyAllOpenSockets();\n#if TARGET_API_MAC_CARBON\n\tCloseOpenTransportInContext(gClientContext); \n#else\n\tCloseOpenTransport(); \n#endif\n}\n\n\n/*** Resolver Functions ***/\n\n\nstatic void\tResolverInitialize() \n{\n\tOSStatus err;\n\t\n\t//\n\t//\tPrepare to open internet services\n\t//  to invoke DNR services\n\t//\n\t\n\tOTMemzero(gDNSResolver, sizeof(EPInfo));\t\n#if TARGET_API_MAC_CARBON\n    gDNSResolver->erf = OTOpenInternetServicesInContext(kDefaultInternetServicesPath, 0, &err, gClientContext);\n#else\n    gDNSResolver->erf = OTOpenInternetServices(kDefaultInternetServicesPath, 0, &err);\n#endif\n    gDNSResolver->semaIndex = gDNSResolverSemaIndex;\n\t\n\tif (err != kOTNoError) {\n\t\tgDNSResolverStatus = RESOLVER_ERROR;\n\t\tgDNSResolverError = err;\n\t\treturn;\n\t}\n\tgDNSResolverStatus = RESOLVER_SUCCESS;\n\tgDNSResolverError = kOTNoError;\n\n    err =  OTSetAsynchronous(gDNSResolver->erf);\n    err =  OTSetNonBlocking(gDNSResolver->erf);\n    err =  OTInstallNotifier(gDNSResolver->erf, DNSNotifierUPP, gDNSResolver);\n}\n\nstatic void ResolverStart () {\n\tOSStatus err;\n\t//\n\t// Invoke DNR service Async, this meants the DNSNotifier will handle the actual \n\t// lookup and work, flags like the gDNSResolverStatus are used to indicate back\n\t// to Squeak when the work is done\n\t//\n\tif (gDNSResolver->erf == NULL) //Sleep fix, other endpoints are more explicit about this issue. \n\t    ResolverInitialize();\n\t    \n\tgDNSResolverStatus  = RESOLVER_BUSY;\n\tswitch (gDNSLookupType) {\n\t\tcase RESOLVER_NAMETOADDR: {\n\t\t    err = OTInetStringToAddress((InetSvcRef)gDNSResolver->erf, gDNSAddrStr, &gDNSHostInfo);\n\t\t\tbreak;\n\t\t}\n\t\tcase RESOLVER_ADDRTONAME: {\n\t\t\terr = OTInetAddressToName((InetSvcRef)gDNSResolver->erf, gDNSAddr, gDNSAddrStr);\n\t\t\tbreak;\n\t\t}\n    }\n\tif (err != kOTNoError)  {\n\t\tgDNSResolverStatus = RESOLVER_ERROR;\n\t\tgDNSResolverError = err;\n\t}\n}\n\nvoid ResolverTerminate(void) {\n    //JMM if the resolver is opening what happens?\n \tgDNSResolverStatus = RESOLVER_UNINITIALIZED;\n   \n\tif (gDNSResolver->erf == NULL) return;\n\tEPClose(gDNSResolver);\n\tOTMemzero(gDNSResolver, sizeof(EPInfo));\n}\n\nvoid sqResolverAbort(void) {\n\t//\n\t// Abort this running resolver request\n\t//\n\n\tif (gDNSResolverStatus == RESOLVER_BUSY) {\n\t\tResolverTerminate();\n\t\tResolverInitialize();\n\t}\n}\n\nvoid sqResolverAddrLookupResult(char *nameForAddress, int nameSize) {\n\t//\n\t// copy the name found by the last address lookup into the given string \n\t//\n\t\n\tOTMemcpy(nameForAddress, gDNSAddrStr, (UInt32) nameSize);\n\t\n}\n\nint sqResolverAddrLookupResultSize(void) {\n\t//\n\t// return the length of the looked up name\n\t//\n\treturn (long) strlen(gDNSAddrStr);\n}\n\nint sqResolverError(void) {\n\t//\n\t// Return OT error number\n\t//\n\treturn gDNSResolverError; \n}\n\nint sqResolverLocalAddress(void) {\n    //\n    // Watch out for dynamic changing of this information, so don't cache\n    //\n\tInetInterfaceInfo interfaceInformation;\n\n\tOTInetGetInterfaceInfo (&interfaceInformation,kDefaultInetInterface);\n\tgDNSResolverStatus = RESOLVER_SUCCESS;\n\tgDNSResolverError  = noErr;\n\treturn (long) interfaceInformation.fAddress;\n}\n\nint sqResolverNameLookupResult(void) {\n\t//\n\t// Return address from last lookup\n\t//\n    \n\treturn (int) gDNSAddr;\n}\n\nvoid sqResolverStartAddrLookup(int address) {\n\t//\n\t// start process to lookup name from address\n\t//\n    \n\tif (gDNSResolverStatus == RESOLVER_BUSY) return;\n\n\tgDNSAddr            = (InetHost) address;\n    gDNSLookupType      = RESOLVER_ADDRTONAME;\n\tResolverStart();\n}\n\nvoid sqResolverStartNameLookup(char *hostName, int nameSize) {\n\t//\n\t// start process to lookup address from name\n\t//\n    \n\tUInt32 len; \n\n\tif (gDNSResolverStatus == RESOLVER_BUSY) return;\n\n\tlen = (UInt32) ((nameSize <= kMaxHostNameLen) ? nameSize : kMaxHostNameLen);  //Old limit was 500  but that appeared to be wrong\n\tOTMemcpy(gDNSAddrStr, hostName, len);\n\tgDNSAddrStr[len]    = '\\0';\n    gDNSLookupType      = RESOLVER_NAMETOADDR;\n\tResolverStart();\n\t\n}\n\nint sqResolverStatus(void) {\n\t//\n\t// return resolver status, this is different from resolver error code\n\t// status is the same among implementations, error is implementation dependent\n\t//\n    \n\treturn gDNSResolverStatus;\n}\n\n//================================\n\n// Socket logic \n//\n\nvoid\tsqSocketCreateNetTypeSocketTypeRecvBytesSendBytesSemaID(\n\t\t\tSocketPtr s, int netType, int socketType,\n\t\t\tint recvBufSize, int sendBufSize, int semaIndex) {\n\t\t\t\n\t//\n\t//Old call from old image using new VM\n\t//Just make new call\n\t//\n\tsqSocketCreateNetTypeSocketTypeRecvBytesSendBytesSemaIDReadSemaIDWriteSemaID(\n  \t\t s,  netType,  socketType, recvBufSize,  sendBufSize,  semaIndex,  semaIndex,  semaIndex);\n}\n\nvoid sqSocketCreateNetTypeSocketTypeRecvBytesSendBytesSemaIDReadSemaIDWriteSemaID(\n  SocketPtr s, int netType, int socketType,\n  int recvBufSize, int sendBufSize, int semaIndex, int readSemaIndex, int writeSemaIndex)\t{\n     OSErr error; \n     netType; recvBufSize; sendBufSize;\n    \n    \n    //\n    //Create a socket given the supplied information\n    //We don't bind the socket to a local port  until \n    //we do the connection. This of course could change? \n    //\n    \n    error = internalSocketCreate( s, netType, socketType, recvBufSize,  sendBufSize, semaIndex, readSemaIndex, writeSemaIndex, (UInt8) socketType);\n    if (error != noErr) {\n\t\tinterpreterProxy->success(false); \n        return;   \n    }\n\n}\n\nstatic SInt32 internalSocketCreate(\n  SocketPtr s, SInt32 netType, SInt32 socketType,\n  SInt32 recvBufSize, SInt32 sendBufSize, SInt32 semaIndex, SInt32 readSemaIndex, SInt32 writeSemaIndex, UInt8 aExtraSocketHint)\t{\n  //\n  // Internal logic to open a socket for a connection or to listen\n  // Note how we ignore buffer sizes!\n  //\n    EPInfo*     epi;\n    socketType; netType; recvBufSize; sendBufSize;\n    \n    //\n    //Make the socket invalid and then get an idle EP\n    //Technically we only run out of EP when we run out of memory\n    //\n    \n\ts->sessionID = 0;\n\tif (gProgramState != kProgramRunning ) {\t\t\n\t    interpreterProxy->success(false);\n        return -1;\n    }\n\n\tepi = getOrMakeMeAnEP(aExtraSocketHint,0);\n\tif (epi == NULL) {\n\t\tinterpreterProxy->success(false);\n\t\treturn -1;\n\t}\n\n\tepi->outstandingSends   = 0;\n\tepi->bytesPendingToRead = 0;\n\tepi->semaIndex          = semaIndex;\n\tepi->readSemaIndex      = readSemaIndex;\n\tepi->writeSemaIndex     = writeSemaIndex;\n\tepi->stateFlags         = 0;\n\tepi->stateFlags2        = 0;\n\tepi->stateFlags3        = 0;\n\tSetEPLastError(epi,noErr);\n\tepi->socketType        = aExtraSocketHint;\n\tOTInitInetAddress(&epi->remoteAddress, 0, 0);\n    OTInitInetAddress(&epi->localAddress, 0, 0);\n    \n    if (aExtraSocketHint == UDPSocketType)\n        OTAtomicSetBit(&epi->stateFlags, kConnected); //udp is always connected\n     else\n        OTAtomicSetBit(&epi->stateFlags, kUnConnected);\n \n \ts->sessionID            = gthisNetSession;\n\ts->socketType           = (aExtraSocketHint == UDPSocketType) ? UDPSocketType : TCPSocketType;\n\ts->privateSocketPtr     = epi;\n\tgSocketsAllocated++;\n\treturn 0;\n}\n\nvoid sqSocketListenOnPort(SocketPtr s, int port) {\n    //\n    //Listen on port for a connection, this is not the approved method\n    //sqSocketListenOnPortBacklogSize is the best way if you are a server\n    //However this works ok for UDP and kinda for onetime connections in TCP\n    //\n    EPInfo* epi;\n\n\tif (!SocketValid(s) || !PortNumberValid((InetPort) port)) return;\n\tepi = (EPInfo *) s->privateSocketPtr;\n\tif (s->socketType == TCPSocketType) {\n\t\tDoBind(epi,0,(InetPort) port,TCPListenerSocketType,1);\n\t\tif (port != 0 && epi->localAddress.fPort != port) {//We die if we don't get the port we want\n            sqSocketDestroy(s);\n    \t    interpreterProxy->success(false);\n\t\t}\n\t} else {//udp\n\t\tDoBind(epi,0,(InetPort) port,UDPListenerSocketType,1);\n\t}\n\n}\nvoid\tsqSocketListenOnPortBacklogSize(SocketPtr s, int port, int backlogSize) {\n\tsqSocketListenOnPortBacklogSizeInterface(s, port, backlogSize, 0);\n}\n\nvoid\tsqSocketListenOnPortBacklogSizeInterface(SocketPtr s, int port, int backlogSize, int addr) {\n\n    EPInfo* epi;\n\tSInt32 sema,readSema,writeSema;\n\tOSErr error;\n    //\n    //Listen on port for a connection, this is the best method if you are\n    //a server. Works in conjunction with accept. Shouldn't drop connections\n    //OT's special listener logic queues up the listen requestions\n    //\n\tif (!SocketValid(s) || !PortNumberValid((InetPort) port)) return;\n\tif (s->socketType == TCPSocketType) {\n\t\tepi = (EPInfo *) s->privateSocketPtr;\n\t\tsema = epi->semaIndex; readSema = epi->readSemaIndex; writeSema = epi->writeSemaIndex;\n\t    makeEPIdle(epi); //Special case really need a listener EP, so put this EP back on the queue\n\t    \t\t\t\t //This may seem odd but the epi is allocated before we know what type it is.\n\t    \t\t\t\t //Would need to change Squeak to indicate type at creation!\n\t\terror = internalSocketCreate( s, 0, TCPSocketType, 0,  0, sema, readSema, writeSema, TCPListenerSocketType);\n\t\tif (error != noErr) {\n            interpreterProxy->success(false); \n            return;   \n\t\t}\n        epi = (EPInfo *) s->privateSocketPtr;\n\t\tDoBind(epi,addr,(InetPort) port,TCPListenerSocketType,(OTQLen) backlogSize);\n\t\tif (port != 0 && epi->localAddress.fPort != port) {//The port we wanted must match, otherwise we die\n\t\t    sqSocketDestroy(s);\n    \t    interpreterProxy->success(false);\n\t\t}\n\t} else {//udp not allowed\n       \t    interpreterProxy->success(false);\n\t}\n}\n\nvoid\tsqSocketAcceptFromRecvBytesSendBytesSemaID(\n\t\t\tSocketPtr s, SocketPtr serverSocket,\n\t\t\tint recvBufSize, int sendBufSize, int semaIndex){\n\t//\n\t//Old call from old image using new VM\n\t//Just make new call\n\t//\n\n\tsqSocketAcceptFromRecvBytesSendBytesSemaIDReadSemaIDWriteSemaID(\n\t\t\t s,  serverSocket,  recvBufSize,  sendBufSize,  semaIndex,  semaIndex,  semaIndex);\n\t\t\n}\nvoid\tsqSocketAcceptFromRecvBytesSendBytesSemaIDReadSemaIDWriteSemaID(\n\t\t\tSocketPtr s, SocketPtr serverSocket,\n\t\t\tint recvBufSize, int sendBufSize, int semaIndex, int readSemaIndex, int writeSemaIndex) {\n\t//\n\t//Accept incoming request from a listener\n\t//We take information from the listener, create a new socket\n\t//and accept the incoming call\n\t//\n\t\n    EPInfo* epiSocket;\n    EPInfo* epiServerSocket;\n    Boolean\tdoLeave;\n    OSErr   error;\n    long\tcount=0;\n    \n\tif (!SocketValid(serverSocket)) return;\n\tif (serverSocket->socketType == TCPSocketType) {\n            error = internalSocketCreate( s, 0, TCPSocketType, recvBufSize,  sendBufSize, semaIndex, readSemaIndex, writeSemaIndex, TCPSocketType);\n\t\t    if (error != noErr) {\n        \t\tinterpreterProxy->success(false); \n\t\t        return;   \n\t\t    }\n\t\t    epiSocket = (EPInfo *) s->privateSocketPtr;\n    \t\tDoBind(epiSocket,0,0,TCPSocketType,0); // interrupt driven to  T_TBINDCOMPLETE\n    \t\twhile (count++ < 100 && (OTAtomicTestBit(&epiSocket->stateFlags3, kWaitingForBind) == true)) {\n#ifndef TARGET_API_MAC_CARBON\n\t\t\t    SystemTask();\n#endif\n\t\t\t    OTIdle();\n            }\n\t\t    OTAtomicSetBit(&epiSocket->stateFlags2, kPassconNeeded);\n\t\t    epiServerSocket = (EPInfo *) serverSocket->privateSocketPtr;\n\t\t\tOTAtomicSetBit(&epiServerSocket->stateFlags, kWaitingForConnection);\n\t\t\tOTAtomicSetBit(&epiServerSocket->stateFlags, kUnConnected);\n            OTAtomicClearBit(&epiServerSocket->stateFlags, kConnected);\n    \t    OTAtomicSetBit(&epiServerSocket->stateFlags2, kTapSemaphore);\n        \t\n        \tdoLeave = OTEnterNotifier(epiServerSocket->erf);\n        \tDoListenAccept(epiSocket,epiServerSocket);\n        \tif (doLeave)\n        \t\tOTLeaveNotifier(epiServerSocket->erf);\n\t} else { //udp\n\t\tinterpreterProxy->success(false); \n\t}\n}\n\nvoid sqSocketConnectToPort(SocketPtr s, int addr, int port) {\n    //\n    //Connect this socket to the given host addr and port\n    //\n    EPInfo* epi;\n\tOTResult\tepState;\n\n\tif (!SocketValid(s) || !PortNumberValid((InetPort) port)) return;\n\tepi = (EPInfo *) s->privateSocketPtr;\n\tif (s->socketType == TCPSocketType) {\n    \tDoBind(epi,(InetHost) addr,(InetPort) port,TCPSocketType,0); // interrupt driven to  T_TBINDCOMPLETE which drives T_CONNECT/DoConnect\n\t} else {//udp\n\t\tepState = OTGetEndpointState(epi->erf);\n\t\tif (epState == T_UNBND) {//Bind to remote, our side gets wildcarded\n    \t    DoBind(epi,(InetHost) addr,(InetPort) port,UDPSocketType,0); // interrupt driven to  T_TBINDCOMPLETE which drives T_CONNECT/DoConnect\n    \t} else {//Already bound to a port/interface on our side\n    \t    OTInitInetAddress(&epi->remoteAddress, (InetPort) port, (InetHost) addr);\n    \t}\n\t}\n}\n\n\nint sqSocketSendDataBufCount(SocketPtr s, char * buf, int bufSize) {\n\t//\n\t// Send data really fast\n\t// We create a copy of the data and give it to OT to play with\n\t// We can get flow controlled lower down, if no flow control then we\n\t// tap the semiphore since from squeaks viewpoint data is sent, otherwise when flow control is lifted the\n\t// semaphore is tapped in the notification routine\n\t//\n\tOTResult res ;\n    EPInfo* epi;\n    Boolean doLeave;\n    char * buffer;\n \tUInt32 adjustedBufSize = bufSize > 65536 ? 65536 : (UInt32) bufSize; //? Not sure if we really need to do this limiting.\n   \t\n\tif (!SocketValid(s)) return -1;\n\t\n\tepi = (EPInfo *) s->privateSocketPtr;\n\t\n\t// If send is blocked wait for unblocking\n\tif (OTAtomicTestBit(&epi->stateFlags, kSendIsBlocked)) {\n\t    return 0;\n\t}\n\n    if (epi->socketType == UDPSocketType) {\n        //UDP adjust the buffer size again\n        adjustedBufSize = (adjustedBufSize > epi->UDPMaximumSize) ?   epi->UDPMaximumSize : adjustedBufSize;\n     }\n\n#if TARGET_API_MAC_CARBON\n\tbuffer = OTAllocMemInContext(adjustedBufSize, gClientContext);\n#else\n\tbuffer = OTAllocMem(adjustedBufSize);\n#endif\n\tif (buffer == nil) {\n\t\t//Well maybe we back off and wait awhile? \n\t\t//If we run out of memory and stress the box, well death lurks.\n\t\tadjustedBufSize = 256;\n#if TARGET_API_MAC_CARBON\n\t\tbuffer = OTAllocMemInContext(adjustedBufSize, gClientContext);\n#else\n\t\tbuffer = OTAllocMem(adjustedBufSize);\n#endif\n\t\tif (buffer == nil) {\n\t\t    interpreterProxy->success(false); //Death did lurk\n\t        SetEPLastError(epi, -1);\n\t        return -1;\n\t    } \n\t}\n\t\t\n\tOTMemcpy(buffer,(void*) buf,adjustedBufSize);\n    \n\tdoLeave = OTEnterNotifier(epi->erf);  //Avoid race condition for T_GODATA\n    res = SendData(epi,buffer,adjustedBufSize);  \t\n  \tif (doLeave)\n\t\tOTLeaveNotifier(epi->erf);\n\t\t\n  \tif (res < 0 ){\n\t    SetEPLastError(epi, res);\n\t\tinterpreterProxy->success(false); //JMM just for testing\n\t    return 0;\n\t}\n\treturn res;\n}\n\n//\n//New primitive for sending UDP data to a particular host/port\n//Avoids race conditions between binding and send in Smalltalk\n//\n\nint sqSockettoHostportSendDataBufCount(SocketPtr s, int address, int port, char * buf, int bufSize) {\n sqSocketConnectToPort(s, address, port);\n return sqSocketSendDataBufCount(s, buf, bufSize);\n}\n\n//\n//Abort the socket\n//\nvoid sqSocketAbortConnection(SocketPtr s) {\n    EPInfo* epi;\n   OSStatus err;\n \n\tif (!SocketValid(s)) return;\n    if (s->socketType == UDPSocketType) {\n\t\tinterpreterProxy->success(false); \n        return;\n    }\n\tepi = (EPInfo *) s->privateSocketPtr;\n\terr = doAbortConnection(epi);\n}\n\n//\n//Acutal abort logic\n//We need to flush the queues\n//Then do a disconnect\n//\nstatic OSStatus doAbortConnection(EPInfo* epi) {\n   SInt32\t\tcount = 0;\n   OSStatus     err = kOTNoError;\n \n\tif ( OTAtomicSetBit(&epi->stateFlags2, kFlushDisconnectInProgressBit) == 0 ) {\n\t\t//Do flush and wait for it to happen\n\t\t//Should make sync?\n\t\t//\n\t\tif (epi->outstandingSends != 0) {\n\t\t    err = OTIoctl(epi->erf, I_FLUSH, (void *)FLUSHRW);\n\t\t    while (count++ < 100 && (epi->outstandingSends != 0 || OTAtomicTestBit(&epi->stateFlags, kUnConnected) == false)) {\n\t\t\t    OTIdle();\n            }\n\t    }\n        makeEPBroken(epi,0);\n\t    err = OTSndDisconnect(epi->erf, NULL);\n\t}\n\t    \n\tif (err != kOTNoError) \n\t    return err;\n\telse\n        return epi->lastError;\n}\n\n//\n//Socket close logic\n//\nvoid sqSocketCloseConnection(SocketPtr s) {\n    EPInfo* epi;\n    OSStatus err; \n\tOTResult\tepState;\n\tOTResult\tlookResult;\n    \n\tif (!SocketValid(s)) return;\n\tepi = (EPInfo *) s->privateSocketPtr;\n    if (s->socketType == UDPSocketType) {//Handle udp and return\n        OTAtomicClearBit(&epi->stateFlags, kThisEndClosed);\n        OTAtomicClearBit(&epi->stateFlags, kConnected);\n        OTAtomicClearBit(&epi->stateFlags, kOtherEndClosed);\n        OTAtomicSetBit(&epi->stateFlags, kUnConnected);\n        OTAtomicSetBit(&epi->stateFlags2, kTapSemaphore);\n\t\terr = OTUnbind(epi->erf);\n\t\tif (err != kOTNoError) { //kOTLookErr with T_DATA, book says response is to zap EP.\n\t\t    makeEPBroken(epi,err);\n\t\t}\n\t    TapAllInterestedSemaphores(epi);\n\t    return;\n    }\n\n    OTAtomicSetBit(&epi->stateFlags, kThisEndClosed);\n    OTAtomicSetBit(&epi->stateFlags2, kTapSemaphore);\n\t// old code is sync and doesn't trigger semaphore \n\t\n\tepState = OTGetEndpointState(epi->erf);\n\tif (epState == T_UNINIT || epState == T_UNBND ) {\n        OTAtomicSetBit(&epi->stateFlags, kThisEndClosed);\n        OTAtomicClearBit(&epi->stateFlags, kConnected);\n        OTAtomicClearBit(&epi->stateFlags, kOtherEndClosed);\n \t    TapAllInterestedSemaphores(epi);\n\t    return;\n\t}\n\telse\n\t    err = OTSndOrderlyDisconnect(epi->erf);\n\t    \n\tif (err == kOTNoError) {\n        if (OTAtomicTestBit(&epi->stateFlags, kOtherEndClosed)) {\n\t        OTAtomicClearBit(&epi->stateFlags, kThisEndClosed);\n\t        OTAtomicClearBit(&epi->stateFlags, kConnected);\n\t        OTAtomicClearBit(&epi->stateFlags, kOtherEndClosed);\n\t        OTAtomicSetBit(&epi->stateFlags, kUnConnected);\n\t        if (epi->outstandingSends != 0)\n\t            doAbortConnection(epi);\n\n\t\t\terr = OTUnbind(epi->erf);\n\t\t\tif (err != kOTNoError) { //kOTLookErr with T_DATA, book says response is to zap EP.\n\t\t\t    makeEPBroken(epi,err);\n\t\t\t}\n    \t    TapAllInterestedSemaphores(epi);\n        }\n\t} else {// Could get kOTLookErr with T_DISCONNECT pending \n\t\tlookResult = OTLook(epi->erf); \n\t\tif (err == kOTLookErr && lookResult == T_DISCONNECT) {\n        \terr = OTRcvDisconnect(epi->erf, NULL);\n\t        OTAtomicClearBit(&epi->stateFlags, kThisEndClosed);\n\t        OTAtomicClearBit(&epi->stateFlags, kConnected);\n\t        OTAtomicClearBit(&epi->stateFlags, kOtherEndClosed);\n\t        OTAtomicSetBit(&epi->stateFlags, kUnConnected);\n\t        if (epi->outstandingSends != 0)\n\t            doAbortConnection(epi);\n\n\t\t\terr = OTUnbind(epi->erf);\n\t\t\tif (err != kOTNoError) { //kOTLookErr with T_DATA, book says response is to zap EP.\n\t\t\t    makeEPBroken(epi,err);\n\t\t\t}\n    \t    TapAllInterestedSemaphores(epi);\n        }\n        else {\n            SetEPLastError(epi,err);\n    \t\tmakeEPBroken(epi,err);\n            TapAllInterestedSemaphores(epi);\n       }\n\t}\n}\n\n//\n//Destroy the socket here we must ensure we cleanup and put the \n//socket back on the idle or broken EP queue\n//\nvoid sqSocketDestroy(SocketPtr s) {\n    OTResult err;\n    EPInfo* epi;\n\tOTResult\tepState;\n\n    JMMWriteLog(); //Diagnostics, turned off, must fiddle recompile to turn on.\n    \n  \n    if (!SocketValid(s)) {\n    \treturn; \n    }\n\tepi = (EPInfo *) s->privateSocketPtr;\n   OTAtomicSetBit(&epi->stateFlags2, kMakeEPIdle); \n\tepState = OTGetEndpointState(epi->erf);\n\tif (epState == T_UNINIT || epState == T_UNBND ) {\n\t    makeEPIdle(epi); //Unbound already so make him idle.\n\t} else {\n\t    if (s->socketType == UDPSocketType)\n\t\t\terr = OTUnbind(epi->erf);\n\t    else \n\t\t    err = doAbortConnection(epi);\n\t\n\t\tif (err != kOTNoError) {//kOTLookErr with T_DATA, book says response is to zap EP.\n\t\t    makeEPBrokenThenIdle(epi,err);\n\t\t}\n\t}\n\tpurgeReadBuffers(epi); //JMM Oct 4th 2000 (bug?)\n\ts->sessionID = 0;\n\ts->socketType = -1;\n\ts->privateSocketPtr = nil;\n\tgSocketsAllocated--;\n }\n\n//\n//Check to see if bytes are available\n//\nint sqSocketReceiveDataAvailable(SocketPtr s)\t\t\t\t\t\t\t\n{\n    EPInfo* epi;\n    static lastTickCount=0;\n\n\tif (!SocketValid(s)) return 0;\n    epi = (EPInfo *) s->privateSocketPtr;\n    if (epi->bytesPendingToRead > 0) \n        return 1;\n   \n    if (OTAtomicTestBit(&epi->stateFlags2, kReadFlowControl)) // New case if data pending but flow controlled then go get it\n        return 1;\n    \n    OTAtomicSetBit(&epi->stateFlags2, kTapSemaphoreReadData); //Note how we imply there will be interest in semaphore\n    return 0;\n}\n\n\n//\n//Read data into the buffer supplied\n//\nint sqSocketReceiveDataBufCount(SocketPtr s, char * buf, int bufSize) {\n    EPInfo* epi;\n \tUInt32  bytesRead = 0;\n    Boolean doLeave;\n    \n\tif (!SocketValid(s)) return -1; \n\t\n\tepi = (EPInfo *) s->privateSocketPtr;\n        \n \tdoLeave = OTEnterNotifier(epi->erf);  //Avoid race condition for T_DATA\n    bytesRead = readBytes(epi,(char *) buf,(UInt32) bufSize);\n    if (OTAtomicTestBit(&epi->stateFlags2, kReadFlowControl)) {\n        if (bytesRead > 0) \n            ReadData(epi,NULL,0); \n        else\n            bytesRead = ReadData(epi,(char *) buf,(UInt32) bufSize); //special case attempt read into squeak buffer\n    }\n  \tif (doLeave)\n\t\tOTLeaveNotifier(epi->erf);\n   \n\treturn (int) bytesRead;\n}\n\n//\n//New primitive to read UDP data and get data, host/port, and more flag\n//\nint sqSocketReceiveUDPDataBufCountaddressportmoreFlag(SocketPtr s, char * buf, int bufSize,  int *address,  int *port, int *moreFlag) {\n    EPInfo* epi;\n \tUInt32 bytesRead = 0;\n    Boolean doLeave;\n    InetAddress fromAddress;\n    \n    OTMemzero(&fromAddress,sizeof(InetAddress));\n    *address  = 0;\n    *port = 0;\n    *moreFlag = 0;\n    \n\tif (!SocketValid(s)) return -1;\n\t\n\tepi = (EPInfo *) s->privateSocketPtr;\n        \n \tdoLeave = OTEnterNotifier(epi->erf);  //Avoid race condition for T_DATA\n    bytesRead   = readBytesUDP(epi,&fromAddress, moreFlag, (char *) buf,(UInt32) bufSize);\n    *address    = fromAddress.fHost;\n    *port       = fromAddress.fPort;\n    if (OTAtomicTestBit(&epi->stateFlags2, kReadFlowControl)) {\n         if (bytesRead > 0) \n            ReadData(epi,NULL,0); \n        else {\n            bytesRead = ReadData(epi,(char *) buf,(UInt32) bufSize);//special case attempt read into squeak buffer\n            *address    = epi->remoteAddress.fHost; //Also we happen to know the address just when into this area\n            *port       = epi->remoteAddress.fPort; //JMM more flag?\n            *moreFlag   = epi->UDPMoreFlag;\n        }\n    }\n  \tif (doLeave)\n\t\tOTLeaveNotifier(epi->erf);\n   \n\treturn (int) bytesRead;\n}\n\nint sqSocketLocalAddress(SocketPtr s) {\n    EPInfo* epi;\n    \n\tif (!SocketValid(s)) return -1;\n\tepi = (EPInfo *) s->privateSocketPtr;\n    return (int) (epi->localAddress.fHost == 0) ? sqResolverLocalAddress() : epi->localAddress.fHost;\n}\n\nint sqSocketLocalPort(SocketPtr s) {\n    EPInfo* epi;\n    \n\tif (!SocketValid(s)) return -1;\n\tepi = (EPInfo *) s->privateSocketPtr;\n\t\n\treturn epi->localAddress.fPort;\n}\n\nint sqSocketRemoteAddress(SocketPtr s) {\n    EPInfo*     epi;\n    TBind       remoteBind;\n    InetAddress remoteAddr;\n    OSStatus    err;\n    Boolean\tisAsync;\n\n\tif (!SocketValid(s)) return -1;\n\tepi = (EPInfo *) s->privateSocketPtr;\n\tif (OTAtomicTestBit(&epi->stateFlags, kUnConnected) && \n\t    !OTAtomicTestBit(&epi->stateFlags, kWaitingForConnection)) \n            return 0;\n\t\n    if (epi->socketType == UDPSocketType) {\n        return (int) epi->remoteAddress.fHost;\n    }\n    \n   if (OTIsSynchronous(epi->erf) == false)\t{\t// check whether ep sync or not\n\t\tisAsync = true;\t\t\t       \t// set flag if async\n\t\tOTSetSynchronous(epi->erf);\t\t// set endpoint to sync\t\n    }\n    //It seems the only reliable way to get the address\n    //Is to make a call\n    //\n    OTMemzero(&remoteBind,sizeof(TBind));\n    OTMemzero(&remoteAddr,sizeof(InetAddress));\n    remoteBind.addr.buf = (UInt8 *) &remoteAddr;\n    remoteBind.addr.maxlen = sizeof(InetAddress);\n    err = OTGetProtAddress(epi->erf,0,&remoteBind);\n\n    if (isAsync)\t\t\t\t        // restore ep state \n        OTSetAsynchronous(epi->erf);\n    \n    if (err != kOTNoError) \n        return 0;\n    else {\n        if ((int) remoteAddr.fHost == 0)\n                return (int) epi->remoteAddress.fHost;\n        return (int) remoteAddr.fHost;\n}\n}\n\nint sqSocketRemotePort(SocketPtr s) {\n    EPInfo* epi;\n    TBind       remoteBind;\n    InetAddress remoteAddr;\n    OSStatus    err;\n    Boolean\tisAsync;\n\n\tif (!SocketValid(s)) return -1;\n\tepi = (EPInfo *) s->privateSocketPtr;\n\tif (OTAtomicTestBit(&epi->stateFlags, kUnConnected) && \n\t    !OTAtomicTestBit(&epi->stateFlags, kWaitingForConnection)) return 0;\n\t\n    if (epi->socketType == UDPSocketType) {\n        return epi->remoteAddress.fPort;\n    }\n    \n   if (OTIsSynchronous(epi->erf) == false)\t{\t// check whether ep sync or not\n\t\tisAsync = true;\t\t\t       \t// set flag if async\n\t\tOTSetSynchronous(epi->erf);\t\t// set endpoint to sync\t\n    }\n    //It seems the only reliable way to get the port\n    //Is to make a call\n    //\n    OTMemzero(&remoteBind,sizeof(TBind));\n    OTMemzero(&remoteAddr,sizeof(InetAddress));\n    remoteBind.addr.buf = (UInt8 *) &remoteAddr;\n    remoteBind.addr.maxlen = sizeof(InetAddress);\n    err = OTGetProtAddress(epi->erf,0,&remoteBind);\n    if (isAsync)\t\t\t\t        // restore ep state \n        OTSetAsynchronous(epi->erf);\n    \n    if (err != kOTNoError) \n        return 0;\n    else {\n        if ((int) remoteAddr.fPort == 0)\n                return (int) epi->remoteAddress.fPort;\n        return (int) remoteAddr.fPort;\n    }\n}\n\n\nint sqSocketSendDone(SocketPtr s) {\n    EPInfo* epi;\n\n\tif (!SocketValid(s)) return 1;\n\tepi = (EPInfo *) s->privateSocketPtr;\n    if (OTAtomicTestBit(&epi->stateFlags, kSendIsBlocked)) {\n\t    OTAtomicSetBit(&epi->stateFlags2, kTapSemaphoreWriteData); //Note the implied intent to use the semaphore\n        return 0;\n    }\n    else {\n        return 1;\n    }\n}\n\nint sqSocketError(SocketPtr s) {\n    EPInfo* epi;\n    \n \tif (!SocketValid(s)) return -1;\n\tepi = (EPInfo *) s->privateSocketPtr;\n    if (OTAtomicTestBit(&epi->stateFlags, kUnConnected)  && \n        !OTAtomicTestBit(&epi->stateFlags, kWaitingForConnection) \n        && epi->lastError == 0)\n\t    return kENOTCONNErr; // old code would return unconnectederror if unconnected\n\telse\n\t    return (epi->lastError);\n}\n\nint sqSocketConnectionStatus(SocketPtr s) {\n\n\tif (!SocketValid(s)) return InvalidSocket;\n\treturn unmapStatus((EPInfo *) s->privateSocketPtr);\n}\n\nstatic SInt32 unmapStatus(EPInfo *s) {\n    if (OTAtomicTestBit(&s->stateFlags3, kSleepKilledMe)) \n        {return  InvalidSocket;\n        }\n    if (OTAtomicTestBit(&s->stateFlags, kThisEndClosed)) \n        {return  ThisEndClosed;\n        }\n    if (OTAtomicTestBit(&s->stateFlags, kOtherEndClosed)) \n        {return  OtherEndClosed;\n        }\n    if (OTAtomicTestBit(&s->stateFlags, kConnected)) \n        { return  Connected;\n        }\n    if (OTAtomicTestBit(&s->stateFlags, kWaitingForConnection)) \n        {return  WaitingForConnection;\n        }\n    if (OTAtomicTestBit(&s->stateFlags, kUnConnected)) \n        {return  Unconnected;\n        }\n   return 0;\n}\n\nstatic Boolean SocketValid(SocketPtr s) {\n\tif ((s != NULL) &&\n\t\t(s->privateSocketPtr != NULL) &&\n\t\t(s->sessionID == gthisNetSession) && (gthisNetSession != 0) && \n\t\t(s->socketType == TCPSocketType || s->socketType == UDPSocketType) &&\n\t\t(!OTAtomicTestBit(&(((EPInfo *)s->privateSocketPtr)->stateFlags3), kSleepKilledMe)) )\n\t\t    return true;\n\tinterpreterProxy->success(false);\n\treturn false;\n}\n\n\nstatic Boolean PortNumberValid(InetPort port) {\n\tif (port <= 65535) {\n\t\treturn true;\n\t}\n\tinterpreterProxy->success(false);\n\treturn false;\n}\n\n//Used to signal all semaphores when we've closed the socket\n//I guess the read/write/disconnect threads really want to know\n//\nstatic void TapAllInterestedSemaphores(EPInfo *epi) {\n    if (OTAtomicClearBit(&epi->stateFlags2, kTapSemaphore)) \n\t    interpreterProxy->signalSemaphoreWithIndex(epi->semaIndex); \n    if (OTAtomicClearBit(&epi->stateFlags2, kTapSemaphoreReadData)) \n\t    interpreterProxy->signalSemaphoreWithIndex(epi->readSemaIndex); \n    if (OTAtomicClearBit(&epi->stateFlags2, kTapSemaphoreWriteData)) \n\t    interpreterProxy->signalSemaphoreWithIndex(epi->writeSemaIndex); \t\t\t\t\n}\n\nstatic Boolean DestroyAllOpenSockets(void) {\n\tEPInfo      *epi;\n\tOTLink*\t\tlink;\n    ReadBuffer *aBuffer;\n\n\t//\n\t//\tStart closing connector endpoints.\n\t//\tWhile we could be rude and just close the endpoints, \n\t//\twe try to be polite and wait for all outstanding connections\n\t//\tto finish before closing the endpoints.   The is a bit easier\n\t//\ton the server which won't end up keeping around control blocks\n\t//\tfor dead connections which it doesn't know are dead.  Alternately,\n\t//\twe could just send a disconnect, but this seems cleaner.\n\t//\n\n\t(void)OTLIFOStealList(gBrokenEPs);\n\t(void)OTLIFOStealList(gIdleEPs[0]);\n\t(void)OTLIFOStealList(gIdleEPs[1]);\n\t(void)OTLIFOStealList(gIdleEPs[2]);\n\t\n    link = OTLIFODequeue(gAllEPs);\n    while (link != NULL) {\n        epi = OTGetLinkObject(link, EPInfo, globalLink);\n     \tattemptToCloseAndDeleteThisEP(epi);\n        link = OTLIFODequeue(gAllEPs);\n    }\n\n\t//\n\t//\tIf the lists are empty now, then all endpoints have been successfully closed,\n\t//\tso the client is stopped now.  (Actually we hope that is the case)\n\t//\n\t\n    //\n    //Free up all the other resources\n    //\n    link = OTLIFODequeue(gFreeReadBuffers);\n    while (link != NULL) {\n    \taBuffer = OTGetLinkObject(link, ReadBuffer, fNext);\n        OTFreeMem(aBuffer->readBufferData);\n        OTFreeMem(aBuffer); \n        link = OTLIFODequeue(gFreeReadBuffers);\n    }\n    ResolverTerminate();\n\tOTFreeMem((char*)gDNSResolver);\n\tgIdleEPs[0]->fHead\t\t= NULL;\n\tgIdleEPs[1]->fHead\t\t= NULL;\n\tgIdleEPs[2]->fHead\t\t= NULL;\n\tgBrokenEPs->fHead \t\t= NULL;\n\tOTDestroyConfiguration(gCfgMastertcp);\n\tOTDestroyConfiguration(gCfgMasterudp);\n\tOTDestroyConfiguration(gCfgMasterListener);\n\tDisposeOTNotifyUPP(DNSNotifierUPP);\n\tDisposeOTNotifyUPP(NotifierSocketUPP);\n\tDisposeOTNotifyUPP(NotifierSocketUDPUPP);\n\tDisposeOTNotifyUPP(NotifierSocketListenerUPP);\n\treturn true;\n}\n\n\n//\n//\tDoBind\n//\n//\tThis routine either binds to a wild card address and specfic port if \n//  we are doing a listen, otherwise we bind to a wild card address and \n//  wild card port if we are starting a connection to a remote host.\n//  J M M NOTE A more complex version could use port and addr\n//  Note we don't bind to the local socket until here, we could when \n//  The socket is created, but that leads to odd issues.\n//\n\nstatic void DoBind(EPInfo* epi,InetHost addr, InetPort port,UInt8 aExtraSocketHint,OTQLen queueDepth )\n{\n\tOSStatus \terr;\n\tTBind \t\tbindReq, bindResult;\n\tInetAddress\tinAddr,bindAddr;\n\t\n\tswitch (aExtraSocketHint) {\n        case TCPSocketType: {\n            // for a connection\n        \t//\tBind the endpoint to a wildcard address \n        \t//\t(assign us a port, we don't care which one).\n        \t//  NOTE A more complex version could use port and addr\n            OTInitInetAddress(&epi->remoteAddress, port, addr);\n            OTInitInetAddress(&epi->localAddress, 0, kOTAnyInetAddress);\n        \tOTInitInetAddress(&inAddr, 0, 0);\n            break;\n        }\n        case UDPSocketType: { \n            // for a connection\n        \t//\tBind the endpoint to earlier supplied information\n            OTInitInetAddress(&epi->remoteAddress, port, addr);\n        \tOTInitInetAddress(&inAddr, 0, 0);\n            break;\n        }\n        case TCPListenerSocketType: {\n            // For a listen, bind wild card address, but supplied port.\n            // Note the passed in addr should be zero\n            // Note a more complex version could supply the address\n            OTInitInetAddress(&epi->remoteAddress, 0, kOTAnyInetAddress);\n            OTInitInetAddress(&epi->localAddress, port, addr);\n        \tOTInitInetAddress(&inAddr,port, addr);\n            break;\n        }\n        case UDPListenerSocketType: {\n            // For a listen, bind wild card address, but supplied port.\n            // Note the passed in addr should be zero\n            // Note a more complex version could supply the address\n            OTInitInetAddress(&epi->remoteAddress, 0, kOTAnyInetAddress);\n            OTInitInetAddress(&epi->localAddress, port, addr);\n        \tOTInitInetAddress(&inAddr,port, addr);\n            break;\n        }\n\t}\n\n \tbindReq.addr.len    \t= sizeof(InetAddress);\n\tbindReq.addr.buf    \t= (unsigned char*) &inAddr;\n\tbindReq.qlen        \t= queueDepth; //Note queue depth for listening\n \tbindResult.addr.maxlen\t= sizeof(InetAddress);\n \tbindResult.addr.len   \t= sizeof(InetAddress);\n\tbindResult.addr.buf    \t= (unsigned char*) &bindAddr;\n\tepi->stateFlags     \t= 0;\n\tepi->stateFlags2   \t\t= 0;\n\tepi->stateFlags3    \t= 0;\n\tepi->bytesPendingToRead = 0;\n\tSetEPLastError(epi,noErr);\n\tif (aExtraSocketHint == TCPSocketType|| aExtraSocketHint == TCPListenerSocketType) {\n        OTAtomicSetBit(&epi->stateFlags, kUnConnected);\n        OTAtomicSetBit(&epi->stateFlags, kWaitingForConnection);\n        OTAtomicSetBit(&epi->stateFlags2, kTapSemaphore);\n    }\n\t\n\tOTAtomicSetBit(&epi->stateFlags3, kWaitingForBind);\n\terr = OTBind(epi->erf, &bindReq, &bindResult); // resume at T_BINDCOMPLETE\n\t\n\t// for bindReq on listen what is queueDepth now? \n\t// bindReq.qlen could have changed\n\t// But... No why to feed this back to the client!\n\t\n\tif (err != kOTNoError) {\n    \tSetEPLastError(epi,err);\n        makeEPUnconnected(epi);\n    \treturn;\n\t}\n\t\n\tOTMemcpy(&epi->localAddress,bindResult.addr.buf,sizeof(InetAddress)); //Pickup local address\n\treturn;\n}\n\n//\n//\tDoConnect\n//\n//\tThis routine attempts establish a new connection to the given\n//\taddress and port.  \n//  Called via the notifier at interrupt time.\n//\n\nstatic void DoConnect(EPInfo* epi,InetHost addr, InetPort port)\n{\n\tOSStatus err;\n\tTCall sndCall;\n\tInetAddress inAddr;\n\t\n\t//\tDon't want new connections if already shutting down.\n\tif (gProgramState != kProgramRunning ) return;\n\t\t\n\tOTInitInetAddress(&inAddr, port, addr);\n\tOTMemzero(&sndCall, sizeof(TCall));\n\tsndCall.addr.len \t= sizeof(InetAddress);\t\t\t\t\n\tsndCall.addr.buf\t= (unsigned char*) &inAddr;\n\t\n\terr = OTConnect(epi->erf, &sndCall, NULL); //resume at T_CONNECT\n\tif (err != kOTNoDataErr) {\n    \tSetEPLastError(epi,err);\n        makeEPUnconnected(epi);\n\t\treturn;\n\t}\n}\n\n\n//\n//\tDoListenAccept\n//\n//\tThe handling of a T_LISTEN is greatly simplified by use\n//\tof the tilisten module, which serializes inbound connections.\n//\tThis means that when doing an OTAccept we won't get a kOTLookErr\n//\tbecause another inbound connection arrived and created a T_LISTEN.\n//\tWithout the tilisten module, we have to use the \"8 step \n//\tlisten/accept/disconnect method\", which is documented elsewhere.\n//\n\nstatic void DoListenAccept(EPInfo* acceptor,EPInfo* theServer)\n{\n\tTCall\t\tcall;\n\tInetAddress\tcaddr;\n\tOTResult\tlookResult;\n\tOSStatus\terr;\n\t\t\t\n\tOTMemzero(&call, sizeof(TCall));\n\tcall.addr.maxlen = sizeof(InetAddress);\n\tcall.addr.buf = (unsigned char*) &caddr;\n\t\t\n\terr = OTListen(theServer->erf, &call);\n\tif (err != kOTNoError) {\n\t\t//\n\t\t//\tOnly two errors are expected at this point.\n\t\t//\tOne would be a kOTNoDataErr, indicating the inbound connection\n\t\t//\twas unavailable, temporarily hidden by a higher priority streams\n\t\t//\tmessage, etc.   The more likely error is a kOTLookErr, \n\t\t//\twhich indicates a T_DISCONNECT on the OTLook()\n\t\t//\thappens when the call we were going to process disconnected.\n\t\t//\tIn that case, go away and wait for the next T_LISTEN event.\n\t\t//\n\t\tif (err == kOTNoDataErr) return;\n\t\t\t\n\t\tlookResult = OTLook(theServer->erf); \n\t\tif (err == kOTLookErr && lookResult == T_DISCONNECT)\n        \terr = OTRcvDisconnect(theServer->erf, NULL);\n\t\telse \n\t\t    SetEPLastError(theServer,lookResult);\n\t\t\n\t\t//JMM Sept28th,2000 ? ok accept it, if we don't does this cause blockage?\n\t\tacceptor->remoteAddress = caddr;\n\t\terr = OTAccept(theServer->erf, acceptor->erf, &call);\n\t\treturn;\t\n\t}\n\t\n\tacceptor->remoteAddress = caddr;\n\t\n\terr = OTAccept(theServer->erf, acceptor->erf, &call);\n\t//\n\t//\tNote an kOTIndOutErr can occur if we are listening on the EP and handling \n\t//  off to the same EP. Sorry use the listento:backlogqueue: logic instead\n    //\n\tif (err != kOTNoError) {\n\t\t//\n\t\t//\tAgain, we have to be able to handle the connection being disconnected\n\t\t//\twhile we were trying to accept it.\n\t\t//\n\t\tlookResult = OTLook(theServer->erf);\n\t\tif (err == kOTLookErr && lookResult == T_DISCONNECT) \n        \terr = OTRcvDisconnect(theServer->erf, NULL);\n\t\telse \n\t\t    SetEPLastError(theServer,lookResult);\n\t}\n}\n\n//\n//\tEPOpen:\n//\n//\tA front end to OTAsyncOpenEndpoint.\n//\tA status bit is set so we know there is an open in progress.\n//\tIt is cleared when the notifier gets a T_OPENCOMPLETE where the context\n//\tpointer is this EPInfo.  Until that happens, this EPInfo can't be cleaned\n//\tup and released.\n//\nstatic Boolean EPOpen(EPInfo* epi)\n{\n\tOSStatus err;\n\t\n\tOTAtomicSetBit(&epi->stateFlags, kOpenInProgressBit);\n\tSetEPLastError(epi,kOTNoError);\n    epi->UDPMaximumSize = 0; //Remember to figure out the max UDP size.\n    \n\tswitch (epi->socketType) {\n\t    case TCPSocketType: {\n#if TARGET_API_MAC_CARBON\n\t\t    err = OTAsyncOpenEndpointInContext(OTCloneConfiguration(gCfgMastertcp), 0, NULL, NotifierSocketUPP, epi, gClientContext); \n#else\n\t\t    err = OTAsyncOpenEndpoint(OTCloneConfiguration(gCfgMastertcp), 0, NULL, NotifierSocketUPP, epi); \n#endif\n\t        break;\n\t    }\n\t    case UDPSocketType: {\n\t        TEndpointInfo endPointInformation;\n#if TARGET_API_MAC_CARBON\n\t\t    err = OTAsyncOpenEndpointInContext(OTCloneConfiguration(gCfgMasterudp), 0, &endPointInformation, NotifierSocketUDPUPP, epi, gClientContext); \n#else\n\t\t    err = OTAsyncOpenEndpoint(OTCloneConfiguration(gCfgMasterudp), 0, &endPointInformation, NotifierSocketUDPUPP, epi); \n#endif\n\t\t    epi->UDPMaximumSize = (endPointInformation.tsdu == T_INFINITE) ? 64*1024 : endPointInformation.tsdu;\n\t        break;\n\t    }\n\t    case TCPListenerSocketType: {\n#if TARGET_API_MAC_CARBON\n\t\t    err = OTAsyncOpenEndpointInContext(OTCloneConfiguration(gCfgMasterListener), 0, NULL, NotifierSocketListenerUPP, epi, gClientContext); \n#else\n\t\t    err = OTAsyncOpenEndpoint(OTCloneConfiguration(gCfgMasterListener), 0, NULL, NotifierSocketListenerUPP, epi); \n#endif\n\t        break;\n\t    }\n\t}\n\tif (err != kOTNoError) {\n\t\tSetEPLastError(epi,err);\n\t\tOTAtomicClearBit(&epi->stateFlags, kOpenInProgressBit);\n\t\treturn false;\n\t}\n\treturn (epi->lastError == kOTNoError);\n}\n\n\n//\n//\tEPClose\n//\n//\tThis routine is a front end to OTCloseProvider.   \n//\tCentralizing closing of endpoints makes debugging and instrumentation easier.  \n//\nstatic Boolean EPClose(EPInfo* epi)\n{\n\tOSStatus err;\n\t\n\t//\n\t//\tIf an endpoint is still being opened, we can't close it yet.\n\t//\tThere is no way to cancel an OTAsyncOpenEndpoint, so we just\n\t//\thave to wait for the T_OPENCOMPLETE event at the notifier.\n\t//\n\tif ( OTAtomicTestBit(&epi->stateFlags, kOpenInProgressBit) )\n\t\treturn false;\n\t\t\n    \n\t//\n\t//\tIf the OTAsyncOpenEndpoint failed, the endpoint ref will be NULL,\n\t//\tand we don't need to close it now. Also can be NULL or should be NULL if sleeping happened.\n\t//\n\tif (epi->erf == NULL || OTAtomicClearBit(&epi->stateFlags3, kSleepKilledMe)) {\n\t    epi->erf = NULL;\n\t\treturn true;\n\t}\n\t\t\n\tif (epi->outstandingSends == 0) {\n    \terr = OTCloseProvider(epi->erf);\n    \tepi->erf = NULL;\n    \treturn true;\n    }\n    \t\n    //\n\t//\tIf we get to this point, the endpoint did an OTSnd() with AckSends,\n\t//\tand the T_MEMORYRELEASED event hasn't been returned yet.  In order\n\t//\tto make sure we get the event, we flush the stream and then do an\n\t//\tOTDisconnect().   This should get the memory freed so we can close\n\t//\tthe endpoint safely.   Note, we set a flag so we don't do this \n\t//\tmore than once on an endpoint.\n\t//  J M M I'm not sure we'll ever get here since a flush should have been done higher up\n\t//\n\tif ( OTAtomicSetBit(&epi->stateFlags2, kFlushDisconnectInProgressBit) == 0 )\n\t{\n\t\terr = OTIoctl(epi->erf, I_FLUSH, (void *)FLUSHRW);\n\t\tif (err != kOTNoError)\n\t\t\t{} \n\t}\n\treturn false;\n\n}\n\n//\n//\tRecycle:\n//\n//\tThis routine shouldn't be necessary, but it is helpful to work around both\n//\tproblems in OpenTransport and bugs in this program.   Basicly, whenever an\n//\tunexpected error occurs which shouldn't be fatal to the program, the EPInfo\n//\tis queued on the BrokenEP queue.  When recycle is called,\n//  it will attempt to close the associated endpoint and open\n//\ta new one to replace it using the same EPInfo structure.   This process of\n//\tclosing an errant endpoint and opening a replacement is probably the most\n//\treliable way to make sure that this program and OpenTransport can recover\n//\tfrom unexpected happenings in a clean manner.\n//\n//  Mind you it can be invoked to cleanup UDP sockets that aren't closed \n//  properly due to pending traffice on a busy port.\n//  Solution mentioned in books is to close the EP.\n//\nstatic void Recycle()\n{\n\tOTLink* \tlist = OTLIFOStealList(gBrokenEPs);\n\tOTLink*\t\tlink;\n\tEPInfo*\t\tepi;\n\n\twhile ( (link = list) != NULL ) {\n\t\tlist = link->fNext;\n\t\tepi = OTGetLinkObject(link, EPInfo, link);\n\t\tif (!EPClose(epi)) {\n\t\t\tOTLIFOEnqueue(gBrokenEPs, &epi->link);\n\t\t\tcontinue;\n\t\t}\n\t\tif (gProgramState == kProgramRunning)\n\t\t    EPOpen(epi);\n\t\t else\n\t\t    makeEPIdle(epi);\n\t}\n}\n\n//\n// Make the EP idle, it either goes on an idle queue or gets broken.\n//\nstatic void    makeEPIdle(EPInfo *epi) {\n    purgeReadBuffers(epi);\n    \n    if (OTAtomicClearBit(&epi->stateFlags2, kEPIsBroken)) {\n        OTLIFOEnqueue(gBrokenEPs, &epi->link); \n    } else {\n\t    OTLIFOEnqueue(gIdleEPs[epi->socketType], &epi->link); \n   \t    OTAtomicAdd32(1, &gIdleEPCounter[epi->socketType]); \n   }\n}\n\nstatic void attemptToCloseAndDeleteThisEP (EPInfo *epi) {\n    purgeReadBuffers(epi); \n\tif (!EPClose(epi)) {\n\t\t//\tCan't close this endpoint yet, so skip it.\n\t} else \n\t    OTFreeMem((char*)epi);\n}\nstatic EPInfo* getOrMakeMeAnEP(UInt8 aSocketType,short counter) {\n\tEPInfo      *epi;\n    OTLink\t\t*link;\n    SInt32      i;\n    \n    Recycle();  //Ensure broken EP get fixed up\n    \n    if (counter > 25) \n        return nil;  // End recursion John 2000/8/29\n\n    if (gIdleEPCounter[aSocketType] < 5)   //Magic Number ensure we have at least 5 EP available.\n        makeMeAnEP(aSocketType);\n        \n    link = OTLIFODequeue(gIdleEPs[aSocketType]);\n\tif (link == NULL) {\n\t\tfor(i=0;i<10;i++) {OTIdle();};\n\t\treturn getOrMakeMeAnEP(aSocketType,counter+1); //Watch for recursive failure\n\t}\n\t\n   \tOTAtomicAdd32(-1, &gIdleEPCounter[aSocketType]);\n\tepi = OTGetLinkObject(link, EPInfo, link);\n\t\n\tif (OTAtomicTestBit(&epi->stateFlags3, kSleepKilledMe)) {\n\t//\n\t//A broken epi on the idle stack, now the only way we can \n\t//get here (I think) is to have gone to sleep which breaks\n\t//all the end points. To clean up we must now fix them\n\t//So make it idle, of course it's broken\n\t//Then recursive call to get another one\n\t//This continues until we get a good one\n\t//\n  \t    makeEPIdle(epi);\n\t    return getOrMakeMeAnEP(aSocketType,counter);  //Not a recursion issue. \n\t}\n    return epi;\n}\n\n//\n//This is where EP are actually made and opened\n//EP opening is async\n//\n\nstatic Boolean makeMeAnEP (UInt8 aSocketType) {\n\tEPInfo      *epi;\n\t\n#if TARGET_API_MAC_CARBON\n\tepi = (EPInfo*) OTAllocMemInContext(sizeof(EPInfo), gClientContext);\n#else\n\tepi = (EPInfo*) OTAllocMem(sizeof(EPInfo));\n#endif\n\tif (epi == NULL) return false;   //Death lurks\n\tOTMemzero(epi, sizeof(EPInfo));  //zero it out which makes all the pointers null\n    epi->socketType = aSocketType;\n    OTLIFOEnqueue(gAllEPs, &epi->globalLink);\n\treturn EPOpen(epi);\n}\n\nstatic void makeEPUnconnected(EPInfo *epi) {\n\tOTAtomicClearBit(&epi->stateFlags, kWaitingForConnection);\n\tOTAtomicSetBit(&epi->stateFlags, kUnConnected);\n    if (OTAtomicClearBit(&epi->stateFlags2, kTapSemaphore)) //tap to clear waitforconnection on error\n        interpreterProxy->signalSemaphoreWithIndex(epi->semaIndex);\n}\n\nstatic void makeEPConnected(EPInfo *epi) {\n\tOTAtomicClearBit(&epi->stateFlags, kWaitingForConnection);\n\tOTAtomicClearBit(&epi->stateFlags, kUnConnected);\n    OTAtomicSetBit(&epi->stateFlags, kConnected);\n    if (OTAtomicClearBit(&epi->stateFlags2, kTapSemaphore)) //tap to clear waitforconnection\n        interpreterProxy->signalSemaphoreWithIndex(epi->semaIndex);\n}\n\nstatic void makeEPBrokenThenIdle(EPInfo* epi,OTResult error) {\n    makeEPBroken(epi,error);\n    makeEPIdle(epi);\n}\n\nstatic void makeEPBroken(EPInfo* epi,OTResult error) {\n    SetEPLastError(epi,error);\n    OTAtomicSetBit(&epi->stateFlags2, kEPIsBroken);\n}\n\nstatic void SetEPLastError(EPInfo* epi,OTResult error) {\n    if (error < 0) {\n\t\tJMMLogMessageAndNumber(\"\\p NonZero Error For \",epi->semaIndex);\n\t\tJMMLogMessageAndNumber(\"\\p NonZero Error Is  \",error);\n    }\n    epi->lastError = error;\n}\n\n//\tReadData:\n//\n//\tThis routine attempts to read all available data from an endpoint.\n//\tit is not necessary for the program to handle\n//\tgetting back a T_DATA notification DURING an OTRcv() call, as would be\n//\tthe case if we read from outside the notifier.   We must read until we\n//\tget a kOTNoDataErr in order to clear the T_DATA event so we will get\n//\tanother notification of T_DATA in the future.\n//  Note we use EnterNotifier to make this possible\n//\n//\tNote for the curious we attempted to use no-copy receives to get data.  This obligates\n//\tthe program to return the buffers to OT asap.  BUT we found we overran memory!\n//  So we reverted to more expensive copies into buffers we have preallocated\n//\n//  Perhaps a seperate routine for UDP would make sense?\n//  Note May 30/00 we added a special read when we exhaust the internal buffer pool\n//  But data is still pending we allow you to read into the squeak buffer directly\n//\n\nstatic UInt32 ReadData(EPInfo* epi,char *specialReadBuffer,UInt32 specialReadSize) {\n\tOTResult  \tres;\n\tOTFlags\t  \tflags;\n\tOTResult\tepState,err;\n\tOTLink\t\t*link;\n    ReadBuffer \t*readBufferObject,simulatedReadBuffer;\n    InetAddress UDPdataFromAddress;\n\t\n    if (OTAtomicClearBit(&epi->stateFlags2, kTapSemaphoreReadData)) //tap to clear waitfordata Data Data Data\n        interpreterProxy->signalSemaphoreWithIndex(epi->readSemaIndex);\n        \n    if (specialReadSize > 0) { //Special case drop into squeak buffer, make a simulated buffer object\n        OTMemzero(&simulatedReadBuffer,sizeof(ReadBuffer));\n        simulatedReadBuffer.readBufferData = specialReadBuffer;\n        simulatedReadBuffer.readBufferSize = simulatedReadBuffer.readBufferOriginalSize = specialReadSize;\n        readBufferObject = &simulatedReadBuffer;\n    } else {\n       link = OTLIFODequeue(gFreeReadBuffers);\n            \n    \tif (link == NULL) {\n           \tOTAtomicSetBit(&epi->stateFlags2, kReadFlowControl);  //NO free buffers we are flow controled\n        \treturn 0; \n    \t}\n\t\tgFreeReadBuffersCounter--;\n    \treadBufferObject = OTGetLinkObject(link, ReadBuffer, fNext);\n        OTAtomicClearBit(&epi->stateFlags2, kReadFlowControl);  \n    }\n    \n    OTMemzero(&UDPdataFromAddress,sizeof(InetAddress));\n    \n\twhile (true) {\n        \n\t\treadBufferObject->readBufferPtr = readBufferObject->readBufferData;\n\t\t\n   \t    if (epi->socketType == UDPSocketType) {\n   \t        TUnitData \tUDPDataInBound;\n   \t        OTFlags     flagMeaningMore;\n            OSStatus    error;\n            \n    \t    UDPDataInBound.addr.maxlen = sizeof(InetAddress);\n    \t    UDPDataInBound.addr.len    = sizeof(InetAddress);\n    \t    UDPDataInBound.addr.buf    = (UInt8*) &readBufferObject->UDPAddress;\n    \t    UDPDataInBound.opt.maxlen  = 0;\n    \t    UDPDataInBound.opt.len     = 0;\n    \t    UDPDataInBound.opt.buf     = NULL;\n    \t    UDPDataInBound.udata.maxlen = readBufferObject->readBufferOriginalSize;\n    \t    UDPDataInBound.udata.len    = readBufferObject->readBufferOriginalSize;\n    \t    UDPDataInBound.udata.buf    = (UInt8*)readBufferObject->readBufferData;\n\t    \n\t        error =  OTRcvUData(epi->erf, &UDPDataInBound, &flagMeaningMore);\n\t        \n\t        if (error != kOTNoError) {\n\t            res = error;\n\t        } else {\n\t            if (UDPDataInBound.addr.len == 0) //Remember UDP address\n\t                readBufferObject->UDPAddress = UDPdataFromAddress;\n\t            else\n\t                UDPdataFromAddress = readBufferObject->UDPAddress;\n\t                \n\t            epi->UDPMoreFlag = readBufferObject->UDPMoreFlag = (flagMeaningMore > 0) ? true: false;\n\t            res = (SInt32) UDPDataInBound.udata.len; \n\t            OTMemcpy(&epi->remoteAddress,&readBufferObject->UDPAddress,sizeof(InetAddress));  \n\t        }\n   \t    } else {//A less complicated tcp read\n   \t        res = OTRcv(epi->erf, readBufferObject->readBufferData, readBufferObject->readBufferOriginalSize, &flags);\n   \t    }\n   \t    \n\t\t//\n\t\t//\tNote, check for 0 because can get a real 0 length receive\n\t\t//\tin some protocols (not in TCP), which is different from\n\t\t//\tgetting back a kOTNoDataErr.\n\t\t//\n\t\tif (res >= 0) {\n            if (specialReadSize > 0) \n                return (UInt32) res; //Note special case\n                \n            readBufferObject->readBufferSize = (UInt32) res;\n            \n            OTAddLast(&epi->readBuffers,&readBufferObject->fNext); //Put the buffer on the read queue\n        \tOTAtomicAdd32(res, &epi->bytesPendingToRead);\n            link = OTLIFODequeue(gFreeReadBuffers);\n                    \n        \tif (link == NULL) {\n               \tOTAtomicSetBit(&epi->stateFlags2, kReadFlowControl); //Our read flow control, OT will block lower down\n            \treturn 0; \n        \t}\n\t\t\tgFreeReadBuffersCounter--;\n        \treadBufferObject = OTGetLinkObject(link, ReadBuffer, fNext);\n   \t\t\tcontinue; //Loop around and get more bytes if available\n\t\t}\n\t\telse {\n            if (specialReadSize == 0) {\n                OTLIFOEnqueue(gFreeReadBuffers, &readBufferObject->fNext); //Read above didn't work so put it back on free queue\n\t\t\t\tgFreeReadBuffersCounter++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (res == kOTNoDataErr) {\n\t\t\t//\n\t\t\t//\tSince ReadData is only called from inside the notifier\n\t\t\t//\twe don't have to worry about having missed a T_DATA \n\t\t\t//\tduring the OTRcv.\n\t\t\t//  Note use of EnterNotifier logic\n\t\t\t//\n\t\t\tif (specialReadSize > 0)\n\t\t\t    OTAtomicClearBit(&epi->stateFlags2, kReadFlowControl);\n \t\t\treturn 0;\n\t\t}\n\t\tif (res == kOTLookErr) {\n\t\t\tres = OTLook(epi->erf);\n\t\t\tif (res == T_ORDREL || res == T_DISCONNECT) {\n\t\t\t\t//\tIf we got the T_ORDREL, we won't get any more inbound data.\n\t\t\t\t//\tWe return and wait for the notifier to get the T_ORDREL notification.\n\t\t\t\t//\tUpon getting it, we will notice we still need to send data and do so.\n\t\t\t\t//\tThe T_ORDREL has to be cleared before we can send. \n\t\t\t\t//\n\t\t\t\tif (specialReadSize > 0 && res == T_DISCONNECT) {\n\t\t\t\t\t//Special case? need to get disconnect \n\t\t\t\t\terr = OTRcvDisconnect(epi->erf, NULL);\n\t\t\t\t\tmakeEPUnconnected(epi);\n\t\t\t\t}\n\t\t\t\treturn 0 ;\n\t\t\t}\n\t\t\tif (res == T_GODATA) {\n\t\t\t    if (specialReadSize == 0) {\n    \t\t\t    link = OTLIFODequeue(gFreeReadBuffers);    \n                \tif (link == NULL) {\n                       \tOTAtomicSetBit(&epi->stateFlags2, kReadFlowControl);\n                    \treturn 0 ; \n                \t}\n\t\t\t\t\tgFreeReadBuffersCounter--;\n                \treadBufferObject = OTGetLinkObject(link, ReadBuffer, fNext);\n            \t} else {\n            \t    return 0;\n            \t}\n\t\t\t    continue; //OT Flow control lifted keep reading. JMM\n\t\t\t}\n\t\t} else {\n\t\t\tepState = OTGetEndpointState(epi->erf);\n\t\t\tif (res == kOTOutStateErr && epState == T_INREL) {\n\t\t\t\t//\n\t\t\t\t//\tOccasionally this problem will happen due to what appears\n\t\t\t\t//\tto be an OpenTransport notifier reentrancy problem.   \n\t\t\t\t//\tWhat has occured is that a T_ORDREL event happened and \n\t\t\t\t//\twas processed during ReadData().   This is proven by being\n\t\t\t\t//\tin the T_INREL state without having done a call to\n\t\t\t\t//\tOTRcvOrderlyDisconnect() here.   It appears to be a benign \n\t\t\t\t//\tsituation, so the way to handle it is to understand that no\n\t\t\t\t//\tmore data is going to arrive and go ahead and being our response\n\t\t\t\t//\tto the client.\n\t\t\t\t//\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (res == kOTOutStateErr && (epState == T_UNBND || epState == T_IDLE ) && specialReadSize > 0) {\n\t\t\t\t  interpreterProxy->success(false); //JMM Oct 4th 2000 special case fail if read on unbound\n\t\t\t\t  return 0;\n\t\t\t}\n\t\tbreak; //Ok error so break out of loop\n\t\t}\n\t}\n    return 0;\t\n}\n\n//\n// NOT USED HISTORICAL REASONS\n// \n/*\n\nstatic void NoCopyReceiveWalkingBufferChain(EPInfo *epi,OTBufferInfo *bufferInfo)\n{\n   OSStatus     err;\n   OTBuffer     *thisBuffer;\n   UInt32       count;\n   ReadBuffer   *readBufferObject;\n   \n    \n    thisBuffer = bufferInfo->fBuffer;\n    err = noErr;\n    while (err == noErr && thisBuffer != nil) {\n        count = thisBuffer->fLen;\n    \tOTAtomicAdd32(count, &epi->bytesPendingToRead);\n\t\treadBufferObject = OTAllocMemInContext(sizeof(ReadBuffer), gClientContext);\n        if (readBufferObject == nil) {\n\t\t\tSysBeep(5);\n            err = -1;\n            break;\n        } \n        OTMemzero(readBufferObject,sizeof(ReadBuffer));\n        readBufferObject->readBufferData = readBufferObject->readBufferPtr = OTAllocMemInContext(count, gClientContext);\n        if ( readBufferObject->readBufferData == nil) {\n\t\t\tSysBeep(5);\n             err = -1;\n            break;\n        } \n        readBufferObject->readBufferOriginalSize = readBufferObject->readBufferSize = count;\n        OTMemcpy(readBufferObject->readBufferData,thisBuffer->fData,count);\n        OTAddLast(&epi->readBuffers,&readBufferObject->fNext);\n        thisBuffer = thisBuffer->fNext;\n    }\n\n   // Clean up.  We MUST release the OTBuffer chain to Open Transport \n   // so that it crelease the OTBuffer chain to Open Transport \n   // so that it can reuse it., OTReleaseBuffer does not tolerate\n   // the parameter being nil, so we check for that case first. \n\n   if (bufferInfo->fBuffer != nil) {\n      OTReleaseBuffer(bufferInfo->fBuffer);\n   }\n\n}\n*/\n\n//\n// Read Bytes from the buffers\n// Called by Squeak to get the data\n//\nstatic UInt32  readBytes(EPInfo* epi,char *buf,UInt32 adjustedBufSize)\n{\n    //\n    // Read bytes from buffers\n    // use recursion to fill buf to adjustedBufSize or \n    // til we have no buffers left\n    // By using enterNotifier higher up we avoid race on the readBuffers list\n    //\n    \n    UInt32 \t\tincrement,bytesRead = 0;\n    ReadBuffer *aBuffer;\n    \n    aBuffer = (ReadBuffer *) OTRemoveFirst(&epi->readBuffers);\n    if (aBuffer == nil) return 0;\n    \n    if (aBuffer->readBufferSize > adjustedBufSize) {\n        bytesRead = adjustedBufSize;\n    \tOTAtomicAdd32(-bytesRead, &epi->bytesPendingToRead);\n        OTMemcpy((char *) buf,aBuffer->readBufferPtr,bytesRead);\n        aBuffer->readBufferPtr += bytesRead;\n        aBuffer->readBufferSize -= bytesRead;\n        OTAddFirst(&epi->readBuffers,&aBuffer->fNext);\n        return bytesRead;\n    }\n    else {\n        bytesRead = aBuffer->readBufferSize;\n       \tOTAtomicAdd32(-bytesRead, &epi->bytesPendingToRead);\n        OTMemcpy(buf,aBuffer->readBufferPtr,bytesRead);\n        OTLIFOEnqueue(gFreeReadBuffers, &aBuffer->fNext);\n\t\tgFreeReadBuffersCounter++;\n        increment = readBytes(epi,buf+bytesRead,adjustedBufSize-bytesRead);\n        bytesRead += increment;\n        return bytesRead;\n   }\n}\n\n\nstatic UInt32  readBytesUDP(EPInfo* epi,InetAddress *fromAddress, int * moreFlag, char *buf,UInt32 adjustedBufSize)\n{\n    //\n    // Read bytes from buffers\n    // For UDP we just drop in the read buffer and address\n    // Don't fill the entire buffer no recursion.\n    // By using enterNotifier higher up we avoid race on the readBuffers list\n    //\n    \n    UInt32      bytesRead = 0;\n    ReadBuffer  *aBuffer;\n    \n    aBuffer = (ReadBuffer *) OTRemoveFirst(&epi->readBuffers);\n    if (aBuffer == nil) return 0;\n    \n    if (aBuffer->readBufferSize > adjustedBufSize) {\n        bytesRead = adjustedBufSize;\n    \tOTAtomicAdd32(-bytesRead, &epi->bytesPendingToRead);\n        OTMemcpy((char *) buf,aBuffer->readBufferPtr,bytesRead);\n        aBuffer->readBufferPtr += bytesRead;\n        aBuffer->readBufferSize -= bytesRead;\n        OTMemcpy(fromAddress,&aBuffer->UDPAddress,sizeof(InetAddress));\n        *moreFlag = aBuffer->UDPMoreFlag;\n        OTAddFirst(&epi->readBuffers,&aBuffer->fNext);\n        return bytesRead;\n    }\n    else {\n        bytesRead = aBuffer->readBufferSize;\n       \tOTAtomicAdd32(-bytesRead, &epi->bytesPendingToRead);\n        OTMemcpy(buf,aBuffer->readBufferPtr,bytesRead);\n        OTMemcpy(fromAddress,&aBuffer->UDPAddress,sizeof(InetAddress));\n        *moreFlag = aBuffer->UDPMoreFlag;\n        OTLIFOEnqueue(gFreeReadBuffers, &aBuffer->fNext);\n\t\tgFreeReadBuffersCounter++;\n        return bytesRead;\n   }\n}\n\n//Cleanup logic\n//\n\nstatic void purgeReadBuffers(EPInfo *epi) {\n    ReadBuffer *aBuffer;\n        \n    //\n    //Put buffers for this epi back on the free queue\n    //\n    aBuffer = (ReadBuffer *) OTRemoveFirst(&epi->readBuffers);\n    \n    while (aBuffer != NULL) {\n        OTLIFOEnqueue(gFreeReadBuffers, &aBuffer->fNext);\n\t\tgFreeReadBuffersCounter++;\n        aBuffer = (ReadBuffer *) OTRemoveFirst(&epi->readBuffers);\n    }\n    epi->bytesPendingToRead = 0;\n}\n\n\n\n//\n//\tSend the Bytes (Really fast, we hope)\n//\nstatic SInt32 SendData(EPInfo* epi,char* buffer, UInt32 size)\n{\n\tOTResult res;\n\tstruct OTData *dataPtr; \n\n \t//\n\t//\tMake sure we record that we are starting a send so we don't try to close\n\t//\tthe endpoint before a T_MEMORYRELEASED event is returned.\n\t//\n\tOTAtomicAdd32(1, &epi->outstandingSends);\n\t\n\tif (epi->socketType == UDPSocketType) {\n\t\tTUnitData UDPDataOutBound;\n\n\t    UDPDataOutBound.addr.maxlen  = sizeof(InetAddress);\n\t    UDPDataOutBound.addr.len     = sizeof(InetAddress);\n\t    UDPDataOutBound.addr.buf     = (UInt8*) &epi->remoteAddress;\n\t    UDPDataOutBound.opt.maxlen   = 0;\n\t    UDPDataOutBound.opt.len      = 0;\n\t    UDPDataOutBound.opt.buf      = NULL;\n\t    UDPDataOutBound.udata.maxlen = size;\n\t    UDPDataOutBound.udata.len    = size;\n\t    UDPDataOutBound.udata.buf    = (UInt8*)buffer;\n\t    \n        res =  OTSndUData(epi->erf,&UDPDataOutBound); \n        if (res == kOTNoError ) return (SInt32) size;\n        \n        // Other Errors could be kOTFlowErr or kOTBadDataErr\n\t}\n\telse { //TCP Send\n    \t//\n    \t//\tIn OT 1.1.2 and previous versions, there is a bug with AckSends\n    \t//\twhich occurs when the same buffer is sent more than once.   In an attempt\n    \t//\tto go fast and not allocate memory, TCP may write an IP and TCP header\n    \t//\tinto the data buffer which is sent.   If the buffer is sent more than once\n    \t//\twithout being refreshed, the data may be corrupted.   To work around this,\n    \t//\tsend the data via an OTData structure, using the gather-write mechanism.\n    \t//\tThe problem does not occur in this code path, and this will not hinder performance.\n    \t//\tThe problem will be fixed in the next Open Transport release following 1.1.2.\n    \t//\n    \t//  Note the MAC OS 8.1 docs alude to a bug before 1.3 where acksends\n    \t//  cause problems if a disconnect flows just right. Unsure if this\n    \t//  will be an issue\n    \t//\n    \t\n    \tif (gOTVersion < kOTVersion113) {\n#if TARGET_API_MAC_CARBON\n    \t\tdataPtr = OTAllocMemInContext(sizeof(OTData), gClientContext);\n#else\n    \t\tdataPtr = OTAllocMem(sizeof(OTData));\n#endif\n    \t\tif (dataPtr == NULL) { //Death lurks I'm sure\n    \t\t    OTAtomicAdd32(-1, &epi->outstandingSends);\n                OTFreeMem(buffer);\n                return 0;\n            }\n\n    \t\tdataPtr->fNext = NULL;\n    \t\tdataPtr->fData = buffer;\n    \t\tdataPtr->fLen  = size;\n    \t\tres = OTSnd(epi->erf, dataPtr, kNetbufDataIsOTData, 0);\n    \t\t\n    \t\t//Note in the notification routine we cleanup the allocated dataPtr AND buffer.\n    \t}\n    \telse\n    \t{\n    \t\tres = OTSnd(epi->erf, buffer, size, 0);\n    \t\t\n    \t\t//JMM how to handle kENOMEMErr no memory right now error\n    \t\t//Book says to back off and wait but must do a timer or something\n    \t\t//Right now we'll fail the primitive higher up since the error code is bad\n    \t}\n    }\n\n\tif (res == size) return (SInt32) size;\n\n\tif (res >= 0) {\n\t\t//\n\t\t//\tImplied kOTFlowErr since not all data was accepted.\n\t\t//  But maybe we aren't blocked yet so keep sending\n\t\t//\n\t\treturn res;\n\t} else\t{\t// res < 0\n\t\n \t\tOTAtomicAdd32(-1, &epi->outstandingSends);\n        OTFreeMem(buffer);\n        \n\t    if ((epi->socketType != UDPSocketType) && (gOTVersion < kOTVersion113) )\n\t       \tOTFreeMem(dataPtr); \n\t   \n\t\tif (res == kOTFlowErr) {\n\t\t    //\n\t\t    // Flow control back off and wait for T_GODATA\n\t\t    //\n        \tOTAtomicSetBit(&epi->stateFlags, kSendIsBlocked);\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tif (res == kOTLookErr) {\n\t\t\tres = OTLook(epi->erf);\n\t\t\tif (res == T_ORDREL || res == T_GODATA || res == T_DISCONNECT)\n\t\t\t{\n\t\t\t\t//\tWait to get the T_ORDREL at the notifier and handle it there.\n\t\t\t\t//\tThen we will resume sending.\n\t\t\t\t//  Same applies for other events\n\t\t\t\t//\n                //JMM test? \n               \tOTAtomicSetBit(&epi->stateFlags, kSendIsBlocked);\n\t\t\t\treturn 0;\n\t\t\t} else \t\n\t\t    \treturn res; \n\t\t} else \n\t\t    return res;\n\t\n\t}\n}\n\n//\n//Set the options\n//\nint sqSocketSetOptionsoptionNameStartoptionNameSizeoptionValueStartoptionValueSizereturnedValue(SocketPtr s,char * optionNameT, int optionNameSize, char * optionValueT, int optionValueSize, int *result)\t{\n    EPInfo*     epi;\n    OTResult    error;\n    char        optionName[80],optionValue[80];\n    SInt32      anInteger;\n    \n\t*result = 0;\n\tif (!SocketValid(s)) return -1;\n    epi = (EPInfo *) s->privateSocketPtr;\n\n\tOTMemcpy(optionName,(char *) optionNameT,optionNameSize);\n\toptionName[optionNameSize] = 0x00;\n\t\n    OTMemcpy(optionValue,(char *) optionValueT,optionValueSize);\n    optionValue[optionValueSize] = 0x00;\n    if (optionValueSize == 8) {\n        error = lookupOptionName(epi, false, (char *) &optionName, (long) &optionValue ,(long *) result);\n    } else {\n        CopyCStringToPascal(optionValue,(unsigned char *) optionValue);\n        StringToNum((ConstStr255Param) optionValue,&anInteger);   \n        error = lookupOptionName(epi, false, (char *) &optionName, anInteger,(long *) result);\n    }\n   return error;\n}\n\n//\n//Get the options\n//\nint sqSocketGetOptionsoptionNameStartoptionNameSizereturnedValue(SocketPtr s,char * optionNameT, int optionNameSize, int *result)\t{\n    EPInfo*     epi;\n    OTResult    error;\n    char        optionNameTemp[80];\n   \n\t*result = 0;\n\tif (!SocketValid(s)) return -1;\n    epi = (EPInfo *) s->privateSocketPtr;\n\n\tOTMemcpy(optionNameTemp,(char *) optionNameT,optionNameSize);  //NEED to fiddle with error number JMM to say readonly notvalid etc.\n\toptionNameTemp[optionNameSize] = 0x00;\n\t\n     \t\n   error = lookupOptionName(epi, true, (char *) &optionNameTemp, NULL,(long *)  result);\n   return error;\n}\n\n\n// A Number of routines to set/get options, first figureout the flags, then call the routine\n// To set or get the options. \n\nstatic SInt32\tlookupOptionName(EPInfo *epi, Boolean trueIfGet, char *aString, UInt32 value, SInt32 *result) {\n\tif (strcmp(\"TCP_MAXSEG\",aString)==0) \t\t\t\t{return SetFourByteOption(epi,trueIfGet,INET_TCP,TCP_MAXSEG,value,result);};\n\tif (strcmp(\"TCP_NODELAY\",aString)==0) \t\t\t\t{return SetFourByteOption(epi,trueIfGet,INET_TCP,TCP_NODELAY,value,result);};\n\tif (strcmp(\"TCP_ABORT_THRESHOLD\",aString)==0) \t\t{return SetFourByteOption(epi,trueIfGet,INET_TCP,TCP_ABORT_THRESHOLD,value,result);};\n\tif (strcmp(\"TCP_CONN_NOTIFY_THRESHOLD\",aString)==0) {return SetFourByteOption(epi,trueIfGet,INET_TCP,TCP_CONN_NOTIFY_THRESHOLD,value,result);};\n\tif (strcmp(\"TCP_CONN_ABORT_THRESHOLD\",aString)==0) \t{return SetFourByteOption(epi,trueIfGet,INET_TCP,TCP_CONN_ABORT_THRESHOLD,value,result);};\n\tif (strcmp(\"TCP_NOTIFY_THRESHOLD\",aString)==0) \t\t{return SetFourByteOption(epi,trueIfGet,INET_TCP,TCP_NOTIFY_THRESHOLD,value,result);};\n\tif (strcmp(\"TCP_URGENT_PTR_TYPE\",aString)==0) \t\t{return SetFourByteOption(epi,trueIfGet,INET_TCP,TCP_URGENT_PTR_TYPE,value,result);};\n\n\tif (strcmp(\"UDP_CHECKSUM\",aString)==0) \t\t\t\t{return SetFourByteOption(epi,trueIfGet,INET_UDP,UDP_CHECKSUM,value,result);};\n\n\tif (strcmp(\"SO_DEBUG\",aString)==0) \t\t\t    \t{return SetFourByteOption(epi,trueIfGet,XTI_GENERIC,XTI_DEBUG,value,result);};\n\tif (strcmp(\"SO_REUSEADDR\",aString)==0) \t\t\t    {return SetFourByteOption(epi,trueIfGet,INET_IP,kIP_REUSEADDR,value,result);;};\n\tif (strcmp(\"SO_REUSEPORT\",aString)==0) \t\t\t    {return SetFourByteOption(epi,trueIfGet,INET_IP,kIP_REUSEADDR,value,result);};\n\tif (strcmp(\"SO_DONTROUTE\",aString)==0) \t\t\t    {return SetFourByteOption(epi,trueIfGet,INET_IP,kIP_DONTROUTE,value,result);};\n\tif (strcmp(\"SO_BROADCAST\",aString)==0) \t\t\t    {return SetFourByteOption(epi,trueIfGet,INET_IP,kIP_BROADCAST,value,result);};\n\tif (strcmp(\"SO_SNDBUF\",aString)==0) \t\t\t    {return SetFourByteOption(epi,trueIfGet,XTI_GENERIC,XTI_SNDBUF,value,result);};\n\tif (strcmp(\"SO_RCVBUF\",aString)==0) \t\t\t    {return SetFourByteOption(epi,trueIfGet,XTI_GENERIC,XTI_RCVBUF,value,result);};\n\tif (strcmp(\"SO_KEEPALIVE\",aString)==0) \t\t\t   {return SetKeepAliveOption(epi,trueIfGet,INET_TCP,TCP_KEEPALIVE,value,result);};\n\tif (strcmp(\"SO_OOBINLINE\",aString)==0) \t\t\t    {return SetFourByteOption(epi,trueIfGet,INET_TCP,TCP_OOBINLINE,value,result);};\n\tif (strcmp(\"SO_PRIORITY\",aString)==0) \t\t\t     {return SetOneByteOption(epi,trueIfGet,INET_IP,kIP_TOS,value,result);};\n\tif (strcmp(\"SO_LINGER\",aString)==0) \t\t\t      {return SetLingerOption(epi,trueIfGet,XTI_GENERIC,XTI_LINGER,value,result);};\n\tif (strcmp(\"SO_RCVLOWAT\",aString)==0) \t\t\t    {return SetFourByteOption(epi,trueIfGet,XTI_GENERIC,XTI_RCVLOWAT,value,result);};\n\tif (strcmp(\"SO_SNDLOWAT\",aString)==0) \t\t\t    {return SetFourByteOption(epi,trueIfGet,XTI_GENERIC,XTI_SNDLOWAT,value,result);};\t\n\t\n\tif (strcmp(\"IP_OPTIONS\",aString)==0) \t\t\t    { }; //JMM What to do here?\t\n\tif (strcmp(\"IP_TTL\",aString)==0) \t\t\t         {return SetOneByteOption(epi,trueIfGet,INET_IP,kIP_TTL,value,result);};\t\n\tif (strcmp(\"IP_HDRINCL\",aString)==0) \t\t\t    {return SetFourByteOption(epi,trueIfGet,INET_IP,kIP_HDRINCL,value,result);}; //NOT SUPPORT FOR IP\t\n\tif (strcmp(\"IP_RCVOPTS\",aString)==0) \t\t\t    {return SetFourByteOption(epi,trueIfGet,INET_IP,kIP_RCVOPTS,value,result);};\t\n\tif (strcmp(\"IP_RCVDSTADDR\",aString)==0) \t\t\t{return SetFourByteOption(epi,trueIfGet,INET_IP,kIP_RCVDSTADDR,value,result);};\t\n\tif (strcmp(\"IP_MULTICAST_IF\",aString)==0) \t\t\t{return SetFourByteOption(epi,trueIfGet,INET_IP,kIP_MULTICAST_IF,value,result);};\t\n\tif (strcmp(\"IP_MULTICAST_TTL\",aString)==0) \t\t\t {return SetOneByteOption(epi,trueIfGet,INET_IP,kIP_MULTICAST_TTL,value,result);};\t\n\tif (strcmp(\"IP_MULTICAST_LOOP\",aString)==0) \t     {return SetOneByteOption(epi,trueIfGet,INET_IP,kIP_MULTICAST_LOOP,value,result);};\t\n\tif (strcmp(\"IP_ADD_MEMBERSHIP\",aString)==0) \t    { return SetEightByteOption(epi,trueIfGet,INET_IP,kIP_ADD_MEMBERSHIP,(char *) value,result);};\t\n\tif (strcmp(\"IP_DROP_MEMBERSHIP\",aString)==0) \t    { return SetEightByteOption(epi,trueIfGet,INET_IP,kIP_DROP_MEMBERSHIP,(char *) value,result);};\t\n\tif (strcmp(\"IP_BROADCAST_IFNAME\",aString)==0) \t        {return SetFourByteOption(epi,trueIfGet,INET_IP,kIP_BROADCAST_IFNAME,value,result);};\t\n\tif (strcmp(\"IP_RCVIFADDR\",aString)==0) \t            {return SetFourByteOption(epi,trueIfGet,INET_IP,kIP_RCVIFADDR,value,result);};\t\n\n    *result = 0;\n    return -1;\n}\n\nstatic OTResult SetEightByteOption(EPInfo* epi,Boolean trueIfGet, OTXTILevel level, OTXTIName  name, char * value, SInt32    *returnValue) {\n   OTResult err;\n   UInt8    optBuffer[kOTFourByteOptionSize+4];\n   TOption  *option = (TOption *) &optBuffer;\n   TOptMgmt request;\n   TOptMgmt result;\n   Boolean isAsync=false;\n   \n   /* Set up the option buffer to specify the option and value to set. */\n   option->len  = kOTFourByteOptionSize+4;\n   option->level= level;\n   option->name = name;\n   option->status = 0;\n   if (!trueIfGet) \n    OTMemcpy(option->value,value,8);\n    \n   /* Set up request parameter for OTOptionManagement */\n   request.opt.buf= (UInt8 *) option;\n   request.opt.len= sizeof(optBuffer);\n   request.opt.maxlen=sizeof(optBuffer);\n   request.flags  = trueIfGet ? T_CURRENT : T_NEGOTIATE;\n\n   /* Set up reply parameter for OTOptionManagement. */\n   result.opt.buf  = (UInt8 *) option;\n   result.opt.maxlen  = sizeof(optBuffer);\n  \n    if (OTIsSynchronous(epi->erf) == false)\t{\t// check whether ep sync or not\n\t\tisAsync = true;\t\t\t                // set flag if async\n\t\tOTSetSynchronous(epi->erf);\t\t\t        // set endpoint to sync\t\n\t}\n\t\t\t\t\n\t\t\t\t\n    err = OTOptionManagement(epi->erf, &request, &result);\n\t\n\tif (isAsync)\t\t\t\t        // restore ep state \n\t\tOTSetAsynchronous(epi->erf);\n    \n\t*returnValue = option->value[0];\n\n   if (err == noErr) {\n      if (option->status != T_SUCCESS) \n         err = option->status;\n   } \n            \n   return (err);\n}\n\nstatic OTResult SetFourByteOption(EPInfo* epi,Boolean trueIfGet, OTXTILevel level, OTXTIName  name, UInt32   value, SInt32    *returnValue) {\n   OTResult err;\n   UInt8    optBuffer[kOTFourByteOptionSize];\n   TOption  *option = (TOption *) &optBuffer;\n   TOptMgmt request;\n   TOptMgmt result;\n   Boolean isAsync=false;\n   \n   /* Set up the option buffer to specify the option and value to set. */\n   option->len  = kOTFourByteOptionSize;\n   option->level= level;\n   option->name = name;\n   option->status = 0;\n   option->value[0] = value;\n\n   /* Set up request parameter for OTOptionManagement */\n   request.opt.buf= (UInt8 *) option;\n   request.opt.len= sizeof(optBuffer);\n   request.opt.maxlen=sizeof(optBuffer);\n   request.flags  = trueIfGet ? T_CURRENT : T_NEGOTIATE;\n\n   /* Set up reply parameter for OTOptionManagement. */\n   result.opt.buf  = (UInt8 *) option;\n   result.opt.maxlen  = sizeof(optBuffer);\n  \n    if (OTIsSynchronous(epi->erf) == false)\t{\t// check whether ep sync or not\n\t\tisAsync = true;\t\t\t                // set flag if async\n\t\tOTSetSynchronous(epi->erf);\t\t\t        // set endpoint to sync\t\n\t}\n\t\t\t\t\n\t\t\t\t\n    err = OTOptionManagement(epi->erf, &request, &result);\n\t\n\tif (isAsync)\t\t\t\t        // restore ep state \n\t\tOTSetAsynchronous(epi->erf);\n    \n\t*returnValue = option->value[0];\n\n   if (err == noErr) {\n      if (option->status != T_SUCCESS) \n         err = option->status;\n   } \n            \n   return (err);\n}\n\nstatic OTResult SetOneByteOption(EPInfo* epi,Boolean trueIfGet, OTXTILevel level, OTXTIName  name, UInt32   value, SInt32    *returnValue) {\n   OTResult err;\n   UInt8    optBuffer[kOTFourByteOptionSize];\n   TOption  *option = (TOption *) &optBuffer;\n   TOptMgmt request;\n   TOptMgmt result;\n   Boolean isAsync=false;\n   \n   /* Set up the option buffer to specify the option and value to set. */\n   option->len  = kOTOneByteOptionSize;\n   option->level= level;\n   option->name = name;\n   option->status = 0;\n   *(unsigned char *)option->value = value;\n\n   /* Set up request parameter for OTOptionManagement */\n   request.opt.buf= (UInt8 *) option;\n   request.opt.len= kOTOneByteOptionSize;\n   request.opt.maxlen=sizeof(optBuffer);\n   request.flags  = trueIfGet ? T_CURRENT : T_NEGOTIATE;\n\n   /* Set up reply parameter for OTOptionManagement. */\n   result.opt.buf  = (UInt8 *) option;\n   result.opt.maxlen  = sizeof(optBuffer);\n   \n    if (OTIsSynchronous(epi->erf) == false)\t{\t// check whether ep sync or not\n\t\tisAsync = true;\t\t\t                // set flag if async\n\t\tOTSetSynchronous(epi->erf);\t\t\t        // set endpoint to sync\t\n\t}\n\t\t\t\t\n    err = OTOptionManagement(epi->erf, &request, &result);\n\t\n\tif (isAsync)\t\t\t\t        // restore ep state \n\t\tOTSetAsynchronous(epi->erf);\n    \n\t*returnValue = (UInt32) (*(unsigned char *)option->value);\n\n   if (err == noErr) {\n      if (option->status != T_SUCCESS) \n         err = option->status;\n   }\n            \n   return (err);\n}\n\nstatic OTResult SetKeepAliveOption(EPInfo* epi,Boolean trueIfGet, OTXTILevel level, OTXTIName  name, UInt32   value, SInt32    *returnValue) {\n   OTResult err;\n   TKeepAliveOpt  optBuffer;\n   TOption  *option = (TOption *) &optBuffer;\n   TOptMgmt request;\n   TOptMgmt result;\n   Boolean isAsync=false;\n   \n   \n   if (value == 0)\n       optBuffer.tcpKeepAliveOn = T_NO;\n   else\n        optBuffer.tcpKeepAliveOn = T_YES;\n        \n   optBuffer.tcpKeepAliveTimer = value;\n\t\t\t\t\n   /* Set up the option buffer to specify the option and value to set. */\n   option->len  = sizeof(TKeepAliveOpt);\n   option->level= level;\n   option->name = name;\n   option->status = 0;\n\n   /* Set up request parameter for OTOptionManagement */\n   request.opt.buf= (UInt8 *) option;\n   request.opt.len= sizeof(TKeepAliveOpt);\n   request.opt.maxlen=sizeof(TKeepAliveOpt);\n   request.flags  = trueIfGet ? T_CURRENT : T_NEGOTIATE;\n\n   /* Set up reply parameter for OTOptionManagement. */\n   result.opt.buf  = (UInt8 *) option;\n   result.opt.maxlen  = sizeof(TKeepAliveOpt);\n   \n    if (OTIsSynchronous(epi->erf) == false)\t{\t// check whether ep sync or not\n\t\tisAsync = true;\t\t\t                // set flag if async\n\t\tOTSetSynchronous(epi->erf);\t\t\t        // set endpoint to sync\t\n\t}\n\t\t\t\t\n    err = OTOptionManagement(epi->erf, &request, &result);\n\t\n\tif (isAsync)\t\t\t\t        // restore ep state \n\t\tOTSetAsynchronous(epi->erf);\n    \n\t*returnValue = optBuffer.tcpKeepAliveTimer;\n\n   if (err == noErr) {\n      if (option->status != T_SUCCESS) \n         err = option->status;\n   }\n            \n   return (err);\n}\n\t\t    \n\nstatic OTResult SetLingerOption(EPInfo* epi,Boolean trueIfGet, OTXTILevel level, OTXTIName  name, UInt32   value, SInt32    *returnValue) {\n   OTResult err;\n   TLingerOpt  optBuffer;\n   TOption  *option = (TOption *) &optBuffer;\n   TOptMgmt request;\n   TOptMgmt result;\n   Boolean isAsync=false;\n   \n   \n   if (value == 0)\n       optBuffer.tcpLingerOn = T_NO;\n   else\n        optBuffer.tcpLingerOn = T_YES;\n        \n   optBuffer.tcpLingerTimer = value;\n\t\t\t\t\n   /* Set up the option buffer to specify the option and value to set. */\n   option->len  = sizeof(TKeepAliveOpt);\n   option->level= level;\n   option->name = name;\n   option->status = 0;\n\n   /* Set up request parameter for OTOptionManagement */\n   request.opt.buf= (UInt8 *) option;\n   request.opt.len= sizeof(TKeepAliveOpt);\n   request.opt.maxlen=sizeof(TKeepAliveOpt);\n   request.flags  = trueIfGet ? T_CURRENT : T_NEGOTIATE;\n\n   /* Set up reply parameter for OTOptionManagement. */\n   result.opt.buf  = (UInt8 *) option;\n   result.opt.maxlen  = sizeof(TKeepAliveOpt);\n   \n    if (OTIsSynchronous(epi->erf) == false)\t{\t// check whether ep sync or not\n\t\tisAsync = true;\t\t\t                // set flag if async\n\t\tOTSetSynchronous(epi->erf);\t\t\t        // set endpoint to sync\t\n\t}\n\t\t\t\t\n    err = OTOptionManagement(epi->erf, &request, &result);\n\t\n\tif (isAsync)\t\t\t\t        // restore ep state \n\t\tOTSetAsynchronous(epi->erf);\n    \n\t*returnValue = optBuffer.tcpLingerTimer;\n\n   if (err == noErr) {\n      if (option->status != T_SUCCESS) \n         err = option->status;\n   }\n            \n   return (err);\n}\n\n\n//\n//\tNotifier:\n//\n//\tMost of the interesting networking code in this program for the resolver resides inside \n//\tthis notifier.   In order to run asynchronously and as fast as possible,\n//\tthings are done inside the notifier whenever possible.  Since almost\n//\teverything is done inside the notifier, there was little need for specical\n//\tsynchronization code.\n//\n//\tNote: The only events which are expected from the DNR are T_DNRSTRINGTOADDRCOMPLETE,\n//\tT_DNRADDRTONAMECOMPLETE, and of close sleep/reconfigure notifications.\n//\n//\n\nstatic pascal void DNSNotifier(void* context, OTEventCode event, OTResult result, void* cookie)\n{\n#pragma unused(cookie)\n\tEPInfo* epi = (EPInfo*) context;\n\n\tJMMLogMessageAndNumber(\"\\p DNS Event  \",event);\n\tJMMLogMessageAndNumber(\"\\p DNS Result \",result);\n\tJMMLogMessageAndNumber(\"\\p Id \",epi->semaIndex);\n\t\n\t//\n\t//\tOnce the program is shutting down, most events would be uninteresting.\n\t//\n\tif (gProgramState != kProgramRunning)\n\t\t\treturn;\n\t\t\n\t//\n\t//\tWithin the notifier, all action is based on the event code.\n\t//\tIn this notifier, fatal errors all break out of the switch to the bottom.\n\t//\tAs long as everything goes as expected, the case returns rather than breaks.\n\t//\n\tswitch (event)\n\t{\n\t\t//\n\t\t//\tT_DNRSTRINGTOADDRCOMPLETE:\n\t\t//\n\t\t//\tThis event occurs when the DNR has finished an attempt to translate\n\t\t//\tthe server's name into an IP address we can use to connect to.\n\t\t//\n\t\tcase T_DNRSTRINGTOADDRCOMPLETE:\n\t\t{\n\t\t\tgDNSResolverError = result;\n\t\t\tif (result != kOTNoError) {\n\t\t\t\tgDNSResolverStatus = RESOLVER_ERROR;\n    \t\t\tinterpreterProxy->signalSemaphoreWithIndex(epi->semaIndex);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tgDNSAddr = gDNSHostInfo.addrs[0];\n\t\t\tgDNSResolverStatus = RESOLVER_SUCCESS;\n\t\t\tinterpreterProxy->signalSemaphoreWithIndex(epi->semaIndex);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//\n\t\t//\tT_DNRADDRTONAMECOMPLETE:\n\t\t//\n\t\t//\tThis event occurs when the DNR has finished an attempt to translate\n\t\t//\tthe  an IP address into a server name.\n\t\t//\n\t\tcase T_DNRADDRTONAMECOMPLETE:\n\t\t{\n\t\t\tgDNSResolverError = result;\n\t\t\tif (result != kOTNoError) {\n\t\t\t\tgDNSResolverStatus = RESOLVER_ERROR;\n    \t\t\tinterpreterProxy->signalSemaphoreWithIndex(epi->semaIndex);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tgDNSResolverStatus = RESOLVER_SUCCESS;\n\t\t\tinterpreterProxy->signalSemaphoreWithIndex(epi->semaIndex);\n\t\t\treturn;\n\t\t}\n\t\t\t\t\n\t\t\t\n\t\t//\n\t\t//\tkOTProviderWillClose:\n\t\t//\n\t\t//\tThis event occurs when the user changes TCP/IP in the control panel\n\t\t//\n\t\tcase kOTProviderWillClose:\n\t\tcase kOTProviderIsClosed:\n\t\t{\n\t\t\tgDNSResolverError = kOTProviderWillClose;\n\t\t\tinterpreterProxy->signalSemaphoreWithIndex(epi->semaIndex);\n\t\t\tResolverTerminate(); \n\t\t\tgDNSResolverStatus = RESOLVER_SUCCESS; //Cheat! Keep Squeak happy later we fix the resolver EP.\n\t\t\treturn;\n\t\t}\n\n\t\t\n\t\t//\n\t\t//\tdefault:\n\t\t//\n\t\t//\tThere are events which we don't handle, but we don't expect to see\n\t\t//\tany of them.  In the production version of the program, we ignore the event and try to keep running.\n\t\t//\n\t\tdefault:\n\t\t{\n\t\t\treturn;\n\t\t}\n\t}\n}\n\n\n\n//\n//\tNotifier for socket: Please note we have another notifier for sockets that do multiple listens\n//  And a different notifier for UDP sockets, however the intesting thing is that we can call\n/// This routine from othe other as a simple form of inheritence.\n//\n//\tMost of the interesting networking code in this program for socket support resides inside \n//\tthis notifier.   In order to run asynchronously and as fast as possible,\n//\tthings are done inside the notifier whenever possible.  Since almost\n//\teverything is done inside the notifier, there was little need for specical\n//\tsynchronization code.\n//\n//\tIMPORTANT NOTE:  Normal events defined by XTI (T_LISTEN, T_CONNECT, etc)\n//\tand OT completion events (T_OPENCOMPLETE, T_BINDCOMPLETE, etc.) are not\n//\treentrant.  That is, whenever our notifier is invoked with such an event,\n//\tthe notifier will not be called again by OT for another normal or completion\n//\tevent until we have returned out of the notifier - even if we make OT calls\n//\tfrom inside the notifier.   This is a useful synchronization tool.\n//\tHowever, there are two kinds of events which will cause the notifier to \n//\tbe reentered.   One is T_MEMORYRELEASED, which always happens instantly.\n//\tThe other are state change events like kOTProviderWillClose.\n//\n\nstatic pascal void NotifierSocket(void* context, OTEventCode event, OTResult result, void* cookie)\n{\n\tOSStatus err;\n\tOTResult epState;\n\tEPInfo* epi = (EPInfo*) context;\n\t\n\tJMMLogMessageAndNumber(\"\\p Event  \",event);\n\tJMMLogMessageAndNumber(\"\\p Result \",result);\n\tJMMLogMessageAndNumber(\"\\p Id \",epi->semaIndex);\n\n\t//\n\t//\tOnce the program is shutting down, most events would be uninteresting.\n\t//\tHowever, we still need T_OPENCOMPLETE and T_MEMORYRELEASED events since\n\t//\twe can't call CloseOpenTransport until all OTAsyncOpenEndpoints and\n\t//\tOTSends with AckSends have completed.   So those specific events\n\t//\tare still accepted.\n\t//\n\tif (gProgramState != kProgramRunning) {\n\t\tif ((event != T_OPENCOMPLETE) && (event != T_MEMORYRELEASED)) {\n\t\t\treturn;\n\t\t}\n\t}\n\t\n\t\n\t//\n\t//\tWithin the notifier, all action is based on the event code.\n\t//\tIn this notifier, fatal errors all break out of the switch to the bottom.\n\t//\tAs long as everything goes as expected, the case returns rather than breaks.\n\t//\n\tswitch (event)\n\t{\n\t\t//\n\t\t//\tkStreamIoctlEvent:\n\t\t//\n\t\t//\tThis event is returned when an I_FLUSH ioctl has completed.\n\t\t//\tThe flush was done in an attempt to get back all T_MEMORYRELEASED events\n\t\t//\tfor outstanding OTSnd() calls with Ack Sends.   For good measure, we\n\t\t//\tsend a disconnect now.   Errors are ignored at this point since it is\n\t\t//\tpossible that the connection will already be gone, etc.\n\t\t//\n\t\tcase kStreamIoctlEvent:\n\t\t{\n\t\t\tif (OTAtomicTestBit(&epi->stateFlags, kOpenInProgressBit) != 0) {\n\t\t\t    OTAtomicClearBit(&epi->stateFlags2, kFlushDisconnectInProgressBit);\n\t\t\t\t(void) OTSndDisconnect(epi->erf, NULL);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t//\n\t\t//\tT_ACCEPTCOMPLETE:\n\t\t//\n\t\t//\tThis event is received by the listener endpoint only when we open a port with a listen.   \n\t\t//\tThe acceptor endpoint will get a T_PASSCON event instead.\n\t\t//\n\t\tcase T_ACCEPTCOMPLETE:\n\t\t{\n            SetEPLastError(epi,result);\n\t\t\tif (result != kOTNoError) {\n\t\t\t\tmakeEPUnconnected(epi);\n        \t\treturn;\n            }\n            makeEPConnected(epi);\n\t\t\treturn;\n\t\t}\n\t\t//\n\t\t//\tT_BINDCOMPLETE:\n\t\t//\n\t\t//\tThis event is returned when an endpoint has been bound to a wildcard addr.\n\t\t//  Bind happens when we open a connection to a remote location.\n\t\t//\tNo errors are expected.   \n\t\t//\n\t\tcase T_BINDCOMPLETE:\n\t\t{\n            SetEPLastError(epi,result);\n\t\t\tOTAtomicClearBit(&epi->stateFlags3, kWaitingForBind);\n\t\t\tif (result != kOTNoError) {\n            \tmakeEPUnconnected(epi);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (epi->remoteAddress.fHost != 0) \n\t\t\t    DoConnect(epi,epi->remoteAddress.fHost, epi->remoteAddress.fPort);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//\n\t\t//\tT_CONNECT:\n\t\t//\n\t\t//\tThis event is returned when a connection is established to the server.\n\t\t//\tThe program must call OTRcvConnect() to get the conenction information\n\t\t//\tand clear the T_CONNECT event from the stream.  Since OTRcvConnect()\n\t\t//\treturns immediately (rather than via a completion event to the notifier)\n\t\t//\twe can use local stack structures for parameters.\n\t\t//\n\t\tcase T_CONNECT:\n\t\t{\n\t\t\tTCall call;\n\t\t\t\t\t\t\n            SetEPLastError(epi,result);\n\t\t\tif (result != kOTNoError) {\n\t\t\t\tmakeEPUnconnected(epi);\n  \t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t// Address of endpoint that has connection\n\t\t\t// This could be different from original request\n\t\t\t// Due to hand off to different EP say you connect to \n\t\t\t// port 80, but you end up on 49160\n\t\t\t\n\t\t\tcall.addr.maxlen = sizeof(InetAddress);\n\t\t\tcall.addr.buf = (unsigned char*) &epi->remoteAddress;  \n\t\t\tcall.opt.maxlen = 0;\n\t\t\tcall.opt.buf = NULL;\n\t\t\tcall.udata.maxlen = 0;\n\t\t\tcall.udata.buf = NULL;\n\t\t\t\n\t\t\terr = OTRcvConnect(epi->erf, &call);\n\t\t\tSetEPLastError(epi,err);\n\n\t\t\tif (err != kOTNoError) {\n\t\t\t    if (err == kOTLookErr) {\n\t\t\t        OSStatus\tlookStatus;\n\t\t\t        lookStatus = OTLook(epi->erf);\n\t\t\t        if (lookStatus == T_DISCONNECT) {\n               \t\t\terr = OTRcvDisconnect(epi->erf, NULL);\n        \t    \t\tif (err != kOTNoError) {\n        \t\t    \t\tif (err == kOTNoDisconnectErr) {\n                    \t\t\terr = OTRcvConnect(epi->erf, &call);\n                    \t\t\tSetEPLastError(epi,err);\n                       \t\t\tmakeEPUnconnected(epi);\n       \t\t    \t\t        return;\n       \t\t    \t\t    }\n\t\t\t            } else {\n                \t\t\terr = OTRcvConnect(epi->erf, &call);\n                \t\t\tSetEPLastError(epi,err);\n                   \t\t\tmakeEPUnconnected(epi);\n   \t\t    \t\t        return;\n\t\t\t            }\n\t\t\t        }\n\t\t\t        if (lookStatus == T_GODATA) { // HUH\n            \t\t\terr = OTRcvConnect(epi->erf, &call);\n            \t\t\tSetEPLastError(epi,err);\n               \t\t\tmakeEPConnected(epi);\n\t    \t\t        return;\n\t\t\t        }\n\t\t\t    }\n                //JMM book says may return kOTNoDataErr (no connecton yet) or a kOTLookErr with T_DISCONNECT\n                // BUT we had got T_GODATA WHY? \n                \n\t\t\t\tmakeEPUnconnected(epi);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tmakeEPConnected(epi);\n\t\t\treturn;\t\t\t\t// Wait for a T_DATA...\n\t\t}\n\t\t\n\t\t//\n\t\t//\tT_LISTEN:\n\t\t//\n\t\tcase T_LISTEN:\n\t\t{\n\t\t\tDoListenAccept(epi,epi);\n\t\t\treturn;\n\t\t}\n\n\t\t//\n\t\t//\tT_DATA:\n\t\t//\n\t\t//\tThe main rule for processing T_DATA's is to remember that once you have\n\t\t//\ta T_DATA, you won't get another one until you have read to a kOTNoDataErr.\n\t\t//\tThe advanced rule is to remember that you could get another T_DATA\n\t\t//\tduring an OTRcv() which will eventually return kOTNoDataErr, presenting\n\t\t//\tthe application with a synchronization issue to be most careful about.\n\t\t//\t\n\t\t//\tIn this application, since an OTRcv() calls are made from inside the notifier,\n\t\t//\tthis particular synchronization issue doesn't become a problem.\n\t\t//\n\t\tcase T_DATA:\n\t\t{\n\t\t\tif (!OTAtomicTestBit(&epi->stateFlags2, kPassconNeeded)) {\n\t\t\t    ReadData(epi,NULL,0);\n\t\t\t    return;\n\t\t\t }\n\t\t\t else {\n    \t\t\t//\n    \t\t\t//\tHere we work around a small OpenTransport bug.\n    \t\t\t//\tIt turns out, since this program does almost everything from inside the notifier,\n    \t\t\t//\tthat during a T_UNBINDCOMPLETE we can put an EPInfo back into the idle list.\n    \t\t\t//\tIf that notification is interrupted by a T_LISTEN at the notifier, we could\n    \t\t\t//\tend up starting a new connection on the endpoint before OT unwinds the stack\n    \t\t\t//\tout of the code which delivered the T_UNBINDCOMPLETE.   OT has some specific\n    \t\t\t//\tcode to protect against a T_DATA arriving before the T_PASSCON, but in this\n    \t\t\t//\tcase it gets confused and the events arrive out of order.   If we try to\n    \t\t\t//\tdo an OTRcv() at this point we will get a kOTStateChangeErr because the endpoint\n    \t\t\t//\tis still locked by the earlier OTAccept call until the T_PASSCON is delivered\n    \t\t\t//\tto us.   This is fairly benign and can be worked around easily.  What we do\n    \t\t\t//\tis note that the T_PASSCON hasn't arrived yet and defer the call to ReadData()\n    \t\t\t//\tuntil it does.\n    \t\t\t//\n    \t\t\tif ( OTAtomicSetBit(&epi->stateFlags, kPassconBit) != 0 )\n    \t\t\t{\n    \t\t\t    ReadData(epi,NULL,0);\n    \t\t\t    return;\n    \t\t\t}\n    \t\t}\n\t\t}\t\t\t\t\t\n\n\t\t//\n\t\t//\tT_PASSCON:\n\t\t//\n\t\t//\tThis event happens on the accepting endpoint, not the listening endpoint.\n\t\t//\tAt this point the connection is fully established and we can begin the\n\t\t//\tprocess of downloading data.  Note that due to a problem in OT it is \n\t\t//\tpossible for a T_DATA to beat a T_PASSCON to the notifier.  When this\n\t\t//\thappens we note it in the T_DATA case and then start processing the \n\t\t//\tdata here.  \n\t\t//\n\t\tcase T_PASSCON:\n\t\t{\n            SetEPLastError(epi,result);\n\t\t\tif (result != kOTNoError) {\n               \tOTAtomicSetBit(&epi->stateFlags, kPassconBit);\n   \t\t\t\tmakeEPUnconnected(epi);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n   \t\t\tmakeEPConnected(epi);\n                \n\t\t    if ( OTAtomicSetBit(&epi->stateFlags, kPassconBit) != 0 ){\n\t\t\t\t//\n\t\t\t\t//\tA T_DATA previously beat the T_PASSCON to our notifier.\n\t\t\t\t//\tHere we help OT out by having deferred data processing until now.\n\t\t\t\t//\n\t\t\t    ReadData(epi,NULL,0);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t//\n\t\t// T_MEMORYRELEASED\n\t\t// lower level has finished with buffer\n\t\t\t\t\n\t\tcase T_MEMORYRELEASED:\n\t\t{\n\t\t    if (cookie == nil) return;\n\t\t\tOTAtomicAdd32(-1, &epi->outstandingSends);\n\t\t\t\n\t    \tif (epi->socketType == UDPSocketType) {\n\t\t        OTFreeMem(cookie);\n\t    \t} else {//tcp\n\t\t    \tif (gOTVersion < kOTVersion113) {\n\t\t    \t\tstruct OTData *data=cookie;\n\n\t\t    \t\tOTFreeMem(data->fData);\n\t\t    \t\tOTFreeMem(data);\n\t\t    \t} else {\n\t\t        \tOTFreeMem(cookie);\n\t\t        }\n\t        }\n\t        \t\n\t\t    return;\n\t\t}\n\t\t\t\n\t\t//\n\t\t//\tT_DISCONNECT:\n\t\t//\n\t\t//\tAn inbound T_DISCONNECT event usually indicates that the other side of the\n\t\t//\tconnection did an abortive disconnect (as opposed to an orderly release).\n\t\t//\tIt also can be generated by the transport provider on the system (e.g. tcp)\n\t\t//\twhen it decides that a connection is no longer in existance.\n\t\t//\n\t\t//\tWe receive the disconnect, but this program ignores the associated reason (NULL param).\n\t\t//\tIt is possible to get back a kOTNoDisconnectErr from the OTRcvDisconnect call.\n\t\t//\tThis can happen when either (1) the disconnect on the stream is hidden by a \n\t\t//\thigher priority message, or (2) something has flushed or reset the disconnect\n\t\t//\tevent in the meantime.   This is not fatal, and the appropriate thing to do is\n\t\t//\tto pretend the T_DISCONNECT event never happened.   Any other error is unexpected\n\t\t//\tand needs to be reported so we can fix it.  Next, unbind the endpoint so we can\n\t\t//\treuse it for a new inbound connection.\n\t\t//\t\n\t\t//\tIt is possible to get an error on the unbind due to a bug in OT 1.1.1 and earlier.\n\t\t//\tThe best thing to do for that is close the endpoint and open a new one to replace it.\n\t\t//\tWe do this back in the main thread so we don't have to deal with synchronization problems.\n\t\t//\n\t\tcase T_DISCONNECT:\n\t\t{\n\t\t\tepState = OTGetEndpointState(epi->erf);\n\t\t\terr = OTRcvDisconnect(epi->erf, NULL);\n\t\t\t\n\t\t\tif (epState == T_OUTCON) { //01Aug2000 fix for bad port, will get disconnect on outgoing connection\n                makeEPUnconnected(epi);\n\t\t\t}\n\t\t\tif (err != kOTNoError) {\n\t\t\t\tif (err == kOTNoDisconnectErr) return;\n\t\t\t    makeEPBroken(epi,err);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n                ///\n                //Both sides now have closed \n                //\n            \n            OTAtomicSetBit(&epi->stateFlags, kUnConnected);\t\t\t\n\t        OTAtomicClearBit(&epi->stateFlags, kConnected);\n            OTAtomicClearBit(&epi->stateFlags, kThisEndClosed);\t\t\t\n            OTAtomicClearBit(&epi->stateFlags, kOtherEndClosed);\t\t\t\n\t\t\terr = OTUnbind(epi->erf);\n    \t    TapAllInterestedSemaphores(epi);\n\t\t\tif (err != kOTNoError) {\n\t\t\t    makeEPBroken(epi,err);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//\n\t\t//\tT_GODATA:\n\t\t//\n\t\t//\tThis event is received when flow control is lifted.   We are under flow control\n\t\t//\twhenever OTSnd() returns a kOTFlowErr or accepted less bytes than we attempted\n\t\t//\tto send.  \n\t\t//\n\t\t//\tNote, it is also possible to get a T_GODATA without having invoke flow control.\n\t\t//\tBe safe and prepare for this. \n\t\t//\n\t\tcase T_GODATA:\n\t\t{\n            if (OTAtomicClearBit(&epi->stateFlags, kSendIsBlocked)) {\n \t           if (OTAtomicClearBit(&epi->stateFlags2, kTapSemaphoreWriteData))\n  \t              interpreterProxy->signalSemaphoreWithIndex(epi->writeSemaIndex);\n            };\n\t\t\treturn;\n\t\t}\n\n\t\t\n\t\t//\n\t\t//\tT_OPENCOMPLETE:\n\t\t//\n\t\t//\tThis event occurs when an OTAsyncOpenEndpoint() completes.   Note that this event,\n\t\t//\tjust like any other async call made from outside the notifier, can occur during\n\t\t//\tthe call to OTAsyncOpenEndpoint().  That is, in the main thread the program did\n\t\t//\tthe OTAsyncOpenEndpoint(), and the notifier is invoked before control is returned\n\t\t//\tto the line of code following the call to OTAsyncOpenEndpoint().   This is one\n\t\t//\tevent we need to keep track of even if we are shutting down the program since there\n\t\t//\tis no way to cancel outstanding OTAsyncOpenEndpoint() calls.\n\t\t//\n\t\tcase T_OPENCOMPLETE:\n\t\t{\n\t\t\tTOptMgmt \t\t\toptReq;\n\t\t\tTOption             opt;\n\n\t\t\tOTAtomicClearBit(&epi->stateFlags, kOpenInProgressBit);\n\t\t\tif (result == kOTNoError)\n\t\t\t\tepi->erf = (EndpointRef) cookie;\n\t\t\telse {\n\t\t\t\tmakeEPBrokenThenIdle(epi,result);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (gProgramState != kProgramRunning) return;\n\t\t\t\n\t\t\t\t\n\t\t\t//\n\t\t\t//\tSet to blocking mode so we don't have to deal with kEAGAIN errors.\n\t\t\t//\tAsync/blocking is the best mode to write an OpenTransport application in.\n\t\t\t//\n\t\t\terr = OTSetBlocking(epi->erf);\n\t\t\tif (err != kOTNoError) {\n\t\t\t    makeEPBrokenThenIdle(epi,err);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t//\n\t\t\t//\tSet to AckSends so OT doesn't slow down to copy data sent out.\n\t\t\t//\tHowever, this requires special care when closing endpoints, so don't use\n\t\t\t//\tAckSends unless you are prepared for this.   Never, ever, close an endpoint\n\t\t\t//\twhen a send has been done but the T_MEMORYRELEASED event hasn't been returned yet.\n\t\t\t//\n\t\t\terr = OTAckSends(epi->erf);\n\t\t\tif (err != kOTNoError) {\n\t\t\t    makeEPBrokenThenIdle(epi,err);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t//\n\t\t\t//\tOption Management\n\t\t\t//\n\t\t\t//\tTurn on ip_reuseaddr so we don't have port conflicts in general.\n\t\t\t//\tWe use local stack structures here since the memory for the \n\t\t\t//\toption request structure is free upon return.   If we were to request\n\t\t\t//\tthe option return value, we would have to use static memory for it.\n\t\t\t//\n\t\t\toptReq.flags\t\t\t= T_NEGOTIATE;\n\t\t\toptReq.opt.len\t\t\t= kOTFourByteOptionSize;\n\t\t\toptReq.opt.buf\t\t\t= (unsigned char *) &opt;\n\t\t\t\n\t\t\topt.len\t\t\t\t\t= sizeof(TOption);\n\t\t\topt.level\t\t\t\t= INET_IP;\n\t\t\topt.name\t\t\t\t= kIP_REUSEADDR;\n\t\t\topt.status\t\t\t\t= 0;\n\t\t\topt.value[0]\t\t\t= 1;\n\t\t\t\n            if (epi->socketType == TCPSocketType) \n                OTAtomicSetBit(&epi->stateFlags3, kKeepAliveOptionNeeded);\n                \n\t\t\terr = OTOptionManagement(epi->erf, &optReq, NULL);\n\t\t\tif (err != kOTNoError) {\n\t\t\t    makeEPBrokenThenIdle(epi,err);\n\t\t\t}\n\t\t\t\n\t\t\t//\n\t\t\t//\tCode path resumes at T_OPTMGMTCOMPLETE\n\t\t\t//\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//\n\t\t//\tT_OPTMGMTCOMPLETE:\n\t\t//\n\t\t//\tAn OTOptionManagement() call has completed.  These are used on all\n\t\t//\tendpoints to set IP_REUSEADDR.   It is also used for all endpoints\n\t\t//\tother than the listener to set TCP_KEEPALIVE which helps recover\n\t\t//\tserver resources if the other side crashes or is unreachable.\n\t\t//\n\t\tcase T_OPTMGMTCOMPLETE:\n\t\t{\n\t\t\tTOptMgmt \t\t\toptReq;\n\n\t\t\tif (result != kOTNoError) {\n\t\t\t    makeEPBrokenThenIdle(epi,result);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n            if (OTAtomicClearBit(&epi->stateFlags3, kKeepAliveOptionNeeded)) {\n                \n                TKeepAliveOpt\t\topt;\n\t\t\t\t//\n\t\t\t\t//\tTurn on TCP_KEEPALIVE so we can recover from connections which have\n\t\t\t\t//\tgone away which we don't know about.  \n\t\t\t\t//\n\t\t\t\toptReq.flags\t\t\t= T_NEGOTIATE;\n\t\t\t\toptReq.opt.len\t\t\t= sizeof(TKeepAliveOpt);\n\t\t\t\toptReq.opt.buf\t\t\t= (unsigned char *) &opt;\n\t\t\t\t\n\t\t\t\topt.len\t\t\t\t\t= sizeof(TKeepAliveOpt);\n\t\t\t\topt.level\t\t\t\t= INET_TCP;\n\t\t\t\topt.name\t\t\t\t= TCP_KEEPALIVE;\n\t\t\t\topt.status\t\t\t\t= 0;\n\t\t\t\topt.tcpKeepAliveOn\t\t= 1;\n\t\t\t\topt.tcpKeepAliveTimer\t= kTCPKeepAliveInMinutes;\t\n\t\t\t\t\n\t\t\t\terr = OTOptionManagement(epi->erf, &optReq, NULL);\n\t\t\t\tif (err != kOTNoError) {\n    \t\t\t    makeEPBrokenThenIdle(epi,result);\n                }\n                return;\n            }\n\t\t\t\t\t\t\n            makeEPIdle(epi);  //This is where more EP enter the queue of available EPs.\n            \n\t\t\treturn;\t\t\t// now wait \n\t\t}\n\t\t//\n\t\t//\tT_ORDREL:\n\t\t//\n\t\t//\tThis event occurs when an orderly release has been received on the stream.\n\t\t//\n\t\tcase T_ORDREL:\n\t\t{\n\t\t\terr = OTRcvOrderlyDisconnect(epi->erf);\n\t\t\t\n\t\t\tif (err != kOTNoError) {\n\t\t\t\t//\n\t\t\t\t//\tIt is possible for several reasons for the T_ORDREL to have disappeared,\n\t\t\t\t//\tor be temporarily hidden, when we attempt the OTRcvOrderlyDisconnect().\n\t\t\t\t//\tThe best thing to do when this happens is pretend that the event never\n\t\t\t\t//\toccured.   We will get another notification of T_ORDREL if the event\n\t\t\t\t//\tbecomes unhidden later.  Any other form of error is unexpected and \n\t\t\t\t//\tis reported back so we can correct it.\n\t\t\t\t//\n\t\t\t\tif (err == kOTNoReleaseErr)\n\t\t\t\t\treturn;\n\t\t\t\t//Can get OTLookErr with T_DISCONNECT\n    \t\t   makeEPBroken(epi,err);\n\t\t\t}\t\n\n\t\t\tif (OTAtomicTestBit(&epi->stateFlags, kThisEndClosed)) {\n                \n                ///\n                //Both sides now have closed\n                //\n                \n                OTAtomicSetBit(&epi->stateFlags, kUnConnected);\t\t\t\n    \t        OTAtomicClearBit(&epi->stateFlags, kConnected);\n                OTAtomicClearBit(&epi->stateFlags, kThisEndClosed);\t\t\t\n                OTAtomicClearBit(&epi->stateFlags, kOtherEndClosed);\t\t\t\n\t\t\t\t\n\t\t\t\tepState = OTGetEndpointState(epi->erf);\n\t\t\t\tif (epState != T_IDLE) {\n            \t    TapAllInterestedSemaphores(epi);\n\t\t\t\t    return;\n\t\t\t\t}\n\n\t\t\t\terr = OTUnbind(epi->erf);\n        \t    TapAllInterestedSemaphores(epi);\n\t\t\t\tif (err != kOTNoError) {\n\t\t\t\t    makeEPBroken(epi,err);\n\t\t\t\t}\n\t\t\t\t\n    \t\t    return;\n            } else {\n    \t\t\tOTAtomicSetBit(&epi->stateFlags, kOtherEndClosed);\n\t\t\t}\n\t\t\t\n\t\t\t//\n\t\t\t//\tSometimes our data sends get stopped with a kOTLookErr\n\t\t\t//\tbecause of a T_ORDREL from the other side (which doesn't close\n\t\t\t//\tthe connection, it just means they are done sending data).\n\t\t\t//\tIf so, we still end up in the notifier with the T_ORDREL event,\n\t\t\t//\tbut we won't resume sending data unless we explictly check\n\t\t\t//\there whether or not we need to do so.\n\t\t\t//\n             //JMM Test this? \n\n            if (OTAtomicClearBit(&epi->stateFlags, kSendIsBlocked)) {\n  \t\t    \tif (OTAtomicClearBit(&epi->stateFlags2, kTapSemaphoreWriteData))\n                \tinterpreterProxy->signalSemaphoreWithIndex(epi->writeSemaIndex);\n            };\n\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//\n\t\t//\tT_UNBINDCOMPLETE:\n\t\t//\n\t\t//\tThis event occurs on completion of an OTUnbind().\n\t\t//\tThe endpoint is ready for reuse on a new inbound connection.\n\t\t//\tNote that the OTLIFO structure has atomic queue and dequeue,\n\t\t//\twhich can be helpful for synchronization protection.  \n\t\t//\n\t\tcase T_UNBINDCOMPLETE:\n\t\t{\n\t\t\tif (result != kOTNoError) {\n\t\t\t\t//\n\t\t\t\t//\tUnbind errors can occur as a result of a bug in OT 1.1.1 and earlier\n\t\t\t\t//\tversions.   The best recovery is to put the endpoint in the broken\n\t\t\t\t//\tlist for recycling with a clean, new endpoint.\n\t\t\t\t//  Since we only support 1.1.2 we don't expect to run this code.\n\t\t\t\t//\n\t\t\t    makeEPBroken(epi,result);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t\n\t\t//\n\t\t//\tT_DISCONNECTCOMPLETE:\n\t\t//\n\t\t//\tThis event occurs on completion of an OTSndDisconnect().\n\t\t//\tCalled when we abort a socket\n\t\t//\n\t\tcase T_DISCONNECTCOMPLETE: {\n\t\t\terr = OTUnbind(epi->erf);\n\t\t\tif (err != kOTNoError) {\n\t\t\t    makeEPBroken(epi,err);\n\t\t\t}\n\n\t\t\tpurgeReadBuffers(epi);\t\t\n            TapAllInterestedSemaphores(epi); \n\t\t\tif (OTAtomicTestBit(&epi->stateFlags2, kMakeEPIdle)) { //Make EP idle if marked as such only happens via destroy. \n\t\t\t    makeEPIdle(epi);\n\t\t\t}\n\t\t\tepi->stateFlags = 0;\n\t\t\tepi->stateFlags2 = 0;\n\t\t\tepi->stateFlags3 = 0;\n            SetEPLastError(epi,result);\n        \tOTAtomicSetBit(&epi->stateFlags, kUnConnected);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//\n\t\t//Sleep sleep sleep all end points get trashed.\n\t\t//\n\t\tcase kOTProviderWillClose: // reconfig stack disconnect and close\n\t\t{\n\t\t    makeEPBroken(epi,-12345678);\n            if(OTAtomicTestBit(&epi->stateFlags, kOpenInProgressBit)) return;\n            OTSetSynchronous(epi->erf);\t\t\t        // set endpoint to sync\t\n        \tif ( OTAtomicSetBit(&epi->stateFlags2, kFlushDisconnectInProgressBit) == 0 )\n        \t\terr = OTIoctl(epi->erf, I_FLUSH, (void *)FLUSHRW);\n            OTSndDisconnect(epi->erf, NULL);\n            OTUnbind(epi->erf);\n            OTCloseProvider(epi->erf);\n            OTAtomicSetBit(&epi->stateFlags, kUnConnected);\t\t\t\n\t        OTAtomicClearBit(&epi->stateFlags, kConnected);\n            OTAtomicClearBit(&epi->stateFlags, kThisEndClosed);\t\t\t\n            OTAtomicClearBit(&epi->stateFlags, kOtherEndClosed);\t\t\t\n            OTAtomicSetBit(&epi->stateFlags3, kSleepKilledMe);\n            TapAllInterestedSemaphores(epi); \n\t\t    return;\n\t\t}\n\n\t\tcase kOTProviderIsClosed: //Sleep lurks\n\t\t{\n\t\t    makeEPBroken(epi,-12345678);\n            OTSetSynchronous(epi->erf);\t\t\t        // set endpoint to sync\t\n        \tif ( OTAtomicSetBit(&epi->stateFlags2, kFlushDisconnectInProgressBit) == 0 )\n        \t\terr = OTIoctl(epi->erf, I_FLUSH, (void *)FLUSHRW);\n            OTCloseProvider(epi->erf);\n            OTAtomicSetBit(&epi->stateFlags, kUnConnected);\t\t\t\n\t        OTAtomicClearBit(&epi->stateFlags, kConnected);\n            OTAtomicClearBit(&epi->stateFlags, kThisEndClosed);\t\t\t\n            OTAtomicClearBit(&epi->stateFlags, kOtherEndClosed);\t\t\t\n            OTAtomicSetBit(&epi->stateFlags3, kSleepKilledMe);\n            TapAllInterestedSemaphores(epi); \n\t\t\treturn;\n\t\t}\n\n\t\t//\n\t\t//\tdefault:\n\t\t//\n\t\t//\tThere are events which we don't handle, but we don't expect to see\n\t\t//\tany of them.   When running in debugging mode while developing a program,\n\t\t//\twe exit with an informational alert.   Later, in the production version\n\t\t//\tof the program, we ignore the event and try to keep running.\n\t\t//\n\t\tdefault:\n\t\t{\n\t\t\treturn;\n\t\t}\n\t}\n}\n\n\n//\n//\tNotifier for listen socket:\n//\n\n\nstatic pascal void NotifierSocketListener(void* context, OTEventCode event, OTResult result, void* cookie)\n{\n\tEPInfo* epi = (EPInfo*) context;\n\n\tif (gProgramState != kProgramRunning)\n\t{\n\t\tif ((event != T_OPENCOMPLETE) && (event != T_MEMORYRELEASED))\n\t\t{\n\t\t\treturn;\n\t\t}\n\t}\n\tJMMLogMessageAndNumber(\"\\p Listener Event  \",event);\n\tJMMLogMessageAndNumber(\"\\p Listener Result \",result);\n\tJMMLogMessageAndNumber(\"\\p Listener Id \",epi->semaIndex);\n\t\n\tswitch (event)\n\t{\n\t\t//\n\t\t//\tT_BINDCOMPLETE:\n\t\t//\n\t\t//\tWe only bind the listener endpoint, and bind failure is a fatal error.  \n\t\t//\tAcceptor endpoints are bound within the OTAccept() call when they get a connection.\n\t\t//\n\t\tcase T_BINDCOMPLETE:\n\t\t{\n            SetEPLastError(epi,result);\n\t\t\tOTAtomicClearBit(&epi->stateFlags3, kWaitingForBind);\n\t\t\tif (result != kOTNoError)\n   \t\t\t\tmakeEPUnconnected(epi);\n      \n\t\t\treturn;\n\t\t}\n\t\t\t\t\n\t\t//\n\t\t//\tT_LISTEN:\n\t\t//\n\t\tcase T_LISTEN:\n\t\t{\n            SetEPLastError(epi,result);\n   \t\t\tmakeEPConnected(epi);\n\t\t\treturn;\n\t\t}\n\t\t//\n\t\t//\tT_ACCEPTCOMPLETE:\n\t\t//\n\t\t//\tThis event is received by the listener endpoint only.   \n\t\t//\tThe acceptor endpoint will get a T_PASSCON event instead.\n\t\t//\n\t\tcase T_ACCEPTCOMPLETE:\n\t\t{\n            SetEPLastError(epi,result);\n\t\t\treturn;\n\t\t}\n\n\t\t\n\t\t//\n\t\t//\tdefault:\n\t\t//\n\t\t//\tThere are events which we don't handle, pass them onwards\n\t\t//\n\t\tdefault:\n\t\t{\n            NotifierSocket(context,  event,  result, cookie);\n\t\t\treturn;\n\t\t}\n\t}\n}\n\n\n//\n//\tNotifier for UDP listen socket:\n//\n\n\nstatic pascal void NotifierSocketUDP(void* context, OTEventCode event, OTResult result, void* cookie)\n{\n\tEPInfo* epi = (EPInfo*) context;\n\tOSStatus err;\n\n\tJMMLogMessageAndNumber(\"\\p DNS Event  \",event);\n\tJMMLogMessageAndNumber(\"\\p DNS Result \",result);\n\tJMMLogMessageAndNumber(\"\\p Id \",epi->semaIndex);\n\n\tif (gProgramState != kProgramRunning) {\n\t\tif ((event != T_OPENCOMPLETE) && (event != T_MEMORYRELEASED)) {\n\t\t\treturn;\n\t\t}\n\t}\n\t\t\n\tswitch (event)\n\t{\n\t\t//Some sort of UDP send error, too late to tell anyone?\n\t\t//\n\t\tcase T_UDERR: {  \n    \t\tTUDErr \t\tuderr;\n\t\t    InetAddress errorAddress;\n            \n            uderr.addr.maxlen   = sizeof(InetAddress);\n            uderr.addr.len      = sizeof(InetAddress);\n            uderr.addr.buf      = (UInt8 *) &errorAddress;\n            uderr.opt.maxlen    = 0;\n            uderr.opt.len       = 0;\n            uderr.opt.buf       = NULL;\n   \n\t\t    err =  OTRcvUDErr(epi->erf, &uderr);\n            if (err != kOTNoError)   \n\t\t\t\tmakeEPBroken(epi,err);\n\t\t\t\n            SetEPLastError(epi,uderr.error);\n\t\t    return;\n\t\t}\n\t\t\n\t\t//\n\t\t//\tT_DATA:\n\t\t//\n\t\t//  Got milk?\n\t\t//\n\t\t\n\t\tcase T_DATA: {\n\t\t\tReadData(epi,NULL,0);\n\t\t    return;\n\t\t}\n\t\t\n\t\t//\n\t\t//\tT_BINDCOMPLETE:\n\t\t//\n\t\t//\tThis event is returned when an endpoint has been bound.\n\t\t//\tNo errors are expected.   \n\t\t//\n\t\t\n\t\tcase T_BINDCOMPLETE:\n\t\t{\n            SetEPLastError(epi,result);\n\t\t\tOTAtomicClearBit(&epi->stateFlags3, kWaitingForBind);\n\t\t\tif (result != kOTNoError) {\n   \t\t\t\tmakeEPUnconnected(epi);\n\t\t\t\treturn;\n\t\t\t}\n   \t\t\tmakeEPConnected(epi);\n\t\t\treturn;\n\t\t}\n\n\t\t//\n\t\t//\tdefault:\n\t\t//\n\t\t//\tThere are events which we don't handle, pass them onwards to the regular notifier\n\t\t//\n\t\t\n\t\tdefault:\n\t\t{\n            NotifierSocket(context,  event,  result, cookie);\n\t\t\treturn;\n\t\t}\n    }\n}\n\n\nshort\t        gJMMFile=0;\nOTTimeStamp \tJMMStartTimeStamp;\nOTLIFO\t\t\tJMMLogBufferLIFO;    \t//  Buffers that are free to read into\nOTLIFO*\t\t\tJMMLogBufferBuffers\t\t\t= &JMMLogBufferLIFO;\n\n \nvoid JMMWriteLog() {\n\tOSErr\t\t\terror;\n\tOTLink* \t    list = OTReverseList(OTLIFOStealList(JMMLogBufferBuffers));\n\tOTLink*\t\t    link;\n\tReadBuffer      *aBuffer;\n\tlong           dummySize;\n\tchar\t\t\tCH=0x0D;\n\n\tif (true) return;\n\t\n\terror = HCreate(0,0,\"\\pJMMFOOBAR.txt\",'TEXT','TEXT');\n\terror = HOpenDF(0,0,\"\\pJMMFOOBAR.txt\",fsRdWrPerm,&gJMMFile);\n\terror = SetFPos(gJMMFile,fsFromLEOF,0);\n\n\twhile ( (link = list) != NULL ) {\n\t\tlist = link->fNext;\n    \taBuffer = OTGetLinkObject(link, ReadBuffer, fNext);\n    \terror = FSWrite(gJMMFile,(long *)&aBuffer->readBufferSize,aBuffer->readBufferData);\n    \tdummySize = 1;\n    \terror = FSWrite(gJMMFile,&dummySize,&CH);\n\t}\n\terror = FSClose(gJMMFile);\n\t\n\twhile ( (link = list) != NULL ) {\n\t\tlist = link->fNext;\n    \taBuffer = OTGetLinkObject(link, ReadBuffer, fNext);\n        OTFreeMem(aBuffer->readBufferData);\n        OTFreeMem(aBuffer); \n\t}\n\t\n}\n\nvoid JMMLogMessage(Str255 input) {\n\tStr255 \t\t\ttimeString;\n\tlong \t\t\ttimeStringLength,inputLength;\n\tUInt32\t\t\tduration;\n\tReadBuffer      *readBufferObject;\n\t\n\tif (true) return;\n\t\n\tif (gJMMFile == 0) {\n\t\tgJMMFile = 1;\n\t\tOTGetTimeStamp(&JMMStartTimeStamp);\n\t\tJMMLogBufferBuffers->fHead \t\t= NULL;\n\n\t}\n\t\n\tduration = OTElapsedMilliseconds(&JMMStartTimeStamp);\n\tNumToString(duration,timeString);\n\ttimeStringLength = (unsigned char) timeString[0];\n\tinputLength = (unsigned char) input[0];\n\t\n#if TARGET_API_MAC_CARBON\n\treadBufferObject = OTAllocMemInContext(sizeof(ReadBuffer), gClientContext);\n#else\n\treadBufferObject = OTAllocMem(sizeof(ReadBuffer));\n#endif\n\tif (readBufferObject == NULL) return;\n\tOTMemzero(readBufferObject,sizeof(ReadBuffer));\n\t\n#if TARGET_API_MAC_CARBON\n\treadBufferObject->readBufferData = OTAllocMemInContext(60, gClientContext);\n#else\n\treadBufferObject->readBufferData = OTAllocMem(60);\n#endif\n\tif (readBufferObject->readBufferData == NULL) {\n\t    OTFreeMem(readBufferObject);\n\t    return;\n\t}\n\t\n\tOTMemcpy(readBufferObject->readBufferData,timeString+1,timeStringLength);\n\tOTMemcpy(readBufferObject->readBufferData+timeStringLength,input+1,inputLength);\n\treadBufferObject->readBufferSize= timeStringLength+inputLength;\n    OTLIFOEnqueue(JMMLogBufferBuffers, &readBufferObject->fNext);\n\t\n}\n\nvoid JMMLogMessageAndNumber(Str255 msg,long number) {\n\tStr255 buffer,numberString;\n\tlong msgLength,numberLength;\n\t\n\tif (true) return;\n\t\n\tNumToString(number,numberString);\n\tnumberLength = (unsigned char) numberString[0];\n\tmsgLength = (unsigned char) msg[0];\n\t\n\tOTMemcpy(buffer+1,msg+1,msgLength);\n\tOTMemcpy(buffer+1+msgLength,numberString+1,numberLength);\n\tbuffer[0] = (unsigned char) msgLength+numberLength;\n\tJMMLogMessage(buffer);\n\n}\n\n\n/*\nThe Open Transport TCP/IP software modules provide a RawIP interface to the IP protocol\n\nhostname of '' lookup fails This is OK? Same on linux and old mac version\n\nJMM look at tlook page, not sure if we have completely understood it\n\nJMM is it legal to send a zero byte buffer need case for this?\n\n/* According to the XTI spec (\"Section 4.6 Events and TLOOK Error indication\"), \nthe SndOrderlyDisconnect and RcvOrderlyDisconnect calls can fail because of a pending T_DISCONNECT event. \nThis is XTI trying to tell you that the a connection on that endpoint broke. This can happen in this asynchronous \nwacky world of networks and your program will have to call a RcvDisconnect to acknowledge that your endpoint dropped.\n\nYou might want to check out the OTI spec, which, although it is not always written in the most lucid fashion, \ndoes contain valuable information for those involved in OpenTransport programming.\n\nFurther Information:\nTitle: X/OPEN TRANSPORT INTERFACE (XTI) VER 2 [ 1.0 ed]\nAuthor: X/OPEN \nISBN #: 0133534596\n\nA Prior to Open Transport 1.3, there was no supported way of calling Open Transport from CFM-68K code. \nWith the introduction of Open Transport 1.3, it is now possible to call the Open Transport client \ninterface from CFM-68K code. The Open Transport 1.3 SDK includes stub libraries and a document, \n\"Open Tpt CFM68K Dev. Note\", which explains Open Transport's support for CFM-68K. which is supporte for \nsyste 7.x but you can't install! No standalone installer exists. Coping the OT files kinda works\n*/\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SoundPlugin/sqMacSound.c",
    "content": "/*\nCarbon porting notes:\n\n\tCarbon doesn't support the SndPlayDoubleBuffer system routine.\n\tThis is a command you put in the sound channel which repeatedly\n\tcalls a callback routine.\n\t\n\tTechnote 1198 describes the situation, a work-around and provides\n\texample code.  I merely added this code to the end of this file\n\tand plugged it into the existing Squeak code.\n\nKarl Goiser 14/01/01\n*/\n\n//johnmci@smalltalkconsulting.com Nov 6th 2000. Added sound volume logic\n\n/* Adjustments for pluginized VM\n *\n * Note: The Mac support files have not yet been fully converted to\n * pluginization. For the time being, it is assumed that they are linked\n * with the VM. When conversion is complete, they will no longer import\n * \"sq.h\" and they will access all VM functions and variables through\n * the interpreterProxy mechanism.\n */\n \n#include \"sq.h\"\n#include \"SoundPlugin.h\"\n#if TARGET_API_MAC_CARBON\n\t#include <Carbon/Carbon.h>\n#else\n\t#include <Sound.h>\n\t#include <SoundInput.h>\n#endif\nextern struct VirtualMachine* interpreterProxy;\n \n/* initialize/shutdown */\nint soundInit() { return true; }\nint soundShutdown() { snd_Stop(); \treturn 1;}\n\n/* End of adjustments for pluginized VM */\n\n\n/******\n  Mac Sound Output Notes:\n\n\tThe Squeak sound code produces 16-bit, stereo sound buffers. The was\n\tarrived at after experimentation on a PPC 601 at 110 MHz on which I\n\tfound that:\n\t  a. using 16-bit sound only slightly increased the background CPU burden and\n\t  b. 16-bit sound yielded vastly superior sound quality.\n\n\tMy understanding is that SoundManager 3.0 or later supports the 16-bit\n\tsound interface an all Macs, even if the hardware only supports 8-bits.\n\tIf this is not true, however, change BYTES_PER_SAMPLE to 1. Then, either\n\tthe Squeak code will need to be changed to use 8-bit sound buffers,\n\tor (preferrably) snd_PlaySamplesFromAtLength will need to do the conversion\n\tfrom 16 to 8 bits. I plan to cross that bridge if and when we need to.\n\tThe code as currently written was to support Squeak code that generated\n\t8-bit sound buffers.\n\n\tIn earlier versions, I experimented with other sound buffer formats. Here\n\tare all the sound buffer formats that were used at one point or another:\n\t\t1. mono,    8-bits -- packed array of bytes (not currently used)\n\t\t2. stereo,  8-bits -- as above, with L and R channels in alternate bytes (not currently used)\n\t\t3. stereo, 16-bits -- array of 32-bit words; with L and R channels in high and low half-words\n\n\tNote:  8-bit samples are encoded with 0x80 as the center (zero) value\n\tNote: 16-bit samples are encoded as standard, signed integers (i.e., 2's-complement)\n\tNote: When the sound drive is operating in \"mono\", the two stereo channels are mixed\n\t      together. This feature was added in January, 1998.\n\n\t-- John Maloney, July 28, 1996\n\t-- edited: John Maloney, January 5, 1998\n\n  Mac Sound Input Notes:\n\n\tSqueak sound input is currently defined to provide a single (mono) stream\n\tof signed 16-bit samples for all platforms. Platforms that only support\n\t8-bit sound input should convert samples to signed 16 bit values, leaving\n\tthe low order bits zero. Since the available sampling rates differ from\n\tplatform to platform, the client may not get the requested sampling rate;\n\thowever, the call snd_GetRecordingSampleRate returns the sampling rate.\n\tOn many platforms, simultaneous record and playback is permitted only if\n\tthe input and output sampling rates are the same.\n\n\t-- John Maloney, Aug 22, 1997\n\n******/\n\n#define BYTES_PER_SAMPLE 2\n\n/*** double-buffer state record ***/\n\ntypedef struct {\n\tint open;\n\tint stereo;\n\tint frameCount;\n\tint sampleRate;\n\tint lastFlipTime;\n\tint playSemaIndex;\n\tint bufSizeInBytes;\n\tint bufState0;\n\tint bufState1;\n\tint done;\n} PlayStateRec;\n\n/*** possible buffer states ***/\n\n#define BUF_EMPTY\t0\n#define BUF_FULL\t1\n#define BUF_PLAYING\t2\n\n/*** record buffer state record ***/\n\n/* Note: RECORD_BUFFER_SIZE should be a multiple of 4096 bytes to avoid clicking.\n   (The clicking was observed on a Mac 8100; the behavior of other Macs could differ.)\n   Note: G3 Series Powerbook requires minimum of 4 * 4096 buffer size for stereo.\n*/\n#define RECORD_BUFFER_SIZE (4096 * 2)\n\ntypedef struct {\n\tSPB paramBlock;\n\tint stereo;\n        int brokenOSXWasMono;\n\tint bytesPerSample;\n\tint recordSemaIndex;\n\tint readIndex;  /* index of the next sample to read */\n\tchar samples[RECORD_BUFFER_SIZE];\n} RecordBufferRec, *RecordBuffer;\n\n#if (defined ( __APPLE__ ) && defined ( __MACH__ )) || TARGET_API_MAC_CARBON\nenum {\n  dbBufferReady                 = 0x00000001, /*double buffer is filled*/\n  dbLastBuffer                  = 0x00000004 /*last double buffer to play*/\n};\nstruct SndDoubleBuffer {\n  long                dbNumFrames;\n  long                dbFlags;\n  long                dbUserInfo[2];\n  SInt8               dbSoundData[1];\n};\n\n\ntypedef struct SndDoubleBuffer          SndDoubleBuffer;\ntypedef SndDoubleBuffer *               SndDoubleBufferPtr;\ntypedef CALLBACK_API( void , SndDoubleBackProcPtr )(SndChannelPtr channel, SndDoubleBufferPtr doubleBufferPtr);\ntypedef STACK_UPP_TYPE(SndDoubleBackProcPtr)                    SndDoubleBackUPP;\n\nstruct SndDoubleBufferHeader {\n  short               dbhNumChannels;\n  short               dbhSampleSize;\n  short               dbhCompressionID;\n  short               dbhPacketSize;\n  UnsignedFixed       dbhSampleRate;\n  SndDoubleBufferPtr  dbhBufferPtr[2];\n  SndDoubleBackUPP    dbhDoubleBack;\n};\ntypedef struct SndDoubleBufferHeader    SndDoubleBufferHeader;\ntypedef SndDoubleBufferHeader *         SndDoubleBufferHeaderPtr;\nstruct SndDoubleBufferHeader2 {\n  short               dbhNumChannels;\n  short               dbhSampleSize;\n  short               dbhCompressionID;\n  short               dbhPacketSize;\n  UnsignedFixed       dbhSampleRate;\n  SndDoubleBufferPtr  dbhBufferPtr[2];\n  SndDoubleBackUPP    dbhDoubleBack;\n  OSType              dbhFormat;\n};\ntypedef struct SndDoubleBufferHeader2   SndDoubleBufferHeader2;\ntypedef SndDoubleBufferHeader2 *        SndDoubleBufferHeader2Ptr;\n#endif\n\n/*** sound output variables ***/\n\nSndChannelPtr chan;\nPlayStateRec bufState = {false, false, 0, 0, 0, 0, 0, 0, 0, true};\nSndDoubleBufferHeader dblBufHeader;\n\n/*** sound input variables ***/\n\nRecordBufferRec recordBuffer1, recordBuffer2;\nint recordingInProgress;\nlong soundInputRefNum;\n\n/*** local functions ***/\n\npascal void DoubleBack(SndChannelPtr chan, SndDoubleBufferPtr buf);\nint FillBufferWithSilence(SndDoubleBufferPtr buf);\npascal void FlipRecordBuffers(SPBPtr pb);\nint MixInSamples(int count, char *srcBufPtr, int srcStartIndex, char *dstBufPtr, int dstStartIndex);\n\nOSErr CarbonSndPlayDoubleBuffer (SndChannelPtr chan, SndDoubleBufferHeaderPtr theParams);\n\n\npascal void DoubleBack(SndChannelPtr chan, SndDoubleBufferPtr buf) {\n  /* Switch buffers (at interrupt time). The given buffer just finished playing. */\n\n\tPlayStateRec *state;\n\n\t#pragma unused(chan)  /* reference argument to avoid compiler warnings */\n\n\tstate = (PlayStateRec *) buf->dbUserInfo[0];\n\tif (buf->dbUserInfo[1] == 0) {\n\t\tstate->bufState0 = BUF_EMPTY;\n\t\tstate->bufState1 = BUF_PLAYING;\n\t} else {\n\t\tstate->bufState0 = BUF_PLAYING;\n\t\tstate->bufState1 = BUF_EMPTY;\n\t}\n\n\tbuf->dbNumFrames = state->frameCount;\n\tbuf->dbFlags = buf->dbFlags | dbBufferReady;\n\tif (state->done) {\n\t\tbuf->dbFlags = buf->dbFlags | dbLastBuffer;\n\t} else {\n\t\tinterpreterProxy->signalSemaphoreWithIndex(state->playSemaIndex);\n\t}\n\tstate->lastFlipTime = interpreterProxy->ioMicroMSecs();\n\tFillBufferWithSilence(buf);  /* avoids ugly stutter if not filled in time */\n}\n\nint FillBufferWithSilence(SndDoubleBufferPtr buf) {\n\tunsigned int *sample, *lastSample;\n\n\tsample\t\t= (unsigned int *) &buf->dbSoundData[0];\n\tlastSample\t= (unsigned int *) &buf->dbSoundData[bufState.bufSizeInBytes];\n\n\t/* word-fill buffer with silence */\n\tif (BYTES_PER_SAMPLE == 1) {\n\t\twhile (sample < lastSample) {\n\t\t\t*sample++ = 0x80808080;  /* Note: 0x80 is zero value for 8-bit samples */\n\t\t}\n\t} else {\n\t\twhile (sample < lastSample) {\n\t\t\t*sample++ = 0;\n\t\t}\n\t}\n\treturn 0;\n}\n\npascal void FlipRecordBuffers(SPBPtr pb) {\n\t/* called at interrupt time to exchange the active and inactive record buffers */\n\tRecordBuffer thisBuffer = (RecordBuffer) pb;\n\tRecordBuffer nextBuffer = (RecordBuffer) pb->userLong;\n\n\tif (pb->error == 0) {\n  \t\t/* restart recording using the other buffer */\n\t\tSPBRecord(&nextBuffer->paramBlock, true);\n\t\t/* reset the read pointer for the buffer that has just been filled */\n\t\tthisBuffer->readIndex = 0;\n\t\tinterpreterProxy->signalSemaphoreWithIndex(nextBuffer->recordSemaIndex);\n\t}\n}\n\n/*** exported sound output functions ***/\n\nint snd_AvailableSpace(void) {\n\tif (!bufState.open) return -1;\n\tif ((bufState.bufState0 == BUF_EMPTY) ||\n\t\t(bufState.bufState1 == BUF_EMPTY)) {\n\t\t\treturn bufState.bufSizeInBytes;\n\t}\n\treturn 0;\n}\n\nint snd_PlaySamplesFromAtLength(int frameCount, int arrayIndex, int startIndex) {\n\tSndDoubleBufferPtr buf;\n\tint framesWritten;\n\n\tif (!bufState.open) return -1;\n\n\tif (bufState.bufState0 == BUF_EMPTY) {\n\t\tbuf = dblBufHeader.dbhBufferPtr[0];\n\t\tbufState.bufState0 = BUF_FULL;\n\t} else {\n\t\tif (bufState.bufState1 == BUF_EMPTY) {\n\t\t\tbuf = dblBufHeader.dbhBufferPtr[1];\n\t\t\tbufState.bufState1 = BUF_FULL;\n\t\t} else {\n\t\t\treturn 0;  /* neither buffer is available */\n\t\t}\n\t}\n\n\tif (bufState.frameCount < frameCount) {\n\t\tframesWritten = bufState.frameCount;\n\t} else {\n\t\tframesWritten = frameCount;\n\t}\n\n\tif (BYTES_PER_SAMPLE == 1) {  /* 8-bit samples */\n\t\tunsigned char *src, *dst, *end;\n\t\tsrc = (unsigned char *) (arrayIndex + startIndex);\n\t\tend = (unsigned char *) src + (framesWritten * (bufState.stereo ? 2 : 1));\n\t\tdst = (unsigned char *) &buf->dbSoundData[0];\n\t\twhile (src < end) {\n\t\t\t*dst++ = *src++;\n\t\t}\n\t} else {  /* 16-bit samples */\n\t\tshort int *src, *dst, *end;\n\t\tsrc = (short int *) (arrayIndex + (startIndex * 4));\n\t\tend = (short int *) (arrayIndex + ((startIndex + framesWritten) * 4));\n\t\tdst = (short int *) &buf->dbSoundData[0];\n\t\tif (bufState.stereo) {  /* stereo */\n\t\t\twhile (src < end) {\n\t\t\t\t*dst++ = *src++;\n\t\t\t}\n\t\t} else {  /* mono */\n\t\t\t/* if mono, average the left and right channels of the source */\n\t\t\tunsigned int a,b;\n\t\t\twhile (src < end) {\n\t\t\t\ta = *src++;\n\t\t\t\tb = *src++;\n\t\t\t\t*dst++ = (a+b) / 2;\n\t\t\t}\n\t\t}\n\t}\n\treturn framesWritten;\n}\n\nint MixInSamples(int count, char *srcBufPtr, int srcStartIndex, char *dstBufPtr, int dstStartIndex) {\n\tint sample;\n\n\tif (BYTES_PER_SAMPLE == 1) {  /* 8-bit samples */\n\t\tunsigned char *src, *dst, *end;\n\t\tsrc = (unsigned char *) srcBufPtr + srcStartIndex;\n\t\tend = (unsigned char *) srcBufPtr + (count * (bufState.stereo ? 2 : 1));\n\t\tdst = (unsigned char *) dstBufPtr + dstStartIndex;\n\t\twhile (src < end) {\n\t\t\tsample = *dst + (*src++ - 128);\n\t\t\tif (sample > 255) sample = 255;\n\t\t\tif (sample < 0) sample = 0;\n\t\t\t*dst++ = sample;\n\t\t}\n\t} else {  /* 16-bit samples */\n\t\tshort int *src, *dst, *end;\n\t\tsrc = (short int *) (srcBufPtr + (srcStartIndex * 4));\n\t\tend = (short int *) (srcBufPtr + ((srcStartIndex + count) * 4));\n\t\tif (bufState.stereo) {  /* stereo */\n\t\t\tdst = (short int *) (dstBufPtr + (dstStartIndex * 4));\n\t\t\twhile (src < end) {\n\t\t\t\tsample = *dst + *src++;\n\t\t\t\tif (sample > 32767) sample = 32767;\n\t\t\t\tif (sample < -32767) sample = -32767;\n\t\t\t\t*dst++ = sample;\n\t\t\t}\n\t\t} else {  /* mono */\n\t\t\t/* if mono, average the left and right channels of the source */\n\t\t\tunsigned int a,b;\n\t\t\tdst = (short int *) (dstBufPtr + (dstStartIndex * 2));\n\t\t\twhile (src < end) {\n\t\t\t\ta = *src++;\n\t\t\t\tb = *src++;\n\t\t\t\tsample = *dst + ((a+b) / 2);\n\t\t\t\tif (sample > 32767) sample = 32767;\n\t\t\t\tif (sample < -32767) sample = -32767;\n\t\t\t\t*dst++ = sample;\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n\nint snd_InsertSamplesFromLeadTime(int frameCount, int srcBufPtr, int samplesOfLeadTime) {\n\tSndDoubleBufferPtr bufPlaying, otherBuf;\n\tint samplesInserted, startSample, count;\n\n\tif (!bufState.open) return -1;\n\n\tif (bufState.bufState0 == BUF_PLAYING) {\n\t\tbufPlaying = dblBufHeader.dbhBufferPtr[0];\n\t\totherBuf = dblBufHeader.dbhBufferPtr[1];\n\t} else {\n\t\tbufPlaying = dblBufHeader.dbhBufferPtr[1];\n\t\totherBuf = dblBufHeader.dbhBufferPtr[0];\n\t}\n\n\tsamplesInserted = 0;\n\n\t/* mix as many samples as can fit into the remainder of the currently playing buffer */\n\tstartSample =\n\t\t((bufState.sampleRate * (interpreterProxy->ioMicroMSecs() - bufState.lastFlipTime)) / 1000) + samplesOfLeadTime;\n\tif (startSample < bufState.frameCount) {\n\t\tcount = bufState.frameCount - startSample;\n\t\tif (count > frameCount) count = frameCount;\n\t\tMixInSamples(count, (char *) srcBufPtr, 0, (char *) &bufPlaying->dbSoundData[0], startSample);\n\t\tsamplesInserted = count;\n\t}\n\n\t/* mix remaining samples into the inactive buffer */\n\tcount = bufState.frameCount;\n\tif (count > (frameCount - samplesInserted)) {\n\t\tcount = frameCount - samplesInserted;\n\t}\n\tMixInSamples(count, (char *) srcBufPtr, samplesInserted, (char *) &otherBuf->dbSoundData[0], 0);\n\treturn samplesInserted + count;\n}\n\nint snd_PlaySilence(void) {\n\tif (!bufState.open) return -1;\n\n\tif (bufState.bufState0 == BUF_EMPTY) {\n\t\tFillBufferWithSilence(dblBufHeader.dbhBufferPtr[0]);\n\t\tbufState.bufState0 = BUF_FULL;\n\t} else {\n\t\tif (bufState.bufState1 == BUF_EMPTY) {\n\t\t\tFillBufferWithSilence(dblBufHeader.dbhBufferPtr[1]);\n\t\t\tbufState.bufState1 = BUF_FULL;\n\t\t} else {\n\t\t\treturn 0;  /* neither buffer is available */\n\t\t}\n\t}\n\treturn bufState.bufSizeInBytes;\n}\n\nint snd_Start(int frameCount, int samplesPerSec, int stereo, int semaIndex) {\n\tOSErr\t\t\t\terr;\n\tSndDoubleBufferPtr\tbuffer;\n\tint\t\t\t\t\tbytesPerFrame, bufferBytes, i;\n\n\tbytesPerFrame\t\t\t= stereo ? 2 * BYTES_PER_SAMPLE : BYTES_PER_SAMPLE;\n\tbufferBytes\t\t\t\t= ((frameCount * bytesPerFrame) / 8) * 8;\n\t\t/* Note: Must round bufferBytes down to an 8-byte boundary to avoid clicking!!! */\n\n\tif (bufState.open) {\n\t\t/* still open from last time; clean up before continuing */\n\t\tsnd_Stop();\n\t}\n\n\tbufState.open\t\t\t= false;  /* set to true if successful */\n\tbufState.stereo\t\t\t= stereo;\n\tbufState.frameCount\t\t= bufferBytes / bytesPerFrame;\n\tbufState.sampleRate\t\t= samplesPerSec;\n\tbufState.lastFlipTime\t= interpreterProxy->ioMicroMSecs();\n\tbufState.playSemaIndex\t= semaIndex;\n\tbufState.bufSizeInBytes\t= bufferBytes;\n\tbufState.bufState0\t\t= BUF_EMPTY;\n\tbufState.bufState1\t\t= BUF_EMPTY;\n\tbufState.done\t\t\t= false;\n\n\tdblBufHeader.dbhNumChannels\t\t= stereo ? 2 : 1;\n\tdblBufHeader.dbhSampleSize\t\t= BYTES_PER_SAMPLE * 8;\n\tdblBufHeader.dbhCompressionID\t= 0;\n\tdblBufHeader.dbhPacketSize\t\t= 0;\n\tdblBufHeader.dbhSampleRate\t\t= samplesPerSec << 16; /* convert to fixed point */\n#if TARGET_API_MAC_CARBON\n\tdblBufHeader.dbhDoubleBack\t\t= nil;\n#else\n\tdblBufHeader.dbhDoubleBack\t\t= NewSndDoubleBackProc(DoubleBack);\n#endif\n\n\tchan = NULL;\n\terr = SndNewChannel(&chan, sampledSynth, 0, NULL);\n\tif (err != noErr) return false; /* could not open sound channel */\n\n\tfor (i = 0; i < 2; i++) {\n\t\tbuffer = (SndDoubleBufferPtr) NewPtrClear(sizeof(SndDoubleBuffer) + bufState.bufSizeInBytes);\n\t\tif (buffer == NULL) {   /* could not allocate memory for a buffer; clean up and abort */\n\t\t\tSndDisposeChannel(chan, true);\n#if !TARGET_API_MAC_CARBON\n\t\t\tDisposeRoutineDescriptor(dblBufHeader.dbhDoubleBack);\n#endif\n\t\t\tif (i == 1) {  /* free the first buffer */\n\t\t\t\tDisposePtr((char *) dblBufHeader.dbhBufferPtr[1]);\n\t\t\t\tdblBufHeader.dbhBufferPtr[1] = NULL;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\tbuffer->dbNumFrames\t\t= bufState.frameCount;\n\t\tbuffer->dbFlags\t\t\t= dbBufferReady;\n\t\tbuffer->dbUserInfo[0]\t= (long) &bufState;\n\t\tbuffer->dbUserInfo[1]\t= i;\n\t\tFillBufferWithSilence(buffer);\n\n\t\tdblBufHeader.dbhBufferPtr[i] = buffer;\n\t}\n\n#if TARGET_API_MAC_CARBON\n\terr = CarbonSndPlayDoubleBuffer(chan, &dblBufHeader);\n#else\n\terr = SndPlayDoubleBuffer(chan, &dblBufHeader);\n#endif\n\tif (err != noErr) return false; /* could not play double buffer */\n\n\tbufState.open = true;\n\treturn true;\n}\n\nint snd_Stop(void) {\n\tOSErr\t\t\t\terr;\n\tSndDoubleBufferPtr\tbuffer;\n\tSCStatus\t\t\tstatus;\n\tlong\t\t\t\ti, junk;\n\n\tif (!bufState.open) return 0;\n\tbufState.open = false;\n\n\tbufState.done = true;\n\twhile (true) {\n\t\terr = SndChannelStatus(chan, sizeof(status), &status);\n\t\tif (err != noErr) break; /* could not get channel status */\n\t\tif (!status.scChannelBusy) break;\n\t\tDelay(1, (void *) &junk);\n\t}\n\tSndDisposeChannel(chan, true);\n#if !TARGET_API_MAC_CARBON\n\tDisposeRoutineDescriptor(dblBufHeader.dbhDoubleBack);\n#endif\n\n\tfor (i = 0; i < 2; i++) {\n\t\tbuffer = dblBufHeader.dbhBufferPtr[i];\n\t\tif (buffer != NULL) {\n\t\t\tDisposePtr((char *) buffer);\n\t\t}\n\t\tdblBufHeader.dbhBufferPtr[i] = NULL;\n\t}\n\tbufState.open = false;\n\treturn 0;\n}\n\n/*** exported sound input functions ***/\n\nint snd_SetRecordLevel(int level) {\n\t/* set the recording level to a value between 0 (minimum gain) and 1000. */\n\tFixed inputGainArg;\n\tint err;\n\n\tif (!recordingInProgress || (level < 0) || (level > 1000)) {\n\t\tinterpreterProxy->success(false);\n\t\treturn 0;  /* noop if not recording */\n\t}\n\n\tinputGainArg = ((500 + level) << 16) / 1000;  /* gain is Fixed between 0.5 and 1.5 */\n\terr = SPBSetDeviceInfo(soundInputRefNum, siInputGain, &inputGainArg);\n\t/* don't fail on error; hardware may not support setting the gain */\n\treturn 0;\n}\n\nint snd_StartRecording(int desiredSamplesPerSec, int stereo, int semaIndex) {\n\t/* turn on sound recording, trying to use a sampling rate close to\n\t   the one specified. semaIndex is the index in the exportedObject\n\t   array of a semaphore to be signalled when input data is available. */\n\tStr255 deviceName = \"\\p\";\n\tshort automaticGainControlArg;\n\tFixed inputGainArg;\n\tlong  compressionTypeArg;\n\tshort continuousArg;\n\tshort sampleSizeArg;\n\tshort channelCountArg;\n\tUnsignedFixed sampleRateArg;\n\tint err;\n        long \tbrokenOSXWasMono=0;\n        \n\terr = SPBOpenDevice(deviceName, siWritePermission, &soundInputRefNum);\n\tif (err != noErr) {\n\t\tinterpreterProxy->success(false);\n\t\treturn 0;\n\t}\n\n\tchannelCountArg = stereo ? 2 : 1;\n\terr = SPBSetDeviceInfo(soundInputRefNum, siNumberChannels, &channelCountArg);\n\tif (err == notEnoughHardwareErr) {\n            stereo = 1;\n            brokenOSXWasMono = 1;\n            channelCountArg = stereo ? 2 : 1;\n            err = SPBSetDeviceInfo(soundInputRefNum, siNumberChannels, &channelCountArg);\n        }\n        if (err != noErr) {\n                interpreterProxy->success(false);\n                SPBCloseDevice(soundInputRefNum);\n                return 0;\n        }\n\n\t/* try to initialize some optional parameters, but don't fail if we can't */\n\tautomaticGainControlArg = false;\n\tSPBSetDeviceInfo(soundInputRefNum, siAGCOnOff, &automaticGainControlArg);\n\tinputGainArg = 1 << 16;  /* 1.0 in Fixed */\n\tSPBSetDeviceInfo(soundInputRefNum, siInputGain, &inputGainArg);\n\tcompressionTypeArg = 'NONE';\n\tSPBSetDeviceInfo(soundInputRefNum, siCompressionType, &compressionTypeArg);\n\n\tcontinuousArg = true;\n\terr = SPBSetDeviceInfo(soundInputRefNum, siContinuous, &continuousArg);\n\tif (err != noErr) {\n\t\tinterpreterProxy->success(false);\n\t\tSPBCloseDevice(soundInputRefNum);\n\t\treturn 0;\n\t}\n\n\tsampleSizeArg = 16;\n\terr = SPBSetDeviceInfo(soundInputRefNum, siSampleSize, &sampleSizeArg);\n\tif (err != noErr) {\n\t\t/* use 8-bit samples */\n\t\tsampleSizeArg = 8;\n\t\terr = SPBSetDeviceInfo(soundInputRefNum, siSampleSize, &sampleSizeArg);\n\t\tif (err != noErr) {\n\t\t\tinterpreterProxy->success(false);\n\t\t\tSPBCloseDevice(soundInputRefNum);\n\t\t\treturn 0;\n\t\t}\n\t}\n\n\t/* try to set the client's desired sample rate */\n\tsampleRateArg = desiredSamplesPerSec << 16;\n\terr = SPBSetDeviceInfo(soundInputRefNum, siSampleRate, &sampleRateArg);\n\tif (err != noErr) {\n\t\t/* if client's rate fails, try the nearest common sampling rates in {11025, 22050, 44100} */\n\t\tif (desiredSamplesPerSec <= 16538) {\n\t\t\tsampleRateArg = 11025 << 16;\n\t\t} else {\n\t\t\tif (desiredSamplesPerSec <= 33075) {\n\t\t\t\tsampleRateArg = 22050 << 16;\n\t\t\t} else {\n\t\t\t\tsampleRateArg = 44100 << 16;\n\t\t\t}\n\t\t}\n\t\t/* even if following fails, recording can go on at the default sample rate */\n\t\tSPBSetDeviceInfo(soundInputRefNum, siSampleRate, &sampleRateArg);\n\t}\n\n \trecordBuffer1.paramBlock.inRefNum = soundInputRefNum;\n\trecordBuffer1.paramBlock.count = RECORD_BUFFER_SIZE;\n\trecordBuffer1.paramBlock.milliseconds = 0;\n\trecordBuffer1.paramBlock.bufferLength = RECORD_BUFFER_SIZE;\n\trecordBuffer1.paramBlock.bufferPtr = recordBuffer1.samples;\n#if TARGET_API_MAC_CARBON\n\trecordBuffer1.paramBlock.completionRoutine = NewSICompletionUPP(FlipRecordBuffers);\n#else\n\trecordBuffer1.paramBlock.completionRoutine = NewSICompletionProc(FlipRecordBuffers);\n#endif\n\trecordBuffer1.paramBlock.interruptRoutine = nil;\n\trecordBuffer1.paramBlock.userLong = (long) &recordBuffer2;  /* pointer to other buffer */\n\trecordBuffer1.paramBlock.error = noErr;\n\trecordBuffer1.paramBlock.unused1 = 0;\n\trecordBuffer1.stereo = stereo;\n        recordBuffer1.brokenOSXWasMono = brokenOSXWasMono;\n\trecordBuffer1.bytesPerSample = sampleSizeArg == 8 ? 1 : 2;\n\trecordBuffer1.recordSemaIndex = semaIndex;\n\trecordBuffer1.readIndex = RECORD_BUFFER_SIZE;\n\n\trecordBuffer2.paramBlock.inRefNum = soundInputRefNum;\n\trecordBuffer2.paramBlock.count = RECORD_BUFFER_SIZE;\n\trecordBuffer2.paramBlock.milliseconds = 0;\n\trecordBuffer2.paramBlock.bufferLength = RECORD_BUFFER_SIZE;\n\trecordBuffer2.paramBlock.bufferPtr = recordBuffer2.samples;\n#if TARGET_API_MAC_CARBON\n\trecordBuffer2.paramBlock.completionRoutine = NewSICompletionUPP(FlipRecordBuffers);\n#else\n\trecordBuffer2.paramBlock.completionRoutine = NewSICompletionProc(FlipRecordBuffers);\n#endif\n\trecordBuffer2.paramBlock.interruptRoutine = nil;\n\trecordBuffer2.paramBlock.userLong = (long) &recordBuffer1;  /* pointer to other buffer */\n\trecordBuffer2.paramBlock.error = noErr;\n\trecordBuffer2.paramBlock.unused1 = 0;\n\trecordBuffer2.stereo = stereo;\n        recordBuffer2.brokenOSXWasMono = brokenOSXWasMono;\n\trecordBuffer2.bytesPerSample = sampleSizeArg == 8 ? 1 : 2;\n\trecordBuffer2.recordSemaIndex = semaIndex;\n\trecordBuffer2.readIndex = RECORD_BUFFER_SIZE;\n\n        err = SPBRecord(&recordBuffer1.paramBlock, true);\n\tif (err != noErr) {\n\t\tinterpreterProxy->success(false);\n\t\tSPBCloseDevice(soundInputRefNum);\n\t\treturn 0;\n\t}\n\n\trecordingInProgress = true;\n\treturn 0;\n}\n\nint snd_StopRecording(void) {\n\t/* turn off sound recording */\n\tint err;\n\n\tif (!recordingInProgress) return 0;  /* noop if not recording */\n\n\terr = SPBStopRecording(soundInputRefNum);\n\tif (err != noErr) interpreterProxy->success(false);\n\tSPBCloseDevice(soundInputRefNum);\n\n#if TARGET_API_MAC_CARBON\n\tDisposeSICompletionUPP(recordBuffer1.paramBlock.completionRoutine);\n#else\n\tDisposeRoutineDescriptor(recordBuffer1.paramBlock.completionRoutine);\n#endif\n\trecordBuffer1.paramBlock.completionRoutine = nil;\n#if TARGET_API_MAC_CARBON\n\tDisposeSICompletionUPP(recordBuffer2.paramBlock.completionRoutine);\n#else\n\tDisposeRoutineDescriptor(recordBuffer2.paramBlock.completionRoutine);\n#endif\n\trecordBuffer2.paramBlock.completionRoutine = nil;\n\n\trecordBuffer1.recordSemaIndex = 0;\n\trecordBuffer2.recordSemaIndex = 0;\n\trecordingInProgress = false;\n\treturn 0;\n}\n\ndouble snd_GetRecordingSampleRate(void) {\n\t/* return the actual recording rate; fail if not currently recording */\n\tUnsignedFixed sampleRateArg;\n\tint err;\n\n\tif (!recordingInProgress) {\n\t\tinterpreterProxy->success(false);\n\t\treturn 0.0;\n\t}\n\n\terr = SPBGetDeviceInfo(soundInputRefNum, siSampleRate, &sampleRateArg);\n\tif (err != noErr) {\n\t\tinterpreterProxy->success(false);\n\t\treturn 0.0;\n\t}\n\treturn  (double) ((sampleRateArg >> 16) & 0xFFFF) +\n\t\t\t((double) (sampleRateArg & 0xFFFF) / 65536.0);\n}\n\nint snd_RecordSamplesIntoAtLength(int buf, int startSliceIndex, int bufferSizeInBytes) {\n\t/* if data is available, copy as many sample slices as possible into the\n\t   given buffer starting at the given slice index. do not write past the\n\t   end of the buffer, which is buf + bufferSizeInBytes. return the number\n\t   of slices (not bytes) copied. a slice is one 16-bit sample in mono\n\t   or two 16-bit samples in stereo. */\n\tint bytesPerSlice = (recordBuffer1.brokenOSXWasMono) ? 2 : ((recordBuffer1.stereo) ? 4 : 2);\n\tchar *nextBuf = (char *) buf + (startSliceIndex * bytesPerSlice);\n\tchar *bufEnd = (char *) buf + bufferSizeInBytes;\n\tchar *src, *srcEnd;\n\tRecordBuffer recBuf = nil;\n\tint bytesCopied;\n\n\tif (!recordingInProgress) {\n\t\tinterpreterProxy->success(false);\n\t\treturn 0;\n\t}\n\n\t/* select the buffer with unread samples, if any */\n\trecBuf = nil;\n\tif (recordBuffer1.readIndex < RECORD_BUFFER_SIZE) recBuf = &recordBuffer1;\n\tif (recordBuffer2.readIndex < RECORD_BUFFER_SIZE) recBuf = &recordBuffer2;\n\tif (recBuf == nil) return 0;  /* no samples available */\n\n\t/* copy samples into the client's buffer */\n\tsrc = &recBuf->samples[0] + recBuf->readIndex;\n\tsrcEnd = &recBuf->samples[RECORD_BUFFER_SIZE];\n\tif (recBuf->bytesPerSample == 1) {\n\t\twhile ((src < srcEnd) && (nextBuf < bufEnd)) {\n\t\t\t/* convert 8-bit sample to 16-bit sample */\n\t\t\t*nextBuf++ = (*src++) - 128;  /* convert from [0-255] to [-128-127] */\n\t\t\t*nextBuf++ = 0;  /* low-order byte is zero */\n\t\t}\n\t} else {\n\t\tif (recordBuffer1.brokenOSXWasMono) {\n                    src++;src++;\n                     while ((src < srcEnd) && (nextBuf < bufEnd)) {\n\t\t\t*nextBuf++ = *src++; \n \t\t\t*nextBuf++ = *src++; \n                        src++;src++;\n                    }\n                } else {\n                    while ((src < srcEnd) && (nextBuf < bufEnd)) {\n\t\t\t*nextBuf++ = *src++;\n                    }\n                }\n\t}\n\trecBuf->readIndex = src - &recBuf->samples[0];  /* update read index */\n\n\t/* return the number of slices copied */\n\tbytesCopied = (int) nextBuf - (buf + (startSliceIndex * bytesPerSlice));\n\treturn bytesCopied / bytesPerSlice;\n}\n\n\n//Nov 6th 2000\nvoid snd_Volume(double *left, double *right) {\n\tdouble temp;\n\tSndCommand cmd;\n    long   results;\n\tOSErr  err;\n\t\n\t*left = 1.0;\n\t*right = 1.0;\n\tcmd.cmd = getVolumeCmd;\n\tcmd.param1 = 0;\n\tcmd.param2 = (long) &results;\n\terr = -1;\n\tif (chan != null)\n\t    err = SndDoImmediate(chan,&cmd);\n\t    \n\tif (err != noErr) {\n\t   err = GetDefaultOutputVolume(&results);\n\t}\n\tif (err != noErr) \n\t    return;\n\ttemp  = (results & 0xFFFF);\n\t*left = temp/256.0;\n\t\n\ttemp = (results >> 16);\n\t*right = temp/256.0;\n}\n\nvoid snd_SetVolume(double left, double right) {\n\tunsigned long tempLeft,tempRight;\n\tSndCommand cmd;\n\tOSErr  err;\n\t\n\ttempLeft = left*256.0 + 0.5;\n\ttempLeft = tempLeft & 0xFFFF;\n\ttempRight = right*256.0 + 0.5;\n\ttempRight= tempRight & 0xFFFF;\n\tcmd.cmd = volumeCmd;\n\tcmd.param1 = 0;\n\tcmd.param2 = (tempRight << 16) | tempLeft;\n\terr = -1;\n\tif (chan != null)\n\t    err= SndDoImmediate(chan,&cmd);\n\tif (err != noErr) {\n\t   err = SetDefaultOutputVolume(cmd.param2);\n\t}\n}\n\n\n\n/*\n\tFile:\t\tCarbonSndPlayDB.c\n\t\n\tDescription:Routines demonstrating how to create a function that works\n\t\t\t\tmuch like the original SndPlayDoubleBuffer but is Carbon compatible\n\t\t\t\t(which SndPlayDoubleBuffer isn't).\n\n\tAuthor:\t\tMC\n\n\tCopyright: \t Copyright 1999-2000 Apple Computer, Inc. All rights reserved.\n\t\n\tDisclaimer:\tIMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc.\n\t\t\t\t(\"Apple\") in consideration of your agreement to the following terms, and your\n\t\t\t\tuse, installation, modification or redistribution of this Apple software\n\t\t\t\tconstitutes acceptance of these terms.  If you do not agree with these terms,\n\t\t\t\tplease do not use, install, modify or redistribute this Apple software.\n\n\t\t\t\tIn consideration of your agreement to abide by the following terms, and subject\n\t\t\t\tto these terms, Apple grants you a personal, non-exclusive license, under Apples\n\t\t\t\tcopyrights in this original Apple software (the \"Apple Software\"), to use,\n\t\t\t\treproduce, modify and redistribute the Apple Software, with or without\n\t\t\t\tmodifications, in source and/or binary forms; provided that if you redistribute\n\t\t\t\tthe Apple Software in its entirety and without modifications, you must retain\n\t\t\t\tthis notice and the following text and disclaimers in all such redistributions of\n\t\t\t\tthe Apple Software.  Neither the name, trademarks, service marks or logos of\n\t\t\t\tApple Computer, Inc. may be used to endorse or promote products derived from the\n\t\t\t\tApple Software without specific prior written permission from Apple.  Except as\n\t\t\t\texpressly stated in this notice, no other rights or licenses, express or implied,\n\t\t\t\tare granted by Apple herein, including but not limited to any patent rights that\n\t\t\t\tmay be infringed by your derivative works or by other works in which the Apple\n\t\t\t\tSoftware may be incorporated.\n\n\t\t\t\tThe Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE MAKES NO\n\t\t\t\tWARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED\n\t\t\t\tWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n\t\t\t\tPURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN\n\t\t\t\tCOMBINATION WITH YOUR PRODUCTS.\n\n\t\t\t\tIN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR\n\t\t\t\tCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n\t\t\t\tGOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n\t\t\t\tARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION\n\t\t\t\tOF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT\n\t\t\t\t(INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN\n\t\t\t\tADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\t\t\t\t\n\tChange History (most recent first):\n\n*/\n\n/* Requirements for using this shim code:\n\n\t1) The sound channel's queue must be empty before you call CarbonSndPlayDoubleBuffer\n\t2) You cannot call MySndDoImmediate until CarbonSndPlayDoubleBuffer returns.  Be\n\t   careful about calling MySndDoImmediate at interrupt time with a quietCmd.\n\n*/\n\n/*\nSome code is commented out becuase knowing who calls it and how allows shortcuts\n\nKarl Goiser 14/01/01\n*/\n#if TARGET_API_MAC_CARBON\n#undef UNNECESSARY_FOR_SQUEAK\n\n#if UNNECESSARY_FOR_SQUEAK\nstatic\tpascal\tvoid\tCarbonSndPlayDoubleBufferCleanUpProc (SndChannelPtr theChannel, SndCommand * theCallBackCmd);\n#endif\nstatic  pascal  void\tCarbonSndPlayDoubleBufferCallBackProc (SndChannelPtr theChannel, SndCommand * theCallBackCmd);\nstatic\t\t\tvoid\tInsertSndDoCommand (SndChannelPtr chan, SndCommand * theCmd);\nstatic\tpascal\tvoid\tNMResponseProc (NMRecPtr nmReqPtr);\n\n#define kBufSize\t\t\t\t\t2048\n\n// Structs\nstruct PerChanInfo {\n\tQElemPtr \t\t\t\t\t\tqLink;\t\t\t\t\t\t/* next queue entry */\n\tshort \t\t\t\t\t\t\tqType;\t\t\t\t\t\t/* queue type = 0 */\n\tshort\t\t\t\t\t\t\tstopping;\n\t#if DEBUG\n\t\tOSType\t\t\t\t\t\tmagic;\n\t#endif\n\tSndCallBackUPP \t\t\t\t\tusersCallBack;\n\tSndDoubleBufferHeaderPtr\t\ttheParams;\n\tCmpSoundHeader\t\t\t\t\tsoundHeader;\n};\ntypedef struct PerChanInfo\t\t\tPerChanInfo;\ntypedef struct PerChanInfo *\t\tPerChanInfoPtr;\n\n// Globals\n\tBoolean\t\t\t\t\t\t\tgNMRecBusy;\n\tNMRecPtr\t\t\t\t\t\tgNMRecPtr;\n\tQHdrPtr\t\t\t\t\t\t\tgFreeList;\n\tPtr\t\t\t\t\t\t\t\tgSilenceTwos;\n\tPtr\t\t\t\t\t\t\t\tgSilenceOnes;\nstatic SndCallBackUPP\t\t\t\tgCarbonSndPlayDoubleBufferCallBackUPP = nil;\nstatic SndCallBackUPP\t\t\t\tgCarbonSndPlayDoubleBufferCleanUpUPP = nil;\n\n#if UNNECESSARY_FOR_SQUEAK\n// Remember this routine could be called at interrupt time, so don't allocate or deallocate memory.\nOSErr\tMySndDoImmediate (SndChannelPtr chan, SndCommand * cmd) {\n\tPerChanInfoPtr\t\t\t\t\tperChanInfoPtr;\n\n\t// Is this being called on one of the sound channels we are manipulating?\n\t// If so, we need to pull our callback out of the way so that the user's commands run\n\tif (gCarbonSndPlayDoubleBufferCallBackUPP == chan->callBack) {\n\t\tif (quietCmd == cmd->cmd || flushCmd == cmd->cmd) {\n\t\t\t// We know that our callBackCmd is the first item in the queue if this is our channel\n\t\t\tperChanInfoPtr = (PerChanInfoPtr)(chan->queue[chan->qHead].param2);\n\t\t\t#if DEBUG\n\t\t\t\tif (perChanInfoPtr->magic != 'SANE') DebugStr(\"\\pBAD in MySndDoImmediate\");\n\t\t\t#endif\n\t\t\tperChanInfoPtr->stopping = true;\n\t\t\tEnqueue ((QElemPtr)perChanInfoPtr, gFreeList);\n\t\t\tif (! OTAtomicSetBit (&gNMRecBusy, 0)) {\n\t\t\t\tNMInstall (gNMRecPtr);\n\t\t\t}\n\t\t\tchan->callBack = perChanInfoPtr->usersCallBack;\n\t\t}\n\t}\n\n\treturn (SndDoImmediate (chan, cmd));\n}\n#endif /* UNNECESSARY_FOR_SQUEAK */\n\n\n// This must be called at task time.\nOSErr\tCarbonSndPlayDoubleBuffer (SndChannelPtr chan, SndDoubleBufferHeaderPtr theParams) {\n\tOSErr\t\t\t\t\t\t\terr;\n\tCompressionInfo\t\t\t\t\tcompInfo;\n\tPerChanInfoPtr\t\t\t\t\tperChanInfoPtr;\n\tSndCommand\t\t\t\t\t\tplayCmd;\n\tSndCommand\t\t\t\t\t\tcallBack;\n\n\tif (nil == chan)\t\treturn badChannel;\n\tif (nil == theParams)\treturn paramErr;\n\n\tif (nil == gFreeList) {\n\t\t// This can't ever be disposed since we don't know when we might need to use it (at interrupt time)\n\t\tgFreeList = (QHdrPtr)NewPtrClear (sizeof (QHdr));\n\t\terr = MemError ();\n\t\tif (noErr != err) goto exit;\n\t}\n\n\tif (nil == gSilenceOnes) {\n\t\tshort\t\ti;\n\t\t// This can't ever be disposed since we don't know when we might need to use it (at interrupt time)\n\t\tgSilenceOnes = NewPtr (kBufSize);\n\t\terr = MemError ();\n\t\tif (noErr != err) goto exit;\n\t\tfor (i = 0; i < kBufSize; i++)\n\t\t\t*gSilenceOnes++ = (char)0x80;\n\t}\n\n\tif (nil == gSilenceTwos) {\n\t\t// This can't ever be disposed since we don't know when we might need to use it (at interrupt time)\n\t\tgSilenceTwos = NewPtrClear (kBufSize);\n\t\terr = MemError ();\n\t\tif (noErr != err) goto exit;\n\t}\n\n\tif (nil == gNMRecPtr) {\n\t\t// This can't ever be disposed since we don't know when we might need to use it (at interrupt time)\n\t\tgNMRecPtr = (NMRecPtr)NewPtr (sizeof (NMRec));\n\t\terr = MemError ();\n\t\tif (noErr != err) goto exit;\n\n\t\t// Set up our NMProc info that will dispose of most (but not all) of our memory\n\t\tgNMRecPtr->qLink = nil;\n\t\tgNMRecPtr->qType = 8;\n\t\tgNMRecPtr->nmFlags = 0;\n\t\tgNMRecPtr->nmPrivate = 0;\n\t\tgNMRecPtr->nmReserved = 0;\n\t\tgNMRecPtr->nmMark = nil;\n\t\tgNMRecPtr->nmIcon = nil;\n\t\tgNMRecPtr->nmSound = nil;\n\t\tgNMRecPtr->nmStr = nil;\n\t\tgNMRecPtr->nmResp = NewNMUPP (NMResponseProc);\n\t\tgNMRecPtr->nmRefCon = 0;\n\t}\n\n\tperChanInfoPtr = (PerChanInfoPtr)NewPtr (sizeof (PerChanInfo));\n\terr = MemError ();\n\tif (noErr != err) goto exit;\n\n\t// Init basic per channel information\n\tperChanInfoPtr->qLink = nil;\n\tperChanInfoPtr->qType = 0;\t\t\t\t// not used\n\tperChanInfoPtr->stopping = 0;\n\t#if DEBUG\n\t\tperChanInfoPtr->magic = 'SANE';\n\t#endif\n\t\n\tperChanInfoPtr->theParams = theParams;\n\t// Have to remember the user's callback function from the sound because\n\t// we are going to overwrite it with our own callback function.\n\tperChanInfoPtr->usersCallBack = chan->callBack;\n\n\t// Set up the sound header for the bufferCmd that will be used to play\n\t// the buffers passed in by the SndPlayDoubleBuffer call.\n\tperChanInfoPtr->soundHeader.samplePtr = (Ptr)(theParams->dbhBufferPtr[0]->dbSoundData);\n\tperChanInfoPtr->soundHeader.numChannels = theParams->dbhNumChannels;\n\tperChanInfoPtr->soundHeader.sampleRate = theParams->dbhSampleRate;\n\tperChanInfoPtr->soundHeader.loopStart = 0;\n\tperChanInfoPtr->soundHeader.loopEnd = 0;\n\tperChanInfoPtr->soundHeader.encode = cmpSH;\n\tperChanInfoPtr->soundHeader.baseFrequency = kMiddleC;\n\tperChanInfoPtr->soundHeader.numFrames = (unsigned long)theParams->dbhBufferPtr[0]->dbNumFrames;\n\t//\tperChanInfoPtr->soundHeader.AIFFSampleRate = 0;\t\t\t\t// unused\n\tperChanInfoPtr->soundHeader.markerChunk = nil;\n\tperChanInfoPtr->soundHeader.futureUse2 = nil;\n\tperChanInfoPtr->soundHeader.stateVars = nil;\n\tperChanInfoPtr->soundHeader.leftOverSamples = nil;\n\tperChanInfoPtr->soundHeader.compressionID = theParams->dbhCompressionID;\n\tperChanInfoPtr->soundHeader.packetSize = (unsigned short)theParams->dbhPacketSize;\n\tperChanInfoPtr->soundHeader.snthID = 0;\n\tperChanInfoPtr->soundHeader.sampleSize = (unsigned short)theParams->dbhSampleSize;\n\tperChanInfoPtr->soundHeader.sampleArea[0] = 0;\n\n\t// Is the sound compressed?  If so, we need to treat theParams as a SndDoubleBufferHeader2Ptr.\n\tif (0 != theParams->dbhCompressionID) {\n\t\t// Sound is compressed\n\t\terr = GetCompressionInfo (theParams->dbhCompressionID,\n\t\t\t\t\t\t\t\t((SndDoubleBufferHeader2Ptr)theParams)->dbhFormat,\n\t\t\t\t\t\t\t\ttheParams->dbhNumChannels,\n\t\t\t\t\t\t\t\ttheParams->dbhSampleSize,\n\t\t\t\t\t\t\t\t&compInfo);\n\t\tif (noErr != err) goto exitDispose;\n\n\t\tperChanInfoPtr->soundHeader.format = compInfo.format;\n\t} else {\n\t\t// Sound is not compressed\n\t\tperChanInfoPtr->soundHeader.format = kSoundNotCompressed;\n\t}\n\n\tplayCmd.cmd = bufferCmd;\n\tplayCmd.param1 = 0;\t\t\t\t\t\t\t// unused\n\tplayCmd.param2 = (long)&perChanInfoPtr->soundHeader;\n\n\tcallBack.cmd = callBackCmd;\n\tcallBack.param1 = 0;\t\t\t\t\t\t// which buffer to fill, 0 buffer, 1, 0, ...\n\tcallBack.param2 = (long)perChanInfoPtr;\n\n\t// Install our callback function pointer straight into the sound channel structure\n\tif (nil == gCarbonSndPlayDoubleBufferCallBackUPP) {\n\t\tgCarbonSndPlayDoubleBufferCallBackUPP = NewSndCallBackUPP(CarbonSndPlayDoubleBufferCallBackProc);\n\t}\n\n\tchan->callBack = gCarbonSndPlayDoubleBufferCallBackUPP;\n\n#if UNNECESSARY_FOR_SQUEAK\n\tif (gCarbonSndPlayDoubleBufferCleanUpUPP == nil) {\n\t\t\tgCarbonSndPlayDoubleBufferCleanUpUPP = NewSndCallBackProc (CarbonSndPlayDoubleBufferCleanUpProc);\n\t}\n#endif /* UNNECESSARY_FOR_SQUEAK */\n\n\terr = SndDoCommand (chan, &playCmd, true);\n\tif (noErr != err) goto exitDispose;\n\n\terr = SndDoCommand (chan, &callBack, true);\n\tif (noErr != err) goto exitDispose;\n\nexit:\n\treturn err;\n\nexitDispose:\n\tif (nil != perChanInfoPtr)\n\t\tDisposePtr ((Ptr)perChanInfoPtr);\n\tgoto exit;\n}\n\n#if UNNECESSARY_FOR_SQUEAK\nstatic pascal void\tCarbonSndPlayDoubleBufferCleanUpProc(\n\t\t\t\t\t\t\t\tSndChannelPtr theChannel, SndCommand * theCallBackCmd)\n{\n\tPerChanInfoPtr\tperChanInfoPtr;\n\n\tperChanInfoPtr = (PerChanInfoPtr)(theCallBackCmd->param2);\n#if DEBUG\n\t\tif (perChanInfoPtr->magic != 'SANE') DebugStr(\"\\pBAD in CarbonSndPlayDoubleBufferCleanUpProc\");\n#endif\n\n\t// Put our per channel data on the free queue so we can clean up later\n\tEnqueue ((QElemPtr)perChanInfoPtr, gFreeList);\n\t// Have to install our Notification Manager routine so that we can clean up the gFreeList\n\tif (! OTAtomicSetBit (&gNMRecBusy, 0)) {\n\t\tNMInstall (gNMRecPtr);\n\t}\n\t// Have to put the user's callback proc back so they get called when the next buffer finishes\n\ttheChannel->callBack = perChanInfoPtr->usersCallBack;\n}\n#endif /* UNNECESSARY_FOR_SQUEAK */\n\n\nstatic pascal void\tCarbonSndPlayDoubleBufferCallBackProc (SndChannelPtr theChannel, SndCommand * theCallBackCmd) {\n\tSndDoubleBufferHeaderPtr\t\ttheParams;\n\tSndDoubleBufferPtr\t\t\t\temptyBuf;\n\tSndDoubleBufferPtr\t\t\t\tnextBuf;\n\tPerChanInfoPtr\t\t\t\t\tperChanInfoPtr;\n\tSndCommand\t\t\t\t\t\tplayCmd;\n\n\tperChanInfoPtr = (PerChanInfoPtr)(theCallBackCmd->param2);\n\t#if DEBUG\n\t\tif (perChanInfoPtr->magic != 'SANE') DebugStr(\"\\pBAD in CarbonSndPlayDoubleBufferCallBackProc\");\n\t#endif\n\tif (true == perChanInfoPtr->stopping) goto exit;\n\n\ttheParams = perChanInfoPtr->theParams;\n\n\t// The buffer that just played and needs to be filled\n\temptyBuf = theParams->dbhBufferPtr[theCallBackCmd->param1];\n\n\t// Clear the ready flag\n\temptyBuf->dbFlags ^= dbBufferReady;\n\n\t// This is the buffer to play now\n\tnextBuf = theParams->dbhBufferPtr[!theCallBackCmd->param1];\n\n\t// Check to see if it is ready, or if we have to wait a bit\n\tif (nextBuf->dbFlags & dbBufferReady) {\n\t\tperChanInfoPtr->soundHeader.numFrames = (unsigned long)nextBuf->dbNumFrames;\n\t\tperChanInfoPtr->soundHeader.samplePtr = (Ptr)(nextBuf->dbSoundData);\n\n\t\t// Flip the bit telling us which buffer is next\n\t\ttheCallBackCmd->param1 = !theCallBackCmd->param1;\n\n\t\t// If this isn't the last buffer, call the user's fill routine\n\t\tif (!(nextBuf->dbFlags & dbLastBuffer)) {\n\t\t\t\t// Declare a function pointer to the user's double back proc\n\t\t\t\tvoid (*doubleBackProc)(SndChannel*, SndDoubleBuffer*);\n\n\t\t\t\t// Call user's double back proc\n\t\t\t\tdoubleBackProc = (void*)DoubleBack;\n\t\t\t\t(*doubleBackProc) (theChannel, emptyBuf);\n\t\t} else {\n\t\t\t// Call our clean up proc when the last buffer finishes\n\t\t\ttheChannel->callBack = gCarbonSndPlayDoubleBufferCleanUpUPP;\n\t\t}\n\t} else {\n\t\t// We have to wait for the buffer to become ready.\n\t\t// The real SndPlayDoubleBuffer would play a short bit of silence waiting for\n\t\t// the user to read the audio from disk, so that's what we do here.\n\t\t#if DEBUG\n\t\t\tDebugStr (\"\\p buffer is not ready!\");\n\t\t#endif\n\t\t// Play a short section of silence so that we can check the ready flag again\n\t\tif (theParams->dbhSampleSize == 8) {\n\t\t\tperChanInfoPtr->soundHeader.numFrames = (UInt32)(kBufSize / theParams->dbhNumChannels);\n\t\t\tperChanInfoPtr->soundHeader.samplePtr = gSilenceOnes;\n\t\t} else {\n\t\t\tperChanInfoPtr->soundHeader.numFrames = (UInt32)(kBufSize / (theParams->dbhNumChannels * (theParams->dbhSampleSize / 8)));\n\t\t\tperChanInfoPtr->soundHeader.samplePtr = gSilenceTwos;\n\t\t}\n\t}\n\n\t// Insert our callback command\n\tInsertSndDoCommand (theChannel, theCallBackCmd);\n\n\t// Play the next buffer\n\tplayCmd.cmd = bufferCmd;\n\tplayCmd.param1 = 0;\n\tplayCmd.param2 = (long)&(perChanInfoPtr->soundHeader);\n\tInsertSndDoCommand (theChannel, &playCmd);\n\nexit:\n\treturn;\n}\n\nstatic void\tInsertSndDoCommand (SndChannelPtr chan, SndCommand * newCmd) {\n\tif (-1 == chan->qHead) {\n\t\tchan->qHead = chan->qTail;\n\t}\n\n\tif (1 <= chan->qHead) {\n\t\tchan->qHead--;\n\t} else {\n\t\tchan->qHead = chan->qTail;\n\t}\n\n\tchan->queue[chan->qHead] = *newCmd;\n}\n\nstatic pascal void NMResponseProc (NMRecPtr nmReqPtr) {\n\tPerChanInfoPtr\t\t\t\t\tperChanInfoPtr;\n\tOSErr\t\t\t\t\t\t\terr;\n\n\tNMRemove (nmReqPtr);\n\tgNMRecBusy = false;\n\n\tdo {\n\t\tperChanInfoPtr = (PerChanInfoPtr)gFreeList->qHead;\n\t\tif (nil != perChanInfoPtr) {\n\t\t\terr = Dequeue ((QElemPtr)perChanInfoPtr, gFreeList);\n\t\t\tif (noErr == err) {\n\t\t\t\tDisposePtr ((Ptr)perChanInfoPtr);\n\t\t\t}\n\t\t}\n\t} while (nil != perChanInfoPtr && noErr == err);\n}\n\n#endif /* TARGET_API_MAC_CARBON */\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SoundPlugin/sqMacUnixInterfaceSound.c",
    "content": "/*\n *  sqMacUnixInterfaceSound.c\n *  SqueakVMForCarbon\n *\n *  Created by John M McIntosh on 2/3/05.\n *  Copyright 2005 __MyCompanyName__. All rights reserved.\n *\n */\n\n\n#include \"sq.h\"\n#include \"sqMacUnixInterfaceSound.h\"\n#include \"SoundPlugin.h\"\n#include \"SqModule.h\"\n#include \"SqSound.h\"\n\nextern sqInt sound_Stop(void);\n\nsqInt soundInit(void)\n{\n  return 1;\n}\n\n\nsqInt soundShutdown(void)\n{\n  sound_StopRecording();\n  return 1;\n}\n\n\n/* output */\n\nsqInt snd_AvailableSpace(void)\n{\n  return sound_AvailableSpace();\n}\n\nsqInt snd_InsertSamplesFromLeadTime(sqInt frameCount, void* srcBufPtr, sqInt samplesOfLeadTime)\n{\n  return sound_InsertSamplesFromLeadTime(frameCount, srcBufPtr, samplesOfLeadTime);\n}\n\nsqInt snd_PlaySamplesFromAtLength(sqInt frameCount, void *srcBufPtr, sqInt startIndex)\n{\n  return sound_PlaySamplesFromAtLength(frameCount, srcBufPtr, startIndex);\n}\n\nsqInt snd_PlaySilence(void)\n{\n  return sound_PlaySilence();\n}\n\nsqInt snd_Start(sqInt frameCount, sqInt samplesPerSec, sqInt stereo, sqInt semaIndex)\n{\n  return sound_Start(frameCount, samplesPerSec, stereo, semaIndex);\n}\n\nsqInt snd_Stop(void)\n{\n  return sound_Stop();\n}\n\n/* input */\n\nsqInt snd_StartRecording(sqInt desiredSamplesPerSec, sqInt stereo, sqInt semaIndex)\n{\n  return sound_StartRecording(desiredSamplesPerSec, stereo, semaIndex);\n}\n\nsqInt snd_StopRecording(void)\n{\n  return sound_StopRecording();\n}\n\ndouble snd_GetRecordingSampleRate(void)\n{\n  return sound_GetRecordingSampleRate();\n}\n\nsqInt snd_RecordSamplesIntoAtLength(void *buf, sqInt startSliceIndex, sqInt bufferSizeInBytes)\n{\n  return sound_RecordSamplesIntoAtLength(buf, startSliceIndex, bufferSizeInBytes);\n}\n\n/* mixer */\n\nvoid snd_Volume(double *left, double *right)\t{ \n\tsound_Volume(left, right); }\nvoid snd_SetVolume(double left, double right)\t{ \n\tsound_SetVolume(left, right); }\nint  snd_SetRecordLevel(sqInt level)\t\t{ \n\treturn sound_SetRecordLevel(level); }"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SoundPlugin/sqMacUnixInterfaceSound.h",
    "content": "/*\n *  sqMacUnixInterfaceSound.h\n *  SqueakVMForCarbon\n *\n *  Created by John M McIntosh on 2/3/05.\n *\n */\n\n sqInt    sound_AvailableSpace(void);\n  sqInt    sound_InsertSamplesFromLeadTime(sqInt frameCount, void* srcBufPtr, sqInt samplesOfLeadTime);\n  sqInt    sound_PlaySamplesFromAtLength(sqInt frameCount, void* srcBufPtr, sqInt startIndex);\n  sqInt    sound_PlaySilence(void);\n  sqInt    sound_Start(sqInt frameCount, sqInt samplesPerSec, sqInt stereo, sqInt semaIndex);\n  sqInt    sound_Stop(void);\n  /* input */\n  sqInt    sound_StartRecording(sqInt desiredSamplesPerSec, sqInt stereo, sqInt semaIndex);\n  sqInt    sound_StopRecording(void);\n  double sound_GetRecordingSampleRate(void);\n  sqInt    sound_RecordSamplesIntoAtLength(void * buf, sqInt startSliceIndex, sqInt bufferSizeInBytes);\n  /* mixer */\n  void\t sound_Volume(double *left, double *right);\n  void\t sound_SetVolume(double left, double right);\n  sqInt    sound_SetRecordLevel(sqInt level);\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SoundPlugin/sqUnixSoundDebug.h",
    "content": "#if 0\n\n# define startSpy();\n# define stopSpy();\n\n#else\n\n#define RED\t0xff0000\n#define GREEN\t0x00ff00\n#define BLUE\t0x0000ff\n#define WHITE\t0xffffff\n#define BLACK\t0x000000\n\n#include <pthread.h>\n\nvoid rect(int h, int c, float l, float r);\n\nvoid rect(int h, int c, float l, float r)\n{\n  extern long *dpyPixels;\n  extern int   dpyPitch;\n  int left= 250, width= 100, height= 2;\n  long *base=  dpyPixels;\n  int   pitch= dpyPitch / sizeof(long);\n  int x, y;\n\n  //printf(\"rect %d %d %g %g\\n\", h, c, l, r);\n  assert(l >= 0.0);  assert(r >= 0.0);\n  assert(l <= 1.0);  assert(r <= 1.0);\n\n  base+= (int)left;\n  base+= (int)(h * height * pitch);\n\n  for (y= 0; y < height; ++y)\n    {\n      for (x= (int)(width * l); x < (int)(width * r); ++x)\n\t((long *)base)[x]= c;\n      base+= pitch;\n    }\n}\n\nvoid fill(int h, int c, float l, float r);\nvoid fill(int h, int c, float l, float r)\n{\n  if (r > 1.0)\n    {\n      rect(h, c, l, 1.0);\n      rect(h, c, 0.0, r - 1.0);\n    }\n  else\n    rect(h, c, l, r);\n}\n\n\n#if (USE_FIFO)\n\nvoid update(void)\n{\n  if (output)\n    {\n      Buffer *b=   output->buffer;\n      static int phase= 0;\n      float size=  b->size;\n      float out=   b->optr / size;\n      float avail= b->avail / size;\n      extern long *dpyPixels;\n\n      fill(0,BLACK, 0.0, out);\n      fill(0,GREEN, out, out+avail);\n      if (out + avail < 1.0)\n\tfill(0,BLACK, out+avail, 1.0);\n      fill(2,GREEN, 0.0, avail);\n      fill(2,BLACK, avail, 1.0);\n\n      phase= 1 - phase;\n      feedback(10, phase * WHITE);\n\n      memcpy(dpyPixels + 400, output->buffer->data, 400);\n    }\n}\n\n#else\n\nvoid update(void);\nvoid update(void)\n{\n}\n\n#endif\n\n\nstatic int       running= 0;\nstatic pthread_t spyThread;\n\nstatic void *spy(void *ignored)\n{\n#pragma unused(ignored)\n  struct sched_param params;\n  int                policy;\n  if (pthread_getschedparam(pthread_self(), &policy, &params))\n    perror(\"getschedparam\");\n  params.sched_priority+= 9;\n  if (pthread_setschedparam(pthread_self(), SCHED_RR, &params))\n    perror(\"setschedparam\");\n  for (;;)\n    {\n      update();\n      usleep(10000);\n    }\n}\n\nvoid startSpy(void);\nvoid startSpy(void)\n{\n  if (!pthread_create(&spyThread, 0, spy, 0))\n    running= 1;\n  else\n    perror(\"pthread_create(spy)\");\n}\n\nvoid stopSpy(void);\nvoid stopSpy(void)\n{\n  if (running)\n    {\n      if (!pthread_cancel(spyThread))\n\trunning= 0;\n      else\n\tperror(\"pthread_cancel(spy)\");\n      running= 0;\n    }\n}\n\n\n#endif // (DEBUG)\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SoundPlugin/sqUnixSoundMacOSXJMM.c",
    "content": "/* sqUnixSoundMacOSX.c -- sound support for CoreAudio on Mac OS 10\n *\n * Author: Ian.Piumarta@squeakland.org\n * \n * Last edited: 2008-04-21 14:53:42 by piumarta on emilia\n \n  * Altered by johnmci@smalltalkconsulting.com to remove  static  defs, fix bugs, powerpc/intel support.\n \n \n *\n *   Copyright (C) 1996-2005 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a copy\n *   of this software and associated documentation files (the \"Software\"), to deal\n *   in the Software without restriction, including without limitation the rights\n *   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n *   copies of the Software, and to permit persons to whom the Software is\n *   furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n *   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n *   SOFTWARE.\n */\n\n// Notes:\n// \n// The image always generates stereo samples.  Since the only\n// supported hardware format is stereo, I cheerfully ignore the stereo\n// flag in snd_Start().  (Mixing everything down to mono only to have\n// the format converter break it back into stereo seems pointless.)\n\n\n/// \n/// Things you can tweak, should you really want to...\n/// \n\n// Do we obey the (huge) default \"lead\" time of 1024 frames (supplied\n// by the image) when mixing frames into the buffer, or do we reduce\n// the lead time to to an absolute (safe) minimum?\n//\n#define OBEY_LEAD_TIME\t0\n\n/// \n/// No more user-serviceable parts in this file.  Stop Tweaking Now!\n/// \n\n\n#include <CoreAudio/CoreAudio.h>\n#include <AudioToolbox/AudioConverter.h>\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdarg.h>\n#include <unistd.h>\n#include <string.h>\n#include <assert.h>\n\n\n#define SqueakFrameSize\t4\t// guaranteed (see class SoundPlayer)\n#define DeviceFrameSize\t8\t// ditto (<CoreAudio/AudioHardware.h>, para 9)\n\nchar empty[256] = { 0 };\n\n#define DEBUG\t0\n#define TESTING\t0\n\n#if (!TESTING)\n# include \"sq.h\"\n#else\n   inline sqInt signalSemaphoreWithIndex(sqInt sema) { return 0; }\n   inline sqInt success(sqInt flag) { return 0; }\n   inline sqInt primitiveFail(void) { return -1; }\n#endif\n\n#include \"sqMacUnixInterfaceSound.h\"\n\nchar\t\t*dpyPixels  = 0;\nsqInt\t\t dpyPitch   = 0;\nsqInt\t\tnoSoundMixer = 0;\n\n#if (DEBUG)\n\n void dumpFormat(AudioStreamBasicDescription *fmt); // atend\n\n void dprintf(const char *fmt, ...)\n{\n  va_list ap;\n  va_start(ap, fmt);\n  vprintf(fmt, ap);\n  va_end(ap);\n}\n\n#else // !DEBUG\n void dumpFormat(AudioStreamBasicDescription *fmt);\n inline void dumpFormat(AudioStreamBasicDescription *fmt) {\n #pragma unused(fmt)\n }\n #define  dprintf(ARGS, ...)\n // inline void dprintf(const char *fmt, ...) {}\n\n#endif // !DEBUG\n void eprintf(const char *fmt, ...);\n \n void eprintf(const char *fmt, ...)\n{\n  va_list ap;\n  va_start(ap, fmt);\n  vfprintf(stderr, fmt, ap);\n  va_end(ap);\n}\n\nsqInt min(sqInt i, sqInt j);\nsqInt max(sqInt i, sqInt j);\n\ninline sqInt min(sqInt i, sqInt j) { return (i < j) ? i : j; }\ninline sqInt max(sqInt i, sqInt j) { return (i > j) ? i : j; }\n\n// Apple error codes are really (rather contrived) 4-byte chars with\n// (almost) meaningful content.\n// \n char *str4(UInt32 chars);\n char *str4(UInt32 chars)\n{\n  static char str[5];\n  *(sqInt *)&str= chars;\n  str[4]= '\\0';\n  return str;\n}\n\nsqInt checkError(OSStatus err, char *op, char *param);\n\n inline sqInt checkError(OSStatus err, char *op, char *param)\n{\n  if (kAudioHardwareNoError != noErr)\n    {\n      eprintf(\"sound: %s(%s): error %ld (%s)\\n\", op, param, err, str4(err));\n      return 1;\n    }\n  return 0;\n}\n\n\n/// \n/// (ring) Buffer -- a FIFO of bytes\n/// \n\n\ntypedef struct\n{\n  char *data;\n  sqInt   size;\t// capacity\n  sqInt   avail;\t// available data (not available space)\n  sqInt   iptr;\t// next position to write\n  sqInt   optr;\t// next position to read\n} Buffer;\n\n\n// allocate a new, empty buffer\n// \nBuffer *Buffer_new(sqInt size);\n\nBuffer *Buffer_new(sqInt size)\n{\n  Buffer *b= (Buffer *)malloc(sizeof(Buffer));\n  if (!b)\n    return 0;\n  if (!(b->data= (char *)malloc(size)))\n    {\n      free(b);\n      return 0;\n    }\n  b->size=  size;\n  b->avail= 0;\n  b->iptr=  0;\n  b->optr=  0;\n  return b;\n}\n\n// deallocate a buffer\n// \nvoid Buffer_delete(Buffer *b);\n\nvoid Buffer_delete(Buffer *b)\n{\n  assert(b && b->data);\n  free(b->data);\n  b->data = NULL;\n  free(b);\n}\n\n// answer how many bytes are available for reading\n// \ninline sqInt Buffer_avail(Buffer *b);\n\ninline sqInt Buffer_avail(Buffer *b)\n{\n  return b->avail;\n}\n\n// answer how many bytes can be written\n// \ninline sqInt Buffer_free(Buffer *b);\n\ninline sqInt Buffer_free(Buffer *b)\n{\n  return b->size - Buffer_avail(b);\n}\n\n// set outputs to address and size of zero (empty), one (contiguous) or two\n// (wrapped, fragmented) populated regions in the buffer\n// \ninline sqInt Buffer_getOutputPointers(Buffer *b, char **p1, sqInt *n1, char **p2, sqInt *n2);\n\ninline sqInt Buffer_getOutputPointers(Buffer *b, char **p1, sqInt *n1, char **p2, sqInt *n2)\n{\n  sqInt optr=     b->optr;\n  sqInt avail=    Buffer_avail(b);\n  sqInt headroom= b->size - optr;\n  if (avail == 0)\n    {\n      *p1=\t\t\t*p2= 0;\n      *n1=\t\t\t*n2= 0;\n      return 0;\n    }\n  else if (avail <= headroom)\n    {\n      *p1= b->data + optr;\t*p2= 0;\n      *n1= avail;\t\t*n2= 0;\n      return 1;\n    }\n  else\n    {\n      *p1= b->data + optr;\t*p2= b->data;\n      *n1= headroom;\t\t*n2= avail - headroom;\n      return 2;\n    }\n}\n\n// set the output to the current read position and answer the amount of\n// data at that location\n// \ninline sqInt Buffer_getOutputPointer(Buffer *b, char **ptr);\n\ninline sqInt Buffer_getOutputPointer(Buffer *b, char **ptr)\n{\n  sqInt optr=     b->optr;\n  sqInt avail=    Buffer_avail(b);\n  sqInt headroom= b->size - optr;\n  if (headroom < avail) avail= headroom;\n  assert((optr + avail) <= b->size);\n  *ptr= b->data + optr;\n  return avail;\n}\n\n// set the output to the current write location and answer the number of\n// bytes that can be written to that location\n// \ninline sqInt Buffer_getInputPointer(Buffer *b, char **ptr);\n\ninline sqInt Buffer_getInputPointer(Buffer *b, char **ptr)\n{\n  sqInt iptr=     b->iptr;\n  sqInt nfree=    Buffer_free(b);\n  sqInt headroom= b->size - iptr;\n  if (headroom < nfree) nfree= headroom;\n  assert((iptr + nfree) <= b->size);\n  *ptr= b->data + iptr;\n  return nfree;\n}\n\n// increment the output pointer over a contiguous section of buffer\n// \ninline void Buffer_advanceOutputPointer(Buffer *b, sqInt size);\n\ninline void Buffer_advanceOutputPointer(Buffer *b, sqInt size)\n{\n  sqInt optr=  b->optr;\n  sqInt avail= b->avail;\n  optr+=  size;\n  avail-= size;\n  assert(optr <= b->size);\n  assert(avail >= 0);\n  if (optr == b->size) optr= 0;\n  b->optr=  optr;\n  b->avail= avail;\n}\n\n// advance the input pointer over a contiguous section of buffer\n// \ninline void Buffer_advanceInputPointer(Buffer *b, sqInt size);\n\ninline void Buffer_advanceInputPointer(Buffer *b, sqInt size)\n{\n  sqInt iptr= b->iptr;\n  sqInt nfree= Buffer_free(b);\n  nfree -= size;\n  assert(nfree >= 0);\n  iptr += size;\n  assert(iptr <= b->size);\n  if (iptr == b->size) iptr= 0;\n  b->iptr= iptr;\n  b->avail += size;\n}\n\n// clear the given number of bytes at the input position and advance the\n// input pointer past them\n// \ninline void Buffer_prefill(Buffer *b, sqInt bytes);\n\ninline void Buffer_prefill(Buffer *b, sqInt bytes)\n{\n  char *ptr;\n  sqInt   size= Buffer_getInputPointer(b, &ptr);\n  assert(bytes <= size);\n  memset(ptr, 0, size);\n  Buffer_advanceInputPointer(b, bytes);\n}\n\n// write at most nbytes from buf into the buffer, wrapping in the middle if\n// necessary.  answer the actual number of bytes written.\n// \ninline sqInt Buffer_write(Buffer *b, char *buf, sqInt nbytes);\n\ninline sqInt Buffer_write(Buffer *b, char *buf, sqInt nbytes)\n{\n  sqInt iptr= b->iptr;\n  sqInt bytesToCopy= min(nbytes, Buffer_free(b));\n  sqInt headroom= b->size - iptr;\n  sqInt bytesCopied= 0;\n\n  if (bytesToCopy >= headroom)\n    {\n      memcpy(b->data + iptr, buf, headroom);\n      iptr= 0;\n      bytesCopied += headroom;\n      bytesToCopy -= headroom;\n    }\n  if (bytesToCopy)\n    {\n      memcpy(b->data + iptr, buf + bytesCopied, bytesToCopy);\n      iptr += bytesToCopy;\n      bytesCopied += bytesToCopy;\n    }\n  b->iptr= iptr;\n  b->avail += bytesCopied;\n  assert(b->avail <= b->size);\n  return bytesCopied;\n}\n\ninline sqInt Buffer_writeRecheck(Buffer *b, char *buf, sqInt nbytes);\n\ninline sqInt Buffer_writeRecheck(Buffer *b, char *buf, sqInt nbytes)\n{\n  sqInt iptr= b->iptr;\n  sqInt bytesToCopy= min(nbytes, Buffer_free(b));\n  sqInt headroom= b->size - iptr;\n  sqInt bytesCopied= 0;\n\n  if (b->data == NULL || buf == NULL) \n\treturn 0;\n  \n  if (bytesToCopy >= headroom)\n    {\n      memcpy(b->data + iptr, buf, headroom);\n      iptr= 0;\n      bytesCopied += headroom;\n      bytesToCopy -= headroom;\n    }\n  if (bytesToCopy)\n    {\n      memcpy(b->data + iptr, buf + bytesCopied, bytesToCopy);\n      iptr += bytesToCopy;\n      bytesCopied += bytesToCopy;\n    }\n  b->iptr= iptr;\n  b->avail += bytesCopied;\n  assert(b->avail <= b->size);\n  return bytesCopied;\n}\n\n// read at most nbytes from the buffer into buf, wrapping in the middle if\n// necessary.  answer the actual number of bytes read.\n// \ninline sqInt Buffer_read(Buffer *b, char *buf, sqInt nbytes);\n\ninline sqInt Buffer_read(Buffer *b, char *buf, sqInt nbytes)\n{\n  sqInt optr= b->optr;\n  sqInt bytesToCopy= min(nbytes, Buffer_avail(b));\n  sqInt headroom= b->size - optr;\n  sqInt bytesCopied= 0;\n\n  if (bytesToCopy >= headroom)\n    {\n      memcpy(buf, b->data + optr, headroom);\n      optr= 0;\n      bytesToCopy -= headroom;\n      bytesCopied += headroom;\n      if (bytesToCopy)\n\t{\n\t  memcpy(buf + bytesCopied, b->data, bytesToCopy);\n\t  optr= bytesToCopy;\n\t  bytesCopied += bytesToCopy;\n\t}\n    }\n  else\n    {\n      memcpy(buf, b->data + optr, bytesToCopy);\n      optr += bytesToCopy;\n      bytesCopied= bytesToCopy;\n    }\n  b->optr= optr;\n  b->avail -= bytesCopied;\n  return bytesCopied;\n}\n\n\n/// \n/// Stream -- abstraction over CoreAudio devices and streams\n/// \n\n\ntypedef struct Stream\n{\n  AudioDeviceID\t\t id;\t\t\t// associated with this stream\n  sqInt\t\t\t direction;\t\t// 1nput/0utput\n  sqInt\t\t\t sampleRate;\t\t// Squeak frames per second\n  sqInt\t\t\t channels;\t\t// channels per Squeak frame\n  sqInt\t\t\t devBufSize;\t\t// bytes per device buffer\n  sqInt\t\t\t imgBufSize;\t\t// bytes per Squeak buffer\n  sqInt\t\t\t cvtBufSize;\t\t// bytes per converter buffer\n  Buffer\t\t*buffer;\t\t// fifo\n  AudioConverterRef\t converter;\t\t// frame format converter\n  sqInt\t\t\t semaphore;\t\t// ping me!\n  u_int64_t\t\t timestamp;\t\t// nominal buffer tail time (uSecs)\n} Stream;\n\n\n Stream *output= 0;\n Stream *input=  0;\n\n\n// tell the SoundPlayer that output can be written.\n//\n void ioProcSignal(sqInt semaphore);\n  void ioProcSignal(sqInt semaphore)\n{\n  if (semaphore)\n    signalSemaphoreWithIndex(semaphore);\n}\n\n\n OSStatus bufferDataProc(AudioConverterRef inAudioConverter, UInt32 *ioDataSize, void  **outData, void  *context);\n  OSStatus bufferDataProc(AudioConverterRef inAudioConverter, UInt32 *ioDataSize, void  **outData, void  *context)\n{\n#pragma unused(inAudioConverter)\n\n  Stream *s= (Stream *)context;\n  Buffer *b= s->buffer;\n  char *p1, *p2;\n  sqInt   n1,  n2;\n  Buffer_getOutputPointers(b, &p1, &n1, &p2, &n2);\n  if (!n1)\n    {\n      *ioDataSize= min(256, *ioDataSize);\n      *outData= (void *)empty;\n#    if (DEBUG)\n      putchar('-');  fflush(stdout);\n#    endif\n    }\n  else\n    {\n      *ioDataSize= n1= min(n1, *ioDataSize);\n      *outData= (void *)p1;\n      Buffer_advanceOutputPointer(b, n1);\n#     if (DEBUG)\n      putchar('+');  fflush(stdout);\n#     endif\n    }\n  return kAudioHardwareNoError;\n}\n\n\n OSStatus ioProcOutput(AudioDeviceID\t    device,\n\t\t\t     const AudioTimeStamp  *currentTime,\n\t\t\t     const AudioBufferList *inputData,\n\t\t\t     const AudioTimeStamp  *inputTime,\n\t\t\t     AudioBufferList\t   *outputData,\t// io param\n\t\t\t     const AudioTimeStamp  *outputTime,\n\t\t\t     void\t\t   *context);\n\t\t\t\t \n// shipout to device (usually 512 frames at 44k1 for builtin audio and\n// USB).  this is asynchronous and runs (implicitly) in its own thread.\n// \n OSStatus ioProcOutput(AudioDeviceID\t    device,\n\t\t\t     const AudioTimeStamp  *currentTime,\n\t\t\t     const AudioBufferList *inputData,\n\t\t\t     const AudioTimeStamp  *inputTime,\n\t\t\t     AudioBufferList\t   *outputData,\t// io param\n\t\t\t     const AudioTimeStamp  *outputTime,\n\t\t\t     void\t\t   *context)\n{\n#pragma unused(device,currentTime,inputData,inputTime,outputTime)\n  Stream *s= (Stream *)context;\n  Buffer *b= s->buffer;\n  if (Buffer_free(b) >= s->imgBufSize)\n    ioProcSignal(s->semaphore);\t\t// restart SoundRecorder\n  return AudioConverterFillBuffer(((Stream *)context)->converter, bufferDataProc, context,\n\t\t\t\t  &outputData->mBuffers[0].mDataByteSize,\n\t\t\t\t  outputData->mBuffers[0].mData);\n}\n\n\n// shipin from device (usually 512 frames at 44k1).  this is asynchronous and\n// runs (implicitly) in its own thread.\n// \n OSStatus ioProcInput(AudioDeviceID\t    device,\n\t\t\t    const AudioTimeStamp  *currentTime,\n\t\t\t    const AudioBufferList *inputData,\n\t\t\t    const AudioTimeStamp  *inputTime,\n\t\t\t    AudioBufferList\t   *outputData,\t// io param\n\t\t\t    const AudioTimeStamp  *outputTime,\n\t\t\t    void\t\t   *context);\n\t\t\t\t\nOSStatus ioProcInput(AudioDeviceID\t    device,\n\t\t\t    const AudioTimeStamp  *currentTime,\n\t\t\t    const AudioBufferList *inputData,\n\t\t\t    const AudioTimeStamp  *inputTime,\n\t\t\t    AudioBufferList\t   *outputData,\t// io param\n\t\t\t    const AudioTimeStamp  *outputTime,\n\t\t\t    void\t\t   *context)\n{\n#pragma unused(device,currentTime,inputTime,outputData,outputTime)\n\n  Stream *s= (Stream *)context;\n  Buffer *b= s->buffer;\n  sqInt     n= Buffer_free(b);\n  if ((UInt32) n >= inputData->mBuffers[0].mDataByteSize)\n    Buffer_writeRecheck(b, inputData->mBuffers[0].mData, inputData->mBuffers[0].mDataByteSize);\n  if (Buffer_avail(b) >= s->imgBufSize)\n    ioProcSignal(s->semaphore);\t\t// restart SoundRecorder\n  return kAudioHardwareNoError;\n}\n\n\n sqInt getDefaultDevice(AudioDeviceID *id, sqInt direction);\nsqInt getDefaultDevice(AudioDeviceID *id, sqInt direction)\n{\n  UInt32 sz= sizeof(*id);\n  return (!checkError(AudioHardwareGetProperty((direction\n\t\t\t\t\t\t? kAudioHardwarePropertyDefaultInputDevice\n\t\t\t\t\t\t: kAudioHardwarePropertyDefaultOutputDevice),\n\t\t\t\t\t       &sz, (void *)id),\n\t\t      \"GetProperty\", (direction ? \"DefaultInput\" : \"DefaultOutput\")));\n}\n\n\n// allocate and a Stream and associate it with a suitable device.\n//\n Stream *Stream_new(sqInt dir);\nStream *Stream_new(sqInt dir)\n{\n  AudioDeviceID id= 0;\n  Stream       *s=  0;\n\n  if (!getDefaultDevice(&id, dir))\n    return 0;\t// no device available\n\n  if (!(s= (Stream *)calloc(1, sizeof(Stream))))\n    {\n      eprintf(\"out of memory\");\n      return 0;\n    }\n  s->id=\tid;\n  s->direction= dir;\n  dprintf(\"stream %p[%d] created for device %ld\\n\", s, dir, id);\n\n  return s;\n}\n\n\n// deallocate a Stream.\n//\n void Stream_delete(Stream *s);\nvoid Stream_delete(Stream *s)\n{\n  assert(s && s->buffer);\n  Buffer_delete(s->buffer);\n  dprintf(\"stream %p[%d] deleted\\n\", s, s->direction);\n  free(s);\n}\n\n\n// setup conversion from Squeak to device frame format, or vice-versa.\n// requires: stereo for output, stereo or mono for input.\n//\n sqInt Stream_setFormat(Stream *s, sqInt frameCount, sqInt sampleRate, sqInt stereo);\nsqInt Stream_setFormat(Stream *s, sqInt frameCount, sqInt sampleRate, sqInt stereo)\n{\n  sqInt nChannels=\t1 + stereo;\n  AudioStreamBasicDescription imgFmt, devFmt;\n  UInt32 sz= sizeof(devFmt);\n\n  if (0 == s->direction) nChannels= 2;\t// insist\n\n  if (checkError(AudioDeviceGetProperty(s->id, 0, s->direction,\n\t\t\t\t\tkAudioDevicePropertyStreamFormat,\n\t\t\t\t\t&sz, &devFmt),\n\t\t \"GetProperty\", \"StreamFormat\"))\n    return 0;\n\n  dprintf(\"stream %p[%d] device format:\\n\", s, s->direction);  dumpFormat(&devFmt);\n\n  imgFmt.mSampleRate\t   = sampleRate;\n  imgFmt.mFormatID\t   = kAudioFormatLinearPCM;\n  imgFmt.mFormatFlags\t   = kAudioFormatFlagsNativeEndian | kLinearPCMFormatFlagIsSignedInteger;\n  imgFmt.mBytesPerPacket   = SqueakFrameSize / (3 - nChannels);\n  imgFmt.mFramesPerPacket  = 1;\n  imgFmt.mBytesPerFrame    = SqueakFrameSize / (3 - nChannels);\n  imgFmt.mChannelsPerFrame = nChannels;\n  imgFmt.mBitsPerChannel   = 16;\n\n  dprintf(\"stream %p[%d] image format:\\n\", s, s->direction);  dumpFormat(&imgFmt);\n\n  if (s->direction) // input\n    {\n      if (checkError(AudioConverterNew(&devFmt, &imgFmt, &s->converter), \"AudioConverter\", \"New\"))\n\treturn 0;\n      sz= sizeof(s->cvtBufSize);\n      s->cvtBufSize= 512 * devFmt.mBytesPerFrame;\n      if (checkError(AudioConverterGetProperty(s->converter, kAudioConverterPropertyCalculateOutputBufferSize,\n\t\t\t\t\t       &sz, &s->cvtBufSize), \n\t\t     \"GetProperty\", \"OutputBufferSize\"))\n\treturn 0;\n    }\n  else // output\n    {\n      if (checkError(AudioConverterNew(&imgFmt, &devFmt, &s->converter), \"AudioConverter\", \"New\"))\n\treturn 0;\n    }\n\n  s->channels=   nChannels;\n  s->sampleRate= sampleRate;\n  s->imgBufSize= SqueakFrameSize * nChannels * frameCount;\n\n  frameCount= max(frameCount, 512 * sampleRate / devFmt.mSampleRate);\n\n  s->buffer= Buffer_new((s->direction ? DeviceFrameSize : SqueakFrameSize) * nChannels * frameCount * 2);\n\n  dprintf(\"stream %p[%d] sound buffer size %d/%d (%d)\\n\", s, s->direction, s->imgBufSize, s->buffer->size, frameCount);\n\n  return 1;\n}\n\n\n// start the device attached to the stream.\n// \n sqInt Stream_startSema(Stream *s, sqInt semaIndex);\n  sqInt Stream_startSema(Stream *s, sqInt semaIndex)\n{\n  AudioDeviceIOProc ioProc= s->direction ? ioProcInput : ioProcOutput;\n\n  dprintf(\"stream %p[%d] startSema: %d\\n\", s, s->direction, semaIndex);\n  \n  s->semaphore= semaIndex;\t// can be zero\n  if (checkError(AudioDeviceAddIOProc(s->id, ioProc, (void *)s),\n\t\t \"Add\", \"ioProcOut\"))\n    return 0;\n  if (checkError(AudioDeviceStart(s->id, ioProc),\n\t\t \"DeviceStart\", \"ioProcOut\"))\n    {\n      AudioDeviceRemoveIOProc(s->id, ioProc);\n      return 0;\n    }\n  dprintf(\"stream %p[%d] running\\n\", s, s->direction);\n  return 1;\n}\n\n\n// stop the device attached to a stream.\n// \n sqInt Stream_stop(Stream *s);\nsqInt Stream_stop(Stream *s)\n{\n  AudioDeviceIOProc ioProc= s->direction ? ioProcInput : ioProcOutput;\n  checkError(AudioDeviceStop(s->id, ioProc),\n\t     \"DeviceStop\", s->direction ? \"ioProcIn\" : \"ioProcOut\");\n  checkError(AudioDeviceRemoveIOProc(s->id, ioProc),\n\t     \"Remove\", s->direction ? \"ioProcIn\" : \"ioProcOut\");\n  dprintf(\"stream %p[%d] stopped\\n\", s, s->direction);\n  return 1;\n}\n\n\n/// \n/// sound output primitives\n/// \n\n sqInt sound_AvailableSpace(void);\n \n sqInt sound_AvailableSpace(void)\n{\n  if (output)\n    return Buffer_free(output->buffer);\n  success(false);\n  return 8192;\t// so that older images can cope\n}\n\n\n// mix nFrames of samples into an output buffer.\n// \n void mixFrames(short *out, short *in, sqInt nFrames);\n \n void mixFrames(short *out, short *in, sqInt nFrames)\n{\n  while (nFrames--)\n    {\n      sqInt sample;\n      sample= (sqInt)*out + (sqInt)*in++;  *out++= (short)max(-32768, min(32767, sample));\n      sample= (sqInt)*out + (sqInt)*in++;  *out++= (short)max(-32768, min(32767, sample));\n    }\n}\n\n\n// insert up to frameCount (and no less than frameCount/2 -- see SoundPlayer\n// class>>startPlayingImmediately: for the [bogus] reasons why) frames into\n// the front and back buffers, leaving some number of framesOfLeadTime\n// intact before starging the insertion.  (this last parameter is\n// meaningless for us and could be reduced to zero, but ignoring it causes\n// strange things to happen.  time to rething the image code, methinks.)\n// \n// Note: this is only used when the \"sound quick start\" preference is\n// enabled in the image.\n// \n sqInt sound_InsertSamplesFromLeadTime(sqInt frameCount, void* srcBufPtr,\n\t\t\t\t  sqInt framesOfLeadTime)\n{\n#pragma unused(framesOfLeadTime)\n  Stream *s= output;\n\n  dprintf(\"snd_InsertSamples %d From %p LeadTime %d\\n\", frameCount, srcBufPtr, framesOfLeadTime);\n\n  if (s)\n    {\n      // data already sent to the device is lost forever, although latency\n      // is only a few hundred frames (and is certainly much lower than the\n      // standard value of `framesOfLeadTime').  instead of putzing around\n      // why not just mix the samples in right away, leaving one h/w\n      // buffer's worth of lead time in case we're interrupted in the\n      // middle?\n\n      char *frontData=   0, *backData=   0;\n      sqInt   frontFrames= 0,  backFrames= 0;\n      sqInt   framesDone=  0;\n      sqInt   leadBytes;\n\n#    if (OBEY_LEAD_TIME)\n      {\n\tAudioTimeStamp timeStamp;\n\tu_int64_t      then, now;\n\n\ttimeStamp.mFlags= kAudioTimeStampHostTimeValid;\n\tcheckError(AudioDeviceGetCurrentTime(s->id, &timeStamp),\n\t\t   \"AudioDeviceGetCurrentTime\", \"\");\n\tnow= AudioConvertHostTimeToNanos(timeStamp.mHostTime) / 1000ull;\n\tthen= s->timestamp;\n\tleadBytes= ( ((now - then) * (u_int64_t)s->sampleRate) / 1000000ull\n\t\t     + framesOfLeadTime ) * SqueakFrameSize;\n      }\n#    else\n      {\n\tleadBytes= s->devBufSize;\t// quantum shipped to the hardware\n      }\n#    endif\n\n      {\n\tsqInt   availBytes;\n\tsqInt   byteCount= frameCount * SqueakFrameSize;\n\tBuffer_getOutputPointers(s->buffer,\n\t\t\t\t &frontData, &frontFrames,\t// bytes!\n\t\t\t\t &backData,  &backFrames);\t// bytes!\n\tavailBytes= frontFrames + backFrames;\n\t// don't consume more than frameCount - 1 frames\n\tleadBytes= max(leadBytes, availBytes - byteCount + SqueakFrameSize);\n\n\tassert((availBytes - leadBytes) <  (byteCount));\n\n\tif (leadBytes < frontFrames)\t// skip leadBytes into first fragment\n\t  {\n\t    frontData   += leadBytes;\n\t    frontFrames -= leadBytes;\n\t  }\n\telse\t\t\t\t// omit the first fragment\n\t  {\n\t    leadBytes -= frontFrames;\t// lead in second fragment\n\t    frontFrames= 0;\n\t    backData   += leadBytes;\t// skip leadBytes into second fragment\n\t    backFrames -= leadBytes;\n\t  }\n\tfrontFrames /= SqueakFrameSize;\n\tbackFrames  /= SqueakFrameSize;\n      }\n\n      assert((frontFrames + backFrames) < frameCount);\t// avoid bug in image\n\n      if ((frontFrames + backFrames) >= (frameCount / 2))\n\t{\n\t  mixFrames((short *)frontData, (short *)srcBufPtr, frontFrames);\n\t  srcBufPtr += frontFrames * SqueakFrameSize;\n\t  mixFrames((short *)backData,  (short *)srcBufPtr, backFrames);\n\t  framesDone= frontFrames + backFrames;\n\t}\n      return framesDone;\n    }\n\n  success(false);\n  return frameCount;\n}\n\n\n// play (exactly) frameCount of samples (and no less, since the result is\n// ignored).\n// \n\n  sqInt sound_PlaySamplesFromAtLength(sqInt frameCount, void* arrayIndex, sqInt startIndex)\n{\n  if (output)\n    {\n      sqInt byteCount= frameCount * SqueakFrameSize;\n      if (Buffer_free(output->buffer) >= byteCount)\n\t{\n\t  Buffer_write(output->buffer,\n\t\t       (char *)arrayIndex + (startIndex * SqueakFrameSize),\n\t\t       byteCount);\n\t  return frameCount;\n\t}\n      return 0;\n    }\n  success(false);\n  return 8192;\n}\n\n\n// play a buffer's worth of silence (as quietly as possible).\n// \n sqInt sound_PlaySilence(void);\n sqInt sound_PlaySilence(void)\n{\n  success(false);\n  return 8192;\n}\n\n\n// shut down sound output.\n// \n sqInt sound_Stop(void);\n sqInt sound_Stop(void)\n{\n  dprintf(\"snd_Stop\\n\");\n  \n  if (output)\n    {\n      Stream_stop(output);\n      Stream_delete(output);\n      output= 0;\n    }\n  return 1;\n}\n\n\n// start up sound output.\n// \n sqInt sound_Start(sqInt frameCount, sqInt samplesPerSec, sqInt stereo, sqInt semaIndex);\n sqInt sound_Start(sqInt frameCount, sqInt samplesPerSec, sqInt stereo, sqInt semaIndex)\n{\n  Stream *s= 0;\n\n  dprintf(\"snd_Start frames: %d samplesPerSec: %d stereo: %d semaIndex: %d\\n\",\n\t   frameCount, samplesPerSec, stereo, semaIndex);\n  \n  if (output)\t// there might be a change of sample rate\n    sound_Stop();\n\n  if ((s= Stream_new(0)))\t// 0utput\n    {\n      if ((  Stream_setFormat(s, frameCount, samplesPerSec, stereo))\n\t  && Stream_startSema(s, semaIndex))\n\t{\n\t  output= s;\n\t  return 1;\n\t}\n      Stream_delete(s);\n    }\n  return primitiveFail();\n}\n\n\n/// \n/// sound input\n/// \n\n\n// answer the input sample rate.  (this is guaranteed to be the same\n// as the sample rate that was requested.)\n// \n double sound_GetRecordingSampleRate(void);\n double sound_GetRecordingSampleRate(void)\n{\n  if (input)\n    return (double)input->sampleRate;\t//xxx FIXME: this should be FP\n\n  primitiveFail();\n  return 0.0L;\n}\n\n\n sqInt sound_StopRecording(void);\n  sqInt sound_StopRecording(void)\n{\n  dprintf(\"snd_StopRecording\\n\");\n\n  if (input)\n    {\n      Stream_stop(input);\n      Stream_delete(input);\n      input= 0;\n    }\n  return 1;\n}\n\n\n// start up sound input.\n// \n sqInt sound_StartRecording(sqInt samplesPerSec, sqInt stereo, sqInt semaIndex);\n sqInt sound_StartRecording(sqInt samplesPerSec, sqInt stereo, sqInt semaIndex)\n{\n  Stream *s= 0;\n\n  dprintf(\"snd_StartRecording rate: %d stereo: %d semaIndex: %d\\n\",\n\t   samplesPerSec, stereo, semaIndex);\n  \n  if (input)\t// there might be a change of sample rate\n    sound_StopRecording();\n\n  if ((s= Stream_new(1)))\t// 1nput\n    {\n      // approximate the frameCount that output uses for the same sample rate\n      sqInt frameCount= 5288 * samplesPerSec / 44100;\n      if ((  Stream_setFormat(s, frameCount, samplesPerSec, stereo))\n\t  && Stream_startSema(s, semaIndex))\n\t{\n\t  input= s;\n\t  return 1;\n\t}\n      Stream_delete(s);\n    }\n  return primitiveFail();\n}\n\n\n sqInt sound_RecordSamplesIntoAtLength(void * buf, sqInt startSliceIndex, sqInt bufferSizeInBytes)\n{\n  if (input)\n    {\n      if (Buffer_avail(input->buffer) >= (512 * DeviceFrameSize))\n\t{\n\t  sqInt    start= startSliceIndex * SqueakFrameSize / 2;\n\t  sqInt count= min(input->cvtBufSize, bufferSizeInBytes);\n\t\tif (count <= 0) {\n\t\t\tsuccess(false);\n\t\t\treturn 0;\n\t\t}\n\t  if (kAudioHardwareNoError == AudioConverterFillBuffer(input->converter, bufferDataProc, input,\n\t\t\t\t\t\t\t\t&count, (char *)buf + start))\n\t    return count / (SqueakFrameSize / 2) / input->channels;\n\t}\n      return 0;\n    }\n  success(false);\n  return 0;\n}\n\n\n/// \n/// mixer\n/// \n\n\n sqInt getVolume(sqInt dir, double *left, double *right);\n sqInt getVolume(sqInt dir, double *left, double *right)\n{\n  UInt32\tsz;\n  AudioDeviceID\tid;\n  Float32\tchan1, chan2;\n\n  if (!getDefaultDevice(&id, dir))\n    return 0;\n\n  sz= sizeof(chan1);\n  if (checkError(AudioDeviceGetProperty(id, 1, // left\n\t\t\t\t\tdir, kAudioDevicePropertyVolumeScalar,\n\t\t\t\t\t&sz, &chan1),\n\t\t \"GetProperty\", \"VolumeScalar\"))\n    return 0;\n  sz= sizeof(chan2);\n  if (checkError(AudioDeviceGetProperty(id, 2, // right\n\t\t\t\t\tdir, kAudioDevicePropertyVolumeScalar,\n\t\t\t\t\t&sz, &chan2),\n\t\t \"GetProperty\", \"VolumeScalar\"))\n    chan2= chan1;\n  \n  *left=  chan1;\n  *right= chan2;\n\n  return 1;\n}\n\n\n sqInt setVolume(sqInt dir, double dleft, double dright);\n sqInt setVolume(sqInt dir, double dleft, double dright)\n{\n  Float32 left=  (Float32)dleft;\n  Float32 right= (Float32)dright;\n  UInt32\t sz;\n  AudioDeviceID\t id;\n\n  if (!getDefaultDevice(&id, dir))\n    return 0;\n\n  sz= sizeof(left);\n  if (checkError(AudioDeviceSetProperty(id, 0, 1, // left\n\t\t\t\t\tdir, kAudioDevicePropertyVolumeScalar,\n\t\t\t\t\tsz, &left),\n\t\t \"SetProperty\", \"VolumeScalar\"))\n    return 0;\n\n  sz= sizeof(right);\n  if (checkError(AudioDeviceSetProperty(id, 0, 2, // right\n\t\t\t\t\tdir, kAudioDevicePropertyVolumeScalar,\n\t\t\t\t\tsz, &right),\n\t\t \"SetProperty\", \"VolumeScalar\"))\n    return 0;\n\n  return 1;\n}\n\n\n// get output gain, 0.0 <= { left, right } <= 1.0\n// \n void sound_Volume(double *left, double *right);\n void sound_Volume(double *left, double *right)\n{\n  getVolume(0, left, right);\n}\n\n\n// set output gain, 0.0 <= { left, right } <= 1.0\n// \n void sound_SetVolume(double left, double right);\n void sound_SetVolume(double left, double right)\n{\n  extern sqInt noSoundMixer;\t//xxx FIXME: this should not be a global option\n\n  if (noSoundMixer)\n    return;\n\n  setVolume(0, left, right);\n}\n\n\n// set recording gain, 0 <= level <= 1000\n// \n sqInt sound_SetRecordLevel(sqInt level);\n sqInt sound_SetRecordLevel(sqInt level)\n{\n  extern sqInt noSoundMixer;\n\n  if (noSoundMixer)\n    return 0;\n\n  return setVolume(1, (double)level / 1000.0L, (double)level / 1000.0L);\n}\n\n\n/// \n/// debugging\n/// \n\n\n#if (DEBUG)\n\n void dumpFormat(AudioStreamBasicDescription *fmt)\n{\n  UInt32 flags= fmt->mFormatFlags;\n\n  printf(\"  sample rate         %g\\n\",\tfmt->mSampleRate);\n  printf(\"  format              %s\\n\",  str4(fmt->mFormatID));\n  printf(\"  flags               %08lx\",\tflags);\n\n  if\t  (flags & kAudioFormatFlagIsBigEndian)\t\tprintf(\" big-endian\");\n  else\t\t\t\t\t\t\tprintf(\" little-endian\");\n\n  if\t  (flags & kAudioFormatFlagIsFloat)\t\tprintf(\" float\");\n  else if (flags & kAudioFormatFlagIsSignedInteger)\tprintf(\" signed-sqInt\");\n  else\t\t\t\t\t\t\tprintf(\" unsigned-sqInt\");\n\n  if\t  (flags & kAudioFormatFlagIsPacked)\t\tprintf(\" packed\");\n  else if (flags & kAudioFormatFlagIsAlignedHigh)\tprintf(\" aligned-high\");\n  else\t\t\t\t\t\t\tprintf(\" aligned-low\");\n\n  if\t  (flags & kAudioFormatFlagIsNonInterleaved)\tprintf(\" interleaved\");\n  else\t\t\t\t\t\t\tprintf(\" non-interleaved\");\n  printf(\"\\n\");\n\n  printf(\"  bytes per packet    %ld\\n\",\tfmt->mBytesPerPacket);\n  printf(\"  frames per packet   %ld\\n\",\tfmt->mFramesPerPacket);\n  printf(\"  channels per frame  %ld\\n\",\tfmt->mChannelsPerFrame);\n  printf(\"  bytes per frame     %ld\\n\",\tfmt->mBytesPerFrame);\n  printf(\"  bits per channel    %ld\\n\",\tfmt->mBitsPerChannel);\n}\n\n#endif // (DEBUG)\n\n\n#if (!TESTING)\n\n# include \"SqSound.h\"\n\nstatic sqInt sound_SetSwitch(sqInt id, sqInt captureFlag, sqInt parameter)\n{\n\treturn -1;\n}\n\nstatic sqInt sound_GetSwitch(sqInt id, sqInt captureFlag, sqInt channel)\n{\n\treturn -1;\n}\n\nstatic sqInt sound_SetDevice(sqInt id, char *arg)\n{\n\treturn -1;\n}\n\n\n  SqSoundDefine(MacOSX);\n\n# include \"SqModule.h\"\n\n  void  sound_parseEnvironment(void);\n   sqInt   sound_parseArgument(sqInt argc, char **argv);\n   void  sound_printUsage(void);\n   void  sound_printUsageNotes(void);\n   void *sound_makeInterface(void);\n   void *np_sound_makeInterface(void);\n\n\tvoid  sound_parseEnvironment(void) {}\n   sqInt   sound_parseArgument(sqInt argc, char **argv) {\n\t#pragma unused(argc,argv)\n\treturn 0; }\n   void  sound_printUsage(void) {}\n   void  sound_printUsageNotes(void) {}\n   void *sound_makeInterface(void) { return &sound_MacOSX_itf; }\n\n  void *np_sound_makeInterface(void) { return &sound_MacOSX_itf; }\n\n  SqModuleDefine(sound, MacOSX);\n\n#else // TESTING\n\n# include \"math.h\"\n\n# define RATE\t48000.0\t\t\t// samples per second\n# define FRAMES\t5288 * RATE / 44100\t// nominal buffer size requested by Squeak\n# define FREQ\t440.0\t\t\t// tuning fork required to verify this ;)\n\n short sound[(sqInt)(FRAMES * 2)];\n\n void warble(sqInt n)\n{\n   double phase = 0.0;\n   double amp   = 0.5;\n   double pan   = 0.5;\n   double freq  = FREQ * 2.0 * 3.14159265359 / RATE;\n\n  short *out= sound;\n  while (n--)\n    {\n      float wave= sin(phase) * amp;\n      phase= phase + freq;\n      *out++= 32767.0 * wave * (1.0-pan);\t// left channel\n      *out++= 32767.0 * wave * pan;\t\t// right channel\n    }\n}\n\nsqInt main()\n{\n  sound_Start(FRAMES, RATE, 1, 3);\n  for (;;)\n    {\n      sqInt n= min(sizeof(sound), sound_AvailableSpace()) / 4;\n      if (n)\n\t{\n\t  warble(n);\n\t  sound_PlaySamplesFromAtLength(n, (sqInt)sound, 0);\n#        if (DEBUG)\n\t  putchar('.');  fflush(stdout);\n#        endif\n\t}\n      else\n\tusleep(1000);\n    }\n  (void)sound_InsertSamplesFromLeadTime;\n  (void)sound_PlaySilence;\n  (void)sound_GetRecordingSampleRate;\n  (void)sound_StartRecording;\n  (void)sound_RecordSamplesIntoAtLength;\n  (void)sound_Volume;\n  (void)sound_SetVolume;\n  (void)sound_SetRecordLevel;\n  return 0;\n}\n\n/*\n  cc -g -Wall -DTESTING=1 -o sqUnixSoundMacOSX sqUnixSoundMacOSX.c -framework CoreAudio -framework AudioToolbox\n*/\n\n#endif // TESTING\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SparklePlugin/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>SparklePlugin</string>\n\t<key>CFBundleIconFile</key>\n\t<string>SqueakPlugin.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.SparklePlugin</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0.0</string>\n\t<key>CFBundleSignature</key>\n\t<string>FAST</string>\n\t<key>CFBundleVersion</key>\n\t<string>1.0.0</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SparklePlugin/interp.h",
    "content": "/* Automatically generated from Squeak on #(13 May 2005 4:12:19 pm) */\r\r#define SQ_VI_BYTES_PER_WORD 4\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SparklePlugin/sqMacMainObjCSparkle.h",
    "content": "//\n//  sqMacMainObjCSparkle.h\n//  SqueakVMUNIXPATHSSparkle\n//\n//  Created by John M McIntosh on 18/11/08.\n//  Copyright 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n/*\nMIT License\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n*/\n\nvoid *setupSqueakSparkleUpdater (void);\nvoid setAutomaticallyChecksForUpdates(sqInt automaticallyChecksSqueak);\nsqInt automaticallyChecksForUpdates(void);\nvoid setUpdateCheckInterval(double intervalSqueak);\ndouble updateCheckInterval(void);\nvoid setSendsSystemProfile(sqInt sendsSystemProfileSqueak);\nsqInt sendsSystemProfile(void);\nvoid setAutomaticallyDownloadsUpdates(sqInt automaticallyDownloadsUpdatesSqueak);\nsqInt automaticallyDownloadsUpdates(void);\nvoid checkForUpdatesInBackground(void);\nsqInt lastUpdateCheckDate(void);\nvoid resetUpdateCycle(void);\nsqInt updateInProgress(void);\nvoid setFeedURL(char *feedURLSqueak, sqInt length);\nchar * feedURL(void);\nvoid checkForUpdateInformation(void);\nvoid checkForUpdates(void);\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SparklePlugin/sqMacMainObjCSparkle.m",
    "content": "//\n//  sqMacMainObjCSparkle.m\n//  SqueakVMUNIXPATHSSparkle\n//\n//  Created by John M McIntosh on 18/11/08.\n//  Copyright 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n//\n/* MIT License\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n*/\n#import <Cocoa/Cocoa.h>\n#import \"sq.h\"\n#import \"sqMacMainObjCSparkle.h\"\n#import\t<Sparkle/Sparkle.h>\n\n@interface soundAtom : NSObject {\n}\n@end\n\n@implementation soundAtom\n\n// Use this to override the default behavior for Sparkle prompting the user about automatic update checks.\n- (BOOL)updaterShouldPromptForPermissionToCheckForUpdates:(SUUpdater *)bundle{\n\treturn NO;\n};\n\n// Implement this if you want to do some special handling with the appcast once it finishes loading.\n- (void)updater:(SUUpdater *)updater didFinishLoadingAppcast:(SUAppcast *)appcast{};\n\n\n// Sent when a valid update is found by the update driver.\n- (void)updater:(SUUpdater *)updater didFindValidUpdate:(SUAppcastItem *)update{};\n\n// Sent when a valid update is not found.\n- (void)updaterDidNotFindUpdate:(SUUpdater *)update{};\n\n// Sent immediately before installing the specified update.\n- (void)updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *)update{};\n\n// Return YES to delay the relaunch until you do some processing; invoke the given NSInvocation to continue.\n- (BOOL)updater:(SUUpdater *)updater shouldPostponeRelaunchForUpdate:(SUAppcastItem *)update untilInvoking:(NSInvocation *)invocation {\nreturn NO;\n};\n// Called immediately before relaunching.\n- (void)updaterWillRelaunchApplication:(SUUpdater *)updater{};\n\n// This method allows you to provide a custom version comparator.\n// If you don't implement this method or return nil, the standard version comparator will be used.\n- (id <SUVersionComparison>)versionComparatorForUpdater:(SUUpdater *)updater {\nreturn nil;\n};\n\n@end;\n\n\nsqInt convertNSDateToSqueakTime(NSDate *givenDate);\n\nstatic SUUpdater * squeakSparkleUpdater= NULL;\n\nvoid *setupSqueakSparkleUpdater (void) {\n\tif (squeakSparkleUpdater) \n\t\treturn squeakSparkleUpdater;\n\t/* NSBundle * bundleForUpdate;\n\tbundleForUpdate = [NSBundle mainBundle ];\n\tsqueakSparkleUpdater =\t[SUUpdater updaterForBundle: bundleForUpdate]; */\n\tsqueakSparkleUpdater = [SUUpdater sharedUpdater];\n\t//[squeakSparkleUpdater setDelegate: [soundAtom new]];\n\treturn squeakSparkleUpdater;\n}\n\nvoid setAutomaticallyChecksForUpdates(sqInt automaticallyChecksSqueak){\n\tBOOL automaticallyChecks = automaticallyChecksSqueak;\n\t[squeakSparkleUpdater setAutomaticallyChecksForUpdates: automaticallyChecks];\n}\n\nsqInt automaticallyChecksForUpdates(void){\n\treturn [squeakSparkleUpdater automaticallyChecksForUpdates];\n}\n\nvoid setUpdateCheckInterval(double intervalSqueak) {\n\tNSTimeInterval automaticallyChecks = intervalSqueak;\n\t[squeakSparkleUpdater setUpdateCheckInterval: automaticallyChecks];\n\t\n}\n\ndouble updateCheckInterval(void) {\n\treturn (double) [squeakSparkleUpdater updateCheckInterval];\n\t\n}\n\nvoid checkForUpdates(void){\n\treturn [squeakSparkleUpdater checkForUpdates: nil];\n}\n\n\n\nvoid setSendsSystemProfile(sqInt sendsSystemProfileSqueak){\n\tBOOL sendsSystemProfile = sendsSystemProfileSqueak;\n\t[squeakSparkleUpdater setSendsSystemProfile: sendsSystemProfile];\n}\n\nsqInt sendsSystemProfile(void){\n\treturn [squeakSparkleUpdater sendsSystemProfile];\n}\n\nvoid setFeedURL(char *feedURLSqueak, sqInt length){\n\tNSURL * feedURL;\n\tNSString * string;\n\t\n\tstring = [[NSString alloc] initWithBytes: feedURLSqueak length: length encoding: NSUTF8StringEncoding];\n\tfeedURL = [[NSURL alloc] initWithString: string];\n\t[squeakSparkleUpdater setFeedURL: feedURL];\n\t[feedURL release];\n\t[string release];\n}\n\nchar * feedURL(void){\n\tNSURL * feedURL;\n\tNSString * string;\n\t\n\tfeedURL = [squeakSparkleUpdater feedURL];\n\tstring = [feedURL absoluteString];\n\treturn (char *) [string cStringUsingEncoding:   NSUTF8StringEncoding];\n}\n\nvoid setAutomaticallyDownloadsUpdates(sqInt automaticallyDownloadsUpdatesSqueak){\n\tBOOL automaticallyDownloadsUpdates = automaticallyDownloadsUpdatesSqueak;\n\t[squeakSparkleUpdater setAutomaticallyDownloadsUpdates: automaticallyDownloadsUpdates];\n}\n\nsqInt automaticallyDownloadsUpdates(void){\n\treturn [squeakSparkleUpdater automaticallyDownloadsUpdates];\n}\n\nvoid checkForUpdatesInBackground(void){\n\treturn [squeakSparkleUpdater checkForUpdatesInBackground];\n}\n\nvoid checkForUpdateInformation(void){\nreturn [squeakSparkleUpdater checkForUpdateInformation];\n}\n\n\nsqInt lastUpdateCheckDate(void) {\n\tNSDate *aNSDate;\n\taNSDate = [squeakSparkleUpdater lastUpdateCheckDate];\n\treturn convertNSDateToSqueakTime(aNSDate);\n}\n\nvoid resetUpdateCycle(void) {\n\t[squeakSparkleUpdater resetUpdateCycle];\n}\n\nsqInt updateInProgress(void) {\n\tsqInt\treturnValue = [squeakSparkleUpdater updateInProgress];\n\treturn returnValue;\n}\n\n\n\nsqInt convertNSDateToSqueakTime(NSDate *givenDate)\n{\n\t//IM\n\tNSTimeInterval dateDifference;\n\tstatic NSDate *squeakEpoch=NULL;\n\t\n\tif (!givenDate) \n\t\treturn 0;\n\t\n\tif (squeakEpoch == NULL) {\n\t\tNSDateComponents *comps = [NSDateComponents new];\n\t\tNSCalendar *calenderEnglishUSA = [[NSCalendar alloc] initWithCalendarIdentifier: NSGregorianCalendar]; //Use USA english calender versus user choosen china calender\n\t\t//NSTimeZone* zone =[NSTimeZone timeZoneForSecondsFromGMT: 0];\n\t\t//[calenderEnglishUSA setTimeZone: zone];  THIS appears not to be needed?\n\t\t[comps setYear: 1901];\n\t\t[comps setMonth: 1];\n\t\t[comps setDay: 1];\n\t\t[comps setHour: 0];\n\t\t[comps setMinute: 0];\n\t\t[comps setSecond: 0];\n\t\t\n\t\tsqueakEpoch = [calenderEnglishUSA  dateFromComponents: comps];\n\t\t[squeakEpoch retain];\n\t\t[comps release];\n\t\t[calenderEnglishUSA release];\n\t}\n\t\n\t/* Squeak epoch is Jan 1, 1901.  Unix epoch is Jan 1, 1970 */\n\tdateDifference = [givenDate timeIntervalSinceDate: squeakEpoch];\n\treturn (sqInt) (usqInt) dateDifference;\n}\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SpellingPlugin/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>SpellingPlugin</string>\n\t<key>CFBundleGetInfoString</key>\n\t<string>SpellingPlugin for Squeak</string>\n\t<key>CFBundleIconFile</key>\n\t<string>SqueakPlugin.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.SpellingPlugin</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>SpellingPlugin for Squeak</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0.1b2</string>\n\t<key>CFBundleSignature</key>\n\t<string>FAST</string>\n\t<key>CFBundleVersion</key>\n\t<string>1.0.1b2</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SpellingPlugin/JMMMacSpelling.3.cs",
    "content": "'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 15 February 2006 at 3:41:19 pm'!\r\"Change Set:\t\tJMMMacSpelling\rDate:\t\t\t15 June 2005\rAuthor:\t\t\tjohnmci@smalltalkconsulting.com\r\rMac Spelling, interface to os-x spelling interface, allows you to check a utf-16 string for errors, set ignored words, change dictionary used, etc\"!\r\rObject subclass: #MacSpellingInterface\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'Tag'\r\tpoolDictionaries: ''\r\tcategory: 'Multilingual-Editor'!\r\rTestCase subclass: #MacSpellingInterfaceTest\r\tinstanceVariableNames: 'spelling'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Network-RemoteDirectory'!\r!MacSpellingInterfaceTest commentStamp: 'JMM 6/15/2005 16:53' prior: 0!\rMac spelling checking interface. Test cases\ruses SpelllingPlugin\rby\rJohn M McIntosh\rjohnmci@smalltalkconsulting.com\rJune 15th 2005\r!\r\r!MacSpellingInterface methodsFor: 'converter' stamp: 'JMM 6/15/2005 09:59'!\rbyteStringToUTF16: bytes\r\r\t^bytes asString convertFromWithConverter: (TextConverter newForEncoding: 'utf-16').\r! !\r\r!MacSpellingInterface methodsFor: 'converter' stamp: 'JMM 6/15/2005 09:38'!\runknownToUTF16: candidate\r\r\t^candidate convertToWithConverter: (TextConverter newForEncoding: 'utf-16').\r! !\r\r!MacSpellingInterface methodsFor: 'guesses' stamp: 'JMM 6/15/2005 09:44'!\rgetGuesses: aString\r\t| size collection word utf16 toGuess |\r\t\r\ttoGuess := self unknownToUTF16: aString.\r\tsize := self primGetGuessesForWordListLength: toGuess withTag: Tag.\r\tcollection := OrderedCollection new: size.\r\t1 to: size do: [:i |\r\t\tword := self primGetGuessesForWordwithTag: Tag at: i.\r\t\tutf16 := self byteStringToUTF16: word.\t\r\t\tcollection add: utf16].\r\t^collection! !\r\r!MacSpellingInterface methodsFor: 'ignored words' stamp: 'JMM 6/15/2005 09:36'!\rgetIgnoredWords\r\t| size collection word utf16 |\r\t\r\tsize := self primGetIgnoredWordsListLengthWithTag: Tag.\r\tsize isZero ifTrue: [^OrderedCollection new].\r\tcollection := OrderedCollection new: size.\r\t1 to: size do: [:i |\r\t\tword := self primGetIgnoredWordWithTag: Tag at: i.\r\t\tutf16 := self byteStringToUTF16: word.\r\t\tcollection add: utf16].\r\t^collection! !\r\r!MacSpellingInterface methodsFor: 'ignored words' stamp: 'JMM 6/15/2005 09:40'!\rsetIgnoredWords: anArray\r\t\"AnArray is unicode 16bit values\"\r\r\t| utf16 |\r\tself primSetIgnoredWordsListLength: anArray size withTag: Tag.\r\t1 to: anArray size  do: [:i | \r\t\tutf16 _ self unknownToUTF16: (anArray at: i).\r\t\tself primSetIgnoredWords: utf16 withTag: Tag at: i].! !\r\r!MacSpellingInterface methodsFor: 'ignored words' stamp: 'JMM 6/15/2005 09:39'!\rsetIgnoredWord: aString\r\t\"unicode32 is unicode value\"\r\t| utf16 |\r\r\tutf16 := self unknownToUTF16: aString.\r\tself primSetNewIgnoredWord: utf16 withTag: Tag\r! !\r\r!MacSpellingInterface methodsFor: 'initialize-release' stamp: 'JMM 6/14/2005 17:59'!\rinitialize\r\tTag := self primGetUniqueSpellingTag.\r\r! !\r\r!MacSpellingInterface methodsFor: 'language' stamp: 'JMM 6/14/2005 18:37'!\rgetLanguageString\r\t\"ByteString , ie english\"\r\r\t^self primGetLanguage! !\r\r!MacSpellingInterface methodsFor: 'language' stamp: 'JMM 6/14/2005 18:21'!\rsetLanguageString: aString\r\t\"ByteString , ie english\"\r\tself primSetLanguage: aString! !\r\r!MacSpellingInterface methodsFor: 'spelling' stamp: 'JMM 6/15/2005 09:43'!\rcheckSpellingOf: aString startingAt: anInteger\r\t| results utf16 |\r\r\tutf16 := self unknownToUTF16: aString.\r\tresults := self primCheckSpelling: utf16 startingAt: anInteger.\r\t^results! !\r\r!MacSpellingInterface methodsFor: 'system primitives' stamp: 'JMM 6/14/2005 18:18'!\rprimCheckSpelling: aString startingAt: anInteger\r\r\t<primitive:'primitiveCheckSpelling' module: 'SpellingPlugin'>\r! !\r\r!MacSpellingInterface methodsFor: 'system primitives' stamp: 'JMM 6/14/2005 18:14'!\rprimGetGuessesForWordListLength: data withTag: aTag\r\r\t<primitive:'primitiveGetGuessesForWordListLength' module: 'SpellingPlugin'>\r! !\r\r!MacSpellingInterface methodsFor: 'system primitives' stamp: 'JMM 6/14/2005 18:14'!\rprimGetGuessesForWordwithTag: aTag at: index\r\r\t<primitive:'primitiveGetGuessesForWordwithTag' module: 'SpellingPlugin'>\r! !\r\r!MacSpellingInterface methodsFor: 'system primitives' stamp: 'JMM 6/14/2005 18:10'!\rprimGetIgnoredWordsListLengthWithTag: aTag\r\r\t<primitive:'primitiveGetIgnoredWordsListLengthWithTag' module: 'SpellingPlugin'>\r! !\r\r!MacSpellingInterface methodsFor: 'system primitives' stamp: 'JMM 6/14/2005 18:12'!\rprimGetIgnoredWordWithTag: Tag at: i\r\r\t<primitive:'primitiveGetIgnoredWordWithTag' module: 'SpellingPlugin'>\r! !\r\r!MacSpellingInterface methodsFor: 'system primitives' stamp: 'JMM 6/14/2005 18:07'!\rprimGetLanguage\r\r\t<primitive:'primitiveGetLanguage' module: 'SpellingPlugin'>\r! !\r\r!MacSpellingInterface methodsFor: 'system primitives' stamp: 'JMM 6/14/2005 17:59'!\rprimGetUniqueSpellingTag\r\r\t<primitive:'primitiveGetUniqueSpellingTag' module: 'SpellingPlugin'>\r! !\r\r!MacSpellingInterface methodsFor: 'system primitives' stamp: 'JMM 6/14/2005 18:07'!\rprimSetIgnoredWordsListLength: anArray withTag: Tag\r\r\t<primitive:'primitiveSetIgnoredWordsListLength' module: 'SpellingPlugin'>\r! !\r\r!MacSpellingInterface methodsFor: 'system primitives' stamp: 'JMM 6/14/2005 18:04'!\rprimSetIgnoredWords: string withTag: Tag at: i\r\r\t<primitive:'primitiveSetIgnoredWords' module: 'SpellingPlugin'>\r! !\r\r!MacSpellingInterface methodsFor: 'system primitives' stamp: 'JMM 6/14/2005 18:08'!\rprimSetLanguage: aString\r\r\t<primitive:'primitiveSetLanguage' module: 'SpellingPlugin'>\r! !\r\r!MacSpellingInterface methodsFor: 'system primitives' stamp: 'JMM 6/14/2005 18:15'!\rprimSetNewIgnoredWord: aString withTag: Tag\r\r\t<primitive:'primitiveSetNewIgnoredWord' module: 'SpellingPlugin'>\r! !\r\r\r!MacSpellingInterfaceTest methodsFor: 'running' stamp: 'JMM 6/15/2005 15:44'!\rtestAGuess\r\t| s chk |\r\r\ts := spelling getGuesses: 'ackbar2'.\r\tself should: [s isEmpty].\r\ts := spelling getGuesses: 'recieve'.\r\tchk := s collect: [:e | e asString].\r\tself should: [chk includes: 'receive'].\r\tself should: [chk size > 1].\r\r\t! !\r\r!MacSpellingInterfaceTest methodsFor: 'running' stamp: 'JMM 6/15/2005 09:50'!\rtestATag\r\t| s |\r\ts := spelling primGetUniqueSpellingTag.\r\tself should: [s isNumber].\r\tself should: [s > 0].\r\t! !\r\r!MacSpellingInterfaceTest methodsFor: 'running' stamp: 'JMM 6/15/2005 09:53'!\rtestGetIgnoredWords\r\t| s |\r\ts := spelling getIgnoredWords.\r\tself should: [s isCollection].\r\t! !\r\r!MacSpellingInterfaceTest methodsFor: 'running' stamp: 'JMM 6/15/2005 12:24'!\rtestGetSetLanguageString\r\t| l remember |\r\tl := spelling getLanguageString.\r\tself should: [l size > 0].\r\tremember _ l.\r\tspelling setLanguageString: l.\r\tl := spelling getLanguageString.\r\tself should: [l size > 0].\r\tself should: [remember = l].\r\r\t! !\r\r!MacSpellingInterfaceTest methodsFor: 'running' stamp: 'JMM 6/15/2005 16:56'!\rtestSetIgnoredWord\r\t|  w1 i2 i2strings w2 w3 |\r\r\tw1 := self waitASecondRollOver.\r\tspelling setIgnoredWord: w1.\r\ti2 := spelling getIgnoredWords.\r\ti2strings := i2 collect: [:e | e asString].\r\tself should: [i2strings includes: w1].\r\r\tw2 := self waitASecondRollOver.\r\tspelling setIgnoredWord: w2.\r\ti2 := spelling getIgnoredWords.\r\ti2strings := i2 collect: [:e | e asString].\r\tself should: [i2strings includes: w1].\r\tself should: [i2strings includes: w2].\r\t\r\tspelling setIgnoredWords: (OrderedCollection new).\r\tw3 := self waitASecondRollOver.\r\tspelling setIgnoredWord: w3.\r\ti2 := spelling getIgnoredWords.\r\tself should: [i2 size = 1].\r\ti2strings := i2 collect: [:e | e asString].\r\tself should: [i2strings includes: w3].\r\r! !\r\r!MacSpellingInterfaceTest methodsFor: 'running' stamp: 'JMM 6/15/2005 16:38'!\rtestSetIgnoredWords\r\t|  w1 i i2 i3 i3strings i1strings i2strings |\r\ti := spelling getIgnoredWords.\r\ti isEmpty ifTrue: [\r\t\tspelling setIgnoredWords: (OrderedCollection with: 'ackbar').\r\t\ti2 := spelling getIgnoredWords.\r\t\tself should: [i2 size = 1].\r\t\tself should: [(i2 at: 1) asString = 'ackbar'].\r\t\tspelling setIgnoredWords: (OrderedCollection with: 'ackbar' with: 'ackbar2').\r\t\ti3 := spelling getIgnoredWords.\r\t\tself should: [i3 size = 2].\r\t\ti3strings := i3 collect: [:e | e asString].\r\t\tself should: [i3strings includes: 'ackbar'].\r\t\tself should: [i3strings includes: 'ackbar2']\t\r\t].\r\ti := spelling getIgnoredWords.\r\tw1 := self waitASecondRollOver.\r\ti1strings := i collect: [:e | e asString].\r\ti1strings add: w1.\r\tspelling setIgnoredWords: i1strings.\r\ti2 := spelling getIgnoredWords.\r\ti2strings := i2 collect: [:e | e asString].\r\tself should: [i2strings includes: w1].\r\tspelling setIgnoredWords: (OrderedCollection new).\r\ti := spelling getIgnoredWords.\r\tself should: [i size = 0].\r\r\r! !\r\r!MacSpellingInterfaceTest methodsFor: 'running' stamp: 'JMM 6/15/2005 16:48'!\rtestSpelling\r\t| s i |\r\r\tspelling setIgnoredWords: (OrderedCollection new).\r\ti := spelling getIgnoredWords.\r\tself should: [i size = 0].\r\ts := spelling checkSpellingOf: 'recieve' startingAt: 1.\r\tself should: [(s at: 1) = 1].\r\tself should: [(s at: 2) = 7].\r\ts := spelling checkSpellingOf: 'receive' startingAt: 1.\r\tself should: [(s at: 2) = 0].\r\tspelling setIgnoredWord: 'recieve'.\r\ts := spelling checkSpellingOf: 'recieve' startingAt: 1.\r\tself should: [(s at: 2) = 0].\r\tspelling setIgnoredWords: (OrderedCollection new).\r\ts := spelling checkSpellingOf: 'recieve' startingAt: 1.\r\tself should: [(s at: 1) = 1].\r\tself should: [(s at: 2) = 7].\r\t! !\r\r!MacSpellingInterfaceTest methodsFor: 'running' stamp: 'JMM 6/15/2005 16:59'!\rtestSpellingOffset\r\t| s i |\r\r\tspelling setIgnoredWords: (OrderedCollection new).\r\ti := spelling getIgnoredWords.\r\tself should: [i size = 0].\r\ts := spelling checkSpellingOf: 'too recieve' startingAt: 1.\r\tself should: [(s at: 1) = 5].\r\tself should: [(s at: 2) = 7].\r\ts := spelling checkSpellingOf: 'too more recieve' startingAt: 1.\r\tself should: [(s at: 1) = 10].\r\tself should: [(s at: 2) = 7].\r\ts := spelling checkSpellingOf: 'toox more recieve' startingAt: 1.\r\tself should: [(s at: 1) = 1].\r\tself should: [(s at: 2) = 4].\r\ts := spelling checkSpellingOf: 'toox more recieve' startingAt: 6.\r\tself should: [(s at: 1) = 11].\r\tself should: [(s at: 2) = 7].\r! !\r\r!MacSpellingInterfaceTest methodsFor: 'utility' stamp: 'JMM 6/15/2005 14:16'!\rwaitASecondRollOver\r\t| now duration |\r\tnow := Time  millisecondClockValue.\r\t[duration := (Time  millisecondClockValue) - now.\r\tduration > 0]\r\t\twhileFalse: [(Delay forMilliseconds: 10) wait].\r\t^Time  millisecondClockValue printString! !\r\r!MacSpellingInterfaceTest methodsFor: 'initialize-release' stamp: 'JMM 6/15/2005 09:48'!\rsetUp\r\tspelling _ MacSpellingInterface new.! !\r\r\r!MacSpellingInterface reorganize!\r('converter' byteStringToUTF16: unknownToUTF16:)\r('guesses' getGuesses:)\r('ignored words' getIgnoredWords setIgnoredWords: setIgnoredWord:)\r('initialize-release' initialize)\r('language' getLanguageString setLanguageString:)\r('spelling' checkSpellingOf:startingAt:)\r('system primitives' primCheckSpelling:startingAt: primGetGuessesForWordListLength:withTag: primGetGuessesForWordwithTag:at: primGetIgnoredWordsListLengthWithTag: primGetIgnoredWordWithTag:at: primGetLanguage primGetUniqueSpellingTag primSetIgnoredWordsListLength:withTag: primSetIgnoredWords:withTag:at: primSetLanguage: primSetNewIgnoredWord:withTag:)\r!\r\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SpellingPlugin/JMMMacSpelling.4.cs",
    "content": "'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 15 February 2006 at 3:41:19 pm'!\r\"Change Set:\t\tJMMMacSpelling\rDate:\t\t\t15 June 2005\rAuthor:\t\t\tjohnmci@smalltalkconsulting.com\r\rMac Spelling, interface to os-x spelling interface, allows you to check a utf-16 string for errors, set ignored words, change dictionary used, etc\"!\r\rObject subclass: #MacSpellingInterface\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'Tag'\r\tpoolDictionaries: ''\r\tcategory: 'Sophie-Spelling-Mac'!\r\rTestCase subclass: #MacSpellingInterfaceTest\r\tinstanceVariableNames: 'spelling'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Sophie-Spelling-Mac'!\r!MacSpellingInterfaceTest commentStamp: 'JMM 6/15/2005 16:53' prior: 0!\rMac spelling checking interface. Test cases\ruses SpelllingPlugin\rby\rJohn M McIntosh\rjohnmci@smalltalkconsulting.com\rJune 15th 2005\r!\r\r!MacSpellingInterface methodsFor: 'converter' stamp: 'JMM 6/15/2005 09:59'!\rbyteStringToUTF16: bytes\r\r\t^bytes asString convertFromWithConverter: (TextConverter newForEncoding: 'utf-16').\r! !\r\r!MacSpellingInterface methodsFor: 'converter' stamp: 'JMM 6/15/2005 09:38'!\runknownToUTF16: candidate\r\r\t^candidate convertToWithConverter: (TextConverter newForEncoding: 'utf-16').\r! !\r\r!MacSpellingInterface methodsFor: 'guesses' stamp: 'JMM 6/15/2005 09:44'!\rgetGuesses: aString\r\t| size collection word utf16 toGuess |\r\t\r\ttoGuess := self unknownToUTF16: aString.\r\tsize := self primGetGuessesForWordListLength: toGuess withTag: Tag.\r\tcollection := OrderedCollection new: size.\r\t1 to: size do: [:i |\r\t\tword := self primGetGuessesForWordwithTag: Tag at: i.\r\t\tutf16 := self byteStringToUTF16: word.\t\r\t\tcollection add: utf16].\r\t^collection! !\r\r!MacSpellingInterface methodsFor: 'ignored words' stamp: 'JMM 6/15/2005 09:36'!\rgetIgnoredWords\r\t| size collection word utf16 |\r\t\r\tsize := self primGetIgnoredWordsListLengthWithTag: Tag.\r\tsize isZero ifTrue: [^OrderedCollection new].\r\tcollection := OrderedCollection new: size.\r\t1 to: size do: [:i |\r\t\tword := self primGetIgnoredWordWithTag: Tag at: i.\r\t\tutf16 := self byteStringToUTF16: word.\r\t\tcollection add: utf16].\r\t^collection! !\r\r!MacSpellingInterface methodsFor: 'ignored words' stamp: 'JMM 6/15/2005 09:40'!\rsetIgnoredWords: anArray\r\t\"AnArray is unicode 16bit values\"\r\r\t| utf16 |\r\tself primSetIgnoredWordsListLength: anArray size withTag: Tag.\r\t1 to: anArray size  do: [:i | \r\t\tutf16 _ self unknownToUTF16: (anArray at: i).\r\t\tself primSetIgnoredWords: utf16 withTag: Tag at: i].! !\r\r!MacSpellingInterface methodsFor: 'ignored words' stamp: 'JMM 6/15/2005 09:39'!\rsetIgnoredWord: aString\r\t\"unicode32 is unicode value\"\r\t| utf16 |\r\r\tutf16 := self unknownToUTF16: aString.\r\tself primSetNewIgnoredWord: utf16 withTag: Tag\r! !\r\r!MacSpellingInterface methodsFor: 'initialize-release' stamp: 'JMM 6/14/2005 17:59'!\rinitialize\r\tTag := self primGetUniqueSpellingTag.\r\r! !\r\r!MacSpellingInterface methodsFor: 'language' stamp: 'JMM 6/14/2005 18:37'!\rgetLanguageString\r\t\"ByteString , ie english\"\r\r\t^self primGetLanguage! !\r\r!MacSpellingInterface methodsFor: 'language' stamp: 'JMM 6/14/2005 18:21'!\rsetLanguageString: aString\r\t\"ByteString , ie english\"\r\tself primSetLanguage: aString! !\r\r!MacSpellingInterface methodsFor: 'spelling' stamp: 'JMM 6/15/2005 09:43'!\rcheckSpellingOf: aString startingAt: anInteger\r\t| results utf16 |\r\r\tutf16 := self unknownToUTF16: aString.\r\tresults := self primCheckSpelling: utf16 startingAt: anInteger.\r\t^results! !\r\r!MacSpellingInterface methodsFor: 'system primitives' stamp: 'JMM 6/14/2005 18:18'!\rprimCheckSpelling: aString startingAt: anInteger\r\r\t<primitive:'primitiveCheckSpelling' module: 'SpellingPlugin'>\r! !\r\r!MacSpellingInterface methodsFor: 'system primitives' stamp: 'JMM 6/14/2005 18:14'!\rprimGetGuessesForWordListLength: data withTag: aTag\r\r\t<primitive:'primitiveGetGuessesForWordListLength' module: 'SpellingPlugin'>\r! !\r\r!MacSpellingInterface methodsFor: 'system primitives' stamp: 'JMM 6/14/2005 18:14'!\rprimGetGuessesForWordwithTag: aTag at: index\r\r\t<primitive:'primitiveGetGuessesForWordwithTag' module: 'SpellingPlugin'>\r! !\r\r!MacSpellingInterface methodsFor: 'system primitives' stamp: 'JMM 6/14/2005 18:10'!\rprimGetIgnoredWordsListLengthWithTag: aTag\r\r\t<primitive:'primitiveGetIgnoredWordsListLengthWithTag' module: 'SpellingPlugin'>\r! !\r\r!MacSpellingInterface methodsFor: 'system primitives' stamp: 'JMM 6/14/2005 18:12'!\rprimGetIgnoredWordWithTag: Tag at: i\r\r\t<primitive:'primitiveGetIgnoredWordWithTag' module: 'SpellingPlugin'>\r! !\r\r!MacSpellingInterface methodsFor: 'system primitives' stamp: 'JMM 6/14/2005 18:07'!\rprimGetLanguage\r\r\t<primitive:'primitiveGetLanguage' module: 'SpellingPlugin'>\r! !\r\r!MacSpellingInterface methodsFor: 'system primitives' stamp: 'JMM 6/14/2005 17:59'!\rprimGetUniqueSpellingTag\r\r\t<primitive:'primitiveGetUniqueSpellingTag' module: 'SpellingPlugin'>\r! !\r\r!MacSpellingInterface methodsFor: 'system primitives' stamp: 'JMM 6/14/2005 18:07'!\rprimSetIgnoredWordsListLength: anArray withTag: Tag\r\r\t<primitive:'primitiveSetIgnoredWordsListLength' module: 'SpellingPlugin'>\r! !\r\r!MacSpellingInterface methodsFor: 'system primitives' stamp: 'JMM 6/14/2005 18:04'!\rprimSetIgnoredWords: string withTag: Tag at: i\r\r\t<primitive:'primitiveSetIgnoredWords' module: 'SpellingPlugin'>\r! !\r\r!MacSpellingInterface methodsFor: 'system primitives' stamp: 'JMM 6/14/2005 18:08'!\rprimSetLanguage: aString\r\r\t<primitive:'primitiveSetLanguage' module: 'SpellingPlugin'>\r! !\r\r!MacSpellingInterface methodsFor: 'system primitives' stamp: 'JMM 6/14/2005 18:15'!\rprimSetNewIgnoredWord: aString withTag: Tag\r\r\t<primitive:'primitiveSetNewIgnoredWord' module: 'SpellingPlugin'>\r! !\r\r\r!MacSpellingInterfaceTest methodsFor: 'running' stamp: 'JMM 6/15/2005 15:44'!\rtestAGuess\r\t| s chk |\r\r\ts := spelling getGuesses: 'ackbar2'.\r\tself should: [s isEmpty].\r\ts := spelling getGuesses: 'recieve'.\r\tchk := s collect: [:e | e asString].\r\tself should: [chk includes: 'receive'].\r\tself should: [chk size > 1].\r\r\t! !\r\r!MacSpellingInterfaceTest methodsFor: 'running' stamp: 'JMM 6/15/2005 09:50'!\rtestATag\r\t| s |\r\ts := spelling primGetUniqueSpellingTag.\r\tself should: [s isNumber].\r\tself should: [s > 0].\r\t! !\r\r!MacSpellingInterfaceTest methodsFor: 'running' stamp: 'JMM 6/15/2005 09:53'!\rtestGetIgnoredWords\r\t| s |\r\ts := spelling getIgnoredWords.\r\tself should: [s isCollection].\r\t! !\r\r!MacSpellingInterfaceTest methodsFor: 'running' stamp: 'JMM 6/15/2005 12:24'!\rtestGetSetLanguageString\r\t| l remember |\r\tl := spelling getLanguageString.\r\tself should: [l size > 0].\r\tremember _ l.\r\tspelling setLanguageString: l.\r\tl := spelling getLanguageString.\r\tself should: [l size > 0].\r\tself should: [remember = l].\r\r\t! !\r\r!MacSpellingInterfaceTest methodsFor: 'running' stamp: 'JMM 6/15/2005 16:56'!\rtestSetIgnoredWord\r\t|  w1 i2 i2strings w2 w3 |\r\r\tw1 := self waitASecondRollOver.\r\tspelling setIgnoredWord: w1.\r\ti2 := spelling getIgnoredWords.\r\ti2strings := i2 collect: [:e | e asString].\r\tself should: [i2strings includes: w1].\r\r\tw2 := self waitASecondRollOver.\r\tspelling setIgnoredWord: w2.\r\ti2 := spelling getIgnoredWords.\r\ti2strings := i2 collect: [:e | e asString].\r\tself should: [i2strings includes: w1].\r\tself should: [i2strings includes: w2].\r\t\r\tspelling setIgnoredWords: (OrderedCollection new).\r\tw3 := self waitASecondRollOver.\r\tspelling setIgnoredWord: w3.\r\ti2 := spelling getIgnoredWords.\r\tself should: [i2 size = 1].\r\ti2strings := i2 collect: [:e | e asString].\r\tself should: [i2strings includes: w3].\r\r! !\r\r!MacSpellingInterfaceTest methodsFor: 'running' stamp: 'JMM 6/15/2005 16:38'!\rtestSetIgnoredWords\r\t|  w1 i i2 i3 i3strings i1strings i2strings |\r\ti := spelling getIgnoredWords.\r\ti isEmpty ifTrue: [\r\t\tspelling setIgnoredWords: (OrderedCollection with: 'ackbar').\r\t\ti2 := spelling getIgnoredWords.\r\t\tself should: [i2 size = 1].\r\t\tself should: [(i2 at: 1) asString = 'ackbar'].\r\t\tspelling setIgnoredWords: (OrderedCollection with: 'ackbar' with: 'ackbar2').\r\t\ti3 := spelling getIgnoredWords.\r\t\tself should: [i3 size = 2].\r\t\ti3strings := i3 collect: [:e | e asString].\r\t\tself should: [i3strings includes: 'ackbar'].\r\t\tself should: [i3strings includes: 'ackbar2']\t\r\t].\r\ti := spelling getIgnoredWords.\r\tw1 := self waitASecondRollOver.\r\ti1strings := i collect: [:e | e asString].\r\ti1strings add: w1.\r\tspelling setIgnoredWords: i1strings.\r\ti2 := spelling getIgnoredWords.\r\ti2strings := i2 collect: [:e | e asString].\r\tself should: [i2strings includes: w1].\r\tspelling setIgnoredWords: (OrderedCollection new).\r\ti := spelling getIgnoredWords.\r\tself should: [i size = 0].\r\r\r! !\r\r!MacSpellingInterfaceTest methodsFor: 'running' stamp: 'JMM 6/15/2005 16:48'!\rtestSpelling\r\t| s i |\r\r\tspelling setIgnoredWords: (OrderedCollection new).\r\ti := spelling getIgnoredWords.\r\tself should: [i size = 0].\r\ts := spelling checkSpellingOf: 'recieve' startingAt: 1.\r\tself should: [(s at: 1) = 1].\r\tself should: [(s at: 2) = 7].\r\ts := spelling checkSpellingOf: 'receive' startingAt: 1.\r\tself should: [(s at: 2) = 0].\r\tspelling setIgnoredWord: 'recieve'.\r\ts := spelling checkSpellingOf: 'recieve' startingAt: 1.\r\tself should: [(s at: 2) = 0].\r\tspelling setIgnoredWords: (OrderedCollection new).\r\ts := spelling checkSpellingOf: 'recieve' startingAt: 1.\r\tself should: [(s at: 1) = 1].\r\tself should: [(s at: 2) = 7].\r\t! !\r\r!MacSpellingInterfaceTest methodsFor: 'running' stamp: 'JMM 6/15/2005 16:59'!\rtestSpellingOffset\r\t| s i |\r\r\tspelling setIgnoredWords: (OrderedCollection new).\r\ti := spelling getIgnoredWords.\r\tself should: [i size = 0].\r\ts := spelling checkSpellingOf: 'too recieve' startingAt: 1.\r\tself should: [(s at: 1) = 5].\r\tself should: [(s at: 2) = 7].\r\ts := spelling checkSpellingOf: 'too more recieve' startingAt: 1.\r\tself should: [(s at: 1) = 10].\r\tself should: [(s at: 2) = 7].\r\ts := spelling checkSpellingOf: 'toox more recieve' startingAt: 1.\r\tself should: [(s at: 1) = 1].\r\tself should: [(s at: 2) = 4].\r\ts := spelling checkSpellingOf: 'toox more recieve' startingAt: 6.\r\tself should: [(s at: 1) = 11].\r\tself should: [(s at: 2) = 7].\r! !\r\r!MacSpellingInterfaceTest methodsFor: 'utility' stamp: 'JMM 6/15/2005 14:16'!\rwaitASecondRollOver\r\t| now duration |\r\tnow := Time  millisecondClockValue.\r\t[duration := (Time  millisecondClockValue) - now.\r\tduration > 0]\r\t\twhileFalse: [(Delay forMilliseconds: 10) wait].\r\t^Time  millisecondClockValue printString! !\r\r!MacSpellingInterfaceTest methodsFor: 'initialize-release' stamp: 'JMM 6/15/2005 09:48'!\rsetUp\r\tspelling _ MacSpellingInterface new.! !\r\r\r!MacSpellingInterface reorganize!\r('converter' byteStringToUTF16: unknownToUTF16:)\r('guesses' getGuesses:)\r('ignored words' getIgnoredWords setIgnoredWords: setIgnoredWord:)\r('initialize-release' initialize)\r('language' getLanguageString setLanguageString:)\r('spelling' checkSpellingOf:startingAt:)\r('system primitives' primCheckSpelling:startingAt: primGetGuessesForWordListLength:withTag: primGetGuessesForWordwithTag:at: primGetIgnoredWordsListLengthWithTag: primGetIgnoredWordWithTag:at: primGetLanguage primGetUniqueSpellingTag primSetIgnoredWordsListLength:withTag: primSetIgnoredWords:withTag:at: primSetLanguage: primSetNewIgnoredWord:withTag:)\r!\r\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SpellingPlugin/JMMMacSpellingPlugin.1.cs",
    "content": "'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 15 June 2005 at 5:04:15 pm'!\rSmartSyntaxInterpreterPlugin subclass: #SpellingPlugin\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'VMMaker-Plugins'!\r\r!SpellingPlugin methodsFor: 'initialize' stamp: 'JMM 6/14/2005 10:16'!\rinitialiseModule\r\tself export: true.\r\t^self sqSpellingInitialize ! !\r\r!SpellingPlugin methodsFor: 'initialize' stamp: 'JMM 6/14/2005 10:16'!\rmoduleUnloaded: aModuleName \r\t\"The module with the given name was just unloaded. \r\tMake sure we have no dangling references.\"\r\tself export: true.\r\tself var: #aModuleName type: 'char *'.\r\t(aModuleName strcmp: 'SpellingPlugin') = 0\r\t\tifTrue: [self sqSpellingShutdown]! !\r\r!SpellingPlugin methodsFor: 'system primitives' stamp: 'JMM 6/15/2005 16:44'!\rprimitiveCheckSpelling: data startingAt: anInteger\r\t\"data is? Tag that identifies document/image\"\r\r\t| resultPtr result arrayOop value length |\r\tself var: #result declareC: 'int result[2]'.\r\tself var: #resultPtr declareC: 'int * resultPtr=result'.\r\tself primitive: 'primitiveCheckSpelling' parameters:#(Oop SmallInteger).\r\tlength := interpreterProxy stSizeOf: data.\r\tself sqSpellingCheckSpelling: (interpreterProxy firstIndexableField: data) startingAt: anInteger - 1 length: length/2 results: resultPtr.\r\tarrayOop := interpreterProxy\r\t\tinstantiateClass: interpreterProxy classArray\r\t\tindexableSize: 2.\r\t0 to: 1 do:[:i|\r\n\t\tinterpreterProxy pushRemappableOop: arrayOop.\r\n\t\tvalue := interpreterProxy positive32BitIntegerFor: (result at: i).\r\n\t\tarrayOop := interpreterProxy popRemappableOop.\r\n\t\tinterpreterProxy storePointer: i ofObject: arrayOop withValue: value].\r\t^arrayOop\r\n! !\r\r!SpellingPlugin methodsFor: 'system primitives' stamp: 'JMM 6/15/2005 14:51'!\rprimitiveGetGuessesForWordListLength: data withTag: aTag\r\t\"data is? Tag that identifies document/image\"\r\r\t| size length |\r\tself primitive: 'primitiveGetGuessesForWordListLength' parameters:#(Oop SmallInteger).\r\tlength := interpreterProxy stSizeOf: data.\r\tsize := self sqSpellingGuessForWordListLength: (interpreterProxy firstIndexableField: data) withTag: aTag length: length/2.\r\r\t^size asSmallIntegerObj! !\r\r!SpellingPlugin methodsFor: 'system primitives' stamp: 'JMM 6/14/2005 22:07'!\rprimitiveGetGuessesForWordwithTag: aTag at: index\r\t\"data is? Tag that identifies document/image\"\r\r\t| length oop |\r\tself primitive: 'primitiveGetGuessesForWordwithTag' parameters:#(SmallInteger SmallInteger).\r\tlength := self sqSpellingGuessForWordwithTagLength: aTag at: index-1.\r\toop := interpreterProxy instantiateClass: interpreterProxy classByteArray indexableSize: length*2.\r\tself sqSpellingGuessForWordwithTag: aTag at: index-1 into: (interpreterProxy firstIndexableField: oop).\r\t^oop\r! !\r\r!SpellingPlugin methodsFor: 'system primitives' stamp: 'JMM 6/14/2005 16:14'!\rprimitiveGetIgnoredWordsListLengthWithTag: aTag\r\t\"Get ignored word list\"\r\t| length |\r\r\tself primitive: 'primitiveGetIgnoredWordsListLengthWithTag'  parameters:#(SmallInteger).\r\tlength := self sqSpellingGetIgnoredWordsListLengthWithTag: aTag.\r\t^length asSmallIntegerObj! !\r\r!SpellingPlugin methodsFor: 'system primitives' stamp: 'JMM 6/14/2005 22:06'!\rprimitiveGetIgnoredWordWithTag: aTag at: anIndex\r\t\"Get ignored word list\"\r\t| length oop |\r\r\tself primitive: 'primitiveGetIgnoredWordWithTag'  parameters:#(SmallInteger SmallInteger).\r\tlength := self sqSpellingGetIgnoredWordLengthWithTag: aTag at: anIndex-1.\r\toop := interpreterProxy instantiateClass: interpreterProxy classByteArray indexableSize: length*2.\r\tself sqSpellingGetIgnoredWordWithTag: aTag at: anIndex-1 into: (interpreterProxy firstIndexableField: oop).\r\t^oop! !\r\r!SpellingPlugin methodsFor: 'system primitives' stamp: 'JMM 6/14/2005 17:49'!\rprimitiveGetLanguage\r\t\"Return Language\"\r\t| length oop |\r\r\tself primitive: 'primitiveGetLanguage'.\r\tlength := self sqSpellingGetLanguageLength.\r\toop := interpreterProxy instantiateClass: interpreterProxy classString indexableSize: length.\r\tself sqSpellingGetLanguageInto: (interpreterProxy firstIndexableField: oop).\r\t^oop\r! !\r\r!SpellingPlugin methodsFor: 'system primitives' stamp: 'JMM 6/14/2005 17:50'!\rprimitiveGetUniqueSpellingTag\r\t\"Return Tag that identifies document/image\"\r\t| tag |\r\r\tself primitive: 'primitiveGetUniqueSpellingTag'.\r\ttag := self sqSpellingGetUniqueSpellingTag.\r\t^tag asOop: SmallInteger\r! !\r\r!SpellingPlugin methodsFor: 'system primitives' stamp: 'JMM 6/14/2005 17:50'!\rprimitiveSetIgnoredWordsListLength: length withTag: aTag\r\t\"data is? Tag that identifies document/image\"\r\r\tself primitive: 'primitiveSetIgnoredWordsListLength' parameters:#(SmallInteger SmallInteger).\r\tself sqSpellingSetIgnoredWordsListLength: length withTag: aTag! !\r\r!SpellingPlugin methodsFor: 'system primitives' stamp: 'JMM 6/14/2005 21:56'!\rprimitiveSetIgnoredWords: data withTag: aTag at: anIndex\r\t\"data is? Tag that identifies document/image\"\r\r\tself primitive: 'primitiveSetIgnoredWords' parameters:#(Oop SmallInteger SmallInteger).\r\tself sqSpellingSetIgnoredWord: (interpreterProxy firstIndexableField: data) withTag: aTag at: anIndex - 1 length: (interpreterProxy stSizeOf: data)/2\r! !\r\r!SpellingPlugin methodsFor: 'system primitives' stamp: 'JMM 6/14/2005 21:52'!\rprimitiveSetLanguage: data \r\t\"data is? \"\r\r\tself primitive: 'primitiveSetLanguage' parameters:#(Oop).\r\tself sqSpellingSetLanguage: (interpreterProxy firstIndexableField: data) length: (interpreterProxy stSizeOf: data)\r! !\r\r!SpellingPlugin methodsFor: 'system primitives' stamp: 'JMM 6/14/2005 21:55'!\rprimitiveSetNewIgnoredWord: data withTag: aTag\r\t\"data is? Tag that identifies document/image\"\r\r\tself primitive: 'primitiveSetNewIgnoredWord' parameters:#(Oop SmallInteger).\r\tself sqSpellingSetNewIgnoredWord: (interpreterProxy firstIndexableField: data) withTag: aTag length: (interpreterProxy stSizeOf: data)/2\r! !\r\r\r!SpellingPlugin class methodsFor: 'translation' stamp: 'JMM 6/14/2005 10:17'!\rhasHeaderFile\r\t\"If there is a single intrinsic header file to be associated with the plugin, here is where you want to flag\"\r\t^true! !\r\r!SpellingPlugin class methodsFor: 'translation' stamp: 'JMM 6/14/2005 10:17'!\rrequiresPlatformFiles\r\t\"this plugin requires platform specific files in order to work\"\r\t^true! !\r\r\r!SpellingPlugin class reorganize!\r('translation' hasHeaderFile requiresPlatformFiles)\r!\r\rSpellingPlugin removeSelector: #primitiveGetGuessesForWordLength:withTag:!\rSpellingPlugin removeSelector: #primitiveGetIgnoredWordListLengthWithTag:!\rSpellingPlugin removeSelector: #primitiveGetIgnoredWordListWithTag:!\rSpellingPlugin removeSelector: #primitiveGetIgnoredWordsListWithTag:at:!\rSpellingPlugin removeSelector: #primitiveGuessesForWord:withTag:!\rSpellingPlugin removeSelector: #primitiveLanguage:!\rSpellingPlugin removeSelector: #primitiveSetIgnoredWordsLength:forTag:!\rSpellingPlugin removeSelector: #primitiveSetIgnoredWords:withTag:!\rSpellingPlugin removeSelector: #primitiveSetIgnoredWord:withTag:!\rSpellingPlugin removeSelector: #primitiveSetIgnoredWord:withTag:at:!\r\r!SpellingPlugin reorganize!\r('initialize' initialiseModule moduleUnloaded:)\r('system primitives' primitiveCheckSpelling:startingAt: primitiveGetGuessesForWordListLength:withTag: primitiveGetGuessesForWordwithTag:at: primitiveGetIgnoredWordsListLengthWithTag: primitiveGetIgnoredWordWithTag:at: primitiveGetLanguage primitiveGetUniqueSpellingTag primitiveSetIgnoredWordsListLength:withTag: primitiveSetIgnoredWords:withTag:at: primitiveSetLanguage: primitiveSetNewIgnoredWord:withTag:)\r!\r\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SpellingPlugin/SpellCheck/Info-SpellCheck__Upgraded_.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>SpellCheck</string>\n\t<key>CFBundleIconFile</key>\n\t<string></string>\n\t<key>CFBundleIdentifier</key>\n\t<string></string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>0.0.2d1</string>\n\t<key>NSPrincipalClass</key>\n\t<string></string>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SpellingPlugin/SpellCheck/SpellCheck.m",
    "content": "/*\n\tFile:\t\tSpellCheck.m\n\t\n\tContains:\tThis project compiles as a Mach-O bundle from ProjectBuilder.  SpellCheck.m\n                contains wrappers to cocoa objective-c routines and exports the wrapper\n                functions as C.\n\n\tDisclaimer:\tIMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc.\n\t\t\t\t(\"Apple\") in consideration of your agreement to the following terms, and your\n\t\t\t\tuse, installation, modification or redistribution of this Apple software\n\t\t\t\tconstitutes acceptance of these terms.  If you do not agree with these terms,\n\t\t\t\tplease do not use, install, modify or redistribute this Apple software.\n\n\t\t\t\tIn consideration of your agreement to abide by the following terms, and subject\n\t\t\t\tto these terms, Apple grants you a personal, non-exclusive license, under Apples\n\t\t\t\tcopyrights in this original Apple software (the \"Apple Software\"), to use,\n\t\t\t\treproduce, modify and redistribute the Apple Software, with or without\n\t\t\t\tmodifications, in source and/or binary forms; provided that if you redistribute\n\t\t\t\tthe Apple Software in its entirety and without modifications, you must retain\n\t\t\t\tthis notice and the following text and disclaimers in all such redistributions of\n\t\t\t\tthe Apple Software.  Neither the name, trademarks, service marks or logos of\n\t\t\t\tApple Computer, Inc. may be used to endorse or promote products derived from the\n\t\t\t\tApple Software without specific prior written permission from Apple.  Except as\n\t\t\t\texpressly stated in this notice, no other rights or licenses, express or implied,\n\t\t\t\tare granted by Apple herein, including but not limited to any patent rights that\n\t\t\t\tmay be infringed by your derivative works or by other works in which the Apple\n\t\t\t\tSoftware may be incorporated.\n\n\t\t\t\tThe Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE MAKES NO\n\t\t\t\tWARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED\n\t\t\t\tWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n\t\t\t\tPURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN\n\t\t\t\tCOMBINATION WITH YOUR PRODUCTS.\n\n\t\t\t\tIN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR\n\t\t\t\tCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n\t\t\t\tGOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n\t\t\t\tARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION\n\t\t\t\tOF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT\n\t\t\t\t(INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN\n\t\t\t\tADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\tCopyright  2002 Apple Computer, Inc., All Rights Reserved\n*/\n#include <Carbon/Carbon.h>\n#include <Cocoa/Cocoa.h>\n\n#define\tDebugSpellCheck\t0\n\n\nstatic OSStatus LoadFrameworkBundle(CFStringRef framework, CFBundleRef *bundlePtr);\n\n/*\n\tNeeded to make sure the Cocoa framework has a chance to initialize things in a Carbon app.\n\t\n\tNSApplicationLoad() is an API introduced in 10.2 which is a startup function to call when\n\trunning Cocoa code from a Carbon application.\n\n\tBecause NSApplicationLoad() is not available pre 10.2, we load the function pointer through\n\tCFBundle.  If we encounter an error during this process, (i.e. it's not there), we fall back\n\tto calling NSApplication *NSApp=[NSApplication sharedApplication];\n\tThe fallback method does have bugs with regard to window activation seen when hiding and showing\n\tthe main application.\n*/\ntypedef BOOL (*NSApplicationLoadFuncPtr)( void );\n\nvoid\tInitializeCocoa()\n{\n\tCFBundleRef \t\t\t\tappKitBundleRef;\n\tNSApplicationLoadFuncPtr\tmyNSApplicationLoad;\n\tOSStatus\t\t\t\t\terr;\n\t\n\t//\tLoad the \"AppKit.framework\" bundl to locate NSApplicationLoad\n\terr = LoadFrameworkBundle( CFSTR(\"AppKit.framework\"), &appKitBundleRef );\n\tif (err != noErr) goto FallbackMethod;\n\t\n\t//\tManually load the Mach-O function pointers for the routines we will be using.\n\tmyNSApplicationLoad\t= (NSApplicationLoadFuncPtr) CFBundleGetFunctionPointerForName( appKitBundleRef, CFSTR(\"NSApplicationLoad\") );\n\tif ( myNSApplicationLoad == NULL ) goto FallbackMethod;\n\n\t(void) myNSApplicationLoad();\n\treturn;\n\nFallbackMethod:\n\t{\tNSApplication\t*NSApp=[NSApplication sharedApplication];\t}\n}\n\n/*\n\tReturns a guaranteed unique tag to use as the spell document tag for a document.\n\tYou should use this method to generate tags, if possible, to avoid collisions\n\twith other objects that can be spell checked.\n*/\nint\tUniqueSpellDocumentTag()\n{\n    int\t\t\t\t\ttag;\n    \n\tNSAutoreleasePool* pool\t= [[NSAutoreleasePool alloc] init];\n    \n    tag\t\t=[NSSpellChecker uniqueSpellDocumentTag];\n    \n    [pool release];\n    \n    return( tag );\n}\n\n/*\t\n\tWhen a document closes, it should notify the NSSpellChecker via closeSpellDocumentWithTag:\n\tso that its ignored word list gets cleaned up.\n*/\nvoid\tCloseSpellDocumentWithTag( int tag )\n{\n\tNSAutoreleasePool* pool\t= [[NSAutoreleasePool alloc] init];\n    \n    [[NSSpellChecker sharedSpellChecker] closeSpellDocumentWithTag:tag];\n    \n    [pool release];\n}\n\n\n/*\n\tInitiates a spell-check of a string.  Returns the range of the first misspelled\n\tword (and optionally the wordCount by reference).\n*/\nCFRange\tCheckSpellingOfString( CFStringRef stringToCheck, int startingOffset )\n{\n    NSRange\t\trange\t= {0,0};\n\n\tNSAutoreleasePool* pool\t= [[NSAutoreleasePool alloc] init];\n\n    range\t\t=[[NSSpellChecker sharedSpellChecker] checkSpellingOfString:(NSString *)stringToCheck startingAt:startingOffset];\n\n#if( DebugSpellCheck )    \n    NSLog( @\"%u is the location\", range.location );\n    NSLog( @\"%u is the length\", range.length );\n#endif    \n\n    [pool release];\n\n    return( *(CFRange*)&range );\n}\n\n/*\t\n\tInitiates a spell-check of a string.  Returns the range of the first misspelled\n\tword (and optionally the wordCount by reference).\n*/\nCFRange\tCheckSpellingOfStringWithOptions(\tCFStringRef stringToCheck,\t// the string whose spelling we wish to check\n\t\t\t\t\t\t\t\t\t\t\tint startingOffset,\t\t\t// 0-based offset in stringToCheck at which checking starts\n\t\t\t\t\t\t\t\t\t\t\tCFStringRef language,\t\t// pass an empty string CFSTR(\"\") to use the default language\n\t\t\t\t\t\t\t\t\t\t\tBoolean wrapFlag,\t\t\t// if true, checking will wrap round to the start of stringToCheck\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// if false, checdking will stop at the end of stringToCheck\n\t\t\t\t\t\t\t\t\t\t\tint tag,\t\t\t\t\t// tag indicating a list of words to be ignored\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// use UniqueSpellDocumentTag to get a new tag\n\t\t\t\t\t\t\t\t\t\t\tint wordCount \n\t\t\t\t\t\t\t\t\t\t)\n{\n    NSRange\t\trange\t= {0,0};\n\n\tNSAutoreleasePool* pool\t= [[NSAutoreleasePool alloc] init];\n\n\trange\t\t=[[NSSpellChecker sharedSpellChecker] checkSpellingOfString:(NSString *)stringToCheck startingAt:startingOffset language:(NSString *)language wrap:(BOOL)wrapFlag inSpellDocumentWithTag:tag wordCount:&wordCount];\n\n    [pool release];\n\n    return( *(CFRange*)&range );\t//\tIf there are no misspellings then it will get a length of zero\n}\n\n/*\n\tAdd inWord to the list of words to be ignored when using CheckSpellingOfString with tag\n\tThis method should be called from the client's implementation of -ignoreSpelling:\n*/\nvoid\tIgnoreWord( CFStringRef wordToIgnore, int tag )\n{\n\tNSAutoreleasePool* pool\t= [[NSAutoreleasePool alloc] init];\n\n    [[NSSpellChecker sharedSpellChecker] ignoreWord:(NSString *)wordToIgnore inSpellDocumentWithTag:tag];\n\n    [pool release];\n}\n\n/*\n\tSet the list of ignored words for tag, replacing any existing list\n*/\nvoid\tSetIgnoredWords( CFArrayRef inWords, int tag )\n{\n\tNSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];\n    \n    [[NSSpellChecker sharedSpellChecker] setIgnoredWords:(NSArray*)inWords inSpellDocumentWithTag:tag];\n    \n    [pool release];\n}\n\n/*\n\tGet the list of ignored words for tag\n\tCaller must release the result with CFRelease\n*/\nCFArrayRef\tCopyIgnoredWordsInSpellDocumentWithTag( int tag )\n{\n    NSArray\t\t\t\t*array;\n\n\tNSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; // to keep memory requirements down\n    \n    array\t= [[[NSSpellChecker sharedSpellChecker] ignoredWordsInSpellDocumentWithTag:tag] retain];\n    \n    [pool release];\n    \n    return( (CFArrayRef)array );\n}\n\n/*\n\tGet a list of guesses for a misspelled words\n\tCaller must release the result with CFRelease\n*/\nCFArrayRef\tGuessesForWord( CFStringRef word )\n{\n    NSArray\t\t\t\t*array;\n\n\tNSAutoreleasePool* pool\t= [[NSAutoreleasePool alloc] init];\n\n    array\t= [[[NSSpellChecker sharedSpellChecker] guessesForWord:(NSString *)word] retain];\n\n    [pool release];\n\n    return( (CFArrayRef)array );\n}\n\n\n\n\nstatic OSStatus LoadFrameworkBundle(CFStringRef framework, CFBundleRef *bundlePtr)\n{\n\tOSStatus \terr;\n\tFSRef \t\tframeworksFolderRef;\n\tCFURLRef\tbaseURL;\n\tCFURLRef\tbundleURL;\n\t\n\tif ( bundlePtr == nil )\treturn( -1 );\n\t\n\t*bundlePtr = nil;\n\t\n\tbaseURL = nil;\n\tbundleURL = nil;\n\t\n\terr = FSFindFolder(kOnAppropriateDisk, kFrameworksFolderType, true, &frameworksFolderRef);\n\tif (err == noErr) {\n\t\tbaseURL = CFURLCreateFromFSRef(kCFAllocatorSystemDefault, &frameworksFolderRef);\n\t\tif (baseURL == nil) {\n\t\t\terr = coreFoundationUnknownErr;\n\t\t}\n\t}\n\tif (err == noErr) {\n\t\tbundleURL = CFURLCreateCopyAppendingPathComponent(kCFAllocatorSystemDefault, baseURL, framework, false);\n\t\tif (bundleURL == nil) {\n\t\t\terr = coreFoundationUnknownErr;\n\t\t}\n\t}\n\tif (err == noErr) {\n\t\t*bundlePtr = CFBundleCreate(kCFAllocatorSystemDefault, bundleURL);\n\t\tif (*bundlePtr == nil) {\n\t\t\terr = coreFoundationUnknownErr;\n\t\t}\n\t}\n\tif (err == noErr) {\n\t    if ( ! CFBundleLoadExecutable( *bundlePtr ) ) {\n\t\t\terr = coreFoundationUnknownErr;\n\t    }\n\t}\n\n\t// Clean up.\n\tif (err != noErr && *bundlePtr != nil) {\n\t\tCFRelease(*bundlePtr);\n\t\t*bundlePtr = nil;\n\t}\n\tif (bundleURL != nil) {\n\t\tCFRelease(bundleURL);\n\t}\t\n\tif (baseURL != nil) {\n\t\tCFRelease(baseURL);\n\t}\t\n\t\n\treturn err;\n}\n\nCFStringRef\tlanguage()\n{\n    CFStringRef\tlang;\n    \n\tNSAutoreleasePool* pool\t= [[NSAutoreleasePool alloc] init];\n    \n    lang\t\t=(CFStringRef) [[NSSpellChecker sharedSpellChecker] language];\n    \n    [pool release];\n    \n    return( lang );\n}\n\nCFStringRef\tsetLanguage(CFStringRef lang)\n{\n    \n\tNSAutoreleasePool* pool\t= [[NSAutoreleasePool alloc] init];\n    \n    [[NSSpellChecker sharedSpellChecker] setLanguage: (NSString *)lang];\n    \n    [pool release];\n    \n    return;\n}\n\n\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SpellingPlugin/SpellCheck/SpellCheck.pbproj/apple.pbxuser",
    "content": "// !$*UTF8*$!\n{\n\t089C1669FE841209C02AAC07 = {\n\t\tactiveBuildStyle = 014CEA420018CDE011CA2923;\n\t\tactiveTarget = 089C1673FE841209C02AAC07;\n\t\tperUserDictionary = {\n\t\t\tPBXWorkspaceConfiguration = {\n\t\t\t\tContentSize = \"{970, 838}\";\n\t\t\t\tLeftSlideOut = {\n\t\t\t\t\tActiveTab = 0;\n\t\t\t\t\tFrame = \"{{0, 23}, {970, 815}}\";\n\t\t\t\t\tSplit0 = {\n\t\t\t\t\t\tActiveTab = 2;\n\t\t\t\t\t\tFrame = \"{{224, 0}, {746, 815}}\";\n\t\t\t\t\t\tSplit0 = {\n\t\t\t\t\t\t\tFrame = \"{{0, 216}, {746, 599}}\";\n\t\t\t\t\t\t};\n\t\t\t\t\t\tSplitCount = 1;\n\t\t\t\t\t\tTab0 = {\n\t\t\t\t\t\t\tDebugger = {\n\t\t\t\t\t\t\t\tFrame = \"{{0, 0}, {484, 208}}\";\n\t\t\t\t\t\t\t\tSplit0 = {\n\t\t\t\t\t\t\t\t\tFrame = \"{{0, 24}, {484, 184}}\";\n\t\t\t\t\t\t\t\t\tSplit0 = {\n\t\t\t\t\t\t\t\t\t\tFrame = \"{{0, 0}, {236, 184}}\";\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\tSplit1 = {\n\t\t\t\t\t\t\t\t\t\tFrame = \"{{245, 0}, {239, 184}}\";\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\tSplitCount = 2;\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\tSplitCount = 1;\n\t\t\t\t\t\t\t\tTab0 = {\n\t\t\t\t\t\t\t\t\tFrame = \"{{0, 0}, {100, 50}}\";\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\tTab1 = {\n\t\t\t\t\t\t\t\t\tFrame = \"{{0, 0}, {100, 50}}\";\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\tTabCount = 2;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tFrame = \"{{0, 0}, {484, 208}}\";\n\t\t\t\t\t\t\tLauncherConfigVersion = 4;\n\t\t\t\t\t\t};\n\t\t\t\t\t\tTab1 = {\n\t\t\t\t\t\t\tFrame = \"{{0, 0}, {484, 208}}\";\n\t\t\t\t\t\t\tLauncherConfigVersion = 3;\n\t\t\t\t\t\t\tRunner = {\n\t\t\t\t\t\t\t\tFrame = \"{{0, 0}, {484, 208}}\";\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t};\n\t\t\t\t\t\tTab2 = {\n\t\t\t\t\t\t\tBuildMessageFrame = \"{{0, 0}, {748, 137}}\";\n\t\t\t\t\t\t\tBuildTranscriptFrame = \"{{0, 146}, {748, 48}}\";\n\t\t\t\t\t\t\tFrame = \"{{0, 0}, {746, 192}}\";\n\t\t\t\t\t\t};\n\t\t\t\t\t\tTab3 = {\n\t\t\t\t\t\t\tFrame = \"{{0, 0}, {673, 295}}\";\n\t\t\t\t\t\t};\n\t\t\t\t\t\tTabCount = 4;\n\t\t\t\t\t};\n\t\t\t\t\tSplitCount = 1;\n\t\t\t\t\tTab0 = {\n\t\t\t\t\t\tFrame = \"{{0, 0}, {200, 815}}\";\n\t\t\t\t\t};\n\t\t\t\t\tTab1 = {\n\t\t\t\t\t\tClassesFrame = \"{{0, 0}, {202, 56}}\";\n\t\t\t\t\t\tFrame = \"{{0, 0}, {200, 100}}\";\n\t\t\t\t\t\tMembersFrame = \"{{0, 65}, {202, 35}}\";\n\t\t\t\t\t\tOptionsSetName = \"Hierarchy, all classes\";\n\t\t\t\t\t};\n\t\t\t\t\tTab2 = {\n\t\t\t\t\t\tFrame = \"{{0, 0}, {200, 100}}\";\n\t\t\t\t\t};\n\t\t\t\t\tTab3 = {\n\t\t\t\t\t\tFrame = \"{{0, 0}, {200, 100}}\";\n\t\t\t\t\t\tSplit0 = {\n\t\t\t\t\t\t\tFrame = \"{{0, 0}, {200, 45}}\";\n\t\t\t\t\t\t};\n\t\t\t\t\t\tSplit1 = {\n\t\t\t\t\t\t\tFrame = \"{{0, 54}, {200, 46}}\";\n\t\t\t\t\t\t};\n\t\t\t\t\t\tSplitCount = 2;\n\t\t\t\t\t};\n\t\t\t\t\tTab4 = {\n\t\t\t\t\t\tFrame = \"{{0, 0}, {250, 100}}\";\n\t\t\t\t\t};\n\t\t\t\t\tTabCount = 5;\n\t\t\t\t};\n\t\t\t\tWindowLocation = \"{47, 86}\";\n\t\t\t};\n\t\t};\n\t\twantsIndex = 1;\n\t\twantsSCM = -1;\n\t};\n\t089C1673FE841209C02AAC07 = {\n\t\tactiveExec = 0;\n\t};\n\tF54FE585025A713E01CB15F0 = {\n\t\tuiCtxt = {\n\t\t\tsepNavWindowFrame = \"{{136, 164}, {1054, 829}}\";\n\t\t};\n\t};\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SpellingPlugin/SpellCheck/SpellCheck.pbproj/deric.pbxuser",
    "content": "// !$*UTF8*$!\n{\n\t089C1669FE841209C02AAC07 = {\n\t\tactiveBuildStyle = 014CEA420018CDE011CA2923;\n\t\tactiveTarget = 089C1673FE841209C02AAC07;\n\t\taddToTargets = (\n\t\t\t089C1673FE841209C02AAC07,\n\t\t);\n\t\tperUserDictionary = {\n\t\t\tPBXWorkspaceConfiguration = {\n\t\t\t\tContentSize = \"{877, 600}\";\n\t\t\t\tLeftSlideOut = {\n\t\t\t\t\tActiveTab = 3;\n\t\t\t\t\tFrame = \"{{0, 23}, {877, 577}}\";\n\t\t\t\t\tSplit0 = {\n\t\t\t\t\t\tActiveTab = 2;\n\t\t\t\t\t\tFrame = \"{{224, 0}, {653, 577}}\";\n\t\t\t\t\t\tSplit0 = {\n\t\t\t\t\t\t\tFrame = \"{{0, 216}, {653, 361}}\";\n\t\t\t\t\t\t};\n\t\t\t\t\t\tSplitCount = 1;\n\t\t\t\t\t\tTab0 = {\n\t\t\t\t\t\t\tDebugger = {\n\t\t\t\t\t\t\t\tFrame = \"{{0, 0}, {484, 208}}\";\n\t\t\t\t\t\t\t\tSplit0 = {\n\t\t\t\t\t\t\t\t\tFrame = \"{{0, 24}, {484, 184}}\";\n\t\t\t\t\t\t\t\t\tSplit0 = {\n\t\t\t\t\t\t\t\t\t\tFrame = \"{{0, 0}, {236, 184}}\";\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\tSplit1 = {\n\t\t\t\t\t\t\t\t\t\tFrame = \"{{245, 0}, {239, 184}}\";\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\tSplitCount = 2;\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\tSplitCount = 1;\n\t\t\t\t\t\t\t\tTab0 = {\n\t\t\t\t\t\t\t\t\tFrame = \"{{0, 0}, {100, 50}}\";\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\tTab1 = {\n\t\t\t\t\t\t\t\t\tFrame = \"{{0, 0}, {100, 50}}\";\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\tTabCount = 2;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tFrame = \"{{0, 0}, {484, 208}}\";\n\t\t\t\t\t\t\tLauncherConfigVersion = 4;\n\t\t\t\t\t\t};\n\t\t\t\t\t\tTab1 = {\n\t\t\t\t\t\t\tFrame = \"{{0, 0}, {484, 208}}\";\n\t\t\t\t\t\t\tLauncherConfigVersion = 3;\n\t\t\t\t\t\t\tRunner = {\n\t\t\t\t\t\t\t\tFrame = \"{{0, 0}, {484, 208}}\";\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t};\n\t\t\t\t\t\tTab2 = {\n\t\t\t\t\t\t\tBuildMessageFrame = \"{{0, 0}, {655, 137}}\";\n\t\t\t\t\t\t\tBuildTranscriptFrame = \"{{0, 146}, {655, 48}}\";\n\t\t\t\t\t\t\tFrame = \"{{0, 0}, {653, 192}}\";\n\t\t\t\t\t\t};\n\t\t\t\t\t\tTab3 = {\n\t\t\t\t\t\t\tFrame = \"{{0, 0}, {612, 295}}\";\n\t\t\t\t\t\t};\n\t\t\t\t\t\tTabCount = 4;\n\t\t\t\t\t};\n\t\t\t\t\tSplitCount = 1;\n\t\t\t\t\tTab0 = {\n\t\t\t\t\t\tFrame = \"{{0, 0}, {200, 577}}\";\n\t\t\t\t\t};\n\t\t\t\t\tTab1 = {\n\t\t\t\t\t\tClassesFrame = \"{{0, 0}, {202, 56}}\";\n\t\t\t\t\t\tFrame = \"{{0, 0}, {200, 100}}\";\n\t\t\t\t\t\tMembersFrame = \"{{0, 65}, {202, 35}}\";\n\t\t\t\t\t\tOptionsSetName = \"Hierarchy, all classes\";\n\t\t\t\t\t};\n\t\t\t\t\tTab2 = {\n\t\t\t\t\t\tFrame = \"{{0, 0}, {200, 100}}\";\n\t\t\t\t\t};\n\t\t\t\t\tTab3 = {\n\t\t\t\t\t\tFrame = \"{{0, 0}, {200, 577}}\";\n\t\t\t\t\t\tSplit0 = {\n\t\t\t\t\t\t\tFrame = \"{{0, 0}, {200, 280}}\";\n\t\t\t\t\t\t};\n\t\t\t\t\t\tSplit1 = {\n\t\t\t\t\t\t\tFrame = \"{{0, 289}, {200, 288}}\";\n\t\t\t\t\t\t};\n\t\t\t\t\t\tSplitCount = 2;\n\t\t\t\t\t};\n\t\t\t\t\tTab4 = {\n\t\t\t\t\t\tFrame = \"{{0, 0}, {250, 100}}\";\n\t\t\t\t\t};\n\t\t\t\t\tTabCount = 5;\n\t\t\t\t};\n\t\t\t\tWindowLocation = \"{15, 65}\";\n\t\t\t};\n\t\t};\n\t\twantsIndex = 1;\n\t\twantsSCM = -1;\n\t};\n\t089C1673FE841209C02AAC07 = {\n\t\tactiveExec = 0;\n\t};\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SpellingPlugin/SpellCheck/SpellCheck.pbproj/johnmci.mode1",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>ActivePerspectiveName</key>\n\t<string>Project</string>\n\t<key>AllowedModules</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Groups and Files Outline View</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCTaskListModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Task List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDetailModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>File and Smart Group Detail Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Detailed Build Results Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Batch Find Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Run Log</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXCVSModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Source Code Control Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Breakpoints Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDockableInspector</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Inspector</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXOpenQuicklyModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Open Quickly Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Console</string>\n\t\t</dict>\n\t</array>\n\t<key>Description</key>\n\t<string>DefaultDescriptionKey</string>\n\t<key>DockingSystemVisible</key>\n\t<false/>\n\t<key>Extension</key>\n\t<string>mode1</string>\n\t<key>FavBarConfig</key>\n\t<dict>\n\t\t<key>PBXProjectModuleGUID</key>\n\t\t<string>9465F90308611134006CDE9D</string>\n\t\t<key>XCBarModuleItemNames</key>\n\t\t<dict/>\n\t\t<key>XCBarModuleItems</key>\n\t\t<array/>\n\t</dict>\n\t<key>FirstTimeWindowDisplayed</key>\n\t<false/>\n\t<key>Identifier</key>\n\t<string>com.apple.perspectives.project.mode1</string>\n\t<key>MajorVersion</key>\n\t<integer>31</integer>\n\t<key>MinorVersion</key>\n\t<integer>1</integer>\n\t<key>Name</key>\n\t<string>Default</string>\n\t<key>Notifications</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>XCObserverAutoDisconnectKey</key>\n\t\t\t<true/>\n\t\t\t<key>XCObserverDefintionKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusErrorsKey</key>\n\t\t\t\t<integer>0</integer>\n\t\t\t</dict>\n\t\t\t<key>XCObserverFactoryKey</key>\n\t\t\t<string>XCPerspectivesSpecificationIdentifier</string>\n\t\t\t<key>XCObserverGUIDKey</key>\n\t\t\t<string>XCObserverProjectIdentifier</string>\n\t\t\t<key>XCObserverNotificationKey</key>\n\t\t\t<string>PBXStatusBuildStateMessageNotification</string>\n\t\t\t<key>XCObserverTargetKey</key>\n\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t<key>XCObserverTriggerKey</key>\n\t\t\t<string>awakenModuleWithObserver:</string>\n\t\t\t<key>XCObserverValidationKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusErrorsKey</key>\n\t\t\t\t<integer>2</integer>\n\t\t\t</dict>\n\t\t</dict>\n\t</array>\n\t<key>OpenEditors</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>Content</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t<string>9465F90408611134006CDE9D</string>\n\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t<string>SpellCheck.m</string>\n\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>9465F90508611134006CDE9D</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>SpellCheck.m</string>\n\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t<string>9465F90608611134006CDE9D</string>\n\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>9465F7F10860E43B006CDE9D</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t<string>1</string>\n\t\t\t\t</dict>\n\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t<true/>\n\t\t\t</dict>\n\t\t\t<key>Geometry</key>\n\t\t\t<dict>\n\t\t\t\t<key>Frame</key>\n\t\t\t\t<string>{{0, 20}, {962, 622}}</string>\n\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t<false/>\n\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t<string>15 210 962 663 0 0 1440 878 </string>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Content</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t<string>9465F90708611134006CDE9D</string>\n\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t<string>NSSpellChecker.h</string>\n\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>9465F90808611134006CDE9D</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>NSSpellChecker.h</string>\n\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t<string>9465F90A08611134006CDE9D</string>\n\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>9465F90908611134006CDE9D</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t<string>1</string>\n\t\t\t\t</dict>\n\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t<true/>\n\t\t\t</dict>\n\t\t\t<key>Geometry</key>\n\t\t\t<dict>\n\t\t\t\t<key>Frame</key>\n\t\t\t\t<string>{{0, 20}, {962, 622}}</string>\n\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t<false/>\n\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t<string>38 189 962 663 0 0 1440 878 </string>\n\t\t\t</dict>\n\t\t</dict>\n\t</array>\n\t<key>PerspectiveWidths</key>\n\t<array>\n\t\t<integer>-1</integer>\n\t\t<integer>-1</integer>\n\t</array>\n\t<key>Perspectives</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>ChosenToolbarItems</key>\n\t\t\t<array>\n\t\t\t\t<string>active-target-popup</string>\n\t\t\t\t<string>active-buildstyle-popup</string>\n\t\t\t\t<string>action</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>buildOrClean</string>\n\t\t\t\t<string>build-and-runOrDebug</string>\n\t\t\t\t<string>com.apple.ide.PBXToolbarStopButton</string>\n\t\t\t\t<string>get-info</string>\n\t\t\t\t<string>toggle-editor</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>com.apple.pbx.toolbar.searchfield</string>\n\t\t\t</array>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProjectWithEditor</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.project</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>089C166AFE841209C02AAC07</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 338}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 356}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>224 400 690 397 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>203pt</string>\n\t\t\t\t</dict>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>MyNewFile14.java</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CE0B20406471E060097A5F4</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>MyNewFile14.java</string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {482, 0}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>224 400 690 397 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>0pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 5}, {482, 351}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>224 400 690 397 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>351pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>482pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>9465F90108611134006CDE9D</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>9465F90208611134006CDE9D</string>\n\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProject</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.morph</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>29B97314FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 337}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 355}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>373 269 690 397 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Morph</string>\n\t\t\t<key>PreferredWidth</key>\n\t\t\t<integer>300</integer>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default.short</string>\n\t\t</dict>\n\t</array>\n\t<key>PerspectivesBarVisible</key>\n\t<false/>\n\t<key>ShelfIsVisible</key>\n\t<false/>\n\t<key>SourceDescription</key>\n\t<string>file at '/System/Library/PrivateFrameworks/DevToolsInterface.framework/Versions/A/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string>\n\t<key>StatusbarIsVisible</key>\n\t<true/>\n\t<key>TimeStamp</key>\n\t<real>140567609.54204601</real>\n\t<key>ToolbarDisplayMode</key>\n\t<integer>1</integer>\n\t<key>ToolbarIsVisible</key>\n\t<true/>\n\t<key>ToolbarSizeMode</key>\n\t<integer>2</integer>\n\t<key>Type</key>\n\t<string>Perspectives</string>\n\t<key>UpdateMessage</key>\n\t<string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the \"Metro-Morph\" feature).  You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature.  Do you wish to update to the latest Workspace defaults for project '%@'?</string>\n\t<key>WindowJustification</key>\n\t<integer>5</integer>\n\t<key>WindowOrderList</key>\n\t<array>\n\t\t<string>9465F90708611134006CDE9D</string>\n\t\t<string>9465F90408611134006CDE9D</string>\n\t\t<string>/Users/johnmci/Documents/SqueakSpellingPlugin/SpellCheck/SpellCheck.pbproj</string>\n\t</array>\n\t<key>WindowString</key>\n\t<string>224 400 690 397 0 0 1440 878 </string>\n\t<key>WindowTools</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.build</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CD052900623707200166675</string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {500, 215}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>192 257 500 500 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>218pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Build</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 222}, {500, 236}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>192 257 500 500 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>236pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>458pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Build Results</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAA5065D492600B07095</string>\n\t\t\t\t<string>1C78EAA6065D492600B07095</string>\n\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.build</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>192 257 500 500 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugger</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Debugger</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {317, 164}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{317, 0}, {377, 164}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {694, 164}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 164}, {694, 216}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debug - GLUTExamples (Underwater)</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>DebugConsoleDrawerSize</key>\n\t\t\t\t\t\t\t\t<string>{100, 120}</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleVisible</key>\n\t\t\t\t\t\t\t\t<string>None</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>DebugSTDIOWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {694, 380}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>321 238 694 422 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t\t<string>1C0AD2AB069F1E9B00FABCE6</string>\n\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t<string>1C0AD2AC069F1E9B00FABCE6</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debug</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>321 238 694 422 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.find</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t\t\t<string>1CD0528D0623707200166675</string>\n\t\t\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {781, 167}}</string>\n\t\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t\t<string>62 385 781 470 0 0 1440 878 </string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t\t\t<string>781pt</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>50%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Project Find</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{8, 0}, {773, 254}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>62 385 781 470 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>50%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>428pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Find</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t\t<string>1C530D58069F1CE1000CFCEE</string>\n\t\t\t\t<string>1C530D59069F1CE1000CFCEE</string>\n\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t<string>1C530D5A069F1CE1000CFCEE</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>62 385 781 470 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>MENUSEPARATOR</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debuggerConsole</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debugger Console</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {440, 358}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>650 41 440 400 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>358pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>358pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger Console</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t\t<string>1C78EAAE065D492600B07095</string>\n\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>650 41 440 400 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.run</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>3</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528B0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Run</string>\n\t\t\t\t\t\t\t\t<key>Runner</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {493, 167}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 176}, {493, 267}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {405, 443}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{414, 0}, {514, 443}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {460, 159}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>316 696 459 200 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>159pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>159pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Run Log</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2B3069F1EA900FABCE6</string>\n\t\t\t\t<string>1C0AD2B4069F1EA900FABCE6</string>\n\t\t\t\t<string>1CD0528B0623707200166675</string>\n\t\t\t\t<string>1C0AD2B5069F1EA900FABCE6</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.run</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>316 696 459 200 0 0 1280 1002 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2B3069F1EA900FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.scm</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1C78EAB3065D492600B07095</string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>0pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>SCM</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ConsoleFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 259}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 7}, {452, 259}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t\t<key>TableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>Status</string>\n\t\t\t\t\t\t\t\t\t<real>30</real>\n\t\t\t\t\t\t\t\t\t<string>FileName</string>\n\t\t\t\t\t\t\t\t\t<real>199</real>\n\t\t\t\t\t\t\t\t\t<string>Path</string>\n\t\t\t\t\t\t\t\t\t<real>197.09500122070312</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>TableFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 250}}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>262pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>266pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>SCM</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAB4065D492600B07095</string>\n\t\t\t\t<string>1C78EAB5065D492600B07095</string>\n\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.scm</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.breakpoints</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD052930623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Breakpoints</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>BreakpointsTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>enabledColumn</string>\n\t\t\t\t\t\t\t\t\t<real>16</real>\n\t\t\t\t\t\t\t\t\t<string>breakpointColumn</string>\n\t\t\t\t\t\t\t\t\t<real>201.5830078125</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {240, 195}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>342 421 240 216 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>195pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>195pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Breakpoints</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2AD069F1E9B00FABCE6</string>\n\t\t\t\t<string>1C0AD2AE069F1E9B00FABCE6</string>\n\t\t\t\t<string>1CD052930623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>342 421 240 216 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2AD069F1E9B00FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.bookmarks</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>538 42 401 187 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.classBrowser</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>OptionsSetName</key>\n\t\t\t\t\t\t\t\t<string>Hierarchy, all classes</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Class Browser - NSObject</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ClassesFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {374, 96}}</string>\n\t\t\t\t\t\t\t\t<key>ClassesTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXClassNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>208</real>\n\t\t\t\t\t\t\t\t\t<string>PBXClassBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {630, 331}}</string>\n\t\t\t\t\t\t\t\t<key>MembersFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 105}, {374, 395}}</string>\n\t\t\t\t\t\t\t\t<key>MembersTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeIconColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>216</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>97</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>332pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>332pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t\t<string>1C0AD2B0069F1E9B00FABCE6</string>\n\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.classbrowser</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SpellingPlugin/SpellCheck/SpellCheck.pbproj/johnmci.pbxuser",
    "content": "// !$*UTF8*$!\n{\n\t089C1669FE841209C02AAC07 = {\n\t\tactiveBuildStyle = 014CEA430018CDE011CA2923;\n\t\tactiveTarget = 089C1673FE841209C02AAC07;\n\t\tcodeSenseManager = 944D643A085FBA3400600D6E;\n\t\tperUserDictionary = {\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t243,\n\t\t\t\t\t20,\n\t\t\t\t\t48.1626,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t\t20,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Target_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXPerProjectTemplateStateSaveDate = 140567609;\n\t\t\tPBXWorkspaceStateSaveDate = 140567609;\n\t\t};\n\t\tperUserProjectItems = {\n\t\t\t9465F7F10860E43B006CDE9D = 9465F7F10860E43B006CDE9D;\n\t\t\t9465F90608611134006CDE9D = 9465F90608611134006CDE9D;\n\t\t\t9465F90908611134006CDE9D = 9465F90908611134006CDE9D;\n\t\t\t9465F90A08611134006CDE9D = 9465F90A08611134006CDE9D;\n\t\t};\n\t\tsourceControlManager = 944D6439085FBA3400600D6E;\n\t\tuserBuildSettings = {\n\t\t};\n\t};\n\t089C1673FE841209C02AAC07 = {\n\t\tactiveExec = 0;\n\t};\n\t944D6439085FBA3400600D6E = {\n\t\tfallbackIsa = XCSourceControlManager;\n\t\tisSCMEnabled = 0;\n\t\tisa = PBXSourceControlManager;\n\t\tscmConfiguration = {\n\t\t};\n\t\tscmType = \"\";\n\t};\n\t944D643A085FBA3400600D6E = {\n\t\tindexTemplatePath = \"\";\n\t\tisa = PBXCodeSenseManager;\n\t};\n\t9465F7F10860E43B006CDE9D = {\n\t\tfRef = F54FE585025A713E01CB15F0;\n\t\tisa = PBXBookmark;\n\t};\n\t9465F81A0860ECEE006CDE9D = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSSpellChecker.h;\n\t\tpath = /System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSSpellChecker.h;\n\t\trefType = 0;\n\t\tsourceTree = \"<absolute>\";\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {2744, 1456}}\";\n\t\t\tsepNavSelRange = \"{2647, 21}\";\n\t\t\tsepNavVisRect = \"{{0, 608}, {923, 590}}\";\n\t\t\tsepNavWindowFrame = \"{{38, 133}, {962, 719}}\";\n\t\t};\n\t};\n\t9465F90608611134006CDE9D = {\n\t\tfRef = F54FE585025A713E01CB15F0;\n\t\tisa = PBXTextBookmark;\n\t\tname = CheckSpellingOfStringWithOptions;\n\t\trLen = 32;\n\t\trLoc = 5826;\n\t\trType = 0;\n\t\tvrLen = 1766;\n\t\tvrLoc = 5764;\n\t};\n\t9465F90908611134006CDE9D = {\n\t\tfRef = 9465F81A0860ECEE006CDE9D;\n\t\tisa = PBXTextBookmark;\n\t\trLen = 1;\n\t\trLoc = 64;\n\t\trType = 1;\n\t};\n\t9465F90A08611134006CDE9D = {\n\t\tfRef = 9465F81A0860ECEE006CDE9D;\n\t\tisa = PBXTextBookmark;\n\t\tname = checkSpellingOfString;\n\t\trLen = 21;\n\t\trLoc = 2647;\n\t\trType = 0;\n\t\tvrLen = 2163;\n\t\tvrLoc = 1686;\n\t};\n\tF54FE585025A713E01CB15F0 = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1382, 4340}}\";\n\t\t\tsepNavSelRange = \"{5826, 32}\";\n\t\t\tsepNavVisRect = \"{{0, 2014}, {923, 590}}\";\n\t\t\tsepNavWindowFrame = \"{{15, 154}, {962, 719}}\";\n\t\t};\n\t};\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SpellingPlugin/SpellCheck/SpellCheck.pbproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 39;\n\tobjects = {\n\t\t014CEA410018CDE011CA2923 = {\n\t\t\texplicitFileType = wrapper.cfbundle;\n\t\t\tisa = PBXFileReference;\n\t\t\tpath = SpellCheck.bundle;\n\t\t\trefType = 3;\n\t\t\tsourceTree = BUILT_PRODUCTS_DIR;\n\t\t};\n\t\t014CEA420018CDE011CA2923 = {\n\t\t\tbuildSettings = {\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_ENABLE_FIX_AND_CONTINUE = YES;\n\t\t\t\tGCC_GENERATE_DEBUGGING_SYMBOLS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tOPTIMIZATION_CFLAGS = \"-O0\";\n\t\t\t\tZERO_LINK = YES;\n\t\t\t};\n\t\t\tisa = PBXBuildStyle;\n\t\t\tname = Development;\n\t\t};\n\t\t014CEA430018CDE011CA2923 = {\n\t\t\tbuildSettings = {\n\t\t\t\tCOPY_PHASE_STRIP = YES;\n\t\t\t\tGCC_ENABLE_FIX_AND_CONTINUE = NO;\n\t\t\t\tZERO_LINK = NO;\n\t\t\t};\n\t\t\tisa = PBXBuildStyle;\n\t\t\tname = Deployment;\n\t\t};\n//010\n//011\n//012\n//013\n//014\n//080\n//081\n//082\n//083\n//084\n\t\t089C1669FE841209C02AAC07 = {\n\t\t\tbuildSettings = {\n\t\t\t};\n\t\t\tbuildStyles = (\n\t\t\t\t014CEA420018CDE011CA2923,\n\t\t\t\t014CEA430018CDE011CA2923,\n\t\t\t);\n\t\t\thasScannedForEncodings = 0;\n\t\t\tisa = PBXProject;\n\t\t\tmainGroup = 089C166AFE841209C02AAC07;\n\t\t\tprojectDirPath = \"\";\n\t\t\ttargets = (\n\t\t\t\t089C1673FE841209C02AAC07,\n\t\t\t);\n\t\t};\n\t\t089C166AFE841209C02AAC07 = {\n\t\t\tchildren = (\n\t\t\t\t08FB77AFFE84173DC02AAC07,\n\t\t\t\t089C167CFE841241C02AAC07,\n\t\t\t\t089C1671FE841209C02AAC07,\n\t\t\t\t19C28FB8FE9D52D311CA2CBB,\n\t\t\t);\n\t\t\tisa = PBXGroup;\n\t\t\tname = SpellCheck;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t089C1671FE841209C02AAC07 = {\n\t\t\tchildren = (\n\t\t\t\t1058C7ACFEA557BF11CA2CBB,\n\t\t\t\t1058C7AEFEA557BF11CA2CBB,\n\t\t\t);\n\t\t\tisa = PBXGroup;\n\t\t\tname = \"Frameworks and Libraries\";\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t089C1672FE841209C02AAC07 = {\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = wrapper.framework;\n\t\t\tname = Foundation.framework;\n\t\t\tpath = /System/Library/Frameworks/Foundation.framework;\n\t\t\trefType = 0;\n\t\t\tsourceTree = \"<absolute>\";\n\t\t};\n\t\t089C1673FE841209C02AAC07 = {\n\t\t\tbuildPhases = (\n\t\t\t\t089C1674FE841209C02AAC07,\n\t\t\t\t089C1675FE841209C02AAC07,\n\t\t\t\t089C1676FE841209C02AAC07,\n\t\t\t\t089C1677FE841209C02AAC07,\n\t\t\t\t089C1679FE841209C02AAC07,\n\t\t\t);\n\t\t\tbuildSettings = {\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = \"\";\n\t\t\t\tHEADER_SEARCH_PATHS = \"\";\n\t\t\t\tINSTALL_PATH = \"$(HOME)/Library/Bundles\";\n\t\t\t\tLIBRARY_SEARCH_PATHS = \"\";\n\t\t\t\tOTHER_CFLAGS = \"\";\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tOTHER_REZFLAGS = \"\";\n\t\t\t\tPRODUCT_NAME = SpellCheck;\n\t\t\t\tSECTORDER_FLAGS = \"\";\n\t\t\t\tWARNING_CFLAGS = \"-Wmost -Wno-four-char-constants -Wno-unknown-pragmas\";\n\t\t\t\tWRAPPER_EXTENSION = bundle;\n\t\t\t};\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tisa = PBXBundleTarget;\n\t\t\tname = SpellCheck;\n\t\t\tproductInstallPath = \"$(HOME)/Library/Bundles\";\n\t\t\tproductName = SpellCheck;\n\t\t\tproductReference = 014CEA410018CDE011CA2923;\n\t\t\tproductSettingsXML = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\n<!DOCTYPE plist PUBLIC \\\"-//Apple Computer//DTD PLIST 1.0//EN\\\" \\\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\\\">\n<plist version=\\\"1.0\\\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>SpellCheck</string>\n\t<key>CFBundleIconFile</key>\n\t<string></string>\n\t<key>CFBundleIdentifier</key>\n\t<string></string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>0.0.1d1</string>\n\t<key>NSPrincipalClass</key>\n\t<string></string>\n</dict>\n</plist>\n\";\n\t\t};\n\t\t089C1674FE841209C02AAC07 = {\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tisa = PBXHeadersBuildPhase;\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t089C1675FE841209C02AAC07 = {\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t089C1680FE841241C02AAC07,\n\t\t\t);\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t089C1676FE841209C02AAC07 = {\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tF54FE586025A713E01CB15F0,\n\t\t\t);\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t089C1677FE841209C02AAC07 = {\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t1058C7AFFEA557BF11CA2CBB,\n\t\t\t);\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t089C1679FE841209C02AAC07 = {\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tisa = PBXRezBuildPhase;\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t089C167CFE841241C02AAC07 = {\n\t\t\tchildren = (\n\t\t\t\t089C167DFE841241C02AAC07,\n\t\t\t);\n\t\t\tisa = PBXGroup;\n\t\t\tname = Resources;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t089C167DFE841241C02AAC07 = {\n\t\t\tchildren = (\n\t\t\t\t089C167EFE841241C02AAC07,\n\t\t\t);\n\t\t\tisa = PBXVariantGroup;\n\t\t\tname = InfoPlist.strings;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t089C167EFE841241C02AAC07 = {\n\t\t\tfileEncoding = 10;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = text.plist.strings;\n\t\t\tname = English;\n\t\t\tpath = English.lproj/InfoPlist.strings;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t089C167FFE841241C02AAC07 = {\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = wrapper.framework;\n\t\t\tname = AppKit.framework;\n\t\t\tpath = /System/Library/Frameworks/AppKit.framework;\n\t\t\trefType = 0;\n\t\t\tsourceTree = \"<absolute>\";\n\t\t};\n\t\t089C1680FE841241C02AAC07 = {\n\t\t\tfileRef = 089C167DFE841241C02AAC07;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t08FB77AFFE84173DC02AAC07 = {\n\t\t\tchildren = (\n\t\t\t\tF54FE585025A713E01CB15F0,\n\t\t\t);\n\t\t\tisa = PBXGroup;\n\t\t\tname = Classes;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n//080\n//081\n//082\n//083\n//084\n//100\n//101\n//102\n//103\n//104\n\t\t1058C7ACFEA557BF11CA2CBB = {\n\t\t\tchildren = (\n\t\t\t\t1058C7ADFEA557BF11CA2CBB,\n\t\t\t);\n\t\t\tisa = PBXGroup;\n\t\t\tname = \"Linked Frameworks\";\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t1058C7ADFEA557BF11CA2CBB = {\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = wrapper.framework;\n\t\t\tname = Cocoa.framework;\n\t\t\tpath = /System/Library/Frameworks/Cocoa.framework;\n\t\t\trefType = 0;\n\t\t\tsourceTree = \"<absolute>\";\n\t\t};\n\t\t1058C7AEFEA557BF11CA2CBB = {\n\t\t\tchildren = (\n\t\t\t\t089C1672FE841209C02AAC07,\n\t\t\t\t089C167FFE841241C02AAC07,\n\t\t\t);\n\t\t\tisa = PBXGroup;\n\t\t\tname = \"Other Frameworks\";\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t1058C7AFFEA557BF11CA2CBB = {\n\t\t\tfileRef = 1058C7ADFEA557BF11CA2CBB;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n//100\n//101\n//102\n//103\n//104\n//190\n//191\n//192\n//193\n//194\n\t\t19C28FB8FE9D52D311CA2CBB = {\n\t\t\tchildren = (\n\t\t\t\t014CEA410018CDE011CA2923,\n\t\t\t);\n\t\t\tisa = PBXGroup;\n\t\t\tname = Products;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n//190\n//191\n//192\n//193\n//194\n//F50\n//F51\n//F52\n//F53\n//F54\n\t\tF54FE585025A713E01CB15F0 = {\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.objc;\n\t\t\tpath = SpellCheck.m;\n\t\t\trefType = 2;\n\t\t\tsourceTree = SOURCE_ROOT;\n\t\t};\n\t\tF54FE586025A713E01CB15F0 = {\n\t\t\tfileRef = F54FE585025A713E01CB15F0;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t};\n\trootObject = 089C1669FE841209C02AAC07;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SpellingPlugin/SqueakSpelling.pbproj/johnmci.mode1",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>ActivePerspectiveName</key>\n\t<string>Project</string>\n\t<key>AllowedModules</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Groups and Files Outline View</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCTaskListModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Task List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDetailModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>File and Smart Group Detail Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Detailed Build Results Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Batch Find Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Run Log</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXCVSModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Source Code Control Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Breakpoints Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDockableInspector</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Inspector</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXOpenQuicklyModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Open Quickly Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Console</string>\n\t\t</dict>\n\t</array>\n\t<key>Description</key>\n\t<string>DefaultDescriptionKey</string>\n\t<key>DockingSystemVisible</key>\n\t<false/>\n\t<key>Extension</key>\n\t<string>mode1</string>\n\t<key>FavBarConfig</key>\n\t<dict>\n\t\t<key>PBXProjectModuleGUID</key>\n\t\t<string>94AF35A4084782DD00FA5ACB</string>\n\t\t<key>XCBarModuleItemNames</key>\n\t\t<dict/>\n\t\t<key>XCBarModuleItems</key>\n\t\t<array/>\n\t</dict>\n\t<key>FirstTimeWindowDisplayed</key>\n\t<false/>\n\t<key>Identifier</key>\n\t<string>com.apple.perspectives.project.mode1</string>\n\t<key>MajorVersion</key>\n\t<integer>31</integer>\n\t<key>MinorVersion</key>\n\t<integer>1</integer>\n\t<key>Name</key>\n\t<string>Default</string>\n\t<key>Notifications</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>XCObserverAutoDisconnectKey</key>\n\t\t\t<true/>\n\t\t\t<key>XCObserverDefintionKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusErrorsKey</key>\n\t\t\t\t<integer>0</integer>\n\t\t\t</dict>\n\t\t\t<key>XCObserverFactoryKey</key>\n\t\t\t<string>XCPerspectivesSpecificationIdentifier</string>\n\t\t\t<key>XCObserverGUIDKey</key>\n\t\t\t<string>XCObserverProjectIdentifier</string>\n\t\t\t<key>XCObserverNotificationKey</key>\n\t\t\t<string>PBXStatusBuildStateMessageNotification</string>\n\t\t\t<key>XCObserverTargetKey</key>\n\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t<key>XCObserverTriggerKey</key>\n\t\t\t<string>awakenModuleWithObserver:</string>\n\t\t\t<key>XCObserverValidationKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusErrorsKey</key>\n\t\t\t\t<integer>2</integer>\n\t\t\t</dict>\n\t\t</dict>\n\t</array>\n\t<key>OpenEditors</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>Content</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t<string>944D682408609F6D00600D6E</string>\n\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t<string>sqMacSpellingPlugin.c</string>\n\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>944D682508609F6D00600D6E</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>sqMacSpellingPlugin.c</string>\n\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t<string>9465F8FE08611131006CDE9D</string>\n\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>9465F81D0860EE66006CDE9D</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t<string>1</string>\n\t\t\t\t</dict>\n\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t<true/>\n\t\t\t</dict>\n\t\t\t<key>Geometry</key>\n\t\t\t<dict>\n\t\t\t\t<key>Frame</key>\n\t\t\t\t<string>{{0, 20}, {962, 622}}</string>\n\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t<false/>\n\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t<string>370 106 962 663 0 0 1440 878 </string>\n\t\t\t</dict>\n\t\t</dict>\n\t</array>\n\t<key>PerspectiveWidths</key>\n\t<array>\n\t\t<integer>-1</integer>\n\t\t<integer>-1</integer>\n\t</array>\n\t<key>Perspectives</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>ChosenToolbarItems</key>\n\t\t\t<array>\n\t\t\t\t<string>active-target-popup</string>\n\t\t\t\t<string>active-buildstyle-popup</string>\n\t\t\t\t<string>action</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>buildOrClean</string>\n\t\t\t\t<string>build-and-runOrDebug</string>\n\t\t\t\t<string>com.apple.ide.PBXToolbarStopButton</string>\n\t\t\t\t<string>get-info</string>\n\t\t\t\t<string>toggle-editor</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>com.apple.pbx.toolbar.searchfield</string>\n\t\t\t</array>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProjectWithEditor</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.project</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<true/>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>289</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>66DF6BFE01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66B8BC570381F53800A8011A</string>\n\t\t\t\t\t\t\t\t<string>66DF6BFF01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66DF6C3901D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66DF6C4501D7DEEE00A80119</string>\n\t\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {289, 693}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {306, 711}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>289</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>501 97 908 752 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>306pt</string>\n\t\t\t\t</dict>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>sqMacSpellingPlugin.c</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CE0B20406471E060097A5F4</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>sqMacSpellingPlugin.c</string>\n\t\t\t\t\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t\t\t\t\t<string>9465F8FD08611131006CDE9D</string>\n\t\t\t\t\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>949CD5C0085CC32700EB8605</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>944D6240085F473000600D6E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>944D634C085F8DF400600D6E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>944D6487085FBC6B00600D6E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>944D64BC085FBD7D00600D6E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>944D64BE085FBD7D00600D6E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>944D66BE085FC3F300600D6E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9465F8D50860F206006CDE9D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9465F8D60860F206006CDE9D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9465F8D70860F206006CDE9D</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t\t<key>prevStack</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>949CD5C5085CC32700EB8605</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>949CD5C6085CC32700EB8605</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>944D621E085F45A500600D6E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>944D6320085F8B7B00600D6E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>944D6323085F8B7B00600D6E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>944D6326085F8B7B00600D6E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>944D6343085F8D4100600D6E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>944D64C0085FBD7D00600D6E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9465F8D80860F206006CDE9D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9465F8D90860F206006CDE9D</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {597, 522}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>501 97 908 752 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>522pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 527}, {597, 184}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>501 97 908 752 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>184pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>597pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>9465F8030860E667006CDE9D</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>9465F8040860E667006CDE9D</string>\n\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProject</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.morph</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>29B97314FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 337}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 355}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>373 269 690 397 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Morph</string>\n\t\t\t<key>PreferredWidth</key>\n\t\t\t<integer>300</integer>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default.short</string>\n\t\t</dict>\n\t</array>\n\t<key>PerspectivesBarVisible</key>\n\t<false/>\n\t<key>ShelfIsVisible</key>\n\t<false/>\n\t<key>SourceDescription</key>\n\t<string>file at '/System/Library/PrivateFrameworks/DevToolsInterface.framework/Versions/A/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string>\n\t<key>StatusbarIsVisible</key>\n\t<true/>\n\t<key>TimeStamp</key>\n\t<real>140579121.27439901</real>\n\t<key>ToolbarDisplayMode</key>\n\t<integer>1</integer>\n\t<key>ToolbarIsVisible</key>\n\t<true/>\n\t<key>ToolbarSizeMode</key>\n\t<integer>2</integer>\n\t<key>Type</key>\n\t<string>Perspectives</string>\n\t<key>UpdateMessage</key>\n\t<string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the \"Metro-Morph\" feature).  You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature.  Do you wish to update to the latest Workspace defaults for project '%@'?</string>\n\t<key>WindowJustification</key>\n\t<integer>5</integer>\n\t<key>WindowOrderList</key>\n\t<array>\n\t\t<string>9465F80F0860E667006CDE9D</string>\n\t\t<string>9465F8100860E667006CDE9D</string>\n\t\t<string>9465F80C0860E667006CDE9D</string>\n\t\t<string>944D682408609F6D00600D6E</string>\n\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t<string>944D6333085F8B7B00600D6E</string>\n\t\t<string>94ABA92F0858D3A300079BE1</string>\n\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t<string>/Users/johnmci/Documents/SqueakSpellingPlugin/SqueakSpelling.pbproj</string>\n\t</array>\n\t<key>WindowString</key>\n\t<string>501 97 908 752 0 0 1440 878 </string>\n\t<key>WindowTools</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.build</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>sqMacSpellingPlugin.c</string>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {879, 594}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>471 28 879 795 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>594pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Build</string>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Collapse</key>\n\t\t\t\t\t\t\t\t<integer>1021</integer>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Open</key>\n\t\t\t\t\t\t\t\t<integer>1012</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 599}, {879, 155}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>471 28 879 795 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>155pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>754pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Build Results</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>944D6333085F8B7B00600D6E</string>\n\t\t\t\t<string>9465F8DF0860F206006CDE9D</string>\n\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.build</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>471 28 879 795 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>944D6333085F8B7B00600D6E</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugger</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Debugger</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {192, 191}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{192, 0}, {1030, 191}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {1222, 191}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 191}, {1222, 523}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debug - GLUTExamples (Underwater)</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>DebugConsoleDrawerSize</key>\n\t\t\t\t\t\t\t\t<string>{100, 120}</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleVisible</key>\n\t\t\t\t\t\t\t\t<string>None</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>DebugSTDIOWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1222, 714}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>172 66 1222 755 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>714pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>714pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t\t<string>9465F8060860E667006CDE9D</string>\n\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t<string>9465F8070860E667006CDE9D</string>\n\t\t\t\t<string>9465F8080860E667006CDE9D</string>\n\t\t\t\t<string>9465F8090860E667006CDE9D</string>\n\t\t\t\t<string>9465F80A0860E667006CDE9D</string>\n\t\t\t\t<string>9465F80B0860E667006CDE9D</string>\n\t\t\t\t<string>9465F80C0860E667006CDE9D</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debug</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>172 66 1222 755 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.find</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>SpellingPlugin.h</string>\n\t\t\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {791, 416}}</string>\n\t\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t\t<string>591 13 791 674 0 0 1440 878 </string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t\t\t<string>791pt</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>416pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Project Find</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 421}, {791, 212}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>591 13 791 674 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>212pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>633pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Find</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t\t<string>9465F8E00860F206006CDE9D</string>\n\t\t\t\t<string>9465F8E10860F206006CDE9D</string>\n\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>591 13 791 674 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>MENUSEPARATOR</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debuggerConsole</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debugger Console</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {856, 640}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>558 67 856 681 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>640pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>640pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger Console</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>94ABA92F0858D3A300079BE1</string>\n\t\t\t\t<string>9465F80D0860E667006CDE9D</string>\n\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>558 67 856 681 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>94ABA92F0858D3A300079BE1</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.run</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>3</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528B0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Run</string>\n\t\t\t\t\t\t\t\t<key>Runner</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {493, 167}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 176}, {493, 267}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {405, 443}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{414, 0}, {514, 443}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {460, 159}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>316 696 459 200 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>159pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>159pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Run Log</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2B3069F1EA900FABCE6</string>\n\t\t\t\t<string>1C0AD2B4069F1EA900FABCE6</string>\n\t\t\t\t<string>1CD0528B0623707200166675</string>\n\t\t\t\t<string>1C0AD2B5069F1EA900FABCE6</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.run</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>316 696 459 200 0 0 1280 1002 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2B3069F1EA900FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.scm</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1C78EAB3065D492600B07095</string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>0pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>SCM</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ConsoleFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 259}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 7}, {452, 259}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t\t<key>TableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>Status</string>\n\t\t\t\t\t\t\t\t\t<real>30</real>\n\t\t\t\t\t\t\t\t\t<string>FileName</string>\n\t\t\t\t\t\t\t\t\t<real>199</real>\n\t\t\t\t\t\t\t\t\t<string>Path</string>\n\t\t\t\t\t\t\t\t\t<real>197.09500122070312</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>TableFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 250}}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>262pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>266pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>SCM</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAB4065D492600B07095</string>\n\t\t\t\t<string>1C78EAB5065D492600B07095</string>\n\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.scm</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.breakpoints</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD052930623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Breakpoints</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>BreakpointsTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>enabledColumn</string>\n\t\t\t\t\t\t\t\t\t<real>16</real>\n\t\t\t\t\t\t\t\t\t<string>breakpointColumn</string>\n\t\t\t\t\t\t\t\t\t<real>482</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {506, 360}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>780 250 506 380 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>360pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>360pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Breakpoints</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<false/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2AD069F1E9B00FABCE6</string>\n\t\t\t\t<string>94F94C8F085D4373008ACC85</string>\n\t\t\t\t<string>1CD052930623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>780 250 506 380 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2AD069F1E9B00FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.bookmarks</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>538 42 401 187 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.classBrowser</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>OptionsSetName</key>\n\t\t\t\t\t\t\t\t<string>Hierarchy, all classes</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Class Browser - NSObject</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ClassesFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {378, 96}}</string>\n\t\t\t\t\t\t\t\t<key>ClassesTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXClassNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>208</real>\n\t\t\t\t\t\t\t\t\t<string>PBXClassBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {630, 332}}</string>\n\t\t\t\t\t\t\t\t<key>MembersFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 101}, {378, 231}}</string>\n\t\t\t\t\t\t\t\t<key>MembersTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeIconColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>216</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>101</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>312 384 630 352 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>332pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>332pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<false/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t\t<string>949CD652085CD34000EB8605</string>\n\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.classbrowser</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>312 384 630 352 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SpellingPlugin/SqueakSpelling.pbproj/johnmci.pbxuser",
    "content": "// !$*UTF8*$!\n{\n\t66B8BC5C0381F66500A8011A = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {740, 6117}}\";\n\t\t\tsepNavSelRange = \"{16850, 24}\";\n\t\t\tsepNavVisRect = \"{{0, 5935}, {740, 73}}\";\n\t\t};\n\t};\n\t66B8BC5E0381F69100A8011A = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {673, 2968}}\";\n\t\t\tsepNavSelRange = \"{1486, 20}\";\n\t\t\tsepNavVisRect = \"{{0, 9}, {673, 397}}\";\n\t\t\tsepNavWindowFrame = \"{{84, 252}, {750, 558}}\";\n\t\t};\n\t};\n\t66DF6BFD01D7DCEA00A80119 = {\n\t\tactiveBuildStyle = 66DF6C4401D7DCEA00A80119;\n\t\tactiveExecutable = 94ABA91E0858D35E00079BE1;\n\t\tactiveTarget = 94AF34E00846F91100FA5ACB;\n\t\taddToTargets = (\n\t\t\t94AF34E00846F91100FA5ACB,\n\t\t);\n\t\tbreakpoints = (\n\t\t\t944D679B085FDFFE00600D6E,\n\t\t);\n\t\tcodeSenseManager = 9444E60E06E7B8740063F6CC;\n\t\texecutables = (\n\t\t\t94ABA91E0858D35E00079BE1,\n\t\t);\n\t\texpressions = (\n\t\t\tbuffer,\n\t\t);\n\t\tperUserDictionary = {\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXErrorsWarningsDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXErrorsWarningsDataSource_LocationID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t300,\n\t\t\t\t\t200,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXErrorsWarningsDataSource_TypeID,\n\t\t\t\t\tPBXErrorsWarningsDataSource_MessageID,\n\t\t\t\t\tPBXErrorsWarningsDataSource_LocationID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXExecutablesDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXExecutablesDataSource_NameID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t22,\n\t\t\t\t\t300,\n\t\t\t\t\t348.5835,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXExecutablesDataSource_ActiveFlagID,\n\t\t\t\t\tPBXExecutablesDataSource_NameID,\n\t\t\t\t\tPBXExecutablesDataSource_CommentsID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t358,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t\t20,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Target_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t200,\n\t\t\t\t\t63,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXTargetDataSource_PrimaryAttribute,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXPerProjectTemplateStateSaveDate = 140566658;\n\t\t\tPBXPrepackagedSmartGroups_v2 = (\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tactivationKey = OldTargetSmartGroup;\n\t\t\t\t\tclz = PBXTargetSmartGroup;\n\t\t\t\t\tdescription = \"Displays all targets of the project.\";\n\t\t\t\t\tglobalID = 1C37FABC04509CD000000102;\n\t\t\t\t\tname = Targets;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = Targets;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXTargetSmartGroup2;\n\t\t\t\t\tdescription = \"Displays all targets of the project as well as nested build phases.\";\n\t\t\t\t\tglobalID = 1C37FBAC04509CD000000102;\n\t\t\t\t\tname = Targets;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = Targets;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXExecutablesSmartGroup;\n\t\t\t\t\tdescription = \"Displays all executables of the project.\";\n\t\t\t\t\tglobalID = 1C37FAAC04509CD000000102;\n\t\t\t\t\tname = Executables;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = Executable;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\" PBXTransientLocationAtTop \" = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXErrorsWarningsSmartGroup;\n\t\t\t\t\tdescription = \"Displays files with errors or warnings.\";\n\t\t\t\t\tglobalID = 1C08E77C0454961000C914BD;\n\t\t\t\t\tname = \"Errors and Warnings\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\tfnmatch = \"\";\n\t\t\t\t\t\timage = WarningsErrors;\n\t\t\t\t\t\trecursive = 1;\n\t\t\t\t\t\tregex = \"\";\n\t\t\t\t\t\troot = \"<PROJECT>\";\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXFilenameSmartGroup;\n\t\t\t\t\tdescription = \"Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter.\";\n\t\t\t\t\tglobalID = 1CC0EA4004350EF90044410B;\n\t\t\t\t\tname = \"Implementation Files\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\tcanSave = 1;\n\t\t\t\t\t\tfnmatch = \"\";\n\t\t\t\t\t\timage = SmartFolder;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t\trecursive = 1;\n\t\t\t\t\t\tregex = \"?*\\\\.[mcMC]\";\n\t\t\t\t\t\troot = \"<PROJECT>\";\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXFilenameSmartGroup;\n\t\t\t\t\tdescription = \"This group displays Interface Builder NIB Files.\";\n\t\t\t\t\tglobalID = 1CC0EA4004350EF90041110B;\n\t\t\t\t\tname = \"NIB Files\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\tcanSave = 1;\n\t\t\t\t\t\tfnmatch = \"*.nib\";\n\t\t\t\t\t\timage = SmartFolder;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t\trecursive = 1;\n\t\t\t\t\t\tregex = \"\";\n\t\t\t\t\t\troot = \"<PROJECT>\";\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = no;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXFindSmartGroup;\n\t\t\t\t\tdescription = \"Displays Find Results.\";\n\t\t\t\t\tglobalID = 1C37FABC05509CD000000102;\n\t\t\t\t\tname = \"Find Results\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = spyglass;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = no;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXBookmarksSmartGroup;\n\t\t\t\t\tdescription = \"Displays Project Bookmarks.\";\n\t\t\t\t\tglobalID = 1C37FABC05539CD112110102;\n\t\t\t\t\tname = Bookmarks;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = Bookmarks;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = XCSCMSmartGroup;\n\t\t\t\t\tdescription = \"Displays files with interesting SCM status.\";\n\t\t\t\t\tglobalID = E2644B35053B69B200211256;\n\t\t\t\t\tname = SCM;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = PBXRepository;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXSymbolsSmartGroup;\n\t\t\t\t\tdescription = \"Displays all symbols for the project.\";\n\t\t\t\t\tglobalID = 1C37FABC04509CD000100104;\n\t\t\t\t\tname = \"Project Symbols\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = ProjectSymbols;\n\t\t\t\t\t\tisLeaf = 1;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXFilenameSmartGroup;\n\t\t\t\t\tdescription = \"Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter.\";\n\t\t\t\t\tglobalID = PBXTemplateMarker;\n\t\t\t\t\tname = \"Simple Filter SmartGroup\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\tcanSave = 1;\n\t\t\t\t\t\tfnmatch = \"*.nib\";\n\t\t\t\t\t\timage = SmartFolder;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t\trecursive = 1;\n\t\t\t\t\t\tregex = \"\";\n\t\t\t\t\t\troot = \"<PROJECT>\";\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXFilenameSmartGroup;\n\t\t\t\t\tdescription = \"Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter.\";\n\t\t\t\t\tglobalID = PBXTemplateMarker;\n\t\t\t\t\tname = \"Simple Regular Expression SmartGroup\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\tcanSave = 1;\n\t\t\t\t\t\tfnmatch = \"\";\n\t\t\t\t\t\timage = SmartFolder;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t\trecursive = 1;\n\t\t\t\t\t\tregex = \"?*\\\\.[mcMC]\";\n\t\t\t\t\t\troot = \"<PROJECT>\";\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tclz = XDDesignSmartGroup;\n\t\t\t\t\tdescription = \"Displays Xdesign models\";\n\t\t\t\t\tglobalID = 2E4A936305E6979E00701470;\n\t\t\t\t\tname = Design;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = Design;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t);\n\t\t\tPBXWorkspaceContents = (\n\t\t\t\t{\n\t\t\t\t\tPBXProjectWorkspaceModule_StateKey_Rev39 = {\n\t\t\t\t\t\tPBXProjectWorkspaceModule_DataSourceSelectionKey_Rev6 = {\n\t\t\t\t\t\t\tBoundsStr = \"{{0, 0}, {469, 441}}\";\n\t\t\t\t\t\t\tRows = (\n\t\t\t\t\t\t\t\t9,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tVisibleRectStr = \"{{0, 0}, {469, 441}}\";\n\t\t\t\t\t\t};\n\t\t\t\t\t\tPBXProjectWorkspaceModule_EditorOpen = false;\n\t\t\t\t\t\tPBXProjectWorkspaceModule_EmbeddedNavigatorGroup = {\n\t\t\t\t\t\t\tPBXSplitModuleInNavigatorKey = {\n\t\t\t\t\t\t\t\tSplitCount = 1;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t};\n\t\t\t\t\t\tPBXProjectWorkspaceModule_GeometryKey_Rev15 = {\n\t\t\t\t\t\t\tPBXProjectWorkspaceModule_SGTM_Geometry = {\n\t\t\t\t\t\t\t\t_collapsingFrameDimension = 0;\n\t\t\t\t\t\t\t\t_indexOfCollapsedView = 0;\n\t\t\t\t\t\t\t\t_percentageOfCollapsedView = 0;\n\t\t\t\t\t\t\t\tsizes = (\n\t\t\t\t\t\t\t\t\t\"{{0, 0}, {182, 458}}\",\n\t\t\t\t\t\t\t\t\t\"{{182, 0}, {484, 458}}\",\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t};\n\t\t\t\t\t\tPBXProjectWorkspaceModule_OldDetailFrame = \"{{0, 0}, {484, 458}}\";\n\t\t\t\t\t\tPBXProjectWorkspaceModule_OldEditorFrame = \"{{0, 0}, {750, 480}}\";\n\t\t\t\t\t\tPBXProjectWorkspaceModule_OldSuperviewFrame = \"{{182, 0}, {484, 458}}\";\n\t\t\t\t\t\tPBXProjectWorkspaceModule_SGTM = {\n\t\t\t\t\t\t\tPBXBottomSmartGroupGIDs = (\n\t\t\t\t\t\t\t\t1C37FBAC04509CD000000102,\n\t\t\t\t\t\t\t\t1C37FAAC04509CD000000102,\n\t\t\t\t\t\t\t\t1C08E77C0454961000C914BD,\n\t\t\t\t\t\t\t\t1CC0EA4004350EF90044410B,\n\t\t\t\t\t\t\t\t1CC0EA4004350EF90041110B,\n\t\t\t\t\t\t\t\t1C37FABC05509CD000000102,\n\t\t\t\t\t\t\t\t1C37FABC05539CD112110102,\n\t\t\t\t\t\t\t\tE2644B35053B69B200211256,\n\t\t\t\t\t\t\t\t1C37FABC04509CD000100104,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnData = {\n\t\t\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnWidthsKey = (\n\t\t\t\t\t\t\t\t\t165,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnsKey_v4 = (\n\t\t\t\t\t\t\t\t\tMainColumn,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateKey_v7 = {\n\t\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateExpansionKey = (\n\t\t\t\t\t\t\t\t\t66DF6BFE01D7DCEA00A80119,\n\t\t\t\t\t\t\t\t\t66B8BC570381F53800A8011A,\n\t\t\t\t\t\t\t\t\t66DF6BFF01D7DCEA00A80119,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateSelectionKey = (\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateVisibleRectKey = \"{{0, 0}, {165, 440}}\";\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tPBXTopSmartGroupGIDs = (\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t);\n\t\t\t\"PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXBuildResultsModule\" = {\n\t\t\t};\n\t\t\t\"PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXDebugCLIModule\" = {\n\t\t\t};\n\t\t\t\"PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXNavigatorGroup\" = {\n\t\t\t\tPBXSplitModuleInNavigatorKey = {\n\t\t\t\t\tSplitCount = 1;\n\t\t\t\t};\n\t\t\t};\n\t\t\t\"PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXProjectWorkspaceModule\" = {\n\t\t\t\tPBXProjectWorkspaceModule_StateKey_Rev39 = {\n\t\t\t\t\tPBXProjectWorkspaceModule_DataSourceSelectionKey_Rev6 = {\n\t\t\t\t\t\tBoundsStr = \"{{0, 0}, {469, 441}}\";\n\t\t\t\t\t\tRows = (\n\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tVisibleRectStr = \"{{0, 0}, {469, 441}}\";\n\t\t\t\t\t};\n\t\t\t\t\tPBXProjectWorkspaceModule_EditorOpen = false;\n\t\t\t\t\tPBXProjectWorkspaceModule_EmbeddedNavigatorGroup = {\n\t\t\t\t\t\tPBXSplitModuleInNavigatorKey = {\n\t\t\t\t\t\t\tSplitCount = 1;\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t\tPBXProjectWorkspaceModule_GeometryKey_Rev15 = {\n\t\t\t\t\t\tPBXProjectWorkspaceModule_SGTM_Geometry = {\n\t\t\t\t\t\t\t_collapsingFrameDimension = 0;\n\t\t\t\t\t\t\t_indexOfCollapsedView = 0;\n\t\t\t\t\t\t\t_percentageOfCollapsedView = 0;\n\t\t\t\t\t\t\tsizes = (\n\t\t\t\t\t\t\t\t\"{{0, 0}, {182, 458}}\",\n\t\t\t\t\t\t\t\t\"{{182, 0}, {484, 458}}\",\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t\tPBXProjectWorkspaceModule_OldDetailFrame = \"{{0, 0}, {484, 458}}\";\n\t\t\t\t\tPBXProjectWorkspaceModule_OldEditorFrame = \"{{0, 0}, {750, 480}}\";\n\t\t\t\t\tPBXProjectWorkspaceModule_OldSuperviewFrame = \"{{182, 0}, {484, 458}}\";\n\t\t\t\t\tPBXProjectWorkspaceModule_SGTM = {\n\t\t\t\t\t\tPBXBottomSmartGroupGIDs = (\n\t\t\t\t\t\t\t1C37FBAC04509CD000000102,\n\t\t\t\t\t\t\t1C37FAAC04509CD000000102,\n\t\t\t\t\t\t\t1C08E77C0454961000C914BD,\n\t\t\t\t\t\t\t1CC0EA4004350EF90044410B,\n\t\t\t\t\t\t\t1CC0EA4004350EF90041110B,\n\t\t\t\t\t\t\t1C37FABC05509CD000000102,\n\t\t\t\t\t\t\t1C37FABC05539CD112110102,\n\t\t\t\t\t\t\tE2644B35053B69B200211256,\n\t\t\t\t\t\t\t1C37FABC04509CD000100104,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnData = {\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnWidthsKey = (\n\t\t\t\t\t\t\t\t165,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnsKey_v4 = (\n\t\t\t\t\t\t\t\tMainColumn,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t};\n\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateKey_v7 = {\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateExpansionKey = (\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateSelectionKey = (\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateVisibleRectKey = \"{{0, 0}, {165, 440}}\";\n\t\t\t\t\t\t};\n\t\t\t\t\t\tPBXTopSmartGroupGIDs = (\n\t\t\t\t\t\t);\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tPBXWorkspaceGeometries = (\n\t\t\t\t{\n\t\t\t\t\tFrame = \"{{0, 0}, {666, 458}}\";\n\t\t\t\t\tPBXProjectWorkspaceModule_GeometryKey_Rev15 = {\n\t\t\t\t\t};\n\t\t\t\t\tRubberWindowFrame = \"212 190 666 500 0 0 1024 746 \";\n\t\t\t\t},\n\t\t\t);\n\t\t\t\"PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXBuildResultsModule\" = {\n\t\t\t\tFrame = \"{{0, 0}, {480, 217}}\";\n\t\t\t\tPBXModuleWindowStatusBarHidden = YES;\n\t\t\t\tRubberWindowFrame = \"272 407 480 238 0 0 1024 746 \";\n\t\t\t};\n\t\t\t\"PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXDebugCLIModule\" = {\n\t\t\t\tFrame = \"{{0, 0}, {400, 201}}\";\n\t\t\t\tPBXModuleWindowStatusBarHidden = YES;\n\t\t\t\tRubberWindowFrame = \"50 718 400 222 0 0 1024 746 \";\n\t\t\t};\n\t\t\t\"PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXNavigatorGroup\" = {\n\t\t\t\tFrame = \"{{0, 0}, {750, 481}}\";\n\t\t\t\tPBXModuleWindowStatusBarHidden = YES;\n\t\t\t\tRubberWindowFrame = \"61 197 750 502 0 0 1024 746 \";\n\t\t\t};\n\t\t\t\"PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXProjectWorkspaceModule\" = {\n\t\t\t\tFrame = \"{{0, 0}, {666, 458}}\";\n\t\t\t\tPBXProjectWorkspaceModule_GeometryKey_Rev15 = {\n\t\t\t\t};\n\t\t\t\tRubberWindowFrame = \"212 190 666 500 0 0 1024 746 \";\n\t\t\t};\n\t\t\tPBXWorkspaceStateSaveDate = 140566658;\n\t\t};\n\t\tperUserProjectItems = {\n\t\t\t944D621E085F45A500600D6E = 944D621E085F45A500600D6E;\n\t\t\t944D6240085F473000600D6E = 944D6240085F473000600D6E;\n\t\t\t944D6320085F8B7B00600D6E = 944D6320085F8B7B00600D6E;\n\t\t\t944D6323085F8B7B00600D6E = 944D6323085F8B7B00600D6E;\n\t\t\t944D6326085F8B7B00600D6E = 944D6326085F8B7B00600D6E;\n\t\t\t944D6343085F8D4100600D6E = 944D6343085F8D4100600D6E;\n\t\t\t944D634C085F8DF400600D6E = 944D634C085F8DF400600D6E;\n\t\t\t944D6487085FBC6B00600D6E = 944D6487085FBC6B00600D6E;\n\t\t\t944D64BC085FBD7D00600D6E = 944D64BC085FBD7D00600D6E;\n\t\t\t944D64BE085FBD7D00600D6E = 944D64BE085FBD7D00600D6E;\n\t\t\t944D64C0085FBD7D00600D6E = 944D64C0085FBD7D00600D6E;\n\t\t\t944D66BE085FC3F300600D6E = 944D66BE085FC3F300600D6E;\n\t\t\t9465F81D0860EE66006CDE9D = 9465F81D0860EE66006CDE9D;\n\t\t\t9465F8D50860F206006CDE9D = 9465F8D50860F206006CDE9D;\n\t\t\t9465F8D60860F206006CDE9D = 9465F8D60860F206006CDE9D;\n\t\t\t9465F8D70860F206006CDE9D = 9465F8D70860F206006CDE9D;\n\t\t\t9465F8D80860F206006CDE9D = 9465F8D80860F206006CDE9D;\n\t\t\t9465F8D90860F206006CDE9D = 9465F8D90860F206006CDE9D;\n\t\t\t9465F8FD08611131006CDE9D = 9465F8FD08611131006CDE9D;\n\t\t\t9465F8FE08611131006CDE9D = 9465F8FE08611131006CDE9D;\n\t\t\t949CD5C0085CC32700EB8605 = 949CD5C0085CC32700EB8605;\n\t\t\t949CD5C5085CC32700EB8605 = 949CD5C5085CC32700EB8605;\n\t\t\t949CD5C6085CC32700EB8605 = 949CD5C6085CC32700EB8605;\n\t\t};\n\t\tsourceControlManager = 9444E60D06E7B8740063F6CC;\n\t\tuserBuildSettings = {\n\t\t};\n\t};\n\t9444E60D06E7B8740063F6CC = {\n\t\tfallbackIsa = XCSourceControlManager;\n\t\tisSCMEnabled = 0;\n\t\tisa = PBXSourceControlManager;\n\t\tscmConfiguration = {\n\t\t};\n\t\tscmType = scm.cvs;\n\t};\n\t9444E60E06E7B8740063F6CC = {\n\t\tindexTemplatePath = \"\";\n\t\tisa = PBXCodeSenseManager;\n\t};\n\t944D6214085F458100600D6E = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {659, 490}}\";\n\t\t\tsepNavSelRange = \"{251, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {659, 490}}\";\n\t\t\tsepNavWindowFrame = \"{{176, 7}, {962, 719}}\";\n\t\t};\n\t};\n\t944D621E085F45A500600D6E = {\n\t\tfRef = 944D6214085F458100600D6E;\n\t\tisa = PBXTextBookmark;\n\t\tname = \"English: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 251;\n\t\tvrLoc = 0;\n\t};\n\t944D6240085F473000600D6E = {\n\t\tfRef = 949CD57E085CBE5900EB8605;\n\t\tisa = PBXTextBookmark;\n\t\tname = \"InfoPlist.strings: 1\";\n\t\trLen = 215;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 215;\n\t\tvrLoc = 0;\n\t};\n\t944D62AC085F7DA800600D6E = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {974, 5614}}\";\n\t\t\tsepNavSelRange = \"{1237, 22}\";\n\t\t\tsepNavVisRect = \"{{0, 356}, {923, 590}}\";\n\t\t\tsepNavWindowFrame = \"{{107, 70}, {962, 719}}\";\n\t\t};\n\t};\n\t944D62B5085F7E2A00600D6E = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {750, 384}}\";\n\t\t\tsepNavSelRange = \"{275, 27}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {750, 384}}\";\n\t\t\tsepNavWindowFrame = \"{{107, 70}, {962, 719}}\";\n\t\t};\n\t};\n\t944D62E9085F825200600D6E = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {662, 490}}\";\n\t\t\tsepNavSelRange = \"{284, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {659, 490}}\";\n\t\t};\n\t};\n\t944D62EA085F825200600D6E = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1178, 3948}}\";\n\t\t\tsepNavSelRange = \"{4482, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 943}, {923, 590}}\";\n\t\t\tsepNavWindowFrame = \"{{370, 50}, {962, 719}}\";\n\t\t};\n\t};\n\t944D6320085F8B7B00600D6E = {\n\t\tfRef = 944D62AC085F7DA800600D6E;\n\t\tisa = PBXTextBookmark;\n\t\tname = \"SpellingPlugin.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 905;\n\t\tvrLoc = 0;\n\t};\n\t944D6323085F8B7B00600D6E = {\n\t\tfRef = 944D62B5085F7E2A00600D6E;\n\t\tisa = PBXTextBookmark;\n\t\tname = \"SpellingPlugin.h: 9\";\n\t\trLen = 0;\n\t\trLoc = 1128;\n\t\trType = 0;\n\t\tvrLen = 98;\n\t\tvrLoc = 0;\n\t};\n\t944D6326085F8B7B00600D6E = {\n\t\tfRef = 944D62E9085F825200600D6E;\n\t\tisa = PBXTextBookmark;\n\t\tname = \"sqMacSpellingPlugin.h: 71\";\n\t\trLen = 0;\n\t\trLoc = 298;\n\t\trType = 0;\n\t\tvrLen = 0;\n\t\tvrLoc = 871;\n\t};\n\t944D6343085F8D4100600D6E = {\n\t\tfRef = 944D62EA085F825200600D6E;\n\t\tisa = PBXTextBookmark;\n\t\tname = \"sqMacSpellingPlugin.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 196;\n\t\tvrLoc = 0;\n\t};\n\t944D634C085F8DF400600D6E = {\n\t\tfRef = 944D62E9085F825200600D6E;\n\t\tisa = PBXTextBookmark;\n\t\tname = \"sqMacSpellingPlugin.h: sqSpelllingCheckSpellingstartingAtresults\";\n\t\trLen = 0;\n\t\trLoc = 284;\n\t\trType = 0;\n\t\tvrLen = 871;\n\t\tvrLoc = 0;\n\t};\n\t944D6487085FBC6B00600D6E = {\n\t\tfRef = 944D6214085F458100600D6E;\n\t\tisa = PBXTextBookmark;\n\t\tname = \"English: 7\";\n\t\trLen = 0;\n\t\trLoc = 251;\n\t\trType = 0;\n\t\tvrLen = 251;\n\t\tvrLoc = 0;\n\t};\n\t944D64BC085FBD7D00600D6E = {\n\t\tfRef = 944D64BD085FBD7D00600D6E;\n\t\tisa = PBXTextBookmark;\n\t\tname = \"(null): 7\";\n\t\trLen = 0;\n\t\trLoc = 251;\n\t\trType = 0;\n\t\tvrLen = 251;\n\t\tvrLoc = 0;\n\t};\n\t944D64BD085FBD7D00600D6E = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = text.plist.strings;\n\t\tname = InfoPlist.strings;\n\t\tpath = /Users/johnmci/Documents/SqueakSpellingPlugin/build/SpellingPlugin.bundle/Contents/Resources/InfoPlist.strings;\n\t\trefType = 0;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t944D64BE085FBD7D00600D6E = {\n\t\tfRef = 94AF34F10846F91100FA5ACB;\n\t\tisa = PBXTextBookmark;\n\t\tname = \"Info.plist: 27\";\n\t\trLen = 0;\n\t\trLoc = 893;\n\t\trType = 0;\n\t\tvrLen = 903;\n\t\tvrLoc = 0;\n\t};\n\t944D64C0085FBD7D00600D6E = {\n\t\tfRef = 94AF34F10846F91100FA5ACB;\n\t\tisa = PBXTextBookmark;\n\t\tname = \"Info.plist: 27\";\n\t\trLen = 0;\n\t\trLoc = 893;\n\t\trType = 0;\n\t\tvrLen = 903;\n\t\tvrLoc = 0;\n\t};\n\t944D66AD085FC39200600D6E = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {556, 490}}\";\n\t\t\tsepNavSelRange = \"{8, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {556, 490}}\";\n\t\t};\n\t};\n\t944D66BE085FC3F300600D6E = {\n\t\tfRef = 944D62AC085F7DA800600D6E;\n\t\tisa = PBXTextBookmark;\n\t\tname = SQUEAK_BUILTIN_PLUGIN;\n\t\trLen = 0;\n\t\trLoc = 45;\n\t\trType = 0;\n\t\tvrLen = 777;\n\t\tvrLoc = 2154;\n\t};\n\t944D679B085FDFFE00600D6E = {\n\t\tfileReference = 944D62AC085F7DA800600D6E;\n\t\tisa = PBXFileBreakpoint;\n\t\tlineNumber = 1;\n\t\tstate = 1;\n\t};\n\t9465F81D0860EE66006CDE9D = {\n\t\tfRef = 944D62EA085F825200600D6E;\n\t\tisa = PBXTextBookmark;\n\t\trLen = 1;\n\t\trLoc = 34;\n\t\trType = 1;\n\t};\n\t9465F8D50860F206006CDE9D = {\n\t\tfRef = 944D66AD085FC39200600D6E;\n\t\tisa = PBXTextBookmark;\n\t\tname = \"PkgInfo: 1\";\n\t\trLen = 0;\n\t\trLoc = 8;\n\t\trType = 0;\n\t\tvrLen = 8;\n\t\tvrLoc = 0;\n\t};\n\t9465F8D60860F206006CDE9D = {\n\t\tfRef = 944D62B5085F7E2A00600D6E;\n\t\tisa = PBXTextBookmark;\n\t\tname = sqSpellingGetLanguageLength;\n\t\trLen = 27;\n\t\trLoc = 275;\n\t\trType = 0;\n\t\tvrLen = 1128;\n\t\tvrLoc = 0;\n\t};\n\t9465F8D70860F206006CDE9D = {\n\t\tcomments = \"warning: implicit declaration of function `sqSpellingGetLanguageLength'\";\n\t\tfRef = 944D62EA085F825200600D6E;\n\t\tisa = PBXTextBookmark;\n\t\trLen = 1;\n\t\trLoc = 93;\n\t\trType = 1;\n\t};\n\t9465F8D80860F206006CDE9D = {\n\t\tfRef = 944D66AD085FC39200600D6E;\n\t\tisa = PBXTextBookmark;\n\t\tname = \"PkgInfo: 1\";\n\t\trLen = 0;\n\t\trLoc = 8;\n\t\trType = 0;\n\t\tvrLen = 8;\n\t\tvrLoc = 0;\n\t};\n\t9465F8D90860F206006CDE9D = {\n\t\tfRef = 944D62B5085F7E2A00600D6E;\n\t\tisa = PBXTextBookmark;\n\t\tname = sqSpellingGetLanguageLength;\n\t\trLen = 27;\n\t\trLoc = 275;\n\t\trType = 0;\n\t\tvrLen = 1128;\n\t\tvrLoc = 0;\n\t};\n\t9465F8FD08611131006CDE9D = {\n\t\tfRef = 944D62EA085F825200600D6E;\n\t\tisa = PBXTextBookmark;\n\t\tname = \"sqMacSpellingPlugin.c: 97\";\n\t\trLen = 0;\n\t\trLoc = 4272;\n\t\trType = 0;\n\t\tvrLen = 1020;\n\t\tvrLoc = 3942;\n\t};\n\t9465F8FE08611131006CDE9D = {\n\t\tfRef = 944D62EA085F825200600D6E;\n\t\tisa = PBXTextBookmark;\n\t\tname = \"sqMacSpellingPlugin.c: 98\";\n\t\trLen = 0;\n\t\trLoc = 4482;\n\t\trType = 0;\n\t\tvrLen = 1516;\n\t\tvrLoc = 3275;\n\t};\n\t949CD57E085CBE5900EB8605 = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = text.plist.strings;\n\t\tname = InfoPlist.strings;\n\t\tpath = /Users/johnmci/Documents/SqueakSerialPortExtendedUnixPlugin/resources/English.lproj/InfoPlist.strings;\n\t\trefType = 0;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t949CD5C0085CC32700EB8605 = {\n\t\tfRef = 66C6C8E501DB1EC300A80109;\n\t\tisa = PBXBookmark;\n\t};\n\t949CD5C5085CC32700EB8605 = {\n\t\tfRef = 949CD57E085CBE5900EB8605;\n\t\tisa = PBXTextBookmark;\n\t\tname = \"InfoPlist.strings: 1\";\n\t\trLen = 215;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 215;\n\t\tvrLoc = 0;\n\t};\n\t949CD5C6085CC32700EB8605 = {\n\t\tfRef = 66C6C8E501DB1EC300A80109;\n\t\tisa = PBXBookmark;\n\t};\n\t94ABA91E0858D35E00079BE1 = {\n\t\tactiveArgIndex = 2147483647;\n\t\tactiveArgIndices = (\n\t\t);\n\t\targumentStrings = (\n\t\t);\n\t\tconfigStateDict = {\n\t\t};\n\t\tcppStopOnCatchEnabled = 0;\n\t\tcppStopOnThrowEnabled = 0;\n\t\tcustomDataFormattersEnabled = 1;\n\t\tdebuggerPlugin = GDBDebugging;\n\t\tdisassemblyDisplayState = 0;\n\t\tdylibVariantSuffix = \"\";\n\t\tenableDebugStr = 1;\n\t\tenvironmentEntries = (\n\t\t);\n\t\texecutableSystemSymbolLevel = 0;\n\t\texecutableUserSymbolLevel = 0;\n\t\tisa = PBXExecutable;\n\t\tlaunchableReference = 94ABA91F0858D35E00079BE1;\n\t\tlibgmallocEnabled = 0;\n\t\tname = Squeak;\n\t\tsavedGlobals = {\n\t\t\t/Users/johnmci/Documents/Squeak3.8.0/build/Plugins/ServicesPlugin.bundle/Contents/MacOS/ServicesPlugin = (\n\t\t\t\t{\n\t\t\t\t\tdataValue = \"  PBXGDB_VarObjDataValue2=0xa24e0c0, rtnCnt=1, parent=0x0, validityStatus=Valid, numChildren=0, childValidityStatus=Invalid, numViewController=0, name=MyAppsDataTypes, value=[256]\\n\";\n\t\t\t\t\tdisplay = YES;\n\t\t\t\t\tfilename = /Users/johnmci/Documents/SqueakServicesPlugin/sqMacServices.c;\n\t\t\t\t\tname = MyAppsDataTypes;\n\t\t\t\t\ttype = \"char [256]\";\n\t\t\t\t\tvalue = \"[256]\";\n\t\t\t\t\tvarobj = var108;\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdataValue = \"  PBXGDB_VarObjDataValue2=0x910d3e0, rtnCnt=3, parent=0x649ad10, validityStatus=Valid, numChildren=0, childValidityStatus=Invalid, numViewController=0, name=myTextStringInLength, value=0\n\";\n\t\t\t\t\tdisplay = YES;\n\t\t\t\t\tfilename = /Users/johnmci/Documents/SqueakServicesPlugin/sqMacServices.c;\n\t\t\t\t\tname = myTextStringInLength;\n\t\t\t\t\ttype = \"long int\";\n\t\t\t\t\tvalue = 0;\n\t\t\t\t\tvarobj = var135;\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdataValue = \"  PBXGDB_VarObjDataValue2=0x911b040, rtnCnt=3, parent=0x649ad10, validityStatus=Valid, numChildren=0, childValidityStatus=Invalid, numViewController=0, name=MyAppsDataTypes, value=[64]\n\";\n\t\t\t\t\tdisplay = YES;\n\t\t\t\t\tfilename = /Users/johnmci/Documents/SqueakServicesPlugin/sqMacServices.c;\n\t\t\t\t\tname = MyAppsDataTypes;\n\t\t\t\t\ttype = \"OSType [64]\";\n\t\t\t\t\tvalue = \"[64]\";\n\t\t\t\t\tvarobj = var136;\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdataValue = \"  PBXGDB_VarObjDataValue2=0x911b4a0, rtnCnt=3, parent=0x649ad10, validityStatus=Valid, numChildren=0, childValidityStatus=Invalid, numViewController=0, name=specificScrap, value=0x0\n\";\n\t\t\t\t\tdisplay = YES;\n\t\t\t\t\tfilename = /Users/johnmci/Documents/SqueakServicesPlugin/sqMacServices.c;\n\t\t\t\t\tname = specificScrap;\n\t\t\t\t\ttype = ScrapRef;\n\t\t\t\t\tvalue = 0x0;\n\t\t\t\t\tvarobj = var137;\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdataValue = \"  PBXGDB_VarObjDataValue2=0x9101420, rtnCnt=3, parent=0x649ad10, validityStatus=Valid, numChildren=0, childValidityStatus=Invalid, numViewController=0, name=myTextStringOut, value=0x0\n\";\n\t\t\t\t\tdisplay = YES;\n\t\t\t\t\tfilename = /Users/johnmci/Documents/SqueakServicesPlugin/sqMacServices.c;\n\t\t\t\t\tname = myTextStringOut;\n\t\t\t\t\ttype = \"char *\";\n\t\t\t\t\tvalue = 0x0;\n\t\t\t\t\tvarobj = var139;\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdataValue = \"  PBXGDB_VarObjDataValue2=0x9101ac0, rtnCnt=3, parent=0x649ad10, validityStatus=Valid, numChildren=0, childValidityStatus=Invalid, numViewController=0, name=myTextStringIn, value=0x0\n\";\n\t\t\t\t\tdisplay = YES;\n\t\t\t\t\tfilename = /Users/johnmci/Documents/SqueakServicesPlugin/sqMacServices.c;\n\t\t\t\t\tname = myTextStringIn;\n\t\t\t\t\ttype = \"char *\";\n\t\t\t\t\tvalue = 0x0;\n\t\t\t\t\tvarobj = var140;\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdataValue = \"  PBXGDB_VarObjDataValue2=0x9103a40, rtnCnt=3, parent=0x649ad10, validityStatus=Valid, numChildren=0, childValidityStatus=Invalid, numViewController=0, name=MyAppsDataTypesSize, value=4\n\";\n\t\t\t\t\tdisplay = YES;\n\t\t\t\t\tfilename = /Users/johnmci/Documents/SqueakServicesPlugin/sqMacServices.c;\n\t\t\t\t\tname = MyAppsDataTypesSize;\n\t\t\t\t\ttype = \"long int\";\n\t\t\t\t\tvalue = 4;\n\t\t\t\t\tvarobj = var146;\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdataValue = \"  PBXGDB_VarObjDataValue2=0x9103e80, rtnCnt=3, parent=0x649ad10, validityStatus=Valid, numChildren=0, childValidityStatus=Invalid, numViewController=0, name=myTextStringOutLength, value=0\n\";\n\t\t\t\t\tdisplay = YES;\n\t\t\t\t\tfilename = /Users/johnmci/Documents/SqueakServicesPlugin/sqMacServices.c;\n\t\t\t\t\tname = myTextStringOutLength;\n\t\t\t\t\ttype = \"long int\";\n\t\t\t\t\tvalue = 0;\n\t\t\t\t\tvarobj = var147;\n\t\t\t\t},\n\t\t\t);\n\t\t\t/Users/johnmci/Documents/Squeak3.8.0/build/Plugins/SpellingPlugin.bundle/Contents/MacOS/SpellingPlugin = (\n\t\t\t\t{\n\t\t\t\t\tdataValue = \"  PBXGDB_VarObjDataValue2=0x93d2b90, rtnCnt=3, parent=0x649ad10, validityStatus=Valid, numChildren=0, childValidityStatus=Invalid, numViewController=0, name=CocoaIgnoreWord, value=0x532146c\n\";\n\t\t\t\t\tdisplay = YES;\n\t\t\t\t\tfilename = /Users/johnmci/Documents/SqueakSpellingPlugin/sqMacSpellingPlugin.c;\n\t\t\t\t\tname = CocoaIgnoreWord;\n\t\t\t\t\ttype = IgnoreWordProc;\n\t\t\t\t\tvalue = \"0x532146c <IgnoreWord>\";\n\t\t\t\t\tvarobj = var115;\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdataValue = \"  PBXGDB_VarObjDataValue2=0x97553b0, rtnCnt=3, parent=0x649ad10, validityStatus=Valid, numChildren=0, childValidityStatus=Invalid, numViewController=0, name=CocoaCloseSpellDocumentWithTag, value=0x53210fc\n\";\n\t\t\t\t\tdisplay = YES;\n\t\t\t\t\tfilename = /Users/johnmci/Documents/SqueakSpellingPlugin/sqMacSpellingPlugin.c;\n\t\t\t\t\tname = CocoaCloseSpellDocumentWithTag;\n\t\t\t\t\ttype = CloseSpellDocumentWithTagProc;\n\t\t\t\t\tvalue = \"0x53210fc <CloseSpellDocumentWithTag>\";\n\t\t\t\t\tvarobj = var117;\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdataValue = \"  PBXGDB_VarObjDataValue2=0x99a8c30, rtnCnt=3, parent=0x649ad10, validityStatus=Valid, numChildren=0, childValidityStatus=Invalid, numViewController=0, name=CocoaUniqueSpellDocumentTag, value=0x5321030\n\";\n\t\t\t\t\tdisplay = YES;\n\t\t\t\t\tfilename = /Users/johnmci/Documents/SqueakSpellingPlugin/sqMacSpellingPlugin.c;\n\t\t\t\t\tname = CocoaUniqueSpellDocumentTag;\n\t\t\t\t\ttype = UniqueSpellDocumentTagProc;\n\t\t\t\t\tvalue = \"0x5321030 <UniqueSpellDocumentTag>\";\n\t\t\t\t\tvarobj = var118;\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdataValue = \"  PBXGDB_VarObjDataValue2=0x99ab540, rtnCnt=3, parent=0x649ad10, validityStatus=Valid, numChildren=0, childValidityStatus=Invalid, numViewController=0, name=CocoaLanguage, value=0x5321a7c\n\";\n\t\t\t\t\tdisplay = YES;\n\t\t\t\t\tfilename = /Users/johnmci/Documents/SqueakSpellingPlugin/sqMacSpellingPlugin.c;\n\t\t\t\t\tname = CocoaLanguage;\n\t\t\t\t\ttype = LanguageProc;\n\t\t\t\t\tvalue = \"0x5321a7c <language>\";\n\t\t\t\t\tvarobj = var119;\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdataValue = \"  PBXGDB_VarObjDataValue2=0x99ab5e0, rtnCnt=3, parent=0x649ad10, validityStatus=Valid, numChildren=0, childValidityStatus=Invalid, numViewController=0, name=CocoaSetIgnoredWords, value=0x532155c\n\";\n\t\t\t\t\tdisplay = YES;\n\t\t\t\t\tfilename = /Users/johnmci/Documents/SqueakSpellingPlugin/sqMacSpellingPlugin.c;\n\t\t\t\t\tname = CocoaSetIgnoredWords;\n\t\t\t\t\ttype = SetIgnoredWordsProc;\n\t\t\t\t\tvalue = \"0x532155c <SetIgnoredWords>\";\n\t\t\t\t\tvarobj = var120;\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdataValue = \"  PBXGDB_VarObjDataValue2=0x93d33e0, rtnCnt=3, parent=0x649ad10, validityStatus=Valid, numChildren=0, childValidityStatus=Invalid, numViewController=0, name=CocoaSetLanguage, value=0x5321b68\n\";\n\t\t\t\t\tdisplay = YES;\n\t\t\t\t\tfilename = /Users/johnmci/Documents/SqueakSpellingPlugin/sqMacSpellingPlugin.c;\n\t\t\t\t\tname = CocoaSetLanguage;\n\t\t\t\t\ttype = SetLanguageProc;\n\t\t\t\t\tvalue = \"0x5321b68 <setLanguage>\";\n\t\t\t\t\tvarobj = var122;\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdataValue = \"  PBXGDB_VarObjDataValue2=0x93d2670, rtnCnt=3, parent=0x649ad10, validityStatus=Valid, numChildren=0, childValidityStatus=Invalid, numViewController=0, name=CocoaIgnoredWordsInSpellDocumentWithTag, value=0x532164c\n\";\n\t\t\t\t\tdisplay = YES;\n\t\t\t\t\tfilename = /Users/johnmci/Documents/SqueakSpellingPlugin/sqMacSpellingPlugin.c;\n\t\t\t\t\tname = CocoaIgnoredWordsInSpellDocumentWithTag;\n\t\t\t\t\ttype = IgnoredWordsInSpellDocumentWithTagProc;\n\t\t\t\t\tvalue = \"0x532164c <CopyIgnoredWordsInSpellDocumentWithTag>\";\n\t\t\t\t\tvarobj = var123;\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdataValue = \"  PBXGDB_VarObjDataValue2=0x9712ef0, rtnCnt=3, parent=0x649ad10, validityStatus=Valid, numChildren=0, childValidityStatus=Invalid, numViewController=0, name=CocoaGuessesForWord, value=0x5321760\n\";\n\t\t\t\t\tdisplay = YES;\n\t\t\t\t\tfilename = /Users/johnmci/Documents/SqueakSpellingPlugin/sqMacSpellingPlugin.c;\n\t\t\t\t\tname = CocoaGuessesForWord;\n\t\t\t\t\ttype = GuessesForWordProc;\n\t\t\t\t\tvalue = \"0x5321760 <GuessesForWord>\";\n\t\t\t\t\tvarobj = var125;\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdataValue = \"  PBXGDB_VarObjDataValue2=0x972a590, rtnCnt=3, parent=0x649ad10, validityStatus=Valid, numChildren=0, childValidityStatus=Invalid, numViewController=0, name=CocoaCheckSpellingOfString, value=0x53211e0\n\";\n\t\t\t\t\tdisplay = YES;\n\t\t\t\t\tfilename = /Users/johnmci/Documents/SqueakSpellingPlugin/sqMacSpellingPlugin.c;\n\t\t\t\t\tname = CocoaCheckSpellingOfString;\n\t\t\t\t\ttype = CheckSpellingOfStringProc;\n\t\t\t\t\tvalue = \"0x53211e0 <CheckSpellingOfString>\";\n\t\t\t\t\tvarobj = var128;\n\t\t\t\t},\n\t\t\t);\n\t\t};\n\t\tshlibInfoDictList_v2 = (\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/system/libmathCommon.A.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libSystem.B.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libicucore.A.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libauto.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libobjc.A.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libz.1.2.2.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Security.framework/Versions/A/Security;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/WebServicesCore.framework/Versions/A/WebServicesCore;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CarbonSound.framework/Versions/A/CarbonSound;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libbsm.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libcrypto.0.9.7.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreText.framework/Versions/A/CoreText;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libcups.2.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/FindByContent.framework/Versions/A/FindByContent;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRaw.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libmx.A.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libiconv.2.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libxml2.2.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HTMLRendering.framework/Versions/A/HTMLRendering;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/NavigationServices.framework/Versions/A/NavigationServices;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/AGL.framework/Versions/A/AGL;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/PrivateFrameworks/ZeroLink.framework/Versions/A/ZeroLink;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /Users/johnmci/Documents/Squeak3.8.0/build/Squeak.app/Contents/MacOS/Squeak;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacEncoding.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/interp.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacUIMenuBar.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacUIEvents.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacMain.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacUIClipBoard.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacWindow.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacUnixCommandLineInterface.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacUIAppleEvents.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacFileLogic.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacImageIO.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Components/DictionaryService.component/Contents/MacOS/DictionaryService;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacMemory.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacTime.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/UUIDPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/SurfacePlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/StarSqueakPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/SoundPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/SoundGenerationPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/SoundCodecPrims.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/SocketPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/SerialPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/SecurityPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/MiscPrimitivePlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/Matrix2x3Plugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/MIDIPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/MacMenubarPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/LargeIntegers.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/Klatt.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/JoystickTabletPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/JPEGReaderPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/Error.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/JPEGReadWriter2Plugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/InternetConfigPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/HostWindowPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/GeniePlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/FloatArrayPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/FilePlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/FFTPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/DropPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/ZipPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/DSAPrims.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/BitBltPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/B2DPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/BMPReadWriterPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/Squeak3D.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/B3DAcceleratorPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/AsynchFilePlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/ADPCMCodecPlugin.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacSerialPort.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/osExports.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqNamedPrims.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqVirtualMachine.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/aio.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacExternalPrims.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacHostWindow.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacSecurity.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqFilePluginBasicPrims.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacDirectory.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacDragDrop.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqMacUnixInterfaceSound.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqUnixSoundMacOSXJMM.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /Users/johnmci/Documents/Squeak3.8.0/build/Plugins/LocalePlugin.bundle/Contents/MacOS/LocalePlugin;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /Developer/Applications/Xcode.app/Contents/PlugIns/GDBMIDebugging.xcplugin/Contents/Resources/PBGDBIntrospectionSupport.A.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Library/Application Support/Apple/Developer Tools/CustomDataViews/CFDataFormatters.bundle/Contents/MacOS/CFDataFormatters\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/SqueakVMForCarbon.build/Squeak VM Debug (Upgraded).build/Objects-normal/ppc/sqUnixSocket.ob\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /Users/johnmci/Documents/Squeak3.8.0/build/Plugins/ServicesPlugin.bundle/Contents/MacOS/ServicesPlugin;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libgcc_s.1.0.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/usr/lib/libstdc++.6.0.3.dylib\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = \"/Library/Application Support/Apple/Developer Tools/CustomDataViews/CarbonDataFormatters.bundle/Contents/MacOS/CarbonDataFormatters\";\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/dyld;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/PrivateFrameworks/URLMount.framework/Versions/A/URLMount;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /Users/johnmci/Documents/Squeak3.8.0/build/Plugins/SpellingPlugin.bundle/Contents/MacOS/SpellingPlugin;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /usr/lib/libsqlite3.0.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel = 0;\n\t\t\t\tpath = /Users/johnmci/Documents/Squeak3.8.0/build/Plugins/SpellingPlugin.bundle/Contents/Frameworks/SpellCheck.bundle/Contents/MacOS/SpellCheck;\n\t\t\t\twhenToLoad = 0;\n\t\t\t},\n\t\t);\n\t\tsourceDirectories = (\n\t\t);\n\t};\n\t94ABA91F0858D35E00079BE1 = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = wrapper.application;\n\t\tname = Squeak.app;\n\t\tpath = /Users/johnmci/Documents/Squeak3.8.0/build/Squeak.app;\n\t\trefType = 0;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94AF34E00846F91100FA5ACB = {\n\t\tactiveExec = 0;\n\t};\n\t94AF34F10846F91100FA5ACB = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {686, 490}}\";\n\t\t\tsepNavSelRange = \"{893, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {659, 490}}\";\n\t\t\tsepNavWindowFrame = \"{{84, 91}, {962, 719}}\";\n\t\t};\n\t};\n\t94AF35000846F98600FA5ACB = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {673, 2590}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {673, 397}}\";\n\t\t};\n\t};\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SpellingPlugin/SqueakSpelling.pbproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 39;\n\tobjects = {\n\t\t66B8BC570381F53800A8011A = {\n\t\t\tchildren = (\n\t\t\t\t94AF35040846F9AB00FA5ACB,\n\t\t\t\t94AF35000846F98600FA5ACB,\n\t\t\t\t66B8BC580381F61C00A8011A,\n\t\t\t\t66B8BC5A0381F63A00A8011A,\n\t\t\t\t944D66AD085FC39200600D6E,\n\t\t\t\t66B8BC5C0381F66500A8011A,\n\t\t\t\t66B8BC5E0381F69100A8011A,\n\t\t\t\t94ABA8920858C40D00079BE1,\n\t\t\t);\n\t\t\tisa = PBXGroup;\n\t\t\tname = platforms;\n\t\t\tpath = ../Squeak3.8.0/platforms;\n\t\t\trefType = 2;\n\t\t\tsourceTree = SOURCE_ROOT;\n\t\t};\n\t\t66B8BC580381F61C00A8011A = {\n\t\t\tfileEncoding = 30;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.h;\n\t\t\tname = sqConfig.h;\n\t\t\tpath = \"Mac OS/vm/sqConfig.h\";\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66B8BC5A0381F63A00A8011A = {\n\t\t\tfileEncoding = 30;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.h;\n\t\t\tname = sqPlatformSpecific.h;\n\t\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/platforms/Mac OS/vm/sqPlatformSpecific.h\";\n\t\t\trefType = 0;\n\t\t\tsourceTree = \"<absolute>\";\n\t\t};\n\t\t66B8BC5C0381F66500A8011A = {\n\t\t\tfileEncoding = 30;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.h;\n\t\t\tname = sq.h;\n\t\t\tpath = Cross/vm/sq.h;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66B8BC5E0381F69100A8011A = {\n\t\t\tfileEncoding = 30;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.h;\n\t\t\tname = sqVirtualMachine.h;\n\t\t\tpath = /Users/johnmci/Documents/Squeak3.8.0/platforms/Cross/vm/sqVirtualMachine.h;\n\t\t\trefType = 0;\n\t\t\tsourceTree = \"<absolute>\";\n\t\t};\n\t\t66C6C8E501DB1EC300A80109 = {\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = image.icns;\n\t\t\tpath = SqueakPlugin.icns;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66DF6BFD01D7DCEA00A80119 = {\n\t\t\tbuildSettings = {\n\t\t\t};\n\t\t\tbuildStyles = (\n\t\t\t\t66DF6C4301D7DCEA00A80119,\n\t\t\t\t66DF6C4401D7DCEA00A80119,\n\t\t\t);\n\t\t\thasScannedForEncodings = 1;\n\t\t\tisa = PBXProject;\n\t\t\tmainGroup = 66DF6BFE01D7DCEA00A80119;\n\t\t\tproductRefGroup = 66DF6C4501D7DEEE00A80119;\n\t\t\tprojectDirPath = \"\";\n\t\t\ttargets = (\n\t\t\t\t94AF34E00846F91100FA5ACB,\n\t\t\t);\n\t\t};\n\t\t66DF6BFE01D7DCEA00A80119 = {\n\t\t\tchildren = (\n\t\t\t\t944D67D1085FF2C300600D6E,\n\t\t\t\t66B8BC570381F53800A8011A,\n\t\t\t\t66DF6BFF01D7DCEA00A80119,\n\t\t\t\t66DF6C3901D7DCEA00A80119,\n\t\t\t\t66DF6C8201D7DF7E00A80119,\n\t\t\t\t66DF6C4501D7DEEE00A80119,\n\t\t\t\t94AF34F10846F91100FA5ACB,\n\t\t\t);\n\t\t\tisa = PBXGroup;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66DF6BFF01D7DCEA00A80119 = {\n\t\t\tchildren = (\n\t\t\t\t944D62E9085F825200600D6E,\n\t\t\t\t944D62EA085F825200600D6E,\n\t\t\t\t944D62B5085F7E2A00600D6E,\n\t\t\t\t944D62AC085F7DA800600D6E,\n\t\t\t);\n\t\t\tisa = PBXGroup;\n\t\t\tname = Sources;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66DF6C3901D7DCEA00A80119 = {\n\t\t\tchildren = (\n\t\t\t\t944D6212085F458100600D6E,\n\t\t\t\t66C6C8E501DB1EC300A80109,\n\t\t\t);\n\t\t\tisa = PBXGroup;\n\t\t\tname = resources;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66DF6C4301D7DCEA00A80119 = {\n\t\t\tbuildSettings = {\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_ENABLE_FIX_AND_CONTINUE = YES;\n\t\t\t\tGCC_GENERATE_DEBUGGING_SYMBOLS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tOPTIMIZATION_CFLAGS = \"-O0\";\n\t\t\t\tZERO_LINK = NO;\n\t\t\t};\n\t\t\tisa = PBXBuildStyle;\n\t\t\tname = Development;\n\t\t};\n\t\t66DF6C4401D7DCEA00A80119 = {\n\t\t\tbuildSettings = {\n\t\t\t\tCOPY_PHASE_STRIP = YES;\n\t\t\t\tGCC_ENABLE_FIX_AND_CONTINUE = NO;\n\t\t\t\tOPTIMIZATION_CFLAGS = \"-O3 -mcpu=750 -funroll-loops \";\n\t\t\t\tOTHER_CFLAGS = \"-DTARGET_OS_MAC -DNOPTHREADS\";\n\t\t\t\tZERO_LINK = NO;\n\t\t\t};\n\t\t\tisa = PBXBuildStyle;\n\t\t\tname = Deployment;\n\t\t};\n\t\t66DF6C4501D7DEEE00A80119 = {\n\t\t\tchildren = (\n\t\t\t\t943173AF085CD38900DDDC64,\n\t\t\t);\n\t\t\tisa = PBXGroup;\n\t\t\tname = Products;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66DF6C8201D7DF7E00A80119 = {\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = wrapper.framework;\n\t\t\tname = Carbon.framework;\n\t\t\tpath = /System/Library/Frameworks/Carbon.framework;\n\t\t\trefType = 0;\n\t\t\tsourceTree = \"<absolute>\";\n\t\t};\n//660\n//661\n//662\n//663\n//664\n//940\n//941\n//942\n//943\n//944\n\t\t943173AF085CD38900DDDC64 = {\n\t\t\texplicitFileType = wrapper.cfbundle;\n\t\t\tincludeInIndex = 0;\n\t\t\tisa = PBXFileReference;\n\t\t\tpath = SpellingPlugin.bundle;\n\t\t\trefType = 3;\n\t\t\tsourceTree = BUILT_PRODUCTS_DIR;\n\t\t};\n\t\t944D6212085F458100600D6E = {\n\t\t\tchildren = (\n\t\t\t\t944D6213085F458100600D6E,\n\t\t\t);\n\t\t\tisa = PBXGroup;\n\t\t\tname = English.lproj;\n\t\t\tpath = resources/English.lproj;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t944D6213085F458100600D6E = {\n\t\t\tchildren = (\n\t\t\t\t944D6214085F458100600D6E,\n\t\t\t);\n\t\t\tisa = PBXVariantGroup;\n\t\t\tname = InfoPlist.strings;\n\t\t\tpath = \"\";\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t944D6214085F458100600D6E = {\n\t\t\tfileEncoding = 30;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = text.plist.strings;\n\t\t\tname = English;\n\t\t\tpath = InfoPlist.strings;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t944D6215085F458100600D6E = {\n\t\t\tfileRef = 944D6213085F458100600D6E;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t944D62AC085F7DA800600D6E = {\n\t\t\tfileEncoding = 30;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.c;\n\t\t\tpath = SpellingPlugin.c;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t944D62AD085F7DA800600D6E = {\n\t\t\tfileRef = 944D62AC085F7DA800600D6E;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t944D62B5085F7E2A00600D6E = {\n\t\t\tfileEncoding = 4;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.h;\n\t\t\tpath = SpellingPlugin.h;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t944D62B6085F7E2A00600D6E = {\n\t\t\tfileRef = 944D62B5085F7E2A00600D6E;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t944D62E9085F825200600D6E = {\n\t\t\tfileEncoding = 4;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.h;\n\t\t\tpath = sqMacSpellingPlugin.h;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t944D62EA085F825200600D6E = {\n\t\t\tfileEncoding = 4;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.c;\n\t\t\tpath = sqMacSpellingPlugin.c;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t944D62EB085F825200600D6E = {\n\t\t\tfileRef = 944D62E9085F825200600D6E;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t944D62EC085F825200600D6E = {\n\t\t\tfileRef = 944D62EA085F825200600D6E;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t944D668E085FC2E200600D6E = {\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tdstPath = \"\";\n\t\t\tdstSubfolderSpec = 10;\n\t\t\tfiles = (\n\t\t\t\t944D67D3085FF2CF00600D6E,\n\t\t\t);\n\t\t\tisa = PBXCopyFilesBuildPhase;\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t944D66AD085FC39200600D6E = {\n\t\t\tfileEncoding = 30;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = text;\n\t\t\tname = PkgInfo;\n\t\t\tpath = build/PkgInfo;\n\t\t\trefType = 2;\n\t\t\tsourceTree = SOURCE_ROOT;\n\t\t};\n\t\t944D66AE085FC39200600D6E = {\n\t\t\tfileRef = 944D66AD085FC39200600D6E;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t944D66AF085FC39800600D6E = {\n\t\t\tfileRef = 944D66AD085FC39200600D6E;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t944D66B4085FC3C000600D6E = {\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tdstPath = Contents;\n\t\t\tdstSubfolderSpec = 1;\n\t\t\tfiles = (\n\t\t\t\t944D66AF085FC39800600D6E,\n\t\t\t);\n\t\t\tisa = PBXCopyFilesBuildPhase;\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t944D67D1085FF2C300600D6E = {\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = \"wrapper.plug-in\";\n\t\t\tname = SpellCheck.bundle;\n\t\t\tpath = SpellCheck/build/SpellCheck.bundle;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t944D67D3085FF2CF00600D6E = {\n\t\t\tfileRef = 944D67D1085FF2C300600D6E;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t94ABA8920858C40D00079BE1 = {\n\t\t\tfileEncoding = 30;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.h;\n\t\t\tname = sqMemoryAccess.h;\n\t\t\tpath = Cross/vm/sqMemoryAccess.h;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94ABA8930858C40D00079BE1 = {\n\t\t\tfileRef = 94ABA8920858C40D00079BE1;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t94AF34E00846F91100FA5ACB = {\n\t\t\tbuildPhases = (\n\t\t\t\t94AF34E10846F91100FA5ACB,\n\t\t\t\t94AF34E70846F91100FA5ACB,\n\t\t\t\t94AF34EA0846F91100FA5ACB,\n\t\t\t\t94AF34EE0846F91100FA5ACB,\n\t\t\t\t94AF34F00846F91100FA5ACB,\n\t\t\t\t944D668E085FC2E200600D6E,\n\t\t\t\t944D66B4085FC3C000600D6E,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t\t94AF34F70846F94F00FA5ACB,\n\t\t\t);\n\t\t\tbuildSettings = {\n\t\t\t\tGCC_GENERATE_DEBUGGING_SYMBOLS = NO;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 3;\n\t\t\t\tHEADER_SEARCH_PATHS = /Developer/Headers/FlatCarbon;\n\t\t\t\tINFOPLIST_FILE = Info.plist;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tOTHER_REZFLAGS = \"\";\n\t\t\t\tPRODUCT_NAME = SpellingPlugin;\n\t\t\t\tSECTORDER_FLAGS = \"\";\n\t\t\t\tWARNING_CFLAGS = \"-Wmost -Wno-four-char-constants -Wno-unknown-pragmas\";\n\t\t\t\tWRAPPER_EXTENSION = bundle;\n\t\t\t};\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tisa = PBXNativeTarget;\n\t\t\tname = \"SqueakSpellingPlugin (Upgraded)\";\n\t\t\tproductInstallPath = \"$(USER_LIBRARY_DIR)/Bundles\";\n\t\t\tproductName = \"mpeg3PluginBundle Debug\";\n\t\t\tproductReference = 943173AF085CD38900DDDC64;\n\t\t\tproductType = \"com.apple.product-type.bundle\";\n\t\t};\n\t\t94AF34E10846F91100FA5ACB = {\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t94AF34E20846F91100FA5ACB,\n\t\t\t\t94AF34E30846F91100FA5ACB,\n\t\t\t\t94AF34E40846F91100FA5ACB,\n\t\t\t\t94AF34E50846F91100FA5ACB,\n\t\t\t\t94AF35010846F98600FA5ACB,\n\t\t\t\t94AF35050846F9AB00FA5ACB,\n\t\t\t\t94ABA8930858C40D00079BE1,\n\t\t\t\t944D62B6085F7E2A00600D6E,\n\t\t\t\t944D62EB085F825200600D6E,\n\t\t\t);\n\t\t\tisa = PBXHeadersBuildPhase;\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t94AF34E20846F91100FA5ACB = {\n\t\t\tfileRef = 66B8BC580381F61C00A8011A;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t94AF34E30846F91100FA5ACB = {\n\t\t\tfileRef = 66B8BC5A0381F63A00A8011A;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t94AF34E40846F91100FA5ACB = {\n\t\t\tfileRef = 66B8BC5C0381F66500A8011A;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t94AF34E50846F91100FA5ACB = {\n\t\t\tfileRef = 66B8BC5E0381F69100A8011A;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t94AF34E70846F91100FA5ACB = {\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t94AF34E80846F91100FA5ACB,\n\t\t\t\t944D6215085F458100600D6E,\n\t\t\t\t944D66AE085FC39200600D6E,\n\t\t\t);\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t94AF34E80846F91100FA5ACB = {\n\t\t\tfileRef = 66C6C8E501DB1EC300A80109;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t94AF34EA0846F91100FA5ACB = {\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t944D62AD085F7DA800600D6E,\n\t\t\t\t944D62EC085F825200600D6E,\n\t\t\t);\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t94AF34EE0846F91100FA5ACB = {\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t94AF34EF0846F91100FA5ACB,\n\t\t\t);\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t94AF34EF0846F91100FA5ACB = {\n\t\t\tfileRef = 66DF6C8201D7DF7E00A80119;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t94AF34F00846F91100FA5ACB = {\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tisa = PBXRezBuildPhase;\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t94AF34F10846F91100FA5ACB = {\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = text.xml;\n\t\t\tpath = Info.plist;\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94AF34F70846F94F00FA5ACB = {\n\t\t\tcompilerSpec = com.apple.compilers.gcc.3_3;\n\t\t\tfileType = sourcecode.c;\n\t\t\tisEditable = 1;\n\t\t\tisa = PBXBuildRule;\n\t\t\toutputFiles = (\n\t\t\t);\n\t\t};\n\t\t94AF35000846F98600FA5ACB = {\n\t\t\tfileEncoding = 30;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.h;\n\t\t\tname = config.h;\n\t\t\tpath = \"Mac OS/vm/config.h\";\n\t\t\trefType = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94AF35010846F98600FA5ACB = {\n\t\t\tfileRef = 94AF35000846F98600FA5ACB;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t\t94AF35040846F9AB00FA5ACB = {\n\t\t\tfileEncoding = 30;\n\t\t\tisa = PBXFileReference;\n\t\t\tlastKnownFileType = sourcecode.c.h;\n\t\t\tname = interp.h;\n\t\t\tpath = ../Squeak3.8.0/src/vm/interp.h;\n\t\t\trefType = 2;\n\t\t\tsourceTree = SOURCE_ROOT;\n\t\t};\n\t\t94AF35050846F9AB00FA5ACB = {\n\t\t\tfileRef = 94AF35040846F9AB00FA5ACB;\n\t\t\tisa = PBXBuildFile;\n\t\t\tsettings = {\n\t\t\t};\n\t\t};\n\t};\n\trootObject = 66DF6BFD01D7DCEA00A80119;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SpellingPlugin/build/.gdb_history",
    "content": ""
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SpellingPlugin/build/PkgInfo",
    "content": "BNDLFAST"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SpellingPlugin/resources/English.lproj/InfoPlist.strings",
    "content": "/* Localized versions of Info.plist keys */\n\nCFBundleName = \"SpellingPlugin\";\nCFBundleShortVersionString = \"SpellingPlugin version 1.0.0B1\";\nCFBundleGetInfoString = \"SpellingPlugin version 1.0.0B1\";\nNSHumanReadableCopyright = \"http://www.squeak.org\";\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SpellingPlugin/sqMacSpellingPlugin.c",
    "content": "/*\n *  sqMacSpellingPlugin.c\n *  SqueakSpelling\n *\n *  Created by John M McIntosh on 14/06/05.\n *  Copyright 2005 Corporate Smalltalk Consulting Ltd. All rights reserved. Licenced under the Squeak-L\n *\n */\n\n#include \"sqMacSpellingPlugin.h\"\n\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#if __BIG_ENDIAN__\n#define kCFStringEncodingUTF16Squeak kCFStringEncodingUnicode\n#else\n#define kCFStringEncodingUTF16Squeak kCFStringEncodingUTF16BE\n\n#endif\n\nextern struct VirtualMachine *interpreterProxy;\nCFBundleRef\t\t\tgSpellingBundle=0;\t\t//\t\"SpellCheck.bundle\" reference \n\n//\tFunction pointer prototypes to the Mach-O Cocoa wrappers\ntypedef CFRange\t\t(*CheckSpellingOfStringWithOptionsProc)( CFStringRef, int, CFStringRef,Boolean, int, int );\ntypedef CFRange\t\t(*CheckSpellingOfStringProc)( CFStringRef, int );\ntypedef void\t\t(*IgnoreWordProc)( CFStringRef, int );\ntypedef CFArrayRef\t(*GuessesForWordProc)( CFStringRef );\ntypedef void \t\t(*InitializeCocoaProc)();\ntypedef void\t\t(*CloseSpellDocumentWithTagProc)( int );\ntypedef int \t\t(*UniqueSpellDocumentTagProc)();\ntypedef CFStringRef\t(*LanguageProc)();\ntypedef Boolean\t\t(*SetLanguageProc)(CFStringRef);\ntypedef CFArrayRef\t(*IgnoredWordsInSpellDocumentWithTagProc)( int );\ntypedef void\t\t(*SetIgnoredWordsProc)(CFArrayRef, int );\n\nCheckSpellingOfStringProc\tCocoaCheckSpellingOfString;\nIgnoreWordProc\t\t\t\tCocoaIgnoreWord;\nGuessesForWordProc\t\t\tCocoaGuessesForWord;\nInitializeCocoaProc\t\t\tCocoaInitializeCocoa;\nCloseSpellDocumentWithTagProc\tCocoaCloseSpellDocumentWithTag;\nUniqueSpellDocumentTagProc\t\tCocoaUniqueSpellDocumentTag;\nLanguageProc\t\t\t\tCocoaLanguage;\nSetLanguageProc\t\t\t\tCocoaSetLanguage;\nIgnoredWordsInSpellDocumentWithTagProc\t\t\t\tCocoaIgnoredWordsInSpellDocumentWithTag;\nSetIgnoredWordsProc\t\t\t\tCocoaSetIgnoredWords;\nCheckSpellingOfStringWithOptionsProc CocoaCheckSpellingOfStringWithOptions;\n\nvoid\tLoadPrivateFrameworkBundle( CFStringRef framework, CFBundleRef *bundlePtr, CFStringRef pluginName );\n\nint\t\tgDocumentTag=0;\n\nint\t\tsqSpellingInitialize(void) {\n\tif (gSpellingBundle != NULL) \n\t\treturn 1;\n   LoadPrivateFrameworkBundle( CFSTR(\"SpellCheck.bundle\"), &gSpellingBundle,CFSTR(\"org.squeak.SpellingPlugin\") );\n    if ( gSpellingBundle == NULL ) \n\t\treturn 0;\n\t\n\tCocoaInitializeCocoa\t= (InitializeCocoaProc) CFBundleGetFunctionPointerForName( gSpellingBundle, CFSTR(\"InitializeCocoa\") );\n\tif ( CocoaInitializeCocoa != NULL ) \n\t\t\tCocoaInitializeCocoa();\n\tCocoaCheckSpellingOfString\t\t\t\t\t= (CheckSpellingOfStringProc) CFBundleGetFunctionPointerForName( gSpellingBundle, CFSTR(\"CheckSpellingOfString\") );\n\tCocoaGuessesForWord\t\t\t\t\t\t\t= (GuessesForWordProc) CFBundleGetFunctionPointerForName( gSpellingBundle, CFSTR(\"GuessesForWord\") );\n\tCocoaIgnoreWord\t\t\t\t\t\t\t\t= (IgnoreWordProc) CFBundleGetFunctionPointerForName( gSpellingBundle, CFSTR(\"IgnoreWord\") );\n\tCocoaCloseSpellDocumentWithTag\t\t\t\t= (CloseSpellDocumentWithTagProc) CFBundleGetFunctionPointerForName( gSpellingBundle, CFSTR(\"CloseSpellDocumentWithTag\") );\n\tCocoaUniqueSpellDocumentTag\t\t\t\t\t= (UniqueSpellDocumentTagProc) CFBundleGetFunctionPointerForName( gSpellingBundle, CFSTR(\"UniqueSpellDocumentTag\") );\n\tCocoaLanguage\t\t\t\t\t\t\t\t= (LanguageProc) CFBundleGetFunctionPointerForName( gSpellingBundle, CFSTR(\"language\") );\n\tCocoaSetLanguage\t\t\t\t\t\t\t= (SetLanguageProc) CFBundleGetFunctionPointerForName( gSpellingBundle, CFSTR(\"setLanguage\") );\n\tCocoaIgnoredWordsInSpellDocumentWithTag\t\t= (IgnoredWordsInSpellDocumentWithTagProc) CFBundleGetFunctionPointerForName( gSpellingBundle, CFSTR(\"CopyIgnoredWordsInSpellDocumentWithTag\") );\n\tCocoaSetIgnoredWords\t\t\t\t\t\t= (SetIgnoredWordsProc) CFBundleGetFunctionPointerForName( gSpellingBundle, CFSTR(\"SetIgnoredWords\") );\n\tCocoaCheckSpellingOfStringWithOptions\t\t= (CheckSpellingOfStringWithOptionsProc) CFBundleGetFunctionPointerForName( gSpellingBundle, CFSTR(\"CheckSpellingOfStringWithOptions\") );\n\n\tgDocumentTag = CocoaUniqueSpellDocumentTag();\n\treturn 1;\n}\n\nvoid\tsqSpellingShutdown(void) {\n\tif (gDocumentTag == 0) \n\t\treturn;\n\tif (gSpellingBundle == 0) \n\t\treturn;\n\t\t\n\tCocoaCloseSpellDocumentWithTag(gDocumentTag);\n}\n\n\nCFStringRef\t\tgLanguage=NULL;\nvoid\tsqSpellingCheckSpellingstartingAtlengthresults(char * data,int startLocation,int length, int *results)\n{\n\tCFRange\trange;\n\tCFStringRef\t\tstringToSpellCheck;\n\n\tif (gLanguage == NULL) {\n\t\tint ignore;\n\t\tignore = sqSpellingGetLanguageLength();\n\t}\n\t\t\n\tstringToSpellCheck = CFStringCreateWithBytes(kCFAllocatorDefault, data, length*2, kCFStringEncodingUTF16Squeak, false);\n\n\trange = CocoaCheckSpellingOfStringWithOptions( stringToSpellCheck, startLocation, gLanguage, 0, gDocumentTag,0);\n\tresults[0] = (range.location+1);\n\tresults[1] = (range.length);\n\tCFRelease(stringToSpellCheck);\n}\n\nint\t\tsqSpellingGetLanguageLength(void) {\n\tgLanguage = CocoaLanguage();\n\treturn CFStringGetLength(gLanguage);\t\n}\n\nvoid\tsqSpellingGetLanguageInto(char* string) {\n\tCFRange range = { 0, CFStringGetLength(gLanguage)};\n\tCFIndex usedBufLen,actual;\n\t\n\tactual = CFStringGetBytes(gLanguage, range, kCFStringEncodingMacRoman, 0, false,\n\t\t\t\t\tstring,CFStringGetLength(gLanguage), &usedBufLen);\n}\n\nint\t\tsqSpellingGetUniqueSpellingTag(void) {\n\treturn gDocumentTag;\n}\n\nvoid\tsqSpellingSetLanguagelength(char *string,int length) {\n\tCFStringRef lang;\n\t\n\tlang = CFStringCreateWithBytes(kCFAllocatorDefault, string, length, kCFStringEncodingMacRoman, false);\n\tCocoaSetLanguage(lang);\n\tCFRelease(lang);\n}\n\nCFArrayRef\tguessArray=NULL;\n \nint\t\tsqSpellingGuessForWordListLengthwithTaglength(char *data, int tag,int size) {\n   CFIndex\t\t\t\tcount;\n   CFStringRef\t\t\tword;\n   \n\tif ( guessArray != NULL ) \n\t\t\t{ CFRelease( (void*)guessArray ); guessArray = NULL; }\n\t\t\t\n\tword = CFStringCreateWithBytes(kCFAllocatorDefault, data, size*2, kCFStringEncodingUTF16Squeak, false);\n\tguessArray\t= CocoaGuessesForWord( word );\n\tcount\t= CFArrayGetCount( guessArray );\n\tif (count == 0)\n\t\t{ \n\t\tCFRelease( (void*)guessArray ); \n\t\tguessArray = NULL; }\n\t\t\n\tCFRelease(word);\n\treturn count;\n}\n\nint\t\tsqSpellingGuessForWordwithTagLengthat(int aTag, int indexs){\n\tif ( guessArray == NULL ) \n\t\t\treturn 0;\n\tCFStringRef\tguess = CFArrayGetValueAtIndex( guessArray, indexs );\n\treturn CFStringGetLength(guess);\n}\n\nvoid\tsqSpellingGuessForWordwithTagatinto(int aTag,int index, char *data) {\n\tif ( guessArray == NULL ) \n\t\t\treturn;\n\t{\n\t\tCFStringRef\tguess = CFArrayGetValueAtIndex( guessArray, index );\n\t\tCFRange range = { 0, CFStringGetLength(guess)};\n\t\tCFIndex usedBufLen,actual;\n\n\t\tactual = CFStringGetBytes(guess, range, kCFStringEncodingUTF16Squeak, 0, false,\n\t\t\t\t\tdata,CFStringGetLength(guess)*2, &usedBufLen);\n\t\t\t\t\t\n\t\tif (index+1 == CFArrayGetCount( guessArray )) {\n\t\t\tCFRelease(guessArray);\n\t\t\tguessArray = NULL;\n\t\t}\n\t}\n}\n\nCFArrayRef\tignoredWordsArray=NULL;\n\nint\t\tsqSpellingGetIgnoredWordsListLengthWithTag(int aTag) {\n\tCFIndex\t\t\t\tcount;\n\tif ( ignoredWordsArray != NULL ) \n\t\t\t{ CFRelease( (void*)ignoredWordsArray ); ignoredWordsArray = NULL; }\n\t\t\t\n\tignoredWordsArray = CocoaIgnoredWordsInSpellDocumentWithTag(aTag);\n\tif (ignoredWordsArray == NULL) \n\t\treturn 0;\n\tcount\t= CFArrayGetCount( ignoredWordsArray );\n\treturn count;\n}\n\nint\t\tsqSpellingGetIgnoredWordLengthWithTagat(int aTag, int anIndex){\n\tif ( ignoredWordsArray == NULL ) \n\t\treturn 0;\n\t\t\n\tCFStringRef\tguess = CFArrayGetValueAtIndex( ignoredWordsArray, anIndex );\n\treturn CFStringGetLength(guess);\n}\n\nvoid\tsqSpellingGetIgnoredWordWithTagatinto(int aTag, int anIndex, char *data) {\n\tif ( ignoredWordsArray == NULL ) \n\t\treturn;\n\t{\n\tCFStringRef\tignoreWord = CFArrayGetValueAtIndex( ignoredWordsArray, anIndex );\n\tCFRange range = { 0, CFStringGetLength(ignoreWord)};\n\tCFIndex usedBufLen,actual;\n\n\tactual = CFStringGetBytes(ignoreWord, range, kCFStringEncodingUTF16Squeak, 0, false,\n\t\t\t\t\tdata,CFStringGetLength(ignoreWord)*2, &usedBufLen);\n\t}\n}\n\nCFMutableArrayRef\tnewIgnoredWordsArray=NULL;\nCFIndex\t\t\t\tnewIgnoredWordsArrayLength=0;\n\nvoid\tsqSpellingSetIgnoredWordsListLengthwithTag(int length, int aTag) {\n\tif ( newIgnoredWordsArray != NULL ) \n\t\t\t{ CFRelease( (void*)newIgnoredWordsArray ); newIgnoredWordsArray = NULL; }\n\n\tnewIgnoredWordsArrayLength = length;\n\tnewIgnoredWordsArray = CFArrayCreateMutable(kCFAllocatorDefault, newIgnoredWordsArrayLength, NULL);\n\tif (newIgnoredWordsArrayLength == 0) {\n\t\tCocoaSetIgnoredWords(newIgnoredWordsArray,aTag);\n\t\tCFRelease(newIgnoredWordsArray);\n\t\tnewIgnoredWordsArray = NULL;\n\t}\n\t\t\n}\n\nvoid\tsqSpellingSetIgnoredWordwithTagatlength(char *data,int aTag, int anIndex, int length) {\n\tCFStringRef word;\n\tif (newIgnoredWordsArray == NULL) \n\t\t\treturn;\n\tword = CFStringCreateWithBytes(kCFAllocatorDefault, data, length*2, kCFStringEncodingUTF16Squeak, false);\n\tCFArraySetValueAtIndex (newIgnoredWordsArray,anIndex,word);\n\tif ((anIndex+1) == newIgnoredWordsArrayLength) {\n\t\tCocoaSetIgnoredWords(newIgnoredWordsArray,aTag);\n\t\tCFRelease(newIgnoredWordsArray);\n\t\tnewIgnoredWordsArray = NULL;\n\t}\n}\n\nvoid\tsqSpellingSetNewIgnoredWordwithTaglength(char *data,int aTag, int length) {\n\tCFStringRef\tword;\n\tword = CFStringCreateWithBytes(kCFAllocatorDefault, data, length*2, kCFStringEncodingUTF16Squeak, false);\n\tCocoaIgnoreWord(word,aTag);\n\tCFRelease(word);\n}\n\n//\tUtility routine to load a bundle from the applications Frameworks folder.\n//\ti.e. : \"SpellingChecker.app/Contents/Frameworks/SpellCheck.bundle\"\nvoid\tLoadPrivateFrameworkBundle( CFStringRef framework, CFBundleRef *bundlePtr, CFStringRef pluginIdentifier)\n{\n\tCFURLRef\tbaseURL\t\t\t= NULL;\n\tCFURLRef\tbundleURL\t\t= NULL;\n\tCFBundleRef\tmyAppsBundle\t= NULL;\n\t\n\tif ( bundlePtr == NULL )\tgoto Bail;\n\t*bundlePtr = NULL;\n\t\n\tmyAppsBundle\t= CFBundleGetBundleWithIdentifier(pluginIdentifier);\t\t\t\t\t//\tGet our application's main bundle from Core Foundation\n\tif ( myAppsBundle == NULL )\tgoto Bail;\n\t\n\tbaseURL\t= CFBundleCopyPrivateFrameworksURL( myAppsBundle );\n\tif ( baseURL == NULL )\tgoto Bail;\n\n\tbundleURL = CFURLCreateCopyAppendingPathComponent( kCFAllocatorSystemDefault, baseURL, framework, false );\n\tif ( bundleURL == NULL )\tgoto Bail;\n\n\t*bundlePtr = CFBundleCreate( kCFAllocatorSystemDefault, bundleURL );\n\tif ( *bundlePtr == NULL )\tgoto Bail;\n\n\tif ( ! CFBundleLoadExecutable( *bundlePtr ) )\n\t{\n\t\tCFRelease( *bundlePtr );\n\t\t*bundlePtr\t= NULL;\n\t}\n\nBail:\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Clean up.\n\tif ( bundleURL != NULL )\tCFRelease( bundleURL );\n\tif ( baseURL != NULL )\t\tCFRelease( baseURL );\n}\n\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SpellingPlugin/sqMacSpellingPlugin.h",
    "content": "/*\n *  sqMacSpellingPlugin.h\n *  SqueakSpelling\n *\n *  Created by John M McIntosh on 14/06/05.\n *\n */\n\n#include <Carbon/Carbon.h>\n\nint\t\tsqSpellingInitialize(void);\nvoid\tsqSpellingShutdown(void);\nvoid\tsqSpelllingCheckSpellingstartingAtresults(char * data,long startLocation,int length, int *results);\nint\t\tsqSpellingGetIgnoredWordListLengthWithTag(int tag);\nvoid\tsqSpellingGetIgnoredWordListWithTaginto(int tag, char* string);\nint\t\tsqSpelllingGetLanguageLength(void);\nvoid\tsqSpelllingGetLanguageInto(char* string);\nint\t\tsqSpelllingGetUniqueSpellingTag(void);\nint\t\tsqSpelllingGuessForWordLengthwithTag(char * string, int tag);\nvoid\tsqSpelllingGuessForWordwithTaginto(char *string, int tag, char *results);\nvoid\tsqSpelllingSetIgnoredWordwithTag(char *string, int tag);\nvoid\tsqSpelllingSetIgnoredWordswithTag(char *string, int tag);\nvoid\tsqSpelllingSetLanguage(char *string);"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SqueakFFIPrims/Info-SqueakFFIPlugin__Upgraded_.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>SqueakFFIPrims</string>\n\t<key>CFBundleGetInfoString</key>\n\t<string>SqueakFFIPrims for Squeak</string>\n\t<key>CFBundleIconFile</key>\n\t<string>SqueakPlugin.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.SqueakFFIPrims</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>SqueakFFIPrims for Squeak</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.6.0b5</string>\n\t<key>CFBundleSignature</key>\n\t<string>FAST</string>\n\t<key>CFBundleVersion</key>\n\t<string>1.6.0b5</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SqueakFFIPrims/SqueakFFIPrims.proj.xml",
    "content": "<?xml version=\"1.0\"?>\n<?codewarrior exportversion=\"1.0\" ideversion=\"4.0\"?>\n<!DOCTYPE PROJECT [\n\n<!ELEMENT PROJECT (TARGETLIST, TARGETORDER, GROUPLIST, DESIGNLIST?)>\n<!ELEMENT TARGETLIST (TARGET+)>\n<!ELEMENT TARGET (NAME, SETTINGLIST, FILELIST?, LINKORDER?, SEGMENTLIST?, OVERLAYGROUPLIST?, SUBTARGETLIST?, SUBPROJECTLIST?)>\n<!ELEMENT NAME (#PCDATA)>\n<!ELEMENT USERSOURCETREETYPE (#PCDATA)>\n<!ELEMENT PATH (#PCDATA)>\n<!ELEMENT FILELIST (FILE*)>\n<!ELEMENT FILE (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?, ROOTFILEREF?, FILEKIND?, FILEFLAGS?)>\n<!ELEMENT PATHTYPE (#PCDATA)>\n<!ELEMENT PATHROOT (#PCDATA)>\n<!ELEMENT ACCESSPATH (#PCDATA)>\n<!ELEMENT PATHFORMAT (#PCDATA)>\n<!ELEMENT ROOTFILEREF (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)>\n<!ELEMENT FILEKIND (#PCDATA)>\n<!ELEMENT FILEFLAGS (#PCDATA)>\n<!ELEMENT FILEREF (TARGETNAME?, PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)>\n<!ELEMENT TARGETNAME (#PCDATA)>\n<!ELEMENT SETTINGLIST ((SETTING|PANELDATA)+)>\n<!ELEMENT SETTING (NAME?, (VALUE|(SETTING+)))>\n<!ELEMENT PANELDATA (NAME, VALUE)>\n<!ELEMENT VALUE (#PCDATA)>\n<!ELEMENT LINKORDER (FILEREF*)>\n<!ELEMENT SEGMENTLIST (SEGMENT+)>\n<!ELEMENT SEGMENT (NAME, ATTRIBUTES?, FILEREF*)>\n<!ELEMENT ATTRIBUTES (#PCDATA)>\n<!ELEMENT OVERLAYGROUPLIST (OVERLAYGROUP+)>\n<!ELEMENT OVERLAYGROUP (NAME, BASEADDRESS, OVERLAY*)>\n<!ELEMENT BASEADDRESS (#PCDATA)>\n<!ELEMENT OVERLAY (NAME, FILEREF*)>\n<!ELEMENT SUBTARGETLIST (SUBTARGET+)>\n<!ELEMENT SUBTARGET (TARGETNAME, ATTRIBUTES?)>\n<!ELEMENT SUBPROJECTLIST (SUBPROJECT+)>\n<!ELEMENT SUBPROJECT (FILEREF, SUBPROJECTTARGETLIST)>\n<!ELEMENT SUBPROJECTTARGETLIST (SUBPROJECTTARGET*)>\n<!ELEMENT SUBPROJECTTARGET (TARGETNAME, ATTRIBUTES?)>\n<!ELEMENT TARGETORDER (ORDEREDTARGET|ORDEREDDESIGN)*>\n<!ELEMENT ORDEREDTARGET (NAME)>\n<!ELEMENT ORDEREDDESIGN (NAME, ORDEREDTARGET+)>\n<!ELEMENT GROUPLIST (GROUP|FILEREF)*>\n<!ELEMENT GROUP (NAME, (GROUP|FILEREF)*)>\n<!ELEMENT DESIGNLIST (DESIGN+)>\n<!ELEMENT DESIGN (NAME, DESIGNDATA)>\n<!ELEMENT DESIGNDATA (#PCDATA)>\n]>\n<PROJECT>\n    <TARGETLIST>\n        <TARGET>\n            <NAME>SqueakFFIPrims</NAME>\n            <SETTINGLIST>\n\n                <!-- Settings for \"Source Trees\" panel -->\n                <SETTING><NAME>UserSourceTrees</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"Custom Keywords\" panel -->\n                <SETTING><NAME>CustomColor1</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor2</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor3</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor4</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Access Paths\" panel -->\n                <SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>UserSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>Lamie:Squeak:SqueakAtSourceForge:squeak:platforms:Mac OS:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>Lamie:Squeak:SqueakAtSourceForge:squeak:platforms:Cross:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n                <SETTING><NAME>SystemSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MacOS Support:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MSL:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Target Settings\" panel -->\n                <SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING>\n                <SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>Targetname</NAME><VALUE>SqueakFFIPrims</VALUE></SETTING>\n                <SETTING><NAME>OutputDirectory</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>SaveEntriesUsingRelativePaths</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"File Mappings\" panel -->\n                <SETTING><NAME>FileMappings</NAME>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>APPL</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>Appl</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MMLB</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MPLF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MWCD</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>RSRC</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.bh</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Balloon Help</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cpp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.exp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.fr</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>ODFRC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.h</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.idl</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>SOMobjects TS</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.p</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pas</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.r</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Rez</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.s</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PPCAsm</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>XCOF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>docu</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>rsrc</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>shlb</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>stub</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.doc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Build Extras\" panel -->\n                <SETTING><NAME>CacheModDates</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>ActivateBrowser</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>DumpBrowserInfo</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>CacheSubprojects</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>UseThirdPartyDebugger</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>DebuggerCommandLine</NAME><VALUE></VALUE></SETTING>\n                <PANELDATA><NAME>Debugger Runtime</NAME><VALUE>\n                    0002000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000010122D40100000000000010010123650\n                    000200000000000000000000101227A000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    00000000000000000000000000000000\n                </VALUE></PANELDATA>\n\n                <!-- Settings for \"Debugger Target\" panel -->\n                <SETTING><NAME>LogSystemMessages</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>AutoTargetDLLs</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>StopAtWatchpoints</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>PauseWhileRunning</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>PauseInterval</NAME><VALUE>5</VALUE></SETTING>\n                <SETTING><NAME>PauseUIFlags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>AltExePath</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>StopAtTempBPOnLaunch</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>CacheSymbolics</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>TempBPFunctionName</NAME><VALUE>main</VALUE></SETTING>\n                <SETTING><NAME>TempBPType</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"68K CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_68K_codesize</NAME><VALUE>Smart</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_structalignment</NAME><VALUE>MC68K</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fp_mode</NAME><VALUE>SANE</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_code68020</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_mpwc</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fourbyteints</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_IEEEdoubles</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fardata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farvtables</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_pcrelstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_macsbug</NAME><VALUE>New</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_a6frames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"68K Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_68K_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_mix</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"68K Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_68K_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_68K_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"68K Linker\" panel -->\n                <SETTING><NAME>MWLinker_68K_linksym</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_symfullpath</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_linksingle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_fastlink</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_generateMap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_glueintosegone</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"68K Project\" panel -->\n                <SETTING><NAME>MWProject_68K_type</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_outfile</NAME><VALUE>Mac OS PPC C/C++</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filecreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filetype</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_size</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_flags</NAME><VALUE>22656</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcheader</NAME><VALUE>Standard</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmulti</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_a4</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_minsize</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcsegtype</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_cfm68kcodegen</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_thedebugger</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrc_custom</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_rseg_app</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_pilot_lib</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_pilot_main_entry</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Compiler\" panel -->\n                <SETTING><NAME>MWFrontEnd_C_cplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_checkprotos</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_arm</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_trigraphs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_onlystdkeywords</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enumsalwaysint</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwpointerstyle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_prefixname</NAME><VALUE>myMacHeadersPPC</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ansistrict</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwcnewline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_wchar_type</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enableexceptions</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontreusestrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_poolstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_useRTTI</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_multibyteaware</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_unsignedchars</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_autoinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_booltruefalse</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_direct_to_som</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_som_env_check</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_alwaysinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_inlinelevel</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ecplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_objective_c</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_defer_codegen</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Warnings\" panel -->\n                <SETTING><NAME>MWWarning_C_warn_illpragma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_emptydecl</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_possunwant</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedvar</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedarg</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_extracomma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_pedantic</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warningerrors</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_hidevirtual</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_implicitconv</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_notinlined</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_structclass</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"CFM68K\" panel -->\n                <SETTING><NAME>MWCFM68K_exports</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_farthreshold</NAME><VALUE>256</VALUE></SETTING>\n                <SETTING><NAME>PCFM68K_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_mainname</NAME><VALUE>__start</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_termname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_alignment</NAME><VALUE>Align_2</VALUE></SETTING>\n\n                <!-- Settings for \"MacOS Merge Panel\" panel -->\n                <SETTING><NAME>MWMerge_MacOS_projectType</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputName</NAME><VALUE>Merge Out</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputCreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputType</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_suppressWarning</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyFragments</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_skipResources</NAME>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE>\t1\b</VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"PPC CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_PPC_structalignment</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tracebacktables</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processor</NAME><VALUE>P750</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_readonlystrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_fpcontract</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_schedule</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_peephole</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processorspecific</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_altivec</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vectortocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vrsave</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_PPC_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_extended</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_mix</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_PPC_optimizationlevel</NAME><VALUE>Level4</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_PPC_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Linker\" panel -->\n                <SETTING><NAME>MWLinker_PPC_linksym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_symfullpath</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_permitmultdefs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmode</NAME><VALUE>Normal</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_mainname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_termname</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"PPC PEF\" panel -->\n                <SETTING><NAME>MWPEF_exports</NAME><VALUE>Pragma</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sortcode</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_expandbss</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWPEF_collapsereloads</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Project\" panel -->\n                <SETTING><NAME>MWProject_PPC_type</NAME><VALUE>SharedLibrary</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>SqueakFFIPrims</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>1178686292</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>1936223330</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_size</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_minsize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_flags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcheader</NAME><VALUE>Native</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"PPCAsm Panel\" panel -->\n                <SETTING><NAME>MWAssembler_PPC_auxheader</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_symmode</NAME><VALUE>Mac</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_dialect</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_prefixfile</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_typecheck</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_warnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_casesensitive</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"Rez Compiler\" panel -->\n                <SETTING><NAME>MWRez_Language_maxwidth</NAME><VALUE>80</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_script</NAME><VALUE>Roman</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_alignment</NAME><VALUE>Align1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filtermode</NAME><VALUE>FilterSkip</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_suppresswarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_escapecontrolchars</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_prefixname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filteredtypes</NAME><VALUE>'CODE' 'DATA' 'PICT'</VALUE></SETTING>\n            </SETTINGLIST>\n            <FILELIST>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InterfaceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MathLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqFFI.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacFFIPPC.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SqueakFFIPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL SIOUX.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n            </FILELIST>\n            <LINKORDER>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InterfaceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MathLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqFFI.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacFFIPPC.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SqueakFFIPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL SIOUX.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n            </LINKORDER>\n        </TARGET>\n    </TARGETLIST>\n\n    <TARGETORDER>\n        <ORDEREDTARGET><NAME>SqueakFFIPrims</NAME></ORDEREDTARGET>\n    </TARGETORDER>\n\n    <GROUPLIST>\n        <GROUP><NAME>Source</NAME>\n            <FILEREF>\n                <TARGETNAME>SqueakFFIPrims</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>InterfaceLib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>SqueakFFIPrims</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MathLib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>SqueakFFIPrims</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MSL C.PPC.Lib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>SqueakFFIPrims</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MSL RuntimePPC.Lib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>SqueakFFIPrims</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MSL SIOUX.PPC.Lib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>SqueakFFIPrims</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqFFI.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>SqueakFFIPrims</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacFFIPPC.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>SqueakFFIPrims</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>SqueakFFIPrims.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n        </GROUP>\n    </GROUPLIST>\n\n</PROJECT>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SqueakFFIPrims/ppc-darwin-Carbon-UI.c",
    "content": "#if __BIG_ENDIAN__\n\n// THIS IS BROKEN FOR CROQUET\n\n\n\n\n\n\n/* ppc-darwin.c -- FFI support for PowerPC on Mach-O (Darwin)\n * \n * Author: Ian.Piumarta@INRIA.Fr\n * \n * Last edited: 2004-04-03 02:59:34 by piumarta on emilia.local\n * \n *   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n *\n * Notes:\n *\n *  This is a complete rewrite of the version for MacPPC.  (The latter\n *  is hopelessly broken when passing long longs or structs containing\n *  an element of alignment less strict than int.)\n *\n * Bugs:\n * \n *   Because of the way strings are handled, this implementation is\n *   neither reentrant nor thread safe.\n *\n * References:\n * \n *   Mach-O Runtime Architecture, Apple Computer Inc., July 2002.\n */\n\n#include \"sq.h\"\n#include \"sqFFI.h\"\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n#ifndef LONGLONG\n# define LONGLONG long long\n#endif\n\n#if 0\n# define DPRINTF(ARGS)\tprintf ARGS; fflush(stdout)\n#else\n# define DPRINTF(ARGS)\n#endif\n\nextern struct VirtualMachine *interpreterProxy;\n\n#if defined(FFI_TEST)\n  static int primitiveFail(void) { puts(\"primitive fail\"); exit(1); return 0; }\n#else\n# define primitiveFail() interpreterProxy->primitiveFail();\n#endif\n\n#define GPR_MAX\t   8\n#define FPR_MAX\t  13\n#define ARG_MAX\t 512\n\nstatic char\t*strings[ARG_MAX];\nstatic int\t stringCount= 0;\nstatic int giLocker;\n\n#if 0\nstatic char\t structs[ARG_MAX * sizeof(int)];\nstatic int\t structCount= 0;\n#endif\n\n/* the following avoids an awful lot of _very_ inefficient junk in the asm */\n\nstatic struct\n{\n  int\t   _gprCount;\t\t//  0\n  int\t   _fprCount;\t\t//  4\n  int\t   _stackIndex;\t\t//  8\n  int\t  *_structReturnValue;\t// 12\t(everything below is 8-byte aligned)\n  LONGLONG _longReturnValue;\t// 16\n  double   _floatReturnValue;\t// 24\n  int\t   _gprs[GPR_MAX];\t// 32\n  double   _fprs[FPR_MAX];\t// 32 + 4*GPR_MAX\n  int\t   _stack[ARG_MAX];\t// 32 + 4*GPR_MAX + 8*FPR_MAX\n} global;\n\n#define gprCount\t\tglobal._gprCount\n#define fprCount\t\tglobal._fprCount\n#define stackIndex\t\tglobal._stackIndex\n#define structReturnValue\tglobal._structReturnValue\n#define longReturnValue\t\tglobal._longReturnValue\n#define floatReturnValue\tglobal._floatReturnValue\n#define gprs\t\t\tglobal._gprs\n#define fprs\t\t\tglobal._fprs\n#define stack\t\t\tglobal._stack\n\n\nextern int ffiCallAddressOf(void *addr, void *globals);\n\n\nint ffiInitialize(void)\n{\n  DPRINTF((\"ffiInitialize\\n\"));\n  stackIndex= gprCount= fprCount= 0;\n#if 0\n  structCount= 0;\n#endif\n  floatReturnValue= 0.0;\n  return 1;\n}\n\n\nint ffiSupportsCallingConvention(int callType)\n{\n  return (callType == FFICallTypeCDecl)\n    ||   (callType == FFICallTypeApi);\n}\n\n\nint ffiAlloc(int byteSize)\n{\n  int ptr= (int)malloc(byteSize);\n  DPRINTF((\"ffiAlloc(%d) => %08x\\n\", byteSize, ptr));\n  return ptr;\n}\n\n\nint ffiFree(int ptr)\n{\n  DPRINTF((\"ffiFree(%08x)\\n\", ptr));\n  if (ptr) free((void *)ptr);\n  return 1;\n}\n\n\n#define checkStack()\t\t\t\t\\\n  if (stackIndex >= ARG_MAX)\t\t\t\\\n    return primitiveFail()\n\n#define checkGPR()\t\t\t\t\t\\\n  if ((gprCount >= GPR_MAX) && (stackIndex >= ARG_MAX))\t\\\n    return primitiveFail()\n\n#define qalignStack()\tstackIndex += (stackIndex & 1)\n\n#define pushGPR(value)\t\t\t\t\\\n  checkGPR();\t\t\t\t\t\\\n  if (gprCount < GPR_MAX)\t\t\t\\\n    gprs[gprCount++]= value;\t\t\t\\\n  stack[stackIndex++]= value\n\n#define qalignGPR()\tgprCount += (gprCount & 1)\n\n\nint ffiPushSignedChar(int value)\n{ \n  DPRINTF((\"ffiPushSignedChar %d\\n\", value));\n  pushGPR(value);\n  return 1;\n}\n\n\nint ffiPushUnsignedChar(int value) \n{ \n  DPRINTF((\"ffiPushUnsignedChar %d\\n\", value));\n  pushGPR(value);\n  return 1;\n}\n\n\nint ffiPushSignedByte(int value) \n{ \n  DPRINTF((\"ffiPushSignedByte %d\\n\", value));\n  pushGPR(value);\n  return 1;\n}\n\n\nint ffiPushUnsignedByte(int value)\n{ \n  DPRINTF((\"ffiPushUnsignedByte %d\\n\", value));\n  pushGPR(value);\n  return 1;\n}\n\n\nint ffiPushSignedShort(int value)\n{ \n  DPRINTF((\"ffiPushSignedShort %d\\n\", value));\n  pushGPR(value); \n  return 1; \n}\n\n\nint ffiPushUnsignedShort(int value) \n{ \n  DPRINTF((\"ffiPushUnsignedShort %d\\n\", value));\n  pushGPR(value); \n  return 1; \n}\n\n\nint ffiPushSignedInt(int value) \n{ \n  DPRINTF((\"ffiPushSignedInt %d\\n\", value));\n  pushGPR(value); \n  return 1; \n}\n\n\nint ffiPushUnsignedInt(int value) \n{ \n  DPRINTF((\"ffiPushUnsignedInt %d\\n\", value));\n  pushGPR(value);\n  return 1;\n}\n\n\nint ffiPushSignedLongLong(int low, int high)\n{\n  DPRINTF((\"ffiPushSignedLongLong %d %d\\n\", low, high));\n  qalignGPR();\n  qalignStack();\n  pushGPR(high);\n  pushGPR(low);\n  return 1;\n}\n\n\nint ffiPushUnsignedLongLong(int low, int high)\n{ \n  DPRINTF((\"ffiPushUnsignedLongLong %d %d\\n\", low, high));\n  qalignGPR();\n  qalignStack();\n  pushGPR(high);\n  pushGPR(low);\n  return 1;\n}\n\n\nint ffiPushPointer(int pointer)\n{\n  DPRINTF((\"ffiPushPointer %08x\\n\", pointer));\n  pushGPR(pointer);\n  return 1;\n}\n\n\nint ffiPushSingleFloat(double value)\n{\n  DPRINTF((\"ffiPushSingleFloat %f\\n\", (float)value));\n  if (fprCount < FPR_MAX)\n    fprs[fprCount++]= value;\n  {\n    float floatValue= (float)value;\n    pushGPR(*(int *)&floatValue);\n  }\n  return 1;\n}\n\n\nint ffiPushDoubleFloat(double value)\n{\n  DPRINTF((\"ffiPushDoubleFloat %f\\n\", (float)value));\n  if (fprCount < FPR_MAX)\n    fprs[fprCount++]= value;\n  pushGPR(((int *)&value)[0]);\n  pushGPR(((int *)&value)[1]);\n  return 1;\n}\n\n\nint ffiPushStringOfLength(int srcIndex, int length)\n{\n  char *ptr;\n  DPRINTF((\"ffiPushStringOfLength %d\\n\", length));\n  checkGPR();\n  ptr= (char *)malloc(length + 1);\n  if (!ptr)\n    return primitiveFail();\n  memcpy(ptr, (void *)srcIndex, length);\n  ptr[length]= '\\0';\n  strings[stringCount++]= ptr;\n  pushGPR((int)ptr);\n  return 1;\n}\n\n\nstatic inline int min(int x, int y) { return (x < y) ? x : y; }\n\n\nint ffiPushStructureOfLength(int pointer, int *structSpec, int specSize)\n{\n  int i;\n  char *data\t= (char *)pointer;\n  char *argp\t= (char *)&stack[stackIndex];\n#define argl\t  (char *)&stack[ARG_MAX]\n  int   argSize\t= *structSpec & FFIStructSizeMask;\n  char *gprp\t= (char *)&gprs[gprCount];\n#define gprl\t  (char *)&gprs[GPR_MAX]\n  int   gprSize\t= min(argSize, gprl - gprp);\n\n  DPRINTF((\"ffiPush %08x Structure %p OfLength %d\\n\", pointer, structSpec, specSize));\n\n  if (gprSize < 4) gprp += (4 - gprSize);\n  if (argSize < 4) argp += (4 - gprSize);\n  if (argp + argSize > argl)\n    return primitiveFail();\n\n  memcpy((void *)gprp, (void *)data, gprSize);\n  memcpy((void *)argp, (void *)data, argSize);\n  gprCount   += (gprSize + sizeof(int) - 1) / sizeof(int);\n  stackIndex += (argSize + sizeof(int) - 1) / sizeof(int);\n\n#undef argl\n#undef gprl\n\n  for (i= 0;  i < specSize;  ++i)\n    {\n      int typeSpec= structSpec[i];\n      if (typeSpec & FFIFlagPointer)\n\tcontinue;\n      else if (typeSpec & FFIFlagStructure)\n\tcontinue;\n      else\n\t{\t\n\t  int atomicType= (typeSpec & FFIAtomicTypeMask) >> FFIAtomicTypeShift;\n\t  switch (atomicType)\n\t    {\n\t    case FFITypeSingleFloat:\n\t      if (fprCount < FPR_MAX)\n\t\tfprs[fprCount++]= *(float *)data;\n\t      break;\n\t    case FFITypeDoubleFloat:\n\t      if (fprCount < FPR_MAX)\n\t\tfprs[fprCount++]= *(double *)data;\n\t      break;\n\t    default:\n\t      break;\n\t    }\n\t  data += typeSpec & FFIStructSizeMask;\n\t}\n    }\n  return 1;\n}\n\n\nint ffiCanReturn(int *structSpec, int specSize)\n{\n  int header= *structSpec;\n  DPRINTF((\"ffiCanReturn %p %d\\n\", structSpec, specSize));\n  if (header & FFIFlagPointer)\n    return 1;\n  if (header & FFIFlagStructure)\n    {\n      /* structs are always returned as pointers to hidden structures */\n      int structSize= header & FFIStructSizeMask;\n      structReturnValue= malloc(structSize);\n      if (!structReturnValue)\n\treturn 0;\n      pushGPR((int)structReturnValue);\n    }\n  return 1;\n}\n\n\ndouble ffiReturnFloatValue(void)\t{ return floatReturnValue; }\nint    ffiLongLongResultLow(void)\t{ return ((int *)&longReturnValue)[1]; }\nint    ffiLongLongResultHigh(void)\t{ return ((int *)&longReturnValue)[0]; }\n\n\nint ffiStoreStructure(int address, int structSize)\n{\n  DPRINTF((\"ffiStoreStructure %08x %d\\n\", address, structSize));\n  memcpy((void *)address,\n\t structReturnValue ? (void *)structReturnValue : (void *)&longReturnValue,\n\t structSize);\n  return 1;\n}\n\n\nint ffiCleanup(void)\n{\n  int i;\n  DPRINTF((\"ffiCleanup\\n\"));\n  for (i= 0;  i < stringCount;  ++i)\n    free(strings[i]);\n  stringCount= 0;\n  if (structReturnValue)\n    {\n      free(structReturnValue);\n      structReturnValue= 0;\n    }\n  return 1;\n}\n\n\nint ffiCallAddressOfWithPointerReturnx(int fn, int callType)\n{\n  DPRINTF((\"ffiCallAddressOfWithPointerReturn %08x %d\\n\", fn, callType));\n  return ffiCallAddressOf((void *)fn, (void *)&global);\n}\n\n\nint ffiCallAddressOfWithStructReturnx(int fn, int callType, int* structSpec, int specSize)\n{\n  DPRINTF((\"ffiCallAddressOfWithStructReturn %08x %d %p %d\\n\",\n\t   fn, callType, structSpec, specSize));\n  return ffiCallAddressOf((void *)fn, (void *)&global);\n}\n\n\nint ffiCallAddressOfWithReturnTypex(int fn, int callType, int typeSpec)\n{\n  DPRINTF((\"ffiCallAddressOfWithReturnType %08x %d %d\\n\", fn, callType, typeSpec));\n  return ffiCallAddressOf((void *)fn, (void *)&global);\n}\n\nint ffiCallAddressOfWithPointerReturn(int fn, int callType)\n{\n\tint resultsOfCall;\n\n\tif (giLocker == 0)\n\t\tgiLocker = interpreterProxy->ioLoadFunctionFrom(\"getUIToLock\", \"\");\n\tif (giLocker != 0) {\n\t\tlong *foo;\n\t\tfoo = malloc(sizeof(long)*5);\n\t\tfoo[0] = 2;\n\t\tfoo[1] = ffiCallAddressOfWithPointerReturnx;\n\t\tfoo[2] = fn;\n\t\tfoo[3] = callType;\n\t\tfoo[4] = 0;\n\t\t((int (*) (void *)) giLocker)(foo);\n\t\tresultsOfCall = foo[4];\n\t\tfree(foo);\n\t\treturn resultsOfCall;\n\t}\n}\n\nint ffiCallAddressOfWithStructReturn(int fn, int callType, int* structSpec, int specSize)\n{\n\tint resultsOfCall;\n\n\tif (giLocker == 0)\n\t\tgiLocker = interpreterProxy->ioLoadFunctionFrom(\"getUIToLock\", \"\");\n\tif (giLocker != 0) {\n\t\tlong *foo;\n\t\tfoo = malloc(sizeof(long)*7);\n\t\tfoo[0] = 4;\n\t\tfoo[1] = ffiCallAddressOfWithStructReturnx;\n\t\tfoo[2] = fn;\n\t\tfoo[3] = callType;\n\t\tfoo[4] = structSpec;\n\t\tfoo[5] = specSize;\n\t\tfoo[6] = 0;\n\t\t((int (*) (void *)) giLocker)(foo);\n\t\tresultsOfCall = foo[6];\n\t\tfree(foo);\n\t\treturn resultsOfCall;\n\t}\n}\n\nint ffiCallAddressOfWithReturnType(int fn, int callType, int typeSpec)\n{\n\tint resultsOfCall;\n\n\tif (giLocker == 0)\n\t\tgiLocker = interpreterProxy->ioLoadFunctionFrom(\"getUIToLock\", \"\");\n\tif (giLocker != 0) {\n\t\tlong *foo;\n\t\tfoo = malloc(sizeof(long)*6);\n\t\tfoo[0] = 3;\n\t\tfoo[1] = ffiCallAddressOfWithReturnTypex;\n\t\tfoo[2] = fn;\n\t\tfoo[3] = callType;\n\t\tfoo[4] = typeSpec;\n\t\tfoo[5] = 0;\n\t\t((int (*) (void *)) giLocker)(foo);\n\t\tresultsOfCall = foo[5];\n\t\tfree(foo);\n\t\treturn resultsOfCall;\n\t}\n}\n\n#if !defined(NO_FFI_TEST)\n\n#undef gprCount\n#undef fprCount\n#undef stackIndex\n#undef structReturnValue\n#undef longReturnValue\n#undef floatReturnValue\n#undef gprs\n#undef fprs\n#undef stack\n\n#include \"ppc-global.h\"\n\n#define offset(field)\t((char *)&global._##field - (char *)&global._gprCount)\n\n#include <assert.h>\n\nvoid ffiDoAssertions(void)\n{\n  assert(gprCount\t\t== offset(gprCount));\n  assert(fprCount\t\t== offset(fprCount));\n  assert(stackIndex\t\t== offset(stackIndex));\n  assert(structReturnValue\t== offset(structReturnValue));\n  assert(longReturnValue\t== offset(longReturnValue));\n  assert(floatReturnValue\t== offset(floatReturnValue));\n  assert(gprs\t\t\t== offset(gprs));\n  assert(fprs\t\t\t== offset(fprs));\n  assert(stack\t\t\t== offset(stack));\n\n  assert(stack + (ARG_MAX * sizeof(int)) == sizeof(global));\n}\n\n#endif\n#endif\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SqueakFFIPrims/ppc-darwin-asm-MacIntel.S",
    "content": "#if __BIG_ENDIAN__\n\n// LIKELY BROKEN? FOR CROQUET? NOT SURE COULD BE COMPANION C CODE\n\n/* ppc-sysv-asm.S -- PowerPC FFI trampoline for Mach-O\t\t\t-*- asm -*-\n *\n * Author: Ian.Piumarta@INRIA.Fr\n *\n * Last edited:\t2003-08-15 15:36:13 by piumarta on emilia.inria.fr\n *\n *   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *      You are NOT ALLOWED to distribute modified versions of this file\n *      under its original name.  If you modify this file then you MUST\n *      rename it before making your modifications available publicly.\n * \n *   This file is distributed in the hope that it will be useful, but WITHOUT\n *   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n *   FITNESS FOR A PARTICULAR PURPOSE.\n *   \n *   You may use and/or distribute this file ONLY as part of Squeak, under\n *   the terms of the Squeak License as described in `LICENSE' in the base of\n *   this distribution, subject to the following additional restrictions:\n * \n *   1. The origin of this software must not be misrepresented; you must not\n *      claim that you wrote the original software.  If you use this software\n *      in a product, an acknowledgment to the original author(s) (and any\n *      other contributors mentioned herein) in the product documentation\n *      would be appreciated but is not required.\n * \n *   2. You must not distribute (or make publicly available by any\n *      means) a modified copy of this file unless you first rename it.\n * \n *   3. This notice must not be removed or altered in any source distribution.\n * \n *   Using (or modifying this file for use) in any context other than Squeak\n *   changes these copyright conditions.  Read the file `COPYING' in the\n *   directory `platforms/unix/doc' before proceeding with any such use.\n */\n\n/* Mach-O PPC stack frames look like this (higher addresses first):\n *\n * \t\t| caller's lr\t\t|\n * \t\t| caller's cr\t\t|\n * caller's sp->| caller's caller's sp\t|\n *\t\t| fpr save area\t\t|\n *\t\t| gpr save area\t\t|\n *\t\t|     [alignment pad]\t|\n *\t\t| local variables\t|\n * sp + 24  ->\t| param save area\t|\n * sp + 20  ->\t| caller's toc\t\t|\n * sp + 16  ->\t| reserved\t\t|\n * sp + 12  ->\t| reserved\t\t|\n * sp +  8  ->\t| (callee-save) lr\t|\n * sp +  4  ->\t| (callee-save) cr\t|\n * sp +  0  ->\t| caller's sp\t\t|\n */\n\n#define GPR_MAX   8\n#define FPR_MAX  13\n#define ARG_MAX 512\n#define FRAMESZ\t 32\n\n#include \"ppc-global.h\"\n\n#define sp r1\n\n\t.text\n\t.globl\t_ffiCallAddressOf\n\n_ffiCallAddressOf:\n\tstwu\tsp, -FRAMESZ(sp)\t\t// push trampoline frame\n\tmflr\tr0\n\tstw\tr0, (FRAMESZ+8)(sp)\n        mfcr\tr0\n        stw\tr0, (FRAMESZ+4)(sp)\t\t// saved ccr\n\tmtlr\tr3\t\t\t\t// destination fn address\n\tstw\tr4, (FRAMESZ-4)(sp)\t\t// globals\n\tlwz\tr5, stackIndex(r4)\n\tslwi\tr10, r5, 2\t\t\t// param save area size\n\taddi\tr10, r10, 32+15\t\t\t// round to quad word\n\trlwinm\tr10, r10, 0,0,27\n\tneg\tr10, r10\n\tstwux\tsp, sp, r10\t\t\t// push ffi caller frame\n\tcmpwi\tr5, 0\t\t\t\t// have params?\n\tbeq+\t2f\n\tmtctr\tr5\t\t\t\t// words to move\n\tla\tr10, (stack-4)(r4)\t\t// ffi param stack - 4\n\taddi\tr11, sp, 24-4\t\t\t// param save area - 4\n1:\tlwzu\tr0, 4(r10)\t\t\t// copy param save area\n\tstwu\tr0, 4(r11)\n\tbdnz\t1b\n2:\tlwz\tr5, fprCount(r4)\n\tcmpwi\tr5, 0\n\tbeq+\t4f\t\t\t\t// no fp args\n\tla\tr11, fprs(r4)\n\tcmpwi\tr5, 4\n\tble+\t3f\n\tlfd\tf5,  32(r11)\n\tlfd\tf6,  40(r11)\n\tlfd\tf7,  48(r11)\n\tlfd\tf8,  56(r11)\n#\tif (FPR_MAX > 8)\n\tlfd\tf9,  64(r11)\n\tlfd\tf10, 72(r11)\n\tlfd\tf11, 80(r11)\n\tlfd\tf12, 88(r11)\n\tlfd\tf13, 96(r11)\n#\tendif\n3:\tlfd\tf1,   0(r11)\n\tlfd\tf2,   8(r11)\n\tlfd\tf3,  16(r11)\n\tlfd\tf4,  24(r11)\n4:\tlwz\tr5, gprCount(r4)\n\tcmpwi\tr5, 0\n\tbeq-\t6f\t\t\t\t// no int args\n\tla\tr11, gprs(r4)\n\tcmpwi\tr5, 4\n\tble+\t5f\n\tlwz\tr7,  16(r11)\n\tlwz\tr8,  20(r11)\n\tlwz\tr9,  24(r11)\n\tlwz\tr10, 28(r11)\n5:\tlwz\tr3,   0(r11)\n\tlwz\tr4,   4(r11)\n\tlwz\tr5,   8(r11)\n\tlwz\tr6,  12(r11)\n6:\tblrl\t\t\t\t\t// callout\n\tlwz\tsp, 0(sp)\t\t\t// pop ffi caller frame\n\tlwz\tr5, (FRAMESZ-4)(sp)\t\t// globals\n\tstw\tr3, longReturnValue+0(r5)\n\tstw\tr4, longReturnValue+4(r5)\n\tstfd\tf1, floatReturnValue(r5)\n\tlwz\tr0, (FRAMESZ+8)(sp)\n \tmtlr\tr0\n        lwz\tr0, (FRAMESZ+4)(sp)\t\t// saved ccr\n        mtcr\tr0\n\taddi\tsp, sp, FRAMESZ\t\t\t// pop trampoline frame\n\tblr\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SqueakFFIPrims/ppc-global.h",
    "content": "#define\tgprCount\t\t( 0)\n#define\tfprCount\t\t( 4)\n#define stackIndex\t\t( 8)\n#define structReturnValue\t(12)\n#define longReturnValue\t\t(16)\n#define floatReturnValue\t(24)\n#define gprs\t\t\t(32)\n#define fprs\t\t\t(32 + 4*GPR_MAX)\n#define stack\t\t\t(32 + 4*GPR_MAX + 8*FPR_MAX)\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SqueakFFIPrims/sqMacFFI.s",
    "content": "#if __BIG_ENDIAN__\n/****************************************************************************\n*   PROJECT: mac os-x FFI assembler, from the os-9 version\n*   FILE:    sqMacFFI.s\n*   CONTENT: \n*\n*   AUTHOR:  Andreas Raab (ar), John McIntosh.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacFFI.s 1369 2006-03-22 04:48:20Z johnmci $\n*\n*   NOTES: See change log below.\n*\t1/24/2002  JMM hacked from the original code for os-x, added save for CCR and \n*\t\t\ttweaked _4_gpregs compare\n*\t\n*\t11/14/2002 JMM clean & fix quad word alignment issue\n*   2/24/2006 JMM unable to compile and work on GCC 3.3, perhaps linkage area is 32, not 24? \n*****************************************************************************/\n#import <architecture/ppc/asm_help.h>\n#import\t<architecture/ppc/pseudo_inst.h>\n.text\n.globl _ffiCallAddressOf\n_ffiCallAddressOf:\t\n\tmflr r0\t\t/* Save link register */\n\tstw r0, 8(sp)\n\tmfcr r0\t\t/* save CCR  */\n\tstw r0, 4(sp)\n\n\t/* get stack index and preserve it for copying stuff later */\n\tEXTERN_TO_REG(r4, _ffiStackIndex) // lwz r4, ffiStackIndex(r2)\n\n\t/* compute frame size */\n\trlwinm r5, r4, 2, 0, 29  /* ffiStackIndex words to bytes (e.g., \"slwi r5, r4, 2\") */\n\taddi r5, r5, 32+15 \t/* linkage area */ //* JMM 02/25/06 was 24, Ian has 32 */\n\trlwinm r5,r5,0,0,27 \t/* JMM round up to quad word*/\n\tneg  r5, r5    \t\t/* stack goes down */\n\tstwux sp, sp, r5 \t/* adjust stack frame */\n\n\t/* load the stack frame area */\n\t/* note: r4 == ffiStackIndex */\n\taddi r5, sp, 24         /* dst = r1 + linkage area, was 24 */\n\tEXTERN_TO_REG(r6, _ffiStackLocation) //lwz r6, ffiStack(r2)  /* src = ffiStack */\n\tli r7, 0                /* i = 0 */\n\tb nextItem\ncopyItem:\n\trlwinm r8, r7, 2, 0, 29 /* r8 = i << 2 (e.g., \"slwi r8, r7, 2\") */\n\tlwzx r0, r6, r8         /* r0 = ffiStack[r8] */\n\taddi r7, r7, 1          /* i = i + 1 */\n\tstwx r0, r5, r8         /* dst[r8] = r0 */\nnextItem:\n\tcmpw r7, r4             /* i < ffiStackIndex ? */\n\tblt copyItem\n\n\t/* Keep addr somewhere so we can load all regs beforehand */\n\tstw r3, 20(sp)\n\n\t/* load all the floating point registers */\n\tEXTERN_TO_REG(r3, _fpRegCount) //lwz r3, fpRegCount\n\tEXTERN_TO_REG(r12, _FPRegsLocation) // lwz r12, FPRegs(r2)\n\tcmpwi r3, 0     /* skip all fpregs if no FP values used */\n\tbeq _0_fpregs   /* was lt should be eq */ \n\tcmpwi r3, 8\n\tblt _7_fpregs   /* skip last N fpregs if unused */\n_all_fpregs:\n\tlfd  f8, 56(r12)\n\tlfd  f9, 64(r12)\n\tlfd f10, 72(r12)\n\tlfd f11, 80(r12)\n\tlfd f12, 88(r12)\n\tlfd f13, 96(r12)\n_7_fpregs:\n\tlfd  f1,  0(r12)\n\tlfd  f2,  8(r12)\n\tlfd  f3, 16(r12)\n\tlfd  f4, 24(r12)\n\tlfd  f5, 32(r12)\n\tlfd  f6, 40(r12)\n\tlfd  f7, 48(r12)\n_0_fpregs:\n\n\t/* load all the general purpose registers */\n\tEXTERN_TO_REG(r3, _gpRegCount) //lwz  r3, gpRegCount\n\tEXTERN_TO_REG(r12, _GPRegsLocation) // lwz  r12, GPRegs(r2)\n\tcmpwi r3, 5     /* 5 was 4 in original code but that seems to be a bug? */\n\tblt _4_gpregs    /* skip last four gpregs if unused */\n_all_gpregs:\n\tlwz  r7, 16(r12)\n\tlwz  r8, 20(r12)\n\tlwz  r9, 24(r12)\n\tlwz r10, 28(r12)\n_4_gpregs:\n\tlwz  r3,  0(r12)\n\tlwz  r4,  4(r12)\n\tlwz  r5,  8(r12)\n\tlwz  r6, 12(r12)\n_0_gpregs:\n\n\t/* go calling out */\n\t//Note: OS-X mach-o does not use TVectors rather the addr is the entry point\n\tlwz r12, 20(sp) /* fetch addr */\n\tmtctr r12       /* move entry point into count register */\n\tbctrl           /* jump through count register and link */\n\n\tlwz sp, 0(sp)   /* restore frame */\n\n\t/* store the result of the call */\n        /* more intelligent logic would have a check for type versus assuming all */\n        \n\tREG_TO_EXTERN(r3,_intReturnValue) // stw r3, intReturnValue(r2)\n\tEXTERN_TO_REG(r12, _longReturnValueLocation) //lwz r12, longReturnValue(r2)\n\tstw r3, 0(r12)\n\tstw r4, 4(r12)\n \tEXTERN_TO_REG(r12, _floatReturnValueLocation) //lwz r12, longReturnValue(r2)\n        stfd f1, 0(r12) //stfd f1, floatReturnValue(r2)\n\n\t/* and get out of here */\n        lwz r0, 4(sp) \t/*restore CCR */\n        mtcrf 0xff,r0                               \n\tlwz r0, 8(sp)\t/* restore ltr */\n \tmtlr r0\n\tblr\n#endif"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SqueakFFIPrims/sqMacFFIPPC.c",
    "content": "#if __BIG_ENDIAN__\n/****************************************************************************\n*   PROJECT: Squeak foreign function interface\n*   FILE:    sqMacFFIPPC.c\n*   CONTENT: Mac/PPC specific support for the foreign function interface\n*\n*   AUTHOR:  Andreas Raab (ar)\n*   ADDRESS: Walt Disney Imagineering, Glendale, CA\n*   EMAIL:   Andreas.Raab@disney.com\n*   RCSID:   $Id: sqMacFFIPPC.c 1413 2006-04-10 06:40:23Z johnmci $\n*\n*   NOTES:\n\n* April 9th, 2006 JMM fix, double was pushed on stack incorrectly, this affected things only when 14 values passed\n\n*\n*****************************************************************************/\n#include \"sq.h\"\n#include \"sqFFI.h\"\n\n/* note: LONGLONG is usually declared by universal headers */\n#ifndef LONGLONG\n#define LONGLONG long long\n#endif\n\n#define MAX_PATH PATH_MAX\n\n//#define DEBUGFFI 1\n\n#if defined ( __APPLE__ ) && defined ( __MACH__ )\n#define staticIssue \n#else\n#define staticIssue static \n#endif \n\nextern struct VirtualMachine *interpreterProxy;\n#define primitiveFail() interpreterProxy->primitiveFail();\n\n\n#define GP_MAX_REGS 8\n#define FP_MAX_REGS 13\n\n/* Values passed in GPR3-GPR10 */\nstatic int GPRegs[8];\n/* Nr of GPRegs used so far */\nstaticIssue int gpRegCount = 0;\n/* Values passed in FPR1-FPR13 */\nstatic double FPRegs[13];\n/* Nr of FPRegs used so far */\nstaticIssue int fpRegCount = 0;\n\n/* Max stack size */\n#define FFI_MAX_STACK 512\n/* The stack used to assemble the arguments for a call */\nstatic int   ffiStack[FFI_MAX_STACK];\n/* The stack pointer while filling the stack */\nstaticIssue int   ffiStackIndex = 0;\n/* The area for temporarily allocated strings */\nstatic char *ffiTempStrings[FFI_MAX_STACK];\n/* The number of temporarily allocated strings */\nstatic int   ffiTempStringCount = 0;\n\n/* The return values for calls */\nstaticIssue int      intReturnValue;\nstatic LONGLONG longReturnValue;\nstatic double   floatReturnValue;\nstatic int *structReturnValue = NULL;\n\n/**************************************************************/\n\n#if DEBUGFFI\n# define DPRINTF(ARGS)\tprintf ARGS; fflush(stdout)\n#else\n# define DPRINTF(ARGS)\n#endif\n\n#define ARG_CHECK() if(gpRegCount >= GP_MAX_REGS && ffiStackIndex >= FFI_MAX_STACK) return primitiveFail();\n#define ARG_PUSH(value) { \\\n\tARG_CHECK(); \\\n\tif(gpRegCount < GP_MAX_REGS) GPRegs[gpRegCount++] = value; \\\n\tDPRINTF((\"ARG_PUSH %i (%08x)\\n\", ffiStackIndex, value)); \\\n\tffiStack[ffiStackIndex++] = value; \\\n}\n\n/*****************************************************************************/\n/*****************************************************************************/\nstatic FILE *ffiLogFile = NULL;\n\nint ffiLogFileNameOfLength(void *nameIndex, int nameLength) {\n  char fileName[MAX_PATH];\n  FILE *fp;\n\n  if(nameIndex && nameLength) {\n    if(nameLength >= MAX_PATH) return 0;\n    strncpy(fileName, nameIndex, nameLength);\n    fileName[nameLength] = 0;\n    /* attempt to open the file and if we can't fail */\n    fp = fopen(fileName, \"at\");\n    if(fp == NULL) return 0;\n    /* close the old log file if needed and use the new one */\n    if(ffiLogFile) fclose(ffiLogFile);\n    ffiLogFile = fp;\n    fprintf(ffiLogFile, \"------- Log started -------\\n\");\n    fflush(fp);\n  } else {\n    if(ffiLogFile) fclose(ffiLogFile);\n    ffiLogFile = NULL;\n  }\n  return 1;\n}\n\nint ffiLogCallOfLength(void *nameIndex, int nameLength) {\n    if(ffiLogFile == NULL) return 0;\n    fprintf(ffiLogFile, \"%.*s\\n\", nameIndex, nameLength);\n    fflush(ffiLogFile);\n}\n\n/*****************************************************************************/\n/*****************************************************************************/\n\n/*  ffiInitialize:\n\tAnnounce that the VM is about to do an external function call. */\nint ffiInitialize(void)\n{\n\tffiStackIndex = 0;\n\tgpRegCount = 0;\n\tfpRegCount = 0;\n\tfloatReturnValue = 0.0;\n\treturn 1;\n}\n\n/*  ffiSupportsCallingConvention:\n\tReturn true if the support code supports the given calling convention. */\nint ffiSupportsCallingConvention(int callType)\n{\n\tif(callType == FFICallTypeCDecl) return 1;\n\tif(callType == FFICallTypeApi) return 1;\n\treturn 0;\n}\n\nint ffiAlloc(int byteSize)\n{\n\tint data = (int) malloc(byteSize);\n\tDPRINTF((\"ffiAlloc (%08x)\\n\",data));\n\treturn data;\n}\n\nint ffiFree(int ptr)\n{\n\tDPRINTF((\"ffiFree (%08x)\\n\",ptr));\n\tif(ptr) free((void*)ptr);\n\treturn 1;\n}\n\n/*****************************************************************************/\n/*****************************************************************************/\n\nint ffiPushSignedChar(int value) \n{ \n\tARG_PUSH(value); \n\treturn 1; \n}\n\nint ffiPushUnsignedChar(int value) \n{ \n\tARG_PUSH(value); \n\treturn 1; \n}\n\nint ffiPushSignedByte(int value) \n{ \n\tARG_PUSH(value); \n\treturn 1; \n}\n\nint ffiPushUnsignedByte(int value) \n{ \n\tARG_PUSH(value); \n\treturn 1; \n}\n\nint ffiPushSignedShort(int value) \n{ \n\tARG_PUSH(value); \n\treturn 1; \n}\n\nint ffiPushUnsignedShort(int value) \n{ \n\tARG_PUSH(value); \n\treturn 1; \n}\n\nint ffiPushSignedInt(int value) \n{ \n\tARG_PUSH(value); \n\treturn 1; \n}\n\nint ffiPushUnsignedInt(int value) \n{ \n\tARG_PUSH(value); \n\treturn 1; \n}\n\nint ffiPushSignedLongLong(int low, int high)\n{\n\tARG_PUSH(high);\n\tARG_PUSH(low);\n\treturn 1;\n}\n\nint ffiPushUnsignedLongLong(int low, int high) \n{ \n\tARG_PUSH(high); \n\tARG_PUSH(low); \n\treturn 1; \n}\n\nint ffiPushSingleFloat(double value)\n{\n\tfloat floatValue = (float) value;\n\tif(fpRegCount < FP_MAX_REGS) {\n\t\t/* Still space in FPRegs - so we use the more accurate double value */\n\t\tFPRegs[fpRegCount++] = value;\n\t}\n\t/* Note: Even for args that are passed in FPRegs \n\t   we pass the actual 32bit value in either GPRegs\n\t   or stack frame for varargs calls. */\n\tARG_PUSH(*(int*)(&floatValue));\n\treturn 1;\n}\n\nint ffiPushDoubleFloat(double value)\n{\n\tif(fpRegCount < FP_MAX_REGS) {\n\t\t/* Still space in FPRegs */\n\t\tFPRegs[fpRegCount++] = value;\n\t}\n\t/* Note: Even for args that are passed in FPRegs \n\t   we pass the actual 64bit value in either GPRegs\n\t   or stack frame for varargs calls. */\n\tARG_PUSH(((int*)(&value))[0]);  //JMM April 9th, 2006 was push 1 push 0, but testing shows it was wrong\n\tARG_PUSH(((int*)(&value))[1]);\n\treturn 1;\n}\n\nint ffiPushStructureOfLength(int pointer, int *structSpec, int specSize)\n{\n\tint i, typeSpec;\n\tint *data = (int*) pointer;\n\n\tfor(i = 0; i<specSize; i++) {\n\t\ttypeSpec = structSpec[i];\n\t\tif(typeSpec & FFIFlagPointer) {\n\t\t\tARG_PUSH(*data);\n\t\t\tdata++;\n\t\t} else if(typeSpec & FFIFlagStructure) {\n\t\t\t/* embedded structure */\n\t\t} else {\n\t\t\t/* atomic type */\n\t\t\tint atomicType = (typeSpec & FFIAtomicTypeMask) >> FFIAtomicTypeShift;\n\t\t\tswitch(atomicType) {\n\t\t\t\tcase FFITypeUnsignedChar:\n\t\t\t\tcase FFITypeUnsignedByte:\n\t\t\t\t\tffiPushUnsignedByte(*(unsigned char*)data);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FFITypeSignedChar:\n\t\t\t\tcase FFITypeSignedByte:\n\t\t\t\t\tffiPushSignedByte(*(signed char*)data);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FFITypeUnsignedShort:\n\t\t\t\t\tffiPushUnsignedShort(*(unsigned short*)data);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FFITypeSignedShort:\n\t\t\t\t\tffiPushSignedShort(*(signed short*)data);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FFITypeUnsignedInt:\n\t\t\t\t\tffiPushUnsignedInt(*(unsigned int*)data);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FFITypeSignedInt:\n\t\t\t\t\tffiPushSignedInt(*(signed int*)data);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FFITypeUnsignedLongLong:\n\t\t\t\t\tffiPushUnsignedLongLong( ((unsigned int*)data)[1], ((unsigned int*)data)[0]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FFITypeSignedLongLong:\n\t\t\t\t\tffiPushSignedLongLong( ((signed int*)data)[1], ((signed int*)data)[0]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FFITypeSingleFloat:\n\t\t\t\t\tffiPushSingleFloat( *(float*)data);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FFITypeDoubleFloat:\n\t\t\t\t\t{ double fArg;\n\t\t\t\t\t  ((int*)&fArg)[0] = ((int*)data)[0];\n\t\t\t\t\t  ((int*)&fArg)[1] = ((int*)data)[1];\n\t\t\t\t\t  ffiPushDoubleFloat(fArg);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\treturn primitiveFail();\n\t\t\t}\n\t\t\tdata = (int*) ((int)data + (typeSpec & FFIStructSizeMask));\n\t\t}\n\t}\n\treturn 1;\n}\n\nint ffiPushPointer(int pointer)\n{\n\tARG_PUSH(pointer);\n\treturn 1;\n}\n\nint ffiPushStringOfLength(int srcIndex, int length)\n{\n\tchar *ptr;\n\tARG_CHECK(); /* fail before allocating */\n\tptr = (char*) malloc(length+1);\n\tif(!ptr) return primitiveFail();\n\tmemcpy(ptr, (void*)srcIndex, length);\n\tptr[length] = 0;\n\tffiTempStrings[ffiTempStringCount++] = ptr;\n\tARG_PUSH((int)ptr);\n\treturn 1;\n}\n\n/*****************************************************************************/\n/*****************************************************************************/\n\n/*  ffiCanReturn:\n\tReturn true if the support code can return the given type. */\nint ffiCanReturn(int *structSpec, int specSize)\n{\n\tint header = *structSpec;\n\tif(header & FFIFlagPointer) return 1;\n\tif(header & FFIFlagStructure) {\n\t\t/* structs are always returned as pointers to hidden structures */\n\t\tint structSize = header & FFIStructSizeMask;\n\t\tstructReturnValue = malloc(structSize);\n\t\tif(!structReturnValue) return 0;\n\t\tARG_PUSH((int)structReturnValue);\n\t}\n\treturn 1;\n}\n\n/*  ffiReturnFloatValue:\n\tReturn the value from a previous ffi call with float return type. */\ndouble ffiReturnFloatValue(void)\n{\n\tDPRINTF((\"ffiReturnFloatValue %d\\n\",floatReturnValue));\n\treturn floatReturnValue;\n}\n\n/*  ffiLongLongResultLow:\n\tReturn the low 32bit from the 64bit result of a call to an external function */\nint ffiLongLongResultLow(void)\n{\n\tDPRINTF((\"ffiLongLongResultLow %i\\n\",((int*) &longReturnValue)[1]));\n\treturn ((int*) &longReturnValue)[1];\n}\n\n/*  ffiLongLongResultHigh:\n\tReturn the high 32bit from the 64bit result of a call to an external function */\nint ffiLongLongResultHigh(void)\n{\n\tDPRINTF((\"ffiLongLongResultHigh %i\\n\",((int*) &longReturnValue)[0]));\n\treturn ((int*) &longReturnValue)[0];\n}\n\n/*  ffiStoreStructure:\n\tStore the structure result of a previous ffi call into the given address. */\nint ffiStoreStructure(int address, int structSize)\n{\n\tDPRINTF((\"ffiStoreStructure\\n\"));\n\tif(structReturnValue) {\n\t\tmemcpy((void*)address, (void*)structReturnValue, structSize);\n\t} else {\n\t\tmemcpy((void*)address, (void*)&intReturnValue, structSize);\n  \t}\n  \treturn 1;\n}\n\n/*  ffiCleanup:\n\tCleanup after a foreign function call has completed.\n\tThe generic support code only frees the temporarily\n\tallocated strings. */\nint ffiCleanup(void)\n{\n\tint i;\n\tfor(i=0; i<ffiTempStringCount; i++)\n\t\tfree(ffiTempStrings[i]);\n\tffiTempStringCount = 0;\n\tif(structReturnValue) {\n\t\tfree(structReturnValue);\n\t\tstructReturnValue = NULL;\n\t}\n\treturn 1;\n}\n\nint  ffiStackLocation=(int) &ffiStack;\nint  FPRegsLocation=(int) &FPRegs;\nint  GPRegsLocation=(int) &GPRegs;\nint  longReturnValueLocation=(int) &longReturnValue;\nint  floatReturnValueLocation=(int) &floatReturnValue;\n/*****************************************************************************/\n/*****************************************************************************/\n#if defined ( __APPLE__ ) && defined ( __MACH__ )\nextern int ffiCallAddressOf(int);\n#endif\n\nstatic int giLocker;\n\nint ffiCallAddressOfWithPointerReturnx(int fn, int callType)\n{\n\treturn ffiCallAddressOf(fn);\n}\nint ffiCallAddressOfWithStructReturnx(int fn, int callType, int* structSpec, int specSize)\n{\n\treturn ffiCallAddressOf(fn);\n}\n\nint ffiCallAddressOfWithReturnTypex(int fn, int callType, int typeSpec)\n{\n\treturn ffiCallAddressOf(fn);\n}\n\n\nint ffiCallAddressOfWithPointerReturn(int fn, int callType)\n{\n\tint resultsOfCall;\n\n\tif (giLocker == 0)\n\t\tgiLocker = interpreterProxy->ioLoadFunctionFrom(\"getUIToLock\", \"\");\n\tif (giLocker != 0) {\n\t\tlong *foo;\n\t\tfoo = malloc(sizeof(long)*5);\n\t\tfoo[0] = 2;\n\t\tfoo[1] = ffiCallAddressOfWithPointerReturnx;\n\t\tfoo[2] = fn;\n\t\tfoo[3] = callType;\n\t\tfoo[4] = 0;\n\t\t((int (*) (void *)) giLocker)(foo);\n\t\tresultsOfCall = foo[4];\n\t\tfree(foo);\n\t\treturn resultsOfCall;\n\t}\n}\n\nint ffiCallAddressOfWithStructReturn(int fn, int callType, int* structSpec, int specSize)\n{\n\tint resultsOfCall;\n\n\tif (giLocker == 0)\n\t\tgiLocker = interpreterProxy->ioLoadFunctionFrom(\"getUIToLock\", \"\");\n\tif (giLocker != 0) {\n\t\tlong *foo;\n\t\tfoo = malloc(sizeof(long)*7);\n\t\tfoo[0] = 4;\n\t\tfoo[1] = ffiCallAddressOfWithStructReturnx;\n\t\tfoo[2] = fn;\n\t\tfoo[3] = callType;\n\t\tfoo[4] = structSpec;\n\t\tfoo[5] = specSize;\n\t\tfoo[6] = 0;\n\t\t((int (*) (void *)) giLocker)(foo);\n\t\tresultsOfCall = foo[6];\n\t\tfree(foo);\n\t\treturn resultsOfCall;\n\t}\n}\n\nint ffiCallAddressOfWithReturnType(int fn, int callType, int typeSpec)\n{\n\tint resultsOfCall;\n\n\tif (giLocker == 0)\n\t\tgiLocker = interpreterProxy->ioLoadFunctionFrom(\"getUIToLock\", \"\");\n\tif (giLocker != 0) {\n\t\tlong *foo;\n\t\tfoo = malloc(sizeof(long)*6);\n\t\tfoo[0] = 3;\n\t\tfoo[1] = ffiCallAddressOfWithReturnTypex;\n\t\tfoo[2] = fn;\n\t\tfoo[3] = callType;\n\t\tfoo[4] = typeSpec;\n\t\tfoo[5] = 0;\n\t\t((int (*) (void *)) giLocker)(foo);\n\t\tresultsOfCall = foo[5];\n\t\tfree(foo);\n\t\treturn resultsOfCall;\n\t}\n}\n/*****************************************************************************/\n/*****************************************************************************/\n/*****************************************************************************/\n/************ Test functions for the foreign function interface **************/\n/*****************************************************************************/\n/*****************************************************************************/\n/*****************************************************************************/\n#ifndef NO_FFI_TEST\ntypedef struct ffiTestPoint2 {\n\tint x;\n\tint y;\n} ffiTestPoint2;\n\ntypedef struct ffiTestPoint4 {\n\tint x;\n\tint y;\n\tint z;\n\tint w;\n} ffiTestPoint4;\n\n#pragma export on\nEXPORT(char) ffiTestChars(char c1, char c2, char c3, char c4);\nEXPORT(short) ffiTestShorts(short c1, short c2, short c3, short c4);\nEXPORT(int) ffiTestInts(int c1, int c2, int c3, int c4);\nEXPORT(int) ffiTestInts8(int c1, int c2, int c3, int c4, int c5, int c6, int c7, int c8);\nEXPORT(float) ffiTestFloats(float f1, float f2);\nEXPORT(float) ffiTestFloats7(float f1, float f2, float f3, float f4, float f5, float f6, float f7);\nEXPORT(float) ffiTestFloats13(float f1, float f2, float f3, float f4, float f5, float f6, float f7, float f8, float f9, float f10, float f11, float f12, float f13);\nEXPORT(float) ffiTestFloats14(float f1, float f2, float f3, float f4, float f5, float f6, float f7, float f8, float f9, float f10, float f11, float f12, float f13, float f14);\nEXPORT(double) ffiTestDoubles14(double f1, double f2, double f3, double f4, double f5, double f6, double f7, double f8, double f9, double f10, double f11, double f12, double f13, double f14);\nEXPORT(double) ffiTestDoubles(double d1, double d2);\nEXPORT(char *) ffiPrintString(char *string);\nEXPORT(ffiTestPoint2) ffiTestStruct64(ffiTestPoint2 pt1, ffiTestPoint2 pt2);\nEXPORT(ffiTestPoint4) ffiTestStructBig(ffiTestPoint4 pt1, ffiTestPoint4 pt2);\nEXPORT(ffiTestPoint4*) ffiTestPointers(ffiTestPoint4 *pt1, ffiTestPoint4 *pt2);\nEXPORT(LONGLONG) ffiTestLongLong(LONGLONG i1, LONGLONG i2);\nEXPORT(LONGLONG) ffiTestLongLong8(char c1, char c2, char c3, char c4, char c5, char c6, char c7, char c8, LONGLONG i1, LONGLONG i2);\nEXPORT(LONGLONG) ffiTestLongLong8a1(char c1, char c2, char c3, char c4, char c5, char c6, char c7, char c8, char c9, LONGLONG i1, LONGLONG i2);\nEXPORT(LONGLONG) ffiTestLongLong8a2(char c1, char c2, char c3, char c4, char c5, char c6, char c7, char c8, char c9,  char c10, LONGLONG i1, LONGLONG i2);\nEXPORT(LONGLONG) ffiTestLongLonga1(char c1, LONGLONG i1, LONGLONG i2);\nEXPORT(LONGLONG) ffiTestLongLonga2(char c1, char c2, LONGLONG i1, LONGLONG i2);\n#pragma export off\n\n\n/* test passing characters */\nEXPORT(char) ffiTestChars(char c1, char c2, char c3, char c4) {\n\tprintf(\"4 characters came in as\\nc1 = %c (%x)\\nc2 = %c (%x)\\nc3 = %c (%x)\\nc4 = %c (%x)\\n\", c1, c1, c2, c2, c3, c3, c4, c4);\n\treturn 'C';\n}\n\n/* test passing shorts */\nEXPORT(short) ffiTestShorts(short c1, short c2, short c3, short c4) {\n\tprintf(\"4 shorts came in as\\ns1 = %d (%x)\\ns2 = %d (%x)\\ns3 = %d (%x)\\ns4 = %d (%x)\\n\", c1, c1, c2, c2, c3, c3, c4, c4);\n\treturn -42;\n}\n\n/* test passing ints */\nEXPORT(int) ffiTestInts(int c1, int c2, int c3, int c4) {\n\tprintf(\"4 ints came in as\\ni1 = %d (%x)\\ni2 = %d (%x)\\ni3 = %d (%x)\\ni4 = %d (%x)\\n\", c1, c1, c2, c2, c3, c3, c4, c4);\n\treturn 42;\n}\n\nEXPORT(int) ffiTestInts8(int c1, int c2, int c3, int c4, int c5, int c6, int c7, int c8) {\n\tprintf(\"4 ints came in as\\ni1 = %d (%x)\\ni2 = %d (%x)\\ni3 = %d (%x)\\ni4 = %d (%x)\\ni5 = %d (%x)\\ni6 = %d (%x)\\ni7 = %d (%x)\\ni8 = %d (%x)\\n\", c1, c1, c2, c2, c3, c3, c4, c4, c5, c5, c6, c6, c7, c7, c8, c8);\n\treturn 42;\n}\n\n\n/* test passing and returning floats */\nEXPORT(float) ffiTestFloats(float f1, float f2) {\n\tprintf(\"The two floats are %f and %f\\n\", f1, f2);\n\treturn (float) (f1 + f2);\n}\n\nEXPORT(float) ffiTestFloats7(float f1, float f2, float f3, float f4, float f5, float f6, float f7) {\n\tprintf(\"The 7 floats are %f %f %f %f %f %f %f\\n\", f1, f2, f3, f4, f5, f6, f7);\n\treturn (float) (f1 + f2 + f3 + f4 + f5 + f6 + f7);\n}\n\nEXPORT(float) ffiTestFloats13(float f1, float f2, float f3, float f4, float f5, float f6, float f7, float f8, float f9, float f10, float f11, float f12, float f13) {\n\tprintf(\"The 13 floats are %f %f %f %f %f %f %f %f %f %f %f %f %f\\n\", f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13);\n\treturn (float) (f1 + f2 + f3 + f4 + f5 + f6 + f7 + f8 + f9 + f10 + f11 + f12 + f13);\n}\n\nEXPORT(float) ffiTestFloats14(float f1, float f2, float f3, float f4, float f5, float f6, float f7, float f8, float f9, float f10, float f11, float f12, float f13, float f14) {\n\tprintf(\"The 14 floats are %f %f %f %f %f %f %f %f %f %f %f %f %f\\n\", f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13);\n\treturn (float) (f1 + f2 + f3 + f4 + f5 + f6 + f7 + f8 + f9 + f10 + f11 + f12 + f13 + f14);\n}\n\nEXPORT(double) ffiTestDoubles14(double f1, double f2, double f3, double f4, double f5, double f6, double f7, double f8, double f9, double f10, double f11, double f12, double f13, double f14) {\n\tprintf(\"The 14 double are %f %f %f %f %f %f %f %f %f %f %f %f %f\\n\", f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13);\n\treturn (double) (f1 + f2 + f3 + f4 + f5 + f6 + f7 + f8 + f9 + f10 + f11 + f12 + f13 + f14);\n}\n\n/* test passing and returning doubles */\nEXPORT(double) ffiTestDoubles(double d1, double d2) {\n\tprintf(\"The two floats are %f and %f\\n\", (float)d1, (float)d2);\n\treturn d1+d2;\n}\n\n/* test passing and returning strings */\nEXPORT(char*) ffiPrintString(char *string) {\n\tprintf(\"%s\\n\", string);\n\treturn string;\n}\n\n/* test passing and returning 64bit structures */\nEXPORT(ffiTestPoint2) ffiTestStruct64(ffiTestPoint2 pt1, ffiTestPoint2 pt2) {\n\tffiTestPoint2 result;\n\tprintf(\"pt1.x = %d\\npt1.y = %d\\npt2.x = %d\\npt2.y = %d\\n\",\n\t\t\tpt1.x, pt1.y, pt2.x, pt2.y);\n\tresult.x = pt1.x + pt2.x;\n\tresult.y = pt1.y + pt2.y;\n\treturn result;\n}\n\n/* test passing and returning large structures */\nEXPORT(ffiTestPoint4) ffiTestStructBig(ffiTestPoint4 pt1, ffiTestPoint4 pt2) {\n\tffiTestPoint4 result;\n\tprintf(\"pt1.x = %d\\npt1.y = %d\\npt1.z = %d\\npt1.w = %d\\n\",\n\t\t\tpt1.x, pt1.y, pt1.z, pt1.w);\n\tprintf(\"pt2.x = %d\\npt2.y = %d\\npt2.z = %d\\npt2.w = %d\\n\",\n\t\t\tpt2.x, pt2.y, pt2.z, pt2.w);\n\tresult.x = pt1.x + pt2.x;\n\tresult.y = pt1.y + pt2.y;\n\tresult.z = pt1.z + pt2.z;\n\tresult.w = pt1.w + pt2.w;\n\treturn result;\n}\n\n/* test passing and returning pointers */\nEXPORT(ffiTestPoint4*) ffiTestPointers(ffiTestPoint4 *pt1, ffiTestPoint4 *pt2) {\n\tffiTestPoint4 *result;\n\tprintf(\"pt1.x = %d\\npt1.y = %d\\npt1.z = %d\\npt1.w = %d\\n\",\n\t\t\tpt1->x, pt1->y, pt1->z, pt1->w);\n\tprintf(\"pt2.x = %d\\npt2.y = %d\\npt2.z = %d\\npt2.w = %d\\n\",\n\t\t\tpt2->x, pt2->y, pt2->z, pt2->w);\n\tresult = (ffiTestPoint4*) malloc(sizeof(ffiTestPoint4));\n\tresult->x = pt1->x + pt2->x;\n\tresult->y = pt1->y + pt2->y;\n\tresult->z = pt1->z + pt2->z;\n\tresult->w = pt1->w + pt2->w;\n\treturn result;\n}\n\n/* test passing and returning longlongs */\nEXPORT(LONGLONG) ffiTestLongLong(LONGLONG i1, LONGLONG i2) {\n\treturn i1 + i2;\n}\n\nEXPORT(LONGLONG) ffiTestLongLonga1(char c1, LONGLONG i1, LONGLONG i2) {\n\treturn c1 + i1 + i2;\n}\n\nEXPORT(LONGLONG) ffiTestLongLonga2(char c1, char c2, LONGLONG i1, LONGLONG i2) {\n\treturn c1 + c2 + i1 + i2;\n}\n\nEXPORT(LONGLONG) ffiTestLongLong8(char c1, char c2, char c3, char c4, char c5, char c6, char c7, char c8, LONGLONG i1, LONGLONG i2) {\n\treturn c1+c2+c3+c4+c5+c6+c7+c8+i1 + i2;\n}\n\nEXPORT(LONGLONG) ffiTestLongLong8a1(char c1, char c2, char c3, char c4, char c5, char c6, char c7, char c8, char c9, LONGLONG i1, LONGLONG i2) {\n\treturn c1+c2+c3+c4+c5+c6+c7+c8+c9+i1 + i2;\n}\n\nEXPORT(LONGLONG) ffiTestLongLong8a2(char c1, char c2, char c3, char c4, char c5, char c6, char c7, char c8, char c9, char c10, LONGLONG i1, LONGLONG i2) {\n\treturn c1+c2+c3+c4+c5+c6+c7+c8+c9+c10+i1 + i2;\n}\n\n#endif /* NO_FFI_TEST */\n#endif\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SqueakFFIPrims/sqMacIntel-Win32.c",
    "content": "#if __LITTLE_ENDIAN__\n/****************************************************************************\n*   PROJECT: Squeak foreign function interface\n*   FILE:    sqWin32FFI.c\n*   CONTENT: Win32 support for the foreign function interface\n*\n*   AUTHOR:  Andreas Raab (ar)\n*   ADDRESS: Walt Disney Imagineering, Glendale, CA\n*   EMAIL:   andreasr@wdi.disney.com\n*   RCSID:   $Id: sqWin32FFI.c 414 2002-06-01 11:44:39Z andreasraab $\n*\n*   NOTES:\n*   Altered by John M McIntosh for Mac Intel Support, use UI Lock, also use system V with Darwin and MacIntel logic assembler\n*\n*****************************************************************************/\n#include \"sq.h\"\n#include \"sqFFI.h\"\n\n#if !defined(PATH_MAX)\n# include <sys/syslimits.h>\n#endif\n\nextern struct VirtualMachine *interpreterProxy;\n#define primitiveFail() interpreterProxy->primitiveFail();\n\n#ifdef _MSC_VER\n#define LONGLONG __int64\n#endif\n#ifdef __GNUC__\n#define LONGLONG long long int\n#endif\n\n/* Max stack size */\n#define FFI_MAX_ARGS 128\n/* The stack used to assemble the arguments for a call */\n int   ffiArgs[FFI_MAX_ARGS];\n/* The stack pointer while filling the stack */\n int   ffiArgIndex = 0;\n/* The area for temporarily allocated strings */\nstatic char *ffiTempStrings[FFI_MAX_ARGS];\n/* The number of temporarily allocated strings */\nstatic int   ffiTempStringCount = 0;\n\n/* The return values for calls */\nvolatile  int      intReturnValue;\nvolatile  int      intReturnValue2;\nvolatile  double   floatReturnValue;\nstatic void*    structReturnValue;\n\n#define ARG_CHECK() if(ffiArgIndex >= FFI_MAX_ARGS) return primitiveFail();\n#define ARG_PUSH(value) { ARG_CHECK(); ffiArgs[ffiArgIndex++] = value; }\n#define MAX_PATH  PATH_MAX\n\n/*****************************************************************************/\n/*****************************************************************************/\nstatic FILE *ffiLogFile = NULL;\n\nint ffiLogFileNameOfLength(void *nameIndex, int nameLength) {\n  char fileName[MAX_PATH];\n  FILE *fp;\n\n  if(nameIndex && nameLength) {\n    if(nameLength >= MAX_PATH) return 0;\n    strncpy(fileName, nameIndex, nameLength);\n    fileName[nameLength] = 0;\n    /* attempt to open the file and if we can't fail */\n    fp = fopen(fileName, \"at\");\n    if(fp == NULL) return 0;\n    /* close the old log file if needed and use the new one */\n    if(ffiLogFile) fclose(ffiLogFile);\n    ffiLogFile = fp;\n    fprintf(ffiLogFile, \"------- Log started -------\\n\");\n    fflush(fp);\n  } else {\n    if(ffiLogFile) fclose(ffiLogFile);\n    ffiLogFile = NULL;\n  }\n  return 1;\n}\n\nint ffiLogCallOfLength(void *nameIndex, int nameLength) {\n    if(ffiLogFile == NULL) return 0;\n    fprintf(ffiLogFile, \"%.*s\\n\", nameIndex, nameLength);\n    fflush(ffiLogFile);\n}\n\n/*****************************************************************************/\n/*****************************************************************************/\n\n/*  ffiInitialize:\n\tAnnounce that the VM is about to do an external function call. */\nint ffiInitialize(void)\n{\n\tffiArgIndex = 0;\n\tffiTempStringCount = 0;\n\treturn 1;\n}\n\n/*  ffiSupportsCallingConvention:\n\tReturn true if the support code supports the given calling convention. */\nint ffiSupportsCallingConvention(int callType)\n{\n\tif(callType == FFICallTypeCDecl) return 1;\n\tif(callType == FFICallTypeApi) return 1;\n\treturn 0;\n}\n\nint ffiAlloc(int byteSize)\n{\n\treturn (int) malloc(byteSize);\n}\n\nint ffiFree(int ptr)\n{\n\tif(ptr) free((void*)ptr);\n\treturn 1;\n}\n\n/*****************************************************************************/\n/*****************************************************************************/\n\nint ffiPushSignedChar(int value) \n{ \n\tARG_PUSH(value); \n\treturn 1; \n}\n\nint ffiPushUnsignedChar(int value) \n{ \n\tARG_PUSH(value); \n\treturn 1; \n}\n\nint ffiPushSignedByte(int value) \n{ \n\tARG_PUSH(value); \n\treturn 1; \n}\n\nint ffiPushUnsignedByte(int value) \n{ \n\tARG_PUSH(value); \n\treturn 1; \n}\n\nint ffiPushSignedShort(int value) \n{ \n\tARG_PUSH(value); \n\treturn 1; \n}\n\nint ffiPushUnsignedShort(int value) \n{ \n\tARG_PUSH(value); \n\treturn 1; \n}\n\nint ffiPushSignedInt(int value) \n{ \n\tARG_PUSH(value); \n\treturn 1; \n}\n\nint ffiPushUnsignedInt(int value) \n{ \n\tARG_PUSH(value); \n\treturn 1; \n}\n\nint ffiPushSignedLongLong(int lowWord, int highWord) \n{ \n\tARG_PUSH(lowWord); \n\tARG_PUSH(highWord); \n\treturn 1; \n}\n\nint ffiPushUnsignedLongLong(int lowWord, int highWord) \n{ \n\tARG_PUSH(lowWord); \n\tARG_PUSH(highWord); \n\treturn 1; \n}\n\nint ffiPushSingleFloat(double value)\n{\n\tfloat floatValue;\n\tfloatValue = (float) value;\n\tARG_PUSH(*(int*)(&floatValue));\n\treturn 1;\n}\n\nint ffiPushDoubleFloat(double value)\n{\n\tARG_PUSH(((int*)(&value))[0]);\n\tARG_PUSH(((int*)(&value))[1]);\n\treturn 1;\n}\n\nint ffiPushStructureOfLength(int pointer, int* structSpec, int structSize)\n{\n\tint nItems, i;\n\tnItems = ((*structSpec & FFIStructSizeMask) + 3) / 4;\n\tif(pointer == 0) \n\t\treturn primitiveFail();\n\tfor(i=0; i < nItems;i++)\n\t\tARG_PUSH(((int*)pointer)[i]);\n\treturn 1;\n}\n\nint ffiPushPointer(int pointer)\n{\n\tARG_PUSH(pointer);\n\treturn 1;\n}\n\nint ffiPushStringOfLength(int srcIndex, int length)\n{\n\tchar *ptr;\n\tARG_CHECK(); /* fail before allocating */\n\tptr = (char*) malloc(length+1);\n\tif(!ptr) return primitiveFail();\n\tmemcpy(ptr, (void*)srcIndex, length);\n\tptr[length] = 0;\n\tffiTempStrings[ffiTempStringCount++] = ptr;\n\tARG_PUSH((int)ptr);\n\treturn 1;\n}\n\n/*****************************************************************************/\n/*****************************************************************************/\n\n/*  ffiCanReturn:\n\tReturn true if the support code can return the given type. */\nint ffiCanReturn(int *structSpec, int specSize)\n{\n\tint header = *structSpec;\n\tif(header & FFIFlagPointer) return 1;\n\tif(header & FFIFlagStructure) {\n\t\tint structSize = header & FFIStructSizeMask;\n\t\tif(structSize > 8) {\n\t\t\tstructReturnValue = malloc(structSize);\n\t\t\tif(!structReturnValue) return 0;\n\t\t\tARG_PUSH((int)structReturnValue);\n\t\t}\n\t}\n\treturn 1;\n}\n\n/*  ffiReturnFloatValue:\n\tReturn the value from a previous ffi call with float return type. */\ndouble ffiReturnFloatValue(void)\n{\n\treturn floatReturnValue;\n}\n\n/*  ffiLongLongResultLow:\n\tReturn the low 32bit from the 64bit result of a call to an external function */\nint ffiLongLongResultLow(void)\n{\n\treturn intReturnValue;\n}\n\n/*  ffiLongLongResultHigh:\n\tReturn the high 32bit from the 64bit result of a call to an external function */\nint ffiLongLongResultHigh(void)\n{\n\treturn intReturnValue2;\n}\n\n/*  ffiStoreStructure:\n\tStore the structure result of a previous ffi call into the given address.\n\tNote: Since the ST allocator always allocates multiples of 32bit we can\n\tuse the atomic types for storing <= 64bit result structures. */\nint ffiStoreStructure(int address, int structSize)\n{\n\tif(structSize <= 4) {\n\t\t*(int*)address = intReturnValue;\n\t\treturn 1;\n\t}\n\tif(structSize <= 8) {\n\t\t*(int*)address = intReturnValue;\n\t\t*(int*)(address+4) = intReturnValue2;\n\t\treturn 1;\n\t}\n\t/* assume pointer to hidden structure */\n\tmemcpy((void*)address, (void*) structReturnValue, structSize);\n\treturn 1;\n}\n\n/*  ffiCleanup:\n\tCleanup after a foreign function call has completed. */\nint ffiCleanup(void)\n{\n\tint i;\n\tfor(i=0; i<ffiTempStringCount; i++)\n\t\tfree(ffiTempStrings[i]);\n\tffiTempStringCount = 0;\n\tif(structReturnValue) {\n\t\tfree(structReturnValue);\n\t\tstructReturnValue = NULL;\n\t}\n\treturn 1;\n}\n\n/*****************************************************************************/\n/*****************************************************************************/\n\n\nint ffiCallAddressOfWithPointerReturnx(int fn, int callType)\n{\n  return ffiCallAddressOf((void *)fn, (void *)ffiArgs,\n\t\t\t  ffiArgIndex * sizeof(int));\n}\nint ffiCallAddressOfWithStructReturnx(int fn, int callType, int* structSpec, int specSize)\n{\n  return ffiCallAddressOf((void *)fn, (void *)ffiArgs,\n\t\t\t  ffiArgIndex * sizeof(int));\n}\n\nint ffiCallAddressOfWithReturnTypex(int fn, int callType, int typeSpec)\n{\n  return ffiCallAddressOf((void *)fn, (void *)ffiArgs,\n\t\t\t  ffiArgIndex * sizeof(int));\n}\n\nstatic int giLocker;\n\nint ffiCallAddressOfWithPointerReturn(int fn, int callType)\n{\n\tint resultsOfCall;\n\n\tif (giLocker == 0)\n\t\tgiLocker = interpreterProxy->ioLoadFunctionFrom(\"getUIToLock\", \"\");\n\tif (giLocker != 0) {\n\t\tlong *foo;\n\t\tfoo = malloc(sizeof(long)*5);\n\t\tfoo[0] = 2;\n\t\tfoo[1] = ffiCallAddressOfWithPointerReturnx;\n\t\tfoo[2] = fn;\n\t\tfoo[3] = callType;\n\t\tfoo[4] = 0;\n\t\t((int (*) (void *)) giLocker)(foo);\n\t\tresultsOfCall = foo[4];\n\t\tfree(foo);\n\t\treturn resultsOfCall;\n\t}\n}\n\nint ffiCallAddressOfWithStructReturn(int fn, int callType, int* structSpec, int specSize)\n{\n\tint resultsOfCall;\n\n\tif (giLocker == 0)\n\t\tgiLocker = interpreterProxy->ioLoadFunctionFrom(\"getUIToLock\", \"\");\n\tif (giLocker != 0) {\n\t\tlong *foo;\n\t\tfoo = malloc(sizeof(long)*7);\n\t\tfoo[0] = 4;\n\t\tfoo[1] = ffiCallAddressOfWithStructReturnx;\n\t\tfoo[2] = fn;\n\t\tfoo[3] = callType;\n\t\tfoo[4] = structSpec;\n\t\tfoo[5] = specSize;\n\t\tfoo[6] = 0;\n\t\t((int (*) (void *)) giLocker)(foo);\n\t\tresultsOfCall = foo[6];\n\t\tfree(foo);\n\t\treturn resultsOfCall;\n\t}\n}\n\nint ffiCallAddressOfWithReturnType(int fn, int callType, int typeSpec)\n{\n\tint resultsOfCall;\n\n\tif (giLocker == 0)\n\t\tgiLocker = interpreterProxy->ioLoadFunctionFrom(\"getUIToLock\", \"\");\n\tif (giLocker != 0) {\n\t\tlong *foo;\n\t\tfoo = malloc(sizeof(long)*6);\n\t\tfoo[0] = 3;\n\t\tfoo[1] = ffiCallAddressOfWithReturnTypex;\n\t\tfoo[2] = fn;\n\t\tfoo[3] = callType;\n\t\tfoo[4] = typeSpec;\n\t\tfoo[5] = 0;\n\t\t((int (*) (void *)) giLocker)(foo);\n\t\tresultsOfCall = foo[5];\n\t\tfree(foo);\n\t\treturn resultsOfCall;\n\t}\n}\n\n\n/*****************************************************************************/\n/*****************************************************************************/\n/*****************************************************************************/\n/************ Test functions for the foreign function interface **************/\n/*****************************************************************************/\n/*****************************************************************************/\n/*****************************************************************************/\n#ifndef NO_FFI_TEST\ntypedef struct ffiTestPoint2 {\n\tint x;\n\tint y;\n} ffiTestPoint2;\n\ntypedef struct ffiTestPoint4 {\n\tint x;\n\tint y;\n\tint z;\n\tint w;\n} ffiTestPoint4;\n\n#pragma export on\nEXPORT(char) ffiTestChars(char c1, char c2, char c3, char c4);\nEXPORT(short) ffiTestShorts(short c1, short c2, short c3, short c4);\nEXPORT(int) ffiTestInts(int c1, int c2, int c3, int c4);\nEXPORT(float) ffiTestFloats(float f1, float f2);\nEXPORT(double) ffiTestDoubles(double d1, double d2);\nEXPORT(char *) ffiPrintString(char *string);\nEXPORT(ffiTestPoint2) ffiTestStruct64(ffiTestPoint2 pt1, ffiTestPoint2 pt2);\nEXPORT(ffiTestPoint4) ffiTestStructBig(ffiTestPoint4 pt1, ffiTestPoint4 pt2);\nEXPORT(ffiTestPoint4*) ffiTestPointers(ffiTestPoint4 *pt1, ffiTestPoint4 *pt2);\nEXPORT(LONGLONG) ffiTestLongLong(LONGLONG i1, LONGLONG i2);\n#pragma export off\n\n\n/* test passing characters */\nEXPORT(char) ffiTestChars(char c1, char c2, char c3, char c4) {\n\tprintf(\"4 characters came in as\\nc1 = %c (%x)\\nc2 = %c (%x)\\nc3 = %c (%x)\\nc4 = %c (%x)\\n\", c1, c1, c2, c2, c3, c3, c4, c4);\n\treturn c1+c2;\n}\n\n/* test passing shorts */\nEXPORT(short) ffiTestShorts(short c1, short c2, short c3, short c4) {\n\tprintf(\"4 shorts came in as\\ns1 = %d (%x)\\ns2 = %d (%x)\\ns3 = %d (%x)\\ns4 = %d (%x)\\n\", c1, c1, c2, c2, c3, c3, c4, c4);\n\treturn c1+c2;\n}\n\n/* test passing ints */\nEXPORT(int) ffiTestInts(int c1, int c2, int c3, int c4) {\n\tprintf(\"4 ints came in as\\ni1 = %d (%x)\\ni2 = %d (%x)\\ni3 = %d (%x)\\ni4 = %d (%x)\\n\", c1, c1, c2, c2, c3, c3, c4, c4);\n\treturn c1+c2;\n}\n\n/* test passing and returning floats */\nEXPORT(float) ffiTestFloats(float f1, float f2) {\n\tprintf(\"The two floats are %f and %f\\n\", f1, f2);\n\treturn (float) (f1 + f2);\n}\n\n/* test passing and returning doubles */\nEXPORT(double) ffiTestDoubles(double d1, double d2) {\n\tprintf(\"The two floats are %f and %f\\n\", (float)d1, (float)d2);\n\treturn d1+d2;\n}\n\n/* test passing and returning strings */\nEXPORT(char*) ffiPrintString(char *string) {\n\tprintf(\"%s\\n\", string);\n\treturn string;\n}\n\n/* test passing and returning 64bit structures */\nEXPORT(ffiTestPoint2) ffiTestStruct64(ffiTestPoint2 pt1, ffiTestPoint2 pt2) {\n\tffiTestPoint2 result;\n\tprintf(\"pt1.x = %d\\npt1.y = %d\\npt2.x = %d\\npt2.y = %d\\n\",\n\t\t\tpt1.x, pt1.y, pt2.x, pt2.y);\n\tresult.x = pt1.x + pt2.x;\n\tresult.y = pt1.y + pt2.y;\n\treturn result;\n}\n\n/* test passing and returning large structures */\nEXPORT(ffiTestPoint4) ffiTestStructBig(ffiTestPoint4 pt1, ffiTestPoint4 pt2) {\n\tffiTestPoint4 result;\n\tprintf(\"pt1.x = %d\\npt1.y = %d\\npt1.z = %d\\npt1.w = %d\\n\",\n\t\t\tpt1.x, pt1.y, pt1.z, pt1.w);\n\tprintf(\"pt2.x = %d\\npt2.y = %d\\npt2.z = %d\\npt2.w = %d\\n\",\n\t\t\tpt2.x, pt2.y, pt2.z, pt2.w);\n\tresult.x = pt1.x + pt2.x;\n\tresult.y = pt1.y + pt2.y;\n\tresult.z = pt1.z + pt2.z;\n\tresult.w = pt1.w + pt2.w;\n\treturn result;\n}\n\n/* test passing and returning pointers */\nEXPORT(ffiTestPoint4*) ffiTestPointers(ffiTestPoint4 *pt1, ffiTestPoint4 *pt2) {\n\tffiTestPoint4 *result;\n\tprintf(\"pt1.x = %d\\npt1.y = %d\\npt1.z = %d\\npt1.w = %d\\n\",\n\t\t\tpt1->x, pt1->y, pt1->z, pt1->w);\n\tprintf(\"pt2.x = %d\\npt2.y = %d\\npt2.z = %d\\npt2.w = %d\\n\",\n\t\t\tpt2->x, pt2->y, pt2->z, pt2->w);\n\tresult = (ffiTestPoint4*) malloc(sizeof(ffiTestPoint4));\n\tresult->x = pt1->x + pt2->x;\n\tresult->y = pt1->y + pt2->y;\n\tresult->z = pt1->z + pt2->z;\n\tresult->w = pt1->w + pt2->w;\n\treturn result;\n}\n\n/* test passing and returning longlongs */\nEXPORT(LONGLONG) ffiTestLongLong(LONGLONG i1, LONGLONG i2) {\n\treturn i1 + i2;\n}\n\n#endif /* NO_FFI_TEST */\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SqueakFFIPrims/x86-sysv-MacIntel.c",
    "content": "#if __LITTLE_ENDIAN__\n\n\n// THIS IS BROKEN FOR CROQUET\n\n\n/* ppc-sysv.c -- FFI support for PowerPC SVr4 ABI\n * \n * Author: Ian.Piumarta@INRIA.Fr\n * \n * Last edited: 2003-02-06 20:08:58 by piumarta on felina.inria.fr\n * \n *   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n *\n * BUGS:\n * \n *   Because of the way strings and structs are handled, this implementation\n *   is neither reentrant nor thread safe.\n */\n\n#include \"sq.h\"\n#include \"sqFFI.h\"\n\n#include <stdio.h>\n#include <stdlib.h>\n\n#ifndef LONGLONG\n# define LONGLONG long long\n#endif\n\n#if 1\n# define DPRINTF(ARGS)printf ARGS\n#else\n# define DPRINTF(ARGS)\n#endif\n\n#if defined(FFI_TEST)\n  static int primitiveFail(void) { puts(\"primitive fail\"); exit(1); return 0; }\n#else\n  extern struct VirtualMachine *interpreterProxy;\n# define primitiveFail() interpreterProxy->primitiveFail()\n#endif\n\nenum { FFI_MAX_STACK= 512 };\n\nint\t ffiStack[FFI_MAX_STACK];\nint\t ffiStackIndex= 0;\nstatic int giLocker;\n\n\nstatic char\t*ffiTempStrings[FFI_MAX_STACK];\nstatic int\t ffiTempStringCount= 0;\n\n\nvolatile int\t ffiIntReturnValue;\nvolatile int\t ffiLongReturnValue;\nvolatile double\t ffiFloatReturnValue;\nvolatile int\t*ffiStructReturnValue;\n\n\nextern int ffiCallAddressOf(void *addr, void *stack, int size);\n\nstatic FILE *ffiLogFile = NULL;\n\nint ffiLogFileNameOfLength(void *nameIndex, int nameLength) {\n  char fileName[MAX_PATH];\n  FILE *fp;\n\n  if(nameIndex && nameLength) {\n    if(nameLength >= MAX_PATH) return 0;\n    strncpy(fileName, nameIndex, nameLength);\n    fileName[nameLength] = 0;\n    /* attempt to open the file and if we can't fail */\n    fp = fopen(fileName, \"at\");\n    if(fp == NULL) return 0;\n    /* close the old log file if needed and use the new one */\n    if(ffiLogFile) fclose(ffiLogFile);\n    ffiLogFile = fp;\n    fprintf(ffiLogFile, \"------- Log started -------\\n\");\n    fflush(fp);\n  } else {\n    if(ffiLogFile) fclose(ffiLogFile);\n    ffiLogFile = NULL;\n  }\n  return 1;\n}\n\nint ffiLogCallOfLength(void *nameIndex, int nameLength) {\n    if(ffiLogFile == NULL) return 0;\n    fprintf(ffiLogFile, \"%.*s\\n\", nameIndex, nameLength);\n    fflush(ffiLogFile);\n}\n\nint ffiInitialize(void)\n{\n  ffiStackIndex= 0;\n  ffiFloatReturnValue= 0.0;\n  return 1;\n}\n\n\nint ffiSupportsCallingConvention(int callType)\n{\n  return (callType == FFICallTypeCDecl)\n    ||   (callType == FFICallTypeApi);\n}\n\n\nint ffiAlloc(int byteSize)\n{\n  return (int)malloc(byteSize);\n}\n\n\nint ffiFree(int ptr)\n{\n  if (ptr) free((void *)ptr);\n  return 1;\n}\n\n\n#define checkStack()\t\t\t\t\\\n  if (ffiStackIndex >= FFI_MAX_STACK)\t\t\\\n     return primitiveFail();\n\n#define pushInt(value)\t\t\t\t\\\n  checkStack();\t\t\t\t\t\\\n  ffiStack[ffiStackIndex++]= (value)\n\n\nint ffiCanReturn(int *structSpec, int specSize)\n{\n  int header= *structSpec;\n  DPRINTF((\"ffiCanReturn structSpec %d specSize %d\\n\", structSpec, specSize));\n  if (header & FFIFlagPointer)\n    return 1;\n  if (header & FFIFlagStructure)\n    {\n      /* structs are always returned as pointers to hidden structures */\n      int structSize= header & FFIStructSizeMask;\n      ffiStructReturnValue= malloc(structSize);\n      if (!ffiStructReturnValue)\n\t\treturn 0;\n\t  DPRINTF((\"ffiCanReturn allocated Spec %d \\n\", ffiStructReturnValue));\n      pushInt((int)ffiStructReturnValue);\n    }\n  return 1;\n}\n\n\nint ffiPushSignedChar(int value)\n{ \n  DPRINTF((\"ffiPushSignedChar %d\\n\", value));\n  pushInt(value);\n  return 1; \n}\n\nint ffiPushUnsignedChar(int value)\n{ \n  DPRINTF((\"ffiPushUnsignedChar %d\\n\", value));\n  pushInt(value);\n  return 1; \n}\n\nint ffiPushSignedByte(int value)\n{ \n  DPRINTF((\"ffiPushSignedByte %d\\n\", value));\n  pushInt(value);\n  return 1; \n}\n\nint ffiPushUnsignedByte(int value)\n{ \n  DPRINTF((\"ffiPushUnsignedByte %d\\n\", value));\n  pushInt(value);\n  return 1; \n}\n\nint ffiPushSignedShort(int value)\n{ \n  DPRINTF((\"ffiPushSignedShort %d\\n\", value));\n  pushInt(value);\n  return 1; \n}\n\nint ffiPushUnsignedShort(int value)\n{ \n  DPRINTF((\"ffiPushUnsignedShort %d\\n\", value));\n  pushInt(value);\n  return 1; \n}\n\nint ffiPushSignedInt(int value)\n{ \n  DPRINTF((\"ffiPushSignedInt %d\\n\", value));\n  pushInt(value);\n  return 1; \n}\n\nint ffiPushUnsignedInt(int value)\n{ \n  DPRINTF((\"ffiPushUnsignedInt %d\\n\", value));\n  pushInt(value);\n  return 1; \n}\n\nint ffiPushSignedLongLong(int low, int high)\n{ \n  DPRINTF((\"ffiPushSignedLongLong %d %d\\n\", low, high));\n  pushInt(low);\n  pushInt(high);\n  return 1; \n}\n\nint ffiPushUnsignedLongLong(int low, int high)\n{ \n  DPRINTF((\"ffiPushUnsignedLongLong %d %d\\n\", low, high));\n  pushInt(low);\n  pushInt(high);\n  return 1; \n}\n\nint ffiPushPointer(int pointer)\n{ \n  DPRINTF((\"ffiPushPointer %d\\n\", pointer));\n  pushInt(pointer);\n  return 1; \n}\n\nint ffiPushSingleFloat(double value)\n{ \n  float f= (float)value;\n  DPRINTF((\"ffiPushSingleFloat %f\\n\", value));\n  pushInt(*(int *)&f);\n  return 1; \n}\n\nint ffiPushDoubleFloat(double value)\n{ \n  DPRINTF((\"ffiPushDoubleFloat %f\\n\", value));\n  pushInt(((int *)&value)[0]);\n  pushInt(((int *)&value)[1]);\n  return 1; \n}\n\nint ffiPushStringOfLength(int srcIndex, int length)\n{\n  char *ptr;\n  DPRINTF((\"ffiPushStringOfLength %d\\n\", length));\n  checkStack();\n  ptr= (char *)malloc(length + 1);\n  if (!ptr)\n    return primitiveFail();\n  DPRINTF((\"  ++ alloc string\\n\"));\n  memcpy(ptr, (void *)srcIndex, length);\n  ptr[length]= '\\0';\n  ffiTempStrings[ffiTempStringCount++]= ptr;\n  pushInt((int)ptr);\n  return 1;\n}\n\nint ffiPushStructureOfLength(int pointer, int *structSpec, int specSize)\n{\n  int lbs= *structSpec & FFIStructSizeMask;\n  int size= (lbs + sizeof(int) - 1) / sizeof(int);\n  DPRINTF((\"ffiPushStructureOfLength %d (%db %dw)\\n\", specSize, lbs, size));\n  if (ffiStackIndex + size > FFI_MAX_STACK)\n    return primitiveFail();\n  memcpy((void *)(ffiStack + ffiStackIndex), (void *)pointer, lbs);\n  ffiStackIndex += size;\n  return 1;\n}\n\n\ndouble  ffiReturnFloatValue(void)\t{ return ffiFloatReturnValue; }\nint\tffiLongLongResultLow(void)\t{ return ffiIntReturnValue; }\nint\tffiLongLongResultHigh(void)\t{ return ffiLongReturnValue; }\n\n\nint ffiStoreStructure(int address, int structSize)\n{\n  DPRINTF((\"ffiStoreStructure %d %d\\n\", address, structSize));\n// JMM  memcpy((void *)address, (ffiStructReturnValue\n//\t\t\t   ? (void *)ffiStructReturnValue\n//\t\t\t   : (void *)&ffiIntReturnValue),\n//\t structSize);\n\tif(structSize <= 4) {\n\t\t*(int*)address = ffiIntReturnValue;\n\t\treturn 1;\n\t}\n\tif(structSize <= 8) {\n\t\t*(int*)address = ffiIntReturnValue;\n\t\t*(int*)(address+4) = ffiLongReturnValue;\n\t\treturn 1;\n\t}\n\t/* assume pointer to hidden structure */\n\tmemcpy((void*)address, (void*) ffiStructReturnValue, structSize);\n\treturn 1;\n}\n\n\nint ffiCleanup(void)\n{\n  int i;\n  DPRINTF((\"ffiCleanup\\n\"));\n  for (i= 0;  i < ffiTempStringCount;  ++i)\n    {\n      DPRINTF((\"  ++ free string\\n\"));\n      free(ffiTempStrings[i]);\n    }\n  ffiTempStringCount= 0;\n  if (ffiStructReturnValue)\n    {\n      DPRINTF((\"  ++ free struct\\n\"));\n      free(ffiStructReturnValue);\n      ffiStructReturnValue= 0;\n    }\n  return 1;\n}\n\n\nint ffiCallAddressOfWithPointerReturnx(int fn, int callType)\n{\n  DPRINTF((\"ffiCallAddressOfWithPointerReturnx fn %d callType %d \\n\", fn, callType));\n  return ffiCallAddressOf((void *)fn, (void *)ffiStack,\n\t\t\t  ffiStackIndex * sizeof(int));\n}\n\nint ffiCallAddressOfWithStructReturnx(int fn, int callType, int* structSpec, int specSize)\n{\n  DPRINTF((\"ffiCallAddressOfWithStructReturnx fn %d callType %d structSpec %d specSize %d\\n\", fn, callType, structSpec, specSize));\n  return ffiCallAddressOf((void *)fn, (void *)ffiStack,\n\t\t\t  ffiStackIndex * sizeof(int));\n}\n\nint ffiCallAddressOfWithReturnTypex(int fn, int callType, int typeSpec)\n{\n  DPRINTF((\"ffiCallAddressOfWithReturnTypex fn %d callType %d \\n\", fn, callType, typeSpec));\n  return ffiCallAddressOf((void *)fn, (void *)ffiStack,\n\t\t\t  ffiStackIndex * sizeof(int));\n}\n\nint ffiCallAddressOfWithPointerReturn(int fn, int callType)\n{\n\tint resultsOfCall;\n\n\tif (giLocker == 0)\n\t\tgiLocker = interpreterProxy->ioLoadFunctionFrom(\"getUIToLock\", \"\");\n\tif (giLocker != 0) {\n\t\tlong *foo;\n\t\tfoo = malloc(sizeof(long)*5);\n\t\tfoo[0] = 2;\n\t\tfoo[1] = ffiCallAddressOfWithPointerReturnx;\n\t\tfoo[2] = fn;\n\t\tfoo[3] = callType;\n\t\tfoo[4] = 0;\n\t\t((int (*) (void *)) giLocker)(foo);\n\t\tresultsOfCall = foo[4];\n\t\tfree(foo);\n\t\treturn resultsOfCall;\n\t}\n}\n\nint ffiCallAddressOfWithStructReturn(int fn, int callType, int* structSpec, int specSize)\n{\n\tint resultsOfCall;\n\n\tif (giLocker == 0)\n\t\tgiLocker = interpreterProxy->ioLoadFunctionFrom(\"getUIToLock\", \"\");\n\tif (giLocker != 0) {\n\t\tlong *foo;\n\t\tfoo = malloc(sizeof(long)*7);\n\t\tfoo[0] = 4;\n\t\tfoo[1] = ffiCallAddressOfWithStructReturnx;\n\t\tfoo[2] = fn;\n\t\tfoo[3] = callType;\n\t\tfoo[4] = structSpec;\n\t\tfoo[5] = specSize;\n\t\tfoo[6] = 0;\n\t\t((int (*) (void *)) giLocker)(foo);\n\t\tresultsOfCall = foo[6];\n\t\tfree(foo);\n\t\treturn resultsOfCall;\n\t}\n}\n\nint ffiCallAddressOfWithReturnType(int fn, int callType, int typeSpec)\n{\n\tint resultsOfCall;\n\n\tif (giLocker == 0)\n\t\tgiLocker = interpreterProxy->ioLoadFunctionFrom(\"getUIToLock\", \"\");\n\tif (giLocker != 0) {\n\t\tlong *foo;\n\t\tfoo = malloc(sizeof(long)*6);\n\t\tfoo[0] = 3;\n\t\tfoo[1] = ffiCallAddressOfWithReturnTypex;\n\t\tfoo[2] = fn;\n\t\tfoo[3] = callType;\n\t\tfoo[4] = typeSpec;\n\t\tfoo[5] = 0;\n\t\t((int (*) (void *)) giLocker)(foo);\n\t\tresultsOfCall = foo[5];\n\t\tfree(foo);\n\t\treturn resultsOfCall;\n\t}\n}\n\n\n\n#if defined(FFI_TEST)\nvoid ffiDoAssertions(void) {}\n#endif\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SqueakFFIPrims/x86-sysv-asm-MacIntel.S",
    "content": "#if __LITTLE_ENDIAN__ \n/* x86-sysv-asm.S -- 386 FFI trampoline for SVr4-like ABIs\t-*- asm -*-\n *\n * Author: Ian.Piumarta@INRIA.Fr\n *\n * Last edited: Tue Jan 28 16:53:52 2003 by piumarta (Ian Piumarta) on xombul\n *\n *   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *      You are NOT ALLOWED to distribute modified versions of this file\n *      under its original name.  If you modify this file then you MUST\n *      rename it before making your modifications available publicly.\n * \n *   This file is distributed in the hope that it will be useful, but WITHOUT\n *   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n *   FITNESS FOR A PARTICULAR PURPOSE.\n *   \n *   You may use and/or distribute this file ONLY as part of Squeak, under\n *   the terms of the Squeak License as described in `LICENSE' in the base of\n *   this distribution, subject to the following additional restrictions:\n * \n *   1. The origin of this software must not be misrepresented; you must not\n *      claim that you wrote the original software.  If you use this software\n *      in a product, an acknowledgment to the original author(s) (and any\n *      other contributors mentioned herein) in the product documentation\n *      would be appreciated but is not required.\n * \n *   2. You must not distribute (or make publicly available by any\n *      means) a modified copy of this file unless you first rename it.\n * \n *   3. This notice must not be removed or altered in any source distribution.\n * \n *   Using (or modifying this file for use) in any context other than Squeak\n *   changes these copyright conditions.  Read the file `COPYING' in the\n *   directory `platforms/unix/doc' before proceeding with any such use.\n */\n\n#import <architecture/i386/asm_help.h>\n\t.text\n\t.globl\t_ffiCallAddressOf\n\n_ffiCallAddressOf:\t/* 8=addr, 12=stack, 16=stackSize */\n\tpushl\t%ebp\n\tmovl\t%esp, %ebp\n\tmovl\t16(%ebp), %ecx\n\ttestl\t%ecx, %ecx\n\tje\t2f\n\tsubl\t%ecx, %esp\n\tand     $0xFFFFFFF0,%esp /*align to 128-bits*/\n\tsubl\t$4, %ecx\n\tmovl\t12(%ebp), %edx\n1:\tmovl\t(%edx,%ecx,1), %eax\n\tmovl\t%eax, (%esp,%ecx,1)\n\tsubl\t$4, %ecx\n\tjnc\t1b\n\tjmp 3f\n2:\tand     $0xFFFFFFF0,%esp /*align to 128-bits*/\n\n3:\n\tcld\n\tcall\t*8(%ebp)\n\tREG_TO_EXTERN (%eax, _intReturnValue) \n\tREG_TO_EXTERN (%edx, _intReturnValue2) \n\tPICIFY(_floatReturnValue)\n\tfstpl\t(%edx)\n\tNON_LAZY_STUB(_floatReturnValue)\n\tmovl\t%ebp, %esp\n\tpopl\t%ebp\n\tret\n#endif"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SqueakObjectiveCPlugin/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>ObjectiveCPlugin</string>\n\t<key>CFBundleIconFile</key>\n\t<string>SqueakPlugin.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.ObjectiveCPlugin</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0.7</string>\n\t<key>CFBundleSignature</key>\n\t<string>FAST</string>\n\t<key>CFBundleVersion</key>\n\t<string>1.0.7</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SqueakObjectiveCPlugin/squeakProxy.h",
    "content": "//\n//  squeakProxy.h\n//  SqueakObjectiveC\n//\n//  Created by John M McIntosh on 01/02/09.\n//  Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n/* \n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import <Cocoa/Cocoa.h>\n#import <objc/objc-runtime.h>\n#import \"sq.h\"\n\n\nextern struct VirtualMachine* interpreterProxy;\n\n/* Protocol * foo1 = @protocol(CLLocationManagerDelegate);\t\n Protocol * foo2 = @protocol(NSCoding);\t\n Protocol * foo3 = @protocol(NSCopying);\t\n Protocol * foo4 = @protocol(NSDecimalNumberBehaviors);\t\n Protocol * foo5 = @protocol(NSFastEnumeration);\t\n Protocol * foo6 = @protocol(NSLocking);\t\n Protocol * foo7 = @protocol(NSMutableCopying);\t\n Protocol * foo8 = @protocol(NSObject);\t\n Protocol * foo9 = @protocol(NSURLAuthenticationChallengeSender);\t\n Protocol * foo10 = @protocol(NSURLProtocolClient);\t\n Protocol * foo11 = @protocol(UIAccelerometerDelegate);\t\n Protocol * foo12 = @protocol(UIAlertViewDelegate);\t\n Protocol * foo13 = @protocol(UIApplicationDelegate);\t\n Protocol * foo14 = @protocol(UIImagePickerControllerDelegate);\t\n Protocol * foo15 = @protocol(UINavigationBarDelegate);\t\n Protocol * foo16 = @protocol(UINavigationControllerDelegate);\t\n Protocol * foo17 = @protocol(UIPickerViewDataSource);\t\n Protocol * foo18 = @protocol(UIPickerViewDelegate);\t\n Protocol * foo19 = @protocol(UISearchBarDelegate);\t\n Protocol * foo20 = @protocol(UIScrollViewDelegate);\t\n Protocol * foo21 = @protocol(UITabBarControllerDelegate);\n Protocol * foo22 = @protocol(UITabBarDelegate);\t\n Protocol * foo23 = @protocol(UITableViewDataSource);\t\n Protocol * foo24 = @protocol(UITableViewDelegate);\t\n Protocol * foo25 = @protocol(UITextFieldDelegate);\t\n Protocol * foo26 = @protocol(UITextInputTraits);\t\n Protocol * foo27 = @protocol(UITextViewDelegate);\t\n Protocol * foo28 = @protocol(UIWebViewDelegate);\t*/\n\n@interface SqueakProxy : NSObject\n{\n\tsqInt sem;\n\tProtocol* protocol;\n\tNSInvocation* invocation;\n\tNSConditionLock* lock;\n\tNSMutableDictionary *sigs;\n\tid\ttarget;\n\tsqInt\tcallbackid;\n\tBOOL\tisCarbonVM;\n}\n- (id) initWithSemaphore: (sqInt) squeakSem protocolNSString: (NSString *) nameString target: (id) aTarget;\n- (void) setReturnValue: (char*) pointer;\n- (BOOL) isDataTypeAware;\n- (void) setIsCarbonVM;\n\n@property (nonatomic,assign) sqInt sem;\n@property (nonatomic,assign) Protocol* protocol;\n@property (nonatomic,assign) NSInvocation* invocation;\n@property (nonatomic,assign) NSConditionLock* lock;\n@property (nonatomic,assign) NSMutableDictionary *sigs;\n@property (nonatomic,retain) id target;\n@property (nonatomic,assign) sqInt callbackid;\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SqueakObjectiveCPlugin/squeakProxy.m",
    "content": "//\n//  squeakProxy.m\n//  SqueakObjectiveC\n//\n//  Created by John M McIntosh on 01/02/09.\n//  Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n\n/* \n Some code from \n http://www.squeaksource.com/ObjectiveCBridge.html\n developers and contributors \n Creator:\tAlain Fischer\n Admin:\tAvi Bryant, Alain Fischer\n Developer:\tTodd Blanchard\n \n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell \n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import \"squeakProxy.h\"\n\n\n@implementation SqueakProxy\n\n@synthesize sem;\n@synthesize invocation;\n@synthesize lock;\n@synthesize sigs;\n@synthesize protocol;\n@synthesize target;\n@synthesize callbackid;\n\n- (id) initWithSemaphore: (sqInt) squeakSem protocolNSString: (NSString *) nameString target: aTarget\n{\n\tsem = squeakSem;\n\tif (nameString)\n\t\tprotocol = objc_getProtocol([nameString UTF8String]);\n\telse\n\t\tprotocol = nil;\n\t\n\tif (aTarget) {\n\t\t[self setTarget: aTarget];\n\t} else {\n\t\tNSObject *dummy = [[NSObject alloc] init];\n\t\t[self setTarget: dummy];\n\t\t[dummy release];\n\t}\n\t\n\tlock = [[NSConditionLock alloc] initWithCondition: 0];\n\tsigs = [[NSMutableDictionary alloc] initWithCapacity: 10];\n\tisCarbonVM = NO;\n\tcallbackid = 0;\n\t\n\treturn self;\n}\n\n- (void) forwardInvocation: (NSInvocation*) anInvocation\n{\n\tNSDate *timeout;\n\t//\tNSLog(@\"forwardInvocation: %@\", anInvocation);\n\t//\tNSLog(@\"currentThread: %@\", [NSThread currentThread]);\n\tSEL selector = [anInvocation selector];\n\tNSString *selectorString = NSStringFromSelector(selector);\n\tif (![sigs objectForKey: selectorString]) {\n\t\t[anInvocation invokeWithTarget: target];\n\t\treturn;\n\t}\n\t\n\tif([lock lockWhenCondition: 0 beforeDate: (timeout = [[NSDate alloc] initWithTimeIntervalSinceNow: 3.0])])\n\t{ \n\t\t// NSLog(@\"inside lock 0\");\n\t\t[lock unlockWithCondition: 1];\n\t\t[timeout release];\n\t\tinvocation = [anInvocation retain];\n\t\t\n\t\t// NSLog(@\"signalling squeak\");\n\t\tinterpreterProxy->signalSemaphoreWithIndex(sem);\n\n\t\tif (isCarbonVM)\n\t\t\tinterpreterProxy->callbackEnter(&callbackid);\n\t\t\n\t\tif([lock lockWhenCondition: 2 beforeDate: (timeout = [[NSDate alloc] initWithTimeIntervalSinceNow: 4.0])])\n\t\t{\n\t\t\t// NSLog(@\"inside lock 2\");\n\t\t\t[timeout release];\n\t\t\t[invocation release];\n\t\t\tinvocation = nil;\n\t\t\t[lock unlockWithCondition: 0];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// NSLog(@\"failed lock 2\");\n\t\t\t[timeout release];\n\t\t\t[invocation release];\n\t\t\tinvocation = nil;\n\t\t\t[lock unlockWithCondition: 0];\n\t\t}\n\t\t//NSLog(@\"returning\");\n\t}\n\telse\n\t{\n\t\t[timeout release];\n\t\t//NSLog(@\"failed lock 0\");\n\t}\n}\n\n- (NSMethodSignature *) methodSignatureForSelector: (SEL) selector\n{\n\tNSMethodSignature* sig;\n\tNSString* sigAsString;\n\tsig = [target methodSignatureForSelector: selector];\n\tif (sig)\n\t\treturn sig;\n\t\n\tsig = [super methodSignatureForSelector: selector];\n\tif(sig) \n\t\treturn sig;\n\n\tNSString *selectorString = NSStringFromSelector (selector);\n\t\n\tif (sigAsString = [sigs objectForKey: selectorString]) {\n\t\t\n\t\tif (protocol) {\n\t\t\tstruct objc_method_description methodDescription;\n\t\t\tmethodDescription = protocol_getMethodDescription(protocol, selector, YES, YES);\n\t\t\tif(methodDescription.name == NULL) {\n\t\t\t\tmethodDescription = protocol_getMethodDescription(protocol, selector, NO, YES);\n\t\t\t}\n\t\t\t\n\t\t\tif(methodDescription.name != NULL) {\n\t\t\t\tNSMethodSignature *foo = [NSMethodSignature signatureWithObjCTypes:methodDescription.types];\n\t\t\t\treturn foo;\n\t\t\t}\n\t\t}\n\t\tNSMethodSignature *foo = [NSMethodSignature signatureWithObjCTypes: [sigAsString cStringUsingEncoding: NSASCIIStringEncoding]];\n\t\treturn foo;\n\t}\n\t\n\treturn nil;\n}\t\n\n- (BOOL) respondsToSelector: (SEL) selector\n{\n\tif([super respondsToSelector: selector]) \n\t\treturn true;\n\t\n\tif ([target respondsToSelector: selector]) \n\t\treturn true;\n\t\n\tNSString *which = NSStringFromSelector(selector);\n\t\n\tif ([sigs objectForKey: which]) \n\t\treturn true;\n\t\n\treturn false;\n}\n\n- (void) setReturnValue: (char*) pointer {\n\t[invocation setReturnValue: &pointer];\n}\n\n- (BOOL) isDataTypeAware {\n\treturn YES;\n}\n\n- (void) setIsCarbonVM {\n\tisCarbonVM = YES;\n}\n\n- (void) dealloc\n{\n\t[lock release];\n\t[sigs release];\n\t[target release];\n\t[super dealloc];\n}\n\n@end\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SqueakObjectiveCPlugin/squeakSUnitTester.h",
    "content": "//\n//  squeakSUnitTester.h\n//  SqueakObjectiveC\n//\n//  Created by John M McIntosh on 9/25/08.\n/* Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\nCopyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\nMIT License\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n*/\n//\n//\n\n#import <Cocoa/Cocoa.h>\n\n@interface squeakSUnitTester : NSObject \n- (char) test0char;\n- (int) test0int;\n- (short) test0short;\n- (long) test0long;\n- (long long) test0longlong;\n- (unsigned char) test0unsignedchar;\n- (unsigned int) test0unsignedint;\n- (unsigned short) test0unsignedshort;\n- (unsigned long) test0unsignedlong;\n- (unsigned long long) test0unsignedlonglong;\n- (float) test0float;\n- (double) test0double;\n- (void) test0void;\n- (char *) test0charpointer;\n- (squeakSUnitTester *) test0object;\n- (Class) test0class;\n- (SEL) test0methodselector;\n- (CGRect) test0CGRect;\n\n- (char) test0char: (char *) ignore;\n- (int) test0int: (char *) ignore;\n- (short) test0short: (char *) ignore;\n- (long) test0long: (char *) ignore;\n- (long long) test0longlong: (char *) ignore;\n- (unsigned char) test0unsignedchar: (char *) ignore;\n- (unsigned int) test0unsignedint: (char *) ignore;\n- (unsigned short) test0unsignedshort: (char *) ignore;\n- (unsigned long) test0unsignedlong: (char *) ignore;\n- (unsigned long long) test0unsignedlonglong: (char *) ignore;\n- (float) test0float: (char *) ignore;\n- (double) test0double: (char *) ignore;\n- (void) test0void: (char *) ignore;\n- (char *) test0charpointer: (char *) ignore;\n- (squeakSUnitTester *) test0object: (char *) ignore;\n- (Class) test0class: (char *) ignore;\n- (SEL) test0methodselector: (char *) ignore;\n- (CGRect) test0CGRect: (char *) ignore;\n\n- (char) test0char: (char *) ignore two: (char *) ignore2;\n- (int) test0int: (char *) ignore two: (char *) ignore2;\n- (short) test0short: (char *) ignore two: (char *) ignore2;\n- (long) test0long: (char *) ignore two: (char *) ignore2;\n- (long long) test0longlong: (char *) ignore two: (char *) ignore2;\n- (unsigned char) test0unsignedchar: (char *) ignore two: (char *) ignore2;\n- (unsigned int) test0unsignedint: (char *) ignore two: (char *) ignore2;\n- (unsigned short) test0unsignedshort: (char *) ignore two: (char *) ignore2;\n- (unsigned long) test0unsignedlong: (char *) ignore two: (char *) ignore2;\n- (unsigned long long) test0unsignedlonglong: (char *) ignore two: (char *) ignore2;\n- (float) test0float: (char *) ignore two: (char *) ignore2;\n- (double) test0double: (char *) ignore two: (char *) ignore2;\n- (void) test0void: (char *) ignore two: (char *) ignore2;\n- (char *) test0charpointer: (char *) ignore two: (char *) ignore2;\n- (squeakSUnitTester *) test0object: (char *) ignore two: (char *) ignore2;\n- (Class) test0class: (char *) ignore two: (char *) ignore2;\n- (SEL) test0methodselector: (char *) ignore two: (char *) ignore2;\n- (CGRect) test0CGRect: (char *) ignore two: (char *) ignore2;\n\n- (char) test0char: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n- (int) test0int: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n- (short) test0short: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n- (long) test0long: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n- (long long) test0longlong: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n- (unsigned char) test0unsignedchar: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n- (unsigned int) test0unsignedint: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n- (unsigned short) test0unsignedshort: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n- (unsigned long) test0unsignedlong: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n- (unsigned long long) test0unsignedlonglong: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n- (float) test0float: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n- (double) test0double: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n- (void) test0void: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n- (char *) test0charpointer: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n- (squeakSUnitTester *) test0object: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n- (Class) test0class: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n- (SEL) test0methodselector: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n- (CGRect) test0CGRect: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n\n- (char) test1char: (char) ignore;\n- (int) test1int: (int) ignore;\n- (short) test1short: (short) ignore;\n- (long) test1long: (long) ignore;\n- (long long) test1longlong: (long long) ignore;\n- (unsigned char) test1unsignedchar: (unsigned char) ignore;\n- (unsigned int) test1unsignedint: (unsigned int) ignore;\n- (unsigned short) test1unsignedshort: (unsigned short) ignore;\n- (unsigned long) test1unsignedlong: (unsigned long) ignore;\n- (unsigned long long) test1unsignedlonglong: (unsigned long long) ignore;\n- (float) test1float: (float) ignore;\n- (double) test1double: (double) ignore;\n- (char *) test1charpointer: (char *) ignore;\n- (squeakSUnitTester *) test1object: (squeakSUnitTester *) ignore;\n- (Class) test1class: (Class) ignore;\n- (SEL) test1methodselector: (SEL) ignore;\n- (CGRect) test1CGRect: (CGRect) ignore;\n\n- (char) test2char: (squeakSUnitTester *)ignore two: (squeakSUnitTester *) ignore2;\n- (int) test2int: (squeakSUnitTester *)ignore two: (squeakSUnitTester *) ignore2;\n- (short) test2short: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2;\n- (long) test2long: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2;\n- (long long) test2longlong: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2;\n- (unsigned char) test2unsignedchar: (squeakSUnitTester *)ignore two: (squeakSUnitTester *) ignore2;\n- (unsigned int) test2unsignedint: (squeakSUnitTester *)ignore two: (squeakSUnitTester *) ignore2;\n- (unsigned short) test2unsignedshort: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2;\n- (unsigned long) test2unsignedlong: (squeakSUnitTester *)ignore two: (squeakSUnitTester *) ignore2;\n- (unsigned long long) test2unsignedlonglong: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2;\n- (float) test2float: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2;\n- (double) test2double: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2;\n- (void) test2void: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2;\n- (char *) test2charpointer: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2;\n- (squeakSUnitTester *) test2object: (squeakSUnitTester *)ignore two: (squeakSUnitTester *) ignore2;\n- (Class) test2class: (squeakSUnitTester *)ignore two: (squeakSUnitTester *) ignore2;\n- (SEL) test2methodselector: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2 ;\n- (CGRect) test2CGRect: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2 ;\n\n- (oneway void) testQualifier0v;\n- (oneway void) testQualifier1v: (squeakSUnitTester *)ignore;\n- (oneway void) testQualifier2v: (squeakSUnitTester *)ignore two:  (squeakSUnitTester *)ignore2;\n- (oneway void) testQualifier3v: (squeakSUnitTester *)ignore two:  (squeakSUnitTester *)ignore2  three: (squeakSUnitTester *)ignore3;\n- (squeakSUnitTester *) testQualifier1io: (inout squeakSUnitTester *)ignore;\n- (squeakSUnitTester *) testQualifier2io: (inout squeakSUnitTester *)ignore two:  (inout squeakSUnitTester *)ignore2;\n- (squeakSUnitTester *) testQualifier3io: (inout squeakSUnitTester *)ignore two:  (inout squeakSUnitTester *)ignore2  three: (inout squeakSUnitTester *)ignore3;\n- (squeakSUnitTester *) testQualifier1i: (in squeakSUnitTester *)ignore;\n- (squeakSUnitTester *) testQualifier2i: (in squeakSUnitTester *)ignore two:  (in squeakSUnitTester *)ignore2;\n- (squeakSUnitTester *) testQualifier3i: (in squeakSUnitTester *)ignore two:  (in squeakSUnitTester *)ignore2  three: (in squeakSUnitTester *)ignore3;\n- (squeakSUnitTester *) testQualifier1o: (out squeakSUnitTester *)ignore;\n- (squeakSUnitTester *) testQualifier2o: (out squeakSUnitTester *)ignore two:  (out squeakSUnitTester *)ignore2;\n- (squeakSUnitTester *) testQualifier3o: (out squeakSUnitTester *)ignore two:  (out squeakSUnitTester *)ignore2  three: (out squeakSUnitTester *)ignore3;\n- (squeakSUnitTester *) testQualifier1r: (inout byref squeakSUnitTester *)ignore;\n- (squeakSUnitTester *) testQualifier2r: (inout byref  squeakSUnitTester *)ignore two:  (inout byref  squeakSUnitTester *)ignore2;\n- (squeakSUnitTester *) testQualifier3r: (inout byref  squeakSUnitTester *)ignore two:  (inout byref  squeakSUnitTester *)ignore2  three: (inout byref  squeakSUnitTester *)ignore3;\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/SqueakObjectiveCPlugin/squeakSUnitTester.m",
    "content": "//\n//  squeakSUnitTester.m\n//  SqueakObjectiveC\n//\n//  Created by John M McIntosh on 9/25/08.\n/* Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\nCopyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\nMIT License\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n*/\n//\n\n#import \"squeakSUnitTester.h\"\n\n\n@implementation squeakSUnitTester\n- (char) test0char {\n\treturn 'A';\n}\n- (int) test0int {\n\treturn -1;\n}\n- (short) test0short {\n\treturn 0xFFFF;\n}\n- (long) test0long {\n\treturn 0xFFFFFFFF;\n}\n- (long long) test0longlong {\n\treturn 0xFFFFFFFFFFFFFFFFLL;\n}\n- (unsigned char) test0unsignedchar{\n\treturn 'A';\n}\n- (unsigned int) test0unsignedint{\n\treturn 0xFFFFFFFF;\n}\n- (unsigned short) test0unsignedshort {\n\treturn 0xFFFF;\n}\n- (unsigned long) test0unsignedlong{\n\treturn 0xFFFFFFFF;\n}\n- (unsigned long long) test0unsignedlonglong {\n\treturn 0xFFFFFFFFFFFFFFFFLL;\n}\n- (float) test0float {\n\treturn 8.8;\n}\n- (double) test0double {\n\treturn 8.8;\n}\n- (void) test0void {\n}\n- (char *) test0charpointer {\n\tstatic char* squeak = \"squeak\";\n\treturn squeak;\n}\n- (squeakSUnitTester *) test0object {\n\treturn [squeakSUnitTester new];\n}\n- (Class) test0class {\n\treturn [squeakSUnitTester class];\n}\n- (SEL) test0methodselector {\n\tSEL selector;\n\tselector = NSSelectorFromString(\n\t\t@\"initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:\");\n\treturn selector;\n}\n- (CGRect) test0CGRect {\n\tCGRect foo;\n\tfoo.origin.x = 1.0;\n\tfoo.origin.y = 2.0;\n\tfoo.size.width = 3.0;\n\tfoo.size.height = 4.0;\n\treturn foo;\n}\n\n- (char) test0char: (char *)ignore {\nreturn 'A';\n}\n- (int) test0int: (char *)ignore {\nreturn -1;\n}\n- (short) test0short: (char *)ignore {\nreturn 0xFFFF;\n}\n- (long) test0long: (char *)ignore {\nreturn 0xFFFFFFFF;\n}\n- (long long) test0longlong: (char *)ignore {\nreturn 0xFFFFFFFFFFFFFFFFLL;\n}\n- (unsigned char) test0unsignedchar: (char *)ignore{\nreturn 'A';\n}\n- (unsigned int) test0unsignedint: (char *)ignore{\nreturn 0xFFFFFFFF;\n}\n- (unsigned short) test0unsignedshort: (char *)ignore {\nreturn 0xFFFF;\n}\n- (unsigned long) test0unsignedlong: (char *)ignore{\nreturn 0xFFFFFFFF;\n}\n- (unsigned long long) test0unsignedlonglong: (char *)ignore {\nreturn 0xFFFFFFFFFFFFFFFFLL;\n}\n- (float) test0float: (char *)ignore {\nreturn 8.8;\n}\n- (double) test0double: (char *)ignore {\nreturn 8.8;\n}\n- (void) test0void: (char *)ignore {\n}\n- (char *) test0charpointer: (char *)ignore {\nstatic char* squeak = \"squeak\";\nreturn squeak;\n}\n- (squeakSUnitTester *) test0object: (char *)ignore {\nreturn [squeakSUnitTester new];\n}\n- (Class) test0class: (char *)ignore {\nreturn [squeakSUnitTester class];\n}\n- (SEL) test0methodselector: (char *)ignore {\nSEL selector;\nselector = NSSelectorFromString(\n@\"initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:\");\nreturn selector;\n}\n- (CGRect) test0CGRect: (char *)ignore {\nCGRect foo;\nfoo.origin.x = 1.0;\nfoo.origin.y = 2.0;\nfoo.size.width = 3.0;\nfoo.size.height = 4.0;\nreturn foo;\n}\n\n- (char) test0char: (char *)ignore two: (char *) ignore2 {\nreturn 'A';\n}\n- (int) test0int: (char *)ignore two: (char *) ignore2 {\nreturn -1;\n}\n- (short) test0short: (char *)ignore  two: (char *) ignore2{\nreturn 0xFFFF;\n}\n- (long) test0long: (char *)ignore  two: (char *) ignore2{\nreturn 0xFFFFFFFF;\n}\n- (long long) test0longlong: (char *)ignore  two: (char *) ignore2{\nreturn 0xFFFFFFFFFFFFFFFFLL;\n}\n- (unsigned char) test0unsignedchar: (char *)ignore two: (char *) ignore2{\nreturn 'A';\n}\n- (unsigned int) test0unsignedint: (char *)ignore two: (char *) ignore2{\nreturn 0xFFFFFFFF;\n}\n- (unsigned short) test0unsignedshort: (char *)ignore  two: (char *) ignore2{\nreturn 0xFFFF;\n}\n- (unsigned long) test0unsignedlong: (char *)ignore two: (char *) ignore2{\nreturn 0xFFFFFFFF;\n}\n- (unsigned long long) test0unsignedlonglong: (char *)ignore  two: (char *) ignore2{\nreturn 0xFFFFFFFFFFFFFFFFLL;\n}\n- (float) test0float: (char *)ignore  two: (char *) ignore2{\nreturn 8.8;\n}\n- (double) test0double: (char *)ignore  two: (char *) ignore2{\nreturn 8.8;\n}\n- (void) test0void: (char *)ignore  two: (char *) ignore2{\n}\n- (char *) test0charpointer: (char *)ignore  two: (char *) ignore2{\nstatic char* squeak = \"squeak\";\nreturn squeak;\n}\n- (squeakSUnitTester *) test0object: (char *)ignore two: (char *) ignore2 {\nreturn [squeakSUnitTester new];\n}\n- (Class) test0class: (char *)ignore two: (char *) ignore2 {\nreturn [squeakSUnitTester class];\n}\n- (SEL) test0methodselector: (char *)ignore  two: (char *) ignore2 {\nSEL selector;\nselector = NSSelectorFromString(\n@\"initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:\");\nreturn selector;\n}\n- (CGRect) test0CGRect: (char *)ignore  two: (char *) ignore2 {\nCGRect foo;\nfoo.origin.x = 1.0;\nfoo.origin.y = 2.0;\nfoo.size.width = 3.0;\nfoo.size.height = 4.0;\nreturn foo;\n}\n\n- (char) test0char: (char *)ignore two: (char *) ignore2 three: (char *) ignore3 {\nreturn 'A';\n}\n- (int) test0int: (char *)ignore two: (char *) ignore2  three: (char *) ignore3 {\nreturn -1;\n}\n- (short) test0short: (char *)ignore  two: (char *) ignore2 three: (char *) ignore3 {\nreturn 0xFFFF;\n}\n- (long) test0long: (char *)ignore  two: (char *) ignore2 three: (char *) ignore3 {\nreturn 0xFFFFFFFF;\n}\n- (long long) test0longlong: (char *)ignore  two: (char *) ignore2 three: (char *) ignore3 {\nreturn 0xFFFFFFFFFFFFFFFFLL;\n}\n- (unsigned char) test0unsignedchar: (char *)ignore two: (char *) ignore2 three: (char *) ignore3 {\nreturn 'A';\n}\n- (unsigned int) test0unsignedint: (char *)ignore two: (char *) ignore2 three: (char *) ignore3 {\nreturn 0xFFFFFFFF;\n}\n- (unsigned short) test0unsignedshort: (char *)ignore  two: (char *) ignore2 three: (char *) ignore3 {\nreturn 0xFFFF;\n}\n- (unsigned long) test0unsignedlong: (char *)ignore two: (char *) ignore2 three: (char *) ignore3 {\nreturn 0xFFFFFFFF;\n}\n- (unsigned long long) test0unsignedlonglong: (char *)ignore  two: (char *) ignore2 three: (char *) ignore3 {\nreturn 0xFFFFFFFFFFFFFFFFLL;\n}\n- (float) test0float: (char *)ignore  two: (char *) ignore2 three: (char *) ignore3 {\nreturn 8.8;\n}\n- (double) test0double: (char *)ignore  two: (char *) ignore2 three: (char *) ignore3 {\nreturn 8.8;\n}\n- (void) test0void: (char *)ignore  two: (char *) ignore2 three: (char *) ignore3 {\n}\n- (char *) test0charpointer: (char *)ignore  two: (char *) ignore2 three: (char *) ignore3 {\nstatic char* squeak = \"squeak\";\nreturn squeak;\n}\n- (squeakSUnitTester *) test0object: (char *)ignore two: (char *) ignore2  three: (char *) ignore3 {\nreturn [squeakSUnitTester new];\n}\n- (Class) test0class: (char *)ignore two: (char *) ignore2  three: (char *) ignore3 {\nreturn [squeakSUnitTester class];\n}\n- (SEL) test0methodselector: (char *)ignore  two: (char *) ignore2  three: (char *) ignore3 {\nSEL selector;\nselector = NSSelectorFromString(\n@\"initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:\");\nreturn selector;\n}\n- (CGRect) test0CGRect: (char *)ignore  two: (char *) ignore2  three: (char *) ignore3  {\nCGRect foo;\nfoo.origin.x = 1.0;\nfoo.origin.y = 2.0;\nfoo.size.width = 3.0;\nfoo.size.height = 4.0;\nreturn foo;\n}\n\n- (char) test1char: (char) ignore {\n\treturn ignore;\n}\n- (int) test1int: (int) ignore {\n\treturn ignore;\n}\n- (short) test1short: (short) ignore {\n\treturn ignore;\n}\n- (long) test1long: (long) ignore {\nreturn ignore;\n}\n- (long long) test1longlong: (long long) ignore {\nreturn ignore;\n}\n- (unsigned char) test1unsignedchar: (unsigned char) ignore {\n\treturn ignore;\n}\n- (unsigned int) test1unsignedint: (unsigned int) ignore {\nreturn ignore;\n}\n- (unsigned short) test1unsignedshort: (unsigned short) ignore {\n\treturn ignore;\n}\n- (unsigned long) test1unsignedlong: (unsigned long) ignore {\n\treturn ignore;\n}\n- (unsigned long long) test1unsignedlonglong: (unsigned long long) ignore {\n\treturn ignore;\n}\n- (float) test1float: (float) ignore {\n\treturn ignore;\n}\n- (double) test1double: (double) ignore {\n\treturn ignore;\n}\n- (char *) test1charpointer: (char *) ignore {\nreturn ignore;\n}\n- (squeakSUnitTester *) test1object: (squeakSUnitTester *) ignore {\nreturn ignore;\n}\n- (Class) test1class: (Class) ignore {\nreturn ignore;\n}\n- (SEL) test1methodselector: (SEL) ignore {\nreturn ignore;\n}\n- (CGRect) test1CGRect: (CGRect) ignore {\n\treturn ignore;\n}\n\n- (char) test2char: (squeakSUnitTester *)ignore two: (squeakSUnitTester *) ignore2 {\nreturn 'A';\n}\n- (int) test2int: (squeakSUnitTester *)ignore two: (squeakSUnitTester *) ignore2 {\nreturn -1;\n}\n- (short) test2short: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2{\nreturn 0xFFFF;\n}\n- (long) test2long: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2{\nreturn 0xFFFFFFFF;\n}\n- (long long) test2longlong: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2{\nreturn 0xFFFFFFFFFFFFFFFFLL;\n}\n- (unsigned char) test2unsignedchar: (squeakSUnitTester *)ignore two: (squeakSUnitTester *) ignore2{\nreturn 'A';\n}\n- (unsigned int) test2unsignedint: (squeakSUnitTester *)ignore two: (squeakSUnitTester *) ignore2{\nreturn 0xFFFFFFFF;\n}\n- (unsigned short) test2unsignedshort: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2{\nreturn 0xFFFF;\n}\n- (unsigned long) test2unsignedlong: (squeakSUnitTester *)ignore two: (squeakSUnitTester *) ignore2{\nreturn 0xFFFFFFFF;\n}\n- (unsigned long long) test2unsignedlonglong: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2{\nreturn 0xFFFFFFFFFFFFFFFFLL;\n}\n- (float) test2float: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2{\nreturn 8.8;\n}\n- (double) test2double: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2{\nreturn 8.8;\n}\n- (void) test2void: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2{\n}\n- (char *) test2charpointer: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2{\nstatic char* squeak = \"squeak\";\nreturn squeak;\n}\n- (squeakSUnitTester *) test2object: (squeakSUnitTester *)ignore two: (squeakSUnitTester *) ignore2 {\nreturn [squeakSUnitTester new];\n}\n- (Class) test2class: (squeakSUnitTester *)ignore two: (squeakSUnitTester *) ignore2 {\nreturn [squeakSUnitTester class];\n}\n- (SEL) test2methodselector: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2 {\nSEL selector;\nselector = NSSelectorFromString(\n@\"initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:\");\nreturn selector;\n}\n- (CGRect) test2CGRect: (squeakSUnitTester *) ignore two: (squeakSUnitTester *) ignore2 {\n\tCGRect foo;\n\tfoo.origin.x = 1.0;\n\tfoo.origin.y = 2.0;\n\tfoo.size.width = 3.0;\n\tfoo.size.height = 4.0;\n\treturn foo;\n}\n\n- (oneway void) testQualifier0v {\n}\n- (oneway void) testQualifier1v: (squeakSUnitTester *)ignore {\n}\n- (oneway void) testQualifier2v: (squeakSUnitTester *)ignore two:  (squeakSUnitTester *)ignore2;{\n}\n- (oneway void) testQualifier3v: (squeakSUnitTester *)ignore two:  (squeakSUnitTester *)ignore2  three: (squeakSUnitTester *)ignore3 {\n}\n- (squeakSUnitTester *) testQualifier1io: (inout squeakSUnitTester *)ignore {\nreturn ignore;\n}\n- (squeakSUnitTester *) testQualifier2io: (inout squeakSUnitTester *)ignore two:  (inout squeakSUnitTester *)ignore2  {\nreturn ignore2;\n}\n- (squeakSUnitTester *) testQualifier3io: (inout squeakSUnitTester *)ignore two:  (inout squeakSUnitTester *)ignore2  three: (inout squeakSUnitTester *)ignore3\n{\nreturn ignore3;\n}\n- (squeakSUnitTester *) testQualifier1i: (in squeakSUnitTester *)ignore {\nreturn ignore;\n}\n- (squeakSUnitTester *) testQualifier2i: (in squeakSUnitTester *)ignore two:  (in squeakSUnitTester *)ignore2  {\nreturn ignore2;\n}\n- (squeakSUnitTester *) testQualifier3i: (in squeakSUnitTester *)ignore two:  (in squeakSUnitTester *)ignore2  three: (in squeakSUnitTester *)ignore3\n{\nreturn ignore3;\n}\n- (squeakSUnitTester *) testQualifier1o: (out squeakSUnitTester *)ignore {\nreturn ignore;\n}\n- (squeakSUnitTester *) testQualifier2o: (out squeakSUnitTester *)ignore two:  (out squeakSUnitTester *)ignore2  {\nreturn ignore2;\n}\n- (squeakSUnitTester *) testQualifier3o: (out squeakSUnitTester *)ignore two:  (out squeakSUnitTester *)ignore2  three: (out squeakSUnitTester *)ignore3\n{\nreturn ignore3;\n}\n- (squeakSUnitTester *) testQualifier1r: (inout byref  squeakSUnitTester *)ignore {\nreturn ignore;\n}\n- (squeakSUnitTester *) testQualifier2r: (inout byref  squeakSUnitTester *)ignore two:  (inout byref  squeakSUnitTester *)ignore2  {\nreturn ignore2;\n}\n- (squeakSUnitTester *) testQualifier3r: (inout byref  squeakSUnitTester *)ignore two:  (inout byref  squeakSUnitTester *)ignore2  three: (inout byref  squeakSUnitTester *)ignore3\n{\nreturn ignore3;\n}\n\n\t   \n@end\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/TestOSAPlugin/Info-TestOSAPlugin__Upgraded_.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>TestOSAPlugin</string>\n\t<key>CFBundleGetInfoString</key>\n\t<string>TestOSAPlugin v1.0.2b1 for Squeak, see http://www.squeak.org</string>\n\t<key>CFBundleIconFile</key>\n\t<string>SqueakPlugin.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.TestOSAPlugin</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>TestOSAPlugin for Squeak</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0.2b1</string>\n\t<key>CFBundleSignature</key>\n\t<string>FAST</string>\n\t<key>CFBundleVersion</key>\n\t<string>1.0.2b1</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/TestOSAPlugin/JMMFixOSAPluginForOSX.1.cs",
    "content": "'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 31 October 2005 at 3:33:15 pm'!\r\r!TestOSAPlugin methodsFor: 'OSA prims' stamp: 'JMM 10/31/2005 11:59'!\rprimOSADoScript: source in: context mode: mode resultType: type to: result\r\r\t|component resultsOfCall giLocker |\r\tcomponent := self primitive: \t'primOSADoScript'\r\t\t\t\t\tparameters: #(AEDesc OSAID SmallInteger DescType AEDesc)\r\t\t\t\t\treceiver:\t#ComponentInstance.\r\r\tself cCode: '\r        giLocker = interpreterProxy->ioLoadFunctionFrom(\"getUIToLock\", \"\");\r        if (giLocker !!= 0) {\r            long *foo;\r            foo = malloc(sizeof(long)*9);\r            foo[0] = 6;\r            foo[1] = OSADoScript;\r            foo[2] = *component;\r            foo[3] = source;\r            foo[4] = *context;\r            foo[5] = *type;\r            foo[6] = mode;\r            foo[7] = result;\r            foo[8] = 0;\r            ((int (*) (void *)) giLocker)(foo);\r            resultsOfCall = interpreterProxy->positive32BitIntegerFor(foo[8]);\r            free(foo);}'\r\t\t\tinSmalltalk: [[component. giLocker].  resultsOfCall := -1].\r\t^resultsOfCall asOop: Unsigned! !\r\r!TestOSAPlugin methodsFor: 'OSA prims' stamp: 'JMM 10/31/2005 11:59'!\rprimOSAExecute: script in: context mode: mode to: result\r\r\t|component giLocker resultsOfCall |\r\tcomponent := self primitive: \t'primOSAExecute'\r\t\t\t\t\tparameters: #(OSAID OSAID SmallInteger OSAID)\r\t\t\t\t\treceiver:\t#ComponentInstance.\r\r\tself cCode: '\r         giLocker = interpreterProxy->ioLoadFunctionFrom(\"getUIToLock\", \"\");\r         if (giLocker !!= 0) {\r            long *foo;\r            foo = malloc(sizeof(long)*8);\r            foo[0] = 5;\r            foo[1] = OSAExecute;\r            foo[2] = *component;\r            foo[3] = *script;\r            foo[4] = *context;\r            foo[5] = mode;\r            foo[6] = result;\r            foo[7] = 0;\r            ((int (*) (void *)) giLocker)(foo);\r            resultsOfCall = interpreterProxy->positive32BitIntegerFor(foo[7]);\r            free(foo); }\r'\r\t\t\tinSmalltalk: [[component. giLocker]. resultsOfCall _ -1].\r\t^resultsOfCall asOop: Unsigned! !\r\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/TestOSAPlugin/TestOSAPlugin.proj.xml",
    "content": "<?xml version=\"1.0\"?>\n<?codewarrior exportversion=\"1.0\" ideversion=\"4.0\"?>\n<!DOCTYPE PROJECT [\n\n<!ELEMENT PROJECT (TARGETLIST, TARGETORDER, GROUPLIST, DESIGNLIST?)>\n<!ELEMENT TARGETLIST (TARGET+)>\n<!ELEMENT TARGET (NAME, SETTINGLIST, FILELIST?, LINKORDER?, SEGMENTLIST?, OVERLAYGROUPLIST?, SUBTARGETLIST?, SUBPROJECTLIST?)>\n<!ELEMENT NAME (#PCDATA)>\n<!ELEMENT USERSOURCETREETYPE (#PCDATA)>\n<!ELEMENT PATH (#PCDATA)>\n<!ELEMENT FILELIST (FILE*)>\n<!ELEMENT FILE (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?, ROOTFILEREF?, FILEKIND?, FILEFLAGS?)>\n<!ELEMENT PATHTYPE (#PCDATA)>\n<!ELEMENT PATHROOT (#PCDATA)>\n<!ELEMENT ACCESSPATH (#PCDATA)>\n<!ELEMENT PATHFORMAT (#PCDATA)>\n<!ELEMENT ROOTFILEREF (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)>\n<!ELEMENT FILEKIND (#PCDATA)>\n<!ELEMENT FILEFLAGS (#PCDATA)>\n<!ELEMENT FILEREF (TARGETNAME?, PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)>\n<!ELEMENT TARGETNAME (#PCDATA)>\n<!ELEMENT SETTINGLIST ((SETTING|PANELDATA)+)>\n<!ELEMENT SETTING (NAME?, (VALUE|(SETTING+)))>\n<!ELEMENT PANELDATA (NAME, VALUE)>\n<!ELEMENT VALUE (#PCDATA)>\n<!ELEMENT LINKORDER (FILEREF*)>\n<!ELEMENT SEGMENTLIST (SEGMENT+)>\n<!ELEMENT SEGMENT (NAME, ATTRIBUTES?, FILEREF*)>\n<!ELEMENT ATTRIBUTES (#PCDATA)>\n<!ELEMENT OVERLAYGROUPLIST (OVERLAYGROUP+)>\n<!ELEMENT OVERLAYGROUP (NAME, BASEADDRESS, OVERLAY*)>\n<!ELEMENT BASEADDRESS (#PCDATA)>\n<!ELEMENT OVERLAY (NAME, FILEREF*)>\n<!ELEMENT SUBTARGETLIST (SUBTARGET+)>\n<!ELEMENT SUBTARGET (TARGETNAME, ATTRIBUTES?)>\n<!ELEMENT SUBPROJECTLIST (SUBPROJECT+)>\n<!ELEMENT SUBPROJECT (FILEREF, SUBPROJECTTARGETLIST)>\n<!ELEMENT SUBPROJECTTARGETLIST (SUBPROJECTTARGET*)>\n<!ELEMENT SUBPROJECTTARGET (TARGETNAME, ATTRIBUTES?)>\n<!ELEMENT TARGETORDER (ORDEREDTARGET|ORDEREDDESIGN)*>\n<!ELEMENT ORDEREDTARGET (NAME)>\n<!ELEMENT ORDEREDDESIGN (NAME, ORDEREDTARGET+)>\n<!ELEMENT GROUPLIST (GROUP|FILEREF)*>\n<!ELEMENT GROUP (NAME, (GROUP|FILEREF)*)>\n<!ELEMENT DESIGNLIST (DESIGN+)>\n<!ELEMENT DESIGN (NAME, DESIGNDATA)>\n<!ELEMENT DESIGNDATA (#PCDATA)>\n]>\n<PROJECT>\n    <TARGETLIST>\n        <TARGET>\n            <NAME>TestOSAPlugin</NAME>\n            <SETTINGLIST>\n\n                <!-- Settings for \"Source Trees\" panel -->\n                <SETTING><NAME>UserSourceTrees</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"Custom Keywords\" panel -->\n                <SETTING><NAME>CustomColor1</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor2</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor3</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor4</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Access Paths\" panel -->\n                <SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>UserSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>::</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n                <SETTING><NAME>SystemSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MacOS Support:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MSL:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Target Settings\" panel -->\n                <SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING>\n                <SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>Targetname</NAME><VALUE>TestOSAPlugin</VALUE></SETTING>\n                <SETTING><NAME>OutputDirectory</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>SaveEntriesUsingRelativePaths</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"File Mappings\" panel -->\n                <SETTING><NAME>FileMappings</NAME>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>APPL</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>Appl</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MMLB</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MPLF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MWCD</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>RSRC</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.bh</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Balloon Help</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cpp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.exp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.fr</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>ODFRC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.h</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.idl</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>SOMobjects TS</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.p</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pas</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.r</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Rez</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.s</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PPCAsm</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>XCOF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>docu</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>rsrc</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>shlb</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>stub</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.doc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Build Extras\" panel -->\n                <SETTING><NAME>CacheModDates</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>ActivateBrowser</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>DumpBrowserInfo</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>CacheSubprojects</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>UseThirdPartyDebugger</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>DebuggerCommandLine</NAME><VALUE></VALUE></SETTING>\n                <PANELDATA><NAME>Debugger Runtime</NAME><VALUE>\n                    0002000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000011391560100000000000010011391E70\n                    00020000000000000000000011390FE000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    00000000000000000000000000000000\n                </VALUE></PANELDATA>\n\n                <!-- Settings for \"Debugger Target\" panel -->\n                <SETTING><NAME>LogSystemMessages</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>AutoTargetDLLs</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>StopAtWatchpoints</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>PauseWhileRunning</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>PauseInterval</NAME><VALUE>5</VALUE></SETTING>\n                <SETTING><NAME>PauseUIFlags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>AltExePath</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>StopAtTempBPOnLaunch</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>CacheSymbolics</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>TempBPFunctionName</NAME><VALUE>main</VALUE></SETTING>\n                <SETTING><NAME>TempBPType</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"68K CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_68K_codesize</NAME><VALUE>Smart</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_structalignment</NAME><VALUE>MC68K</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fp_mode</NAME><VALUE>SANE</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_code68020</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_mpwc</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fourbyteints</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_IEEEdoubles</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fardata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farvtables</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_pcrelstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_macsbug</NAME><VALUE>New</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_a6frames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"68K Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_68K_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_mix</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"68K Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_68K_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_68K_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"68K Linker\" panel -->\n                <SETTING><NAME>MWLinker_68K_linksym</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_symfullpath</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_linksingle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_fastlink</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_generateMap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_glueintosegone</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"68K Project\" panel -->\n                <SETTING><NAME>MWProject_68K_type</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_outfile</NAME><VALUE>Mac OS PPC C/C++</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filecreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filetype</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_size</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_flags</NAME><VALUE>22656</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcheader</NAME><VALUE>Standard</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmulti</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_a4</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_minsize</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcsegtype</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_cfm68kcodegen</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_thedebugger</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrc_custom</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_rseg_app</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_pilot_lib</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_pilot_main_entry</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Compiler\" panel -->\n                <SETTING><NAME>MWFrontEnd_C_cplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_checkprotos</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_arm</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_trigraphs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_onlystdkeywords</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enumsalwaysint</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwpointerstyle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_prefixname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ansistrict</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwcnewline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_wchar_type</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enableexceptions</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontreusestrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_poolstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_useRTTI</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_multibyteaware</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_unsignedchars</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_autoinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_booltruefalse</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_direct_to_som</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_som_env_check</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_alwaysinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_inlinelevel</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ecplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_objective_c</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_defer_codegen</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Warnings\" panel -->\n                <SETTING><NAME>MWWarning_C_warn_illpragma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_emptydecl</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_possunwant</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedvar</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedarg</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_extracomma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_pedantic</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warningerrors</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_hidevirtual</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_implicitconv</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_notinlined</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_structclass</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"CFM68K\" panel -->\n                <SETTING><NAME>MWCFM68K_exports</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_farthreshold</NAME><VALUE>256</VALUE></SETTING>\n                <SETTING><NAME>PCFM68K_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_mainname</NAME><VALUE>__start</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_termname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_alignment</NAME><VALUE>Align_2</VALUE></SETTING>\n\n                <!-- Settings for \"MacOS Merge Panel\" panel -->\n                <SETTING><NAME>MWMerge_MacOS_projectType</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputName</NAME><VALUE>Merge Out</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputCreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputType</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_suppressWarning</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyFragments</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_skipResources</NAME>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE>\u0011s0</VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"PPC CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_PPC_structalignment</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tracebacktables</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processor</NAME><VALUE>P750</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_readonlystrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_fpcontract</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_schedule</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_peephole</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processorspecific</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_altivec</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vectortocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vrsave</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_PPC_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_extended</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_mix</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_PPC_optimizationlevel</NAME><VALUE>Level4</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_PPC_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Linker\" panel -->\n                <SETTING><NAME>MWLinker_PPC_linksym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_symfullpath</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_permitmultdefs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmode</NAME><VALUE>Normal</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_mainname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_termname</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"PPC PEF\" panel -->\n                <SETTING><NAME>MWPEF_exports</NAME><VALUE>Pragma</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sortcode</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_expandbss</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWPEF_collapsereloads</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Project\" panel -->\n                <SETTING><NAME>MWProject_PPC_type</NAME><VALUE>SharedLibrary</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>TestOSAPlugin</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>1178686292</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>1936223330</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_size</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_minsize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_flags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcheader</NAME><VALUE>Native</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"PPCAsm Panel\" panel -->\n                <SETTING><NAME>MWAssembler_PPC_auxheader</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_symmode</NAME><VALUE>Mac</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_dialect</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_prefixfile</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_typecheck</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_warnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_casesensitive</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"Rez Compiler\" panel -->\n                <SETTING><NAME>MWRez_Language_maxwidth</NAME><VALUE>80</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_script</NAME><VALUE>Roman</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_alignment</NAME><VALUE>Align1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filtermode</NAME><VALUE>FilterSkip</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_suppresswarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_escapecontrolchars</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_prefixname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filteredtypes</NAME><VALUE>'CODE' 'DATA' 'PICT'</VALUE></SETTING>\n            </SETTINGLIST>\n            <FILELIST>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InterfaceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MathLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>TestOSAPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>AppleScriptLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n            </FILELIST>\n            <LINKORDER>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InterfaceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MathLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>TestOSAPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>AppleScriptLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n            </LINKORDER>\n        </TARGET>\n    </TARGETLIST>\n\n    <TARGETORDER>\n        <ORDEREDTARGET><NAME>TestOSAPlugin</NAME></ORDEREDTARGET>\n    </TARGETORDER>\n\n    <GROUPLIST>\n        <GROUP><NAME>Source</NAME>\n            <FILEREF>\n                <TARGETNAME>TestOSAPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>TestOSAPlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>TestOSAPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MSL C.PPC.Lib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>TestOSAPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MSL RuntimePPC.Lib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>TestOSAPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>InterfaceLib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>TestOSAPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MathLib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>TestOSAPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>AppleScriptLib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n        </GROUP>\n    </GROUPLIST>\n\n</PROJECT>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/UUIDPlugin/sqMacUUID.c",
    "content": "/****************************************************************************\n*   PROJECT: UUID support for the mac\n*   FILE:    sqMacUUID.c\n*   CONTENT: \n*\n*   AUTHOR:  John McIntosh.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacUUID.c 1708 2007-06-10 00:40:04Z johnmci $\n*\n*   Feb 5 2002, JMM cleanup for windows port\n*\n*/\n\n#include \"UUIDPlugin.h\"\n#include \"sq.h\"\n\nextern struct VirtualMachine *interpreterProxy;\n\n#include <CFUUID.h>\nint sqUUIDInit(void);\nint sqUUIDShutdown(void);\n\nint MakeUUID(sqUUID location) {\n    CFUUIDRef theUUID;\n    CFUUIDBytes theBytes;\n\n    theUUID =  CFUUIDCreate (null);\n    theBytes = CFUUIDGetUUIDBytes(theUUID);\n    memcpy((char *) location,(char *) &theBytes,sizeof(sqUUID));\n    CFRelease(theUUID);\n\treturn 0;\n}\n\nint sqUUIDInit() {\n    return 1;\n}\n\nint sqUUIDShutdown() {\n    return 1;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/UnixOSProcessPlugin/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>UnixOSProcessPlugin</string>\n\t<key>CFBundleIconFile</key>\n\t<string>SqueakPlugin.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.UnixOSProcessPlugin</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>4.0.1</string>\n\t<key>CFBundleSignature</key>\n\t<string>FAST</string>\n\t<key>CFBundleVersion</key>\n\t<string>4.0.1</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/UnixOSProcessPlugin/PkgInfo",
    "content": "BNDLFAST"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c",
    "content": "/* Automatically generated from Squeak on an Array(11 October 2006 2:48:02 pm) */\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n#include <sys/types.h>\n/* D T Lewis 2005 - UnixOSProcessPlugin.c translated from class\n   UnixOSProcessPluginInterpreterGetThisSession of OSProcessPlugin version 4.0.1 */\n#include <sys/time.h>\n#include <sys/wait.h>\n#include <signal.h>\n#include <unistd.h>\n#include <fcntl.h>\n#include <sys/stat.h>\n#include <errno.h>\n#include \"config.h\"\n#define FILEHANDLETYPE FILE *  /* the type of low level stream to be used in a struct SQFile */\n#ifndef SQAIO_H\n# define SQAIO_H \"aio.h\"          /* aio.h has been renamed to sqaio.h */\n#endif\n#include SQAIO_H\n#include \"FilePlugin.h\"\n#include \"SocketPlugin.h\"\n#define SESSIONIDENTIFIERTYPE int\n\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n/*** Function Prototypes ***/\nstatic void aioForwardwithDataandFlags(int fd, void * data, int flags);\nstatic void * callocWrappersize(sqInt count, sqInt objectSize);\nstatic sqInt copyBytesFromtolength(unsigned char * charArray1, unsigned char * charArray2, sqInt len);\nstatic sqInt createPipeForReaderwriter(FILEHANDLETYPE * readerIOStreamPtr, FILEHANDLETYPE * writerIOStreamPtr);\nstatic char * cStringFromString(sqInt aString);\nstatic sqInt descriptorTableSize(void);\nstatic void dupToStdErr(sqInt anSQFileDataStructure);\nstatic void dupToStdIn(sqInt anSQFileDataStructure);\nstatic void dupToStdOut(sqInt anSQFileDataStructure);\nstatic sqInt fileDescriptorFrom(sqInt aFileHandle);\nstatic sqInt fileRecordSize(void);\nstatic SQFile * fileValueOf(sqInt anSQFileRecord);\nstatic sqInt fixPointersInArrayOfStringswithOffsetscount(char *flattenedArrayOfStrings, sqInt *offsetArray, sqInt count);\nstatic sqInt forkAndExecInDirectory(sqInt useSignalHandler);\n#pragma export on\nEXPORT(pid_t) forkSqueak(sqInt useSignalHandler);\n#pragma export off\nstatic void * forwardSignaltoSemaphoreAt(sqInt sigNum, sqInt semaphoreIndex);\nstatic VirtualMachine * getInterpreter(void);\n#pragma export on\nEXPORT(const char*) getModuleName(void);\n#pragma export off\nstatic sqInt getThisSessionIdentifier(void);\nstatic sqInt halt(void);\nstatic void * handleSignalFunctionAddress(void);\nstatic void handleSignal(int sigNum);\n#pragma export on\nEXPORT(sqInt) initialiseModule(void);\n#pragma export off\nstatic sqInt isSQFileObject(sqInt objectPointer);\nstatic sqInt makePipeForReaderwriter(FILEHANDLETYPE * readerIOStreamPtr, FILEHANDLETYPE * writerIOStreamPtr);\nstatic sqInt msg(char * s);\nstatic sqInt newSQFileByteArray(void);\nstatic sqInt newSQSocketByteArray(void);\nstatic void ** originalSignalHandlers(void);\nstatic void * pointerFrom(sqInt aByteArray);\n#pragma export on\nEXPORT(sqInt) primitiveAioDisable(void);\nEXPORT(sqInt) primitiveAioEnable(void);\nEXPORT(sqInt) primitiveAioHandle(void);\nEXPORT(sqInt) primitiveAioSuspend(void);\nEXPORT(sqInt) primitiveArgumentAt(void);\nEXPORT(sqInt) primitiveCanReceiveSignals(sqInt anIntegerPid);\nEXPORT(sqInt) primitiveChdir(void);\nEXPORT(sqInt) primitiveCreatePipe(void);\nEXPORT(sqInt) primitiveCreatePipeWithSessionIdentifier(void);\nEXPORT(sqInt) primitiveEnvironmentAt(void);\nEXPORT(sqInt) primitiveEnvironmentAtSymbol(void);\nEXPORT(sqInt) primitiveErrorMessageAt(void);\nEXPORT(sqInt) primitiveFileProtectionMask(void);\nEXPORT(sqInt) primitiveFileStat(void);\nEXPORT(sqInt) primitiveFixPointersInArrayOfStrings(void);\nEXPORT(sqInt) primitiveForkAndExecInDirectory(void);\nEXPORT(sqInt) primitiveForkExec(void);\nEXPORT(sqInt) primitiveForkSqueak(void);\nEXPORT(sqInt) primitiveForkSqueakWithoutSigHandler(void);\nEXPORT(sqInt) primitiveForwardSignalToSemaphore(void);\nEXPORT(sqInt) primitiveGetCurrentWorkingDirectory(void);\nEXPORT(sqInt) primitiveGetEGid(void);\nEXPORT(sqInt) primitiveGetEUid(void);\nEXPORT(sqInt) primitiveGetGid(void);\nEXPORT(sqInt) primitiveGetPid(void);\nEXPORT(sqInt) primitiveGetPPid(void);\nEXPORT(sqInt) primitiveGetSession(void);\nEXPORT(sqInt) primitiveGetStdErrHandle(void);\nEXPORT(sqInt) primitiveGetStdErrHandleWithSessionIdentifier(void);\nEXPORT(sqInt) primitiveGetStdInHandle(void);\nEXPORT(sqInt) primitiveGetStdInHandleWithSessionIdentifier(void);\nEXPORT(sqInt) primitiveGetStdOutHandle(void);\nEXPORT(sqInt) primitiveGetStdOutHandleWithSessionIdentifier(void);\nEXPORT(sqInt) primitiveGetUid(void);\nEXPORT(sqInt) primitiveIsAtEndOfFile(void);\nEXPORT(sqInt) primitiveLockFileRegion(void);\nEXPORT(sqInt) primitiveMakePipe(void);\nEXPORT(sqInt) primitiveMakePipeWithSessionIdentifier(void);\nEXPORT(sqInt) primitiveModuleName(void);\nEXPORT(sqInt) primitiveNice(void);\nEXPORT(sqInt) primitivePutEnv(void);\nEXPORT(sqInt) primitiveRealpath(void);\nEXPORT(sqInt) primitiveReapChildProcess(void);\nEXPORT(sqInt) primitiveSemaIndexFor(void);\nEXPORT(sqInt) primitiveSendSigabrtTo(sqInt anIntegerPid);\nEXPORT(sqInt) primitiveSendSigalrmTo(sqInt anIntegerPid);\nEXPORT(sqInt) primitiveSendSigchldTo(sqInt anIntegerPid);\nEXPORT(sqInt) primitiveSendSigcontTo(sqInt anIntegerPid);\nEXPORT(sqInt) primitiveSendSighupTo(sqInt anIntegerPid);\nEXPORT(sqInt) primitiveSendSigintTo(sqInt anIntegerPid);\nEXPORT(sqInt) primitiveSendSigkillTo(sqInt anIntegerPid);\nEXPORT(sqInt) primitiveSendSigpipeTo(sqInt anIntegerPid);\nEXPORT(sqInt) primitiveSendSigquitTo(sqInt anIntegerPid);\nEXPORT(sqInt) primitiveSendSigstopTo(sqInt anIntegerPid);\nEXPORT(sqInt) primitiveSendSigtermTo(sqInt anIntegerPid);\nEXPORT(sqInt) primitiveSendSigusr1To(sqInt anIntegerPid);\nEXPORT(sqInt) primitiveSendSigusr2To(sqInt anIntegerPid);\nEXPORT(sqInt) primitiveSetSemaIndex(void);\nEXPORT(sqInt) primitiveSigChldNumber(void);\nEXPORT(sqInt) primitiveSigHupNumber(void);\nEXPORT(sqInt) primitiveSigIntNumber(void);\nEXPORT(sqInt) primitiveSigKillNumber(void);\nEXPORT(sqInt) primitiveSigPipeNumber(void);\nEXPORT(sqInt) primitiveSigQuitNumber(void);\nEXPORT(sqInt) primitiveSigTermNumber(void);\nEXPORT(sqInt) primitiveSigUsr1Number(void);\nEXPORT(sqInt) primitiveSigUsr2Number(void);\nEXPORT(sqInt) primitiveSizeOfInt(void);\nEXPORT(sqInt) primitiveSizeOfPointer(void);\nEXPORT(sqInt) primitiveSQFileFlush(void);\nEXPORT(sqInt) primitiveSQFileFlushWithSessionIdentifier(void);\nEXPORT(sqInt) primitiveSQFileSetBlocking(void);\nEXPORT(sqInt) primitiveSQFileSetBlockingWithSessionIdentifier(void);\nEXPORT(sqInt) primitiveSQFileSetNonBlocking(void);\nEXPORT(sqInt) primitiveSQFileSetNonBlockingWithSessionIdentifier(void);\nEXPORT(sqInt) primitiveSQFileSetUnbuffered(void);\nEXPORT(sqInt) primitiveSQFileSetUnbufferedWithSessionIdentifier(void);\nEXPORT(sqInt) primitiveTestLockableFileRegion(void);\nEXPORT(sqInt) primitiveUnixFileClose(sqInt anIntegerFileNumber);\nEXPORT(sqInt) primitiveUnixFileNumber(void);\nEXPORT(sqInt) primitiveUnlockFileRegion(void);\nEXPORT(sqInt) primitiveUnsetEnv(void);\nEXPORT(sqInt) primitiveVersionString(void);\n#pragma export off\nstatic void reapChildProcess(int sigNum);\nstatic void restoreDefaultSignalHandlers(void);\nstatic sqInt sandboxSecurity(void);\nstatic sqInt securityHeurisitic(void);\nstatic unsigned char * semaphoreIndices(void);\nstatic SESSIONIDENTIFIERTYPE sessionIdentifierFrom(sqInt aByteArray);\n#pragma export on\nEXPORT(sqInt) setInterpreter(struct VirtualMachine* anInterpreter);\n#pragma export off\nstatic void setSigChldDefaultHandler(void);\nstatic void setSigChldHandler(void);\nstatic void setSigIntDefaultHandler(void);\nstatic void setSigIntIgnore(void);\nstatic void * setSignalNumberhandler(sqInt anInteger, void * signalHandlerAddress);\nstatic void setSigPipeDefaultHandler(void);\nstatic sqInt setSigPipeHandler(void);\nstatic void setSigPipeIgnore(void);\n#pragma export on\nEXPORT(sqInt) shutdownModule(void);\n#pragma export off\nstatic sqInt sigChldNumber(void);\nstatic void * sigDefaultNumber(void);\nstatic void * sigErrorNumber(void);\nstatic sqInt sigHupNumber(void);\nstatic void * sigIgnoreNumber(void);\nstatic sqInt sigIntNumber(void);\nstatic sqInt sigKillNumber(void);\nstatic sqInt signalArraySize(void);\nstatic void ** signalHandlers(void);\nstatic sqInt sigPipeNumber(void);\nstatic sqInt sigQuitNumber(void);\nstatic sqInt sigTermNumber(void);\nstatic sqInt sigUsr1Number(void);\nstatic sqInt sigUsr2Number(void);\nstatic sqInt sizeOfInt(void);\nstatic sqInt sizeOfPointer(void);\nstatic sqInt sizeOfSession(void);\nstatic sqInt socketRecordSize(void);\nstatic SQSocket * socketValueOf(sqInt anSQSocketRecord);\nstatic sqInt stringFromCString(char *aCString);\nstatic char * transientCStringFromString(sqInt aString);\nstatic char * versionString(void);\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"UnixOSProcessPlugin 11 October 2006 (i)\"\n#else\n\t\"UnixOSProcessPlugin 11 October 2006 (e)\"\n#endif\n;\nstatic void *originalSigHandlers[NSIG];\nstatic int osprocessSandboxSecurity;\nstatic unsigned char semaIndices[NSIG];\nstatic sqInt sigChldSemaIndex;\nstatic void *sigHandlers[NSIG];\nstatic sqInt vmThread;\n\n\n\n/*\tDeprecated. This primitive has been replaced by a similar implementation in AioPlugin. */\n/*\tThis function is called to signal a Smalltalk Semaphore when an asynchronous event is\n\tdetected. When translated to C, the name of this method is aioForwardwithDataandFlags.\n\tThe event handler is set up by #primitiveAioHandle. */\n\nstatic void aioForwardwithDataandFlags(int fd, void * data, int flags) {\n    sqInt *pfd;\n    sqInt semaIndex;\n\n\tpfd = data;\n\tsemaIndex = *pfd;\n\tinterpreterProxy->signalSemaphoreWithIndex(semaIndex);\n}\n\n\n/*\tUsing malloc() and calloc() is something I would like to avoid, since it is\n\tlikely to cause problems some time in the future if somebody redesigns\n\tobject memory allocation. This wrapper just makes it easy to find senders\n\tof calloc() in my code. -dtl */\n\nstatic void * callocWrappersize(sqInt count, sqInt objectSize) {\n\treturn calloc(count, objectSize);\n}\n\n\n/*\t| chars |\n\tchars _ 'abcd'.\n\tself new copyBytesFrom: 'wxyz' to: chars length: 4.\n\tchars */\n\nstatic sqInt copyBytesFromtolength(unsigned char * charArray1, unsigned char * charArray2, sqInt len) {\n    unsigned char *p1;\n    sqInt idx;\n    unsigned char *p2;\n\n\tp1 = charArray1;\n\tp2 = charArray2;\n\tidx = 0;\n\twhile (idx < len) {\n\t\t*p2 = *p1;\n\t\tp1 += 1;\n\t\tp2 += 1;\n\t\tidx += 1;\n\t}\n}\n\n\n/*\tCreate a pipe and populate the readerIOStream and writerIOStream variables.\n\tThe SIGPIPE handler must have been set before creating the pipe. Answer true for\n\tsuccess, else false. */\n\nstatic sqInt createPipeForReaderwriter(FILEHANDLETYPE * readerIOStreamPtr, FILEHANDLETYPE * writerIOStreamPtr) {\n    int filedes[2];\n\n\tif ((pipe(filedes)) == -1) {\n\t\treturn 0;\n\t} else {\n\t\t*writerIOStreamPtr= (FILE *) fdopen (filedes[1], \"a\");\n\t\t*readerIOStreamPtr= (FILE *) fdopen (filedes[0], \"r\");\n\t\treturn 1;\n\t}\n}\n\n\n/*\tAnswer a new null-terminated C string copied from aString. The C string\n\tis allocated from the C runtime heap. See transientCStringFromString for\n\ta version which allocates from object memory.\n\tCaution: This may invoke the garbage collector. */\n\nstatic char * cStringFromString(sqInt aString) {\n    sqInt len;\n    char *cString;\n    char *sPtr;\n\n\tsPtr = interpreterProxy->arrayValueOf(aString);\n\tlen = interpreterProxy->sizeOfSTArrayFromCPrimitive(sPtr);\n\n\t/* Space for a null terminated C string. */\n\n\tcString = callocWrappersize(len + 1, 1);\n\t(char *) strncpy (cString, sPtr, len);\n\treturn cString;\n}\n\n\n/*\tAnswer the size of the file descriptor table for a process. I am not sure of the most portable\n\tway to do this. If this implementation does not work on your Unix platform, try changing\n\tit to answer the value of FOPEN_MAX, which will hopefully be defined in stdio.h. If\n\tall else fails, just hard code it to answer 20, which would be safe for any Unix. */\n\nstatic sqInt descriptorTableSize(void) {\n\treturn getdtablesize();\n}\n\n\n/*\tDup a file descriptor to allow it to be attached as the standard error when we\n\texec() a new executable. This is Unix specific, in that it assumes that file descriptor\n\t0 is stdin, 1 is stdout, and 2 is stderr. The dup2() call is used to copy the open file\n\tdescriptors into file descriptors 0, 1 and 2 so that the image which we execute will\n\tuse them as stdin, stdout, and stderr. */\n\nstatic void dupToStdErr(sqInt anSQFileDataStructure) {\n    sqInt filenoToDup;\n\n\tfilenoToDup = fileDescriptorFrom(anSQFileDataStructure);\n\tif (!(filenoToDup < 0)) {\n\t\tif (!(filenoToDup == 2)) {\n\t\t\tfflush(stderr);\n\t\t\tdup2(filenoToDup, 2);\n\t\t}\n\t}\n}\n\n\n/*\tDup a file descriptor to allow it to be attached as the standard input when we\n\texec() a new executable. This is Unix specific, in that it assumes that file descriptor\n\t0 is stdin, 1 is stdout, and 2 is stderr. The dup2() call is used to copy the open file\n\tdescriptors into file descriptors 0, 1 and 2 so that the image which we execute will\n\tuse them as stdin, stdout, and stderr. */\n\nstatic void dupToStdIn(sqInt anSQFileDataStructure) {\n    sqInt filenoToDup;\n\n\tfilenoToDup = fileDescriptorFrom(anSQFileDataStructure);\n\tif (!(filenoToDup < 0)) {\n\t\tif (!(filenoToDup == 0)) {\n\t\t\tfflush(stdin);\n\t\t\tdup2(filenoToDup, 0);\n\t\t\trewind(stdin);\n\t\t}\n\t}\n}\n\n\n/*\tDup a file descriptor to allow it to be attached as the standard output when we\n\texec() a new executable. This is Unix specific, in that it assumes that file descriptor\n\t0 is stdin, 1 is stdout, and 2 is stderr. The dup2() call is used to copy the open file\n\tdescriptors into file descriptors 0, 1 and 2 so that the image which we execute will\n\tuse them as stdin, stdout, and stderr. */\n\nstatic void dupToStdOut(sqInt anSQFileDataStructure) {\n    sqInt filenoToDup;\n\n\tfilenoToDup = fileDescriptorFrom(anSQFileDataStructure);\n\tif (!(filenoToDup < 0)) {\n\t\tif (!(filenoToDup == 1)) {\n\t\t\tfflush(stdout);\n\t\t\tdup2(filenoToDup, 1);\n\t\t}\n\t}\n}\n\n\n/*\tAnswer the OS file descriptor, an integer value, from a SQFile data structure,\n\tor answer -1 if unable to obtain the file descriptor (probably due to receiving\n\tan incorrect type of object as aFileHandle). This method may be called from a\n\tprimitive, and is not intended to be called from Smalltalk. */\n\nstatic sqInt fileDescriptorFrom(sqInt aFileHandle) {\n    SQFile * sqFile;\n    FILE *osFileStream;\n\n\t/* begin fileValueOf: */\n\tif ((interpreterProxy->isBytes(aFileHandle)) && ((interpreterProxy->byteSizeOf(aFileHandle)) == (fileRecordSize()))) {\n\t\tsqFile = interpreterProxy->arrayValueOf(aFileHandle);\n\t\tgoto l1;\n\t} else {\n\t\tinterpreterProxy->primitiveFail();\n\t\tsqFile = null;\n\t\tgoto l1;\n\t}\nl1:\t/* end fileValueOf: */;\n\tif (sqFile == 0) {\n\t\treturn -1;\n\t} else {\n\t\tosFileStream = sqFile->file;\n\t\tif (osFileStream == 0) {\n\t\t\treturn -1;\n\t\t}\n\t\treturn fileno(osFileStream);\n\t}\n}\n\n\n/*\tAnswer the size of a SQFile data structure in bytes. */\n\nstatic sqInt fileRecordSize(void) {\n\treturn sizeof(SQFile);\n}\n\n\n/*\tReturn a pointer to the first byte of of the SQFile data structure file record within\n\tanSQFileRecord, which is expected to be a ByteArray of size self>>fileRecordSize. */\n\nstatic SQFile * fileValueOf(sqInt anSQFileRecord) {\n\tif ((interpreterProxy->isBytes(anSQFileRecord)) && ((interpreterProxy->byteSizeOf(anSQFileRecord)) == (fileRecordSize()))) {\n\t\treturn interpreterProxy->arrayValueOf(anSQFileRecord);\n\t} else {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n}\n\n\n/*\tUse the address offsets in offsetArray to fix up the pointers in cStringArray.\n\tThe result is a C array of pointers to char, used for argv and env vectors. */\n\nstatic sqInt fixPointersInArrayOfStringswithOffsetscount(char *flattenedArrayOfStrings, sqInt *offsetArray, sqInt count) {\n    char **ptr;\n    sqInt idx;\n\n\tptr = ((char **) flattenedArrayOfStrings);\n\tidx = 0;\n\twhile (idx < count) {\n\t\tptr[idx] = (flattenedArrayOfStrings + (((offsetArray[idx]) >> 1)));\n\t\tidx += 1;\n\t}\n}\n\n\n/*\tFork a child OS process, and do an exec in the child. The parent continues on in\n\tSmalltalk, and this method answers the pid of the child which was created. If\n\tuseSignalHandler is true, set the signal handler for SIGCHLD. Otherwise, assume\n\tthat death of child events are handled through some other mechanism.\n\n\tIn this implementation, memory for the argument and environment arrays is allocated\n\tin the image prior to calling this primitive. This allows us to avoid invoking the\n\tgarbage collector in this primitive (thereby moving the locations of environment\n\tand argument memory), but comes at the cost of twiddling C pointers here in the\n\tprimitive. An alternative to this whole mess is just to malloc the environment and\n\targument vectors, but I think it is a good idea to avoid malloc as much as possible\n\tso as not to limit future ObjectMemory implementations.\n\n\tThis primitive replaces #primitiveForkAndExec from earlier versions of the plugin.\n\tThe new name permits backward compatibility for an image running on a VM\n\twhich does not yet have the updated plugin. This implementation uses a different\n\targument format on the stack, and differs functionally in that the child now closes\n\tall file descriptors (including sockets) not required (that is, everything except stdin,\n\tstdout, and stderr on descriptors 0, 1 and 2). This eliminates some flakey behavior\n\tin child processes connected to Squeak by pipes, which failed to exit at expected times\n\tdue to the old file descriptors remaining open. This is also cleaner in that garbage\n\tdescriptors are not left hanging around the the child.\n\n\tOn entry, the stack contains:\n\t\t0: workingDir, a null terminated string specifying the working directory to use, or nil.\n\t\t1: envOffsets, an array of integers for calculating environment string address offsets.\n\t\t2: envVecBuffer, a String buffer containing environment strings arranged to look like char **.\n\t\t3: argOffsets, an array of integers for calculating argument string address offsets.\n\t\t4: argVecBuffer, a String buffer containing argument strings arranged to look like char **.\n\t\t5: stdErr, a ByteArray handle.\n\t\t6: stdOut, a ByteArray handle.\n\t\t7: stdIn, a ByteArray handle.\n\t\t8: executableFile, a null terminated string with the name of the file to execute.\n\t\t9: the sender */\n\nstatic sqInt forkAndExecInDirectory(sqInt useSignalHandler) {\n    extern char **envVec;\n    char *pwdPtr;\n    pid_t pid;\n    sqInt argVecBuffer;\n    sqInt *envOffsetPtr;\n    struct itimerval saveIntervalTimer;\n    sqInt envCount;\n    sqInt idx;\n    struct itimerval intervalTimer;\n    sqInt stdOut;\n    char *progNamePtr;\n    char **args;\n    sqInt envOffsets;\n    sqInt envVecBuffer;\n    sqInt stdErr;\n    sqInt workingDir;\n    sqInt pwd;\n    char *envPtr;\n    char *argsPtr;\n    sqInt *argOffsetPtr;\n    sqInt handleCount;\n    sqInt argCount;\n    char **env;\n    sqInt argOffsets;\n    sqInt stdIn;\n    sqInt executableFile;\n    sqInt sigNum;\n\n\tif (useSignalHandler) {\n\t\tsetSigChldHandler();\n\t}\n\tif ((sandboxSecurity()) == 1) {\n\t\tinterpreterProxy->pop(10);\n\t\tinterpreterProxy->pushInteger(-1);\n\t} else {\n\t\tintervalTimer.it_interval.tv_sec = 0;\n\t\tintervalTimer.it_interval.tv_usec = 0;\n\t\tintervalTimer.it_value.tv_sec = 0;\n\t\tintervalTimer.it_value.tv_usec = 0;\n\t\tsetitimer (ITIMER_REAL, &intervalTimer, &saveIntervalTimer);\n\t\tif ((pid = vfork()) == 0) {\n\t\t\tworkingDir = interpreterProxy->stackObjectValue(0);\n\t\t\tenvOffsets = interpreterProxy->stackObjectValue(1);\n\t\t\tenvVecBuffer = interpreterProxy->stackObjectValue(2);\n\t\t\targOffsets = interpreterProxy->stackObjectValue(3);\n\t\t\targVecBuffer = interpreterProxy->stackObjectValue(4);\n\t\t\tstdErr = interpreterProxy->stackObjectValue(5);\n\t\t\tstdOut = interpreterProxy->stackObjectValue(6);\n\t\t\tstdIn = interpreterProxy->stackObjectValue(7);\n\n\t\t\t/* If a new working directory has been specified, try to chdir() to it. */\n\n\t\t\texecutableFile = interpreterProxy->stackObjectValue(8);\n\t\t\tif (workingDir != (interpreterProxy->nilObject())) {\n\t\t\t\tpwdPtr = interpreterProxy->firstIndexableField(workingDir);\n\t\t\t\tif (pwdPtr == 0) {\n\t\t\t\t\tfprintf(stderr, \"bad workingDir parameter\\n\");\n\t\t\t\t\t_exit(-1);\n\t\t\t\t} else {\n\t\t\t\t\tpwd = chdir(pwdPtr);\n\t\t\t\t\tif (pwd != 0) {\n\t\t\t\t\t\tperror(\"chdir\");\n\t\t\t\t\t\t_exit(-1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* Dup the file handles to attach the new child process to the right streams\n\t\t\ton descriptors 0, 1 and 2. */\n\n\t\t\tprogNamePtr = interpreterProxy->arrayValueOf(executableFile);\n\t\t\tif (!(stdErr == (interpreterProxy->nilObject()))) {\n\t\t\t\tdupToStdErr(stdErr);\n\t\t\t}\n\t\t\tif (!(stdOut == (interpreterProxy->nilObject()))) {\n\t\t\t\tdupToStdOut(stdOut);\n\t\t\t}\n\t\t\tif (!(stdIn == (interpreterProxy->nilObject()))) {\n\t\t\t\tdupToStdIn(stdIn);\n\t\t\t}\n\n\t\t\t/* First Unix file descriptor after stdin, stdout, stderr. */\n\n\t\t\tidx = 3;\n\t\t\thandleCount = descriptorTableSize();\n\t\t\twhile (idx < handleCount) {\n\t\t\t\tclose(idx);\n\t\t\t\tidx += 1;\n\t\t\t}\n\t\t\tif (envVecBuffer == (interpreterProxy->nilObject())) {\n\t\t\t\tenv = envVec;\n\t\t\t} else {\n\t\t\t\tenvCount = interpreterProxy->stSizeOf(envOffsets);\n\t\t\t\tenvPtr = interpreterProxy->arrayValueOf(envVecBuffer);\n\t\t\t\tenvOffsetPtr = interpreterProxy->firstIndexableField(envOffsets);\n\t\t\t\tfixPointersInArrayOfStringswithOffsetscount(envPtr, envOffsetPtr, envCount);\n\t\t\t\tenv = ((char **) envPtr);\n\t\t\t}\n\t\t\targCount = interpreterProxy->stSizeOf(argOffsets);\n\t\t\targsPtr = interpreterProxy->arrayValueOf(argVecBuffer);\n\t\t\targOffsetPtr = interpreterProxy->firstIndexableField(argOffsets);\n\t\t\tfixPointersInArrayOfStringswithOffsetscount(argsPtr, argOffsetPtr, argCount);\n\n\t\t\t/* Clean things up before clobbering the running image. */\n\t\t\t/* Note: If any file descriptors, signal handlers, or other references to external\n\t\t\tresources need to be cleaned up, do it here. */\n\n\t\t\targs = ((char **) argsPtr);\n\t\t\t/* begin restoreDefaultSignalHandlers */\n\t\t\tsigNum = 1;\n\t\t\twhile (sigNum <= (signalArraySize())) {\n\t\t\t\tif ((semaIndices[sigNum]) > 0) {\n\t\t\t\t\tsetSignalNumberhandler(sigNum, originalSigHandlers[sigNum]);\n\t\t\t\t}\n\t\t\t\tsigNum += 1;\n\t\t\t}\n\t\t\tif ((execve(progNamePtr, args, env)) == -1) {\n\t\t\t\tperror(progNamePtr);\n\t\t\t\t_exit(-1);\n\t\t\t} else {\n\t\t\t\t/* Can't get here from there */;\n\t\t\t}\n\t\t} else {\n\t\t\tsetitimer (ITIMER_REAL, &saveIntervalTimer, 0L);\n\t\t\tinterpreterProxy->pop(10);\n\t\t\tinterpreterProxy->pushInteger(pid);\n\t\t}\n\t}\n}\n\n\n/*\tFork a child process, and continue running squeak in the child process. If displayFlag\n\tis true, open a new X display for the child, otherwise the child is a headless Squeak.\n\tAnswer the result of the fork() call, either the child pid or zero.\n\n\tAfter calling fork(), two OS processes exist, one of which is the child of the other. On\n\tsystems which implement copy-on-write memory management, and which support the\n\tfork() system call, both processes will be running Smalltalk images, and will be sharing\n\tthe same memory space. In the original OS process, the resulting value of pid is the\n\tprocess id of the child process (a non-zero integer). In the child process, the value of\n\tpid is zero.\n\n\tThe child recreates sufficient external resources to continue running. This is done by\n\tattaching to a new X session. The child is otherwise a copy of the parent process, and\n\twill continue executing the Smalltalk image at the same point as its parent. The return\n\tvalue of this primitive may be used by the two running Smalltalk images to determine\n\twhich is the parent and which is the child.\n\n\tThe child should not depend on using existing connections to external resources. For\n\texample, the child may lose its connections to stdin, stdout, and stderr after its parent\n\texits.\n\n\tThe new child image does not start itself from the image in the file system; rather it is\n\ta clone of the parent image as it existed at the time of primitiveForkSqueak. For this\n\treason, the parent and child should agree in advance as to whom is allowed to save the\n\timage to the file system, otherwise one Smalltalk may overwrite the image of the other.\n\n\tThis is a simple call to fork(), rather than the more common idiom of vfork() followed\n\tby exec(). The vfork() call cannot be used here because it is designed to be followed by\n\tan exec(), and its semantics require the parent process to wait for the child to exit. See\n\tthe BSD programmers documentation for details. */\n\nEXPORT(pid_t) forkSqueak(sqInt useSignalHandler) {\n    pid_t pid;\n    struct itimerval saveIntervalTimer;\n    struct itimerval intervalTimer;\n\n\tintervalTimer.it_interval.tv_sec = 0;\n\tintervalTimer.it_interval.tv_usec = 0;\n\tintervalTimer.it_value.tv_sec = 0;\n\tintervalTimer.it_value.tv_usec = 0;\n\tsetitimer (ITIMER_REAL, &intervalTimer, &saveIntervalTimer);\n\tif (useSignalHandler) {\n\t\tsetSigChldHandler();\n\t}\n\n\t/* Enable the timer again before resuming Smalltalk. */\n\n\tpid = fork();\n\tsetitimer (ITIMER_REAL, &saveIntervalTimer, 0L);\n\treturn pid;\n}\n\n\n/*\tSet a signal handler in the VM which will signal a Smalltalk semaphore at\n\tsemaphoreIndex whenever an external signal sigNum is received. Answer the\n\tprior value of the signal handler. If semaphoreIndex is zero, the handler is\n\tunregistered, and the VM returns to its default behavior for handling that\n\tsignal. A handler must be unregistered before it can be registered again.\n\n\tThe Smalltalk semaphore is expected to be kept at the same index location\n\tindefinitely during the lifetime of a Squeak session. If that is not the case, the\n\thandler must be unregistered prior to unregistering the Smalltalk semaphore. */\n\nstatic void * forwardSignaltoSemaphoreAt(sqInt sigNum, sqInt semaphoreIndex) {\n    void * oldHandler;\n\n\tif (semaphoreIndex == 0) {\n\t\tif ((semaIndices[sigNum]) > 0) {\n\t\t\toldHandler = originalSigHandlers[sigNum];\n\t\t\tsetSignalNumberhandler(sigNum, oldHandler);\n\t\t\tsemaIndices[sigNum] = 0;\n\t\t\treturn oldHandler;\n\t\t} else {\n\t\t\treturn sigErrorNumber();\n\t\t}\n\t}\n\tif ((semaIndices[sigNum]) > 0) {\n\t\treturn sigErrorNumber();\n\t}\n\toldHandler = setSignalNumberhandler(sigNum, handleSignalFunctionAddress());\n\tif (oldHandler != (sigErrorNumber())) {\n\t\toriginalSigHandlers[sigNum] = oldHandler;\n\t\tsemaIndices[sigNum] = semaphoreIndex;\n\t}\n\treturn oldHandler;\n}\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine * getInterpreter(void) {\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*) getModuleName(void) {\n\treturn moduleName;\n}\n\nstatic sqInt getThisSessionIdentifier(void) {\n\treturn interpreterProxy->getThisSessionID();\n}\n\nstatic sqInt halt(void) {\n\t;\n}\n\nstatic void * handleSignalFunctionAddress(void) {\n\treturn handleSignal;\n}\n\n\n/*\tThis is a signal handler function which runs when a signal is received from the\n\toperating system. When the signal is received, a Smalltalk Semaphore is signaled.\n\tThis effectively passes the external signal to Squeak to allow it to be handled in\n\tSmalltalk.\n\n\tNote the this handler runs the VM in the context of a Unix signal handler in order\n\tto signal the Smalltalk Semaphore. In a single threaded Squeak VM, this works fine,\n\thowever it may not work as expected if pthreads are used for the VM or for any\n\tplugins linked internally with the VM. On GCC systems, compiling with -D_REENTRANT\n\tseems to produce the intended behavior. */\n\nstatic void handleSignal(int sigNum) {\n    sqInt semaIndex;\n\n\tsemaIndex = semaIndices[sigNum];\n\tforwardSignaltoSemaphoreAt(sigNum, semaIndex);\n\tif (semaIndex > 0) {\n\t\tinterpreterProxy->signalSemaphoreWithIndex(semaIndex);\n\t}\n}\n\nEXPORT(sqInt) initialiseModule(void) {\n\tosprocessSandboxSecurity = -1;\n\treturn 1;\n}\n\n\n/*\tAnswer true if objectPointer appears to be a valid SQFile ByteArray. This check\n\tis appropriate if objectPointer has been passed as a parameter to a primitive, and\n\tis expected to represent a valid file reference. */\n\nstatic sqInt isSQFileObject(sqInt objectPointer) {\n    unsigned char *sqFileBytes;\n    sqInt idx;\n\n\tif (!((interpreterProxy->isBytes(objectPointer)) && ((interpreterProxy->byteSizeOf(objectPointer)) == (fileRecordSize())))) {\n\t\treturn 0;\n\t}\n\tsqFileBytes = interpreterProxy->arrayValueOf(objectPointer);\n\tidx = 0;\n\twhile (idx < (fileRecordSize())) {\n\t\tif ((sqFileBytes[idx]) != 0) {\n\t\t\treturn 1;\n\t\t}\n\t\tidx += 1;\n\t}\n\treturn 0;\n}\n\n\n/*\tCreate a pipe and populate the readerIOStream and writerIOStream variables.\n\tMake sure the SIGPIPE handler is set before creating the pipe. Answer true for\n\tsuccess, else false */\n\nstatic sqInt makePipeForReaderwriter(FILEHANDLETYPE * readerIOStreamPtr, FILEHANDLETYPE * writerIOStreamPtr) {\n    int filedes[2];\n\n\t/* begin setSigPipeHandler */\n\t/* begin setSigPipeIgnore */\n\tsetSignalNumberhandler(sigPipeNumber(), sigIgnoreNumber());\n\tif ((pipe(filedes)) == -1) {\n\t\treturn 0;\n\t} else {\n\t\t*writerIOStreamPtr= (FILE *) fdopen (filedes[1], \"a\");\n\t\t*readerIOStreamPtr= (FILE *) fdopen (filedes[0], \"r\");\n\t\treturn 1;\n\t}\n}\n\nstatic sqInt msg(char * s) {\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n}\n\n\n/*\tAnswer a new ByteArray sized to contain a SQFile data structure. */\n\nstatic sqInt newSQFileByteArray(void) {\n\treturn interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\n}\n\n\n/*\tAnswer a new ByteArray sized to contain a SQSocket data structure. */\n\nstatic sqInt newSQSocketByteArray(void) {\n\treturn interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), socketRecordSize());\n}\n\n\n/*\tAn array of signal handler function addresses, one for each signal type. The\n\tvalue at each entry is the address of the original signal handler function prior\n\tto having set a handler. */\n\nstatic void ** originalSignalHandlers(void) {\n\treturn originalSigHandlers;\n}\n\n\n/*\tAnswer the pointer represented by aByteArray. */\n\nstatic void * pointerFrom(sqInt aByteArray) {\n    unsigned char *ptr;\n    sqInt idx;\n    union {void *address; unsigned char bytes[sizeof(void *)];} pointerUnion;\n\n\tif (!((interpreterProxy->isBytes(aByteArray)) && ((interpreterProxy->stSizeOf(aByteArray)) == (sizeOfPointer())))) {\n\t\treturn null;\n\t}\n\tptr = interpreterProxy->arrayValueOf(aByteArray);\n\tidx = 0;\n\twhile (idx < (sizeOfPointer())) {\n\t\tpointerUnion.bytes[idx] = ptr[idx];\n\t\tidx += 1;\n\t}\n\treturn pointerUnion.address;\n}\n\n\n/*\tDeprecated. This primitive has been replaced by a similar implementation in AioPlugin. */\n/*\tDefinitively disable asynchronous event notification for a descriptor. The\n\tparameter is a sqFile ByteArray representing the ioHandle for a file. */\n\nEXPORT(sqInt) primitiveAioDisable(void) {\n    sqInt sqFile;\n    int fd;\n\n\tsqFile = interpreterProxy->stackObjectValue(0);\n\tfd = fileDescriptorFrom(sqFile);\n\tif (fd < 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\taioDisable(fd);\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->pushInteger(fd);\n}\n\n\n/*\tDeprecated. This primitive has been replaced by a similar implementation in AioPlugin. */\n/*\tEnable asynchronous notification for a descriptor. The first parameter is a sqFile\n\tByteArray representing the ioHandle for a file, the second parameter is the index\n\tof a Semaphore to be notified, and the third parameter is a flag indicating that\n\tsqFile represents an external object and should not be closed on termination of\n\taio handling. Answer the semaphore index. */\n\nEXPORT(sqInt) primitiveAioEnable(void) {\n    sqInt sqFile;\n    sqInt semaIndex;\n    sqInt externalObject;\n    int fd;\n    int flags;\n    static int eventSemaphoreIndices[FD_SETSIZE];\n\n\tsqFile = interpreterProxy->stackObjectValue(2);\n\tif (!((interpreterProxy->isBytes(sqFile)) && ((interpreterProxy->stSizeOf(sqFile)) == (fileRecordSize())))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tfd = fileDescriptorFrom(sqFile);\n\tif (fd < 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tsemaIndex = interpreterProxy->stackIntegerValue(1);\n\teventSemaphoreIndices[semaIndex] = semaIndex;\n\texternalObject = interpreterProxy->stackObjectValue(0);\n\tif (externalObject == (interpreterProxy->trueObject())) {\n\t\tflags = AIO_EXT;\n\t} else {\n\t\tflags = 0;\n\t}\n\taioEnable(fd, &(eventSemaphoreIndices[semaIndex]), flags);\n\tinterpreterProxy->pop(4);\n\tinterpreterProxy->pushInteger(semaIndex);\n}\n\n\n/*\tDeprecated. This primitive has been replaced by a similar implementation in AioPlugin. */\n/*\tHandle asynchronous event notification for a descriptor. The first parameter is\n\ta sqFile ByteArray representing the ioHandle for a file, and the remaining three\n\tparameters are Boolean flags representing the types of events for which notification\n\tis being requested: handle exceptions, handle for read, and handle for write.\n\tFlags are defined in the aio.h source as:\n\t\tAIO_X\t(1<<0)\thandle for exceptions\n\t\tAIO_R\t(1<<1)\thandle for read\n\t\tAIO_W\t(1<<2)\thandle for write */\n\nEXPORT(sqInt) primitiveAioHandle(void) {\n    sqInt readWatch;\n    sqInt exceptionWatch;\n    sqInt sqFile;\n    int fd;\n    int flags;\n    sqInt writeWatch;\n\n\tsqFile = interpreterProxy->stackObjectValue(3);\n\tif (!((interpreterProxy->isBytes(sqFile)) && ((interpreterProxy->stSizeOf(sqFile)) == (fileRecordSize())))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tfd = fileDescriptorFrom(sqFile);\n\tif (fd < 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\texceptionWatch = interpreterProxy->stackObjectValue(2);\n\treadWatch = interpreterProxy->stackObjectValue(1);\n\twriteWatch = interpreterProxy->stackObjectValue(0);\n\tflags = 0;\n\tif (exceptionWatch == (interpreterProxy->trueObject())) {\n\t\tflags = flags | (AIO_X);\n\t}\n\tif (readWatch == (interpreterProxy->trueObject())) {\n\t\tflags = flags | (AIO_R);\n\t}\n\tif (writeWatch == (interpreterProxy->trueObject())) {\n\t\tflags = flags | (AIO_W);\n\t}\n\taioHandle(fd, aioForwardwithDataandFlags, flags);\n\tinterpreterProxy->pop(5);\n\tinterpreterProxy->pushInteger(flags);\n}\n\n\n/*\tDeprecated. This primitive has been replaced by a similar implementation in AioPlugin. */\n/*\tTemporarily suspend asynchronous event notification for a descriptor. The first\n\tparameter is a sqFile ByteArray representing the ioHandle for a file, and the\n\tremaining three parameters are Boolean flags representing the types of events\n\tfor which notification is being requested: handle exceptions, handle for read,\n\tand handle for write.\n\tFlags are defined in the aio.h source as:\n\t\tAIO_X\t(1<<0)\thandle for exceptions\n\t\tAIO_R\t(1<<1)\thandle for read\n\t\tAIO_W\t(1<<2)\thandle for write */\n\nEXPORT(sqInt) primitiveAioSuspend(void) {\n    sqInt readWatch;\n    sqInt exceptionWatch;\n    sqInt sqFile;\n    int fd;\n    int flags;\n    sqInt writeWatch;\n\n\tsqFile = interpreterProxy->stackObjectValue(3);\n\tif (!((interpreterProxy->isBytes(sqFile)) && ((interpreterProxy->stSizeOf(sqFile)) == (fileRecordSize())))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tfd = fileDescriptorFrom(sqFile);\n\tif (fd < 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\texceptionWatch = interpreterProxy->stackObjectValue(2);\n\treadWatch = interpreterProxy->stackObjectValue(1);\n\twriteWatch = interpreterProxy->stackObjectValue(0);\n\tflags = 0;\n\tif (exceptionWatch == (interpreterProxy->trueObject())) {\n\t\tflags = flags | (AIO_X);\n\t}\n\tif (readWatch == (interpreterProxy->trueObject())) {\n\t\tflags = flags | (AIO_R);\n\t}\n\tif (writeWatch == (interpreterProxy->trueObject())) {\n\t\tflags = flags | (AIO_W);\n\t}\n\taioSuspend(fd, flags);\n\tinterpreterProxy->pop(5);\n\tinterpreterProxy->pushInteger(flags);\n}\n\n\n/*\tAnswer a string containing the OS process argument at index (an Integer) in the\n\targument list. */\n\nEXPORT(sqInt) primitiveArgumentAt(void) {\n    extern char **argVec;\n    sqInt s;\n    sqInt index;\n    char *sPtr;\n    extern int argCnt;\n\n\tindex = interpreterProxy->stackIntegerValue(0);\n\tif ((index > argCnt) || (index < 1)) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->push(interpreterProxy->nilObject());\n\t} else {\n\t\tsPtr = argVec[index - 1];\n\t\ts = stringFromCString(sPtr);\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->push(s);\n\t}\n}\n\n\n/*\tSend a null signal to the OS process identified by anIntegerPid. Answer false for\n\ta bad parameter on the stack (the common case is for anIntegerPid equal to nil,\n\tfor which case we should answer false). Answer true if the process exists and can\n\treceive signals from this process, otherwise false. This test is useful for determining\n\tif a child process still exists following a Squeak image restart. */\n\nEXPORT(sqInt) primitiveCanReceiveSignals(sqInt anIntegerPid) {\n    pid_t pidToSignal;\n    int result;\n\n\tif (((interpreterProxy->stackValue(0)) & 1)) {\n\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\n\t\tresult = kill(pidToSignal, 0);\n\t\tinterpreterProxy->pop(2);\n\t\tif (result == 0) {\n\t\t\tinterpreterProxy->push(interpreterProxy->trueObject());\n\t\t} else {\n\t\t\tinterpreterProxy->push(interpreterProxy->falseObject());\n\t\t}\n\t} else {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->push(interpreterProxy->falseObject());\n\t}\n}\n\n\n/*\tCall chdir(2) to change current working directory to the specified path string. Answer\n\tnil for success, or errno on failure. */\n\nEXPORT(sqInt) primitiveChdir(void) {\n    extern int errno;\n    char *path;\n\n\tpath = transientCStringFromString(interpreterProxy->stackObjectValue(0));\n\tif ((chdir(path)) == 0) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->push(interpreterProxy->nilObject());\n\t} else {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(errno);\n\t}\n}\n\n\n/*\tCreate a pipe, and answer an array of two file handles for the pipe writer and reader.\n\tThe readerIOStream and writerIOStream variables represent the low level pipe streams,\n\twhich will be of type (FILE *) or HANDLE, depending on what the FilePlugin support\n\tcode is using to represent file streams. FILEHANDLETYPE is defined in my subclasses\n\tin the #declareCVarsIn: class method. */\n\nEXPORT(sqInt) primitiveCreatePipe(void) {\n    SESSIONIDENTIFIERTYPE thisSession;\n    sqInt writer;\n    FILEHANDLETYPE writerIOStream;\n    SQFile * writerPtr;\n    FILEHANDLETYPE *writerIOStreamPtr;\n    SQFile * readerPtr;\n    sqInt arrayResult;\n    sqInt reader;\n    FILEHANDLETYPE readerIOStream;\n    FILEHANDLETYPE *readerIOStreamPtr;\n\n\n\t/* Create the anonymous OS pipe */\n\n\tthisSession = interpreterProxy->getThisSessionID();\n\treaderIOStreamPtr = &readerIOStream;\n\twriterIOStreamPtr = &writerIOStream;\n\tif (!(createPipeForReaderwriter(readerIOStreamPtr, writerIOStreamPtr))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\twriter = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\n\t/* begin fileValueOf: */\n\tif ((interpreterProxy->isBytes(writer)) && ((interpreterProxy->byteSizeOf(writer)) == (fileRecordSize()))) {\n\t\twriterPtr = interpreterProxy->arrayValueOf(writer);\n\t\tgoto l1;\n\t} else {\n\t\tinterpreterProxy->primitiveFail();\n\t\twriterPtr = null;\n\t\tgoto l1;\n\t}\nl1:\t/* end fileValueOf: */;\n\twriterPtr->file = writerIOStream;\n\twriterPtr->sessionID = thisSession;\n\twriterPtr->writable = 1;\n\twriterPtr->lastOp = 0;\n\tinterpreterProxy->pushRemappableOop(writer);\n\treader = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\n\t/* begin fileValueOf: */\n\tif ((interpreterProxy->isBytes(reader)) && ((interpreterProxy->byteSizeOf(reader)) == (fileRecordSize()))) {\n\t\treaderPtr = interpreterProxy->arrayValueOf(reader);\n\t\tgoto l2;\n\t} else {\n\t\tinterpreterProxy->primitiveFail();\n\t\treaderPtr = null;\n\t\tgoto l2;\n\t}\nl2:\t/* end fileValueOf: */;\n\treaderPtr->file = readerIOStream;\n\treaderPtr->sessionID = thisSession;\n\treaderPtr->writable = 0;\n\treaderPtr->lastOp = 0;\n\tinterpreterProxy->pushRemappableOop(reader);\n\tarrayResult = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2);\n\tinterpreterProxy->stObjectatput(arrayResult, 1, interpreterProxy->popRemappableOop());\n\tinterpreterProxy->stObjectatput(arrayResult, 2, interpreterProxy->popRemappableOop());\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->push(arrayResult);\n}\n\n\n/*\tCreate a pipe, and answer an array of two file handles for the pipe writer and reader.\n\tThe session identifier is passed as the parameter to this primitive. Use this variant\n\tif the session identifier is not available directly in the VM (as may be the case if\n\tit is not possible to link from this plugin to a variable elsewhere in the VM).\n\tThe readerIOStream and writerIOStream variables represent the low level pipe streams,\n\twhich will be of type (FILE *) or HANDLE, depending on what the FilePlugin support\n\tcode is using to represent file streams. FILEHANDLETYPE is defined in my subclasses\n\tin the #declareCVarsIn: class method. */\n\nEXPORT(sqInt) primitiveCreatePipeWithSessionIdentifier(void) {\n    SESSIONIDENTIFIERTYPE thisSession;\n    sqInt writer;\n    FILEHANDLETYPE writerIOStream;\n    SQFile * writerPtr;\n    FILEHANDLETYPE *writerIOStreamPtr;\n    SQFile * readerPtr;\n    sqInt arrayResult;\n    sqInt reader;\n    FILEHANDLETYPE readerIOStream;\n    FILEHANDLETYPE *readerIOStreamPtr;\n\n\n\t/* Create the anonymous OS pipe */\n\n\tthisSession = sessionIdentifierFrom(interpreterProxy->stackObjectValue(0));\n\treaderIOStreamPtr = &readerIOStream;\n\twriterIOStreamPtr = &writerIOStream;\n\tif (!(createPipeForReaderwriter(readerIOStreamPtr, writerIOStreamPtr))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\twriter = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\n\t/* begin fileValueOf: */\n\tif ((interpreterProxy->isBytes(writer)) && ((interpreterProxy->byteSizeOf(writer)) == (fileRecordSize()))) {\n\t\twriterPtr = interpreterProxy->arrayValueOf(writer);\n\t\tgoto l1;\n\t} else {\n\t\tinterpreterProxy->primitiveFail();\n\t\twriterPtr = null;\n\t\tgoto l1;\n\t}\nl1:\t/* end fileValueOf: */;\n\twriterPtr->file = writerIOStream;\n\twriterPtr->sessionID = thisSession;\n\twriterPtr->writable = 1;\n\twriterPtr->lastOp = 0;\n\tinterpreterProxy->pushRemappableOop(writer);\n\treader = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\n\t/* begin fileValueOf: */\n\tif ((interpreterProxy->isBytes(reader)) && ((interpreterProxy->byteSizeOf(reader)) == (fileRecordSize()))) {\n\t\treaderPtr = interpreterProxy->arrayValueOf(reader);\n\t\tgoto l2;\n\t} else {\n\t\tinterpreterProxy->primitiveFail();\n\t\treaderPtr = null;\n\t\tgoto l2;\n\t}\nl2:\t/* end fileValueOf: */;\n\treaderPtr->file = readerIOStream;\n\treaderPtr->sessionID = thisSession;\n\treaderPtr->writable = 0;\n\treaderPtr->lastOp = 0;\n\tinterpreterProxy->pushRemappableOop(reader);\n\tarrayResult = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2);\n\tinterpreterProxy->stObjectatput(arrayResult, 1, interpreterProxy->popRemappableOop());\n\tinterpreterProxy->stObjectatput(arrayResult, 2, interpreterProxy->popRemappableOop());\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->push(arrayResult);\n}\n\n\n/*\tAnswer a string containing the OS process environment string at index (an Integer)\n\tin the environment list. */\n\nEXPORT(sqInt) primitiveEnvironmentAt(void) {\n    extern char **envVec;\n    char **p;\n    sqInt envCnt;\n    sqInt s;\n    sqInt index;\n    char *sPtr;\n\n\tp = envVec;\n\tenvCnt = 0;\n\twhile (*p++) envCnt++;\n\tindex = interpreterProxy->stackIntegerValue(0);\n\tif ((index > envCnt) || (index < 1)) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->push(interpreterProxy->nilObject());\n\t} else {\n\t\tsPtr = envVec[index - 1];\n\t\ts = stringFromCString(sPtr);\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->push(s);\n\t}\n}\n\n\n/*\tAnswer the value of an environment variable keyed by a Symbol. */\n\nEXPORT(sqInt) primitiveEnvironmentAtSymbol(void) {\n    char * getenvResult;\n    char *keyCStringPtr;\n    sqInt s;\n\n\tkeyCStringPtr = transientCStringFromString(interpreterProxy->stackObjectValue(0));\n\tgetenvResult = getenv(keyCStringPtr);\n\tif (getenvResult == 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t} else {\n\t\ts = stringFromCString(getenvResult);\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->push(s);\n\t}\n}\n\n\n/*\tAnswer a string describing an error message */\n\nEXPORT(sqInt) primitiveErrorMessageAt(void) {\n    char *p;\n    sqInt errMessage;\n    sqInt index;\n\n\tindex = interpreterProxy->stackIntegerValue(0);\n\tp = ((char *) (strerror(index)));\n\terrMessage = stringFromCString(p);\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->push(errMessage);\n}\n\n\n/*\tCall stat(2) to obtain the file protection mask for a file. Answer an Array of\n\tfour integers representing the protection mask, or answer errno on failure. The\n\tprotection mask is four Integers, each of which may be considered an octal digit\n\t(0-7), with bit values 4, 2, and 1. The first digit selects the set user ID (4) and set\n\tgroup ID (2) and save text image (1) attributes. The second digit selects permissions\n\tfor the user who owns the file: read (4), write (2), and execute (1); the third\n\tselects permissions for other users in the file's group, with the same values; and\n\tthe fourth for other users not in the file's group, with the same values. */\n\nEXPORT(sqInt) primitiveFileProtectionMask(void) {\n    extern int errno;\n    char *path;\n    struct stat *statBuf;\n    sqInt mode;\n    sqInt result;\n    sqInt buffer;\n\n\tbuffer = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(struct stat));\n\tstatBuf = interpreterProxy->arrayValueOf(buffer);\n\tpath = transientCStringFromString(interpreterProxy->stackObjectValue(0));\n\tmode = stat(path, statBuf);\n\tif (mode == 0) {\n\t\tmode = statBuf->st_mode;\n\t\tresult = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 4);\n\t\tinterpreterProxy->stObjectatput(result, 4, (((mode & 07) << 1) | 1));\n\t\tinterpreterProxy->stObjectatput(result, 3, ((((mode & 070) >> 3) << 1) | 1));\n\t\tinterpreterProxy->stObjectatput(result, 2, ((((mode & 0700) >> 6) << 1) | 1));\n\t\tinterpreterProxy->stObjectatput(result, 1, ((((mode & 07000) >> 9) << 1) | 1));\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->push(result);\n\t} else {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(errno);\n\t}\n}\n\n\n/*\tCall stat(2) to obtain the file protection mask for a file. Answer errno on failure,\n\tor on success answer an array with: UID with: GID with: protectionMask. The\t\n\tprotectionMask is an Array of four integers representing the protection mask, or\n\tanswer errno on failure. The protection mask is four Integers, each of which may\n\tbe considered an octal digit (0-7), with bit values 4, 2, and 1. The first digit selects\n\tthe set user ID (4) and set group ID (2) and save text image (1) attributes. The second\n\tdigit selects permissions for the user who owns the file: read (4), write (2), and\n\texecute (1); the third selects permissions for other users in the file's group, with\n\tthe same values; and the fourth for other users not in the file's group, with the\n\tsame values. */\n\nEXPORT(sqInt) primitiveFileStat(void) {\n    sqInt uid;\n    sqInt gid;\n    extern int errno;\n    char *path;\n    struct stat *statBuf;\n    sqInt mode;\n    sqInt result;\n    sqInt mask;\n    sqInt buffer;\n\n\tresult = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 3);\n\tuid = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(uid_t));\n\tgid = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(gid_t));\n\tmask = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 4);\n\tbuffer = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(struct stat));\n\tstatBuf = interpreterProxy->arrayValueOf(buffer);\n\tpath = transientCStringFromString(interpreterProxy->stackObjectValue(0));\n\tmode = stat(path, statBuf);\n\tif (mode == 0) {\n\t\tmode = statBuf->st_mode;\n\t\tinterpreterProxy->stObjectatput(mask, 4, (((mode & 07) << 1) | 1));\n\t\tinterpreterProxy->stObjectatput(mask, 3, ((((mode & 070) >> 3) << 1) | 1));\n\t\tinterpreterProxy->stObjectatput(mask, 2, ((((mode & 0700) >> 6) << 1) | 1));\n\t\tinterpreterProxy->stObjectatput(mask, 1, ((((mode & 07000) >> 9) << 1) | 1));\n\t\tinterpreterProxy->stObjectatput(result, 3, mask);\n\t\tinterpreterProxy->stObjectatput(result, 2, (((statBuf->st_gid) << 1) | 1));\n\t\tinterpreterProxy->stObjectatput(result, 1, (((statBuf->st_uid) << 1) | 1));\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->push(result);\n\t} else {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(errno);\n\t}\n}\n\n\n/*\tThis primitive exists only for purposes of testing the\n\tfixPointersInArrayOfStrings:withOffsets:count: method. I believe it to be\n\treasonably machine and compiler independent, but have no way of verifying\n\tthis on a variety of machines, so I'll leave this test method here in case\n\tsomeone runs into problems on other hardware or compilers. -dtl */\n\nEXPORT(sqInt) primitiveFixPointersInArrayOfStrings(void) {\n    sqInt cStringArray;\n    sqInt offsetArray;\n    sqInt count;\n    char *flattenedArrayOfStrings;\n    sqInt *offsets;\n\n\tcount = interpreterProxy->stackIntegerValue(0);\n\toffsetArray = interpreterProxy->stackObjectValue(1);\n\tcStringArray = interpreterProxy->stackObjectValue(2);\n\toffsets = interpreterProxy->firstIndexableField(offsetArray);\n\tflattenedArrayOfStrings = interpreterProxy->arrayValueOf(cStringArray);\n\tfixPointersInArrayOfStringswithOffsetscount(flattenedArrayOfStrings, offsets, count);\n\tinterpreterProxy->pop(4);\n\tinterpreterProxy->push(cStringArray);\n}\n\n\n/*\tFork a child OS process, and do an exec in the child. The parent continues on in\n\tSmalltalk, and this method answers the pid of the child which was created.\n\n\tOn entry, the stack contains:\n\t\t0: workingDir, a null terminated string specifying the working directory to use, or nil.\n\t\t1: envOffsets, an array of integers for calculating environment string address offsets.\n\t\t2: envVecBuffer, a String buffer containing environment strings arranged to look like char **.\n\t\t3: argOffsets, an array of integers for calculating argument string address offsets.\n\t\t4: argVecBuffer, a String buffer containing argument strings arranged to look like char **.\n\t\t5: stdErr, a ByteArray handle.\n\t\t6: stdOut, a ByteArray handle.\n\t\t7: stdIn, a ByteArray handle.\n\t\t8: executableFile, a null terminated string with the name of the file to execute.\n\t\t9: the sender */\n\nEXPORT(sqInt) primitiveForkAndExecInDirectory(void) {\n\treturn forkAndExecInDirectory(1);\n}\n\n\n/*\tFork a child OS process, and do an exec in the child. The parent continues on in\n\tSmalltalk, and this method answers the pid of the child which was created.\n\n\tOn entry, the stack contains:\n\t\t0: workingDir, a null terminated string specifying the working directory to use, or nil.\n\t\t1: envOffsets, an array of integers for calculating environment string address offsets.\n\t\t2: envVecBuffer, a String buffer containing environment strings arranged to look like char **.\n\t\t3: argOffsets, an array of integers for calculating argument string address offsets.\n\t\t4: argVecBuffer, a String buffer containing argument strings arranged to look like char **.\n\t\t5: stdErr, a ByteArray handle.\n\t\t6: stdOut, a ByteArray handle.\n\t\t7: stdIn, a ByteArray handle.\n\t\t8: executableFile, a null terminated string with the name of the file to execute.\n\t\t9: the sender */\n\nEXPORT(sqInt) primitiveForkExec(void) {\n\treturn forkAndExecInDirectory(0);\n}\n\n\n/*\tFork a child process, and continue running squeak in the child process. Leave the\n\tX session connected to the parent process, but close its file descriptor for the child\n\tprocess. Open a new X session for the child.\n\n\tThe child should not depend on using existing connections to external resources. For\n\texample, the child may lose its connections to stdin, stdout, and stderr after its parent\n\texits. */\n\nEXPORT(sqInt) primitiveForkSqueak(void) {\n    pid_t pid;\n\n\tif ((sandboxSecurity()) == 1) {\n\t\tinterpreterProxy->pop(1);\n\t\tinterpreterProxy->pushInteger(-1);\n\t} else {\n\t\tpid = forkSqueak(1);\n\t\tinterpreterProxy->pop(1);\n\t\tinterpreterProxy->pushInteger(pid);\n\t}\n}\n\n\n/*\tFork a child process, and continue running squeak in the child process. Leave the\n\tX session connected to the parent process, but close its file descriptor for the child\n\tprocess. Open a new X session for the child.\n\n\tThe child should not depend on using existing connections to external resources. For\n\texample, the child may lose its connections to stdin, stdout, and stderr after its parent\n\texits. */\n\nEXPORT(sqInt) primitiveForkSqueakWithoutSigHandler(void) {\n    pid_t pid;\n\n\tif ((sandboxSecurity()) == 1) {\n\t\tinterpreterProxy->pop(1);\n\t\tinterpreterProxy->pushInteger(-1);\n\t} else {\n\t\tpid = forkSqueak(0);\n\t\tinterpreterProxy->pop(1);\n\t\tinterpreterProxy->pushInteger(pid);\n\t}\n}\n\n\n/*\tSet a signal handler in the VM which will signal a Smalltalk semaphore at\n\tsemaphoreIndex whenever an external signal sigNum is received. Answer the\n\tprior value of the signal handler. If semaphoreIndex is zero or nil, the handler\n\tis unregistered, and the VM returns to its default behavior for handling that\n\tsignal.\n\n\tThe Smalltalk semaphore is expected to be kept at the same index location\n\tindefinitely during the lifetime of a Squeak session. If that is not the case, the\n\thandler must be unregistered prior to unregistering the Smalltalk semaphore. */\n\nEXPORT(sqInt) primitiveForwardSignalToSemaphore(void) {\n    sqInt sigNum;\n    void *handler;\n    sqInt semaphoreIndex;\n    char *hPtr;\n    sqInt idx;\n    sqInt index;\n    union {void *handler; unsigned char bytes[sizeof(void *)];} priorHandler;\n    sqInt priorHandlerObject;\n\n\tindex = interpreterProxy->stackValue(0);\n\tif (index == (interpreterProxy->nilObject())) {\n\t\tsemaphoreIndex = 0;\n\t} else {\n\t\tif ((index & 1)) {\n\t\t\tsemaphoreIndex = interpreterProxy->stackIntegerValue(0);\n\t\t} else {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\tsigNum = interpreterProxy->stackIntegerValue(1);\n\thandler = forwardSignaltoSemaphoreAt(sigNum, semaphoreIndex);\n\tif (handler == (sigErrorNumber())) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tpriorHandlerObject = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeOfPointer());\n\thPtr = interpreterProxy->arrayValueOf(priorHandlerObject);\n\tpriorHandler.handler = handler;\n\tidx = 0;\n\twhile (idx < (sizeOfPointer())) {\n\t\thPtr[idx] = priorHandler.bytes[idx];\n\t\tidx += 1;\n\t}\n\tinterpreterProxy->popthenPush(3, priorHandlerObject);\n}\n\n\n/*\tAnswer a string containing the current working directory. */\n\nEXPORT(sqInt) primitiveGetCurrentWorkingDirectory(void) {\n    sqInt maxSize;\n    sqInt cwdString;\n    sqInt incrementBy;\n    char *cwd;\n    sqInt bufferSize;\n    char *buffer;\n\n\tbufferSize = 100;\n\tincrementBy = 100;\n\tmaxSize = 5000;\n\twhile (1) {\n\t\tcwdString = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), bufferSize);\n\t\tbuffer = interpreterProxy->arrayValueOf(cwdString);\n\t\tcwd = getcwd(buffer, bufferSize);\n\t\tif (!((cwd == 0) && (bufferSize < maxSize))) break;\n\t\tbufferSize += incrementBy;\n\t}\n\tif (cwd == 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t} else {\n\t\tcwdString = stringFromCString(cwd);\n\t\tinterpreterProxy->pop(1);\n\t\tinterpreterProxy->push(cwdString);\n\t}\n}\n\n\n/*\tAnswer the effective group ID of my OS process */\n\nEXPORT(sqInt) primitiveGetEGid(void) {\n    gid_t eGid;\n\n\teGid = getegid();\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(eGid);\n}\n\n\n/*\tAnswer the effective user ID of my OS process */\n\nEXPORT(sqInt) primitiveGetEUid(void) {\n    uid_t eUid;\n\n\teUid = geteuid();\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(eUid);\n}\n\n\n/*\tAnswer the group ID of my OS process */\n\nEXPORT(sqInt) primitiveGetGid(void) {\n    gid_t gid;\n\n\tgid = getgid();\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(gid);\n}\n\n\n/*\tAnswer the process ID of my OS process */\n\nEXPORT(sqInt) primitiveGetPid(void) {\n    pid_t pid;\n\n\tpid = getpid();\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(pid);\n}\n\n\n/*\tAnswer the process ID of the parent process of my OS process */\n\nEXPORT(sqInt) primitiveGetPPid(void) {\n    pid_t ppid;\n\n\tppid = getppid();\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(ppid);\n}\n\n\n/*\tAnswer the unique session identifier for this Smalltalk instance running in this\n\tOS process. The C integer value is coerced into a Smalltalk ByteArray to preserve\n\tthe full range of possible values. */\n\nEXPORT(sqInt) primitiveGetSession(void) {\n    sqInt sessionOop;\n    SESSIONIDENTIFIERTYPE thisSessionID;\n    unsigned char *sessionByteArrayPointer;\n\n\tsessionOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeOfInt());\n\tsessionByteArrayPointer = interpreterProxy->arrayValueOf(sessionOop);\n\tthisSessionID = interpreterProxy->getThisSessionID();\n\tif (thisSessionID == null) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tcopyBytesFromtolength((unsigned char *)&thisSessionID, sessionByteArrayPointer, sizeOfInt());\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->push(sessionOop);\n}\n\n\n/*\tAnswer the file handle for standard error of my OS process */\n\nEXPORT(sqInt) primitiveGetStdErrHandle(void) {\n    SESSIONIDENTIFIERTYPE thisSession;\n    SQFile * file;\n    sqInt fileOop;\n\n\tfileOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\n\t/* begin fileValueOf: */\n\tif ((interpreterProxy->isBytes(fileOop)) && ((interpreterProxy->byteSizeOf(fileOop)) == (fileRecordSize()))) {\n\t\tfile = interpreterProxy->arrayValueOf(fileOop);\n\t\tgoto l1;\n\t} else {\n\t\tinterpreterProxy->primitiveFail();\n\t\tfile = null;\n\t\tgoto l1;\n\t}\nl1:\t/* end fileValueOf: */;\n\tthisSession = interpreterProxy->getThisSessionID();\n\tfile->file = stderr;\n\tfile->sessionID = thisSession;\n\tfile->writable = 1;\n\tfile->lastOp = 0;\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->push(fileOop);\n}\n\n\n/*\tAnswer the file handle for standard error of my OS process. The session\n\tidentifier is passed as the parameter to this primitive. Use this variant if\n\tthe session identifier is not available directly in the VM (as may be the\n\tcase if it is not possible to link from this plugin to a variable elsewhere\n\tin the VM). */\n\nEXPORT(sqInt) primitiveGetStdErrHandleWithSessionIdentifier(void) {\n    SESSIONIDENTIFIERTYPE thisSession;\n    SQFile * file;\n    sqInt fileOop;\n\n\tfileOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\n\t/* begin fileValueOf: */\n\tif ((interpreterProxy->isBytes(fileOop)) && ((interpreterProxy->byteSizeOf(fileOop)) == (fileRecordSize()))) {\n\t\tfile = interpreterProxy->arrayValueOf(fileOop);\n\t\tgoto l1;\n\t} else {\n\t\tinterpreterProxy->primitiveFail();\n\t\tfile = null;\n\t\tgoto l1;\n\t}\nl1:\t/* end fileValueOf: */;\n\tthisSession = sessionIdentifierFrom(interpreterProxy->stackObjectValue(0));\n\tfile->file = stderr;\n\tfile->sessionID = thisSession;\n\tfile->writable = 1;\n\tfile->lastOp = 0;\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->push(fileOop);\n}\n\n\n/*\tAnswer the file handle for standard input of my OS process */\n\nEXPORT(sqInt) primitiveGetStdInHandle(void) {\n    SESSIONIDENTIFIERTYPE thisSession;\n    SQFile * file;\n    sqInt fileOop;\n\n\tfileOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\n\t/* begin fileValueOf: */\n\tif ((interpreterProxy->isBytes(fileOop)) && ((interpreterProxy->byteSizeOf(fileOop)) == (fileRecordSize()))) {\n\t\tfile = interpreterProxy->arrayValueOf(fileOop);\n\t\tgoto l1;\n\t} else {\n\t\tinterpreterProxy->primitiveFail();\n\t\tfile = null;\n\t\tgoto l1;\n\t}\nl1:\t/* end fileValueOf: */;\n\tthisSession = interpreterProxy->getThisSessionID();\n\tfile->file = stdin;\n\tfile->sessionID = thisSession;\n\tfile->writable = 0;\n\tfile->lastOp = 0;\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->push(fileOop);\n}\n\n\n/*\tAnswer the file handle for standard input of my OS process. The session\n\tidentifier is passed as the parameter to this primitive. Use this variant if\n\tthe session identifier is not available directly in the VM (as may be the\n\tcase if it is not possible to link from this plugin to a variable elsewhere\n\tin the VM). */\n\nEXPORT(sqInt) primitiveGetStdInHandleWithSessionIdentifier(void) {\n    SESSIONIDENTIFIERTYPE thisSession;\n    SQFile * file;\n    sqInt fileOop;\n\n\tfileOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\n\t/* begin fileValueOf: */\n\tif ((interpreterProxy->isBytes(fileOop)) && ((interpreterProxy->byteSizeOf(fileOop)) == (fileRecordSize()))) {\n\t\tfile = interpreterProxy->arrayValueOf(fileOop);\n\t\tgoto l1;\n\t} else {\n\t\tinterpreterProxy->primitiveFail();\n\t\tfile = null;\n\t\tgoto l1;\n\t}\nl1:\t/* end fileValueOf: */;\n\tthisSession = sessionIdentifierFrom(interpreterProxy->stackObjectValue(0));\n\tfile->file = stdin;\n\tfile->sessionID = thisSession;\n\tfile->writable = 0;\n\tfile->lastOp = 0;\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->push(fileOop);\n}\n\n\n/*\tAnswer the file handle for standard output of my OS process */\n\nEXPORT(sqInt) primitiveGetStdOutHandle(void) {\n    SESSIONIDENTIFIERTYPE thisSession;\n    SQFile * file;\n    sqInt fileOop;\n\n\tfileOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\n\t/* begin fileValueOf: */\n\tif ((interpreterProxy->isBytes(fileOop)) && ((interpreterProxy->byteSizeOf(fileOop)) == (fileRecordSize()))) {\n\t\tfile = interpreterProxy->arrayValueOf(fileOop);\n\t\tgoto l1;\n\t} else {\n\t\tinterpreterProxy->primitiveFail();\n\t\tfile = null;\n\t\tgoto l1;\n\t}\nl1:\t/* end fileValueOf: */;\n\tthisSession = interpreterProxy->getThisSessionID();\n\tfile->file = stdout;\n\tfile->sessionID = thisSession;\n\tfile->writable = 1;\n\tfile->lastOp = 0;\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->push(fileOop);\n}\n\n\n/*\tAnswer the file handle for standard output of my OS process. The session\n\tidentifier is passed as the parameter to this primitive. Use this variant if\n\tthe session identifier is not available directly in the VM (as may be the\n\tcase if it is not possible to link from this plugin to a variable elsewhere\n\tin the VM). */\n\nEXPORT(sqInt) primitiveGetStdOutHandleWithSessionIdentifier(void) {\n    SESSIONIDENTIFIERTYPE thisSession;\n    SQFile * file;\n    sqInt fileOop;\n\n\tfileOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\n\t/* begin fileValueOf: */\n\tif ((interpreterProxy->isBytes(fileOop)) && ((interpreterProxy->byteSizeOf(fileOop)) == (fileRecordSize()))) {\n\t\tfile = interpreterProxy->arrayValueOf(fileOop);\n\t\tgoto l1;\n\t} else {\n\t\tinterpreterProxy->primitiveFail();\n\t\tfile = null;\n\t\tgoto l1;\n\t}\nl1:\t/* end fileValueOf: */;\n\tthisSession = sessionIdentifierFrom(interpreterProxy->stackObjectValue(0));\n\tfile->file = stdout;\n\tfile->sessionID = thisSession;\n\tfile->writable = 1;\n\tfile->lastOp = 0;\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->push(fileOop);\n}\n\n\n/*\tAnswer the user ID of my OS process */\n\nEXPORT(sqInt) primitiveGetUid(void) {\n    uid_t uid;\n\n\tuid = getuid();\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(uid);\n}\n\n\n/*\tTake a struct SQFile from the stack, and call feof(3) to determine if the file has\n\treached end of file. */\n\nEXPORT(sqInt) primitiveIsAtEndOfFile(void) {\n    SQFile *sqFile;\n    sqInt result;\n    sqInt sqFileOop;\n\n\tsqFileOop = interpreterProxy->stackValue(0);\n\tif (!(isSQFileObject(sqFileOop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tsqFile = interpreterProxy->arrayValueOf(sqFileOop);\n\tif ((feof(sqFile->file)) == 0) {\n\t\tresult = interpreterProxy->falseObject();\n\t} else {\n\t\tresult = interpreterProxy->trueObject();\n\t}\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->push(result);\n}\n\n\n/*\tTake a struct SQFile from the stack, and request a lock on the specified region.\n\tIf the exclusive flag is true, then request an exclusive (F_WRLCK) lock on the\n     file. Otherwise, request a shared (F_RDLCK) lock. Any number of Unix processes\n     may hold  a read lock (shared lock) on a file region, but only one process may\n     hold a write lock (exclusive lock). Answer the result of the call to fcntl().\n\n\tIf length is zero, then the entire file will be locked, including region extents that\n\thave not yet been allocated for the file. */\n\nEXPORT(sqInt) primitiveLockFileRegion(void) {\n    sqInt sqFileOop;\n    SESSIONIDENTIFIERTYPE thisSession;\n    sqInt exclusive;\n    sqInt start;\n    SQFile *sqFile;\n    int result;\n    sqInt len;\n    int fileNo;\n    struct flock lockStruct;\n\n\texclusive = (interpreterProxy->stackValue(0)) == (interpreterProxy->trueObject());\n\tlen = interpreterProxy->stackIntegerValue(1);\n\tstart = interpreterProxy->stackIntegerValue(2);\n\tsqFileOop = interpreterProxy->stackValue(3);\n\tif (!(isSQFileObject(sqFileOop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\n\t/* If the session identifier can be obtained, use it as an additional consistency check */\n\n\tsqFile = interpreterProxy->arrayValueOf(sqFileOop);\n\tthisSession = interpreterProxy->getThisSessionID();\n\tif (thisSession == null) {\n\t\tnull;\n\t} else {\n\t\tif (!(sqFile->sessionID)) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\n\t/* Set up the flock structure parameter for fcntl() */\n\n\tfileNo = fileno(sqFile->file);\n\tif (exclusive) {\n\t\tlockStruct.l_type = F_WRLCK;\n\t} else {\n\t\tlockStruct.l_type = F_RDLCK;\n\t}\n\tlockStruct.l_whence = SEEK_SET;\n\tlockStruct.l_start = start;\n\tlockStruct.l_len = len;\n\tlockStruct.l_pid = 0;\n\tresult = fcntl(fileNo, F_SETLK, &lockStruct);\n\tinterpreterProxy->pop(5);\n\tinterpreterProxy->pushInteger(result);\n}\n\n\n/*\tCreate a pipe, and answer an array of two file handles for the pipe writer and reader.\n\tThe readerIOStream and writerIOStream variables represent the low level pipe streams,\n\twhich will be of type (FILE *) or HANDLE, depending on what the FilePlugin support\n\tcode is using to represent file streams. FILEHANDLETYPE is defined in my subclasses\n\tin the #declareCVarsIn: class method. */\n\nEXPORT(sqInt) primitiveMakePipe(void) {\n    SESSIONIDENTIFIERTYPE thisSession;\n    sqInt writer;\n    FILEHANDLETYPE writerIOStream;\n    SQFile * writerPtr;\n    FILEHANDLETYPE *writerIOStreamPtr;\n    SQFile * readerPtr;\n    sqInt arrayResult;\n    sqInt reader;\n    FILEHANDLETYPE readerIOStream;\n    FILEHANDLETYPE *readerIOStreamPtr;\n\n\n\t/* Create the anonymous OS pipe */\n\n\tthisSession = interpreterProxy->getThisSessionID();\n\treaderIOStreamPtr = &readerIOStream;\n\twriterIOStreamPtr = &writerIOStream;\n\tif (!(makePipeForReaderwriter(readerIOStreamPtr, writerIOStreamPtr))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\twriter = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\n\t/* begin fileValueOf: */\n\tif ((interpreterProxy->isBytes(writer)) && ((interpreterProxy->byteSizeOf(writer)) == (fileRecordSize()))) {\n\t\twriterPtr = interpreterProxy->arrayValueOf(writer);\n\t\tgoto l1;\n\t} else {\n\t\tinterpreterProxy->primitiveFail();\n\t\twriterPtr = null;\n\t\tgoto l1;\n\t}\nl1:\t/* end fileValueOf: */;\n\twriterPtr->file = writerIOStream;\n\twriterPtr->sessionID = thisSession;\n\twriterPtr->writable = 1;\n\twriterPtr->lastOp = 0;\n\tinterpreterProxy->pushRemappableOop(writer);\n\treader = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\n\t/* begin fileValueOf: */\n\tif ((interpreterProxy->isBytes(reader)) && ((interpreterProxy->byteSizeOf(reader)) == (fileRecordSize()))) {\n\t\treaderPtr = interpreterProxy->arrayValueOf(reader);\n\t\tgoto l2;\n\t} else {\n\t\tinterpreterProxy->primitiveFail();\n\t\treaderPtr = null;\n\t\tgoto l2;\n\t}\nl2:\t/* end fileValueOf: */;\n\treaderPtr->file = readerIOStream;\n\treaderPtr->sessionID = thisSession;\n\treaderPtr->writable = 0;\n\treaderPtr->lastOp = 0;\n\tinterpreterProxy->pushRemappableOop(reader);\n\tarrayResult = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2);\n\tinterpreterProxy->stObjectatput(arrayResult, 1, interpreterProxy->popRemappableOop());\n\tinterpreterProxy->stObjectatput(arrayResult, 2, interpreterProxy->popRemappableOop());\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->push(arrayResult);\n}\n\n\n/*\tCreate a pipe, and answer an array of two file handles for the pipe writer and reader.\n\tThe session identifier is passed as the parameter to this primitive. Use this variant\n\tif the session identifier is not available directly in the VM (as may be the case if\n\tit is not possible to link from this plugin to a variable elsewhere in the VM).\n\tThe readerIOStream and writerIOStream variables represent the low level pipe streams,\n\twhich will be of type (FILE *) or HANDLE, depending on what the FilePlugin support\n\tcode is using to represent file streams. FILEHANDLETYPE is defined in my subclasses\n\tin the #declareCVarsIn: class method. */\n\nEXPORT(sqInt) primitiveMakePipeWithSessionIdentifier(void) {\n    SESSIONIDENTIFIERTYPE thisSession;\n    sqInt writer;\n    FILEHANDLETYPE writerIOStream;\n    SQFile * writerPtr;\n    FILEHANDLETYPE *writerIOStreamPtr;\n    SQFile * readerPtr;\n    sqInt arrayResult;\n    sqInt reader;\n    FILEHANDLETYPE readerIOStream;\n    FILEHANDLETYPE *readerIOStreamPtr;\n\n\n\t/* Create the anonymous OS pipe */\n\n\tthisSession = sessionIdentifierFrom(interpreterProxy->stackObjectValue(0));\n\treaderIOStreamPtr = &readerIOStream;\n\twriterIOStreamPtr = &writerIOStream;\n\tif (!(makePipeForReaderwriter(readerIOStreamPtr, writerIOStreamPtr))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\twriter = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\n\t/* begin fileValueOf: */\n\tif ((interpreterProxy->isBytes(writer)) && ((interpreterProxy->byteSizeOf(writer)) == (fileRecordSize()))) {\n\t\twriterPtr = interpreterProxy->arrayValueOf(writer);\n\t\tgoto l1;\n\t} else {\n\t\tinterpreterProxy->primitiveFail();\n\t\twriterPtr = null;\n\t\tgoto l1;\n\t}\nl1:\t/* end fileValueOf: */;\n\twriterPtr->file = writerIOStream;\n\twriterPtr->sessionID = thisSession;\n\twriterPtr->writable = 1;\n\twriterPtr->lastOp = 0;\n\tinterpreterProxy->pushRemappableOop(writer);\n\treader = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\n\t/* begin fileValueOf: */\n\tif ((interpreterProxy->isBytes(reader)) && ((interpreterProxy->byteSizeOf(reader)) == (fileRecordSize()))) {\n\t\treaderPtr = interpreterProxy->arrayValueOf(reader);\n\t\tgoto l2;\n\t} else {\n\t\tinterpreterProxy->primitiveFail();\n\t\treaderPtr = null;\n\t\tgoto l2;\n\t}\nl2:\t/* end fileValueOf: */;\n\treaderPtr->file = readerIOStream;\n\treaderPtr->sessionID = thisSession;\n\treaderPtr->writable = 0;\n\treaderPtr->lastOp = 0;\n\tinterpreterProxy->pushRemappableOop(reader);\n\tarrayResult = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2);\n\tinterpreterProxy->stObjectatput(arrayResult, 1, interpreterProxy->popRemappableOop());\n\tinterpreterProxy->stObjectatput(arrayResult, 2, interpreterProxy->popRemappableOop());\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->push(arrayResult);\n}\n\n\n/*\tAnswer a string containing the module name string for this plugin. */\n\nEXPORT(sqInt) primitiveModuleName(void) {\n    char *s;\n\n\ts= (char *)moduleName;\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->push(stringFromCString(s));\n}\n\n\n/*\tChange the scheduling priority of this process by the given nice increment.\n\tA positive increment decreases the priority. Only the superuser can specify\n\ta negative value (to increase the priority). See man(2) nice.\n\n\tDifferent versions of Unix are inconsistent in their return values. The only\n\treliable test for success is to clear errno prior to the call, and test its value\n\tif the result of nice() is -1. */\n\nEXPORT(sqInt) primitiveNice(void) {\n    extern int errno;\n    sqInt result;\n    int niceIncrement;\n\n\tniceIncrement = interpreterProxy->stackIntegerValue(0);\n\terrno = 0;\n\tresult = nice(niceIncrement);\n\tif (result == -1) {\n\t\tif (!(errno == 0)) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->pushInteger(result);\n}\n\n\n/*\tSet an environment variable using a string of the form 'KEY=value'. This\n\timplementation allocates a C string using malloc to allocate from the C heap\n\t(using cStringFromString rather than transientCStringFromString). This\n\tis necessary because the C runtime library does not make a copy of the\n\tstring into separately allocated environment memory. */\n\nEXPORT(sqInt) primitivePutEnv(void) {\n    char *cStringPtr;\n    sqInt keyValueString;\n\n\tkeyValueString = interpreterProxy->stackObjectValue(0);\n\tcStringPtr = cStringFromString(keyValueString);\n\tif ((putenv(cStringPtr)) == 0) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->push(keyValueString);\n\t} else {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n}\n\n\n/*\tAnswer the real path for a path string as determined by realpath(). */\n\nEXPORT(sqInt) primitiveRealpath(void) {\n    sqInt newPathString;\n    char *pathString;\n    sqInt s;\n    char * realpathResult;\n    sqInt bufferSize;\n    char *buffer;\n\n\tbufferSize = 1024;\n\tnewPathString = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), bufferSize);\n\tinterpreterProxy->pushRemappableOop(newPathString);\n\tpathString = transientCStringFromString(interpreterProxy->stackObjectValue(0));\n\tnewPathString = interpreterProxy->popRemappableOop();\n\tbuffer = interpreterProxy->arrayValueOf(newPathString);\n\trealpathResult = realpath(pathString, buffer);\n\tif (realpathResult == 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t} else {\n\t\tif ((strlen(realpathResult)) >= 1024) {\n\t\t\tperror(\"warning: statically allocated array exceeded in UnixOSProcessPlugin>>primitiveRealPath, object memory may have been corrupted\");\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t\ts = stringFromCString(realpathResult);\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->push(s);\n\t}\n}\n\n\n/*\tClean up after the death of a child, and answer an array with the pid and\n\tthe exit status of the child process. Answer nil if the pidToHandle does not exist. */\n\nEXPORT(sqInt) primitiveReapChildProcess(void) {\n    pid_t pidResult;\n    sqInt resultArray;\n    sqInt *arrayPtr;\n    int exitStatus;\n    sqInt pidToHandle;\n\n\n\t/* Force C code translator to declare the variable */\n\n\texitStatus = 0;\n\tpidToHandle = interpreterProxy->stackIntegerValue(0);\n\tpidResult = waitpid ( pidToHandle, &exitStatus, WNOHANG );\n\tif (pidResult <= 0) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->push(interpreterProxy->nilObject());\n\t} else {\n\t\tresultArray = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2);\n\t\tarrayPtr = interpreterProxy->firstIndexableField(resultArray);\n\t\tarrayPtr[0] = integerObjectOf(pidResult);\n\t\tarrayPtr[1] = integerObjectOf(exitStatus);\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->push(resultArray);\n\t}\n}\n\n\n/*\tAnswer the registration index of the semaphore currently associated with the\n\tsignal handler for sigNum. */\n\nEXPORT(sqInt) primitiveSemaIndexFor(void) {\n    sqInt sigNum;\n    sqInt index;\n\n\tsigNum = interpreterProxy->stackIntegerValue(0);\n\tindex = semaIndices[sigNum];\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(index);\n}\n\n\n/*\tSend SIGABRT (abort) to the OS process identified by anIntegerPid. Use an explicit\n\tcheck for isIntegerObject so we can return -1 on error (the stackIntegerValue: method\n\tanswers 1 on error, and 1 is a valid pid number). */\n\nEXPORT(sqInt) primitiveSendSigabrtTo(sqInt anIntegerPid) {\n    pid_t pidToSignal;\n    int result;\n\n\tif ((sandboxSecurity()) == 1) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(-1);\n\t} else {\n\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\n\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\n\t\t\tresult = kill(pidToSignal, SIGABRT);\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(result);\n\t\t} else {\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(-1);\n\t\t}\n\t}\n}\n\n\n/*\tSend SIGALRM (alarm clock) to the OS process identified by anIntegerPid. Use an explicit\n\tcheck for isIntegerObject so we can return -1 on error (the stackIntegerValue: method\n\tanswers 1 on error, and 1 is a valid pid number). */\n\nEXPORT(sqInt) primitiveSendSigalrmTo(sqInt anIntegerPid) {\n    pid_t pidToSignal;\n    int result;\n\n\tif ((sandboxSecurity()) == 1) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(-1);\n\t} else {\n\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\n\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\n\t\t\tresult = kill(pidToSignal, SIGALRM);\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(result);\n\t\t} else {\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(-1);\n\t\t}\n\t}\n}\n\n\n/*\tSend SIGCHLD (child status has changed, usually death of child) to the OS process\n\tidentified by anIntegerPid. Use an explicit check for isIntegerObject so we can\n\treturn -1 on error (the stackIntegerValue: method answers 1 on error, and 1 is a\n\tvalid pid number). */\n\nEXPORT(sqInt) primitiveSendSigchldTo(sqInt anIntegerPid) {\n    pid_t pidToSignal;\n    int result;\n\n\tif ((sandboxSecurity()) == 1) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(-1);\n\t} else {\n\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\n\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\n\t\t\tresult = kill(pidToSignal, SIGCHLD);\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(result);\n\t\t} else {\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(-1);\n\t\t}\n\t}\n}\n\n\n/*\tSend SIGCONT (continue) to the OS process identified by anIntegerPid. Use an explicit\n\tcheck for isIntegerObject so we can return -1 on error (the stackIntegerValue: method\n\tanswers 1 on error, and 1 is a valid pid number). */\n\nEXPORT(sqInt) primitiveSendSigcontTo(sqInt anIntegerPid) {\n    pid_t pidToSignal;\n    int result;\n\n\tif ((sandboxSecurity()) == 1) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(-1);\n\t} else {\n\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\n\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\n\t\t\tresult = kill(pidToSignal, SIGCONT);\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(result);\n\t\t} else {\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(-1);\n\t\t}\n\t}\n}\n\n\n/*\tSend SIGHUP (hangup) to the OS process identified by anIntegerPid. Use an explicit\n\tcheck for isIntegerObject so we can return -1 on error (the stackIntegerValue: method\n\tanswers 1 on error, and 1 is a valid pid number). */\n\nEXPORT(sqInt) primitiveSendSighupTo(sqInt anIntegerPid) {\n    pid_t pidToSignal;\n    int result;\n\n\tif ((sandboxSecurity()) == 1) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(-1);\n\t} else {\n\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\n\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\n\t\t\tresult = kill(pidToSignal, SIGHUP);\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(result);\n\t\t} else {\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(-1);\n\t\t}\n\t}\n}\n\n\n/*\tSend SIGINT (interrupt) to the OS process identified by anIntegerPid. Use an explicit\n\tcheck for isIntegerObject so we can return -1 on error (the stackIntegerValue: method\n\tanswers 1 on error, and 1 is a valid pid number). */\n\nEXPORT(sqInt) primitiveSendSigintTo(sqInt anIntegerPid) {\n    pid_t pidToSignal;\n    int result;\n\n\tif ((sandboxSecurity()) == 1) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(-1);\n\t} else {\n\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\n\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\n\t\t\tresult = kill(pidToSignal, SIGINT);\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(result);\n\t\t} else {\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(-1);\n\t\t}\n\t}\n}\n\n\n/*\tSend SIGKILL (kill, unblockable) to the OS process identified by anIntegerPid. Use an explicit\n\tcheck for isIntegerObject so we can return -1 on error (the stackIntegerValue: method\n\tanswers 1 on error, and 1 is a valid pid number). */\n\nEXPORT(sqInt) primitiveSendSigkillTo(sqInt anIntegerPid) {\n    pid_t pidToSignal;\n    int result;\n\n\tif ((sandboxSecurity()) == 1) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(-1);\n\t} else {\n\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\n\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\n\t\t\tresult = kill(pidToSignal, SIGKILL);\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(result);\n\t\t} else {\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(-1);\n\t\t}\n\t}\n}\n\n\n/*\tSend SIGPIPE (broken pipe) to the OS process identified by anIntegerPid. Use an explicit\n\tcheck for isIntegerObject so we can return -1 on error (the stackIntegerValue: method\n\tanswers 1 on error, and 1 is a valid pid number). */\n\nEXPORT(sqInt) primitiveSendSigpipeTo(sqInt anIntegerPid) {\n    pid_t pidToSignal;\n    int result;\n\n\tif ((sandboxSecurity()) == 1) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(-1);\n\t} else {\n\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\n\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\n\t\t\tresult = kill(pidToSignal, SIGPIPE);\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(result);\n\t\t} else {\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(-1);\n\t\t}\n\t}\n}\n\n\n/*\tSend SIGQUIT (quit) to the OS process identified by anIntegerPid. Use an explicit\n\tcheck for isIntegerObject so we can return -1 on error (the stackIntegerValue: method\n\tanswers 1 on error, and 1 is a valid pid number). */\n\nEXPORT(sqInt) primitiveSendSigquitTo(sqInt anIntegerPid) {\n    pid_t pidToSignal;\n    int result;\n\n\tif ((sandboxSecurity()) == 1) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(-1);\n\t} else {\n\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\n\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\n\t\t\tresult = kill(pidToSignal, SIGQUIT);\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(result);\n\t\t} else {\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(-1);\n\t\t}\n\t}\n}\n\n\n/*\tSend SIGSTOP (stop, unblockable) to the OS process identified by anIntegerPid. Use an explicit\n\tcheck for isIntegerObject so we can return -1 on error (the stackIntegerValue: method\n\tanswers 1 on error, and 1 is a valid pid number). */\n\nEXPORT(sqInt) primitiveSendSigstopTo(sqInt anIntegerPid) {\n    pid_t pidToSignal;\n    int result;\n\n\tif ((sandboxSecurity()) == 1) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(-1);\n\t} else {\n\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\n\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\n\t\t\tresult = kill(pidToSignal, SIGSTOP);\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(result);\n\t\t} else {\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(-1);\n\t\t}\n\t}\n}\n\n\n/*\tSend SIGTERM (termination) to the OS process identified by anIntegerPid. Use an explicit\n\tcheck for isIntegerObject so we can return -1 on error (the stackIntegerValue: method\n\tanswers 1 on error, and 1 is a valid pid number). */\n\nEXPORT(sqInt) primitiveSendSigtermTo(sqInt anIntegerPid) {\n    pid_t pidToSignal;\n    int result;\n\n\tif ((sandboxSecurity()) == 1) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(-1);\n\t} else {\n\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\n\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\n\t\t\tresult = kill(pidToSignal, SIGTERM);\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(result);\n\t\t} else {\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(-1);\n\t\t}\n\t}\n}\n\n\n/*\tSend SIGUSR1 (User-defined signal 1) to the OS process identified by anIntegerPid. Use\n\tan explicit check for isIntegerObject so we can return -1 on error (the stackIntegerValue:\n\tmethod answers 1 on error, and 1 is a valid pid number). */\n\nEXPORT(sqInt) primitiveSendSigusr1To(sqInt anIntegerPid) {\n    pid_t pidToSignal;\n    int result;\n\n\tif ((sandboxSecurity()) == 1) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(-1);\n\t} else {\n\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\n\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\n\t\t\tresult = kill(pidToSignal, SIGUSR1);\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(result);\n\t\t} else {\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(-1);\n\t\t}\n\t}\n}\n\n\n/*\tSend SIGUSR2 (User-defined signal 2) to the OS process identified by anIntegerPid. Use\n\tan explicit check for isIntegerObject so we can return -1 on error (the stackIntegerValue:\n\tmethod answers 1 on error, and 1 is a valid pid number). */\n\nEXPORT(sqInt) primitiveSendSigusr2To(sqInt anIntegerPid) {\n    pid_t pidToSignal;\n    int result;\n\n\tif ((sandboxSecurity()) == 1) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(-1);\n\t} else {\n\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\n\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\n\t\t\tresult = kill(pidToSignal, SIGUSR2);\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(result);\n\t\t} else {\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(-1);\n\t\t}\n\t}\n}\n\n\n/*\tSet the index of the semaphore used by the OSProcess with which I collaborate. My\n\tOSProcess should set this value so that I can use it when handling SIGCHLD signals\n\t(death of child). In the C translation this is a static int which would be shared by all\n\tinstances of UnixOSProcessPlugin, which is expected to be a singleton. Answer the\n\tvalue of the semaphore index. */\n\nEXPORT(sqInt) primitiveSetSemaIndex(void) {\n\tsigChldSemaIndex = interpreterProxy->stackIntegerValue(0);\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->pushInteger(sigChldSemaIndex);\n}\n\n\n/*\tInteger value corresponding to SIGCHLD */\n\nEXPORT(sqInt) primitiveSigChldNumber(void) {\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(sigChldNumber());\n}\n\n\n/*\tInteger value corresponding to SIGHUP */\n\nEXPORT(sqInt) primitiveSigHupNumber(void) {\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(sigHupNumber());\n}\n\n\n/*\tInteger value corresponding to SIGINT */\n\nEXPORT(sqInt) primitiveSigIntNumber(void) {\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(sigIntNumber());\n}\n\n\n/*\tInteger value corresponding to SIGKILL */\n\nEXPORT(sqInt) primitiveSigKillNumber(void) {\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(sigKillNumber());\n}\n\n\n/*\tInteger value corresponding to SIGPIPE */\n\nEXPORT(sqInt) primitiveSigPipeNumber(void) {\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(sigPipeNumber());\n}\n\n\n/*\tInteger value corresponding to SIGQUIT */\n\nEXPORT(sqInt) primitiveSigQuitNumber(void) {\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(sigQuitNumber());\n}\n\n\n/*\tInteger value corresponding to SIGTERM */\n\nEXPORT(sqInt) primitiveSigTermNumber(void) {\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(sigTermNumber());\n}\n\n\n/*\tInteger value corresponding to SIGUSR1 */\n\nEXPORT(sqInt) primitiveSigUsr1Number(void) {\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(sigUsr1Number());\n}\n\n\n/*\tInteger value corresponding to SIGUSR2 */\n\nEXPORT(sqInt) primitiveSigUsr2Number(void) {\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(sigUsr2Number());\n}\n\n\n/*\tSize in bytes of an integer, for this C compiler on this machine. */\n\nEXPORT(sqInt) primitiveSizeOfInt(void) {\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(sizeOfInt());\n}\n\n\n/*\tSize in bytes of a void pointer, for this C compiler on this machine. */\n\nEXPORT(sqInt) primitiveSizeOfPointer(void) {\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(sizeOfPointer());\n}\n\n\n/*\tTake a struct SQFile from the stack, and call fflush() to flush the OS stream. This flushes the\n\tfile stream in the C library, not the stream in Smalltalk. For output streams, consider setting\n\tthe OS stream (C library) to unbuffered output, and letting Smalltalk do all the buffering. */\n\nEXPORT(sqInt) primitiveSQFileFlush(void) {\n    SESSIONIDENTIFIERTYPE thisSession;\n    SQFile *sqFile;\n    sqInt sqFileOop;\n\n\tsqFileOop = interpreterProxy->stackValue(0);\n\tif (!(isSQFileObject(sqFileOop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\n\t/* If the session identifier can be obtained, use it as an additional consistency check */\n\n\tsqFile = interpreterProxy->arrayValueOf(sqFileOop);\n\tthisSession = interpreterProxy->getThisSessionID();\n\tif (thisSession == null) {\n\t\tnull;\n\t} else {\n\t\tif (!(sqFile->sessionID)) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->pushInteger(fflush(sqFile->file));\n}\n\n\n/*\tTake a struct SQFile from the stack, and call fflush() to flush the OS stream. This flushes the\n\tfile stream in the C library, not the stream in Smalltalk. For output streams, consider setting\n\tthe OS stream (C library) to unbuffered output, and letting Smalltalk do all the buffering.\n\tThe session identifier is passed as the parameter to this primitive. Use this variant if the session\n\tidentifier is not available directly in the VM (as may be the case if it is not possible to link from\n\tthis plugin to a variable elsewhere in the VM). */\n\nEXPORT(sqInt) primitiveSQFileFlushWithSessionIdentifier(void) {\n    SESSIONIDENTIFIERTYPE thisSession;\n    SQFile *sqFile;\n    sqInt sqFileOop;\n\n\tsqFileOop = interpreterProxy->stackValue(1);\n\tif (!(isSQFileObject(sqFileOop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tsqFile = interpreterProxy->arrayValueOf(sqFileOop);\n\tthisSession = sessionIdentifierFrom(interpreterProxy->stackObjectValue(0));\n\tif (thisSession == (sqFile->sessionID)) {\n\t\tinterpreterProxy->pop(3);\n\t\tinterpreterProxy->pushInteger(fflush(sqFile->file));\n\t} else {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n}\n\n\n/*\tTake a struct SQFile from the stack, and call fcntl() to set the file for blocking I/O. */\n\nEXPORT(sqInt) primitiveSQFileSetBlocking(void) {\n    sqInt descriptor;\n    SESSIONIDENTIFIERTYPE thisSession;\n    SQFile *sqFile;\n    sqInt flags;\n    sqInt retVal;\n    sqInt sqFileOop;\n\n\tsqFileOop = interpreterProxy->stackValue(0);\n\tif (!(isSQFileObject(sqFileOop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\n\t/* If the session identifier can be obtained, use it as an additional consistency check */\n\n\tsqFile = interpreterProxy->arrayValueOf(sqFileOop);\n\tthisSession = interpreterProxy->getThisSessionID();\n\tif (thisSession == null) {\n\t\tnull;\n\t} else {\n\t\tif (!(sqFile->sessionID)) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\tdescriptor = fileDescriptorFrom(sqFileOop);\n\tif (descriptor < 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tflags = fcntl(descriptor, F_GETFL);\n\tretVal = fcntl(descriptor, F_SETFL, flags & ~O_NONBLOCK);\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->pushInteger(retVal);\n}\n\n\n/*\tTake a struct SQFile from the stack, and call fcntl() to set the file for blocking I/O.\n\tUse this variant if the session identifier is not available directly in the VM (as may be\n\tthe case if it is not possible to link from this plugin to a variable elsewhere in the VM). */\n\nEXPORT(sqInt) primitiveSQFileSetBlockingWithSessionIdentifier(void) {\n    sqInt descriptor;\n    SESSIONIDENTIFIERTYPE thisSession;\n    SQFile *sqFile;\n    sqInt flags;\n    sqInt retVal;\n    sqInt sqFileOop;\n\n\tsqFileOop = interpreterProxy->stackValue(1);\n\tif (!(isSQFileObject(sqFileOop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tsqFile = interpreterProxy->arrayValueOf(sqFileOop);\n\tthisSession = sessionIdentifierFrom(interpreterProxy->stackObjectValue(0));\n\tif (thisSession == (sqFile->sessionID)) {\n\t\tdescriptor = fileDescriptorFrom(sqFileOop);\n\t\tif (descriptor < 0) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t\tflags = fcntl(descriptor, F_GETFL);\n\t\tretVal = fcntl(descriptor, F_SETFL, flags & ~O_NONBLOCK);\n\t\tinterpreterProxy->pop(3);\n\t\tinterpreterProxy->pushInteger(retVal);\n\t} else {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n}\n\n\n/*\tTake a struct SQFile from the stack, and call fcntl() to set the file non-blocking I/O. */\n\nEXPORT(sqInt) primitiveSQFileSetNonBlocking(void) {\n    sqInt descriptor;\n    SESSIONIDENTIFIERTYPE thisSession;\n    SQFile *sqFile;\n    sqInt flags;\n    sqInt retVal;\n    sqInt sqFileOop;\n\n\tsqFileOop = interpreterProxy->stackValue(0);\n\tif (!(isSQFileObject(sqFileOop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\n\t/* If the session identifier can be obtained, use it as an additional consistency check */\n\n\tsqFile = interpreterProxy->arrayValueOf(sqFileOop);\n\tthisSession = interpreterProxy->getThisSessionID();\n\tif (thisSession == null) {\n\t\tnull;\n\t} else {\n\t\tif (!(sqFile->sessionID)) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\tdescriptor = fileDescriptorFrom(sqFileOop);\n\tif (descriptor < 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tflags = fcntl(descriptor, F_GETFL);\n\tretVal = fcntl(descriptor, F_SETFL, flags | O_NONBLOCK);\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->pushInteger(retVal);\n}\n\n\n/*\tTake a struct SQFile from the stack, and call fcntl() to set the file non-blocking I/O.\n\tUse this variant if the session identifier is not available directly in the VM (as may be\n\tthe case if it is not possible to link from this plugin to a variable elsewhere in the VM). */\n\nEXPORT(sqInt) primitiveSQFileSetNonBlockingWithSessionIdentifier(void) {\n    sqInt descriptor;\n    SESSIONIDENTIFIERTYPE thisSession;\n    SQFile *sqFile;\n    sqInt flags;\n    sqInt retVal;\n    sqInt sqFileOop;\n\n\tsqFileOop = interpreterProxy->stackValue(1);\n\tif (!(isSQFileObject(sqFileOop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tsqFile = interpreterProxy->arrayValueOf(sqFileOop);\n\tthisSession = sessionIdentifierFrom(interpreterProxy->stackObjectValue(0));\n\tif (thisSession == (sqFile->sessionID)) {\n\t\tdescriptor = fileDescriptorFrom(sqFileOop);\n\t\tif (descriptor < 0) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t\tflags = fcntl(descriptor, F_GETFL);\n\t\tretVal = fcntl(descriptor, F_SETFL, flags | O_NONBLOCK);\n\t\tinterpreterProxy->pop(3);\n\t\tinterpreterProxy->pushInteger(retVal);\n\t} else {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n}\n\n\n/*\tTake a struct SQFile from the stack, and call setbuf() to set the OS file stream\n\t(implemented in the C library) for unbuffered I/O. Answers the result of a fflush()\n\tcall, not the result of the setbuf() call (which is type void). This is nearly useless,\n\tbut may at least provide an indicator that we are operating on a valid file stream. */\n\nEXPORT(sqInt) primitiveSQFileSetUnbuffered(void) {\n    SESSIONIDENTIFIERTYPE thisSession;\n    SQFile *sqFile;\n    sqInt retVal;\n    sqInt sqFileOop;\n\n\tsqFileOop = interpreterProxy->stackValue(0);\n\tif (!(isSQFileObject(sqFileOop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\n\t/* If the session identifier can be obtained, use it as an additional consistency check */\n\n\tsqFile = interpreterProxy->arrayValueOf(sqFileOop);\n\tthisSession = interpreterProxy->getThisSessionID();\n\tif (thisSession == null) {\n\t\tnull;\n\t} else {\n\t\tif (!(sqFile->sessionID)) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\tretVal = fflush(sqFile->file);\n\tsetbuf(sqFile->file, NULL);\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->pushInteger(retVal);\n}\n\n\n/*\tTake a struct SQFile from the stack, and call setbuf() to set the OS file stream (implemented in\n\tthe C library) for unbuffered I/O. Answers the result of a fflush() call, not the result of the\n\tsetbuf() call (which is type void). This is nearly useless, but may at least provide an indicator\n\tthat we are operating on a valid file stream. Use this variant if the session identifier is not\n\tavailable directly in the VM (as may be the case if it is not possible to link from this plugin\n\tto a variable elsewhere in the VM). */\n\nEXPORT(sqInt) primitiveSQFileSetUnbufferedWithSessionIdentifier(void) {\n    SESSIONIDENTIFIERTYPE thisSession;\n    SQFile *sqFile;\n    sqInt retVal;\n    sqInt sqFileOop;\n\n\tsqFileOop = interpreterProxy->stackValue(1);\n\tif (!(isSQFileObject(sqFileOop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tsqFile = interpreterProxy->arrayValueOf(sqFileOop);\n\tthisSession = sessionIdentifierFrom(interpreterProxy->stackObjectValue(0));\n\tif (thisSession == (sqFile->sessionID)) {\n\t\tretVal = fflush(sqFile->file);\n\t\tsetbuf(sqFile->file, NULL);\n\t\tinterpreterProxy->pop(3);\n\t\tinterpreterProxy->pushInteger(retVal);\n\t} else {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n}\n\n\n/*\tTake a struct SQFile from the stack, and check for ability to lock the specified region.\n\tIf the exclusive flag is true, then specify an exclusive (F_WRLCK) lock on the\n     file. Otherwise, specify a shared (F_RDLCK) lock. Any number of Unix processes\n     may hold  a read lock (shared lock) on a file region, but only one process may\n     hold a write lock (exclusive lock).\n\n\tIf length is zero, then the request is for the entire file to be locked, including\n\tregion extents that have not yet been allocated for the file.\n\n\tIf the fcntl() call fails, answer -1 (the result of the failed call). Otherwise,\n\tanswer an array with the following six fields:\n\t\tlockable (true or false)\n\t\tl_pid (pid of the process preventing this lock request, or nil)\n\t\tl_type (request type F_WRLCK or F_RDLOCK of the process preventing this lock request)\n\t\tl_whence (the SEEK_SET, SEEK_CUR, or SEEK_END value of the lock preventing this lock request).\n\t\tl_start (offset of the region lock preventing this lock request)\n\t\tl_len (length of the region lock preventing this lock request) */\n\nEXPORT(sqInt) primitiveTestLockableFileRegion(void) {\n    sqInt sqFileOop;\n    SESSIONIDENTIFIERTYPE thisSession;\n    sqInt exclusive;\n    sqInt start;\n    sqInt resultArray;\n    SQFile *sqFile;\n    int result;\n    sqInt len;\n    int fileNo;\n    sqInt canObtainLock;\n    struct flock lockStruct;\n\n\texclusive = (interpreterProxy->stackValue(0)) == (interpreterProxy->trueObject());\n\tlen = interpreterProxy->stackIntegerValue(1);\n\tstart = interpreterProxy->stackIntegerValue(2);\n\tsqFileOop = interpreterProxy->stackValue(3);\n\tif (!(isSQFileObject(sqFileOop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\n\t/* If the session identifier can be obtained, use it as an additional consistency check */\n\n\tsqFile = interpreterProxy->arrayValueOf(sqFileOop);\n\tthisSession = interpreterProxy->getThisSessionID();\n\tif (thisSession == null) {\n\t\tnull;\n\t} else {\n\t\tif (!(sqFile->sessionID)) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\n\t/* Set up the flock structure parameter for fcntl() */\n\n\tfileNo = fileno(sqFile->file);\n\tif (exclusive) {\n\t\tlockStruct.l_type = F_WRLCK;\n\t} else {\n\t\tlockStruct.l_type = F_RDLCK;\n\t}\n\tlockStruct.l_whence = SEEK_SET;\n\tlockStruct.l_start = start;\n\tlockStruct.l_len = len;\n\tlockStruct.l_pid = 0;\n\tresult = fcntl(fileNo, F_GETLK, &lockStruct);\n\tif (result == -1) {\n\t\tinterpreterProxy->pop(5);\n\t\tinterpreterProxy->pushInteger(result);\n\t} else {\n\t\tif (lockStruct.l_type == F_UNLCK) {\n\t\t\tcanObtainLock = interpreterProxy->trueObject();\n\t\t} else {\n\t\t\tcanObtainLock = interpreterProxy->falseObject();\n\t\t}\n\t\tresultArray = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 6);\n\t\tinterpreterProxy->stObjectatput(resultArray, 1, canObtainLock);\n\t\tinterpreterProxy->stObjectatput(resultArray, 2, (((lockStruct.l_pid) << 1) | 1));\n\t\tinterpreterProxy->stObjectatput(resultArray, 3, (((lockStruct.l_type) << 1) | 1));\n\t\tinterpreterProxy->stObjectatput(resultArray, 4, (((lockStruct.l_whence) << 1) | 1));\n\t\tinterpreterProxy->stObjectatput(resultArray, 5, (((lockStruct.l_start) << 1) | 1));\n\t\tinterpreterProxy->stObjectatput(resultArray, 6, (((lockStruct.l_len) << 1) | 1));\n\t\tinterpreterProxy->popthenPush(5, resultArray);\n\t}\n}\n\n\n/*\tClose a file handle at the close(2) level, using a handle returned by\n\t#primitiveUnixFileNumber. */\n\nEXPORT(sqInt) primitiveUnixFileClose(sqInt anIntegerFileNumber) {\n    int result;\n    int handle;\n\n\thandle = interpreterProxy->stackIntegerValue(0);\n\tresult = close(handle);\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->pushInteger(result);\n}\n\n\n/*\tTake a struct SQFile from the stack, and answer the value of its Unix file number.\n\tThe Unix file number is not directly useful to Squeak, but may be interesting for\n\tdebugging problems involving failure to close unused file handles. */\n\nEXPORT(sqInt) primitiveUnixFileNumber(void) {\n    SQFile *sqFile;\n    int fileNo;\n    sqInt sqFileOop;\n\n\tsqFileOop = interpreterProxy->stackValue(0);\n\tif (!(isSQFileObject(sqFileOop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tsqFile = interpreterProxy->arrayValueOf(sqFileOop);\n\tfileNo = fileno(sqFile->file);\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->pushInteger(fileNo);\n}\n\n\n/*\tTake a struct SQFile from the stack, and unlock the specified region.\n\tAnswer the result of the call to fcntl(). If the region is in the file lock cache,\n\tremove it, but otherwise ignore the cache. The cache supports Win32 semantics\n\twithin a single Squeak image, but not across separate images, therefore the\n\tunlock should be attempted regardless of whether this image thinks that the\n\tregion has previously been locked. Answer the result of the call to fcntl(). */\n\nEXPORT(sqInt) primitiveUnlockFileRegion(void) {\n    sqInt sqFileOop;\n    SESSIONIDENTIFIERTYPE thisSession;\n    sqInt start;\n    SQFile *sqFile;\n    int result;\n    sqInt len;\n    int fileNo;\n    struct flock lockStruct;\n\n\tlen = interpreterProxy->stackIntegerValue(0);\n\tstart = interpreterProxy->stackIntegerValue(1);\n\tsqFileOop = interpreterProxy->stackValue(2);\n\tif (!(isSQFileObject(sqFileOop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\n\t/* If the session identifier can be obtained, use it as an additional consistency check */\n\n\tsqFile = interpreterProxy->arrayValueOf(sqFileOop);\n\tthisSession = interpreterProxy->getThisSessionID();\n\tif (thisSession == null) {\n\t\tnull;\n\t} else {\n\t\tif (!(sqFile->sessionID)) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\n\t/* Set up the flock structure parameter for fcntl() */\n\n\tfileNo = fileno(sqFile->file);\n\tlockStruct.l_type = F_UNLCK;\n\tlockStruct.l_whence = SEEK_SET;\n\tlockStruct.l_start = start;\n\tlockStruct.l_len = len;\n\tlockStruct.l_pid = 0;\n\tresult = fcntl(fileNo, F_SETLK, &lockStruct);\n\tinterpreterProxy->pop(4);\n\tinterpreterProxy->pushInteger(result);\n}\n\n\n/*\tUnset an environment variable. */\n/*\tFIXME: unsetenv() is not portable. For Solaris or any other system which does not\n\tsupport unsetenv(), just comment it out in this method and rebuild the plugin. */\n\nEXPORT(sqInt) primitiveUnsetEnv(void) {\n    sqInt keyString;\n    char *cStringPtr;\n\n\tkeyString = interpreterProxy->stackObjectValue(0);\n\n\t/* For Solaris, comment out the following line */\n\n\tcStringPtr = transientCStringFromString(keyString);\n\tunsetenv(cStringPtr);\n\tinterpreterProxy->pop(1);\n}\n\n\n/*\tAnswer a string containing the version string for this plugin. */\n\nEXPORT(sqInt) primitiveVersionString(void) {\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->push(stringFromCString(versionString()));\n}\n\n\n/*\tThis is a signal handler for SIGCHLD. It is not meant to be called from Smalltalk,\n\tand should only be called indirectly as a result of a death of child signal from\n\tthe operating system.\n\n\tChild processes must be cleaned up by the parent, otherwise they continue\n\tto exist as zombies until the parent exits. This handler resets the signal handler\n\tto catch the next SIGCHLD signal, then sets a semaphore to notify the system\n\tthat a child process needs to be cleaned up. The actual clean up is done by a\n\tSmalltalk process which waits on the semaphore, then calls primitiveReapChildProcess.\n\n\tNote: If child processes die faster than we can clean them up, signals will be lost\n\tand child processes will remain as zombies. */\n\nstatic void reapChildProcess(int sigNum) {\n\tsetSigChldHandler();\n\tif (sigChldSemaIndex > 0) {\n\t\tinterpreterProxy->signalSemaphoreWithIndex(sigChldSemaIndex);\n\t}\n}\n\n\n/*\tRestore signal handlers to their original behaviors. */\n\nstatic void restoreDefaultSignalHandlers(void) {\n    sqInt sigNum;\n\n\tsigNum = 1;\n\twhile (sigNum <= (signalArraySize())) {\n\t\tif ((semaIndices[sigNum]) > 0) {\n\t\t\tsetSignalNumberhandler(sigNum, originalSigHandlers[sigNum]);\n\t\t}\n\t\tsigNum += 1;\n\t}\n}\n\n\n/*\tAnswer 1 if running in secure mode, else 0. The osprocessSandboxSecurity\n\tvariable is initialized to -1. On the first call to this method, set its value to\n\teither 0 (user has full access to the plugin) or 1 (user is not permitted to do\n\tdangerous things). */\n\nstatic sqInt sandboxSecurity(void) {\n\tif (osprocessSandboxSecurity < 0) {\n\t\tosprocessSandboxSecurity = securityHeurisitic();\n\t}\n\treturn osprocessSandboxSecurity;\n}\n\n\n/*\tAnswer 0 to permit full access to OSProcess functions, or 1 if access should be\n\trestricted for dangerous functions. The rules are:\n\t\t- If the security plugin is not present, grant full access\n\t\t- If the security plugin can be loaded, restrict access unless user has all\n\t\t  of secCanWriteImage, secHasFileAccess and secHasSocketAccess */\n/*\tFIXME: This function has not been tested. -dtl */\n/*\tIf the security plugin can be loaded, use it to check. If not, assume it's ok */\n\nstatic sqInt securityHeurisitic(void) {\n    sqInt hasSocketAccess;\n    void (*sHSAfn)(void);\n    sqInt canWriteImage;\n    void (*sCWIfn)(void);\n    void (*sHFAfn)(void);\n    sqInt hasFileAccess;\n\n\tsCWIfn = interpreterProxy->ioLoadFunctionFrom(\"secCanWriteImage\", \"SecurityPlugin\");\n\tif (sCWIfn == 0) {\n\t\treturn 0;\n\t}\n\tcanWriteImage =  ((int (*) (void)) sCWIfn)();\n\tsHFAfn = interpreterProxy->ioLoadFunctionFrom(\"secHasFileAccess\", \"SecurityPlugin\");\n\tif (sHFAfn == 0) {\n\t\treturn 0;\n\t}\n\thasFileAccess =  ((int (*) (void)) sHFAfn)();\n\tsHSAfn = interpreterProxy->ioLoadFunctionFrom(\"secHasSocketAccess\", \"SecurityPlugin\");\n\tif (sHSAfn == 0) {\n\t\treturn 0;\n\t}\n\thasSocketAccess =  ((int (*) (void)) sHSAfn)();\n\tif ((canWriteImage && (hasFileAccess)) && (hasSocketAccess)) {\n\t\treturn 0;\n\t} else {\n\t\treturn 1;\n\t}\n}\n\n\n/*\tAn array of Smalltalk Semaphore indices, one for each signal type for which\n\ta handler has been set. If an entry is zero, then no handler is active. */\n\nstatic unsigned char * semaphoreIndices(void) {\n\treturn semaIndices;\n}\n\n\n/*\tAnswer a session ID represented by aByteArray. The session ID is used in\n\tthe SQFile structure. If that data structure changes, we should see compiler\n\twarnings about type mismatch with SESSIONIDENTIFIERTYPE. */\n\nstatic SESSIONIDENTIFIERTYPE sessionIdentifierFrom(sqInt aByteArray) {\n    union {SESSIONIDENTIFIERTYPE session; unsigned char bytes[sizeof(SESSIONIDENTIFIERTYPE)];} sessionUnion;\n    unsigned char *session;\n    sqInt idx;\n\n\tif (!((interpreterProxy->isBytes(aByteArray)) && ((interpreterProxy->stSizeOf(aByteArray)) == (sizeOfSession())))) {\n\t\treturn null;\n\t}\n\tsession = interpreterProxy->arrayValueOf(aByteArray);\n\tidx = 0;\n\twhile (idx < (sizeOfSession())) {\n\t\tsessionUnion.bytes[idx] = session[idx];\n\t\tidx += 1;\n\t}\n\treturn sessionUnion.session;\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt) setInterpreter(struct VirtualMachine* anInterpreter) {\n    sqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\nstatic void setSigChldDefaultHandler(void) {\n\tsetSignalNumberhandler(sigChldNumber(), sigDefaultNumber());\n}\n\n\n/*\tSet the SIGCHLD signal handler in the virtual machine. */\n\nstatic void setSigChldHandler(void) {\n\tif ((signal(SIGCHLD, reapChildProcess)) == (sigErrorNumber())) {\n\t\tperror(\"signal\");\n\t}\n}\n\nstatic void setSigIntDefaultHandler(void) {\n\tsetSignalNumberhandler(sigIntNumber(), sigDefaultNumber());\n}\n\n\n/*\tSet the SIGINT signal handler in the virtual machine to ignore interrupts. */\n\nstatic void setSigIntIgnore(void) {\n\tsetSignalNumberhandler(sigIntNumber(), sigIgnoreNumber());\n}\n\n\n/*\tSet a signal handler. The C code translator will convert #sig:nal: into 'signal(parm1, parm2)' */\n\nstatic void * setSignalNumberhandler(sqInt anInteger, void * signalHandlerAddress) {\n\treturn signal(anInteger, signalHandlerAddress);\n}\n\nstatic void setSigPipeDefaultHandler(void) {\n\tsetSignalNumberhandler(sigPipeNumber(), sigDefaultNumber());\n}\n\n\n/*\tSet the SIGPIPE signal handler in the virtual machine to ignore pipe error signals.\n\tIf a pipe is opened to a child process, and the child exits, then subsequent writes to\n\tthe pipe generate a SIGPIPE signal. If this signal is not handled, the VM will exit\n\twithout warning. */\n\nstatic sqInt setSigPipeHandler(void) {\n\t/* begin setSigPipeIgnore */\n\tsetSignalNumberhandler(sigPipeNumber(), sigIgnoreNumber());\n}\n\n\n/*\tSet the SIGPIPE signal handler in the virtual machine to ignore pipe error signals. */\n\nstatic void setSigPipeIgnore(void) {\n\tsetSignalNumberhandler(sigPipeNumber(), sigIgnoreNumber());\n}\n\nEXPORT(sqInt) shutdownModule(void) {\n    sqInt sigNum;\n\n\t/* begin restoreDefaultSignalHandlers */\n\tsigNum = 1;\n\twhile (sigNum <= (signalArraySize())) {\n\t\tif ((semaIndices[sigNum]) > 0) {\n\t\t\tsetSignalNumberhandler(sigNum, originalSigHandlers[sigNum]);\n\t\t}\n\t\tsigNum += 1;\n\t}\n}\n\n\n/*\tChild status has changed (POSIX). */\n\nstatic sqInt sigChldNumber(void) {\n\treturn SIGCHLD;\n}\n\n\n/*\tDefault action for a signal */\n\nstatic void * sigDefaultNumber(void) {\n\treturn SIG_DFL;\n}\n\n\n/*\tError return from signal() */\n\nstatic void * sigErrorNumber(void) {\n\treturn SIG_ERR;\n}\n\n\n/*\tHangup detected on controlling terminal or death of controlling process */\n\nstatic sqInt sigHupNumber(void) {\n\treturn SIGHUP;\n}\n\n\n/*\tIgnore action for a signal */\n\nstatic void * sigIgnoreNumber(void) {\n\treturn SIG_IGN;\n}\n\n\n/*\tInterrupt (ANSI). */\n\nstatic sqInt sigIntNumber(void) {\n\treturn SIGINT;\n}\n\n\n/*\tKill signal */\n\nstatic sqInt sigKillNumber(void) {\n\treturn SIGKILL;\n}\n\n\n/*\tNumber of possible signals for this OS plus one. The signal handler arrays\n\tdeclared in #declareCVarsIn: are this size. */\n\nstatic sqInt signalArraySize(void) {\n\treturn NSIG;\n}\n\n\n/*\tAn array of signal handler function addresses, with each entry corresponding\n\tto a signal type. */\n\nstatic void ** signalHandlers(void) {\n\treturn sigHandlers;\n}\n\n\n/*\tBroken pipe (POSIX). */\n\nstatic sqInt sigPipeNumber(void) {\n\treturn SIGPIPE;\n}\n\n\n/*\tQuit from keyboard */\n\nstatic sqInt sigQuitNumber(void) {\n\treturn SIGQUIT;\n}\n\n\n/*\tTermination signal. This is the default signal sent by the unix kill(1) command. */\n\nstatic sqInt sigTermNumber(void) {\n\treturn SIGTERM;\n}\n\n\n/*\tUser defined signal number 1. This is value is platform-dependent, so the\n\tinSmalltalk default of 10 may be wrong on some platforms. */\n\nstatic sqInt sigUsr1Number(void) {\n\treturn SIGUSR1;\n}\n\n\n/*\tUser defined signal number 2. This is value is platform-dependent, so the\n\tinSmalltalk default of 12 may be wrong on some platforms. */\n\nstatic sqInt sigUsr2Number(void) {\n\treturn SIGUSR2;\n}\n\n\n/*\tSize in bytes of an integer, for this C compiler on this machine. */\n\nstatic sqInt sizeOfInt(void) {\n\treturn sizeof(int);\n}\n\n\n/*\tSize in bytes of a void pointer, for this C compiler on this machine. */\n\nstatic sqInt sizeOfPointer(void) {\n\treturn sizeof(void *);\n}\n\n\n/*\tSize of a SESSIONIDENTIFIERTYPE. Should match usage in the SQFile data structure,\n\totherwise we should get compiler warnings. */\n\nstatic sqInt sizeOfSession(void) {\n\treturn sizeof(SESSIONIDENTIFIERTYPE);\n}\n\n\n/*\tAnswer the size of a SQSocket data structure in bytes. */\n\nstatic sqInt socketRecordSize(void) {\n\treturn sizeof(SQSocket);\n}\n\n\n/*\tReturn a pointer to the first byte of of the SQsocket data structure socket record within\n\tanSQSocketRecord, which is expected to be a ByteArray of size self>>socketRecordSize. */\n\nstatic SQSocket * socketValueOf(sqInt anSQSocketRecord) {\n\tif ((interpreterProxy->isBytes(anSQSocketRecord)) && ((interpreterProxy->byteSizeOf(anSQSocketRecord)) == (socketRecordSize()))) {\n\t\treturn interpreterProxy->arrayValueOf(anSQSocketRecord);\n\t} else {\n\t\treturn null;\n\t}\n}\n\n\n/*\tAnswer a new String copied from a null-terminated C string.\n\tCaution: This may invoke the garbage collector. */\n\nstatic sqInt stringFromCString(char *aCString) {\n    sqInt len;\n    char *stringPtr;\n    sqInt newString;\n\n\tlen = strlen(aCString);\n\tnewString = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), len);\n\tstringPtr = interpreterProxy->arrayValueOf(newString);\n\t(char *)strncpy(stringPtr, aCString, len);\n\treturn newString;\n}\n\n\n/*\tAnswer a new null-terminated C string copied from aString.\n\tThe string is allocated in object memory, and will be moved\n\twithout warning by the garbage collector. Any C pointer\n\treference the the result is valid only until the garbage\n\tcollector next runs. Therefore, this method should only be used\n\twithin a single primitive in a section of code in which the\n\tgarbage collector is guaranteed not to run. Note also that\n\tthis method may itself invoke the garbage collector prior\n\tto allocating the new C string.\n\n\tWarning: The result of this method will be invalidated by the\n\tnext garbage collection, including a GC triggered by creation\n\tof a new object within a primitive. Do not call this method\n\ttwice to obtain two string pointers. */\n\nstatic char * transientCStringFromString(sqInt aString) {\n    sqInt len;\n    char *cString;\n    char *stringPtr;\n    sqInt newString;\n\n\n\t/* Allocate space for a null terminated C string. */\n\n\tlen = interpreterProxy->sizeOfSTArrayFromCPrimitive(interpreterProxy->arrayValueOf(aString));\n\tinterpreterProxy->pushRemappableOop(aString);\n\tnewString = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), len + 1);\n\tstringPtr = interpreterProxy->arrayValueOf(interpreterProxy->popRemappableOop());\n\n\t/* Point to the actual C string. */\n\n\tcString = interpreterProxy->arrayValueOf(newString);\n\t(char *)strncpy(cString, stringPtr, len);\n\tcString[len] = 0;\n\treturn cString;\n}\n\n\n/*\tAnswer a string containing the version string for this plugin. Handle MNU\n\terrors, which can occur if class InterpreterPlugin has been removed from\n\tthe system.\n\n\tImportant: When this method is changed, the class side method must also be\n\tchanged to match. */\n/*\t4.0 supports 64bit code base */\n\nstatic char * versionString(void) {\n    static char version[]= \"4.0.1\";\n\n\treturn version;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\n\nvoid* UnixOSProcessPlugin_exports[][3] = {\n\t{\"UnixOSProcessPlugin\", \"primitiveEnvironmentAt\", (void*)primitiveEnvironmentAt},\n\t{\"UnixOSProcessPlugin\", \"primitiveSQFileFlush\", (void*)primitiveSQFileFlush},\n\t{\"UnixOSProcessPlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"UnixOSProcessPlugin\", \"primitiveUnsetEnv\", (void*)primitiveUnsetEnv},\n\t{\"UnixOSProcessPlugin\", \"primitiveAioDisable\", (void*)primitiveAioDisable},\n\t{\"UnixOSProcessPlugin\", \"primitiveGetUid\", (void*)primitiveGetUid},\n\t{\"UnixOSProcessPlugin\", \"primitiveSigTermNumber\", (void*)primitiveSigTermNumber},\n\t{\"UnixOSProcessPlugin\", \"primitiveFileStat\", (void*)primitiveFileStat},\n\t{\"UnixOSProcessPlugin\", \"primitiveSQFileSetUnbufferedWithSessionIdentifier\", (void*)primitiveSQFileSetUnbufferedWithSessionIdentifier},\n\t{\"UnixOSProcessPlugin\", \"primitiveSQFileSetNonBlockingWithSessionIdentifier\", (void*)primitiveSQFileSetNonBlockingWithSessionIdentifier},\n\t{\"UnixOSProcessPlugin\", \"primitiveSQFileFlushWithSessionIdentifier\", (void*)primitiveSQFileFlushWithSessionIdentifier},\n\t{\"UnixOSProcessPlugin\", \"primitiveSendSigtermTo\", (void*)primitiveSendSigtermTo},\n\t{\"UnixOSProcessPlugin\", \"primitiveGetEUid\", (void*)primitiveGetEUid},\n\t{\"UnixOSProcessPlugin\", \"primitiveSigQuitNumber\", (void*)primitiveSigQuitNumber},\n\t{\"UnixOSProcessPlugin\", \"primitiveSendSigusr1To\", (void*)primitiveSendSigusr1To},\n\t{\"UnixOSProcessPlugin\", \"primitiveSendSigcontTo\", (void*)primitiveSendSigcontTo},\n\t{\"UnixOSProcessPlugin\", \"primitiveSigUsr1Number\", (void*)primitiveSigUsr1Number},\n\t{\"UnixOSProcessPlugin\", \"primitiveMakePipe\", (void*)primitiveMakePipe},\n\t{\"UnixOSProcessPlugin\", \"primitiveForkExec\", (void*)primitiveForkExec},\n\t{\"UnixOSProcessPlugin\", \"primitiveVersionString\", (void*)primitiveVersionString},\n\t{\"UnixOSProcessPlugin\", \"primitiveSendSigstopTo\", (void*)primitiveSendSigstopTo},\n\t{\"UnixOSProcessPlugin\", \"forkSqueak\", (void*)forkSqueak},\n\t{\"UnixOSProcessPlugin\", \"primitiveSendSigalrmTo\", (void*)primitiveSendSigalrmTo},\n\t{\"UnixOSProcessPlugin\", \"primitiveSendSigintTo\", (void*)primitiveSendSigintTo},\n\t{\"UnixOSProcessPlugin\", \"primitiveSendSigpipeTo\", (void*)primitiveSendSigpipeTo},\n\t{\"UnixOSProcessPlugin\", \"primitiveSendSigquitTo\", (void*)primitiveSendSigquitTo},\n\t{\"UnixOSProcessPlugin\", \"primitiveAioHandle\", (void*)primitiveAioHandle},\n\t{\"UnixOSProcessPlugin\", \"primitiveAioSuspend\", (void*)primitiveAioSuspend},\n\t{\"UnixOSProcessPlugin\", \"primitiveGetPid\", (void*)primitiveGetPid},\n\t{\"UnixOSProcessPlugin\", \"primitiveForwardSignalToSemaphore\", (void*)primitiveForwardSignalToSemaphore},\n\t{\"UnixOSProcessPlugin\", \"primitiveSendSigusr2To\", (void*)primitiveSendSigusr2To},\n\t{\"UnixOSProcessPlugin\", \"primitiveSetSemaIndex\", (void*)primitiveSetSemaIndex},\n\t{\"UnixOSProcessPlugin\", \"primitiveAioEnable\", (void*)primitiveAioEnable},\n\t{\"UnixOSProcessPlugin\", \"primitiveSendSigkillTo\", (void*)primitiveSendSigkillTo},\n\t{\"UnixOSProcessPlugin\", \"primitiveCreatePipeWithSessionIdentifier\", (void*)primitiveCreatePipeWithSessionIdentifier},\n\t{\"UnixOSProcessPlugin\", \"primitiveSendSighupTo\", (void*)primitiveSendSighupTo},\n\t{\"UnixOSProcessPlugin\", \"primitiveUnixFileClose\", (void*)primitiveUnixFileClose},\n\t{\"UnixOSProcessPlugin\", \"primitiveSQFileSetUnbuffered\", (void*)primitiveSQFileSetUnbuffered},\n\t{\"UnixOSProcessPlugin\", \"primitiveUnlockFileRegion\", (void*)primitiveUnlockFileRegion},\n\t{\"UnixOSProcessPlugin\", \"primitiveFileProtectionMask\", (void*)primitiveFileProtectionMask},\n\t{\"UnixOSProcessPlugin\", \"primitiveSigIntNumber\", (void*)primitiveSigIntNumber},\n\t{\"UnixOSProcessPlugin\", \"shutdownModule\", (void*)shutdownModule},\n\t{\"UnixOSProcessPlugin\", \"primitiveSQFileSetBlocking\", (void*)primitiveSQFileSetBlocking},\n\t{\"UnixOSProcessPlugin\", \"primitiveSigPipeNumber\", (void*)primitiveSigPipeNumber},\n\t{\"UnixOSProcessPlugin\", \"primitiveGetStdInHandleWithSessionIdentifier\", (void*)primitiveGetStdInHandleWithSessionIdentifier},\n\t{\"UnixOSProcessPlugin\", \"primitiveUnixFileNumber\", (void*)primitiveUnixFileNumber},\n\t{\"UnixOSProcessPlugin\", \"primitiveGetStdOutHandle\", (void*)primitiveGetStdOutHandle},\n\t{\"UnixOSProcessPlugin\", \"primitiveSQFileSetNonBlocking\", (void*)primitiveSQFileSetNonBlocking},\n\t{\"UnixOSProcessPlugin\", \"primitiveSendSigchldTo\", (void*)primitiveSendSigchldTo},\n\t{\"UnixOSProcessPlugin\", \"primitiveSemaIndexFor\", (void*)primitiveSemaIndexFor},\n\t{\"UnixOSProcessPlugin\", \"primitiveForkSqueakWithoutSigHandler\", (void*)primitiveForkSqueakWithoutSigHandler},\n\t{\"UnixOSProcessPlugin\", \"primitivePutEnv\", (void*)primitivePutEnv},\n\t{\"UnixOSProcessPlugin\", \"primitiveGetStdInHandle\", (void*)primitiveGetStdInHandle},\n\t{\"UnixOSProcessPlugin\", \"primitiveForkSqueak\", (void*)primitiveForkSqueak},\n\t{\"UnixOSProcessPlugin\", \"primitiveCreatePipe\", (void*)primitiveCreatePipe},\n\t{\"UnixOSProcessPlugin\", \"primitiveForkAndExecInDirectory\", (void*)primitiveForkAndExecInDirectory},\n\t{\"UnixOSProcessPlugin\", \"primitiveNice\", (void*)primitiveNice},\n\t{\"UnixOSProcessPlugin\", \"primitiveGetStdErrHandle\", (void*)primitiveGetStdErrHandle},\n\t{\"UnixOSProcessPlugin\", \"primitiveGetCurrentWorkingDirectory\", (void*)primitiveGetCurrentWorkingDirectory},\n\t{\"UnixOSProcessPlugin\", \"primitiveSigHupNumber\", (void*)primitiveSigHupNumber},\n\t{\"UnixOSProcessPlugin\", \"primitiveModuleName\", (void*)primitiveModuleName},\n\t{\"UnixOSProcessPlugin\", \"primitiveIsAtEndOfFile\", (void*)primitiveIsAtEndOfFile},\n\t{\"UnixOSProcessPlugin\", \"primitiveGetStdErrHandleWithSessionIdentifier\", (void*)primitiveGetStdErrHandleWithSessionIdentifier},\n\t{\"UnixOSProcessPlugin\", \"primitiveChdir\", (void*)primitiveChdir},\n\t{\"UnixOSProcessPlugin\", \"primitiveSendSigabrtTo\", (void*)primitiveSendSigabrtTo},\n\t{\"UnixOSProcessPlugin\", \"primitiveErrorMessageAt\", (void*)primitiveErrorMessageAt},\n\t{\"UnixOSProcessPlugin\", \"primitiveSigChldNumber\", (void*)primitiveSigChldNumber},\n\t{\"UnixOSProcessPlugin\", \"primitiveCanReceiveSignals\", (void*)primitiveCanReceiveSignals},\n\t{\"UnixOSProcessPlugin\", \"primitiveLockFileRegion\", (void*)primitiveLockFileRegion},\n\t{\"UnixOSProcessPlugin\", \"primitiveGetGid\", (void*)primitiveGetGid},\n\t{\"UnixOSProcessPlugin\", \"primitiveSizeOfInt\", (void*)primitiveSizeOfInt},\n\t{\"UnixOSProcessPlugin\", \"primitiveFixPointersInArrayOfStrings\", (void*)primitiveFixPointersInArrayOfStrings},\n\t{\"UnixOSProcessPlugin\", \"primitiveGetPPid\", (void*)primitiveGetPPid},\n\t{\"UnixOSProcessPlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{\"UnixOSProcessPlugin\", \"primitiveReapChildProcess\", (void*)primitiveReapChildProcess},\n\t{\"UnixOSProcessPlugin\", \"primitiveGetSession\", (void*)primitiveGetSession},\n\t{\"UnixOSProcessPlugin\", \"primitiveTestLockableFileRegion\", (void*)primitiveTestLockableFileRegion},\n\t{\"UnixOSProcessPlugin\", \"primitiveGetStdOutHandleWithSessionIdentifier\", (void*)primitiveGetStdOutHandleWithSessionIdentifier},\n\t{\"UnixOSProcessPlugin\", \"primitiveRealpath\", (void*)primitiveRealpath},\n\t{\"UnixOSProcessPlugin\", \"primitiveArgumentAt\", (void*)primitiveArgumentAt},\n\t{\"UnixOSProcessPlugin\", \"primitiveGetEGid\", (void*)primitiveGetEGid},\n\t{\"UnixOSProcessPlugin\", \"primitiveMakePipeWithSessionIdentifier\", (void*)primitiveMakePipeWithSessionIdentifier},\n\t{\"UnixOSProcessPlugin\", \"primitiveSQFileSetBlockingWithSessionIdentifier\", (void*)primitiveSQFileSetBlockingWithSessionIdentifier},\n\t{\"UnixOSProcessPlugin\", \"primitiveSizeOfPointer\", (void*)primitiveSizeOfPointer},\n\t{\"UnixOSProcessPlugin\", \"primitiveEnvironmentAtSymbol\", (void*)primitiveEnvironmentAtSymbol},\n\t{\"UnixOSProcessPlugin\", \"initialiseModule\", (void*)initialiseModule},\n\t{\"UnixOSProcessPlugin\", \"primitiveSigUsr2Number\", (void*)primitiveSigUsr2Number},\n\t{\"UnixOSProcessPlugin\", \"primitiveSigKillNumber\", (void*)primitiveSigKillNumber},\n\t{NULL, NULL, NULL}\n};\n\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Developer/Info-NPSophie__Upgraded_.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>NPSophie</string>\n\t<key>CFBundleGetInfoString</key>\n\t<string>Squeak Browser Plugin  3.8.11b1 http://www.squeak.org </string>\n\t<key>CFBundleIconFile</key>\n\t<string>resources/ProjectBuilder/SqueakPlugin.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.SophiePlugin</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>Sophie Browser Plugin</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BRPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>Sophie Browser Plugin  3.8.11b1</string>\n\t<key>CFBundleSignature</key>\n\t<string>MOSS</string>\n\t<key>CFBundleVersion</key>\n\t<string> 3.8.11b1</string>\n\t<key>SqueakEncodingType</key>\n\t<string>macintosh</string>\n\t<key>SqueakMaxHeapSize</key>\n\t<integer>536870912</integer>\n\t<key>SqueakPluginsBuiltInOrLocalOnly</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Developer/Info-NPSqueak__Upgraded_.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>NPSqueak</string>\n\t<key>CFBundleGetInfoString</key>\n\t<string>Squeak Browser Plugin  3.8.12b1 http://www.squeak.org </string>\n\t<key>CFBundleIconFile</key>\n\t<string>resources/ProjectBuilder/SqueakPlugin.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.SqueakPlugin</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>Squeak Browser Plugin</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BRPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>Squeak Browser Plugin  3.8.12b1</string>\n\t<key>CFBundleSignature</key>\n\t<string>MOSS</string>\n\t<key>CFBundleVersion</key>\n\t<string> 3.8.12b1</string>\n\t<key>SqueakEncodingType</key>\n\t<string>macintosh</string>\n\t<key>SqueakMaxHeapSize</key>\n\t<integer>536870912</integer>\n\t<key>SqueakPluginsBuiltInOrLocalOnly</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Developer/Info-Squeak_VM_Debug__Upgraded_.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleDocumentTypes</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>image</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeIconFile</key>\n\t\t\t<string>SqueakImage.icns</string>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Squeak Image File</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>STim</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>changes</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeIconFile</key>\n\t\t\t<string>SqueakChanges.icns</string>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Squeak Changes File</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>STch</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>sobj</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeIconFile</key>\n\t\t\t<string>SqueakScript.icns</string>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Squeak Script File</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>SOBJ</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>JPEG</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>JPEG</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>TEXT</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>TEXT</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>ttro</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>ttro</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>HTML</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>HTML</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>RTF </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>RTF</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>TIFF </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>TIFF</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>PICT </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>PICT</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>URL  </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>URL</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>ZIP </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>ZIP</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>zip </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>zip</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>BINA</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>BINA</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>GIFf</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>GIFf</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>PNGf</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>PNGf</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MP3 </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MP3</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MP3!</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MP3!</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MP3U</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MP3U</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MPEG</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MPEG</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>mp3!</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>mp3!</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MPG2</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MPG2</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MPG3</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MPG3</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MPG </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MPG</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Mp3</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>mp3</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>M3U</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>M3U</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>SRCS</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>SRCS</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Chng</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>Chng</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>HPS5</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>HPS5</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>bundle</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeIconFile</key>\n\t\t\t<string>SqueakPlugin.icns</string>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Squeak Plugin</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>BNDL</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t</array>\n\t<key>CFBundleExecutable</key>\n\t<string>Squeak</string>\n\t<key>CFBundleGetInfoString</key>\n\t<string>Squeak VM 3.8.10b16  http://www.squeak.org </string>\n\t<key>CFBundleIconFile</key>\n\t<string>Squeak.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.Squeak</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>Squeak </string>\n\t<key>CGDisableCoalescedUpdates</key>\n\t<true/>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>Squeak VM 3.8.10b16</string>\n\t<key>CFBundleSignature</key>\n\t<string>FAST</string>\n\t<key>CFBundleVersion</key>\n\t<string>3.8.10b16</string>\n\t<key>NSServices</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>NSMenuItem</key>\n\t\t\t<dict>\n\t\t\t\t<key>default</key>\n\t\t\t\t<string>Squeak DoIt</string>\n\t\t\t</dict>\n\t\t\t<key>NSMessage</key>\n\t\t\t<string>doitandreturn</string>\n\t\t\t<key>NSPortName</key>\n\t\t\t<string>Squeak</string>\n\t\t\t<key>NSReturnTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>NSStringPboardType</string>\n\t\t\t</array>\n\t\t\t<key>NSSendTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>NSStringPboardType</string>\n\t\t\t</array>\n\t\t</dict>\n\t</array>\n\t<key>SqueakEncodingType</key>\n\t<string>macintosh</string>\n\t<key>SqueakFloatingWindowGetsFocus</key>\n\t<true/>\n\t<key>SqueakPluginsBuiltInOrLocalOnly</key>\n\t<false/>\n\t<key>SqueakImageName</key>\n\t<string>Squeak.image</string>\n\t<key>SqueakMaxHeapSize</key>\n\t<integer>536870912</integer>\n\t<key>SqueakUIFlushPrimaryDeferNMilliseconds</key>\n\t<integer>20</integer>\n\t<key>SqueakUIFlushSecondaryCheckForPossibleNeedEveryNMilliseconds</key>\n\t<integer>20</integer>\n\t<key>SqueakUIFlushSecondaryCleanupDelayMilliseconds</key>\n\t<integer>25</integer>\n\t<key>SqueakUIFlushUseHighPercisionClock</key>\n\t<true/>\n\t<key>SqueakWindowAttribute</key>\n\t<data>\n\tggAAHg==\n\t</data>\n\t<key>SqueakWindowHasTitle</key>\n\t<true/>\n\t<key>SqueakWindowType</key>\n\t<integer>6</integer>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Developer/Info-Squeak_VM_OPT__Upgraded_.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleDocumentTypes</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>image</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeIconFile</key>\n\t\t\t<string>SqueakImage.icns</string>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Squeak Image File</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>STim</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>sources</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeIconFile</key>\n\t\t\t<string>SqueakSources.icns</string>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Squeak Sources File</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>STso</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>changes</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeIconFile</key>\n\t\t\t<string>SqueakChanges.icns</string>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Squeak Changes File</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>STch</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>sobj</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeIconFile</key>\n\t\t\t<string>SqueakScript.icns</string>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Squeak Script File</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>SOBJ</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>pr</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeIconFile</key>\n\t\t\t<string>SqueakProject.icns</string>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Squeak Project File</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>STpr</string>\n\t\t\t</array>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>JPEG</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>JPEG</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>TEXT</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>TEXT</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>ttro</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>ttro</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>HTML</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>HTML</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>RTF </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>RTF</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>TIFF </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>TIFF</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>PICT </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>PICT</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>URL  </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>URL</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>ZIP </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>ZIP</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>zip </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>zip</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>BINA</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>BINA</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>GIFf</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>GIFf</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>PNGf</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>PNGf</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MP3 </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MP3</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MP3!</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MP3!</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MP3U</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MP3U</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MPEG</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MPEG</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>mp3!</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>mp3!</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MPG2</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MPG2</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MPG3</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MPG3</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MPG </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MPG</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Mp3</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>mp3</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>M3U</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>M3U</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>SRCS</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>SRCS</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Chng</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>Chng</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>HPS5</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>HPS5</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>bundle</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeIconFile</key>\n\t\t\t<string>SqueakPlugin.icns</string>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Squeak Plugin</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>BNDL</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t</array>\n\t<key>CFBundleExecutable</key>\n\t<string>Squeak VM Opt</string>\n\t<key>CGDisableCoalescedUpdates</key>\n\t<true/>\n\t<key>CFBundleGetInfoString</key>\n\t<string>Squeak VM 3.8.10b15 http://www.squeak.org </string>\n\t<key>CFBundleIconFile</key>\n\t<string>Squeak.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.Squeak</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>Squeak VM </string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>Squeak VM 3.8.10b15</string>\n\t<key>CFBundleSignature</key>\n\t<string>FAST</string>\n\t<key>CFBundleVersion</key>\n\t<string>3.8.10b15</string>\n\t<key>NSServices</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>NSMenuItem</key>\n\t\t\t<dict>\n\t\t\t\t<key>default</key>\n\t\t\t\t<string>Squeak DoIt</string>\n\t\t\t</dict>\n\t\t\t<key>NSMessage</key>\n\t\t\t<string>doitandreturn</string>\n\t\t\t<key>NSPortName</key>\n\t\t\t<string>Squeak</string>\n\t\t\t<key>NSReturnTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>NSStringPboardType</string>\n\t\t\t</array>\n\t\t\t<key>NSSendTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>NSStringPboardType</string>\n\t\t\t</array>\n\t\t</dict>\n\t</array>\n\t<key>SqueakEncodingType</key>\n\t<string>macintosh</string>\n\t<key>SqueakFloatingWindowGetsFocus</key>\n\t<true/>\n\t<key>SqueakPluginsBuiltInOrLocalOnly</key>\n\t<true/>\n\t<key>SqueakImageName</key>\n\t<string>Squeak.image</string>\n\t<key>SqueakMaxHeapSize</key>\n\t<integer>536870912</integer>\n\t<key>SqueakUIFlushPrimaryDeferNMilliseconds</key>\n\t<integer>20</integer>\n\t<key>SqueakUIFlushSecondaryCheckForPossibleNeedEveryNMilliseconds</key>\n\t<integer>20</integer>\n\t<key>SqueakUIFlushSecondaryCleanupDelayMilliseconds</key>\n\t<integer>25</integer>\n\t<key>SqueakUIFlushUseHighPercisionClock</key>\n\t<true/>\n\t<key>SqueakWindowAttribute</key>\n\t<data>\n\tggAAHg==\n\t</data>\n\t<key>SqueakWindowHasTitle</key>\n\t<true/>\n\t<key>SqueakWindowType</key>\n\t<integer>6</integer>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Developer/MacVMCorrectFileTypes.st",
    "content": "'From Squeak3.7beta of ''1 April 2004'' [latest update: #5954] on 5 June 2005 at 11:11:41 pm'!\rObject subclass: #MacVMCorrectFileTypes\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'VMConstruction-Building'!\r!MacVMCorrectFileTypes commentStamp: '<historical>' prior: 0!\rCorrect hfs meta data on c or h or precompiled header files, after SVN removes that data. \rThis enables earlier versions of CodeWarrior to recognise the files. \r\rentries _ MacVMCorrectFileTypes new path: 'Macintosh HD:Users:johnmci:Documents:Squeak3.8.0:os9:platforms'.!\r]style[(162 107)cred;,f2!\r\r\r!MacVMCorrectFileTypes methodsFor: 'running' stamp: 'JMM 5/23/2005 17:31'!\rcheckDirectoryAndCorrect: aDirectory\r\t| dirs files type |\r\r\taDirectory localName = '.svn' ifTrue: [^self].\r\tdirs _ aDirectory directoryNames.\r\tdirs do: [:d | self checkDirectoryAndCorrect: (aDirectory directoryNamed: d)].\r\tfiles _ aDirectory fileNames.\r\tfiles do: [:f | \r\t\t\ttype _ aDirectory getMacFileTypeAndCreator: f.\r\t\t\t(type at: 1) asLowercase = 'text' ifFalse: [self checkFileName: f inDirectory: aDirectory]]\r\r! !\r\r!MacVMCorrectFileTypes methodsFor: 'running' stamp: 'JMM 5/23/2005 17:37'!\rcheckFileName: aFileNameString inDirectory: aDirectory\r\t| tokens suffix |\r\ttokens _ aFileNameString findTokens: $.. \r\ttokens size < 2 ifTrue: [^self].\r\tsuffix _ tokens last. \r\t((suffix = 'c') | (suffix = 'h') | (suffix = 'pch')) ifTrue: [\r\t\taDirectory setMacFileNamed: aFileNameString type: 'TEXT' creator: 'R*ch'.\r\t\tTranscript show: aDirectory printString,' ',aFileNameString;cr].\r\r! !\r\r!MacVMCorrectFileTypes methodsFor: 'running' stamp: 'JMM 5/23/2005 16:55'!\rpath: aPath\r\t| dirs directory |\r\tdirectory _ FileDirectory on: aPath.\r\tdirs _ directory directoryNames.\r\tdirs do: [:d | self checkDirectoryAndCorrect: (directory directoryNamed: d)].\r! !\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Developer/MyPlugin v2.proj.xml",
    "content": "<?xml version=\"1.0\"?>\n<?codewarrior exportversion=\"1.0\" ideversion=\"4.0\"?>\n<!DOCTYPE PROJECT [\n\n<!ELEMENT PROJECT (TARGETLIST, TARGETORDER, GROUPLIST, DESIGNLIST?)>\n<!ELEMENT TARGETLIST (TARGET+)>\n<!ELEMENT TARGET (NAME, SETTINGLIST, FILELIST?, LINKORDER?, SEGMENTLIST?, OVERLAYGROUPLIST?, SUBTARGETLIST?, SUBPROJECTLIST?)>\n<!ELEMENT NAME (#PCDATA)>\n<!ELEMENT USERSOURCETREETYPE (#PCDATA)>\n<!ELEMENT PATH (#PCDATA)>\n<!ELEMENT FILELIST (FILE*)>\n<!ELEMENT FILE (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?, ROOTFILEREF?, FILEKIND?, FILEFLAGS?)>\n<!ELEMENT PATHTYPE (#PCDATA)>\n<!ELEMENT PATHROOT (#PCDATA)>\n<!ELEMENT ACCESSPATH (#PCDATA)>\n<!ELEMENT PATHFORMAT (#PCDATA)>\n<!ELEMENT ROOTFILEREF (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)>\n<!ELEMENT FILEKIND (#PCDATA)>\n<!ELEMENT FILEFLAGS (#PCDATA)>\n<!ELEMENT FILEREF (TARGETNAME?, PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)>\n<!ELEMENT TARGETNAME (#PCDATA)>\n<!ELEMENT SETTINGLIST ((SETTING|PANELDATA)+)>\n<!ELEMENT SETTING (NAME?, (VALUE|(SETTING+)))>\n<!ELEMENT PANELDATA (NAME, VALUE)>\n<!ELEMENT VALUE (#PCDATA)>\n<!ELEMENT LINKORDER (FILEREF*)>\n<!ELEMENT SEGMENTLIST (SEGMENT+)>\n<!ELEMENT SEGMENT (NAME, ATTRIBUTES?, FILEREF*)>\n<!ELEMENT ATTRIBUTES (#PCDATA)>\n<!ELEMENT OVERLAYGROUPLIST (OVERLAYGROUP+)>\n<!ELEMENT OVERLAYGROUP (NAME, BASEADDRESS, OVERLAY*)>\n<!ELEMENT BASEADDRESS (#PCDATA)>\n<!ELEMENT OVERLAY (NAME, FILEREF*)>\n<!ELEMENT SUBTARGETLIST (SUBTARGET+)>\n<!ELEMENT SUBTARGET (TARGETNAME, ATTRIBUTES?)>\n<!ELEMENT SUBPROJECTLIST (SUBPROJECT+)>\n<!ELEMENT SUBPROJECT (FILEREF, SUBPROJECTTARGETLIST)>\n<!ELEMENT SUBPROJECTTARGETLIST (SUBPROJECTTARGET*)>\n<!ELEMENT SUBPROJECTTARGET (TARGETNAME, ATTRIBUTES?)>\n<!ELEMENT TARGETORDER (ORDEREDTARGET|ORDEREDDESIGN)*>\n<!ELEMENT ORDEREDTARGET (NAME)>\n<!ELEMENT ORDEREDDESIGN (NAME, ORDEREDTARGET+)>\n<!ELEMENT GROUPLIST (GROUP|FILEREF)*>\n<!ELEMENT GROUP (NAME, (GROUP|FILEREF)*)>\n<!ELEMENT DESIGNLIST (DESIGN+)>\n<!ELEMENT DESIGN (NAME, DESIGNDATA)>\n<!ELEMENT DESIGNDATA (#PCDATA)>\n]>\n<PROJECT>\n    <TARGETLIST>\n        <TARGET>\n            <NAME>MyPlugin</NAME>\n            <SETTINGLIST>\n\n                <!-- Settings for \"Source Trees\" panel -->\n                <SETTING><NAME>UserSourceTrees</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"Custom Keywords\" panel -->\n                <SETTING><NAME>CustomColor1</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor2</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor3</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor4</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Access Paths\" panel -->\n                <SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>UserSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n                <SETTING><NAME>SystemSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MacOS Support:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MSL:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Target Settings\" panel -->\n                <SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING>\n                <SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>Targetname</NAME><VALUE>MyPlugin</VALUE></SETTING>\n                <SETTING><NAME>OutputDirectory</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>SaveEntriesUsingRelativePaths</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"File Mappings\" panel -->\n                <SETTING><NAME>FileMappings</NAME>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>APPL</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>Appl</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MMLB</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MPLF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MWCD</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>RSRC</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.bh</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Balloon Help</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cpp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.exp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.fr</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>ODFRC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.h</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.idl</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>SOMobjects TS</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.p</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pas</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.r</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Rez</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.s</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PPCAsm</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>XCOF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>docu</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>rsrc</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>shlb</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>stub</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.doc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Build Extras\" panel -->\n                <SETTING><NAME>CacheModDates</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>ActivateBrowser</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>DumpBrowserInfo</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>CacheSubprojects</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>UseThirdPartyDebugger</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>DebuggerCommandLine</NAME><VALUE></VALUE></SETTING>\n                <PANELDATA><NAME>Debugger Runtime</NAME><VALUE>\n                    0002000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    00000000000000000000000000000000\n                </VALUE></PANELDATA>\n\n                <!-- Settings for \"Debugger Target\" panel -->\n                <SETTING><NAME>LogSystemMessages</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>AutoTargetDLLs</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>StopAtWatchpoints</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>PauseWhileRunning</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>PauseInterval</NAME><VALUE>5</VALUE></SETTING>\n                <SETTING><NAME>PauseUIFlags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>AltExePath</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>StopAtTempBPOnLaunch</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>CacheSymbolics</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>TempBPFunctionName</NAME><VALUE>main</VALUE></SETTING>\n                <SETTING><NAME>TempBPType</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"68K CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_68K_codesize</NAME><VALUE>Smart</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_structalignment</NAME><VALUE>MC68K</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fp_mode</NAME><VALUE>SANE</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_code68020</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_mpwc</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fourbyteints</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_IEEEdoubles</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fardata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farvtables</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_pcrelstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_macsbug</NAME><VALUE>New</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_a6frames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"68K Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_68K_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_mix</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"68K Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_68K_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_68K_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"68K Linker\" panel -->\n                <SETTING><NAME>MWLinker_68K_linksym</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_symfullpath</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_linksingle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_fastlink</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_generateMap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_glueintosegone</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"68K Project\" panel -->\n                <SETTING><NAME>MWProject_68K_type</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_outfile</NAME><VALUE>Mac OS PPC C/C++</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filecreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filetype</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_size</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_flags</NAME><VALUE>22656</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcheader</NAME><VALUE>Standard</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmulti</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_a4</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_minsize</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcsegtype</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_cfm68kcodegen</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_thedebugger</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrc_custom</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_rseg_app</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_pilot_lib</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_pilot_main_entry</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Compiler\" panel -->\n                <SETTING><NAME>MWFrontEnd_C_cplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_checkprotos</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_arm</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_trigraphs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_onlystdkeywords</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enumsalwaysint</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwpointerstyle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_prefixname</NAME><VALUE>myMacHeadersPPC</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ansistrict</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwcnewline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_wchar_type</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enableexceptions</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontreusestrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_poolstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_useRTTI</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_multibyteaware</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_unsignedchars</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_autoinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_booltruefalse</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_direct_to_som</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_som_env_check</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_alwaysinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_inlinelevel</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ecplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_objective_c</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_defer_codegen</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Warnings\" panel -->\n                <SETTING><NAME>MWWarning_C_warn_illpragma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_emptydecl</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_possunwant</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedvar</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedarg</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_extracomma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_pedantic</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warningerrors</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_hidevirtual</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_implicitconv</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_notinlined</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_structclass</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"CFM68K\" panel -->\n                <SETTING><NAME>MWCFM68K_exports</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_farthreshold</NAME><VALUE>256</VALUE></SETTING>\n                <SETTING><NAME>PCFM68K_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_mainname</NAME><VALUE>__start</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_termname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_alignment</NAME><VALUE>Align_2</VALUE></SETTING>\n\n                <!-- Settings for \"MacOS Merge Panel\" panel -->\n                <SETTING><NAME>MWMerge_MacOS_projectType</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputName</NAME><VALUE>Merge Out</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputCreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputType</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_suppressWarning</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyFragments</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_skipResources</NAME>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE>\u0011s0</VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"PPC CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_PPC_structalignment</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tracebacktables</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processor</NAME><VALUE>P603</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_readonlystrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_fpcontract</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_schedule</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_peephole</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processorspecific</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_altivec</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vectortocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vrsave</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_PPC_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_extended</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_mix</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_PPC_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_PPC_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Linker\" panel -->\n                <SETTING><NAME>MWLinker_PPC_linksym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_symfullpath</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_permitmultdefs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmode</NAME><VALUE>Normal</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_mainname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_termname</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"PPC PEF\" panel -->\n                <SETTING><NAME>MWPEF_exports</NAME><VALUE>Pragma</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sortcode</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_expandbss</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWPEF_collapsereloads</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Project\" panel -->\n                <SETTING><NAME>MWProject_PPC_type</NAME><VALUE>SharedLibrary</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>MyPlugin</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>1178686292</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>1936223330</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_size</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_minsize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_flags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcheader</NAME><VALUE>Native</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"PPCAsm Panel\" panel -->\n                <SETTING><NAME>MWAssembler_PPC_auxheader</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_symmode</NAME><VALUE>Mac</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_dialect</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_prefixfile</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_typecheck</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_warnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_casesensitive</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"Rez Compiler\" panel -->\n                <SETTING><NAME>MWRez_Language_maxwidth</NAME><VALUE>80</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_script</NAME><VALUE>Roman</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_alignment</NAME><VALUE>Align1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filtermode</NAME><VALUE>FilterSkip</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_suppresswarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_escapecontrolchars</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_prefixname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filteredtypes</NAME><VALUE>'CODE' 'DATA' 'PICT'</VALUE></SETTING>\n            </SETTINGLIST>\n            <FILELIST>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MyPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InterfaceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MathLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MyPlugin68K</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>MergeLibrary</FILEFLAGS>\n                </FILE>\n            </FILELIST>\n            <LINKORDER>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MyPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InterfaceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MathLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MyPlugin68K</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n            </LINKORDER>\n        </TARGET>\n    </TARGETLIST>\n\n    <TARGETORDER>\n        <ORDEREDTARGET><NAME>MyPlugin</NAME></ORDEREDTARGET>\n    </TARGETORDER>\n\n    <GROUPLIST>\n        <GROUP><NAME>Group 1</NAME>\n            <FILEREF>\n                <TARGETNAME>MyPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MyPlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>MyPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MSL C.PPC.Lib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>MyPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MSL RuntimePPC.Lib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>MyPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>InterfaceLib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>MyPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MathLib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n        </GROUP>\n        <GROUP><NAME>Group 2</NAME>\n            <FILEREF>\n                <TARGETNAME>MyPlugin</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MyPlugin68K</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n        </GROUP>\n    </GROUPLIST>\n\n</PROJECT>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Developer/MyPlugin68K v2.proj.xml",
    "content": "<?xml version=\"1.0\"?>\n<?codewarrior exportversion=\"1.0\" ideversion=\"4.0\"?>\n<!DOCTYPE PROJECT [\n\n<!ELEMENT PROJECT (TARGETLIST, TARGETORDER, GROUPLIST, DESIGNLIST?)>\n<!ELEMENT TARGETLIST (TARGET+)>\n<!ELEMENT TARGET (NAME, SETTINGLIST, FILELIST?, LINKORDER?, SEGMENTLIST?, OVERLAYGROUPLIST?, SUBTARGETLIST?, SUBPROJECTLIST?)>\n<!ELEMENT NAME (#PCDATA)>\n<!ELEMENT USERSOURCETREETYPE (#PCDATA)>\n<!ELEMENT PATH (#PCDATA)>\n<!ELEMENT FILELIST (FILE*)>\n<!ELEMENT FILE (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?, ROOTFILEREF?, FILEKIND?, FILEFLAGS?)>\n<!ELEMENT PATHTYPE (#PCDATA)>\n<!ELEMENT PATHROOT (#PCDATA)>\n<!ELEMENT ACCESSPATH (#PCDATA)>\n<!ELEMENT PATHFORMAT (#PCDATA)>\n<!ELEMENT ROOTFILEREF (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)>\n<!ELEMENT FILEKIND (#PCDATA)>\n<!ELEMENT FILEFLAGS (#PCDATA)>\n<!ELEMENT FILEREF (TARGETNAME?, PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)>\n<!ELEMENT TARGETNAME (#PCDATA)>\n<!ELEMENT SETTINGLIST ((SETTING|PANELDATA)+)>\n<!ELEMENT SETTING (NAME?, (VALUE|(SETTING+)))>\n<!ELEMENT PANELDATA (NAME, VALUE)>\n<!ELEMENT VALUE (#PCDATA)>\n<!ELEMENT LINKORDER (FILEREF*)>\n<!ELEMENT SEGMENTLIST (SEGMENT+)>\n<!ELEMENT SEGMENT (NAME, ATTRIBUTES?, FILEREF*)>\n<!ELEMENT ATTRIBUTES (#PCDATA)>\n<!ELEMENT OVERLAYGROUPLIST (OVERLAYGROUP+)>\n<!ELEMENT OVERLAYGROUP (NAME, BASEADDRESS, OVERLAY*)>\n<!ELEMENT BASEADDRESS (#PCDATA)>\n<!ELEMENT OVERLAY (NAME, FILEREF*)>\n<!ELEMENT SUBTARGETLIST (SUBTARGET+)>\n<!ELEMENT SUBTARGET (TARGETNAME, ATTRIBUTES?)>\n<!ELEMENT SUBPROJECTLIST (SUBPROJECT+)>\n<!ELEMENT SUBPROJECT (FILEREF, SUBPROJECTTARGETLIST)>\n<!ELEMENT SUBPROJECTTARGETLIST (SUBPROJECTTARGET*)>\n<!ELEMENT SUBPROJECTTARGET (TARGETNAME, ATTRIBUTES?)>\n<!ELEMENT TARGETORDER (ORDEREDTARGET|ORDEREDDESIGN)*>\n<!ELEMENT ORDEREDTARGET (NAME)>\n<!ELEMENT ORDEREDDESIGN (NAME, ORDEREDTARGET+)>\n<!ELEMENT GROUPLIST (GROUP|FILEREF)*>\n<!ELEMENT GROUP (NAME, (GROUP|FILEREF)*)>\n<!ELEMENT DESIGNLIST (DESIGN+)>\n<!ELEMENT DESIGN (NAME, DESIGNDATA)>\n<!ELEMENT DESIGNDATA (#PCDATA)>\n]>\n<PROJECT>\n    <TARGETLIST>\n        <TARGET>\n            <NAME>MyPlugin68K</NAME>\n            <SETTINGLIST>\n\n                <!-- Settings for \"Source Trees\" panel -->\n                <SETTING><NAME>UserSourceTrees</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"Custom Keywords\" panel -->\n                <SETTING><NAME>CustomColor1</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor2</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor3</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor4</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Access Paths\" panel -->\n                <SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>UserSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n                <SETTING><NAME>SystemSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MacOS Support:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MSL:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Target Settings\" panel -->\n                <SETTING><NAME>Linker</NAME><VALUE>MacOS 68K Linker</VALUE></SETTING>\n                <SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>Targetname</NAME><VALUE>MyPlugin68K</VALUE></SETTING>\n                <SETTING><NAME>OutputDirectory</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>SaveEntriesUsingRelativePaths</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"File Mappings\" panel -->\n                <SETTING><NAME>FileMappings</NAME>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>APPL</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>Appl</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MMLB</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import 68K</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MPLF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import 68K</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MWCD</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>OBJ </VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MPW Import 68K</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>RSRC</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.bh</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Balloon Help</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ 68K</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ 68K</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ 68K</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ 68K</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cpp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ 68K</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.exp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.fr</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>ODFRC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.h</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ 68K</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.idl</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>SOMobjects TS</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.p</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal 68K</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pas</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal 68K</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ 68K</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ 68K</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.r</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Rez</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.seg</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>docu</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>rsrc</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>shlb</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import 68K</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>stub</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import 68K</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.doc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Build Extras\" panel -->\n                <SETTING><NAME>CacheModDates</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>ActivateBrowser</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>DumpBrowserInfo</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>CacheSubprojects</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>UseThirdPartyDebugger</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>DebuggerCommandLine</NAME><VALUE></VALUE></SETTING>\n                <PANELDATA><NAME>Debugger Runtime</NAME><VALUE>\n                    0002000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    00000000000000000000000000000000\n                </VALUE></PANELDATA>\n\n                <!-- Settings for \"Debugger Target\" panel -->\n                <SETTING><NAME>LogSystemMessages</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>AutoTargetDLLs</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>StopAtWatchpoints</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>PauseWhileRunning</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>PauseInterval</NAME><VALUE>5</VALUE></SETTING>\n                <SETTING><NAME>PauseUIFlags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>AltExePath</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>StopAtTempBPOnLaunch</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>CacheSymbolics</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>TempBPFunctionName</NAME><VALUE>main</VALUE></SETTING>\n                <SETTING><NAME>TempBPType</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"68K CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_68K_codesize</NAME><VALUE>Large</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_structalignment</NAME><VALUE>MC68K4Byte</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fp_mode</NAME><VALUE>SANE</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_code68020</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_mpwc</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fourbyteints</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_IEEEdoubles</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fardata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farvtables</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farstrings</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_pcrelstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_macsbug</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_a6frames</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"68K Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_68K_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_mix</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"68K Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_68K_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_68K_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"68K Linker\" panel -->\n                <SETTING><NAME>MWLinker_68K_linksym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_symfullpath</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_linksingle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_fastlink</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_generateMap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_glueintosegone</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"68K Project\" panel -->\n                <SETTING><NAME>MWProject_68K_type</NAME><VALUE>SharedLibrary</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_outfile</NAME><VALUE>MyPlugin68K</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filecreator</NAME><VALUE>1178686292</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filetype</NAME><VALUE>1936223330</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_size</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_flags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcheader</NAME><VALUE>Standard</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmulti</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_a4</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_minsize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcsegtype</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_cfm68kcodegen</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_thedebugger</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrc_custom</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_rseg_app</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_pilot_lib</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_pilot_main_entry</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Compiler\" panel -->\n                <SETTING><NAME>MWFrontEnd_C_cplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_checkprotos</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_arm</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_trigraphs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_onlystdkeywords</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enumsalwaysint</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwpointerstyle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_prefixname</NAME><VALUE>myMacHeadersCFM68K</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ansistrict</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwcnewline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_wchar_type</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enableexceptions</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontreusestrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_poolstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_useRTTI</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_multibyteaware</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_unsignedchars</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_autoinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_booltruefalse</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_direct_to_som</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_som_env_check</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_alwaysinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_inlinelevel</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ecplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_objective_c</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_defer_codegen</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Warnings\" panel -->\n                <SETTING><NAME>MWWarning_C_warn_illpragma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_emptydecl</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_possunwant</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedvar</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedarg</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_extracomma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_pedantic</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warningerrors</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_hidevirtual</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_implicitconv</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_notinlined</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_structclass</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"CFM68K\" panel -->\n                <SETTING><NAME>MWCFM68K_exports</NAME><VALUE>Pragma</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_farthreshold</NAME><VALUE>256</VALUE></SETTING>\n                <SETTING><NAME>PCFM68K_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_fragmentname</NAME><VALUE>MyPlugin</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_mainname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_termname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_alignment</NAME><VALUE>Align_4</VALUE></SETTING>\n\n                <!-- Settings for \"MacOS Merge Panel\" panel -->\n                <SETTING><NAME>MWMerge_MacOS_projectType</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputName</NAME><VALUE>Merge Out</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputCreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputType</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_suppressWarning</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyFragments</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_skipResources</NAME>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE>\u0011s0</VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"PPC CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_PPC_structalignment</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tracebacktables</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processor</NAME><VALUE>P603</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_readonlystrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_fpcontract</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_schedule</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_peephole</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processorspecific</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_altivec</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vectortocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vrsave</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_PPC_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_extended</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_mix</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_PPC_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_PPC_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Linker\" panel -->\n                <SETTING><NAME>MWLinker_PPC_linksym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_symfullpath</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_permitmultdefs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmode</NAME><VALUE>Normal</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_mainname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_termname</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"PPC PEF\" panel -->\n                <SETTING><NAME>MWPEF_exports</NAME><VALUE>Pragma</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sortcode</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_expandbss</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_fragmentname</NAME><VALUE>SoundCodecPrims</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_collapsereloads</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Project\" panel -->\n                <SETTING><NAME>MWProject_PPC_type</NAME><VALUE>SharedLibrary</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>SoundCodecPrims</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>1178686292</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>1936223330</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_size</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_minsize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_flags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcheader</NAME><VALUE>Native</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"PPCAsm Panel\" panel -->\n                <SETTING><NAME>MWAssembler_PPC_auxheader</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_symmode</NAME><VALUE>Mac</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_dialect</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_prefixfile</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_typecheck</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_warnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_casesensitive</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"Rez Compiler\" panel -->\n                <SETTING><NAME>MWRez_Language_maxwidth</NAME><VALUE>80</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_script</NAME><VALUE>Roman</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_alignment</NAME><VALUE>Align1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filtermode</NAME><VALUE>FilterSkip</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_suppresswarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_escapecontrolchars</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_prefixname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filteredtypes</NAME><VALUE>'CODE' 'DATA' 'PICT'</VALUE></SETTING>\n            </SETTINGLIST>\n            <FILELIST>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MyPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InterfaceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.CFM68K Fa(4i_8d).Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MathLibCFM68K (4i_8d).Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL MWCFM68KRuntime.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n            </FILELIST>\n            <SEGMENTLIST>\n                <SEGMENT>\n                    <NAME>Group 1</NAME>\n                    <ATTRIBUTES>Protected, Purgeable</ATTRIBUTES>\n                    <FILEREF>\n                        <PATHTYPE>Name</PATHTYPE>\n                        <PATH>MyPlugin.c</PATH>\n                        <PATHFORMAT>MacOS</PATHFORMAT>\n                    </FILEREF>\n                    <FILEREF>\n                        <PATHTYPE>Name</PATHTYPE>\n                        <PATH>InterfaceLib</PATH>\n                        <PATHFORMAT>MacOS</PATHFORMAT>\n                    </FILEREF>\n                    <FILEREF>\n                        <PATHTYPE>Name</PATHTYPE>\n                        <PATH>MSL C.CFM68K Fa(4i_8d).Lib</PATH>\n                        <PATHFORMAT>MacOS</PATHFORMAT>\n                    </FILEREF>\n                    <FILEREF>\n                        <PATHTYPE>Name</PATHTYPE>\n                        <PATH>MathLibCFM68K (4i_8d).Lib</PATH>\n                        <PATHFORMAT>MacOS</PATHFORMAT>\n                    </FILEREF>\n                    <FILEREF>\n                        <PATHTYPE>Name</PATHTYPE>\n                        <PATH>MSL MWCFM68KRuntime.Lib</PATH>\n                        <PATHFORMAT>MacOS</PATHFORMAT>\n                    </FILEREF>\n                </SEGMENT>\n            </SEGMENTLIST>\n        </TARGET>\n    </TARGETLIST>\n\n    <TARGETORDER>\n        <ORDEREDTARGET><NAME>MyPlugin68K</NAME></ORDEREDTARGET>\n    </TARGETORDER>\n\n    <GROUPLIST>\n        <GROUP><NAME>Source</NAME>\n            <FILEREF>\n                <TARGETNAME>MyPlugin68K</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MyPlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n        </GROUP>\n        <GROUP><NAME>Libraries</NAME>\n            <FILEREF>\n                <TARGETNAME>MyPlugin68K</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MSL C.CFM68K Fa(4i_8d).Lib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>MyPlugin68K</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MathLibCFM68K (4i_8d).Lib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>MyPlugin68K</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MSL MWCFM68KRuntime.Lib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>MyPlugin68K</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>InterfaceLib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n        </GROUP>\n    </GROUPLIST>\n\n</PROJECT>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Developer/NPSqueakStub.c",
    "content": "// Stub to call mach-o plugin for better project builder debugging.\n// By John M McIntosh Jan 2003. (johnmci@smalltalkconsulting.com)\n// Released under the Squeak-L license \n//  http://www.squeak.org/download/license.html\n// V1.0 January 2003.\n// V 1.1 Sept 2003 Add looking in user/local/network/system domains\n\n#include \"npapi.h\"\n#include \"npupp.h\"\n\n#define EnterCodeResource() \n#define ExitCodeResource() \n#define __destroy_global_chain()\n#define __InitCode__()\nint printOnOSXPascal(unsigned char * string);\nint printOnOSX(char * string);\nint printOnOSXNumber(int number);\nint printOnOSXPascal(unsigned char * string);\nint printOnOSXFormat(char * string,char *format);\nOSStatus LoadFrameworkBundle(CFStringRef framework, CFBundleRef *bundlePtr);\nCFragConnectionID LoadLibViaPath(char *libName);\nCFragConnectionID LoadLibViaPathInDomain(char *libName, SInt16 domain);\nint \tioFindExternalFunctionIn(char *lookupName, int moduleHandle);\nint ioFreeModule(int moduleHandle);\nNPError \tPrivate_Initialize(void);\nvoid \t\tPrivate_Shutdown(void);\nNPError\t\tPrivate_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved);\nNPError \tPrivate_Destroy(NPP instance, NPSavedData** save);\nNPError\t\tPrivate_SetWindow(NPP instance, NPWindow* window);\nNPError\t\tPrivate_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype);\nNPError\t\tPrivate_DestroyStream(NPP instance, NPStream* stream, NPError reason);\nint32\t\tPrivate_WriteReady(NPP instance, NPStream* stream);\nint32\t\tPrivate_Write(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer);\nvoid\t\tPrivate_StreamAsFile(NPP instance, NPStream* stream, const char* fname);\nvoid\t\tPrivate_Print(NPP instance, NPPrint* platformPrint);\nint16 \t\tPrivate_HandleEvent(NPP instance, void* event);\nvoid        Private_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData);\njref\t\tPrivate_GetJavaClass(void);\n\n\ntypedef short (*GetMainPtr)(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, NPP_ShutdownUPP* unloadUpp); // Mach-O function\nGetMainPtr GetMain = NULL;\n\ntypedef NPError (*GetPrivate_InitializePtr)(); // Mach-O function\nGetPrivate_InitializePtr GetPrivate_Initialize = NULL;\n\ntypedef void (*GetPrivate_ShutdownPtr)(); // Mach-O function\nGetPrivate_ShutdownPtr GetPrivate_Shutdown = NULL;\n\ntypedef NPError (*GetPrivate_NewPtr)(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved); // Mach-O function\nGetPrivate_NewPtr GetPrivate_New = NULL;\n\ntypedef NPError (*GetPrivate_DestroyPtr)(NPP instance, NPSavedData** save); // Mach-O function\nGetPrivate_DestroyPtr GetPrivate_Destroy = NULL;\n\ntypedef NPError (*GetPrivate_SetWindowPtr)(NPP instance, NPWindow* window); // Mach-O function\nGetPrivate_SetWindowPtr GetPrivate_SetWindow = NULL;\n\ntypedef NPError (*GetPrivate_NewStreamPtr)(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype); // Mach-O function\nGetPrivate_NewStreamPtr GetPrivate_NewStream = NULL;\n\ntypedef int32 (*GetPrivate_WriteReadyPtr)(NPP instance, NPStream* stream); // Mach-O function\nGetPrivate_WriteReadyPtr GetPrivate_WriteReady = NULL;\n\ntypedef int32 (*GetPrivate_WritePtr)(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer); // Mach-O function\nGetPrivate_WritePtr GetPrivate_Write = NULL;\n\ntypedef void (*GetPrivate_StreamAsFilePtr)(NPP instance, NPStream* stream, const char* fname); // Mach-O function\nGetPrivate_StreamAsFilePtr GetPrivate_StreamAsFile = NULL;\n\ntypedef NPError (*GetPrivate_DestroyStreamPtr)(NPP instance, NPStream* stream, NPError reason); // Mach-O function\nGetPrivate_DestroyStreamPtr GetPrivate_DestroyStream = NULL;\n\ntypedef int16 (*GetPrivate_HandleEventPtr)(NPP instance, void* event); // Mach-O function\nGetPrivate_HandleEventPtr GetPrivate_HandleEvent = NULL;\n\ntypedef void (*GetPrivate_PrintPtr)(NPP instance, NPPrint* platformPrint); // Mach-O function\nGetPrivate_PrintPtr GetPrivate_Print = NULL;\n\ntypedef void (*GetPrivate_URLNotifyPtr)(NPP instance, const char* url, NPReason reason, void* notifyData); // Mach-O function\nGetPrivate_URLNotifyPtr GetPrivate_URLNotify = NULL;\n\ntypedef jref (*GetPrivate_GetJavaClassPtr)(void); // Mach-O function\nGetPrivate_GetJavaClassPtr GetPrivate_GetJavaClass = NULL;\n\nstatic CFragConnectionID gWhere;\n\nNPNetscapeFuncs gRememberOldgNetscapeFuncsForSafariIssue;\nNPPluginFuncs gDummyPluginFuncsForSafariIssue;\nNPP_ShutdownUPP gDummyUnloadUppForSafariIssue;\n\nint main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, NPP_ShutdownUPP* unloadUpp)\n{\n\tint err=noErr;\n\tint navMinorVers = nsTable->version & 0xFF;\n\t\n\tgRememberOldgNetscapeFuncsForSafariIssue = *nsTable;\n\t\n\tgWhere = LoadLibViaPath(\"NPSqueak.bundle\");\n\tif (gWhere == nil)\n\t\treturn -1;\n\t\t\n\tGetMain = (void *) ioFindExternalFunctionIn(\"npmain\",(int) gWhere);\n\tif (GetMain == NULL) \n\t\tGetMain = (void *) ioFindExternalFunctionIn(\"main\",(int) gWhere);\n\terr = GetMain(nsTable, pluginFuncs, unloadUpp);\n\t\n\t//\n\t// Set up the plugin function table that Netscape will use to\n\t// call us.  Netscape needs to know about our version and size\n\t// and have a UniversalProcPointer for every function we implement.\n\t//\n\n\tpluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR;\n\tpluginFuncs->size = sizeof(NPPluginFuncs);\n\tpluginFuncs->newp = NewNPP_NewProc(Private_New);\n\tpluginFuncs->destroy = NewNPP_DestroyProc(Private_Destroy);\n\tpluginFuncs->setwindow = NewNPP_SetWindowProc(Private_SetWindow);\n\tpluginFuncs->newstream = NewNPP_NewStreamProc(Private_NewStream);\n\tpluginFuncs->destroystream = NewNPP_DestroyStreamProc(Private_DestroyStream);\n\tpluginFuncs->asfile = NewNPP_StreamAsFileProc(Private_StreamAsFile);\n\tpluginFuncs->writeready = NewNPP_WriteReadyProc(Private_WriteReady);\n\tpluginFuncs->write = NewNPP_WriteProc(Private_Write);\n\tpluginFuncs->print = NewNPP_PrintProc(Private_Print);\n\tpluginFuncs->event = NewNPP_HandleEventProc(Private_HandleEvent);\t\n\tif( navMinorVers >= NPVERS_HAS_NOTIFICATION )\n\t{\t\n\t\tpluginFuncs->urlnotify = NewNPP_URLNotifyProc(Private_URLNotify);\t\t\t\n\t}\n\tif( navMinorVers >= NPVERS_HAS_LIVECONNECT )\n\t{\n\t\tpluginFuncs->javaClass\t= (JRIGlobalRef) Private_GetJavaClass();\n\t}\n\t*unloadUpp = NewNPP_ShutdownProc(Private_Shutdown);\n\n\treturn err;\n}\n\nNPError Private_Initialize(void)\n{\n\tNPError err;\n\tif (GetPrivate_Initialize == NULL) \n\t\tGetPrivate_Initialize = (void *) ioFindExternalFunctionIn(\"Private_Initialize\",(int) gWhere);\n\terr = GetPrivate_Initialize();\n\treturn err;\n}\n\nvoid Private_Shutdown(void)\n{\n\tif (gWhere == NULL) \n\t\treturn;\n\tif (GetPrivate_Shutdown == NULL) \n\t\tGetPrivate_Shutdown = (void *) ioFindExternalFunctionIn(\"Private_Shutdown\",(int) gWhere);\n\tif (GetPrivate_Shutdown == NULL) \n\t\treturn;\n\tGetPrivate_Shutdown();\n\tioFreeModule((int) gWhere);\n\tgWhere = 0;\n\tGetPrivate_Initialize = 0;\n\tGetPrivate_Shutdown = 0;\n\tGetPrivate_New = 0;\n\tGetPrivate_Destroy= 0;\n\tGetPrivate_SetWindow= 0;\n\tGetPrivate_NewStream= 0;\n\tGetPrivate_WriteReady= 0;\n\tGetPrivate_Write = 0;\n \tGetPrivate_StreamAsFile = 0;\n\tGetPrivate_DestroyStream = 0;\n\tGetPrivate_HandleEvent = 0;\n \tGetPrivate_Print = 0;\n \tGetPrivate_URLNotify = 0;\n\tGetPrivate_GetJavaClass = 0;\n}\n\n\nNPError\tPrivate_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved)\n{\n\tNPError err;\n\n\tif (gWhere == nil) {\n\t\t\n\t\tgWhere = LoadLibViaPath(\"NPSqueak.bundle\");\n\t\tif (gWhere == nil) \n\t\t\treturn -1;\n\t\tGetMain = (void *) ioFindExternalFunctionIn(\"npmain\",(int) gWhere);\n\t\tif (GetMain == NULL) \n\t\t\tGetMain = (void *) ioFindExternalFunctionIn(\"main\",(int) gWhere);\n\t\terr = GetMain(&gRememberOldgNetscapeFuncsForSafariIssue, &gDummyPluginFuncsForSafariIssue, &gDummyUnloadUppForSafariIssue);\n\t}\n\n\tif (GetPrivate_New == NULL) \n\t\tGetPrivate_New = (void *) ioFindExternalFunctionIn(\"Private_New\",(int) gWhere);\n\tif (GetPrivate_New != NULL) \n\t\terr = GetPrivate_New( pluginType,  instance,  mode,  argc, argn,  argv,  saved);\n\treturn err;\n}\n\nNPError Private_Destroy(NPP instance, NPSavedData** save)\n{\n\tNPError err;\n\tif (GetPrivate_Destroy == NULL) \n\t\tGetPrivate_Destroy = (void *) ioFindExternalFunctionIn(\"Private_Destroy\",(int) gWhere);\n\tif (GetPrivate_Destroy != NULL) \n\t\terr = GetPrivate_Destroy( instance, save);\n\tPrivate_Shutdown();\n\treturn NPERR_NO_ERROR;\n}\nNPError Private_SetWindow(NPP instance, NPWindow* window)\n{\n\tNPError err;\n\tif (GetPrivate_SetWindow == NULL) \n\t\tGetPrivate_SetWindow = (void *) ioFindExternalFunctionIn(\"Private_SetWindow\",(int) gWhere);\n\tif (GetPrivate_SetWindow != NULL) \n\t\terr = GetPrivate_SetWindow( instance,  window);\n\treturn err;\n}\n\nNPError Private_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype)\n{\n\tNPError err;\n\tif (GetPrivate_NewStream == NULL) \n\t\tGetPrivate_NewStream = (void *) ioFindExternalFunctionIn(\"Private_NewStream\",(int) gWhere);\n\tif (GetPrivate_NewStream != NULL) \n\t\terr = GetPrivate_NewStream( instance,  type,  stream,  seekable,  stype);\n\treturn err;\n}\n\nint32 Private_WriteReady(NPP instance, NPStream* stream)\n{\n\tint32 length;\n\tif (GetPrivate_WriteReady == NULL) \n\t\tGetPrivate_WriteReady = (void *) ioFindExternalFunctionIn(\"Private_WriteReady\",(int) gWhere);\n\tif (GetPrivate_WriteReady != NULL) \n\t\tlength = GetPrivate_WriteReady( instance, stream);\n\treturn length;\n}\n\nint32 Private_Write(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer)\n{\n\tint32 length;\n\tif (GetPrivate_Write == NULL) \n\t\tGetPrivate_Write = (void *) ioFindExternalFunctionIn(\"Private_Write\",(int) gWhere);\n\tif (GetPrivate_Write != NULL) \n\t\tlength = GetPrivate_Write( instance,  stream,  offset,  len,  buffer);\n\treturn length;\n}\n\nvoid Private_StreamAsFile(NPP instance, NPStream* stream, const char* fname)\n{\n\tif (GetPrivate_StreamAsFile == NULL) \n\t\tGetPrivate_StreamAsFile = (void *) ioFindExternalFunctionIn(\"Private_StreamAsFile\",(int) gWhere);\n\tif (GetPrivate_StreamAsFile != NULL) \n\t\tGetPrivate_StreamAsFile( instance,  stream, fname);\n}\n\n\nNPError Private_DestroyStream(NPP instance, NPStream* stream, NPError reason)\n{\n\tNPError err;\n\tif (GetPrivate_DestroyStream == NULL) \n\t\tGetPrivate_DestroyStream = (void *) ioFindExternalFunctionIn(\"Private_DestroyStream\",(int) gWhere);\n\tif (GetPrivate_DestroyStream != NULL) \n\t\terr = GetPrivate_DestroyStream( instance,  stream,  reason);\n\treturn err;\n}\n\nint16 Private_HandleEvent(NPP instance, void* event)\n{\n\tint16 err;\n\tif (GetPrivate_HandleEvent == NULL) \n\t\tGetPrivate_HandleEvent = (void *) ioFindExternalFunctionIn(\"Private_HandleEvent\",(int) gWhere);\n\tif (GetPrivate_HandleEvent != NULL) \n\t\terr = GetPrivate_HandleEvent( instance,  event);\n\treturn err;\n}\n\nvoid Private_Print(NPP instance, NPPrint* platformPrint)\n{\n\tif (GetPrivate_Print == NULL) \n\t\tGetPrivate_Print = (void *) ioFindExternalFunctionIn(\"Private_Print\",(int) gWhere);\n\tif (GetPrivate_Print != NULL) \n\t\tGetPrivate_Print( instance,  platformPrint);\n}\n\nvoid Private_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData)\n{\n\tif (GetPrivate_URLNotify == NULL) \n\t\tGetPrivate_URLNotify = (void *) ioFindExternalFunctionIn(\"Private_URLNotify\",(int) gWhere);\n\tif (GetPrivate_URLNotify != NULL) \n\t\tGetPrivate_URLNotify( instance, url,  reason,  notifyData);\n}\n\njref Private_GetJavaClass(void)\n{\n\tif (GetPrivate_GetJavaClass == NULL) \n\t\tGetPrivate_GetJavaClass = (void *) ioFindExternalFunctionIn(\"Private_GetJavaClass\",(int) gWhere);\n\tif (GetPrivate_GetJavaClass != NULL) \n\t\treturn GetPrivate_GetJavaClass();\n}\n\nstatic void* FP2TV (void * fp ) {\n\tvoid **newGlue = NULL ;\n\tif ( fp != NULL ) {\n\t\tnewGlue = (void**) malloc (2 * sizeof(void *));\n\t\tif (newGlue != NULL ) {\n\t\t\tnewGlue[0] = fp ;\n\t\t\tnewGlue[1] = NULL ;\n\t\t}\n\t}\n\treturn newGlue;\n}\n\nint \tioFindExternalFunctionIn(char *lookupName, int moduleHandle) {\n\tvoid * \t\tfunctionPtr = 0;\n    CFStringRef\ttheString;\n        \t\n\tif (!moduleHandle) \n            return nil;\n    //printOnOSX(lookupName);\n    \n    theString = CFStringCreateWithCString(kCFAllocatorDefault,lookupName,kCFStringEncodingMacRoman);\n    if (theString == nil) \n        return nil;\n    functionPtr = (void*)CFBundleGetFunctionPointerForName((CFBundleRef) moduleHandle,theString);\n    CFRelease(theString);\n                \n\treturn (int) functionPtr;\n}\n\n/* ioFreeModule:\n\tFree the module with the associated handle.\n\tWARNING: never primitiveFail() within, just return 0.\n*/\nint ioFreeModule(int moduleHandle) {\n\tif (!moduleHandle) \n            return 0;\n\tCFBundleUnloadExecutable((CFBundleRef) moduleHandle);\n\tCFRelease((CFBundleRef) moduleHandle);\n        return 0;\n}\n\nCFragConnectionID LoadLibViaPathInDomain(char *libName,SInt16 domain) {\n \tCFragConnectionID\tlibHandle = 0;\n    CFURLRef \t\t\ttheURLRef;\n    CFBundleRef\t\t\ttheBundle;\n    OSStatus\t\t\terr;\n    CFStringRef \t\tlibNameCFString;\n\tFSRef \t\t\t\tframeworksFolderRef;\n\tCFURLRef\tbaseURL;\n\n \n    err = FSFindFolder(domain, kInternetPlugInFolderType, false,&frameworksFolderRef);\n    \n    if (err != noErr) {\n\t\treturn nil;\n    }\n    \n    baseURL = CFURLCreateFromFSRef(kCFAllocatorSystemDefault,&frameworksFolderRef);\n    if (baseURL == nil) {\n        return nil;\n    }\n    \n\tlibNameCFString = CFStringCreateWithCString(kCFAllocatorDefault,libName,kCFStringEncodingMacRoman);\n    if (libNameCFString == nil) {\n\t\tCFRelease(baseURL);\n    \treturn nil;\n    }\n    theURLRef = CFURLCreateCopyAppendingPathComponent(kCFAllocatorSystemDefault, baseURL,libNameCFString, false);\n\tCFRelease(libNameCFString);\n\tCFRelease(baseURL);\n    if (theURLRef == nil) {\n        return nil;\n    }\n         \n    theBundle = CFBundleCreate(kCFAllocatorSystemDefault,theURLRef);\n    CFRelease(theURLRef);\n    \n    if (theBundle == nil) {\n        return nil;\n    }\n    \n    if (!CFBundleLoadExecutable(theBundle)) {\n        CFRelease(theBundle);\n        return nil;\n    }\n    \n    libHandle = (CFragConnectionID) theBundle;\n\n\treturn libHandle;\n}\n\nCFragConnectionID LoadLibViaPath(char *libName) {\n\tstatic const SInt16 domain[] = {kUserDomain, kLocalDomain, kNetworkDomain, kSystemDomain, 0}; \n\tCFragConnectionID connectionID;\n\tSInt32 domainIndex=0;\n\t\n\tdo {\n\t\tconnectionID = LoadLibViaPathInDomain(libName,domain[domainIndex]);\n\t\tif (connectionID != nil) \n\t\t\treturn connectionID;\n\t\tdomainIndex++;\n\t} while (domain[domainIndex] != 0); \n\treturn nil;\n}\n\nOSStatus LoadFrameworkBundle(CFStringRef framework, CFBundleRef\n*bundlePtr)\n{\n    OSStatus    err;\n    FSRef       frameworksFolderRef;\n    CFURLRef    baseURL;\n    CFURLRef    bundleURL;\n\n    if ( bundlePtr == nil ) return( -1 );\n\n    *bundlePtr = nil;\n \n    baseURL = nil;\n    bundleURL = nil;\n \n    err = FSFindFolder(kOnAppropriateDisk, kFrameworksFolderType, true,\n&frameworksFolderRef);\n    if (err == noErr) {\n        baseURL = CFURLCreateFromFSRef(kCFAllocatorSystemDefault,\n&frameworksFolderRef);\n        if (baseURL == nil) {\n            err = coreFoundationUnknownErr;\n        }\n    }\n    if (err == noErr) {\n        bundleURL =\nCFURLCreateCopyAppendingPathComponent(kCFAllocatorSystemDefault, baseURL,\nframework, false);\n        if (bundleURL == nil) {\n            err = coreFoundationUnknownErr;\n        }\n    }\n    if (err == noErr) {\n        *bundlePtr = CFBundleCreate(kCFAllocatorSystemDefault, bundleURL);\n        if (*bundlePtr == nil) {\n            err = coreFoundationUnknownErr;\n        }\n    }\n    if (err == noErr) {\n        if ( ! CFBundleLoadExecutable( *bundlePtr ) ) {\n            err = coreFoundationUnknownErr;\n        }\n    }\n\n    // Clean up.\n    if (err != noErr && *bundlePtr != nil) {\n        CFRelease(*bundlePtr);\n        *bundlePtr = nil;\n    }\n    if (bundleURL != nil) {\n        CFRelease(bundleURL);\n    }\n\n    if (baseURL != nil) {\n        CFRelease(baseURL);\n    }\n\n    return err;\n}\n\n\n\nint printOnOSXFormat(char * string,char *format) {\n\tCFBundleRef bundle;\n\tint(*fprintf_ptr)(FILE *stream, const char *format, ...) = NULL;\n\tint(*fcnFlush_ptr)(FILE *stream) = NULL;\n\tvoid* fcn_ptr = NULL;\n\tvoid* fcnFlushx_ptr = NULL;\n\tOSErr\terr;\n\tFILE* stderr_ptr = NULL;\n\tvoid* __sf_ptr = NULL;\n\t\n\terr = LoadFrameworkBundle( CFSTR(\"System.framework\"), &bundle );\n\n\tfcn_ptr = CFBundleGetFunctionPointerForName(bundle, CFSTR(\"fprintf\"));\n\tfcnFlushx_ptr = CFBundleGetFunctionPointerForName(bundle, CFSTR(\"fflush\"));\n\t__sf_ptr = CFBundleGetDataPointerForName(bundle, CFSTR(\"__sF\"));\n\t\n\tif(fcn_ptr) {\n\t   /* cast it */\n\t   fprintf_ptr = ( int(*)(FILE *stream, const char *format, ...) ) fcn_ptr;\n\t} else {\n\t   /* it failed, handle that somehow */\n\t   return;\n\t}\n\n\tif(fcnFlushx_ptr) {\n\t   /* cast it */\n\t   fcnFlush_ptr = ( int(*)(FILE *stream) ) fcnFlushx_ptr;\n\t} else {\n\t   /* it failed, handle that somehow */\n\t   return;\n\t}\n\n\tif(__sf_ptr) {\n\t   stderr_ptr = (FILE*) ( ((char*)__sf_ptr) + 176);\n\t   /* 176 = 88*2, where 88=sizeof(FILE) under BSD */\n\t} else {\n\t   /* it failed */\n\t   return;\n\t}\n\n\tfprintf_ptr(stderr_ptr, format,string);\n\tfcnFlush_ptr(stderr_ptr);\n}\n\nint printOnOSX(char * string) {\n\treturn printOnOSXFormat(string,\"\\n+-+%s\");\n}\n\nint printOnOSXNumber(int number) {\n\treturn printOnOSXFormat((char *) number,\"\\n+-+%d\");\n}\n\nint printOnOSXPascal(unsigned char *string) {\n\tCopyPascalStringToC((ConstStr255Param) string,(char*) string);\n\tprintOnOSX((char*) string);\n\tCopyCStringToPascal((char*)string,(void *) string);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Developer/Squeak VM Universal-Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleDocumentTypes</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>image</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeIconFile</key>\n\t\t\t<string>SqueakImage.icns</string>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Squeak Image File</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>STim</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>sources</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeIconFile</key>\n\t\t\t<string>SqueakSources.icns</string>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Squeak Sources File</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>STso</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>changes</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeIconFile</key>\n\t\t\t<string>SqueakChanges.icns</string>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Squeak Changes File</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>STch</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>sobj</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeIconFile</key>\n\t\t\t<string>SqueakScript.icns</string>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Squeak Script File</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>SOBJ</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>pr</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeIconFile</key>\n\t\t\t<string>SqueakProject.icns</string>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Squeak Project File</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>STpr</string>\n\t\t\t</array>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>JPEG</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>JPEG</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>TEXT</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>TEXT</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>ttro</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>ttro</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>HTML</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>HTML</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>RTF </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>RTF</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>TIFF </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>TIFF</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>PICT </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>PICT</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>URL  </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>URL</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>ZIP </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>ZIP</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>zip </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>zip</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>BINA</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>BINA</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>GIFf</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>GIFf</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>PNGf</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>PNGf</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MP3 </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MP3</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MP3!</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MP3!</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MP3U</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MP3U</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MPEG</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MPEG</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>mp3!</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>mp3!</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MPG2</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MPG2</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MPG3</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MPG3</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MPG </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MPG</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Mp3</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>mp3</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>M3U</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>M3U</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>SRCS</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>SRCS</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Chng</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>Chng</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>HPS5</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>HPS5</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>bundle</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeIconFile</key>\n\t\t\t<string>SqueakPlugin.icns</string>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Squeak Plugin</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>BNDL</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t</array>\n\t<key>CFBundleExecutable</key>\n\t<string>Squeak VM Opt</string>\n\t<key>CGDisableCoalescedUpdates</key>\n\t<true/>\n\t<key>CFBundleGetInfoString</key>\n\t<string>Squeak VM 3.8.12b4 http://www.squeak.org </string>\n\t<key>CFBundleIconFile</key>\n\t<string>Squeak.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.Squeak</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>Squeak VM </string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>Squeak VM 3.8.12b4</string>\n\t<key>CFBundleSignature</key>\n\t<string>FAST</string>\n\t<key>CFBundleVersion</key>\n\t<string>3.8.12b4</string>\n\t<key>NSServices</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>NSMenuItem</key>\n\t\t\t<dict>\n\t\t\t\t<key>default</key>\n\t\t\t\t<string>Squeak DoIt</string>\n\t\t\t</dict>\n\t\t\t<key>NSMessage</key>\n\t\t\t<string>doitandreturn</string>\n\t\t\t<key>NSPortName</key>\n\t\t\t<string>Squeak</string>\n\t\t\t<key>NSReturnTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>NSStringPboardType</string>\n\t\t\t</array>\n\t\t\t<key>NSSendTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>NSStringPboardType</string>\n\t\t\t</array>\n\t\t</dict>\n\t</array>\n\t<key>SqueakEncodingType</key>\n\t<string>macintosh</string>\n\t<key>SqueakFloatingWindowGetsFocus</key>\n\t<true/>\n\t<key>SqueakPluginsBuiltInOrLocalOnly</key>\n\t<true/>\n\t<key>SqueakImageName</key>\n\t<string>Squeak.image</string>\n\t<key>SqueakMaxHeapSize</key>\n\t<integer>536870912</integer>\n\t<key>SqueakUIFlushPrimaryDeferNMilliseconds</key>\n\t<integer>20</integer>\n\t<key>SqueakUIFlushSecondaryCheckForPossibleNeedEveryNMilliseconds</key>\n\t<integer>20</integer>\n\t<key>SqueakUIFlushSecondaryCleanupDelayMilliseconds</key>\n\t<integer>25</integer>\n\t<key>SqueakUIFlushUseHighPercisionClock</key>\n\t<true/>\n\t<key>SqueakWindowAttribute</key>\n\t<data>\n\tggAAHg==\n\t</data>\n\t<key>SqueakWindowHasTitle</key>\n\t<true/>\n\t<key>SqueakWindowType</key>\n\t<integer>6</integer>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Developer/SqueakPro5.xml",
    "content": "<?xml version=\"1.0\"?>\n<?codewarrior exportversion=\"1.0\" ideversion=\"4.0\"?>\n<!DOCTYPE PROJECT [\n\n<!ELEMENT PROJECT (TARGETLIST, TARGETORDER, GROUPLIST, DESIGNLIST?)>\n<!ELEMENT TARGETLIST (TARGET+)>\n<!ELEMENT TARGET (NAME, SETTINGLIST, FILELIST?, LINKORDER?, SEGMENTLIST?, OVERLAYGROUPLIST?, SUBTARGETLIST?, SUBPROJECTLIST?)>\n<!ELEMENT NAME (#PCDATA)>\n<!ELEMENT USERSOURCETREETYPE (#PCDATA)>\n<!ELEMENT PATH (#PCDATA)>\n<!ELEMENT FILELIST (FILE*)>\n<!ELEMENT FILE (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?, ROOTFILEREF?, FILEKIND?, FILEFLAGS?)>\n<!ELEMENT PATHTYPE (#PCDATA)>\n<!ELEMENT PATHROOT (#PCDATA)>\n<!ELEMENT ACCESSPATH (#PCDATA)>\n<!ELEMENT PATHFORMAT (#PCDATA)>\n<!ELEMENT ROOTFILEREF (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)>\n<!ELEMENT FILEKIND (#PCDATA)>\n<!ELEMENT FILEFLAGS (#PCDATA)>\n<!ELEMENT FILEREF (TARGETNAME?, PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)>\n<!ELEMENT TARGETNAME (#PCDATA)>\n<!ELEMENT SETTINGLIST ((SETTING|PANELDATA)+)>\n<!ELEMENT SETTING (NAME?, (VALUE|(SETTING+)))>\n<!ELEMENT PANELDATA (NAME, VALUE)>\n<!ELEMENT VALUE (#PCDATA)>\n<!ELEMENT LINKORDER (FILEREF*)>\n<!ELEMENT SEGMENTLIST (SEGMENT+)>\n<!ELEMENT SEGMENT (NAME, ATTRIBUTES?, FILEREF*)>\n<!ELEMENT ATTRIBUTES (#PCDATA)>\n<!ELEMENT OVERLAYGROUPLIST (OVERLAYGROUP+)>\n<!ELEMENT OVERLAYGROUP (NAME, BASEADDRESS, OVERLAY*)>\n<!ELEMENT BASEADDRESS (#PCDATA)>\n<!ELEMENT OVERLAY (NAME, FILEREF*)>\n<!ELEMENT SUBTARGETLIST (SUBTARGET+)>\n<!ELEMENT SUBTARGET (TARGETNAME, ATTRIBUTES?)>\n<!ELEMENT SUBPROJECTLIST (SUBPROJECT+)>\n<!ELEMENT SUBPROJECT (FILEREF, SUBPROJECTTARGETLIST)>\n<!ELEMENT SUBPROJECTTARGETLIST (SUBPROJECTTARGET*)>\n<!ELEMENT SUBPROJECTTARGET (TARGETNAME, ATTRIBUTES?)>\n<!ELEMENT TARGETORDER (ORDEREDTARGET|ORDEREDDESIGN)*>\n<!ELEMENT ORDEREDTARGET (NAME)>\n<!ELEMENT ORDEREDDESIGN (NAME, ORDEREDTARGET+)>\n<!ELEMENT GROUPLIST (GROUP|FILEREF)*>\n<!ELEMENT GROUP (NAME, (GROUP|FILEREF)*)>\n<!ELEMENT DESIGNLIST (DESIGN+)>\n<!ELEMENT DESIGN (NAME, DESIGNDATA)>\n<!ELEMENT DESIGNDATA (#PCDATA)>\n]>\n<PROJECT>\n    <TARGETLIST>\n        <TARGET>\n            <NAME>Squeak VM PPC Debug</NAME>\n            <SETTINGLIST>\n\n                <!-- Settings for \"Source Trees\" panel -->\n                <SETTING><NAME>UserSourceTrees</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"Custom Keywords\" panel -->\n                <SETTING><NAME>CustomColor1</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor2</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor3</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor4</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Access Paths\" panel -->\n                <SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>UserSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:platforms:Mac OS:vm:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>OpenGL_SDK_1.2:Libraries:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n                <SETTING><NAME>SystemSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MacOS Support:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MSL:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>OpenGL_SDK_1.2:Headers:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Target Settings\" panel -->\n                <SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING>\n                <SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>Targetname</NAME><VALUE>Squeak VM PPC Debug</VALUE></SETTING>\n                <SETTING><NAME>OutputDirectory</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>SaveEntriesUsingRelativePaths</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"File Mappings\" panel -->\n                <SETTING><NAME>FileMappings</NAME>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>APPL</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>Appl</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MMLB</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MPLF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MWCD</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>RSRC</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.arr</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.bh</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Balloon Help</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cpp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.exp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.h</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pl</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW Perl</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.r</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Rez</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.s</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PPCAsm</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>XCOF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>docu</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>rsrc</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>shlb</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>stub</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.doc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.o</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.ppob</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.rsrc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Build Extras\" panel -->\n                <SETTING><NAME>CacheModDates</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>ActivateBrowser</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>DumpBrowserInfo</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>CacheSubprojects</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>UseThirdPartyDebugger</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>DebuggerCommandLine</NAME><VALUE></VALUE></SETTING>\n                <PANELDATA><NAME>Debugger Runtime</NAME><VALUE>\n                    0002000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    000000000000000000000000000011100D75E82010000000000001000D75F130\n                    0002000000000000000000000D75DFC000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    00000000000000000000000000000000\n                </VALUE></PANELDATA>\n\n                <!-- Settings for \"Debugger Target\" panel -->\n                <SETTING><NAME>LogSystemMessages</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>AutoTargetDLLs</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>StopAtWatchpoints</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>PauseWhileRunning</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>PauseInterval</NAME><VALUE>5</VALUE></SETTING>\n                <SETTING><NAME>PauseUIFlags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>AltExePath</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>StopAtTempBPOnLaunch</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>CacheSymbolics</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>TempBPFunctionName</NAME><VALUE>main</VALUE></SETTING>\n                <SETTING><NAME>TempBPType</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"68K CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_68K_codesize</NAME><VALUE>Smart</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_structalignment</NAME><VALUE>MC68K</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fp_mode</NAME><VALUE>SANE</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_code68020</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_mpwc</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fourbyteints</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_IEEEdoubles</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fardata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farvtables</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farstrings</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_pcrelstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_macsbug</NAME><VALUE>New</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_a6frames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"68K Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_68K_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_mix</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"68K Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_68K_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_68K_optfor</NAME><VALUE>Size</VALUE></SETTING>\n\n                <!-- Settings for \"68K Linker\" panel -->\n                <SETTING><NAME>MWLinker_68K_linksym</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_symfullpath</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_linksingle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_fastlink</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_generateMap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_glueintosegone</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"68K Project\" panel -->\n                <SETTING><NAME>MWProject_68K_type</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_outfile</NAME><VALUE>MacOS Toolbox DEBUG 68K</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filecreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filetype</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_size</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_flags</NAME><VALUE>22720</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcheader</NAME><VALUE>Standard</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmulti</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_a4</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_minsize</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcsegtype</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_cfm68kcodegen</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_thedebugger</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrc_custom</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_rseg_app</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_pilot_lib</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_pilot_main_entry</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Compiler\" panel -->\n                <SETTING><NAME>MWFrontEnd_C_cplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_checkprotos</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_arm</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_trigraphs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_onlystdkeywords</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enumsalwaysint</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwpointerstyle</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_prefixname</NAME><VALUE>myMacHeadersPPC</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ansistrict</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwcnewline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_wchar_type</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enableexceptions</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontreusestrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_poolstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontinline</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_useRTTI</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_multibyteaware</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_unsignedchars</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_autoinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_booltruefalse</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_direct_to_som</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_som_env_check</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_alwaysinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_inlinelevel</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ecplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_objective_c</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_defer_codegen</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Warnings\" panel -->\n                <SETTING><NAME>MWWarning_C_warn_illpragma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_emptydecl</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_possunwant</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedvar</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedarg</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_extracomma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_pedantic</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warningerrors</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_hidevirtual</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_implicitconv</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_notinlined</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_structclass</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"CFM68K\" panel -->\n                <SETTING><NAME>MWCFM68K_exports</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_farthreshold</NAME><VALUE>256</VALUE></SETTING>\n                <SETTING><NAME>PCFM68K_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_mainname</NAME><VALUE>__start</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_termname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_alignment</NAME><VALUE>Align_2</VALUE></SETTING>\n\n                <!-- Settings for \"MacOS Merge Panel\" panel -->\n                <SETTING><NAME>MWMerge_MacOS_projectType</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputName</NAME><VALUE>Merge Out</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputCreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputType</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_suppressWarning</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyFragments</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_skipResources</NAME>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE>\tA\b</VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"PPC CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_PPC_structalignment</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tracebacktables</NAME><VALUE>Inline</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processor</NAME><VALUE>Generic</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_readonlystrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_fpcontract</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_schedule</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_peephole</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processorspecific</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_altivec</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vectortocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vrsave</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_PPC_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_extended</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_mix</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_PPC_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_PPC_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Linker\" panel -->\n                <SETTING><NAME>MWLinker_PPC_linksym</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_symfullpath</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmap</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_permitmultdefs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmode</NAME><VALUE>Fast</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_mainname</NAME><VALUE>__start</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_termname</NAME><VALUE>SqueakTerminate</VALUE></SETTING>\n\n                <!-- Settings for \"PPC PEF\" panel -->\n                <SETTING><NAME>MWPEF_exports</NAME><VALUE>Pragma</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sortcode</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_expandbss</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWPEF_collapsereloads</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Project\" panel -->\n                <SETTING><NAME>MWProject_PPC_type</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>Squeak VM PPC Debug</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>1178686292</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_size</NAME><VALUE>30000</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_minsize</NAME><VALUE>1000</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_stacksize</NAME><VALUE>80</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_flags</NAME><VALUE>22720</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcheader</NAME><VALUE>Native</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"PPCAsm Panel\" panel -->\n                <SETTING><NAME>MWAssembler_PPC_auxheader</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_symmode</NAME><VALUE>Mac</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_dialect</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_prefixfile</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_typecheck</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_warnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_casesensitive</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"Rez Compiler\" panel -->\n                <SETTING><NAME>MWRez_Language_maxwidth</NAME><VALUE>80</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_script</NAME><VALUE>Roman</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_alignment</NAME><VALUE>Align1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filtermode</NAME><VALUE>FilterSkip</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_suppresswarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_escapecontrolchars</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_prefixname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filteredtypes</NAME><VALUE>'CODE' 'DATA' 'PICT'</VALUE></SETTING>\n            </SETTINGLIST>\n            <FILELIST>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InterfaceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MathLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>AsynchFilePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>AsynchFilePlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>B2DPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3d.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dDraw.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dInit.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dMain.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dRemap.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dTypes.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>BitBltPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FFTPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FilePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FilePlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FloatArrayPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JoystickTabletPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JoystickTabletPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Klatt.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>LargeIntegers.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Matrix2x3Plugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MIDIPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MidiPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SerialPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SerialPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SocketPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SocketPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundCodecPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundCodecPrims.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sq.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqConfig.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqFilePluginBasicPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqSoundCodecPluginBasicPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacAsyncFilePrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacDirectory.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacJoystickAndTablet.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacSound.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacWindow.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqNamedPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqNamedPrims.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqPlatformSpecific.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Squeak3D.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SqueakApp.r</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SqueakApp.rsrc</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Resource</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqVirtualMachine.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqVirtualMachine.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SurfacePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SurfacePlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>ZipPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTptInetPPC.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTptInternetLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug, WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTransportExtnPPC.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTransportLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug, WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>QuickTimeLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug, WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacNetwork.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>PowerMgrLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug, WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DropPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DropPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacDragDrop.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DragLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug, WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>myMacHeaders.pch</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DSAPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MiscPrimitivePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>ADPCMCodecPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundGenerationPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundGenerationPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>ThreadsLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug, WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>NavigationLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug, WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL SIOUX.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SecurityPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>securityPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacSecurity.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JPEGReaderPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>StarSqueakPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>B3DAcceleratorPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>B3DAcceleratorPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacOpenGLInfo.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacOpenGL.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqOpenGLRenderer.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacOpenGL.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqOpenGLRenderer.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenGLLibraryStub</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug, WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenGLUtilityStub</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug, WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMIDI.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacSerialPort.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacFileLogic.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacFileLogic.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DisplayLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug, WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUUID.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>UUIDPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>UUIDPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacInternetConfiguration.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InternetConfigPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InternetConfigPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InternetConfigLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug, WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>USBManagerLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug, WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Error.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcapimin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcapistd.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jccoefct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jccolor.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcdctmgr.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jchuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jchuff.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcinit.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcmainct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcmarker.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcmaster.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcomapi.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jconfig.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcparam.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcphuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcprepct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcsample.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jctrans.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdapimin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdapistd.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdatadst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdatasrc.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdcoefct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdcolor.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdct.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jddctmgr.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdhuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdhuff.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdinput.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmainct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmarker.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmaster.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmerge.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdphuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdpostct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdsample.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdtrans.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jerror.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jerror.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jfdctflt.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jfdctfst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jfdctint.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctflt.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctfst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctint.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctred.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jinclude.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemdatadst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemdatasrc.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemmgr.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemnobs.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemsys.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmorecfg.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jpegint.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jpeglib.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JPEGReadWriter2Plugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JPEGReadWriter2Plugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jquant1.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jquant2.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jutils.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jversion.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>CarbonAccessors.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacExternalPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacExternalPrims.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacImageIO.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacImageIO.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMain.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMain.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMemory.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMemory.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacTime.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacTime.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIAppleEvents.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIAppleEvents.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIClipBoard.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIClipBoard.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIConstants.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIEvents.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIMenuBar.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIMenuBar.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacWindow.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>osExports.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>BMPReadWriterPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>GeniePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>interp os9.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIEvents.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacEncoding.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacEncoding.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacHostWindow.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacHostWindow.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>HostWindowPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MacMenubarPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MenusLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>AppearanceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n            </FILELIST>\n            <LINKORDER>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InterfaceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MathLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>ADPCMCodecPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>AsynchFilePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>AsynchFilePlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>B2DPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>B3DAcceleratorPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>B3DAcceleratorPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3d.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dDraw.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dInit.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dMain.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dRemap.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dTypes.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>BitBltPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DropPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DropPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DSAPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FFTPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FilePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FilePlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FloatArrayPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JoystickTabletPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JoystickTabletPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JPEGReaderPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Klatt.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>LargeIntegers.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Matrix2x3Plugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MIDIPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MidiPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MiscPrimitivePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SecurityPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>securityPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SerialPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SerialPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SocketPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SocketPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundCodecPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundCodecPrims.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundGenerationPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundGenerationPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sq.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqConfig.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqFilePluginBasicPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqSoundCodecPluginBasicPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacAsyncFilePrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacDragDrop.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacDirectory.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacJoystickAndTablet.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMIDI.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacNetwork.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacOpenGL.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacOpenGLInfo.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqOpenGLRenderer.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacOpenGL.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqOpenGLRenderer.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacSecurity.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacSerialPort.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacSound.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacWindow.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqNamedPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqNamedPrims.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqPlatformSpecific.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Squeak3D.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SqueakApp.r</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SqueakApp.rsrc</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqVirtualMachine.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqVirtualMachine.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>StarSqueakPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SurfacePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SurfacePlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>ZipPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTptInetPPC.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTptInternetLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTransportExtnPPC.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTransportLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>QuickTimeLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>PowerMgrLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DragLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>myMacHeaders.pch</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>ThreadsLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>NavigationLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL SIOUX.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenGLLibraryStub</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenGLUtilityStub</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacFileLogic.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacFileLogic.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DisplayLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUUID.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>UUIDPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>UUIDPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacInternetConfiguration.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InternetConfigPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InternetConfigPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InternetConfigLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>USBManagerLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Error.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcapimin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcapistd.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jccoefct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jccolor.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcdctmgr.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jchuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jchuff.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcinit.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcmainct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcmarker.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcmaster.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcomapi.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jconfig.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcparam.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcphuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcprepct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcsample.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jctrans.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdapimin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdapistd.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdatadst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdatasrc.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdcoefct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdcolor.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdct.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jddctmgr.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdhuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdhuff.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdinput.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmainct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmarker.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmaster.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmerge.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdphuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdpostct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdsample.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdtrans.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jerror.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jerror.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jfdctflt.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jfdctfst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jfdctint.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctflt.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctfst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctint.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctred.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jinclude.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemdatadst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemdatasrc.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemmgr.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemnobs.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemsys.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmorecfg.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jpegint.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jpeglib.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JPEGReadWriter2Plugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JPEGReadWriter2Plugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jquant1.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jquant2.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jutils.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jversion.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>CarbonAccessors.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacExternalPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacExternalPrims.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacImageIO.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacImageIO.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMain.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMain.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMemory.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMemory.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacTime.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacTime.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIAppleEvents.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIAppleEvents.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIClipBoard.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIClipBoard.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIConstants.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIEvents.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIMenuBar.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIMenuBar.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacWindow.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>osExports.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>BMPReadWriterPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>GeniePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>interp os9.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIEvents.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacEncoding.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacEncoding.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacHostWindow.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacHostWindow.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>HostWindowPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MacMenubarPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MenusLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>AppearanceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n            </LINKORDER>\n        </TARGET>\n        <TARGET>\n            <NAME>Squeak VM PPC Opt</NAME>\n            <SETTINGLIST>\n\n                <!-- Settings for \"Source Trees\" panel -->\n                <SETTING><NAME>UserSourceTrees</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"Custom Keywords\" panel -->\n                <SETTING><NAME>CustomColor1</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor2</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor3</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor4</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Access Paths\" panel -->\n                <SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>UserSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:platforms:Mac OS:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>OpenGL_SDK_1.2:Libraries:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n                <SETTING><NAME>SystemSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MacOS Support:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MSL:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>OpenGL_SDK_1.2:Headers:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Target Settings\" panel -->\n                <SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING>\n                <SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>Targetname</NAME><VALUE>Squeak VM PPC Opt</VALUE></SETTING>\n                <SETTING><NAME>OutputDirectory</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>SaveEntriesUsingRelativePaths</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"File Mappings\" panel -->\n                <SETTING><NAME>FileMappings</NAME>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>APPL</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>Appl</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MMLB</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MPLF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MWCD</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>RSRC</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.arr</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.bh</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Balloon Help</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cpp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.exp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.h</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pl</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW Perl</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.r</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Rez</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.s</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PPCAsm</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>XCOF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>docu</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>rsrc</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>shlb</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>stub</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.doc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.o</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.ppob</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.rsrc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Build Extras\" panel -->\n                <SETTING><NAME>CacheModDates</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>ActivateBrowser</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>DumpBrowserInfo</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>CacheSubprojects</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>UseThirdPartyDebugger</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>DebuggerCommandLine</NAME><VALUE></VALUE></SETTING>\n                <PANELDATA><NAME>Debugger Runtime</NAME><VALUE>\n                    0002000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    000000000000000000000000000000000FE7503010000000000001000FE75940\n                    0002000000000000000000000FE74BD000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    00000000000000000000000000000000\n                </VALUE></PANELDATA>\n\n                <!-- Settings for \"Debugger Target\" panel -->\n                <SETTING><NAME>LogSystemMessages</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>AutoTargetDLLs</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>StopAtWatchpoints</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>PauseWhileRunning</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>PauseInterval</NAME><VALUE>5</VALUE></SETTING>\n                <SETTING><NAME>PauseUIFlags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>AltExePath</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>StopAtTempBPOnLaunch</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>CacheSymbolics</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>TempBPFunctionName</NAME><VALUE>main</VALUE></SETTING>\n                <SETTING><NAME>TempBPType</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"68K CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_68K_codesize</NAME><VALUE>Smart</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_structalignment</NAME><VALUE>MC68K</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fp_mode</NAME><VALUE>SANE</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_code68020</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_mpwc</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fourbyteints</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_IEEEdoubles</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fardata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farvtables</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farstrings</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_pcrelstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_macsbug</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_a6frames</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"68K Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_68K_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_mix</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"68K Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_68K_optimizationlevel</NAME><VALUE>Level4</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_68K_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"68K Linker\" panel -->\n                <SETTING><NAME>MWLinker_68K_linksym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_symfullpath</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_linksingle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_fastlink</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_generateMap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_glueintosegone</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"68K Project\" panel -->\n                <SETTING><NAME>MWProject_68K_type</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_outfile</NAME><VALUE>MacOS Toolbox 68K</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filecreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filetype</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_size</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_flags</NAME><VALUE>22720</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcheader</NAME><VALUE>Standard</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmulti</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_a4</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_minsize</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcsegtype</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_cfm68kcodegen</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_thedebugger</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrc_custom</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_rseg_app</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_pilot_lib</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_pilot_main_entry</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Compiler\" panel -->\n                <SETTING><NAME>MWFrontEnd_C_cplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_checkprotos</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_arm</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_trigraphs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_onlystdkeywords</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enumsalwaysint</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwpointerstyle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_prefixname</NAME><VALUE>myMacHeadersPPC</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ansistrict</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwcnewline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_wchar_type</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enableexceptions</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontreusestrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_poolstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_useRTTI</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_multibyteaware</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_unsignedchars</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_autoinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_booltruefalse</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_direct_to_som</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_som_env_check</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_alwaysinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_inlinelevel</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ecplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_objective_c</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_defer_codegen</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Warnings\" panel -->\n                <SETTING><NAME>MWWarning_C_warn_illpragma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_emptydecl</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_possunwant</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedvar</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedarg</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_extracomma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_pedantic</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warningerrors</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_hidevirtual</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_implicitconv</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_notinlined</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_structclass</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"CFM68K\" panel -->\n                <SETTING><NAME>MWCFM68K_exports</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_farthreshold</NAME><VALUE>256</VALUE></SETTING>\n                <SETTING><NAME>PCFM68K_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_mainname</NAME><VALUE>__start</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_termname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_alignment</NAME><VALUE>Align_2</VALUE></SETTING>\n\n                <!-- Settings for \"MacOS Merge Panel\" panel -->\n                <SETTING><NAME>MWMerge_MacOS_projectType</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputName</NAME><VALUE>Merge Out</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputCreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputType</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_suppressWarning</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyFragments</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_skipResources</NAME>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE>\tA\b</VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"PPC CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_PPC_structalignment</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tracebacktables</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processor</NAME><VALUE>P750</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_readonlystrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_fpcontract</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_schedule</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_peephole</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processorspecific</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_altivec</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vectortocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vrsave</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_PPC_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_extended</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_mix</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_PPC_optimizationlevel</NAME><VALUE>Level4</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_PPC_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Linker\" panel -->\n                <SETTING><NAME>MWLinker_PPC_linksym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_symfullpath</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmap</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_permitmultdefs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmode</NAME><VALUE>Fast</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_mainname</NAME><VALUE>__start</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_termname</NAME><VALUE>SqueakTerminate</VALUE></SETTING>\n\n                <!-- Settings for \"PPC PEF\" panel -->\n                <SETTING><NAME>MWPEF_exports</NAME><VALUE>Pragma</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sortcode</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_expandbss</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWPEF_collapsereloads</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Project\" panel -->\n                <SETTING><NAME>MWProject_PPC_type</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>Squeak VM PPC Opt</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>1178686292</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_size</NAME><VALUE>30000</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_minsize</NAME><VALUE>30000</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_stacksize</NAME><VALUE>80</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_flags</NAME><VALUE>22720</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcheader</NAME><VALUE>Native</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"PPCAsm Panel\" panel -->\n                <SETTING><NAME>MWAssembler_PPC_auxheader</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_symmode</NAME><VALUE>Mac</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_dialect</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_prefixfile</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_typecheck</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_warnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_casesensitive</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"Rez Compiler\" panel -->\n                <SETTING><NAME>MWRez_Language_maxwidth</NAME><VALUE>80</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_script</NAME><VALUE>Roman</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_alignment</NAME><VALUE>Align1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filtermode</NAME><VALUE>FilterSkip</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_suppresswarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_escapecontrolchars</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_prefixname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filteredtypes</NAME><VALUE>'CODE' 'DATA' 'PICT'</VALUE></SETTING>\n            </SETTINGLIST>\n            <FILELIST>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InterfaceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MathLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL SIOUX.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>AsynchFilePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>AsynchFilePlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>B2DPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3d.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dDraw.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dInit.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dMain.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dRemap.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dTypes.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>BitBltPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FFTPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FilePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FilePlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FloatArrayPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JoystickTabletPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JoystickTabletPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Klatt.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>LargeIntegers.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Matrix2x3Plugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MIDIPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MidiPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SerialPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SerialPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SocketPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SocketPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundCodecPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundCodecPrims.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sq.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqConfig.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqFilePluginBasicPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqSoundCodecPluginBasicPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacAsyncFilePrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacJoystickAndTablet.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacSound.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacWindow.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqNamedPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqNamedPrims.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqPlatformSpecific.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Squeak3D.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SqueakApp.r</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SqueakApp.rsrc</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Resource</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqVirtualMachine.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqVirtualMachine.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SurfacePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SurfacePlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>ZipPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTptInetPPC.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTptInternetLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTransportExtnPPC.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTransportLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>QuickTimeLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacNetwork.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>PowerMgrLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DropPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DropPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacDragDrop.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DragLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>myMacHeaders.pch</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DSAPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MiscPrimitivePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>ADPCMCodecPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundGenerationPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundGenerationPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>ThreadsLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>NavigationLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SecurityPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>securityPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacSecurity.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JPEGReaderPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>StarSqueakPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacOpenGLInfo.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacOpenGL.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqOpenGLRenderer.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacOpenGL.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqOpenGLRenderer.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenGLLibraryStub</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenGLUtilityStub</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMIDI.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacSerialPort.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacFileLogic.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacFileLogic.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DisplayLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUUID.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>UUIDPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>UUIDPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacInternetConfiguration.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InternetConfigPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InternetConfigPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InternetConfigLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>USBManagerLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Error.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcapimin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcapistd.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jccoefct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jccolor.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcdctmgr.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jchuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jchuff.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcinit.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcmainct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcmarker.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcmaster.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcomapi.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jconfig.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcparam.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcphuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcprepct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcsample.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jctrans.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdapimin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdapistd.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdatadst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdatasrc.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdcoefct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdcolor.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdct.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jddctmgr.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdhuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdhuff.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdinput.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmainct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmarker.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmaster.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmerge.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdphuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdpostct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdsample.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdtrans.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jerror.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jerror.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jfdctflt.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jfdctfst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jfdctint.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctflt.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctfst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctint.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctred.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jinclude.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemdatadst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemdatasrc.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemmgr.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemnobs.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemsys.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmorecfg.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jpegint.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jpeglib.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JPEGReadWriter2Plugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JPEGReadWriter2Plugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jquant1.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jquant2.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jutils.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jversion.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>CarbonAccessors.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacExternalPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacExternalPrims.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacImageIO.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacImageIO.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMain.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMain.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMemory.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMemory.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacTime.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacTime.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIAppleEvents.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIAppleEvents.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIClipBoard.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIClipBoard.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIConstants.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIEvents.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIEvents.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIMenuBar.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIMenuBar.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacWindow.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>osExports.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>B3DAcceleratorPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>B3DAcceleratorPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>BMPReadWriterPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>GeniePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>interp os9.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacEncoding.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacEncoding.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacDirectory.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacHostWindow.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacHostWindow.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>HostWindowPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MacMenubarPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MenusLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>AppearanceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n            </FILELIST>\n            <LINKORDER>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL SIOUX.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InterfaceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>ADPCMCodecPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>AsynchFilePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>AsynchFilePlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>B2DPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3d.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dDraw.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dInit.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dMain.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dRemap.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dTypes.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>BitBltPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DropPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DropPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DSAPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FFTPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FilePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FilePlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FloatArrayPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InternetConfigPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InternetConfigPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JoystickTabletPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JoystickTabletPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JPEGReaderPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Klatt.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>LargeIntegers.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Matrix2x3Plugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MIDIPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MidiPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MiscPrimitivePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SecurityPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>securityPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SerialPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SerialPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SocketPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SocketPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundCodecPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundCodecPrims.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundGenerationPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundGenerationPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sq.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqConfig.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqFilePluginBasicPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqSoundCodecPluginBasicPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacAsyncFilePrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacDragDrop.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacFileLogic.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacFileLogic.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacInternetConfiguration.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacJoystickAndTablet.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMIDI.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacNetwork.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacOpenGLInfo.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacSecurity.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacSerialPort.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacSound.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacExternalPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacExternalPrims.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacImageIO.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacImageIO.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMain.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMain.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMemory.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMemory.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacTime.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacTime.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIAppleEvents.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIAppleEvents.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIClipBoard.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIClipBoard.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIConstants.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIEvents.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIEvents.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIMenuBar.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIMenuBar.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacWindow.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacWindow.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacOpenGL.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacOpenGL.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUUID.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqOpenGLRenderer.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqOpenGLRenderer.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqNamedPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqNamedPrims.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqPlatformSpecific.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Squeak3D.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SqueakApp.r</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SqueakApp.rsrc</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqVirtualMachine.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqVirtualMachine.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>StarSqueakPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SurfacePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SurfacePlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>UUIDPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>UUIDPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>ZipPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>myMacHeaders.pch</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DisplayLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DragLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MathLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InternetConfigLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>NavigationLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenGLLibraryStub</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenGLUtilityStub</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTptInetPPC.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTptInternetLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTransportExtnPPC.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTransportLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>PowerMgrLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>QuickTimeLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>ThreadsLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>USBManagerLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>CarbonAccessors.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Error.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcapimin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcapistd.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jccoefct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jccolor.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcdctmgr.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jchuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jchuff.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcinit.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcmainct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcmarker.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcmaster.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcomapi.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jconfig.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcparam.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcphuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcprepct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcsample.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jctrans.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdapimin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdapistd.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdatadst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdatasrc.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdcoefct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdcolor.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdct.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jddctmgr.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdhuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdhuff.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdinput.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmainct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmarker.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmaster.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmerge.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdphuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdpostct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdsample.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdtrans.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jerror.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jerror.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jfdctflt.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jfdctfst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jfdctint.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctflt.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctfst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctint.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctred.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jinclude.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemdatadst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemdatasrc.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemmgr.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemnobs.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemsys.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmorecfg.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jpegint.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jpeglib.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JPEGReadWriter2Plugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JPEGReadWriter2Plugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jquant1.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jquant2.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jutils.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jversion.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>osExports.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>B3DAcceleratorPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>B3DAcceleratorPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>BMPReadWriterPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>GeniePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>interp os9.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacEncoding.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacEncoding.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacDirectory.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacHostWindow.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacHostWindow.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>HostWindowPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MacMenubarPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MenusLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>AppearanceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n            </LINKORDER>\n        </TARGET>\n        <TARGET>\n            <NAME>Squeak VM NS Plugin Opt</NAME>\n            <SETTINGLIST>\n\n                <!-- Settings for \"Source Trees\" panel -->\n                <SETTING><NAME>UserSourceTrees</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"Custom Keywords\" panel -->\n                <SETTING><NAME>CustomColor1</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor2</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor3</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor4</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Access Paths\" panel -->\n                <SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>UserSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:platforms:Mac OS:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>OpenGL_SDK_1.2:Libraries:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:platforms:Mac OS:vm:PluginSDK 4.01a:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n                <SETTING><NAME>SystemSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MacOS Support:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MSL:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>OpenGL_SDK_1.2:Headers:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Target Settings\" panel -->\n                <SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING>\n                <SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>Targetname</NAME><VALUE>Squeak VM NS Plugin Opt</VALUE></SETTING>\n                <SETTING><NAME>OutputDirectory</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>SaveEntriesUsingRelativePaths</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"File Mappings\" panel -->\n                <SETTING><NAME>FileMappings</NAME>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>APPL</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>Appl</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MMLB</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MPLF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MWCD</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>RSRC</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.arr</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.bh</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Balloon Help</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cpp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.exp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.h</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pl</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW Perl</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.r</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Rez</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.s</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PPCAsm</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>XCOF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>docu</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>rsrc</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>shlb</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>stub</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.doc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.o</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.ppob</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.rsrc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Build Extras\" panel -->\n                <SETTING><NAME>CacheModDates</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>ActivateBrowser</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>DumpBrowserInfo</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>CacheSubprojects</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>UseThirdPartyDebugger</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>DebuggerCommandLine</NAME><VALUE></VALUE></SETTING>\n                <PANELDATA><NAME>Debugger Runtime</NAME><VALUE>\n                    0002000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    00000000000000014C616D69653A496E7465726E65743A4D6963726F736F6674\n                    20496E7465726E657420353A496E7465726E6574204578706C6F726572203520\n                    466F6C6465723A496E7465726E6574204578706C6F7265720000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    000000000000000000000000000000000DA6FE4010000000000001000DA70750\n                    0002000000000000000000000DA6F5E000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    00000000000000000000000000000000\n                </VALUE></PANELDATA>\n\n                <!-- Settings for \"Debugger Target\" panel -->\n                <SETTING><NAME>LogSystemMessages</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>AutoTargetDLLs</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>StopAtWatchpoints</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>PauseWhileRunning</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>PauseInterval</NAME><VALUE>5</VALUE></SETTING>\n                <SETTING><NAME>PauseUIFlags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>AltExePath</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>StopAtTempBPOnLaunch</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>CacheSymbolics</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>TempBPFunctionName</NAME><VALUE>main</VALUE></SETTING>\n                <SETTING><NAME>TempBPType</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"68K CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_68K_codesize</NAME><VALUE>Smart</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_structalignment</NAME><VALUE>MC68K</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fp_mode</NAME><VALUE>SANE</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_code68020</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_mpwc</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fourbyteints</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_IEEEdoubles</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fardata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farvtables</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farstrings</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_pcrelstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_macsbug</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_a6frames</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"68K Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_68K_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_mix</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"68K Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_68K_optimizationlevel</NAME><VALUE>Level4</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_68K_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"68K Linker\" panel -->\n                <SETTING><NAME>MWLinker_68K_linksym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_symfullpath</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_linksingle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_fastlink</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_generateMap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_glueintosegone</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"68K Project\" panel -->\n                <SETTING><NAME>MWProject_68K_type</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_outfile</NAME><VALUE>MacOS Toolbox 68K</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filecreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filetype</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_size</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_flags</NAME><VALUE>22720</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcheader</NAME><VALUE>Standard</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmulti</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_a4</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_minsize</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcsegtype</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_cfm68kcodegen</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_thedebugger</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrc_custom</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_rseg_app</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_pilot_lib</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_pilot_main_entry</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Compiler\" panel -->\n                <SETTING><NAME>MWFrontEnd_C_cplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_checkprotos</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_arm</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_trigraphs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_onlystdkeywords</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enumsalwaysint</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwpointerstyle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_prefixname</NAME><VALUE>myMacHeadersPPC</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ansistrict</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwcnewline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_wchar_type</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enableexceptions</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontreusestrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_poolstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_useRTTI</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_multibyteaware</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_unsignedchars</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_autoinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_booltruefalse</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_direct_to_som</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_som_env_check</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_alwaysinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_inlinelevel</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ecplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_objective_c</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_defer_codegen</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Warnings\" panel -->\n                <SETTING><NAME>MWWarning_C_warn_illpragma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_emptydecl</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_possunwant</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedvar</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedarg</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_extracomma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_pedantic</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warningerrors</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_hidevirtual</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_implicitconv</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_notinlined</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_structclass</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"CFM68K\" panel -->\n                <SETTING><NAME>MWCFM68K_exports</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_farthreshold</NAME><VALUE>256</VALUE></SETTING>\n                <SETTING><NAME>PCFM68K_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_mainname</NAME><VALUE>__start</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_termname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_alignment</NAME><VALUE>Align_2</VALUE></SETTING>\n\n                <!-- Settings for \"MacOS Merge Panel\" panel -->\n                <SETTING><NAME>MWMerge_MacOS_projectType</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputName</NAME><VALUE>Merge Out</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputCreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputType</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_suppressWarning</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyFragments</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_skipResources</NAME>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE>\tA\b</VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"PPC CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_PPC_structalignment</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tracebacktables</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processor</NAME><VALUE>P750</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_readonlystrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_fpcontract</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_schedule</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_peephole</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processorspecific</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_altivec</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vectortocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vrsave</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_PPC_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_extended</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_mix</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_PPC_optimizationlevel</NAME><VALUE>Level4</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_PPC_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Linker\" panel -->\n                <SETTING><NAME>MWLinker_PPC_linksym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_symfullpath</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_permitmultdefs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmode</NAME><VALUE>Fast</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_mainname</NAME><VALUE>main</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_termname</NAME><VALUE>SqueakTerminate</VALUE></SETTING>\n\n                <!-- Settings for \"PPC PEF\" panel -->\n                <SETTING><NAME>MWPEF_exports</NAME><VALUE>All</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sortcode</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_expandbss</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWPEF_collapsereloads</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Project\" panel -->\n                <SETTING><NAME>MWProject_PPC_type</NAME><VALUE>SharedLibrary</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>NS-Squeak VM 3.0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>1297044307</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>1314082892</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_size</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_minsize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_flags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcheader</NAME><VALUE>Native</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"PPCAsm Panel\" panel -->\n                <SETTING><NAME>MWAssembler_PPC_auxheader</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_symmode</NAME><VALUE>Mac</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_dialect</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_prefixfile</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_typecheck</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_warnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_casesensitive</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"Rez Compiler\" panel -->\n                <SETTING><NAME>MWRez_Language_maxwidth</NAME><VALUE>80</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_script</NAME><VALUE>Roman</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_alignment</NAME><VALUE>Align1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filtermode</NAME><VALUE>FilterSkip</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_suppresswarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_escapecontrolchars</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_prefixname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filteredtypes</NAME><VALUE>'CODE' 'DATA' 'PICT'</VALUE></SETTING>\n            </SETTINGLIST>\n            <FILELIST>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InterfaceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MathLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL SIOUX.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>AsynchFilePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>B2DPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>BitBltPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FFTPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FilePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FloatArrayPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JoystickTabletPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Klatt.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>LargeIntegers.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Matrix2x3Plugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MIDIPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SerialPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SocketPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundCodecPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqNamedPrims.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Squeak3D.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>ZipPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTptInetPPC.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTptInternetLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTransportExtnPPC.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTransportLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>QuickTimeLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacNSPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SqueakInBrowser.rsrc</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Resource</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>PowerMgrLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DropPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DragLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>myMacHeaders.pch</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DSAPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MiscPrimitivePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>ADPCMCodecPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundGenerationPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>ThreadsLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>NavigationLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SecurityPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JPEGReaderPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>StarSqueakPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenGLLibraryStub</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenGLUtilityStub</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DisplayLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>UUIDPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InternetConfigPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InternetConfigLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>USBManagerLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JPEGReadWriter2Plugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>CarbonAccessors.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacExternalPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacExternalPrims.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacImageIO.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacImageIO.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMain.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMain.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMemory.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMemory.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacTime.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacTime.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIAppleEvents.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIAppleEvents.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIClipBoard.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIClipBoard.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIConstants.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIEvents.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIEvents.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIMenuBar.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIMenuBar.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>npmac.cpp</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jni.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jni_md.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jri.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jritypes.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jri_md.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>npapi.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>npupp.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FilePlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>AsynchFilePlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3d.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dDraw.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dMain.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dInit.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dRemap.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dTypes.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DropPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InternetConfigPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MidiPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>securityPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SerialPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SocketPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundCodecPrims.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcapimin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcapistd.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jccoefct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jccolor.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcdctmgr.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jchuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jchuff.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcinit.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcmainct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcmarker.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcmaster.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcomapi.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jconfig.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcparam.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcphuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcprepct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcsample.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jctrans.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdapimin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdapistd.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdatadst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdatasrc.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdcoefct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdcolor.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdct.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jddctmgr.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdhuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdhuff.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdinput.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmainct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmarker.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmaster.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmerge.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdphuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdpostct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdsample.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdtrans.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jerror.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jerror.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jfdctflt.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jfdctfst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jfdctint.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctflt.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctfst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctint.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctred.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jinclude.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemdatadst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemdatasrc.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemmgr.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemnobs.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemsys.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmorecfg.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jpegint.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jpeglib.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JPEGReadWriter2Plugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jquant1.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jquant2.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jutils.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jversion.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Error.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JoystickTabletPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundGenerationPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sq.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqConfig.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqFilePluginBasicPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqSoundCodecPluginBasicPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacFileLogic.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacAsyncFilePrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacDirectory.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacFileLogic.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacInternetConfiguration.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacJoystickAndTablet.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacDragDrop.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMIDI.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacNetwork.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacOpenGL.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacOpenGL.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacOpenGLInfo.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacSerialPort.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacSecurity.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacSound.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUUID.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqNamedPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqPlatformSpecific.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqVirtualMachine.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqVirtualMachine.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SurfacePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SurfacePlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>UUIDPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>osExports.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacWindow.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacWindow.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>BMPReadWriterPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>GeniePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>interp os9.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacEncoding.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacEncoding.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacHostWindow.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacHostWindow.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n            </FILELIST>\n            <LINKORDER>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL SIOUX.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InterfaceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MathLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>ADPCMCodecPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>AsynchFilePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>B2DPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>BitBltPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DropPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DSAPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FFTPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FilePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FloatArrayPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JoystickTabletPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JPEGReaderPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Klatt.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>LargeIntegers.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Matrix2x3Plugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MIDIPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MiscPrimitivePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SecurityPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SerialPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SocketPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundCodecPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundGenerationPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacNSPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqNamedPrims.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Squeak3D.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>StarSqueakPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>ZipPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTptInetPPC.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTptInternetLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTransportExtnPPC.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTransportLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>QuickTimeLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>PowerMgrLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DragLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>ThreadsLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SqueakInBrowser.rsrc</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>myMacHeaders.pch</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>NavigationLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenGLLibraryStub</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenGLUtilityStub</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DisplayLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>UUIDPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InternetConfigPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InternetConfigLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>USBManagerLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JPEGReadWriter2Plugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>CarbonAccessors.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacExternalPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacExternalPrims.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacImageIO.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacImageIO.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMain.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMain.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMemory.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMemory.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacTime.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacTime.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIAppleEvents.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIAppleEvents.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIClipBoard.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIClipBoard.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIConstants.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIEvents.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIEvents.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIMenuBar.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIMenuBar.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>npmac.cpp</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jni.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jni_md.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jri.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jritypes.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jri_md.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>npapi.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>npupp.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FilePlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>AsynchFilePlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3d.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dDraw.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dMain.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dInit.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dRemap.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dTypes.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DropPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InternetConfigPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MidiPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>securityPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SerialPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SocketPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundCodecPrims.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcapimin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcapistd.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jccoefct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jccolor.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcdctmgr.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jchuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jchuff.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcinit.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcmainct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcmarker.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcmaster.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcomapi.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jconfig.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcparam.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcphuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcprepct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcsample.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jctrans.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdapimin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdapistd.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdatadst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdatasrc.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdcoefct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdcolor.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdct.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jddctmgr.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdhuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdhuff.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdinput.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmainct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmarker.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmaster.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmerge.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdphuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdpostct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdsample.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdtrans.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jerror.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jerror.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jfdctflt.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jfdctfst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jfdctint.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctflt.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctfst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctint.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctred.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jinclude.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemdatadst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemdatasrc.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemmgr.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemnobs.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemsys.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmorecfg.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jpegint.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jpeglib.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JPEGReadWriter2Plugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jquant1.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jquant2.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jutils.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jversion.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Error.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JoystickTabletPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundGenerationPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sq.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqConfig.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqFilePluginBasicPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqSoundCodecPluginBasicPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacFileLogic.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacAsyncFilePrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacDirectory.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacFileLogic.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacInternetConfiguration.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacJoystickAndTablet.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacDragDrop.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMIDI.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacNetwork.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacOpenGL.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacOpenGL.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacOpenGLInfo.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacSerialPort.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacSecurity.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacSound.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUUID.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqNamedPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqPlatformSpecific.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqVirtualMachine.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqVirtualMachine.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SurfacePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SurfacePlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>UUIDPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>osExports.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacWindow.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacWindow.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>BMPReadWriterPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>GeniePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>interp os9.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacEncoding.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacEncoding.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacHostWindow.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacHostWindow.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n            </LINKORDER>\n        </TARGET>\n        <TARGET>\n            <NAME>Squeak VM NS Plugin Debug</NAME>\n            <SETTINGLIST>\n\n                <!-- Settings for \"Source Trees\" panel -->\n                <SETTING><NAME>UserSourceTrees</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"Custom Keywords\" panel -->\n                <SETTING><NAME>CustomColor1</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor2</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor3</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>CustomColor4</NAME>\n                    <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>\n                    <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>\n                    <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Access Paths\" panel -->\n                <SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>UserSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:platforms:Mac OS:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>OpenGL_SDK_1.2:Libraries:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:platforms:Mac OS:vm:PluginSDK 4.01a:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n                <SETTING><NAME>SystemSearchPaths</NAME>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MacOS Support:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>:MSL:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>SearchPath</NAME>\n                            <SETTING><NAME>Path</NAME><VALUE>OpenGL_SDK_1.2:</VALUE></SETTING>\n                            <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                            <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                        </SETTING>\n                        <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Target Settings\" panel -->\n                <SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING>\n                <SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>Targetname</NAME><VALUE>Squeak VM NS Plugin Debug</VALUE></SETTING>\n                <SETTING><NAME>OutputDirectory</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>SaveEntriesUsingRelativePaths</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"File Mappings\" panel -->\n                <SETTING><NAME>FileMappings</NAME>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>APPL</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>Appl</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MMLB</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MPLF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>MWCD</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>RSRC</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.arr</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.bh</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Balloon Help</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.c++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.cpp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.exp</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.h</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pch++</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.pl</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>MW Perl</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.r</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>Rez</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.s</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PPCAsm</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>XCOF</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>docu</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>rsrc</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>shlb</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileType</NAME><VALUE>stub</VALUE></SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.doc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.o</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.ppob</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                    <SETTING>\n                        <SETTING><NAME>FileExtension</NAME><VALUE>.rsrc</VALUE></SETTING>\n                        <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>\n                        <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>\n                        <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>\n                        <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>\n                    </SETTING>\n                </SETTING>\n\n                <!-- Settings for \"Build Extras\" panel -->\n                <SETTING><NAME>CacheModDates</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>ActivateBrowser</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>DumpBrowserInfo</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>CacheSubprojects</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>UseThirdPartyDebugger</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>DebuggerCommandLine</NAME><VALUE></VALUE></SETTING>\n                <PANELDATA><NAME>Debugger Runtime</NAME><VALUE>\n                    0002000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    00000000000000014C616D69653A4170706C69636174696F6E7320284D616320\n                    4F532039293A496E7465726E6574204578706C6F72657220353A496E7465726E\n                    6574204578706C6F726572000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    000000000000000000000000000000000DA6FE4010000000000001000DA70750\n                    0002000000000000000000000DA6F5E000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    0000000000000000000000000000000000000000000000000000000000000000\n                    00000000000000000000000000000000\n                </VALUE></PANELDATA>\n\n                <!-- Settings for \"Debugger Target\" panel -->\n                <SETTING><NAME>LogSystemMessages</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>AutoTargetDLLs</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>StopAtWatchpoints</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>PauseWhileRunning</NAME><VALUE>false</VALUE></SETTING>\n                <SETTING><NAME>PauseInterval</NAME><VALUE>5</VALUE></SETTING>\n                <SETTING><NAME>PauseUIFlags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>AltExePath</NAME>\n                    <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING>\n                    <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>\n                    <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n                </SETTING>\n                <SETTING><NAME>StopAtTempBPOnLaunch</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>CacheSymbolics</NAME><VALUE>true</VALUE></SETTING>\n                <SETTING><NAME>TempBPFunctionName</NAME><VALUE>main</VALUE></SETTING>\n                <SETTING><NAME>TempBPType</NAME><VALUE>false</VALUE></SETTING>\n\n                <!-- Settings for \"68K CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_68K_codesize</NAME><VALUE>Smart</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_structalignment</NAME><VALUE>MC68K</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fp_mode</NAME><VALUE>SANE</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_code68020</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_mpwc</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fourbyteints</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_IEEEdoubles</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_fardata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farvtables</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_farstrings</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_pcrelstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_macsbug</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_68K_a6frames</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"68K Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_68K_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_mix</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_68K_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"68K Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_68K_optimizationlevel</NAME><VALUE>Level4</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_68K_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"68K Linker\" panel -->\n                <SETTING><NAME>MWLinker_68K_linksym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_symfullpath</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_linksingle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_fastlink</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_generateMap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_glueintosegone</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_68K_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"68K Project\" panel -->\n                <SETTING><NAME>MWProject_68K_type</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_outfile</NAME><VALUE>MacOS Toolbox 68K</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filecreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_filetype</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_size</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_flags</NAME><VALUE>22720</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcheader</NAME><VALUE>Standard</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmulti</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_a4</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_minsize</NAME><VALUE>384</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrcsegtype</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_cfm68kcodegen</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_thedebugger</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_rsrc_custom</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_rseg_app</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_is_pilot_lib</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_68K_pilot_main_entry</NAME><VALUE></VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Compiler\" panel -->\n                <SETTING><NAME>MWFrontEnd_C_cplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_checkprotos</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_arm</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_trigraphs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_onlystdkeywords</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enumsalwaysint</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwpointerstyle</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_prefixname</NAME><VALUE>myMacHeadersPPC</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ansistrict</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_mpwcnewline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_wchar_type</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_enableexceptions</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontreusestrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_poolstrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_dontinline</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_useRTTI</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_multibyteaware</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_unsignedchars</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_autoinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_booltruefalse</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_direct_to_som</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_som_env_check</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_alwaysinline</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_inlinelevel</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_ecplusplus</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_objective_c</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWFrontEnd_C_defer_codegen</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"C/C++ Warnings\" panel -->\n                <SETTING><NAME>MWWarning_C_warn_illpragma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_emptydecl</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_possunwant</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedvar</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_unusedarg</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_extracomma</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_pedantic</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warningerrors</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_hidevirtual</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_implicitconv</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_notinlined</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWWarning_C_warn_structclass</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"CFM68K\" panel -->\n                <SETTING><NAME>MWCFM68K_exports</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_farthreshold</NAME><VALUE>256</VALUE></SETTING>\n                <SETTING><NAME>PCFM68K_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_mainname</NAME><VALUE>__start</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_termname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCFM68K_alignment</NAME><VALUE>Align_2</VALUE></SETTING>\n\n                <!-- Settings for \"MacOS Merge Panel\" panel -->\n                <SETTING><NAME>MWMerge_MacOS_projectType</NAME><VALUE>Application</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputName</NAME><VALUE>Merge Out</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputCreator</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_outputType</NAME><VALUE>1095782476</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_suppressWarning</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyFragments</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWMerge_MacOS_skipResources</NAME>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                    <SETTING><VALUE>\tA\b</VALUE></SETTING>\n                    <SETTING><VALUE></VALUE></SETTING>\n                </SETTING>\n\n                <!-- Settings for \"PPC CodeGen\" panel -->\n                <SETTING><NAME>MWCodeGen_PPC_structalignment</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tracebacktables</NAME><VALUE>Inline</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processor</NAME><VALUE>P750</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_readonlystrings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_tocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_profiler</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_fpcontract</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_schedule</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_peephole</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_processorspecific</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_altivec</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vectortocdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWCodeGen_PPC_vrsave</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Disassembler\" panel -->\n                <SETTING><NAME>MWDisassembler_PPC_showcode</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_extended</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_mix</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_nohex</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showdata</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showexceptions</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_showsym</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWDisassembler_PPC_shownames</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Global Optimizer\" panel -->\n                <SETTING><NAME>GlobalOptimizer_PPC_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING>\n                <SETTING><NAME>GlobalOptimizer_PPC_optfor</NAME><VALUE>Speed</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Linker\" panel -->\n                <SETTING><NAME>MWLinker_PPC_linksym</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_symfullpath</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmap</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_permitmultdefs</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_linkmode</NAME><VALUE>Fast</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_mainname</NAME><VALUE>main</VALUE></SETTING>\n                <SETTING><NAME>MWLinker_PPC_termname</NAME><VALUE>SqueakTerminate</VALUE></SETTING>\n\n                <!-- Settings for \"PPC PEF\" panel -->\n                <SETTING><NAME>MWPEF_exports</NAME><VALUE>All</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_libfolder</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sortcode</NAME><VALUE>None</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_expandbss</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_sharedata</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_olddefversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_currentversion</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWPEF_fragmentname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWPEF_collapsereloads</NAME><VALUE>1</VALUE></SETTING>\n\n                <!-- Settings for \"PPC Project\" panel -->\n                <SETTING><NAME>MWProject_PPC_type</NAME><VALUE>SharedLibrary</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>NS-Squeak VM 3.0 Debug</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>1297044307</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>1314082892</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_size</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_minsize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_stacksize</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_flags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_symfilename</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcheader</NAME><VALUE>Native</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcid</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcflags</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcstore</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWProject_PPC_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"PPCAsm Panel\" panel -->\n                <SETTING><NAME>MWAssembler_PPC_auxheader</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_symmode</NAME><VALUE>Mac</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_dialect</NAME><VALUE>PPC</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_prefixfile</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_typecheck</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_warnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWAssembler_PPC_casesensitive</NAME><VALUE>0</VALUE></SETTING>\n\n                <!-- Settings for \"Rez Compiler\" panel -->\n                <SETTING><NAME>MWRez_Language_maxwidth</NAME><VALUE>80</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_script</NAME><VALUE>Roman</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_alignment</NAME><VALUE>Align1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filtermode</NAME><VALUE>FilterSkip</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_suppresswarnings</NAME><VALUE>0</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_escapecontrolchars</NAME><VALUE>1</VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_prefixname</NAME><VALUE></VALUE></SETTING>\n                <SETTING><NAME>MWRez_Language_filteredtypes</NAME><VALUE>'CODE' 'DATA' 'PICT'</VALUE></SETTING>\n            </SETTINGLIST>\n            <FILELIST>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InterfaceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MathLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL SIOUX.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>AsynchFilePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>B2DPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>BitBltPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FFTPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FilePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FloatArrayPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JoystickTabletPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Klatt.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>LargeIntegers.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Matrix2x3Plugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MIDIPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SerialPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SocketPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundCodecPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqNamedPrims.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Squeak3D.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>ZipPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTptInetPPC.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTptInternetLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTransportExtnPPC.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTransportLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>QuickTimeLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacNSPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SqueakInBrowser.rsrc</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Resource</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>PowerMgrLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DropPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DragLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>myMacHeaders.pch</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DSAPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MiscPrimitivePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>ADPCMCodecPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundGenerationPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>ThreadsLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>NavigationLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug, WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SecurityPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JPEGReaderPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>StarSqueakPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenGLLibraryStub</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug, WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenGLUtilityStub</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug, WeakImport</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DisplayLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>UUIDPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InternetConfigPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InternetConfigLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>USBManagerLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JPEGReadWriter2Plugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>CarbonAccessors.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Library</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacExternalPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacExternalPrims.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacImageIO.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacImageIO.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMain.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMain.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMemory.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMemory.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacTime.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacTime.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIAppleEvents.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIAppleEvents.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIClipBoard.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIClipBoard.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIConstants.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIEvents.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIEvents.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIMenuBar.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIMenuBar.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacWindow.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacWindow.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqNamedPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqPlatformSpecific.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqVirtualMachine.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqVirtualMachine.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SurfacePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SurfacePlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>UUIDPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>AsynchFilePlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3d.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dDraw.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dInit.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dMain.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dRemap.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dTypes.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DropPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InternetConfigPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JoystickTabletPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MidiPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>securityPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SerialPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SocketPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundCodecPrims.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundGenerationPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sq.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqConfig.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqFilePluginBasicPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqSoundCodecPluginBasicPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacAsyncFilePrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacFileLogic.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacFileLogic.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacDirectory.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacInternetConfiguration.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUUID.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacSound.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacSerialPort.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacSecurity.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacOpenGLInfo.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacOpenGL.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacNetwork.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMIDI.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacOpenGL.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacJoystickAndTablet.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacDragDrop.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FilePlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcapimin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcapistd.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jccoefct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jccolor.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcdctmgr.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jchuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jchuff.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcinit.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcmainct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcmarker.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcmaster.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcomapi.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jconfig.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcparam.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcphuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcprepct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcsample.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jctrans.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdapimin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdapistd.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdatadst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdatasrc.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdcoefct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdcolor.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdct.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jddctmgr.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdhuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdhuff.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdinput.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmainct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmarker.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmaster.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmerge.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdphuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdpostct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdsample.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdtrans.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jerror.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jerror.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jfdctflt.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jfdctfst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jfdctint.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctflt.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctfst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctint.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctred.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jinclude.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemdatadst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemdatasrc.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemmgr.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemnobs.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemsys.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmorecfg.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jpegint.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jpeglib.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JPEGReadWriter2Plugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jquant1.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jquant2.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jutils.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jversion.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Error.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>npmac.cpp</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jni_md.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jni.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jri.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jritypes.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jri_md.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>npapi.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>npupp.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>osExports.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>BMPReadWriterPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>GeniePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>interp os9.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacEncoding.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacEncoding.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacHostWindow.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS></FILEFLAGS>\n                </FILE>\n                <FILE>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacHostWindow.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                    <FILEKIND>Text</FILEKIND>\n                    <FILEFLAGS>Debug</FILEFLAGS>\n                </FILE>\n            </FILELIST>\n            <LINKORDER>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL SIOUX.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InterfaceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MathLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>AsynchFilePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>B2DPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>BitBltPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DropPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FFTPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FilePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FloatArrayPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JoystickTabletPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Klatt.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>LargeIntegers.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Matrix2x3Plugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MIDIPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SerialPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SocketPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundCodecPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacNSPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqNamedPrims.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Squeak3D.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>ZipPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTptInetPPC.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTptInternetLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTransportExtnPPC.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTransportLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>QuickTimeLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>PowerMgrLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SqueakInBrowser.rsrc</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DragLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>myMacHeaders.pch</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DSAPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MiscPrimitivePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>ADPCMCodecPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundGenerationPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>ThreadsLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>NavigationLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SecurityPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JPEGReaderPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>StarSqueakPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenGLLibraryStub</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenGLUtilityStub</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DisplayLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>UUIDPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InternetConfigPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InternetConfigLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>USBManagerLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JPEGReadWriter2Plugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>CarbonAccessors.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacExternalPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacExternalPrims.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacImageIO.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacImageIO.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMain.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMain.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMemory.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMemory.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacTime.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacTime.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIAppleEvents.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIAppleEvents.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIClipBoard.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIClipBoard.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIConstants.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIEvents.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIEvents.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIMenuBar.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUIMenuBar.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacWindow.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacWindow.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqNamedPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqPlatformSpecific.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqVirtualMachine.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqVirtualMachine.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SurfacePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SurfacePlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>UUIDPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>AsynchFilePlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3d.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dDraw.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dInit.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dMain.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dRemap.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>b3dTypes.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>DropPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>InternetConfigPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JoystickTabletPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MidiPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>securityPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SerialPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SocketPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundCodecPrims.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundGenerationPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>SoundPlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sq.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqConfig.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqFilePluginBasicPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqSoundCodecPluginBasicPrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacAsyncFilePrims.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacFileLogic.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacFileLogic.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacDirectory.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacInternetConfiguration.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacUUID.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacSound.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacSerialPort.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacSecurity.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacOpenGLInfo.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacOpenGL.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacNetwork.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacMIDI.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacOpenGL.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacJoystickAndTablet.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacDragDrop.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>FilePlugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcapimin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcapistd.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jccoefct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jccolor.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcdctmgr.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jchuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jchuff.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcinit.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcmainct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcmarker.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcmaster.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcomapi.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jconfig.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcparam.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcphuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcprepct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcsample.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jctrans.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdapimin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdapistd.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdatadst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdatasrc.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdcoefct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdcolor.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdct.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jddctmgr.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdhuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdhuff.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdinput.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmainct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmarker.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmaster.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmerge.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdphuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdpostct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdsample.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdtrans.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jerror.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jerror.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jfdctflt.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jfdctfst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jfdctint.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctflt.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctfst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctint.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctred.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jinclude.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemdatadst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemdatasrc.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemmgr.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemnobs.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemsys.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmorecfg.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jpegint.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jpeglib.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JPEGReadWriter2Plugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jquant1.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jquant2.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jutils.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jversion.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Error.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>npmac.cpp</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jni_md.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jni.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jri.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jritypes.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jri_md.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>npapi.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>npupp.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>osExports.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>BMPReadWriterPlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>GeniePlugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>interp os9.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacEncoding.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacEncoding.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacHostWindow.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>sqMacHostWindow.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n            </LINKORDER>\n        </TARGET>\n    </TARGETLIST>\n\n    <TARGETORDER>\n        <ORDEREDTARGET><NAME>Squeak VM PPC Debug</NAME></ORDEREDTARGET>\n        <ORDEREDTARGET><NAME>Squeak VM PPC Opt</NAME></ORDEREDTARGET>\n        <ORDEREDTARGET><NAME>Squeak VM NS Plugin Opt</NAME></ORDEREDTARGET>\n        <ORDEREDTARGET><NAME>Squeak VM NS Plugin Debug</NAME></ORDEREDTARGET>\n    </TARGETORDER>\n\n    <GROUPLIST>\n        <GROUP><NAME>ANSI Libraries</NAME>\n            <GROUP><NAME>PPC</NAME>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL C.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL SIOUX.PPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n            </GROUP>\n        </GROUP>\n        <GROUP><NAME>Mac Libraries</NAME>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>DisplayLib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>DragLib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>InterfaceLib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>InternetConfigLib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>NavigationLib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <GROUP><NAME>PPC</NAME>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>AppearanceLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>CarbonAccessors.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MathLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MenusLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>MSL RuntimePPC.Lib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenGLLibraryStub</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenGLUtilityStub</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTptInetPPC.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTptInternetLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTransportExtnPPC.o</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>OpenTransportLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>PowerMgrLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>USBManagerLib</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n            </GROUP>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>QuickTimeLib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>ThreadsLib</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n        </GROUP>\n        <GROUP><NAME>Resources</NAME>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>myMacHeaders.pch</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>SqueakApp.r</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>SqueakApp.rsrc</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM NS Plugin Opt</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>SqueakInBrowser.rsrc</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n        </GROUP>\n        <GROUP><NAME>Sources</NAME>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>ADPCMCodecPlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>AsynchFilePlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>AsynchFilePlugin.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>B2DPlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>b3d.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>B3DAcceleratorPlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>B3DAcceleratorPlugin.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>b3dDraw.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>b3dInit.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>b3dMain.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>b3dRemap.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>b3dTypes.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>BitBltPlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>BMPReadWriterPlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>DropPlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>DropPlugin.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>DSAPrims.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>FFTPlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>FilePlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>FilePlugin.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>FloatArrayPlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>GeniePlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>HostWindowPlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>InternetConfigPlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>InternetConfigPlugin.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>interp os9.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM NS Plugin Opt</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>jni.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM NS Plugin Opt</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>jni_md.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>JoystickTabletPlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>JoystickTabletPlugin.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <GROUP><NAME>JPEGPlugin</NAME>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>Error.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcapimin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcapistd.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jccoefct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jccolor.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcdctmgr.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jchuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jchuff.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcinit.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcmainct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcmarker.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcmaster.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcomapi.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Opt</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jconfig.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jconfig.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcparam.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcphuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcprepct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jcsample.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jctrans.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdapimin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdapistd.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdatadst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdatasrc.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdcoefct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdcolor.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdct.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jddctmgr.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdhuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdhuff.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdinput.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmainct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmarker.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmaster.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdmerge.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdphuff.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdpostct.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdsample.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jdtrans.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jerror.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jerror.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jfdctflt.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jfdctfst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jfdctint.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctflt.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctfst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctint.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jidctred.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jinclude.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemdatadst.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemdatasrc.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemmgr.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemnobs.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmemsys.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jmorecfg.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jpegint.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jpeglib.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JPEGReadWriter2Plugin.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>JPEGReadWriter2Plugin.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jquant1.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jquant2.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jutils.c</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n                <FILEREF>\n                    <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                    <PATHTYPE>Name</PATHTYPE>\n                    <PATH>jversion.h</PATH>\n                    <PATHFORMAT>MacOS</PATHFORMAT>\n                </FILEREF>\n            </GROUP>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>JPEGReaderPlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM NS Plugin Opt</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>jri.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM NS Plugin Opt</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>jritypes.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM NS Plugin Opt</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>jri_md.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>Klatt.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>LargeIntegers.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MacMenubarPlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>Matrix2x3Plugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MIDIPlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MidiPlugin.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>MiscPrimitivePlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM NS Plugin Opt</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>npapi.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM NS Plugin Opt</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>npmac.cpp</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM NS Plugin Opt</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>npupp.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>osExports.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>SecurityPlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>securityPlugin.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>SerialPlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>SerialPlugin.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>SocketPlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>SocketPlugin.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>SoundCodecPrims.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>SoundCodecPrims.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>SoundGenerationPlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>SoundGenerationPlugin.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>SoundPlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>SoundPlugin.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sq.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqConfig.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqFilePluginBasicPrims.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacAsyncFilePrims.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacDirectory.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacDragDrop.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacEncoding.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacEncoding.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacExternalPrims.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacExternalPrims.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacFileLogic.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacFileLogic.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacHostWindow.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacHostWindow.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacImageIO.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacImageIO.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacInternetConfiguration.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacJoystickAndTablet.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacMain.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacMain.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacMemory.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacMemory.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacMIDI.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacNetwork.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM NS Plugin Opt</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacNSPlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacOpenGL.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacOpenGL.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacOpenGLInfo.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacSecurity.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacSerialPort.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacSound.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacTime.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacTime.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacUIAppleEvents.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacUIAppleEvents.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacUIClipBoard.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacUIClipBoard.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacUIConstants.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacUIEvents.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacUIEvents.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacUIMenuBar.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacUIMenuBar.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacUUID.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacWindow.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqMacWindow.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqNamedPrims.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqNamedPrims.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqOpenGLRenderer.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqOpenGLRenderer.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqPlatformSpecific.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqSoundCodecPluginBasicPrims.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>Squeak3D.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqVirtualMachine.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>sqVirtualMachine.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>StarSqueakPlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>SurfacePlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>SurfacePlugin.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>UUIDPlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>UUIDPlugin.h</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n            <FILEREF>\n                <TARGETNAME>Squeak VM PPC Debug</TARGETNAME>\n                <PATHTYPE>Name</PATHTYPE>\n                <PATH>ZipPlugin.c</PATH>\n                <PATHFORMAT>MacOS</PATHFORMAT>\n            </FILEREF>\n        </GROUP>\n    </GROUPLIST>\n\n</PROJECT>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Developer/SqueakQL/GeneratePreviewForURL.c",
    "content": "#include <CoreFoundation/CoreFoundation.h>\n#include <CoreServices/CoreServices.h>\n#include <QuickLook/QuickLook.h>\n\n/* no preview*/\n\nOSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options)\n{\n    return noErr;\n}\n\nvoid CancelPreviewGeneration(void* thisInterface, QLPreviewRequestRef preview)\n{\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Developer/SqueakQL/GenerateThumbnailForURL.c",
    "content": "/*\n Copyright (c) 2009 Bert Freudenberg\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n */\n\n\n#include <CoreFoundation/CoreFoundation.h>\n#include <CoreServices/CoreServices.h>\n#include <QuickLook/QuickLook.h>\n\nUInt32 littleEndianUInt32(FILE *stream)\n{\n\tUInt32 n;\n\tfread(&n, 4, 1, stream);\n\treturn CFSwapInt32LittleToHost(n);\n}\n\nUInt16 littleEndianUInt16(FILE *stream)\n{\n\tUInt16 n;\n\tfread(&n, 2, 1, stream);\n\treturn CFSwapInt16LittleToHost(n);\n}\n\n/* We look for \"thumbnail.png\" in the zip which supposedly is a Squeak Etoys\n project file. We assume there is no comment appended (so the zip's EOCD is\n at a fixed offset from the file end) and the thumb is stored uncompressed\n (so we can pass its data directly to QuickLook) */\n\nOSStatus GenerateThumbnailForURL(void *thisInterface, QLThumbnailRequestRef thumbnail, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options, CGSize maxSize)\n{\n\tchar filename[FILENAME_MAX];\n\tCFURLGetFileSystemRepresentation (url, false, (UInt8*) filename, sizeof(filename));\n\t//printf(\"Filename: %s\\n\", filename);\n\t\n\tFILE *stream= fopen(filename, \"r\");\n\t\n\tchar signature[4];\n\t\n\t/* Assuming no zip file comment, the End of Central Directory\n\t   signature starts 22 bytes from the end of the file */\n\tfseek(stream, -22, SEEK_END);\n\tfread(&signature, 4, 1, stream);\n\t\n\tif (0 == strncmp(signature, \"PK\\005\\006\", 4)) {\n\t\tfseek(stream, 8, SEEK_CUR);\n\t\tUInt32 centralDirectorySize= littleEndianUInt32(stream);\n\t\t/* go back to start of Central Directory */\n\t\tfseek(stream, -16-centralDirectorySize, SEEK_CUR);\n\t\tdo {\n\t\t\t/* for each Central Directory entry */\n\t\t\tfread(&signature, 4, 1, stream);\n\t\t\tif (0 == strncmp(signature, \"PK\\001\\002\", 4)) {\n\t\t\t\t/* parse member */\n\t\t\t\tfseek(stream, 20, SEEK_CUR);\n\t\t\t\tUInt32 uncompressedSize= littleEndianUInt32(stream);\n\t\t\t\tUInt16 memberNameLength= littleEndianUInt16(stream);\n\t\t\t\tUInt16 extraFieldLength= littleEndianUInt16(stream);\n\t\t\t\tUInt16 commentLength= littleEndianUInt16(stream);\n\t\t\t\tfseek(stream, 8, SEEK_CUR);\n\t\t\t\tUInt32 memberPos= littleEndianUInt32(stream);\n\t\t\t\tchar memberName[FILENAME_MAX];\n\t\t\t\tfread(&memberName, 1, memberNameLength, stream);\n\t\t\t\tmemberName[memberNameLength]= '\\000';\n\t\t\t\tfseek(stream, extraFieldLength + commentLength, SEEK_CUR);\n\t\t\t\t\n\t\t\t\t//printf(\"name: %s\\n\", memberName);\n\t\t\t\t//printf(\"offs: 0x%x\\n\", memberPos);\n\t\t\t\t//printf(\"size: %i\\n\", uncompressedSize);\n\t\t\t\tif (0 == strcmp(memberName, \"thumbnail.png\")) {\n\t\t\t\t\tchar thumbBytes[20000];\n\t\t\t\t\tif (uncompressedSize > sizeof(thumbBytes))\n\t\t\t\t\t\tgoto done;\n\t\t\t\t\tfseek(stream, memberPos+30+memberNameLength+extraFieldLength, SEEK_SET);\n\t\t\t\t\t/* assume thumbnail is stored unencrypted and uncompressed */\n\t\t\t\t\tfread(thumbBytes, uncompressedSize, 1, stream);\n\t\t\t\t\tif (0 == strncmp(thumbBytes, \"\\211PNG\", 4)) {\n\t\t\t\t\t\t/* it worked! */\n\t\t\t\t\t\t//printf(\"PNG found!\\n\");\n\t\t\t\t\t\tCFDataRef thumbData= CFDataCreate(kCFAllocatorDefault, (UInt8*)thumbBytes, uncompressedSize);\n\t\t\t\t\t\tQLThumbnailRequestSetImageWithData(thumbnail, thumbData, NULL);\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t/* whether it worked or not, we're done here */\n\t\t\t\t\tgoto done;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t/* End of Central Directory */\n\t\t\t\tgoto done;\n\t\t\t}\n\t\t} while (true);\n\t} else {\n\t\t//printf(\"End of Central Directory not found\\n\");\n\t}\n\t\ndone:\n\t\n\tfclose(stream);\n\t\n    return noErr;\n}\n\nvoid CancelThumbnailGeneration(void* thisInterface, QLThumbnailRequestRef thumbnail)\n{\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Developer/SqueakQL/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleDocumentTypes</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>QLGenerator</string>\n\t\t\t<key>LSItemContentTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>org.squeak.project</string>\n\t\t\t</array>\n\t\t</dict>\n\t</array>\n\t<key>CFBundleExecutable</key>\n\t<string>${EXECUTABLE_NAME}</string>\n\t<key>CFBundleIconFile</key>\n\t<string></string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.qlgenerator.${PRODUCT_NAME:identifier}</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>${PRODUCT_NAME}</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1</string>\n\t<key>CFBundleVersion</key>\n\t<string>1.0</string>\n\t<key>CFPlugInDynamicRegisterFunction</key>\n\t<string></string>\n\t<key>CFPlugInDynamicRegistration</key>\n\t<string>NO</string>\n\t<key>CFPlugInFactories</key>\n\t<dict>\n\t\t<key>FFD8E9C9-4777-4502-811C-15503F9D31EA</key>\n\t\t<string>QuickLookGeneratorPluginFactory</string>\n\t</dict>\n\t<key>CFPlugInTypes</key>\n\t<dict>\n\t\t<key>5E2D9680-5022-40FA-B806-43349622E5B9</key>\n\t\t<array>\n\t\t\t<string>FFD8E9C9-4777-4502-811C-15503F9D31EA</string>\n\t\t</array>\n\t</dict>\n\t<key>CFPlugInUnloadFunction</key>\n\t<string></string>\n\t<key>QLNeedsToBeRunInMainThread</key>\n\t<false/>\n\t<key>QLPreviewHeight</key>\n\t<integer>0</integer>\n\t<key>QLPreviewWidth</key>\n\t<integer>0</integer>\n\t<key>QLSupportsConcurrentRequests</key>\n\t<false/>\n\t<key>QLThumbnailMinimumSize</key>\n\t<real>17</real>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Developer/SqueakQL/SqueakQL.xcodeproj/bert.mode1v3",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>ActivePerspectiveName</key>\n\t<string>Project</string>\n\t<key>AllowedModules</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Groups and Files Outline View</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCTaskListModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Task List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDetailModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>File and Smart Group Detail Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Detailed Build Results Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Batch Find Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Format Conflicts List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXCVSModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Source Code Control Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Breakpoints Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDockableInspector</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Inspector</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXOpenQuicklyModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Open Quickly Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Console</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCSnapshotModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Snapshots Tool</string>\n\t\t</dict>\n\t</array>\n\t<key>BundlePath</key>\n\t<string>/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources</string>\n\t<key>Description</key>\n\t<string>DefaultDescriptionKey</string>\n\t<key>DockingSystemVisible</key>\n\t<false/>\n\t<key>Extension</key>\n\t<string>mode1v3</string>\n\t<key>FavBarConfig</key>\n\t<dict>\n\t\t<key>PBXProjectModuleGUID</key>\n\t\t<string>4C42C465103B6D9C0059C21A</string>\n\t\t<key>XCBarModuleItemNames</key>\n\t\t<dict/>\n\t\t<key>XCBarModuleItems</key>\n\t\t<array/>\n\t</dict>\n\t<key>FirstTimeWindowDisplayed</key>\n\t<false/>\n\t<key>Identifier</key>\n\t<string>com.apple.perspectives.project.mode1v3</string>\n\t<key>MajorVersion</key>\n\t<integer>33</integer>\n\t<key>MinorVersion</key>\n\t<integer>0</integer>\n\t<key>Name</key>\n\t<string>Default</string>\n\t<key>Notifications</key>\n\t<array/>\n\t<key>OpenEditors</key>\n\t<array/>\n\t<key>PerspectiveWidths</key>\n\t<array>\n\t\t<integer>-1</integer>\n\t\t<integer>-1</integer>\n\t</array>\n\t<key>Perspectives</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>ChosenToolbarItems</key>\n\t\t\t<array>\n\t\t\t\t<string>active-combo-popup</string>\n\t\t\t\t<string>action</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>buildOrClean</string>\n\t\t\t\t<string>build-and-goOrGo</string>\n\t\t\t\t<string>com.apple.ide.PBXToolbarStopButton</string>\n\t\t\t\t<string>get-info</string>\n\t\t\t\t<string>toggle-editor</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>com.apple.pbx.toolbar.searchfield</string>\n\t\t\t</array>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProjectWithEditor</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.project</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>089C166AFE841209C02AAC07</string>\n\t\t\t\t\t\t\t\t<string>08FB77AFFE84173DC02AAC07</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 445}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 463}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>1016 596 788 504 0 0 1920 1178 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>203pt</string>\n\t\t\t\t</dict>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>GeneratePreviewForURL.c</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CE0B20406471E060097A5F4</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>GeneratePreviewForURL.c</string>\n\t\t\t\t\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t\t\t\t\t<string>4C6ADC2E103C092B004659EE</string>\n\t\t\t\t\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>4CCA1982103B72E400C2C8C6</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>4CCA1987103B72E400C2C8C6</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t\t<key>prevStack</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>4CCA1984103B72E400C2C8C6</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>4CCA1985103B72E400C2C8C6</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {580, 285}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>1016 596 788 504 0 0 1920 1178 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>285pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 290}, {580, 173}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>1016 596 788 504 0 0 1920 1178 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>173pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>580pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>4C6ADC2B103C092B004659EE</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>4C6ADC2C103C092B004659EE</string>\n\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.defaultV3</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProject</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.morph</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>29B97314FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 337}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 355}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>373 269 690 397 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Morph</string>\n\t\t\t<key>PreferredWidth</key>\n\t\t\t<integer>300</integer>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default.shortV3</string>\n\t\t</dict>\n\t</array>\n\t<key>PerspectivesBarVisible</key>\n\t<false/>\n\t<key>ShelfIsVisible</key>\n\t<false/>\n\t<key>SourceDescription</key>\n\t<string>file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string>\n\t<key>StatusbarIsVisible</key>\n\t<true/>\n\t<key>TimeStamp</key>\n\t<real>0.0</real>\n\t<key>ToolbarDisplayMode</key>\n\t<integer>1</integer>\n\t<key>ToolbarIsVisible</key>\n\t<true/>\n\t<key>ToolbarSizeMode</key>\n\t<integer>1</integer>\n\t<key>Type</key>\n\t<string>Perspectives</string>\n\t<key>UpdateMessage</key>\n\t<string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the \"Metro-Morph\" feature).  You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature.  Do you wish to update to the latest Workspace defaults for project '%@'?</string>\n\t<key>WindowJustification</key>\n\t<integer>5</integer>\n\t<key>WindowOrderList</key>\n\t<array>\n\t\t<string>4C42C457103B65B50059C21A</string>\n\t\t<string>/Users/bert/Squeakland-SVN/os-x/xcode/SqueakQL/SqueakQL.xcodeproj</string>\n\t</array>\n\t<key>WindowString</key>\n\t<string>1016 596 788 504 0 0 1920 1178 </string>\n\t<key>WindowToolsV3</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.build</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string></string>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {500, 0}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>976 530 500 500 0 0 1920 1178 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>0pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Build</string>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Collapse</key>\n\t\t\t\t\t\t\t\t<integer>1021</integer>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Open</key>\n\t\t\t\t\t\t\t\t<integer>1011</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 5}, {500, 454}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>976 530 500 500 0 0 1920 1178 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>454pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>459pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Build Results</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>4C42C457103B65B50059C21A</string>\n\t\t\t\t<string>4C6ADC2D103C092B004659EE</string>\n\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.buildV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>976 530 500 500 0 0 1920 1178 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>4C42C457103B65B50059C21A</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugger</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Debugger</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {317, 164}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{317, 0}, {377, 164}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {694, 164}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 164}, {694, 216}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debug - GLUTExamples (Underwater)</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>DebugConsoleDrawerSize</key>\n\t\t\t\t\t\t\t\t<string>{100, 120}</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleVisible</key>\n\t\t\t\t\t\t\t\t<string>None</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>DebugSTDIOWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {694, 380}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>321 238 694 422 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t\t<string>1C0AD2AB069F1E9B00FABCE6</string>\n\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t<string>1C0AD2AC069F1E9B00FABCE6</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>321 238 694 422 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.find</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t\t\t<string>1CD0528D0623707200166675</string>\n\t\t\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {781, 167}}</string>\n\t\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t\t<string>62 385 781 470 0 0 1440 878 </string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t\t\t<string>781pt</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>50%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Project Find</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{8, 0}, {773, 254}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>62 385 781 470 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>50%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>428pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Find</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t\t<string>1C530D58069F1CE1000CFCEE</string>\n\t\t\t\t<string>1C530D59069F1CE1000CFCEE</string>\n\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t<string>1C530D5A069F1CE1000CFCEE</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>62 385 781 470 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>MENUSEPARATOR</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debuggerConsole</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debugger Console</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {650, 250}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>516 632 650 250 0 0 1680 1027 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>209pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>209pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger Console</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t\t<string>1C78EAAE065D492600B07095</string>\n\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.consoleV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>650 41 650 250 0 0 1280 1002 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.snapshots</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCSnapshotModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Snapshots</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCSnapshotModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<string>Yes</string>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.snapshots</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>315 824 300 550 0 0 1440 878 </string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<string>Yes</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.scm</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1C78EAB3065D492600B07095</string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>0pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>SCM</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ConsoleFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 259}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 7}, {452, 259}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t\t<key>TableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>Status</string>\n\t\t\t\t\t\t\t\t\t<real>30</real>\n\t\t\t\t\t\t\t\t\t<string>FileName</string>\n\t\t\t\t\t\t\t\t\t<real>199</real>\n\t\t\t\t\t\t\t\t\t<string>Path</string>\n\t\t\t\t\t\t\t\t\t<real>197.0950012207031</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>TableFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 250}}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>262pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>266pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>SCM</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAB4065D492600B07095</string>\n\t\t\t\t<string>1C78EAB5065D492600B07095</string>\n\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.scm</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.breakpoints</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t\t\t<string>no</string>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {168, 350}}</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {185, 368}}</string>\n\t\t\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>185pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{190, 0}, {554, 368}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>554pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>368pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>MajorVersion</key>\n\t\t\t<integer>3</integer>\n\t\t\t<key>MinorVersion</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Name</key>\n\t\t\t<string>Breakpoints</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CDDB66807F98D9800BB5817</string>\n\t\t\t\t<string>1CDDB66907F98D9800BB5817</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.breakpointsV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CDDB66807F98D9800BB5817</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugAnimator</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Visualizer</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugAnimatorV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>100 100 700 500 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.bookmarks</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>538 42 401 187 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.projectFormatConflicts</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Format Conflicts</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowContentMinSize</key>\n\t\t\t<string>450 300</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>50 850 472 307 0 0 1440 877</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.classBrowser</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>OptionsSetName</key>\n\t\t\t\t\t\t\t\t<string>Hierarchy, all classes</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Class Browser - NSObject</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ClassesFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {374, 96}}</string>\n\t\t\t\t\t\t\t\t<key>ClassesTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXClassNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>208</real>\n\t\t\t\t\t\t\t\t\t<string>PBXClassBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {630, 331}}</string>\n\t\t\t\t\t\t\t\t<key>MembersFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 105}, {374, 395}}</string>\n\t\t\t\t\t\t\t\t<key>MembersTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeIconColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>216</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>97</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>332pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>332pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t\t<string>1C0AD2B0069F1E9B00FABCE6</string>\n\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.classbrowser</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.refactoring</string>\n\t\t\t<key>IncludeInToolsMenu</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{0, 0}, {500, 335}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{0, 0}, {500, 335}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCRefactoringModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Refactoring</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCRefactoringModule</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>200 200 500 356 0 0 1920 1200 </string>\n\t\t</dict>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Developer/SqueakQL/SqueakQL.xcodeproj/bert.pbxuser",
    "content": "// !$*UTF8*$!\n{\n\t089C1669FE841209C02AAC07 /* Project object */ = {\n\t\tactiveBuildConfigurationName = Debug;\n\t\tactiveSDKPreference = macosx10.5;\n\t\tactiveTarget = 8D57630D048677EA00EA77CD /* SqueakQL */;\n\t\tcodeSenseManager = 4C42C428103B1B040059C21A /* Code sense */;\n\t\tperUserDictionary = {\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t341,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t\t20,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Target_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXPerProjectTemplateStateSaveDate = 272369929;\n\t\t\tPBXWorkspaceStateSaveDate = 272369929;\n\t\t};\n\t\tperUserProjectItems = {\n\t\t\t4C6ADC2E103C092B004659EE /* PBXTextBookmark */ = 4C6ADC2E103C092B004659EE /* PBXTextBookmark */;\n\t\t\t4CCA1982103B72E400C2C8C6 /* PBXTextBookmark */ = 4CCA1982103B72E400C2C8C6 /* PBXTextBookmark */;\n\t\t\t4CCA1984103B72E400C2C8C6 /* PBXTextBookmark */ = 4CCA1984103B72E400C2C8C6 /* PBXTextBookmark */;\n\t\t\t4CCA1985103B72E400C2C8C6 /* PBXTextBookmark */ = 4CCA1985103B72E400C2C8C6 /* PBXTextBookmark */;\n\t\t\t4CCA1987103B72E400C2C8C6 /* PBXTextBookmark */ = 4CCA1987103B72E400C2C8C6 /* PBXTextBookmark */;\n\t\t};\n\t\tsourceControlManager = 4C42C427103B1B040059C21A /* Source Control */;\n\t\tuserBuildSettings = {\n\t\t};\n\t};\n\t089C167EFE841241C02AAC07 /* English */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1197, 649}}\";\n\t\t\tsepNavSelRange = \"{194, 0}\";\n\t\t\tsepNavVisRange = \"{0, 198}\";\n\t\t\tsepNavWindowFrame = \"{{268, 165}, {1256, 777}}\";\n\t\t};\n\t};\n\t08FB77B6FE84183AC02AAC07 /* main.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {775, 3796}}\";\n\t\t\tsepNavSelRange = \"{3122, 54}\";\n\t\t\tsepNavVisRange = \"{2713, 594}\";\n\t\t};\n\t};\n\t2C05A19B06CAA52B00D84F6F /* GeneratePreviewForURL.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1041, 253}}\";\n\t\t\tsepNavSelRange = \"{131, 0}\";\n\t\t\tsepNavVisRange = \"{0, 387}\";\n\t\t\tsepNavWindowFrame = \"{{275, 255}, {1256, 777}}\";\n\t\t};\n\t};\n\t4C42C427103B1B040059C21A /* Source Control */ = {\n\t\tisa = PBXSourceControlManager;\n\t\tfallbackIsa = XCSourceControlManager;\n\t\tisSCMEnabled = 0;\n\t\tscmConfiguration = {\n\t\t};\n\t};\n\t4C42C428103B1B040059C21A /* Code sense */ = {\n\t\tisa = PBXCodeSenseManager;\n\t\tindexTemplatePath = \"\";\n\t};\n\t4C6ADC2E103C092B004659EE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 2C05A19B06CAA52B00D84F6F /* GeneratePreviewForURL.c */;\n\t\tname = \"GeneratePreviewForURL.c: 5\";\n\t\trLen = 0;\n\t\trLoc = 131;\n\t\trType = 0;\n\t\tvrLen = 387;\n\t\tvrLoc = 0;\n\t};\n\t4CCA1982103B72E400C2C8C6 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 61E3BCFA0870B4F2002186A0 /* GenerateThumbnailForURL.c */;\n\t\tname = \"GenerateThumbnailForURL.c: 7\";\n\t\trLen = 0;\n\t\trLoc = 3836;\n\t\trType = 0;\n\t\tvrLen = 398;\n\t\tvrLoc = 0;\n\t};\n\t4CCA1984103B72E400C2C8C6 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 61E3BCFA0870B4F2002186A0 /* GenerateThumbnailForURL.c */;\n\t\tname = \"GenerateThumbnailForURL.c: 98\";\n\t\trLen = 0;\n\t\trLoc = 3836;\n\t\trType = 0;\n\t\tvrLen = 439;\n\t\tvrLoc = 3376;\n\t};\n\t4CCA1985103B72E400C2C8C6 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 2C05A19B06CAA52B00D84F6F /* GeneratePreviewForURL.c */;\n\t\tname = \"GeneratePreviewForURL.c: 5\";\n\t\trLen = 0;\n\t\trLoc = 131;\n\t\trType = 0;\n\t\tvrLen = 387;\n\t\tvrLoc = 0;\n\t};\n\t4CCA1987103B72E400C2C8C6 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 2C05A19B06CAA52B00D84F6F /* GeneratePreviewForURL.c */;\n\t\tname = \"GeneratePreviewForURL.c: 5\";\n\t\trLen = 0;\n\t\trLoc = 131;\n\t\trType = 0;\n\t\tvrLen = 387;\n\t\tvrLoc = 0;\n\t};\n\t61E3BCFA0870B4F2002186A0 /* GenerateThumbnailForURL.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1197, 1776}}\";\n\t\t\tsepNavSelRange = \"{3254, 0}\";\n\t\t\tsepNavVisRange = \"{2748, 1198}\";\n\t\t\tsepNavWindowFrame = \"{{618, 121}, {1256, 777}}\";\n\t\t};\n\t};\n\t8D57630D048677EA00EA77CD /* SqueakQL */ = {\n\t\tactiveExec = 0;\n\t};\n\t8D576317048677EA00EA77CD /* Info.plist */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavWindowFrame = \"{{291, 144}, {1256, 777}}\";\n\t\t};\n\t};\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Developer/SqueakQL/SqueakQL.xcodeproj/johnmci.mode1v3",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>ActivePerspectiveName</key>\n\t<string>Project</string>\n\t<key>AllowedModules</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Groups and Files Outline View</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCTaskListModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Task List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDetailModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>File and Smart Group Detail Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Detailed Build Results Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Batch Find Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Format Conflicts List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXCVSModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Source Code Control Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Breakpoints Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDockableInspector</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Inspector</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXOpenQuicklyModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Open Quickly Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Console</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCSnapshotModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Snapshots Tool</string>\n\t\t</dict>\n\t</array>\n\t<key>BundlePath</key>\n\t<string>/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources</string>\n\t<key>Description</key>\n\t<string>DefaultDescriptionKey</string>\n\t<key>DockingSystemVisible</key>\n\t<false/>\n\t<key>Extension</key>\n\t<string>mode1v3</string>\n\t<key>FavBarConfig</key>\n\t<dict>\n\t\t<key>PBXProjectModuleGUID</key>\n\t\t<string>943801FB103CAFFE00A1E999</string>\n\t\t<key>XCBarModuleItemNames</key>\n\t\t<dict/>\n\t\t<key>XCBarModuleItems</key>\n\t\t<array/>\n\t</dict>\n\t<key>FirstTimeWindowDisplayed</key>\n\t<false/>\n\t<key>Identifier</key>\n\t<string>com.apple.perspectives.project.mode1v3</string>\n\t<key>MajorVersion</key>\n\t<integer>33</integer>\n\t<key>MinorVersion</key>\n\t<integer>0</integer>\n\t<key>Name</key>\n\t<string>Default</string>\n\t<key>Notifications</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>XCObserverAutoDisconnectKey</key>\n\t\t\t<true/>\n\t\t\t<key>XCObserverDefintionKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusErrorsKey</key>\n\t\t\t\t<integer>0</integer>\n\t\t\t</dict>\n\t\t\t<key>XCObserverFactoryKey</key>\n\t\t\t<string>XCPerspectivesSpecificationIdentifier</string>\n\t\t\t<key>XCObserverGUIDKey</key>\n\t\t\t<string>XCObserverProjectIdentifier</string>\n\t\t\t<key>XCObserverNotificationKey</key>\n\t\t\t<string>PBXStatusBuildStateMessageNotification</string>\n\t\t\t<key>XCObserverTargetKey</key>\n\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t<key>XCObserverTriggerKey</key>\n\t\t\t<string>awakenModuleWithObserver:</string>\n\t\t\t<key>XCObserverValidationKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusErrorsKey</key>\n\t\t\t\t<integer>2</integer>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>XCObserverAutoDisconnectKey</key>\n\t\t\t<true/>\n\t\t\t<key>XCObserverDefintionKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusWarningsKey</key>\n\t\t\t\t<integer>0</integer>\n\t\t\t</dict>\n\t\t\t<key>XCObserverFactoryKey</key>\n\t\t\t<string>XCPerspectivesSpecificationIdentifier</string>\n\t\t\t<key>XCObserverGUIDKey</key>\n\t\t\t<string>XCObserverProjectIdentifier</string>\n\t\t\t<key>XCObserverNotificationKey</key>\n\t\t\t<string>PBXStatusBuildStateMessageNotification</string>\n\t\t\t<key>XCObserverTargetKey</key>\n\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t<key>XCObserverTriggerKey</key>\n\t\t\t<string>awakenModuleWithObserver:</string>\n\t\t\t<key>XCObserverValidationKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusWarningsKey</key>\n\t\t\t\t<integer>2</integer>\n\t\t\t</dict>\n\t\t</dict>\n\t</array>\n\t<key>OpenEditors</key>\n\t<array/>\n\t<key>PerspectiveWidths</key>\n\t<array>\n\t\t<integer>-1</integer>\n\t\t<integer>-1</integer>\n\t</array>\n\t<key>Perspectives</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>ChosenToolbarItems</key>\n\t\t\t<array>\n\t\t\t\t<string>active-target-popup</string>\n\t\t\t\t<string>active-platform-popup</string>\n\t\t\t\t<string>active-buildstyle-popup</string>\n\t\t\t\t<string>action</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>buildOrClean</string>\n\t\t\t\t<string>build-and-goOrGo</string>\n\t\t\t\t<string>com.apple.ide.PBXToolbarStopButton</string>\n\t\t\t\t<string>get-info</string>\n\t\t\t\t<string>toggle-editor</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>com.apple.pbx.toolbar.searchfield</string>\n\t\t\t</array>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProjectWithEditor</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.project</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>089C166AFE841209C02AAC07</string>\n\t\t\t\t\t\t\t\t<string>08FB77AFFE84173DC02AAC07</string>\n\t\t\t\t\t\t\t\t<string>089C167CFE841241C02AAC07</string>\n\t\t\t\t\t\t\t\t<string>19C28FB6FE9D52B211CA2CBB</string>\n\t\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>94F4B5D4103DA39B00AB2C19</string>\n\t\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>10</integer>\n\t\t\t\t\t\t\t\t\t<integer>9</integer>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 795}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 813}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>89 -89 1191 854 0 0 1680 1028 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>203pt</string>\n\t\t\t\t</dict>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>GenerateThumbnailForURL.c</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CE0B20406471E060097A5F4</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>GenerateThumbnailForURL.c</string>\n\t\t\t\t\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t\t\t\t\t<string>94F4B5D6103DA3E200AB2C19</string>\n\t\t\t\t\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>94380303103CB0AE00A1E999</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94923091103D043800DBE2CE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>949230A8103D046700DBE2CE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F4B5B7103DA33F00AB2C19</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F4B5B8103DA33F00AB2C19</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t\t<key>prevStack</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>94380305103CB0AE00A1E999</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94380306103CB0AE00A1E999</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94923096103D043800DBE2CE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94923097103D043800DBE2CE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>949230AA103D046700DBE2CE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F4B5B9103DA33F00AB2C19</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F4B5BA103DA33F00AB2C19</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {983, 635}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>89 -89 1191 854 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>635pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 640}, {983, 173}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>89 -89 1191 854 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>173pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>983pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>94F4B5BC103DA33F00AB2C19</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>94F4B5BD103DA33F00AB2C19</string>\n\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.defaultV3</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProject</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.morph</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>29B97314FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 337}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 355}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>373 269 690 397 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Morph</string>\n\t\t\t<key>PreferredWidth</key>\n\t\t\t<integer>300</integer>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default.shortV3</string>\n\t\t</dict>\n\t</array>\n\t<key>PerspectivesBarVisible</key>\n\t<false/>\n\t<key>ShelfIsVisible</key>\n\t<false/>\n\t<key>SourceDescription</key>\n\t<string>file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string>\n\t<key>StatusbarIsVisible</key>\n\t<true/>\n\t<key>TimeStamp</key>\n\t<real>272474930.71802098</real>\n\t<key>ToolbarDisplayMode</key>\n\t<integer>1</integer>\n\t<key>ToolbarIsVisible</key>\n\t<true/>\n\t<key>ToolbarSizeMode</key>\n\t<integer>2</integer>\n\t<key>Type</key>\n\t<string>Perspectives</string>\n\t<key>UpdateMessage</key>\n\t<string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the \"Metro-Morph\" feature).  You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature.  Do you wish to update to the latest Workspace defaults for project '%@'?</string>\n\t<key>WindowJustification</key>\n\t<integer>5</integer>\n\t<key>WindowOrderList</key>\n\t<array>\n\t\t<string>/Users/johnmci/Documents/Squeak3.8.0/platforms/Mac OS/vm/Developer/SqueakQL/SqueakQL.xcodeproj</string>\n\t</array>\n\t<key>WindowString</key>\n\t<string>89 -89 1191 854 0 0 1680 1028 </string>\n\t<key>WindowToolsV3</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.build</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string></string>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {500, 218}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>467 386 500 500 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>218pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Build</string>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Collapse</key>\n\t\t\t\t\t\t\t\t<integer>1021</integer>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Open</key>\n\t\t\t\t\t\t\t\t<integer>1013</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 223}, {500, 236}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>467 386 500 500 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>236pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>459pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Build Results</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>9438030A103CB0AE00A1E999</string>\n\t\t\t\t<string>9492309A103D043800DBE2CE</string>\n\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.buildV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>467 386 500 500 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>9438030A103CB0AE00A1E999</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugger</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Debugger</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {316, 185}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{316, 0}, {378, 185}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {694, 185}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 185}, {694, 196}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debug - GLUTExamples (Underwater)</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>DebugConsoleVisible</key>\n\t\t\t\t\t\t\t\t<string>None</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>DebugSTDIOWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {694, 381}}</string>\n\t\t\t\t\t\t\t\t<key>PBXDebugSessionStackFrameViewKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>DebugVariablesTableConfiguration</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>Name</string>\n\t\t\t\t\t\t\t\t\t\t<real>120</real>\n\t\t\t\t\t\t\t\t\t\t<string>Value</string>\n\t\t\t\t\t\t\t\t\t\t<real>85</real>\n\t\t\t\t\t\t\t\t\t\t<string>Summary</string>\n\t\t\t\t\t\t\t\t\t\t<real>148</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t<string>{{316, 0}, {378, 185}}</string>\n\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t<string>467 464 694 422 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>467 464 694 422 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>381pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>381pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t\t<string>9492309B103D043800DBE2CE</string>\n\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t<string>9492309C103D043800DBE2CE</string>\n\t\t\t\t<string>9492309D103D043800DBE2CE</string>\n\t\t\t\t<string>9492309E103D043800DBE2CE</string>\n\t\t\t\t<string>9492309F103D043800DBE2CE</string>\n\t\t\t\t<string>949230A0103D043800DBE2CE</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>467 464 694 422 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.find</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t\t\t<string>1CD0528D0623707200166675</string>\n\t\t\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {781, 167}}</string>\n\t\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t\t<string>62 385 781 470 0 0 1440 878 </string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t\t\t<string>781pt</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>50%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Project Find</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{8, 0}, {773, 254}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>62 385 781 470 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>50%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>428pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Find</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t\t<string>1C530D58069F1CE1000CFCEE</string>\n\t\t\t\t<string>1C530D59069F1CE1000CFCEE</string>\n\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t<string>1C530D5A069F1CE1000CFCEE</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>62 385 781 470 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>MENUSEPARATOR</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debuggerConsole</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debugger Console</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1076, 780}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>467 65 1076 821 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>780pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>780pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger Console</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t\t<string>949230A1103D043800DBE2CE</string>\n\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.consoleV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>467 65 1076 821 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.snapshots</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCSnapshotModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Snapshots</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCSnapshotModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<string>Yes</string>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.snapshots</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>315 824 300 550 0 0 1440 878 </string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<string>Yes</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.scm</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1C78EAB3065D492600B07095</string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>0pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>SCM</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ConsoleFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 259}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 7}, {452, 259}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t\t<key>TableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>Status</string>\n\t\t\t\t\t\t\t\t\t<real>30</real>\n\t\t\t\t\t\t\t\t\t<string>FileName</string>\n\t\t\t\t\t\t\t\t\t<real>199</real>\n\t\t\t\t\t\t\t\t\t<string>Path</string>\n\t\t\t\t\t\t\t\t\t<real>197.0950012207031</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>TableFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 250}}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>262pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>266pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>SCM</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAB4065D492600B07095</string>\n\t\t\t\t<string>1C78EAB5065D492600B07095</string>\n\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.scm</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.breakpoints</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t\t\t<string>no</string>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {168, 350}}</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {185, 368}}</string>\n\t\t\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>185pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{190, 0}, {554, 368}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>554pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>368pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>MajorVersion</key>\n\t\t\t<integer>3</integer>\n\t\t\t<key>MinorVersion</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Name</key>\n\t\t\t<string>Breakpoints</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CDDB66807F98D9800BB5817</string>\n\t\t\t\t<string>1CDDB66907F98D9800BB5817</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.breakpointsV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CDDB66807F98D9800BB5817</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugAnimator</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Visualizer</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugAnimatorV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>100 100 700 500 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.bookmarks</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>538 42 401 187 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.projectFormatConflicts</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Format Conflicts</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowContentMinSize</key>\n\t\t\t<string>450 300</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>50 850 472 307 0 0 1440 877</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.classBrowser</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>OptionsSetName</key>\n\t\t\t\t\t\t\t\t<string>Hierarchy, all classes</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Class Browser - NSObject</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ClassesFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {374, 96}}</string>\n\t\t\t\t\t\t\t\t<key>ClassesTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXClassNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>208</real>\n\t\t\t\t\t\t\t\t\t<string>PBXClassBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {630, 331}}</string>\n\t\t\t\t\t\t\t\t<key>MembersFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 105}, {374, 395}}</string>\n\t\t\t\t\t\t\t\t<key>MembersTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeIconColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>216</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>97</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>332pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>332pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t\t<string>1C0AD2B0069F1E9B00FABCE6</string>\n\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.classbrowser</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.refactoring</string>\n\t\t\t<key>IncludeInToolsMenu</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{0, 0}, {500, 335}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{0, 0}, {500, 335}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCRefactoringModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Refactoring</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCRefactoringModule</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>200 200 500 356 0 0 1920 1200 </string>\n\t\t</dict>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Developer/SqueakQL/SqueakQL.xcodeproj/johnmci.pbxuser",
    "content": "// !$*UTF8*$!\n{\n\t089C1669FE841209C02AAC07 /* Project object */ = {\n\t\tactiveBuildConfigurationName = Debug;\n\t\tactiveExecutable = 94923083103D036400DBE2CE /* qlmanage */;\n\t\tactiveTarget = 8D57630D048677EA00EA77CD /* SqueakQL */;\n\t\tbreakpoints = (\n\t\t\t9492308D103D040A00DBE2CE /* GenerateThumbnailForURL.c:47 */,\n\t\t\t949230A5103D045000DBE2CE /* GeneratePreviewForURL.c:9 */,\n\t\t);\n\t\tcodeSenseManager = 943801FD103CAFFE00A1E999 /* Code sense */;\n\t\texecutables = (\n\t\t\t94923083103D036400DBE2CE /* qlmanage */,\n\t\t);\n\t\tperUserDictionary = {\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXExecutablesDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXExecutablesDataSource_NameID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t22,\n\t\t\t\t\t300,\n\t\t\t\t\t632,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXExecutablesDataSource_ActiveFlagID,\n\t\t\t\t\tPBXExecutablesDataSource_NameID,\n\t\t\t\t\tPBXExecutablesDataSource_CommentsID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t744,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t\t20,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Target_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t704,\n\t\t\t\t\t60,\n\t\t\t\t\t20,\n\t\t\t\t\t48.16259765625,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXTargetDataSource_PrimaryAttribute,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXPerProjectTemplateStateSaveDate = 272474930;\n\t\t\tPBXWorkspaceStateSaveDate = 272474930;\n\t\t};\n\t\tperUserProjectItems = {\n\t\t\t94380303103CB0AE00A1E999 /* PBXTextBookmark */ = 94380303103CB0AE00A1E999 /* PBXTextBookmark */;\n\t\t\t94380305103CB0AE00A1E999 /* PlistBookmark */ = 94380305103CB0AE00A1E999 /* PlistBookmark */;\n\t\t\t94380306103CB0AE00A1E999 /* PBXTextBookmark */ = 94380306103CB0AE00A1E999 /* PBXTextBookmark */;\n\t\t\t94923091103D043800DBE2CE /* PlistBookmark */ = 94923091103D043800DBE2CE /* PlistBookmark */;\n\t\t\t94923096103D043800DBE2CE /* PBXTextBookmark */ = 94923096103D043800DBE2CE /* PBXTextBookmark */;\n\t\t\t94923097103D043800DBE2CE /* PBXTextBookmark */ = 94923097103D043800DBE2CE /* PBXTextBookmark */;\n\t\t\t949230A8103D046700DBE2CE /* PBXTextBookmark */ = 949230A8103D046700DBE2CE /* PBXTextBookmark */;\n\t\t\t949230AA103D046700DBE2CE /* PBXTextBookmark */ = 949230AA103D046700DBE2CE /* PBXTextBookmark */;\n\t\t\t94F4B5B7103DA33F00AB2C19 /* PBXTextBookmark */ = 94F4B5B7103DA33F00AB2C19 /* PBXTextBookmark */;\n\t\t\t94F4B5B8103DA33F00AB2C19 /* PBXTextBookmark */ = 94F4B5B8103DA33F00AB2C19 /* PBXTextBookmark */;\n\t\t\t94F4B5B9103DA33F00AB2C19 /* PBXTextBookmark */ = 94F4B5B9103DA33F00AB2C19 /* PBXTextBookmark */;\n\t\t\t94F4B5BA103DA33F00AB2C19 /* PBXTextBookmark */ = 94F4B5BA103DA33F00AB2C19 /* PBXTextBookmark */;\n\t\t\t94F4B5D6103DA3E200AB2C19 /* PBXTextBookmark */ = 94F4B5D6103DA3E200AB2C19 /* PBXTextBookmark */;\n\t\t};\n\t\tsourceControlManager = 943801FC103CAFFE00A1E999 /* Source Control */;\n\t\tuserBuildSettings = {\n\t\t};\n\t};\n\t089C167EFE841241C02AAC07 /* English */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {934, 603}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 198}\";\n\t\t};\n\t};\n\t08FB77B6FE84183AC02AAC07 /* main.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1032, 3150}}\";\n\t\t\tsepNavSelRange = \"{1279, 23}\";\n\t\t\tsepNavVisRange = \"{396, 1671}\";\n\t\t};\n\t};\n\t2C05A19B06CAA52B00D84F6F /* GeneratePreviewForURL.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {934, 603}}\";\n\t\t\tsepNavSelRange = \"{142, 21}\";\n\t\t\tsepNavVisRange = \"{0, 387}\";\n\t\t};\n\t};\n\t61E3BCFA0870B4F2002186A0 /* GenerateThumbnailForURL.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1026, 1680}}\";\n\t\t\tsepNavSelRange = \"{1730, 23}\";\n\t\t\tsepNavVisRange = \"{2671, 1571}\";\n\t\t};\n\t};\n\t8D57630D048677EA00EA77CD /* SqueakQL */ = {\n\t\tactiveExec = 0;\n\t};\n\t943801FC103CAFFE00A1E999 /* Source Control */ = {\n\t\tisa = PBXSourceControlManager;\n\t\tfallbackIsa = XCSourceControlManager;\n\t\tisSCMEnabled = 0;\n\t\tscmConfiguration = {\n\t\t};\n\t};\n\t943801FD103CAFFE00A1E999 /* Code sense */ = {\n\t\tisa = PBXCodeSenseManager;\n\t\tindexTemplatePath = \"\";\n\t};\n\t94380303103CB0AE00A1E999 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 089C167EFE841241C02AAC07 /* English */;\n\t\tname = \"InfoPlist.strings: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 198;\n\t\tvrLoc = 0;\n\t};\n\t94380305103CB0AE00A1E999 /* PlistBookmark */ = {\n\t\tisa = PlistBookmark;\n\t\tfRef = 8D576317048677EA00EA77CD /* Info.plist */;\n\t\tfallbackIsa = PBXBookmark;\n\t\tisK = 0;\n\t\tkPath = (\n\t\t);\n\t\tname = \"/Users/johnmci/Documents/Squeak3.8.0/platforms/Mac OS/vm/Developer/SqueakQL/Info.plist\";\n\t\trLen = 0;\n\t\trLoc = 2147483647;\n\t};\n\t94380306103CB0AE00A1E999 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 089C167EFE841241C02AAC07 /* English */;\n\t\tname = \"InfoPlist.strings: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 198;\n\t\tvrLoc = 0;\n\t};\n\t94923083103D036400DBE2CE /* qlmanage */ = {\n\t\tisa = PBXExecutable;\n\t\tactiveArgIndices = (\n\t\t\tYES,\n\t\t);\n\t\targumentStrings = (\n\t\t\t\"-m\",\n\t\t);\n\t\tautoAttachOnCrash = 1;\n\t\tbreakpointsEnabled = 1;\n\t\tconfigStateDict = {\n\t\t\t\"PBXLSLaunchAction-0\" = {\n\t\t\t\tPBXLSLaunchAction = 0;\n\t\t\t\tPBXLSLaunchStartAction = 1;\n\t\t\t\tPBXLSLaunchStdioStyle = 2;\n\t\t\t\tPBXLSLaunchStyle = 0;\n\t\t\t\tclass = PBXLSRunLaunchConfig;\n\t\t\t\tcommandLineArgs = (\n\t\t\t\t);\n\t\t\t\tdisplayName = \"Executable Runner\";\n\t\t\t\tenvironment = {\n\t\t\t\t};\n\t\t\t\tidentifier = com.apple.Xcode.launch.runConfig;\n\t\t\t\tremoteHostInfo = \"\";\n\t\t\t\tstartActionInfo = \"\";\n\t\t\t};\n\t\t};\n\t\tcustomDataFormattersEnabled = 1;\n\t\tdebuggerPlugin = GDBDebugging;\n\t\tdisassemblyDisplayState = 0;\n\t\tdylibVariantSuffix = \"\";\n\t\tenableDebugStr = 1;\n\t\tenvironmentEntries = (\n\t\t);\n\t\texecutableSystemSymbolLevel = 0;\n\t\texecutableUserSymbolLevel = 0;\n\t\tlaunchableReference = 94923084103D036400DBE2CE /* qlmanage */;\n\t\tlibgmallocEnabled = 0;\n\t\tname = qlmanage;\n\t\tsavedGlobals = {\n\t\t};\n\t\tsourceDirectories = (\n\t\t);\n\t};\n\t94923084103D036400DBE2CE /* qlmanage */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = \"compiled.mach-o.executable\";\n\t\tname = qlmanage;\n\t\tpath = /usr/bin/qlmanage;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9492308D103D040A00DBE2CE /* GenerateThumbnailForURL.c:47 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 61E3BCFA0870B4F2002186A0 /* GenerateThumbnailForURL.c */;\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 47;\n\t\tlocation = SqueakQL;\n\t\tmodificationTime = 272434362.710821;\n\t\tstate = 0;\n\t};\n\t94923091103D043800DBE2CE /* PlistBookmark */ = {\n\t\tisa = PlistBookmark;\n\t\tfRef = 8D576317048677EA00EA77CD /* Info.plist */;\n\t\tfallbackIsa = PBXBookmark;\n\t\tisK = 0;\n\t\tkPath = (\n\t\t);\n\t\tname = \"/Users/johnmci/Documents/Squeak3.8.0/platforms/Mac OS/vm/Developer/SqueakQL/Info.plist\";\n\t\trLen = 0;\n\t\trLoc = 2147483647;\n\t};\n\t94923096103D043800DBE2CE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 61E3BCFA0870B4F2002186A0 /* GenerateThumbnailForURL.c */;\n\t\tname = \"GenerateThumbnailForURL.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1633;\n\t\tvrLoc = 1319;\n\t};\n\t94923097103D043800DBE2CE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 2C05A19B06CAA52B00D84F6F /* GeneratePreviewForURL.c */;\n\t\tname = \"GeneratePreviewForURL.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 387;\n\t\tvrLoc = 0;\n\t};\n\t949230A5103D045000DBE2CE /* GeneratePreviewForURL.c:9 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 2C05A19B06CAA52B00D84F6F /* GeneratePreviewForURL.c */;\n\t\tfunctionName = \"GeneratePreviewForURL()\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 9;\n\t\tlocation = SqueakQL;\n\t\tmodificationTime = 272434362.723295;\n\t\tstate = 0;\n\t};\n\t949230A8103D046700DBE2CE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 08FB77B6FE84183AC02AAC07 /* main.c */;\n\t\tname = \"main.c: 40\";\n\t\trLen = 23;\n\t\trLoc = 1279;\n\t\trType = 0;\n\t\tvrLen = 1671;\n\t\tvrLoc = 396;\n\t};\n\t949230AA103D046700DBE2CE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 08FB77B6FE84183AC02AAC07 /* main.c */;\n\t\tname = \"main.c: 40\";\n\t\trLen = 23;\n\t\trLoc = 1279;\n\t\trType = 0;\n\t\tvrLen = 1671;\n\t\tvrLoc = 396;\n\t};\n\t94F4B5B7103DA33F00AB2C19 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 2C05A19B06CAA52B00D84F6F /* GeneratePreviewForURL.c */;\n\t\tname = \"GeneratePreviewForURL.c: 7\";\n\t\trLen = 21;\n\t\trLoc = 142;\n\t\trType = 0;\n\t\tvrLen = 387;\n\t\tvrLoc = 0;\n\t};\n\t94F4B5B8103DA33F00AB2C19 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 61E3BCFA0870B4F2002186A0 /* GenerateThumbnailForURL.c */;\n\t\tname = \"GenerateThumbnailForURL.c: 47\";\n\t\trLen = 23;\n\t\trLoc = 1730;\n\t\trType = 0;\n\t\tvrLen = 1571;\n\t\tvrLoc = 2671;\n\t};\n\t94F4B5B9103DA33F00AB2C19 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 61E3BCFA0870B4F2002186A0 /* GenerateThumbnailForURL.c */;\n\t\tname = \"GenerateThumbnailForURL.c: 47\";\n\t\trLen = 23;\n\t\trLoc = 1730;\n\t\trType = 0;\n\t\tvrLen = 1571;\n\t\tvrLoc = 2671;\n\t};\n\t94F4B5BA103DA33F00AB2C19 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 2C05A19B06CAA52B00D84F6F /* GeneratePreviewForURL.c */;\n\t\tname = \"GeneratePreviewForURL.c: 7\";\n\t\trLen = 21;\n\t\trLoc = 142;\n\t\trType = 0;\n\t\tvrLen = 387;\n\t\tvrLoc = 0;\n\t};\n\t94F4B5D6103DA3E200AB2C19 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 61E3BCFA0870B4F2002186A0 /* GenerateThumbnailForURL.c */;\n\t\tname = \"GenerateThumbnailForURL.c: 47\";\n\t\trLen = 23;\n\t\trLoc = 1730;\n\t\trType = 0;\n\t\tvrLen = 1571;\n\t\tvrLoc = 2671;\n\t};\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Developer/SqueakQL/SqueakQL.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 45;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t2C05A19C06CAA52B00D84F6F /* GeneratePreviewForURL.c in Sources */ = {isa = PBXBuildFile; fileRef = 2C05A19B06CAA52B00D84F6F /* GeneratePreviewForURL.c */; };\n\t\t61E3BCFB0870B4F2002186A0 /* GenerateThumbnailForURL.c in Sources */ = {isa = PBXBuildFile; fileRef = 61E3BCFA0870B4F2002186A0 /* GenerateThumbnailForURL.c */; };\n\t\t8D576312048677EA00EA77CD /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 08FB77B6FE84183AC02AAC07 /* main.c */; settings = {ATTRIBUTES = (); }; };\n\t\t8D576314048677EA00EA77CD /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */; };\n\t\t8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8D5B49A704867FD3000E48DA /* InfoPlist.strings */; };\n\t\tC86B05270671AA6E00DD9006 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C86B05260671AA6E00DD9006 /* CoreServices.framework */; };\n\t\tF28CFBFD0A3EC0AF000ABFF5 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F28CFBFC0A3EC0AF000ABFF5 /* ApplicationServices.framework */; };\n\t\tF28CFC030A3EC0C6000ABFF5 /* QuickLook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F28CFC020A3EC0C6000ABFF5 /* QuickLook.framework */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXFileReference section */\n\t\t089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = \"<group>\"; };\n\t\t08FB77B6FE84183AC02AAC07 /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = \"<group>\"; };\n\t\t0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = \"<absolute>\"; };\n\t\t2C05A19B06CAA52B00D84F6F /* GeneratePreviewForURL.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = GeneratePreviewForURL.c; sourceTree = \"<group>\"; };\n\t\t61E3BCFA0870B4F2002186A0 /* GenerateThumbnailForURL.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = GenerateThumbnailForURL.c; sourceTree = \"<group>\"; };\n\t\t8D576316048677EA00EA77CD /* SqueakQL.qlgenerator */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SqueakQL.qlgenerator; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t8D576317048677EA00EA77CD /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = \"<group>\"; };\n\t\tC86B05260671AA6E00DD9006 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = \"<absolute>\"; };\n\t\tF28CFBFC0A3EC0AF000ABFF5 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = \"<absolute>\"; };\n\t\tF28CFC020A3EC0C6000ABFF5 /* QuickLook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickLook.framework; path = /System/Library/Frameworks/QuickLook.framework; sourceTree = \"<absolute>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t8D576313048677EA00EA77CD /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t8D576314048677EA00EA77CD /* CoreFoundation.framework in Frameworks */,\n\t\t\t\tC86B05270671AA6E00DD9006 /* CoreServices.framework in Frameworks */,\n\t\t\t\tF28CFBFD0A3EC0AF000ABFF5 /* ApplicationServices.framework in Frameworks */,\n\t\t\t\tF28CFC030A3EC0C6000ABFF5 /* QuickLook.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t089C166AFE841209C02AAC07 /* SqueakQL */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t08FB77AFFE84173DC02AAC07 /* Source */,\n\t\t\t\t089C167CFE841241C02AAC07 /* Resources */,\n\t\t\t\t089C1671FE841209C02AAC07 /* External Frameworks and Libraries */,\n\t\t\t\t19C28FB6FE9D52B211CA2CBB /* Products */,\n\t\t\t);\n\t\t\tname = SqueakQL;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tF28CFC020A3EC0C6000ABFF5 /* QuickLook.framework */,\n\t\t\t\tF28CFBFC0A3EC0AF000ABFF5 /* ApplicationServices.framework */,\n\t\t\t\tC86B05260671AA6E00DD9006 /* CoreServices.framework */,\n\t\t\t\t0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */,\n\t\t\t);\n\t\t\tname = \"External Frameworks and Libraries\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t089C167CFE841241C02AAC07 /* Resources */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t8D576317048677EA00EA77CD /* Info.plist */,\n\t\t\t\t8D5B49A704867FD3000E48DA /* InfoPlist.strings */,\n\t\t\t);\n\t\t\tname = Resources;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t08FB77AFFE84173DC02AAC07 /* Source */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t61E3BCFA0870B4F2002186A0 /* GenerateThumbnailForURL.c */,\n\t\t\t\t2C05A19B06CAA52B00D84F6F /* GeneratePreviewForURL.c */,\n\t\t\t\t08FB77B6FE84183AC02AAC07 /* main.c */,\n\t\t\t);\n\t\t\tname = Source;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t19C28FB6FE9D52B211CA2CBB /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t8D576316048677EA00EA77CD /* SqueakQL.qlgenerator */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXHeadersBuildPhase section */\n\t\t8D57630E048677EA00EA77CD /* Headers */ = {\n\t\t\tisa = PBXHeadersBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXHeadersBuildPhase section */\n\n/* Begin PBXNativeTarget section */\n\t\t8D57630D048677EA00EA77CD /* SqueakQL */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 2CA3261E0896AD4900168862 /* Build configuration list for PBXNativeTarget \"SqueakQL\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t8D57630E048677EA00EA77CD /* Headers */,\n\t\t\t\t8D57630F048677EA00EA77CD /* Resources */,\n\t\t\t\t8D576311048677EA00EA77CD /* Sources */,\n\t\t\t\t8D576313048677EA00EA77CD /* Frameworks */,\n\t\t\t\t8D576315048677EA00EA77CD /* Rez */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = SqueakQL;\n\t\t\tproductInstallPath = /Library/QuickLook;\n\t\t\tproductName = SqueakQL;\n\t\t\tproductReference = 8D576316048677EA00EA77CD /* SqueakQL.qlgenerator */;\n\t\t\tproductType = \"com.apple.product-type.bundle\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t089C1669FE841209C02AAC07 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tbuildConfigurationList = 2CA326220896AD4900168862 /* Build configuration list for PBXProject \"SqueakQL\" */;\n\t\t\tcompatibilityVersion = \"Xcode 3.1\";\n\t\t\thasScannedForEncodings = 1;\n\t\t\tmainGroup = 089C166AFE841209C02AAC07 /* SqueakQL */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t8D57630D048677EA00EA77CD /* SqueakQL */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t8D57630F048677EA00EA77CD /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXRezBuildPhase section */\n\t\t8D576315048677EA00EA77CD /* Rez */ = {\n\t\t\tisa = PBXRezBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXRezBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t8D576311048677EA00EA77CD /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t8D576312048677EA00EA77CD /* main.c in Sources */,\n\t\t\t\t2C05A19C06CAA52B00D84F6F /* GeneratePreviewForURL.c in Sources */,\n\t\t\t\t61E3BCFB0870B4F2002186A0 /* GenerateThumbnailForURL.c in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin PBXVariantGroup section */\n\t\t8D5B49A704867FD3000E48DA /* InfoPlist.strings */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t089C167EFE841241C02AAC07 /* English */,\n\t\t\t);\n\t\t\tname = InfoPlist.strings;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXVariantGroup section */\n\n/* Begin XCBuildConfiguration section */\n\t\t2CA3261F0896AD4900168862 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_ENABLE_FIX_AND_CONTINUE = YES;\n\t\t\t\tGCC_MODEL_TUNING = G5;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PRECOMPILE_PREFIX_HEADER = NO;\n\t\t\t\tINFOPLIST_FILE = Info.plist;\n\t\t\t\tINSTALL_PATH = /Library/QuickLook;\n\t\t\t\tPRODUCT_NAME = SqueakQL;\n\t\t\t\tWRAPPER_EXTENSION = qlgenerator;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t2CA326200896AD4900168862 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tGCC_MODEL_TUNING = G5;\n\t\t\t\tGCC_PRECOMPILE_PREFIX_HEADER = NO;\n\t\t\t\tINFOPLIST_FILE = Info.plist;\n\t\t\t\tINSTALL_PATH = /Library/QuickLook;\n\t\t\t\tPRODUCT_NAME = SqueakQL;\n\t\t\t\tWRAPPER_EXTENSION = qlgenerator;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t2CA326230896AD4900168862 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tARCHS = \"$(ARCHS_STANDARD_32_BIT)\";\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = c99;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tPREBINDING = NO;\n\t\t\t\tSDKROOT = macosx10.5;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t2CA326240896AD4900168862 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tARCHS = \"$(ARCHS_STANDARD_32_BIT)\";\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = c99;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tPREBINDING = NO;\n\t\t\t\tSDKROOT = macosx10.5;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t2CA3261E0896AD4900168862 /* Build configuration list for PBXNativeTarget \"SqueakQL\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t2CA3261F0896AD4900168862 /* Debug */,\n\t\t\t\t2CA326200896AD4900168862 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t2CA326220896AD4900168862 /* Build configuration list for PBXProject \"SqueakQL\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t2CA326230896AD4900168862 /* Debug */,\n\t\t\t\t2CA326240896AD4900168862 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 089C1669FE841209C02AAC07 /* Project object */;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Developer/SqueakQL/main.c",
    "content": "//==============================================================================\n//\n//\tDO NO MODIFY THE CONTENT OF THIS FILE\n//\n//\tThis file contains the generic CFPlug-in code necessary for your generator\n//\tTo complete your generator implement the function in GenerateThumbnailForURL/GeneratePreviewForURL.c\n//\n//==============================================================================\n\n\n\n\n\n\n#include <CoreFoundation/CoreFoundation.h>\n#include <CoreFoundation/CFPlugInCOM.h>\n#include <CoreServices/CoreServices.h>\n#include <QuickLook/QuickLook.h>\n\n// -----------------------------------------------------------------------------\n//\tconstants\n// -----------------------------------------------------------------------------\n\n// Don't modify this line\n#define PLUGIN_ID \"FFD8E9C9-4777-4502-811C-15503F9D31EA\"\n\n//\n// Below is the generic glue code for all plug-ins.\n//\n// You should not have to modify this code aside from changing\n// names if you decide to change the names defined in the Info.plist\n//\n\n\n// -----------------------------------------------------------------------------\n//\ttypedefs\n// -----------------------------------------------------------------------------\n\n// The thumbnail generation function to be implemented in GenerateThumbnailForURL.c\nOSStatus GenerateThumbnailForURL(void *thisInterface, QLThumbnailRequestRef thumbnail, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options, CGSize maxSize);\nvoid CancelThumbnailGeneration(void* thisInterface, QLThumbnailRequestRef thumbnail);\n\n// The preview generation function to be implemented in GeneratePreviewForURL.c\nOSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options);\nvoid CancelPreviewGeneration(void *thisInterface, QLPreviewRequestRef preview);\n\n// The layout for an instance of QuickLookGeneratorPlugIn\ntypedef struct __QuickLookGeneratorPluginType\n{\n    void        *conduitInterface;\n    CFUUIDRef    factoryID;\n    UInt32       refCount;\n} QuickLookGeneratorPluginType;\n\n// -----------------------------------------------------------------------------\n//\tprototypes\n// -----------------------------------------------------------------------------\n//\tForward declaration for the IUnknown implementation.\n//\n\nQuickLookGeneratorPluginType  *AllocQuickLookGeneratorPluginType(CFUUIDRef inFactoryID);\nvoid                         DeallocQuickLookGeneratorPluginType(QuickLookGeneratorPluginType *thisInstance);\nHRESULT                      QuickLookGeneratorQueryInterface(void *thisInstance,REFIID iid,LPVOID *ppv);\nvoid                        *QuickLookGeneratorPluginFactory(CFAllocatorRef allocator,CFUUIDRef typeID);\nULONG                        QuickLookGeneratorPluginAddRef(void *thisInstance);\nULONG                        QuickLookGeneratorPluginRelease(void *thisInstance);\n\n// -----------------------------------------------------------------------------\n//\tmyInterfaceFtbl\tdefinition\n// -----------------------------------------------------------------------------\n//\tThe QLGeneratorInterfaceStruct function table.\n//\nstatic QLGeneratorInterfaceStruct myInterfaceFtbl = {\n    NULL,\n    QuickLookGeneratorQueryInterface,\n    QuickLookGeneratorPluginAddRef,\n    QuickLookGeneratorPluginRelease,\n    NULL,\n    NULL,\n    NULL,\n    NULL\n};\n\n\n// -----------------------------------------------------------------------------\n//\tAllocQuickLookGeneratorPluginType\n// -----------------------------------------------------------------------------\n//\tUtility function that allocates a new instance.\n//      You can do some initial setup for the generator here if you wish\n//      like allocating globals etc...\n//\nQuickLookGeneratorPluginType *AllocQuickLookGeneratorPluginType(CFUUIDRef inFactoryID)\n{\n    QuickLookGeneratorPluginType *theNewInstance;\n\n    theNewInstance = (QuickLookGeneratorPluginType *)malloc(sizeof(QuickLookGeneratorPluginType));\n    memset(theNewInstance,0,sizeof(QuickLookGeneratorPluginType));\n\n        /* Point to the function table Malloc enough to store the stuff and copy the filler from myInterfaceFtbl over */\n    theNewInstance->conduitInterface = malloc(sizeof(QLGeneratorInterfaceStruct));\n    memcpy(theNewInstance->conduitInterface,&myInterfaceFtbl,sizeof(QLGeneratorInterfaceStruct));\n\n        /*  Retain and keep an open instance refcount for each factory. */\n    theNewInstance->factoryID = CFRetain(inFactoryID);\n    CFPlugInAddInstanceForFactory(inFactoryID);\n\n        /* This function returns the IUnknown interface so set the refCount to one. */\n    theNewInstance->refCount = 1;\n    return theNewInstance;\n}\n\n// -----------------------------------------------------------------------------\n//\tDeallocQuickLookGeneratorPluginType\n// -----------------------------------------------------------------------------\n//\tUtility function that deallocates the instance when\n//\tthe refCount goes to zero.\n//      In the current implementation generator interfaces are never deallocated\n//      but implement this as this might change in the future\n//\nvoid DeallocQuickLookGeneratorPluginType(QuickLookGeneratorPluginType *thisInstance)\n{\n    CFUUIDRef theFactoryID;\n\n    theFactoryID = thisInstance->factoryID;\n        /* Free the conduitInterface table up */\n    free(thisInstance->conduitInterface);\n\n        /* Free the instance structure */\n    free(thisInstance);\n    if (theFactoryID){\n        CFPlugInRemoveInstanceForFactory(theFactoryID);\n        CFRelease(theFactoryID);\n    }\n}\n\n// -----------------------------------------------------------------------------\n//\tQuickLookGeneratorQueryInterface\n// -----------------------------------------------------------------------------\n//\tImplementation of the IUnknown QueryInterface function.\n//\nHRESULT QuickLookGeneratorQueryInterface(void *thisInstance,REFIID iid,LPVOID *ppv)\n{\n    CFUUIDRef interfaceID;\n\n    interfaceID = CFUUIDCreateFromUUIDBytes(kCFAllocatorDefault,iid);\n\n    if (CFEqual(interfaceID,kQLGeneratorCallbacksInterfaceID)){\n            /* If the Right interface was requested, bump the ref count,\n             * set the ppv parameter equal to the instance, and\n             * return good status.\n             */\n        ((QLGeneratorInterfaceStruct *)((QuickLookGeneratorPluginType *)thisInstance)->conduitInterface)->GenerateThumbnailForURL = GenerateThumbnailForURL;\n        ((QLGeneratorInterfaceStruct *)((QuickLookGeneratorPluginType *)thisInstance)->conduitInterface)->CancelThumbnailGeneration = CancelThumbnailGeneration;\n        ((QLGeneratorInterfaceStruct *)((QuickLookGeneratorPluginType *)thisInstance)->conduitInterface)->GeneratePreviewForURL = GeneratePreviewForURL;\n        ((QLGeneratorInterfaceStruct *)((QuickLookGeneratorPluginType *)thisInstance)->conduitInterface)->CancelPreviewGeneration = CancelPreviewGeneration;\n        ((QLGeneratorInterfaceStruct *)((QuickLookGeneratorPluginType*)thisInstance)->conduitInterface)->AddRef(thisInstance);\n        *ppv = thisInstance;\n        CFRelease(interfaceID);\n        return S_OK;\n    }else{\n        /* Requested interface unknown, bail with error. */\n        *ppv = NULL;\n        CFRelease(interfaceID);\n        return E_NOINTERFACE;\n    }\n}\n\n// -----------------------------------------------------------------------------\n// QuickLookGeneratorPluginAddRef\n// -----------------------------------------------------------------------------\n//\tImplementation of reference counting for this type. Whenever an interface\n//\tis requested, bump the refCount for the instance. NOTE: returning the\n//\trefcount is a convention but is not required so don't rely on it.\n//\nULONG QuickLookGeneratorPluginAddRef(void *thisInstance)\n{\n    ((QuickLookGeneratorPluginType *)thisInstance )->refCount += 1;\n    return ((QuickLookGeneratorPluginType*) thisInstance)->refCount;\n}\n\n// -----------------------------------------------------------------------------\n// QuickLookGeneratorPluginRelease\n// -----------------------------------------------------------------------------\n//\tWhen an interface is released, decrement the refCount.\n//\tIf the refCount goes to zero, deallocate the instance.\n//\nULONG QuickLookGeneratorPluginRelease(void *thisInstance)\n{\n    ((QuickLookGeneratorPluginType*)thisInstance)->refCount -= 1;\n    if (((QuickLookGeneratorPluginType*)thisInstance)->refCount == 0){\n        DeallocQuickLookGeneratorPluginType((QuickLookGeneratorPluginType*)thisInstance );\n        return 0;\n    }else{\n        return ((QuickLookGeneratorPluginType*) thisInstance )->refCount;\n    }\n}\n\n// -----------------------------------------------------------------------------\n//  QuickLookGeneratorPluginFactory\n// -----------------------------------------------------------------------------\nvoid *QuickLookGeneratorPluginFactory(CFAllocatorRef allocator,CFUUIDRef typeID)\n{\n    QuickLookGeneratorPluginType *result;\n    CFUUIDRef                 uuid;\n\n        /* If correct type is being requested, allocate an\n         * instance of kQLGeneratorTypeID and return the IUnknown interface.\n         */\n    if (CFEqual(typeID,kQLGeneratorTypeID)){\n        uuid = CFUUIDCreateFromString(kCFAllocatorDefault,CFSTR(PLUGIN_ID));\n        result = AllocQuickLookGeneratorPluginType(uuid);\n        CFRelease(uuid);\n        return result;\n    }\n        /* If the requested type is incorrect, return NULL. */\n    return NULL;\n}\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Developer/interp.h",
    "content": "/* Automatically generated from Squeak on #(6 June 2005 10:59:27 pm) */\r\r#define SQ_VI_BYTES_PER_WORD 4\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Developer/myMacHeaders.c",
    "content": "/*\n  ===========================================================================\n\tMacHeaders.c\t\t\t1995-1999 Metrowerks Inc. All rights reserved.\n  ===========================================================================\n\n\tIncludes used to generate the 'MacHeaders' precompiled header for\n\tMetrowerks C/C++.\n\n\tStop using Strings.h, Types.h, Windows.h and Memory.h.\n\n\tRA/8/19/98\tUpdated to Universal Headers 3.1\n\tRA/3/05/99\tUpdated to Universal Interfaces 3.2\n\tRA/7/14/99  Changed commenting style so you can built for ANSI Strict\n*/\n\n/*\n *\tRequired for c-style toolbox glue functions: c2pstr and p2cstr\n *\t(the inverse operation (pointers_in_A0) is performed at the end...)\n */\n\n#if __MC68K__ && !__CFM68K__\n\t#pragma d0_pointers on\n#endif\n\n/*\n *\tTo allow the use of ToolBox calls which have now become obsolete on\n *  PowerPC, but which are still needed for System 6 applications, we need to\n *  #define OBSOLETE.  If your application will never use these calls then you\n *  can comment out this #define.  NB: This is for 68K only ...\n *\n \n\t#if !defined(powerc) && !defined(OBSOLETE)\n\t\t#define OBSOLETE\t1\n\t#endif\n\n */\n\n#ifndef OLDROUTINENAMES\n\t#define\tOLDROUTINENAMES \t\t0\n#endif\n\n#ifndef\tOLDROUTINELOCATIONS\n\t#define OLDROUTINELOCATIONS \t0\n#endif\n\n/*\n *\tMetrowerks-specific definitions\n *\n *\tThese definitions are commonly used but not in Apple's headers. We define\n *\tthem in our precompiled header so we can use the Apple headers without\n *  modification.\n */\n\n#ifndef PtoCstr\n\t#define PtoCstr\t\tp2cstr\n#endif\n\n#ifndef CtoPstr\n\t#define CtoPstr\t\tc2pstr\n#endif\n\n#ifndef PtoCString\n\t#define PtoCString\tp2cstr\n#endif\n\n#ifndef CtoPString\n\t#define CtoPString\tc2pstr\n#endif\n\n#ifndef topLeft\n\t#define topLeft(r)\t(((Point *) &(r))[0])\n#endif\n\n#ifndef botRight\n\t#define botRight(r)\t(((Point *) &(r))[1])\n#endif\n\n#ifndef TRUE\n\t#define TRUE\t\ttrue\n#endif\n#ifndef FALSE\n\t#define FALSE\t\tfalse\n#endif\n\n/*\n *\tApple Universal Headers 3.2\n *\n *\tUncomment any additional #includes you want to add to your MacHeaders.\n */\n\n/*\t#include <ADSP.h> */\n/*\t#include <ADSPSecure.h> */\n\t#include <AEDataModel.h>\n\t#include <AEObjects.h>\n\t#include <AEPackObject.h>\n\t#include <AERegistry.h>\n\t#include <AEUserTermTypes.h>\n/*\t#include <AIFF.h> */\n\t#include <Aliases.h>\n\t#include <Appearance.h>\n\t#include <AppleEvents.h>\n\t#include <AppleGuide.h>\n\t#include <AppleScript.h>\n\t#include <AppleTalk.h>\n\t#include <ASDebugging.h>\n\t#include <ASRegistry.h>\n/*\t#include <ATA.h> */\n/*\t#include <ATSLayoutTypes.h>\t\t\tNew for 3.2 */\n/*\t#include <ATSUnicode.h>\t\t\t\tNew for 3.2 */\n/*\t#include <AVComponents.h> */\n\t#include <Balloons.h>\n/*\t#include <CardServices.h> */\n/*\t#include <CMAcceleration.h> */\n\t#include <CMApplication.h>\n/*\t#include <CMCalibrator.h> */\n/*\t#include <CMComponent.h> */\n/*\t#include <CMConversions.h> */\n\t#include <CMICCProfile.h>\n/*\t#include <CMMComponent.h> */\n/*\t#include <CMPRComponent.h> */\n/*\t#include <CMScriptingPlugin.h> */\n\t#include <CodeFragments.h>\n/*\t#include <Collections.h> */\n\t#include <ColorPicker.h>\n/*\t#include <ColorPickerComponents.h> */\n/*\t#include <CommResources.h> */\n\t#include <Components.h>\n\t#include <ConditionalMacros.h>\n/*\t#include <Connections.h> */\n/*\t#include <ConnectionTools.h> */\n\t#include <Controls.h>\n/*\t#include <ControlStrip.h> */\n/*\t#include <CRMSerialDevices.h> */\n/*\t#include <CTBUtilities.h> */\n/*\t#include <CursorDevices.h> */\n/*\t#include <DatabaseAccess.h> */\n\t#include <DateTimeUtils.h>\n/*\t#include <Desk.h>\t\t\t\t\tStart using Meuns.h, Devices.h and Events.h */\n/*\t#include <DeskBus.h> */\n\t#include <Devices.h>\n\t#include <Dialogs.h>\n/*\t#include <Dictionary.h> */\n/*\t#include <DigitalSignature.h> */\n\t#include <DiskInit.h>\n/*\t#include <Disks.h> */\n\t#include <Displays.h>\n\t#include <Drag.h>\n/*\t#include <DrawSprocket.h> */\n\t#include <DriverFamilyMatching.h>\n/*\t#include <DriverGestalt.h> */\n/*\t#include <DriverServices.h> */\n/*\t#include <DriverSupport.h> */\n/*\t#include <DriverSynchronization.h>\tNew for 3.2 */\n/*\t#include <Editions.h> */\n/*\t#include <Endian.h> */\n/*\t#include <ENET.h> */\n\t#include <EPPC.h>\n\t#include <Errors.h>\n\t#include <Events.h>\n/*\t#include <fenv.h> */\n\t#include <Files.h>\n/*\t#include <FileTransfers.h> */\n/*\t#include <FileTransferTools.h> */\n\t#include <FileTypesAndCreators.h>\n/*\t#include <FindByContent.h>\t\t\tNew for 3.2 */\n\t#include <Finder.h>\n\t#include <FinderRegistry.h>\n\t#include <FixMath.h>\n\t#include <Folders.h>\n\t#include <Fonts.h>\n/*\t#include <fp.h> */\n/*\t#include <FragLoad.h>\t\t\t\tStart using CodeFragments.h */\n/*\t#include <FSM.h> */\n\t#include <Gestalt.h>\n/*\t#include <GestaltEqu.h>\t\t\t\tMerged into Gestalt.h */\n/*\t#include <GoggleSprocket.h> */\n/*\t#include <GXEnvironment.h> */\n/*\t#include <GXErrors.h> */\n/*\t#include <GXFonts.h> */\n/*\t#include <GXGraphics.h> */\n/*\t#include <GXLayout.h> */\n/*\t#include <GXMath.h> */\n/*\t#include <GXMessages.h> */\n/*\t#include <GXPrinterDrivers.h> */\n/*\t#include <GXPrinting.h> */\n/*\t#include <GXTypes.h> */\n\t#include <HFSVolumes.h>\n/*\t#include <HyperXCmd.h> */\n\t#include <Icons.h>\n/*\t#include <ImageCodec.h> */\n\t#include <ImageCompression.h>\n/*\t#include <InputSprocket.h> */\n/*\t#include <Interrupts.h> */\n\t#include <IntlResources.h>\n/*\t#include <JManager.h> */\n/*\t#include <Kernel.h> */\n/*\t#include <Language.h>\t\t\t\tStart using Script.h */\n\t#include <Lists.h>\n/*\t#include <LocationManager.h> */\n\t#include <LowMem.h>\n/*\t#include <MachineExceptions.h> */\n\t#include <MacMemory.h>\n/*\t#include <MacTCP.h> */\n\t#include <MacTypes.h>\n\t#include <MacWindows.h>\n/*\t#include <Math64.h> */\n/*\t#include <MediaHandlers.h> */\n\t#include <Memory.h>\t\t\t\t\t/* Start using MacMemory.h */\n\t#include <Menus.h>\n/*\t#include <MIDI.h> */\n\t#include <MixedMode.h>\n\t#include <Movies.h>\n/*\t#include <MoviesFormat.h> */\n/*\t#include <MP.h>\t\t\t\t\t\tStart using Multiprocessing.h */\n/*\t#include <Multiprocessing.h> */\n\t#include <NameRegistry.h>\n/*\t#include <Navigation.h>\t\t\t\tNew for 3.2\t */\n/*\t#include <NetSprocket.h> */\n\t#include <Notification.h>\n\t#include <NumberFormatting.h>\n/*\t#include <OCE.h> */\n/*\t#include <OCEAuthDir.h> */\n/*\t#include <OCEErrors.h> */\n/*\t#include <OCEMail.h> */\n/*\t#include <OCEMessaging.h> */\n/*\t#include <OCEStandardDirectory.h> */\n/*\t#include <OCEStandardMail.h> */\n/*\t#include <OCETemplates.h> */\n\t#include <OSA.h>\n\t#include <OSAComp.h>\n\t#include <OSAGeneric.h>\n/*\t#include <OSEvents.h>\t\t\t\tStart using Events.h */\n\t#include <OSUtils.h>\n/*\t#include <Packages.h> */\n\t#include <Palettes.h>\n\t#include <Patches.h>\n/*\t#include <PCCard.h> */\n/*\t#include <PCCardEnablerPlugin.h> */\n/*\t#include <PCCardTuples.h> */\n/*\t#include <PCI.h> */\n/*\t#include <PEFBinaryFormat.h> */\n/*\t#include <Picker.h>\t\t\t\t\tStart using ColorPicker.h */\n/*\t#include <PictUtil.h> */\n/*\t#include <PictUtils.h> */\n/*\t#include <Power.h> */\n\t#include <PPCToolbox.h>\n\t#include <Printing.h>\n\t#include <Processes.h>\n/*\t#include <QD3D.h> */\n/*\t#include <QD3DAcceleration.h> */\n/*\t#include <QD3DCamera.h> */\n/*\t#include <QD3DController.h> */\n/*\t#include <QD3DCustomElements.h> */\n/*\t#include <QD3DDrawContext.h> */\n/*\t#include <QD3DErrors.h> */\n/*\t#include <QD3DExtension.h> */\n/*\t#include <QD3DGeometry.h> */\n/*\t#include <QD3DGroup.h> */\n/*\t#include <QD3DIO.h> */\n/*\t#include <QD3DLight.h> */\n/*\t#include <QD3DMath.h> */\n/*\t#include <QD3DPick.h> */\n/*\t#include <QD3DRenderer.h> */\n/*\t#include <QD3DSet.h> */\n/*\t#include <QD3DShader.h> */\n/*\t#include <QD3DStorage.h> */\n/*\t#include <QD3DString.h> */\n/*\t#include <QD3DStyle.h> */\n/*\t#include <QD3DTransform.h> */\n/*\t#include <QD3DView.h> */\n/*\t#include <QD3DViewer.h> */\n/*\t#include <QD3DWinViewer.h> */\n\t#include <QDOffscreen.h>\n/*\t#include <QTML.h> */\n\t#include <Quickdraw.h>\n\t#include <QuickdrawText.h>\n/*\t#include <QuickTimeComponents.h> */\n/*\t#include <QuickTimeMusic.h> */\n/*\t#include <QuickTimeVR.h> */\n/*\t#include <QuickTimeVRFormat.h> */\n/*\t#include <RAVE.h> */\n/*\t#include <RAVESystem.h>\t\t\t\tNew for 3.2 */\n\t#include <Resources.h>\n/*\t#include <Retrace.h> */\n/*\t#include <ROMDefs.h> */\n/*\t#include <ScalerStreamTypes.h> */\n/*\t#include <ScalerTypes.h> */\n\t#include <Scrap.h>\n\t#include <Script.h>\n/*\t#include <SCSI.h> */\n\t#include <SegLoad.h>\n/*\t#include <Serial.h> */\n/*\t#include <SFNTTypes.h> */\n/*\t#include <SFNTLayoutTypes.h> */\n/*\t#include <ShutDown.h> */\n/*\t#include <Slots.h> */\n/*\t#include <SocketServices.h> */\n\t#include <Sound.h>\n/*\t#include <SoundComponents.h> */\n/*\t#include <SoundInput.h> */\n/*\t#include <SoundSprocket.h> */\n/*\t#include <Speech.h> */\n/*\t#include <SpeechRecognition.h> */\n/*\t#include <SpeechSynthesis.h> */\n\t#include <StandardFile.h>\n/*\t#include <Start.h>\t */\n\t#include <StringCompare.h>\n\t#include <Strings.h>\t\t\t\t/* Start using TextUtils.h */\n/*\t#include <Telephones.h> */\n/*\t#include <Terminals.h> */\n/*\t#include <TerminalTools.h> */\n\t#include <TextCommon.h>\n\t#include <TextEdit.h>\n/*\t#include <TextEncodingConverter.h> */\n/*\t#include <TextServices.h> */\n\t#include <TextUtils.h>\n\t#include <Threads.h>\n\t#include <Timer.h>\n\t#include <ToolUtils.h>\n/*\t#include <Translation.h> */\n/*\t#include <TranslationExtensions.h> */\n\t#include <Traps.h>\n/*\t#include <TSMTE.h> */\n\t#include <Types.h>\t\t\t\t\t/* Start using MacTypes.h */\n/*\t#include <Unicode.h> */\n/*\t#include <UnicodeConverter.h> */\n/*\t#include <UnicodeUtilities.h> */\n\t#include <Video.h>\n/*\t#include <VideoServices.h> */\n\t#include <Windows.h>\t\t\t\t/* Start using MacWindows.h */\n/*\t#include <WorldScript.h> */\n/*\t#include <ZoomedVideo.h> */\n\n\n/*\n *\tRequired for c-style toolbox glue functions: c2pstr and p2cstr\n *\t(matches the inverse operation at the start of the file...)\n */\n\n#if __MC68K__ && !__CFM68K__\n #pragma d0_pointers reset\n#endif"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Developer/myMacHeaders.pch",
    "content": "/****************************************************************************\n*   PROJECT: Mac window, memory, keyboard interface for netscape plugin logic\n*   FILE:    myMacHeaders.pch\n*   CONTENT: \n*\n*   AUTHOR:  John McIntosh, and others.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: myMacHeaders.pch 1191 2005-05-24 03:19:32Z johnmci $\n*\n*   NOTES: See change log below.\n*\t1/4/2002   JMM Some carbon cleanup\n*\n*****************************************************************************//*\n   ===========================================================================\n\tMacHeaders.pch\t\t\t\t1995-1999 Metrowerks Inc. All rights reserved.\n   ===========================================================================\n\n\tScript to generate the 'MacHeaders<xxx>' precompiled header for\n\tMetrowerks C.\n\n\tRA/8/19/98\tUpdated to Universal Headers 3.1\n\tRA/7/14/99  Changed commenting style so you can built for ANSI Strict\n\n\tSupport for automatically naming the C precompiled header file ...\n*/\n\n#if __POWERPC__\n\t#pragma precompile_target \"myMacHeadersPPC\"\n#elif __CFM68K__\n\t#pragma precompile_target \"myMacHeadersCFM68K\"\n\n#else\n\t#pragma precompile_target \"myMacHeaders68K\"\n#endif\n\n\n/* Now just include the \"MacHeaders.c\" source file ... */\n\n#pragma once on\n#define ACCESSOR_CALLS_ARE_FUNCTIONS 1\n#define SQUEAK_BUILTIN_PLUGIN\n#define SQ_VI_BYTES_PER_WORD 4\n//#define BROWSERPLUGIN\n#include \"myMacHeaders.c\"\n#include \"config.h\"\n#include \"interp.h\"\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Developer/myMacHeadersCarbon.pch",
    "content": "/*\n   ===========================================================================\n\tMacHeaders.pch\t\t\t\t1995-1999 Metrowerks Inc. All rights reserved.\n   ===========================================================================\n\n\tScript to generate the 'MacHeaders<xxx>' precompiled header for\n\tMetrowerks C.\n\n\tRA/8/19/98\tUpdated to Universal Headers 3.1\n\tRA/7/14/99  Changed commenting style so you can built for ANSI Strict\n\n\tSupport for automatically naming the C precompiled header file ...\n*/\n\n#if __POWERPC__\n\t#pragma precompile_target \"myMacHeadersPPCCarbon\"\n#ifndef TARGET_API_MAC_CARBON\n    #define TARGET_API_MAC_CARBON 1\n    #define ACCESSOR_CALLS_ARE_FUNCTIONS 1\n    #define OPAQUE_TOOLBOX_STRUCTS 1\n#endif\n\n#elif __CFM68K__\n\t#pragma precompile_target \"myMacHeadersCFM68K\"\n\n#else\n\t#pragma precompile_target \"myMacHeaders68K\"\n#endif\n\n\n/* Now just include the \"MacHeaders.c\" source file ... */\n\n#pragma once on\n\n#include \"myMacHeaders.c\"\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Developer/sqGnu.h",
    "content": "/* Definitions for \"gnuified\" interp.c\n * \n *   Copyright (C) 1996 1997 1998 1999 2000 2001 Ian Piumarta and individual\n *      authors/contributors listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   This file is distributed in the hope that it will be useful, but WITHOUT\n *   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n *   FITNESS FOR A PARTICULAR PURPOSE.\n *   \n *   You may use and/or distribute this file ONLY as part of Squeak, under\n *   the terms of the Squeak License as described in `LICENSE' in the base of\n *   this distribution, subject to the following restrictions:\n * \n *   1. The origin of this software must not be misrepresented; you must not\n *      claim that you wrote the original software.  If you use this software\n *      in a product, an acknowledgment to the original author(s) (and any\n *      other contributors mentioned herein) in the product documentation\n *      would be appreciated but is not required.\n * \n *   2. This notice may not be removed or altered in any source distribution.\n * \n *   Using or modifying this file for use in any context other than Squeak\n *   changes these copyright conditions.  Read the file `COPYING' in the base\n *   of the distribution before proceeding with any such use.\n * \n *   You are STRONGLY DISCOURAGED from distributing a modified version of\n *   this file under its original name without permission.  If you must\n *   change it, rename it first.\n */\n\n/* Author: Ian.Piumarta@inria.fr\n *\n * Last edited: Fri Aug 11 08:20:28 2000 by piumarta (Ian Piumarta) on emilia\n * April 17th, 2002, John M McIntosh use jumptable register logic for PPC\n * Feb 23rd, 2006, John M McIntosh watch usage of __Apple__ also Ian's changes for GCC i386\n * December 10th 2008, Eliot Miranda, updated with FP_REG and use of GIV() for\n *      the global struct.\n *\n * NOTES:\n *\tthis file is #included IN PLACE OF sq.h\n */\n\n#include \"sq.h\"\n\n#define CASE(N)\tcase N: _##N:\n#if defined(__powerpc__) || defined(PPC) || defined(_POWER) || defined(_IBMR2) || defined(__ppc__)\n    #define BREAK\t\tgoto *jumpTableR[currentBytecode]\n    #define PPC_REG_JUMP\t; register void **jumpTableR JP_REG; jumpTableR = &jumpTable[0]\n#else\n    #define BREAK\t\tgoto *jumpTable[currentBytecode]\n    #define PPC_REG_JUMP\t\n#endif\n#define PRIM_DISPATCH\tgoto *jumpTable[GIV(primitiveIndex)]\n#define JUMP_TABLE \\\n   void *jumpTable[256]= { \\\n      &&_0,   &&_1,   &&_2,   &&_3,   &&_4,   &&_5,   &&_6,   &&_7,   &&_8,   &&_9, \\\n     &&_10,  &&_11,  &&_12,  &&_13,  &&_14,  &&_15,  &&_16,  &&_17,  &&_18,  &&_19, \\\n     &&_20,  &&_21,  &&_22,  &&_23,  &&_24,  &&_25,  &&_26,  &&_27,  &&_28,  &&_29, \\\n     &&_30,  &&_31,  &&_32,  &&_33,  &&_34,  &&_35,  &&_36,  &&_37,  &&_38,  &&_39, \\\n     &&_40,  &&_41,  &&_42,  &&_43,  &&_44,  &&_45,  &&_46,  &&_47,  &&_48,  &&_49, \\\n     &&_50,  &&_51,  &&_52,  &&_53,  &&_54,  &&_55,  &&_56,  &&_57,  &&_58,  &&_59, \\\n     &&_60,  &&_61,  &&_62,  &&_63,  &&_64,  &&_65,  &&_66,  &&_67,  &&_68,  &&_69, \\\n     &&_70,  &&_71,  &&_72,  &&_73,  &&_74,  &&_75,  &&_76,  &&_77,  &&_78,  &&_79, \\\n     &&_80,  &&_81,  &&_82,  &&_83,  &&_84,  &&_85,  &&_86,  &&_87,  &&_88,  &&_89, \\\n     &&_90,  &&_91,  &&_92,  &&_93,  &&_94,  &&_95,  &&_96,  &&_97,  &&_98,  &&_99, \\\n    &&_100, &&_101, &&_102, &&_103, &&_104, &&_105, &&_106, &&_107, &&_108, &&_109, \\\n    &&_110, &&_111, &&_112, &&_113, &&_114, &&_115, &&_116, &&_117, &&_118, &&_119, \\\n    &&_120, &&_121, &&_122, &&_123, &&_124, &&_125, &&_126, &&_127, &&_128, &&_129, \\\n    &&_130, &&_131, &&_132, &&_133, &&_134, &&_135, &&_136, &&_137, &&_138, &&_139, \\\n    &&_140, &&_141, &&_142, &&_143, &&_144, &&_145, &&_146, &&_147, &&_148, &&_149, \\\n    &&_150, &&_151, &&_152, &&_153, &&_154, &&_155, &&_156, &&_157, &&_158, &&_159, \\\n    &&_160, &&_161, &&_162, &&_163, &&_164, &&_165, &&_166, &&_167, &&_168, &&_169, \\\n    &&_170, &&_171, &&_172, &&_173, &&_174, &&_175, &&_176, &&_177, &&_178, &&_179, \\\n    &&_180, &&_181, &&_182, &&_183, &&_184, &&_185, &&_186, &&_187, &&_188, &&_189, \\\n    &&_190, &&_191, &&_192, &&_193, &&_194, &&_195, &&_196, &&_197, &&_198, &&_199, \\\n    &&_200, &&_201, &&_202, &&_203, &&_204, &&_205, &&_206, &&_207, &&_208, &&_209, \\\n    &&_210, &&_211, &&_212, &&_213, &&_214, &&_215, &&_216, &&_217, &&_218, &&_219, \\\n    &&_220, &&_221, &&_222, &&_223, &&_224, &&_225, &&_226, &&_227, &&_228, &&_229, \\\n    &&_230, &&_231, &&_232, &&_233, &&_234, &&_235, &&_236, &&_237, &&_238, &&_239, \\\n    &&_240, &&_241, &&_242, &&_243, &&_244, &&_245, &&_246, &&_247, &&_248, &&_249, \\\n    &&_250, &&_251, &&_252, &&_253, &&_254, &&_255 \\\n  } PPC_REG_JUMP;\n#define PRIM_TABLE \\\n  static void *jumpTable[700]= { \\\n      &&_0,   &&_1,   &&_2,   &&_3,   &&_4,   &&_5,   &&_6,   &&_7,   &&_8,   &&_9, \\\n     &&_10,  &&_11,  &&_12,  &&_13,  &&_14,  &&_15,  &&_16,  &&_17,  &&_18,  &&_19, \\\n     &&_20,  &&_21,  &&_22,  &&_23,  &&_24,  &&_25,  &&_26,  &&_27,  &&_28,  &&_29, \\\n     &&_30,  &&_31,  &&_32,  &&_33,  &&_34,  &&_35,  &&_36,  &&_37,  &&_38,  &&_39, \\\n     &&_40,  &&_41,  &&_42,  &&_43,  &&_44,  &&_45,  &&_46,  &&_47,  &&_48,  &&_49, \\\n     &&_50,  &&_51,  &&_52,  &&_53,  &&_54,  &&_55,  &&_56,  &&_57,  &&_58,  &&_59, \\\n     &&_60,  &&_61,  &&_62,  &&_63,  &&_64,  &&_65,  &&_66,  &&_67,  &&_68,  &&_69, \\\n     &&_70,  &&_71,  &&_72,  &&_73,  &&_74,  &&_75,  &&_76,  &&_77,  &&_78,  &&_79, \\\n     &&_80,  &&_81,  &&_82,  &&_83,  &&_84,  &&_85,  &&_86,  &&_87,  &&_88,  &&_89, \\\n     &&_90,  &&_91,  &&_92,  &&_93,  &&_94,  &&_95,  &&_96,  &&_97,  &&_98,  &&_99, \\\n    &&_100, &&_101, &&_102, &&_103, &&_104, &&_105, &&_106, &&_107, &&_108, &&_109, \\\n    &&_110, &&_111, &&_112, &&_113, &&_114, &&_115, &&_116, &&_117, &&_118, &&_119, \\\n    &&_120, &&_121, &&_122, &&_123, &&_124, &&_125, &&_126, &&_127, &&_128, &&_129, \\\n    &&_130, &&_131, &&_132, &&_133, &&_134, &&_135, &&_136, &&_137, &&_138, &&_139, \\\n    &&_140, &&_141, &&_142, &&_143, &&_144, &&_145, &&_146, &&_147, &&_148, &&_149, \\\n    &&_150, &&_151, &&_152, &&_153, &&_154, &&_155, &&_156, &&_157, &&_158, &&_159, \\\n    &&_160, &&_161, &&_162, &&_163, &&_164, &&_165, &&_166, &&_167, &&_168, &&_169, \\\n    &&_170, &&_171, &&_172, &&_173, &&_174, &&_175, &&_176, &&_177, &&_178, &&_179, \\\n    &&_180, &&_181, &&_182, &&_183, &&_184, &&_185, &&_186, &&_187, &&_188, &&_189, \\\n    &&_190, &&_191, &&_192, &&_193, &&_194, &&_195, &&_196, &&_197, &&_198, &&_199, \\\n    &&_200, &&_201, &&_202, &&_203, &&_204, &&_205, &&_206, &&_207, &&_208, &&_209, \\\n    &&_210, &&_211, &&_212, &&_213, &&_214, &&_215, &&_216, &&_217, &&_218, &&_219, \\\n    &&_220, &&_221, &&_222, &&_223, &&_224, &&_225, &&_226, &&_227, &&_228, &&_229, \\\n    &&_230, &&_231, &&_232, &&_233, &&_234, &&_235, &&_236, &&_237, &&_238, &&_239, \\\n    &&_240, &&_241, &&_242, &&_243, &&_244, &&_245, &&_246, &&_247, &&_248, &&_249, \\\n    &&_250, &&_251, &&_252, &&_253, &&_254, &&_255, &&_256, &&_257, &&_258, &&_259, \\\n    &&_260, &&_261, &&_262, &&_263, &&_264, &&_265, &&_266, &&_267, &&_268, &&_269, \\\n    &&_270, &&_271, &&_272, &&_273, &&_274, &&_275, &&_276, &&_277, &&_278, &&_279, \\\n    &&_280, &&_281, &&_282, &&_283, &&_284, &&_285, &&_286, &&_287, &&_288, &&_289, \\\n    &&_290, &&_291, &&_292, &&_293, &&_294, &&_295, &&_296, &&_297, &&_298, &&_299, \\\n    &&_300, &&_301, &&_302, &&_303, &&_304, &&_305, &&_306, &&_307, &&_308, &&_309, \\\n    &&_310, &&_311, &&_312, &&_313, &&_314, &&_315, &&_316, &&_317, &&_318, &&_319, \\\n    &&_320, &&_321, &&_322, &&_323, &&_324, &&_325, &&_326, &&_327, &&_328, &&_329, \\\n    &&_330, &&_331, &&_332, &&_333, &&_334, &&_335, &&_336, &&_337, &&_338, &&_339, \\\n    &&_340, &&_341, &&_342, &&_343, &&_344, &&_345, &&_346, &&_347, &&_348, &&_349, \\\n    &&_350, &&_351, &&_352, &&_353, &&_354, &&_355, &&_356, &&_357, &&_358, &&_359, \\\n    &&_360, &&_361, &&_362, &&_363, &&_364, &&_365, &&_366, &&_367, &&_368, &&_369, \\\n    &&_370, &&_371, &&_372, &&_373, &&_374, &&_375, &&_376, &&_377, &&_378, &&_379, \\\n    &&_380, &&_381, &&_382, &&_383, &&_384, &&_385, &&_386, &&_387, &&_388, &&_389, \\\n    &&_390, &&_391, &&_392, &&_393, &&_394, &&_395, &&_396, &&_397, &&_398, &&_399, \\\n    &&_400, &&_401, &&_402, &&_403, &&_404, &&_405, &&_406, &&_407, &&_408, &&_409, \\\n    &&_410, &&_411, &&_412, &&_413, &&_414, &&_415, &&_416, &&_417, &&_418, &&_419, \\\n    &&_420, &&_421, &&_422, &&_423, &&_424, &&_425, &&_426, &&_427, &&_428, &&_429, \\\n    &&_430, &&_431, &&_432, &&_433, &&_434, &&_435, &&_436, &&_437, &&_438, &&_439, \\\n    &&_440, &&_441, &&_442, &&_443, &&_444, &&_445, &&_446, &&_447, &&_448, &&_449, \\\n    &&_450, &&_451, &&_452, &&_453, &&_454, &&_455, &&_456, &&_457, &&_458, &&_459, \\\n    &&_460, &&_461, &&_462, &&_463, &&_464, &&_465, &&_466, &&_467, &&_468, &&_469, \\\n    &&_470, &&_471, &&_472, &&_473, &&_474, &&_475, &&_476, &&_477, &&_478, &&_479, \\\n    &&_480, &&_481, &&_482, &&_483, &&_484, &&_485, &&_486, &&_487, &&_488, &&_489, \\\n    &&_490, &&_491, &&_492, &&_493, &&_494, &&_495, &&_496, &&_497, &&_498, &&_499, \\\n    &&_500, &&_501, &&_502, &&_503, &&_504, &&_505, &&_506, &&_507, &&_508, &&_509, \\\n    &&_510, &&_511, &&_512, &&_513, &&_514, &&_515, &&_516, &&_517, &&_518, &&_519, \\\n    &&_520, &&_521, &&_522, &&_523, &&_524, &&_525, &&_526, &&_527, &&_528, &&_529, \\\n    &&_530, &&_531, &&_532, &&_533, &&_534, &&_535, &&_536, &&_537, &&_538, &&_539, \\\n    &&_540, &&_541, &&_542, &&_543, &&_544, &&_545, &&_546, &&_547, &&_548, &&_549, \\\n    &&_550, &&_551, &&_552, &&_553, &&_554, &&_555, &&_556, &&_557, &&_558, &&_559, \\\n    &&_560, &&_561, &&_562, &&_563, &&_564, &&_565, &&_566, &&_567, &&_568, &&_569, \\\n    &&_570, &&_571, &&_572, &&_573, &&_574, &&_575, &&_576, &&_577, &&_578, &&_579, \\\n    &&_580, &&_581, &&_582, &&_583, &&_584, &&_585, &&_586, &&_587, &&_588, &&_589, \\\n    &&_590, &&_591, &&_592, &&_593, &&_594, &&_595, &&_596, &&_597, &&_598, &&_599, \\\n    &&_600, &&_601, &&_602, &&_603, &&_604, &&_605, &&_606, &&_607, &&_608, &&_609, \\\n    &&_610, &&_611, &&_612, &&_613, &&_614, &&_615, &&_616, &&_617, &&_618, &&_619, \\\n    &&_620, &&_621, &&_622, &&_623, &&_624, &&_625, &&_626, &&_627, &&_628, &&_629, \\\n    &&_630, &&_631, &&_632, &&_633, &&_634, &&_635, &&_636, &&_637, &&_638, &&_639, \\\n    &&_640, &&_641, &&_642, &&_643, &&_644, &&_645, &&_646, &&_647, &&_648, &&_649, \\\n    &&_650, &&_651, &&_652, &&_653, &&_654, &&_655, &&_656, &&_657, &&_658, &&_659, \\\n    &&_660, &&_661, &&_662, &&_663, &&_664, &&_665, &&_666, &&_667, &&_668, &&_669, \\\n    &&_670, &&_671, &&_672, &&_673, &&_674, &&_675, &&_676, &&_677, &&_678, &&_679, \\\n    &&_680, &&_681, &&_682, &&_683, &&_684, &&_685, &&_686, &&_687, &&_688, &&_689, \\\n    &&_690, &&_691, &&_692, &&_693, &&_694, &&_695, &&_696, &&_697, &&_698, &&_699, \\\n  }\n\n /*\n     IP_REG, FP_REG, SP_REG, CB_REG\n        the machine registers in which to place localIP, localFP, localSP and\n        currentBytecode.  Wins big on register-deficient architectures --\n        especially Intel.\n  */\n#if defined(__mips__)\n# define IP_REG asm(\"$16\")\n# define SP_REG asm(\"$17\")\n# define CB_REG asm(\"$18\")\n#endif\n#if defined(__sparc__)\n# define IP_REG asm(\"%l0\")\n# define SP_REG asm(\"%l1\")\n# define CB_REG asm(\"%l2\")\n#endif\n#if defined(__alpha__)\n# define IP_REG asm(\"$9\")\n# define SP_REG asm(\"$10\")\n# define CB_REG asm(\"$11\")\n#endif\n#if defined(__i386__)\n# define IP_REG asm(\"%esi\")\n# define SP_REG asm(\"%edi\")\n# define CB_REG asm(\"%ebx\")\n#endif\n#if defined(__powerpc__) || defined(PPC) || defined(_POWER) || defined(_IBMR2) || defined(__ppc__)\n# define FOO_REG asm(\"13\")\n# define JP_REG asm(\"14\")\n# define IP_REG asm(\"15\")\n# define SP_REG asm(\"16\")\n# define CB_REG asm(\"17\")\n#endif\n#if defined(__hppa__)\n# define IP_REG asm(\"%r18\")\n# define SP_REG asm(\"%r17\")\n# define CB_REG asm(\"%r16\")\n#endif\n#if defined(__mc68000__)\n# define IP_REG asm(\"a5\")\n# define SP_REG asm(\"a4\")\n# define CB_REG asm(\"d7\")\n#endif\n\n#if !defined(FOO_REG)\n# define FOO_REG /* nada */\n#endif\n#if !defined(FP_REG)\n# define FP_REG /* nada */\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Developer/sqMacMinimal.c",
    "content": "/* sqMacMinimal.c\n\n\tThis file includes the minimal support code to build a Squeak virtual machine for\n\tthe Mac. Most primitives are \"stubbed-out\", meaning that if they are invoked from\n\tthe image they will return a \"primitive failed\" error. Among the stubbed out\n\tprimitives are those that support sound input and output, serial and MIDI ports,\n\tnetworking, ,file directory operations, etc. The basic file read/write operations\n\tare NOT stubbed out, although they could be as long as the image loading mechanism\n\tstill works.\n\n\tThe purpose of this file is to provide an implementation roadmap when bootstrapping\n\tSqueak on a new platform. Once all the non-stubbed-out functions in this file have\n\tbeen ported, you will have a working, usable Squeak virtual machine!\n\n*** Implementation Notes ***\n\n  I/O Functions\n\tThe following are essential for display and user interaction:\n\t\tioScreenSize()\n\t\tioShowDisplay()\n\t\tioGetButtonState()\n\t\tioGetKeystroke()\n\t\tioMousePoint()\n\t\tioPeekKeystroke()\n\n\tThe following can be made no-ops:\n\t\tioProcessEvents() \t-- poll for input events on some platforms\n\t\tioSetCursor()\t\t-- install a 16x16 black and white hardware cursor\n\t\tioSetCursorWithMask() -- install a masked black and white hardware cursor\n\t\tioBeep()\t\t\t-- sound a short beep through the speaker\n\t\tioExit()\t\t\t-- exit the VM: quit the application, reboot, power down, or\n\t\t\t\t\t\t\t-- similar behavior appropriate to this platform (if this\n\t\t\t\t\t\t\t-- is a noop you simply won't be able to quit from Squeak)\n\n  File Naming\n\n\tThe virtual machine keeps track of the full path name of the Squeak image\n\tfile and the path to the directory containing the virtual machine. In this\n\tminimal implementation, the VM path is the empty string and the image name is\n\thardwired to \"squeak.image\". It is assumed that the image file, the changes\n\tfile, the Squeak application, and the system sources file are all in the\n\tthe same directory, and that this directory is the default working directory\n\tfor any file operations.\n\n  Time Functions\n\n\t\tioMSecs(), ioMicroMSecs()\n\t\t\t\t\t\t\t-- both return a millisecond clock value, but historically\n\t\t\t\t\t\t\t-- ioMicroMSecs() used a higher resolution timer; the\n\t\t\t\t\t\t\t-- ideal implementation is an inexpensive clock with 1\n\t\t\t\t\t\t\t-- millisecond accuracy, but both functions can use a\n\t\t\t\t\t\t\t-- clock with much coarser accuracy (e.g., 50-100 mSecs)\n\t\t\t\t\t\t\t-- if necessary\n\t\tioSeconds()\t\t\t-- returns the number of seconds since Jan 1, 1901.\n\t   \t\t\t\t\t\t-- optional: may be implemented to always return 0, but then\n\t   \t\t\t\t\t\t-- the current date and time will be wrong\n\n*** Linking ***\n\n\tTo build a Macintosh VM using this file, link together:\n\n\t\tinterp.c\t\t-- automatically generated interpreter file\n\t\tsqMiscPrims.c\t-- automatically generated primitives\n\t\tsqMacMinimal.c\t-- this file\n\n\tplus the appropriate C libraries (e.g. math, strings, standard I/O).\n\t\n\tThe interpreter code depends on the following functions from libraries:\n\n\t    math: exp(), log(), atan(), sin(), sqrt(), ldexp(), frexp(), modf()\n\t    standard i/o: getchar(), putchar(), printf()\n\t    other: memcpy(), strlen(), clock()\n\n\tThe standard i/o functions could be stubbed out; they are only used to report\n\tfatal VM errors.\n*/\n\n#include <Devices.h>\n#include <Fonts.h>\n#include <Strings.h>\n#include <Timer.h>\n#include <ToolUtils.h>\n\n#include \"sq.h\"\n#include \"FilePlugin.h\"\n\n/*** Mac Toolbox Function that is Missing from Standard Header Files ***/\nvoid ExitToShell(void);\n\n/*** Stub Definitions ***/\n#define STUBBED_OUT { success(false); }\n#define DO_NOTHING { }\n\n/*** Enumerations ***/\nenum { appleID = 1, fileID };\nenum { quitItem = 1 };\n\n/*** Variables -- Imported from Virtual Machine ***/\nextern int interruptCheckCounter;\nextern int interruptKeycode;\nextern int interruptPending;  /* set to true by RecordKeystroke if interrupt key is pressed */\n\n/*** Variables -- image and path names ***/\n#define IMAGE_NAME_SIZE 300\nchar imageName[IMAGE_NAME_SIZE + 1];  /* full path to image */\n\n#define SHORTIMAGE_NAME_SIZE 100\nchar shortImageName[SHORTIMAGE_NAME_SIZE + 1];  /* just the image file name */\n\n#define VMPATH_SIZE 300\nchar vmPath[VMPATH_SIZE + 1];  /* full path to interpreter's directory */\n\n/*** Variables -- Mac Related ***/\nMenuHandle\t\tappleMenu = nil;\nMenuHandle\t\tfileMenu = nil;\nCTabHandle\t\tstColorTable = nil;\nPixMapHandle\tstPixMap = nil;\nWindowPtr\t\tstWindow = nil;\n\n/*** Variables -- Event Recording ***/\n#define KEYBUF_SIZE 64\nint keyBuf[KEYBUF_SIZE];\t/* circular buffer */\nint keyBufGet = 0;\t\t\t/* index of next item of keyBuf to read */\nint keyBufPut = 0;\t\t\t/* index of next item of keyBuf to write */\nint keyBufOverflows = 0;\t/* number of characters dropped */\n\nint buttonState = 0;\t\t/* mouse button and modifier state when mouse\n\t\t\t\t\t\t\t   button went down or 0 if not pressed */\n\n/* This table maps the 5 Macintosh modifier key bits to 4 Squeak modifier\n   bits. (The Mac shift and caps lock keys are both mapped to the single\n   Squeak shift bit).\n\t\tMac bits: <control><option><caps lock><shift><command>\n\t\tST bits:  <command><option><control><shift>\n*/\nchar modifierMap[32] = {\n\t0,  8, 1,  9, 1,  9, 1,  9, 4, 12, 5, 13, 5, 13, 5, 13,\n\t2, 10, 3, 11, 3, 11, 3, 11, 6, 14, 7, 15, 7, 15, 7, 15\n};\n\n/*** Functions ***/\nchar * GetAttributeString(int id);\nint  HandleEvents(void);\nvoid HandleMenu(int mSelect);\nvoid HandleMouseDown(EventRecord *theEvent);\nvoid InitMacintosh(void);\nint RecordKeystroke(EventRecord *theEvent);\nint RecordModifierButtons(EventRecord *theEvent);\nint RecordMouseDown(EventRecord *theEvent);\nvoid SetColorEntry(int index, int red, int green, int blue);\nvoid SetUpMenus(void);\nvoid SetUpPixmap(void);\nvoid SetUpWindow(void);\n\n/*** Mac-specific Functions (these would be replaced on another platform) ***/\n\nint HandleEvents(void) {\n\tEventRecord\t\ttheEvent;\n\tint\t\t\t\tok;\n\n\tSystemTask();\n\tok = GetNextEvent(everyEvent, &theEvent);\n\tif (ok) {\n\t\tswitch (theEvent.what) {\n\t\t\tcase mouseDown:\n\t\t\t\tHandleMouseDown(&theEvent);\n\t\t\t\treturn false;\n\t\t\tbreak;\n\n\t\t\tcase mouseUp:\n\t\t\t\tRecordModifierButtons(&theEvent);\n\t\t\t\treturn false;\n\t\t\tbreak;\n\n\t\t\tcase keyDown:\n\t\t\tcase autoKey:\n\t\t\t\tRecordModifierButtons(&theEvent);\n\t\t\t\tRecordKeystroke(&theEvent);\n\t\t\tbreak;\n\n\t\t\tcase updateEvt:\n\t\t\t\tBeginUpdate(stWindow);\n\t\t\t\tfullDisplayUpdate();  /* this makes VM call ioShowDisplay */\n\t\t\t\tEndUpdate(stWindow);\n\t\t\tbreak;\n\n\t\t\tcase activateEvt:\n\t\t\t\tInvalRect(&stWindow->portRect);\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn ok;\n}\n\nvoid HandleMenu(int mSelect) {\n\tif ((HiWord(mSelect) == fileID) &&\n\t\t(LoWord(mSelect) == quitItem)) {\n\t\tioExit();\n\t}\n}\n\nvoid HandleMouseDown(EventRecord *theEvent) {\n\tWindowPtr\ttheWindow;\n\tRect\t\tgrowLimits = { 20, 20, 4000, 4000 };\n\tRect\t\tdragBounds;\n\tint\t\t\twindowCode, newSize;\n\n\twindowCode = FindWindow(theEvent->where, &theWindow);\n\tswitch (windowCode) {\n\t\tcase inSysWindow:\n\t\t\tSystemClick(theEvent, theWindow);\n\t\tbreak;\n\n\t\tcase inMenuBar:\n\t\t\tHandleMenu(MenuSelect(theEvent->where));\n\t\tbreak;\n\n\t\tcase inDrag:\n\t\t\tdragBounds = qd.screenBits.bounds;\n\t\t\tif (theWindow == stWindow) {\n\t\t\t\tDragWindow(stWindow, theEvent->where, &dragBounds);\n\t\t\t}\n\t\tbreak;\n\n\t\tcase inGrow:\n\t\t\tif (theWindow == stWindow) {\n\t\t\t\tnewSize = GrowWindow(stWindow, theEvent->where, &growLimits);\n\t\t\t\tif (newSize != 0) {\n\t\t\t\t\tSizeWindow(stWindow, LoWord(newSize), HiWord(newSize), true);\n\t\t\t\t}\n\t\t\t}\n\t\tbreak;\n\n\t\tcase inContent:\n\t\t\tif (theWindow == stWindow) {\n\t\t\t\tif (theWindow != FrontWindow()) {\n\t\t\t\t\tSelectWindow(stWindow);\n\t\t\t\t}\n\t\t\t\tRecordMouseDown(theEvent);\n\t\t\t}\n\t\tbreak;\n\t}\n}\n\nvoid InitMacintosh(void) {\n\tMaxApplZone();\n\tInitGraf(&qd.thePort);\n\tInitFonts();\n\tFlushEvents(everyEvent, 0);\n\tInitWindows();\n\tInitMenus();\n\tTEInit();\n\tInitDialogs(NULL);\n\tInitCursor();\n\tSetUpMenus();\n\tSetUpWindow();\n\tSetUpPixmap();\n}\n\nvoid SetUpMenus(void) {\n\tInsertMenu(appleMenu = NewMenu(appleID, \"\\p\\024\"), 0);\n\tInsertMenu(fileMenu  = NewMenu(fileID,  \"\\pFile\"), 0);\n\tDrawMenuBar();\n\tAppendResMenu(appleMenu, 'DRVR');\n\tAppendMenu(fileMenu, \"\\pQuit\");\n}\n\nvoid SetColorEntry(int index, int red, int green, int blue) {\n\t(*stColorTable)->ctTable[index].value = index;\n\t(*stColorTable)->ctTable[index].rgb.red = red;\n\t(*stColorTable)->ctTable[index].rgb.green = green;\n\t(*stColorTable)->ctTable[index].rgb.blue = blue;\n}\n\nvoid SetUpPixmap(void) {\n\tint i, r, g, b;\n\n\tstColorTable = (CTabHandle) NewHandle(sizeof(ColorTable) + (256 * sizeof(ColorSpec)));\n\t(*stColorTable)->ctSeed = GetCTSeed();\n\t(*stColorTable)->ctFlags = 0;\n\t(*stColorTable)->ctSize = 255;\n\n\t/* 1-bit colors (monochrome) */\n\tSetColorEntry(0, 65535, 65535, 65535);\t/* white or transparent */\n\tSetColorEntry(1,     0,     0,     0);\t/* black */\n\n\t/* additional colors for 2-bit color */\n\tSetColorEntry(2, 65535, 65535, 65535);\t/* opaque white */\n\tSetColorEntry(3, 32768, 32768, 32768);\t/* 1/2 gray */\n\n\t/* additional colors for 4-bit color */\n\tSetColorEntry( 4, 65535,     0,     0);\t/* red */\n\tSetColorEntry( 5,     0, 65535,     0);\t/* green */\n\tSetColorEntry( 6,     0,     0, 65535);\t/* blue */\n\tSetColorEntry( 7,     0, 65535, 65535);\t/* cyan */\n\tSetColorEntry( 8, 65535, 65535,     0);\t/* yellow */\n\tSetColorEntry( 9, 65535,     0, 65535);\t/* magenta */\n\tSetColorEntry(10,  8192,  8192,  8192);\t/* 1/8 gray */\n\tSetColorEntry(11, 16384, 16384, 16384);\t/* 2/8 gray */\n\tSetColorEntry(12, 24576, 24576, 24576);\t/* 3/8 gray */\n\tSetColorEntry(13, 40959, 40959, 40959);\t/* 5/8 gray */\n\tSetColorEntry(14, 49151, 49151, 49151);\t/* 6/8 gray */\n\tSetColorEntry(15, 57343, 57343, 57343);\t/* 7/8 gray */\n\n\t/* additional colors for 8-bit color */\n\t/* 24 more shades of gray (does not repeat 1/8th increments) */\n\tSetColorEntry(16,  2048,  2048,  2048);\t/*  1/32 gray */\n\tSetColorEntry(17,  4096,  4096,  4096);\t/*  2/32 gray */\n\tSetColorEntry(18,  6144,  6144,  6144);\t/*  3/32 gray */\n\tSetColorEntry(19, 10240, 10240, 10240);\t/*  5/32 gray */\n\tSetColorEntry(20, 12288, 12288, 12288);\t/*  6/32 gray */\n\tSetColorEntry(21, 14336, 14336, 14336);\t/*  7/32 gray */\n\tSetColorEntry(22, 18432, 18432, 18432);\t/*  9/32 gray */\n\tSetColorEntry(23, 20480, 20480, 20480);\t/* 10/32 gray */\n\tSetColorEntry(24, 22528, 22528, 22528);\t/* 11/32 gray */\n\tSetColorEntry(25, 26624, 26624, 26624);\t/* 13/32 gray */\n\tSetColorEntry(26, 28672, 28672, 28672);\t/* 14/32 gray */\n\tSetColorEntry(27, 30720, 30720, 30720);\t/* 15/32 gray */\n\tSetColorEntry(28, 34815, 34815, 34815);\t/* 17/32 gray */\n\tSetColorEntry(29, 36863, 36863, 36863);\t/* 18/32 gray */\n\tSetColorEntry(30, 38911, 38911, 38911);\t/* 19/32 gray */\n\tSetColorEntry(31, 43007, 43007, 43007);\t/* 21/32 gray */\n\tSetColorEntry(32, 45055, 45055, 45055);\t/* 22/32 gray */\n\tSetColorEntry(33, 47103, 47103, 47103);\t/* 23/32 gray */\n\tSetColorEntry(34, 51199, 51199, 51199);\t/* 25/32 gray */\n\tSetColorEntry(35, 53247, 53247, 53247);\t/* 26/32 gray */\n\tSetColorEntry(36, 55295, 55295, 55295);\t/* 27/32 gray */\n\tSetColorEntry(37, 59391, 59391, 59391);\t/* 29/32 gray */\n\tSetColorEntry(38, 61439, 61439, 61439);\t/* 30/32 gray */\n\tSetColorEntry(39, 63487, 63487, 63487);\t/* 31/32 gray */\n\n\t/* The remainder of color table defines a color cube with six steps\n\t   for each primary color. Note that the corners of this cube repeat\n\t   previous colors, but simplifies the mapping between RGB colors and\n\t   color map indices. This color cube spans indices 40 through 255.\n\t*/\n\tfor (r = 0; r < 6; r++) {\n\t\tfor (g = 0; g < 6; g++) {\n\t\t\tfor (b = 0; b < 6; b++) {\n\t\t\t\ti = 40 + ((36 * r) + (6 * b) + g);\n\t\t\t\tif (i > 255) error(\"index out of range in color table compuation\");\n\t\t\t\tSetColorEntry(i, (r * 65535) / 5, (g * 65535) / 5, (b * 65535) / 5);\n\t\t\t}\n\t\t}\n\t}\n\n\tstPixMap = NewPixMap();\n\t(*stPixMap)->pixelType = 0; /* chunky */\n\t(*stPixMap)->cmpCount = 1;\n\t(*stPixMap)->pmTable = stColorTable;\n}\n\nvoid SetUpWindow(void) {\n\tRect windowBounds = {44, 8, 460, 640};\n\n\tstWindow = NewCWindow(\n\t\t0L, &windowBounds, \"\\p Squeak! \",\n\t\ttrue, documentProc, (WindowPtr) -1L, true, 0);\n}\n\n/*** Event Recording Functions ***/\n\nint RecordKeystroke(EventRecord *theEvent) {\n\t/* record a keystroke in the keyboard buffer. */\n\tint keystate;\n\n\t/* keystate: low byte is the ascii character; next 4 bits are modifier bits */\n\tkeystate =\n\t\t(modifierMap[(theEvent->modifiers >> 8) & 0x1F] << 8) |\n\t\t(theEvent->message & 0xFF);\n\tif (keystate == interruptKeycode) {\n\t\t/* Note: interrupt key is \"meta\"; it not reported as a keystroke */\n\t\tinterruptPending = true;\n\t\tinterruptCheckCounter = 0;\n\t} else {\n\t\tkeyBuf[keyBufPut] = keystate;\n\t\tkeyBufPut = (keyBufPut + 1) % KEYBUF_SIZE;\n\t\tif (keyBufGet == keyBufPut) {\n\t\t\t/* buffer overflow; drop the last character */\n\t\t\tkeyBufGet = (keyBufGet + 1) % KEYBUF_SIZE;\n\t\t\tkeyBufOverflows++;\n\t\t}\n\t}\n}\n\nint RecordMouseDown(EventRecord *theEvent) {\n\t/* record that the mouse button has been pressed. */\n\tint stButtons;\n\n\tstButtons = 4;\t\t/* red button by default */\n\tif ((theEvent->modifiers & optionKey) != 0) {\n\t\tstButtons = 2;\t/* yellow button if option down */\n\t}\n\tif ((theEvent->modifiers & cmdKey) != 0) {\n\t\tstButtons = 1;\t/* blue button if command down */\n\t}\n\t/* button state: low three bits are mouse buttons; next 4 bits are modifier bits */\n\tbuttonState =\n\t\t(modifierMap[(theEvent->modifiers >> 8) & 0x1F] << 3) |\n\t\t(stButtons & 0x7);\n}\n\nint RecordModifierButtons(EventRecord *theEvent) {\n\t/* record the state of the mouse buttons and modifier keys. */\n\tint stButtons = 0;\n\n\tif (Button()) {\n\t\tstButtons = buttonState & 0x7;\n\t} else {\n\t\tstButtons = 0;\n\t}\n\t/* button state: low three bits are mouse buttons; next 4 bits are modifier bits */\n\tbuttonState =\n\t\t(modifierMap[(theEvent->modifiers >> 8) & 0x1F] << 3) |\n\t\t(stButtons & 0x7);\n}\n\n/*** I/O Primitives ***/\n\nint ioBeep(void) {\n\t/* optional; could be noop. play a beep through the speaker. */\n\tSysBeep(1000);\n}\n\nint ioExit(void) {\n\t/* optional; could be noop. exit from the Squeak application. */\n\tExitToShell();\n}\n\nint ioForceDisplayUpdate(void) {\n\t/* does nothing on a Mac */\n}\n\nint ioGetButtonState(void) {\n\t/* return the state of the mouse and modifier buttons */\n\tioProcessEvents();  /* process all pending events */\n\treturn buttonState;\n}\n\nint ioGetKeystroke(void) {\n\t/* return the next keystroke from the buffer or -1 if the buffer is empty */\n\tint keystate;\n\n\tioProcessEvents();  /* process all pending events */\n\tif (keyBufGet == keyBufPut) {\n\t\treturn -1;  /* keystroke buffer is empty */\n\t} else {\n\t\tkeystate = keyBuf[keyBufGet];\n\t\tkeyBufGet = (keyBufGet + 1) % KEYBUF_SIZE;\n\t\t/* set modifer bits in buttonState to reflect the last keystroke fetched */\n\t\tbuttonState = ((keystate >> 5) & 0xF8) | (buttonState & 0x7);\n\t}\n\treturn keystate;\n}\n\nint ioMicroMSecs(void) {\n\t/* millisecond clock based on microsecond timer (about 60 times slower than clock()!!) */\n\t/* Note: This function and ioMSecs() both return a time in milliseconds. The difference\n\t   is that ioMicroMSecs() is called only when precise millisecond resolution is essential,\n\t   and thus it can use a more expensive timer than ioMSecs, which is called frequently.\n\t   However, later VM optimizations reduced the frequency of calls to ioMSecs to the point\n\t   where clock performance became less critical, and we also started to want millisecond-\n\t   resolution timers for real time applications such as music. Thus, on the Mac, we've\n\t   opted to use the microsecond clock for both ioMSecs() and ioMicroMSecs(). */\n\tUnsignedWide microTicks;\n\n\tMicroseconds(&microTicks);\n\treturn (microTicks.lo / 1000) + (microTicks.hi * 4294967);\n}\n\nint ioMSecs(void) {\n\t/* return a time in milliseconds for use in Delays and Time millisecondClockValue */\n\t/* Note: This was once a macro based on clock(); it now uses the microsecond clock for\n\t   greater resolution. See the comment in ioMicroMSecs(). */\n\tUnsignedWide microTicks;\n\n\tMicroseconds(&microTicks);\n\treturn (microTicks.lo / 1000) + (microTicks.hi * 4294967);\n}\n\nint ioMousePoint(void) {\n\t/* return the mouse point two 16-bit positive integers packed into a 32-bit integer */\n\tPoint p;\n\n\tioProcessEvents();  /* process all pending events */\n\tGetMouse(&p);\n\treturn (p.h << 16) | (p.v & 0xFFFF);  /* x is high 16 bits; y is low 16 bits */\n}\n\nint ioPeekKeystroke(void) {\n\t/* return the next keystroke from the buffer or -1 if the buffer is empty; leave\n\t   the keystrok in the buffer. */\n\tint keystate;\n\n\tioProcessEvents();  /* process all pending events */\n\tif (keyBufGet == keyBufPut) {\n\t\treturn -1;  /* keystroke buffer is empty */\n\t} else {\n\t\tkeystate = keyBuf[keyBufGet];\n\t\t/* set modifer bits in buttonState to reflect the last keystroke peeked at */\n\t\tbuttonState = ((keystate >> 5) & 0xF8) | (buttonState & 0x7);\n\t}\n\treturn keystate;\n}\n\nint ioProcessEvents(void) {\n\t/* process Macintosh events, checking for the interrupt key. Return\n\t   true if the interrupt key was pressed. This might simply do nothing\n\t   on some other platform.*/\n\tint maxPollsPerSec = 30;\n\tstatic clock_t nextPollTick = 0;\n\n\tif (clock() > nextPollTick) {\n\t\t/* time to process events! */\n\t\twhile (HandleEvents()) {\n\t\t\t/* process all pending events */\n\t\t}\n\n\t\t/* wait a while before trying again */\n\t\tnextPollTick = clock() + (CLOCKS_PER_SEC / maxPollsPerSec);\n\t}\n\treturn interruptPending;\n}\n\nint ioScreenSize(void) {\n\t/* return the screen size as two positive 16-bit integers packed into a 32-bit integer */\n\tint w = 10, h = 10;\n\n\tif (stWindow != nil) {\n\t\tw = stWindow->portRect.right - stWindow->portRect.left;\n\t\th = stWindow->portRect.bottom - stWindow->portRect.top;\n\t}\n\treturn (w << 16) | (h & 0xFFFF);  /* w is high 16 bits; h is low 16 bits */\n}\n\nint ioSeconds(void) {\n\t/* return the time in seconds since midnight of Jan 1, 1901.  */\n\t/* optional: could simply return 0.  */\n\n\tstruct tm timeRec;\n\ttime_t time1904, timeNow;\n\n\t/* start of ANSI epoch is midnight of Jan 1, 1904 */\n\ttimeRec.tm_sec   = 0;\n\ttimeRec.tm_min   = 0;\n\ttimeRec.tm_hour  = 0;\n\ttimeRec.tm_mday  = 1;\n\ttimeRec.tm_mon   = 0;\n\ttimeRec.tm_year  = 4;\n\ttimeRec.tm_wday  = 0;\n\ttimeRec.tm_yday  = 0;\n\ttimeRec.tm_isdst = 0;\n\ttime1904 = mktime(&timeRec);\n\n\ttimeNow = time(NULL);\n\n\t/* Squeak epoch is Jan 1, 1901, 3 non-leap years earlier than ANSI one */\n\treturn (timeNow - time1904) + (3 * 365 * 24 * 60 * 60);\n}\n\nint ioSetCursor(int cursorBitsIndex, int offsetX, int offsetY) {\n\t/* old version; just call the new version. */\n\tioSetCursorWithMask(cursorBitsIndex, nil, offsetX, offsetY);\n}\n\nint ioSetCursorWithMask(int cursorBitsIndex, int cursorMaskIndex, int offsetX, int offsetY) {\n\t/* Optional primitive; this could be defined to do nothing. */\n\t/* Set the 16x16 cursor bitmap. If cursorMaskIndex is nil, then make the mask the same as\n\t   the cursor bitmap. If not, then mask and cursor bits combined determine how cursor is\n\t   displayed:\n\t\t\tmask\tcursor\teffect\n\t\t\t 0\t\t  0\t\ttransparent (underlying pixel shows through)\n\t\t\t 1\t\t  1\t\topaque black\n\t\t\t 1\t\t  0\t\topaque white\n\t\t\t 0\t\t  1\t\tinvert the underlying pixel\n\t*/\n\tCursor macCursor;\n\tint i;\n\n\tif (cursorMaskIndex == nil) {\n\t\tfor (i = 0; i < 16; i++) {\n\t\t\tmacCursor.data[i] = (checkedLongAt(cursorBitsIndex + (4 * i)) >> 16) & 0xFFFF;\n\t\t\tmacCursor.mask[i] = (checkedLongAt(cursorBitsIndex + (4 * i)) >> 16) & 0xFFFF;\n\t\t}\n\t} else {\n\t\tfor (i = 0; i < 16; i++) {\n\t\t\tmacCursor.data[i] = (checkedLongAt(cursorBitsIndex + (4 * i)) >> 16) & 0xFFFF;\n\t\t\tmacCursor.mask[i] = (checkedLongAt(cursorMaskIndex + (4 * i)) >> 16) & 0xFFFF;\n\t\t}\n\t}\n\n\t/* Squeak hotspot offsets are negative; Mac's are positive */\n\tmacCursor.hotSpot.h = -offsetX;\n\tmacCursor.hotSpot.v = -offsetY;\n\tSetCursor(&macCursor);\n}\n\nint ioShowDisplay(\n\t/* copy the given rectangular display region to the hardware display buffer. */\n\tint dispBitsIndex, int width, int height, int depth,\n\tint affectedL, int affectedR, int affectedT, int affectedB) {\n\n\tRect\t\tdstRect = { 0, 0, 0, 0 };\n\tRect\t\tsrcRect = { 0, 0, 0, 0 };\n\tRgnHandle\tmaskRect = nil;\n\n\tif (stWindow == nil) {\n\t\treturn;\n\t}\n\n\tdstRect.left\t= 0;\n\tdstRect.top\t\t= 0;\n\tdstRect.right\t= width;\n\tdstRect.bottom\t= height;\n\n\tsrcRect.left\t= 0;\n\tsrcRect.top\t\t= 0;\n\tsrcRect.right\t= width;\n\tsrcRect.bottom\t= height;\n\n\t(*stPixMap)->baseAddr = (void *) dispBitsIndex;\n\t/* Note: top three bits of rowBytes indicate this is a PixMap, not a BitMap */\n\t(*stPixMap)->rowBytes = (((((width * depth) + 31) / 32) * 4) & 0x1FFF) | 0x8000;\n\t(*stPixMap)->bounds = srcRect;\n\t(*stPixMap)->pixelSize = depth;\n\t(*stPixMap)->cmpSize = depth;\n\n\t/* create a mask region so that only the affected rectangle is copied */\n\tmaskRect = NewRgn();\n\tSetRectRgn(maskRect, affectedL, affectedT, affectedR, affectedB);\n\n\tSetPort(stWindow);\n\tCopyBits((BitMap *) *stPixMap, &stWindow->portBits, &srcRect, &dstRect, srcCopy, maskRect);\n\tDisposeRgn(maskRect);\n}\n\n/*** VM Home Directory Path ***/\n\nint vmPathSize(void) {\n\t/* return the length of the path string for the directory containing the VM. */\n\treturn strlen(vmPath);\n}\n\nint vmPathGetLength(int sqVMPathIndex, int length) {\n\t/* copy the path string for the directory containing the VM into the given Squeak string. */\n\tchar *stVMPath = (char *) sqVMPathIndex;\n\tint count, i;\n\n\tcount = strlen(vmPath);\n\tcount = (length < count) ? length : count;\n\n\t/* copy the file name into the Squeak string */\n\tfor (i = 0; i < count; i++) {\n\t\tstVMPath[i] = vmPath[i];\n\t}\n\treturn count;\n}\n\n/*** Image File Name ***/\n\nint imageNameSize(void) {\n\t/* return the length of the Squeak image name. */\n\treturn strlen(imageName);\n}\n\nint imageNameGetLength(int sqImageNameIndex, int length) {\n\t/* copy the Squeak image name into the given Squeak string. */\n\tchar *sqImageName = (char *) sqImageNameIndex;\n\tint count, i;\n\n\tcount = strlen(imageName);\n\tcount = (length < count) ? length : count;\n\n\t/* copy the file name into the Squeak string */\n\tfor (i = 0; i < count; i++) {\n\t\tsqImageName[i] = imageName[i];\n\t}\n\treturn count;\n}\n\nint imageNamePutLength(int sqImageNameIndex, int length) {\n\t/* copy from the given Squeak string into the imageName variable. */\n\tchar *sqImageName = (char *) sqImageNameIndex;\n\tint count, i, ch, j;\n\tint lastColonIndex = -1;\n\n\tcount = (IMAGE_NAME_SIZE < length) ? IMAGE_NAME_SIZE : length;\n\n\t/* copy the file name into a null-terminated C string */\n\tfor (i = 0; i < count; i++) {\n\t\tch = imageName[i] = sqImageName[i];\n\t\tif (ch == ':') {\n\t\t\tlastColonIndex = i;\n\t\t}\n\t}\n\timageName[count] = 0;\n\n\t/* copy short image name into a null-terminated C string */\n\tfor (i = lastColonIndex + 1, j = 0; i < count; i++, j++) {\n\t\tshortImageName[j] = imageName[i];\n\t}\n\tshortImageName[j] = 0;\n\n\treturn count;\n}\n\n/*** Clipboard Support ***/\n\nint clipboardReadIntoAt(int count, int byteArrayIndex, int startIndex) {\n\t/* return number of bytes read from clipboard; stubbed out. */\n\treturn 0;\n}\n\nint clipboardSize(void) {\n\t/* return the number of bytes of data the clipboard; stubbed out. */\n\treturn 0;\n}\n\nint clipboardWriteFromAt(int count, int byteArrayIndex, int startIndex) {\n\t/* write count bytes to the clipboard; stubbed out. */\n\treturn 0;\n}\n\n/*** System Attributes ***/\n\nchar * GetAttributeString(int id) {\n\t/* This is a hook for getting various status strings back from\n\t   the OS. In particular, it allows Squeak to be passed arguments\n\t   such as the name of a file to be processed. Command line options\n\t   are reported this way as well, on platforms that support them.\n\t*/\n\n\t// id #0 should return the full name of VM; for now it just returns its path\n\tif (id == 0) return vmPath;\n\t// id #1 should return imageName, but returns empty string in this release to\n\t// ease the transition (1.3x images otherwise try to read image as a document)\n\tif (id == 1) return \"\";  /* will be imageName */\n\tif (id == 2) return \"\";\n\n\t/* the following attributes describe the underlying platform: */\n\tif (id == 1001) return \"Mac OS\";\n\tif (id == 1002) return \"System 7 or Later\";\n\tif (id == 1003) return \"PowerPC or 680xx\";\n\n\t/* attribute undefined by this platform */\n\tsuccess(false);\n\treturn \"\";\n}\n\nint attributeSize(int id) {\n\t/* return the length of the given attribute string. */\n\treturn strlen(GetAttributeString(id));\n}\n\nint getAttributeIntoLength(int id, int byteArrayIndex, int length) {\n\t/* copy the attribute with the given id into a Squeak string. */\n\tchar *srcPtr, *dstPtr, *end;\n\tint charsToMove;\n\n\tsrcPtr = GetAttributeString(id);\n\tcharsToMove = strlen(srcPtr);\n\tif (charsToMove > length) {\n\t\tcharsToMove = length;\n\t}\n\n\tdstPtr = (char *) byteArrayIndex;\n\tend = srcPtr + charsToMove;\n\twhile (srcPtr < end) {\n\t\t*dstPtr++ = *srcPtr++;\n\t}\n\treturn charsToMove;\n}\n\n/*** Image File Read/Write ***/\n\nvoid * sqAllocateMemory(int minHeapSize, int desiredHeapSize) {\n\t/* allocate memory for Squeak object heap. */\n\tMaxBlock();\n\treturn NewPtr(desiredHeapSize);\n}\n\nvoid sqImageFileClose(sqImageFile f) {\n\tFSClose(f);\n}\n\nsqImageFile sqImageFileOpen(char *fileName, char *mode) {\n\tshort int err, err2, fRefNum;\n\tunsigned char *pascalFileName;\n\n\tpascalFileName = c2pstr(fileName);\n\terr = FSOpen(pascalFileName, 0, &fRefNum);\n\tif ((err != 0) && (strchr(mode, 'w') != null)) {\n\t\t/* creating a new file for \"save as\" */\n\t\terr2 = Create(pascalFileName, 0, 'FAST', 'STim');\n\t\tif (err2 == 0) {\n\t\t\terr = FSOpen(pascalFileName, 0, &fRefNum);\n\t\t}\n\t}\n\tp2cstr(pascalFileName);\n\tif (err != 0) return null;\n\n\tif (strchr(mode, 'w') != null) {\n\t\t/* truncate file if opening in write mode */\n\t\terr = SetEOF(fRefNum, 0);\n\t\tif (err != 0) {\n\t\t\tFSClose(fRefNum);\n\t\t\treturn null;\n\t\t}\n\t}\n\treturn (sqImageFile) fRefNum;\n}\n\nint sqImageFilePosition(sqImageFile f) {\n\tlong int currentPosition = 0;\n\n\tGetFPos(f, &currentPosition);\n\treturn currentPosition;\n}\n\nint sqImageFileRead(void *ptr, int elementSize, int count, sqImageFile f) {\n\tlong int byteCount = elementSize * count;\n\tshort int err;\n\n\terr = FSRead(f, &byteCount, ptr);\n\tif (err != 0) return 0;\n\treturn byteCount / elementSize;\n}\n\nvoid sqImageFileSeek(sqImageFile f, int pos) {\n\tSetFPos(f, fsFromStart, pos);\n}\n\nint sqImageFileWrite(void *ptr, int elementSize, int count, sqImageFile f) {\n\tlong int byteCount = elementSize * count;\n\tshort int err;\n\n\terr = FSWrite(f, &byteCount, ptr);\n\tif (err != 0) return 0;\n\treturn byteCount / elementSize;\n}\n\n/*** I/O Stubs ***/\n\nint ioFormPrint(int bitsAddr, int width, int height,\n\tint depth, double hScale, double vScale, int landscapeFlag)\t\t\t\tSTUBBED_OUT\nint ioHasDisplayDepth(int depth) \t\t\t\t\t\t\t\t\t\t\tSTUBBED_OUT\nint ioRelinquishProcessorForMicroseconds(int microSeconds)\t\t\t\t\tDO_NOTHING\nint ioSetDisplayMode(int width, int height, int depth, int fullscreenFlag)\tDO_NOTHING\nint ioSetFullScreen(int fullScreen) \t\t\t\t\t\t\t\t\t\tDO_NOTHING\n\n/*** File I/0 Stubs ***/\n\nint sqFileAtEnd(SQFile *f)\t\t\t\t\t\t\t\t\t\t\t\t\tSTUBBED_OUT\nint sqFileClose(SQFile *f)\t\t\t\t\t\t\t\t\t\t\t\t\tSTUBBED_OUT\nint sqFileDeleteNameSize(int sqFileNameIndex, int sqFileNameSize)\t\t\tSTUBBED_OUT\nint sqFileGetPosition(SQFile *f)\t\t\t\t\t\t\t\t\t\t\tSTUBBED_OUT\nint sqFileInit(void)\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ return true; }\nint sqFileOpen(\n  SQFile *f, int sqFileNameIndex, int sqFileNameSize, int writeFlag)\t\tSTUBBED_OUT\nint sqFileReadIntoAt(\n  SQFile *f, int count, int byteArrayIndex, int startIndex)\t\t\t\t\tSTUBBED_OUT\nint sqFileRenameOldSizeNewSize(\n  int oldNameIndex, int oldNameSize, int newNameIndex, int newNameSize)\t\tSTUBBED_OUT\nint sqFileSetPosition(SQFile *f, int position)\t\t\t\t\t\t\t\tSTUBBED_OUT\nint sqFileSize(SQFile *f) { return 0; }\nint sqFileShutdown(void)\t\t\t\t\t\t\t\t\t\t\t\t\t{ return 0; }\nint sqFileValid(SQFile *f)\t\t\t\t\t\t\t\t\t\t\t\t\tSTUBBED_OUT\nint sqFileWriteFromAt(\n  SQFile *f, int count, int byteArrayIndex, int startIndex)\t\t\t\t\tSTUBBED_OUT\n\n/*** Directory Stubs ***/\n\nint dir_Create(char *pathString, int pathStringLength)\t\t\t\t\t\tSTUBBED_OUT\nint dir_Delimitor(void)\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ return ':'; }\nint dir_Lookup(char *pathString, int pathStringLength, int index,\n  char *name, int *nameLength, int *creationDate, int *modificationDate,\n  int *isDirectory, int *sizeIfFile)\t\t\t\t\t\t\t\t\t\tSTUBBED_OUT\ndir_SetMacFileTypeAndCreator(char *filename, int filenameSize,\n  char *fType, char *fCreator)\t\t\t\t\t\t\t\t\t\t\t\tDO_NOTHING\nint dir_Delete(char *pathString, int pathStringLength)\t\t\t\t\t\tSTUBBED_OUT\n\n/*** External Primitive Support (No-ops) ***/\n\nint ioLoadModule(char *pluginName) { return 0; }\nint ioFindExternalFunctionIn(char *lookupName, int moduleHandle) { return 0; }\nint ioFreeModule(int moduleHandle) { return 0; }\n\n/*** Main ***/\n\nvoid main(void) {\n\tsqImageFile f;\n\tint availableMemory;\n\n\t/* check the interpreter's size assumptions for basic data types */\n\tif (sizeof(int) != 4) {\n\t\terror(\"This C compiler's integers are not 32 bits.\");\n\t}\n\tif (sizeof(double) != 8) {\n\t\terror(\"This C compiler's floats are not 64 bits.\");\n\t}\n\tif (sizeof(time_t) != 4) {\n\t\terror(\"This C compiler's time_t's are not 32 bits.\");\n\t}\n\n\tInitMacintosh();\n\tsqFileInit();\n\n\timageName[0] = shortImageName[0] = vmPath[0] = 0;\n\tstrcpy(imageName, \"squeak.image\");\n\tstrcpy(shortImageName, \"squeak.image\");\n\n\t/* compute the desired memory allocation */\n\tavailableMemory = MaxBlock() - 50000;\n\t/******\n\t  Note: This is platform-specific. On the Mac, the user specifies the desired\n\t    memory partition for each application using the Finder's Get Info command.\n\t    MaxBlock() returns the amount of memory in that partition minus space for\n\t    the code segment and other resources. On other platforms, the desired heap\n\t    size would be specified in other ways (e.g, via a command line argument).\n\t    The maximum size of the object heap is fixed at at startup. If you run low\n\t    on space, you must save the image and restart with more memory.\n\t\t(We reserve 50K for Mac toolbox calls, the error console window, etc.\n\t******/\n\n\t/* read the image file and allocate memory for Squeak heap */\n\tf = sqImageFileOpen(imageName, \"rb\");\n\tif (f == NULL) {\n\t\t/* give a Mac-specific error message if image file is not found */\n\t\tprintf(\"Could not open the Squeak image file '%s'\\n\\n\", imageName);\n\t\tprintf(\"In this minimal VM, the image file must be named 'squeak.image'\\n\");\n\t\tprintf(\"and must be in the same directory as the Squeak application.\\n\");\n\t\tprintf(\"Press the return key to exit.\\n\");\n\t\tgetchar();\n\t\tprintf(\"Aborting...\\n\");\n\t\tioExit();\n\t}\n\treadImageFromFileHeapSizeStartingAt(f, availableMemory, 0);\n\tsqImageFileClose(f);\n\n\t/* run Squeak */\n\tinterpret();\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Documentation/3.2.2 Release Notes.rtf",
    "content": "{\\rtf1\\mac\\ansicpg10000\\cocoartf100\n{\\fonttbl\\f0\\fnil\\fcharset77 Geneva;\\f1\\fnil\\fcharset77 LucidaGrande;}\n{\\colortbl;\\red255\\green255\\blue255;}\n\\margl1440\\margr1440\\vieww13420\\viewh10820\\viewkind0\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0\\fs24 \\cf0 Mac VM 3.2.2 mach-o build for Carbon.\\\nJan 30th 2002\\\n\\\nStill yet to do, in future versions.\\\nTest drag and drop at startup time\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f1 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work.\n\\f0 \\\n\\\nChanges:\\\n\\\na) AsyncFilePlugin.c Use global to remember security function entry point for performance reasons\\\nb) FilePlugin.c\tUse global to remember security function entry point for performance reasons\\\nc) interp.c Use squeakFileOffsetType versus off_t and add a bunch of checks to handle lack of long long and conversion errors between 64/32 bit integers and LargeInteger objects\\\nd) readme, it's http://www.mucow.com/Gnuifier.1.cs \\\ne) SocketPlugin.c\tUse global to remember security function entry point for performance reasons\\\nf) sq.h added default sqFilenameFromStringOpen and sqTruncate\\\ng) sqFilePluginBasicPrims.c revert to ansi specs, but ensure #def to fseeko and ftello for 64 bit aware file systems.\\\nh) sqMacDirectory.c A bit more error checking on bad file names\\\ni) sqMacFileLogic.c Folders size is now zero in classic, and a bit more checking on bad file names\\\nj) sqMacSound.c Fixed a problem with sound recording in classic due to a change made in Sept. But sound recording still does not work under os-x\\\nk) sqMacWindow.c  two very important changes:\\\n\\\n\t1) You can now do FFI calls with the FFI bundle plugin to Mach-o frameworks. \\\n\tHowever you need to rework your api calls. For example:\\\n\tapiGetMousePoint: aMacPoint was\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'InterfaceLib'>\\\n\tIt now is:\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'Carbon.framework'>\\\n \t\\\n\tIf you review /System/Library/Frameworks I'm sure you can come up with interesting ways to \\\n\tmake mac only squeak images.\\\n\t\\\n\tI now use mmap( NULL, gMaxHeapSize, PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED,-1,0);\\\n\tanonymous memory mapping to 512MB as the squeak memory block. The VM can then grow or shrink\\\n\twithin the 512MB block, I just move a pointer. \\\n\t\\\n\tNote in 3.2.1 a slight error on my part restricted Squeak to 50MB. I am of course\\\n\tinterested to hear about issues with my choice of 512MB. Note a Squeak VM is limited to 2GB under perfect \\\n\tconditions, however if any part of the image crosses the 2GB boundary the VM will fail, right now 512MB\\\n\tseemed a safe choice.\\\n\t\\\n \tPhysMem:  60.2M wired, 78.6M active,  412M inactive,  551M used,  217M free\\\n\tVM: 3.03G + 55.3M   7847(0) pageins, 1(0) pageouts   \\\n\tPID COMMAND      %CPU   TIME   #TH #PRTS #MREGS RPRVT  RSHRD  RSIZE  VSIZE\\\n\t422 Squeak VM    0.8%  0:35.59   2    71   100  23.3M  8.53M  26.5M   571M\n\\\n\\\n\tbut I only have one 80,000,000 byte swap file in /var/vm\\\n\\\nNote if you turn crash reporter on, then if the VM crashes a nice report should be generated in your log directory.  See the Apple documentation for a description of this feature, currently it is set in OS-X 10.1.x via the preferences window for the Console Application. If you have a crash with this VM, please recreate and post the crash log (found in Users/foobar/Library/Logs/ to the Squeak mailing list so we can continue to make the VM fault tolerant.\\\n\\\n3.2.1 Notes\\\n\\\nYou might need these change sets to build a new VM or to use all the features of this VM with your image, hopefully these will get into the pending 3.2.x image.\\\n\\\nFixes and feature extensions.\\\nAsyncFileFixFu...hName-JMM.1.cs \tfix for async test method.\\\nDragAndDropAtStart-JMM.5.cs\t\tfix to enable drag and drop at startup\\\n\\\nNeeded to compile a VM with VMMaker\\\nLargeFiles-JMM.3.cs\t\t\t\tEnable large file support, files > 2GB\\\n\\\nNeeded to turn this feature on\\\nMacLongFileName-JMM.5.cs\t\t\tEnable long file names on the mac\\\n\\\nThe SUnit\\\nMacLongFileNamesSUnits-JMM.3.cs\tTest long file names and long directory names and large file support\\\n\\\nKinda optional features some people might need.\\\nInternetConfiguration-JMM.5.cs\t\tAllow internet configuration information access, internal plugin\\\nUUID-JMM.3.cs\t\t\t\t\tAllow UUID generation, internal plugin\\\n\\\na) The ability to get back a UUID. This uses the hosting UUID generator if the\\\n hosting OS supports it and we have a primitive we can call. If not then we generate\\\n a type 4 version of a UUID (the random bits one).\\\n(This requires a special change set)\\\n\\\nb) Ability to start squeak on the mac by dragging multiple documents onto the\\\nimage, or drag and drop of stuff onto the running VM icon.\\\n(This requires a special change set)\\\n\\\nc) Usage of the Internet Configuration tool kit to supply information about\\\nwhat the mac proxy is etc. etc.\\\n(This requires a special change set)\\\n\\\nd) Migrate file system to use 64 bits. This allows you to read/write and seek\\\nwith files > 2 GB. This includes a change to the VM to convert from/to long\\\nlong integers. It also allows the file system to actually deal with 2GB files,\\\nthe current file interface actually fails once the file exceeds 1GB.\\\n\\\ne) For the carbon based Squeak VM we now support long file names 255\\\ncharacters. Close both eyes and touch everywhere the mac VM deals with file\\\nname paths and hope for the best (Actually we write an Sunit to ensure we've\\\nnot broken everything). This also includes the ability to put an image in a\\\nlong file name directory, but right now the image name must stay under 32 characters.\\\n\\\nFilePlugin.c changes to support large integers.\\\nFilePlugin.h changes\\\nsq.h changes to support large files.\\\nsqConfig.h changes to resolve some conflicts.\\\nsqFilePluginBasicPrims.c  changes to support large files.\\\nsqMacAsyncFilePrims.c changes to use fspec versus 255 file path.\\\nsqMacDirectory.c changes to use hosting OS (OS-X) bsd create and delete directory\\\n and truncate. dir_look changes as part of the general rewrite.\\\nsqMacDragAndDrop.c use new call to get path name from fsspec. Use fsspec more, and added \\\n  interface code to setup drag and drop of items at application startup time. max document name\\\n  goes to 1000 characters.\\\nsqMacFileLogic.c Mostly rewrote!\\\nsqMacSecurity.c use new file calls.\\\nsqMacWindow.c \\\n\tincrease size of vmpath, docpath, imagepath to 1000 chars, shortname to 255 characters.\\\n\tadd logic for left/right modifier keys \\\n\treworked LoadLibViaPath logic \\\n\tsqImageFileOpen uses fsspec versus 255 path name.\\\n\tsqImageFileStartLocation uses ffspec.\\\n\tbundle support for bundles\\\n\t\\\ne2) interp.c supports get/put of large integers to long long integers.\\\ne3) fixed fTruncate\\\n\\\nHint getting this to work was a pain. Think of 255 character folder names and nested aliases,\\\nfolder 1 refers to folder 2 which then refers to folder 1 again, just go down the path say 8 times,\\\nthen ask to create a file or directory!\\\n\\\nf) Support to change the Mac screen resolution under Squeak control.\\\n\\\ng) Fix to unload/load the scrap at startup time to ensure the clipboard is\\\ncorrect when starting up the VM.\\\n\\\nh) Uncouple the shift key and left/right shift keys on old extended keyboard.\\\nAlso add a call to get which keys are currently pressed on a USB keyboard or\\\nthe USB codes for an apple non-usb keyboard. (Note this isn't working quite yet under OS-X)\\\n\\\ni) Changes to enable us to compile the VM under Apple's OS-X Project Builder\\\nenvironments.\\\n\\\nj) Some rewriting to ensure serial and midi support can be written as external\\\nplugins.\\\n\\\nk) Fiddling to get sound input to work under OS-X\\\n\\\nl) Platform.exports changed macintosh to macintoshSqueak to avoid conflict.\\\n\\\nm) Memory is allocated at 50MB at start, then will grow or shrink, verus previous carbon apps\\\n that did 1GB. \\\n \\\nn) sqPlatformSpecific.h changes to support long file names and os-x posix file names\\\n\\\no) sqVirtualmachine.c & sqVirtualmachine.h\\\n#if VM_PROXY_MINOR > 4\\\n\tVM->positive64BitIntegerFor = positive64BitIntegerFor;\\\n\tVM->positive64BitValueOf = positive64BitValueOf;\\\n\tVM->signed64BitIntegerFor = signed64BitIntegerFor;\\\n\tVM->signed64BitValueOf = signed64BitValueOf;\\\n#endif\\\n\\\nBeware this causes an interesting problem, if you compile plugins with VM_PROXY_MINOR now set to 5, then they will not work with older VMs. The solution is to define the VM_PROXY_MINOR in the plugin to the value that indicates what features it is using.\\\n\\\np) Changed to use ITimer logic as a 16ms lowres timer to improve performance\\\n\\\nq) Changed to use single thread, no thread manager.\\\n\\\nr) Changed to use lowres timer in checking for polling time to improve performance\\\n\\\ns) It should have faster startup times.\\\n\\\nt) It will hide the empty window at startup, then show the squeak window when required.\\\n\\\nu) It has a different menu structure.\\\n\\\nv) It does less I/O when navigating directories.\\\n\\\nThe macintosh 3.1Alpha1MT VM, Sept 24th 2001 \\\nThis VM was built with the base  3.1 image at change set #4347\\\nV3.1.1 at change set #4347\\\n\\\n\\\nWe go to V3.1.1 to indicate that the 3.1 VM is being used. In the past the 3.1 Image was used but some changes in the openGL logic makes  3.1 Vm and 3.0 image not quite work correctly with 3d graphics. Although a 3.1 VM will run many images way back to the 2x series no careful study has been done on the ability to do this. So at this point we are indicating this VM is a 3.1 VM and best used with a 3.1 image.\\\n\\\nUse of VMMaker to build VM. As of this version everything can be built as an external except for the window logic which hasn't been decoupled from the VM support for the macintosh. \\\n\\\n1) AsynchFilePlugin the security check for ability to create file is now a plugin call.\\\n2) B2DPlugin logic changes to fillLinearGradientfromtoat\\\n3) b3dRemapFaces, b3dRemapEdges, b3dRemapEdgeList, b3dRemapAET, b3dRemapEdgeVertices, b3dRemapFaceVertices, b3dRemapFaceFree, b3dRemapEdgeFree, b3dRemapAttributes. Some casting and changing of += to = + to make some compilers happy.\\\n4) BitBltPlugin added tableLookupat call.\\\n5) DropPlugin added setFileAccessCallback to allow the Security Module plugin the ability to give us the entry point to turn security off so we can open files as read only when security is turned on.  This was broken in the past. \\\n 6) FilePlugin added fileOpennamesizewrite,getThisSession to allow for callbacks. Changed the file security logic to use the plugin interface. \\\n7) interp.c, fixes for 4347ByteArrayRangeCheck-di, ability to printAllStacks, security calls for image rename, write to use plugin interface.\\\n8) Added GetAttributeString, and recordDragDropEvent and entry points for callbacks.\\\n9) SecurityPlugin changed when initialization is called to initialize the safe and unsafe directorys, also added entry points for all the testing calls so it can be a true plugin.\\\n10) Serialplugin. The serial plugin was redesigned to seperate out MIDI logic. People with MIDI devices and old serial macintosh should check to see if they still work since we lack equipment now to test this obsolete technology set.\\\n11) SocketPlugin. Make security calls true plugin calls.\\\n12 SoundGenerationPlugin. Removed \\\nEXPORT(int) SoundGenerationPlugin_primitiveFMSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveOldSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitivePluckedSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveWaveTableSoundMix(void);\\\nThey were a hack at the plugin level and discussion on the list seemed to show they were no longer used. \\\n13) Checking for if defined (__APPLE__) && defined(__MACH__) for the Mac OS-X native development environment\\\n14) Changed sqMacAsyncFilePrims, usage of interpreterProxy->, plugin calls for getThisSession. \\\n15) Changed sqMacDirectory.c. Removed some utility code and make it a seperate file so that it can be shared between sqMacWindow and other plugins that require them. \\\n16) Changed sqMacDragDrop.c. Added plugin callback for getSTWindow, the sqSetFileAccessCallback logic, fileOpennamesizewrite, and secHasFileAccess. Added logic to do the recordDragDropEvent callback to sqMacWindow.c \\\n17) sqMacNetwork.c. Some cleanup for the OS-X version of the OpenTransport headers, some constants have name changes\\\n18) sqMacNSPlugin.c Use of ioLoadFunctionFrom(NULL, \"DropPlugin\"); versus explicit call.\\\n19) sqMacOpenGL.c. Some cleanup for the OS-X version of the OpenGL headers\\\n20) sqMacOpenGLInfo.c. Some cleanup for the OS-X version of the OpenGL headers\\\n21) sqMacSecurity.c ioInitSecurity calls back to dragAndDrop plugin to set entry point to turn security off.  Added code to create directories if required and ensured callbacks are plugitized.\\\n22) sqMacSound.c Some cleanup for the OS-X version of the Sound headers. Use of interpreterProxy-> in the proper places.\\\n23) sqMacWindow.c Some cleanup for the OS-X version of the compiler.  Fixed saveAsEmbeddedImage, this got broken when we moved from a FAT to a ppc only application.  Altered interface to recordDragDropEvent so that it was plugable. Some file path name logic goes to a seperate C source file. The drag and drop plugin is loaded and intialized after the image is loaded but before the interpreter is started, before it was done a bit earlier in the startup process. This also has the effect of initializing the security module.\\\n24)sqOpenGLRenderer.c. Some cleanup for the OS-X version of the OpenGL headers\\\n25)SurfacePlugin.c gets a hack so it knows when it is internal versus external.\\\n\\\n\\\n\\\nv3.0.18 at change set #4081\\\n(Note browser plugin goes to 3.0.23\\\n\\\n1) sqMacOpenGL.c Quite a few changes were made to the code to support it as an internal plugin for the browser. This is because the drawable frame for a browser plugin is a subset of the browser's grafport, so lots more care must be taken to draw in the correct location using OpenGL. We also fixed issues with re-configurating the Open/GL draw area when the window gets resized or goes to full screen, and attempted to ensure multiple screens will work.\\\n\\\n2) sqMacWindow.c, minor fix to cast a constant char * to char * for CW 6.1\\\n\\\n\\\nBrowser plugin 3.0.23 fixes\\\n\\\n1) Integerated the H/W Acceleration as an builtin plugin\\\n2) Added logic for pre and post event interaction to browser plugin event handler for H/W Acceleration logic. The external H/W Acceleration plugin mostly works with the browser plugin but doesn't work with full screen mode, or if the plugin is embedded in a window or a scrollable frame, so don't use it. Use the browser plugin 3.0.23 or higher which has the H/W Acceleration builtin.\\\n\\\nv3.0.17 at change set #4081\\\n(Note browser plugin goes to 3.0.21)\\\n\\\n1) Added HW acceleration as internal plugin.\\\n2) 4079BBAlphaTextFix-ar Fixes the problem with alpha text, changes BitBltPlugin.c \\\n3) Added primitive on the mac to truncate a file.\\\n4) Added logic to flush volume on a flush file to ensure file and control blocks are flushed.\\\n5) For the Carbon VM we increase nextevent wait time if we get sufficent idle time. This should reduce CPU usage under OS-X\\\n6) GetAttribute: 1002 now returns the gestaltSystemVersion as a hex string, and getAttribute: 1003 now returns either '68K' or 'PowerPC'.\\\n7) Starting with 3.0.17 the VM is build only as a powerpc application. The latest VM as a 68K application will be made available from time to time permits based on people's needs. \\\n8) Changes to sqOpenGLRenderer.c to improve performance, OpenGL 1.1 support.\\\n\\\nPlugin 3.0.21 fixes\\\n\\\n1) added check for mailto: tag on posts to fix problem with Netscape crashing, and IE hanging.\\\n2) Plus above fixes.\\\n\\\nWhat has been fixed/changed.\\\nv3.0.16 at change set #4041\\\n(Note browser plugin goes to 3.0.20)\\\n\\\n1) Lots of fixes for BitBlt and HW acceleration.\\\n2) Hardware Acceleration plugin goes to 1.0.1. Please note there is a seperate plugin with the same name for Carbon. Doing a get info will identify if the plugin is only usable with Carbon Squeak.\\\n\\\nv3.0.15 at change set #4026 (May 17th test version)\\\n(Note browser plugin goes to 3.0.19)\\\n\\\n1) Added support for OpenGL HW acceleration plugin\\\n\\\nPlugin 3.0.19 fixes\\\n\\\na) Obey embedded tag plug\\\nb) Fix problem with plugin 3.0.17 not working with netscape 4.x\\\nc) Carbonize plugin for IE 5.1 \\\nd) Remove debugging printf than occurred on transition to full screen mode\\\n\\\nWhat has been fixed/changed.\\\nv3.0.14 at change set #3987\\\n\\\n(Note plugin goes to 3.0.17)\\\n\\\n1) sqMacDirectory.c. The pathlookup would handle the case of foo:bar::do incorrectly by ignoring the :: path redirection. This has been fixed. However a path lookup will not work if it contains :: and an aliased directory in the middle of the path.\\\n\\\n2) sqMacSecurity.c. The pathname for the untrustedUserDirectory was built incorrectly, and the bug mentioned above in sqMacDirectory.c usually kept this from being noticed.\\\n\\\n3) sqMacWindow.c  we added some logic to do the delay for primitiveRelinquishProcessor, but found it had an large effect on a freecell benchmark. I suspect on a Morpic step wait there is nothing to do so primitiveRelinquishProcessor gets called which then affects response time. So for now we revert to the 3.0.11 behavior, good performance and 100% CPU usage!\\\n\\\n4) GetAttribute 1004 returns returns interpreterVersion; which is for example\\\n\"Squeak3.1alpha of 6 February 2001 [latest update: #3987]\"\\\n\\\n5) When in full screen mode we now attempt to disable resizing, zooming, or moving the window. The window borders are hidden, but in the past it was feasible to grab an edge and alter it, thus confusing the VM.\\\n\\\n6) Worked on Carbonizing the browser plugin\\\n\\\n7) 3977 & 3978 FloatArray fixes. Makes float arrays go through a new (and working) version of #primitiveHash\\\n\\\n8) Fixed problem with accidental mouse clicks being triggered from pulldown menus on application switching.\\\n\\\n9)\\\n\"Change Set:\t\t3984 BitBltExtensions-ar\\\nDate:\t\t\t4 May 2001\\\nAuthor:\t\t\tAndreas Raab\\\n\\\nThe change set includes various extensions for BitBlt with the goal of migrating the useful features from FXBlt into the general BitBlt mechanisms. These include:\\\n\\\n* Handling of LSB and MSB forms:\\\nBitBlt now handles both, MSB and LSB forms (and their conversions). Only instances of Bitmap are assumed to contain big-endian pixels. All others are assumed to be little endian (reason is that we can only identify Bitmap here). Note that 'LSB' and 'MSB' refers to PIXELS, that is a 1bpp LSB form has its left most pixel in the lowest bit whereas a 1bpp MSB form has its left-most pixel in the highest bit.\\\n\\\nFor pixel depths < 8 this can be different from what your OS supplies (as an example, Windows bitmaps < 8 are big-endian pixels in little-endian words; we might call them 'middle-endian'). We simply don't deal with those - forms are either big or little endian but nothing inbetween.\\\n\\\nBitBlt has got an extra combination rule for swapping pixels in the destination form. This can be used to make byte swapping much more efficient (as soon as we've got more VMs with support for it).\\\n\\\n* Handling of 'native bitmaps' (aka surfaces):\\\nBitBlt is now able to deal with OS surfaces that are registered with the surface plugin.\\\n\\\n* Handling of full color maps:\\\nBitBlt has been extended to deal with instances of ColorMap in addition to the prior mechanism of using only indexed lookups and provide an implicit 16-32 bit color conversion. ColorMaps can specify both, a lookup table and an additional set of masks and shifts to apply during the color mapping operation. \\\n\\\nFour independent shifts and masks can be given which can be used for a lot more than just color conversion (as an example, one could do byte swapping with this; but see also BitBlt class>>exampleColorMap). \\\n\\\n* Better handling of default arguments:\\\nFor most of the required arguments for BitBlt very reasonable default assumptions can be made. This includes the destOrigin (0@0), clipRect (0@0 extent: destForm extent), sourceOrigin (0@0). BitBlt now substitutes these if they are absent (e.g., nil) in the instance provided.\\\n\\\n\"\\\n\\\n\\\nv3.0.13 at change set #3848\\\n\\\n1) sqMacSecurity was changed to set the unsecure directory to\\\n\tsystem folder:Preferences:Squeak:Internet:My Squeak\\\n\\\nv3.0.12 at change set #3848\\\n1) Fixed problem with creating My Squeak Folder in Documents Folder with System 8.6\\\n\\\nWhat has been fixed/changed.\\\nv3.0.11 at change set #3848\\\n\\\n1) sqMacDirectory had a bug when you resolved a path name. The fast resolve always failed, which invoked the slow resolver. Now the fast resolver works.\\\n\\\n2) sqMacSecurity was changed to set the unsecure directory to Documents:My Squeak. \\\n\\\n3) sqMacWindow was changed to fix some issues with Squeak capturing events from other applications and to reduce the number of duplicate mouse events that are generated. Also we capture modifier information  directly from the mouse and keyboard on null events to fix some problems with Carbon. We  hopefully fixed problems with mouse clicks from foreground applications being seen by Squeak and issues with the OS-X Dock clicks.\\\n\\\n4) sqMacNSPlugin was changed to use the above mouse/keyboard capture code which is much cleaner than the original fix for the bogus modifier information given to us by netscape on a null event. \\\n\\\n5) When you turn full screen off we now correctly reposition the window to the original location versus a few pixels to the left. \\\n\\\nWhat has been fixed/changed.\\\nv3.0.10 at change set #3848\\\n\\\n1) changed VM exception unwind logic\\\n\t3796-Exception-unwind-V3,tim@sumeru.stanford.edu, Paul McDonough, Stephen Pair and others\\\n\\\n2) Fixes for the JPEGReader plugin and for Jitter 3\\\n\\\n3) Added minimal Mac VM logic to assist in building a small VM.\\\n\\\n4) Changed how the browser plugin starts up. Now it starts the interpreter running only after getting the browser setwindow command. This seems to fix a race condition that resulted in a crash at startup time with Netscape 4.x\\\n\\\n5) Fixed broken full screen redraw on cmd-tab\\\n\\\n6) Fixed what looked like mouse-down, mouse-down, mouse-up sequence. Now reports mouse-down, mouse up.\\\n\\\n7) Added StarSqueak plugin as internal plugin\\\n\\\n8) Note the current Squeak Plugin should be gotten from the www.squeakland.org site.\\\n\\\nv3.0.9 at change set #3776, Boston Snow storm build.\\\n\\\n1) A number of changes were made to the interpreter:\\\n\ta) added primitive to change a class.\\\n\tb) added primitives to get or put 32bit integers\\\n\tc) Fix problem with GC and class reshaping\\\n\td) Better logic for method cache flushing\\\n\\\n2) Added JPEGReader plugin\\\n\\\n\\\nV3.0.8 at change set #3740\\\n\\\n1) The caps lock no longer maps to the shift attribute. So if the caps lock is down mouse clicks will behave normally. \\\n\\\n2) Numerous fixes for the BitBltPlugin plugin\\\n\\\n3) Memory allocation grow/shrink logic for Carbon was added.\\\n\\\n4) Spurious mouse clicks for the browser plugin has been fixed. (This took awhile to fix, I'm sure it's a bug with the Swedish version of Netscape)\\\n\\\n5) The browser plugin will attempt first to allocate memory from the browser heap, then the system heap. Most people when faced with a memory issue usually increase memory for the browser first. However memory for the plugin is controlled by an attribute in the EMBED HTML statement. \\\n\\\nV3.0.7\\\n\\\n1) A bug exists in pre OS 8.x that causes a crash in activate window if the standard get file \\\ndialog comes up before the Squeak Window. I remove the InvalWindow call found in that routine since it is actually redundant.\\\n\\\n2) The standard get file dialog on system 7.x would not terminate if you did a cancel.\\\n\\\n3) The InterfaceLib had to be weak linked to prevent CFM startup issues. \\\n\\\nV3.0.6\\\n\\\n1) Alias resolving is less aggressive.\\\n\\\n2) We no longer cache image reads or writes. This was done because OS 9.1 allows you to have very large disk caches, and it's pointless to cache the image read or write.\\\n\\\n3) The file flush primitive now actually flushes the file via an OS call. This was a bug in the CodeWarrior 5.3 source code.\\\n\\\n4) The 68K version was being built with the 68881 math library. This fails on 68040LC chips. We now use the non-68881 math library. Thanks to Bruce ONeel for find this.\\\n\\\n5) A bug was found in the path resolving logic that was added for 3.x. This bug apparently only affects 68K machines,  never was identified as a PowerPC issue. \\\n\\\n6) The Netscape plugin needs a properly allocated clip region, this code seemed to work ok on new systems, but fails on system 7.6.1\\\n\\\n7) The security interface will create a Documents folder on the root volume if the default Document folder has been deleted. This is needed for security purposes. \\\n\\\n8) Jitter needs 1MB of free memory to run.\\\n\\\n9) 68K machines require another 32K of stack\\\n\\\n10) Threads  now work on 68K machines, but turned off because of possible performance issues. (I think more study is needed).\\\n\\\n11) The 68K version was compiled with better optimization, expect a 15% improvement.\\\n\\\n12) fix for BitBltPlugin ascii = byteAt((sourcePtr + charIndex) - 1);\\\n\\\n13) The interpreter object validation checking code was alter to work correctly.\\\n\\\nV3.0.5\\\n\\\n1) sqConfig.h changed due to BE OS header changes\\\n\\\n2) sqMacDirectory.c. Added support for Navigation services or Standard File Get to find the image at startup time when the Squeak.image is not found by the VM. This replaces the DOS like console message that comes up saying that Squeak can't find a image.\\\n\\\n3) A fix to drag and drop for the browser plugin.\\\n\\\n4) We now use Apple's cooperative multithreading package to run the UI in one thread, the VM in the other. This solves some issues with the browser and makes the UI versus VM logic and execution responsibilities easier to understand. \\\n\\\n5) Changed the sqMacNSPlugin.c code to support a 3.0VM using multithreading support. This should give Squeak in a browser better performance. Also changed the full screen support to correctly work with multiple monitors.\\\n\\\n6) BitBltPlugin.c gets one more op code\\\n\\\n7) Added the security interface\\\n\\\n8) Added the file flush primitive\\\n\\\n9) Rewrote the macintosh readme file\\\n\\\n10) Revisited the zoomWindow code and found a bug with multiple monitor support, then I fixed the code to make Full Screen mode work on screen that Squeak window is mostly on, versus the menubar screen. Also if you switch from full screen back it resizes the window back to the orginal size and location before you invoked the full screen. \\\n\\\nV3.0.2\\\nPlugins\\\n\\\nRecompiled the internal BitBltPlugin plugin to encorporate:\\\nChange Set:\t\t258AlphaBlendOpt-dsm\\\nAuthor:\t\t\tDuane Maxwell, Paul Phillips/exobox\\\na) Short circuits full opaque and full transparent pixels when alpha blending.\\\n\\\nRecompiled the internal LargeIntegerPlugin\\\n3298LargeIntegersV1-2-sr -- Stephan Rudlof -- 29 November 2000\\\n3299LargeIntV1-2For29-sr -- Stephan Rudlof -- 29 November 2000\\\n\\\nVM Software\\\n\\\n(b) PowerManagement for macintosh is now supported. You can disable the power manager to give you better performance on some powerbooks at the expense of battery life. See the Preferences Panel for details, category 'Performance'\\\n- changed sq.h\\\n- changed sqMacWindow.c to add support for power mgr disabling\\\n\\\n(c) Drag and Drop support for the macintosh, dragging files from the Finder to the Squeak window is now supported.\\\n- sqMacDragDrop.c added\\\n- sqMacWindow.c changed\\\n\\\n(d) Added primitive for get macintosh creator and file type.\\\n- sqMacDirectory.c changed\\\n\\\n(e) Carbon support. Thanks to Karl Goiser karl@wattle.net for work he did on sound and other Carbonization hotspots.\\\n- sqMacAsyncFilePrims.c changed\\\n- sqMacFFIPPC.c changed (not supported for Carbon)\\\n- sqMacNetwork.c changed per Apple tech note 1173 Carbon asset tracking\\\n-sqMacSerialAndMIDIPort.c chnaged (Not supported for Carbon)\\\n- sqMacSound.c changed per Apple tech note 1198 Carbon double sound buffer playing\\\n- sqMacWindow.c changed (various changes for Carbon)\\\n\\\n(f)  Poll at least 60 times a second for the mouse if required. Previous 2.9.x VM did it 30 times but this is too slow and 2.8.x VM do it 60 times a second.\\\n\\\n(g) Reworked path support Thanks to Karl Goiser karl@wattle.net for starting this.\\\n- sqmacDirectory.c changed reworked lookupPath\\\n- sqMacWindow.c changed, added GetApplicationDirectory to get application directory\\\n\\\n(h) I rewrote the sqMacDirectory.c logic to enable proper understanding of Apple's Alias logic. This means for example you can alias the \"SqueakV3.sources\" file and then only have one copy and have all your images point to it. \\\n\\\n(i) Added Zoom Window support.\\\n\\\n(j) Change the Squeak change file icon to better match Apple's visual guidelines, Thanks to Doug Way for the suggestion and the new icons.\\\n\\\n(k) The sound plugins have changed...\\\n\\\n(j) Dropped FFI out of the base Squeak because of security concerns\\\n\\\n(k) Compiled for 750(G3) processor versus 603\\\n\\\n(l) Added screenDepth primitive\\\n\\\nThe 3.0.x VM contains most of the optional plugins, you might want to check this by inspecting \"Smalltalk listBuiltinModules\" to see where your plugins are coming from. In some case people have been accidentally overriding the new builtin plugins with older plugins. \\\n\\\nThe file \"Squeak 3.0Alpha10MT.sig\" contains the PGP signature for the Squeak 3.0Alpha10MT VM\\\n\\\nJohn M McIntosh  johnmci@smalltalkconsulting.com\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n}"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Documentation/3.2.3 Release Notes.rtf",
    "content": "{\\rtf1\\mac\\ansicpg10000\\cocoartf100\n{\\fonttbl\\f0\\fnil\\fcharset77 Geneva;\\f1\\fnil\\fcharset77 LucidaGrande;}\n{\\colortbl;\\red255\\green255\\blue255;}\n\\margl1440\\margr1440\\vieww13420\\viewh10820\\viewkind0\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0\\fs24 \\cf0 Mac VM 3.2.3 mach-o build for Carbon.\\\nFeb 5th 2002\\\n\\\nStill yet to do, in future versions.\\\nTest drag and drop at startup time\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f1 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work.\n\\f0 \\\n\\\nChanges\\\n\\\na) use old extended time manger to update psudeo-TickCount, versus sigalrm. siglarm make sound recording not work.\\\nb) fiddle with sound recording and make it work.\\\n\\\nJan 2002 3.2.2\\\nChanges:\\\n\\\na) AsyncFilePlugin.c Use global to remember security function entry point for performance reasons\\\nb) FilePlugin.c\tUse global to remember security function entry point for performance reasons\\\nc) interp.c Use squeakFileOffsetType versus off_t and add a bunch of checks to handle lack of long long and conversion errors between 64/32 bit integers and LargeInteger objects\\\nd) readme, it's http://www.mucow.com/Gnuifier.1.cs \\\ne) SocketPlugin.c\tUse global to remember security function entry point for performance reasons\\\nf) sq.h added default sqFilenameFromStringOpen and sqTruncate\\\ng) sqFilePluginBasicPrims.c revert to ansi specs, but ensure #def to fseeko and ftello for 64 bit aware file systems.\\\nh) sqMacDirectory.c A bit more error checking on bad file names\\\ni) sqMacFileLogic.c Folders size is now zero in classic, and a bit more checking on bad file names\\\nj) sqMacSound.c Fixed a problem with sound recording in classic due to a change made in Sept. But sound recording still does not work under os-x\\\nk) sqMacWindow.c  two very important changes:\\\n\\\n\t1) You can now do FFI calls with the FFI bundle plugin to Mach-o frameworks. \\\n\tHowever you need to rework your api calls. For example:\\\n\tapiGetMousePoint: aMacPoint was\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'InterfaceLib'>\\\n\tIt now is:\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'Carbon.framework'>\\\n \t\\\n\tIf you review /System/Library/Frameworks I'm sure you can come up with interesting ways to \\\n\tmake mac only squeak images.\\\n\t\\\n\tI now use mmap( NULL, gMaxHeapSize, PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED,-1,0);\\\n\tanonymous memory mapping to 512MB as the squeak memory block. The VM can then grow or shrink\\\n\twithin the 512MB block, I just move a pointer. \\\n\t\\\n\tNote in 3.2.1 a slight error on my part restricted Squeak to 50MB. I am of course\\\n\tinterested to hear about issues with my choice of 512MB. Note a Squeak VM is limited to 2GB under perfect \\\n\tconditions, however if any part of the image crosses the 2GB boundary the VM will fail, right now 512MB\\\n\tseemed a safe choice.\\\n\t\\\n \tPhysMem:  60.2M wired, 78.6M active,  412M inactive,  551M used,  217M free\\\n\tVM: 3.03G + 55.3M   7847(0) pageins, 1(0) pageouts   \\\n\tPID COMMAND      %CPU   TIME   #TH #PRTS #MREGS RPRVT  RSHRD  RSIZE  VSIZE\\\n\t422 Squeak VM    0.8%  0:35.59   2    71   100  23.3M  8.53M  26.5M   571M\\\n\\\n\tbut I only have one 80,000,000 byte swap file in /var/vm\\\n\\\nNote if you turn crash reporter on, then if the VM crashes a nice report should be generated in your log directory.  See the Apple documentation for a description of this feature, currently it is set in OS-X 10.1.x via the preferences window for the Console Application. If you have a crash with this VM, please recreate and post the crash log (found in Users/foobar/Library/Logs/ to the Squeak mailing list so we can continue to make the VM fault tolerant.\\\n\\\n3.2.1 Notes\\\n\\\nYou might need these change sets to build a new VM or to use all the features of this VM with your image, hopefully these will get into the pending 3.2.x image.\\\n\\\nFixes and feature extensions.\\\nAsyncFileFixFu...hName-JMM.1.cs \tfix for async test method.\\\nDragAndDropAtStart-JMM.5.cs\t\tfix to enable drag and drop at startup\\\n\\\nNeeded to compile a VM with VMMaker\\\nLargeFiles-JMM.3.cs\t\t\t\tEnable large file support, files > 2GB\\\n\\\nNeeded to turn this feature on\\\nMacLongFileName-JMM.5.cs\t\t\tEnable long file names on the mac\\\n\\\nThe SUnit\\\nMacLongFileNamesSUnits-JMM.3.cs\tTest long file names and long directory names and large file support\\\n\\\nKinda optional features some people might need.\\\nInternetConfiguration-JMM.5.cs\t\tAllow internet configuration information access, internal plugin\\\nUUID-JMM.3.cs\t\t\t\t\tAllow UUID generation, internal plugin\\\n\\\na) The ability to get back a UUID. This uses the hosting UUID generator if the\\\n hosting OS supports it and we have a primitive we can call. If not then we generate\\\n a type 4 version of a UUID (the random bits one).\\\n(This requires a special change set)\\\n\\\nb) Ability to start squeak on the mac by dragging multiple documents onto the\\\nimage, or drag and drop of stuff onto the running VM icon.\\\n(This requires a special change set)\\\n\\\nc) Usage of the Internet Configuration tool kit to supply information about\\\nwhat the mac proxy is etc. etc.\\\n(This requires a special change set)\\\n\\\nd) Migrate file system to use 64 bits. This allows you to read/write and seek\\\nwith files > 2 GB. This includes a change to the VM to convert from/to long\\\nlong integers. It also allows the file system to actually deal with 2GB files,\\\nthe current file interface actually fails once the file exceeds 1GB.\\\n\\\ne) For the carbon based Squeak VM we now support long file names 255\\\ncharacters. Close both eyes and touch everywhere the mac VM deals with file\\\nname paths and hope for the best (Actually we write an Sunit to ensure we've\\\nnot broken everything). This also includes the ability to put an image in a\\\nlong file name directory, but right now the image name must stay under 32 characters.\\\n\\\nFilePlugin.c changes to support large integers.\\\nFilePlugin.h changes\\\nsq.h changes to support large files.\\\nsqConfig.h changes to resolve some conflicts.\\\nsqFilePluginBasicPrims.c  changes to support large files.\\\nsqMacAsyncFilePrims.c changes to use fspec versus 255 file path.\\\nsqMacDirectory.c changes to use hosting OS (OS-X) bsd create and delete directory\\\n and truncate. dir_look changes as part of the general rewrite.\\\nsqMacDragAndDrop.c use new call to get path name from fsspec. Use fsspec more, and added \\\n  interface code to setup drag and drop of items at application startup time. max document name\\\n  goes to 1000 characters.\\\nsqMacFileLogic.c Mostly rewrote!\\\nsqMacSecurity.c use new file calls.\\\nsqMacWindow.c \\\n\tincrease size of vmpath, docpath, imagepath to 1000 chars, shortname to 255 characters.\\\n\tadd logic for left/right modifier keys \\\n\treworked LoadLibViaPath logic \\\n\tsqImageFileOpen uses fsspec versus 255 path name.\\\n\tsqImageFileStartLocation uses ffspec.\\\n\tbundle support for bundles\\\n\t\\\ne2) interp.c supports get/put of large integers to long long integers.\\\ne3) fixed fTruncate\\\n\\\nHint getting this to work was a pain. Think of 255 character folder names and nested aliases,\\\nfolder 1 refers to folder 2 which then refers to folder 1 again, just go down the path say 8 times,\\\nthen ask to create a file or directory!\\\n\\\nf) Support to change the Mac screen resolution under Squeak control.\\\n\\\ng) Fix to unload/load the scrap at startup time to ensure the clipboard is\\\ncorrect when starting up the VM.\\\n\\\nh) Uncouple the shift key and left/right shift keys on old extended keyboard.\\\nAlso add a call to get which keys are currently pressed on a USB keyboard or\\\nthe USB codes for an apple non-usb keyboard. (Note this isn't working quite yet under OS-X)\\\n\\\ni) Changes to enable us to compile the VM under Apple's OS-X Project Builder\\\nenvironments.\\\n\\\nj) Some rewriting to ensure serial and midi support can be written as external\\\nplugins.\\\n\\\nk) Fiddling to get sound input to work under OS-X\\\n\\\nl) Platform.exports changed macintosh to macintoshSqueak to avoid conflict.\\\n\\\nm) Memory is allocated at 50MB at start, then will grow or shrink, verus previous carbon apps\\\n that did 1GB. \\\n \\\nn) sqPlatformSpecific.h changes to support long file names and os-x posix file names\\\n\\\no) sqVirtualmachine.c & sqVirtualmachine.h\\\n#if VM_PROXY_MINOR > 4\\\n\tVM->positive64BitIntegerFor = positive64BitIntegerFor;\\\n\tVM->positive64BitValueOf = positive64BitValueOf;\\\n\tVM->signed64BitIntegerFor = signed64BitIntegerFor;\\\n\tVM->signed64BitValueOf = signed64BitValueOf;\\\n#endif\\\n\\\nBeware this causes an interesting problem, if you compile plugins with VM_PROXY_MINOR now set to 5, then they will not work with older VMs. The solution is to define the VM_PROXY_MINOR in the plugin to the value that indicates what features it is using.\\\n\\\np) Changed to use ITimer logic as a 16ms lowres timer to improve performance\\\n\\\nq) Changed to use single thread, no thread manager.\\\n\\\nr) Changed to use lowres timer in checking for polling time to improve performance\\\n\\\ns) It should have faster startup times.\\\n\\\nt) It will hide the empty window at startup, then show the squeak window when required.\\\n\\\nu) It has a different menu structure.\\\n\\\nv) It does less I/O when navigating directories.\\\n\\\nThe macintosh 3.1Alpha1MT VM, Sept 24th 2001 \\\nThis VM was built with the base  3.1 image at change set #4347\\\nV3.1.1 at change set #4347\\\n\\\n\\\nWe go to V3.1.1 to indicate that the 3.1 VM is being used. In the past the 3.1 Image was used but some changes in the openGL logic makes  3.1 Vm and 3.0 image not quite work correctly with 3d graphics. Although a 3.1 VM will run many images way back to the 2x series no careful study has been done on the ability to do this. So at this point we are indicating this VM is a 3.1 VM and best used with a 3.1 image.\\\n\\\nUse of VMMaker to build VM. As of this version everything can be built as an external except for the window logic which hasn't been decoupled from the VM support for the macintosh. \\\n\\\n1) AsynchFilePlugin the security check for ability to create file is now a plugin call.\\\n2) B2DPlugin logic changes to fillLinearGradientfromtoat\\\n3) b3dRemapFaces, b3dRemapEdges, b3dRemapEdgeList, b3dRemapAET, b3dRemapEdgeVertices, b3dRemapFaceVertices, b3dRemapFaceFree, b3dRemapEdgeFree, b3dRemapAttributes. Some casting and changing of += to = + to make some compilers happy.\\\n4) BitBltPlugin added tableLookupat call.\\\n5) DropPlugin added setFileAccessCallback to allow the Security Module plugin the ability to give us the entry point to turn security off so we can open files as read only when security is turned on.  This was broken in the past. \\\n 6) FilePlugin added fileOpennamesizewrite,getThisSession to allow for callbacks. Changed the file security logic to use the plugin interface. \\\n7) interp.c, fixes for 4347ByteArrayRangeCheck-di, ability to printAllStacks, security calls for image rename, write to use plugin interface.\\\n8) Added GetAttributeString, and recordDragDropEvent and entry points for callbacks.\\\n9) SecurityPlugin changed when initialization is called to initialize the safe and unsafe directorys, also added entry points for all the testing calls so it can be a true plugin.\\\n10) Serialplugin. The serial plugin was redesigned to seperate out MIDI logic. People with MIDI devices and old serial macintosh should check to see if they still work since we lack equipment now to test this obsolete technology set.\\\n11) SocketPlugin. Make security calls true plugin calls.\\\n12 SoundGenerationPlugin. Removed \\\nEXPORT(int) SoundGenerationPlugin_primitiveFMSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveOldSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitivePluckedSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveWaveTableSoundMix(void);\\\nThey were a hack at the plugin level and discussion on the list seemed to show they were no longer used. \\\n13) Checking for if defined (__APPLE__) && defined(__MACH__) for the Mac OS-X native development environment\\\n14) Changed sqMacAsyncFilePrims, usage of interpreterProxy->, plugin calls for getThisSession. \\\n15) Changed sqMacDirectory.c. Removed some utility code and make it a seperate file so that it can be shared between sqMacWindow and other plugins that require them. \\\n16) Changed sqMacDragDrop.c. Added plugin callback for getSTWindow, the sqSetFileAccessCallback logic, fileOpennamesizewrite, and secHasFileAccess. Added logic to do the recordDragDropEvent callback to sqMacWindow.c \\\n17) sqMacNetwork.c. Some cleanup for the OS-X version of the OpenTransport headers, some constants have name changes\\\n18) sqMacNSPlugin.c Use of ioLoadFunctionFrom(NULL, \"DropPlugin\"); versus explicit call.\\\n19) sqMacOpenGL.c. Some cleanup for the OS-X version of the OpenGL headers\\\n20) sqMacOpenGLInfo.c. Some cleanup for the OS-X version of the OpenGL headers\\\n21) sqMacSecurity.c ioInitSecurity calls back to dragAndDrop plugin to set entry point to turn security off.  Added code to create directories if required and ensured callbacks are plugitized.\\\n22) sqMacSound.c Some cleanup for the OS-X version of the Sound headers. Use of interpreterProxy-> in the proper places.\\\n23) sqMacWindow.c Some cleanup for the OS-X version of the compiler.  Fixed saveAsEmbeddedImage, this got broken when we moved from a FAT to a ppc only application.  Altered interface to recordDragDropEvent so that it was plugable. Some file path name logic goes to a seperate C source file. The drag and drop plugin is loaded and intialized after the image is loaded but before the interpreter is started, before it was done a bit earlier in the startup process. This also has the effect of initializing the security module.\\\n24)sqOpenGLRenderer.c. Some cleanup for the OS-X version of the OpenGL headers\\\n25)SurfacePlugin.c gets a hack so it knows when it is internal versus external.\\\n\\\n\\\n\\\nv3.0.18 at change set #4081\\\n(Note browser plugin goes to 3.0.23\\\n\\\n1) sqMacOpenGL.c Quite a few changes were made to the code to support it as an internal plugin for the browser. This is because the drawable frame for a browser plugin is a subset of the browser's grafport, so lots more care must be taken to draw in the correct location using OpenGL. We also fixed issues with re-configurating the Open/GL draw area when the window gets resized or goes to full screen, and attempted to ensure multiple screens will work.\\\n\\\n2) sqMacWindow.c, minor fix to cast a constant char * to char * for CW 6.1\\\n\\\n\\\nBrowser plugin 3.0.23 fixes\\\n\\\n1) Integerated the H/W Acceleration as an builtin plugin\\\n2) Added logic for pre and post event interaction to browser plugin event handler for H/W Acceleration logic. The external H/W Acceleration plugin mostly works with the browser plugin but doesn't work with full screen mode, or if the plugin is embedded in a window or a scrollable frame, so don't use it. Use the browser plugin 3.0.23 or higher which has the H/W Acceleration builtin.\\\n\\\nv3.0.17 at change set #4081\\\n(Note browser plugin goes to 3.0.21)\\\n\\\n1) Added HW acceleration as internal plugin.\\\n2) 4079BBAlphaTextFix-ar Fixes the problem with alpha text, changes BitBltPlugin.c \\\n3) Added primitive on the mac to truncate a file.\\\n4) Added logic to flush volume on a flush file to ensure file and control blocks are flushed.\\\n5) For the Carbon VM we increase nextevent wait time if we get sufficent idle time. This should reduce CPU usage under OS-X\\\n6) GetAttribute: 1002 now returns the gestaltSystemVersion as a hex string, and getAttribute: 1003 now returns either '68K' or 'PowerPC'.\\\n7) Starting with 3.0.17 the VM is build only as a powerpc application. The latest VM as a 68K application will be made available from time to time permits based on people's needs. \\\n8) Changes to sqOpenGLRenderer.c to improve performance, OpenGL 1.1 support.\\\n\\\nPlugin 3.0.21 fixes\\\n\\\n1) added check for mailto: tag on posts to fix problem with Netscape crashing, and IE hanging.\\\n2) Plus above fixes.\\\n\\\nWhat has been fixed/changed.\\\nv3.0.16 at change set #4041\\\n(Note browser plugin goes to 3.0.20)\\\n\\\n1) Lots of fixes for BitBlt and HW acceleration.\\\n2) Hardware Acceleration plugin goes to 1.0.1. Please note there is a seperate plugin with the same name for Carbon. Doing a get info will identify if the plugin is only usable with Carbon Squeak.\\\n\\\nv3.0.15 at change set #4026 (May 17th test version)\\\n(Note browser plugin goes to 3.0.19)\\\n\\\n1) Added support for OpenGL HW acceleration plugin\\\n\\\nPlugin 3.0.19 fixes\\\n\\\na) Obey embedded tag plug\\\nb) Fix problem with plugin 3.0.17 not working with netscape 4.x\\\nc) Carbonize plugin for IE 5.1 \\\nd) Remove debugging printf than occurred on transition to full screen mode\\\n\\\nWhat has been fixed/changed.\\\nv3.0.14 at change set #3987\\\n\\\n(Note plugin goes to 3.0.17)\\\n\\\n1) sqMacDirectory.c. The pathlookup would handle the case of foo:bar::do incorrectly by ignoring the :: path redirection. This has been fixed. However a path lookup will not work if it contains :: and an aliased directory in the middle of the path.\\\n\\\n2) sqMacSecurity.c. The pathname for the untrustedUserDirectory was built incorrectly, and the bug mentioned above in sqMacDirectory.c usually kept this from being noticed.\\\n\\\n3) sqMacWindow.c  we added some logic to do the delay for primitiveRelinquishProcessor, but found it had an large effect on a freecell benchmark. I suspect on a Morpic step wait there is nothing to do so primitiveRelinquishProcessor gets called which then affects response time. So for now we revert to the 3.0.11 behavior, good performance and 100% CPU usage!\\\n\\\n4) GetAttribute 1004 returns returns interpreterVersion; which is for example\\\n\"Squeak3.1alpha of 6 February 2001 [latest update: #3987]\"\\\n\\\n5) When in full screen mode we now attempt to disable resizing, zooming, or moving the window. The window borders are hidden, but in the past it was feasible to grab an edge and alter it, thus confusing the VM.\\\n\\\n6) Worked on Carbonizing the browser plugin\\\n\\\n7) 3977 & 3978 FloatArray fixes. Makes float arrays go through a new (and working) version of #primitiveHash\\\n\\\n8) Fixed problem with accidental mouse clicks being triggered from pulldown menus on application switching.\\\n\\\n9)\\\n\"Change Set:\t\t3984 BitBltExtensions-ar\\\nDate:\t\t\t4 May 2001\\\nAuthor:\t\t\tAndreas Raab\\\n\\\nThe change set includes various extensions for BitBlt with the goal of migrating the useful features from FXBlt into the general BitBlt mechanisms. These include:\\\n\\\n* Handling of LSB and MSB forms:\\\nBitBlt now handles both, MSB and LSB forms (and their conversions). Only instances of Bitmap are assumed to contain big-endian pixels. All others are assumed to be little endian (reason is that we can only identify Bitmap here). Note that 'LSB' and 'MSB' refers to PIXELS, that is a 1bpp LSB form has its left most pixel in the lowest bit whereas a 1bpp MSB form has its left-most pixel in the highest bit.\\\n\\\nFor pixel depths < 8 this can be different from what your OS supplies (as an example, Windows bitmaps < 8 are big-endian pixels in little-endian words; we might call them 'middle-endian'). We simply don't deal with those - forms are either big or little endian but nothing inbetween.\\\n\\\nBitBlt has got an extra combination rule for swapping pixels in the destination form. This can be used to make byte swapping much more efficient (as soon as we've got more VMs with support for it).\\\n\\\n* Handling of 'native bitmaps' (aka surfaces):\\\nBitBlt is now able to deal with OS surfaces that are registered with the surface plugin.\\\n\\\n* Handling of full color maps:\\\nBitBlt has been extended to deal with instances of ColorMap in addition to the prior mechanism of using only indexed lookups and provide an implicit 16-32 bit color conversion. ColorMaps can specify both, a lookup table and an additional set of masks and shifts to apply during the color mapping operation. \\\n\\\nFour independent shifts and masks can be given which can be used for a lot more than just color conversion (as an example, one could do byte swapping with this; but see also BitBlt class>>exampleColorMap). \\\n\\\n* Better handling of default arguments:\\\nFor most of the required arguments for BitBlt very reasonable default assumptions can be made. This includes the destOrigin (0@0), clipRect (0@0 extent: destForm extent), sourceOrigin (0@0). BitBlt now substitutes these if they are absent (e.g., nil) in the instance provided.\\\n\\\n\"\\\n\\\n\\\nv3.0.13 at change set #3848\\\n\\\n1) sqMacSecurity was changed to set the unsecure directory to\\\n\tsystem folder:Preferences:Squeak:Internet:My Squeak\\\n\\\nv3.0.12 at change set #3848\\\n1) Fixed problem with creating My Squeak Folder in Documents Folder with System 8.6\\\n\\\nWhat has been fixed/changed.\\\nv3.0.11 at change set #3848\\\n\\\n1) sqMacDirectory had a bug when you resolved a path name. The fast resolve always failed, which invoked the slow resolver. Now the fast resolver works.\\\n\\\n2) sqMacSecurity was changed to set the unsecure directory to Documents:My Squeak. \\\n\\\n3) sqMacWindow was changed to fix some issues with Squeak capturing events from other applications and to reduce the number of duplicate mouse events that are generated. Also we capture modifier information  directly from the mouse and keyboard on null events to fix some problems with Carbon. We  hopefully fixed problems with mouse clicks from foreground applications being seen by Squeak and issues with the OS-X Dock clicks.\\\n\\\n4) sqMacNSPlugin was changed to use the above mouse/keyboard capture code which is much cleaner than the original fix for the bogus modifier information given to us by netscape on a null event. \\\n\\\n5) When you turn full screen off we now correctly reposition the window to the original location versus a few pixels to the left. \\\n\\\nWhat has been fixed/changed.\\\nv3.0.10 at change set #3848\\\n\\\n1) changed VM exception unwind logic\\\n\t3796-Exception-unwind-V3,tim@sumeru.stanford.edu, Paul McDonough, Stephen Pair and others\\\n\\\n2) Fixes for the JPEGReader plugin and for Jitter 3\\\n\\\n3) Added minimal Mac VM logic to assist in building a small VM.\\\n\\\n4) Changed how the browser plugin starts up. Now it starts the interpreter running only after getting the browser setwindow command. This seems to fix a race condition that resulted in a crash at startup time with Netscape 4.x\\\n\\\n5) Fixed broken full screen redraw on cmd-tab\\\n\\\n6) Fixed what looked like mouse-down, mouse-down, mouse-up sequence. Now reports mouse-down, mouse up.\\\n\\\n7) Added StarSqueak plugin as internal plugin\\\n\\\n8) Note the current Squeak Plugin should be gotten from the www.squeakland.org site.\\\n\\\nv3.0.9 at change set #3776, Boston Snow storm build.\\\n\\\n1) A number of changes were made to the interpreter:\\\n\ta) added primitive to change a class.\\\n\tb) added primitives to get or put 32bit integers\\\n\tc) Fix problem with GC and class reshaping\\\n\td) Better logic for method cache flushing\\\n\\\n2) Added JPEGReader plugin\\\n\\\n\\\nV3.0.8 at change set #3740\\\n\\\n1) The caps lock no longer maps to the shift attribute. So if the caps lock is down mouse clicks will behave normally. \\\n\\\n2) Numerous fixes for the BitBltPlugin plugin\\\n\\\n3) Memory allocation grow/shrink logic for Carbon was added.\\\n\\\n4) Spurious mouse clicks for the browser plugin has been fixed. (This took awhile to fix, I'm sure it's a bug with the Swedish version of Netscape)\\\n\\\n5) The browser plugin will attempt first to allocate memory from the browser heap, then the system heap. Most people when faced with a memory issue usually increase memory for the browser first. However memory for the plugin is controlled by an attribute in the EMBED HTML statement. \\\n\\\nV3.0.7\\\n\\\n1) A bug exists in pre OS 8.x that causes a crash in activate window if the standard get file \\\ndialog comes up before the Squeak Window. I remove the InvalWindow call found in that routine since it is actually redundant.\\\n\\\n2) The standard get file dialog on system 7.x would not terminate if you did a cancel.\\\n\\\n3) The InterfaceLib had to be weak linked to prevent CFM startup issues. \\\n\\\nV3.0.6\\\n\\\n1) Alias resolving is less aggressive.\\\n\\\n2) We no longer cache image reads or writes. This was done because OS 9.1 allows you to have very large disk caches, and it's pointless to cache the image read or write.\\\n\\\n3) The file flush primitive now actually flushes the file via an OS call. This was a bug in the CodeWarrior 5.3 source code.\\\n\\\n4) The 68K version was being built with the 68881 math library. This fails on 68040LC chips. We now use the non-68881 math library. Thanks to Bruce ONeel for find this.\\\n\\\n5) A bug was found in the path resolving logic that was added for 3.x. This bug apparently only affects 68K machines,  never was identified as a PowerPC issue. \\\n\\\n6) The Netscape plugin needs a properly allocated clip region, this code seemed to work ok on new systems, but fails on system 7.6.1\\\n\\\n7) The security interface will create a Documents folder on the root volume if the default Document folder has been deleted. This is needed for security purposes. \\\n\\\n8) Jitter needs 1MB of free memory to run.\\\n\\\n9) 68K machines require another 32K of stack\\\n\\\n10) Threads  now work on 68K machines, but turned off because of possible performance issues. (I think more study is needed).\\\n\\\n11) The 68K version was compiled with better optimization, expect a 15% improvement.\\\n\\\n12) fix for BitBltPlugin ascii = byteAt((sourcePtr + charIndex) - 1);\\\n\\\n13) The interpreter object validation checking code was alter to work correctly.\\\n\\\nV3.0.5\\\n\\\n1) sqConfig.h changed due to BE OS header changes\\\n\\\n2) sqMacDirectory.c. Added support for Navigation services or Standard File Get to find the image at startup time when the Squeak.image is not found by the VM. This replaces the DOS like console message that comes up saying that Squeak can't find a image.\\\n\\\n3) A fix to drag and drop for the browser plugin.\\\n\\\n4) We now use Apple's cooperative multithreading package to run the UI in one thread, the VM in the other. This solves some issues with the browser and makes the UI versus VM logic and execution responsibilities easier to understand. \\\n\\\n5) Changed the sqMacNSPlugin.c code to support a 3.0VM using multithreading support. This should give Squeak in a browser better performance. Also changed the full screen support to correctly work with multiple monitors.\\\n\\\n6) BitBltPlugin.c gets one more op code\\\n\\\n7) Added the security interface\\\n\\\n8) Added the file flush primitive\\\n\\\n9) Rewrote the macintosh readme file\\\n\\\n10) Revisited the zoomWindow code and found a bug with multiple monitor support, then I fixed the code to make Full Screen mode work on screen that Squeak window is mostly on, versus the menubar screen. Also if you switch from full screen back it resizes the window back to the orginal size and location before you invoked the full screen. \\\n\\\nV3.0.2\\\nPlugins\\\n\\\nRecompiled the internal BitBltPlugin plugin to encorporate:\\\nChange Set:\t\t258AlphaBlendOpt-dsm\\\nAuthor:\t\t\tDuane Maxwell, Paul Phillips/exobox\\\na) Short circuits full opaque and full transparent pixels when alpha blending.\\\n\\\nRecompiled the internal LargeIntegerPlugin\\\n3298LargeIntegersV1-2-sr -- Stephan Rudlof -- 29 November 2000\\\n3299LargeIntV1-2For29-sr -- Stephan Rudlof -- 29 November 2000\\\n\\\nVM Software\\\n\\\n(b) PowerManagement for macintosh is now supported. You can disable the power manager to give you better performance on some powerbooks at the expense of battery life. See the Preferences Panel for details, category 'Performance'\\\n- changed sq.h\\\n- changed sqMacWindow.c to add support for power mgr disabling\\\n\\\n(c) Drag and Drop support for the macintosh, dragging files from the Finder to the Squeak window is now supported.\\\n- sqMacDragDrop.c added\\\n- sqMacWindow.c changed\\\n\\\n(d) Added primitive for get macintosh creator and file type.\\\n- sqMacDirectory.c changed\\\n\\\n(e) Carbon support. Thanks to Karl Goiser karl@wattle.net for work he did on sound and other Carbonization hotspots.\\\n- sqMacAsyncFilePrims.c changed\\\n- sqMacFFIPPC.c changed (not supported for Carbon)\\\n- sqMacNetwork.c changed per Apple tech note 1173 Carbon asset tracking\\\n-sqMacSerialAndMIDIPort.c chnaged (Not supported for Carbon)\\\n- sqMacSound.c changed per Apple tech note 1198 Carbon double sound buffer playing\\\n- sqMacWindow.c changed (various changes for Carbon)\\\n\\\n(f)  Poll at least 60 times a second for the mouse if required. Previous 2.9.x VM did it 30 times but this is too slow and 2.8.x VM do it 60 times a second.\\\n\\\n(g) Reworked path support Thanks to Karl Goiser karl@wattle.net for starting this.\\\n- sqmacDirectory.c changed reworked lookupPath\\\n- sqMacWindow.c changed, added GetApplicationDirectory to get application directory\\\n\\\n(h) I rewrote the sqMacDirectory.c logic to enable proper understanding of Apple's Alias logic. This means for example you can alias the \"SqueakV3.sources\" file and then only have one copy and have all your images point to it. \\\n\\\n(i) Added Zoom Window support.\\\n\\\n(j) Change the Squeak change file icon to better match Apple's visual guidelines, Thanks to Doug Way for the suggestion and the new icons.\\\n\\\n(k) The sound plugins have changed...\\\n\\\n(j) Dropped FFI out of the base Squeak because of security concerns\\\n\\\n(k) Compiled for 750(G3) processor versus 603\\\n\\\n(l) Added screenDepth primitive\\\n\\\nThe 3.0.x VM contains most of the optional plugins, you might want to check this by inspecting \"Smalltalk listBuiltinModules\" to see where your plugins are coming from. In some case people have been accidentally overriding the new builtin plugins with older plugins. \\\n\\\nThe file \"Squeak 3.0Alpha10MT.sig\" contains the PGP signature for the Squeak 3.0Alpha10MT VM\\\n\\\nJohn M McIntosh  johnmci@smalltalkconsulting.com\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n}"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Documentation/3.2.4 Release Notes.rtf",
    "content": "{\\rtf1\\mac\\ansicpg10000\\cocoartf100\n{\\fonttbl\\f0\\fnil\\fcharset77 Geneva;\\f1\\fnil\\fcharset77 LucidaGrande;}\n{\\colortbl;\\red255\\green255\\blue255;}\n\\margl1440\\margr1440\\vieww17300\\viewh12720\\viewkind0\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0\\fs24 \\cf0 Mac VM 3.2.4 mach-o build for Carbon, and build for Classic.\\\nFeb 20th 2002\\\n\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f1 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nFeb 20th 2002 3.2.4\\\n\\\nFor this version of the VM I have migrated towards using OS-9 packages. This allows us to provide one \\\nfolder/package that supports os-x and previous operating system versions.\\\n\\\nGiven Squeak 3.2.4Beta1.app\\\nThe classic VM is found in the *.app:Contents:MacOSClassic, with an alias in *.app:\\\nThe mach-o OS-X VM is found in *.app.Contents:MacOS\\\n\\\nIf you are running OS-9 then clicking on the *.app or doing drag and drop will just run Squeak, same applies for OS-X.\\\nIf you are running OS-7.5.5 or OS-8.x then the *.app package will appear as a folder, just open and click on the alias within. \\\nNote that if you want to use classic plugins I suspect you need to put them in the MacOSClassic Folder beside the VM. \\\nBundles for os-x go in the same location as the *.app application package.\\\n\\\nChanges\\\na) Drag and drop at open time with image file that has no meta type, will now open the image, versus prompting you.\\\nb) Use an os-x window attribute at open time to signal that the window should not be moved by the dock when you go to full screen.\\\nc) Fix window update logic to use window that needs updating versus stWindow to fix issues with print dialog windows in classic. \\\nd) bitblt gets recompile to pickup fixes posted in 3.2 update stream.\\\n\\\nFeb 5th 2002 3.2.3\\\nChanges\\\n\\\na) use old extended time manger to update psudeo-TickCount, versus sigalrm. siglarm make sound recording not work.\\\nb) fiddle with sound recording and make it work.\\\n\\\nJan 2002 3.2.2\\\nChanges:\\\n\\\na) AsyncFilePlugin.c Use global to remember security function entry point for performance reasons\\\nb) FilePlugin.c\tUse global to remember security function entry point for performance reasons\\\nc) interp.c Use squeakFileOffsetType versus off_t and add a bunch of checks to handle lack of long long and conversion errors between 64/32 bit integers and LargeInteger objects\\\nd) readme, it's http://www.mucow.com/Gnuifier.1.cs \\\ne) SocketPlugin.c\tUse global to remember security function entry point for performance reasons\\\nf) sq.h added default sqFilenameFromStringOpen and sqTruncate\\\ng) sqFilePluginBasicPrims.c revert to ansi specs, but ensure #def to fseeko and ftello for 64 bit aware file systems.\\\nh) sqMacDirectory.c A bit more error checking on bad file names\\\ni) sqMacFileLogic.c Folders size is now zero in classic, and a bit more checking on bad file names\\\nj) sqMacSound.c Fixed a problem with sound recording in classic due to a change made in Sept. But sound recording still does not work under os-x\\\nk) sqMacWindow.c  two very important changes:\\\n\\\n\t1) You can now do FFI calls with the FFI bundle plugin to Mach-o frameworks. \\\n\tHowever you need to rework your api calls. For example:\\\n\tapiGetMousePoint: aMacPoint was\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'InterfaceLib'>\\\n\tIt now is:\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'Carbon.framework'>\\\n \t\\\n\tIf you review /System/Library/Frameworks I'm sure you can come up with interesting ways to \\\n\tmake mac only squeak images.\\\n\t\\\n\tI now use mmap( NULL, gMaxHeapSize, PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED,-1,0);\\\n\tanonymous memory mapping to 512MB as the squeak memory block. The VM can then grow or shrink\\\n\twithin the 512MB block, I just move a pointer. \\\n\t\\\n\tNote in 3.2.1 a slight error on my part restricted Squeak to 50MB. I am of course\\\n\tinterested to hear about issues with my choice of 512MB. Note a Squeak VM is limited to 2GB under perfect \\\n\tconditions, however if any part of the image crosses the 2GB boundary the VM will fail, right now 512MB\\\n\tseemed a safe choice.\\\n\t\\\n \tPhysMem:  60.2M wired, 78.6M active,  412M inactive,  551M used,  217M free\\\n\tVM: 3.03G + 55.3M   7847(0) pageins, 1(0) pageouts   \\\n\tPID COMMAND      %CPU   TIME   #TH #PRTS #MREGS RPRVT  RSHRD  RSIZE  VSIZE\\\n\t422 Squeak VM    0.8%  0:35.59   2    71   100  23.3M  8.53M  26.5M   571M\\\n\\\n\tbut I only have one 80,000,000 byte swap file in /var/vm\\\n\\\nNote if you turn crash reporter on, then if the VM crashes a nice report should be generated in your log directory.  See the Apple documentation for a description of this feature, currently it is set in OS-X 10.1.x via the preferences window for the Console Application. If you have a crash with this VM, please recreate and post the crash log (found in Users/foobar/Library/Logs/ to the Squeak mailing list so we can continue to make the VM fault tolerant.\\\n\\\n3.2.1 Notes\\\n\\\nYou might need these change sets to build a new VM or to use all the features of this VM with your image, hopefully these will get into the pending 3.2.x image.\\\n\\\nFixes and feature extensions.\\\nAsyncFileFixFu...hName-JMM.1.cs \tfix for async test method.\\\nDragAndDropAtStart-JMM.5.cs\t\tfix to enable drag and drop at startup\\\n\\\nNeeded to compile a VM with VMMaker\\\nLargeFiles-JMM.3.cs\t\t\t\tEnable large file support, files > 2GB\\\n\\\nNeeded to turn this feature on\\\nMacLongFileName-JMM.5.cs\t\t\tEnable long file names on the mac\\\n\\\nThe SUnit\\\nMacLongFileNamesSUnits-JMM.3.cs\tTest long file names and long directory names and large file support\\\n\\\nKinda optional features some people might need.\\\nInternetConfiguration-JMM.5.cs\t\tAllow internet configuration information access, internal plugin\\\nUUID-JMM.3.cs\t\t\t\t\tAllow UUID generation, internal plugin\\\n\\\na) The ability to get back a UUID. This uses the hosting UUID generator if the\\\n hosting OS supports it and we have a primitive we can call. If not then we generate\\\n a type 4 version of a UUID (the random bits one).\\\n(This requires a special change set)\\\n\\\nb) Ability to start squeak on the mac by dragging multiple documents onto the\\\nimage, or drag and drop of stuff onto the running VM icon.\\\n(This requires a special change set)\\\n\\\nc) Usage of the Internet Configuration tool kit to supply information about\\\nwhat the mac proxy is etc. etc.\\\n(This requires a special change set)\\\n\\\nd) Migrate file system to use 64 bits. This allows you to read/write and seek\\\nwith files > 2 GB. This includes a change to the VM to convert from/to long\\\nlong integers. It also allows the file system to actually deal with 2GB files,\\\nthe current file interface actually fails once the file exceeds 1GB.\\\n\\\ne) For the carbon based Squeak VM we now support long file names 255\\\ncharacters. Close both eyes and touch everywhere the mac VM deals with file\\\nname paths and hope for the best (Actually we write an Sunit to ensure we've\\\nnot broken everything). This also includes the ability to put an image in a\\\nlong file name directory, but right now the image name must stay under 32 characters.\\\n\\\nFilePlugin.c changes to support large integers.\\\nFilePlugin.h changes\\\nsq.h changes to support large files.\\\nsqConfig.h changes to resolve some conflicts.\\\nsqFilePluginBasicPrims.c  changes to support large files.\\\nsqMacAsyncFilePrims.c changes to use fspec versus 255 file path.\\\nsqMacDirectory.c changes to use hosting OS (OS-X) bsd create and delete directory\\\n and truncate. dir_look changes as part of the general rewrite.\\\nsqMacDragAndDrop.c use new call to get path name from fsspec. Use fsspec more, and added \\\n  interface code to setup drag and drop of items at application startup time. max document name\\\n  goes to 1000 characters.\\\nsqMacFileLogic.c Mostly rewrote!\\\nsqMacSecurity.c use new file calls.\\\nsqMacWindow.c \\\n\tincrease size of vmpath, docpath, imagepath to 1000 chars, shortname to 255 characters.\\\n\tadd logic for left/right modifier keys \\\n\treworked LoadLibViaPath logic \\\n\tsqImageFileOpen uses fsspec versus 255 path name.\\\n\tsqImageFileStartLocation uses ffspec.\\\n\tbundle support for bundles\\\n\t\\\ne2) interp.c supports get/put of large integers to long long integers.\\\ne3) fixed fTruncate\\\n\\\nHint getting this to work was a pain. Think of 255 character folder names and nested aliases,\\\nfolder 1 refers to folder 2 which then refers to folder 1 again, just go down the path say 8 times,\\\nthen ask to create a file or directory!\\\n\\\nf) Support to change the Mac screen resolution under Squeak control.\\\n\\\ng) Fix to unload/load the scrap at startup time to ensure the clipboard is\\\ncorrect when starting up the VM.\\\n\\\nh) Uncouple the shift key and left/right shift keys on old extended keyboard.\\\nAlso add a call to get which keys are currently pressed on a USB keyboard or\\\nthe USB codes for an apple non-usb keyboard. (Note this isn't working quite yet under OS-X)\\\n\\\ni) Changes to enable us to compile the VM under Apple's OS-X Project Builder\\\nenvironments.\\\n\\\nj) Some rewriting to ensure serial and midi support can be written as external\\\nplugins.\\\n\\\nk) Fiddling to get sound input to work under OS-X\\\n\\\nl) Platform.exports changed macintosh to macintoshSqueak to avoid conflict.\\\n\\\nm) Memory is allocated at 50MB at start, then will grow or shrink, verus previous carbon apps\\\n that did 1GB. \\\n \\\nn) sqPlatformSpecific.h changes to support long file names and os-x posix file names\\\n\\\no) sqVirtualmachine.c & sqVirtualmachine.h\\\n#if VM_PROXY_MINOR > 4\\\n\tVM->positive64BitIntegerFor = positive64BitIntegerFor;\\\n\tVM->positive64BitValueOf = positive64BitValueOf;\\\n\tVM->signed64BitIntegerFor = signed64BitIntegerFor;\\\n\tVM->signed64BitValueOf = signed64BitValueOf;\\\n#endif\\\n\\\nBeware this causes an interesting problem, if you compile plugins with VM_PROXY_MINOR now set to 5, then they will not work with older VMs. The solution is to define the VM_PROXY_MINOR in the plugin to the value that indicates what features it is using.\\\n\\\np) Changed to use ITimer logic as a 16ms lowres timer to improve performance\\\n\\\nq) Changed to use single thread, no thread manager.\\\n\\\nr) Changed to use lowres timer in checking for polling time to improve performance\\\n\\\ns) It should have faster startup times.\\\n\\\nt) It will hide the empty window at startup, then show the squeak window when required.\\\n\\\nu) It has a different menu structure.\\\n\\\nv) It does less I/O when navigating directories.\\\n\\\nThe macintosh 3.1Alpha1MT VM, Sept 24th 2001 \\\nThis VM was built with the base  3.1 image at change set #4347\\\nV3.1.1 at change set #4347\\\n\\\n\\\nWe go to V3.1.1 to indicate that the 3.1 VM is being used. In the past the 3.1 Image was used but some changes in the openGL logic makes  3.1 Vm and 3.0 image not quite work correctly with 3d graphics. Although a 3.1 VM will run many images way back to the 2x series no careful study has been done on the ability to do this. So at this point we are indicating this VM is a 3.1 VM and best used with a 3.1 image.\\\n\\\nUse of VMMaker to build VM. As of this version everything can be built as an external except for the window logic which hasn't been decoupled from the VM support for the macintosh. \\\n\\\n1) AsynchFilePlugin the security check for ability to create file is now a plugin call.\\\n2) B2DPlugin logic changes to fillLinearGradientfromtoat\\\n3) b3dRemapFaces, b3dRemapEdges, b3dRemapEdgeList, b3dRemapAET, b3dRemapEdgeVertices, b3dRemapFaceVertices, b3dRemapFaceFree, b3dRemapEdgeFree, b3dRemapAttributes. Some casting and changing of += to = + to make some compilers happy.\\\n4) BitBltPlugin added tableLookupat call.\\\n5) DropPlugin added setFileAccessCallback to allow the Security Module plugin the ability to give us the entry point to turn security off so we can open files as read only when security is turned on.  This was broken in the past. \\\n 6) FilePlugin added fileOpennamesizewrite,getThisSession to allow for callbacks. Changed the file security logic to use the plugin interface. \\\n7) interp.c, fixes for 4347ByteArrayRangeCheck-di, ability to printAllStacks, security calls for image rename, write to use plugin interface.\\\n8) Added GetAttributeString, and recordDragDropEvent and entry points for callbacks.\\\n9) SecurityPlugin changed when initialization is called to initialize the safe and unsafe directorys, also added entry points for all the testing calls so it can be a true plugin.\\\n10) Serialplugin. The serial plugin was redesigned to seperate out MIDI logic. People with MIDI devices and old serial macintosh should check to see if they still work since we lack equipment now to test this obsolete technology set.\\\n11) SocketPlugin. Make security calls true plugin calls.\\\n12 SoundGenerationPlugin. Removed \\\nEXPORT(int) SoundGenerationPlugin_primitiveFMSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveOldSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitivePluckedSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveWaveTableSoundMix(void);\\\nThey were a hack at the plugin level and discussion on the list seemed to show they were no longer used. \\\n13) Checking for if defined (__APPLE__) && defined(__MACH__) for the Mac OS-X native development environment\\\n14) Changed sqMacAsyncFilePrims, usage of interpreterProxy->, plugin calls for getThisSession. \\\n15) Changed sqMacDirectory.c. Removed some utility code and make it a seperate file so that it can be shared between sqMacWindow and other plugins that require them. \\\n16) Changed sqMacDragDrop.c. Added plugin callback for getSTWindow, the sqSetFileAccessCallback logic, fileOpennamesizewrite, and secHasFileAccess. Added logic to do the recordDragDropEvent callback to sqMacWindow.c \\\n17) sqMacNetwork.c. Some cleanup for the OS-X version of the OpenTransport headers, some constants have name changes\\\n18) sqMacNSPlugin.c Use of ioLoadFunctionFrom(NULL, \"DropPlugin\"); versus explicit call.\\\n19) sqMacOpenGL.c. Some cleanup for the OS-X version of the OpenGL headers\\\n20) sqMacOpenGLInfo.c. Some cleanup for the OS-X version of the OpenGL headers\\\n21) sqMacSecurity.c ioInitSecurity calls back to dragAndDrop plugin to set entry point to turn security off.  Added code to create directories if required and ensured callbacks are plugitized.\\\n22) sqMacSound.c Some cleanup for the OS-X version of the Sound headers. Use of interpreterProxy-> in the proper places.\\\n23) sqMacWindow.c Some cleanup for the OS-X version of the compiler.  Fixed saveAsEmbeddedImage, this got broken when we moved from a FAT to a ppc only application.  Altered interface to recordDragDropEvent so that it was plugable. Some file path name logic goes to a seperate C source file. The drag and drop plugin is loaded and intialized after the image is loaded but before the interpreter is started, before it was done a bit earlier in the startup process. This also has the effect of initializing the security module.\\\n24)sqOpenGLRenderer.c. Some cleanup for the OS-X version of the OpenGL headers\\\n25)SurfacePlugin.c gets a hack so it knows when it is internal versus external.\\\n\\\n\\\n\\\nv3.0.18 at change set #4081\\\n(Note browser plugin goes to 3.0.23\\\n\\\n1) sqMacOpenGL.c Quite a few changes were made to the code to support it as an internal plugin for the browser. This is because the drawable frame for a browser plugin is a subset of the browser's grafport, so lots more care must be taken to draw in the correct location using OpenGL. We also fixed issues with re-configurating the Open/GL draw area when the window gets resized or goes to full screen, and attempted to ensure multiple screens will work.\\\n\\\n2) sqMacWindow.c, minor fix to cast a constant char * to char * for CW 6.1\\\n\\\n\\\nBrowser plugin 3.0.23 fixes\\\n\\\n1) Integerated the H/W Acceleration as an builtin plugin\\\n2) Added logic for pre and post event interaction to browser plugin event handler for H/W Acceleration logic. The external H/W Acceleration plugin mostly works with the browser plugin but doesn't work with full screen mode, or if the plugin is embedded in a window or a scrollable frame, so don't use it. Use the browser plugin 3.0.23 or higher which has the H/W Acceleration builtin.\\\n\\\nv3.0.17 at change set #4081\\\n(Note browser plugin goes to 3.0.21)\\\n\\\n1) Added HW acceleration as internal plugin.\\\n2) 4079BBAlphaTextFix-ar Fixes the problem with alpha text, changes BitBltPlugin.c \\\n3) Added primitive on the mac to truncate a file.\\\n4) Added logic to flush volume on a flush file to ensure file and control blocks are flushed.\\\n5) For the Carbon VM we increase nextevent wait time if we get sufficent idle time. This should reduce CPU usage under OS-X\\\n6) GetAttribute: 1002 now returns the gestaltSystemVersion as a hex string, and getAttribute: 1003 now returns either '68K' or 'PowerPC'.\\\n7) Starting with 3.0.17 the VM is build only as a powerpc application. The latest VM as a 68K application will be made available from time to time permits based on people's needs. \\\n8) Changes to sqOpenGLRenderer.c to improve performance, OpenGL 1.1 support.\\\n\\\nPlugin 3.0.21 fixes\\\n\\\n1) added check for mailto: tag on posts to fix problem with Netscape crashing, and IE hanging.\\\n2) Plus above fixes.\\\n\\\nWhat has been fixed/changed.\\\nv3.0.16 at change set #4041\\\n(Note browser plugin goes to 3.0.20)\\\n\\\n1) Lots of fixes for BitBlt and HW acceleration.\\\n2) Hardware Acceleration plugin goes to 1.0.1. Please note there is a seperate plugin with the same name for Carbon. Doing a get info will identify if the plugin is only usable with Carbon Squeak.\\\n\\\nv3.0.15 at change set #4026 (May 17th test version)\\\n(Note browser plugin goes to 3.0.19)\\\n\\\n1) Added support for OpenGL HW acceleration plugin\\\n\\\nPlugin 3.0.19 fixes\\\n\\\na) Obey embedded tag plug\\\nb) Fix problem with plugin 3.0.17 not working with netscape 4.x\\\nc) Carbonize plugin for IE 5.1 \\\nd) Remove debugging printf than occurred on transition to full screen mode\\\n\\\nWhat has been fixed/changed.\\\nv3.0.14 at change set #3987\\\n\\\n(Note plugin goes to 3.0.17)\\\n\\\n1) sqMacDirectory.c. The pathlookup would handle the case of foo:bar::do incorrectly by ignoring the :: path redirection. This has been fixed. However a path lookup will not work if it contains :: and an aliased directory in the middle of the path.\\\n\\\n2) sqMacSecurity.c. The pathname for the untrustedUserDirectory was built incorrectly, and the bug mentioned above in sqMacDirectory.c usually kept this from being noticed.\\\n\\\n3) sqMacWindow.c  we added some logic to do the delay for primitiveRelinquishProcessor, but found it had an large effect on a freecell benchmark. I suspect on a Morpic step wait there is nothing to do so primitiveRelinquishProcessor gets called which then affects response time. So for now we revert to the 3.0.11 behavior, good performance and 100% CPU usage!\\\n\\\n4) GetAttribute 1004 returns returns interpreterVersion; which is for example\\\n\"Squeak3.1alpha of 6 February 2001 [latest update: #3987]\"\\\n\\\n5) When in full screen mode we now attempt to disable resizing, zooming, or moving the window. The window borders are hidden, but in the past it was feasible to grab an edge and alter it, thus confusing the VM.\\\n\\\n6) Worked on Carbonizing the browser plugin\\\n\\\n7) 3977 & 3978 FloatArray fixes. Makes float arrays go through a new (and working) version of #primitiveHash\\\n\\\n8) Fixed problem with accidental mouse clicks being triggered from pulldown menus on application switching.\\\n\\\n9)\\\n\"Change Set:\t\t3984 BitBltExtensions-ar\\\nDate:\t\t\t4 May 2001\\\nAuthor:\t\t\tAndreas Raab\\\n\\\nThe change set includes various extensions for BitBlt with the goal of migrating the useful features from FXBlt into the general BitBlt mechanisms. These include:\\\n\\\n* Handling of LSB and MSB forms:\\\nBitBlt now handles both, MSB and LSB forms (and their conversions). Only instances of Bitmap are assumed to contain big-endian pixels. All others are assumed to be little endian (reason is that we can only identify Bitmap here). Note that 'LSB' and 'MSB' refers to PIXELS, that is a 1bpp LSB form has its left most pixel in the lowest bit whereas a 1bpp MSB form has its left-most pixel in the highest bit.\\\n\\\nFor pixel depths < 8 this can be different from what your OS supplies (as an example, Windows bitmaps < 8 are big-endian pixels in little-endian words; we might call them 'middle-endian'). We simply don't deal with those - forms are either big or little endian but nothing inbetween.\\\n\\\nBitBlt has got an extra combination rule for swapping pixels in the destination form. This can be used to make byte swapping much more efficient (as soon as we've got more VMs with support for it).\\\n\\\n* Handling of 'native bitmaps' (aka surfaces):\\\nBitBlt is now able to deal with OS surfaces that are registered with the surface plugin.\\\n\\\n* Handling of full color maps:\\\nBitBlt has been extended to deal with instances of ColorMap in addition to the prior mechanism of using only indexed lookups and provide an implicit 16-32 bit color conversion. ColorMaps can specify both, a lookup table and an additional set of masks and shifts to apply during the color mapping operation. \\\n\\\nFour independent shifts and masks can be given which can be used for a lot more than just color conversion (as an example, one could do byte swapping with this; but see also BitBlt class>>exampleColorMap). \\\n\\\n* Better handling of default arguments:\\\nFor most of the required arguments for BitBlt very reasonable default assumptions can be made. This includes the destOrigin (0@0), clipRect (0@0 extent: destForm extent), sourceOrigin (0@0). BitBlt now substitutes these if they are absent (e.g., nil) in the instance provided.\\\n\\\n\"\\\n\\\n\\\nv3.0.13 at change set #3848\\\n\\\n1) sqMacSecurity was changed to set the unsecure directory to\\\n\tsystem folder:Preferences:Squeak:Internet:My Squeak\\\n\\\nv3.0.12 at change set #3848\\\n1) Fixed problem with creating My Squeak Folder in Documents Folder with System 8.6\\\n\\\nWhat has been fixed/changed.\\\nv3.0.11 at change set #3848\\\n\\\n1) sqMacDirectory had a bug when you resolved a path name. The fast resolve always failed, which invoked the slow resolver. Now the fast resolver works.\\\n\\\n2) sqMacSecurity was changed to set the unsecure directory to Documents:My Squeak. \\\n\\\n3) sqMacWindow was changed to fix some issues with Squeak capturing events from other applications and to reduce the number of duplicate mouse events that are generated. Also we capture modifier information  directly from the mouse and keyboard on null events to fix some problems with Carbon. We  hopefully fixed problems with mouse clicks from foreground applications being seen by Squeak and issues with the OS-X Dock clicks.\\\n\\\n4) sqMacNSPlugin was changed to use the above mouse/keyboard capture code which is much cleaner than the original fix for the bogus modifier information given to us by netscape on a null event. \\\n\\\n5) When you turn full screen off we now correctly reposition the window to the original location versus a few pixels to the left. \\\n\\\nWhat has been fixed/changed.\\\nv3.0.10 at change set #3848\\\n\\\n1) changed VM exception unwind logic\\\n\t3796-Exception-unwind-V3,tim@sumeru.stanford.edu, Paul McDonough, Stephen Pair and others\\\n\\\n2) Fixes for the JPEGReader plugin and for Jitter 3\\\n\\\n3) Added minimal Mac VM logic to assist in building a small VM.\\\n\\\n4) Changed how the browser plugin starts up. Now it starts the interpreter running only after getting the browser setwindow command. This seems to fix a race condition that resulted in a crash at startup time with Netscape 4.x\\\n\\\n5) Fixed broken full screen redraw on cmd-tab\\\n\\\n6) Fixed what looked like mouse-down, mouse-down, mouse-up sequence. Now reports mouse-down, mouse up.\\\n\\\n7) Added StarSqueak plugin as internal plugin\\\n\\\n8) Note the current Squeak Plugin should be gotten from the www.squeakland.org site.\\\n\\\nv3.0.9 at change set #3776, Boston Snow storm build.\\\n\\\n1) A number of changes were made to the interpreter:\\\n\ta) added primitive to change a class.\\\n\tb) added primitives to get or put 32bit integers\\\n\tc) Fix problem with GC and class reshaping\\\n\td) Better logic for method cache flushing\\\n\\\n2) Added JPEGReader plugin\\\n\\\n\\\nV3.0.8 at change set #3740\\\n\\\n1) The caps lock no longer maps to the shift attribute. So if the caps lock is down mouse clicks will behave normally. \\\n\\\n2) Numerous fixes for the BitBltPlugin plugin\\\n\\\n3) Memory allocation grow/shrink logic for Carbon was added.\\\n\\\n4) Spurious mouse clicks for the browser plugin has been fixed. (This took awhile to fix, I'm sure it's a bug with the Swedish version of Netscape)\\\n\\\n5) The browser plugin will attempt first to allocate memory from the browser heap, then the system heap. Most people when faced with a memory issue usually increase memory for the browser first. However memory for the plugin is controlled by an attribute in the EMBED HTML statement. \\\n\\\nV3.0.7\\\n\\\n1) A bug exists in pre OS 8.x that causes a crash in activate window if the standard get file \\\ndialog comes up before the Squeak Window. I remove the InvalWindow call found in that routine since it is actually redundant.\\\n\\\n2) The standard get file dialog on system 7.x would not terminate if you did a cancel.\\\n\\\n3) The InterfaceLib had to be weak linked to prevent CFM startup issues. \\\n\\\nV3.0.6\\\n\\\n1) Alias resolving is less aggressive.\\\n\\\n2) We no longer cache image reads or writes. This was done because OS 9.1 allows you to have very large disk caches, and it's pointless to cache the image read or write.\\\n\\\n3) The file flush primitive now actually flushes the file via an OS call. This was a bug in the CodeWarrior 5.3 source code.\\\n\\\n4) The 68K version was being built with the 68881 math library. This fails on 68040LC chips. We now use the non-68881 math library. Thanks to Bruce ONeel for find this.\\\n\\\n5) A bug was found in the path resolving logic that was added for 3.x. This bug apparently only affects 68K machines,  never was identified as a PowerPC issue. \\\n\\\n6) The Netscape plugin needs a properly allocated clip region, this code seemed to work ok on new systems, but fails on system 7.6.1\\\n\\\n7) The security interface will create a Documents folder on the root volume if the default Document folder has been deleted. This is needed for security purposes. \\\n\\\n8) Jitter needs 1MB of free memory to run.\\\n\\\n9) 68K machines require another 32K of stack\\\n\\\n10) Threads  now work on 68K machines, but turned off because of possible performance issues. (I think more study is needed).\\\n\\\n11) The 68K version was compiled with better optimization, expect a 15% improvement.\\\n\\\n12) fix for BitBltPlugin ascii = byteAt((sourcePtr + charIndex) - 1);\\\n\\\n13) The interpreter object validation checking code was alter to work correctly.\\\n\\\nV3.0.5\\\n\\\n1) sqConfig.h changed due to BE OS header changes\\\n\\\n2) sqMacDirectory.c. Added support for Navigation services or Standard File Get to find the image at startup time when the Squeak.image is not found by the VM. This replaces the DOS like console message that comes up saying that Squeak can't find a image.\\\n\\\n3) A fix to drag and drop for the browser plugin.\\\n\\\n4) We now use Apple's cooperative multithreading package to run the UI in one thread, the VM in the other. This solves some issues with the browser and makes the UI versus VM logic and execution responsibilities easier to understand. \\\n\\\n5) Changed the sqMacNSPlugin.c code to support a 3.0VM using multithreading support. This should give Squeak in a browser better performance. Also changed the full screen support to correctly work with multiple monitors.\\\n\\\n6) BitBltPlugin.c gets one more op code\\\n\\\n7) Added the security interface\\\n\\\n8) Added the file flush primitive\\\n\\\n9) Rewrote the macintosh readme file\\\n\\\n10) Revisited the zoomWindow code and found a bug with multiple monitor support, then I fixed the code to make Full Screen mode work on screen that Squeak window is mostly on, versus the menubar screen. Also if you switch from full screen back it resizes the window back to the orginal size and location before you invoked the full screen. \\\n\\\nV3.0.2\\\nPlugins\\\n\\\nRecompiled the internal BitBltPlugin plugin to encorporate:\\\nChange Set:\t\t258AlphaBlendOpt-dsm\\\nAuthor:\t\t\tDuane Maxwell, Paul Phillips/exobox\\\na) Short circuits full opaque and full transparent pixels when alpha blending.\\\n\\\nRecompiled the internal LargeIntegerPlugin\\\n3298LargeIntegersV1-2-sr -- Stephan Rudlof -- 29 November 2000\\\n3299LargeIntV1-2For29-sr -- Stephan Rudlof -- 29 November 2000\\\n\\\nVM Software\\\n\\\n(b) PowerManagement for macintosh is now supported. You can disable the power manager to give you better performance on some powerbooks at the expense of battery life. See the Preferences Panel for details, category 'Performance'\\\n- changed sq.h\\\n- changed sqMacWindow.c to add support for power mgr disabling\\\n\\\n(c) Drag and Drop support for the macintosh, dragging files from the Finder to the Squeak window is now supported.\\\n- sqMacDragDrop.c added\\\n- sqMacWindow.c changed\\\n\\\n(d) Added primitive for get macintosh creator and file type.\\\n- sqMacDirectory.c changed\\\n\\\n(e) Carbon support. Thanks to Karl Goiser karl@wattle.net for work he did on sound and other Carbonization hotspots.\\\n- sqMacAsyncFilePrims.c changed\\\n- sqMacFFIPPC.c changed (not supported for Carbon)\\\n- sqMacNetwork.c changed per Apple tech note 1173 Carbon asset tracking\\\n-sqMacSerialAndMIDIPort.c chnaged (Not supported for Carbon)\\\n- sqMacSound.c changed per Apple tech note 1198 Carbon double sound buffer playing\\\n- sqMacWindow.c changed (various changes for Carbon)\\\n\\\n(f)  Poll at least 60 times a second for the mouse if required. Previous 2.9.x VM did it 30 times but this is too slow and 2.8.x VM do it 60 times a second.\\\n\\\n(g) Reworked path support Thanks to Karl Goiser karl@wattle.net for starting this.\\\n- sqmacDirectory.c changed reworked lookupPath\\\n- sqMacWindow.c changed, added GetApplicationDirectory to get application directory\\\n\\\n(h) I rewrote the sqMacDirectory.c logic to enable proper understanding of Apple's Alias logic. This means for example you can alias the \"SqueakV3.sources\" file and then only have one copy and have all your images point to it. \\\n\\\n(i) Added Zoom Window support.\\\n\\\n(j) Change the Squeak change file icon to better match Apple's visual guidelines, Thanks to Doug Way for the suggestion and the new icons.\\\n\\\n(k) The sound plugins have changed...\\\n\\\n(j) Dropped FFI out of the base Squeak because of security concerns\\\n\\\n(k) Compiled for 750(G3) processor versus 603\\\n\\\n(l) Added screenDepth primitive\\\n\\\nThe 3.0.x VM contains most of the optional plugins, you might want to check this by inspecting \"Smalltalk listBuiltinModules\" to see where your plugins are coming from. In some case people have been accidentally overriding the new builtin plugins with older plugins. \\\n\\\nThe file \"Squeak 3.0Alpha10MT.sig\" contains the PGP signature for the Squeak 3.0Alpha10MT VM\\\n\\\nJohn M McIntosh  johnmci@smalltalkconsulting.com\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n}"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Documentation/3.2.5 Release Notes.rtf",
    "content": "{\\rtf1\\mac\\ansicpg10000\\cocoartf100\n{\\fonttbl\\f0\\fnil\\fcharset77 Geneva;\\f1\\fnil\\fcharset77 LucidaGrande;\\f2\\fswiss\\fcharset77 Helvetica;\n}\n{\\colortbl;\\red255\\green255\\blue255;}\n\\margl1440\\margr1440\\vieww17300\\viewh12720\\viewkind0\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0\\fs24 \\cf0 Mac VM 3.2.5 mach-o build for Carbon, and build for Classic.\\\nMarch 4th, 2002\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f1 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\n\\\nBeware this version of the VM is significantly different inside! \\\n\\\n\\pard\\tx1440\\tx2880\\tx4320\\tx5760\\tx7200\\ql\\qnatural\n\n\\f2 \\cf0 a) Broke sqMacWindow.c into 10 different files by function type.\\\n\\\nb) Moved most of the memory allocation logic out of sqMacMain.c into sqMacMemory.c. and ensure memory is freed when Squeak is terminated. \\\nThe major change in this code is support for OS 9.x virtual memory mapping. This only applies to Mac OS 9.2.0 or higher, excluding os-x. It appears  Mac OS 9.1 has a bug that prevents this feature from working.\\\n\\\nFor images that require less than 128MB of memory, mapping is used to allow the image to grow/shrink to the 128MB boundary, therefore you can change the application memory size to about 2MB. \\\n\\\nFor images that require more than 128MB then change the application memory size to > 128MB and mapping will not occur. \\\n\\\nIf mapping is not available because virtual memory is turned off or the api is not supported by the macintosh OS then mapping is not used. Note that mapping is not support under the classic os-9.x environment under OS-X, however in this case you should be using the OS-X version of Squeak, not the classic version.\\\n\\\nc) Use of Carbon event logic for OS-X only. This is a major structural change. \\\n\\\nIt also encouraged the use of a pthread for interp.c. \\\n\\\nAll user interaction with the VM follows a new code path, so problems with keyboard or mouse input should be reported asap. Also any issues with application switching, windows being brought to the foreground or sent to the background and usage of the full screen logic should be reported asap.\\\n\\\nAs part of this change I have build in support for scroll-wheeled multi-button mice under os-x. Thanks to Doug Way for testing this for me. Maybe someone can post to the list what their favorite 3 button scroll wheeled mouse/trackball is.\\\n\\\nd) Use of a carbon call to get the dominate Device if you have multiple screens. People with multiple screens should confirm window resizing, full screen on/off works as expected.\\\n\\\ne) Corrected comment in sqMacFileLogic.c\\\n\\\nf) Changes to sqMacNSPlugin.c. This makes it compile, but it's not usable yet.\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 \\\n\\\nFeb 20th 2002 3.2.4\\\n\\\nFor this version of the VM I have migrated towards using OS-9 packages. This allows us to provide one \\\nfolder/package that supports os-x and previous operating system versions.\\\n\\\nGiven Squeak 3.2.4Beta1.app\\\nThe classic VM is found in the *.app:Contents:MacOSClassic, with an alias in *.app:\\\nThe mach-o OS-X VM is found in *.app.Contents:MacOS\\\n\\\nIf you are running OS-9 then clicking on the *.app or doing drag and drop will just run Squeak, same applies for OS-X.\\\nIf you are running OS-7.5.5 or OS-8.x then the *.app package will appear as a folder, just open and click on the alias within. \\\nNote that if you want to use classic plugins I suspect you need to put them in the MacOSClassic Folder beside the VM. \\\nBundles for os-x go in the same location as the *.app application package.\\\n\\\nChanges\\\na) Drag and drop at open time with image file that has no meta type, will now open the image, versus prompting you.\\\nb) Use an os-x window attribute at open time to signal that the window should not be moved by the dock when you go to full screen.\\\nc) Fix window update logic to use window that needs updating versus stwindowg to fix issues with print dialog windows in classic. \\\nd) bitblt gets recompile to pickup fixes posted in 3.2 update stream.\\\n\\\nFeb 5th 2002 3.2.3\\\nChanges\\\n\\\na) use old extended time manger to update psudeo-TickCount, versus sigalrm. siglarm make sound recording not work.\\\nb) fiddle with sound recording and make it work.\\\n\\\nJan 2002 3.2.2\\\nChanges:\\\n\\\na) AsyncFilePlugin.c Use global to remember security function entry point for performance reasons\\\nb) FilePlugin.c\tUse global to remember security function entry point for performance reasons\\\nc) interp.c Use squeakFileOffsetType versus off_t and add a bunch of checks to handle lack of long long and conversion errors between 64/32 bit integers and LargeInteger objects\\\nd) readme, it's http://www.mucow.com/Gnuifier.1.cs \\\ne) SocketPlugin.c\tUse global to remember security function entry point for performance reasons\\\nf) sq.h added default sqFilenameFromStringOpen and sqTruncate\\\ng) sqFilePluginBasicPrims.c revert to anti specs, but ensure #def to fseeko and ftello for 64 bit aware file systems.\\\nh) sqMacDirectory.c A bit more error checking on bad file names\\\ni) sqMacFileLogic.c Folders size is now zero in classic, and a bit more checking on bad file names\\\nj) sqMacSound.c Fixed a problem with sound recording in classic due to a change made in Sept. But sound recording still does not work under os-x\\\nk) sqMacWindow.c  two very important changes:\\\n\\\n\t1) You can now do FFI calls with the FFI bundle plugin to Mach-o frameworks. \\\n\tHowever you need to rework your api calls. For example:\\\n\tapiGetMousePoint: aMacPoint was\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'InterfaceLib'>\\\n\tIt now is:\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'Carbon.framework'>\\\n \t\\\n\tIf you review /System/Library/Frameworks I'm sure you can come up with interesting ways to \\\n\tmake mac only squeak images.\\\n\t\\\n\tI now use map( NULL, gMaxHeapSize, PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED,-1,0);\\\n\tanonymous memory mapping to 512MB as the squeak memory block. The VM can then grow or shrink\\\n\twithin the 512MB block, I just move a pointer. \\\n\t\\\n\tNote in 3.2.1 a slight error on my part restricted Squeak to 50MB. I am of course\\\n\tinterested to hear about issues with my choice of 512MB. Note a Squeak VM is limited to 2GB under perfect \\\n\tconditions, however if any part of the image crosses the 2GB boundary the VM will fail, right now 512MB\\\n\tseemed a safe choice.\\\n\t\\\n \tPhysMem:  60.2M wired, 78.6M active,  412M inactive,  551M used,  217M free\\\n\tVM: 3.03G + 55.3M   7847(0) pageins, 1(0) pageouts   \\\n\tPID COMMAND      %CPU   TIME   #TH #PRTS #DREGS RPRVT  RSHRD  RSIZE  VSIZE\\\n\t422 Squeak VM    0.8%  0:35.59   2    71   100  23.3M  8.53M  26.5M   571M\\\n\\\n\tbut I only have one 80,000,000 byte swap file in /var/vm\\\n\\\nNote if you turn crash reporter on, then if the VM crashes a nice report should be generated in your log directory.  See the Apple documentation for a description of this feature, currently it is set in OS-X 10.1.x via the preferences window for the Console Application. If you have a crash with this VM, please recreate and post the crash log (found in Users/foobar/Library/Logs/ to the Squeak mailing list so we can continue to make the VM fault tolerant.\\\n\\\n3.2.1 Notes\\\n\\\nYou might need these change sets to build a new VM or to use all the features of this VM with your image, hopefully these will get into the pending 3.2.x image.\\\n\\\nFixes and feature extensions.\\\nAsyncFileFixFu...hName-JMM.1.cs \tfix for async test method.\\\nDragAndDropAtStart-JMM.5.cs\t\tfix to enable drag and drop at startup\\\n\\\nNeeded to compile a VM with VMMaker\\\nLargeFiles-JMM.3.cs\t\t\t\tEnable large file support, files > 2GB\\\n\\\nNeeded to turn this feature on\\\nMacLongFileName-JMM.5.cs\t\t\tEnable long file names on the mac\\\n\\\nThe SUnit\\\nMacLongFileNamesSUnits-JMM.3.cs\tTest long file names and long directory names and large file support\\\n\\\nKinda optional features some people might need.\\\nInternetConfiguration-JMM.5.cs\t\tAllow internet configuration information access, internal plugin\\\nUUID-JMM.3.cs\t\t\t\t\tAllow UUID generation, internal plugin\\\n\\\na) The ability to get back a UUID. This uses the hosting UUID generator if the\\\n hosting OS supports it and we have a primitive we can call. If not then we generate\\\n a type 4 version of a UUID (the random bits one).\\\n(This requires a special change set)\\\n\\\nb) Ability to start squeak on the mac by dragging multiple documents onto the\\\nimage, or drag and drop of stuff onto the running VM icon.\\\n(This requires a special change set)\\\n\\\nc) Usage of the Internet Configuration tool kit to supply information about\\\nwhat the mac proxy is etc. etc.\\\n(This requires a special change set)\\\n\\\nd) Migrate file system to use 64 bits. This allows you to read/write and seek\\\nwith files > 2 GB. This includes a change to the VM to convert from/to long\\\nlong integers. It also allows the file system to actually deal with 2GB files,\\\nthe current file interface actually fails once the file exceeds 1GB.\\\n\\\ne) For the carbon based Squeak VM we now support long file names 255\\\ncharacters. Close both eyes and touch everywhere the mac VM deals with file\\\nname paths and hope for the best (Actually we write an Sunit to ensure we've\\\nnot broken everything). This also includes the ability to put an image in a\\\nlong file name directory, but right now the image name must stay under 32 characters.\\\n\\\nFilePlugin.c changes to support large integers.\\\nFilePlugin.h changes\\\nsq.h changes to support large files.\\\nsqConfig.h changes to resolve some conflicts.\\\nsqFilePluginBasicPrims.c  changes to support large files.\\\nsqMacAsyncFilePrims.c changes to use fspec versus 255 file path.\\\nsqMacDirectory.c changes to use hosting OS (OS-X) bsd create and delete directory\\\n and truncate. dir_look changes as part of the general rewrite.\\\nsqMacDragAndDrop.c use new call to get path name from fsspec. Use fsspec more, and added \\\n  interface code to setup drag and drop of items at application startup time. max document name\\\n  goes to 1000 characters.\\\nsqMacFileLogic.c Mostly rewrote!\\\nsqMacSecurity.c use new file calls.\\\nsqMacWindow.c \\\n\tincrease size of vmpath, docpath, imagepath to 1000 chars, shortname to 255 characters.\\\n\tadd logic for left/right modifier keys \\\n\treworked LoadLibViaPath logic \\\n\tsqImageFileOpen uses fsspec versus 255 path name.\\\n\tsqImageFileStartLocation uses ffspec.\\\n\tbundle support for bundles\\\n\t\\\ne2) interp.c supports get/put of large integers to long long integers.\\\ne3) fixed fTruncate\\\n\\\nHint getting this to work was a pain. Think of 255 character folder names and nested aliases,\\\nfolder 1 refers to folder 2 which then refers to folder 1 again, just go down the path say 8 times,\\\nthen ask to create a file or directory!\\\n\\\nf) Support to change the Mac screen resolution under Squeak control.\\\n\\\ng) Fix to unload/load the scrap at startup time to ensure the clipboard is\\\ncorrect when starting up the VM.\\\n\\\nh) Uncouple the shift key and left/right shift keys on old extended keyboard.\\\nAlso add a call to get which keys are currently pressed on a USB keyboard or\\\nthe USB codes for an apple non-usb keyboard. (Note this isn't working quite yet under OS-X)\\\n\\\ni) Changes to enable us to compile the VM under Apple's OS-X Project Builder\\\nenvironments.\\\n\\\nj) Some rewriting to ensure serial and midi support can be written as external\\\nplugins.\\\n\\\nk) Fiddling to get sound input to work under OS-X\\\n\\\nl) Platform.exports changed macintosh to macintoshSqueak to avoid conflict.\\\n\\\nm) Memory is allocated at 50MB at start, then will grow or shrink, verus previous carbon apps\\\n that did 1GB. \\\n \\\nn) sqPlatformSpecific.h changes to support long file names and os-x posix file names\\\n\\\no) sqVirtualmachine.c & sqVirtualmachine.h\\\n#if VM_PROXY_MINOR > 4\\\n\tVM->positive64BitIntegerFor = positive64BitIntegerFor;\\\n\tVM->positive64BitValueOf = positive64BitValueOf;\\\n\tVM->signed64BitIntegerFor = signed64BitIntegerFor;\\\n\tVM->signed64BitValueOf = signed64BitValueOf;\\\n#endif\\\n\\\nBeware this causes an interesting problem, if you compile plugins with VM_PROXY_MINOR now set to 5, then they will not work with older VMs. The solution is to define the VM_PROXY_MINOR in the plugin to the value that indicates what features it is using.\\\n\\\np) Changed to use ITimer logic as a 16ms lowres timer to improve performance\\\n\\\nq) Changed to use single thread, no thread manager.\\\n\\\nr) Changed to use lowres timer in checking for polling time to improve performance\\\n\\\ns) It should have faster startup times.\\\n\\\nt) It will hide the empty window at startup, then show the squeak window when required.\\\n\\\nu) It has a different menu structure.\\\n\\\nv) It does less I/O when navigating directories.\\\n\\\nThe macintosh 3.1Alpha1MT VM, Sept 24th 2001 \\\nThis VM was built with the base  3.1 image at change set #4347\\\nV3.1.1 at change set #4347\\\n\\\n\\\nWe go to V3.1.1 to indicate that the 3.1 VM is being used. In the past the 3.1 Image was used but some changes in the openGL logic makes  3.1 Vm and 3.0 image not quite work correctly with 3d graphics. Although a 3.1 VM will run many images way back to the 2x series no careful study has been done on the ability to do this. So at this point we are indicating this VM is a 3.1 VM and best used with a 3.1 image.\\\n\\\nUse of VMMaker to build VM. As of this version everything can be built as an external except for the window logic which hasn't been decoupled from the VM support for the macintosh. \\\n\\\n1) AsynchFilePlugin the security check for ability to create file is now a plugin call.\\\n2) B2DPlugin logic changes to fillLinearGradientfromtoat\\\n3) b3dRemapFaces, b3dRemapEdges, b3dRemapEdgeList, b3dRemapAET, b3dRemapEdgeVertices, b3dRemapFaceVertices, b3dRemapFaceFree, b3dRemapEdgeFree, b3dRemapAttributes. Some casting and changing of += to = + to make some compilers happy.\\\n4) BitBltPlugin added tableLookupat call.\\\n5) DropPlugin added setFileAccessCallback to allow the Security Module plugin the ability to give us the entry point to turn security off so we can open files as read only when security is turned on.  This was broken in the past. \\\n 6) FilePlugin added fileOpennamesizewrite,getThisSession to allow for callbacks. Changed the file security logic to use the plugin interface. \\\n7) interp.c, fixes for 4347ByteArrayRangeCheck-di, ability to printAllStacks, security calls for image rename, write to use plugin interface.\\\n8) Added GetAttributeString, and recordDragDropEvent and entry points for callbacks.\\\n9) SecurityPlugin changed when initialization is called to initialize the safe and unsafe directorys, also added entry points for all the testing calls so it can be a true plugin.\\\n10) Serialplugin. The serial plugin was redesigned to seperate out MIDI logic. People with MIDI devices and old serial macintosh should check to see if they still work since we lack equipment now to test this obsolete technology set.\\\n11) SocketPlugin. Make security calls true plugin calls.\\\n12 SoundGenerationPlugin. Removed \\\nEXPORT(int) SoundGenerationPlugin_primitiveFMSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveOldSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitivePluckedSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveWaveTableSoundMix(void);\\\nThey were a hack at the plugin level and discussion on the list seemed to show they were no longer used. \\\n13) Checking for if defined (__APPLE__) && defined(__MACH__) for the Mac OS-X native development environment\\\n14) Changed sqMacAsyncFilePrims, usage of interpreterProxy->, plugin calls for getThisSession. \\\n15) Changed sqMacDirectory.c. Removed some utility code and make it a seperate file so that it can be shared between sqMacWindow and other plugins that require them. \\\n16) Changed sqMacDragDrop.c. Added plugin callback for getSTWindow, the sqSetFileAccessCallback logic, fileOpennamesizewrite, and secHasFileAccess. Added logic to do the recordDragDropEvent callback to sqMacWindow.c \\\n17) sqMacNetwork.c. Some cleanup for the OS-X version of the OpenTransport headers, some constants have name changes\\\n18) sqMacNSPlugin.c Use of ioLoadFunctionFrom(NULL, \"DropPlugin\"); versus explicit call.\\\n19) sqMacOpenGL.c. Some cleanup for the OS-X version of the OpenGL headers\\\n20) sqMacOpenGLInfo.c. Some cleanup for the OS-X version of the OpenGL headers\\\n21) sqMacSecurity.c ioInitSecurity calls back to dragAndDrop plugin to set entry point to turn security off.  Added code to create directories if required and ensured callbacks are plugitized.\\\n22) sqMacSound.c Some cleanup for the OS-X version of the Sound headers. Use of interpreterProxy-> in the proper places.\\\n23) sqMacWindow.c Some cleanup for the OS-X version of the compiler.  Fixed saveAsEmbeddedImage, this got broken when we moved from a FAT to a ppc only application.  Altered interface to recordDragDropEvent so that it was plugable. Some file path name logic goes to a seperate C source file. The drag and drop plugin is loaded and intialized after the image is loaded but before the interpreter is started, before it was done a bit earlier in the startup process. This also has the effect of initializing the security module.\\\n24)sqOpenGLRenderer.c. Some cleanup for the OS-X version of the OpenGL headers\\\n25)SurfacePlugin.c gets a hack so it knows when it is internal versus external.\\\n\\\n\\\n\\\nv3.0.18 at change set #4081\\\n(Note browser plugin goes to 3.0.23\\\n\\\n1) sqMacOpenGL.c Quite a few changes were made to the code to support it as an internal plugin for the browser. This is because the drawable frame for a browser plugin is a subset of the browser's grafport, so lots more care must be taken to draw in the correct location using OpenGL. We also fixed issues with re-configurating the Open/GL draw area when the window gets resized or goes to full screen, and attempted to ensure multiple screens will work.\\\n\\\n2) sqMacWindow.c, minor fix to cast a constant char * to char * for CW 6.1\\\n\\\n\\\nBrowser plugin 3.0.23 fixes\\\n\\\n1) Integerated the H/W Acceleration as an builtin plugin\\\n2) Added logic for pre and post event interaction to browser plugin event handler for H/W Acceleration logic. The external H/W Acceleration plugin mostly works with the browser plugin but doesn't work with full screen mode, or if the plugin is embedded in a window or a scrollable frame, so don't use it. Use the browser plugin 3.0.23 or higher which has the H/W Acceleration builtin.\\\n\\\nv3.0.17 at change set #4081\\\n(Note browser plugin goes to 3.0.21)\\\n\\\n1) Added HW acceleration as internal plugin.\\\n2) 4079BBAlphaTextFix-ar Fixes the problem with alpha text, changes BitBltPlugin.c \\\n3) Added primitive on the mac to truncate a file.\\\n4) Added logic to flush volume on a flush file to ensure file and control blocks are flushed.\\\n5) For the Carbon VM we increase nextevent wait time if we get sufficent idle time. This should reduce CPU usage under OS-X\\\n6) GetAttribute: 1002 now returns the gestaltSystemVersion as a hex string, and getAttribute: 1003 now returns either '68K' or 'PowerPC'.\\\n7) Starting with 3.0.17 the VM is build only as a powerpc application. The latest VM as a 68K application will be made available from time to time permits based on people's needs. \\\n8) Changes to sqOpenGLRenderer.c to improve performance, OpenGL 1.1 support.\\\n\\\nPlugin 3.0.21 fixes\\\n\\\n1) added check for mailto: tag on posts to fix problem with Netscape crashing, and IE hanging.\\\n2) Plus above fixes.\\\n\\\nWhat has been fixed/changed.\\\nv3.0.16 at change set #4041\\\n(Note browser plugin goes to 3.0.20)\\\n\\\n1) Lots of fixes for BitBlt and HW acceleration.\\\n2) Hardware Acceleration plugin goes to 1.0.1. Please note there is a seperate plugin with the same name for Carbon. Doing a get info will identify if the plugin is only usable with Carbon Squeak.\\\n\\\nv3.0.15 at change set #4026 (May 17th test version)\\\n(Note browser plugin goes to 3.0.19)\\\n\\\n1) Added support for OpenGL HW acceleration plugin\\\n\\\nPlugin 3.0.19 fixes\\\n\\\na) Obey embedded tag plug\\\nb) Fix problem with plugin 3.0.17 not working with netscape 4.x\\\nc) Carbonize plugin for IE 5.1 \\\nd) Remove debugging printf than occurred on transition to full screen mode\\\n\\\nWhat has been fixed/changed.\\\nv3.0.14 at change set #3987\\\n\\\n(Note plugin goes to 3.0.17)\\\n\\\n1) sqMacDirectory.c. The pathlookup would handle the case of foo:bar::do incorrectly by ignoring the :: path redirection. This has been fixed. However a path lookup will not work if it contains :: and an aliased directory in the middle of the path.\\\n\\\n2) sqMacSecurity.c. The pathname for the untrustedUserDirectory was built incorrectly, and the bug mentioned above in sqMacDirectory.c usually kept this from being noticed.\\\n\\\n3) sqMacWindow.c  we added some logic to do the delay for primitiveRelinquishProcessor, but found it had an large effect on a freecell benchmark. I suspect on a Morpic step wait there is nothing to do so primitiveRelinquishProcessor gets called which then affects response time. So for now we revert to the 3.0.11 behavior, good performance and 100% CPU usage!\\\n\\\n4) GetAttribute 1004 returns returns interpreterVersion; which is for example\\\n\"Squeak3.1alpha of 6 February 2001 [latest update: #3987]\"\\\n\\\n5) When in full screen mode we now attempt to disable resizing, zooming, or moving the window. The window borders are hidden, but in the past it was feasible to grab an edge and alter it, thus confusing the VM.\\\n\\\n6) Worked on Carbonizing the browser plugin\\\n\\\n7) 3977 & 3978 FloatArray fixes. Makes float arrays go through a new (and working) version of #primitiveHash\\\n\\\n8) Fixed problem with accidental mouse clicks being triggered from pulldown menus on application switching.\\\n\\\n9)\\\n\"Change Set:\t\t3984 BitBltExtensions-ar\\\nDate:\t\t\t4 May 2001\\\nAuthor:\t\t\tAndreas Raab\\\n\\\nThe change set includes various extensions for BitBlt with the goal of migrating the useful features from FXBlt into the general BitBlt mechanisms. These include:\\\n\\\n* Handling of LSB and MSB forms:\\\nBitBlt now handles both, MSB and LSB forms (and their conversions). Only instances of Bitmap are assumed to contain big-endian pixels. All others are assumed to be little endian (reason is that we can only identify Bitmap here). Note that 'LSB' and 'MSB' refers to PIXELS, that is a 1bpp LSB form has its left most pixel in the lowest bit whereas a 1bpp MSB form has its left-most pixel in the highest bit.\\\n\\\nFor pixel depths < 8 this can be different from what your OS supplies (as an example, Windows bitmaps < 8 are big-endian pixels in little-endian words; we might call them 'middle-endian'). We simply don't deal with those - forms are either big or little endian but nothing inbetween.\\\n\\\nBitBlt has got an extra combination rule for swapping pixels in the destination form. This can be used to make byte swapping much more efficient (as soon as we've got more VMs with support for it).\\\n\\\n* Handling of 'native bitmaps' (aka surfaces):\\\nBitBlt is now able to deal with OS surfaces that are registered with the surface plugin.\\\n\\\n* Handling of full color maps:\\\nBitBlt has been extended to deal with instances of ColorMap in addition to the prior mechanism of using only indexed lookups and provide an implicit 16-32 bit color conversion. ColorMaps can specify both, a lookup table and an additional set of masks and shifts to apply during the color mapping operation. \\\n\\\nFour independent shifts and masks can be given which can be used for a lot more than just color conversion (as an example, one could do byte swapping with this; but see also BitBlt class>>exampleColorMap). \\\n\\\n* Better handling of default arguments:\\\nFor most of the required arguments for BitBlt very reasonable default assumptions can be made. This includes the destOrigin (0@0), clipRect (0@0 extent: destForm extent), sourceOrigin (0@0). BitBlt now substitutes these if they are absent (e.g., nil) in the instance provided.\\\n\\\n\"\\\n\\\n\\\nv3.0.13 at change set #3848\\\n\\\n1) sqMacSecurity was changed to set the unsecure directory to\\\n\tsystem folder:Preferences:Squeak:Internet:My Squeak\\\n\\\nv3.0.12 at change set #3848\\\n1) Fixed problem with creating My Squeak Folder in Documents Folder with System 8.6\\\n\\\nWhat has been fixed/changed.\\\nv3.0.11 at change set #3848\\\n\\\n1) sqMacDirectory had a bug when you resolved a path name. The fast resolve always failed, which invoked the slow resolver. Now the fast resolver works.\\\n\\\n2) sqMacSecurity was changed to set the unsecure directory to Documents:My Squeak. \\\n\\\n3) sqMacWindow was changed to fix some issues with Squeak capturing events from other applications and to reduce the number of duplicate mouse events that are generated. Also we capture modifier information  directly from the mouse and keyboard on null events to fix some problems with Carbon. We  hopefully fixed problems with mouse clicks from foreground applications being seen by Squeak and issues with the OS-X Dock clicks.\\\n\\\n4) sqMacNSPlugin was changed to use the above mouse/keyboard capture code which is much cleaner than the original fix for the bogus modifier information given to us by netscape on a null event. \\\n\\\n5) When you turn full screen off we now correctly reposition the window to the original location versus a few pixels to the left. \\\n\\\nWhat has been fixed/changed.\\\nv3.0.10 at change set #3848\\\n\\\n1) changed VM exception unwind logic\\\n\t3796-Exception-unwind-V3,tim@sumeru.stanford.edu, Paul McDonough, Stephen Pair and others\\\n\\\n2) Fixes for the JPEGReader plugin and for Jitter 3\\\n\\\n3) Added minimal Mac VM logic to assist in building a small VM.\\\n\\\n4) Changed how the browser plugin starts up. Now it starts the interpreter running only after getting the browser setwindow command. This seems to fix a race condition that resulted in a crash at startup time with Netscape 4.x\\\n\\\n5) Fixed broken full screen redraw on cmd-tab\\\n\\\n6) Fixed what looked like mouse-down, mouse-down, mouse-up sequence. Now reports mouse-down, mouse up.\\\n\\\n7) Added StarSqueak plugin as internal plugin\\\n\\\n8) Note the current Squeak Plugin should be gotten from the www.squeakland.org site.\\\n\\\nv3.0.9 at change set #3776, Boston Snow storm build.\\\n\\\n1) A number of changes were made to the interpreter:\\\n\ta) added primitive to change a class.\\\n\tb) added primitives to get or put 32bit integers\\\n\tc) Fix problem with GC and class reshaping\\\n\td) Better logic for method cache flushing\\\n\\\n2) Added JPEGReader plugin\\\n\\\n\\\nV3.0.8 at change set #3740\\\n\\\n1) The caps lock no longer maps to the shift attribute. So if the caps lock is down mouse clicks will behave normally. \\\n\\\n2) Numerous fixes for the BitBltPlugin plugin\\\n\\\n3) Memory allocation grow/shrink logic for Carbon was added.\\\n\\\n4) Spurious mouse clicks for the browser plugin has been fixed. (This took awhile to fix, I'm sure it's a bug with the Swedish version of Netscape)\\\n\\\n5) The browser plugin will attempt first to allocate memory from the browser heap, then the system heap. Most people when faced with a memory issue usually increase memory for the browser first. However memory for the plugin is controlled by an attribute in the EMBED HTML statement. \\\n\\\nV3.0.7\\\n\\\n1) A bug exists in pre OS 8.x that causes a crash in activate window if the standard get file \\\ndialog comes up before the Squeak Window. I remove the InvalWindow call found in that routine since it is actually redundant.\\\n\\\n2) The standard get file dialog on system 7.x would not terminate if you did a cancel.\\\n\\\n3) The InterfaceLib had to be weak linked to prevent CFM startup issues. \\\n\\\nV3.0.6\\\n\\\n1) Alias resolving is less aggressive.\\\n\\\n2) We no longer cache image reads or writes. This was done because OS 9.1 allows you to have very large disk caches, and it's pointless to cache the image read or write.\\\n\\\n3) The file flush primitive now actually flushes the file via an OS call. This was a bug in the CodeWarrior 5.3 source code.\\\n\\\n4) The 68K version was being built with the 68881 math library. This fails on 68040LC chips. We now use the non-68881 math library. Thanks to Bruce ONeel for find this.\\\n\\\n5) A bug was found in the path resolving logic that was added for 3.x. This bug apparently only affects 68K machines,  never was identified as a PowerPC issue. \\\n\\\n6) The Netscape plugin needs a properly allocated clip region, this code seemed to work ok on new systems, but fails on system 7.6.1\\\n\\\n7) The security interface will create a Documents folder on the root volume if the default Document folder has been deleted. This is needed for security purposes. \\\n\\\n8) Jitter needs 1MB of free memory to run.\\\n\\\n9) 68K machines require another 32K of stack\\\n\\\n10) Threads  now work on 68K machines, but turned off because of possible performance issues. (I think more study is needed).\\\n\\\n11) The 68K version was compiled with better optimization, expect a 15% improvement.\\\n\\\n12) fix for BitBltPlugin ascii = byteAt((sourcePtr + charIndex) - 1);\\\n\\\n13) The interpreter object validation checking code was alter to work correctly.\\\n\\\nV3.0.5\\\n\\\n1) sqConfig.h changed due to BE OS header changes\\\n\\\n2) sqMacDirectory.c. Added support for Navigation services or Standard File Get to find the image at startup time when the Squeak.image is not found by the VM. This replaces the DOS like console message that comes up saying that Squeak can't find a image.\\\n\\\n3) A fix to drag and drop for the browser plugin.\\\n\\\n4) We now use Apple's cooperative multithreading package to run the UI in one thread, the VM in the other. This solves some issues with the browser and makes the UI versus VM logic and execution responsibilities easier to understand. \\\n\\\n5) Changed the sqMacNSPlugin.c code to support a 3.0VM using multithreading support. This should give Squeak in a browser better performance. Also changed the full screen support to correctly work with multiple monitors.\\\n\\\n6) BitBltPlugin.c gets one more op code\\\n\\\n7) Added the security interface\\\n\\\n8) Added the file flush primitive\\\n\\\n9) Rewrote the macintosh readme file\\\n\\\n10) Revisited the zoomWindow code and found a bug with multiple monitor support, then I fixed the code to make Full Screen mode work on screen that Squeak window is mostly on, versus the menubar screen. Also if you switch from full screen back it resizes the window back to the orginal size and location before you invoked the full screen. \\\n\\\nV3.0.2\\\nPlugins\\\n\\\nRecompiled the internal BitBltPlugin plugin to encorporate:\\\nChange Set:\t\t258AlphaBlendOpt-dsm\\\nAuthor:\t\t\tDuane Maxwell, Paul Phillips/exobox\\\na) Short circuits full opaque and full transparent pixels when alpha blending.\\\n\\\nRecompiled the internal LargeIntegerPlugin\\\n3298LargeIntegersV1-2-sr -- Stephan Rudlof -- 29 November 2000\\\n3299LargeIntV1-2For29-sr -- Stephan Rudlof -- 29 November 2000\\\n\\\nVM Software\\\n\\\n(b) PowerManagement for macintosh is now supported. You can disable the power manager to give you better performance on some powerbooks at the expense of battery life. See the Preferences Panel for details, category 'Performance'\\\n- changed sq.h\\\n- changed sqMacWindow.c to add support for power mgr disabling\\\n\\\n(c) Drag and Drop support for the macintosh, dragging files from the Finder to the Squeak window is now supported.\\\n- sqMacDragDrop.c added\\\n- sqMacWindow.c changed\\\n\\\n(d) Added primitive for get macintosh creator and file type.\\\n- sqMacDirectory.c changed\\\n\\\n(e) Carbon support. Thanks to Karl Goiser karl@wattle.net for work he did on sound and other Carbonization hotspots.\\\n- sqMacAsyncFilePrims.c changed\\\n- sqMacFFIPPC.c changed (not supported for Carbon)\\\n- sqMacNetwork.c changed per Apple tech note 1173 Carbon asset tracking\\\n-sqMacSerialAndMIDIPort.c chnaged (Not supported for Carbon)\\\n- sqMacSound.c changed per Apple tech note 1198 Carbon double sound buffer playing\\\n- sqMacWindow.c changed (various changes for Carbon)\\\n\\\n(f)  Poll at least 60 times a second for the mouse if required. Previous 2.9.x VM did it 30 times but this is too slow and 2.8.x VM do it 60 times a second.\\\n\\\n(g) Reworked path support Thanks to Karl Goiser karl@wattle.net for starting this.\\\n- sqmacDirectory.c changed reworked lookupPath\\\n- sqMacWindow.c changed, added GetApplicationDirectory to get application directory\\\n\\\n(h) I rewrote the sqMacDirectory.c logic to enable proper understanding of Apple's Alias logic. This means for example you can alias the \"SqueakV3.sources\" file and then only have one copy and have all your images point to it. \\\n\\\n(i) Added Zoom Window support.\\\n\\\n(j) Change the Squeak change file icon to better match Apple's visual guidelines, Thanks to Doug Way for the suggestion and the new icons.\\\n\\\n(k) The sound plugins have changed...\\\n\\\n(j) Dropped FFI out of the base Squeak because of security concerns\\\n\\\n(k) Compiled for 750(G3) processor versus 603\\\n\\\n(l) Added screenDepth primitive\\\n\\\nThe 3.0.x VM contains most of the optional plugins, you might want to check this by inspecting \"Smalltalk listBuiltinModules\" to see where your plugins are coming from. In some case people have been accidentally overriding the new builtin plugins with older plugins. \\\n\\\nThe file \"Squeak 3.0Alpha10MT.sig\" contains the PGP signature for the Squeak 3.0Alpha10MT VM\\\n\\\nJohn M McIntosh  johnmci@smalltalkconsulting.com\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n}"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Documentation/3.2.6 Release Notes.rtf",
    "content": "{\\rtf1\\mac\\ansicpg10000\\cocoartf100\n{\\fonttbl\\f0\\fnil\\fcharset77 Geneva;\\f1\\fnil\\fcharset77 LucidaGrande;\\f2\\fswiss\\fcharset77 Helvetica;\n}\n{\\colortbl;\\red255\\green255\\blue255;}\n\\margl1440\\margr1440\\vieww17300\\viewh12720\\viewkind0\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0\\fs24 \\cf0 Mac VM 3.2.6 mach-o build for Carbon, and build for Classic.\\\nMarch 14th, 2002\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f1 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\nNotes About previous VM.\\\n3.2.6b6 Classic or earlier has a bug that makes it stop collecting user input on a 19.88 hour cycle depending on reboot time.\\\n\tSeems many systems don't run for more than 19 hours so we've not had major complains about this issue. \\\n\tBug was introduced in 3.2.1.\\\n3.2.5 has a bug that prevents the use of accented characters without \\\n\ta image patch to fix a VM issue (not an issue in 3.2.4). Also you can't enter an double keystroke characters, ie ^ \\\n\twhich makes life difficult. It also does not support the AppleScript Plugin (not an issue in 3.2.4)\\\n3.2.4 a bug in project builder introduced a performance problem (bad compiler options).\\\n\\\nSee the 3.2.5 about why this 3.2.6 is different inside.\\\n\\\nFor 3.2.6:\\\na) Change an internal number that dictates how often pending interrupts should be looked at from 5ms to 3ms This improves \\\ndelay accuracy.\\\nb) Change how sleeping is done when squeak is idle. This reduces CPU consumption, and improves Delay accuracy.\\\nc) Fix bug with high bit problem with keyboard (accented characters are ok now)\\\n  c2) 3.2.6b6 has fixed characters that require multiple key strokes to enter.\\\nd) Externals that make UI interactions (IE AppleScript) Must now make a call back to the VM to schedule\\\n    the main thread to do the call that will invoke UI interaction to prevent a deadlock in Carbon between threads. \\\n   See the OSAExecute call in the AppleScript plugin for details.\\\ne) If you run a classic mac VM more than 23.x days nonstop it will stop responding to UI events.  Ensure clocks get anded with 536870911.\\\nf) signal inputSemaphoreIndex because we are mulithreaded. Not that it does anything for us yet...\\\ng) 3.2.6b6 Pass the unicode value of the keystroke up as the EventKeyDown/EventKeyUp data, versus mackeyboard code.\\\nh) Somewhere there is a bug with mktime + time, so use the unix code of time+localtime+gmt \\\ni) Change iorelinquishPrcessorForMicroseconds to sleep the quatum between now and wakeup time. Also schedule a\\\n   check for interrupts if wakeup time is now or in the past. This improves delay accuracy. For OS-x this was a big deal,\\\n   for os-9 it improves things by 1 or 2ms. Also in  os-x we sleep more when idle so CPU usage goes down.\\\nj) On OS-9 umap AND free the VM backing store. Just doing the free doesn't work and you lose 128Mb of disk space until you reboot\\\nk) 3.2.6b7 for post event processing ignore mouse move/drag/or scroll wheel events. These are ignored by the open/gl plugin and only suck a major amount of CPU time to process in the post event processing logic. \\\nl) 3.2.6b8 (3.2.6b4 classic) removed call to uncouple shift keys introduced in 3.2.1. This causes some macs after sleeping not to respond to keyboard input\\\nm) 3.2.6b8 (3.2.5b7 classic) added function for ioLowResMSecs to avoid early bit overflow. Rework clock checking in ioHandleEvents to handle clock rollovers properly.\\\n\\\nMac VM 3.2.5 mach-o build for Carbon, and build for Classic.\\\nMarch 4th, 2002\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f1 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\n\\\nBeware this version of the VM is significantly different inside! \\\n\\\n\\pard\\tx1440\\tx2880\\tx4320\\tx5760\\tx7200\\ql\\qnatural\n\n\\f2 \\cf0 a) Broke sqMacWindow.c into 10 different files by function type.\\\n\\\nb) Moved most of the memory allocation logic out of sqMacMain.c into sqMacMemory.c. and ensure memory is freed when Squeak is terminated. \\\nThe major change in this code is support for OS 9.x virtual memory mapping. This only applies to Mac OS 9.2.0 or higher, excluding os-x. It appears  Mac OS 9.1 has a bug that prevents this feature from working.\\\n\\\nFor images that require less than 128MB of memory, mapping is used to allow the image to grow/shrink to the 128MB boundary, therefore you can change the application memory size to about 2MB. \\\n\\\nFor images that require more than 128MB then change the application memory size to > 128MB and mapping will not occur. \\\n\\\nIf mapping is not available because virtual memory is turned off or the api is not supported by the macintosh OS then mapping is not used. Note that mapping is not support under the classic os-9.x environment under OS-X, however in this case you should be using the OS-X version of Squeak, not the classic version.\\\n\\\nc) Use of Carbon event logic for OS-X only. This is a major structural change. \\\n\\\nIt also encouraged the use of a pthread for interp.c. \\\n\\\nAll user interaction with the VM follows a new code path, so problems with keyboard or mouse input should be reported asap. Also any issues with application switching, windows being brought to the foreground or sent to the background and usage of the full screen logic should be reported asap.\\\n\\\nAs part of this change I have build in support for scroll-wheeled multi-button mice under os-x. Thanks to Doug Way for testing this for me. Maybe someone can post to the list what their favorite 3 button scroll wheeled mouse/trackball is.\\\n\\\nd) Use of a carbon call to get the dominate Device if you have multiple screens. People with multiple screens should confirm window resizing, full screen on/off works as expected.\\\n\\\ne) Corrected comment in sqMacFileLogic.c\\\n\\\nf) Changes to sqMacNSPlugin.c. This makes it compile, but it's not usable yet.\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 \\\n\\\nFeb 20th 2002 3.2.4\\\n\\\nFor this version of the VM I have migrated towards using OS-9 packages. This allows us to provide one \\\nfolder/package that supports os-x and previous operating system versions.\\\n\\\nGiven Squeak 3.2.4Beta1.app\\\nThe classic VM is found in the *.app:Contents:MacOSClassic, with an alias in *.app:\\\nThe mach-o OS-X VM is found in *.app.Contents:MacOS\\\n\\\nIf you are running OS-9 then clicking on the *.app or doing drag and drop will just run Squeak, same applies for OS-X.\\\nIf you are running OS-7.5.5 or OS-8.x then the *.app package will appear as a folder, just open and click on the alias within. \\\nNote that if you want to use classic plugins I suspect you need to put them in the MacOSClassic Folder beside the VM. \\\nBundles for os-x go in the same location as the *.app application package.\\\n\\\nChanges\\\na) Drag and drop at open time with image file that has no meta type, will now open the image, versus prompting you.\\\nb) Use an os-x window attribute at open time to signal that the window should not be moved by the dock when you go to full screen.\\\nc) Fix window update logic to use window that needs updating versus stwindowg to fix issues with print dialog windows in classic. \\\nd) bitblt gets recompile to pickup fixes posted in 3.2 update stream.\\\n\\\nFeb 5th 2002 3.2.3\\\nChanges\\\n\\\na) use old extended time manger to update psudeo-TickCount, versus sigalrm. siglarm make sound recording not work.\\\nb) fiddle with sound recording and make it work.\\\n\\\nJan 2002 3.2.2\\\nChanges:\\\n\\\na) AsyncFilePlugin.c Use global to remember security function entry point for performance reasons\\\nb) FilePlugin.c\tUse global to remember security function entry point for performance reasons\\\nc) interp.c Use squeakFileOffsetType versus off_t and add a bunch of checks to handle lack of long long and conversion errors between 64/32 bit integers and LargeInteger objects\\\nd) readme, it's http://www.mucow.com/Gnuifier.1.cs \\\ne) SocketPlugin.c\tUse global to remember security function entry point for performance reasons\\\nf) sq.h added default sqFilenameFromStringOpen and sqTruncate\\\ng) sqFilePluginBasicPrims.c revert to anti specs, but ensure #def to fseeko and ftello for 64 bit aware file systems.\\\nh) sqMacDirectory.c A bit more error checking on bad file names\\\ni) sqMacFileLogic.c Folders size is now zero in classic, and a bit more checking on bad file names\\\nj) sqMacSound.c Fixed a problem with sound recording in classic due to a change made in Sept. But sound recording still does not work under os-x\\\nk) sqMacWindow.c  two very important changes:\\\n\\\n\t1) You can now do FFI calls with the FFI bundle plugin to Mach-o frameworks. \\\n\tHowever you need to rework your api calls. For example:\\\n\tapiGetMousePoint: aMacPoint was\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'InterfaceLib'>\\\n\tIt now is:\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'Carbon.framework'>\\\n \t\\\n\tIf you review /System/Library/Frameworks I'm sure you can come up with interesting ways to \\\n\tmake mac only squeak images.\\\n\t\\\n\tI now use map( NULL, gMaxHeapSize, PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED,-1,0);\\\n\tanonymous memory mapping to 512MB as the squeak memory block. The VM can then grow or shrink\\\n\twithin the 512MB block, I just move a pointer. \\\n\t\\\n\tNote in 3.2.1 a slight error on my part restricted Squeak to 50MB. I am of course\\\n\tinterested to hear about issues with my choice of 512MB. Note a Squeak VM is limited to 2GB under perfect \\\n\tconditions, however if any part of the image crosses the 2GB boundary the VM will fail, right now 512MB\\\n\tseemed a safe choice.\\\n\t\\\n \tPhysMem:  60.2M wired, 78.6M active,  412M inactive,  551M used,  217M free\\\n\tVM: 3.03G + 55.3M   7847(0) pageins, 1(0) pageouts   \\\n\tPID COMMAND      %CPU   TIME   #TH #PRTS #DREGS RPRVT  RSHRD  RSIZE  VSIZE\\\n\t422 Squeak VM    0.8%  0:35.59   2    71   100  23.3M  8.53M  26.5M   571M\\\n\\\n\tbut I only have one 80,000,000 byte swap file in /var/vm\\\n\\\nNote if you turn crash reporter on, then if the VM crashes a nice report should be generated in your log directory.  See the Apple documentation for a description of this feature, currently it is set in OS-X 10.1.x via the preferences window for the Console Application. If you have a crash with this VM, please recreate and post the crash log (found in Users/foobar/Library/Logs/ to the Squeak mailing list so we can continue to make the VM fault tolerant.\\\n\\\n3.2.1 Notes\\\n\\\nYou might need these change sets to build a new VM or to use all the features of this VM with your image, hopefully these will get into the pending 3.2.x image.\\\n\\\nFixes and feature extensions.\\\nAsyncFileFixFu...hName-JMM.1.cs \tfix for async test method.\\\nDragAndDropAtStart-JMM.5.cs\t\tfix to enable drag and drop at startup\\\n\\\nNeeded to compile a VM with VMMaker\\\nLargeFiles-JMM.3.cs\t\t\t\tEnable large file support, files > 2GB\\\n\\\nNeeded to turn this feature on\\\nMacLongFileName-JMM.5.cs\t\t\tEnable long file names on the mac\\\n\\\nThe SUnit\\\nMacLongFileNamesSUnits-JMM.3.cs\tTest long file names and long directory names and large file support\\\n\\\nKinda optional features some people might need.\\\nInternetConfiguration-JMM.5.cs\t\tAllow internet configuration information access, internal plugin\\\nUUID-JMM.3.cs\t\t\t\t\tAllow UUID generation, internal plugin\\\n\\\na) The ability to get back a UUID. This uses the hosting UUID generator if the\\\n hosting OS supports it and we have a primitive we can call. If not then we generate\\\n a type 4 version of a UUID (the random bits one).\\\n(This requires a special change set)\\\n\\\nb) Ability to start squeak on the mac by dragging multiple documents onto the\\\nimage, or drag and drop of stuff onto the running VM icon.\\\n(This requires a special change set)\\\n\\\nc) Usage of the Internet Configuration tool kit to supply information about\\\nwhat the mac proxy is etc. etc.\\\n(This requires a special change set)\\\n\\\nd) Migrate file system to use 64 bits. This allows you to read/write and seek\\\nwith files > 2 GB. This includes a change to the VM to convert from/to long\\\nlong integers. It also allows the file system to actually deal with 2GB files,\\\nthe current file interface actually fails once the file exceeds 1GB.\\\n\\\ne) For the carbon based Squeak VM we now support long file names 255\\\ncharacters. Close both eyes and touch everywhere the mac VM deals with file\\\nname paths and hope for the best (Actually we write an Sunit to ensure we've\\\nnot broken everything). This also includes the ability to put an image in a\\\nlong file name directory, but right now the image name must stay under 32 characters.\\\n\\\nFilePlugin.c changes to support large integers.\\\nFilePlugin.h changes\\\nsq.h changes to support large files.\\\nsqConfig.h changes to resolve some conflicts.\\\nsqFilePluginBasicPrims.c  changes to support large files.\\\nsqMacAsyncFilePrims.c changes to use fspec versus 255 file path.\\\nsqMacDirectory.c changes to use hosting OS (OS-X) bsd create and delete directory\\\n and truncate. dir_look changes as part of the general rewrite.\\\nsqMacDragAndDrop.c use new call to get path name from fsspec. Use fsspec more, and added \\\n  interface code to setup drag and drop of items at application startup time. max document name\\\n  goes to 1000 characters.\\\nsqMacFileLogic.c Mostly rewrote!\\\nsqMacSecurity.c use new file calls.\\\nsqMacWindow.c \\\n\tincrease size of vmpath, docpath, imagepath to 1000 chars, shortname to 255 characters.\\\n\tadd logic for left/right modifier keys \\\n\treworked LoadLibViaPath logic \\\n\tsqImageFileOpen uses fsspec versus 255 path name.\\\n\tsqImageFileStartLocation uses ffspec.\\\n\tbundle support for bundles\\\n\t\\\ne2) interp.c supports get/put of large integers to long long integers.\\\ne3) fixed fTruncate\\\n\\\nHint getting this to work was a pain. Think of 255 character folder names and nested aliases,\\\nfolder 1 refers to folder 2 which then refers to folder 1 again, just go down the path say 8 times,\\\nthen ask to create a file or directory!\\\n\\\nf) Support to change the Mac screen resolution under Squeak control.\\\n\\\ng) Fix to unload/load the scrap at startup time to ensure the clipboard is\\\ncorrect when starting up the VM.\\\n\\\nh) Uncouple the shift key and left/right shift keys on old extended keyboard.\\\nAlso add a call to get which keys are currently pressed on a USB keyboard or\\\nthe USB codes for an apple non-usb keyboard. (Note this isn't working quite yet under OS-X)\\\n\\\ni) Changes to enable us to compile the VM under Apple's OS-X Project Builder\\\nenvironments.\\\n\\\nj) Some rewriting to ensure serial and midi support can be written as external\\\nplugins.\\\n\\\nk) Fiddling to get sound input to work under OS-X\\\n\\\nl) Platform.exports changed macintosh to macintoshSqueak to avoid conflict.\\\n\\\nm) Memory is allocated at 50MB at start, then will grow or shrink, verus previous carbon apps\\\n that did 1GB. \\\n \\\nn) sqPlatformSpecific.h changes to support long file names and os-x posix file names\\\n\\\no) sqVirtualmachine.c & sqVirtualmachine.h\\\n#if VM_PROXY_MINOR > 4\\\n\tVM->positive64BitIntegerFor = positive64BitIntegerFor;\\\n\tVM->positive64BitValueOf = positive64BitValueOf;\\\n\tVM->signed64BitIntegerFor = signed64BitIntegerFor;\\\n\tVM->signed64BitValueOf = signed64BitValueOf;\\\n#endif\\\n\\\nBeware this causes an interesting problem, if you compile plugins with VM_PROXY_MINOR now set to 5, then they will not work with older VMs. The solution is to define the VM_PROXY_MINOR in the plugin to the value that indicates what features it is using.\\\n\\\np) Changed to use ITimer logic as a 16ms lowres timer to improve performance\\\n\\\nq) Changed to use single thread, no thread manager.\\\n\\\nr) Changed to use lowres timer in checking for polling time to improve performance\\\n\\\ns) It should have faster startup times.\\\n\\\nt) It will hide the empty window at startup, then show the squeak window when required.\\\n\\\nu) It has a different menu structure.\\\n\\\nv) It does less I/O when navigating directories.\\\n\\\nThe macintosh 3.1Alpha1MT VM, Sept 24th 2001 \\\nThis VM was built with the base  3.1 image at change set #4347\\\nV3.1.1 at change set #4347\\\n\\\n\\\nWe go to V3.1.1 to indicate that the 3.1 VM is being used. In the past the 3.1 Image was used but some changes in the openGL logic makes  3.1 Vm and 3.0 image not quite work correctly with 3d graphics. Although a 3.1 VM will run many images way back to the 2x series no careful study has been done on the ability to do this. So at this point we are indicating this VM is a 3.1 VM and best used with a 3.1 image.\\\n\\\nUse of VMMaker to build VM. As of this version everything can be built as an external except for the window logic which hasn't been decoupled from the VM support for the macintosh. \\\n\\\n1) AsynchFilePlugin the security check for ability to create file is now a plugin call.\\\n2) B2DPlugin logic changes to fillLinearGradientfromtoat\\\n3) b3dRemapFaces, b3dRemapEdges, b3dRemapEdgeList, b3dRemapAET, b3dRemapEdgeVertices, b3dRemapFaceVertices, b3dRemapFaceFree, b3dRemapEdgeFree, b3dRemapAttributes. Some casting and changing of += to = + to make some compilers happy.\\\n4) BitBltPlugin added tableLookupat call.\\\n5) DropPlugin added setFileAccessCallback to allow the Security Module plugin the ability to give us the entry point to turn security off so we can open files as read only when security is turned on.  This was broken in the past. \\\n 6) FilePlugin added fileOpennamesizewrite,getThisSession to allow for callbacks. Changed the file security logic to use the plugin interface. \\\n7) interp.c, fixes for 4347ByteArrayRangeCheck-di, ability to printAllStacks, security calls for image rename, write to use plugin interface.\\\n8) Added GetAttributeString, and recordDragDropEvent and entry points for callbacks.\\\n9) SecurityPlugin changed when initialization is called to initialize the safe and unsafe directorys, also added entry points for all the testing calls so it can be a true plugin.\\\n10) Serialplugin. The serial plugin was redesigned to seperate out MIDI logic. People with MIDI devices and old serial macintosh should check to see if they still work since we lack equipment now to test this obsolete technology set.\\\n11) SocketPlugin. Make security calls true plugin calls.\\\n12 SoundGenerationPlugin. Removed \\\nEXPORT(int) SoundGenerationPlugin_primitiveFMSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveOldSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitivePluckedSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveWaveTableSoundMix(void);\\\nThey were a hack at the plugin level and discussion on the list seemed to show they were no longer used. \\\n13) Checking for if defined (__APPLE__) && defined(__MACH__) for the Mac OS-X native development environment\\\n14) Changed sqMacAsyncFilePrims, usage of interpreterProxy->, plugin calls for getThisSession. \\\n15) Changed sqMacDirectory.c. Removed some utility code and make it a seperate file so that it can be shared between sqMacWindow and other plugins that require them. \\\n16) Changed sqMacDragDrop.c. Added plugin callback for getSTWindow, the sqSetFileAccessCallback logic, fileOpennamesizewrite, and secHasFileAccess. Added logic to do the recordDragDropEvent callback to sqMacWindow.c \\\n17) sqMacNetwork.c. Some cleanup for the OS-X version of the OpenTransport headers, some constants have name changes\\\n18) sqMacNSPlugin.c Use of ioLoadFunctionFrom(NULL, \"DropPlugin\"); versus explicit call.\\\n19) sqMacOpenGL.c. Some cleanup for the OS-X version of the OpenGL headers\\\n20) sqMacOpenGLInfo.c. Some cleanup for the OS-X version of the OpenGL headers\\\n21) sqMacSecurity.c ioInitSecurity calls back to dragAndDrop plugin to set entry point to turn security off.  Added code to create directories if required and ensured callbacks are plugitized.\\\n22) sqMacSound.c Some cleanup for the OS-X version of the Sound headers. Use of interpreterProxy-> in the proper places.\\\n23) sqMacWindow.c Some cleanup for the OS-X version of the compiler.  Fixed saveAsEmbeddedImage, this got broken when we moved from a FAT to a ppc only application.  Altered interface to recordDragDropEvent so that it was plugable. Some file path name logic goes to a seperate C source file. The drag and drop plugin is loaded and intialized after the image is loaded but before the interpreter is started, before it was done a bit earlier in the startup process. This also has the effect of initializing the security module.\\\n24)sqOpenGLRenderer.c. Some cleanup for the OS-X version of the OpenGL headers\\\n25)SurfacePlugin.c gets a hack so it knows when it is internal versus external.\\\n\\\n\\\n\\\nv3.0.18 at change set #4081\\\n(Note browser plugin goes to 3.0.23\\\n\\\n1) sqMacOpenGL.c Quite a few changes were made to the code to support it as an internal plugin for the browser. This is because the drawable frame for a browser plugin is a subset of the browser's grafport, so lots more care must be taken to draw in the correct location using OpenGL. We also fixed issues with re-configurating the Open/GL draw area when the window gets resized or goes to full screen, and attempted to ensure multiple screens will work.\\\n\\\n2) sqMacWindow.c, minor fix to cast a constant char * to char * for CW 6.1\\\n\\\n\\\nBrowser plugin 3.0.23 fixes\\\n\\\n1) Integerated the H/W Acceleration as an builtin plugin\\\n2) Added logic for pre and post event interaction to browser plugin event handler for H/W Acceleration logic. The external H/W Acceleration plugin mostly works with the browser plugin but doesn't work with full screen mode, or if the plugin is embedded in a window or a scrollable frame, so don't use it. Use the browser plugin 3.0.23 or higher which has the H/W Acceleration builtin.\\\n\\\nv3.0.17 at change set #4081\\\n(Note browser plugin goes to 3.0.21)\\\n\\\n1) Added HW acceleration as internal plugin.\\\n2) 4079BBAlphaTextFix-ar Fixes the problem with alpha text, changes BitBltPlugin.c \\\n3) Added primitive on the mac to truncate a file.\\\n4) Added logic to flush volume on a flush file to ensure file and control blocks are flushed.\\\n5) For the Carbon VM we increase nextevent wait time if we get sufficent idle time. This should reduce CPU usage under OS-X\\\n6) GetAttribute: 1002 now returns the gestaltSystemVersion as a hex string, and getAttribute: 1003 now returns either '68K' or 'PowerPC'.\\\n7) Starting with 3.0.17 the VM is build only as a powerpc application. The latest VM as a 68K application will be made available from time to time permits based on people's needs. \\\n8) Changes to sqOpenGLRenderer.c to improve performance, OpenGL 1.1 support.\\\n\\\nPlugin 3.0.21 fixes\\\n\\\n1) added check for mailto: tag on posts to fix problem with Netscape crashing, and IE hanging.\\\n2) Plus above fixes.\\\n\\\nWhat has been fixed/changed.\\\nv3.0.16 at change set #4041\\\n(Note browser plugin goes to 3.0.20)\\\n\\\n1) Lots of fixes for BitBlt and HW acceleration.\\\n2) Hardware Acceleration plugin goes to 1.0.1. Please note there is a seperate plugin with the same name for Carbon. Doing a get info will identify if the plugin is only usable with Carbon Squeak.\\\n\\\nv3.0.15 at change set #4026 (May 17th test version)\\\n(Note browser plugin goes to 3.0.19)\\\n\\\n1) Added support for OpenGL HW acceleration plugin\\\n\\\nPlugin 3.0.19 fixes\\\n\\\na) Obey embedded tag plug\\\nb) Fix problem with plugin 3.0.17 not working with netscape 4.x\\\nc) Carbonize plugin for IE 5.1 \\\nd) Remove debugging printf than occurred on transition to full screen mode\\\n\\\nWhat has been fixed/changed.\\\nv3.0.14 at change set #3987\\\n\\\n(Note plugin goes to 3.0.17)\\\n\\\n1) sqMacDirectory.c. The pathlookup would handle the case of foo:bar::do incorrectly by ignoring the :: path redirection. This has been fixed. However a path lookup will not work if it contains :: and an aliased directory in the middle of the path.\\\n\\\n2) sqMacSecurity.c. The pathname for the untrustedUserDirectory was built incorrectly, and the bug mentioned above in sqMacDirectory.c usually kept this from being noticed.\\\n\\\n3) sqMacWindow.c  we added some logic to do the delay for primitiveRelinquishProcessor, but found it had an large effect on a freecell benchmark. I suspect on a Morpic step wait there is nothing to do so primitiveRelinquishProcessor gets called which then affects response time. So for now we revert to the 3.0.11 behavior, good performance and 100% CPU usage!\\\n\\\n4) GetAttribute 1004 returns returns interpreterVersion; which is for example\\\n\"Squeak3.1alpha of 6 February 2001 [latest update: #3987]\"\\\n\\\n5) When in full screen mode we now attempt to disable resizing, zooming, or moving the window. The window borders are hidden, but in the past it was feasible to grab an edge and alter it, thus confusing the VM.\\\n\\\n6) Worked on Carbonizing the browser plugin\\\n\\\n7) 3977 & 3978 FloatArray fixes. Makes float arrays go through a new (and working) version of #primitiveHash\\\n\\\n8) Fixed problem with accidental mouse clicks being triggered from pulldown menus on application switching.\\\n\\\n9)\\\n\"Change Set:\t\t3984 BitBltExtensions-ar\\\nDate:\t\t\t4 May 2001\\\nAuthor:\t\t\tAndreas Raab\\\n\\\nThe change set includes various extensions for BitBlt with the goal of migrating the useful features from FXBlt into the general BitBlt mechanisms. These include:\\\n\\\n* Handling of LSB and MSB forms:\\\nBitBlt now handles both, MSB and LSB forms (and their conversions). Only instances of Bitmap are assumed to contain big-endian pixels. All others are assumed to be little endian (reason is that we can only identify Bitmap here). Note that 'LSB' and 'MSB' refers to PIXELS, that is a 1bpp LSB form has its left most pixel in the lowest bit whereas a 1bpp MSB form has its left-most pixel in the highest bit.\\\n\\\nFor pixel depths < 8 this can be different from what your OS supplies (as an example, Windows bitmaps < 8 are big-endian pixels in little-endian words; we might call them 'middle-endian'). We simply don't deal with those - forms are either big or little endian but nothing inbetween.\\\n\\\nBitBlt has got an extra combination rule for swapping pixels in the destination form. This can be used to make byte swapping much more efficient (as soon as we've got more VMs with support for it).\\\n\\\n* Handling of 'native bitmaps' (aka surfaces):\\\nBitBlt is now able to deal with OS surfaces that are registered with the surface plugin.\\\n\\\n* Handling of full color maps:\\\nBitBlt has been extended to deal with instances of ColorMap in addition to the prior mechanism of using only indexed lookups and provide an implicit 16-32 bit color conversion. ColorMaps can specify both, a lookup table and an additional set of masks and shifts to apply during the color mapping operation. \\\n\\\nFour independent shifts and masks can be given which can be used for a lot more than just color conversion (as an example, one could do byte swapping with this; but see also BitBlt class>>exampleColorMap). \\\n\\\n* Better handling of default arguments:\\\nFor most of the required arguments for BitBlt very reasonable default assumptions can be made. This includes the destOrigin (0@0), clipRect (0@0 extent: destForm extent), sourceOrigin (0@0). BitBlt now substitutes these if they are absent (e.g., nil) in the instance provided.\\\n\\\n\"\\\n\\\n\\\nv3.0.13 at change set #3848\\\n\\\n1) sqMacSecurity was changed to set the unsecure directory to\\\n\tsystem folder:Preferences:Squeak:Internet:My Squeak\\\n\\\nv3.0.12 at change set #3848\\\n1) Fixed problem with creating My Squeak Folder in Documents Folder with System 8.6\\\n\\\nWhat has been fixed/changed.\\\nv3.0.11 at change set #3848\\\n\\\n1) sqMacDirectory had a bug when you resolved a path name. The fast resolve always failed, which invoked the slow resolver. Now the fast resolver works.\\\n\\\n2) sqMacSecurity was changed to set the unsecure directory to Documents:My Squeak. \\\n\\\n3) sqMacWindow was changed to fix some issues with Squeak capturing events from other applications and to reduce the number of duplicate mouse events that are generated. Also we capture modifier information  directly from the mouse and keyboard on null events to fix some problems with Carbon. We  hopefully fixed problems with mouse clicks from foreground applications being seen by Squeak and issues with the OS-X Dock clicks.\\\n\\\n4) sqMacNSPlugin was changed to use the above mouse/keyboard capture code which is much cleaner than the original fix for the bogus modifier information given to us by netscape on a null event. \\\n\\\n5) When you turn full screen off we now correctly reposition the window to the original location versus a few pixels to the left. \\\n\\\nWhat has been fixed/changed.\\\nv3.0.10 at change set #3848\\\n\\\n1) changed VM exception unwind logic\\\n\t3796-Exception-unwind-V3,tim@sumeru.stanford.edu, Paul McDonough, Stephen Pair and others\\\n\\\n2) Fixes for the JPEGReader plugin and for Jitter 3\\\n\\\n3) Added minimal Mac VM logic to assist in building a small VM.\\\n\\\n4) Changed how the browser plugin starts up. Now it starts the interpreter running only after getting the browser setwindow command. This seems to fix a race condition that resulted in a crash at startup time with Netscape 4.x\\\n\\\n5) Fixed broken full screen redraw on cmd-tab\\\n\\\n6) Fixed what looked like mouse-down, mouse-down, mouse-up sequence. Now reports mouse-down, mouse up.\\\n\\\n7) Added StarSqueak plugin as internal plugin\\\n\\\n8) Note the current Squeak Plugin should be gotten from the www.squeakland.org site.\\\n\\\nv3.0.9 at change set #3776, Boston Snow storm build.\\\n\\\n1) A number of changes were made to the interpreter:\\\n\ta) added primitive to change a class.\\\n\tb) added primitives to get or put 32bit integers\\\n\tc) Fix problem with GC and class reshaping\\\n\td) Better logic for method cache flushing\\\n\\\n2) Added JPEGReader plugin\\\n\\\n\\\nV3.0.8 at change set #3740\\\n\\\n1) The caps lock no longer maps to the shift attribute. So if the caps lock is down mouse clicks will behave normally. \\\n\\\n2) Numerous fixes for the BitBltPlugin plugin\\\n\\\n3) Memory allocation grow/shrink logic for Carbon was added.\\\n\\\n4) Spurious mouse clicks for the browser plugin has been fixed. (This took awhile to fix, I'm sure it's a bug with the Swedish version of Netscape)\\\n\\\n5) The browser plugin will attempt first to allocate memory from the browser heap, then the system heap. Most people when faced with a memory issue usually increase memory for the browser first. However memory for the plugin is controlled by an attribute in the EMBED HTML statement. \\\n\\\nV3.0.7\\\n\\\n1) A bug exists in pre OS 8.x that causes a crash in activate window if the standard get file \\\ndialog comes up before the Squeak Window. I remove the InvalWindow call found in that routine since it is actually redundant.\\\n\\\n2) The standard get file dialog on system 7.x would not terminate if you did a cancel.\\\n\\\n3) The InterfaceLib had to be weak linked to prevent CFM startup issues. \\\n\\\nV3.0.6\\\n\\\n1) Alias resolving is less aggressive.\\\n\\\n2) We no longer cache image reads or writes. This was done because OS 9.1 allows you to have very large disk caches, and it's pointless to cache the image read or write.\\\n\\\n3) The file flush primitive now actually flushes the file via an OS call. This was a bug in the CodeWarrior 5.3 source code.\\\n\\\n4) The 68K version was being built with the 68881 math library. This fails on 68040LC chips. We now use the non-68881 math library. Thanks to Bruce ONeel for find this.\\\n\\\n5) A bug was found in the path resolving logic that was added for 3.x. This bug apparently only affects 68K machines,  never was identified as a PowerPC issue. \\\n\\\n6) The Netscape plugin needs a properly allocated clip region, this code seemed to work ok on new systems, but fails on system 7.6.1\\\n\\\n7) The security interface will create a Documents folder on the root volume if the default Document folder has been deleted. This is needed for security purposes. \\\n\\\n8) Jitter needs 1MB of free memory to run.\\\n\\\n9) 68K machines require another 32K of stack\\\n\\\n10) Threads  now work on 68K machines, but turned off because of possible performance issues. (I think more study is needed).\\\n\\\n11) The 68K version was compiled with better optimization, expect a 15% improvement.\\\n\\\n12) fix for BitBltPlugin ascii = byteAt((sourcePtr + charIndex) - 1);\\\n\\\n13) The interpreter object validation checking code was alter to work correctly.\\\n\\\nV3.0.5\\\n\\\n1) sqConfig.h changed due to BE OS header changes\\\n\\\n2) sqMacDirectory.c. Added support for Navigation services or Standard File Get to find the image at startup time when the Squeak.image is not found by the VM. This replaces the DOS like console message that comes up saying that Squeak can't find a image.\\\n\\\n3) A fix to drag and drop for the browser plugin.\\\n\\\n4) We now use Apple's cooperative multithreading package to run the UI in one thread, the VM in the other. This solves some issues with the browser and makes the UI versus VM logic and execution responsibilities easier to understand. \\\n\\\n5) Changed the sqMacNSPlugin.c code to support a 3.0VM using multithreading support. This should give Squeak in a browser better performance. Also changed the full screen support to correctly work with multiple monitors.\\\n\\\n6) BitBltPlugin.c gets one more op code\\\n\\\n7) Added the security interface\\\n\\\n8) Added the file flush primitive\\\n\\\n9) Rewrote the macintosh readme file\\\n\\\n10) Revisited the zoomWindow code and found a bug with multiple monitor support, then I fixed the code to make Full Screen mode work on screen that Squeak window is mostly on, versus the menubar screen. Also if you switch from full screen back it resizes the window back to the orginal size and location before you invoked the full screen. \\\n\\\nV3.0.2\\\nPlugins\\\n\\\nRecompiled the internal BitBltPlugin plugin to encorporate:\\\nChange Set:\t\t258AlphaBlendOpt-dsm\\\nAuthor:\t\t\tDuane Maxwell, Paul Phillips/exobox\\\na) Short circuits full opaque and full transparent pixels when alpha blending.\\\n\\\nRecompiled the internal LargeIntegerPlugin\\\n3298LargeIntegersV1-2-sr -- Stephan Rudlof -- 29 November 2000\\\n3299LargeIntV1-2For29-sr -- Stephan Rudlof -- 29 November 2000\\\n\\\nVM Software\\\n\\\n(b) PowerManagement for macintosh is now supported. You can disable the power manager to give you better performance on some powerbooks at the expense of battery life. See the Preferences Panel for details, category 'Performance'\\\n- changed sq.h\\\n- changed sqMacWindow.c to add support for power mgr disabling\\\n\\\n(c) Drag and Drop support for the macintosh, dragging files from the Finder to the Squeak window is now supported.\\\n- sqMacDragDrop.c added\\\n- sqMacWindow.c changed\\\n\\\n(d) Added primitive for get macintosh creator and file type.\\\n- sqMacDirectory.c changed\\\n\\\n(e) Carbon support. Thanks to Karl Goiser karl@wattle.net for work he did on sound and other Carbonization hotspots.\\\n- sqMacAsyncFilePrims.c changed\\\n- sqMacFFIPPC.c changed (not supported for Carbon)\\\n- sqMacNetwork.c changed per Apple tech note 1173 Carbon asset tracking\\\n-sqMacSerialAndMIDIPort.c chnaged (Not supported for Carbon)\\\n- sqMacSound.c changed per Apple tech note 1198 Carbon double sound buffer playing\\\n- sqMacWindow.c changed (various changes for Carbon)\\\n\\\n(f)  Poll at least 60 times a second for the mouse if required. Previous 2.9.x VM did it 30 times but this is too slow and 2.8.x VM do it 60 times a second.\\\n\\\n(g) Reworked path support Thanks to Karl Goiser karl@wattle.net for starting this.\\\n- sqmacDirectory.c changed reworked lookupPath\\\n- sqMacWindow.c changed, added GetApplicationDirectory to get application directory\\\n\\\n(h) I rewrote the sqMacDirectory.c logic to enable proper understanding of Apple's Alias logic. This means for example you can alias the \"SqueakV3.sources\" file and then only have one copy and have all your images point to it. \\\n\\\n(i) Added Zoom Window support.\\\n\\\n(j) Change the Squeak change file icon to better match Apple's visual guidelines, Thanks to Doug Way for the suggestion and the new icons.\\\n\\\n(k) The sound plugins have changed...\\\n\\\n(j) Dropped FFI out of the base Squeak because of security concerns\\\n\\\n(k) Compiled for 750(G3) processor versus 603\\\n\\\n(l) Added screenDepth primitive\\\n\\\nThe 3.0.x VM contains most of the optional plugins, you might want to check this by inspecting \"Smalltalk listBuiltinModules\" to see where your plugins are coming from. In some case people have been accidentally overriding the new builtin plugins with older plugins. \\\n\\\nThe file \"Squeak 3.0Alpha10MT.sig\" contains the PGP signature for the Squeak 3.0Alpha10MT VM\\\n\\\nJohn M McIntosh  johnmci@smalltalkconsulting.com\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n}"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Documentation/3.2.7 Release Notes.rtf",
    "content": "{\\rtf1\\mac\\ansicpg10000\\cocoartf100\n{\\fonttbl\\f0\\fnil\\fcharset77 Geneva;\\f1\\fnil\\fcharset77 LucidaGrande;\\f2\\fswiss\\fcharset77 Helvetica;\n}\n{\\colortbl;\\red255\\green255\\blue255;}\n\\margl1440\\margr1440\\vieww17300\\viewh12720\\viewkind0\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0\\fs24 \\cf0 Mac VM 3.2.7 mach-o build for Carbon, and build for Classic.\\\nMay 31st, 2002 (3.2.7b6)\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f1 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\nNotes About previous VM.\\\n3.2.6 VM classic have an issue when the tickcount clock goes over 0x7FFFFFFF, about 24 days. \\\nThis exhibits it self as Squeak won't accept user input, or allow you to switch under os 9 or earlier.\\\nStarting a Squeak image hangs durning the screen painting.\\\nRestarting the mac solved these problems. Force quit does not.\\\nThis is fixed in 3.2.7b3\\\n\\\nFor 3.2.7\\\n\\\n3.2.7b3 We build the VM using patchs to enable globals as a structure. This improves performance by 10%\\\n\\\na) Classic Vm builders might need to add \"struct foo *foo = &fum; \"  to int interpret(void). \\\nb) readme: add notes about changesets and alter build instructions\\\nc) sqMacFileLogic.c: use accessors for interp.c globals\\\nd) sqMacMain.c: use accessors for interp.c globals. Also Alain Fischer added logic to fetch os-x version number and to enable you to put squeak.image in the resource folder for autostarting.\\\ne) sqMacTime.h: Fix busted lowresclock again. After 24 days of mac uptime, 3.2.6 squeak will hang.\\\nf) sqMacUIEvents.h: use accessors for interp.c globals.\\\ng) sqPlatformSpecific.h: alter sqFTruncate to use fileno() as needed.\\\nh) sqMacWindow.c: use accessors for interp.c globals.\\\ni)  3.2.7b5 sqMacFileLogic.c: change vmpath to resolve to classic VM if vm is moved from MacOSClassic folder\\\nj) Misc changes for Netscape plugin support\\\nk) Introduce osExports.c logic\\\nl) 3.2.7b6 Fixed a problem in path name resolving need to use UTF8 to properly interact with high ascii characters\\\nm) 3.2.7b6 Fixed a problem in path name resolving there was a bug with certain types of alias path name combinations in quick name resolving.\\\n\\\nMac VM 3.2.6 mach-o build for Carbon, and build for Classic.\\\nMarch 14th, 2002\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f1 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\nNotes About previous VM.\\\n3.2.6b6 Classic or earlier has a bug that makes it stop collecting user input on a 19.88 hour cycle depending on reboot time.\\\n\tSeems many systems don't run for more than 19 hours so we've not had major complains about this issue. \\\n\tBug was introduced in 3.2.1.\\\n3.2.5 has a bug that prevents the use of accented characters without \\\n\ta image patch to fix a VM issue (not an issue in 3.2.4). Also you can't enter an double keystroke characters, ie ^ \\\n\twhich makes life difficult. It also does not support the AppleScript Plugin (not an issue in 3.2.4)\\\n3.2.4 a bug in project builder introduced a performance problem (bad compiler options).\\\n\\\nSee the 3.2.5 about why this 3.2.6 is different inside.\\\n\\\nFor 3.2.6:\\\na) Change an internal number that dictates how often pending interrupts should be looked at from 5ms to 3ms This improves \\\ndelay accuracy.\\\nb) Change how sleeping is done when squeak is idle. This reduces CPU consumption, and improves Delay accuracy.\\\nc) Fix bug with high bit problem with keyboard (accented characters are ok now)\\\n  c2) 3.2.6b6 has fixed characters that require multiple key strokes to enter.\\\nd) Externals that make UI interactions (IE AppleScript) Must now make a call back to the VM to schedule\\\n    the main thread to do the call that will invoke UI interaction to prevent a deadlock in Carbon between threads. \\\n   See the OSAExecute call in the AppleScript plugin for details.\\\ne) If you run a classic mac VM more than 23.x days nonstop it will stop responding to UI events.  Ensure clocks get anded with 536870911.\\\nf) signal inputSemaphoreIndex because we are mulithreaded. Not that it does anything for us yet...\\\ng) 3.2.6b6 Pass the unicode value of the keystroke up as the EventKeyDown/EventKeyUp data, versus mackeyboard code.\\\nh) Somewhere there is a bug with mktime + time, so use the unix code of time+localtime+gmt \\\ni) Change iorelinquishPrcessorForMicroseconds to sleep the quatum between now and wakeup time. Also schedule a\\\n   check for interrupts if wakeup time is now or in the past. This improves delay accuracy. For OS-x this was a big deal,\\\n   for os-9 it improves things by 1 or 2ms. Also in  os-x we sleep more when idle so CPU usage goes down.\\\nj) On OS-9 umap AND free the VM backing store. Just doing the free doesn't work and you lose 128Mb of disk space until you reboot\\\nk) 3.2.6b7 for post event processing ignore mouse move/drag/or scroll wheel events. These are ignored by the open/gl plugin and only suck a major amount of CPU time to process in the post event processing logic. \\\nl) 3.2.6b8 (3.2.6b4 classic) removed call to uncouple shift keys introduced in 3.2.1. This causes some macs after sleeping not to respond to keyboard input\\\nm) 3.2.6b8 (3.2.5b7 classic) added function for ioLowResMSecs to avoid early bit overflow. Rework clock checking in ioHandleEvents to handle clock rollovers properly.\\\n\\\nMac VM 3.2.5 mach-o build for Carbon, and build for Classic.\\\nMarch 4th, 2002\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f1 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\n\\\nBeware this version of the VM is significantly different inside! \\\n\\\n\\pard\\tx1440\\tx2880\\tx4320\\tx5760\\tx7200\\ql\\qnatural\n\n\\f2 \\cf0 a) Broke sqMacWindow.c into 10 different files by function type.\\\n\\\nb) Moved most of the memory allocation logic out of sqMacMain.c into sqMacMemory.c. and ensure memory is freed when Squeak is terminated. \\\nThe major change in this code is support for OS 9.x virtual memory mapping. This only applies to Mac OS 9.2.0 or higher, excluding os-x. It appears  Mac OS 9.1 has a bug that prevents this feature from working.\\\n\\\nFor images that require less than 128MB of memory, mapping is used to allow the image to grow/shrink to the 128MB boundary, therefore you can change the application memory size to about 2MB. \\\n\\\nFor images that require more than 128MB then change the application memory size to > 128MB and mapping will not occur. \\\n\\\nIf mapping is not available because virtual memory is turned off or the api is not supported by the macintosh OS then mapping is not used. Note that mapping is not support under the classic os-9.x environment under OS-X, however in this case you should be using the OS-X version of Squeak, not the classic version.\\\n\\\nc) Use of Carbon event logic for OS-X only. This is a major structural change. \\\n\\\nIt also encouraged the use of a pthread for interp.c. \\\n\\\nAll user interaction with the VM follows a new code path, so problems with keyboard or mouse input should be reported asap. Also any issues with application switching, windows being brought to the foreground or sent to the background and usage of the full screen logic should be reported asap.\\\n\\\nAs part of this change I have build in support for scroll-wheeled multi-button mice under os-x. Thanks to Doug Way for testing this for me. Maybe someone can post to the list what their favorite 3 button scroll wheeled mouse/trackball is.\\\n\\\nd) Use of a carbon call to get the dominate Device if you have multiple screens. People with multiple screens should confirm window resizing, full screen on/off works as expected.\\\n\\\ne) Corrected comment in sqMacFileLogic.c\\\n\\\nf) Changes to sqMacNSPlugin.c. This makes it compile, but it's not usable yet.\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 \\\n\\\nFeb 20th 2002 3.2.4\\\n\\\nFor this version of the VM I have migrated towards using OS-9 packages. This allows us to provide one \\\nfolder/package that supports os-x and previous operating system versions.\\\n\\\nGiven Squeak 3.2.4Beta1.app\\\nThe classic VM is found in the *.app:Contents:MacOSClassic, with an alias in *.app:\\\nThe mach-o OS-X VM is found in *.app.Contents:MacOS\\\n\\\nIf you are running OS-9 then clicking on the *.app or doing drag and drop will just run Squeak, same applies for OS-X.\\\nIf you are running OS-7.5.5 or OS-8.x then the *.app package will appear as a folder, just open and click on the alias within. \\\nNote that if you want to use classic plugins I suspect you need to put them in the MacOSClassic Folder beside the VM. \\\nBundles for os-x go in the same location as the *.app application package.\\\n\\\nChanges\\\na) Drag and drop at open time with image file that has no meta type, will now open the image, versus prompting you.\\\nb) Use an os-x window attribute at open time to signal that the window should not be moved by the dock when you go to full screen.\\\nc) Fix window update logic to use window that needs updating versus stwindowg to fix issues with print dialog windows in classic. \\\nd) bitblt gets recompile to pickup fixes posted in 3.2 update stream.\\\n\\\nFeb 5th 2002 3.2.3\\\nChanges\\\n\\\na) use old extended time manger to update psudeo-TickCount, versus sigalrm. siglarm make sound recording not work.\\\nb) fiddle with sound recording and make it work.\\\n\\\nJan 2002 3.2.2\\\nChanges:\\\n\\\na) AsyncFilePlugin.c Use global to remember security function entry point for performance reasons\\\nb) FilePlugin.c\tUse global to remember security function entry point for performance reasons\\\nc) interp.c Use squeakFileOffsetType versus off_t and add a bunch of checks to handle lack of long long and conversion errors between 64/32 bit integers and LargeInteger objects\\\nd) readme, it's http://www.mucow.com/Gnuifier.1.cs \\\ne) SocketPlugin.c\tUse global to remember security function entry point for performance reasons\\\nf) sq.h added default sqFilenameFromStringOpen and sqTruncate\\\ng) sqFilePluginBasicPrims.c revert to anti specs, but ensure #def to fseeko and ftello for 64 bit aware file systems.\\\nh) sqMacDirectory.c A bit more error checking on bad file names\\\ni) sqMacFileLogic.c Folders size is now zero in classic, and a bit more checking on bad file names\\\nj) sqMacSound.c Fixed a problem with sound recording in classic due to a change made in Sept. But sound recording still does not work under os-x\\\nk) sqMacWindow.c  two very important changes:\\\n\\\n\t1) You can now do FFI calls with the FFI bundle plugin to Mach-o frameworks. \\\n\tHowever you need to rework your api calls. For example:\\\n\tapiGetMousePoint: aMacPoint was\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'InterfaceLib'>\\\n\tIt now is:\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'Carbon.framework'>\\\n \t\\\n\tIf you review /System/Library/Frameworks I'm sure you can come up with interesting ways to \\\n\tmake mac only squeak images.\\\n\t\\\n\tI now use map( NULL, gMaxHeapSize, PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED,-1,0);\\\n\tanonymous memory mapping to 512MB as the squeak memory block. The VM can then grow or shrink\\\n\twithin the 512MB block, I just move a pointer. \\\n\t\\\n\tNote in 3.2.1 a slight error on my part restricted Squeak to 50MB. I am of course\\\n\tinterested to hear about issues with my choice of 512MB. Note a Squeak VM is limited to 2GB under perfect \\\n\tconditions, however if any part of the image crosses the 2GB boundary the VM will fail, right now 512MB\\\n\tseemed a safe choice.\\\n\t\\\n \tPhysMem:  60.2M wired, 78.6M active,  412M inactive,  551M used,  217M free\\\n\tVM: 3.03G + 55.3M   7847(0) pageins, 1(0) pageouts   \\\n\tPID COMMAND      %CPU   TIME   #TH #PRTS #DREGS RPRVT  RSHRD  RSIZE  VSIZE\\\n\t422 Squeak VM    0.8%  0:35.59   2    71   100  23.3M  8.53M  26.5M   571M\\\n\\\n\tbut I only have one 80,000,000 byte swap file in /var/vm\\\n\\\nNote if you turn crash reporter on, then if the VM crashes a nice report should be generated in your log directory.  See the Apple documentation for a description of this feature, currently it is set in OS-X 10.1.x via the preferences window for the Console Application. If you have a crash with this VM, please recreate and post the crash log (found in Users/foobar/Library/Logs/ to the Squeak mailing list so we can continue to make the VM fault tolerant.\\\n\\\n3.2.1 Notes\\\n\\\nYou might need these change sets to build a new VM or to use all the features of this VM with your image, hopefully these will get into the pending 3.2.x image.\\\n\\\nFixes and feature extensions.\\\nAsyncFileFixFu...hName-JMM.1.cs \tfix for async test method.\\\nDragAndDropAtStart-JMM.5.cs\t\tfix to enable drag and drop at startup\\\n\\\nNeeded to compile a VM with VMMaker\\\nLargeFiles-JMM.3.cs\t\t\t\tEnable large file support, files > 2GB\\\n\\\nNeeded to turn this feature on\\\nMacLongFileName-JMM.5.cs\t\t\tEnable long file names on the mac\\\n\\\nThe SUnit\\\nMacLongFileNamesSUnits-JMM.3.cs\tTest long file names and long directory names and large file support\\\n\\\nKinda optional features some people might need.\\\nInternetConfiguration-JMM.5.cs\t\tAllow internet configuration information access, internal plugin\\\nUUID-JMM.3.cs\t\t\t\t\tAllow UUID generation, internal plugin\\\n\\\na) The ability to get back a UUID. This uses the hosting UUID generator if the\\\n hosting OS supports it and we have a primitive we can call. If not then we generate\\\n a type 4 version of a UUID (the random bits one).\\\n(This requires a special change set)\\\n\\\nb) Ability to start squeak on the mac by dragging multiple documents onto the\\\nimage, or drag and drop of stuff onto the running VM icon.\\\n(This requires a special change set)\\\n\\\nc) Usage of the Internet Configuration tool kit to supply information about\\\nwhat the mac proxy is etc. etc.\\\n(This requires a special change set)\\\n\\\nd) Migrate file system to use 64 bits. This allows you to read/write and seek\\\nwith files > 2 GB. This includes a change to the VM to convert from/to long\\\nlong integers. It also allows the file system to actually deal with 2GB files,\\\nthe current file interface actually fails once the file exceeds 1GB.\\\n\\\ne) For the carbon based Squeak VM we now support long file names 255\\\ncharacters. Close both eyes and touch everywhere the mac VM deals with file\\\nname paths and hope for the best (Actually we write an Sunit to ensure we've\\\nnot broken everything). This also includes the ability to put an image in a\\\nlong file name directory, but right now the image name must stay under 32 characters.\\\n\\\nFilePlugin.c changes to support large integers.\\\nFilePlugin.h changes\\\nsq.h changes to support large files.\\\nsqConfig.h changes to resolve some conflicts.\\\nsqFilePluginBasicPrims.c  changes to support large files.\\\nsqMacAsyncFilePrims.c changes to use fspec versus 255 file path.\\\nsqMacDirectory.c changes to use hosting OS (OS-X) bsd create and delete directory\\\n and truncate. dir_look changes as part of the general rewrite.\\\nsqMacDragAndDrop.c use new call to get path name from fsspec. Use fsspec more, and added \\\n  interface code to setup drag and drop of items at application startup time. max document name\\\n  goes to 1000 characters.\\\nsqMacFileLogic.c Mostly rewrote!\\\nsqMacSecurity.c use new file calls.\\\nsqMacWindow.c \\\n\tincrease size of vmpath, docpath, imagepath to 1000 chars, shortname to 255 characters.\\\n\tadd logic for left/right modifier keys \\\n\treworked LoadLibViaPath logic \\\n\tsqImageFileOpen uses fsspec versus 255 path name.\\\n\tsqImageFileStartLocation uses ffspec.\\\n\tbundle support for bundles\\\n\t\\\ne2) interp.c supports get/put of large integers to long long integers.\\\ne3) fixed fTruncate\\\n\\\nHint getting this to work was a pain. Think of 255 character folder names and nested aliases,\\\nfolder 1 refers to folder 2 which then refers to folder 1 again, just go down the path say 8 times,\\\nthen ask to create a file or directory!\\\n\\\nf) Support to change the Mac screen resolution under Squeak control.\\\n\\\ng) Fix to unload/load the scrap at startup time to ensure the clipboard is\\\ncorrect when starting up the VM.\\\n\\\nh) Uncouple the shift key and left/right shift keys on old extended keyboard.\\\nAlso add a call to get which keys are currently pressed on a USB keyboard or\\\nthe USB codes for an apple non-usb keyboard. (Note this isn't working quite yet under OS-X)\\\n\\\ni) Changes to enable us to compile the VM under Apple's OS-X Project Builder\\\nenvironments.\\\n\\\nj) Some rewriting to ensure serial and midi support can be written as external\\\nplugins.\\\n\\\nk) Fiddling to get sound input to work under OS-X\\\n\\\nl) Platform.exports changed macintosh to macintoshSqueak to avoid conflict.\\\n\\\nm) Memory is allocated at 50MB at start, then will grow or shrink, verus previous carbon apps\\\n that did 1GB. \\\n \\\nn) sqPlatformSpecific.h changes to support long file names and os-x posix file names\\\n\\\no) sqVirtualmachine.c & sqVirtualmachine.h\\\n#if VM_PROXY_MINOR > 4\\\n\tVM->positive64BitIntegerFor = positive64BitIntegerFor;\\\n\tVM->positive64BitValueOf = positive64BitValueOf;\\\n\tVM->signed64BitIntegerFor = signed64BitIntegerFor;\\\n\tVM->signed64BitValueOf = signed64BitValueOf;\\\n#endif\\\n\\\nBeware this causes an interesting problem, if you compile plugins with VM_PROXY_MINOR now set to 5, then they will not work with older VMs. The solution is to define the VM_PROXY_MINOR in the plugin to the value that indicates what features it is using.\\\n\\\np) Changed to use ITimer logic as a 16ms lowres timer to improve performance\\\n\\\nq) Changed to use single thread, no thread manager.\\\n\\\nr) Changed to use lowres timer in checking for polling time to improve performance\\\n\\\ns) It should have faster startup times.\\\n\\\nt) It will hide the empty window at startup, then show the squeak window when required.\\\n\\\nu) It has a different menu structure.\\\n\\\nv) It does less I/O when navigating directories.\\\n\\\nThe macintosh 3.1Alpha1MT VM, Sept 24th 2001 \\\nThis VM was built with the base  3.1 image at change set #4347\\\nV3.1.1 at change set #4347\\\n\\\n\\\nWe go to V3.1.1 to indicate that the 3.1 VM is being used. In the past the 3.1 Image was used but some changes in the openGL logic makes  3.1 Vm and 3.0 image not quite work correctly with 3d graphics. Although a 3.1 VM will run many images way back to the 2x series no careful study has been done on the ability to do this. So at this point we are indicating this VM is a 3.1 VM and best used with a 3.1 image.\\\n\\\nUse of VMMaker to build VM. As of this version everything can be built as an external except for the window logic which hasn't been decoupled from the VM support for the macintosh. \\\n\\\n1) AsynchFilePlugin the security check for ability to create file is now a plugin call.\\\n2) B2DPlugin logic changes to fillLinearGradientfromtoat\\\n3) b3dRemapFaces, b3dRemapEdges, b3dRemapEdgeList, b3dRemapAET, b3dRemapEdgeVertices, b3dRemapFaceVertices, b3dRemapFaceFree, b3dRemapEdgeFree, b3dRemapAttributes. Some casting and changing of += to = + to make some compilers happy.\\\n4) BitBltPlugin added tableLookupat call.\\\n5) DropPlugin added setFileAccessCallback to allow the Security Module plugin the ability to give us the entry point to turn security off so we can open files as read only when security is turned on.  This was broken in the past. \\\n 6) FilePlugin added fileOpennamesizewrite,getThisSession to allow for callbacks. Changed the file security logic to use the plugin interface. \\\n7) interp.c, fixes for 4347ByteArrayRangeCheck-di, ability to printAllStacks, security calls for image rename, write to use plugin interface.\\\n8) Added GetAttributeString, and recordDragDropEvent and entry points for callbacks.\\\n9) SecurityPlugin changed when initialization is called to initialize the safe and unsafe directorys, also added entry points for all the testing calls so it can be a true plugin.\\\n10) Serialplugin. The serial plugin was redesigned to seperate out MIDI logic. People with MIDI devices and old serial macintosh should check to see if they still work since we lack equipment now to test this obsolete technology set.\\\n11) SocketPlugin. Make security calls true plugin calls.\\\n12 SoundGenerationPlugin. Removed \\\nEXPORT(int) SoundGenerationPlugin_primitiveFMSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveOldSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitivePluckedSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveWaveTableSoundMix(void);\\\nThey were a hack at the plugin level and discussion on the list seemed to show they were no longer used. \\\n13) Checking for if defined (__APPLE__) && defined(__MACH__) for the Mac OS-X native development environment\\\n14) Changed sqMacAsyncFilePrims, usage of interpreterProxy->, plugin calls for getThisSession. \\\n15) Changed sqMacDirectory.c. Removed some utility code and make it a seperate file so that it can be shared between sqMacWindow and other plugins that require them. \\\n16) Changed sqMacDragDrop.c. Added plugin callback for getSTWindow, the sqSetFileAccessCallback logic, fileOpennamesizewrite, and secHasFileAccess. Added logic to do the recordDragDropEvent callback to sqMacWindow.c \\\n17) sqMacNetwork.c. Some cleanup for the OS-X version of the OpenTransport headers, some constants have name changes\\\n18) sqMacNSPlugin.c Use of ioLoadFunctionFrom(NULL, \"DropPlugin\"); versus explicit call.\\\n19) sqMacOpenGL.c. Some cleanup for the OS-X version of the OpenGL headers\\\n20) sqMacOpenGLInfo.c. Some cleanup for the OS-X version of the OpenGL headers\\\n21) sqMacSecurity.c ioInitSecurity calls back to dragAndDrop plugin to set entry point to turn security off.  Added code to create directories if required and ensured callbacks are plugitized.\\\n22) sqMacSound.c Some cleanup for the OS-X version of the Sound headers. Use of interpreterProxy-> in the proper places.\\\n23) sqMacWindow.c Some cleanup for the OS-X version of the compiler.  Fixed saveAsEmbeddedImage, this got broken when we moved from a FAT to a ppc only application.  Altered interface to recordDragDropEvent so that it was plugable. Some file path name logic goes to a seperate C source file. The drag and drop plugin is loaded and intialized after the image is loaded but before the interpreter is started, before it was done a bit earlier in the startup process. This also has the effect of initializing the security module.\\\n24)sqOpenGLRenderer.c. Some cleanup for the OS-X version of the OpenGL headers\\\n25)SurfacePlugin.c gets a hack so it knows when it is internal versus external.\\\n\\\n\\\n\\\nv3.0.18 at change set #4081\\\n(Note browser plugin goes to 3.0.23\\\n\\\n1) sqMacOpenGL.c Quite a few changes were made to the code to support it as an internal plugin for the browser. This is because the drawable frame for a browser plugin is a subset of the browser's grafport, so lots more care must be taken to draw in the correct location using OpenGL. We also fixed issues with re-configurating the Open/GL draw area when the window gets resized or goes to full screen, and attempted to ensure multiple screens will work.\\\n\\\n2) sqMacWindow.c, minor fix to cast a constant char * to char * for CW 6.1\\\n\\\n\\\nBrowser plugin 3.0.23 fixes\\\n\\\n1) Integerated the H/W Acceleration as an builtin plugin\\\n2) Added logic for pre and post event interaction to browser plugin event handler for H/W Acceleration logic. The external H/W Acceleration plugin mostly works with the browser plugin but doesn't work with full screen mode, or if the plugin is embedded in a window or a scrollable frame, so don't use it. Use the browser plugin 3.0.23 or higher which has the H/W Acceleration builtin.\\\n\\\nv3.0.17 at change set #4081\\\n(Note browser plugin goes to 3.0.21)\\\n\\\n1) Added HW acceleration as internal plugin.\\\n2) 4079BBAlphaTextFix-ar Fixes the problem with alpha text, changes BitBltPlugin.c \\\n3) Added primitive on the mac to truncate a file.\\\n4) Added logic to flush volume on a flush file to ensure file and control blocks are flushed.\\\n5) For the Carbon VM we increase nextevent wait time if we get sufficent idle time. This should reduce CPU usage under OS-X\\\n6) GetAttribute: 1002 now returns the gestaltSystemVersion as a hex string, and getAttribute: 1003 now returns either '68K' or 'PowerPC'.\\\n7) Starting with 3.0.17 the VM is build only as a powerpc application. The latest VM as a 68K application will be made available from time to time permits based on people's needs. \\\n8) Changes to sqOpenGLRenderer.c to improve performance, OpenGL 1.1 support.\\\n\\\nPlugin 3.0.21 fixes\\\n\\\n1) added check for mailto: tag on posts to fix problem with Netscape crashing, and IE hanging.\\\n2) Plus above fixes.\\\n\\\nWhat has been fixed/changed.\\\nv3.0.16 at change set #4041\\\n(Note browser plugin goes to 3.0.20)\\\n\\\n1) Lots of fixes for BitBlt and HW acceleration.\\\n2) Hardware Acceleration plugin goes to 1.0.1. Please note there is a seperate plugin with the same name for Carbon. Doing a get info will identify if the plugin is only usable with Carbon Squeak.\\\n\\\nv3.0.15 at change set #4026 (May 17th test version)\\\n(Note browser plugin goes to 3.0.19)\\\n\\\n1) Added support for OpenGL HW acceleration plugin\\\n\\\nPlugin 3.0.19 fixes\\\n\\\na) Obey embedded tag plug\\\nb) Fix problem with plugin 3.0.17 not working with netscape 4.x\\\nc) Carbonize plugin for IE 5.1 \\\nd) Remove debugging printf than occurred on transition to full screen mode\\\n\\\nWhat has been fixed/changed.\\\nv3.0.14 at change set #3987\\\n\\\n(Note plugin goes to 3.0.17)\\\n\\\n1) sqMacDirectory.c. The pathlookup would handle the case of foo:bar::do incorrectly by ignoring the :: path redirection. This has been fixed. However a path lookup will not work if it contains :: and an aliased directory in the middle of the path.\\\n\\\n2) sqMacSecurity.c. The pathname for the untrustedUserDirectory was built incorrectly, and the bug mentioned above in sqMacDirectory.c usually kept this from being noticed.\\\n\\\n3) sqMacWindow.c  we added some logic to do the delay for primitiveRelinquishProcessor, but found it had an large effect on a freecell benchmark. I suspect on a Morpic step wait there is nothing to do so primitiveRelinquishProcessor gets called which then affects response time. So for now we revert to the 3.0.11 behavior, good performance and 100% CPU usage!\\\n\\\n4) GetAttribute 1004 returns returns interpreterVersion; which is for example\\\n\"Squeak3.1alpha of 6 February 2001 [latest update: #3987]\"\\\n\\\n5) When in full screen mode we now attempt to disable resizing, zooming, or moving the window. The window borders are hidden, but in the past it was feasible to grab an edge and alter it, thus confusing the VM.\\\n\\\n6) Worked on Carbonizing the browser plugin\\\n\\\n7) 3977 & 3978 FloatArray fixes. Makes float arrays go through a new (and working) version of #primitiveHash\\\n\\\n8) Fixed problem with accidental mouse clicks being triggered from pulldown menus on application switching.\\\n\\\n9)\\\n\"Change Set:\t\t3984 BitBltExtensions-ar\\\nDate:\t\t\t4 May 2001\\\nAuthor:\t\t\tAndreas Raab\\\n\\\nThe change set includes various extensions for BitBlt with the goal of migrating the useful features from FXBlt into the general BitBlt mechanisms. These include:\\\n\\\n* Handling of LSB and MSB forms:\\\nBitBlt now handles both, MSB and LSB forms (and their conversions). Only instances of Bitmap are assumed to contain big-endian pixels. All others are assumed to be little endian (reason is that we can only identify Bitmap here). Note that 'LSB' and 'MSB' refers to PIXELS, that is a 1bpp LSB form has its left most pixel in the lowest bit whereas a 1bpp MSB form has its left-most pixel in the highest bit.\\\n\\\nFor pixel depths < 8 this can be different from what your OS supplies (as an example, Windows bitmaps < 8 are big-endian pixels in little-endian words; we might call them 'middle-endian'). We simply don't deal with those - forms are either big or little endian but nothing inbetween.\\\n\\\nBitBlt has got an extra combination rule for swapping pixels in the destination form. This can be used to make byte swapping much more efficient (as soon as we've got more VMs with support for it).\\\n\\\n* Handling of 'native bitmaps' (aka surfaces):\\\nBitBlt is now able to deal with OS surfaces that are registered with the surface plugin.\\\n\\\n* Handling of full color maps:\\\nBitBlt has been extended to deal with instances of ColorMap in addition to the prior mechanism of using only indexed lookups and provide an implicit 16-32 bit color conversion. ColorMaps can specify both, a lookup table and an additional set of masks and shifts to apply during the color mapping operation. \\\n\\\nFour independent shifts and masks can be given which can be used for a lot more than just color conversion (as an example, one could do byte swapping with this; but see also BitBlt class>>exampleColorMap). \\\n\\\n* Better handling of default arguments:\\\nFor most of the required arguments for BitBlt very reasonable default assumptions can be made. This includes the destOrigin (0@0), clipRect (0@0 extent: destForm extent), sourceOrigin (0@0). BitBlt now substitutes these if they are absent (e.g., nil) in the instance provided.\\\n\\\n\"\\\n\\\n\\\nv3.0.13 at change set #3848\\\n\\\n1) sqMacSecurity was changed to set the unsecure directory to\\\n\tsystem folder:Preferences:Squeak:Internet:My Squeak\\\n\\\nv3.0.12 at change set #3848\\\n1) Fixed problem with creating My Squeak Folder in Documents Folder with System 8.6\\\n\\\nWhat has been fixed/changed.\\\nv3.0.11 at change set #3848\\\n\\\n1) sqMacDirectory had a bug when you resolved a path name. The fast resolve always failed, which invoked the slow resolver. Now the fast resolver works.\\\n\\\n2) sqMacSecurity was changed to set the unsecure directory to Documents:My Squeak. \\\n\\\n3) sqMacWindow was changed to fix some issues with Squeak capturing events from other applications and to reduce the number of duplicate mouse events that are generated. Also we capture modifier information  directly from the mouse and keyboard on null events to fix some problems with Carbon. We  hopefully fixed problems with mouse clicks from foreground applications being seen by Squeak and issues with the OS-X Dock clicks.\\\n\\\n4) sqMacNSPlugin was changed to use the above mouse/keyboard capture code which is much cleaner than the original fix for the bogus modifier information given to us by netscape on a null event. \\\n\\\n5) When you turn full screen off we now correctly reposition the window to the original location versus a few pixels to the left. \\\n\\\nWhat has been fixed/changed.\\\nv3.0.10 at change set #3848\\\n\\\n1) changed VM exception unwind logic\\\n\t3796-Exception-unwind-V3,tim@sumeru.stanford.edu, Paul McDonough, Stephen Pair and others\\\n\\\n2) Fixes for the JPEGReader plugin and for Jitter 3\\\n\\\n3) Added minimal Mac VM logic to assist in building a small VM.\\\n\\\n4) Changed how the browser plugin starts up. Now it starts the interpreter running only after getting the browser setwindow command. This seems to fix a race condition that resulted in a crash at startup time with Netscape 4.x\\\n\\\n5) Fixed broken full screen redraw on cmd-tab\\\n\\\n6) Fixed what looked like mouse-down, mouse-down, mouse-up sequence. Now reports mouse-down, mouse up.\\\n\\\n7) Added StarSqueak plugin as internal plugin\\\n\\\n8) Note the current Squeak Plugin should be gotten from the www.squeakland.org site.\\\n\\\nv3.0.9 at change set #3776, Boston Snow storm build.\\\n\\\n1) A number of changes were made to the interpreter:\\\n\ta) added primitive to change a class.\\\n\tb) added primitives to get or put 32bit integers\\\n\tc) Fix problem with GC and class reshaping\\\n\td) Better logic for method cache flushing\\\n\\\n2) Added JPEGReader plugin\\\n\\\n\\\nV3.0.8 at change set #3740\\\n\\\n1) The caps lock no longer maps to the shift attribute. So if the caps lock is down mouse clicks will behave normally. \\\n\\\n2) Numerous fixes for the BitBltPlugin plugin\\\n\\\n3) Memory allocation grow/shrink logic for Carbon was added.\\\n\\\n4) Spurious mouse clicks for the browser plugin has been fixed. (This took awhile to fix, I'm sure it's a bug with the Swedish version of Netscape)\\\n\\\n5) The browser plugin will attempt first to allocate memory from the browser heap, then the system heap. Most people when faced with a memory issue usually increase memory for the browser first. However memory for the plugin is controlled by an attribute in the EMBED HTML statement. \\\n\\\nV3.0.7\\\n\\\n1) A bug exists in pre OS 8.x that causes a crash in activate window if the standard get file \\\ndialog comes up before the Squeak Window. I remove the InvalWindow call found in that routine since it is actually redundant.\\\n\\\n2) The standard get file dialog on system 7.x would not terminate if you did a cancel.\\\n\\\n3) The InterfaceLib had to be weak linked to prevent CFM startup issues. \\\n\\\nV3.0.6\\\n\\\n1) Alias resolving is less aggressive.\\\n\\\n2) We no longer cache image reads or writes. This was done because OS 9.1 allows you to have very large disk caches, and it's pointless to cache the image read or write.\\\n\\\n3) The file flush primitive now actually flushes the file via an OS call. This was a bug in the CodeWarrior 5.3 source code.\\\n\\\n4) The 68K version was being built with the 68881 math library. This fails on 68040LC chips. We now use the non-68881 math library. Thanks to Bruce ONeel for find this.\\\n\\\n5) A bug was found in the path resolving logic that was added for 3.x. This bug apparently only affects 68K machines,  never was identified as a PowerPC issue. \\\n\\\n6) The Netscape plugin needs a properly allocated clip region, this code seemed to work ok on new systems, but fails on system 7.6.1\\\n\\\n7) The security interface will create a Documents folder on the root volume if the default Document folder has been deleted. This is needed for security purposes. \\\n\\\n8) Jitter needs 1MB of free memory to run.\\\n\\\n9) 68K machines require another 32K of stack\\\n\\\n10) Threads  now work on 68K machines, but turned off because of possible performance issues. (I think more study is needed).\\\n\\\n11) The 68K version was compiled with better optimization, expect a 15% improvement.\\\n\\\n12) fix for BitBltPlugin ascii = byteAt((sourcePtr + charIndex) - 1);\\\n\\\n13) The interpreter object validation checking code was alter to work correctly.\\\n\\\nV3.0.5\\\n\\\n1) sqConfig.h changed due to BE OS header changes\\\n\\\n2) sqMacDirectory.c. Added support for Navigation services or Standard File Get to find the image at startup time when the Squeak.image is not found by the VM. This replaces the DOS like console message that comes up saying that Squeak can't find a image.\\\n\\\n3) A fix to drag and drop for the browser plugin.\\\n\\\n4) We now use Apple's cooperative multithreading package to run the UI in one thread, the VM in the other. This solves some issues with the browser and makes the UI versus VM logic and execution responsibilities easier to understand. \\\n\\\n5) Changed the sqMacNSPlugin.c code to support a 3.0VM using multithreading support. This should give Squeak in a browser better performance. Also changed the full screen support to correctly work with multiple monitors.\\\n\\\n6) BitBltPlugin.c gets one more op code\\\n\\\n7) Added the security interface\\\n\\\n8) Added the file flush primitive\\\n\\\n9) Rewrote the macintosh readme file\\\n\\\n10) Revisited the zoomWindow code and found a bug with multiple monitor support, then I fixed the code to make Full Screen mode work on screen that Squeak window is mostly on, versus the menubar screen. Also if you switch from full screen back it resizes the window back to the orginal size and location before you invoked the full screen. \\\n\\\nV3.0.2\\\nPlugins\\\n\\\nRecompiled the internal BitBltPlugin plugin to encorporate:\\\nChange Set:\t\t258AlphaBlendOpt-dsm\\\nAuthor:\t\t\tDuane Maxwell, Paul Phillips/exobox\\\na) Short circuits full opaque and full transparent pixels when alpha blending.\\\n\\\nRecompiled the internal LargeIntegerPlugin\\\n3298LargeIntegersV1-2-sr -- Stephan Rudlof -- 29 November 2000\\\n3299LargeIntV1-2For29-sr -- Stephan Rudlof -- 29 November 2000\\\n\\\nVM Software\\\n\\\n(b) PowerManagement for macintosh is now supported. You can disable the power manager to give you better performance on some powerbooks at the expense of battery life. See the Preferences Panel for details, category 'Performance'\\\n- changed sq.h\\\n- changed sqMacWindow.c to add support for power mgr disabling\\\n\\\n(c) Drag and Drop support for the macintosh, dragging files from the Finder to the Squeak window is now supported.\\\n- sqMacDragDrop.c added\\\n- sqMacWindow.c changed\\\n\\\n(d) Added primitive for get macintosh creator and file type.\\\n- sqMacDirectory.c changed\\\n\\\n(e) Carbon support. Thanks to Karl Goiser karl@wattle.net for work he did on sound and other Carbonization hotspots.\\\n- sqMacAsyncFilePrims.c changed\\\n- sqMacFFIPPC.c changed (not supported for Carbon)\\\n- sqMacNetwork.c changed per Apple tech note 1173 Carbon asset tracking\\\n-sqMacSerialAndMIDIPort.c chnaged (Not supported for Carbon)\\\n- sqMacSound.c changed per Apple tech note 1198 Carbon double sound buffer playing\\\n- sqMacWindow.c changed (various changes for Carbon)\\\n\\\n(f)  Poll at least 60 times a second for the mouse if required. Previous 2.9.x VM did it 30 times but this is too slow and 2.8.x VM do it 60 times a second.\\\n\\\n(g) Reworked path support Thanks to Karl Goiser karl@wattle.net for starting this.\\\n- sqmacDirectory.c changed reworked lookupPath\\\n- sqMacWindow.c changed, added GetApplicationDirectory to get application directory\\\n\\\n(h) I rewrote the sqMacDirectory.c logic to enable proper understanding of Apple's Alias logic. This means for example you can alias the \"SqueakV3.sources\" file and then only have one copy and have all your images point to it. \\\n\\\n(i) Added Zoom Window support.\\\n\\\n(j) Change the Squeak change file icon to better match Apple's visual guidelines, Thanks to Doug Way for the suggestion and the new icons.\\\n\\\n(k) The sound plugins have changed...\\\n\\\n(j) Dropped FFI out of the base Squeak because of security concerns\\\n\\\n(k) Compiled for 750(G3) processor versus 603\\\n\\\n(l) Added screenDepth primitive\\\n\\\nThe 3.0.x VM contains most of the optional plugins, you might want to check this by inspecting \"Smalltalk listBuiltinModules\" to see where your plugins are coming from. In some case people have been accidentally overriding the new builtin plugins with older plugins. \\\n\\\nThe file \"Squeak 3.0Alpha10MT.sig\" contains the PGP signature for the Squeak 3.0Alpha10MT VM\\\n\\\nJohn M McIntosh  johnmci@smalltalkconsulting.com\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n}"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Documentation/3.2.8 Release Notes.rtf",
    "content": "{\\rtf1\\mac\\ansicpg10000\\cocoartf102\n{\\fonttbl\\f0\\fnil\\fcharset77 Geneva;\\f1\\fnil\\fcharset77 LucidaGrande;\\f2\\fswiss\\fcharset77 Helvetica;\n}\n{\\colortbl;\\red255\\green255\\blue255;}\n\\margl1440\\margr1440\\vieww17300\\viewh12720\\viewkind0\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0\\fs24 \\cf0 Mac VM 3.2.8 mach-o build for Carbon, and build for Classic.\\\nOct 24rd, 2002 (3.2.8b9)\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f1 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\nNotes About previous VM.\\\n3.2.6 VM classic have an issue when the tickcount clock goes over 0x7FFFFFFF, about 24 days. \\\nThis exhibits it self as Squeak won't accept user input, or allow you to switch under os 9 or earlier.\\\nStarting a Squeak image hangs durning the screen painting.\\\nRestarting the mac solved these problems. Force quit does not.\\\nThis is fixed in 3.2.7b3\\\nSome issues with alias files and folder were fixed in 3.2.7b6 and 3.2.8b3\\\n\\\n3.2.8b9\\\na) recompiled os-x version, 3.2.8b8 seem to have a bad compiler option and gave 20% less performance.\\\n \\\n3.2.8b8\\\na) exposed \n\\f2 vmParameter\n\\f0  24 & 25 which control how memory is allocated/freed \\\n\n\\f2 Smalltalk vmParameterAt: 24 put: 48*1024*1024.\\\nSmalltalk vmParameterAt: 25 put: 24*1024*1024.\\\n\n\\f0 b) Added argv,argc, env variables to main\\\nc) Fixed for Jaguar 10.2. Full screen mode cmd-tab broke menu bar hiding, this is a 10.2 bug\\\nd) Added support for IP_ADD/DROPMEMBERSHIP and the ability to bind to the wild card port (0).\\\ne) OpenGL changes for TEA\\\n\\\n3.2.8b7 was testing release and not distributed to the public.\\\n3.2.8b6 was testing release and not distributed to the public.\\\n3.2.8b5\\\na) Oops broke the logic returning the vmversion information in classic. Also incremented os-x version (which was fine) to keep numbers in sync\\\n\\\n3.2.8b3 The squeak.sourceforge.net CVS tree was reorganized and the project builder project revamped. The \\\nmajor change to the source was upgrading the netscape browser plugin to 3.2.7b6 levels.\\\n\\\na) Gnunifer.3.cs Changed to add register var on FOO_REG and to remove sqGnu.h file embedded in method.\\\nb) sqMacDirectory.c Add logic to handle case of building as CFM carbon plugin under CW6, needed some carbon calls\\\nc) osExports.c needed to ifdef out the getUIToLock entry point (not available as CFM carbon browser plugin)\\\nd) sqMacFileLogic.c Fix alias problem. Add logic to deal with path names as CFM carbon browser plugin, ensure vmPath is correct.\\\ne) sqMacImageIO.c Cast to get rid of warning message\\\nf) sqMacMain.c Cast to get rid of warning message, Check for CFM Carbon and bundle check. Revise vm parm 1201 code to return long file names are ok as CFM carbon browser plugin. Some diagnostic routines for printing to the console as CFM carbon browser plugin.\\\ng) sqMacMemory.c Logic change as CFM carbon browser plugin.\\\nh) sqNSPlugin.c\tFix to beginFullScreen logic (carbon call is broken?)\\\ni) sqMacUIEvents.c Remove getUIToLock dummy call. This entry point should only exist for mach-o carbon builds. Not CFM carbon browser plugins\\\nj) sqMacWindow.c  Use old call to create window when a CW 5 carbon application.\\\nk) sqPlatformSpecific.h Change #ifdef to correct logic error when building as CFM carbon browser plugin under CW 5.\\\n\t\\\n\t\\\n\\\nMay 31st, 2002 (3.2.7b6)\\\nFor 3.2.7\\\n\\\n3.2.7b3 We build the VM using patchs to enable globals as a structure. This improves performance by 10%\\\n\\\na) Classic Vm builders might need to add \"struct foo *foo = &fum; \"  to int interpret(void). \\\nb) readme: add notes about changesets and alter build instructions\\\nc) sqMacFileLogic.c: use accessors for interp.c globals\\\nd) sqMacMain.c: use accessors for interp.c globals. Also Alain Fischer added logic to fetch os-x version number and to enable you to put squeak.image in the resource folder for autostarting.\\\ne) sqMacTime.h: Fix busted lowresclock again. After 24 days of mac uptime, 3.2.6 squeak will hang.\\\nf) sqMacUIEvents.h: use accessors for interp.c globals.\\\ng) sqPlatformSpecific.h: alter sqFTruncate to use fileno() as needed.\\\nh) sqMacWindow.c: use accessors for interp.c globals.\\\ni)  3.2.7b5 sqMacFileLogic.c: change vmpath to resolve to classic VM if vm is moved from MacOSClassic folder\\\nj) Misc changes for Netscape plugin support\\\nk) Introduce osExports.c logic\\\nl) 3.2.7b6 Fixed a problem in path name resolving need to use UTF8 to properly interact with high ascii characters\\\nm) 3.2.7b6 Fixed a problem in path name resolving there was a bug with certain types of alias path name combinations in quick name resolving.\\\n\\\nMac VM 3.2.6 mach-o build for Carbon, and build for Classic.\\\nMarch 14th, 2002\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f1 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\nNotes About previous VM.\\\n3.2.6b6 Classic or earlier has a bug that makes it stop collecting user input on a 19.88 hour cycle depending on reboot time.\\\n\tSeems many systems don't run for more than 19 hours so we've not had major complains about this issue. \\\n\tBug was introduced in 3.2.1.\\\n3.2.5 has a bug that prevents the use of accented characters without \\\n\ta image patch to fix a VM issue (not an issue in 3.2.4). Also you can't enter an double keystroke characters, ie ^ \\\n\twhich makes life difficult. It also does not support the AppleScript Plugin (not an issue in 3.2.4)\\\n3.2.4 a bug in project builder introduced a performance problem (bad compiler options).\\\n\\\nSee the 3.2.5 about why this 3.2.6 is different inside.\\\n\\\nFor 3.2.6:\\\na) Change an internal number that dictates how often pending interrupts should be looked at from 5ms to 3ms This improves \\\ndelay accuracy.\\\nb) Change how sleeping is done when squeak is idle. This reduces CPU consumption, and improves Delay accuracy.\\\nc) Fix bug with high bit problem with keyboard (accented characters are ok now)\\\n  c2) 3.2.6b6 has fixed characters that require multiple key strokes to enter.\\\nd) Externals that make UI interactions (IE AppleScript) Must now make a call back to the VM to schedule\\\n    the main thread to do the call that will invoke UI interaction to prevent a deadlock in Carbon between threads. \\\n   See the OSAExecute call in the AppleScript plugin for details.\\\ne) If you run a classic mac VM more than 23.x days nonstop it will stop responding to UI events.  Ensure clocks get anded with 536870911.\\\nf) signal inputSemaphoreIndex because we are mulithreaded. Not that it does anything for us yet...\\\ng) 3.2.6b6 Pass the unicode value of the keystroke up as the EventKeyDown/EventKeyUp data, versus mackeyboard code.\\\nh) Somewhere there is a bug with mktime + time, so use the unix code of time+localtime+gmt \\\ni) Change iorelinquishPrcessorForMicroseconds to sleep the quatum between now and wakeup time. Also schedule a\\\n   check for interrupts if wakeup time is now or in the past. This improves delay accuracy. For OS-x this was a big deal,\\\n   for os-9 it improves things by 1 or 2ms. Also in  os-x we sleep more when idle so CPU usage goes down.\\\nj) On OS-9 umap AND free the VM backing store. Just doing the free doesn't work and you lose 128Mb of disk space until you reboot\\\nk) 3.2.6b7 for post event processing ignore mouse move/drag/or scroll wheel events. These are ignored by the open/gl plugin and only suck a major amount of CPU time to process in the post event processing logic. \\\nl) 3.2.6b8 (3.2.6b4 classic) removed call to uncouple shift keys introduced in 3.2.1. This causes some macs after sleeping not to respond to keyboard input\\\nm) 3.2.6b8 (3.2.5b7 classic) added function for ioLowResMSecs to avoid early bit overflow. Rework clock checking in ioHandleEvents to handle clock rollovers properly.\\\n\\\nMac VM 3.2.5 mach-o build for Carbon, and build for Classic.\\\nMarch 4th, 2002\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f1 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\n\\\nBeware this version of the VM is significantly different inside! \\\n\\\n\\pard\\tx1440\\tx2880\\tx4320\\tx5760\\tx7200\\ql\\qnatural\n\n\\f2 \\cf0 a) Broke sqMacWindow.c into 10 different files by function type.\\\n\\\nb) Moved most of the memory allocation logic out of sqMacMain.c into sqMacMemory.c. and ensure memory is freed when Squeak is terminated. \\\nThe major change in this code is support for OS 9.x virtual memory mapping. This only applies to Mac OS 9.2.0 or higher, excluding os-x. It appears  Mac OS 9.1 has a bug that prevents this feature from working.\\\n\\\nFor images that require less than 128MB of memory, mapping is used to allow the image to grow/shrink to the 128MB boundary, therefore you can change the application memory size to about 2MB. \\\n\\\nFor images that require more than 128MB then change the application memory size to > 128MB and mapping will not occur. \\\n\\\nIf mapping is not available because virtual memory is turned off or the api is not supported by the macintosh OS then mapping is not used. Note that mapping is not support under the classic os-9.x environment under OS-X, however in this case you should be using the OS-X version of Squeak, not the classic version.\\\n\\\nc) Use of Carbon event logic for OS-X only. This is a major structural change. \\\n\\\nIt also encouraged the use of a pthread for interp.c. \\\n\\\nAll user interaction with the VM follows a new code path, so problems with keyboard or mouse input should be reported asap. Also any issues with application switching, windows being brought to the foreground or sent to the background and usage of the full screen logic should be reported asap.\\\n\\\nAs part of this change I have build in support for scroll-wheeled multi-button mice under os-x. Thanks to Doug Way for testing this for me. Maybe someone can post to the list what their favorite 3 button scroll wheeled mouse/trackball is.\\\n\\\nd) Use of a carbon call to get the dominate Device if you have multiple screens. People with multiple screens should confirm window resizing, full screen on/off works as expected.\\\n\\\ne) Corrected comment in sqMacFileLogic.c\\\n\\\nf) Changes to sqMacNSPlugin.c. This makes it compile, but it's not usable yet.\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 \\\n\\\nFeb 20th 2002 3.2.4\\\n\\\nFor this version of the VM I have migrated towards using OS-9 packages. This allows us to provide one \\\nfolder/package that supports os-x and previous operating system versions.\\\n\\\nGiven Squeak 3.2.4Beta1.app\\\nThe classic VM is found in the *.app:Contents:MacOSClassic, with an alias in *.app:\\\nThe mach-o OS-X VM is found in *.app.Contents:MacOS\\\n\\\nIf you are running OS-9 then clicking on the *.app or doing drag and drop will just run Squeak, same applies for OS-X.\\\nIf you are running OS-7.5.5 or OS-8.x then the *.app package will appear as a folder, just open and click on the alias within. \\\nNote that if you want to use classic plugins I suspect you need to put them in the MacOSClassic Folder beside the VM. \\\nBundles for os-x go in the same location as the *.app application package.\\\n\\\nChanges\\\na) Drag and drop at open time with image file that has no meta type, will now open the image, versus prompting you.\\\nb) Use an os-x window attribute at open time to signal that the window should not be moved by the dock when you go to full screen.\\\nc) Fix window update logic to use window that needs updating versus stwindowg to fix issues with print dialog windows in classic. \\\nd) bitblt gets recompile to pickup fixes posted in 3.2 update stream.\\\n\\\nFeb 5th 2002 3.2.3\\\nChanges\\\n\\\na) use old extended time manger to update psudeo-TickCount, versus sigalrm. siglarm make sound recording not work.\\\nb) fiddle with sound recording and make it work.\\\n\\\nJan 2002 3.2.2\\\nChanges:\\\n\\\na) AsyncFilePlugin.c Use global to remember security function entry point for performance reasons\\\nb) FilePlugin.c\tUse global to remember security function entry point for performance reasons\\\nc) interp.c Use squeakFileOffsetType versus off_t and add a bunch of checks to handle lack of long long and conversion errors between 64/32 bit integers and LargeInteger objects\\\nd) readme, it's http://www.mucow.com/Gnuifier.1.cs \\\ne) SocketPlugin.c\tUse global to remember security function entry point for performance reasons\\\nf) sq.h added default sqFilenameFromStringOpen and sqTruncate\\\ng) sqFilePluginBasicPrims.c revert to anti specs, but ensure #def to fseeko and ftello for 64 bit aware file systems.\\\nh) sqMacDirectory.c A bit more error checking on bad file names\\\ni) sqMacFileLogic.c Folders size is now zero in classic, and a bit more checking on bad file names\\\nj) sqMacSound.c Fixed a problem with sound recording in classic due to a change made in Sept. But sound recording still does not work under os-x\\\nk) sqMacWindow.c  two very important changes:\\\n\\\n\t1) You can now do FFI calls with the FFI bundle plugin to Mach-o frameworks. \\\n\tHowever you need to rework your api calls. For example:\\\n\tapiGetMousePoint: aMacPoint was\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'InterfaceLib'>\\\n\tIt now is:\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'Carbon.framework'>\\\n \t\\\n\tIf you review /System/Library/Frameworks I'm sure you can come up with interesting ways to \\\n\tmake mac only squeak images.\\\n\t\\\n\tI now use map( NULL, gMaxHeapSize, PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED,-1,0);\\\n\tanonymous memory mapping to 512MB as the squeak memory block. The VM can then grow or shrink\\\n\twithin the 512MB block, I just move a pointer. \\\n\t\\\n\tNote in 3.2.1 a slight error on my part restricted Squeak to 50MB. I am of course\\\n\tinterested to hear about issues with my choice of 512MB. Note a Squeak VM is limited to 2GB under perfect \\\n\tconditions, however if any part of the image crosses the 2GB boundary the VM will fail, right now 512MB\\\n\tseemed a safe choice.\\\n\t\\\n \tPhysMem:  60.2M wired, 78.6M active,  412M inactive,  551M used,  217M free\\\n\tVM: 3.03G + 55.3M   7847(0) pageins, 1(0) pageouts   \\\n\tPID COMMAND      %CPU   TIME   #TH #PRTS #DREGS RPRVT  RSHRD  RSIZE  VSIZE\\\n\t422 Squeak VM    0.8%  0:35.59   2    71   100  23.3M  8.53M  26.5M   571M\\\n\\\n\tbut I only have one 80,000,000 byte swap file in /var/vm\\\n\\\nNote if you turn crash reporter on, then if the VM crashes a nice report should be generated in your log directory.  See the Apple documentation for a description of this feature, currently it is set in OS-X 10.1.x via the preferences window for the Console Application. If you have a crash with this VM, please recreate and post the crash log (found in Users/foobar/Library/Logs/ to the Squeak mailing list so we can continue to make the VM fault tolerant.\\\n\\\n3.2.1 Notes\\\n\\\nYou might need these change sets to build a new VM or to use all the features of this VM with your image, hopefully these will get into the pending 3.2.x image.\\\n\\\nFixes and feature extensions.\\\nAsyncFileFixFu...hName-JMM.1.cs \tfix for async test method.\\\nDragAndDropAtStart-JMM.5.cs\t\tfix to enable drag and drop at startup\\\n\\\nNeeded to compile a VM with VMMaker\\\nLargeFiles-JMM.3.cs\t\t\t\tEnable large file support, files > 2GB\\\n\\\nNeeded to turn this feature on\\\nMacLongFileName-JMM.5.cs\t\t\tEnable long file names on the mac\\\n\\\nThe SUnit\\\nMacLongFileNamesSUnits-JMM.3.cs\tTest long file names and long directory names and large file support\\\n\\\nKinda optional features some people might need.\\\nInternetConfiguration-JMM.5.cs\t\tAllow internet configuration information access, internal plugin\\\nUUID-JMM.3.cs\t\t\t\t\tAllow UUID generation, internal plugin\\\n\\\na) The ability to get back a UUID. This uses the hosting UUID generator if the\\\n hosting OS supports it and we have a primitive we can call. If not then we generate\\\n a type 4 version of a UUID (the random bits one).\\\n(This requires a special change set)\\\n\\\nb) Ability to start squeak on the mac by dragging multiple documents onto the\\\nimage, or drag and drop of stuff onto the running VM icon.\\\n(This requires a special change set)\\\n\\\nc) Usage of the Internet Configuration tool kit to supply information about\\\nwhat the mac proxy is etc. etc.\\\n(This requires a special change set)\\\n\\\nd) Migrate file system to use 64 bits. This allows you to read/write and seek\\\nwith files > 2 GB. This includes a change to the VM to convert from/to long\\\nlong integers. It also allows the file system to actually deal with 2GB files,\\\nthe current file interface actually fails once the file exceeds 1GB.\\\n\\\ne) For the carbon based Squeak VM we now support long file names 255\\\ncharacters. Close both eyes and touch everywhere the mac VM deals with file\\\nname paths and hope for the best (Actually we write an Sunit to ensure we've\\\nnot broken everything). This also includes the ability to put an image in a\\\nlong file name directory, but right now the image name must stay under 32 characters.\\\n\\\nFilePlugin.c changes to support large integers.\\\nFilePlugin.h changes\\\nsq.h changes to support large files.\\\nsqConfig.h changes to resolve some conflicts.\\\nsqFilePluginBasicPrims.c  changes to support large files.\\\nsqMacAsyncFilePrims.c changes to use fspec versus 255 file path.\\\nsqMacDirectory.c changes to use hosting OS (OS-X) bsd create and delete directory\\\n and truncate. dir_look changes as part of the general rewrite.\\\nsqMacDragAndDrop.c use new call to get path name from fsspec. Use fsspec more, and added \\\n  interface code to setup drag and drop of items at application startup time. max document name\\\n  goes to 1000 characters.\\\nsqMacFileLogic.c Mostly rewrote!\\\nsqMacSecurity.c use new file calls.\\\nsqMacWindow.c \\\n\tincrease size of vmpath, docpath, imagepath to 1000 chars, shortname to 255 characters.\\\n\tadd logic for left/right modifier keys \\\n\treworked LoadLibViaPath logic \\\n\tsqImageFileOpen uses fsspec versus 255 path name.\\\n\tsqImageFileStartLocation uses ffspec.\\\n\tbundle support for bundles\\\n\t\\\ne2) interp.c supports get/put of large integers to long long integers.\\\ne3) fixed fTruncate\\\n\\\nHint getting this to work was a pain. Think of 255 character folder names and nested aliases,\\\nfolder 1 refers to folder 2 which then refers to folder 1 again, just go down the path say 8 times,\\\nthen ask to create a file or directory!\\\n\\\nf) Support to change the Mac screen resolution under Squeak control.\\\n\\\ng) Fix to unload/load the scrap at startup time to ensure the clipboard is\\\ncorrect when starting up the VM.\\\n\\\nh) Uncouple the shift key and left/right shift keys on old extended keyboard.\\\nAlso add a call to get which keys are currently pressed on a USB keyboard or\\\nthe USB codes for an apple non-usb keyboard. (Note this isn't working quite yet under OS-X)\\\n\\\ni) Changes to enable us to compile the VM under Apple's OS-X Project Builder\\\nenvironments.\\\n\\\nj) Some rewriting to ensure serial and midi support can be written as external\\\nplugins.\\\n\\\nk) Fiddling to get sound input to work under OS-X\\\n\\\nl) Platform.exports changed macintosh to macintoshSqueak to avoid conflict.\\\n\\\nm) Memory is allocated at 50MB at start, then will grow or shrink, verus previous carbon apps\\\n that did 1GB. \\\n \\\nn) sqPlatformSpecific.h changes to support long file names and os-x posix file names\\\n\\\no) sqVirtualmachine.c & sqVirtualmachine.h\\\n#if VM_PROXY_MINOR > 4\\\n\tVM->positive64BitIntegerFor = positive64BitIntegerFor;\\\n\tVM->positive64BitValueOf = positive64BitValueOf;\\\n\tVM->signed64BitIntegerFor = signed64BitIntegerFor;\\\n\tVM->signed64BitValueOf = signed64BitValueOf;\\\n#endif\\\n\\\nBeware this causes an interesting problem, if you compile plugins with VM_PROXY_MINOR now set to 5, then they will not work with older VMs. The solution is to define the VM_PROXY_MINOR in the plugin to the value that indicates what features it is using.\\\n\\\np) Changed to use ITimer logic as a 16ms lowres timer to improve performance\\\n\\\nq) Changed to use single thread, no thread manager.\\\n\\\nr) Changed to use lowres timer in checking for polling time to improve performance\\\n\\\ns) It should have faster startup times.\\\n\\\nt) It will hide the empty window at startup, then show the squeak window when required.\\\n\\\nu) It has a different menu structure.\\\n\\\nv) It does less I/O when navigating directories.\\\n\\\nThe macintosh 3.1Alpha1MT VM, Sept 24th 2001 \\\nThis VM was built with the base  3.1 image at change set #4347\\\nV3.1.1 at change set #4347\\\n\\\n\\\nWe go to V3.1.1 to indicate that the 3.1 VM is being used. In the past the 3.1 Image was used but some changes in the openGL logic makes  3.1 Vm and 3.0 image not quite work correctly with 3d graphics. Although a 3.1 VM will run many images way back to the 2x series no careful study has been done on the ability to do this. So at this point we are indicating this VM is a 3.1 VM and best used with a 3.1 image.\\\n\\\nUse of VMMaker to build VM. As of this version everything can be built as an external except for the window logic which hasn't been decoupled from the VM support for the macintosh. \\\n\\\n1) AsynchFilePlugin the security check for ability to create file is now a plugin call.\\\n2) B2DPlugin logic changes to fillLinearGradientfromtoat\\\n3) b3dRemapFaces, b3dRemapEdges, b3dRemapEdgeList, b3dRemapAET, b3dRemapEdgeVertices, b3dRemapFaceVertices, b3dRemapFaceFree, b3dRemapEdgeFree, b3dRemapAttributes. Some casting and changing of += to = + to make some compilers happy.\\\n4) BitBltPlugin added tableLookupat call.\\\n5) DropPlugin added setFileAccessCallback to allow the Security Module plugin the ability to give us the entry point to turn security off so we can open files as read only when security is turned on.  This was broken in the past. \\\n 6) FilePlugin added fileOpennamesizewrite,getThisSession to allow for callbacks. Changed the file security logic to use the plugin interface. \\\n7) interp.c, fixes for 4347ByteArrayRangeCheck-di, ability to printAllStacks, security calls for image rename, write to use plugin interface.\\\n8) Added GetAttributeString, and recordDragDropEvent and entry points for callbacks.\\\n9) SecurityPlugin changed when initialization is called to initialize the safe and unsafe directorys, also added entry points for all the testing calls so it can be a true plugin.\\\n10) Serialplugin. The serial plugin was redesigned to seperate out MIDI logic. People with MIDI devices and old serial macintosh should check to see if they still work since we lack equipment now to test this obsolete technology set.\\\n11) SocketPlugin. Make security calls true plugin calls.\\\n12 SoundGenerationPlugin. Removed \\\nEXPORT(int) SoundGenerationPlugin_primitiveFMSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveOldSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitivePluckedSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveWaveTableSoundMix(void);\\\nThey were a hack at the plugin level and discussion on the list seemed to show they were no longer used. \\\n13) Checking for if defined (__APPLE__) && defined(__MACH__) for the Mac OS-X native development environment\\\n14) Changed sqMacAsyncFilePrims, usage of interpreterProxy->, plugin calls for getThisSession. \\\n15) Changed sqMacDirectory.c. Removed some utility code and make it a seperate file so that it can be shared between sqMacWindow and other plugins that require them. \\\n16) Changed sqMacDragDrop.c. Added plugin callback for getSTWindow, the sqSetFileAccessCallback logic, fileOpennamesizewrite, and secHasFileAccess. Added logic to do the recordDragDropEvent callback to sqMacWindow.c \\\n17) sqMacNetwork.c. Some cleanup for the OS-X version of the OpenTransport headers, some constants have name changes\\\n18) sqMacNSPlugin.c Use of ioLoadFunctionFrom(NULL, \"DropPlugin\"); versus explicit call.\\\n19) sqMacOpenGL.c. Some cleanup for the OS-X version of the OpenGL headers\\\n20) sqMacOpenGLInfo.c. Some cleanup for the OS-X version of the OpenGL headers\\\n21) sqMacSecurity.c ioInitSecurity calls back to dragAndDrop plugin to set entry point to turn security off.  Added code to create directories if required and ensured callbacks are plugitized.\\\n22) sqMacSound.c Some cleanup for the OS-X version of the Sound headers. Use of interpreterProxy-> in the proper places.\\\n23) sqMacWindow.c Some cleanup for the OS-X version of the compiler.  Fixed saveAsEmbeddedImage, this got broken when we moved from a FAT to a ppc only application.  Altered interface to recordDragDropEvent so that it was plugable. Some file path name logic goes to a seperate C source file. The drag and drop plugin is loaded and intialized after the image is loaded but before the interpreter is started, before it was done a bit earlier in the startup process. This also has the effect of initializing the security module.\\\n24)sqOpenGLRenderer.c. Some cleanup for the OS-X version of the OpenGL headers\\\n25)SurfacePlugin.c gets a hack so it knows when it is internal versus external.\\\n\\\n\\\n\\\nv3.0.18 at change set #4081\\\n(Note browser plugin goes to 3.0.23\\\n\\\n1) sqMacOpenGL.c Quite a few changes were made to the code to support it as an internal plugin for the browser. This is because the drawable frame for a browser plugin is a subset of the browser's grafport, so lots more care must be taken to draw in the correct location using OpenGL. We also fixed issues with re-configurating the Open/GL draw area when the window gets resized or goes to full screen, and attempted to ensure multiple screens will work.\\\n\\\n2) sqMacWindow.c, minor fix to cast a constant char * to char * for CW 6.1\\\n\\\n\\\nBrowser plugin 3.0.23 fixes\\\n\\\n1) Integerated the H/W Acceleration as an builtin plugin\\\n2) Added logic for pre and post event interaction to browser plugin event handler for H/W Acceleration logic. The external H/W Acceleration plugin mostly works with the browser plugin but doesn't work with full screen mode, or if the plugin is embedded in a window or a scrollable frame, so don't use it. Use the browser plugin 3.0.23 or higher which has the H/W Acceleration builtin.\\\n\\\nv3.0.17 at change set #4081\\\n(Note browser plugin goes to 3.0.21)\\\n\\\n1) Added HW acceleration as internal plugin.\\\n2) 4079BBAlphaTextFix-ar Fixes the problem with alpha text, changes BitBltPlugin.c \\\n3) Added primitive on the mac to truncate a file.\\\n4) Added logic to flush volume on a flush file to ensure file and control blocks are flushed.\\\n5) For the Carbon VM we increase nextevent wait time if we get sufficent idle time. This should reduce CPU usage under OS-X\\\n6) GetAttribute: 1002 now returns the gestaltSystemVersion as a hex string, and getAttribute: 1003 now returns either '68K' or 'PowerPC'.\\\n7) Starting with 3.0.17 the VM is build only as a powerpc application. The latest VM as a 68K application will be made available from time to time permits based on people's needs. \\\n8) Changes to sqOpenGLRenderer.c to improve performance, OpenGL 1.1 support.\\\n\\\nPlugin 3.0.21 fixes\\\n\\\n1) added check for mailto: tag on posts to fix problem with Netscape crashing, and IE hanging.\\\n2) Plus above fixes.\\\n\\\nWhat has been fixed/changed.\\\nv3.0.16 at change set #4041\\\n(Note browser plugin goes to 3.0.20)\\\n\\\n1) Lots of fixes for BitBlt and HW acceleration.\\\n2) Hardware Acceleration plugin goes to 1.0.1. Please note there is a seperate plugin with the same name for Carbon. Doing a get info will identify if the plugin is only usable with Carbon Squeak.\\\n\\\nv3.0.15 at change set #4026 (May 17th test version)\\\n(Note browser plugin goes to 3.0.19)\\\n\\\n1) Added support for OpenGL HW acceleration plugin\\\n\\\nPlugin 3.0.19 fixes\\\n\\\na) Obey embedded tag plug\\\nb) Fix problem with plugin 3.0.17 not working with netscape 4.x\\\nc) Carbonize plugin for IE 5.1 \\\nd) Remove debugging printf than occurred on transition to full screen mode\\\n\\\nWhat has been fixed/changed.\\\nv3.0.14 at change set #3987\\\n\\\n(Note plugin goes to 3.0.17)\\\n\\\n1) sqMacDirectory.c. The pathlookup would handle the case of foo:bar::do incorrectly by ignoring the :: path redirection. This has been fixed. However a path lookup will not work if it contains :: and an aliased directory in the middle of the path.\\\n\\\n2) sqMacSecurity.c. The pathname for the untrustedUserDirectory was built incorrectly, and the bug mentioned above in sqMacDirectory.c usually kept this from being noticed.\\\n\\\n3) sqMacWindow.c  we added some logic to do the delay for primitiveRelinquishProcessor, but found it had an large effect on a freecell benchmark. I suspect on a Morpic step wait there is nothing to do so primitiveRelinquishProcessor gets called which then affects response time. So for now we revert to the 3.0.11 behavior, good performance and 100% CPU usage!\\\n\\\n4) GetAttribute 1004 returns returns interpreterVersion; which is for example\\\n\"Squeak3.1alpha of 6 February 2001 [latest update: #3987]\"\\\n\\\n5) When in full screen mode we now attempt to disable resizing, zooming, or moving the window. The window borders are hidden, but in the past it was feasible to grab an edge and alter it, thus confusing the VM.\\\n\\\n6) Worked on Carbonizing the browser plugin\\\n\\\n7) 3977 & 3978 FloatArray fixes. Makes float arrays go through a new (and working) version of #primitiveHash\\\n\\\n8) Fixed problem with accidental mouse clicks being triggered from pulldown menus on application switching.\\\n\\\n9)\\\n\"Change Set:\t\t3984 BitBltExtensions-ar\\\nDate:\t\t\t4 May 2001\\\nAuthor:\t\t\tAndreas Raab\\\n\\\nThe change set includes various extensions for BitBlt with the goal of migrating the useful features from FXBlt into the general BitBlt mechanisms. These include:\\\n\\\n* Handling of LSB and MSB forms:\\\nBitBlt now handles both, MSB and LSB forms (and their conversions). Only instances of Bitmap are assumed to contain big-endian pixels. All others are assumed to be little endian (reason is that we can only identify Bitmap here). Note that 'LSB' and 'MSB' refers to PIXELS, that is a 1bpp LSB form has its left most pixel in the lowest bit whereas a 1bpp MSB form has its left-most pixel in the highest bit.\\\n\\\nFor pixel depths < 8 this can be different from what your OS supplies (as an example, Windows bitmaps < 8 are big-endian pixels in little-endian words; we might call them 'middle-endian'). We simply don't deal with those - forms are either big or little endian but nothing inbetween.\\\n\\\nBitBlt has got an extra combination rule for swapping pixels in the destination form. This can be used to make byte swapping much more efficient (as soon as we've got more VMs with support for it).\\\n\\\n* Handling of 'native bitmaps' (aka surfaces):\\\nBitBlt is now able to deal with OS surfaces that are registered with the surface plugin.\\\n\\\n* Handling of full color maps:\\\nBitBlt has been extended to deal with instances of ColorMap in addition to the prior mechanism of using only indexed lookups and provide an implicit 16-32 bit color conversion. ColorMaps can specify both, a lookup table and an additional set of masks and shifts to apply during the color mapping operation. \\\n\\\nFour independent shifts and masks can be given which can be used for a lot more than just color conversion (as an example, one could do byte swapping with this; but see also BitBlt class>>exampleColorMap). \\\n\\\n* Better handling of default arguments:\\\nFor most of the required arguments for BitBlt very reasonable default assumptions can be made. This includes the destOrigin (0@0), clipRect (0@0 extent: destForm extent), sourceOrigin (0@0). BitBlt now substitutes these if they are absent (e.g., nil) in the instance provided.\\\n\\\n\"\\\n\\\n\\\nv3.0.13 at change set #3848\\\n\\\n1) sqMacSecurity was changed to set the unsecure directory to\\\n\tsystem folder:Preferences:Squeak:Internet:My Squeak\\\n\\\nv3.0.12 at change set #3848\\\n1) Fixed problem with creating My Squeak Folder in Documents Folder with System 8.6\\\n\\\nWhat has been fixed/changed.\\\nv3.0.11 at change set #3848\\\n\\\n1) sqMacDirectory had a bug when you resolved a path name. The fast resolve always failed, which invoked the slow resolver. Now the fast resolver works.\\\n\\\n2) sqMacSecurity was changed to set the unsecure directory to Documents:My Squeak. \\\n\\\n3) sqMacWindow was changed to fix some issues with Squeak capturing events from other applications and to reduce the number of duplicate mouse events that are generated. Also we capture modifier information  directly from the mouse and keyboard on null events to fix some problems with Carbon. We  hopefully fixed problems with mouse clicks from foreground applications being seen by Squeak and issues with the OS-X Dock clicks.\\\n\\\n4) sqMacNSPlugin was changed to use the above mouse/keyboard capture code which is much cleaner than the original fix for the bogus modifier information given to us by netscape on a null event. \\\n\\\n5) When you turn full screen off we now correctly reposition the window to the original location versus a few pixels to the left. \\\n\\\nWhat has been fixed/changed.\\\nv3.0.10 at change set #3848\\\n\\\n1) changed VM exception unwind logic\\\n\t3796-Exception-unwind-V3,tim@sumeru.stanford.edu, Paul McDonough, Stephen Pair and others\\\n\\\n2) Fixes for the JPEGReader plugin and for Jitter 3\\\n\\\n3) Added minimal Mac VM logic to assist in building a small VM.\\\n\\\n4) Changed how the browser plugin starts up. Now it starts the interpreter running only after getting the browser setwindow command. This seems to fix a race condition that resulted in a crash at startup time with Netscape 4.x\\\n\\\n5) Fixed broken full screen redraw on cmd-tab\\\n\\\n6) Fixed what looked like mouse-down, mouse-down, mouse-up sequence. Now reports mouse-down, mouse up.\\\n\\\n7) Added StarSqueak plugin as internal plugin\\\n\\\n8) Note the current Squeak Plugin should be gotten from the www.squeakland.org site.\\\n\\\nv3.0.9 at change set #3776, Boston Snow storm build.\\\n\\\n1) A number of changes were made to the interpreter:\\\n\ta) added primitive to change a class.\\\n\tb) added primitives to get or put 32bit integers\\\n\tc) Fix problem with GC and class reshaping\\\n\td) Better logic for method cache flushing\\\n\\\n2) Added JPEGReader plugin\\\n\\\n\\\nV3.0.8 at change set #3740\\\n\\\n1) The caps lock no longer maps to the shift attribute. So if the caps lock is down mouse clicks will behave normally. \\\n\\\n2) Numerous fixes for the BitBltPlugin plugin\\\n\\\n3) Memory allocation grow/shrink logic for Carbon was added.\\\n\\\n4) Spurious mouse clicks for the browser plugin has been fixed. (This took awhile to fix, I'm sure it's a bug with the Swedish version of Netscape)\\\n\\\n5) The browser plugin will attempt first to allocate memory from the browser heap, then the system heap. Most people when faced with a memory issue usually increase memory for the browser first. However memory for the plugin is controlled by an attribute in the EMBED HTML statement. \\\n\\\nV3.0.7\\\n\\\n1) A bug exists in pre OS 8.x that causes a crash in activate window if the standard get file \\\ndialog comes up before the Squeak Window. I remove the InvalWindow call found in that routine since it is actually redundant.\\\n\\\n2) The standard get file dialog on system 7.x would not terminate if you did a cancel.\\\n\\\n3) The InterfaceLib had to be weak linked to prevent CFM startup issues. \\\n\\\nV3.0.6\\\n\\\n1) Alias resolving is less aggressive.\\\n\\\n2) We no longer cache image reads or writes. This was done because OS 9.1 allows you to have very large disk caches, and it's pointless to cache the image read or write.\\\n\\\n3) The file flush primitive now actually flushes the file via an OS call. This was a bug in the CodeWarrior 5.3 source code.\\\n\\\n4) The 68K version was being built with the 68881 math library. This fails on 68040LC chips. We now use the non-68881 math library. Thanks to Bruce ONeel for find this.\\\n\\\n5) A bug was found in the path resolving logic that was added for 3.x. This bug apparently only affects 68K machines,  never was identified as a PowerPC issue. \\\n\\\n6) The Netscape plugin needs a properly allocated clip region, this code seemed to work ok on new systems, but fails on system 7.6.1\\\n\\\n7) The security interface will create a Documents folder on the root volume if the default Document folder has been deleted. This is needed for security purposes. \\\n\\\n8) Jitter needs 1MB of free memory to run.\\\n\\\n9) 68K machines require another 32K of stack\\\n\\\n10) Threads  now work on 68K machines, but turned off because of possible performance issues. (I think more study is needed).\\\n\\\n11) The 68K version was compiled with better optimization, expect a 15% improvement.\\\n\\\n12) fix for BitBltPlugin ascii = byteAt((sourcePtr + charIndex) - 1);\\\n\\\n13) The interpreter object validation checking code was alter to work correctly.\\\n\\\nV3.0.5\\\n\\\n1) sqConfig.h changed due to BE OS header changes\\\n\\\n2) sqMacDirectory.c. Added support for Navigation services or Standard File Get to find the image at startup time when the Squeak.image is not found by the VM. This replaces the DOS like console message that comes up saying that Squeak can't find a image.\\\n\\\n3) A fix to drag and drop for the browser plugin.\\\n\\\n4) We now use Apple's cooperative multithreading package to run the UI in one thread, the VM in the other. This solves some issues with the browser and makes the UI versus VM logic and execution responsibilities easier to understand. \\\n\\\n5) Changed the sqMacNSPlugin.c code to support a 3.0VM using multithreading support. This should give Squeak in a browser better performance. Also changed the full screen support to correctly work with multiple monitors.\\\n\\\n6) BitBltPlugin.c gets one more op code\\\n\\\n7) Added the security interface\\\n\\\n8) Added the file flush primitive\\\n\\\n9) Rewrote the macintosh readme file\\\n\\\n10) Revisited the zoomWindow code and found a bug with multiple monitor support, then I fixed the code to make Full Screen mode work on screen that Squeak window is mostly on, versus the menubar screen. Also if you switch from full screen back it resizes the window back to the orginal size and location before you invoked the full screen. \\\n\\\nV3.0.2\\\nPlugins\\\n\\\nRecompiled the internal BitBltPlugin plugin to encorporate:\\\nChange Set:\t\t258AlphaBlendOpt-dsm\\\nAuthor:\t\t\tDuane Maxwell, Paul Phillips/exobox\\\na) Short circuits full opaque and full transparent pixels when alpha blending.\\\n\\\nRecompiled the internal LargeIntegerPlugin\\\n3298LargeIntegersV1-2-sr -- Stephan Rudlof -- 29 November 2000\\\n3299LargeIntV1-2For29-sr -- Stephan Rudlof -- 29 November 2000\\\n\\\nVM Software\\\n\\\n(b) PowerManagement for macintosh is now supported. You can disable the power manager to give you better performance on some powerbooks at the expense of battery life. See the Preferences Panel for details, category 'Performance'\\\n- changed sq.h\\\n- changed sqMacWindow.c to add support for power mgr disabling\\\n\\\n(c) Drag and Drop support for the macintosh, dragging files from the Finder to the Squeak window is now supported.\\\n- sqMacDragDrop.c added\\\n- sqMacWindow.c changed\\\n\\\n(d) Added primitive for get macintosh creator and file type.\\\n- sqMacDirectory.c changed\\\n\\\n(e) Carbon support. Thanks to Karl Goiser karl@wattle.net for work he did on sound and other Carbonization hotspots.\\\n- sqMacAsyncFilePrims.c changed\\\n- sqMacFFIPPC.c changed (not supported for Carbon)\\\n- sqMacNetwork.c changed per Apple tech note 1173 Carbon asset tracking\\\n-sqMacSerialAndMIDIPort.c chnaged (Not supported for Carbon)\\\n- sqMacSound.c changed per Apple tech note 1198 Carbon double sound buffer playing\\\n- sqMacWindow.c changed (various changes for Carbon)\\\n\\\n(f)  Poll at least 60 times a second for the mouse if required. Previous 2.9.x VM did it 30 times but this is too slow and 2.8.x VM do it 60 times a second.\\\n\\\n(g) Reworked path support Thanks to Karl Goiser karl@wattle.net for starting this.\\\n- sqmacDirectory.c changed reworked lookupPath\\\n- sqMacWindow.c changed, added GetApplicationDirectory to get application directory\\\n\\\n(h) I rewrote the sqMacDirectory.c logic to enable proper understanding of Apple's Alias logic. This means for example you can alias the \"SqueakV3.sources\" file and then only have one copy and have all your images point to it. \\\n\\\n(i) Added Zoom Window support.\\\n\\\n(j) Change the Squeak change file icon to better match Apple's visual guidelines, Thanks to Doug Way for the suggestion and the new icons.\\\n\\\n(k) The sound plugins have changed...\\\n\\\n(j) Dropped FFI out of the base Squeak because of security concerns\\\n\\\n(k) Compiled for 750(G3) processor versus 603\\\n\\\n(l) Added screenDepth primitive\\\n\\\nThe 3.0.x VM contains most of the optional plugins, you might want to check this by inspecting \"Smalltalk listBuiltinModules\" to see where your plugins are coming from. In some case people have been accidentally overriding the new builtin plugins with older plugins. \\\n\\\nThe file \"Squeak 3.0Alpha10MT.sig\" contains the PGP signature for the Squeak 3.0Alpha10MT VM\\\n\\\nJohn M McIntosh  johnmci@smalltalkconsulting.com\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n}"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Documentation/3.4.0 Release Notes.rtf",
    "content": "{\\rtf1\\mac\\ansicpg10000\\cocoartf102\n{\\fonttbl\\f0\\fnil\\fcharset77 Geneva;\\f1\\fnil\\fcharset77 LucidaGrande;\\f2\\fswiss\\fcharset77 Helvetica;\n}\n{\\colortbl;\\red255\\green255\\blue255;}\n\\margl1440\\margr1440\\vieww17300\\viewh12720\\viewkind0\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0\\fs24 \\cf0 Mac VM 3.4.0 mach-o build for Carbon, and build for Classic. Support for Croquet\\\nNov 18th, 2002 (3.4.0b2)\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f1 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\nNotes About previous VM.\\\n3.2.6 VM classic have an issue when the tickcount clock goes over 0x7FFFFFFF, about 24 days. \\\nThis exhibits it self as Squeak won't accept user input, or allow you to switch under os 9 or earlier.\\\nStarting a Squeak image hangs durning the screen painting.\\\nRestarting the mac solved these problems. Force quit does not.\\\nThis is fixed in 3.2.7b3\\\nSome issues with alias files and folder were fixed in 3.2.7b6 and 3.2.8b3\\\n3.4.0b2 (Croquet support)\\\n\\\na) Ensure vmVersion information reports correct information, was bogus in 3.4.0b1\\\n\\\n3.4.0b1 (Croquet support)\\\na) Added plugin BMPReadWriterPlugin 14 November 2002 (i)\\\nb) B3DAcceleratorPlugin.c gets primitiveCreateRendererFlags (new api)\\\nc) two more op codes get added to BitBltPlugin (fixAlphawith, pixClearwith)\\\nd) Squeak3D gets (b3dOrthoNormInverseMatrix, b3dTransformDirection,b3dTransformPoint,b3dTransposeMatrix)\\\ne) The scroll wheel mouse logic was using apple cmd key as the modifier on the arrow key events, Other platforms use the Control key. So the \\\nmac falls in line (changed to use the control-key)\\\n\\\n3.2.8b9\\\na) recompiled os-x version, 3.2.8b8 seem to have a bad compiler option and gave 20% less performance.\\\n \\\n3.2.8b8\\\na) exposed \n\\f2 vmParameter\n\\f0  24 & 25 which control how memory is allocated/freed \\\n\n\\f2 Smalltalk vmParameterAt: 24 put: 48*1024*1024.\\\nSmalltalk vmParameterAt: 25 put: 24*1024*1024.\\\n\n\\f0 b) Added argv,argc, env variables to main\\\nc) Fixed for Jaguar 10.2. Full screen mode cmd-tab broke menu bar hiding, this is a 10.2 bug\\\nd) Added support for IP_ADD/DROPMEMBERSHIP and the ability to bind to the wild card port (0).\\\ne) OpenGL changes for TEA\\\n\\\n3.2.8b7 was testing release and not distributed to the public.\\\n3.2.8b6 was testing release and not distributed to the public.\\\n3.2.8b5\\\na) Oops broke the logic returning the vmversion information in classic. Also incremented os-x version (which was fine) to keep numbers in sync\\\n\\\n3.2.8b3 The squeak.sourceforge.net CVS tree was reorganized and the project builder project revamped. The \\\nmajor change to the source was upgrading the netscape browser plugin to 3.2.7b6 levels.\\\n\\\na) Gnunifer.3.cs Changed to add register var on FOO_REG and to remove sqGnu.h file embedded in method.\\\nb) sqMacDirectory.c Add logic to handle case of building as CFM carbon plugin under CW6, needed some carbon calls\\\nc) osExports.c needed to ifdef out the getUIToLock entry point (not available as CFM carbon browser plugin)\\\nd) sqMacFileLogic.c Fix alias problem. Add logic to deal with path names as CFM carbon browser plugin, ensure vmPath is correct.\\\ne) sqMacImageIO.c Cast to get rid of warning message\\\nf) sqMacMain.c Cast to get rid of warning message, Check for CFM Carbon and bundle check. Revise vm parm 1201 code to return long file names are ok as CFM carbon browser plugin. Some diagnostic routines for printing to the console as CFM carbon browser plugin.\\\ng) sqMacMemory.c Logic change as CFM carbon browser plugin.\\\nh) sqNSPlugin.c\tFix to beginFullScreen logic (carbon call is broken?)\\\ni) sqMacUIEvents.c Remove getUIToLock dummy call. This entry point should only exist for mach-o carbon builds. Not CFM carbon browser plugins\\\nj) sqMacWindow.c  Use old call to create window when a CW 5 carbon application.\\\nk) sqPlatformSpecific.h Change #ifdef to correct logic error when building as CFM carbon browser plugin under CW 5.\\\n\t\\\n\t\\\n\\\nMay 31st, 2002 (3.2.7b6)\\\nFor 3.2.7\\\n\\\n3.2.7b3 We build the VM using patchs to enable globals as a structure. This improves performance by 10%\\\n\\\na) Classic Vm builders might need to add \"struct foo *foo = &fum; \"  to int interpret(void). \\\nb) readme: add notes about changesets and alter build instructions\\\nc) sqMacFileLogic.c: use accessors for interp.c globals\\\nd) sqMacMain.c: use accessors for interp.c globals. Also Alain Fischer added logic to fetch os-x version number and to enable you to put squeak.image in the resource folder for autostarting.\\\ne) sqMacTime.h: Fix busted lowresclock again. After 24 days of mac uptime, 3.2.6 squeak will hang.\\\nf) sqMacUIEvents.h: use accessors for interp.c globals.\\\ng) sqPlatformSpecific.h: alter sqFTruncate to use fileno() as needed.\\\nh) sqMacWindow.c: use accessors for interp.c globals.\\\ni)  3.2.7b5 sqMacFileLogic.c: change vmpath to resolve to classic VM if vm is moved from MacOSClassic folder\\\nj) Misc changes for Netscape plugin support\\\nk) Introduce osExports.c logic\\\nl) 3.2.7b6 Fixed a problem in path name resolving need to use UTF8 to properly interact with high ascii characters\\\nm) 3.2.7b6 Fixed a problem in path name resolving there was a bug with certain types of alias path name combinations in quick name resolving.\\\n\\\nMac VM 3.2.6 mach-o build for Carbon, and build for Classic.\\\nMarch 14th, 2002\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f1 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\nNotes About previous VM.\\\n3.2.6b6 Classic or earlier has a bug that makes it stop collecting user input on a 19.88 hour cycle depending on reboot time.\\\n\tSeems many systems don't run for more than 19 hours so we've not had major complains about this issue. \\\n\tBug was introduced in 3.2.1.\\\n3.2.5 has a bug that prevents the use of accented characters without \\\n\ta image patch to fix a VM issue (not an issue in 3.2.4). Also you can't enter an double keystroke characters, ie ^ \\\n\twhich makes life difficult. It also does not support the AppleScript Plugin (not an issue in 3.2.4)\\\n3.2.4 a bug in project builder introduced a performance problem (bad compiler options).\\\n\\\nSee the 3.2.5 about why this 3.2.6 is different inside.\\\n\\\nFor 3.2.6:\\\na) Change an internal number that dictates how often pending interrupts should be looked at from 5ms to 3ms This improves \\\ndelay accuracy.\\\nb) Change how sleeping is done when squeak is idle. This reduces CPU consumption, and improves Delay accuracy.\\\nc) Fix bug with high bit problem with keyboard (accented characters are ok now)\\\n  c2) 3.2.6b6 has fixed characters that require multiple key strokes to enter.\\\nd) Externals that make UI interactions (IE AppleScript) Must now make a call back to the VM to schedule\\\n    the main thread to do the call that will invoke UI interaction to prevent a deadlock in Carbon between threads. \\\n   See the OSAExecute call in the AppleScript plugin for details.\\\ne) If you run a classic mac VM more than 23.x days nonstop it will stop responding to UI events.  Ensure clocks get anded with 536870911.\\\nf) signal inputSemaphoreIndex because we are mulithreaded. Not that it does anything for us yet...\\\ng) 3.2.6b6 Pass the unicode value of the keystroke up as the EventKeyDown/EventKeyUp data, versus mackeyboard code.\\\nh) Somewhere there is a bug with mktime + time, so use the unix code of time+localtime+gmt \\\ni) Change iorelinquishPrcessorForMicroseconds to sleep the quatum between now and wakeup time. Also schedule a\\\n   check for interrupts if wakeup time is now or in the past. This improves delay accuracy. For OS-x this was a big deal,\\\n   for os-9 it improves things by 1 or 2ms. Also in  os-x we sleep more when idle so CPU usage goes down.\\\nj) On OS-9 umap AND free the VM backing store. Just doing the free doesn't work and you lose 128Mb of disk space until you reboot\\\nk) 3.2.6b7 for post event processing ignore mouse move/drag/or scroll wheel events. These are ignored by the open/gl plugin and only suck a major amount of CPU time to process in the post event processing logic. \\\nl) 3.2.6b8 (3.2.6b4 classic) removed call to uncouple shift keys introduced in 3.2.1. This causes some macs after sleeping not to respond to keyboard input\\\nm) 3.2.6b8 (3.2.5b7 classic) added function for ioLowResMSecs to avoid early bit overflow. Rework clock checking in ioHandleEvents to handle clock rollovers properly.\\\n\\\nMac VM 3.2.5 mach-o build for Carbon, and build for Classic.\\\nMarch 4th, 2002\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f1 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\n\\\nBeware this version of the VM is significantly different inside! \\\n\\\n\\pard\\tx1440\\tx2880\\tx4320\\tx5760\\tx7200\\ql\\qnatural\n\n\\f2 \\cf0 a) Broke sqMacWindow.c into 10 different files by function type.\\\n\\\nb) Moved most of the memory allocation logic out of sqMacMain.c into sqMacMemory.c. and ensure memory is freed when Squeak is terminated. \\\nThe major change in this code is support for OS 9.x virtual memory mapping. This only applies to Mac OS 9.2.0 or higher, excluding os-x. It appears  Mac OS 9.1 has a bug that prevents this feature from working.\\\n\\\nFor images that require less than 128MB of memory, mapping is used to allow the image to grow/shrink to the 128MB boundary, therefore you can change the application memory size to about 2MB. \\\n\\\nFor images that require more than 128MB then change the application memory size to > 128MB and mapping will not occur. \\\n\\\nIf mapping is not available because virtual memory is turned off or the api is not supported by the macintosh OS then mapping is not used. Note that mapping is not support under the classic os-9.x environment under OS-X, however in this case you should be using the OS-X version of Squeak, not the classic version.\\\n\\\nc) Use of Carbon event logic for OS-X only. This is a major structural change. \\\n\\\nIt also encouraged the use of a pthread for interp.c. \\\n\\\nAll user interaction with the VM follows a new code path, so problems with keyboard or mouse input should be reported asap. Also any issues with application switching, windows being brought to the foreground or sent to the background and usage of the full screen logic should be reported asap.\\\n\\\nAs part of this change I have build in support for scroll-wheeled multi-button mice under os-x. Thanks to Doug Way for testing this for me. Maybe someone can post to the list what their favorite 3 button scroll wheeled mouse/trackball is.\\\n\\\nd) Use of a carbon call to get the dominate Device if you have multiple screens. People with multiple screens should confirm window resizing, full screen on/off works as expected.\\\n\\\ne) Corrected comment in sqMacFileLogic.c\\\n\\\nf) Changes to sqMacNSPlugin.c. This makes it compile, but it's not usable yet.\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 \\\n\\\nFeb 20th 2002 3.2.4\\\n\\\nFor this version of the VM I have migrated towards using OS-9 packages. This allows us to provide one \\\nfolder/package that supports os-x and previous operating system versions.\\\n\\\nGiven Squeak 3.2.4Beta1.app\\\nThe classic VM is found in the *.app:Contents:MacOSClassic, with an alias in *.app:\\\nThe mach-o OS-X VM is found in *.app.Contents:MacOS\\\n\\\nIf you are running OS-9 then clicking on the *.app or doing drag and drop will just run Squeak, same applies for OS-X.\\\nIf you are running OS-7.5.5 or OS-8.x then the *.app package will appear as a folder, just open and click on the alias within. \\\nNote that if you want to use classic plugins I suspect you need to put them in the MacOSClassic Folder beside the VM. \\\nBundles for os-x go in the same location as the *.app application package.\\\n\\\nChanges\\\na) Drag and drop at open time with image file that has no meta type, will now open the image, versus prompting you.\\\nb) Use an os-x window attribute at open time to signal that the window should not be moved by the dock when you go to full screen.\\\nc) Fix window update logic to use window that needs updating versus stwindowg to fix issues with print dialog windows in classic. \\\nd) bitblt gets recompile to pickup fixes posted in 3.2 update stream.\\\n\\\nFeb 5th 2002 3.2.3\\\nChanges\\\n\\\na) use old extended time manger to update psudeo-TickCount, versus sigalrm. siglarm make sound recording not work.\\\nb) fiddle with sound recording and make it work.\\\n\\\nJan 2002 3.2.2\\\nChanges:\\\n\\\na) AsyncFilePlugin.c Use global to remember security function entry point for performance reasons\\\nb) FilePlugin.c\tUse global to remember security function entry point for performance reasons\\\nc) interp.c Use squeakFileOffsetType versus off_t and add a bunch of checks to handle lack of long long and conversion errors between 64/32 bit integers and LargeInteger objects\\\nd) readme, it's http://www.mucow.com/Gnuifier.1.cs \\\ne) SocketPlugin.c\tUse global to remember security function entry point for performance reasons\\\nf) sq.h added default sqFilenameFromStringOpen and sqTruncate\\\ng) sqFilePluginBasicPrims.c revert to anti specs, but ensure #def to fseeko and ftello for 64 bit aware file systems.\\\nh) sqMacDirectory.c A bit more error checking on bad file names\\\ni) sqMacFileLogic.c Folders size is now zero in classic, and a bit more checking on bad file names\\\nj) sqMacSound.c Fixed a problem with sound recording in classic due to a change made in Sept. But sound recording still does not work under os-x\\\nk) sqMacWindow.c  two very important changes:\\\n\\\n\t1) You can now do FFI calls with the FFI bundle plugin to Mach-o frameworks. \\\n\tHowever you need to rework your api calls. For example:\\\n\tapiGetMousePoint: aMacPoint was\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'InterfaceLib'>\\\n\tIt now is:\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'Carbon.framework'>\\\n \t\\\n\tIf you review /System/Library/Frameworks I'm sure you can come up with interesting ways to \\\n\tmake mac only squeak images.\\\n\t\\\n\tI now use map( NULL, gMaxHeapSize, PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED,-1,0);\\\n\tanonymous memory mapping to 512MB as the squeak memory block. The VM can then grow or shrink\\\n\twithin the 512MB block, I just move a pointer. \\\n\t\\\n\tNote in 3.2.1 a slight error on my part restricted Squeak to 50MB. I am of course\\\n\tinterested to hear about issues with my choice of 512MB. Note a Squeak VM is limited to 2GB under perfect \\\n\tconditions, however if any part of the image crosses the 2GB boundary the VM will fail, right now 512MB\\\n\tseemed a safe choice.\\\n\t\\\n \tPhysMem:  60.2M wired, 78.6M active,  412M inactive,  551M used,  217M free\\\n\tVM: 3.03G + 55.3M   7847(0) pageins, 1(0) pageouts   \\\n\tPID COMMAND      %CPU   TIME   #TH #PRTS #DREGS RPRVT  RSHRD  RSIZE  VSIZE\\\n\t422 Squeak VM    0.8%  0:35.59   2    71   100  23.3M  8.53M  26.5M   571M\\\n\\\n\tbut I only have one 80,000,000 byte swap file in /var/vm\\\n\\\nNote if you turn crash reporter on, then if the VM crashes a nice report should be generated in your log directory.  See the Apple documentation for a description of this feature, currently it is set in OS-X 10.1.x via the preferences window for the Console Application. If you have a crash with this VM, please recreate and post the crash log (found in Users/foobar/Library/Logs/ to the Squeak mailing list so we can continue to make the VM fault tolerant.\\\n\\\n3.2.1 Notes\\\n\\\nYou might need these change sets to build a new VM or to use all the features of this VM with your image, hopefully these will get into the pending 3.2.x image.\\\n\\\nFixes and feature extensions.\\\nAsyncFileFixFu...hName-JMM.1.cs \tfix for async test method.\\\nDragAndDropAtStart-JMM.5.cs\t\tfix to enable drag and drop at startup\\\n\\\nNeeded to compile a VM with VMMaker\\\nLargeFiles-JMM.3.cs\t\t\t\tEnable large file support, files > 2GB\\\n\\\nNeeded to turn this feature on\\\nMacLongFileName-JMM.5.cs\t\t\tEnable long file names on the mac\\\n\\\nThe SUnit\\\nMacLongFileNamesSUnits-JMM.3.cs\tTest long file names and long directory names and large file support\\\n\\\nKinda optional features some people might need.\\\nInternetConfiguration-JMM.5.cs\t\tAllow internet configuration information access, internal plugin\\\nUUID-JMM.3.cs\t\t\t\t\tAllow UUID generation, internal plugin\\\n\\\na) The ability to get back a UUID. This uses the hosting UUID generator if the\\\n hosting OS supports it and we have a primitive we can call. If not then we generate\\\n a type 4 version of a UUID (the random bits one).\\\n(This requires a special change set)\\\n\\\nb) Ability to start squeak on the mac by dragging multiple documents onto the\\\nimage, or drag and drop of stuff onto the running VM icon.\\\n(This requires a special change set)\\\n\\\nc) Usage of the Internet Configuration tool kit to supply information about\\\nwhat the mac proxy is etc. etc.\\\n(This requires a special change set)\\\n\\\nd) Migrate file system to use 64 bits. This allows you to read/write and seek\\\nwith files > 2 GB. This includes a change to the VM to convert from/to long\\\nlong integers. It also allows the file system to actually deal with 2GB files,\\\nthe current file interface actually fails once the file exceeds 1GB.\\\n\\\ne) For the carbon based Squeak VM we now support long file names 255\\\ncharacters. Close both eyes and touch everywhere the mac VM deals with file\\\nname paths and hope for the best (Actually we write an Sunit to ensure we've\\\nnot broken everything). This also includes the ability to put an image in a\\\nlong file name directory, but right now the image name must stay under 32 characters.\\\n\\\nFilePlugin.c changes to support large integers.\\\nFilePlugin.h changes\\\nsq.h changes to support large files.\\\nsqConfig.h changes to resolve some conflicts.\\\nsqFilePluginBasicPrims.c  changes to support large files.\\\nsqMacAsyncFilePrims.c changes to use fspec versus 255 file path.\\\nsqMacDirectory.c changes to use hosting OS (OS-X) bsd create and delete directory\\\n and truncate. dir_look changes as part of the general rewrite.\\\nsqMacDragAndDrop.c use new call to get path name from fsspec. Use fsspec more, and added \\\n  interface code to setup drag and drop of items at application startup time. max document name\\\n  goes to 1000 characters.\\\nsqMacFileLogic.c Mostly rewrote!\\\nsqMacSecurity.c use new file calls.\\\nsqMacWindow.c \\\n\tincrease size of vmpath, docpath, imagepath to 1000 chars, shortname to 255 characters.\\\n\tadd logic for left/right modifier keys \\\n\treworked LoadLibViaPath logic \\\n\tsqImageFileOpen uses fsspec versus 255 path name.\\\n\tsqImageFileStartLocation uses ffspec.\\\n\tbundle support for bundles\\\n\t\\\ne2) interp.c supports get/put of large integers to long long integers.\\\ne3) fixed fTruncate\\\n\\\nHint getting this to work was a pain. Think of 255 character folder names and nested aliases,\\\nfolder 1 refers to folder 2 which then refers to folder 1 again, just go down the path say 8 times,\\\nthen ask to create a file or directory!\\\n\\\nf) Support to change the Mac screen resolution under Squeak control.\\\n\\\ng) Fix to unload/load the scrap at startup time to ensure the clipboard is\\\ncorrect when starting up the VM.\\\n\\\nh) Uncouple the shift key and left/right shift keys on old extended keyboard.\\\nAlso add a call to get which keys are currently pressed on a USB keyboard or\\\nthe USB codes for an apple non-usb keyboard. (Note this isn't working quite yet under OS-X)\\\n\\\ni) Changes to enable us to compile the VM under Apple's OS-X Project Builder\\\nenvironments.\\\n\\\nj) Some rewriting to ensure serial and midi support can be written as external\\\nplugins.\\\n\\\nk) Fiddling to get sound input to work under OS-X\\\n\\\nl) Platform.exports changed macintosh to macintoshSqueak to avoid conflict.\\\n\\\nm) Memory is allocated at 50MB at start, then will grow or shrink, verus previous carbon apps\\\n that did 1GB. \\\n \\\nn) sqPlatformSpecific.h changes to support long file names and os-x posix file names\\\n\\\no) sqVirtualmachine.c & sqVirtualmachine.h\\\n#if VM_PROXY_MINOR > 4\\\n\tVM->positive64BitIntegerFor = positive64BitIntegerFor;\\\n\tVM->positive64BitValueOf = positive64BitValueOf;\\\n\tVM->signed64BitIntegerFor = signed64BitIntegerFor;\\\n\tVM->signed64BitValueOf = signed64BitValueOf;\\\n#endif\\\n\\\nBeware this causes an interesting problem, if you compile plugins with VM_PROXY_MINOR now set to 5, then they will not work with older VMs. The solution is to define the VM_PROXY_MINOR in the plugin to the value that indicates what features it is using.\\\n\\\np) Changed to use ITimer logic as a 16ms lowres timer to improve performance\\\n\\\nq) Changed to use single thread, no thread manager.\\\n\\\nr) Changed to use lowres timer in checking for polling time to improve performance\\\n\\\ns) It should have faster startup times.\\\n\\\nt) It will hide the empty window at startup, then show the squeak window when required.\\\n\\\nu) It has a different menu structure.\\\n\\\nv) It does less I/O when navigating directories.\\\n\\\nThe macintosh 3.1Alpha1MT VM, Sept 24th 2001 \\\nThis VM was built with the base  3.1 image at change set #4347\\\nV3.1.1 at change set #4347\\\n\\\n\\\nWe go to V3.1.1 to indicate that the 3.1 VM is being used. In the past the 3.1 Image was used but some changes in the openGL logic makes  3.1 Vm and 3.0 image not quite work correctly with 3d graphics. Although a 3.1 VM will run many images way back to the 2x series no careful study has been done on the ability to do this. So at this point we are indicating this VM is a 3.1 VM and best used with a 3.1 image.\\\n\\\nUse of VMMaker to build VM. As of this version everything can be built as an external except for the window logic which hasn't been decoupled from the VM support for the macintosh. \\\n\\\n1) AsynchFilePlugin the security check for ability to create file is now a plugin call.\\\n2) B2DPlugin logic changes to fillLinearGradientfromtoat\\\n3) b3dRemapFaces, b3dRemapEdges, b3dRemapEdgeList, b3dRemapAET, b3dRemapEdgeVertices, b3dRemapFaceVertices, b3dRemapFaceFree, b3dRemapEdgeFree, b3dRemapAttributes. Some casting and changing of += to = + to make some compilers happy.\\\n4) BitBltPlugin added tableLookupat call.\\\n5) DropPlugin added setFileAccessCallback to allow the Security Module plugin the ability to give us the entry point to turn security off so we can open files as read only when security is turned on.  This was broken in the past. \\\n 6) FilePlugin added fileOpennamesizewrite,getThisSession to allow for callbacks. Changed the file security logic to use the plugin interface. \\\n7) interp.c, fixes for 4347ByteArrayRangeCheck-di, ability to printAllStacks, security calls for image rename, write to use plugin interface.\\\n8) Added GetAttributeString, and recordDragDropEvent and entry points for callbacks.\\\n9) SecurityPlugin changed when initialization is called to initialize the safe and unsafe directorys, also added entry points for all the testing calls so it can be a true plugin.\\\n10) Serialplugin. The serial plugin was redesigned to seperate out MIDI logic. People with MIDI devices and old serial macintosh should check to see if they still work since we lack equipment now to test this obsolete technology set.\\\n11) SocketPlugin. Make security calls true plugin calls.\\\n12 SoundGenerationPlugin. Removed \\\nEXPORT(int) SoundGenerationPlugin_primitiveFMSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveOldSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitivePluckedSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveWaveTableSoundMix(void);\\\nThey were a hack at the plugin level and discussion on the list seemed to show they were no longer used. \\\n13) Checking for if defined (__APPLE__) && defined(__MACH__) for the Mac OS-X native development environment\\\n14) Changed sqMacAsyncFilePrims, usage of interpreterProxy->, plugin calls for getThisSession. \\\n15) Changed sqMacDirectory.c. Removed some utility code and make it a seperate file so that it can be shared between sqMacWindow and other plugins that require them. \\\n16) Changed sqMacDragDrop.c. Added plugin callback for getSTWindow, the sqSetFileAccessCallback logic, fileOpennamesizewrite, and secHasFileAccess. Added logic to do the recordDragDropEvent callback to sqMacWindow.c \\\n17) sqMacNetwork.c. Some cleanup for the OS-X version of the OpenTransport headers, some constants have name changes\\\n18) sqMacNSPlugin.c Use of ioLoadFunctionFrom(NULL, \"DropPlugin\"); versus explicit call.\\\n19) sqMacOpenGL.c. Some cleanup for the OS-X version of the OpenGL headers\\\n20) sqMacOpenGLInfo.c. Some cleanup for the OS-X version of the OpenGL headers\\\n21) sqMacSecurity.c ioInitSecurity calls back to dragAndDrop plugin to set entry point to turn security off.  Added code to create directories if required and ensured callbacks are plugitized.\\\n22) sqMacSound.c Some cleanup for the OS-X version of the Sound headers. Use of interpreterProxy-> in the proper places.\\\n23) sqMacWindow.c Some cleanup for the OS-X version of the compiler.  Fixed saveAsEmbeddedImage, this got broken when we moved from a FAT to a ppc only application.  Altered interface to recordDragDropEvent so that it was plugable. Some file path name logic goes to a seperate C source file. The drag and drop plugin is loaded and intialized after the image is loaded but before the interpreter is started, before it was done a bit earlier in the startup process. This also has the effect of initializing the security module.\\\n24)sqOpenGLRenderer.c. Some cleanup for the OS-X version of the OpenGL headers\\\n25)SurfacePlugin.c gets a hack so it knows when it is internal versus external.\\\n\\\n\\\n\\\nv3.0.18 at change set #4081\\\n(Note browser plugin goes to 3.0.23\\\n\\\n1) sqMacOpenGL.c Quite a few changes were made to the code to support it as an internal plugin for the browser. This is because the drawable frame for a browser plugin is a subset of the browser's grafport, so lots more care must be taken to draw in the correct location using OpenGL. We also fixed issues with re-configurating the Open/GL draw area when the window gets resized or goes to full screen, and attempted to ensure multiple screens will work.\\\n\\\n2) sqMacWindow.c, minor fix to cast a constant char * to char * for CW 6.1\\\n\\\n\\\nBrowser plugin 3.0.23 fixes\\\n\\\n1) Integerated the H/W Acceleration as an builtin plugin\\\n2) Added logic for pre and post event interaction to browser plugin event handler for H/W Acceleration logic. The external H/W Acceleration plugin mostly works with the browser plugin but doesn't work with full screen mode, or if the plugin is embedded in a window or a scrollable frame, so don't use it. Use the browser plugin 3.0.23 or higher which has the H/W Acceleration builtin.\\\n\\\nv3.0.17 at change set #4081\\\n(Note browser plugin goes to 3.0.21)\\\n\\\n1) Added HW acceleration as internal plugin.\\\n2) 4079BBAlphaTextFix-ar Fixes the problem with alpha text, changes BitBltPlugin.c \\\n3) Added primitive on the mac to truncate a file.\\\n4) Added logic to flush volume on a flush file to ensure file and control blocks are flushed.\\\n5) For the Carbon VM we increase nextevent wait time if we get sufficent idle time. This should reduce CPU usage under OS-X\\\n6) GetAttribute: 1002 now returns the gestaltSystemVersion as a hex string, and getAttribute: 1003 now returns either '68K' or 'PowerPC'.\\\n7) Starting with 3.0.17 the VM is build only as a powerpc application. The latest VM as a 68K application will be made available from time to time permits based on people's needs. \\\n8) Changes to sqOpenGLRenderer.c to improve performance, OpenGL 1.1 support.\\\n\\\nPlugin 3.0.21 fixes\\\n\\\n1) added check for mailto: tag on posts to fix problem with Netscape crashing, and IE hanging.\\\n2) Plus above fixes.\\\n\\\nWhat has been fixed/changed.\\\nv3.0.16 at change set #4041\\\n(Note browser plugin goes to 3.0.20)\\\n\\\n1) Lots of fixes for BitBlt and HW acceleration.\\\n2) Hardware Acceleration plugin goes to 1.0.1. Please note there is a seperate plugin with the same name for Carbon. Doing a get info will identify if the plugin is only usable with Carbon Squeak.\\\n\\\nv3.0.15 at change set #4026 (May 17th test version)\\\n(Note browser plugin goes to 3.0.19)\\\n\\\n1) Added support for OpenGL HW acceleration plugin\\\n\\\nPlugin 3.0.19 fixes\\\n\\\na) Obey embedded tag plug\\\nb) Fix problem with plugin 3.0.17 not working with netscape 4.x\\\nc) Carbonize plugin for IE 5.1 \\\nd) Remove debugging printf than occurred on transition to full screen mode\\\n\\\nWhat has been fixed/changed.\\\nv3.0.14 at change set #3987\\\n\\\n(Note plugin goes to 3.0.17)\\\n\\\n1) sqMacDirectory.c. The pathlookup would handle the case of foo:bar::do incorrectly by ignoring the :: path redirection. This has been fixed. However a path lookup will not work if it contains :: and an aliased directory in the middle of the path.\\\n\\\n2) sqMacSecurity.c. The pathname for the untrustedUserDirectory was built incorrectly, and the bug mentioned above in sqMacDirectory.c usually kept this from being noticed.\\\n\\\n3) sqMacWindow.c  we added some logic to do the delay for primitiveRelinquishProcessor, but found it had an large effect on a freecell benchmark. I suspect on a Morpic step wait there is nothing to do so primitiveRelinquishProcessor gets called which then affects response time. So for now we revert to the 3.0.11 behavior, good performance and 100% CPU usage!\\\n\\\n4) GetAttribute 1004 returns returns interpreterVersion; which is for example\\\n\"Squeak3.1alpha of 6 February 2001 [latest update: #3987]\"\\\n\\\n5) When in full screen mode we now attempt to disable resizing, zooming, or moving the window. The window borders are hidden, but in the past it was feasible to grab an edge and alter it, thus confusing the VM.\\\n\\\n6) Worked on Carbonizing the browser plugin\\\n\\\n7) 3977 & 3978 FloatArray fixes. Makes float arrays go through a new (and working) version of #primitiveHash\\\n\\\n8) Fixed problem with accidental mouse clicks being triggered from pulldown menus on application switching.\\\n\\\n9)\\\n\"Change Set:\t\t3984 BitBltExtensions-ar\\\nDate:\t\t\t4 May 2001\\\nAuthor:\t\t\tAndreas Raab\\\n\\\nThe change set includes various extensions for BitBlt with the goal of migrating the useful features from FXBlt into the general BitBlt mechanisms. These include:\\\n\\\n* Handling of LSB and MSB forms:\\\nBitBlt now handles both, MSB and LSB forms (and their conversions). Only instances of Bitmap are assumed to contain big-endian pixels. All others are assumed to be little endian (reason is that we can only identify Bitmap here). Note that 'LSB' and 'MSB' refers to PIXELS, that is a 1bpp LSB form has its left most pixel in the lowest bit whereas a 1bpp MSB form has its left-most pixel in the highest bit.\\\n\\\nFor pixel depths < 8 this can be different from what your OS supplies (as an example, Windows bitmaps < 8 are big-endian pixels in little-endian words; we might call them 'middle-endian'). We simply don't deal with those - forms are either big or little endian but nothing inbetween.\\\n\\\nBitBlt has got an extra combination rule for swapping pixels in the destination form. This can be used to make byte swapping much more efficient (as soon as we've got more VMs with support for it).\\\n\\\n* Handling of 'native bitmaps' (aka surfaces):\\\nBitBlt is now able to deal with OS surfaces that are registered with the surface plugin.\\\n\\\n* Handling of full color maps:\\\nBitBlt has been extended to deal with instances of ColorMap in addition to the prior mechanism of using only indexed lookups and provide an implicit 16-32 bit color conversion. ColorMaps can specify both, a lookup table and an additional set of masks and shifts to apply during the color mapping operation. \\\n\\\nFour independent shifts and masks can be given which can be used for a lot more than just color conversion (as an example, one could do byte swapping with this; but see also BitBlt class>>exampleColorMap). \\\n\\\n* Better handling of default arguments:\\\nFor most of the required arguments for BitBlt very reasonable default assumptions can be made. This includes the destOrigin (0@0), clipRect (0@0 extent: destForm extent), sourceOrigin (0@0). BitBlt now substitutes these if they are absent (e.g., nil) in the instance provided.\\\n\\\n\"\\\n\\\n\\\nv3.0.13 at change set #3848\\\n\\\n1) sqMacSecurity was changed to set the unsecure directory to\\\n\tsystem folder:Preferences:Squeak:Internet:My Squeak\\\n\\\nv3.0.12 at change set #3848\\\n1) Fixed problem with creating My Squeak Folder in Documents Folder with System 8.6\\\n\\\nWhat has been fixed/changed.\\\nv3.0.11 at change set #3848\\\n\\\n1) sqMacDirectory had a bug when you resolved a path name. The fast resolve always failed, which invoked the slow resolver. Now the fast resolver works.\\\n\\\n2) sqMacSecurity was changed to set the unsecure directory to Documents:My Squeak. \\\n\\\n3) sqMacWindow was changed to fix some issues with Squeak capturing events from other applications and to reduce the number of duplicate mouse events that are generated. Also we capture modifier information  directly from the mouse and keyboard on null events to fix some problems with Carbon. We  hopefully fixed problems with mouse clicks from foreground applications being seen by Squeak and issues with the OS-X Dock clicks.\\\n\\\n4) sqMacNSPlugin was changed to use the above mouse/keyboard capture code which is much cleaner than the original fix for the bogus modifier information given to us by netscape on a null event. \\\n\\\n5) When you turn full screen off we now correctly reposition the window to the original location versus a few pixels to the left. \\\n\\\nWhat has been fixed/changed.\\\nv3.0.10 at change set #3848\\\n\\\n1) changed VM exception unwind logic\\\n\t3796-Exception-unwind-V3,tim@sumeru.stanford.edu, Paul McDonough, Stephen Pair and others\\\n\\\n2) Fixes for the JPEGReader plugin and for Jitter 3\\\n\\\n3) Added minimal Mac VM logic to assist in building a small VM.\\\n\\\n4) Changed how the browser plugin starts up. Now it starts the interpreter running only after getting the browser setwindow command. This seems to fix a race condition that resulted in a crash at startup time with Netscape 4.x\\\n\\\n5) Fixed broken full screen redraw on cmd-tab\\\n\\\n6) Fixed what looked like mouse-down, mouse-down, mouse-up sequence. Now reports mouse-down, mouse up.\\\n\\\n7) Added StarSqueak plugin as internal plugin\\\n\\\n8) Note the current Squeak Plugin should be gotten from the www.squeakland.org site.\\\n\\\nv3.0.9 at change set #3776, Boston Snow storm build.\\\n\\\n1) A number of changes were made to the interpreter:\\\n\ta) added primitive to change a class.\\\n\tb) added primitives to get or put 32bit integers\\\n\tc) Fix problem with GC and class reshaping\\\n\td) Better logic for method cache flushing\\\n\\\n2) Added JPEGReader plugin\\\n\\\n\\\nV3.0.8 at change set #3740\\\n\\\n1) The caps lock no longer maps to the shift attribute. So if the caps lock is down mouse clicks will behave normally. \\\n\\\n2) Numerous fixes for the BitBltPlugin plugin\\\n\\\n3) Memory allocation grow/shrink logic for Carbon was added.\\\n\\\n4) Spurious mouse clicks for the browser plugin has been fixed. (This took awhile to fix, I'm sure it's a bug with the Swedish version of Netscape)\\\n\\\n5) The browser plugin will attempt first to allocate memory from the browser heap, then the system heap. Most people when faced with a memory issue usually increase memory for the browser first. However memory for the plugin is controlled by an attribute in the EMBED HTML statement. \\\n\\\nV3.0.7\\\n\\\n1) A bug exists in pre OS 8.x that causes a crash in activate window if the standard get file \\\ndialog comes up before the Squeak Window. I remove the InvalWindow call found in that routine since it is actually redundant.\\\n\\\n2) The standard get file dialog on system 7.x would not terminate if you did a cancel.\\\n\\\n3) The InterfaceLib had to be weak linked to prevent CFM startup issues. \\\n\\\nV3.0.6\\\n\\\n1) Alias resolving is less aggressive.\\\n\\\n2) We no longer cache image reads or writes. This was done because OS 9.1 allows you to have very large disk caches, and it's pointless to cache the image read or write.\\\n\\\n3) The file flush primitive now actually flushes the file via an OS call. This was a bug in the CodeWarrior 5.3 source code.\\\n\\\n4) The 68K version was being built with the 68881 math library. This fails on 68040LC chips. We now use the non-68881 math library. Thanks to Bruce ONeel for find this.\\\n\\\n5) A bug was found in the path resolving logic that was added for 3.x. This bug apparently only affects 68K machines,  never was identified as a PowerPC issue. \\\n\\\n6) The Netscape plugin needs a properly allocated clip region, this code seemed to work ok on new systems, but fails on system 7.6.1\\\n\\\n7) The security interface will create a Documents folder on the root volume if the default Document folder has been deleted. This is needed for security purposes. \\\n\\\n8) Jitter needs 1MB of free memory to run.\\\n\\\n9) 68K machines require another 32K of stack\\\n\\\n10) Threads  now work on 68K machines, but turned off because of possible performance issues. (I think more study is needed).\\\n\\\n11) The 68K version was compiled with better optimization, expect a 15% improvement.\\\n\\\n12) fix for BitBltPlugin ascii = byteAt((sourcePtr + charIndex) - 1);\\\n\\\n13) The interpreter object validation checking code was alter to work correctly.\\\n\\\nV3.0.5\\\n\\\n1) sqConfig.h changed due to BE OS header changes\\\n\\\n2) sqMacDirectory.c. Added support for Navigation services or Standard File Get to find the image at startup time when the Squeak.image is not found by the VM. This replaces the DOS like console message that comes up saying that Squeak can't find a image.\\\n\\\n3) A fix to drag and drop for the browser plugin.\\\n\\\n4) We now use Apple's cooperative multithreading package to run the UI in one thread, the VM in the other. This solves some issues with the browser and makes the UI versus VM logic and execution responsibilities easier to understand. \\\n\\\n5) Changed the sqMacNSPlugin.c code to support a 3.0VM using multithreading support. This should give Squeak in a browser better performance. Also changed the full screen support to correctly work with multiple monitors.\\\n\\\n6) BitBltPlugin.c gets one more op code\\\n\\\n7) Added the security interface\\\n\\\n8) Added the file flush primitive\\\n\\\n9) Rewrote the macintosh readme file\\\n\\\n10) Revisited the zoomWindow code and found a bug with multiple monitor support, then I fixed the code to make Full Screen mode work on screen that Squeak window is mostly on, versus the menubar screen. Also if you switch from full screen back it resizes the window back to the orginal size and location before you invoked the full screen. \\\n\\\nV3.0.2\\\nPlugins\\\n\\\nRecompiled the internal BitBltPlugin plugin to encorporate:\\\nChange Set:\t\t258AlphaBlendOpt-dsm\\\nAuthor:\t\t\tDuane Maxwell, Paul Phillips/exobox\\\na) Short circuits full opaque and full transparent pixels when alpha blending.\\\n\\\nRecompiled the internal LargeIntegerPlugin\\\n3298LargeIntegersV1-2-sr -- Stephan Rudlof -- 29 November 2000\\\n3299LargeIntV1-2For29-sr -- Stephan Rudlof -- 29 November 2000\\\n\\\nVM Software\\\n\\\n(b) PowerManagement for macintosh is now supported. You can disable the power manager to give you better performance on some powerbooks at the expense of battery life. See the Preferences Panel for details, category 'Performance'\\\n- changed sq.h\\\n- changed sqMacWindow.c to add support for power mgr disabling\\\n\\\n(c) Drag and Drop support for the macintosh, dragging files from the Finder to the Squeak window is now supported.\\\n- sqMacDragDrop.c added\\\n- sqMacWindow.c changed\\\n\\\n(d) Added primitive for get macintosh creator and file type.\\\n- sqMacDirectory.c changed\\\n\\\n(e) Carbon support. Thanks to Karl Goiser karl@wattle.net for work he did on sound and other Carbonization hotspots.\\\n- sqMacAsyncFilePrims.c changed\\\n- sqMacFFIPPC.c changed (not supported for Carbon)\\\n- sqMacNetwork.c changed per Apple tech note 1173 Carbon asset tracking\\\n-sqMacSerialAndMIDIPort.c chnaged (Not supported for Carbon)\\\n- sqMacSound.c changed per Apple tech note 1198 Carbon double sound buffer playing\\\n- sqMacWindow.c changed (various changes for Carbon)\\\n\\\n(f)  Poll at least 60 times a second for the mouse if required. Previous 2.9.x VM did it 30 times but this is too slow and 2.8.x VM do it 60 times a second.\\\n\\\n(g) Reworked path support Thanks to Karl Goiser karl@wattle.net for starting this.\\\n- sqmacDirectory.c changed reworked lookupPath\\\n- sqMacWindow.c changed, added GetApplicationDirectory to get application directory\\\n\\\n(h) I rewrote the sqMacDirectory.c logic to enable proper understanding of Apple's Alias logic. This means for example you can alias the \"SqueakV3.sources\" file and then only have one copy and have all your images point to it. \\\n\\\n(i) Added Zoom Window support.\\\n\\\n(j) Change the Squeak change file icon to better match Apple's visual guidelines, Thanks to Doug Way for the suggestion and the new icons.\\\n\\\n(k) The sound plugins have changed...\\\n\\\n(j) Dropped FFI out of the base Squeak because of security concerns\\\n\\\n(k) Compiled for 750(G3) processor versus 603\\\n\\\n(l) Added screenDepth primitive\\\n\\\nThe 3.0.x VM contains most of the optional plugins, you might want to check this by inspecting \"Smalltalk listBuiltinModules\" to see where your plugins are coming from. In some case people have been accidentally overriding the new builtin plugins with older plugins. \\\n\\\nThe file \"Squeak 3.0Alpha10MT.sig\" contains the PGP signature for the Squeak 3.0Alpha10MT VM\\\n\\\nJohn M McIntosh  johnmci@smalltalkconsulting.com\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n}"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Documentation/3.5.0 Release Notes.rtf",
    "content": "{\\rtf1\\mac\\ansicpg10000\\cocoartf102\n{\\fonttbl\\f0\\fnil\\fcharset77 Geneva;\\f1\\fswiss\\fcharset77 Helvetica;\\f2\\fnil\\fcharset77 LucidaGrande;\n}\n{\\colortbl;\\red255\\green255\\blue255;}\n\\margl1440\\margr1440\\vieww17300\\viewh12720\\viewkind0\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0\\fs24 \\cf0 Mac VM 3.5.0 mach-o build for Carbon, and build for Classic. Support for Croquet, and support for Safari\\\nFeb 14th, 2003 (3.5.0b3)\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets. (Yawn, someday)\\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\n\\\nNotes About previous VM.\\\n3.2.6 VM classic have an issue when the tickcount clock goes over 0x7FFFFFFF, about 24 days. \\\nThis exhibits it self as Squeak won't accept user input, or allow you to switch under os 9 or earlier.\\\nStarting a Squeak image hangs durning the screen painting.\\\nRestarting the mac solved these problems. Force quit does not.\\\nThis is fixed in 3.2.7b3\\\nSome issues with alias files and folder were fixed in 3.2.7b6 and 3.2.8b3\\\n3.4.0b2 seems a fine VM, from what people tell me, but now we've 3.5.0...\\\n\\\n3.5.0b4 \\\na) os-x exposed an issue with EToyPeerToPeer support. It seems under os-x we get the connect, data, close so fast on lans that by the \\\ntime we get around to asking for the remote IP address the connection is closed, and our open transport call fails. We change SqMacNetwork.c to \\\nreturn the IP address discovered at connect time in this case. Under os-9 we never saw this behavior because we suspect the network activity \\\nwas slower and more serialized. \\\n\\\n3.5.0b3 (Safari support)\\\n\\\na) The plugin logic was changed to support Safari and better support os-x. This required building a CFM stub to load the mach-o compiled\\\nNSPLugin. The mach-o plugin now uses a pthread for the interp.c loop. This gives much better performance and user UI feedback. \\\nb) The GC logic was carefully reworked to optimize the assembler on the ppc. This gave us upwards of a 30-50% improvement, since \\\nincremental GC is going on all the time, this change actually has a effect you can see say in the solitaire example where we save 10%. \\\nc) sqMacNetwork.c was modified, first change in many years. The remote address and port number are requested as an async operation. \\\nThe operation times out after a few milliseconds. This was never a problem in os-9. Now it seems there is an issue sometimes for DHCP clients\\\non os-x. There the operation can timeout and return 0 as the address or port. We changed the call to do a sync operation to avoid a timeout.\\\nd) sqMacMain.c was modified to allow for pthreads for mach-o netscape based squeakland plugin support\\\ne) sqMacMemory.c changes for mach-o plugin support\\\nf) sqMacTime.c changes for  mach-o plugin support\\\ng) sqMacUIEvents.c changes for mach-o plugin support\\\nh) sqMacWindow.c changes for mach-o plugin support \\\ni) npmac.cpp now this is a netscape glue routine, I changed it to ensure we can see the entry points, originally they are C++, but need \\\nto be \"C\" so the loader can find the names the CFM glue routine is looking for. Also we add the logic TV2FP to setup the mach-0 to CFM code stubs to allow the mach-o plugin to callback to the CFM stubs in Safari. \\\nj) sqMacNSPlugin.c \\\n\t1) Rearrange when the interpret() thread is started to ensure a race condition doesn't happen.\\\n\t2) use Pthreads for the mach-o osx version. \\\n\t3) rework NPP_SetWindow to start interpret() when needed. \\\n\t4) Alter StartDraw, EndDraw to use a mutex lock and handle os-x port locking to prevent races between pthreads.\\\n\t5) Alter ioShowDisplay, optimization and handle os-x\\\n\t6) fix ioSetFullScreen to make it work on Safari\\\n\t7) fix OpenFileReadOnly to make it work on os-x, needed sqFileNameFromStringOpen macro call\\\n\t8) Alter ExitCleanup to mutex lock to prevent race ending issues, and add a bit more cleanup\\\n\\\n\\\n\\\nNote some versions of 3.4.1 were distributed for testing only, these are superseded by 3.5.0\\\n\\\n3.4.0b2 (Croquet support)\\\n\\\na) Ensure vmVersion information reports correct information, was bogus in 3.4.0b1\\\n\\\n3.4.0b1 (Croquet support)\\\na) Added plugin BMPReadWriterPlugin 14 November 2002 (i)\\\nb) B3DAcceleratorPlugin.c gets primitiveCreateRendererFlags (new api)\\\nc) two more op codes get added to BitBltPlugin (fixAlphawith, pixClearwith)\\\nd) Squeak3D gets (b3dOrthoNormInverseMatrix, b3dTransformDirection,b3dTransformPoint,b3dTransposeMatrix)\\\ne) The scroll wheel mouse logic was using apple cmd key as the modifier on the arrow key events, Other platforms use the Control key. So the \\\nmac falls in line (changed to use the control-key)\\\n\\\n3.2.8b9\\\na) recompiled os-x version, 3.2.8b8 seem to have a bad compiler option and gave 20% less performance.\\\n \\\n3.2.8b8\\\na) exposed \n\\f1 vmParameter\n\\f0  24 & 25 which control how memory is allocated/freed \\\n\n\\f1 Smalltalk vmParameterAt: 24 put: 48*1024*1024.\\\nSmalltalk vmParameterAt: 25 put: 24*1024*1024.\\\n\n\\f0 b) Added argv,argc, env variables to main\\\nc) Fixed for Jaguar 10.2. Full screen mode cmd-tab broke menu bar hiding, this is a 10.2 bug\\\nd) Added support for IP_ADD/DROPMEMBERSHIP and the ability to bind to the wild card port (0).\\\ne) OpenGL changes for TEA\\\n\\\n3.2.8b7 was testing release and not distributed to the public.\\\n3.2.8b6 was testing release and not distributed to the public.\\\n3.2.8b5\\\na) Oops broke the logic returning the vmversion information in classic. Also incremented os-x version (which was fine) to keep numbers in sync\\\n\\\n3.2.8b3 The squeak.sourceforge.net CVS tree was reorganized and the project builder project revamped. The \\\nmajor change to the source was upgrading the netscape browser plugin to 3.2.7b6 levels.\\\n\\\na) Gnunifer.3.cs Changed to add register var on FOO_REG and to remove sqGnu.h file embedded in method.\\\nb) sqMacDirectory.c Add logic to handle case of building as CFM carbon plugin under CW6, needed some carbon calls\\\nc) osExports.c needed to ifdef out the getUIToLock entry point (not available as CFM carbon browser plugin)\\\nd) sqMacFileLogic.c Fix alias problem. Add logic to deal with path names as CFM carbon browser plugin, ensure vmPath is correct.\\\ne) sqMacImageIO.c Cast to get rid of warning message\\\nf) sqMacMain.c Cast to get rid of warning message, Check for CFM Carbon and bundle check. Revise vm parm 1201 code to return long file names are ok as CFM carbon browser plugin. Some diagnostic routines for printing to the console as CFM carbon browser plugin.\\\ng) sqMacMemory.c Logic change as CFM carbon browser plugin.\\\nh) sqNSPlugin.c\tFix to beginFullScreen logic (carbon call is broken?)\\\ni) sqMacUIEvents.c Remove getUIToLock dummy call. This entry point should only exist for mach-o carbon builds. Not CFM carbon browser plugins\\\nj) sqMacWindow.c  Use old call to create window when a CW 5 carbon application.\\\nk) sqPlatformSpecific.h Change #ifdef to correct logic error when building as CFM carbon browser plugin under CW 5.\\\n\t\\\n\t\\\n\\\nMay 31st, 2002 (3.2.7b6)\\\nFor 3.2.7\\\n\\\n3.2.7b3 We build the VM using patchs to enable globals as a structure. This improves performance by 10%\\\n\\\na) Classic Vm builders might need to add \"struct foo *foo = &fum; \"  to int interpret(void). \\\nb) readme: add notes about changesets and alter build instructions\\\nc) sqMacFileLogic.c: use accessors for interp.c globals\\\nd) sqMacMain.c: use accessors for interp.c globals. Also Alain Fischer added logic to fetch os-x version number and to enable you to put squeak.image in the resource folder for autostarting.\\\ne) sqMacTime.h: Fix busted lowresclock again. After 24 days of mac uptime, 3.2.6 squeak will hang.\\\nf) sqMacUIEvents.h: use accessors for interp.c globals.\\\ng) sqPlatformSpecific.h: alter sqFTruncate to use fileno() as needed.\\\nh) sqMacWindow.c: use accessors for interp.c globals.\\\ni)  3.2.7b5 sqMacFileLogic.c: change vmpath to resolve to classic VM if vm is moved from MacOSClassic folder\\\nj) Misc changes for Netscape plugin support\\\nk) Introduce osExports.c logic\\\nl) 3.2.7b6 Fixed a problem in path name resolving need to use UTF8 to properly interact with high ascii characters\\\nm) 3.2.7b6 Fixed a problem in path name resolving there was a bug with certain types of alias path name combinations in quick name resolving.\\\n\\\nMac VM 3.2.6 mach-o build for Carbon, and build for Classic.\\\nMarch 14th, 2002\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f2 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\nNotes About previous VM.\\\n3.2.6b6 Classic or earlier has a bug that makes it stop collecting user input on a 19.88 hour cycle depending on reboot time.\\\n\tSeems many systems don't run for more than 19 hours so we've not had major complains about this issue. \\\n\tBug was introduced in 3.2.1.\\\n3.2.5 has a bug that prevents the use of accented characters without \\\n\ta image patch to fix a VM issue (not an issue in 3.2.4). Also you can't enter an double keystroke characters, ie ^ \\\n\twhich makes life difficult. It also does not support the AppleScript Plugin (not an issue in 3.2.4)\\\n3.2.4 a bug in project builder introduced a performance problem (bad compiler options).\\\n\\\nSee the 3.2.5 about why this 3.2.6 is different inside.\\\n\\\nFor 3.2.6:\\\na) Change an internal number that dictates how often pending interrupts should be looked at from 5ms to 3ms This improves \\\ndelay accuracy.\\\nb) Change how sleeping is done when squeak is idle. This reduces CPU consumption, and improves Delay accuracy.\\\nc) Fix bug with high bit problem with keyboard (accented characters are ok now)\\\n  c2) 3.2.6b6 has fixed characters that require multiple key strokes to enter.\\\nd) Externals that make UI interactions (IE AppleScript) Must now make a call back to the VM to schedule\\\n    the main thread to do the call that will invoke UI interaction to prevent a deadlock in Carbon between threads. \\\n   See the OSAExecute call in the AppleScript plugin for details.\\\ne) If you run a classic mac VM more than 23.x days nonstop it will stop responding to UI events.  Ensure clocks get anded with 536870911.\\\nf) signal inputSemaphoreIndex because we are mulithreaded. Not that it does anything for us yet...\\\ng) 3.2.6b6 Pass the unicode value of the keystroke up as the EventKeyDown/EventKeyUp data, versus mackeyboard code.\\\nh) Somewhere there is a bug with mktime + time, so use the unix code of time+localtime+gmt \\\ni) Change iorelinquishPrcessorForMicroseconds to sleep the quatum between now and wakeup time. Also schedule a\\\n   check for interrupts if wakeup time is now or in the past. This improves delay accuracy. For OS-x this was a big deal,\\\n   for os-9 it improves things by 1 or 2ms. Also in  os-x we sleep more when idle so CPU usage goes down.\\\nj) On OS-9 umap AND free the VM backing store. Just doing the free doesn't work and you lose 128Mb of disk space until you reboot\\\nk) 3.2.6b7 for post event processing ignore mouse move/drag/or scroll wheel events. These are ignored by the open/gl plugin and only suck a major amount of CPU time to process in the post event processing logic. \\\nl) 3.2.6b8 (3.2.6b4 classic) removed call to uncouple shift keys introduced in 3.2.1. This causes some macs after sleeping not to respond to keyboard input\\\nm) 3.2.6b8 (3.2.5b7 classic) added function for ioLowResMSecs to avoid early bit overflow. Rework clock checking in ioHandleEvents to handle clock rollovers properly.\\\n\\\nMac VM 3.2.5 mach-o build for Carbon, and build for Classic.\\\nMarch 4th, 2002\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f2 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\n\\\nBeware this version of the VM is significantly different inside! \\\n\\\n\\pard\\tx1440\\tx2880\\tx4320\\tx5760\\tx7200\\ql\\qnatural\n\n\\f1 \\cf0 a) Broke sqMacWindow.c into 10 different files by function type.\\\n\\\nb) Moved most of the memory allocation logic out of sqMacMain.c into sqMacMemory.c. and ensure memory is freed when Squeak is terminated. \\\nThe major change in this code is support for OS 9.x virtual memory mapping. This only applies to Mac OS 9.2.0 or higher, excluding os-x. It appears  Mac OS 9.1 has a bug that prevents this feature from working.\\\n\\\nFor images that require less than 128MB of memory, mapping is used to allow the image to grow/shrink to the 128MB boundary, therefore you can change the application memory size to about 2MB. \\\n\\\nFor images that require more than 128MB then change the application memory size to > 128MB and mapping will not occur. \\\n\\\nIf mapping is not available because virtual memory is turned off or the api is not supported by the macintosh OS then mapping is not used. Note that mapping is not support under the classic os-9.x environment under OS-X, however in this case you should be using the OS-X version of Squeak, not the classic version.\\\n\\\nc) Use of Carbon event logic for OS-X only. This is a major structural change. \\\n\\\nIt also encouraged the use of a pthread for interp.c. \\\n\\\nAll user interaction with the VM follows a new code path, so problems with keyboard or mouse input should be reported asap. Also any issues with application switching, windows being brought to the foreground or sent to the background and usage of the full screen logic should be reported asap.\\\n\\\nAs part of this change I have build in support for scroll-wheeled multi-button mice under os-x. Thanks to Doug Way for testing this for me. Maybe someone can post to the list what their favorite 3 button scroll wheeled mouse/trackball is.\\\n\\\nd) Use of a carbon call to get the dominate Device if you have multiple screens. People with multiple screens should confirm window resizing, full screen on/off works as expected.\\\n\\\ne) Corrected comment in sqMacFileLogic.c\\\n\\\nf) Changes to sqMacNSPlugin.c. This makes it compile, but it's not usable yet.\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 \\\n\\\nFeb 20th 2002 3.2.4\\\n\\\nFor this version of the VM I have migrated towards using OS-9 packages. This allows us to provide one \\\nfolder/package that supports os-x and previous operating system versions.\\\n\\\nGiven Squeak 3.2.4Beta1.app\\\nThe classic VM is found in the *.app:Contents:MacOSClassic, with an alias in *.app:\\\nThe mach-o OS-X VM is found in *.app.Contents:MacOS\\\n\\\nIf you are running OS-9 then clicking on the *.app or doing drag and drop will just run Squeak, same applies for OS-X.\\\nIf you are running OS-7.5.5 or OS-8.x then the *.app package will appear as a folder, just open and click on the alias within. \\\nNote that if you want to use classic plugins I suspect you need to put them in the MacOSClassic Folder beside the VM. \\\nBundles for os-x go in the same location as the *.app application package.\\\n\\\nChanges\\\na) Drag and drop at open time with image file that has no meta type, will now open the image, versus prompting you.\\\nb) Use an os-x window attribute at open time to signal that the window should not be moved by the dock when you go to full screen.\\\nc) Fix window update logic to use window that needs updating versus stwindowg to fix issues with print dialog windows in classic. \\\nd) bitblt gets recompile to pickup fixes posted in 3.2 update stream.\\\n\\\nFeb 5th 2002 3.2.3\\\nChanges\\\n\\\na) use old extended time manger to update psudeo-TickCount, versus sigalrm. siglarm make sound recording not work.\\\nb) fiddle with sound recording and make it work.\\\n\\\nJan 2002 3.2.2\\\nChanges:\\\n\\\na) AsyncFilePlugin.c Use global to remember security function entry point for performance reasons\\\nb) FilePlugin.c\tUse global to remember security function entry point for performance reasons\\\nc) interp.c Use squeakFileOffsetType versus off_t and add a bunch of checks to handle lack of long long and conversion errors between 64/32 bit integers and LargeInteger objects\\\nd) readme, it's http://www.mucow.com/Gnuifier.1.cs \\\ne) SocketPlugin.c\tUse global to remember security function entry point for performance reasons\\\nf) sq.h added default sqFilenameFromStringOpen and sqTruncate\\\ng) sqFilePluginBasicPrims.c revert to anti specs, but ensure #def to fseeko and ftello for 64 bit aware file systems.\\\nh) sqMacDirectory.c A bit more error checking on bad file names\\\ni) sqMacFileLogic.c Folders size is now zero in classic, and a bit more checking on bad file names\\\nj) sqMacSound.c Fixed a problem with sound recording in classic due to a change made in Sept. But sound recording still does not work under os-x\\\nk) sqMacWindow.c  two very important changes:\\\n\\\n\t1) You can now do FFI calls with the FFI bundle plugin to Mach-o frameworks. \\\n\tHowever you need to rework your api calls. For example:\\\n\tapiGetMousePoint: aMacPoint was\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'InterfaceLib'>\\\n\tIt now is:\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'Carbon.framework'>\\\n \t\\\n\tIf you review /System/Library/Frameworks I'm sure you can come up with interesting ways to \\\n\tmake mac only squeak images.\\\n\t\\\n\tI now use map( NULL, gMaxHeapSize, PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED,-1,0);\\\n\tanonymous memory mapping to 512MB as the squeak memory block. The VM can then grow or shrink\\\n\twithin the 512MB block, I just move a pointer. \\\n\t\\\n\tNote in 3.2.1 a slight error on my part restricted Squeak to 50MB. I am of course\\\n\tinterested to hear about issues with my choice of 512MB. Note a Squeak VM is limited to 2GB under perfect \\\n\tconditions, however if any part of the image crosses the 2GB boundary the VM will fail, right now 512MB\\\n\tseemed a safe choice.\\\n\t\\\n \tPhysMem:  60.2M wired, 78.6M active,  412M inactive,  551M used,  217M free\\\n\tVM: 3.03G + 55.3M   7847(0) pageins, 1(0) pageouts   \\\n\tPID COMMAND      %CPU   TIME   #TH #PRTS #DREGS RPRVT  RSHRD  RSIZE  VSIZE\\\n\t422 Squeak VM    0.8%  0:35.59   2    71   100  23.3M  8.53M  26.5M   571M\\\n\\\n\tbut I only have one 80,000,000 byte swap file in /var/vm\\\n\\\nNote if you turn crash reporter on, then if the VM crashes a nice report should be generated in your log directory.  See the Apple documentation for a description of this feature, currently it is set in OS-X 10.1.x via the preferences window for the Console Application. If you have a crash with this VM, please recreate and post the crash log (found in Users/foobar/Library/Logs/ to the Squeak mailing list so we can continue to make the VM fault tolerant.\\\n\\\n3.2.1 Notes\\\n\\\nYou might need these change sets to build a new VM or to use all the features of this VM with your image, hopefully these will get into the pending 3.2.x image.\\\n\\\nFixes and feature extensions.\\\nAsyncFileFixFu...hName-JMM.1.cs \tfix for async test method.\\\nDragAndDropAtStart-JMM.5.cs\t\tfix to enable drag and drop at startup\\\n\\\nNeeded to compile a VM with VMMaker\\\nLargeFiles-JMM.3.cs\t\t\t\tEnable large file support, files > 2GB\\\n\\\nNeeded to turn this feature on\\\nMacLongFileName-JMM.5.cs\t\t\tEnable long file names on the mac\\\n\\\nThe SUnit\\\nMacLongFileNamesSUnits-JMM.3.cs\tTest long file names and long directory names and large file support\\\n\\\nKinda optional features some people might need.\\\nInternetConfiguration-JMM.5.cs\t\tAllow internet configuration information access, internal plugin\\\nUUID-JMM.3.cs\t\t\t\t\tAllow UUID generation, internal plugin\\\n\\\na) The ability to get back a UUID. This uses the hosting UUID generator if the\\\n hosting OS supports it and we have a primitive we can call. If not then we generate\\\n a type 4 version of a UUID (the random bits one).\\\n(This requires a special change set)\\\n\\\nb) Ability to start squeak on the mac by dragging multiple documents onto the\\\nimage, or drag and drop of stuff onto the running VM icon.\\\n(This requires a special change set)\\\n\\\nc) Usage of the Internet Configuration tool kit to supply information about\\\nwhat the mac proxy is etc. etc.\\\n(This requires a special change set)\\\n\\\nd) Migrate file system to use 64 bits. This allows you to read/write and seek\\\nwith files > 2 GB. This includes a change to the VM to convert from/to long\\\nlong integers. It also allows the file system to actually deal with 2GB files,\\\nthe current file interface actually fails once the file exceeds 1GB.\\\n\\\ne) For the carbon based Squeak VM we now support long file names 255\\\ncharacters. Close both eyes and touch everywhere the mac VM deals with file\\\nname paths and hope for the best (Actually we write an Sunit to ensure we've\\\nnot broken everything). This also includes the ability to put an image in a\\\nlong file name directory, but right now the image name must stay under 32 characters.\\\n\\\nFilePlugin.c changes to support large integers.\\\nFilePlugin.h changes\\\nsq.h changes to support large files.\\\nsqConfig.h changes to resolve some conflicts.\\\nsqFilePluginBasicPrims.c  changes to support large files.\\\nsqMacAsyncFilePrims.c changes to use fspec versus 255 file path.\\\nsqMacDirectory.c changes to use hosting OS (OS-X) bsd create and delete directory\\\n and truncate. dir_look changes as part of the general rewrite.\\\nsqMacDragAndDrop.c use new call to get path name from fsspec. Use fsspec more, and added \\\n  interface code to setup drag and drop of items at application startup time. max document name\\\n  goes to 1000 characters.\\\nsqMacFileLogic.c Mostly rewrote!\\\nsqMacSecurity.c use new file calls.\\\nsqMacWindow.c \\\n\tincrease size of vmpath, docpath, imagepath to 1000 chars, shortname to 255 characters.\\\n\tadd logic for left/right modifier keys \\\n\treworked LoadLibViaPath logic \\\n\tsqImageFileOpen uses fsspec versus 255 path name.\\\n\tsqImageFileStartLocation uses ffspec.\\\n\tbundle support for bundles\\\n\t\\\ne2) interp.c supports get/put of large integers to long long integers.\\\ne3) fixed fTruncate\\\n\\\nHint getting this to work was a pain. Think of 255 character folder names and nested aliases,\\\nfolder 1 refers to folder 2 which then refers to folder 1 again, just go down the path say 8 times,\\\nthen ask to create a file or directory!\\\n\\\nf) Support to change the Mac screen resolution under Squeak control.\\\n\\\ng) Fix to unload/load the scrap at startup time to ensure the clipboard is\\\ncorrect when starting up the VM.\\\n\\\nh) Uncouple the shift key and left/right shift keys on old extended keyboard.\\\nAlso add a call to get which keys are currently pressed on a USB keyboard or\\\nthe USB codes for an apple non-usb keyboard. (Note this isn't working quite yet under OS-X)\\\n\\\ni) Changes to enable us to compile the VM under Apple's OS-X Project Builder\\\nenvironments.\\\n\\\nj) Some rewriting to ensure serial and midi support can be written as external\\\nplugins.\\\n\\\nk) Fiddling to get sound input to work under OS-X\\\n\\\nl) Platform.exports changed macintosh to macintoshSqueak to avoid conflict.\\\n\\\nm) Memory is allocated at 50MB at start, then will grow or shrink, verus previous carbon apps\\\n that did 1GB. \\\n \\\nn) sqPlatformSpecific.h changes to support long file names and os-x posix file names\\\n\\\no) sqVirtualmachine.c & sqVirtualmachine.h\\\n#if VM_PROXY_MINOR > 4\\\n\tVM->positive64BitIntegerFor = positive64BitIntegerFor;\\\n\tVM->positive64BitValueOf = positive64BitValueOf;\\\n\tVM->signed64BitIntegerFor = signed64BitIntegerFor;\\\n\tVM->signed64BitValueOf = signed64BitValueOf;\\\n#endif\\\n\\\nBeware this causes an interesting problem, if you compile plugins with VM_PROXY_MINOR now set to 5, then they will not work with older VMs. The solution is to define the VM_PROXY_MINOR in the plugin to the value that indicates what features it is using.\\\n\\\np) Changed to use ITimer logic as a 16ms lowres timer to improve performance\\\n\\\nq) Changed to use single thread, no thread manager.\\\n\\\nr) Changed to use lowres timer in checking for polling time to improve performance\\\n\\\ns) It should have faster startup times.\\\n\\\nt) It will hide the empty window at startup, then show the squeak window when required.\\\n\\\nu) It has a different menu structure.\\\n\\\nv) It does less I/O when navigating directories.\\\n\\\nThe macintosh 3.1Alpha1MT VM, Sept 24th 2001 \\\nThis VM was built with the base  3.1 image at change set #4347\\\nV3.1.1 at change set #4347\\\n\\\n\\\nWe go to V3.1.1 to indicate that the 3.1 VM is being used. In the past the 3.1 Image was used but some changes in the openGL logic makes  3.1 Vm and 3.0 image not quite work correctly with 3d graphics. Although a 3.1 VM will run many images way back to the 2x series no careful study has been done on the ability to do this. So at this point we are indicating this VM is a 3.1 VM and best used with a 3.1 image.\\\n\\\nUse of VMMaker to build VM. As of this version everything can be built as an external except for the window logic which hasn't been decoupled from the VM support for the macintosh. \\\n\\\n1) AsynchFilePlugin the security check for ability to create file is now a plugin call.\\\n2) B2DPlugin logic changes to fillLinearGradientfromtoat\\\n3) b3dRemapFaces, b3dRemapEdges, b3dRemapEdgeList, b3dRemapAET, b3dRemapEdgeVertices, b3dRemapFaceVertices, b3dRemapFaceFree, b3dRemapEdgeFree, b3dRemapAttributes. Some casting and changing of += to = + to make some compilers happy.\\\n4) BitBltPlugin added tableLookupat call.\\\n5) DropPlugin added setFileAccessCallback to allow the Security Module plugin the ability to give us the entry point to turn security off so we can open files as read only when security is turned on.  This was broken in the past. \\\n 6) FilePlugin added fileOpennamesizewrite,getThisSession to allow for callbacks. Changed the file security logic to use the plugin interface. \\\n7) interp.c, fixes for 4347ByteArrayRangeCheck-di, ability to printAllStacks, security calls for image rename, write to use plugin interface.\\\n8) Added GetAttributeString, and recordDragDropEvent and entry points for callbacks.\\\n9) SecurityPlugin changed when initialization is called to initialize the safe and unsafe directorys, also added entry points for all the testing calls so it can be a true plugin.\\\n10) Serialplugin. The serial plugin was redesigned to seperate out MIDI logic. People with MIDI devices and old serial macintosh should check to see if they still work since we lack equipment now to test this obsolete technology set.\\\n11) SocketPlugin. Make security calls true plugin calls.\\\n12 SoundGenerationPlugin. Removed \\\nEXPORT(int) SoundGenerationPlugin_primitiveFMSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveOldSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitivePluckedSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveWaveTableSoundMix(void);\\\nThey were a hack at the plugin level and discussion on the list seemed to show they were no longer used. \\\n13) Checking for if defined (__APPLE__) && defined(__MACH__) for the Mac OS-X native development environment\\\n14) Changed sqMacAsyncFilePrims, usage of interpreterProxy->, plugin calls for getThisSession. \\\n15) Changed sqMacDirectory.c. Removed some utility code and make it a seperate file so that it can be shared between sqMacWindow and other plugins that require them. \\\n16) Changed sqMacDragDrop.c. Added plugin callback for getSTWindow, the sqSetFileAccessCallback logic, fileOpennamesizewrite, and secHasFileAccess. Added logic to do the recordDragDropEvent callback to sqMacWindow.c \\\n17) sqMacNetwork.c. Some cleanup for the OS-X version of the OpenTransport headers, some constants have name changes\\\n18) sqMacNSPlugin.c Use of ioLoadFunctionFrom(NULL, \"DropPlugin\"); versus explicit call.\\\n19) sqMacOpenGL.c. Some cleanup for the OS-X version of the OpenGL headers\\\n20) sqMacOpenGLInfo.c. Some cleanup for the OS-X version of the OpenGL headers\\\n21) sqMacSecurity.c ioInitSecurity calls back to dragAndDrop plugin to set entry point to turn security off.  Added code to create directories if required and ensured callbacks are plugitized.\\\n22) sqMacSound.c Some cleanup for the OS-X version of the Sound headers. Use of interpreterProxy-> in the proper places.\\\n23) sqMacWindow.c Some cleanup for the OS-X version of the compiler.  Fixed saveAsEmbeddedImage, this got broken when we moved from a FAT to a ppc only application.  Altered interface to recordDragDropEvent so that it was plugable. Some file path name logic goes to a seperate C source file. The drag and drop plugin is loaded and intialized after the image is loaded but before the interpreter is started, before it was done a bit earlier in the startup process. This also has the effect of initializing the security module.\\\n24)sqOpenGLRenderer.c. Some cleanup for the OS-X version of the OpenGL headers\\\n25)SurfacePlugin.c gets a hack so it knows when it is internal versus external.\\\n\\\n\\\n\\\nv3.0.18 at change set #4081\\\n(Note browser plugin goes to 3.0.23\\\n\\\n1) sqMacOpenGL.c Quite a few changes were made to the code to support it as an internal plugin for the browser. This is because the drawable frame for a browser plugin is a subset of the browser's grafport, so lots more care must be taken to draw in the correct location using OpenGL. We also fixed issues with re-configurating the Open/GL draw area when the window gets resized or goes to full screen, and attempted to ensure multiple screens will work.\\\n\\\n2) sqMacWindow.c, minor fix to cast a constant char * to char * for CW 6.1\\\n\\\n\\\nBrowser plugin 3.0.23 fixes\\\n\\\n1) Integerated the H/W Acceleration as an builtin plugin\\\n2) Added logic for pre and post event interaction to browser plugin event handler for H/W Acceleration logic. The external H/W Acceleration plugin mostly works with the browser plugin but doesn't work with full screen mode, or if the plugin is embedded in a window or a scrollable frame, so don't use it. Use the browser plugin 3.0.23 or higher which has the H/W Acceleration builtin.\\\n\\\nv3.0.17 at change set #4081\\\n(Note browser plugin goes to 3.0.21)\\\n\\\n1) Added HW acceleration as internal plugin.\\\n2) 4079BBAlphaTextFix-ar Fixes the problem with alpha text, changes BitBltPlugin.c \\\n3) Added primitive on the mac to truncate a file.\\\n4) Added logic to flush volume on a flush file to ensure file and control blocks are flushed.\\\n5) For the Carbon VM we increase nextevent wait time if we get sufficent idle time. This should reduce CPU usage under OS-X\\\n6) GetAttribute: 1002 now returns the gestaltSystemVersion as a hex string, and getAttribute: 1003 now returns either '68K' or 'PowerPC'.\\\n7) Starting with 3.0.17 the VM is build only as a powerpc application. The latest VM as a 68K application will be made available from time to time permits based on people's needs. \\\n8) Changes to sqOpenGLRenderer.c to improve performance, OpenGL 1.1 support.\\\n\\\nPlugin 3.0.21 fixes\\\n\\\n1) added check for mailto: tag on posts to fix problem with Netscape crashing, and IE hanging.\\\n2) Plus above fixes.\\\n\\\nWhat has been fixed/changed.\\\nv3.0.16 at change set #4041\\\n(Note browser plugin goes to 3.0.20)\\\n\\\n1) Lots of fixes for BitBlt and HW acceleration.\\\n2) Hardware Acceleration plugin goes to 1.0.1. Please note there is a seperate plugin with the same name for Carbon. Doing a get info will identify if the plugin is only usable with Carbon Squeak.\\\n\\\nv3.0.15 at change set #4026 (May 17th test version)\\\n(Note browser plugin goes to 3.0.19)\\\n\\\n1) Added support for OpenGL HW acceleration plugin\\\n\\\nPlugin 3.0.19 fixes\\\n\\\na) Obey embedded tag plug\\\nb) Fix problem with plugin 3.0.17 not working with netscape 4.x\\\nc) Carbonize plugin for IE 5.1 \\\nd) Remove debugging printf than occurred on transition to full screen mode\\\n\\\nWhat has been fixed/changed.\\\nv3.0.14 at change set #3987\\\n\\\n(Note plugin goes to 3.0.17)\\\n\\\n1) sqMacDirectory.c. The pathlookup would handle the case of foo:bar::do incorrectly by ignoring the :: path redirection. This has been fixed. However a path lookup will not work if it contains :: and an aliased directory in the middle of the path.\\\n\\\n2) sqMacSecurity.c. The pathname for the untrustedUserDirectory was built incorrectly, and the bug mentioned above in sqMacDirectory.c usually kept this from being noticed.\\\n\\\n3) sqMacWindow.c  we added some logic to do the delay for primitiveRelinquishProcessor, but found it had an large effect on a freecell benchmark. I suspect on a Morpic step wait there is nothing to do so primitiveRelinquishProcessor gets called which then affects response time. So for now we revert to the 3.0.11 behavior, good performance and 100% CPU usage!\\\n\\\n4) GetAttribute 1004 returns returns interpreterVersion; which is for example\\\n\"Squeak3.1alpha of 6 February 2001 [latest update: #3987]\"\\\n\\\n5) When in full screen mode we now attempt to disable resizing, zooming, or moving the window. The window borders are hidden, but in the past it was feasible to grab an edge and alter it, thus confusing the VM.\\\n\\\n6) Worked on Carbonizing the browser plugin\\\n\\\n7) 3977 & 3978 FloatArray fixes. Makes float arrays go through a new (and working) version of #primitiveHash\\\n\\\n8) Fixed problem with accidental mouse clicks being triggered from pulldown menus on application switching.\\\n\\\n9)\\\n\"Change Set:\t\t3984 BitBltExtensions-ar\\\nDate:\t\t\t4 May 2001\\\nAuthor:\t\t\tAndreas Raab\\\n\\\nThe change set includes various extensions for BitBlt with the goal of migrating the useful features from FXBlt into the general BitBlt mechanisms. These include:\\\n\\\n* Handling of LSB and MSB forms:\\\nBitBlt now handles both, MSB and LSB forms (and their conversions). Only instances of Bitmap are assumed to contain big-endian pixels. All others are assumed to be little endian (reason is that we can only identify Bitmap here). Note that 'LSB' and 'MSB' refers to PIXELS, that is a 1bpp LSB form has its left most pixel in the lowest bit whereas a 1bpp MSB form has its left-most pixel in the highest bit.\\\n\\\nFor pixel depths < 8 this can be different from what your OS supplies (as an example, Windows bitmaps < 8 are big-endian pixels in little-endian words; we might call them 'middle-endian'). We simply don't deal with those - forms are either big or little endian but nothing inbetween.\\\n\\\nBitBlt has got an extra combination rule for swapping pixels in the destination form. This can be used to make byte swapping much more efficient (as soon as we've got more VMs with support for it).\\\n\\\n* Handling of 'native bitmaps' (aka surfaces):\\\nBitBlt is now able to deal with OS surfaces that are registered with the surface plugin.\\\n\\\n* Handling of full color maps:\\\nBitBlt has been extended to deal with instances of ColorMap in addition to the prior mechanism of using only indexed lookups and provide an implicit 16-32 bit color conversion. ColorMaps can specify both, a lookup table and an additional set of masks and shifts to apply during the color mapping operation. \\\n\\\nFour independent shifts and masks can be given which can be used for a lot more than just color conversion (as an example, one could do byte swapping with this; but see also BitBlt class>>exampleColorMap). \\\n\\\n* Better handling of default arguments:\\\nFor most of the required arguments for BitBlt very reasonable default assumptions can be made. This includes the destOrigin (0@0), clipRect (0@0 extent: destForm extent), sourceOrigin (0@0). BitBlt now substitutes these if they are absent (e.g., nil) in the instance provided.\\\n\\\n\"\\\n\\\n\\\nv3.0.13 at change set #3848\\\n\\\n1) sqMacSecurity was changed to set the unsecure directory to\\\n\tsystem folder:Preferences:Squeak:Internet:My Squeak\\\n\\\nv3.0.12 at change set #3848\\\n1) Fixed problem with creating My Squeak Folder in Documents Folder with System 8.6\\\n\\\nWhat has been fixed/changed.\\\nv3.0.11 at change set #3848\\\n\\\n1) sqMacDirectory had a bug when you resolved a path name. The fast resolve always failed, which invoked the slow resolver. Now the fast resolver works.\\\n\\\n2) sqMacSecurity was changed to set the unsecure directory to Documents:My Squeak. \\\n\\\n3) sqMacWindow was changed to fix some issues with Squeak capturing events from other applications and to reduce the number of duplicate mouse events that are generated. Also we capture modifier information  directly from the mouse and keyboard on null events to fix some problems with Carbon. We  hopefully fixed problems with mouse clicks from foreground applications being seen by Squeak and issues with the OS-X Dock clicks.\\\n\\\n4) sqMacNSPlugin was changed to use the above mouse/keyboard capture code which is much cleaner than the original fix for the bogus modifier information given to us by netscape on a null event. \\\n\\\n5) When you turn full screen off we now correctly reposition the window to the original location versus a few pixels to the left. \\\n\\\nWhat has been fixed/changed.\\\nv3.0.10 at change set #3848\\\n\\\n1) changed VM exception unwind logic\\\n\t3796-Exception-unwind-V3,tim@sumeru.stanford.edu, Paul McDonough, Stephen Pair and others\\\n\\\n2) Fixes for the JPEGReader plugin and for Jitter 3\\\n\\\n3) Added minimal Mac VM logic to assist in building a small VM.\\\n\\\n4) Changed how the browser plugin starts up. Now it starts the interpreter running only after getting the browser setwindow command. This seems to fix a race condition that resulted in a crash at startup time with Netscape 4.x\\\n\\\n5) Fixed broken full screen redraw on cmd-tab\\\n\\\n6) Fixed what looked like mouse-down, mouse-down, mouse-up sequence. Now reports mouse-down, mouse up.\\\n\\\n7) Added StarSqueak plugin as internal plugin\\\n\\\n8) Note the current Squeak Plugin should be gotten from the www.squeakland.org site.\\\n\\\nv3.0.9 at change set #3776, Boston Snow storm build.\\\n\\\n1) A number of changes were made to the interpreter:\\\n\ta) added primitive to change a class.\\\n\tb) added primitives to get or put 32bit integers\\\n\tc) Fix problem with GC and class reshaping\\\n\td) Better logic for method cache flushing\\\n\\\n2) Added JPEGReader plugin\\\n\\\n\\\nV3.0.8 at change set #3740\\\n\\\n1) The caps lock no longer maps to the shift attribute. So if the caps lock is down mouse clicks will behave normally. \\\n\\\n2) Numerous fixes for the BitBltPlugin plugin\\\n\\\n3) Memory allocation grow/shrink logic for Carbon was added.\\\n\\\n4) Spurious mouse clicks for the browser plugin has been fixed. (This took awhile to fix, I'm sure it's a bug with the Swedish version of Netscape)\\\n\\\n5) The browser plugin will attempt first to allocate memory from the browser heap, then the system heap. Most people when faced with a memory issue usually increase memory for the browser first. However memory for the plugin is controlled by an attribute in the EMBED HTML statement. \\\n\\\nV3.0.7\\\n\\\n1) A bug exists in pre OS 8.x that causes a crash in activate window if the standard get file \\\ndialog comes up before the Squeak Window. I remove the InvalWindow call found in that routine since it is actually redundant.\\\n\\\n2) The standard get file dialog on system 7.x would not terminate if you did a cancel.\\\n\\\n3) The InterfaceLib had to be weak linked to prevent CFM startup issues. \\\n\\\nV3.0.6\\\n\\\n1) Alias resolving is less aggressive.\\\n\\\n2) We no longer cache image reads or writes. This was done because OS 9.1 allows you to have very large disk caches, and it's pointless to cache the image read or write.\\\n\\\n3) The file flush primitive now actually flushes the file via an OS call. This was a bug in the CodeWarrior 5.3 source code.\\\n\\\n4) The 68K version was being built with the 68881 math library. This fails on 68040LC chips. We now use the non-68881 math library. Thanks to Bruce ONeel for find this.\\\n\\\n5) A bug was found in the path resolving logic that was added for 3.x. This bug apparently only affects 68K machines,  never was identified as a PowerPC issue. \\\n\\\n6) The Netscape plugin needs a properly allocated clip region, this code seemed to work ok on new systems, but fails on system 7.6.1\\\n\\\n7) The security interface will create a Documents folder on the root volume if the default Document folder has been deleted. This is needed for security purposes. \\\n\\\n8) Jitter needs 1MB of free memory to run.\\\n\\\n9) 68K machines require another 32K of stack\\\n\\\n10) Threads  now work on 68K machines, but turned off because of possible performance issues. (I think more study is needed).\\\n\\\n11) The 68K version was compiled with better optimization, expect a 15% improvement.\\\n\\\n12) fix for BitBltPlugin ascii = byteAt((sourcePtr + charIndex) - 1);\\\n\\\n13) The interpreter object validation checking code was alter to work correctly.\\\n\\\nV3.0.5\\\n\\\n1) sqConfig.h changed due to BE OS header changes\\\n\\\n2) sqMacDirectory.c. Added support for Navigation services or Standard File Get to find the image at startup time when the Squeak.image is not found by the VM. This replaces the DOS like console message that comes up saying that Squeak can't find a image.\\\n\\\n3) A fix to drag and drop for the browser plugin.\\\n\\\n4) We now use Apple's cooperative multithreading package to run the UI in one thread, the VM in the other. This solves some issues with the browser and makes the UI versus VM logic and execution responsibilities easier to understand. \\\n\\\n5) Changed the sqMacNSPlugin.c code to support a 3.0VM using multithreading support. This should give Squeak in a browser better performance. Also changed the full screen support to correctly work with multiple monitors.\\\n\\\n6) BitBltPlugin.c gets one more op code\\\n\\\n7) Added the security interface\\\n\\\n8) Added the file flush primitive\\\n\\\n9) Rewrote the macintosh readme file\\\n\\\n10) Revisited the zoomWindow code and found a bug with multiple monitor support, then I fixed the code to make Full Screen mode work on screen that Squeak window is mostly on, versus the menubar screen. Also if you switch from full screen back it resizes the window back to the orginal size and location before you invoked the full screen. \\\n\\\nV3.0.2\\\nPlugins\\\n\\\nRecompiled the internal BitBltPlugin plugin to encorporate:\\\nChange Set:\t\t258AlphaBlendOpt-dsm\\\nAuthor:\t\t\tDuane Maxwell, Paul Phillips/exobox\\\na) Short circuits full opaque and full transparent pixels when alpha blending.\\\n\\\nRecompiled the internal LargeIntegerPlugin\\\n3298LargeIntegersV1-2-sr -- Stephan Rudlof -- 29 November 2000\\\n3299LargeIntV1-2For29-sr -- Stephan Rudlof -- 29 November 2000\\\n\\\nVM Software\\\n\\\n(b) PowerManagement for macintosh is now supported. You can disable the power manager to give you better performance on some powerbooks at the expense of battery life. See the Preferences Panel for details, category 'Performance'\\\n- changed sq.h\\\n- changed sqMacWindow.c to add support for power mgr disabling\\\n\\\n(c) Drag and Drop support for the macintosh, dragging files from the Finder to the Squeak window is now supported.\\\n- sqMacDragDrop.c added\\\n- sqMacWindow.c changed\\\n\\\n(d) Added primitive for get macintosh creator and file type.\\\n- sqMacDirectory.c changed\\\n\\\n(e) Carbon support. Thanks to Karl Goiser karl@wattle.net for work he did on sound and other Carbonization hotspots.\\\n- sqMacAsyncFilePrims.c changed\\\n- sqMacFFIPPC.c changed (not supported for Carbon)\\\n- sqMacNetwork.c changed per Apple tech note 1173 Carbon asset tracking\\\n-sqMacSerialAndMIDIPort.c chnaged (Not supported for Carbon)\\\n- sqMacSound.c changed per Apple tech note 1198 Carbon double sound buffer playing\\\n- sqMacWindow.c changed (various changes for Carbon)\\\n\\\n(f)  Poll at least 60 times a second for the mouse if required. Previous 2.9.x VM did it 30 times but this is too slow and 2.8.x VM do it 60 times a second.\\\n\\\n(g) Reworked path support Thanks to Karl Goiser karl@wattle.net for starting this.\\\n- sqmacDirectory.c changed reworked lookupPath\\\n- sqMacWindow.c changed, added GetApplicationDirectory to get application directory\\\n\\\n(h) I rewrote the sqMacDirectory.c logic to enable proper understanding of Apple's Alias logic. This means for example you can alias the \"SqueakV3.sources\" file and then only have one copy and have all your images point to it. \\\n\\\n(i) Added Zoom Window support.\\\n\\\n(j) Change the Squeak change file icon to better match Apple's visual guidelines, Thanks to Doug Way for the suggestion and the new icons.\\\n\\\n(k) The sound plugins have changed...\\\n\\\n(j) Dropped FFI out of the base Squeak because of security concerns\\\n\\\n(k) Compiled for 750(G3) processor versus 603\\\n\\\n(l) Added screenDepth primitive\\\n\\\nThe 3.0.x VM contains most of the optional plugins, you might want to check this by inspecting \"Smalltalk listBuiltinModules\" to see where your plugins are coming from. In some case people have been accidentally overriding the new builtin plugins with older plugins. \\\n\\\nThe file \"Squeak 3.0Alpha10MT.sig\" contains the PGP signature for the Squeak 3.0Alpha10MT VM\\\n\\\nJohn M McIntosh  johnmci@smalltalkconsulting.com\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n}"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Documentation/3.5.1 Release Notes.rtf",
    "content": "{\\rtf1\\mac\\ansicpg10000\\cocoartf102\n{\\fonttbl\\f0\\fnil\\fcharset77 Geneva;\\f1\\fswiss\\fcharset77 Helvetica;\\f2\\fnil\\fcharset77 LucidaGrande;\n}\n{\\colortbl;\\red255\\green255\\blue255;\\red26\\green26\\blue255;}\n\\margl1440\\margr1440\\vieww17300\\viewh12720\\viewkind0\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0\\fs24 \\cf0 Mac VM 3.5.1 mach-o build for Carbon, and build for Classic. Support for Croquet, and support for Safari\\\nJune 19th, 2003 (3.5.1b4)\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets. (Yawn, someday)\\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\n\\\nNotes About previous VM.\\\n3.2.6 VM classic have an issue when the tickcount clock goes over 0x7FFFFFFF, about 24 days. \\\nThis exhibits it self as Squeak won't accept user input, or allow you to switch under os 9 or earlier.\\\nStarting a Squeak image hangs durning the screen painting.\\\nRestarting the mac solved these problems. Force quit does not.\\\nThis is fixed in 3.2.7b3\\\nSome issues with alias files and folder were fixed in 3.2.7b6 and 3.2.8b3\\\n3.5.0b4 seems a fine VM, from what people tell me, but now we've 3.5.1...\\\n\\\n3.5.1b5 Added some more user changeable attributes, and changed some window behaviour when floating\\\nOS-x Version only \\\nSqueakWindowHasTitle\t\t- (Yes/No) yes if window should get title.\\\nSqueakFloatingWindowGetsFocus (Yes/No) yes if window should allow click and type if floating.\\\nSqueakMaxHeapSize\t\t- (Number) set to 512K, max size for os-x memory heap. Note changing this to 1GB may or may not cause a \\\n\t\t\t\t\t\tcore dump depending on where os-x allocates the memory segment above or below the 2GB boundary. \\\n\\\nsqMacUIEvents.c\t\t\t- set keyboard focus to floating window if required, do not hide floating window when we go to full screen mode.\\\nsqMacWindows.c\t\t\t- watch out for memory leak when we free the color table. \\\n\\\n3.5.1b4 Please note the major changes to network code in 3.5.1b2\\\na)Added options SqueakWindowType & SqueakWIndowAttributes to info.plist. The SqueakWindowType of 6 is the standard document window, a type of 8 is the floating utility window. The attributes control with window attributes and behavior according to\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f1 \\cf2 \\ul http://developer.apple.com/techpubs/macosx/Carbon/HumanInterfaceToolbox/WindowManager/Window_Manager/wind_mgr_ref/constant_2.html#//apple_ref/c/tdef/WindowAttributes\\\n&\\cf0 \\ulnone \\\n\\cf2 \\ul http://developer.apple.com/techpubs/macosx/Carbon/HumanInterfaceToolbox/WindowManager/Window_Manager/wind_mgr_ref/constant_1.html#//apple_ref/doc/c_ref/WindowClass\\cf0 \\ulnone \\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 b) Sockets are not valid if the network is not initialized. \\\nc) The os-9 vm can return the open file error in the vm attribute data 1202\\\nd) MyWindowEventMouseHandler was leaking region handles.\\\ne) Support for primitiveClosureValue, primitiveClosureValueWithArgs, primitiveExecuteMethod\\\nf) when rootTableCount  goes > 2400 then allocationCount gets allocationsBetweenGCs + 1 \\\ng) BitBlt Alpha Blending has changed\\\nh) Added primitiveWrite24BmpLine\\\ni) The guard if statement for primitiveSerialPortRead was flawed, noted the buffer overflow, but then proceeded, versus returning. \\\n\\\n3.5.1b3 \\\na) Fix, Stephane Ducasse <ducasse@iam.unibe.ch> pointed out that using a virtual desktop we had a crash in ioSetFullScreen. This \\\nwas due to a pthread race condition between the UI thread and interp.c. Fixed by using UI callback to handle fullscreen window/move/resize.\\\n\\\n3.5.1b2\\\na) Switch to aio.h logic and unix socket logic! This is a MAJOR change!!!!\\\n\\\nb) Call aioPoll  (select()) to cause process wait versus old pthread logic. This follows in the footsteps of the unix port. You should verify that \\\ncpu time when squeak is idle is not affected in a dreadful manner.\\\nc) Fix, if you call does this directory exists on a file now you will get an error which will signal that the directory does not exist. This ensures\\\nthe FileDirectory test suite works. \\\nd) Fix, if you quit the browser plugin, check the status of the pthread_cancel before attempting the pthread_join\\\n \\\n3.5.1b1 limited distribution\\\n\\\n3.5.0b4 \\\na) os-x exposed an issue with EToyPeerToPeer support. It seems under os-x we get the connect, data, close so fast on lans that by the \\\ntime we get around to asking for the remote IP address the connection is closed, and our open transport call fails. We change SqMacNetwork.c to \\\nreturn the IP address discovered at connect time in this case. Under os-9 we never saw this behavior because we suspect the network activity \\\nwas slower and more serialized. \\\n\\\n3.5.0b3 (Safari support)\\\n\\\na) The plugin logic was changed to support Safari and better support os-x. This required building a CFM stub to load the mach-o compiled\\\nNSPLugin. The mach-o plugin now uses a pthread for the interp.c loop. This gives much better performance and user UI feedback. \\\nb) The GC logic was carefully reworked to optimize the assembler on the ppc. This gave us upwards of a 30-50% improvement, since \\\nincremental GC is going on all the time, this change actually has a effect you can see say in the solitaire example where we save 10%. \\\nc) sqMacNetwork.c was modified, first change in many years. The remote address and port number are requested as an async operation. \\\nThe operation times out after a few milliseconds. This was never a problem in os-9. Now it seems there is an issue sometimes for DHCP clients\\\non os-x. There the operation can timeout and return 0 as the address or port. We changed the call to do a sync operation to avoid a timeout.\\\nd) sqMacMain.c was modified to allow for pthreads for mach-o netscape based squeakland plugin support\\\ne) sqMacMemory.c changes for mach-o plugin support\\\nf) sqMacTime.c changes for  mach-o plugin support\\\ng) sqMacUIEvents.c changes for mach-o plugin support\\\nh) sqMacWindow.c changes for mach-o plugin support \\\ni) npmac.cpp now this is a netscape glue routine, I changed it to ensure we can see the entry points, originally they are C++, but need \\\nto be \"C\" so the loader can find the names the CFM glue routine is looking for. Also we add the logic TV2FP to setup the mach-0 to CFM code stubs to allow the mach-o plugin to callback to the CFM stubs in Safari. \\\nj) sqMacNSPlugin.c \\\n\t1) Rearrange when the interpret() thread is started to ensure a race condition doesn't happen.\\\n\t2) use Pthreads for the mach-o osx version. \\\n\t3) rework NPP_SetWindow to start interpret() when needed. \\\n\t4) Alter StartDraw, EndDraw to use a mutex lock and handle os-x port locking to prevent races between pthreads.\\\n\t5) Alter ioShowDisplay, optimization and handle os-x\\\n\t6) fix ioSetFullScreen to make it work on Safari\\\n\t7) fix OpenFileReadOnly to make it work on os-x, needed sqFileNameFromStringOpen macro call\\\n\t8) Alter ExitCleanup to mutex lock to prevent race ending issues, and add a bit more cleanup\\\n\\\n\\\n\\\nNote some versions of 3.4.1 were distributed for testing only, these are superseded by 3.5.0\\\n\\\n3.4.0b2 (Croquet support)\\\n\\\na) Ensure vmVersion information reports correct information, was bogus in 3.4.0b1\\\n\\\n3.4.0b1 (Croquet support)\\\na) Added plugin BMPReadWriterPlugin 14 November 2002 (i)\\\nb) B3DAcceleratorPlugin.c gets primitiveCreateRendererFlags (new api)\\\nc) two more op codes get added to BitBltPlugin (fixAlphawith, pixClearwith)\\\nd) Squeak3D gets (b3dOrthoNormInverseMatrix, b3dTransformDirection,b3dTransformPoint,b3dTransposeMatrix)\\\ne) The scroll wheel mouse logic was using apple cmd key as the modifier on the arrow key events, Other platforms use the Control key. So the \\\nmac falls in line (changed to use the control-key)\\\n\\\n3.2.8b9\\\na) recompiled os-x version, 3.2.8b8 seem to have a bad compiler option and gave 20% less performance.\\\n \\\n3.2.8b8\\\na) exposed \n\\f1 vmParameter\n\\f0  24 & 25 which control how memory is allocated/freed \\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f1 \\cf0 Smalltalk vmParameterAt: 24 put: 48*1024*1024.\\\nSmalltalk vmParameterAt: 25 put: 24*1024*1024.\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 b) Added argv,argc, env variables to main\\\nc) Fixed for Jaguar 10.2. Full screen mode cmd-tab broke menu bar hiding, this is a 10.2 bug\\\nd) Added support for IP_ADD/DROPMEMBERSHIP and the ability to bind to the wild card port (0).\\\ne) OpenGL changes for TEA\\\n\\\n3.2.8b7 was testing release and not distributed to the public.\\\n3.2.8b6 was testing release and not distributed to the public.\\\n3.2.8b5\\\na) Oops broke the logic returning the vmversion information in classic. Also incremented os-x version (which was fine) to keep numbers in sync\\\n\\\n3.2.8b3 The squeak.sourceforge.net CVS tree was reorganized and the project builder project revamped. The \\\nmajor change to the source was upgrading the netscape browser plugin to 3.2.7b6 levels.\\\n\\\na) Gnunifer.3.cs Changed to add register var on FOO_REG and to remove sqGnu.h file embedded in method.\\\nb) sqMacDirectory.c Add logic to handle case of building as CFM carbon plugin under CW6, needed some carbon calls\\\nc) osExports.c needed to ifdef out the getUIToLock entry point (not available as CFM carbon browser plugin)\\\nd) sqMacFileLogic.c Fix alias problem. Add logic to deal with path names as CFM carbon browser plugin, ensure vmPath is correct.\\\ne) sqMacImageIO.c Cast to get rid of warning message\\\nf) sqMacMain.c Cast to get rid of warning message, Check for CFM Carbon and bundle check. Revise vm parm 1201 code to return long file names are ok as CFM carbon browser plugin. Some diagnostic routines for printing to the console as CFM carbon browser plugin.\\\ng) sqMacMemory.c Logic change as CFM carbon browser plugin.\\\nh) sqNSPlugin.c\tFix to beginFullScreen logic (carbon call is broken?)\\\ni) sqMacUIEvents.c Remove getUIToLock dummy call. This entry point should only exist for mach-o carbon builds. Not CFM carbon browser plugins\\\nj) sqMacWindow.c  Use old call to create window when a CW 5 carbon application.\\\nk) sqPlatformSpecific.h Change #ifdef to correct logic error when building as CFM carbon browser plugin under CW 5.\\\n\t\\\n\t\\\n\\\nMay 31st, 2002 (3.2.7b6)\\\nFor 3.2.7\\\n\\\n3.2.7b3 We build the VM using patchs to enable globals as a structure. This improves performance by 10%\\\n\\\na) Classic Vm builders might need to add \"struct foo *foo = &fum; \"  to int interpret(void). \\\nb) readme: add notes about changesets and alter build instructions\\\nc) sqMacFileLogic.c: use accessors for interp.c globals\\\nd) sqMacMain.c: use accessors for interp.c globals. Also Alain Fischer added logic to fetch os-x version number and to enable you to put squeak.image in the resource folder for autostarting.\\\ne) sqMacTime.h: Fix busted lowresclock again. After 24 days of mac uptime, 3.2.6 squeak will hang.\\\nf) sqMacUIEvents.h: use accessors for interp.c globals.\\\ng) sqPlatformSpecific.h: alter sqFTruncate to use fileno() as needed.\\\nh) sqMacWindow.c: use accessors for interp.c globals.\\\ni)  3.2.7b5 sqMacFileLogic.c: change vmpath to resolve to classic VM if vm is moved from MacOSClassic folder\\\nj) Misc changes for Netscape plugin support\\\nk) Introduce osExports.c logic\\\nl) 3.2.7b6 Fixed a problem in path name resolving need to use UTF8 to properly interact with high ascii characters\\\nm) 3.2.7b6 Fixed a problem in path name resolving there was a bug with certain types of alias path name combinations in quick name resolving.\\\n\\\nMac VM 3.2.6 mach-o build for Carbon, and build for Classic.\\\nMarch 14th, 2002\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f2 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\nNotes About previous VM.\\\n3.2.6b6 Classic or earlier has a bug that makes it stop collecting user input on a 19.88 hour cycle depending on reboot time.\\\n\tSeems many systems don't run for more than 19 hours so we've not had major complains about this issue. \\\n\tBug was introduced in 3.2.1.\\\n3.2.5 has a bug that prevents the use of accented characters without \\\n\ta image patch to fix a VM issue (not an issue in 3.2.4). Also you can't enter an double keystroke characters, ie ^ \\\n\twhich makes life difficult. It also does not support the AppleScript Plugin (not an issue in 3.2.4)\\\n3.2.4 a bug in project builder introduced a performance problem (bad compiler options).\\\n\\\nSee the 3.2.5 about why this 3.2.6 is different inside.\\\n\\\nFor 3.2.6:\\\na) Change an internal number that dictates how often pending interrupts should be looked at from 5ms to 3ms This improves \\\ndelay accuracy.\\\nb) Change how sleeping is done when squeak is idle. This reduces CPU consumption, and improves Delay accuracy.\\\nc) Fix bug with high bit problem with keyboard (accented characters are ok now)\\\n  c2) 3.2.6b6 has fixed characters that require multiple key strokes to enter.\\\nd) Externals that make UI interactions (IE AppleScript) Must now make a call back to the VM to schedule\\\n    the main thread to do the call that will invoke UI interaction to prevent a deadlock in Carbon between threads. \\\n   See the OSAExecute call in the AppleScript plugin for details.\\\ne) If you run a classic mac VM more than 23.x days nonstop it will stop responding to UI events.  Ensure clocks get anded with 536870911.\\\nf) signal inputSemaphoreIndex because we are mulithreaded. Not that it does anything for us yet...\\\ng) 3.2.6b6 Pass the unicode value of the keystroke up as the EventKeyDown/EventKeyUp data, versus mackeyboard code.\\\nh) Somewhere there is a bug with mktime + time, so use the unix code of time+localtime+gmt \\\ni) Change iorelinquishPrcessorForMicroseconds to sleep the quatum between now and wakeup time. Also schedule a\\\n   check for interrupts if wakeup time is now or in the past. This improves delay accuracy. For OS-x this was a big deal,\\\n   for os-9 it improves things by 1 or 2ms. Also in  os-x we sleep more when idle so CPU usage goes down.\\\nj) On OS-9 umap AND free the VM backing store. Just doing the free doesn't work and you lose 128Mb of disk space until you reboot\\\nk) 3.2.6b7 for post event processing ignore mouse move/drag/or scroll wheel events. These are ignored by the open/gl plugin and only suck a major amount of CPU time to process in the post event processing logic. \\\nl) 3.2.6b8 (3.2.6b4 classic) removed call to uncouple shift keys introduced in 3.2.1. This causes some macs after sleeping not to respond to keyboard input\\\nm) 3.2.6b8 (3.2.5b7 classic) added function for ioLowResMSecs to avoid early bit overflow. Rework clock checking in ioHandleEvents to handle clock rollovers properly.\\\n\\\nMac VM 3.2.5 mach-o build for Carbon, and build for Classic.\\\nMarch 4th, 2002\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f2 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\n\\\nBeware this version of the VM is significantly different inside! \\\n\\\n\\pard\\tx1440\\tx2880\\tx4320\\tx5760\\tx7200\\ql\\qnatural\n\n\\f1 \\cf0 a) Broke sqMacWindow.c into 10 different files by function type.\\\n\\\nb) Moved most of the memory allocation logic out of sqMacMain.c into sqMacMemory.c. and ensure memory is freed when Squeak is terminated. \\\nThe major change in this code is support for OS 9.x virtual memory mapping. This only applies to Mac OS 9.2.0 or higher, excluding os-x. It appears  Mac OS 9.1 has a bug that prevents this feature from working.\\\n\\\nFor images that require less than 128MB of memory, mapping is used to allow the image to grow/shrink to the 128MB boundary, therefore you can change the application memory size to about 2MB. \\\n\\\nFor images that require more than 128MB then change the application memory size to > 128MB and mapping will not occur. \\\n\\\nIf mapping is not available because virtual memory is turned off or the api is not supported by the macintosh OS then mapping is not used. Note that mapping is not support under the classic os-9.x environment under OS-X, however in this case you should be using the OS-X version of Squeak, not the classic version.\\\n\\\nc) Use of Carbon event logic for OS-X only. This is a major structural change. \\\n\\\nIt also encouraged the use of a pthread for interp.c. \\\n\\\nAll user interaction with the VM follows a new code path, so problems with keyboard or mouse input should be reported asap. Also any issues with application switching, windows being brought to the foreground or sent to the background and usage of the full screen logic should be reported asap.\\\n\\\nAs part of this change I have build in support for scroll-wheeled multi-button mice under os-x. Thanks to Doug Way for testing this for me. Maybe someone can post to the list what their favorite 3 button scroll wheeled mouse/trackball is.\\\n\\\nd) Use of a carbon call to get the dominate Device if you have multiple screens. People with multiple screens should confirm window resizing, full screen on/off works as expected.\\\n\\\ne) Corrected comment in sqMacFileLogic.c\\\n\\\nf) Changes to sqMacNSPlugin.c. This makes it compile, but it's not usable yet.\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 \\\n\\\nFeb 20th 2002 3.2.4\\\n\\\nFor this version of the VM I have migrated towards using OS-9 packages. This allows us to provide one \\\nfolder/package that supports os-x and previous operating system versions.\\\n\\\nGiven Squeak 3.2.4Beta1.app\\\nThe classic VM is found in the *.app:Contents:MacOSClassic, with an alias in *.app:\\\nThe mach-o OS-X VM is found in *.app.Contents:MacOS\\\n\\\nIf you are running OS-9 then clicking on the *.app or doing drag and drop will just run Squeak, same applies for OS-X.\\\nIf you are running OS-7.5.5 or OS-8.x then the *.app package will appear as a folder, just open and click on the alias within. \\\nNote that if you want to use classic plugins I suspect you need to put them in the MacOSClassic Folder beside the VM. \\\nBundles for os-x go in the same location as the *.app application package.\\\n\\\nChanges\\\na) Drag and drop at open time with image file that has no meta type, will now open the image, versus prompting you.\\\nb) Use an os-x window attribute at open time to signal that the window should not be moved by the dock when you go to full screen.\\\nc) Fix window update logic to use window that needs updating versus stwindowg to fix issues with print dialog windows in classic. \\\nd) bitblt gets recompile to pickup fixes posted in 3.2 update stream.\\\n\\\nFeb 5th 2002 3.2.3\\\nChanges\\\n\\\na) use old extended time manger to update psudeo-TickCount, versus sigalrm. siglarm make sound recording not work.\\\nb) fiddle with sound recording and make it work.\\\n\\\nJan 2002 3.2.2\\\nChanges:\\\n\\\na) AsyncFilePlugin.c Use global to remember security function entry point for performance reasons\\\nb) FilePlugin.c\tUse global to remember security function entry point for performance reasons\\\nc) interp.c Use squeakFileOffsetType versus off_t and add a bunch of checks to handle lack of long long and conversion errors between 64/32 bit integers and LargeInteger objects\\\nd) readme, it's http://www.mucow.com/Gnuifier.1.cs \\\ne) SocketPlugin.c\tUse global to remember security function entry point for performance reasons\\\nf) sq.h added default sqFilenameFromStringOpen and sqTruncate\\\ng) sqFilePluginBasicPrims.c revert to anti specs, but ensure #def to fseeko and ftello for 64 bit aware file systems.\\\nh) sqMacDirectory.c A bit more error checking on bad file names\\\ni) sqMacFileLogic.c Folders size is now zero in classic, and a bit more checking on bad file names\\\nj) sqMacSound.c Fixed a problem with sound recording in classic due to a change made in Sept. But sound recording still does not work under os-x\\\nk) sqMacWindow.c  two very important changes:\\\n\\\n\t1) You can now do FFI calls with the FFI bundle plugin to Mach-o frameworks. \\\n\tHowever you need to rework your api calls. For example:\\\n\tapiGetMousePoint: aMacPoint was\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'InterfaceLib'>\\\n\tIt now is:\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'Carbon.framework'>\\\n \t\\\n\tIf you review /System/Library/Frameworks I'm sure you can come up with interesting ways to \\\n\tmake mac only squeak images.\\\n\t\\\n\tI now use map( NULL, gMaxHeapSize, PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED,-1,0);\\\n\tanonymous memory mapping to 512MB as the squeak memory block. The VM can then grow or shrink\\\n\twithin the 512MB block, I just move a pointer. \\\n\t\\\n\tNote in 3.2.1 a slight error on my part restricted Squeak to 50MB. I am of course\\\n\tinterested to hear about issues with my choice of 512MB. Note a Squeak VM is limited to 2GB under perfect \\\n\tconditions, however if any part of the image crosses the 2GB boundary the VM will fail, right now 512MB\\\n\tseemed a safe choice.\\\n\t\\\n \tPhysMem:  60.2M wired, 78.6M active,  412M inactive,  551M used,  217M free\\\n\tVM: 3.03G + 55.3M   7847(0) pageins, 1(0) pageouts   \\\n\tPID COMMAND      %CPU   TIME   #TH #PRTS #DREGS RPRVT  RSHRD  RSIZE  VSIZE\\\n\t422 Squeak VM    0.8%  0:35.59   2    71   100  23.3M  8.53M  26.5M   571M\\\n\\\n\tbut I only have one 80,000,000 byte swap file in /var/vm\\\n\\\nNote if you turn crash reporter on, then if the VM crashes a nice report should be generated in your log directory.  See the Apple documentation for a description of this feature, currently it is set in OS-X 10.1.x via the preferences window for the Console Application. If you have a crash with this VM, please recreate and post the crash log (found in Users/foobar/Library/Logs/ to the Squeak mailing list so we can continue to make the VM fault tolerant.\\\n\\\n3.2.1 Notes\\\n\\\nYou might need these change sets to build a new VM or to use all the features of this VM with your image, hopefully these will get into the pending 3.2.x image.\\\n\\\nFixes and feature extensions.\\\nAsyncFileFixFu...hName-JMM.1.cs \tfix for async test method.\\\nDragAndDropAtStart-JMM.5.cs\t\tfix to enable drag and drop at startup\\\n\\\nNeeded to compile a VM with VMMaker\\\nLargeFiles-JMM.3.cs\t\t\t\tEnable large file support, files > 2GB\\\n\\\nNeeded to turn this feature on\\\nMacLongFileName-JMM.5.cs\t\t\tEnable long file names on the mac\\\n\\\nThe SUnit\\\nMacLongFileNamesSUnits-JMM.3.cs\tTest long file names and long directory names and large file support\\\n\\\nKinda optional features some people might need.\\\nInternetConfiguration-JMM.5.cs\t\tAllow internet configuration information access, internal plugin\\\nUUID-JMM.3.cs\t\t\t\t\tAllow UUID generation, internal plugin\\\n\\\na) The ability to get back a UUID. This uses the hosting UUID generator if the\\\n hosting OS supports it and we have a primitive we can call. If not then we generate\\\n a type 4 version of a UUID (the random bits one).\\\n(This requires a special change set)\\\n\\\nb) Ability to start squeak on the mac by dragging multiple documents onto the\\\nimage, or drag and drop of stuff onto the running VM icon.\\\n(This requires a special change set)\\\n\\\nc) Usage of the Internet Configuration tool kit to supply information about\\\nwhat the mac proxy is etc. etc.\\\n(This requires a special change set)\\\n\\\nd) Migrate file system to use 64 bits. This allows you to read/write and seek\\\nwith files > 2 GB. This includes a change to the VM to convert from/to long\\\nlong integers. It also allows the file system to actually deal with 2GB files,\\\nthe current file interface actually fails once the file exceeds 1GB.\\\n\\\ne) For the carbon based Squeak VM we now support long file names 255\\\ncharacters. Close both eyes and touch everywhere the mac VM deals with file\\\nname paths and hope for the best (Actually we write an Sunit to ensure we've\\\nnot broken everything). This also includes the ability to put an image in a\\\nlong file name directory, but right now the image name must stay under 32 characters.\\\n\\\nFilePlugin.c changes to support large integers.\\\nFilePlugin.h changes\\\nsq.h changes to support large files.\\\nsqConfig.h changes to resolve some conflicts.\\\nsqFilePluginBasicPrims.c  changes to support large files.\\\nsqMacAsyncFilePrims.c changes to use fspec versus 255 file path.\\\nsqMacDirectory.c changes to use hosting OS (OS-X) bsd create and delete directory\\\n and truncate. dir_look changes as part of the general rewrite.\\\nsqMacDragAndDrop.c use new call to get path name from fsspec. Use fsspec more, and added \\\n  interface code to setup drag and drop of items at application startup time. max document name\\\n  goes to 1000 characters.\\\nsqMacFileLogic.c Mostly rewrote!\\\nsqMacSecurity.c use new file calls.\\\nsqMacWindow.c \\\n\tincrease size of vmpath, docpath, imagepath to 1000 chars, shortname to 255 characters.\\\n\tadd logic for left/right modifier keys \\\n\treworked LoadLibViaPath logic \\\n\tsqImageFileOpen uses fsspec versus 255 path name.\\\n\tsqImageFileStartLocation uses ffspec.\\\n\tbundle support for bundles\\\n\t\\\ne2) interp.c supports get/put of large integers to long long integers.\\\ne3) fixed fTruncate\\\n\\\nHint getting this to work was a pain. Think of 255 character folder names and nested aliases,\\\nfolder 1 refers to folder 2 which then refers to folder 1 again, just go down the path say 8 times,\\\nthen ask to create a file or directory!\\\n\\\nf) Support to change the Mac screen resolution under Squeak control.\\\n\\\ng) Fix to unload/load the scrap at startup time to ensure the clipboard is\\\ncorrect when starting up the VM.\\\n\\\nh) Uncouple the shift key and left/right shift keys on old extended keyboard.\\\nAlso add a call to get which keys are currently pressed on a USB keyboard or\\\nthe USB codes for an apple non-usb keyboard. (Note this isn't working quite yet under OS-X)\\\n\\\ni) Changes to enable us to compile the VM under Apple's OS-X Project Builder\\\nenvironments.\\\n\\\nj) Some rewriting to ensure serial and midi support can be written as external\\\nplugins.\\\n\\\nk) Fiddling to get sound input to work under OS-X\\\n\\\nl) Platform.exports changed macintosh to macintoshSqueak to avoid conflict.\\\n\\\nm) Memory is allocated at 50MB at start, then will grow or shrink, verus previous carbon apps\\\n that did 1GB. \\\n \\\nn) sqPlatformSpecific.h changes to support long file names and os-x posix file names\\\n\\\no) sqVirtualmachine.c & sqVirtualmachine.h\\\n#if VM_PROXY_MINOR > 4\\\n\tVM->positive64BitIntegerFor = positive64BitIntegerFor;\\\n\tVM->positive64BitValueOf = positive64BitValueOf;\\\n\tVM->signed64BitIntegerFor = signed64BitIntegerFor;\\\n\tVM->signed64BitValueOf = signed64BitValueOf;\\\n#endif\\\n\\\nBeware this causes an interesting problem, if you compile plugins with VM_PROXY_MINOR now set to 5, then they will not work with older VMs. The solution is to define the VM_PROXY_MINOR in the plugin to the value that indicates what features it is using.\\\n\\\np) Changed to use ITimer logic as a 16ms lowres timer to improve performance\\\n\\\nq) Changed to use single thread, no thread manager.\\\n\\\nr) Changed to use lowres timer in checking for polling time to improve performance\\\n\\\ns) It should have faster startup times.\\\n\\\nt) It will hide the empty window at startup, then show the squeak window when required.\\\n\\\nu) It has a different menu structure.\\\n\\\nv) It does less I/O when navigating directories.\\\n\\\nThe macintosh 3.1Alpha1MT VM, Sept 24th 2001 \\\nThis VM was built with the base  3.1 image at change set #4347\\\nV3.1.1 at change set #4347\\\n\\\n\\\nWe go to V3.1.1 to indicate that the 3.1 VM is being used. In the past the 3.1 Image was used but some changes in the openGL logic makes  3.1 Vm and 3.0 image not quite work correctly with 3d graphics. Although a 3.1 VM will run many images way back to the 2x series no careful study has been done on the ability to do this. So at this point we are indicating this VM is a 3.1 VM and best used with a 3.1 image.\\\n\\\nUse of VMMaker to build VM. As of this version everything can be built as an external except for the window logic which hasn't been decoupled from the VM support for the macintosh. \\\n\\\n1) AsynchFilePlugin the security check for ability to create file is now a plugin call.\\\n2) B2DPlugin logic changes to fillLinearGradientfromtoat\\\n3) b3dRemapFaces, b3dRemapEdges, b3dRemapEdgeList, b3dRemapAET, b3dRemapEdgeVertices, b3dRemapFaceVertices, b3dRemapFaceFree, b3dRemapEdgeFree, b3dRemapAttributes. Some casting and changing of += to = + to make some compilers happy.\\\n4) BitBltPlugin added tableLookupat call.\\\n5) DropPlugin added setFileAccessCallback to allow the Security Module plugin the ability to give us the entry point to turn security off so we can open files as read only when security is turned on.  This was broken in the past. \\\n 6) FilePlugin added fileOpennamesizewrite,getThisSession to allow for callbacks. Changed the file security logic to use the plugin interface. \\\n7) interp.c, fixes for 4347ByteArrayRangeCheck-di, ability to printAllStacks, security calls for image rename, write to use plugin interface.\\\n8) Added GetAttributeString, and recordDragDropEvent and entry points for callbacks.\\\n9) SecurityPlugin changed when initialization is called to initialize the safe and unsafe directorys, also added entry points for all the testing calls so it can be a true plugin.\\\n10) Serialplugin. The serial plugin was redesigned to seperate out MIDI logic. People with MIDI devices and old serial macintosh should check to see if they still work since we lack equipment now to test this obsolete technology set.\\\n11) SocketPlugin. Make security calls true plugin calls.\\\n12 SoundGenerationPlugin. Removed \\\nEXPORT(int) SoundGenerationPlugin_primitiveFMSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveOldSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitivePluckedSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveWaveTableSoundMix(void);\\\nThey were a hack at the plugin level and discussion on the list seemed to show they were no longer used. \\\n13) Checking for if defined (__APPLE__) && defined(__MACH__) for the Mac OS-X native development environment\\\n14) Changed sqMacAsyncFilePrims, usage of interpreterProxy->, plugin calls for getThisSession. \\\n15) Changed sqMacDirectory.c. Removed some utility code and make it a seperate file so that it can be shared between sqMacWindow and other plugins that require them. \\\n16) Changed sqMacDragDrop.c. Added plugin callback for getSTWindow, the sqSetFileAccessCallback logic, fileOpennamesizewrite, and secHasFileAccess. Added logic to do the recordDragDropEvent callback to sqMacWindow.c \\\n17) sqMacNetwork.c. Some cleanup for the OS-X version of the OpenTransport headers, some constants have name changes\\\n18) sqMacNSPlugin.c Use of ioLoadFunctionFrom(NULL, \"DropPlugin\"); versus explicit call.\\\n19) sqMacOpenGL.c. Some cleanup for the OS-X version of the OpenGL headers\\\n20) sqMacOpenGLInfo.c. Some cleanup for the OS-X version of the OpenGL headers\\\n21) sqMacSecurity.c ioInitSecurity calls back to dragAndDrop plugin to set entry point to turn security off.  Added code to create directories if required and ensured callbacks are plugitized.\\\n22) sqMacSound.c Some cleanup for the OS-X version of the Sound headers. Use of interpreterProxy-> in the proper places.\\\n23) sqMacWindow.c Some cleanup for the OS-X version of the compiler.  Fixed saveAsEmbeddedImage, this got broken when we moved from a FAT to a ppc only application.  Altered interface to recordDragDropEvent so that it was plugable. Some file path name logic goes to a seperate C source file. The drag and drop plugin is loaded and intialized after the image is loaded but before the interpreter is started, before it was done a bit earlier in the startup process. This also has the effect of initializing the security module.\\\n24)sqOpenGLRenderer.c. Some cleanup for the OS-X version of the OpenGL headers\\\n25)SurfacePlugin.c gets a hack so it knows when it is internal versus external.\\\n\\\n\\\n\\\nv3.0.18 at change set #4081\\\n(Note browser plugin goes to 3.0.23\\\n\\\n1) sqMacOpenGL.c Quite a few changes were made to the code to support it as an internal plugin for the browser. This is because the drawable frame for a browser plugin is a subset of the browser's grafport, so lots more care must be taken to draw in the correct location using OpenGL. We also fixed issues with re-configurating the Open/GL draw area when the window gets resized or goes to full screen, and attempted to ensure multiple screens will work.\\\n\\\n2) sqMacWindow.c, minor fix to cast a constant char * to char * for CW 6.1\\\n\\\n\\\nBrowser plugin 3.0.23 fixes\\\n\\\n1) Integerated the H/W Acceleration as an builtin plugin\\\n2) Added logic for pre and post event interaction to browser plugin event handler for H/W Acceleration logic. The external H/W Acceleration plugin mostly works with the browser plugin but doesn't work with full screen mode, or if the plugin is embedded in a window or a scrollable frame, so don't use it. Use the browser plugin 3.0.23 or higher which has the H/W Acceleration builtin.\\\n\\\nv3.0.17 at change set #4081\\\n(Note browser plugin goes to 3.0.21)\\\n\\\n1) Added HW acceleration as internal plugin.\\\n2) 4079BBAlphaTextFix-ar Fixes the problem with alpha text, changes BitBltPlugin.c \\\n3) Added primitive on the mac to truncate a file.\\\n4) Added logic to flush volume on a flush file to ensure file and control blocks are flushed.\\\n5) For the Carbon VM we increase nextevent wait time if we get sufficent idle time. This should reduce CPU usage under OS-X\\\n6) GetAttribute: 1002 now returns the gestaltSystemVersion as a hex string, and getAttribute: 1003 now returns either '68K' or 'PowerPC'.\\\n7) Starting with 3.0.17 the VM is build only as a powerpc application. The latest VM as a 68K application will be made available from time to time permits based on people's needs. \\\n8) Changes to sqOpenGLRenderer.c to improve performance, OpenGL 1.1 support.\\\n\\\nPlugin 3.0.21 fixes\\\n\\\n1) added check for mailto: tag on posts to fix problem with Netscape crashing, and IE hanging.\\\n2) Plus above fixes.\\\n\\\nWhat has been fixed/changed.\\\nv3.0.16 at change set #4041\\\n(Note browser plugin goes to 3.0.20)\\\n\\\n1) Lots of fixes for BitBlt and HW acceleration.\\\n2) Hardware Acceleration plugin goes to 1.0.1. Please note there is a seperate plugin with the same name for Carbon. Doing a get info will identify if the plugin is only usable with Carbon Squeak.\\\n\\\nv3.0.15 at change set #4026 (May 17th test version)\\\n(Note browser plugin goes to 3.0.19)\\\n\\\n1) Added support for OpenGL HW acceleration plugin\\\n\\\nPlugin 3.0.19 fixes\\\n\\\na) Obey embedded tag plug\\\nb) Fix problem with plugin 3.0.17 not working with netscape 4.x\\\nc) Carbonize plugin for IE 5.1 \\\nd) Remove debugging printf than occurred on transition to full screen mode\\\n\\\nWhat has been fixed/changed.\\\nv3.0.14 at change set #3987\\\n\\\n(Note plugin goes to 3.0.17)\\\n\\\n1) sqMacDirectory.c. The pathlookup would handle the case of foo:bar::do incorrectly by ignoring the :: path redirection. This has been fixed. However a path lookup will not work if it contains :: and an aliased directory in the middle of the path.\\\n\\\n2) sqMacSecurity.c. The pathname for the untrustedUserDirectory was built incorrectly, and the bug mentioned above in sqMacDirectory.c usually kept this from being noticed.\\\n\\\n3) sqMacWindow.c  we added some logic to do the delay for primitiveRelinquishProcessor, but found it had an large effect on a freecell benchmark. I suspect on a Morpic step wait there is nothing to do so primitiveRelinquishProcessor gets called which then affects response time. So for now we revert to the 3.0.11 behavior, good performance and 100% CPU usage!\\\n\\\n4) GetAttribute 1004 returns returns interpreterVersion; which is for example\\\n\"Squeak3.1alpha of 6 February 2001 [latest update: #3987]\"\\\n\\\n5) When in full screen mode we now attempt to disable resizing, zooming, or moving the window. The window borders are hidden, but in the past it was feasible to grab an edge and alter it, thus confusing the VM.\\\n\\\n6) Worked on Carbonizing the browser plugin\\\n\\\n7) 3977 & 3978 FloatArray fixes. Makes float arrays go through a new (and working) version of #primitiveHash\\\n\\\n8) Fixed problem with accidental mouse clicks being triggered from pulldown menus on application switching.\\\n\\\n9)\\\n\"Change Set:\t\t3984 BitBltExtensions-ar\\\nDate:\t\t\t4 May 2001\\\nAuthor:\t\t\tAndreas Raab\\\n\\\nThe change set includes various extensions for BitBlt with the goal of migrating the useful features from FXBlt into the general BitBlt mechanisms. These include:\\\n\\\n* Handling of LSB and MSB forms:\\\nBitBlt now handles both, MSB and LSB forms (and their conversions). Only instances of Bitmap are assumed to contain big-endian pixels. All others are assumed to be little endian (reason is that we can only identify Bitmap here). Note that 'LSB' and 'MSB' refers to PIXELS, that is a 1bpp LSB form has its left most pixel in the lowest bit whereas a 1bpp MSB form has its left-most pixel in the highest bit.\\\n\\\nFor pixel depths < 8 this can be different from what your OS supplies (as an example, Windows bitmaps < 8 are big-endian pixels in little-endian words; we might call them 'middle-endian'). We simply don't deal with those - forms are either big or little endian but nothing inbetween.\\\n\\\nBitBlt has got an extra combination rule for swapping pixels in the destination form. This can be used to make byte swapping much more efficient (as soon as we've got more VMs with support for it).\\\n\\\n* Handling of 'native bitmaps' (aka surfaces):\\\nBitBlt is now able to deal with OS surfaces that are registered with the surface plugin.\\\n\\\n* Handling of full color maps:\\\nBitBlt has been extended to deal with instances of ColorMap in addition to the prior mechanism of using only indexed lookups and provide an implicit 16-32 bit color conversion. ColorMaps can specify both, a lookup table and an additional set of masks and shifts to apply during the color mapping operation. \\\n\\\nFour independent shifts and masks can be given which can be used for a lot more than just color conversion (as an example, one could do byte swapping with this; but see also BitBlt class>>exampleColorMap). \\\n\\\n* Better handling of default arguments:\\\nFor most of the required arguments for BitBlt very reasonable default assumptions can be made. This includes the destOrigin (0@0), clipRect (0@0 extent: destForm extent), sourceOrigin (0@0). BitBlt now substitutes these if they are absent (e.g., nil) in the instance provided.\\\n\\\n\"\\\n\\\n\\\nv3.0.13 at change set #3848\\\n\\\n1) sqMacSecurity was changed to set the unsecure directory to\\\n\tsystem folder:Preferences:Squeak:Internet:My Squeak\\\n\\\nv3.0.12 at change set #3848\\\n1) Fixed problem with creating My Squeak Folder in Documents Folder with System 8.6\\\n\\\nWhat has been fixed/changed.\\\nv3.0.11 at change set #3848\\\n\\\n1) sqMacDirectory had a bug when you resolved a path name. The fast resolve always failed, which invoked the slow resolver. Now the fast resolver works.\\\n\\\n2) sqMacSecurity was changed to set the unsecure directory to Documents:My Squeak. \\\n\\\n3) sqMacWindow was changed to fix some issues with Squeak capturing events from other applications and to reduce the number of duplicate mouse events that are generated. Also we capture modifier information  directly from the mouse and keyboard on null events to fix some problems with Carbon. We  hopefully fixed problems with mouse clicks from foreground applications being seen by Squeak and issues with the OS-X Dock clicks.\\\n\\\n4) sqMacNSPlugin was changed to use the above mouse/keyboard capture code which is much cleaner than the original fix for the bogus modifier information given to us by netscape on a null event. \\\n\\\n5) When you turn full screen off we now correctly reposition the window to the original location versus a few pixels to the left. \\\n\\\nWhat has been fixed/changed.\\\nv3.0.10 at change set #3848\\\n\\\n1) changed VM exception unwind logic\\\n\t3796-Exception-unwind-V3,tim@sumeru.stanford.edu, Paul McDonough, Stephen Pair and others\\\n\\\n2) Fixes for the JPEGReader plugin and for Jitter 3\\\n\\\n3) Added minimal Mac VM logic to assist in building a small VM.\\\n\\\n4) Changed how the browser plugin starts up. Now it starts the interpreter running only after getting the browser setwindow command. This seems to fix a race condition that resulted in a crash at startup time with Netscape 4.x\\\n\\\n5) Fixed broken full screen redraw on cmd-tab\\\n\\\n6) Fixed what looked like mouse-down, mouse-down, mouse-up sequence. Now reports mouse-down, mouse up.\\\n\\\n7) Added StarSqueak plugin as internal plugin\\\n\\\n8) Note the current Squeak Plugin should be gotten from the www.squeakland.org site.\\\n\\\nv3.0.9 at change set #3776, Boston Snow storm build.\\\n\\\n1) A number of changes were made to the interpreter:\\\n\ta) added primitive to change a class.\\\n\tb) added primitives to get or put 32bit integers\\\n\tc) Fix problem with GC and class reshaping\\\n\td) Better logic for method cache flushing\\\n\\\n2) Added JPEGReader plugin\\\n\\\n\\\nV3.0.8 at change set #3740\\\n\\\n1) The caps lock no longer maps to the shift attribute. So if the caps lock is down mouse clicks will behave normally. \\\n\\\n2) Numerous fixes for the BitBltPlugin plugin\\\n\\\n3) Memory allocation grow/shrink logic for Carbon was added.\\\n\\\n4) Spurious mouse clicks for the browser plugin has been fixed. (This took awhile to fix, I'm sure it's a bug with the Swedish version of Netscape)\\\n\\\n5) The browser plugin will attempt first to allocate memory from the browser heap, then the system heap. Most people when faced with a memory issue usually increase memory for the browser first. However memory for the plugin is controlled by an attribute in the EMBED HTML statement. \\\n\\\nV3.0.7\\\n\\\n1) A bug exists in pre OS 8.x that causes a crash in activate window if the standard get file \\\ndialog comes up before the Squeak Window. I remove the InvalWindow call found in that routine since it is actually redundant.\\\n\\\n2) The standard get file dialog on system 7.x would not terminate if you did a cancel.\\\n\\\n3) The InterfaceLib had to be weak linked to prevent CFM startup issues. \\\n\\\nV3.0.6\\\n\\\n1) Alias resolving is less aggressive.\\\n\\\n2) We no longer cache image reads or writes. This was done because OS 9.1 allows you to have very large disk caches, and it's pointless to cache the image read or write.\\\n\\\n3) The file flush primitive now actually flushes the file via an OS call. This was a bug in the CodeWarrior 5.3 source code.\\\n\\\n4) The 68K version was being built with the 68881 math library. This fails on 68040LC chips. We now use the non-68881 math library. Thanks to Bruce ONeel for find this.\\\n\\\n5) A bug was found in the path resolving logic that was added for 3.x. This bug apparently only affects 68K machines,  never was identified as a PowerPC issue. \\\n\\\n6) The Netscape plugin needs a properly allocated clip region, this code seemed to work ok on new systems, but fails on system 7.6.1\\\n\\\n7) The security interface will create a Documents folder on the root volume if the default Document folder has been deleted. This is needed for security purposes. \\\n\\\n8) Jitter needs 1MB of free memory to run.\\\n\\\n9) 68K machines require another 32K of stack\\\n\\\n10) Threads  now work on 68K machines, but turned off because of possible performance issues. (I think more study is needed).\\\n\\\n11) The 68K version was compiled with better optimization, expect a 15% improvement.\\\n\\\n12) fix for BitBltPlugin ascii = byteAt((sourcePtr + charIndex) - 1);\\\n\\\n13) The interpreter object validation checking code was alter to work correctly.\\\n\\\nV3.0.5\\\n\\\n1) sqConfig.h changed due to BE OS header changes\\\n\\\n2) sqMacDirectory.c. Added support for Navigation services or Standard File Get to find the image at startup time when the Squeak.image is not found by the VM. This replaces the DOS like console message that comes up saying that Squeak can't find a image.\\\n\\\n3) A fix to drag and drop for the browser plugin.\\\n\\\n4) We now use Apple's cooperative multithreading package to run the UI in one thread, the VM in the other. This solves some issues with the browser and makes the UI versus VM logic and execution responsibilities easier to understand. \\\n\\\n5) Changed the sqMacNSPlugin.c code to support a 3.0VM using multithreading support. This should give Squeak in a browser better performance. Also changed the full screen support to correctly work with multiple monitors.\\\n\\\n6) BitBltPlugin.c gets one more op code\\\n\\\n7) Added the security interface\\\n\\\n8) Added the file flush primitive\\\n\\\n9) Rewrote the macintosh readme file\\\n\\\n10) Revisited the zoomWindow code and found a bug with multiple monitor support, then I fixed the code to make Full Screen mode work on screen that Squeak window is mostly on, versus the menubar screen. Also if you switch from full screen back it resizes the window back to the orginal size and location before you invoked the full screen. \\\n\\\nV3.0.2\\\nPlugins\\\n\\\nRecompiled the internal BitBltPlugin plugin to encorporate:\\\nChange Set:\t\t258AlphaBlendOpt-dsm\\\nAuthor:\t\t\tDuane Maxwell, Paul Phillips/exobox\\\na) Short circuits full opaque and full transparent pixels when alpha blending.\\\n\\\nRecompiled the internal LargeIntegerPlugin\\\n3298LargeIntegersV1-2-sr -- Stephan Rudlof -- 29 November 2000\\\n3299LargeIntV1-2For29-sr -- Stephan Rudlof -- 29 November 2000\\\n\\\nVM Software\\\n\\\n(b) PowerManagement for macintosh is now supported. You can disable the power manager to give you better performance on some powerbooks at the expense of battery life. See the Preferences Panel for details, category 'Performance'\\\n- changed sq.h\\\n- changed sqMacWindow.c to add support for power mgr disabling\\\n\\\n(c) Drag and Drop support for the macintosh, dragging files from the Finder to the Squeak window is now supported.\\\n- sqMacDragDrop.c added\\\n- sqMacWindow.c changed\\\n\\\n(d) Added primitive for get macintosh creator and file type.\\\n- sqMacDirectory.c changed\\\n\\\n(e) Carbon support. Thanks to Karl Goiser karl@wattle.net for work he did on sound and other Carbonization hotspots.\\\n- sqMacAsyncFilePrims.c changed\\\n- sqMacFFIPPC.c changed (not supported for Carbon)\\\n- sqMacNetwork.c changed per Apple tech note 1173 Carbon asset tracking\\\n-sqMacSerialAndMIDIPort.c chnaged (Not supported for Carbon)\\\n- sqMacSound.c changed per Apple tech note 1198 Carbon double sound buffer playing\\\n- sqMacWindow.c changed (various changes for Carbon)\\\n\\\n(f)  Poll at least 60 times a second for the mouse if required. Previous 2.9.x VM did it 30 times but this is too slow and 2.8.x VM do it 60 times a second.\\\n\\\n(g) Reworked path support Thanks to Karl Goiser karl@wattle.net for starting this.\\\n- sqmacDirectory.c changed reworked lookupPath\\\n- sqMacWindow.c changed, added GetApplicationDirectory to get application directory\\\n\\\n(h) I rewrote the sqMacDirectory.c logic to enable proper understanding of Apple's Alias logic. This means for example you can alias the \"SqueakV3.sources\" file and then only have one copy and have all your images point to it. \\\n\\\n(i) Added Zoom Window support.\\\n\\\n(j) Change the Squeak change file icon to better match Apple's visual guidelines, Thanks to Doug Way for the suggestion and the new icons.\\\n\\\n(k) The sound plugins have changed...\\\n\\\n(j) Dropped FFI out of the base Squeak because of security concerns\\\n\\\n(k) Compiled for 750(G3) processor versus 603\\\n\\\n(l) Added screenDepth primitive\\\n\\\nThe 3.0.x VM contains most of the optional plugins, you might want to check this by inspecting \"Smalltalk listBuiltinModules\" to see where your plugins are coming from. In some case people have been accidentally overriding the new builtin plugins with older plugins. \\\n\\\nThe file \"Squeak 3.0Alpha10MT.sig\" contains the PGP signature for the Squeak 3.0Alpha10MT VM\\\n\\\nJohn M McIntosh  johnmci@smalltalkconsulting.com\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n}"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Documentation/3.5.2 Release Notes.rtf",
    "content": "{\\rtf1\\mac\\ansicpg10000\\cocoartf102\n{\\fonttbl\\f0\\fnil\\fcharset77 Geneva;\\f1\\fswiss\\fcharset77 Helvetica;\\f2\\fnil\\fcharset77 LucidaGrande;\n}\n{\\colortbl;\\red255\\green255\\blue255;\\red26\\green26\\blue255;}\n\\margl1440\\margr1440\\vieww17300\\viewh12720\\viewkind0\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0\\fs24 \\cf0 Mac VM 3.5.1 mach-o build for Carbon, and build for Classic. Support for Croquet, and support for Safari\\\nJuly 31st, 2003 (3.5.2b2)\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets. (Yawn, someday)\\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\n\\\nNotes About previous VM.\\\n3.2.6 VM classic have an issue when the tickcount clock goes over 0x7FFFFFFF, about 24 days. \\\nThis exhibits it self as Squeak won't accept user input, or allow you to switch under os 9 or earlier.\\\nStarting a Squeak image hangs durning the screen painting.\\\nRestarting the mac solved these problems. Force quit does not.\\\nThis is fixed in 3.2.7b3\\\nSome issues with alias files and folder were fixed in 3.2.7b6 and 3.2.8b3\\\n3.5.0b4 seems a fine VM, from what people tell me, but now we've 3.5.2...\\\n\\\n3.5.3b1  (browser plugin)\\\nFixed issues with IE drawing and crashs related to screen updating in non-thread safe IE.\\\n\\\n3.5.2b6\\\nFixed issues with plugin discovery for netscape plugin \\\n3.5.2b5\\\nFixed primitive dispatch to use gnuified jump table. \\\n\\\n3.5.2b4 \\\nFix issue with race on open doc events and squeak VM Thread for drag and drop support when starting squeak\\\nFor os-x expose primitivePluginBrowserReady, not the rest of the URL browser primitives, they don't work in Safari\\\nFor system attribute 1003 return powerpc versus PowerPC to match unix VM\\\nStart timers later in the VM startup logic, after reading the image, versus before.\\\nsqMacNSPlugin.c \t- Look for Squeak folder in User, local, Network, System domains versus just User.\\\nsqMacTime.c\t\t- Use old delay logic (1ms accurate), versus aioPoll (10ms accurate).\\\nsqMacUIEvents.c\t- Only create PowerManagerDefeatTimer tick routine if power manager tapping is required which is only os-9 anyways.\\\nsqMacUIMenuBar.c - Draw menu bar later in startup, after we change it, save 200+ms\\\nBitBltPlugin.c\t\t- alphaSourceBlendBits16  Use table lookup which is 90% faster\\\n\t\t\t\t- copyLoopNoSource, roll constants into register versus recalculating.\\\n\\\n3.5.2b2 \\\nFix applescript document handling logic to prevent overrunning the drag/drop logic via the command line open cmd by using a spin loop\\\nto ensure Squeak has sufficent time to read the file name. \\\n\\\n3.5.2b1 \\\nChanged the bitBlt copyloop logic to use locals in safe places, versus globals. This improves drawing by 5%.\\\nMajor change is usage of GCC 3.3, versus GCC 2.95.x This increases send/second by about 8%.\\\n\\\n\\\n3.5.1b5 Added some more user changeable attributes, and changed some window behaviour when floating\\\nOS-x Version only \\\nSqueakWindowHasTitle\t\t- (Yes/No) yes if window should get title.\\\nSqueakFloatingWindowGetsFocus (Yes/No) yes if window should allow click and type if floating.\\\nSqueakMaxHeapSize\t\t- (Number) set to 512K, max size for os-x memory heap. Note changing this to 1GB may or may not cause a \\\n\t\t\t\t\t\tcore dump depending on where os-x allocates the memory segment above or below the 2GB boundary. \\\n\\\nsqMacUIEvents.c\t\t\t- set keyboard focus to floating window if required, do not hide floating window when we go to full screen mode.\\\nsqMacWindows.c\t\t\t- watch out for memory leak when we free the color table. \\\n\\\n3.5.1b4 Please note the major changes to network code in 3.5.1b2\\\na)Added options SqueakWindowType & SqueakWIndowAttributes to info.plist. The SqueakWindowType of 6 is the standard document window, a type of 8 is the floating utility window. The attributes control with window attributes and behavior according to\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f1 \\cf2 \\ul http://developer.apple.com/techpubs/macosx/Carbon/HumanInterfaceToolbox/WindowManager/Window_Manager/wind_mgr_ref/constant_2.html#//apple_ref/c/tdef/WindowAttributes\\\n&\\cf0 \\ulnone \\\n\\cf2 \\ul http://developer.apple.com/techpubs/macosx/Carbon/HumanInterfaceToolbox/WindowManager/Window_Manager/wind_mgr_ref/constant_1.html#//apple_ref/doc/c_ref/WindowClass\\cf0 \\ulnone \\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 b) Sockets are not valid if the network is not initialized. \\\nc) The os-9 vm can return the open file error in the vm attribute data 1202\\\nd) MyWindowEventMouseHandler was leaking region handles.\\\ne) Support for primitiveClosureValue, primitiveClosureValueWithArgs, primitiveExecuteMethod\\\nf) when rootTableCount  goes > 2400 then allocationCount gets allocationsBetweenGCs + 1 \\\ng) BitBlt Alpha Blending has changed\\\nh) Added primitiveWrite24BmpLine\\\ni) The guard if statement for primitiveSerialPortRead was flawed, noted the buffer overflow, but then proceeded, versus returning. \\\n\\\n3.5.1b3 \\\na) Fix, Stephane Ducasse <ducasse@iam.unibe.ch> pointed out that using a virtual desktop we had a crash in ioSetFullScreen. This \\\nwas due to a pthread race condition between the UI thread and interp.c. Fixed by using UI callback to handle fullscreen window/move/resize.\\\n\\\n3.5.1b2\\\na) Switch to aio.h logic and unix socket logic! This is a MAJOR change!!!!\\\n\\\nb) Call aioPoll  (select()) to cause process wait versus old pthread logic. This follows in the footsteps of the unix port. You should verify that \\\ncpu time when squeak is idle is not affected in a dreadful manner.\\\nc) Fix, if you call does this directory exists on a file now you will get an error which will signal that the directory does not exist. This ensures\\\nthe FileDirectory test suite works. \\\nd) Fix, if you quit the browser plugin, check the status of the pthread_cancel before attempting the pthread_join\\\n \\\n3.5.1b1 limited distribution\\\n\\\n3.5.0b4 \\\na) os-x exposed an issue with EToyPeerToPeer support. It seems under os-x we get the connect, data, close so fast on lans that by the \\\ntime we get around to asking for the remote IP address the connection is closed, and our open transport call fails. We change SqMacNetwork.c to \\\nreturn the IP address discovered at connect time in this case. Under os-9 we never saw this behavior because we suspect the network activity \\\nwas slower and more serialized. \\\n\\\n3.5.0b3 (Safari support)\\\n\\\na) The plugin logic was changed to support Safari and better support os-x. This required building a CFM stub to load the mach-o compiled\\\nNSPLugin. The mach-o plugin now uses a pthread for the interp.c loop. This gives much better performance and user UI feedback. \\\nb) The GC logic was carefully reworked to optimize the assembler on the ppc. This gave us upwards of a 30-50% improvement, since \\\nincremental GC is going on all the time, this change actually has a effect you can see say in the solitaire example where we save 10%. \\\nc) sqMacNetwork.c was modified, first change in many years. The remote address and port number are requested as an async operation. \\\nThe operation times out after a few milliseconds. This was never a problem in os-9. Now it seems there is an issue sometimes for DHCP clients\\\non os-x. There the operation can timeout and return 0 as the address or port. We changed the call to do a sync operation to avoid a timeout.\\\nd) sqMacMain.c was modified to allow for pthreads for mach-o netscape based squeakland plugin support\\\ne) sqMacMemory.c changes for mach-o plugin support\\\nf) sqMacTime.c changes for  mach-o plugin support\\\ng) sqMacUIEvents.c changes for mach-o plugin support\\\nh) sqMacWindow.c changes for mach-o plugin support \\\ni) npmac.cpp now this is a netscape glue routine, I changed it to ensure we can see the entry points, originally they are C++, but need \\\nto be \"C\" so the loader can find the names the CFM glue routine is looking for. Also we add the logic TV2FP to setup the mach-0 to CFM code stubs to allow the mach-o plugin to callback to the CFM stubs in Safari. \\\nj) sqMacNSPlugin.c \\\n\t1) Rearrange when the interpret() thread is started to ensure a race condition doesn't happen.\\\n\t2) use Pthreads for the mach-o osx version. \\\n\t3) rework NPP_SetWindow to start interpret() when needed. \\\n\t4) Alter StartDraw, EndDraw to use a mutex lock and handle os-x port locking to prevent races between pthreads.\\\n\t5) Alter ioShowDisplay, optimization and handle os-x\\\n\t6) fix ioSetFullScreen to make it work on Safari\\\n\t7) fix OpenFileReadOnly to make it work on os-x, needed sqFileNameFromStringOpen macro call\\\n\t8) Alter ExitCleanup to mutex lock to prevent race ending issues, and add a bit more cleanup\\\n\\\n\\\n\\\nNote some versions of 3.4.1 were distributed for testing only, these are superseded by 3.5.0\\\n\\\n3.4.0b2 (Croquet support)\\\n\\\na) Ensure vmVersion information reports correct information, was bogus in 3.4.0b1\\\n\\\n3.4.0b1 (Croquet support)\\\na) Added plugin BMPReadWriterPlugin 14 November 2002 (i)\\\nb) B3DAcceleratorPlugin.c gets primitiveCreateRendererFlags (new api)\\\nc) two more op codes get added to BitBltPlugin (fixAlphawith, pixClearwith)\\\nd) Squeak3D gets (b3dOrthoNormInverseMatrix, b3dTransformDirection,b3dTransformPoint,b3dTransposeMatrix)\\\ne) The scroll wheel mouse logic was using apple cmd key as the modifier on the arrow key events, Other platforms use the Control key. So the \\\nmac falls in line (changed to use the control-key)\\\n\\\n3.2.8b9\\\na) recompiled os-x version, 3.2.8b8 seem to have a bad compiler option and gave 20% less performance.\\\n \\\n3.2.8b8\\\na) exposed \n\\f1 vmParameter\n\\f0  24 & 25 which control how memory is allocated/freed \\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f1 \\cf0 Smalltalk vmParameterAt: 24 put: 48*1024*1024.\\\nSmalltalk vmParameterAt: 25 put: 24*1024*1024.\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 b) Added argv,argc, env variables to main\\\nc) Fixed for Jaguar 10.2. Full screen mode cmd-tab broke menu bar hiding, this is a 10.2 bug\\\nd) Added support for IP_ADD/DROPMEMBERSHIP and the ability to bind to the wild card port (0).\\\ne) OpenGL changes for TEA\\\n\\\n3.2.8b7 was testing release and not distributed to the public.\\\n3.2.8b6 was testing release and not distributed to the public.\\\n3.2.8b5\\\na) Oops broke the logic returning the vmversion information in classic. Also incremented os-x version (which was fine) to keep numbers in sync\\\n\\\n3.2.8b3 The squeak.sourceforge.net CVS tree was reorganized and the project builder project revamped. The \\\nmajor change to the source was upgrading the netscape browser plugin to 3.2.7b6 levels.\\\n\\\na) Gnunifer.3.cs Changed to add register var on FOO_REG and to remove sqGnu.h file embedded in method.\\\nb) sqMacDirectory.c Add logic to handle case of building as CFM carbon plugin under CW6, needed some carbon calls\\\nc) osExports.c needed to ifdef out the getUIToLock entry point (not available as CFM carbon browser plugin)\\\nd) sqMacFileLogic.c Fix alias problem. Add logic to deal with path names as CFM carbon browser plugin, ensure vmPath is correct.\\\ne) sqMacImageIO.c Cast to get rid of warning message\\\nf) sqMacMain.c Cast to get rid of warning message, Check for CFM Carbon and bundle check. Revise vm parm 1201 code to return long file names are ok as CFM carbon browser plugin. Some diagnostic routines for printing to the console as CFM carbon browser plugin.\\\ng) sqMacMemory.c Logic change as CFM carbon browser plugin.\\\nh) sqNSPlugin.c\tFix to beginFullScreen logic (carbon call is broken?)\\\ni) sqMacUIEvents.c Remove getUIToLock dummy call. This entry point should only exist for mach-o carbon builds. Not CFM carbon browser plugins\\\nj) sqMacWindow.c  Use old call to create window when a CW 5 carbon application.\\\nk) sqPlatformSpecific.h Change #ifdef to correct logic error when building as CFM carbon browser plugin under CW 5.\\\n\t\\\n\t\\\n\\\nMay 31st, 2002 (3.2.7b6)\\\nFor 3.2.7\\\n\\\n3.2.7b3 We build the VM using patchs to enable globals as a structure. This improves performance by 10%\\\n\\\na) Classic Vm builders might need to add \"struct foo *foo = &fum; \"  to int interpret(void). \\\nb) readme: add notes about changesets and alter build instructions\\\nc) sqMacFileLogic.c: use accessors for interp.c globals\\\nd) sqMacMain.c: use accessors for interp.c globals. Also Alain Fischer added logic to fetch os-x version number and to enable you to put squeak.image in the resource folder for autostarting.\\\ne) sqMacTime.h: Fix busted lowresclock again. After 24 days of mac uptime, 3.2.6 squeak will hang.\\\nf) sqMacUIEvents.h: use accessors for interp.c globals.\\\ng) sqPlatformSpecific.h: alter sqFTruncate to use fileno() as needed.\\\nh) sqMacWindow.c: use accessors for interp.c globals.\\\ni)  3.2.7b5 sqMacFileLogic.c: change vmpath to resolve to classic VM if vm is moved from MacOSClassic folder\\\nj) Misc changes for Netscape plugin support\\\nk) Introduce osExports.c logic\\\nl) 3.2.7b6 Fixed a problem in path name resolving need to use UTF8 to properly interact with high ascii characters\\\nm) 3.2.7b6 Fixed a problem in path name resolving there was a bug with certain types of alias path name combinations in quick name resolving.\\\n\\\nMac VM 3.2.6 mach-o build for Carbon, and build for Classic.\\\nMarch 14th, 2002\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f2 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\nNotes About previous VM.\\\n3.2.6b6 Classic or earlier has a bug that makes it stop collecting user input on a 19.88 hour cycle depending on reboot time.\\\n\tSeems many systems don't run for more than 19 hours so we've not had major complains about this issue. \\\n\tBug was introduced in 3.2.1.\\\n3.2.5 has a bug that prevents the use of accented characters without \\\n\ta image patch to fix a VM issue (not an issue in 3.2.4). Also you can't enter an double keystroke characters, ie ^ \\\n\twhich makes life difficult. It also does not support the AppleScript Plugin (not an issue in 3.2.4)\\\n3.2.4 a bug in project builder introduced a performance problem (bad compiler options).\\\n\\\nSee the 3.2.5 about why this 3.2.6 is different inside.\\\n\\\nFor 3.2.6:\\\na) Change an internal number that dictates how often pending interrupts should be looked at from 5ms to 3ms This improves \\\ndelay accuracy.\\\nb) Change how sleeping is done when squeak is idle. This reduces CPU consumption, and improves Delay accuracy.\\\nc) Fix bug with high bit problem with keyboard (accented characters are ok now)\\\n  c2) 3.2.6b6 has fixed characters that require multiple key strokes to enter.\\\nd) Externals that make UI interactions (IE AppleScript) Must now make a call back to the VM to schedule\\\n    the main thread to do the call that will invoke UI interaction to prevent a deadlock in Carbon between threads. \\\n   See the OSAExecute call in the AppleScript plugin for details.\\\ne) If you run a classic mac VM more than 23.x days nonstop it will stop responding to UI events.  Ensure clocks get anded with 536870911.\\\nf) signal inputSemaphoreIndex because we are mulithreaded. Not that it does anything for us yet...\\\ng) 3.2.6b6 Pass the unicode value of the keystroke up as the EventKeyDown/EventKeyUp data, versus mackeyboard code.\\\nh) Somewhere there is a bug with mktime + time, so use the unix code of time+localtime+gmt \\\ni) Change iorelinquishPrcessorForMicroseconds to sleep the quatum between now and wakeup time. Also schedule a\\\n   check for interrupts if wakeup time is now or in the past. This improves delay accuracy. For OS-x this was a big deal,\\\n   for os-9 it improves things by 1 or 2ms. Also in  os-x we sleep more when idle so CPU usage goes down.\\\nj) On OS-9 umap AND free the VM backing store. Just doing the free doesn't work and you lose 128Mb of disk space until you reboot\\\nk) 3.2.6b7 for post event processing ignore mouse move/drag/or scroll wheel events. These are ignored by the open/gl plugin and only suck a major amount of CPU time to process in the post event processing logic. \\\nl) 3.2.6b8 (3.2.6b4 classic) removed call to uncouple shift keys introduced in 3.2.1. This causes some macs after sleeping not to respond to keyboard input\\\nm) 3.2.6b8 (3.2.5b7 classic) added function for ioLowResMSecs to avoid early bit overflow. Rework clock checking in ioHandleEvents to handle clock rollovers properly.\\\n\\\nMac VM 3.2.5 mach-o build for Carbon, and build for Classic.\\\nMarch 4th, 2002\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f2 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\n\\\nBeware this version of the VM is significantly different inside! \\\n\\\n\\pard\\tx1440\\tx2880\\tx4320\\tx5760\\tx7200\\ql\\qnatural\n\n\\f1 \\cf0 a) Broke sqMacWindow.c into 10 different files by function type.\\\n\\\nb) Moved most of the memory allocation logic out of sqMacMain.c into sqMacMemory.c. and ensure memory is freed when Squeak is terminated. \\\nThe major change in this code is support for OS 9.x virtual memory mapping. This only applies to Mac OS 9.2.0 or higher, excluding os-x. It appears  Mac OS 9.1 has a bug that prevents this feature from working.\\\n\\\nFor images that require less than 128MB of memory, mapping is used to allow the image to grow/shrink to the 128MB boundary, therefore you can change the application memory size to about 2MB. \\\n\\\nFor images that require more than 128MB then change the application memory size to > 128MB and mapping will not occur. \\\n\\\nIf mapping is not available because virtual memory is turned off or the api is not supported by the macintosh OS then mapping is not used. Note that mapping is not support under the classic os-9.x environment under OS-X, however in this case you should be using the OS-X version of Squeak, not the classic version.\\\n\\\nc) Use of Carbon event logic for OS-X only. This is a major structural change. \\\n\\\nIt also encouraged the use of a pthread for interp.c. \\\n\\\nAll user interaction with the VM follows a new code path, so problems with keyboard or mouse input should be reported asap. Also any issues with application switching, windows being brought to the foreground or sent to the background and usage of the full screen logic should be reported asap.\\\n\\\nAs part of this change I have build in support for scroll-wheeled multi-button mice under os-x. Thanks to Doug Way for testing this for me. Maybe someone can post to the list what their favorite 3 button scroll wheeled mouse/trackball is.\\\n\\\nd) Use of a carbon call to get the dominate Device if you have multiple screens. People with multiple screens should confirm window resizing, full screen on/off works as expected.\\\n\\\ne) Corrected comment in sqMacFileLogic.c\\\n\\\nf) Changes to sqMacNSPlugin.c. This makes it compile, but it's not usable yet.\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 \\\n\\\nFeb 20th 2002 3.2.4\\\n\\\nFor this version of the VM I have migrated towards using OS-9 packages. This allows us to provide one \\\nfolder/package that supports os-x and previous operating system versions.\\\n\\\nGiven Squeak 3.2.4Beta1.app\\\nThe classic VM is found in the *.app:Contents:MacOSClassic, with an alias in *.app:\\\nThe mach-o OS-X VM is found in *.app.Contents:MacOS\\\n\\\nIf you are running OS-9 then clicking on the *.app or doing drag and drop will just run Squeak, same applies for OS-X.\\\nIf you are running OS-7.5.5 or OS-8.x then the *.app package will appear as a folder, just open and click on the alias within. \\\nNote that if you want to use classic plugins I suspect you need to put them in the MacOSClassic Folder beside the VM. \\\nBundles for os-x go in the same location as the *.app application package.\\\n\\\nChanges\\\na) Drag and drop at open time with image file that has no meta type, will now open the image, versus prompting you.\\\nb) Use an os-x window attribute at open time to signal that the window should not be moved by the dock when you go to full screen.\\\nc) Fix window update logic to use window that needs updating versus stwindowg to fix issues with print dialog windows in classic. \\\nd) bitblt gets recompile to pickup fixes posted in 3.2 update stream.\\\n\\\nFeb 5th 2002 3.2.3\\\nChanges\\\n\\\na) use old extended time manger to update psudeo-TickCount, versus sigalrm. siglarm make sound recording not work.\\\nb) fiddle with sound recording and make it work.\\\n\\\nJan 2002 3.2.2\\\nChanges:\\\n\\\na) AsyncFilePlugin.c Use global to remember security function entry point for performance reasons\\\nb) FilePlugin.c\tUse global to remember security function entry point for performance reasons\\\nc) interp.c Use squeakFileOffsetType versus off_t and add a bunch of checks to handle lack of long long and conversion errors between 64/32 bit integers and LargeInteger objects\\\nd) readme, it's http://www.mucow.com/Gnuifier.1.cs \\\ne) SocketPlugin.c\tUse global to remember security function entry point for performance reasons\\\nf) sq.h added default sqFilenameFromStringOpen and sqTruncate\\\ng) sqFilePluginBasicPrims.c revert to anti specs, but ensure #def to fseeko and ftello for 64 bit aware file systems.\\\nh) sqMacDirectory.c A bit more error checking on bad file names\\\ni) sqMacFileLogic.c Folders size is now zero in classic, and a bit more checking on bad file names\\\nj) sqMacSound.c Fixed a problem with sound recording in classic due to a change made in Sept. But sound recording still does not work under os-x\\\nk) sqMacWindow.c  two very important changes:\\\n\\\n\t1) You can now do FFI calls with the FFI bundle plugin to Mach-o frameworks. \\\n\tHowever you need to rework your api calls. For example:\\\n\tapiGetMousePoint: aMacPoint was\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'InterfaceLib'>\\\n\tIt now is:\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'Carbon.framework'>\\\n \t\\\n\tIf you review /System/Library/Frameworks I'm sure you can come up with interesting ways to \\\n\tmake mac only squeak images.\\\n\t\\\n\tI now use map( NULL, gMaxHeapSize, PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED,-1,0);\\\n\tanonymous memory mapping to 512MB as the squeak memory block. The VM can then grow or shrink\\\n\twithin the 512MB block, I just move a pointer. \\\n\t\\\n\tNote in 3.2.1 a slight error on my part restricted Squeak to 50MB. I am of course\\\n\tinterested to hear about issues with my choice of 512MB. Note a Squeak VM is limited to 2GB under perfect \\\n\tconditions, however if any part of the image crosses the 2GB boundary the VM will fail, right now 512MB\\\n\tseemed a safe choice.\\\n\t\\\n \tPhysMem:  60.2M wired, 78.6M active,  412M inactive,  551M used,  217M free\\\n\tVM: 3.03G + 55.3M   7847(0) pageins, 1(0) pageouts   \\\n\tPID COMMAND      %CPU   TIME   #TH #PRTS #DREGS RPRVT  RSHRD  RSIZE  VSIZE\\\n\t422 Squeak VM    0.8%  0:35.59   2    71   100  23.3M  8.53M  26.5M   571M\\\n\\\n\tbut I only have one 80,000,000 byte swap file in /var/vm\\\n\\\nNote if you turn crash reporter on, then if the VM crashes a nice report should be generated in your log directory.  See the Apple documentation for a description of this feature, currently it is set in OS-X 10.1.x via the preferences window for the Console Application. If you have a crash with this VM, please recreate and post the crash log (found in Users/foobar/Library/Logs/ to the Squeak mailing list so we can continue to make the VM fault tolerant.\\\n\\\n3.2.1 Notes\\\n\\\nYou might need these change sets to build a new VM or to use all the features of this VM with your image, hopefully these will get into the pending 3.2.x image.\\\n\\\nFixes and feature extensions.\\\nAsyncFileFixFu...hName-JMM.1.cs \tfix for async test method.\\\nDragAndDropAtStart-JMM.5.cs\t\tfix to enable drag and drop at startup\\\n\\\nNeeded to compile a VM with VMMaker\\\nLargeFiles-JMM.3.cs\t\t\t\tEnable large file support, files > 2GB\\\n\\\nNeeded to turn this feature on\\\nMacLongFileName-JMM.5.cs\t\t\tEnable long file names on the mac\\\n\\\nThe SUnit\\\nMacLongFileNamesSUnits-JMM.3.cs\tTest long file names and long directory names and large file support\\\n\\\nKinda optional features some people might need.\\\nInternetConfiguration-JMM.5.cs\t\tAllow internet configuration information access, internal plugin\\\nUUID-JMM.3.cs\t\t\t\t\tAllow UUID generation, internal plugin\\\n\\\na) The ability to get back a UUID. This uses the hosting UUID generator if the\\\n hosting OS supports it and we have a primitive we can call. If not then we generate\\\n a type 4 version of a UUID (the random bits one).\\\n(This requires a special change set)\\\n\\\nb) Ability to start squeak on the mac by dragging multiple documents onto the\\\nimage, or drag and drop of stuff onto the running VM icon.\\\n(This requires a special change set)\\\n\\\nc) Usage of the Internet Configuration tool kit to supply information about\\\nwhat the mac proxy is etc. etc.\\\n(This requires a special change set)\\\n\\\nd) Migrate file system to use 64 bits. This allows you to read/write and seek\\\nwith files > 2 GB. This includes a change to the VM to convert from/to long\\\nlong integers. It also allows the file system to actually deal with 2GB files,\\\nthe current file interface actually fails once the file exceeds 1GB.\\\n\\\ne) For the carbon based Squeak VM we now support long file names 255\\\ncharacters. Close both eyes and touch everywhere the mac VM deals with file\\\nname paths and hope for the best (Actually we write an Sunit to ensure we've\\\nnot broken everything). This also includes the ability to put an image in a\\\nlong file name directory, but right now the image name must stay under 32 characters.\\\n\\\nFilePlugin.c changes to support large integers.\\\nFilePlugin.h changes\\\nsq.h changes to support large files.\\\nsqConfig.h changes to resolve some conflicts.\\\nsqFilePluginBasicPrims.c  changes to support large files.\\\nsqMacAsyncFilePrims.c changes to use fspec versus 255 file path.\\\nsqMacDirectory.c changes to use hosting OS (OS-X) bsd create and delete directory\\\n and truncate. dir_look changes as part of the general rewrite.\\\nsqMacDragAndDrop.c use new call to get path name from fsspec. Use fsspec more, and added \\\n  interface code to setup drag and drop of items at application startup time. max document name\\\n  goes to 1000 characters.\\\nsqMacFileLogic.c Mostly rewrote!\\\nsqMacSecurity.c use new file calls.\\\nsqMacWindow.c \\\n\tincrease size of vmpath, docpath, imagepath to 1000 chars, shortname to 255 characters.\\\n\tadd logic for left/right modifier keys \\\n\treworked LoadLibViaPath logic \\\n\tsqImageFileOpen uses fsspec versus 255 path name.\\\n\tsqImageFileStartLocation uses ffspec.\\\n\tbundle support for bundles\\\n\t\\\ne2) interp.c supports get/put of large integers to long long integers.\\\ne3) fixed fTruncate\\\n\\\nHint getting this to work was a pain. Think of 255 character folder names and nested aliases,\\\nfolder 1 refers to folder 2 which then refers to folder 1 again, just go down the path say 8 times,\\\nthen ask to create a file or directory!\\\n\\\nf) Support to change the Mac screen resolution under Squeak control.\\\n\\\ng) Fix to unload/load the scrap at startup time to ensure the clipboard is\\\ncorrect when starting up the VM.\\\n\\\nh) Uncouple the shift key and left/right shift keys on old extended keyboard.\\\nAlso add a call to get which keys are currently pressed on a USB keyboard or\\\nthe USB codes for an apple non-usb keyboard. (Note this isn't working quite yet under OS-X)\\\n\\\ni) Changes to enable us to compile the VM under Apple's OS-X Project Builder\\\nenvironments.\\\n\\\nj) Some rewriting to ensure serial and midi support can be written as external\\\nplugins.\\\n\\\nk) Fiddling to get sound input to work under OS-X\\\n\\\nl) Platform.exports changed macintosh to macintoshSqueak to avoid conflict.\\\n\\\nm) Memory is allocated at 50MB at start, then will grow or shrink, verus previous carbon apps\\\n that did 1GB. \\\n \\\nn) sqPlatformSpecific.h changes to support long file names and os-x posix file names\\\n\\\no) sqVirtualmachine.c & sqVirtualmachine.h\\\n#if VM_PROXY_MINOR > 4\\\n\tVM->positive64BitIntegerFor = positive64BitIntegerFor;\\\n\tVM->positive64BitValueOf = positive64BitValueOf;\\\n\tVM->signed64BitIntegerFor = signed64BitIntegerFor;\\\n\tVM->signed64BitValueOf = signed64BitValueOf;\\\n#endif\\\n\\\nBeware this causes an interesting problem, if you compile plugins with VM_PROXY_MINOR now set to 5, then they will not work with older VMs. The solution is to define the VM_PROXY_MINOR in the plugin to the value that indicates what features it is using.\\\n\\\np) Changed to use ITimer logic as a 16ms lowres timer to improve performance\\\n\\\nq) Changed to use single thread, no thread manager.\\\n\\\nr) Changed to use lowres timer in checking for polling time to improve performance\\\n\\\ns) It should have faster startup times.\\\n\\\nt) It will hide the empty window at startup, then show the squeak window when required.\\\n\\\nu) It has a different menu structure.\\\n\\\nv) It does less I/O when navigating directories.\\\n\\\nThe macintosh 3.1Alpha1MT VM, Sept 24th 2001 \\\nThis VM was built with the base  3.1 image at change set #4347\\\nV3.1.1 at change set #4347\\\n\\\n\\\nWe go to V3.1.1 to indicate that the 3.1 VM is being used. In the past the 3.1 Image was used but some changes in the openGL logic makes  3.1 Vm and 3.0 image not quite work correctly with 3d graphics. Although a 3.1 VM will run many images way back to the 2x series no careful study has been done on the ability to do this. So at this point we are indicating this VM is a 3.1 VM and best used with a 3.1 image.\\\n\\\nUse of VMMaker to build VM. As of this version everything can be built as an external except for the window logic which hasn't been decoupled from the VM support for the macintosh. \\\n\\\n1) AsynchFilePlugin the security check for ability to create file is now a plugin call.\\\n2) B2DPlugin logic changes to fillLinearGradientfromtoat\\\n3) b3dRemapFaces, b3dRemapEdges, b3dRemapEdgeList, b3dRemapAET, b3dRemapEdgeVertices, b3dRemapFaceVertices, b3dRemapFaceFree, b3dRemapEdgeFree, b3dRemapAttributes. Some casting and changing of += to = + to make some compilers happy.\\\n4) BitBltPlugin added tableLookupat call.\\\n5) DropPlugin added setFileAccessCallback to allow the Security Module plugin the ability to give us the entry point to turn security off so we can open files as read only when security is turned on.  This was broken in the past. \\\n 6) FilePlugin added fileOpennamesizewrite,getThisSession to allow for callbacks. Changed the file security logic to use the plugin interface. \\\n7) interp.c, fixes for 4347ByteArrayRangeCheck-di, ability to printAllStacks, security calls for image rename, write to use plugin interface.\\\n8) Added GetAttributeString, and recordDragDropEvent and entry points for callbacks.\\\n9) SecurityPlugin changed when initialization is called to initialize the safe and unsafe directorys, also added entry points for all the testing calls so it can be a true plugin.\\\n10) Serialplugin. The serial plugin was redesigned to seperate out MIDI logic. People with MIDI devices and old serial macintosh should check to see if they still work since we lack equipment now to test this obsolete technology set.\\\n11) SocketPlugin. Make security calls true plugin calls.\\\n12 SoundGenerationPlugin. Removed \\\nEXPORT(int) SoundGenerationPlugin_primitiveFMSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveOldSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitivePluckedSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveWaveTableSoundMix(void);\\\nThey were a hack at the plugin level and discussion on the list seemed to show they were no longer used. \\\n13) Checking for if defined (__APPLE__) && defined(__MACH__) for the Mac OS-X native development environment\\\n14) Changed sqMacAsyncFilePrims, usage of interpreterProxy->, plugin calls for getThisSession. \\\n15) Changed sqMacDirectory.c. Removed some utility code and make it a seperate file so that it can be shared between sqMacWindow and other plugins that require them. \\\n16) Changed sqMacDragDrop.c. Added plugin callback for getSTWindow, the sqSetFileAccessCallback logic, fileOpennamesizewrite, and secHasFileAccess. Added logic to do the recordDragDropEvent callback to sqMacWindow.c \\\n17) sqMacNetwork.c. Some cleanup for the OS-X version of the OpenTransport headers, some constants have name changes\\\n18) sqMacNSPlugin.c Use of ioLoadFunctionFrom(NULL, \"DropPlugin\"); versus explicit call.\\\n19) sqMacOpenGL.c. Some cleanup for the OS-X version of the OpenGL headers\\\n20) sqMacOpenGLInfo.c. Some cleanup for the OS-X version of the OpenGL headers\\\n21) sqMacSecurity.c ioInitSecurity calls back to dragAndDrop plugin to set entry point to turn security off.  Added code to create directories if required and ensured callbacks are plugitized.\\\n22) sqMacSound.c Some cleanup for the OS-X version of the Sound headers. Use of interpreterProxy-> in the proper places.\\\n23) sqMacWindow.c Some cleanup for the OS-X version of the compiler.  Fixed saveAsEmbeddedImage, this got broken when we moved from a FAT to a ppc only application.  Altered interface to recordDragDropEvent so that it was plugable. Some file path name logic goes to a seperate C source file. The drag and drop plugin is loaded and intialized after the image is loaded but before the interpreter is started, before it was done a bit earlier in the startup process. This also has the effect of initializing the security module.\\\n24)sqOpenGLRenderer.c. Some cleanup for the OS-X version of the OpenGL headers\\\n25)SurfacePlugin.c gets a hack so it knows when it is internal versus external.\\\n\\\n\\\n\\\nv3.0.18 at change set #4081\\\n(Note browser plugin goes to 3.0.23\\\n\\\n1) sqMacOpenGL.c Quite a few changes were made to the code to support it as an internal plugin for the browser. This is because the drawable frame for a browser plugin is a subset of the browser's grafport, so lots more care must be taken to draw in the correct location using OpenGL. We also fixed issues with re-configurating the Open/GL draw area when the window gets resized or goes to full screen, and attempted to ensure multiple screens will work.\\\n\\\n2) sqMacWindow.c, minor fix to cast a constant char * to char * for CW 6.1\\\n\\\n\\\nBrowser plugin 3.0.23 fixes\\\n\\\n1) Integerated the H/W Acceleration as an builtin plugin\\\n2) Added logic for pre and post event interaction to browser plugin event handler for H/W Acceleration logic. The external H/W Acceleration plugin mostly works with the browser plugin but doesn't work with full screen mode, or if the plugin is embedded in a window or a scrollable frame, so don't use it. Use the browser plugin 3.0.23 or higher which has the H/W Acceleration builtin.\\\n\\\nv3.0.17 at change set #4081\\\n(Note browser plugin goes to 3.0.21)\\\n\\\n1) Added HW acceleration as internal plugin.\\\n2) 4079BBAlphaTextFix-ar Fixes the problem with alpha text, changes BitBltPlugin.c \\\n3) Added primitive on the mac to truncate a file.\\\n4) Added logic to flush volume on a flush file to ensure file and control blocks are flushed.\\\n5) For the Carbon VM we increase nextevent wait time if we get sufficent idle time. This should reduce CPU usage under OS-X\\\n6) GetAttribute: 1002 now returns the gestaltSystemVersion as a hex string, and getAttribute: 1003 now returns either '68K' or 'PowerPC'.\\\n7) Starting with 3.0.17 the VM is build only as a powerpc application. The latest VM as a 68K application will be made available from time to time permits based on people's needs. \\\n8) Changes to sqOpenGLRenderer.c to improve performance, OpenGL 1.1 support.\\\n\\\nPlugin 3.0.21 fixes\\\n\\\n1) added check for mailto: tag on posts to fix problem with Netscape crashing, and IE hanging.\\\n2) Plus above fixes.\\\n\\\nWhat has been fixed/changed.\\\nv3.0.16 at change set #4041\\\n(Note browser plugin goes to 3.0.20)\\\n\\\n1) Lots of fixes for BitBlt and HW acceleration.\\\n2) Hardware Acceleration plugin goes to 1.0.1. Please note there is a seperate plugin with the same name for Carbon. Doing a get info will identify if the plugin is only usable with Carbon Squeak.\\\n\\\nv3.0.15 at change set #4026 (May 17th test version)\\\n(Note browser plugin goes to 3.0.19)\\\n\\\n1) Added support for OpenGL HW acceleration plugin\\\n\\\nPlugin 3.0.19 fixes\\\n\\\na) Obey embedded tag plug\\\nb) Fix problem with plugin 3.0.17 not working with netscape 4.x\\\nc) Carbonize plugin for IE 5.1 \\\nd) Remove debugging printf than occurred on transition to full screen mode\\\n\\\nWhat has been fixed/changed.\\\nv3.0.14 at change set #3987\\\n\\\n(Note plugin goes to 3.0.17)\\\n\\\n1) sqMacDirectory.c. The pathlookup would handle the case of foo:bar::do incorrectly by ignoring the :: path redirection. This has been fixed. However a path lookup will not work if it contains :: and an aliased directory in the middle of the path.\\\n\\\n2) sqMacSecurity.c. The pathname for the untrustedUserDirectory was built incorrectly, and the bug mentioned above in sqMacDirectory.c usually kept this from being noticed.\\\n\\\n3) sqMacWindow.c  we added some logic to do the delay for primitiveRelinquishProcessor, but found it had an large effect on a freecell benchmark. I suspect on a Morpic step wait there is nothing to do so primitiveRelinquishProcessor gets called which then affects response time. So for now we revert to the 3.0.11 behavior, good performance and 100% CPU usage!\\\n\\\n4) GetAttribute 1004 returns returns interpreterVersion; which is for example\\\n\"Squeak3.1alpha of 6 February 2001 [latest update: #3987]\"\\\n\\\n5) When in full screen mode we now attempt to disable resizing, zooming, or moving the window. The window borders are hidden, but in the past it was feasible to grab an edge and alter it, thus confusing the VM.\\\n\\\n6) Worked on Carbonizing the browser plugin\\\n\\\n7) 3977 & 3978 FloatArray fixes. Makes float arrays go through a new (and working) version of #primitiveHash\\\n\\\n8) Fixed problem with accidental mouse clicks being triggered from pulldown menus on application switching.\\\n\\\n9)\\\n\"Change Set:\t\t3984 BitBltExtensions-ar\\\nDate:\t\t\t4 May 2001\\\nAuthor:\t\t\tAndreas Raab\\\n\\\nThe change set includes various extensions for BitBlt with the goal of migrating the useful features from FXBlt into the general BitBlt mechanisms. These include:\\\n\\\n* Handling of LSB and MSB forms:\\\nBitBlt now handles both, MSB and LSB forms (and their conversions). Only instances of Bitmap are assumed to contain big-endian pixels. All others are assumed to be little endian (reason is that we can only identify Bitmap here). Note that 'LSB' and 'MSB' refers to PIXELS, that is a 1bpp LSB form has its left most pixel in the lowest bit whereas a 1bpp MSB form has its left-most pixel in the highest bit.\\\n\\\nFor pixel depths < 8 this can be different from what your OS supplies (as an example, Windows bitmaps < 8 are big-endian pixels in little-endian words; we might call them 'middle-endian'). We simply don't deal with those - forms are either big or little endian but nothing inbetween.\\\n\\\nBitBlt has got an extra combination rule for swapping pixels in the destination form. This can be used to make byte swapping much more efficient (as soon as we've got more VMs with support for it).\\\n\\\n* Handling of 'native bitmaps' (aka surfaces):\\\nBitBlt is now able to deal with OS surfaces that are registered with the surface plugin.\\\n\\\n* Handling of full color maps:\\\nBitBlt has been extended to deal with instances of ColorMap in addition to the prior mechanism of using only indexed lookups and provide an implicit 16-32 bit color conversion. ColorMaps can specify both, a lookup table and an additional set of masks and shifts to apply during the color mapping operation. \\\n\\\nFour independent shifts and masks can be given which can be used for a lot more than just color conversion (as an example, one could do byte swapping with this; but see also BitBlt class>>exampleColorMap). \\\n\\\n* Better handling of default arguments:\\\nFor most of the required arguments for BitBlt very reasonable default assumptions can be made. This includes the destOrigin (0@0), clipRect (0@0 extent: destForm extent), sourceOrigin (0@0). BitBlt now substitutes these if they are absent (e.g., nil) in the instance provided.\\\n\\\n\"\\\n\\\n\\\nv3.0.13 at change set #3848\\\n\\\n1) sqMacSecurity was changed to set the unsecure directory to\\\n\tsystem folder:Preferences:Squeak:Internet:My Squeak\\\n\\\nv3.0.12 at change set #3848\\\n1) Fixed problem with creating My Squeak Folder in Documents Folder with System 8.6\\\n\\\nWhat has been fixed/changed.\\\nv3.0.11 at change set #3848\\\n\\\n1) sqMacDirectory had a bug when you resolved a path name. The fast resolve always failed, which invoked the slow resolver. Now the fast resolver works.\\\n\\\n2) sqMacSecurity was changed to set the unsecure directory to Documents:My Squeak. \\\n\\\n3) sqMacWindow was changed to fix some issues with Squeak capturing events from other applications and to reduce the number of duplicate mouse events that are generated. Also we capture modifier information  directly from the mouse and keyboard on null events to fix some problems with Carbon. We  hopefully fixed problems with mouse clicks from foreground applications being seen by Squeak and issues with the OS-X Dock clicks.\\\n\\\n4) sqMacNSPlugin was changed to use the above mouse/keyboard capture code which is much cleaner than the original fix for the bogus modifier information given to us by netscape on a null event. \\\n\\\n5) When you turn full screen off we now correctly reposition the window to the original location versus a few pixels to the left. \\\n\\\nWhat has been fixed/changed.\\\nv3.0.10 at change set #3848\\\n\\\n1) changed VM exception unwind logic\\\n\t3796-Exception-unwind-V3,tim@sumeru.stanford.edu, Paul McDonough, Stephen Pair and others\\\n\\\n2) Fixes for the JPEGReader plugin and for Jitter 3\\\n\\\n3) Added minimal Mac VM logic to assist in building a small VM.\\\n\\\n4) Changed how the browser plugin starts up. Now it starts the interpreter running only after getting the browser setwindow command. This seems to fix a race condition that resulted in a crash at startup time with Netscape 4.x\\\n\\\n5) Fixed broken full screen redraw on cmd-tab\\\n\\\n6) Fixed what looked like mouse-down, mouse-down, mouse-up sequence. Now reports mouse-down, mouse up.\\\n\\\n7) Added StarSqueak plugin as internal plugin\\\n\\\n8) Note the current Squeak Plugin should be gotten from the www.squeakland.org site.\\\n\\\nv3.0.9 at change set #3776, Boston Snow storm build.\\\n\\\n1) A number of changes were made to the interpreter:\\\n\ta) added primitive to change a class.\\\n\tb) added primitives to get or put 32bit integers\\\n\tc) Fix problem with GC and class reshaping\\\n\td) Better logic for method cache flushing\\\n\\\n2) Added JPEGReader plugin\\\n\\\n\\\nV3.0.8 at change set #3740\\\n\\\n1) The caps lock no longer maps to the shift attribute. So if the caps lock is down mouse clicks will behave normally. \\\n\\\n2) Numerous fixes for the BitBltPlugin plugin\\\n\\\n3) Memory allocation grow/shrink logic for Carbon was added.\\\n\\\n4) Spurious mouse clicks for the browser plugin has been fixed. (This took awhile to fix, I'm sure it's a bug with the Swedish version of Netscape)\\\n\\\n5) The browser plugin will attempt first to allocate memory from the browser heap, then the system heap. Most people when faced with a memory issue usually increase memory for the browser first. However memory for the plugin is controlled by an attribute in the EMBED HTML statement. \\\n\\\nV3.0.7\\\n\\\n1) A bug exists in pre OS 8.x that causes a crash in activate window if the standard get file \\\ndialog comes up before the Squeak Window. I remove the InvalWindow call found in that routine since it is actually redundant.\\\n\\\n2) The standard get file dialog on system 7.x would not terminate if you did a cancel.\\\n\\\n3) The InterfaceLib had to be weak linked to prevent CFM startup issues. \\\n\\\nV3.0.6\\\n\\\n1) Alias resolving is less aggressive.\\\n\\\n2) We no longer cache image reads or writes. This was done because OS 9.1 allows you to have very large disk caches, and it's pointless to cache the image read or write.\\\n\\\n3) The file flush primitive now actually flushes the file via an OS call. This was a bug in the CodeWarrior 5.3 source code.\\\n\\\n4) The 68K version was being built with the 68881 math library. This fails on 68040LC chips. We now use the non-68881 math library. Thanks to Bruce ONeel for find this.\\\n\\\n5) A bug was found in the path resolving logic that was added for 3.x. This bug apparently only affects 68K machines,  never was identified as a PowerPC issue. \\\n\\\n6) The Netscape plugin needs a properly allocated clip region, this code seemed to work ok on new systems, but fails on system 7.6.1\\\n\\\n7) The security interface will create a Documents folder on the root volume if the default Document folder has been deleted. This is needed for security purposes. \\\n\\\n8) Jitter needs 1MB of free memory to run.\\\n\\\n9) 68K machines require another 32K of stack\\\n\\\n10) Threads  now work on 68K machines, but turned off because of possible performance issues. (I think more study is needed).\\\n\\\n11) The 68K version was compiled with better optimization, expect a 15% improvement.\\\n\\\n12) fix for BitBltPlugin ascii = byteAt((sourcePtr + charIndex) - 1);\\\n\\\n13) The interpreter object validation checking code was alter to work correctly.\\\n\\\nV3.0.5\\\n\\\n1) sqConfig.h changed due to BE OS header changes\\\n\\\n2) sqMacDirectory.c. Added support for Navigation services or Standard File Get to find the image at startup time when the Squeak.image is not found by the VM. This replaces the DOS like console message that comes up saying that Squeak can't find a image.\\\n\\\n3) A fix to drag and drop for the browser plugin.\\\n\\\n4) We now use Apple's cooperative multithreading package to run the UI in one thread, the VM in the other. This solves some issues with the browser and makes the UI versus VM logic and execution responsibilities easier to understand. \\\n\\\n5) Changed the sqMacNSPlugin.c code to support a 3.0VM using multithreading support. This should give Squeak in a browser better performance. Also changed the full screen support to correctly work with multiple monitors.\\\n\\\n6) BitBltPlugin.c gets one more op code\\\n\\\n7) Added the security interface\\\n\\\n8) Added the file flush primitive\\\n\\\n9) Rewrote the macintosh readme file\\\n\\\n10) Revisited the zoomWindow code and found a bug with multiple monitor support, then I fixed the code to make Full Screen mode work on screen that Squeak window is mostly on, versus the menubar screen. Also if you switch from full screen back it resizes the window back to the orginal size and location before you invoked the full screen. \\\n\\\nV3.0.2\\\nPlugins\\\n\\\nRecompiled the internal BitBltPlugin plugin to encorporate:\\\nChange Set:\t\t258AlphaBlendOpt-dsm\\\nAuthor:\t\t\tDuane Maxwell, Paul Phillips/exobox\\\na) Short circuits full opaque and full transparent pixels when alpha blending.\\\n\\\nRecompiled the internal LargeIntegerPlugin\\\n3298LargeIntegersV1-2-sr -- Stephan Rudlof -- 29 November 2000\\\n3299LargeIntV1-2For29-sr -- Stephan Rudlof -- 29 November 2000\\\n\\\nVM Software\\\n\\\n(b) PowerManagement for macintosh is now supported. You can disable the power manager to give you better performance on some powerbooks at the expense of battery life. See the Preferences Panel for details, category 'Performance'\\\n- changed sq.h\\\n- changed sqMacWindow.c to add support for power mgr disabling\\\n\\\n(c) Drag and Drop support for the macintosh, dragging files from the Finder to the Squeak window is now supported.\\\n- sqMacDragDrop.c added\\\n- sqMacWindow.c changed\\\n\\\n(d) Added primitive for get macintosh creator and file type.\\\n- sqMacDirectory.c changed\\\n\\\n(e) Carbon support. Thanks to Karl Goiser karl@wattle.net for work he did on sound and other Carbonization hotspots.\\\n- sqMacAsyncFilePrims.c changed\\\n- sqMacFFIPPC.c changed (not supported for Carbon)\\\n- sqMacNetwork.c changed per Apple tech note 1173 Carbon asset tracking\\\n-sqMacSerialAndMIDIPort.c chnaged (Not supported for Carbon)\\\n- sqMacSound.c changed per Apple tech note 1198 Carbon double sound buffer playing\\\n- sqMacWindow.c changed (various changes for Carbon)\\\n\\\n(f)  Poll at least 60 times a second for the mouse if required. Previous 2.9.x VM did it 30 times but this is too slow and 2.8.x VM do it 60 times a second.\\\n\\\n(g) Reworked path support Thanks to Karl Goiser karl@wattle.net for starting this.\\\n- sqmacDirectory.c changed reworked lookupPath\\\n- sqMacWindow.c changed, added GetApplicationDirectory to get application directory\\\n\\\n(h) I rewrote the sqMacDirectory.c logic to enable proper understanding of Apple's Alias logic. This means for example you can alias the \"SqueakV3.sources\" file and then only have one copy and have all your images point to it. \\\n\\\n(i) Added Zoom Window support.\\\n\\\n(j) Change the Squeak change file icon to better match Apple's visual guidelines, Thanks to Doug Way for the suggestion and the new icons.\\\n\\\n(k) The sound plugins have changed...\\\n\\\n(j) Dropped FFI out of the base Squeak because of security concerns\\\n\\\n(k) Compiled for 750(G3) processor versus 603\\\n\\\n(l) Added screenDepth primitive\\\n\\\nThe 3.0.x VM contains most of the optional plugins, you might want to check this by inspecting \"Smalltalk listBuiltinModules\" to see where your plugins are coming from. In some case people have been accidentally overriding the new builtin plugins with older plugins. \\\n\\\nThe file \"Squeak 3.0Alpha10MT.sig\" contains the PGP signature for the Squeak 3.0Alpha10MT VM\\\n\\\nJohn M McIntosh  johnmci@smalltalkconsulting.com\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n}"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Documentation/3.6.0 Release Notes.rtf",
    "content": "{\\rtf1\\mac\\ansicpg10000\\cocoartf102\n{\\fonttbl\\f0\\fnil\\fcharset77 Geneva;\\f1\\fswiss\\fcharset77 Helvetica;\\f2\\fnil\\fcharset77 LucidaGrande;\n}\n{\\colortbl;\\red255\\green255\\blue255;\\red26\\green26\\blue255;}\n\\margl1440\\margr1440\\vieww17300\\viewh12720\\viewkind0\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0\\fs24 \\cf0 Mac VM 3.6.0 mach-o build for Carbon, and build for Classic. Support for Croquet, and support for Safari\\\nNov 11th, 2003 (3.6.1b3)\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets. (Yawn, someday)\\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\n\\\nNotes About previous VM.\\\n3.2.6 VM classic have an issue when the tickcount clock goes over 0x7FFFFFFF, about 24 days. \\\nThis exhibits it self as Squeak won't accept user input, or allow you to switch under os 9 or earlier.\\\nStarting a Squeak image hangs durning the screen painting.\\\nRestarting the mac solved these problems. Force quit does not.\\\nThis is fixed in 3.2.7b3\\\nSome issues with alias files and folder were fixed in 3.2.7b6 and 3.2.8b3\\\nYou need 3.5.3b1 for Safari plugin support\\\n3.6.0b2 seems a fine VM, from what people tell me, but now we've 3.6.1...\\\n\\\n3.6.1b3\\\nSqMacWindow.c\tAlter logic to allow for 16->32 and 32->16 mapping using direct copy logic. Workaround for \\\n\t\t\t\tos-x 10.3.0 copybits bug. Released for limited testing. Awaiting real fix from Apple.\\\n\\\n3.6.1b2\\\nSqMacWindow.c\tAlter to use unix direct port bit copy versus copybits to get around a crash caused by a bug\\\n\t\t\t\tin os-x 10.3.0 copybits. Released for limited testing\\\n\\\n3.6.0b2\\\nBuild from about to be offical 3.6.0 VM, Balloon & VM Maker source.\\\nAdded in \\\nArraysToGlobalStruct-JMM.1.cs\\\n\t?3.7 Status unknown, but makes better interp.c interpreter loop code (silly optimizer).\\\nFasterCopyLoop-JMM.4.cs\\\nFasterCopyLoopPart2-JMM.2.cs\\\n\t?3.7 Status unknown, but makes drawing 20%+ faster due to better PowerPC code optimizations\\\nFasterLookupMethod-JMM.1.cs\\\n\t?3.7 Status unknown, but makes method lookup a bit faster. \\\nMakePrimPointXInternal-JMM.1.cs\\\n\t?3.7 Status unknown, but makes point x/y access faster.\\\n\\\nSlightlyFasterActivate-JMM.3.cs\\\n\tRolled into 3.7\\\n\\\n3.5.3b1  (browser plugin)\\\nFixed issues with IE drawing and crashs related to screen updating in non-thread safe IE.\\\n\\\n3.5.2b6\\\nFixed issues with plugin discovery for netscape plugin \\\n3.5.2b5\\\nFixed primitive dispatch to use gnuified jump table. \\\n\\\n3.5.2b4 \\\nFix issue with race on open doc events and squeak VM Thread for drag and drop support when starting squeak\\\nFor os-x expose primitivePluginBrowserReady, not the rest of the URL browser primitives, they don't work in Safari\\\nFor system attribute 1003 return powerpc versus PowerPC to match unix VM\\\nStart timers later in the VM startup logic, after reading the image, versus before.\\\nsqMacNSPlugin.c \t- Look for Squeak folder in User, local, Network, System domains versus just User.\\\nsqMacTime.c\t\t- Use old delay logic (1ms accurate), versus aioPoll (10ms accurate).\\\nsqMacUIEvents.c\t- Only create PowerManagerDefeatTimer tick routine if power manager tapping is required which is only os-9 anyways.\\\nsqMacUIMenuBar.c - Draw menu bar later in startup, after we change it, save 200+ms\\\nBitBltPlugin.c\t\t- alphaSourceBlendBits16  Use table lookup which is 90% faster\\\n\t\t\t\t- copyLoopNoSource, roll constants into register versus recalculating.\\\n\\\n3.5.2b2 \\\nFix applescript document handling logic to prevent overrunning the drag/drop logic via the command line open cmd by using a spin loop\\\nto ensure Squeak has sufficent time to read the file name. \\\n\\\n3.5.2b1 \\\nChanged the bitBlt copyloop logic to use locals in safe places, versus globals. This improves drawing by 5%.\\\nMajor change is usage of GCC 3.3, versus GCC 2.95.x This increases send/second by about 8%.\\\n\\\n\\\n3.5.1b5 Added some more user changeable attributes, and changed some window behaviour when floating\\\nOS-x Version only \\\nSqueakWindowHasTitle\t\t- (Yes/No) yes if window should get title.\\\nSqueakFloatingWindowGetsFocus (Yes/No) yes if window should allow click and type if floating.\\\nSqueakMaxHeapSize\t\t- (Number) set to 512K, max size for os-x memory heap. Note changing this to 1GB may or may not cause a \\\n\t\t\t\t\t\tcore dump depending on where os-x allocates the memory segment above or below the 2GB boundary. \\\n\\\nsqMacUIEvents.c\t\t\t- set keyboard focus to floating window if required, do not hide floating window when we go to full screen mode.\\\nsqMacWindows.c\t\t\t- watch out for memory leak when we free the color table. \\\n\\\n3.5.1b4 Please note the major changes to network code in 3.5.1b2\\\na)Added options SqueakWindowType & SqueakWIndowAttributes to info.plist. The SqueakWindowType of 6 is the standard document window, a type of 8 is the floating utility window. The attributes control with window attributes and behavior according to\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f1 \\cf2 \\ul \\ulc2 http://developer.apple.com/techpubs/macosx/Carbon/HumanInterfaceToolbox/WindowManager/Window_Manager/wind_mgr_ref/constant_2.html#//apple_ref/c/tdef/WindowAttributes\\\n&\\cf0 \\ulnone \\\n\\cf2 \\ul \\ulc2 http://developer.apple.com/techpubs/macosx/Carbon/HumanInterfaceToolbox/WindowManager/Window_Manager/wind_mgr_ref/constant_1.html#//apple_ref/doc/c_ref/WindowClass\\cf0 \\ulnone \\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 b) Sockets are not valid if the network is not initialized. \\\nc) The os-9 vm can return the open file error in the vm attribute data 1202\\\nd) MyWindowEventMouseHandler was leaking region handles.\\\ne) Support for primitiveClosureValue, primitiveClosureValueWithArgs, primitiveExecuteMethod\\\nf) when rootTableCount  goes > 2400 then allocationCount gets allocationsBetweenGCs + 1 \\\ng) BitBlt Alpha Blending has changed\\\nh) Added primitiveWrite24BmpLine\\\ni) The guard if statement for primitiveSerialPortRead was flawed, noted the buffer overflow, but then proceeded, versus returning. \\\n\\\n3.5.1b3 \\\na) Fix, Stephane Ducasse <ducasse@iam.unibe.ch> pointed out that using a virtual desktop we had a crash in ioSetFullScreen. This \\\nwas due to a pthread race condition between the UI thread and interp.c. Fixed by using UI callback to handle fullscreen window/move/resize.\\\n\\\n3.5.1b2\\\na) Switch to aio.h logic and unix socket logic! This is a MAJOR change!!!!\\\n\\\nb) Call aioPoll  (select()) to cause process wait versus old pthread logic. This follows in the footsteps of the unix port. You should verify that \\\ncpu time when squeak is idle is not affected in a dreadful manner.\\\nc) Fix, if you call does this directory exists on a file now you will get an error which will signal that the directory does not exist. This ensures\\\nthe FileDirectory test suite works. \\\nd) Fix, if you quit the browser plugin, check the status of the pthread_cancel before attempting the pthread_join\\\n \\\n3.5.1b1 limited distribution\\\n\\\n3.5.0b4 \\\na) os-x exposed an issue with EToyPeerToPeer support. It seems under os-x we get the connect, data, close so fast on lans that by the \\\ntime we get around to asking for the remote IP address the connection is closed, and our open transport call fails. We change SqMacNetwork.c to \\\nreturn the IP address discovered at connect time in this case. Under os-9 we never saw this behavior because we suspect the network activity \\\nwas slower and more serialized. \\\n\\\n3.5.0b3 (Safari support)\\\n\\\na) The plugin logic was changed to support Safari and better support os-x. This required building a CFM stub to load the mach-o compiled\\\nNSPLugin. The mach-o plugin now uses a pthread for the interp.c loop. This gives much better performance and user UI feedback. \\\nb) The GC logic was carefully reworked to optimize the assembler on the ppc. This gave us upwards of a 30-50% improvement, since \\\nincremental GC is going on all the time, this change actually has a effect you can see say in the solitaire example where we save 10%. \\\nc) sqMacNetwork.c was modified, first change in many years. The remote address and port number are requested as an async operation. \\\nThe operation times out after a few milliseconds. This was never a problem in os-9. Now it seems there is an issue sometimes for DHCP clients\\\non os-x. There the operation can timeout and return 0 as the address or port. We changed the call to do a sync operation to avoid a timeout.\\\nd) sqMacMain.c was modified to allow for pthreads for mach-o netscape based squeakland plugin support\\\ne) sqMacMemory.c changes for mach-o plugin support\\\nf) sqMacTime.c changes for  mach-o plugin support\\\ng) sqMacUIEvents.c changes for mach-o plugin support\\\nh) sqMacWindow.c changes for mach-o plugin support \\\ni) npmac.cpp now this is a netscape glue routine, I changed it to ensure we can see the entry points, originally they are C++, but need \\\nto be \"C\" so the loader can find the names the CFM glue routine is looking for. Also we add the logic TV2FP to setup the mach-0 to CFM code stubs to allow the mach-o plugin to callback to the CFM stubs in Safari. \\\nj) sqMacNSPlugin.c \\\n\t1) Rearrange when the interpret() thread is started to ensure a race condition doesn't happen.\\\n\t2) use Pthreads for the mach-o osx version. \\\n\t3) rework NPP_SetWindow to start interpret() when needed. \\\n\t4) Alter StartDraw, EndDraw to use a mutex lock and handle os-x port locking to prevent races between pthreads.\\\n\t5) Alter ioShowDisplay, optimization and handle os-x\\\n\t6) fix ioSetFullScreen to make it work on Safari\\\n\t7) fix OpenFileReadOnly to make it work on os-x, needed sqFileNameFromStringOpen macro call\\\n\t8) Alter ExitCleanup to mutex lock to prevent race ending issues, and add a bit more cleanup\\\n\\\n\\\n\\\nNote some versions of 3.4.1 were distributed for testing only, these are superseded by 3.5.0\\\n\\\n3.4.0b2 (Croquet support)\\\n\\\na) Ensure vmVersion information reports correct information, was bogus in 3.4.0b1\\\n\\\n3.4.0b1 (Croquet support)\\\na) Added plugin BMPReadWriterPlugin 14 November 2002 (i)\\\nb) B3DAcceleratorPlugin.c gets primitiveCreateRendererFlags (new api)\\\nc) two more op codes get added to BitBltPlugin (fixAlphawith, pixClearwith)\\\nd) Squeak3D gets (b3dOrthoNormInverseMatrix, b3dTransformDirection,b3dTransformPoint,b3dTransposeMatrix)\\\ne) The scroll wheel mouse logic was using apple cmd key as the modifier on the arrow key events, Other platforms use the Control key. So the \\\nmac falls in line (changed to use the control-key)\\\n\\\n3.2.8b9\\\na) recompiled os-x version, 3.2.8b8 seem to have a bad compiler option and gave 20% less performance.\\\n \\\n3.2.8b8\\\na) exposed \n\\f1 vmParameter\n\\f0  24 & 25 which control how memory is allocated/freed \\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f1 \\cf0 Smalltalk vmParameterAt: 24 put: 48*1024*1024.\\\nSmalltalk vmParameterAt: 25 put: 24*1024*1024.\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 b) Added argv,argc, env variables to main\\\nc) Fixed for Jaguar 10.2. Full screen mode cmd-tab broke menu bar hiding, this is a 10.2 bug\\\nd) Added support for IP_ADD/DROPMEMBERSHIP and the ability to bind to the wild card port (0).\\\ne) OpenGL changes for TEA\\\n\\\n3.2.8b7 was testing release and not distributed to the public.\\\n3.2.8b6 was testing release and not distributed to the public.\\\n3.2.8b5\\\na) Oops broke the logic returning the vmversion information in classic. Also incremented os-x version (which was fine) to keep numbers in sync\\\n\\\n3.2.8b3 The squeak.sourceforge.net CVS tree was reorganized and the project builder project revamped. The \\\nmajor change to the source was upgrading the netscape browser plugin to 3.2.7b6 levels.\\\n\\\na) Gnunifer.3.cs Changed to add register var on FOO_REG and to remove sqGnu.h file embedded in method.\\\nb) sqMacDirectory.c Add logic to handle case of building as CFM carbon plugin under CW6, needed some carbon calls\\\nc) osExports.c needed to ifdef out the getUIToLock entry point (not available as CFM carbon browser plugin)\\\nd) sqMacFileLogic.c Fix alias problem. Add logic to deal with path names as CFM carbon browser plugin, ensure vmPath is correct.\\\ne) sqMacImageIO.c Cast to get rid of warning message\\\nf) sqMacMain.c Cast to get rid of warning message, Check for CFM Carbon and bundle check. Revise vm parm 1201 code to return long file names are ok as CFM carbon browser plugin. Some diagnostic routines for printing to the console as CFM carbon browser plugin.\\\ng) sqMacMemory.c Logic change as CFM carbon browser plugin.\\\nh) sqNSPlugin.c\tFix to beginFullScreen logic (carbon call is broken?)\\\ni) sqMacUIEvents.c Remove getUIToLock dummy call. This entry point should only exist for mach-o carbon builds. Not CFM carbon browser plugins\\\nj) sqMacWindow.c  Use old call to create window when a CW 5 carbon application.\\\nk) sqPlatformSpecific.h Change #ifdef to correct logic error when building as CFM carbon browser plugin under CW 5.\\\n\t\\\n\t\\\n\\\nMay 31st, 2002 (3.2.7b6)\\\nFor 3.2.7\\\n\\\n3.2.7b3 We build the VM using patchs to enable globals as a structure. This improves performance by 10%\\\n\\\na) Classic Vm builders might need to add \"struct foo *foo = &fum; \"  to int interpret(void). \\\nb) readme: add notes about changesets and alter build instructions\\\nc) sqMacFileLogic.c: use accessors for interp.c globals\\\nd) sqMacMain.c: use accessors for interp.c globals. Also Alain Fischer added logic to fetch os-x version number and to enable you to put squeak.image in the resource folder for autostarting.\\\ne) sqMacTime.h: Fix busted lowresclock again. After 24 days of mac uptime, 3.2.6 squeak will hang.\\\nf) sqMacUIEvents.h: use accessors for interp.c globals.\\\ng) sqPlatformSpecific.h: alter sqFTruncate to use fileno() as needed.\\\nh) sqMacWindow.c: use accessors for interp.c globals.\\\ni)  3.2.7b5 sqMacFileLogic.c: change vmpath to resolve to classic VM if vm is moved from MacOSClassic folder\\\nj) Misc changes for Netscape plugin support\\\nk) Introduce osExports.c logic\\\nl) 3.2.7b6 Fixed a problem in path name resolving need to use UTF8 to properly interact with high ascii characters\\\nm) 3.2.7b6 Fixed a problem in path name resolving there was a bug with certain types of alias path name combinations in quick name resolving.\\\n\\\nMac VM 3.2.6 mach-o build for Carbon, and build for Classic.\\\nMarch 14th, 2002\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f2 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\nNotes About previous VM.\\\n3.2.6b6 Classic or earlier has a bug that makes it stop collecting user input on a 19.88 hour cycle depending on reboot time.\\\n\tSeems many systems don't run for more than 19 hours so we've not had major complains about this issue. \\\n\tBug was introduced in 3.2.1.\\\n3.2.5 has a bug that prevents the use of accented characters without \\\n\ta image patch to fix a VM issue (not an issue in 3.2.4). Also you can't enter an double keystroke characters, ie ^ \\\n\twhich makes life difficult. It also does not support the AppleScript Plugin (not an issue in 3.2.4)\\\n3.2.4 a bug in project builder introduced a performance problem (bad compiler options).\\\n\\\nSee the 3.2.5 about why this 3.2.6 is different inside.\\\n\\\nFor 3.2.6:\\\na) Change an internal number that dictates how often pending interrupts should be looked at from 5ms to 3ms This improves \\\ndelay accuracy.\\\nb) Change how sleeping is done when squeak is idle. This reduces CPU consumption, and improves Delay accuracy.\\\nc) Fix bug with high bit problem with keyboard (accented characters are ok now)\\\n  c2) 3.2.6b6 has fixed characters that require multiple key strokes to enter.\\\nd) Externals that make UI interactions (IE AppleScript) Must now make a call back to the VM to schedule\\\n    the main thread to do the call that will invoke UI interaction to prevent a deadlock in Carbon between threads. \\\n   See the OSAExecute call in the AppleScript plugin for details.\\\ne) If you run a classic mac VM more than 23.x days nonstop it will stop responding to UI events.  Ensure clocks get anded with 536870911.\\\nf) signal inputSemaphoreIndex because we are mulithreaded. Not that it does anything for us yet...\\\ng) 3.2.6b6 Pass the unicode value of the keystroke up as the EventKeyDown/EventKeyUp data, versus mackeyboard code.\\\nh) Somewhere there is a bug with mktime + time, so use the unix code of time+localtime+gmt \\\ni) Change iorelinquishPrcessorForMicroseconds to sleep the quatum between now and wakeup time. Also schedule a\\\n   check for interrupts if wakeup time is now or in the past. This improves delay accuracy. For OS-x this was a big deal,\\\n   for os-9 it improves things by 1 or 2ms. Also in  os-x we sleep more when idle so CPU usage goes down.\\\nj) On OS-9 umap AND free the VM backing store. Just doing the free doesn't work and you lose 128Mb of disk space until you reboot\\\nk) 3.2.6b7 for post event processing ignore mouse move/drag/or scroll wheel events. These are ignored by the open/gl plugin and only suck a major amount of CPU time to process in the post event processing logic. \\\nl) 3.2.6b8 (3.2.6b4 classic) removed call to uncouple shift keys introduced in 3.2.1. This causes some macs after sleeping not to respond to keyboard input\\\nm) 3.2.6b8 (3.2.5b7 classic) added function for ioLowResMSecs to avoid early bit overflow. Rework clock checking in ioHandleEvents to handle clock rollovers properly.\\\n\\\nMac VM 3.2.5 mach-o build for Carbon, and build for Classic.\\\nMarch 4th, 2002\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f2 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\n\\\nBeware this version of the VM is significantly different inside! \\\n\\\n\\pard\\tx1440\\tx2880\\tx4320\\tx5760\\tx7200\\ql\\qnatural\n\n\\f1 \\cf0 a) Broke sqMacWindow.c into 10 different files by function type.\\\n\\\nb) Moved most of the memory allocation logic out of sqMacMain.c into sqMacMemory.c. and ensure memory is freed when Squeak is terminated. \\\nThe major change in this code is support for OS 9.x virtual memory mapping. This only applies to Mac OS 9.2.0 or higher, excluding os-x. It appears  Mac OS 9.1 has a bug that prevents this feature from working.\\\n\\\nFor images that require less than 128MB of memory, mapping is used to allow the image to grow/shrink to the 128MB boundary, therefore you can change the application memory size to about 2MB. \\\n\\\nFor images that require more than 128MB then change the application memory size to > 128MB and mapping will not occur. \\\n\\\nIf mapping is not available because virtual memory is turned off or the api is not supported by the macintosh OS then mapping is not used. Note that mapping is not support under the classic os-9.x environment under OS-X, however in this case you should be using the OS-X version of Squeak, not the classic version.\\\n\\\nc) Use of Carbon event logic for OS-X only. This is a major structural change. \\\n\\\nIt also encouraged the use of a pthread for interp.c. \\\n\\\nAll user interaction with the VM follows a new code path, so problems with keyboard or mouse input should be reported asap. Also any issues with application switching, windows being brought to the foreground or sent to the background and usage of the full screen logic should be reported asap.\\\n\\\nAs part of this change I have build in support for scroll-wheeled multi-button mice under os-x. Thanks to Doug Way for testing this for me. Maybe someone can post to the list what their favorite 3 button scroll wheeled mouse/trackball is.\\\n\\\nd) Use of a carbon call to get the dominate Device if you have multiple screens. People with multiple screens should confirm window resizing, full screen on/off works as expected.\\\n\\\ne) Corrected comment in sqMacFileLogic.c\\\n\\\nf) Changes to sqMacNSPlugin.c. This makes it compile, but it's not usable yet.\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 \\\n\\\nFeb 20th 2002 3.2.4\\\n\\\nFor this version of the VM I have migrated towards using OS-9 packages. This allows us to provide one \\\nfolder/package that supports os-x and previous operating system versions.\\\n\\\nGiven Squeak 3.2.4Beta1.app\\\nThe classic VM is found in the *.app:Contents:MacOSClassic, with an alias in *.app:\\\nThe mach-o OS-X VM is found in *.app.Contents:MacOS\\\n\\\nIf you are running OS-9 then clicking on the *.app or doing drag and drop will just run Squeak, same applies for OS-X.\\\nIf you are running OS-7.5.5 or OS-8.x then the *.app package will appear as a folder, just open and click on the alias within. \\\nNote that if you want to use classic plugins I suspect you need to put them in the MacOSClassic Folder beside the VM. \\\nBundles for os-x go in the same location as the *.app application package.\\\n\\\nChanges\\\na) Drag and drop at open time with image file that has no meta type, will now open the image, versus prompting you.\\\nb) Use an os-x window attribute at open time to signal that the window should not be moved by the dock when you go to full screen.\\\nc) Fix window update logic to use window that needs updating versus stwindowg to fix issues with print dialog windows in classic. \\\nd) bitblt gets recompile to pickup fixes posted in 3.2 update stream.\\\n\\\nFeb 5th 2002 3.2.3\\\nChanges\\\n\\\na) use old extended time manger to update psudeo-TickCount, versus sigalrm. siglarm make sound recording not work.\\\nb) fiddle with sound recording and make it work.\\\n\\\nJan 2002 3.2.2\\\nChanges:\\\n\\\na) AsyncFilePlugin.c Use global to remember security function entry point for performance reasons\\\nb) FilePlugin.c\tUse global to remember security function entry point for performance reasons\\\nc) interp.c Use squeakFileOffsetType versus off_t and add a bunch of checks to handle lack of long long and conversion errors between 64/32 bit integers and LargeInteger objects\\\nd) readme, it's http://www.mucow.com/Gnuifier.1.cs \\\ne) SocketPlugin.c\tUse global to remember security function entry point for performance reasons\\\nf) sq.h added default sqFilenameFromStringOpen and sqTruncate\\\ng) sqFilePluginBasicPrims.c revert to anti specs, but ensure #def to fseeko and ftello for 64 bit aware file systems.\\\nh) sqMacDirectory.c A bit more error checking on bad file names\\\ni) sqMacFileLogic.c Folders size is now zero in classic, and a bit more checking on bad file names\\\nj) sqMacSound.c Fixed a problem with sound recording in classic due to a change made in Sept. But sound recording still does not work under os-x\\\nk) sqMacWindow.c  two very important changes:\\\n\\\n\t1) You can now do FFI calls with the FFI bundle plugin to Mach-o frameworks. \\\n\tHowever you need to rework your api calls. For example:\\\n\tapiGetMousePoint: aMacPoint was\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'InterfaceLib'>\\\n\tIt now is:\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'Carbon.framework'>\\\n \t\\\n\tIf you review /System/Library/Frameworks I'm sure you can come up with interesting ways to \\\n\tmake mac only squeak images.\\\n\t\\\n\tI now use map( NULL, gMaxHeapSize, PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED,-1,0);\\\n\tanonymous memory mapping to 512MB as the squeak memory block. The VM can then grow or shrink\\\n\twithin the 512MB block, I just move a pointer. \\\n\t\\\n\tNote in 3.2.1 a slight error on my part restricted Squeak to 50MB. I am of course\\\n\tinterested to hear about issues with my choice of 512MB. Note a Squeak VM is limited to 2GB under perfect \\\n\tconditions, however if any part of the image crosses the 2GB boundary the VM will fail, right now 512MB\\\n\tseemed a safe choice.\\\n\t\\\n \tPhysMem:  60.2M wired, 78.6M active,  412M inactive,  551M used,  217M free\\\n\tVM: 3.03G + 55.3M   7847(0) pageins, 1(0) pageouts   \\\n\tPID COMMAND      %CPU   TIME   #TH #PRTS #DREGS RPRVT  RSHRD  RSIZE  VSIZE\\\n\t422 Squeak VM    0.8%  0:35.59   2    71   100  23.3M  8.53M  26.5M   571M\\\n\\\n\tbut I only have one 80,000,000 byte swap file in /var/vm\\\n\\\nNote if you turn crash reporter on, then if the VM crashes a nice report should be generated in your log directory.  See the Apple documentation for a description of this feature, currently it is set in OS-X 10.1.x via the preferences window for the Console Application. If you have a crash with this VM, please recreate and post the crash log (found in Users/foobar/Library/Logs/ to the Squeak mailing list so we can continue to make the VM fault tolerant.\\\n\\\n3.2.1 Notes\\\n\\\nYou might need these change sets to build a new VM or to use all the features of this VM with your image, hopefully these will get into the pending 3.2.x image.\\\n\\\nFixes and feature extensions.\\\nAsyncFileFixFu...hName-JMM.1.cs \tfix for async test method.\\\nDragAndDropAtStart-JMM.5.cs\t\tfix to enable drag and drop at startup\\\n\\\nNeeded to compile a VM with VMMaker\\\nLargeFiles-JMM.3.cs\t\t\t\tEnable large file support, files > 2GB\\\n\\\nNeeded to turn this feature on\\\nMacLongFileName-JMM.5.cs\t\t\tEnable long file names on the mac\\\n\\\nThe SUnit\\\nMacLongFileNamesSUnits-JMM.3.cs\tTest long file names and long directory names and large file support\\\n\\\nKinda optional features some people might need.\\\nInternetConfiguration-JMM.5.cs\t\tAllow internet configuration information access, internal plugin\\\nUUID-JMM.3.cs\t\t\t\t\tAllow UUID generation, internal plugin\\\n\\\na) The ability to get back a UUID. This uses the hosting UUID generator if the\\\n hosting OS supports it and we have a primitive we can call. If not then we generate\\\n a type 4 version of a UUID (the random bits one).\\\n(This requires a special change set)\\\n\\\nb) Ability to start squeak on the mac by dragging multiple documents onto the\\\nimage, or drag and drop of stuff onto the running VM icon.\\\n(This requires a special change set)\\\n\\\nc) Usage of the Internet Configuration tool kit to supply information about\\\nwhat the mac proxy is etc. etc.\\\n(This requires a special change set)\\\n\\\nd) Migrate file system to use 64 bits. This allows you to read/write and seek\\\nwith files > 2 GB. This includes a change to the VM to convert from/to long\\\nlong integers. It also allows the file system to actually deal with 2GB files,\\\nthe current file interface actually fails once the file exceeds 1GB.\\\n\\\ne) For the carbon based Squeak VM we now support long file names 255\\\ncharacters. Close both eyes and touch everywhere the mac VM deals with file\\\nname paths and hope for the best (Actually we write an Sunit to ensure we've\\\nnot broken everything). This also includes the ability to put an image in a\\\nlong file name directory, but right now the image name must stay under 32 characters.\\\n\\\nFilePlugin.c changes to support large integers.\\\nFilePlugin.h changes\\\nsq.h changes to support large files.\\\nsqConfig.h changes to resolve some conflicts.\\\nsqFilePluginBasicPrims.c  changes to support large files.\\\nsqMacAsyncFilePrims.c changes to use fspec versus 255 file path.\\\nsqMacDirectory.c changes to use hosting OS (OS-X) bsd create and delete directory\\\n and truncate. dir_look changes as part of the general rewrite.\\\nsqMacDragAndDrop.c use new call to get path name from fsspec. Use fsspec more, and added \\\n  interface code to setup drag and drop of items at application startup time. max document name\\\n  goes to 1000 characters.\\\nsqMacFileLogic.c Mostly rewrote!\\\nsqMacSecurity.c use new file calls.\\\nsqMacWindow.c \\\n\tincrease size of vmpath, docpath, imagepath to 1000 chars, shortname to 255 characters.\\\n\tadd logic for left/right modifier keys \\\n\treworked LoadLibViaPath logic \\\n\tsqImageFileOpen uses fsspec versus 255 path name.\\\n\tsqImageFileStartLocation uses ffspec.\\\n\tbundle support for bundles\\\n\t\\\ne2) interp.c supports get/put of large integers to long long integers.\\\ne3) fixed fTruncate\\\n\\\nHint getting this to work was a pain. Think of 255 character folder names and nested aliases,\\\nfolder 1 refers to folder 2 which then refers to folder 1 again, just go down the path say 8 times,\\\nthen ask to create a file or directory!\\\n\\\nf) Support to change the Mac screen resolution under Squeak control.\\\n\\\ng) Fix to unload/load the scrap at startup time to ensure the clipboard is\\\ncorrect when starting up the VM.\\\n\\\nh) Uncouple the shift key and left/right shift keys on old extended keyboard.\\\nAlso add a call to get which keys are currently pressed on a USB keyboard or\\\nthe USB codes for an apple non-usb keyboard. (Note this isn't working quite yet under OS-X)\\\n\\\ni) Changes to enable us to compile the VM under Apple's OS-X Project Builder\\\nenvironments.\\\n\\\nj) Some rewriting to ensure serial and midi support can be written as external\\\nplugins.\\\n\\\nk) Fiddling to get sound input to work under OS-X\\\n\\\nl) Platform.exports changed macintosh to macintoshSqueak to avoid conflict.\\\n\\\nm) Memory is allocated at 50MB at start, then will grow or shrink, verus previous carbon apps\\\n that did 1GB. \\\n \\\nn) sqPlatformSpecific.h changes to support long file names and os-x posix file names\\\n\\\no) sqVirtualmachine.c & sqVirtualmachine.h\\\n#if VM_PROXY_MINOR > 4\\\n\tVM->positive64BitIntegerFor = positive64BitIntegerFor;\\\n\tVM->positive64BitValueOf = positive64BitValueOf;\\\n\tVM->signed64BitIntegerFor = signed64BitIntegerFor;\\\n\tVM->signed64BitValueOf = signed64BitValueOf;\\\n#endif\\\n\\\nBeware this causes an interesting problem, if you compile plugins with VM_PROXY_MINOR now set to 5, then they will not work with older VMs. The solution is to define the VM_PROXY_MINOR in the plugin to the value that indicates what features it is using.\\\n\\\np) Changed to use ITimer logic as a 16ms lowres timer to improve performance\\\n\\\nq) Changed to use single thread, no thread manager.\\\n\\\nr) Changed to use lowres timer in checking for polling time to improve performance\\\n\\\ns) It should have faster startup times.\\\n\\\nt) It will hide the empty window at startup, then show the squeak window when required.\\\n\\\nu) It has a different menu structure.\\\n\\\nv) It does less I/O when navigating directories.\\\n\\\nThe macintosh 3.1Alpha1MT VM, Sept 24th 2001 \\\nThis VM was built with the base  3.1 image at change set #4347\\\nV3.1.1 at change set #4347\\\n\\\n\\\nWe go to V3.1.1 to indicate that the 3.1 VM is being used. In the past the 3.1 Image was used but some changes in the openGL logic makes  3.1 Vm and 3.0 image not quite work correctly with 3d graphics. Although a 3.1 VM will run many images way back to the 2x series no careful study has been done on the ability to do this. So at this point we are indicating this VM is a 3.1 VM and best used with a 3.1 image.\\\n\\\nUse of VMMaker to build VM. As of this version everything can be built as an external except for the window logic which hasn't been decoupled from the VM support for the macintosh. \\\n\\\n1) AsynchFilePlugin the security check for ability to create file is now a plugin call.\\\n2) B2DPlugin logic changes to fillLinearGradientfromtoat\\\n3) b3dRemapFaces, b3dRemapEdges, b3dRemapEdgeList, b3dRemapAET, b3dRemapEdgeVertices, b3dRemapFaceVertices, b3dRemapFaceFree, b3dRemapEdgeFree, b3dRemapAttributes. Some casting and changing of += to = + to make some compilers happy.\\\n4) BitBltPlugin added tableLookupat call.\\\n5) DropPlugin added setFileAccessCallback to allow the Security Module plugin the ability to give us the entry point to turn security off so we can open files as read only when security is turned on.  This was broken in the past. \\\n 6) FilePlugin added fileOpennamesizewrite,getThisSession to allow for callbacks. Changed the file security logic to use the plugin interface. \\\n7) interp.c, fixes for 4347ByteArrayRangeCheck-di, ability to printAllStacks, security calls for image rename, write to use plugin interface.\\\n8) Added GetAttributeString, and recordDragDropEvent and entry points for callbacks.\\\n9) SecurityPlugin changed when initialization is called to initialize the safe and unsafe directorys, also added entry points for all the testing calls so it can be a true plugin.\\\n10) Serialplugin. The serial plugin was redesigned to seperate out MIDI logic. People with MIDI devices and old serial macintosh should check to see if they still work since we lack equipment now to test this obsolete technology set.\\\n11) SocketPlugin. Make security calls true plugin calls.\\\n12 SoundGenerationPlugin. Removed \\\nEXPORT(int) SoundGenerationPlugin_primitiveFMSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveOldSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitivePluckedSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveWaveTableSoundMix(void);\\\nThey were a hack at the plugin level and discussion on the list seemed to show they were no longer used. \\\n13) Checking for if defined (__APPLE__) && defined(__MACH__) for the Mac OS-X native development environment\\\n14) Changed sqMacAsyncFilePrims, usage of interpreterProxy->, plugin calls for getThisSession. \\\n15) Changed sqMacDirectory.c. Removed some utility code and make it a seperate file so that it can be shared between sqMacWindow and other plugins that require them. \\\n16) Changed sqMacDragDrop.c. Added plugin callback for getSTWindow, the sqSetFileAccessCallback logic, fileOpennamesizewrite, and secHasFileAccess. Added logic to do the recordDragDropEvent callback to sqMacWindow.c \\\n17) sqMacNetwork.c. Some cleanup for the OS-X version of the OpenTransport headers, some constants have name changes\\\n18) sqMacNSPlugin.c Use of ioLoadFunctionFrom(NULL, \"DropPlugin\"); versus explicit call.\\\n19) sqMacOpenGL.c. Some cleanup for the OS-X version of the OpenGL headers\\\n20) sqMacOpenGLInfo.c. Some cleanup for the OS-X version of the OpenGL headers\\\n21) sqMacSecurity.c ioInitSecurity calls back to dragAndDrop plugin to set entry point to turn security off.  Added code to create directories if required and ensured callbacks are plugitized.\\\n22) sqMacSound.c Some cleanup for the OS-X version of the Sound headers. Use of interpreterProxy-> in the proper places.\\\n23) sqMacWindow.c Some cleanup for the OS-X version of the compiler.  Fixed saveAsEmbeddedImage, this got broken when we moved from a FAT to a ppc only application.  Altered interface to recordDragDropEvent so that it was plugable. Some file path name logic goes to a seperate C source file. The drag and drop plugin is loaded and intialized after the image is loaded but before the interpreter is started, before it was done a bit earlier in the startup process. This also has the effect of initializing the security module.\\\n24)sqOpenGLRenderer.c. Some cleanup for the OS-X version of the OpenGL headers\\\n25)SurfacePlugin.c gets a hack so it knows when it is internal versus external.\\\n\\\n\\\n\\\nv3.0.18 at change set #4081\\\n(Note browser plugin goes to 3.0.23\\\n\\\n1) sqMacOpenGL.c Quite a few changes were made to the code to support it as an internal plugin for the browser. This is because the drawable frame for a browser plugin is a subset of the browser's grafport, so lots more care must be taken to draw in the correct location using OpenGL. We also fixed issues with re-configurating the Open/GL draw area when the window gets resized or goes to full screen, and attempted to ensure multiple screens will work.\\\n\\\n2) sqMacWindow.c, minor fix to cast a constant char * to char * for CW 6.1\\\n\\\n\\\nBrowser plugin 3.0.23 fixes\\\n\\\n1) Integerated the H/W Acceleration as an builtin plugin\\\n2) Added logic for pre and post event interaction to browser plugin event handler for H/W Acceleration logic. The external H/W Acceleration plugin mostly works with the browser plugin but doesn't work with full screen mode, or if the plugin is embedded in a window or a scrollable frame, so don't use it. Use the browser plugin 3.0.23 or higher which has the H/W Acceleration builtin.\\\n\\\nv3.0.17 at change set #4081\\\n(Note browser plugin goes to 3.0.21)\\\n\\\n1) Added HW acceleration as internal plugin.\\\n2) 4079BBAlphaTextFix-ar Fixes the problem with alpha text, changes BitBltPlugin.c \\\n3) Added primitive on the mac to truncate a file.\\\n4) Added logic to flush volume on a flush file to ensure file and control blocks are flushed.\\\n5) For the Carbon VM we increase nextevent wait time if we get sufficent idle time. This should reduce CPU usage under OS-X\\\n6) GetAttribute: 1002 now returns the gestaltSystemVersion as a hex string, and getAttribute: 1003 now returns either '68K' or 'PowerPC'.\\\n7) Starting with 3.0.17 the VM is build only as a powerpc application. The latest VM as a 68K application will be made available from time to time permits based on people's needs. \\\n8) Changes to sqOpenGLRenderer.c to improve performance, OpenGL 1.1 support.\\\n\\\nPlugin 3.0.21 fixes\\\n\\\n1) added check for mailto: tag on posts to fix problem with Netscape crashing, and IE hanging.\\\n2) Plus above fixes.\\\n\\\nWhat has been fixed/changed.\\\nv3.0.16 at change set #4041\\\n(Note browser plugin goes to 3.0.20)\\\n\\\n1) Lots of fixes for BitBlt and HW acceleration.\\\n2) Hardware Acceleration plugin goes to 1.0.1. Please note there is a seperate plugin with the same name for Carbon. Doing a get info will identify if the plugin is only usable with Carbon Squeak.\\\n\\\nv3.0.15 at change set #4026 (May 17th test version)\\\n(Note browser plugin goes to 3.0.19)\\\n\\\n1) Added support for OpenGL HW acceleration plugin\\\n\\\nPlugin 3.0.19 fixes\\\n\\\na) Obey embedded tag plug\\\nb) Fix problem with plugin 3.0.17 not working with netscape 4.x\\\nc) Carbonize plugin for IE 5.1 \\\nd) Remove debugging printf than occurred on transition to full screen mode\\\n\\\nWhat has been fixed/changed.\\\nv3.0.14 at change set #3987\\\n\\\n(Note plugin goes to 3.0.17)\\\n\\\n1) sqMacDirectory.c. The pathlookup would handle the case of foo:bar::do incorrectly by ignoring the :: path redirection. This has been fixed. However a path lookup will not work if it contains :: and an aliased directory in the middle of the path.\\\n\\\n2) sqMacSecurity.c. The pathname for the untrustedUserDirectory was built incorrectly, and the bug mentioned above in sqMacDirectory.c usually kept this from being noticed.\\\n\\\n3) sqMacWindow.c  we added some logic to do the delay for primitiveRelinquishProcessor, but found it had an large effect on a freecell benchmark. I suspect on a Morpic step wait there is nothing to do so primitiveRelinquishProcessor gets called which then affects response time. So for now we revert to the 3.0.11 behavior, good performance and 100% CPU usage!\\\n\\\n4) GetAttribute 1004 returns returns interpreterVersion; which is for example\\\n\"Squeak3.1alpha of 6 February 2001 [latest update: #3987]\"\\\n\\\n5) When in full screen mode we now attempt to disable resizing, zooming, or moving the window. The window borders are hidden, but in the past it was feasible to grab an edge and alter it, thus confusing the VM.\\\n\\\n6) Worked on Carbonizing the browser plugin\\\n\\\n7) 3977 & 3978 FloatArray fixes. Makes float arrays go through a new (and working) version of #primitiveHash\\\n\\\n8) Fixed problem with accidental mouse clicks being triggered from pulldown menus on application switching.\\\n\\\n9)\\\n\"Change Set:\t\t3984 BitBltExtensions-ar\\\nDate:\t\t\t4 May 2001\\\nAuthor:\t\t\tAndreas Raab\\\n\\\nThe change set includes various extensions for BitBlt with the goal of migrating the useful features from FXBlt into the general BitBlt mechanisms. These include:\\\n\\\n* Handling of LSB and MSB forms:\\\nBitBlt now handles both, MSB and LSB forms (and their conversions). Only instances of Bitmap are assumed to contain big-endian pixels. All others are assumed to be little endian (reason is that we can only identify Bitmap here). Note that 'LSB' and 'MSB' refers to PIXELS, that is a 1bpp LSB form has its left most pixel in the lowest bit whereas a 1bpp MSB form has its left-most pixel in the highest bit.\\\n\\\nFor pixel depths < 8 this can be different from what your OS supplies (as an example, Windows bitmaps < 8 are big-endian pixels in little-endian words; we might call them 'middle-endian'). We simply don't deal with those - forms are either big or little endian but nothing inbetween.\\\n\\\nBitBlt has got an extra combination rule for swapping pixels in the destination form. This can be used to make byte swapping much more efficient (as soon as we've got more VMs with support for it).\\\n\\\n* Handling of 'native bitmaps' (aka surfaces):\\\nBitBlt is now able to deal with OS surfaces that are registered with the surface plugin.\\\n\\\n* Handling of full color maps:\\\nBitBlt has been extended to deal with instances of ColorMap in addition to the prior mechanism of using only indexed lookups and provide an implicit 16-32 bit color conversion. ColorMaps can specify both, a lookup table and an additional set of masks and shifts to apply during the color mapping operation. \\\n\\\nFour independent shifts and masks can be given which can be used for a lot more than just color conversion (as an example, one could do byte swapping with this; but see also BitBlt class>>exampleColorMap). \\\n\\\n* Better handling of default arguments:\\\nFor most of the required arguments for BitBlt very reasonable default assumptions can be made. This includes the destOrigin (0@0), clipRect (0@0 extent: destForm extent), sourceOrigin (0@0). BitBlt now substitutes these if they are absent (e.g., nil) in the instance provided.\\\n\\\n\"\\\n\\\n\\\nv3.0.13 at change set #3848\\\n\\\n1) sqMacSecurity was changed to set the unsecure directory to\\\n\tsystem folder:Preferences:Squeak:Internet:My Squeak\\\n\\\nv3.0.12 at change set #3848\\\n1) Fixed problem with creating My Squeak Folder in Documents Folder with System 8.6\\\n\\\nWhat has been fixed/changed.\\\nv3.0.11 at change set #3848\\\n\\\n1) sqMacDirectory had a bug when you resolved a path name. The fast resolve always failed, which invoked the slow resolver. Now the fast resolver works.\\\n\\\n2) sqMacSecurity was changed to set the unsecure directory to Documents:My Squeak. \\\n\\\n3) sqMacWindow was changed to fix some issues with Squeak capturing events from other applications and to reduce the number of duplicate mouse events that are generated. Also we capture modifier information  directly from the mouse and keyboard on null events to fix some problems with Carbon. We  hopefully fixed problems with mouse clicks from foreground applications being seen by Squeak and issues with the OS-X Dock clicks.\\\n\\\n4) sqMacNSPlugin was changed to use the above mouse/keyboard capture code which is much cleaner than the original fix for the bogus modifier information given to us by netscape on a null event. \\\n\\\n5) When you turn full screen off we now correctly reposition the window to the original location versus a few pixels to the left. \\\n\\\nWhat has been fixed/changed.\\\nv3.0.10 at change set #3848\\\n\\\n1) changed VM exception unwind logic\\\n\t3796-Exception-unwind-V3,tim@sumeru.stanford.edu, Paul McDonough, Stephen Pair and others\\\n\\\n2) Fixes for the JPEGReader plugin and for Jitter 3\\\n\\\n3) Added minimal Mac VM logic to assist in building a small VM.\\\n\\\n4) Changed how the browser plugin starts up. Now it starts the interpreter running only after getting the browser setwindow command. This seems to fix a race condition that resulted in a crash at startup time with Netscape 4.x\\\n\\\n5) Fixed broken full screen redraw on cmd-tab\\\n\\\n6) Fixed what looked like mouse-down, mouse-down, mouse-up sequence. Now reports mouse-down, mouse up.\\\n\\\n7) Added StarSqueak plugin as internal plugin\\\n\\\n8) Note the current Squeak Plugin should be gotten from the www.squeakland.org site.\\\n\\\nv3.0.9 at change set #3776, Boston Snow storm build.\\\n\\\n1) A number of changes were made to the interpreter:\\\n\ta) added primitive to change a class.\\\n\tb) added primitives to get or put 32bit integers\\\n\tc) Fix problem with GC and class reshaping\\\n\td) Better logic for method cache flushing\\\n\\\n2) Added JPEGReader plugin\\\n\\\n\\\nV3.0.8 at change set #3740\\\n\\\n1) The caps lock no longer maps to the shift attribute. So if the caps lock is down mouse clicks will behave normally. \\\n\\\n2) Numerous fixes for the BitBltPlugin plugin\\\n\\\n3) Memory allocation grow/shrink logic for Carbon was added.\\\n\\\n4) Spurious mouse clicks for the browser plugin has been fixed. (This took awhile to fix, I'm sure it's a bug with the Swedish version of Netscape)\\\n\\\n5) The browser plugin will attempt first to allocate memory from the browser heap, then the system heap. Most people when faced with a memory issue usually increase memory for the browser first. However memory for the plugin is controlled by an attribute in the EMBED HTML statement. \\\n\\\nV3.0.7\\\n\\\n1) A bug exists in pre OS 8.x that causes a crash in activate window if the standard get file \\\ndialog comes up before the Squeak Window. I remove the InvalWindow call found in that routine since it is actually redundant.\\\n\\\n2) The standard get file dialog on system 7.x would not terminate if you did a cancel.\\\n\\\n3) The InterfaceLib had to be weak linked to prevent CFM startup issues. \\\n\\\nV3.0.6\\\n\\\n1) Alias resolving is less aggressive.\\\n\\\n2) We no longer cache image reads or writes. This was done because OS 9.1 allows you to have very large disk caches, and it's pointless to cache the image read or write.\\\n\\\n3) The file flush primitive now actually flushes the file via an OS call. This was a bug in the CodeWarrior 5.3 source code.\\\n\\\n4) The 68K version was being built with the 68881 math library. This fails on 68040LC chips. We now use the non-68881 math library. Thanks to Bruce ONeel for find this.\\\n\\\n5) A bug was found in the path resolving logic that was added for 3.x. This bug apparently only affects 68K machines,  never was identified as a PowerPC issue. \\\n\\\n6) The Netscape plugin needs a properly allocated clip region, this code seemed to work ok on new systems, but fails on system 7.6.1\\\n\\\n7) The security interface will create a Documents folder on the root volume if the default Document folder has been deleted. This is needed for security purposes. \\\n\\\n8) Jitter needs 1MB of free memory to run.\\\n\\\n9) 68K machines require another 32K of stack\\\n\\\n10) Threads  now work on 68K machines, but turned off because of possible performance issues. (I think more study is needed).\\\n\\\n11) The 68K version was compiled with better optimization, expect a 15% improvement.\\\n\\\n12) fix for BitBltPlugin ascii = byteAt((sourcePtr + charIndex) - 1);\\\n\\\n13) The interpreter object validation checking code was alter to work correctly.\\\n\\\nV3.0.5\\\n\\\n1) sqConfig.h changed due to BE OS header changes\\\n\\\n2) sqMacDirectory.c. Added support for Navigation services or Standard File Get to find the image at startup time when the Squeak.image is not found by the VM. This replaces the DOS like console message that comes up saying that Squeak can't find a image.\\\n\\\n3) A fix to drag and drop for the browser plugin.\\\n\\\n4) We now use Apple's cooperative multithreading package to run the UI in one thread, the VM in the other. This solves some issues with the browser and makes the UI versus VM logic and execution responsibilities easier to understand. \\\n\\\n5) Changed the sqMacNSPlugin.c code to support a 3.0VM using multithreading support. This should give Squeak in a browser better performance. Also changed the full screen support to correctly work with multiple monitors.\\\n\\\n6) BitBltPlugin.c gets one more op code\\\n\\\n7) Added the security interface\\\n\\\n8) Added the file flush primitive\\\n\\\n9) Rewrote the macintosh readme file\\\n\\\n10) Revisited the zoomWindow code and found a bug with multiple monitor support, then I fixed the code to make Full Screen mode work on screen that Squeak window is mostly on, versus the menubar screen. Also if you switch from full screen back it resizes the window back to the orginal size and location before you invoked the full screen. \\\n\\\nV3.0.2\\\nPlugins\\\n\\\nRecompiled the internal BitBltPlugin plugin to encorporate:\\\nChange Set:\t\t258AlphaBlendOpt-dsm\\\nAuthor:\t\t\tDuane Maxwell, Paul Phillips/exobox\\\na) Short circuits full opaque and full transparent pixels when alpha blending.\\\n\\\nRecompiled the internal LargeIntegerPlugin\\\n3298LargeIntegersV1-2-sr -- Stephan Rudlof -- 29 November 2000\\\n3299LargeIntV1-2For29-sr -- Stephan Rudlof -- 29 November 2000\\\n\\\nVM Software\\\n\\\n(b) PowerManagement for macintosh is now supported. You can disable the power manager to give you better performance on some powerbooks at the expense of battery life. See the Preferences Panel for details, category 'Performance'\\\n- changed sq.h\\\n- changed sqMacWindow.c to add support for power mgr disabling\\\n\\\n(c) Drag and Drop support for the macintosh, dragging files from the Finder to the Squeak window is now supported.\\\n- sqMacDragDrop.c added\\\n- sqMacWindow.c changed\\\n\\\n(d) Added primitive for get macintosh creator and file type.\\\n- sqMacDirectory.c changed\\\n\\\n(e) Carbon support. Thanks to Karl Goiser karl@wattle.net for work he did on sound and other Carbonization hotspots.\\\n- sqMacAsyncFilePrims.c changed\\\n- sqMacFFIPPC.c changed (not supported for Carbon)\\\n- sqMacNetwork.c changed per Apple tech note 1173 Carbon asset tracking\\\n-sqMacSerialAndMIDIPort.c chnaged (Not supported for Carbon)\\\n- sqMacSound.c changed per Apple tech note 1198 Carbon double sound buffer playing\\\n- sqMacWindow.c changed (various changes for Carbon)\\\n\\\n(f)  Poll at least 60 times a second for the mouse if required. Previous 2.9.x VM did it 30 times but this is too slow and 2.8.x VM do it 60 times a second.\\\n\\\n(g) Reworked path support Thanks to Karl Goiser karl@wattle.net for starting this.\\\n- sqmacDirectory.c changed reworked lookupPath\\\n- sqMacWindow.c changed, added GetApplicationDirectory to get application directory\\\n\\\n(h) I rewrote the sqMacDirectory.c logic to enable proper understanding of Apple's Alias logic. This means for example you can alias the \"SqueakV3.sources\" file and then only have one copy and have all your images point to it. \\\n\\\n(i) Added Zoom Window support.\\\n\\\n(j) Change the Squeak change file icon to better match Apple's visual guidelines, Thanks to Doug Way for the suggestion and the new icons.\\\n\\\n(k) The sound plugins have changed...\\\n\\\n(j) Dropped FFI out of the base Squeak because of security concerns\\\n\\\n(k) Compiled for 750(G3) processor versus 603\\\n\\\n(l) Added screenDepth primitive\\\n\\\nThe 3.0.x VM contains most of the optional plugins, you might want to check this by inspecting \"Smalltalk listBuiltinModules\" to see where your plugins are coming from. In some case people have been accidentally overriding the new builtin plugins with older plugins. \\\n\\\nThe file \"Squeak 3.0Alpha10MT.sig\" contains the PGP signature for the Squeak 3.0Alpha10MT VM\\\n\\\nJohn M McIntosh  johnmci@smalltalkconsulting.com\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n}"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Documentation/3.6.1 Release Notes.rtf",
    "content": "{\\rtf1\\mac\\ansicpg10000\\cocoartf102\n{\\fonttbl\\f0\\fnil\\fcharset77 Geneva;\\f1\\fswiss\\fcharset77 Helvetica;\\f2\\fnil\\fcharset77 LucidaGrande;\n}\n{\\colortbl;\\red255\\green255\\blue255;\\red26\\green26\\blue255;}\n\\margl1440\\margr1440\\vieww17300\\viewh12720\\viewkind0\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0\\fs24 \\cf0 Mac VM 3.6.1 mach-o build for Carbon, and build for Classic. Support for Croquet, and support for Safari\\\nNov 17th, 2003 (3.6.1b5)\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets. (Yawn, someday)\\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\n\\\nNotes About previous VM.\\\n3.2.6 VM classic have an issue when the tickcount clock goes over 0x7FFFFFFF, about 24 days. \\\nThis exhibits it self as Squeak won't accept user input, or allow you to switch under os 9 or earlier.\\\nStarting a Squeak image hangs durning the screen painting.\\\nRestarting the mac solved these problems. Force quit does not.\\\nThis is fixed in 3.2.7b3\\\nSome issues with alias files and folder were fixed in 3.2.7b6 and 3.2.8b3\\\nYou need 3.5.3b1 for Safari plugin support\\\n3.6.0b2 seems a fine VM, from what people tell me, but now we've 3.6.1...\\\n\\\n3.6.1b5\\\nSqMacWindow.c\tEnable 8bit support for 8->8 8->16 8->32 \\\n\\\n3.6.1b4\\\nSqMacWindow.c\tFix issues with title bar height calculation, was using the wrong window region to do this. Also failed \\\n\t\t\t\tfor full screen usage. Tinkered a bit with ioDisplay moving bytes, now do <=32 bytes directly. \\\n3.6.1b3\\\nSqMacWindow.c\tAlter logic to allow for 16->32 and 32->16 mapping using direct copy logic. Workaround for \\\n\t\t\t\tos-x 10.3.0 copybits bug. Released for limited testing. Awaiting real fix from Apple.\\\n\\\n3.6.1b2\\\nSqMacWindow.c\tAlter to use unix direct port bit copy versus copybits to get around a crash caused by a bug\\\n\t\t\t\tin os-x 10.3.0 copybits. Released for limited testing\\\n\\\n3.6.0b2\\\nBuild from about to be offical 3.6.0 VM, Balloon & VM Maker source.\\\nAdded in \\\nArraysToGlobalStruct-JMM.1.cs\\\n\t?3.7 Status unknown, but makes better interp.c interpreter loop code (silly optimizer).\\\nFasterCopyLoop-JMM.4.cs\\\nFasterCopyLoopPart2-JMM.2.cs\\\n\t?3.7 Status unknown, but makes drawing 20%+ faster due to better PowerPC code optimizations\\\nFasterLookupMethod-JMM.1.cs\\\n\t?3.7 Status unknown, but makes method lookup a bit faster. \\\nMakePrimPointXInternal-JMM.1.cs\\\n\t?3.7 Status unknown, but makes point x/y access faster.\\\n\\\nSlightlyFasterActivate-JMM.3.cs\\\n\tRolled into 3.7\\\n\\\n3.5.3b1  (browser plugin)\\\nFixed issues with IE drawing and crashs related to screen updating in non-thread safe IE.\\\n\\\n3.5.2b6\\\nFixed issues with plugin discovery for netscape plugin \\\n3.5.2b5\\\nFixed primitive dispatch to use gnuified jump table. \\\n\\\n3.5.2b4 \\\nFix issue with race on open doc events and squeak VM Thread for drag and drop support when starting squeak\\\nFor os-x expose primitivePluginBrowserReady, not the rest of the URL browser primitives, they don't work in Safari\\\nFor system attribute 1003 return powerpc versus PowerPC to match unix VM\\\nStart timers later in the VM startup logic, after reading the image, versus before.\\\nsqMacNSPlugin.c \t- Look for Squeak folder in User, local, Network, System domains versus just User.\\\nsqMacTime.c\t\t- Use old delay logic (1ms accurate), versus aioPoll (10ms accurate).\\\nsqMacUIEvents.c\t- Only create PowerManagerDefeatTimer tick routine if power manager tapping is required which is only os-9 anyways.\\\nsqMacUIMenuBar.c - Draw menu bar later in startup, after we change it, save 200+ms\\\nBitBltPlugin.c\t\t- alphaSourceBlendBits16  Use table lookup which is 90% faster\\\n\t\t\t\t- copyLoopNoSource, roll constants into register versus recalculating.\\\n\\\n3.5.2b2 \\\nFix applescript document handling logic to prevent overrunning the drag/drop logic via the command line open cmd by using a spin loop\\\nto ensure Squeak has sufficent time to read the file name. \\\n\\\n3.5.2b1 \\\nChanged the bitBlt copyloop logic to use locals in safe places, versus globals. This improves drawing by 5%.\\\nMajor change is usage of GCC 3.3, versus GCC 2.95.x This increases send/second by about 8%.\\\n\\\n\\\n3.5.1b5 Added some more user changeable attributes, and changed some window behaviour when floating\\\nOS-x Version only \\\nSqueakWindowHasTitle\t\t- (Yes/No) yes if window should get title.\\\nSqueakFloatingWindowGetsFocus (Yes/No) yes if window should allow click and type if floating.\\\nSqueakMaxHeapSize\t\t- (Number) set to 512K, max size for os-x memory heap. Note changing this to 1GB may or may not cause a \\\n\t\t\t\t\t\tcore dump depending on where os-x allocates the memory segment above or below the 2GB boundary. \\\n\\\nsqMacUIEvents.c\t\t\t- set keyboard focus to floating window if required, do not hide floating window when we go to full screen mode.\\\nsqMacWindows.c\t\t\t- watch out for memory leak when we free the color table. \\\n\\\n3.5.1b4 Please note the major changes to network code in 3.5.1b2\\\na)Added options SqueakWindowType & SqueakWIndowAttributes to info.plist. The SqueakWindowType of 6 is the standard document window, a type of 8 is the floating utility window. The attributes control with window attributes and behavior according to\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f1 \\cf2 \\ul \\ulc2 http://developer.apple.com/techpubs/macosx/Carbon/HumanInterfaceToolbox/WindowManager/Window_Manager/wind_mgr_ref/constant_2.html#//apple_ref/c/tdef/WindowAttributes\\\n&\\cf0 \\ulnone \\\n\\cf2 \\ul http://developer.apple.com/techpubs/macosx/Carbon/HumanInterfaceToolbox/WindowManager/Window_Manager/wind_mgr_ref/constant_1.html#//apple_ref/doc/c_ref/WindowClass\\cf0 \\ulnone \\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 b) Sockets are not valid if the network is not initialized. \\\nc) The os-9 vm can return the open file error in the vm attribute data 1202\\\nd) MyWindowEventMouseHandler was leaking region handles.\\\ne) Support for primitiveClosureValue, primitiveClosureValueWithArgs, primitiveExecuteMethod\\\nf) when rootTableCount  goes > 2400 then allocationCount gets allocationsBetweenGCs + 1 \\\ng) BitBlt Alpha Blending has changed\\\nh) Added primitiveWrite24BmpLine\\\ni) The guard if statement for primitiveSerialPortRead was flawed, noted the buffer overflow, but then proceeded, versus returning. \\\n\\\n3.5.1b3 \\\na) Fix, Stephane Ducasse <ducasse@iam.unibe.ch> pointed out that using a virtual desktop we had a crash in ioSetFullScreen. This \\\nwas due to a pthread race condition between the UI thread and interp.c. Fixed by using UI callback to handle fullscreen window/move/resize.\\\n\\\n3.5.1b2\\\na) Switch to aio.h logic and unix socket logic! This is a MAJOR change!!!!\\\n\\\nb) Call aioPoll  (select()) to cause process wait versus old pthread logic. This follows in the footsteps of the unix port. You should verify that \\\ncpu time when squeak is idle is not affected in a dreadful manner.\\\nc) Fix, if you call does this directory exists on a file now you will get an error which will signal that the directory does not exist. This ensures\\\nthe FileDirectory test suite works. \\\nd) Fix, if you quit the browser plugin, check the status of the pthread_cancel before attempting the pthread_join\\\n \\\n3.5.1b1 limited distribution\\\n\\\n3.5.0b4 \\\na) os-x exposed an issue with EToyPeerToPeer support. It seems under os-x we get the connect, data, close so fast on lans that by the \\\ntime we get around to asking for the remote IP address the connection is closed, and our open transport call fails. We change SqMacNetwork.c to \\\nreturn the IP address discovered at connect time in this case. Under os-9 we never saw this behavior because we suspect the network activity \\\nwas slower and more serialized. \\\n\\\n3.5.0b3 (Safari support)\\\n\\\na) The plugin logic was changed to support Safari and better support os-x. This required building a CFM stub to load the mach-o compiled\\\nNSPLugin. The mach-o plugin now uses a pthread for the interp.c loop. This gives much better performance and user UI feedback. \\\nb) The GC logic was carefully reworked to optimize the assembler on the ppc. This gave us upwards of a 30-50% improvement, since \\\nincremental GC is going on all the time, this change actually has a effect you can see say in the solitaire example where we save 10%. \\\nc) sqMacNetwork.c was modified, first change in many years. The remote address and port number are requested as an async operation. \\\nThe operation times out after a few milliseconds. This was never a problem in os-9. Now it seems there is an issue sometimes for DHCP clients\\\non os-x. There the operation can timeout and return 0 as the address or port. We changed the call to do a sync operation to avoid a timeout.\\\nd) sqMacMain.c was modified to allow for pthreads for mach-o netscape based squeakland plugin support\\\ne) sqMacMemory.c changes for mach-o plugin support\\\nf) sqMacTime.c changes for  mach-o plugin support\\\ng) sqMacUIEvents.c changes for mach-o plugin support\\\nh) sqMacWindow.c changes for mach-o plugin support \\\ni) npmac.cpp now this is a netscape glue routine, I changed it to ensure we can see the entry points, originally they are C++, but need \\\nto be \"C\" so the loader can find the names the CFM glue routine is looking for. Also we add the logic TV2FP to setup the mach-0 to CFM code stubs to allow the mach-o plugin to callback to the CFM stubs in Safari. \\\nj) sqMacNSPlugin.c \\\n\t1) Rearrange when the interpret() thread is started to ensure a race condition doesn't happen.\\\n\t2) use Pthreads for the mach-o osx version. \\\n\t3) rework NPP_SetWindow to start interpret() when needed. \\\n\t4) Alter StartDraw, EndDraw to use a mutex lock and handle os-x port locking to prevent races between pthreads.\\\n\t5) Alter ioShowDisplay, optimization and handle os-x\\\n\t6) fix ioSetFullScreen to make it work on Safari\\\n\t7) fix OpenFileReadOnly to make it work on os-x, needed sqFileNameFromStringOpen macro call\\\n\t8) Alter ExitCleanup to mutex lock to prevent race ending issues, and add a bit more cleanup\\\n\\\n\\\n\\\nNote some versions of 3.4.1 were distributed for testing only, these are superseded by 3.5.0\\\n\\\n3.4.0b2 (Croquet support)\\\n\\\na) Ensure vmVersion information reports correct information, was bogus in 3.4.0b1\\\n\\\n3.4.0b1 (Croquet support)\\\na) Added plugin BMPReadWriterPlugin 14 November 2002 (i)\\\nb) B3DAcceleratorPlugin.c gets primitiveCreateRendererFlags (new api)\\\nc) two more op codes get added to BitBltPlugin (fixAlphawith, pixClearwith)\\\nd) Squeak3D gets (b3dOrthoNormInverseMatrix, b3dTransformDirection,b3dTransformPoint,b3dTransposeMatrix)\\\ne) The scroll wheel mouse logic was using apple cmd key as the modifier on the arrow key events, Other platforms use the Control key. So the \\\nmac falls in line (changed to use the control-key)\\\n\\\n3.2.8b9\\\na) recompiled os-x version, 3.2.8b8 seem to have a bad compiler option and gave 20% less performance.\\\n \\\n3.2.8b8\\\na) exposed \n\\f1 vmParameter\n\\f0  24 & 25 which control how memory is allocated/freed \\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f1 \\cf0 Smalltalk vmParameterAt: 24 put: 48*1024*1024.\\\nSmalltalk vmParameterAt: 25 put: 24*1024*1024.\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 b) Added argv,argc, env variables to main\\\nc) Fixed for Jaguar 10.2. Full screen mode cmd-tab broke menu bar hiding, this is a 10.2 bug\\\nd) Added support for IP_ADD/DROPMEMBERSHIP and the ability to bind to the wild card port (0).\\\ne) OpenGL changes for TEA\\\n\\\n3.2.8b7 was testing release and not distributed to the public.\\\n3.2.8b6 was testing release and not distributed to the public.\\\n3.2.8b5\\\na) Oops broke the logic returning the vmversion information in classic. Also incremented os-x version (which was fine) to keep numbers in sync\\\n\\\n3.2.8b3 The squeak.sourceforge.net CVS tree was reorganized and the project builder project revamped. The \\\nmajor change to the source was upgrading the netscape browser plugin to 3.2.7b6 levels.\\\n\\\na) Gnunifer.3.cs Changed to add register var on FOO_REG and to remove sqGnu.h file embedded in method.\\\nb) sqMacDirectory.c Add logic to handle case of building as CFM carbon plugin under CW6, needed some carbon calls\\\nc) osExports.c needed to ifdef out the getUIToLock entry point (not available as CFM carbon browser plugin)\\\nd) sqMacFileLogic.c Fix alias problem. Add logic to deal with path names as CFM carbon browser plugin, ensure vmPath is correct.\\\ne) sqMacImageIO.c Cast to get rid of warning message\\\nf) sqMacMain.c Cast to get rid of warning message, Check for CFM Carbon and bundle check. Revise vm parm 1201 code to return long file names are ok as CFM carbon browser plugin. Some diagnostic routines for printing to the console as CFM carbon browser plugin.\\\ng) sqMacMemory.c Logic change as CFM carbon browser plugin.\\\nh) sqNSPlugin.c\tFix to beginFullScreen logic (carbon call is broken?)\\\ni) sqMacUIEvents.c Remove getUIToLock dummy call. This entry point should only exist for mach-o carbon builds. Not CFM carbon browser plugins\\\nj) sqMacWindow.c  Use old call to create window when a CW 5 carbon application.\\\nk) sqPlatformSpecific.h Change #ifdef to correct logic error when building as CFM carbon browser plugin under CW 5.\\\n\t\\\n\t\\\n\\\nMay 31st, 2002 (3.2.7b6)\\\nFor 3.2.7\\\n\\\n3.2.7b3 We build the VM using patchs to enable globals as a structure. This improves performance by 10%\\\n\\\na) Classic Vm builders might need to add \"struct foo *foo = &fum; \"  to int interpret(void). \\\nb) readme: add notes about changesets and alter build instructions\\\nc) sqMacFileLogic.c: use accessors for interp.c globals\\\nd) sqMacMain.c: use accessors for interp.c globals. Also Alain Fischer added logic to fetch os-x version number and to enable you to put squeak.image in the resource folder for autostarting.\\\ne) sqMacTime.h: Fix busted lowresclock again. After 24 days of mac uptime, 3.2.6 squeak will hang.\\\nf) sqMacUIEvents.h: use accessors for interp.c globals.\\\ng) sqPlatformSpecific.h: alter sqFTruncate to use fileno() as needed.\\\nh) sqMacWindow.c: use accessors for interp.c globals.\\\ni)  3.2.7b5 sqMacFileLogic.c: change vmpath to resolve to classic VM if vm is moved from MacOSClassic folder\\\nj) Misc changes for Netscape plugin support\\\nk) Introduce osExports.c logic\\\nl) 3.2.7b6 Fixed a problem in path name resolving need to use UTF8 to properly interact with high ascii characters\\\nm) 3.2.7b6 Fixed a problem in path name resolving there was a bug with certain types of alias path name combinations in quick name resolving.\\\n\\\nMac VM 3.2.6 mach-o build for Carbon, and build for Classic.\\\nMarch 14th, 2002\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f2 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\nNotes About previous VM.\\\n3.2.6b6 Classic or earlier has a bug that makes it stop collecting user input on a 19.88 hour cycle depending on reboot time.\\\n\tSeems many systems don't run for more than 19 hours so we've not had major complains about this issue. \\\n\tBug was introduced in 3.2.1.\\\n3.2.5 has a bug that prevents the use of accented characters without \\\n\ta image patch to fix a VM issue (not an issue in 3.2.4). Also you can't enter an double keystroke characters, ie ^ \\\n\twhich makes life difficult. It also does not support the AppleScript Plugin (not an issue in 3.2.4)\\\n3.2.4 a bug in project builder introduced a performance problem (bad compiler options).\\\n\\\nSee the 3.2.5 about why this 3.2.6 is different inside.\\\n\\\nFor 3.2.6:\\\na) Change an internal number that dictates how often pending interrupts should be looked at from 5ms to 3ms This improves \\\ndelay accuracy.\\\nb) Change how sleeping is done when squeak is idle. This reduces CPU consumption, and improves Delay accuracy.\\\nc) Fix bug with high bit problem with keyboard (accented characters are ok now)\\\n  c2) 3.2.6b6 has fixed characters that require multiple key strokes to enter.\\\nd) Externals that make UI interactions (IE AppleScript) Must now make a call back to the VM to schedule\\\n    the main thread to do the call that will invoke UI interaction to prevent a deadlock in Carbon between threads. \\\n   See the OSAExecute call in the AppleScript plugin for details.\\\ne) If you run a classic mac VM more than 23.x days nonstop it will stop responding to UI events.  Ensure clocks get anded with 536870911.\\\nf) signal inputSemaphoreIndex because we are mulithreaded. Not that it does anything for us yet...\\\ng) 3.2.6b6 Pass the unicode value of the keystroke up as the EventKeyDown/EventKeyUp data, versus mackeyboard code.\\\nh) Somewhere there is a bug with mktime + time, so use the unix code of time+localtime+gmt \\\ni) Change iorelinquishPrcessorForMicroseconds to sleep the quatum between now and wakeup time. Also schedule a\\\n   check for interrupts if wakeup time is now or in the past. This improves delay accuracy. For OS-x this was a big deal,\\\n   for os-9 it improves things by 1 or 2ms. Also in  os-x we sleep more when idle so CPU usage goes down.\\\nj) On OS-9 umap AND free the VM backing store. Just doing the free doesn't work and you lose 128Mb of disk space until you reboot\\\nk) 3.2.6b7 for post event processing ignore mouse move/drag/or scroll wheel events. These are ignored by the open/gl plugin and only suck a major amount of CPU time to process in the post event processing logic. \\\nl) 3.2.6b8 (3.2.6b4 classic) removed call to uncouple shift keys introduced in 3.2.1. This causes some macs after sleeping not to respond to keyboard input\\\nm) 3.2.6b8 (3.2.5b7 classic) added function for ioLowResMSecs to avoid early bit overflow. Rework clock checking in ioHandleEvents to handle clock rollovers properly.\\\n\\\nMac VM 3.2.5 mach-o build for Carbon, and build for Classic.\\\nMarch 4th, 2002\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f2 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\n\\\nBeware this version of the VM is significantly different inside! \\\n\\\n\\pard\\tx1440\\tx2880\\tx4320\\tx5760\\tx7200\\ql\\qnatural\n\n\\f1 \\cf0 a) Broke sqMacWindow.c into 10 different files by function type.\\\n\\\nb) Moved most of the memory allocation logic out of sqMacMain.c into sqMacMemory.c. and ensure memory is freed when Squeak is terminated. \\\nThe major change in this code is support for OS 9.x virtual memory mapping. This only applies to Mac OS 9.2.0 or higher, excluding os-x. It appears  Mac OS 9.1 has a bug that prevents this feature from working.\\\n\\\nFor images that require less than 128MB of memory, mapping is used to allow the image to grow/shrink to the 128MB boundary, therefore you can change the application memory size to about 2MB. \\\n\\\nFor images that require more than 128MB then change the application memory size to > 128MB and mapping will not occur. \\\n\\\nIf mapping is not available because virtual memory is turned off or the api is not supported by the macintosh OS then mapping is not used. Note that mapping is not support under the classic os-9.x environment under OS-X, however in this case you should be using the OS-X version of Squeak, not the classic version.\\\n\\\nc) Use of Carbon event logic for OS-X only. This is a major structural change. \\\n\\\nIt also encouraged the use of a pthread for interp.c. \\\n\\\nAll user interaction with the VM follows a new code path, so problems with keyboard or mouse input should be reported asap. Also any issues with application switching, windows being brought to the foreground or sent to the background and usage of the full screen logic should be reported asap.\\\n\\\nAs part of this change I have build in support for scroll-wheeled multi-button mice under os-x. Thanks to Doug Way for testing this for me. Maybe someone can post to the list what their favorite 3 button scroll wheeled mouse/trackball is.\\\n\\\nd) Use of a carbon call to get the dominate Device if you have multiple screens. People with multiple screens should confirm window resizing, full screen on/off works as expected.\\\n\\\ne) Corrected comment in sqMacFileLogic.c\\\n\\\nf) Changes to sqMacNSPlugin.c. This makes it compile, but it's not usable yet.\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 \\\n\\\nFeb 20th 2002 3.2.4\\\n\\\nFor this version of the VM I have migrated towards using OS-9 packages. This allows us to provide one \\\nfolder/package that supports os-x and previous operating system versions.\\\n\\\nGiven Squeak 3.2.4Beta1.app\\\nThe classic VM is found in the *.app:Contents:MacOSClassic, with an alias in *.app:\\\nThe mach-o OS-X VM is found in *.app.Contents:MacOS\\\n\\\nIf you are running OS-9 then clicking on the *.app or doing drag and drop will just run Squeak, same applies for OS-X.\\\nIf you are running OS-7.5.5 or OS-8.x then the *.app package will appear as a folder, just open and click on the alias within. \\\nNote that if you want to use classic plugins I suspect you need to put them in the MacOSClassic Folder beside the VM. \\\nBundles for os-x go in the same location as the *.app application package.\\\n\\\nChanges\\\na) Drag and drop at open time with image file that has no meta type, will now open the image, versus prompting you.\\\nb) Use an os-x window attribute at open time to signal that the window should not be moved by the dock when you go to full screen.\\\nc) Fix window update logic to use window that needs updating versus stwindowg to fix issues with print dialog windows in classic. \\\nd) bitblt gets recompile to pickup fixes posted in 3.2 update stream.\\\n\\\nFeb 5th 2002 3.2.3\\\nChanges\\\n\\\na) use old extended time manger to update psudeo-TickCount, versus sigalrm. siglarm make sound recording not work.\\\nb) fiddle with sound recording and make it work.\\\n\\\nJan 2002 3.2.2\\\nChanges:\\\n\\\na) AsyncFilePlugin.c Use global to remember security function entry point for performance reasons\\\nb) FilePlugin.c\tUse global to remember security function entry point for performance reasons\\\nc) interp.c Use squeakFileOffsetType versus off_t and add a bunch of checks to handle lack of long long and conversion errors between 64/32 bit integers and LargeInteger objects\\\nd) readme, it's http://www.mucow.com/Gnuifier.1.cs \\\ne) SocketPlugin.c\tUse global to remember security function entry point for performance reasons\\\nf) sq.h added default sqFilenameFromStringOpen and sqTruncate\\\ng) sqFilePluginBasicPrims.c revert to anti specs, but ensure #def to fseeko and ftello for 64 bit aware file systems.\\\nh) sqMacDirectory.c A bit more error checking on bad file names\\\ni) sqMacFileLogic.c Folders size is now zero in classic, and a bit more checking on bad file names\\\nj) sqMacSound.c Fixed a problem with sound recording in classic due to a change made in Sept. But sound recording still does not work under os-x\\\nk) sqMacWindow.c  two very important changes:\\\n\\\n\t1) You can now do FFI calls with the FFI bundle plugin to Mach-o frameworks. \\\n\tHowever you need to rework your api calls. For example:\\\n\tapiGetMousePoint: aMacPoint was\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'InterfaceLib'>\\\n\tIt now is:\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'Carbon.framework'>\\\n \t\\\n\tIf you review /System/Library/Frameworks I'm sure you can come up with interesting ways to \\\n\tmake mac only squeak images.\\\n\t\\\n\tI now use map( NULL, gMaxHeapSize, PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED,-1,0);\\\n\tanonymous memory mapping to 512MB as the squeak memory block. The VM can then grow or shrink\\\n\twithin the 512MB block, I just move a pointer. \\\n\t\\\n\tNote in 3.2.1 a slight error on my part restricted Squeak to 50MB. I am of course\\\n\tinterested to hear about issues with my choice of 512MB. Note a Squeak VM is limited to 2GB under perfect \\\n\tconditions, however if any part of the image crosses the 2GB boundary the VM will fail, right now 512MB\\\n\tseemed a safe choice.\\\n\t\\\n \tPhysMem:  60.2M wired, 78.6M active,  412M inactive,  551M used,  217M free\\\n\tVM: 3.03G + 55.3M   7847(0) pageins, 1(0) pageouts   \\\n\tPID COMMAND      %CPU   TIME   #TH #PRTS #DREGS RPRVT  RSHRD  RSIZE  VSIZE\\\n\t422 Squeak VM    0.8%  0:35.59   2    71   100  23.3M  8.53M  26.5M   571M\\\n\\\n\tbut I only have one 80,000,000 byte swap file in /var/vm\\\n\\\nNote if you turn crash reporter on, then if the VM crashes a nice report should be generated in your log directory.  See the Apple documentation for a description of this feature, currently it is set in OS-X 10.1.x via the preferences window for the Console Application. If you have a crash with this VM, please recreate and post the crash log (found in Users/foobar/Library/Logs/ to the Squeak mailing list so we can continue to make the VM fault tolerant.\\\n\\\n3.2.1 Notes\\\n\\\nYou might need these change sets to build a new VM or to use all the features of this VM with your image, hopefully these will get into the pending 3.2.x image.\\\n\\\nFixes and feature extensions.\\\nAsyncFileFixFu...hName-JMM.1.cs \tfix for async test method.\\\nDragAndDropAtStart-JMM.5.cs\t\tfix to enable drag and drop at startup\\\n\\\nNeeded to compile a VM with VMMaker\\\nLargeFiles-JMM.3.cs\t\t\t\tEnable large file support, files > 2GB\\\n\\\nNeeded to turn this feature on\\\nMacLongFileName-JMM.5.cs\t\t\tEnable long file names on the mac\\\n\\\nThe SUnit\\\nMacLongFileNamesSUnits-JMM.3.cs\tTest long file names and long directory names and large file support\\\n\\\nKinda optional features some people might need.\\\nInternetConfiguration-JMM.5.cs\t\tAllow internet configuration information access, internal plugin\\\nUUID-JMM.3.cs\t\t\t\t\tAllow UUID generation, internal plugin\\\n\\\na) The ability to get back a UUID. This uses the hosting UUID generator if the\\\n hosting OS supports it and we have a primitive we can call. If not then we generate\\\n a type 4 version of a UUID (the random bits one).\\\n(This requires a special change set)\\\n\\\nb) Ability to start squeak on the mac by dragging multiple documents onto the\\\nimage, or drag and drop of stuff onto the running VM icon.\\\n(This requires a special change set)\\\n\\\nc) Usage of the Internet Configuration tool kit to supply information about\\\nwhat the mac proxy is etc. etc.\\\n(This requires a special change set)\\\n\\\nd) Migrate file system to use 64 bits. This allows you to read/write and seek\\\nwith files > 2 GB. This includes a change to the VM to convert from/to long\\\nlong integers. It also allows the file system to actually deal with 2GB files,\\\nthe current file interface actually fails once the file exceeds 1GB.\\\n\\\ne) For the carbon based Squeak VM we now support long file names 255\\\ncharacters. Close both eyes and touch everywhere the mac VM deals with file\\\nname paths and hope for the best (Actually we write an Sunit to ensure we've\\\nnot broken everything). This also includes the ability to put an image in a\\\nlong file name directory, but right now the image name must stay under 32 characters.\\\n\\\nFilePlugin.c changes to support large integers.\\\nFilePlugin.h changes\\\nsq.h changes to support large files.\\\nsqConfig.h changes to resolve some conflicts.\\\nsqFilePluginBasicPrims.c  changes to support large files.\\\nsqMacAsyncFilePrims.c changes to use fspec versus 255 file path.\\\nsqMacDirectory.c changes to use hosting OS (OS-X) bsd create and delete directory\\\n and truncate. dir_look changes as part of the general rewrite.\\\nsqMacDragAndDrop.c use new call to get path name from fsspec. Use fsspec more, and added \\\n  interface code to setup drag and drop of items at application startup time. max document name\\\n  goes to 1000 characters.\\\nsqMacFileLogic.c Mostly rewrote!\\\nsqMacSecurity.c use new file calls.\\\nsqMacWindow.c \\\n\tincrease size of vmpath, docpath, imagepath to 1000 chars, shortname to 255 characters.\\\n\tadd logic for left/right modifier keys \\\n\treworked LoadLibViaPath logic \\\n\tsqImageFileOpen uses fsspec versus 255 path name.\\\n\tsqImageFileStartLocation uses ffspec.\\\n\tbundle support for bundles\\\n\t\\\ne2) interp.c supports get/put of large integers to long long integers.\\\ne3) fixed fTruncate\\\n\\\nHint getting this to work was a pain. Think of 255 character folder names and nested aliases,\\\nfolder 1 refers to folder 2 which then refers to folder 1 again, just go down the path say 8 times,\\\nthen ask to create a file or directory!\\\n\\\nf) Support to change the Mac screen resolution under Squeak control.\\\n\\\ng) Fix to unload/load the scrap at startup time to ensure the clipboard is\\\ncorrect when starting up the VM.\\\n\\\nh) Uncouple the shift key and left/right shift keys on old extended keyboard.\\\nAlso add a call to get which keys are currently pressed on a USB keyboard or\\\nthe USB codes for an apple non-usb keyboard. (Note this isn't working quite yet under OS-X)\\\n\\\ni) Changes to enable us to compile the VM under Apple's OS-X Project Builder\\\nenvironments.\\\n\\\nj) Some rewriting to ensure serial and midi support can be written as external\\\nplugins.\\\n\\\nk) Fiddling to get sound input to work under OS-X\\\n\\\nl) Platform.exports changed macintosh to macintoshSqueak to avoid conflict.\\\n\\\nm) Memory is allocated at 50MB at start, then will grow or shrink, verus previous carbon apps\\\n that did 1GB. \\\n \\\nn) sqPlatformSpecific.h changes to support long file names and os-x posix file names\\\n\\\no) sqVirtualmachine.c & sqVirtualmachine.h\\\n#if VM_PROXY_MINOR > 4\\\n\tVM->positive64BitIntegerFor = positive64BitIntegerFor;\\\n\tVM->positive64BitValueOf = positive64BitValueOf;\\\n\tVM->signed64BitIntegerFor = signed64BitIntegerFor;\\\n\tVM->signed64BitValueOf = signed64BitValueOf;\\\n#endif\\\n\\\nBeware this causes an interesting problem, if you compile plugins with VM_PROXY_MINOR now set to 5, then they will not work with older VMs. The solution is to define the VM_PROXY_MINOR in the plugin to the value that indicates what features it is using.\\\n\\\np) Changed to use ITimer logic as a 16ms lowres timer to improve performance\\\n\\\nq) Changed to use single thread, no thread manager.\\\n\\\nr) Changed to use lowres timer in checking for polling time to improve performance\\\n\\\ns) It should have faster startup times.\\\n\\\nt) It will hide the empty window at startup, then show the squeak window when required.\\\n\\\nu) It has a different menu structure.\\\n\\\nv) It does less I/O when navigating directories.\\\n\\\nThe macintosh 3.1Alpha1MT VM, Sept 24th 2001 \\\nThis VM was built with the base  3.1 image at change set #4347\\\nV3.1.1 at change set #4347\\\n\\\n\\\nWe go to V3.1.1 to indicate that the 3.1 VM is being used. In the past the 3.1 Image was used but some changes in the openGL logic makes  3.1 Vm and 3.0 image not quite work correctly with 3d graphics. Although a 3.1 VM will run many images way back to the 2x series no careful study has been done on the ability to do this. So at this point we are indicating this VM is a 3.1 VM and best used with a 3.1 image.\\\n\\\nUse of VMMaker to build VM. As of this version everything can be built as an external except for the window logic which hasn't been decoupled from the VM support for the macintosh. \\\n\\\n1) AsynchFilePlugin the security check for ability to create file is now a plugin call.\\\n2) B2DPlugin logic changes to fillLinearGradientfromtoat\\\n3) b3dRemapFaces, b3dRemapEdges, b3dRemapEdgeList, b3dRemapAET, b3dRemapEdgeVertices, b3dRemapFaceVertices, b3dRemapFaceFree, b3dRemapEdgeFree, b3dRemapAttributes. Some casting and changing of += to = + to make some compilers happy.\\\n4) BitBltPlugin added tableLookupat call.\\\n5) DropPlugin added setFileAccessCallback to allow the Security Module plugin the ability to give us the entry point to turn security off so we can open files as read only when security is turned on.  This was broken in the past. \\\n 6) FilePlugin added fileOpennamesizewrite,getThisSession to allow for callbacks. Changed the file security logic to use the plugin interface. \\\n7) interp.c, fixes for 4347ByteArrayRangeCheck-di, ability to printAllStacks, security calls for image rename, write to use plugin interface.\\\n8) Added GetAttributeString, and recordDragDropEvent and entry points for callbacks.\\\n9) SecurityPlugin changed when initialization is called to initialize the safe and unsafe directorys, also added entry points for all the testing calls so it can be a true plugin.\\\n10) Serialplugin. The serial plugin was redesigned to seperate out MIDI logic. People with MIDI devices and old serial macintosh should check to see if they still work since we lack equipment now to test this obsolete technology set.\\\n11) SocketPlugin. Make security calls true plugin calls.\\\n12 SoundGenerationPlugin. Removed \\\nEXPORT(int) SoundGenerationPlugin_primitiveFMSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveOldSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitivePluckedSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveWaveTableSoundMix(void);\\\nThey were a hack at the plugin level and discussion on the list seemed to show they were no longer used. \\\n13) Checking for if defined (__APPLE__) && defined(__MACH__) for the Mac OS-X native development environment\\\n14) Changed sqMacAsyncFilePrims, usage of interpreterProxy->, plugin calls for getThisSession. \\\n15) Changed sqMacDirectory.c. Removed some utility code and make it a seperate file so that it can be shared between sqMacWindow and other plugins that require them. \\\n16) Changed sqMacDragDrop.c. Added plugin callback for getSTWindow, the sqSetFileAccessCallback logic, fileOpennamesizewrite, and secHasFileAccess. Added logic to do the recordDragDropEvent callback to sqMacWindow.c \\\n17) sqMacNetwork.c. Some cleanup for the OS-X version of the OpenTransport headers, some constants have name changes\\\n18) sqMacNSPlugin.c Use of ioLoadFunctionFrom(NULL, \"DropPlugin\"); versus explicit call.\\\n19) sqMacOpenGL.c. Some cleanup for the OS-X version of the OpenGL headers\\\n20) sqMacOpenGLInfo.c. Some cleanup for the OS-X version of the OpenGL headers\\\n21) sqMacSecurity.c ioInitSecurity calls back to dragAndDrop plugin to set entry point to turn security off.  Added code to create directories if required and ensured callbacks are plugitized.\\\n22) sqMacSound.c Some cleanup for the OS-X version of the Sound headers. Use of interpreterProxy-> in the proper places.\\\n23) sqMacWindow.c Some cleanup for the OS-X version of the compiler.  Fixed saveAsEmbeddedImage, this got broken when we moved from a FAT to a ppc only application.  Altered interface to recordDragDropEvent so that it was plugable. Some file path name logic goes to a seperate C source file. The drag and drop plugin is loaded and intialized after the image is loaded but before the interpreter is started, before it was done a bit earlier in the startup process. This also has the effect of initializing the security module.\\\n24)sqOpenGLRenderer.c. Some cleanup for the OS-X version of the OpenGL headers\\\n25)SurfacePlugin.c gets a hack so it knows when it is internal versus external.\\\n\\\n\\\n\\\nv3.0.18 at change set #4081\\\n(Note browser plugin goes to 3.0.23\\\n\\\n1) sqMacOpenGL.c Quite a few changes were made to the code to support it as an internal plugin for the browser. This is because the drawable frame for a browser plugin is a subset of the browser's grafport, so lots more care must be taken to draw in the correct location using OpenGL. We also fixed issues with re-configurating the Open/GL draw area when the window gets resized or goes to full screen, and attempted to ensure multiple screens will work.\\\n\\\n2) sqMacWindow.c, minor fix to cast a constant char * to char * for CW 6.1\\\n\\\n\\\nBrowser plugin 3.0.23 fixes\\\n\\\n1) Integerated the H/W Acceleration as an builtin plugin\\\n2) Added logic for pre and post event interaction to browser plugin event handler for H/W Acceleration logic. The external H/W Acceleration plugin mostly works with the browser plugin but doesn't work with full screen mode, or if the plugin is embedded in a window or a scrollable frame, so don't use it. Use the browser plugin 3.0.23 or higher which has the H/W Acceleration builtin.\\\n\\\nv3.0.17 at change set #4081\\\n(Note browser plugin goes to 3.0.21)\\\n\\\n1) Added HW acceleration as internal plugin.\\\n2) 4079BBAlphaTextFix-ar Fixes the problem with alpha text, changes BitBltPlugin.c \\\n3) Added primitive on the mac to truncate a file.\\\n4) Added logic to flush volume on a flush file to ensure file and control blocks are flushed.\\\n5) For the Carbon VM we increase nextevent wait time if we get sufficent idle time. This should reduce CPU usage under OS-X\\\n6) GetAttribute: 1002 now returns the gestaltSystemVersion as a hex string, and getAttribute: 1003 now returns either '68K' or 'PowerPC'.\\\n7) Starting with 3.0.17 the VM is build only as a powerpc application. The latest VM as a 68K application will be made available from time to time permits based on people's needs. \\\n8) Changes to sqOpenGLRenderer.c to improve performance, OpenGL 1.1 support.\\\n\\\nPlugin 3.0.21 fixes\\\n\\\n1) added check for mailto: tag on posts to fix problem with Netscape crashing, and IE hanging.\\\n2) Plus above fixes.\\\n\\\nWhat has been fixed/changed.\\\nv3.0.16 at change set #4041\\\n(Note browser plugin goes to 3.0.20)\\\n\\\n1) Lots of fixes for BitBlt and HW acceleration.\\\n2) Hardware Acceleration plugin goes to 1.0.1. Please note there is a seperate plugin with the same name for Carbon. Doing a get info will identify if the plugin is only usable with Carbon Squeak.\\\n\\\nv3.0.15 at change set #4026 (May 17th test version)\\\n(Note browser plugin goes to 3.0.19)\\\n\\\n1) Added support for OpenGL HW acceleration plugin\\\n\\\nPlugin 3.0.19 fixes\\\n\\\na) Obey embedded tag plug\\\nb) Fix problem with plugin 3.0.17 not working with netscape 4.x\\\nc) Carbonize plugin for IE 5.1 \\\nd) Remove debugging printf than occurred on transition to full screen mode\\\n\\\nWhat has been fixed/changed.\\\nv3.0.14 at change set #3987\\\n\\\n(Note plugin goes to 3.0.17)\\\n\\\n1) sqMacDirectory.c. The pathlookup would handle the case of foo:bar::do incorrectly by ignoring the :: path redirection. This has been fixed. However a path lookup will not work if it contains :: and an aliased directory in the middle of the path.\\\n\\\n2) sqMacSecurity.c. The pathname for the untrustedUserDirectory was built incorrectly, and the bug mentioned above in sqMacDirectory.c usually kept this from being noticed.\\\n\\\n3) sqMacWindow.c  we added some logic to do the delay for primitiveRelinquishProcessor, but found it had an large effect on a freecell benchmark. I suspect on a Morpic step wait there is nothing to do so primitiveRelinquishProcessor gets called which then affects response time. So for now we revert to the 3.0.11 behavior, good performance and 100% CPU usage!\\\n\\\n4) GetAttribute 1004 returns returns interpreterVersion; which is for example\\\n\"Squeak3.1alpha of 6 February 2001 [latest update: #3987]\"\\\n\\\n5) When in full screen mode we now attempt to disable resizing, zooming, or moving the window. The window borders are hidden, but in the past it was feasible to grab an edge and alter it, thus confusing the VM.\\\n\\\n6) Worked on Carbonizing the browser plugin\\\n\\\n7) 3977 & 3978 FloatArray fixes. Makes float arrays go through a new (and working) version of #primitiveHash\\\n\\\n8) Fixed problem with accidental mouse clicks being triggered from pulldown menus on application switching.\\\n\\\n9)\\\n\"Change Set:\t\t3984 BitBltExtensions-ar\\\nDate:\t\t\t4 May 2001\\\nAuthor:\t\t\tAndreas Raab\\\n\\\nThe change set includes various extensions for BitBlt with the goal of migrating the useful features from FXBlt into the general BitBlt mechanisms. These include:\\\n\\\n* Handling of LSB and MSB forms:\\\nBitBlt now handles both, MSB and LSB forms (and their conversions). Only instances of Bitmap are assumed to contain big-endian pixels. All others are assumed to be little endian (reason is that we can only identify Bitmap here). Note that 'LSB' and 'MSB' refers to PIXELS, that is a 1bpp LSB form has its left most pixel in the lowest bit whereas a 1bpp MSB form has its left-most pixel in the highest bit.\\\n\\\nFor pixel depths < 8 this can be different from what your OS supplies (as an example, Windows bitmaps < 8 are big-endian pixels in little-endian words; we might call them 'middle-endian'). We simply don't deal with those - forms are either big or little endian but nothing inbetween.\\\n\\\nBitBlt has got an extra combination rule for swapping pixels in the destination form. This can be used to make byte swapping much more efficient (as soon as we've got more VMs with support for it).\\\n\\\n* Handling of 'native bitmaps' (aka surfaces):\\\nBitBlt is now able to deal with OS surfaces that are registered with the surface plugin.\\\n\\\n* Handling of full color maps:\\\nBitBlt has been extended to deal with instances of ColorMap in addition to the prior mechanism of using only indexed lookups and provide an implicit 16-32 bit color conversion. ColorMaps can specify both, a lookup table and an additional set of masks and shifts to apply during the color mapping operation. \\\n\\\nFour independent shifts and masks can be given which can be used for a lot more than just color conversion (as an example, one could do byte swapping with this; but see also BitBlt class>>exampleColorMap). \\\n\\\n* Better handling of default arguments:\\\nFor most of the required arguments for BitBlt very reasonable default assumptions can be made. This includes the destOrigin (0@0), clipRect (0@0 extent: destForm extent), sourceOrigin (0@0). BitBlt now substitutes these if they are absent (e.g., nil) in the instance provided.\\\n\\\n\"\\\n\\\n\\\nv3.0.13 at change set #3848\\\n\\\n1) sqMacSecurity was changed to set the unsecure directory to\\\n\tsystem folder:Preferences:Squeak:Internet:My Squeak\\\n\\\nv3.0.12 at change set #3848\\\n1) Fixed problem with creating My Squeak Folder in Documents Folder with System 8.6\\\n\\\nWhat has been fixed/changed.\\\nv3.0.11 at change set #3848\\\n\\\n1) sqMacDirectory had a bug when you resolved a path name. The fast resolve always failed, which invoked the slow resolver. Now the fast resolver works.\\\n\\\n2) sqMacSecurity was changed to set the unsecure directory to Documents:My Squeak. \\\n\\\n3) sqMacWindow was changed to fix some issues with Squeak capturing events from other applications and to reduce the number of duplicate mouse events that are generated. Also we capture modifier information  directly from the mouse and keyboard on null events to fix some problems with Carbon. We  hopefully fixed problems with mouse clicks from foreground applications being seen by Squeak and issues with the OS-X Dock clicks.\\\n\\\n4) sqMacNSPlugin was changed to use the above mouse/keyboard capture code which is much cleaner than the original fix for the bogus modifier information given to us by netscape on a null event. \\\n\\\n5) When you turn full screen off we now correctly reposition the window to the original location versus a few pixels to the left. \\\n\\\nWhat has been fixed/changed.\\\nv3.0.10 at change set #3848\\\n\\\n1) changed VM exception unwind logic\\\n\t3796-Exception-unwind-V3,tim@sumeru.stanford.edu, Paul McDonough, Stephen Pair and others\\\n\\\n2) Fixes for the JPEGReader plugin and for Jitter 3\\\n\\\n3) Added minimal Mac VM logic to assist in building a small VM.\\\n\\\n4) Changed how the browser plugin starts up. Now it starts the interpreter running only after getting the browser setwindow command. This seems to fix a race condition that resulted in a crash at startup time with Netscape 4.x\\\n\\\n5) Fixed broken full screen redraw on cmd-tab\\\n\\\n6) Fixed what looked like mouse-down, mouse-down, mouse-up sequence. Now reports mouse-down, mouse up.\\\n\\\n7) Added StarSqueak plugin as internal plugin\\\n\\\n8) Note the current Squeak Plugin should be gotten from the www.squeakland.org site.\\\n\\\nv3.0.9 at change set #3776, Boston Snow storm build.\\\n\\\n1) A number of changes were made to the interpreter:\\\n\ta) added primitive to change a class.\\\n\tb) added primitives to get or put 32bit integers\\\n\tc) Fix problem with GC and class reshaping\\\n\td) Better logic for method cache flushing\\\n\\\n2) Added JPEGReader plugin\\\n\\\n\\\nV3.0.8 at change set #3740\\\n\\\n1) The caps lock no longer maps to the shift attribute. So if the caps lock is down mouse clicks will behave normally. \\\n\\\n2) Numerous fixes for the BitBltPlugin plugin\\\n\\\n3) Memory allocation grow/shrink logic for Carbon was added.\\\n\\\n4) Spurious mouse clicks for the browser plugin has been fixed. (This took awhile to fix, I'm sure it's a bug with the Swedish version of Netscape)\\\n\\\n5) The browser plugin will attempt first to allocate memory from the browser heap, then the system heap. Most people when faced with a memory issue usually increase memory for the browser first. However memory for the plugin is controlled by an attribute in the EMBED HTML statement. \\\n\\\nV3.0.7\\\n\\\n1) A bug exists in pre OS 8.x that causes a crash in activate window if the standard get file \\\ndialog comes up before the Squeak Window. I remove the InvalWindow call found in that routine since it is actually redundant.\\\n\\\n2) The standard get file dialog on system 7.x would not terminate if you did a cancel.\\\n\\\n3) The InterfaceLib had to be weak linked to prevent CFM startup issues. \\\n\\\nV3.0.6\\\n\\\n1) Alias resolving is less aggressive.\\\n\\\n2) We no longer cache image reads or writes. This was done because OS 9.1 allows you to have very large disk caches, and it's pointless to cache the image read or write.\\\n\\\n3) The file flush primitive now actually flushes the file via an OS call. This was a bug in the CodeWarrior 5.3 source code.\\\n\\\n4) The 68K version was being built with the 68881 math library. This fails on 68040LC chips. We now use the non-68881 math library. Thanks to Bruce ONeel for find this.\\\n\\\n5) A bug was found in the path resolving logic that was added for 3.x. This bug apparently only affects 68K machines,  never was identified as a PowerPC issue. \\\n\\\n6) The Netscape plugin needs a properly allocated clip region, this code seemed to work ok on new systems, but fails on system 7.6.1\\\n\\\n7) The security interface will create a Documents folder on the root volume if the default Document folder has been deleted. This is needed for security purposes. \\\n\\\n8) Jitter needs 1MB of free memory to run.\\\n\\\n9) 68K machines require another 32K of stack\\\n\\\n10) Threads  now work on 68K machines, but turned off because of possible performance issues. (I think more study is needed).\\\n\\\n11) The 68K version was compiled with better optimization, expect a 15% improvement.\\\n\\\n12) fix for BitBltPlugin ascii = byteAt((sourcePtr + charIndex) - 1);\\\n\\\n13) The interpreter object validation checking code was alter to work correctly.\\\n\\\nV3.0.5\\\n\\\n1) sqConfig.h changed due to BE OS header changes\\\n\\\n2) sqMacDirectory.c. Added support for Navigation services or Standard File Get to find the image at startup time when the Squeak.image is not found by the VM. This replaces the DOS like console message that comes up saying that Squeak can't find a image.\\\n\\\n3) A fix to drag and drop for the browser plugin.\\\n\\\n4) We now use Apple's cooperative multithreading package to run the UI in one thread, the VM in the other. This solves some issues with the browser and makes the UI versus VM logic and execution responsibilities easier to understand. \\\n\\\n5) Changed the sqMacNSPlugin.c code to support a 3.0VM using multithreading support. This should give Squeak in a browser better performance. Also changed the full screen support to correctly work with multiple monitors.\\\n\\\n6) BitBltPlugin.c gets one more op code\\\n\\\n7) Added the security interface\\\n\\\n8) Added the file flush primitive\\\n\\\n9) Rewrote the macintosh readme file\\\n\\\n10) Revisited the zoomWindow code and found a bug with multiple monitor support, then I fixed the code to make Full Screen mode work on screen that Squeak window is mostly on, versus the menubar screen. Also if you switch from full screen back it resizes the window back to the orginal size and location before you invoked the full screen. \\\n\\\nV3.0.2\\\nPlugins\\\n\\\nRecompiled the internal BitBltPlugin plugin to encorporate:\\\nChange Set:\t\t258AlphaBlendOpt-dsm\\\nAuthor:\t\t\tDuane Maxwell, Paul Phillips/exobox\\\na) Short circuits full opaque and full transparent pixels when alpha blending.\\\n\\\nRecompiled the internal LargeIntegerPlugin\\\n3298LargeIntegersV1-2-sr -- Stephan Rudlof -- 29 November 2000\\\n3299LargeIntV1-2For29-sr -- Stephan Rudlof -- 29 November 2000\\\n\\\nVM Software\\\n\\\n(b) PowerManagement for macintosh is now supported. You can disable the power manager to give you better performance on some powerbooks at the expense of battery life. See the Preferences Panel for details, category 'Performance'\\\n- changed sq.h\\\n- changed sqMacWindow.c to add support for power mgr disabling\\\n\\\n(c) Drag and Drop support for the macintosh, dragging files from the Finder to the Squeak window is now supported.\\\n- sqMacDragDrop.c added\\\n- sqMacWindow.c changed\\\n\\\n(d) Added primitive for get macintosh creator and file type.\\\n- sqMacDirectory.c changed\\\n\\\n(e) Carbon support. Thanks to Karl Goiser karl@wattle.net for work he did on sound and other Carbonization hotspots.\\\n- sqMacAsyncFilePrims.c changed\\\n- sqMacFFIPPC.c changed (not supported for Carbon)\\\n- sqMacNetwork.c changed per Apple tech note 1173 Carbon asset tracking\\\n-sqMacSerialAndMIDIPort.c chnaged (Not supported for Carbon)\\\n- sqMacSound.c changed per Apple tech note 1198 Carbon double sound buffer playing\\\n- sqMacWindow.c changed (various changes for Carbon)\\\n\\\n(f)  Poll at least 60 times a second for the mouse if required. Previous 2.9.x VM did it 30 times but this is too slow and 2.8.x VM do it 60 times a second.\\\n\\\n(g) Reworked path support Thanks to Karl Goiser karl@wattle.net for starting this.\\\n- sqmacDirectory.c changed reworked lookupPath\\\n- sqMacWindow.c changed, added GetApplicationDirectory to get application directory\\\n\\\n(h) I rewrote the sqMacDirectory.c logic to enable proper understanding of Apple's Alias logic. This means for example you can alias the \"SqueakV3.sources\" file and then only have one copy and have all your images point to it. \\\n\\\n(i) Added Zoom Window support.\\\n\\\n(j) Change the Squeak change file icon to better match Apple's visual guidelines, Thanks to Doug Way for the suggestion and the new icons.\\\n\\\n(k) The sound plugins have changed...\\\n\\\n(j) Dropped FFI out of the base Squeak because of security concerns\\\n\\\n(k) Compiled for 750(G3) processor versus 603\\\n\\\n(l) Added screenDepth primitive\\\n\\\nThe 3.0.x VM contains most of the optional plugins, you might want to check this by inspecting \"Smalltalk listBuiltinModules\" to see where your plugins are coming from. In some case people have been accidentally overriding the new builtin plugins with older plugins. \\\n\\\nThe file \"Squeak 3.0Alpha10MT.sig\" contains the PGP signature for the Squeak 3.0Alpha10MT VM\\\n\\\nJohn M McIntosh  johnmci@smalltalkconsulting.com\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n}"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Documentation/3.7.1 Release Notes.rtf",
    "content": "{\\rtf1\\mac\\ansicpg10000\\cocoartf102\n{\\fonttbl\\f0\\fnil\\fcharset77 Geneva;\\f1\\fswiss\\fcharset77 Helvetica;\\f2\\fnil\\fcharset77 LucidaGrande;\n}\n{\\colortbl;\\red255\\green255\\blue255;\\red26\\green26\\blue255;}\n\\margl1440\\margr1440\\vieww17300\\viewh12720\\viewkind0\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0\\fs24 \\cf0 Mac VM 3.7.1 mach-o build for Carbon, and build for Classic. Support for Croquet, and support for Safari\\\nFeb 18th, 2004 (3.7.2b1)\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets. (Yawn, someday)\\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\n\\\nNotes About previous VM.\\\n3.2.6 VM classic have an issue when the tickcount clock goes over 0x7FFFFFFF, about 24 days. \\\nThis exhibits itself when Squeak won't accept user input, or allow you to switch under os 9 or earlier after 24 days,\\\nor starting a Squeak image hangs during the initial screen painting.\\\nRestarting the mac solved these problems. Force quitting Squeak does not.\\\nThis is fixed in 3.2.7b3\\\n\\\nSome issues with alias files and folder were fixed in 3.2.7b6 and 3.2.8b3\\\nYou need 3.5.3b1 for Safari plugin support\\\n3.6.1 seems a fine VM, from what people tell me, but now we've 3.7.2...\\\n\\\n3.7.2b1 \t\t\tChanges for NPSqueak to fix issues with full screen mode under Safari 1.2 (V125) \\\n\t\t\t\tUsage of VMMaker3-7b2 to build interp.c\\\n\t\t\t\tUnicode values now come up from the classic VM versus the historical (1984) keycode values, this makes Tweak work.\\\n\t\t\\\n3.7.1b2\t\t\\\nJPEG READER WRITER\\\n\t\t\t\tusage of Apple '-fast' uncovered a source code issue, initialization routines for internal jpeg plugin were not returning true or false, before this was kinda of considered as true. But when compiled with -fast it's zero, meaning the inialization failed, but that is bogus.\\\n\\\n3.7.1b1\\\n\t\t\t\tUse of \"-fast\" apple gcc 3.3 compiler option, improves sends by significant %\\\n\t\t\t\t\n\\f1 On EventKeyUp/EventKeyDown you get the UniCode On EventKeyChar you get the UniCode->MacRoman translated character.\\\n\t\t\t\tBroke high bit ascii macroman in 3.7.0bx.\\\n\t\t\t\tFor multi-byte character input you get EventKeyDown/EventKeyChar/EventKeyUp for each unicode character coming from the input sequence.\\\n\n\\f0 \\\n3.7.0b2\t\t\\\n\n\\f1 \t\t\t\ta) You can alter the application's Info.plist by setting the SqueakEncodingType using the ICANA readable names\\\n\\\n\t\t\t\tmacintosh\t- >macRoman\t\\\n\t\t\t\tUTF-8\t\t-> UTF-8\\\n\\\n\t\t\t\tb) Support for sqSocketListenOnPortBacklogSizeInterface, which allows you to specify the interface to use for the listen should work both for os-x and os-9.\\\n\t\t\t\tc) Usage of VMMaker3-7a2.\\\n\t\t\t\td) Special change sets: make primitive point x/y internal, and slightly faster activate.\\\n\n\\f0 \\\n3.7.0b1 \t\t\t\\\n\n\\f1 \t\t\t\t Changes for the \"m17n\" package fromTetsuya HAYASHI <{\\field{\\*\\fldinst{HYPERLINK \"mailto:tetha@st.rim.or.jp\"}}{\\fldrslt tetha@st.rim.or.jp}}> so one can type Kanji characters.\\\n\\\n\n\\f0 3.6.1b7\t\t\t\\\nSqMacWindow.c\tFix for new rending code when used with 2.8 or earlier images, mouse clicks reported in wrong place\\\n\\\n3.6.1b6\\\nSqMacWindow.c\tEnable 8bit all modes of 8 bit rendering\\\n\\\n3.6.1b5\\\nSqMacWindow.c\tEnable 8bit support for 8->8 8->16 8->32 \\\n\\\n3.6.1b4\\\nSqMacWindow.c\tFix issues with title bar height calculation, was using the wrong window region to do this. Also failed \\\n\t\t\t\tfor full screen usage. Tinkered a bit with ioDisplay moving bytes, now do <=32 bytes directly. \\\n3.6.1b3\\\nSqMacWindow.c\tAlter logic to allow for 16->32 and 32->16 mapping using direct copy logic. Workaround for \\\n\t\t\t\tos-x 10.3.0 copybits bug. Released for limited testing. Awaiting real fix from Apple.\\\n\\\n3.6.1b2\\\nSqMacWindow.c\tAlter to use unix direct port bit copy versus copybits to get around a crash caused by a bug\\\n\t\t\t\tin os-x 10.3.0 copybits. Released for limited testing\\\n\\\n3.6.0b2\\\nBuild from about to be offical 3.6.0 VM, Balloon & VM Maker source.\\\nAdded in \\\nArraysToGlobalStruct-JMM.1.cs\\\n\t?3.7 Status unknown, but makes better interp.c interpreter loop code (silly optimizer).\\\nFasterCopyLoop-JMM.4.cs\\\nFasterCopyLoopPart2-JMM.2.cs\\\n\t?3.7 Status unknown, but makes drawing 20%+ faster due to better PowerPC code optimizations\\\nFasterLookupMethod-JMM.1.cs\\\n\t?3.7 Status unknown, but makes method lookup a bit faster. \\\nMakePrimPointXInternal-JMM.1.cs\\\n\t?3.7 Status unknown, but makes point x/y access faster.\\\n\\\nSlightlyFasterActivate-JMM.3.cs\\\n\tRolled into 3.7\\\n\\\n3.5.3b1  (browser plugin)\\\nFixed issues with IE drawing and crashs related to screen updating in non-thread safe IE.\\\n\\\n3.5.2b6\\\nFixed issues with plugin discovery for netscape plugin \\\n3.5.2b5\\\nFixed primitive dispatch to use gnuified jump table. \\\n\\\n3.5.2b4 \\\nFix issue with race on open doc events and squeak VM Thread for drag and drop support when starting squeak\\\nFor os-x expose primitivePluginBrowserReady, not the rest of the URL browser primitives, they don't work in Safari\\\nFor system attribute 1003 return powerpc versus PowerPC to match unix VM\\\nStart timers later in the VM startup logic, after reading the image, versus before.\\\nsqMacNSPlugin.c \t- Look for Squeak folder in User, local, Network, System domains versus just User.\\\nsqMacTime.c\t\t- Use old delay logic (1ms accurate), versus aioPoll (10ms accurate).\\\nsqMacUIEvents.c\t- Only create PowerManagerDefeatTimer tick routine if power manager tapping is required which is only os-9 anyways.\\\nsqMacUIMenuBar.c - Draw menu bar later in startup, after we change it, save 200+ms\\\nBitBltPlugin.c\t\t- alphaSourceBlendBits16  Use table lookup which is 90% faster\\\n\t\t\t\t- copyLoopNoSource, roll constants into register versus recalculating.\\\n\\\n3.5.2b2 \\\nFix applescript document handling logic to prevent overrunning the drag/drop logic via the command line open cmd by using a spin loop\\\nto ensure Squeak has sufficent time to read the file name. \\\n\\\n3.5.2b1 \\\nChanged the bitBlt copyloop logic to use locals in safe places, versus globals. This improves drawing by 5%.\\\nMajor change is usage of GCC 3.3, versus GCC 2.95.x This increases send/second by about 8%.\\\n\\\n\\\n3.5.1b5 Added some more user changeable attributes, and changed some window behaviour when floating\\\nOS-x Version only \\\nSqueakWindowHasTitle\t\t- (Yes/No) yes if window should get title.\\\nSqueakFloatingWindowGetsFocus (Yes/No) yes if window should allow click and type if floating.\\\nSqueakMaxHeapSize\t\t- (Number) set to 512K, max size for os-x memory heap. Note changing this to 1GB may or may not cause a \\\n\t\t\t\t\t\tcore dump depending on where os-x allocates the memory segment above or below the 2GB boundary. \\\n\\\nsqMacUIEvents.c\t\t\t- set keyboard focus to floating window if required, do not hide floating window when we go to full screen mode.\\\nsqMacWindows.c\t\t\t- watch out for memory leak when we free the color table. \\\n\\\n3.5.1b4 Please note the major changes to network code in 3.5.1b2\\\na)Added options SqueakWindowType & SqueakWIndowAttributes to info.plist. The SqueakWindowType of 6 is the standard document window, a type of 8 is the floating utility window. The attributes control with window attributes and behavior according to\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f1 \\cf2 \\ul \\ulc2 http://developer.apple.com/techpubs/macosx/Carbon/HumanInterfaceToolbox/WindowManager/Window_Manager/wind_mgr_ref/constant_2.html#//apple_ref/c/tdef/WindowAttributes\\\n&\\cf0 \\ulnone \\\n\\cf2 \\ul http://developer.apple.com/techpubs/macosx/Carbon/HumanInterfaceToolbox/WindowManager/Window_Manager/wind_mgr_ref/constant_1.html#//apple_ref/doc/c_ref/WindowClass\\cf0 \\ulnone \\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 b) Sockets are not valid if the network is not initialized. \\\nc) The os-9 vm can return the open file error in the vm attribute data 1202\\\nd) MyWindowEventMouseHandler was leaking region handles.\\\ne) Support for primitiveClosureValue, primitiveClosureValueWithArgs, primitiveExecuteMethod\\\nf) when rootTableCount  goes > 2400 then allocationCount gets allocationsBetweenGCs + 1 \\\ng) BitBlt Alpha Blending has changed\\\nh) Added primitiveWrite24BmpLine\\\ni) The guard if statement for primitiveSerialPortRead was flawed, noted the buffer overflow, but then proceeded, versus returning. \\\n\\\n3.5.1b3 \\\na) Fix, Stephane Ducasse <ducasse@iam.unibe.ch> pointed out that using a virtual desktop we had a crash in ioSetFullScreen. This \\\nwas due to a pthread race condition between the UI thread and interp.c. Fixed by using UI callback to handle fullscreen window/move/resize.\\\n\\\n3.5.1b2\\\na) Switch to aio.h logic and unix socket logic! This is a MAJOR change!!!!\\\n\\\nb) Call aioPoll  (select()) to cause process wait versus old pthread logic. This follows in the footsteps of the unix port. You should verify that \\\ncpu time when squeak is idle is not affected in a dreadful manner.\\\nc) Fix, if you call does this directory exists on a file now you will get an error which will signal that the directory does not exist. This ensures\\\nthe FileDirectory test suite works. \\\nd) Fix, if you quit the browser plugin, check the status of the pthread_cancel before attempting the pthread_join\\\n \\\n3.5.1b1 limited distribution\\\n\\\n3.5.0b4 \\\na) os-x exposed an issue with EToyPeerToPeer support. It seems under os-x we get the connect, data, close so fast on lans that by the \\\ntime we get around to asking for the remote IP address the connection is closed, and our open transport call fails. We change SqMacNetwork.c to \\\nreturn the IP address discovered at connect time in this case. Under os-9 we never saw this behavior because we suspect the network activity \\\nwas slower and more serialized. \\\n\\\n3.5.0b3 (Safari support)\\\n\\\na) The plugin logic was changed to support Safari and better support os-x. This required building a CFM stub to load the mach-o compiled\\\nNSPLugin. The mach-o plugin now uses a pthread for the interp.c loop. This gives much better performance and user UI feedback. \\\nb) The GC logic was carefully reworked to optimize the assembler on the ppc. This gave us upwards of a 30-50% improvement, since \\\nincremental GC is going on all the time, this change actually has a effect you can see say in the solitaire example where we save 10%. \\\nc) sqMacNetwork.c was modified, first change in many years. The remote address and port number are requested as an async operation. \\\nThe operation times out after a few milliseconds. This was never a problem in os-9. Now it seems there is an issue sometimes for DHCP clients\\\non os-x. There the operation can timeout and return 0 as the address or port. We changed the call to do a sync operation to avoid a timeout.\\\nd) sqMacMain.c was modified to allow for pthreads for mach-o netscape based squeakland plugin support\\\ne) sqMacMemory.c changes for mach-o plugin support\\\nf) sqMacTime.c changes for  mach-o plugin support\\\ng) sqMacUIEvents.c changes for mach-o plugin support\\\nh) sqMacWindow.c changes for mach-o plugin support \\\ni) npmac.cpp now this is a netscape glue routine, I changed it to ensure we can see the entry points, originally they are C++, but need \\\nto be \"C\" so the loader can find the names the CFM glue routine is looking for. Also we add the logic TV2FP to setup the mach-0 to CFM code stubs to allow the mach-o plugin to callback to the CFM stubs in Safari. \\\nj) sqMacNSPlugin.c \\\n\t1) Rearrange when the interpret() thread is started to ensure a race condition doesn't happen.\\\n\t2) use Pthreads for the mach-o osx version. \\\n\t3) rework NPP_SetWindow to start interpret() when needed. \\\n\t4) Alter StartDraw, EndDraw to use a mutex lock and handle os-x port locking to prevent races between pthreads.\\\n\t5) Alter ioShowDisplay, optimization and handle os-x\\\n\t6) fix ioSetFullScreen to make it work on Safari\\\n\t7) fix OpenFileReadOnly to make it work on os-x, needed sqFileNameFromStringOpen macro call\\\n\t8) Alter ExitCleanup to mutex lock to prevent race ending issues, and add a bit more cleanup\\\n\\\n\\\n\\\nNote some versions of 3.4.1 were distributed for testing only, these are superseded by 3.5.0\\\n\\\n3.4.0b2 (Croquet support)\\\n\\\na) Ensure vmVersion information reports correct information, was bogus in 3.4.0b1\\\n\\\n3.4.0b1 (Croquet support)\\\na) Added plugin BMPReadWriterPlugin 14 November 2002 (i)\\\nb) B3DAcceleratorPlugin.c gets primitiveCreateRendererFlags (new api)\\\nc) two more op codes get added to BitBltPlugin (fixAlphawith, pixClearwith)\\\nd) Squeak3D gets (b3dOrthoNormInverseMatrix, b3dTransformDirection,b3dTransformPoint,b3dTransposeMatrix)\\\ne) The scroll wheel mouse logic was using apple cmd key as the modifier on the arrow key events, Other platforms use the Control key. So the \\\nmac falls in line (changed to use the control-key)\\\n\\\n3.2.8b9\\\na) recompiled os-x version, 3.2.8b8 seem to have a bad compiler option and gave 20% less performance.\\\n \\\n3.2.8b8\\\na) exposed \n\\f1 vmParameter\n\\f0  24 & 25 which control how memory is allocated/freed \\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f1 \\cf0 Smalltalk vmParameterAt: 24 put: 48*1024*1024.\\\nSmalltalk vmParameterAt: 25 put: 24*1024*1024.\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 b) Added argv,argc, env variables to main\\\nc) Fixed for Jaguar 10.2. Full screen mode cmd-tab broke menu bar hiding, this is a 10.2 bug\\\nd) Added support for IP_ADD/DROPMEMBERSHIP and the ability to bind to the wild card port (0).\\\ne) OpenGL changes for TEA\\\n\\\n3.2.8b7 was testing release and not distributed to the public.\\\n3.2.8b6 was testing release and not distributed to the public.\\\n3.2.8b5\\\na) Oops broke the logic returning the vmversion information in classic. Also incremented os-x version (which was fine) to keep numbers in sync\\\n\\\n3.2.8b3 The squeak.sourceforge.net CVS tree was reorganized and the project builder project revamped. The \\\nmajor change to the source was upgrading the netscape browser plugin to 3.2.7b6 levels.\\\n\\\na) Gnunifer.3.cs Changed to add register var on FOO_REG and to remove sqGnu.h file embedded in method.\\\nb) sqMacDirectory.c Add logic to handle case of building as CFM carbon plugin under CW6, needed some carbon calls\\\nc) osExports.c needed to ifdef out the getUIToLock entry point (not available as CFM carbon browser plugin)\\\nd) sqMacFileLogic.c Fix alias problem. Add logic to deal with path names as CFM carbon browser plugin, ensure vmPath is correct.\\\ne) sqMacImageIO.c Cast to get rid of warning message\\\nf) sqMacMain.c Cast to get rid of warning message, Check for CFM Carbon and bundle check. Revise vm parm 1201 code to return long file names are ok as CFM carbon browser plugin. Some diagnostic routines for printing to the console as CFM carbon browser plugin.\\\ng) sqMacMemory.c Logic change as CFM carbon browser plugin.\\\nh) sqNSPlugin.c\tFix to beginFullScreen logic (carbon call is broken?)\\\ni) sqMacUIEvents.c Remove getUIToLock dummy call. This entry point should only exist for mach-o carbon builds. Not CFM carbon browser plugins\\\nj) sqMacWindow.c  Use old call to create window when a CW 5 carbon application.\\\nk) sqPlatformSpecific.h Change #ifdef to correct logic error when building as CFM carbon browser plugin under CW 5.\\\n\t\\\n\t\\\n\\\nMay 31st, 2002 (3.2.7b6)\\\nFor 3.2.7\\\n\\\n3.2.7b3 We build the VM using patchs to enable globals as a structure. This improves performance by 10%\\\n\\\na) Classic Vm builders might need to add \"struct foo *foo = &fum; \"  to int interpret(void). \\\nb) readme: add notes about changesets and alter build instructions\\\nc) sqMacFileLogic.c: use accessors for interp.c globals\\\nd) sqMacMain.c: use accessors for interp.c globals. Also Alain Fischer added logic to fetch os-x version number and to enable you to put squeak.image in the resource folder for autostarting.\\\ne) sqMacTime.h: Fix busted lowresclock again. After 24 days of mac uptime, 3.2.6 squeak will hang.\\\nf) sqMacUIEvents.h: use accessors for interp.c globals.\\\ng) sqPlatformSpecific.h: alter sqFTruncate to use fileno() as needed.\\\nh) sqMacWindow.c: use accessors for interp.c globals.\\\ni)  3.2.7b5 sqMacFileLogic.c: change vmpath to resolve to classic VM if vm is moved from MacOSClassic folder\\\nj) Misc changes for Netscape plugin support\\\nk) Introduce osExports.c logic\\\nl) 3.2.7b6 Fixed a problem in path name resolving need to use UTF8 to properly interact with high ascii characters\\\nm) 3.2.7b6 Fixed a problem in path name resolving there was a bug with certain types of alias path name combinations in quick name resolving.\\\n\\\nMac VM 3.2.6 mach-o build for Carbon, and build for Classic.\\\nMarch 14th, 2002\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f2 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\nNotes About previous VM.\\\n3.2.6b6 Classic or earlier has a bug that makes it stop collecting user input on a 19.88 hour cycle depending on reboot time.\\\n\tSeems many systems don't run for more than 19 hours so we've not had major complains about this issue. \\\n\tBug was introduced in 3.2.1.\\\n3.2.5 has a bug that prevents the use of accented characters without \\\n\ta image patch to fix a VM issue (not an issue in 3.2.4). Also you can't enter an double keystroke characters, ie ^ \\\n\twhich makes life difficult. It also does not support the AppleScript Plugin (not an issue in 3.2.4)\\\n3.2.4 a bug in project builder introduced a performance problem (bad compiler options).\\\n\\\nSee the 3.2.5 about why this 3.2.6 is different inside.\\\n\\\nFor 3.2.6:\\\na) Change an internal number that dictates how often pending interrupts should be looked at from 5ms to 3ms This improves \\\ndelay accuracy.\\\nb) Change how sleeping is done when squeak is idle. This reduces CPU consumption, and improves Delay accuracy.\\\nc) Fix bug with high bit problem with keyboard (accented characters are ok now)\\\n  c2) 3.2.6b6 has fixed characters that require multiple key strokes to enter.\\\nd) Externals that make UI interactions (IE AppleScript) Must now make a call back to the VM to schedule\\\n    the main thread to do the call that will invoke UI interaction to prevent a deadlock in Carbon between threads. \\\n   See the OSAExecute call in the AppleScript plugin for details.\\\ne) If you run a classic mac VM more than 23.x days nonstop it will stop responding to UI events.  Ensure clocks get anded with 536870911.\\\nf) signal inputSemaphoreIndex because we are mulithreaded. Not that it does anything for us yet...\\\ng) 3.2.6b6 Pass the unicode value of the keystroke up as the EventKeyDown/EventKeyUp data, versus mackeyboard code.\\\nh) Somewhere there is a bug with mktime + time, so use the unix code of time+localtime+gmt \\\ni) Change iorelinquishPrcessorForMicroseconds to sleep the quatum between now and wakeup time. Also schedule a\\\n   check for interrupts if wakeup time is now or in the past. This improves delay accuracy. For OS-x this was a big deal,\\\n   for os-9 it improves things by 1 or 2ms. Also in  os-x we sleep more when idle so CPU usage goes down.\\\nj) On OS-9 umap AND free the VM backing store. Just doing the free doesn't work and you lose 128Mb of disk space until you reboot\\\nk) 3.2.6b7 for post event processing ignore mouse move/drag/or scroll wheel events. These are ignored by the open/gl plugin and only suck a major amount of CPU time to process in the post event processing logic. \\\nl) 3.2.6b8 (3.2.6b4 classic) removed call to uncouple shift keys introduced in 3.2.1. This causes some macs after sleeping not to respond to keyboard input\\\nm) 3.2.6b8 (3.2.5b7 classic) added function for ioLowResMSecs to avoid early bit overflow. Rework clock checking in ioHandleEvents to handle clock rollovers properly.\\\n\\\nMac VM 3.2.5 mach-o build for Carbon, and build for Classic.\\\nMarch 4th, 2002\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f2 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\n\\\nBeware this version of the VM is significantly different inside! \\\n\\\n\\pard\\tx1440\\tx2880\\tx4320\\tx5760\\tx7200\\ql\\qnatural\n\n\\f1 \\cf0 a) Broke sqMacWindow.c into 10 different files by function type.\\\n\\\nb) Moved most of the memory allocation logic out of sqMacMain.c into sqMacMemory.c. and ensure memory is freed when Squeak is terminated. \\\nThe major change in this code is support for OS 9.x virtual memory mapping. This only applies to Mac OS 9.2.0 or higher, excluding os-x. It appears  Mac OS 9.1 has a bug that prevents this feature from working.\\\n\\\nFor images that require less than 128MB of memory, mapping is used to allow the image to grow/shrink to the 128MB boundary, therefore you can change the application memory size to about 2MB. \\\n\\\nFor images that require more than 128MB then change the application memory size to > 128MB and mapping will not occur. \\\n\\\nIf mapping is not available because virtual memory is turned off or the api is not supported by the macintosh OS then mapping is not used. Note that mapping is not support under the classic os-9.x environment under OS-X, however in this case you should be using the OS-X version of Squeak, not the classic version.\\\n\\\nc) Use of Carbon event logic for OS-X only. This is a major structural change. \\\n\\\nIt also encouraged the use of a pthread for interp.c. \\\n\\\nAll user interaction with the VM follows a new code path, so problems with keyboard or mouse input should be reported asap. Also any issues with application switching, windows being brought to the foreground or sent to the background and usage of the full screen logic should be reported asap.\\\n\\\nAs part of this change I have build in support for scroll-wheeled multi-button mice under os-x. Thanks to Doug Way for testing this for me. Maybe someone can post to the list what their favorite 3 button scroll wheeled mouse/trackball is.\\\n\\\nd) Use of a carbon call to get the dominate Device if you have multiple screens. People with multiple screens should confirm window resizing, full screen on/off works as expected.\\\n\\\ne) Corrected comment in sqMacFileLogic.c\\\n\\\nf) Changes to sqMacNSPlugin.c. This makes it compile, but it's not usable yet.\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 \\\n\\\nFeb 20th 2002 3.2.4\\\n\\\nFor this version of the VM I have migrated towards using OS-9 packages. This allows us to provide one \\\nfolder/package that supports os-x and previous operating system versions.\\\n\\\nGiven Squeak 3.2.4Beta1.app\\\nThe classic VM is found in the *.app:Contents:MacOSClassic, with an alias in *.app:\\\nThe mach-o OS-X VM is found in *.app.Contents:MacOS\\\n\\\nIf you are running OS-9 then clicking on the *.app or doing drag and drop will just run Squeak, same applies for OS-X.\\\nIf you are running OS-7.5.5 or OS-8.x then the *.app package will appear as a folder, just open and click on the alias within. \\\nNote that if you want to use classic plugins I suspect you need to put them in the MacOSClassic Folder beside the VM. \\\nBundles for os-x go in the same location as the *.app application package.\\\n\\\nChanges\\\na) Drag and drop at open time with image file that has no meta type, will now open the image, versus prompting you.\\\nb) Use an os-x window attribute at open time to signal that the window should not be moved by the dock when you go to full screen.\\\nc) Fix window update logic to use window that needs updating versus stwindowg to fix issues with print dialog windows in classic. \\\nd) bitblt gets recompile to pickup fixes posted in 3.2 update stream.\\\n\\\nFeb 5th 2002 3.2.3\\\nChanges\\\n\\\na) use old extended time manger to update psudeo-TickCount, versus sigalrm. siglarm make sound recording not work.\\\nb) fiddle with sound recording and make it work.\\\n\\\nJan 2002 3.2.2\\\nChanges:\\\n\\\na) AsyncFilePlugin.c Use global to remember security function entry point for performance reasons\\\nb) FilePlugin.c\tUse global to remember security function entry point for performance reasons\\\nc) interp.c Use squeakFileOffsetType versus off_t and add a bunch of checks to handle lack of long long and conversion errors between 64/32 bit integers and LargeInteger objects\\\nd) readme, it's http://www.mucow.com/Gnuifier.1.cs \\\ne) SocketPlugin.c\tUse global to remember security function entry point for performance reasons\\\nf) sq.h added default sqFilenameFromStringOpen and sqTruncate\\\ng) sqFilePluginBasicPrims.c revert to anti specs, but ensure #def to fseeko and ftello for 64 bit aware file systems.\\\nh) sqMacDirectory.c A bit more error checking on bad file names\\\ni) sqMacFileLogic.c Folders size is now zero in classic, and a bit more checking on bad file names\\\nj) sqMacSound.c Fixed a problem with sound recording in classic due to a change made in Sept. But sound recording still does not work under os-x\\\nk) sqMacWindow.c  two very important changes:\\\n\\\n\t1) You can now do FFI calls with the FFI bundle plugin to Mach-o frameworks. \\\n\tHowever you need to rework your api calls. For example:\\\n\tapiGetMousePoint: aMacPoint was\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'InterfaceLib'>\\\n\tIt now is:\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'Carbon.framework'>\\\n \t\\\n\tIf you review /System/Library/Frameworks I'm sure you can come up with interesting ways to \\\n\tmake mac only squeak images.\\\n\t\\\n\tI now use map( NULL, gMaxHeapSize, PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED,-1,0);\\\n\tanonymous memory mapping to 512MB as the squeak memory block. The VM can then grow or shrink\\\n\twithin the 512MB block, I just move a pointer. \\\n\t\\\n\tNote in 3.2.1 a slight error on my part restricted Squeak to 50MB. I am of course\\\n\tinterested to hear about issues with my choice of 512MB. Note a Squeak VM is limited to 2GB under perfect \\\n\tconditions, however if any part of the image crosses the 2GB boundary the VM will fail, right now 512MB\\\n\tseemed a safe choice.\\\n\t\\\n \tPhysMem:  60.2M wired, 78.6M active,  412M inactive,  551M used,  217M free\\\n\tVM: 3.03G + 55.3M   7847(0) pageins, 1(0) pageouts   \\\n\tPID COMMAND      %CPU   TIME   #TH #PRTS #DREGS RPRVT  RSHRD  RSIZE  VSIZE\\\n\t422 Squeak VM    0.8%  0:35.59   2    71   100  23.3M  8.53M  26.5M   571M\\\n\\\n\tbut I only have one 80,000,000 byte swap file in /var/vm\\\n\\\nNote if you turn crash reporter on, then if the VM crashes a nice report should be generated in your log directory.  See the Apple documentation for a description of this feature, currently it is set in OS-X 10.1.x via the preferences window for the Console Application. If you have a crash with this VM, please recreate and post the crash log (found in Users/foobar/Library/Logs/ to the Squeak mailing list so we can continue to make the VM fault tolerant.\\\n\\\n3.2.1 Notes\\\n\\\nYou might need these change sets to build a new VM or to use all the features of this VM with your image, hopefully these will get into the pending 3.2.x image.\\\n\\\nFixes and feature extensions.\\\nAsyncFileFixFu...hName-JMM.1.cs \tfix for async test method.\\\nDragAndDropAtStart-JMM.5.cs\t\tfix to enable drag and drop at startup\\\n\\\nNeeded to compile a VM with VMMaker\\\nLargeFiles-JMM.3.cs\t\t\t\tEnable large file support, files > 2GB\\\n\\\nNeeded to turn this feature on\\\nMacLongFileName-JMM.5.cs\t\t\tEnable long file names on the mac\\\n\\\nThe SUnit\\\nMacLongFileNamesSUnits-JMM.3.cs\tTest long file names and long directory names and large file support\\\n\\\nKinda optional features some people might need.\\\nInternetConfiguration-JMM.5.cs\t\tAllow internet configuration information access, internal plugin\\\nUUID-JMM.3.cs\t\t\t\t\tAllow UUID generation, internal plugin\\\n\\\na) The ability to get back a UUID. This uses the hosting UUID generator if the\\\n hosting OS supports it and we have a primitive we can call. If not then we generate\\\n a type 4 version of a UUID (the random bits one).\\\n(This requires a special change set)\\\n\\\nb) Ability to start squeak on the mac by dragging multiple documents onto the\\\nimage, or drag and drop of stuff onto the running VM icon.\\\n(This requires a special change set)\\\n\\\nc) Usage of the Internet Configuration tool kit to supply information about\\\nwhat the mac proxy is etc. etc.\\\n(This requires a special change set)\\\n\\\nd) Migrate file system to use 64 bits. This allows you to read/write and seek\\\nwith files > 2 GB. This includes a change to the VM to convert from/to long\\\nlong integers. It also allows the file system to actually deal with 2GB files,\\\nthe current file interface actually fails once the file exceeds 1GB.\\\n\\\ne) For the carbon based Squeak VM we now support long file names 255\\\ncharacters. Close both eyes and touch everywhere the mac VM deals with file\\\nname paths and hope for the best (Actually we write an Sunit to ensure we've\\\nnot broken everything). This also includes the ability to put an image in a\\\nlong file name directory, but right now the image name must stay under 32 characters.\\\n\\\nFilePlugin.c changes to support large integers.\\\nFilePlugin.h changes\\\nsq.h changes to support large files.\\\nsqConfig.h changes to resolve some conflicts.\\\nsqFilePluginBasicPrims.c  changes to support large files.\\\nsqMacAsyncFilePrims.c changes to use fspec versus 255 file path.\\\nsqMacDirectory.c changes to use hosting OS (OS-X) bsd create and delete directory\\\n and truncate. dir_look changes as part of the general rewrite.\\\nsqMacDragAndDrop.c use new call to get path name from fsspec. Use fsspec more, and added \\\n  interface code to setup drag and drop of items at application startup time. max document name\\\n  goes to 1000 characters.\\\nsqMacFileLogic.c Mostly rewrote!\\\nsqMacSecurity.c use new file calls.\\\nsqMacWindow.c \\\n\tincrease size of vmpath, docpath, imagepath to 1000 chars, shortname to 255 characters.\\\n\tadd logic for left/right modifier keys \\\n\treworked LoadLibViaPath logic \\\n\tsqImageFileOpen uses fsspec versus 255 path name.\\\n\tsqImageFileStartLocation uses ffspec.\\\n\tbundle support for bundles\\\n\t\\\ne2) interp.c supports get/put of large integers to long long integers.\\\ne3) fixed fTruncate\\\n\\\nHint getting this to work was a pain. Think of 255 character folder names and nested aliases,\\\nfolder 1 refers to folder 2 which then refers to folder 1 again, just go down the path say 8 times,\\\nthen ask to create a file or directory!\\\n\\\nf) Support to change the Mac screen resolution under Squeak control.\\\n\\\ng) Fix to unload/load the scrap at startup time to ensure the clipboard is\\\ncorrect when starting up the VM.\\\n\\\nh) Uncouple the shift key and left/right shift keys on old extended keyboard.\\\nAlso add a call to get which keys are currently pressed on a USB keyboard or\\\nthe USB codes for an apple non-usb keyboard. (Note this isn't working quite yet under OS-X)\\\n\\\ni) Changes to enable us to compile the VM under Apple's OS-X Project Builder\\\nenvironments.\\\n\\\nj) Some rewriting to ensure serial and midi support can be written as external\\\nplugins.\\\n\\\nk) Fiddling to get sound input to work under OS-X\\\n\\\nl) Platform.exports changed macintosh to macintoshSqueak to avoid conflict.\\\n\\\nm) Memory is allocated at 50MB at start, then will grow or shrink, verus previous carbon apps\\\n that did 1GB. \\\n \\\nn) sqPlatformSpecific.h changes to support long file names and os-x posix file names\\\n\\\no) sqVirtualmachine.c & sqVirtualmachine.h\\\n#if VM_PROXY_MINOR > 4\\\n\tVM->positive64BitIntegerFor = positive64BitIntegerFor;\\\n\tVM->positive64BitValueOf = positive64BitValueOf;\\\n\tVM->signed64BitIntegerFor = signed64BitIntegerFor;\\\n\tVM->signed64BitValueOf = signed64BitValueOf;\\\n#endif\\\n\\\nBeware this causes an interesting problem, if you compile plugins with VM_PROXY_MINOR now set to 5, then they will not work with older VMs. The solution is to define the VM_PROXY_MINOR in the plugin to the value that indicates what features it is using.\\\n\\\np) Changed to use ITimer logic as a 16ms lowres timer to improve performance\\\n\\\nq) Changed to use single thread, no thread manager.\\\n\\\nr) Changed to use lowres timer in checking for polling time to improve performance\\\n\\\ns) It should have faster startup times.\\\n\\\nt) It will hide the empty window at startup, then show the squeak window when required.\\\n\\\nu) It has a different menu structure.\\\n\\\nv) It does less I/O when navigating directories.\\\n\\\nThe macintosh 3.1Alpha1MT VM, Sept 24th 2001 \\\nThis VM was built with the base  3.1 image at change set #4347\\\nV3.1.1 at change set #4347\\\n\\\n\\\nWe go to V3.1.1 to indicate that the 3.1 VM is being used. In the past the 3.1 Image was used but some changes in the openGL logic makes  3.1 Vm and 3.0 image not quite work correctly with 3d graphics. Although a 3.1 VM will run many images way back to the 2x series no careful study has been done on the ability to do this. So at this point we are indicating this VM is a 3.1 VM and best used with a 3.1 image.\\\n\\\nUse of VMMaker to build VM. As of this version everything can be built as an external except for the window logic which hasn't been decoupled from the VM support for the macintosh. \\\n\\\n1) AsynchFilePlugin the security check for ability to create file is now a plugin call.\\\n2) B2DPlugin logic changes to fillLinearGradientfromtoat\\\n3) b3dRemapFaces, b3dRemapEdges, b3dRemapEdgeList, b3dRemapAET, b3dRemapEdgeVertices, b3dRemapFaceVertices, b3dRemapFaceFree, b3dRemapEdgeFree, b3dRemapAttributes. Some casting and changing of += to = + to make some compilers happy.\\\n4) BitBltPlugin added tableLookupat call.\\\n5) DropPlugin added setFileAccessCallback to allow the Security Module plugin the ability to give us the entry point to turn security off so we can open files as read only when security is turned on.  This was broken in the past. \\\n 6) FilePlugin added fileOpennamesizewrite,getThisSession to allow for callbacks. Changed the file security logic to use the plugin interface. \\\n7) interp.c, fixes for 4347ByteArrayRangeCheck-di, ability to printAllStacks, security calls for image rename, write to use plugin interface.\\\n8) Added GetAttributeString, and recordDragDropEvent and entry points for callbacks.\\\n9) SecurityPlugin changed when initialization is called to initialize the safe and unsafe directorys, also added entry points for all the testing calls so it can be a true plugin.\\\n10) Serialplugin. The serial plugin was redesigned to seperate out MIDI logic. People with MIDI devices and old serial macintosh should check to see if they still work since we lack equipment now to test this obsolete technology set.\\\n11) SocketPlugin. Make security calls true plugin calls.\\\n12 SoundGenerationPlugin. Removed \\\nEXPORT(int) SoundGenerationPlugin_primitiveFMSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveOldSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitivePluckedSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveWaveTableSoundMix(void);\\\nThey were a hack at the plugin level and discussion on the list seemed to show they were no longer used. \\\n13) Checking for if defined (__APPLE__) && defined(__MACH__) for the Mac OS-X native development environment\\\n14) Changed sqMacAsyncFilePrims, usage of interpreterProxy->, plugin calls for getThisSession. \\\n15) Changed sqMacDirectory.c. Removed some utility code and make it a seperate file so that it can be shared between sqMacWindow and other plugins that require them. \\\n16) Changed sqMacDragDrop.c. Added plugin callback for getSTWindow, the sqSetFileAccessCallback logic, fileOpennamesizewrite, and secHasFileAccess. Added logic to do the recordDragDropEvent callback to sqMacWindow.c \\\n17) sqMacNetwork.c. Some cleanup for the OS-X version of the OpenTransport headers, some constants have name changes\\\n18) sqMacNSPlugin.c Use of ioLoadFunctionFrom(NULL, \"DropPlugin\"); versus explicit call.\\\n19) sqMacOpenGL.c. Some cleanup for the OS-X version of the OpenGL headers\\\n20) sqMacOpenGLInfo.c. Some cleanup for the OS-X version of the OpenGL headers\\\n21) sqMacSecurity.c ioInitSecurity calls back to dragAndDrop plugin to set entry point to turn security off.  Added code to create directories if required and ensured callbacks are plugitized.\\\n22) sqMacSound.c Some cleanup for the OS-X version of the Sound headers. Use of interpreterProxy-> in the proper places.\\\n23) sqMacWindow.c Some cleanup for the OS-X version of the compiler.  Fixed saveAsEmbeddedImage, this got broken when we moved from a FAT to a ppc only application.  Altered interface to recordDragDropEvent so that it was plugable. Some file path name logic goes to a seperate C source file. The drag and drop plugin is loaded and intialized after the image is loaded but before the interpreter is started, before it was done a bit earlier in the startup process. This also has the effect of initializing the security module.\\\n24)sqOpenGLRenderer.c. Some cleanup for the OS-X version of the OpenGL headers\\\n25)SurfacePlugin.c gets a hack so it knows when it is internal versus external.\\\n\\\n\\\n\\\nv3.0.18 at change set #4081\\\n(Note browser plugin goes to 3.0.23\\\n\\\n1) sqMacOpenGL.c Quite a few changes were made to the code to support it as an internal plugin for the browser. This is because the drawable frame for a browser plugin is a subset of the browser's grafport, so lots more care must be taken to draw in the correct location using OpenGL. We also fixed issues with re-configurating the Open/GL draw area when the window gets resized or goes to full screen, and attempted to ensure multiple screens will work.\\\n\\\n2) sqMacWindow.c, minor fix to cast a constant char * to char * for CW 6.1\\\n\\\n\\\nBrowser plugin 3.0.23 fixes\\\n\\\n1) Integerated the H/W Acceleration as an builtin plugin\\\n2) Added logic for pre and post event interaction to browser plugin event handler for H/W Acceleration logic. The external H/W Acceleration plugin mostly works with the browser plugin but doesn't work with full screen mode, or if the plugin is embedded in a window or a scrollable frame, so don't use it. Use the browser plugin 3.0.23 or higher which has the H/W Acceleration builtin.\\\n\\\nv3.0.17 at change set #4081\\\n(Note browser plugin goes to 3.0.21)\\\n\\\n1) Added HW acceleration as internal plugin.\\\n2) 4079BBAlphaTextFix-ar Fixes the problem with alpha text, changes BitBltPlugin.c \\\n3) Added primitive on the mac to truncate a file.\\\n4) Added logic to flush volume on a flush file to ensure file and control blocks are flushed.\\\n5) For the Carbon VM we increase nextevent wait time if we get sufficent idle time. This should reduce CPU usage under OS-X\\\n6) GetAttribute: 1002 now returns the gestaltSystemVersion as a hex string, and getAttribute: 1003 now returns either '68K' or 'PowerPC'.\\\n7) Starting with 3.0.17 the VM is build only as a powerpc application. The latest VM as a 68K application will be made available from time to time permits based on people's needs. \\\n8) Changes to sqOpenGLRenderer.c to improve performance, OpenGL 1.1 support.\\\n\\\nPlugin 3.0.21 fixes\\\n\\\n1) added check for mailto: tag on posts to fix problem with Netscape crashing, and IE hanging.\\\n2) Plus above fixes.\\\n\\\nWhat has been fixed/changed.\\\nv3.0.16 at change set #4041\\\n(Note browser plugin goes to 3.0.20)\\\n\\\n1) Lots of fixes for BitBlt and HW acceleration.\\\n2) Hardware Acceleration plugin goes to 1.0.1. Please note there is a seperate plugin with the same name for Carbon. Doing a get info will identify if the plugin is only usable with Carbon Squeak.\\\n\\\nv3.0.15 at change set #4026 (May 17th test version)\\\n(Note browser plugin goes to 3.0.19)\\\n\\\n1) Added support for OpenGL HW acceleration plugin\\\n\\\nPlugin 3.0.19 fixes\\\n\\\na) Obey embedded tag plug\\\nb) Fix problem with plugin 3.0.17 not working with netscape 4.x\\\nc) Carbonize plugin for IE 5.1 \\\nd) Remove debugging printf than occurred on transition to full screen mode\\\n\\\nWhat has been fixed/changed.\\\nv3.0.14 at change set #3987\\\n\\\n(Note plugin goes to 3.0.17)\\\n\\\n1) sqMacDirectory.c. The pathlookup would handle the case of foo:bar::do incorrectly by ignoring the :: path redirection. This has been fixed. However a path lookup will not work if it contains :: and an aliased directory in the middle of the path.\\\n\\\n2) sqMacSecurity.c. The pathname for the untrustedUserDirectory was built incorrectly, and the bug mentioned above in sqMacDirectory.c usually kept this from being noticed.\\\n\\\n3) sqMacWindow.c  we added some logic to do the delay for primitiveRelinquishProcessor, but found it had an large effect on a freecell benchmark. I suspect on a Morpic step wait there is nothing to do so primitiveRelinquishProcessor gets called which then affects response time. So for now we revert to the 3.0.11 behavior, good performance and 100% CPU usage!\\\n\\\n4) GetAttribute 1004 returns returns interpreterVersion; which is for example\\\n\"Squeak3.1alpha of 6 February 2001 [latest update: #3987]\"\\\n\\\n5) When in full screen mode we now attempt to disable resizing, zooming, or moving the window. The window borders are hidden, but in the past it was feasible to grab an edge and alter it, thus confusing the VM.\\\n\\\n6) Worked on Carbonizing the browser plugin\\\n\\\n7) 3977 & 3978 FloatArray fixes. Makes float arrays go through a new (and working) version of #primitiveHash\\\n\\\n8) Fixed problem with accidental mouse clicks being triggered from pulldown menus on application switching.\\\n\\\n9)\\\n\"Change Set:\t\t3984 BitBltExtensions-ar\\\nDate:\t\t\t4 May 2001\\\nAuthor:\t\t\tAndreas Raab\\\n\\\nThe change set includes various extensions for BitBlt with the goal of migrating the useful features from FXBlt into the general BitBlt mechanisms. These include:\\\n\\\n* Handling of LSB and MSB forms:\\\nBitBlt now handles both, MSB and LSB forms (and their conversions). Only instances of Bitmap are assumed to contain big-endian pixels. All others are assumed to be little endian (reason is that we can only identify Bitmap here). Note that 'LSB' and 'MSB' refers to PIXELS, that is a 1bpp LSB form has its left most pixel in the lowest bit whereas a 1bpp MSB form has its left-most pixel in the highest bit.\\\n\\\nFor pixel depths < 8 this can be different from what your OS supplies (as an example, Windows bitmaps < 8 are big-endian pixels in little-endian words; we might call them 'middle-endian'). We simply don't deal with those - forms are either big or little endian but nothing inbetween.\\\n\\\nBitBlt has got an extra combination rule for swapping pixels in the destination form. This can be used to make byte swapping much more efficient (as soon as we've got more VMs with support for it).\\\n\\\n* Handling of 'native bitmaps' (aka surfaces):\\\nBitBlt is now able to deal with OS surfaces that are registered with the surface plugin.\\\n\\\n* Handling of full color maps:\\\nBitBlt has been extended to deal with instances of ColorMap in addition to the prior mechanism of using only indexed lookups and provide an implicit 16-32 bit color conversion. ColorMaps can specify both, a lookup table and an additional set of masks and shifts to apply during the color mapping operation. \\\n\\\nFour independent shifts and masks can be given which can be used for a lot more than just color conversion (as an example, one could do byte swapping with this; but see also BitBlt class>>exampleColorMap). \\\n\\\n* Better handling of default arguments:\\\nFor most of the required arguments for BitBlt very reasonable default assumptions can be made. This includes the destOrigin (0@0), clipRect (0@0 extent: destForm extent), sourceOrigin (0@0). BitBlt now substitutes these if they are absent (e.g., nil) in the instance provided.\\\n\\\n\"\\\n\\\n\\\nv3.0.13 at change set #3848\\\n\\\n1) sqMacSecurity was changed to set the unsecure directory to\\\n\tsystem folder:Preferences:Squeak:Internet:My Squeak\\\n\\\nv3.0.12 at change set #3848\\\n1) Fixed problem with creating My Squeak Folder in Documents Folder with System 8.6\\\n\\\nWhat has been fixed/changed.\\\nv3.0.11 at change set #3848\\\n\\\n1) sqMacDirectory had a bug when you resolved a path name. The fast resolve always failed, which invoked the slow resolver. Now the fast resolver works.\\\n\\\n2) sqMacSecurity was changed to set the unsecure directory to Documents:My Squeak. \\\n\\\n3) sqMacWindow was changed to fix some issues with Squeak capturing events from other applications and to reduce the number of duplicate mouse events that are generated. Also we capture modifier information  directly from the mouse and keyboard on null events to fix some problems with Carbon. We  hopefully fixed problems with mouse clicks from foreground applications being seen by Squeak and issues with the OS-X Dock clicks.\\\n\\\n4) sqMacNSPlugin was changed to use the above mouse/keyboard capture code which is much cleaner than the original fix for the bogus modifier information given to us by netscape on a null event. \\\n\\\n5) When you turn full screen off we now correctly reposition the window to the original location versus a few pixels to the left. \\\n\\\nWhat has been fixed/changed.\\\nv3.0.10 at change set #3848\\\n\\\n1) changed VM exception unwind logic\\\n\t3796-Exception-unwind-V3,tim@sumeru.stanford.edu, Paul McDonough, Stephen Pair and others\\\n\\\n2) Fixes for the JPEGReader plugin and for Jitter 3\\\n\\\n3) Added minimal Mac VM logic to assist in building a small VM.\\\n\\\n4) Changed how the browser plugin starts up. Now it starts the interpreter running only after getting the browser setwindow command. This seems to fix a race condition that resulted in a crash at startup time with Netscape 4.x\\\n\\\n5) Fixed broken full screen redraw on cmd-tab\\\n\\\n6) Fixed what looked like mouse-down, mouse-down, mouse-up sequence. Now reports mouse-down, mouse up.\\\n\\\n7) Added StarSqueak plugin as internal plugin\\\n\\\n8) Note the current Squeak Plugin should be gotten from the www.squeakland.org site.\\\n\\\nv3.0.9 at change set #3776, Boston Snow storm build.\\\n\\\n1) A number of changes were made to the interpreter:\\\n\ta) added primitive to change a class.\\\n\tb) added primitives to get or put 32bit integers\\\n\tc) Fix problem with GC and class reshaping\\\n\td) Better logic for method cache flushing\\\n\\\n2) Added JPEGReader plugin\\\n\\\n\\\nV3.0.8 at change set #3740\\\n\\\n1) The caps lock no longer maps to the shift attribute. So if the caps lock is down mouse clicks will behave normally. \\\n\\\n2) Numerous fixes for the BitBltPlugin plugin\\\n\\\n3) Memory allocation grow/shrink logic for Carbon was added.\\\n\\\n4) Spurious mouse clicks for the browser plugin has been fixed. (This took awhile to fix, I'm sure it's a bug with the Swedish version of Netscape)\\\n\\\n5) The browser plugin will attempt first to allocate memory from the browser heap, then the system heap. Most people when faced with a memory issue usually increase memory for the browser first. However memory for the plugin is controlled by an attribute in the EMBED HTML statement. \\\n\\\nV3.0.7\\\n\\\n1) A bug exists in pre OS 8.x that causes a crash in activate window if the standard get file \\\ndialog comes up before the Squeak Window. I remove the InvalWindow call found in that routine since it is actually redundant.\\\n\\\n2) The standard get file dialog on system 7.x would not terminate if you did a cancel.\\\n\\\n3) The InterfaceLib had to be weak linked to prevent CFM startup issues. \\\n\\\nV3.0.6\\\n\\\n1) Alias resolving is less aggressive.\\\n\\\n2) We no longer cache image reads or writes. This was done because OS 9.1 allows you to have very large disk caches, and it's pointless to cache the image read or write.\\\n\\\n3) The file flush primitive now actually flushes the file via an OS call. This was a bug in the CodeWarrior 5.3 source code.\\\n\\\n4) The 68K version was being built with the 68881 math library. This fails on 68040LC chips. We now use the non-68881 math library. Thanks to Bruce ONeel for find this.\\\n\\\n5) A bug was found in the path resolving logic that was added for 3.x. This bug apparently only affects 68K machines,  never was identified as a PowerPC issue. \\\n\\\n6) The Netscape plugin needs a properly allocated clip region, this code seemed to work ok on new systems, but fails on system 7.6.1\\\n\\\n7) The security interface will create a Documents folder on the root volume if the default Document folder has been deleted. This is needed for security purposes. \\\n\\\n8) Jitter needs 1MB of free memory to run.\\\n\\\n9) 68K machines require another 32K of stack\\\n\\\n10) Threads  now work on 68K machines, but turned off because of possible performance issues. (I think more study is needed).\\\n\\\n11) The 68K version was compiled with better optimization, expect a 15% improvement.\\\n\\\n12) fix for BitBltPlugin ascii = byteAt((sourcePtr + charIndex) - 1);\\\n\\\n13) The interpreter object validation checking code was alter to work correctly.\\\n\\\nV3.0.5\\\n\\\n1) sqConfig.h changed due to BE OS header changes\\\n\\\n2) sqMacDirectory.c. Added support for Navigation services or Standard File Get to find the image at startup time when the Squeak.image is not found by the VM. This replaces the DOS like console message that comes up saying that Squeak can't find a image.\\\n\\\n3) A fix to drag and drop for the browser plugin.\\\n\\\n4) We now use Apple's cooperative multithreading package to run the UI in one thread, the VM in the other. This solves some issues with the browser and makes the UI versus VM logic and execution responsibilities easier to understand. \\\n\\\n5) Changed the sqMacNSPlugin.c code to support a 3.0VM using multithreading support. This should give Squeak in a browser better performance. Also changed the full screen support to correctly work with multiple monitors.\\\n\\\n6) BitBltPlugin.c gets one more op code\\\n\\\n7) Added the security interface\\\n\\\n8) Added the file flush primitive\\\n\\\n9) Rewrote the macintosh readme file\\\n\\\n10) Revisited the zoomWindow code and found a bug with multiple monitor support, then I fixed the code to make Full Screen mode work on screen that Squeak window is mostly on, versus the menubar screen. Also if you switch from full screen back it resizes the window back to the orginal size and location before you invoked the full screen. \\\n\\\nV3.0.2\\\nPlugins\\\n\\\nRecompiled the internal BitBltPlugin plugin to encorporate:\\\nChange Set:\t\t258AlphaBlendOpt-dsm\\\nAuthor:\t\t\tDuane Maxwell, Paul Phillips/exobox\\\na) Short circuits full opaque and full transparent pixels when alpha blending.\\\n\\\nRecompiled the internal LargeIntegerPlugin\\\n3298LargeIntegersV1-2-sr -- Stephan Rudlof -- 29 November 2000\\\n3299LargeIntV1-2For29-sr -- Stephan Rudlof -- 29 November 2000\\\n\\\nVM Software\\\n\\\n(b) PowerManagement for macintosh is now supported. You can disable the power manager to give you better performance on some powerbooks at the expense of battery life. See the Preferences Panel for details, category 'Performance'\\\n- changed sq.h\\\n- changed sqMacWindow.c to add support for power mgr disabling\\\n\\\n(c) Drag and Drop support for the macintosh, dragging files from the Finder to the Squeak window is now supported.\\\n- sqMacDragDrop.c added\\\n- sqMacWindow.c changed\\\n\\\n(d) Added primitive for get macintosh creator and file type.\\\n- sqMacDirectory.c changed\\\n\\\n(e) Carbon support. Thanks to Karl Goiser karl@wattle.net for work he did on sound and other Carbonization hotspots.\\\n- sqMacAsyncFilePrims.c changed\\\n- sqMacFFIPPC.c changed (not supported for Carbon)\\\n- sqMacNetwork.c changed per Apple tech note 1173 Carbon asset tracking\\\n-sqMacSerialAndMIDIPort.c chnaged (Not supported for Carbon)\\\n- sqMacSound.c changed per Apple tech note 1198 Carbon double sound buffer playing\\\n- sqMacWindow.c changed (various changes for Carbon)\\\n\\\n(f)  Poll at least 60 times a second for the mouse if required. Previous 2.9.x VM did it 30 times but this is too slow and 2.8.x VM do it 60 times a second.\\\n\\\n(g) Reworked path support Thanks to Karl Goiser karl@wattle.net for starting this.\\\n- sqmacDirectory.c changed reworked lookupPath\\\n- sqMacWindow.c changed, added GetApplicationDirectory to get application directory\\\n\\\n(h) I rewrote the sqMacDirectory.c logic to enable proper understanding of Apple's Alias logic. This means for example you can alias the \"SqueakV3.sources\" file and then only have one copy and have all your images point to it. \\\n\\\n(i) Added Zoom Window support.\\\n\\\n(j) Change the Squeak change file icon to better match Apple's visual guidelines, Thanks to Doug Way for the suggestion and the new icons.\\\n\\\n(k) The sound plugins have changed...\\\n\\\n(j) Dropped FFI out of the base Squeak because of security concerns\\\n\\\n(k) Compiled for 750(G3) processor versus 603\\\n\\\n(l) Added screenDepth primitive\\\n\\\nThe 3.0.x VM contains most of the optional plugins, you might want to check this by inspecting \"Smalltalk listBuiltinModules\" to see where your plugins are coming from. In some case people have been accidentally overriding the new builtin plugins with older plugins. \\\n\\\nThe file \"Squeak 3.0Alpha10MT.sig\" contains the PGP signature for the Squeak 3.0Alpha10MT VM\\\n\\\nJohn M McIntosh  johnmci@smalltalkconsulting.com\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n}"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Documentation/3.7.2 Release Notes.rtf",
    "content": "{\\rtf1\\mac\\ansicpg10000\\cocoartf102\n{\\fonttbl\\f0\\fnil\\fcharset77 Geneva;\\f1\\fswiss\\fcharset77 Helvetica;\\f2\\fnil\\fcharset77 LucidaGrande;\n}\n{\\colortbl;\\red255\\green255\\blue255;\\red26\\green26\\blue255;}\n\\margl1440\\margr1440\\vieww17300\\viewh12720\\viewkind0\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0\\fs24 \\cf0 Mac VM 3.7.2 mach-o build for Carbon, and build for Classic. Support for Croquet, and support for Safari\\\nFeb 18th, 2004 (3.7.2b1)\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets. (Yawn, someday)\\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\n\\\nNotes About previous VM.\\\n3.2.6 VM classic have an issue when the tickcount clock goes over 0x7FFFFFFF, about 24 days. \\\nThis exhibits itself when Squeak won't accept user input, or allow you to switch under os 9 or earlier after 24 days,\\\nor starting a Squeak image hangs during the initial screen painting.\\\nRestarting the mac solved these problems. Force quitting Squeak does not.\\\nThis is fixed in 3.2.7b3\\\n\\\nSome issues with alias files and folder were fixed in 3.2.7b6 and 3.2.8b3\\\nYou need 3.5.3b1 for Safari plugin support\\\n3.6.1 seems a fine VM, from what people tell me, but now we've 3.7.2...\\\n\\\n3.7.2b1 \t\t\tChanges for NPSqueak to fix issues with full screen mode under Safari 1.2 (V125) \\\n\t\t\t\tUsage of VMMaker3-7b2 to build interp.c\\\n\t\t\t\tUnicode values now come up from the classic VM versus the historical (1984) keycode values, this makes Tweak work.\\\n\t\t\\\n3.7.1b2\t\t\\\nJPEG READER WRITER\\\n\t\t\t\tusage of Apple '-fast' uncovered a source code issue, initialization routines for internal jpeg plugin were not returning true or false, before this was kinda of considered as true. But when compiled with -fast it's zero, meaning the inialization failed, but that is bogus.\\\n\\\n3.7.1b1\\\n\t\t\t\tUse of \"-fast\" apple gcc 3.3 compiler option, improves sends by significant %\\\n\t\t\t\t\n\\f1 On EventKeyUp/EventKeyDown you get the UniCode On EventKeyChar you get the UniCode->MacRoman translated character.\\\n\t\t\t\tBroke high bit ascii macroman in 3.7.0bx.\\\n\t\t\t\tFor multi-byte character input you get EventKeyDown/EventKeyChar/EventKeyUp for each unicode character coming from the input sequence.\\\n\n\\f0 \\\n3.7.0b2\t\t\\\n\n\\f1 \t\t\t\ta) You can alter the application's Info.plist by setting the SqueakEncodingType using the ICANA readable names\\\n\\\n\t\t\t\tmacintosh\t- >macRoman\t\\\n\t\t\t\tUTF-8\t\t-> UTF-8\\\n\\\n\t\t\t\tb) Support for sqSocketListenOnPortBacklogSizeInterface, which allows you to specify the interface to use for the listen should work both for os-x and os-9.\\\n\t\t\t\tc) Usage of VMMaker3-7a2.\\\n\t\t\t\td) Special change sets: make primitive point x/y internal, and slightly faster activate.\\\n\n\\f0 \\\n3.7.0b1 \t\t\t\\\n\n\\f1 \t\t\t\t Changes for the \"m17n\" package fromTetsuya HAYASHI <{\\field{\\*\\fldinst{HYPERLINK \"mailto:tetha@st.rim.or.jp\"}}{\\fldrslt tetha@st.rim.or.jp}}> so one can type Kanji characters.\\\n\\\n\n\\f0 3.6.1b7\t\t\t\\\nSqMacWindow.c\tFix for new rending code when used with 2.8 or earlier images, mouse clicks reported in wrong place\\\n\\\n3.6.1b6\\\nSqMacWindow.c\tEnable 8bit all modes of 8 bit rendering\\\n\\\n3.6.1b5\\\nSqMacWindow.c\tEnable 8bit support for 8->8 8->16 8->32 \\\n\\\n3.6.1b4\\\nSqMacWindow.c\tFix issues with title bar height calculation, was using the wrong window region to do this. Also failed \\\n\t\t\t\tfor full screen usage. Tinkered a bit with ioDisplay moving bytes, now do <=32 bytes directly. \\\n3.6.1b3\\\nSqMacWindow.c\tAlter logic to allow for 16->32 and 32->16 mapping using direct copy logic. Workaround for \\\n\t\t\t\tos-x 10.3.0 copybits bug. Released for limited testing. Awaiting real fix from Apple.\\\n\\\n3.6.1b2\\\nSqMacWindow.c\tAlter to use unix direct port bit copy versus copybits to get around a crash caused by a bug\\\n\t\t\t\tin os-x 10.3.0 copybits. Released for limited testing\\\n\\\n3.6.0b2\\\nBuild from about to be offical 3.6.0 VM, Balloon & VM Maker source.\\\nAdded in \\\nArraysToGlobalStruct-JMM.1.cs\\\n\t?3.7 Status unknown, but makes better interp.c interpreter loop code (silly optimizer).\\\nFasterCopyLoop-JMM.4.cs\\\nFasterCopyLoopPart2-JMM.2.cs\\\n\t?3.7 Status unknown, but makes drawing 20%+ faster due to better PowerPC code optimizations\\\nFasterLookupMethod-JMM.1.cs\\\n\t?3.7 Status unknown, but makes method lookup a bit faster. \\\nMakePrimPointXInternal-JMM.1.cs\\\n\t?3.7 Status unknown, but makes point x/y access faster.\\\n\\\nSlightlyFasterActivate-JMM.3.cs\\\n\tRolled into 3.7\\\n\\\n3.5.3b1  (browser plugin)\\\nFixed issues with IE drawing and crashs related to screen updating in non-thread safe IE.\\\n\\\n3.5.2b6\\\nFixed issues with plugin discovery for netscape plugin \\\n3.5.2b5\\\nFixed primitive dispatch to use gnuified jump table. \\\n\\\n3.5.2b4 \\\nFix issue with race on open doc events and squeak VM Thread for drag and drop support when starting squeak\\\nFor os-x expose primitivePluginBrowserReady, not the rest of the URL browser primitives, they don't work in Safari\\\nFor system attribute 1003 return powerpc versus PowerPC to match unix VM\\\nStart timers later in the VM startup logic, after reading the image, versus before.\\\nsqMacNSPlugin.c \t- Look for Squeak folder in User, local, Network, System domains versus just User.\\\nsqMacTime.c\t\t- Use old delay logic (1ms accurate), versus aioPoll (10ms accurate).\\\nsqMacUIEvents.c\t- Only create PowerManagerDefeatTimer tick routine if power manager tapping is required which is only os-9 anyways.\\\nsqMacUIMenuBar.c - Draw menu bar later in startup, after we change it, save 200+ms\\\nBitBltPlugin.c\t\t- alphaSourceBlendBits16  Use table lookup which is 90% faster\\\n\t\t\t\t- copyLoopNoSource, roll constants into register versus recalculating.\\\n\\\n3.5.2b2 \\\nFix applescript document handling logic to prevent overrunning the drag/drop logic via the command line open cmd by using a spin loop\\\nto ensure Squeak has sufficent time to read the file name. \\\n\\\n3.5.2b1 \\\nChanged the bitBlt copyloop logic to use locals in safe places, versus globals. This improves drawing by 5%.\\\nMajor change is usage of GCC 3.3, versus GCC 2.95.x This increases send/second by about 8%.\\\n\\\n\\\n3.5.1b5 Added some more user changeable attributes, and changed some window behaviour when floating\\\nOS-x Version only \\\nSqueakWindowHasTitle\t\t- (Yes/No) yes if window should get title.\\\nSqueakFloatingWindowGetsFocus (Yes/No) yes if window should allow click and type if floating.\\\nSqueakMaxHeapSize\t\t- (Number) set to 512K, max size for os-x memory heap. Note changing this to 1GB may or may not cause a \\\n\t\t\t\t\t\tcore dump depending on where os-x allocates the memory segment above or below the 2GB boundary. \\\n\\\nsqMacUIEvents.c\t\t\t- set keyboard focus to floating window if required, do not hide floating window when we go to full screen mode.\\\nsqMacWindows.c\t\t\t- watch out for memory leak when we free the color table. \\\n\\\n3.5.1b4 Please note the major changes to network code in 3.5.1b2\\\na)Added options SqueakWindowType & SqueakWIndowAttributes to info.plist. The SqueakWindowType of 6 is the standard document window, a type of 8 is the floating utility window. The attributes control with window attributes and behavior according to\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f1 \\cf2 \\ul \\ulc2 http://developer.apple.com/techpubs/macosx/Carbon/HumanInterfaceToolbox/WindowManager/Window_Manager/wind_mgr_ref/constant_2.html#//apple_ref/c/tdef/WindowAttributes\\\n&\\cf0 \\ulnone \\\n\\cf2 \\ul http://developer.apple.com/techpubs/macosx/Carbon/HumanInterfaceToolbox/WindowManager/Window_Manager/wind_mgr_ref/constant_1.html#//apple_ref/doc/c_ref/WindowClass\\cf0 \\ulnone \\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 b) Sockets are not valid if the network is not initialized. \\\nc) The os-9 vm can return the open file error in the vm attribute data 1202\\\nd) MyWindowEventMouseHandler was leaking region handles.\\\ne) Support for primitiveClosureValue, primitiveClosureValueWithArgs, primitiveExecuteMethod\\\nf) when rootTableCount  goes > 2400 then allocationCount gets allocationsBetweenGCs + 1 \\\ng) BitBlt Alpha Blending has changed\\\nh) Added primitiveWrite24BmpLine\\\ni) The guard if statement for primitiveSerialPortRead was flawed, noted the buffer overflow, but then proceeded, versus returning. \\\n\\\n3.5.1b3 \\\na) Fix, Stephane Ducasse <ducasse@iam.unibe.ch> pointed out that using a virtual desktop we had a crash in ioSetFullScreen. This \\\nwas due to a pthread race condition between the UI thread and interp.c. Fixed by using UI callback to handle fullscreen window/move/resize.\\\n\\\n3.5.1b2\\\na) Switch to aio.h logic and unix socket logic! This is a MAJOR change!!!!\\\n\\\nb) Call aioPoll  (select()) to cause process wait versus old pthread logic. This follows in the footsteps of the unix port. You should verify that \\\ncpu time when squeak is idle is not affected in a dreadful manner.\\\nc) Fix, if you call does this directory exists on a file now you will get an error which will signal that the directory does not exist. This ensures\\\nthe FileDirectory test suite works. \\\nd) Fix, if you quit the browser plugin, check the status of the pthread_cancel before attempting the pthread_join\\\n \\\n3.5.1b1 limited distribution\\\n\\\n3.5.0b4 \\\na) os-x exposed an issue with EToyPeerToPeer support. It seems under os-x we get the connect, data, close so fast on lans that by the \\\ntime we get around to asking for the remote IP address the connection is closed, and our open transport call fails. We change SqMacNetwork.c to \\\nreturn the IP address discovered at connect time in this case. Under os-9 we never saw this behavior because we suspect the network activity \\\nwas slower and more serialized. \\\n\\\n3.5.0b3 (Safari support)\\\n\\\na) The plugin logic was changed to support Safari and better support os-x. This required building a CFM stub to load the mach-o compiled\\\nNSPLugin. The mach-o plugin now uses a pthread for the interp.c loop. This gives much better performance and user UI feedback. \\\nb) The GC logic was carefully reworked to optimize the assembler on the ppc. This gave us upwards of a 30-50% improvement, since \\\nincremental GC is going on all the time, this change actually has a effect you can see say in the solitaire example where we save 10%. \\\nc) sqMacNetwork.c was modified, first change in many years. The remote address and port number are requested as an async operation. \\\nThe operation times out after a few milliseconds. This was never a problem in os-9. Now it seems there is an issue sometimes for DHCP clients\\\non os-x. There the operation can timeout and return 0 as the address or port. We changed the call to do a sync operation to avoid a timeout.\\\nd) sqMacMain.c was modified to allow for pthreads for mach-o netscape based squeakland plugin support\\\ne) sqMacMemory.c changes for mach-o plugin support\\\nf) sqMacTime.c changes for  mach-o plugin support\\\ng) sqMacUIEvents.c changes for mach-o plugin support\\\nh) sqMacWindow.c changes for mach-o plugin support \\\ni) npmac.cpp now this is a netscape glue routine, I changed it to ensure we can see the entry points, originally they are C++, but need \\\nto be \"C\" so the loader can find the names the CFM glue routine is looking for. Also we add the logic TV2FP to setup the mach-0 to CFM code stubs to allow the mach-o plugin to callback to the CFM stubs in Safari. \\\nj) sqMacNSPlugin.c \\\n\t1) Rearrange when the interpret() thread is started to ensure a race condition doesn't happen.\\\n\t2) use Pthreads for the mach-o osx version. \\\n\t3) rework NPP_SetWindow to start interpret() when needed. \\\n\t4) Alter StartDraw, EndDraw to use a mutex lock and handle os-x port locking to prevent races between pthreads.\\\n\t5) Alter ioShowDisplay, optimization and handle os-x\\\n\t6) fix ioSetFullScreen to make it work on Safari\\\n\t7) fix OpenFileReadOnly to make it work on os-x, needed sqFileNameFromStringOpen macro call\\\n\t8) Alter ExitCleanup to mutex lock to prevent race ending issues, and add a bit more cleanup\\\n\\\n\\\n\\\nNote some versions of 3.4.1 were distributed for testing only, these are superseded by 3.5.0\\\n\\\n3.4.0b2 (Croquet support)\\\n\\\na) Ensure vmVersion information reports correct information, was bogus in 3.4.0b1\\\n\\\n3.4.0b1 (Croquet support)\\\na) Added plugin BMPReadWriterPlugin 14 November 2002 (i)\\\nb) B3DAcceleratorPlugin.c gets primitiveCreateRendererFlags (new api)\\\nc) two more op codes get added to BitBltPlugin (fixAlphawith, pixClearwith)\\\nd) Squeak3D gets (b3dOrthoNormInverseMatrix, b3dTransformDirection,b3dTransformPoint,b3dTransposeMatrix)\\\ne) The scroll wheel mouse logic was using apple cmd key as the modifier on the arrow key events, Other platforms use the Control key. So the \\\nmac falls in line (changed to use the control-key)\\\n\\\n3.2.8b9\\\na) recompiled os-x version, 3.2.8b8 seem to have a bad compiler option and gave 20% less performance.\\\n \\\n3.2.8b8\\\na) exposed \n\\f1 vmParameter\n\\f0  24 & 25 which control how memory is allocated/freed \\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f1 \\cf0 Smalltalk vmParameterAt: 24 put: 48*1024*1024.\\\nSmalltalk vmParameterAt: 25 put: 24*1024*1024.\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 b) Added argv,argc, env variables to main\\\nc) Fixed for Jaguar 10.2. Full screen mode cmd-tab broke menu bar hiding, this is a 10.2 bug\\\nd) Added support for IP_ADD/DROPMEMBERSHIP and the ability to bind to the wild card port (0).\\\ne) OpenGL changes for TEA\\\n\\\n3.2.8b7 was testing release and not distributed to the public.\\\n3.2.8b6 was testing release and not distributed to the public.\\\n3.2.8b5\\\na) Oops broke the logic returning the vmversion information in classic. Also incremented os-x version (which was fine) to keep numbers in sync\\\n\\\n3.2.8b3 The squeak.sourceforge.net CVS tree was reorganized and the project builder project revamped. The \\\nmajor change to the source was upgrading the netscape browser plugin to 3.2.7b6 levels.\\\n\\\na) Gnunifer.3.cs Changed to add register var on FOO_REG and to remove sqGnu.h file embedded in method.\\\nb) sqMacDirectory.c Add logic to handle case of building as CFM carbon plugin under CW6, needed some carbon calls\\\nc) osExports.c needed to ifdef out the getUIToLock entry point (not available as CFM carbon browser plugin)\\\nd) sqMacFileLogic.c Fix alias problem. Add logic to deal with path names as CFM carbon browser plugin, ensure vmPath is correct.\\\ne) sqMacImageIO.c Cast to get rid of warning message\\\nf) sqMacMain.c Cast to get rid of warning message, Check for CFM Carbon and bundle check. Revise vm parm 1201 code to return long file names are ok as CFM carbon browser plugin. Some diagnostic routines for printing to the console as CFM carbon browser plugin.\\\ng) sqMacMemory.c Logic change as CFM carbon browser plugin.\\\nh) sqNSPlugin.c\tFix to beginFullScreen logic (carbon call is broken?)\\\ni) sqMacUIEvents.c Remove getUIToLock dummy call. This entry point should only exist for mach-o carbon builds. Not CFM carbon browser plugins\\\nj) sqMacWindow.c  Use old call to create window when a CW 5 carbon application.\\\nk) sqPlatformSpecific.h Change #ifdef to correct logic error when building as CFM carbon browser plugin under CW 5.\\\n\t\\\n\t\\\n\\\nMay 31st, 2002 (3.2.7b6)\\\nFor 3.2.7\\\n\\\n3.2.7b3 We build the VM using patchs to enable globals as a structure. This improves performance by 10%\\\n\\\na) Classic Vm builders might need to add \"struct foo *foo = &fum; \"  to int interpret(void). \\\nb) readme: add notes about changesets and alter build instructions\\\nc) sqMacFileLogic.c: use accessors for interp.c globals\\\nd) sqMacMain.c: use accessors for interp.c globals. Also Alain Fischer added logic to fetch os-x version number and to enable you to put squeak.image in the resource folder for autostarting.\\\ne) sqMacTime.h: Fix busted lowresclock again. After 24 days of mac uptime, 3.2.6 squeak will hang.\\\nf) sqMacUIEvents.h: use accessors for interp.c globals.\\\ng) sqPlatformSpecific.h: alter sqFTruncate to use fileno() as needed.\\\nh) sqMacWindow.c: use accessors for interp.c globals.\\\ni)  3.2.7b5 sqMacFileLogic.c: change vmpath to resolve to classic VM if vm is moved from MacOSClassic folder\\\nj) Misc changes for Netscape plugin support\\\nk) Introduce osExports.c logic\\\nl) 3.2.7b6 Fixed a problem in path name resolving need to use UTF8 to properly interact with high ascii characters\\\nm) 3.2.7b6 Fixed a problem in path name resolving there was a bug with certain types of alias path name combinations in quick name resolving.\\\n\\\nMac VM 3.2.6 mach-o build for Carbon, and build for Classic.\\\nMarch 14th, 2002\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f2 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\nNotes About previous VM.\\\n3.2.6b6 Classic or earlier has a bug that makes it stop collecting user input on a 19.88 hour cycle depending on reboot time.\\\n\tSeems many systems don't run for more than 19 hours so we've not had major complains about this issue. \\\n\tBug was introduced in 3.2.1.\\\n3.2.5 has a bug that prevents the use of accented characters without \\\n\ta image patch to fix a VM issue (not an issue in 3.2.4). Also you can't enter an double keystroke characters, ie ^ \\\n\twhich makes life difficult. It also does not support the AppleScript Plugin (not an issue in 3.2.4)\\\n3.2.4 a bug in project builder introduced a performance problem (bad compiler options).\\\n\\\nSee the 3.2.5 about why this 3.2.6 is different inside.\\\n\\\nFor 3.2.6:\\\na) Change an internal number that dictates how often pending interrupts should be looked at from 5ms to 3ms This improves \\\ndelay accuracy.\\\nb) Change how sleeping is done when squeak is idle. This reduces CPU consumption, and improves Delay accuracy.\\\nc) Fix bug with high bit problem with keyboard (accented characters are ok now)\\\n  c2) 3.2.6b6 has fixed characters that require multiple key strokes to enter.\\\nd) Externals that make UI interactions (IE AppleScript) Must now make a call back to the VM to schedule\\\n    the main thread to do the call that will invoke UI interaction to prevent a deadlock in Carbon between threads. \\\n   See the OSAExecute call in the AppleScript plugin for details.\\\ne) If you run a classic mac VM more than 23.x days nonstop it will stop responding to UI events.  Ensure clocks get anded with 536870911.\\\nf) signal inputSemaphoreIndex because we are mulithreaded. Not that it does anything for us yet...\\\ng) 3.2.6b6 Pass the unicode value of the keystroke up as the EventKeyDown/EventKeyUp data, versus mackeyboard code.\\\nh) Somewhere there is a bug with mktime + time, so use the unix code of time+localtime+gmt \\\ni) Change iorelinquishPrcessorForMicroseconds to sleep the quatum between now and wakeup time. Also schedule a\\\n   check for interrupts if wakeup time is now or in the past. This improves delay accuracy. For OS-x this was a big deal,\\\n   for os-9 it improves things by 1 or 2ms. Also in  os-x we sleep more when idle so CPU usage goes down.\\\nj) On OS-9 umap AND free the VM backing store. Just doing the free doesn't work and you lose 128Mb of disk space until you reboot\\\nk) 3.2.6b7 for post event processing ignore mouse move/drag/or scroll wheel events. These are ignored by the open/gl plugin and only suck a major amount of CPU time to process in the post event processing logic. \\\nl) 3.2.6b8 (3.2.6b4 classic) removed call to uncouple shift keys introduced in 3.2.1. This causes some macs after sleeping not to respond to keyboard input\\\nm) 3.2.6b8 (3.2.5b7 classic) added function for ioLowResMSecs to avoid early bit overflow. Rework clock checking in ioHandleEvents to handle clock rollovers properly.\\\n\\\nMac VM 3.2.5 mach-o build for Carbon, and build for Classic.\\\nMarch 4th, 2002\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f2 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\n\\\nBeware this version of the VM is significantly different inside! \\\n\\\n\\pard\\tx1440\\tx2880\\tx4320\\tx5760\\tx7200\\ql\\qnatural\n\n\\f1 \\cf0 a) Broke sqMacWindow.c into 10 different files by function type.\\\n\\\nb) Moved most of the memory allocation logic out of sqMacMain.c into sqMacMemory.c. and ensure memory is freed when Squeak is terminated. \\\nThe major change in this code is support for OS 9.x virtual memory mapping. This only applies to Mac OS 9.2.0 or higher, excluding os-x. It appears  Mac OS 9.1 has a bug that prevents this feature from working.\\\n\\\nFor images that require less than 128MB of memory, mapping is used to allow the image to grow/shrink to the 128MB boundary, therefore you can change the application memory size to about 2MB. \\\n\\\nFor images that require more than 128MB then change the application memory size to > 128MB and mapping will not occur. \\\n\\\nIf mapping is not available because virtual memory is turned off or the api is not supported by the macintosh OS then mapping is not used. Note that mapping is not support under the classic os-9.x environment under OS-X, however in this case you should be using the OS-X version of Squeak, not the classic version.\\\n\\\nc) Use of Carbon event logic for OS-X only. This is a major structural change. \\\n\\\nIt also encouraged the use of a pthread for interp.c. \\\n\\\nAll user interaction with the VM follows a new code path, so problems with keyboard or mouse input should be reported asap. Also any issues with application switching, windows being brought to the foreground or sent to the background and usage of the full screen logic should be reported asap.\\\n\\\nAs part of this change I have build in support for scroll-wheeled multi-button mice under os-x. Thanks to Doug Way for testing this for me. Maybe someone can post to the list what their favorite 3 button scroll wheeled mouse/trackball is.\\\n\\\nd) Use of a carbon call to get the dominate Device if you have multiple screens. People with multiple screens should confirm window resizing, full screen on/off works as expected.\\\n\\\ne) Corrected comment in sqMacFileLogic.c\\\n\\\nf) Changes to sqMacNSPlugin.c. This makes it compile, but it's not usable yet.\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 \\\n\\\nFeb 20th 2002 3.2.4\\\n\\\nFor this version of the VM I have migrated towards using OS-9 packages. This allows us to provide one \\\nfolder/package that supports os-x and previous operating system versions.\\\n\\\nGiven Squeak 3.2.4Beta1.app\\\nThe classic VM is found in the *.app:Contents:MacOSClassic, with an alias in *.app:\\\nThe mach-o OS-X VM is found in *.app.Contents:MacOS\\\n\\\nIf you are running OS-9 then clicking on the *.app or doing drag and drop will just run Squeak, same applies for OS-X.\\\nIf you are running OS-7.5.5 or OS-8.x then the *.app package will appear as a folder, just open and click on the alias within. \\\nNote that if you want to use classic plugins I suspect you need to put them in the MacOSClassic Folder beside the VM. \\\nBundles for os-x go in the same location as the *.app application package.\\\n\\\nChanges\\\na) Drag and drop at open time with image file that has no meta type, will now open the image, versus prompting you.\\\nb) Use an os-x window attribute at open time to signal that the window should not be moved by the dock when you go to full screen.\\\nc) Fix window update logic to use window that needs updating versus stwindowg to fix issues with print dialog windows in classic. \\\nd) bitblt gets recompile to pickup fixes posted in 3.2 update stream.\\\n\\\nFeb 5th 2002 3.2.3\\\nChanges\\\n\\\na) use old extended time manger to update psudeo-TickCount, versus sigalrm. siglarm make sound recording not work.\\\nb) fiddle with sound recording and make it work.\\\n\\\nJan 2002 3.2.2\\\nChanges:\\\n\\\na) AsyncFilePlugin.c Use global to remember security function entry point for performance reasons\\\nb) FilePlugin.c\tUse global to remember security function entry point for performance reasons\\\nc) interp.c Use squeakFileOffsetType versus off_t and add a bunch of checks to handle lack of long long and conversion errors between 64/32 bit integers and LargeInteger objects\\\nd) readme, it's http://www.mucow.com/Gnuifier.1.cs \\\ne) SocketPlugin.c\tUse global to remember security function entry point for performance reasons\\\nf) sq.h added default sqFilenameFromStringOpen and sqTruncate\\\ng) sqFilePluginBasicPrims.c revert to anti specs, but ensure #def to fseeko and ftello for 64 bit aware file systems.\\\nh) sqMacDirectory.c A bit more error checking on bad file names\\\ni) sqMacFileLogic.c Folders size is now zero in classic, and a bit more checking on bad file names\\\nj) sqMacSound.c Fixed a problem with sound recording in classic due to a change made in Sept. But sound recording still does not work under os-x\\\nk) sqMacWindow.c  two very important changes:\\\n\\\n\t1) You can now do FFI calls with the FFI bundle plugin to Mach-o frameworks. \\\n\tHowever you need to rework your api calls. For example:\\\n\tapiGetMousePoint: aMacPoint was\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'InterfaceLib'>\\\n\tIt now is:\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'Carbon.framework'>\\\n \t\\\n\tIf you review /System/Library/Frameworks I'm sure you can come up with interesting ways to \\\n\tmake mac only squeak images.\\\n\t\\\n\tI now use map( NULL, gMaxHeapSize, PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED,-1,0);\\\n\tanonymous memory mapping to 512MB as the squeak memory block. The VM can then grow or shrink\\\n\twithin the 512MB block, I just move a pointer. \\\n\t\\\n\tNote in 3.2.1 a slight error on my part restricted Squeak to 50MB. I am of course\\\n\tinterested to hear about issues with my choice of 512MB. Note a Squeak VM is limited to 2GB under perfect \\\n\tconditions, however if any part of the image crosses the 2GB boundary the VM will fail, right now 512MB\\\n\tseemed a safe choice.\\\n\t\\\n \tPhysMem:  60.2M wired, 78.6M active,  412M inactive,  551M used,  217M free\\\n\tVM: 3.03G + 55.3M   7847(0) pageins, 1(0) pageouts   \\\n\tPID COMMAND      %CPU   TIME   #TH #PRTS #DREGS RPRVT  RSHRD  RSIZE  VSIZE\\\n\t422 Squeak VM    0.8%  0:35.59   2    71   100  23.3M  8.53M  26.5M   571M\\\n\\\n\tbut I only have one 80,000,000 byte swap file in /var/vm\\\n\\\nNote if you turn crash reporter on, then if the VM crashes a nice report should be generated in your log directory.  See the Apple documentation for a description of this feature, currently it is set in OS-X 10.1.x via the preferences window for the Console Application. If you have a crash with this VM, please recreate and post the crash log (found in Users/foobar/Library/Logs/ to the Squeak mailing list so we can continue to make the VM fault tolerant.\\\n\\\n3.2.1 Notes\\\n\\\nYou might need these change sets to build a new VM or to use all the features of this VM with your image, hopefully these will get into the pending 3.2.x image.\\\n\\\nFixes and feature extensions.\\\nAsyncFileFixFu...hName-JMM.1.cs \tfix for async test method.\\\nDragAndDropAtStart-JMM.5.cs\t\tfix to enable drag and drop at startup\\\n\\\nNeeded to compile a VM with VMMaker\\\nLargeFiles-JMM.3.cs\t\t\t\tEnable large file support, files > 2GB\\\n\\\nNeeded to turn this feature on\\\nMacLongFileName-JMM.5.cs\t\t\tEnable long file names on the mac\\\n\\\nThe SUnit\\\nMacLongFileNamesSUnits-JMM.3.cs\tTest long file names and long directory names and large file support\\\n\\\nKinda optional features some people might need.\\\nInternetConfiguration-JMM.5.cs\t\tAllow internet configuration information access, internal plugin\\\nUUID-JMM.3.cs\t\t\t\t\tAllow UUID generation, internal plugin\\\n\\\na) The ability to get back a UUID. This uses the hosting UUID generator if the\\\n hosting OS supports it and we have a primitive we can call. If not then we generate\\\n a type 4 version of a UUID (the random bits one).\\\n(This requires a special change set)\\\n\\\nb) Ability to start squeak on the mac by dragging multiple documents onto the\\\nimage, or drag and drop of stuff onto the running VM icon.\\\n(This requires a special change set)\\\n\\\nc) Usage of the Internet Configuration tool kit to supply information about\\\nwhat the mac proxy is etc. etc.\\\n(This requires a special change set)\\\n\\\nd) Migrate file system to use 64 bits. This allows you to read/write and seek\\\nwith files > 2 GB. This includes a change to the VM to convert from/to long\\\nlong integers. It also allows the file system to actually deal with 2GB files,\\\nthe current file interface actually fails once the file exceeds 1GB.\\\n\\\ne) For the carbon based Squeak VM we now support long file names 255\\\ncharacters. Close both eyes and touch everywhere the mac VM deals with file\\\nname paths and hope for the best (Actually we write an Sunit to ensure we've\\\nnot broken everything). This also includes the ability to put an image in a\\\nlong file name directory, but right now the image name must stay under 32 characters.\\\n\\\nFilePlugin.c changes to support large integers.\\\nFilePlugin.h changes\\\nsq.h changes to support large files.\\\nsqConfig.h changes to resolve some conflicts.\\\nsqFilePluginBasicPrims.c  changes to support large files.\\\nsqMacAsyncFilePrims.c changes to use fspec versus 255 file path.\\\nsqMacDirectory.c changes to use hosting OS (OS-X) bsd create and delete directory\\\n and truncate. dir_look changes as part of the general rewrite.\\\nsqMacDragAndDrop.c use new call to get path name from fsspec. Use fsspec more, and added \\\n  interface code to setup drag and drop of items at application startup time. max document name\\\n  goes to 1000 characters.\\\nsqMacFileLogic.c Mostly rewrote!\\\nsqMacSecurity.c use new file calls.\\\nsqMacWindow.c \\\n\tincrease size of vmpath, docpath, imagepath to 1000 chars, shortname to 255 characters.\\\n\tadd logic for left/right modifier keys \\\n\treworked LoadLibViaPath logic \\\n\tsqImageFileOpen uses fsspec versus 255 path name.\\\n\tsqImageFileStartLocation uses ffspec.\\\n\tbundle support for bundles\\\n\t\\\ne2) interp.c supports get/put of large integers to long long integers.\\\ne3) fixed fTruncate\\\n\\\nHint getting this to work was a pain. Think of 255 character folder names and nested aliases,\\\nfolder 1 refers to folder 2 which then refers to folder 1 again, just go down the path say 8 times,\\\nthen ask to create a file or directory!\\\n\\\nf) Support to change the Mac screen resolution under Squeak control.\\\n\\\ng) Fix to unload/load the scrap at startup time to ensure the clipboard is\\\ncorrect when starting up the VM.\\\n\\\nh) Uncouple the shift key and left/right shift keys on old extended keyboard.\\\nAlso add a call to get which keys are currently pressed on a USB keyboard or\\\nthe USB codes for an apple non-usb keyboard. (Note this isn't working quite yet under OS-X)\\\n\\\ni) Changes to enable us to compile the VM under Apple's OS-X Project Builder\\\nenvironments.\\\n\\\nj) Some rewriting to ensure serial and midi support can be written as external\\\nplugins.\\\n\\\nk) Fiddling to get sound input to work under OS-X\\\n\\\nl) Platform.exports changed macintosh to macintoshSqueak to avoid conflict.\\\n\\\nm) Memory is allocated at 50MB at start, then will grow or shrink, verus previous carbon apps\\\n that did 1GB. \\\n \\\nn) sqPlatformSpecific.h changes to support long file names and os-x posix file names\\\n\\\no) sqVirtualmachine.c & sqVirtualmachine.h\\\n#if VM_PROXY_MINOR > 4\\\n\tVM->positive64BitIntegerFor = positive64BitIntegerFor;\\\n\tVM->positive64BitValueOf = positive64BitValueOf;\\\n\tVM->signed64BitIntegerFor = signed64BitIntegerFor;\\\n\tVM->signed64BitValueOf = signed64BitValueOf;\\\n#endif\\\n\\\nBeware this causes an interesting problem, if you compile plugins with VM_PROXY_MINOR now set to 5, then they will not work with older VMs. The solution is to define the VM_PROXY_MINOR in the plugin to the value that indicates what features it is using.\\\n\\\np) Changed to use ITimer logic as a 16ms lowres timer to improve performance\\\n\\\nq) Changed to use single thread, no thread manager.\\\n\\\nr) Changed to use lowres timer in checking for polling time to improve performance\\\n\\\ns) It should have faster startup times.\\\n\\\nt) It will hide the empty window at startup, then show the squeak window when required.\\\n\\\nu) It has a different menu structure.\\\n\\\nv) It does less I/O when navigating directories.\\\n\\\nThe macintosh 3.1Alpha1MT VM, Sept 24th 2001 \\\nThis VM was built with the base  3.1 image at change set #4347\\\nV3.1.1 at change set #4347\\\n\\\n\\\nWe go to V3.1.1 to indicate that the 3.1 VM is being used. In the past the 3.1 Image was used but some changes in the openGL logic makes  3.1 Vm and 3.0 image not quite work correctly with 3d graphics. Although a 3.1 VM will run many images way back to the 2x series no careful study has been done on the ability to do this. So at this point we are indicating this VM is a 3.1 VM and best used with a 3.1 image.\\\n\\\nUse of VMMaker to build VM. As of this version everything can be built as an external except for the window logic which hasn't been decoupled from the VM support for the macintosh. \\\n\\\n1) AsynchFilePlugin the security check for ability to create file is now a plugin call.\\\n2) B2DPlugin logic changes to fillLinearGradientfromtoat\\\n3) b3dRemapFaces, b3dRemapEdges, b3dRemapEdgeList, b3dRemapAET, b3dRemapEdgeVertices, b3dRemapFaceVertices, b3dRemapFaceFree, b3dRemapEdgeFree, b3dRemapAttributes. Some casting and changing of += to = + to make some compilers happy.\\\n4) BitBltPlugin added tableLookupat call.\\\n5) DropPlugin added setFileAccessCallback to allow the Security Module plugin the ability to give us the entry point to turn security off so we can open files as read only when security is turned on.  This was broken in the past. \\\n 6) FilePlugin added fileOpennamesizewrite,getThisSession to allow for callbacks. Changed the file security logic to use the plugin interface. \\\n7) interp.c, fixes for 4347ByteArrayRangeCheck-di, ability to printAllStacks, security calls for image rename, write to use plugin interface.\\\n8) Added GetAttributeString, and recordDragDropEvent and entry points for callbacks.\\\n9) SecurityPlugin changed when initialization is called to initialize the safe and unsafe directorys, also added entry points for all the testing calls so it can be a true plugin.\\\n10) Serialplugin. The serial plugin was redesigned to seperate out MIDI logic. People with MIDI devices and old serial macintosh should check to see if they still work since we lack equipment now to test this obsolete technology set.\\\n11) SocketPlugin. Make security calls true plugin calls.\\\n12 SoundGenerationPlugin. Removed \\\nEXPORT(int) SoundGenerationPlugin_primitiveFMSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveOldSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitivePluckedSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveWaveTableSoundMix(void);\\\nThey were a hack at the plugin level and discussion on the list seemed to show they were no longer used. \\\n13) Checking for if defined (__APPLE__) && defined(__MACH__) for the Mac OS-X native development environment\\\n14) Changed sqMacAsyncFilePrims, usage of interpreterProxy->, plugin calls for getThisSession. \\\n15) Changed sqMacDirectory.c. Removed some utility code and make it a seperate file so that it can be shared between sqMacWindow and other plugins that require them. \\\n16) Changed sqMacDragDrop.c. Added plugin callback for getSTWindow, the sqSetFileAccessCallback logic, fileOpennamesizewrite, and secHasFileAccess. Added logic to do the recordDragDropEvent callback to sqMacWindow.c \\\n17) sqMacNetwork.c. Some cleanup for the OS-X version of the OpenTransport headers, some constants have name changes\\\n18) sqMacNSPlugin.c Use of ioLoadFunctionFrom(NULL, \"DropPlugin\"); versus explicit call.\\\n19) sqMacOpenGL.c. Some cleanup for the OS-X version of the OpenGL headers\\\n20) sqMacOpenGLInfo.c. Some cleanup for the OS-X version of the OpenGL headers\\\n21) sqMacSecurity.c ioInitSecurity calls back to dragAndDrop plugin to set entry point to turn security off.  Added code to create directories if required and ensured callbacks are plugitized.\\\n22) sqMacSound.c Some cleanup for the OS-X version of the Sound headers. Use of interpreterProxy-> in the proper places.\\\n23) sqMacWindow.c Some cleanup for the OS-X version of the compiler.  Fixed saveAsEmbeddedImage, this got broken when we moved from a FAT to a ppc only application.  Altered interface to recordDragDropEvent so that it was plugable. Some file path name logic goes to a seperate C source file. The drag and drop plugin is loaded and intialized after the image is loaded but before the interpreter is started, before it was done a bit earlier in the startup process. This also has the effect of initializing the security module.\\\n24)sqOpenGLRenderer.c. Some cleanup for the OS-X version of the OpenGL headers\\\n25)SurfacePlugin.c gets a hack so it knows when it is internal versus external.\\\n\\\n\\\n\\\nv3.0.18 at change set #4081\\\n(Note browser plugin goes to 3.0.23\\\n\\\n1) sqMacOpenGL.c Quite a few changes were made to the code to support it as an internal plugin for the browser. This is because the drawable frame for a browser plugin is a subset of the browser's grafport, so lots more care must be taken to draw in the correct location using OpenGL. We also fixed issues with re-configurating the Open/GL draw area when the window gets resized or goes to full screen, and attempted to ensure multiple screens will work.\\\n\\\n2) sqMacWindow.c, minor fix to cast a constant char * to char * for CW 6.1\\\n\\\n\\\nBrowser plugin 3.0.23 fixes\\\n\\\n1) Integerated the H/W Acceleration as an builtin plugin\\\n2) Added logic for pre and post event interaction to browser plugin event handler for H/W Acceleration logic. The external H/W Acceleration plugin mostly works with the browser plugin but doesn't work with full screen mode, or if the plugin is embedded in a window or a scrollable frame, so don't use it. Use the browser plugin 3.0.23 or higher which has the H/W Acceleration builtin.\\\n\\\nv3.0.17 at change set #4081\\\n(Note browser plugin goes to 3.0.21)\\\n\\\n1) Added HW acceleration as internal plugin.\\\n2) 4079BBAlphaTextFix-ar Fixes the problem with alpha text, changes BitBltPlugin.c \\\n3) Added primitive on the mac to truncate a file.\\\n4) Added logic to flush volume on a flush file to ensure file and control blocks are flushed.\\\n5) For the Carbon VM we increase nextevent wait time if we get sufficent idle time. This should reduce CPU usage under OS-X\\\n6) GetAttribute: 1002 now returns the gestaltSystemVersion as a hex string, and getAttribute: 1003 now returns either '68K' or 'PowerPC'.\\\n7) Starting with 3.0.17 the VM is build only as a powerpc application. The latest VM as a 68K application will be made available from time to time permits based on people's needs. \\\n8) Changes to sqOpenGLRenderer.c to improve performance, OpenGL 1.1 support.\\\n\\\nPlugin 3.0.21 fixes\\\n\\\n1) added check for mailto: tag on posts to fix problem with Netscape crashing, and IE hanging.\\\n2) Plus above fixes.\\\n\\\nWhat has been fixed/changed.\\\nv3.0.16 at change set #4041\\\n(Note browser plugin goes to 3.0.20)\\\n\\\n1) Lots of fixes for BitBlt and HW acceleration.\\\n2) Hardware Acceleration plugin goes to 1.0.1. Please note there is a seperate plugin with the same name for Carbon. Doing a get info will identify if the plugin is only usable with Carbon Squeak.\\\n\\\nv3.0.15 at change set #4026 (May 17th test version)\\\n(Note browser plugin goes to 3.0.19)\\\n\\\n1) Added support for OpenGL HW acceleration plugin\\\n\\\nPlugin 3.0.19 fixes\\\n\\\na) Obey embedded tag plug\\\nb) Fix problem with plugin 3.0.17 not working with netscape 4.x\\\nc) Carbonize plugin for IE 5.1 \\\nd) Remove debugging printf than occurred on transition to full screen mode\\\n\\\nWhat has been fixed/changed.\\\nv3.0.14 at change set #3987\\\n\\\n(Note plugin goes to 3.0.17)\\\n\\\n1) sqMacDirectory.c. The pathlookup would handle the case of foo:bar::do incorrectly by ignoring the :: path redirection. This has been fixed. However a path lookup will not work if it contains :: and an aliased directory in the middle of the path.\\\n\\\n2) sqMacSecurity.c. The pathname for the untrustedUserDirectory was built incorrectly, and the bug mentioned above in sqMacDirectory.c usually kept this from being noticed.\\\n\\\n3) sqMacWindow.c  we added some logic to do the delay for primitiveRelinquishProcessor, but found it had an large effect on a freecell benchmark. I suspect on a Morpic step wait there is nothing to do so primitiveRelinquishProcessor gets called which then affects response time. So for now we revert to the 3.0.11 behavior, good performance and 100% CPU usage!\\\n\\\n4) GetAttribute 1004 returns returns interpreterVersion; which is for example\\\n\"Squeak3.1alpha of 6 February 2001 [latest update: #3987]\"\\\n\\\n5) When in full screen mode we now attempt to disable resizing, zooming, or moving the window. The window borders are hidden, but in the past it was feasible to grab an edge and alter it, thus confusing the VM.\\\n\\\n6) Worked on Carbonizing the browser plugin\\\n\\\n7) 3977 & 3978 FloatArray fixes. Makes float arrays go through a new (and working) version of #primitiveHash\\\n\\\n8) Fixed problem with accidental mouse clicks being triggered from pulldown menus on application switching.\\\n\\\n9)\\\n\"Change Set:\t\t3984 BitBltExtensions-ar\\\nDate:\t\t\t4 May 2001\\\nAuthor:\t\t\tAndreas Raab\\\n\\\nThe change set includes various extensions for BitBlt with the goal of migrating the useful features from FXBlt into the general BitBlt mechanisms. These include:\\\n\\\n* Handling of LSB and MSB forms:\\\nBitBlt now handles both, MSB and LSB forms (and their conversions). Only instances of Bitmap are assumed to contain big-endian pixels. All others are assumed to be little endian (reason is that we can only identify Bitmap here). Note that 'LSB' and 'MSB' refers to PIXELS, that is a 1bpp LSB form has its left most pixel in the lowest bit whereas a 1bpp MSB form has its left-most pixel in the highest bit.\\\n\\\nFor pixel depths < 8 this can be different from what your OS supplies (as an example, Windows bitmaps < 8 are big-endian pixels in little-endian words; we might call them 'middle-endian'). We simply don't deal with those - forms are either big or little endian but nothing inbetween.\\\n\\\nBitBlt has got an extra combination rule for swapping pixels in the destination form. This can be used to make byte swapping much more efficient (as soon as we've got more VMs with support for it).\\\n\\\n* Handling of 'native bitmaps' (aka surfaces):\\\nBitBlt is now able to deal with OS surfaces that are registered with the surface plugin.\\\n\\\n* Handling of full color maps:\\\nBitBlt has been extended to deal with instances of ColorMap in addition to the prior mechanism of using only indexed lookups and provide an implicit 16-32 bit color conversion. ColorMaps can specify both, a lookup table and an additional set of masks and shifts to apply during the color mapping operation. \\\n\\\nFour independent shifts and masks can be given which can be used for a lot more than just color conversion (as an example, one could do byte swapping with this; but see also BitBlt class>>exampleColorMap). \\\n\\\n* Better handling of default arguments:\\\nFor most of the required arguments for BitBlt very reasonable default assumptions can be made. This includes the destOrigin (0@0), clipRect (0@0 extent: destForm extent), sourceOrigin (0@0). BitBlt now substitutes these if they are absent (e.g., nil) in the instance provided.\\\n\\\n\"\\\n\\\n\\\nv3.0.13 at change set #3848\\\n\\\n1) sqMacSecurity was changed to set the unsecure directory to\\\n\tsystem folder:Preferences:Squeak:Internet:My Squeak\\\n\\\nv3.0.12 at change set #3848\\\n1) Fixed problem with creating My Squeak Folder in Documents Folder with System 8.6\\\n\\\nWhat has been fixed/changed.\\\nv3.0.11 at change set #3848\\\n\\\n1) sqMacDirectory had a bug when you resolved a path name. The fast resolve always failed, which invoked the slow resolver. Now the fast resolver works.\\\n\\\n2) sqMacSecurity was changed to set the unsecure directory to Documents:My Squeak. \\\n\\\n3) sqMacWindow was changed to fix some issues with Squeak capturing events from other applications and to reduce the number of duplicate mouse events that are generated. Also we capture modifier information  directly from the mouse and keyboard on null events to fix some problems with Carbon. We  hopefully fixed problems with mouse clicks from foreground applications being seen by Squeak and issues with the OS-X Dock clicks.\\\n\\\n4) sqMacNSPlugin was changed to use the above mouse/keyboard capture code which is much cleaner than the original fix for the bogus modifier information given to us by netscape on a null event. \\\n\\\n5) When you turn full screen off we now correctly reposition the window to the original location versus a few pixels to the left. \\\n\\\nWhat has been fixed/changed.\\\nv3.0.10 at change set #3848\\\n\\\n1) changed VM exception unwind logic\\\n\t3796-Exception-unwind-V3,tim@sumeru.stanford.edu, Paul McDonough, Stephen Pair and others\\\n\\\n2) Fixes for the JPEGReader plugin and for Jitter 3\\\n\\\n3) Added minimal Mac VM logic to assist in building a small VM.\\\n\\\n4) Changed how the browser plugin starts up. Now it starts the interpreter running only after getting the browser setwindow command. This seems to fix a race condition that resulted in a crash at startup time with Netscape 4.x\\\n\\\n5) Fixed broken full screen redraw on cmd-tab\\\n\\\n6) Fixed what looked like mouse-down, mouse-down, mouse-up sequence. Now reports mouse-down, mouse up.\\\n\\\n7) Added StarSqueak plugin as internal plugin\\\n\\\n8) Note the current Squeak Plugin should be gotten from the www.squeakland.org site.\\\n\\\nv3.0.9 at change set #3776, Boston Snow storm build.\\\n\\\n1) A number of changes were made to the interpreter:\\\n\ta) added primitive to change a class.\\\n\tb) added primitives to get or put 32bit integers\\\n\tc) Fix problem with GC and class reshaping\\\n\td) Better logic for method cache flushing\\\n\\\n2) Added JPEGReader plugin\\\n\\\n\\\nV3.0.8 at change set #3740\\\n\\\n1) The caps lock no longer maps to the shift attribute. So if the caps lock is down mouse clicks will behave normally. \\\n\\\n2) Numerous fixes for the BitBltPlugin plugin\\\n\\\n3) Memory allocation grow/shrink logic for Carbon was added.\\\n\\\n4) Spurious mouse clicks for the browser plugin has been fixed. (This took awhile to fix, I'm sure it's a bug with the Swedish version of Netscape)\\\n\\\n5) The browser plugin will attempt first to allocate memory from the browser heap, then the system heap. Most people when faced with a memory issue usually increase memory for the browser first. However memory for the plugin is controlled by an attribute in the EMBED HTML statement. \\\n\\\nV3.0.7\\\n\\\n1) A bug exists in pre OS 8.x that causes a crash in activate window if the standard get file \\\ndialog comes up before the Squeak Window. I remove the InvalWindow call found in that routine since it is actually redundant.\\\n\\\n2) The standard get file dialog on system 7.x would not terminate if you did a cancel.\\\n\\\n3) The InterfaceLib had to be weak linked to prevent CFM startup issues. \\\n\\\nV3.0.6\\\n\\\n1) Alias resolving is less aggressive.\\\n\\\n2) We no longer cache image reads or writes. This was done because OS 9.1 allows you to have very large disk caches, and it's pointless to cache the image read or write.\\\n\\\n3) The file flush primitive now actually flushes the file via an OS call. This was a bug in the CodeWarrior 5.3 source code.\\\n\\\n4) The 68K version was being built with the 68881 math library. This fails on 68040LC chips. We now use the non-68881 math library. Thanks to Bruce ONeel for find this.\\\n\\\n5) A bug was found in the path resolving logic that was added for 3.x. This bug apparently only affects 68K machines,  never was identified as a PowerPC issue. \\\n\\\n6) The Netscape plugin needs a properly allocated clip region, this code seemed to work ok on new systems, but fails on system 7.6.1\\\n\\\n7) The security interface will create a Documents folder on the root volume if the default Document folder has been deleted. This is needed for security purposes. \\\n\\\n8) Jitter needs 1MB of free memory to run.\\\n\\\n9) 68K machines require another 32K of stack\\\n\\\n10) Threads  now work on 68K machines, but turned off because of possible performance issues. (I think more study is needed).\\\n\\\n11) The 68K version was compiled with better optimization, expect a 15% improvement.\\\n\\\n12) fix for BitBltPlugin ascii = byteAt((sourcePtr + charIndex) - 1);\\\n\\\n13) The interpreter object validation checking code was alter to work correctly.\\\n\\\nV3.0.5\\\n\\\n1) sqConfig.h changed due to BE OS header changes\\\n\\\n2) sqMacDirectory.c. Added support for Navigation services or Standard File Get to find the image at startup time when the Squeak.image is not found by the VM. This replaces the DOS like console message that comes up saying that Squeak can't find a image.\\\n\\\n3) A fix to drag and drop for the browser plugin.\\\n\\\n4) We now use Apple's cooperative multithreading package to run the UI in one thread, the VM in the other. This solves some issues with the browser and makes the UI versus VM logic and execution responsibilities easier to understand. \\\n\\\n5) Changed the sqMacNSPlugin.c code to support a 3.0VM using multithreading support. This should give Squeak in a browser better performance. Also changed the full screen support to correctly work with multiple monitors.\\\n\\\n6) BitBltPlugin.c gets one more op code\\\n\\\n7) Added the security interface\\\n\\\n8) Added the file flush primitive\\\n\\\n9) Rewrote the macintosh readme file\\\n\\\n10) Revisited the zoomWindow code and found a bug with multiple monitor support, then I fixed the code to make Full Screen mode work on screen that Squeak window is mostly on, versus the menubar screen. Also if you switch from full screen back it resizes the window back to the orginal size and location before you invoked the full screen. \\\n\\\nV3.0.2\\\nPlugins\\\n\\\nRecompiled the internal BitBltPlugin plugin to encorporate:\\\nChange Set:\t\t258AlphaBlendOpt-dsm\\\nAuthor:\t\t\tDuane Maxwell, Paul Phillips/exobox\\\na) Short circuits full opaque and full transparent pixels when alpha blending.\\\n\\\nRecompiled the internal LargeIntegerPlugin\\\n3298LargeIntegersV1-2-sr -- Stephan Rudlof -- 29 November 2000\\\n3299LargeIntV1-2For29-sr -- Stephan Rudlof -- 29 November 2000\\\n\\\nVM Software\\\n\\\n(b) PowerManagement for macintosh is now supported. You can disable the power manager to give you better performance on some powerbooks at the expense of battery life. See the Preferences Panel for details, category 'Performance'\\\n- changed sq.h\\\n- changed sqMacWindow.c to add support for power mgr disabling\\\n\\\n(c) Drag and Drop support for the macintosh, dragging files from the Finder to the Squeak window is now supported.\\\n- sqMacDragDrop.c added\\\n- sqMacWindow.c changed\\\n\\\n(d) Added primitive for get macintosh creator and file type.\\\n- sqMacDirectory.c changed\\\n\\\n(e) Carbon support. Thanks to Karl Goiser karl@wattle.net for work he did on sound and other Carbonization hotspots.\\\n- sqMacAsyncFilePrims.c changed\\\n- sqMacFFIPPC.c changed (not supported for Carbon)\\\n- sqMacNetwork.c changed per Apple tech note 1173 Carbon asset tracking\\\n-sqMacSerialAndMIDIPort.c chnaged (Not supported for Carbon)\\\n- sqMacSound.c changed per Apple tech note 1198 Carbon double sound buffer playing\\\n- sqMacWindow.c changed (various changes for Carbon)\\\n\\\n(f)  Poll at least 60 times a second for the mouse if required. Previous 2.9.x VM did it 30 times but this is too slow and 2.8.x VM do it 60 times a second.\\\n\\\n(g) Reworked path support Thanks to Karl Goiser karl@wattle.net for starting this.\\\n- sqmacDirectory.c changed reworked lookupPath\\\n- sqMacWindow.c changed, added GetApplicationDirectory to get application directory\\\n\\\n(h) I rewrote the sqMacDirectory.c logic to enable proper understanding of Apple's Alias logic. This means for example you can alias the \"SqueakV3.sources\" file and then only have one copy and have all your images point to it. \\\n\\\n(i) Added Zoom Window support.\\\n\\\n(j) Change the Squeak change file icon to better match Apple's visual guidelines, Thanks to Doug Way for the suggestion and the new icons.\\\n\\\n(k) The sound plugins have changed...\\\n\\\n(j) Dropped FFI out of the base Squeak because of security concerns\\\n\\\n(k) Compiled for 750(G3) processor versus 603\\\n\\\n(l) Added screenDepth primitive\\\n\\\nThe 3.0.x VM contains most of the optional plugins, you might want to check this by inspecting \"Smalltalk listBuiltinModules\" to see where your plugins are coming from. In some case people have been accidentally overriding the new builtin plugins with older plugins. \\\n\\\nThe file \"Squeak 3.0Alpha10MT.sig\" contains the PGP signature for the Squeak 3.0Alpha10MT VM\\\n\\\nJohn M McIntosh  johnmci@smalltalkconsulting.com\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n}"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Documentation/3.7.3 Release Notes.rtf",
    "content": "{\\rtf1\\mac\\ansicpg10000\\cocoartf102\n{\\fonttbl\\f0\\fnil\\fcharset77 Geneva;\\f1\\fswiss\\fcharset77 Helvetica;\\f2\\fnil\\fcharset77 Monaco;\n\\f3\\fnil\\fcharset77 LucidaGrande;}\n{\\colortbl;\\red255\\green255\\blue255;\\red137\\green19\\blue21;\\red26\\green26\\blue255;}\n\\margl1440\\margr1440\\vieww17300\\viewh12720\\viewkind0\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0\\fs24 \\cf0 Mac VM 3.7.3 mach-o build for Carbon, and build for Classic. Support for Croquet, and support for Safari\\\nApril 23th, 2004 (3.7.3bb)\\\n\\\nStill yet to do, in future versions -> Verify that file delete rename etc works on aliases, not the targets. (Yawn, someday)\\\n\\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\n\\\n3.7.2 seems a fine VM, from what people tell me, but now we've 3.7.3...\\\n\\\n3.7.3b4\t\t\tNumerous changes for Unicode file name support, and proper support for keyup/keydown on os-x. \\\n\\\nsqVirtualMachine.c\tVM_PROXY_MINOR set to  6  to support isArray = isArray;\\\n\\\ninterp.c\t\t\tNew VMMaker code update, major change is to use dispatchFunctionPointerOnin logic to dispatch \\\n\t\t\t\tprimitive calls, versus going via a jumptable/case statement. Also Tim reviewed the usage of the \\\n\t\t\t\tmillisecond clock and improved things so we don't need to check the clock on every prim call. This \\\n\t\t\t\tmakes the RISC and other platforms faster. However it only has minor effect on the os-x carbon VM \\\n\t\t\t\tbecause of how the cheap millisecond clock is implemented.\\\n\\\nsqMacDirectory.c\tChange dir_Lookup  // HFS+ imposes Unicode2.1 decomposed UTF-8 encoding on all path elements\\\n\t\t\t\tPer request from \n\\f1 Tetsuya HAYASHI <{\\field{\\*\\fldinst{HYPERLINK \"mailto:tetha@st.rim.or.jp\"}}{\\fldrslt tetha@st.rim.or.jp}}>\\\n\\\nsqMacEncoding.c\tAlter SetVMPath() \n\\f0 per request from \n\\f1 Tetsuya HAYASHI , \\\n\t\t\t\tadd support for \n\\f2\\fs20 \\CocoaLigature0       \\\n\t\t\t\t\\cf2 \"ShiftJIS\"\\cf0  kCFStringEncodingShiftJIS\\\n\n\\f1\\fs24 \\CocoaLigature1 \\\nsqMacFileLogic.c\tAlter makeFSSpec(), get  kCFStringNormalizationFormD path name\\\n\t\t\t\tAlter PathToFile(), get kCFStringNormalizationFormKC path name\\\n\t\t\t\tAlter QuicklyMakePath() get kCFStringNormalizationFormKC path name\\\n\t\t\t\tNew routine unicode2NativePascalString()\\\n\t\t\t\tAlter makeOSXPath, get kCFStringNormalizationFormKD path name\n\\f0 \n\\\n\t\t\t\tAlter resolveLongName, get kCFStringNormalizationFormKC path name\\\n\t\t\t\tAlter FSMakeFSSpecCompat(), call \n\\f1 unicode2NativePascalString to normalize path name\n\\f0 \\\n\\\nsqMacMemory.c\tAllow browser plugin to allocate 512MB of VM space for image under os-x. \\\n\\\nsqMacUIAppleEvents.c Use CFStringGetSystemEncoding versus suggested plist.info suggestion because the encoding info is quite right yet at\\\n\t\t\t\tthis point in the startup time.\\\n\\\nsqMacUIEvents.c\tKey Up is  now reported as an event when the key is released. Earlier os-x carbon VMs would report the key up after the\\\n\t\t\t\t keystroke was processed by Text Services, which was incorrect. We also deal with Key repeat correctly and don't send\\\n\t\t\t\tanother key down event. This change has made it possible to properly support Morphic games where key up/down state is\\\n\t\t\t\timportant to game interaction. \\\n\\\nsqMacWindow.c\tFix crash in ShowWindow(). This was due to a pthread race condition between the UI thread and interp.c. \\\n\t\t\t\tFixed by using UI callback to handle the show screen call. Would show up as a crash before window appeared.\\\n\\\n3.7.3bx\t\t\tEarlier versions of 3.7.3 were released to confirm the file changes for Japanese users worked correctly, and to \\\n\t\t\t\tconfirm that the keyUp logic changes worked as desired.\\\n\\\n3.7.2b1 \t\t\tChanges for NPSqueak to fix issues with full screen mode under Safari 1.2 (V125) \\\n\t\t\t\tUsage of VMMaker3-7b2 to build interp.c\\\n\t\t\t\tUnicode values now come up from the classic VM versus the historical (1984) keycode values, this makes Tweak work.\\\n\t\t\\\n3.7.1b2\t\t\\\nJPEG READER WRITER\\\n\t\t\t\tusage of Apple '-fast' uncovered a source code issue, initialization routines for internal jpeg plugin were not returning true or false, before this was kinda of considered as true. But when compiled with -fast it's zero, meaning the inialization failed, but that is bogus.\\\n\\\n3.7.1b1\\\n\t\t\t\tUse of \"-fast\" apple gcc 3.3 compiler option, improves sends by significant %\\\n\t\t\t\t\n\\f1 On EventKeyUp/EventKeyDown you get the UniCode On EventKeyChar you get the UniCode->MacRoman translated character.\\\n\t\t\t\tBroke high bit ascii macroman in 3.7.0bx.\\\n\t\t\t\tFor multi-byte character input you get EventKeyDown/EventKeyChar/EventKeyUp for each unicode character coming from the input sequence.\\\n\n\\f0 \\\n3.7.0b2\t\t\\\n\n\\f1 \t\t\t\ta) You can alter the application's Info.plist by setting the SqueakEncodingType using the ICANA readable names\\\n\\\n\t\t\t\tmacintosh\t- >macRoman\t\\\n\t\t\t\tUTF-8\t\t-> UTF-8\\\n\\\n\t\t\t\tb) Support for sqSocketListenOnPortBacklogSizeInterface, which allows you to specify the interface to use for the listen should work both for os-x and os-9.\\\n\t\t\t\tc) Usage of VMMaker3-7a2.\\\n\t\t\t\td) Special change sets: make primitive point x/y internal, and slightly faster activate.\\\n\n\\f0 \\\n3.7.0b1 \t\t\t\\\n\n\\f1 \t\t\t\t Changes for the \"m17n\" package fromTetsuya HAYASHI <{\\field{\\*\\fldinst{HYPERLINK \"mailto:tetha@st.rim.or.jp\"}}{\\fldrslt tetha@st.rim.or.jp}}> so one can type Kanji characters.\\\n\\\n\n\\f0 3.6.1b7\t\t\t\\\nSqMacWindow.c\tFix for new rending code when used with 2.8 or earlier images, mouse clicks reported in wrong place\\\n\\\n3.6.1b6\\\nSqMacWindow.c\tEnable 8bit all modes of 8 bit rendering\\\n\\\n3.6.1b5\\\nSqMacWindow.c\tEnable 8bit support for 8->8 8->16 8->32 \\\n\\\n3.6.1b4\\\nSqMacWindow.c\tFix issues with title bar height calculation, was using the wrong window region to do this. Also failed \\\n\t\t\t\tfor full screen usage. Tinkered a bit with ioDisplay moving bytes, now do <=32 bytes directly. \\\n3.6.1b3\\\nSqMacWindow.c\tAlter logic to allow for 16->32 and 32->16 mapping using direct copy logic. Workaround for \\\n\t\t\t\tos-x 10.3.0 copybits bug. Released for limited testing. Awaiting real fix from Apple.\\\n\\\n3.6.1b2\\\nSqMacWindow.c\tAlter to use unix direct port bit copy versus copybits to get around a crash caused by a bug\\\n\t\t\t\tin os-x 10.3.0 copybits. Released for limited testing\\\n\\\n3.6.0b2\\\nBuild from about to be offical 3.6.0 VM, Balloon & VM Maker source.\\\nAdded in \\\nArraysToGlobalStruct-JMM.1.cs\\\n\t?3.7 Status unknown, but makes better interp.c interpreter loop code (silly optimizer).\\\nFasterCopyLoop-JMM.4.cs\\\nFasterCopyLoopPart2-JMM.2.cs\\\n\t?3.7 Status unknown, but makes drawing 20%+ faster due to better PowerPC code optimizations\\\nFasterLookupMethod-JMM.1.cs\\\n\t?3.7 Status unknown, but makes method lookup a bit faster. \\\nMakePrimPointXInternal-JMM.1.cs\\\n\t?3.7 Status unknown, but makes point x/y access faster.\\\n\\\nSlightlyFasterActivate-JMM.3.cs\\\n\tRolled into 3.7\\\n\\\nYou need 3.5.3b1 for Safari plugin support\\\n\\\n3.5.3b1  (browser plugin)\\\nFixed issues with IE drawing and crashs related to screen updating in non-thread safe IE.\\\n\\\n3.5.2b6\\\nFixed issues with plugin discovery for netscape plugin \\\n3.5.2b5\\\nFixed primitive dispatch to use gnuified jump table. \\\n\\\n3.5.2b4 \\\nFix issue with race on open doc events and squeak VM Thread for drag and drop support when starting squeak\\\nFor os-x expose primitivePluginBrowserReady, not the rest of the URL browser primitives, they don't work in Safari\\\nFor system attribute 1003 return powerpc versus PowerPC to match unix VM\\\nStart timers later in the VM startup logic, after reading the image, versus before.\\\nsqMacNSPlugin.c \t- Look for Squeak folder in User, local, Network, System domains versus just User.\\\nsqMacTime.c\t\t- Use old delay logic (1ms accurate), versus aioPoll (10ms accurate).\\\nsqMacUIEvents.c\t- Only create PowerManagerDefeatTimer tick routine if power manager tapping is required which is only os-9 anyways.\\\nsqMacUIMenuBar.c - Draw menu bar later in startup, after we change it, save 200+ms\\\nBitBltPlugin.c\t\t- alphaSourceBlendBits16  Use table lookup which is 90% faster\\\n\t\t\t\t- copyLoopNoSource, roll constants into register versus recalculating.\\\n\\\n3.5.2b2 \\\nFix applescript document handling logic to prevent overrunning the drag/drop logic via the command line open cmd by using a spin loop\\\nto ensure Squeak has sufficent time to read the file name. \\\n\\\n3.5.2b1 \\\nChanged the bitBlt copyloop logic to use locals in safe places, versus globals. This improves drawing by 5%.\\\nMajor change is usage of GCC 3.3, versus GCC 2.95.x This increases send/second by about 8%.\\\n\\\n\\\n3.5.1b5 Added some more user changeable attributes, and changed some window behaviour when floating\\\nOS-x Version only \\\nSqueakWindowHasTitle\t\t- (Yes/No) yes if window should get title.\\\nSqueakFloatingWindowGetsFocus (Yes/No) yes if window should allow click and type if floating.\\\nSqueakMaxHeapSize\t\t- (Number) set to 512K, max size for os-x memory heap. Note changing this to 1GB may or may not cause a \\\n\t\t\t\t\t\tcore dump depending on where os-x allocates the memory segment above or below the 2GB boundary. \\\n\\\nsqMacUIEvents.c\t\t\t- set keyboard focus to floating window if required, do not hide floating window when we go to full screen mode.\\\nsqMacWindows.c\t\t\t- watch out for memory leak when we free the color table. \\\n\\\n3.5.1b4 Please note the major changes to network code in 3.5.1b2\\\na)Added options SqueakWindowType & SqueakWIndowAttributes to info.plist. The SqueakWindowType of 6 is the standard document window, a type of 8 is the floating utility window. The attributes control with window attributes and behavior according to\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f1 \\cf3 \\ul \\ulc3 http://developer.apple.com/techpubs/macosx/Carbon/HumanInterfaceToolbox/WindowManager/Window_Manager/wind_mgr_ref/constant_2.html#//apple_ref/c/tdef/WindowAttributes\\\n&\\cf0 \\ulnone \\\n\\cf3 \\ul http://developer.apple.com/techpubs/macosx/Carbon/HumanInterfaceToolbox/WindowManager/Window_Manager/wind_mgr_ref/constant_1.html#//apple_ref/doc/c_ref/WindowClass\\cf0 \\ulnone \\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 b) Sockets are not valid if the network is not initialized. \\\nc) The os-9 vm can return the open file error in the vm attribute data 1202\\\nd) MyWindowEventMouseHandler was leaking region handles.\\\ne) Support for primitiveClosureValue, primitiveClosureValueWithArgs, primitiveExecuteMethod\\\nf) when rootTableCount  goes > 2400 then allocationCount gets allocationsBetweenGCs + 1 \\\ng) BitBlt Alpha Blending has changed\\\nh) Added primitiveWrite24BmpLine\\\ni) The guard if statement for primitiveSerialPortRead was flawed, noted the buffer overflow, but then proceeded, versus returning. \\\n\\\n3.5.1b3 \\\na) Fix, Stephane Ducasse <ducasse@iam.unibe.ch> pointed out that using a virtual desktop we had a crash in ioSetFullScreen. This \\\nwas due to a pthread race condition between the UI thread and interp.c. Fixed by using UI callback to handle fullscreen window/move/resize.\\\n\\\n3.5.1b2\\\na) Switch to aio.h logic and unix socket logic! This is a MAJOR change!!!!\\\n\\\nb) Call aioPoll  (select()) to cause process wait versus old pthread logic. This follows in the footsteps of the unix port. You should verify that \\\ncpu time when squeak is idle is not affected in a dreadful manner.\\\nc) Fix, if you call does this directory exists on a file now you will get an error which will signal that the directory does not exist. This ensures\\\nthe FileDirectory test suite works. \\\nd) Fix, if you quit the browser plugin, check the status of the pthread_cancel before attempting the pthread_join\\\n \\\n3.5.1b1 limited distribution\\\n\\\n3.5.0b4 \\\na) os-x exposed an issue with EToyPeerToPeer support. It seems under os-x we get the connect, data, close so fast on lans that by the \\\ntime we get around to asking for the remote IP address the connection is closed, and our open transport call fails. We change SqMacNetwork.c to \\\nreturn the IP address discovered at connect time in this case. Under os-9 we never saw this behavior because we suspect the network activity \\\nwas slower and more serialized. \\\n\\\n3.5.0b3 (Safari support)\\\n\\\na) The plugin logic was changed to support Safari and better support os-x. This required building a CFM stub to load the mach-o compiled\\\nNSPLugin. The mach-o plugin now uses a pthread for the interp.c loop. This gives much better performance and user UI feedback. \\\nb) The GC logic was carefully reworked to optimize the assembler on the ppc. This gave us upwards of a 30-50% improvement, since \\\nincremental GC is going on all the time, this change actually has a effect you can see say in the solitaire example where we save 10%. \\\nc) sqMacNetwork.c was modified, first change in many years. The remote address and port number are requested as an async operation. \\\nThe operation times out after a few milliseconds. This was never a problem in os-9. Now it seems there is an issue sometimes for DHCP clients\\\non os-x. There the operation can timeout and return 0 as the address or port. We changed the call to do a sync operation to avoid a timeout.\\\nd) sqMacMain.c was modified to allow for pthreads for mach-o netscape based squeakland plugin support\\\ne) sqMacMemory.c changes for mach-o plugin support\\\nf) sqMacTime.c changes for  mach-o plugin support\\\ng) sqMacUIEvents.c changes for mach-o plugin support\\\nh) sqMacWindow.c changes for mach-o plugin support \\\ni) npmac.cpp now this is a netscape glue routine, I changed it to ensure we can see the entry points, originally they are C++, but need \\\nto be \"C\" so the loader can find the names the CFM glue routine is looking for. Also we add the logic TV2FP to setup the mach-0 to CFM code stubs to allow the mach-o plugin to callback to the CFM stubs in Safari. \\\nj) sqMacNSPlugin.c \\\n\t1) Rearrange when the interpret() thread is started to ensure a race condition doesn't happen.\\\n\t2) use Pthreads for the mach-o osx version. \\\n\t3) rework NPP_SetWindow to start interpret() when needed. \\\n\t4) Alter StartDraw, EndDraw to use a mutex lock and handle os-x port locking to prevent races between pthreads.\\\n\t5) Alter ioShowDisplay, optimization and handle os-x\\\n\t6) fix ioSetFullScreen to make it work on Safari\\\n\t7) fix OpenFileReadOnly to make it work on os-x, needed sqFileNameFromStringOpen macro call\\\n\t8) Alter ExitCleanup to mutex lock to prevent race ending issues, and add a bit more cleanup\\\n\\\n\\\n\\\nNote some versions of 3.4.1 were distributed for testing only, these are superseded by 3.5.0\\\n\\\n3.4.0b2 (Croquet support)\\\n\\\na) Ensure vmVersion information reports correct information, was bogus in 3.4.0b1\\\n\\\n3.4.0b1 (Croquet support)\\\na) Added plugin BMPReadWriterPlugin 14 November 2002 (i)\\\nb) B3DAcceleratorPlugin.c gets primitiveCreateRendererFlags (new api)\\\nc) two more op codes get added to BitBltPlugin (fixAlphawith, pixClearwith)\\\nd) Squeak3D gets (b3dOrthoNormInverseMatrix, b3dTransformDirection,b3dTransformPoint,b3dTransposeMatrix)\\\ne) The scroll wheel mouse logic was using apple cmd key as the modifier on the arrow key events, Other platforms use the Control key. So the \\\nmac falls in line (changed to use the control-key)\\\n\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\\cf0 \\\nNotes About previous VM.\\\n3.2.6 VM classic have an issue when the tickcount clock goes over 0x7FFFFFFF, about 24 days. \\\nThis exhibits itself when Squeak won't accept user input, or allow you to switch under os 9 or earlier after 24 days,\\\nor starting a Squeak image hangs during the initial screen painting.\\\nRestarting the mac solved these problems. Force quitting Squeak does not.\\\nThis is fixed in 3.2.7b3\\\n\\\nSome issues with alias files and folder were fixed in 3.2.7b6 and 3.2.8b3\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\\cf0 \\\n3.2.8b9\\\na) recompiled os-x version, 3.2.8b8 seem to have a bad compiler option and gave 20% less performance.\\\n \\\n3.2.8b8\\\na) exposed \n\\f1 vmParameter\n\\f0  24 & 25 which control how memory is allocated/freed \\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f1 \\cf0 Smalltalk vmParameterAt: 24 put: 48*1024*1024.\\\nSmalltalk vmParameterAt: 25 put: 24*1024*1024.\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 b) Added argv,argc, env variables to main\\\nc) Fixed for Jaguar 10.2. Full screen mode cmd-tab broke menu bar hiding, this is a 10.2 bug\\\nd) Added support for IP_ADD/DROPMEMBERSHIP and the ability to bind to the wild card port (0).\\\ne) OpenGL changes for TEA\\\n\\\n3.2.8b7 was testing release and not distributed to the public.\\\n3.2.8b6 was testing release and not distributed to the public.\\\n3.2.8b5\\\na) Oops broke the logic returning the vmversion information in classic. Also incremented os-x version (which was fine) to keep numbers in sync\\\n\\\n3.2.8b3 The squeak.sourceforge.net CVS tree was reorganized and the project builder project revamped. The \\\nmajor change to the source was upgrading the netscape browser plugin to 3.2.7b6 levels.\\\n\\\na) Gnunifer.3.cs Changed to add register var on FOO_REG and to remove sqGnu.h file embedded in method.\\\nb) sqMacDirectory.c Add logic to handle case of building as CFM carbon plugin under CW6, needed some carbon calls\\\nc) osExports.c needed to ifdef out the getUIToLock entry point (not available as CFM carbon browser plugin)\\\nd) sqMacFileLogic.c Fix alias problem. Add logic to deal with path names as CFM carbon browser plugin, ensure vmPath is correct.\\\ne) sqMacImageIO.c Cast to get rid of warning message\\\nf) sqMacMain.c Cast to get rid of warning message, Check for CFM Carbon and bundle check. Revise vm parm 1201 code to return long file names are ok as CFM carbon browser plugin. Some diagnostic routines for printing to the console as CFM carbon browser plugin.\\\ng) sqMacMemory.c Logic change as CFM carbon browser plugin.\\\nh) sqNSPlugin.c\tFix to beginFullScreen logic (carbon call is broken?)\\\ni) sqMacUIEvents.c Remove getUIToLock dummy call. This entry point should only exist for mach-o carbon builds. Not CFM carbon browser plugins\\\nj) sqMacWindow.c  Use old call to create window when a CW 5 carbon application.\\\nk) sqPlatformSpecific.h Change #ifdef to correct logic error when building as CFM carbon browser plugin under CW 5.\\\n\t\\\n\t\\\n\\\nMay 31st, 2002 (3.2.7b6)\\\nFor 3.2.7\\\n\\\n3.2.7b3 We build the VM using patchs to enable globals as a structure. This improves performance by 10%\\\n\\\na) Classic Vm builders might need to add \"struct foo *foo = &fum; \"  to int interpret(void). \\\nb) readme: add notes about changesets and alter build instructions\\\nc) sqMacFileLogic.c: use accessors for interp.c globals\\\nd) sqMacMain.c: use accessors for interp.c globals. Also Alain Fischer added logic to fetch os-x version number and to enable you to put squeak.image in the resource folder for autostarting.\\\ne) sqMacTime.h: Fix busted lowresclock again. After 24 days of mac uptime, 3.2.6 squeak will hang.\\\nf) sqMacUIEvents.h: use accessors for interp.c globals.\\\ng) sqPlatformSpecific.h: alter sqFTruncate to use fileno() as needed.\\\nh) sqMacWindow.c: use accessors for interp.c globals.\\\ni)  3.2.7b5 sqMacFileLogic.c: change vmpath to resolve to classic VM if vm is moved from MacOSClassic folder\\\nj) Misc changes for Netscape plugin support\\\nk) Introduce osExports.c logic\\\nl) 3.2.7b6 Fixed a problem in path name resolving need to use UTF8 to properly interact with high ascii characters\\\nm) 3.2.7b6 Fixed a problem in path name resolving there was a bug with certain types of alias path name combinations in quick name resolving.\\\n\\\nMac VM 3.2.6 mach-o build for Carbon, and build for Classic.\\\nMarch 14th, 2002\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f3 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\nNotes About previous VM.\\\n3.2.6b6 Classic or earlier has a bug that makes it stop collecting user input on a 19.88 hour cycle depending on reboot time.\\\n\tSeems many systems don't run for more than 19 hours so we've not had major complains about this issue. \\\n\tBug was introduced in 3.2.1.\\\n3.2.5 has a bug that prevents the use of accented characters without \\\n\ta image patch to fix a VM issue (not an issue in 3.2.4). Also you can't enter an double keystroke characters, ie ^ \\\n\twhich makes life difficult. It also does not support the AppleScript Plugin (not an issue in 3.2.4)\\\n3.2.4 a bug in project builder introduced a performance problem (bad compiler options).\\\n\\\nSee the 3.2.5 about why this 3.2.6 is different inside.\\\n\\\nFor 3.2.6:\\\na) Change an internal number that dictates how often pending interrupts should be looked at from 5ms to 3ms This improves \\\ndelay accuracy.\\\nb) Change how sleeping is done when squeak is idle. This reduces CPU consumption, and improves Delay accuracy.\\\nc) Fix bug with high bit problem with keyboard (accented characters are ok now)\\\n  c2) 3.2.6b6 has fixed characters that require multiple key strokes to enter.\\\nd) Externals that make UI interactions (IE AppleScript) Must now make a call back to the VM to schedule\\\n    the main thread to do the call that will invoke UI interaction to prevent a deadlock in Carbon between threads. \\\n   See the OSAExecute call in the AppleScript plugin for details.\\\ne) If you run a classic mac VM more than 23.x days nonstop it will stop responding to UI events.  Ensure clocks get anded with 536870911.\\\nf) signal inputSemaphoreIndex because we are mulithreaded. Not that it does anything for us yet...\\\ng) 3.2.6b6 Pass the unicode value of the keystroke up as the EventKeyDown/EventKeyUp data, versus mackeyboard code.\\\nh) Somewhere there is a bug with mktime + time, so use the unix code of time+localtime+gmt \\\ni) Change iorelinquishPrcessorForMicroseconds to sleep the quatum between now and wakeup time. Also schedule a\\\n   check for interrupts if wakeup time is now or in the past. This improves delay accuracy. For OS-x this was a big deal,\\\n   for os-9 it improves things by 1 or 2ms. Also in  os-x we sleep more when idle so CPU usage goes down.\\\nj) On OS-9 umap AND free the VM backing store. Just doing the free doesn't work and you lose 128Mb of disk space until you reboot\\\nk) 3.2.6b7 for post event processing ignore mouse move/drag/or scroll wheel events. These are ignored by the open/gl plugin and only suck a major amount of CPU time to process in the post event processing logic. \\\nl) 3.2.6b8 (3.2.6b4 classic) removed call to uncouple shift keys introduced in 3.2.1. This causes some macs after sleeping not to respond to keyboard input\\\nm) 3.2.6b8 (3.2.5b7 classic) added function for ioLowResMSecs to avoid early bit overflow. Rework clock checking in ioHandleEvents to handle clock rollovers properly.\\\n\\\nMac VM 3.2.5 mach-o build for Carbon, and build for Classic.\\\nMarch 4th, 2002\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f3 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\n\\\nBeware this version of the VM is significantly different inside! \\\n\\\n\\pard\\tx1440\\tx2880\\tx4320\\tx5760\\tx7200\\ql\\qnatural\n\n\\f1 \\cf0 a) Broke sqMacWindow.c into 10 different files by function type.\\\n\\\nb) Moved most of the memory allocation logic out of sqMacMain.c into sqMacMemory.c. and ensure memory is freed when Squeak is terminated. \\\nThe major change in this code is support for OS 9.x virtual memory mapping. This only applies to Mac OS 9.2.0 or higher, excluding os-x. It appears  Mac OS 9.1 has a bug that prevents this feature from working.\\\n\\\nFor images that require less than 128MB of memory, mapping is used to allow the image to grow/shrink to the 128MB boundary, therefore you can change the application memory size to about 2MB. \\\n\\\nFor images that require more than 128MB then change the application memory size to > 128MB and mapping will not occur. \\\n\\\nIf mapping is not available because virtual memory is turned off or the api is not supported by the macintosh OS then mapping is not used. Note that mapping is not support under the classic os-9.x environment under OS-X, however in this case you should be using the OS-X version of Squeak, not the classic version.\\\n\\\nc) Use of Carbon event logic for OS-X only. This is a major structural change. \\\n\\\nIt also encouraged the use of a pthread for interp.c. \\\n\\\nAll user interaction with the VM follows a new code path, so problems with keyboard or mouse input should be reported asap. Also any issues with application switching, windows being brought to the foreground or sent to the background and usage of the full screen logic should be reported asap.\\\n\\\nAs part of this change I have build in support for scroll-wheeled multi-button mice under os-x. Thanks to Doug Way for testing this for me. Maybe someone can post to the list what their favorite 3 button scroll wheeled mouse/trackball is.\\\n\\\nd) Use of a carbon call to get the dominate Device if you have multiple screens. People with multiple screens should confirm window resizing, full screen on/off works as expected.\\\n\\\ne) Corrected comment in sqMacFileLogic.c\\\n\\\nf) Changes to sqMacNSPlugin.c. This makes it compile, but it's not usable yet.\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 \\\n\\\nFeb 20th 2002 3.2.4\\\n\\\nFor this version of the VM I have migrated towards using OS-9 packages. This allows us to provide one \\\nfolder/package that supports os-x and previous operating system versions.\\\n\\\nGiven Squeak 3.2.4Beta1.app\\\nThe classic VM is found in the *.app:Contents:MacOSClassic, with an alias in *.app:\\\nThe mach-o OS-X VM is found in *.app.Contents:MacOS\\\n\\\nIf you are running OS-9 then clicking on the *.app or doing drag and drop will just run Squeak, same applies for OS-X.\\\nIf you are running OS-7.5.5 or OS-8.x then the *.app package will appear as a folder, just open and click on the alias within. \\\nNote that if you want to use classic plugins I suspect you need to put them in the MacOSClassic Folder beside the VM. \\\nBundles for os-x go in the same location as the *.app application package.\\\n\\\nChanges\\\na) Drag and drop at open time with image file that has no meta type, will now open the image, versus prompting you.\\\nb) Use an os-x window attribute at open time to signal that the window should not be moved by the dock when you go to full screen.\\\nc) Fix window update logic to use window that needs updating versus stwindowg to fix issues with print dialog windows in classic. \\\nd) bitblt gets recompile to pickup fixes posted in 3.2 update stream.\\\n\\\nFeb 5th 2002 3.2.3\\\nChanges\\\n\\\na) use old extended time manger to update psudeo-TickCount, versus sigalrm. siglarm make sound recording not work.\\\nb) fiddle with sound recording and make it work.\\\n\\\nJan 2002 3.2.2\\\nChanges:\\\n\\\na) AsyncFilePlugin.c Use global to remember security function entry point for performance reasons\\\nb) FilePlugin.c\tUse global to remember security function entry point for performance reasons\\\nc) interp.c Use squeakFileOffsetType versus off_t and add a bunch of checks to handle lack of long long and conversion errors between 64/32 bit integers and LargeInteger objects\\\nd) readme, it's http://www.mucow.com/Gnuifier.1.cs \\\ne) SocketPlugin.c\tUse global to remember security function entry point for performance reasons\\\nf) sq.h added default sqFilenameFromStringOpen and sqTruncate\\\ng) sqFilePluginBasicPrims.c revert to anti specs, but ensure #def to fseeko and ftello for 64 bit aware file systems.\\\nh) sqMacDirectory.c A bit more error checking on bad file names\\\ni) sqMacFileLogic.c Folders size is now zero in classic, and a bit more checking on bad file names\\\nj) sqMacSound.c Fixed a problem with sound recording in classic due to a change made in Sept. But sound recording still does not work under os-x\\\nk) sqMacWindow.c  two very important changes:\\\n\\\n\t1) You can now do FFI calls with the FFI bundle plugin to Mach-o frameworks. \\\n\tHowever you need to rework your api calls. For example:\\\n\tapiGetMousePoint: aMacPoint was\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'InterfaceLib'>\\\n\tIt now is:\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'Carbon.framework'>\\\n \t\\\n\tIf you review /System/Library/Frameworks I'm sure you can come up with interesting ways to \\\n\tmake mac only squeak images.\\\n\t\\\n\tI now use map( NULL, gMaxHeapSize, PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED,-1,0);\\\n\tanonymous memory mapping to 512MB as the squeak memory block. The VM can then grow or shrink\\\n\twithin the 512MB block, I just move a pointer. \\\n\t\\\n\tNote in 3.2.1 a slight error on my part restricted Squeak to 50MB. I am of course\\\n\tinterested to hear about issues with my choice of 512MB. Note a Squeak VM is limited to 2GB under perfect \\\n\tconditions, however if any part of the image crosses the 2GB boundary the VM will fail, right now 512MB\\\n\tseemed a safe choice.\\\n\t\\\n \tPhysMem:  60.2M wired, 78.6M active,  412M inactive,  551M used,  217M free\\\n\tVM: 3.03G + 55.3M   7847(0) pageins, 1(0) pageouts   \\\n\tPID COMMAND      %CPU   TIME   #TH #PRTS #DREGS RPRVT  RSHRD  RSIZE  VSIZE\\\n\t422 Squeak VM    0.8%  0:35.59   2    71   100  23.3M  8.53M  26.5M   571M\\\n\\\n\tbut I only have one 80,000,000 byte swap file in /var/vm\\\n\\\nNote if you turn crash reporter on, then if the VM crashes a nice report should be generated in your log directory.  See the Apple documentation for a description of this feature, currently it is set in OS-X 10.1.x via the preferences window for the Console Application. If you have a crash with this VM, please recreate and post the crash log (found in Users/foobar/Library/Logs/ to the Squeak mailing list so we can continue to make the VM fault tolerant.\\\n\\\n3.2.1 Notes\\\n\\\nYou might need these change sets to build a new VM or to use all the features of this VM with your image, hopefully these will get into the pending 3.2.x image.\\\n\\\nFixes and feature extensions.\\\nAsyncFileFixFu...hName-JMM.1.cs \tfix for async test method.\\\nDragAndDropAtStart-JMM.5.cs\t\tfix to enable drag and drop at startup\\\n\\\nNeeded to compile a VM with VMMaker\\\nLargeFiles-JMM.3.cs\t\t\t\tEnable large file support, files > 2GB\\\n\\\nNeeded to turn this feature on\\\nMacLongFileName-JMM.5.cs\t\t\tEnable long file names on the mac\\\n\\\nThe SUnit\\\nMacLongFileNamesSUnits-JMM.3.cs\tTest long file names and long directory names and large file support\\\n\\\nKinda optional features some people might need.\\\nInternetConfiguration-JMM.5.cs\t\tAllow internet configuration information access, internal plugin\\\nUUID-JMM.3.cs\t\t\t\t\tAllow UUID generation, internal plugin\\\n\\\na) The ability to get back a UUID. This uses the hosting UUID generator if the\\\n hosting OS supports it and we have a primitive we can call. If not then we generate\\\n a type 4 version of a UUID (the random bits one).\\\n(This requires a special change set)\\\n\\\nb) Ability to start squeak on the mac by dragging multiple documents onto the\\\nimage, or drag and drop of stuff onto the running VM icon.\\\n(This requires a special change set)\\\n\\\nc) Usage of the Internet Configuration tool kit to supply information about\\\nwhat the mac proxy is etc. etc.\\\n(This requires a special change set)\\\n\\\nd) Migrate file system to use 64 bits. This allows you to read/write and seek\\\nwith files > 2 GB. This includes a change to the VM to convert from/to long\\\nlong integers. It also allows the file system to actually deal with 2GB files,\\\nthe current file interface actually fails once the file exceeds 1GB.\\\n\\\ne) For the carbon based Squeak VM we now support long file names 255\\\ncharacters. Close both eyes and touch everywhere the mac VM deals with file\\\nname paths and hope for the best (Actually we write an Sunit to ensure we've\\\nnot broken everything). This also includes the ability to put an image in a\\\nlong file name directory, but right now the image name must stay under 32 characters.\\\n\\\nFilePlugin.c changes to support large integers.\\\nFilePlugin.h changes\\\nsq.h changes to support large files.\\\nsqConfig.h changes to resolve some conflicts.\\\nsqFilePluginBasicPrims.c  changes to support large files.\\\nsqMacAsyncFilePrims.c changes to use fspec versus 255 file path.\\\nsqMacDirectory.c changes to use hosting OS (OS-X) bsd create and delete directory\\\n and truncate. dir_look changes as part of the general rewrite.\\\nsqMacDragAndDrop.c use new call to get path name from fsspec. Use fsspec more, and added \\\n  interface code to setup drag and drop of items at application startup time. max document name\\\n  goes to 1000 characters.\\\nsqMacFileLogic.c Mostly rewrote!\\\nsqMacSecurity.c use new file calls.\\\nsqMacWindow.c \\\n\tincrease size of vmpath, docpath, imagepath to 1000 chars, shortname to 255 characters.\\\n\tadd logic for left/right modifier keys \\\n\treworked LoadLibViaPath logic \\\n\tsqImageFileOpen uses fsspec versus 255 path name.\\\n\tsqImageFileStartLocation uses ffspec.\\\n\tbundle support for bundles\\\n\t\\\ne2) interp.c supports get/put of large integers to long long integers.\\\ne3) fixed fTruncate\\\n\\\nHint getting this to work was a pain. Think of 255 character folder names and nested aliases,\\\nfolder 1 refers to folder 2 which then refers to folder 1 again, just go down the path say 8 times,\\\nthen ask to create a file or directory!\\\n\\\nf) Support to change the Mac screen resolution under Squeak control.\\\n\\\ng) Fix to unload/load the scrap at startup time to ensure the clipboard is\\\ncorrect when starting up the VM.\\\n\\\nh) Uncouple the shift key and left/right shift keys on old extended keyboard.\\\nAlso add a call to get which keys are currently pressed on a USB keyboard or\\\nthe USB codes for an apple non-usb keyboard. (Note this isn't working quite yet under OS-X)\\\n\\\ni) Changes to enable us to compile the VM under Apple's OS-X Project Builder\\\nenvironments.\\\n\\\nj) Some rewriting to ensure serial and midi support can be written as external\\\nplugins.\\\n\\\nk) Fiddling to get sound input to work under OS-X\\\n\\\nl) Platform.exports changed macintosh to macintoshSqueak to avoid conflict.\\\n\\\nm) Memory is allocated at 50MB at start, then will grow or shrink, verus previous carbon apps\\\n that did 1GB. \\\n \\\nn) sqPlatformSpecific.h changes to support long file names and os-x posix file names\\\n\\\no) sqVirtualmachine.c & sqVirtualmachine.h\\\n#if VM_PROXY_MINOR > 4\\\n\tVM->positive64BitIntegerFor = positive64BitIntegerFor;\\\n\tVM->positive64BitValueOf = positive64BitValueOf;\\\n\tVM->signed64BitIntegerFor = signed64BitIntegerFor;\\\n\tVM->signed64BitValueOf = signed64BitValueOf;\\\n#endif\\\n\\\nBeware this causes an interesting problem, if you compile plugins with VM_PROXY_MINOR now set to 5, then they will not work with older VMs. The solution is to define the VM_PROXY_MINOR in the plugin to the value that indicates what features it is using.\\\n\\\np) Changed to use ITimer logic as a 16ms lowres timer to improve performance\\\n\\\nq) Changed to use single thread, no thread manager.\\\n\\\nr) Changed to use lowres timer in checking for polling time to improve performance\\\n\\\ns) It should have faster startup times.\\\n\\\nt) It will hide the empty window at startup, then show the squeak window when required.\\\n\\\nu) It has a different menu structure.\\\n\\\nv) It does less I/O when navigating directories.\\\n\\\nThe macintosh 3.1Alpha1MT VM, Sept 24th 2001 \\\nThis VM was built with the base  3.1 image at change set #4347\\\nV3.1.1 at change set #4347\\\n\\\n\\\nWe go to V3.1.1 to indicate that the 3.1 VM is being used. In the past the 3.1 Image was used but some changes in the openGL logic makes  3.1 Vm and 3.0 image not quite work correctly with 3d graphics. Although a 3.1 VM will run many images way back to the 2x series no careful study has been done on the ability to do this. So at this point we are indicating this VM is a 3.1 VM and best used with a 3.1 image.\\\n\\\nUse of VMMaker to build VM. As of this version everything can be built as an external except for the window logic which hasn't been decoupled from the VM support for the macintosh. \\\n\\\n1) AsynchFilePlugin the security check for ability to create file is now a plugin call.\\\n2) B2DPlugin logic changes to fillLinearGradientfromtoat\\\n3) b3dRemapFaces, b3dRemapEdges, b3dRemapEdgeList, b3dRemapAET, b3dRemapEdgeVertices, b3dRemapFaceVertices, b3dRemapFaceFree, b3dRemapEdgeFree, b3dRemapAttributes. Some casting and changing of += to = + to make some compilers happy.\\\n4) BitBltPlugin added tableLookupat call.\\\n5) DropPlugin added setFileAccessCallback to allow the Security Module plugin the ability to give us the entry point to turn security off so we can open files as read only when security is turned on.  This was broken in the past. \\\n 6) FilePlugin added fileOpennamesizewrite,getThisSession to allow for callbacks. Changed the file security logic to use the plugin interface. \\\n7) interp.c, fixes for 4347ByteArrayRangeCheck-di, ability to printAllStacks, security calls for image rename, write to use plugin interface.\\\n8) Added GetAttributeString, and recordDragDropEvent and entry points for callbacks.\\\n9) SecurityPlugin changed when initialization is called to initialize the safe and unsafe directorys, also added entry points for all the testing calls so it can be a true plugin.\\\n10) Serialplugin. The serial plugin was redesigned to seperate out MIDI logic. People with MIDI devices and old serial macintosh should check to see if they still work since we lack equipment now to test this obsolete technology set.\\\n11) SocketPlugin. Make security calls true plugin calls.\\\n12 SoundGenerationPlugin. Removed \\\nEXPORT(int) SoundGenerationPlugin_primitiveFMSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveOldSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitivePluckedSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveWaveTableSoundMix(void);\\\nThey were a hack at the plugin level and discussion on the list seemed to show they were no longer used. \\\n13) Checking for if defined (__APPLE__) && defined(__MACH__) for the Mac OS-X native development environment\\\n14) Changed sqMacAsyncFilePrims, usage of interpreterProxy->, plugin calls for getThisSession. \\\n15) Changed sqMacDirectory.c. Removed some utility code and make it a seperate file so that it can be shared between sqMacWindow and other plugins that require them. \\\n16) Changed sqMacDragDrop.c. Added plugin callback for getSTWindow, the sqSetFileAccessCallback logic, fileOpennamesizewrite, and secHasFileAccess. Added logic to do the recordDragDropEvent callback to sqMacWindow.c \\\n17) sqMacNetwork.c. Some cleanup for the OS-X version of the OpenTransport headers, some constants have name changes\\\n18) sqMacNSPlugin.c Use of ioLoadFunctionFrom(NULL, \"DropPlugin\"); versus explicit call.\\\n19) sqMacOpenGL.c. Some cleanup for the OS-X version of the OpenGL headers\\\n20) sqMacOpenGLInfo.c. Some cleanup for the OS-X version of the OpenGL headers\\\n21) sqMacSecurity.c ioInitSecurity calls back to dragAndDrop plugin to set entry point to turn security off.  Added code to create directories if required and ensured callbacks are plugitized.\\\n22) sqMacSound.c Some cleanup for the OS-X version of the Sound headers. Use of interpreterProxy-> in the proper places.\\\n23) sqMacWindow.c Some cleanup for the OS-X version of the compiler.  Fixed saveAsEmbeddedImage, this got broken when we moved from a FAT to a ppc only application.  Altered interface to recordDragDropEvent so that it was plugable. Some file path name logic goes to a seperate C source file. The drag and drop plugin is loaded and intialized after the image is loaded but before the interpreter is started, before it was done a bit earlier in the startup process. This also has the effect of initializing the security module.\\\n24)sqOpenGLRenderer.c. Some cleanup for the OS-X version of the OpenGL headers\\\n25)SurfacePlugin.c gets a hack so it knows when it is internal versus external.\\\n\\\n\\\n\\\nv3.0.18 at change set #4081\\\n(Note browser plugin goes to 3.0.23\\\n\\\n1) sqMacOpenGL.c Quite a few changes were made to the code to support it as an internal plugin for the browser. This is because the drawable frame for a browser plugin is a subset of the browser's grafport, so lots more care must be taken to draw in the correct location using OpenGL. We also fixed issues with re-configurating the Open/GL draw area when the window gets resized or goes to full screen, and attempted to ensure multiple screens will work.\\\n\\\n2) sqMacWindow.c, minor fix to cast a constant char * to char * for CW 6.1\\\n\\\n\\\nBrowser plugin 3.0.23 fixes\\\n\\\n1) Integerated the H/W Acceleration as an builtin plugin\\\n2) Added logic for pre and post event interaction to browser plugin event handler for H/W Acceleration logic. The external H/W Acceleration plugin mostly works with the browser plugin but doesn't work with full screen mode, or if the plugin is embedded in a window or a scrollable frame, so don't use it. Use the browser plugin 3.0.23 or higher which has the H/W Acceleration builtin.\\\n\\\nv3.0.17 at change set #4081\\\n(Note browser plugin goes to 3.0.21)\\\n\\\n1) Added HW acceleration as internal plugin.\\\n2) 4079BBAlphaTextFix-ar Fixes the problem with alpha text, changes BitBltPlugin.c \\\n3) Added primitive on the mac to truncate a file.\\\n4) Added logic to flush volume on a flush file to ensure file and control blocks are flushed.\\\n5) For the Carbon VM we increase nextevent wait time if we get sufficent idle time. This should reduce CPU usage under OS-X\\\n6) GetAttribute: 1002 now returns the gestaltSystemVersion as a hex string, and getAttribute: 1003 now returns either '68K' or 'PowerPC'.\\\n7) Starting with 3.0.17 the VM is build only as a powerpc application. The latest VM as a 68K application will be made available from time to time permits based on people's needs. \\\n8) Changes to sqOpenGLRenderer.c to improve performance, OpenGL 1.1 support.\\\n\\\nPlugin 3.0.21 fixes\\\n\\\n1) added check for mailto: tag on posts to fix problem with Netscape crashing, and IE hanging.\\\n2) Plus above fixes.\\\n\\\nWhat has been fixed/changed.\\\nv3.0.16 at change set #4041\\\n(Note browser plugin goes to 3.0.20)\\\n\\\n1) Lots of fixes for BitBlt and HW acceleration.\\\n2) Hardware Acceleration plugin goes to 1.0.1. Please note there is a seperate plugin with the same name for Carbon. Doing a get info will identify if the plugin is only usable with Carbon Squeak.\\\n\\\nv3.0.15 at change set #4026 (May 17th test version)\\\n(Note browser plugin goes to 3.0.19)\\\n\\\n1) Added support for OpenGL HW acceleration plugin\\\n\\\nPlugin 3.0.19 fixes\\\n\\\na) Obey embedded tag plug\\\nb) Fix problem with plugin 3.0.17 not working with netscape 4.x\\\nc) Carbonize plugin for IE 5.1 \\\nd) Remove debugging printf than occurred on transition to full screen mode\\\n\\\nWhat has been fixed/changed.\\\nv3.0.14 at change set #3987\\\n\\\n(Note plugin goes to 3.0.17)\\\n\\\n1) sqMacDirectory.c. The pathlookup would handle the case of foo:bar::do incorrectly by ignoring the :: path redirection. This has been fixed. However a path lookup will not work if it contains :: and an aliased directory in the middle of the path.\\\n\\\n2) sqMacSecurity.c. The pathname for the untrustedUserDirectory was built incorrectly, and the bug mentioned above in sqMacDirectory.c usually kept this from being noticed.\\\n\\\n3) sqMacWindow.c  we added some logic to do the delay for primitiveRelinquishProcessor, but found it had an large effect on a freecell benchmark. I suspect on a Morpic step wait there is nothing to do so primitiveRelinquishProcessor gets called which then affects response time. So for now we revert to the 3.0.11 behavior, good performance and 100% CPU usage!\\\n\\\n4) GetAttribute 1004 returns returns interpreterVersion; which is for example\\\n\"Squeak3.1alpha of 6 February 2001 [latest update: #3987]\"\\\n\\\n5) When in full screen mode we now attempt to disable resizing, zooming, or moving the window. The window borders are hidden, but in the past it was feasible to grab an edge and alter it, thus confusing the VM.\\\n\\\n6) Worked on Carbonizing the browser plugin\\\n\\\n7) 3977 & 3978 FloatArray fixes. Makes float arrays go through a new (and working) version of #primitiveHash\\\n\\\n8) Fixed problem with accidental mouse clicks being triggered from pulldown menus on application switching.\\\n\\\n9)\\\n\"Change Set:\t\t3984 BitBltExtensions-ar\\\nDate:\t\t\t4 May 2001\\\nAuthor:\t\t\tAndreas Raab\\\n\\\nThe change set includes various extensions for BitBlt with the goal of migrating the useful features from FXBlt into the general BitBlt mechanisms. These include:\\\n\\\n* Handling of LSB and MSB forms:\\\nBitBlt now handles both, MSB and LSB forms (and their conversions). Only instances of Bitmap are assumed to contain big-endian pixels. All others are assumed to be little endian (reason is that we can only identify Bitmap here). Note that 'LSB' and 'MSB' refers to PIXELS, that is a 1bpp LSB form has its left most pixel in the lowest bit whereas a 1bpp MSB form has its left-most pixel in the highest bit.\\\n\\\nFor pixel depths < 8 this can be different from what your OS supplies (as an example, Windows bitmaps < 8 are big-endian pixels in little-endian words; we might call them 'middle-endian'). We simply don't deal with those - forms are either big or little endian but nothing inbetween.\\\n\\\nBitBlt has got an extra combination rule for swapping pixels in the destination form. This can be used to make byte swapping much more efficient (as soon as we've got more VMs with support for it).\\\n\\\n* Handling of 'native bitmaps' (aka surfaces):\\\nBitBlt is now able to deal with OS surfaces that are registered with the surface plugin.\\\n\\\n* Handling of full color maps:\\\nBitBlt has been extended to deal with instances of ColorMap in addition to the prior mechanism of using only indexed lookups and provide an implicit 16-32 bit color conversion. ColorMaps can specify both, a lookup table and an additional set of masks and shifts to apply during the color mapping operation. \\\n\\\nFour independent shifts and masks can be given which can be used for a lot more than just color conversion (as an example, one could do byte swapping with this; but see also BitBlt class>>exampleColorMap). \\\n\\\n* Better handling of default arguments:\\\nFor most of the required arguments for BitBlt very reasonable default assumptions can be made. This includes the destOrigin (0@0), clipRect (0@0 extent: destForm extent), sourceOrigin (0@0). BitBlt now substitutes these if they are absent (e.g., nil) in the instance provided.\\\n\\\n\"\\\n\\\n\\\nv3.0.13 at change set #3848\\\n\\\n1) sqMacSecurity was changed to set the unsecure directory to\\\n\tsystem folder:Preferences:Squeak:Internet:My Squeak\\\n\\\nv3.0.12 at change set #3848\\\n1) Fixed problem with creating My Squeak Folder in Documents Folder with System 8.6\\\n\\\nWhat has been fixed/changed.\\\nv3.0.11 at change set #3848\\\n\\\n1) sqMacDirectory had a bug when you resolved a path name. The fast resolve always failed, which invoked the slow resolver. Now the fast resolver works.\\\n\\\n2) sqMacSecurity was changed to set the unsecure directory to Documents:My Squeak. \\\n\\\n3) sqMacWindow was changed to fix some issues with Squeak capturing events from other applications and to reduce the number of duplicate mouse events that are generated. Also we capture modifier information  directly from the mouse and keyboard on null events to fix some problems with Carbon. We  hopefully fixed problems with mouse clicks from foreground applications being seen by Squeak and issues with the OS-X Dock clicks.\\\n\\\n4) sqMacNSPlugin was changed to use the above mouse/keyboard capture code which is much cleaner than the original fix for the bogus modifier information given to us by netscape on a null event. \\\n\\\n5) When you turn full screen off we now correctly reposition the window to the original location versus a few pixels to the left. \\\n\\\nWhat has been fixed/changed.\\\nv3.0.10 at change set #3848\\\n\\\n1) changed VM exception unwind logic\\\n\t3796-Exception-unwind-V3,tim@sumeru.stanford.edu, Paul McDonough, Stephen Pair and others\\\n\\\n2) Fixes for the JPEGReader plugin and for Jitter 3\\\n\\\n3) Added minimal Mac VM logic to assist in building a small VM.\\\n\\\n4) Changed how the browser plugin starts up. Now it starts the interpreter running only after getting the browser setwindow command. This seems to fix a race condition that resulted in a crash at startup time with Netscape 4.x\\\n\\\n5) Fixed broken full screen redraw on cmd-tab\\\n\\\n6) Fixed what looked like mouse-down, mouse-down, mouse-up sequence. Now reports mouse-down, mouse up.\\\n\\\n7) Added StarSqueak plugin as internal plugin\\\n\\\n8) Note the current Squeak Plugin should be gotten from the www.squeakland.org site.\\\n\\\nv3.0.9 at change set #3776, Boston Snow storm build.\\\n\\\n1) A number of changes were made to the interpreter:\\\n\ta) added primitive to change a class.\\\n\tb) added primitives to get or put 32bit integers\\\n\tc) Fix problem with GC and class reshaping\\\n\td) Better logic for method cache flushing\\\n\\\n2) Added JPEGReader plugin\\\n\\\n\\\nV3.0.8 at change set #3740\\\n\\\n1) The caps lock no longer maps to the shift attribute. So if the caps lock is down mouse clicks will behave normally. \\\n\\\n2) Numerous fixes for the BitBltPlugin plugin\\\n\\\n3) Memory allocation grow/shrink logic for Carbon was added.\\\n\\\n4) Spurious mouse clicks for the browser plugin has been fixed. (This took awhile to fix, I'm sure it's a bug with the Swedish version of Netscape)\\\n\\\n5) The browser plugin will attempt first to allocate memory from the browser heap, then the system heap. Most people when faced with a memory issue usually increase memory for the browser first. However memory for the plugin is controlled by an attribute in the EMBED HTML statement. \\\n\\\nV3.0.7\\\n\\\n1) A bug exists in pre OS 8.x that causes a crash in activate window if the standard get file \\\ndialog comes up before the Squeak Window. I remove the InvalWindow call found in that routine since it is actually redundant.\\\n\\\n2) The standard get file dialog on system 7.x would not terminate if you did a cancel.\\\n\\\n3) The InterfaceLib had to be weak linked to prevent CFM startup issues. \\\n\\\nV3.0.6\\\n\\\n1) Alias resolving is less aggressive.\\\n\\\n2) We no longer cache image reads or writes. This was done because OS 9.1 allows you to have very large disk caches, and it's pointless to cache the image read or write.\\\n\\\n3) The file flush primitive now actually flushes the file via an OS call. This was a bug in the CodeWarrior 5.3 source code.\\\n\\\n4) The 68K version was being built with the 68881 math library. This fails on 68040LC chips. We now use the non-68881 math library. Thanks to Bruce ONeel for find this.\\\n\\\n5) A bug was found in the path resolving logic that was added for 3.x. This bug apparently only affects 68K machines,  never was identified as a PowerPC issue. \\\n\\\n6) The Netscape plugin needs a properly allocated clip region, this code seemed to work ok on new systems, but fails on system 7.6.1\\\n\\\n7) The security interface will create a Documents folder on the root volume if the default Document folder has been deleted. This is needed for security purposes. \\\n\\\n8) Jitter needs 1MB of free memory to run.\\\n\\\n9) 68K machines require another 32K of stack\\\n\\\n10) Threads  now work on 68K machines, but turned off because of possible performance issues. (I think more study is needed).\\\n\\\n11) The 68K version was compiled with better optimization, expect a 15% improvement.\\\n\\\n12) fix for BitBltPlugin ascii = byteAt((sourcePtr + charIndex) - 1);\\\n\\\n13) The interpreter object validation checking code was alter to work correctly.\\\n\\\nV3.0.5\\\n\\\n1) sqConfig.h changed due to BE OS header changes\\\n\\\n2) sqMacDirectory.c. Added support for Navigation services or Standard File Get to find the image at startup time when the Squeak.image is not found by the VM. This replaces the DOS like console message that comes up saying that Squeak can't find a image.\\\n\\\n3) A fix to drag and drop for the browser plugin.\\\n\\\n4) We now use Apple's cooperative multithreading package to run the UI in one thread, the VM in the other. This solves some issues with the browser and makes the UI versus VM logic and execution responsibilities easier to understand. \\\n\\\n5) Changed the sqMacNSPlugin.c code to support a 3.0VM using multithreading support. This should give Squeak in a browser better performance. Also changed the full screen support to correctly work with multiple monitors.\\\n\\\n6) BitBltPlugin.c gets one more op code\\\n\\\n7) Added the security interface\\\n\\\n8) Added the file flush primitive\\\n\\\n9) Rewrote the macintosh readme file\\\n\\\n10) Revisited the zoomWindow code and found a bug with multiple monitor support, then I fixed the code to make Full Screen mode work on screen that Squeak window is mostly on, versus the menubar screen. Also if you switch from full screen back it resizes the window back to the orginal size and location before you invoked the full screen. \\\n\\\nV3.0.2\\\nPlugins\\\n\\\nRecompiled the internal BitBltPlugin plugin to encorporate:\\\nChange Set:\t\t258AlphaBlendOpt-dsm\\\nAuthor:\t\t\tDuane Maxwell, Paul Phillips/exobox\\\na) Short circuits full opaque and full transparent pixels when alpha blending.\\\n\\\nRecompiled the internal LargeIntegerPlugin\\\n3298LargeIntegersV1-2-sr -- Stephan Rudlof -- 29 November 2000\\\n3299LargeIntV1-2For29-sr -- Stephan Rudlof -- 29 November 2000\\\n\\\nVM Software\\\n\\\n(b) PowerManagement for macintosh is now supported. You can disable the power manager to give you better performance on some powerbooks at the expense of battery life. See the Preferences Panel for details, category 'Performance'\\\n- changed sq.h\\\n- changed sqMacWindow.c to add support for power mgr disabling\\\n\\\n(c) Drag and Drop support for the macintosh, dragging files from the Finder to the Squeak window is now supported.\\\n- sqMacDragDrop.c added\\\n- sqMacWindow.c changed\\\n\\\n(d) Added primitive for get macintosh creator and file type.\\\n- sqMacDirectory.c changed\\\n\\\n(e) Carbon support. Thanks to Karl Goiser karl@wattle.net for work he did on sound and other Carbonization hotspots.\\\n- sqMacAsyncFilePrims.c changed\\\n- sqMacFFIPPC.c changed (not supported for Carbon)\\\n- sqMacNetwork.c changed per Apple tech note 1173 Carbon asset tracking\\\n-sqMacSerialAndMIDIPort.c chnaged (Not supported for Carbon)\\\n- sqMacSound.c changed per Apple tech note 1198 Carbon double sound buffer playing\\\n- sqMacWindow.c changed (various changes for Carbon)\\\n\\\n(f)  Poll at least 60 times a second for the mouse if required. Previous 2.9.x VM did it 30 times but this is too slow and 2.8.x VM do it 60 times a second.\\\n\\\n(g) Reworked path support Thanks to Karl Goiser karl@wattle.net for starting this.\\\n- sqmacDirectory.c changed reworked lookupPath\\\n- sqMacWindow.c changed, added GetApplicationDirectory to get application directory\\\n\\\n(h) I rewrote the sqMacDirectory.c logic to enable proper understanding of Apple's Alias logic. This means for example you can alias the \"SqueakV3.sources\" file and then only have one copy and have all your images point to it. \\\n\\\n(i) Added Zoom Window support.\\\n\\\n(j) Change the Squeak change file icon to better match Apple's visual guidelines, Thanks to Doug Way for the suggestion and the new icons.\\\n\\\n(k) The sound plugins have changed...\\\n\\\n(j) Dropped FFI out of the base Squeak because of security concerns\\\n\\\n(k) Compiled for 750(G3) processor versus 603\\\n\\\n(l) Added screenDepth primitive\\\n\\\nThe 3.0.x VM contains most of the optional plugins, you might want to check this by inspecting \"Smalltalk listBuiltinModules\" to see where your plugins are coming from. In some case people have been accidentally overriding the new builtin plugins with older plugins. \\\n\\\nThe file \"Squeak 3.0Alpha10MT.sig\" contains the PGP signature for the Squeak 3.0Alpha10MT VM\\\n\\\nJohn M McIntosh  johnmci@smalltalkconsulting.com\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n}"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Documentation/3.7.4 Release Notes.rtf",
    "content": "{\\rtf1\\mac\\ansicpg10000\\cocoartf102\n{\\fonttbl\\f0\\fnil\\fcharset77 Geneva;\\f1\\fswiss\\fcharset77 Helvetica;\\f2\\fnil\\fcharset77 Monaco;\n\\f3\\fnil\\fcharset77 LucidaGrande;}\n{\\colortbl;\\red255\\green255\\blue255;\\red137\\green19\\blue21;\\red26\\green26\\blue255;}\n\\margl1440\\margr1440\\vieww17300\\viewh12720\\viewkind0\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0\\fs24 \\cf0 Mac VM 3.7.4 mach-o build for Carbon, and build for Classic. Support for Croquet, and support for Safari\\\nAug 4th, 2004 (3.7.4b3)\\\n\\\nStill yet to do, in future versions -> Verify that file delete rename etc works on aliases, not the targets. (Yawn, someday)\\\n\\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\n\\\n3.7.3 seems a fine VM, from what people tell me, but now we've 3.7.4...\\\n\\\n3.7.4b3\t\t\tReleased to fix issues in Netscape plugin code\\\n\t\t\t\tFIX PROBLEM that triggers image read failure on G5 machines. This prevents image from running on G5 machines.\\\n\t\t\t\tProblem shows up as browser crash or failure to start squeakland project.\\\n\\\n3.7.4b2\t\t\tReleased to fix issues in Netscape plugin code\\\n\t\t\t\tDo not start timers until later in the image start, this prevents failure if image doesn't load\\\n\t\t\t\tSupport failureURL and imageName embed html tags\\\n\\\n3.7.4b1\t\t\tprimitive Function Pointer goes into method cache logic, better lookup times.\\\n\t\t\t\tForce Interrupt Check logic in VM to fix most/all? issues with tight loops and keyboard interrupt logic.\\\n\t\t\t\tmore sanity checks in displayBitsOfLeftTopRightBottom\\\n\t\t\t\tcleanup of flushExternalPrimitiveOf\\\n\t\t\t\tcleanup of oopFromChunk\\\n\t\t\t\trefactor pop then push to pop:thenPush:\\\n\t\t\t\tlookupMethodInDictionary refactor to make one loop looking, versus perhaps two.\\\n \t\t\t\tmark/sweep logic or type, versus adding type (or is correct math)\\\n\t\t\t\tdispatchFunctionPointer logic\\\n\t\t\t\trework primitiveScanCharacters logic\\\n\t\t\t\tadd parm to VMparms to set interruptChecksEveryNms\\\n\t\t\t\tFix bug in primitiveYield\\\n\\\nLargeIntegersPlugin\tadd normalization logic\\\n\\\nZipPlugin\t\t\tadded primitiveUpdateAdler32 primitive\\\n\\\n3.7.3b4\t\t\tNumerous changes for Unicode file name support, and proper support for keyup/keydown on os-x. \\\n\\\nsqVirtualMachine.c\tVM_PROXY_MINOR set to  6  to support isArray = isArray;\\\n\\\ninterp.c\t\t\tNew VMMaker code update, major change is to use dispatchFunctionPointerOnin logic to dispatch \\\n\t\t\t\tprimitive calls, versus going via a jumptable/case statement. Also Tim reviewed the usage of the \\\n\t\t\t\tmillisecond clock and improved things so we don't need to check the clock on every prim call. This \\\n\t\t\t\tmakes the RISC and other platforms faster. However it only has minor effect on the os-x carbon VM \\\n\t\t\t\tbecause of how the cheap millisecond clock is implemented.\\\n\\\nsqMacDirectory.c\tChange dir_Lookup  // HFS+ imposes Unicode2.1 decomposed UTF-8 encoding on all path elements\\\n\t\t\t\tPer request from \n\\f1 Tetsuya HAYASHI <{\\field{\\*\\fldinst{HYPERLINK \"mailto:tetha@st.rim.or.jp\"}}{\\fldrslt tetha@st.rim.or.jp}}>\\\n\\\nsqMacEncoding.c\tAlter SetVMPath() \n\\f0 per request from \n\\f1 Tetsuya HAYASHI , \\\n\t\t\t\tadd support for \n\\f2\\fs20 \\CocoaLigature0       \\\n\t\t\t\t\\cf2 \"ShiftJIS\"\\cf0  kCFStringEncodingShiftJIS\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f1\\fs24 \\cf0 \\CocoaLigature1 \\\nsqMacFileLogic.c\tAlter makeFSSpec(), get  kCFStringNormalizationFormD path name\\\n\t\t\t\tAlter PathToFile(), get kCFStringNormalizationFormKC path name\\\n\t\t\t\tAlter QuicklyMakePath() get kCFStringNormalizationFormKC path name\\\n\t\t\t\tNew routine unicode2NativePascalString()\\\n\t\t\t\tAlter makeOSXPath, get kCFStringNormalizationFormKD path name\n\\f0 \\\n\t\t\t\tAlter resolveLongName, get kCFStringNormalizationFormKC path name\\\n\t\t\t\tAlter FSMakeFSSpecCompat(), call \n\\f1 unicode2NativePascalString to normalize path name\n\\f0 \\\n\\\nsqMacMemory.c\tAllow browser plugin to allocate 512MB of VM space for image under os-x. \\\n\\\nsqMacUIAppleEvents.c Use CFStringGetSystemEncoding versus suggested plist.info suggestion because the encoding info is quite right yet at\\\n\t\t\t\tthis point in the startup time.\\\n\\\nsqMacUIEvents.c\tKey Up is  now reported as an event when the key is released. Earlier os-x carbon VMs would report the key up after the\\\n\t\t\t\t keystroke was processed by Text Services, which was incorrect. We also deal with Key repeat correctly and don't send\\\n\t\t\t\tanother key down event. This change has made it possible to properly support Morphic games where key up/down state is\\\n\t\t\t\timportant to game interaction. \\\n\\\nsqMacWindow.c\tFix crash in ShowWindow(). This was due to a pthread race condition between the UI thread and interp.c. \\\n\t\t\t\tFixed by using UI callback to handle the show screen call. Would show up as a crash before window appeared.\\\n\\\n3.7.3bx\t\t\tEarlier versions of 3.7.3 were released to confirm the file changes for Japanese users worked correctly, and to \\\n\t\t\t\tconfirm that the keyUp logic changes worked as desired.\\\n\\\n3.7.2b1 \t\t\tChanges for NPSqueak to fix issues with full screen mode under Safari 1.2 (V125) \\\n\t\t\t\tUsage of VMMaker3-7b2 to build interp.c\\\n\t\t\t\tUnicode values now come up from the classic VM versus the historical (1984) keycode values, this makes Tweak work.\\\n\t\t\\\n3.7.1b2\t\t\\\nJPEG READER WRITER\\\n\t\t\t\tusage of Apple '-fast' uncovered a source code issue, initialization routines for internal jpeg plugin were not returning true or false, before this was kinda of considered as true. But when compiled with -fast it's zero, meaning the inialization failed, but that is bogus.\\\n\\\n3.7.1b1\\\n\t\t\t\tUse of \"-fast\" apple gcc 3.3 compiler option, improves sends by significant %\\\n\t\t\t\t\n\\f1 On EventKeyUp/EventKeyDown you get the UniCode On EventKeyChar you get the UniCode->MacRoman translated character.\\\n\t\t\t\tBroke high bit ascii macroman in 3.7.0bx.\\\n\t\t\t\tFor multi-byte character input you get EventKeyDown/EventKeyChar/EventKeyUp for each unicode character coming from the input sequence.\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 \\\n3.7.0b2\t\t\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f1 \\cf0 \t\t\t\ta) You can alter the application's Info.plist by setting the SqueakEncodingType using the ICANA readable names\\\n\\\n\t\t\t\tmacintosh\t- >macRoman\t\\\n\t\t\t\tUTF-8\t\t-> UTF-8\\\n\\\n\t\t\t\tb) Support for sqSocketListenOnPortBacklogSizeInterface, which allows you to specify the interface to use for the listen should work both for os-x and os-9.\\\n\t\t\t\tc) Usage of VMMaker3-7a2.\\\n\t\t\t\td) Special change sets: make primitive point x/y internal, and slightly faster activate.\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 \\\n3.7.0b1 \t\t\t\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f1 \\cf0 \t\t\t\t Changes for the \"m17n\" package fromTetsuya HAYASHI <{\\field{\\*\\fldinst{HYPERLINK \"mailto:tetha@st.rim.or.jp\"}}{\\fldrslt tetha@st.rim.or.jp}}> so one can type Kanji characters.\\\n\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 3.6.1b7\t\t\t\\\nSqMacWindow.c\tFix for new rending code when used with 2.8 or earlier images, mouse clicks reported in wrong place\\\n\\\n3.6.1b6\\\nSqMacWindow.c\tEnable 8bit all modes of 8 bit rendering\\\n\\\n3.6.1b5\\\nSqMacWindow.c\tEnable 8bit support for 8->8 8->16 8->32 \\\n\\\n3.6.1b4\\\nSqMacWindow.c\tFix issues with title bar height calculation, was using the wrong window region to do this. Also failed \\\n\t\t\t\tfor full screen usage. Tinkered a bit with ioDisplay moving bytes, now do <=32 bytes directly. \\\n3.6.1b3\\\nSqMacWindow.c\tAlter logic to allow for 16->32 and 32->16 mapping using direct copy logic. Workaround for \\\n\t\t\t\tos-x 10.3.0 copybits bug. Released for limited testing. Awaiting real fix from Apple.\\\n\\\n3.6.1b2\\\nSqMacWindow.c\tAlter to use unix direct port bit copy versus copybits to get around a crash caused by a bug\\\n\t\t\t\tin os-x 10.3.0 copybits. Released for limited testing\\\n\\\n3.6.0b2\\\nBuild from about to be offical 3.6.0 VM, Balloon & VM Maker source.\\\nAdded in \\\nArraysToGlobalStruct-JMM.1.cs\\\n\t?3.7 Status unknown, but makes better interp.c interpreter loop code (silly optimizer).\\\nFasterCopyLoop-JMM.4.cs\\\nFasterCopyLoopPart2-JMM.2.cs\\\n\t?3.7 Status unknown, but makes drawing 20%+ faster due to better PowerPC code optimizations\\\nFasterLookupMethod-JMM.1.cs\\\n\t?3.7 Status unknown, but makes method lookup a bit faster. \\\nMakePrimPointXInternal-JMM.1.cs\\\n\t?3.7 Status unknown, but makes point x/y access faster.\\\n\\\nSlightlyFasterActivate-JMM.3.cs\\\n\tRolled into 3.7\\\n\\\nYou need 3.5.3b1 for Safari plugin support\\\n\\\n3.5.3b1  (browser plugin)\\\nFixed issues with IE drawing and crashs related to screen updating in non-thread safe IE.\\\n\\\n3.5.2b6\\\nFixed issues with plugin discovery for netscape plugin \\\n3.5.2b5\\\nFixed primitive dispatch to use gnuified jump table. \\\n\\\n3.5.2b4 \\\nFix issue with race on open doc events and squeak VM Thread for drag and drop support when starting squeak\\\nFor os-x expose primitivePluginBrowserReady, not the rest of the URL browser primitives, they don't work in Safari\\\nFor system attribute 1003 return powerpc versus PowerPC to match unix VM\\\nStart timers later in the VM startup logic, after reading the image, versus before.\\\nsqMacNSPlugin.c \t- Look for Squeak folder in User, local, Network, System domains versus just User.\\\nsqMacTime.c\t\t- Use old delay logic (1ms accurate), versus aioPoll (10ms accurate).\\\nsqMacUIEvents.c\t- Only create PowerManagerDefeatTimer tick routine if power manager tapping is required which is only os-9 anyways.\\\nsqMacUIMenuBar.c - Draw menu bar later in startup, after we change it, save 200+ms\\\nBitBltPlugin.c\t\t- alphaSourceBlendBits16  Use table lookup which is 90% faster\\\n\t\t\t\t- copyLoopNoSource, roll constants into register versus recalculating.\\\n\\\n3.5.2b2 \\\nFix applescript document handling logic to prevent overrunning the drag/drop logic via the command line open cmd by using a spin loop\\\nto ensure Squeak has sufficent time to read the file name. \\\n\\\n3.5.2b1 \\\nChanged the bitBlt copyloop logic to use locals in safe places, versus globals. This improves drawing by 5%.\\\nMajor change is usage of GCC 3.3, versus GCC 2.95.x This increases send/second by about 8%.\\\n\\\n\\\n3.5.1b5 Added some more user changeable attributes, and changed some window behaviour when floating\\\nOS-x Version only \\\nSqueakWindowHasTitle\t\t- (Yes/No) yes if window should get title.\\\nSqueakFloatingWindowGetsFocus (Yes/No) yes if window should allow click and type if floating.\\\nSqueakMaxHeapSize\t\t- (Number) set to 512K, max size for os-x memory heap. Note changing this to 1GB may or may not cause a \\\n\t\t\t\t\t\tcore dump depending on where os-x allocates the memory segment above or below the 2GB boundary. \\\n\\\nsqMacUIEvents.c\t\t\t- set keyboard focus to floating window if required, do not hide floating window when we go to full screen mode.\\\nsqMacWindows.c\t\t\t- watch out for memory leak when we free the color table. \\\n\\\n3.5.1b4 Please note the major changes to network code in 3.5.1b2\\\na)Added options SqueakWindowType & SqueakWIndowAttributes to info.plist. The SqueakWindowType of 6 is the standard document window, a type of 8 is the floating utility window. The attributes control with window attributes and behavior according to\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f1 \\cf3 \\ul \\ulc3 http://developer.apple.com/techpubs/macosx/Carbon/HumanInterfaceToolbox/WindowManager/Window_Manager/wind_mgr_ref/constant_2.html#//apple_ref/c/tdef/WindowAttributes\\\n&\\cf0 \\ulnone \\\n\\cf3 \\ul http://developer.apple.com/techpubs/macosx/Carbon/HumanInterfaceToolbox/WindowManager/Window_Manager/wind_mgr_ref/constant_1.html#//apple_ref/doc/c_ref/WindowClass\\cf0 \\ulnone \\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 b) Sockets are not valid if the network is not initialized. \\\nc) The os-9 vm can return the open file error in the vm attribute data 1202\\\nd) MyWindowEventMouseHandler was leaking region handles.\\\ne) Support for primitiveClosureValue, primitiveClosureValueWithArgs, primitiveExecuteMethod\\\nf) when rootTableCount  goes > 2400 then allocationCount gets allocationsBetweenGCs + 1 \\\ng) BitBlt Alpha Blending has changed\\\nh) Added primitiveWrite24BmpLine\\\ni) The guard if statement for primitiveSerialPortRead was flawed, noted the buffer overflow, but then proceeded, versus returning. \\\n\\\n3.5.1b3 \\\na) Fix, Stephane Ducasse <ducasse@iam.unibe.ch> pointed out that using a virtual desktop we had a crash in ioSetFullScreen. This \\\nwas due to a pthread race condition between the UI thread and interp.c. Fixed by using UI callback to handle fullscreen window/move/resize.\\\n\\\n3.5.1b2\\\na) Switch to aio.h logic and unix socket logic! This is a MAJOR change!!!!\\\n\\\nb) Call aioPoll  (select()) to cause process wait versus old pthread logic. This follows in the footsteps of the unix port. You should verify that \\\ncpu time when squeak is idle is not affected in a dreadful manner.\\\nc) Fix, if you call does this directory exists on a file now you will get an error which will signal that the directory does not exist. This ensures\\\nthe FileDirectory test suite works. \\\nd) Fix, if you quit the browser plugin, check the status of the pthread_cancel before attempting the pthread_join\\\n \\\n3.5.1b1 limited distribution\\\n\\\n3.5.0b4 \\\na) os-x exposed an issue with EToyPeerToPeer support. It seems under os-x we get the connect, data, close so fast on lans that by the \\\ntime we get around to asking for the remote IP address the connection is closed, and our open transport call fails. We change SqMacNetwork.c to \\\nreturn the IP address discovered at connect time in this case. Under os-9 we never saw this behavior because we suspect the network activity \\\nwas slower and more serialized. \\\n\\\n3.5.0b3 (Safari support)\\\n\\\na) The plugin logic was changed to support Safari and better support os-x. This required building a CFM stub to load the mach-o compiled\\\nNSPLugin. The mach-o plugin now uses a pthread for the interp.c loop. This gives much better performance and user UI feedback. \\\nb) The GC logic was carefully reworked to optimize the assembler on the ppc. This gave us upwards of a 30-50% improvement, since \\\nincremental GC is going on all the time, this change actually has a effect you can see say in the solitaire example where we save 10%. \\\nc) sqMacNetwork.c was modified, first change in many years. The remote address and port number are requested as an async operation. \\\nThe operation times out after a few milliseconds. This was never a problem in os-9. Now it seems there is an issue sometimes for DHCP clients\\\non os-x. There the operation can timeout and return 0 as the address or port. We changed the call to do a sync operation to avoid a timeout.\\\nd) sqMacMain.c was modified to allow for pthreads for mach-o netscape based squeakland plugin support\\\ne) sqMacMemory.c changes for mach-o plugin support\\\nf) sqMacTime.c changes for  mach-o plugin support\\\ng) sqMacUIEvents.c changes for mach-o plugin support\\\nh) sqMacWindow.c changes for mach-o plugin support \\\ni) npmac.cpp now this is a netscape glue routine, I changed it to ensure we can see the entry points, originally they are C++, but need \\\nto be \"C\" so the loader can find the names the CFM glue routine is looking for. Also we add the logic TV2FP to setup the mach-0 to CFM code stubs to allow the mach-o plugin to callback to the CFM stubs in Safari. \\\nj) sqMacNSPlugin.c \\\n\t1) Rearrange when the interpret() thread is started to ensure a race condition doesn't happen.\\\n\t2) use Pthreads for the mach-o osx version. \\\n\t3) rework NPP_SetWindow to start interpret() when needed. \\\n\t4) Alter StartDraw, EndDraw to use a mutex lock and handle os-x port locking to prevent races between pthreads.\\\n\t5) Alter ioShowDisplay, optimization and handle os-x\\\n\t6) fix ioSetFullScreen to make it work on Safari\\\n\t7) fix OpenFileReadOnly to make it work on os-x, needed sqFileNameFromStringOpen macro call\\\n\t8) Alter ExitCleanup to mutex lock to prevent race ending issues, and add a bit more cleanup\\\n\\\n\\\n\\\nNote some versions of 3.4.1 were distributed for testing only, these are superseded by 3.5.0\\\n\\\n3.4.0b2 (Croquet support)\\\n\\\na) Ensure vmVersion information reports correct information, was bogus in 3.4.0b1\\\n\\\n3.4.0b1 (Croquet support)\\\na) Added plugin BMPReadWriterPlugin 14 November 2002 (i)\\\nb) B3DAcceleratorPlugin.c gets primitiveCreateRendererFlags (new api)\\\nc) two more op codes get added to BitBltPlugin (fixAlphawith, pixClearwith)\\\nd) Squeak3D gets (b3dOrthoNormInverseMatrix, b3dTransformDirection,b3dTransformPoint,b3dTransposeMatrix)\\\ne) The scroll wheel mouse logic was using apple cmd key as the modifier on the arrow key events, Other platforms use the Control key. So the \\\nmac falls in line (changed to use the control-key)\\\n\\\n\\\nNotes About previous VM.\\\n3.2.6 VM classic have an issue when the tickcount clock goes over 0x7FFFFFFF, about 24 days. \\\nThis exhibits itself when Squeak won't accept user input, or allow you to switch under os 9 or earlier after 24 days,\\\nor starting a Squeak image hangs during the initial screen painting.\\\nRestarting the mac solved these problems. Force quitting Squeak does not.\\\nThis is fixed in 3.2.7b3\\\n\\\nSome issues with alias files and folder were fixed in 3.2.7b6 and 3.2.8b3\\\n\\\n3.2.8b9\\\na) recompiled os-x version, 3.2.8b8 seem to have a bad compiler option and gave 20% less performance.\\\n \\\n3.2.8b8\\\na) exposed \n\\f1 vmParameter\n\\f0  24 & 25 which control how memory is allocated/freed \\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f1 \\cf0 Smalltalk vmParameterAt: 24 put: 48*1024*1024.\\\nSmalltalk vmParameterAt: 25 put: 24*1024*1024.\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 b) Added argv,argc, env variables to main\\\nc) Fixed for Jaguar 10.2. Full screen mode cmd-tab broke menu bar hiding, this is a 10.2 bug\\\nd) Added support for IP_ADD/DROPMEMBERSHIP and the ability to bind to the wild card port (0).\\\ne) OpenGL changes for TEA\\\n\\\n3.2.8b7 was testing release and not distributed to the public.\\\n3.2.8b6 was testing release and not distributed to the public.\\\n3.2.8b5\\\na) Oops broke the logic returning the vmversion information in classic. Also incremented os-x version (which was fine) to keep numbers in sync\\\n\\\n3.2.8b3 The squeak.sourceforge.net CVS tree was reorganized and the project builder project revamped. The \\\nmajor change to the source was upgrading the netscape browser plugin to 3.2.7b6 levels.\\\n\\\na) Gnunifer.3.cs Changed to add register var on FOO_REG and to remove sqGnu.h file embedded in method.\\\nb) sqMacDirectory.c Add logic to handle case of building as CFM carbon plugin under CW6, needed some carbon calls\\\nc) osExports.c needed to ifdef out the getUIToLock entry point (not available as CFM carbon browser plugin)\\\nd) sqMacFileLogic.c Fix alias problem. Add logic to deal with path names as CFM carbon browser plugin, ensure vmPath is correct.\\\ne) sqMacImageIO.c Cast to get rid of warning message\\\nf) sqMacMain.c Cast to get rid of warning message, Check for CFM Carbon and bundle check. Revise vm parm 1201 code to return long file names are ok as CFM carbon browser plugin. Some diagnostic routines for printing to the console as CFM carbon browser plugin.\\\ng) sqMacMemory.c Logic change as CFM carbon browser plugin.\\\nh) sqNSPlugin.c\tFix to beginFullScreen logic (carbon call is broken?)\\\ni) sqMacUIEvents.c Remove getUIToLock dummy call. This entry point should only exist for mach-o carbon builds. Not CFM carbon browser plugins\\\nj) sqMacWindow.c  Use old call to create window when a CW 5 carbon application.\\\nk) sqPlatformSpecific.h Change #ifdef to correct logic error when building as CFM carbon browser plugin under CW 5.\\\n\t\\\n\t\\\n\\\nMay 31st, 2002 (3.2.7b6)\\\nFor 3.2.7\\\n\\\n3.2.7b3 We build the VM using patchs to enable globals as a structure. This improves performance by 10%\\\n\\\na) Classic Vm builders might need to add \"struct foo *foo = &fum; \"  to int interpret(void). \\\nb) readme: add notes about changesets and alter build instructions\\\nc) sqMacFileLogic.c: use accessors for interp.c globals\\\nd) sqMacMain.c: use accessors for interp.c globals. Also Alain Fischer added logic to fetch os-x version number and to enable you to put squeak.image in the resource folder for autostarting.\\\ne) sqMacTime.h: Fix busted lowresclock again. After 24 days of mac uptime, 3.2.6 squeak will hang.\\\nf) sqMacUIEvents.h: use accessors for interp.c globals.\\\ng) sqPlatformSpecific.h: alter sqFTruncate to use fileno() as needed.\\\nh) sqMacWindow.c: use accessors for interp.c globals.\\\ni)  3.2.7b5 sqMacFileLogic.c: change vmpath to resolve to classic VM if vm is moved from MacOSClassic folder\\\nj) Misc changes for Netscape plugin support\\\nk) Introduce osExports.c logic\\\nl) 3.2.7b6 Fixed a problem in path name resolving need to use UTF8 to properly interact with high ascii characters\\\nm) 3.2.7b6 Fixed a problem in path name resolving there was a bug with certain types of alias path name combinations in quick name resolving.\\\n\\\nMac VM 3.2.6 mach-o build for Carbon, and build for Classic.\\\nMarch 14th, 2002\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f3 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\nNotes About previous VM.\\\n3.2.6b6 Classic or earlier has a bug that makes it stop collecting user input on a 19.88 hour cycle depending on reboot time.\\\n\tSeems many systems don't run for more than 19 hours so we've not had major complains about this issue. \\\n\tBug was introduced in 3.2.1.\\\n3.2.5 has a bug that prevents the use of accented characters without \\\n\ta image patch to fix a VM issue (not an issue in 3.2.4). Also you can't enter an double keystroke characters, ie ^ \\\n\twhich makes life difficult. It also does not support the AppleScript Plugin (not an issue in 3.2.4)\\\n3.2.4 a bug in project builder introduced a performance problem (bad compiler options).\\\n\\\nSee the 3.2.5 about why this 3.2.6 is different inside.\\\n\\\nFor 3.2.6:\\\na) Change an internal number that dictates how often pending interrupts should be looked at from 5ms to 3ms This improves \\\ndelay accuracy.\\\nb) Change how sleeping is done when squeak is idle. This reduces CPU consumption, and improves Delay accuracy.\\\nc) Fix bug with high bit problem with keyboard (accented characters are ok now)\\\n  c2) 3.2.6b6 has fixed characters that require multiple key strokes to enter.\\\nd) Externals that make UI interactions (IE AppleScript) Must now make a call back to the VM to schedule\\\n    the main thread to do the call that will invoke UI interaction to prevent a deadlock in Carbon between threads. \\\n   See the OSAExecute call in the AppleScript plugin for details.\\\ne) If you run a classic mac VM more than 23.x days nonstop it will stop responding to UI events.  Ensure clocks get anded with 536870911.\\\nf) signal inputSemaphoreIndex because we are mulithreaded. Not that it does anything for us yet...\\\ng) 3.2.6b6 Pass the unicode value of the keystroke up as the EventKeyDown/EventKeyUp data, versus mackeyboard code.\\\nh) Somewhere there is a bug with mktime + time, so use the unix code of time+localtime+gmt \\\ni) Change iorelinquishPrcessorForMicroseconds to sleep the quatum between now and wakeup time. Also schedule a\\\n   check for interrupts if wakeup time is now or in the past. This improves delay accuracy. For OS-x this was a big deal,\\\n   for os-9 it improves things by 1 or 2ms. Also in  os-x we sleep more when idle so CPU usage goes down.\\\nj) On OS-9 umap AND free the VM backing store. Just doing the free doesn't work and you lose 128Mb of disk space until you reboot\\\nk) 3.2.6b7 for post event processing ignore mouse move/drag/or scroll wheel events. These are ignored by the open/gl plugin and only suck a major amount of CPU time to process in the post event processing logic. \\\nl) 3.2.6b8 (3.2.6b4 classic) removed call to uncouple shift keys introduced in 3.2.1. This causes some macs after sleeping not to respond to keyboard input\\\nm) 3.2.6b8 (3.2.5b7 classic) added function for ioLowResMSecs to avoid early bit overflow. Rework clock checking in ioHandleEvents to handle clock rollovers properly.\\\n\\\nMac VM 3.2.5 mach-o build for Carbon, and build for Classic.\\\nMarch 4th, 2002\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f3 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\n\\\nBeware this version of the VM is significantly different inside! \\\n\\\n\\pard\\tx1440\\tx2880\\tx4320\\tx5760\\tx7200\\ql\\qnatural\n\n\\f1 \\cf0 a) Broke sqMacWindow.c into 10 different files by function type.\\\n\\\nb) Moved most of the memory allocation logic out of sqMacMain.c into sqMacMemory.c. and ensure memory is freed when Squeak is terminated. \\\nThe major change in this code is support for OS 9.x virtual memory mapping. This only applies to Mac OS 9.2.0 or higher, excluding os-x. It appears  Mac OS 9.1 has a bug that prevents this feature from working.\\\n\\\nFor images that require less than 128MB of memory, mapping is used to allow the image to grow/shrink to the 128MB boundary, therefore you can change the application memory size to about 2MB. \\\n\\\nFor images that require more than 128MB then change the application memory size to > 128MB and mapping will not occur. \\\n\\\nIf mapping is not available because virtual memory is turned off or the api is not supported by the macintosh OS then mapping is not used. Note that mapping is not support under the classic os-9.x environment under OS-X, however in this case you should be using the OS-X version of Squeak, not the classic version.\\\n\\\nc) Use of Carbon event logic for OS-X only. This is a major structural change. \\\n\\\nIt also encouraged the use of a pthread for interp.c. \\\n\\\nAll user interaction with the VM follows a new code path, so problems with keyboard or mouse input should be reported asap. Also any issues with application switching, windows being brought to the foreground or sent to the background and usage of the full screen logic should be reported asap.\\\n\\\nAs part of this change I have build in support for scroll-wheeled multi-button mice under os-x. Thanks to Doug Way for testing this for me. Maybe someone can post to the list what their favorite 3 button scroll wheeled mouse/trackball is.\\\n\\\nd) Use of a carbon call to get the dominate Device if you have multiple screens. People with multiple screens should confirm window resizing, full screen on/off works as expected.\\\n\\\ne) Corrected comment in sqMacFileLogic.c\\\n\\\nf) Changes to sqMacNSPlugin.c. This makes it compile, but it's not usable yet.\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 \\\n\\\nFeb 20th 2002 3.2.4\\\n\\\nFor this version of the VM I have migrated towards using OS-9 packages. This allows us to provide one \\\nfolder/package that supports os-x and previous operating system versions.\\\n\\\nGiven Squeak 3.2.4Beta1.app\\\nThe classic VM is found in the *.app:Contents:MacOSClassic, with an alias in *.app:\\\nThe mach-o OS-X VM is found in *.app.Contents:MacOS\\\n\\\nIf you are running OS-9 then clicking on the *.app or doing drag and drop will just run Squeak, same applies for OS-X.\\\nIf you are running OS-7.5.5 or OS-8.x then the *.app package will appear as a folder, just open and click on the alias within. \\\nNote that if you want to use classic plugins I suspect you need to put them in the MacOSClassic Folder beside the VM. \\\nBundles for os-x go in the same location as the *.app application package.\\\n\\\nChanges\\\na) Drag and drop at open time with image file that has no meta type, will now open the image, versus prompting you.\\\nb) Use an os-x window attribute at open time to signal that the window should not be moved by the dock when you go to full screen.\\\nc) Fix window update logic to use window that needs updating versus stwindowg to fix issues with print dialog windows in classic. \\\nd) bitblt gets recompile to pickup fixes posted in 3.2 update stream.\\\n\\\nFeb 5th 2002 3.2.3\\\nChanges\\\n\\\na) use old extended time manger to update psudeo-TickCount, versus sigalrm. siglarm make sound recording not work.\\\nb) fiddle with sound recording and make it work.\\\n\\\nJan 2002 3.2.2\\\nChanges:\\\n\\\na) AsyncFilePlugin.c Use global to remember security function entry point for performance reasons\\\nb) FilePlugin.c\tUse global to remember security function entry point for performance reasons\\\nc) interp.c Use squeakFileOffsetType versus off_t and add a bunch of checks to handle lack of long long and conversion errors between 64/32 bit integers and LargeInteger objects\\\nd) readme, it's http://www.mucow.com/Gnuifier.1.cs \\\ne) SocketPlugin.c\tUse global to remember security function entry point for performance reasons\\\nf) sq.h added default sqFilenameFromStringOpen and sqTruncate\\\ng) sqFilePluginBasicPrims.c revert to anti specs, but ensure #def to fseeko and ftello for 64 bit aware file systems.\\\nh) sqMacDirectory.c A bit more error checking on bad file names\\\ni) sqMacFileLogic.c Folders size is now zero in classic, and a bit more checking on bad file names\\\nj) sqMacSound.c Fixed a problem with sound recording in classic due to a change made in Sept. But sound recording still does not work under os-x\\\nk) sqMacWindow.c  two very important changes:\\\n\\\n\t1) You can now do FFI calls with the FFI bundle plugin to Mach-o frameworks. \\\n\tHowever you need to rework your api calls. For example:\\\n\tapiGetMousePoint: aMacPoint was\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'InterfaceLib'>\\\n\tIt now is:\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'Carbon.framework'>\\\n \t\\\n\tIf you review /System/Library/Frameworks I'm sure you can come up with interesting ways to \\\n\tmake mac only squeak images.\\\n\t\\\n\tI now use map( NULL, gMaxHeapSize, PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED,-1,0);\\\n\tanonymous memory mapping to 512MB as the squeak memory block. The VM can then grow or shrink\\\n\twithin the 512MB block, I just move a pointer. \\\n\t\\\n\tNote in 3.2.1 a slight error on my part restricted Squeak to 50MB. I am of course\\\n\tinterested to hear about issues with my choice of 512MB. Note a Squeak VM is limited to 2GB under perfect \\\n\tconditions, however if any part of the image crosses the 2GB boundary the VM will fail, right now 512MB\\\n\tseemed a safe choice.\\\n\t\\\n \tPhysMem:  60.2M wired, 78.6M active,  412M inactive,  551M used,  217M free\\\n\tVM: 3.03G + 55.3M   7847(0) pageins, 1(0) pageouts   \\\n\tPID COMMAND      %CPU   TIME   #TH #PRTS #DREGS RPRVT  RSHRD  RSIZE  VSIZE\\\n\t422 Squeak VM    0.8%  0:35.59   2    71   100  23.3M  8.53M  26.5M   571M\\\n\\\n\tbut I only have one 80,000,000 byte swap file in /var/vm\\\n\\\nNote if you turn crash reporter on, then if the VM crashes a nice report should be generated in your log directory.  See the Apple documentation for a description of this feature, currently it is set in OS-X 10.1.x via the preferences window for the Console Application. If you have a crash with this VM, please recreate and post the crash log (found in Users/foobar/Library/Logs/ to the Squeak mailing list so we can continue to make the VM fault tolerant.\\\n\\\n3.2.1 Notes\\\n\\\nYou might need these change sets to build a new VM or to use all the features of this VM with your image, hopefully these will get into the pending 3.2.x image.\\\n\\\nFixes and feature extensions.\\\nAsyncFileFixFu...hName-JMM.1.cs \tfix for async test method.\\\nDragAndDropAtStart-JMM.5.cs\t\tfix to enable drag and drop at startup\\\n\\\nNeeded to compile a VM with VMMaker\\\nLargeFiles-JMM.3.cs\t\t\t\tEnable large file support, files > 2GB\\\n\\\nNeeded to turn this feature on\\\nMacLongFileName-JMM.5.cs\t\t\tEnable long file names on the mac\\\n\\\nThe SUnit\\\nMacLongFileNamesSUnits-JMM.3.cs\tTest long file names and long directory names and large file support\\\n\\\nKinda optional features some people might need.\\\nInternetConfiguration-JMM.5.cs\t\tAllow internet configuration information access, internal plugin\\\nUUID-JMM.3.cs\t\t\t\t\tAllow UUID generation, internal plugin\\\n\\\na) The ability to get back a UUID. This uses the hosting UUID generator if the\\\n hosting OS supports it and we have a primitive we can call. If not then we generate\\\n a type 4 version of a UUID (the random bits one).\\\n(This requires a special change set)\\\n\\\nb) Ability to start squeak on the mac by dragging multiple documents onto the\\\nimage, or drag and drop of stuff onto the running VM icon.\\\n(This requires a special change set)\\\n\\\nc) Usage of the Internet Configuration tool kit to supply information about\\\nwhat the mac proxy is etc. etc.\\\n(This requires a special change set)\\\n\\\nd) Migrate file system to use 64 bits. This allows you to read/write and seek\\\nwith files > 2 GB. This includes a change to the VM to convert from/to long\\\nlong integers. It also allows the file system to actually deal with 2GB files,\\\nthe current file interface actually fails once the file exceeds 1GB.\\\n\\\ne) For the carbon based Squeak VM we now support long file names 255\\\ncharacters. Close both eyes and touch everywhere the mac VM deals with file\\\nname paths and hope for the best (Actually we write an Sunit to ensure we've\\\nnot broken everything). This also includes the ability to put an image in a\\\nlong file name directory, but right now the image name must stay under 32 characters.\\\n\\\nFilePlugin.c changes to support large integers.\\\nFilePlugin.h changes\\\nsq.h changes to support large files.\\\nsqConfig.h changes to resolve some conflicts.\\\nsqFilePluginBasicPrims.c  changes to support large files.\\\nsqMacAsyncFilePrims.c changes to use fspec versus 255 file path.\\\nsqMacDirectory.c changes to use hosting OS (OS-X) bsd create and delete directory\\\n and truncate. dir_look changes as part of the general rewrite.\\\nsqMacDragAndDrop.c use new call to get path name from fsspec. Use fsspec more, and added \\\n  interface code to setup drag and drop of items at application startup time. max document name\\\n  goes to 1000 characters.\\\nsqMacFileLogic.c Mostly rewrote!\\\nsqMacSecurity.c use new file calls.\\\nsqMacWindow.c \\\n\tincrease size of vmpath, docpath, imagepath to 1000 chars, shortname to 255 characters.\\\n\tadd logic for left/right modifier keys \\\n\treworked LoadLibViaPath logic \\\n\tsqImageFileOpen uses fsspec versus 255 path name.\\\n\tsqImageFileStartLocation uses ffspec.\\\n\tbundle support for bundles\\\n\t\\\ne2) interp.c supports get/put of large integers to long long integers.\\\ne3) fixed fTruncate\\\n\\\nHint getting this to work was a pain. Think of 255 character folder names and nested aliases,\\\nfolder 1 refers to folder 2 which then refers to folder 1 again, just go down the path say 8 times,\\\nthen ask to create a file or directory!\\\n\\\nf) Support to change the Mac screen resolution under Squeak control.\\\n\\\ng) Fix to unload/load the scrap at startup time to ensure the clipboard is\\\ncorrect when starting up the VM.\\\n\\\nh) Uncouple the shift key and left/right shift keys on old extended keyboard.\\\nAlso add a call to get which keys are currently pressed on a USB keyboard or\\\nthe USB codes for an apple non-usb keyboard. (Note this isn't working quite yet under OS-X)\\\n\\\ni) Changes to enable us to compile the VM under Apple's OS-X Project Builder\\\nenvironments.\\\n\\\nj) Some rewriting to ensure serial and midi support can be written as external\\\nplugins.\\\n\\\nk) Fiddling to get sound input to work under OS-X\\\n\\\nl) Platform.exports changed macintosh to macintoshSqueak to avoid conflict.\\\n\\\nm) Memory is allocated at 50MB at start, then will grow or shrink, verus previous carbon apps\\\n that did 1GB. \\\n \\\nn) sqPlatformSpecific.h changes to support long file names and os-x posix file names\\\n\\\no) sqVirtualmachine.c & sqVirtualmachine.h\\\n#if VM_PROXY_MINOR > 4\\\n\tVM->positive64BitIntegerFor = positive64BitIntegerFor;\\\n\tVM->positive64BitValueOf = positive64BitValueOf;\\\n\tVM->signed64BitIntegerFor = signed64BitIntegerFor;\\\n\tVM->signed64BitValueOf = signed64BitValueOf;\\\n#endif\\\n\\\nBeware this causes an interesting problem, if you compile plugins with VM_PROXY_MINOR now set to 5, then they will not work with older VMs. The solution is to define the VM_PROXY_MINOR in the plugin to the value that indicates what features it is using.\\\n\\\np) Changed to use ITimer logic as a 16ms lowres timer to improve performance\\\n\\\nq) Changed to use single thread, no thread manager.\\\n\\\nr) Changed to use lowres timer in checking for polling time to improve performance\\\n\\\ns) It should have faster startup times.\\\n\\\nt) It will hide the empty window at startup, then show the squeak window when required.\\\n\\\nu) It has a different menu structure.\\\n\\\nv) It does less I/O when navigating directories.\\\n\\\nThe macintosh 3.1Alpha1MT VM, Sept 24th 2001 \\\nThis VM was built with the base  3.1 image at change set #4347\\\nV3.1.1 at change set #4347\\\n\\\n\\\nWe go to V3.1.1 to indicate that the 3.1 VM is being used. In the past the 3.1 Image was used but some changes in the openGL logic makes  3.1 Vm and 3.0 image not quite work correctly with 3d graphics. Although a 3.1 VM will run many images way back to the 2x series no careful study has been done on the ability to do this. So at this point we are indicating this VM is a 3.1 VM and best used with a 3.1 image.\\\n\\\nUse of VMMaker to build VM. As of this version everything can be built as an external except for the window logic which hasn't been decoupled from the VM support for the macintosh. \\\n\\\n1) AsynchFilePlugin the security check for ability to create file is now a plugin call.\\\n2) B2DPlugin logic changes to fillLinearGradientfromtoat\\\n3) b3dRemapFaces, b3dRemapEdges, b3dRemapEdgeList, b3dRemapAET, b3dRemapEdgeVertices, b3dRemapFaceVertices, b3dRemapFaceFree, b3dRemapEdgeFree, b3dRemapAttributes. Some casting and changing of += to = + to make some compilers happy.\\\n4) BitBltPlugin added tableLookupat call.\\\n5) DropPlugin added setFileAccessCallback to allow the Security Module plugin the ability to give us the entry point to turn security off so we can open files as read only when security is turned on.  This was broken in the past. \\\n 6) FilePlugin added fileOpennamesizewrite,getThisSession to allow for callbacks. Changed the file security logic to use the plugin interface. \\\n7) interp.c, fixes for 4347ByteArrayRangeCheck-di, ability to printAllStacks, security calls for image rename, write to use plugin interface.\\\n8) Added GetAttributeString, and recordDragDropEvent and entry points for callbacks.\\\n9) SecurityPlugin changed when initialization is called to initialize the safe and unsafe directorys, also added entry points for all the testing calls so it can be a true plugin.\\\n10) Serialplugin. The serial plugin was redesigned to seperate out MIDI logic. People with MIDI devices and old serial macintosh should check to see if they still work since we lack equipment now to test this obsolete technology set.\\\n11) SocketPlugin. Make security calls true plugin calls.\\\n12 SoundGenerationPlugin. Removed \\\nEXPORT(int) SoundGenerationPlugin_primitiveFMSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveOldSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitivePluckedSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveWaveTableSoundMix(void);\\\nThey were a hack at the plugin level and discussion on the list seemed to show they were no longer used. \\\n13) Checking for if defined (__APPLE__) && defined(__MACH__) for the Mac OS-X native development environment\\\n14) Changed sqMacAsyncFilePrims, usage of interpreterProxy->, plugin calls for getThisSession. \\\n15) Changed sqMacDirectory.c. Removed some utility code and make it a seperate file so that it can be shared between sqMacWindow and other plugins that require them. \\\n16) Changed sqMacDragDrop.c. Added plugin callback for getSTWindow, the sqSetFileAccessCallback logic, fileOpennamesizewrite, and secHasFileAccess. Added logic to do the recordDragDropEvent callback to sqMacWindow.c \\\n17) sqMacNetwork.c. Some cleanup for the OS-X version of the OpenTransport headers, some constants have name changes\\\n18) sqMacNSPlugin.c Use of ioLoadFunctionFrom(NULL, \"DropPlugin\"); versus explicit call.\\\n19) sqMacOpenGL.c. Some cleanup for the OS-X version of the OpenGL headers\\\n20) sqMacOpenGLInfo.c. Some cleanup for the OS-X version of the OpenGL headers\\\n21) sqMacSecurity.c ioInitSecurity calls back to dragAndDrop plugin to set entry point to turn security off.  Added code to create directories if required and ensured callbacks are plugitized.\\\n22) sqMacSound.c Some cleanup for the OS-X version of the Sound headers. Use of interpreterProxy-> in the proper places.\\\n23) sqMacWindow.c Some cleanup for the OS-X version of the compiler.  Fixed saveAsEmbeddedImage, this got broken when we moved from a FAT to a ppc only application.  Altered interface to recordDragDropEvent so that it was plugable. Some file path name logic goes to a seperate C source file. The drag and drop plugin is loaded and intialized after the image is loaded but before the interpreter is started, before it was done a bit earlier in the startup process. This also has the effect of initializing the security module.\\\n24)sqOpenGLRenderer.c. Some cleanup for the OS-X version of the OpenGL headers\\\n25)SurfacePlugin.c gets a hack so it knows when it is internal versus external.\\\n\\\n\\\n\\\nv3.0.18 at change set #4081\\\n(Note browser plugin goes to 3.0.23\\\n\\\n1) sqMacOpenGL.c Quite a few changes were made to the code to support it as an internal plugin for the browser. This is because the drawable frame for a browser plugin is a subset of the browser's grafport, so lots more care must be taken to draw in the correct location using OpenGL. We also fixed issues with re-configurating the Open/GL draw area when the window gets resized or goes to full screen, and attempted to ensure multiple screens will work.\\\n\\\n2) sqMacWindow.c, minor fix to cast a constant char * to char * for CW 6.1\\\n\\\n\\\nBrowser plugin 3.0.23 fixes\\\n\\\n1) Integerated the H/W Acceleration as an builtin plugin\\\n2) Added logic for pre and post event interaction to browser plugin event handler for H/W Acceleration logic. The external H/W Acceleration plugin mostly works with the browser plugin but doesn't work with full screen mode, or if the plugin is embedded in a window or a scrollable frame, so don't use it. Use the browser plugin 3.0.23 or higher which has the H/W Acceleration builtin.\\\n\\\nv3.0.17 at change set #4081\\\n(Note browser plugin goes to 3.0.21)\\\n\\\n1) Added HW acceleration as internal plugin.\\\n2) 4079BBAlphaTextFix-ar Fixes the problem with alpha text, changes BitBltPlugin.c \\\n3) Added primitive on the mac to truncate a file.\\\n4) Added logic to flush volume on a flush file to ensure file and control blocks are flushed.\\\n5) For the Carbon VM we increase nextevent wait time if we get sufficent idle time. This should reduce CPU usage under OS-X\\\n6) GetAttribute: 1002 now returns the gestaltSystemVersion as a hex string, and getAttribute: 1003 now returns either '68K' or 'PowerPC'.\\\n7) Starting with 3.0.17 the VM is build only as a powerpc application. The latest VM as a 68K application will be made available from time to time permits based on people's needs. \\\n8) Changes to sqOpenGLRenderer.c to improve performance, OpenGL 1.1 support.\\\n\\\nPlugin 3.0.21 fixes\\\n\\\n1) added check for mailto: tag on posts to fix problem with Netscape crashing, and IE hanging.\\\n2) Plus above fixes.\\\n\\\nWhat has been fixed/changed.\\\nv3.0.16 at change set #4041\\\n(Note browser plugin goes to 3.0.20)\\\n\\\n1) Lots of fixes for BitBlt and HW acceleration.\\\n2) Hardware Acceleration plugin goes to 1.0.1. Please note there is a seperate plugin with the same name for Carbon. Doing a get info will identify if the plugin is only usable with Carbon Squeak.\\\n\\\nv3.0.15 at change set #4026 (May 17th test version)\\\n(Note browser plugin goes to 3.0.19)\\\n\\\n1) Added support for OpenGL HW acceleration plugin\\\n\\\nPlugin 3.0.19 fixes\\\n\\\na) Obey embedded tag plug\\\nb) Fix problem with plugin 3.0.17 not working with netscape 4.x\\\nc) Carbonize plugin for IE 5.1 \\\nd) Remove debugging printf than occurred on transition to full screen mode\\\n\\\nWhat has been fixed/changed.\\\nv3.0.14 at change set #3987\\\n\\\n(Note plugin goes to 3.0.17)\\\n\\\n1) sqMacDirectory.c. The pathlookup would handle the case of foo:bar::do incorrectly by ignoring the :: path redirection. This has been fixed. However a path lookup will not work if it contains :: and an aliased directory in the middle of the path.\\\n\\\n2) sqMacSecurity.c. The pathname for the untrustedUserDirectory was built incorrectly, and the bug mentioned above in sqMacDirectory.c usually kept this from being noticed.\\\n\\\n3) sqMacWindow.c  we added some logic to do the delay for primitiveRelinquishProcessor, but found it had an large effect on a freecell benchmark. I suspect on a Morpic step wait there is nothing to do so primitiveRelinquishProcessor gets called which then affects response time. So for now we revert to the 3.0.11 behavior, good performance and 100% CPU usage!\\\n\\\n4) GetAttribute 1004 returns returns interpreterVersion; which is for example\\\n\"Squeak3.1alpha of 6 February 2001 [latest update: #3987]\"\\\n\\\n5) When in full screen mode we now attempt to disable resizing, zooming, or moving the window. The window borders are hidden, but in the past it was feasible to grab an edge and alter it, thus confusing the VM.\\\n\\\n6) Worked on Carbonizing the browser plugin\\\n\\\n7) 3977 & 3978 FloatArray fixes. Makes float arrays go through a new (and working) version of #primitiveHash\\\n\\\n8) Fixed problem with accidental mouse clicks being triggered from pulldown menus on application switching.\\\n\\\n9)\\\n\"Change Set:\t\t3984 BitBltExtensions-ar\\\nDate:\t\t\t4 May 2001\\\nAuthor:\t\t\tAndreas Raab\\\n\\\nThe change set includes various extensions for BitBlt with the goal of migrating the useful features from FXBlt into the general BitBlt mechanisms. These include:\\\n\\\n* Handling of LSB and MSB forms:\\\nBitBlt now handles both, MSB and LSB forms (and their conversions). Only instances of Bitmap are assumed to contain big-endian pixels. All others are assumed to be little endian (reason is that we can only identify Bitmap here). Note that 'LSB' and 'MSB' refers to PIXELS, that is a 1bpp LSB form has its left most pixel in the lowest bit whereas a 1bpp MSB form has its left-most pixel in the highest bit.\\\n\\\nFor pixel depths < 8 this can be different from what your OS supplies (as an example, Windows bitmaps < 8 are big-endian pixels in little-endian words; we might call them 'middle-endian'). We simply don't deal with those - forms are either big or little endian but nothing inbetween.\\\n\\\nBitBlt has got an extra combination rule for swapping pixels in the destination form. This can be used to make byte swapping much more efficient (as soon as we've got more VMs with support for it).\\\n\\\n* Handling of 'native bitmaps' (aka surfaces):\\\nBitBlt is now able to deal with OS surfaces that are registered with the surface plugin.\\\n\\\n* Handling of full color maps:\\\nBitBlt has been extended to deal with instances of ColorMap in addition to the prior mechanism of using only indexed lookups and provide an implicit 16-32 bit color conversion. ColorMaps can specify both, a lookup table and an additional set of masks and shifts to apply during the color mapping operation. \\\n\\\nFour independent shifts and masks can be given which can be used for a lot more than just color conversion (as an example, one could do byte swapping with this; but see also BitBlt class>>exampleColorMap). \\\n\\\n* Better handling of default arguments:\\\nFor most of the required arguments for BitBlt very reasonable default assumptions can be made. This includes the destOrigin (0@0), clipRect (0@0 extent: destForm extent), sourceOrigin (0@0). BitBlt now substitutes these if they are absent (e.g., nil) in the instance provided.\\\n\\\n\"\\\n\\\n\\\nv3.0.13 at change set #3848\\\n\\\n1) sqMacSecurity was changed to set the unsecure directory to\\\n\tsystem folder:Preferences:Squeak:Internet:My Squeak\\\n\\\nv3.0.12 at change set #3848\\\n1) Fixed problem with creating My Squeak Folder in Documents Folder with System 8.6\\\n\\\nWhat has been fixed/changed.\\\nv3.0.11 at change set #3848\\\n\\\n1) sqMacDirectory had a bug when you resolved a path name. The fast resolve always failed, which invoked the slow resolver. Now the fast resolver works.\\\n\\\n2) sqMacSecurity was changed to set the unsecure directory to Documents:My Squeak. \\\n\\\n3) sqMacWindow was changed to fix some issues with Squeak capturing events from other applications and to reduce the number of duplicate mouse events that are generated. Also we capture modifier information  directly from the mouse and keyboard on null events to fix some problems with Carbon. We  hopefully fixed problems with mouse clicks from foreground applications being seen by Squeak and issues with the OS-X Dock clicks.\\\n\\\n4) sqMacNSPlugin was changed to use the above mouse/keyboard capture code which is much cleaner than the original fix for the bogus modifier information given to us by netscape on a null event. \\\n\\\n5) When you turn full screen off we now correctly reposition the window to the original location versus a few pixels to the left. \\\n\\\nWhat has been fixed/changed.\\\nv3.0.10 at change set #3848\\\n\\\n1) changed VM exception unwind logic\\\n\t3796-Exception-unwind-V3,tim@sumeru.stanford.edu, Paul McDonough, Stephen Pair and others\\\n\\\n2) Fixes for the JPEGReader plugin and for Jitter 3\\\n\\\n3) Added minimal Mac VM logic to assist in building a small VM.\\\n\\\n4) Changed how the browser plugin starts up. Now it starts the interpreter running only after getting the browser setwindow command. This seems to fix a race condition that resulted in a crash at startup time with Netscape 4.x\\\n\\\n5) Fixed broken full screen redraw on cmd-tab\\\n\\\n6) Fixed what looked like mouse-down, mouse-down, mouse-up sequence. Now reports mouse-down, mouse up.\\\n\\\n7) Added StarSqueak plugin as internal plugin\\\n\\\n8) Note the current Squeak Plugin should be gotten from the www.squeakland.org site.\\\n\\\nv3.0.9 at change set #3776, Boston Snow storm build.\\\n\\\n1) A number of changes were made to the interpreter:\\\n\ta) added primitive to change a class.\\\n\tb) added primitives to get or put 32bit integers\\\n\tc) Fix problem with GC and class reshaping\\\n\td) Better logic for method cache flushing\\\n\\\n2) Added JPEGReader plugin\\\n\\\n\\\nV3.0.8 at change set #3740\\\n\\\n1) The caps lock no longer maps to the shift attribute. So if the caps lock is down mouse clicks will behave normally. \\\n\\\n2) Numerous fixes for the BitBltPlugin plugin\\\n\\\n3) Memory allocation grow/shrink logic for Carbon was added.\\\n\\\n4) Spurious mouse clicks for the browser plugin has been fixed. (This took awhile to fix, I'm sure it's a bug with the Swedish version of Netscape)\\\n\\\n5) The browser plugin will attempt first to allocate memory from the browser heap, then the system heap. Most people when faced with a memory issue usually increase memory for the browser first. However memory for the plugin is controlled by an attribute in the EMBED HTML statement. \\\n\\\nV3.0.7\\\n\\\n1) A bug exists in pre OS 8.x that causes a crash in activate window if the standard get file \\\ndialog comes up before the Squeak Window. I remove the InvalWindow call found in that routine since it is actually redundant.\\\n\\\n2) The standard get file dialog on system 7.x would not terminate if you did a cancel.\\\n\\\n3) The InterfaceLib had to be weak linked to prevent CFM startup issues. \\\n\\\nV3.0.6\\\n\\\n1) Alias resolving is less aggressive.\\\n\\\n2) We no longer cache image reads or writes. This was done because OS 9.1 allows you to have very large disk caches, and it's pointless to cache the image read or write.\\\n\\\n3) The file flush primitive now actually flushes the file via an OS call. This was a bug in the CodeWarrior 5.3 source code.\\\n\\\n4) The 68K version was being built with the 68881 math library. This fails on 68040LC chips. We now use the non-68881 math library. Thanks to Bruce ONeel for find this.\\\n\\\n5) A bug was found in the path resolving logic that was added for 3.x. This bug apparently only affects 68K machines,  never was identified as a PowerPC issue. \\\n\\\n6) The Netscape plugin needs a properly allocated clip region, this code seemed to work ok on new systems, but fails on system 7.6.1\\\n\\\n7) The security interface will create a Documents folder on the root volume if the default Document folder has been deleted. This is needed for security purposes. \\\n\\\n8) Jitter needs 1MB of free memory to run.\\\n\\\n9) 68K machines require another 32K of stack\\\n\\\n10) Threads  now work on 68K machines, but turned off because of possible performance issues. (I think more study is needed).\\\n\\\n11) The 68K version was compiled with better optimization, expect a 15% improvement.\\\n\\\n12) fix for BitBltPlugin ascii = byteAt((sourcePtr + charIndex) - 1);\\\n\\\n13) The interpreter object validation checking code was alter to work correctly.\\\n\\\nV3.0.5\\\n\\\n1) sqConfig.h changed due to BE OS header changes\\\n\\\n2) sqMacDirectory.c. Added support for Navigation services or Standard File Get to find the image at startup time when the Squeak.image is not found by the VM. This replaces the DOS like console message that comes up saying that Squeak can't find a image.\\\n\\\n3) A fix to drag and drop for the browser plugin.\\\n\\\n4) We now use Apple's cooperative multithreading package to run the UI in one thread, the VM in the other. This solves some issues with the browser and makes the UI versus VM logic and execution responsibilities easier to understand. \\\n\\\n5) Changed the sqMacNSPlugin.c code to support a 3.0VM using multithreading support. This should give Squeak in a browser better performance. Also changed the full screen support to correctly work with multiple monitors.\\\n\\\n6) BitBltPlugin.c gets one more op code\\\n\\\n7) Added the security interface\\\n\\\n8) Added the file flush primitive\\\n\\\n9) Rewrote the macintosh readme file\\\n\\\n10) Revisited the zoomWindow code and found a bug with multiple monitor support, then I fixed the code to make Full Screen mode work on screen that Squeak window is mostly on, versus the menubar screen. Also if you switch from full screen back it resizes the window back to the orginal size and location before you invoked the full screen. \\\n\\\nV3.0.2\\\nPlugins\\\n\\\nRecompiled the internal BitBltPlugin plugin to encorporate:\\\nChange Set:\t\t258AlphaBlendOpt-dsm\\\nAuthor:\t\t\tDuane Maxwell, Paul Phillips/exobox\\\na) Short circuits full opaque and full transparent pixels when alpha blending.\\\n\\\nRecompiled the internal LargeIntegerPlugin\\\n3298LargeIntegersV1-2-sr -- Stephan Rudlof -- 29 November 2000\\\n3299LargeIntV1-2For29-sr -- Stephan Rudlof -- 29 November 2000\\\n\\\nVM Software\\\n\\\n(b) PowerManagement for macintosh is now supported. You can disable the power manager to give you better performance on some powerbooks at the expense of battery life. See the Preferences Panel for details, category 'Performance'\\\n- changed sq.h\\\n- changed sqMacWindow.c to add support for power mgr disabling\\\n\\\n(c) Drag and Drop support for the macintosh, dragging files from the Finder to the Squeak window is now supported.\\\n- sqMacDragDrop.c added\\\n- sqMacWindow.c changed\\\n\\\n(d) Added primitive for get macintosh creator and file type.\\\n- sqMacDirectory.c changed\\\n\\\n(e) Carbon support. Thanks to Karl Goiser karl@wattle.net for work he did on sound and other Carbonization hotspots.\\\n- sqMacAsyncFilePrims.c changed\\\n- sqMacFFIPPC.c changed (not supported for Carbon)\\\n- sqMacNetwork.c changed per Apple tech note 1173 Carbon asset tracking\\\n-sqMacSerialAndMIDIPort.c chnaged (Not supported for Carbon)\\\n- sqMacSound.c changed per Apple tech note 1198 Carbon double sound buffer playing\\\n- sqMacWindow.c changed (various changes for Carbon)\\\n\\\n(f)  Poll at least 60 times a second for the mouse if required. Previous 2.9.x VM did it 30 times but this is too slow and 2.8.x VM do it 60 times a second.\\\n\\\n(g) Reworked path support Thanks to Karl Goiser karl@wattle.net for starting this.\\\n- sqmacDirectory.c changed reworked lookupPath\\\n- sqMacWindow.c changed, added GetApplicationDirectory to get application directory\\\n\\\n(h) I rewrote the sqMacDirectory.c logic to enable proper understanding of Apple's Alias logic. This means for example you can alias the \"SqueakV3.sources\" file and then only have one copy and have all your images point to it. \\\n\\\n(i) Added Zoom Window support.\\\n\\\n(j) Change the Squeak change file icon to better match Apple's visual guidelines, Thanks to Doug Way for the suggestion and the new icons.\\\n\\\n(k) The sound plugins have changed...\\\n\\\n(j) Dropped FFI out of the base Squeak because of security concerns\\\n\\\n(k) Compiled for 750(G3) processor versus 603\\\n\\\n(l) Added screenDepth primitive\\\n\\\nThe 3.0.x VM contains most of the optional plugins, you might want to check this by inspecting \"Smalltalk listBuiltinModules\" to see where your plugins are coming from. In some case people have been accidentally overriding the new builtin plugins with older plugins. \\\n\\\nThe file \"Squeak 3.0Alpha10MT.sig\" contains the PGP signature for the Squeak 3.0Alpha10MT VM\\\n\\\nJohn M McIntosh  johnmci@smalltalkconsulting.com\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n}"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Documentation/3.7.5 Release Notes.rtf",
    "content": "{\\rtf1\\mac\\ansicpg10000\\cocoartf102\n{\\fonttbl\\f0\\fnil\\fcharset77 Geneva;\\f1\\fswiss\\fcharset77 Helvetica;\\f2\\fnil\\fcharset77 Monaco;\n\\f3\\fnil\\fcharset77 LucidaGrande;}\n{\\colortbl;\\red255\\green255\\blue255;\\red137\\green19\\blue21;\\red26\\green26\\blue255;}\n\\margl1440\\margr1440\\vieww17300\\viewh12720\\viewkind0\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0\\fs24 \\cf0 Mac VM 3.7.5 mach-o build for Carbon, and build for Classic. Support for Croquet, support for Safari, pending support for TK4\\\nAug 31th, 2004 (3.7.5b3)\\\n\\\nStill yet to do, in future versions -> Verify that file delete rename etc works on aliases, not the targets. (Yawn, someday)\\\n\\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\n\\\n3.7.4 seems a fine VM, from what people tell me, but now we've 3.7.5...\\\n\\\n3.7.5b3\t\t\tOpenGL fix by Bert.\\\n\t\t\t\tOpen Squeak3D.log in the currently directory, not the root volume, also ensured this works in os9.\\\n\t\t\t\t\\\n\t\t\t\tsqMacNSPlugin.c\tAlter memory check at startup to ensure we see all 512MB, not a default of 30MB\\\n\t\t\t\tsqMacUIMenuBar.c\tDon't hide menubar if squeak screen is full screen on secondary screen. \\\n\t\t\t\tsqMacWindow.c\tWhen you open in full screen mode, then revert, ensure the screen is resized rationally. \\\n\t\t\t\t\t\t\t\tAlso remember screen size and location when going into full screen so revert is sane. \\\n\t\\\n3.7.5b2\t\t\tLimited distribution for testing\\\n3.7.5b1\t\t\tLimited distribution for testing \\\n\\\n3.7.5b1\t\t\tReleased to fix issues with 16bit to 32bit display color mapping\\\n\t\t\t\t\\\n\t\t\t\tCleanup of compiler warning message.\\\n\t\t\t\tsqMacAsyncFilePrims.c, sqMacOpenGL.c, sqMacDragDrop.c, sqMacDirectory.c, \\\n\t\t\t\tsqMacInternetConfiguration.c, sqMacJoystickAndtablet.c, sqMacMIDI.c, sqMacSecurity.c,\\\n\t\t\t\tsqMacSerialPort.c, sqMacNetwork.c, sqMacSound.c, sqMacUUID.c, sqMacEnconding.c,\\\n\t\t\t\tsqMacFileLogic.c,  sqMacImageIO.c, sqMacMain.c, sqMacMemory.c, sqMacNSPlugin.c,\\\n\t\t\t\tsqMacTime.c, sqMacUIAppleEvents.c, sqMacUIClipBoard.c, sqPlatformSpecific.h\\\n\\\n\t\t\t\tsqMacUIEvents.c\\\n\t\t\t\tPrework for multiple window support, use event supplied window versus stWindow. \\\n\t\t\t\tChange os-9 behavior to bring window to front swallow click\\\n\t\t\t\tChange os-x behavior to bring window to front swallow click\\\n\\\n\t\t\t\tsqMacWindow.c\\\n\t\t\t\tPrework for multiple window support, use getSTWindow() call versus stWindow. \\\n\t\t\t\tUse lookup table to properly map 5bit color space to 8bit color space. Some crummy code was introduced in 3.6.1b3\\\n\t\t\t\twhich did a poor job of color space transformation (16->32bit).\\\n\\\n\t\t\t\tsqMacExternalPrims.c\\\n\t\t\t\tAlter load logic to use kCFURLPOSIXPathStyle path name versus hfs path name. \\\n\t\t\t\tAlter load logic for frameworks to look in User, Network, Local, System domains for framework,\\\n\t\t\t\tbefore we would only look in the System domain. This allows frameworks at the user domain scope.\\\n\\\n\t\t\t\tCleanup of squeak window references pending multiple window support\\\n\t\t\t\\\n3.7.4b3\t\t\tReleased to fix issues in Netscape plugin code\\\n\t\t\t\tFIX PROBLEM that triggers image read failure on G5 machines. This prevents image from running on G5 machines.\\\n\t\t\t\tProblem shows up as browser crash or failure to start squeakland project.\\\n\\\n3.7.4b2\t\t\tReleased to fix issues in Netscape plugin code\\\n\t\t\t\tDo not start timers until later in the image start, this prevents failure if image doesn't load\\\n\t\t\t\tSupport failureURL and imageName embed html tags\\\n\\\n3.7.4b1\t\t\tprimitive Function Pointer goes into method cache logic, better lookup times.\\\n\t\t\t\tForce Interrupt Check logic in VM to fix most/all? issues with tight loops and keyboard interrupt logic.\\\n\t\t\t\tmore sanity checks in displayBitsOfLeftTopRightBottom\\\n\t\t\t\tcleanup of flushExternalPrimitiveOf\\\n\t\t\t\tcleanup of oopFromChunk\\\n\t\t\t\trefactor pop then push to pop:thenPush:\\\n\t\t\t\tlookupMethodInDictionary refactor to make one loop looking, versus perhaps two.\\\n \t\t\t\tmark/sweep logic or type, versus adding type (or is correct math)\\\n\t\t\t\tdispatchFunctionPointer logic\\\n\t\t\t\trework primitiveScanCharacters logic\\\n\t\t\t\tadd parm to VMparms to set interruptChecksEveryNms\\\n\t\t\t\tFix bug in primitiveYield\\\n\\\nLargeIntegersPlugin\tadd normalization logic\\\n\\\nZipPlugin\t\t\tadded primitiveUpdateAdler32 primitive\\\n\\\n3.7.3b4\t\t\tNumerous changes for Unicode file name support, and proper support for keyup/keydown on os-x. \\\n\\\nsqVirtualMachine.c\tVM_PROXY_MINOR set to  6  to support isArray = isArray;\\\n\\\ninterp.c\t\t\tNew VMMaker code update, major change is to use dispatchFunctionPointerOnin logic to dispatch \\\n\t\t\t\tprimitive calls, versus going via a jumptable/case statement. Also Tim reviewed the usage of the \\\n\t\t\t\tmillisecond clock and improved things so we don't need to check the clock on every prim call. This \\\n\t\t\t\tmakes the RISC and other platforms faster. However it only has minor effect on the os-x carbon VM \\\n\t\t\t\tbecause of how the cheap millisecond clock is implemented.\\\n\\\nsqMacDirectory.c\tChange dir_Lookup  // HFS+ imposes Unicode2.1 decomposed UTF-8 encoding on all path elements\\\n\t\t\t\tPer request from \n\\f1 Tetsuya HAYASHI <{\\field{\\*\\fldinst{HYPERLINK \"mailto:tetha@st.rim.or.jp\"}}{\\fldrslt tetha@st.rim.or.jp}}>\\\n\\\nsqMacEncoding.c\tAlter SetVMPath() \n\\f0 per request from \n\\f1 Tetsuya HAYASHI , \\\n\t\t\t\tadd support for \n\\f2\\fs20 \\CocoaLigature0       \\\n\t\t\t\t\\cf2 \"ShiftJIS\"\\cf0  kCFStringEncodingShiftJIS\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f1\\fs24 \\cf0 \\CocoaLigature1 \\\nsqMacFileLogic.c\tAlter makeFSSpec(), get  kCFStringNormalizationFormD path name\\\n\t\t\t\tAlter PathToFile(), get kCFStringNormalizationFormKC path name\\\n\t\t\t\tAlter QuicklyMakePath() get kCFStringNormalizationFormKC path name\\\n\t\t\t\tNew routine unicode2NativePascalString()\\\n\t\t\t\tAlter makeOSXPath, get kCFStringNormalizationFormKD path name\n\\f0 \\\n\t\t\t\tAlter resolveLongName, get kCFStringNormalizationFormKC path name\\\n\t\t\t\tAlter FSMakeFSSpecCompat(), call \n\\f1 unicode2NativePascalString to normalize path name\n\\f0 \\\n\\\nsqMacMemory.c\tAllow browser plugin to allocate 512MB of VM space for image under os-x. \\\n\\\nsqMacUIAppleEvents.c Use CFStringGetSystemEncoding versus suggested plist.info suggestion because the encoding info is quite right yet at\\\n\t\t\t\tthis point in the startup time.\\\n\\\nsqMacUIEvents.c\tKey Up is  now reported as an event when the key is released. Earlier os-x carbon VMs would report the key up after the\\\n\t\t\t\t keystroke was processed by Text Services, which was incorrect. We also deal with Key repeat correctly and don't send\\\n\t\t\t\tanother key down event. This change has made it possible to properly support Morphic games where key up/down state is\\\n\t\t\t\timportant to game interaction. \\\n\\\nsqMacWindow.c\tFix crash in ShowWindow(). This was due to a pthread race condition between the UI thread and interp.c. \\\n\t\t\t\tFixed by using UI callback to handle the show screen call. Would show up as a crash before window appeared.\\\n\\\n3.7.3bx\t\t\tEarlier versions of 3.7.3 were released to confirm the file changes for Japanese users worked correctly, and to \\\n\t\t\t\tconfirm that the keyUp logic changes worked as desired.\\\n\\\n3.7.2b1 \t\t\tChanges for NPSqueak to fix issues with full screen mode under Safari 1.2 (V125) \\\n\t\t\t\tUsage of VMMaker3-7b2 to build interp.c\\\n\t\t\t\tUnicode values now come up from the classic VM versus the historical (1984) keycode values, this makes Tweak work.\\\n\t\t\\\n3.7.1b2\t\t\\\nJPEG READER WRITER\\\n\t\t\t\tusage of Apple '-fast' uncovered a source code issue, initialization routines for internal jpeg plugin were not returning true or false, before this was kinda of considered as true. But when compiled with -fast it's zero, meaning the inialization failed, but that is bogus.\\\n\\\n3.7.1b1\\\n\t\t\t\tUse of \"-fast\" apple gcc 3.3 compiler option, improves sends by significant %\\\n\t\t\t\t\n\\f1 On EventKeyUp/EventKeyDown you get the UniCode On EventKeyChar you get the UniCode->MacRoman translated character.\\\n\t\t\t\tBroke high bit ascii macroman in 3.7.0bx.\\\n\t\t\t\tFor multi-byte character input you get EventKeyDown/EventKeyChar/EventKeyUp for each unicode character coming from the input sequence.\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 \\\n3.7.0b2\t\t\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f1 \\cf0 \t\t\t\ta) You can alter the application's Info.plist by setting the SqueakEncodingType using the ICANA readable names\\\n\\\n\t\t\t\tmacintosh\t- >macRoman\t\\\n\t\t\t\tUTF-8\t\t-> UTF-8\\\n\\\n\t\t\t\tb) Support for sqSocketListenOnPortBacklogSizeInterface, which allows you to specify the interface to use for the listen should work both for os-x and os-9.\\\n\t\t\t\tc) Usage of VMMaker3-7a2.\\\n\t\t\t\td) Special change sets: make primitive point x/y internal, and slightly faster activate.\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 \\\n3.7.0b1 \t\t\t\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f1 \\cf0 \t\t\t\t Changes for the \"m17n\" package fromTetsuya HAYASHI <{\\field{\\*\\fldinst{HYPERLINK \"mailto:tetha@st.rim.or.jp\"}}{\\fldrslt tetha@st.rim.or.jp}}> so one can type Kanji characters.\\\n\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 3.6.1b7\t\t\t\\\nSqMacWindow.c\tFix for new rending code when used with 2.8 or earlier images, mouse clicks reported in wrong place\\\n\\\n3.6.1b6\\\nSqMacWindow.c\tEnable 8bit all modes of 8 bit rendering\\\n\\\n3.6.1b5\\\nSqMacWindow.c\tEnable 8bit support for 8->8 8->16 8->32 \\\n\\\n3.6.1b4\\\nSqMacWindow.c\tFix issues with title bar height calculation, was using the wrong window region to do this. Also failed \\\n\t\t\t\tfor full screen usage. Tinkered a bit with ioDisplay moving bytes, now do <=32 bytes directly. \\\n3.6.1b3\\\nSqMacWindow.c\tAlter logic to allow for 16->32 and 32->16 mapping using direct copy logic. Workaround for \\\n\t\t\t\tos-x 10.3.0 copybits bug. Released for limited testing. Awaiting real fix from Apple.\\\n\\\n3.6.1b2\\\nSqMacWindow.c\tAlter to use unix direct port bit copy versus copybits to get around a crash caused by a bug\\\n\t\t\t\tin os-x 10.3.0 copybits. Released for limited testing\\\n\\\n3.6.0b2\\\nBuild from about to be offical 3.6.0 VM, Balloon & VM Maker source.\\\nAdded in \\\nArraysToGlobalStruct-JMM.1.cs\\\n\t?3.7 Status unknown, but makes better interp.c interpreter loop code (silly optimizer).\\\nFasterCopyLoop-JMM.4.cs\\\nFasterCopyLoopPart2-JMM.2.cs\\\n\t?3.7 Status unknown, but makes drawing 20%+ faster due to better PowerPC code optimizations\\\nFasterLookupMethod-JMM.1.cs\\\n\t?3.7 Status unknown, but makes method lookup a bit faster. \\\nMakePrimPointXInternal-JMM.1.cs\\\n\t?3.7 Status unknown, but makes point x/y access faster.\\\n\\\nSlightlyFasterActivate-JMM.3.cs\\\n\tRolled into 3.7\\\n\\\nYou need 3.5.3b1 for Safari plugin support\\\n\\\n3.5.3b1  (browser plugin)\\\nFixed issues with IE drawing and crashs related to screen updating in non-thread safe IE.\\\n\\\n3.5.2b6\\\nFixed issues with plugin discovery for netscape plugin \\\n3.5.2b5\\\nFixed primitive dispatch to use gnuified jump table. \\\n\\\n3.5.2b4 \\\nFix issue with race on open doc events and squeak VM Thread for drag and drop support when starting squeak\\\nFor os-x expose primitivePluginBrowserReady, not the rest of the URL browser primitives, they don't work in Safari\\\nFor system attribute 1003 return powerpc versus PowerPC to match unix VM\\\nStart timers later in the VM startup logic, after reading the image, versus before.\\\nsqMacNSPlugin.c \t- Look for Squeak folder in User, local, Network, System domains versus just User.\\\nsqMacTime.c\t\t- Use old delay logic (1ms accurate), versus aioPoll (10ms accurate).\\\nsqMacUIEvents.c\t- Only create PowerManagerDefeatTimer tick routine if power manager tapping is required which is only os-9 anyways.\\\nsqMacUIMenuBar.c - Draw menu bar later in startup, after we change it, save 200+ms\\\nBitBltPlugin.c\t\t- alphaSourceBlendBits16  Use table lookup which is 90% faster\\\n\t\t\t\t- copyLoopNoSource, roll constants into register versus recalculating.\\\n\\\n3.5.2b2 \\\nFix applescript document handling logic to prevent overrunning the drag/drop logic via the command line open cmd by using a spin loop\\\nto ensure Squeak has sufficent time to read the file name. \\\n\\\n3.5.2b1 \\\nChanged the bitBlt copyloop logic to use locals in safe places, versus globals. This improves drawing by 5%.\\\nMajor change is usage of GCC 3.3, versus GCC 2.95.x This increases send/second by about 8%.\\\n\\\n\\\n3.5.1b5 Added some more user changeable attributes, and changed some window behaviour when floating\\\nOS-x Version only \\\nSqueakWindowHasTitle\t\t- (Yes/No) yes if window should get title.\\\nSqueakFloatingWindowGetsFocus (Yes/No) yes if window should allow click and type if floating.\\\nSqueakMaxHeapSize\t\t- (Number) set to 512K, max size for os-x memory heap. Note changing this to 1GB may or may not cause a \\\n\t\t\t\t\t\tcore dump depending on where os-x allocates the memory segment above or below the 2GB boundary. \\\n\\\nsqMacUIEvents.c\t\t\t- set keyboard focus to floating window if required, do not hide floating window when we go to full screen mode.\\\nsqMacWindows.c\t\t\t- watch out for memory leak when we free the color table. \\\n\\\n3.5.1b4 Please note the major changes to network code in 3.5.1b2\\\na)Added options SqueakWindowType & SqueakWIndowAttributes to info.plist. The SqueakWindowType of 6 is the standard document window, a type of 8 is the floating utility window. The attributes control with window attributes and behavior according to\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f1 \\cf3 \\ul \\ulc3 http://developer.apple.com/techpubs/macosx/Carbon/HumanInterfaceToolbox/WindowManager/Window_Manager/wind_mgr_ref/constant_2.html#//apple_ref/c/tdef/WindowAttributes\\\n&\\cf0 \\ulnone \\\n\\cf3 \\ul http://developer.apple.com/techpubs/macosx/Carbon/HumanInterfaceToolbox/WindowManager/Window_Manager/wind_mgr_ref/constant_1.html#//apple_ref/doc/c_ref/WindowClass\\cf0 \\ulnone \\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 b) Sockets are not valid if the network is not initialized. \\\nc) The os-9 vm can return the open file error in the vm attribute data 1202\\\nd) MyWindowEventMouseHandler was leaking region handles.\\\ne) Support for primitiveClosureValue, primitiveClosureValueWithArgs, primitiveExecuteMethod\\\nf) when rootTableCount  goes > 2400 then allocationCount gets allocationsBetweenGCs + 1 \\\ng) BitBlt Alpha Blending has changed\\\nh) Added primitiveWrite24BmpLine\\\ni) The guard if statement for primitiveSerialPortRead was flawed, noted the buffer overflow, but then proceeded, versus returning. \\\n\\\n3.5.1b3 \\\na) Fix, Stephane Ducasse <ducasse@iam.unibe.ch> pointed out that using a virtual desktop we had a crash in ioSetFullScreen. This \\\nwas due to a pthread race condition between the UI thread and interp.c. Fixed by using UI callback to handle fullscreen window/move/resize.\\\n\\\n3.5.1b2\\\na) Switch to aio.h logic and unix socket logic! This is a MAJOR change!!!!\\\n\\\nb) Call aioPoll  (select()) to cause process wait versus old pthread logic. This follows in the footsteps of the unix port. You should verify that \\\ncpu time when squeak is idle is not affected in a dreadful manner.\\\nc) Fix, if you call does this directory exists on a file now you will get an error which will signal that the directory does not exist. This ensures\\\nthe FileDirectory test suite works. \\\nd) Fix, if you quit the browser plugin, check the status of the pthread_cancel before attempting the pthread_join\\\n \\\n3.5.1b1 limited distribution\\\n\\\n3.5.0b4 \\\na) os-x exposed an issue with EToyPeerToPeer support. It seems under os-x we get the connect, data, close so fast on lans that by the \\\ntime we get around to asking for the remote IP address the connection is closed, and our open transport call fails. We change SqMacNetwork.c to \\\nreturn the IP address discovered at connect time in this case. Under os-9 we never saw this behavior because we suspect the network activity \\\nwas slower and more serialized. \\\n\\\n3.5.0b3 (Safari support)\\\n\\\na) The plugin logic was changed to support Safari and better support os-x. This required building a CFM stub to load the mach-o compiled\\\nNSPLugin. The mach-o plugin now uses a pthread for the interp.c loop. This gives much better performance and user UI feedback. \\\nb) The GC logic was carefully reworked to optimize the assembler on the ppc. This gave us upwards of a 30-50% improvement, since \\\nincremental GC is going on all the time, this change actually has a effect you can see say in the solitaire example where we save 10%. \\\nc) sqMacNetwork.c was modified, first change in many years. The remote address and port number are requested as an async operation. \\\nThe operation times out after a few milliseconds. This was never a problem in os-9. Now it seems there is an issue sometimes for DHCP clients\\\non os-x. There the operation can timeout and return 0 as the address or port. We changed the call to do a sync operation to avoid a timeout.\\\nd) sqMacMain.c was modified to allow for pthreads for mach-o netscape based squeakland plugin support\\\ne) sqMacMemory.c changes for mach-o plugin support\\\nf) sqMacTime.c changes for  mach-o plugin support\\\ng) sqMacUIEvents.c changes for mach-o plugin support\\\nh) sqMacWindow.c changes for mach-o plugin support \\\ni) npmac.cpp now this is a netscape glue routine, I changed it to ensure we can see the entry points, originally they are C++, but need \\\nto be \"C\" so the loader can find the names the CFM glue routine is looking for. Also we add the logic TV2FP to setup the mach-0 to CFM code stubs to allow the mach-o plugin to callback to the CFM stubs in Safari. \\\nj) sqMacNSPlugin.c \\\n\t1) Rearrange when the interpret() thread is started to ensure a race condition doesn't happen.\\\n\t2) use Pthreads for the mach-o osx version. \\\n\t3) rework NPP_SetWindow to start interpret() when needed. \\\n\t4) Alter StartDraw, EndDraw to use a mutex lock and handle os-x port locking to prevent races between pthreads.\\\n\t5) Alter ioShowDisplay, optimization and handle os-x\\\n\t6) fix ioSetFullScreen to make it work on Safari\\\n\t7) fix OpenFileReadOnly to make it work on os-x, needed sqFileNameFromStringOpen macro call\\\n\t8) Alter ExitCleanup to mutex lock to prevent race ending issues, and add a bit more cleanup\\\n\\\n\\\n\\\nNote some versions of 3.4.1 were distributed for testing only, these are superseded by 3.5.0\\\n\\\n3.4.0b2 (Croquet support)\\\n\\\na) Ensure vmVersion information reports correct information, was bogus in 3.4.0b1\\\n\\\n3.4.0b1 (Croquet support)\\\na) Added plugin BMPReadWriterPlugin 14 November 2002 (i)\\\nb) B3DAcceleratorPlugin.c gets primitiveCreateRendererFlags (new api)\\\nc) two more op codes get added to BitBltPlugin (fixAlphawith, pixClearwith)\\\nd) Squeak3D gets (b3dOrthoNormInverseMatrix, b3dTransformDirection,b3dTransformPoint,b3dTransposeMatrix)\\\ne) The scroll wheel mouse logic was using apple cmd key as the modifier on the arrow key events, Other platforms use the Control key. So the \\\nmac falls in line (changed to use the control-key)\\\n\\\n\\\nNotes About previous VM.\\\n3.2.6 VM classic have an issue when the tickcount clock goes over 0x7FFFFFFF, about 24 days. \\\nThis exhibits itself when Squeak won't accept user input, or allow you to switch under os 9 or earlier after 24 days,\\\nor starting a Squeak image hangs during the initial screen painting.\\\nRestarting the mac solved these problems. Force quitting Squeak does not.\\\nThis is fixed in 3.2.7b3\\\n\\\nSome issues with alias files and folder were fixed in 3.2.7b6 and 3.2.8b3\\\n\\\n3.2.8b9\\\na) recompiled os-x version, 3.2.8b8 seem to have a bad compiler option and gave 20% less performance.\\\n \\\n3.2.8b8\\\na) exposed \n\\f1 vmParameter\n\\f0  24 & 25 which control how memory is allocated/freed \\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f1 \\cf0 Smalltalk vmParameterAt: 24 put: 48*1024*1024.\\\nSmalltalk vmParameterAt: 25 put: 24*1024*1024.\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 b) Added argv,argc, env variables to main\\\nc) Fixed for Jaguar 10.2. Full screen mode cmd-tab broke menu bar hiding, this is a 10.2 bug\\\nd) Added support for IP_ADD/DROPMEMBERSHIP and the ability to bind to the wild card port (0).\\\ne) OpenGL changes for TEA\\\n\\\n3.2.8b7 was testing release and not distributed to the public.\\\n3.2.8b6 was testing release and not distributed to the public.\\\n3.2.8b5\\\na) Oops broke the logic returning the vmversion information in classic. Also incremented os-x version (which was fine) to keep numbers in sync\\\n\\\n3.2.8b3 The squeak.sourceforge.net CVS tree was reorganized and the project builder project revamped. The \\\nmajor change to the source was upgrading the netscape browser plugin to 3.2.7b6 levels.\\\n\\\na) Gnunifer.3.cs Changed to add register var on FOO_REG and to remove sqGnu.h file embedded in method.\\\nb) sqMacDirectory.c Add logic to handle case of building as CFM carbon plugin under CW6, needed some carbon calls\\\nc) osExports.c needed to ifdef out the getUIToLock entry point (not available as CFM carbon browser plugin)\\\nd) sqMacFileLogic.c Fix alias problem. Add logic to deal with path names as CFM carbon browser plugin, ensure vmPath is correct.\\\ne) sqMacImageIO.c Cast to get rid of warning message\\\nf) sqMacMain.c Cast to get rid of warning message, Check for CFM Carbon and bundle check. Revise vm parm 1201 code to return long file names are ok as CFM carbon browser plugin. Some diagnostic routines for printing to the console as CFM carbon browser plugin.\\\ng) sqMacMemory.c Logic change as CFM carbon browser plugin.\\\nh) sqNSPlugin.c\tFix to beginFullScreen logic (carbon call is broken?)\\\ni) sqMacUIEvents.c Remove getUIToLock dummy call. This entry point should only exist for mach-o carbon builds. Not CFM carbon browser plugins\\\nj) sqMacWindow.c  Use old call to create window when a CW 5 carbon application.\\\nk) sqPlatformSpecific.h Change #ifdef to correct logic error when building as CFM carbon browser plugin under CW 5.\\\n\t\\\n\t\\\n\\\nMay 31st, 2002 (3.2.7b6)\\\nFor 3.2.7\\\n\\\n3.2.7b3 We build the VM using patchs to enable globals as a structure. This improves performance by 10%\\\n\\\na) Classic Vm builders might need to add \"struct foo *foo = &fum; \"  to int interpret(void). \\\nb) readme: add notes about changesets and alter build instructions\\\nc) sqMacFileLogic.c: use accessors for interp.c globals\\\nd) sqMacMain.c: use accessors for interp.c globals. Also Alain Fischer added logic to fetch os-x version number and to enable you to put squeak.image in the resource folder for autostarting.\\\ne) sqMacTime.h: Fix busted lowresclock again. After 24 days of mac uptime, 3.2.6 squeak will hang.\\\nf) sqMacUIEvents.h: use accessors for interp.c globals.\\\ng) sqPlatformSpecific.h: alter sqFTruncate to use fileno() as needed.\\\nh) sqMacWindow.c: use accessors for interp.c globals.\\\ni)  3.2.7b5 sqMacFileLogic.c: change vmpath to resolve to classic VM if vm is moved from MacOSClassic folder\\\nj) Misc changes for Netscape plugin support\\\nk) Introduce osExports.c logic\\\nl) 3.2.7b6 Fixed a problem in path name resolving need to use UTF8 to properly interact with high ascii characters\\\nm) 3.2.7b6 Fixed a problem in path name resolving there was a bug with certain types of alias path name combinations in quick name resolving.\\\n\\\nMac VM 3.2.6 mach-o build for Carbon, and build for Classic.\\\nMarch 14th, 2002\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f3 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\nNotes About previous VM.\\\n3.2.6b6 Classic or earlier has a bug that makes it stop collecting user input on a 19.88 hour cycle depending on reboot time.\\\n\tSeems many systems don't run for more than 19 hours so we've not had major complains about this issue. \\\n\tBug was introduced in 3.2.1.\\\n3.2.5 has a bug that prevents the use of accented characters without \\\n\ta image patch to fix a VM issue (not an issue in 3.2.4). Also you can't enter an double keystroke characters, ie ^ \\\n\twhich makes life difficult. It also does not support the AppleScript Plugin (not an issue in 3.2.4)\\\n3.2.4 a bug in project builder introduced a performance problem (bad compiler options).\\\n\\\nSee the 3.2.5 about why this 3.2.6 is different inside.\\\n\\\nFor 3.2.6:\\\na) Change an internal number that dictates how often pending interrupts should be looked at from 5ms to 3ms This improves \\\ndelay accuracy.\\\nb) Change how sleeping is done when squeak is idle. This reduces CPU consumption, and improves Delay accuracy.\\\nc) Fix bug with high bit problem with keyboard (accented characters are ok now)\\\n  c2) 3.2.6b6 has fixed characters that require multiple key strokes to enter.\\\nd) Externals that make UI interactions (IE AppleScript) Must now make a call back to the VM to schedule\\\n    the main thread to do the call that will invoke UI interaction to prevent a deadlock in Carbon between threads. \\\n   See the OSAExecute call in the AppleScript plugin for details.\\\ne) If you run a classic mac VM more than 23.x days nonstop it will stop responding to UI events.  Ensure clocks get anded with 536870911.\\\nf) signal inputSemaphoreIndex because we are mulithreaded. Not that it does anything for us yet...\\\ng) 3.2.6b6 Pass the unicode value of the keystroke up as the EventKeyDown/EventKeyUp data, versus mackeyboard code.\\\nh) Somewhere there is a bug with mktime + time, so use the unix code of time+localtime+gmt \\\ni) Change iorelinquishPrcessorForMicroseconds to sleep the quatum between now and wakeup time. Also schedule a\\\n   check for interrupts if wakeup time is now or in the past. This improves delay accuracy. For OS-x this was a big deal,\\\n   for os-9 it improves things by 1 or 2ms. Also in  os-x we sleep more when idle so CPU usage goes down.\\\nj) On OS-9 umap AND free the VM backing store. Just doing the free doesn't work and you lose 128Mb of disk space until you reboot\\\nk) 3.2.6b7 for post event processing ignore mouse move/drag/or scroll wheel events. These are ignored by the open/gl plugin and only suck a major amount of CPU time to process in the post event processing logic. \\\nl) 3.2.6b8 (3.2.6b4 classic) removed call to uncouple shift keys introduced in 3.2.1. This causes some macs after sleeping not to respond to keyboard input\\\nm) 3.2.6b8 (3.2.5b7 classic) added function for ioLowResMSecs to avoid early bit overflow. Rework clock checking in ioHandleEvents to handle clock rollovers properly.\\\n\\\nMac VM 3.2.5 mach-o build for Carbon, and build for Classic.\\\nMarch 4th, 2002\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f3 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\n\\\nBeware this version of the VM is significantly different inside! \\\n\\\n\\pard\\tx1440\\tx2880\\tx4320\\tx5760\\tx7200\\ql\\qnatural\n\n\\f1 \\cf0 a) Broke sqMacWindow.c into 10 different files by function type.\\\n\\\nb) Moved most of the memory allocation logic out of sqMacMain.c into sqMacMemory.c. and ensure memory is freed when Squeak is terminated. \\\nThe major change in this code is support for OS 9.x virtual memory mapping. This only applies to Mac OS 9.2.0 or higher, excluding os-x. It appears  Mac OS 9.1 has a bug that prevents this feature from working.\\\n\\\nFor images that require less than 128MB of memory, mapping is used to allow the image to grow/shrink to the 128MB boundary, therefore you can change the application memory size to about 2MB. \\\n\\\nFor images that require more than 128MB then change the application memory size to > 128MB and mapping will not occur. \\\n\\\nIf mapping is not available because virtual memory is turned off or the api is not supported by the macintosh OS then mapping is not used. Note that mapping is not support under the classic os-9.x environment under OS-X, however in this case you should be using the OS-X version of Squeak, not the classic version.\\\n\\\nc) Use of Carbon event logic for OS-X only. This is a major structural change. \\\n\\\nIt also encouraged the use of a pthread for interp.c. \\\n\\\nAll user interaction with the VM follows a new code path, so problems with keyboard or mouse input should be reported asap. Also any issues with application switching, windows being brought to the foreground or sent to the background and usage of the full screen logic should be reported asap.\\\n\\\nAs part of this change I have build in support for scroll-wheeled multi-button mice under os-x. Thanks to Doug Way for testing this for me. Maybe someone can post to the list what their favorite 3 button scroll wheeled mouse/trackball is.\\\n\\\nd) Use of a carbon call to get the dominate Device if you have multiple screens. People with multiple screens should confirm window resizing, full screen on/off works as expected.\\\n\\\ne) Corrected comment in sqMacFileLogic.c\\\n\\\nf) Changes to sqMacNSPlugin.c. This makes it compile, but it's not usable yet.\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 \\\n\\\nFeb 20th 2002 3.2.4\\\n\\\nFor this version of the VM I have migrated towards using OS-9 packages. This allows us to provide one \\\nfolder/package that supports os-x and previous operating system versions.\\\n\\\nGiven Squeak 3.2.4Beta1.app\\\nThe classic VM is found in the *.app:Contents:MacOSClassic, with an alias in *.app:\\\nThe mach-o OS-X VM is found in *.app.Contents:MacOS\\\n\\\nIf you are running OS-9 then clicking on the *.app or doing drag and drop will just run Squeak, same applies for OS-X.\\\nIf you are running OS-7.5.5 or OS-8.x then the *.app package will appear as a folder, just open and click on the alias within. \\\nNote that if you want to use classic plugins I suspect you need to put them in the MacOSClassic Folder beside the VM. \\\nBundles for os-x go in the same location as the *.app application package.\\\n\\\nChanges\\\na) Drag and drop at open time with image file that has no meta type, will now open the image, versus prompting you.\\\nb) Use an os-x window attribute at open time to signal that the window should not be moved by the dock when you go to full screen.\\\nc) Fix window update logic to use window that needs updating versus stwindowg to fix issues with print dialog windows in classic. \\\nd) bitblt gets recompile to pickup fixes posted in 3.2 update stream.\\\n\\\nFeb 5th 2002 3.2.3\\\nChanges\\\n\\\na) use old extended time manger to update psudeo-TickCount, versus sigalrm. siglarm make sound recording not work.\\\nb) fiddle with sound recording and make it work.\\\n\\\nJan 2002 3.2.2\\\nChanges:\\\n\\\na) AsyncFilePlugin.c Use global to remember security function entry point for performance reasons\\\nb) FilePlugin.c\tUse global to remember security function entry point for performance reasons\\\nc) interp.c Use squeakFileOffsetType versus off_t and add a bunch of checks to handle lack of long long and conversion errors between 64/32 bit integers and LargeInteger objects\\\nd) readme, it's http://www.mucow.com/Gnuifier.1.cs \\\ne) SocketPlugin.c\tUse global to remember security function entry point for performance reasons\\\nf) sq.h added default sqFilenameFromStringOpen and sqTruncate\\\ng) sqFilePluginBasicPrims.c revert to anti specs, but ensure #def to fseeko and ftello for 64 bit aware file systems.\\\nh) sqMacDirectory.c A bit more error checking on bad file names\\\ni) sqMacFileLogic.c Folders size is now zero in classic, and a bit more checking on bad file names\\\nj) sqMacSound.c Fixed a problem with sound recording in classic due to a change made in Sept. But sound recording still does not work under os-x\\\nk) sqMacWindow.c  two very important changes:\\\n\\\n\t1) You can now do FFI calls with the FFI bundle plugin to Mach-o frameworks. \\\n\tHowever you need to rework your api calls. For example:\\\n\tapiGetMousePoint: aMacPoint was\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'InterfaceLib'>\\\n\tIt now is:\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'Carbon.framework'>\\\n \t\\\n\tIf you review /System/Library/Frameworks I'm sure you can come up with interesting ways to \\\n\tmake mac only squeak images.\\\n\t\\\n\tI now use map( NULL, gMaxHeapSize, PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED,-1,0);\\\n\tanonymous memory mapping to 512MB as the squeak memory block. The VM can then grow or shrink\\\n\twithin the 512MB block, I just move a pointer. \\\n\t\\\n\tNote in 3.2.1 a slight error on my part restricted Squeak to 50MB. I am of course\\\n\tinterested to hear about issues with my choice of 512MB. Note a Squeak VM is limited to 2GB under perfect \\\n\tconditions, however if any part of the image crosses the 2GB boundary the VM will fail, right now 512MB\\\n\tseemed a safe choice.\\\n\t\\\n \tPhysMem:  60.2M wired, 78.6M active,  412M inactive,  551M used,  217M free\\\n\tVM: 3.03G + 55.3M   7847(0) pageins, 1(0) pageouts   \\\n\tPID COMMAND      %CPU   TIME   #TH #PRTS #DREGS RPRVT  RSHRD  RSIZE  VSIZE\\\n\t422 Squeak VM    0.8%  0:35.59   2    71   100  23.3M  8.53M  26.5M   571M\\\n\\\n\tbut I only have one 80,000,000 byte swap file in /var/vm\\\n\\\nNote if you turn crash reporter on, then if the VM crashes a nice report should be generated in your log directory.  See the Apple documentation for a description of this feature, currently it is set in OS-X 10.1.x via the preferences window for the Console Application. If you have a crash with this VM, please recreate and post the crash log (found in Users/foobar/Library/Logs/ to the Squeak mailing list so we can continue to make the VM fault tolerant.\\\n\\\n3.2.1 Notes\\\n\\\nYou might need these change sets to build a new VM or to use all the features of this VM with your image, hopefully these will get into the pending 3.2.x image.\\\n\\\nFixes and feature extensions.\\\nAsyncFileFixFu...hName-JMM.1.cs \tfix for async test method.\\\nDragAndDropAtStart-JMM.5.cs\t\tfix to enable drag and drop at startup\\\n\\\nNeeded to compile a VM with VMMaker\\\nLargeFiles-JMM.3.cs\t\t\t\tEnable large file support, files > 2GB\\\n\\\nNeeded to turn this feature on\\\nMacLongFileName-JMM.5.cs\t\t\tEnable long file names on the mac\\\n\\\nThe SUnit\\\nMacLongFileNamesSUnits-JMM.3.cs\tTest long file names and long directory names and large file support\\\n\\\nKinda optional features some people might need.\\\nInternetConfiguration-JMM.5.cs\t\tAllow internet configuration information access, internal plugin\\\nUUID-JMM.3.cs\t\t\t\t\tAllow UUID generation, internal plugin\\\n\\\na) The ability to get back a UUID. This uses the hosting UUID generator if the\\\n hosting OS supports it and we have a primitive we can call. If not then we generate\\\n a type 4 version of a UUID (the random bits one).\\\n(This requires a special change set)\\\n\\\nb) Ability to start squeak on the mac by dragging multiple documents onto the\\\nimage, or drag and drop of stuff onto the running VM icon.\\\n(This requires a special change set)\\\n\\\nc) Usage of the Internet Configuration tool kit to supply information about\\\nwhat the mac proxy is etc. etc.\\\n(This requires a special change set)\\\n\\\nd) Migrate file system to use 64 bits. This allows you to read/write and seek\\\nwith files > 2 GB. This includes a change to the VM to convert from/to long\\\nlong integers. It also allows the file system to actually deal with 2GB files,\\\nthe current file interface actually fails once the file exceeds 1GB.\\\n\\\ne) For the carbon based Squeak VM we now support long file names 255\\\ncharacters. Close both eyes and touch everywhere the mac VM deals with file\\\nname paths and hope for the best (Actually we write an Sunit to ensure we've\\\nnot broken everything). This also includes the ability to put an image in a\\\nlong file name directory, but right now the image name must stay under 32 characters.\\\n\\\nFilePlugin.c changes to support large integers.\\\nFilePlugin.h changes\\\nsq.h changes to support large files.\\\nsqConfig.h changes to resolve some conflicts.\\\nsqFilePluginBasicPrims.c  changes to support large files.\\\nsqMacAsyncFilePrims.c changes to use fspec versus 255 file path.\\\nsqMacDirectory.c changes to use hosting OS (OS-X) bsd create and delete directory\\\n and truncate. dir_look changes as part of the general rewrite.\\\nsqMacDragAndDrop.c use new call to get path name from fsspec. Use fsspec more, and added \\\n  interface code to setup drag and drop of items at application startup time. max document name\\\n  goes to 1000 characters.\\\nsqMacFileLogic.c Mostly rewrote!\\\nsqMacSecurity.c use new file calls.\\\nsqMacWindow.c \\\n\tincrease size of vmpath, docpath, imagepath to 1000 chars, shortname to 255 characters.\\\n\tadd logic for left/right modifier keys \\\n\treworked LoadLibViaPath logic \\\n\tsqImageFileOpen uses fsspec versus 255 path name.\\\n\tsqImageFileStartLocation uses ffspec.\\\n\tbundle support for bundles\\\n\t\\\ne2) interp.c supports get/put of large integers to long long integers.\\\ne3) fixed fTruncate\\\n\\\nHint getting this to work was a pain. Think of 255 character folder names and nested aliases,\\\nfolder 1 refers to folder 2 which then refers to folder 1 again, just go down the path say 8 times,\\\nthen ask to create a file or directory!\\\n\\\nf) Support to change the Mac screen resolution under Squeak control.\\\n\\\ng) Fix to unload/load the scrap at startup time to ensure the clipboard is\\\ncorrect when starting up the VM.\\\n\\\nh) Uncouple the shift key and left/right shift keys on old extended keyboard.\\\nAlso add a call to get which keys are currently pressed on a USB keyboard or\\\nthe USB codes for an apple non-usb keyboard. (Note this isn't working quite yet under OS-X)\\\n\\\ni) Changes to enable us to compile the VM under Apple's OS-X Project Builder\\\nenvironments.\\\n\\\nj) Some rewriting to ensure serial and midi support can be written as external\\\nplugins.\\\n\\\nk) Fiddling to get sound input to work under OS-X\\\n\\\nl) Platform.exports changed macintosh to macintoshSqueak to avoid conflict.\\\n\\\nm) Memory is allocated at 50MB at start, then will grow or shrink, verus previous carbon apps\\\n that did 1GB. \\\n \\\nn) sqPlatformSpecific.h changes to support long file names and os-x posix file names\\\n\\\no) sqVirtualmachine.c & sqVirtualmachine.h\\\n#if VM_PROXY_MINOR > 4\\\n\tVM->positive64BitIntegerFor = positive64BitIntegerFor;\\\n\tVM->positive64BitValueOf = positive64BitValueOf;\\\n\tVM->signed64BitIntegerFor = signed64BitIntegerFor;\\\n\tVM->signed64BitValueOf = signed64BitValueOf;\\\n#endif\\\n\\\nBeware this causes an interesting problem, if you compile plugins with VM_PROXY_MINOR now set to 5, then they will not work with older VMs. The solution is to define the VM_PROXY_MINOR in the plugin to the value that indicates what features it is using.\\\n\\\np) Changed to use ITimer logic as a 16ms lowres timer to improve performance\\\n\\\nq) Changed to use single thread, no thread manager.\\\n\\\nr) Changed to use lowres timer in checking for polling time to improve performance\\\n\\\ns) It should have faster startup times.\\\n\\\nt) It will hide the empty window at startup, then show the squeak window when required.\\\n\\\nu) It has a different menu structure.\\\n\\\nv) It does less I/O when navigating directories.\\\n\\\nThe macintosh 3.1Alpha1MT VM, Sept 24th 2001 \\\nThis VM was built with the base  3.1 image at change set #4347\\\nV3.1.1 at change set #4347\\\n\\\n\\\nWe go to V3.1.1 to indicate that the 3.1 VM is being used. In the past the 3.1 Image was used but some changes in the openGL logic makes  3.1 Vm and 3.0 image not quite work correctly with 3d graphics. Although a 3.1 VM will run many images way back to the 2x series no careful study has been done on the ability to do this. So at this point we are indicating this VM is a 3.1 VM and best used with a 3.1 image.\\\n\\\nUse of VMMaker to build VM. As of this version everything can be built as an external except for the window logic which hasn't been decoupled from the VM support for the macintosh. \\\n\\\n1) AsynchFilePlugin the security check for ability to create file is now a plugin call.\\\n2) B2DPlugin logic changes to fillLinearGradientfromtoat\\\n3) b3dRemapFaces, b3dRemapEdges, b3dRemapEdgeList, b3dRemapAET, b3dRemapEdgeVertices, b3dRemapFaceVertices, b3dRemapFaceFree, b3dRemapEdgeFree, b3dRemapAttributes. Some casting and changing of += to = + to make some compilers happy.\\\n4) BitBltPlugin added tableLookupat call.\\\n5) DropPlugin added setFileAccessCallback to allow the Security Module plugin the ability to give us the entry point to turn security off so we can open files as read only when security is turned on.  This was broken in the past. \\\n 6) FilePlugin added fileOpennamesizewrite,getThisSession to allow for callbacks. Changed the file security logic to use the plugin interface. \\\n7) interp.c, fixes for 4347ByteArrayRangeCheck-di, ability to printAllStacks, security calls for image rename, write to use plugin interface.\\\n8) Added GetAttributeString, and recordDragDropEvent and entry points for callbacks.\\\n9) SecurityPlugin changed when initialization is called to initialize the safe and unsafe directorys, also added entry points for all the testing calls so it can be a true plugin.\\\n10) Serialplugin. The serial plugin was redesigned to seperate out MIDI logic. People with MIDI devices and old serial macintosh should check to see if they still work since we lack equipment now to test this obsolete technology set.\\\n11) SocketPlugin. Make security calls true plugin calls.\\\n12 SoundGenerationPlugin. Removed \\\nEXPORT(int) SoundGenerationPlugin_primitiveFMSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveOldSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitivePluckedSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveWaveTableSoundMix(void);\\\nThey were a hack at the plugin level and discussion on the list seemed to show they were no longer used. \\\n13) Checking for if defined (__APPLE__) && defined(__MACH__) for the Mac OS-X native development environment\\\n14) Changed sqMacAsyncFilePrims, usage of interpreterProxy->, plugin calls for getThisSession. \\\n15) Changed sqMacDirectory.c. Removed some utility code and make it a seperate file so that it can be shared between sqMacWindow and other plugins that require them. \\\n16) Changed sqMacDragDrop.c. Added plugin callback for getSTWindow, the sqSetFileAccessCallback logic, fileOpennamesizewrite, and secHasFileAccess. Added logic to do the recordDragDropEvent callback to sqMacWindow.c \\\n17) sqMacNetwork.c. Some cleanup for the OS-X version of the OpenTransport headers, some constants have name changes\\\n18) sqMacNSPlugin.c Use of ioLoadFunctionFrom(NULL, \"DropPlugin\"); versus explicit call.\\\n19) sqMacOpenGL.c. Some cleanup for the OS-X version of the OpenGL headers\\\n20) sqMacOpenGLInfo.c. Some cleanup for the OS-X version of the OpenGL headers\\\n21) sqMacSecurity.c ioInitSecurity calls back to dragAndDrop plugin to set entry point to turn security off.  Added code to create directories if required and ensured callbacks are plugitized.\\\n22) sqMacSound.c Some cleanup for the OS-X version of the Sound headers. Use of interpreterProxy-> in the proper places.\\\n23) sqMacWindow.c Some cleanup for the OS-X version of the compiler.  Fixed saveAsEmbeddedImage, this got broken when we moved from a FAT to a ppc only application.  Altered interface to recordDragDropEvent so that it was plugable. Some file path name logic goes to a seperate C source file. The drag and drop plugin is loaded and intialized after the image is loaded but before the interpreter is started, before it was done a bit earlier in the startup process. This also has the effect of initializing the security module.\\\n24)sqOpenGLRenderer.c. Some cleanup for the OS-X version of the OpenGL headers\\\n25)SurfacePlugin.c gets a hack so it knows when it is internal versus external.\\\n\\\n\\\n\\\nv3.0.18 at change set #4081\\\n(Note browser plugin goes to 3.0.23\\\n\\\n1) sqMacOpenGL.c Quite a few changes were made to the code to support it as an internal plugin for the browser. This is because the drawable frame for a browser plugin is a subset of the browser's grafport, so lots more care must be taken to draw in the correct location using OpenGL. We also fixed issues with re-configurating the Open/GL draw area when the window gets resized or goes to full screen, and attempted to ensure multiple screens will work.\\\n\\\n2) sqMacWindow.c, minor fix to cast a constant char * to char * for CW 6.1\\\n\\\n\\\nBrowser plugin 3.0.23 fixes\\\n\\\n1) Integerated the H/W Acceleration as an builtin plugin\\\n2) Added logic for pre and post event interaction to browser plugin event handler for H/W Acceleration logic. The external H/W Acceleration plugin mostly works with the browser plugin but doesn't work with full screen mode, or if the plugin is embedded in a window or a scrollable frame, so don't use it. Use the browser plugin 3.0.23 or higher which has the H/W Acceleration builtin.\\\n\\\nv3.0.17 at change set #4081\\\n(Note browser plugin goes to 3.0.21)\\\n\\\n1) Added HW acceleration as internal plugin.\\\n2) 4079BBAlphaTextFix-ar Fixes the problem with alpha text, changes BitBltPlugin.c \\\n3) Added primitive on the mac to truncate a file.\\\n4) Added logic to flush volume on a flush file to ensure file and control blocks are flushed.\\\n5) For the Carbon VM we increase nextevent wait time if we get sufficent idle time. This should reduce CPU usage under OS-X\\\n6) GetAttribute: 1002 now returns the gestaltSystemVersion as a hex string, and getAttribute: 1003 now returns either '68K' or 'PowerPC'.\\\n7) Starting with 3.0.17 the VM is build only as a powerpc application. The latest VM as a 68K application will be made available from time to time permits based on people's needs. \\\n8) Changes to sqOpenGLRenderer.c to improve performance, OpenGL 1.1 support.\\\n\\\nPlugin 3.0.21 fixes\\\n\\\n1) added check for mailto: tag on posts to fix problem with Netscape crashing, and IE hanging.\\\n2) Plus above fixes.\\\n\\\nWhat has been fixed/changed.\\\nv3.0.16 at change set #4041\\\n(Note browser plugin goes to 3.0.20)\\\n\\\n1) Lots of fixes for BitBlt and HW acceleration.\\\n2) Hardware Acceleration plugin goes to 1.0.1. Please note there is a seperate plugin with the same name for Carbon. Doing a get info will identify if the plugin is only usable with Carbon Squeak.\\\n\\\nv3.0.15 at change set #4026 (May 17th test version)\\\n(Note browser plugin goes to 3.0.19)\\\n\\\n1) Added support for OpenGL HW acceleration plugin\\\n\\\nPlugin 3.0.19 fixes\\\n\\\na) Obey embedded tag plug\\\nb) Fix problem with plugin 3.0.17 not working with netscape 4.x\\\nc) Carbonize plugin for IE 5.1 \\\nd) Remove debugging printf than occurred on transition to full screen mode\\\n\\\nWhat has been fixed/changed.\\\nv3.0.14 at change set #3987\\\n\\\n(Note plugin goes to 3.0.17)\\\n\\\n1) sqMacDirectory.c. The pathlookup would handle the case of foo:bar::do incorrectly by ignoring the :: path redirection. This has been fixed. However a path lookup will not work if it contains :: and an aliased directory in the middle of the path.\\\n\\\n2) sqMacSecurity.c. The pathname for the untrustedUserDirectory was built incorrectly, and the bug mentioned above in sqMacDirectory.c usually kept this from being noticed.\\\n\\\n3) sqMacWindow.c  we added some logic to do the delay for primitiveRelinquishProcessor, but found it had an large effect on a freecell benchmark. I suspect on a Morpic step wait there is nothing to do so primitiveRelinquishProcessor gets called which then affects response time. So for now we revert to the 3.0.11 behavior, good performance and 100% CPU usage!\\\n\\\n4) GetAttribute 1004 returns returns interpreterVersion; which is for example\\\n\"Squeak3.1alpha of 6 February 2001 [latest update: #3987]\"\\\n\\\n5) When in full screen mode we now attempt to disable resizing, zooming, or moving the window. The window borders are hidden, but in the past it was feasible to grab an edge and alter it, thus confusing the VM.\\\n\\\n6) Worked on Carbonizing the browser plugin\\\n\\\n7) 3977 & 3978 FloatArray fixes. Makes float arrays go through a new (and working) version of #primitiveHash\\\n\\\n8) Fixed problem with accidental mouse clicks being triggered from pulldown menus on application switching.\\\n\\\n9)\\\n\"Change Set:\t\t3984 BitBltExtensions-ar\\\nDate:\t\t\t4 May 2001\\\nAuthor:\t\t\tAndreas Raab\\\n\\\nThe change set includes various extensions for BitBlt with the goal of migrating the useful features from FXBlt into the general BitBlt mechanisms. These include:\\\n\\\n* Handling of LSB and MSB forms:\\\nBitBlt now handles both, MSB and LSB forms (and their conversions). Only instances of Bitmap are assumed to contain big-endian pixels. All others are assumed to be little endian (reason is that we can only identify Bitmap here). Note that 'LSB' and 'MSB' refers to PIXELS, that is a 1bpp LSB form has its left most pixel in the lowest bit whereas a 1bpp MSB form has its left-most pixel in the highest bit.\\\n\\\nFor pixel depths < 8 this can be different from what your OS supplies (as an example, Windows bitmaps < 8 are big-endian pixels in little-endian words; we might call them 'middle-endian'). We simply don't deal with those - forms are either big or little endian but nothing inbetween.\\\n\\\nBitBlt has got an extra combination rule for swapping pixels in the destination form. This can be used to make byte swapping much more efficient (as soon as we've got more VMs with support for it).\\\n\\\n* Handling of 'native bitmaps' (aka surfaces):\\\nBitBlt is now able to deal with OS surfaces that are registered with the surface plugin.\\\n\\\n* Handling of full color maps:\\\nBitBlt has been extended to deal with instances of ColorMap in addition to the prior mechanism of using only indexed lookups and provide an implicit 16-32 bit color conversion. ColorMaps can specify both, a lookup table and an additional set of masks and shifts to apply during the color mapping operation. \\\n\\\nFour independent shifts and masks can be given which can be used for a lot more than just color conversion (as an example, one could do byte swapping with this; but see also BitBlt class>>exampleColorMap). \\\n\\\n* Better handling of default arguments:\\\nFor most of the required arguments for BitBlt very reasonable default assumptions can be made. This includes the destOrigin (0@0), clipRect (0@0 extent: destForm extent), sourceOrigin (0@0). BitBlt now substitutes these if they are absent (e.g., nil) in the instance provided.\\\n\\\n\"\\\n\\\n\\\nv3.0.13 at change set #3848\\\n\\\n1) sqMacSecurity was changed to set the unsecure directory to\\\n\tsystem folder:Preferences:Squeak:Internet:My Squeak\\\n\\\nv3.0.12 at change set #3848\\\n1) Fixed problem with creating My Squeak Folder in Documents Folder with System 8.6\\\n\\\nWhat has been fixed/changed.\\\nv3.0.11 at change set #3848\\\n\\\n1) sqMacDirectory had a bug when you resolved a path name. The fast resolve always failed, which invoked the slow resolver. Now the fast resolver works.\\\n\\\n2) sqMacSecurity was changed to set the unsecure directory to Documents:My Squeak. \\\n\\\n3) sqMacWindow was changed to fix some issues with Squeak capturing events from other applications and to reduce the number of duplicate mouse events that are generated. Also we capture modifier information  directly from the mouse and keyboard on null events to fix some problems with Carbon. We  hopefully fixed problems with mouse clicks from foreground applications being seen by Squeak and issues with the OS-X Dock clicks.\\\n\\\n4) sqMacNSPlugin was changed to use the above mouse/keyboard capture code which is much cleaner than the original fix for the bogus modifier information given to us by netscape on a null event. \\\n\\\n5) When you turn full screen off we now correctly reposition the window to the original location versus a few pixels to the left. \\\n\\\nWhat has been fixed/changed.\\\nv3.0.10 at change set #3848\\\n\\\n1) changed VM exception unwind logic\\\n\t3796-Exception-unwind-V3,tim@sumeru.stanford.edu, Paul McDonough, Stephen Pair and others\\\n\\\n2) Fixes for the JPEGReader plugin and for Jitter 3\\\n\\\n3) Added minimal Mac VM logic to assist in building a small VM.\\\n\\\n4) Changed how the browser plugin starts up. Now it starts the interpreter running only after getting the browser setwindow command. This seems to fix a race condition that resulted in a crash at startup time with Netscape 4.x\\\n\\\n5) Fixed broken full screen redraw on cmd-tab\\\n\\\n6) Fixed what looked like mouse-down, mouse-down, mouse-up sequence. Now reports mouse-down, mouse up.\\\n\\\n7) Added StarSqueak plugin as internal plugin\\\n\\\n8) Note the current Squeak Plugin should be gotten from the www.squeakland.org site.\\\n\\\nv3.0.9 at change set #3776, Boston Snow storm build.\\\n\\\n1) A number of changes were made to the interpreter:\\\n\ta) added primitive to change a class.\\\n\tb) added primitives to get or put 32bit integers\\\n\tc) Fix problem with GC and class reshaping\\\n\td) Better logic for method cache flushing\\\n\\\n2) Added JPEGReader plugin\\\n\\\n\\\nV3.0.8 at change set #3740\\\n\\\n1) The caps lock no longer maps to the shift attribute. So if the caps lock is down mouse clicks will behave normally. \\\n\\\n2) Numerous fixes for the BitBltPlugin plugin\\\n\\\n3) Memory allocation grow/shrink logic for Carbon was added.\\\n\\\n4) Spurious mouse clicks for the browser plugin has been fixed. (This took awhile to fix, I'm sure it's a bug with the Swedish version of Netscape)\\\n\\\n5) The browser plugin will attempt first to allocate memory from the browser heap, then the system heap. Most people when faced with a memory issue usually increase memory for the browser first. However memory for the plugin is controlled by an attribute in the EMBED HTML statement. \\\n\\\nV3.0.7\\\n\\\n1) A bug exists in pre OS 8.x that causes a crash in activate window if the standard get file \\\ndialog comes up before the Squeak Window. I remove the InvalWindow call found in that routine since it is actually redundant.\\\n\\\n2) The standard get file dialog on system 7.x would not terminate if you did a cancel.\\\n\\\n3) The InterfaceLib had to be weak linked to prevent CFM startup issues. \\\n\\\nV3.0.6\\\n\\\n1) Alias resolving is less aggressive.\\\n\\\n2) We no longer cache image reads or writes. This was done because OS 9.1 allows you to have very large disk caches, and it's pointless to cache the image read or write.\\\n\\\n3) The file flush primitive now actually flushes the file via an OS call. This was a bug in the CodeWarrior 5.3 source code.\\\n\\\n4) The 68K version was being built with the 68881 math library. This fails on 68040LC chips. We now use the non-68881 math library. Thanks to Bruce ONeel for find this.\\\n\\\n5) A bug was found in the path resolving logic that was added for 3.x. This bug apparently only affects 68K machines,  never was identified as a PowerPC issue. \\\n\\\n6) The Netscape plugin needs a properly allocated clip region, this code seemed to work ok on new systems, but fails on system 7.6.1\\\n\\\n7) The security interface will create a Documents folder on the root volume if the default Document folder has been deleted. This is needed for security purposes. \\\n\\\n8) Jitter needs 1MB of free memory to run.\\\n\\\n9) 68K machines require another 32K of stack\\\n\\\n10) Threads  now work on 68K machines, but turned off because of possible performance issues. (I think more study is needed).\\\n\\\n11) The 68K version was compiled with better optimization, expect a 15% improvement.\\\n\\\n12) fix for BitBltPlugin ascii = byteAt((sourcePtr + charIndex) - 1);\\\n\\\n13) The interpreter object validation checking code was alter to work correctly.\\\n\\\nV3.0.5\\\n\\\n1) sqConfig.h changed due to BE OS header changes\\\n\\\n2) sqMacDirectory.c. Added support for Navigation services or Standard File Get to find the image at startup time when the Squeak.image is not found by the VM. This replaces the DOS like console message that comes up saying that Squeak can't find a image.\\\n\\\n3) A fix to drag and drop for the browser plugin.\\\n\\\n4) We now use Apple's cooperative multithreading package to run the UI in one thread, the VM in the other. This solves some issues with the browser and makes the UI versus VM logic and execution responsibilities easier to understand. \\\n\\\n5) Changed the sqMacNSPlugin.c code to support a 3.0VM using multithreading support. This should give Squeak in a browser better performance. Also changed the full screen support to correctly work with multiple monitors.\\\n\\\n6) BitBltPlugin.c gets one more op code\\\n\\\n7) Added the security interface\\\n\\\n8) Added the file flush primitive\\\n\\\n9) Rewrote the macintosh readme file\\\n\\\n10) Revisited the zoomWindow code and found a bug with multiple monitor support, then I fixed the code to make Full Screen mode work on screen that Squeak window is mostly on, versus the menubar screen. Also if you switch from full screen back it resizes the window back to the orginal size and location before you invoked the full screen. \\\n\\\nV3.0.2\\\nPlugins\\\n\\\nRecompiled the internal BitBltPlugin plugin to encorporate:\\\nChange Set:\t\t258AlphaBlendOpt-dsm\\\nAuthor:\t\t\tDuane Maxwell, Paul Phillips/exobox\\\na) Short circuits full opaque and full transparent pixels when alpha blending.\\\n\\\nRecompiled the internal LargeIntegerPlugin\\\n3298LargeIntegersV1-2-sr -- Stephan Rudlof -- 29 November 2000\\\n3299LargeIntV1-2For29-sr -- Stephan Rudlof -- 29 November 2000\\\n\\\nVM Software\\\n\\\n(b) PowerManagement for macintosh is now supported. You can disable the power manager to give you better performance on some powerbooks at the expense of battery life. See the Preferences Panel for details, category 'Performance'\\\n- changed sq.h\\\n- changed sqMacWindow.c to add support for power mgr disabling\\\n\\\n(c) Drag and Drop support for the macintosh, dragging files from the Finder to the Squeak window is now supported.\\\n- sqMacDragDrop.c added\\\n- sqMacWindow.c changed\\\n\\\n(d) Added primitive for get macintosh creator and file type.\\\n- sqMacDirectory.c changed\\\n\\\n(e) Carbon support. Thanks to Karl Goiser karl@wattle.net for work he did on sound and other Carbonization hotspots.\\\n- sqMacAsyncFilePrims.c changed\\\n- sqMacFFIPPC.c changed (not supported for Carbon)\\\n- sqMacNetwork.c changed per Apple tech note 1173 Carbon asset tracking\\\n-sqMacSerialAndMIDIPort.c chnaged (Not supported for Carbon)\\\n- sqMacSound.c changed per Apple tech note 1198 Carbon double sound buffer playing\\\n- sqMacWindow.c changed (various changes for Carbon)\\\n\\\n(f)  Poll at least 60 times a second for the mouse if required. Previous 2.9.x VM did it 30 times but this is too slow and 2.8.x VM do it 60 times a second.\\\n\\\n(g) Reworked path support Thanks to Karl Goiser karl@wattle.net for starting this.\\\n- sqmacDirectory.c changed reworked lookupPath\\\n- sqMacWindow.c changed, added GetApplicationDirectory to get application directory\\\n\\\n(h) I rewrote the sqMacDirectory.c logic to enable proper understanding of Apple's Alias logic. This means for example you can alias the \"SqueakV3.sources\" file and then only have one copy and have all your images point to it. \\\n\\\n(i) Added Zoom Window support.\\\n\\\n(j) Change the Squeak change file icon to better match Apple's visual guidelines, Thanks to Doug Way for the suggestion and the new icons.\\\n\\\n(k) The sound plugins have changed...\\\n\\\n(j) Dropped FFI out of the base Squeak because of security concerns\\\n\\\n(k) Compiled for 750(G3) processor versus 603\\\n\\\n(l) Added screenDepth primitive\\\n\\\nThe 3.0.x VM contains most of the optional plugins, you might want to check this by inspecting \"Smalltalk listBuiltinModules\" to see where your plugins are coming from. In some case people have been accidentally overriding the new builtin plugins with older plugins. \\\n\\\nThe file \"Squeak 3.0Alpha10MT.sig\" contains the PGP signature for the Squeak 3.0Alpha10MT VM\\\n\\\nJohn M McIntosh  johnmci@smalltalkconsulting.com\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n}"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Documentation/3.8.x Release Notes.rtf",
    "content": "{\\rtf1\\mac\\ansicpg10000\\cocoartf824\\cocoasubrtf380\n{\\fonttbl\\f0\\fnil\\fcharset77 Geneva;\\f1\\fnil\\fcharset77 Monaco;\\f2\\fswiss\\fcharset77 Helvetica;\n\\f3\\fnil\\fcharset77 LucidaGrande;}\n{\\colortbl;\\red255\\green255\\blue255;\\red137\\green19\\blue21;\\red35\\green110\\blue37;\\red26\\green26\\blue255;\n}\n\\margl1440\\margr1440\\vieww13660\\viewh14740\\viewkind0\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0\\fs24 \\cf0 Mac VM 3.8.12 mach-o build for Carbon, Sophie, and Croquet\\\n\\\nSupport for Croquet, support for Safari, support for TK4/Sophie, support for Multiple Windows/Ffenestri, full GC instrumentation, configurable quartz flush drawing, and finally MacIntel Machines.\\\nApril 24th, 2006 (3.8.12b4)\\\nJune 5th, 2006 (3.8.12b5)\\\n\\\nStill yet to do, in future versions -> Verify that file delete rename etc works on aliases, not the targets. (Yawn, someday)\\\n\\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\n\\\n3.8.12b5\\\n\t\tsqMacUnixExternalPrims.c\\\n\t\t\tEnsure frameworks get loaded out of application resources, then system area. Before\\\n\t\t\twe only looked in system area which was wrong if you want to override framework.\\\n\t\t\tI'll note we can't load from plugin folder for system frameworks, does not see to work, \\\n\t\t\tif first path not found it resolve to system area.\\\n\\\n3.8.12b4\\\n\tsqMacMain.c\\\n\t\trev version number.\\\n\tsqMacTime.c\\\n\t\tUse select(), no nano-sleep call, nano-sleep makes vm use 35% cpu, versus say %12 for test image\\\n\\\n3.8.12b3\\\n\tsqMacMain.c\\\n\t\trev version number, set hardware bits for math units. \\\n\tsqMacTime.c\\\n\t\tcall aioSleep() versus aioPoll()\\\n\tsqMacUIEventsUniversal.c\\\n\t\tmake aioPoll() calls in the right places.\\\n\\\n\tUpdate xcode project build, also change headers to include REPlugin as internal plugin\\\n\t\\\n3.8.12b2\\\n\tAdd plugins for Croquet, and FloatMath.\\\n\tsqMacMain.c\\\n\t\tAdd system attribute 1006 which returns unique version/key information so we can id VMs better\\\n\tsqSocketUnix.c\\\n\t\tAdd prims to set reuse socket options. \\\n\\\n3.8.12b1\\\n\\\n3.8.12b1\tMajor change to VM. When the VM was converted to carbon events I decided to place the interpreter() thread on a pthread. However over the years it became apparent this was an issue because many UI calls needed to run on the main UI thread, versus a sub pthread. To solve this I added the getUIToLock() call which locked the UI, actually it would setup a custom UI event and block until the UI thread did the callback. This worked well until the Sophie team started to experiment with Quicktime via FFI and we discovered that quicktime FFI calls needed to be on the main UI thread to avoid a crash. Thus in early 2006 we altered the FFI plugin so that it would call getUIToLock when it makes the FFI function call. This worked well until the Croquet folks complained that this caused Croquet to crash in glEnable. Further investigation showed that mixing Open/GL calls between pthreads caused a serious issue. Therefore I altered the VM to run under the main UI thread and poll for events. Polling is done before each callback looking for UI events and in the flush screen logic which is invoked about every 1/60 of a second to ensure pending screen updates are sent to the screen.  \\\n\\\n\tNeedless to say people should confirm their applications work as expected, the UI performance isn't greatly affected and overall performance is roughly the same.\\\n\\\n\t\tsqMacMain.c\\\n\t\t\tremove pthread logic to startup interpreter()\\\n\t\tsqMacUIEventsUniversal.c\\\n\t\t\tadd logic to setup a custom event handler to run the interpreter() loop, and to poll  and dispatch events.\\\n\t\t\\\n\t\\\n3.8.11b7\t Limited distribution\\\n\t\tsqMacUIEventsUniversal.c\\\n\t\t\tAlter mouse logic to fall back to old logic if built with 10.2.8 sdk.\\\n\t\tsqMacUnixExternalPrims.c\\\n\t\t\tWhen compiling for osx 10.2.8 sdk we must use the unix version of dlopen/etc versus one in 10.3.9 sdk.\\\n\\\n3.8.11b6\\\n\t\tsqMacDragDrop.c\t\\\n\t\t\tCode volatile for gDragDropThrottleSpinLock and gNumDropFiles to ensure spin lock is not optimized \\\n\t\t\tinto problem code\\\n\t\tsqMacUnixFileInterface.c\\\n\t\t\tdrop ioFilenamefromStringofLengthresolveAliases, it's in the interp.c, fiddle a bit with other names\\\n\t\tsqMacUIAppleEvents.c\\\n\t\t\tFix bug where we ignore open doc event if it only has one non-image document at open time. \\\n\t\tsqPlatformSpecific.h\\\n\t\t\tAdd <types.h> include for Croquet plugins\\\n\\\n3.8.11b5\\\n\t\tsqMacOpenGL.c\t\\\n\t\t\tprint diagnostics\\\n\t\t\\\n\t\tsqMacFFIPPC.c\\\n\t\t\tMigrate back to carbon FFI prims and Andreas' FFI interface because unix one is broken for Croquet.\\\n\t\t\tprint diagnostics, use UI Locking code to call FFI functions to avoid crash with quicktime. \\\n\t\t\\\n\t\tsqMacNSPlugin.c\\\n\t\tsqMacNSPLuginUILogic.c\\\n\t\tsqMacWindowUniversal.c\\\n\t\t\tLots of changes to reconsider when SetWindow() is called, and migrate to Context draw logic\\\n\t\t\tAdd logic so that we can do OpenGL.\\\n\t\t\tStill broken\\\n\t\\\n3.8.11b4\\\n\t\tcompiler should asks for inlined sqSqueakMemory accessors if intel, these generate better assembler than\\\n\t\tnon-inline which is better for powerpc. \\\n\t\t\\\n\t\tsqMacMain.c\\\n\t\t\tBrowser plugin code must return VM Path name, can't use argv[0].\\\n\t\t\\\n\t\tsqMacMemory.c (see 3.8.11b3, perhaps not checked in correctly)\\\n\\\n\t\tsqMacNSPlugin.c\\\n\t\t\tStart poking at  code to make work under browser again\\\n\\\n\t\tsqMacUIEventsUniversal.c\\\n\t\t\told getmousepoints should not covert coord to global, on cmd-key remember old coordianates\\\n\t\t\tversus doing getmousepoints since the port is not set. Likely we've stored the last mouse move!\\\n\t\\\n\t\tmpeg3plugin\\\n\t\t\taudio.c\\\n\t\t\toutput.c\\\n\t\t\t\tChange to set Alpha to OxFF versus 0x00 in order to play better with Tweak in 32bit mode\\\n\t\t\t\tmisc poking at MMX (not working) for MacIntel\\\n\t\t \\\n3.8.11b3 \\\n\t\tsqGnu.h\\\n\t\t\treadjust yet again the __asm__ versus asm and use register starting at 13 versus 24 for interp.c\\\n\t\tconfig.h\\\n\t\t\tremove socket type, collides with sdk 10.3.9\\\n\t\tsqMacMain.h\\\n\t\t\tensure getSystemAttribute: 0 returns full path to executable\\\n\t\tsqMacMemory.c\\\n\t\t\tEnsure memory returned from mmap is on 4k page boundary\\\n\\\n3.8.11b2\t\\\n\t\tsqMacUnixFileInterface.c\\\n\t\t\tbyte swap finderinfo in get and set mac file type and creator methods\\\n\t\tsqMacService.c\\\n\t\t\tremove callbacks to get event loop and window, these are not used\\\n\t\t\tbyte swap OSType\\\n\t\tsqUnixSoundMacOSXJMM.c\\\n\t\t\tuse kAudioFormatFlagsNativeEndian, versus big in sound stream\\\n\t\tsqMacSpellingPlugin.c\\\n\t\t\tutf-16 from squeak is big endian. \\\n\t\tsqMacFFIPPC.\\\n\t\tconfig.h\\\n\t\t\tdrop socklen_t \\\n\t\tsqMacMain.c\\\n\t\t\tgSqueakWindowAttributes needs to be byte swapped\\\n\t\tsqMacUnixExternalPrims.c\\\n\t\t\tChange lookup, lookup bundle, or unix plugin in resources folder first, then in plugins directory\\\n\t\t\tif gSqueakPluginsBuiltInOrLocalOnly is set\\\n\t\tsqMacWindowUniversal.c\\\n\t\t\tmake 16 bit go to quicktime because of 16bit intel draw error\\\n\t\\\n>>>>>>> .r1362\\\n\t\tCompile adjustments, arch=pentium-m and align-functions=16. The alignment gives 5% speedup in \\\n\t\ttinybenchmark sents, seems core solo is picky about where instruction alignment is. Found by adding \\\n\t\tnew static buffer area to binary and having performance fall off by 5%\\\n\\\n3.8.11b2\t\\\n\t\tsqMacUnixFileInterface.c\\\n\t\t\tbyte swap finderinfo in get and set mac file type and creator methods\\\n\t\tsqMacService.c\\\n\t\t\tremove callbacks to get event loop and window, these are not used\\\n\t\t\tbyte swap OSType\\\n\t\tsqUnixSoundMacOSXJMM.c\\\n\t\t\tuse kAudioFormatFlagsNativeEndian, versus big in sound stream\\\n\t\tsqMacSpellingPlugin.c\\\n\t\t\tutf-16 from squeak is big endian. \\\n\t\tsqMacFFIPPC.\\\n\t\tconfig.h\\\n\t\t\tdrop socklen_t \\\n\t\tsqMacMain.c\\\n\t\t\tgSqueakWindowAttributes needs to be byte swapped\\\n\t\tsqMacUnixExternalPrims.c\\\n\t\t\tChange lookup, lookup bundle, or unix plugin in resources folder first, then in plugins directory\\\n\t\t\tif gSqueakPluginsBuiltInOrLocalOnly is set\\\n\t\t\tif debug vm, then print loader errors\\\n\t\tsqMacWindowUniversal.c\\\n\t\t\tmake 16 bit go to quicktime because of 16bit intel draw error\\\n\t\\\n\\\n3.8.11b1 \tRefactor, remove old OS-9 code, always carbon, etc. \\\n\t\tremove TARGET_API_MAC_CARBON\\\n\t\tremove IHAVENOHEAD\\\n\t\tmake variables static, procedures static where applicable.\\\n\t\tmake MACINTOSHUSEUNIXFILENAMES always case, drop any HFS logic\\\n\t\tEradicate most usages of FSSpec, except for drop file logic (sigh) and one in InternetConfig\\\n\t\tRemove getFileNameByFSSpec logic\\\n\t\tAlter getFileNameByFSRef to drop items needed by getFileNameByFSSpec.\\\n\t\tReworked much of drag and drop logic\\\n\\\n\t\tsqMacOpenGL..c\\\n\t\tsqMacOpenGLInfo.c\\\n\t\tsqMacDragDrop.c\\\n\t\t\tdon't bother with Gestalt, we now drag and drop exists on machines of os-x era.\\\n\t\t\tconvert to use FSRef\\\n\t\t\tUse GetDragAttributes versus bounds in window.\\\n\t\t\tDrop WaitNextEvent, dummy up event\\\n\\\n\\pard\\tx480\\tx960\\tx1440\\tx1920\\tx2400\\tx2880\\tx3360\\tx3840\\tx4320\\tx4800\\tx5280\\tx5760\\tx6240\\tx6720\\tx7200\\tx7680\\tx8160\\tx8640\\tx9120\\tx9600\\tx10080\\tx10560\\tx11040\\tx11520\\tx12000\\tx12480\\tx12960\\tx13440\\tx13920\\tx14400\\tx14880\\tx15360\\tx15840\\tx16320\\tx16800\\tx17280\\tx17760\\tx18240\\tx18720\\tx19200\\tx19680\\tx20160\\tx20640\\tx21120\\tx21600\\tx22080\\tx22560\\tx23040\\tx23520\\tx24000\\tx24480\\tx24960\\tx25440\\tx25920\\tx26400\\tx26880\\tx27360\\tx27840\\tx28320\\tx28800\\tx29280\\tx29760\\tx30240\\tx30720\\tx31200\\tx31680\\tx32160\\tx32640\\tx33120\\tx33600\\tx34080\\tx34560\\tx35040\\tx35520\\tx36000\\tx36480\\tx36960\\tx37440\\tx37920\\tx38400\\tx38880\\tx39360\\tx39840\\tx40320\\tx40800\\tx41280\\tx41760\\tx42240\\tx42720\\tx43200\\tx43680\\tx44160\\tx44640\\tx45120\\tx45600\\tx46080\\tx46560\\tx47040\\tx47520\\tx48000\\ql\\qnatural\\pardirnatural\n\\cf0 \t\t  sqMacUnixFileInterface.c\\\n\t\t\tfindImageFilterProc use get pathname and last path component to decide if file is image\\\n\\\n\t\t  sqMacUnixFileInterface.h\\\n\t\t  sqMacHostWindow.c\\\n\t\t\tuse QDLocalToGlobalRect in ioPositionOfWindow versus casting rect to point\\\n\t\t  sqMacHostWindow.h\\\n\t\t  sqMacInternetConfiguration.c\\\n\t\t\tmake FSRef when dealing with ICFileSpec\\\n\t\t\tremove some copy pascal to c calls. \\\n\t\t  sqMacJoystickAndTablet.c\\\n\t\t  sqMacMIDI.c\\\n\t\t  sqMacSecurity.c\\\n\t\t  sqMacSerialPost.c\\\n\t\t  sqMacUUID.c\\\n\t\t  sqMacEncoding.c\\\n\t\t\tDrop SetImageName()\\\n\t\t  sqMacEncoding.h\\\n\t\t  sqMacFileLogic.h\\\n\t\t  sqMacImageIO.c \\\n\t\t\tdrop calculateStartLocationForImage() logic\\\n\t\t  sqMacImageIO.h\\\n\t\t  sqMacMain.c\\\n\t\t\tdrop powerManager logic, not needed, cleanup of statics, cleanup for browser logic\\\n\t\t\tcast data right for sprintf(data,\"%X\",myattr);\\\n\t\t  sqMacMain.h\\\n\t\t  sqMacMemory.c\\\n\t\t\tremoval of the os-9 swapfile logic\\\n\t\t      watch signed versus unsigned compares\\\n\t\t  sqMacTime.c\\\n\t\t  sqMacTime.h\\\n\t\t  sqMacUIAppleEvents.c\\\n\t\t\tuse gCurrentVMEncoding, versus system encoding for getting file names\\\n\t\t\tdrop logic for start of image offset os-9 feature\\\n\t\t\tremove PBHSetVolSync()\\\n\t\t\tdrop LocalToGlobal, use fake mouse location\\\n\t\t   sqMacUIAppleEvents.h\\\n\t\t   sqMacUIClipBoard.c\\\n\t\t   sqmacUIClipBoard.h\\\n\t\t   sqMacUIConstants.h\\\n\t\t   sqMacUIEvents.h\\\n\t\t   sqMacUIEventsUniversal.c\\\n\t\t\tremove tap power manager event loop callback\\\n\t\t\tIn MyWindowEventMouseHandler() put back in 10.2.8 versus 10.3.9 logic\\\n\t\t   sqMacUIMenuBar.h\\\n\t\t   sqMacUUIMenuBarUniversal.c\\\n\t\t   sqMacUnixCommandLineInterface.c\\\n\t\t   sqMacUnixExternalPrims.c\\\n\t\t   sqMacWindow.h\\\n\t\t   sqMacWindowUniversal.c\\\n\t\t\tIn ioSetFullScreenActual, use QDLocalToGlobalRect, versus casting to points\\\n\t\t\tIn copy124BitsTheHardWay little versus bit endian for making gworld\\\n\\\n\t\t   sqMacNSPluginUILogic.c\\\n\t\t\tuse QDSwapPort versus get/set port for performance reasons\\\n\t\t\tIn ioShowDisplayOnWindow avoid double get of windowPort\\\n\t\t\tIn recordMouseEvent use QDGlobalToLocalPoint\\\n\t\t    sqMacNSPlugin.c\\\n\t\t\tMake windowActive = 1, not sure why this didn't fail in the past...\\\n\t\t\tAlter GetTempFSSpec to return both fsspec and FSRef\\\n\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\\cf0 3.8.10b16\\\n\t\tUpdate info.plists and xcode projects on SVN\\\n\t\t\\\n\t\tDrop #ifdefs for this below, we always compile on MACH now, versus CodeWarrior\\\n\t\tCertain end of CodeWarrior OS-9 Support. \\\n\t\t\t#if defined (__APPLE__) && defined(__MACH__)\\\n\t\t\t#if defined I_AM_CARBON_EVENT\\\n\t\t\t#if defined MINIMALVM  (sorry Dan)\\\n\t\tsqMacOpenGL..c\\\n\t\tsqMacOpenGLInfo.c\\\n\t\tsqMacWindowPlugin.c  \\\n\t\tsqMacImageIO.c\\\n\t\tsqMacMain.c\\\n\t\tsqMacMemory.c\\\n\t\tsqMacTime.c\\\n\t\tsqMacUIAppleEvents.c\\\n\t\tsqMacWindowsUniversal.c\\\n\t\tsqPlatformSpecific.c\\\n\t\tsqMacNSPlugin.c\\\n\\\n\t\tosExport.c\\\n\t\t\tExport GetUIToLock api so we can callback from FFI on browser plugin UI thread.\\\n\t\tsqConfig.h\\\n\t\t\tRemove #ifdefs above and references to Codewarrior 8\\\n\t\tsqmacMain.c\\\n\t\t\tchange logic to support Sophie Browser plugin SOPHIEVI\t\t\tchange logic to get bundle by bundle id when a browser plugin so we can \\\n\t\t\tget bundle info.plist for startup logic and when we ask for VM version info\\\n\t\t\tremove the gThreadManager OS-9 cooperative thread logic\\\n\\\n\t\tsqMacUIAppleEvents.c\\\n\t\t\tbrowser plugin VM should not Launch Squeak VM on double click.\\\n\t \t\\\n\t\tsqMacUIEventsUniversal.c\\\n\t\t\tadd getUIToLock() logic for Browser plugin support \\\n\\\n\t\tsqMacUnixExternalPrims.c\\\n\t\t\tBrowser plugin loading bundles support (for squeakland and Sophie)\\\n\\\n\t\tsqMacWindowUniversal.c\\\n\t\t\tFiddle with CGImageCreate  32 host endiness issues\\\n\t\t\tFix cursors data/mask on intel\\\n\\\n\t\tinfo.plist for Squeak VM Universal\\\n\t\t\\\n\t\tsqmacNSPluginUILogic.c\\\n\t\t\tcomplete refactor of bits for Squeak browser plugin, put squeak VM stuff in seperate file\\\n\\\n\t\tsqMacNSPlugin.c\\\n\t\t\tcomplete refactor of bits for Squeak browser plugin, move squeak stuff to other file. \\\n\t\t\tMake work with unix file names\\\n\\\n\\\n3.8.10b14\\\n\t\tsqMacDragDrop.c\\\n\t\t\tAdd logic to  handle drag/drop from Safari or other application. \\\n\\\n3.8.10b13\t\\\n\t\tsqMacUnixExternalPrims.c\\\n\t\t\tnew file to replace sqMacExternalPrims.c\\\n\t\t\tclone of sqUnixExternalPrims.c, \\\n\t\t\t\ttries to find bundle, then various forms of file as foo, foo.so, foo.dylib, libfoo, libfoo.so (etc) \\\n\t\t\t\tlooks in more places, ./Plugins, ./, Resources/, \n\\f1\\fs20 \\cf2 \\CocoaLigature0 SQUEAK_PLUGIN_PATH, \\\n\t\t\t\tX11 library, /usr/local/lib/squeak/3.8a-2\n\\f0\\fs24 \\cf0 \\CocoaLigature1 \\\n\t\t\t\tvarious frameworks locations, foo.framework, CoreServices.framework, Applicationservices.framework, Carbon.framework\\\n\\\n\t\tsqMacOpenGL.c\\\n\t\t\treturn UTF8 file name for fopen for debugging \\\n\t\tsqMacOpenGLInfo.c\\\n\t\t\treturn UTF8 file name for fopen for debugging \\\n\t\tsqMacDragDrop.c\\\n\t\tsqMacInternetConfiguration.c\\\n\t\tsqMacSecurity.c\\\n\t\t\trename PathToFile to PathToFileViaFSSpec\\\n\t\tsqMacUnixFileInterface.c\\\n\t\tsqMacUnixFileInterface.h\\\n\t\t\trename PathToFile to PathToFileViaFSSpec\\\n\t\t\trename  getLastPathComponet to getLastPathComponetinCurrentEncoding\\\n\t\tsqMacEncoding.c\\\n\t\tsqMacEnconding.h\\\n\t\t\tconsolidate SetImageName()\\\n\t\tsqMacMain.c\\\n\t\t\trename  getLastPathComponet to getLastPathComponetinCurrentEncoding\\\n\t\tsqMacUIAppleEvents.c\\\n\t\t\trename  getLastPathComponet to getLastPathComponetinCurrentEncoding\\\n\t\tsqMacUnixCommandLineInterface.c\\\n\t\t\trework resolvewhatTheImageNameIs(), ensure encoding is correct\\\n\t\tsqMacWindowUniversal.c\\\n\t\t\tadd kCGBitmapByteOrder32Host/16 to GCImageCreate\\\n\\\n3.8.10b8 \\\n\t\tsqMacUnixFileInterface.c\\\n\t\t\tdelete cached directory name if we delete the directory, this invalidates the cache later if we look up\\\n\t\t\tthe name again. \\\n\t\tsqMacWindowUniversal.c\\\n\t\t\tFix issues with intel compile\\\n\t\tsqMacMIDI.c\\\n\t\t\tendian issues with structure (not sure if fixed)\\\n\t\tconfig.h\\\n\t\t\tendian issues\\\n\t\t\\\n3.8.10b7\\\n\t\tsqMacUnixFileInterface.c\\\n\t\t\tFinder information comes in as part of catalog information, ensure we get all 16 bytes\\\n\t\t\tversus just the file owner/type which is only 8 bytes. That fixes problem in 10b6 where \\\n\t\t\twe wrote garbage to the 8 bytes, dates, and permissions\\\n\t\tsqMacImageIO.c\\\n\t\t\tmissed a ':', delimits where the short image name is for the window title. Use DELIMITORInt\\\n\\\n3.8.10b6\\\n\t\tsqMacMenubarUniversal.c\\\n\t\t\tAdd hide/show menu logic back in\\\n\t\tsqMacWindowUniversal.c\\\n\t\t\tRevert back to full screen resize, move window logic.\\\n\t\t\tIn draw logic look at window is invisible flag now on windowBlock structure. \\\n\t\t\tCleanup termination logic in draw logic method when block is bad, or window is invisible. \\\n\t\tsqMacEventUniversal.c\\\n\t\t\tFix issues with window part codes on click to ensure clicks in window bar are handled correctly\\\n\t\tsqMacHostWindow.c/sqMacHostWindow.h\\\n\t\t\tAdd window is invisible flag\\\n\t\tsqMacEncoding.c\\\n\t\t\tAdd logic for \tLatin1 support, make that the default for path names, versus macroman. \\\n3.8.10b4\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\\pardirnatural\n\\cf0 \t\tWork for os-x universal, intel port. \\\n\t\tUse Unix Async logic, versus older sqMacAsync.c\\\n\\\n\\pard\\tx566\\tx1133\\tx1700\\tx2267\\tx2834\\tx3401\\tx3968\\tx4535\\tx5102\\tx5669\\tx6236\\tx6803\\ql\\qnatural\\pardirnatural\n\n\\f2 \\cf0 \t\tsqMacEventUniversal.c\\\n\t\t\tremoval of power managment\\\n\t\t\tremoval of USB logic which was originally for Jeff Raskin\\\n\t\t\tremoval of 1984 event loop\\\n\t\t\trecordDragDropEvent remove ifdef I_AM_CARBON_EVENT\\\n\t\t\tioGetNextEvent remove ifdef, I_AM_CARBON_EVENT\\\n\t\t\t*ioMousePoint, use QDGlobalToLocalPoint, versus get/set port\\\n\t\t\tMyAppEventHandler  - remove menu hide/show not needed\\\n\t\t\t*MyWindowEventHandler - use QDGlobalToLocalPoint, versus get/set port\\\n\t\t\t*MyWindowEventMouseHandler - use kEventParamWindowPartCode, versus getting kWindowGlobalPortRgn, to figure out where mouse was, such as outside window, or in grow box. \\\n\t\t\tPowerManagerDefeatTimer - remove power manager logic. \\\n\\\n\t\tsqMacWindowUniversal.c\\\n\t\t\tremove ifdef I_AM_CARBON_EVENT\\\n\t\t\tioSetFullScreenActual - use BeginFullScreen call with SetUpCarbonEventForWindowIndex\\\n\t\t\t? full screen open, implications? what if screen size changes? \\\n\t\t\tremove copybits, and memcpy ioShowDisplayOnWindow\\\n\t\t\tioShowDisplayOnWindow - FIX, I think window resize, width, height is or, not AND remove \\\n\t\t\tSetUpWindow - remove old NewCWindow\\\n\t\t\t* SetWindowTitle - use SetWindowTitleWithCFString\\\n\t\t\t*ioSetDisplayMode - remove lots of old logic and use CGDisplayBestModeForParameters\\\n\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\\pardirnatural\n\n\\f3 \\cf0 \t\tsqMacUIMenuBarUniversal.c\\\n\t\t\tremove hide/show menu bar logic\\\n\t\t\\\n\t\tsqMacOpenGL.c\\\n\t\t\tredefine DPRINTF\\\n\t\t\tglSwapBuffers - GetWindowPort  use proper cast\\\n\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\\pardirnatural\n\n\\f0 \\cf0 \t\tsqMacOpenGLInfo.c\\\n\t\t\tredefine DPRINTF\\\n\\\n\t\tsqMacDragDrop.c\\\n\t\t\tremove define for DOCUMENT_NAME_SIZE\\\n\\\n\t\tsqMacHostWindow.c\\\n\t\t\tcreateWindowWidthheightoriginXyattrlength - use QDBeginCGContext\\\n\\\n\t\tsqMacHostWindow.h\\\n\t\t\twindowDescriptorBlock add locked flag for surface usage. \\\n\\\n\t\tsqMacInternetConfiguration.c\\\n\t\t\tsqInternetConfigurationGetStringKeyedBykeySizeinto  use DOCUMENT_NAME_SIZE versus 1024\\\n\\\n\t\tHID_Utilities.c\\\n\t\t\tuse 0, verus null to avoid warning message\\\n\\\n\t\tsqMacSecurity.c\\\n\t\t\tuse, MACINTOSHUSEUNIXFILENAMES, drop check for HFS :: \\\n\t\t\tadd logic to put /secure in vm path as secure directory\\\n\t\t\tchange logic to use unix file names for making My Squeak directory, also call out to dir creation\\\n\\\n\t\tsqMacEncoding.c\\\n\t\t\tSetVMPathFromCFString - for  unix file names we only need to set the vmPathString\\\n\t\t\tFor HFS+ add comments about why we need to do normalization here and in SetImageNameViaCFString\\\n\t\t\t\\\n\t\tsqMacExternalPrims.c\\\n\t\t\tioLoadModule - use DOCUMENT_NAME_SIZE, for CFURLCopyFileSystemPath use posix path stye\\\n\t\t\tLoadLibViaPath - use sqFilenameFromStringOpen versus sqFilenameFromString to ensure we resolve aliased bundle. \\\n\t\t\\\n\t\tsqMacImageIO.c\\\n\t\t\tsqImageFileOpen - use DOCUMENT_NAME_SIZE\\\n\t\t\\\n\t\tsqMacMain.c\\\n\t\t\tuse SHORTIMAGE_NAME_SIZE\\\n\t\t\tAdd MACINTOSHUSEUNIXFILENAMES, use\\\n\t\t\t\t SetVMPathFromApplicationDirectory to set vm path\\\n\t\t\t\tmove location of set working directory to use vm path before apple event processing, but after processing xml args. \\\n\t\t\t\tmove processing unix args after processing appleevents\\\n\t\t\t\tfind image in resource folder using unix path name\\\n\t\t\t\tif no image file, then attempt to find image name using resolved for tilda xml name\\\n\t\t\tFor id == 1003\\\n\t\t\t\treturn intel if gestaltIntel\\\n\t\t\tFor id == 1201\\\n\t\t\t\talways return 255\\\n\\\n\t\t sqMacTime.c\\\n\t\t\tadd  unix time conversion routine\\\n\t\t\t\\\n\t\t sqMacTime.h\\\n\t\t\tadd unix time conversion routine\\\n\\\n\t\tsqMacUIAppleEvent.c\\\n\t\t\tHandleOpenAppEvent, use SHORTIMAGE_NAME_SIZE\\\n\t\t\t\tremove set VMPath, that happens in sqMacMain now\\\n\t\t\tHandleOpenDocEvent\\\n\t\t\t\tremove set VMPath, that happens in sqMacMain now\\\n\t\t\t\tfor unix file path use PathToFile() to resolve fsspec to image path\\\n\t\t\tprocessDocumentsButExcludeOne use SHORTIMAGE_NAME_SIZE\\\n\t\t\t\tfor opening doc in applescript launch of new VM don't use POSIX path of file \\\n\t\t\tgetFirstImageNameIfPossible\\\n\t\t\t\tfor unix file path use PathToFile() to resolve fsspec to image  path\\\n\t\t\\\n\t\tsqMacUIConstants.h\\\n\t\t\tadd DELIMITER and DELIMITERInt\\\n\t\t\\\n\t\tsqMacUIEvents.c\\\n\t\t\t#ifdef out powermanager calls\\\n\\\n\t\t  sqMacUnixCommandLineInterface.c\\\n\t\t\tresolveWhatTheImageNameIs\\\n\t\t\t\trework for unix path names\\\n\t\\\n\t\t\t\t\\\n\t\t\t\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\\cf0 3.8.9b9\t\t\tdisplay tuning\\\n\t\t\t\tsqMacHostWindow.c\tRemove getwindowport call from screen drawing routine, not needed. \\\n\t\t\t\t\t\t\t\t\tRemove CGContextSynchronize from general usage, not needed, improves performance a bit\\\n\t\t\t\t\t\t\t\t\tAdd feature to call CGContextSynchronize on window resize event, also to clip display area\\\n\t\t\t\t\t\t\t\t\tto avoid writting in title bar when you resize window smaller. \\\n\t\t\t\t\t\t\t\t\tUse more modern QDEndCGContext/QDStartCGContext calls.\\\n\t\t\t\tsqMacHostWindow.h\\\n\t\t\t\tsqMacUIEvents.c\t\tCapture kEventWindowResizeStarted event so we can signal that we want to clip. \\\n\\\n3.8.9b8\t\t\tThere are a number of interesting changes this revision.\\\n\t\t\t\ta) We set the working directory via chdir, in the past this might have been the vm directory, but sometimes it was the os-x root directory\\\n\t\t\t\tThis was causes things like the Squeak3D.log to be created in the root directory.\\\n\\\n\t\t\t\tb) We added a routine to resolve squeak files names to host platform names and exposed that api in the vm machine interface. \\\n\\\n\t\t\t\tc) Fixed a bug that has existed since the early days of Alias support, say 5 years back. The bug is that if you have a directory path, say\\\n\t\t\t\tvol:foo:bar:too.txt   and the directory bar does not exist, the end result will be a file reference to vol:foo:too.txt, that of course is wrong \\\n\t\t\t\twhat was happening is that we would attempt to resolve the name, find it did not exist, then resolve by path components, when the path \\\n\t\t\t\tcomponent lookup failed on directory bar we would signal the file was not found, but higher up in os-x we would think the file name did \\\n\t\t\t\tnot exist and attempt to allocate the file as vol:foo:too.txt which would work...   Now we signal a bad path name error when the partial path\\\n\t\t\t\tname won't resolve higher up in the chain of path components.   This does not affect os-9 users. \\\n\\\n\t\t\t\t\\\n\t\t\t\tsqMacMain.c\t\t\tSet working directory to vm directory\\\n\t\t\t\tsqMacFileLogic.c\t\tAdd interface to VM machine interface to expose converting file name from squeak internal rep to platform name,\\\n\t\t\t\t\t\t\t\t\tfix file name resolving bug. \\\n\t\t\t\tsqMacFileLogic.h\t\tremove makeOSXPath()\\\n\t\t\t\tsqMacUIEvents.h\t\tzero out utf32Code field to remove bogus data\\\n\t\t\t\tsqPlatformSpecific.h\tremove makeOSXPath()\\\n\\\n\\\n3.8.9b7 \t\t\tsqMacMain.c\t\t\t#ifdef change to enable compile under os-9\\\n\t\t\t\tsqMacUIAppleEvents.c\tHandle case where the file name ends with *.image but we have no hfs meta data. \\\n\t\t\t\tsqMacUIEvents.c\t\t#ifdef change to enable compile under os-9.\\\n\t\t\t\tsqMacWindow.c\t\tRecheck window handle on window open, or window title set.\\\n\\\n\\\n3.8.9b5\t\t\t\t\t\t\t\t3.8.9b2,b3,b4,b6 had limited distribution for testing\\\n\\\n\t\t\t\tsqMacExternalPrims.c\tLook for plugin bundles in the resource folder. This allows you to place bundles in the resource folder, now Squeak\\\n\t\t\t\t\t\t\t\t\twill look for a plugin in the \"Plugins\" folder, the root folder where the app is, and lastly the resource folder in the app. \\\n\t\t\t\t\t\t\t\t\tThis enables you to customize a VM with the right set of plugins for your vertical application.\\\n\t\t\t\t\\\n\t\t\t\tsqMacFileLogic.c\t\tWhen converting a HFS path to a posix path we need a few more checks to avoid problems with bogus file names\\\n\t\t\t\t\t\t\t\t\tFixes crash in CFURLCreateCopyDeletingLastPathComponent, via quicklyMakePath()\\\n\\\n\t\t\t\tsqMacMain.c\t\t\tAdd logic to allow you to specify foobar.toobar as Squeak.image, or anything else you decide\\\n\t\t\t\t\t\t\t\t\tThis is done via the plist\\\n\t\t\t\t\t\t\t\t\t\n\\f1\\fs20 \\CocoaLigature0 SqueakImageName = Squeak.image\\\n\t\n\\f0\\fs24 \\CocoaLigature1 \\\n\t\t\t\t\t\t\t\t\tWere we first look in the Resource folder in the app. If not found we then look for it as a path name \\\n\t\t\t\t\t\t\t\t\twhich could be:  (partial, tilda based, or full)\\\n\t\t\t\t\t\t\t\t\tfoobar.toobar\\\n\t\t\t\t\t\t\t\t\t\n\\f2 ~/Documents/Squeak/foobar.thing\\\n\n\\f0 \t\t\t\t\t\t\t\t\t\n\\f2 /HardDisk/User/Foo/Documents/Squeak/foobar.thing\\\n\\\n\n\\f0 \t\t\t\tsqMacTime.c\t\t\tuse #define for MillisecondClockMask\\\n\\\n\t\t\t\tsqMacUIAppleEvents.c\tuse plist info (\n\\f1\\fs20 \\CocoaLigature0 SqueakImageName) \n\\f0\\fs24 \\CocoaLigature1 as short image name.\\\n\\\n\t\t\t\tsqMacUIEvents.c\t\tuse  #define for MillisecondClockMask\\\n\t\t\t\\\n\t\t\t\tsqMacUnixCommandLineInterface.c\tcommand line help should say Squeak.image versus squeak.image\\\n\\\n\\\n\\\n3.8.9b1\t\t\tsqMacWindow.c\t\tAltered ioFullScreen logic to avoid problems if you do full screen on twice or more, then full screen off. \\\n\t\t\t\t\t\t\t\t\tBug was the window would be positioned at 0 & 0 and you could not grab it in order to move it. \\\n\\\n\t\t\t\t\n\\f1\\fs20 \\cf3 \\CocoaLigature0 sqMacUIAppleEvents.c\t\n\\f0\\fs24 \\cf0 \\CocoaLigature1 Add logic to launch new shell script via apple script to startup same executable with image on an open doc request. \\\n\t\t\t\t\t\t\t\t\tThis allows us to double-click on an image when a squeak VM is running. \\\n\\\n3.8.8b15\t\t\tinfo.plist\t\t\t\tAdd NSService tag to allow Squeak to be a Mac OS-X service.\\\n\\\n3.8.8b14\t\t\tsqMacUIEvents.c\t\tAdded logic to allow you to alter quartz flush logic and post flush logic ms times. \\\n\t\t\t\tsqMacWindow.c\t\tIn the info.plist within the application you will find 4 keys which alter this behavior.\\\n\\\n\t\t\t\t\t\t\t\t\t\n\\f1\\fs20 \\CocoaLigature0 SqueakUIFlushPrimaryDeferNMilliseconds = 20  \\\n\t\t\t\t\t\t\t\t\t\tAttempt to accumulate draw events in a 20 ms window. If a draw occurs and the time is greater than 20 ms from the \\\n\t\t\t\t\t\t\t\t\t\tlast draw we draw and flush. If the draw is in the 20ms window we draw, and do a CGSync (once) and do not do the flush. \\\n\t\t\t\t\t\t\t\t\t\tThe sync should schedule an flush by the carbon event handler within 20ms or so. Setting this value towards 0 will \\\n\t\t\t\t\t\t\t\t\t\tflush on every draw. I will note setting to 16ms causes the hilbert test to draw each pixel, versus clumps of pixels. \\\n\t\t\t\t\t\t\t\t\t\tAltering this value will affect the frame rate of your squeak animation. \\\n\\\n\t\t\t\t\t\t\t\t\tSqueakUIFlushSecondaryCheckForPossibleNeedEveryNMilliseconds = 20\t\t\t\t\t\t\t\t\t\tCheck no faster than 20 ms for possible pending flush events. This reduces CPU overhead. The value of this \\\n\t\t\t\t\t\t\t\t\t\tkey has a relationship to the other two keys, but making it smaller might not improve thing. Because of how the \\\n\t\t\t\t\t\t\t\t\t\tchecking is done there is no guarantee it will achieve a rate under say 16ms, but it will always occur within N seconds.\\\n\t\t\t\t\t\t\t\t\t\tThis value can effect how menus item highlighting is done.\\\n\\\n\t\t\t\t\t\t\t\t\tSqueakUIFlushSecondaryCleanupDelayMilliseconds = 25\\\n\t\t\t\t\t\t\t\t\t\tWhen N ms occur based on SqueakUIFlushSecondaryCheckForPossibleNeedEveryNMilliseconds and we have a flush pending and\\\n\t\t\t\t\t\t\t\t\t\tthe flush has not occurred within this key value of 25ms we force a flush. This value should be more than\\\n\t\t\t\t\t\t\t\t\t\tSqueakUIFlushPrimaryDeferNMilliseconds to avoid conflicts with the draw loop.  If for example we have a draw and \\\n\t\t\t\t\t\t\t\t\t\ta draw then no further drawing, the first draw should be flushed, then next cached for upwards of 20-40ms based on \\\n\t\t\t\t\t\t\t\t\t\tSqueakUIFlushSecondaryCheckForPossibleNeedEveryNMilliseconds then we would see it exceeds this key value and cause the flush. \\\n\\\n\t\t\t\t\t\t\t\t\tSqueakUIFlushUseHighPercisionClock =  true\\\n\t\t\t\t\t\t\t\t\t\tUse a more expensive ms accurate clock when set to true. If false we use the 16ms based cheap clock. This is set to true\\\n\t\t\t\t\t\t\t\t\t\tto give higher accuracy and does not seem to affect CPU usage based on statistical sampling of production VMs. \\\n\\\n\n\\f0\\fs24 \\CocoaLigature1 \t\t\t\t\t\t\t\t\tSqueakers are welcome to alter these values to obtain best behaviour which might change based on versions of OS-X.\\\n\t\t\t\t\t\t\t\t\tAltering \n\\f1\\fs20 \\CocoaLigature0 SqueakUIFlushPrimaryDeferNMilliseconds \n\\f0\\fs24 \\CocoaLigature1 will affect frame rate.\\\n\t\t\t\t\t\t\t\t\tAltering \n\\f1\\fs20 \\CocoaLigature0 SqueakUIFlushSecondaryCheckForPossibleNeedEveryNMilliseconds & SqueakUIFlushSecondaryCleanupDelayMilliseconds \n\\f0\\fs24 \\CocoaLigature1 will affect \t\t\t\t\t\t\t\t\tmenu drawing.\\\n\t\t\t\t\t\t\t\t\tFeedback about these choices is welcome. \\\n\\\n3.8.8b13\t\t\tsqMacUIEvents.c\t\tCheck every 16ms versus 32ms for pending flush which should occur every 32ms or so\\\n\t\t\t\tsqMacWindow.c\t\tCall GCSync when we write data, this should ensure pending flushes will occur, but will force every 32ms or so. \\\n\\\n3.8.8b12\t\t\tsqMacUIEvents.c\t\tCall flush window code each time the get next event prim is called to ensure flushes happen within a 32/1000 or 64/1000 sec period\\\n\\\n3.8.8b11\t\t\tsqMacWindow.c\t\tMake window creation occur when we ask for window size so we can build full screen window correctly and \\\n\t\t\t\t\t\t\t\t\tdraw in one draw cycle. \\\n\\\n3.8.8b10\t\t\tsqMacWindow.c\t\tFix issue with window resize, need to rebuild CGContext from newly changed window port after resize. \\\n\\\n3.8.8b9\t\t\tsqMacWindow.c\t\tDiscovered code that fetches CGContext is locked out when other applications draw. Reworked that and how flush works\\\n\t\t\t\t\t\t\t\t\tNow seems to draw hilbert example quickly, does bouncing atoms ok, has lower WindowServer overhead and \\\n\t\t\t\t\t\t\t\t\tworks with quartz extreme.\\\n \\\n3.8.8b8\t\t\tsqMacWindow.c\t\tAdd code to sqMacUIEvents.c to flush pending draws\\\n \\\n3.8.8b7\t\t\tsqMacWindow.c\t\tChange Quartz logic to fetch GCContext from quickdraw port, then build and draw image, flush or synch\\\n\t\t\t\t\t\t\t\t\tThis makes it work with Quartz extreme3.8.8b7\t\t\tFirst iteration of quartz code fails for Quartz Extreme. Rewrite and optimize for Quartz Extreme.\\\n\\\n3.8.8b6\t\t\tSigh, found flush window via QDFlushPort logic every 1/50 of a second via carbon event was too expensive (CPU TIME)\\\n\t\t\t\tSo I poked at Quartz example code and reworked for Squeak, with addition of quickdraw off-screen conversion for 1/2/4/8 bit color spaces.\\\n\t\t\t\tThis has reduced cpu overhead when in background quite a bit and seem to have made Croquet faster. \\\n\\\n\t\t\t\tsqMacWindow.c\t\tRewrote for Quartz, flush every 1/10 of a second, do sync on each draw. \\\n\t\t\t\tsqMacHostWindow.c\tremove flush window code.\\\n\t\t\t\tsqMacHostWindow.h\tremove flush window code.\\\n\t\t\t\tsqMacUIEvents.c\t\tremove gQDFlushTimer flush logic, ignore hide, show, hide others cmds so they work from menu \\\n\\\n3.8.8b5\t\t\tWindow flush every 1/50 of a second to make os-x 10.4 happy. \\\n\t\t\t\tAdd getSessionID logic\\\n\t\t\t\t\\\n\t\t\t\tosExports.c\t\t\tcompiler warning message about file name case\\\n\t\t\t\tsqMacDirectory\t\tcorrectly get volume size and creation date, was always broken.\\\n\t\t\t\tsqMacHostWindow.c\tdeal with flushing multiple open windows\\\n\t\t\t\tsqMacHostWinodw.h\t\\\n\t\t\t\tsqMacOpenGL.c\t\tuse of QDSwapPort versus get/set port for non-open/gl macs\\\n\t\t\t\tsqMacPrinting.c\t\tdeal with compiler warning message\\\n\t\t\t\tsqMacSecurity.c\t\tcompiler warning message about file name case\\\n\t\t\t\tsqMacNetwork.c\t\tcompiler warning messages\\\n\t\t\t\tsqExports.c\t\t\tcompiler warning messages\\\n\t\t\t\tsqMacEncoding.c\t\tdouble CFRelease (bad)\\\n\t\t\t\tsqMacExternalPrims.c\tcompiler warning messages\\\n\t\t\t\tsqMacMain.c\t\t\tNSPlugin related changes\\\n\t\t\t\tsqMacMemory.c\t\tcompiler warning messages\\\n\t\t\t\tsqMacNSPlugin.c\t\talter screen update logic, wait a few milliseconds for squeak to do screen redraws\\\n\t\t\t\tsqMacUIEvents.c\t\tAlter screen flush logic.\\\n\t\t\t\tsqMacWindow.c\t\tAlter screen flush logic\\\n\t\t\t\tGnuifier.5.cs\t\t\tGunifier changes for 32/65bit changes\\\n\\\n3.8.8b4\t\t\tLimited release\\\nd\\\n3.8.8b3\t\t\tLimited release\\\n\\\n3.8.8b2\t\t\tRevisions to the 32/64bit memory access to improve VM performance\\\n\t\t\t\t\n\\f3 sqMacEncoding.c,\t\t\tFix bug reported by Stephan B. Wessels swessels@cox.net, crash on Tiger if squeak.image is in resource folder\\\n\t\t\t\t\n\\f0 sqMacJoystickAndTablet.c\tMore rewrites by Bert.\\\n\t\t\t\tsqPlatformSpecific.h\t\tAdd undefs for dispatchFunctionPointer, dispatchFunctionPointerOnin\\\n\t\t\t\tsqMacUIAppleEvents.c\t\tFix issue with window title not showing long image name on drag & drop image\\\n\t\t\t\tsqMacMain.c\t\t\t\tFix issue with window title not showing long image name on image selection from dialog prompt. \\\n\t\t\t\tsqMacUnixCommandLineInterface.c\tNew, enable command line functions and environment variables. \\\n\t\t\t\n\\f1\\fs20 \\CocoaLigature0  \t\t\\cf2 -help                 print this help message, then exit\t\t\t\t\t-memory <size>[mk]    use fixed heap size (added to image size)\t\t\t\t\t-pathenc <enc>        set encoding for pathnames (default: UTF-8)\\cf0 \\\n\n\\f0\\fs24 \\CocoaLigature1 \t\t\t\t\tor as environment variables\\\n\t\t\t\t\t\n\\f1\\fs20 \\cf2 \\CocoaLigature0 SQUEAK_IMAGE, SQUEAK_MEMORY, SQUEAK_PATHENC\n\\f0\\fs24 \\cf0 \\CocoaLigature1 \\\n\t\t\t\t\\\n\\\n3.8.8b1\t\t\tNot released to general public\\\n\t\t\t\tsqMacAsyncFilePrims.c\t\t(void*) for ioLoadFunction\\\n\t\t\t\tsqMacDragDrop.c\t\t\t(void*) for ioLoadFunction\\\n\t\t\t\tsqMacHostWindow.c\t\t(void*) for ioLoadFunction\\\n\t\t\t\tsqMacJoystickAndTablet.c\tminor changes\\\n\t\t\t\tsqMacSecurity.c\t\t\t(void*) for ioLoadFunction\\\n\t\t\t\tsqUnixSoundMacOSXJMM.c\tadd static to var to avoid compiler warning\\\n\t\t\t\tsqMacExternalPrims.c\t\t(void*) for various module interfacing\\\n\t\t\t\tsqMacWindows.c\t\t\t(void*) for ioLoadFunction\\\n\\\n\\\n3.8.7b7\t\t\tRevised and altered os-x joystick support based on changes by Bert\\\n\t\t\t\tMove towards 32/64bit VM logic by using latest VM Maker \\\n\t\t\t\tsqMacExternalPrims.c\t\t(void *) usage\\\n\t\t\t\tsqMacFileLogic.c\t\t\t(void *) usage\\\n\\\n3.8.7b6\t\t\tAdded Dominique Dutoit hitoro@easynet.be changes for os-x joystick support.\\\n\\\n3.8.7b5\t\t\tFix logic to allow you to start VM from command line, changed \\\n\t\t\t\tsqMacFileLogic.c makeHFSFromPosixPath added to convert posix cmd line path names to HFS\\\n\t\t\t\tsqMacMain.c\tadd logic to call cmd line parser\\\n\t\t\t\tsqMacUnixCommandLineInterface.c\tnew file logic to parse cmd line\\\n\t\t\t\tsqMacUnixCommandLineInterface.h\\\n\t\t\t\tsqMacWindow.c\t\tminor changes to correct compiler errors\\\n\\\n3.8.7b4/b3\t\tLimited release for testing\\\n\\\n3.8.7b2\t\t\tsqUIEvents.c changed keyUp/keyDown to supply mac virtual keycode versus unicode, added new parm to keyChar to supply UTF-32 Unicode.\\\n\t\t\t\tAs per Andreas request for Tweak. \\\n\\\n3.8.7b1\t\t\tsqUIEvents.c changed keyUp/keyDown logic to match Windows pattern, key repeat becomes keyDown/keyDown/keyUp\\\n\\\n3.8.6b6\t\t\t\n\\f3 sqMacMIDI.c add #def so I can compile under code warrior os-9 again\\\n\t\t\t\tsqMacEncoding.c, sqMacEncoding.h  Minor changes so I can compile user code warrior os-9 again\\\n\t\t\t\tsqMacUnixInterfaceSound.c  Fix problem with empty buffer being full of junk under certain conditions, that causes a sharp sound  bite. \\\n\n\\f0 \\\n3.8.6b5\t\t\tChange to JMM & AR GC instrumentation patch, collect a few less statistics. Also change carbon VM to use Unix/Quartz sound driver \\\n\t\t\t\twhich interfaces to Core Audio stuff. \\\n\\\n3.8.6b4\t\t\tEnsure VMMaker 3.8b2 - the VM code classes and tools for building a working vm for Squeak version  > 3.8-6461. is incorporated.\\\n\t\t\t\tAdd Andreas's GC improvement changes for \\\n\t\t\t\t\n\\f2 * primitiveIsYoung: This answers the question whether an object currently lives in young or in old space.\\\n\\\n\t\t\t\t* primitiveIsRoot: Answers the question whether any given object is currently a root for young space.\\\n\\\n\t\t\t\t* primitiveRootTable: Answers a snapshot of the current root table. Useful to examine the roots table if the analysis requires complex other operations during which the root table might be modified itself. Note that since this primitive can cause GC there is a small chance that it will give an inaccurate answer.\\\n\\\n\t\t\t\t* primitiveRootTableAt: Answers a single element of the root table (by one-based index). This primitive can be used to quickly scan the root table for certain objects.\\\n\\\n\t\t\t\t* primitiveSetGCSemaphore: Indicates a semaphore (index) to be signaled whenever a garbage collection occurs. I can see at least two uses uses for the GC semaphore: running cleanup actions (for example after full GCs occured) and dynamic parameter tuning for the GC algorithm itself.\\\n\n\\f0 \\\n\t\t\t\tAdd John's changes for\\\n\\\n\t\t\t\tSmalltalk setGCBiasToGrowGCLimit: 16*1024*1024. \"Set growth limit before full GC to 16MB\"\\\n\\\n\t\t\t\tSmalltalk setGCBiasToGrow: 1.\\\n\t\t\t\tSet bias to grow upto GCLimit, this can avoid a problem where we attempt to avoid growing but results in thousands of incremental GC events as \\\n\t\t\t\twe approach a knee in a curve of space used versus the growth/compaction decision. \\\n\\\n\\\n3.8.6b3\t\t\tAdd in logic for become: to fix issues with changes to become: logic. \\\n\\\n3.8.6b2\t\t\tsqMacWindow.c  reduce number of lock/unlock pixel events and flush no more than 91 fps, with flush check every 1/50 or 1/60 and 1/5 of a second. this \\\n\t\t\t\tshaves another 50% off making drawing pixels 1.3% of the time originally taken. \\\n\\\n3.8.6b1\t\t\tsqMacWindow.c, sqUIEvents.c, changed logic to flush screen every 125 fps, this makes pixel level drawing complete in 2% of the time originally taken. \\\n\t\t\t\\\n\\\n3.8.5b1\t\t\tFix issue with gnuify. The offical gnu header file used a different #ifdef for the foo register than an altered gnu header file I was using for \\\n\t\t\t\tmany years. This resulted in slower performance, which is fixed in 3.8.5 \\\n3.8.4b3\t\t\tSupport for GC statistical data and change to how memory is allocated and tenured.\\\n\t\t\t\t\tAdditional statistical information from the GC routines\\\n\t\t\t\t\tAdditional primitives to set GC semaphore, and to force a tenure\\\n\\\n\t\t\t\tChange to make forward logic to look for \"foo become: foo\" and cause a prim failure.\\\n\t\t\t\tEarlier version of 3.8.4 where distributed to Ffenstri testers.\\\n\t\t\\\n\t\t\t\tsqMacHostWindow\t\tChange calls to move and size window to use GUILocker callbacks to avoid VM crash. \\\n\t\t\t\tsqMacWIndow.c\t\tAlter 1/2/4 bit support to pass in bit size of target window, then copy is more efficient. \\\n\\\n\\\n3.8.3b3\t\t\tSupport for Host menus and windows. Also added back 1bit (B/W) and 2bit & 4bit color as requested by Dan Ingalls for os-x\\\n\\\n\t\t\t\tEarlier versions of 3.8.0/1/2/3 were distributed to the TK4 team, not the public. \\\n\t\t\t\t\\\n\t\t\t\tsq.h  Added events, EventTypeMenu, EventTypeWindow to handle menu and window events generated by the Host OS\\\n\t\t\t\t\tand placed on the Squeak Event Queue to be read by EventSensor\\\n\t\t\t\t\\\n\t\t\t\tsqGnu.h Switch to the current file used by Ian for  Unix, versus older modified copy.\\\n\t\t\t\tsqMacExternalPrims.c\tCleanup of warning message\\\n\t\t\t\tsqMacImageIO.c\t\tWhen you set the image name, we set the title on window 1.\\\n\t\t\t\tsqMacMain.c\t\t\tDo not create the main window until we actually use it. \\\n\t\t\t\tsqMacNSPlugin.c\t\tAlways refer to window 1, not sure what it means to have other windows in the plugin yet...\\\n\t\t\t\tsqMacUIEvents.c\t\tOS-9\\\n\t\t\t\t\t\t\t\t\tPass cmd-key menu activity up\\\n\t\t\t\t\t\t\t\t\tPass update event bounding box window events up\\\n\t\t\t\t\t\t\t\t\tPass window activate events up\\\n\t\t\t\t\t\t\t\t\tPass menu interaction activity up\\\n\t\t\t\t\t\t\t\t\tPass window events, resize,zoom,close,move,inconize up\\\n\t\t\t\t\\\n\t\t\t\t\t\t\t\t\tOS-X\\\n\t\t\t\t\t\t\t\t\tSame as above\\\n\t\t\t\t\t\t\t\t\tgetUIToLock needs to ReleaseEvent on the passed in event for GC reasons\\\n\t\t\t\tsqMacUIMenuBar.c\t\tdisable edit menu at start, if later we find it enabled, don't touch, otherwise handle os-9 DA issues.\\\n\t\t\t\tsqmacWindow.c\t\tsqShowWindow now gets a windowIndex parm. \\\n\t\t\t\t\t\t\t\t\tioShowDisplayOnWindow is added, with logic to build main window at first draw time, \\\n\t\t\t\t\t\t\t\t\talso fix some boundary checks, and provide support (again) for 1/2/4 bit color under os-x\t\t\t\t\t\t\t\t\tioHasDisplayDepth() will return true for 1/2/4/8/16/32 bit color\\\n\\\n\\\n\\\n3.7.5b3\t\t\tOpenGL fix by Bert.\\\n\t\t\t\tOpen Squeak3D.log in the currently directory, not the root volume, also ensured this works in os9.\\\n\t\t\t\t\\\n\t\t\t\tsqMacNSPlugin.c\tAlter memory check at startup to ensure we see all 512MB, not a default of 30MB\\\n\t\t\t\tsqMacUIMenuBar.c\tDon't hide menubar if squeak screen is full screen on secondary screen. \\\n\t\t\t\tsqMacWindow.c\tWhen you open in full screen mode, then revert, ensure the screen is resized rationally. \\\n\t\t\t\t\t\t\t\tAlso remember screen size and location when going into full screen so revert is sane. \\\n\t\\\n3.7.5b2\t\t\tLimited distribution for testing\\\n3.7.5b1\t\t\tLimited distribution for testing \\\n\\\n3.7.5b1\t\t\tReleased to fix issues with 16bit to 32bit display color mapping\\\n\t\t\t\t\\\n\t\t\t\tCleanup of compiler warning message.\\\n\t\t\t\tsqMacAsyncFilePrims.c, sqMacOpenGL.c, sqMacDragDrop.c, sqMacDirectory.c, \\\n\t\t\t\tsqMacInternetConfiguration.c, sqMacJoystickAndtablet.c, sqMacMIDI.c, sqMacSecurity.c,\\\n\t\t\t\tsqMacSerialPort.c, sqMacNetwork.c, sqMacSound.c, sqMacUUID.c, sqMacEnconding.c,\\\n\t\t\t\tsqMacFileLogic.c,  sqMacImageIO.c, sqMacMain.c, sqMacMemory.c, sqMacNSPlugin.c,\\\n\t\t\t\tsqMacTime.c, sqMacUIAppleEvents.c, sqMacUIClipBoard.c, sqPlatformSpecific.h\\\n\\\n\t\t\t\tsqMacUIEvents.c\\\n\t\t\t\tPrework for multiple window support, use event supplied window versus stWindow. \\\n\t\t\t\tChange os-9 behavior to bring window to front swallow click\\\n\t\t\t\tChange os-x behavior to bring window to front swallow click\\\n\\\n\t\t\t\tsqMacWindow.c\\\n\t\t\t\tPrework for multiple window support, use getSTWindow() call versus stWindow. \\\n\t\t\t\tUse lookup table to properly map 5bit color space to 8bit color space. Some crummy code was introduced in 3.6.1b3\\\n\t\t\t\twhich did a poor job of color space transformation (16->32bit).\\\n\\\n\t\t\t\tsqMacExternalPrims.c\\\n\t\t\t\tAlter load logic to use kCFURLPOSIXPathStyle path name versus hfs path name. \\\n\t\t\t\tAlter load logic for frameworks to look in User, Network, Local, System domains for framework,\\\n\t\t\t\tbefore we would only look in the System domain. This allows frameworks at the user domain scope.\\\n\\\n\t\t\t\tCleanup of squeak window references pending multiple window support\\\n\t\t\t\\\n3.7.4b3\t\t\tReleased to fix issues in Netscape plugin code\\\n\t\t\t\tFIX PROBLEM that triggers image read failure on G5 machines. This prevents image from running on G5 machines.\\\n\t\t\t\tProblem shows up as browser crash or failure to start squeakland project.\\\n\\\n3.7.4b2\t\t\tReleased to fix issues in Netscape plugin code\\\n\t\t\t\tDo not start timers until later in the image start, this prevents failure if image doesn't load\\\n\t\t\t\tSupport failureURL and imageName embed html tags\\\n\\\n3.7.4b1\t\t\tprimitive Function Pointer goes into method cache logic, better lookup times.\\\n\t\t\t\tForce Interrupt Check logic in VM to fix most/all? issues with tight loops and keyboard interrupt logic.\\\n\t\t\t\tmore sanity checks in displayBitsOfLeftTopRightBottom\\\n\t\t\t\tcleanup of flushExternalPrimitiveOf\\\n\t\t\t\tcleanup of oopFromChunk\\\n\t\t\t\trefactor pop then push to pop:thenPush:\\\n\t\t\t\tlookupMethodInDictionary refactor to make one loop looking, versus perhaps two.\\\n \t\t\t\tmark/sweep logic or type, versus adding type (or is correct math)\\\n\t\t\t\tdispatchFunctionPointer logic\\\n\t\t\t\trework primitiveScanCharacters logic\\\n\t\t\t\tadd parm to VMparms to set interruptChecksEveryNms\\\n\t\t\t\tFix bug in primitiveYield\\\n\\\nLargeIntegersPlugin\tadd normalization logic\\\n\\\nZipPlugin\t\t\tadded primitiveUpdateAdler32 primitive\\\n\\\n3.7.3b4\t\t\tNumerous changes for Unicode file name support, and proper support for keyup/keydown on os-x. \\\n\\\nsqVirtualMachine.c\tVM_PROXY_MINOR set to  6  to support isArray = isArray;\\\n\\\ninterp.c\t\t\tNew VMMaker code update, major change is to use dispatchFunctionPointerOnin logic to dispatch \\\n\t\t\t\tprimitive calls, versus going via a jumptable/case statement. Also Tim reviewed the usage of the \\\n\t\t\t\tmillisecond clock and improved things so we don't need to check the clock on every prim call. This \\\n\t\t\t\tmakes the RISC and other platforms faster. However it only has minor effect on the os-x carbon VM \\\n\t\t\t\tbecause of how the cheap millisecond clock is implemented.\\\n\\\nsqMacDirectory.c\tChange dir_Lookup  // HFS+ imposes Unicode2.1 decomposed UTF-8 encoding on all path elements\\\n\t\t\t\tPer request from \n\\f2 Tetsuya HAYASHI <{\\field{\\*\\fldinst{HYPERLINK \"mailto:tetha@st.rim.or.jp\"}}{\\fldrslt tetha@st.rim.or.jp}}>\\\n\\\nsqMacEncoding.c\tAlter SetVMPath() \n\\f0 per request from \n\\f2 Tetsuya HAYASHI , \\\n\t\t\t\tadd support for \n\\f1\\fs20 \\CocoaLigature0       \\\n\t\t\t\t\\cf2 \"ShiftJIS\"\\cf0  kCFStringEncodingShiftJIS\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f2\\fs24 \\cf0 \\CocoaLigature1 \\\nsqMacFileLogic.c\tAlter makeFSSpec(), get  kCFStringNormalizationFormD path name\\\n\t\t\t\tAlter PathToFile(), get kCFStringNormalizationFormKC path name\\\n\t\t\t\tAlter QuicklyMakePath() get kCFStringNormalizationFormKC path name\\\n\t\t\t\tNew routine unicode2NativePascalString()\\\n\t\t\t\tAlter makeOSXPath, get kCFStringNormalizationFormKD path name\n\\f0 \\\n\t\t\t\tAlter resolveLongName, get kCFStringNormalizationFormKC path name\\\n\t\t\t\tAlter FSMakeFSSpecCompat(), call \n\\f2 unicode2NativePascalString to normalize path name\n\\f0 \\\n\\\nsqMacMemory.c\tAllow browser plugin to allocate 512MB of VM space for image under os-x. \\\n\\\nsqMacUIAppleEvents.c Use CFStringGetSystemEncoding versus suggested plist.info suggestion because the encoding info is quite right yet at\\\n\t\t\t\tthis point in the startup time.\\\n\\\nsqMacUIEvents.c\tKey Up is  now reported as an event when the key is released. Earlier os-x carbon VMs would report the key up after the\\\n\t\t\t\t keystroke was processed by Text Services, which was incorrect. We also deal with Key repeat correctly and don't send\\\n\t\t\t\tanother key down event. This change has made it possible to properly support Morphic games where key up/down state is\\\n\t\t\t\timportant to game interaction. \\\n\\\nsqMacWindow.c\tFix crash in ShowWindow(). This was due to a pthread race condition between the UI thread and interp.c. \\\n\t\t\t\tFixed by using UI callback to handle the show screen call. Would show up as a crash before window appeared.\\\n\\\n3.7.3bx\t\t\tEarlier versions of 3.7.3 were released to confirm the file changes for Japanese users worked correctly, and to \\\n\t\t\t\tconfirm that the keyUp logic changes worked as desired.\\\n\\\n3.7.2b1 \t\t\tChanges for NPSqueak to fix issues with full screen mode under Safari 1.2 (V125) \\\n\t\t\t\tUsage of VMMaker3-7b2 to build interp.c\\\n\t\t\t\tUnicode values now come up from the classic VM versus the historical (1984) keycode values, this makes Tweak work.\\\n\t\t\\\n3.7.1b2\t\t\\\nJPEG READER WRITER\\\n\t\t\t\tusage of Apple '-fast' uncovered a source code issue, initialization routines for internal jpeg plugin were not returning true or false, before this was kinda of considered as true. But when compiled with -fast it's zero, meaning the inialization failed, but that is bogus.\\\n\\\n3.7.1b1\\\n\t\t\t\tUse of \"-fast\" apple gcc 3.3 compiler option, improves sends by significant %\\\n\t\t\t\t\n\\f2 On EventKeyUp/EventKeyDown you get the UniCode On EventKeyChar you get the UniCode->MacRoman translated character.\\\n\t\t\t\tBroke high bit ascii macroman in 3.7.0bx.\\\n\t\t\t\tFor multi-byte character input you get EventKeyDown/EventKeyChar/EventKeyUp for each unicode character coming from the input sequence.\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 \\\n3.7.0b2\t\t\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f2 \\cf0 \t\t\t\ta) You can alter the application's Info.plist by setting the SqueakEncodingType using the ICANA readable names\\\n\\\n\t\t\t\tmacintosh\t- >macRoman\t\\\n\t\t\t\tUTF-8\t\t-> UTF-8\\\n\\\n\t\t\t\tb) Support for sqSocketListenOnPortBacklogSizeInterface, which allows you to specify the interface to use for the listen should work both for os-x and os-9.\\\n\t\t\t\tc) Usage of VMMaker3-7a2.\\\n\t\t\t\td) Special change sets: make primitive point x/y internal, and slightly faster activate.\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 \\\n3.7.0b1 \t\t\t\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f2 \\cf0 \t\t\t\t Changes for the \"m17n\" package fromTetsuya HAYASHI <{\\field{\\*\\fldinst{HYPERLINK \"mailto:tetha@st.rim.or.jp\"}}{\\fldrslt tetha@st.rim.or.jp}}> so one can type Kanji characters.\\\n\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 3.6.1b7\t\t\t\\\nSqMacWindow.c\tFix for new rending code when used with 2.8 or earlier images, mouse clicks reported in wrong place\\\n\\\n3.6.1b6\\\nSqMacWindow.c\tEnable 8bit all modes of 8 bit rendering\\\n\\\n3.6.1b5\\\nSqMacWindow.c\tEnable 8bit support for 8->8 8->16 8->32 \\\n\\\n3.6.1b4\\\nSqMacWindow.c\tFix issues with title bar height calculation, was using the wrong window region to do this. Also failed \\\n\t\t\t\tfor full screen usage. Tinkered a bit with ioDisplay moving bytes, now do <=32 bytes directly. \\\n3.6.1b3\\\nSqMacWindow.c\tAlter logic to allow for 16->32 and 32->16 mapping using direct copy logic. Workaround for \\\n\t\t\t\tos-x 10.3.0 copybits bug. Released for limited testing. Awaiting real fix from Apple.\\\n\\\n3.6.1b2\\\nSqMacWindow.c\tAlter to use unix direct port bit copy versus copybits to get around a crash caused by a bug\\\n\t\t\t\tin os-x 10.3.0 copybits. Released for limited testing\\\n\\\n3.6.0b2\\\nBuild from about to be offical 3.6.0 VM, Balloon & VM Maker source.\\\nAdded in \\\nArraysToGlobalStruct-JMM.1.cs\\\n\t?3.7 Status unknown, but makes better interp.c interpreter loop code (silly optimizer).\\\nFasterCopyLoop-JMM.4.cs\\\nFasterCopyLoopPart2-JMM.2.cs\\\n\t?3.7 Status unknown, but makes drawing 20%+ faster due to better PowerPC code optimizations\\\nFasterLookupMethod-JMM.1.cs\\\n\t?3.7 Status unknown, but makes method lookup a bit faster. \\\nMakePrimPointXInternal-JMM.1.cs\\\n\t?3.7 Status unknown, but makes point x/y access faster.\\\n\\\nSlightlyFasterActivate-JMM.3.cs\\\n\tRolled into 3.7\\\n\\\nYou need 3.5.3b1 for Safari plugin support\\\n\\\n3.5.3b1  (browser plugin)\\\nFixed issues with IE drawing and crashs related to screen updating in non-thread safe IE.\\\n\\\n3.5.2b6\\\nFixed issues with plugin discovery for netscape plugin \\\n3.5.2b5\\\nFixed primitive dispatch to use gnuified jump table. \\\n\\\n3.5.2b4 \\\nFix issue with race on open doc events and squeak VM Thread for drag and drop support when starting squeak\\\nFor os-x expose primitivePluginBrowserReady, not the rest of the URL browser primitives, they don't work in Safari\\\nFor system attribute 1003 return powerpc versus PowerPC to match unix VM\\\nStart timers later in the VM startup logic, after reading the image, versus before.\\\nsqMacNSPlugin.c \t- Look for Squeak folder in User, local, Network, System domains versus just User.\\\nsqMacTime.c\t\t- Use old delay logic (1ms accurate), versus aioPoll (10ms accurate).\\\nsqMacUIEvents.c\t- Only create PowerManagerDefeatTimer tick routine if power manager tapping is required which is only os-9 anyways.\\\nsqMacUIMenuBar.c - Draw menu bar later in startup, after we change it, save 200+ms\\\nBitBltPlugin.c\t\t- alphaSourceBlendBits16  Use table lookup which is 90% faster\\\n\t\t\t\t- copyLoopNoSource, roll constants into register versus recalculating.\\\n\\\n3.5.2b2 \\\nFix applescript document handling logic to prevent overrunning the drag/drop logic via the command line open cmd by using a spin loop\\\nto ensure Squeak has sufficent time to read the file name. \\\n\\\n3.5.2b1 \\\nChanged the bitBlt copyloop logic to use locals in safe places, versus globals. This improves drawing by 5%.\\\nMajor change is usage of GCC 3.3, versus GCC 2.95.x This increases send/second by about 8%.\\\n\\\n\\\n3.5.1b5 Added some more user changeable attributes, and changed some window behaviour when floating\\\nOS-x Version only \\\nSqueakWindowHasTitle\t\t- (Yes/No) yes if window should get title.\\\nSqueakFloatingWindowGetsFocus (Yes/No) yes if window should allow click and type if floating.\\\nSqueakMaxHeapSize\t\t- (Number) set to 512K, max size for os-x memory heap. Note changing this to 1GB may or may not cause a \\\n\t\t\t\t\t\tcore dump depending on where os-x allocates the memory segment above or below the 2GB boundary. \\\n\\\nsqMacUIEvents.c\t\t\t- set keyboard focus to floating window if required, do not hide floating window when we go to full screen mode.\\\nsqMacWindows.c\t\t\t- watch out for memory leak when we free the color table. \\\n\\\n3.5.1b4 Please note the major changes to network code in 3.5.1b2\\\na)Added options SqueakWindowType & SqueakWIndowAttributes to info.plist. The SqueakWindowType of 6 is the standard document window, a type of 8 is the floating utility window. The attributes control with window attributes and behavior according to\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f2 \\cf4 \\ul \\ulc4 http://developer.apple.com/techpubs/macosx/Carbon/HumanInterfaceToolbox/WindowManager/Window_Manager/wind_mgr_ref/constant_2.html#//apple_ref/c/tdef/WindowAttributes\\\n&\\cf0 \\ulnone \\\n\\cf4 \\ul http://developer.apple.com/techpubs/macosx/Carbon/HumanInterfaceToolbox/WindowManager/Window_Manager/wind_mgr_ref/constant_1.html#//apple_ref/doc/c_ref/WindowClass\\cf0 \\ulnone \\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 b) Sockets are not valid if the network is not initialized. \\\nc) The os-9 vm can return the open file error in the vm attribute data 1202\\\nd) MyWindowEventMouseHandler was leaking region handles.\\\ne) Support for primitiveClosureValue, primitiveClosureValueWithArgs, primitiveExecuteMethod\\\nf) when rootTableCount  goes > 2400 then allocationCount gets allocationsBetweenGCs + 1 \\\ng) BitBlt Alpha Blending has changed\\\nh) Added primitiveWrite24BmpLine\\\ni) The guard if statement for primitiveSerialPortRead was flawed, noted the buffer overflow, but then proceeded, versus returning. \\\n\\\n3.5.1b3 \\\na) Fix, Stephane Ducasse <ducasse@iam.unibe.ch> pointed out that using a virtual desktop we had a crash in ioSetFullScreen. This \\\nwas due to a pthread race condition between the UI thread and interp.c. Fixed by using UI callback to handle fullscreen window/move/resize.\\\n\\\n3.5.1b2\\\na) Switch to aio.h logic and unix socket logic! This is a MAJOR change!!!!\\\n\\\nb) Call aioPoll  (select()) to cause process wait versus old pthread logic. This follows in the footsteps of the unix port. You should verify that \\\ncpu time when squeak is idle is not affected in a dreadful manner.\\\nc) Fix, if you call does this directory exists on a file now you will get an error which will signal that the directory does not exist. This ensures\\\nthe FileDirectory test suite works. \\\nd) Fix, if you quit the browser plugin, check the status of the pthread_cancel before attempting the pthread_join\\\n \\\n3.5.1b1 limited distribution\\\n\\\n3.5.0b4 \\\na) os-x exposed an issue with EToyPeerToPeer support. It seems under os-x we get the connect, data, close so fast on lans that by the \\\ntime we get around to asking for the remote IP address the connection is closed, and our open transport call fails. We change SqMacNetwork.c to \\\nreturn the IP address discovered at connect time in this case. Under os-9 we never saw this behavior because we suspect the network activity \\\nwas slower and more serialized. \\\n\\\n3.5.0b3 (Safari support)\\\n\\\na) The plugin logic was changed to support Safari and better support os-x. This required building a CFM stub to load the mach-o compiled\\\nNSPLugin. The mach-o plugin now uses a pthread for the interp.c loop. This gives much better performance and user UI feedback. \\\nb) The GC logic was carefully reworked to optimize the assembler on the ppc. This gave us upwards of a 30-50% improvement, since \\\nincremental GC is going on all the time, this change actually has a effect you can see say in the solitaire example where we save 10%. \\\nc) sqMacNetwork.c was modified, first change in many years. The remote address and port number are requested as an async operation. \\\nThe operation times out after a few milliseconds. This was never a problem in os-9. Now it seems there is an issue sometimes for DHCP clients\\\non os-x. There the operation can timeout and return 0 as the address or port. We changed the call to do a sync operation to avoid a timeout.\\\nd) sqMacMain.c was modified to allow for pthreads for mach-o netscape based squeakland plugin support\\\ne) sqMacMemory.c changes for mach-o plugin support\\\nf) sqMacTime.c changes for  mach-o plugin support\\\ng) sqMacUIEvents.c changes for mach-o plugin support\\\nh) sqMacWindow.c changes for mach-o plugin support \\\ni) npmac.cpp now this is a netscape glue routine, I changed it to ensure we can see the entry points, originally they are C++, but need \\\nto be \"C\" so the loader can find the names the CFM glue routine is looking for. Also we add the logic TV2FP to setup the mach-0 to CFM code stubs to allow the mach-o plugin to callback to the CFM stubs in Safari. \\\nj) sqMacNSPlugin.c \\\n\t1) Rearrange when the interpret() thread is started to ensure a race condition doesn't happen.\\\n\t2) use Pthreads for the mach-o osx version. \\\n\t3) rework NPP_SetWindow to start interpret() when needed. \\\n\t4) Alter StartDraw, EndDraw to use a mutex lock and handle os-x port locking to prevent races between pthreads.\\\n\t5) Alter ioShowDisplay, optimization and handle os-x\\\n\t6) fix ioSetFullScreen to make it work on Safari\\\n\t7) fix OpenFileReadOnly to make it work on os-x, needed sqFileNameFromStringOpen macro call\\\n\t8) Alter ExitCleanup to mutex lock to prevent race ending issues, and add a bit more cleanup\\\n\\\n\\\n\\\nNote some versions of 3.4.1 were distributed for testing only, these are superseded by 3.5.0\\\n\\\n3.4.0b2 (Croquet support)\\\n\\\na) Ensure vmVersion information reports correct information, was bogus in 3.4.0b1\\\n\\\n3.4.0b1 (Croquet support)\\\na) Added plugin BMPReadWriterPlugin 14 November 2002 (i)\\\nb) B3DAcceleratorPlugin.c gets primitiveCreateRendererFlags (new api)\\\nc) two more op codes get added to BitBltPlugin (fixAlphawith, pixClearwith)\\\nd) Squeak3D gets (b3dOrthoNormInverseMatrix, b3dTransformDirection,b3dTransformPoint,b3dTransposeMatrix)\\\ne) The scroll wheel mouse logic was using apple cmd key as the modifier on the arrow key events, Other platforms use the Control key. So the \\\nmac falls in line (changed to use the control-key)\\\n\\\n\\\nNotes About previous VM.\\\n3.2.6 VM classic have an issue when the tickcount clock goes over 0x7FFFFFFF, about 24 days. \\\nThis exhibits itself when Squeak won't accept user input, or allow you to switch under os 9 or earlier after 24 days,\\\nor starting a Squeak image hangs during the initial screen painting.\\\nRestarting the mac solved these problems. Force quitting Squeak does not.\\\nThis is fixed in 3.2.7b3\\\n\\\nSome issues with alias files and folder were fixed in 3.2.7b6 and 3.2.8b3\\\n\\\n3.2.8b9\\\na) recompiled os-x version, 3.2.8b8 seem to have a bad compiler option and gave 20% less performance.\\\n \\\n3.2.8b8\\\na) exposed \n\\f2 vmParameter\n\\f0  24 & 25 which control how memory is allocated/freed \\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f2 \\cf0 Smalltalk vmParameterAt: 24 put: 48*1024*1024.\\\nSmalltalk vmParameterAt: 25 put: 24*1024*1024.\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 b) Added argv,argc, env variables to main\\\nc) Fixed for Jaguar 10.2. Full screen mode cmd-tab broke menu bar hiding, this is a 10.2 bug\\\nd) Added support for IP_ADD/DROPMEMBERSHIP and the ability to bind to the wild card port (0).\\\ne) OpenGL changes for TEA\\\n\\\n3.2.8b7 was testing release and not distributed to the public.\\\n3.2.8b6 was testing release and not distributed to the public.\\\n3.2.8b5\\\na) Oops broke the logic returning the vmversion information in classic. Also incremented os-x version (which was fine) to keep numbers in sync\\\n\\\n3.2.8b3 The squeak.sourceforge.net CVS tree was reorganized and the project builder project revamped. The \\\nmajor change to the source was upgrading the netscape browser plugin to 3.2.7b6 levels.\\\n\\\na) Gnunifer.3.cs Changed to add register var on FOO_REG and to remove sqGnu.h file embedded in method.\\\nb) sqMacDirectory.c Add logic to handle case of building as CFM carbon plugin under CW6, needed some carbon calls\\\nc) osExports.c needed to ifdef out the getUIToLock entry point (not available as CFM carbon browser plugin)\\\nd) sqMacFileLogic.c Fix alias problem. Add logic to deal with path names as CFM carbon browser plugin, ensure vmPath is correct.\\\ne) sqMacImageIO.c Cast to get rid of warning message\\\nf) sqMacMain.c Cast to get rid of warning message, Check for CFM Carbon and bundle check. Revise vm parm 1201 code to return long file names are ok as CFM carbon browser plugin. Some diagnostic routines for printing to the console as CFM carbon browser plugin.\\\ng) sqMacMemory.c Logic change as CFM carbon browser plugin.\\\nh) sqNSPlugin.c\tFix to beginFullScreen logic (carbon call is broken?)\\\ni) sqMacUIEvents.c Remove getUIToLock dummy call. This entry point should only exist for mach-o carbon builds. Not CFM carbon browser plugins\\\nj) sqMacWindow.c  Use old call to create window when a CW 5 carbon application.\\\nk) sqPlatformSpecific.h Change #ifdef to correct logic error when building as CFM carbon browser plugin under CW 5.\\\n\t\\\n\t\\\n\\\nMay 31st, 2002 (3.2.7b6)\\\nFor 3.2.7\\\n\\\n3.2.7b3 We build the VM using patchs to enable globals as a structure. This improves performance by 10%\\\n\\\na) Classic Vm builders might need to add \"struct foo *foo = &fum; \"  to int interpret(void). \\\nb) readme: add notes about changesets and alter build instructions\\\nc) sqMacFileLogic.c: use accessors for interp.c globals\\\nd) sqMacMain.c: use accessors for interp.c globals. Also Alain Fischer added logic to fetch os-x version number and to enable you to put squeak.image in the resource folder for autostarting.\\\ne) sqMacTime.h: Fix busted lowresclock again. After 24 days of mac uptime, 3.2.6 squeak will hang.\\\nf) sqMacUIEvents.h: use accessors for interp.c globals.\\\ng) sqPlatformSpecific.h: alter sqFTruncate to use fileno() as needed.\\\nh) sqMacWindow.c: use accessors for interp.c globals.\\\ni)  3.2.7b5 sqMacFileLogic.c: change vmpath to resolve to classic VM if vm is moved from MacOSClassic folder\\\nj) Misc changes for Netscape plugin support\\\nk) Introduce osExports.c logic\\\nl) 3.2.7b6 Fixed a problem in path name resolving need to use UTF8 to properly interact with high ascii characters\\\nm) 3.2.7b6 Fixed a problem in path name resolving there was a bug with certain types of alias path name combinations in quick name resolving.\\\n\\\nMac VM 3.2.6 mach-o build for Carbon, and build for Classic.\\\nMarch 14th, 2002\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f3 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\nNotes About previous VM.\\\n3.2.6b6 Classic or earlier has a bug that makes it stop collecting user input on a 19.88 hour cycle depending on reboot time.\\\n\tSeems many systems don't run for more than 19 hours so we've not had major complains about this issue. \\\n\tBug was introduced in 3.2.1.\\\n3.2.5 has a bug that prevents the use of accented characters without \\\n\ta image patch to fix a VM issue (not an issue in 3.2.4). Also you can't enter an double keystroke characters, ie ^ \\\n\twhich makes life difficult. It also does not support the AppleScript Plugin (not an issue in 3.2.4)\\\n3.2.4 a bug in project builder introduced a performance problem (bad compiler options).\\\n\\\nSee the 3.2.5 about why this 3.2.6 is different inside.\\\n\\\nFor 3.2.6:\\\na) Change an internal number that dictates how often pending interrupts should be looked at from 5ms to 3ms This improves \\\ndelay accuracy.\\\nb) Change how sleeping is done when squeak is idle. This reduces CPU consumption, and improves Delay accuracy.\\\nc) Fix bug with high bit problem with keyboard (accented characters are ok now)\\\n  c2) 3.2.6b6 has fixed characters that require multiple key strokes to enter.\\\nd) Externals that make UI interactions (IE AppleScript) Must now make a call back to the VM to schedule\\\n    the main thread to do the call that will invoke UI interaction to prevent a deadlock in Carbon between threads. \\\n   See the OSAExecute call in the AppleScript plugin for details.\\\ne) If you run a classic mac VM more than 23.x days nonstop it will stop responding to UI events.  Ensure clocks get anded with 536870911.\\\nf) signal inputSemaphoreIndex because we are mulithreaded. Not that it does anything for us yet...\\\ng) 3.2.6b6 Pass the unicode value of the keystroke up as the EventKeyDown/EventKeyUp data, versus mackeyboard code.\\\nh) Somewhere there is a bug with mktime + time, so use the unix code of time+localtime+gmt \\\ni) Change iorelinquishPrcessorForMicroseconds to sleep the quatum between now and wakeup time. Also schedule a\\\n   check for interrupts if wakeup time is now or in the past. This improves delay accuracy. For OS-x this was a big deal,\\\n   for os-9 it improves things by 1 or 2ms. Also in  os-x we sleep more when idle so CPU usage goes down.\\\nj) On OS-9 umap AND free the VM backing store. Just doing the free doesn't work and you lose 128Mb of disk space until you reboot\\\nk) 3.2.6b7 for post event processing ignore mouse move/drag/or scroll wheel events. These are ignored by the open/gl plugin and only suck a major amount of CPU time to process in the post event processing logic. \\\nl) 3.2.6b8 (3.2.6b4 classic) removed call to uncouple shift keys introduced in 3.2.1. This causes some macs after sleeping not to respond to keyboard input\\\nm) 3.2.6b8 (3.2.5b7 classic) added function for ioLowResMSecs to avoid early bit overflow. Rework clock checking in ioHandleEvents to handle clock rollovers properly.\\\n\\\nMac VM 3.2.5 mach-o build for Carbon, and build for Classic.\\\nMarch 4th, 2002\\\nStill yet to do, in future versions.\\\nVerify that file delete rename etc works on aliases, not the targets.\\\n\\\nYou will need mach-o os-x bundle plugins to work with this VM. example -> \n\\f3 mpeg3Plugin.bundle.\\\nOld carbon non-bundled plugins will not work, but keep reading to understand where classic \\\nplugins still are needed.\\\n\n\\f0 \\\nPre OS-X users should read about OS-9 packages in the 3.2.4 change notes.\\\n\\\nBeware this version of the VM is significantly different inside! \\\n\\\n\\pard\\tx1440\\tx2880\\tx4320\\tx5760\\tx7200\\ql\\qnatural\n\n\\f2 \\cf0 a) Broke sqMacWindow.c into 10 different files by function type.\\\n\\\nb) Moved most of the memory allocation logic out of sqMacMain.c into sqMacMemory.c. and ensure memory is freed when Squeak is terminated. \\\nThe major change in this code is support for OS 9.x virtual memory mapping. This only applies to Mac OS 9.2.0 or higher, excluding os-x. It appears  Mac OS 9.1 has a bug that prevents this feature from working.\\\n\\\nFor images that require less than 128MB of memory, mapping is used to allow the image to grow/shrink to the 128MB boundary, therefore you can change the application memory size to about 2MB. \\\n\\\nFor images that require more than 128MB then change the application memory size to > 128MB and mapping will not occur. \\\n\\\nIf mapping is not available because virtual memory is turned off or the api is not supported by the macintosh OS then mapping is not used. Note that mapping is not support under the classic os-9.x environment under OS-X, however in this case you should be using the OS-X version of Squeak, not the classic version.\\\n\\\nc) Use of Carbon event logic for OS-X only. This is a major structural change. \\\n\\\nIt also encouraged the use of a pthread for interp.c. \\\n\\\nAll user interaction with the VM follows a new code path, so problems with keyboard or mouse input should be reported asap. Also any issues with application switching, windows being brought to the foreground or sent to the background and usage of the full screen logic should be reported asap.\\\n\\\nAs part of this change I have build in support for scroll-wheeled multi-button mice under os-x. Thanks to Doug Way for testing this for me. Maybe someone can post to the list what their favorite 3 button scroll wheeled mouse/trackball is.\\\n\\\nd) Use of a carbon call to get the dominate Device if you have multiple screens. People with multiple screens should confirm window resizing, full screen on/off works as expected.\\\n\\\ne) Corrected comment in sqMacFileLogic.c\\\n\\\nf) Changes to sqMacNSPlugin.c. This makes it compile, but it's not usable yet.\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 \\\n\\\nFeb 20th 2002 3.2.4\\\n\\\nFor this version of the VM I have migrated towards using OS-9 packages. This allows us to provide one \\\nfolder/package that supports os-x and previous operating system versions.\\\n\\\nGiven Squeak 3.2.4Beta1.app\\\nThe classic VM is found in the *.app:Contents:MacOSClassic, with an alias in *.app:\\\nThe mach-o OS-X VM is found in *.app.Contents:MacOS\\\n\\\nIf you are running OS-9 then clicking on the *.app or doing drag and drop will just run Squeak, same applies for OS-X.\\\nIf you are running OS-7.5.5 or OS-8.x then the *.app package will appear as a folder, just open and click on the alias within. \\\nNote that if you want to use classic plugins I suspect you need to put them in the MacOSClassic Folder beside the VM. \\\nBundles for os-x go in the same location as the *.app application package.\\\n\\\nChanges\\\na) Drag and drop at open time with image file that has no meta type, will now open the image, versus prompting you.\\\nb) Use an os-x window attribute at open time to signal that the window should not be moved by the dock when you go to full screen.\\\nc) Fix window update logic to use window that needs updating versus stwindowg to fix issues with print dialog windows in classic. \\\nd) bitblt gets recompile to pickup fixes posted in 3.2 update stream.\\\n\\\nFeb 5th 2002 3.2.3\\\nChanges\\\n\\\na) use old extended time manger to update psudeo-TickCount, versus sigalrm. siglarm make sound recording not work.\\\nb) fiddle with sound recording and make it work.\\\n\\\nJan 2002 3.2.2\\\nChanges:\\\n\\\na) AsyncFilePlugin.c Use global to remember security function entry point for performance reasons\\\nb) FilePlugin.c\tUse global to remember security function entry point for performance reasons\\\nc) interp.c Use squeakFileOffsetType versus off_t and add a bunch of checks to handle lack of long long and conversion errors between 64/32 bit integers and LargeInteger objects\\\nd) readme, it's http://www.mucow.com/Gnuifier.1.cs \\\ne) SocketPlugin.c\tUse global to remember security function entry point for performance reasons\\\nf) sq.h added default sqFilenameFromStringOpen and sqTruncate\\\ng) sqFilePluginBasicPrims.c revert to anti specs, but ensure #def to fseeko and ftello for 64 bit aware file systems.\\\nh) sqMacDirectory.c A bit more error checking on bad file names\\\ni) sqMacFileLogic.c Folders size is now zero in classic, and a bit more checking on bad file names\\\nj) sqMacSound.c Fixed a problem with sound recording in classic due to a change made in Sept. But sound recording still does not work under os-x\\\nk) sqMacWindow.c  two very important changes:\\\n\\\n\t1) You can now do FFI calls with the FFI bundle plugin to Mach-o frameworks. \\\n\tHowever you need to rework your api calls. For example:\\\n\tapiGetMousePoint: aMacPoint was\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'InterfaceLib'>\\\n\tIt now is:\\\n\t<apicall: void 'GetMouse' (MacPoint*) module:'Carbon.framework'>\\\n \t\\\n\tIf you review /System/Library/Frameworks I'm sure you can come up with interesting ways to \\\n\tmake mac only squeak images.\\\n\t\\\n\tI now use map( NULL, gMaxHeapSize, PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED,-1,0);\\\n\tanonymous memory mapping to 512MB as the squeak memory block. The VM can then grow or shrink\\\n\twithin the 512MB block, I just move a pointer. \\\n\t\\\n\tNote in 3.2.1 a slight error on my part restricted Squeak to 50MB. I am of course\\\n\tinterested to hear about issues with my choice of 512MB. Note a Squeak VM is limited to 2GB under perfect \\\n\tconditions, however if any part of the image crosses the 2GB boundary the VM will fail, right now 512MB\\\n\tseemed a safe choice.\\\n\t\\\n \tPhysMem:  60.2M wired, 78.6M active,  412M inactive,  551M used,  217M free\\\n\tVM: 3.03G + 55.3M   7847(0) pageins, 1(0) pageouts   \\\n\tPID COMMAND      %CPU   TIME   #TH #PRTS #DREGS RPRVT  RSHRD  RSIZE  VSIZE\\\n\t422 Squeak VM    0.8%  0:35.59   2    71   100  23.3M  8.53M  26.5M   571M\\\n\\\n\tbut I only have one 80,000,000 byte swap file in /var/vm\\\n\\\nNote if you turn crash reporter on, then if the VM crashes a nice report should be generated in your log directory.  See the Apple documentation for a description of this feature, currently it is set in OS-X 10.1.x via the preferences window for the Console Application. If you have a crash with this VM, please recreate and post the crash log (found in Users/foobar/Library/Logs/ to the Squeak mailing list so we can continue to make the VM fault tolerant.\\\n\\\n3.2.1 Notes\\\n\\\nYou might need these change sets to build a new VM or to use all the features of this VM with your image, hopefully these will get into the pending 3.2.x image.\\\n\\\nFixes and feature extensions.\\\nAsyncFileFixFu...hName-JMM.1.cs \tfix for async test method.\\\nDragAndDropAtStart-JMM.5.cs\t\tfix to enable drag and drop at startup\\\n\\\nNeeded to compile a VM with VMMaker\\\nLargeFiles-JMM.3.cs\t\t\t\tEnable large file support, files > 2GB\\\n\\\nNeeded to turn this feature on\\\nMacLongFileName-JMM.5.cs\t\t\tEnable long file names on the mac\\\n\\\nThe SUnit\\\nMacLongFileNamesSUnits-JMM.3.cs\tTest long file names and long directory names and large file support\\\n\\\nKinda optional features some people might need.\\\nInternetConfiguration-JMM.5.cs\t\tAllow internet configuration information access, internal plugin\\\nUUID-JMM.3.cs\t\t\t\t\tAllow UUID generation, internal plugin\\\n\\\na) The ability to get back a UUID. This uses the hosting UUID generator if the\\\n hosting OS supports it and we have a primitive we can call. If not then we generate\\\n a type 4 version of a UUID (the random bits one).\\\n(This requires a special change set)\\\n\\\nb) Ability to start squeak on the mac by dragging multiple documents onto the\\\nimage, or drag and drop of stuff onto the running VM icon.\\\n(This requires a special change set)\\\n\\\nc) Usage of the Internet Configuration tool kit to supply information about\\\nwhat the mac proxy is etc. etc.\\\n(This requires a special change set)\\\n\\\nd) Migrate file system to use 64 bits. This allows you to read/write and seek\\\nwith files > 2 GB. This includes a change to the VM to convert from/to long\\\nlong integers. It also allows the file system to actually deal with 2GB files,\\\nthe current file interface actually fails once the file exceeds 1GB.\\\n\\\ne) For the carbon based Squeak VM we now support long file names 255\\\ncharacters. Close both eyes and touch everywhere the mac VM deals with file\\\nname paths and hope for the best (Actually we write an Sunit to ensure we've\\\nnot broken everything). This also includes the ability to put an image in a\\\nlong file name directory, but right now the image name must stay under 32 characters.\\\n\\\nFilePlugin.c changes to support large integers.\\\nFilePlugin.h changes\\\nsq.h changes to support large files.\\\nsqConfig.h changes to resolve some conflicts.\\\nsqFilePluginBasicPrims.c  changes to support large files.\\\nsqMacAsyncFilePrims.c changes to use fspec versus 255 file path.\\\nsqMacDirectory.c changes to use hosting OS (OS-X) bsd create and delete directory\\\n and truncate. dir_look changes as part of the general rewrite.\\\nsqMacDragAndDrop.c use new call to get path name from fsspec. Use fsspec more, and added \\\n  interface code to setup drag and drop of items at application startup time. max document name\\\n  goes to 1000 characters.\\\nsqMacFileLogic.c Mostly rewrote!\\\nsqMacSecurity.c use new file calls.\\\nsqMacWindow.c \\\n\tincrease size of vmpath, docpath, imagepath to 1000 chars, shortname to 255 characters.\\\n\tadd logic for left/right modifier keys \\\n\treworked LoadLibViaPath logic \\\n\tsqImageFileOpen uses fsspec versus 255 path name.\\\n\tsqImageFileStartLocation uses ffspec.\\\n\tbundle support for bundles\\\n\t\\\ne2) interp.c supports get/put of large integers to long long integers.\\\ne3) fixed fTruncate\\\n\\\nHint getting this to work was a pain. Think of 255 character folder names and nested aliases,\\\nfolder 1 refers to folder 2 which then refers to folder 1 again, just go down the path say 8 times,\\\nthen ask to create a file or directory!\\\n\\\nf) Support to change the Mac screen resolution under Squeak control.\\\n\\\ng) Fix to unload/load the scrap at startup time to ensure the clipboard is\\\ncorrect when starting up the VM.\\\n\\\nh) Uncouple the shift key and left/right shift keys on old extended keyboard.\\\nAlso add a call to get which keys are currently pressed on a USB keyboard or\\\nthe USB codes for an apple non-usb keyboard. (Note this isn't working quite yet under OS-X)\\\n\\\ni) Changes to enable us to compile the VM under Apple's OS-X Project Builder\\\nenvironments.\\\n\\\nj) Some rewriting to ensure serial and midi support can be written as external\\\nplugins.\\\n\\\nk) Fiddling to get sound input to work under OS-X\\\n\\\nl) Platform.exports changed macintosh to macintoshSqueak to avoid conflict.\\\n\\\nm) Memory is allocated at 50MB at start, then will grow or shrink, verus previous carbon apps\\\n that did 1GB. \\\n \\\nn) sqPlatformSpecific.h changes to support long file names and os-x posix file names\\\n\\\no) sqVirtualmachine.c & sqVirtualmachine.h\\\n#if VM_PROXY_MINOR > 4\\\n\tVM->positive64BitIntegerFor = positive64BitIntegerFor;\\\n\tVM->positive64BitValueOf = positive64BitValueOf;\\\n\tVM->signed64BitIntegerFor = signed64BitIntegerFor;\\\n\tVM->signed64BitValueOf = signed64BitValueOf;\\\n#endif\\\n\\\nBeware this causes an interesting problem, if you compile plugins with VM_PROXY_MINOR now set to 5, then they will not work with older VMs. The solution is to define the VM_PROXY_MINOR in the plugin to the value that indicates what features it is using.\\\n\\\np) Changed to use ITimer logic as a 16ms lowres timer to improve performance\\\n\\\nq) Changed to use single thread, no thread manager.\\\n\\\nr) Changed to use lowres timer in checking for polling time to improve performance\\\n\\\ns) It should have faster startup times.\\\n\\\nt) It will hide the empty window at startup, then show the squeak window when required.\\\n\\\nu) It has a different menu structure.\\\n\\\nv) It does less I/O when navigating directories.\\\n\\\nThe macintosh 3.1Alpha1MT VM, Sept 24th 2001 \\\nThis VM was built with the base  3.1 image at change set #4347\\\nV3.1.1 at change set #4347\\\n\\\n\\\nWe go to V3.1.1 to indicate that the 3.1 VM is being used. In the past the 3.1 Image was used but some changes in the openGL logic makes  3.1 Vm and 3.0 image not quite work correctly with 3d graphics. Although a 3.1 VM will run many images way back to the 2x series no careful study has been done on the ability to do this. So at this point we are indicating this VM is a 3.1 VM and best used with a 3.1 image.\\\n\\\nUse of VMMaker to build VM. As of this version everything can be built as an external except for the window logic which hasn't been decoupled from the VM support for the macintosh. \\\n\\\n1) AsynchFilePlugin the security check for ability to create file is now a plugin call.\\\n2) B2DPlugin logic changes to fillLinearGradientfromtoat\\\n3) b3dRemapFaces, b3dRemapEdges, b3dRemapEdgeList, b3dRemapAET, b3dRemapEdgeVertices, b3dRemapFaceVertices, b3dRemapFaceFree, b3dRemapEdgeFree, b3dRemapAttributes. Some casting and changing of += to = + to make some compilers happy.\\\n4) BitBltPlugin added tableLookupat call.\\\n5) DropPlugin added setFileAccessCallback to allow the Security Module plugin the ability to give us the entry point to turn security off so we can open files as read only when security is turned on.  This was broken in the past. \\\n 6) FilePlugin added fileOpennamesizewrite,getThisSession to allow for callbacks. Changed the file security logic to use the plugin interface. \\\n7) interp.c, fixes for 4347ByteArrayRangeCheck-di, ability to printAllStacks, security calls for image rename, write to use plugin interface.\\\n8) Added GetAttributeString, and recordDragDropEvent and entry points for callbacks.\\\n9) SecurityPlugin changed when initialization is called to initialize the safe and unsafe directorys, also added entry points for all the testing calls so it can be a true plugin.\\\n10) Serialplugin. The serial plugin was redesigned to seperate out MIDI logic. People with MIDI devices and old serial macintosh should check to see if they still work since we lack equipment now to test this obsolete technology set.\\\n11) SocketPlugin. Make security calls true plugin calls.\\\n12 SoundGenerationPlugin. Removed \\\nEXPORT(int) SoundGenerationPlugin_primitiveFMSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveOldSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitivePluckedSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveSampledSoundMix(void);\\\nEXPORT(int) SoundGenerationPlugin_primitiveWaveTableSoundMix(void);\\\nThey were a hack at the plugin level and discussion on the list seemed to show they were no longer used. \\\n13) Checking for if defined (__APPLE__) && defined(__MACH__) for the Mac OS-X native development environment\\\n14) Changed sqMacAsyncFilePrims, usage of interpreterProxy->, plugin calls for getThisSession. \\\n15) Changed sqMacDirectory.c. Removed some utility code and make it a seperate file so that it can be shared between sqMacWindow and other plugins that require them. \\\n16) Changed sqMacDragDrop.c. Added plugin callback for getSTWindow, the sqSetFileAccessCallback logic, fileOpennamesizewrite, and secHasFileAccess. Added logic to do the recordDragDropEvent callback to sqMacWindow.c \\\n17) sqMacNetwork.c. Some cleanup for the OS-X version of the OpenTransport headers, some constants have name changes\\\n18) sqMacNSPlugin.c Use of ioLoadFunctionFrom(NULL, \"DropPlugin\"); versus explicit call.\\\n19) sqMacOpenGL.c. Some cleanup for the OS-X version of the OpenGL headers\\\n20) sqMacOpenGLInfo.c. Some cleanup for the OS-X version of the OpenGL headers\\\n21) sqMacSecurity.c ioInitSecurity calls back to dragAndDrop plugin to set entry point to turn security off.  Added code to create directories if required and ensured callbacks are plugitized.\\\n22) sqMacSound.c Some cleanup for the OS-X version of the Sound headers. Use of interpreterProxy-> in the proper places.\\\n23) sqMacWindow.c Some cleanup for the OS-X version of the compiler.  Fixed saveAsEmbeddedImage, this got broken when we moved from a FAT to a ppc only application.  Altered interface to recordDragDropEvent so that it was plugable. Some file path name logic goes to a seperate C source file. The drag and drop plugin is loaded and intialized after the image is loaded but before the interpreter is started, before it was done a bit earlier in the startup process. This also has the effect of initializing the security module.\\\n24)sqOpenGLRenderer.c. Some cleanup for the OS-X version of the OpenGL headers\\\n25)SurfacePlugin.c gets a hack so it knows when it is internal versus external.\\\n\\\n\\\n\\\nv3.0.18 at change set #4081\\\n(Note browser plugin goes to 3.0.23\\\n\\\n1) sqMacOpenGL.c Quite a few changes were made to the code to support it as an internal plugin for the browser. This is because the drawable frame for a browser plugin is a subset of the browser's grafport, so lots more care must be taken to draw in the correct location using OpenGL. We also fixed issues with re-configurating the Open/GL draw area when the window gets resized or goes to full screen, and attempted to ensure multiple screens will work.\\\n\\\n2) sqMacWindow.c, minor fix to cast a constant char * to char * for CW 6.1\\\n\\\n\\\nBrowser plugin 3.0.23 fixes\\\n\\\n1) Integerated the H/W Acceleration as an builtin plugin\\\n2) Added logic for pre and post event interaction to browser plugin event handler for H/W Acceleration logic. The external H/W Acceleration plugin mostly works with the browser plugin but doesn't work with full screen mode, or if the plugin is embedded in a window or a scrollable frame, so don't use it. Use the browser plugin 3.0.23 or higher which has the H/W Acceleration builtin.\\\n\\\nv3.0.17 at change set #4081\\\n(Note browser plugin goes to 3.0.21)\\\n\\\n1) Added HW acceleration as internal plugin.\\\n2) 4079BBAlphaTextFix-ar Fixes the problem with alpha text, changes BitBltPlugin.c \\\n3) Added primitive on the mac to truncate a file.\\\n4) Added logic to flush volume on a flush file to ensure file and control blocks are flushed.\\\n5) For the Carbon VM we increase nextevent wait time if we get sufficent idle time. This should reduce CPU usage under OS-X\\\n6) GetAttribute: 1002 now returns the gestaltSystemVersion as a hex string, and getAttribute: 1003 now returns either '68K' or 'PowerPC'.\\\n7) Starting with 3.0.17 the VM is build only as a powerpc application. The latest VM as a 68K application will be made available from time to time permits based on people's needs. \\\n8) Changes to sqOpenGLRenderer.c to improve performance, OpenGL 1.1 support.\\\n\\\nPlugin 3.0.21 fixes\\\n\\\n1) added check for mailto: tag on posts to fix problem with Netscape crashing, and IE hanging.\\\n2) Plus above fixes.\\\n\\\nWhat has been fixed/changed.\\\nv3.0.16 at change set #4041\\\n(Note browser plugin goes to 3.0.20)\\\n\\\n1) Lots of fixes for BitBlt and HW acceleration.\\\n2) Hardware Acceleration plugin goes to 1.0.1. Please note there is a seperate plugin with the same name for Carbon. Doing a get info will identify if the plugin is only usable with Carbon Squeak.\\\n\\\nv3.0.15 at change set #4026 (May 17th test version)\\\n(Note browser plugin goes to 3.0.19)\\\n\\\n1) Added support for OpenGL HW acceleration plugin\\\n\\\nPlugin 3.0.19 fixes\\\n\\\na) Obey embedded tag plug\\\nb) Fix problem with plugin 3.0.17 not working with netscape 4.x\\\nc) Carbonize plugin for IE 5.1 \\\nd) Remove debugging printf than occurred on transition to full screen mode\\\n\\\nWhat has been fixed/changed.\\\nv3.0.14 at change set #3987\\\n\\\n(Note plugin goes to 3.0.17)\\\n\\\n1) sqMacDirectory.c. The pathlookup would handle the case of foo:bar::do incorrectly by ignoring the :: path redirection. This has been fixed. However a path lookup will not work if it contains :: and an aliased directory in the middle of the path.\\\n\\\n2) sqMacSecurity.c. The pathname for the untrustedUserDirectory was built incorrectly, and the bug mentioned above in sqMacDirectory.c usually kept this from being noticed.\\\n\\\n3) sqMacWindow.c  we added some logic to do the delay for primitiveRelinquishProcessor, but found it had an large effect on a freecell benchmark. I suspect on a Morpic step wait there is nothing to do so primitiveRelinquishProcessor gets called which then affects response time. So for now we revert to the 3.0.11 behavior, good performance and 100% CPU usage!\\\n\\\n4) GetAttribute 1004 returns returns interpreterVersion; which is for example\\\n\"Squeak3.1alpha of 6 February 2001 [latest update: #3987]\"\\\n\\\n5) When in full screen mode we now attempt to disable resizing, zooming, or moving the window. The window borders are hidden, but in the past it was feasible to grab an edge and alter it, thus confusing the VM.\\\n\\\n6) Worked on Carbonizing the browser plugin\\\n\\\n7) 3977 & 3978 FloatArray fixes. Makes float arrays go through a new (and working) version of #primitiveHash\\\n\\\n8) Fixed problem with accidental mouse clicks being triggered from pulldown menus on application switching.\\\n\\\n9)\\\n\"Change Set:\t\t3984 BitBltExtensions-ar\\\nDate:\t\t\t4 May 2001\\\nAuthor:\t\t\tAndreas Raab\\\n\\\nThe change set includes various extensions for BitBlt with the goal of migrating the useful features from FXBlt into the general BitBlt mechanisms. These include:\\\n\\\n* Handling of LSB and MSB forms:\\\nBitBlt now handles both, MSB and LSB forms (and their conversions). Only instances of Bitmap are assumed to contain big-endian pixels. All others are assumed to be little endian (reason is that we can only identify Bitmap here). Note that 'LSB' and 'MSB' refers to PIXELS, that is a 1bpp LSB form has its left most pixel in the lowest bit whereas a 1bpp MSB form has its left-most pixel in the highest bit.\\\n\\\nFor pixel depths < 8 this can be different from what your OS supplies (as an example, Windows bitmaps < 8 are big-endian pixels in little-endian words; we might call them 'middle-endian'). We simply don't deal with those - forms are either big or little endian but nothing inbetween.\\\n\\\nBitBlt has got an extra combination rule for swapping pixels in the destination form. This can be used to make byte swapping much more efficient (as soon as we've got more VMs with support for it).\\\n\\\n* Handling of 'native bitmaps' (aka surfaces):\\\nBitBlt is now able to deal with OS surfaces that are registered with the surface plugin.\\\n\\\n* Handling of full color maps:\\\nBitBlt has been extended to deal with instances of ColorMap in addition to the prior mechanism of using only indexed lookups and provide an implicit 16-32 bit color conversion. ColorMaps can specify both, a lookup table and an additional set of masks and shifts to apply during the color mapping operation. \\\n\\\nFour independent shifts and masks can be given which can be used for a lot more than just color conversion (as an example, one could do byte swapping with this; but see also BitBlt class>>exampleColorMap). \\\n\\\n* Better handling of default arguments:\\\nFor most of the required arguments for BitBlt very reasonable default assumptions can be made. This includes the destOrigin (0@0), clipRect (0@0 extent: destForm extent), sourceOrigin (0@0). BitBlt now substitutes these if they are absent (e.g., nil) in the instance provided.\\\n\\\n\"\\\n\\\n\\\nv3.0.13 at change set #3848\\\n\\\n1) sqMacSecurity was changed to set the unsecure directory to\\\n\tsystem folder:Preferences:Squeak:Internet:My Squeak\\\n\\\nv3.0.12 at change set #3848\\\n1) Fixed problem with creating My Squeak Folder in Documents Folder with System 8.6\\\n\\\nWhat has been fixed/changed.\\\nv3.0.11 at change set #3848\\\n\\\n1) sqMacDirectory had a bug when you resolved a path name. The fast resolve always failed, which invoked the slow resolver. Now the fast resolver works.\\\n\\\n2) sqMacSecurity was changed to set the unsecure directory to Documents:My Squeak. \\\n\\\n3) sqMacWindow was changed to fix some issues with Squeak capturing events from other applications and to reduce the number of duplicate mouse events that are generated. Also we capture modifier information  directly from the mouse and keyboard on null events to fix some problems with Carbon. We  hopefully fixed problems with mouse clicks from foreground applications being seen by Squeak and issues with the OS-X Dock clicks.\\\n\\\n4) sqMacNSPlugin was changed to use the above mouse/keyboard capture code which is much cleaner than the original fix for the bogus modifier information given to us by netscape on a null event. \\\n\\\n5) When you turn full screen off we now correctly reposition the window to the original location versus a few pixels to the left. \\\n\\\nWhat has been fixed/changed.\\\nv3.0.10 at change set #3848\\\n\\\n1) changed VM exception unwind logic\\\n\t3796-Exception-unwind-V3,tim@sumeru.stanford.edu, Paul McDonough, Stephen Pair and others\\\n\\\n2) Fixes for the JPEGReader plugin and for Jitter 3\\\n\\\n3) Added minimal Mac VM logic to assist in building a small VM.\\\n\\\n4) Changed how the browser plugin starts up. Now it starts the interpreter running only after getting the browser setwindow command. This seems to fix a race condition that resulted in a crash at startup time with Netscape 4.x\\\n\\\n5) Fixed broken full screen redraw on cmd-tab\\\n\\\n6) Fixed what looked like mouse-down, mouse-down, mouse-up sequence. Now reports mouse-down, mouse up.\\\n\\\n7) Added StarSqueak plugin as internal plugin\\\n\\\n8) Note the current Squeak Plugin should be gotten from the www.squeakland.org site.\\\n\\\nv3.0.9 at change set #3776, Boston Snow storm build.\\\n\\\n1) A number of changes were made to the interpreter:\\\n\ta) added primitive to change a class.\\\n\tb) added primitives to get or put 32bit integers\\\n\tc) Fix problem with GC and class reshaping\\\n\td) Better logic for method cache flushing\\\n\\\n2) Added JPEGReader plugin\\\n\\\n\\\nV3.0.8 at change set #3740\\\n\\\n1) The caps lock no longer maps to the shift attribute. So if the caps lock is down mouse clicks will behave normally. \\\n\\\n2) Numerous fixes for the BitBltPlugin plugin\\\n\\\n3) Memory allocation grow/shrink logic for Carbon was added.\\\n\\\n4) Spurious mouse clicks for the browser plugin has been fixed. (This took awhile to fix, I'm sure it's a bug with the Swedish version of Netscape)\\\n\\\n5) The browser plugin will attempt first to allocate memory from the browser heap, then the system heap. Most people when faced with a memory issue usually increase memory for the browser first. However memory for the plugin is controlled by an attribute in the EMBED HTML statement. \\\n\\\nV3.0.7\\\n\\\n1) A bug exists in pre OS 8.x that causes a crash in activate window if the standard get file \\\ndialog comes up before the Squeak Window. I remove the InvalWindow call found in that routine since it is actually redundant.\\\n\\\n2) The standard get file dialog on system 7.x would not terminate if you did a cancel.\\\n\\\n3) The InterfaceLib had to be weak linked to prevent CFM startup issues. \\\n\\\nV3.0.6\\\n\\\n1) Alias resolving is less aggressive.\\\n\\\n2) We no longer cache image reads or writes. This was done because OS 9.1 allows you to have very large disk caches, and it's pointless to cache the image read or write.\\\n\\\n3) The file flush primitive now actually flushes the file via an OS call. This was a bug in the CodeWarrior 5.3 source code.\\\n\\\n4) The 68K version was being built with the 68881 math library. This fails on 68040LC chips. We now use the non-68881 math library. Thanks to Bruce ONeel for find this.\\\n\\\n5) A bug was found in the path resolving logic that was added for 3.x. This bug apparently only affects 68K machines,  never was identified as a PowerPC issue. \\\n\\\n6) The Netscape plugin needs a properly allocated clip region, this code seemed to work ok on new systems, but fails on system 7.6.1\\\n\\\n7) The security interface will create a Documents folder on the root volume if the default Document folder has been deleted. This is needed for security purposes. \\\n\\\n8) Jitter needs 1MB of free memory to run.\\\n\\\n9) 68K machines require another 32K of stack\\\n\\\n10) Threads  now work on 68K machines, but turned off because of possible performance issues. (I think more study is needed).\\\n\\\n11) The 68K version was compiled with better optimization, expect a 15% improvement.\\\n\\\n12) fix for BitBltPlugin ascii = byteAt((sourcePtr + charIndex) - 1);\\\n\\\n13) The interpreter object validation checking code was alter to work correctly.\\\n\\\nV3.0.5\\\n\\\n1) sqConfig.h changed due to BE OS header changes\\\n\\\n2) sqMacDirectory.c. Added support for Navigation services or Standard File Get to find the image at startup time when the Squeak.image is not found by the VM. This replaces the DOS like console message that comes up saying that Squeak can't find a image.\\\n\\\n3) A fix to drag and drop for the browser plugin.\\\n\\\n4) We now use Apple's cooperative multithreading package to run the UI in one thread, the VM in the other. This solves some issues with the browser and makes the UI versus VM logic and execution responsibilities easier to understand. \\\n\\\n5) Changed the sqMacNSPlugin.c code to support a 3.0VM using multithreading support. This should give Squeak in a browser better performance. Also changed the full screen support to correctly work with multiple monitors.\\\n\\\n6) BitBltPlugin.c gets one more op code\\\n\\\n7) Added the security interface\\\n\\\n8) Added the file flush primitive\\\n\\\n9) Rewrote the macintosh readme file\\\n\\\n10) Revisited the zoomWindow code and found a bug with multiple monitor support, then I fixed the code to make Full Screen mode work on screen that Squeak window is mostly on, versus the menubar screen. Also if you switch from full screen back it resizes the window back to the orginal size and location before you invoked the full screen. \\\n\\\nV3.0.2\\\nPlugins\\\n\\\nRecompiled the internal BitBltPlugin plugin to encorporate:\\\nChange Set:\t\t258AlphaBlendOpt-dsm\\\nAuthor:\t\t\tDuane Maxwell, Paul Phillips/exobox\\\na) Short circuits full opaque and full transparent pixels when alpha blending.\\\n\\\nRecompiled the internal LargeIntegerPlugin\\\n3298LargeIntegersV1-2-sr -- Stephan Rudlof -- 29 November 2000\\\n3299LargeIntV1-2For29-sr -- Stephan Rudlof -- 29 November 2000\\\n\\\nVM Software\\\n\\\n(b) PowerManagement for macintosh is now supported. You can disable the power manager to give you better performance on some powerbooks at the expense of battery life. See the Preferences Panel for details, category 'Performance'\\\n- changed sq.h\\\n- changed sqMacWindow.c to add support for power mgr disabling\\\n\\\n(c) Drag and Drop support for the macintosh, dragging files from the Finder to the Squeak window is now supported.\\\n- sqMacDragDrop.c added\\\n- sqMacWindow.c changed\\\n\\\n(d) Added primitive for get macintosh creator and file type.\\\n- sqMacDirectory.c changed\\\n\\\n(e) Carbon support. Thanks to Karl Goiser karl@wattle.net for work he did on sound and other Carbonization hotspots.\\\n- sqMacAsyncFilePrims.c changed\\\n- sqMacFFIPPC.c changed (not supported for Carbon)\\\n- sqMacNetwork.c changed per Apple tech note 1173 Carbon asset tracking\\\n-sqMacSerialAndMIDIPort.c chnaged (Not supported for Carbon)\\\n- sqMacSound.c changed per Apple tech note 1198 Carbon double sound buffer playing\\\n- sqMacWindow.c changed (various changes for Carbon)\\\n\\\n(f)  Poll at least 60 times a second for the mouse if required. Previous 2.9.x VM did it 30 times but this is too slow and 2.8.x VM do it 60 times a second.\\\n\\\n(g) Reworked path support Thanks to Karl Goiser karl@wattle.net for starting this.\\\n- sqmacDirectory.c changed reworked lookupPath\\\n- sqMacWindow.c changed, added GetApplicationDirectory to get application directory\\\n\\\n(h) I rewrote the sqMacDirectory.c logic to enable proper understanding of Apple's Alias logic. This means for example you can alias the \"SqueakV3.sources\" file and then only have one copy and have all your images point to it. \\\n\\\n(i) Added Zoom Window support.\\\n\\\n(j) Change the Squeak change file icon to better match Apple's visual guidelines, Thanks to Doug Way for the suggestion and the new icons.\\\n\\\n(k) The sound plugins have changed...\\\n\\\n(j) Dropped FFI out of the base Squeak because of security concerns\\\n\\\n(k) Compiled for 750(G3) processor versus 603\\\n\\\n(l) Added screenDepth primitive\\\n\\\nThe 3.0.x VM contains most of the optional plugins, you might want to check this by inspecting \"Smalltalk listBuiltinModules\" to see where your plugins are coming from. In some case people have been accidentally overriding the new builtin plugins with older plugins. \\\n\\\nThe file \"Squeak 3.0Alpha10MT.sig\" contains the PGP signature for the Squeak 3.0Alpha10MT VM\\\n\\\nJohn M McIntosh  johnmci@smalltalkconsulting.com\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n\\\n}"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Documentation/4.x.x Release Notes.rtf",
    "content": "{\\rtf1\\ansi\\ansicpg1252\\cocoartf1038\\cocoasubrtf320\n{\\fonttbl\\f0\\fnil\\fcharset0 Geneva;\\f1\\fswiss\\fcharset0 Helvetica;}\n{\\colortbl;\\red255\\green255\\blue255;\\red0\\green116\\blue0;}\n\\margl1440\\margr1440\\vieww13080\\viewh12220\\viewkind0\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0\\fs24 \\cf0 Mac VM 4.2.5b1 mach-o build for Carbon with Closures and UTF-8 plus 32bit clean.\\\n\\\nSupport for Croquet, support for Safari, support for TK4/Sophie, support for Multiple Windows/Ffenestri, full GC instrumentation, configurable quartz flush drawing, MacIntel Machines, mappable mouse buttons, Safari and Firefox browser support, with Closure support\\\n\\\nMar 2nd 2009 (4.0.0b1)\\\nApr 9th, 2009 (4.0.1b1)\\\nApr 21st, 2009 (4.1.0b1)\\\nMay 7th, 2009 (4.1.1b2)\\\nAug 20th, 2009 (4.2.1b1)\\\nSept 17th, 2009 (4.2.2b1)\\\nMar 13th, 2010 (4.2.3b1)\\\nMar\t29th 2010 (4.2.4b1)\\\nJun\t15th 2010 (4.2.5b1)\\\n\\\n\\\nStill yet to do, in future versions -> Verify that file delete rename etc works on aliases, not the targets. (Yawn, someday)\\\n4.2.5b1\t\t\n\\f1 We update to VMMaker-jcg.182, and we make a new FFI plugin using the latest FFI code base (1.7.0) which includes Josh Gargus changes for FFI\\'a0ExternalForms to support the\\'a0OpenCL code.\\\n\n\\f0 \\\n\\\n4.2.4b1\t\tWe update to VMMaker 166 \\\n\t\t\timageFormatBackwardCompatibilityVersion\\\n\t\t\tuti clock \\\n\t\t\tWe fix sound record buffer crash after vmmaker 163\\\n\t\t\t\\\n4.2.3b1  \t\tWe update to VMMaker 160\\\n\\\n\t\t\tReference Mantis 7405: Array new: SmallInteger maxVal broken.\\\n\t\t\tReference Mantis 7407: BitBlt. Incorrect alpha values for several rules.\\\n\t\t\tReference Mantis 7421: Bug in Interpreter>>primitiveNextPut:\\\n\t\t\t(Various 64bit fixes which don't apply to this 32bit VM)\\\n\t\\\n\t\t\tPut ObjectiveCPlugin.bundle to 1.1.2\\\n\t\t\tRemoved SparklePlugin because of file copy issues on squeak 4.0 build process. bad sym links\\\n\\\n\t\t\t**** This VM includes some features not in VMMaker yet *****\\\n\t\t\t(a) primitiveAsyncFileOpen: 64bit \\\n\t\t\t(b) explicit declare for primitiveShowHostWindow:\\\n\t\t\t(c) primitive for microsecond clock\\\n\t\t\t(f) statGCTime, statFullGCMSecs,statIGCDeltaTime,statIncrGCMSecs go to 64bit for \\\n\t\t\t\tmicroscecond clock\\\n\t\t\t(e) primitiveVMParameter changes to pull back 64bit values\\\n\t\t\t(f) JPEGReaderPlugin, work to make 64bit clean\\\n\t\t\t(g) primitiveMIDIGetPortName: 64bit fix\\\n\\\n\\\n\t\t\tNSCursorWrapper.m\tcompiler warning cleanup\\\n\t\t\tsqMacMacmain.m\t\tcompiler warning cleanup\\\n\t\t\tsqMacTime.c\t\t\tadd microsecond clock\\\n\t\t\tsqmacWIndowUniversal.c compiler warning cleanup\\\n\\\n\\\n4.2.2b1\t\tWe update system to 10.6.1 and newest xCode \\\n\t\t\tBuild powerpc VM with gcc 4.0\\\n\t\t\tRun Static Analyser \\\n\\pard\\tx566\\tx1133\\tx1700\\tx2267\\tx2834\\tx3401\\tx3968\\tx4535\\tx5102\\tx5669\\tx6236\\tx6803\\ql\\qnatural\\pardirnatural\n\n\\f1 \\cf0 \t\t\tFilePlugin.c\\\n\t\t\tSetVMPathFromApplicationDirectory\\\n\t\t\tmemory leak from vmPathString\\\n\\\n\t\t\t\\CocoaLigature0 NSCursorWrappers.m\\\n\\CocoaLigature1 \t\t\t\\CocoaLigature0 fix memory leak, bitmap, image\\\n\\pard\\tx560\\pardeftab560\\ql\\qnatural\\pardirnatural\n\\cf0 \\\n\\pard\\tx566\\tx1133\\tx1700\\tx2267\\tx2834\\tx3401\\tx3968\\tx4535\\tx5102\\tx5669\\tx6236\\tx6803\\ql\\qnatural\\pardirnatural\n\\cf0 \\CocoaLigature1 \t\t\t\\CocoaLigature0 sqMacMain.c\\\n\\CocoaLigature1 \t\t\t\\CocoaLigature0 fixupNonAbsolutePath\\\n\\CocoaLigature1 \t\t\t\\CocoaLigature0 memory leak from resourcePathString\\\n\\pard\\tx560\\pardeftab560\\ql\\qnatural\\pardirnatural\n\\cf0 \\\n\\pard\\tx566\\tx1133\\tx1700\\tx2267\\tx2834\\tx3401\\tx3968\\tx4535\\tx5102\\tx5669\\tx6236\\tx6803\\ql\\qnatural\\pardirnatural\n\\cf0 \\CocoaLigature1 \t\t\t\\CocoaLigature0 sqMacNSPluginUILogic2.c\\\n\\CocoaLigature1 \t\t\t\\CocoaLigature0 handle_CMD_SHARED_MEMORY\\\n\\CocoaLigature1 \t\t\t\\CocoaLigature0 memory leak from colorspace\\\n\\pard\\tx560\\pardeftab560\\ql\\qnatural\\pardirnatural\n\\cf0 \\\n\\pard\\tx566\\tx1133\\tx1700\\tx2267\\tx2834\\tx3401\\tx3968\\tx4535\\tx5102\\tx5669\\tx6236\\tx6803\\ql\\qnatural\\pardirnatural\n\\cf0 \\CocoaLigature1 \t\t\t\\CocoaLigature0 sqmacUIEventsUniversal.c\\\n\\CocoaLigature1 \t\t\t\\CocoaLigature0 Bert reported scroll wheel movement was wrong. \\\n\\CocoaLigature1 \t\t\t\\CocoaLigature0 We did not get kEventParamMouseWheelAxis correctly\\\n\\CocoaLigature1 \t\t\t\\CocoaLigature0 This problem oddly has existed for years. \\cf2 \\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 \\CocoaLigature1 \\\n\\\n4.2.1b1\t\tWe update our VM to VMMaker-dtl.135\\\n\t\t\tFixes\\\n\t\t\tReference Mantis 7260: some Float comparison primitives don't handle Nan correctly\\\n\t\t\tEnable VM to run 64 bit images as a 32 bit VM\\\n\t\t\tReference Mantis 5238: Integer bug on 64bit image/32bit VM\\\n\t\t\tReference Mantis 7376: Bug in BitBlt (rgbMul sets alpha to 0)\\\n\t\t\tReference Mantis 7377: VM Crashes when setting port on destroyed socket (Win32)\\\n\t\t\tReference Mantis 7384: GeniePlugin does not compile on closure-enabled images\\\n\\\n\t\t\tAdded eToys suggestion for a read only resource directory when sandboxed. \\\n\t\t\tInfo.plist gets a UTI and the SqueakResourceDirectory path \\\n\t\t\tVia Bert Freudenberg added QuickLook plugin for rendering eToys project image Thumbnail\\\n\\\n\\\n4.1.1b2\t\tWindow Title now accepts UTF8 strings\\\n\t\t\tBuild with VMMaker-dtl-121\\\n\t\t\tincludes fix for closure vm crash http://bugs.squeak.org/view.php?id=7349\\\n\t\t\t\tprimitiveDisableFileAccess\\\n\t\t\t\tprimitiveDisableImageWrite\\\n\t\t\t\tprimitiveDisableSocketAccess\\\n\t\t\t\tprimitiveHasSocketAccess\\\n\\\n\t\t\tincludes fix for Reference Mantis 6987: signed32BitValueOf:, signed64BitValueOf: etc. broken\\\n\t\t\ta fix for #signed32BitIntegerFor: on 64-bit images. \\\n\\\n\t\t\tincludes fix fortwo methods with assignment to block temp arguments, reported on vm-dev list\\\n  \t\t\t<http://lists.squeakfoundation.org/pipermail/vm-dev/2009-April/002607.html>\\\n\\\n4.1.1b2\t\tdistributed only for testing to a few people.\\\n\\\n4.1.0b1\t\tUTF-8 on clipboard primitives via code from qwaq\\\n\t\t\tUTF-8 for file names\\\n\t\t\tcompile SDK for ppc is 10.4.x now, versus 10.3.x  Unknown if clipboard works on 10.2 or 10.3 ppc systems? \\\n\\\n\\\n4.0.1b1\t\tIPV6 Socket support\\\n\t\t\tOffical 32/64 integer fetch/set fixes.\\\n\t\t\tBitBlt fix\\\n\t\t\t\n\\f1 (a) Reference Mantis 0006987: signed32BitValueOf:, signed64BitValueOf: etc. broken\\\n\\pard\\pardeftab720\\ql\\qnatural\n\\cf0 However I had earlier patched that code base in the 3.8.21x series\\\n\\\n(b) Updated SocketPlugin for IPv6 primitives.\\\n\\\n(c) Reference Mantis 0007327: Bug in BitBlt: rgbMin and other set alpha to 0\\\n\\\n(d) Changes to how\\'a0SqueakUnTrustedDirectory and SqueakTrustedDirectory path names are resolved to support EToys On A Stick\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\n\\f0 \\cf0 \\\n\\\n4.0.0b1\t\tEliot Compiler Closure support\\\n\\\n}"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Documentation/5.x.x Release Notes.rtf",
    "content": "{\\rtf1\\ansi\\ansicpg1252\\cocoartf1038\\cocoasubrtf250\n{\\fonttbl\\f0\\fnil\\fcharset0 Geneva;\\f1\\fnil\\fcharset0 LucidaGrande;}\n{\\colortbl;\\red255\\green255\\blue255;}\n\\margl1440\\margr1440\\vieww20740\\viewh15740\\viewkind0\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\\pardirnatural\n\n\\f0\\fs24 \\cf0 Mac VM 5.4b2 Cocoa for os-x 10.5 and iPhone 2.x\\\n\n\\f1\\b\\fs22 \\\nFile: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 184\n\\b \\\nDate: \n\\b0 Monday, January 25, 2010 12:15:10 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 rename interp.h header for 64bit squeak it's breaking things by includes from 32bit squeak \\\nsqiPhoneScreenAndWindow.m\\\nuse rect versus *rect in drawRect\\\n\\\nsqSqueakScreenAndWindow.m\\\npass rect in versus pointer to rect since we need to\\\npass rect to invalidateRect anyway\\\n\\\nSqueakOSXAppDelegate.m\\\nremove check for 64bit image in getfullscreen\\\nupdate to 5.4b2\\\n\\\nsqSqueakScreenAndWindow.h\\\npass rect versus *rect\\\n\\\nsqSqueakOSXApplication+attributes.m\\\nversion number change\\\n\\\nsqSqueakOSXScreenAndWindow.m\\\nCLANG hates (NSRect) = (CGRect)\\\n\\\nsqSqueakOSXApplication+cursor.m\\\nlet's not leak cursors\\\n\\\nsqSqueakOSXNSView.m\\\nchange the cursor to arrow when click in resize widget\\\nchange back when unclick\\\ndrawRect: is drawRect (NSRect) not (NSRect*)\\\n\\\nsqSqueakOSXApplication+imageReadWrite.m\\\nOpen panel has to let you click  only on *.image types, not others. \n\\b \\\n\\\nChanges:\\\n\n\\b0 \tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/64interp.h Copied from revision: 183 path: /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/interp.h\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/interp.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAndWindow.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAndWindow.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+attributes.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+cursor.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+imageReadWrite.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXScreenAndWindow.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/sqiPhoneScreenAndWindow.m\\\n\\\n\\\n\n\\f0\\fs24 Mac VM 5.4b1 Cocoa for os-x 10.5 and iPhone 2.x\\\n\n\\f1\\fs22 \\\n\n\\b File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 183\n\\b \\\nDate: \n\\b0 Friday, January 22, 2010 12:46:14 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 Add microSeconds. \\\nRebuild interp.c for 64bit source\\\n\\\nInterp.c\\\nadd ioMicroSeconds\\\n\\\nsq.h\\\nadd ioMicroSeconds\\\n\\\nChipboardExtendedPlugin.c\\\nhas to include sqMacExtendedClipboard.h so that 64bit failure does not occur\\\n\\\nSqueakOSXAppDelegate.m\\\nSome funky issue with storage of headers in 64bit images\\\nand how it affects full screen flag\\\nwork around for now.\\\n\\\nsqMacV2Time\\\nadd ioMicroSeconds\\\n\\\nsqSqueakOSXNSView.h\\\nremove compiler warning\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info 64*64.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/vm/sq.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqMacV2Time.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+attributes.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/interp.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/interp.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/interp.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.c\\\n\\\n\n\\f0\\fs24 Mac VM 5.3b1 Cocoa for os-x 10.5 and iPhone 2.x\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\\cf0 Support for Closures, OS-X, iPhone.\\\n\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\\pardirnatural\n\n\\f1\\b\\fs22 \\cf0 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.m\n\\b \\\nRevision: \n\\b0 176\n\\b \\\nDate: \n\\b0 Sunday, January 10, 2010 11:32:48 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 5.3b1  remove some NSLog, ensure modifier flags get passed onto doCommand: logic properly\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakEventsAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+events.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.m\\\n\n\\f0\\fs24 \\\n\n\\f1\\b\\fs22 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 174\n\\b \\\nDate: \n\\b0 Sunday, January 10, 2010 10:55:42 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 5.3b1 compile work\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakNoOGLIPhone_Prefix.pch\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAndWindow.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/sqiPhoneScreenAndWindow.m\\\n\n\\f0\\fs24 \\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\\cf0 \\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\\pardirnatural\n\n\\f1\\b\\fs22 \\cf0 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.m\n\\b \\\nRevision: \n\\b0 173\n\\b \\\nDate: \n\\b0 Sunday, January 10, 2010 10:24:54 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 We consolidate the drawing logic between os-x and iphone & fix keyboard logic (partially)\\\n\\\nIn ioForceDisplayUpdate we do \\\nlockWhenCondition: 0\\\nmove the drawing queue to the frame queue\\\nunlockWIthCondition: 1\\\nschedule postIoForceDisplayUpdateUsingRectangle on the main thread wait until done. \\\nThis does setNeedsDisplayInRect: on the mainView\\\n\\\nThis ensures we are doing the invalidate rectangle logic on the main view. \\\n\\\nLater drawRect: will run on the view, this does\\\nlockWhenCondition: 1\\\nmove the data from the frameQueue to the CGContext (aka screen). \\\nunlockWithCondition: 0\\\n\\\nTherefore the ioForceDisplayUpdate will block until the last drawRect: happens. \\\nThe drawRect: will block until the ioForceDisplayUpdate: has put data into the frameQueue\\\nhowever it does check for data before doing the lock. \\\n\\\n\\\nsqSqueakSoundCoreAudioAPI.m/h\\\nfix /* & // to remove compiler warning\\\n\\\nsqSqueakEventAPI.m/h \\\nadd optional logging in ioGetNextEvent\\\n\\\nsqSqueakMainApplication+attributes.m/h\\\nadd \"const\" to getAttribute: \\\n\\\nsqSqueakScreenAndWindow.h/m\\\nmoving lockForScreenUpdate down\\\n\\\nsqSqueakScreenAndWindow.h\\\nlockForScreenUpdate logic\\\nadd postIoForceDisplayUpdateUsingRectangle\\\n\\\nSqueakOSXAppDelegate.m\\\nversion number change\\\n\\\nsqSqueakOSXApplication+attributes.m\\\nversion number change\\\n\\\nsqSqueakOSXNSView.h\\\nsqSqueakOSXNSView.m\\\n\\\nsqSqueakOSXScreenAndWindow.m\\\noverride postIoForceDisplayUpdateUsingRectangle\\\n\\\n sqSqueakIPhoneApplication+attributes.m\\\nversion number change\\\n\\\nsqiPhoneScreenAndWindow.m/h\\\nlockForScreenUpdate goes to super class\\\n\\\nWork work work on keyboard logic.\\\n\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakNoOGLIPhone.xcodeproj/johnmci.mode1v3\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakNoOGLIPhone.xcodeproj/johnmci.pbxuser\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakNoOGLIPhone.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/Info-iPhone.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/SoundPlugin/sqSqueakSoundCoreAudioAPI.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/SoundPlugin/sqSqueakSoundCoreAudioAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakEventsAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakMainApplication+attributes.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAndWindow.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAndWindow.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+attributes.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+events.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXScreenAndWindow.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/sqSqueakIPhoneApplication+attributes.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/sqiPhoneScreenAndWindow.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/sqiPhoneScreenAndWindow.m\\\n\n\\f0\\fs24 \\\n\n\\f1\\b\\fs22 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 172\n\\b \\\nDate: \n\\b0 Tuesday, January 5, 2010 6:39:04 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 V5.2b3 mac osx vm  2.1.0 iphone vm\\\nfor 5.2.b3 we fix option arrow key\\\nfor 2.1.0 we move to current pharo pharo1.0-10502-rc1dev09.12.2.image\\\nthis also required changing source file name in _imageReadWrite\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/PharoV10.sources\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/iPhone.10418.changes\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/iPhone.10418.image\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/Info-iPhone.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/iPhone.changes\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/iPhone.image\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+attributes.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/sqSqueakIPhoneApplication+attributes.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/sqSqueakIPhoneApplication+imageReadWrite.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/interp.c\\\n\n\\f0\\fs24 \\\n\n\\f1\\b\\fs22 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 169\n\\b \\\nDate: \n\\b0 Monday, January 4, 2010 1:12:46 AM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 5.2b2  fix for jpeg read/write bad form bitmap addressing code\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+attributes.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/interp.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.c\\\n\n\\f0\\fs24 \\\n\n\\f1\\b\\fs22 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 167\n\\b \\\nDate: \n\\b0 Saturday, January 2, 2010 9:01:04 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 os-x 5.2b1 (11)\\\niphone 2.1.0\\\n\\\nsqMacExtendedClipboard.m/h\\\nadd cocoa support for extended clipboard logic. \\\n\\\nMacMenuOS9ToOSX.m/h \\\nMacMenubarPlugin.h\\\nAdd start of mac menu support. In Progress, not usable\\\n\\\nsqSqueakScreenAndWindow.m\\\nRefactor the iphone versus os-x drawing a bit. Needs more adjustment\\\n\\\nSqueakOSXAppDelegate.m\\\nsqSqueakOSXApplication-attributes.m \\\nTweak version to 5.2b1 (11)\\\n\\\n\\\niphone 2.1.0\\\nFix drawing, yes it was busted. \\\nAdd clipboard support\\\n\\\nsqSqueakiPhoneApplication+clipboard.m/h\\\nsqSqueakIPhoneClipboardClipboardAPI.m/h \\\nclipboard support for squeak\\\n\\\nsqMacExtendedClipboard.m/h\\\nclipboard support for Pharo\\\n\\\nsrc\\\nAdd ClipboardExtendedPlugin\\\nAdd macMenubarPlugin\\\n\\\n\\\n\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/ClipboardExtended\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/ClipboardExtended/sqMacExtendedClipboard.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/ClipboardExtended/sqMacExtendedClipboard.m\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/config\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/config/ftconfig.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/config/ftheader.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/config/ftmodule.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/config/ftoption.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/config/ftstdlib.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/freetype.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftadvanc.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftbbox.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftbdf.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftbitmap.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftcache.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftchapters.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftcid.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/fterrdef.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/fterrors.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftgasp.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftglyph.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftgxval.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftgzip.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftimage.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftincrem.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftlcdfil.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftlist.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftlzw.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftmac.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftmm.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftmodapi.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftmoderr.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftotval.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftoutln.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftpfr.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftrender.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftsizes.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftsnames.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftstroke.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftsynth.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftsystem.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/fttrigon.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/fttypes.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftwinfnt.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftxf86.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/t1tables.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ttnameid.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/tttables.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/tttags.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ttunpat.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/MacMenubarPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/MacMenubarPlugin/MacMenuOS9ToOSX.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/MacMenubarPlugin/MacMenuOS9ToOSX.m\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/MacMenubarPlugin/MacMenubarPlugin.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/sqSqueakIPhoneApplication+clipboard.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/sqSqueakIPhoneApplication+clipboard.m\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/sqSqueakIPhoneClipboardAPI.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/sqSqueakIPhoneClipboardAPI.m\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/plugins/ClipboardExtended\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/plugins/ClipboardExtended/sqMacExtendedClipboard.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/plugins/ClipboardExtended/sqMacExtendedClipboard.m\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/ClipboardExtendedPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/MacMenubarPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/MacMenubarPlugin/MacMenubarPlugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/Info-iPhone.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info 64*64.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAndWindow.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+attributes.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/macintoshextra.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/sqNamedPrims.h\\\n\n\\f0\\fs24 \\\n\n\\f1\\b\\fs22 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 166\n\\b \\\nDate: \n\\b0 Friday, January 1, 2010 1:01:54 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 minor changes for 64bit image compile for 32bit powerpc\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/FT2Plugin.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/FT2Plugin.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/sqNamedPrims.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/interp.h\\\n\n\\f0\\fs24 \\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\\cf0 \\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\\pardirnatural\n\n\\f1\\b\\fs22 \\cf0 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 165\n\\b \\\nDate: \n\\b0 Friday, December 25, 2009 8:08:07 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 5.1.b1  changes to expose sqBaseMemory address for plugins to link to .\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/.DS_Store\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/FT2Plugin.xcodeproj\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/FT2Plugin.xcodeproj/.DS_Store\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/FT2Plugin.xcodeproj/bert.mode1\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/FT2Plugin.xcodeproj/bert.pbxuser\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/FT2Plugin.xcodeproj/johnmci.mode1\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/FT2Plugin.xcodeproj/johnmci.mode1v3\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/FT2Plugin.xcodeproj/johnmci.pbxuser\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/FT2Plugin.xcodeproj/project.pbxproj\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/Info-FT2Plugin.plist\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/PkgInfo\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/libfreetype.a\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/macFileNameBits.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/plugins/FT2Plugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/plugins/FT2Plugin/.DS_Store\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/plugins/FT2Plugin/FT2Plugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+attributes.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/sqMacV2Memory.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/sqPlatformSpecific.h\\\n\n\\b File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 163\n\\b \\\nDate: \n\\b0 Tuesday, December 8, 2009 10:00:41 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 Fix issue with malloc in 1/2/4/8/16 to 32bit translators. \\\nWe need to allocate storage, then free after the draw. \\\n\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqViewClut.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAndWindow.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAndWindow.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/BitMapConversionLogicFromX11.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqViewBitmapConversion.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqViewBitmapConversion.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXScreenAndWindow.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/drawingImageAtom.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/drawingImageAtom.m\\\n\n\\f0\\fs24 \\\n\n\\f1\\b\\fs22 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 162\n\\b \\\nDate: \n\\b0 Tuesday, December 8, 2009 1:17:32 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 Add 1,2,4,8,16 bit form support\\\nNOT COMPLETED, need to figure out how to dispose of malloc\\\n\\\nsqSqueakScreenAPI.m\\\n\\\nioHasDisplayDepth\\\nshould have used ioHasDisplayDepth: versus ioDisplayDepth (bug)\\\n\\\n\\\nsqSqueakScreenAndWindow.m\\\nsqSqueakScreenAndWindow.h\\\n\\\nrefractor to use \\\nCGDataProviderCreateWithData\\\nby default\\\nand have a method to create the CGImageRef so \\\nos-x can use default or calculate bitmap. \\\n\\\n\\\nsqSqueakOSXNSView.h\\\nsqSqueakOSXNSView.m\\\n\\\nrefactor to use colormap and support 1,2,4,8,16 bit forms\\\n\\\nsqSqueakOSXScreenAndWindow.h\\\nsqSqueakOSXScreenAndWindow.m\\\n\\\nioHasDisplayDepth fix\\\nrefractor to build 32bit screen using default logic or\\\ncalculate 1,2,4,8,16 version\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/BitMapConversionLogicFromX11.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/BitMapConversionLogicFromX11.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqViewBitmapConversion.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqViewBitmapConversion.m\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqViewClut.m\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqMacUnixExternalPrims.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAndWindow.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAndWindow.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXScreenAndWindow.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/.DS_Store\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/.DS_Store\\\n\n\\f0\\fs24 \\\n\n\\f1\\b\\fs22 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 161\n\\b \\\nDate: \n\\b0 Wednesday, December 2, 2009 2:46:02 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 Beta 9\\\nas shipped\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info 64*64.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/DropPlugin/DropPlugin.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/SecurityPlugin/SecurityPlugin.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/SocketPlugin/SocketPlugin.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/SoundPlugin/SoundPlugin.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/UUIDPlugin/UUIDPlugin.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/vm/sqNamedPrims.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/SecurityPlugin/sqMacSecurity.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/SoundPlugin/sqSqueakSoundCoreAudio.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/SoundPlugin/sqSqueakSoundCoreAudioAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqMacV2Time.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakEventsAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+attributes.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+events.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXDropAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/interp.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/sqDummyaio.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/sqDummyaio.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/unix/plugins/SocketPlugin/sqUnixSocket.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/unix/plugins/UUIDPlugin/sqUnixUUID.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/unix/vm/aio.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/interp.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/interp.h\\\n\n\\f0\\fs24 \\\n\n\\f1\\b\\fs22 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 160\n\\b \\\nDate: \n\\b0 Wednesday, December 2, 2009 2:16:07 AM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 beta 9\\\nAdd the 64bit image SRC\\\nfix some implicit routine defs \\\n\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/.DS_Store\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/plugins\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/plugins.ext\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/plugins.int\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/plugins/IA32ABI\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/.DS_Store\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/interp.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/interp.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/ADPCMCodecPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/AsynchFilePlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/AsynchFilePlugin/AsynchFilePlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/B2DPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/B2DPlugin/B2DPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/B3DAcceleratorPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/B3DAcceleratorPlugin/B3DAcceleratorPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/BMPReadWriterPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/BMPReadWriterPlugin/BMPReadWriterPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/BitBltPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/BitBltPlugin/BitBltPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/DSAPrims\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/DSAPrims/DSAPrims.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/DropPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/DropPlugin/DropPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/FFTPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/FFTPlugin/FFTPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/FilePlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/FilePlugin/FilePlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/FloatArrayPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/FloatArrayPlugin/FloatArrayPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/GeniePlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/GeniePlugin/GeniePlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/HostWindowPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/HostWindowPlugin/HostWindowPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/InternetConfigPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/InternetConfigPlugin/InternetConfigPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/JPEGReadWriter2Plugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/JPEGReaderPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/JPEGReaderPlugin/JPEGReaderPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/JoystickTabletPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/JoystickTabletPlugin/JoystickTabletPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/Klatt\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/Klatt/Klatt.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/LargeIntegers\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/LargeIntegers/LargeIntegers.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/MIDIPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/MIDIPlugin/MIDIPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/MacMenubarPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/MacMenubarPlugin/MacMenubarPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/Matrix2x3Plugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/Matrix2x3Plugin/Matrix2x3Plugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/MiscPrimitivePlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/MiscPrimitivePlugin/MiscPrimitivePlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/RePlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/RePlugin/RePlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/SecurityPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/SecurityPlugin/SecurityPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/SerialPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/SerialPlugin/SerialPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/SocketPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/SocketPlugin/SocketPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/SoundCodecPrims\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/SoundCodecPrims/SoundCodecPrims.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/SoundGenerationPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/SoundGenerationPlugin/SoundGenerationPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/SoundPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/SoundPlugin/SoundPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/Squeak3D\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/Squeak3D/Squeak3D.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/StarSqueakPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/StarSqueakPlugin/StarSqueakPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/SurfacePlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/UUIDPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/UUIDPlugin/UUIDPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/ZipPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/ZipPlugin/ZipPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/sqNamedPrims.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/vm/sqMemoryAccess.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/interp.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/sqPlatformSpecific.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/interp.h\\\n\n\\f0\\fs24 \\\n\n\\f1\\b\\fs22 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 159\n\\b \\\nDate: \n\\b0 Tuesday, December 1, 2009 11:20:44 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 beta 9 \\\nUpdate to vmmaker 153 plus misc fixes for 64bit\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/DropPlugin/DropPlugin.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/SerialPlugin/SerialPlugin.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/vm/sq.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/vm/sqMemoryAccess.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakVmAndImagePathAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/unix/plugins/SecurityPlugin/sqUnixSecurity.c\\\n\n\\f0\\fs24 \\\n\n\\f1\\b\\fs22 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 151\n\\b \\\nDate: \n\\b0 Monday, November 30, 2009 12:17:37 AM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 beta 7\\\nfix leak of Queue objects\\\nrework flush force update to avoid leaks of timer \\\n\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/Queue.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAndWindow.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAndWindow.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXScreenAndWindow.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXScreenAndWindow.m\\\n\n\\f0\\fs24 \\\n\n\\f1\\b\\fs22 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 150\n\\b \\\nDate: \n\\b0 Sunday, November 29, 2009 8:44:42 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 Beta 7\\\n\\\nsqMacUnixExternalPrims.m \t\\\nfix some warning msgs\\\n\\\nQueue.m\\\nQueue.h\\\nadd accessor to get queue array so we can iterate over\\\n\\\nsqSqueakMainApplication+screen.m\\\nsqSqueakMainApplication+screen.h\\\nunionScreenArea, pass rect in, versus pointer\\\n\\\nsqSqueakScreenAndWindow.h\\\nsqSqueakScreenAndWindow.m\\\n\\\nRefactor drawing, before we would draw to a drawing queue\\\nthen move items to the frame queue, then schedule a update\\\non the view to draw the items from the drawing queue\\\n\\\nThis didn't work well on os-x.  So now we draw to the drawing \\\nqueue, on a frame boundary (explicit or forced) we put the drawing queue to the frame queue, and force a draw on the main thread. \\\n\\\nQueues are retain, versus assign\\\n\\\nSqueakOSXAppDelegate.m\\\nupdate prompt\\\nFix issue with path to file to open at launch\\\n\\\nsqSqueakOSXApplication+imageReadWrite.m\\\nFix issue with path to file to open at launch\\\n\\\n\\\nsqSqueakOSXApplication.m\\\ncompiler warning msgs\\\n\\\nsqSqueakOSXDropAPI.m\\\nOops set dropInit and dropShutdown return values to 1, versus 0\\\n\\\n\\\nsqSqueakOSXFileDirectoryInterface.m\\\nUse objective-c 2 iterator\\\n\\\nsqSqueakOSXNSView.h\\\nsqSqueakOSXNSView.m\\\nAdd draw immediate logic\\\nUse objective-c 2 iterator\\\n\\\n\\\nsqSqueakOSXScreenAndWindow.m\\\nrefactor drawing\\\n\\\nSqueakUIController.m\\\ndrop some stale commented out code\\\n\\\nSqueakUIView.m\\\nrefactor drawing\\\n\\\n\\\nsqSqueakIPhoneApplication+events.m\\\nUse objective-c 2 iterator\\\n\\\nsqiPhoneScreenAndWindow.m\\\npostIoForceDisplayUpdateUsingRectangle\\\n\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/sqMacUnixExternalPrims.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/Queue.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/Queue.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakMainApplication+screen.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakMainApplication+screen.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAndWindow.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAndWindow.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+imageReadWrite.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXDropAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXFileDirectoryInterface.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXScreenAndWindow.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/SqueakUIController.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/SqueakUIView.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/sqSqueakIPhoneApplication+events.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/sqiPhoneScreenAndWindow.m\\\n\n\\f0\\fs24 \\\n\n\\f1\\b\\fs22 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 148\n\\b \\\nDate: \n\\b0 Saturday, November 28, 2009 12:21:54 AM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 pre beta 7 check in\\\nwe are adding drag and drop\\\nresize of os-x window\\\nioLoadModule logic\\\n\\\nrevisions to some funky alloc/release to autorelease patterns. \\\n\\\ndetails \\\n\\\nsqSqueakFileDirectoryAPI.m\\\n\\\ncreateFilePathFromString \\\nneeds to better manage autorelease objects\\\n\\\n sqSqueakFileDirectoryInterface.h\\\n sqSqueakFileDirectoryInterface.m\\\nrename copyResolvedAliasFiles to resolvedAliasFiles\\\nrefractor management of autoreleased objects\\\n\\\nsqSqueakScreenAndWindow.m\\\nforce first screen update to catch DOA images\\\n\\\nSqueakOSXAppDelegate.m\\\nenable resize again\\\n\\\nmacintoshosxextra.c\\\nioloadmodule to new class\\\n\\\nsqSqueakOSXApplication+events.h\\\nsqSqueakOSXApplication+events.m\\\nsqSqueakOSXDropAPI.h\\\nsqSqueakOSXDropAPI.m\\\nAdd lots of code for drag/drop, not working yet. \\\n\\\nsqSqueakOSXFileDirectoryInterface.m\\\nresolvedAliasFiles\\\nneeds to better manage autorelease objects\\\n\\\nsqSqueakOSXNSView.m\\\nsqSqueakOSXNSView.h\\\n\\\nlots added for drag/drop\\\n\\\nsqSqueakIPhoneFileDirectoryInterface.m\\\nresolvedAliasFiles.m\\\nis always in a auto-release pool, why add another. \\\n\\\n\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/sqMacUnixExternalPrims.m\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXDropAPI.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXDropAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/English.lproj/MainMenu.xib\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakFileDirectoryAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakFileDirectoryInterface.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakFileDirectoryInterface.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/macintoshosxextra.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+events.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+events.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXFileDirectoryInterface.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/sqSqueakIPhoneFileDirectoryInterface.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/sqNamedPrims.h\\\n\n\\f0\\fs24 \\\n\n\\f1\\b\\fs22 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 147\n\\b \\\nDate: \n\\b0 Friday, November 27, 2009 2:15:01 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 beta 6\\\n\\\nsqSqueakSoundCoreAudio.h\\\nsqSqueakSoundCoreAudio.m\\\n\\\nadd stop_force, StopAndDispose\\\nuse retain on queues, outputRunning is BOOL\\\nBuffer number goes from 3 to 4\\\nSet zero sound fill to 2644 bytes from 512\\\nDon't make new audioqueue if old one can be reused. \\\nDon't dispose of audioqueue on regular stop\\\nIn playSamples use MyAudioQueueOutputCallback() to populate queues if required. \\\n\\\nsqSqueakOSXSoundCoreAudio.h\\\nsqSqueakOSXSoundCoreAudio.m\\\nOverride class for os-x to ensure we don't \\\nrestart entire sound system on each squeak stop/start sound\\\n\\\nsqSUnitTester.m \\\nFix compiler warnings about double constants being returned as float\\\n\\\nsqSqueakAttributesAPI.m\\\ncast strlen to sqInt\\\n\\\nsqSqueakFileDirectoryInterface.m\\\ncast strlen to sqInt\\\nfix casting for type/creator which are 32bit things\\\n\\\nsqSqueakMainApplication\\\ninputSemaphoreINdex is a sqInt\\\n\\\nsqSqueakScreenAPI.m\\\nioShowDisplayOnWindow first pram is a unsigned char *, fix \\\nreferences, also do pointerForOops in proper place\\\n\\\n\\\nsqSqueakScreenAndWindow.h\\\nwindowIndex is a sqInt \\\n\\\nsqSqueakVmAndImagePathAPI.m\\\ncast strlen to sqInt\\\n\\\nSqueakOSXAppDelegate.m\\\nIt's a cocoa squeak 64bit vm, with 32bit image.. \\\n\\\n\\\nsqSqueakOSXSoundCoreAudio.h\\\nsqSqueakOSXSoundCoreAudio.m\\\nOS-X override to ensure we start sound system only once. \\\n\\\nsqSqueakOSXApplication+clipboard.m\\\ncast strlen to sqInt\\\n\\\nsqSqueakOSXApplication+events.h\\\nsqSqueakOSXApplication+events.m\\\nsqueak modifier & buttonState is an int\\\n\\\nsqSqueakOSXApplication.h\\\ngMaxHeapSize is a usqInt\\\nAlso setup sound system\\\n\\\n\\\nsqSqueakOSXInfoPlistInterface.h\\\nsqSqueakOSXInfoPlistInterface.m\\\nSqueakMaxHeapSize is a usqInt\\\n\\\nTSK \\\nsqMacV2Memory.c\\\nextern memory is a usqInt not a char *\\\nsome casting of void* to (char*)\\\nmemory is zero if in 64bit mode 32bit image. So fix freeMemory\\\n\\\nVarious fixes to the Objective-C plugin \\\nfor casting and for long on 64bit is 64bits wide. \\\n\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/RePlugin/configx.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/plugins\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/plugins/SoundPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/plugins/SoundPlugin/sqSqueakOSXSoundCoreAudio.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/plugins/SoundPlugin/sqSqueakOSXSoundCoreAudio.m\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/RePlugin/config.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/RePlugin/internal.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/SoundPlugin/sqSqueakSoundCoreAudio.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/SoundPlugin/sqSqueakSoundCoreAudio.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/SqueakObjectiveC/squeakSUnitTester.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakAttributesAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakFileDirectoryInterface.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakMainApplication.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAndWindow.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakVmAndImagePathAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+attributes.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+clipboard.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+events.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+events.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXInfoPlistInterface.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXInfoPlistInterface.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/sqMacV2Memory.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/interp.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/HostWindowPlugin/HostWindowPlugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/ObjectiveCPlugin/ObjectiveCPlugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/Squeak3D/Squeak3D.c\\\n\n\\f0\\fs24 \\\n\n\\f1\\b\\fs22 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 146\n\\b \\\nDate: \n\\b0 Thursday, November 26, 2009 7:29:49 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 HostWindowPlugin.h\\\n64bit prep work\\\nFor all usages of int make those sqInt\\\n\\\nSecurityPlugin.h\\\nSecurityPlugin.c\\\ninDisableImageWrite/ioCanWriteImage/ioCanRenameImage are sqInt\\\n\\\n\\\nsqSqueakCursorAPI.m\\\n64bit prep work\\\nFor all usages of int make those sqInt\\\nioSetCursor\\\n\\\n  sqSqueakScreenAPI.m\\\n64bit prep work\\\nFor all usages of int make those sqInt\\\nioShowDisplayOnWindow\\\n\\\nSqueakOSXAppDelegate.h\\\nFor 10.5 build add protocol NSApplicationDelegate def\\\n\\\nSqueakOSXAppDelegate.m\\\nsetInitialFirstResponder\\\n\\\nmacintoshosxextra.c\\\nFor all usages of int make those squint\\\n\\\nsqSqueakOSXNSView.m\\\n10.5 only calls insertText:  (bug)\\\nenable option/shift for esc/tab/return/cursor/page\\\n\\\nsqSqueakOSXScreenAndWindow.h\\\nFor 10.5 build add protocol NSWndowDelegate def\\\n\\\nsqMacV2Memory.c\\\nsqMemoryBase  set memory base on squeak vmmaker defs, not x64\\\n\\\n\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/HostWindowPlugin/HostWindowPlugin.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/SecurityPlugin/SecurityPlugin.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/SecurityPlugin/sqMacSecurity.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakCursorAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/macintoshosxextra.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+attributes.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+events.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXScreenAndWindow.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/plugins/HostWindowPlugin/sqMacHostWindow.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/sqMacV2Memory.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/ObjectiveCPlugin/ObjectiveCPlugin.c\\\n\n\\f0\\fs24 \\\n\n\\f1\\b\\fs22 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 145\n\\b \\\nDate: \n\\b0 Wednesday, November 25, 2009 11:49:52 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 beta 3\\\nUpdate powerpc compiler options. \\\n\\\nsqSqueakMainApplication+vmAndImagePath.m\\\n10.6 URL call backported to 10.5\\\n\\\nSqueakOSXAppDelegate.m\\\nmess with window open code\\\nfix window title\\\n\\\nsqSqueakOSXApplication+events.m\\\nsqSqueakOSXApplication+events.h\\\nAdd wheel mouse logic\\\n\\\nsqSqueakOSXApplication+imageReadWrite.m\\\nAdd override for setting window title\\\n\\\nsqSqueakOSXInfoPlistInterface.m\\\n10.6 URL call backported to 10.5\\\n\\\nsqSqueakOSXNSView.m\\\n10.6 cursor call backported to 10.5\\\nAdd wheel mouse logic\\\n\\\nsqSqueakOSXScreenAndWindow.h\\\nretain timer for forced flush\\\n\\\nsqSqueakOSXScreenAndWindow.m\\\ntimer was not reset correctly for 2nd+ flushes\\\nThis caused drawing problems. \n\\b \\\n\\\nChanges:\\\n\n\\b0 \tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/English.lproj/MainMenu.xib\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakMainApplication+vmAndImagePath.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAndWindow.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+events.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+events.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+imageReadWrite.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXInfoPlistInterface.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXScreenAndWindow.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXScreenAndWindow.m\n\\f0\\fs24 \\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\\cf0 \\\n}"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Documentation/readme",
    "content": "Updated Nov 10th, 2005\n\nBuilding the Squeak Virtual Machine (Aug 6th, 2002)\n\t-- John Maloney, May 25, 2000,\n\t-- Changes John M McIntosh Aug 2, 2000, Dec 1,2000, Feb 10th 2001, May 30th 2001, Dec 18th 2001, Jan 1st 2002,\n\t   Feb 5th 2002, April 26th 2002\n\t-- Changes Andrew C. Greenberg, Jan 1st 2002\n   \t-- Changes Jay Hardesty, July 6, 2002\n    \t-- Changes John Mcintosh &  Andrew C. Greenberg. Aug 6 & 7th, 2002\n    \t-- Changes John McIntosh Nov 14th, 2002 (some cleanup and modernization\n    \t-- CHanges John McIntosh April 5th, 2003 (changeset names change)\n\t-- Changes John McIntosh May 19th, 2003 (changeset consolidation into VMMaker).\n\t-- Changes John McIntosh July 31th, 2003 3.5.x updates\n\t-- Changes John McIntosh Oct 5th, 2003 3.6.x updates\n\t-- Changes John McIntosh Feb 18th, 2004 3.7.x updates (pending)  (xcode changes)\n\t-- Changes John McIntosh May 23rd, 2005 3.8.8b2 revise for SVN usage\n\t-- Changes John McIntosh Jun 4th, 2005 3.8.8b2 revised for 3.9\n\t-- Changes John McIntosh Nov 10th, 2005 3.8.9b8 revised SVN location, misc updates\n\t-- Changes John McIntosh Mar 5th, 2006 3.8.11b1 Drop os-9, non-carbon logic. \n\n(Note to readers, it is possible a step was missed, so beware)\n\nBuilding a Carbon Squeak VM with ProjectBuilder:\n\n{JMM notes this is building with 10.4.x, and Squeak 3.9 (for croquet & Tweak)}\n\nOverview\n\n\t1.\tGet the Apple Developer Tools (free)\n\t2.\tGet the current SVN Platforms tree\n\t3.\tBuild an interpreter with VMMaker\n\t4.\tGet, and install, the Gnuifier, and gnuify the interpreter\n\t5.\tShove some files around the buildspace\n\t6.\tRun ProjectBuilder and build yourself an VM\n\t7.\tDownload and print your Squeak VM Developer's Certificate\n\nStep One: Get the Apple Developer Tools (free)\n\n\tThe current build requires the latest XCode tools.  They are available to Online members at the apple developer website.  You can get an Online membership for free at:\n\n\t\thttp://developer.apple.com/membership/online.html\n\t\t\n\t\t(Note building with GCC 3.3 ppc produces better code than gcc 4.0, gcc 3.1 or gcc 2.95, FYI gcc 3.1 produces lousy code). \n\t\tOf course you must build with GCC 4.x for MacIntel, but the XCode project does this automatically for you\n\t\t\t\t\n\t\t\nStep One (b):\n\tA. Get the OpenGL sdk if you need to build with codeWarrior under system 9.x \n\t\tThis is not needed if only building the os-x version\n\t\thttp://developer.apple.com/opengl/downloads.html\n\nStep Two: Get the current SVN Platforms tree\n\n\tA.\tVisit http://subversion.tigris.org/ to understand SVN, and I suspect install SVN on your machine.\n\t\tYou should visit\n\t\t\thttp://www.lachoseinteractive.net/en/community/subversion/svnx/download/\n\t\tto get the client gui &\n\t\t\thttp://homepage.mac.com/martinott/\n\t\tto get the SVN binaries\n\t\tCheckout a working copy of the squeak/trunk, either via the GUI tool, or from a terminal session go to the directory\n\t\tyou want to build in, then enter svn co http://squeakvm.org/svn/squeak/trunk svnSqueakTree \n\tB.\tYou may need to copy the platform directory out of the svnSqueakTree directory into your build directory\n\t\tto avoid confusion.\n\tC.  \tFor printing support visit the PrintJobPlugin plugin in the mac folder, and later file in RealPrinting-JMM.6.cs.gz and    RealPrintingPlugin-JMM.5.cs.zip. See http://www.smalltalkconsulting.com/squeak.html\n\t\t\nAfter so much mumbo-jumbo, your squeak folder should have a directory entitled platforms.\n\nStep Three: Build an interpeter\n\n\t0.  Grab your 3.9 image, and then install the 32/64bit version of VMMaker or better, and Balloon 3D.\n\tAs of Nov 10th 2005, You need a beta VMMaker from\n\thttp://www.rowledge.org/tim/squeak/SqFiles/packages/VMMaker/VMMaker-tpr.37.mcz\n\n\tWhen this loads rely yes to move FloatProto to Undeclared.\n\tNow load the following two change sets found in the specialChangeSets folder.\n\tload VMM38-gc-instrument-image.1.cs \n\tload VMM38-64bit-imageUpdates.1.cs\n\tThat should provide a version of VMMaker that is sufficient to build 3.8.9b7\n\t\n\tA.  Install change sets from the specialChangeSets Folder. \n\t\tThere has been some discussion that the line endings \n\t\tmight be wrong for the following change sets that might depend on what CVS/SVN thinks, \n\t\tso do a \"remove linefeeds\" first. \n\t\t\n\t\tGnuifier.5.cs\n\t\t\t- A smalltalk version of the AWK example. \n\t\t\t\t\n\t\tArraysToGlobalStruct-JMM.1.cs  - Put arrays in the structure, this fixes some issues with 'global code elimination' in the compiler.\n\t\t\n\tB.\tDoIt: VMMakerTool openInWorld  (Ensure you have the latest VMMaker, do an SqueakMap update if unsure, see Step 3 above)\n\tC.\tEnter the Path to platforms code: (enter path to platforms in step two).\n\tD.\tEnter the Platform name: (default is fine) \"Mac OS\"\n\tE.\tEnter the Path for your generates sources (default is fine).\n\tF.\tSelect plugins. (Suggest selecting menu item \"make all internal\",\n\t\tthen drag back the following back to Plugins not built:\n\t\t\tFFIPlugin\n\t\t\tFileCopyPlugin\n\t\t\tIntegerPokerPlugin\n\t\t\tMpeg3Plugin\n\t\t\tTestOSAPlugin\n\t\t\tPrintJobPlugin (if installed, we'll discuss how to built this later as built in)\n\tG.\tPress button \"Save Configuration\" to save your configuration for later.\n\tH.\tPress button \"Generate All\" to build the interpreter\n\n\nStep Four: Get, and install, the Gnifier, and gnuify the interpreter\n\n\tA.\tSee the Gnuifier.5.cs changeset in the specialChangeSetsFolder\n\tB.\tDoIt: \t(Gnuifier on: pathToInterpreterfile) gnuify, in my case:\n\n\t\t(Gnuifier on:\n\t\t\t((FileDirectory default\n\t\t\t\tdirectoryNamed: 'src')  \"Perhaps src32 depending on how VMMaker 32/64 thinks about this\"\n\t\t\t\tdirectoryNamed: 'vm') pathName) gnuify\n\nStep Five: Shove and Tweak some files around the buildspace\n\n\tA.\tOpen a MacOSX Finder browser and go to the platforms/Mac OS/vm/Developer folder.\n\tB.\tUnstuff 'resources.sit'\n\t\t1. select the file\n\t\t2. cmd-I for an inspector\n\t\t3. select \"Open with application\"\n\t\t4. click the box and select Stuffit Expander, or your decompression tool\n\t\t5. go back and double-click the .sit, put the resulting resource folder in the folder containing\n\t\tthe 'platforms' and 'src' folders.\n\tC.\tUnstuff 'SqueakVMUNIXPATHS.xcodeproj.zip' (same deal as step B)\n\tD.\tDrag 'SqueakVMUNIXPATHS.xcodeproj' to the folder containing\n\t\tthe 'platforms' and 'src' folders.\n\n\tE.\tEnsure a copy of the files (again found in the Developer directory):\n\t\t\tInfo-NPSqueak__Upgraded_.plist\n\t\t\tInfo-Squeak_VM_Debug__Upgraded_.plist\n\t\t\tSqueak VM Universal-Info.plist\n\t\tcan be found in the folder containing the 'platforms' and 'src' folders.\n\nStep Six: Run ProjectBuilder and build yourself an interpreter {for xcode 1.5 }\n\n\tA.\tDouble-click the SqueakVMUNIXPATHS.xcodeproj file\n\tB.\tOn the left pane, see the SqueakVMUNIXPATHS blue xcode icon.\n\t\tClick on  it to see the files.\n\t\tFiles which can't be found are listed in red. For any red highlighted files you'll need to \n\t\tresolve where or why the files is/are missing.\n\tc.\tOn the left pane, find the Targets icon. \n\td.\tSelect \"Squeak VM Opt\"\n\te.\tOn the upper window area pick \"Deployment\" (This is the active build style) {This depends on how you have xcode configured}\n \tf.\tClick on the hammer icon at the top  to build your VM.\n\t\tThe final product should live in the build folder, named \"Squeak VM Opt\"\n\t\tCompare against the offical build to see if it is the same. \n\t\tNote you should look at the binary in the Contents subfolder to see if it is the same size.\n\t\t(The errors you should get are \n\t\twarning: passing arg 1 of `sqImageFileStartLocation' makes integer from pointer without a cast)\n\t\tRun a tinyBenchmark benchmark against your VM, versus the production VM to confirm yours is simular in performance.\n\nStep Seven: Download and print your Squeak VM Developer's Certificate\n\n\thttp://www.rowledge.org/tim/squeak/SqueakVMBuilderCertificate.pdf\n\nCongratulations! Take a bow!\n\n--------------------------------------------\nyes yes, rewrite someday, please ignore all below, sorry\n{Mostly broken below, changes pending}\n\nBuilding with PrintJobPlugin as internal\n\nAdd to the build as internal plugin list\ndo a \"clean out\"\ndo a \"Generate all\"\n\nThis should result in a folder being created \nsrc/vm/intplugins/PrintJobPlugin\nand of course we also use the code in \nplatforms/Mac OS/plugins/PrintJobPlugin folder\n\nReturning to the project builder project we need to add a number of files to the project.\n\nIn the \"Files\" tab view \nSelect down to the location we want to put the built source\nSources/src/plugins/vm/intplugins\nCreate a new group called PrintJobPlugin\nAdd the file PrintJobPlugin.c  from src/vm/intplugins/PrintJobPlugin to that group\n\nDo the same type of work to select the other files need to build the plugin\nPrintJobPlugin.h file from the platforms/Cross/plugins/PrintJobPlugin folder\nthat should go in the Sources/Cross/plugins/PrintJobPlugin group that you will create\nsqMacPrinting.c & sqMacPrinting.h from the platforms/Mac OS/plugins/PrintJobPlugin\nthese should go in the Sources/Mac OS/plugins/PrintJobPlugin group that you will create\n\n\nBrowser plugin \n\nIt's now possible to build a browser plugin without much work. To do this just \npick the NPSqueak target, and in the Targets tab pick either Safari or IE as the \ntargeted browser. Remember to copy the newly compiled NPSqueak.bundle to the Internet Plug-ins Folder\nso you debug the right bundle.\n\nSee the following for information on the older harder way, which you can now ignore.\n\n---------------------------------------------------\n\nOlder Notes (Below)\n\nThe platform specific files are sqMacXXX.c, totaling about  more than 2000 lines of code\nwhen this document was originally written. All other code is written to standard\nANSI libraries and should port easily to other C environments.\n\nThe files interp.c, sqSoundPrims.c, sqMiscPrims.c, and others are generated\nautomatically, so changes to these files will be lost when they are next\ngenerated. It is fine to make ephemeral changes to these file for the purpose of\ndebugging or statistics gathering. \n\nThe current VM was compiled with Metrowerks CodeWarrior Pro 5.3. Earlier versions of Squeak used\nthe Symantec Think C 6.0, but there were a few bugs in their libraries having to do\nwith 8-byte versus 4-byte integers. These bugs have probably been fixed by now.\n\nThis code has also been compiled under the MPW \"Mr. C\" Macintosh compiler by\nHans-Martin Mosner (hmm@heeg.de) with only one minor change: you will need to\ncreate an empty \"MacHeaders.h\" file. You may get some harmless compiler warnings\nand, for peak performance, the method that patches the dispatch loop must also be\nchanged. Hans-Martin says: \"The whole VM seems to be marginally slower than the\ndelivered VM, but it is significantly smaller.\" Note that Jitter 3 (Squeak V3.x) has migrated\nto Gnu GCC, and MPW. As of late fall 2000 there is no 68K version, but the macintosh\nspecific source is the same with additional files for Jitter 3.\n\nThe source code also has been compiled with Apple's project builder under OS-X, but we are \nnot shipping an example of it at this time.\n\nTo build using CW we have provided an XML exported CW project that should match the \ncurrent one being used to build the production VM.  There is also a project file for the MPEG3 Plugin,\nthe TestOSAPlugin (AppleScript), and SqueakFFIPrims (Foreign Function Calls). You must import\nthese project XML files into CW to build the projects.  Other XML project files are included as\nan example.\n\nTo get an additional speedup, the object code for the bytecode dispatch loop of\nthe PPC version can be patched using the method \"patchInterp:\" in Interpreter\nclass.\n\nAlso you might need to add \tstruct foo *foo = &fum;\nto interpret()\n\n68K Notes\n\nNote: In order to support dynamically loaded primitives, we have switched to\nusing Code Fragement Manager model for the 68K VM. This has several\nramifications:\n\n  1. You now need to use the CFM versions of the library files. The 68K project\nfile has been updated accordingly.\n  2. You cannot run the 68K VM under the emulator on the PowerPC (Apple doesn't\nsupport CFM apps under the 68K emulator).\n  3. You need to be sure that version 4.0 or later of \"CFM-68K Runtime Enabler\"\nis in the Extensions folder of the system folder on your 68K Mac. *** Warning:\nOlder versions of \"CFM-68K Runtime Enabler\" had bugs that will probably prevent\nSqueak from even starting! ***.\n\nThe shipping 68K version of Squeak uses the older MacTCP interface. You can alter\nthe sqMacNetwork.c file and compile your own 68K verion of Squeak that uses the\nnew Open Transport version, but the availability of the 68K version of Open\nTransport V1.3 is limited to 68040 machines that run system 8.1. You can run this\nconfiguration on a 68030 using system 7.5.x but Apple does not support that\nconfiguration.\n\nNote with some work you can migrate back to a pure 68K application, versus a CFM \nenvironment if you wish for building regular 68k applications. \n\nCarbon\n\nMuch of the work to make a Carbon application is done, however we are still missing\na serialMidi interface and tablet support which are Carbon compliant. \n\nPluginized VM\n\nSqueak 2.8 and higher introduces the \"pluginized VM\". To reduce complexity \nmost of the plugins are linked iternally into the VM. That is because many of them\nstill access a few VM functions and variables directly, rather than calling\nthrough the interpreter proxy, which they must in order to run in an external\nplugin. One can still override these builtin primitives with an external plugin\nand, of course, newly built plugins can be created as external or internal\nplugins, using the features of VMMaker. However you will need to mange your CW\nproject on your own. \n\nBuilding Squeak as a Browser Plugin\n\nThe plugin works with versions 4.0 or later of either browser. However,\nthe primitives that can be used to ask the browser to fetch a URL do not work in\nversions of IE earlier than 5.0. \n\nThe installation and use of Squeak as a browser plugin is somewhat beyond the\nscope of this readme file. The basic idea is that the Squeak image started by the\nbrowser lives in a pre-defined directory (\"System\nFolder:Preferences:Squeak:Internet\" by default) with predefined name (e.g.,\n\"squeakPlugin.image\"). The browser plugin can only read and write files within the\nInternet directory and directories contained within it. This is called Squeak\nfile system \"sand box\". The browser captures most of the command key combination,\nso you have to use the menus rather than your favorite Squeak command key\nshortcuts. {Note that using the full screen option allows you to again use the\ncommand key combinations and has better performance characteristics.} The browser\nalso captures cmd-., so the interrupt key when running under the browser is\ncontrol-C. The most flexible way to invoke Squeak is through the HTML \"EMBED\"\ncommand. This allows arbitrary arguments to be made available to Squeak. The\n\"memory\" EMBED tag can be used to tell Squeak how much memory is required by a\ngiven Squeaklet.\n\nTo build a browser plugin VM, invoke the following command after building a regular VM.\n\n (MacOSPowerPCOS9BrowserVMMaker new initialize initializeAllInternalBut: #(IntegerPokerPlugin Mpeg3Plugin FFIPlugin TestOSAPlugin)) generateInterpreterFile.\n\nRename the interp.c file to pluginInterp.c. Then change the two definitions of \nPLUGIN found in sqMacWindow.c and platform.exports, and build your application. \nSqueak as a plugin will run as a Carbon plugin for Carbonized IE if you put it into the \ncorrect directory. \n\nIf you build your own project file, note that IE requires that the main entry\npoint be \"main\" rather than CW's usual \"__start\". (Netscape doesn't care, so it\ntook me a long time to figure out why it wasn't working under IE!) The supplied\nproject produces a PPC-only plugin.\n\n\nPorting Notes:\n\nThe file sqMacMinimal.c can be used a porting guide. This ~1100 line file stubs\nout all non-essential support functions and, together with sqFilePrims.c, allows\none to build a functioning virtual machine that only lacks non-essential I/O\nfunctions (including support for file directory enumeration, which is not really\nessential!). The small size of this file demonstrates how little code is really\nneeded to get Squeak running on a new platform.\n\nThanks to Ian Piumarta, the C header files are identical across all the major\nSqueak platforms.\n\nThe code assumes that C ints and pointers are 4 bytes and double floats are 8\nbytes; these assumptions are checked at start up time. Float objects in the image\nare stored in the IEEE standard byte ordering for double-precision floats on all\nplatforms; macros in sq.h can be defined to swap bytes into and out of the\nplatform native float format if necessary. (To ensure proper word alignment, one\ntypically has to copy a Squeak Float object into a C \"double\" variable before\noperating on it; byte swapping can be done while doing this copy for little or no\nadditional cost.)\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Documentation/readme.txt",
    "content": "Updated  April 14th, 2009\n\nBuilding the Squeak Virtual Machine (Aug 6th, 2002)\n\t-- John Maloney, May 25, 2000,\n\t-- Changes John M McIntosh Aug 2, 2000, Dec 1,2000, Feb 10th 2001, May 30th 2001, Dec 18th 2001, Jan 1st 2002,\n\t   Feb 5th 2002, April 26th 2002\n\t-- Changes Andrew C. Greenberg, Jan 1st 2002\n   \t-- Changes Jay Hardesty, July 6, 2002\n    \t-- Changes John Mcintosh &  Andrew C. Greenberg. Aug 6 & 7th, 2002\n    \t-- Changes John McIntosh Nov 14th, 2002 (some cleanup and modernization\n    \t-- CHanges John McIntosh April 5th, 2003 (changeset names change)\n\t-- Changes John McIntosh May 19th, 2003 (changeset consolidation into VMMaker).\n\t-- Changes John McIntosh July 31th, 2003 3.5.x updates\n\t-- Changes John McIntosh Oct 5th, 2003 3.6.x updates\n\t-- Changes John McIntosh Feb 18th, 2004 3.7.x updates (pending)  (xcode changes)\n\t-- Changes John McIntosh May 23rd, 2005 3.8.8b2 revise for SVN usage\n\t-- Changes John McIntosh Jun 4th, 2005 3.8.8b2 revised for 3.9\n\t-- Changes John McIntosh Nov 10th, 2005 3.8.9b8 revised SVN location, misc updates\n\t-- Changes John McIntosh Mar 5th, 2006 3.8.11b1 Drop os-9, non-carbon logic. \n\t-- Changes John McIntosh Sept 3rd, 2006 3.8.12b5u clarify build instructions\n\t-- Changes John McIntosh, Craig Latta, Oct 19th, 2006 3.8.13b4\n\t-- Changes John McIntosh, Dec 11th, 2006 3.8.14b6U, clarify, cross check\n\t-- Changes John McIntosh, Feb 6th, 2007 3.8.15b3U, clarify, cross check\n\t-- Changes John McIntosh, Mar 4th, 2007 3.8.15b4u, extra changeset added \n\t-- Changes John McIntosh, Apr 17th, 2007 3.8.16b5u, browser build notes \n\t-- Changes John McIntosh, Apr 25th, 2007 3.8.17b2, build notes (large cursor support)\n\t-- Changes John McIntosh, Jun 9th, 2007 3.8.18b1, 32bit clean work\n\t-- Changes John McIntosh, April 14th, 2009 4.0, dtl david lewis work plus closures, review for 3.10.x install and where did 2008 go? \n\t\n\n(Note to readers, it is possible a step was missed, so beware)\n\nBuilding a Carbon Squeak VM with XCode:\n\n{JMM notes this is building with 10.5.x, and Squeak 3.10, to provide a closure VM with Alien Support }\n\nStep One: Get the Apple Developer Tools (free)\n\n\tThe current build requires the latest XCode tools.  They are available to Online members at the apple developer website.  You can get an Online membership for free at:\n\n\t\thttp://developer.apple.com/membership/online.html\n\t\t\n\t\t(Note building with GCC 3.3 PowerPC produces better code than gcc 4.0, gcc 3.1 or gcc 2.95, FYI gcc 3.1 produces lousy code). \n\t\tOf course you must build with GCC 4.x for MacIntel, but the XCode project does this automatically for you\n\t\tBuilding with GCC 4.0 is good, building with GCC 4.2 is bad.\n\t\tEnsure you install the 10.3.9 SDK tree etc from the XCode install process otherwise you won't be able to build the powerpc version. \n\t\t\t\t\nStep Two: Get the current SVN Platforms tree\n\n\tA.\tVisit http://subversion.tigris.org/ to understand SVN, and I suspect install SVN on your machine.\n\t\tYou should visit\n\t\t\thttp://www.lachoseinteractive.net/en/community/subversion/svnx/download/\n\t\tto get the client gui. Checkout a working copy of the squeak/trunk, either via the GUI tool\n\t\twhere you select the version you want to check out and hit the svn checkout button, then when prompted\n\t\tpoint to your build folder.  \n\n\t\tor from a terminal session go to the directory you want to build in, say your vmmaker image folder, \n\t\tthen enter svn co http://squeakvm.org/svn/squeak/trunk svnSqueakTree.\n\n\t\tI will note which version of the tree you check out is dependent on which version of the mac carbon VM you want to build\n\t\tyou should check the tree version numbers and comments to identify the point in the versions where one version of \n\t\tthe VM ends and a new version starts. \n\n\t\t\nAfter so much mumbo-jumbo, your Squeak folder should have a directory entitled platforms.\n\nStep Three: Build an interpeter\n\n\t0.  Grab your Pharo or squeak imge\n\n\tInstall Balloon 3D via MC\n\n\tInstall the Ballon3D-Constants & Ballon3D-Plugins\n\tMCHttpRepository\r\t\tlocation: 'http://www.squeaksource.com/Balloon3D'\r\t\tuser: ''\r\t\tpassword: ''\n\t\n\n\tInstall FFI  & Klatt via MC\n\tMCHttpRepository\n   \t\t location: 'http://www.squeaksource.com/Speech'\n   \t\t user: ''\n   \t\t password: ''\n\n\tSharedPool-Speech, Speech\n\n\tMCHttpRepository\n  \t  \tlocation: 'http://source.squeak.org/FFI'\n  \t  \tuser: ''\n  \t \tpassword: ''\n\t\t\n\tFFI-Pools,FFI-Kernel\n\n\n\tInstall Name: VMMaker-jcg.182 or higher from\n\tMCHttpRepository\r    \t\tlocation: 'http://www.squeaksource.com/VMMaker'\r    \t\tuser: ''\r    \t\tpassword: ''\n\n\tInstall Alien Plugin\n\n\n\tA.  Install additional change sets from the specialChangeSets Folder. \n\t\tGnuifier.st - A smalltalk version of the AWK example. \t\n\t\t\n\tB.\tBring up the World menu, click open, click open VMMaker to get the VMMaker panel up. \n\tC.\tEnter the Path to platforms code: (enter path to platforms in step two).\n\t\tIf you are running the image from the squeak build folder then it should auto-find platforms when it opens\n\n\tD.\tEnter the Platform name: (default is fine) \"Mac OS\", it should auto-pick that.\n\tE.\tEnter the Path for your generates sources (note src32 should be renamed to src to make XCode happy). \n\tE2. \tNote mac carbon VM only supports a 32 bit VM since the entire carbon/osx api set is 32bit, not 64, do NOT pick 64 bit VM? \n\tF.\tSelect plugins. (Suggest selecting menu item \"make all internal\",\n\t\tthen drag back the following back to Plugins not built:\n\t\t\tCroquetPlugin\n\t\t\tFFIPlugin\n\t\t\tFloatMathPlugin\n\t\t\tFileCopyPlugin\n\t\t\tMpeg3Plugin\n\t\t\tTestOSAPlugin\n\t\n\tG.\tPress button \"Save\" to save your configuration for later.\n\tH.\tPress button \"Entire \" to build the interpreter, it then builds a source tree in a folder called src.\n\n\nStep Four: Get, and install, the Gnifier, and gnuify the interpreter\n\n\tA.\tSee the Gnuifier.st in the specialChangeSetsFolder\n\tB.\tDoIt: \t(Gnuifier on: pathToInterpreterfile) gnuify, in my case:\n\n\t\t(Gnuifier on:\n\t\t\t((FileDirectory default\n\t\t\t\tdirectoryNamed: 'src')  \"Perhaps src32 depending on how VMMaker 32/64 thinks about this\"\n\t\t\t\tdirectoryNamed: 'vm') pathName) gnuify\n\tC. \tNote that if the src folder is called src32, you will need to rename it to src in order for xcode to find it.\n\n\nStep Five: Shove and Tweak some files around the buildspace\n\n\tA.\tOpen a MacOSX Finder browser and go to the platforms/Mac OS/vm/Developer folder.\n\tB.\tUnzip 'resources.zip' by double-clicking on it. Put the resulting resource folder in the folder containing\n\t\tthe 'platforms' and 'src' folders.\n\tC.\tUnstuff 'SqueakVMUNIXPATHS.xcodeproj.zip' (same deal as step B)\n\tD.\tDrag 'SqueakVMUNIXPATHS.xcodeproj' to the folder containing\n\t\tthe 'platforms' and 'src' folders.\n\n\tE.\tEnsure a copy of the file (again found in the Developer directory):\n\t\t\tSqueak VM Universal-Info.plist\n\t\tcan be found in the folder containing the 'platforms' and 'src' folders.\n\nStep Six: Run ProjectBuilder and build yourself an interpreter {for xcode 1.5 or higher }\n\n\tA.\tDouble-click the SqueakVMUNIXPATHS.xcodeproj file\n\tB.\tOn the left pane, see the SqueakVMUNIXPATHS blue xcode icon.\n\t\tClick on  it to see the files.\n\t\tFiles which can't be found are listed in red. For any red highlighted files you'll need to \n\t\tresolve where or why the files is/are missing.\n\tc.\tOn the left pane, find the Targets icon. \n\td.\tSelect \"Squeak VM Opt\"\n\te.\tFrom the Project menu pick the active build configuration you want to use.\n\t\tClick on the hammer icon at the top  to build your VM.\n\n\n\t\tProblems: \n\t\t1) It is possible depending on which updated SDK from apple that you have that you might get an error \n\t\tin obj-class.h  parsing @class Protocol;   That is an error in Apple's source code. \n\n\t\tYou must then use sudo vi {path to the file}/obj-class.h to edit the read ony system file and \n\t\talter the @class Protocol to \n\n\t\t#ifdef __OBJC__\n\t\t\t@class Protocol;\n\t\t#else\n\t\t\ttypedef struct objc_object Protocol;\n\t\t#endif\n\n\t\t2) Corrections to 10.3.9 SDKs api for IOHIDLib.h. If you build with the 10.2.8SDK this file is not a problem. If you build with the 10.4U SDK this is not a problem. But if you build with the default 10.3.9 SDK then you get a redefinition of IOHIDQueueInterface and IOHIDOutputTransactionInterface error. To fix this you must change your 10.3.9 SDK version of IOHIDLib.h based on changes in the 10.4u SDK. \n\n\t\tin the 10.4u SDK api's it's \n\nstruct IOHIDQueueInterface\n{\nIUNKNOWN_C_GUTS;\nIOHIDQUEUEINTERFACE_FUNCS_100;\n};\n\nand\n\nstruct IOHIDOutputTransactionInterface\n{\nIUNKNOWN_C_GUTS;\nIOHIDOUTPUTTRANSACTIONINTERFACE_FUNCS_120;\n};\n\n\n\t\t3) We use a sqNamedPrims.h in the Mac OS source tree, versus the sqNamedPrims.h that is created in the src\n\t\tdirectory. You may need to repoint the xcode source file to point to your sqNamedPrims.h if the internal plugins built are \n\t\tdifferent. \n\n\t\t4) All this work only builds the VM, external plugins such as the mpeg plugin or services, spelling or quicktime can then \n\t\tbe copied over from a distributed production VM if required. \n\n\t\t5) The final product should live in the build folder, a subfolder depending on build configuration and, the bundle is named \"Squeak VM Opt\"\n\t\tRun a tinyBenchmark benchmark against your VM, versus the production VM to confirm yours is simular in performance.\n\nStep Seven: Download and print your Squeak VM Developer's Certificate\n\n\thttp://www.rowledge.org/tim/squeak/SqueakVMBuilderCertificate.pdf\n\nCongratulations! Take a bow!\n\nBrowser plugin {new version}\n\nIn the fall of 2006, Viewpoints Research Inc provided funding to rewrite the Browser plugin \nusing the unix model of small plugin launching headless VM. This XCode project is in the \nMac OS/vm/npsqueak  directory.  The plugin must interact with a 3.8.16b5 or later Macintosh VM\nbecause of the tight integration of the drawing logic. \n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/Info-NPSqueak__Upgraded_.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>NPSqueak</string>\n\t<key>CFBundleGetInfoString</key>\n\t<string>Squeak Browser Plugin  3.8.12b1 http://www.squeak.org </string>\n\t<key>CFBundleIconFile</key>\n\t<string>resources/ProjectBuilder/SqueakPlugin.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.SqueakPlugin</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>Squeak Browser Plugin</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BRPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>Squeak Browser Plugin  3.8.12b1</string>\n\t<key>CFBundleSignature</key>\n\t<string>MOSS</string>\n\t<key>CFBundleVersion</key>\n\t<string> 3.8.12b1</string>\n\t<key>SqueakEncodingType</key>\n\t<string>macintosh</string>\n\t<key>SqueakMaxHeapSize</key>\n\t<integer>536870912</integer>\n\t<key>SqueakPluginsBuiltInOrLocalOnly</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/NSCursorWrappers.h",
    "content": "/*\n\tDisclaimer:\tIMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc.\n (\"Apple\") in consideration of your agreement to the following terms, and your\n use, installation, modification or redistribution of this Apple software\n constitutes acceptance of these terms.  If you do not agree with these terms,\n please do not use, install, modify or redistribute this Apple software.\n \n In consideration of your agreement to abide by the following terms, and subject\n to these terms, Apple grants you a personal, non-exclusive license, under Apple's\n copyrights in this original Apple software (the \"Apple Software\"), to use,\n reproduce, modify and redistribute the Apple Software, with or without\n modifications, in source and/or binary forms; provided that if you redistribute\n the Apple Software in its entirety and without modifications, you must retain\n this notice and the following text and disclaimers in all such redistributions of\n the Apple Software.  Neither the name, trademarks, service marks or logos of\n Apple Computer, Inc. may be used to endorse or promote products derived from the\n Apple Software without specific prior written permission from Apple.  Except as\n expressly stated in this notice, no other rights or licenses, express or implied,\n are granted by Apple herein, including but not limited to any patent rights that\n may be infringed by your derivative works or by other works in which the Apple\n Software may be incorporated.\n \n The Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE MAKES NO\n WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED\n WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN\n COMBINATION WITH YOUR PRODUCTS.\n \n IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR\n CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n\t\t\t\t\t\tGOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION\n OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT\n (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN\n ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n \n\tCopyright © 2006 Apple Computer, Inc., All Rights Reserved\n */\n\n\n//\tCursorRef is used here to allow main.c to compile as a plain C file.  If main.c\n// were compiled as an Objective-C file (change File Type in Xcode's Info window),\n// then this file could include Cocoa/Cocoa.h and could use NSCursor directly in the\n// prototypes.\ntypedef void *CursorRef;\n\n//\tC-based wrapper routines around NSCursor\nCursorRef\tCreateCocoaCursor( CGImageRef cgImageRef, float hotSpotX, float hotSpotY );\nvoid\tReleaseCocoaCursor( CursorRef cursor );\nvoid\tSetCocoaCursor( CursorRef cursor );\nvoid\tHideNSCursor();\nvoid\tShowNSCursor();\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/NSCursorWrappers.m",
    "content": "/*\n *  NSCursorWrappers.m\n *  SqueakVMUNIXPATHS\n *\n *  Created by John M McIntosh on 4/26/07.\n *  Copyright 2007 Corporate Smalltalk Consulting Ltd All rights reserved.\n *  Licensed under the Squeak-L, and MIT license\n *\n */\n \n \n /* Some parts. \n * \n * Author: Ian Piumarta <ian.piumarta@squeakland.org>\n * \n *   Copyright (C) 1996-2005 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   Permission is hereby granted, free of charge, to any person obtaining a copy\n *   of this software and associated documentation files (the \"Software\"), to deal\n *   in the Software without restriction, including without limitation the rights\n *   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n *   copies of the Software, and to permit persons to whom the Software is\n *   furnished to do so, subject to the following conditions:\n *\n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n *\n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n *   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n *   SOFTWARE.\n * \n * Last edited: 2006-10-18 10:01:37 by piumarta on emilia.local\n */\n#include <Carbon/Carbon.h>\n#import <Cocoa/Cocoa.h>\n\n#include \"sq.h\"\n#include \"sqMacNSPluginUILogic2.h\"\n\nsqInt ioSetCursorARGB(sqInt cursorBitsIndex, sqInt extentX, sqInt extentY, sqInt offsetX, sqInt offsetY);\nvoid SetCursorBackToSomething(void);\nint amIOSX102X(void);\n\nNSCursor         *cursor= 0;\nBoolean\t\t\tbiggerCursorActive=false;\nextern Cursor macCursor;\n\nvoid SetCursorBackToSomething() {\n\tif (biggerCursorActive) {\n\t\t[cursor set];\n\t}\n\telse\n\t\tSetCursor(&macCursor);\n}\n\nsqInt ioSetCursorARGB(sqInt cursorBitsIndex, sqInt extentX, sqInt extentY, sqInt offsetX, sqInt offsetY)\n{\nextern Boolean gSqueakHeadless;\nextern Boolean gSqueakHasCursor;\n\t\n\tif (gSqueakHeadless) return 0;\n\tif (browserActiveAndDrawingContextOk() && !browserActiveAndDrawingContextOkAndInFullScreenMode()) \n\t\treturn 0;\n\tif (amIOSX102X()) \n\t\treturn 0;\n// ? and what does the browser plugin do? We do not have code to manage big cursors.\n\n      NSAutoreleasePool *pool= [[NSAutoreleasePool alloc] init];\n      NSBitmapImageRep *bitmap= 0;\n      NSImage          *image=  0;\n\n\tstatic BOOL\t\tfirstTime\t= YES;\n\t\n\tif ( firstTime )\n\t{\n\t\t//\tMust first call [[[NSWindow alloc] init] release] to get the NSWindow machinery set up so that NSCursor can use a window to cache the cursor image\n\t\t[[[NSWindow alloc] init] release];\n\t\tfirstTime = NO;\n\t}\n\tbiggerCursorActive = true;\n\tgSqueakHasCursor = true;\n\n\tbitmap= [[NSBitmapImageRep alloc]\n\t\tinitWithBitmapDataPlanes: 0 pixelsWide: extentX pixelsHigh: extentY\n\t\tbitsPerSample: 8 samplesPerPixel: 4\n\t\thasAlpha: YES isPlanar: NO\n\t\tcolorSpaceName: NSCalibratedRGBColorSpace\n\t\tbytesPerRow: extentX * 4\n\t\tbitsPerPixel: 0];\n      {\n\tunsigned *planes[5];\n\t[bitmap getBitmapDataPlanes:(unsigned char **) planes];\n\tunsigned* src= (unsigned*)cursorBitsIndex;\n\tunsigned* dst= planes[0];\n\tint i;\n\tfor (i= 0; i < extentX * extentY; ++i, ++dst, ++src) {\n#if VMENDIANNESS\n\t\t*dst=  ((*src & 0xFF000000) >> 24) | ((*src & 0x00FFFFFF) << 8) ; // ARGB to RGBA\n#else\n\t\t*dst= (*src & 0xFF00FF00) | ((*src & 0x000000FF) << 16) | ((*src & 0x00FF0000) >> 16); // BGRA to RGBA\n#endif\n\t}\n      }\n      image= [[NSImage alloc] init];\n      [image addRepresentation: bitmap];\n      {\n\tNSPoint hotSpot= { -offsetX, -offsetY };\n\tif (cursor) \n\t\t[cursor release];\n\tcursor= [[NSCursor alloc] initWithImage: image hotSpot: hotSpot];\n      }\n      [cursor set];\n\t   // [NSCursor unhide];\n\n  CFRelease(bitmap);\n  CFRelease(image);\n  [pool release];\n\n  return 1;\n}\n\n\n// Code below is example stuff \n\n/*\n\tFile:\t\tNSCursorWrappers.m\n \n\tAbstract:\tProvide Carbon wrapper functions around the Cocoa NSCursor methods we\n\t\t\t\tuse to handle our cursor support.\n\t\n \n\tVersion:\t1.0\n \n\tDisclaimer:\tIMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc.\n (\"Apple\") in consideration of your agreement to the following terms, and your\n use, installation, modification or redistribution of this Apple software\n constitutes acceptance of these terms.  If you do not agree with these terms,\n please do not use, install, modify or redistribute this Apple software.\n \n In consideration of your agreement to abide by the following terms, and subject\n to these terms, Apple grants you a personal, non-exclusive license, under Apple's\n copyrights in this original Apple software (the \"Apple Software\"), to use,\n reproduce, modify and redistribute the Apple Software, with or without\n modifications, in source and/or binary forms; provided that if you redistribute\n the Apple Software in its entirety and without modifications, you must retain\n this notice and the following text and disclaimers in all such redistributions of\n the Apple Software.  Neither the name, trademarks, service marks or logos of\n Apple Computer, Inc. may be used to endorse or promote products derived from the\n Apple Software without specific prior written permission from Apple.  Except as\n expressly stated in this notice, no other rights or licenses, express or implied,\n are granted by Apple herein, including but not limited to any patent rights that\n may be infringed by your derivative works or by other works in which the Apple\n Software may be incorporated.\n \n The Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE MAKES NO\n WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED\n WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN\n COMBINATION WITH YOUR PRODUCTS.\n \n IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR\n CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n\t\t\t\t\t\tGOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION\n OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT\n (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN\n ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n \n\tCopyright © 2006 Apple Computer, Inc., All Rights Reserved\n */\n\n/* \n#import <Cocoa/Cocoa.h>\n#import \"NSCursorWrappers.h\"\n\n//\tFrom \"Cocoa Drawing Guide: Working with Images\"\nNSImage\t*CreateNSImageFromCGImage( CGImageRef image )\n{\n\tNSRect\t\t\timageRect\t\t= NSMakeRect(0.0, 0.0, 0.0, 0.0);\n\n\t// Get the image dimensions.\n\timageRect.size.height = CGImageGetHeight(image);\n\timageRect.size.width = CGImageGetWidth(image);\n\n\t// Create a new image to receive the Quartz image data.\n\tNSImage\t*newImage = [[NSImage alloc] initWithSize:imageRect.size]; \n\t[newImage lockFocus];\n\n\t// Get the Quartz context and draw.\n\tCGContextRef\timageContext = (CGContextRef) [[NSGraphicsContext currentContext] graphicsPort];\n\tCGContextDrawImage( imageContext, *(CGRect*)&imageRect, image );\n\t[newImage unlockFocus];\n\n\treturn( newImage );\n}\n\n//\tC-based style wrapper routines around NSCursor\nCursorRef\tCreateCocoaCursor( CGImageRef cgImageRef, float hotSpotX, float hotSpotY )\n{\n\tstatic BOOL\t\tfirstTime\t= YES;\n\t\n\tif ( firstTime )\n\t{\n\t\t//\tMust first call [[[NSWindow alloc] init] release] to get the NSWindow machinery set up so that NSCursor can use a window to cache the cursor image\n\t\t[[[NSWindow alloc] init] release];\n\t\tfirstTime = NO;\n\t}\n\t\n\tNSImage\t\t*nsImage\t= CreateNSImageFromCGImage( cgImageRef );\n\tNSCursor\t*cursor\t\t= [[NSCursor alloc] initWithImage:nsImage hotSpot:NSMakePoint( hotSpotX, hotSpotY )];\n\t\n\t[nsImage release];\n\t\n\treturn( (CursorRef)cursor );\n}\n\nvoid\tReleaseCocoaCursor( CursorRef cursor )\n{\n\t[(NSCursor *)cursor release];\n}\n\nvoid\tSetCocoaCursor( CursorRef cursor )\n{\n\t[(NSCursor *)cursor set];\n}\n\nvoid\tHideCocoaCursor()\n{\n\t[NSCursor hide];\n}\n\nvoid\tShowCocoaCursor()\n{\n\t[NSCursor unhide];\n}\n*/"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/PluginSDK 4.01a/Common/npmac.cpp",
    "content": "//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\n//\n// npmac.cpp\n//\n//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\n\n#include <Processes.h>\n#include <Gestalt.h>\n#include <CodeFragments.h>\n#include <Timer.h>\n#include <Resources.h>\n#include <ToolUtils.h>\n\n#define XP_MAC 1\n\n//\n// A4Stuff.h contains the definition of EnterCodeResource and \n// EnterCodeResource, used for setting up the code resources\n// globals for 68K (analagous to the function SetCurrentA5\n// defined by the toolbox).\n//\n#if !defined ( __APPLE__ ) && !defined ( __MACH__ )\n#include <A4Stuff.h>\n#else\n#define EnterCodeResource() \n#define ExitCodeResource() \n#define __destroy_global_chain()\n#define __InitCode__()\n#endif\n\n#include \"npapi.h\"\n\n//\n// The Mixed Mode procInfos defined in npupp.h assume Think C-\n// style calling conventions.  These conventions are used by\n// Metrowerks with the exception of pointer return types, which\n// in Metrowerks 68K are returned in A0, instead of the standard\n// D0. Thus, since NPN_MemAlloc and NPN_UserAgent return pointers,\n// Mixed Mode will return the values to a 68K plugin in D0, but \n// a 68K plugin compiled by Metrowerks will expect the result in\n// A0.  The following pragma forces Metrowerks to use D0 instead.\n//\n#ifdef __MWERKS__\n#ifndef powerc\n#pragma pointers_in_D0\n#endif\n#endif\n\n#include \"npupp.h\"\n\n#ifdef __MWERKS__\n#ifndef powerc\n#pragma pointers_in_A0\n#endif\n#endif\n\n// The following fix for static initializers (which fixes a preious\n// incompatibility with some parts of PowerPlant, was submitted by \n// Jan Ulbrich.\n#ifdef __MWERKS__\n\t#ifdef __cplusplus\n\textern \"C\" {\n\t#endif\n\t\t#ifndef powerc\n\t\t\textern void\t__InitCode__(void);\n\t\t#else\n\t\t\textern void __sinit(void);\n\t\t\t#define __InitCode__ __sinit\n\t\t#endif\n\t\textern void\t__destroy_global_chain(void);\n\t#ifdef __cplusplus\n\t}\n\t#endif // __cplusplus\n#endif // __MWERKS__\n\n//\n// Define PLUGIN_TRACE to 1 to have the wrapper functions emit\n// DebugStr messages whenever they are called.\n//#define PLUGIN_TRACE 1\n\n#if PLUGIN_TRACE\n//extern \"C\"  int printOnOSXPascal(unsigned char * string);\n//#define PLUGINDEBUGSTR(msg) printOnOSXPascal(msg)\n#define PLUGINDEBUGSTR(msg)\t\t::DebugStr(msg)\n#else\n#define PLUGINDEBUGSTR\n#endif\n\n\n\n\n\n\n//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\n//\n// Globals\n//\n//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\n\n//JMM QDGlobals*\t\tgQDPtr;\t\t\t\t// Pointer to Netscapes QuickDraw globals\nshort\t\t\tgResFile;\t\t\t// Refnum of the plugins resource file\nNPNetscapeFuncs\tgNetscapeFuncs;\t\t// Function table for procs in Netscape called by plugin\n\n\n//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\n//\n// Wrapper functions for all calls from the plugin to Netscape.\n// These functions let the plugin developer just call the APIs\n// as documented and defined in npapi.h, without needing to know\n// about the function table and call macros in npupp.h.\n//\n//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\n\n\nvoid NPN_Version(int* plugin_major, int* plugin_minor, int* netscape_major, int* netscape_minor)\n{\n\t*plugin_major = NP_VERSION_MAJOR;\n\t*plugin_minor = NP_VERSION_MINOR;\n\t*netscape_major = gNetscapeFuncs.version >> 8;\t\t// Major version is in high byte\n\t*netscape_minor = gNetscapeFuncs.version & 0xFF;\t// Minor version is in low byte\n}\n\nNPError NPN_GetURLNotify(NPP instance, const char* url, const char* window, void* notifyData)\n{\n\tint navMinorVers = gNetscapeFuncs.version & 0xFF;\n\tNPError err;\n\t\n\tif( navMinorVers >= NPVERS_HAS_NOTIFICATION )\n\t{\n\t\terr = CallNPN_GetURLNotifyProc(gNetscapeFuncs.geturlnotify, instance, url, window, notifyData);\n\t}\n\telse\n\t{\n\t\terr = NPERR_INCOMPATIBLE_VERSION_ERROR;\n\t}\n\treturn err;\n}\n\nNPError NPN_GetURL(NPP instance, const char* url, const char* window)\n{\n\treturn CallNPN_GetURLProc(gNetscapeFuncs.geturl, instance, url, window);\n}\n\nNPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file, void* notifyData)\n{\n\tint navMinorVers = gNetscapeFuncs.version & 0xFF;\n\tNPError err;\n\t\n\tif( navMinorVers >= NPVERS_HAS_NOTIFICATION )\n\t{\n\t\terr = CallNPN_PostURLNotifyProc(gNetscapeFuncs.posturlnotify, instance, url, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\twindow, len, buf, file, notifyData);\n\t}\n\telse\n\t{\n\t\terr = NPERR_INCOMPATIBLE_VERSION_ERROR;\n\t}\n\treturn err;\n}\n\nNPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file)\n{\n\treturn CallNPN_PostURLProc(gNetscapeFuncs.posturl, instance, url, window, len, buf, file);\n}\n\nNPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList)\n{\n\treturn CallNPN_RequestReadProc(gNetscapeFuncs.requestread, stream, rangeList);\n}\n\nNPError NPN_NewStream(NPP instance, NPMIMEType type, const char* window, NPStream** stream)\n{\n\tint navMinorVers = gNetscapeFuncs.version & 0xFF;\n\tNPError err;\n\t\n\tif( navMinorVers >= NPVERS_HAS_STREAMOUTPUT )\n\t{\n\t\terr = CallNPN_NewStreamProc(gNetscapeFuncs.newstream, instance, type, window, stream);\n\t}\n\telse\n\t{\n\t\terr = NPERR_INCOMPATIBLE_VERSION_ERROR;\n\t}\n\treturn err;\n}\n\nint32 NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer)\n{\n\tint navMinorVers = gNetscapeFuncs.version & 0xFF;\n\tNPError err;\n\t\n\tif( navMinorVers >= NPVERS_HAS_STREAMOUTPUT )\n\t{\n\t\terr = CallNPN_WriteProc(gNetscapeFuncs.write, instance, stream, len, buffer);\n\t}\n\telse\n\t{\n\t\terr = NPERR_INCOMPATIBLE_VERSION_ERROR;\n\t}\n\treturn err;\n}\n\nNPError\tNPN_DestroyStream(NPP instance, NPStream* stream, NPError reason)\n{\n\tint navMinorVers = gNetscapeFuncs.version & 0xFF;\n\tNPError err;\n\t\n\tif( navMinorVers >= NPVERS_HAS_STREAMOUTPUT )\n\t{\n\t\terr = CallNPN_DestroyStreamProc(gNetscapeFuncs.destroystream, instance, stream, reason);\n\t}\n\telse\n\t{\n\t\terr = NPERR_INCOMPATIBLE_VERSION_ERROR;\n\t}\n\treturn err;\n}\n\nvoid NPN_Status(NPP instance, const char* message)\n{\n\tCallNPN_StatusProc(gNetscapeFuncs.status, instance, message);\n}\n\nconst char* NPN_UserAgent(NPP instance)\n{\n\treturn CallNPN_UserAgentProc(gNetscapeFuncs.uagent, instance);\n}\n\nvoid* NPN_MemAlloc(uint32 size)\n{\n\treturn CallNPN_MemAllocProc(gNetscapeFuncs.memalloc, size);\n}\n\nvoid NPN_MemFree(void* ptr)\n{\n\tCallNPN_MemFreeProc(gNetscapeFuncs.memfree, ptr);\n}\n\nuint32 NPN_MemFlush(uint32 size)\n{\n\treturn CallNPN_MemFlushProc(gNetscapeFuncs.memflush, size);\n}\n\nvoid NPN_ReloadPlugins(NPBool reloadPages)\n{\n\tCallNPN_ReloadPluginsProc(gNetscapeFuncs.reloadplugins, reloadPages);\n}\n\n\nJRIEnv* NPN_GetJavaEnv(void)\n{\n\treturn CallNPN_GetJavaEnvProc( gNetscapeFuncs.getJavaEnv );\n}\n\njref  NPN_GetJavaPeer(NPP instance)\n{\n\treturn CallNPN_GetJavaPeerProc( gNetscapeFuncs.getJavaPeer, instance );\n}\n\nNPError NPN_GetValue(NPP instance, NPNVariable variable, void *value)\n{\n\treturn CallNPN_GetValueProc( gNetscapeFuncs.getvalue, instance, variable, value);\n}\n\nNPError NPN_SetValue(NPP instance, NPPVariable variable, void *value)\n{\n\treturn CallNPN_SetValueProc( gNetscapeFuncs.setvalue, instance, variable, value);\n}\n\nvoid NPN_InvalidateRect(NPP instance, NPRect *rect)\n{\n\tCallNPN_InvalidateRectProc( gNetscapeFuncs.invalidaterect, instance, rect);\n}\n\nvoid NPN_InvalidateRegion(NPP instance, NPRegion region)\n{\n\tCallNPN_InvalidateRegionProc( gNetscapeFuncs.invalidateregion, instance, region);\n}\n\nvoid NPN_ForceRedraw(NPP instance)\n{\n\tCallNPN_ForceRedrawProc( gNetscapeFuncs.forceredraw, instance);\n}\n\n//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\n//\n// Wrapper functions for all calls from Netscape to the plugin.\n// These functions let the plugin developer just create the APIs\n// as documented and defined in npapi.h, without needing to \n// install those functions in the function table or worry about\n// setting up globals for 68K plugins.\n//\n//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\n\nextern \"C\" NPError \tPrivate_Initialize(void);\nextern \"C\" void \t\tPrivate_Shutdown(void);\nextern \"C\" NPError\t\tPrivate_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved);\nextern \"C\" NPError \tPrivate_Destroy(NPP instance, NPSavedData** save);\nextern \"C\" NPError\t\tPrivate_SetWindow(NPP instance, NPWindow* window);\nextern \"C\" NPError\t\tPrivate_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype);\nextern \"C\" NPError\t\tPrivate_DestroyStream(NPP instance, NPStream* stream, NPError reason);\nextern \"C\" int32\t\tPrivate_WriteReady(NPP instance, NPStream* stream);\nextern \"C\" int32\t\tPrivate_Write(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer);\nextern \"C\" void\t\tPrivate_StreamAsFile(NPP instance, NPStream* stream, const char* fname);\nextern \"C\" void\t\tPrivate_Print(NPP instance, NPPrint* platformPrint);\nextern \"C\" int16 \t\tPrivate_HandleEvent(NPP instance, void* event);\nextern \"C\" void        Private_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData);\nextern \"C\" jref\t\tPrivate_GetJavaClass(void);\n\nextern \"C\" NPError Private_Initialize(void)\n{\n\tNPError err;\n\tEnterCodeResource();\n\tPLUGINDEBUGSTR(\"\\pInitialize;g;\");\n\terr = NPP_Initialize();\n\tExitCodeResource();\n\treturn err;\n}\n\nextern \"C\" void Private_Shutdown(void)\n{\n\tEnterCodeResource();\n\tPLUGINDEBUGSTR(\"\\pShutdown;g;\");\n\tNPP_Shutdown();\n\n\t__destroy_global_chain();\n\n\tExitCodeResource();\n}\n\n\nextern \"C\" NPError\tPrivate_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved)\n{\n\tEnterCodeResource();\n\tNPError ret = NPP_New(pluginType, instance, mode, argc, argn, argv, saved);\n\tPLUGINDEBUGSTR(\"\\pNew;g;\");\n\tExitCodeResource();\n\treturn ret;\t\n}\n\nextern \"C\" NPError Private_Destroy(NPP instance, NPSavedData** save)\n{\n\tNPError err;\n\tEnterCodeResource();\n\tPLUGINDEBUGSTR(\"\\pDestroy;g;\");\n\terr = NPP_Destroy(instance, save);\n\tExitCodeResource();\n\treturn err;\n}\n\nextern \"C\" NPError Private_SetWindow(NPP instance, NPWindow* window)\n{\n\tNPError err;\n\tEnterCodeResource();\n\tPLUGINDEBUGSTR(\"\\pSetWindow;g;\");\n\terr = NPP_SetWindow(instance, window);\n\tExitCodeResource();\n\treturn err;\n}\n\nextern \"C\" NPError Private_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype)\n{\n\tNPError err;\n\tEnterCodeResource();\n\tPLUGINDEBUGSTR(\"\\pNewStream;g;\");\n\terr = NPP_NewStream(instance, type, stream, seekable, stype);\n\tExitCodeResource();\n\treturn err;\n}\n\nextern \"C\" int32 Private_WriteReady(NPP instance, NPStream* stream)\n{\n\tint32 result;\n\tEnterCodeResource();\n\tPLUGINDEBUGSTR(\"\\pWriteReady;g;\");\n\tresult = NPP_WriteReady(instance, stream);\n\tExitCodeResource();\n\treturn result;\n}\n\nextern \"C\" int32 Private_Write(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer)\n{\n\tint32 result;\n\tEnterCodeResource();\n\tPLUGINDEBUGSTR(\"\\pWrite;g;\");\n\tresult = NPP_Write(instance, stream, offset, len, buffer);\n\tExitCodeResource();\n\treturn result;\n}\n\nextern \"C\" void Private_StreamAsFile(NPP instance, NPStream* stream, const char* fname)\n{\n\tEnterCodeResource();\n\tPLUGINDEBUGSTR(\"\\pStreamAsFile;g;\");\n\tNPP_StreamAsFile(instance, stream, fname);\n\tExitCodeResource();\n}\n\n\nextern \"C\" NPError Private_DestroyStream(NPP instance, NPStream* stream, NPError reason)\n{\n\tNPError err;\n\tEnterCodeResource();\n\tPLUGINDEBUGSTR(\"\\pDestroyStream;g;\");\n\terr = NPP_DestroyStream(instance, stream, reason);\n\tExitCodeResource();\n\treturn err;\n}\n\nextern \"C\" int16 Private_HandleEvent(NPP instance, void* event)\n{\n\tint16 result;\n\tEnterCodeResource();\n//\tPLUGINDEBUGSTR(\"\\pHandleEvent;g;\");\n\tresult = NPP_HandleEvent(instance, event);\n\tExitCodeResource();\n\treturn result;\n}\n\nextern \"C\" void Private_Print(NPP instance, NPPrint* platformPrint)\n{\n\tEnterCodeResource();\n\tPLUGINDEBUGSTR(\"\\pPrint;g;\");\n\tNPP_Print(instance, platformPrint);\n\tExitCodeResource();\n}\n\nextern \"C\" void Private_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData)\n{\n\tEnterCodeResource();\n\tPLUGINDEBUGSTR(\"\\pURLNotify;g;\");\n\tNPP_URLNotify(instance, url, reason, notifyData);\n\tExitCodeResource();\n}\n\nextern \"C\" jref Private_GetJavaClass(void)\n{\n\tEnterCodeResource();\n\tPLUGINDEBUGSTR(\"\\pGetJavaClass;g;\");\n\n    jref clazz = NPP_GetJavaClass();\n    ExitCodeResource();\n    if (clazz)\n    {\n\t\tJRIEnv* env = NPN_GetJavaEnv();\n\t\treturn (jref)JRI_NewGlobalRef(env, clazz);\n    }\n    return NULL;\n}\n\nvoid SetUpQD(void);\nvoid SetUpQD(void)\n{\n\tProcessSerialNumber PSN;\n\tFSSpec\t\t\t\tmyFSSpec;\n\tStr63\t\t\t\tname;\n\tProcessInfoRec\t\tinfoRec;\n\tOSErr\t\t\t\tresult = noErr;\n\tCFragConnectionID \tconnID;\n\tStr255 \t\t\t\terrName;\n\t\n\t//\n\t// Memorize the plugins resource file \n\t// refnum for later use.\n\t//\n\tgResFile = CurResFile();\n\t\n\t//\n\t// Ask the system if CFM is available.\n\t//\n\tlong response;\n\tOSErr err = Gestalt(gestaltCFMAttr, &response);\n\tBoolean hasCFM = BitTst(&response, 31-gestaltCFMPresent);\n\t\t\t\n\tif (hasCFM)\n\t{\n\t\t//\n\t\t// GetProcessInformation takes a process serial number and \n\t\t// will give us back the name and FSSpec of the application.\n\t\t// See the Process Manager in IM.\n\t\t//\n\t\tinfoRec.processInfoLength = sizeof(ProcessInfoRec);\n\t\tinfoRec.processName = name;\n\t\tinfoRec.processAppSpec = &myFSSpec;\n\t\t\n\t\tPSN.highLongOfPSN = 0;\n\t\tPSN.lowLongOfPSN = kCurrentProcess;\n\t\t\n\t\tresult = GetProcessInformation(&PSN, &infoRec);\n\t\tif (result != noErr)\n\t\t\tPLUGINDEBUGSTR(\"\\pFailed in GetProcessInformation\");\n\t\t}\n\telse\n\t\t//\n\t\t// If no CFM installed, assume it must be a 68K app.\n\t\t//\n\t\tresult = -1;\t\t\n\t\t\n\tif (result == noErr)\n\t{\n\t\t//\n\t\t// Now that we know the app name and FSSpec, we can call GetDiskFragment\n\t\t// to get a connID to use in a subsequent call to FindSymbol (it will also\n\t\t// return the address of main in app, which we ignore).  If GetDiskFragment \n\t\t// returns an error, we assume the app must be 68K.\n\t\t//\n\t\tPtr mainAddr; \t\n\t\tresult =  GetDiskFragment(infoRec.processAppSpec, 0L, 0L, infoRec.processName,\n\t\t\t\t\t\t\t\t  kLoadCFrag, &connID, (Ptr*)&mainAddr, errName);\n\t}\n\n\tif (result == noErr) \n\t{\n\t\t//\n\t\t// The app is a PPC code fragment, so call FindSymbol\n\t\t// to get the exported qd symbol so we can access its\n\t\t// QuickDraw globals.\n\t\t//\n\t\tCFragSymbolClass symClass;\n\t\t//JMM result = FindSymbol(connID, \"\\pqd\", (Ptr*)&gQDPtr, &symClass);\n\t\tif (result != noErr)\n\t\t\tPLUGINDEBUGSTR(\"\\pFailed in FindSymbol qd\");\n\t}\n\telse\n\t{\n\t\t//\n\t\t// The app is 68K, so use its A5 to compute the address\n\t\t// of its QuickDraw globals.\n\t\t//\n\t\t//JMM gQDPtr = (QDGlobals*)(*((long*)SetCurrentA5()) - (sizeof(QDGlobals) - sizeof(GrafPtr)));\n\t}\n\n}\n#if defined ( __APPLE__ ) && defined ( __MACH__ )\nstatic void* TV2FP (void *tvp) {\n\tstatic uint32 glue[6] = { 0x3D800000, 0x618C0000, 0x800C0000, 0x804C0004, 0x7C0903A6, 0x4E800420 };\n\tuint32 * newGlue = NULL ;\n\n\tif (tvp != NULL ) {\n\t\tnewGlue = ( uint32 *) malloc (sizeof(glue));\n\t\tif (newGlue != NULL ) {\n\t\t\tmemcpy(newGlue, glue, sizeof(glue));\n\t\t\tnewGlue[0] |= ((UInt32)tvp >> 16);\n\t\t\tnewGlue[1] |= ((UInt32)tvp & 0xFFFF);\n\t\t\tMakeDataExecutable(newGlue, sizeof(glue));\n\t\t}\n\t}\n\treturn newGlue;\n}\n#else\n#define TV2FP(foo) foo\n#endif \n\nint main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, NPP_ShutdownUPP* unloadUpp);\n\n#if TARGET_RT_MAC_CFM\n#if !TARGET_API_MAC_CARBON\nRoutineDescriptor mainRD = BUILD_ROUTINE_DESCRIPTOR(uppNPP_MainEntryProcInfo, main);\n#else\n#endif\n#endif\n \n\nint main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs, NPP_ShutdownUPP* unloadUpp)\n{\n\tEnterCodeResource();\n\tPLUGINDEBUGSTR(\"\\pmain\");\n\n\t__InitCode__();\n\n\tNPError err = NPERR_NO_ERROR;\n\t\n\t//\n\t// Ensure that everything Netscape passed us is valid!\n\t//\n\tif ((nsTable == NULL) || (pluginFuncs == NULL) || (unloadUpp == NULL))\n\t\terr = NPERR_INVALID_FUNCTABLE_ERROR;\n\t\n\t//\n\t// Check the major version passed in Netscapes function table.\n\t// We wont load if the major version is newer than what we expect.\n\t// Also check that the function tables passed in are big enough for\n\t// all the functions we need (they could be bigger, if Netscape added\n\t// new APIs, but thats OK with us -- well just ignore them).\n\t//\n\tif (err == NPERR_NO_ERROR)\n\t{\n\t\tif ((nsTable->version >> 8) > NP_VERSION_MAJOR)\t\t// Major version is in high byte\n\t\t\terr = NPERR_INCOMPATIBLE_VERSION_ERROR;\n//\t\tif (nsTable->size < sizeof(NPNetscapeFuncs))\n//\t\t\terr = NPERR_INVALID_FUNCTABLE_ERROR;\n//\t\tif (pluginFuncs->size < sizeof(NPPluginFuncs))\t\t\n//\t\t\terr = NPERR_INVALID_FUNCTABLE_ERROR;\n\t}\n\t\t\n\t\n\tif (err == NPERR_NO_ERROR)\n\t{\n\t\t//\n\t\t// Copy all the fields of Netscapes function table into our\n\t\t// copy so we can call back into Netscape later.  Note that\n\t\t// we need to copy the fields one by one, rather than assigning\n\t\t// the whole structure, because the Netscape function table\n\t\t// could actually be bigger than what we expect.\n\t\t//\n\t\t\n\t\tint navMinorVers = nsTable->version & 0xFF;\n\n\t\tgNetscapeFuncs.version = nsTable->version;\n\t\tgNetscapeFuncs.size = nsTable->size;\n                gNetscapeFuncs.version          = nsTable->version;\n                gNetscapeFuncs.size             = nsTable->size;\n                gNetscapeFuncs.posturl          = (NPN_PostURLUPP)TV2FP( nsTable->posturl);\n                gNetscapeFuncs.geturl           = (NPN_GetURLUPP)TV2FP( nsTable->geturl);\n                gNetscapeFuncs.requestread      = (NPN_RequestReadUPP)TV2FP( nsTable->requestread);\n                gNetscapeFuncs.newstream        = (NPN_NewStreamUPP)TV2FP(nsTable->newstream);\n                gNetscapeFuncs.write            = (NPN_WriteUPP)TV2FP(nsTable->write);\n                gNetscapeFuncs.destroystream    = (NPN_DestroyStreamUPP)TV2FP( nsTable->destroystream);\n                gNetscapeFuncs.status           = (NPN_StatusUPP)TV2FP(nsTable->status);\n                gNetscapeFuncs.uagent           = (NPN_UserAgentUPP)TV2FP(nsTable->uagent);\n                gNetscapeFuncs.memalloc         = (NPN_MemAllocUPP)TV2FP(nsTable->memalloc);\n                gNetscapeFuncs.memfree          = (NPN_MemFreeUPP)TV2FP(nsTable->memfree);\n                gNetscapeFuncs.memflush         = (NPN_MemFlushUPP)TV2FP(nsTable->memflush);\n                gNetscapeFuncs.reloadplugins    = (NPN_ReloadPluginsUPP)TV2FP( nsTable->reloadplugins);\n                if( navMinorVers >= NPVERS_HAS_LIVECONNECT ){ \n                        gNetscapeFuncs.getJavaEnv   = (NPN_GetJavaEnvUPP)TV2FP(nsTable->getJavaEnv);\n                    gNetscapeFuncs.getJavaPeer  = (NPN_GetJavaPeerUPP)TV2FP( nsTable->getJavaPeer);\n                \n                \n                }                                     \n                if( navMinorVers >= NPVERS_HAS_NOTIFICATION ){ \n                        gNetscapeFuncs.geturlnotify     = (NPN_GetURLNotifyUPP)TV2FP( nsTable->geturlnotify);\n                    gNetscapeFuncs.posturlnotify    = (NPN_PostURLNotifyUPP)TV2FP( nsTable->posturlnotify);\n                \n                }\n                \n                gNetscapeFuncs.getvalue         = (NPN_GetValueUPP)TV2FP( nsTable->getvalue);\n                gNetscapeFuncs.setvalue         = (NPN_SetValueUPP)TV2FP( nsTable->setvalue);\n                gNetscapeFuncs.invalidaterect   = (NPN_InvalidateRectUPP)TV2FP( nsTable->invalidaterect);\n                gNetscapeFuncs.invalidateregion = (NPN_InvalidateRegionUPP)TV2FP( nsTable->invalidateregion);\n                gNetscapeFuncs.forceredraw      = (NPN_ForceRedrawUPP)TV2FP( nsTable->forceredraw);\n\t\t\n\t\t//\n\t\t// Set up the plugin function table that Netscape will use to\n\t\t// call us.  Netscape needs to know about our version and size\n\t\t// and have a UniversalProcPointer for every function we implement.\n\t\t//\n\t\tpluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR;\n\t\tpluginFuncs->size = sizeof(NPPluginFuncs);\n\t\tpluginFuncs->newp = NewNPP_NewProc(Private_New);\n\t\tpluginFuncs->destroy = NewNPP_DestroyProc(Private_Destroy);\n\t\tpluginFuncs->setwindow = NewNPP_SetWindowProc(Private_SetWindow);\n\t\tpluginFuncs->newstream = NewNPP_NewStreamProc(Private_NewStream);\n\t\tpluginFuncs->destroystream = NewNPP_DestroyStreamProc(Private_DestroyStream);\n\t\tpluginFuncs->asfile = NewNPP_StreamAsFileProc(Private_StreamAsFile);\n\t\tpluginFuncs->writeready = NewNPP_WriteReadyProc(Private_WriteReady);\n\t\tpluginFuncs->write = NewNPP_WriteProc(Private_Write);\n\t\tpluginFuncs->print = NewNPP_PrintProc(Private_Print);\n\t\tpluginFuncs->event = NewNPP_HandleEventProc(Private_HandleEvent);\t\n\t\tif( navMinorVers >= NPVERS_HAS_NOTIFICATION )\n\t\t{\t\n\t\t\tpluginFuncs->urlnotify = NewNPP_URLNotifyProc(Private_URLNotify);\t\t\t\n\t\t}\n\t\tif( navMinorVers >= NPVERS_HAS_LIVECONNECT )\n\t\t{\n\t\t\tpluginFuncs->javaClass\t= (JRIGlobalRef) Private_GetJavaClass();\n\t\t}\n\t\t*unloadUpp = NewNPP_ShutdownProc(Private_Shutdown);\n\t\tSetUpQD();\n\t\terr = Private_Initialize();\n\t}\n\t\n\tExitCodeResource();\n\treturn err;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/PluginSDK 4.01a/Common/npwin.cpp",
    "content": "/* npwin.cpp */\n\n//\\\\// INCLUDE\n//#include \"StdAfx.h\"\n\n// netscape\n#ifndef _NPAPI_H_\n#include \"npapi.h\"\n#endif\n#ifndef _NPUPP_H_\n#include \"npupp.h\"\n#endif\n\n//\\\\// DEFINE\n#ifdef WIN32\n    #define NP_EXPORT _declspec( dllexport )\n#else\n    #define NP_EXPORT _export\n#endif\n\n//\\\\// GLOBAL DATA\nNPNetscapeFuncs* g_pNavigatorFuncs = 0;\nJRIGlobalRef Private_GetJavaClass(void);\n\n//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\.\n////\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//.\n// Private_GetJavaClass (global function)\n//\n//\tGiven a Java class reference (thru NPP_GetJavaClass) inform JRT\n//\tof this class existence\n//\nJRIGlobalRef\nPrivate_GetJavaClass(void)\n{\n    jref clazz = NPP_GetJavaClass();\n    if (clazz) {\n\t\tJRIEnv* env = NPN_GetJavaEnv();\n\t\treturn JRI_NewGlobalRef(env, clazz);\n    }\n    return NULL;\n}\n\n//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\.\n////\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//.\n//\t\t\t\t\t\tPLUGIN DLL entry points   \n//\n// These are the Windows specific DLL entry points. They must be exoprted\n//\n\n// we need these to be global since we have to fill one of its field\n// with a data (class) which requires knowlwdge of the navigator\n// jump-table. This jump table is known at Initialize time (NP_Initialize)\n// which is called after NP_GetEntryPoint\nstatic NPPluginFuncs* g_pluginFuncs;\n\n//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\.\n////\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//.\n// NP_GetEntryPoints\n//\n//\tfills in the func table used by Navigator to call entry points in\n//  plugin DLL.  Note that these entry points ensure that DS is loaded\n//  by using the NP_LOADDS macro, when compiling for Win16\n//\nNPError WINAPI NP_EXPORT\nNP_GetEntryPoints(NPPluginFuncs* pFuncs)\n{\n    // trap a NULL ptr \n    if(pFuncs == NULL)\n        return NPERR_INVALID_FUNCTABLE_ERROR;\n\n    // if the plugin's function table is smaller than the plugin expects,\n    // then they are incompatible, and should return an error \n\n    pFuncs->version       = (NP_VERSION_MAJOR << 8) | NP_VERSION_MINOR;\n    pFuncs->newp          = NPP_New;\n    pFuncs->destroy       = NPP_Destroy;\n    pFuncs->setwindow     = NPP_SetWindow;\n    pFuncs->newstream     = NPP_NewStream;\n    pFuncs->destroystream = NPP_DestroyStream;\n    pFuncs->asfile        = NPP_StreamAsFile;\n    pFuncs->writeready    = NPP_WriteReady;\n    pFuncs->write         = NPP_Write;\n    pFuncs->print         = NPP_Print;\n    pFuncs->event         = 0;       /// reserved \n\n\tg_pluginFuncs\t\t  = pFuncs;\n\n    return NPERR_NO_ERROR;\n}\n\n//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\.\n////\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//.\n// NP_Initialize\n//\n//\tcalled immediately after the plugin DLL is loaded\n//\nNPError WINAPI NP_EXPORT \nNP_Initialize(NPNetscapeFuncs* pFuncs)\n{\n    // trap a NULL ptr \n    if(pFuncs == NULL)\n        return NPERR_INVALID_FUNCTABLE_ERROR;\n\n    g_pNavigatorFuncs = pFuncs; // save it for future reference \n\n    // if the plugin's major ver level is lower than the Navigator's,\n    // then they are incompatible, and should return an error \n    if(HIBYTE(pFuncs->version) > NP_VERSION_MAJOR)\n        return NPERR_INCOMPATIBLE_VERSION_ERROR;\n\n\t// We have to defer these assignments until g_pNavigatorFuncs is set\n    int navMinorVers = g_pNavigatorFuncs->version & 0xFF;\n\n\tif( navMinorVers >= NPVERS_HAS_NOTIFICATION ) {\n\t\tg_pluginFuncs->urlnotify = NPP_URLNotify;\n\t}\n\t\n#ifdef WIN32 // An ugly hack, because Win16 lags behind in Java\n\tif( navMinorVers >= NPVERS_HAS_LIVECONNECT ) {\n#else\n\tif( navMinorVers >= NPVERS_WIN16_HAS_LIVECONNECT )\n#endif // WIN32\n\t\tg_pluginFuncs->javaClass = Private_GetJavaClass();\n\t}\n\n\t// NPP_Initialize is a standard (cross-platform) initialize function.\n    return NPP_Initialize();\n}\n\n//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\.\n////\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//.\n// NP_Shutdown\n//\n//\tcalled immediately before the plugin DLL is unloaded.\n//\tThis functio shuold check for some ref count on the dll to see if it is\n//\tunloadable or it needs to stay in memory. \n//\nNPError WINAPI NP_EXPORT \nNP_Shutdown()\n{\n    NPP_Shutdown();\n    g_pNavigatorFuncs = NULL;\n    return NPERR_NO_ERROR;\n}\n\n//\t\t\t\t\t\tEND - PLUGIN DLL entry points   \n////\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//.\n//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\//\\\\.\n\n/*    NAVIGATOR Entry points    */\n\n/* These entry points expect to be called from within the plugin.  The\n   noteworthy assumption is that DS has already been set to point to the\n   plugin's DLL data segment.  Don't call these functions from outside\n   the plugin without ensuring DS is set to the DLLs data segment first,\n   typically using the NP_LOADDS macro\n*/\n\n/* returns the major/minor version numbers of the Plugin API for the plugin\n   and the Navigator\n*/\nvoid NPN_Version(int* plugin_major, int* plugin_minor, int* netscape_major, int* netscape_minor)\n{\n    *plugin_major   = NP_VERSION_MAJOR;\n    *plugin_minor   = NP_VERSION_MINOR;\n    *netscape_major = HIBYTE(g_pNavigatorFuncs->version);\n    *netscape_minor = LOBYTE(g_pNavigatorFuncs->version);\n}\n\n/* causes the specified URL to be fetched and streamed in\n*/\nNPError NPN_GetURLNotify(NPP instance, const char *url, const char *target, void* notifyData)\n\n{\n\tint navMinorVers = g_pNavigatorFuncs->version & 0xFF;\n\tNPError err;\n\tif( navMinorVers >= NPVERS_HAS_NOTIFICATION ) {\n\t\terr = g_pNavigatorFuncs->geturlnotify(instance, url, target, notifyData);\n\t}\n\telse {\n\t\terr = NPERR_INCOMPATIBLE_VERSION_ERROR;\n\t}\n\treturn err;\n}\n\n\nNPError NPN_GetURL(NPP instance, const char *url, const char *target)\n{\n    return g_pNavigatorFuncs->geturl(instance, url, target);\n}\n\nNPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file, void* notifyData)\n{\n\tint navMinorVers = g_pNavigatorFuncs->version & 0xFF;\n\tNPError err;\n\tif( navMinorVers >= NPVERS_HAS_NOTIFICATION ) {\n\t\terr = g_pNavigatorFuncs->posturlnotify(instance, url, window, len, buf, file, notifyData);\n\t}\n\telse {\n\t\terr = NPERR_INCOMPATIBLE_VERSION_ERROR;\n\t}\n\treturn err;\n}\n\n\nNPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file)\n{\n    return g_pNavigatorFuncs->posturl(instance, url, window, len, buf, file);\n}\n\n/* Requests that a number of bytes be provided on a stream.  Typically\n   this would be used if a stream was in \"pull\" mode.  An optional\n   position can be provided for streams which are seekable.\n*/\nNPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList)\n{\n    return g_pNavigatorFuncs->requestread(stream, rangeList);\n}\n\n/* Creates a new stream of data from the plug-in to be interpreted\n   by Netscape in the current window.\n*/\nNPError NPN_NewStream(NPP instance, NPMIMEType type, \n\t\t\t\t\t\t\t\tconst char* target, NPStream** stream)\n{\n\tint navMinorVersion = g_pNavigatorFuncs->version & 0xFF;\n\tNPError err;\n\n\tif( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT ) {\n\t\terr = g_pNavigatorFuncs->newstream(instance, type, target, stream);\n\t}\n\telse {\n\t\terr = NPERR_INCOMPATIBLE_VERSION_ERROR;\n\t}\n\treturn err;\n}\n\n/* Provides len bytes of data.\n*/\nint32 NPN_Write(NPP instance, NPStream *stream,\n                int32 len, void *buffer)\n{\n\tint navMinorVersion = g_pNavigatorFuncs->version & 0xFF;\n\tint32 result;\n\n\tif( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT ) {\n\t\tresult = g_pNavigatorFuncs->write(instance, stream, len, buffer);\n\t}\n\telse {\n\t\tresult = -1;\n\t}\n\treturn result;\n}\n\n/* Closes a stream object.  \nreason indicates why the stream was closed.\n*/\nNPError NPN_DestroyStream(NPP instance, NPStream* stream, NPError reason)\n{\n\tint navMinorVersion = g_pNavigatorFuncs->version & 0xFF;\n\tNPError err;\n\n\tif( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT ) {\n\t\terr = g_pNavigatorFuncs->destroystream(instance, stream, reason);\n\t}\n\telse {\n\t\terr = NPERR_INCOMPATIBLE_VERSION_ERROR;\n\t}\n\treturn err;\n}\n\n/* Provides a text status message in the Netscape client user interface\n*/\nvoid NPN_Status(NPP instance, const char *message)\n{\n    g_pNavigatorFuncs->status(instance, message);\n}\n\n/* returns the user agent string of Navigator, which contains version info\n*/\nconst char* NPN_UserAgent(NPP instance)\n{\n    return g_pNavigatorFuncs->uagent(instance);\n}\n\n/* allocates memory from the Navigator's memory space.  Necessary so that\n   saved instance data may be freed by Navigator when exiting.\n*/\n\n\nvoid* NPN_MemAlloc(uint32 size)\n{\n    return g_pNavigatorFuncs->memalloc(size);\n}\n\n/* reciprocal of MemAlloc() above\n*/\nvoid NPN_MemFree(void* ptr)\n{\n    g_pNavigatorFuncs->memfree(ptr);\n}\n\n/* private function to Netscape.  do not use!\n*/\nvoid NPN_ReloadPlugins(NPBool reloadPages)\n{\n    g_pNavigatorFuncs->reloadplugins(reloadPages);\n}\n\nJRIEnv* NPN_GetJavaEnv(void)\n{\n\treturn g_pNavigatorFuncs->getJavaEnv();\n}\n\njref NPN_GetJavaPeer(NPP instance)\n{\n\treturn g_pNavigatorFuncs->getJavaPeer(instance);\n}\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/PluginSDK 4.01a/Include/jni.h",
    "content": "/*\n * @(#)jni.h\t1.26 97/01/27\n *\n * Copyright (c) 1993-1996 Sun Microsystems, Inc. All Rights Reserved.\n *\n * Permission to use, copy, modify, and distribute this software\n * and its documentation for NON-COMMERCIAL purposes and without\n * fee is hereby granted provided that this copyright notice\n * appears in all copies.\n *\n * The Java source code is the confidential and proprietary information\n * of Sun Microsystems, Inc. (\"Confidential Information\").  You shall\n * not disclose such Confidential Information and shall use it only in\n * accordance with the terms of the license agreement you entered into\n * with Sun.\n *\n * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF\n * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\n * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR\n * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR\n * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.\n */\n\n/* \n * We used part of Netscape's Java Runtime Interface (JRI) as the starting\n * point of our design and implementation.\n */\n\n/******************************************************************************\n * Java Runtime Interface\n * Copyright (c) 1996 Netscape Communications Corporation. All rights reserved.\n *****************************************************************************/\n\n#ifndef JNI_H\n#define JNI_H\n\n#include <stdio.h>\n#include <stdarg.h>\n\n/* jni_md.h contains the machine-dependent typedefs for jbyte, jint \n   and jlong */ \n\n#include \"jni_md.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*\n * JNI Types\n */\n\ntypedef unsigned char\tjboolean;\ntypedef unsigned short\tjchar;\ntypedef short\t\tjshort;\ntypedef float\t\tjfloat;\ntypedef double\t\tjdouble;\n\ntypedef jint            jsize;\n\n#ifdef __cplusplus\n\nclass _jobject {};\nclass _jclass : public _jobject {};\nclass _jthrowable : public _jobject {};\nclass _jstring : public _jobject {};\nclass _jarray : public _jobject {};\nclass _jbooleanArray : public _jarray {};\nclass _jbyteArray : public _jarray {};\nclass _jcharArray : public _jarray {};\nclass _jshortArray : public _jarray {};\nclass _jintArray : public _jarray {};\nclass _jlongArray : public _jarray {};\nclass _jfloatArray : public _jarray {};\nclass _jdoubleArray : public _jarray {};\nclass _jobjectArray : public _jarray {};\n\ntypedef _jobject *jobject;\ntypedef _jclass *jclass;\ntypedef _jthrowable *jthrowable;\ntypedef _jstring *jstring;\ntypedef _jarray *jarray;\ntypedef _jbooleanArray *jbooleanArray;\ntypedef _jbyteArray *jbyteArray;\ntypedef _jcharArray *jcharArray;\ntypedef _jshortArray *jshortArray;\ntypedef _jintArray *jintArray;\ntypedef _jlongArray *jlongArray;\ntypedef _jfloatArray *jfloatArray;\ntypedef _jdoubleArray *jdoubleArray;\ntypedef _jobjectArray *jobjectArray;\n\n#else\n\nstruct _jobject;\n\ntypedef struct _jobject *jobject;\ntypedef jobject jclass;\ntypedef jobject jthrowable;\ntypedef jobject jstring;\ntypedef jobject jarray;\ntypedef jarray jbooleanArray;\ntypedef jarray jbyteArray;\ntypedef jarray jcharArray;\ntypedef jarray jshortArray;\ntypedef jarray jintArray;\ntypedef jarray jlongArray;\ntypedef jarray jfloatArray;\ntypedef jarray jdoubleArray;\ntypedef jarray jobjectArray;\n\n#endif\n\ntypedef jobject jref; /* For transition---not meant to be part of public \n\t\t\t API anymore.*/\n\ntypedef union jvalue {\n    jboolean z;\n    jbyte    b;\n    jchar    c;\n    jshort   s;\n    jint     i;\n    jlong    j;\n    jfloat   f;\n    jdouble  d;\n    jobject  l;\n} jvalue;\n\nstruct _jfieldID;\ntypedef struct _jfieldID *jfieldID;\n\nstruct _jmethodID;\ntypedef struct _jmethodID *jmethodID;\n\n/*\n * jboolean constants\n */\n\n#define JNI_FALSE 0\n#define JNI_TRUE 1\n\n/*\n * possible return values for JNI functions.\n */\n\n#define JNI_OK 0\n#define JNI_ERR (-1)\n\n/*\n * used in ReleaseScalarArrayElements\n */\n  \n#define JNI_COMMIT 1\n#define JNI_ABORT 2\n\n/*\n * used in RegisterNatives to describe native method name, signature,\n * and function pointer.\n */\n\ntypedef struct {\n    char *name;\n    char *signature;\n    void *fnPtr;\n} JNINativeMethod;\n\n/*\n * JNI Native Method Interface.\n */\n\nstruct JNINativeInterface_;\n\nstruct JNIEnv_;\n\n#ifdef __cplusplus\ntypedef JNIEnv_ JNIEnv;\n#else\ntypedef const struct JNINativeInterface_ *JNIEnv;\n#endif\n\n/*\n * JNI Invocation Interface.\n */\n\nstruct JNIInvokeInterface_;\n\nstruct JavaVM_;\n\n#ifdef __cplusplus\ntypedef JavaVM_ JavaVM;\n#else\ntypedef const struct JNIInvokeInterface_ *JavaVM;\n#endif\n\nstruct JNINativeInterface_ {\n    void *reserved0;\n    void *reserved1;\n    void *reserved2;\n\n    void *reserved3;\n    jint (*GetVersion)(JNIEnv *env);\n\n    jclass (*DefineClass)\n      (JNIEnv *env, const char *name, jobject loader, const jbyte *buf, \n       jsize len);\n    jclass (*FindClass)\n      (JNIEnv *env, const char *name);\n\n    void *reserved4;\n    void *reserved5;\n    void *reserved6;\n\n    jclass (*GetSuperclass)\n      (JNIEnv *env, jclass sub);\n    jboolean (*IsAssignableFrom)\n      (JNIEnv *env, jclass sub, jclass sup);\n    void *reserved7;\n\n\n    jint (*_Throw)\n      (JNIEnv *env, jthrowable obj);\n    jint (*ThrowNew)\n      (JNIEnv *env, jclass clazz, const char *msg);\n    jthrowable (*ExceptionOccurred)\n      (JNIEnv *env);\n    void (*ExceptionDescribe)\n      (JNIEnv *env);\n    void (*ExceptionClear)\n      (JNIEnv *env);\n    void (*FatalError)\n      (JNIEnv *env, const char *msg);\n    void *reserved8;\n    void *reserved9;\n\n    jobject (*NewGlobalRef)\n      (JNIEnv *env, jobject lobj);\n    void (*DeleteGlobalRef)\n      (JNIEnv *env, jobject gref);\n    void (*DeleteLocalRef)\n      (JNIEnv *env, jobject obj);\n    jboolean (*IsSameObject)\n      (JNIEnv *env, jobject obj1, jobject obj2);\n    void *reserved10;\n    void *reserved11;\n\n    jobject (*AllocObject)\n      (JNIEnv *env, jclass clazz);\n    jobject (*NewObject)\n      (JNIEnv *env, jclass clazz, jmethodID methodID, ...);\n    jobject (*NewObjectV)\n      (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);\n    jobject (*NewObjectA)\n      (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);\n\n    jclass (*GetObjectClass)\n      (JNIEnv *env, jobject obj);\n    jboolean (*IsInstanceOf)\n      (JNIEnv *env, jobject obj, jclass clazz);\n\n    jmethodID (*GetMethodID)\n      (JNIEnv *env, jclass clazz, const char *name, const char *sig);\n\n    jobject (*CallObjectMethod)\n      (JNIEnv *env, jobject obj, jmethodID methodID, ...);\n    jobject (*CallObjectMethodV)\n      (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);\n    jobject (*CallObjectMethodA)\n      (JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args);\n\n    jboolean (*CallBooleanMethod)\n      (JNIEnv *env, jobject obj, jmethodID methodID, ...);\n    jboolean (*CallBooleanMethodV)\n      (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);\n    jboolean (*CallBooleanMethodA)\n      (JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args);\n\n    jbyte (*CallByteMethod)\n      (JNIEnv *env, jobject obj, jmethodID methodID, ...);\n    jbyte (*CallByteMethodV)\n      (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);\n    jbyte (*CallByteMethodA)\n      (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);\n\n    jchar (*CallCharMethod)\n      (JNIEnv *env, jobject obj, jmethodID methodID, ...);\n    jchar (*CallCharMethodV)\n      (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);\n    jchar (*CallCharMethodA)\n      (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);\n\n    jshort (*CallShortMethod)\n      (JNIEnv *env, jobject obj, jmethodID methodID, ...);\n    jshort (*CallShortMethodV)\n      (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);\n    jshort (*CallShortMethodA)\n      (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);\n\n    jint (*CallIntMethod)\n      (JNIEnv *env, jobject obj, jmethodID methodID, ...);\n    jint (*CallIntMethodV)\n      (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);\n    jint (*CallIntMethodA)\n      (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);\n\n    jlong (*CallLongMethod)\n      (JNIEnv *env, jobject obj, jmethodID methodID, ...);\n    jlong (*CallLongMethodV)\n      (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);\n    jlong (*CallLongMethodA)\n      (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);\n\n    jfloat (*CallFloatMethod)\n      (JNIEnv *env, jobject obj, jmethodID methodID, ...);\n    jfloat (*CallFloatMethodV)\n      (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);\n    jfloat (*CallFloatMethodA)\n      (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);\n\n    jdouble (*CallDoubleMethod)\n      (JNIEnv *env, jobject obj, jmethodID methodID, ...);\n    jdouble (*CallDoubleMethodV)\n      (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);\n    jdouble (*CallDoubleMethodA)\n      (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);\n\n    void (*CallVoidMethod)\n      (JNIEnv *env, jobject obj, jmethodID methodID, ...);\n    void (*CallVoidMethodV)\n      (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);\n    void (*CallVoidMethodA)\n      (JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args);\n\n    jobject (*CallNonvirtualObjectMethod)\n      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);\n    jobject (*CallNonvirtualObjectMethodV)\n      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, \n       va_list args);\n    jobject (*CallNonvirtualObjectMethodA)\n      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, \n       jvalue * args);\n\n    jboolean (*CallNonvirtualBooleanMethod)\n      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);\n    jboolean (*CallNonvirtualBooleanMethodV)\n      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,\n       va_list args);\n    jboolean (*CallNonvirtualBooleanMethodA)\n      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,\n       jvalue * args);\n\n    jbyte (*CallNonvirtualByteMethod)\n      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);\n    jbyte (*CallNonvirtualByteMethodV)\n      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,\n       va_list args);\n    jbyte (*CallNonvirtualByteMethodA)\n      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, \n       jvalue *args);\n\n    jchar (*CallNonvirtualCharMethod)\n      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);\n    jchar (*CallNonvirtualCharMethodV)\n      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,\n       va_list args);\n    jchar (*CallNonvirtualCharMethodA)\n      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,\n       jvalue *args);\n\n    jshort (*CallNonvirtualShortMethod)\n      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);\n    jshort (*CallNonvirtualShortMethodV)\n      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,\n       va_list args);\n    jshort (*CallNonvirtualShortMethodA)\n      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,\n       jvalue *args);\n\n    jint (*CallNonvirtualIntMethod)\n      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);\n    jint (*CallNonvirtualIntMethodV)\n      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,\n       va_list args);\n    jint (*CallNonvirtualIntMethodA)\n      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,\n       jvalue *args);\n\n    jlong (*CallNonvirtualLongMethod)\n      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);\n    jlong (*CallNonvirtualLongMethodV)\n      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,\n       va_list args);\n    jlong (*CallNonvirtualLongMethodA)\n      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, \n       jvalue *args);\n\n    jfloat (*CallNonvirtualFloatMethod)\n      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);\n    jfloat (*CallNonvirtualFloatMethodV)\n      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,\n       va_list args);\n    jfloat (*CallNonvirtualFloatMethodA)\n      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,\n       jvalue *args);\n\n    jdouble (*CallNonvirtualDoubleMethod)\n      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);\n    jdouble (*CallNonvirtualDoubleMethodV)\n      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,\n       va_list args);\n    jdouble (*CallNonvirtualDoubleMethodA)\n      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,\n       jvalue *args);\n\n    void (*CallNonvirtualVoidMethod)\n      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);\n    void (*CallNonvirtualVoidMethodV)\n      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,\n       va_list args);\n    void (*CallNonvirtualVoidMethodA)\n      (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,\n       jvalue * args);\n\n    jfieldID (*GetFieldID)\n      (JNIEnv *env, jclass clazz, const char *name, const char *sig);\n\n    jobject (*GetObjectField)\n      (JNIEnv *env, jobject obj, jfieldID fieldID);\n    jboolean (*GetBooleanField)\n      (JNIEnv *env, jobject obj, jfieldID fieldID);\n    jbyte (*GetByteField)\n      (JNIEnv *env, jobject obj, jfieldID fieldID);\n    jchar (*GetCharField)\n      (JNIEnv *env, jobject obj, jfieldID fieldID);\n    jshort (*GetShortField)\n      (JNIEnv *env, jobject obj, jfieldID fieldID);\n    jint (*GetIntField)\n      (JNIEnv *env, jobject obj, jfieldID fieldID);\n    jlong (*GetLongField)\n      (JNIEnv *env, jobject obj, jfieldID fieldID);\n    jfloat (*GetFloatField)\n      (JNIEnv *env, jobject obj, jfieldID fieldID);\n    jdouble (*GetDoubleField)\n      (JNIEnv *env, jobject obj, jfieldID fieldID);\n\n    void (*SetObjectField)\n      (JNIEnv *env, jobject obj, jfieldID fieldID, jobject val);\n    void (*SetBooleanField)\n      (JNIEnv *env, jobject obj, jfieldID fieldID, jboolean val);\n    void (*SetByteField)\n      (JNIEnv *env, jobject obj, jfieldID fieldID, jbyte val);\n    void (*SetCharField)\n      (JNIEnv *env, jobject obj, jfieldID fieldID, jchar val);\n    void (*SetShortField)\n      (JNIEnv *env, jobject obj, jfieldID fieldID, jshort val);\n    void (*SetIntField)\n      (JNIEnv *env, jobject obj, jfieldID fieldID, jint val);\n    void (*SetLongField)\n      (JNIEnv *env, jobject obj, jfieldID fieldID, jlong val);\n    void (*SetFloatField)\n      (JNIEnv *env, jobject obj, jfieldID fieldID, jfloat val);\n    void (*SetDoubleField)\n      (JNIEnv *env, jobject obj, jfieldID fieldID, jdouble val);\n\n    jmethodID (*GetStaticMethodID)\n      (JNIEnv *env, jclass clazz, const char *name, const char *sig);\n\n    jobject (*CallStaticObjectMethod)\n      (JNIEnv *env, jclass clazz, jmethodID methodID, ...);\n    jobject (*CallStaticObjectMethodV)\n      (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);\n    jobject (*CallStaticObjectMethodA)\n      (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);\n\n    jboolean (*CallStaticBooleanMethod)\n      (JNIEnv *env, jclass clazz, jmethodID methodID, ...);\n    jboolean (*CallStaticBooleanMethodV)\n      (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);\n    jboolean (*CallStaticBooleanMethodA)\n      (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);\n\n    jbyte (*CallStaticByteMethod)\n      (JNIEnv *env, jclass clazz, jmethodID methodID, ...);\n    jbyte (*CallStaticByteMethodV)\n      (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);\n    jbyte (*CallStaticByteMethodA)\n      (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);\n\n    jchar (*CallStaticCharMethod)\n      (JNIEnv *env, jclass clazz, jmethodID methodID, ...);\n    jchar (*CallStaticCharMethodV)\n      (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);\n    jchar (*CallStaticCharMethodA)\n      (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);\n\n    jshort (*CallStaticShortMethod)\n      (JNIEnv *env, jclass clazz, jmethodID methodID, ...);\n    jshort (*CallStaticShortMethodV)\n      (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);\n    jshort (*CallStaticShortMethodA)\n      (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);\n\n    jint (*CallStaticIntMethod)\n      (JNIEnv *env, jclass clazz, jmethodID methodID, ...);\n    jint (*CallStaticIntMethodV)\n      (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);\n    jint (*CallStaticIntMethodA)\n      (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);\n\n    jlong (*CallStaticLongMethod)\n      (JNIEnv *env, jclass clazz, jmethodID methodID, ...);\n    jlong (*CallStaticLongMethodV)\n      (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);\n    jlong (*CallStaticLongMethodA)\n      (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);\n\n    jfloat (*CallStaticFloatMethod)\n      (JNIEnv *env, jclass clazz, jmethodID methodID, ...);\n    jfloat (*CallStaticFloatMethodV)\n      (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);\n    jfloat (*CallStaticFloatMethodA)\n      (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);\n\n    jdouble (*CallStaticDoubleMethod)\n      (JNIEnv *env, jclass clazz, jmethodID methodID, ...);\n    jdouble (*CallStaticDoubleMethodV)\n      (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);\n    jdouble (*CallStaticDoubleMethodA)       \n      (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);\n\n    void (*CallStaticVoidMethod)\n      (JNIEnv *env, jclass cls, jmethodID methodID, ...);\n    void (*CallStaticVoidMethodV)\n      (JNIEnv *env, jclass cls, jmethodID methodID, va_list args);\n    void (*CallStaticVoidMethodA)\n      (JNIEnv *env, jclass cls, jmethodID methodID, jvalue * args);\n\n    jfieldID (*GetStaticFieldID)\n      (JNIEnv *env, jclass clazz, const char *name, const char *sig);\n    jobject (*GetStaticObjectField)\n      (JNIEnv *env, jclass clazz, jfieldID fieldID);\n    jboolean (*GetStaticBooleanField)\n      (JNIEnv *env, jclass clazz, jfieldID fieldID);\n    jbyte (*GetStaticByteField)\n      (JNIEnv *env, jclass clazz, jfieldID fieldID);\n    jchar (*GetStaticCharField)\n      (JNIEnv *env, jclass clazz, jfieldID fieldID);\n    jshort (*GetStaticShortField)\n      (JNIEnv *env, jclass clazz, jfieldID fieldID);\n    jint (*GetStaticIntField)\n      (JNIEnv *env, jclass clazz, jfieldID fieldID);\n    jlong (*GetStaticLongField)\n      (JNIEnv *env, jclass clazz, jfieldID fieldID);\n    jfloat (*GetStaticFloatField)\n      (JNIEnv *env, jclass clazz, jfieldID fieldID);\n    jdouble (*GetStaticDoubleField)\n      (JNIEnv *env, jclass clazz, jfieldID fieldID);\n\n    void (*SetStaticObjectField)\n      (JNIEnv *env, jclass clazz, jfieldID fieldID, jobject value);\n    void (*SetStaticBooleanField)\n      (JNIEnv *env, jclass clazz, jfieldID fieldID, jboolean value);\n    void (*SetStaticByteField)\n      (JNIEnv *env, jclass clazz, jfieldID fieldID, jbyte value);\n    void (*SetStaticCharField)\n      (JNIEnv *env, jclass clazz, jfieldID fieldID, jchar value);\n    void (*SetStaticShortField)\n      (JNIEnv *env, jclass clazz, jfieldID fieldID, jshort value);\n    void (*SetStaticIntField)\n      (JNIEnv *env, jclass clazz, jfieldID fieldID, jint value);\n    void (*SetStaticLongField)\n      (JNIEnv *env, jclass clazz, jfieldID fieldID, jlong value);\n    void (*SetStaticFloatField)\n      (JNIEnv *env, jclass clazz, jfieldID fieldID, jfloat value);\n    void (*SetStaticDoubleField)\n      (JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value);\n\n    jstring (*NewString)\n      (JNIEnv *env, const jchar *unicode, jsize len);\n    jsize (*GetStringLength)\n      (JNIEnv *env, jstring str);\n    const jchar *(*GetStringChars)\n      (JNIEnv *env, jstring str, jboolean *isCopy);\n    void (*ReleaseStringChars)\n      (JNIEnv *env, jstring str, const jchar *chars);\n  \n    jstring (*NewStringUTF)\n      (JNIEnv *env, const char *utf);\n    jsize (*GetStringUTFLength)\n      (JNIEnv *env, jstring str);\n    const char* (*GetStringUTFChars)\n      (JNIEnv *env, jstring str, jboolean *isCopy);\n    void (*ReleaseStringUTFChars)\n      (JNIEnv *env, jstring str, const char* chars);\n  \n\n    jsize (*GetArrayLength)\n      (JNIEnv *env, jarray array);\n\n    jobjectArray (*NewObjectArray)\n      (JNIEnv *env, jsize len, jclass clazz, jobject init);\n    jobject (*GetObjectArrayElement)\n      (JNIEnv *env, jobjectArray array, jsize index);\n    void (*SetObjectArrayElement)\n      (JNIEnv *env, jobjectArray array, jsize index, jobject val);\n\n    jbooleanArray (*NewBooleanArray)\n      (JNIEnv *env, jsize len);\n    jbyteArray (*NewByteArray)\n      (JNIEnv *env, jsize len);\n    jcharArray (*NewCharArray)\n      (JNIEnv *env, jsize len);\n    jshortArray (*NewShortArray)\n      (JNIEnv *env, jsize len);\n    jintArray (*NewIntArray)\n      (JNIEnv *env, jsize len);\n    jlongArray (*NewLongArray)\n      (JNIEnv *env, jsize len);\n    jfloatArray (*NewFloatArray)\n      (JNIEnv *env, jsize len);\n    jdoubleArray (*NewDoubleArray)\n      (JNIEnv *env, jsize len);\n\n    jboolean * (*GetBooleanArrayElements)\n      (JNIEnv *env, jbooleanArray array, jboolean *isCopy);\n    jbyte * (*GetByteArrayElements)\n      (JNIEnv *env, jbyteArray array, jboolean *isCopy);\n    jchar * (*GetCharArrayElements)\n      (JNIEnv *env, jcharArray array, jboolean *isCopy);\n    jshort * (*GetShortArrayElements)\n      (JNIEnv *env, jshortArray array, jboolean *isCopy);\n    jint * (*GetIntArrayElements)\n      (JNIEnv *env, jintArray array, jboolean *isCopy);\n    jlong * (*GetLongArrayElements)\n      (JNIEnv *env, jlongArray array, jboolean *isCopy);\n    jfloat * (*GetFloatArrayElements)\n      (JNIEnv *env, jfloatArray array, jboolean *isCopy);\n    jdouble * (*GetDoubleArrayElements)\n      (JNIEnv *env, jdoubleArray array, jboolean *isCopy);\n\n    void (*ReleaseBooleanArrayElements)\n      (JNIEnv *env, jbooleanArray array, jboolean *elems, jint mode);\n    void (*ReleaseByteArrayElements)\n      (JNIEnv *env, jbyteArray array, jbyte *elems, jint mode);\n    void (*ReleaseCharArrayElements)\n      (JNIEnv *env, jcharArray array, jchar *elems, jint mode);\n    void (*ReleaseShortArrayElements)\n      (JNIEnv *env, jshortArray array, jshort *elems, jint mode);\n    void (*ReleaseIntArrayElements)\n      (JNIEnv *env, jintArray array, jint *elems, jint mode);\n    void (*ReleaseLongArrayElements)\n      (JNIEnv *env, jlongArray array, jlong *elems, jint mode);\n    void (*ReleaseFloatArrayElements)\n      (JNIEnv *env, jfloatArray array, jfloat *elems, jint mode);\n    void (*ReleaseDoubleArrayElements)\n      (JNIEnv *env, jdoubleArray array, jdouble *elems, jint mode);\n\n    void (*GetBooleanArrayRegion)\n      (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf);\n    void (*GetByteArrayRegion)\n      (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf);\n    void (*GetCharArrayRegion)\n      (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf);\n    void (*GetShortArrayRegion)\n      (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf);\n    void (*GetIntArrayRegion)\n      (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf);\n    void (*GetLongArrayRegion)\n      (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf);\n    void (*GetFloatArrayRegion)\n      (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf);\n    void (*GetDoubleArrayRegion)\n      (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf);\n\n    void (*SetBooleanArrayRegion)\n      (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf);\n    void (*SetByteArrayRegion)\n      (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf);\n    void (*SetCharArrayRegion)\n      (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf);\n    void (*SetShortArrayRegion)\n      (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf);\n    void (*SetIntArrayRegion)\n      (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf);\n    void (*SetLongArrayRegion)\n      (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf);\n    void (*SetFloatArrayRegion)\n      (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf);\n    void (*SetDoubleArrayRegion)\n      (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf);\n\n    jint (*RegisterNatives)\n      (JNIEnv *env, jclass clazz, const JNINativeMethod *methods, \n       jint nMethods);\n    jint (*UnregisterNatives)\n      (JNIEnv *env, jclass clazz);\n\n    jint (*MonitorEnter)\n      (JNIEnv *env, jobject obj);\n    jint (*MonitorExit)\n      (JNIEnv *env, jobject obj);\n \n    jint (*GetJavaVM)\n      (JNIEnv *env, JavaVM **vm);\n};\n\n/*\n * We use inlined functions for C++ so that programmers can write:\n * \n *    env->FindClass(\"java/lang/String\")\n *\n * in C++ rather than:\n *\n *    (*env)->FindClass(env, \"java/lang/String\")\n *\n * in C.\n */\n\nstruct JNIEnv_ {\n    const struct JNINativeInterface_ *functions;\n    void *reserved0;\n    void *reserved1[6];\n#ifdef __cplusplus\n\n    jint GetVersion() {\n        return functions->GetVersion(this);\n    }\n    jclass DefineClass(const char *name, jobject loader, const jbyte *buf,\n\t\t       jsize len) {\n        return functions->DefineClass(this, name, loader, buf, len);\n    }\n    jclass FindClass(const char *name) {\n        return functions->FindClass(this, name);\n    }\n    jclass GetSuperclass(jclass sub) {\n        return functions->GetSuperclass(this, sub);\n    }\n    jboolean IsAssignableFrom(jclass sub, jclass sup) {\n        return functions->IsAssignableFrom(this, sub, sup);\n    }\n\n    jint _Throw(jthrowable obj) {\n        return functions->_Throw(this, obj);\n    }    \n    jint ThrowNew(jclass clazz, const char *msg) {\n        return functions->ThrowNew(this, clazz, msg);\n    }\n    jthrowable ExceptionOccurred() {\n        return functions->ExceptionOccurred(this);\n    }\n    void ExceptionDescribe() {\n        functions->ExceptionDescribe(this);\n    }\n    void ExceptionClear() {\n        functions->ExceptionClear(this);\n    }\n    void FatalError(const char *msg) {\n        functions->FatalError(this, msg);\n    }\n\n    jobject NewGlobalRef(jobject lobj) {\n        return functions->NewGlobalRef(this,lobj);\n    }\n    void DeleteGlobalRef(jobject gref) {\n        functions->DeleteGlobalRef(this,gref);\n    }\n    void DeleteLocalRef(jobject obj) {\n        functions->DeleteLocalRef(this, obj);\n    }\n\n    jboolean IsSameObject(jobject obj1, jobject obj2) {\n        return functions->IsSameObject(this,obj1,obj2);\n    }\n\n    jobject AllocObject(jclass clazz) {\n        return functions->AllocObject(this,clazz);\n    }\n    jobject NewObject(jclass clazz, jmethodID methodID, ...) {\n        va_list args;\n\tjobject result;\n\tva_start(args, methodID);\n        result = functions->NewObjectV(this,clazz,methodID,args);\n\tva_end(args);\n\treturn result;\n    }\n    jobject NewObjectV(jclass clazz, jmethodID methodID, \n\t\t       va_list args) {\n        return functions->NewObjectV(this,clazz,methodID,args);\n    }\n    jobject NewObjectA(jclass clazz, jmethodID methodID, \n\t\t       jvalue *args) {\n        return functions->NewObjectA(this,clazz,methodID,args);\n    }\n\n    jclass GetObjectClass(jobject obj) {\n        return functions->GetObjectClass(this,obj);\n    }\n    jboolean IsInstanceOf(jobject obj, jclass clazz) {\n        return functions->IsInstanceOf(this,obj,clazz);\n    }\n\n    jmethodID GetMethodID(jclass clazz, const char *name, \n\t\t\t  const char *sig) {\n        return functions->GetMethodID(this,clazz,name,sig);\n    }\n\n    jobject CallObjectMethod(jobject obj, jmethodID methodID, ...) {\n        va_list args;\n\tjobject result;\n\tva_start(args,methodID);\n\tresult = functions->CallObjectMethodV(this,obj,methodID,args);\n\tva_end(args);\n\treturn result;\n    }\n    jobject CallObjectMethodV(jobject obj, jmethodID methodID, \n\t\t\tva_list args) {\n        return functions->CallObjectMethodV(this,obj,methodID,args);\n    }\n    jobject CallObjectMethodA(jobject obj, jmethodID methodID, \n\t\t\tjvalue * args) {\n        return functions->CallObjectMethodA(this,obj,methodID,args);\n    }\n\n    jboolean CallBooleanMethod(jobject obj, \n\t\t\t       jmethodID methodID, ...) {\n        va_list args;\n\tjboolean result;\n\tva_start(args,methodID);\n\tresult = functions->CallBooleanMethodV(this,obj,methodID,args);\n\tva_end(args);\n\treturn result;\n    }\n    jboolean CallBooleanMethodV(jobject obj, jmethodID methodID, \n\t\t\t\tva_list args) {\n        return functions->CallBooleanMethodV(this,obj,methodID,args);\n    }\n    jboolean CallBooleanMethodA(jobject obj, jmethodID methodID, \n\t\t\t\tjvalue * args) {\n        return functions->CallBooleanMethodA(this,obj,methodID, args);\n    }\n\n    jbyte CallByteMethod(jobject obj, jmethodID methodID, ...) {\n        va_list args;\n\tjbyte result;\n\tva_start(args,methodID);\n\tresult = functions->CallByteMethodV(this,obj,methodID,args);\n\tva_end(args);\n\treturn result;\n    }\n    jbyte CallByteMethodV(jobject obj, jmethodID methodID, \n\t\t\t  va_list args) {\n        return functions->CallByteMethodV(this,obj,methodID,args);\n    }\n    jbyte CallByteMethodA(jobject obj, jmethodID methodID, \n\t\t\t  jvalue * args) {\n        return functions->CallByteMethodA(this,obj,methodID,args);\n    }\n\n    jchar CallCharMethod(jobject obj, jmethodID methodID, ...) {\n        va_list args;\n\tjchar result;\n\tva_start(args,methodID);\n\tresult = functions->CallCharMethodV(this,obj,methodID,args);\n\tva_end(args);\n\treturn result;\n    }\n    jchar CallCharMethodV(jobject obj, jmethodID methodID, \n\t\t\t  va_list args) {\n        return functions->CallCharMethodV(this,obj,methodID,args);\n    }\n    jchar CallCharMethodA(jobject obj, jmethodID methodID, \n\t\t\t  jvalue * args) {\n        return functions->CallCharMethodA(this,obj,methodID,args);\n    }\n\n    jshort CallShortMethod(jobject obj, jmethodID methodID, ...) {\n        va_list args;\n\tjshort result;\n\tva_start(args,methodID);\n\tresult = functions->CallShortMethodV(this,obj,methodID,args);\n\tva_end(args);\n\treturn result;\n    }\n    jshort CallShortMethodV(jobject obj, jmethodID methodID, \n\t\t\t    va_list args) {\n        return functions->CallShortMethodV(this,obj,methodID,args);\n    }\n    jshort CallShortMethodA(jobject obj, jmethodID methodID, \n\t\t\t    jvalue * args) {\n        return functions->CallShortMethodA(this,obj,methodID,args);\n    }\n\n    jint CallIntMethod(jobject obj, jmethodID methodID, ...) {\n        va_list args;\n\tjint result;\n\tva_start(args,methodID);\n\tresult = functions->CallIntMethodV(this,obj,methodID,args);\n\tva_end(args);\n\treturn result;\n    }\n    jint CallIntMethodV(jobject obj, jmethodID methodID, \n\t\t\tva_list args) {\n        return functions->CallIntMethodV(this,obj,methodID,args);\n    }\n    jint CallIntMethodA(jobject obj, jmethodID methodID, \n\t\t\tjvalue * args) {\n        return functions->CallIntMethodA(this,obj,methodID,args);\n    }\n\n    jlong CallLongMethod(jobject obj, jmethodID methodID, ...) {\n        va_list args;\n\tjlong result;\n\tva_start(args,methodID);\n\tresult = functions->CallLongMethodV(this,obj,methodID,args);\n\tva_end(args);\n\treturn result;\n    }\n    jlong CallLongMethodV(jobject obj, jmethodID methodID, \n\t\t\t  va_list args) {\n        return functions->CallLongMethodV(this,obj,methodID,args);\n    }\n    jlong CallLongMethodA(jobject obj, jmethodID methodID, \n\t\t\t  jvalue * args) {\n        return functions->CallLongMethodA(this,obj,methodID,args);\n    }\n\n    jfloat CallFloatMethod(jobject obj, jmethodID methodID, ...) {\n        va_list args;\n\tjfloat result;\n\tva_start(args,methodID);\n\tresult = functions->CallFloatMethodV(this,obj,methodID,args);\n\tva_end(args);\n\treturn result;\n    }\n    jfloat CallFloatMethodV(jobject obj, jmethodID methodID, \n\t\t\t    va_list args) {\n        return functions->CallFloatMethodV(this,obj,methodID,args);\n    }\n    jfloat CallFloatMethodA(jobject obj, jmethodID methodID, \n\t\t\t    jvalue * args) {\n        return functions->CallFloatMethodA(this,obj,methodID,args);\n    }\n\n    jdouble CallDoubleMethod(jobject obj, jmethodID methodID, ...) {\n        va_list args;\n\tjdouble result;\n\tva_start(args,methodID);\n\tresult = functions->CallDoubleMethodV(this,obj,methodID,args);\n\tva_end(args);\n\treturn result;\n    }\n    jdouble CallDoubleMethodV(jobject obj, jmethodID methodID, \n\t\t\tva_list args) {\n        return functions->CallDoubleMethodV(this,obj,methodID,args);\n    }\n    jdouble CallDoubleMethodA(jobject obj, jmethodID methodID, \n\t\t\tjvalue * args) {\n        return functions->CallDoubleMethodA(this,obj,methodID,args);\n    }\n\n    void CallVoidMethod(jobject obj, jmethodID methodID, ...) {\n        va_list args;\n\tva_start(args,methodID);\n\tfunctions->CallVoidMethodV(this,obj,methodID,args);\n\tva_end(args);\n    }\n    void CallVoidMethodV(jobject obj, jmethodID methodID, \n\t\t\t va_list args) {\n        functions->CallVoidMethodV(this,obj,methodID,args);\n    }\n    void CallVoidMethodA(jobject obj, jmethodID methodID, \n\t\t\t jvalue * args) {\n        functions->CallVoidMethodA(this,obj,methodID,args);\n    }\n\n    jobject CallNonvirtualObjectMethod(jobject obj, jclass clazz, \n\t\t\t\t       jmethodID methodID, ...) {\n        va_list args;\n\tjobject result;\n\tva_start(args,methodID);\n\tresult = functions->CallNonvirtualObjectMethodV(this,obj,clazz,\n\t\t\t\t\t\t\tmethodID,args);\n\tva_end(args);\n\treturn result;\n    }\n    jobject CallNonvirtualObjectMethodV(jobject obj, jclass clazz, \n\t\t\t\t\tjmethodID methodID, va_list args) {\n        return functions->CallNonvirtualObjectMethodV(this,obj,clazz,\n\t\t\t\t\t\t      methodID,args);\n    }\n    jobject CallNonvirtualObjectMethodA(jobject obj, jclass clazz, \n\t\t\t\t\tjmethodID methodID, jvalue * args) {\n        return functions->CallNonvirtualObjectMethodA(this,obj,clazz,\n\t\t\t\t\t\t      methodID,args);\n    }\n\n    jboolean CallNonvirtualBooleanMethod(jobject obj, jclass clazz, \n\t\t\t\t\t jmethodID methodID, ...) {\n        va_list args;\n\tjboolean result;\n\tva_start(args,methodID);\n\tresult = functions->CallNonvirtualBooleanMethodV(this,obj,clazz,\n\t\t\t\t\t\t\t methodID,args);\n\tva_end(args);\n\treturn result;\n    }\n    jboolean CallNonvirtualBooleanMethodV(jobject obj, jclass clazz, \n\t\t\t\t\t  jmethodID methodID, va_list args) {\n        return functions->CallNonvirtualBooleanMethodV(this,obj,clazz,\n\t\t\t\t\t\t       methodID,args);\n    }\n    jboolean CallNonvirtualBooleanMethodA(jobject obj, jclass clazz, \n\t\t\t\t\t  jmethodID methodID, jvalue * args) {\n        return functions->CallNonvirtualBooleanMethodA(this,obj,clazz,\n\t\t\t\t\t\t       methodID, args);\n    }\n\n    jbyte CallNonvirtualByteMethod(jobject obj, jclass clazz, \n\t\t\t\t   jmethodID methodID, ...) {\n        va_list args;\n\tjbyte result;\n\tva_start(args,methodID);\n\tresult = functions->CallNonvirtualByteMethodV(this,obj,clazz,\n\t\t\t\t\t\t      methodID,args);\n\tva_end(args);\n\treturn result;\n    }\n    jbyte CallNonvirtualByteMethodV(jobject obj, jclass clazz, \n\t\t\t\t    jmethodID methodID, va_list args) {\n        return functions->CallNonvirtualByteMethodV(this,obj,clazz,\n\t\t\t\t\t\t    methodID,args);\n    }\n    jbyte CallNonvirtualByteMethodA(jobject obj, jclass clazz, \n\t\t\t\t    jmethodID methodID, jvalue * args) {\n        return functions->CallNonvirtualByteMethodA(this,obj,clazz,\n\t\t\t\t\t\t    methodID,args);\n    }\n\n    jchar CallNonvirtualCharMethod(jobject obj, jclass clazz, \n\t\t\t\t   jmethodID methodID, ...) {\n        va_list args;\n\tjchar result;\n\tva_start(args,methodID);\n\tresult = functions->CallNonvirtualCharMethodV(this,obj,clazz,\n\t\t\t\t\t\t      methodID,args);\n\tva_end(args);\n\treturn result;\n    }\n    jchar CallNonvirtualCharMethodV(jobject obj, jclass clazz, \n\t\t\t\t    jmethodID methodID, va_list args) {\n        return functions->CallNonvirtualCharMethodV(this,obj,clazz,\n\t\t\t\t\t\t    methodID,args);\n    }\n    jchar CallNonvirtualCharMethodA(jobject obj, jclass clazz, \n\t\t\t\t    jmethodID methodID, jvalue * args) {\n        return functions->CallNonvirtualCharMethodA(this,obj,clazz,\n\t\t\t\t\t\t    methodID,args);\n    }\n\n    jshort CallNonvirtualShortMethod(jobject obj, jclass clazz, \n\t\t\t\t     jmethodID methodID, ...) {\n        va_list args;\n\tjshort result;\n\tva_start(args,methodID);\n\tresult = functions->CallNonvirtualShortMethodV(this,obj,clazz,\n\t\t\t\t\t\t       methodID,args);\n\tva_end(args);\n\treturn result;\n    }\n    jshort CallNonvirtualShortMethodV(jobject obj, jclass clazz, \n\t\t\t\t      jmethodID methodID, va_list args) {\n        return functions->CallNonvirtualShortMethodV(this,obj,clazz,\n\t\t\t\t\t\t     methodID,args);\n    }\n    jshort CallNonvirtualShortMethodA(jobject obj, jclass clazz,\n\t\t\t\t      jmethodID methodID, jvalue * args) {\n        return functions->CallNonvirtualShortMethodA(this,obj,clazz,\n\t\t\t\t\t\t     methodID,args);\n    }\n\n    jint CallNonvirtualIntMethod(jobject obj, jclass clazz, \n\t\t\t\t jmethodID methodID, ...) {\n        va_list args;\n\tjint result;\n\tva_start(args,methodID);\n\tresult = functions->CallNonvirtualIntMethodV(this,obj,clazz,\n\t\t\t\t\t\t     methodID,args);\n\tva_end(args);\n\treturn result;\n    }\n    jint CallNonvirtualIntMethodV(jobject obj, jclass clazz, \n\t\t\t\t  jmethodID methodID, va_list args) {\n        return functions->CallNonvirtualIntMethodV(this,obj,clazz,\n\t\t\t\t\t\t   methodID,args);\n    }\n    jint CallNonvirtualIntMethodA(jobject obj, jclass clazz, \n\t\t\t\t  jmethodID methodID, jvalue * args) {\n        return functions->CallNonvirtualIntMethodA(this,obj,clazz,\n\t\t\t\t\t\t   methodID,args);\n    }\n\n    jlong CallNonvirtualLongMethod(jobject obj, jclass clazz,\n\t\t\t\t   jmethodID methodID, ...) {\n        va_list args;\n\tjlong result;\n\tva_start(args,methodID);\n\tresult = functions->CallNonvirtualLongMethodV(this,obj,clazz,\n\t\t\t\t\t\t      methodID,args);\n\tva_end(args);\n\treturn result;\n    }\n    jlong CallNonvirtualLongMethodV(jobject obj, jclass clazz,\n\t\t\t\t    jmethodID methodID, va_list args) {\n        return functions->CallNonvirtualLongMethodV(this,obj,clazz,\n\t\t\t\t\t\t    methodID,args);\n    }\n    jlong CallNonvirtualLongMethodA(jobject obj, jclass clazz, \n\t\t\t\t    jmethodID methodID, jvalue * args) {\n        return functions->CallNonvirtualLongMethodA(this,obj,clazz,\n\t\t\t\t\t\t    methodID,args);\n    }\n\n    jfloat CallNonvirtualFloatMethod(jobject obj, jclass clazz, \n\t\t\t\t     jmethodID methodID, ...) {\n        va_list args;\n\tjfloat result;\n\tva_start(args,methodID);\n\tresult = functions->CallNonvirtualFloatMethodV(this,obj,clazz,\n\t\t\t\t\t\t       methodID,args);\n\tva_end(args);\n\treturn result;\n    }\n    jfloat CallNonvirtualFloatMethodV(jobject obj, jclass clazz,\n\t\t\t\t      jmethodID methodID, \n\t\t\t\t      va_list args) {\n        return functions->CallNonvirtualFloatMethodV(this,obj,clazz,\n\t\t\t\t\t\t     methodID,args);\n    }\n    jfloat CallNonvirtualFloatMethodA(jobject obj, jclass clazz, \n\t\t\t\t      jmethodID methodID, \n\t\t\t\t      jvalue * args) {\n        return functions->CallNonvirtualFloatMethodA(this,obj,clazz,\n\t\t\t\t\t\t     methodID,args);\n    }\n\n    jdouble CallNonvirtualDoubleMethod(jobject obj, jclass clazz,\n\t\t\t\t       jmethodID methodID, ...) {\n        va_list args;\n\tjdouble result;\n\tva_start(args,methodID);\n\tresult = functions->CallNonvirtualDoubleMethodV(this,obj,clazz,\n\t\t\t\t\t\t\tmethodID,args);\n\tva_end(args);\n\treturn result;\n    }\n    jdouble CallNonvirtualDoubleMethodV(jobject obj, jclass clazz,\n\t\t\t\t\tjmethodID methodID, \n\t\t\t\t\tva_list args) {\n        return functions->CallNonvirtualDoubleMethodV(this,obj,clazz,\n\t\t\t\t\t\t      methodID,args);\n    }\n    jdouble CallNonvirtualDoubleMethodA(jobject obj, jclass clazz, \n\t\t\t\t\tjmethodID methodID, \n\t\t\t\t\tjvalue * args) {\n        return functions->CallNonvirtualDoubleMethodA(this,obj,clazz,\n\t\t\t\t\t\t      methodID,args);\n    }\n\n    void CallNonvirtualVoidMethod(jobject obj, jclass clazz,\n\t\t\t\t  jmethodID methodID, ...) {\n        va_list args;\n\tva_start(args,methodID);\n\tfunctions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args);\n\tva_end(args);\n    }\n    void CallNonvirtualVoidMethodV(jobject obj, jclass clazz,\n\t\t\t\t   jmethodID methodID, \n\t\t\t\t   va_list args) {\n        functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args);\n    }\n    void CallNonvirtualVoidMethodA(jobject obj, jclass clazz,\n\t\t\t\t   jmethodID methodID, \n\t\t\t\t   jvalue * args) {\n        functions->CallNonvirtualVoidMethodA(this,obj,clazz,methodID,args);\n    }\n\n    jfieldID GetFieldID(jclass clazz, const char *name, \n\t\t\tconst char *sig) {\n        return functions->GetFieldID(this,clazz,name,sig);\n    }\n\n    jobject GetObjectField(jobject obj, jfieldID fieldID) {\n        return functions->GetObjectField(this,obj,fieldID);\n    }\n    jboolean GetBooleanField(jobject obj, jfieldID fieldID) {\n        return functions->GetBooleanField(this,obj,fieldID);\n    }\n    jbyte GetByteField(jobject obj, jfieldID fieldID) {\n        return functions->GetByteField(this,obj,fieldID);\n    }\n    jchar GetCharField(jobject obj, jfieldID fieldID) {\n        return functions->GetCharField(this,obj,fieldID);\n    }\n    jshort GetShortField(jobject obj, jfieldID fieldID) {\n        return functions->GetShortField(this,obj,fieldID);\n    }\n    jint GetIntField(jobject obj, jfieldID fieldID) {\n        return functions->GetIntField(this,obj,fieldID);\n    }\n    jlong GetLongField(jobject obj, jfieldID fieldID) {\n        return functions->GetLongField(this,obj,fieldID);\n    }\n    jfloat GetFloatField(jobject obj, jfieldID fieldID) {\n        return functions->GetFloatField(this,obj,fieldID);\n    }\n    jdouble GetDoubleField(jobject obj, jfieldID fieldID) {\n        return functions->GetDoubleField(this,obj,fieldID);\n    }\n\n    void SetObjectField(jobject obj, jfieldID fieldID, jobject val) {\n        functions->SetObjectField(this,obj,fieldID,val);\n    }\n    void SetBooleanField(jobject obj, jfieldID fieldID, \n\t\t\t jboolean val) {\n        functions->SetBooleanField(this,obj,fieldID,val);\n    }\n    void SetByteField(jobject obj, jfieldID fieldID, \n\t\t      jbyte val) {\n        functions->SetByteField(this,obj,fieldID,val);\n    }\n    void SetCharField(jobject obj, jfieldID fieldID, \n\t\t      jchar val) {\n        functions->SetCharField(this,obj,fieldID,val);\n    }\n    void SetShortField(jobject obj, jfieldID fieldID,\n\t\t       jshort val) {\n        functions->SetShortField(this,obj,fieldID,val);\n    }\n    void SetIntField(jobject obj, jfieldID fieldID, \n\t\t     jint val) {\n        functions->SetIntField(this,obj,fieldID,val);\n    }\n    void SetLongField(jobject obj, jfieldID fieldID, \n\t\t      jlong val) {\n        functions->SetLongField(this,obj,fieldID,val);\n    }\n    void SetFloatField(jobject obj, jfieldID fieldID, \n\t\t       jfloat val) {\n        functions->SetFloatField(this,obj,fieldID,val);\n    }\n    void SetDoubleField(jobject obj, jfieldID fieldID, \n\t\t\tjdouble val) {\n        functions->SetDoubleField(this,obj,fieldID,val);\n    }\n\n    jmethodID GetStaticMethodID(jclass clazz, const char *name, \n\t\t\t\tconst char *sig) {\n        return functions->GetStaticMethodID(this,clazz,name,sig);\n    }\n\n    jobject CallStaticObjectMethod(jclass clazz, jmethodID methodID, \n\t\t\t     ...) {\n        va_list args;\n\tjobject result;\n\tva_start(args,methodID);\n\tresult = functions->CallStaticObjectMethodV(this,clazz,methodID,args);\n\tva_end(args);\n\treturn result;\n    }\n    jobject CallStaticObjectMethodV(jclass clazz, jmethodID methodID, \n\t\t\t      va_list args) {\n        return functions->CallStaticObjectMethodV(this,clazz,methodID,args);\n    }\n    jobject CallStaticObjectMethodA(jclass clazz, jmethodID methodID, \n\t\t\t      jvalue *args) {\n        return functions->CallStaticObjectMethodA(this,clazz,methodID,args);\n    }\n\n    jboolean CallStaticBooleanMethod(jclass clazz, \n\t\t\t\t     jmethodID methodID, ...) {\n        va_list args;\n\tjboolean result;\n\tva_start(args,methodID);\n\tresult = functions->CallStaticBooleanMethodV(this,clazz,methodID,args);\n\tva_end(args);\n\treturn result;\n    }\n    jboolean CallStaticBooleanMethodV(jclass clazz,\n\t\t\t\t      jmethodID methodID, va_list args) {\n        return functions->CallStaticBooleanMethodV(this,clazz,methodID,args);\n    }\n    jboolean CallStaticBooleanMethodA(jclass clazz,\n\t\t\t\t      jmethodID methodID, jvalue *args) {\n        return functions->CallStaticBooleanMethodA(this,clazz,methodID,args);\n    }\n\n    jbyte CallStaticByteMethod(jclass clazz,\n\t\t\t       jmethodID methodID, ...) {\n        va_list args;\n\tjbyte result;\n\tva_start(args,methodID);\n\tresult = functions->CallStaticByteMethodV(this,clazz,methodID,args);\n\tva_end(args);\n\treturn result;\n    }\n    jbyte CallStaticByteMethodV(jclass clazz,\n\t\t\t\tjmethodID methodID, va_list args) {\n        return functions->CallStaticByteMethodV(this,clazz,methodID,args);\n    }\n    jbyte CallStaticByteMethodA(jclass clazz, \n\t\t\t\tjmethodID methodID, jvalue *args) {\n        return functions->CallStaticByteMethodA(this,clazz,methodID,args);\n    }\n\n    jchar CallStaticCharMethod(jclass clazz,\n\t\t\t       jmethodID methodID, ...) {\n        va_list args;\n\tjchar result;\n\tva_start(args,methodID);\n\tresult = functions->CallStaticCharMethodV(this,clazz,methodID,args);\n\tva_end(args);\n\treturn result;\n    }\n    jchar CallStaticCharMethodV(jclass clazz,\n\t\t\t\tjmethodID methodID, va_list args) {\n        return functions->CallStaticCharMethodV(this,clazz,methodID,args);\n    }\n    jchar CallStaticCharMethodA(jclass clazz,\n\t\t\t\tjmethodID methodID, jvalue *args) {\n        return functions->CallStaticCharMethodA(this,clazz,methodID,args);\n    }\n\n    jshort CallStaticShortMethod(jclass clazz,\n\t\t\t\t jmethodID methodID, ...) {\n        va_list args;\n\tjshort result;\n\tva_start(args,methodID);\n\tresult = functions->CallStaticShortMethodV(this,clazz,methodID,args);\n\tva_end(args);\n\treturn result;\n    }\n    jshort CallStaticShortMethodV(jclass clazz,\n\t\t\t\t  jmethodID methodID, va_list args) {\n        return functions->CallStaticShortMethodV(this,clazz,methodID,args);\n    }\n    jshort CallStaticShortMethodA(jclass clazz,\n\t\t\t\t  jmethodID methodID, jvalue *args) {\n        return functions->CallStaticShortMethodA(this,clazz,methodID,args);\n    }\n\n    jint CallStaticIntMethod(jclass clazz,\n\t\t\t     jmethodID methodID, ...) {\n        va_list args;\n\tjint result;\n\tva_start(args,methodID);\n\tresult = functions->CallStaticIntMethodV(this,clazz,methodID,args);\n\tva_end(args);\n\treturn result;\n    }\n    jint CallStaticIntMethodV(jclass clazz,\n\t\t\t      jmethodID methodID, va_list args) {\n        return functions->CallStaticIntMethodV(this,clazz,methodID,args);\n    }\n    jint CallStaticIntMethodA(jclass clazz, \n\t\t\t      jmethodID methodID, jvalue *args) {\n        return functions->CallStaticIntMethodA(this,clazz,methodID,args);\n    }\n\n    jlong CallStaticLongMethod(jclass clazz,\n\t\t\t       jmethodID methodID, ...) {\n        va_list args;\n\tjlong result;\n\tva_start(args,methodID);\n\tresult = functions->CallStaticLongMethodV(this,clazz,methodID,args);\n\tva_end(args);\n\treturn result;\n    }\n    jlong CallStaticLongMethodV(jclass clazz, \n\t\t\t\tjmethodID methodID, va_list args) {\n        return functions->CallStaticLongMethodV(this,clazz,methodID,args);\n    }\n    jlong CallStaticLongMethodA(jclass clazz, \n\t\t\t\tjmethodID methodID, jvalue *args) {\n        return functions->CallStaticLongMethodA(this,clazz,methodID,args);\n    }\n\n    jfloat CallStaticFloatMethod(jclass clazz, \n\t\t\t\t jmethodID methodID, ...) {\n        va_list args;\n\tjfloat result;\n\tva_start(args,methodID);\n\tresult = functions->CallStaticFloatMethodV(this,clazz,methodID,args);\n\tva_end(args);\n\treturn result;\n    }\n    jfloat CallStaticFloatMethodV(jclass clazz, \n\t\t\t\t  jmethodID methodID, va_list args) {\n        return functions->CallStaticFloatMethodV(this,clazz,methodID,args);\n    }\n    jfloat CallStaticFloatMethodA(jclass clazz, \n\t\t\t\t  jmethodID methodID, jvalue *args) {\n        return functions->CallStaticFloatMethodA(this,clazz,methodID,args);\n    }\n\n    jdouble CallStaticDoubleMethod(jclass clazz, \n\t\t\t\t   jmethodID methodID, ...) {\n        va_list args;\n\tjdouble result;\n\tva_start(args,methodID);\n\tresult = functions->CallStaticDoubleMethodV(this,clazz,methodID,args);\n\tva_end(args);\n\treturn result;\n    }\n    jdouble CallStaticDoubleMethodV(jclass clazz, \n\t\t\t\t    jmethodID methodID, va_list args) {\n        return functions->CallStaticDoubleMethodV(this,clazz,methodID,args);\n    }\n    jdouble CallStaticDoubleMethodA(jclass clazz, \n\t\t\t\t    jmethodID methodID, jvalue *args) {\n        return functions->CallStaticDoubleMethodA(this,clazz,methodID,args);\n    }\n\n    void CallStaticVoidMethod(jclass cls, jmethodID methodID, ...) {\n        va_list args;\n\tva_start(args,methodID);\n\tfunctions->CallStaticVoidMethodV(this,cls,methodID,args);\n\tva_end(args);\n    }\n    void CallStaticVoidMethodV(jclass cls, jmethodID methodID, \n\t\t\t       va_list args) {\n        functions->CallStaticVoidMethodV(this,cls,methodID,args);\n    }\n    void CallStaticVoidMethodA(jclass cls, jmethodID methodID, \n\t\t\t       jvalue * args) {\n        functions->CallStaticVoidMethodA(this,cls,methodID,args);\n    }\n\n    jfieldID GetStaticFieldID(jclass clazz, const char *name, \n\t\t\t      const char *sig) {\n        return functions->GetStaticFieldID(this,clazz,name,sig);\n    }\n    jobject GetStaticObjectField(jclass clazz, jfieldID fieldID) {\n        return functions->GetStaticObjectField(this,clazz,fieldID);\n    }\n    jboolean GetStaticBooleanField(jclass clazz, jfieldID fieldID) {\n        return functions->GetStaticBooleanField(this,clazz,fieldID);\n    }\n    jbyte GetStaticByteField(jclass clazz, jfieldID fieldID) {\n        return functions->GetStaticByteField(this,clazz,fieldID);\n    }\n    jchar GetStaticCharField(jclass clazz, jfieldID fieldID) {\n        return functions->GetStaticCharField(this,clazz,fieldID);\n    }\n    jshort GetStaticShortField(jclass clazz, jfieldID fieldID) {\n        return functions->GetStaticShortField(this,clazz,fieldID);\n    }\n    jint GetStaticIntField(jclass clazz, jfieldID fieldID) {\n        return functions->GetStaticIntField(this,clazz,fieldID);\n    }\n    jlong GetStaticLongField(jclass clazz, jfieldID fieldID) {\n        return functions->GetStaticLongField(this,clazz,fieldID);\n    }\n    jfloat GetStaticFloatField(jclass clazz, jfieldID fieldID) {\n        return functions->GetStaticFloatField(this,clazz,fieldID);\n    }\n    jdouble GetStaticDoubleField(jclass clazz, jfieldID fieldID) {\n        return functions->GetStaticDoubleField(this,clazz,fieldID);\n    }\n\n    void SetStaticObjectField(jclass clazz, jfieldID fieldID,\n\t\t\tjobject value) {\n      functions->SetStaticObjectField(this,clazz,fieldID,value);\n    }\n    void SetStaticBooleanField(jclass clazz, jfieldID fieldID,\n\t\t\tjboolean value) {\n      functions->SetStaticBooleanField(this,clazz,fieldID,value);\n    }\n    void SetStaticByteField(jclass clazz, jfieldID fieldID,\n\t\t\tjbyte value) {\n      functions->SetStaticByteField(this,clazz,fieldID,value);\n    }\n    void SetStaticCharField(jclass clazz, jfieldID fieldID,\n\t\t\tjchar value) {\n      functions->SetStaticCharField(this,clazz,fieldID,value);\n    }\n    void SetStaticShortField(jclass clazz, jfieldID fieldID,\n\t\t\tjshort value) {\n      functions->SetStaticShortField(this,clazz,fieldID,value);\n    }\n    void SetStaticIntField(jclass clazz, jfieldID fieldID,\n\t\t\tjint value) {\n      functions->SetStaticIntField(this,clazz,fieldID,value);\n    }\n    void SetStaticLongField(jclass clazz, jfieldID fieldID,\n\t\t\tjlong value) {\n      functions->SetStaticLongField(this,clazz,fieldID,value);\n    }\n    void SetStaticFloatField(jclass clazz, jfieldID fieldID,\n\t\t\tjfloat value) {\n      functions->SetStaticFloatField(this,clazz,fieldID,value);\n    }\n    void SetStaticDoubleField(jclass clazz, jfieldID fieldID,\n\t\t\tjdouble value) {\n      functions->SetStaticDoubleField(this,clazz,fieldID,value);\n    }\n\n    jstring NewString(const jchar *unicode, jsize len) {\n        return functions->NewString(this,unicode,len);\n    }\n    jsize GetStringLength(jstring str) {\n        return functions->GetStringLength(this,str);\n    }\n    const jchar *GetStringChars(jstring str, jboolean *isCopy) {\n        return functions->GetStringChars(this,str,isCopy);\n    }\n    void ReleaseStringChars(jstring str, const jchar *chars) {\n        functions->ReleaseStringChars(this,str,chars);\n    }\n  \n    jstring NewStringUTF(const char *utf) {\n        return functions->NewStringUTF(this,utf);\n    }\n    jsize GetStringUTFLength(jstring str) {\n        return functions->GetStringUTFLength(this,str);\n    }\n    const char* GetStringUTFChars(jstring str, jboolean *isCopy) {\n        return functions->GetStringUTFChars(this,str,isCopy);\n    }\n    void ReleaseStringUTFChars(jstring str, const char* chars) {\n        functions->ReleaseStringUTFChars(this,str,chars);\n    }\n\n    jsize GetArrayLength(jarray array) {\n        return functions->GetArrayLength(this,array);\n    }\n\n    jobjectArray NewObjectArray(jsize len, jclass clazz, \n\t\t\t\tjobject init) {\n        return functions->NewObjectArray(this,len,clazz,init);\n    }\n    jobject GetObjectArrayElement(jobjectArray array, jsize index) {\n        return functions->GetObjectArrayElement(this,array,index);\n    }\n    void SetObjectArrayElement(jobjectArray array, jsize index, \n\t\t\t       jobject val) {\n        functions->SetObjectArrayElement(this,array,index,val);\n    }\n\n    jbooleanArray NewBooleanArray(jsize len) {\n        return functions->NewBooleanArray(this,len);\n    }\n    jbyteArray NewByteArray(jsize len) {\n        return functions->NewByteArray(this,len);\n    }\n    jcharArray NewCharArray(jsize len) {\n        return functions->NewCharArray(this,len);\n    }\n    jshortArray NewShortArray(jsize len) {\n        return functions->NewShortArray(this,len);\n    }\n    jintArray NewIntArray(jsize len) {\n        return functions->NewIntArray(this,len);\n    }\n    jlongArray NewLongArray(jsize len) {\n        return functions->NewLongArray(this,len);\n    }\n    jfloatArray NewFloatArray(jsize len) {\n        return functions->NewFloatArray(this,len);\n    }\n    jdoubleArray NewDoubleArray(jsize len) {\n        return functions->NewDoubleArray(this,len);\n    }\n\n    jboolean * GetBooleanArrayElements(jbooleanArray array, jboolean *isCopy) {\n        return functions->GetBooleanArrayElements(this,array,isCopy);\n    }\n    jbyte * GetByteArrayElements(jbyteArray array, jboolean *isCopy) {\n        return functions->GetByteArrayElements(this,array,isCopy);\n    }\n    jchar * GetCharArrayElements(jcharArray array, jboolean *isCopy) {\n        return functions->GetCharArrayElements(this,array,isCopy);\n    }\n    jshort * GetShortArrayElements(jshortArray array, jboolean *isCopy) {\n        return functions->GetShortArrayElements(this,array,isCopy);\n    }\n    jint * GetIntArrayElements(jintArray array, jboolean *isCopy) {\n        return functions->GetIntArrayElements(this,array,isCopy);\n    }\n    jlong * GetLongArrayElements(jlongArray array, jboolean *isCopy) {\n        return functions->GetLongArrayElements(this,array,isCopy);\n    }\n    jfloat * GetFloatArrayElements(jfloatArray array, jboolean *isCopy) {\n        return functions->GetFloatArrayElements(this,array,isCopy);\n    }\n    jdouble * GetDoubleArrayElements(jdoubleArray array, jboolean *isCopy) {\n        return functions->GetDoubleArrayElements(this,array,isCopy);\n    }\n\n    void ReleaseBooleanArrayElements(jbooleanArray array, \n\t\t\t\t     jboolean *elems,\n\t\t\t\t     jint mode) {\n        functions->ReleaseBooleanArrayElements(this,array,elems,mode);\n    }\n    void ReleaseByteArrayElements(jbyteArray array, \n\t\t\t\t  jbyte *elems,\n\t\t\t\t  jint mode) {\n        functions->ReleaseByteArrayElements(this,array,elems,mode);\n    }\n    void ReleaseCharArrayElements(jcharArray array, \n\t\t\t\t  jchar *elems,\n\t\t\t\t  jint mode) {\n        functions->ReleaseCharArrayElements(this,array,elems,mode);\n    }\n    void ReleaseShortArrayElements(jshortArray array, \n\t\t\t\t   jshort *elems,\n\t\t\t\t   jint mode) {\n        functions->ReleaseShortArrayElements(this,array,elems,mode);\n    }\n    void ReleaseIntArrayElements(jintArray array, \n\t\t\t\t jint *elems,\n\t\t\t\t jint mode) {\n        functions->ReleaseIntArrayElements(this,array,elems,mode);\n    }\n    void ReleaseLongArrayElements(jlongArray array, \n\t\t\t\t  jlong *elems,\n\t\t\t\t  jint mode) {\n        functions->ReleaseLongArrayElements(this,array,elems,mode);\n    }\n    void ReleaseFloatArrayElements(jfloatArray array, \n\t\t\t\t   jfloat *elems,\n\t\t\t\t   jint mode) {\n        functions->ReleaseFloatArrayElements(this,array,elems,mode);\n    }\n    void ReleaseDoubleArrayElements(jdoubleArray array, \n\t\t\t\t    jdouble *elems,\n\t\t\t\t    jint mode) {\n        functions->ReleaseDoubleArrayElements(this,array,elems,mode);\n    }\n\n    void GetBooleanArrayRegion(jbooleanArray array, \n\t\t\t       jsize start, jsize len, jboolean *buf) {\n        functions->GetBooleanArrayRegion(this,array,start,len,buf);\n    }\n    void GetByteArrayRegion(jbyteArray array, \n\t\t\t    jsize start, jsize len, jbyte *buf) {\n        functions->GetByteArrayRegion(this,array,start,len,buf);\n    }\n    void GetCharArrayRegion(jcharArray array, \n\t\t\t    jsize start, jsize len, jchar *buf) {\n        functions->GetCharArrayRegion(this,array,start,len,buf);\n    }\n    void GetShortArrayRegion(jshortArray array, \n\t\t\t     jsize start, jsize len, jshort *buf) {\n        functions->GetShortArrayRegion(this,array,start,len,buf);\n    }\n    void GetIntArrayRegion(jintArray array, \n\t\t\t   jsize start, jsize len, jint *buf) {\n        functions->GetIntArrayRegion(this,array,start,len,buf);\n    }\n    void GetLongArrayRegion(jlongArray array, \n\t\t\t    jsize start, jsize len, jlong *buf) {\n        functions->GetLongArrayRegion(this,array,start,len,buf);\n    }\n    void GetFloatArrayRegion(jfloatArray array, \n\t\t\t     jsize start, jsize len, jfloat *buf) {\n        functions->GetFloatArrayRegion(this,array,start,len,buf);\n    }\n    void GetDoubleArrayRegion(jdoubleArray array, \n\t\t\t      jsize start, jsize len, jdouble *buf) {\n        functions->GetDoubleArrayRegion(this,array,start,len,buf);\n    }\n\n    void SetBooleanArrayRegion(jbooleanArray array, jsize start, jsize len, \n\t\t\t       jboolean *buf) {\n        functions->SetBooleanArrayRegion(this,array,start,len,buf);\n    }\n    void SetByteArrayRegion(jbyteArray array, jsize start, jsize len,\n\t\t\t    jbyte *buf) {\n        functions->SetByteArrayRegion(this,array,start,len,buf);\n    }\n    void SetCharArrayRegion(jcharArray array, jsize start, jsize len, \n\t\t\t    jchar *buf) {\n        functions->SetCharArrayRegion(this,array,start,len,buf);\n    }\n    void SetShortArrayRegion(jshortArray array, jsize start, jsize len, \n\t\t\t     jshort *buf) {\n        functions->SetShortArrayRegion(this,array,start,len,buf);\n    }\n    void SetIntArrayRegion(jintArray array, jsize start, jsize len,\n\t\t\t   jint *buf) {\n        functions->SetIntArrayRegion(this,array,start,len,buf);\n    }\n    void SetLongArrayRegion(jlongArray array, jsize start, jsize len,\n\t\t\t    jlong *buf) {\n        functions->SetLongArrayRegion(this,array,start,len,buf);\n    }\n    void SetFloatArrayRegion(jfloatArray array, jsize start, jsize len, \n\t\t\t     jfloat *buf) {\n        functions->SetFloatArrayRegion(this,array,start,len,buf);\n    }\n    void SetDoubleArrayRegion(jdoubleArray array, jsize start, jsize len,\n\t\t\t      jdouble *buf) {\n        functions->SetDoubleArrayRegion(this,array,start,len,buf);\n    }\n\n    jint RegisterNatives(jclass clazz, const JNINativeMethod *methods,\n\t\t\t jint nMethods) {\n        return functions->RegisterNatives(this,clazz,methods,nMethods);\n    }\n    jint UnregisterNatives(jclass clazz) {\n        return functions->UnregisterNatives(this,clazz);\n    }  \n   \n    jint MonitorEnter(jobject obj) {\n        return functions->MonitorEnter(this,obj);\n    }\n    jint MonitorExit(jobject obj) {\n        return functions->MonitorExit(this,obj);\n    }\n\n    jint GetJavaVM(JavaVM **vm) {\n        return functions->GetJavaVM(this,vm);\n    }\n  \n#endif /* __cplusplus */\n};\n\n/* These structures will be VM-specific. */\n\ntypedef struct JDK1_1InitArgs {\n    jint reserved0;\n    void *reserved1;\n\n    jint checkSource; \n    jint nativeStackSize;\n    jint javaStackSize;\n    jint minHeapSize;\n    jint maxHeapSize;\n    jint verifyMode;\n    char *classpath;\n\n    jint (*vfprintf)(FILE *fp, const char *format, va_list args);\n    void (*exit)(jint code);\n    void (*abort)();\n    \n    jint enableClassGC;\n    jint enableVerboseGC;\n    jint disableAsyncGC;\n    jint verbose;\n    jint debugAgent;\n    jint debugPort;\n} JDK1_1InitArgs;\n\ntypedef struct JDK1_1AttachArgs {\n    void * __padding; /* C compilers don't allow empty structures. */\n} JDK1_1AttachArgs;\n\n/* End VM-specific. */\n\nstruct JNIInvokeInterface_ {\n    void *reserved0;\n    void *reserved1;\n    void *reserved2;\n\n    jint (*DestroyJavaVM)(JavaVM *vm);\n\n    jint (*AttachCurrentThread)\n      (JavaVM *vm, JNIEnv **penv, void *args);\n\n    jint (*DetachCurrentThread)(JavaVM *vm);\n};\n\nstruct JavaVM_ {\n    const struct JNIInvokeInterface_ *functions;\n    void *reserved0;\n    void *reserved1;\n    void *reserved2;\n#ifdef __cplusplus\n\n    jint DestroyJavaVM() {\n        return functions->DestroyJavaVM(this);\n    }\n    jint AttachCurrentThread(JNIEnv **penv, void *args) {\n        return functions->AttachCurrentThread(this, penv, args);\n    }\n    jint DetachCurrentThread() {\n        return functions->DetachCurrentThread(this);\n    }\n\n#endif\n};\n\nvoid JNICALL JNI_GetDefaultJavaVMInitArgs(void *);\n\njint JNICALL JNI_CreateJavaVM(JavaVM **, JNIEnv **, void *);\n\njint JNICALL JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *);\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif /* __cplusplus */\n\n#endif /* JNI_H */\n\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/PluginSDK 4.01a/Include/jni_md.h",
    "content": "/*\n * @(#)jni_md.h\t1.3 97/01/10\n *\n * Copyright (c) 1993-1996 Sun Microsystems, Inc. All Rights Reserved.\n *\n * Permission to use, copy, modify, and distribute this software\n * and its documentation for NON-COMMERCIAL purposes and without\n * fee is hereby granted provided that this copyright notice\n * appears in all copies.\n *\n * The Java source code is the confidential and proprietary information\n * of Sun Microsystems, Inc. (\"Confidential Information\").  You shall\n * not disclose such Confidential Information and shall use it only in\n * accordance with the terms of the license agreement you entered into\n * with Sun.\n *\n * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF\n * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\n * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR\n * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR\n * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.\n */\n\n#ifndef JNI_MD_H\n#define JNI_MD_H\n\n#include \"jri_md.h\"\n\n#define JNICALL\t\t\tJRI_CALLBACK\n\n/* XXX don't use this -- it doesn't work for Win16 */\n#ifdef XP_WIN\n#define JNIEXPORT __declspec(dllexport)\n#else\n#define JNIEXPORT \n#endif\n\n\n\n#endif /* JNI_MD_H */\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/PluginSDK 4.01a/Include/jri.h",
    "content": "/* -*- Mode: C; tab-width: 4; -*- */\n/*******************************************************************************\n * Java Runtime Interface\n * Copyright (c) 1996 Netscape Communications Corporation. All rights reserved.\n ******************************************************************************/\n\n#ifndef JRI_H\n#define JRI_H\n\n#include \"jritypes.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/*******************************************************************************\n * JRIEnv\n ******************************************************************************/\n\n/* The type of the JRIEnv interface. */\ntypedef struct JRIEnvInterface\tJRIEnvInterface;\n\n/* The type of a JRIEnv instance. */\ntypedef const JRIEnvInterface*\tJRIEnv;\n\n/*******************************************************************************\n * JRIEnv Operations\n ******************************************************************************/\n\n#define JRI_DefineClass(env, classLoader, buf, bufLen)\t\\\n\t(((*(env))->DefineClass)(env, JRI_DefineClass_op, classLoader, buf, bufLen))\n\n#define JRI_FindClass(env, name)\t\\\n\t(((*(env))->FindClass)(env, JRI_FindClass_op, name))\n\n#define JRI_Throw(env, obj)\t\\\n\t(((*(env))->Throw)(env, JRI_Throw_op, obj))\n\n#define JRI_ThrowNew(env, clazz, message)\t\\\n\t(((*(env))->ThrowNew)(env, JRI_ThrowNew_op, clazz, message))\n\n#define JRI_ExceptionOccurred(env)\t\\\n\t(((*(env))->ExceptionOccurred)(env, JRI_ExceptionOccurred_op))\n\n#define JRI_ExceptionDescribe(env)\t\\\n\t(((*(env))->ExceptionDescribe)(env, JRI_ExceptionDescribe_op))\n\n#define JRI_ExceptionClear(env)\t\\\n\t(((*(env))->ExceptionClear)(env, JRI_ExceptionClear_op))\n\n#define JRI_NewGlobalRef(env, ref)\t\\\n\t(((*(env))->NewGlobalRef)(env, JRI_NewGlobalRef_op, ref))\n\n#define JRI_DisposeGlobalRef(env, gref)\t\\\n\t(((*(env))->DisposeGlobalRef)(env, JRI_DisposeGlobalRef_op, gref))\n\n#define JRI_GetGlobalRef(env, gref)\t\\\n\t(((*(env))->GetGlobalRef)(env, JRI_GetGlobalRef_op, gref))\n\n#define JRI_SetGlobalRef(env, gref, ref)\t\\\n\t(((*(env))->SetGlobalRef)(env, JRI_SetGlobalRef_op, gref, ref))\n\n#define JRI_IsSameObject(env, a, b)\t\\\n\t(((*(env))->IsSameObject)(env, JRI_IsSameObject_op, a, b))\n\n#define JRI_NewObject(env)\t((*(env))->NewObject)\n#define JRI_NewObjectV(env, clazz, methodID, args)\t\\\n\t(((*(env))->NewObjectV)(env, JRI_NewObject_op_va_list, clazz, methodID, args))\n#define JRI_NewObjectA(env, clazz, method, args)\t\\\n\t(((*(env))->NewObjectA)(env, JRI_NewObject_op_array, clazz, methodID, args))\n\n#define JRI_GetObjectClass(env, obj)\t\\\n\t(((*(env))->GetObjectClass)(env, JRI_GetObjectClass_op, obj))\n\n#define JRI_IsInstanceOf(env, obj, clazz)\t\\\n\t(((*(env))->IsInstanceOf)(env, JRI_IsInstanceOf_op, obj, clazz))\n\n#define JRI_GetMethodID(env, clazz, name, sig)\t\\\n\t(((*(env))->GetMethodID)(env, JRI_GetMethodID_op, clazz, name, sig))\n\n#define JRI_CallMethod(env)\t((*(env))->CallMethod)\n#define JRI_CallMethodV(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodV)(env, JRI_CallMethod_op_va_list, obj, methodID, args))\n#define JRI_CallMethodA(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodA)(env, JRI_CallMethod_op_array, obj, methodID, args))\n\n#define JRI_CallMethodBoolean(env)\t((*(env))->CallMethodBoolean)\n#define JRI_CallMethodBooleanV(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodBooleanV)(env, JRI_CallMethodBoolean_op_va_list, obj, methodID, args))\n#define JRI_CallMethodBooleanA(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodBooleanA)(env, JRI_CallMethodBoolean_op_array, obj, methodID, args))\n\n#define JRI_CallMethodByte(env)\t((*(env))->CallMethodByte)\n#define JRI_CallMethodByteV(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodByteV)(env, JRI_CallMethodByte_op_va_list, obj, methodID, args))\n#define JRI_CallMethodByteA(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodByteA)(env, JRI_CallMethodByte_op_array, obj, methodID, args))\n\n#define JRI_CallMethodChar(env)\t((*(env))->CallMethodChar)\n#define JRI_CallMethodCharV(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodCharV)(env, JRI_CallMethodChar_op_va_list, obj, methodID, args))\n#define JRI_CallMethodCharA(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodCharA)(env, JRI_CallMethodChar_op_array, obj, methodID, args))\n\n#define JRI_CallMethodShort(env)\t((*(env))->CallMethodShort)\n#define JRI_CallMethodShortV(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodShortV)(env, JRI_CallMethodShort_op_va_list, obj, methodID, args))\n#define JRI_CallMethodShortA(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodShortA)(env, JRI_CallMethodShort_op_array, obj, methodID, args))\n\n#define JRI_CallMethodInt(env)\t((*(env))->CallMethodInt)\n#define JRI_CallMethodIntV(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodIntV)(env, JRI_CallMethodInt_op_va_list, obj, methodID, args))\n#define JRI_CallMethodIntA(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodIntA)(env, JRI_CallMethodInt_op_array, obj, methodID, args))\n\n#define JRI_CallMethodLong(env)\t((*(env))->CallMethodLong)\n#define JRI_CallMethodLongV(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodLongV)(env, JRI_CallMethodLong_op_va_list, obj, methodID, args))\n#define JRI_CallMethodLongA(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodLongA)(env, JRI_CallMethodLong_op_array, obj, methodID, args))\n\n#define JRI_CallMethodFloat(env)\t((*(env))->CallMethodFloat)\n#define JRI_CallMethodFloatV(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodFloatV)(env, JRI_CallMethodFloat_op_va_list, obj, methodID, args))\n#define JRI_CallMethodFloatA(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodFloatA)(env, JRI_CallMethodFloat_op_array, obj, methodID, args))\n\n#define JRI_CallMethodDouble(env)\t((*(env))->CallMethodDouble)\n#define JRI_CallMethodDoubleV(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodDoubleV)(env, JRI_CallMethodDouble_op_va_list, obj, methodID, args))\n#define JRI_CallMethodDoubleA(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodDoubleA)(env, JRI_CallMethodDouble_op_array, obj, methodID, args))\n\n#define JRI_GetFieldID(env, clazz, name, sig)\t\\\n\t(((*(env))->GetFieldID)(env, JRI_GetFieldID_op, clazz, name, sig))\n\n#define JRI_GetField(env, obj, fieldID)\t\\\n\t(((*(env))->GetField)(env, JRI_GetField_op, obj, fieldID))\n\n#define JRI_GetFieldBoolean(env, obj, fieldID)\t\\\n\t(((*(env))->GetFieldBoolean)(env, JRI_GetFieldBoolean_op, obj, fieldID))\n\n#define JRI_GetFieldByte(env, obj, fieldID)\t\\\n\t(((*(env))->GetFieldByte)(env, JRI_GetFieldByte_op, obj, fieldID))\n\n#define JRI_GetFieldChar(env, obj, fieldID)\t\\\n\t(((*(env))->GetFieldChar)(env, JRI_GetFieldChar_op, obj, fieldID))\n\n#define JRI_GetFieldShort(env, obj, fieldID)\t\\\n\t(((*(env))->GetFieldShort)(env, JRI_GetFieldShort_op, obj, fieldID))\n\n#define JRI_GetFieldInt(env, obj, fieldID)\t\\\n\t(((*(env))->GetFieldInt)(env, JRI_GetFieldInt_op, obj, fieldID))\n\n#define JRI_GetFieldLong(env, obj, fieldID)\t\\\n\t(((*(env))->GetFieldLong)(env, JRI_GetFieldLong_op, obj, fieldID))\n\n#define JRI_GetFieldFloat(env, obj, fieldID)\t\\\n\t(((*(env))->GetFieldFloat)(env, JRI_GetFieldFloat_op, obj, fieldID))\n\n#define JRI_GetFieldDouble(env, obj, fieldID)\t\\\n\t(((*(env))->GetFieldDouble)(env, JRI_GetFieldDouble_op, obj, fieldID))\n\n#define JRI_SetField(env, obj, fieldID, value)\t\\\n\t(((*(env))->SetField)(env, JRI_SetField_op, obj, fieldID, value))\n\n#define JRI_SetFieldBoolean(env, obj, fieldID, value)\t\\\n\t(((*(env))->SetFieldBoolean)(env, JRI_SetFieldBoolean_op, obj, fieldID, value))\n\n#define JRI_SetFieldByte(env, obj, fieldID, value)\t\\\n\t(((*(env))->SetFieldByte)(env, JRI_SetFieldByte_op, obj, fieldID, value))\n\n#define JRI_SetFieldChar(env, obj, fieldID, value)\t\\\n\t(((*(env))->SetFieldChar)(env, JRI_SetFieldChar_op, obj, fieldID, value))\n\n#define JRI_SetFieldShort(env, obj, fieldID, value)\t\\\n\t(((*(env))->SetFieldShort)(env, JRI_SetFieldShort_op, obj, fieldID, value))\n\n#define JRI_SetFieldInt(env, obj, fieldID, value)\t\\\n\t(((*(env))->SetFieldInt)(env, JRI_SetFieldInt_op, obj, fieldID, value))\n\n#define JRI_SetFieldLong(env, obj, fieldID, value)\t\\\n\t(((*(env))->SetFieldLong)(env, JRI_SetFieldLong_op, obj, fieldID, value))\n\n#define JRI_SetFieldFloat(env, obj, fieldID, value)\t\\\n\t(((*(env))->SetFieldFloat)(env, JRI_SetFieldFloat_op, obj, fieldID, value))\n\n#define JRI_SetFieldDouble(env, obj, fieldID, value)\t\\\n\t(((*(env))->SetFieldDouble)(env, JRI_SetFieldDouble_op, obj, fieldID, value))\n\n#define JRI_IsSubclassOf(env, a, b)\t\\\n\t(((*(env))->IsSubclassOf)(env, JRI_IsSubclassOf_op, a, b))\n\n#define JRI_GetStaticMethodID(env, clazz, name, sig)\t\\\n\t(((*(env))->GetStaticMethodID)(env, JRI_GetStaticMethodID_op, clazz, name, sig))\n\n#define JRI_CallStaticMethod(env)\t((*(env))->CallStaticMethod)\n#define JRI_CallStaticMethodV(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodV)(env, JRI_CallStaticMethod_op_va_list, clazz, methodID, args))\n#define JRI_CallStaticMethodA(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodA)(env, JRI_CallStaticMethod_op_array, clazz, methodID, args))\n\n#define JRI_CallStaticMethodBoolean(env)\t((*(env))->CallStaticMethodBoolean)\n#define JRI_CallStaticMethodBooleanV(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodBooleanV)(env, JRI_CallStaticMethodBoolean_op_va_list, clazz, methodID, args))\n#define JRI_CallStaticMethodBooleanA(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodBooleanA)(env, JRI_CallStaticMethodBoolean_op_array, clazz, methodID, args))\n\n#define JRI_CallStaticMethodByte(env)\t((*(env))->CallStaticMethodByte)\n#define JRI_CallStaticMethodByteV(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodByteV)(env, JRI_CallStaticMethodByte_op_va_list, clazz, methodID, args))\n#define JRI_CallStaticMethodByteA(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodByteA)(env, JRI_CallStaticMethodByte_op_array, clazz, methodID, args))\n\n#define JRI_CallStaticMethodChar(env)\t((*(env))->CallStaticMethodChar)\n#define JRI_CallStaticMethodCharV(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodCharV)(env, JRI_CallStaticMethodChar_op_va_list, clazz, methodID, args))\n#define JRI_CallStaticMethodCharA(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodCharA)(env, JRI_CallStaticMethodChar_op_array, clazz, methodID, args))\n\n#define JRI_CallStaticMethodShort(env)\t((*(env))->CallStaticMethodShort)\n#define JRI_CallStaticMethodShortV(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodShortV)(env, JRI_CallStaticMethodShort_op_va_list, clazz, methodID, args))\n#define JRI_CallStaticMethodShortA(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodShortA)(env, JRI_CallStaticMethodShort_op_array, clazz, methodID, args))\n\n#define JRI_CallStaticMethodInt(env)\t((*(env))->CallStaticMethodInt)\n#define JRI_CallStaticMethodIntV(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodIntV)(env, JRI_CallStaticMethodInt_op_va_list, clazz, methodID, args))\n#define JRI_CallStaticMethodIntA(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodIntA)(env, JRI_CallStaticMethodInt_op_array, clazz, methodID, args))\n\n#define JRI_CallStaticMethodLong(env)\t((*(env))->CallStaticMethodLong)\n#define JRI_CallStaticMethodLongV(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodLongV)(env, JRI_CallStaticMethodLong_op_va_list, clazz, methodID, args))\n#define JRI_CallStaticMethodLongA(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodLongA)(env, JRI_CallStaticMethodLong_op_array, clazz, methodID, args))\n\n#define JRI_CallStaticMethodFloat(env)\t((*(env))->CallStaticMethodFloat)\n#define JRI_CallStaticMethodFloatV(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodFloatV)(env, JRI_CallStaticMethodFloat_op_va_list, clazz, methodID, args))\n#define JRI_CallStaticMethodFloatA(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodFloatA)(env, JRI_CallStaticMethodFloat_op_array, clazz, methodID, args))\n\n#define JRI_CallStaticMethodDouble(env)\t((*(env))->CallStaticMethodDouble)\n#define JRI_CallStaticMethodDoubleV(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodDoubleV)(env, JRI_CallStaticMethodDouble_op_va_list, clazz, methodID, args))\n#define JRI_CallStaticMethodDoubleA(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodDoubleA)(env, JRI_CallStaticMethodDouble_op_array, clazz, methodID, args))\n\n#define JRI_GetStaticFieldID(env, clazz, name, sig)\t\\\n\t(((*(env))->GetStaticFieldID)(env, JRI_GetStaticFieldID_op, clazz, name, sig))\n\n#define JRI_GetStaticField(env, clazz, fieldID)\t\\\n\t(((*(env))->GetStaticField)(env, JRI_GetStaticField_op, clazz, fieldID))\n\n#define JRI_GetStaticFieldBoolean(env, clazz, fieldID)\t\\\n\t(((*(env))->GetStaticFieldBoolean)(env, JRI_GetStaticFieldBoolean_op, clazz, fieldID))\n\n#define JRI_GetStaticFieldByte(env, clazz, fieldID)\t\\\n\t(((*(env))->GetStaticFieldByte)(env, JRI_GetStaticFieldByte_op, clazz, fieldID))\n\n#define JRI_GetStaticFieldChar(env, clazz, fieldID)\t\\\n\t(((*(env))->GetStaticFieldChar)(env, JRI_GetStaticFieldChar_op, clazz, fieldID))\n\n#define JRI_GetStaticFieldShort(env, clazz, fieldID)\t\\\n\t(((*(env))->GetStaticFieldShort)(env, JRI_GetStaticFieldShort_op, clazz, fieldID))\n\n#define JRI_GetStaticFieldInt(env, clazz, fieldID)\t\\\n\t(((*(env))->GetStaticFieldInt)(env, JRI_GetStaticFieldInt_op, clazz, fieldID))\n\n#define JRI_GetStaticFieldLong(env, clazz, fieldID)\t\\\n\t(((*(env))->GetStaticFieldLong)(env, JRI_GetStaticFieldLong_op, clazz, fieldID))\n\n#define JRI_GetStaticFieldFloat(env, clazz, fieldID)\t\\\n\t(((*(env))->GetStaticFieldFloat)(env, JRI_GetStaticFieldFloat_op, clazz, fieldID))\n\n#define JRI_GetStaticFieldDouble(env, clazz, fieldID)\t\\\n\t(((*(env))->GetStaticFieldDouble)(env, JRI_GetStaticFieldDouble_op, clazz, fieldID))\n\n#define JRI_SetStaticField(env, clazz, fieldID, value)\t\\\n\t(((*(env))->SetStaticField)(env, JRI_SetStaticField_op, clazz, fieldID, value))\n\n#define JRI_SetStaticFieldBoolean(env, clazz, fieldID, value)\t\\\n\t(((*(env))->SetStaticFieldBoolean)(env, JRI_SetStaticFieldBoolean_op, clazz, fieldID, value))\n\n#define JRI_SetStaticFieldByte(env, clazz, fieldID, value)\t\\\n\t(((*(env))->SetStaticFieldByte)(env, JRI_SetStaticFieldByte_op, clazz, fieldID, value))\n\n#define JRI_SetStaticFieldChar(env, clazz, fieldID, value)\t\\\n\t(((*(env))->SetStaticFieldChar)(env, JRI_SetStaticFieldChar_op, clazz, fieldID, value))\n\n#define JRI_SetStaticFieldShort(env, clazz, fieldID, value)\t\\\n\t(((*(env))->SetStaticFieldShort)(env, JRI_SetStaticFieldShort_op, clazz, fieldID, value))\n\n#define JRI_SetStaticFieldInt(env, clazz, fieldID, value)\t\\\n\t(((*(env))->SetStaticFieldInt)(env, JRI_SetStaticFieldInt_op, clazz, fieldID, value))\n\n#define JRI_SetStaticFieldLong(env, clazz, fieldID, value)\t\\\n\t(((*(env))->SetStaticFieldLong)(env, JRI_SetStaticFieldLong_op, clazz, fieldID, value))\n\n#define JRI_SetStaticFieldFloat(env, clazz, fieldID, value)\t\\\n\t(((*(env))->SetStaticFieldFloat)(env, JRI_SetStaticFieldFloat_op, clazz, fieldID, value))\n\n#define JRI_SetStaticFieldDouble(env, clazz, fieldID, value)\t\\\n\t(((*(env))->SetStaticFieldDouble)(env, JRI_SetStaticFieldDouble_op, clazz, fieldID, value))\n\n#define JRI_NewString(env, unicode, len)\t\\\n\t(((*(env))->NewString)(env, JRI_NewString_op, unicode, len))\n\n#define JRI_GetStringLength(env, string)\t\\\n\t(((*(env))->GetStringLength)(env, JRI_GetStringLength_op, string))\n\n#define JRI_GetStringChars(env, string)\t\\\n\t(((*(env))->GetStringChars)(env, JRI_GetStringChars_op, string))\n\n#define JRI_NewStringUTF(env, utf, len)\t\\\n\t(((*(env))->NewStringUTF)(env, JRI_NewStringUTF_op, utf, len))\n\n#define JRI_GetStringUTFLength(env, string)\t\\\n\t(((*(env))->GetStringUTFLength)(env, JRI_GetStringUTFLength_op, string))\n\n#define JRI_GetStringUTFChars(env, string)\t\\\n\t(((*(env))->GetStringUTFChars)(env, JRI_GetStringUTFChars_op, string))\n\n#define JRI_NewScalarArray(env, length, elementSig, initialElements)\t\\\n\t(((*(env))->NewScalarArray)(env, JRI_NewScalarArray_op, length, elementSig, initialElements))\n\n#define JRI_GetScalarArrayLength(env, array)\t\\\n\t(((*(env))->GetScalarArrayLength)(env, JRI_GetScalarArrayLength_op, array))\n\n#define JRI_GetScalarArrayElements(env, array)\t\\\n\t(((*(env))->GetScalarArrayElements)(env, JRI_GetScalarArrayElements_op, array))\n\n#define JRI_NewObjectArray(env, length, elementClass, initialElement)\t\\\n\t(((*(env))->NewObjectArray)(env, JRI_NewObjectArray_op, length, elementClass, initialElement))\n\n#define JRI_GetObjectArrayLength(env, array)\t\\\n\t(((*(env))->GetObjectArrayLength)(env, JRI_GetObjectArrayLength_op, array))\n\n#define JRI_GetObjectArrayElement(env, array, index)\t\\\n\t(((*(env))->GetObjectArrayElement)(env, JRI_GetObjectArrayElement_op, array, index))\n\n#define JRI_SetObjectArrayElement(env, array, index, value)\t\\\n\t(((*(env))->SetObjectArrayElement)(env, JRI_SetObjectArrayElement_op, array, index, value))\n\n#define JRI_RegisterNatives(env, clazz, nameAndSigArray, nativeProcArray)\t\\\n\t(((*(env))->RegisterNatives)(env, JRI_RegisterNatives_op, clazz, nameAndSigArray, nativeProcArray))\n\n#define JRI_UnregisterNatives(env, clazz)\t\\\n\t(((*(env))->UnregisterNatives)(env, JRI_UnregisterNatives_op, clazz))\n\n#define JRI_NewStringPlatform(env, string, len, encoding, encodingLength)\t\\\n\t(((*(env))->NewStringPlatform)(env, JRI_NewStringPlatform_op, string, len, encoding, encodingLength))\n\n#define JRI_GetStringPlatformChars(env, string, encoding, encodingLength)\t\\\n\t(((*(env))->GetStringPlatformChars)(env, JRI_GetStringPlatformChars_op, string, encoding, encodingLength))\n\n\n/*******************************************************************************\n * JRIEnv Interface\n ******************************************************************************/\n\nstruct java_lang_ClassLoader;\nstruct java_lang_Class;\nstruct java_lang_Throwable;\nstruct java_lang_Object;\nstruct java_lang_String;\n\nstruct JRIEnvInterface {\n\tvoid*\treserved0;\n\tvoid*\treserved1;\n\tvoid*\treserved2;\n\tvoid*\treserved3;\n\tstruct java_lang_Class*\t(*FindClass)(JRIEnv* env, jint op, const char* a);\n\tvoid\t(*Throw)(JRIEnv* env, jint op, struct java_lang_Throwable* a);\n\tvoid\t(*ThrowNew)(JRIEnv* env, jint op, struct java_lang_Class* a, const char* b);\n\tstruct java_lang_Throwable*\t(*ExceptionOccurred)(JRIEnv* env, jint op);\n\tvoid\t(*ExceptionDescribe)(JRIEnv* env, jint op);\n\tvoid\t(*ExceptionClear)(JRIEnv* env, jint op);\n\tjglobal\t(*NewGlobalRef)(JRIEnv* env, jint op, void* a);\n\tvoid\t(*DisposeGlobalRef)(JRIEnv* env, jint op, jglobal a);\n\tvoid*\t(*GetGlobalRef)(JRIEnv* env, jint op, jglobal a);\n\tvoid\t(*SetGlobalRef)(JRIEnv* env, jint op, jglobal a, void* b);\n\tjbool\t(*IsSameObject)(JRIEnv* env, jint op, void* a, void* b);\n\tvoid*\t(*NewObject)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);\n\tvoid*\t(*NewObjectV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);\n\tvoid*\t(*NewObjectA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);\n\tstruct java_lang_Class*\t(*GetObjectClass)(JRIEnv* env, jint op, void* a);\n\tjbool\t(*IsInstanceOf)(JRIEnv* env, jint op, void* a, struct java_lang_Class* b);\n\tjint\t(*GetMethodID)(JRIEnv* env, jint op, struct java_lang_Class* a, const char* b, const char* c);\n\tvoid*\t(*CallMethod)(JRIEnv* env, jint op, void* a, jint b, ...);\n\tvoid*\t(*CallMethodV)(JRIEnv* env, jint op, void* a, jint b, va_list c);\n\tvoid*\t(*CallMethodA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);\n\tjbool\t(*CallMethodBoolean)(JRIEnv* env, jint op, void* a, jint b, ...);\n\tjbool\t(*CallMethodBooleanV)(JRIEnv* env, jint op, void* a, jint b, va_list c);\n\tjbool\t(*CallMethodBooleanA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);\n\tjbyte\t(*CallMethodByte)(JRIEnv* env, jint op, void* a, jint b, ...);\n\tjbyte\t(*CallMethodByteV)(JRIEnv* env, jint op, void* a, jint b, va_list c);\n\tjbyte\t(*CallMethodByteA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);\n\tjchar\t(*CallMethodChar)(JRIEnv* env, jint op, void* a, jint b, ...);\n\tjchar\t(*CallMethodCharV)(JRIEnv* env, jint op, void* a, jint b, va_list c);\n\tjchar\t(*CallMethodCharA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);\n\tjshort\t(*CallMethodShort)(JRIEnv* env, jint op, void* a, jint b, ...);\n\tjshort\t(*CallMethodShortV)(JRIEnv* env, jint op, void* a, jint b, va_list c);\n\tjshort\t(*CallMethodShortA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);\n\tjint\t(*CallMethodInt)(JRIEnv* env, jint op, void* a, jint b, ...);\n\tjint\t(*CallMethodIntV)(JRIEnv* env, jint op, void* a, jint b, va_list c);\n\tjint\t(*CallMethodIntA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);\n\tjlong\t(*CallMethodLong)(JRIEnv* env, jint op, void* a, jint b, ...);\n\tjlong\t(*CallMethodLongV)(JRIEnv* env, jint op, void* a, jint b, va_list c);\n\tjlong\t(*CallMethodLongA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);\n\tjfloat\t(*CallMethodFloat)(JRIEnv* env, jint op, void* a, jint b, ...);\n\tjfloat\t(*CallMethodFloatV)(JRIEnv* env, jint op, void* a, jint b, va_list c);\n\tjfloat\t(*CallMethodFloatA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);\n\tjdouble\t(*CallMethodDouble)(JRIEnv* env, jint op, void* a, jint b, ...);\n\tjdouble\t(*CallMethodDoubleV)(JRIEnv* env, jint op, void* a, jint b, va_list c);\n\tjdouble\t(*CallMethodDoubleA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);\n\tjint\t(*GetFieldID)(JRIEnv* env, jint op, struct java_lang_Class* a, const char* b, const char* c);\n\tvoid*\t(*GetField)(JRIEnv* env, jint op, void* a, jint b);\n\tjbool\t(*GetFieldBoolean)(JRIEnv* env, jint op, void* a, jint b);\n\tjbyte\t(*GetFieldByte)(JRIEnv* env, jint op, void* a, jint b);\n\tjchar\t(*GetFieldChar)(JRIEnv* env, jint op, void* a, jint b);\n\tjshort\t(*GetFieldShort)(JRIEnv* env, jint op, void* a, jint b);\n\tjint\t(*GetFieldInt)(JRIEnv* env, jint op, void* a, jint b);\n\tjlong\t(*GetFieldLong)(JRIEnv* env, jint op, void* a, jint b);\n\tjfloat\t(*GetFieldFloat)(JRIEnv* env, jint op, void* a, jint b);\n\tjdouble\t(*GetFieldDouble)(JRIEnv* env, jint op, void* a, jint b);\n\tvoid\t(*SetField)(JRIEnv* env, jint op, void* a, jint b, void* c);\n\tvoid\t(*SetFieldBoolean)(JRIEnv* env, jint op, void* a, jint b, jbool c);\n\tvoid\t(*SetFieldByte)(JRIEnv* env, jint op, void* a, jint b, jbyte c);\n\tvoid\t(*SetFieldChar)(JRIEnv* env, jint op, void* a, jint b, jchar c);\n\tvoid\t(*SetFieldShort)(JRIEnv* env, jint op, void* a, jint b, jshort c);\n\tvoid\t(*SetFieldInt)(JRIEnv* env, jint op, void* a, jint b, jint c);\n\tvoid\t(*SetFieldLong)(JRIEnv* env, jint op, void* a, jint b, jlong c);\n\tvoid\t(*SetFieldFloat)(JRIEnv* env, jint op, void* a, jint b, jfloat c);\n\tvoid\t(*SetFieldDouble)(JRIEnv* env, jint op, void* a, jint b, jdouble c);\n\tjbool\t(*IsSubclassOf)(JRIEnv* env, jint op, struct java_lang_Class* a, struct java_lang_Class* b);\n\tjint\t(*GetStaticMethodID)(JRIEnv* env, jint op, struct java_lang_Class* a, const char* b, const char* c);\n\tvoid*\t(*CallStaticMethod)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);\n\tvoid*\t(*CallStaticMethodV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);\n\tvoid*\t(*CallStaticMethodA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);\n\tjbool\t(*CallStaticMethodBoolean)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);\n\tjbool\t(*CallStaticMethodBooleanV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);\n\tjbool\t(*CallStaticMethodBooleanA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);\n\tjbyte\t(*CallStaticMethodByte)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);\n\tjbyte\t(*CallStaticMethodByteV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);\n\tjbyte\t(*CallStaticMethodByteA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);\n\tjchar\t(*CallStaticMethodChar)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);\n\tjchar\t(*CallStaticMethodCharV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);\n\tjchar\t(*CallStaticMethodCharA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);\n\tjshort\t(*CallStaticMethodShort)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);\n\tjshort\t(*CallStaticMethodShortV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);\n\tjshort\t(*CallStaticMethodShortA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);\n\tjint\t(*CallStaticMethodInt)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);\n\tjint\t(*CallStaticMethodIntV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);\n\tjint\t(*CallStaticMethodIntA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);\n\tjlong\t(*CallStaticMethodLong)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);\n\tjlong\t(*CallStaticMethodLongV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);\n\tjlong\t(*CallStaticMethodLongA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);\n\tjfloat\t(*CallStaticMethodFloat)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);\n\tjfloat\t(*CallStaticMethodFloatV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);\n\tjfloat\t(*CallStaticMethodFloatA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);\n\tjdouble\t(*CallStaticMethodDouble)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);\n\tjdouble\t(*CallStaticMethodDoubleV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);\n\tjdouble\t(*CallStaticMethodDoubleA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);\n\tjint\t(*GetStaticFieldID)(JRIEnv* env, jint op, struct java_lang_Class* a, const char* b, const char* c);\n\tvoid*\t(*GetStaticField)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);\n\tjbool\t(*GetStaticFieldBoolean)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);\n\tjbyte\t(*GetStaticFieldByte)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);\n\tjchar\t(*GetStaticFieldChar)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);\n\tjshort\t(*GetStaticFieldShort)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);\n\tjint\t(*GetStaticFieldInt)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);\n\tjlong\t(*GetStaticFieldLong)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);\n\tjfloat\t(*GetStaticFieldFloat)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);\n\tjdouble\t(*GetStaticFieldDouble)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);\n\tvoid\t(*SetStaticField)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, void* c);\n\tvoid\t(*SetStaticFieldBoolean)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jbool c);\n\tvoid\t(*SetStaticFieldByte)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jbyte c);\n\tvoid\t(*SetStaticFieldChar)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jchar c);\n\tvoid\t(*SetStaticFieldShort)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jshort c);\n\tvoid\t(*SetStaticFieldInt)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jint c);\n\tvoid\t(*SetStaticFieldLong)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jlong c);\n\tvoid\t(*SetStaticFieldFloat)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jfloat c);\n\tvoid\t(*SetStaticFieldDouble)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jdouble c);\n\tstruct java_lang_String*\t(*NewString)(JRIEnv* env, jint op, const jchar* a, jint b);\n\tjint\t(*GetStringLength)(JRIEnv* env, jint op, struct java_lang_String* a);\n\tconst jchar*\t(*GetStringChars)(JRIEnv* env, jint op, struct java_lang_String* a);\n\tstruct java_lang_String*\t(*NewStringUTF)(JRIEnv* env, jint op, const jbyte* a, jint b);\n\tjint\t(*GetStringUTFLength)(JRIEnv* env, jint op, struct java_lang_String* a);\n\tconst jbyte*\t(*GetStringUTFChars)(JRIEnv* env, jint op, struct java_lang_String* a);\n\tvoid*\t(*NewScalarArray)(JRIEnv* env, jint op, jint a, const char* b, const jbyte* c);\n\tjint\t(*GetScalarArrayLength)(JRIEnv* env, jint op, void* a);\n\tjbyte*\t(*GetScalarArrayElements)(JRIEnv* env, jint op, void* a);\n\tvoid*\t(*NewObjectArray)(JRIEnv* env, jint op, jint a, struct java_lang_Class* b, void* c);\n\tjint\t(*GetObjectArrayLength)(JRIEnv* env, jint op, void* a);\n\tvoid*\t(*GetObjectArrayElement)(JRIEnv* env, jint op, void* a, jint b);\n\tvoid\t(*SetObjectArrayElement)(JRIEnv* env, jint op, void* a, jint b, void* c);\n\tvoid\t(*RegisterNatives)(JRIEnv* env, jint op, struct java_lang_Class* a, char** b, void** c);\n\tvoid\t(*UnregisterNatives)(JRIEnv* env, jint op, struct java_lang_Class* a);\n\tstruct java_lang_Class*\t(*DefineClass)(JRIEnv* env, jint op, struct java_lang_ClassLoader* a, jbyte* b, jsize bLen);\n\tstruct java_lang_String*\t(*NewStringPlatform)(JRIEnv* env, jint op, const jbyte* a, jint b, const jbyte* c, jint d);\n\tconst jbyte*\t(*GetStringPlatformChars)(JRIEnv* env, jint op, struct java_lang_String* a, const jbyte* b, jint c);\n};\n\n/*\n** ****************************************************************************\n** JRIEnv Operation IDs\n** ***************************************************************************\n*/\n\ntypedef enum JRIEnvOperations {\n\tJRI_Reserved0_op,\n\tJRI_Reserved1_op,\n\tJRI_Reserved2_op,\n\tJRI_Reserved3_op,\n\tJRI_FindClass_op,\n\tJRI_Throw_op,\n\tJRI_ThrowNew_op,\n\tJRI_ExceptionOccurred_op,\n\tJRI_ExceptionDescribe_op,\n\tJRI_ExceptionClear_op,\n\tJRI_NewGlobalRef_op,\n\tJRI_DisposeGlobalRef_op,\n\tJRI_GetGlobalRef_op,\n\tJRI_SetGlobalRef_op,\n\tJRI_IsSameObject_op,\n\tJRI_NewObject_op,\n\tJRI_NewObject_op_va_list,\n\tJRI_NewObject_op_array,\n\tJRI_GetObjectClass_op,\n\tJRI_IsInstanceOf_op,\n\tJRI_GetMethodID_op,\n\tJRI_CallMethod_op,\n\tJRI_CallMethod_op_va_list,\n\tJRI_CallMethod_op_array,\n\tJRI_CallMethodBoolean_op,\n\tJRI_CallMethodBoolean_op_va_list,\n\tJRI_CallMethodBoolean_op_array,\n\tJRI_CallMethodByte_op,\n\tJRI_CallMethodByte_op_va_list,\n\tJRI_CallMethodByte_op_array,\n\tJRI_CallMethodChar_op,\n\tJRI_CallMethodChar_op_va_list,\n\tJRI_CallMethodChar_op_array,\n\tJRI_CallMethodShort_op,\n\tJRI_CallMethodShort_op_va_list,\n\tJRI_CallMethodShort_op_array,\n\tJRI_CallMethodInt_op,\n\tJRI_CallMethodInt_op_va_list,\n\tJRI_CallMethodInt_op_array,\n\tJRI_CallMethodLong_op,\n\tJRI_CallMethodLong_op_va_list,\n\tJRI_CallMethodLong_op_array,\n\tJRI_CallMethodFloat_op,\n\tJRI_CallMethodFloat_op_va_list,\n\tJRI_CallMethodFloat_op_array,\n\tJRI_CallMethodDouble_op,\n\tJRI_CallMethodDouble_op_va_list,\n\tJRI_CallMethodDouble_op_array,\n\tJRI_GetFieldID_op,\n\tJRI_GetField_op,\n\tJRI_GetFieldBoolean_op,\n\tJRI_GetFieldByte_op,\n\tJRI_GetFieldChar_op,\n\tJRI_GetFieldShort_op,\n\tJRI_GetFieldInt_op,\n\tJRI_GetFieldLong_op,\n\tJRI_GetFieldFloat_op,\n\tJRI_GetFieldDouble_op,\n\tJRI_SetField_op,\n\tJRI_SetFieldBoolean_op,\n\tJRI_SetFieldByte_op,\n\tJRI_SetFieldChar_op,\n\tJRI_SetFieldShort_op,\n\tJRI_SetFieldInt_op,\n\tJRI_SetFieldLong_op,\n\tJRI_SetFieldFloat_op,\n\tJRI_SetFieldDouble_op,\n\tJRI_IsSubclassOf_op,\n\tJRI_GetStaticMethodID_op,\n\tJRI_CallStaticMethod_op,\n\tJRI_CallStaticMethod_op_va_list,\n\tJRI_CallStaticMethod_op_array,\n\tJRI_CallStaticMethodBoolean_op,\n\tJRI_CallStaticMethodBoolean_op_va_list,\n\tJRI_CallStaticMethodBoolean_op_array,\n\tJRI_CallStaticMethodByte_op,\n\tJRI_CallStaticMethodByte_op_va_list,\n\tJRI_CallStaticMethodByte_op_array,\n\tJRI_CallStaticMethodChar_op,\n\tJRI_CallStaticMethodChar_op_va_list,\n\tJRI_CallStaticMethodChar_op_array,\n\tJRI_CallStaticMethodShort_op,\n\tJRI_CallStaticMethodShort_op_va_list,\n\tJRI_CallStaticMethodShort_op_array,\n\tJRI_CallStaticMethodInt_op,\n\tJRI_CallStaticMethodInt_op_va_list,\n\tJRI_CallStaticMethodInt_op_array,\n\tJRI_CallStaticMethodLong_op,\n\tJRI_CallStaticMethodLong_op_va_list,\n\tJRI_CallStaticMethodLong_op_array,\n\tJRI_CallStaticMethodFloat_op,\n\tJRI_CallStaticMethodFloat_op_va_list,\n\tJRI_CallStaticMethodFloat_op_array,\n\tJRI_CallStaticMethodDouble_op,\n\tJRI_CallStaticMethodDouble_op_va_list,\n\tJRI_CallStaticMethodDouble_op_array,\n\tJRI_GetStaticFieldID_op,\n\tJRI_GetStaticField_op,\n\tJRI_GetStaticFieldBoolean_op,\n\tJRI_GetStaticFieldByte_op,\n\tJRI_GetStaticFieldChar_op,\n\tJRI_GetStaticFieldShort_op,\n\tJRI_GetStaticFieldInt_op,\n\tJRI_GetStaticFieldLong_op,\n\tJRI_GetStaticFieldFloat_op,\n\tJRI_GetStaticFieldDouble_op,\n\tJRI_SetStaticField_op,\n\tJRI_SetStaticFieldBoolean_op,\n\tJRI_SetStaticFieldByte_op,\n\tJRI_SetStaticFieldChar_op,\n\tJRI_SetStaticFieldShort_op,\n\tJRI_SetStaticFieldInt_op,\n\tJRI_SetStaticFieldLong_op,\n\tJRI_SetStaticFieldFloat_op,\n\tJRI_SetStaticFieldDouble_op,\n\tJRI_NewString_op,\n\tJRI_GetStringLength_op,\n\tJRI_GetStringChars_op,\n\tJRI_NewStringUTF_op,\n\tJRI_GetStringUTFLength_op,\n\tJRI_GetStringUTFChars_op,\n\tJRI_NewScalarArray_op,\n\tJRI_GetScalarArrayLength_op,\n\tJRI_GetScalarArrayElements_op,\n\tJRI_NewObjectArray_op,\n\tJRI_GetObjectArrayLength_op,\n\tJRI_GetObjectArrayElement_op,\n\tJRI_SetObjectArrayElement_op,\n\tJRI_RegisterNatives_op,\n\tJRI_UnregisterNatives_op,\n\tJRI_DefineClass_op,\n\tJRI_NewStringPlatform_op,\n\tJRI_GetStringPlatformChars_op\n} JRIEnvOperations;\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif /* __cplusplus */\n\n#endif /* JRI_H */\n/******************************************************************************/\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/PluginSDK 4.01a/Include/jri_md.h",
    "content": "/* -*- Mode: C; tab-width: 4; -*- */\n/*******************************************************************************\n * Java Runtime Interface - Machine Dependent Types\n * Copyright (c) 1996 Netscape Communications Corporation. All rights reserved.\n ******************************************************************************/\n \n#ifndef JRI_MD_H\n#define JRI_MD_H\n\n#include <assert.h>\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*******************************************************************************\n * WHAT'S UP WITH THIS FILE?\n * \n * This is where we define the mystical JRI_PUBLIC_API macro that works on all\n * platforms. If you're running with Visual C++, Symantec C, or Borland's \n * development environment on the PC, you're all set. Or if you're on the Mac\n * with Metrowerks, Symantec or MPW with SC you're ok too. For UNIX it shouldn't\n * matter.\n *\n * On UNIX though you probably care about a couple of other symbols though:\n *\tIS_LITTLE_ENDIAN must be defined for little-endian systems\n *\tHAVE_LONG_LONG must be defined on systems that have 'long long' integers\n *\tHAVE_ALIGNED_LONGLONGS must be defined if long-longs must be 8 byte aligned\n *\tHAVE_ALIGNED_DOUBLES must be defined if doubles must be 8 byte aligned\n *\tIS_64 must be defined on 64-bit machines (like Dec Alpha)\n ******************************************************************************/\n\n/* DLL Entry modifiers... */\n\n/* PC */\n#if defined(XP_PC) || defined(_WINDOWS) || defined(WIN32) || defined(_WIN32)\n#\tinclude <windows.h>\n#\tif defined(_MSC_VER)\n#\t\tif defined(WIN32) || defined(_WIN32)\n#\t\t\tdefine JRI_PUBLIC_API(ResultType)\t_declspec(dllexport) ResultType\n#\t\t\tdefine JRI_PUBLIC_VAR(VarType)\t\tVarType\n#\t\t\tdefine JRI_NATIVE_STUB(ResultType)\t_declspec(dllexport) ResultType\n#\t\t\tdefine JRI_CALLBACK\n#\t\telse /* !_WIN32 */\n#\t\t    if defined(_WINDLL)\n#\t\t\tdefine JRI_PUBLIC_API(ResultType)\tResultType __cdecl __export __loadds \n#\t\t\tdefine JRI_PUBLIC_VAR(VarType)\t\tVarType\n#\t\t\tdefine JRI_NATIVE_STUB(ResultType)\tResultType __cdecl __loadds\n#\t\t\tdefine JRI_CALLBACK\t\t\t__loadds\n#\t\telse /* !WINDLL */\n#\t\t\tdefine JRI_PUBLIC_API(ResultType)\tResultType __cdecl __export\n#\t\t\tdefine JRI_PUBLIC_VAR(VarType)\t\tVarType\n#\t\t\tdefine JRI_NATIVE_STUB(ResultType)\tResultType __cdecl __export\n#\t\t\tdefine JRI_CALLBACK\t\t\t__export\n#                   endif /* !WINDLL */\n#\t\tendif /* !_WIN32 */\n#\telif defined(__BORLANDC__)\n#\t\tif defined(WIN32) || defined(_WIN32)\n#\t\t\tdefine JRI_PUBLIC_API(ResultType)\t__export ResultType\n#\t\t\tdefine JRI_PUBLIC_VAR(VarType)\t\tVarType\n#\t\t\tdefine JRI_NATIVE_STUB(ResultType)\t __export ResultType\n#\t\t\tdefine JRI_CALLBACK\n#\t\telse /* !_WIN32 */\n#\t\t\tdefine JRI_PUBLIC_API(ResultType)\tResultType _cdecl _export _loadds \n#\t\t\tdefine JRI_PUBLIC_VAR(VarType)\t\tVarType\n#\t\t\tdefine JRI_NATIVE_STUB(ResultType)\tResultType _cdecl _loadds\n#\t\t\tdefine JRI_CALLBACK\t\t\t_loadds\n#\t\tendif\n#\telse\n#\t\terror Unsupported PC development environment.\t\n#\tendif\n#\tifndef IS_LITTLE_ENDIAN\n#\t\tdefine IS_LITTLE_ENDIAN\n#\tendif\n\n/* Mac */\n#elif macintosh || Macintosh || THINK_C\n#\tif defined(__MWERKS__)\t\t\t\t/* Metrowerks */\n#\t\tif !__option(enumsalwaysint)\n#\t\t\terror You need to define 'Enums Always Int' for your project.\n#\t\tendif\n#\t\tif defined(TARGET_CPU_68K) && !TARGET_RT_MAC_CFM \n#\t\t\tif !__option(fourbyteints) \n#\t\t\t\terror You need to define 'Struct Alignment: 68k' for your project.\n#\t\t\tendif\n#\t\tendif /* !GENERATINGCFM */\n#\t\tdefine JRI_PUBLIC_API(ResultType)\t__declspec(export) ResultType\n#\t\tdefine JRI_PUBLIC_VAR(VarType)\t\tJRI_PUBLIC_API(VarType)\n#\t\tdefine JRI_NATIVE_STUB(ResultType)\tJRI_PUBLIC_API(ResultType)\n#\telif defined(__SC__)\t\t\t\t/* Symantec */\n#\t\terror What are the Symantec defines? (warren@netscape.com)\n#\telif macintosh && applec\t\t\t/* MPW */\n#\t\terror Please upgrade to the latest MPW compiler (SC).\n#\telse\n#\t\terror Unsupported Mac development environment.\n#\tendif\n#\tdefine JRI_CALLBACK\n\n/* Unix or else */\n#else\n#\tdefine JRI_PUBLIC_API(ResultType)\t\tResultType\n#   define JRI_PUBLIC_VAR(VarType)          VarType\n#       define JRI_NATIVE_STUB(ResultType)                  ResultType\n#\tdefine JRI_CALLBACK\n#endif\n\n#ifndef FAR\t\t/* for non-Win16 */\n#define FAR\n#endif\n\n/******************************************************************************/\n\n/* Java Scalar Types */\n\n#if 0\t/* now in jni.h */\ntypedef short\t\t\tjchar;\ntypedef short\t\t\tjshort;\ntypedef float\t\t\tjfloat;\ntypedef double\t\t\tjdouble;\ntypedef juint\t\t\tjsize;\n#endif\n\ntypedef unsigned char\tjbool;\ntypedef char\t\t\tjbyte;\n#ifdef IS_64 /* XXX ok for alpha, but not right on all 64-bit architectures */\ntypedef unsigned int\tjuint;\ntypedef int\t\t\t\tjint;\n#else\ntypedef unsigned long\tjuint;\ntypedef long\t\t\tjint;\n#endif\n\n/*******************************************************************************\n * jlong : long long (64-bit signed integer type) support.\n ******************************************************************************/\n\n/*\n** Bit masking macros.  (n must be <= 31 to be portable)\n*/\n#define JRI_BIT(n)\t\t\t((juint)1 << (n))\n#define JRI_BITMASK(n)\t\t(JRI_BIT(n) - 1)\n\n#ifdef HAVE_LONG_LONG\n\n#if !(defined(WIN32) || defined(_WIN32))\ntypedef long long\t\t\tjlong;\ntypedef unsigned long long\tjulong;\n\n#define jlong_MAXINT\t\t0x7fffffffffffffffLL\n#define jlong_MININT\t\t0x8000000000000000LL\n#define jlong_ZERO\t\t\t0x0LL\n\n#else\ntypedef LONGLONG\t\t\tjlong;\ntypedef DWORDLONG\t\t\tjulong;\n\n#define jlong_MAXINT\t\t0x7fffffffffffffffi64\n#define jlong_MININT\t\t0x8000000000000000i64\n#define jlong_ZERO\t\t\t0x0i64\n\n#endif\n\n#define jlong_IS_ZERO(a)\t((a) == 0)\n#define jlong_EQ(a, b)\t\t((a) == (b))\n#define jlong_NE(a, b)\t\t((a) != (b))\n#define jlong_GE_ZERO(a)\t((a) >= 0)\n#define jlong_CMP(a, op, b)\t((a) op (b))\n\n#define jlong_AND(r, a, b)\t((r) = (a) & (b))\n#define jlong_OR(r, a, b)\t((r) = (a) | (b))\n#define jlong_XOR(r, a, b)\t((r) = (a) ^ (b))\n#define jlong_OR2(r, a)\t\t((r) = (r) | (a))\n#define jlong_NOT(r, a)\t\t((r) = ~(a))\n\n#define jlong_NEG(r, a)\t\t((r) = -(a))\n#define jlong_ADD(r, a, b)\t((r) = (a) + (b))\n#define jlong_SUB(r, a, b)\t((r) = (a) - (b))\n\n#define jlong_MUL(r, a, b)\t((r) = (a) * (b))\n#define jlong_DIV(r, a, b)\t((r) = (a) / (b))\n#define jlong_MOD(r, a, b)\t((r) = (a) % (b))\n\n#define jlong_SHL(r, a, b)\t((r) = (a) << (b))\n#define jlong_SHR(r, a, b)\t((r) = (a) >> (b))\n#define jlong_USHR(r, a, b)\t((r) = (julong)(a) >> (b))\n#define jlong_ISHL(r, a, b)\t((r) = ((jlong)(a)) << (b))\n\n#define jlong_L2I(i, l)\t\t((i) = (int)(l))\n#define jlong_L2UI(ui, l)\t((ui) =(unsigned int)(l))\n#define jlong_L2F(f, l)\t\t((f) = (l))\n#define jlong_L2D(d, l)\t\t((d) = (l))\n\n#define jlong_I2L(l, i)\t\t((l) = (i))\n#define jlong_UI2L(l, ui)\t((l) = (ui))\n#define jlong_F2L(l, f)\t\t((l) = (f))\n#define jlong_D2L(l, d)\t\t((l) = (d))\n\n#define jlong_UDIVMOD(qp, rp, a, b)  \\\n    (*(qp) = ((julong)(a) / (b)), \\\n     *(rp) = ((julong)(a) % (b)))\n\n#else  /* !HAVE_LONG_LONG */\n\ntypedef struct {\n#ifdef IS_LITTLE_ENDIAN\n    juint lo, hi;\n#else\n    juint hi, lo;\n#endif\n} jlong;\ntypedef jlong\t\t\t\tjulong;\n\nextern jlong jlong_MAXINT, jlong_MININT, jlong_ZERO;\n\n#define jlong_IS_ZERO(a)\t(((a).hi == 0) && ((a).lo == 0))\n#define jlong_EQ(a, b)\t\t(((a).hi == (b).hi) && ((a).lo == (b).lo))\n#define jlong_NE(a, b)\t\t(((a).hi != (b).hi) || ((a).lo != (b).lo))\n#define jlong_GE_ZERO(a)\t(((a).hi >> 31) == 0)\n\n/*\n * NB: jlong_CMP and jlong_UCMP work only for strict relationals (<, >).\n */\n#define jlong_CMP(a, op, b)\t(((int32)(a).hi op (int32)(b).hi) ||          \\\n\t\t\t\t (((a).hi == (b).hi) && ((a).lo op (b).lo)))\n#define jlong_UCMP(a, op, b)\t(((a).hi op (b).hi) ||                    \\\n\t\t\t\t (((a).hi == (b).hi) && ((a).lo op (b).lo)))\n\n#define jlong_AND(r, a, b)\t((r).lo = (a).lo & (b).lo,                    \\\n\t\t\t\t (r).hi = (a).hi & (b).hi)\n#define jlong_OR(r, a, b)\t((r).lo = (a).lo | (b).lo,                    \\\n\t\t\t\t (r).hi = (a).hi | (b).hi)\n#define jlong_XOR(r, a, b)\t((r).lo = (a).lo ^ (b).lo,                    \\\n\t\t\t\t (r).hi = (a).hi ^ (b).hi)\n#define jlong_OR2(r, a)\t\t((r).lo = (r).lo | (a).lo,                    \\\n\t\t\t\t (r).hi = (r).hi | (a).hi)\n#define jlong_NOT(r, a)\t\t((r).lo = ~(a).lo,\t                          \\\n\t\t\t\t (r).hi = ~(a).hi)\n\n#define jlong_NEG(r, a)\t\t((r).lo = -(int32)(a).lo,                     \\\n\t\t\t\t (r).hi = -(int32)(a).hi - ((r).lo != 0))\n#define jlong_ADD(r, a, b) {                                              \\\n    jlong _a, _b;                                                         \\\n    _a = a; _b = b;                                                       \\\n    (r).lo = _a.lo + _b.lo;                                               \\\n    (r).hi = _a.hi + _b.hi + ((r).lo < _b.lo);                            \\\n}\n\n#define jlong_SUB(r, a, b) {                                              \\\n    jlong _a, _b;                                                         \\\n    _a = a; _b = b;                                                       \\\n    (r).lo = _a.lo - _b.lo;                                               \\\n    (r).hi = _a.hi - _b.hi - (_a.lo < _b.lo);                             \\\n}                                                                         \\\n\n/*\n * Multiply 64-bit operands a and b to get 64-bit result r.\n * First multiply the low 32 bits of a and b to get a 64-bit result in r.\n * Then add the outer and inner products to r.hi.\n */\n#define jlong_MUL(r, a, b) {                                              \\\n    jlong _a, _b;                                                         \\\n    _a = a; _b = b;                                                       \\\n    jlong_MUL32(r, _a.lo, _b.lo);                                         \\\n    (r).hi += _a.hi * _b.lo + _a.lo * _b.hi;                              \\\n}\n\n/* XXX _jlong_lo16(a) = ((a) << 16 >> 16) is better on some archs (not on mips) */\n#define _jlong_lo16(a)\t\t((a) & JRI_BITMASK(16))\n#define _jlong_hi16(a)\t\t((a) >> 16)\n\n/*\n * Multiply 32-bit operands a and b to get 64-bit result r.\n * Use polynomial expansion based on primitive field element (1 << 16).\n */\n#define jlong_MUL32(r, a, b) {                                            \\\n     juint _a1, _a0, _b1, _b0, _y0, _y1, _y2, _y3;                        \\\n     _a1 = _jlong_hi16(a), _a0 = _jlong_lo16(a);                          \\\n     _b1 = _jlong_hi16(b), _b0 = _jlong_lo16(b);                          \\\n     _y0 = _a0 * _b0;                                                     \\\n     _y1 = _a0 * _b1;                                                     \\\n     _y2 = _a1 * _b0;                                                     \\\n     _y3 = _a1 * _b1;                                                     \\\n     _y1 += _jlong_hi16(_y0);                   /* can't carry */         \\\n     _y1 += _y2;                                /* might carry */         \\\n     if (_y1 < _y2) _y3 += 1 << 16;             /* propagate */           \\\n     (r).lo = (_jlong_lo16(_y1) << 16) + _jlong_lo16(_y0);                \\\n     (r).hi = _y3 + _jlong_hi16(_y1);                                     \\\n}\n\n/*\n * Divide 64-bit unsigned operand a by 64-bit unsigned operand b, setting *qp\n * to the 64-bit unsigned quotient, and *rp to the 64-bit unsigned remainder.\n * Minimize effort if one of qp and rp is null.\n */\n#define jlong_UDIVMOD(qp, rp, a, b)\tjlong_udivmod(qp, rp, a, b)\n\nextern JRI_PUBLIC_API(void)\njlong_udivmod(julong *qp, julong *rp, julong a, julong b);\n\n#define jlong_DIV(r, a, b) {                                              \\\n    jlong _a, _b;                                                         \\\n    juint _negative = (int32)(a).hi < 0;                                  \\\n    if (_negative) {                                                      \\\n\tjlong_NEG(_a, a);                                                     \\\n    } else {                                                              \\\n\t_a = a;                                                               \\\n    }                                                                     \\\n    if ((int32)(b).hi < 0) {                                              \\\n\t_negative ^= 1;                                                       \\\n\tjlong_NEG(_b, b);                                                     \\\n    } else {                                                              \\\n\t_b = b;                                                               \\\n    }                                                                     \\\n    jlong_UDIVMOD(&(r), 0, _a, _b);                                       \\\n    if (_negative)                                                        \\\n\tjlong_NEG(r, r);                                                      \\\n}\n\n#define jlong_MOD(r, a, b) {                                              \\\n    jlong _a, _b;                                                         \\\n    juint _negative = (int32)(a).hi < 0;                                  \\\n    if (_negative) {                                                      \\\n\tjlong_NEG(_a, a);                                                     \\\n    } else {                                                              \\\n\t_a = a;                                                               \\\n    }                                                                     \\\n    if ((int32)(b).hi < 0) {                                              \\\n\tjlong_NEG(_b, b);                                                     \\\n    } else {                                                              \\\n\t_b = b;                                                               \\\n    }                                                                     \\\n    jlong_UDIVMOD(0, &(r), _a, _b);                                       \\\n    if (_negative)                                                        \\\n\tjlong_NEG(r, r);                                                      \\\n}\n\n/*\n * NB: b is a juint, not jlong or julong, for the shift ops.\n */\n#define jlong_SHL(r, a, b) {                                              \\\n    if (b) {                                                              \\\n\tjlong _a;                                                             \\\n        _a = a;                                                           \\\n        if ((b) < 32) {                                                   \\\n\t    (r).lo = _a.lo << (b);                                            \\\n\t    (r).hi = (_a.hi << (b)) | (_a.lo >> (32 - (b)));                  \\\n\t} else {                                                              \\\n\t    (r).lo = 0;                                                       \\\n\t    (r).hi = _a.lo << ((b) & 31);                                     \\\n\t}                                                                     \\\n    } else {                                                              \\\n\t(r) = (a);                                                            \\\n    }                                                                     \\\n}\n\n/* a is an int32, b is int32, r is jlong */\n#define jlong_ISHL(r, a, b) {                                             \\\n    if (b) {                                                              \\\n\tjlong _a;                                                             \\\n\t_a.lo = (a);                                                          \\\n\t_a.hi = 0;                                                            \\\n        if ((b) < 32) {                                                   \\\n\t    (r).lo = (a) << (b);                                              \\\n\t    (r).hi = ((a) >> (32 - (b)));                                     \\\n\t} else {                                                              \\\n\t    (r).lo = 0;                                                       \\\n\t    (r).hi = (a) << ((b) & 31);                                       \\\n\t}                                                                     \\\n    } else {                                                              \\\n\t(r).lo = (a);                                                         \\\n\t(r).hi = 0;                                                           \\\n    }                                                                     \\\n}\n\n#define jlong_SHR(r, a, b) {                                              \\\n    if (b) {                                                              \\\n\tjlong _a;                                                             \\\n        _a = a;                                                           \\\n\tif ((b) < 32) {                                                       \\\n\t    (r).lo = (_a.hi << (32 - (b))) | (_a.lo >> (b));                  \\\n\t    (r).hi = (int32)_a.hi >> (b);                                     \\\n\t} else {                                                              \\\n\t    (r).lo = (int32)_a.hi >> ((b) & 31);                              \\\n\t    (r).hi = (int32)_a.hi >> 31;                                      \\\n\t}                                                                     \\\n    } else {                                                              \\\n\t(r) = (a);                                                            \\\n    }                                                                     \\\n}\n\n#define jlong_USHR(r, a, b) {                                             \\\n    if (b) {                                                              \\\n\tjlong _a;                                                             \\\n        _a = a;                                                           \\\n\tif ((b) < 32) {                                                       \\\n\t    (r).lo = (_a.hi << (32 - (b))) | (_a.lo >> (b));                  \\\n\t    (r).hi = _a.hi >> (b);                                            \\\n\t} else {                                                              \\\n\t    (r).lo = _a.hi >> ((b) & 31);                                     \\\n\t    (r).hi = 0;                                                       \\\n\t}                                                                     \\\n    } else {                                                              \\\n\t(r) = (a);                                                            \\\n    }                                                                     \\\n}\n\n#define jlong_L2I(i, l)\t\t((i) = (l).lo)\n#define jlong_L2UI(ui, l)\t((ui) = (l).lo)\n#define jlong_L2F(f, l)\t\t{ double _d; jlong_L2D(_d, l); (f) = (float) _d; }\n\n#define jlong_L2D(d, l) {                                                 \\\n    int32 _negative;                                                      \\\n    jlong _absval;                                                        \\\n                                                                          \\\n    _negative = (l).hi >> 31;                                             \\\n    if (_negative) {                                                      \\\n\tjlong_NEG(_absval, l);                                                \\\n    } else {                                                              \\\n\t_absval = l;                                                          \\\n    }                                                                     \\\n    (d) = (double)_absval.hi * 4.294967296e9 + _absval.lo;                \\\n    if (_negative)                                                        \\\n\t(d) = -(d);                                                           \\\n}\n\n#define jlong_I2L(l, i)\t\t((l).hi = (i) >> 31, (l).lo = (i))\n#define jlong_UI2L(l, ui)\t((l).hi = 0, (l).lo = (ui))\n#define jlong_F2L(l, f)\t\t{ double _d = (double) f; jlong_D2L(l, _d); }\n\n#define jlong_D2L(l, d) {                                                 \\\n    int _negative;                                                        \\\n    double _absval, _d_hi;                                                \\\n    jlong _lo_d;                                                          \\\n                                                                          \\\n    _negative = ((d) < 0);                                                \\\n    _absval = _negative ? -(d) : (d);                                     \\\n                                                                          \\\n    (l).hi = (juint)(_absval / 4.294967296e9);                            \\\n    (l).lo = 0;                                                           \\\n    jlong_L2D(_d_hi, l);                                                  \\\n    _absval -= _d_hi;                                                     \\\n    _lo_d.hi = 0;                                                         \\\n    if (_absval < 0) {                                                    \\\n\t_lo_d.lo = (juint) -_absval;                                          \\\n\tjlong_SUB(l, l, _lo_d);                                               \\\n    } else {                                                              \\\n\t_lo_d.lo = (juint) _absval;                                           \\\n\tjlong_ADD(l, l, _lo_d);                                               \\\n    }                                                                     \\\n                                                                          \\\n    if (_negative)                                                        \\\n\tjlong_NEG(l, l);                                                      \\\n}\n\n#endif /* !HAVE_LONG_LONG */\n\n/******************************************************************************/\n\n#ifdef HAVE_ALIGNED_LONGLONGS\n#define JRI_GET_INT64(_t,_addr) ( ((_t).x[0] = ((jint*)(_addr))[0]), \\\n                              ((_t).x[1] = ((jint*)(_addr))[1]),      \\\n                              (_t).l )\n#define JRI_SET_INT64(_t, _addr, _v) ( (_t).l = (_v),                \\\n                                   ((jint*)(_addr))[0] = (_t).x[0], \\\n                                   ((jint*)(_addr))[1] = (_t).x[1] )\n#else\n#define JRI_GET_INT64(_t,_addr) (*(jlong*)(_addr))\n#define JRI_SET_INT64(_t, _addr, _v) (*(jlong*)(_addr) = (_v))\n#endif\n\n/* If double's must be aligned on doubleword boundaries then define this */\n#ifdef HAVE_ALIGNED_DOUBLES\n#define JRI_GET_DOUBLE(_t,_addr) ( ((_t).x[0] = ((jint*)(_addr))[0]), \\\n                               ((_t).x[1] = ((jint*)(_addr))[1]),      \\\n                               (_t).d )\n#define JRI_SET_DOUBLE(_t, _addr, _v) ( (_t).d = (_v),                \\\n                                    ((jint*)(_addr))[0] = (_t).x[0], \\\n                                    ((jint*)(_addr))[1] = (_t).x[1] )\n#else\n#define JRI_GET_DOUBLE(_t,_addr) (*(jdouble*)(_addr))\n#define JRI_SET_DOUBLE(_t, _addr, _v) (*(jdouble*)(_addr) = (_v))\n#endif\n\n/******************************************************************************/\n#ifdef __cplusplus\n}\n#endif\n#endif /* JRI_MD_H */\n/******************************************************************************/\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/PluginSDK 4.01a/Include/jritypes.h",
    "content": "/* -*- Mode: C; tab-width: 4; -*- */\n/*******************************************************************************\n * Java Runtime Interface\n * Copyright (c) 1996 Netscape Communications Corporation. All rights reserved.\n ******************************************************************************/\n\n#ifndef JRITYPES_H\n#define JRITYPES_H\n\n#include \"jni.h\"\n#include <stddef.h>\n#include <stdlib.h>\n#include <stdarg.h>\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*******************************************************************************\n * Types\n ******************************************************************************/\n\nstruct JRIEnvInterface;\n\ntypedef void*\t\tJRIRef;\ntypedef void*\t\tJRIGlobalRef;\n\ntypedef jint\t\tJRIFieldID;\ntypedef jint\t\tJRIMethodID;\n\n/* synonyms: */\ntypedef JRIGlobalRef\tjglobal;\n\ntypedef union JRIValue {\n\tjbool\t\t\tz;\n\tjbyte\t\t\tb;\n\tjchar\t\t\tc;\n\tjshort\t\t\ts;\n\tjint\t\t\ti;\n\tjlong\t\t\tl;\n\tjfloat\t\t\tf;\n\tjdouble\t\t\td;\n\tjref\t\t\tr;\n} JRIValue;\n\ntypedef enum JRIBoolean {\n    JRIFalse\t\t= 0,\n    JRITrue\t\t\t= 1\n} JRIBoolean;\n\ntypedef enum JRIConstant {\n\tJRIUninitialized\t= -1\n} JRIConstant;\n\n/* convenience types (these must be distinct struct types for c++ overloading): */\n#if 0\t/* now in jni.h */\ntypedef struct jbooleanArrayStruct*\t\tjbooleanArray;\ntypedef struct jbyteArrayStruct*\t\tjbyteArray;\ntypedef struct jcharArrayStruct*\t\tjcharArray;\ntypedef struct jshortArrayStruct*\t\tjshortArray;\ntypedef struct jintArrayStruct*\t\t\tjintArray;\ntypedef struct jlongArrayStruct*\t\tjlongArray;\ntypedef struct jfloatArrayStruct*\t\tjfloatArray;\ntypedef struct jdoubleArrayStruct*\t\tjdoubleArray;\ntypedef struct jobjectArrayStruct*\t\tjobjectArray;\n#endif\ntypedef struct jstringArrayStruct*\t\tjstringArray;\ntypedef struct jarrayArrayStruct*\t\tjarrayArray;\n\n#define JRIConstructorMethodName\t\"<init>\"\n\n/*******************************************************************************\n * Signature Construction Macros\n ******************************************************************************/\n\n/*\n** These macros can be used to construct signature strings. Hopefully their names\n** are a little easier to remember than the single character they correspond to.\n** For example, to specify the signature of the method:\n**\n**\tpublic int read(byte b[], int off, int len);\n**\n** you could write something like this in C:\n**\n**\tchar* readSig = JRISigMethod(JRISigArray(JRISigByte)\n**\t\t\t\t\t\t\t\t JRISigInt\n**\t\t\t\t\t\t\t\t JRISigInt) JRISigInt;\n**\n** Of course, don't put commas between the types.\n*/\n#define JRISigArray(T)\t\t\"[\" T\n#define JRISigByte\t\t\t\"B\"\n#define JRISigChar\t\t\t\"C\"\n#define JRISigClass(name)\t\"L\" name \";\"\n#define JRISigFloat\t\t\t\"F\"\n#define JRISigDouble\t\t\"D\"\n#define JRISigMethod(args)\t\"(\" args \")\"\n#define JRISigNoArgs\t\t\"\"\n#define JRISigInt\t\t\t\"I\"\n#define JRISigLong\t\t\t\"J\"\n#define JRISigShort\t\t\t\"S\"\n#define JRISigVoid\t\t\t\"V\"\n#define JRISigBoolean\t\t\"Z\"\n\n/*******************************************************************************\n * Environments\n ******************************************************************************/\n\nextern JRI_PUBLIC_API(const struct JRIEnvInterface**)\nJRI_GetCurrentEnv(void);\n\n/*******************************************************************************\n * Specific Scalar Array Types\n ******************************************************************************/\n\n/*\n** The JRI Native Method Interface does not support boolean arrays. This\n** is to allow Java runtime implementations to optimize boolean array\n** storage. Using the ScalarArray operations on boolean arrays is bound\n** to fail, so convert any boolean arrays to byte arrays in Java before\n** passing them to a native method.\n*/\n\n#define JRI_NewByteArray(env, length, initialValues)\t\\\n\tJRI_NewScalarArray(env, length, JRISigByte, (jbyte*)(initialValues))\n#define JRI_GetByteArrayLength(env, array)\t\\\n\tJRI_GetScalarArrayLength(env, array)\n#define JRI_GetByteArrayElements(env, array)\t\\\n\tJRI_GetScalarArrayElements(env, array)\n\n#define JRI_NewCharArray(env, length, initialValues)\t\\\n\tJRI_NewScalarArray(env, ((length) * sizeof(jchar)), JRISigChar, (jbyte*)(initialValues))\n#define JRI_GetCharArrayLength(env, array)\t\\\n\tJRI_GetScalarArrayLength(env, array)\n#define JRI_GetCharArrayElements(env, array)\t\t   \\\n\t((jchar*)JRI_GetScalarArrayElements(env, array))\n\n#define JRI_NewShortArray(env, length, initialValues)\t\\\n\tJRI_NewScalarArray(env, ((length) * sizeof(jshort)), JRISigShort, (jbyte*)(initialValues))\n#define JRI_GetShortArrayLength(env, array)\t\\\n\tJRI_GetScalarArrayLength(env, array)\n#define JRI_GetShortArrayElements(env, array)\t\t   \\\n\t((jshort*)JRI_GetScalarArrayElements(env, array))\n\n#define JRI_NewIntArray(env, length, initialValues)\t\\\n\tJRI_NewScalarArray(env, ((length) * sizeof(jint)), JRISigInt, (jbyte*)(initialValues))\n#define JRI_GetIntArrayLength(env, array)\t\\\n\tJRI_GetScalarArrayLength(env, array)\n#define JRI_GetIntArrayElements(env, array)\t\t   \\\n\t((jint*)JRI_GetScalarArrayElements(env, array))\n\n#define JRI_NewLongArray(env, length, initialValues)\t\\\n\tJRI_NewScalarArray(env, ((length) * sizeof(jlong)), JRISigLong, (jbyte*)(initialValues))\n#define JRI_GetLongArrayLength(env, array)\t\\\n\tJRI_GetScalarArrayLength(env, array)\n#define JRI_GetLongArrayElements(env, array)\t\t   \\\n\t((jlong*)JRI_GetScalarArrayElements(env, array))\n\n#define JRI_NewFloatArray(env, length, initialValues)\t\\\n\tJRI_NewScalarArray(env, ((length) * sizeof(jfloat)), JRISigFloat, (jbyte*)(initialValues))\n#define JRI_GetFloatArrayLength(env, array)\t\\\n\tJRI_GetScalarArrayLength(env, array)\n#define JRI_GetFloatArrayElements(env, array)\t\t   \\\n\t((jfloat*)JRI_GetScalarArrayElements(env, array))\n\n#define JRI_NewDoubleArray(env, length, initialValues)\t\\\n\tJRI_NewScalarArray(env, ((length) * sizeof(jdouble)), JRISigDouble, (jbyte*)(initialValues))\n#define JRI_GetDoubleArrayLength(env, array)\t\\\n\tJRI_GetScalarArrayLength(env, array)\n#define JRI_GetDoubleArrayElements(env, array)\t\t   \\\n\t((jdouble*)JRI_GetScalarArrayElements(env, array))\n\n/******************************************************************************/\n/*\n** JDK Stuff -- This stuff is still needed while we're using the JDK\n** dynamic linking strategy to call native methods.\n*/\n\ntypedef union JRI_JDK_stack_item {\n    /* Non pointer items */\n    jint           i;\n    jfloat         f;\n    jint           o;\n    /* Pointer items */\n    void          *h;\n    void          *p;\n    unsigned char *addr;\n#ifdef IS_64\n    double         d;\n    long           l;\t\t/* == 64bits! */\n#endif\n} JRI_JDK_stack_item;\n\ntypedef union JRI_JDK_Java8Str {\n    jint x[2];\n    jdouble d;\n    jlong l;\n    void *p;\n    float f;\n} JRI_JDK_Java8;\n\n/******************************************************************************/\n#ifdef __cplusplus\n}\n#endif\n#endif /* JRITYPES_H */\n/******************************************************************************/\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/PluginSDK 4.01a/Include/npapi.h",
    "content": "/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n *\n * The contents of this file are subject to the Netscape Public\n * License Version 1.1 (the \"License\"); you may not use this file\n * except in compliance with the License. You may obtain a copy of\n * the License at http://www.mozilla.org/NPL/\n *\n * Software distributed under the License is distributed on an \"AS\n * IS\" basis, WITHOUT WARRANTY OF ANY KIND, either express or\n * implied. See the License for the specific language governing\n * rights and limitations under the License.\n *\n * The Original Code is mozilla.org code.\n *\n * The Initial Developer of the Original Code is Netscape\n * Communications Corporation.  Portions created by Netscape are\n * Copyright (C) 1998 Netscape Communications Corporation. All\n * Rights Reserved.\n *\n * Contributor(s): \n */\n\n\n/*\n *  npapi.h $Revision: 1.1 $\n *  Netscape client plug-in API spec\n */\n\n#ifndef _NPAPI_H_\n#define _NPAPI_H_\n\n#ifdef __OS2__\n#pragma pack(1)\n#endif\n\n/* \n * NO_NSPR_10_SUPPORT disables the inclusion \n * of obsolete/protypes.h, whose int16, uint16, \n * int32, and uint32 typedefs conflict with those \n * in this file. \n */ \n#ifndef NO_NSPR_10_SUPPORT\n#define NO_NSPR_10_SUPPORT\n#endif\n#include \"jri.h\"                /* Java Runtime Interface */\n\n#if defined (__OS2__ ) || defined (OS2)\n#\tifndef XP_OS2\n#\t\tdefine XP_OS2 1\n#\tendif /* XP_OS2 */\n#endif /* __OS2__ */\n\n#ifdef _WINDOWS\n#\tifndef XP_WIN\n#\t\tdefine XP_WIN 1\n#\tendif /* XP_WIN */\n#endif /* _WINDOWS */\n\n#ifdef __MWERKS__\n#\tdefine _declspec __declspec\n#\tifdef macintosh\n#\t\tifndef XP_MAC\n#\t\t\tdefine XP_MAC 1\n#\t\tendif /* XP_MAC */\n#\tendif /* macintosh */\n#\tifdef __INTEL__\n#\t\tundef NULL\n#\t\tifndef XP_WIN\n#\t\t\tdefine XP_WIN 1\n#\t\tendif /* __INTEL__ */\n#\tendif /* XP_PC */\n#endif /* __MWERKS__ */\n\n#ifdef XP_MAC\n\t#include <Quickdraw.h>\n\t#include <Events.h>\n#endif\n\n#if defined(XP_UNIX) && !defined(NO_X11)\n\t#include <X11/Xlib.h>\n\t#include <X11/Xutil.h>\n#endif\n\n\n/*----------------------------------------------------------------------*/\n/*\t\t     Plugin Version Constants\t\t\t\t*/\n/*----------------------------------------------------------------------*/\n\n#define NP_VERSION_MAJOR 0\n#define NP_VERSION_MINOR 12\n\n\n/* The OS/2 version of Netscape uses RC_DATA to define the\n   mime types, file extentions, etc that are required.\n   Use a vertical bar to seperate types, end types with \\0.\n   FileVersion and ProductVersion are 32bit ints, all other\n   entries are strings the MUST be terminated wwith a \\0.\n\nAN EXAMPLE:\n\nRCDATA NP_INFO_ProductVersion { 1,0,0,1,}\n\nRCDATA NP_INFO_MIMEType    { \"video/x-video|\",\n                             \"video/x-flick\\0\" }\nRCDATA NP_INFO_FileExtents { \"avi|\",\n                             \"flc\\0\" }\nRCDATA NP_INFO_FileOpenName{ \"MMOS2 video player(*.avi)|\",\n                             \"MMOS2 Flc/Fli player(*.flc)\\0\" }\n\nRCDATA NP_INFO_FileVersion       { 1,0,0,1 }\nRCDATA NP_INFO_CompanyName       { \"Netscape Communications\\0\" }\nRCDATA NP_INFO_FileDescription   { \"NPAVI32 Extension DLL\\0\"\nRCDATA NP_INFO_InternalName      { \"NPAVI32\\0\" )\nRCDATA NP_INFO_LegalCopyright    { \"Copyright Netscape Communications \\251 1996\\0\"\nRCDATA NP_INFO_OriginalFilename  { \"NVAPI32.DLL\" }\nRCDATA NP_INFO_ProductName       { \"NPAVI32 Dynamic Link Library\\0\" }\n\n*/\n\n\n/* RC_DATA types for version info - required */\n#define NP_INFO_ProductVersion      1\n#define NP_INFO_MIMEType            2\n#define NP_INFO_FileOpenName        3\n#define NP_INFO_FileExtents         4\n\n/* RC_DATA types for version info - used if found */\n#define NP_INFO_FileDescription     5\n#define NP_INFO_ProductName         6\n\n/* RC_DATA types for version info - optional */\n#define NP_INFO_CompanyName         7\n#define NP_INFO_FileVersion         8\n#define NP_INFO_InternalName        9\n#define NP_INFO_LegalCopyright      10\n#define NP_INFO_OriginalFilename    11\n\n#ifndef RC_INVOKED\n\n\n\n/*----------------------------------------------------------------------*/\n/*\t\t     Definition of Basic Types\t\t\t\t*/\n/*----------------------------------------------------------------------*/\n\n#ifndef _UINT16\ntypedef unsigned short uint16;\n#endif\n\n#ifndef _UINT32\n#    if defined(__alpha)\ntypedef unsigned int uint32;\n#    else  /* __alpha */\ntypedef unsigned long uint32;\n#    endif /* __alpha */\n#endif\n\n/*\n * AIX defines these in sys/inttypes.h included from sys/types.h\n */\n#ifndef AIX\n#ifndef _INT16\ntypedef short int16;\n#endif\n\n#ifndef _INT32\n#    if defined(__alpha)\ntypedef int int32;\n#    else  /* __alpha */\ntypedef long int32;\n#    endif /* __alpha */\n#endif\n#endif\n\n#ifndef FALSE\n#define FALSE (0)\n#endif\n#ifndef TRUE\n#define TRUE (1)\n#endif\n#ifndef NULL\n#define NULL (0L)\n#endif\n\ntypedef unsigned char\tNPBool;\ntypedef int16\t\t\tNPError;\ntypedef int16\t\t\tNPReason;\ntypedef char*\t\t\tNPMIMEType;\n\n\n\n/*----------------------------------------------------------------------*/\n/*\t\t     Structures and definitions \t\t\t*/\n/*----------------------------------------------------------------------*/\n\n#ifdef XP_MAC\n#pragma options align=mac68k\n#endif\n\n/*\n *  NPP is a plug-in's opaque instance handle\n */\ntypedef struct _NPP\n{\n    void*\tpdata;\t\t\t/* plug-in private data */\n    void*\tndata;\t\t\t/* netscape private data */\n} NPP_t;\n\ntypedef NPP_t*\tNPP;\n\n\ntypedef struct _NPStream\n{\n    void*\t\tpdata;\t\t/* plug-in private data */\n    void*\t\tndata;\t\t/* netscape private data */\n    const char* \turl;\n    uint32\t\tend;\n    uint32\t\tlastmodified;\n    void*\t\tnotifyData;\n} NPStream;\n\n\ntypedef struct _NPByteRange\n{\n    int32\toffset; \t\t/* negative offset means from the end */\n    uint32\tlength;\n    struct _NPByteRange* next;\n} NPByteRange;\n\n\ntypedef struct _NPSavedData\n{\n    int32\tlen;\n    void*\tbuf;\n} NPSavedData;\n\n\ntypedef struct _NPRect\n{\n    uint16\ttop;\n    uint16\tleft;\n    uint16\tbottom;\n    uint16\tright;\n} NPRect;\n\ntypedef struct _NPSize \n{ \n  int32 width; \n  int32 height; \n} NPSize; \n\n#ifdef XP_UNIX\n/*\n * Unix specific structures and definitions\n */\n\n/*\n * Callback Structures.\n *\n * These are used to pass additional platform specific information.\n */\nenum {\n\tNP_SETWINDOW = 1,\n\tNP_PRINT\n};\n\ntypedef struct\n{\n    int32\t\ttype;\n} NPAnyCallbackStruct;\n\ntypedef struct\n{\n    int32\t\t\ttype;\n#ifndef NO_X11\n    Display*\t\tdisplay;\n    Visual*\t\t\tvisual;\n    Colormap\t\tcolormap;\n    unsigned int\tdepth;\n#endif\n} NPSetWindowCallbackStruct;\n\ntypedef struct\n{\n    int32\t\t\ttype;\n    FILE*\t\t\tfp;\n} NPPrintCallbackStruct;\n\n#endif /* XP_UNIX */\n\n/*\n * List of variable names for which NPP_GetValue shall be implemented\n */\ntypedef enum {\n  NPPVpluginNameString = 1,\n  NPPVpluginDescriptionString,\n  NPPVpluginWindowBool,\n  NPPVpluginTransparentBool,\n  NPPVjavaClass,\n  NPPVpluginWindowSize,\n  NPPVpluginTimerInterval,\n\n  NPPVpluginScriptableInstance = 10,\n  NPPVpluginScriptableIID = 11\n} NPPVariable;\n\n/*\n * List of variable names for which NPN_GetValue is implemented by Mozilla\n */\ntypedef enum {\n\tNPNVxDisplay = 1,\n\tNPNVxtAppContext,\n    NPNVnetscapeWindow,\n\tNPNVjavascriptEnabledBool,\n\tNPNVasdEnabledBool,\n\tNPNVisOfflineBool\n} NPNVariable;\n\n/*\n * The type of a NPWindow - it specifies the type of the data structure\n * returned in the window field.\n */\ntypedef enum {\n    NPWindowTypeWindow = 1,\n    NPWindowTypeDrawable\n} NPWindowType;\n\ntypedef struct _NPWindow\n{\n    void*\twindow;\t\t/* Platform specific window handle */\n                                        /* OS/2: x - Position of bottom left corner  */\n                                        /* OS/2: y - relative to visible netscape window */\n    uint32\tx;\t\t\t/* Position of top left corner relative */\n    uint32\ty; \t\t\t/*\tto a netscape page.\t\t\t\t\t*/\n    uint32\twidth;\t\t/* Maximum window size */\n    uint32\theight;\n    NPRect\tclipRect;\t/* Clipping rectangle in port coordinates */\n\t\t\t\t\t\t/* Used by MAC only.\t\t\t  */\n#ifdef XP_UNIX\n    void *\tws_info;\t/* Platform-dependent additonal data */\n#endif /* XP_UNIX */\n    NPWindowType type;\t/* Is this a window or a drawable? */\n} NPWindow;\n\n\ntypedef struct _NPFullPrint\n{\n    NPBool\tpluginPrinted;\t/* Set TRUE if plugin handled fullscreen */\n\t\t\t\t\t\t\t/*\tprinting\t\t\t\t\t\t\t */\n    NPBool\tprintOne;\t\t/* TRUE if plugin should print one copy  */\n\t\t\t\t\t\t\t/*\tto default printer\t\t\t\t\t */\n    void*\tplatformPrint;\t/* Platform-specific printing info */\n} NPFullPrint;\n\ntypedef struct _NPEmbedPrint\n{\n    NPWindow\twindow;\n    void*\tplatformPrint;\t/* Platform-specific printing info */\n} NPEmbedPrint;\n\ntypedef struct _NPPrint\n{\n    uint16\tmode;\t\t\t\t\t\t/* NP_FULL or NP_EMBED */\n    union\n    {\n\t\tNPFullPrint\t\tfullPrint;\t\t/* if mode is NP_FULL */\n\t\tNPEmbedPrint\tembedPrint;\t\t/* if mode is NP_EMBED */\n    } print;\n} NPPrint;\n\n#ifdef XP_MAC\ntypedef EventRecord\tNPEvent;\n#elif defined(XP_WIN)\ntypedef struct _NPEvent\n{\n    uint16   event;\n    uint32   wParam;\n    uint32   lParam;\n} NPEvent;\n#elif defined(XP_OS2)\ntypedef struct _NPEvent\n{\n    uint32   event;\n    uint32   wParam;\n    uint32   lParam;\n} NPEvent;\n#elif defined (XP_UNIX) && !defined(NO_X11)\ntypedef XEvent NPEvent;\n#else\ntypedef void*\t\t\tNPEvent;\n#endif /* XP_MAC */\n\n#ifdef XP_MAC\ntypedef RgnHandle NPRegion;\n#elif defined(XP_WIN)\ntypedef HRGN NPRegion;\n#elif defined(XP_UNIX) && !defined(NO_X11)\ntypedef Region NPRegion;\n#else\ntypedef void *NPRegion;\n#endif /* XP_MAC */\n\n#ifdef XP_MAC\n/*\n *  Mac-specific structures and definitions.\n */\n\ntypedef struct NP_Port\n{\n    CGrafPtr\tport;\t\t/* Grafport */\n    int32\t\tportx;\t\t/* position inside the topmost window */\n    int32\t\tporty;\n} NP_Port;\n\n/*\n *  Non-standard event types that can be passed to HandleEvent\n */\n#define getFocusEvent\t    (osEvt + 16)\n#define loseFocusEvent\t    (osEvt + 17)\n#define adjustCursorEvent   (osEvt + 18)\n\n#endif /* XP_MAC */\n\n\n/*\n * Values for mode passed to NPP_New:\n */\n#define NP_EMBED\t\t1\n#define NP_FULL \t\t2\n\n/*\n * Values for stream type passed to NPP_NewStream:\n */\n#define NP_NORMAL\t\t1\n#define NP_SEEK \t\t2\n#define NP_ASFILE\t\t3\n#define NP_ASFILEONLY\t\t4\n\n#define NP_MAXREADY\t(((unsigned)(~0)<<1)>>1)\n\n#ifdef XP_MAC\n#pragma options align=reset\n#endif\n\n\n/*----------------------------------------------------------------------*/\n/*\t\t     Error and Reason Code definitions\t\t\t*/\n/*----------------------------------------------------------------------*/\n\n/*\n *\tValues of type NPError:\n */\n#define NPERR_BASE\t\t\t\t\t\t\t0\n#define NPERR_NO_ERROR\t\t\t\t\t\t(NPERR_BASE + 0)\n#define NPERR_GENERIC_ERROR\t\t\t\t\t(NPERR_BASE + 1)\n#define NPERR_INVALID_INSTANCE_ERROR\t\t(NPERR_BASE + 2)\n#define NPERR_INVALID_FUNCTABLE_ERROR\t\t(NPERR_BASE + 3)\n#define NPERR_MODULE_LOAD_FAILED_ERROR\t\t(NPERR_BASE + 4)\n#define NPERR_OUT_OF_MEMORY_ERROR\t\t\t(NPERR_BASE + 5)\n#define NPERR_INVALID_PLUGIN_ERROR\t\t\t(NPERR_BASE + 6)\n#define NPERR_INVALID_PLUGIN_DIR_ERROR\t\t(NPERR_BASE + 7)\n#define NPERR_INCOMPATIBLE_VERSION_ERROR\t(NPERR_BASE + 8)\n#define NPERR_INVALID_PARAM\t\t\t\t(NPERR_BASE + 9)\n#define NPERR_INVALID_URL\t\t\t\t\t(NPERR_BASE + 10)\n#define NPERR_FILE_NOT_FOUND\t\t\t\t(NPERR_BASE + 11)\n#define NPERR_NO_DATA\t\t\t\t\t\t(NPERR_BASE + 12)\n#define NPERR_STREAM_NOT_SEEKABLE\t\t\t(NPERR_BASE + 13)\n\n/*\n *\tValues of type NPReason:\n */\n#define NPRES_BASE\t\t\t\t0\n#define NPRES_DONE\t\t\t\t\t(NPRES_BASE + 0)\n#define NPRES_NETWORK_ERR\t\t\t(NPRES_BASE + 1)\n#define NPRES_USER_BREAK\t\t\t(NPRES_BASE + 2)\n\n/*\n *      Don't use these obsolete error codes any more.\n */\n#define NP_NOERR  NP_NOERR_is_obsolete_use_NPERR_NO_ERROR\n#define NP_EINVAL NP_EINVAL_is_obsolete_use_NPERR_GENERIC_ERROR\n#define NP_EABORT NP_EABORT_is_obsolete_use_NPRES_USER_BREAK\n\n/*\n * Version feature information\n */\n#define NPVERS_HAS_STREAMOUTPUT \t8\n#define NPVERS_HAS_NOTIFICATION \t9\n#define NPVERS_HAS_LIVECONNECT\t\t9\n#define NPVERS_WIN16_HAS_LIVECONNECT\t9\n#define NPVERS_68K_HAS_LIVECONNECT\t11\n#define NPVERS_HAS_WINDOWLESS       11\n\n\n/*----------------------------------------------------------------------*/\n/*\t\t     Function Prototypes\t\t\t\t*/\n/*----------------------------------------------------------------------*/\n\n#if defined(_WINDOWS) && !defined(WIN32)\n#define NP_LOADDS  _loadds\n#else\n#if defined(__OS2__)\n#define NP_LOADDS _System\n#else\n#define NP_LOADDS\n#endif\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*\n * NPP_* functions are provided by the plugin and called by the navigator.\n */\n\n#ifdef XP_UNIX\nchar*\t\t\t\t\tNPP_GetMIMEDescription(void);\n#endif /* XP_UNIX */\n\nNPError     NP_LOADDS\tNPP_Initialize(void);\nvoid        NP_LOADDS\tNPP_Shutdown(void);\nNPError     NP_LOADDS\tNPP_New(NPMIMEType pluginType, NPP instance,\n\t\t\t\t\t\t\t\tuint16 mode, int16 argc, char* argn[],\n\t\t\t\t\t\t\t\tchar* argv[], NPSavedData* saved);\nNPError     NP_LOADDS\tNPP_Destroy(NPP instance, NPSavedData** save);\nNPError     NP_LOADDS\tNPP_SetWindow(NPP instance, NPWindow* window);\nNPError     NP_LOADDS\tNPP_NewStream(NPP instance, NPMIMEType type,\n\t\t\t\t\t\t\t\t\t  NPStream* stream, NPBool seekable,\n\t\t\t\t\t\t\t\t\t  uint16* stype);\nNPError     NP_LOADDS\tNPP_DestroyStream(NPP instance, NPStream* stream,\n\t\t\t\t\t\t\t\t\t\t  NPReason reason);\nint32\t    NP_LOADDS\tNPP_WriteReady(NPP instance, NPStream* stream);\nint32\t    NP_LOADDS\tNPP_Write(NPP instance, NPStream* stream, int32 offset,\n\t\t\t\t\t\t\t\t  int32 len, void* buffer);\nvoid\t    NP_LOADDS\tNPP_StreamAsFile(NPP instance, NPStream* stream,\n\t\t\t\t\t\t\t\t\t\t const char* fname);\nvoid\t    NP_LOADDS\tNPP_Print(NPP instance, NPPrint* platformPrint);\nint16       NP_LOADDS\tNPP_HandleEvent(NPP instance, void* event);\nvoid\t    NP_LOADDS\tNPP_URLNotify(NPP instance, const char* url,\n\t\t\t\t\t\t\t\t\t  NPReason reason, void* notifyData);\njref\t    NP_LOADDS\tNPP_GetJavaClass(void);\nNPError\t\tNP_LOADDS\tNPP_GetValue(NPP instance, NPPVariable variable,\n                                     void *value);\nNPError\t\tNP_LOADDS\tNPP_SetValue(NPP instance, NPNVariable variable,\n                                     void *value);\n\n/*\n * NPN_* functions are provided by the navigator and called by the plugin.\n */\nvoid       NP_LOADDS\tNPN_Version(int* plugin_major, int* plugin_minor,\n\t\t\t\t\t\t\tint* netscape_major, int* netscape_minor);\nNPError    NP_LOADDS\tNPN_GetURLNotify(NPP instance, const char* url,\n\t\t\t\t\t\t\t\t const char* target, void* notifyData);\nNPError    NP_LOADDS\tNPN_GetURL(NPP instance, const char* url,\n\t\t\t\t\t\t   const char* target);\nNPError    NP_LOADDS\tNPN_PostURLNotify(NPP instance, const char* url,\n\t\t\t\t\t\t\t\t  const char* target, uint32 len,\n\t\t\t\t\t\t\t\t  const char* buf, NPBool file,\n\t\t\t\t\t\t\t\t  void* notifyData);\nNPError    NP_LOADDS\tNPN_PostURL(NPP instance, const char* url,\n\t\t\t\t\t\t\tconst char* target, uint32 len,\n\t\t\t\t\t\t\tconst char* buf, NPBool file);\nNPError    NP_LOADDS\tNPN_RequestRead(NPStream* stream, NPByteRange* rangeList);\nNPError    NP_LOADDS\tNPN_NewStream(NPP instance, NPMIMEType type,\n\t\t\t\t\t\t\t  const char* target, NPStream** stream);\nint32      NP_LOADDS\tNPN_Write(NPP instance, NPStream* stream, int32 len,\n\t\t\t\t\t\t  void* buffer);\nNPError    NP_LOADDS\tNPN_DestroyStream(NPP instance, NPStream* stream,\n\t\t\t\t\t\t\t\t  NPReason reason);\nvoid       NP_LOADDS\tNPN_Status(NPP instance, const char* message);\nconst char* NP_LOADDS\tNPN_UserAgent(NPP instance);\nvoid*      NP_LOADDS\tNPN_MemAlloc(uint32 size);\nvoid       NP_LOADDS\tNPN_MemFree(void* ptr);\nuint32     NP_LOADDS\tNPN_MemFlush(uint32 size);\nvoid\t   NP_LOADDS\tNPN_ReloadPlugins(NPBool reloadPages);\nJRIEnv*\t   NP_LOADDS\tNPN_GetJavaEnv(void);\njref\t   NP_LOADDS\tNPN_GetJavaPeer(NPP instance);\nNPError\t   NP_LOADDS\tNPN_GetValue(NPP instance, NPNVariable variable,\n\t\t\t\t\t\t\t void *value);\nNPError\t   NP_LOADDS\tNPN_SetValue(NPP instance, NPPVariable variable,\n\t\t\t\t\t\t\t void *value);\nvoid\t\tNP_LOADDS\tNPN_InvalidateRect(NPP instance, NPRect *invalidRect);\nvoid\t\tNP_LOADDS\tNPN_InvalidateRegion(NPP instance, NPRegion invalidRegion);\nvoid       NP_LOADDS\tNPN_ForceRedraw(NPP instance);\n\n#ifdef __cplusplus\n}  /* end extern \"C\" */\n#endif\n\n#endif                  /* RC_INVOKED */\n#ifdef __OS2__\n#pragma pack()\n#endif\n\n#endif /* _NPAPI_H_ */\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/PluginSDK 4.01a/Include/npupp.h",
    "content": "/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n *\n * The contents of this file are subject to the Netscape Public\n * License Version 1.1 (the \"License\"); you may not use this file\n * except in compliance with the License. You may obtain a copy of\n * the License at http://www.mozilla.org/NPL/\n *\n * Software distributed under the License is distributed on an \"AS\n * IS\" basis, WITHOUT WARRANTY OF ANY KIND, either express or\n * implied. See the License for the specific language governing\n * rights and limitations under the License.\n *\n * The Original Code is mozilla.org code.\n *\n * The Initial Developer of the Original Code is Netscape\n * Communications Corporation.  Portions created by Netscape are\n * Copyright (C) 1998 Netscape Communications Corporation. All\n * Rights Reserved.\n *\n * Contributor(s): \n */\n\n\n/*\n *  npupp.h $Revision: 1.1 $\n *  function call mecahnics needed by platform specific glue code.\n */\n\n\n#ifndef _NPUPP_H_\n#define _NPUPP_H_\n\n#if defined(__OS2__)\n#pragma pack(1)\n#endif\n\n#ifndef GENERATINGCFM\n#define GENERATINGCFM 0\n#endif\n\n#ifndef _NPAPI_H_\n#include \"npapi.h\"\n#endif\n\n#include \"jri.h\"\n\n/******************************************************************************************\n   plug-in function table macros\n \t        for each function in and out of the plugin API we define\n                    typedef NPP_FooUPP\n\t\t\t\t\t#define NewNPP_FooProc\n\t\t\t\t\t#define CallNPP_FooProc\n\t\t\tfor mac, define the UPP magic for PPC/68K calling\n *******************************************************************************************/\n\n\n/* NPP_Initialize */\n\n#define _NPUPP_USE_UPP_ (TARGET_RT_MAC_CFM && !TARGET_API_MAC_CARBON)\n\n#if _NPUPP_USE_UPP_\ntypedef UniversalProcPtr NPP_InitializeUPP;\n\nenum {\n\tuppNPP_InitializeProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(0))\t\t\n\t\t| RESULT_SIZE(SIZE_CODE(0))\n};\n\n#define NewNPP_InitializeProc(FUNC)\t\t\\\n\t\t(NPP_InitializeUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_InitializeProcInfo, GetCurrentArchitecture())\n#define CallNPP_InitializeProc(FUNC)\t\t\\\n\t\t(void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_InitializeProcInfo)\n\t\t\n#else\n\ntypedef void (* NP_LOADDS NPP_InitializeUPP)(void);\n#define NewNPP_InitializeProc(FUNC)\t\t\\\n\t\t((NPP_InitializeUPP) (FUNC))\n#define CallNPP_InitializeProc(FUNC)\t\t\\\n\t\t(*(FUNC))()\n\n#endif\n\n\n/* NPP_Shutdown */\n\n#if _NPUPP_USE_UPP_\ntypedef UniversalProcPtr NPP_ShutdownUPP;\n\nenum {\n\tuppNPP_ShutdownProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(0))\t\t\n\t\t| RESULT_SIZE(SIZE_CODE(0))\n};\n\n#define NewNPP_ShutdownProc(FUNC)\t\t\\\n\t\t(NPP_ShutdownUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_ShutdownProcInfo, GetCurrentArchitecture())\n#define CallNPP_ShutdownProc(FUNC)\t\t\\\n\t\t(void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_ShutdownProcInfo)\n\t\t\n#else\n\ntypedef void (* NP_LOADDS NPP_ShutdownUPP)(void);\n#define NewNPP_ShutdownProc(FUNC)\t\t\\\n\t\t((NPP_ShutdownUPP) (FUNC))\n#define CallNPP_ShutdownProc(FUNC)\t\t\\\n\t\t(*(FUNC))()\n\n#endif\n\n\n/* NPP_New */\n\n#if _NPUPP_USE_UPP_\ntypedef UniversalProcPtr NPP_NewUPP;\n\nenum {\n\tuppNPP_NewProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPMIMEType)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(uint16)))\n\t\t| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(int16)))\n\t\t| STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(char **)))\n\t\t| STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(char **)))\n\t\t| STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(NPSavedData *)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))\n};\n\n#define NewNPP_NewProc(FUNC)\t\t\\\n\t\t(NPP_NewUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_NewProcInfo, GetCurrentArchitecture())\n#define CallNPP_NewProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \\\n\t\t(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_NewProcInfo, \\\n\t\t\t\t\t\t\t\t   (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7))\n#else\n\ntypedef NPError\t(* NP_LOADDS NPP_NewUPP)(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved);\n#define NewNPP_NewProc(FUNC)\t\t\\\n\t\t((NPP_NewUPP) (FUNC))\n#define CallNPP_NewProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7)\t\t\\\n\t\t(*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7))\n\n#endif\n\n\n/* NPP_Destroy */\n\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPP_DestroyUPP;\nenum {\n\tuppNPP_DestroyProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPSavedData **)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))\n};\n#define NewNPP_DestroyProc(FUNC)\t\t\\\n\t\t(NPP_DestroyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_DestroyProcInfo, GetCurrentArchitecture())\n#define CallNPP_DestroyProc(FUNC, ARG1, ARG2)\t\t\\\n\t\t(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_DestroyProcInfo, (ARG1), (ARG2))\n#else\n\ntypedef NPError\t(* NP_LOADDS NPP_DestroyUPP)(NPP instance, NPSavedData** save);\n#define NewNPP_DestroyProc(FUNC)\t\t\\\n\t\t((NPP_DestroyUPP) (FUNC))\n#define CallNPP_DestroyProc(FUNC, ARG1, ARG2)\t\t\\\n\t\t(*(FUNC))((ARG1), (ARG2))\n\n#endif\n\n\n/* NPP_SetWindow */\n\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPP_SetWindowUPP;\nenum {\n\tuppNPP_SetWindowProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPWindow *)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))\n};\n#define NewNPP_SetWindowProc(FUNC)\t\t\\\n\t\t(NPP_SetWindowUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_SetWindowProcInfo, GetCurrentArchitecture())\n#define CallNPP_SetWindowProc(FUNC, ARG1, ARG2)\t\t\\\n\t\t(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_SetWindowProcInfo, (ARG1), (ARG2))\n\n#else\n\ntypedef NPError\t(* NP_LOADDS NPP_SetWindowUPP)(NPP instance, NPWindow* window);\n#define NewNPP_SetWindowProc(FUNC)\t\t\\\n\t\t((NPP_SetWindowUPP) (FUNC))\n#define CallNPP_SetWindowProc(FUNC, ARG1, ARG2)\t\t\\\n\t\t(*(FUNC))((ARG1), (ARG2))\n\n#endif\n\n\n/* NPP_NewStream */\n\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPP_NewStreamUPP;\nenum {\n\tuppNPP_NewStreamProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPMIMEType)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPStream *)))\n\t\t| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(NPBool)))\n\t\t| STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(uint16 *)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))\n};\n#define NewNPP_NewStreamProc(FUNC)\t\t\\\n\t\t(NPP_NewStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_NewStreamProcInfo, GetCurrentArchitecture())\n#define CallNPP_NewStreamProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5)\t\t\\\n\t\t(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_NewStreamProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5))\n#else\n\ntypedef NPError\t(* NP_LOADDS NPP_NewStreamUPP)(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype);\n#define NewNPP_NewStreamProc(FUNC)\t\t\\\n\t\t((NPP_NewStreamUPP) (FUNC))\n#define CallNPP_NewStreamProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \\\n\t\t(*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5))\n#endif\n\n\n/* NPP_DestroyStream */\n\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPP_DestroyStreamUPP;\nenum {\n\tuppNPP_DestroyStreamProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPReason)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))\n};\n#define NewNPP_DestroyStreamProc(FUNC)\t\t\\\n\t\t(NPP_DestroyStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_DestroyStreamProcInfo, GetCurrentArchitecture())\n#define CallNPP_DestroyStreamProc(FUNC,  NPParg, NPStreamPtr, NPReasonArg)\t\t\\\n\t\t(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_DestroyStreamProcInfo, (NPParg), (NPStreamPtr), (NPReasonArg))\n\n#else\n\ntypedef NPError\t(* NP_LOADDS NPP_DestroyStreamUPP)(NPP instance, NPStream* stream, NPReason reason);\n#define NewNPP_DestroyStreamProc(FUNC)\t\t\\\n\t\t((NPP_DestroyStreamUPP) (FUNC))\n#define CallNPP_DestroyStreamProc(FUNC,  NPParg, NPStreamPtr, NPReasonArg)\t\t\\\n\t\t(*(FUNC))((NPParg), (NPStreamPtr), (NPReasonArg))\n\n#endif\n\n\n/* NPP_WriteReady */\n\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPP_WriteReadyUPP;\nenum {\n\tuppNPP_WriteReadyProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(int32)))\n};\n#define NewNPP_WriteReadyProc(FUNC)\t\t\\\n\t\t(NPP_WriteReadyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_WriteReadyProcInfo, GetCurrentArchitecture())\n#define CallNPP_WriteReadyProc(FUNC,  NPParg, NPStreamPtr)\t\t\\\n\t\t(int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_WriteReadyProcInfo, (NPParg), (NPStreamPtr))\n\n#else\n\ntypedef int32 (* NP_LOADDS NPP_WriteReadyUPP)(NPP instance, NPStream* stream);\n#define NewNPP_WriteReadyProc(FUNC)\t\t\\\n\t\t((NPP_WriteReadyUPP) (FUNC))\n#define CallNPP_WriteReadyProc(FUNC,  NPParg, NPStreamPtr)\t\t\\\n\t\t(*(FUNC))((NPParg), (NPStreamPtr))\n\n#endif\n\n\n/* NPP_Write */\n\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPP_WriteUPP;\nenum {\n\tuppNPP_WriteProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(int32)))\n\t\t| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(int32)))\n\t\t| STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(void*)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(int32)))\n};\n#define NewNPP_WriteProc(FUNC)\t\t\\\n\t\t(NPP_WriteUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_WriteProcInfo, GetCurrentArchitecture())\n#define CallNPP_WriteProc(FUNC,  NPParg, NPStreamPtr, offsetArg, lenArg, bufferPtr)\t\t\\\n\t\t(int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_WriteProcInfo, (NPParg), (NPStreamPtr), (offsetArg), (lenArg), (bufferPtr))\n\n#else\n\ntypedef int32 (* NP_LOADDS NPP_WriteUPP)(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer);\n#define NewNPP_WriteProc(FUNC)\t\t\\\n\t\t((NPP_WriteUPP) (FUNC))\n#define CallNPP_WriteProc(FUNC,  NPParg, NPStreamPtr, offsetArg, lenArg, bufferPtr)\t\t\\\n\t\t(*(FUNC))((NPParg), (NPStreamPtr), (offsetArg), (lenArg), (bufferPtr))\n\n#endif\n\n\n/* NPP_StreamAsFile */\n\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPP_StreamAsFileUPP;\nenum {\n\tuppNPP_StreamAsFileProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char *)))\n\t\t| RESULT_SIZE(SIZE_CODE(0))\n};\n#define NewNPP_StreamAsFileProc(FUNC)\t\t\\\n\t\t(NPP_StreamAsFileUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_StreamAsFileProcInfo, GetCurrentArchitecture())\n#define CallNPP_StreamAsFileProc(FUNC, ARG1, ARG2, ARG3)\t\t\\\n\t\t(void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_StreamAsFileProcInfo, (ARG1), (ARG2), (ARG3))\n\n#else\n\ntypedef void (* NP_LOADDS NPP_StreamAsFileUPP)(NPP instance, NPStream* stream, const char* fname);\n#define NewNPP_StreamAsFileProc(FUNC)\t\t\\\n\t\t((NPP_StreamAsFileUPP) (FUNC))\n#define CallNPP_StreamAsFileProc(FUNC,  ARG1, ARG2, ARG3)\t\t\\\n\t\t(*(FUNC))((ARG1), (ARG2), (ARG3))\n#endif\n\n\n/* NPP_Print */\n\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPP_PrintUPP;\nenum {\n\tuppNPP_PrintProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPrint *)))\n\t\t| RESULT_SIZE(SIZE_CODE(0))\n};\n#define NewNPP_PrintProc(FUNC)\t\t\\\n\t\t(NPP_PrintUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_PrintProcInfo, GetCurrentArchitecture())\n#define CallNPP_PrintProc(FUNC,  NPParg, voidPtr)\t\t\\\n\t\t(void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_PrintProcInfo, (NPParg), (voidPtr))\n\n#else\n\ntypedef void (* NP_LOADDS NPP_PrintUPP)(NPP instance, NPPrint* platformPrint);\n#define NewNPP_PrintProc(FUNC)\t\t\\\n\t\t((NPP_PrintUPP) (FUNC))\n#define CallNPP_PrintProc(FUNC,  NPParg, NPPrintArg)\t\t\\\n\t\t(*(FUNC))((NPParg), (NPPrintArg))\n\n#endif\n\n\n/* NPP_HandleEvent */\n\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPP_HandleEventUPP;\nenum {\n\tuppNPP_HandleEventProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void *)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(int16)))\n};\n#define NewNPP_HandleEventProc(FUNC)\t\t\\\n\t\t(NPP_HandleEventUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_HandleEventProcInfo, GetCurrentArchitecture())\n#define CallNPP_HandleEventProc(FUNC,  NPParg, voidPtr)\t\t\\\n\t\t(int16)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_HandleEventProcInfo, (NPParg), (voidPtr))\n\n#else\n\ntypedef int16 (* NP_LOADDS NPP_HandleEventUPP)(NPP instance, void* event);\n#define NewNPP_HandleEventProc(FUNC)\t\t\\\n\t\t((NPP_HandleEventUPP) (FUNC))\n#define CallNPP_HandleEventProc(FUNC,  NPParg, voidPtr)\t\t\\\n\t\t(*(FUNC))((NPParg), (voidPtr))\n\n#endif\n\n\n/* NPP_URLNotify */\n\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPP_URLNotifyUPP;\nenum {\n\tuppNPP_URLNotifyProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPReason)))\n\t\t| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void*)))\n\t\t| RESULT_SIZE(SIZE_CODE(SIZE_CODE(0)))\n};\n#define NewNPP_URLNotifyProc(FUNC)\t\t\\\n\t\t(NPP_URLNotifyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_URLNotifyProcInfo, GetCurrentArchitecture())\n#define CallNPP_URLNotifyProc(FUNC,  ARG1, ARG2, ARG3, ARG4)\t\t\\\n\t\t(void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_URLNotifyProcInfo, (ARG1), (ARG2), (ARG3), (ARG4))\n\n#else\n\ntypedef void (* NP_LOADDS NPP_URLNotifyUPP)(NPP instance, const char* url, NPReason reason, void* notifyData);\n#define NewNPP_URLNotifyProc(FUNC)\t\t\\\n\t\t((NPP_URLNotifyUPP) (FUNC))\n#define CallNPP_URLNotifyProc(FUNC,  ARG1, ARG2, ARG3, ARG4)\t\t\\\n\t\t(*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4))\n\n#endif\n\n\n/* NPP_GetValue */\n\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPP_GetValueUPP;\nenum {\n\tuppNPP_GetValueProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPVariable)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void *)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))\n};\n#define NewNPP_GetValueProc(FUNC)\t\t\\\n\t\t(NPP_GetValueUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_GetValueProcInfo, GetCurrentArchitecture())\n#define CallNPP_GetValueProc(FUNC, ARG1, ARG2, ARG3) \\\n\t\t(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_GetValueProcInfo, (ARG1), (ARG2), (ARG3))\n#else\n\ntypedef NPError\t(* NP_LOADDS NPP_GetValueUPP)(NPP instance, NPPVariable variable, void *ret_alue);\n#define NewNPP_GetValueProc(FUNC)\t\t\\\n\t\t((NPP_GetValueUPP) (FUNC))\n#define CallNPP_GetValueProc(FUNC, ARG1, ARG2, ARG3)\t\t\\\n\t\t(*(FUNC))((ARG1), (ARG2), (ARG3))\n#endif\n\n\n/* NPP_SetValue */\n\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPP_SetValueUPP;\nenum {\n\tuppNPP_SetValueProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPNVariable)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void *)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))\n};\n#define NewNPP_SetValueProc(FUNC)\t\t\\\n\t\t(NPP_SetValueUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_SetValueProcInfo, GetCurrentArchitecture())\n#define CallNPP_SetValueProc(FUNC, ARG1, ARG2, ARG3) \\\n\t\t(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_SetValueProcInfo, (ARG1), (ARG2), (ARG3))\n#else\n\ntypedef NPError\t(* NP_LOADDS NPP_SetValueUPP)(NPP instance, NPNVariable variable, void *ret_alue);\n#define NewNPP_SetValueProc(FUNC)\t\t\\\n\t\t((NPP_SetValueUPP) (FUNC))\n#define CallNPP_SetValueProc(FUNC, ARG1, ARG2, ARG3)\t\t\\\n\t\t(*(FUNC))((ARG1), (ARG2), (ARG3))\n#endif\n\n\n\n\n/*\n *  Netscape entry points\n */\n\n\n/* NPN_GetValue */\n\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPN_GetValueUPP;\nenum {\n\tuppNPN_GetValueProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPNVariable)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void *)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))\n};\n#define NewNPN_GetValueProc(FUNC)\t\t\\\n\t\t(NPN_GetValueUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetValueProcInfo, GetCurrentArchitecture())\n#define CallNPN_GetValueProc(FUNC, ARG1, ARG2, ARG3) \\\n\t\t(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetValueProcInfo, (ARG1), (ARG2), (ARG3))\n#else\n\ntypedef NPError\t(* NP_LOADDS NPN_GetValueUPP)(NPP instance, NPNVariable variable, void *ret_alue);\n#define NewNPN_GetValueProc(FUNC)\t\t\\\n\t\t((NPN_GetValueUPP) (FUNC))\n#define CallNPN_GetValueProc(FUNC, ARG1, ARG2, ARG3)\t\t\\\n\t\t(*(FUNC))((ARG1), (ARG2), (ARG3))\n#endif\n\n\n/* NPN_SetValue */\n\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPN_SetValueUPP;\nenum {\n\tuppNPN_SetValueProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPVariable)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void *)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))\n};\n#define NewNPN_SetValueProc(FUNC)\t\t\\\n\t\t(NPN_SetValueUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_SetValueProcInfo, GetCurrentArchitecture())\n#define CallNPN_SetValueProc(FUNC, ARG1, ARG2, ARG3) \\\n\t\t(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_SetValueProcInfo, (ARG1), (ARG2), (ARG3))\n#else\n\ntypedef NPError\t(* NP_LOADDS NPN_SetValueUPP)(NPP instance, NPPVariable variable, void *ret_alue);\n#define NewNPN_SetValueProc(FUNC)\t\t\\\n\t\t((NPN_SetValueUPP) (FUNC))\n#define CallNPN_SetValueProc(FUNC, ARG1, ARG2, ARG3)\t\t\\\n\t\t(*(FUNC))((ARG1), (ARG2), (ARG3))\n#endif\n\n\n/* NPN_GetUrlNotify */\n\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPN_GetURLNotifyUPP;\nenum {\n\tuppNPN_GetURLNotifyProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*)))\n\t\t| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void*)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))\n};\n#define NewNPN_GetURLNotifyProc(FUNC)\t\t\\\n\t\t(NPN_GetURLNotifyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetURLNotifyProcInfo, GetCurrentArchitecture())\n#define CallNPN_GetURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \\\n\t\t(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetURLNotifyProcInfo, (ARG1), (ARG2), (ARG3), (ARG4))\n#else\n\ntypedef NPError\t(* NP_LOADDS NPN_GetURLNotifyUPP)(NPP instance, const char* url, const char* window, void* notifyData);\n#define NewNPN_GetURLNotifyProc(FUNC)\t\t\\\n\t\t((NPN_GetURLNotifyUPP) (FUNC))\n#define CallNPN_GetURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4)\t\t\\\n\t\t(*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4))\n#endif\n\n\n/* NPN_PostUrlNotify */\n\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPN_PostURLNotifyUPP;\nenum {\n\tuppNPN_PostURLNotifyProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*)))\n\t\t| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(uint32)))\n\t\t| STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(const char*)))\n\t\t| STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(NPBool)))\n\t\t| STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(void*)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))\n};\n#define NewNPN_PostURLNotifyProc(FUNC)\t\t\\\n\t\t(NPN_PostURLNotifyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_PostURLNotifyProcInfo, GetCurrentArchitecture())\n#define CallNPN_PostURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \\\n\t\t(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_PostURLNotifyProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7))\n#else\n\ntypedef NPError (* NP_LOADDS NPN_PostURLNotifyUPP)(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file, void* notifyData);\n#define NewNPN_PostURLNotifyProc(FUNC)\t\t\\\n\t\t((NPN_PostURLNotifyUPP) (FUNC))\n#define CallNPN_PostURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \\\n\t\t(*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7))\n#endif\n\n\n/* NPN_GetUrl */\n\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPN_GetURLUPP;\nenum {\n\tuppNPN_GetURLProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))\n};\n#define NewNPN_GetURLProc(FUNC)\t\t\\\n\t\t(NPN_GetURLUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetURLProcInfo, GetCurrentArchitecture())\n#define CallNPN_GetURLProc(FUNC, ARG1, ARG2, ARG3) \\\n\t\t(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetURLProcInfo, (ARG1), (ARG2), (ARG3))\n#else\n\ntypedef NPError\t(* NP_LOADDS NPN_GetURLUPP)(NPP instance, const char* url, const char* window);\n#define NewNPN_GetURLProc(FUNC)\t\t\\\n\t\t((NPN_GetURLUPP) (FUNC))\n#define CallNPN_GetURLProc(FUNC, ARG1, ARG2, ARG3)\t\t\\\n\t\t(*(FUNC))((ARG1), (ARG2), (ARG3))\n#endif\n\n\n/* NPN_PostUrl */\n\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPN_PostURLUPP;\nenum {\n\tuppNPN_PostURLProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*)))\n\t\t| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(uint32)))\n\t\t| STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(const char*)))\n\t\t| STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(NPBool)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))\n};\n#define NewNPN_PostURLProc(FUNC)\t\t\\\n\t\t(NPN_PostURLUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_PostURLProcInfo, GetCurrentArchitecture())\n#define CallNPN_PostURLProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \\\n\t\t(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_PostURLProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6))\n#else\n\ntypedef NPError (* NP_LOADDS NPN_PostURLUPP)(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file);\n#define NewNPN_PostURLProc(FUNC)\t\t\\\n\t\t((NPN_PostURLUPP) (FUNC))\n#define CallNPN_PostURLProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \\\n\t\t(*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6))\n#endif\n\n\n/* NPN_RequestRead */\n\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPN_RequestReadUPP;\nenum {\n\tuppNPN_RequestReadProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPStream *)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPByteRange *)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))\n};\n#define NewNPN_RequestReadProc(FUNC)\t\t\\\n\t\t(NPN_RequestReadUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_RequestReadProcInfo, GetCurrentArchitecture())\n#define CallNPN_RequestReadProc(FUNC,  stream, range)\t\t\\\n\t\t(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_RequestReadProcInfo, (stream), (range))\n\n#else\n\ntypedef NPError\t(* NP_LOADDS NPN_RequestReadUPP)(NPStream* stream, NPByteRange* rangeList);\n#define NewNPN_RequestReadProc(FUNC)\t\t\\\n\t\t((NPN_RequestReadUPP) (FUNC))\n#define CallNPN_RequestReadProc(FUNC, stream, range)\t\t\\\n\t\t(*(FUNC))((stream), (range))\n\n#endif\n\n\n/* NPN_NewStream */\n\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPN_NewStreamUPP;\nenum {\n\tuppNPN_NewStreamProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPMIMEType)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char *)))\n\t\t| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(NPStream **)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))\n};\n#define NewNPN_NewStreamProc(FUNC)\t\t\\\n\t\t(NPN_NewStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_NewStreamProcInfo, GetCurrentArchitecture())\n#define CallNPN_NewStreamProc(FUNC, npp, type, window, stream)\t\t\\\n\t\t(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_NewStreamProcInfo, (npp), (type), (window), (stream))\t\n\n#else\n\ntypedef NPError\t(* NP_LOADDS NPN_NewStreamUPP)(NPP instance, NPMIMEType type, const char* window, NPStream** stream);\n#define NewNPN_NewStreamProc(FUNC)\t\t\\\n\t\t((NPN_NewStreamUPP) (FUNC))\n#define CallNPN_NewStreamProc(FUNC, npp, type, window, stream)\t\t\\\n\t\t(*(FUNC))((npp), (type), (window), (stream))\n\n#endif\n\n\n/* NPN_Write */\n\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPN_WriteUPP;\nenum {\n\tuppNPN_WriteProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(int32)))\n\t\t| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void*)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(int32)))\n};\n#define NewNPN_WriteProc(FUNC)\t\t\\\n\t\t(NPN_WriteUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_WriteProcInfo, GetCurrentArchitecture())\n#define CallNPN_WriteProc(FUNC, npp, stream, len, buffer)\t\t\\\n\t\t(int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_WriteProcInfo, (npp), (stream), (len), (buffer))\t\n\n#else\n\ntypedef int32 (* NP_LOADDS NPN_WriteUPP)(NPP instance, NPStream* stream, int32 len, void* buffer);\n#define NewNPN_WriteProc(FUNC)\t\t\\\n\t\t((NPN_WriteUPP) (FUNC))\n#define CallNPN_WriteProc(FUNC, npp, stream, len, buffer)\t\t\\\n\t\t(*(FUNC))((npp), (stream), (len), (buffer))\n\n#endif\n\n\n/* NPN_DestroyStream */\n\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPN_DestroyStreamUPP;\nenum {\n\tuppNPN_DestroyStreamProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP )))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPReason)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))\n};\n#define NewNPN_DestroyStreamProc(FUNC)\t\t\\\n\t\t(NPN_DestroyStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_DestroyStreamProcInfo, GetCurrentArchitecture())\n#define CallNPN_DestroyStreamProc(FUNC, npp, stream, reason)\t\t\\\n\t\t(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_DestroyStreamProcInfo, (npp), (stream), (reason))\t\n\n#else\n\ntypedef NPError (* NP_LOADDS NPN_DestroyStreamUPP)(NPP instance, NPStream* stream, NPReason reason);\n#define NewNPN_DestroyStreamProc(FUNC)\t\t\\\n\t\t((NPN_DestroyStreamUPP) (FUNC))\n#define CallNPN_DestroyStreamProc(FUNC, npp, stream, reason)\t\t\\\n\t\t(*(FUNC))((npp), (stream), (reason))\n\n#endif\n\n\n/* NPN_Status */\n\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPN_StatusUPP;\nenum {\n\tuppNPN_StatusProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(char *)))\n};\n\n#define NewNPN_StatusProc(FUNC)\t\t\\\n\t\t(NPN_StatusUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_StatusProcInfo, GetCurrentArchitecture())\n#define CallNPN_StatusProc(FUNC, npp, msg)\t\t\\\n\t\t(void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_StatusProcInfo, (npp), (msg))\t\n\n#else\n\ntypedef void (* NP_LOADDS NPN_StatusUPP)(NPP instance, const char* message);\n#define NewNPN_StatusProc(FUNC)\t\t\\\n\t\t((NPN_StatusUPP) (FUNC))\n#define CallNPN_StatusProc(FUNC, npp, msg)\t\t\\\n\t\t(*(FUNC))((npp), (msg))\t\n\n#endif\n\n\n/* NPN_UserAgent */\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPN_UserAgentUPP;\nenum {\n        uppNPN_UserAgentProcInfo = kThinkCStackBased\n                | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n                | RESULT_SIZE(SIZE_CODE(sizeof(const char *)))\n};\n\n#define NewNPN_UserAgentProc(FUNC)              \\\n                (NPN_UserAgentUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_UserAgentProcInfo, GetCurrentArchitecture())\n#define CallNPN_UserAgentProc(FUNC, ARG1)               \\\n                (const char*)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_UserAgentProcInfo, (ARG1))\n\n#else\n\ntypedef const char*\t(* NP_LOADDS NPN_UserAgentUPP)(NPP instance);\n#define NewNPN_UserAgentProc(FUNC)              \\\n                ((NPN_UserAgentUPP) (FUNC))\n#define CallNPN_UserAgentProc(FUNC, ARG1)               \\\n                (*(FUNC))((ARG1))\n\n#endif\n\n\n/* NPN_MemAlloc */\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPN_MemAllocUPP;\nenum {\n\tuppNPN_MemAllocProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(uint32)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(void *)))\n};\n\n#define NewNPN_MemAllocProc(FUNC)\t\t\\\n\t\t(NPN_MemAllocUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemAllocProcInfo, GetCurrentArchitecture())\n#define CallNPN_MemAllocProc(FUNC, ARG1)\t\t\\\n\t\t(void*)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemAllocProcInfo, (ARG1))\t\n\n#else\n\ntypedef void* (* NP_LOADDS NPN_MemAllocUPP)(uint32 size);\n#define NewNPN_MemAllocProc(FUNC)\t\t\\\n\t\t((NPN_MemAllocUPP) (FUNC))\n#define CallNPN_MemAllocProc(FUNC, ARG1)\t\t\\\n\t\t(*(FUNC))((ARG1))\t\n\n#endif\n\n\n/* NPN__MemFree */\n\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPN_MemFreeUPP;\nenum {\n\tuppNPN_MemFreeProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(void *)))\n};\n\n#define NewNPN_MemFreeProc(FUNC)\t\t\\\n\t\t(NPN_MemFreeUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemFreeProcInfo, GetCurrentArchitecture())\n#define CallNPN_MemFreeProc(FUNC, ARG1)\t\t\\\n\t\t(void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemFreeProcInfo, (ARG1))\n\n#else\n\ntypedef void (* NP_LOADDS NPN_MemFreeUPP)(void* ptr);\n#define NewNPN_MemFreeProc(FUNC)\t\t\\\n\t\t((NPN_MemFreeUPP) (FUNC))\n#define CallNPN_MemFreeProc(FUNC, ARG1)\t\t\\\n\t\t(*(FUNC))((ARG1))\t\n\n#endif\n\n\n/* NPN_MemFlush */\n\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPN_MemFlushUPP;\nenum {\n\tuppNPN_MemFlushProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(uint32)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(uint32)))\n};\n\n#define NewNPN_MemFlushProc(FUNC)\t\t\\\n\t\t(NPN_MemFlushUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemFlushProcInfo, GetCurrentArchitecture())\n#define CallNPN_MemFlushProc(FUNC, ARG1)\t\t\\\n\t\t(uint32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemFlushProcInfo, (ARG1))\t\n\n#else\n\ntypedef uint32 (* NP_LOADDS NPN_MemFlushUPP)(uint32 size);\n#define NewNPN_MemFlushProc(FUNC)\t\t\\\n\t\t((NPN_MemFlushUPP) (FUNC))\n#define CallNPN_MemFlushProc(FUNC, ARG1)\t\t\\\n\t\t(*(FUNC))((ARG1))\t\n\n#endif\n\n\n\n/* NPN_ReloadPlugins */\n\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPN_ReloadPluginsUPP;\nenum {\n\tuppNPN_ReloadPluginsProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPBool)))\n\t\t| RESULT_SIZE(SIZE_CODE(0))\n};\n\n#define NewNPN_ReloadPluginsProc(FUNC)\t\t\\\n\t\t(NPN_ReloadPluginsUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_ReloadPluginsProcInfo, GetCurrentArchitecture())\n#define CallNPN_ReloadPluginsProc(FUNC, ARG1)\t\t\\\n\t\t(void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_ReloadPluginsProcInfo, (ARG1))\t\n\n#else\n\ntypedef void (* NP_LOADDS NPN_ReloadPluginsUPP)(NPBool reloadPages);\n#define NewNPN_ReloadPluginsProc(FUNC)\t\t\\\n\t\t((NPN_ReloadPluginsUPP) (FUNC))\n#define CallNPN_ReloadPluginsProc(FUNC, ARG1)\t\t\\\n\t\t(*(FUNC))((ARG1))\t\n\n#endif\n\n\n/* NPN_GetJavaEnv */\n\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPN_GetJavaEnvUPP;\nenum {\n\tuppNPN_GetJavaEnvProcInfo = kThinkCStackBased\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(JRIEnv*)))\n};\n\n#define NewNPN_GetJavaEnvProc(FUNC)\t\t\\\n\t\t(NPN_GetJavaEnvUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetJavaEnvProcInfo, GetCurrentArchitecture())\n#define CallNPN_GetJavaEnvProc(FUNC)\t\t\\\n\t\t(JRIEnv*)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetJavaEnvProcInfo)\t\n\n#else\ntypedef JRIEnv* (* NP_LOADDS NPN_GetJavaEnvUPP)(void);\n#define NewNPN_GetJavaEnvProc(FUNC)\t\t\\\n\t\t((NPN_GetJavaEnvUPP) (FUNC))\n#define CallNPN_GetJavaEnvProc(FUNC)\t\t\\\n\t\t(*(FUNC))()\t\n\n#endif\n\n\n/* NPN_GetJavaPeer */\n\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPN_GetJavaPeerUPP;\nenum {\n\tuppNPN_GetJavaPeerProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(jref)))\n};\n\n#define NewNPN_GetJavaPeerProc(FUNC)\t\t\\\n\t\t(NPN_GetJavaPeerUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetJavaPeerProcInfo, GetCurrentArchitecture())\n#define CallNPN_GetJavaPeerProc(FUNC, ARG1)\t\t\\\n\t\t(jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetJavaPeerProcInfo, (ARG1))\t\n\n#else\n\ntypedef jref (* NP_LOADDS NPN_GetJavaPeerUPP)(NPP instance);\n#define NewNPN_GetJavaPeerProc(FUNC)\t\t\\\n\t\t((NPN_GetJavaPeerUPP) (FUNC))\n#define CallNPN_GetJavaPeerProc(FUNC, ARG1)\t\t\\\n\t\t(*(FUNC))((ARG1))\t\n\n#endif\n\n\n/* NPN_InvalidateRect */\n\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPN_InvalidateRectUPP;\nenum {\n\tuppNPN_InvalidateRectProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPRect *)))\n\t\t| RESULT_SIZE(SIZE_CODE(0))\n};\n\n#define NewNPN_InvalidateRectProc(FUNC)\t\t\\\n\t\t(NPN_InvalidateRectUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_InvalidateRectProcInfo, GetCurrentArchitecture())\n#define CallNPN_InvalidateRectProc(FUNC, ARG1, ARG2)\t\t\\\n\t\t(void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_InvalidateRectProcInfo, (ARG1), (ARG2))\t\n\n#else\n\ntypedef void (* NP_LOADDS NPN_InvalidateRectUPP)(NPP instance, NPRect *rect);\n#define NewNPN_InvalidateRectProc(FUNC)\t\t\\\n\t\t((NPN_InvalidateRectUPP) (FUNC))\n#define CallNPN_InvalidateRectProc(FUNC, ARG1, ARG2)\t\t\\\n\t\t(*(FUNC))((ARG1), (ARG2))\t\n\n#endif\n\n\n/* NPN_InvalidateRegion */\n\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPN_InvalidateRegionUPP;\nenum {\n\tuppNPN_InvalidateRegionProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPRegion)))\n\t\t| RESULT_SIZE(SIZE_CODE(0))\n};\n\n#define NewNPN_InvalidateRegionProc(FUNC)\t\t\\\n\t\t(NPN_InvalidateRegionUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_InvalidateRegionProcInfo, GetCurrentArchitecture())\n#define CallNPN_InvalidateRegionProc(FUNC, ARG1, ARG2)\t\t\\\n\t\t(void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_InvalidateRegionProcInfo, (ARG1), (ARG2))\t\n\n#else\n\ntypedef void (* NP_LOADDS NPN_InvalidateRegionUPP)(NPP instance, NPRegion region);\n#define NewNPN_InvalidateRegionProc(FUNC)\t\t\\\n\t\t((NPN_InvalidateRegionUPP) (FUNC))\n#define CallNPN_InvalidateRegionProc(FUNC, ARG1, ARG2)\t\t\\\n\t\t(*(FUNC))((ARG1), (ARG2))\t\n\n#endif\n\n/* NPN_ForceRedraw */\n\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPN_ForceRedrawUPP;\nenum {\n\tuppNPN_ForceRedrawProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(0)))\n};\n\n#define NewNPN_ForceRedrawProc(FUNC)\t\t\\\n\t\t(NPN_ForceRedrawUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_ForceRedrawProcInfo, GetCurrentArchitecture())\n#define CallNPN_ForceRedrawProc(FUNC, ARG1)\t\t\\\n\t\t(jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_ForceRedrawProcInfo, (ARG1))\t\n\n#else\n\ntypedef void (* NP_LOADDS NPN_ForceRedrawUPP)(NPP instance);\n#define NewNPN_ForceRedrawProc(FUNC)\t\t\\\n\t\t((NPN_ForceRedrawUPP) (FUNC))\n#define CallNPN_ForceRedrawProc(FUNC, ARG1)\t\t\\\n\t\t(*(FUNC))((ARG1))\t\n\n#endif\n\n\n/******************************************************************************************\n * The actual plugin function table definitions\n *******************************************************************************************/\n\n#ifdef XP_MAC\n#if PRAGMA_STRUCT_ALIGN\n#pragma options align=mac68k\n#endif\n#endif\n\ntypedef struct _NPPluginFuncs {\n    uint16 size;\n    uint16 version;\n    NPP_NewUPP newp;\n    NPP_DestroyUPP destroy;\n    NPP_SetWindowUPP setwindow;\n    NPP_NewStreamUPP newstream;\n    NPP_DestroyStreamUPP destroystream;\n    NPP_StreamAsFileUPP asfile;\n    NPP_WriteReadyUPP writeready;\n    NPP_WriteUPP write;\n    NPP_PrintUPP print;\n    NPP_HandleEventUPP event;\n    NPP_URLNotifyUPP urlnotify;\n    JRIGlobalRef javaClass;\n    NPP_GetValueUPP getvalue;\n    NPP_SetValueUPP setvalue;\n} NPPluginFuncs;\n\ntypedef struct _NPNetscapeFuncs {\n    uint16 size;\n    uint16 version;\n    NPN_GetURLUPP geturl;\n    NPN_PostURLUPP posturl;\n    NPN_RequestReadUPP requestread;\n    NPN_NewStreamUPP newstream;\n    NPN_WriteUPP write;\n    NPN_DestroyStreamUPP destroystream;\n    NPN_StatusUPP status;\n    NPN_UserAgentUPP uagent;\n    NPN_MemAllocUPP memalloc;\n    NPN_MemFreeUPP memfree;\n    NPN_MemFlushUPP memflush;\n    NPN_ReloadPluginsUPP reloadplugins;\n    NPN_GetJavaEnvUPP getJavaEnv;\n    NPN_GetJavaPeerUPP getJavaPeer;\n    NPN_GetURLNotifyUPP geturlnotify;\n    NPN_PostURLNotifyUPP posturlnotify;\n    NPN_GetValueUPP getvalue;\n    NPN_SetValueUPP setvalue;\n    NPN_InvalidateRectUPP invalidaterect;\n    NPN_InvalidateRegionUPP invalidateregion;\n    NPN_ForceRedrawUPP forceredraw;\n} NPNetscapeFuncs;\n\n#ifdef XP_MAC\n#if PRAGMA_STRUCT_ALIGN\n#pragma options align=reset\n#endif\n#endif\n\n\n#ifdef XP_MAC\n/******************************************************************************************\n * Mac platform-specific plugin glue stuff\n *******************************************************************************************/\n\n/*\n * Main entry point of the plugin.\n * This routine will be called when the plugin is loaded. The function\n * tables are passed in and the plugin fills in the NPPluginFuncs table\n * and NPPShutdownUPP for Netscape's use.\n */\n\n#if _NPUPP_USE_UPP_\n\ntypedef UniversalProcPtr NPP_MainEntryUPP;\nenum {\n\tuppNPP_MainEntryProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPNetscapeFuncs*)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPluginFuncs*)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPP_ShutdownUPP*)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))\n};\n#define NewNPP_MainEntryProc(FUNC)\t\t\\\n\t\t(NPP_MainEntryUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_MainEntryProcInfo, GetCurrentArchitecture())\n#define CallNPP_MainEntryProc(FUNC,  netscapeFunc, pluginFunc, shutdownUPP)\t\t\\\n\t\tCallUniversalProc((UniversalProcPtr)(FUNC), (ProcInfoType)uppNPP_MainEntryProcInfo, (netscapeFunc), (pluginFunc), (shutdownUPP))\n\n#else\n\ntypedef NPError (* NP_LOADDS NPP_MainEntryUPP)(NPNetscapeFuncs*, NPPluginFuncs*, NPP_ShutdownUPP*);\n#define NewNPP_MainEntryProc(FUNC)\t\t\\\n\t\t((NPP_MainEntryUPP) (FUNC))\n#define CallNPP_MainEntryProc(FUNC,  netscapeFunc, pluginFunc, shutdownUPP)\t\t\\\n\t\t(*(FUNC))((netscapeFunc), (pluginFunc), (shutdownUPP))\n\n#endif\n#endif /* MAC */\n\n#if defined(_WINDOWS)\n#define OSCALL WINAPI\n#else\n#if defined(__OS2__)\n#define OSCALL _System\n#else\n#define OSCALL\n#endif\n#endif\n\n#if defined( _WINDOWS ) || defined (__OS2__)\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* plugin meta member functions */\n#if defined(__OS2__)\n\ntypedef struct _NPPluginData {   /* Alternate OS2 Plugin interface */\n    char *pMimeTypes;\n    char *pFileExtents;\n    char *pFileOpenTemplate;\n    char *pProductName;\n    char *pProductDescription;\n    unsigned long dwProductVersionMS;\n    unsigned long dwProductVersionLS;\n} NPPluginData;\n\nNPError OSCALL NP_GetPluginData(NPPluginData * pPluginData);\n\n#endif\n\nNPError OSCALL NP_GetEntryPoints(NPPluginFuncs* pFuncs);\n\nNPError OSCALL NP_Initialize(NPNetscapeFuncs* pFuncs);\n\nNPError OSCALL NP_Shutdown();\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* _WINDOWS || __OS2__ */\n\n#if defined(__OS2__)\n#pragma pack()\n#endif\n\n#ifdef XP_UNIX\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* plugin meta member functions */\n\nchar*\tNP_GetMIMEDescription(void);\nNPError\tNP_Initialize(NPNetscapeFuncs*, NPPluginFuncs*);\nNPError\tNP_Shutdown(void);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* XP_UNIX */\n\n#endif /* _NPUPP_H_ */\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/config.h",
    "content": "/* config.h.  Generated by configure.  */\n/* config.h.in -- template for config.h\t\t\t-*- C -*-\n *\n *   Copyright (C) 1996-2005 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *\n *   This file is part of Unix Squeak.\n *\n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n *\n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n *\n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n */\n\n/* Author: Ian.Piumarta@squeakland.org\n *\n * Last edited: 2005-03-28 22:47:17 by piumarta on emilia.local\n */\n\n#ifndef __sq_config_h\n#define __sq_config_h\n\n/* explicit image width */\n\n#define\tHAVE_INTERP_H 1\n\n/* package options */\n\n#define\tUSE_X11 1\n/* #undef\tUSE_X11_GLX */\n#define\tUSE_QUARTZ 1\n#define\tUSE_QUARTZ_CGL 1\n/* #undef\tUSE_RFB */\n\n/* libraries */\n\n/* #undef\tHAVE_LIBX11 */\n#define\tHAVE_LIBXEXT 1\n/* #undef\tHAVE_LIBDL */\n#define\tHAVE_DYLD 1\n/* #undef\tHAVE_LIBFFI */\n/* #undef\tHAVE_ICONV */\n\n/* #undef\tUSE_AUDIO_NONE */\n/* #undef\tUSE_AUDIO_SUN */\n/* #undef\tUSE_AUDIO_NAS */\n/* #undef\tUSE_AUDIO_OSS */\n/* #undef\tUSE_AUDIO_MACOSX */\n/* #undef\tOSS_DEVICE */\n\n/* header files */\n\n#define\tHAVE_UNISTD_H 1\n/* #undef\tNEED_GETHOSTNAME_P */\n\n#define\tHAVE_DIRENT_H 1\n/* #undef\tHAVE_SYS_NDIR_H */\n/* #undef\tHAVE_SYS_DIR_H */\n/* #undef\tHAVE_NDIR_H */\n\n#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_3\n#undef\tHAVE_DLFCN_H \n#else\n#define\tHAVE_DLFCN_H 1\n#endif\n\n#define\tHAVE_ICONV_H 1\n\n#define\tHAVE_SYS_TIME_H 1\n#define\tTIME_WITH_SYS_TIME 1\n\n#define\tHAVE_SYS_FILIO_H 1\n\n/* #undef\tHAVE_SYS_AUDIOIO_H */\n/* #undef\tHAVE_SUN_AUDIOIO_H */\n\n/* #undef\tHAVE_PTY_H */\n#define\tHAVE_UTIL_H 1\n/* #undef\tHAVE_LIBUTIL_H */\n/* #undef\tHAVE_STROPTS_H */\n\n/* #undef\tHAVE_GL_GL_H */\n#define\tHAVE_OPENGL_GL_H 1\n\n/* #undef\tNEED_SUNOS_H */\n\n/* system calls/library functions */\n\n#define\tAT_EXIT atexit\n\n#define\tHAVE_TZSET 1\n\n#define\tHAVE_OPENPTY 1\n/* #undef\tHAVE_UNIX98_PTYS */\n\n#define\tHAVE_SNPRINTF 1\n/* #undef\tHAVE___SNPRINTF */\n\n#define\tHAVE_MMAP 1\n\n#define\tHAVE_DYLD 1\n\n#define\tHAVE_LANGINFO_CODESET 1\n\n#define\tHAVE_ALLOCA 1\n#define\tHAVE_ALLOCA_H 1\n\n#define\tHAVE_UNSETENV 1\n\n/* widths of primitive types */\n\n#define\tSIZEOF_INT 4\n#define\tSIZEOF_LONG 4\n#define\tSIZEOF_LONG_LONG 8\n#define\tSIZEOF_VOID_P 4\n\n/* structures */\n\n#define\tHAVE_TM_GMTOFF 1\n#define\tHAVE_TIMEZONE 1\n\n/* typedefs */\n\n/* #undef\tsize_t */\n\n#define\tsqueakInt64 long long\n\n/* architecture */\n\n#define\tOS_TYPE \"unix\"\n\n/* #undef\tVM_HOST_VENDOR */\n#define\tVM_HOST_OS \"darwin8.5.0\"\n\n#if defined(__BIG_ENDIAN__)\n#define\tWORDS_BIGENDIAN 1\n#define VMENDIANNESS 1\n#define\tVM_HOST \"powerpc-apple-darwin8.5.0\"\n#define\tVM_HOST_CPU \"powerpc\"\n#else\n#undef\tWORDS_BIGENDIAN \n#define VMENDIANNESS 0\n#define\tVM_HOST \"intel-apple-darwin8.5.0\"\n#define\tVM_HOST_CPU \"intel\"\n#define LSB_FIRST 1\n#endif\n\n#define HAVE_LIBDL 1\n/* #undef\tDOUBLE_WORD_ALIGNMENT */\n\n/* damage containment */\n\n#define\tDARWIN 1\n\n#ifdef NEED_SUNOS_H\n# include \"sunos.h\"\n#endif\n\n/* other configured variables */\n\n#define SQ_VERSION \"3.8g-6548\"\n#define VM_VERSION \"4.0\"\n#define VM_LIBDIR \"/usr/local/lib/squeak/3.8a-2\"\n#define VM_MODULE_PREFIX \"\"\n/* #undef VM_DLSYM_PREFIX */\n#define VM_X11DIR \"/usr/X11R6/lib\"\n\n/* avoid dependencies on glibc2.3 */\n\n/* #undef HAVE_FEATURES_H */\n\n#if defined(HAVE_FEATURES_H)\n# include \"glibc.h\"\n#endif\n\n#endif /* __sq_config_h */\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/malloc.h",
    "content": "/*\n * Dummy malloc.h for Mac OS X.\n */\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/npsqueak/English.lproj/Localized.r",
    "content": "#include <CoreServices/CoreServices.r>\n\nresource 'STR#' (126) { {\n    \"Squeak Plugin v3.8.15b13\",\n    \"Squeak Plug-In\"\n} };\n\nresource 'STR#' (127) { {\n    \"Squeak Source Files\",\n    \"Squeak Project Files\",\n    \"Squeak Object Files\"\n}};\n\nresource 'STR#' (128) { {\n    \"application/x-squeak-source\",\n    \"sts\",\n    \"application/x-squeak-project\",\n    \"pr\",\n    \"application/x-squeak-object\",\n    \"sqo\"\n} };\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/npsqueak/SqueakBrowser-Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>SqueakBrowserPlugin</string>\n\t<key>CFBundleGetInfoString</key>\n\t<string>Squeak Browser Plugin  3.8.15b13 http://www.squeak.org </string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.SqueakPlugin</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BRPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>3.8.15b13</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>1.0</string>\n\t<key>CFPlugInDynamicRegisterFunction</key>\n\t<string></string>\n\t<key>CFPlugInDynamicRegistration</key>\n\t<string>NO</string>\n\t<key>CFPlugInFactories</key>\n\t<dict>\n\t\t<key>00000000-0000-0000-0000-000000000000</key>\n\t\t<string>MyFactoryFunction</string>\n\t</dict>\n\t<key>CFPlugInTypes</key>\n\t<dict>\n\t\t<key>00000000-0000-0000-0000-000000000000</key>\n\t\t<array>\n\t\t\t<string>00000000-0000-0000-0000-000000000000</string>\n\t\t</array>\n\t</dict>\n\t<key>CFPlugInUnloadFunction</key>\n\t<string></string>\n\t<key>SqueakDebug</key>\n\t<integer>0</integer>\n\t<key>SqueakImageName</key>\n\t<string>SqueakPlugin.image</string>\n\t<key>SqueakImagePath</key>\n\t<string>/Applications/SqueakLand/Squeak/Internet/</string>\n\t<key>SqueakVMName</key>\n\t<string>Squeak VM Opt</string>\n\t<key>SqueakVMPath</key>\n\t<string>/Applications/SqueakLand/Squeak/Internet/Squeak.app/Contents/MacOS/</string>\n\t<key>SqueakWindowMaxLength</key>\n\t<integer>2048</integer>\n\t<key>WebPluginDescription</key>\n\t<string>Squeak Browser Plugin  3.8.15b13 http://www.squeak.org </string>\n\t<key>WebPluginMIMETypes</key>\n\t<dict>\n\t\t<key>application/x-squeak-object</key>\n\t\t<dict>\n\t\t\t<key>WebPluginExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>sqo</string>\n\t\t\t</array>\n\t\t\t<key>WebPluginTypeDescription</key>\n\t\t\t<string>Squeak Object Files</string>\n\t\t</dict>\n\t\t<key>application/x-squeak-project</key>\n\t\t<dict>\n\t\t\t<key>WebPluginExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>pr</string>\n\t\t\t</array>\n\t\t\t<key>WebPluginTypeDescription</key>\n\t\t\t<string>Squeak Project Files</string>\n\t\t</dict>\n\t\t<key>application/x-squeak-source</key>\n\t\t<dict>\n\t\t\t<key>WebPluginExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>sts</string>\n\t\t\t</array>\n\t\t\t<key>WebPluginTypeDescription</key>\n\t\t\t<string>Squeak Source Files</string>\n\t\t</dict>\n\t</dict>\n\t<key>WebPluginName</key>\n\t<string>Squeak Plug-in</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/npsqueak/SqueakBrowser_Prefix.pch",
    "content": "//\n// Prefix header for all source files of the 'SqueakBrowser' target in the 'SqueakBrowser' project.\n//\n\n#include <Carbon/Carbon.h>\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/npsqueak/main.c",
    "content": "/*\n IMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc. (\"Apple\") in\n consideration of your agreement to the following terms, and your use, installation, \n modification or redistribution of this Apple software constitutes acceptance of these \n terms.  If you do not agree with these terms, please do not use, install, modify or \n redistribute this Apple software.\n \n In consideration of your agreement to abide by the following terms, and subject to these \n terms, Apple grants you a personal, non-exclusive license, under Apples copyrights in \n this original Apple software (the \"Apple Software\"), to use, reproduce, modify and \n redistribute the Apple Software, with or without modifications, in source and/or binary \n forms; provided that if you redistribute the Apple Software in its entirety and without \n modifications, you must retain this notice and the following text and disclaimers in all \n such redistributions of the Apple Software.  Neither the name, trademarks, service marks \n or logos of Apple Computer, Inc. may be used to endorse or promote products derived from \n the Apple Software without specific prior written permission from Apple. Except as expressly\n stated in this notice, no other rights or licenses, express or implied, are granted by Apple\n herein, including but not limited to any patent rights that may be infringed by your \n derivative works or by other works in which the Apple Software may be incorporated.\n \n The Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE MAKES NO WARRANTIES, \n EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, \n MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS \n USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.\n \n IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL \n DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS \n          OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, \n REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND \n WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR \n OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n//#import \"PluginObject.h\"\n#import <WebKit/npapi.h>\n#import <WebKit/npfunctions.h>\n#import <WebKit/npruntime.h>\n\nNPNetscapeFuncs* browser;\n\nNPError\t\tNPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved);\nNPError\t\tNPP_Destroy(NPP instance, NPSavedData** save);\nNPError\t\tNPP_SetWindow(NPP instance, NPWindow* window);\nNPError\t\tNPP_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype);\nNPError\t\tNPP_DestroyStream(NPP instance, NPStream* stream, NPReason reason);\nint32\t\tNPP_WriteReady(NPP instance, NPStream* stream);\nint32\t\tNPP_Write(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer);\nvoid\t\tNPP_StreamAsFile(NPP instance, NPStream* stream, const char* fname);\nvoid\t\tNPP_Print(NPP instance, NPPrint* platformPrint);\nint16\t\tNPP_HandleEvent(NPP instance, void* event);\nvoid\t\tNPP_URLNotify(NPP instance, const char* URL, NPReason reason, void* notifyData);\nNPError\t\tNPP_GetValue(NPP instance, NPPVariable variable, void *value);\nNPError\t\tNPP_SetValue(NPP instance, NPNVariable variable, void *value);\n\n#pragma export on\n// Mach-o entry points\nNPError NP_Initialize(NPNetscapeFuncs *browserFuncs);\nNPError NP_GetEntryPoints(NPPluginFuncs *pluginFuncs);\nextern void NP_Shutdown(void);\n// For compatibility with CFM browsers.\nint main(NPNetscapeFuncs *browserFuncs, NPPluginFuncs *pluginFuncs, NPP_ShutdownProcPtr *shutdown);\n#pragma export off\n\n\ntypedef void (* FunctionPointer) (void);\ntypedef void (* TransitionVector) (void);\nstatic FunctionPointer functionPointerForTVector(TransitionVector);\nstatic TransitionVector tVectorForFunctionPointer(FunctionPointer);\n\n// Mach-o entry points\nNPError NP_Initialize(NPNetscapeFuncs* browserFuncs)\n{\n    browser = browserFuncs;\n    return NPERR_NO_ERROR;\n}\n\nNPError NP_GetEntryPoints(NPPluginFuncs* pluginFuncs)\n{\n    pluginFuncs->version = 11;\n    pluginFuncs->size = sizeof(pluginFuncs);\n    pluginFuncs->newp = NPP_New;\n    pluginFuncs->destroy = NPP_Destroy;\n    pluginFuncs->setwindow = NPP_SetWindow;\n    pluginFuncs->newstream = NPP_NewStream;\n    pluginFuncs->destroystream = NPP_DestroyStream;\n    pluginFuncs->asfile = NPP_StreamAsFile;\n    pluginFuncs->writeready = NPP_WriteReady;\n    pluginFuncs->write = (NPP_WriteProcPtr)NPP_Write;\n    pluginFuncs->print = NPP_Print;\n    pluginFuncs->event = NPP_HandleEvent;\n    pluginFuncs->urlnotify = NPP_URLNotify;\n    pluginFuncs->getvalue = NPP_GetValue;\n    pluginFuncs->setvalue = NPP_SetValue;\n    \n    return NPERR_NO_ERROR;\n}\n\n// For compatibility with CFM browsers.\nint main(NPNetscapeFuncs *browserFuncs, NPPluginFuncs *pluginFuncs, NPP_ShutdownProcPtr *shutdown)\n{\n\n\n    browser = malloc(sizeof(NPNetscapeFuncs));\n    bzero(browser, sizeof(NPNetscapeFuncs));\n    \n    browser->size = browserFuncs->size;\n    browser->version = browserFuncs->version;\n    \n    // Since this is a mach-o plug-in and the browser is CFM because it is calling main, translate\n    // our function points into TVectors so the browser can call them.\n    browser->geturl = (NPN_GetURLProcPtr)functionPointerForTVector((TransitionVector)browserFuncs->geturl);\n    browser->posturl = (NPN_PostURLProcPtr)functionPointerForTVector((TransitionVector)browserFuncs->posturl);\n    browser->requestread = (NPN_RequestReadProcPtr)functionPointerForTVector((TransitionVector)browserFuncs->requestread);\n    browser->newstream = (NPN_NewStreamProcPtr)functionPointerForTVector((TransitionVector)browserFuncs->newstream);\n    browser->write = (NPN_WriteProcPtr)functionPointerForTVector((TransitionVector)browserFuncs->write);\n    browser->destroystream = (NPN_DestroyStreamProcPtr)functionPointerForTVector((TransitionVector)browserFuncs->destroystream);\n    browser->status = (NPN_StatusProcPtr)functionPointerForTVector((TransitionVector)browserFuncs->status);\n    browser->uagent = (NPN_UserAgentProcPtr)functionPointerForTVector((TransitionVector)browserFuncs->uagent);\n    browser->memalloc = (NPN_MemAllocProcPtr)functionPointerForTVector((TransitionVector)browserFuncs->memalloc);\n    browser->memfree = (NPN_MemFreeProcPtr)functionPointerForTVector((TransitionVector)browserFuncs->memfree);\n    browser->memflush = (NPN_MemFlushProcPtr)functionPointerForTVector((TransitionVector)browserFuncs->memflush);\n    browser->reloadplugins = (NPN_ReloadPluginsProcPtr)functionPointerForTVector((TransitionVector)browserFuncs->reloadplugins);\n    browser->geturlnotify = (NPN_GetURLNotifyProcPtr)functionPointerForTVector((TransitionVector)browserFuncs->geturlnotify);\n    browser->posturlnotify = (NPN_PostURLNotifyProcPtr)functionPointerForTVector((TransitionVector)browserFuncs->posturlnotify);\n    browser->getvalue = (NPN_GetValueProcPtr)functionPointerForTVector((TransitionVector)browserFuncs->getvalue);\n    browser->setvalue = (NPN_SetValueProcPtr)functionPointerForTVector((TransitionVector)browserFuncs->setvalue);\n    browser->invalidaterect = (NPN_InvalidateRectProcPtr)functionPointerForTVector((TransitionVector)browserFuncs->invalidaterect);\n    browser->invalidateregion = (NPN_InvalidateRegionProcPtr)functionPointerForTVector((TransitionVector)browserFuncs->invalidateregion);\n    browser->forceredraw = (NPN_ForceRedrawProcPtr)functionPointerForTVector((TransitionVector)browserFuncs->forceredraw);\n    browser->getJavaEnv = (NPN_GetJavaEnvProcPtr)functionPointerForTVector((TransitionVector)browserFuncs->getJavaEnv);\n    browser->getJavaPeer = (NPN_GetJavaPeerProcPtr)functionPointerForTVector((TransitionVector)browserFuncs->getJavaPeer);\n    \n    /*\n    // These functions are not yet supported in CFM browers like Netscape.\n    // In the future, the versions of the vectors should be checked before accessing symbols.\n    browser->releasevariantvalue = functionPointerForTVector((TransitionVector)browserFuncs->releasevariantvalue);\n    browser->getstringidentifier = functionPointerForTVector((TransitionVector)browserFuncs->getstringidentifier);\n    browser->getstringidentifiers = functionPointerForTVector((TransitionVector)browserFuncs->getstringidentifiers);\n    browser->getintidentifier = functionPointerForTVector((TransitionVector)browserFuncs->getintidentifier);\n    browser->identifierisstring = functionPointerForTVector((TransitionVector)browserFuncs->identifierisstring);\n    browser->utf8fromidentifier = functionPointerForTVector((TransitionVector)browserFuncs->utf8fromidentifier);\n    browser->createobject = functionPointerForTVector((TransitionVector)browserFuncs->createobject);\n    browser->retainobject = functionPointerForTVector((TransitionVector)browserFuncs->retainobject);\n    browser->releaseobject = functionPointerForTVector((TransitionVector)browserFuncs->releaseobject);\n    browser->call = functionPointerForTVector((TransitionVector)browserFuncs->call);\n    browser->evalute = functionPointerForTVector((TransitionVector)browserFuncs->evalute);\n    browser->getproperty = functionPointerForTVector((TransitionVector)browserFuncs->getproperty);\n    browser->setproperty = functionPointerForTVector((TransitionVector)browserFuncs->setproperty);\n    browser->removeproperty = functionPointerForTVector((TransitionVector)browserFuncs->removeproperty);\n    browser->setexception = functionPointerForTVector((TransitionVector)browserFuncs->setexception);\n    */\n    \n    pluginFuncs->version = 11;\n    pluginFuncs->size = sizeof(pluginFuncs);\n    pluginFuncs->newp = (NPP_NewProcPtr)tVectorForFunctionPointer((FunctionPointer)NPP_New);\n    pluginFuncs->destroy = (NPP_DestroyProcPtr)tVectorForFunctionPointer((FunctionPointer)NPP_Destroy);\n    pluginFuncs->setwindow = (NPP_SetWindowProcPtr)tVectorForFunctionPointer((FunctionPointer)NPP_SetWindow);\n    pluginFuncs->newstream = (NPP_NewStreamProcPtr)tVectorForFunctionPointer((FunctionPointer)NPP_NewStream);\n    pluginFuncs->destroystream = (NPP_DestroyStreamProcPtr)tVectorForFunctionPointer((FunctionPointer)NPP_DestroyStream);\n    pluginFuncs->asfile = (NPP_StreamAsFileProcPtr)tVectorForFunctionPointer((FunctionPointer)NPP_StreamAsFile);\n    pluginFuncs->writeready = (NPP_WriteReadyProcPtr)tVectorForFunctionPointer((FunctionPointer)NPP_WriteReady);\n    pluginFuncs->write = (NPP_WriteProcPtr)tVectorForFunctionPointer((FunctionPointer)NPP_Write);\n    pluginFuncs->print = (NPP_PrintProcPtr)tVectorForFunctionPointer((FunctionPointer)NPP_Print);\n    pluginFuncs->event = (NPP_HandleEventProcPtr)tVectorForFunctionPointer((FunctionPointer)NPP_HandleEvent);\n    pluginFuncs->urlnotify = (NPP_URLNotifyProcPtr)tVectorForFunctionPointer((FunctionPointer)NPP_URLNotify);\n    pluginFuncs->getvalue = (NPP_GetValueProcPtr)tVectorForFunctionPointer((FunctionPointer)NPP_GetValue);\n    pluginFuncs->setvalue = (NPP_SetValueProcPtr)tVectorForFunctionPointer((FunctionPointer)NPP_SetValue);\n    \n    *shutdown = (NPP_ShutdownProcPtr)tVectorForFunctionPointer((FunctionPointer)NP_Shutdown);\n    \n    return NPERR_NO_ERROR;\n}\n\n\n// function pointer converters\n// JMM notes universal notes via http://www.opendarwin.org/mailman/listinfo/webkit-dev\n\nstatic FunctionPointer functionPointerForTVector(TransitionVector tvp)\n{\n#ifdef __ppc__\n\nconst uint32 temp[6] = {0x3D800000, 0x618C0000, 0x800C0000, 0x804C0004, 0x7C0903A6, 0x4E800420};\n\n    uint32 *newGlue = NULL;\n\n    if (tvp != NULL) {\n        newGlue = (uint32 *)malloc(sizeof(temp));\n        if (newGlue != NULL) {\n            unsigned i;\n            for (i = 0; i < 6; i++) newGlue[i] = temp[i];\n            newGlue[0] |= ((UInt32)tvp >> 16);\n            newGlue[1] |= ((UInt32)tvp & 0xFFFF);\n            MakeDataExecutable(newGlue, sizeof(temp));\n        }\n    }\n\n    return (FunctionPointer)newGlue;\n#else\n    // Just use the function pointer on other architectures\n    return (FunctionPointer)tvp;\n#endif /* __ppc__ */\n}\n\nstatic TransitionVector tVectorForFunctionPointer(FunctionPointer fp)\n{\n#ifdef __ppc__\n    FunctionPointer *newGlue = NULL;\n    if (fp != NULL) {\n\nnewGlue = (FunctionPointer *)malloc(2 * sizeof (FunctionPointer));\n\n        if (newGlue != NULL) {\n            newGlue[0] = fp;\n            newGlue[1] = NULL;\n        }\n    }\n    return (TransitionVector)newGlue;\n#else\n    // Just use the function pointer on other architectures\n    return (TransitionVector)fp;\n#endif /* __ppc__ */\n}"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/npsqueak/npsqueak.c",
    "content": "/* -*- Mode: C; tab-width: 8; -*-\n *\n * Browser Plugin for Squeak on Unix platforms\n * \n * Author:  Bert Freudenberg\n *\n *\n * History:\n\t\t\tOct 2006 - Mods by johnmci@smalltalkconsulting.com to fit quartz carbon mac vm backend\n *          Jan 2005 - looking for image and npsqueakrun in system and home dir\n *                     kill squeak window when destroyed\n *          Apr 2004 - (ikp) handle imageName and failureUrl tags\n *          Oct 2002 - system-wide install\n *          Sep 2002 - create hard links for streamed files\n *          Mar 2002 - moved to ~/.npsqueak dir\n *          Nov 2000 - browserPipes interface replaces X events\n *          Apr 2000 - url requests through browser\n *          Nov 1999 - report attributes to vm\n *          Aug 99   - initial version \n \n\tMarch 10th, 2007 - JMM add feature to enable debug printing\n\tMarch 12th, 2007 - JMM remove aio logic, revert to simple pipe for I/O to avoid race\n\t\t\t\t\t -\t\tTry to make clipping and drawing work for both safari and firefox. \n  \n    */\n \n#define TARGET_CARBON   1\n#import <WebKit/npapi.h>\n#import <WebKit/npfunctions.h>\n#import <WebKit/npruntime.h>\n#include <stdio.h>\n#include <unistd.h>\n#include <limits.h>\n#include <signal.h>\n#include <string.h>\n#include <fcntl.h>\n#include <errno.h>\n#include <sys/stat.h>\n#include <sys/types.h>\n#include <sys/mman.h>\n#include <pthread.h>\n#include <Math.h>\n\n\nstatic int gDebugPrintIsOn=0;\n\nstatic void DPRINT(char *format, ...)\n{  \n\t if (!gDebugPrintIsOn) \n\t\treturn;\n\tva_list ap;\n\tva_start(ap, format);\n\tvfprintf(stderr, format, ap);\n\tva_end(ap);\n\n}\n\n/***********************************************************************\n * Plugin instance data\n ***********************************************************************/\n#define CMD_GET_URL        2\n#define CMD_POST_URL       3\n#define CMD_RECEIVE_DATA   4\n#define CMD_SHARED_MEMORY  5\n#define CMD_EVENT\t\t   7\n#define CMD_SET_CURSOR\t   8\n\n#define MAX_STREAMS 128\n\n#define SQUEAK_READ  0\n#define PLUGIN_WRITE 1\n#define PLUGIN_READ  2\n#define SQUEAK_WRITE 3\n\nextern NPNetscapeFuncs* browser;\n\ntypedef struct SqueakSharedMemoryBlock {\n\tint\t\twritten;\n\tint\t\ttop;\n\tint\t\tright;\n\tint\t\tbottom;\n\tint\t\tleft;\n\tchar\tscreenBits[];\n} SqueakSharedMemoryBlock;\n\n/* plugin state */\ntypedef struct SqueakPlugin {\n  NPP\t\tinstance;                    /* plugin instance */\n  pid_t\t\tpid;                       /* the child process pid */\n  NP_Port\t*display;\n  SqueakSharedMemoryBlock\t\t*sharedMemoryBlock;                 /* the Squeak window */\n  int\t\tsharedMemoryfd;\n  char\t\tsharedMemoryName[256];\n  CGColorSpaceRef colorspace;\n  int\t\twidth;\n  int\t\theight;\n  int\t\trowBytes;\n  NPRect    clipRect;    /* Clipping rectangle in port coordinates */\n  Rect\t\tportRect;\n  Boolean\tembedded;                   /* false if we have the whole window */\n  Boolean\tbuttonIsDown;\n  Boolean   hasCursor;\n  Boolean\tcustomCursor;\n  char\t\t**argv;                     /* the commandline for Squeak vm */\n  int\t\targc;\n  char\t\tvmName[PATH_MAX];\n  char\t\timageName[PATH_MAX];\n  int\t\tpipes[4];                    /* 4 ends of 2 pipes */\n  char*\t\tsrcUrl;                    /* set by browser in first NewStream */\n  char*\t\tsrcFilename;\n  int\t\tsrcId;                     /* if requested */\n//  pthread_mutex_t   SleepLock;\n//  pthread_cond_t    SleepLockCondition;\n  pthread_mutex_t\treadPipeMutex;      /* mutex just in case */ \n//  pthread_t\t\t\tSqueakPThread;\n  EventLoopTimerUPP\teventLoopTimerUPP;\t/* timer proc address */\n  EventLoopTimerRef  eventLoopTimerRef; /* timer event thread */\n  int\t\tthreadPleaseStop;\n  char*\t\tfailureUrl;\n  Cursor macCursor;\n} SqueakPlugin;\n\n/* URL notify data */\ntypedef struct SqueakStream {\n   int id;                          /* request id (-1 if finished)  */\n   char *fname;                     /* file name when streaming */\n   int fd;                          /* file descriptor when streaming */\n} SqueakStream;\n\nstatic int sharedMemIDIncremental=0;\nstatic int gWindowMaxLength;\n\n/***********************************************************************\n * Prototypes\n ***********************************************************************/\n\nstatic void DeliverFile(SqueakPlugin *, int id, const char* fname);\nstatic void SetWindow(SqueakPlugin*,  NPWindow *window, int width, int height);\nstatic void SetUpSqueakWindow(SqueakPlugin*);\nstatic void Run(SqueakPlugin*);\nstatic void GetUrl(SqueakPlugin*);\nstatic void PostUrl(SqueakPlugin*);\nstatic void browserProcessCommand(SqueakPlugin *plugin,int cmd);\nstatic void setWindowLogic(SqueakPlugin *plugin, int width, int height);\nstatic void\tgetCStringForInfoString(char *cString,char *infoString,int maxLength, CFStringBuiltInEncodings encoding);\nstatic CFTypeRef getRefForInfoString(char *infoString);\nstatic int\tgetNumberForInfoString(char *infoString);\nvoid drawToScreen(SqueakPlugin *plugin);\n\nstatic char* NPN_StrDup(const char* s)\n{\n  return strcpy(browser->memalloc(strlen(s) + 1), s);\n}\n/***********************************************************************\n * search filename in list of dirs and write path into result \n * returns 0 if filename not found  \n ***********************************************************************/ \n\nstatic char* findFileInPaths(char* result, char *filename, int dirn, char *dirv[PATH_MAX]){\n  int i;\n  char path[PATH_MAX];\n\n  for(i= 0; i < dirn; i++){\n    DPRINT(\"NP: search \\\"%s\\\" in \\\"%s\\\" \\n\",filename,dirv[i]);\n\n    strcpy(path, dirv[i]);\n    strcat(path, filename); \n    if (access(path, R_OK) == 0){ \n      DPRINT(\"NP:  \\\"%s\\\" in \\\"%s\\\" found\\n\",filename,dirv[i]);\n      return strcpy(result, path);\n    }\n  }\n  DPRINT(\"NP: nothing found\\n\");\n  return 0;\n}\n\nstatic CFTypeRef getRefForInfoString(char *infoString) {\n\tstatic CFBundleRef  myBundle = NULL;\n\tstatic CFDictionaryRef myDictionary = NULL;\n\tstatic CFStringRef\tbundleID = NULL;\n\tCFStringRef\tstringRef = NULL,infoStringKey;\t\n\t\n\tif (bundleID == NULL) {\n\t\tbundleID= CFStringCreateWithCString(NULL,\"org.squeak.SqueakPlugin\",kCFStringEncodingMacRoman);\n\t\tmyBundle = CFBundleGetBundleWithIdentifier(bundleID);\n\t\tif (myBundle == NULL) \n\t\t\treturn NULL;\n\t\tmyDictionary = CFBundleGetInfoDictionary(myBundle);\n\t}\n\tif (myDictionary == NULL) \n\t\treturn NULL ;\n\tinfoStringKey = CFStringCreateWithCString(NULL,infoString,kCFStringEncodingMacRoman);\n\tstringRef = CFDictionaryGetValue(myDictionary,infoStringKey);\n\tCFRelease(infoStringKey);\n\treturn stringRef;\n}\n\nstatic void\tgetCStringForInfoString(char *cString,char *infoString,int maxLength, CFStringBuiltInEncodings encoding) {\n\tCFStringRef\tstringRef = getRefForInfoString(infoString);\n\t\n\tif (stringRef) \n\t\t\tCFStringGetCString (stringRef, cString, maxLength, encoding);\n}\n\nstatic int\tgetNumberForInfoString(char *infoString) {\n\tCFNumberRef\tnumberRef = getRefForInfoString(infoString);\n\tlong number;\n    if (numberRef == NULL) \n\t\treturn 0;\n\tCFNumberGetValue(numberRef,kCFNumberLongType,(long *) &number);\n\treturn number;\n}\n\n/***********************************************************************\n * Plugin loading and termination\n ***********************************************************************/ \n\nNPError \nNPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc,\n\t\tchar* argn[], char* argv[], NPSavedData* saved)\n{\n  SqueakPlugin *plugin;\n\n  char imagename[PATH_MAX];\n  char *failureUrl= 0;\n\n  if (instance == NULL)\n    return NPERR_INVALID_INSTANCE_ERROR;\n  plugin= (SqueakPlugin*) browser->memalloc(sizeof(SqueakPlugin));\n  if (!plugin)\n    return NPERR_OUT_OF_MEMORY_ERROR;\n  plugin->argv= (char**) browser->memalloc(sizeof(char*) * (9 + 2 * argc));\n  if (!plugin->argv)\n    return NPERR_OUT_OF_MEMORY_ERROR;\n\n  /* Default settings */\n  getCStringForInfoString(imagename,\"SqueakImageName\",PATH_MAX, kCFStringEncodingUTF8);\n  gDebugPrintIsOn = getNumberForInfoString(\"SqueakDebug\");\n  gWindowMaxLength = getNumberForInfoString(\"SqueakWindowMaxLength\");\n  if (gWindowMaxLength == 0) \n\t\tgWindowMaxLength = 2048;\n\t\t\n\t\n if (sharedMemIDIncremental == 0) {\n\textern void srandomdev(void) __attribute__((weak_import));\n\tif (srandomdev == NULL)\n\t\tsrandom(time(NULL));\n\telse\n\t\tsrandomdev();\n\tsharedMemIDIncremental = random();\n }\n\n  plugin->instance=    instance;\n  plugin->pid=         0;\n  plugin->sharedMemoryBlock=    0;\n  plugin->sharedMemoryfd\t= 0;\n  *plugin->sharedMemoryName = 0x00;\n  plugin->colorspace\t\t= NULL;\n  plugin->buttonIsDown = false;\n  plugin->display=     NULL;\n  plugin->embedded=    (mode == NP_EMBED);\n  plugin->hasCursor =  true;\n  plugin->customCursor = false;\n  plugin->srcUrl=      NULL;\n  plugin->srcFilename= NULL;\n  plugin->srcId=       -1;\n  plugin->failureUrl=  0;\n  plugin->argv[0]=     NPN_StrDup(\"squeakvm\");\n  plugin->argv[1]=     NPN_StrDup(\"-headless\");\n  plugin->argv[2]=     NPN_StrDup(\"-browserPipes\");\n  plugin->argv[3]=     NULL;             /* inserted later */\n  plugin->argv[4]=     NULL;             /* inserted later */\n  plugin->argv[5]=     NULL;             /* inserted later */\n  plugin->argv[6]=     NPN_StrDup(\"\");   /* empty document file on cmdline! */ \n  plugin->argc=        7;\n//  plugin->SqueakPThread = 0;\n  plugin->threadPleaseStop = 0;\n  plugin->eventLoopTimerRef = NULL;\n  plugin->eventLoopTimerUPP = NULL;\n  if (plugin->embedded) {\n    int i;\n    for (i= 0; i < argc; i++) {\n      if (!strcasecmp(argn[i], \"imagename\")) {\n\t\tstrcpy(imagename, argv[i]);\n\t  }\n      else if (!strcasecmp(argn[i], \"failureurl\"))\n\t\t\tfailureUrl= argv[i];\n      plugin->argv[plugin->argc++]= NPN_StrDup(argn[i]);\n      plugin->argv[plugin->argc++]= NPN_StrDup(argv[i] ? argv[i] : \"\");\n      if (strcasecmp(\"SRC\", argn[i]) == 0)\n\t\tplugin->srcUrl= NPN_StrDup(argv[i]);\n    }\n    if (!plugin->srcUrl)\n      plugin->srcUrl= NPN_StrDup(\"\"); /* we were embedded without a SRC */\n\n    /* find npsqueakrun and image */\n\n\t{\n\t\tchar squeakVMPath[PATH_MAX+1],squeakVMName[256];\n\t\tgetCStringForInfoString(squeakVMPath,\"SqueakVMPath\",PATH_MAX, kCFStringEncodingUTF8);\n\t\tgetCStringForInfoString(squeakVMName,\"SqueakVMName\",256, kCFStringEncodingUTF8);\n\t\n\t\tchar* bin_dir_v[PATH_MAX]= {squeakVMPath,\n\t\t\t\"/Users/johnmci/Documents/Squeak3.8.0/build/Development/Squeak VM Opt.app/Contents/MacOS/\"};\n\t\tif (findFileInPaths(plugin->vmName, squeakVMName, 2 , bin_dir_v) == 0){\n\t\t  fprintf(stderr, \"Squeak Plugin: VM not found!\\n\");\n\t\t  return NPERR_GENERIC_ERROR;\n\t\t} else {\n\t\t\tplugin->argv[0]= NPN_StrDup(plugin->vmName); \n\t\t}\n\t}\n\n\t{\n\t\tchar imagePath[PATH_MAX+1];\n\t\tgetCStringForInfoString(imagePath,\"SqueakImagePath\",PATH_MAX, kCFStringEncodingUTF8);\n\n\t\tchar* img_dir_v[PATH_MAX]= {imagePath};\n\t\tif (findFileInPaths(plugin->imageName, imagename, 1, img_dir_v) == 0){\n\t\t\t  fprintf(stderr, \"Squeak Plugin: Image file not found: %s\\n\", imagename);\n\t\t\t  if (failureUrl){\n\t\t\t\tfprintf(stderr, \"Squeak Plugin: going to failure URL: %s\\n\", failureUrl);\n\t\t\t\tplugin->failureUrl= NPN_StrDup(failureUrl);\n\t\t\t  }else {\n\t\t\t\tfprintf(stderr, \"Squeak Plugin: no failure URL: \\n\");\n\t\t\t\treturn NPERR_GENERIC_ERROR;\n\t\t\t  } \n\t\t}  \n\t}\n\n\tplugin->argv[5]= NPN_StrDup(plugin->imageName); \n  } else {\n    /* if not embedded srcUrl will be set in NewStream */\n    plugin->srcUrl= NULL;\n  }\n  plugin->argv[plugin->argc]= 0;\n  if (pipe(&plugin->pipes[SQUEAK_READ])\n      || pipe(&plugin->pipes[PLUGIN_READ])) {\n    perror(\"Squeak Plugin: Creating pipes failed\");\n    return NPERR_GENERIC_ERROR;\n  }\n  DPRINT(\"NP: Created pipes (VM read: %d <- %d, NP read: %d <- %d)\\n\", \n\t plugin->pipes[SQUEAK_READ],\n\t plugin->pipes[PLUGIN_WRITE],\n\t plugin->pipes[PLUGIN_READ],\n\t plugin->pipes[SQUEAK_WRITE]);\n  instance->pdata= (void*) plugin;\n  fcntl(plugin->pipes[PLUGIN_WRITE], F_SETFL, O_NONBLOCK);\n  //signal(SIGPIPE,SIG_IGN);\n  return NPERR_NO_ERROR;\n}\n\nNPError \nNPP_Destroy(NPP instance, NPSavedData** save)\n{\n  SqueakPlugin *plugin;\n  \n  DPRINT(\"NP: NPP_Destroy\\n\");\n  if (!instance)\n    return NPERR_INVALID_INSTANCE_ERROR;\n  plugin= (SqueakPlugin*) instance->pdata;\n  if (plugin) {\n    int i;\n\tplugin->threadPleaseStop = 1;\n    if (plugin->pid) {\n      DPRINT(\"NP: kill 0x%i\\n\", plugin->pid);\n      kill(plugin->pid, SIGTERM);\n      plugin->pid= 0;\n    }\n    for (i= 0; i < 4; i++)\n      if (plugin->pipes[i]) {\n\t\tclose(plugin->pipes[i]);\n\t\tplugin->pipes[i]= 0;\n      }\n    if (plugin->srcUrl) {\n      browser->memfree(plugin->srcUrl);\n      plugin->srcUrl= NULL;\n    }\n    if (plugin->srcFilename) {\n      browser->memfree(plugin->srcFilename);\n      plugin->srcFilename= NULL;\n    }\n    if (plugin->failureUrl) {\n      browser->memfree(plugin->failureUrl);\n      plugin->failureUrl= NULL;\n    }\n    if (plugin->argv) {\n      for (i= 0; i < plugin->argc; i++) {\n\tif (plugin->argv[i])\n\t  browser->memfree(plugin->argv[i]);\n      }\n      plugin->argc= 0;\n      browser->memfree(plugin->argv);\n      plugin->argv= NULL;\n    }\n\n\tif (plugin->sharedMemoryfd) {\n\t\tint possibleError;\n\t\tDPRINT(\"NP: destroy memory ID %i at %i \\n\", plugin->sharedMemoryfd,plugin->sharedMemoryBlock);\n\t\tmunmap(plugin->sharedMemoryBlock,gWindowMaxLength*gWindowMaxLength*4+20);\n\t\tclose(plugin->sharedMemoryfd);\n\t\tpossibleError = shm_unlink(plugin->sharedMemoryName);\n\t\tplugin->sharedMemoryBlock = 0;\n\t\tplugin->sharedMemoryfd = 0;\n\t}\n\t\n/*\tif (plugin->SqueakPThread) { /* take event timer down \n\t\tint err;\n        err = pthread_cancel(plugin->SqueakPThread);\n       if (err == 0 )\n\t\t\tpthread_join(plugin->SqueakPThread,NULL);\n\t\tpthread_mutex_destroy(&plugin->SleepLock);\n        pthread_cond_destroy(&plugin->SleepLockCondition);\n\t} */\n\t\n\tif (plugin->eventLoopTimerRef) { /* take event timer down */\n\t\tRemoveEventLoopTimer(plugin->eventLoopTimerRef);\n\t\tDisposeEventLoopTimerUPP(plugin->eventLoopTimerUPP);\n\t\tpthread_mutex_destroy(&plugin->readPipeMutex);\n\t\tplugin->eventLoopTimerRef = NULL;\n\t\tplugin->eventLoopTimerUPP = NULL;\n\t}\n\n    browser->memfree(plugin);\n  }\n  instance->pdata= NULL;\n  return NPERR_NO_ERROR;\n}\n\n\nvoid NP_Shutdown(void)\n{\n\n}\n \n\n/***********************************************************************\n * Plugin events we need to handle\n ***********************************************************************/\n\nNPError \nNPP_SetWindow(NPP instance, NPWindow *pNPWindow)\n{\n  SqueakPlugin *plugin;\n  if (!instance)\n    return NPERR_INVALID_INSTANCE_ERROR;\n  plugin= (SqueakPlugin*) instance->pdata;\n  if (!plugin)\n    return NPERR_GENERIC_ERROR;\n  if (plugin->failureUrl) {\n    DPRINT(\"NP: opening failure URL\");\n    NPN_GetURL(plugin->instance, plugin->failureUrl, \"_self\");\n    return NPERR_NO_ERROR;\n  }\n  if (pNPWindow == NULL) \n    return NPERR_NO_ERROR;\n  \n  if (!plugin->display) {\n    /* first time only */\n    plugin->display= pNPWindow->window;\n  }\n  if (pNPWindow->clipRect.top == 0 &&\n\tpNPWindow->clipRect.left == 0 &&\n\tpNPWindow->clipRect.bottom == 0 &&\n\tpNPWindow->clipRect.right == 0)\n\t\treturn NPERR_NO_ERROR;\n\t\n  if (!plugin->pid)\n    Run(plugin);\n  plugin->clipRect = pNPWindow->clipRect;\n  SetWindow(plugin, pNPWindow, pNPWindow->width, pNPWindow->height);\n  return NPERR_NO_ERROR;\n}\n\nNPError \nNPP_NewStream(NPP instance, NPMIMEType type, \n\t      NPStream *stream, NPBool seekable, uint16 *stype)\n{\n  SqueakPlugin *plugin= (SqueakPlugin*) instance->pdata;\n  DPRINT(\"NP: NPP_NewStream(%s, id=%i)\\n\", stream->url,\n\t stream->notifyData ? ((SqueakStream*) stream->notifyData)->id : -1);\n  \n  if (!stream->notifyData && !plugin->srcUrl) {\n    /* We did not request this stream, so it is our SRC file. */\n    plugin->srcUrl= NPN_StrDup(stream->url);\n    plugin->argv[plugin->argc++]= NPN_StrDup(\"SRC\");\n    plugin->argv[plugin->argc++]= NPN_StrDup(plugin->srcUrl);\n    DPRINT(\"NP:   got srcUrl=%s\\n\", plugin->srcUrl);\n    Run(plugin);\n  }\n   if (stream->notifyData && ((SqueakStream*) stream->notifyData)->fd)\n     *stype= NP_NORMAL;              /* We stream ourselfes */\n   else\n     *stype= NP_ASFILEONLY;          /* We want the file after download */\n \n  \n  return NPERR_NO_ERROR;\n}\n\n\nNPError \nNPP_DestroyStream(NPP instance, NPStream *stream, NPError reason)\n{\n  /* We'll clean up in URLNotify */\n  DPRINT(\"NP: NPP_DestroyStream(%s, id=%i)\\n\", stream->url, \n\t stream->notifyData ? ((SqueakStream*) stream->notifyData)->id : -1);\n  return NPERR_NO_ERROR;\n}\n\n\nvoid \nNPP_StreamAsFile(NPP instance, NPStream *stream, const char* fname)\n{\n  int id= stream->notifyData ? ((SqueakStream*) stream->notifyData)->id : -1;\n        CFStringRef \tfilePath;\n        CFURLRef \t    sillyThing;\n\t\tchar\t\t\tpathName[PATH_MAX+1],lname[PATH_MAX+1];\n  SqueakPlugin *plugin= (SqueakPlugin*) instance->pdata;\n\n  DPRINT(\"NP: StreamAsFile(%s, id=%i)\\n\", stream->url, id);\n  DPRINT(\"NP:   fname=%s\\n\", fname ? fname : \"<NULL>\");\n\n  pathName[0] = 0x00;\n  if (!plugin || !fname) return;\n   if (strncmp(fname,(char *) &\"/\",1) == 0) {\n\tstrncpy(pathName,fname, PATH_MAX);\n   } else {\n\tfilePath   = CFStringCreateWithBytes(kCFAllocatorDefault,(const UInt8 *)fname,strlen(fname),kCFStringEncodingMacRoman,false);\n\tsillyThing = CFURLCreateWithFileSystemPath (kCFAllocatorDefault,filePath,kCFURLHFSPathStyle,false);\n\tCFRelease(filePath);\n\tfilePath = CFURLCopyFileSystemPath (sillyThing, kCFURLPOSIXPathStyle);\n\tCFRelease(sillyThing);\n\tCFStringGetCString (filePath, pathName,PATH_MAX, kCFStringEncodingUTF8);\n\tCFRelease(filePath);\n  }\n  \n  /* need to copy file because it might be deleted after return */\n  strncpy(lname, pathName, PATH_MAX);\n  strcat(lname, \"$\");\n  DPRINT(\"NP:  lname=%s\\n\", lname);\n  if (-1 == link(pathName, lname))\n    DPRINT(\"NP:   Link failed: %s\\n\", strerror(errno));\n  strcpy(pathName, lname);\n\t\n  if (!stream->notifyData && !plugin->srcFilename) {\n    /* We did not request this stream, so it is our SRC file. */\n\t\t\n    plugin->srcFilename= NPN_StrDup(pathName);\n    DPRINT(\"NP:   got srcFilename=%s\\n\", plugin->srcFilename);\n    if (plugin->srcId >= 0) {\n      /* plugin wanted it already */\n      DeliverFile(plugin, plugin->srcId, plugin->srcFilename);\n      plugin->srcId= -1;\n    }\n    return;\n  }\n\n  DeliverFile(plugin, id, pathName);\n\n  /* signal URLNotify that we're done */\n  ((SqueakStream*) stream->notifyData)->id= -1;\n  ((SqueakStream*) stream->notifyData)->fname= NPN_StrDup(pathName);\n}\n\nvoid\nNPP_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData)\n{\n  int id= notifyData ? ((SqueakStream*) notifyData)->id : -1;\n  int ok= reason == NPRES_DONE;\n  SqueakPlugin *plugin= (SqueakPlugin*) instance->pdata;\n  DPRINT(\"NP: NPP_URLNotify(%s, id=%i, ok=%i)\\n\", url, id, ok);\n \t (reason == NPRES_DONE ? \"NPRES_DONE\" : \n \t  (reason == NPRES_USER_BREAK ? \"NPRES_USER_BREAK\" :\n \t   (reason == NPRES_NETWORK_ERR ? \"NPRES_NETWORK_ERR\" :\n \t    \"<unknown>\")),\n\t id, ok);\n\n  if (notifyData)\n    {\n      if (-1 != id && ok && !((SqueakStream*)notifyData)->fname)\n\t{\n\t  /* Work around netscape/firefox bug */\n\t  char tmppath[255];\n\t  int tmpfd; \n\t  DPRINT(\"NP:  Netscape bug: did not get url as file\\n\");\n\t  sprintf(tmppath, \"/tmp/npsqueak-%d-XXXXXX\", (unsigned)getpid());\n\t  tmpfd = mkstemp(tmppath);\n\t  if (-1 == tmpfd)\n\t    perror(\"Squeak plugin tmp file open failed\");\n\t  else\n\t    {\n\t      ((SqueakStream*)notifyData)->fname= NPN_StrDup(tmppath);\n\t      ((SqueakStream*)notifyData)->fd= tmpfd;\n\t      DPRINT(\"NP:   Trying again as stream (%s)\\n\", tmppath);\n\t      DPRINT(\"NP: NPN_GetURLNotify(%s, id=%i)\\n\", url, id);\n\t      NPN_GetURLNotify(plugin->instance, url, NULL, notifyData);\n\t      return;\n\t    }\n\t}\n      if (((SqueakStream*)notifyData)->fd)\n\t{ \n\t  char lname[PATH_MAX];\n\t  close(((SqueakStream*)notifyData)->fd);\n\t  DPRINT(\"NP:  Netscape bug workaround successful!\\n\");\n\t  /* need to add $ so VM deletes file after finishing */\n\t  strncpy(lname, ((SqueakStream*)notifyData)->fname, PATH_MAX);\n\t  strcat(lname, \"$\");\n \t  DPRINT(\"NP:  lname=%s\\n\", lname);\n \t  if (-1 == rename(((SqueakStream*)notifyData)->fname, lname))\n \t    DPRINT(\"NP:   Rename failed: %s\\n\", strerror(errno));\n \t  DeliverFile(plugin, id, lname);\n \t  id= -1;\n \t}\n       if (((SqueakStream*)notifyData)->fname)\n\t\t\tbrowser->memfree(((SqueakStream*)notifyData)->fname);\n       browser->memfree(notifyData);\n     }\n  if (!plugin || -1 == id) return;\n\n  DeliverFile(plugin, id, NULL);\n}\n\nNPError NPP_GetValue(NPP instance, NPPVariable variable, void *value)\n{\n       return NPERR_GENERIC_ERROR;\n}\n\nNPError NPP_SetValue(NPP instance, NPNVariable variable, void *value)\n{\n    return NPERR_GENERIC_ERROR;\n}\n\n\n\n/***********************************************************************\n * Plugin stubs\n ***********************************************************************/\n\n\nNPError\nNPP_Initialize(void)\n{\n  return NPERR_NO_ERROR;\n}\n\n\nvoid\nNPP_Shutdown(void)\n{\n}\n\n\n/* We don't have an associated java class */\n\n/* jref\nNPP_GetJavaClass()\n{\n  return NULL;\n} */\n\n\nint32 \nNPP_WriteReady(NPP instance, NPStream *stream)\n{\n  return 16384;\n}\n\n\nint32 \nNPP_Write(NPP instance, NPStream *stream, \n\t  int32 offset, int32 len, void *buffer)\n{\n  DPRINT(\"NP: NPP_Write(%s, %d)\\n\", stream->url, len);\n  SqueakStream* sqStream= (SqueakStream*) stream->notifyData;\n  if (sqStream && sqStream->fd)\n    {\n      int n;\n      do {\n\tn= write(sqStream->fd, buffer, len);\n\tDPRINT(\"NP:  writing to %s - wrote %d bytes\\n\", sqStream->fname, n);\n      } while (n == -1 && errno == EINTR);\n      return n;\n    }\n  else\n    DPRINT(\"NP:  ignored\\n\");\n   return len;\n}\n\n\n/* We don't print */\n\nvoid \nNPP_Print(NPP instance, NPPrint* printInfo)\n{\n}\n\n\n/***********************************************************************\n * Our functions\n ***********************************************************************/\n\n/* Read from command pipe. */\nstatic void\nReceive(SqueakPlugin *plugin, void *buf, size_t count)\n{\n  ssize_t n;\n  do {\n    n= read(plugin->pipes[PLUGIN_READ], buf, count);\n  } while (n == -1 && (errno == EINTR || errno == EAGAIN));\n  if (n == -1)\n    perror(\"Squeak plugin pipe read failed:\");\n  if (n < count)\n    fprintf(stderr, \"Squeak plugin read too few data from pipe\\n\");\n}\n\n\n/* Write to command pipe. */\nstatic void\nSend(SqueakPlugin *plugin, const void *buf, size_t count)\n{\n  ssize_t n;\n  int retry=0;\n  \n  do {\n    n= write(plugin->pipes[PLUGIN_WRITE], buf, count);\n\tif (n == -1 && errno == EAGAIN)  {\n\t\tretry++;\n\t\tif (retry > 20)\n\t\t\treturn;\n\t\t}\n\t\t\n  } while (n == -1 && (errno == EINTR  || errno == EAGAIN));\n  if (n == -1)\n    perror(\"Squeak plugin write failed:\");\n  if (n < count)\n    fprintf(stderr, \"Squeak plugin wrote too few data to pipe\\n\");\n}\n\n\n\nvoid\nSendInt(SqueakPlugin *plugin, int value)\n{\n  Send(plugin, &value, 4);\n}\n\n\nstatic void \nDeliverFile(SqueakPlugin *plugin, int id, const char* fname)\n{\n  int ok= fname != NULL;\n\tDPRINT(\"NP:   Send RECEIVE_DATA id=%i ok=%i filename %s\\n\", id, ok,fname);\n \n  errno= 0;\n  SendInt(plugin, CMD_RECEIVE_DATA);\n  SendInt(plugin, id);\n  SendInt(plugin, ok);\n\n  if (ok) {\n    int length= strlen(fname);\n    SendInt(plugin, length);\n    Send(plugin, fname, length);\n  }\n\n  if (errno)\n    perror(\"Squeak Plugin (StreamAsFile)\");\n}\n\n/*  Ok look every 10 milliseconds, 100 second we consider drawing, \nbut use pipeReadThrottle flag to only read pipe 1/2 the time, say 50 times a second*/\n\n/* void forkedSleepLoop(SqueakPlugin *plugin) {\n\tint n,err;\n\tint cmd;\n\tstatic bool pipeReadThrottle=true;\n\tstatic const int realTimeToWait=10;\n\t\n\twhile(true) {\n\t\tif (plugin->threadPleaseStop) return;\n\t\t\n\t\tpthread_mutex_lock(&plugin->readPipeMutex);\n\t\tif (pipeReadThrottle) {\n\t\t\tn = read(plugin->pipes[PLUGIN_READ], &cmd, 4);\n\t\t} else {\n\t\t\tn = -1;\n\t\t}\n\t\tpipeReadThrottle = !pipeReadThrottle;\n\t\tdrawToScreen(plugin);\n\t\tif (n == -1) {\n\t\t\tstruct timespec tspec;\n\t\t\t\n\t\t\tpthread_mutex_unlock(&plugin->readPipeMutex);\n\t\t\t\n\t\t\ttspec.tv_sec=  realTimeToWait / 1000;\n\t\t\ttspec.tv_nsec= (realTimeToWait % 1000)*1000000;\n    \n\t\t\terr = pthread_mutex_lock(&plugin->SleepLock);\n\t\t\terr = pthread_cond_timedwait_relative_np(&plugin->SleepLockCondition,&plugin->SleepLock,&tspec);\t\n\t\t\terr = pthread_mutex_unlock(&plugin->SleepLock); \n\t\t} else {\n\t\t\tbrowserProcessCommand(plugin,cmd);\n\t\t\tpthread_mutex_unlock(&plugin->readPipeMutex);\n\t\t}\n\t}\n}\n*/\n\nstatic pascal void eventLoopPolling (EventLoopTimerRef theTimer,SqueakPlugin *plugin) {\n\tint n; \n\tint cmd;\n\n\t/* Not sure if the lock is needed, but disaster if we run this routine on two cpus at the same time */\n\t\n\tpthread_mutex_lock(&plugin->readPipeMutex);\n\tdrawToScreen(plugin);\n\tn= read(plugin->pipes[PLUGIN_READ], &cmd, 4);\n\tif (n == -1) {\n\t\tpthread_mutex_unlock(&plugin->readPipeMutex);\n\t\treturn;\n\t}\n\tbrowserProcessCommand(plugin,cmd);\n\tpthread_mutex_unlock(&plugin->readPipeMutex);\n}\n\nvoid eventLoopParasite(SqueakPlugin *plugin) {\n\tint error;\n\t\n\tpthread_mutex_init(&plugin->readPipeMutex, NULL);\n//\tpthread_mutex_init(&plugin->SleepLock, 0);\n//\tpthread_cond_init(&plugin->SleepLockCondition,0);\n//\terr = pthread_create(&plugin->SqueakPThread,0,(void *) forkedSleepLoop, plugin);\n\t\t\t\t\t\n\tplugin->eventLoopTimerUPP = NewEventLoopTimerUPP((EventLoopTimerProcPtr)&eventLoopPolling);\n\terror = InstallEventLoopTimer (GetMainEventLoop(),\n                       10*kEventDurationMillisecond,\n                       kEventDurationMillisecond,\n                       plugin->eventLoopTimerUPP,\n                       plugin,&plugin->eventLoopTimerRef);\n}\n\nstatic void \nRun(SqueakPlugin *plugin)\n{\n  if (plugin->pid || !plugin->srcUrl ||plugin->failureUrl)\n    return;\n\t\n\tfcntl(plugin->pipes[PLUGIN_READ], F_SETFL, O_NONBLOCK);\n\teventLoopParasite(plugin);\n\n\tif (*plugin->sharedMemoryName == 0x00) {\n\t\tsharedMemIDIncremental++;\n\t\tsprintf(plugin->sharedMemoryName,\"%i\",42+plugin->pid+sharedMemIDIncremental);\n\t\tplugin->sharedMemoryfd = shm_open(plugin->sharedMemoryName,O_RDWR | O_CREAT,S_IRUSR+S_IWUSR);\n\t\tif (plugin->sharedMemoryfd < 0) {\n\t\t\tplugin->sharedMemoryfd = 0;\n\t\t\tperror(\"NP: shared memory shm_open failed\\n\");\n\t\t\treturn;\n\t\t}\n\t\tftruncate(plugin->sharedMemoryfd,gWindowMaxLength*gWindowMaxLength*4+20);\n\t\tplugin->sharedMemoryBlock= mmap(0, (gWindowMaxLength*gWindowMaxLength*4)+20, PROT_READ | PROT_WRITE, MAP_SHARED, plugin->sharedMemoryfd,0);\n\t\tDPRINT(\"NP: shared memory mmap memory fd %i at %i \\n\", plugin->sharedMemoryfd,plugin->sharedMemoryBlock);\n\t\tif (plugin->sharedMemoryBlock == MAP_FAILED) {  \n\t\t\tperror(\"NP: shared memory mmap failed %i\\n\");\n\t\t\tplugin->sharedMemoryBlock = NULL;\n\t\t\tclose(plugin->sharedMemoryfd);\n\t\t\tshm_unlink(plugin->sharedMemoryName);\n\t\t\t*plugin->sharedMemoryName = 0x00;\n\t\t\tplugin->sharedMemoryfd = 0;\n\t\t\treturn;\n\t\t}\n\t}\n\n  DPRINT(\"NP: Thunder into fork\\n\");\n  plugin->pid= fork();\n  \n  if (plugin->pid == -1) {\n    perror(\"Squeak fork() failed\");\n    plugin->pid= 0;\n    return;\n  }\n  DPRINT(\"NP: fork() -> %i\\n\", plugin->pid);\n  if (plugin->pid == 0) {\n    char tmp1[16], tmp2[16];\n\tsprintf(tmp1, \"%i\", plugin->pipes[SQUEAK_READ]);\n    plugin->argv[3]= NPN_StrDup(tmp1);\n    sprintf(tmp2, \"%i\", plugin->pipes[SQUEAK_WRITE]);\n    plugin->argv[4]= NPN_StrDup(tmp2);\n    DPRINT(\"NP(child): Running Squeak VM with arguments\\n\");\n    {\n      int i;\n      for (i= 1; i<plugin->argc; i++)\n\t\tDPRINT(\"    %s\\n\", plugin->argv[i]);\n    }\n\tplugin->argv[plugin->argc] = 0;\n    execv(plugin->vmName, plugin->argv);\n    /* npsqueakrun could not be executed either */\n    fprintf(stderr, \"Squeak Plugin: running \\\"%s\\\"\\n\", plugin->vmName);\n    perror(\"Squeak execv() failed\");\n    _exit(1);\n  } else {\n  }\n}\n\n\nstatic void\nSetWindow(SqueakPlugin *plugin,  NPWindow *window, int width, int height)\n{\n\tNPRect    clipRect;\n\tclipRect = window->clipRect;\n\t\n  DPRINT(\"NP: SetWindow(0x%X, %i@%i clip tlbr %i %i %i %i  v %i h %i)\\n\", window, width, height,\n  clipRect.top,\n  clipRect.left,\n  clipRect.bottom,\n  clipRect.right,\n  window->y,\n  window->x);\n\n\t/* New window */\n\tsetWindowLogic(plugin,width,height);\n}\n\nstatic void setWindowLogic(SqueakPlugin *plugin, int width, int height) {\n\tint\t\ttotalBytes;\n\tCMProfileRef sysprof = NULL;\n  \n\t\t// Get the Systems Profile for the main display\n\tif (plugin->colorspace == 0) {\n\t\tif (CMGetSystemProfile(&sysprof) == noErr) {\n\t\t\t// Create a colorspace with the systems profile\n\t\t\tplugin->colorspace = CGColorSpaceCreateWithPlatformColorSpace(sysprof);\n\t\t\tCMCloseProfile(sysprof);\n\t\t} else \n\t\t\tplugin->colorspace = CGColorSpaceCreateDeviceRGB();\n\t}\n\n\tplugin->width = width > gWindowMaxLength ? gWindowMaxLength : width;\n\tplugin->height = height > gWindowMaxLength ? gWindowMaxLength : height;\n\tplugin->rowBytes = (plugin->width*4*8 + 7)/8;\n\ttotalBytes = plugin->height*plugin->rowBytes;\n\t\t\t\t\t\t\n\tDPRINT(\"NP: setWindowLogic(width %i height %i rowbytes %i memory at id %i at %i)\\n\", plugin->width, plugin->height, plugin->rowBytes,plugin->sharedMemoryfd,plugin->sharedMemoryBlock);\n\tSendInt(plugin,CMD_SHARED_MEMORY);\n\tSendInt(plugin,plugin->sharedMemoryfd);\n\tSendInt(plugin,plugin->width);\n\tSendInt(plugin,plugin->height);\n\tSendInt(plugin,plugin->rowBytes);\n}\n\nstatic void \nbrowserProcessCommand(SqueakPlugin *plugin,int cmd)\n{\n\n  switch (cmd) {\n  case CMD_GET_URL: \n    GetUrl(plugin);\n    break;\n  case CMD_SHARED_MEMORY: \n\tbreak;\n  case CMD_POST_URL: \n    PostUrl(plugin);\n    break;\n  case CMD_SET_CURSOR:\n\t{\n\t\tReceive(plugin, &plugin->macCursor, sizeof(Cursor));\n\t\tif (plugin->threadPleaseStop)\n\t\t\treturn;\n\t\tplugin->customCursor = true;\n\t\tif (plugin->hasCursor) \n\t\t\tSetCursor(&plugin->macCursor);\n\t}\n\tbreak;\n  default:\n    fprintf(stderr, \"Unknown command from Squeak: %i\\n\", cmd);\n  }\n}\n\n\nstatic const void *get_byte_pointer(void *bitmap)\n{\n    return (void *) bitmap;\n}\n\nstatic CGDataProviderDirectAccessCallbacks gProviderCallbacks = {\n    get_byte_pointer,\n    NULL,\n    NULL,\n    NULL\n};\n\nCG_EXTERN CGImageRef CGBitmapContextCreateImage(CGContextRef c) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;\n\nvoid drawToScreenActual(SqueakPlugin *plugin,int top, int left, int bottom, int right);\n\nvoid drawToScreen(SqueakPlugin *plugin) {\n\tint\t\t\t left,right,top,bottom;\t\n\t\n\tif (plugin->sharedMemoryBlock == 0) \n\t\treturn;\n\t\t\n\tif (!plugin->sharedMemoryBlock->written)\n\t\treturn;\n\n\tleft = plugin->sharedMemoryBlock->left;\n\tright = plugin->sharedMemoryBlock->right;\n\ttop = plugin->sharedMemoryBlock->top;\n\tbottom = plugin->sharedMemoryBlock->bottom;\n\tdrawToScreenActual(plugin,top,left,bottom,right);\n\t\n}\n\nvoid drawToScreenActual(SqueakPlugin *plugin,int top, int left, int bottom, int right) {\n\tCGRect\t\t targetDrawArea,clipToWindowInterior;\n\tCGImageRef\t mySubimage;\n\tCGContextRef context,aBitMapContextRef;\n\tCGDataProviderRef provider;\n\n\t\n\t\n\tif (plugin->sharedMemoryBlock == 0) \n\t\treturn;\n\t\t\n\tif (!plugin->sharedMemoryBlock->written)\n\t\treturn;\n\n\tDPRINT(\"NP: CMD_DRAW_CLIP(tlbr %i %i %i %i)\\n\", top, left, bottom, right);\n\taBitMapContextRef = CGBitmapContextCreate(plugin->sharedMemoryBlock->screenBits+top*plugin->rowBytes+left*4,\n\t\tright-left, bottom-top,8,plugin->rowBytes,plugin->colorspace,kCGImageAlphaNoneSkipFirst);\n\tif (aBitMapContextRef == NULL) \n\t\treturn;\n\t\t\n\tif (CGBitmapContextCreateImage == NULL || true) {\n\t\tprovider = CGDataProviderCreateDirectAccess(CGBitmapContextGetData(aBitMapContextRef),CGBitmapContextGetBytesPerRow(aBitMapContextRef)*CGBitmapContextGetHeight(aBitMapContextRef),&gProviderCallbacks);\n\t\tif(provider == NULL)\n\t\t\treturn;\n\t\tmySubimage = CGImageCreate(CGBitmapContextGetWidth(aBitMapContextRef), CGBitmapContextGetHeight(aBitMapContextRef), \n\t\t\t\t\tCGBitmapContextGetBitsPerComponent(aBitMapContextRef),\n\t\t\t\t\tCGBitmapContextGetBitsPerPixel(aBitMapContextRef), \n\t\t\t\t\tCGBitmapContextGetBytesPerRow(aBitMapContextRef), plugin->colorspace, kCGImageAlphaNoneSkipFirst, provider, NULL, 0, kCGRenderingIntentDefault);\n\t\tCGDataProviderRelease(provider);\n\t} else {\n\t\tmySubimage = CGBitmapContextCreateImage(aBitMapContextRef);\n\t}\n\n\tCFRelease(aBitMapContextRef);\n\tif (mySubimage == NULL) \n\t\treturn;\n\t\n\tif (plugin->threadPleaseStop) return;\n\tQDBeginCGContext (plugin->display->port,&context);\n\tif (context == NULL) \n\t\treturn;\n\t\n\tGetPortBounds( plugin->display->port, &plugin->portRect );\n\n\t/* portRect on safari is always 0,0, but it's non-zero on FireFox\n\talso firefox *seems* to want \"-2*plugin->portRect.top\" to get clip right (sigh?) */\n\n\t/* First clip to window, based on x,y lower left */\n\tclipToWindowInterior = CGRectMake(plugin->portRect.left+plugin->clipRect.left,\n\t\t\tplugin->portRect.bottom-plugin->clipRect.bottom-plugin->portRect.top-plugin->portRect.top,\n\t\t\tplugin->clipRect.right-plugin->clipRect.left, plugin->clipRect.bottom-plugin->clipRect.top);\n\n\tif (plugin->threadPleaseStop) return;\n\tCGContextClipToRect(context, clipToWindowInterior);\n\t\n\t/* now change the the coordinate system as we figure out where to draw */ \n\t\n\tif (plugin->threadPleaseStop) return;\n\tCGContextTranslateCTM(context, (float) 0-plugin->display->portx+plugin->portRect.left, \n\t\t(float)(plugin->portRect.bottom - plugin->portRect.top)+plugin->display->porty-plugin->portRect.top);\n\t\n\ttargetDrawArea = CGRectMake(left,0-bottom, right-left, bottom-top);\n\t\n\tif (plugin->threadPleaseStop) return;\n\tCGContextDrawImage(context, targetDrawArea, mySubimage);\n\tif (plugin->threadPleaseStop) return;\n\tCGContextFlush(context);\n\tif (plugin->threadPleaseStop) return;\n\tQDEndCGContext(plugin->display->port,&context);\n\tCFRelease(mySubimage);\n\t\n\t// Set written flag back to false so VM can continue, note VM does have 1 second timeout anyway */\n\t\n\tplugin->sharedMemoryBlock->written = 0;\n\tmsync(plugin->sharedMemoryBlock,20,MS_SYNC);\n\n}\n\nstatic void\nGetUrl(SqueakPlugin *plugin)\n{\n  char *url, *target;\n  int id, urlSize, targetSize;\n\n  errno= 0;\n  Receive(plugin, &id, 4);\n  /* Read URL from pipe */\n  Receive(plugin, &urlSize, 4);\n  if (urlSize > 0) {\n    url= browser->memalloc(urlSize+1);\n    Receive(plugin, url, urlSize);\n    url[urlSize]= 0;\n  } else url= NULL;\n  /* Read target from pipe */\n  Receive(plugin, &targetSize, 4);\n  if (targetSize > 0) {\n    target= browser->memalloc(targetSize+1);\n    Receive(plugin, target, targetSize);\n    target[targetSize]= 0;\n  } else target= NULL;\n\n  if (errno) {\n    perror(\"Squeak Plugin (GetUrl)\");\n  } else {\n    DPRINT(\"NP: GetUrl(%s, %s)\\n\", url, target ? target : \"NULL\");\n    if (strcmp(url, plugin->srcUrl)==0) {\n      if (plugin->srcFilename)\n\t\tDeliverFile(plugin, id, plugin->srcFilename);\n      else\n\t\tplugin->srcId= id;\n    } else {\n      SqueakStream* notifyData= \n\t(SqueakStream*) browser->memalloc(sizeof(SqueakStream));\n      if (!notifyData) { \n\tfprintf(stderr, \"Squeak Plugin (GetUrl): alloc failed\\n\");\n      } else {\n \tDPRINT(\"NP: NPN_GetURLNotify(%s, id=%i)\\n\", url, id);\n \tnotifyData->id= id;\n \tnotifyData->fname= NULL;\n \tnotifyData->fd= 0; \n\tif (plugin->threadPleaseStop) return;\n\tNPN_GetURLNotify(plugin->instance, url, target, notifyData);\n      }\n    }\n  }\n\n  if (url) browser->memfree(url);\n  if (target) browser->memfree(target);\n}\n\nstatic void\nPostUrl(SqueakPlugin *plugin)\n{\n  char *url, *target, *data;\n  int id, urlSize, targetSize, dataSize;\n\n  errno= 0;\n  Receive(plugin, &id, 4);\n  /* Read URL from pipe */\n  Receive(plugin, &urlSize, 4);\n  if (urlSize > 0) {\n    url= browser->memalloc(urlSize+1);\n    Receive(plugin, url, urlSize);\n    url[urlSize]= 0;\n  } else url= NULL;\n  /* Read target from pipe */\n  Receive(plugin, &targetSize, 4);\n  if (targetSize > 0) {\n    target= browser->memalloc(targetSize+1);\n    Receive(plugin, target, targetSize);\n    target[targetSize]= 0;\n  } else target= NULL;\n  /* Read post data from pipe */\n  Receive(plugin, &dataSize, 4);\n  if (dataSize > 0) {\n    data= browser->memalloc(dataSize);\n    Receive(plugin, data, dataSize);\n  } else data= NULL;\n\n  if (errno) {\n    perror(\"Squeak Plugin (PostUrl)\");\n  } else {\n    SqueakStream* notifyData= \n      (SqueakStream*) browser->memalloc(sizeof(SqueakStream));\n    if (!notifyData) { \n      fprintf(stderr, \"Squeak Plugin (PostUrl): alloc failed\\n\");\n    } else {\n      DPRINT(\"NP: NPN_PostURLNotify(%s, id=%i)\\n\", url, id);\n      notifyData->id= id;\n\t  if (plugin->threadPleaseStop) return;\n      NPN_PostURLNotify(plugin->instance, url, target, \n\t\t\tdataSize, data, FALSE, notifyData);\n    }\n  }\n\n  if (url) browser->memfree(url);\n  if (target) browser->memfree(target);\n  if (data) browser->memfree(data);\n}\n\nint16 Mac_NPP_HandleEvent(NPP instance, void *rawEvent);\n\nint16 NPP_HandleEvent(NPP instance, void *rawEvent) {\n\treturn Mac_NPP_HandleEvent(instance,rawEvent);\n}\n\nint16 Mac_NPP_HandleEvent(NPP instance, void *rawEvent) \n{\n\tEventRecord *eventPtr = (EventRecord*) rawEvent;\n\tSqueakPlugin *plugin= (SqueakPlugin*) instance->pdata;\n\tPoint zot,prezot;\n\tint\thandled=0;\n\t\n\tif (plugin->pid == 0) return 0;\t\n\tif (eventPtr == NULL) return false;\n\n\tSetOrigin(plugin->display->portx, plugin->display->porty);\n\t//QDGlobalToLocalPoint(plugin->display->port,(Point *) &eventPtr->where);\n\tprezot = eventPtr->where;\n\tzot.v = 0;\n\tzot.h = 0;\n\tQDGlobalToLocalPoint(plugin->display->port,&zot);\n\teventPtr->where.v = eventPtr->where.v  + zot.v; // -  plugin->display->porty;\n\teventPtr->where.h = eventPtr->where.h  + zot.h; // -  plugin->display->portx;\n\t\n\tif (!(eventPtr->what == nullEvent)) {\n\t\t DPRINT(\"NP: handelEventL %i where v %i h %i, modifiers %i plugin-cliprect v %i h %i  portxy v %i h %i\\n\",\n\t\t eventPtr->what,eventPtr->where.v,eventPtr->where.h,eventPtr->modifiers,\n\t\t plugin->clipRect.top,plugin->clipRect.left, \n\t\t plugin->display->porty,plugin->display->portx);\n\t\t handled = 1;\n\t}\n\tif (eventPtr->what == mouseUp) {\n\t\tplugin->buttonIsDown = false;\n\t\thandled = 1;\n\t}\n\t\t\n\tif (eventPtr->what == mouseDown) {\n\t\tplugin->buttonIsDown = true;\n\t\t DPRINT(\"NP: handelEventL cmd %i option %i control %i shift %i\\n\",eventPtr->modifiers & cmdKey, \n\t\t eventPtr->modifiers & optionKey, \n\t\t eventPtr->modifiers & controlKey, \n\t\t eventPtr->modifiers & shiftKey);\n\t\thandled = 1;\n\t}\n\n\tif (eventPtr->what == nullEvent)\n\t\teventPtr->modifiers = checkForModifierKeys(plugin);\n\t\t\n\tif (eventPtr->what == activateEvt) {\n\t\tDPRINT(\"NP: handelEventL activate\\n %i %i\",eventPtr->message,eventPtr->modifiers & activeFlag);\n\t\tif (eventPtr->modifiers & activeFlag) {\n\t\t}\n\t\treturn 1;\n\t}\n\tif (eventPtr->what == updateEvt) {\n\t\t/* Draw the entire screen, don't ask VM, that is too slow */\n\t\t WindowPtr window;\n\t\t RgnHandle clip;\n\t\t Rect clipRect;\n\t\t GrafPtr  oldPort;\n\t\t \n\t\t \n\t\t window = (WindowPtr)eventPtr->message;\n\t\t BeginUpdate( window );\n\n\t\t GetPort(&oldPort);\n\t\t SetPort(GetWindowPort(window));\n\t\t \n\t\t clip = NewRgn();\n\t\t GetClip(clip);\n\t\t GetRegionBounds(clip,&clipRect);\n\t\t \n\t\tpthread_mutex_lock(&plugin->readPipeMutex);\n\t\tplugin->sharedMemoryBlock->written = 1;\n\t\t/* if (clipRect.top == 0 && clipRect.left == 0 && clipRect.bottom == 0 && clipRect.right == 0) {\n\t\t\tclipRect.top = 0;\n\t\t\tclipRect.left = 0;\n\t\t\tclipRect.bottom = plugin->height;\n\t\t\tclipRect.right = plugin->width;\n\t\t\tClipRect(&clipRect);\n\t\t } */\n\t\t drawToScreenActual(plugin,clipRect.top,clipRect.left,clipRect.bottom, clipRect.right);\n\t\t pthread_mutex_unlock(&plugin->readPipeMutex);\n\t\t \n\t\t EndUpdate( window );\n\t\t DisposeRgn(clip);\n\t\t SetPort(oldPort);\n\t\t DPRINT(\"NP: handelEventL update (clip tlbr %i %i %i %i) \\n\", clipRect.top,clipRect.left,clipRect.bottom, clipRect.right);\n\t\thandled = 1;\n\t}\n\t\n\tif (eventPtr->what == getFocusEvent) {}\n\tif (eventPtr->what == loseFocusEvent) {}\n\tif (eventPtr->what == adjustCursorEvent) {\n\t\tplugin->hasCursor = eventPtr->modifiers;\n\t\tif (eventPtr->modifiers) {\n\t\t\tif (plugin->customCursor)\n\t\t\t\tSetCursor(&plugin->macCursor);\n\t\t} else {\n\t\t\tInitCursor();\n\t\t}\n\t\t DPRINT(\"NP: adjust cursor  %i\\n\",plugin->hasCursor);\n\t\treturn 1;\n\t}\n\t\n\tif (eventPtr->what == keyDown) {\n\t\thandled = 1;\n\t}\n\tif (eventPtr->what == keyUp) {\n\t\thandled = 1;\n\t}\n\tif (eventPtr->what == autoKey) {\n\t\thandled = 1;\n\t}\n\t\n\tSendInt(plugin, CMD_EVENT);\n\tSend(plugin, rawEvent, sizeof(struct EventRecord));\n\treturn \thandled;  // \n}\n\n\nNPError\nNPN_GetURL(NPP instance, const char* url, const char* window)\n{\n\treturn browser->geturl( instance, url, window);\n}\n\nNPError\nNPN_GetURLNotify(NPP instance, const char* url, const char* window, void* notifyData)\n{\n\tint navMinorVers = browser->version & 0xFF;\n\tif (navMinorVers < NPVERS_HAS_NOTIFICATION)\n\t  return NPERR_INCOMPATIBLE_VERSION_ERROR;\n\treturn browser->geturlnotify (instance, url, window, notifyData);\n}\n\nNPError\nNPN_PostURL(NPP instance, const char* url, const char* window,\n\t     uint32 len, const char* buf, NPBool file)\n{\n\treturn browser->posturl (instance,\n\t\t\t\t\turl, window, len, buf, file);\n}\n\nNPError\nNPN_PostURLNotify(NPP instance, const char* url, const char* window,\n\t     uint32 len, const char* buf, NPBool file, void* notifyData)\n{\n\tint navMinorVers = browser->version & 0xFF;\n\tif (navMinorVers < NPVERS_HAS_NOTIFICATION)\n\t  return NPERR_INCOMPATIBLE_VERSION_ERROR;\n\treturn browser->posturlnotify (instance,\n\t\t\t\t\t url, window, len, buf, file, notifyData);\n}\n\nint checkForModifierKeys(SqueakPlugin *plugin) {\n\tenum {\n\t\t\t/* modifier keys */\n\t\tkVirtualCapsLockKey = 0x039,\n\t\tkVirtualShiftKey = 0x038,\n\t\tkVirtualControlKey = 0x03B,\n\t\tkVirtualOptionKey = 0x03A,\n\t\tkVirtualRShiftKey = 0x03C,\n\t\tkVirtualRControlKey = 0x03E,\n\t\tkVirtualROptionKey = 0x03D,\n\t\tkVirtualCommandKey = 0x037\n\t};\n\tKeyMap theKeys;\n\tunsigned char *keybytes;\n\tint result;\n\t\n\tGetKeys(theKeys);\n\tkeybytes = (unsigned char *) theKeys;\n\tresult  = plugin->buttonIsDown ?  0 : btnState ;\n\tresult += ((keybytes[kVirtualCapsLockKey>>3] & (1 << (kVirtualCapsLockKey&7))) != 0) ? alphaLock : 0;\n\tresult += ((keybytes[kVirtualShiftKey>>3] & (1 << (kVirtualShiftKey&7))) != 0)       ? shiftKey : 0;\n\tresult += ((keybytes[kVirtualControlKey>>3] & (1 << (kVirtualControlKey&7))) != 0)   ? controlKey : 0;\n\tresult += ((keybytes[kVirtualOptionKey>>3] & (1 << (kVirtualOptionKey&7))) != 0)     ? optionKey : 0;\n\tresult += ((keybytes[kVirtualRShiftKey>>3] & (1 << (kVirtualRShiftKey&7))) != 0)       ? shiftKey : 0;\n\tresult += ((keybytes[kVirtualRControlKey>>3] & (1 << (kVirtualRControlKey&7))) != 0)   ? controlKey : 0;\n\tresult += ((keybytes[kVirtualROptionKey>>3] & (1 << (kVirtualROptionKey&7))) != 0)     ? optionKey : 0;\n\tresult += ((keybytes[kVirtualCommandKey>>3] & (1 << (kVirtualCommandKey&7))) != 0)   ? cmdKey : 0;\n\t\n\treturn result;\n}\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/npsqueak/npunix.c",
    "content": "/*\n * npunix.c\n *\n * Netscape Client Plugin API\n * - Wrapper function to interface with the Netscape Navigator\n *\n * dp Suresh <dp@netscape.com>\n *\n *----------------------------------------------------------------------\n * PLUGIN DEVELOPERS:\n *\tYOU WILL NOT NEED TO EDIT THIS FILE.\n *----------------------------------------------------------------------\n *\n * At the official Netscape site there's only the PluginSDK30b5 for unix:\n * \n * !!! I had to add the missing URLNotify stuff here. If you find an official \n * !!! version of this file which has it, use it instead. \n * !!!        April 2000, Bert Freudenberg\n *\n */\n\n#define XP_MAC\n\n#include <stdio.h>\n#include \"npapi.h\"\n#include \"npupp.h\"\n\n/*\n * Define PLUGIN_TRACE to have the wrapper functions print\n * messages to stderr whenever they are called.\n */\n\n#ifdef PLUGIN_TRACE\n#include <stdio.h>\n#define PLUGINDEBUGSTR(msg)\tfprintf(stderr, \"%s\\n\", msg)\n#else\n#define PLUGINDEBUGSTR(msg)\n#endif\n\n\n/***********************************************************************\n *\n * Globals\n *\n ***********************************************************************/\n\nstatic NPNetscapeFuncs   gNetscapeFuncs;\t/* Netscape Function table */\n\n\n/***********************************************************************\n *\n * Wrapper functions : plugin calling Netscape Navigator\n *\n * These functions let the plugin developer just call the APIs\n * as documented and defined in npapi.h, without needing to know\n * about the function table and call macros in npupp.h.\n *\n ***********************************************************************/\n\nvoid\nNPN_Version(int* plugin_major, int* plugin_minor,\n\t     int* netscape_major, int* netscape_minor)\n{\n\t*plugin_major = NP_VERSION_MAJOR;\n\t*plugin_minor = NP_VERSION_MINOR;\n\n\t/* Major version is in high byte */\n\t*netscape_major = gNetscapeFuncs.version >> 8;\n\t/* Minor version is in low byte */\n\t*netscape_minor = gNetscapeFuncs.version & 0xFF;\n}\n\n/*NPError\nNPN_GetValue(NPP instance, NPNVariable variable, void *r_value)\n{\n\treturn CallNPN_GetValueProc(gNetscapeFuncs.getvalue,\n\t\t\t\t\tinstance, variable, r_value);\n}*/\n\nNPError\nNPN_GetURL(NPP instance, const char* url, const char* window)\n{\n\treturn CallNPN_GetURLProc(gNetscapeFuncs.geturl, instance, url, window);\n}\n\nNPError\nNPN_GetURLNotify(NPP instance, const char* url, const char* window, void* notifyData)\n{\n\tint navMinorVers = gNetscapeFuncs.version & 0xFF;\n\tif (navMinorVers < NPVERS_HAS_NOTIFICATION)\n\t  return NPERR_INCOMPATIBLE_VERSION_ERROR;\n\treturn CallNPN_GetURLNotifyProc(gNetscapeFuncs.geturlnotify, instance, url, window, notifyData);\n}\n\nNPError\nNPN_PostURL(NPP instance, const char* url, const char* window,\n\t     uint32 len, const char* buf, NPBool file)\n{\n\treturn CallNPN_PostURLProc(gNetscapeFuncs.posturl, instance,\n\t\t\t\t\turl, window, len, buf, file);\n}\n\nNPError\nNPN_PostURLNotify(NPP instance, const char* url, const char* window,\n\t     uint32 len, const char* buf, NPBool file, void* notifyData)\n{\n\tint navMinorVers = gNetscapeFuncs.version & 0xFF;\n\tif (navMinorVers < NPVERS_HAS_NOTIFICATION)\n\t  return NPERR_INCOMPATIBLE_VERSION_ERROR;\n\treturn CallNPN_PostURLNotifyProc(gNetscapeFuncs.posturlnotify, instance,\n\t\t\t\t\t url, window, len, buf, file, notifyData);\n}\n\nNPError\nNPN_RequestRead(NPStream* stream, NPByteRange* rangeList)\n{\n\treturn CallNPN_RequestReadProc(gNetscapeFuncs.requestread,\n\t\t\t\t\tstream, rangeList);\n}\n\nNPError\nNPN_NewStream(NPP instance, NPMIMEType type, const char *window,\n\t      NPStream** stream_ptr)\n{\n\treturn CallNPN_NewStreamProc(gNetscapeFuncs.newstream, instance,\n\t\t\t\t\ttype, window, stream_ptr);\n}\n\nint32\nNPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer)\n{\n\treturn CallNPN_WriteProc(gNetscapeFuncs.write, instance,\n\t\t\t\t\tstream, len, buffer);\n}\n\nNPError\nNPN_DestroyStream(NPP instance, NPStream* stream, NPError reason)\n{\n\treturn CallNPN_DestroyStreamProc(gNetscapeFuncs.destroystream,\n\t\t\t\t\t\tinstance, stream, reason);\n}\n\nvoid\nNPN_Status(NPP instance, const char* message)\n{\n\tCallNPN_StatusProc(gNetscapeFuncs.status, instance, message);\n}\n\nconst char*\nNPN_UserAgent(NPP instance)\n{\n\treturn CallNPN_UserAgentProc(gNetscapeFuncs.uagent, instance);\n}\n\nvoid*\nNPN_MemAlloc(uint32 size)\n{\n\treturn CallNPN_MemAllocProc(gNetscapeFuncs.memalloc, size);\n}\n\nvoid NPN_MemFree(void* ptr)\n{\n\tCallNPN_MemFreeProc(gNetscapeFuncs.memfree, ptr);\n}\n\nuint32 NPN_MemFlush(uint32 size)\n{\n\treturn CallNPN_MemFlushProc(gNetscapeFuncs.memflush, size);\n}\n\nvoid NPN_ReloadPlugins(NPBool reloadPages)\n{\n\tCallNPN_ReloadPluginsProc(gNetscapeFuncs.reloadplugins, reloadPages);\n}\n\nJRIEnv* NPN_GetJavaEnv()\n{\n\treturn CallNPN_GetJavaEnvProc(gNetscapeFuncs.getJavaEnv);\n}\n\njref NPN_GetJavaPeer(NPP instance)\n{\n\treturn CallNPN_GetJavaPeerProc(gNetscapeFuncs.getJavaPeer,\n\t\t\t\t       instance);\n}\n\n\n/***********************************************************************\n *\n * Wrapper functions : Netscape Navigator -> plugin\n *\n * These functions let the plugin developer just create the APIs\n * as documented and defined in npapi.h, without needing to \n * install those functions in the function table or worry about\n * setting up globals for 68K plugins.\n *\n ***********************************************************************/\n\nNPError\nPrivate_New(NPMIMEType pluginType, NPP instance, uint16 mode,\n\t\tint16 argc, char* argn[], char* argv[], NPSavedData* saved)\n{\n\tNPError ret;\n\tPLUGINDEBUGSTR(\"New\");\n\tret = NPP_New(pluginType, instance, mode, argc, argn, argv, saved);\n\treturn ret;\t\n}\n\nNPError\nPrivate_Destroy(NPP instance, NPSavedData** save)\n{\n\tPLUGINDEBUGSTR(\"Destroy\");\n\treturn NPP_Destroy(instance, save);\n}\n\nNPError\nPrivate_SetWindow(NPP instance, NPWindow* window)\n{\n\tNPError err;\n\tPLUGINDEBUGSTR(\"SetWindow\");\n\terr = NPP_SetWindow(instance, window);\n\treturn err;\n}\n\nNPError\nPrivate_NewStream(NPP instance, NPMIMEType type, NPStream* stream,\n\t\t\tNPBool seekable, uint16* stype)\n{\n\tNPError err;\n\tPLUGINDEBUGSTR(\"NewStream\");\n\terr = NPP_NewStream(instance, type, stream, seekable, stype);\n\treturn err;\n}\n\nint32\nPrivate_WriteReady(NPP instance, NPStream* stream)\n{\n\tunsigned int result;\n\tPLUGINDEBUGSTR(\"WriteReady\");\n\tresult = NPP_WriteReady(instance, stream);\n\treturn result;\n}\n\nint32\nPrivate_Write(NPP instance, NPStream* stream, int32 offset, int32 len,\n\t\tvoid* buffer)\n{\n\tunsigned int result;\n\tPLUGINDEBUGSTR(\"Write\");\n\tresult = NPP_Write(instance, stream, offset, len, buffer);\n\treturn result;\n}\n\nvoid\nPrivate_StreamAsFile(NPP instance, NPStream* stream, const char* fname)\n{\n\tPLUGINDEBUGSTR(\"StreamAsFile\");\n\tNPP_StreamAsFile(instance, stream, fname);\n}\n\n\nvoid\nPrivate_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData)\n{\n\tPLUGINDEBUGSTR(\"URLNotify\");\n\tNPP_URLNotify(instance, url, reason, notifyData);\n}\n\nNPError\nPrivate_DestroyStream(NPP instance, NPStream* stream, NPError reason)\n{\n\tNPError err;\n\tPLUGINDEBUGSTR(\"DestroyStream\");\n\terr = NPP_DestroyStream(instance, stream, reason);\n\treturn err;\n}\n\n\nvoid\nPrivate_Print(NPP instance, NPPrint* platformPrint)\n{\n\tPLUGINDEBUGSTR(\"Print\");\n\tNPP_Print(instance, platformPrint);\n}\n\nJRIGlobalRef\nPrivate_GetJavaClass(void)\n{\n    jref clazz = NPP_GetJavaClass();\n    if (clazz) {\n\tJRIEnv* env = NPN_GetJavaEnv();\n\treturn JRI_NewGlobalRef(env, clazz);\n    }\n    return NULL;\n}\n\n/*********************************************************************** \n *\n * These functions are located automagically by netscape.\n *\n ***********************************************************************/\n\n/*\n * NP_GetMIMEDescription\n *\t- Netscape needs to know about this symbol\n *\t- Netscape uses the return value to identify when an object instance\n *\t  of this plugin should be created.\n */\nchar *\nNP_GetMIMEDescription(void)\n{\n\treturn NPP_GetMIMEDescription();\n}\n\n/*\n * NP_Initialize\n *\t- Netscape needs to know about this symbol.\n *\t- It calls this function after looking up its symbol before it\n *\t  is about to create the first ever object of this kind.\n *\n * PARAMETERS\n *    nsTable\t- The netscape function table. If developers just use these\n *\t\t  wrappers, they dont need to worry about all these function\n *\t\t  tables.\n * RETURN\n *    pluginFuncs\n *\t\t- This functions needs to fill the plugin function table\n *\t\t  pluginFuncs and return it. Netscape Navigator plugin\n *\t\t  library will use this function table to call the plugin.\n *\n */\nNPError\nNP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs)\n{\n\tNPError err = NPERR_NO_ERROR;\n\n\tPLUGINDEBUGSTR(\"NP_Initialize\");\n\t\n\t/* validate input parameters */\n\n\tif ((nsTable == NULL) || (pluginFuncs == NULL))\n\t\terr = NPERR_INVALID_FUNCTABLE_ERROR;\n\t\n\t/*\n\t * Check the major version passed in Netscape's function table.\n\t * We won't load if the major version is newer than what we expect.\n\t * Also check that the function tables passed in are big enough for\n\t * all the functions we need (they could be bigger, if Netscape added\n\t * new APIs, but that's OK with us -- we'll just ignore them).\n\t *\n\t */\n\n\tif (err == NPERR_NO_ERROR) {\n\t\tif ((nsTable->version >> 8) > NP_VERSION_MAJOR)\n\t\t\terr = NPERR_INCOMPATIBLE_VERSION_ERROR;\n\t\tif (nsTable->size < sizeof(NPNetscapeFuncs))\n\t\t\terr = NPERR_INVALID_FUNCTABLE_ERROR;\n\t\tif (pluginFuncs->size < sizeof(NPPluginFuncs))\t\t\n\t\t\terr = NPERR_INVALID_FUNCTABLE_ERROR;\n\t}\n\t\t\n\t\n\tif (err == NPERR_NO_ERROR) {\n\t\t/*\n\t\t * Copy all the fields of Netscape function table into our\n\t\t * copy so we can call back into Netscape later.  Note that\n\t\t * we need to copy the fields one by one, rather than assigning\n\t\t * the whole structure, because the Netscape function table\n\t\t * could actually be bigger than what we expect.\n\t\t */\n\t\tgNetscapeFuncs.version       = nsTable->version;\n\t\tgNetscapeFuncs.size          = nsTable->size;\n\t\tgNetscapeFuncs.posturl       = nsTable->posturl;\n\t\tgNetscapeFuncs.geturl        = nsTable->geturl;\n\t\tgNetscapeFuncs.requestread   = nsTable->requestread;\n\t\tgNetscapeFuncs.newstream     = nsTable->newstream;\n\t\tgNetscapeFuncs.write         = nsTable->write;\n\t\tgNetscapeFuncs.destroystream = nsTable->destroystream;\n\t\tgNetscapeFuncs.status        = nsTable->status;\n\t\tgNetscapeFuncs.uagent        = nsTable->uagent;\n\t\tgNetscapeFuncs.memalloc      = nsTable->memalloc;\n\t\tgNetscapeFuncs.memfree       = nsTable->memfree;\n\t\tgNetscapeFuncs.memflush      = nsTable->memflush;\n\t\tgNetscapeFuncs.reloadplugins = nsTable->reloadplugins;\n\t\tgNetscapeFuncs.getJavaEnv    = nsTable->getJavaEnv;\n\t\tgNetscapeFuncs.getJavaPeer   = nsTable->getJavaPeer;\n//JMM\t\tgNetscapeFuncs.getvalue      = nsTable->getvalue;\n\n\t\tif ((nsTable->version & 0xFF) >= NPVERS_HAS_NOTIFICATION) {\n\t\t  gNetscapeFuncs.posturlnotify = nsTable->posturlnotify;\n\t\t  gNetscapeFuncs.geturlnotify  = nsTable->geturlnotify;\n\t\t}\n\n\t\t/*\n\t\t * Set up the plugin function table that Netscape will use to\n\t\t * call us.  Netscape needs to know about our version and size\n\t\t * and have a UniversalProcPointer for every function we\n\t\t * implement.\n\t\t */\n\t\tpluginFuncs->version    = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR;\n\t\tpluginFuncs->size       = sizeof(NPPluginFuncs);\n\t\tpluginFuncs->newp       = NewNPP_NewProc(Private_New);\n\t\tpluginFuncs->destroy    = NewNPP_DestroyProc(Private_Destroy);\n\t\tpluginFuncs->setwindow  = NewNPP_SetWindowProc(Private_SetWindow);\n\t\tpluginFuncs->newstream  = NewNPP_NewStreamProc(Private_NewStream);\n\t\tpluginFuncs->destroystream = NewNPP_DestroyStreamProc(Private_DestroyStream);\n\t\tpluginFuncs->asfile     = NewNPP_StreamAsFileProc(Private_StreamAsFile);\n\t\tpluginFuncs->urlnotify  = NewNPP_URLNotifyProc(Private_URLNotify);\n\t\tpluginFuncs->writeready = NewNPP_WriteReadyProc(Private_WriteReady);\n\t\tpluginFuncs->write      = NewNPP_WriteProc(Private_Write);\n\t\tpluginFuncs->print      = NewNPP_PrintProc(Private_Print);\n\t\tpluginFuncs->event      = NULL;\n \t\tpluginFuncs->javaClass\t= Private_GetJavaClass();\n\n\t\terr = NPP_Initialize();\n\t}\n\t\n\treturn err;\n}\n\n/*\n * NP_Shutdown [optional]\n *\t- Netscape needs to know about this symbol.\n *\t- It calls this function after looking up its symbol after\n *\t  the last object of this kind has been destroyed.\n *\n */\nNPError\nNP_Shutdown(void)\n{\n \tPLUGINDEBUGSTR(\"NP_Shutdown\");\n\tNPP_Shutdown();\n\treturn NPERR_NO_ERROR;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/nsPoolManagement.h",
    "content": "\n//  nsPoolManagement.h\n//  CoreVM\n//\n//  Created by Brad Fowlow on 10/15/09.\n//  Copyright 2009 Teleplace, Inc. All rights reserved.\n\n// Main autorelese-pool drain/reset.\n// To be called regularly,\n// *between* interpretation steps that might involve prim or FFI calls.\n\nvoid sqCycleMainAutoreleasePool (void);\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/nsPoolManagement.m",
    "content": "\n//  nsPoolManagement.m\n//  CoreVM\n//\n//  Created by Brad Fowlow on 10/15/09.\n//  Copyright 2009 Teleplace, Inc. All rights reserved.\n\n#import \"interp.h\"\n#import \"sqMemoryAccess.h\" /* for sqInt ?!?!? */\n\n#import \"nsPoolManagement.h\"\n#import <Cocoa/Cocoa.h>\n\nextern sqInt inIOProcessEvents;\n\n#if COGMTVM\nstatic pthread_key_t nsPoolIndex = 0;\n\n// We have one autorelease pool per thread.\n// It is cycled for autorelease in ioProcessEevents to allow objective-c memory\n// recovery in all the normally-threaded plugin activity.\n\nvoid\nsqCycleMainAutoreleasePool (void) \n{\n\tNSAutoreleasePool *nsPool;\n\n\t/* Only safe to drain the pool at the outermost level. */\n\tif (inIOProcessEvents > 1) {\n\t\tassert(nsPoolIndex);\n\t\tassert(pthread_getspecific(nsPoolIndex));\n\t\treturn;\n\t}\n\tif (!nsPoolIndex) {\n\t\tint err = pthread_key_create(&nsPoolIndex,0);\n\t\tif (err)\n\t\t\terror(\"pthread_key_create\");\n\t}\n\tif ((nsPool = (NSAutoreleasePool *)pthread_getspecific(nsPoolIndex)))\n\t\t[ nsPool drain ];\n\tnsPool = [[NSAutoreleasePool alloc] init];\n\tpthread_setspecific(nsPoolIndex,nsPool);\n}\n#else /* COGMTVM */\nstatic NSAutoreleasePool * gNSPool = nil;\n\n// We have one autorelease pool to rule them all.\n// It is cycled for autorelease in the main-thread ioProcessEvents of the VM,\n// to allow objective-c recovery in all the normally-threaded plugin activity.\n\nvoid\nsqCycleMainAutoreleasePool (void) \n{\n\t/* Only safe to drain the pool at the outermost level. */\n\tif (inIOProcessEvents > 1) {\n\t\tassert(gNSPool);\n\t\treturn;\n\t}\n\tif (gNSPool)\n\t\t[ gNSPool drain ];\n\tgNSPool = [[NSAutoreleasePool alloc] init];\n}\n#endif /* COGMTVM */\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/osExports.c",
    "content": "/* note: this file is only a backward compatible wrapper\n\n   for the old-style \"platform.exports\" definitions.\n\n   If your platform has migrated to the new exports\n\n   style you may as well insert the exports right here */\n\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#include <stdio.h>\n#include \"sqMacUIEvents.h\"\n#include \"SerialPlugin.h\"\n\n/* duh ... this is ugly */\n\n#define XFN(export) {\"\", #export, (void*)export},\n\n#define XFN2(plugin, export) {#plugin, #export, (void*)plugin##_##export}\n\nWindowPtr getSTWindow(void);\nvoid setMessageHook(eventMessageHook theHook);\nvoid setPostMessageHook(eventMessageHook theHook);\nchar * GetAttributeString(int id);\nint serialPortSetControl(int portNum,int control, char *data);\nint serialPortIsOpen(int portNum);\nint serialPortNames(int portNum, char *portName, char *inName, char *outName);\nBoolean IsKeyDown(void);\nint primitivePluginBrowserReady(void);\n#ifdef ENABLE_URL_FETCH\nint primitivePluginDestroyRequest(void);\nint primitivePluginRequestFileHandle(void);\nint primitivePluginRequestState(void);\nint primitivePluginRequestURL(void);\nint primitivePluginRequestURLStream(void);\nint primitivePluginPostURL(void);\n#endif\n\nvoid *os_exports[][3] = {\n\n\tXFN(getSTWindow)\n\tXFN(setMessageHook)\n\tXFN(setPostMessageHook)\n\tXFN(GetAttributeString)\n\tXFN(recordDragDropEvent)\n\tXFN(serialPortSetControl)\n\tXFN(serialPortIsOpen)\n\tXFN(serialPortClose)\n\tXFN(serialPortCount)\n\tXFN(serialPortNames)\n\tXFN(serialPortOpen)\n\tXFN(serialPortReadInto)\n\tXFN(serialPortWriteFrom)\n\tXFN(IsKeyDown)\n\tXFN(getUIToLock)\n/* Plugin support primitives\n   We should make these primitives a proper plugin\n   but right now we just need the exports. */\nXFN(primitivePluginBrowserReady)\n#ifdef ENABLE_URL_FETCH\nXFN(primitivePluginRequestURLStream)\nXFN(primitivePluginRequestURL)\nXFN(primitivePluginPostURL)\nXFN(primitivePluginRequestFileHandle)\nXFN(primitivePluginDestroyRequest)\nXFN(primitivePluginRequestState)\n#endif\n\t{NULL, NULL, NULL}\n\n};\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/specialChangeSets/ArraysToGlobalStruct-JMM.1.cs",
    "content": "'From Squeak3.6beta of ''4 July 2003'' [latest update: #5373] on 8 August 2003 at 7:48:15 pm'!\r\r!CCodeGeneratorGlobalStructure methodsFor: 'C code generator' stamp: 'JMM 8/8/2003 19:08'!\rplaceInStructure: var\r\t\"See if we should put this array into a structure\r\tThis has hard coded vars, should go somewhere else!!\r\tThe variables listed are hardcoded as C in the interpreter thus they don't get resolved via TVariableNode logic\r\tAlso Lets ignore variables that have special definitions that require initialization, \r\tand the function def which has problems\"\r\r\t| check |\r\tcheck _ variableDeclarations at: var ifAbsent: [''].\r\t(check includes: $=) ifTrue: [^false].\r\t(check includes: $() ifTrue: [^false].\r\t(#( 'showSurfaceFn' 'memory' 'extraVMMemory' 'interpreterProxy') includes: var) ifTrue: [^false].\r\t^true.\r\t! !\r\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/specialChangeSets/Gnuifier.6.cs",
    "content": "'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 5 June 2005 at 2:45:12 pm'!\r\"Change Set:\t\tGnuifier\rDate:\t\t\t1 January 2002\rAuthor:\t\t\tacg\rSome code to automate building a VM under GCC.  To run, fileIn and execute:\r\t(Gnuifier on: aFileDirectory) gnuify\rFor example, try something like the following: \r\t(Gnuifier on: \r\t\t((FileDirectory default \r\t\t\tdirectoryNamed: 'src') \r\t\t\t\tdirectoryNamed: 'vm') pathName) gnuify\r\"!\r\rObject subclass: #Gnuifier\r\tinstanceVariableNames: 'directory'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'VMConstruction-Building'!\r\r!Gnuifier commentStamp: '<historical>' prior: 0!\rMy 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.\r\rTo gnuify an interpreter, try something like one of the following:\r\r\t(Gnuifier on: \r\t\t((FileDirectory default \r\t\t\tdirectoryNamed: 'src') \r\t\t\t\tdirectoryNamed: 'vm') pathName) gnuify\r\r\t(Gnuifier on: \r\t\t'powercow X:Users:werdna:Desktop:squeak:Squeak3.2a-4599 Folder:src:vm') gnuify\r\r\rStructure:\r directory\t\tFileDirectory -- specifying where I should do my gnuification\r\rI can attempt to undo my damage with #deGnuify.!\r\r\r!Gnuifier methodsFor: 'as yet unclassified' stamp: 'acg 12/30/2001 14:16'!\rcopyFrom: inFileStream to: outFileStream\r\r\"convert interp.c to use GNU features\"\r\r|  inData |\r\r\tCursor read showWhile:\r\t\t[inData := inFileStream upToEnd withSqueakLineEndings].\r\tCursor write showWhile:\r\t\t[outFileStream nextPutAll: inData].\r\toutFileStream close! !\r\r!Gnuifier methodsFor: 'as yet unclassified' stamp: 'acg 1/1/2002 10:10'!\rdeGnuify\r\r\t(directory fileExists: 'interp.c.old')\r\t\tifFalse: [^Error signal: 'Cannot deGnuify.  The old \"interp.c\" was not found.'].\r\r\t(directory fileExists: 'interp.c')\r\t\tifTrue: [directory deleteFileNamed: 'interp.c'].\r\r\tself\t\r\t\tcopyFrom: \t(directory oldFileNamed: 'interp.c.old')\r\t\tto:\t\t\t(directory newFileNamed: 'interp.c').\r\r\t(directory fileExists: 'sqGnu.h')\r\t\tifTrue: [directory deleteFileNamed: 'sqGnu.h'].\r\t\r\tdirectory deleteFileNamed: 'interp.c.old'! !\r\r!Gnuifier methodsFor: 'as yet unclassified' stamp: 'JMM 8/6/2002 13:52'!\rgnuify\r\r\t(directory fileExists: 'interp.c.old') ifTrue:\r\t\t[(PopUpMenu \r\t\t\tconfirm: 'Interpreter probably guified (interp.c.old exists).\rDo you want to gnuify anyway?') ifFalse: [^nil].\r\t\tdirectory deleteFileNamed: 'interp.c.old'].\r\t\t\r\tself\r\t\tcopyFrom: \t(directory oldFileNamed: 'interp.c')\r\t\tto: \t\t\t(directory newFileNamed: 'interp.c.old').\r\r\tdirectory deleteFileNamed: 'interp.c'.\r\tself\r\t\tgnuifyFrom:(directory oldFileNamed: 'interp.c.old')\r\t\tto: \t\t\t(directory newFileNamed: 'interp.c').\r\t\r! !\r\r!Gnuifier methodsFor: 'as yet unclassified' stamp: 'JMM 6/5/2005 14:42'!\rgnuifyFrom: inFileStream to: outFileStream\r\r\"convert interp.c to use GNU features\"\r\r|  inData beforeInterpret inInterpret inInterpretVars beforePrimitiveResponse inPrimitiveResponse |\r\r\tCursor read showWhile:\r\t\t[inData := inFileStream upToEnd withSqueakLineEndings.\r\t\t inFileStream close].\r\r\tCursor write showWhile:\r\t\t[\"print a header\"\r\t\toutFileStream\r\t\t\tnextPutAll: '/* This file has been post-processed for GNU C */';\r\t\t\tcr; cr; cr.\r\r\t\tbeforeInterpret := true.    \"whether we are before the beginning of interpret()\"\r\t\tinInterpret := false.     \"whether we are in the middle of interpret\"\r\t\tinInterpretVars := false.    \"whether we are in the variables of interpret\"\r\t\tbeforePrimitiveResponse := true.  \"whether we are before the beginning of primitiveResponse()\"\r\t\tinPrimitiveResponse := false.   \"whether we are inside of primitiveResponse\"\r\t\tinData linesDo: [ :inLine |\r\t\t\t| outLine extraOutLine |\r\t\t\toutLine := inLine. \t\"print out one line for each input line; by default, print out the line that was input, but some rules modify it\"\r\t\t\textraOutLine := nil.   \"occasionally print a second output line...\"\r\t\t\tbeforeInterpret ifTrue: [\r\t\t\t\t(inLine = '#include \"sq.h\"') ifTrue: [\r\t\t\t\t\toutLine := '#include \"sqGnu.h\"'. ].\r\t\t\t\t(inLine = 'sqInt interpret(void) {') ifTrue: [\r\t\t\t\t\t\"reached the beginning of interpret\"\r\t\t\t\t\tbeforeInterpret := false.\r\t\t\t\t\tinInterpret := true.\r\t\t\t\t\tinInterpretVars := true. ] ]\r\t\t\tifFalse: [\r\t\t\tinInterpretVars ifTrue: [\r\t\t\t\t(inLine findString: 'register struct foo * foo = &fum;') > 0 ifTrue: [\r\t\t\t\toutLine := '#ifdef FOO_REG\r    register struct foo * foo FOO_REG = &fum;\r#endif' ].\r\t\t\t\t(inLine findString: ' localIP;') > 0 ifTrue: [\r\t\t\t\t\toutLine := '    register char* localIP IP_REG;' ].\r\t\t\t\t(inLine findString: ' localSP;') > 0 ifTrue: [\r\t\t\t\t\toutLine := '    register char* localSP SP_REG;'. ].\r\t\t\t\t(inLine findString: ' currentBytecode;') > 0 ifTrue: [\r\t\t\t\t\toutLine := '    register sqInt currentBytecode CB_REG;' ].\r\t\t\t\tinLine isEmpty ifTrue: [\r\t\t\t\t\t\"reached end of variables\"\r\t\t\t\t\tinInterpretVars := false.\r\t\t\t\t\toutLine := '    JUMP_TABLE;'. ] ]\r\t\t\tifFalse: [\r\t\t\tinInterpret ifTrue: [\r\t\t\t\t\"working inside interpret(); translate the switch statement\"\r\t\t\t\t(inLine beginsWith: '\t\tcase ') ifTrue: [\r\t\t\t\t\t| caseLabel |\r\t\t\t\t\tcaseLabel := (inLine findTokens: '\t :') second.\r\t\t\t\t\toutLine := '\t\tCASE(', caseLabel, ')' ].\r\t\t\t\tinLine = '\t\t\tbreak;' ifTrue: [\r\t\t\t\t\toutLine := '\t\t\tBREAK;' ].\r\t\t\t\tinLine = '}' ifTrue: [\r\t\t\t\t\t\"all finished with interpret()\"\r\t\t\t\t\tinInterpret := false. ] ]\r\t\t\tifFalse: [\r\t\t\tbeforePrimitiveResponse ifTrue: [\r\t\t\t\t(inLine beginsWith: 'sqInt primitiveResponse(') ifTrue: [\r\t\t\t\t\t\"into primitiveResponse we go\"\r\t\t\t\t\tbeforePrimitiveResponse := false.\r\t\t\t\t\tinPrimitiveResponse := true.\r\t\t\t\t\textraOutLine := '    PRIM_TABLE;'.  ] ]\r\t\t\tifFalse: [\r\t\t\tinPrimitiveResponse ifTrue: [\r\t\t\t\t(inLine = '\tswitch (primitiveIndex) {') ifTrue: [\r\t\t\t\t\textraOutLine := outLine.\r\t\t\t\t\toutLine := '\tPRIM_DISPATCH;' ].\r\t\t\t\t(inLine = '\tswitch (foo->primitiveIndex) {') ifTrue: [\r\t\t\t\t\textraOutLine := outLine.\r\t\t\t\t\toutLine := '\tPRIM_DISPATCH;' ].\r\t\t\t\t(inLine beginsWith: '\tcase ') ifTrue: [\r\t\t\t\t\t| caseLabel |\r\t\t\t\t\tcaseLabel := (inLine findTokens: '\t :') second.\r\t\t\t\t\toutLine := '\tCASE(', caseLabel, ')' ].\r\t\t\t\tinLine = '}' ifTrue: [\r\t\t\t\t\tinPrimitiveResponse := false ] ].\r\t\t\t] ] ] ].\r\r\t\t\toutFileStream nextPutAll: outLine; cr.\r\t\t\textraOutLine ifNotNil: [\r\t\t\t\toutFileStream nextPutAll: extraOutLine; cr ]]].\r\r\t\toutFileStream close! !\r\r!Gnuifier methodsFor: 'as yet unclassified' stamp: 'acg 12/30/2001 14:12'!\rsetDirectory: aFileDirectory\r\r\tdirectory := aFileDirectory! !\r\r\r!Gnuifier class methodsFor: 'as yet unclassified' stamp: 'acg 12/30/2001 14:13'!\ron: aFilePathString\r\r\t^self new setDirectory: (FileDirectory on: aFilePathString)! !\r\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/specialChangeSets/Gnuifier.st",
    "content": "'From Squeak3.10beta of 22 July 2007 [latest update: #7159] on 14 April 2009 at 11:04:01 pm'!\rObject subclass: #Gnuifier\r\tinstanceVariableNames: 'directory'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'VMConstruction-Building'!\r!Gnuifier commentStamp: '<historical>' prior: 0!\rMy 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.\r\rTo gnuify an interpreter, try something like one of the following:\r\r\t(Gnuifier on: \r\t\t((FileDirectory default \r\t\t\tdirectoryNamed: 'src') \r\t\t\t\tdirectoryNamed: 'vm') pathName) gnuify\r\r\t(Gnuifier on: \r\t\t'powercow X:Users:werdna:Desktop:squeak:Squeak3.2a-4599 Folder:src:vm') gnuify\r\r\rStructure:\r directory\t\tFileDirectory -- specifying where I should do my gnuification\r\rI can attempt to undo my damage with #deGnuify.!\r\r\r!Gnuifier methodsFor: 'as yet unclassified' stamp: 'acg 12/30/2001 14:16'!\rcopyFrom: inFileStream to: outFileStream\r\r\"convert interp.c to use GNU features\"\r\r|  inData |\r\r\tCursor read showWhile:\r\t\t[inData := inFileStream upToEnd withSqueakLineEndings].\r\tCursor write showWhile:\r\t\t[outFileStream nextPutAll: inData].\r\toutFileStream close! !\r\r!Gnuifier methodsFor: 'as yet unclassified' stamp: 'acg 1/1/2002 10:10'!\rdeGnuify\r\r\t(directory fileExists: 'interp.c.old')\r\t\tifFalse: [^Error signal: 'Cannot deGnuify.  The old \"interp.c\" was not found.'].\r\r\t(directory fileExists: 'interp.c')\r\t\tifTrue: [directory deleteFileNamed: 'interp.c'].\r\r\tself\t\r\t\tcopyFrom: \t(directory oldFileNamed: 'interp.c.old')\r\t\tto:\t\t\t(directory newFileNamed: 'interp.c').\r\r\t(directory fileExists: 'sqGnu.h')\r\t\tifTrue: [directory deleteFileNamed: 'sqGnu.h'].\r\t\r\tdirectory deleteFileNamed: 'interp.c.old'! !\r\r!Gnuifier methodsFor: 'as yet unclassified' stamp: 'JMM 8/6/2002 13:52'!\rgnuify\r\r\t(directory fileExists: 'interp.c.old') ifTrue:\r\t\t[(PopUpMenu \r\t\t\tconfirm: 'Interpreter probably guified (interp.c.old exists).\rDo you want to gnuify anyway?') ifFalse: [^nil].\r\t\tdirectory deleteFileNamed: 'interp.c.old'].\r\t\t\r\tself\r\t\tcopyFrom: \t(directory oldFileNamed: 'interp.c')\r\t\tto: \t\t\t(directory newFileNamed: 'interp.c.old').\r\r\tdirectory deleteFileNamed: 'interp.c'.\r\tself\r\t\tgnuifyFrom:(directory oldFileNamed: 'interp.c.old')\r\t\tto: \t\t\t(directory newFileNamed: 'interp.c').\r\t\r! !\r\r!Gnuifier methodsFor: 'as yet unclassified' stamp: 'JMM 11/4/2008 15:03'!\rgnuifyFrom: inFileStream to: outFileStream\r\r\"convert interp.c to use GNU features\"\r\r|  inData beforeInterpret inInterpret inInterpretVars beforePrimitiveResponse inPrimitiveResponse |\r\r\tCursor read showWhile:\r\t\t[inData := inFileStream upToEnd withSqueakLineEndings.\r\t\t inFileStream close].\r\r\tCursor write showWhile:\r\t\t[\"print a header\"\r\t\toutFileStream\r\t\t\tnextPutAll: '/* This file has been post-processed for GNU C */';\r\t\t\tcr; cr; cr.\r\r\t\tbeforeInterpret := true.    \"whether we are before the beginning of interpret()\"\r\t\tinInterpret := false.     \"whether we are in the middle of interpret\"\r\t\tinInterpretVars := false.    \"whether we are in the variables of interpret\"\r\t\tbeforePrimitiveResponse := true.  \"whether we are before the beginning of primitiveResponse()\"\r\t\tinPrimitiveResponse := false.   \"whether we are inside of primitiveResponse\"\r\t\tinData linesDo: [ :inLine |\r\t\t\t| outLine extraOutLine |\r\t\t\toutLine := inLine. \t\"print out one line for each input line; by default, print out the line that was input, but some rules modify it\"\r\t\t\textraOutLine := nil.   \"occasionally print a second output line...\"\r\t\t\tbeforeInterpret ifTrue: [\r\t\t\t\t(inLine = '#include \"sq.h\"') ifTrue: [\r\t\t\t\t\toutLine := '#include \"sqGnu.h\"'. ].\r\t\t\t\t(inLine = 'sqInt interpret(void) {') ifTrue: [\r\t\t\t\t\t\"reached the beginning of interpret\"\r\t\t\t\t\tbeforeInterpret := false.\r\t\t\t\t\tinInterpret := true.\r\t\t\t\t\tinInterpretVars := true. ] ]\r\t\t\tifFalse: [\r\t\t\tinInterpretVars ifTrue: [\r\t\t\t\t(inLine findString: 'register struct foo * foo = &fum;') > 0 ifTrue: [\r\t\t\t\toutLine := '#ifdef FOO_REG\r    register struct foo * foo FOO_REG = &fum;\r#endif' ].\r\t\t\t\t(inLine findString: ' localIP;') > 0 ifTrue: [\r\t\t\t\t\toutLine := '    char* localIP;' ].\r\t\t\t\t(inLine findString: ' localSP;') > 0 ifTrue: [\r\t\t\t\t\toutLine := '    char* localSP;'. ].\r\t\t\t\t(inLine findString: ' currentBytecode;') > 0 ifTrue: [\r\t\t\t\t\toutLine := '    sqInt currentBytecode;' ].\r\t\t\t\tinLine isEmpty ifTrue: [\r\t\t\t\t\t\"reached end of variables\"\r\t\t\t\t\tinInterpretVars := false.\r\t\t\t\t\toutLine := '    JUMP_TABLE;'. ] ]\r\t\t\tifFalse: [\r\t\t\tinInterpret ifTrue: [\r\t\t\t\t\"working inside interpret(); translate the switch statement\"\r\t\t\t\t(inLine beginsWith: '\t\tcase ') ifTrue: [\r\t\t\t\t\t| caseLabel |\r\t\t\t\t\tcaseLabel := (inLine findTokens: '\t :') second.\r\t\t\t\t\toutLine := '\t\tCASE(', caseLabel, ')' ].\r\t\t\t\tinLine = '\t\t\tbreak;' ifTrue: [\r\t\t\t\t\toutLine := '\t\t\tBREAK;' ].\r\t\t\t\tinLine = '}' ifTrue: [\r\t\t\t\t\t\"all finished with interpret()\"\r\t\t\t\t\tinInterpret := false. ] ]\r\t\t\tifFalse: [\r\t\t\tbeforePrimitiveResponse ifTrue: []\r\t\t\tifFalse: [\r\t\t\tinPrimitiveResponse ifTrue: [\r\t\t\t\t(inLine = '\tswitch (primitiveIndex) {') ifTrue: [\r\t\t\t\t\textraOutLine := outLine.\r\t\t\t\t\toutLine := '\tPRIM_DISPATCH;' ].\r\t\t\t\t(inLine = '\tswitch (foo->primitiveIndex) {') ifTrue: [\r\t\t\t\t\textraOutLine := outLine.\r\t\t\t\t\toutLine := '\tPRIM_DISPATCH;' ].\r\t\t\t\t(inLine beginsWith: '\tcase ') ifTrue: [\r\t\t\t\t\t| caseLabel |\r\t\t\t\t\tcaseLabel := (inLine findTokens: '\t :') second.\r\t\t\t\t\toutLine := '\tCASE(', caseLabel, ')' ].\r\t\t\t\tinLine = '}' ifTrue: [\r\t\t\t\t\tinPrimitiveResponse := false ] ].\r\t\t\t] ] ] ].\r\r\t\t\toutFileStream nextPutAll: outLine; cr.\r\t\t\textraOutLine ifNotNil: [\r\t\t\t\toutFileStream nextPutAll: extraOutLine; cr ]]].\r\r\t\toutFileStream close! !\r\r!Gnuifier methodsFor: 'as yet unclassified' stamp: 'acg 12/30/2001 14:12'!\rsetDirectory: aFileDirectory\r\r\tdirectory _ aFileDirectory! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rGnuifier class\r\tinstanceVariableNames: ''!\r\r!Gnuifier class methodsFor: 'as yet unclassified' stamp: 'acg 12/30/2001 14:13'!\ron: aFilePathString\r\r\t^self new setDirectory: (FileDirectory on: aFilePathString)! !\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/specialChangeSets/Old/ArraysToGlobalStruct-JMM.1.cs",
    "content": "'From Squeak3.6beta of ''4 July 2003'' [latest update: #5373] on 8 August 2003 at 7:48:15 pm'!\r\r!CCodeGeneratorGlobalStructure methodsFor: 'C code generator' stamp: 'JMM 8/8/2003 19:08'!\rplaceInStructure: var\r\t\"See if we should put this array into a structure\r\tThis has hard coded vars, should go somewhere else!!\r\tThe variables listed are hardcoded as C in the interpreter thus they don't get resolved via TVariableNode logic\r\tAlso Lets ignore variables that have special definitions that require initialization, \r\tand the function def which has problems\"\r\r\t| check |\r\tcheck _ variableDeclarations at: var ifAbsent: [''].\r\t(check includes: $=) ifTrue: [^false].\r\t(check includes: $() ifTrue: [^false].\r\t(#( 'showSurfaceFn' 'memory' 'extraVMMemory' 'interpreterProxy') includes: var) ifTrue: [^false].\r\t^true.\r\t! !\r\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/specialChangeSets/Old/FasterCopyLoop-JMM.4.cs",
    "content": "'From Squeak3.5 of ''11 April 2003'' [latest update: #5180] on 29 June 2003 at 11:03:57 pm'!\n\"Change Set:\t\tFasterCopyLoop-JMM\nDate:\t\t\t29 June 2003\nAuthor:\t\t\tjohnmci@smalltalkconsulting.com\n\nMake some of the variables in the inner loop of copyLoop, copyLoopNoSource, and copyLoopPixMap locals versus instance variables to improve performance on the powerpc\"!\n\n\n!BitBltSimulation methodsFor: 'inner loop' stamp: 'JMM 6/29/2003 23:01'!\ncopyLoop\n\t\"This version of the inner loop assumes noSource = false.\"\n\t| prevWord thisWord skewWord halftoneWord mergeWord hInc y unskew skewMask notSkewMask mergeFnwith destWord skewLocal sourceIndexLocal destIndexLocal vDirLocal hDirLocal nWordsMinusOne |\n\tself inline: false.\n\tself var: #mergeFnwith declareC: 'int (*mergeFnwith)(int, int)'.\n\tmergeFnwith _ self\n\t\t\t\tcCoerce: (opTable at: combinationRule + 1)\n\t\t\t\tto: 'int (*)(int, int)'.\n\tmergeFnwith.\n\t\"null ref for compiler\"\n\thInc _ hDir * 4.\n\tskewLocal _ skew.\n\tsourceIndexLocal _ sourceIndex.\n\tdestIndexLocal _ destIndex.\n\tvDirLocal _ vDir.\n\thDirLocal _ hDir.\n\tnWordsMinusOne _ nWords - 1.\n\t\"Byte delta\"\n\t\"degenerate skew fixed for Sparc. 10/20/96 ikp\"\n\tskewLocal == -32\n\t\tifTrue: [skewLocal _ unskew _ skewMask _ 0]\n\t\tifFalse: [skewLocal < 0\n\t\t\t\tifTrue: [unskew _ skewLocal + 32.\n\t\t\t\t\tskewMask _ AllOnes << (0 - skewLocal)]\n\t\t\t\tifFalse: [skewLocal = 0\n\t\t\t\t\t\tifTrue: [unskew _ 0.\n\t\t\t\t\t\t\tskewMask _ AllOnes]\n\t\t\t\t\t\tifFalse: [unskew _ skewLocal - 32.\n\t\t\t\t\t\t\tskewMask _ AllOnes >> skewLocal]]].\n\tnotSkewMask _ skewMask bitInvert32.\n\tnoHalftone\n\t\tifTrue: [halftoneWord _ AllOnes.\n\t\t\thalftoneHeight _ 0]\n\t\tifFalse: [halftoneWord _ self halftoneAt: 0].\n\ty _ dy.\n\t1\n\t\tto: bbH\n\t\tdo: [:i | \n\t\t\t\"here is the vertical loop\"\n\t\t\thalftoneHeight > 1\n\t\t\t\tifTrue: [\"Otherwise, its always the same\"\n\t\t\t\t\thalftoneWord _ self halftoneAt: y.\n\t\t\t\t\ty _ y + vDirLocal].\n\t\t\tpreload\n\t\t\t\tifTrue: [\"load the 64-bit shifter\"\n\t\t\t\t\tprevWord _ self srcLongAt: sourceIndexLocal.\n\t\t\t\t\tsourceIndexLocal _ sourceIndexLocal + hInc]\n\t\t\t\tifFalse: [prevWord _ 0].\n\t\t\t\"Note: the horizontal loop has been expanded into three parts for \n\t\t\tspeed:\"\n\t\t\t\"This first section requires masking of the destination store...\"\n\t\t\tdestMask _ mask1.\n\t\t\tthisWord _ self srcLongAt: sourceIndexLocal.\n\t\t\t\"pick up next word\"\n\t\t\tsourceIndexLocal _ sourceIndexLocal + hInc.\n\t\t\tskewWord _ ((prevWord bitAnd: notSkewMask)\n\t\t\t\t\t\tbitShift: unskew)\n\t\t\t\t\t\tbitOr: ((thisWord bitAnd: skewMask)\n\t\t\t\t\t\t\t\tbitShift: skewLocal).\n\t\t\t\"32-bit rotate\"\n\t\t\tprevWord _ thisWord.\n\t\t\tdestWord _ self dstLongAt: destIndexLocal.\n\t\t\tmergeWord _ self\n\t\t\t\t\t\tmergeFn: (skewWord bitAnd: halftoneWord)\n\t\t\t\t\t\twith: destWord.\n\t\t\tdestWord _ (destMask bitAnd: mergeWord)\n\t\t\t\t\t\tbitOr: (destWord bitAnd: destMask bitInvert32).\n\t\t\tself dstLongAt: destIndexLocal put: destWord.\n\t\t\tdestIndexLocal _ destIndexLocal + hInc.\n\t\t\t\"This central horizontal loop requires no store masking\"\n\t\t\tdestMask _ AllOnes.\n\t\t\tcombinationRule = 3\n\t\t\t\tifTrue: [skewLocal = 0 & (halftoneWord = AllOnes)\n\t\t\t\t\t\tifTrue: [\"Very special inner loop for STORE mode with no \n\t\t\t\t\t\t\tskew -- just move words\"\n\t\t\t\t\t\t\thDirLocal = -1\n\t\t\t\t\t\t\t\tifTrue: [\"Woeful patch: revert to older code for  \n\t\t\t\t\t\t\t\t\thDir = -1\"\n\t\t\t\t\t\t\t\t\t2\n\t\t\t\t\t\t\t\t\t\tto: nWordsMinusOne\n\t\t\t\t\t\t\t\t\t\tdo: [:word | \n\t\t\t\t\t\t\t\t\t\t\tthisWord _ self srcLongAt: sourceIndexLocal.\n\t\t\t\t\t\t\t\t\t\t\tsourceIndexLocal _ sourceIndexLocal + hInc.\n\t\t\t\t\t\t\t\t\t\t\tself dstLongAt: destIndexLocal put: thisWord.\n\t\t\t\t\t\t\t\t\t\t\tdestIndexLocal _ destIndexLocal + hInc]]\n\t\t\t\t\t\t\t\tifFalse: [2\n\t\t\t\t\t\t\t\t\t\tto: nWordsMinusOne\n\t\t\t\t\t\t\t\t\t\tdo: [:word | \n\t\t\t\t\t\t\t\t\t\t\t\"Note loop starts with prevWord  \n\t\t\t\t\t\t\t\t\t\t\tloaded (due to preload)\"\n\t\t\t\t\t\t\t\t\t\t\tself dstLongAt: destIndexLocal put: prevWord.\n\t\t\t\t\t\t\t\t\t\t\tdestIndexLocal _ destIndexLocal + hInc.\n\t\t\t\t\t\t\t\t\t\t\tprevWord _ self srcLongAt: sourceIndexLocal.\n\t\t\t\t\t\t\t\t\t\t\tsourceIndexLocal _ sourceIndexLocal + hInc]]]\n\t\t\t\t\t\tifFalse: [\"Special inner loop for STORE mode -- no need to \n\t\t\t\t\t\t\tcall merge\"\n\t\t\t\t\t\t\t2\n\t\t\t\t\t\t\t\tto: nWordsMinusOne\n\t\t\t\t\t\t\t\tdo: [:word | \n\t\t\t\t\t\t\t\t\tthisWord _ self srcLongAt: sourceIndexLocal.\n\t\t\t\t\t\t\t\t\tsourceIndexLocal _ sourceIndexLocal + hInc.\n\t\t\t\t\t\t\t\t\tskewWord _ ((prevWord bitAnd: notSkewMask)\n\t\t\t\t\t\t\t\t\t\t\t\tbitShift: unskew)\n\t\t\t\t\t\t\t\t\t\t\t\tbitOr: ((thisWord bitAnd: skewMask)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbitShift: skewLocal).\n\t\t\t\t\t\t\t\t\t\"32-bit rotate\"\n\t\t\t\t\t\t\t\t\tprevWord _ thisWord.\n\t\t\t\t\t\t\t\t\tself\n\t\t\t\t\t\t\t\t\t\tdstLongAt: destIndexLocal\n\t\t\t\t\t\t\t\t\t\tput: (skewWord bitAnd: halftoneWord).\n\t\t\t\t\t\t\t\t\tdestIndexLocal _ destIndexLocal + hInc]]]\n\t\t\t\tifFalse: [2\n\t\t\t\t\t\tto: nWordsMinusOne\n\t\t\t\t\t\tdo: [:word | \n\t\t\t\t\t\t\t\"Normal inner loop does merge:\"\n\t\t\t\t\t\t\tthisWord _ self srcLongAt: sourceIndexLocal.\n\t\t\t\t\t\t\t\"pick up next word\"\n\t\t\t\t\t\t\tsourceIndexLocal _ sourceIndexLocal + hInc.\n\t\t\t\t\t\t\tskewWord _ ((prevWord bitAnd: notSkewMask)\n\t\t\t\t\t\t\t\t\t\tbitShift: unskew)\n\t\t\t\t\t\t\t\t\t\tbitOr: ((thisWord bitAnd: skewMask)\n\t\t\t\t\t\t\t\t\t\t\t\tbitShift: skewLocal).\n\t\t\t\t\t\t\t\"32-bit rotate\"\n\t\t\t\t\t\t\tprevWord _ thisWord.\n\t\t\t\t\t\t\tmergeWord _ self\n\t\t\t\t\t\t\t\t\t\tmergeFn: (skewWord bitAnd: halftoneWord)\n\t\t\t\t\t\t\t\t\t\twith: (self dstLongAt: destIndexLocal).\n\t\t\t\t\t\t\tself dstLongAt: destIndexLocal put: mergeWord.\n\t\t\t\t\t\t\tdestIndexLocal _ destIndexLocal + hInc]].\n\t\t\t\"This last section, if used, requires masking of the destination  \n\t\t\tstore...\"\n\t\t\tnWords > 1\n\t\t\t\tifTrue: [destMask _ mask2.\n\t\t\t\t\tthisWord _ self srcLongAt: sourceIndexLocal.\n\t\t\t\t\t\"pick up next word\"\n\t\t\t\t\tsourceIndexLocal _ sourceIndexLocal + hInc.\n\t\t\t\t\tskewWord _ ((prevWord bitAnd: notSkewMask)\n\t\t\t\t\t\t\t\tbitShift: unskew)\n\t\t\t\t\t\t\t\tbitOr: ((thisWord bitAnd: skewMask)\n\t\t\t\t\t\t\t\t\t\tbitShift: skewLocal).\n\t\t\t\t\t\"32-bit rotate\"\n\t\t\t\t\tdestWord _ self dstLongAt: destIndexLocal.\n\t\t\t\t\tmergeWord _ self\n\t\t\t\t\t\t\t\tmergeFn: (skewWord bitAnd: halftoneWord)\n\t\t\t\t\t\t\t\twith: destWord.\n\t\t\t\t\tdestWord _ (destMask bitAnd: mergeWord)\n\t\t\t\t\t\t\t\tbitOr: (destWord bitAnd: destMask bitInvert32).\n\t\t\t\t\tself dstLongAt: destIndexLocal put: destWord.\n\t\t\t\t\tdestIndexLocal _ destIndexLocal + hInc].\n\t\t\tsourceIndexLocal _ sourceIndexLocal + sourceDelta.\n\t\t\tdestIndexLocal _ destIndexLocal + destDelta]! !\n\n!BitBltSimulation methodsFor: 'inner loop' stamp: 'JMM 6/29/2003 23:01'!\ncopyLoopNoSource\n\t\"Faster copyLoop when source not used. hDir and vDir are both  \n\tpositive, and perload and skew are unused\"\n\t| halftoneWord mergeWord mergeFnwith destWord destIndexLocal |\n\tself inline: false.\n\tself var: #mergeFnwith declareC: 'int (*mergeFnwith)(int, int)'.\n\tmergeFnwith _ self\n\t\t\t\tcCoerce: (opTable at: combinationRule + 1)\n\t\t\t\tto: 'int (*)(int, int)'.\n\tmergeFnwith.\n\t\"null ref for compiler\"\n\tdestIndexLocal _ destIndex.\n\t1\n\t\tto: bbH\n\t\tdo: [:i | \n\t\t\t\"here is the vertical loop\"\n\t\t\tnoHalftone\n\t\t\t\tifTrue: [halftoneWord _ AllOnes]\n\t\t\t\tifFalse: [halftoneWord _ self halftoneAt: dy + i - 1].\n\t\t\t\"Note: the horizontal loop has been expanded into three parts for \n\t\t\tspeed:\"\n\t\t\t\"This first section requires masking of the destination store...\"\n\t\t\tdestMask _ mask1.\n\t\t\tdestWord _ self dstLongAt: destIndexLocal.\n\t\t\tmergeWord _ self mergeFn: halftoneWord with: destWord.\n\t\t\tdestWord _ (destMask bitAnd: mergeWord)\n\t\t\t\t\t\tbitOr: (destWord bitAnd: destMask bitInvert32).\n\t\t\tself dstLongAt: destIndexLocal put: destWord.\n\t\t\tdestIndexLocal _ destIndexLocal + 4.\n\t\t\t\"This central horizontal loop requires no store masking\"\n\t\t\tdestMask _ AllOnes.\n\t\t\tcombinationRule = 3\n\t\t\t\tifTrue: [\"Special inner loop for STORE\"\n\t\t\t\t\tdestWord _ halftoneWord.\n\t\t\t\t\t2\n\t\t\t\t\t\tto: nWords - 1\n\t\t\t\t\t\tdo: [:word | \n\t\t\t\t\t\t\tself dstLongAt: destIndexLocal put: destWord.\n\t\t\t\t\t\t\tdestIndexLocal _ destIndexLocal + 4]]\n\t\t\t\tifFalse: [\"Normal inner loop does merge\"\n\t\t\t\t\t2\n\t\t\t\t\t\tto: nWords - 1\n\t\t\t\t\t\tdo: [:word | \n\t\t\t\t\t\t\t\"Normal inner loop does merge\"\n\t\t\t\t\t\t\tdestWord _ self dstLongAt: destIndexLocal.\n\t\t\t\t\t\t\tmergeWord _ self mergeFn: halftoneWord with: destWord.\n\t\t\t\t\t\t\tself dstLongAt: destIndexLocal put: mergeWord.\n\t\t\t\t\t\t\tdestIndexLocal _ destIndexLocal + 4]].\n\t\t\t\"This last section, if used, requires masking of the destination  \n\t\t\tstore...\"\n\t\t\tnWords > 1\n\t\t\t\tifTrue: [destMask _ mask2.\n\t\t\t\t\tdestWord _ self dstLongAt: destIndexLocal.\n\t\t\t\t\tmergeWord _ self mergeFn: halftoneWord with: destWord.\n\t\t\t\t\tdestWord _ (destMask bitAnd: mergeWord)\n\t\t\t\t\t\t\t\tbitOr: (destWord bitAnd: destMask bitInvert32).\n\t\t\t\t\tself dstLongAt: destIndexLocal put: destWord.\n\t\t\t\t\tdestIndexLocal _ destIndexLocal + 4].\n\t\t\tdestIndexLocal _ destIndexLocal + destDelta]! !\n\n!BitBltSimulation methodsFor: 'inner loop' stamp: 'JMM 6/29/2003 23:01'!\ncopyLoopPixMap\n\t\"This version of the inner loop maps source pixels  \n\tto a destination form with different depth. Because it is already  \n\tunweildy, the loop is not unrolled as in the other versions.  \n\tPreload, skew and skewMask are all overlooked, since pickSourcePixels  \n\tdelivers its destination word already properly aligned.  \n\tNote that pickSourcePixels could be copied in-line at the top of  \n\tthe horizontal loop, and some of its inits moved out of the loop.\"\n\t\"ar 12/7/1999:  \n\tThe loop has been rewritten to use only one pickSourcePixels call.  \n\tThe idea is that the call itself could be inlined. If we decide not  \n\tto inline pickSourcePixels we could optimize the loop instead.\"\n\t| skewWord halftoneWord mergeWord scrStartBits nSourceIncs startBits endBits sourcePixMask destPixMask mergeFnwith nPix srcShift dstShift destWord words srcShiftInc dstShiftInc dstShiftLeft mapperFlags destIndexLocal |\n\tself inline: false.\n\tself var: #mergeFnwith declareC: 'int (*mergeFnwith)(int, int)'.\n\tmergeFnwith _ self\n\t\t\t\tcCoerce: (opTable at: combinationRule + 1)\n\t\t\t\tto: 'int (*)(int, int)'.\n\tmergeFnwith.\n\t\"null ref for compiler\"\n\tdestIndexLocal _ destIndex.\n\t\"Additional inits peculiar to unequal source and dest pix size...\"\n\tsourcePPW _ 32 // sourceDepth.\n\tsourcePixMask _ maskTable at: sourceDepth.\n\tdestPixMask _ maskTable at: destDepth.\n\tmapperFlags _ cmFlags bitAnd: ColorMapNewStyle bitInvert32.\n\tsourceIndex _ sourceBits + (sy * sourcePitch) + (sx // sourcePPW * 4).\n\tscrStartBits _ sourcePPW\n\t\t\t\t- (sx bitAnd: sourcePPW - 1).\n\tbbW < scrStartBits\n\t\tifTrue: [nSourceIncs _ 0]\n\t\tifFalse: [nSourceIncs _ bbW - scrStartBits // sourcePPW + 1].\n\tsourceDelta _ sourcePitch - (nSourceIncs * 4).\n\t\"Note following two items were already calculated in destmask setup!!\"\n\tstartBits _ destPPW\n\t\t\t\t- (dx bitAnd: destPPW - 1).\n\tendBits _ (dx + bbW - 1 bitAnd: destPPW - 1)\n\t\t\t\t+ 1.\n\tbbW < startBits\n\t\tifTrue: [startBits _ bbW].\n\t\"Precomputed shifts for pickSourcePixels\"\n\tsrcShift _ (sx bitAnd: sourcePPW - 1)\n\t\t\t\t* sourceDepth.\n\tdstShift _ (dx bitAnd: destPPW - 1)\n\t\t\t\t* destDepth.\n\tsrcShiftInc _ sourceDepth.\n\tdstShiftInc _ destDepth.\n\tdstShiftLeft _ 0.\n\tsourceMSB\n\t\tifTrue: [srcShift _ 32 - sourceDepth - srcShift.\n\t\t\tsrcShiftInc _ 0 - srcShiftInc].\n\tdestMSB\n\t\tifTrue: [dstShift _ 32 - destDepth - dstShift.\n\t\t\tdstShiftInc _ 0 - dstShiftInc.\n\t\t\tdstShiftLeft _ 32 - destDepth].\n\t1\n\t\tto: bbH\n\t\tdo: [:i | \n\t\t\t\"here is the vertical loop\"\n\t\t\t\"*** is it possible at all that noHalftone == false? ***\"\n\t\t\tnoHalftone\n\t\t\t\tifTrue: [halftoneWord _ AllOnes]\n\t\t\t\tifFalse: [halftoneWord _ self halftoneAt: dy + i - 1].\n\t\t\t\"setup first load\"\n\t\t\tsrcBitShift _ srcShift.\n\t\t\tdstBitShift _ dstShift.\n\t\t\tdestMask _ mask1.\n\t\t\tnPix _ startBits.\n\t\t\t\"Here is the horizontal loop...\"\n\t\t\twords _ nWords.\n\t\t\t[\"pick up the word\"\n\t\t\tskewWord _ self\n\t\t\t\t\t\tpickSourcePixels: nPix\n\t\t\t\t\t\tflags: mapperFlags\n\t\t\t\t\t\tsrcMask: sourcePixMask\n\t\t\t\t\t\tdestMask: destPixMask\n\t\t\t\t\t\tsrcShiftInc: srcShiftInc\n\t\t\t\t\t\tdstShiftInc: dstShiftInc.\n\t\t\t\"align next word to leftmost pixel\"\n\t\t\tdstBitShift _ dstShiftLeft.\n\t\t\tdestMask = AllOnes\n\t\t\t\tifTrue: [\"avoid read-modify-write\"\n\t\t\t\t\tmergeWord _ self\n\t\t\t\t\t\t\t\tmergeFn: (skewWord bitAnd: halftoneWord)\n\t\t\t\t\t\t\t\twith: (self dstLongAt: destIndexLocal).\n\t\t\t\t\tself\n\t\t\t\t\t\tdstLongAt: destIndexLocal\n\t\t\t\t\t\tput: (destMask bitAnd: mergeWord)]\n\t\t\t\tifFalse: [\"General version using dest masking\"\n\t\t\t\t\tdestWord _ self dstLongAt: destIndexLocal.\n\t\t\t\t\tmergeWord _ self\n\t\t\t\t\t\t\t\tmergeFn: (skewWord bitAnd: halftoneWord)\n\t\t\t\t\t\t\t\twith: (destWord bitAnd: destMask).\n\t\t\t\t\tdestWord _ (destMask bitAnd: mergeWord)\n\t\t\t\t\t\t\t\tbitOr: (destWord bitAnd: destMask bitInvert32).\n\t\t\t\t\tself dstLongAt: destIndexLocal put: destWord].\n\t\t\tdestIndexLocal _ destIndexLocal + 4.\n\t\t\twords = 2\n\t\t\t\tifTrue: [\"e.g., is the next word the last word?\"\n\t\t\t\t\t\"set mask for last word in this row\"\n\t\t\t\t\tdestMask _ mask2.\n\t\t\t\t\tnPix _ endBits]\n\t\t\t\tifFalse: [\"use fullword mask for inner loop\"\n\t\t\t\t\tdestMask _ AllOnes.\n\t\t\t\t\tnPix _ destPPW].\n\t\t\t(words _ words - 1) = 0] whileFalse.\n\t\t\t\"--- end of inner loop ---\"\n\t\t\tsourceIndex _ sourceIndex + sourceDelta.\n\t\t\tdestIndexLocal _ destIndexLocal + destDelta]! !\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/specialChangeSets/Old/FasterCopyLoopPart2-JMM.2.cs",
    "content": "'From Squeak3.6beta of ''4 July 2003'' [latest update: #5331] on 29 July 2003 at 2:36:26 pm'!\n\n!BitBltSimulation methodsFor: 'inner loop' stamp: 'jmm 7/15/2003 20:44'!\ncopyLoopNoSource\n\t\"Faster copyLoop when source not used. hDir and vDir are both  \n\tpositive, and perload and skew are unused\"\n\t| halftoneWord mergeWord mergeFnwith destWord destIndexLocal nWordsMinusOne |\n\tself inline: false.\n\tself var: #mergeFnwith declareC: 'int (*mergeFnwith)(int, int)'.\n\tmergeFnwith _ self\n\t\t\t\tcCoerce: (opTable at: combinationRule + 1)\n\t\t\t\tto: 'int (*)(int, int)'.\n\tmergeFnwith.\n\t\"null ref for compiler\"\n\tdestIndexLocal _ destIndex.\n\tnWordsMinusOne _ nWords - 1.\n\t1\n\t\tto: bbH\n\t\tdo: [:i | \n\t\t\t\"here is the vertical loop\"\n\t\t\tnoHalftone\n\t\t\t\tifTrue: [halftoneWord _ AllOnes]\n\t\t\t\tifFalse: [halftoneWord _ self halftoneAt: dy + i - 1].\n\t\t\t\"Note: the horizontal loop has been expanded into three parts for \n\t\t\tspeed:\"\n\t\t\t\"This first section requires masking of the destination store...\"\n\t\t\tdestMask _ mask1.\n\t\t\tdestWord _ self dstLongAt: destIndexLocal.\n\t\t\tmergeWord _ self mergeFn: halftoneWord with: destWord.\n\t\t\tdestWord _ (destMask bitAnd: mergeWord)\n\t\t\t\t\t\tbitOr: (destWord bitAnd: destMask bitInvert32).\n\t\t\tself dstLongAt: destIndexLocal put: destWord.\n\t\t\tdestIndexLocal _ destIndexLocal + 4.\n\t\t\t\"This central horizontal loop requires no store masking\"\n\t\t\tdestMask _ AllOnes.\n\t\t\tcombinationRule = 3\n\t\t\t\tifTrue: [\"Special inner loop for STORE\"\n\t\t\t\t\tdestWord _ halftoneWord.\n\t\t\t\t\t2\n\t\t\t\t\t\tto: nWordsMinusOne\n\t\t\t\t\t\tdo: [:word | \n\t\t\t\t\t\t\tself dstLongAt: destIndexLocal put: destWord.\n\t\t\t\t\t\t\tdestIndexLocal _ destIndexLocal + 4]]\n\t\t\t\tifFalse: [\"Normal inner loop does merge\"\n\t\t\t\t\t2\n\t\t\t\t\t\tto: nWordsMinusOne\n\t\t\t\t\t\tdo: [:word | \n\t\t\t\t\t\t\t\"Normal inner loop does merge\"\n\t\t\t\t\t\t\tdestWord _ self dstLongAt: destIndexLocal.\n\t\t\t\t\t\t\tmergeWord _ self mergeFn: halftoneWord with: destWord.\n\t\t\t\t\t\t\tself dstLongAt: destIndexLocal put: mergeWord.\n\t\t\t\t\t\t\tdestIndexLocal _ destIndexLocal + 4]].\n\t\t\t\"This last section, if used, requires masking of the destination  \n\t\t\tstore...\"\n\t\t\tnWords > 1\n\t\t\t\tifTrue: [destMask _ mask2.\n\t\t\t\t\tdestWord _ self dstLongAt: destIndexLocal.\n\t\t\t\t\tmergeWord _ self mergeFn: halftoneWord with: destWord.\n\t\t\t\t\tdestWord _ (destMask bitAnd: mergeWord)\n\t\t\t\t\t\t\t\tbitOr: (destWord bitAnd: destMask bitInvert32).\n\t\t\t\t\tself dstLongAt: destIndexLocal put: destWord.\n\t\t\t\t\tdestIndexLocal _ destIndexLocal + 4].\n\t\t\tdestIndexLocal _ destIndexLocal + destDelta]! !\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/specialChangeSets/Old/FasterLookupMethod-JMM.1.cs",
    "content": "'From Squeak3.6beta of ''4 July 2003'' [latest update: #5373] on 6 August 2003 at 12:05:30 pm'!\n\"Change Set:\t\tFasterLookupMethod-JMM\nDate:\t\t\t6 August 2003\nAuthor:\t\t\tjohnmci@smalltalkconsulting.com\n\nChange 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\"!\n\n\n!Interpreter methodsFor: 'message sending' stamp: 'JMM 8/5/2003 22:14'!\nlookupMethodInDictionary: dictionary\n\t\"This method lookup tolerates integers as Dictionary keys to support\n\texecution of images in which Symbols have been compacted out\"\n \t| length index mask wrapAround nextSelector methodArray nilOops|\n\tself inline: true.\n\tnilOops _ nilObj.\n\tlength _ self fetchWordLengthOf: dictionary.\n\tmask _ length - SelectorStart - 1.\n\t(self isIntegerObject: messageSelector)\n\t\tifTrue:\n\t\t[index _ (mask bitAnd: (self integerValueOf: messageSelector)) + SelectorStart]\n\t\tifFalse:\n\t\t[index _ (mask bitAnd: (self hashBitsOf: messageSelector)) + SelectorStart].\n\t\"It is assumed that there are some nils in this dictionary, and search will\n\tstop when one is encountered.  However, if there are no nils, then wrapAround\n\twill be detected the second time the loop gets to the end of the table.\"\n\twrapAround _ false.\n\t[true] whileTrue:\n\t\t[nextSelector _ self fetchPointer: index\n\t\t\t\t\tofObject: dictionary.\n\t\tnextSelector=messageSelector ifTrue: [\n\t\t\tmethodArray _ self fetchPointer: MethodArrayIndex\n\t\t\t\t\t\t\tofObject: dictionary.\n\t\t\tnewMethod _ self fetchPointer:  index - SelectorStart\n\t\t\t\t\t\tofObject: methodArray.\n\t\t\t\"Check if newMethod is a CompiledMethod.\"\n\t\t\t(self formatOf: newMethod) >= 12 ifTrue:[\n\t\t\t\tprimitiveIndex _ self primitiveIndexOf: newMethod.\n\t\t\t\tprimitiveIndex > MaxPrimitiveIndex ifTrue:[\n\t\t\t\t\t\"If primitiveIndex is out of range, set to zero before putting in cache.\n\t\t\t\t\tThis is equiv to primFail, and avoids the need to check on every send.\"\n\t\t\t\t\tprimitiveIndex _ 0.\n\t\t\t\t].\n\t\t\t] ifFalse:[\n\t\t\t\t\"indicate that this is no compiled method\"\n\t\t\t\tprimitiveIndex := 248.\n\t\t\t].\n\t\t\t^true\n\t\t].\n\t\tnextSelector=nilOops ifTrue: [^false].\n\t\tindex _ index + 1.\n\t\tindex = length\n\t\t\tifTrue: [wrapAround ifTrue: [^false].\n\t\t\t\twrapAround _ true.\n\t\t\t\tindex _ SelectorStart]]! !\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/specialChangeSets/Old/Interpreter-readImageFromFile-jmm-dtl.2.cs",
    "content": "'From Squeak3.8.2a of ''26 Oct 2007'' [latest update: #6748] on 30 October 2008 at 7:43:50 am'!\r\"Change Set:\t\tInterpreter-readImageFromFile-jmm-dtl\rDate:\t\t\t23 October 2008\rAuthor:\t\t\tDavid T. Lewis\r\rPass image file and image header length to object memory allocation function in order to enable mmap loading without address swizzling, per jmm proposal.\r\rCCodeGenerator will provide default implementations in interp.h that are backward compatible with the existing platform support code. These defaults may be overridden by adding definitions such as the following to sqConfig.h (or config.h via configure for the unix VM).\r\r#define allocateMemoryMinimumImageFileHeaderSize(heapSize, minimumMemory, fileStream, headerSize) \\\r    myMemoryAllocator(heapSize, minimumMemory, fileStream, headerSize)\n\n\r#define sqImageFileReadEntireImage(memoryAddress, fileStream, elementSize,  length) \\\r    myImageFileReader(memoryAddress, fileStream, elementSize,  length)\n\r\"\r!\r\r\r!CCodeGenerator methodsFor: 'public' stamp: 'dtl 10/24/2008 12:51'!\rstoreHeaderOnFile: fileName bytesPerWord: bytesPerWord\r\t\"Store C header code for this interpreter on the given file.\"\r\r\t| aStream |\r\taStream := CrLfFileStream forceNewFileNamed: fileName.\r\taStream ifNil: [Error signal: 'Could not open C header file: ', fileName].\r\taStream\r\t\tnextPutAll: '/* ';\r\t\tnextPutAll: VMMaker headerNotice;\r\t\tnextPutAll: ' */'; cr; cr.\r\tself writeDefineBytesPerWord: bytesPerWord on: aStream.\r\tself writeDefineMemoryAccessInImageOn: aStream.\r\tself writeDefaultMacrosOn: aStream.\r\taStream close\r! !\r\r!CCodeGenerator methodsFor: 'C code generator' stamp: 'dtl 10/30/2008 07:18'!\rwriteDefaultMacrosOn: aStream\r\t\"Write macros to provide default implementations of certain functions used by\r\tthe interpreter. If not previously defined in config.h they will be defined here.\r\tThe definitions will be available to any module that includes sqMemoryAccess.h.\r\tThe default macros are chosen for backward compatibility with existing platform\r\tsupport code.\"\r\r\taStream cr;\r\t\tnextPutAll: '#ifndef allocateMemoryMinimumImageFileHeaderSize'; cr;\r\t\tnextPutAll: ' /* Called by Interpreter>>allocateMemory:minimum:imageFile:headerSize: */'; cr;\r\t\tnextPutAll: ' #define allocateMemoryMinimumImageFileHeaderSize(',\r\t\t\t\t\t\t'heapSize, minimumMemory, fileStream, headerSize) \\'; cr;\r\t\tnextPutAll: '    sqAllocateMemory(minimumMemory, heapSize)'; cr;\r\t\tnextPutAll: '#endif'; cr; cr;\r\t\tnextPutAll: '#ifndef sqImageFileReadEntireImage'; cr;\r\t\tnextPutAll: ' /* Called by Interpreter>>sqImage:read:size:length: */'; cr;\r\t\tnextPutAll: ' #define sqImageFileReadEntireImage(memoryAddress, fileStream, ',\r\t\t\t\t\t\t'elementSize,  length) \\'; cr;\r\t\tnextPutAll: '    sqImageFileRead(memoryAddress, fileStream, elementSize,  length)'; cr;\r\t\tnextPutAll: '#endif'; cr; cr\r! !\r\r!CCodeGenerator methodsFor: 'C code generator' stamp: 'dtl 8/25/2008 22:36'!\rwriteDefineBytesPerWord: bytesPerWord on: aStream\r\taStream\r\t\tnextPutAll: '#define SQ_VI_BYTES_PER_WORD ';\r\t\tprint: bytesPerWord;\r\t\tcr! !\r\r!CCodeGenerator methodsFor: 'C code generator' stamp: 'dtl 9/17/2008 10:27'!\rwriteDefineMemoryAccessInImageOn: aStream\r\t\"If MemoryAccess is present in the image, then define MEMORY_ACCESS_IN_IMAGE as\r\ta C preprocessor macro. When MEMORY_ACCESS_IN_IMAGE is defined, the traditional\r\tC preprocessor macros for low level memory access are ignored and will be replaced\r\tby directly translated (and inlined) SLANG versions of the same. This enables visibility\r\tof the memory access functions for debuggers and profilers.\"\r\r\t(Smalltalk classNamed: #MemoryAccess)\r\t\tifNotNilDo: [:ma | ma isEnabled\r\t\t\tifTrue: [aStream nextPutAll: '#define MEMORY_ACCESS_IN_IMAGE 1'; cr]]! !\r\r\r!Interpreter methodsFor: 'image save/restore' stamp: 'dtl 10/30/2008 07:13'!\rallocateMemory: heapSize minimum: minimumMemory imageFile: fileStream headerSize: headerSize\r\r\t\"Translate to C function call with (case sensitive) camelCase. The purpose of this\r\tmethod is to document the translation.\r\tThe default implementation is sqAllocateMemory(minimumMemory, heapSize). This may\r\tbe redefined to make use of the image file and header size parameters for efficient\r\timplementation with mmap().\r\tSee CCodeGenerator>>writeDefaultMacrosOn: which specifies a default implementation.\"\r\r\tself inline: true.\r\tself returnTypeC: 'char *'.\r\tself var: #fileStream type: 'sqImageFile'.\r\t^ self\r\t\tallocateMemory: heapSize\r\t\tMinimum: minimumMemory\r\t\tImageFile: fileStream\r\t\tHeaderSize: headerSize! !\r\r!Interpreter methodsFor: 'image save/restore' stamp: 'dtl 10/26/2008 16:37'!\rreadImageFromFile: f HeapSize: desiredHeapSize StartingAt: imageOffset\r\t\"Read an image from the given file stream, allocating the given amount of memory to its object heap. Fail if the image has an unknown format or requires more than the given amount of memory.\"\r\t\"Details: This method detects when the image was stored on a machine with the opposite byte ordering from this machine and swaps the bytes automatically. Furthermore, it allows the header information to start 512 bytes into the file, since some file transfer programs for the Macintosh apparently prepend a Mac-specific header of this size. Note that this same 512 bytes of prefix area could also be used to store an exec command on Unix systems, allowing one to launch Smalltalk by invoking the image name as a command.\"\r\t\"This code is based on C code by Ian Piumarta and Smalltalk code by Tim Rowledge. Many thanks to both of you!!!!\"\r\r\t| swapBytes headerStart headerSize dataSize oldBaseAddr minimumMemory memStart bytesRead bytesToShift heapSize |\r\tself var: #f type: 'sqImageFile '.\r\tself var: #headerStart type: 'squeakFileOffsetType '.\r\tself var: #dataSize type: 'size_t '.\r\tself var: #imageOffset type: 'squeakFileOffsetType '.\r\r\tswapBytes := self checkImageVersionFrom: f startingAt: imageOffset.\r\theaderStart := (self sqImageFilePosition: f) - BytesPerWord.  \"record header start position\"\r\r\theaderSize\t\t\t:= self getLongFromFile: f swap: swapBytes.\r\tdataSize\t\t\t\t:= self getLongFromFile: f swap: swapBytes.\r\toldBaseAddr\t\t\t:= self getLongFromFile: f swap: swapBytes.\r\tspecialObjectsOop\t:= self getLongFromFile: f swap: swapBytes.\r\tlastHash\t\t\t:= self getLongFromFile: f swap: swapBytes.\r\tsavedWindowSize\t:= self getLongFromFile: f swap: swapBytes.\r\tfullScreenFlag\t\t:= self getLongFromFile: f swap: swapBytes.\r\textraVMMemory\t\t:= self getLongFromFile: f swap: swapBytes.\r\r\tlastHash = 0 ifTrue: [\r\t\t\"lastHash wasn't stored (e.g. by the cloner); use 999 as the seed\"\r\t\tlastHash := 999].\r\r\t\"decrease Squeak object heap to leave extra memory for the VM\"\r\theapSize := self cCode: 'reserveExtraCHeapBytes(desiredHeapSize, extraVMMemory)'.\r\r\t\"compare memory requirements with availability\".\r\tminimumMemory := dataSize + 100000.  \"need at least 100K of breathing room\"\r\theapSize < minimumMemory ifTrue: [\r\t\tself insufficientMemorySpecifiedError].\r\r\t\"allocate a contiguous block of memory for the Squeak heap\"\r\tmemory := self\r\t\tallocateMemory: heapSize\r\t\tminimum: minimumMemory\r\t\timageFile: f\r\t\theaderSize: headerSize.\r\tmemory = nil ifTrue: [self insufficientMemoryAvailableError].\r\r\tmemStart := self startOfMemory.\r\tmemoryLimit := (memStart + heapSize) - 24.  \"decrease memoryLimit a tad for safety\"\r\tendOfMemory := memStart + dataSize.\r\r\t\"position file after the header\"\r\tself sqImageFile: f Seek: headerStart + headerSize.\r\r\t\"read in the image in bulk, then swap the bytes if necessary\"\r\tbytesRead := self\r\t\tsqImage: (self pointerForOop: memory)\r\t\tread: f\r\t\tsize: (self cCode: 'sizeof(unsigned char)')\r\t\tlength: dataSize.\r\tbytesRead ~= dataSize ifTrue: [self unableToReadImageError].\r\r\theaderTypeBytes at: 0 put: BytesPerWord * 2.\t\t\"3-word header (type 0)\"\t\r\theaderTypeBytes at: 1 put: BytesPerWord.\t\t\"2-word header (type 1)\"\r\theaderTypeBytes at: 2 put: 0.\t\t\t\t\t\"free chunk (type 2)\"\t\r\theaderTypeBytes at: 3 put: 0.\t\t\t\t\t\"1-word header (type 3)\"\r\r\tswapBytes ifTrue: [self reverseBytesInImage].\r\r\t\"compute difference between old and new memory base addresses\"\r\tbytesToShift := memStart - oldBaseAddr.\r\tself initializeInterpreter: bytesToShift.  \"adjusts all oops to new location\"\r\tself isBigEnder. \"work out the machine endianness and cache the answer\"\r\r\t^ dataSize\r! !\r\r!Interpreter methodsFor: 'image save/restore' stamp: 'dtl 10/30/2008 07:15'!\rsqImage: memoryAddress read: fileStream size: elementSize length: length\r\t\"Normally implemented in support code as fread().\r\tSee CCodeGenerator>>writeDefaultMacrosOn: which specifies a default implementation.\"\r \r\tself inline: true.\r\tself returnTypeC: 'size_t'.\r\tself var: #memoryAddress type: 'char *'.\r\tself var: #elementSize type: 'size_t'.\r\tself var: #length type: 'size_t'.\r\tself var: #fileStream type: 'sqImageFile'.\r\t^ self sqImage: memoryAddress File: elementSize  ReadEntire: length Image: fileStream \r\r! !\r\r!Interpreter methodsFor: 'image save/restore' stamp: 'dtl 7/3/2008 20:21'!\rsqImage: memoryAddress write: fileStream size: elementSize length: length\r\t\"Normally implemented in support code as fwrite()\"\r\r\tself inline: true.\r\tself returnTypeC: 'size_t'.\r\tself var: #memoryAddress type: 'char *'.\r\tself var: #elementSize type: 'size_t'.\r\tself var: #length type: 'size_t'.\r\tself var: #fileStream type: 'sqImageFile'.\r\t^ self sq: memoryAddress Image: elementSize File: length Write: fileStream \"sqImageFileWrite()\"\r! !\r\r!Interpreter methodsFor: 'image save/restore' stamp: 'dtl 7/3/2008 23:27'!\rwriteImageFileIO: imageBytes\r\r\t| headerStart headerSize f bytesWritten sCWIfn okToWrite |\r\tself var: #f type: 'sqImageFile'.\r\tself var: #headerStart type: 'squeakFileOffsetType '.\r\tself var: #sCWIfn type: 'void *'.\r\r\t\"If the security plugin can be loaded, use it to check for write permission.\r\tIf not, assume it's ok\"\r\tsCWIfn := self ioLoadFunction: 'secCanWriteImage' From: 'SecurityPlugin'.\r\tsCWIfn ~= 0 ifTrue:[okToWrite := self cCode: '((sqInt (*)(void))sCWIfn)()'.\r\t\tokToWrite ifFalse:[^self primitiveFail]].\r\t\r\t\"local constants\"\r\theaderStart := 0.  \r\theaderSize := 64.  \"header size in bytes; do not change!!\"\r\r\tf := self cCode: 'sqImageFileOpen(imageName, \"wb\")'.\r\tf = nil ifTrue: [\r\t\t\"could not open the image file for writing\"\r\t\tself success: false.\r\t\t^ nil].\r\r\theaderStart := self cCode: 'sqImageFileStartLocation(f,imageName,headerSize+imageBytes)'.\r\tself cCode: '/* Note: on Unix systems one could put an exec command here, padded to 512 bytes */'.\r\t\"position file to start of header\"\r\tself sqImageFile: f Seek: headerStart.\r\r\tself putLong: (self imageFormatVersion) toFile: f.\r\tself putLong: headerSize toFile: f.\r\tself putLong: imageBytes toFile: f.\r\tself putLong: (self startOfMemory) toFile: f.\r\tself putLong: specialObjectsOop toFile: f.\r\tself putLong: lastHash toFile: f.\r\tself putLong: (self ioScreenSize) toFile: f.\r\tself putLong: fullScreenFlag toFile: f.\r\tself putLong: extraVMMemory toFile: f.\r\t1 to: 7 do: [:i | self putLong: 0 toFile: f].  \"fill remaining header words with zeros\"\r\tsuccessFlag ifFalse: [\r\t\t\"file write or seek failure\"\r\t\tself cCode: 'sqImageFileClose(f)'.\r\t\t^ nil].\r\r\t\"position file after the header\"\r\tself sqImageFile: f Seek: headerStart + headerSize.\r\r\t\"write the image data\"\r\tbytesWritten := self\r\t\tsqImage: (self pointerForOop: memory)\r\t\twrite: f\r\t\tsize: (self cCode: 'sizeof(unsigned char)')\r\t\tlength: imageBytes.\r\tself success: bytesWritten = imageBytes.\r\tself cCode: 'sqImageFileClose(f)'.\r\r! !\r\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/specialChangeSets/Old/JMM-fixBiasToGrow.1.cs",
    "content": "'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 24 January 2007 at 6:27:54 pm'!\r\r!ObjectMemory methodsFor: 'garbage collection' stamp: 'JMM 1/22/2007 20:35'!\rbiasToGrow\r\t| growSize |\r\tgrowSize :=  growHeadroom*3/2 - (self sizeOfFree: freeBlock).\r\tself growObjectMemory: growSize! !\r\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/specialChangeSets/Old/MakePrimPointXInternal-JMM.1.cs",
    "content": "'From Squeak3.6beta of ''4 July 2003'' [latest update: #5331] on 9 July 2003 at 12:01:38 am'!\n\"Change Set:\t\tMakePrimPointXInternal-JMM\nDate:\t\t\t9 July 2003\nAuthor:\t\t\tjohnmci@smalltalkconsulting.com\n\nAlso rearranged the primitivePointX/Y logic to interpret() internalize\"!\n\n\n!Interpreter methodsFor: 'contexts' stamp: 'jmm 7/8/2003 15:46'!\ninternalUnPop: nItems\n\tlocalSP _ localSP + (nItems*4)! !\n\n!Interpreter methodsFor: 'common selector sends' stamp: 'jmm 7/8/2003 15:57'!\nbytecodePrimPointX\n\n\tsuccessFlag _ true.\n\tself primitivePointX.\n\tsuccessFlag ifTrue: [^ self fetchNextBytecode \"success\"].\n\n\tmessageSelector _ self specialSelector: 30.\n\targumentCount _ 0.\n\tself normalSend! !\n\n!Interpreter methodsFor: 'common selector sends' stamp: 'jmm 7/8/2003 15:57'!\nbytecodePrimPointY\n\n\tsuccessFlag _ true.\n\tself primitivePointY.\n\tsuccessFlag ifTrue: [^ self fetchNextBytecode \"success\"].\n\n\tmessageSelector _ self specialSelector: 31.\n\targumentCount _ 0.\n\tself normalSend! !\n\n!Interpreter methodsFor: 'object access primitives' stamp: 'jmm 7/8/2003 15:53'!\nprimitivePointX\n\t| rcvr | \n\tself inline: true.\n\trcvr _ self internalStackTop.\n\tself internalPop: 1.\t\n\tself assertClassOf: rcvr is: (self splObj: ClassPoint).\n\tsuccessFlag\n\t\tifTrue: [self internalPush: (self fetchPointer: XIndex ofObject: rcvr)]\n\t\tifFalse: [self internalUnPop: 1]! !\n\n!Interpreter methodsFor: 'object access primitives' stamp: 'jmm 7/8/2003 15:53'!\nprimitivePointY\n\t| rcvr | \n\tself inline: true.\n\trcvr _ self internalStackTop.\n\tself internalPop: 1.\t\n\tself assertClassOf: rcvr is: (self splObj: ClassPoint).\n\tsuccessFlag\n\t\tifTrue: [self internalPush: (self fetchPointer: YIndex ofObject: rcvr)]\n\t\tifFalse: [self internalUnPop: 1]! !\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/specialChangeSets/Old/SlightlyFasterActivate-JMM.3.cs",
    "content": "'From Squeak3.6beta of ''4 July 2003'' [latest update: #5373] on 7 August 2003 at 2:27:37 pm'!\n\"Change Set:\t\tSlightlyFasterActivate-JMM\nDate:\t\t\t6 August 2003\nAuthor:\t\t\tjohnmci@smalltalkconsulting.com\n\nAlter activateNewMethod to simplify common subexpressions for the compiler and to simplify the two for loops so gcc can produce better assembler. This results in a 2% faster send/sec rate for powerpc\"!\n\n\n!Interpreter methodsFor: 'message sending' stamp: 'JMM 8/6/2003 09:48'!\nactivateNewMethod\n\t| newContext methodHeader initialIP tempCount nilOop where |\n\tmethodHeader _ self headerOf: newMethod.\n\tnewContext _ self allocateOrRecycleContext: (methodHeader bitAnd: LargeContextBit).\n\n\tinitialIP _ ((LiteralStart + (self literalCountOfHeader: methodHeader)) * 4) + 1.\n\ttempCount _ (methodHeader >> 19) bitAnd: 16r3F.\n\n\t\"Assume: newContext will be recorded as a root if necessary by the\n\t call to newActiveContext: below, so we can use unchecked stores.\"\n\n\twhere _  (self cCoerce: newContext to: 'char *') + BaseHeaderSize.\n\tself longAt: where + (SenderIndex << 2) put: activeContext.\n\tself longAt: where + (InstructionPointerIndex << 2) put: (self integerObjectOf: initialIP).\n\tself longAt: where + (StackPointerIndex << 2) put: (self integerObjectOf: tempCount).\n\tself longAt: where + (MethodIndex << 2) put: newMethod.\n\n\t\"Copy the reciever and arguments...\"\n\t0 to: argumentCount do:\n\t\t[:i | self longAt: where + ((ReceiverIndex+i) << 2) put: (self stackValue: argumentCount-i)].\n\n\t\"clear remaining temps to nil in case it has been recycled\"\n\tnilOop _ nilObj.\n\targumentCount+1+ReceiverIndex to: tempCount+ReceiverIndex do:\n\t\t[:i | self longAt: where + (i << 2) put: nilOop].\n\n\tself pop: argumentCount + 1.\n\treclaimableContextCount _ reclaimableContextCount + 1.\n\tself newActiveContext: newContext.! !\n\n!Interpreter methodsFor: 'message sending' stamp: 'JMM 8/7/2003 14:27'!\ninternalActivateNewMethod\n\t| methodHeader newContext tempCount argCount2 needsLarge where |\n\tself inline: true.\n\n\tmethodHeader _ self headerOf: newMethod.\n\tneedsLarge _ methodHeader bitAnd: LargeContextBit.\n\t(needsLarge = 0 and: [freeContexts ~= NilContext])\n\t\tifTrue: [newContext _ freeContexts.\n\t\t\t\tfreeContexts _ self fetchPointer: 0 ofObject: newContext]\n\t\tifFalse: [\"Slower call for large contexts or empty free list\"\n\t\t\t\tself externalizeIPandSP.\n\t\t\t\tnewContext _ self allocateOrRecycleContext: needsLarge.\n\t\t\t\tself internalizeIPandSP].\n\ttempCount _ (methodHeader >> 19) bitAnd: 16r3F.\n\n\t\"Assume: newContext will be recorded as a root if necessary by the\n\t call to newActiveContext: below, so we can use unchecked stores.\"\n\twhere _  (self cCoerce: newContext to: 'char *') + BaseHeaderSize.\n\tself longAt: where + (SenderIndex << 2) put: activeContext.\n\tself longAt: where + (InstructionPointerIndex << 2) put: (self integerObjectOf:\n\t\t\t(((LiteralStart + (self literalCountOfHeader: methodHeader)) * 4) + 1)).\n\tself longAt: where + (StackPointerIndex << 2) put: (self integerObjectOf: tempCount).\n\tself longAt: where + (MethodIndex << 2) put: newMethod.\n\n\t\"Copy the reciever and arguments...\"\n\targCount2 _ argumentCount.\n\t0 to: argCount2 do:\n\t\t[:i | self longAt: where + ((ReceiverIndex+i) << 2) put: (self internalStackValue: argCount2-i)].\n\n\t\"clear remaining temps to nil in case it has been recycled\"\n\tmethodHeader _ nilObj.  \"methodHeader here used just as faster (register?) temp\"\n\targCount2+1+ReceiverIndex to: tempCount+ReceiverIndex do:\n\t\t[:i | self longAt: where + (i << 2) put: methodHeader].\n\n\tself internalPop: argCount2 + 1.\n\treclaimableContextCount _ reclaimableContextCount + 1.\n\tself internalNewActiveContext: newContext.\n ! !\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/specialChangeSets/Old/VMM38-64bit-imageUpdates.1.cs",
    "content": "'From Squeak3.8gamma of ''24 November 2004'' [latest update: #6599] on 27 April 2005 at 11:08:01 am'!\r\"Change Set:\t\tVMM38-64bit-imageUpdates\rDate:\t\t\t2005-04-27\rAuthor:\t\t\ttim@rowledge.org, derived from original by ian.piumarta@squeakland.org and johnmci@smalltalkconsultants.com\r\rChanges relative to 3.8g-6548 that add some initial 64-bit support to the image. Needs to go into the update stream asap\"!\r\r\r!SmalltalkImage methodsFor: 'vm parameters' stamp: 'tpr 4/27/2005 11:03'!\rvmParameterAt: parameterIndex\r\t\"parameterIndex is a positive integer corresponding to one of the VM's internal\r\tparameter/metric registers.  Answer with the current value of that register.\r\tFail if parameterIndex has no corresponding register.\r\tVM parameters are numbered as follows:\r\t\t1\tend of old-space (0-based, read-only)\r\t\t2\tend of young-space (read-only)\r\t\t3\tend of memory (read-only)\r\t\t4\tallocationCount (read-only)\r\t\t5\tallocations between GCs (read-write)\r\t\t6\tsurvivor count tenuring threshold (read-write)\r\t\t7\tfull GCs since startup (read-only)\r\t\t8\ttotal milliseconds in full GCs since startup (read-only)\r\t\t9\tincremental GCs since startup (read-only)\r\t\t10\ttotal milliseconds in incremental GCs since startup (read-only)\r\t\t11\ttenures of surving objects since startup (read-only)\r\t\t12-20 specific to the translating VM\r\t\t21\troot table size (read-only)\r\t\t22\troot table overflows since startup (read-only)\r\t\t23\tbytes of extra memory to reserve for VM buffers, plugins, etc.\r\r\t\t24\tmemory threshold above which shrinking object memory (rw)\r\t\t25\tmemory headroom when growing object memory (rw)\r\t\t26  interruptChecksEveryNms - force an ioProcessEvents every N milliseconds, in case the image  is not calling getNextEvent often (rw)\r\t\t27\tnumber of times mark loop iterated for current IGC/FGC (read-only) includes ALL marking\r\t\t28\tnumber of times sweep loop iterated  for current IGC/FGC (read-only)\r\t\t29\tnumber of times make forward loop iterated for current IGC/FGC (read-only)\r\t\t30\tnumber of times compact move loop iterated for current IGC/FGC (read-only)\r\t\t31\tnumber of grow memory requests (read-only)\r\t\t32\tnumber of shrink memory requests (read-only)\r\t\t33\tnumber of root table entries used for current IGC/FGC (read-only)\r\t\t34\tnumber of allocations done before current IGC/FGC (read-only)\r\t\t35\tnumber of survivor objects after current IGC/FGC (read-only)\r\t\t36  millisecond clock when current IGC/FGC completed (read-only)\r\t\t37  number of marked objects for Roots of the world, not including Root Table entries for current IGC/FGC (read-only)\r\t\t38  milliseconds taken by current IGC  (read-only)\r\t\t39  Number of finalization signals for Weak Objects pending when current IGC/FGC completed (read-only)\r\t\t40  VM word size - 4 or 8 (read-only)\"\r\r\t<primitive: 254>\r\tself primitiveFailed! !\r\r\r!SystemDictionary methodsFor: 'sources, change log' stamp: 'JMM 4/13/2005 20:35'!\rwordSize\r\t\"Answer the size (in bytes) of an object pointer.\"\r\t\"Smalltalk wordSize\"\r\r\t^[SmalltalkImage current vmParameterAt: 40] on: Error do: [4]! !\r\r!SystemDictionary methodsFor: 'deprecated' stamp: 'tpr 4/27/2005 11:04'!\rvmParameterAt: parameterIndex\r\t\"See comment for SmalltalkImage>vmParameterAt:\"\r\r\t^ self deprecated: 'Use SmalltalkImage current vmParameterAt:'\r\t\tblock: [SmalltalkImage current vmParameterAt: parameterIndex]\r\t! !\r\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/specialChangeSets/Old/VMM38-gc-instrument-image.1.cs",
    "content": "'From Squeak3.8gamma of ''24 November 2004'' [latest update: #6599] on 27 April 2005 at 11:14:55 am'!\r\"Change Set:\t\tVMM38-gc-instrument-image\rDate:\t\t\t27 April 2005\rAuthor:\t\t\ttim@rowledge.org derived from original by johnmci@smalltalkconsulting.com and andreas.raab@gmx.de\r\rImage side methods to support revised GC handling of weak pointers and GC instrumentation. See SystemDictionary>forceTenure, isYoung: etc.\r\rNeeds to go into update stream asap\"!\r\r\r!SystemDictionary methodsFor: 'memory space' stamp: 'JMM 1/27/2005 13:23'!\rforceTenure\r\t\"Primitive. Tell the GC logic to force a tenure on the next increment GC.\"\r\t<primitive: 'primitiveForceTenure'>\r\t^self primitiveFailed! !\r\r!SystemDictionary methodsFor: 'memory space' stamp: 'ar 1/18/2005 16:46'!\risRoot: oop\r\t\"Primitive. Answer whether the object is currently a root for youngSpace.\"\r\t<primitive: 'primitiveIsRoot'>\r\t^self primitiveFailed! !\r\r!SystemDictionary methodsFor: 'memory space' stamp: 'ar 1/18/2005 16:47'!\risYoung: oop\r\t\"Primitive. Answer whether the object currently resides in youngSpace.\"\r\t<primitive: 'primitiveIsYoung'>\r\t^self primitiveFailed! !\r\r!SystemDictionary methodsFor: 'memory space' stamp: 'ar 1/18/2005 16:48'!\rrootTable\r\t\"Primitive. Answer a snapshot of the VMs root table. \r\tKeep in mind that the primitive may itself cause GC.\"\r\t<primitive: 'primitiveRootTable'>\r\t^self primitiveFailed! !\r\r!SystemDictionary methodsFor: 'memory space' stamp: 'ar 1/18/2005 16:49'!\rrootTableAt: index\r\t\"Primitive. Answer the nth element of the VMs root table\"\r\t<primitive: 'primitiveRootTableAt'>\r\t^nil! !\r\r!SystemDictionary methodsFor: 'memory space' stamp: 'JMM 1/27/2005 13:12'!\rsetGCBiasToGrow: aNumber\r\t\"Primitive. Indicate that the GC logic should be bias to grow\"\r\t<primitive: 'primitiveSetGCBiasToGrow'>\r\t^self primitiveFailed\r\"Example:\r\tSmalltalk setGCBiasToGrowGCLimit: 16*1024*1024.\r\tSmalltalk setGCBiasToGrow: 1.\r\"! !\r\r!SystemDictionary methodsFor: 'memory space' stamp: 'JMM 1/27/2005 12:27'!\rsetGCBiasToGrowGCLimit: aNumber\r\t\"Primitive. Indicate that the bias to grow logic should do a GC after aNumber Bytes\"\r\t<primitive: 'primitiveSetGCBiasToGrowGCLimit'>\r\t^self primitiveFailed\r\"Example:\r\tSmalltalk setGCBiasToGrowGCLimit: 16*1024*1024.\r\"! !\r\r!SystemDictionary methodsFor: 'memory space' stamp: 'ar 1/18/2005 16:54'!\rsetGCSemaphore: semaIndex\r\t\"Primitive. Indicate the GC semaphore index to be signaled on GC occurance.\"\r\t<primitive: 'primitiveSetGCSemaphore'>\r\t^self primitiveFailed\r\"Example:\r\r\t| index sema process |\r\tsema := Semaphore new.\r\tindex := Smalltalk registerExternalObject: sema.\r\tSmalltalk setGCSemaphore: index.\r\tprocess := [\r\t\t[[true] whileTrue:[\r\t\t\tsema wait.\r\t\t\tSmalltalk beep.\r\t\t]] ensure:[\r\t\t\tSmalltalk setGCSemaphore: 0.\r\t\t\tSmalltalk unregisterExternalObject: sema.\r\t\t].\r\t] fork.\r\tprocess inspect.\r\"! !\r\r!SystemDictionary methodsFor: 'special objects' stamp: 'JMM 1/27/2005 12:17'!\rrecreateSpecialObjectsArray    \"Smalltalk recreateSpecialObjectsArray\"\r\t\"The Special Objects Array is an array of object pointers used by the\r\tSqueak virtual machine.  Its contents are critical and unchecked,\r\tso don't even think of playing here unless you know what you are doing.\"\r\t| newArray |\r\tnewArray _ Array new: 50.\r\t\"Nil false and true get used throughout the interpreter\"\r\tnewArray at: 1 put: nil.\r\tnewArray at: 2 put: false.\r\tnewArray at: 3 put: true.\r\t\"This association holds the active process (a ProcessScheduler)\"\r\tnewArray at: 4 put: (Smalltalk associationAt: #Processor).\r\t\"Numerous classes below used for type checking and instantiation\"\r\tnewArray at: 5 put: Bitmap.\r\tnewArray at: 6 put: SmallInteger.\r\tnewArray at: 7 put: String.\r\tnewArray at: 8 put: Array.\r\tnewArray at: 9 put: Smalltalk. \r\tnewArray at: 10 put: Float.\r\tnewArray at: 11 put: MethodContext.\r\tnewArray at: 12 put: BlockContext.\r\tnewArray at: 13 put: Point.\r\tnewArray at: 14 put: LargePositiveInteger.\r\tnewArray at: 15 put: Display.\r\tnewArray at: 16 put: Message.\r\tnewArray at: 17 put: CompiledMethod.\r\tnewArray at: 18 put: (self specialObjectsArray at: 18)  \"(low space Semaphore)\".\r\tnewArray at: 19 put: Semaphore.\r\tnewArray at: 20 put: Character.\r\tnewArray at: 21 put: #doesNotUnderstand:.\r\tnewArray at: 22 put: #cannotReturn:.\r\tnewArray at: 23 put: nil.  \"*unused*\"\r\t\"An array of the 32 selectors that are compiled as special bytecodes,\r\tpaired alternately with the number of arguments each takes.\"\r\tnewArray at: 24 put: #(+ 1 - 1 < 1 > 1 <= 1 >= 1 = 1 ~= 1 * 1 / 1 \\\\ 1 @ 1 bitShift: 1 // 1 bitAnd: 1 bitOr: 1 at: 1 at:put: 2 size 0 next 0 nextPut: 1 atEnd 0 == 1 class 0 blockCopy: 1 value 0 value: 1 do: 1 new 0 new: 1 x 0 y 0 ).\r\t\"An array of the 255 Characters in ascii order.\"\r\tnewArray at: 25 put: ((0 to: 255) collect: [:ascii | Character value: ascii]).\r\tnewArray at: 26 put: #mustBeBoolean.\r\tnewArray at: 27 put: ByteArray.\r\tnewArray at: 28 put: Process.\r\t\"An array of up to 31 classes whose instances will have compact headers\"\r\tnewArray at: 29 put: self compactClassesArray.\r\tnewArray at: 30 put: (self specialObjectsArray at: 30)   \"(delay Semaphore)\".\r\tnewArray at: 31 put: (self specialObjectsArray at: 31)   \"(user interrupt Semaphore)\".\r\tnewArray at: 32 put: nil. \r\tnewArray at: 33 put: nil.\r\tnewArray at: 34 put: nil.\r\tnewArray at: 35 put: #cannotInterpret:.\r\t\"Note: This must be fixed once we start using context prototypes\"\r\tnewArray at: 36 put: (self specialObjectsArray at: 36). \r\t\t\t\t\t\t\"(MethodContext new: CompiledMethod fullFrameSize).\"\r\tnewArray at: 37 put: nil.\r\tnewArray at: 38 put: (self specialObjectsArray at: 38). \r\t\t\t\t\t\t\"(BlockContext new: CompiledMethod fullFrameSize).\"\r\r\tnewArray at: 39 put: Array new.  \"array of objects referred to by external code\"\r\r\tnewArray at: 40 put: PseudoContext.\r\tnewArray at: 41 put: TranslatedMethod.\r\r\t\"finalization Semaphore\"\r\tnewArray at: 42 put: ((self specialObjectsArray at: 42) ifNil:[Semaphore new]).\r\r\tnewArray at: 43 put: LargeNegativeInteger.\r\r\t\"External objects for callout.\r\tNote: Written so that one can actually completely remove the FFI.\"\r\tnewArray at: 44 put: (Smalltalk at: #ExternalAddress ifAbsent:[nil]).\r\tnewArray at: 45 put: (Smalltalk at: #ExternalStructure ifAbsent:[nil]).\r\tnewArray at: 46 put: (Smalltalk at: #ExternalData ifAbsent:[nil]).\r\tnewArray at: 47 put: (Smalltalk at: #ExternalFunction ifAbsent:[nil]).\r\tnewArray at: 48 put: (Smalltalk at: #ExternalLibrary ifAbsent:[nil]).\r\r\tnewArray at: 49 put: #aboutToReturn:through:.\r\tnewArray at: 50 put: #run:with:in:.\r\r\t\"Now replace the interpreter's reference in one atomic operation\"\r\tself specialObjectsArray become: newArray! !\r\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/specialChangeSets/Old/VmUpdates-dtl/JMM-VmUpdates32bitclean.2.cs",
    "content": "'From Squeak3.8.1 of ''28 Aug 2006'' [latest update: #6747] on 9 June 2007 at 5:30:55 pm'!\r\r!ObjectMemory methodsFor: 'header access' stamp: 'JMM 6/9/2007 15:31'!\rsizeOfFree: oop\r\t\"Return the size of the given chunk in bytes. Argument MUST be a free chunk.\"\r\tself returnTypeC: 'usqInt'.\r\t^ (self longAt: oop) bitAnd: AllButTypeMask! !\r\r!ObjectMemory methodsFor: 'garbage collection' stamp: 'JMM 6/9/2007 15:38'!\rincrementalGC\r\t\"Do a mark/sweep garbage collection of just the young object \r\tarea of object memory (i.e., objects above youngStart), using \r\tthe root table to identify objects containing pointers to \r\tyoung objects from the old object area.\"\r\t| survivorCount startTime weDidGrow |\r\tself inline: false.\r\trootTableCount >= RootTableSize\r\t\tifTrue: [\"root table overflow; cannot do an incremental GC (this should be very rare)\"\r\t\t\tstatRootTableOverflows := statRootTableOverflows + 1.\r\t\t\t^ self fullGC].\r\tDoAssertionChecks\r\t\tifTrue: [self reverseDisplayFrom: 8 to: 15.\r\t\t\tself validateRoots; validate].\r\r\tself preGCAction: false.\r\t\"incremental GC and compaction\"\r\r\tstartTime := self ioMicroMSecs.\r\tweakRootCount := 0.\r\tstatSweepCount := statMarkCount := statMkFwdCount := statCompMoveCount := 0.\r\tself markPhase.\r\t1 to: weakRootCount do:[:i| self finalizeReference: (weakRoots at: i)].\r\tsurvivorCount := self sweepPhase.\r\tself incrementalCompaction.\r\tstatAllocationCount := allocationCount.\r\tallocationCount := 0.\r\tstatIncrGCs := statIncrGCs + 1.\r\tstatGCTime := self ioMicroMSecs.\r\tstatIGCDeltaTime := statGCTime - startTime.\r\tstatIncrGCMSecs := statIncrGCMSecs + statIGCDeltaTime.\r\tself capturePendingFinalizationSignals.\r\r\tself forceInterruptCheck. \"Force an an interrupt check ASAP.We could choose to be clever here and only do this under certain time conditions. Keep it simple for now\"\r\t\r\tstatRootTableCount  := rootTableCount.\r\tstatSurvivorCount := survivorCount.\r\tweDidGrow := false.\r\t(((survivorCount > tenuringThreshold)\r\t\t\tor: [rootTableCount >= RootTableRedZone])\r\t\t\tor: [forceTenureFlag == true])\r\t\tifTrue: [\"move up the young space boundary if \r\t\t\t* there are too many survivors: \r\t\t\tthis limits the number of objects that must be \r\t\t\tprocessed on future incremental GC's \r\t\t\t* we're about to overflow the roots table \r\t\t\tthis limits the number of full GCs that may be caused \r\t\t\tby root table overflows in the near future\"\r\t\t\tforceTenureFlag := false.\r\t\t\tstatTenures := statTenures + 1.\r\t\t\tself clearRootsTable.\r\t\t\t(((self oop: (self sizeOfFree: freeBlock) isLessThan: growHeadroom)) and: \r\t\t\t\t[gcBiasToGrow > 0]) \r\t\t\t\tifTrue: [self biasToGrow.\r\t\t\t\t\t\tweDidGrow := true].\r\t\t\tyoungStart := freeBlock].\r\tself postGCAction.\r\tDoAssertionChecks\r\t\tifTrue: [self validateRoots; validate.\r\t\t\tself reverseDisplayFrom: 8 to: 15].\r\tweDidGrow ifTrue: [self biasToGrowCheckGCLimit]! !\r\r!ObjectMemory methodsFor: 'gc -- compaction' stamp: 'JMM 6/9/2007 12:06'!\rincCompMove: bytesFreed \r\t\"Move all non-free objects between compStart and compEnd to their new  \r\tlocations, restoring their headers in the process. Create a new free  \r\tblock at the end of memory. Return the newly created free chunk. \"\r\t\"Note: The free block used by the allocator always must be the last free  \r\tblock in memory. It may take several compaction passes to make all  \r\tfree space bubble up to the end of memory.\"\r\t| oop next fwdBlock newOop header bytesToMove firstWord lastWord newFreeChunk sz target |\r\tself inline: false.\r\tself var: #firstWord type: 'usqInt'.\r\tself var: #lastWord type: 'usqInt'.\r\tself var: #w type: 'usqInt'.\r\tnewOop := nil.\r\toop := self oopFromChunk: compStart.\r\t[self oop: oop isLessThan: compEnd]\r\t\twhileTrue: [statCompMoveCount := statCompMoveCount + 1.\r\t\t\tnext := self objectAfterWhileForwarding: oop.\r\t\t\t(self isFreeObject: oop)\r\t\t\t\tifFalse: [\"a moving object; unwind its forwarding block\"\r\t\t\t\t\tfwdBlock := ((self longAt: oop) bitAnd: AllButMarkBitAndTypeMask) << 1.\r\t\t\t\t\tDoAssertionChecks\r\t\t\t\t\t\tifTrue: [self fwdBlockValidate: fwdBlock].\r\t\t\t\t\tnewOop := self longAt: fwdBlock.\r\t\t\t\t\theader := self longAt: fwdBlock + BytesPerWord.\r\t\t\t\t\tself longAt: oop put: header. \"restore the original header\"\r\t\t\t\t\tbytesToMove := oop - newOop. \"move the oop (including any extra header words) \"\r\t\t\t\t\tsz := self sizeBitsOf: oop.\r\t\t\t\t\tfirstWord := oop - (self extraHeaderBytes: oop).\r\t\t\t\t\tlastWord := oop + sz - BaseHeaderSize.\r\t\t\t\t\ttarget := firstWord - bytesToMove.\r\t\t\t\t\tfirstWord to: lastWord by: BytesPerWord\r\t\t\t\t\t\tdo: [:w | \r\t\t\t\t\t\t\tself longAt: target put: (self longAt: w).\r\t\t\t\t\t\t\ttarget := target + BytesPerWord]].\r\t\t\toop := next].\r\tnewOop = nil\r\t\tifTrue: [\"no objects moved\"\r\t\t\toop := self oopFromChunk: compStart.\r\t\t\t((self isFreeObject: oop) and: [(self objectAfter: oop) = (self oopFromChunk: compEnd)])\r\t\t\t\tifTrue: [newFreeChunk := oop]\r\t\t\t\tifFalse: [newFreeChunk := freeBlock]]\r\t\tifFalse: [\"initialize the newly freed memory chunk\"\r\t\t\t\"newOop is the last object moved; free chunk starts \r\t\t\tright after it\"\r\t\t\tnewFreeChunk := newOop + (self sizeBitsOf: newOop).\r\t\t\tself setSizeOfFree: newFreeChunk to: bytesFreed].\r\tDoAssertionChecks\r\t\tifTrue: [(self objectAfter: newFreeChunk) = (self oopFromChunk: compEnd)\r\t\t\t\tifFalse: [self error: 'problem creating free chunk after compaction']].\r\t(self objectAfter: newFreeChunk) = endOfMemory\r\t\tifTrue: [self initializeMemoryFirstFree: newFreeChunk]\r\t\tifFalse: [\"newFreeChunk is not at end of memory; re-install freeBlock \"\r\t\t\tself initializeMemoryFirstFree: freeBlock].\r\t^ newFreeChunk! !\r\r\r!Interpreter methodsFor: 'object memory support' stamp: 'JMM 6/9/2007 15:36'!\rpostGCAction\r\t\"Mark the active and home contexts as roots if old. This \r\tallows the interpreter to use storePointerUnchecked to \r\tstore into them.\"\r\r\tcompilerInitialized\r\t\tifTrue: [self compilerPostGC]\r\t\tifFalse: [(self oop: activeContext isLessThan: youngStart)\r\t\t\t\tifTrue: [self beRootIfOld: activeContext].\r\t\t\t(self oop: theHomeContext isLessThan: youngStart)\r\t\t\t\tifTrue: [self beRootIfOld: theHomeContext]].\r\t(self oop: (self sizeOfFree: freeBlock) isGreaterThan:  shrinkThreshold)\r\t\tifTrue: [\"Attempt to shrink memory after successfully \r\t\t\treclaiming lots of memory\"\r\t\t\tself shrinkObjectMemory: (self sizeOfFree: freeBlock) - growHeadroom].\r\t\r\tself signalSemaphoreWithIndex: gcSemaphoreIndex.\r! !\r\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/specialChangeSets/Old/VmUpdates-dtl/VMMaker-wbk.40.8.cs",
    "content": "'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 8 October 2006 at 11:18:31 pm'!\r\r!CCodeGenerator methodsFor: 'C translation' stamp: 'ar 12/18/2004 18:10'!\rgenerateAddressOf: node on: aStream indent: level\r\t\"Generate the C code for this message onto the given stream.\"\r\taStream nextPutAll: '((int)&'.\r\tself emitCExpression: node args first on: aStream.\r\taStream nextPutAll: ')'.\r! !\r\r!CCodeGenerator methodsFor: 'C translation' stamp: 'ar 12/18/2004 18:00'!\rinitializeCTranslationDictionary \r\t\"Initialize the dictionary mapping message names to actions for C code generation.\"\r\r\t| pairs |\r\tpairs _ #(\r\t#&\t\t\t\t#generateAnd:on:indent:\r\t#|\t\t\t\t#generateOr:on:indent:\r\t#and:\t\t\t#generateSequentialAnd:on:indent:\r\t#or:\t\t\t#generateSequentialOr:on:indent:\r\t#not\t\t\t#generateNot:on:indent:\r\r\t#+\t\t\t\t#generatePlus:on:indent:\r\t#-\t\t\t\t#generateMinus:on:indent:\r\t#*\t\t\t\t#generateTimes:on:indent:\r\t#/\t\t\t\t#generateDivide:on:indent:\r\t#//\t\t\t\t#generateDivide:on:indent:\r\t#\\\\\t\t\t\t#generateModulo:on:indent:\r\t#<<\t\t\t\t#generateShiftLeft:on:indent:\r\t#>>\t\t\t\t#generateShiftRight:on:indent:\r\t#min:\t\t\t#generateMin:on:indent:\r\t#max:\t\t\t#generateMax:on:indent:\r\r\t#bitAnd:\t\t#generateBitAnd:on:indent:\r\t#bitOr:\t\t\t#generateBitOr:on:indent:\r\t#bitXor:\t\t\t#generateBitXor:on:indent:\r\t#bitShift:\t\t#generateBitShift:on:indent:\r\t#bitInvert32\t#generateBitInvert32:on:indent:\r\r\t#<\t\t\t\t#generateLessThan:on:indent:\r\t#<=\t\t\t\t#generateLessThanOrEqual:on:indent:\r\t#=\t\t\t\t#generateEqual:on:indent:\r\t#>\t\t\t\t#generateGreaterThan:on:indent:\r\t#>=\t\t\t\t#generateGreaterThanOrEqual:on:indent:\r\t#~=\t\t\t\t#generateNotEqual:on:indent:\r\t#==\t\t\t\t#generateEqual:on:indent:\r\t#~~\t\t\t\t#generateNotEqual:on:indent:\r\t#isNil\t\t\t#generateIsNil:on:indent:\r\t#notNil\t\t\t#generateNotNil:on:indent:\r\r\t#whileTrue: \t#generateWhileTrue:on:indent:\r\t#whileFalse:\t#generateWhileFalse:on:indent:\r\t#whileTrue \t\t#generateDoWhileTrue:on:indent:\r\t#whileFalse\t\t#generateDoWhileFalse:on:indent:\r\t#to:do:\t\t\t#generateToDo:on:indent:\r\t#to:by:do:\t\t#generateToByDo:on:indent:\r\r\t#ifTrue:\t\t#generateIfTrue:on:indent:\r\t#ifFalse:\t\t#generateIfFalse:on:indent:\r\t#ifTrue:ifFalse:\t#generateIfTrueIfFalse:on:indent:\r\t#ifFalse:ifTrue:\t#generateIfFalseIfTrue:on:indent:\r\r\t#at:\t\t\t\t#generateAt:on:indent:\r\t#at:put:\t\t\t#generateAtPut:on:indent:\r\t#basicAt:\t\t#generateAt:on:indent:\r\t#basicAt:put:\t#generateAtPut:on:indent:\r\r\t#integerValueOf:\t#generateIntegerValueOf:on:indent:\r\t#integerObjectOf:\t#generateIntegerObjectOf:on:indent:\r\t#isIntegerObject: \t#generateIsIntegerObject:on:indent:\r\t#cCode:\t\t\t\t#generateInlineCCode:on:indent:\r\t#cCode:inSmalltalk:\t#generateInlineCCode:on:indent:\r\t#cCoerce:to:\t\t\t#generateCCoercion:on:indent:\r\t#preIncrement\t\t#generatePreIncrement:on:indent:\r\t#preDecrement\t\t#generatePreDecrement:on:indent:\r\t#inline:\t\t\t\t#generateInlineDirective:on:indent:\r\t#sharedCodeNamed:inCase:\t#generateSharedCodeDirective:on:indent:\r\t#asFloat\t\t\t\t#generateAsFloat:on:indent:\r\t#asInteger\t\t\t#generateAsInteger:on:indent:\r\t#anyMask:\t\t\t#generateBitAnd:on:indent:\r\t#raisedTo:\t\t\t#generateRaisedTo:on:indent:\r\t#touch:\t\t\t\t#generateTouch:on:indent:\r\r\t#perform:\t\t\t\t\t\t#generatePerform:on:indent:\r\t#perform:with:\t\t\t\t\t#generatePerform:on:indent:\r\t#perform:with:with:\t\t\t\t#generatePerform:on:indent:\r\t#perform:with:with:with:\t\t#generatePerform:on:indent:\r\t#perform:with:with:with:with:\t#generatePerform:on:indent:\r\t\t\r\t#addressOf:\t\t\t#generateAddressOf:on:indent:\r\r\t).\r\ttranslationDict _ Dictionary new: pairs size // 2.\r\r\t1 to: pairs size by: 2 do: [:i |\r\t\ttranslationDict at: (pairs at: i) put: (pairs at: i + 1)].\r! !\r\r\r!ObjectMemory methodsFor: 'allocation' stamp: 'wbk 6/8/2006 22:50'!\rrecycleContextIfPossible: cntxOop \r\t\"If possible, save the given context on a list of free contexts to \r\tbe recycled.\"\r\t\"Note: The context is not marked free, so it can be reused \r\twith minimal fuss. The recycled context lists are cleared at \r\tevery garbage collect.\"\r\t| header |\r\tself inline: true.\r\t\"only recycle young contexts (which should be most of them)\"\r\tcntxOop >= youngStart\r\t\tifTrue: [header := self baseHeader: cntxOop.\r\t\t\t(self isMethodContextHeader: header)\r\t\t\t\tifTrue: [\"It's a young context, alright.\"\r\t\t\t\t\tself \"Clear the slot that indicates it was compiled\"\r\t\t\t\t\t\tstorePointerUnchecked: 4\r\t\t\t\t\t\tofObject: cntxOop\r\t\t\t\t\t\twithValue: nilObj.\r\t\t\t\t\t(header bitAnd: SizeMask) = SmallContextSize\r\t\t\t\t\t\tifTrue: [\"Recycle small contexts\"\r\t\t\t\t\t\t\tself storePointerUnchecked: 0 ofObject: cntxOop withValue: freeContexts.\r\t\t\t\t\t\t\tfreeContexts := cntxOop].\r\t\t\t\t\t(header bitAnd: SizeMask) = LargeContextSize\r\t\t\t\t\t\tifTrue: [\"Recycle large contexts\"\r\t\t\t\t\t\t\tself storePointerUnchecked: 0 ofObject: cntxOop withValue: freeLargeContexts.\r\t\t\t\t\t\t\tfreeLargeContexts := cntxOop]]]! !\r\r\r!Interpreter methodsFor: 'message sending' stamp: 'wbk 4/18/2004 20:57'!\rfindNewMethodInClass: class \r\t\"Find the compiled method to be run when the current messageSelector is sent to the given class, setting the values of 'newMethod' and 'primitiveIndex'.\"\r\r\t| ok |\r\tself inline: false.\r\tok := self \r\t\t\t\tlookupInMethodCacheSel: messageSelector\r\t\t\t\tclass: class.\r\tok ifFalse: \r\t\t\t[\"entry was not found in the cache; look it up the hard way\"\r\r\t\t\tself lookupMethodInClass: class.\r\t\t\tlkupClass := class.\r\t\t\tself exuperyLookupMethodHook.\r\t\t\tself addNewMethodToCache]! !\r\r!Interpreter methodsFor: 'message sending' stamp: 'wbk 10/3/2006 23:18'!\rinternalExecuteNewMethod\r\t| localPrimIndex delta nArgs |\r\tself inline: true.\r\r\t\" Call a compiled method if it's availible\"\t\r\tnewNativeMethod = nil ifFalse:\r\t\t[self externalizeIPandSP.\r\t\tself exuperyCallMethod.\r\t\tself internalizeIPandSP.\r\t\t^ self].\r\r\tlocalPrimIndex := primitiveIndex.\r\tlocalPrimIndex > 0\r\t\tifTrue: [(localPrimIndex > 255\r\t\t\t\t\tand: [localPrimIndex < 520])\r\t\t\t\tifTrue: [\"Internal return instvars\"\r\t\t\t\t\tlocalPrimIndex >= 264\r\t\t\t\t\t\tifTrue: [^ self internalPop: 1 thenPush: (self fetchPointer: localPrimIndex - 264 ofObject: self internalStackTop)]\r\t\t\t\t\t\tifFalse: [\"Internal return constants\"\r\t\t\t\t\t\t\tlocalPrimIndex = 256 ifTrue: [^ nil].\r\t\t\t\t\t\t\tlocalPrimIndex = 257 ifTrue: [^ self internalPop: 1 thenPush: trueObj].\r\t\t\t\t\t\t\tlocalPrimIndex = 258 ifTrue: [^ self internalPop: 1 thenPush: falseObj].\r\t\t\t\t\t\t\tlocalPrimIndex = 259 ifTrue: [^ self internalPop: 1 thenPush: nilObj].\r\t\t\t\t\t\t\t^ self internalPop: 1 thenPush: (self integerObjectOf: localPrimIndex - 261)]]\r\t\t\t\tifFalse: [self externalizeIPandSP.\r\t\t\t\t\t\"self primitiveResponse. <-replaced with  manually inlined code\"\r\t\t\t\t\tDoBalanceChecks\r\t\t\t\t\t\tifTrue: [\"check stack balance\"\r\t\t\t\t\t\t\tnArgs := argumentCount.\r\t\t\t\t\t\t\tdelta := stackPointer - activeContext].\r\t\t\t\t\tsuccessFlag := true.\r\t\t\t\t\tself dispatchFunctionPointer: primitiveFunctionPointer. \"branch direct to prim function from address stored in mcache\"\r\t\t\t\t\tDoBalanceChecks\r\t\t\t\t\t\tifTrue: [(self balancedStack: delta afterPrimitive: localPrimIndex withArgs: nArgs)\r\t\t\t\t\t\t\t\tifFalse: [self printUnbalancedStack: localPrimIndex]].\r\t\t\t\t\t(self exuperyIsNativeContext: activeContext) ifTrue: [self exuperyReturn].\r\t\t\t\t\tself internalizeIPandSP.\r\t\t\t\t\tsuccessFlag\r\t\t\t\t\t\tifTrue: [self browserPluginReturnIfNeeded.\r\t\t\t\t\t\t\t^ nil]]].\r\t\"if not primitive, or primitive failed, activate the method\"\r\tself internalActivateNewMethod.\r\r\t\"check for possible interrupts at each real send\"\r\tself internalQuickCheckForInterrupts! !\r\r!Interpreter methodsFor: 'message sending' stamp: 'wbk 4/18/2004 20:57'!\rinternalFindNewMethod\r\t\"Find the compiled method to be run when the current messageSelector is sent to the class 'lkupClass', setting the values of 'newMethod' and 'primitiveIndex'.\"\r\r\t| ok |\r\tself inline: true.\r\tok := self \r\t\t\t\tlookupInMethodCacheSel: messageSelector\r\t\t\t\tclass: lkupClass.\r\tok ifFalse: \r\t\t\t[\"entry was not found in the cache; look it up the hard way\"\r\r\t\t\tself externalizeIPandSP.\r\t\t\tself lookupMethodInClass: lkupClass.\r\t\t\tself exuperyLookupMethodHook.\r\t\t\tself internalizeIPandSP.\r\t\t\tself addNewMethodToCache]! !\r\r!Interpreter methodsFor: 'processes' stamp: 'wbk 10/3/2006 22:06'!\rinternalQuickCheckForInterrupts\r\t\"Internal version of quickCheckForInterrupts for use within jumps.\"\r\r\tself inline: true.\r\t((interruptCheckCounter := interruptCheckCounter - 1) <= 0) ifTrue: [\r\t\tself externalizeIPandSP.\r\t\tself checkForInterrupts.\r\r\t\t(self exuperyIsNativeContext: activeContext) ifTrue: [self exuperyReturn].\r\r\t\tself browserPluginReturnIfNeeded.\r\r\t\tself internalizeIPandSP].\r! !\r\r!Interpreter methodsFor: 'debug support' stamp: 'JMM 10/8/2006 16:52'!\rokayActiveProcessStack\r\r\t| cntxt header|\r\r\tcntxt := activeContext.\t\r\t[cntxt = nilObj] whileFalse: [\r\t\tself okayFields: cntxt.\theader := cntxt at: 0.\r\t\t((cntxt at: 5) = 1 and: [((header >> 12) bitAnd: 16r1F) = 14 and: [(cntxt at: 2) < 1000 and: [(cntxt at: 2) ~= 1]]]) ifTrue:\r\t\t\t[self error: 'Bad instruction pointer in a native method context'].\r\r\t\tcntxt := (self fetchPointer: SenderIndex ofObject: cntxt).\t\r\t].! !\r\r!Interpreter methodsFor: 'debug support' stamp: 'wbk 3/1/2006 21:45'!\rokayFields: oop\r\t\"If this is a pointers object, check that its fields are all okay oops.\"\r\r\t| i fieldOop |\r\t(oop = nil or: [oop = 0]) ifTrue: [ ^true ].\r\t(self isIntegerObject: oop) ifTrue: [ ^true ].\r\tself okayOop: oop.\r\tself oopHasOkayClass: oop.\r\t(self isPointers: oop) ifFalse: [ ^true ].\r\t(self isContextHeader: (self baseHeader: oop))\r\t\tifTrue: [i := CtxtTempFrameStart + (self fetchStackPointerOf: oop) - 1]\r\t\tifFalse: [i := (self lengthOf: oop) - 1].\r\t[i >= 0] whileTrue: [\r\t\tfieldOop := self fetchPointer: i ofObject: oop.\r\t\t(self isIntegerObject: fieldOop) ifFalse: [\r\t\t\tself okayOop: fieldOop.\r\t\t\tself oopHasOkayClass: fieldOop.\r\t\t].\r\t\ti := i - 1.\r\t].! !\r\r!Interpreter methodsFor: 'contexts' stamp: 'wbk 2/18/2006 20:18'!\risContextHeader: aHeader\r\tself inline: true.\r\t^ ((aHeader >> 12) bitAnd: 16r1F) = 13\t\t\t\t\"BlockContext\"\r\t\tor: [((aHeader >> 12) bitAnd: 16r1F) = 14\t\t\"MethodContext\"\r\t\tor: [((aHeader >> 12) bitAnd: 16r1F) = 15\t\t\"ExuperyBlockContext\"\r\t\tor: [((aHeader >> 12) bitAnd: 16r1F) = 4]]]\t\t\"PseudoContext\"! !\r\r!Interpreter methodsFor: 'contexts' stamp: 'wbk 10/2/2006 22:17'!\rnewActiveContext: aContext\r\t\"Note: internalNewActiveContext: should track changes to this method.\"\r\r\tself storeContextRegisters: activeContext.\r\t(aContext < youngStart) ifTrue: [ self beRootIfOld: aContext ].\r\tactiveContext := aContext.\r\tself fetchContextRegisters: aContext.\r\r\tnewNativeMethod := self exuperyCompiledReturnAddress! !\r\r!Interpreter methodsFor: 'return bytecodes' stamp: 'JMM 10/8/2006 17:00'!\rcommonReturn\r\t\"Note: Assumed to be inlined into the dispatch loop.\"\r\r\t| nilOop thisCntx contextOfCaller localCntx localVal unwindMarked |\r\tself inline: true.\r\tself sharedCodeNamed: 'commonReturn' inCase: 120.\r\r\tnilOop := nilObj. \"keep in a register\"\r\tthisCntx := activeContext.\r\tlocalCntx := localReturnContext.\r\tlocalVal := localReturnValue.\r\r\t\"make sure we can return to the given context\"\r\t((localCntx = nilOop) or:\r\t [(self fetchPointer: InstructionPointerIndex ofObject: localCntx) = nilOop]) ifTrue: [\r\t\t\"error: sender's instruction pointer or context is nil; cannot return\"\r\t\t^self internalCannotReturn: localVal].\r\r\t\"If this return is not to our immediate predecessor (i.e. from a method to its sender, or from a block to its caller), scan the stack for the first unwind marked context and inform this context and let it deal with it. This provides a chance for ensure unwinding to occur.\"\r\tthisCntx := self fetchPointer: SenderIndex ofObject: activeContext.\r\r\t\"Just possibly a faster test would be to compare the homeContext and activeContext - they are of course different for blocks. Thus we might be able to optimise a touch by having a different returnTo for the blockreteurn (since we know that must return to caller) and then if active ~= home we must be doing a non-local return. I think. Maybe.\"\r\t[thisCntx = localCntx] whileFalse: [\r\t\tthisCntx = nilOop ifTrue:[\r\t\t\t\"error: sender's instruction pointer or context is nil; cannot return\"\r\t\t\t^self internalCannotReturn: localVal].\r\t\t\"Climb up stack towards localCntx. Break out to a send of #aboutToReturn:through: if an unwind marked context is found\"\r\t\tunwindMarked := self isUnwindMarked: thisCntx.\r\t\tunwindMarked ifTrue:[\r\t\t\t\"context is marked; break out\"\r\t\t\t^self internalAboutToReturn: localVal through: thisCntx].\r\t\tthisCntx := self fetchPointer: SenderIndex ofObject: thisCntx.\r ].\r\r\t\"If we get here there is no unwind to worry about. Simply terminate the stack up to the localCntx - often just the sender of the method\"\r\tthisCntx := activeContext.\r\t[thisCntx = localCntx]\r\t\twhileFalse:\r\t\t[\"climb up stack to localCntx\"\r\t\tcontextOfCaller := self fetchPointer: SenderIndex ofObject: thisCntx.\r\r\t\t\"zap exited contexts so any future attempted use will be caught\"\r\t\tself storePointerUnchecked: SenderIndex ofObject: thisCntx withValue: nilOop.\r\t\tself storePointerUnchecked: InstructionPointerIndex ofObject: thisCntx withValue: nilOop.\r\t\treclaimableContextCount > 0 ifTrue:\r\t\t\t[\"try to recycle this context\"\r\t\t\treclaimableContextCount := reclaimableContextCount - 1.\r\t\t\tself recycleContextIfPossible: thisCntx].\r\t\tthisCntx := contextOfCaller].\r\r\tactiveContext := thisCntx.\r\t(thisCntx < youngStart) ifTrue: [ self beRootIfOld: thisCntx ].\r\r\tself internalFetchContextRegisters: thisCntx.  \"updates local IP and SP\"\r\tlocalIP preIncrement.\r\tself internalPush: localVal.\r\t\r\t\"Returns into a compiled method, if the method is compiled\"\r\t(self exuperyIsNativeContext: activeContext) ifTrue: \r\t\t[self externalizeIPandSP. \r\t\tself exuperyReturn.\r\t\tself internalizeIPandSP.\r\t\tlocalIP preIncrement.].\r\tcurrentBytecode :=  self byteAtPointer: localIP\r! !\r\r!Interpreter methodsFor: 'compiler support' stamp: 'wbk 3/11/2005 23:27'!\rinitCompilerHooks\r\t\"Initialize hooks for the 'null compiler'\"\r\r\tself cCode: 'compilerHooks[1]= nullCompilerHook'.\r\tself cCode: 'compilerHooks[2]= nullCompilerHook'.\r\tself cCode: 'compilerHooks[3]= nullCompilerHook'.\r\tself cCode: 'compilerHooks[4]= nullCompilerHook'.\r\tself cCode: 'compilerHooks[5]= nullCompilerHook'.\r\tself cCode: 'compilerHooks[6]= nullCompilerHook'.\r\tself cCode: 'compilerHooks[7]= nullCompilerHook'.\r\tself cCode: 'compilerHooks[8]= nullCompilerHook'.\r\tself cCode: 'compilerHooks[9]= nullCompilerHook'.\r\tself cCode: 'compilerHooks[10]= nullCompilerHook'.\r\tself cCode: 'compilerHooks[11]= nullCompilerHook'.\r\tself cCode: 'compilerHooks[12]= nullCompilerHook'.\r\tself cCode: 'compilerHooks[13]= nullCompilerHook'.\r\tself cCode: 'compilerHooks[14]= nullCompilerHook'.\r\tself cCode: 'compilerHooks[15]= nullCompilerHook'.\r\tself cCode: 'compilerHooks[16]= nullCompilerHook'.\r\tself cCode: 'compilerHooks[17]= nullCompilerHook'.\r\tself cCode: 'compilerHooks[18]= nullCompilerHook'.\r\tself cCode: 'compilerHooks[19]= nullCompilerHook'.\r\tself cCode: 'compilerHooks[20]= nullCompilerHook'.\r\r\tcompilerInitialized := false! !\r\r!Interpreter methodsFor: 'initialization' stamp: 'JMM 10/8/2006 23:01'!\rinitializeInterpreter: bytesToShift \r\t\"Initialize Interpreter state before starting execution of a new image.\"\r\tinterpreterProxy := self sqGetInterpreterProxy.\r\tself dummyReferToProxy.\r\tself initializeObjectMemory: bytesToShift.\r\tself initCompilerHooks.\r\tactiveContext := nilObj.\r\ttheHomeContext := nilObj.\r\tmethod := nilObj.\r\treceiver := nilObj.\r\tmessageSelector := nilObj.\r\tnewMethod := nilObj.\r\tmethodClass := nilObj.\r\tlkupClass := nilObj.\r\treceiverClass := nilObj.\r\tnewNativeMethod := nil.\r\tself flushMethodCache.\r\tself loadInitialContext.\r\tself initialCleanup.\r\tinterruptCheckCounter := 0.\r\tinterruptCheckCounterFeedBackReset := 1000.\r\tinterruptChecksEveryNms := 1.\r\tnextPollTick := 0.\r\tnextWakeupTick := 0.\r\tlastTick := 0.\r\tinterruptKeycode := 2094. \"cmd-. as used for Mac but no other OS\"\r\tinterruptPending := false.\r\tsemaphoresUseBufferA := true.\r\tsemaphoresToSignalCountA := 0.\r\tsemaphoresToSignalCountB := 0.\r\tdeferDisplayUpdates := false.\r\tpendingFinalizationSignals := 0.\r\tglobalSessionID := 0.\r\t[globalSessionID = 0]\r\t\twhileTrue: [globalSessionID := self\r\t\t\t\t\t\tcCode: 'time(NULL) + ioMSecs()'\r\t\t\t\t\t\tinSmalltalk: [(Random new next * SmallInteger maxVal) asInteger]]! !\r\r!Interpreter methodsFor: 'interpreter shell' stamp: 'ikp 6/10/2004 11:01'!\rfetchByte\r\t\"This method uses the preIncrement builtin function which has no Smalltalk equivalent. Thus, it must be overridden in the simulator.\"\r\r\t^ self byteAtPointer: localIP preIncrement! !\r\r!Interpreter methodsFor: 'object memory support' stamp: 'wbk 12/26/2004 22:56'!\rmapInterpreterOops\r\t\"Map all oops in the interpreter's state to their new values \r\tduring garbage collection or a become: operation.\"\r\t\"Assume: All traced variables contain valid oops.\"\r\t| oop |\r\tnilObj := self remap: nilObj.\r\tfalseObj := self remap: falseObj.\r\ttrueObj := self remap: trueObj.\r\tspecialObjectsOop := self remap: specialObjectsOop.\r\tcompilerInitialized\r\t\tifFalse: [stackPointer := stackPointer - activeContext. \"*rel to active\"\r\t\t\tactiveContext := self remap: activeContext.\r\t\t\tstackPointer := stackPointer + activeContext. \"*rel to active\"\r\t\t\ttheHomeContext := self remap: theHomeContext].\r\tinstructionPointer := instructionPointer - method. \"*rel to method\"\r\tmethod := self remap: method.\r\tinstructionPointer := instructionPointer + method. \"*rel to method\"\r\treceiver := self remap: receiver.\r\tmessageSelector := self remap: messageSelector.\r\tnewMethod := self remap: newMethod.\r\tmethodClass := self remap: methodClass.\r\tlkupClass := self remap: lkupClass.\r\treceiverClass := self remap: receiverClass.\r\tself exuperyRemapObjectsHook.\t\"Remap objects that the compiler plugin uses\"\r\t1 to: remapBufferCount do: [:i | \r\t\t\toop := remapBuffer at: i.\r\t\t\t(self isIntegerObject: oop)\r\t\t\t\tifFalse: [remapBuffer at: i put: (self remap: oop)]]! !\r\r!Interpreter methodsFor: '*Exupery-Sends and Returns' stamp: 'JMM 10/8/2006 16:01'!\rexuperyBlock: block Value: anInteger\r\t| blockEntry answer blockArguments localArgCount|\r\tself export: true.\r\tsuccessFlag := true. \r\t\"Check the block is being called with the correct number of arguments\"\r\tlocalArgCount := self fetchPointer: 4 ofObject: block.\r\tblockArguments :=self checkedIntegerValueOf: localArgCount.\r\tself success: (anInteger = blockArguments\r\t\tand: [(self fetchPointer: CallerIndex ofObject: block) = nilObj]).\r\tsuccessFlag ifFalse: [^ nil].\r\r\tself storeContextRegisters: activeContext.\r\r\tself transfer: anInteger + 1\r\t\t\t\tfromIndex: self stackPointerIndex - anInteger + 1\r\t\t\t\tofObject: activeContext\r\t\t\t\ttoIndex: TempFrameStart\r\t\t\t\tofObject: block.\r\tself \r\t\tstoreLong32: StackPointerIndex \r\t\tofObject: activeContext\r\t\twithValue: (self fetchPointer: StackPointerIndex ofObject: activeContext) - \r\t\t\t((anInteger + 1) * 2).\r\r\tself storePointerUnchecked: SenderIndex ofObject: block withValue: activeContext.\r\tblockEntry := (self fetchPointer: 5 \"IP\" ofObject: block) - 1.\r\tactiveContext := block.\r\t\"Set the interpreter's stack pointer so the primitive code will set the block's\r\tstack pointer correctly\"\r\tstackPointer := activeContext + BaseHeaderSize + (TempFrameStart - 1 * 4).\r\tnewNativeMethod isNil\r\t\tifTrue:\r\t\t\t[answer := self cCode: '( (int (*)())blockEntry)()'.\r\t\t\tself fetchContextRegisters: activeContext.]\r\t\tifFalse: \r\t\t\t[newNativeMethod := blockEntry].\r! !\r\r!Interpreter methodsFor: '*Exupery-Sends and Returns' stamp: 'wbk 10/1/2006 20:41'!\rexuperyCallMethod\r\t\"Could move into compiled return sequence.\r\t\t\t\t\t\t\t\t\t\t\tIt depends on how message sends end up working.\"\r\r\t| answer activeCntxt nativeMethod |\r\tself inline: false.\r\tactiveCntxt := activeContext.\r\tnativeMethod := newNativeMethod.\r\t\"Exupery only uses the active context, the rest it will get directly from the MethodContext object.\"\r\tself storeContextRegisters: activeContext.\r\tanswer := self cCode: '( (int (*)(int))nativeMethod)(activeCntxt)'.\r\tself fetchContextRegisters: activeContext..\r\t^nil! !\r\r!Interpreter methodsFor: '*Exupery-Sends and Returns' stamp: 'wbk 10/2/2006 21:32'!\rexuperyCompiledReturnAddress\r\t^self exuperyLookupReturnMethod: activeContext! !\r\r!Interpreter methodsFor: '*Exupery-Sends and Returns' stamp: 'wbk 10/3/2006 21:51'!\rexuperyIsNativeContext: aContext\r\tself inline: true.\r\tself\r\t\tvar: #aContext\r\t\tdeclareC: 'int *aContext'.\r\t^ (((aContext at: 4) bitAnd: 1) ~= 1 and: [((aContext at: 5) bitAnd: 1) ~= 0]) ! !\r\r!Interpreter methodsFor: '*Exupery-Sends and Returns' stamp: 'wbk 10/3/2006 21:36'!\rexuperyLookupReturnMethod: aContext\r\tself\r\t\tvar: #aContext\r\t\tdeclareC: 'int *aContext'.\r\t(self exuperyIsNativeContext: aContext) ifFalse: [^ nil].\r\t^ (aContext at: 2) - 1. \"return the detagged return address, which must be aligned to a 2 byte boundary\t\r\t\t\t\t\t\t\tbecause of tagging\"\t! !\r\r!Interpreter methodsFor: '*Exupery-Sends and Returns' stamp: 'JMM 10/8/2006 16:01'!\rexuperyPush: localVal \r\t| sp |\r\tsp := self \r\t\t\t\tfetchPointer: StackPointerIndex\r\t\t\t\tofObject: activeContext.\r\tsp := sp + 2.\r\tself \r\t\tstoreLong32: StackPointerIndex\r\t\tofObject: activeContext\r\t\twithValue: sp.\r\tself \r\t\tstoreLong32: ReceiverIndex + (sp / 2)\r\t\tofObject: activeContext\r\t\twithValue: localVal! !\r\r!Interpreter methodsFor: '*Exupery-Sends and Returns' stamp: 'wbk 10/3/2006 21:52'!\rexuperyReturn\r\t| activeCntxt aFunction cntxt |\r\tself inline: true.\r\tself\r\t\tvar: #cntxt\r\t\tdeclareC: 'int *cntxt'.\r\tcntxt := activeContext.\r\taFunction := (cntxt at: 2) - 1.\r\tself var: #aFunction\r\t\tdeclareC: 'int (*aFunction) (int)'.\r\tactiveCntxt := activeContext.\r\tself cCode: 'aFunction (activeCntxt)'.\r\tself fetchContextRegisters: activeContext.! !\r\r!Interpreter methodsFor: '*Exupery-Sends and Returns' stamp: 'JMM 10/8/2006 16:01'!\rexuperySetup: selector Message: argumentsInteger Send: picPosition\r\t|rcvr rcvrClass|\r\tself export: true. \"allow lookup from elsewhere, e.g., plugin\"\r\tself inline: false. \r\t\" Reload the context here, the interpreter code below depends on it.\"\r\tself fetchContextRegisters: activeContext.\r\r\t\"The send bytecode\"\r\tmessageSelector := selector.\r\targumentCount := argumentsInteger.\r\r\t\"normalSend\"\r\trcvr := self stackValue: argumentCount.\r\tlkupClass := self fetchClassOf: rcvr.\r\treceiverClass := lkupClass.\r\tself findNewMethodInClass: lkupClass.\r\tnewNativeMethod = nil \r\t\tifTrue:\r\t\t\t[(receiverClass < youngStart and: [picPosition ~= 0]) ifTrue:\r\t\t\t\t[rcvrClass := receiverClass.\r\t\t\t\tself cCode: '*(int *) (picPosition + 12) = rcvrClass'\r\t\t\t\t\"self\r\t\t\t\t\tlongAt: (self cCoerce: (picPosition + 11) to: 'char *')\r\t\t\t\t\tput: receiverClass\"].\r\t\t\tself exuperyExecuteNewMethod. \r\t\t\t\"executeNewMethod fetches the new context registers\"\r\t\t \t\"Load the stackPointer into the active context, it might have changed, e.g. if a primitive\r\t\t\thas been executed\"\r\t\t\tself\r\t\t\t\tstoreLong32:  StackPointerIndex\t\r\t\t\t\tofObject: activeContext\r\t\t\t\twithValue: (self integerObjectOf: (stackPointer - activeContext) / 4 - TempFrameStart)]\r\t\tifFalse:\r\t\t\t[self \r\t\t\t\texuperyPopulatePic: picPosition\r\t\t\t\twith: newNativeMethod\r\t\t\t\treceiver: receiverClass].\r\t\"fetchNextBytecode must be done inside the interpreter loop/function\"\r\t^ newNativeMethod  ! !\r\r!Interpreter methodsFor: '*Exupery-Sends and Returns' stamp: 'JMM 10/8/2006 16:01'!\rexuperySetup: selector Super: argumentsInteger Send: picPosition\r\t|rcvr rcvrClass|\r\tself export: true. \"allow lookup from elsewhere, e.g., plugin\"\r\tself inline: false. \r\t\" Reload the context here, the interpreter code below depends on it.\"\r\tself fetchContextRegisters: activeContext.\r\r\t\"The send bytecode\"\r\tmessageSelector := selector.\r\targumentCount := argumentsInteger.\r\r\t\"normalSend\"\r\t\"The following lines are all that's different between this and normal sends\"\r\tlkupClass := self superclassOf: (self methodClassOf: method).\r\trcvr := self stackValue: argumentCount.\r\treceiverClass := self fetchClassOf: rcvr.\r\t\r\tself findNewMethodInClass: lkupClass.\r\tnewNativeMethod = nil \r\t\tifTrue:\r\t\t\t[(receiverClass < youngStart and: [picPosition ~= 0]) ifTrue:\r\t\t\t\t[rcvrClass := receiverClass.\r\t\t\t\tself cCode: '*(int *) (picPosition + 12) = rcvrClass'\r\t\t\t\t\"self\r\t\t\t\t\tlongAt: (self cCoerce: (picPosition + 11) to: 'char *')\r\t\t\t\t\tput: receiverClass\"].\r\t\t\tself exuperyExecuteNewMethod. \r\t\t\t\"executeNewMethod fetches the new context registers\"\r\t\t \t\"Load the stackPointer into the active context, it might have changed, e.g. if a primitive\r\t\t\thas been executed\"\r\t\t\tself\r\t\t\t\tstoreLong32:  StackPointerIndex\t\r\t\t\t\tofObject: activeContext\r\t\t\t\twithValue: (self integerObjectOf: (stackPointer - activeContext) / 4 - TempFrameStart)]\r\t\tifFalse:\r\t\t\t[self \r\t\t\t\texuperyPopulatePic: picPosition\r\t\t\t\twith: newNativeMethod\r\t\t\t\treceiver: receiverClass].\r\t\"fetchNextBytecode must be done inside the interpreter loop/function\"\r\r\t^ newNativeMethod  ! !\r\r!Interpreter methodsFor: '*Exupery-Sends and Returns' stamp: 'JMM 10/8/2006 16:02'!\rexupery: argCnt Create: tmpCnt Context: isLargeContext\r\t| newContext  nilOop where | \r\tself export: true.\t\"allow lookup from elsewhere, e.g., plugin\"\r\t\r \t\"A GC needs the IP and SP set so it can resave them\"\r\tself fetchContextRegisters: activeContext.\r\tnewContext := self allocateOrRecycleContext: isLargeContext.\t\"Assume: newContext will be recorded as a root if necessary by the call to newActiveContext: below, so we can use unchecked stores.\"\r\r\t\r\twhere := newContext + BaseHeaderSize.\r\tself \r\t\tlongAt: where + (SenderIndex << 2)\r\t\tput: activeContext.\r\tself  \"REMOVE, now redundant\"\r\t\tlongAt: where + (MethodIndex << 2)\r\t\tput: newMethod.\r\tself\r\t\tlongAt: where + (4 \"Unused slot, Used as a type marker\" <<2)\r\t\tput: 1. \"A zero\"\t\r\tself\r\t\tstoreLong32: StackPointerIndex\r\t\tofObject: newContext\r\t\twithValue: 1.\r\tself\r\t\tstoreLong32: InstructionPointerIndex\r\t\tofObject: newContext\r\t\twithValue: 1.\r\tnewContext < youngStart ifTrue: [self beRootIfOld: newContext].\r\t\"Copy the reciever and arguments...\"\r\t0 \r\t\tto: argCnt\r\t\tdo: \r\t\t\t[:i | \r\t\t\tself \r\t\t\t\tlongAt: where + (ReceiverIndex + i << 2)\r\t\t\t\tput: (self stackValue: argCnt - i)].\t\"clear remaining temps to nil in case it has been recycled\"\r\tnilOop := nilObj.\r\targCnt + 1 + ReceiverIndex \r\t\tto: tmpCnt + ReceiverIndex\r\t\tdo: \r\t\t\t[:i | \r\t\t\tself \r\t\t\t\tlongAt: where + (i << 2)\r\t\t\t\tput: nilOop].\r\tself pop: argCnt + 1.\r\treclaimableContextCount := reclaimableContextCount + 1.\r\t\"self storeContextRegisters: activeContext.\"\r\tself storeLong32: StackPointerIndex ofObject: activeContext\r\t\twithValue: (self integerObjectOf: (self stackPointerIndex - TempFrameStart + 1)).\r\r\tactiveContext := newContext.\r\t\"self fetchContextRegisters: newContext\"! !\r\r\r!Interpreter class methodsFor: 'initialization' stamp: 'wbk 4/12/2004 00:11'!\rinitializeCompilerHooks\r\t\"Interpreter initializeCompilerHooks\"\r\r\t\"compilerHooks[] indices:\r\t1\tvoid compilerTranslateMethodHook(void)\r\t2\tvoid compilerFlushCacheHook(CompiledMethod *oldMethod)\r\t3\tvoid compilerPreGCHook(int fullGCFlag)\r\t4\tvoid compilerMapHook(int memStart, int memEnd)\r\t5\tvoid compilerPostGCHook(void)\r\t6\tvoid compilerProcessChangeHook(void)\r\t7\tvoid compilerPreSnapshotHook(void)\r\t8\tvoid compilerPostSnapshotHook(void)\r\t9\tvoid compilerMarkHook(void)\r\t10\tvoid compilerActivateMethodHook(void)\r\t11\tvoid compilerNewActiveContextHook(int sendFlag)\r\t12\tvoid compilerGetInstructionPointerHook(void)\r\t13\tvoid compilerSetInstructionPointerHook(void)\r\t14\tvoid compilerCreateActualMessageHook(void)\"\r\r\t\"Added a few more compiler hooks for Exupery's use\"\r\tCompilerHooksSize _ 25.! !\r\rInterpreter removeSelector: #exuperyCallMethodHook!\rInterpreter removeSelector: #exuperyCompiledReturnAddressFor:!\rInterpreter removeSelector: #exuperyCompiledReturn:!\rInterpreter removeSelector: #exuperyRegisterReturnMethod:!\rInterpreter removeSelector: #exuperyReturnHook!\rInterpreter removeSelector: #exuperyReturn:!\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/specialChangeSets/Old/VmUpdates-dtl/VmUpdates-1001-dtl.1.cs",
    "content": "'From Squeak3.9 of 7 November 2006 [latest update: #7067] on 23 April 2007 at 2:11:19 pm'!\r\"Change Set:\t\tVmUpdates-1001-dtl\rDate:\t\t\t23 April 2007\rAuthor:\t\t\tDavid T. Lewis\r\rRemove several unreferenced primitives. These have no apparent utility in the current VM. They contain type casts that are probably incorrect, that that produce compiler warnings on 64 bit host/32 bit image VM builds.\r\rThis is the first of several change sets that address object memory addressing issues, particularly for host machines that may assign object memory addresses in the high order range of an unsigned 32 bit address space. The changes address oop comparison and type conversion within the object memory and interpreter.\r\rPrerequisites are:\r1) VMMaker 3.8b6 (from file VMMaker-tpr.58.mcz).\r2) Update to sqMemoryAccess.h with the following changes:\r85c85\r<   static inline char *pointerForOop(sqInt oop)                        { return sqMemoryBase + oop; }\r---\r>   static inline char *pointerForOop(usqInt oop)                       { return sqMemoryBase + oop; }\r109,110c109,110\r< # define pointerForOop(oop)           ((char *)(sqMemoryBase + (oop)))\r< # define oopForPointer(ptr)           ((sqInt)(ptr))\r---\r> # define pointerForOop(oop)           ((char *)(sqMemoryBase + ((usqInt)(oop))))\r> # define oopForPointer(ptr)           ((sqInt)(((char *)(ptr)) - (sqMemoryBase)))\r\rOther patches are required for various 64 bit host/image combinations, but are not directly relevent to this series of updates. See Mantis for details.\"!\r\rInterpreter removeSelector: #addressOf:startingAt:size:!\rInterpreter removeSelector: #primitiveByteArrayDoubleAt!\rInterpreter removeSelector: #primitiveByteArrayDoubleAtPut!\rInterpreter removeSelector: #primitiveByteArrayFloatAt!\rInterpreter removeSelector: #primitiveByteArrayFloatAtPut!\rInterpreter removeSelector: #primitiveByteArrayNByteIIntegerAtPut!\rInterpreter removeSelector: #primitiveByteArrayNByteIntegerAt!\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/specialChangeSets/Old/VmUpdates-dtl/VmUpdates-1002-dtl.1.cs",
    "content": "'From Squeak3.9 of 7 November 2006 [latest update: #7067] on 23 April 2007 at 2:11:23 pm'!\r\"Change Set:\t\tVmUpdates-1002-dtl\rDate:\t\t\t23 April 2007\rAuthor:\t\t\tDavid T. Lewis\r\rDeclare globals for oops in ObjectMemory and Interpreter as type usqInt.\"!\r\r\r!ObjectMemory class methodsFor: 'translation' stamp: 'dtl 4/14/2007 16:14'!\rdeclareCAsOop: arrayOfVariableNames in: aCCodeGenerator\r\t\"Declare the variables in arrayOfVariableNames with type representing position in object memory.\"\r\r\tarrayOfVariableNames\r\t\tdo: [:varName | aCCodeGenerator var: varName type: 'usqInt']! !\r\r!ObjectMemory class methodsFor: 'translation' stamp: 'dtl 4/22/2007 17:50'!\rdeclareCVarsIn: aCCodeGenerator\r\taCCodeGenerator var: #memory type:#'usqInt'.\r\taCCodeGenerator\r\t\tvar: #remapBuffer\r\t\tdeclareC: 'sqInt remapBuffer[', (RemapBufferSize + 1) printString, ']'.\r\taCCodeGenerator\r\t\tvar: #rootTable\r\t\tdeclareC: 'sqInt rootTable[', (RootTableSize + 1) printString, ']'.\r\t\"Weak roots must be large enough for roots+remapBuffer+sizeof(allCallsOn: #markAndTrace:)\"\r\taCCodeGenerator\r\t\tvar: #weakRoots\r\t\tdeclareC: 'sqInt weakRoots[', (RootTableSize + RemapBufferSize + 100) printString, ']'.\r\taCCodeGenerator\r\t\tvar: #headerTypeBytes\r\t\tdeclareC: 'sqInt headerTypeBytes[4]'.\r\tself declareCAsOop: {\r\t\t\t#youngStart .\r\t\t\t#endOfMemory .\r\t\t\t#memoryLimit .\r\t\t\t#youngStartLocal .\r\t\t\t#freeBlock .\r\t\t\t#compStart .\r\t\t\t#compEnd .\r\t\t\t#fwdTableNext .\r\t\t\t#fwdTableLast .\r\t\t\t#gcBiasToGrowThreshold }\r\t\tin: aCCodeGenerator\r! !\r\r\r!Interpreter class methodsFor: 'translation' stamp: 'dtl 4/14/2007 16:15'!\rdeclareCVarsIn: aCCodeGenerator\r\r\taCCodeGenerator \r\t\tvar: #interpreterProxy \r\t\ttype: #'struct VirtualMachine*'.\r\taCCodeGenerator\r\t\tvar: #primitiveTable\r\t\tdeclareC: 'void *primitiveTable[', (MaxPrimitiveIndex +2) printString, '] = ',\tself primitiveTableString.\r\taCCodeGenerator\r\t\tvar: #primitiveFunctionPointer\r\t\tdeclareC: 'void *primitiveFunctionPointer'\t\t\t\t.\t\t\"xxxx FIX THIS STUPIDITY xxxx - ikp. What he means is use a better type than void *, apparently - tpr\"\r\taCCodeGenerator\r\t\tvar: #methodCache\r\t\tdeclareC: 'long methodCache[', (MethodCacheSize + 1) printString, ']'.\r\taCCodeGenerator\r\t\tvar: #atCache\r\t\tdeclareC: 'sqInt atCache[', (AtCacheTotalSize + 1) printString, ']'.\r\taCCodeGenerator var: #localIP type: #'char*'.\r\taCCodeGenerator var: #localSP type: #'char*'.\r\taCCodeGenerator var: #showSurfaceFn type: #'void*'.\r\taCCodeGenerator var: 'semaphoresToSignalA'\r\t\tdeclareC: 'sqInt semaphoresToSignalA[', (SemaphoresToSignalSize + 1) printString, ']'.\r\taCCodeGenerator var: 'semaphoresToSignalB'\r\t\tdeclareC: 'sqInt semaphoresToSignalB[', (SemaphoresToSignalSize + 1) printString, ']'.\r\taCCodeGenerator\r\t\tvar: #compilerHooks\r\t\tdeclareC: 'sqInt (*compilerHooks[', (CompilerHooksSize + 1) printString, '])()'.\r\taCCodeGenerator\r\t\tvar: #interpreterVersion\r\t\tdeclareC: 'const char *interpreterVersion = \"', SmalltalkImage current datedVersion, ' [', SmalltalkImage current lastUpdateString,']\"'.\r\taCCodeGenerator\r\t\tvar: #obsoleteIndexedPrimitiveTable\r\t\tdeclareC: 'char* obsoleteIndexedPrimitiveTable[][3] = ', self obsoleteIndexedPrimitiveTableString.\r\taCCodeGenerator\r\t\tvar: #obsoleteNamedPrimitiveTable\r\t\tdeclareC: 'const char* obsoleteNamedPrimitiveTable[][3] = ', self obsoleteNamedPrimitiveTableString.\r\taCCodeGenerator\r\t\tvar: #externalPrimitiveTable\r\t\tdeclareC: 'void *externalPrimitiveTable[', (MaxExternalPrimitiveTableSize + 1) printString, ']'.\r\tself declareCAsOop: {\r\t\t\t#instructionPointer .\r\t\t\t#method .\r\t\t\t#newMethod .\r\t\t\t#activeContext .\r\t\t\t#theHomeContext .\r\t\t\t#stackPointer }\r\t\tin: aCCodeGenerator\r! !\r\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/specialChangeSets/Old/VmUpdates-dtl/VmUpdates-1003-dtl.1.cs",
    "content": "'From Squeak3.9 of 7 November 2006 [latest update: #7067] on 23 April 2007 at 2:11:27 pm'!\r\"Change Set:\t\tVmUpdates-1003-dtl\rDate:\t\t\t23 April 2007\rAuthor:\t\t\tDavid T. Lewis\r\rAdd oop comparison methods.\r  ObjectMemory>>oop:isGreaterThan:\r  ObjectMemory>>oop:isGreaterThanOrEqual:\r  ObjectMemory>>oop:isLessThan:\r  ObjectMemory>>oop:isLessThanOrEqual:\r\rThese use #cCoerce:to: to cast their arguments to unsigned usqInt. They are inlined during C translation so performance is not impacted.\r\rNotes: Any explicit C variable declarations in methods will prevent the methods from being inlined. These four new methods, when implemented in ObjectMemory, do the required type casts without disabling inlining. Also, the methods must be implemented here rather than in Object in order for the inlining to work.\"!\r\r\r!ObjectMemory methodsFor: 'oop comparison' stamp: 'dtl 4/22/2007 16:01'!\roop: anOop isGreaterThan: otherOop\r\t\"Compare two oop values, treating them as object memory locations.\r\tUse #cCoerce:to: to ensure comparison of unsigned magnitudes. This\r\tmethod will be inlined during C translation.\"\r\r\t^ (self cCoerce: anOop to: #usqInt)\r\t\t> (self cCoerce: otherOop to: #usqInt)! !\r\r!ObjectMemory methodsFor: 'oop comparison' stamp: 'dtl 4/22/2007 18:15'!\roop: anOop isGreaterThanOrEqualTo: otherOop\r\t\"Compare two oop values, treating them as object memory locations.\r\tUse #cCoerce:to: to ensure comparison of unsigned magnitudes. This\r\tmethod will be inlined during C translation.\"\r\r\t^ (self cCoerce: anOop to: #usqInt)\r\t\t>= (self cCoerce: otherOop to: #usqInt)! !\r\r!ObjectMemory methodsFor: 'oop comparison' stamp: 'dtl 4/22/2007 16:01'!\roop: anOop isLessThan: otherOop\r\t\"Compare two oop values, treating them as object memory locations.\r\tUse #cCoerce:to: to ensure comparison of unsigned magnitudes. This\r\tmethod will be inlined during C translation.\"\r\r\t^ (self cCoerce: anOop to: #usqInt)\r\t\t< (self cCoerce: otherOop to: #usqInt)! !\r\r!ObjectMemory methodsFor: 'oop comparison' stamp: 'dtl 4/22/2007 18:15'!\roop: anOop isLessThanOrEqualTo: otherOop\r\t\"Compare two oop values, treating them as object memory locations.\r\tUse #cCoerce:to: to ensure comparison of unsigned magnitudes. This\r\tmethod will be inlined during C translation.\"\r\r\t^ (self cCoerce: anOop to: #usqInt)\r\t\t<= (self cCoerce: otherOop to: #usqInt)! !\r\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/specialChangeSets/Old/VmUpdates-dtl/VmUpdates-1004-dtl.1.cs",
    "content": "'From Squeak3.9 of 7 November 2006 [latest update: #7067] on 23 April 2007 at 2:11:30 pm'!\r\"Change Set:\t\tVmUpdates-1004-dtl\rDate:\t\t\t23 April 2007\rAuthor:\t\t\tDavid T. Lewis\r\rUse new oop comparison methods throughout ObjectMemory wherever necessary to ensure unsigned operands. In some methods, the original comparison operators are used if referencing globals declared as usqInt, or if the methods are not inlined so that local declarations may be used.\r\rUpdated #sufficientSpaceAfterGC:, #sufficientSpaceToAllocate:  and #allocateChunk to use the new methods rather than Ian's original casts.\"!\r\r\r!ObjectMemory methodsFor: 'gc -- mark and sweep' stamp: 'dtl 4/22/2007 20:07'!\rmarkAndTrace: oop\r\t\"Mark all objects reachable from the given one.\r\tTrace from the given object even if it is old.\r\tDo not trace if it is already marked.\r\tMark it only if it is a young object.\"\r\t\"Tracer state variables:\r\t\tchild\t\tobject being examined\r\t\tfield\t\tnext field of child to examine\r\t\tparentField\tfield where child was stored in its referencing object\"\r\r\t| header lastFieldOffset action statMarkCountLocal |\r\theader := self longAt: oop.\r\t(header bitAnd: MarkBit) = 0 ifFalse: [^ 0  \"already marked\"].\r\r\t\"record tracing status in object's header\"\r\theader := (header bitAnd: AllButTypeMask) bitOr: HeaderTypeGC.\r\t(self oop: oop isGreaterThanOrEqualTo: youngStart)\r\t\tifTrue: [ header := header bitOr: MarkBit ].  \"mark only if young\"\r\tself longAt: oop put: header.\r\r\t\"initialize the tracer state machine\"\r\tparentField := GCTopMarker.\r\tchild := oop.\r\t(self isWeakNonInt: oop) ifTrue: [\r\t\t\"Set lastFieldOffset before the weak fields in the receiver\"\r\t\tlastFieldOffset := (self nonWeakFieldsOf: oop) << ShiftForWord.\r\t\t\"And remember as weak root\"\r\t\tweakRootCount := weakRootCount + 1.\r\t\tweakRoots at: weakRootCount put: oop.\r\t] ifFalse: [\r\t\t\"Do it the usual way\"\r\t\tlastFieldOffset := self lastPointerOf: oop.\r\t].\r\tfield := oop + lastFieldOffset.\r\taction := StartField.\r\tyoungStartLocal := youngStart.\r\tstatMarkCountLocal := statMarkCount.\r\t\"run the tracer state machine until all objects reachable from oop are marked\"\r\t[action = Done] whileFalse: [\r\t\tstatMarkCountLocal := statMarkCountLocal + 1.\r\t\taction = StartField ifTrue: [ action := self startField ].\r\t\taction = StartObj ifTrue: [ action := self startObj ].\r\t\taction = Upward ifTrue: [ action := self upward ].\r\t].\r\tstatMarkCount := statMarkCountLocal.! !\r\r!ObjectMemory methodsFor: 'gc -- mark and sweep' stamp: 'dtl 4/22/2007 21:26'!\rstartObj\r\t\"Start tracing the object 'child' and answer the next action. \r\tThe object may be anywhere in the middle of being swept \r\titself. See comment in markAndTrace for explanation of \r\ttracer state variables.\"\r\t| oop header lastFieldOffset |\r\tself inline: true.\r\toop := child.\r\t(self oop: oop isLessThan: youngStartLocal)\r\t\tifTrue: [\"old object; skip it\"\r\t\t\tfield := oop.\r\t\t\t^ Upward].\r\theader := self longAt: oop.\r\t(header bitAnd: MarkBit) = 0\r\t\tifTrue: [\"unmarked; mark and trace\"\r\t\t\t\"Do not trace the object's indexed fields if it's a weak class \"\r\t\t\t(self isWeakNonInt: oop)\r\t\t\t\tifTrue: [\"Set lastFieldOffset before the weak fields in the receiver \"\r\t\t\t\t\tlastFieldOffset := (self nonWeakFieldsOf: oop) << ShiftForWord]\r\t\t\t\tifFalse: [\"Do it the usual way\"\r\t\t\t\t\tlastFieldOffset := self lastPointerOf: oop].\r\t\t\theader := header bitAnd: AllButTypeMask.\r\t\t\theader := (header bitOr: MarkBit) bitOr: HeaderTypeGC.\r\t\t\tself longAt: oop put: header.\r\t\t\tfield := oop + lastFieldOffset.\r\t\t\t^ StartField \"trace its fields and class\"]\r\t\tifFalse: [\"already marked; skip it\"\r\t\t\tfield := oop.\r\t\t\t^ Upward]! !\r\r!ObjectMemory methodsFor: 'gc -- mark and sweep' stamp: 'dtl 4/22/2007 21:29'!\rsweepPhase\r\t\"Sweep memory from youngStart through the end of memory. Free all \r\tinaccessible objects and coalesce adjacent free chunks. Clear the mark \r\tbits of accessible objects. Compute the starting point for the first pass of \r\tincremental compaction (compStart). Return the number of surviving \r\tobjects. \"\r\t\"Details: Each time a non-free object is encountered, decrement the \r\tnumber of available forward table entries. If all entries are spoken for \r\t(i.e., entriesAvailable reaches zero), set compStart to the last free \r\tchunk before that object or, if there is no free chunk before the given \r\tobject, the first free chunk after it. Thus, at the end of the sweep \r\tphase, compStart through compEnd spans the highest collection of \r\tnon-free objects that can be accomodated by the forwarding table. This \r\tinformation is used by the first pass of incremental compaction to \r\tensure that space is initially freed at the end of memory. Note that \r\tthere should always be at least one free chunk--the one at the end of \r\tthe heap.\"\r\t| entriesAvailable survivors freeChunk firstFree oop oopHeader oopHeaderType hdrBytes oopSize freeChunkSize endOfMemoryLocal |\r\tself inline: false.\r\tself var: #oop type: 'usqInt'.\r\tself var: #endOfMemoryLocal type: 'usqInt'.\r\tentriesAvailable := self fwdTableInit: BytesPerWord*2.\r\tsurvivors := 0.\r\tfreeChunk := nil.\r\tfirstFree := nil.\r\t\"will be updated later\"\r\tendOfMemoryLocal := endOfMemory.\r\toop := self oopFromChunk: youngStart.\r\t[oop < endOfMemoryLocal]\r\t\twhileTrue: [\"get oop's header, header type, size, and header size\"\r\t\t\tstatSweepCount := statSweepCount + 1.\r\t\t\toopHeader := self baseHeader: oop.\r\t\t\toopHeaderType := oopHeader bitAnd: TypeMask.\r\t\t\thdrBytes := headerTypeBytes at: oopHeaderType.\r\t\t\t(oopHeaderType bitAnd: 1) = 1\r\t\t\t\tifTrue: [oopSize := oopHeader bitAnd: SizeMask]\r\t\t\t\tifFalse: [oopHeaderType = HeaderTypeSizeAndClass\r\t\t\t\t\t\tifTrue: [oopSize := (self sizeHeader: oop) bitAnd: LongSizeMask]\r\t\t\t\t\t\tifFalse: [\"free chunk\" oopSize := oopHeader bitAnd: LongSizeMask]].\r\t\t\t(oopHeader bitAnd: MarkBit) = 0\r\t\t\t\tifTrue: [\"object is not marked; free it\"\r\t\t\t\t\t\"<-- Finalization support: We need to mark each oop chunk as free -->\"\r\t\t\t\t\tself longAt: oop - hdrBytes put: HeaderTypeFree.\r\t\t\t\t\tfreeChunk ~= nil\r\t\t\t\t\t\tifTrue: [\"enlarge current free chunk to include this oop\"\r\t\t\t\t\t\t\tfreeChunkSize := freeChunkSize + oopSize + hdrBytes]\r\t\t\t\t\t\tifFalse: [\"start a new free chunk\"\r\t\t\t\t\t\t\tfreeChunk := oop - hdrBytes.\r\t\t\t\t\t\t\t\"chunk may start 4 or 8 bytes before oop\"\r\t\t\t\t\t\t\tfreeChunkSize := oopSize + (oop - freeChunk).\r\t\t\t\t\t\t\t\"adjust size for possible extra header bytes\"\r\t\t\t\t\t\t\tfirstFree = nil ifTrue: [firstFree := freeChunk]]]\r\t\t\t\tifFalse: [\"object is marked; clear its mark bit and possibly adjust \r\t\t\t\t\tthe compaction start\"\r\t\t\t\t\tself longAt: oop put: (oopHeader bitAnd: AllButMarkBit).\r\t\t\t\t\t\"<-- Finalization support: Check if we're running about a weak class -->\"\r\t\t\t\t\t(self isWeakNonInt: oop) ifTrue: [self finalizeReference: oop].\r\t\t\t\t\tentriesAvailable > 0\r\t\t\t\t\t\tifTrue: [entriesAvailable := entriesAvailable - 1]\r\t\t\t\t\t\tifFalse: [\"start compaction at the last free chunk before this object\"\r\t\t\t\t\t\t\tfirstFree := freeChunk].\r\t\t\t\t\tfreeChunk ~= nil\r\t\t\t\t\t\tifTrue: [\"record the size of the last free chunk\"\r\t\t\t\t\t\t\tself longAt: freeChunk put: ((freeChunkSize bitAnd: LongSizeMask) bitOr: HeaderTypeFree).\r\t\t\t\t\t\t\tfreeChunk := nil].\r\t\t\t\t\tsurvivors := survivors + 1].\r\t\t\toop := self oopFromChunk: oop + oopSize].\r\tfreeChunk ~= nil\r\t\tifTrue: [\"record size of final free chunk\"\r\t\t\tself longAt: freeChunk put: ((freeChunkSize bitAnd: LongSizeMask) bitOr: HeaderTypeFree)].\r\toop = endOfMemory\r\t\tifFalse: [self error: 'sweep failed to find exact end of memory'].\r\tfirstFree = nil\r\t\tifTrue: [self error: 'expected to find at least one free object']\r\t\tifFalse: [compStart := firstFree].\r\r\t^ survivors! !\r\r!ObjectMemory methodsFor: 'finalization' stamp: 'dtl 4/22/2007 21:18'!\rfinalizeReference: oop \r\t\"During sweep phase we have encountered a weak reference. \r\tCheck if  its object has gone away (or is about to) and if so, signal a \r\tsemaphore. \"\r\t\"Do *not* inline this in sweepPhase - it is quite an unlikely \r\tcase to run into a weak reference\"\r\t| weakOop oopGone chunk firstField lastField |\r\tself inline: false.\r\tself var: #oop type: 'usqInt'.\r\tself var: #weakOop type: 'usqInt'.\r\tfirstField := BaseHeaderSize + ((self nonWeakFieldsOf: oop) << ShiftForWord).\r\tlastField := self lastPointerOf: oop.\r\tfirstField to: lastField by: BytesPerWord do: [:i | \r\t\t\tweakOop := self longAt: oop + i.\r\t\t\t\"ar 1/18/2005: Added oop < youngStart test to make sure we're not testing\r\t\t\tobjects in non-GCable region. This could lead to a forward reference in\r\t\t\told space with the oop pointed to not being marked and thus treated as free.\"\r\t\t\t(weakOop == nilObj or: [(self isIntegerObject: weakOop) or:[weakOop < youngStart]])\r\r\t\t\t\tifFalse: [\"Check if the object is being collected. \r\t\t\t\t\tIf the weak reference points  \r\t\t\t\t\t* backward: check if the weakOops chunk is free\r\t\t\t\t\t* forward: check if the weakOoop has been marked by GC\"\r\t\t\t\t\tweakOop < oop\r\t\t\t\t\t\tifTrue: [chunk := self chunkFromOop: weakOop.\r\t\t\t\t\t\t\toopGone := ((self longAt: chunk) bitAnd: TypeMask) = HeaderTypeFree]\r\t\t\t\t\t\tifFalse: [oopGone := ((self baseHeader: weakOop) bitAnd: MarkBit) = 0].\r\t\t\t\t\toopGone ifTrue: [\"Store nil in the pointer and signal the  interpreter \"\r\t\t\t\t\t\t\tself longAt: oop + i put: nilObj.\r\t\t\t\t\t\t\tself signalFinalization: oop]]]! !\r\r!ObjectMemory methodsFor: 'object enumeration' stamp: 'dtl 4/22/2007 20:46'!\raccessibleObjectAfter: oop \r\t\"Return the accessible object following the given object or \r\tfree chunk in the heap. Return nil when heap is exhausted.\"\r\t| obj |\r\tself inline: false.\r\tobj := self objectAfter: oop.\r\t[self oop: obj isLessThan: endOfMemory]\r\t\twhileTrue: [(self isFreeObject: obj) ifFalse: [^ obj].\r\t\t\tobj := self objectAfter: obj].\r\t^ nil! !\r\r!ObjectMemory methodsFor: 'object enumeration' stamp: 'dtl 4/22/2007 21:19'!\rfirstAccessibleObject\r\t\"Return the first accessible object in the heap.\"\r\t| obj |\r\tobj := self firstObject.\r\t[self oop: obj isLessThan: endOfMemory]\r\t\twhileTrue: [(self isFreeObject: obj) ifFalse: [^ obj].\r\t\t\tobj := self objectAfter: obj].\r\tself error: 'heap is empty'! !\r\r!ObjectMemory methodsFor: 'object enumeration' stamp: 'dtl 4/22/2007 20:09'!\robjectAfter: oop \r\t\"Return the object or free chunk immediately following the \r\tgiven object or free chunk in memory. Return endOfMemory \r\twhen enumeration is complete.\"\r\t| sz |\r\tself inline: true.\r\tDoAssertionChecks\r\t\tifTrue: [(self oop: oop isGreaterThanOrEqualTo:endOfMemory)\r\t\t\t\t\tifTrue: [self error: 'no objects after the end of memory']].\r\t(self isFreeObject: oop)\r\t\tifTrue: [sz := self sizeOfFree: oop]\r\t\tifFalse: [sz := self sizeBitsOf: oop].\r\t^ self oopFromChunk: oop + sz! !\r\r!ObjectMemory methodsFor: 'initialization' stamp: 'dtl 4/22/2007 20:48'!\radjustAllOopsBy: bytesToShift \r\t\"Adjust all oop references by the given number of bytes. This \r\tis done just after reading in an image when the new base \r\taddress of the object heap is different from the base address \r\tin the image.\"\r\t\"di 11/18/2000 - return number of objects found\"\r\r\t| oop totalObjects |\r\tself inline: false.\r\tbytesToShift = 0 ifTrue: [^300000].\r\t\"this is probably an improvement over the previous answer of \r\tnil, but maybe we should do the obejct counting loop and \r\tsimply guard the adjustFieldsAndClass... with a bytesToShift \r\t= 0 ifFalse: ?\"\r\ttotalObjects := 0.\r\toop := self firstObject.\r\t[self oop: oop isLessThan: endOfMemory]\r\t\twhileTrue:\r\t\t\t[(self isFreeObject: oop)\r\t\t\t\tifFalse:\r\t\t\t\t\t[totalObjects := totalObjects + 1.\r\t\t\t\t\t self adjustFieldsAndClassOf: oop by: bytesToShift].\r\t\t\t oop := self objectAfter: oop].\r\t^totalObjects! !\r\r!ObjectMemory methodsFor: 'initialization' stamp: 'dtl 4/22/2007 17:25'!\radjustFieldsAndClassOf: oop by: offsetBytes \r\t\"Adjust all pointers in this object by the given offset.\"\r\t| fieldAddr fieldOop classHeader newClassOop |\r\tself inline: true.\r\toffsetBytes = 0 ifTrue: [^nil].\r\tfieldAddr := oop + (self lastPointerOf: oop).\r\t[self oop: fieldAddr isGreaterThan: oop]\r\t\twhileTrue: [fieldOop := self longAt: fieldAddr.\r\t\t\t(self isIntegerObject: fieldOop)\r\t\t\t\tifFalse: [self longAt: fieldAddr put: fieldOop + offsetBytes].\r\t\t\tfieldAddr := fieldAddr - BytesPerWord].\r\t(self headerType: oop) ~= HeaderTypeShort\r\t\tifTrue: [\"adjust class header if not a compact class\"\r\t\t\tclassHeader := self longAt: oop - BytesPerWord.\r\t\t\tnewClassOop := (classHeader bitAnd: AllButTypeMask) + offsetBytes.\r\t\t\tself longAt: oop - BytesPerWord put: (newClassOop bitOr: (classHeader bitAnd: TypeMask))]! !\r\r!ObjectMemory methodsFor: 'initialization' stamp: 'dtl 4/22/2007 19:53'!\rinitializeMemoryFirstFree: firstFree \r\t\"Initialize endOfMemory to the top of oop storage space, reserving some space for forwarding blocks, and create the freeBlock from which space is allocated. Also create a fake free chunk at endOfMemory to act as a sentinal for memory scans. \"\r\t\"Note: The amount of space reserved for forwarding blocks should be chosen to ensure that incremental compactions can usually be done in a single pass. However, there should be enough forwarding blocks so a full compaction can be done in a reasonable number of passes, say ten. (A full compaction requires N object-moving passes, where N = number of non-garbage objects / number of forwarding blocks). \r\tdi 11/18/2000 Re totalObjectCount: Provide a margin of one byte per object to be used for forwarding pointers at GC time. Since fwd blocks are 8 bytes, this means an absolute worst case of 8 passes to compact memory. In most cases it will be adequate to do compaction in a single pass. \"\r\t| fwdBlockBytes |\r\t\"reserve space for forwarding blocks\"\r\tfwdBlockBytes := totalObjectCount bitAnd: WordMask - BytesPerWord + 1.\r\t(self oop: memoryLimit - fwdBlockBytes isGreaterThanOrEqualTo: firstFree + BaseHeaderSize)\r\t\tifFalse: [\"reserve enough space for a minimal free block of BaseHeaderSize bytes\"\r\t\t\tfwdBlockBytes := memoryLimit - (firstFree + BaseHeaderSize)].\r\r\t\"set endOfMemory and initialize freeBlock\"\r\tendOfMemory := memoryLimit - fwdBlockBytes.\r\tfreeBlock := firstFree.\r\tself setSizeOfFree: freeBlock to: endOfMemory - firstFree. \"bytes available for oops\"\r\r\t\"make a fake free chunk at endOfMemory for use as a sentinel in memory scans\"\r\tself setSizeOfFree: endOfMemory to: BaseHeaderSize.\r\tDoAssertionChecks\r\t\tifTrue: [(freeBlock < endOfMemory and: [endOfMemory < memoryLimit])\r\t\t\t\tifFalse: [self error: 'error in free space computation'].\r\t\t\t(self oopFromChunk: endOfMemory) = endOfMemory\r\t\t\t\tifFalse: [self error: 'header format must have changed'].\r\t\t\t(self objectAfter: freeBlock) = endOfMemory\r\t\t\t\tifFalse: [self error: 'free block not properly initialized']]! !\r\r!ObjectMemory methodsFor: 'become' stamp: 'dtl 4/22/2007 20:53'!\rallYoung: array1 and: array2 \r\t\"Return true if all the oops in both arrays, and the arrays \r\tthemselves, are in the young object space.\"\r\t| fieldOffset |\r\t(self oop: array1 isLessThan: youngStart)\r\t\tifTrue: [^ false].\r\t(self oop: array2 isLessThan: youngStart)\r\t\tifTrue: [^ false].\r\tfieldOffset := self lastPointerOf: array1.\r\t\"same size as array2\"\r\t[fieldOffset >= BaseHeaderSize] whileTrue:\r\t\t[(self oop: (self longAt: array1 + fieldOffset) isLessThan: youngStart)\r\t\t\tifTrue: [^ false].\r\t\t(self oop: (self longAt: array2 + fieldOffset) isLessThan: youngStart)\r\t\t\tifTrue: [^ false].\r\t\tfieldOffset := fieldOffset - BytesPerWord].\r\t^ true! !\r\r!ObjectMemory methodsFor: 'become' stamp: 'dtl 4/22/2007 21:34'!\rrestoreHeadersAfterForwardBecome: copyHashFlag \r\t\"Forward become leaves us with no original oops in the \r\tmutated object list, \r\tso we must enumerate the (four-word) forwarding blocks \r\twhere we have stored backpointers.\"\r\t\"This loop start is copied from fwdTableInit:\"\r\t| oop1 fwdBlock oop2 hdr1 hdr2 |\r\tfwdBlock := endOfMemory + BaseHeaderSize + 7 bitAnd: WordMask - 7.\r\tself flag: #Dan.  \"See flag comment in fwdTableInit: (dtl)\"\r\tfwdBlock := fwdBlock + (BytesPerWord*4).\r\t\"fwdBlockGet: did a pre-increment\"\r\t[self oop: fwdBlock isLessThanOrEqualTo: fwdTableNext\r\t\"fwdTableNext points to the last active block\"]\r\t\twhileTrue: [oop1 := self longAt: fwdBlock + (BytesPerWord*2).\r\t\t\t\"Backpointer to mutated object.\"\r\t\t\toop2 := self longAt: fwdBlock.\r\t\t\tself restoreHeaderOf: oop1.\r\t\t\tcopyHashFlag\r\t\t\t\tifTrue: [\"Change the hash of the new oop (oop2) to be that of the old (oop1) \r\t\t\t\t\tso mutated objects in hash structures will be \r\t\t\t\t\thappy after the change.\"\r\t\t\t\t\thdr1 := self longAt: oop1.\r\t\t\t\t\thdr2 := self longAt: oop2.\r\t\t\t\t\tself longAt: oop2 put: ((hdr2 bitAnd: AllButHashBits) bitOr: (hdr1 bitAnd: HashBits))].\r\t\t\tfwdBlock := fwdBlock + (BytesPerWord*4)]! !\r\r!ObjectMemory methodsFor: 'allocation' stamp: 'dtl 4/22/2007 21:04'!\rallocateChunk: byteSize \r\t\"Allocate a chunk of the given size. Sender must be sure that  the requested size includes enough space for the header  word(s). \" \r\t\"Details: To limit the time per incremental GC, do one every so many allocations. The number is settable via primitiveVMParameter to tune your memory system\"\r\t| enoughSpace newFreeSize newChunk |\r\tself inline: true.\r\r\tallocationCount >= allocationsBetweenGCs\r\t\tifTrue: [\"do an incremental GC every so many allocations to  keep pauses short\"\r\t\t\tself incrementalGC].\r\r\tenoughSpace := self sufficientSpaceToAllocate: byteSize.\r\tenoughSpace\r\t\tifFalse: [\"signal that space is running low, but proceed with allocation if possible\"\r\t\t\tsignalLowSpace := true.\r\t\t\tlowSpaceThreshold := 0. \"disable additional interrupts until lowSpaceThreshold is reset by image\"\r\t\t\tself saveProcessSignalingLowSpace.\r\t\t\tself forceInterruptCheck].\r\t(self oop: (self sizeOfFree: freeBlock) isLessThan: byteSize + BaseHeaderSize)\r\t\tifTrue: [self error: 'out of memory'].\r\r\t\"if we get here, there is enough space for allocation to  succeed \"\r\tnewFreeSize := (self sizeOfFree: freeBlock) - byteSize.\r\tnewChunk := freeBlock.\r\tfreeBlock := freeBlock + byteSize.\r\r\t\"Assume: client will initialize object header of free chunk, so following is not needed:\"\r\t\"self setSizeOfFree: newChunk to: byteSize.\"\r\tself setSizeOfFree: freeBlock to: newFreeSize.\r\tallocationCount := allocationCount + 1.\r\t^newChunk! !\r\r!ObjectMemory methodsFor: 'allocation' stamp: 'dtl 4/22/2007 21:10'!\rclone: oop\r\t\"Return a shallow copy of the given object. May cause GC\"\r\t\"Assume: Oop is a real object, not a small integer.\"\r\r\t| extraHdrBytes bytes newChunk remappedOop fromIndex toIndex lastFrom newOop header hash |\r\tself inline: false.\r\tself var: #lastFrom type: 'usqInt'.\r\tself var: #fromIndex type: 'usqInt'.\r\textraHdrBytes := self extraHeaderBytes: oop.\r\tbytes := self sizeBitsOf: oop.\r\tbytes := bytes + extraHdrBytes.\r\r\t\"allocate space for the copy, remapping oop in case of a GC\"\r\tself pushRemappableOop: oop.\r\t\"check it is safe to allocate this much memory. Return 0 if not\"\r\t(self sufficientSpaceToAllocate: 2500 + bytes) ifFalse:[^0].\r\tnewChunk := self allocateChunk: bytes.\r\tremappedOop := self popRemappableOop.\r\r\t\"copy old to new including all header words\"\r\ttoIndex := newChunk - BytesPerWord.  \"loop below uses pre-increment\"\r\tfromIndex := (remappedOop - extraHdrBytes) - BytesPerWord.\r\tlastFrom := fromIndex + bytes.\r\t[fromIndex < lastFrom] whileTrue: [\r\t\tself longAt: (toIndex := toIndex + BytesPerWord) put: (self longAt: (fromIndex := fromIndex + BytesPerWord))].\r\tnewOop := newChunk + extraHdrBytes.  \"convert from chunk to oop\"\r\r\t\"fix base header: compute new hash and clear Mark and Root bits\"\r\thash := self newObjectHash.\r\theader := (self longAt: newOop) bitAnd: 16r1FFFF.\r\t\"use old ccIndex, format, size, and header-type fields\"\r\theader := header bitOr: ((hash << 17) bitAnd: 16r1FFE0000).\r\tself longAt: newOop put: header.\r\t^newOop\r! !\r\r!ObjectMemory methodsFor: 'allocation' stamp: 'dtl 4/22/2007 20:13'!\rrecycleContextIfPossible: cntxOop \r\t\"If possible, save the given context on a list of free contexts to \r\tbe recycled.\"\r\t\"Note: The context is not marked free, so it can be reused \r\twith minimal fuss. The recycled context lists are cleared at \r\tevery garbage collect.\"\r\t| header |\r\tself inline: true.\r\t\"only recycle young contexts (which should be most of them)\"\r\t(self oop: cntxOop isGreaterThanOrEqualTo: youngStart)\r\t\tifTrue: [header := self baseHeader: cntxOop.\r\t\t\t(self isMethodContextHeader: header)\r\t\t\t\tifTrue: [\"It's a young context, alright.\"\r\t\t\t\t\t(header bitAnd: SizeMask) = SmallContextSize\r\t\t\t\t\t\tifTrue: [\"Recycle small contexts\"\r\t\t\t\t\t\t\tself storePointerUnchecked: 0 ofObject: cntxOop withValue: freeContexts.\r\t\t\t\t\t\t\tfreeContexts := cntxOop].\r\t\t\t\t\t(header bitAnd: SizeMask) = LargeContextSize\r\t\t\t\t\t\tifTrue: [\"Recycle large contexts\"\r\t\t\t\t\t\t\tself storePointerUnchecked: 0 ofObject: cntxOop withValue: freeLargeContexts.\r\t\t\t\t\t\t\tfreeLargeContexts := cntxOop]]]! !\r\r!ObjectMemory methodsFor: 'allocation' stamp: 'dtl 4/22/2007 20:27'!\rsufficientSpaceAfterGC: minFree \r\t\"Return true if there is enough free space after doing a garbage collection. If not, signal that space is low.\"\r\t| growSize |\r\tself inline: false.\r\r\tself incrementalGC. \"try to recover some space\"\r\r\t(self oop: (self sizeOfFree: freeBlock) isLessThan: minFree)\r\t\tifTrue: [signalLowSpace ifTrue: [^false]. \"give up; problem is already noted\"\r\t\t\tself fullGC. \"try harder\"\r\t\t\t\"for stability, require more free space after doing an expensive full GC\"\r\t\t\t(self cCoerce: (self sizeOfFree: freeBlock) to: 'usqInt ') >= ((self cCoerce: minFree to: 'usqInt ') + 15000) ifTrue: [^ true].\r\r\t\t\t\"still not enough; attempt to grow object memory\"\r\t\t\tgrowSize := minFree - (self sizeOfFree: freeBlock) + growHeadroom.\r\t\t\tself growObjectMemory: growSize.\r\r\t\t\t(self oop: (self sizeOfFree: freeBlock) isGreaterThanOrEqualTo: minFree + 15000)\r\t\t\t\tifTrue: [^true].\r\r\t\t\t\"still not enough\"\r\t\t\t^false].\r\t^true! !\r\r!ObjectMemory methodsFor: 'allocation' stamp: 'dtl 4/22/2007 20:28'!\rsufficientSpaceToAllocate: bytes\r\t\"Return true if there is enough space to allocate the given number of bytes, perhaps after doing a garbage collection.\"\r\r\t| minFree |\r\tself inline: true.\r\tminFree := lowSpaceThreshold + bytes + BaseHeaderSize.\r\r\t\"check for low-space\"\r\t(self oop: (self sizeOfFree: freeBlock) isGreaterThanOrEqualTo: minFree)\r\t\tifTrue: [^true]\r\t\tifFalse: [^self sufficientSpaceAfterGC: minFree].! !\r\r!ObjectMemory methodsFor: 'garbage collection' stamp: 'dtl 4/22/2007 21:05'!\rbeRootIfOld: oop \r\t\"If this object is old, mark it as a root (because a new object \r\tmay be stored into it)\"\r\tself inline: false.\r\t((self oop: oop isLessThan: youngStart)\r\t\t\tand: [(self isIntegerObject: oop) not])\r\t\tifTrue: [\"Yes, oop is an old object\"\r\t\t\tself noteAsRoot: oop headerLoc: oop]! !\r\r!ObjectMemory methodsFor: 'garbage collection' stamp: 'dtl 4/22/2007 21:24'!\rlowestFreeAfter: chunk \r\t\"Return the first free block after the given chunk in memory.\"\r\t| oop oopHeader oopHeaderType oopSize |\r\tself inline: false.\r\toop := self oopFromChunk: chunk.\r\t[self oop: oop isLessThan: endOfMemory]\r\t\twhileTrue: [oopHeader := self baseHeader: oop.\r\t\t\toopHeaderType := oopHeader bitAnd: TypeMask.\r\t\t\toopHeaderType = HeaderTypeFree\r\t\t\t\tifTrue: [^ oop]\r\t\t\t\tifFalse: [oopHeaderType = HeaderTypeSizeAndClass\r\t\t\t\t\t\tifTrue: [oopSize := (self sizeHeader: oop) bitAnd: AllButTypeMask]\r\t\t\t\t\t\tifFalse: [oopSize := oopHeader bitAnd: SizeMask]].\r\t\t\toop := self oopFromChunk: oop + oopSize].\r\tself error: 'expected to find at least one free object'! !\r\r!ObjectMemory methodsFor: 'garbage collection' stamp: 'dtl 4/22/2007 20:11'!\rpossibleRootStoreInto: oop value: valueObj \r\t\"oop is an old object. If valueObj is young, mark the object as a root.\"\r\r\tself inline: false.\r\t((self oop: valueObj isGreaterThanOrEqualTo: youngStart)\r\t\t\tand: [(self isIntegerObject: valueObj) not])\r\t\tifTrue: [\"Yes, valueObj is a young object\"\r\t\t\t\tself noteAsRoot: oop headerLoc: oop]! !\r\r!ObjectMemory methodsFor: 'gc -- compaction' stamp: 'dtl 4/22/2007 20:36'!\rfwdBlockValidate: addr \r\t\"Raise an error if the given address is not a valid forward table entry.\"\r\t((self oop: addr isGreaterThan: endOfMemory)\r\t\t\tand: [(self oop: addr isLessThanOrEqualTo: fwdTableNext)\r\t\t\t\t\tand: [(addr bitAnd: 3) = 0]])\r\t\tifFalse: [self error: 'invalid fwd table entry']! !\r\r!ObjectMemory methodsFor: 'gc -- compaction' stamp: 'dtl 4/22/2007 21:21'!\rincCompMakeFwd\r\t\"Create and initialize forwarding blocks for all non-free objects  \r\tfollowing compStart. If the supply of forwarding blocks is exhausted,  \r\tset compEnd to the first chunk above the area to be \r\tcompacted; otherwise, set it to endOfMemory. Return the number of \r\tbytes to be freed.\"\r\t| bytesFreed oop fwdBlock newOop |\r\tself inline: false.\r\tbytesFreed := 0.\r\toop := self oopFromChunk: compStart.\r\t[self oop: oop isLessThan: endOfMemory]\r\t\twhileTrue: [\r\t\t\t\tstatMkFwdCount := statMkFwdCount + 1.\r\t\t\t\t(self isFreeObject: oop)\r\t\t\t\tifTrue: [bytesFreed := bytesFreed + (self sizeOfFree: oop)]\r\t\t\t\tifFalse: [\"create a forwarding block for oop\"\r\t\t\t\t\tfwdBlock := self fwdBlockGet: BytesPerWord*2.\r\t\t\t\t\t\"Two-word block\"\r\t\t\t\t\tfwdBlock = nil\r\t\t\t\t\t\tifTrue: [\"stop; we have used all available forwarding blocks\"\r\t\t\t\t\t\t\tcompEnd := self chunkFromOop: oop.\r\t\t\t\t\t\t\t^ bytesFreed].\r\t\t\t\t\tnewOop := oop - bytesFreed.\r\t\t\t\t\tself initForwardBlock: fwdBlock mapping: oop to: newOop withBackPtr: false].\r\t\t\toop := self objectAfterWhileForwarding: oop].\r\tcompEnd := endOfMemory.\r\t^ bytesFreed! !\r\r!ObjectMemory methodsFor: 'gc -- compaction' stamp: 'dtl 4/22/2007 21:21'!\rincCompMove: bytesFreed \r\t\"Move all non-free objects between compStart and compEnd to their new  \r\tlocations, restoring their headers in the process. Create a new free  \r\tblock at the end of memory. Return the newly created free chunk. \"\r\t\"Note: The free block used by the allocator always must be the last free  \r\tblock in memory. It may take several compaction passes to make all  \r\tfree space bubble up to the end of memory.\"\r\t| oop next fwdBlock newOop header bytesToMove firstWord lastWord newFreeChunk sz target |\r\tself inline: false.\r\tnewOop := nil.\r\toop := self oopFromChunk: compStart.\r\t[self oop: oop isLessThan: compEnd]\r\t\twhileTrue: [statCompMoveCount := statCompMoveCount + 1.\r\t\t\tnext := self objectAfterWhileForwarding: oop.\r\t\t\t(self isFreeObject: oop)\r\t\t\t\tifFalse: [\"a moving object; unwind its forwarding block\"\r\t\t\t\t\tfwdBlock := ((self longAt: oop) bitAnd: AllButMarkBitAndTypeMask) << 1.\r\t\t\t\t\tDoAssertionChecks\r\t\t\t\t\t\tifTrue: [self fwdBlockValidate: fwdBlock].\r\t\t\t\t\tnewOop := self longAt: fwdBlock.\r\t\t\t\t\theader := self longAt: fwdBlock + BytesPerWord.\r\t\t\t\t\tself longAt: oop put: header. \"restore the original header\"\r\t\t\t\t\tbytesToMove := oop - newOop. \"move the oop (including any extra header words) \"\r\t\t\t\t\tsz := self sizeBitsOf: oop.\r\t\t\t\t\tfirstWord := oop - (self extraHeaderBytes: oop).\r\t\t\t\t\tlastWord := oop + sz - BaseHeaderSize.\r\t\t\t\t\ttarget := firstWord - bytesToMove.\r\t\t\t\t\tfirstWord to: lastWord by: BytesPerWord\r\t\t\t\t\t\tdo: [:w | \r\t\t\t\t\t\t\tself longAt: target put: (self longAt: w).\r\t\t\t\t\t\t\ttarget := target + BytesPerWord]].\r\t\t\toop := next].\r\tnewOop = nil\r\t\tifTrue: [\"no objects moved\"\r\t\t\toop := self oopFromChunk: compStart.\r\t\t\t((self isFreeObject: oop) and: [(self objectAfter: oop) = (self oopFromChunk: compEnd)])\r\t\t\t\tifTrue: [newFreeChunk := oop]\r\t\t\t\tifFalse: [newFreeChunk := freeBlock]]\r\t\tifFalse: [\"initialize the newly freed memory chunk\"\r\t\t\t\"newOop is the last object moved; free chunk starts \r\t\t\tright after it\"\r\t\t\tnewFreeChunk := newOop + (self sizeBitsOf: newOop).\r\t\t\tself setSizeOfFree: newFreeChunk to: bytesFreed].\r\tDoAssertionChecks\r\t\tifTrue: [(self objectAfter: newFreeChunk) = (self oopFromChunk: compEnd)\r\t\t\t\tifFalse: [self error: 'problem creating free chunk after compaction']].\r\t(self objectAfter: newFreeChunk) = endOfMemory\r\t\tifTrue: [self initializeMemoryFirstFree: newFreeChunk]\r\t\tifFalse: [\"newFreeChunk is not at end of memory; re-install freeBlock \"\r\t\t\tself initializeMemoryFirstFree: freeBlock].\r\t^ newFreeChunk! !\r\r!ObjectMemory methodsFor: 'gc -- compaction' stamp: 'dtl 4/22/2007 20:17'!\rremapClassOf: oop \r\t\"Update the class of the given object, if necessary, using its forwarding table entry.\"\r\t\"Note: Compact classes need not be remapped since the compact class field is just an index into the compact class \r\ttable. The header type bits show if this object has a compact class; we needn't look up the oop's real header.\"\r\t| classHeader classOop fwdBlock newClassOop newClassHeader |\r\t(self headerType: oop) = HeaderTypeShort ifTrue: [^ nil]. \"compact classes needn't be mapped\"\r\r\tclassHeader := self longAt: oop - BytesPerWord.\r\tclassOop := classHeader bitAnd: AllButTypeMask.\r\t(self isObjectForwarded: classOop)\r\t\tifTrue: [fwdBlock := ((self longAt: classOop) bitAnd: AllButMarkBitAndTypeMask) << 1.\r\t\t\tDoAssertionChecks\r\t\t\t\tifTrue: [self fwdBlockValidate: fwdBlock].\r\t\t\tnewClassOop := self longAt: fwdBlock.\r\t\t\tnewClassHeader := newClassOop bitOr: (classHeader bitAnd: TypeMask).\r\t\t\tself longAt: oop - BytesPerWord put: newClassHeader.\r\t\t\t\"The following ensures that become: into an old object's class makes it a root. \r\t\t\tIt does nothing during either incremental or full compaction because \r\t\t\toop will never be < youngStart.\"\r\t\t\t((self oop: oop isLessThan: youngStart)\r\t\t\t\t\tand: [self oop: newClassOop isGreaterThanOrEqualTo: youngStart])\r\t\t\t\tifTrue: [self beRootWhileForwarding: oop]]! !\r\r!ObjectMemory methodsFor: 'gc -- compaction' stamp: 'dtl 4/22/2007 20:18'!\rremapFieldsAndClassOf: oop \r\t\"Replace all forwarded pointers in this object with their new oops, using the forwarding table. Remap its class as well, if \r\tnecessary. \"\r\t\"Note: The given oop may be forwarded itself, which means that its real header is in its forwarding table entry.\"\r\t| fieldOffset fieldOop fwdBlock newOop |\r\tself inline: true.\r\tfieldOffset := self lastPointerWhileForwarding: oop.\r\t[fieldOffset >= BaseHeaderSize]\r\t\twhileTrue: [fieldOop := self longAt: oop + fieldOffset.\r\t\t\t(self isObjectForwarded: fieldOop)\r\t\t\t\tifTrue: [\"update this oop from its forwarding block\"\r\t\t\t\t\tfwdBlock := ((self longAt: fieldOop) bitAnd: AllButMarkBitAndTypeMask) << 1.\r\t\t\t\t\tDoAssertionChecks\r\t\t\t\t\t\tifTrue: [self fwdBlockValidate: fwdBlock].\r\t\t\t\t\tnewOop := self longAt: fwdBlock.\r\t\t\t\t\tself longAt: oop + fieldOffset put: newOop.\r\t\t\t\t\t\"The following ensures that become: into old object makes it a root. \r\t\t\t\t\tIt does nothing during either incremental or full compaction because \r\t\t\t\t\toop will never be < youngStart.\"\r\t\t\t\t\t((self oop: oop isLessThan: youngStart)\r\t\t\t\t\t\t\tand: [self oop: newOop isGreaterThanOrEqualTo: youngStart])\r\t\t\t\t\t\tifTrue: [self beRootWhileForwarding: oop]].\r\t\t\tfieldOffset := fieldOffset - BytesPerWord].\r\tself remapClassOf: oop! !\r\r!ObjectMemory methodsFor: 'gc -- compaction' stamp: 'dtl 4/22/2007 21:30'!\rupdatePointersInRangeFrom: memStart to: memEnd \r\t\"update pointers in the given memory range\"\r\t| oop |\r\tself inline: false.\r\toop := self oopFromChunk: memStart.\r\t[self oop: oop isLessThan: memEnd]\r\t\twhileTrue: [(self isFreeObject: oop)\r\t\t\t\tifFalse: [self remapFieldsAndClassOf: oop].\r\t\t\toop := self objectAfterWhileForwarding: oop]! !\r\r!ObjectMemory methodsFor: 'gc -- compaction' stamp: 'dtl 4/22/2007 20:31'!\rupdatePointersInRootObjectsFrom: memStart to: memEnd \r\t\"update pointers in root objects\"\r\t| oop |\r\tself inline: false.\r\t1 to: rootTableCount do: [:i | \r\t\t\toop := rootTable at: i.\r\t\t\t((self oop: oop isLessThan: memStart)\r\t\t\t\t\tor: [self oop: oop isGreaterThanOrEqualTo: memEnd])\r\t\t\t\tifTrue: [\"Note: must not remap the fields of any object twice!!\"\r\t\t\t\t\t\"remap this oop only if not in the memory range \r\t\t\t\t\tcovered below\"\r\t\t\t\t\tself remapFieldsAndClassOf: oop]]! !\r\r!ObjectMemory methodsFor: 'plugin support' stamp: 'dtl 4/22/2007 20:06'!\risInMemory: address \r\t\"Return true if the given address is in ST object memory\"\r\t^ (self oop: address isGreaterThanOrEqualTo: self startOfMemory)\r\t\tand: [self oop: address isLessThan: endOfMemory]! !\r\r!ObjectMemory methodsFor: 'memory access' stamp: 'dtl 4/22/2007 18:33'!\rcheckAddress: byteAddress \r\t\"Keep this method around for debugging the C code.\"\r\t(self oop: byteAddress isLessThan: self startOfMemory)\r\t\tifTrue: [self error: 'bad address: negative'].\r\t(self oop: byteAddress isGreaterThanOrEqualTo: memoryLimit)\r\t\tifTrue: [self error: 'bad address: past end of heap']! !\r\r!ObjectMemory methodsFor: 'memory access' stamp: 'dtl 4/22/2007 18:24'!\rvalidateRoots \r\t\"Verify that every old object that points to a new object \r\t\thas its root bit set, and\r\t\tappears in the rootTable.\r\tThis method should not be called if the rootTable is full, because roots\r\tare no longer recorded, and incremental collections are not attempted.\r\tIf DoAssertionChecks is true, this routine will halt on an unmarked root.\r\tOtherwise, this routine will merely return true in that case.\"\r\t| oop fieldAddr fieldOop header badRoot |\r\tself var: #oop type: 'usqInt'.\r\tself var: #fieldAddr type: 'usqInt'.\r\tself var: #fieldOop type: 'usqInt'.\r\tbadRoot := false.\r\toop := self firstObject.\r\r\t[oop < youngStart] whileTrue:\r\t\t[(self isFreeObject: oop) ifFalse:\r\t\t\t[fieldAddr := oop + (self lastPointerOf: oop).\r\t\t\t[fieldAddr > oop] whileTrue:\r\t\t\t\t[fieldOop := self longAt: fieldAddr.\r\t\t\t\t(fieldOop >= youngStart and: [(self isIntegerObject: fieldOop) not]) ifTrue:\r\t\t\t\t\t[\"fieldOop is a pointer to a young object\"\r\t\t\t\t\theader := self longAt: oop.\r\t\t\t\t\t(header bitAnd: RootBit) = 0\r\t\t\t\t\tifTrue:\r\t\t\t\t\t\t[\"Forbidden: points to young obj but root bit not set.\"\r\t\t\t\t\t\tDoAssertionChecks ifTrue: [self error: 'root bit not set'].\r\t\t\t\t\t\tbadRoot := true]\r\t\t\t\t\tifFalse:\r\t\t\t\t\t\t[\"Root bit is set\"\r\t\t\t\t\t\t\"Extreme test -- validate that oop was entered in rootTable too...\"\r\t\t\t\t\t\t\"Disabled for now...\r\t\t\t\t\t\tfound := false.\r\t\t\t\t\t\t1 to: rootTableCount do:\r\t\t\t\t\t\t\t[:i | oop = (rootTable at: i) ifTrue: [found := true]].\r\t\t\t\t\t\tfound ifFalse:\r\t\t\t\t\t\t\t[DoAssertionChecks ifTrue: [self error: 'root table not set'].\r\t\t\t\t\t\t\tbadRoot := true].\r\t\t\t\t\t\t...\"\r\t\t\t\t\t\t]].\r\t\t\t\tfieldAddr := fieldAddr - BytesPerWord]].\r\t\toop := self objectAfter: oop].\r\t^ badRoot! !\r\r!ObjectMemory methodsFor: 'interpreter access' stamp: 'dtl 4/22/2007 21:26'!\rstorePointer: fieldIndex ofObject: oop withValue: valuePointer\r\t\"Note must check here for stores of young objects into old ones.\"\r\r\t(self oop: oop isLessThan: youngStart) ifTrue: [\r\t\tself possibleRootStoreInto: oop value: valuePointer.\r\t].\r\r\t^ self longAt: oop + BaseHeaderSize + (fieldIndex << ShiftForWord)\r\t\tput: valuePointer! !\r\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/specialChangeSets/Old/VmUpdates-dtl/VmUpdates-1005-dtl.1.cs",
    "content": "'From Squeak3.9 of 7 November 2006 [latest update: #7067] on 23 April 2007 at 2:11:33 pm'!\r\"Change Set:\t\tVmUpdates-1005-dtl\rDate:\t\t\t23 April 2007\rAuthor:\t\t\tDavid T. Lewis\r\rUse new oop comparison methods throughout Interpreter wherever necessary to ensure unsigned operands. In some methods, the original comparison operators are used if referencing globals declared as usqInt, or if the methods are not inlined so that local declarations may be used.\r\rUpdate #stObject:at: and #stObject:at:put: to use the new comparison methods rather than Ian's original casts.\"!\r\r\r!Interpreter methodsFor: 'method lookup cache' stamp: 'dtl 4/22/2007 22:28'!\rflushMethodCacheFrom: memStart to: memEnd \r\t\"Flush entries in the method cache only if the oop address is within the given memory range. \r\tThis reduces overagressive cache clearing. Note the AtCache is fully flushed, 70% of the time \r\tcache entries live in newspace, new objects die young\"\r\t| probe |\r\tprobe := 0.\r\t1 to: MethodCacheEntries do: [:i | \r\t\t\t(methodCache at: probe + MethodCacheSelector) = 0\r\t\t\t\tifFalse: [(((((self oop: (methodCache at: probe + MethodCacheSelector) isGreaterThanOrEqualTo: memStart)\r\t\t\t\t\t\t\t\t\t\tand: [self oop: (methodCache at: probe + MethodCacheSelector) isLessThan: memEnd])\r\t\t\t\t\t\t\t\t\tor: [(self oop: (methodCache at: probe + MethodCacheClass) isGreaterThanOrEqualTo: memStart)\r\t\t\t\t\t\t\t\t\t\t\tand: [self oop: (methodCache at: probe + MethodCacheClass) isLessThan: memEnd]])\r\t\t\t\t\t\t\t\tor: [(self oop: (methodCache at: probe + MethodCacheMethod) isGreaterThanOrEqualTo: memStart)\r\t\t\t\t\t\t\t\t\t\tand: [self oop: (methodCache at: probe + MethodCacheMethod) isLessThan: memEnd]])\r\t\t\t\t\t\t\tor: [(self oop: (methodCache at: probe + MethodCacheNative) isGreaterThanOrEqualTo: memStart)\r\t\t\t\t\t\t\t\t\tand: [self oop: (methodCache at: probe + MethodCacheNative) isLessThan: memEnd]])\r\t\t\t\t\t\tifTrue: [methodCache at: probe + MethodCacheSelector put: 0]].\r\t\t\tprobe := probe + MethodCacheEntrySize].\r\t1 to: AtCacheTotalSize do: [:i | atCache at: i put: 0]! !\r\r!Interpreter methodsFor: 'utilities' stamp: 'dtl 4/22/2007 23:45'!\rtransfer: count from: src to: dst \r\t| in out lastIn |\r\tself flag: #Dan.  \"Need to check all senders before converting this for 64 bits\"\r\tself inline: true.\r\tin := src - BytesPerWord.\r\tlastIn := in + (count * BytesPerWord).\r\tout := dst - BytesPerWord.\r\t[self oop: in isLessThan: lastIn]\r\t\twhileTrue: [self\r\t\t\t\tlongAt: (out := out + BytesPerWord)\r\t\t\t\tput: (self longAt: (in := in + BytesPerWord))]! !\r\r!Interpreter methodsFor: 'utilities' stamp: 'dtl 4/22/2007 23:46'!\rtransfer: count fromIndex: firstFrom ofObject: fromOop toIndex: firstTo ofObject: toOop\r\t\"Transfer the specified fullword fields, as from calling context to called context\"\r\t\r\t\"Assume: beRootIfOld: will be called on toOop.\"\r\t| fromIndex toIndex lastFrom |\r\tself flag: #Dan.  \"Need to check all senders before converting this for 64 bits\"\r\tself inline: true.\r\tfromIndex := fromOop + (firstFrom * BytesPerWord).\r\ttoIndex := toOop + (firstTo * BytesPerWord).\r\tlastFrom := fromIndex + (count * BytesPerWord).\r\t[self oop: fromIndex isLessThan: lastFrom]\r\t\twhileTrue: [fromIndex := fromIndex + BytesPerWord.\r\t\t\ttoIndex := toIndex + BytesPerWord.\r\t\t\tself\r\t\t\t\tlongAt: toIndex\r\t\t\t\tput: (self longAt: fromIndex)]! !\r\r!Interpreter methodsFor: 'debug support' stamp: 'dtl 4/22/2007 23:46'!\rverifyCleanHeaders\r\t| oop |\r\toop := self firstObject.\r\t[self oop: oop isLessThan: endOfMemory] whileTrue:\r\t\t[(self isFreeObject: oop)\r\t\t\tifTrue: [\"There should only be one free block at end of memory.\"\r\t\t\t\t\t(self objectAfter: oop) = endOfMemory\r\t\t\t\t\t\tifFalse: [self error: 'Invalid obj with HeaderTypeBits = Free.']]\r\t\t\tifFalse: [((self longAt: oop) bitAnd: MarkBit) = 0\r\t\t\t\t\t\tifFalse: [self error: 'Invalid obj with MarkBit set.']].\r\t\toop := self objectAfter: oop]! !\r\r!Interpreter methodsFor: 'contexts' stamp: 'dtl 4/22/2007 23:26'!\rfetchContextRegisters: activeCntx \r\t\"Note: internalFetchContextRegisters: should track changes  to this method.\"\r\t| tmp |\r\tself inline: true.\r\ttmp := self fetchPointer: MethodIndex ofObject: activeCntx.\r\t(self isIntegerObject: tmp)\r\t\tifTrue: [\"if the MethodIndex field is an integer, activeCntx is a block context\"\r\t\t\ttmp := self fetchPointer: HomeIndex ofObject: activeCntx.\r\t\t\t(self oop: tmp isLessThan: youngStart) ifTrue: [self beRootIfOld: tmp]]\r\t\tifFalse: [\"otherwise, it is a method context and is its own home context \"\r\t\t\ttmp := activeCntx].\r\ttheHomeContext := tmp.\r\treceiver := self fetchPointer: ReceiverIndex ofObject: tmp.\r\tmethod := self fetchPointer: MethodIndex ofObject: tmp.\r\r\t\"the instruction pointer is a pointer variable equal to \r\tmethod oop + ip + BaseHeaderSize \r\t-1 for 0-based addressing of fetchByte \r\t-1 because it gets incremented BEFORE fetching currentByte \"\r\ttmp := self quickFetchInteger: InstructionPointerIndex ofObject: activeCntx.\r\tinstructionPointer := method + tmp + BaseHeaderSize - 2.\r\r\t\"the stack pointer is a pointer variable also...\"\r\ttmp := self quickFetchInteger: StackPointerIndex ofObject: activeCntx.\r\tstackPointer := activeCntx + BaseHeaderSize + (TempFrameStart + tmp - 1 * BytesPerWord)! !\r\r!Interpreter methodsFor: 'contexts' stamp: 'dtl 4/22/2007 23:27'!\rinternalFetchContextRegisters: activeCntx\r\t\"Inlined into return bytecodes. The only difference between this method and fetchContextRegisters: is that this method sets the local IP and SP.\"\r\r\t| tmp |\r\tself inline: true.\r\ttmp := self fetchPointer: MethodIndex ofObject: activeCntx.\r\t(self isIntegerObject: tmp) ifTrue: [\r\t\t\"if the MethodIndex field is an integer, activeCntx is a block context\"\r\t\ttmp := self fetchPointer: HomeIndex ofObject: activeCntx.\r\t\t(self oop: tmp isLessThan: youngStart) ifTrue: [ self beRootIfOld: tmp ].\r\t] ifFalse: [\r\t\t\"otherwise, it is a method context and is its own home context\"\r\t\ttmp := activeCntx.\r\t].\r\tlocalHomeContext := tmp.\r\treceiver := self fetchPointer: ReceiverIndex ofObject: tmp.\r\tmethod := self fetchPointer: MethodIndex ofObject: tmp.\r\r\t\"the instruction pointer is a pointer variable equal to\r\t\tmethod oop + ip + BaseHeaderSize\r\t\t  -1 for 0-based addressing of fetchByte\r\t\t  -1 because it gets incremented BEFORE fetching currentByte\"\r\ttmp := self quickFetchInteger: InstructionPointerIndex ofObject: activeCntx.\r\tlocalIP := self pointerForOop: method + tmp + BaseHeaderSize - 2.\r\r\t\"the stack pointer is a pointer variable also...\"\r\ttmp := self quickFetchInteger: StackPointerIndex ofObject: activeCntx.\r\tlocalSP := self pointerForOop: activeCntx + BaseHeaderSize + ((TempFrameStart + tmp - 1) * BytesPerWord)! !\r\r!Interpreter methodsFor: 'contexts' stamp: 'dtl 4/22/2007 23:27'!\rinternalNewActiveContext: aContext\r\t\"The only difference between this method and newActiveContext: is that this method uses internal context registers.\"\r\tself inline: true.\r\r\tself internalStoreContextRegisters: activeContext.\r\t(self oop: aContext isLessThan: youngStart) ifTrue: [ self beRootIfOld: aContext ].\r\tactiveContext := aContext.\r\tself internalFetchContextRegisters: aContext.! !\r\r!Interpreter methodsFor: 'contexts' stamp: 'dtl 4/22/2007 23:29'!\rnewActiveContext: aContext\r\t\"Note: internalNewActiveContext: should track changes to this method.\"\r\r\tself storeContextRegisters: activeContext.\r\t(self oop: aContext isLessThan: youngStart) ifTrue: [ self beRootIfOld: aContext ].\r\tactiveContext := aContext.\r\tself fetchContextRegisters: aContext.! !\r\r!Interpreter methodsFor: 'array and stream primitive support' stamp: 'dtl 4/22/2007 23:22'!\rcommonVariable: rcvr at: index cacheIndex: atIx \r\t\"This code assumes the reciever has been identified at location atIx in the atCache.\"\r\t| stSize fmt fixedFields result |\r\r\tstSize := atCache at: atIx+AtCacheSize.\r\t((self oop: index isGreaterThanOrEqualTo: 1)\r\t\tand: [self oop: index isLessThanOrEqualTo: stSize])\r\tifTrue:\r\t\t[fmt := atCache at: atIx+AtCacheFmt.\r\t\tfmt <= 4 ifTrue:\r\t\t\t[fixedFields := atCache at: atIx+AtCacheFixedFields.\r\t\t\t^ self fetchPointer: index + fixedFields - 1 ofObject: rcvr].\r\t\tfmt < 8 ifTrue:  \"Bitmap\"\r\t\t\t[result := self fetchLong32: index - 1 ofObject: rcvr.\r\t\t\tresult := self positive32BitIntegerFor: result.\r\t\t\t^ result].\r\t\tfmt >= 16  \"Note fmt >= 16 is an artificial flag for strings\"\r\t\t\tifTrue: \"String\"\r\t\t\t[^ self characterForAscii: (self fetchByte: index - 1 ofObject: rcvr)]\r\t\t\tifFalse: \"ByteArray\"\r\t\t\t[^ self integerObjectOf: (self fetchByte: index - 1 ofObject: rcvr)]].\r\r\tself primitiveFail! !\r\r!Interpreter methodsFor: 'array and stream primitive support' stamp: 'dtl 4/22/2007 23:23'!\rcommonVariable: rcvr at: index put: value cacheIndex: atIx\r\t\"This code assumes the reciever has been identified at location atIx in the atCache.\"\r\t| stSize fmt fixedFields valToPut |\r\tself inline: true.\r\r\tstSize := atCache at: atIx+AtCacheSize.\r\t((self oop: index isGreaterThanOrEqualTo: 1)\r\t\tand: [self oop: index isLessThanOrEqualTo: stSize])\r\tifTrue:\r\t\t[fmt := atCache at: atIx+AtCacheFmt.\r\t\tfmt <= 4 ifTrue:\r\t\t\t[fixedFields := atCache at: atIx+AtCacheFixedFields.\r\t\t\t^ self storePointer: index + fixedFields - 1 ofObject: rcvr withValue: value].\r\t\tfmt < 8 ifTrue:  \"Bitmap\"\r\t\t\t[valToPut := self positive32BitValueOf: value.\r\t\t\tsuccessFlag ifTrue: [self storeLong32: index - 1 ofObject: rcvr withValue: valToPut].\r\t\t\t^ nil].\r\t\tfmt >= 16  \"Note fmt >= 16 is an artificial flag for strings\"\r\t\t\tifTrue: [valToPut := self asciiOfCharacter: value.\r\t\t\t\t\tsuccessFlag ifFalse: [^ nil]]\r\t\t\tifFalse: [valToPut := value].\r\t\t(self isIntegerObject: valToPut) ifTrue:\r\t\t\t[valToPut := self integerValueOf: valToPut.\r\t\t\t((valToPut >= 0) and: [valToPut <= 255]) ifFalse: [^ self primitiveFail].\r\t\t\t^ self storeByte: index - 1 ofObject: rcvr withValue: valToPut]].\r\r\tself primitiveFail! !\r\r!Interpreter methodsFor: 'array and stream primitive support' stamp: 'dtl 4/22/2007 23:24'!\rcommonVariableInternal: rcvr at: index cacheIndex: atIx \r\t\"This code assumes the reciever has been identified at location atIx in the atCache.\"\r\t| stSize fmt fixedFields result |\r\tself inline: true.\r\r\tstSize := atCache at: atIx+AtCacheSize.\r\t((self oop: index isGreaterThanOrEqualTo: 1)\r\t\tand: [self oop: index isLessThanOrEqualTo: stSize])\r\tifTrue:\r\t\t[fmt := atCache at: atIx+AtCacheFmt.\r\t\tfmt <= 4 ifTrue:\r\t\t\t[fixedFields := atCache at: atIx+AtCacheFixedFields.\r\t\t\t^ self fetchPointer: index + fixedFields - 1 ofObject: rcvr].\r\t\tfmt < 8 ifTrue:  \"Bitmap\"\r\t\t\t[result := self fetchLong32: index - 1 ofObject: rcvr.\r\t\t\tself externalizeIPandSP.\r\t\t\tresult := self positive32BitIntegerFor: result.\r\t\t\tself internalizeIPandSP.\r\t\t\t^ result].\r\t\tfmt >= 16  \"Note fmt >= 16 is an artificial flag for strings\"\r\t\t\tifTrue: \"String\"\r\t\t\t[^ self characterForAscii: (self fetchByte: index - 1 ofObject: rcvr)]\r\t\t\tifFalse: \"ByteArray\"\r\t\t\t[^ self integerObjectOf: (self fetchByte: index - 1 ofObject: rcvr)]].\r\r\tself primitiveFail! !\r\r!Interpreter methodsFor: 'array and stream primitive support' stamp: 'dtl 4/22/2007 23:56'!\rstObject: array at: index\r\t\"Return what ST would return for <obj> at: index.\"\r\r\t| hdr fmt totalLength fixedFields stSize |\r\tself inline: false.\r\thdr := self baseHeader: array.\r\tfmt := (hdr >> 8) bitAnd: 16rF.\r\ttotalLength := self lengthOf: array baseHeader: hdr format: fmt.\r\tfixedFields := self fixedFieldsOf: array format: fmt length: totalLength.\r\t(fmt = 3 and: [self isContextHeader: hdr])\r\t\tifTrue: [stSize := self fetchStackPointerOf: array]\r\t\tifFalse: [stSize := totalLength - fixedFields].\r\t((self oop: index isGreaterThanOrEqualTo: 1)\r\t\t\tand: [self oop: index isLessThanOrEqualTo: stSize])\r\t\tifTrue: [^ self subscript: array with: (index + fixedFields) format: fmt]\r\t\tifFalse: [successFlag := false.  ^ 0].! !\r\r!Interpreter methodsFor: 'array and stream primitive support' stamp: 'dtl 4/22/2007 23:56'!\rstObject: array at: index put: value\r\t\"Do what ST would return for <obj> at: index put: value.\"\r\t| hdr fmt totalLength fixedFields stSize |\r\tself inline: false.\r\thdr := self baseHeader: array.\r\tfmt := (hdr >> 8) bitAnd: 16rF.\r\ttotalLength := self lengthOf: array baseHeader: hdr format: fmt.\r\tfixedFields := self fixedFieldsOf: array format: fmt length: totalLength.\r\t(fmt = 3 and: [self isContextHeader: hdr])\r\t\tifTrue: [stSize := self fetchStackPointerOf: array]\r\t\tifFalse: [stSize := totalLength - fixedFields].\r\t((self oop: index isGreaterThanOrEqualTo: 1)\r\t\t\tand: [self oop: index isLessThanOrEqualTo: stSize])\r\t\tifTrue: [self subscript: array with: (index + fixedFields) storing: value format: fmt]\r\t\tifFalse: [successFlag := false]! !\r\r!Interpreter methodsFor: 'image save/restore' stamp: 'dtl 4/22/2007 23:16'!\rbyteSwapByteObjectsFrom: startOop to: stopAddr \r\t\"Byte-swap the words of all bytes objects in a range of the \r\timage, including Strings, ByteArrays, and CompiledMethods. \r\tThis returns these objects to their original byte ordering \r\tafter blindly byte-swapping the entire image. For compiled \r\tmethods, byte-swap only their bytecodes part.\"\r\t| oop fmt wordAddr methodHeader |\r\toop := startOop.\r\t[self oop: oop isLessThan: stopAddr]\r\t\twhileTrue: [(self isFreeObject: oop)\r\t\t\t\tifFalse: [fmt := self formatOf: oop.\r\t\t\t\t\tfmt >= 8\r\t\t\t\t\t\tifTrue: [\"oop contains bytes\"\r\t\t\t\t\t\t\twordAddr := oop + BaseHeaderSize.\r\t\t\t\t\t\t\tfmt >= 12\r\t\t\t\t\t\t\t\tifTrue: [\"compiled method; start after methodHeader and literals\"\r\t\t\t\t\t\t\t\t\tmethodHeader := self longAt: oop + BaseHeaderSize.\r\t\t\t\t\t\t\t\t\twordAddr := wordAddr + BytesPerWord + ((methodHeader >> 10 bitAnd: 255) * BytesPerWord)].\r\t\t\t\t\t\t\tself reverseBytesFrom: wordAddr to: oop + (self sizeBitsOf: oop)].\r\t\t\t\t\t(fmt = 6 and: [BytesPerWord = 8])\r\t\t\t\t\t\tifTrue: [\"Object contains 32-bit half-words packed into 64-bit machine words.\"\r\t\t\t\t\t\t\twordAddr := oop + BaseHeaderSize.\r\t\t\t\t\t\t\tself reverseWordsFrom: wordAddr to: oop + (self sizeBitsOf: oop)]].\r\t\t\toop := self objectAfter: oop]! !\r\r!Interpreter methodsFor: 'image save/restore' stamp: 'dtl 4/22/2007 23:41'!\rreverseBytesFrom: startAddr to: stopAddr\r\t\"Byte-swap the given range of memory (not inclusive of stopAddr!!).\"\r\t| addr |\r\tself flag: #Dan.\r\taddr := startAddr.\r\t[self oop: addr isLessThan: stopAddr] whileTrue:\r\t\t[self longAt: addr put: (self byteSwapped: (self longAt: addr)).\r\t\taddr := addr + BytesPerWord].! !\r\r!Interpreter methodsFor: 'image save/restore' stamp: 'dtl 4/22/2007 23:42'!\rreverseWordsFrom: startAddr to: stopAddr\r\t\"Word-swap the given range of memory, excluding stopAddr.\"\r\r\t| addr |\r\taddr := startAddr.\r\t[self oop: addr isLessThan: stopAddr] whileTrue:\r\t\t[self longAt: addr put: (self wordSwapped: (self longAt: addr)).\r\t\taddr := addr + BytesPerWord].! !\r\r!Interpreter methodsFor: 'image save/restore' stamp: 'dtl 4/22/2007 23:42'!\rsnapshotCleanUp\r\t\"Clean up right before saving an image, sweeping memory and:\r\t* nilling out all fields of contexts above the stack pointer. \r\t* flushing external primitives \r\t* clearing the root bit of any object in the root table \"\r\t| oop header fmt sz |\r\toop := self firstObject.\r\t[self oop: oop isLessThan: endOfMemory]\r\t\twhileTrue: [(self isFreeObject: oop)\r\t\t\t\tifFalse: [header := self longAt: oop.\r\t\t\t\t\tfmt := header >> 8 bitAnd: 15.\r\t\t\t\t\t\"Clean out context\"\r\t\t\t\t\t(fmt = 3 and: [self isContextHeader: header])\r\t\t\t\t\t\tifTrue: [sz := self sizeBitsOf: oop.\r\t\t\t\t\t\t\t(self lastPointerOf: oop) + BytesPerWord\r\t\t\t\t\t\t\t\tto: sz - BaseHeaderSize by: BytesPerWord\r\t\t\t\t\t\t\t\tdo: [:i | self longAt: oop + i put: nilObj]].\r\t\t\t\t\t\"Clean out external functions\"\r\t\t\t\t\tfmt >= 12\r\t\t\t\t\t\tifTrue: [\"This is a compiled method\"\r\t\t\t\t\t\t\t(self primitiveIndexOf: oop) = PrimitiveExternalCallIndex\r\t\t\t\t\t\t\t\tifTrue: [\"It's primitiveExternalCall\"\r\t\t\t\t\t\t\t\t\tself flushExternalPrimitiveOf: oop]]].\r\t\t\toop := self objectAfter: oop].\r\tself clearRootsTable! !\r\r!Interpreter methodsFor: 'plugin primitive support' stamp: 'dtl 4/22/2007 23:27'!\rflushExternalPrimitives\r\t\"Flush the references to external functions from plugin \r\tprimitives. This will force a reload of those primitives when \r\taccessed next. \r\tNote: We must flush the method cache here so that any \r\tfailed primitives are looked up again.\"\r\t| oop primIdx |\r\toop := self firstObject.\r\t[self oop: oop isLessThan: endOfMemory]\r\t\twhileTrue: [(self isFreeObject: oop)\r\t\t\t\tifFalse: [(self isCompiledMethod: oop)\r\t\t\t\t\t\tifTrue: [\"This is a compiled method\"\r\t\t\t\t\t\t\tprimIdx := self primitiveIndexOf: oop.\r\t\t\t\t\t\t\tprimIdx = PrimitiveExternalCallIndex\r\t\t\t\t\t\t\t\tifTrue: [\"It's primitiveExternalCall\"\r\t\t\t\t\t\t\t\t\tself flushExternalPrimitiveOf: oop]]].\r\t\t\toop := self objectAfter: oop].\r\tself flushMethodCache.\r\tself flushObsoleteIndexedPrimitives.\r\tself flushExternalPrimitiveTable! !\r\r!Interpreter methodsFor: 'object access primitives' stamp: 'dtl 4/22/2007 23:17'!\rchangeClassOf: rcvr to: argClass\r\t\"Change the class of the receiver into the class specified by the argument given that the format of the receiver matches the format of the argument. Fail if receiver or argument are SmallIntegers, or the receiver is an instance of a compact class and the argument isn't, or when the argument's class is compact and the receiver isn't, or when the format of the receiver is different from the format of the argument's class, or when the arguments class is fixed and the receiver's size differs from the size that an instance of the argument's class should have.\"\r\t| classHdr sizeHiBits byteSize argFormat rcvrFormat ccIndex |\r\t\"Check what the format of the class says\"\r\tclassHdr := self formatOfClass: argClass. \"Low 2 bits are 0\"\r\r\t\"Compute the size of instances of the class (used for fixed field classes only)\"\r\tsizeHiBits := (classHdr bitAnd: 16r60000) >> 9.\r\tclassHdr := classHdr bitAnd: 16r1FFFF.\r\tbyteSize := (classHdr bitAnd: SizeMask) + sizeHiBits. \"size in bytes -- low 2 bits are 0\"\r\r\t\"Check the receiver's format against that of the class\"\r\targFormat := (classHdr >> 8) bitAnd: 16rF.\r\trcvrFormat := self formatOf: rcvr.\r\targFormat = rcvrFormat ifFalse:[^self primitiveFail]. \"no way\"\r\r\t\"For fixed field classes, the sizes must match.\r\tNote: byteSize-4 because base header is included in class size.\"\r\targFormat < 2 ifTrue:[(byteSize - BaseHeaderSize) = (self byteSizeOf: rcvr) ifFalse:[^self primitiveFail]].\r\r\t(self headerType: rcvr) = HeaderTypeShort\r\t\tifTrue:[ \"Compact classes. Check if the arg's class is compact and exchange ccIndex\"\r\t\t\tccIndex := classHdr bitAnd: CompactClassMask.\r\t\t\tccIndex = 0 ifTrue:[^self primitiveFail]. \"class is not compact\"\r\t\t\tself longAt: rcvr put:\r\t\t\t\t(((self longAt: rcvr) bitAnd: CompactClassMask bitInvert32)\r\t\t\t\t\tbitOr: ccIndex)]\r\t\tifFalse:[\"Exchange the class pointer, which could make rcvr a root for argClass\"\r\t\t\tself longAt: rcvr-BaseHeaderSize put: (argClass bitOr: (self headerType: rcvr)).\r\t\t\t(self oop: rcvr isLessThan: youngStart)\r\t\t\t\tifTrue: [self possibleRootStoreInto: rcvr value: argClass]].\r\r\t\"Flush cache because rcvr's class has changed\"\r\tself flushMethodCache.\r! !\r\r!Interpreter methodsFor: 'object access primitives' stamp: 'dtl 4/22/2007 23:53'!\rprimitiveStoreStackp\r\t\"Atomic store into context stackPointer. \r\tAlso ensures that any newly accessible cells are initialized to nil \"\r\t| ctxt newStackp stackp |\r\tctxt := self stackValue: 1.\r\tnewStackp := self stackIntegerValue: 0.\r\tself success: (self oop: newStackp isGreaterThanOrEqualTo: 0).\r\tself success: (self oop: newStackp isLessThanOrEqualTo: (LargeContextSize - BaseHeaderSize // BytesPerWord - CtxtTempFrameStart)).\r\tsuccessFlag ifFalse: [^ self primitiveFail].\r\tstackp := self fetchStackPointerOf: ctxt.\r\t(self oop: newStackp isGreaterThan: stackp) ifTrue: [\"Nil any newly accessible cells\"\r\t\t\tstackp + 1 to: newStackp do: [:i | self storePointer: i + CtxtTempFrameStart - 1 ofObject: ctxt withValue: nilObj]].\r\tself storeStackPointerValue: newStackp inContext: ctxt.\r\tself pop: 1! !\r\r!Interpreter methodsFor: 'return bytecodes' stamp: 'dtl 4/23/2007 09:01'!\rcommonReturn\r\t\"Note: Assumed to be inlined into the dispatch loop.\"\r\r\t| nilOop thisCntx contextOfCaller localCntx localVal unwindMarked |\r\tself inline: true.\r\tself sharedCodeNamed: 'commonReturn' inCase: 120.\r\r\tnilOop := nilObj. \"keep in a register\"\r\tthisCntx := activeContext.\r\tlocalCntx := localReturnContext.\r\tlocalVal := localReturnValue.\r\r\t\"make sure we can return to the given context\"\r\t((localCntx = nilOop) or:\r\t [(self fetchPointer: InstructionPointerIndex ofObject: localCntx) = nilOop]) ifTrue: [\r\t\t\"error: sender's instruction pointer or context is nil; cannot return\"\r\t\t^self internalCannotReturn: localVal].\r\r\t\"If this return is not to our immediate predecessor (i.e. from a method to its sender, or from a block to its caller), scan the stack for the first unwind marked context and inform this context and let it deal with it. This provides a chance for ensure unwinding to occur.\"\r\tthisCntx := self fetchPointer: SenderIndex ofObject: activeContext.\r\r\t\"Just possibly a faster test would be to compare the homeContext and activeContext - they are of course different for blocks. Thus we might be able to optimise a touch by having a different returnTo for the blockreteurn (since we know that must return to caller) and then if active ~= home we must be doing a non-local return. I think. Maybe.\"\r\t[thisCntx = localCntx] whileFalse: [\r\t\tthisCntx = nilOop ifTrue:[\r\t\t\t\"error: sender's instruction pointer or context is nil; cannot return\"\r\t\t\t^self internalCannotReturn: localVal].\r\t\t\"Climb up stack towards localCntx. Break out to a send of #aboutToReturn:through: if an unwind marked context is found\"\r\t\tunwindMarked := self isUnwindMarked: thisCntx.\r\t\tunwindMarked ifTrue:[\r\t\t\t\"context is marked; break out\"\r\t\t\t^self internalAboutToReturn: localVal through: thisCntx].\r\t\tthisCntx := self fetchPointer: SenderIndex ofObject: thisCntx.\r ].\r\r\t\"If we get here there is no unwind to worry about. Simply terminate the stack up to the localCntx - often just the sender of the method\"\r\tthisCntx := activeContext.\r\t[thisCntx = localCntx]\r\t\twhileFalse:\r\t\t[\"climb up stack to localCntx\"\r\t\tcontextOfCaller := self fetchPointer: SenderIndex ofObject: thisCntx.\r\r\t\t\"zap exited contexts so any future attempted use will be caught\"\r\t\tself storePointerUnchecked: SenderIndex ofObject: thisCntx withValue: nilOop.\r\t\tself storePointerUnchecked: InstructionPointerIndex ofObject: thisCntx withValue: nilOop.\r\t\treclaimableContextCount > 0 ifTrue:\r\t\t\t[\"try to recycle this context\"\r\t\t\treclaimableContextCount := reclaimableContextCount - 1.\r\t\t\tself recycleContextIfPossible: thisCntx].\r\t\tthisCntx := contextOfCaller].\r\r\tactiveContext := thisCntx.\r\t(self oop: thisCntx isLessThan: youngStart) ifTrue: [ self beRootIfOld: thisCntx ].\r\r\tself internalFetchContextRegisters: thisCntx.  \"updates local IP and SP\"\r\tself fetchNextBytecode.\r\tself internalPush: localVal.\r! !\r\r!Interpreter methodsFor: 'image segment in/out' stamp: 'dtl 4/22/2007 22:16'!\rcopyObj: oop toSegment: segmentWordArray addr: lastSeg stopAt: stopAddr saveOopAt: oopPtr headerAt: hdrPtr\r\t\"Copy this object into the segment beginning at lastSeg.\r\tInstall a forwarding pointer, and save oop and header.\r\tFail if out of space.  Return the next segmentAddr if successful.\"\r\r\t\"Copy the object...\"\r\t| extraSize bodySize hdrAddr |\r\tself flag: #Dan.  \"None of the imageSegment stuff has been updated for 64 bits\"\r\tsuccessFlag ifFalse: [^ lastSeg].\r\textraSize := self extraHeaderBytes: oop.\r\tbodySize := self sizeBitsOf: oop.\r\t(self oop: (lastSeg + extraSize + bodySize) isGreaterThanOrEqualTo: stopAddr)\r\t\tifTrue: [^ self primitiveFail].\r\tself transfer: extraSize + bodySize // BytesPerWord  \"wordCount\"\r\t\tfrom: oop - extraSize\r\t\tto: lastSeg+BytesPerWord.\r\r\t\"Clear root and mark bits of all headers copied into the segment\"\r\thdrAddr := lastSeg+BytesPerWord + extraSize.\r\tself longAt: hdrAddr put: ((self longAt: hdrAddr) bitAnd: AllButRootBit - MarkBit).\r\r\tself forward: oop to: (lastSeg+BytesPerWord + extraSize - segmentWordArray)\r\t\tsavingOopAt: oopPtr andHeaderAt: hdrPtr.\r\r\t\"Return new end of segment\"\r\t^ lastSeg + extraSize + bodySize! !\r\r!Interpreter methodsFor: 'image segment in/out' stamp: 'dtl 4/23/2007 00:06'!\rprimitiveLoadImageSegment\r\t\"This primitive is called from Squeak as...\r\t\t<imageSegment> loadSegmentFrom: aWordArray outPointers: anArray.\"\r\r\"This primitive will load a binary image segment created by primitiveStoreImageSegment.  It expects the outPointer array to be of the proper size, and the wordArray to be well formed.  It will return as its value the original array of roots, and the erstwhile segmentWordArray will have been truncated to a size of zero.  If this primitive should fail, the segmentWordArray will, sadly, have been reduced to an unrecognizable and unusable jumble.  But what more could you have done with it anyway?\"\r\r\t| outPointerArray segmentWordArray endSeg segOop fieldPtr fieldOop doingClass lastPtr extraSize mapOop lastOut outPtr hdrTypeBits header data |\r\r\tself var: #endSeg type: 'usqInt'.\r\tself var: #segOop type: 'usqInt'.\r\tself var: #fieldPtr type: 'usqInt'.\r\tself var: #lastOut type: 'usqInt'.\r\tself var: #outPtr type: 'usqInt'.\r\tself var: #lastPtr type: 'usqInt'.\r\r\tDoAssertionChecks ifTrue: [self verifyCleanHeaders].\r\toutPointerArray := self stackTop.\r\tlastOut := outPointerArray + (self lastPointerOf: outPointerArray).\r\tsegmentWordArray := self stackValue: 1.\r\tendSeg := segmentWordArray + (self sizeBitsOf: segmentWordArray) - BaseHeaderSize.\r\r\t\"Essential type checks\"\r\t((self formatOf: outPointerArray) = 2\t\t\t\t\"Must be indexable pointers\"\r\t\tand: [(self formatOf: segmentWordArray) = 6])\t\"Must be indexable words\"\r\t\tifFalse: [^ self primitiveFail].\r\r\t\"Version check.  Byte order of the WordArray now\"\r\tdata := self longAt: segmentWordArray + BaseHeaderSize.\r\t(self readableFormat: (data bitAnd: 16rFFFF \"low 2 bytes\")) ifFalse: [\r\t\t\"Not readable -- try again with reversed bytes...\"\r\t\tself reverseBytesFrom: segmentWordArray + BaseHeaderSize to: endSeg + BytesPerWord.\r\t\tdata := self longAt: segmentWordArray + BaseHeaderSize.\r\t\t(self readableFormat: (data bitAnd: 16rFFFF \"low 2 bytes\")) ifFalse: [\r\t\t\t\"Still NG -- put things back and fail\"\r\t\t\tself reverseBytesFrom: segmentWordArray + BaseHeaderSize to: endSeg + BytesPerWord.\r\t\t\tDoAssertionChecks ifTrue: [self verifyCleanHeaders].\r\t\t\t^ self primitiveFail]].\r\t\"Reverse the Byte type objects if the data from opposite endian machine\"\r\t\"Test top byte.  $d on the Mac or $s on the PC.  Rest of word is equal\"\r\tdata = self imageSegmentVersion ifFalse: [\r\t\t\"Reverse the byte-type objects once\"\r\t\tsegOop := self oopFromChunk: segmentWordArray + BaseHeaderSize + BytesPerWord.\r\t\t\t \"Oop of first embedded object\"\r\t\tself byteSwapByteObjectsFrom: segOop to: endSeg + BytesPerWord].\r\r\t\"Proceed through the segment, remapping pointers...\"\r\tsegOop := self oopFromChunk: segmentWordArray + BaseHeaderSize + BytesPerWord.\r\t[segOop <= endSeg] whileTrue:\r\t\t[(self headerType: segOop) <= 1\r\t\t\tifTrue: [\"This object has a class field (type = 0 or 1) -- start with that.\"\r\t\t\t\t\tfieldPtr := segOop - BytesPerWord.  doingClass := true]\r\t\t\tifFalse: [\"No class field -- start with first data field\"\r\t\t\t\t\tfieldPtr := segOop + BaseHeaderSize.  doingClass := false].\r\t\tlastPtr := segOop + (self lastPointerOf: segOop).\t\"last field\"\r\t\tlastPtr > endSeg ifTrue: [\r\t\t\tDoAssertionChecks ifTrue: [self verifyCleanHeaders].\r\t\t\t^ self primitiveFail \"out of bounds\"].\r\r\t\t\"Go through all oops, remapping them...\"\r\t\t[fieldPtr > lastPtr] whileFalse:\r\t\t\t[\"Examine each pointer field\"\r\t\t\tfieldOop := self longAt: fieldPtr.\r\t\t\tdoingClass ifTrue:\r\t\t\t\t[hdrTypeBits := self headerType: fieldPtr.\r\t\t\t\tfieldOop := fieldOop - hdrTypeBits].\r\t\t\t(self isIntegerObject: fieldOop)\r\t\t\t\tifTrue:\r\t\t\t\t\t[\"Integer -- nothing to do\"\r\t\t\t\t\tfieldPtr := fieldPtr + BytesPerWord]\r\t\t\t\tifFalse:\r\t\t\t\t\t[(fieldOop bitAnd: 3) = 0 ifFalse: [^ self primitiveFail \"bad oop\"].\r\t\t\t\t\t(fieldOop bitAnd: 16r80000000) = 0\r\t\t\t\t\t\tifTrue: [\"Internal pointer -- add segment offset\"\r\t\t\t\t\t\t\t\tmapOop := fieldOop + segmentWordArray]\r\t\t\t\t\t\tifFalse: [\"External pointer -- look it up in outPointers\"\r\t\t\t\t\t\t\t\toutPtr := outPointerArray + (fieldOop bitAnd: 16r7FFFFFFF).\r\t\t\t\t\t\t\t\toutPtr > lastOut ifTrue: [^ self primitiveFail \"out of bounds\"].\r\t\t\t\t\t\t\t\tmapOop := self longAt: outPtr].\r\t\t\t\t\tdoingClass\r\t\t\t\t\t\tifTrue: [self longAt: fieldPtr put: mapOop + hdrTypeBits.\r\t\t\t\t\t\t\t\tfieldPtr := fieldPtr + 8.\r\t\t\t\t\t\t\t\tdoingClass := false]\r\t\t\t\t\t\tifFalse: [self longAt: fieldPtr put: mapOop.\r\t\t\t\t\t\t\t\tfieldPtr := fieldPtr + BytesPerWord].\r\t\t\t\t\tsegOop < youngStart\r\t\t\t\t\t\tifTrue: [self possibleRootStoreInto: segOop value: mapOop].\r\t\t\t\t\t]].\r\t\tsegOop := self objectAfter: segOop].\r\r\t\"Again, proceed through the segment checking consistency...\"\r\tsegOop := self oopFromChunk: segmentWordArray + BaseHeaderSize + BytesPerWord.\r\t[segOop <= endSeg] whileTrue:\r\t\t[(self oopHasAcceptableClass: segOop) ifFalse: [^ self primitiveFail \"inconsistency\"].\r\t\tfieldPtr := segOop + BaseHeaderSize.\t\t\"first field\"\r\t\tlastPtr := segOop + (self lastPointerOf: segOop).\t\"last field\"\r\t\t\"Go through all oops, remapping them...\"\r\t\t[fieldPtr > lastPtr] whileFalse:\r\t\t\t[\"Examine each pointer field\"\r\t\t\tfieldOop := self longAt: fieldPtr.\r\t\t\t(self oopHasAcceptableClass: fieldOop) ifFalse: [^ self primitiveFail \"inconsistency\"].\r\t\t\tfieldPtr := fieldPtr + BytesPerWord].\r\t\tsegOop := self objectAfter: segOop].\r\r\t\"Truncate the segment word array to size = BytesPerWord (vers stamp only)\"\r\textraSize := self extraHeaderBytes: segmentWordArray.\r\thdrTypeBits := self headerType: segmentWordArray.\r\textraSize = 8\r\t\tifTrue: [self longAt: segmentWordArray-extraSize put: BaseHeaderSize + BytesPerWord + hdrTypeBits]\r\t\tifFalse: [header := self longAt: segmentWordArray.\r\t\t\t\tself longAt: segmentWordArray\r\t\t\t\t\tput: header - (header bitAnd: SizeMask) + BaseHeaderSize + BytesPerWord].\t\r\t\"and return the roots array which was first in the segment\"\r\tDoAssertionChecks ifTrue: [self verifyCleanHeaders].\r\tself pop: 3 thenPush: (self oopFromChunk: segmentWordArray + BaseHeaderSize + BytesPerWord).\r! !\r\r!Interpreter methodsFor: 'image segment in/out' stamp: 'dtl 4/22/2007 23:10'!\rprimitiveStoreImageSegment\r\t\"This primitive is called from Squeak as...\r\t\t<imageSegment> storeSegmentFor: arrayOfRoots into: aWordArray outPointers: anArray.\"\r\r\"This primitive will store a binary image segment (in the same format as the Squeak image file) of the receiver and every object in its proper tree of subParts (ie, that is not refered to from anywhere else outside the tree).  All pointers from within the tree to objects outside the tree will be copied into the array of outpointers.  In their place in the image segment will be an oop equal to the offset in the outPointer array (the first would be 4). but with the high bit set.\"\r\r\"The primitive expects the array and wordArray to be more than adequately long.  In this case it returns normally, and truncates the two arrays to exactly the right size.  To simplify truncation, both incoming arrays are required to be 256 bytes or more long (ie with 3-word headers).  If either array is too small, the primitive will fail, but in no other case.\r\rDuring operation of the primitive, it is necessary to convert from both internal and external oops to their mapped values.  To make this fast, the headers of the original objects in question are replaced by the mapped values (and this is noted by adding the forbidden XX header type).  Tables are kept of both kinds of oops, as well as of the original headers for restoration.\r\rTo be specific, there are two similar two-part tables, the outpointer array, and one in the upper fifth of the segmentWordArray.  Each grows oops from the bottom up, and preserved headers from halfway up.\r\rIn case of either success or failure, the headers must be restored.  In the event of primitive failure, the table of outpointers must also be nilled out (since the garbage in the high half will not have been discarded.\"\r\r\t| outPointerArray segmentWordArray savedYoungStart lastOut lastIn firstIn lastSeg endSeg segOop fieldPtr fieldOop mapOop doingClass lastPtr extraSize hdrTypeBits arrayOfRoots hdrBaseIn hdrBaseOut header firstOut versionOffset |\r\r\tself var: #firstIn type: 'usqInt'.\r\tself var: #lastIn type: 'usqInt'.\r\tself var: #firstOut type: 'usqInt'.\r\tself var: #lastOut type: 'usqInt'.\r\tself var: #hdrBaseIn type: 'usqInt'.\r\tself var: #hdrBaseOut type: 'usqInt'.\r\tself var: #lastSeg type: 'usqInt'.\r\tself var: #endSeg type: 'usqInt'.\r\tself var: #fieldPtr type: 'usqInt'.\r\tself var: #lastPtr type: 'usqInt'.\r\tself var: #segOop type: 'usqInt'.\r\tself var: #savedYoungStart type: 'usqInt'.\r\r\toutPointerArray := self stackTop.\r\tsegmentWordArray := self stackValue: 1.\r\tarrayOfRoots := self stackValue: 2.\r\r\t\"Essential type checks\"\r\t((self formatOf: arrayOfRoots) = 2\t\t\t\t\"Must be indexable pointers\"\r\t\tand: [(self formatOf: outPointerArray) = 2\t\t\t\t\"Must be indexable pointers\"\r\t\tand: [(self formatOf: segmentWordArray) = 6]])\t\"Must be indexable words\"\r\t\tifFalse: [^ self primitiveFail].\r\t((self headerType: outPointerArray) = HeaderTypeSizeAndClass\t\"Must be 3-word header\"\r\t\tand: [(self headerType: segmentWordArray) = HeaderTypeSizeAndClass])\t\"Must be 3-word header\"\r\t\tifFalse: [^ self primitiveFail].\r\r\tDoAssertionChecks ifTrue: [self verifyCleanHeaders].\r\t\"Use the top half of outPointers for saved headers.\"\r\tfirstOut := outPointerArray + BaseHeaderSize.\r\tlastOut := firstOut - BytesPerWord.\r\thdrBaseOut := outPointerArray + ((self lastPointerOf: outPointerArray) // (BytesPerWord*2) * BytesPerWord). \"top half\"\r\r\tlastSeg := segmentWordArray.\r\tendSeg := segmentWordArray + (self sizeBitsOf: segmentWordArray) - BytesPerWord.\r\r\t\"Write a version number for byte order and version check\"\r\tversionOffset := BytesPerWord.\r\tlastSeg := lastSeg + versionOffset.\r\tlastSeg > endSeg ifTrue: [^ self primitiveFail].\r\tself longAt: lastSeg put: self imageSegmentVersion.\r\r\t\"Allocate top 1/8 of segment for table of internal oops and saved headers\"\r\tfirstIn := endSeg - ((self sizeBitsOf: segmentWordArray) // (BytesPerWord*8) * BytesPerWord).  \"Take 1/8 of seg\"\r\tlastIn := firstIn - BytesPerWord.\r\thdrBaseIn := firstIn + ((self sizeBitsOf: segmentWordArray) // (BytesPerWord*16) * BytesPerWord). \"top half of that\"\r\r\t\"First mark the rootArray and all root objects.\"\r\tself longAt: arrayOfRoots put: ((self longAt: arrayOfRoots) bitOr: MarkBit).\r\tlastPtr := arrayOfRoots + (self lastPointerOf: arrayOfRoots).\r\tfieldPtr := arrayOfRoots + BaseHeaderSize.\r\t[fieldPtr <= lastPtr] whileTrue:\r\t\t[fieldOop := self longAt: fieldPtr.\r\t\t(self isIntegerObject: fieldOop) ifFalse:\r\t\t\t[self longAt: fieldOop put: ((self longAt: fieldOop) bitOr: MarkBit)].\r\t\tfieldPtr := fieldPtr + BytesPerWord].\r\r\t\"Then do a mark pass over all objects.  This will stop at our marked roots,\r\tthus leaving our segment unmarked in their shadow.\"\r\tsavedYoungStart := youngStart.\r\tyoungStart := self startOfMemory.  \"process all of memory\"\r\t\t\"clear the recycled context lists\"\r\t\tfreeContexts := NilContext.\r\t\tfreeLargeContexts := NilContext.\r\tself markAndTraceInterpreterOops.\t\"and special objects array\"\r\tyoungStart := savedYoungStart.\r\t\r\t\"Finally unmark the rootArray and all root objects.\"\r\tself longAt: arrayOfRoots put: ((self longAt: arrayOfRoots) bitAnd: AllButMarkBit).\r\tfieldPtr := arrayOfRoots + BaseHeaderSize.\r\t[fieldPtr <= lastPtr] whileTrue:\r\t\t[fieldOop := self longAt: fieldPtr.\r\t\t(self isIntegerObject: fieldOop) ifFalse:\r\t\t\t[self longAt: fieldOop put: ((self longAt: fieldOop) bitAnd: AllButMarkBit)].\r\t\tfieldPtr := fieldPtr + BytesPerWord].\r\r\t\"All external objects, and only they, are now marked.\r\tCopy the array of roots into the segment, and forward its oop.\"\r\tlastIn := lastIn + BytesPerWord.\r\tlastIn >= hdrBaseIn ifTrue: [successFlag := false].\r\tlastSeg := self copyObj: arrayOfRoots toSegment: segmentWordArray addr: lastSeg stopAt: firstIn saveOopAt: lastIn headerAt: hdrBaseIn + (lastIn - firstIn).\r\tsuccessFlag ifFalse:\r\t\t[lastIn := lastIn - BytesPerWord.\r\t\tself restoreHeadersFrom: firstIn to: lastIn from: hdrBaseIn and: firstOut to: lastOut from: hdrBaseOut.\r\t\t^ self primitiveFailAfterCleanup: outPointerArray].\r\r\t\"Now run through the segment fixing up all the pointers.\r\tNote that more objects will be added to the segment as we make our way along.\"\r\tsegOop := self oopFromChunk: segmentWordArray + versionOffset + BaseHeaderSize.\r\t[segOop <= lastSeg] whileTrue:\r\t\t[(self headerType: segOop) <= 1\r\t\t\tifTrue: [\"This object has a class field (type=0 or 1) -- start with that.\"\r\t\t\t\t\tfieldPtr := segOop - BytesPerWord.  doingClass := true]\r\t\t\tifFalse: [\"No class field -- start with first data field\"\r\t\t\t\t\tfieldPtr := segOop + BaseHeaderSize.  doingClass := false].\r\t\tlastPtr := segOop + (self lastPointerOf: segOop).\t\"last field\"\r\r\t\t\"Go through all oops, remapping them...\"\r\t\t[fieldPtr > lastPtr] whileFalse:\r\t\t\t[\"Examine each pointer field\"\r\t\t\tfieldOop := self longAt: fieldPtr.\r\t\t\tdoingClass ifTrue:\r\t\t\t\t[hdrTypeBits := fieldOop bitAnd: TypeMask.\r\t\t\t\tfieldOop := fieldOop - hdrTypeBits].\r\t\t\t(self isIntegerObject: fieldOop)\r\t\t\t\tifTrue: [\"Just an integer -- nothing to do\"\r\t\t\t\t\t\tfieldPtr := fieldPtr + BytesPerWord]\r\t\t\t\tifFalse:\r\t\t\t\t[header := self longAt: fieldOop.\r\t\t\t\t(header bitAnd: TypeMask) = HeaderTypeFree\r\t\t\t\t\tifTrue: [\"Has already been forwarded -- this is the link\"\r\t\t\t\t\t\t\tmapOop := header bitAnd: AllButTypeMask]\r\t\t\t\t\tifFalse:\r\t\t\t\t\t[((self longAt: fieldOop) bitAnd: MarkBit) = 0\r\t\t\t\t\t\tifTrue:\r\t\t\t\t\t\t\t[\"Points to an unmarked obj -- an internal pointer.\r\t\t\t\t\t\t\tCopy the object into the segment, and forward its oop.\"\r\t\t\t\t\t\t\tlastIn := lastIn + BytesPerWord.\r\t\t\t\t\t\t\tlastIn >= hdrBaseIn ifTrue: [successFlag := false].\r\t\t\t\t\t\t\tlastSeg := self copyObj: fieldOop toSegment: segmentWordArray addr: lastSeg stopAt: firstIn saveOopAt: lastIn headerAt: hdrBaseIn + (lastIn - firstIn).\r\t\t\t\t\t\t\tsuccessFlag ifFalse:\r\t\t\t\t\t\t\t\t[\"Out of space in segment\"\r\t\t\t\t\t\t\t\tlastIn := lastIn - BytesPerWord.\r\t\t\t\t\t\t\t\tself restoreHeadersFrom: firstIn to: lastIn from: hdrBaseIn and: firstOut to: lastOut from: hdrBaseOut.\r\t\t\t\t\t\t\t\t^ self primitiveFailAfterCleanup: outPointerArray].\r\t\t\t\t\t\t\tmapOop := (self longAt: fieldOop) bitAnd: AllButTypeMask]\r\t\t\t\t\t\tifFalse:\r\t\t\t\t\t\t\t[\"Points to a marked obj -- an external pointer.\r\t\t\t\t\t\t\tMap it as a tagged index in outPointers, and forward its oop.\"\r\t\t\t\t\t\t\tlastOut := lastOut + BytesPerWord.\r\t\t\t\t\t\t\tlastOut >= hdrBaseOut ifTrue:\r\t\t\t\t\t\t\t\t[\"Out of space in outPointerArray\"\r\t\t\t\t\t\t\t\tlastOut := lastOut - BytesPerWord.\r\t\t\t\t\t\t\t\tself restoreHeadersFrom: firstIn to: lastIn from: hdrBaseIn and: firstOut to: lastOut from: hdrBaseOut.\r\t\t\t\t\t\t\t\t^ self primitiveFailAfterCleanup: outPointerArray].\r.\t\t\t\t\t\t\tmapOop := lastOut - outPointerArray bitOr: 16r80000000.\r\t\t\t\t\t\t\tself forward: fieldOop to: mapOop\r\t\t\t\t\t\t\t\tsavingOopAt: lastOut andHeaderAt: hdrBaseOut + (lastOut - firstOut)]].\r\t\t\t\t\t\"Replace the oop by its mapped value\"\r\t\t\t\t\tdoingClass\r\t\t\t\t\t\tifTrue: [self longAt: fieldPtr put: mapOop + hdrTypeBits.\r\t\t\t\t\t\t\t\tfieldPtr := fieldPtr + (BytesPerWord*2).\r\t\t\t\t\t\t\t\tdoingClass := false]\r\t\t\t\t\t\tifFalse: [self longAt: fieldPtr put: mapOop.\r\t\t\t\t\t\t\t\tfieldPtr := fieldPtr + BytesPerWord].\r]].\r\t\tsegOop := self objectAfter: segOop].\r\r\tself restoreHeadersFrom: firstIn to: lastIn from: hdrBaseIn and: firstOut to: lastOut from: hdrBaseOut.\r\r\t\"Truncate the outPointerArray...\"\r\t((outPointerArray + (self lastPointerOf: outPointerArray) - lastOut) < 12\r\t\tor: [(endSeg - lastSeg) < 12]) ifTrue:\r\t\t\t[\"Not enough room to insert simple 3-word headers\"\r\t\t\t^ self primitiveFailAfterCleanup: outPointerArray].\r\textraSize := self extraHeaderBytes: segmentWordArray.\r\thdrTypeBits := self headerType: segmentWordArray.\r\t\"Copy the 3-word wordArray header to establish a free chunk.\"\r\tself transfer: 3\r\t\tfrom: segmentWordArray - extraSize\r\t\tto: lastOut+BytesPerWord.\r\t\"Adjust the size of the original as well as the free chunk.\"\r\tself longAt: lastOut+BytesPerWord\r\t\tput: outPointerArray + (self lastPointerOf: outPointerArray) - lastOut - extraSize + hdrTypeBits.\r\tself longAt: outPointerArray-extraSize\r\t\tput: lastOut - firstOut + (BytesPerWord*2) + hdrTypeBits.\r\t\"Note that pointers have been stored into roots table\"\r\tself beRootIfOld: outPointerArray.\r\r\t\"Truncate the image segment...\"\r\t\"Copy the 3-word wordArray header to establish a free chunk.\"\r\tself transfer: 3\r\t\tfrom: segmentWordArray - extraSize\r\t\tto: lastSeg+BytesPerWord.\r\t\"Adjust the size of the original as well as the free chunk.\"\r\tself longAt: segmentWordArray-extraSize\r\t\tput: lastSeg - segmentWordArray + BaseHeaderSize + hdrTypeBits.\r\tself longAt: lastSeg+BytesPerWord\r\t\tput: endSeg - lastSeg - extraSize + hdrTypeBits.\r\r\tDoAssertionChecks ifTrue: [self verifyCleanHeaders].\r\tself pop: 3.  \"...leaving the reciever on the stack as return value\"\r! !\r\r!Interpreter methodsFor: 'image segment in/out' stamp: 'dtl 4/22/2007 23:40'!\rrestoreHeadersFrom: firstIn to: lastIn from: hdrBaseIn and: firstOut to: lastOut from: hdrBaseOut\r\r\t\"Restore headers smashed by forwarding links\"\r\t| tablePtr oop header |\r\ttablePtr := firstIn.\r\t[self oop: tablePtr isLessThanOrEqualTo: lastIn] whileTrue:\r\t\t[oop := self longAt: tablePtr.\r\t\theader := self longAt: hdrBaseIn + (tablePtr-firstIn).\r\t\tself longAt: oop put: header.\r\t\ttablePtr := tablePtr + BytesPerWord].\r\ttablePtr := firstOut.\r\t[self oop: tablePtr isLessThanOrEqualTo: lastOut] whileTrue:\r\t\t[oop := self longAt: tablePtr.\r\t\theader := self longAt: hdrBaseOut + (tablePtr-firstOut).\r\t\tself longAt: oop put: header.\r\t\ttablePtr := tablePtr + BytesPerWord].\r\t\r\t\"Clear all mark bits\"\r\toop := self firstObject.\r\t[self oop: oop isLessThan: endOfMemory] whileTrue:\r\t\t[(self isFreeObject: oop) ifFalse:\r\t\t\t[self longAt: oop put: ((self longAt: oop) bitAnd: AllButMarkBit)].\r\t\toop := self objectAfter: oop].\r! !\r\r!Interpreter methodsFor: 'debug printing' stamp: 'dtl 4/22/2007 23:38'!\rprintAllStacks\r\t\"Print all the stacks of all running processes, including those that are currently suspended.\"\r\t| oop proc ctx |\r\tproc := self fetchPointer: ActiveProcessIndex ofObject: self schedulerPointer.\r\tself printNameOfClass: (self fetchClassOf: proc) count: 5.\r\tself cr.\r\tself printCallStackOf: activeContext. \"first the active context\"\r\toop := self firstObject.\r\t[self oop: oop isLessThan: endOfMemory] whileTrue:[\r\t\t(self fetchClassOf: oop) == self classSemaphore ifTrue:[\r\t\t\tself cr.\r\t\t\tproc := self fetchPointer: FirstLinkIndex ofObject: oop.\r\t\t\t[proc == self nilObject] whileFalse:[\r\t\t\t\tself printNameOfClass: (self fetchClassOf: proc) count: 5.\r\t\t\t\tself cr.\r\t\t\t\tctx := self fetchPointer: SuspendedContextIndex ofObject: proc.\r\t\t\t\tctx == self nilObject ifFalse:[self printCallStackOf: ctx].\r\t\t\t\tproc := self fetchPointer: NextLinkIndex ofObject: proc].\r\t\t].\r\t\toop := self objectAfter: oop.\r\t].! !\r\r!Interpreter methodsFor: 'initialization' stamp: 'dtl 4/22/2007 23:29'!\rloadInitialContext\r\r\t| sched proc |\r\tsched := self fetchPointer: ValueIndex ofObject: (self splObj: SchedulerAssociation).\r\tproc := self fetchPointer: ActiveProcessIndex ofObject: sched.\r\tactiveContext := self fetchPointer: SuspendedContextIndex ofObject: proc.\r\t(self oop: activeContext isLessThan: youngStart) ifTrue: [ self beRootIfOld: activeContext ].\r\tself fetchContextRegisters: activeContext.\r\treclaimableContextCount := 0.! !\r\r!Interpreter methodsFor: 'stack bytecodes' stamp: 'dtl 4/22/2007 23:43'!\rstoreAndPopReceiverVariableBytecode\r\t\"Note: This code uses \r\tstorePointerUnchecked:ofObject:withValue: and does the \r\tstore check explicitely in order to help the translator \r\tproduce better code.\"\r\t| rcvr top |\r\tself fetchNextBytecode.\r\t\"this bytecode will be expanded so that refs to \r\tcurrentBytecode below will be constant\"\r\trcvr := receiver.\r\ttop := self internalStackTop.\r\t(self oop: rcvr isLessThan: youngStart)\r\t\tifTrue: [self possibleRootStoreInto: rcvr value: top].\r\tself storePointerUnchecked: (currentBytecode bitAnd: 7) ofObject: rcvr withValue: top.\r\tself internalPop: 1! !\r\r!Interpreter methodsFor: 'object memory support' stamp: 'dtl 4/22/2007 23:31'!\rpostGCAction\r\t\"Mark the active and home contexts as roots if old. This \r\tallows the interpreter to use storePointerUnchecked to \r\tstore into them.\"\r\r\tcompilerInitialized\r\t\tifTrue: [self compilerPostGC]\r\t\tifFalse: [(self oop: activeContext isLessThan: youngStart)\r\t\t\t\tifTrue: [self beRootIfOld: activeContext].\r\t\t\t(self oop: theHomeContext isLessThan: youngStart)\r\t\t\t\tifTrue: [self beRootIfOld: theHomeContext]].\r\t(self sizeOfFree: freeBlock) > shrinkThreshold\r\t\tifTrue: [\"Attempt to shrink memory after successfully \r\t\t\treclaiming lots of memory\"\r\t\t\tself shrinkObjectMemory: (self sizeOfFree: freeBlock) - growHeadroom].\r\t\r\tself signalSemaphoreWithIndex: gcSemaphoreIndex.\r! !\r\r!Interpreter methodsFor: 'memory space primitives' stamp: 'dtl 4/22/2007 22:51'!\rprimitiveIsYoung\r\t\"Primitive. Answer whether the argument to the primitive resides in young space.\"\r\t| oop |\r\tself export: true.\r\toop := self stackObjectValue: 0.\r\tsuccessFlag ifTrue:[\r\t\tself pop: argumentCount + 1.\r\t\tself pushBool: (self oop: oop isGreaterThanOrEqualTo: youngStart).\r\t].! !\r\r!Interpreter methodsFor: 'sound primitives' stamp: 'dtl 4/22/2007 23:33'!\rprimitiveConstantFill\r\t\"Fill the receiver, which must be an indexable bytes or words \r\tobjects, with the given integer value.\"\r\t| fillValue rcvr rcvrIsBytes end i |\r\tself var: #end type: 'usqInt'.\r\tself var: #i type: 'usqInt'.\r\tfillValue := self positive32BitValueOf: self stackTop.\r\trcvr := self stackValue: 1.\r\tself success: (self isWordsOrBytes: rcvr).\r\trcvrIsBytes := self isBytes: rcvr.\r\trcvrIsBytes ifTrue: [self success: (fillValue >= 0 and: [fillValue <= 255])].\r\tsuccessFlag\r\t\tifTrue: [end := rcvr + (self sizeBitsOf: rcvr).\r\t\t\ti := rcvr + BaseHeaderSize.\r\t\t\trcvrIsBytes\r\t\t\t\tifTrue: [[i < end]\r\t\t\t\t\t\twhileTrue: [self byteAt: i put: fillValue.\r\t\t\t\t\t\t\ti := i + 1]]\r\t\t\t\tifFalse: [[i < end]\r\t\t\t\t\t\twhileTrue: [self long32At: i put: fillValue.\r\t\t\t\t\t\t\ti := i + 4]].\r\t\t\tself pop: 1]! !\r\r!Interpreter methodsFor: 'quick primitives' stamp: 'dtl 4/22/2007 23:35'!\rprimitiveInstVarsPutFromStack\r\t\"Note:  this primitive has been decommissioned.  It is only here for short-term compatibility with an internal 2.3beta-d image that used this.  It did not save much time and it complicated several things.  Plus Jitter will do it right anyway.\"\r\t| rcvr offsetBits |\r\trcvr := self stackValue: argumentCount.\r\t\"Mark dirty so stores below can be unchecked\"\r\t(self oop: rcvr isLessThan: youngStart) ifTrue: [ self beRootIfOld: rcvr ].\r\t0 to: argumentCount-1 do:\r\t\t[:i | (i bitAnd: 3) = 0 ifTrue:\r\t\t\t[offsetBits := self positive32BitValueOf: (self literal: i//4 ofMethod: newMethod)].\r\t\tself storePointerUnchecked: (offsetBits bitAnd: 16rFF) ofObject: rcvr\r\t\t\t\t\t\twithValue: (self stackValue: i).\r\t\toffsetBits := offsetBits >> 8].\r\tself pop: argumentCount! !\r\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/specialChangeSets/Old/VmUpdates-dtl/VmUpdates-1006-dtl.1.cs",
    "content": "'From Squeak3.9 of 7 November 2006 [latest update: #7067] on 23 April 2007 at 2:11:40 pm'!\r\"Change Set:\t\tVmUpdates-1006-dtl\rDate:\t\t\t23 April 2007\rAuthor:\t\t\tDavid T. Lewis\r\rRemoved unnecessary type cast in #biasToGrowCheckGCLimit. JMM please double-check this and make sure I did not mess up your original intent.\"!\r\r\r!ObjectMemory methodsFor: 'garbage collection' stamp: 'dtl 4/22/2007 18:10'!\rbiasToGrowCheckGCLimit\r\t| growth |\r\tgrowth := (youngStart - memory) - gcBiasToGrowThreshold.\r\tgrowth < 0 ifTrue: [gcBiasToGrowThreshold := youngStart - memory].\r\tgrowth > gcBiasToGrowGCLimit\r\t\t ifTrue: \r\t\t\t[self fullGC.\r\t\t\tgcBiasToGrowThreshold := youngStart - memory].\r\r\t\t\t\t\t! !\r\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/specialChangeSets/Old/bigCursor-bf.1.cs",
    "content": "'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 2 March 2007 at 12:20:22 am'!\r\"Change Set:\t\tbigCursor-bf\rDate:\t\t\t2 March 2007\rAuthor:\t\t\tBert Freudenberg\r\rAdd support for big, colored cursors with alpha. New suppoort code needed:\rioSetCursorARGB(cursorBitsIndex, extentX, extentY, offsetX, offsetY)\"!\r\r\r!Interpreter methodsFor: 'I/O primitives' stamp: 'bf 3/2/2007 00:10'!\rprimitiveBeCursor\r\t\"Set the cursor to the given shape. The Mac only supports 16x16 pixel cursors. Cursor offsets are handled by Smalltalk.\"\r\r\t| cursorObj maskBitsIndex maskObj bitsObj extentX extentY depth offsetObj offsetX offsetY cursorBitsIndex ourCursor |\r\targumentCount = 0 ifTrue: [\r\t\tcursorObj := self stackTop.\r\t\tmaskBitsIndex := nil].\r\targumentCount = 1 ifTrue: [\r\t\tcursorObj := self stackValue: 1.\r\t\tmaskObj := self stackTop].\r\tself success: (argumentCount < 2).\r\r\tself success: ((self isPointers: cursorObj) and: [(self lengthOf: cursorObj) >= 5]).\r\tsuccessFlag ifTrue: [\r\t\tbitsObj := self fetchPointer: 0 ofObject: cursorObj.\r\t\textentX := self fetchInteger: 1 ofObject: cursorObj.\r\t\textentY := self fetchInteger: 2 ofObject: cursorObj.\r\t\tdepth := self fetchInteger: 3 ofObject: cursorObj.\r\t\toffsetObj := self fetchPointer: 4 ofObject: cursorObj].\r\t\tself success: ((self isPointers: offsetObj) and: [(self lengthOf: offsetObj) >= 2]).\r\r\tsuccessFlag ifTrue: [\r\t\toffsetX := self fetchInteger: 0 ofObject: offsetObj.\r\t\toffsetY := self fetchInteger: 1 ofObject: offsetObj.\r\r\t\t(argumentCount = 0 and: [depth = 32])\r\t\t\tifTrue: [\r\t\t\t\t\"Support arbitrary-sized 32 bit ARGB forms --bf 3/1/2007 23:51\"\r\t\t\t\tself success: ((extentX > 0) and: [extentY > 0]).\r\t\t\t\tself success: ((offsetX >= (extentX * -1)) and: [offsetX <= 0]).\r\t\t\t\tself success: ((offsetY >= (extentY * -1)) and: [offsetY <= 0]).\r\t\t\t\tcursorBitsIndex := bitsObj + BaseHeaderSize.\r\t\t\t\tself success: ((self isWords: bitsObj) and: [(self lengthOf: bitsObj) = (extentX * extentY)]).\r\t\t\t\tself cCode: '' inSmalltalk:\r\t\t\t\t\t[ourCursor := Cursor\r\t\t\t\t\t\textent: extentX @ extentY\r\t\t\t\t\t\tdepth: 32\r\t\t\t\t\t\tfromArray: ((1 to: extentX * extentY) collect: [:i |\r\t\t\t\t\t\t\tself fetchWord: i-1 ofObject: bitsObj])\r\t\t\t\t\t\toffset: offsetX  @ offsetY]]\r\t\t\tifFalse: [\r\t\t\t\tself success: ((extentX = 16) and: [extentY = 16 and: [depth = 1]]).\r\t\t\t\tself success: ((offsetX >= -16) and: [offsetX <= 0]).\r\t\t\t\tself success: ((offsetY >= -16) and: [offsetY <= 0]).\r\t\t\t\tself success: ((self isWords: bitsObj) and: [(self lengthOf: bitsObj) = 16]).\r\t\t\t\tcursorBitsIndex _ bitsObj + BaseHeaderSize.\r\t\t\t\tself cCode: '' inSmalltalk:\r\t\t\t\t\t[ourCursor := Cursor\r\t\t\t\t\t\textent: extentX @ extentY\r\t\t\t\t\t\tfromArray: ((1 to: 16) collect: [:i |\r\t\t\t\t\t\t\t((self fetchWord: i-1 ofObject: bitsObj) >> 16) bitAnd: 16rFFFF])\r\t\t\t\t\t\toffset: offsetX  @ offsetY]]].\r\r\targumentCount = 1 ifTrue: [\r\t\tself success: ((self isPointers: maskObj) and: [(self lengthOf: maskObj) >= 5]).\r\t\tsuccessFlag ifTrue: [\r\t\t\tbitsObj := self fetchPointer: 0 ofObject: maskObj.\r\t\t\textentX := self fetchInteger: 1 ofObject: maskObj.\r\t\t\textentY := self fetchInteger: 2 ofObject: maskObj.\r\t\t\tdepth := self fetchInteger: 3 ofObject: maskObj].\r\r\t\tsuccessFlag ifTrue: [\r\t\t\tself success: ((extentX = 16) and: [extentY = 16 and: [depth = 1]]).\r\t\t\tself success: ((self isWords: bitsObj) and: [(self lengthOf: bitsObj) = 16]).\r\t\t\tmaskBitsIndex := bitsObj + BaseHeaderSize]].\r\r\r\tsuccessFlag ifTrue: [\r\t\targumentCount = 0\r\t\t\tifTrue: [\r\t\t\t\tdepth = 32\r\t\t\t\t\tifTrue: [(self cCode: 'ioSetCursorARGB(cursorBitsIndex, extentX, extentY, offsetX, offsetY)'\r\t\t\t\t\t\tinSmalltalk: [ourCursor show. Cursor currentCursor == ourCursor])\t\r\t\t\t\t\t\t\tifFalse: [^self success: false]]\r\t\t\t\t\tifFalse: [self cCode: 'ioSetCursor(cursorBitsIndex, offsetX, offsetY)'\r\t\t\t\t\t\tinSmalltalk: [ourCursor show]]]\r\t\t\tifFalse: [self cCode: 'ioSetCursorWithMask(cursorBitsIndex, maskBitsIndex, offsetX, offsetY)'\r\t\t\t\t\t\tinSmalltalk: [ourCursor show]].\r\t\tself pop: argumentCount].\r! !\r\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/specialChangeSets/VMM38-64bit-imageUpdates.1.cs",
    "content": "'From Squeak3.8gamma of ''24 November 2004'' [latest update: #6599] on 27 April 2005 at 11:08:01 am'!\r\"Change Set:\t\tVMM38-64bit-imageUpdates\rDate:\t\t\t2005-04-27\rAuthor:\t\t\ttim@rowledge.org, derived from original by ian.piumarta@squeakland.org and johnmci@smalltalkconsultants.com\r\rChanges relative to 3.8g-6548 that add some initial 64-bit support to the image. Needs to go into the update stream asap\"!\r\r\r!SmalltalkImage methodsFor: 'vm parameters' stamp: 'tpr 4/27/2005 11:03'!\rvmParameterAt: parameterIndex\r\t\"parameterIndex is a positive integer corresponding to one of the VM's internal\r\tparameter/metric registers.  Answer with the current value of that register.\r\tFail if parameterIndex has no corresponding register.\r\tVM parameters are numbered as follows:\r\t\t1\tend of old-space (0-based, read-only)\r\t\t2\tend of young-space (read-only)\r\t\t3\tend of memory (read-only)\r\t\t4\tallocationCount (read-only)\r\t\t5\tallocations between GCs (read-write)\r\t\t6\tsurvivor count tenuring threshold (read-write)\r\t\t7\tfull GCs since startup (read-only)\r\t\t8\ttotal milliseconds in full GCs since startup (read-only)\r\t\t9\tincremental GCs since startup (read-only)\r\t\t10\ttotal milliseconds in incremental GCs since startup (read-only)\r\t\t11\ttenures of surving objects since startup (read-only)\r\t\t12-20 specific to the translating VM\r\t\t21\troot table size (read-only)\r\t\t22\troot table overflows since startup (read-only)\r\t\t23\tbytes of extra memory to reserve for VM buffers, plugins, etc.\r\r\t\t24\tmemory threshold above which shrinking object memory (rw)\r\t\t25\tmemory headroom when growing object memory (rw)\r\t\t26  interruptChecksEveryNms - force an ioProcessEvents every N milliseconds, in case the image  is not calling getNextEvent often (rw)\r\t\t27\tnumber of times mark loop iterated for current IGC/FGC (read-only) includes ALL marking\r\t\t28\tnumber of times sweep loop iterated  for current IGC/FGC (read-only)\r\t\t29\tnumber of times make forward loop iterated for current IGC/FGC (read-only)\r\t\t30\tnumber of times compact move loop iterated for current IGC/FGC (read-only)\r\t\t31\tnumber of grow memory requests (read-only)\r\t\t32\tnumber of shrink memory requests (read-only)\r\t\t33\tnumber of root table entries used for current IGC/FGC (read-only)\r\t\t34\tnumber of allocations done before current IGC/FGC (read-only)\r\t\t35\tnumber of survivor objects after current IGC/FGC (read-only)\r\t\t36  millisecond clock when current IGC/FGC completed (read-only)\r\t\t37  number of marked objects for Roots of the world, not including Root Table entries for current IGC/FGC (read-only)\r\t\t38  milliseconds taken by current IGC  (read-only)\r\t\t39  Number of finalization signals for Weak Objects pending when current IGC/FGC completed (read-only)\r\t\t40  VM word size - 4 or 8 (read-only)\"\r\r\t<primitive: 254>\r\tself primitiveFailed! !\r\r\r!SystemDictionary methodsFor: 'sources, change log' stamp: 'JMM 4/13/2005 20:35'!\rwordSize\r\t\"Answer the size (in bytes) of an object pointer.\"\r\t\"Smalltalk wordSize\"\r\r\t^[SmalltalkImage current vmParameterAt: 40] on: Error do: [4]! !\r\r!SystemDictionary methodsFor: 'deprecated' stamp: 'tpr 4/27/2005 11:04'!\rvmParameterAt: parameterIndex\r\t\"See comment for SmalltalkImage>vmParameterAt:\"\r\r\t^ self deprecated: 'Use SmalltalkImage current vmParameterAt:'\r\t\tblock: [SmalltalkImage current vmParameterAt: parameterIndex]\r\t! !\r\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/specialChangeSets/VMM38-gc-instrument-image.1.cs",
    "content": "'From Squeak3.8gamma of ''24 November 2004'' [latest update: #6599] on 27 April 2005 at 11:14:55 am'!\r\"Change Set:\t\tVMM38-gc-instrument-image\rDate:\t\t\t27 April 2005\rAuthor:\t\t\ttim@rowledge.org derived from original by johnmci@smalltalkconsulting.com and andreas.raab@gmx.de\r\rImage side methods to support revised GC handling of weak pointers and GC instrumentation. See SystemDictionary>forceTenure, isYoung: etc.\r\rNeeds to go into update stream asap\"!\r\r\r!SystemDictionary methodsFor: 'memory space' stamp: 'JMM 1/27/2005 13:23'!\rforceTenure\r\t\"Primitive. Tell the GC logic to force a tenure on the next increment GC.\"\r\t<primitive: 'primitiveForceTenure'>\r\t^self primitiveFailed! !\r\r!SystemDictionary methodsFor: 'memory space' stamp: 'ar 1/18/2005 16:46'!\risRoot: oop\r\t\"Primitive. Answer whether the object is currently a root for youngSpace.\"\r\t<primitive: 'primitiveIsRoot'>\r\t^self primitiveFailed! !\r\r!SystemDictionary methodsFor: 'memory space' stamp: 'ar 1/18/2005 16:47'!\risYoung: oop\r\t\"Primitive. Answer whether the object currently resides in youngSpace.\"\r\t<primitive: 'primitiveIsYoung'>\r\t^self primitiveFailed! !\r\r!SystemDictionary methodsFor: 'memory space' stamp: 'ar 1/18/2005 16:48'!\rrootTable\r\t\"Primitive. Answer a snapshot of the VMs root table. \r\tKeep in mind that the primitive may itself cause GC.\"\r\t<primitive: 'primitiveRootTable'>\r\t^self primitiveFailed! !\r\r!SystemDictionary methodsFor: 'memory space' stamp: 'ar 1/18/2005 16:49'!\rrootTableAt: index\r\t\"Primitive. Answer the nth element of the VMs root table\"\r\t<primitive: 'primitiveRootTableAt'>\r\t^nil! !\r\r!SystemDictionary methodsFor: 'memory space' stamp: 'JMM 1/27/2005 13:12'!\rsetGCBiasToGrow: aNumber\r\t\"Primitive. Indicate that the GC logic should be bias to grow\"\r\t<primitive: 'primitiveSetGCBiasToGrow'>\r\t^self primitiveFailed\r\"Example:\r\tSmalltalk setGCBiasToGrowGCLimit: 16*1024*1024.\r\tSmalltalk setGCBiasToGrow: 1.\r\"! !\r\r!SystemDictionary methodsFor: 'memory space' stamp: 'JMM 1/27/2005 12:27'!\rsetGCBiasToGrowGCLimit: aNumber\r\t\"Primitive. Indicate that the bias to grow logic should do a GC after aNumber Bytes\"\r\t<primitive: 'primitiveSetGCBiasToGrowGCLimit'>\r\t^self primitiveFailed\r\"Example:\r\tSmalltalk setGCBiasToGrowGCLimit: 16*1024*1024.\r\"! !\r\r!SystemDictionary methodsFor: 'memory space' stamp: 'ar 1/18/2005 16:54'!\rsetGCSemaphore: semaIndex\r\t\"Primitive. Indicate the GC semaphore index to be signaled on GC occurance.\"\r\t<primitive: 'primitiveSetGCSemaphore'>\r\t^self primitiveFailed\r\"Example:\r\r\t| index sema process |\r\tsema := Semaphore new.\r\tindex := Smalltalk registerExternalObject: sema.\r\tSmalltalk setGCSemaphore: index.\r\tprocess := [\r\t\t[[true] whileTrue:[\r\t\t\tsema wait.\r\t\t\tSmalltalk beep.\r\t\t]] ensure:[\r\t\t\tSmalltalk setGCSemaphore: 0.\r\t\t\tSmalltalk unregisterExternalObject: sema.\r\t\t].\r\t] fork.\r\tprocess inspect.\r\"! !\r\r!SystemDictionary methodsFor: 'special objects' stamp: 'JMM 1/27/2005 12:17'!\rrecreateSpecialObjectsArray    \"Smalltalk recreateSpecialObjectsArray\"\r\t\"The Special Objects Array is an array of object pointers used by the\r\tSqueak virtual machine.  Its contents are critical and unchecked,\r\tso don't even think of playing here unless you know what you are doing.\"\r\t| newArray |\r\tnewArray _ Array new: 50.\r\t\"Nil false and true get used throughout the interpreter\"\r\tnewArray at: 1 put: nil.\r\tnewArray at: 2 put: false.\r\tnewArray at: 3 put: true.\r\t\"This association holds the active process (a ProcessScheduler)\"\r\tnewArray at: 4 put: (Smalltalk associationAt: #Processor).\r\t\"Numerous classes below used for type checking and instantiation\"\r\tnewArray at: 5 put: Bitmap.\r\tnewArray at: 6 put: SmallInteger.\r\tnewArray at: 7 put: String.\r\tnewArray at: 8 put: Array.\r\tnewArray at: 9 put: Smalltalk. \r\tnewArray at: 10 put: Float.\r\tnewArray at: 11 put: MethodContext.\r\tnewArray at: 12 put: BlockContext.\r\tnewArray at: 13 put: Point.\r\tnewArray at: 14 put: LargePositiveInteger.\r\tnewArray at: 15 put: Display.\r\tnewArray at: 16 put: Message.\r\tnewArray at: 17 put: CompiledMethod.\r\tnewArray at: 18 put: (self specialObjectsArray at: 18)  \"(low space Semaphore)\".\r\tnewArray at: 19 put: Semaphore.\r\tnewArray at: 20 put: Character.\r\tnewArray at: 21 put: #doesNotUnderstand:.\r\tnewArray at: 22 put: #cannotReturn:.\r\tnewArray at: 23 put: nil.  \"*unused*\"\r\t\"An array of the 32 selectors that are compiled as special bytecodes,\r\tpaired alternately with the number of arguments each takes.\"\r\tnewArray at: 24 put: #(+ 1 - 1 < 1 > 1 <= 1 >= 1 = 1 ~= 1 * 1 / 1 \\\\ 1 @ 1 bitShift: 1 // 1 bitAnd: 1 bitOr: 1 at: 1 at:put: 2 size 0 next 0 nextPut: 1 atEnd 0 == 1 class 0 blockCopy: 1 value 0 value: 1 do: 1 new 0 new: 1 x 0 y 0 ).\r\t\"An array of the 255 Characters in ascii order.\"\r\tnewArray at: 25 put: ((0 to: 255) collect: [:ascii | Character value: ascii]).\r\tnewArray at: 26 put: #mustBeBoolean.\r\tnewArray at: 27 put: ByteArray.\r\tnewArray at: 28 put: Process.\r\t\"An array of up to 31 classes whose instances will have compact headers\"\r\tnewArray at: 29 put: self compactClassesArray.\r\tnewArray at: 30 put: (self specialObjectsArray at: 30)   \"(delay Semaphore)\".\r\tnewArray at: 31 put: (self specialObjectsArray at: 31)   \"(user interrupt Semaphore)\".\r\tnewArray at: 32 put: nil. \r\tnewArray at: 33 put: nil.\r\tnewArray at: 34 put: nil.\r\tnewArray at: 35 put: #cannotInterpret:.\r\t\"Note: This must be fixed once we start using context prototypes\"\r\tnewArray at: 36 put: (self specialObjectsArray at: 36). \r\t\t\t\t\t\t\"(MethodContext new: CompiledMethod fullFrameSize).\"\r\tnewArray at: 37 put: nil.\r\tnewArray at: 38 put: (self specialObjectsArray at: 38). \r\t\t\t\t\t\t\"(BlockContext new: CompiledMethod fullFrameSize).\"\r\r\tnewArray at: 39 put: Array new.  \"array of objects referred to by external code\"\r\r\tnewArray at: 40 put: PseudoContext.\r\tnewArray at: 41 put: TranslatedMethod.\r\r\t\"finalization Semaphore\"\r\tnewArray at: 42 put: ((self specialObjectsArray at: 42) ifNil:[Semaphore new]).\r\r\tnewArray at: 43 put: LargeNegativeInteger.\r\r\t\"External objects for callout.\r\tNote: Written so that one can actually completely remove the FFI.\"\r\tnewArray at: 44 put: (Smalltalk at: #ExternalAddress ifAbsent:[nil]).\r\tnewArray at: 45 put: (Smalltalk at: #ExternalStructure ifAbsent:[nil]).\r\tnewArray at: 46 put: (Smalltalk at: #ExternalData ifAbsent:[nil]).\r\tnewArray at: 47 put: (Smalltalk at: #ExternalFunction ifAbsent:[nil]).\r\tnewArray at: 48 put: (Smalltalk at: #ExternalLibrary ifAbsent:[nil]).\r\r\tnewArray at: 49 put: #aboutToReturn:through:.\r\tnewArray at: 50 put: #run:with:in:.\r\r\t\"Now replace the interpreter's reference in one atomic operation\"\r\tself specialObjectsArray become: newArray! !\r\r"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqConfig.h",
    "content": "/* sqConfig.h -- platform identification and configuration */\n\n#if defined(TARGET_API_MAC_CARBON)\n  /* For Apple's OS X versions of darwin */\n# include <MacTypes.h>\n#endif\n#define macintoshSqueak 1\n\n# if defined(SQ_CONFIG_DONE)\n#   error configuration conflict\n# endif\n# define SQ_CONFIG_DONE\n\n#if !defined(SQ_CONFIG_DONE)\n# error test for, and describe, your architecture here.\n#endif\n\n#if defined(__BIG_ENDIAN__)\n# define VMBIGENDIAN 1\n#else\n# define VMBIGENDIAN 0\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacEncoding.c",
    "content": "/*\n *  sqMacEncoding.c\n *  SqueakVMForCarbon\n *\n *  Created by John M McIntosh on Mon Dec 01 2003.\n *\tMay 24th, 2005, JMM. bug in SetImageNameViaCFString\n *\n 3.8.11b1 Mar 4th, 2006 JMM refactor, cleanup and add headless support\n */\n#include \"sq.h\"\n\n#include \"sqMacEncoding.h\"\n#include \"sqMacUIConstants.h\" \n#include \"sqMacFileLogic.h\"\t\n\n\n    CFStringEncoding gCurrentVMEncoding=kCFStringEncodingMacRoman;\n\n\n/*** Variables -- image and path names ***/\nchar imageName[IMAGE_NAME_SIZE+1];\n\nstatic CFStringRef vmPathString=NULL;\nstatic CFStringRef imageNameString=NULL;\nstatic CFStringRef shortImageNameString=NULL;\n\nvoid getVMPathWithEncoding(char *target,UInt32 encoding) {\n    CFStringGetCString (vmPathString, target, VMPATH_SIZE, encoding);\n}\n\nvoid SetVMPathFromCFString(CFMutableStringRef strRef) {    \n    if (vmPathString != NULL)  \n        CFRelease(vmPathString);\n\tvmPathString = strRef;\n\tCFRetain(vmPathString);\n}\n\nBoolean VMPathIsEmpty() {\n    char path[VMPATH_SIZE + 1];\n     if (vmPathString == NULL) \n        return true;\n    getVMPathWithEncoding(path,gCurrentVMEncoding);\n    return (*path == 0x00);\n}\n\nvoid getImageNameWithEncoding(char *target,UInt32 encoding) {\n    CFStringGetCString (imageNameString, target, IMAGE_NAME_SIZE, encoding);\n}\n\nchar *getImageName(void) {\n    getImageNameWithEncoding(imageName,gCurrentVMEncoding);\n    return imageName;\n}\n    \nvoid SetImageNameViaCFString(CFStringRef string) {\n    char *ignore;\n\t// normalization because we get here from looking for file name in resource folder directly at startup time. \n\t// HFS+ imposes Unicode2.1 decomposed UTF-8 encoding on all path elements\n\tCFMutableStringRef mutableStr= CFStringCreateMutableCopy(NULL, 0, string);\n\tif (gCurrentVMEncoding == kCFStringEncodingUTF8) \n\t\tCFStringNormalize(mutableStr, kCFStringNormalizationFormKC); // pre-combined\n    CFRetain(mutableStr);\n\tif (imageNameString != NULL)\n        CFRelease(imageNameString);\n    imageNameString = mutableStr;\n    ignore = getImageName();\n}\n\nvoid SetImageNameViaString(char *string,UInt32 encoding) {\n\tCFStringRef path;\n\t\n\tif (imageNameString != NULL)\n        CFRelease(imageNameString);\n\tpath = CFStringCreateWithCString(NULL, string, encoding);\n    SetImageNameViaCFString(path);\n\tCFRelease(path);\n}\n\n\nBoolean ImageNameIsEmpty() {\n    if (imageNameString == NULL) \n        return true;\n    return getImageName() == 0x00;\n}\n\nvoid getShortImageNameWithEncoding(char *target,UInt32 encoding) {\n    if (shortImageNameString == NULL) {\n        *target = 0x00;\n        return;\n    }\n    CFStringGetCString (shortImageNameString, target, SHORTIMAGE_NAME_SIZE, encoding);\n}\n\nvoid SetShortImageNameViaString(char *string,UInt32 encoding) {\n    if (shortImageNameString != NULL)\n        CFRelease(shortImageNameString);\n    shortImageNameString = CFStringCreateWithCString(NULL, string, encoding);\n}\n\nBoolean ShortImageNameIsEmpty() {\n    return shortImageNameString == NULL;\n}\n\nvoid setEncodingType (char * string) {\n      gCurrentVMEncoding = kCFStringEncodingMacRoman;\n      if (strcmp(\"UTF-8\",string) == 0)\n          gCurrentVMEncoding = kCFStringEncodingUTF8;\n      if (strcmp(\"ShiftJIS\",string) == 0)\n          gCurrentVMEncoding = kCFStringEncodingShiftJIS;\n      if (strcmp(\"Latin1\",string) == 0)\n          gCurrentVMEncoding = kCFStringEncodingISOLatin1;\n      if (strcmp(\"iso-8859-1\",string) == 0)\n          gCurrentVMEncoding = kCFStringEncodingISOLatin1;\n  }\n  \n  char  *getEncodingType(UInt32 aType) {\n      if (aType == kCFStringEncodingMacRoman) \n          return (char *)&\"macintosh\";\n      if (aType == kCFStringEncodingUTF8) \n          return (char *)&\"UTF-8\";\n      if (aType == kCFStringEncodingShiftJIS) \n          return (char *)&\"ShiftJIS\";\n      if (aType == kCFStringEncodingISOLatin1) \n          return (char *)&\"Latin1\";\n      return (char *)&\"macintosh\";\n  }\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacEncoding.h",
    "content": "/*\n *  sqMacEncoding.h\n *  SqueakVMForCarbon\n *\n *  Created by John M McIntosh on Mon Dec 01 2003.\n *\n */\n\n#include <Carbon/Carbon.h>\n\nvoid getVMPathWithEncoding(char *target,UInt32 encoding);\nvoid SetVMPathFromCFString(CFMutableStringRef strRef);\nBoolean VMPathIsEmpty(void);\nvoid getImageNameWithEncoding(char *target,UInt32 encoding);\nvoid SetImageNameViaCFString(CFStringRef string);\nvoid SetImageNameViaString(char *string,UInt32 encoding);\nBoolean ImageNameIsEmpty(void);\nchar *getImageName(void);\nvoid getShortImageNameWithEncoding(char *target,UInt32 encoding);\nvoid SetShortImageNameViaString(char *string,UInt32 encoding);\nBoolean ShortImageNameIsEmpty(void);\nvoid getDocumentNameWithEncoding(char *target,UInt32 encoding);\nvoid SetDocumentNameViaString(char *string,UInt32 encoding);\n\nvoid setEncodingType (char *aType);\nchar* getEncodingType (UInt32 aType);\nint IsImageName(char *name);"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacExternalPrims.c",
    "content": "/****************************************************************************\n*   PROJECT: Mac external plugin, bundle, cfm mach-o whatever interface code.\n*   FILE:    sqMacExternalPrims.c\n*   CONTENT: \n*\n*   AUTHOR:  John Maloney, John McIntosh, and others.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacExternalPrims.c 1311 2006-02-07 07:24:56Z johnmci $\n*\n*   NOTES: \n*  Feb 22nd, 2002, JMM moved code into 10 other files, see sqMacMain.c for comments\n*  Oct 2nd, 2003, JMM bug in browser file name creation in os-x, rework how path is resolved\n 3.7.0bx Nov 24th, 2003 JMM gCurrentVMEncoding\n 3.7.5b1 Aug 24th, 2004 JMM Joliet support for loading bundles?\n 3.8.9b2 Sep 22nd, 2005 JMM look in os-x resource folders for bundles too\n*****************************************************************************/\n\n#include \"sq.h\"\n#include \"sqMacExternalPrims.h\"\n#include \"sqMacFileLogic.h\"\n#include \"sqMacEncoding.h\"\n#include \"sqMacUIConstants.h\"\n\n//#define JMMDEBUG\nCFragConnectionID LoadLibViaPath(char *libName, char *pluginDirPath);\nvoid createBrowserPluginPath(char *pluginDirPath);\n\n/*** Mac Specific External Primitive Support ***/\n\n/* ioLoadModule:\n\tLoad a module from disk.\n\tWARNING: this always loads a *new* module. Don't even attempt to find a loaded one.\n\tWARNING: never primitiveFail() within, just return 0\n*/\nvoid* ioLoadModule(char *pluginName) {\n\tchar pluginDirPath[DOCUMENT_NAME_SIZE+1];\n\tCFragConnectionID libHandle;\n#ifndef BROWSERPLUGIN\n    #if !defined ( __APPLE__ ) && !defined ( __MACH__ )\n\tPtr mainAddr;\n\tStr255 errorMsg,tempPluginName;\n\tOSErr err;\n#endif\n#endif    \n    \t/* first, look in the \"<Squeak VM directory>Plugins\" directory for the library */\n        getVMPathWithEncoding(pluginDirPath,gCurrentVMEncoding);\n\t\n#ifdef BROWSERPLUGIN\n        createBrowserPluginPath(pluginDirPath);\n#else\n\tstrcat(pluginDirPath, \"Plugins\");\n#endif \t\n    \n    libHandle = LoadLibViaPath(pluginName, pluginDirPath);\n\tif (libHandle != nil) return (void *) libHandle;\n\n#ifndef BROWSERPLUGIN\n\t/* second, look directly in Squeak VM directory for the library */\n\tgetVMPathWithEncoding(pluginDirPath,gCurrentVMEncoding);\n\tlibHandle = LoadLibViaPath(pluginName, pluginDirPath);\n\tif (libHandle != nil) return (void*) libHandle;\n    \n    #if !defined ( __APPLE__ ) && !defined ( __MACH__ )\n        /* Lastly look for it as a shared import library */\n        \n        CopyCStringToPascal(pluginName,tempPluginName);\n        err = GetSharedLibrary(tempPluginName, kAnyCFragArch, kLoadCFrag, &libHandle, &mainAddr, errorMsg);\n            if (err == noErr) \n                err = GetSharedLibrary(tempPluginName, kAnyCFragArch, kFindCFrag, &libHandle, &mainAddr, errorMsg);\n            if (libHandle != nil) return (void*) libHandle;\n    #else\n\t\t{\n            CFBundleRef mainBundle;\n            CFURLRef\tbundleURL,bundleURL2,resourceURL;\n\t\t\tCFStringRef filePath,resourcePathString;\n\t\t\t\n            mainBundle = CFBundleGetMainBundle();   \n\t\t\tbundleURL = CFBundleCopyBundleURL(mainBundle);\n\t\t\tresourceURL = CFBundleCopyResourcesDirectoryURL(mainBundle);\n\t\t\tresourcePathString = CFURLCopyPath(resourceURL);\n\t\t\tCFRelease(resourceURL);\n\n\t\t\tbundleURL2 = CFURLCreateCopyAppendingPathComponent( kCFAllocatorSystemDefault, bundleURL, resourcePathString, false );\n\t\t\tCFRelease(bundleURL);\n\t#ifdef MACINTOSHUSEUNIXFILENAMES\n\t\t\tfilePath = CFURLCopyFileSystemPath (bundleURL2, kCFURLPOSIXPathStyle);\n\t#else\n\t\t\tfilePath = CFURLCopyFileSystemPath (bundleURL2, kCFURLHFSPathStyle);\n\t#endif\n\t\t\tCFRelease(bundleURL2);\n\t\t\t\n\t\t\tCFStringGetCString (filePath,pluginDirPath,DOCUMENT_NAME_SIZE, gCurrentVMEncoding);\n\t\t\tCFRelease(filePath);\n\t\t\t\n\t\t\tlibHandle = LoadLibViaPath(pluginName, pluginDirPath);\n\t\t\tif (libHandle != nil) return (void *) libHandle;\n \t\t}\n\t#endif\n    #endif \n\t\n\treturn nil;\n}\n\n/* ioFindExternalFunctionIn:\n\tFind the function with the given name in the moduleHandle.\n\tWARNING: never primitiveFail() within, just return 0.\n*/\n\n\nOSStatus LoadFrameworkBundle(SInt16 folderLocation,CFStringRef framework, CFBundleRef *bundlePtr)\n{\n\tOSStatus \terr;\n\tFSRef \t\tframeworksFolderRef;\n\tCFURLRef\tbaseURL;\n\tCFURLRef\tbundleURL;\n\t\n\t*bundlePtr = nil;\n\t\n\tbaseURL = nil;\n\tbundleURL = nil;\n\t\n\terr = FSFindFolder(folderLocation, kFrameworksFolderType, true, &frameworksFolderRef);\n\tif (err == noErr) {\n\t\tbaseURL = CFURLCreateFromFSRef(kCFAllocatorSystemDefault, &frameworksFolderRef);\n\t\tif (baseURL == nil) {\n\t\t\terr = coreFoundationUnknownErr;\n\t\t}\n\t}\n\tif (err == noErr) {\n\t\tbundleURL = CFURLCreateCopyAppendingPathComponent(kCFAllocatorSystemDefault, baseURL, framework, false);\n\t\tif (bundleURL == nil) {\n\t\t\terr = coreFoundationUnknownErr;\n\t\t}\n\t}\n\tif (err == noErr) {\n\t\t*bundlePtr = CFBundleCreate(kCFAllocatorSystemDefault, bundleURL);\n\t\tif (*bundlePtr == nil) {\n\t\t\terr = coreFoundationUnknownErr;\n\t\t}\n\t}\n\tif (err == noErr) {\n\t    if ( ! CFBundleLoadExecutable( *bundlePtr ) ) {\n\t\t\terr = coreFoundationUnknownErr;\n\t    }\n\t}\n\n\t// Clean up.\n\t\n\tif (err != noErr && *bundlePtr != nil) {\n\t\tCFRelease(*bundlePtr);\n\t\t*bundlePtr = nil;\n\t}\n\tif (bundleURL != nil) {\n\t\tCFRelease(bundleURL);\n\t}\t\n\tif (baseURL != nil) {\n\t\tCFRelease(baseURL);\n\t}\t\n\n\t#ifdef JMMDEBUG\n\tfprintf(stderr,\"\\nsystem location %i error %i\",folderLocation,err);\n\t#endif\n\t\n\treturn err;\n}\n#if defined(__APPLE__) && defined(__MACH__)\n\nvoid* \tioFindExternalFunctionIn(char *lookupName, void * moduleHandle) {\n\tvoid * \t\tfunctionPtr = 0;\n        CFStringRef\ttheString;\n        \n\tif (!moduleHandle) \n            return nil;\n            \n        theString = CFStringCreateWithCString(kCFAllocatorDefault,lookupName,gCurrentVMEncoding);\n        if (theString == nil) \n            return nil;\n        functionPtr = (void*)CFBundleGetFunctionPointerForName((CFBundleRef) moduleHandle,theString);\n        CFRelease(theString);\n                \n\treturn (void*) functionPtr;\n}\n\n/* ioFreeModule:\n\tFree the module with the associated handle.\n\tWARNING: never primitiveFail() within, just return 0.\n*/\nsqInt ioFreeModule(void * moduleHandle) {\n\tif (!moduleHandle) \n            return 0;\n\tCFBundleUnloadExecutable((CFBundleRef) moduleHandle);\n\tCFRelease((CFBundleRef) moduleHandle);\n        return 0;\n}\n\nCFragConnectionID LoadLibViaPath(char *libName, char *pluginDirPath) {\n        char\t\t\t\ttempDirPath[DOCUMENT_NAME_SIZE+1];\n\t\tchar\t\t\t\tcFileName[DOCUMENT_NAME_SIZE+1];\n\t\tCFragConnectionID   libHandle = 0;\n\t\tCFStringRef\t\t\tfilePath;\n        CFURLRef \t\t\ttheURLRef;\n        CFBundleRef\t\t\ttheBundle;\n        OSStatus\t\t\terr;\n        \n\t\tstrncpy(tempDirPath,pluginDirPath,DOCUMENT_NAME_SIZE);\n        if (tempDirPath[strlen(tempDirPath)-1] != DELIMITERInt)\n            strcat(tempDirPath,DELIMITER);\n            \n        if ((strlen(tempDirPath) + strlen(libName) + 7) > DOCUMENT_NAME_SIZE)\n            return nil;\n        \n        strcat(tempDirPath,libName);\n        strcat(tempDirPath,\".bundle\");  \n        //Watch out for the bundle suffix, not a normal thing in squeak plugins\n\n\t\t/* copy the file name into a null-terminated C string */\n\t\tsqFilenameFromStringOpen(cFileName, (int) &tempDirPath, strlen(tempDirPath));\n\t\t#ifdef JMMDEBUG\n\t\tfprintf(stderr,\"\\nLoadLibViaPath file %s\",cFileName);\n\t\t#endif\n        filePath   = CFStringCreateWithBytes(kCFAllocatorDefault,(UInt8 *)cFileName,strlen(cFileName),kCFStringEncodingUTF8,false);\n    \n        theURLRef = CFURLCreateWithFileSystemPath(kCFAllocatorDefault,filePath,kCFURLPOSIXPathStyle,false);\n\t\tCFRelease(filePath);\n        if (theURLRef == nil) {\n\t\t\t#ifdef JMMDEBUG\n\t\t\tfprintf(stderr,\"\\ntheURLRef was nil so bail\");\n\t\t\t#endif\n            return nil;\n\t\t}\n\n        theBundle = CFBundleCreate(NULL,theURLRef);\n        CFRelease(theURLRef);\n        \n        if (theBundle == nil) {\n            CFStringRef libNameCFString;\n\t\t\t#ifdef JMMDEBUG\n\t\t\tfprintf(stderr,\"\\nbundle was nil, trying to load from other system locations\");\n\t\t\t#endif\n\n           libNameCFString = CFStringCreateWithCString(kCFAllocatorDefault,libName,gCurrentVMEncoding);\n            err = LoadFrameworkBundle(kUserDomain,libNameCFString, &theBundle);\n\t\t\tif (err != noErr)\n\t\t\t\terr = LoadFrameworkBundle(kNetworkDomain,libNameCFString, &theBundle);\n\t\t\tif (err != noErr)\n\t\t\t\terr = LoadFrameworkBundle(kLocalDomain,libNameCFString, &theBundle);\n\t\t\tif (err != noErr)\n\t\t\t\terr = LoadFrameworkBundle(kSystemDomain,libNameCFString, &theBundle);\n\t\t\t\t\n            CFRelease(libNameCFString);\n            if (err != noErr) {\n\t\t\t\t#ifdef JMMDEBUG\n\t\t\t\tfprintf(stderr,\"\\nno bundle so bail, last error %i\",err);\n\t\t\t\t#endif\n                return nil;\n\t\t\t}\n        }  \n        \n        if (theBundle == nil) {\n\t\t\t#ifdef JMMDEBUG\n\t\t\tfprintf(stderr,\"\\nno bundle so bail\");\n\t\t\t#endif\n            return nil;\n\t\t}\n            \n        if (!CFBundleLoadExecutable(theBundle)) {\n\t\t\t#ifdef JMMDEBUG\n\t\t\tfprintf(stderr,\"\\nBundle found but failed CFBundleLoadExecutable\");\n\t\t\t#endif\n            CFRelease(theBundle);\n            return nil;\n        }\n        libHandle = (CFragConnectionID) theBundle;\n\n\t#ifdef JMMDEBUG\n\t\tfprintf(stderr,\"\\nFound Bundle %i\",libHandle);\n\t#endif\n\treturn libHandle;\n}\n\n#else\nvoid *  ioFindExternalFunctionIn(char *lookupName, void * moduleHandle) {\n\tCFragSymbolClass ignored;\n\tPtr functionPtr = 0;\n\tOSErr err;\n        Str255 tempLookupName;\n    \n\tif (!moduleHandle) return 0;\n\n\t/* get the address of the desired primitive function */\n\tCopyCStringToPascal(lookupName,tempLookupName);\n\terr = FindSymbol(\n\t\t(CFragConnectionID) moduleHandle, (unsigned char *) tempLookupName,\n\t\t&functionPtr, &ignored);\n\tif (err) \n\t    return 0;\n\treturn (void *) functionPtr;\n}\n\n/* ioFreeModule:\n\tFree the module with the associated handle.\n\tWARNING: never primitiveFail() within, just return 0.\n*/\nsqInt ioFreeModule( void  *moduleHandle) {\n\tCFragConnectionID libHandle;\n\tOSErr err;\n\n\tif (!moduleHandle) return 0;\n\tlibHandle = (CFragConnectionID) moduleHandle;\n\terr = CloseConnection(&libHandle);\n\treturn 0;\n}\n\nCFragConnectionID LoadLibViaPath(char *libName, char *pluginDirPath) {\n\tFSSpec\t\t\t\tfileSpec;\n\tStr255\t\t\t\tproblemLibName;\n        char\t\t\t\ttempDirPath[DOCUMENT_NAME_SIZE+1];\n        Ptr\t\t\t\tjunk;\n\tCFragConnectionID\t\tlibHandle = 0;\n\tOSErr\t\t\t\terr = noErr;\n\n\tstrncpy(tempDirPath,pluginDirPath,DOCUMENT_NAME_SIZE);\n        if (tempDirPath[strlen(tempDirPath)-1] != DELIMITER)\n            strcat(tempDirPath,DELIMITER);\n            \n        strcat(tempDirPath,libName);\n\terr =makeFSSpec(tempDirPath,&fileSpec);\n\tif (err) return nil; /* bad plugin directory path */\n\n        err = GetDiskFragment(\n\t\t&fileSpec, 0, kCFragGoesToEOF, nil, kLoadCFrag, &libHandle, &junk, problemLibName);\n                \n        if (err) \n\t    return nil;\n\n\treturn libHandle;\n}\n#endif\n\nvoid createBrowserPluginPath(char *pluginDirPath) {\n    int lengthOfPath = strlen(pluginDirPath);\n    int i;\n    \n    lengthOfPath--;\n    pluginDirPath[lengthOfPath] = 0x00;\n#warning broken    \n    for (i=lengthOfPath;i>=0;i--) {\n        if (pluginDirPath[i] == ':') {\n            pluginDirPath[i] = 0x00;\n            strcat(pluginDirPath, \":Plugins\");\n            return;\n        }\n    }\n    /* shouldn't ever get here, path will always contain one : */\n}\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacExternalPrims.h",
    "content": "/****************************************************************************\n*   PROJECT: Squeak Headers\n*   FILE:    sqMacExternalPrims.c\n*   CONTENT: \n*\n*   AUTHOR:  John Maloney, John McIntosh, and others.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacExternalPrims.h 1334 2006-02-25 05:09:15Z johnmci $\n*\n*   NOTES: \n*  Feb 22nd, 2002, JMM moved code into 10 other files, see sqMacMain.c for comments\n*  Nov 25th 2003 JMM add gCurrentVMEncoding\n****************************************************************************/\n\n#if TARGET_API_MAC_CARBON\n    #include <Carbon/Carbon.h>\n    extern CFStringEncoding gCurrentVMEncoding;\n#else\n#endif\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacFileLogic.c",
    "content": "/****************************************************************************\n*   PROJECT: Mac filespec interface.\n*   FILE:    sqMacFileLogic.c\n*   CONTENT: \n*\n*   AUTHOR:  John McIntosh,Karl Goiser, and others.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacFileLogic.c 1289 2006-01-09 04:03:26Z johnmci $\n*\n*   NOTES: See change log below.\n*\t11/01/2001 JMM Consolidation of fsspec handling for os-x FSRef transition.\n*\t12/27/2001 JMM Because of how os-x handles metadata I had to change how navgetfile functions\n*\t1/1/2002 JMM some cleanup to streamline path creation to minimize io & carbon cleanup\n*\t1/18/2002 JMM recheck macroman, fix dir size problem on os-9, do squeak file offset type\n*   4/23/2002 JMM fix how image is found for os-9 for bundled applications\n*   5/12/2002 JMM add logic to enable you to put plugins beside macclassic VM\n*   3.2.8b1 July 24th, 2002 JMM support for os-x plugin under IE 5.x\n    3.7.0bx Nov 24th, 2003 JMM gCurrentVMEncoding\n\t3.8.7bx Mar 24th, 2005 JMM Add feature to convert from posix to HFS+\n\t3.8.9b8 Jan 8th, 2006 JMM rework ioFilenamefromStringofLengthresolveAliases and makeosxpath\n*\n*****************************************************************************/\n/* \nIn a few places the VM needs an FSSpec.\nGiven a path we need to create an FSSPec. Why? Well some  mac routines still need \nFSSPecs to work, ie resolve alias. HFS+ will have funny formed names if the name is > 32 chars \n\nAlso given an FSSpec we need to get a path name back. \n\nSomeday this might become all FSRef aware\n\nNote that Squeak thinks of things in terms of HFS path names, but here sometimes we think \nin terms of POSIX path names.\n\nJust to complicate things CW Pro likes to think of names in terms of HFS path names for unix calls.\nAlso if you attempt to use Apple's StdClib it wants posix names, sigh...\n*/\n#if TARGET_API_MAC_CARBON\n\t#include <Carbon/Carbon.h>\n#else\n\t#include <AppleEvents.h>\n\tEXTERN_API( OSErr ) AEGetDescData(\n  const AEDesc *  theAEDesc,\n  void *          dataPtr,\n  Size            maximumSize);\n\n#endif\n\n#include \"sq.h\"\n#include \"sqVirtualMachine.h\"\n#include \"sqMacFileLogic.h\"\t\n\nstatic void resolveLongName(short vRefNum, long parID, unsigned char *shortFileName,FSSpec *possibleSpec,Boolean isFolder,Str255 *name,squeakFileOffsetType *sizeOfFile);\nstatic int fetchFileSpec(FSSpec *spec,unsigned char *name,long *parentDirectory);\nstatic int quicklyMakePath(char *pathString, int pathStringLength, char *dst, Boolean resolveAlias);\nextern int  IsImageName(char *name);\nextern Boolean isSystem9_0_or_better(void);\n\n#if TARGET_API_MAC_CARBON\nvoid unicode2NativePascalString(ConstStr255Param fromString, StringPtr toString) ;\n\nOSErr makeFSSpec(char *pathString, int pathStringLength,FSSpec *spec)\n{\t\n    CFURLRef    sillyThing;\n    CFStringRef tmpStrRef;\n\tCFMutableStringRef filePath;\n    FSRef\ttheFSRef;\n    OSErr\terr;\n    \n    tmpStrRef = CFStringCreateWithBytes(kCFAllocatorDefault,(UInt8 *) pathString,\n\t\t\t\t\t\t\t\t\t\tpathStringLength, gCurrentVMEncoding, true);\n    if (tmpStrRef == nil)\n        return -1000;\n\tfilePath = CFStringCreateMutableCopy(NULL, 0, tmpStrRef);\n\tif (gCurrentVMEncoding == kCFStringEncodingUTF8) \n\t\tCFStringNormalize(filePath, kCFStringNormalizationFormD);\n    sillyThing = CFURLCreateWithFileSystemPath (kCFAllocatorDefault,filePath,kCFURLHFSPathStyle,false);\n\tif (sillyThing == NULL) \n\t\treturn -2000;\n\t\t\n    if (CFURLGetFSRef(sillyThing,&theFSRef) == false) {\n        // name contains multiple aliases or does not exist, so fallback to lookupPath\n        CFRelease(filePath);\n        CFRelease(sillyThing);\n        return lookupPath(pathString,pathStringLength,spec,true,true);\n    } \n            \n    CFRelease(filePath);\n    err = FSGetCatalogInfo (&theFSRef,kFSCatInfoNone,nil,nil,spec,nil);\n    CFRelease(sillyThing);\n    return err;\n}\n\n/* Fill in the given string with the full path from a root volume to the given directory. */\n\nint PathToDir(char *pathName, int pathNameMax, FSSpec *where,UInt32 encoding) {\n    CopyCStringToPascal(\":\",where->name);\n\treturn PathToFile(pathName,pathNameMax,where,encoding);  \n}\n\n/* Fill in the given string with the full path from a root volume to the given file. */\n/* From FSSpec to C-string pathName */\n/* FSSpec -> FSRef -> URL(Unix) -> HPFS+ */\nint PathToFile(char *pathName, int pathNameMax, FSSpec *where,UInt32 encoding) {        \n        CFURLRef sillyThing;\n        CFStringRef filePath;\n        FSSpec\tfailureRetry;\n        FSRef\ttheFSRef;\n        OSErr\terror;\n        Boolean isDirectory=false,retryWithDirectory=false;\n        char\trememberName[256];\n        \n        *pathName = 0x00;\n        error = FSpMakeFSRef (where, &theFSRef);\n        if (error != noErr) {\n            retryWithDirectory = true;\n            failureRetry = *where;\n            CopyCStringToPascal(\":\",failureRetry.name);\n            CopyPascalStringToC(where->name,(char *) &rememberName);\n            error = FSpMakeFSRef(&failureRetry,&theFSRef);\n            if (error != noErr) \n                return -1;\n\t}\n        \n        sillyThing =  CFURLCreateFromFSRef (kCFAllocatorDefault, &theFSRef);\n        isDirectory = CFURLHasDirectoryPath(sillyThing);\n        \n        filePath = CFURLCopyFileSystemPath (sillyThing, kCFURLHFSPathStyle);\n        CFRelease(sillyThing);\n        \n  \t\tCFMutableStringRef mutableStr= CFStringCreateMutableCopy(NULL, 0, filePath);\n          CFRelease(filePath);\n  \n  \t\t// HFS+ imposes Unicode2.1 decomposed UTF-8 encoding on all path elements\n  \t\tif (gCurrentVMEncoding == kCFStringEncodingUTF8) \n  \t\t\tCFStringNormalize(mutableStr, kCFStringNormalizationFormKC); // pre-combined\n  \n          CFStringGetCString (mutableStr, pathName,pathNameMax, encoding);\n        \n        if (retryWithDirectory) {\n            strcat(pathName,\":\");\n            strcat(pathName,rememberName);\n            isDirectory = false;\n        }\n        if (isDirectory)\n            strcat(pathName,\":\");\n        return 0;\n}\n\nstatic int quicklyMakePath(char *pathString, int pathStringLength,char *dst, Boolean resolveAlias) {\n\tCFStringRef \tfilePath;\n        CFURLRef \tsillyThing,firstPartOfPath;\n        FSRef\t\ttheFSRef;   \n        Boolean\t\tisFolder,isAlias;\n        OSErr\t\terr;\n        \n        filePath   = CFStringCreateWithBytes(kCFAllocatorDefault,\n                    (UInt8 *)pathString,pathStringLength,gCurrentVMEncoding,false);\n        if (filePath == nil)\n            return -1;\n\t\tCFMutableStringRef str= CFStringCreateMutableCopy(NULL, 0, filePath);\n\t\t// HFS+ imposes Unicode2.1 decomposed UTF-8 encoding on all path elements\n\t\tif (gCurrentVMEncoding == kCFStringEncodingUTF8) \n\t\t\tCFStringNormalize(str, kCFStringNormalizationFormKC); // canonical decomposition\n\n\t\tsillyThing = CFURLCreateWithFileSystemPath (kCFAllocatorDefault, str, kCFURLHFSPathStyle,false);\n\t\tif (sillyThing == NULL) {\n\t\t\tCFRelease(filePath);\n\t\t\treturn -2;\n\t\t}\n\t\tCFRelease(str);\n        \n        if (!CFURLGetFSRef(sillyThing,&theFSRef)) {\n            firstPartOfPath = CFURLCreateCopyDeletingLastPathComponent(kCFAllocatorDefault,sillyThing);\n            if (!CFURLGetFSRef(firstPartOfPath,&theFSRef)) {\n                CFRelease(firstPartOfPath);\n                CFRelease(filePath);\n                CFRelease(sillyThing);\n                return -1;\n            } else {\n                CFStringRef lastPathPart;\n                char\t lastpart[256];\n                \n                CFRelease(filePath);\n                CFRelease(firstPartOfPath);\n                lastPathPart = CFURLCopyLastPathComponent(sillyThing);\n                CFRelease(sillyThing);\n                \n                err = noErr;\n                if (resolveAlias) \n                    err = FSResolveAliasFile (&theFSRef,true,&isFolder,&isAlias);\n\n                if (err) \n                    return 2;\n                \n                err = FSRefMakePath(&theFSRef,(UInt8 *)dst,1000); \n                CFStringGetCString(lastPathPart,lastpart,256, kCFStringEncodingUTF8);\n                CFRelease(lastPathPart);\n                if (strlen(dst)+1+strlen(lastpart) < 1000) {\n                    strcat(dst,\"/\");\n                    strcat(dst,lastpart);\n                    \n#if defined(__MWERKS__) && !defined(__APPLE__) && !defined(__MACH__)\n        filePath   = CFStringCreateWithBytes(kCFAllocatorDefault,(UInt8 *)dst,strlen(dst),gCurrentVMEncoding,false);\n        if (filePath == nil) \n            return 2;\n        sillyThing = CFURLCreateWithFileSystemPath (kCFAllocatorDefault,filePath,kCFURLPOSIXPathStyle,true);\n\t\tCFRelease(filePath);\n        filePath = CFURLCopyFileSystemPath (sillyThing, kCFURLHFSPathStyle);\n        CFStringGetCString (filePath,dst,1000, gCurrentVMEncoding);\n\t\tCFRelease(sillyThing);\n        CFRelease(filePath);        \n#endif\n\n                    return 0;\n                } else\n                    return 2;\n            }\n        }\n        \n        CFRelease(filePath);\n        CFRelease(sillyThing);\n        \n        if (resolveAlias) \n            err = FSResolveAliasFile (&theFSRef,true,&isFolder,&isAlias);\n\n#if defined(__MWERKS__) && !defined(__APPLE__) && !defined(__MACH__)\n\t\tsillyThing = CFURLCreateFromFSRef(kCFAllocatorDefault,&theFSRef);\n        filePath = CFURLCopyFileSystemPath (sillyThing, kCFURLHFSPathStyle);\n        CFStringGetCString (filePath,dst,1000, gCurrentVMEncoding);\n\t\tCFRelease(sillyThing);\n        CFRelease(filePath);        \n        return 0;\n#else\n        err = FSRefMakePath(&theFSRef,(UInt8 *)dst,1000); \n        return err;\n#endif \n}\n\n/* Some classcical Mac APIs use the encoding based on WorldScript. for example, Japanese language envrironment use\nShiftJIS encoding. So, unicode2NativePascalString, this function converts unicode encoded pascal string to suitable\nencoding (came from CFStringGetSystemEncoding()).\n*/\nvoid unicode2NativePascalString(ConstStr255Param fromString, StringPtr toString) {\n\tif (fromString != NULL) {\n\t\tCFStringRef strRef = CFStringCreateWithPascalString(kCFAllocatorDefault, fromString, gCurrentVMEncoding);\n\t\tif (strRef != NULL) {\n\t\t\tCFMutableStringRef mStrRef = CFStringCreateMutableCopy(NULL, 0, strRef);\n\t\t\tif (gCurrentVMEncoding == kCFStringEncodingUTF8) \n\t\t\t\tCFStringNormalize(mStrRef, kCFStringNormalizationFormKD);\n\t\t\tCFStringGetPascalString (mStrRef, toString, 256, CFStringGetSystemEncoding());\n\t\t\tCFRelease(mStrRef);\n\t\t\tCFRelease(strRef);\n\t\t}\n\t}\n}\n\n/* Convert the squeak path to an OS-X path. This path because of alias resolving may point \nto another directory tree */\n\nvoid\t\tsqFilenameFromStringOpen(char *buffer,long fileIndex, long fileLength) {\n\tioFilenamefromStringofLengthresolveAliases(buffer,(char *) fileIndex, fileLength, true);\n}\n\nvoid\t\tsqFilenameFromString(char *buffer,long fileIndex, long fileLength) {\n\tioFilenamefromStringofLengthresolveAliases(buffer,(char *) fileIndex, fileLength, false);\n}\n\nsqInt\tioFilenamefromStringofLengthresolveAliases(char* dst, char* src, sqInt num, sqInt resolveAlias) {\n        FSRef\t\ttheFSRef;\n        FSSpec\t\tconvertFileNameSpec,failureRetry;\n        OSErr\t\terr;\n        Boolean\t\tisFolder=false,isAlias=false;\n        CFURLRef \tsillyThing,appendedSillyThing;\n        CFStringRef \tlastPartOfPath,filePath2;\n\t\tCFMutableStringRef filePath;\n        \n        *dst = 0x00;\n        err = quicklyMakePath((char *) src,num,dst,resolveAlias);\n        if (err == noErr) \n            return;\n            \n        err = lookupPath((char *) src,num,&convertFileNameSpec,true,false);\n        if ((err == noErr) && resolveAlias) {\n            err = ResolveAliasFile(&convertFileNameSpec,true,&isFolder,&isAlias);\n            if (err == fnfErr) {\n\t\t\t\terr = lookupPath((char *) src,num,&convertFileNameSpec,false,false);\n\t            err = ResolveAliasFile(&convertFileNameSpec,true,&isFolder,&isAlias);\n            }\n        }\n        \n        if (err == fnfErr) {\n            failureRetry = convertFileNameSpec;\n            CopyCStringToPascal(\"::\",failureRetry.name);\n            err = FSpMakeFSRef(&failureRetry,&theFSRef);\n            if (err != noErr) \n                return;\n//            filePath   = CFStringCreateWithBytes(kCFAllocatorDefault,(UInt8 *)src,num,gCurrentVMEncoding,false);\n\t\t\tCFStringRef tmpStrRef = CFStringCreateWithBytes(kCFAllocatorDefault,(UInt8 *)src,num,gCurrentVMEncoding,false);\n            if (tmpStrRef == nil) \n                return;\n\t\t\tfilePath = CFStringCreateMutableCopy(NULL, 0, tmpStrRef);\n\t\t\tif (gCurrentVMEncoding == kCFStringEncodingUTF8) \n\t\t\t\tCFStringNormalize(filePath, kCFStringNormalizationFormKD); // canonical decomposition\n\n            sillyThing = CFURLCreateWithFileSystemPath (kCFAllocatorDefault,filePath,kCFURLHFSPathStyle,false);\n            CFRelease(filePath);\n\t\t\tif (sillyThing == NULL) \n\t\t\t\t\treturn;\n\n            lastPartOfPath = CFURLCopyLastPathComponent(sillyThing);\n            CFRelease(sillyThing);\n            sillyThing = CFURLCreateFromFSRef(kCFAllocatorDefault,&theFSRef);\n            appendedSillyThing = CFURLCreateCopyAppendingPathComponent(kCFAllocatorDefault,sillyThing,lastPartOfPath,false);\n#if defined(__MWERKS__) && !defined(__APPLE__) && !defined(__MACH__)\n            filePath2 = CFURLCopyFileSystemPath (appendedSillyThing, kCFURLHFSPathStyle);\n#else\n            filePath2 = CFURLCopyFileSystemPath (appendedSillyThing, kCFURLPOSIXPathStyle);\n#endif\n            CFStringGetCString (filePath2,dst,1000, gCurrentVMEncoding);\n            CFRelease(sillyThing);\n            CFRelease(appendedSillyThing);\n            CFRelease(lastPartOfPath);\n            CFRelease(filePath2);        \n            return; \n        }\n        \t\n        err = FSpMakeFSRef(&convertFileNameSpec,&theFSRef);\n#if defined(__MWERKS__) && !defined(__APPLE__) && !defined(__MACH__)\n\t\tsillyThing = CFURLCreateFromFSRef(kCFAllocatorDefault,&theFSRef);\n        filePath = CFURLCopyFileSystemPath (sillyThing, kCFURLHFSPathStyle);\n        CFStringGetCString (filePath,dst,1000, gCurrentVMEncoding);\n\t\tCFRelease(sillyThing);\n        CFRelease(filePath);        \n        return;\n #else\n        err = FSRefMakePath(&theFSRef,(UInt8 *)dst,1000); \n #endif\n}\n\nint makeHFSFromPosixPath(char *pathString, int pathStringLength,char *dst,char *lastpart) {\n\t\tCFStringRef filePath;\n        CFURLRef \tsillyThing;\n        CFStringRef\tfilePath2,lastPathPart;\n\t\t\n        dst[0] = 0x00;\n\t\tif (lastpart)\n\t\t\tlastpart[0] = 0x00;\n\t\tfilePath   = CFStringCreateWithBytes(kCFAllocatorDefault,\n                    (UInt8 *)pathString,pathStringLength,gCurrentVMEncoding,false);\n        if (filePath == nil)\n            return -1;\n\t\t\t\n\t\t// HFS+ imposes Unicode2.1 decomposed UTF-8 encoding on all path elements\n\t\tCFMutableStringRef str= CFStringCreateMutableCopy(NULL, 0, filePath);\n\t\tif (gCurrentVMEncoding == kCFStringEncodingUTF8) \n\t\t\tCFStringNormalize(str, kCFStringNormalizationFormKC); // canonical decomposition\n\n\t\tsillyThing = CFURLCreateWithFileSystemPath (kCFAllocatorDefault, str, kCFURLPOSIXPathStyle,false);\n\t\tCFRelease(str);\n\t\tif (sillyThing == NULL) \n\t\t\treturn -2;\n\t\t\n\t\tfilePath2 = CFURLCopyFileSystemPath (sillyThing, kCFURLHFSPathStyle);\n\t\tCFStringGetCString (filePath2,dst,1000, gCurrentVMEncoding);\n\t\tif (lastpart) {\n\t\t\tlastPathPart = CFURLCopyLastPathComponent(sillyThing);\n\t\t\tCFStringGetCString(lastPathPart,lastpart,256, gCurrentVMEncoding);\n\t\t\tCFRelease(lastPathPart);\n\t\t}\n        CFRelease(filePath);\n        CFRelease(sillyThing);\n        CFRelease(filePath2);\n        return 0;\n}\n\n/* This method is used to lookup paths, chunk by chunk. It builds specs for each chunk and fetchs the file \ninformation, Note the special case when noDrilldown */\n\nint doItTheHardWay(unsigned char *pathString,FSSpec *spec,Boolean noDrillDown) {\n    char *token;\n    Str255 lookup;\n    UniChar   buffer[1024];\n    Boolean firstTime=true;\n    OSErr   err;\n    long    parentDirectory,tokenLength;\n    FSRef   parentFSRef,childFSRef;\n    CFStringRef aLevel;\n    FSSpec\tfix;\n    \n    token = strtok((char*) pathString,\":\");\n    if (token == 0) return -1;\n    while (token) \n    {\n        tokenLength = strlen(token);\n        if (firstTime) {// Mmm will crash if volume name is 255 characters, unlikely\n            strncpy((char*) lookup+1,(char*) token,tokenLength);\n            lookup[0] = tokenLength+1;\n            lookup[lookup[0]] = ':';\n            firstTime = false;\n            err = FSMakeFSSpecCompat(spec->vRefNum,spec->parID, lookup, spec);\n            if (err != noErr)\n                return err;\n            err = FSpMakeFSRef(spec,&parentFSRef);\n            if (err != noErr)\n                return err;\n        } else {\n            fix = *spec;\n            fix.name[0] = 0;\n            err = FSpMakeFSRef(&fix,&parentFSRef);\n            if (err != noErr)\n                return err;\n           aLevel = CFStringCreateWithCString(kCFAllocatorDefault,token,gCurrentVMEncoding);\n           if (aLevel == nil) \n                return -1000;\n           tokenLength = CFStringGetLength(aLevel);\n           CFStringGetCharacters(aLevel,CFRangeMake(0,tokenLength),buffer);\n           err = FSMakeFSRefUnicode(&parentFSRef,tokenLength,buffer,gCurrentVMEncoding,&childFSRef);\n           if (err != noErr) {\n                CFStringGetPascalString(aLevel,spec->name,64,gCurrentVMEncoding);\n                CFRelease(aLevel);\n\t\t\t\ttoken = strtok(nil,\":\"); \n\t\t\t\tif (token == nil)\n\t\t\t\t\treturn err;\n\t\t\t\telse\n\t\t\t\t\treturn -1001;\n            }\n           CFRelease(aLevel);\n           parentFSRef = childFSRef;\n           err = FSGetCatalogInfo (&parentFSRef,kFSCatInfoNone,nil,nil,spec,nil);\n            if (err != noErr)\n                return err;\n        }\n        fetchFileSpec(spec,spec->name,&parentDirectory);\n        token = strtok(nil,\":\"); \n    }\n   if (noDrillDown) \n       spec->parID = parentDirectory;\n     return noErr;\n}\n\n\n\n#else\n/* OS 8 and pre carbon logic */\nstatic OSErr FSpGetFullPath(const FSSpec *spec, short *fullPathLength, Handle *fullPath);\n\nstatic OSErr\tFSpGetFullPath(const FSSpec *spec,\n\t\t\t\t\t\t\t   short *fullPathLength,\n\t\t\t\t\t\t\t   Handle *fullPath)\n{\n\tOSErr\t\tresult;\n\tOSErr\t\trealResult;\n\tFSSpec\t\ttempSpec;\n\tCInfoPBRec\tpb;\n\t\n\t*fullPathLength = 0;\n\t*fullPath = nil;\n\t\n\t\n\t/* Default to noErr */\n\trealResult = result = noErr;\n\t\n\tresult = FSMakeFSSpecCompat(spec->vRefNum, spec->parID, spec->name, &tempSpec);\n\n\tif ( result == noErr )\n\t{\n\t\tif ( tempSpec.parID == fsRtParID )\n\t\t{\n\t\t\t/* The object is a volume */\n\t\t\t\n\t\t\t/* Add a colon to make it a full pathname */\n\t\t\t++tempSpec.name[0];\n\t\t\ttempSpec.name[tempSpec.name[0]] = ':';\n\t\t\t\n\t\t\t/* We're done */\n\t\t\tresult = PtrToHand(&tempSpec.name[1], fullPath, tempSpec.name[0]);\n\t\t\t*fullPathLength = tempSpec.name[0];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* The object isn't a volume */\n\t\t\t\n\t\t\t/* Is the object a file or a directory? */\n\t\t\tpb.dirInfo.ioNamePtr = tempSpec.name;\n\t\t\tpb.dirInfo.ioVRefNum = tempSpec.vRefNum;\n\t\t\tpb.dirInfo.ioDrDirID = tempSpec.parID;\n\t\t\tpb.dirInfo.ioFDirIndex = 0;\n\t\t\tresult = PBGetCatInfoSync(&pb);\n\t\t\t// Allow file/directory name at end of path to not exist.\n\t\t\trealResult = result;\n\t\t\tif ( (result == noErr) || (result == fnfErr) )\n\t\t\t{\n\t\t\t\t/* if the object is a directory, append a colon so full pathname ends with colon */\n\t\t\t\tif ( (result == noErr) && (pb.hFileInfo.ioFlAttrib & kioFlAttribDirMask) != 0 )\n\t\t\t\t{\n\t\t\t\t\t++tempSpec.name[0];\n\t\t\t\t\ttempSpec.name[tempSpec.name[0]] = ':';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* Put the object name in first */\n\t\t\t\tresult = PtrToHand(&tempSpec.name[1], fullPath, tempSpec.name[0]);\n\t\t\t\t*fullPathLength = tempSpec.name[0];\n\t\t\t\tif ( result == noErr )\n\t\t\t\t{\n\t\t\t\t\t/* Get the ancestor directory names */\n\t\t\t\t\tpb.dirInfo.ioNamePtr = tempSpec.name;\n\t\t\t\t\tpb.dirInfo.ioVRefNum = tempSpec.vRefNum;\n\t\t\t\t\tpb.dirInfo.ioDrParID = tempSpec.parID;\n\t\t\t\t\tdo\t/* loop until we have an error or find the root directory */\n\t\t\t\t\t{\n\t\t\t\t\t\tpb.dirInfo.ioFDirIndex = -1;\n\t\t\t\t\t\tpb.dirInfo.ioDrDirID = pb.dirInfo.ioDrParID;\n\t\t\t\t\t\tresult = PBGetCatInfoSync(&pb);\n\t\t\t\t\t\tif ( result == noErr )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/* Append colon to directory name */\n\t\t\t\t\t\t\t++tempSpec.name[0];\n\t\t\t\t\t\t\ttempSpec.name[tempSpec.name[0]] = ':';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* Add directory name to beginning of fullPath */\n\t\t\t\t\t\t\t(void) Munger(*fullPath, 0, nil, 0, &tempSpec.name[1], tempSpec.name[0]);\n\t\t\t\t\t\t\t*fullPathLength += tempSpec.name[0];\n\t\t\t\t\t\t\tresult = MemError();\n\t\t\t\t\t\t}\n\t\t\t\t\t} while ( (result == noErr) && (pb.dirInfo.ioDrDirID != fsRtDirID) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\tif ( result == noErr )\n\t{\n\t\t/* Return the length */\n///\t\t*fullPathLength = GetHandleSize(*fullPath);\n\t\tresult = realResult;\t// return realResult in case it was fnfErr\n\t}\n\telse\n\t{\n\t\t/* Dispose of the handle and return nil and zero length */\n\t\tif ( *fullPath != nil )\n\t\t{\n\t\t\tDisposeHandle(*fullPath);\n\t\t}\n\t\t*fullPath = nil;\n\t\t*fullPathLength = 0;\n\t}\n\t\n\treturn ( result );\n}\n\n\n\nint PathToDir(char *pathName, int pathNameMax, FSSpec *where,UInt32 encoding) {\n\t/* Fill in the given string with the full path from a root volume to\n\t   to given  directory.\n\t*/\n        CopyCStringToPascal(\":\",where->name);\n\treturn PathToFile(pathName,pathNameMax,where,encoding);  \n}\n\nint PathToFile(char *pathName, int pathNameMax, FSSpec *where,UInt32 encoding) {\n        OSErr\terror;\n        short \tpathLength;\n        Handle fullPathHandle;\n#pragma unused(encoding)\n        \n\terror =  FSpGetFullPath(where, &pathLength, &fullPathHandle);\n\tif (fullPathHandle != 0) {\n            pathLength = pathLength+1 > pathNameMax ? pathNameMax-1 : pathLength;\n            strncpy((char *) pathName, (char *) *fullPathHandle, pathLength);\n            pathName[pathLength] = 0x00;\n            DisposeHandle(fullPathHandle);\n        } else {\n            *pathName = 0x00;\n            pathLength = 0;\n        }\n\treturn pathLength;\n}\n\n\nOSErr makeFSSpec(char *pathString, int pathStringLength,FSSpec *spec)\n{\t\n\tchar name[1001];\n\t\n\tif (pathStringLength > 1000 ) \n\t    return -1;\n   \n    strncpy((char *) name,pathString,pathStringLength);\n    name[pathStringLength] = 0x00;\n    return __path2fss((char *) name, spec);\n}\n\n\n/* This method is used to lookup paths, chunk by chunk. It builds specs for each chunk and fetchs the file \ninformation, Note the special case when noDrilldown */\n\nint doItTheHardWay(unsigned char *pathString,FSSpec *spec,Boolean noDrillDown) {\n    char *token;\n    Str255 lookup;\n    Boolean firstTime=true;\n    OSErr   err;\n    long    parentDirectory,tokenLength;\n    \n    token = strtok((char*) pathString,\":\");\n    if (token == 0) return -1;\n    while (token) \n    {\n        tokenLength = strlen(token) > 255 ? 255 : strlen(token);\n        if (firstTime) {\n            strncpy((char*) lookup+1,(char*) token,tokenLength);\n            lookup[0] = tokenLength+1;\n            lookup[lookup[0]] = ':';\n            firstTime = false;\n        } else {\n            if (tokenLength == 255) { /* This is broken */\n                FSSpec spec2;\n                strncpy((char*) lookup+1,(char*) token,tokenLength);\n                lookup[0] = tokenLength;\n                if ((err = FSMakeFSSpecCompat(spec->vRefNum,spec->parID, lookup, &spec2)) != noErr) \n                    return err;               \n            } else {\n            strncpy((char*) lookup+2,(char*) token,tokenLength);\n            lookup[0] = tokenLength+1;\n            lookup[1] = ':';\n            }\n        }\n        if ((err = FSMakeFSSpecCompat(spec->vRefNum,spec->parID, lookup, spec)) != noErr) \n            return err;\n        fetchFileSpec(spec,spec->name,&parentDirectory);\n        token = strtok(nil,\":\"); \n    }\n   if (noDrillDown) \n       spec->parID = parentDirectory;\n     return noErr;\n}\t\t \n#endif\n\n/*\nJMM 2001/02/02 rewrote \nThese are common routines\n\n*/\n\nint lookupPath(char *pathString, int pathStringLength, FSSpec *spec,Boolean noDrillDown,Boolean tryShortCut) {\n\t/* Resolve the given path and return the resulting folder or volume\n\t   reference number in *refNumPtr. Return error if the path is bad. */\n\n\tchar          \ttempName[1001];\n \tOSErr\t\t    err;\n \tint\t\t        i;\n \t\n    if (pathStringLength < 256 && tryShortCut) {\n        /* First locate by farily normal methods, with perhaps an alias lookup */\n \t\ttempName[0] = pathStringLength;\n\t\tstrncpy((char *)tempName+1,pathString,pathStringLength);\n    \n        err = FSMakeFSSpecCompat(0,0,(unsigned char*) tempName,spec);\n    \n        if (err == noErr) {\n            if (noDrillDown == false) {\n                fetchFileSpec(spec,spec->name,nil);\n            }\n            return noErr;\n        }         \n    }\n    /* Than failed, we might have an alias chain, or other issue so \n    first setup for directory or file then do it the hard way */\n    \n    strncpy((char *)tempName,pathString,pathStringLength);\n    if (noDrillDown) {\n        tempName[pathStringLength] = 0x00;\n    }\n    else {\n        tempName[pathStringLength] = ':';\n        tempName[pathStringLength+1] = 0x00;\n    }\n\n  \ti = 0;\n  \twhile(tempName[i]) {\n   \t\tif(tempName[i] == ':') {\n      \t\tif(tempName[i+1] == ':')\n\t\t\t\treturn fnfErr; /* fix for :: doItTheHardWay can't deal with this */\n   \t\t }\n   \t\ti++;\n    }\n\n    err = doItTheHardWay((unsigned char*) tempName,spec,noDrillDown);\n    return err;\n}\n\n\n/*Get the file ID that unique IDs this file or directory, also resolve any alias if required */\nint fetchFileInfo(int dirIndex,FSSpec *spec,unsigned char *name,Boolean doAlias,long *parentDirectory,\n int *isFolder,int *createDateStorage,int *modificationDateStorage,squeakFileOffsetType *sizeOfFile,Str255 *longFileName) {\n    long        aliasGestaltInfo;\n    CInfoPBRec pb;\n    Boolean     isFolder2;\n    OSErr\terror,result;\n    \n    *isFolder = false;\n        \n    pb.hFileInfo.ioNamePtr = name;\n    pb.hFileInfo.ioFVersNum = 0;\n    pb.hFileInfo.ioFDirIndex = dirIndex;\n    pb.hFileInfo.ioVRefNum = spec->vRefNum;\n    pb.hFileInfo.ioDirID = spec->parID;\n\n    if ((error = PBGetCatInfoSync(&pb)) == noErr) {\n    \tif ((pb.hFileInfo.ioFlFndrInfo.fdFlags & kIsAlias) && doAlias) {\n\t\t    FSSpec spec2,spec3;\n\t\t    Boolean isAlias;\n\t\t    OSErr   err;\n\t\t    \n\t\t   \n\t\t   err = FSMakeFSSpecCompat(spec->vRefNum, spec->parID, name,&spec2);\n           spec3 = spec2;\n#if TARGET_CPU_PPC\n           if ((Gestalt(gestaltAliasMgrAttr, &aliasGestaltInfo) == noErr) &&\n                aliasGestaltInfo & (1<<gestaltAliasMgrResolveAliasFileWithMountOptions)  &&\n                ((Ptr) ResolveAliasFileWithMountFlags != (Ptr)kUnresolvedCFragSymbolAddress)) {\n                err = ResolveAliasFileWithMountFlags(&spec2,false,&isFolder2,&isAlias,kResolveAliasFileNoUI);\n            } else {\n                err = ResolveAliasFile(&spec2,false,&isFolder2,&isAlias);\n            }\n#else\n\t\t\terr = ResolveAliasFile(&spec2,false,&isFolder2,&isAlias);\n#endif         \n\t\t\t*isFolder = isFolder2;\n            if (err == noErr) {\n                resolveLongName(0,0,nil,&spec3,*isFolder,longFileName,sizeOfFile);\n                result = noErr;\n                goto done;\n\t\t    }\n    \t}\n    \t\n    \tif ((pb.hFileInfo.ioFlAttrib & kioFlAttribDirMask) != 0)\n    \t    *sizeOfFile = 0;\n    \telse\n            *sizeOfFile =  pb.hFileInfo.ioFlLgLen;\n            \n        resolveLongName(pb.hFileInfo.ioVRefNum,pb.hFileInfo.ioFlParID,name,nil,((pb.hFileInfo.ioFlAttrib & kioFlAttribDirMask) > 0),longFileName,sizeOfFile);\n        spec->parID = pb.hFileInfo.ioDirID;\n        result = noErr;\n        goto done;\n    }\n    result = error;\n    memcpy(longFileName,name,sizeof(StrFileName));\n    \n    done:\n    *isFolder = ((pb.hFileInfo.ioFlAttrib & kioFlAttribDirMask) > 0) || *isFolder;\n    *createDateStorage =  pb.hFileInfo.ioFlCrDat;\n    *modificationDateStorage =  pb.hFileInfo.ioFlMdDat;\n    *parentDirectory = pb.dirInfo.ioDrParID;\n    return result;\n}\n\nstatic int fetchFileSpec(FSSpec *spec,unsigned char *name,long *parentDirectory) {\n    long        aliasGestaltInfo;\n    CInfoPBRec  pb;\n    Boolean     result,ignore;\n    FSSpec      spec2;\n    OSErr       err;\n        \n    pb.hFileInfo.ioNamePtr = name;\n    pb.hFileInfo.ioFVersNum = 0;\n    pb.hFileInfo.ioFDirIndex = 0;\n    pb.hFileInfo.ioVRefNum = spec->vRefNum;\n    pb.hFileInfo.ioDirID = spec->parID;\n\n    if (PBGetCatInfoSync(&pb) == noErr) {\n    \tif (pb.hFileInfo.ioFlFndrInfo.fdFlags & kIsAlias) {     \t   \n    \t   err = FSMakeFSSpecCompat(spec->vRefNum, spec->parID, name,&spec2);\n    #if TARGET_CPU_PPC\n           if ((Gestalt(gestaltAliasMgrAttr, &aliasGestaltInfo) == noErr) &&\n                aliasGestaltInfo & (1<<gestaltAliasMgrResolveAliasFileWithMountOptions)  &&\n                ((Ptr) ResolveAliasFileWithMountFlags != (Ptr)kUnresolvedCFragSymbolAddress)) {\n                err = ResolveAliasFileWithMountFlags(&spec2,false,&ignore,&ignore,kResolveAliasFileNoUI);\n            } \n            else \n    #endif\n    \t\t\terr = ResolveAliasFile(&spec2,false,&ignore,&ignore);\n                if (err == noErr) {\n             \t    fetchFileSpec(&spec2,spec2.name,parentDirectory);\n            \t    *spec = spec2;\n                    result = true;\n                    goto done;\n    \t\t    }\n    \t}\n        spec->parID = pb.hFileInfo.ioDirID;\n        result = true;\n        goto done;\n    }\n    result = false;\n    \n    done:\n        if (parentDirectory != nil)\n            *parentDirectory = pb.dirInfo.ioDrParID;\n        return result;\n}\n\nstatic void resolveLongName(short vRefNum, long parID,unsigned char*shortFileName,FSSpec *possibleSpec,Boolean isFolder,Str255 *name,squeakFileOffsetType *sizeOfFile) {\n    \n#if TARGET_API_MAC_CARBON \n    if ((Ptr) PBGetCatalogInfoSync != (Ptr)kUnresolvedCFragSymbolAddress) {\n        FSRefParam FSRefData;\n        FSRef      theFSRef;\n        FSCatalogInfo theCatalogInfo;\n        HFSUniStr255 \tunicodeName;\n        OSErr     err;\n\n        if (possibleSpec == nil) {\n            FSRefParam FSParam;\n            \n            FSParam.ioNamePtr = shortFileName;\n            FSParam.ioVRefNum = vRefNum;\n            FSParam.ioDirID = parID;\n            FSParam.newRef = &theFSRef;\n            FSParam.ioCompletion = null;\n\n            err = PBMakeFSRefSync(&FSParam);\n\n            if (err != noErr)\n                goto done1;   \n        } else {\n            err = FSpMakeFSRef(possibleSpec,&theFSRef);\n            if (err != noErr)\n             goto done1;   \n        }\n                \n        FSRefData.ref = &theFSRef;\n        FSRefData.whichInfo = kFSCatInfoDataSizes;\n        FSRefData.catInfo = &theCatalogInfo;\n        FSRefData.spec = nil;\n        FSRefData.parentRef = nil;\n        FSRefData.outName = &unicodeName;\n        \n        if (PBGetCatalogInfoSync(&FSRefData) == noErr) {\n           CFStringRef \ttheString;\n           \n            if (isFolder) \n                *sizeOfFile = 0;\n            else\n                *sizeOfFile =  theCatalogInfo.dataLogicalSize; \n                \n           theString = CFStringCreateWithCharacters (kCFAllocatorDefault, unicodeName.unicode, (CFIndex) unicodeName.length);\n\t\t\tCFMutableStringRef mStr= CFStringCreateMutableCopy(NULL, 0, theString);\n           CFRelease(theString);\n\t\t\t// HFS+ imposes Unicode2.1 decomposed UTF-8 encoding on all path elements\n\t\t\tif (gCurrentVMEncoding == kCFStringEncodingUTF8) \n\t\t\t\tCFStringNormalize(mStr, kCFStringNormalizationFormKC); // canonical decomposition\n\n           CFStringGetPascalString(mStr, (unsigned char *) name,256, gCurrentVMEncoding);\n           CFRelease(mStr);\n           return;\n        }\n   }\n   done1:\n   memcpy(name,shortFileName,sizeof(StrFileName));\n#else\n   if (shortFileName == nil)\n   \t  memcpy(name,possibleSpec->name,sizeof(StrFileName));\n   else\n   \t  memcpy(name,shortFileName,sizeof(StrFileName));\n#endif\n}\n\n#if defined(__MWERKS__)\nint RunningOnCarbonX();\nOSErr __path2fss(const char * pathName, FSSpecPtr spec);\n\nOSErr __path2fss(const char * pathName, FSSpecPtr spec) {\n    return lookupPath((char *) pathName, strlen(pathName),spec,true,true);\n}\n#endif\n\n\nBoolean isVmPathVolumeHFSPlus() {\n    XVolumeParam        xpb;\n    OSErr               err;\n    static int \t\tcachedCheck = -1;\n    \n    if (cachedCheck != -1) \n        return cachedCheck;\n        \n    xpb.ioNamePtr   = NULL;\n    xpb.ioVRefNum   = 0;\n    xpb.ioXVersion  = 0;\n    xpb.ioVolIndex  = 0;\n\n    err = PBXGetVolInfoSync( &xpb );\n    if (err != noErr)  \n    \tcachedCheck = false;\n    else\n        cachedCheck = xpb.ioVSigWord == kHFSPlusSigWord;\n    return cachedCheck;\n}\n\nOSErr\tFSMakeFSSpecCompat(short vRefNum, long dirID, ConstStr255Param fileName,  FSSpec *spec) {\n\tOSErr\tresult;\n#if TARGET_API_MAC_CARBON\n\tchar pascalString[256];\n#endif\t\n\t/* Let the file system create the FSSpec if it can since it does the job */\n\t/* much more efficiently than I can. */\n#if TARGET_API_MAC_CARBON\n\tunicode2NativePascalString((unsigned char *) fileName, (unsigned char *) pascalString);\t\n\tresult = FSMakeFSSpec(vRefNum, dirID,(unsigned char *) pascalString, spec);\n#else\n\tresult = FSMakeFSSpec(vRefNum, dirID,(unsigned char *) fileName, spec);\n#endif\n\t/* Fix a bug in Macintosh PC Exchange's MakeFSSpec code where 0 is */\n\t/* returned in the parID field when making an FSSpec to the volume's */\n\t/* root directory by passing a full pathname in MakeFSSpec's */\n\t/* fileName parameter. Fixed in Mac OS 8.1 */\n\tif ( (result == noErr) && (spec->parID == 0) )\n\t\tspec->parID = fsRtParID;\n\treturn ( result );\n}\n\n/*****************************************************************************************\nGetApplicationDirectory\n\nGet the volume reference number and directory id of this application.\nCode taken from Apple:\n\tTechnical Q&As: FL 14 - Finding your application's directory (19-June-2000)\n\nKarl Goiser 14/01/01\n*****************************************************************************************/\n\n        /* GetApplicationDirectory returns the volume reference number\n        and directory ID for the current application's directory. */\n\nOSStatus GetApplicationDirectory(FSSpec *workingDirectory) {\n        ProcessSerialNumber PSN;\n        ProcessInfoRec pinfo;\n        OSErr\terr;\n        \n                  /* set up process serial number */\n        PSN.highLongOfPSN = 0;\n        PSN.lowLongOfPSN = kCurrentProcess;\n            /* set up info block */\n        pinfo.processInfoLength = sizeof(pinfo);\n        pinfo.processName = 0;\n        pinfo.processAppSpec = workingDirectory;\n        err = GetProcessInformation(&PSN, &pinfo);\n        if (err == noErr && isSystem9_0_or_better()) {\n#if TARGET_API_MAC_CARBON && !defined(__MWERKS__)\n\t\t\tFSMakeFSSpecCompat(workingDirectory->vRefNum, workingDirectory->parID,\"\\p:::\",workingDirectory);\n#else\n\t\t\tFSSpec\tcheckDirectory;\n            FSMakeFSSpecCompat(workingDirectory->vRefNum, workingDirectory->parID,\"\\p:\",&checkDirectory);\n            if (strncmp((const char *)checkDirectory.name,(const char *) \"\\pMacOSClassic\",13) == 0)\n\t\t\t\tFSMakeFSSpecCompat(workingDirectory->vRefNum, workingDirectory->parID,\"\\p:::\",workingDirectory);\n#endif\n        }\n        return err;\n}\n\n#if defined(__MWERKS__) && !defined(__APPLE__) && !defined(__MACH__)\ntypedef struct {\n\tStandardFileReply *theSFR;\n\tFSSpec *itemSpec;\n} HookRecord, *HookRecordPtr;\n#endif\n\nOSErr squeakFindImage(const FSSpecPtr defaultLocationfssPtr,FSSpecPtr documentFSSpec)\n{\n    NavDialogOptions    dialogOptions;\n    AEDesc              defaultLocation;\n    NavEventUPP         eventProc = NewNavEventUPP(findImageEventProc);\n    NavObjectFilterUPP  filterProc =  NewNavObjectFilterUPP(findImageFilterProc);\n    OSErr               anErr = noErr;\n    \n#if !TARGET_API_MAC_CARBON \n#if   MINIMALVM\n  if (true) {\n#else\n  if ((Ptr) NavGetDefaultDialogOptions==(Ptr)kUnresolvedCFragSymbolAddress ) {\n#endif\n      \t//System pre 8.5 or system 7.x\n    \t// point my hook data record at the reply record and at\n\t\t// the file spec for the system file\n\t\t\n     \tStandardFileReply mySFR;\n#if defined(__MWERKS__) && !defined(__APPLE__) && !defined(__MACH__)\n    \tHookRecord hookRec;\n#endif\n\n        DlgHookYDUPP\tmyDlgHookUPP;\n    \tSFTypeList mySFTypeList;\n\t    Point dialogPt;\n\t    \n\t\thookRec.itemSpec = defaultLocationfssPtr;\n\t\thookRec.theSFR = &mySFR;\n\t\tSetPt(&dialogPt, -1, -1);\n\n\t\t// Set up the universal proc pointer to your hook routine with this \n\t\t// macro defined in StandardFile.h.  **NOTE** This is different\n\t\t// from the macro used for System 6 dialog hooks, and you should get\n\t\t// a compiler error if you try to use the wrong UPP with the wrong call.\n\t\tmyDlgHookUPP = NewDlgHookYDProc(DialogHook);\n\t\t\n\t\t// call Std File\n\t\tCustomGetFile(nil, -1, mySFTypeList, &mySFR, 0, dialogPt, myDlgHookUPP,\n\t\t\tnil, nil, nil, &hookRec);\n\t\t\t\n\t\t// Dispose of the routine descriptor, since they do allocate memory..\n\t\tDisposeRoutineDescriptor(myDlgHookUPP);\n\t\t*documentFSSpec = mySFR.sfFile; \n\t\treturn !mySFR.sfGood;\n\t}\n#endif\n#if !MINIMALVM\n    //  Specify default options for dialog box\n    anErr = NavGetDefaultDialogOptions(&dialogOptions);\n    if (anErr == noErr)\n    {\n        //  Adjust the options to fit our needs\n        //  Set default location option\n        //  dialogOptions.dialogOptionFlags |= kNavSelectDefaultLocation;\n        dialogOptions.dialogOptionFlags |= kNavAllFilesInPopup;\n        dialogOptions.dialogOptionFlags |= kNavSelectAllReadableItem;\n        //  Clear preview option\n        dialogOptions.dialogOptionFlags ^= kNavAllowPreviews;\n        \n        // make descriptor for default location\n        anErr = AECreateDesc(typeFSS, defaultLocationfssPtr,\n                             sizeof(*defaultLocationfssPtr),\n                             &defaultLocation );\n        if (anErr == noErr)\n        {\n            // Get 'open' resource. A nil handle being returned is OK,\n            // this simply means no automatic file filtering.\n            // 3.2.1, use filter proc, not open resource, because of os-x tag, metadata issues\n            NavTypeListHandle typeList = nil;\n            // NavTypeListHandle typeList = (NavTypeListHandle)GetResource('open', 128);\n            \n            NavReplyRecord reply;\n            \n            // Call NavGetFile() with specified options and\n            // declare our app-defined functions and type list\n            anErr = NavGetFile (&defaultLocation, &reply, &dialogOptions,\n                                eventProc, nil, filterProc,\n                                typeList, nil);\n            if (anErr == noErr && reply.validRecord)\n            {\n                //  Deal with multiple file selection\n                long    count;\n                \n                anErr = AECountItems(&(reply.selection), &count);\n                // Set up index for file list\n                if (anErr == noErr)\n                {\n                    long index;\n                    \n                    for (index = 1; index <= 1; index++)\n                    {\n                        AEKeyword   theKeyword;\n                        DescType    actualType;\n                        Size        actualSize;\n                        \n                        // Get a pointer to selected file\n                        anErr = AEGetNthPtr(&(reply.selection), index,\n                                            typeFSS, &theKeyword,\n                                            &actualType,documentFSSpec,\n                                            sizeof(FSSpec),\n                                            &actualSize);\n                     }\n                }\n                //  Dispose of NavReplyRecord, resources, descriptors\n                anErr = NavDisposeReply(&reply);\n            }\n            if (typeList != nil)\n            {\n                ReleaseResource( (Handle)typeList);\n            }\n            (void) AEDisposeDesc(&defaultLocation);\n        }\n    }\n    DisposeNavEventUPP(eventProc);\n    DisposeNavObjectFilterUPP(filterProc);\n    return anErr;\n#endif\n}\n\npascal void findImageEventProc(NavEventCallbackMessage callBackSelector, \n                        NavCBRecPtr callBackParms, \n                        NavCallBackUserData callBackUD)\n{\n#pragma unused(callBackUD)\n   // WindowPtr window = \n   //                 (WindowPtr)callBackParms->eventData.event->message;\n    switch (callBackSelector)\n    {\n        case kNavCBEvent:\n            switch (((callBackParms->eventData)\n                    .eventDataParms).event->what)\n            {\n                case updateEvt:\n                   // MyHandleUpdateEvent(window, \n                    //    (EventRecord*)callBackParms->eventData.event);\n                    break;\n            }\n            break;\n    }\n}\n\npascal Boolean findImageFilterProc(AEDesc* theItem, void* info, \n                            NavCallBackUserData callBackUD,\n                            NavFilterModes filterMode)\n{\n#pragma unused(filterMode,callBackUD)\n    NavFileOrFolderInfo* theInfo = (NavFileOrFolderInfo*)info;\n    \n    if (theItem->descriptorType == typeFSS) {\n        char checkSuffix[256];\n        FSSpec\ttheSpec;\n        OSErr \terror;\n        Boolean check;\n        \n        if (theInfo->isFolder)\n            return true;\n            \n        if (theInfo->fileAndFolder.fileInfo.finderInfo.fdType == 'STim')\n            return true;\n            \n        error = AEGetDescData(theItem,&theSpec,sizeof(theSpec));\n        if (error != noErr) \n            return true;\n        \n        CopyPascalStringToC(theSpec.name,checkSuffix);\n        check = IsImageName(checkSuffix);\n        if (check) \n            return true;\n        else\n            return false;\n    }\n    return true;\n}\n\n#if !TARGET_API_MAC_CARBON\n\n// this dialog hook for System 7 std file selects\n// the file specified by the hookRecord supplied as userData\n\npascal short DialogHook(short item, DialogPtr theDialog, \n\tvoid *userData)\n{\n\tHookRecordPtr hookRecPtr;\n\t\n\thookRecPtr = (HookRecordPtr) userData;\n\t\n\t// hookRecPtr->itemSpec points to the FSSpec of the item to be selected\n\t// hookRecPtr->theSFR points to the standard file reply record\n\n\t// make sure we're dealing with the proper dialog\n\tif (GetWRefCon(theDialog) == sfMainDialogRefCon) {\n\t\n\t\t// just when opening the dialog...\n\t\tif (item == sfHookFirstCall) {\n\t\n\t\t\t// make the reply record hold the spec of the specified item\n\t\t\thookRecPtr->theSFR->sfFile = *hookRecPtr->itemSpec;\n\t\t\t\n\t\t\t// Theres a gotcha in Standard File when using sfHookChangeSelection. \n\t\t\t// Even though New Inside Macintosh: Files has a sample that doesn't set\n\t\t\t// the sfScript field, it should be set, or the last object in the\n\t\t\t// selected directory  will always be selected.\n\t\t\thookRecPtr->theSFR->sfScript = smSystemScript;\n\n\t\t\t// tell std file to change the selection to that item\n\t\t\titem = sfHookChangeSelection;\n\t\t}\n\t}\t\t\t\n\t\t\n\treturn item;\n}\n\n#endif\n\n\n/* \n Some trial code, to keep for now, must delete some day\n\n            err = makeFSSpec((char *) src,num,&convertFileNameSpec);\n            if ((err == noErr) && resolveAlias)\n                err = ResolveAliasFile(&convertFileNameSpec,true,&isFolder,&isAlias);\n                \n            err = FSpMakeFSRef(&convertFileNameSpec,&theFSRef);\n            if (err == fnfErr) {\n                failureRetry = convertFileNameSpec;\n                CopyCStringToPascal(\":\",failureRetry.name);\n                err = FSpMakeFSRef(&failureRetry,&theFSRef);\n                if (err != noErr) \n                    return;\n                err = FSRefMakePath(&theFSRef,(UInt8 *) dst,1000); \n                if (err != noErr) \n                    return;\n                if (dst[strlen(dst)-1] != ':')\n                strcat(dst,\"/\");\n                CopyPascalStringToC(convertFileNameSpec.name,(char *)convertFileNameSpec.name);\n                strcat(dst,(char *)convertFileNameSpec.name);\n                return;\n            }\n            err = FSRefMakePath(&theFSRef,(UInt8 *)dst,1000); \n\nint fetchFileInfo(CInfoPBRec *pb,int dirIndex,FSSpec *spec,unsigned char *name,Boolean doAlias,Boolean *isFolder) {\n    OSErr\t\terror;\n    FSCatalogInfo \tcatalogInfo;\n    HFSUniStr255 \tunicodeName;\n    LocalDateTime \tlocalDateTime;\n    CFStringRef \ttheString;\n    ItemCount\t\tactualObjects;\n    FSSpec\t\tcurrentFSSpec;\n    static FSSpec \trememberCurrentSpec;\n    static int \t  \trememberLastDirIndex=-32768;\n    static FSRef  \ttheFSRef;\n    static FSIterator \ttheIterator;\n    static Boolean \tinteratorInitialized=false;\n    \n    if (!(memcmp(&rememberCurrentSpec,(char *) spec,sizeof(FSSpec)) == 0) \n        || (++rememberLastDirIndex != dirIndex)) {\n        if (interatorInitialized) {\n            FSCloseIterator(theIterator);\n            interatorInitialized = false;\n        }\n        error = FSpMakeFSRef (spec, &theFSRef);\n        if (error != noErr) \n            return false;\n        error = FSOpenIterator(&theFSRef, kFSIterateFlat, &theIterator);\n        if (error != noErr) \n            return false;\n        interatorInitialized = true;\n        rememberLastDirIndex = dirIndex;\n        rememberCurrentSpec = *spec;\n    }\n    \n     error = FSGetCatalogInfoBulk(theIterator,1,&actualObjects,nil,\n            kFSCatInfoNodeFlags+kFSCatInfoCreateDate+kFSCatInfoContentMod+kFSCatInfoDataSizes+kFSCatInfoFinderInfo,\n            &catalogInfo,nil,&currentFSSpec,&unicodeName);\n             \n    if (error != noErr) \n        return false;\n\n    memcpy(&pb->hFileInfo.ioFlFndrInfo,catalogInfo.finderInfo,sizeof(FInfo));\n    if ((pb->hFileInfo.ioFlFndrInfo.fdFlags & kIsAlias) && doAlias) {\n        Boolean isAlias;\n        OSErr   err;\n\t\t    \n        if (((Ptr) ResolveAliasFileWithMountFlags != (Ptr)kUnresolvedCFragSymbolAddress)) {\n            err = ResolveAliasFileWithMountFlags(&currentFSSpec,false,isFolder,&isAlias,kResolveAliasFileNoUI);\n            } \n        else \n            err = ResolveAliasFile(&currentFSSpec,false,isFolder,&isAlias);    \t\t\n    \t\t\t\n       if (err == noErr) {\n            if (dirIndex == 0) {\n                fetchFileInfo(pb,dirIndex,&currentFSSpec,name,false,isFolder);\n                *spec = currentFSSpec;\n                return true;\n            }\n            error = FSpMakeFSRef (&currentFSSpec, &theFSRef);\n            if (error != noErr) \n                return false;\n            error = FSGetCatalogInfo(&theFSRef,\n                kFSCatInfoNodeFlags+kFSCatInfoCreateDate+kFSCatInfoContentMod\n                +kFSCatInfoDataSizes+kFSCatInfoFinderInfo,\n                &catalogInfo,&unicodeName,&currentFSSpec,nil);\n            if (error != noErr) \n                return false;\n                \n        }\n    }  \n    ConvertUTCToLocalDateTime(&catalogInfo.createDate,&localDateTime); \n    pb->hFileInfo.ioFlCrDat = localDateTime.lowSeconds;\n    ConvertUTCToLocalDateTime(&catalogInfo.contentModDate,&localDateTime); \n    pb->hFileInfo.ioFlMdDat = localDateTime.lowSeconds;\n    memcpy(&pb->hFileInfo.ioFlFndrInfo,catalogInfo.finderInfo,sizeof(FInfo));\n    pb->hFileInfo.ioFlAttrib = 0;\n    *isFolder = false;\n    if (catalogInfo.nodeFlags & kFSNodeIsDirectoryMask) {\n        pb->hFileInfo.ioFlAttrib = kioFlAttribDirMask;\n        *isFolder = true;\n    }\n        \n    pb->hFileInfo.ioFlLgLen = catalogInfo.dataLogicalSize; \n    theString = CFStringCreateWithCharacters (nil, unicodeName.unicode, (CFIndex) unicodeName.length);\n    CFStringGetCString (theString,name,256, gCurrentVMEncoding);\n    CopyCStringToPascal(name,name);\n    CFRelease(theString);\n\n    return true;\n}\n*/\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacFileLogic.h",
    "content": "/****************************************************************************\n*   PROJECT: Mac directory logic\n*   FILE:    sqMacFileLogic.c\n*   CONTENT: \n*\n*   AUTHOR:  John McIntosh, and others.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacFileLogic.h 1344 2006-03-05 21:07:15Z johnmci $\n*\n*   NOTES: See change log below.\n*\tJan 2nd 2002 JMM added logic to make lookups faster\n*\tJan 22nd 2002 JMM squeak file type offset change\n*       Nov 25th 2003 JMM add gCurrentVMEncoding\n        3.7.0bx Nov 24th, 2003 JMM gCurrentVMEncoding\n\tMar 24th, 2005 JMM add routine for posix to HFS+\n\tJan 7th, 2006 JMM rework macosxpath & ioFilenamefromStringofLengthresolveAliases\n*/\n#include \"sqMacUnixFileInterface.h\"\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacImageIO.c",
    "content": "/****************************************************************************\n*   PROJECT: Mac read and write the image \n*   FILE:    sqMacImageIO.c\n*   CONTENT: \n*\n*   AUTHOR:  John Maloney, John McIntosh, and others.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacImageIO.c 1708 2007-06-10 00:40:04Z johnmci $\n*\n*   NOTES: \n*  Feb 22nd, 2002, JMM moved code into 10 other files, see sqMacMain.c for comments\n 3.7.0bx Nov 24th, 2003 JMM gCurrentVMEncoding\n 3.8.11b1 Mar 4th, 2006 JMM refactor, cleanup and add headless support\n*****************************************************************************/\n\n#include \"sq.h\"\n#include \"sqMacImageIO.h\"\n#include \"sqMacUIConstants.h\"\n#include \"sqMacWindow.h\"\n#include \"sqMacFileLogic.h\"\n#include \"sqMacEncoding.h\"\n\n\n\n/*** VM Home Directory Path ***/\n\nint vmPathSize(void) {\n        char path[VMPATH_SIZE + 1];\n        \n        getVMPathWithEncoding(path,gCurrentVMEncoding);\n\treturn strlen(path);\n}\n\nint vmPathGetLength(sqInt sqVMPathIndex, int length) {\n\tchar *stVMPath = (char *) sqVMPathIndex;\n\tint count, i;\n        char path[VMPATH_SIZE + 1];\n\n        getVMPathWithEncoding(path,gCurrentVMEncoding);\n\tcount = strlen(path);\n\tcount = (length < count) ? length : count;\n\n\t/* copy the file name into the Squeak string */\n\tfor (i = 0; i < count; i++) {\n\t\tstVMPath[i] = path[i];\n\t}\n\treturn count;\n}\n\n/*** Image File Naming ***/\n\nint imageNameSize(void) {\n    char path[IMAGE_NAME_SIZE+1];\n    getImageNameWithEncoding(path,gCurrentVMEncoding);\n\n    return strlen(path);\n}\n\nint imageNameGetLength(sqInt sqImageNameIndex, int length) {\n\tchar *sqImageName = (char *) sqImageNameIndex;\n\tint count, i;\n        char path[IMAGE_NAME_SIZE+1];\n        getImageNameWithEncoding(path,gCurrentVMEncoding);\n\n\tcount = strlen(path);\n\tcount = (length < count) ? length : count;\n\n\t/* copy the file name into the Squeak string */\n\tfor (i = 0; i < count; i++) {\n\t\tsqImageName[i] = path[i];\n\t}\n\treturn count;\n}\n\nint imageNamePutLength(sqInt sqImageNameIndex, int length) {\n\tchar *sqImageName = (char *) sqImageNameIndex;\n\tint count, i, ch, j;\n\tint lastColonIndex = -1;\n        char name[IMAGE_NAME_SIZE + 1];  /* full path to image file */\n        char shortImageName[SHORTIMAGE_NAME_SIZE+1];\n\n\tcount = (IMAGE_NAME_SIZE < length) ? IMAGE_NAME_SIZE : length;\n\n\t/* copy the file name into a null-terminated C string */\n\tfor (i = 0; i < count; i++) {\n\t\tch = name[i] = sqImageName[i];\n\t\tif (ch == DELIMITERInt) {\n\t\t\tlastColonIndex = i;\n\t\t}\n\t}\n\tname[count] = 0; \n        SetImageNameViaString(name,gCurrentVMEncoding);\n\n\t/* copy short image name into a null-terminated C string */\n\tfor (i = lastColonIndex + 1, j = 0; i < count; i++, j++) {\n\t\tshortImageName[j] = name[i];\n\t}\n\tshortImageName[j] = 0;\n\n        SetShortImageNameViaString(shortImageName,gCurrentVMEncoding);\n\tSetWindowTitle(1,shortImageName);\n\treturn count;\n}\n\nint IsImageName(char *name) {\n\tchar *suffix;\n\n\tsuffix = strrchr(name, '.');  /* pointer to last period in name */\n\tif (suffix == NULL) return false;\n\tif (strcmp(suffix, \".ima\") == 0) return true;\n\tif (strcmp(suffix, \".image\") == 0) return true;\n\tif (strcmp(suffix, \".IMA\") == 0) return true;\n\tif (strcmp(suffix, \".IMAGE\") == 0) return true;\n\treturn false;\n}\n\n/*** Image File Operations ***/\nvoid sqImageFileClose(sqImageFile f) {\n   if (f != 0)\n      fclose(f);\n}\n\nsqImageFile sqImageFileOpen(char *fileName, char *mode) {\n    char cFileName[DOCUMENT_NAME_SIZE+1];\n    sqImageFile remember;\n    \n    sqFilenameFromStringOpen(cFileName,(sqInt) fileName, strlen(fileName));\n    remember = fopen(cFileName, mode);\n    if (remember == null) \n        return null;\n    setvbuf(remember,0, _IOFBF, 256*1024);\n    return remember;\n}\n\nsqueakFileOffsetType sqImageFilePosition(sqImageFile f) {\n    if (f != 0)\n      return ftello(f);\n    return 0;\n}\n\nsize_t      sqImageFileRead(void *ptr, size_t elementSize, size_t count, sqImageFile f) {\n    if (f != 0)\n      return fread(ptr, elementSize, count, f);\n    return 0;\n}\n\nvoid        sqImageFileSeek(sqImageFile f, squeakFileOffsetType pos) {\n    if (f != 0)\n      fseeko(f, pos, SEEK_SET);\n}\n\nsqInt sqImageFileWrite(void *ptr, size_t elementSize, size_t count, sqImageFile f) {\n    if (f != 0)\n      return fwrite(ptr,elementSize,count,f);\n\treturn 0;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacImageIO.h",
    "content": "/****************************************************************************\n*   PROJECT: Squeak Headers\n*   FILE:    sqMacImageIO.c\n*   CONTENT: \n*\n*   AUTHOR:  John Maloney, John McIntosh, and others.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacImageIO.h 1344 2006-03-05 21:07:15Z johnmci $\n*\n*   NOTES: \n*  Feb 22nd, 2002, JMM moved code into 10 other files, see sqMacMain.c for comments\n 3.7.0bx Nov 24th, 2003 JMM gCurrentVMEncoding\n****************************************************************************/\n\n    #include <Carbon/Carbon.h>\n\nint IsImageName(char *name);\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacMain.c",
    "content": "\n\n\n\n\n#error Hi, you are building an obsolete version of the macintosh VM. \n#error Instead use the xCode projects found in the iOS folder \n#error Remove these error defines if you really need to build this obsolete 4.x VM\n\n\n\n\n\n/****************************************************************************\n*   PROJECT: Mac initialization, misc utility routines\n*   FILE:    sqMacMain.c\n*   CONTENT: \n*\n*   AUTHOR:  John Maloney, John McIntosh, and others.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacMain.c 1916 2008-09-04 13:07:15Z johnmci $\n*\n*   NOTES: \n*  Feb 22nd, 2002, JMM moved code into 10 other files, see sqMacMain.c for comments\n*  Mar  8th, 2002, JMM UI locking for applescript under os-x\n*  Mar  17th, 2002, JMM look into sleep wakeup issues under os-9 on some computers.\n*  Apr  17th, 2002, JMM Use accessors for VM variables, add os-9 check, plus changes by Alain Fischer <alain.fischer@bluewin.ch> to look for image and fetch VM version under os-x\n*  Apr  3rd, 2003, JMM use BROWSERPLUGIN\n*  Jun 25th, 2003, JMM optional window title. globals for various user preferences\n****************************************************************************/\n\n// These are the comments from the orginal sqMacWindow.c before it was divided into 10 files\n//Aug 7th 2000,JMM Added logic for interrupt driven dispatching\n//Sept 1st 2000, JMM fix problem with modifier information being passed back incorrectly.\n//Sept 1st 2000, JMM use floating point for time versus 64bit math (faster!)\n//Sept 1st 2000, JMM watch mouse movement foreground only, ignore when squeak in background.\n//Sept 18th 2000, JMM fix to cmpSize \n//Sept 19th 2000, JMM Sept 1st fix to keyboard modifier info broke cmd shift\n//Sept 27 2000, JMM fix to documentPath\n//Nov 13 2000, JMM logic to read/write image from VM. \n//Nov 22 2000, JMM Bob Arning found a bug with the duplicate mouse event logic (we were altering the event then recording the altered value)\n//Nov 30 2000, JMM Use Open Transport clock versus upTime, solves some issues for jitter and it's faster\n//Dec 5th 2000, JMM poll 60 times a second... do event polling via checkForInterrupts and drive semaphore\n//Dec 6th 2000, JMM added logic to interface with power manger (1997 was there but dropped..., back again for ibooks)\n//Jan 14th 2001, KG Did some carbon porting.\n//Feb 2nd 2001, JMM V3.0 added zoom window support, full path support\n//Feb 2nd 2001, JMM V3.04 do an open window dialog at startup time if no image file\n//Feb 14th 2001, JMM V3.06 don't cache image read/writes\n//Feb 17th 2001, JMM V3.07 fix OS bug in 7.5.5 on activate event\n//Feb 22nd 2001, JMM v3.08 no caps lock\n//Mar 9th  2001, JMM v3.10 broken full screen update redaw on cmd-tab via ignoring activate events 3.0.7.\n//Mar 15th 2001, JMM v3.10 added minimal vm logic, fix mouse down reporting.\n//Mar 23rd 2001, JMM v3.10 start interpreter suspended for plugin to fix race at startup with netscape 4.x\n//Apr 4th 2001, JMM  V3.11 fix for carbon get keyboard data eventrecord is broken for nullevents. \n//                         Rework event duplication logic, New menubar show logic, fix position bug on window move restore after full screen \n//Apr 30th 2001, JMM V3.14 pass interpreter version back for get attribute 1004, delay if idle, set mouse down flag only on mouse down in content, and restrict window movement/sizing if in full screen mode\n//May 24th 2001, JMM V3.17 add logic to sleep/wait in carbon on excessive idle time, plus change data return on attribute gets\n//June 18th 2001, JMM V3.18 fix for cast of version info for CW 6.1\n//June 18th 2001, JMM V3.19 fix for saveAsEmbeddedImage. Broken in 3.0 Also added fix for powerpc only cfrg, and rework of security interface for VMMaker via Tim\n//Oct 1,2001, JMM V3.1.2  open document support and fix scrap issues, add ext keyboard unlock shift key logic. \n//Dec 19,2001, JMM V3.1.2B6 fix USB on no-usb machines.\n//Feb 11th 2002, JMM V3.0.21 fix for UpdateWindow to make printing work!\n/*\t12/19/2001 JMM Fix for USB on non-usb devices, and fix for ext keyboard use volatile\n*\t12/27/2001 JMM Added support to load os-x Bundles versus CFM, have broken CFM code too.\n*\t1/2/2002   JMM Use unix io for image, much faster, cleanup window display and ioshow logic.\n*\t1/18/2002  JMM Fix os-x memory mapping, new type for squeak file offsets\n*\t1/27/2002  JMM added logic to get framework bundles \n*\t2/04/2002  JMM Rework timer logic, fall back to old style timer, which is pthread based.\n*\t2/14/2002  JMM fixes for updatewindow logic and drag/drop image with no file type\n*\t2/25/2002  JMM additions for carbon event managment.\n*   3.2.8b1 July 24th, 2002 JMM support for os-x plugin under IE 5.x\n*  3.5.1b3 June 7th, 2003 JMM fix up full screen pthread issue.\n*  3.6.x  Sept 1st, 2003 JMM per note from Bert Freudenberg <bert@isg.cs.uni-magdeburg.de>  changed 1003 parm to lowercase. \n*  3.7.0bx Nov 24th, 2003 JMM gCurrentVMEncoding\n*  3.8.0bx Jul 20th, 2004 JMM multiple window support\n*  3.8.7b2 March 19th, 2005 JMM add command line unix interface\n*  3.8.9b2 Sept 22nd, 2005 JMM add logic to override Squeak.image name \n*  3.8.10b1 Jan 31st, 2006 JMM convert to unix file names.\n*  3.8.11b1 Mar 4th, 2006 JMM refactor, cleanup and add headless support\n*  3.8.13b4 Oct 16th, 2006 JMM headless\n*  3.8.14b1 Oct  2006, JMM browser rewrite\n 3.8.15b3  Feb 19th, 2007 JMM add cursor set logic\n 3.8.15b5  Mar 7th, 2007 JMM Add SqueakDebug, SqueakQuitOnQuitAppleEvent \n 3.8.16b3  Mar 21th, 2007 JMM trusted/untrusted directory cleanup, warning msg cleanup\n 3.8.17b2  April 26th, 2007 JMM large cursors\n*/\n\n\n#include <objc/objc-runtime.h>\n\n#include \"sq.h\"\n#include \"sqMacUIConstants.h\"\n#include \"sqMacMain.h\"\n#include \"sqMacUIMenuBar.h\"\n#include \"sqMacWindow.h\"\n#include \"sqMacTime.h\"\n#include \"sqMacUIAppleEvents.h\"\n#include \"sqMacImageIO.h\"\n#include \"sqMacUIClipBoard.h\"\n#include \"sqMacFileLogic.h\"\n#include \"sqMacUIEvents.h\"\n#include \"sqMacMemory.h\"\n#include \"sqMacEncoding.h\"\n#include \"sqMacUnixCommandLineInterface.h\"\n#include \"sqMacUnixFileInterface.h\"\n#include \"sqaio.h\"\n#include \"sqMacNSPluginUILogic2.h\"\n#include \"sqUnixCharConv.h\"\n\n#include <unistd.h>\n#include <pthread.h>\n#include <Processes.h>\n\n#if !defined(PATH_MAX)\n# include <sys/syslimits.h>\n#endif\n#if !defined(NOEXECINFO)\n# include <execinfo.h>\n# define BACKTRACE_DEPTH 64\n#endif\n#include <sys/ucontext.h>\nextern pthread_mutex_t gEventQueueLock,gSleepLock;\nextern pthread_cond_t  gSleepLockCondition;\n\nOSErr\t\t\tgSqueakFileLastError; \nBoolean\t\t\tgSqueakWindowIsFloating,gSqueakWindowHasTitle=true,gSqueakFloatingWindowGetsFocus=false,gSqueakUIFlushUseHighPercisionClock=false,gSqueakPluginsBuiltInOrLocalOnly=false,gSqueakHeadless=false,gSqueakQuitOnQuitAppleEvent=false,gSqueakExplicitWindowOpenNeeded=false;\nBoolean\t\t\tgSqueakHasQuitWithoutSaving = true;\nlong\t\t\tgSqueakMouseMappings[4][4] = {{0},{0}};\nlong\t\t\tgSqueakBrowserMouseMappings[4][4] = {{0},{0}};\nusqInt          gMaxHeapSize=512*1024*1024;\nUInt32\t\t\tgSqueakWindowType=zoomDocProc,gSqueakWindowAttributes=0;\nlong\t\t\tgSqueakUIFlushPrimaryDeferNMilliseconds=20,gSqueakUIFlushSecondaryCleanupDelayMilliseconds=20,gSqueakUIFlushSecondaryCheckForPossibleNeedEveryNMilliseconds=16,gSqueakDebug=0;\nchar            gSqueakImageName[PATH_MAX] = \"Squeak.image\";\nchar            gSqueakUntrustedDirectoryName[PATH_MAX] = \"/foobar/tooBar/forSqueak/bogus/\";\nchar            gSqueakTrustedDirectoryName[PATH_MAX] = \"/foobar/tooBar/forSqueak/bogus/\";\nCFStringRef\t\tgSqueakImageNameStringRef;\nint\t\t\t\tgSqueakBrowserPipes[]= {-1, -1}; \nBoolean\t\t\tgSqueakBrowserSubProcess = false,gSqueakBrowserWasHeadlessButMadeFullScreen=false;\nBoolean\t\t\tgSqueakBrowserExitRequested = false;\n\nvoid cocoInterfaceForTilda(CFStringRef aStringRef, char *buffer,int max_size);\n/*** Main ***/\n\n/*** Variables -- globals for access from pluggable primitives ***/\nint    argCnt= 0;\nchar **argVec= 0;\nchar **envVec= 0;\n\nsqInt printAllStacks(void);\nsqInt printCallStack(void);\nextern void dumpPrimTraceLog(void);\nextern BOOL NSApplicationLoad(void);\nstatic void fetchPrefrences(void);\n\n/*** errors ***/\n\n/* Print an error message, possibly a stack trace, do /not/ exit.\n * Allows e.g. writing to a log file and stderr.\n */\nstatic void\nreportStackState(char *msg, char *date, int printAll, ucontext_t *uap)\n{\n#if !defined(NOEXECINFO)\n\tvoid *addrs[BACKTRACE_DEPTH];\n\tint depth;\n#endif\n\t/* flag prevents recursive error when trying to print a broken stack */\n\tstatic sqInt printingStack = false;\n\n\tprintf(\"\\n%s%s%s\\n\\n\", msg, date ? \" \" : \"\", date ? date : \"\");\n\n#if !defined(NOEXECINFO)\n\tprintf(\"C stack backtrace:\\n\");\n\tfflush(stdout); /* backtrace_symbols_fd uses unbuffered i/o */\n\tdepth = backtrace(addrs, BACKTRACE_DEPTH);\n\tbacktrace_symbols_fd(addrs, depth, fileno(stdout));\n#endif\n\n\tif (ioOSThreadsEqual(ioCurrentOSThread(),getVMOSThread())) {\n\t\tif (!printingStack) {\n#if COGVM\n\t\t\t/* If we're in generated machine code then the only way the stack\n\t\t\t * dump machinery has of giving us an accurate report is if we set\n\t\t\t * stackPointer & framePointer to the native stack & frame pointers.\n\t\t\t */\n# if __APPLE__ && __MACH__ && __i386__\n\t/* see sys/ucontext.h; two different namings */\n#\tif __GNUC__ && !__INTEL_COMPILER /* icc pretends to be gcc */\n\t\t\tvoid *fp = (void *)(uap ? uap->uc_mcontext->__ss.__ebp: 0);\n\t\t\tvoid *sp = (void *)(uap ? uap->uc_mcontext->__ss.__esp: 0);\n#\telse\n\t\t\tvoid *fp = (void *)(uap ? uap->uc_mcontext->ss.ebp: 0);\n\t\t\tvoid *sp = (void *)(uap ? uap->uc_mcontext->ss.esp: 0);\n#\tendif\n# elif __linux__ && __i386__\n\t\t\tvoid *fp = (void *)(uap ? uap->uc_mcontext.gregs[REG_EBP]: 0);\n\t\t\tvoid *sp = (void *)(uap ? uap->uc_mcontext.gregs[REG_ESP]: 0);\n# else\n#\terror need to implement extracting pc from a ucontext_t on this system\n# endif\n\t\t\tchar *savedSP, *savedFP;\n\n\t\t\tifValidWriteBackStackPointersSaveTo(fp,sp,&savedFP,&savedSP);\n#endif\n\n\t\t\tprintingStack = true;\n\t\t\tif (printAll) {\n\t\t\t\tprintf(\"\\n\\nAll Smalltalk process stacks (active first):\\n\");\n      printAllStacks();\n    }\n\t\t\telse {\n\t\t\t\tprintf(\"\\n\\nSmalltalk stack dump:\\n\");\n\t\t\t\tprintCallStack();\n\t\t\t}\n\t\t\tprintingStack = false;\n#if COGVM\n\t\t\t/* Now restore framePointer and stackPointer via same function */\n\t\t\tifValidWriteBackStackPointersSaveTo(savedFP,savedSP,0,0);\n#endif\n\t\t}\n\t}\n\telse\n\t\tprintf(\"\\nCan't dump Smalltalk stack(s). Not in VM thread\\n\");\n\tprintf(\"\\nMost recent primitives\\n\");\n\tdumpPrimTraceLog();\n\tfflush(stdout);\n}\n\n/* Print an error message, possibly a stack trace, and exit. */\n/* Disable Intel compiler inlining of error which is used for breakpoints */\n#pragma auto_inline off\nvoid\nerror(char *msg)\n{\n\treportStackState(msg,0,0,0);\n  abort();\n}\n#pragma auto_inline on\n\n/* construct /dir/for/image/crash.dmp if a / in imageName else crash.dmp */\nstatic void\ngetCrashDumpFilenameInto(char *buf)\n{\n  char *slash;\n\n  strcpy(buf,imageName);\n  slash = strrchr(buf,'/');\n  strcpy(slash ? slash + 1 : buf, \"crash.dmp\");\n}\n\nstatic void\nsigusr1(int sig, siginfo_t *info, ucontext_t *uap)\n{\n\tint saved_errno = errno;\n\ttime_t now = time(NULL);\n\tchar ctimebuf[32];\n\tchar crashdump[IMAGE_NAME_SIZE+1];\n\tunsigned long pc;\n\n\tif (!ioOSThreadsEqual(ioCurrentOSThread(),getVMOSThread())) {\n\t\tpthread_kill(getVMOSThread(),sig);\n\t\terrno = saved_errno;\n\t\treturn;\n\t}\n\n\tgetCrashDumpFilenameInto(crashdump);\n\tctime_r(&now,ctimebuf);\n\tpushOutputFile(crashdump);\n\treportStackState(\"SIGUSR1\", ctimebuf, 1, uap);\n\tpopOutputFile();\n\treportStackState(\"SIGUSR1\", ctimebuf, 1, uap);\n\n\terrno = saved_errno;\n}\n\nstatic void\nsigsegv(int sig, siginfo_t *info, ucontext_t *uap)\n{\n\ttime_t now = time(NULL);\n\tchar ctimebuf[32];\n\tchar crashdump[IMAGE_NAME_SIZE+1];\n\n\tgetCrashDumpFilenameInto(crashdump);\n\tctime_r(&now,ctimebuf);\n\tpushOutputFile(crashdump);\n\treportStackState(\"Segmentation fault\", ctimebuf, 0, uap);\n\tpopOutputFile();\n\treportStackState(\"Segmentation fault\", ctimebuf, 0, uap);\n\tabort();\n}\n\nint main(int argc, char **argv, char **envp);\n\n#if defined(__GNUC__) && ( defined(i386) || defined(__i386) || defined(__i386__)  \\\n\t\t\t|| defined(i486) || defined(__i486) || defined (__i486__) \\\n\t\t\t|| defined(intel) || defined(x86) || defined(i86pc) )\n  static void fldcw(unsigned int cw)\n  {\n    __asm__(\"fldcw %0\" :: \"m\"(cw));\n  }\n#else\n# define fldcw(cw)\n#endif\n\n#if defined(__GNUC__) && ( defined(ppc) || defined(__ppc) || defined(__ppc__)  \\\n\t\t\t|| defined(POWERPC) || defined(__POWERPC) || defined (__POWERPC__) )\nvoid mtfsfi(unsigned long long fpscr);\nvoid mtfsfi(unsigned long long fpscr)\n  {\n    __asm__(\"lfd   f0, %0\" :: \"m\"(fpscr));\n    __asm__(\"mtfsf 0xff, f0\");\n  }\n#else\n# define mtfsfi(fpscr)\n#endif\n\nint\nmain(int argc, char **argv, char **envp)\n{\n\tEventRecord theEvent;\n\tsqImageFile f;\n\tOSErr err;\n\tchar shortImageName[SHORTIMAGE_NAME_SIZE+1];\n        \n\tstruct sigaction sigusr1_handler_action, sigsegv_handler_action;\n\n#if 0 /* Useful debugging stub?  Dump args to file ~/argvPID. */\n  {\tchar fname[PATH_MAX];\n\tFILE *f;\n\tint i;\n\n\tsprintf(fname,\"%s/argv%d\",getenv(\"HOME\"), getpid());\n\tf = fopen(fname,\"w\");\n\tfor (i = 0; i < argc; i++)\n\t\tfprintf(f,\"argv[%d]: %s\\n\", i, argv[i]);\n\tfclose(f);\n  }\n#endif\n\t/* check the interpreter's size assumptions for basic data types */\n\tif (sizeof(int) != 4) {\n\t\terror(\"This C compiler's integers are not 32 bits.\");\n\t}\n\tif (sizeof(double) != 8) {\n\t\terror(\"This C compiler's floats are not 64 bits.\");\n\t}\n\tif (sizeof(time_t) != 4) {\n\t\terror(\"This C compiler's time_t's are not 32 bits.\");\n\t}\n\n  /* Make parameters global for access from pluggable primitives */\n  argCnt= argc;\n  argVec= argv;\n  envVec= envp;\n  \n\tsigsegv_handler_action.sa_sigaction = sigsegv;\n\tsigsegv_handler_action.sa_flags = SA_NODEFER | SA_SIGINFO;\n\tsigemptyset(&sigsegv_handler_action.sa_mask);\n    (void)sigaction(SIGSEGV, &sigsegv_handler_action, 0);\n\n\tsigusr1_handler_action.sa_sigaction = sigusr1;\n\tsigusr1_handler_action.sa_flags = SA_NODEFER | SA_SIGINFO;\n\tsigemptyset(&sigusr1_handler_action.sa_mask);\n    (void)sigaction(SIGUSR1, &sigusr1_handler_action, 0);\n\n  fldcw(0x12bf);\t/* signed infinity, round to nearest, REAL8, disable intrs, disable signals */\n  mtfsfi(0);\t\t/* disable signals, IEEE mode, round to nearest */\n\n\tLoadScrap();\n\tSetUpClipboard();\n\tfetchPrefrences();\n\n\tSetVMPathFromApplicationDirectory();\n\n\t{\n\t\t// Change working directory, this works under os-x, previous logic worked pre os-x 10.4\n\t\t\n\t\tchar target[4097],temp[4097];\n\t\tgetVMPathWithEncoding(target,gCurrentVMEncoding);\n\t\tsqFilenameFromStringOpen(temp,(sqInt) target, strlen(target));\n\t\tchdir(temp);\n\t}\n\n\t/* install apple event handlers and wait for open event */\n\tInstallAppleEventHandlers();\n\twhile (ShortImageNameIsEmpty()) {\n\t\tGetNextEvent(everyEvent, &theEvent);\n\t\tif (theEvent.what == kHighLevelEvent) {\n\t\t\tAEProcessAppleEvent(&theEvent);\n\t\t}\n\t}\n\n\tunixArgcInterface(argCnt,argVec,envVec);\n\t\n\tif (!gSqueakHeadless) {\n\t\tProcessSerialNumber psn = { 0, kCurrentProcess };\n\t\tProcessInfoRec info;\n\t\tinfo.processName = NULL;\n\t\tinfo.processAppSpec = NULL;\n\t\tinfo.processInfoLength = sizeof(ProcessInfoRec);\n\t\tGetProcessInformation(&psn,&info);\n\t\tif ((info.processMode & modeOnlyBackground) && TransformProcessType != NULL) {\n\t\t\tOSStatus returnCode = TransformProcessType(& psn, kProcessTransformToForegroundApplication);\n#pragma unused(returnCode)\n\t\t\tSetFrontProcess(&psn);\n\t\t}\n//\t\tInitCursor();\tlarge cursor support\n\t}\n\t\n\tgetShortImageNameWithEncoding(shortImageName,gCurrentVMEncoding);\n    if (gSqueakHeadless && ImageNameIsEmpty()) \n\t\texit(-42);\n\t\t\n\tif (ImageNameIsEmpty()) {\n            CFBundleRef mainBundle;\n            CFURLRef imageURL;\n\n            mainBundle = CFBundleGetMainBundle();            \n            imageURL = CFBundleCopyResourceURL (mainBundle, gSqueakImageNameStringRef, NULL, NULL);\n            if (imageURL != NULL) {\n\t\t\t\tCFStringRef imagePath;\n\t\t\t\t\n                imagePath = CFURLCopyFileSystemPath (imageURL, kCFURLPOSIXPathStyle);\n\n\t\t\t\tSetImageNameViaCFString(imagePath);\n                CFRelease(imageURL);\n                CFRelease(imagePath);\n            } else {\n\t\t\t\textern void resolveWhatTheImageNameIs(char *string);\n\t\t\t\tchar\tafterCheckForTilda[PATH_MAX];\n\n\t\t\t\tcocoInterfaceForTilda(gSqueakImageNameStringRef, afterCheckForTilda,PATH_MAX);\n\t\t\t\tresolveWhatTheImageNameIs(afterCheckForTilda);\n\t\t\t}\n\t}\n\n\t/* read the image file and allocate memory for Squeak heap */\n\tf = sqImageFileOpen(getImageName(), \"rb\");\n    if (gSqueakHeadless && f == NULL) \n\t\t\texit(-43);\n\twhile (f == NULL) {\n\t    //Failure attempt to ask the user to find the image file\n\t\tchar pathName[DOCUMENT_NAME_SIZE+1];\n\t\terr = squeakFindImage(pathName);\n\t\tif (err) \n\t\t\tioExit();\n\t\tgetLastPathComponentInCurrentEncoding(pathName,shortImageName,gCurrentVMEncoding);\n\t\tSetShortImageNameViaString(shortImageName,gCurrentVMEncoding);\n\t\tSetImageNameViaString(pathName,gCurrentVMEncoding);\n\t\tf = sqImageFileOpen(getImageName(), \"rb\");\n \t}\n\n\treadImageFromFileHeapSizeStartingAt(f, sqGetAvailableMemory(), 0);\n\tsqImageFileClose(f);\n        \n\tif (!gSqueakHeadless) {\n\t\tSetUpMenus();\n\t}\n\tif (!gSqueakHeadless || (gSqueakHeadless && gSqueakBrowserSubProcess)) {\n\t\tSetUpPixmap();\n\t}\n\t\t\n    SetUpTimers();\n\n    aioInit();\n\tioInitThreads();\n    pthread_mutex_init(&gEventQueueLock, NULL);\n\tif (gSqueakBrowserSubProcess) {\n\t\textern CGContextRef SharedBrowserBitMapContextRef;\n\t\tsetupPipes();\n\t\twhile (SharedBrowserBitMapContextRef == NULL)\n\t\t\taioSleepForUsecs(100*1000);\n\t}\n\tNSApplicationLoad();\t//\tNeeded for Carbon based applications which call into Cocoa\n\tRunApplicationEventLoopWithSqueak();\n    return 0;\n}\n\nint ioExit(void) { return ioExitWithErrorCode(0); }\n\nsqInt\nioExitWithErrorCode(int ec)\n{\n    UnloadScrap();\n    ioShutdownAllModules();\n\tif (!gSqueakHeadless || gSqueakBrowserWasHeadlessButMadeFullScreen) \n\t\tMenuBarRestore();\n#if !__MACH__\n\tsqMacMemoryFree();  // needed on old Mac OS but not on unices\n#endif\n    exit(ec);\n\treturn ec;\n}\n\nint ioDisablePowerManager(int disableIfNonZero) {\n\t#pragma unused(disableIfNonZero)\n\treturn 0;\n}\n\n/*** I/O Primitives ***/\n\nint ioBeep(void) {\n\tSysBeep(1000);\n\treturn 0;\n}\n\nvoid SqueakTerminate() {\n\tUnloadScrap();\n\tioShutdownAllModules();\n\tsqMacMemoryFree();\n}\n\nint ioFormPrint(int bitsAddr, int width, int height, int depth, double hScale, double vScale, int landscapeFlag) {\n\t/* experimental: print a form with the given bitmap, width, height, and depth at\n\t   the given horizontal and vertical scales in the given orientation\n           However John Mcintosh has introduced a printjob class and plugin to replace this primitive */\n#pragma unused( bitsAddr,  width,  height,  depth,  hScale,  vScale,  landscapeFlag)\n\treturn true;\n}\n\n/*** System Attributes ***/\n/* Andreas' stubs */\nchar* ioGetLogDirectory(void) { return \"\"; };\nsqInt ioSetLogDirectoryOfSize(void* lblIndex, sqInt sz){ return 1; }\n\nchar * GetAttributeString(int id) {\n\t/* This is a hook for getting various status strings back from\n\t   the OS. In particular, it allows Squeak to be passed arguments\n\t   such as the name of a file to be processed. Command line options\n\t   are reported this way as well, on platforms that support them.\n\t*/\n\n\t// id #0 should return the full name of VM\n\tif (id == 0) {\n\t\tstatic char pathToGiveToSqueak[PATH_MAX];\n\t\t\tux2sqPath(argVec[0], strlen(argVec[0]), pathToGiveToSqueak, VMPATH_SIZE,1);\t\n            return pathToGiveToSqueak;\n        }\n\t/* Note: 1.3x images will try to read the image as a document because they\n\t   expect attribute #1 to be the document name. A 1.3x image can be patched\n\t   using a VM of 2.6 or earlier. */\n\tif (id == 1) {\n            static char path[IMAGE_NAME_SIZE + 1];\n            getImageNameWithEncoding(path,gCurrentVMEncoding);\n            return path;\n        }\n\n\tif (id == 1001) return \"Mac OS\";\n\tif (id == 1002) {\n\t\tlong myattr;\n\t\tstatic char data[32];\n\t\t\n\t\tGestalt(gestaltSystemVersion, &myattr);\n\t\tsprintf(data,\"%X\",(unsigned int) myattr);\n\t\treturn data;\n\t}\n\tif (id == 1003) {\n\t\tlong myattr;\n\t\t\n\t\tGestalt(gestaltSysArchitecture, &myattr);\n\t\tif (myattr == gestalt68k) \n\t\t\treturn \"68K\";\n\t\tif (myattr == gestaltPowerPC) \n\t\t\treturn \"powerpc\";\n\t\tif (myattr == gestaltIntel) \n\t\t\treturn \"intel\";\n\t}\n\n   if (id == 1004) {\n            CFBundleRef mainBundle;\n            CFStringRef versionString;\n            static char data[255];\n            mainBundle = CFBundleGetMainBundle ();\n            versionString = CFBundleGetValueForInfoDictionaryKey(mainBundle, CFSTR(\"CFBundleShortVersionString\"));\n            bzero(data,255);\n            strcat(data,interpreterVersion);\n            strcat(data,\" \");\n            CFStringGetCString (versionString, data+strlen(data), 255-strlen(data), gCurrentVMEncoding);\n            return data;            \n        }\n\n   if (id == 1005)\n\t\treturn \"Aqua\";\n\t/* vm build string */\n\n    if (id == 1006) {\n\t\textern char vmBuildString[];\n\t\treturn vmBuildString;\n    }\n#if STACKVM\n\tif (id == 1007) { /* interpreter build info */\n\t\textern char *__interpBuildInfo;\n\t\treturn __interpBuildInfo;\n\t}\n# if COGVM\n\tif (id == 1008) { /* cogit build info */\n\t\textern char *__cogitBuildInfo;\n\t\treturn __cogitBuildInfo;\n\t}\n# endif\n#endif\n// \t\treturn \"Mac Carbon 3.8.18b4 29-May-08 >02DA4BFD-4050-4372-8DBB-9582DA7D0218<\";\n// \t\treturn \"Mac Carbon 3.8.18b3 10-Apr-08 >DC0EAF5D-C46C-479D-B2A3-DBD4A2DF95A8<\";\n//\t\treturn \"Mac Carbon 3.8.18b2 17-Aug-07 >F439DEFF-4327-403D-969B-78695EE835DB<\";\n// \t\treturn \"Mac Carbon 3.8.18b1 9-Jun-07 >4C61BDDD-B2AA-4C71-B20D-5758597201EF<\";\n// \t\treturn \"Mac Carbon 3.8.17b5 16-May-07 >BBAC71BE-EF68-4994-8E57-D641A936733F<\";\n// \t\treturn \"Mac Carbon 3.8.17b5 1-May-07 >B389476B-E7F3-4E6A-A8B6-EAE7B39B0EEA<\";\n// \t\treturn \"Mac Carbon 3.8.17b4 27-Apr-07 >3636308B-25D4-4CBB-A515-F3ECC3CEEA5E<\";\n// \t\treturn \"Mac Carbon 3.8.17b3 26-Apr-07 >BBB5CDFC-E9BA-48AC-881E-464EE9718935<\";\n// \t\treturn \"Mac Carbon 3.8.17b2 26-Apr-07 >C4425002-5C1A-4801-A7EC-EBB15025290E<\";\n// \t\treturn \"Mac Carbon 3.8.17b1 25-Apr-07 >9FEB946B-22B5-478C-82DD-776FD6D4E3D6<\";\n//\t\treturn \"Mac Carbon 3.8.16b6 17-Apr-07 >D12C988F-2395-413F-9BA2-FC4F27858E06<\";\n// \t\treturn \"Mac Carbon 3.8.16b5 29-Mar-07 >4ACC5390-27F6-40D4-A85A-886C7DF0A591<\";\n// \t\treturn \"Mac Carbon 3.8.16b4 22-Mar-07 >A74B40BA-9CB2-4E3E-A9DA-FB0002315FE6<\";\n// \t\treturn \"Mac Carbon 3.8.16b3 20-Mar-07 >3ABB8EA0-DA9D-47FD-BD1B-6B0A2CB05EE6<\";\n//\t\treturn \"Mac Carbon 3.8.16b2 19-Mar-07 >3F52787C-BDE4-42E2-B72D-3CC68F8EE9C1<\";\n// \t\treturn \"Mac Carbon 3.8.16b1 16-Mar-07 >B7FBAF59-7235-44A3-9E3E-173C619EE214<\";\n// \t\treturn \"Mac Carbon 3.8.15b8 13-Mar-07 >6C3CEECE-17C9-488F-B9A0-8CCF48A19352<\";\n// \t\treturn \"Mac Carbon 3.8.15b7 13-Mar-07 >3E759905-E8C5-41EA-95B0-8A3B71C80C97<\";\n// \t\treturn \"Mac Carbon 3.8.15b6 11-Mar-07 >E02C430E-69FD-4AC5-8740-70D3A365A5CC<\";\n// \t\treturn \"Mac Carbon 3.8.15b5 10-Mar-07 >9E3E99A8-A5BD-4360-B425-43380C6057C9<\";\n// \t\treturn \"Mac Carbon 3.8.15b4 26-Feb-07 >639DEC8A-D541-4AF1-8DFF-40D02C177C51<\";\n//\t\treturn \"Mac Carbon 3.8.15b3 19-Feb-07 >15CEBDA8-05ED-4CCD-86C4-E737B2E33A64<\";\n //\t\treturn \"Mac Carbon 3.8.15b2X 09-Feb-07 >D0AA85C3-05E7-4709-B8F4-174DB6F1ACDB<\";\n //\t\treturn \"Mac Carbon 3.8.15b2 27-Jan-07 >02EF6EF4-41CE-46DF-8ADF-E4D2EBBD542C<\";\n //\t\treturn \"Mac Carbon 3.8.15b1 22-Jan-07 >4AE66794-B628-44CF-BAA3-1BF3E916054D<\";\n\t\t\t\n \tif (id == 1201) return \"255\";\n \n\tif (id == 1202) {\n\t\tstatic char data[32];\n\n\t\tsprintf(data,\"%i\",gSqueakFileLastError);\n\t\treturn data;\n\t}\n\t\n\tif (id < 0 || (id >= 2 && id <= 1000))  {\n\t\tchar *results;\n\t\tresults = unixArgcInterfaceGetParm(id);\n\t\tif (results) \n\t\t\treturn results;\n\t}\n\n\t/* attribute undefined by this platform */\n\tsuccess(false);\n\treturn \"\";\n}\n\nint attributeSize(int id) {\n\treturn strlen(GetAttributeString(id));\n}\n\nint getAttributeIntoLength(int id, int byteArrayIndex, int length) {\n\tchar *srcPtr, *dstPtr, *end;\n\tint charsToMove;\n\n\tsrcPtr = GetAttributeString(id);\n\tcharsToMove = strlen(srcPtr);\n\tif (charsToMove > length) {\n\t\tcharsToMove = length;\n\t}\n\n\tdstPtr = (char *) byteArrayIndex;\n\tend = srcPtr + charsToMove;\n\twhile (srcPtr < end) {\n\t\t*dstPtr++ = *srcPtr++;\n\t}\n\treturn charsToMove;\n}\n\n\nstatic void\nfetchPrefrences() {\n    CFBundleRef  myBundle;\n    CFDictionaryRef myDictionary;\n    CFNumberRef SqueakWindowType,SqueakMaxHeapSizeType,SqueakUIFlushPrimaryDeferNMilliseconds,SqueakUIFlushSecondaryCleanupDelayMilliseconds,SqueakUIFlushSecondaryCheckForPossibleNeedEveryNMilliseconds,SqueakDebug;\n    CFBooleanRef SqueakWindowHasTitleType,SqueakFloatingWindowGetsFocusType,SqueakUIFlushUseHighPercisionClock,SqueakPluginsBuiltInOrLocalOnly,SqueakQuitOnQuitAppleEvent,SqueakExplicitWindowOpenNeeded;\n    CFBooleanRef SqueakHasQuitWithoutSaving;\n\tCFNumberRef SqueakMouseMappings[4][4] = {{0},{0}};\n\tCFNumberRef SqueakBrowserMouseMappings[4][4] = {{0},{0}};\n    CFDataRef \tSqueakWindowAttributeType;    \n    CFStringRef    SqueakVMEncodingType, SqueakUnTrustedDirectoryTypeRef, SqueakTrustedDirectoryTypeRef;\n\n    char        encoding[256];\n    long\t\ti,j;\n\t\n    myBundle = CFBundleGetMainBundle();\n    myDictionary = CFBundleGetInfoDictionary(myBundle);\n\t\n    SqueakWindowType = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakWindowType\"));\n    SqueakDebug = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakDebug\"));\n    SqueakQuitOnQuitAppleEvent = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakQuitOnQuitAppleEvent\"));\n    SqueakWindowAttributeType = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakWindowAttribute\"));\n    SqueakWindowHasTitleType = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakWindowHasTitle\"));\n    SqueakFloatingWindowGetsFocusType = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakFloatingWindowGetsFocus\"));\n    SqueakMaxHeapSizeType = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakMaxHeapSize\"));\n    SqueakVMEncodingType = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakEncodingType\"));\n    SqueakUnTrustedDirectoryTypeRef  = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakUnTrustedDirectory\"));\n\tSqueakTrustedDirectoryTypeRef  = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakTrustedDirectory\"));\n\tSqueakPluginsBuiltInOrLocalOnly = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakPluginsBuiltInOrLocalOnly\"));\n\tSqueakExplicitWindowOpenNeeded = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakExplicitWindowOpenNeeded\"));\n    gSqueakImageNameStringRef = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakImageName\"));\n    SqueakUIFlushUseHighPercisionClock = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakUIFlushUseHighPercisionClock\"));\n    SqueakUIFlushPrimaryDeferNMilliseconds = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakUIFlushPrimaryDeferNMilliseconds\"));\n    SqueakUIFlushSecondaryCleanupDelayMilliseconds = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakUIFlushSecondaryCleanupDelayMilliseconds\"));\n    SqueakUIFlushSecondaryCheckForPossibleNeedEveryNMilliseconds = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakUIFlushSecondaryCheckForPossibleNeedEveryNMilliseconds\"));\n    SqueakHasQuitWithoutSaving = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakHasQuitWithoutSaving\"));\n    SqueakMouseMappings[0][1] = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakMouseNoneButton1\"));\n    SqueakMouseMappings[0][2] = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakMouseNoneButton2\"));\n    SqueakMouseMappings[0][3] = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakMouseNoneButton3\"));\n    SqueakMouseMappings[1][1] = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakMouseCmdButton1\"));\n    SqueakMouseMappings[1][2] = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakMouseCmdButton2\"));\n    SqueakMouseMappings[1][3] = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakMouseCmdButton3\"));\n    SqueakMouseMappings[2][1] = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakMouseOptionButton1\"));\n    SqueakMouseMappings[2][2] = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakMouseOptionButton2\"));\n    SqueakMouseMappings[2][3] = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakMouseOptionButton3\"));\n    SqueakMouseMappings[3][1] = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakMouseControlButton1\"));\n    SqueakMouseMappings[3][2] = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakMouseControlButton2\"));\n    SqueakMouseMappings[3][3] = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakMouseControlButton3\"));\n    SqueakBrowserMouseMappings[0][1] = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakBrowserMouseNoneButton1\"));\n    SqueakBrowserMouseMappings[0][2] = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakBrowserMouseNoneButton2\"));\n    SqueakBrowserMouseMappings[0][3] = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakBrowserMouseNoneButton3\"));\n    SqueakBrowserMouseMappings[1][1] = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakBrowserMouseCmdButton1\"));\n    SqueakBrowserMouseMappings[1][2] = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakBrowserMouseCmdButton2\"));\n    SqueakBrowserMouseMappings[1][3] = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakBrowserMouseCmdButton3\"));\n    SqueakBrowserMouseMappings[2][1] = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakBrowserMouseOptionButton1\"));\n    SqueakBrowserMouseMappings[2][2] = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakBrowserMouseOptionButton2\"));\n    SqueakBrowserMouseMappings[2][3] = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakBrowserMouseOptionButton3\"));\n    SqueakBrowserMouseMappings[3][1] = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakBrowserMouseControlButton1\"));\n    SqueakBrowserMouseMappings[3][2] = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakBrowserMouseControlButton2\"));\n    SqueakBrowserMouseMappings[3][3] = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakBrowserMouseControlButton3\"));\n#if STACKVM\n  { CFNumberRef nStackPagesPref;\n    nStackPagesPref = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakNumStackPages\"));\n    if (nStackPagesPref) {\n\t\textern sqInt desiredNumStackPages;\n        CFNumberGetValue(nStackPagesPref,kCFNumberLongType,(sqInt *)&desiredNumStackPages);\n\t}\n  }\n  { CFNumberRef nEdenBytesPref;\n    nEdenBytesPref = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakEdenBytes\"));\n    if (nEdenBytesPref) {\n\t\textern sqInt desiredEdenBytes;\n        CFNumberGetValue(nEdenBytesPref,kCFNumberLongType,(sqInt *)&desiredEdenBytes);\n\t}\n  }\n#endif /* STACKVM */\n\t\n    if (SqueakVMEncodingType) \n        CFStringGetCString (SqueakVMEncodingType, encoding, 256, kCFStringEncodingMacRoman);\n    else\n        *encoding = 0x00;\n\n    setEncodingType(encoding);\n    \n    if (SqueakHasQuitWithoutSaving)\n        gSqueakHasQuitWithoutSaving = CFBooleanGetValue(SqueakHasQuitWithoutSaving);\n    if (gSqueakImageNameStringRef) \n        CFStringGetCString (gSqueakImageNameStringRef, gSqueakImageName, IMAGE_NAME_SIZE+1, kCFStringEncodingMacRoman);\n\t\n\tif (SqueakUnTrustedDirectoryTypeRef) {\n\t\tcocoInterfaceForTilda(SqueakUnTrustedDirectoryTypeRef, gSqueakUntrustedDirectoryName,PATH_MAX);\n\t}\n\t\n\tif (SqueakTrustedDirectoryTypeRef) {\n\t\n\t\tcocoInterfaceForTilda(SqueakTrustedDirectoryTypeRef, gSqueakTrustedDirectoryName,PATH_MAX);\n\t}\n\t\n    if (SqueakWindowType) \n        CFNumberGetValue(SqueakWindowType,kCFNumberLongType,&gSqueakWindowType);\n    else\n        gSqueakWindowType = kDocumentWindowClass;\n        \n    gSqueakWindowIsFloating = gSqueakWindowType == kUtilityWindowClass;\n        \n    if (SqueakWindowAttributeType && CFDataGetLength(SqueakWindowAttributeType) == 4) {\n            const UInt8 *where;\n            where = CFDataGetBytePtr(SqueakWindowAttributeType);\n            memmove(&gSqueakWindowAttributes,where,4);\n\t\t\tgSqueakWindowAttributes = CFSwapInt32BigToHost(gSqueakWindowAttributes);\n    } else {\n        gSqueakWindowAttributes = kWindowStandardDocumentAttributes\n            +kWindowStandardHandlerAttribute\n            +kWindowNoConstrainAttribute;\n    }\n    \n    if (SqueakPluginsBuiltInOrLocalOnly) \n        gSqueakPluginsBuiltInOrLocalOnly = CFBooleanGetValue(SqueakPluginsBuiltInOrLocalOnly);\n    else \n        gSqueakPluginsBuiltInOrLocalOnly = false;\n        \n    if (SqueakExplicitWindowOpenNeeded) \n        gSqueakExplicitWindowOpenNeeded = CFBooleanGetValue(SqueakExplicitWindowOpenNeeded);\n    else \n        gSqueakExplicitWindowOpenNeeded = false;\n        \n    if (SqueakFloatingWindowGetsFocusType) \n        gSqueakFloatingWindowGetsFocus = CFBooleanGetValue(SqueakFloatingWindowGetsFocusType);\n    else\n        gSqueakFloatingWindowGetsFocus = false;\n\n    if (SqueakWindowHasTitleType) \n        gSqueakWindowHasTitle = CFBooleanGetValue(SqueakWindowHasTitleType);\n    else \n        gSqueakWindowHasTitle = true;\n\n\t\n    for(i=0;i<4;i++)\n\t\tfor(j=1;j<4;j++)\n\t\t\tif (SqueakMouseMappings[i][j]) {\n\t\t\t\tCFNumberGetValue(SqueakMouseMappings[i][j],kCFNumberLongType,(long *) &gSqueakMouseMappings[i][j]);\n\t\t\t\tif (gSqueakMouseMappings[i][j] < 0 || gSqueakMouseMappings[i][j] > 3)\n\t\t\t\t\tgSqueakMouseMappings[i][j] = 0;\n\t\t\t\t}\n\t\t\n    for(i=0;i<4;i++)\n\t\tfor(j=1;j<4;j++)\n\t\t\tif (SqueakBrowserMouseMappings[i][j]) {\n\t\t\t\tCFNumberGetValue(SqueakBrowserMouseMappings[i][j],kCFNumberLongType,(long *) &gSqueakBrowserMouseMappings[i][j]);\n\t\t\t\tif (gSqueakBrowserMouseMappings[i][j] < 0 || gSqueakBrowserMouseMappings[i][j] > 3)\n\t\t\t\t\tgSqueakBrowserMouseMappings[i][j] = 0;\n\t\t\t\t}\n    if (SqueakMaxHeapSizeType) {\n#if SQ_IMAGE64\n        CFNumberGetValue(SqueakMaxHeapSizeType,kCFNumberLongLongType,(sqInt *) &gMaxHeapSize);\n#else\n        CFNumberGetValue(SqueakMaxHeapSizeType,kCFNumberLongType,(sqInt *) &gMaxHeapSize);\n#endif\n\t\t}\n\t\t\n\tif (SqueakUIFlushUseHighPercisionClock)\n        gSqueakUIFlushUseHighPercisionClock = CFBooleanGetValue(SqueakUIFlushUseHighPercisionClock);\n    \n\tif (SqueakUIFlushPrimaryDeferNMilliseconds)\n        CFNumberGetValue(SqueakUIFlushPrimaryDeferNMilliseconds,kCFNumberLongType,(long *) &gSqueakUIFlushPrimaryDeferNMilliseconds);\n    \n\tif (SqueakUIFlushSecondaryCleanupDelayMilliseconds)\n        CFNumberGetValue(SqueakUIFlushSecondaryCleanupDelayMilliseconds,kCFNumberLongType,(long *) &gSqueakUIFlushSecondaryCleanupDelayMilliseconds);\n\n\tif (SqueakUIFlushSecondaryCheckForPossibleNeedEveryNMilliseconds)\n        CFNumberGetValue(SqueakUIFlushSecondaryCheckForPossibleNeedEveryNMilliseconds,kCFNumberLongType,(long *) &gSqueakUIFlushSecondaryCheckForPossibleNeedEveryNMilliseconds);\n    \n\tif (SqueakDebug) \n        CFNumberGetValue(SqueakDebug,kCFNumberLongType,&gSqueakDebug);\n\t\t\n\tif (SqueakQuitOnQuitAppleEvent) \n        gSqueakQuitOnQuitAppleEvent = CFBooleanGetValue(SqueakQuitOnQuitAppleEvent);\n    else\n        gSqueakQuitOnQuitAppleEvent = false;\n\n\n}\n\nvoid cocoInterfaceForTilda(CFStringRef aStringRef, char *buffer,int max_size) {\n   extern SEL NSSelectorFromString(CFStringRef thing);\n   id  autopoolClass = objc_getClass(\"NSAutoreleasePool\");\n   id  autopool;\n   \n\tCFStringRef checkFortilda, selectorRef = CFSTR(\"stringByExpandingTildeInPath\"), \n\t\treleaseRef = CFSTR(\"release\"),\n\t\tallocRef = CFSTR(\"alloc\"), \n\t\tinitRef = CFSTR(\"init\");\n\tSEL selector\t\t=  NSSelectorFromString(selectorRef);\n\tSEL selectorRelease =  NSSelectorFromString(releaseRef);\n\tSEL selectoralloc\t=  NSSelectorFromString(allocRef);\n\tSEL selectorInit\t=  NSSelectorFromString(initRef);\n\n\tautopool = objc_msgSend(autopoolClass, selectoralloc);\n\tautopool = objc_msgSend(autopool, selectorInit);\n\tcheckFortilda=(CFStringRef)objc_msgSend((id)aStringRef,selector);\n\t\tCFStringGetCString (checkFortilda, buffer, max_size, gCurrentVMEncoding);\n\tautopool = objc_msgSend(autopool, selectorRelease);\n\n}\n\n#if COGVM\n/*\n * Support code for Cog.\n * a) Answer whether the C frame pointer is in use, for capture of the C stack\n *    pointers.\n */\n# if defined(i386) || defined(__i386) || defined(__i386__)\n/*\n * Cog has already captured CStackPointer  before calling this routine.  Record\n * the original value, capture the pointers again and determine if CFramePointer\n * lies between the two stack pointers and hence is likely in use.  This is\n * necessary since optimizing C compilers for x86 may use %ebp as a general-\n * purpose register, in which case it must not be captured.\n */\nint\nisCFramePointerInUse()\n{\n\textern unsigned long CStackPointer, CFramePointer;\n\textern void (*ceCaptureCStackPointers)(void);\n\tunsigned long currentCSP = CStackPointer;\n\t\n\tcurrentCSP = CStackPointer;\n\tceCaptureCStackPointers();\n\tassert(CStackPointer < currentCSP);\n\treturn CFramePointer >= CStackPointer && CFramePointer <= currentCSP;\n}\n# endif /* defined(i386) || defined(__i386) || defined(__i386__) */\n#endif /* COGVM */\n\t\t"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacMain.h",
    "content": "/****************************************************************************\n*   PROJECT: Squeak Headers\n*   FILE:    sqMacMain.c\n*   CONTENT: \n*\n*   AUTHOR:  John Maloney, John McIntosh, and others.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacMain.h 1344 2006-03-05 21:07:15Z johnmci $\n*\n*   NOTES: \n*  Feb 22nd, 2002, JMM moved code into 10 other files, see sqMacMain.c for comments\n*  Apr 17th, 2002, JMM os 9 check\n****************************************************************************/\n\n    #include <Carbon/Carbon.h>\n\nvoid SqueakTerminate();\nvoid ExitCleanup();\nchar * GetAttributeString(int id);\nvoid SqueakTerminate();\nvoid ExitCleanup();\nvoid fetchPreferences();  \n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacMemory.c",
    "content": "/****************************************************************************\n*   PROJECT: Mac allocate memory from somewhere for the image\n*   FILE:    sqMacMemory.c\n*   CONTENT: \n*\n*   AUTHOR:  John Maloney, John McIntosh, and others.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacMemory.c 1708 2007-06-10 00:40:04Z johnmci $\n*\n*   NOTES: \n*  Feb 22nd, 2002, JMM moved code into 10 other files, see sqMacMain.c for comments\n*  Mar  8th, 2002, JMM Must unmap view first then free.\n*  3.2.8b1 July 24th, 2002 JMM support for os-x plugin under IE 5.x\n*  3.5.1b5 June 25th, 2003 JMM get memory upper limit from os-x user preferences\n 3.8.11b1 Mar 4th, 2006 JMM refactor, cleanup and add headless support\n*\t3.8.14b1 Oct\t,2006 JMM browser rewrite\n\n*****************************************************************************/\n\n#include \"sq.h\" \n#include \"sqMacMemory.h\"\n#include \"sqMacMain.h\"\n\n#include <sys/mman.h>\n#include <unistd.h>\n\nextern usqInt  gMaxHeapSize;\nstatic usqInt\tgHeapSize;\nvoid *mmapWasAt;\n\n/* compute the desired memory allocation */\n\nstatic usqInt\tmemoryAllocationBase;\nstatic int\t    pageSize = 0;\nstatic unsigned int pageMask = 0;\n\nusqInt\tsqGetAvailableMemory() {\n\n\tsqInt \tavailableMemory;\n\t\n\tavailableMemory = gMaxHeapSize;\n\n\t/******\n\t  Note: \t    \n\t    For os-x this doesn't matter we just mmap 512MB for the image, and \n\t    the application allocates more out of the 4GB address for VM logic. \n\t******/\n\n\treturn availableMemory;\n}\n\nusqInt sqAllocateMemoryMac(sqInt minHeapSize, sqInt *desiredHeapSize) {\n    void * debug, *actually;\n\t#pragma unused(minHeapSize,desiredHeapSize)\n     \n\tpageSize= getpagesize();\n\tpageMask= ~(pageSize - 1);\n    gHeapSize = gMaxHeapSize;\n    debug = mmap( NULL, gMaxHeapSize+pageSize, PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED,-1,0);\n    //debug = mmap( /*2147483648U-512*1024*1024*/\n\t//\t\t\t3221225472U, gMaxHeapSize+pageSize , PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED,-1,0);\n\t\n    if(debug == MAP_FAILED)\n        return 0;\n\tmmapWasAt = debug;\n\tactually = debug+pageSize-1;\n\tactually = (void*) (((usqInt) actually) & pageMask);\n\t\n\treturn memoryAllocationBase = (usqInt) actually;\n}\n\nsqInt sqGrowMemoryBy(sqInt memoryLimit, sqInt delta) {\n    if ((usqInt) memoryLimit + (usqInt) delta - memoryAllocationBase > gMaxHeapSize)\n        return memoryLimit;\n   \n    gHeapSize += delta;\n    return memoryLimit + delta;\n}\n\nsqInt sqShrinkMemoryBy(sqInt memoryLimit, sqInt delta) {\n    return sqGrowMemoryBy(memoryLimit,0-delta);\n}\n\nsqInt sqMemoryExtraBytesLeft(int flag) {\n    return (flag) ? gMaxHeapSize - gHeapSize : 0;\n}\n\nvoid sqMacMemoryFree() {\n\tif (memoryAllocationBase == nil) \n\t\treturn;\n\tif (munmap((void *)memoryAllocationBase,gMaxHeapSize+pageSize))\n\t\tperror(\"munmap\");\n\tmemoryAllocationBase = nil;\n}\n\n#if COGVM\n# define roundDownToPageBoundary(v) ((v)&pageMask)\n# define roundUpToPageBoundary(v) (((v)+pageSize-1)&pageMask)\nvoid\nsqMakeMemoryExecutableFromTo(unsigned long startAddr, unsigned long endAddr)\n{\n\tunsigned long firstPage = roundDownToPageBoundary(startAddr);\n\tif (mprotect((void *)firstPage,\n\t\t\t\t roundUpToPageBoundary(endAddr - firstPage),\n\t\t\t\t PROT_READ | PROT_WRITE | PROT_EXEC) < 0)\n\t\tperror(\"mprotect(x,y,PROT_READ | PROT_WRITE | PROT_EXEC)\");\n}\n\nvoid\nsqMakeMemoryNotExecutableFromTo(unsigned long startAddr, unsigned long endAddr)\n{\n\tunsigned long firstPage = roundDownToPageBoundary(startAddr);\n\t/* We get EACCESS on 10.6.3 when trying to disable exec perm; Why? */\n\tif (mprotect((void *)firstPage,\n\t\t\t\t roundUpToPageBoundary(endAddr - firstPage),\n\t\t\t\t PROT_READ | PROT_WRITE) < 0\n\t && errno != EACCES)\n\t\tperror(\"mprotect(x,y,PROT_READ | PROT_WRITE)\");\n}\n#endif /* COGVM */\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacMemory.h",
    "content": "/****************************************************************************\n*   PROJECT: Squeak Headers\n*   FILE:    sqMacMemory.c\n*   CONTENT: \n*\n*   AUTHOR:  John Maloney, John McIntosh, and others.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacMemory.h 1708 2007-06-10 00:40:04Z johnmci $\n*\n*   NOTES: \n*  Feb 22nd, 2002, JMM moved code into 10 other files, see sqMacMain.c for comments\n*  Mar 1st, 2002, JMM cleanup a bit. \n****************************************************************************/\n\n    #include <Carbon/Carbon.h>\n\nusqInt\tsqGetAvailableMemory(void);\nvoid sqMacMemoryFree(void);"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacNSPlugin.c",
    "content": "/****************************************************************************\n*   PROJECT: Mac window, memory, keyboard interface for netscape plugin logic\n*   FILE:    sqMacNSPlugin.c\n*   CONTENT: \n*\n*   AUTHOR:  John Maloney, John McIntosh, and others.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacNSPlugin.c 1386 2006-03-27 15:22:08Z johnmci $\n*\n*   NOTES: See change log below.\n*\t1/4/2002   JMM Some carbon cleanup\n*\n*****************************************************************************/\n/********** Notes on Browser Plugin VM ************\nHow it Works:\n\nThe browser plugin VM allows Squeak to be run as a plug-in under\nversion 4.0 and later of either Netscape Navigator or Internet Explorer.\nTo use it, you must translate a version of interp.c with the browser plugin\nhooks. \n\nNote for fullscreen support NPP_HandleEvent does not return control, it consumes \nevents from waitnextevent. When fullscreen mode is turn off then control is \nreturned to the browser.\n\nRelationship of this file to sqMacWindow.c:\n\nOne can think of this file as specializing and extending sqMacWindow.c\nfor running within a browser. Certain methods in  sqMacWindow.c are\nreplaced by functions defined here. The originals are removed from\nsqMacWindow.c by defining the BROWSERPLUGIN flag in that file when compiling.\nHere is a list of the functions overridden:\n\n\tioExit()\n\tioScreenSize()\n\tioSetFullScreen()\n\nIn addition, ioProcessEvents() becomes a noop and main() is completely\nomitted when sqMacWindow.c is compiled for use in the browser plugin VM.\n\n Thing busted 2000 July 26th\n squeak quit restart has issues with change file open\n \n\nJune/July 2000 johnmci@smalltalkconsulting.com Reviewed code readded comments, added FullScreen Support\n\t\t\t\tfixed issues with Carbon, general code cleaning.\n\nSept 27th 2000 johnmci@smalltalkconsulting.com added logic to have more flexibility in memory size.\n\t\t\t\tFix issue with volume ID, don't use 0\n\t\t\t\tFix issue were IE lies about the frame size as it figures out the frame size in real time durning rendering\n\t\t\t\tAdded check for file: in URL logic to disallow\n\t\t\t\tFixed problem in NPP_URLNotify, must call notify complete logic\n\t\t\t\tEnsure NP_memFree is called for plugin arguments\n\t\t\t\tAdd logic for URLPosting\nFeb 8th 2001    johnmci@smalltalkconsulting.com Rewrote to use Apple multithreaded library and ported Squeak VM 3.0\nFeb 26th 2001   JMM, allocate from application heap if we can do it, fix issue with null event not tracking button state.\nMar 23rd 2001   JMM, start interpreter when we get setwindow to fix netscape race condition\nApri 5th 2001   JMM 3.0.11, use checkForModifierKeys logic versus feb 26th eventAvail hack, watch button too.\nApril 27th 2001 JMM 3.0.14, posturl gets nil versus empty char for window name.\nApril 30th 2001 JMM 3.0.15, window is nil, if so make post work correctly, fix issue with post failure too\nMay 16th 2001\tJMM 3.0.19, fix broken 3.0.17 for netscape, fixed set/restore port logic, obey plugin size hints \nMay 27th 2001\tJMM 3.0.22, fix bug in mailto: string size, added logic to deal with back behavior in IE to avoid crashes.\nJun \t 2001\tJMM 3.0.23, added seteventhook logic to enable HW acceleration plugin to get notification of events\nAug      2001\tJMM 3.0.24  rework of security logic, remove explicit call \nMay\t     2002   JMM 3.2.7b1 Ok lets see if the sucker will compile again\n 3.7.0bx Nov 24th, 2003 JMM gCurrentVMEncoding\n July 31st, 2004 JMM 3.7.4b2 Add imageName and URL redirection. \nMarch\t2005\tJMM 3.7.6\tAdd host window support\n**********/\n\n#include \"sq.h\"\n#include \"sqMacUIEvents.h\"\n#include \"sqMacFileLogic.h\"\n#include \"FilePlugin.h\"\n#include \"sqMacTime.h\"\n#include \"npapi.h\"\n#include \"sqMacUIConstants.h\"\n#include \"sqMacImageIO.h\"\n#include \"sqMacEncoding.h\"\n#include \"sqMacMemory.h\"\n#include \"sqMacWindow.h\"\n#include \"sqMacHostWindow.h\"\n\n#include <pthread.h>\n\n/********** Compilation Options:\n*\n*\tENABLE_URL_FETCH\n*\t  Define this to compile primitives to fetch URL's via the browser.\n*\n*\t  Warning: Fetching file URL's through the URL fetch mechanism allows\n*\t  potentially untrusted code to read files outside of the Squeak\n*\t  file system \"sandbox\", a serious breach of privacy. \n*\t  There are few uses for use for the browser URL fetch\n*\t  mechanism, since you can always fetch URL's from remote servers\n*\t  using Squeak's own HTTPSocket.\n*\n**********/\n#ifdef SOPHIEVM\n#define IMAGE_NAME \"sophie.image\"\n#else\n#define IMAGE_NAME \"SqueakPlugin.image\"\n#endif\n/*** Exported Primitives ***/\n\nint primitivePluginBrowserReady(void);\n\n#ifdef ENABLE_URL_FETCH\nint primitivePluginDestroyRequest(void);\nint primitivePluginRequestFileHandle(void);\nint primitivePluginRequestState(void);\nint primitivePluginRequestURL(void);\nint primitivePluginRequestURLStream(void);\nint primitivePluginPostURL(void);\n#endif\n\n/* Constants */\n\n#define MAX_STRING_LENGTH 1000\n#define MAX_ARG_STRING_LENGTH 100\n#define STATUS_BAD_HANDLE -1\n#define STATUS_IDLE 0\n#define STATUS_IN_PROGRESS 1\n#define STATUS_FAILED 2\n#define STATUS_SUCCEEDED 3\n\n//#define PLUGIN_TRACE 1\n\n#if PLUGIN_TRACE\n//int printOnOSXPascal(unsigned char *msg);\n//#define PLUGINDEBUGSTR(msg) printOnOSXPascal(msg);\n#define PLUGINDEBUGSTR(msg)\t\tDebugStr(msg)\n#else\n#define PLUGINDEBUGSTR\n#endif\n\nNPError Mac_NPP_SetWindow(NPP instance, NPWindow* window);\nint16 Mac_NPP_HandleEvent(NPP instance, void *rawEvent);\n\n/*** Imported Variables ***/\n\nextern unsigned char *memory;\nextern struct VirtualMachine *interpreterProxy;\nextern int windowActive;\n\n/*** Local Variables ***/\n\nint\t\t\texitRequested\t= false;\nint\t\t\tpluginArgCount\t= 0;\nchar\t\t*pluginArgName[MAX_ARG_STRING_LENGTH];\nchar\t\t*pluginArgValue[MAX_ARG_STRING_LENGTH];\nchar\t\tsqueakPluginImageName[IMAGE_NAME_SIZE+1] = IMAGE_NAME;\nchar\t\tfailureURL[1024] = \"\";\nNPP\t\t\tthisInstance\t= nil;\nchar        rememberMemoryString[128]=\"\";\n\n#define URL_REQUEST_COUNT 100\n\ntypedef struct {\n\tint id;  /* used to associate a request with its outcome */\n\tint status;\n\tint semaIndex;\n\tchar fileName[MAX_STRING_LENGTH + 1];\n\tchar *buffer;\n} URLRequestRecord;\n\nURLRequestRecord urlRequests[URL_REQUEST_COUNT];\nint nextRequestID = 1;\n\nint  CaseInsensitiveMatch(char *s1, char *s2);\nvoid ExitCleanup(void);\nint  FindIdleURLRequest(void);\nint  InitFilePathsViaDomain(SInt16 domain);\nvoid InitURLRequestTable(void);\nint  IsPrefixedBy(char *s, char *prefix);\nvoid OpenFileReadOnly(SQFile *f, char *fileName);\nvoid ReadSqueakImage(void);\nint  StringToInteger(char *s);\nvoid URLRequestCompleted(int notifyData, const char* fileName);\nint  URLRequestCreate(char *url, char *target, int semaIndex);\nvoid URLRequestDestroy(int requestHandle);\nvoid URLRequestFailed(int notifyData, int reason);\nchar * URLRequestFileName(int requestHandle);\nint  URLRequestStatus(int requestHandle);\nint AbortIfFileURL(char *url);\nint URLPostCreate(char *url, char *buffer, char * window,int semaIndex);\nvoid GetTempFSSpec(FSSpec *spec,FSRef *theFSRef);\n\n\n/*** Initialize/Shutdown ***/\n\n/*+++++++++++++++++++++++++++++++++++++++++++++++++\n * NPP_Initialize:\n * Provides global initialization for a plug-in, and returns an error value. \n *\n * This function is called once when a plug-in is loaded, before the first instance\n * is created. Allocate any memory or resources shared by all\n * instances of your plug-in at this time. After the last instance has been deleted,\n * NPP_Shutdown will be called, where you can release any memory or\n * resources allocated by NPP_Initialize. \n +++++++++++++++++++++++++++++++++++++++++++++++++*/\nNPError NPP_Initialize(void) {\n\texitRequested = false;\n\tpluginArgCount = 0;\n\tthisInstance = nil;\n\tInitURLRequestTable();\n\treturn NPERR_NO_ERROR;\n}\n\n/*+++++++++++++++++++++++++++++++++++++++++++++++++\n * NPP_GetJavaClass:\n * New in Netscape Navigator 3.0. \n *\n * NPP_GetJavaClass is called during initialization to ask your plugin\n * what its associated Java class is. If you don't have one, just return\n * NULL. \n +++++++++++++++++++++++++++++++++++++++++++++++++*/\njref\nNPP_GetJavaClass(void)\n{\n\treturn (jref) NULL;\n}\n\n/*+++++++++++++++++++++++++++++++++++++++++++++++++\n * NPP_Shutdown:\n * Provides global deinitialization for a plug-in. \n * \n * This function is called once after the last instance of your plug-in is destroyed.\n * Use this function to release any memory or resources shared across all\n * instances of your plug-in. \n +++++++++++++++++++++++++++++++++++++++++++++++++*/\n\nvoid NPP_Shutdown(void) {\n\texitRequested = true;\n\tExitCleanup();\n}\n\n/*** Instance Create/Destroy ***/\n/*+++++++++++++++++++++++++++++++++++++++++++++++++\n * NPP_New:\n * Creates a new instance of a plug-in and returns an error value. \n * \n * NPP_New creates a new instance of your plug-in with MIME type specified\n * by pluginType. The parameter mode is NP_EMBED if the instance was created\n * by an EMBED tag, or NP_FULL if the instance was created by a separate file.\n * You can allocate any instance-specific private data in instance->pdata at this\n * time. The NPP pointer is valid until the instance is destroyed. \n +++++++++++++++++++++++++++++++++++++++++++++++++*/\n\nNPError NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode,\n  int16 argc, char* argn[], char* argv[], NPSavedData* saved) {\n\tint i;\n\n\t/* only one Squeak instance can be active at a time */\n\tif (thisInstance != nil) return NPERR_GENERIC_ERROR;\n\n\tfor (i = 0; i < MAX_ARG_STRING_LENGTH; i++) {\n\t\tpluginArgName[i] = pluginArgValue[i] = \"\";\n\t}\n\n\t/* record plugin arguments */\n\tpluginArgCount = argc;\n\tfor (i = 0; (i < argc) && (i < MAX_ARG_STRING_LENGTH); i++) {\n\t\tpluginArgName[i] = (char *) NPN_MemAlloc(strlen(argn[i]) + 1);\n\t\tstrcpy(pluginArgName[i], argn[i]);\n\t\tpluginArgValue[i] = (char *) NPN_MemAlloc(strlen(argv[i]) + 1);\n\t\tstrcpy(pluginArgValue[i], argv[i]);\n\t\tif (CaseInsensitiveMatch(pluginArgName[i], \"imagename\")) {\n\t\t\tstrcpy(squeakPluginImageName,pluginArgValue[i]);\n\t\t}\n\t\tif (CaseInsensitiveMatch(pluginArgName[i], \"failureurl\")) {\n\t\t\tstrcpy(failureURL,pluginArgValue[i]);\n\t\t}\n\t\tif (CaseInsensitiveMatch(pluginArgName[i], \"memory\")) {\n\t\t\tstrcpy(rememberMemoryString,pluginArgValue[i]);\n\t\t}\n\t}\n\n\tmemory = nil;\n\tthisInstance = instance;\n\twindowActive = 1;\n\tReadSqueakImage();\n\tif (!memory) return NPERR_GENERIC_ERROR;\t\n\t\n\treturn NPERR_NO_ERROR;\n}\n\n/*+++++++++++++++++++++++++++++++++++++++++++++++++\n * NPP_Destroy:\n * Deletes a specific instance of a plug-in and returns an error value. \n\n * NPP_Destroy is called when a plug-in instance is deleted, typically because the\n * user has left the page containing the instance, closed the window, or quit the\n * application. You should delete any private instance-specific information stored\n * in instance->pdata. If the instance being deleted is the last instance created\n * by your plug-in, NPP_Shutdown will subsequently be called, where you can\n * delete any data allocated in NPP_Initialize to be shared by all your plug-in's\n * instances. Note that you should not perform any graphics operations in\n * NPP_Destroy as the instance's window is no longer guaranteed to be valid. \n +++++++++++++++++++++++++++++++++++++++++++++++++*/\nNPError NPP_Destroy(NPP instance, NPSavedData** save) {\n\t\n\n\texitRequested = true;\n\tExitCleanup();\n\treturn NPERR_NO_ERROR;\n}\n\n/*+++++++++++++++++++++++++++++++++++++++++++++++++\n * NPP_SetWindow:\n * Sets the window in which a plug-in draws, and returns an error value. \n * \n * NPP_SetWindow informs the plug-in instance specified by instance of the\n * the window denoted by window in which the instance draws. This NPWindow\n * pointer is valid for the life of the instance, or until NPP_SetWindow is called\n * again with a different value. Subsequent calls to NPP_SetWindow for a given\n * instance typically indicate that the window has been resized. If either window\n * or window->window are NULL, the plug-in must not perform any additional\n * graphics operations on the window and should free any resources associated\n * with the window. \n +++++++++++++++++++++++++++++++++++++++++++++++++*/\nNPError NPP_SetWindow(NPP instance, NPWindow* window) {\n\treturn Mac_NPP_SetWindow(instance,window);\n}\n\n/*** Streaming ***/\n\n/*+++++++++++++++++++++++++++++++++++++++++++++++++\n * NPP_NewStream:\n * Notifies an instance of a new data stream and returns an error value. \n * \n * NPP_NewStream notifies the instance denoted by instance of the creation of\n * a new stream specifed by stream. The NPStream* pointer is valid until the\n * stream is destroyed. The MIME type of the stream is provided by the\n * parameter type. \n +++++++++++++++++++++++++++++++++++++++++++++++++*/\nNPError NPP_NewStream(\n  NPP instance, NPMIMEType type,\n  NPStream *stream, NPBool seekable, uint16 *stype) {\n  /* Call to load the initial URL and to handle explicit URL fetch requests. */\n\n\t*stype = NP_ASFILEONLY;  /* ask Netscape to cache file and call NPP_StreamAsFile */\n\treturn NPERR_NO_ERROR;\n}\n\n/*+++++++++++++++++++++++++++++++++++++++++++++++++\n * NPP_DestroyStream:\n * Indicates the closure and deletion of a stream, and returns an error value. \n * \n * The NPP_DestroyStream function is called when the stream identified by\n * stream for the plug-in instance denoted by instance will be destroyed. You\n * should delete any private data allocated in stream->pdata at this time. \n +++++++++++++++++++++++++++++++++++++++++++++++++*/\nNPError NPP_DestroyStream(NPP instance, NPStream *stream, NPError reason) {\n\treturn NPERR_NO_ERROR;\n}\n\n/*+++++++++++++++++++++++++++++++++++++++++++++++++\n * NPP_StreamAsFile:\n * Provides a local file name for the data from a stream. \n * \n * NPP_StreamAsFile provides the instance with a full path to a local file,\n * identified by fname, for the stream specified by stream. NPP_StreamAsFile is\n * called as a result of the plug-in requesting mode NP_ASFILEONLY or\n * NP_ASFILE in a previous call to NPP_NewStream. If an error occurs while\n * retrieving the data or writing the file, fname may be NULL. \n +++++++++++++++++++++++++++++++++++++++++++++++++*/\nvoid NPP_StreamAsFile(NPP instance, NPStream *stream, const char* fname) {\n\tint handle = ((int) stream->notifyData) & 0xFF;\n\t\n\tif (fname != null) {\n\t\tif ((handle < 0) || (handle >= URL_REQUEST_COUNT)) {\n\t\t\treturn;\n\t\t}\n\t\tif (urlRequests[handle].id == (((int) stream->notifyData) >> 8)) {\n\t\t\tif (fname != null) \n\t\t\t    strncpy(urlRequests[handle].fileName, fname, MAX_STRING_LENGTH);\n\t\t}\n\t} else {\n\t\turlRequests[handle].status = STATUS_FAILED;\n\t}\n}\n\n\n/*+++++++++++++++++++++++++++++++++++++++++++++++++\n * NPP_WriteReady:\n * Returns the maximum number of bytes that an instance is prepared to accept\n * from the stream. \n * \n * NPP_WriteReady determines the maximum number of bytes that the\n * instance will consume from the stream in a subsequent call NPP_Write. This\n * function allows Netscape to only send as much data to the instance as the\n * instance is capable of handling at a time, allowing more efficient use of\n * resources within both Netscape and the plug-in. \n +++++++++++++++++++++++++++++++++++++++++++++++++*/\nint32 NPP_WriteReady(NPP instance, NPStream *stream) {\n  /* not used, because we use ASFILEONLY mode */\n\n\treturn 100000;\n}\n\n/*+++++++++++++++++++++++++++++++++++++++++++++++++\n * NPP_Write:\n * Delivers data from a stream and returns the number of bytes written. \n * \n * NPP_Write is called after a call to NPP_NewStream in which the plug-in\n * requested a normal-mode stream, in which the data in the stream is delivered\n * progressively over a series of calls to NPP_WriteReady and NPP_Write. The\n * function delivers a buffer buf of len bytes of data from the stream identified\n * by stream to the instance. The parameter offset is the logical position of\n * buf from the beginning of the data in the stream. \n * \n * The function returns the number of bytes written (consumed by the instance).\n * A negative return value causes an error on the stream, which will\n * subsequently be destroyed via a call to NPP_DestroyStream. \n * \n * Note that a plug-in must consume at least as many bytes as it indicated in the\n * preceeding NPP_WriteReady call. All data consumed must be either processed\n * immediately or copied to memory allocated by the plug-in: the buf parameter\n * is not persistent. \n +++++++++++++++++++++++++++++++++++++++++++++++++*/\nint32 NPP_Write(NPP instance, NPStream *stream, int32 offset, int32 len, void *buffer) {\n  /* not used, because we use ASFILEONLY mode */\n\n\treturn len;\n}\n\n/*+++++++++++++++++++++++++++++++++++++++++++++++++\n * NPP_URLNotify:\n * Notifies the instance of the completion of a URL request. \n * \n * NPP_URLNotify is called when Netscape completes a NPN_GetURLNotify or\n * NPN_PostURLNotify request, to inform the plug-in that the request,\n * identified by url, has completed for the reason specified by reason. The most\n * common reason code is NPRES_DONE, indicating simply that the request\n * completed normally. Other possible reason codes are NPRES_USER_BREAK,\n * indicating that the request was halted due to a user action (for example,\n * clicking the \"Stop\" button), and NPRES_NETWORK_ERR, indicating that the\n * request could not be completed (for example, because the URL could not be\n * found). The complete list of reason codes is found in npapi.h. \n * \n * The parameter notifyData is the same plug-in-private value passed as an\n * argument to the corresponding NPN_GetURLNotify or NPN_PostURLNotify\n * call, and can be used by your plug-in to uniquely identify the request. \n +++++++++++++++++++++++++++++++++++++++++++++++++*/\nvoid NPP_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData) {\n\t/*if (reason != NPRES_DONE) \n\t\tURLRequestFailed((int) notifyData, reason);\n\telse*/\n\t\t\n\t\tURLRequestCompleted((int) notifyData, null);\n\n}\n\n/*** Printing ***/\n\nvoid NPP_Print(NPP instance, NPPrint* printInfo) {\n\t/* printing is not supported */\n}\n\n/*** Event Handling ***/\n\n/*+++++++++++++++++++++++++++++++++++++++++++++++++\n * NPP_HandleEvent:\n * Mac-only, but stub must be present for Windows\n * Delivers a platform-specific event to the instance. \n * \n * On the Macintosh, event is a pointer to a standard Macintosh EventRecord.\n * All standard event types are passed to the instance as appropriate. In general,\n * return TRUE if you handle the event and FALSE if you ignore the event. \n * Note special logic for full screen support\n +++++++++++++++++++++++++++++++++++++++++++++++++*/\n\nint16 NPP_HandleEvent(NPP instance, void *rawEvent) {\n\treturn Mac_NPP_HandleEvent(instance,rawEvent);\n}\n\n\n/*** URL Requests ***/\nint\tCFNetworkGoGetURL(NPP instance, const char* url, const char* window, void* notifyData);\n\nint URLRequestCreate(char *url, char *target, int semaIndex) {\n  /* Start a URL request and return its index. Return -1 if there were\n     no idle request handles. */\n\n\tint handle, notifyData;\n    char mail[8];\n    NPError err;\n    \n    if (thisInstance == null) return -1;\n    handle = FindIdleURLRequest();\n    if (handle < 0) return handle;\n    \n\turlRequests[handle].id = nextRequestID++;\n\turlRequests[handle].status = STATUS_IN_PROGRESS;\n\turlRequests[handle].semaIndex = semaIndex;\n\turlRequests[handle].buffer = null;\n\n\tnotifyData = (urlRequests[handle].id << 8) + handle;\n\tstrncpy(mail,url,7);\n\tmail[7] = 0x00;\n\terr = CFNetworkGoGetURL(thisInstance, url, target, (void *) notifyData);\n\n\treturn handle;\n}\n\nint URLPostCreate(char *url, char *buffer, char * window,int semaIndex) {\n  /* Start a URL request and return its index. Return -1 if there were\n     no idle request handles. */\n\n\tint handle, notifyData;\n\t\n\tif (thisInstance == null) return -1;\n\thandle = FindIdleURLRequest();\n\tif (handle < 0) return handle;\n\turlRequests[handle].id = nextRequestID++;\n\turlRequests[handle].status = STATUS_IN_PROGRESS;\n\turlRequests[handle].semaIndex = semaIndex;\n\turlRequests[handle].buffer = buffer;\n\n\tnotifyData = (urlRequests[handle].id << 8) + handle;\n        {\n        OSStatus\t\tstatus; //kURLDisplayProgressFlag\n        URLState                currentState;\n        URLReference            URLRef;\n        FSRef\t\t\t\t\ttheFSRef;\n\t\t\n        status = URLNewReference(url, &URLRef);\n        if (status == noErr) {\n            FSSpec        tempFileSpec;\n            char fileName[MAX_STRING_LENGTH + 1];\n            \n             // The URLSetProperty function enables you to set those property values identified by the following\n            // constants: kURLPassword, kURLUserName, kURLPassword, kURLHTTPRequestMethod, kURLHTTPRequestHeader,\n            // kURLHTTPRequestBody, and kURLHTTPUserAgent.\n            URLSetProperty(URLRef, kURLHTTPRequestMethod, \"POST\", 4);\n            URLSetProperty(URLRef, kURLHTTPRequestBody, buffer, strlen(buffer));\n            GetTempFSSpec(&tempFileSpec,&theFSRef);\n            status = URLOpen(URLRef, &tempFileSpec, 0, NULL, 0, NULL);\n            currentState = kURLNullState;\n            while (status == noErr && !(currentState == kURLCompletedState || currentState == kURLErrorOccurredState)){\n                URLIdle();\n                status = URLGetCurrentState (URLRef, &currentState);\n            }\n            URLGetError(URLRef,&status);\n            URLDisposeReference(URLRef);\n            if (status != noErr) \n                return -1;\n\t\t\tPathToFileViaFSRef(fileName, MAX_STRING_LENGTH, &theFSRef,gCurrentVMEncoding);\n            URLRequestCompleted(notifyData, fileName);\n        } else\n            return -1;\n        }\n        \t\n\treturn handle;\n}\n\nvoid URLRequestDestroy(int requestHandle) {\n  /* Clear the url request with the given handle. */\n\n\tif ((requestHandle < 0) || (requestHandle >= URL_REQUEST_COUNT)) {\n\t\treturn;\n\t}\n\turlRequests[requestHandle].id = 0;\n\turlRequests[requestHandle].status = STATUS_IDLE;\n\turlRequests[requestHandle].semaIndex = 0;\n        \n        if (urlRequests[requestHandle].fileName[0] != 0) {\n            sqFileDeleteNameSize((char *) &urlRequests[requestHandle].fileName, strlen(urlRequests[requestHandle].fileName));\n            urlRequests[requestHandle].fileName[0] = 0x00;\n        }\n        \n\turlRequests[requestHandle].fileName[0] = 0;\n\turlRequests[requestHandle].buffer = null;\n\n}\n\nchar * URLRequestFileName(int requestHandle) {\n  /* Return the filename associated with the url request with the given\n     handle. Return null if the request status is not STATUS_SUCCEEDED. */\n\n\tif ((requestHandle < 0) ||\n\t\t(requestHandle >= URL_REQUEST_COUNT) ||\n\t\t(urlRequests[requestHandle].status != STATUS_SUCCEEDED)) {\n\t\t\treturn null;\n\t}\n\n\treturn urlRequests[requestHandle].fileName;\n}\n\nint URLRequestStatus(int requestHandle) {\n  /* Return the status of the url request with the given handle. */\n\n\tif ((requestHandle < 0) ||\n\t\t(requestHandle >= URL_REQUEST_COUNT) ||\n\t\t(urlRequests[requestHandle].status < STATUS_IN_PROGRESS)) {\n\t\t\treturn STATUS_BAD_HANDLE;\n\t}\n\treturn urlRequests[requestHandle].status;\n}\n\nint FindIdleURLRequest(void) {\n  /* Return the index of an idle request or -1 if there are none. */\n\tint i;\n\n\tfor (i = 0; i < URL_REQUEST_COUNT; i++) {\n\t\tif (urlRequests[i].status == STATUS_IDLE) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n}\n\nvoid URLRequestCompleted(int notifyData, const char* fileName) {\n  /* Record that the given request has completed, caching the result in\n     the given file name. */\n\n\tint handle = notifyData & 0xFF;\n\n\tif ((handle < 0) || (handle >= URL_REQUEST_COUNT)) {\n\t\treturn;\n\t}\n\tif (urlRequests[handle].id == (notifyData >> 8)) {\n                if (fileName != null) {\n\t\t    strncpy(urlRequests[handle].fileName, fileName, MAX_STRING_LENGTH);\n                }\n\t\tif (urlRequests[handle].buffer != null) {\n\t\t\tNPN_MemFree(urlRequests[handle].buffer);\n\t\t\turlRequests[handle].buffer = null;\n\t\t}\n\t\tif (urlRequests[handle].status != STATUS_SUCCEEDED) {\n\t\t\tif (urlRequests[handle].status != STATUS_FAILED) {\n\t\t\t\tPLUGINDEBUGSTR(\"\\pRequest marked Succeeded;g;\");\n\t\t\t\turlRequests[handle].status = STATUS_SUCCEEDED;\n\t\t\t}\n\t\t\tif (urlRequests[handle].status == STATUS_FAILED) {\n\t\t\t\tPLUGINDEBUGSTR(\"\\pRequest marked Failed;g;\");\n\t\t\t}\n\t\t\tsignalSemaphoreWithIndex(urlRequests[handle].semaIndex);\n\t\t}\n\t}\n}\n\nvoid URLRequestFailed(int notifyData, int reason) {\n  /* Record that the given URL request failed. */\n\n\tint handle = notifyData & 0xFF;\n\n\tif ((handle < 0) || (handle >= URL_REQUEST_COUNT)) {\n\t\treturn;\n\t}\n\tif (urlRequests[handle].id == (notifyData >> 8)) {\n\t\tif (urlRequests[handle].buffer != null) {\n\t\t\tNPN_MemFree(urlRequests[handle].buffer);\n\t\t\turlRequests[handle].buffer = null;\n\t\t}\n\t\t/* Note: For local files, we're informed that there was a network\n\t\t   error (but only after NPP_StreamAsFile has reported success).\n\t\t   We could allow local files to be read through the URL request\n\t\t   mechanism but NOT failing here if the status has already been\n\t\t   set to success. But we don't want to allow the URL mechanism\n\t\t   to be used as a loophole to read files outside the sandbox, so\n\t\t   we let this fail. */\n\t\tif (urlRequests[handle].status != STATUS_SUCCEEDED) {\n\t\t\tPLUGINDEBUGSTR(\"\\pRequest marked Failed;g;\");\n\t\t\turlRequests[handle].status = STATUS_FAILED;\n\t\t\tsignalSemaphoreWithIndex(urlRequests[handle].semaIndex);\n\t\t}\n\t}\n}\n\nvoid InitURLRequestTable(void) {\n  /* Initialize the table of URL requests. */\n\tint i;\n\n\tfor (i = 0; i < URL_REQUEST_COUNT; i++) {\n\t\tURLRequestDestroy(i);\n\t}\n\tnextRequestID = 1;\n}\n\n/*** Optional URL Fetch Primitives ***/\n#ifdef ENABLE_URL_FETCH\nint\tCFNetworkGoGetURL(NPP instance, const char* url, const char* window, void* notifyData)\n{\n    OSStatus error;\n    FSSpec  tempFileSpec;\n\tFSRef\ttheFSRef;\n    char fileName[MAX_STRING_LENGTH + 1];\n    \n    GetTempFSSpec(&tempFileSpec,&theFSRef);\n    error = URLSimpleDownload (url,&tempFileSpec,NULL,kURLReplaceExistingFlag,NULL,notifyData);\n\tPathToFileViaFSRef(fileName, MAX_STRING_LENGTH,&theFSRef,gCurrentVMEncoding);\ndone:\n    URLRequestCompleted((int) notifyData, fileName);\n\treturn 0;\n}\n\nvoid GetTempFSSpec(FSSpec *spec,FSRef *theFSRef) {\n    char tempName[DOCUMENT_NAME_SIZE+1];\n    CFURLRef    sillyThing;\n    CFStringRef filePath;\n\tOSErr\terr;\n\tFILE\t*file;\n\t\n\t/* find and open a file */\n\t\n    strcpy(tempName,tmpnam(0));\n    file = fopen(tempName,\"w\");\n\tfclose(file);\n\t\n    filePath = CFStringCreateWithBytes(kCFAllocatorDefault,(UInt8 *) tempName,strlen(tempName),kCFStringEncodingUTF8,false);\n    sillyThing = CFURLCreateWithFileSystemPath (kCFAllocatorDefault,filePath,kCFURLPOSIXPathStyle,false);\n    CFRelease(filePath);\n\tCFURLGetFSRef(sillyThing, theFSRef);\n    CFRelease(sillyThing);\n    err = FSGetCatalogInfo (theFSRef,kFSCatInfoNone,nil,nil,spec,nil);\n}\n\nint primitivePluginDestroyRequest(void) {\n\t/* Args: handle.\n\t   Destroy the given request. */\n\n\tint handle;\n\n\tPLUGINDEBUGSTR(\"\\pPrimitiveCallDestroyRequest;g;\");\n\thandle = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tURLRequestDestroy(handle);\n\tinterpreterProxy->pop(1);\n\treturn 0;\n}\n\nint primitivePluginRequestFileHandle(void) {\n\t/* Args: handle.\n\t   Return a file handle for the completed request. Fail if\n\t   the request handle is not valid or hasn't successfully completed. */\n\n\tint handle, fileObj;\n\tchar *fileName;\n\tSQFile *filePtr;\n\n\tPLUGINDEBUGSTR(\"\\pPrimitiveCallRequestFileHandle;g;\");\n\thandle = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\n\tfileName = URLRequestFileName(handle);\n\tif (fileName == null) {\n\t\tinterpreterProxy->success(false);\n\t\treturn null;\n\t}\n\n\tfileObj = interpreterProxy->instantiateClassindexableSize(\n\t\tinterpreterProxy->classByteArray(), sizeof(SQFile));\n\tfilePtr = (SQFile *) (fileObj + 4);\n\n\t/* Note: OpenFileReadOnly() allows any file on the disk to be read via a file URL.\n\t   However, we are using it for now because we are not sure where the Netscape cache\n\t   folder will be--it's folder might even be user-name dependent. sqFileOpen() will\n\t   only allow opening files within the sandbox, which would be better. Here's the\n\t   sandbox-safe alternative:\n\t\t  sqFileOpen(filePtr, (int) fileName, strlen(fileName), false);\n\t*/\n\tOpenFileReadOnly(filePtr, fileName);\n\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->push(fileObj);\n\treturn 0;\n}\n\nint primitivePluginRequestState(void) {\n\t/* Args: handle.\n\t   Return true if the request succeeded, false if it failed, and nil if\n\t   it is still in progress. Fail if the request handle is not valid. */\n\n\tint handle;\n\tint status;\n\tint resultObj;\n\n\tPLUGINDEBUGSTR(\"\\pPrimitiveCallRequestState;g;\");\n\thandle = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\n\tstatus = URLRequestStatus(handle);\n\tif (status == STATUS_BAD_HANDLE) {\n\t\tinterpreterProxy->success(false);\n\t\treturn null;\n\t}\n\n\t/* default return object: (nil means \"in progress\") */\n\tresultObj = interpreterProxy->nilObject();\n\n\tif (status == STATUS_FAILED) {\n\t\tresultObj = interpreterProxy->falseObject();\n\t}\n\tif (status == STATUS_SUCCEEDED) {\n\t\tresultObj = interpreterProxy->trueObject();\n\t}\n\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->push(resultObj);\n\treturn 0;\n}\n\nint primitivePluginRequestURL(void) {\n\t/* Args: url, target, semaphoreIndex.\n\t   Start a URL request to fetch the given URL to the given target.\n\t   (See the Netscape Plugin programmer's manual for possible targets.)\n\t   Return a handle that can be used to identify this request. Fail if\n\t   there are already too many outstanding requests. */\n\n\tchar *urlPtr;\n\tchar *targetPtr;\n\tint semaIndex;\n\tint urlObj, urlSize;\n\tint targetObj, targetSize;\n\tchar url[MAX_STRING_LENGTH + 1];\n\tchar target[MAX_STRING_LENGTH + 1];\n\tint i;\n\tint handle;\n\n\tPLUGINDEBUGSTR(\"\\pPrimitiveCallRequestURL;g;\");\n\tsemaIndex = interpreterProxy->stackIntegerValue(0);\n\ttargetObj = interpreterProxy->stackObjectValue(1);\n\turlObj = interpreterProxy->stackObjectValue(2);\n\tinterpreterProxy->success(interpreterProxy->isBytes(targetObj));\n\tinterpreterProxy->success(interpreterProxy->isBytes(urlObj));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\turlSize = interpreterProxy->stSizeOf(urlObj);\n\turlPtr = interpreterProxy->firstIndexableField(urlObj);\n\ttargetSize = interpreterProxy->stSizeOf(targetObj);\n\ttargetPtr = interpreterProxy->firstIndexableField(targetObj);\n\n\t/* copy url into a C string */\n\tif (urlSize > MAX_STRING_LENGTH) urlSize = MAX_STRING_LENGTH;\n\tfor (i = 0; i < urlSize; i++) {\n\t\turl[i] = urlPtr[i];\n\t}\n\turl[urlSize] = 0;\n\n\tinterpreterProxy->success(AbortIfFileURL(url));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t\n\t/* copy target into a C string */\n\tif (targetSize > MAX_STRING_LENGTH) targetSize = MAX_STRING_LENGTH;\n\tfor (i = 0; i < targetSize; i++) {\n\t\ttarget[i] = targetPtr[i];\n\t}\n\ttarget[targetSize] = 0;\n\n\thandle = URLRequestCreate(url, target, semaIndex);\n\tinterpreterProxy->success(handle >= 0);\n\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(4);\n\tinterpreterProxy->pushInteger(handle);\n\treturn 0;\n}\n\nint primitivePluginPostURL(void) {\n\t/* Args: url, target, semaphoreIndex.\n\t   Start a URL request to post the given URL to the given target.\n\t   (See the Netscape Plugin programmer's manual for possible targets.)\n\t   Return a handle that can be used to identify this request. Fail if\n\t   there are already too many outstanding requests. */\n\n\tchar *urlPtr;\n\tchar *targetPtr;\n\tchar *bufferPtr,*buffer;\n\tint semaIndex;\n\tint urlObj, urlSize;\n\tint targetObj, targetSize;\n\tint bufferObj, bufferSize;\n\tchar url[MAX_STRING_LENGTH + 1];\n\tchar target[MAX_STRING_LENGTH + 1];\n\tint i;\n\tint handle;\n\n\tPLUGINDEBUGSTR(\"\\pPrimitiveCallPostURL;g;\");\n\tsemaIndex = interpreterProxy->stackIntegerValue(0);\n\tbufferObj = interpreterProxy->stackObjectValue(1);\n\ttargetObj = interpreterProxy->stackObjectValue(2);\n\turlObj = interpreterProxy->stackObjectValue(3);\n\t\n\tif (targetObj == interpreterProxy->nilObject()) {\n\t} else {\n\t    interpreterProxy->success(interpreterProxy->isBytes(targetObj));\n\t}\n\tinterpreterProxy->success(interpreterProxy->isBytes(urlObj));\n\tinterpreterProxy->success(interpreterProxy->isBytes(bufferObj));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\turlSize = interpreterProxy->stSizeOf(urlObj);\n\turlPtr = interpreterProxy->firstIndexableField(urlObj);\n\tif (targetObj == interpreterProxy->nilObject()) {\n\t} else {\n    \ttargetSize = interpreterProxy->stSizeOf(targetObj);\n    \ttargetPtr = interpreterProxy->firstIndexableField(targetObj);\n    }\n    bufferSize = interpreterProxy->stSizeOf(bufferObj);\n\tbufferPtr = interpreterProxy->firstIndexableField(bufferObj);\n\n\t/* copy url into a C string */\n\tif (urlSize > MAX_STRING_LENGTH) urlSize = MAX_STRING_LENGTH;\n\tfor (i = 0; i < urlSize; i++) {\n\t\turl[i] = urlPtr[i];\n\t}\n\turl[urlSize] = 0;\n\n\tinterpreterProxy->success(AbortIfFileURL(url));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t\n\tif (targetObj == interpreterProxy->nilObject()) {\n    \ttarget[0] = 0;\n\t} else {\n    \t/* copy target into a C string */\n    \tif (targetSize > MAX_STRING_LENGTH) targetSize = MAX_STRING_LENGTH;\n    \tfor (i = 0; i < targetSize; i++) {\n    \t\ttarget[i] = targetPtr[i];\n    \t}\n    \ttarget[targetSize] = 0;\n    }\n    \n\t/* copy over the post buffer which might be large*/\n\t\n\tbuffer = (char *) NPN_MemAlloc(bufferSize+1);\n\tfor (i = 0; i < bufferSize; i++) {\n\t\tbuffer[i] = bufferPtr[i];\n\t}\n\tbuffer[bufferSize] = 0;\n\n\tif (targetObj == interpreterProxy->nilObject())\n\t\thandle = URLPostCreate(url, buffer,nil,semaIndex) ;\n\telse\n\t\thandle = URLPostCreate(url, buffer,target,semaIndex) ;\n\t\n\tinterpreterProxy->success(handle >= 0);\n\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(5);\n\tinterpreterProxy->pushInteger(handle);\n\treturn 0;\n}\n\nint primitivePluginRequestURLStream(void) {\n\t/* Args: url, semaphoreIndex.\n\t   Start a URL request to fetch the given URL. Return a handle that\n\t   can be used to identify this request. Fail if there are already\n\t   too many outstanding requests. */\n\n\tint urlObj, urlSize, semaIndex;\n\tchar *urlPtr;\n\tchar url[MAX_STRING_LENGTH + 1];\n\tint handle, i;\n\n\tPLUGINDEBUGSTR(\"\\pPrimitiveCallRequestURLStream;g;\");\n\tsemaIndex = interpreterProxy->stackIntegerValue(0);\n\turlObj = interpreterProxy->stackObjectValue(1);\n\tinterpreterProxy->success(interpreterProxy->isBytes(urlObj));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\turlSize = interpreterProxy->stSizeOf(urlObj);\n\turlPtr = interpreterProxy->firstIndexableField(urlObj);\n\n\t/* copy url into a C string */\n\tif (urlSize > MAX_STRING_LENGTH) urlSize = MAX_STRING_LENGTH;\n\tfor (i = 0; i < urlSize; i++) {\n\t\turl[i] = urlPtr[i];\n\t}\n\turl[urlSize] = 0;\n\n\tinterpreterProxy->success(AbortIfFileURL(url));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\n\thandle = URLRequestCreate(url, null, semaIndex);\n\tinterpreterProxy->success(handle >= 0);\n\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(3);\n\tinterpreterProxy->pushInteger(handle);\n\treturn 0;\n}\n\nvoid OpenFileReadOnly(SQFile *f, char *MacfileName) {\n\t/* Opens the given file for reading using the supplied sqFile\n\t   structure. This is a simplified version of sqFileOpen() that\n\t   avoids the \"sandbox\" access check, since the browser's\n\t   cache folder is outside the Squeak sandbox. That is why\n\t   we only allow reading of this file. Sets the primitive\n\t   failure flag if not successful. */\n    char fileName[DOCUMENT_NAME_SIZE+1];\n    \n    if (*MacfileName == 0x00) {\n        interpreterProxy->success(false);\n        return;\n    }\n    sqFilenameFromStringOpen(fileName,(long) MacfileName, strlen(MacfileName));\n\tf->file = fopen(fileName, \"rb\");\n\n\tf->writable = false;\n\n\tif (f->file == NULL) {\n\t\tf->sessionID = 0;\n\t\tf->fileSize = 0;\n\t\tinterpreterProxy->success(false);\n\t\treturn;\n\t} else {\n\t\textern int thisSession;  /* from sqFilePrims.c: */\n\n\t\tf->sessionID = thisSession;\n\t\t/* compute and cache file size */\n\t\tfseek(f->file, 0, SEEK_END);\n\t\t{\n\t\t  squeakFileOffsetType size=ftello(f->file);\n\t\t  void *in= (void *)&size;\n\t\t  void *out= (void *)&f->fileSize;\n\t\t  memcpy(out, in, sizeof(squeakFileOffsetType));\n\t\t}\n\t\tfseek(f->file, 0, SEEK_SET);\n\t}\n\tf->lastOp = 0;\n}\n\n#endif\n\n/*** Other ***/\n\nint CaseInsensitiveMatch(char *s1, char *s2) {\n  /* Return true if the two strings are the same, not considering case. */\n\tint len, i, c1, c2;\n\n\tlen = strlen(s1);\n\tif (strlen(s2) != len) return false;\n\tfor (i = 0; i < len; i++) {\n\t\tc1 = s1[i];\n\t\tc2 = s2[i];\n\t\tif ((c1 >= 'a') && (c1 <= 'z')) {\n\t\t\tc1 = c1 - ('a' - 'A');\n\t\t}\n\t\tif ((c2 >= 'a') && (c2 <= 'z')) {\n\t\t\tc2 = c2 - ('a' - 'A');\n\t\t}\n\t\tif (c1 != c2) return false;\n\t}\n\treturn true;\n}\n\nint StringToInteger(char *s) {\n  /* Answer the integer resulting from converting the given\n     string, assumed to be decimal integer. */\n\tint sign, n, i, ch;\n\n\tsign = 1;\n\tn = 0;\n\ti = 0;\n\twhile ((ch = s[i++]) != 0) {\n\t\tif ((ch == '-') && (i == 1)) {\n\t\t\tsign = -1;\n\t\t} else {\n\t\t\tif ((ch >= '0') && (ch <= '9')) {\n\t\t\t\tn = (10 * n) + (ch - '0');\n\t\t\t} else {\n\t\t\t\treturn sign * n;\n\t\t\t}\n\t\t}\n\t}\n\treturn sign * n;\n}\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacNSPluginUILogic.c",
    "content": "/*\n *  sqMacNSPluginUILogic.c\n *  SqueakVMUNIXPATHS\n *\n *  Created by John M McIntosh on 27/02/06.\n *  Copyright 2006 Corporate Smalltalk Consulting Ltd, licensed under the Squeak-L license\n \n *   AUTHOR:  John Maloney, John McIntosh, and others.\n\n\tFeb 27th, 2006 \n *\n */\n \n #define STARTINGsqueakHeapMBytes 20*1024*1024\n #define KEYBUF_SIZE 64\n\n\n#include <pthread.h>\n#include <Movies.h>\n\n#include \"sq.h\"\n#include \"sqMacUIEvents.h\"\n#include \"sqMacFileLogic.h\"\n#include \"FilePlugin.h\"\n#include \"sqMacTime.h\"\n#include \"npapi.h\"\n#include \"sqMacUIConstants.h\"\n#include \"sqMacImageIO.h\"\n#include \"sqMacEncoding.h\"\n#include \"sqMacMemory.h\"\n#include \"sqMacWindow.h\"\n#include \"sqMacHostWindow.h\"\n#include \"sqMacUIClipBoard.h\"\n\n#define EnableMenuItemCarbon(m1,v1)  EnableMenuItem(m1,v1);\n#define DisableMenuItemCarbon(m1,v1)  DisableMenuItem(m1,v1);\n\t\n\t//#define PLUGIN_TRACE 1\n\n#if PLUGIN_TRACE\n//int printOnOSXPascal(unsigned char *msg);\n//#define PLUGINDEBUGSTR(msg) printOnOSXPascal(msg);\n#define PLUGINDEBUGSTR(msg)\t\tDebugStr(msg)\n#else\n#define PLUGINDEBUGSTR\n#endif\n\nextern int gButtonIsDown;\nextern int getFullScreenFlag();\nextern int setInterruptKeycode(int value);\nextern int setFullScreenFlag(int value);\nextern int setInterruptPending(int value);\nextern int getInterruptKeycode();\nextern sqInputEvent *nextEventPut(void);\n\nextern TMTask\tgTMTask;\nextern pthread_mutex_t gEventQueueLock;\nextern char\tsqueakPluginImageName[];\nextern struct VirtualMachine* interpreterProxy;\nextern int\texitRequested;\nextern NPP\tthisInstance;\nextern unsigned char *memory;\nextern char\t\tfailureURL[];\nextern char\t\trememberMemoryString[];\nextern int\t\tpluginArgCount;\nextern char\t\tpluginArgName[];\nextern char\t\tpluginArgValue[];\nextern int windowActive;\nextern int buttonState;\nextern char modifierMap[];\nextern int cachedButtonState;\nextern int keyBuf[];\t/* circular buffer */\nextern int keyBufGet;\t\t\t/* index of next item of keyBuf to read */\nextern int keyBufPut;\t\t\t/* index of next item of keyBuf to write */\nextern int keyBufOverflows;\t/* number of characters dropped */\n\nWindowPtr\tgAFullscreenWindow = nil;\nBoolean     ignoreFirstEvent=false,gIWasRunning=false,gPendingFullScreen=false;\npthread_mutex_t gEventNSAccept;\nint\t\t\tneedsUpdate\t\t= false;\nint\t\t\tsqueakHeapMBytes;\nNPWindow* \tnetscapeWindow\t= nil;\n\n\n/*** From VM ***/\nextern int inputSemaphoreIndex;\nextern eventMessageHook messageHook ;\nextern eventMessageHook postMessageHook;\nextern void aioInit(void);\nint checkImageVersionFromstartingAt(sqImageFile f, squeakFileOffsetType imageOffset);\nint getLongFromFileswap(sqImageFile f, int swapFlag);\nint recordMouseEvent(EventRecord *theEvent, int theButtonState);\nint MouseModifierState(EventRecord *theEvent);\nint recordKeyboardEvent(EventRecord *theEvent, int keyType);\nint plugInInit(char *fullImagePath);\nint plugInShutdown(void);\nvoid fetchPreferences();\n\n/*** Functions Imported from sqMacWindow ***/\n\nextern PixMapHandle\tstPixMap;\n\nstatic int MacRomanToUnicode[256] = \n{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,\n 25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,\n 47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,\n 69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,\n 91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,\n 110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,\n 127,196,197,199,201,209,214,220,225,224,226,228,227,229,231,233,232,\n 234,235,237,236,238,239,241,243,242,244,246,245,250,249,251,252,8224,\n 176,162,163,167,8226,182,223,174,169,8482,180,168,8800,198,216,8734,177,\n 8804,8805,165,181,8706,8721,8719,960,8747,170,186,937,230,248,191,161,172,\n 8730,402,8776,8710,171,187,8230,160,192,195,213,338,339,8211,8212,8220,8221,\n 8216,8217,247,9674,255,376,8260,8364,8249,8250,64257,64258,8225,183,8218,8222,\n 8240,194,202,193,203,200,205,206,207,204,211,212,63743,210,218,219,217,305,710,\n 732,175,728,729,730,184,733,731,711};\n\nint ioSetFullScreenRestore();\nOSErr   createNewThread();\nint checkForModifierKeys();\n\n/*** Local Functions ***/\nvoid EndDraw(void);\nvoid waitAFewMilliseconds(void);\nvoid ExitCleanup(void);\nint parseMemorySize(int baseSize, char *src);\nint plugInNotifyUser(char *msg);\nint CaseInsensitiveMatch(char *s1, char *s2);\nint  InitFilePaths(void);\nvoid StartDraw(void);\nNP_Port\t  *getNP_Port(void);\n\nNP_Port * getNP_Port(void) {\n    return (NP_Port *) netscapeWindow->window;\n}\n\n\nNPError Mac_NPP_SetWindow(NPP instance, NPWindow* window) {\n\tNP_Port* port;\n\tOSErr   err;\n\tWindowPtr realWindow;\n\twindowDescriptorBlock *windowBlock;\n\t\n\tif (window == NULL || window->window == NULL)\n\t\treturn NPERR_NO_ERROR;\n                \n\tif (window->width == 0 && window->height == 0) {\n\t\tif (gIWasRunning) {\n\t\t\tgIWasRunning = false;\n\t\t\tNPP_Destroy(instance, null);\n\t\t}\n\t\treturn NPERR_NO_ERROR;\n\t}\n\n            \n\tnetscapeWindow = window;\n\tport = (NP_Port *) netscapeWindow->window;\n\trealWindow = GetWindowFromPort(port->port);\n\twindowBlock = windowBlockFromHandle(windowHandleFromIndex(1));\n\tif (windowBlock == NULL) {\n\t\twindowBlock = AddWindowBlock();\n\t}\n\twindowBlock->handle = (wHandleType) realWindow;\n\t\n\tneedsUpdate\t= true;\n\n\tfprintf(stderr,\"\\n realWindowGrafPtr %i port %i x %i y %i windowX %i windowY %i windowW %i windowH %i clipT %i clipL %i clipB %i clipR %i\",\n\t\trealWindow,\n\t\tport,\n\t\tport->portx, port->porty,\n\t\tnetscapeWindow->x, netscapeWindow->y,\n\t\tnetscapeWindow->width,netscapeWindow->height,\n\t\tnetscapeWindow->clipRect.top,\n\t\tnetscapeWindow->clipRect.left,\n\t\tnetscapeWindow->clipRect.bottom,\n\t\tnetscapeWindow->clipRect.right\n\t\t);\n\t\t\n\tif (gIWasRunning)\n            return NPERR_NO_ERROR;\n\t\n\t//Start the VM running\n\t\n\tgIWasRunning = true;\n\tioLoadFunctionFrom(NULL, \"DropPlugin\");\n\n\terr = createNewThread();\n\tif (err != noErr)\n            return err;\n\treturn NPERR_NO_ERROR;\n}\n\n// -----------------------\n\nint16 Mac_NPP_HandleEvent(NPP instance, void *rawEvent) {\n\tEventRecord *eventPtr = (EventRecord*) rawEvent;\n\tEventRecord\ttheEvent;\n\tint\t\t\t\tok;\n\n\tpthread_mutex_lock(&gEventNSAccept);\n\t\t\t \n\tdo {\n\t\n    \tif (exitRequested) {\n    \t\texitRequested = false;\n    \t\tExitCleanup();\n\t\t\tpthread_mutex_unlock(&gEventNSAccept);\n\t\t\treturn false;\n    \t}\n\n    \tif ((thisInstance == nil) || (eventPtr == NULL)) {\n    \t\t/* no instance or no event; do nothing */\n\t\t\tpthread_mutex_unlock(&gEventNSAccept);\n    \t\treturn false;\n    \t}\n\n\t\tif (!(eventPtr->what == 0))\n\t\t\tfprintf(stderr,\"\\n Mac_NPP_HandleEvent %i \",eventPtr->what);\n\t\t\n\t\tif(!((messageHook) && (messageHook(eventPtr)))) {\n\t    \tswitch (eventPtr->what) {\n\t    \t\tcase mouseDown:\n\t                gButtonIsDown = true;\t\t\t\t    \n\t\t\t\t\tif(inputSemaphoreIndex) {\n\t\t\t    \t\tStartDraw();\n\t\t\t\t\t\tpthread_mutex_lock(&gEventQueueLock);\n\t\t\t\t\t\trecordMouseEvent(eventPtr,MouseModifierState(eventPtr));\n\t\t\t\t\t\tpthread_mutex_unlock(&gEventQueueLock);\n\t\t\t\t\t\tEndDraw();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\trecordMouseDown(eventPtr);\n\t    \t\tbreak;\n\n\t\t\t\tcase mouseUp:\n\t\t\t\t\tgButtonIsDown = false;\n\t\t\t\t\tif(inputSemaphoreIndex) {\n\t\t\t    \t\tStartDraw();\n\t\t\t\t\t\tpthread_mutex_lock(&gEventQueueLock);\n\t\t\t\t\t\trecordMouseEvent(eventPtr,MouseModifierState(eventPtr));\n\t\t\t\t\t\tpthread_mutex_unlock(&gEventQueueLock);\n\t\t\t    \t\tEndDraw();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\trecordModifierButtons(eventPtr);\n\t\t\t\tbreak;\n\n\t    \t\tcase keyDown:\n\t    \t\tcase autoKey:\n\t  \t\t\t\tif(inputSemaphoreIndex) {\n\t\t\t\t\t\tpthread_mutex_lock(&gEventQueueLock);\n\t\t\t\t\t\trecordKeyboardEvent(eventPtr,EventKeyDown);\n\t\t\t\t\t\tpthread_mutex_unlock(&gEventQueueLock);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\trecordModifierButtons(eventPtr);\n\t  \t\t\t    recordKeystroke(eventPtr);\n\t    \t\tbreak;\n\n\t\t\t\tcase keyUp:\n\t\t\t\t\tif(inputSemaphoreIndex) {\n\t\t\t\t\t\tpthread_mutex_lock(&gEventQueueLock);\n\t\t\t\t\t\trecordKeyboardEvent(eventPtr,EventKeyUp);\n\t\t\t\t\t\tpthread_mutex_unlock(&gEventQueueLock);\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\n\t    \t\tcase updateEvt:\n\t\t\t\t\tfullDisplayUpdate();  /* ask VM to call ioShowDisplay */\n\t    \t\tbreak;\n\t    \t\tcase getFocusEvent:\n\t    \t\tbreak;\n\t    \t\tcase loseFocusEvent:\n\t    \t\tbreak;\n\t    \t\tcase adjustCursorEvent:\n\t    \t\tbreak;\n\t    \t\t\n\t    \t\n\t\t\t\tcase nullEvent :\n\t\t\t\t\t{\n\t    \t\t\t\tif(inputSemaphoreIndex) {\n\t    \t\t\t\t\teventPtr->modifiers = checkForModifierKeys();\n\t    \t\t    \t\tStartDraw();\n\t\t\t\t\t\t\tpthread_mutex_lock(&gEventQueueLock);\n\t     \t\t\t\t\trecordMouseEvent(eventPtr,MouseModifierState(eventPtr));     \n\t\t\t\t\t\t\tpthread_mutex_unlock(&gEventQueueLock);\n\t     \t\t\t\t\tEndDraw();\n\t    \t\t \t\t}\n\t\t\t\t\t}\n\t    \t\tbreak;    \t\t\n\t\t\t\tcase activateEvt:\n\t\t\t\t{\n\t\t\t\t\t/* serious hack to show safari after hiding, \n\t\t\t\t\tissue with safari 1.1.1 not seeing activate when full screen terminates */\n\t\t\t/*\t\t\n\t\t\t\t\tProcessSerialNumber psn = { 0, kCurrentProcess }; \n\t\t\t\t\tOSStatus err;\n\t\t\t\t\tif (!IsProcessVisible(&psn)) {\n\t\t\t\t\t\terr = ShowHideProcess (&psn,true);\n\t\t\t\t\t\tSetFrontProcess(&psn);\n\t\t\t\t\t\t} */\n\t\t\t\t}\n\n\t\t\t\t\tpthread_mutex_unlock(&gEventNSAccept);\n\t\t\t\t\treturn false;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n    \tif (needsUpdate && (netscapeWindow != nil) && (memory)) {\n     \t\tneedsUpdate = false;\n\t\t\t\n    \t\tif (getFullScreenFlag()) {\n\t\t\t\tfullDisplayUpdate();  /* ask VM to call ioShowDisplay */\n\t\t\t\tpthread_mutex_unlock(&gEventNSAccept);\n\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\telse {\n \t\t\t}\n\t\t\t\n\t/*\t\tif (!getFullScreenFlag()) {\n\t\t\t\tProcessSerialNumber psn = { 0, kCurrentProcess }; \n\t\t\t\tOSStatus err;\n\t\t\t\terr = ShowHideProcess (&psn,true);\n\t\t\t\twaitAFewMilliseconds();\n\t\t\t\tpthread_mutex_unlock(&gEventNSAccept);\n\t\t\t\treturn false;\n\t\t\t} */\n    \t}\n\t\t\n\tif(postMessageHook) postMessageHook(eventPtr);\n\n\tif (getFullScreenFlag() ) {\n\t\t\tpthread_mutex_unlock(&gEventNSAccept);\n     \t    ok = WaitNextEvent(everyEvent, &theEvent,1,null);\n\t\t\tpthread_mutex_lock(&gEventNSAccept);\n            eventPtr = &theEvent;\n    \t}\n\t} while (getFullScreenFlag());\n                    \n        \n\t// waitAFewMilliseconds();\n\tpthread_mutex_unlock(&gEventNSAccept);\n\treturn true;\n}\nvoid EndDraw() {}\nvoid StartDraw(void) {}\nvoid makeMainWindow() {}\nvoid sqShowWindow(int windowIndex){}\n\n/*** Image File Reading ***/\n\nvoid ReadSqueakImage(void) {\n\tsqImageFile f;\n\tchar msg[500];\n    int swapBytes;\n    int dataSize;\n    int headerStart;\n    int headerSize;\n    \n\tfetchPreferences();\n\tplugInInit(squeakPluginImageName);\n\tInitFilePaths();\n\n\t/* read the image file and allocate memory for Squeak heap */\n\tif (CaseInsensitiveMatch(imageName,\n\t\t\"Problems finding the Internet folder in the Squeak Preference folder or finding the SqueakPlugin.image\"))\n\t\tf = NULL;\n\telse\n\t\tf = sqImageFileOpen(imageName, \"rb\");\n\t\t\n\tif (f == NULL) {\n\t\tif (failureURL[0] != 0x00) {\n\t\t\t// July 31/2004 added per Michaels request for squeakland camp in chicago\n\t\t\tNPN_GetURL(thisInstance, failureURL, \"_self\");\n\t\t} else {\n\t\tstrcpy(msg, \"Could not open Squeak image file \\\"\");\n\t\tstrcat(msg, imageName);\n\t\tstrcat(msg, \"\\\"\");\n\t\tplugInNotifyUser(msg);\n\t\t}\n\t\treturn;\n\t}\n\t\n\t//Cheat and peek ahead to get the image size so we can calculate the memory required \n\t\n\tswapBytes = checkImageVersionFromstartingAt(f, 0);\n\theaderStart = (sqImageFilePosition(f)) - 4;\n\theaderSize = getLongFromFileswap(f, swapBytes);\n\tdataSize = getLongFromFileswap(f, swapBytes);\n\t\n\t//Close then reopen to reset file position\n\t\n\tsqImageFileClose(f);  \n\tf = sqImageFileOpen(imageName, \"rb\");\n\n\tsqueakHeapMBytes = parseMemorySize(dataSize, rememberMemoryString);\n\tif (squeakHeapMBytes == 0) \n\t    squeakHeapMBytes = STARTINGsqueakHeapMBytes;\n\tif (squeakHeapMBytes < sqGetAvailableMemory())\n\t\tsqueakHeapMBytes = sqGetAvailableMemory();\n\t    \n\treadImageFromFileHeapSizeStartingAt(f, squeakHeapMBytes, 0);\n\tsqImageFileClose(f);\n\tsetInterruptKeycode(515);  /* ctrl-C, since Netscape blocks cmd-. */\n\tsetFullScreenFlag(false); //Note image can be saved with true\n\tSetUpTimers();\n}\n\n/*** Squeak I/O Support and Memory Allocation ***/\n\nint ioExit(void) {\n  /* Request that we stop running plugin. */\n\n\tioSetFullScreenRestore();\n\texitRequested = true;\n\treturn 0;\n}\n\nint ioScreenSize(void) {\n\tint w = 0, h = 0;\n\tRect bounds;\n\t\n\tif (netscapeWindow != nil) {\n\t\tw = netscapeWindow->width;\n\t\th = netscapeWindow->height;\n\t}\n\t    \n\n\tif (w == 0 && h == 0) { \n\t    GetPortBounds(GetWindowPort(getSTWindow()),&bounds);\n\t\tw = bounds.right - bounds.left;\n\t\th = bounds.bottom - bounds.top;\n\t}\n\t\n\treturn (w << 16) | (h & 0xFFFF);  /* w is high 16 bits; h is low 16 bits */\n}\n\nint ioProcessEvents(void) {\n\treturn doPendingFlush();\n}\n\n\n/* Full Screen logic */\n\nPtr gRestorableStateForScreen = nil;\nNP_Port\t  gFullScreenNPPort;\nNPWindow  *oldNetscapeWindow,gFullScreenNPWindow;\nWindowPtr oldStWindow;\n\n\nint ioSetFullScreen(int fullScreen) {\n\tshort desiredWidth,desiredHeight;\n    GDHandle   dominantGDevice;\n\twindowDescriptorBlock *\tmangleWindowInfo;\n\t\n\tif (fullScreen) {\n\t    if (getFullScreenFlag()) return 0;\n\t    \n\t\tdesiredWidth = 0;\n\t\tdesiredHeight = 0;\n\t\toldNetscapeWindow = netscapeWindow;\n\t\toldStWindow = getSTWindow();\n\t\tdominantGDevice = getThatDominateGDevice(oldStWindow);\n\t\n    \tignoreFirstEvent = true;\n\t\tsetFullScreenFlag(true);  //JMM Moved before to test\n\t\twaitAFewMilliseconds();\n\t\twaitAFewMilliseconds();\n\t\twaitAFewMilliseconds();\n\t\twaitAFewMilliseconds();\n\t\twaitAFewMilliseconds();\n\t\tBeginFullScreen\t(&gRestorableStateForScreen,\n\t\t\t\t\t\t\t\tdominantGDevice,\n\t\t\t\t\t\t\t\t &desiredWidth,\n\t\t\t\t\t\t\t\t &desiredHeight,\n\t\t\t\t\t\t\t\t &gAFullscreenWindow,\n\t\t\t\t\t\t\t\t nil,\n\t\t\t\t\t\t\t\t fullScreenAllowEvents);\n\t\tmangleWindowInfo = windowBlockFromIndex(1);\n\t\tmangleWindowInfo->handle = gAFullscreenWindow;\n\n\t\tgFullScreenNPPort.port = GetWindowPort(gAFullscreenWindow);\n\t\tgFullScreenNPPort.portx = 0;\n\t\tgFullScreenNPPort.porty = 0;\n\t\tgFullScreenNPWindow.window =  &gFullScreenNPPort;\n\t\tgFullScreenNPWindow.x = 0;\n\t\tgFullScreenNPWindow.y = 0;\n\t\tgFullScreenNPWindow.width = desiredWidth;\n\t\tgFullScreenNPWindow.height = desiredHeight;\n\t\tgFullScreenNPWindow.clipRect.top = 0;\n\t\tgFullScreenNPWindow.clipRect.left = 0;\n\t\tgFullScreenNPWindow.clipRect.bottom = desiredHeight;\n\t\tgFullScreenNPWindow.clipRect.right = desiredWidth;\n    \t\n    \tnetscapeWindow = &gFullScreenNPWindow;\n\n \t} else {\n\t    if (!getFullScreenFlag()) return 0;\n\t\tsetFullScreenFlag(false);\n        ioSetFullScreenRestore();\n\t}\n\treturn 0;\n}\n\nint  ioSetFullScreenRestore()\n{\n\tProcessSerialNumber psn = { 0, kCurrentProcess }; \n\tOSErr   err;\n\twindowDescriptorBlock *\tmangleWindowInfo;\n\t\n\tif (gRestorableStateForScreen != nil) {\n\t\tEndFullScreen(gRestorableStateForScreen,nil);\n\t    if (gAFullscreenWindow == nil) \n\t\t    return 0;\n\t    gRestorableStateForScreen = nil;\n\t    netscapeWindow = oldNetscapeWindow;\n\t\tmangleWindowInfo = windowBlockFromIndex(1);\n\t\tmangleWindowInfo->handle = oldStWindow;\n\t\terr = ShowHideProcess (&psn,false);\n\t\twaitAFewMilliseconds();\n\t}\n\treturn 0;\n}\n\n/*** File and Access Paths ***/\n\nint InitFilePathsViaDomain(SInt16 domain) {\n\tchar imageInPreferenceFolder[IMAGE_NAME_SIZE+1];\n\tOSErr err;\n\tFSRef\ttheFSRef;\n\tchar path[VMPATH_SIZE+1];\n\n\t\n\t/* clear all path and file names */\n\tSetShortImageNameViaString(squeakPluginImageName,gCurrentVMEncoding);\n\n#ifdef SOPHIEVM\n\t/* get the path to the sytem folder preference area*/\n\terr = FSFindFolder(domain, kApplicationsFolderType, kDontCreateFolder, &theFSRef);\n\tif (err != noErr) {\n\t\treturn err;\n\t}\n\t\n\t// Look for folder, if not found abort */\n\tPathToFileViaFSRef(imageInPreferenceFolder,IMAGE_NAME_SIZE, &theFSRef,kCFStringEncodingUTF8);\n\n\tstrcat(imageInPreferenceFolder,\"Sophie.app/Contents/Resources/\");\n\tstrcpy(path,imageInPreferenceFolder);\n\tstrcat(imageInPreferenceFolder,squeakPluginImageName);\n\terr = getFSRef(imageInPreferenceFolder,&theFSRef,kCFStringEncodingUTF8);\t\n\tif (err != noErr) {\n\t\treturn err;\n\t}\n\n#else\n\t/* get the path to the sytem folder preference area*/\n\terr = FSFindFolder(domain, kPreferencesFolderType, kDontCreateFolder, &theFSRef);\n\tif (err != noErr) {\n\t\treturn err;\n\t}\n\t\n\t// Look for folder, if not found abort */\n\tPathToFileViaFSRef(imageInPreferenceFolder,IMAGE_NAME_SIZE, &theFSRef,kCFStringEncodingUTF8);\n\n\tstrcat(imageInPreferenceFolder,\"Squeak/Internet/\");\n\tstrcpy(path,imageInPreferenceFolder);\n\tstrcat(imageInPreferenceFolder,squeakPluginImageName);\n\terr = getFSRef(imageInPreferenceFolder,&theFSRef,kCFStringEncodingUTF8);\t\n\tif (err != noErr) {\n\t\t/* New Behavior try to find the SqueakLand Folder in the Application's Folder */\n\t\terr = FSFindFolder(domain, kApplicationsFolderType, kDontCreateFolder, &theFSRef);\n\t\tif (err != noErr) \n\t\t\tgoto error;\n\t\tPathToFileViaFSRef(imageInPreferenceFolder,IMAGE_NAME_SIZE, &theFSRef,kCFStringEncodingUTF8);\n\t\tstrcat(imageInPreferenceFolder,\"SqueakLand/Squeak/Internet/\");\n\t\tstrcpy(path,imageInPreferenceFolder);\n\t\tstrcat(imageInPreferenceFolder,squeakPluginImageName);\n\t\terr = getFSRef(imageInPreferenceFolder,&theFSRef,kCFStringEncodingUTF8);\t\n\t\tif (err != noErr)\t\t\n\t\t\tgoto error;\n\t}\t\n#endif\n\t/* set the vmPath */\n\tCFStringRef strRef = CFStringCreateWithCString(kCFAllocatorDefault, path, kCFStringEncodingUTF8);\n\tCFMutableStringRef strRefM = CFStringCreateMutableCopy(kCFAllocatorDefault, 0, strRef);\n\tSetVMPathFromCFString(strRefM);\n\tCFRelease(strRef);\n\tCFRelease(strRefM);\n\t\n\tgetVMPathWithEncoding(path,gCurrentVMEncoding);\n\tstrcat(path, squeakPluginImageName);\n\tSetImageNameViaString(path,gCurrentVMEncoding);\n\treturn noErr;\n\t\n\terror: \n\tSetImageNameViaString(\"Problems finding the Internet folder in the Squeak Preference folder or finding the SqueakPlugin.image\",gCurrentVMEncoding);\n\treturn err;\n\t\n}\n\nint InitFilePaths() {\n\tstatic const SInt16 domain[] = {kOnSystemDisk,kUserDomain, kLocalDomain, kNetworkDomain, kSystemDomain, 0}; \n\tint error;\n\tSInt32 domainIndex=0;\n\t\n\tdo {\n\t\terror = InitFilePathsViaDomain(domain[domainIndex]);\n\t\tif (error == noErr) \n\t\t\treturn noErr;\n\t\tdomainIndex++;\n\t} while (domain[domainIndex] != 0); \n        return error;\n}\n\nint IsPrefixedBy(char *s, char *prefix) {\n  /* Return true if the given string begins with or equals the given prefix. */\n\tint i;\n\n\tfor (i = 0; prefix[i] != 0; i++) {\n\t\tif (s[i] != prefix[i]) \n\t\t\treturn false;\n\t}\n\treturn true;\n}\n\nint primitivePluginBrowserReady(void) {\n\t/* Args: none.\n\t   Always return true on Macintosh. */\n\tPLUGINDEBUGSTR(\"\\pPrimitiveCallBrowserReady;g;\");\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushBool(1);\n\treturn 0;\n}\n\n\nvoid ExitCleanup(void) {\n  /* Clean up and stop running plugin. */\n\tint i;\n\n\tif (thisInstance == nil) return;\n\tthisInstance = nil;\n\texitRequested = true;\n\n\t/* do { This hangs things, not sure what to do about outstanding URL requests...\n\t\tBoolean URLFetchInProgress;\n\t\tURLFetchInProgress = false;\n\t\tfor (i = 0; i < URL_REQUEST_COUNT; i++) {\n\t\t\tif (urlRequests[i].status == STATUS_IN_PROGRESS) {\n\t\t\t\tURLFetchInProgress = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (URLFetchInProgress) {\n\t\t\tSystemTask();\n\t\t\tYieldToThread(gSqueakThread);\n\t\t}\n\t} while (URLFetchInProgress); */\n\t\n        if (gTMTask.tmAddr) {\n        \n            RemoveTimeTask((QElemPtr)gTMTask.qLink);\n            DisposeTimerUPP(gTMTask.tmAddr);\n            gTMTask.tmAddr = NULL;\n        }\n        \n\tplugInShutdown();\n\tioSetFullScreenRestore();\n\tif (pluginArgCount != 0) {\n\t\tfor(i=0;i<pluginArgCount;i++) {\n\t\t\tNPN_MemFree((void*)&pluginArgName[i]);\n\t\t\tNPN_MemFree((void*)&pluginArgValue[i]);\n\t\t}\n\t\tpluginArgCount = 0;\n\t}\n\tNPP_Initialize();  /* reset local variables */\n        ignoreFirstEvent=false;\n        gIWasRunning=false;\n}\n\n/*** Interpreter Hooks ***/\n\nint plugInNotifyUser(char *msg) {\n  /* Notify the user that there was a problem starting Squeak. */\n\tunsigned char *\t\tnotificationMsg = malloc(256);\n\tNMRec\t\t*notifyRec = malloc(sizeof(NMRec));\n\n\tCopyCStringToPascal(msg,notificationMsg); /* copy message, since notification is asynchronous */\n\n\tnotifyRec->qType = nmType;\n\tnotifyRec->nmMark = false;\t\t\t/* no mark in applications menu */\n\tnotifyRec->nmIcon = nil;\t\t\t\t/* no menu bar icon */\n\tnotifyRec->nmSound = (Handle) -1;\t/* -1 means system beep */\n\tnotifyRec->nmStr = notificationMsg;\n\tnotifyRec->nmResp = (NMUPP) -1;\t\t/* -1 means remove notification when user confirms */\n\n\t/* add to notification queue */\n\tNMInstall(notifyRec);\n\treturn 0;\n}\n\nvoid plugInSetStartTime(void) {\n}\n\nint plugInTimeToReturn(void) {\n    if (exitRequested)\n        return true;\n    return false;\n}\n\nint parseMemorySize(int baseSize, char *src)\n{\n\tchar buf[50], *tmp;\n\tint imageSize = 0, requestedSize;\n\n\twhile(*src) {\n\t\tswitch(*src) {\n\t\t\tcase ' ': /* white spaces; ignore */\n\t\t\tcase '\"':\n\t\t\t\tsrc++; break;\n\t\t\tcase '*': /* multiple of image size */\n\t\t\t\ttmp = buf; src++;\n\t\t\t\twhile(*src && isdigit(*src)) *(tmp++) = *(src++); /* integer part */\n\t\t\t\tif(*src == '.') { /* fraction part */\n\t\t\t\t\t*(tmp++) = *(src++);\n\t\t\t\t\twhile(*src && isdigit(*src)) *(tmp++) = *(src++);\n\t\t\t\t}\n\t\t\t\t*(tmp++) = 0;\n\t\t\t\timageSize += (int) (baseSize * atof(buf));\n\t\t\t\tbreak;\n\t\t\tcase '+': /* additional space in bytes */\n\t\t\t\ttmp = buf; src++;\n\t\t\t\twhile(*src && isdigit(*src)) *(tmp++) = *(src++);\n\t\t\t\t*(tmp++) = 0;\n\t\t\t\tif (imageSize == 0) \n\t\t\t\t\timageSize = baseSize;\n\t\t\t\trequestedSize = atoi(buf);\n\t\t\t\timageSize += (requestedSize <= 1000) ? requestedSize*1024*1024 : requestedSize;\n\t\t\t\tbreak;\n\t\t\tdefault: /* absolute size */\n\t\t\t\ttmp = buf;\n\t\t\t\t*(tmp++) = *(src++);\n\t\t\t\twhile(*src && isdigit(*src)) *(tmp++) = *(src++);\n\t\t\t\t*(tmp++) = 0;\n\t\t\t\trequestedSize = atoi(buf);\n\t\t\t\timageSize = (requestedSize <= 1000) ? requestedSize*1024*1024 : requestedSize;\n\t\t}\n\t}\n\treturn imageSize;\n}\n\nint AbortIfFileURL(char *url)\n{   char lookFor[6];\n\tint placement=0;\n\t\n\tlookFor[5] = 0x00;\n\twhile (true) {\n\t\tif (*url == 0x00) break;\n\t\tif (*url == ' ') {\n\t\t\turl++;\n\t\t} else {\n\t\t  lookFor[placement++] = *url++;\n\t\t  if (placement == 5) break;\n\t\t}\n\t}\n\treturn !CaseInsensitiveMatch(lookFor,\"file:\");\n}\n\npthread_mutex_t sleepLock;\npthread_cond_t  sleepLockCondition;\nvoid waitAFewMilliseconds()\n{\n    static Boolean doInitialization=true;\n    const int\t   realTimeToWait = 100;\n    struct timespec tspec;\n    int err;\n    \n    if (doInitialization) {\n        doInitialization = false;\n        pthread_mutex_init(&sleepLock, NULL);\n        pthread_cond_init(&sleepLockCondition,NULL);\n    }\n\n    tspec.tv_sec=  realTimeToWait / 1000;\n    tspec.tv_nsec= (realTimeToWait % 1000)*1000000;\n    \n    err = pthread_mutex_lock(&sleepLock);\n    err = pthread_cond_timedwait_relative_np(&sleepLockCondition,&sleepLock,&tspec);\t\n    err = pthread_mutex_unlock(&sleepLock); \n}\n\n\nint recordMouseEvent(EventRecord *theEvent, int theButtonState) {\n\tsqMouseEvent *evt;\n\tstatic sqMouseEvent oldEvent;\n\t\n\tevt = (sqMouseEvent*) nextEventPut();\n\n\t/* first the basics */\n\tevt->type = EventTypeMouse;\n\tevt->timeStamp = ioMSecs() & MillisecondClockMask; \n//JMM? \tQD GlobalToLocal Point(getNP_Port()->port,(Point *) &theEvent->where);\n\tGlobalToLocal( &theEvent->where);\n\tevt->x = theEvent->where.h;\n\tevt->y = theEvent->where.v;\n\tfprintf(stderr,\"\\n Mouse at x %i y %i \",evt->x,evt->y);\n\n\t/* then the buttons */\n\tevt->buttons = theButtonState & 0x07;\n\t/* then the modifiers */\n\tevt->modifiers = theButtonState >> 3;\n\tevt->windowIndex = windowActive;\n\t\n\tif (oldEvent.buttons == evt->buttons && \n\t    oldEvent.x == evt->x &&\n\t    oldEvent.y == evt->y &&\n\t    oldEvent.modifiers == evt->modifiers) \n\t    ignoreLastEvent();\n\t    \n    oldEvent = *evt;\n\n\t\n//\tsignalSemaphoreWithIndex(inputSemaphoreIndex);\n\treturn 1;\n}\n\nvoid recordModifierButtons(EventRecord *theEvent) {\n\tint stButtons = 0;\n\n\tif ((theEvent->modifiers & btnState) == false) {\n\t\tstButtons = buttonState & 0x7;\n\t} else {\n\t\tstButtons = 0;\n\t}\n\t/* button state: low three bits are mouse buttons; next 8 bits are modifier bits */\n\tbuttonState =\n\t\t(modifierMap[(theEvent->modifiers >> 8)] << 3) |\n\t\t(stButtons & 0x7);\n}\n\nvoid recordMouseDown(EventRecord *theEvent) {\n\n\t/* button state: low three bits are mouse buttons; next 4 bits are modifier bits */\n\tbuttonState = MouseModifierState(theEvent);\n\tcachedButtonState = cachedButtonState | buttonState;\n}\n\nint recordKeyboardEvent(EventRecord *theEvent, int keyType) {\n\tint asciiChar, modifierBits;\n\tsqKeyboardEvent *evt, *extra;\n\n\tevt = (sqKeyboardEvent*) nextEventPut();\n\n\t/* keystate: low byte is the ascii character; next 4 bits are modifier bits */\n\tasciiChar = theEvent->message & charCodeMask;\n\tmodifierBits = MouseModifierState(theEvent); //Capture mouse/option states\n\tif (((modifierBits >> 3) & 0x9) == 0x9) {  /* command and shift */\n\t\tif ((asciiChar >= 97) && (asciiChar <= 122)) {\n\t\t\t/* convert ascii code of command-shift-letter to upper case */\n\t\t\tasciiChar = asciiChar - 32;\n\t\t}\n\t}\n\n\t/* first the basics */\n\tevt->type = EventTypeKeyboard;\n\tevt->timeStamp = ioMSecs() & MillisecondClockMask;\n\t/* now the key code */\n\t/* press code must differentiate */\n\t// Jan 2004, changed for TWEAK instead of doing virtual keycode return  unicode\n\t// Unicode generated from CFSTring\n\t// March 19th 2005, again alter we pass keyCode on keydown/keyup but pass unicode in keychar as extra field\n\tevt->charCode = (theEvent->message & keyCodeMask) >> 8;\n\tevt->pressCode = keyType;\n\tevt->modifiers = modifierBits >> 3;\n\tevt->windowIndex = windowActive;\n\t/* clean up reserved */\n\tevt->reserved1 = 0;\n\t/* generate extra character event */\n\tif (keyType == EventKeyDown) {\n\t\textra = (sqKeyboardEvent*)nextEventPut();\n\t\t*extra = *evt;\n\t\textra->charCode = asciiChar;\n\t\textra->pressCode = EventKeyChar;\n\t\textra->utf32Code = MacRomanToUnicode[asciiChar];\n\t}\n//\tsignalSemaphoreWithIndex(inputSemaphoreIndex);\n\treturn 1;\n}\n\nvoid recordKeystroke(EventRecord *theEvent) {\n\tint asciiChar, modifierBits, keystate;\n\n\t/* keystate: low byte is the ascii character; next 8 bits are modifier bits */\n\tasciiChar = theEvent->message & charCodeMask;\n\tmodifierBits = modifierMap[(theEvent->modifiers >> 8)];\n\tif ((modifierBits & 0x9) == 0x9) {  /* command and shift */\n\t\tif ((asciiChar >= 97) && (asciiChar <= 122)) {\n\t\t\t/* convert ascii code of command-shift-letter to upper case */\n\t\t\tasciiChar = asciiChar - 32;\n\t\t}\n\t}\n\n\tkeystate = (modifierBits << 8) | asciiChar;\n\tif (keystate == getInterruptKeycode()) {\n\t\t/* Note: interrupt key is \"meta\"; it not reported as a keystroke */\n\t\tsetInterruptPending(true);\n\t} else {\n\t\tkeyBuf[keyBufPut] = keystate;\n\t\tkeyBufPut = (keyBufPut + 1) % KEYBUF_SIZE;\n\t\tif (keyBufGet == keyBufPut) {\n\t\t\t/* buffer overflow; drop the last character */\n\t\t\tkeyBufGet = (keyBufGet + 1) % KEYBUF_SIZE;\n\t\t\tkeyBufOverflows++;\n\t\t}\n\t}\n}\n\nint checkForModifierKeys() {\n\tenum {\n\t\t\t/* modifier keys */\n\t\tkVirtualCapsLockKey = 0x039,\n\t\tkVirtualShiftKey = 0x038,\n\t\tkVirtualControlKey = 0x03B,\n\t\tkVirtualOptionKey = 0x03A,\n\t\tkVirtualRShiftKey = 0x03C,\n\t\tkVirtualRControlKey = 0x03E,\n\t\tkVirtualROptionKey = 0x03D,\n\t\tkVirtualCommandKey = 0x037\n\t};\n\tKeyMap theKeys;\n\tunsigned char *keybytes;\n\tint result;\n\t\n\tGetKeys(theKeys);\n\tkeybytes = (unsigned char *) theKeys;\n\tresult  = gButtonIsDown ?  0 : btnState ;\n\tresult += ((keybytes[kVirtualCapsLockKey>>3] & (1 << (kVirtualCapsLockKey&7))) != 0) ? alphaLock : 0;\n\tresult += ((keybytes[kVirtualShiftKey>>3] & (1 << (kVirtualShiftKey&7))) != 0)       ? shiftKey : 0;\n\tresult += ((keybytes[kVirtualControlKey>>3] & (1 << (kVirtualControlKey&7))) != 0)   ? controlKey : 0;\n\tresult += ((keybytes[kVirtualOptionKey>>3] & (1 << (kVirtualOptionKey&7))) != 0)     ? optionKey : 0;\n\tresult += ((keybytes[kVirtualRShiftKey>>3] & (1 << (kVirtualRShiftKey&7))) != 0)       ? shiftKey : 0;\n\tresult += ((keybytes[kVirtualRControlKey>>3] & (1 << (kVirtualRControlKey&7))) != 0)   ? controlKey : 0;\n\tresult += ((keybytes[kVirtualROptionKey>>3] & (1 << (kVirtualROptionKey&7))) != 0)     ? optionKey : 0;\n\tresult += ((keybytes[kVirtualCommandKey>>3] & (1 << (kVirtualCommandKey&7))) != 0)   ? cmdKey : 0;\n\t\n\treturn result;\n}\n\n\n\n/*** Plugin Support ***/\n\nint plugInInit(char *fullImagePath) {\n\n\t#pragma unused(fullImagePath)\n\t/* check the interpreter's size assumptions for basic data types */\n\tif (sizeof(int) != 4) {\n\t\terror(\"This C compiler's integers are not 32 bits.\");\n\t}\n\tif (sizeof(double) != 8) {\n\t\terror(\"This C compiler's floats are not 64 bits.\");\n\t}\n\tif (sizeof(time_t) != 4) {\n\t\terror(\"This C compiler's time_t's are not 32 bits.\");\n\t}\n\n\tSetUpClipboard();\n\tSetUpPixmap();\n\treturn 0;\n}\n\nextern pthread_mutex_t gSleepLock;\nextern pthread_cond_t  gSleepLockCondition;\n\nint plugInShutdown(void) {\n        int err;\n        \n\tioShutdownAllModules();\n\tFreeClipboard();\n\tFreePixmap();\n\tif (memory != nil) {\n\t\terr = pthread_cancel(gSqueakPThread);\n          if (err == 0 )\n              pthread_join(gSqueakPThread,NULL);\n        pthread_mutex_destroy(&gEventQueueLock);\n        pthread_mutex_destroy(&gEventUILock);\n\t\tpthread_mutex_destroy(&gEventNSAccept);\n        pthread_mutex_destroy(&gSleepLock);\n        pthread_cond_destroy(&gEventUILockCondition);\n        pthread_cond_destroy(&gSleepLockCondition);\n\t    sqMacMemoryFree();\n\t}\n\treturn 0;\n}\n\nOSErr createNewThread() {\n        OSErr err;\n\t\t\t\t      \n        aioInit();\n        pthread_mutex_init(&gEventQueueLock, NULL);\n        pthread_mutex_init(&gEventUILock, NULL);\n        pthread_mutex_init(&gEventNSAccept, NULL);\n        pthread_cond_init(&gEventUILockCondition,NULL);\n        err = pthread_create(&gSqueakPThread,null,(void *) interpret, null);\n\treturn 0;\n}\n\n\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacNSPluginUILogic2.c",
    "content": "/*\n *  sqMacNSPluginUILogic2.c\n *  SqueakVMUNIXPATHS\n *\n *  Created by John M McIntosh on 19/10/06.\n *  Copyright 2006 Corporate Smalltalk Consulting Ltd. All rights reserved.\n *  Distributed under the Squeak-L\n *  Feb 4, 2007. JMM Licence changed to MIT\n *\n */\n\n#include <Debugging.h>\n#include <Carbon/Carbon.h>\n#include <fcntl.h>\n#include <unistd.h>\n#include <stdio.h>\n#include <pthread.h>\n#include <sys/types.h>\n#include <sys/mman.h>\n\n#include \"sq.h\"\n#include \"sqMacNSPluginUILogic2.h\"\n#include \"sqMacHostWindow.h\"\n#include \"sqaio.h\"\n#include \"sqVirtualMachine.h\"\n#include \"sqUnixCharConv.h\"\n#include \"sqMacWindow.h\"\n#include \"sqVirtualMachine.h\"\n\nstatic void browserReceiveData();\nstatic void browserSend(const void *buf, size_t count);\nstatic void browserReceive(void *buf, size_t count);\nstatic void browserReceiveData(void);\nstatic void npHandler(int fd, void *data, int flags);\nstatic void handle_CMD_SHARED_MEMORY(void);\nstatic void handle_CMD_EVENT(void);void browserSendInt(int value);\nextern int gSqueakDebug;\n\n\n# define DPRINTF(ARGS) if (gSqueakDebug) fprintf ARGS\n\n\nextern int\tgSqueakBrowserPipes[];\n\n#define MAX_REQUESTS 128\n\n#define SQUEAK_READ 0\n#define SQUEAK_WRITE 1\n\n#define CMD_GET_URL        2\n#define CMD_POST_URL       3\n#define CMD_RECEIVE_DATA   4\n#define CMD_SHARED_MEMORY  5\n#define CMD_DRAW_CLIP\t   6\n#define CMD_EVENT\t\t   7\n#define CMD_SET_CURSOR\t   8\n\ntypedef struct sqStreamRequest {\n  char *localName;\n  int semaIndex;\n  int state;\n} sqStreamRequest;\n\nstatic sqStreamRequest *requests[MAX_REQUESTS];\nSqueakSharedMemoryBlock *SharedMemoryBlock = NULL;\nstatic int SharedMemoryfd;\nvolatile CGContextRef SharedBrowserBitMapContextRef=NULL;\nint SharedBrowserBitMapLength = 0;\nextern Boolean gSqueakBrowserSubProcess;\nstatic int rowBytes=0, width=0,  height=0;\n\t\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\n\n\n/*** Proxy Functions ***/\n#define stackValue(i) (interpreterProxy->stackValue(i))\n#define stackIntegerValue(i) (interpreterProxy->stackIntegerValue(i))\n#define successFlag (!interpreterProxy->failed())\n#define success(bool) (interpreterProxy->success(bool))\n#define arrayValueOf(oop) (interpreterProxy->arrayValueOf(oop))\n#define checkedIntegerValueOf(oop) (interpreterProxy->checkedIntegerValueOf(oop))\n#define fetchArrayofObject(idx,oop) (interpreterProxy->fetchArrayofObject(idx,oop))\n#define fetchFloatofObject(idx,oop) (interpreterProxy->fetchFloatofObject(idx,oop))\n#define fetchIntegerofObject(idx,oop) (interpreterProxy->fetchIntegerofObject(idx,oop))\n#define floatValueOf(oop) (interpreterProxy->floatValueOf(oop))\n#define pop(n) (interpreterProxy->pop(n))\n#define pushInteger(n) (interpreterProxy->pushInteger(n))\n#define sizeOfSTArrayFromCPrimitive(cPtr) (interpreterProxy->sizeOfSTArrayFromCPrimitive(cPtr))\n#define storeIntegerofObjectwithValue(idx,oop,value) (interpreterProxy->storeIntegerofObjectwithValue(idx,oop,value))\n#define primitiveFail() interpreterProxy->primitiveFail()\n#define pushBool(n) (interpreterProxy->pushBool(n))\n#define failed() (interpreterProxy->failed())\n#define isBytes(n) (interpreterProxy->isBytes(n))\n#define byteSizeOf(n) (interpreterProxy->byteSizeOf(n))\n#define stackObjectValue(n) (interpreterProxy->stackObjectValue(n))\n#define firstIndexableField(n) (interpreterProxy->firstIndexableField(n))\n#define push(n) (interpreterProxy->push(n))\n#define positive32BitIntegerFor(n) (interpreterProxy->positive32BitIntegerFor(n))\n#define methodArgumentCount(n) (interpreterProxy->methodArgumentCount(n))\n#define nilObject(n) (interpreterProxy->nilObject(n))\n\n\nint primitivePluginBrowserReady(void) {\n   if (gSqueakBrowserSubProcess)\n     {\n      pop(1);\n      pushBool(1);\n    }\n  else\n    primitiveFail();\n  return 1;\n}\n\n\nint plugInNotifyUser(char *msg) {\n  /* Notify the user that there was a problem starting Squeak. */\n\tunsigned char *\t\tnotificationMsg = malloc(256);\n\tNMRec\t\t*notifyRec = malloc(sizeof(NMRec));\n\n\tCopyCStringToPascal(msg,notificationMsg); /* copy message, since notification is asynchronous */\n\n\tnotifyRec->qType = nmType;\n\tnotifyRec->nmMark = false;\t\t\t/* no mark in applications menu */\n\tnotifyRec->nmIcon = nil;\t\t\t\t/* no menu bar icon */\n\tnotifyRec->nmSound = (Handle) -1;\t/* -1 means system beep */\n\tnotifyRec->nmStr = notificationMsg;\n\tnotifyRec->nmResp = (NMUPP) -1;\t\t/* -1 means remove notification when user confirms */\n\n\t/* add to notification queue */\n\tNMInstall(notifyRec);\n\treturn 0;\n}\n\n\nint plugInTimeToReturn(void) {\n\textern Boolean\t\t\tgSqueakBrowserExitRequested;\n\n    if (gSqueakBrowserSubProcess && gSqueakBrowserExitRequested)\n        return true;\n    return false;\n}\n\nBoolean inline browserActiveAndDrawingContextOk() {\n\treturn gSqueakBrowserSubProcess && SharedBrowserBitMapContextRef;\n}\n\nBoolean inline browserActiveAndDrawingContextOkAndInFullScreenMode() {\n\textern Boolean gSqueakBrowserWasHeadlessButMadeFullScreen;\n\textern sqInt getFullScreenFlag(void);\n\treturn browserActiveAndDrawingContextOk() && gSqueakBrowserWasHeadlessButMadeFullScreen && getFullScreenFlag();\n}\n\nBoolean inline browserActiveAndDrawingContextOkAndNOTInFullScreenMode() {\n\textern sqInt getFullScreenFlag(void);\n\treturn browserActiveAndDrawingContextOk() && !getFullScreenFlag();\n}\n\nvoid setupPipes() { \n\tDPRINTF((stderr,\"VM: setupPipes()\\n\"));\n\taioEnable(gSqueakBrowserPipes[SQUEAK_READ], 0, AIO_EXT); \n\taioHandle(gSqueakBrowserPipes[SQUEAK_READ], npHandler, AIO_RX);\n}\n\n\n/*\n  browserProcessCommand:\n  Handle commands sent by the plugin.\n*/\nvoid browserProcessCommand(void)\n{\n  static Boolean firstTime= true;\n  int cmd, n;\n  \n  if (firstTime)\n    {\n      firstTime= false;\n      /* enable non-blocking reads */\n      fcntl(gSqueakBrowserPipes[SQUEAK_READ], F_SETFL, O_NONBLOCK);\n    }\n \n  n = read(gSqueakBrowserPipes[SQUEAK_READ], &cmd, 4);\n  if (0 == n || (-1 == n && EAGAIN == errno))\n    return;\n\n if (n == -1)\n\tDPRINTF((stderr,\"VM: browserProcessCommand() error on read %i\\n\",errno));\n\n if (!(cmd == CMD_EVENT))\n\tDPRINTF((stderr,\"VM: browserProcessCommand() %i\\n\",cmd));\n\n  switch (cmd)\n    {\n    case CMD_RECEIVE_DATA:\n      /* Data is coming in */\n      browserReceiveData();\n      break;\n\tcase CMD_SHARED_MEMORY:\n\t\thandle_CMD_SHARED_MEMORY();\t\t\n\t\tbreak;\n\tcase CMD_EVENT:\n\t\thandle_CMD_EVENT();\n\t\tbreak;\n    default:\n      DPRINTF((stderr, \"VM: Unknown command from Plugin: %i\\n\", cmd));\n    }\n}\n\nstatic void handle_CMD_SHARED_MEMORY() {\n\n\tint tempRowBytes,tempWidth,tempHeight;\n\t\n\tCGColorSpaceRef colorspace;\n\tCGContextRef TempSharedBrowserBitMapContextRef;\n\t\n\tbrowserReceive(&SharedMemoryfd, 4);\n\tbrowserReceive(&tempWidth, 4);\n\tbrowserReceive(&tempHeight, 4);\n\tbrowserReceive(&tempRowBytes, 4);\n\tif (rowBytes == tempRowBytes &&\n\t\twidth == tempWidth &&\n\t\theight == tempHeight) \n\t\t\treturn;\n\t\t\t\n\trowBytes = tempRowBytes;\n\twidth = tempWidth;\n\theight = tempHeight;\n\t\n\tif (SharedMemoryBlock) {\n\t\tDPRINTF((stderr,\"VM: munmap %i \\n\",(int) SharedMemoryBlock));\n\t\tmunmap(SharedMemoryBlock,SharedBrowserBitMapLength);\n\t}\n\t\t\t\n\tSharedBrowserBitMapLength = rowBytes*height+20;\n\tSharedMemoryBlock= mmap(0, SharedBrowserBitMapLength, PROT_READ | PROT_WRITE, MAP_SHARED, SharedMemoryfd,0);\n\tif (SharedMemoryBlock == MAP_FAILED)\t{ \n\t\tperror(\"mmap returns error\");\n\t\tDPRINTF((stderr,\"VM: handle_CMD_SHARED_MEMORY failed mmap length was %i fd was %i \\n\",SharedBrowserBitMapLength,SharedMemoryfd));\n\t\treturn;\n\t}\n\tSharedMemoryBlock->written = 0;\n\t\n\tDPRINTF((stderr,\"VM: browserProcessCommand(width %i height %i rowbytes %i SharedMemoryBlock %i at %i)\\n\", width, height, rowBytes,SharedMemoryfd,(int) SharedMemoryBlock));\n\n\tif ((TempSharedBrowserBitMapContextRef = SharedBrowserBitMapContextRef)) {\n\t\tSharedBrowserBitMapContextRef = NULL;\n\t\tDPRINTF((stderr,\"VM: free bitmap context %i \\n\",(int) TempSharedBrowserBitMapContextRef));\n\t\tCFRelease(TempSharedBrowserBitMapContextRef);\n\t}\n\t\n\t  {\n\t\t\t// Get the Systems Profile for the main display\n\t\tCMProfileRef sysprof = NULL;\n\t\tif (CMGetSystemProfile(&sysprof) == noErr) {\n\t\t\t// Create a colorspace with the systems profile\n\t\t\tcolorspace = CGColorSpaceCreateWithPlatformColorSpace(sysprof);\n\t\t\tCMCloseProfile(sysprof);\n\t\t} else \n\t\t\tcolorspace = CGColorSpaceCreateDeviceRGB();\n\t  }\n\t{ \n\t\textern int makeMainWindow(void);\n\t\tif (getSTWindow() == NULL) {\n\t\t\tmakeMainWindow();\n\t\t}\n\t\t  SizeWindow(getSTWindow(), width, height, true);\n\t\tDPRINTF((stderr,\"VM: Size Window to %i @ %i \\n\",width,height));\n\t}\n\tSharedBrowserBitMapContextRef = CGBitmapContextCreate (SharedMemoryBlock->screenBits,width,height,8,rowBytes,colorspace,kCGImageAlphaNoneSkipFirst);\n\tDPRINTF((stderr,\"VM: made bitmap context ref %i\\n\", (int) SharedBrowserBitMapContextRef));\n}\n\nstatic void handle_CMD_EVENT() {\n\tEventRecord\ttheEvent;\n\tEventRecord *eventPtr = &theEvent;\n\textern int gButtonIsDown;\n\t\n#define getFocusEvent\t    (osEvt + 16)\n#define loseFocusEvent\t    (osEvt + 17)\n#define adjustCursorEvent   (osEvt + 18)\n\n\tbrowserReceive(&theEvent, sizeof(EventRecord));\n\tif (browserActiveAndDrawingContextOkAndInFullScreenMode())\n\t\t\treturn;\n\t\t\t\n\tswitch (eventPtr->what) {\n\t\t\t\tcase mouseUp:\n\t\t\t\t\tgButtonIsDown = false;\n\t\t\t\t\trecordMouseEvent(eventPtr);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase mouseDown:\n\t\t\t\t\tgButtonIsDown = true;\n\t\t\t\t\trecordMouseEvent(eventPtr);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase nullEvent :\n\t\t\t\t\teventPtr->what = kEventMouseMoved;\n\t\t\t\t\trecordMouseEvent(eventPtr);\n\t\t\t\t\tbreak;    \t\t\n\t\t\t\t\t\n\t    \t\tcase keyDown:\n\t    \t\tcase autoKey:\n\t\t\t\t\t\trecordKeyboardEvent(eventPtr,EventKeyDown);\n\t    \t\tbreak;\n\n\t\t\t\tcase keyUp:\n\t\t\t\t\t\trecordKeyboardEvent(eventPtr,EventKeyUp);\n\t\t\t\tbreak;\n\n\t    \t\tcase updateEvt:\n\t\t\t\t\tif (browserActiveAndDrawingContextOk())\n\t\t\t\t\t\tfullDisplayUpdate();  /* ask VM to call ioShowDisplay */\n\t    \t\tbreak;\n\t    \t\tcase getFocusEvent:\n\t    \t\tbreak;\n\t    \t\tcase loseFocusEvent:\n\t    \t\tbreak;\n\t    \t\tcase adjustCursorEvent:\n\t    \t\tbreak;\n\t    \t\t\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\n}\n\nstatic void npHandler(int fd, void *data, int flags)\n{\n#pragma unused(fd,data,flags)\n  browserProcessCommand();\n  aioHandle(gSqueakBrowserPipes[0], npHandler, AIO_RX);\n}\n\t\n\n\n/*\n  browserReceiveData:\n  Called in response to a CMD_RECEIVE_DATA message.\n  Retrieves the data file name and signals the semaphore.\n*/\nstatic void browserReceiveData(void)\n{\n  char *localName= NULL;\n  int id, ok;\n  char  unixName[4096];\n  char pathToGiveToSqueak[2048];\n  \n  browserReceive(&id, 4);\n  browserReceive(&ok, 4);\n\n  DPRINTF((stderr,\"VM:  receiving data id: %i state %i\\n\", id, ok));\n\n  if (ok == 1) {\n    int length= 0;\n    browserReceive(&length, 4);\n    if (length) {\n      browserReceive(unixName, length);\n      unixName[length]= 0;\n      DPRINTF((stderr,\"VM:   got filename %s\\n\", unixName));\n\t  ux2sqPath(unixName,length, pathToGiveToSqueak, 2048,1);\t\n      localName = malloc(strlen(pathToGiveToSqueak)+1);\n\t  strcpy(localName,pathToGiveToSqueak);\n      DPRINTF((stderr,\"VM:   becomes squeak filename for %s\\n\", localName));\n    }\n  }\n  if (id >= 0 && id < MAX_REQUESTS) {\n    sqStreamRequest *req= requests[id];\n    if (req) {\n      req->localName= localName;\n      req->state= ok;\n      DPRINTF((stderr,\"VM:  signaling semaphore, state=%i\\n\", ok));\n      signalSemaphoreWithIndex(req->semaIndex);\n    }\n  }\n}\n\n\n/*\n  browserGetURLRequest:\n  Notify plugin to get the specified url into target\n*/\nstatic void browserGetURLRequest(int id, char* url, int urlSize, \n\t\t\t\tchar* target, int targetSize)\n{\n\n  if (!gSqueakBrowserSubProcess) {\n    DPRINTF((stderr, \"Cannot submit URL request -- \"\n\t    \"there is no connection to a browser\\n\"));\n    return;\n  }\n\n  browserSendInt(CMD_GET_URL);\n  browserSendInt(id);\n\n  browserSendInt(urlSize);\n  if (urlSize > 0)\n    browserSend(url, urlSize);\n\n  browserSendInt(targetSize);\n  if (targetSize > 0)\n    browserSend(target, targetSize);\n}\n\n\n/*\n  browserPostURLRequest:\n  Notify plugin to post data to the specified url and get result into target\n*/\n\nstatic void browserPostURLRequest(int id, char* url, int urlSize, \n\t\t\t\t char* target, int targetSize, \n\t\t\t\t char* postData, int postDataSize)\n{\n  \n  if (!gSqueakBrowserSubProcess) {\n    DPRINTF((stderr, \"Cannot submit URL post request -- \"\n\t    \"there is no connection to a browser\\n\"));\n    return;\n  }\n\n  browserSendInt(CMD_POST_URL);\n  browserSendInt(id);\n\n  browserSendInt(urlSize);\n  if (urlSize > 0)\n    browserSend(url, urlSize);\n\n  browserSendInt(targetSize);\n  if (targetSize > 0)\n    browserSend(target, targetSize);\n\n  browserSendInt(postDataSize);\n  if (postDataSize > 0)\n    browserSend(postData, postDataSize);\n}\n\nvoid browserSetCursor(Cursor *macCursor) {\n\tbrowserSendInt(CMD_SET_CURSOR);\n    browserSend(macCursor, sizeof(Cursor));\n\n}\n\n/* helper functions */\n\nstatic void browserReceive(void *buf, size_t count)\n{\n  ssize_t n;\n  do {\n    n= read(gSqueakBrowserPipes[SQUEAK_READ], buf, count);\n  } while (n == -1 && (errno == EINTR || errno == EAGAIN));\n\n  if (count == 44444) \n\tDPRINTF((stderr, \"VM: Read 4 bytes %i\\n\",*(int*)buf));\n\n  if (n == -1)\n    perror(\"Squeak read failed:\");\n  if (n < (ssize_t) count)\n    DPRINTF((stderr, \"Squeak read too few data from pipe\\n\"));\n}\n\n\nstatic void browserSend(const void *buf, size_t count)\n{\n  ssize_t n;\n  do {\n\tn= write(gSqueakBrowserPipes[SQUEAK_WRITE], buf, count);\n    } while (n == -1 && (errno == EINTR  || errno == EAGAIN));\n\n  if (count == 44444) \n\tDPRINTF((stderr, \"VM: Send 4 bytes %i\\n\",*(int*)buf));\n\n  if (n == -1)\n    perror(\"Squeak plugin write failed:\");\n  if (n < (ssize_t) count)\n    DPRINTF((stderr, \"Squeak wrote too few data to pipe\\n\"));\n}\n\nvoid browserSendInt(int value)\n{\n  browserSend(&value, 4);\n}\nextern int windowActive;\n\nstatic int MacRomanToUnicode[256] = \n{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,\n 25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,\n 47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,\n 69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,\n 91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,\n 110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,\n 127,196,197,199,201,209,214,220,225,224,226,228,227,229,231,233,232,\n 234,235,237,236,238,239,241,243,242,244,246,245,250,249,251,252,8224,\n 176,162,163,167,8226,182,223,174,169,8482,180,168,8800,198,216,8734,177,\n 8804,8805,165,181,8706,8721,8719,960,8747,170,186,937,230,248,191,161,172,\n 8730,402,8776,8710,171,187,8230,160,192,195,213,338,339,8211,8212,8220,8221,\n 8216,8217,247,9674,255,376,8260,8364,8249,8250,64257,64258,8225,183,8218,8222,\n 8240,194,202,193,203,200,205,206,207,204,211,212,63743,210,218,219,217,305,710,\n 732,175,728,729,730,184,733,731,711};\n\n\nvoid recordMouseEvent(EventRecord *theEvent)  {\n\tUInt32  carbonModifiers;\n\tEventRef tmpEvent;\n\tEventMouseButton mouseButton=0;\n\twindowActive = 1;\n\t\n\tmouseButton = MouseModifierStateFromBrowser(theEvent);\n\tcarbonModifiers = theEvent->modifiers;\n\n\tif (!(theEvent->what == 5))\n\t\tDPRINTF((stderr,\"VM: recordMouseEvent() carbonModifers %i mouseButton %i v %i h %i\\n\",(int) carbonModifiers,mouseButton,theEvent->where.v,theEvent->where.h));\n\tif (theEvent->what == kEventMouseMoved && mouseButton) \n\t\ttheEvent->what = kEventMouseDragged;\n\tif (theEvent->what == kEventMouseDown)\n\t\tDPRINTF((stderr,\"VM: recordMouseEvent() cmd %i option %i control %i shift %i\\n\",(int) carbonModifiers & cmdKey,\n\t\t(int) carbonModifiers & optionKey,\n\t\t(int) carbonModifiers & controlKey,\n\t\t(int) carbonModifiers & shiftKey));\n\t\n\tMacCreateEvent(kCFAllocatorDefault, kEventClassMouse, theEvent->what, 0, kEventAttributeUserEvent, &tmpEvent);\n\tSetEventParameter(tmpEvent,kEventParamMouseLocation,typeQDPoint,sizeof(Point),&theEvent->where);\n\tSetEventParameter(tmpEvent,kEventParamKeyModifiers,typeUInt32,sizeof(UInt32),&carbonModifiers);\n\tSetEventParameter(tmpEvent,kEventParamMouseButton,typeMouseButton,sizeof(EventMouseButton),&mouseButton);\n\trecordMouseEventCarbon(tmpEvent,theEvent->what,true);\n\tReleaseEvent(tmpEvent);\n}\n\nint MouseModifierStateFromBrowser(EventRecord *theEvent) {\n\tint stButtons;\n\n\tstButtons = 0;\n\tif ((theEvent->modifiers & btnState) == false) {  /* is false if button is down */\n\t\tstButtons = 1;\t\t/* red button by default */\n\t\tif ((theEvent->modifiers & optionKey) != 0) {\n\t\t\tstButtons = 3;\t/* yellow button if option down */\n\t\t}\n\t\tif ((theEvent->modifiers & cmdKey) != 0) {\n\t\t\tstButtons = 2;\t/* blue button if command down */\n\t\t}\n\t} \n\n\treturn stButtons;\n}\n\nint recordKeyboardEvent(EventRecord *theEvent, int keyType) {\n\tint asciiChar, modifierBits;\n\tsqKeyboardEvent *evt, *extra;\n\textern pthread_mutex_t gEventQueueLock;\n\textern sqInputEvent *nextEventPut(void);\n\textern int MouseModifierState(EventRecord *theEvent);\n\t\n\tpthread_mutex_lock(&gEventQueueLock);\n\tevt = (sqKeyboardEvent*) nextEventPut();\n\n\t/* keystate: low byte is the ascii character; next 4 bits are modifier bits */\n\tasciiChar = theEvent->message & charCodeMask;\n\t//modifierBits = MouseModifierStateFromBrowser(theEvent); //Capture mouse/option states\n\t//modifierBits = (modifierMap[(theEvent->modifiers >> 8)] << 3) | (modifierBits  & 0x7);\n\tmodifierBits = MouseModifierState(theEvent);\n\tif (((modifierBits >> 3) & 0x9) == 0x9) {  /* command and shift */\n\t\tif ((asciiChar >= 97) && (asciiChar <= 122)) {\n\t\t\t/* convert ascii code of command-shift-letter to upper case */\n\t\t\tasciiChar = asciiChar - 32;\n\t\t}\n\t}\n\n\t/* first the basics */\n\tevt->type = EventTypeKeyboard;\n\tevt->timeStamp = ioMSecs() & MillisecondClockMask;\n\t/* now the key code */\n\t/* press code must differentiate */\n\t// Jan 2004, changed for TWEAK instead of doing virtual keycode return  unicode\n\t// Unicode generated from CFSTring\n\t// March 19th 2005, again alter we pass keyCode on keydown/keyup but pass unicode in keychar as extra field\n\tevt->charCode = (theEvent->message & keyCodeMask) >> 8;\n\tevt->pressCode = keyType;\n\tevt->modifiers = modifierBits >> 3;\n\tevt->utf32Code = 0;\n\tevt->windowIndex = windowActive;\n\t/* clean up reserved */\n\tevt->reserved1 = 0;\n\t/* generate extra character event */\n\tif (keyType == EventKeyDown) {\n\t\textra = (sqKeyboardEvent*)nextEventPut();\n\t\t*extra = *evt;\n\t\textra->charCode = asciiChar;\n\t\textra->pressCode = EventKeyChar;\n\t\textra->utf32Code = MacRomanToUnicode[asciiChar];\n\t}\n\tpthread_mutex_unlock(&gEventQueueLock);\n\tsignalAnyInterestedParties();    \n\treturn 1;\n}\n\n\n/*\n  primitivePluginRequestUrlStream: url with: semaIndex\n  Request a URL from the browser. Signal semaIndex\n  when the result of the request can be queried.\n  Returns a handle used in subsequent calls to plugin\n  stream functions.\n  Note: A request id is the index into requests[].\n*/\nint primitivePluginRequestURLStream()\n{\n  sqStreamRequest *req;\n  int id, length, semaIndex;\n  sqInt url;\n\n  if (!gSqueakBrowserSubProcess) return primitiveFail();\n\n  DPRINTF((stderr,\"VM: primitivePluginRequestURLStream()\\n\"));\n\n  for (id=0; id<MAX_REQUESTS; id++) {\n    if (!requests[id]) break;\n  }\n  if (id >= MAX_REQUESTS) return primitiveFail();\n\n  semaIndex= stackIntegerValue(0);\n  url= stackObjectValue(1);\n  if (failed()) return 0;\n\n  if (!isBytes(url)) return primitiveFail();\n\n  req= calloc(1, sizeof(sqStreamRequest));\n  if (!req) return primitiveFail();\n  req->localName= NULL;\n  req->semaIndex= semaIndex;\n  req->state= -1;\n  requests[id]= req;\n\n  length= byteSizeOf(url);\n  browserGetURLRequest(id, (char *) firstIndexableField(url), length, NULL, 0);\n  pop(3);\n  push(positive32BitIntegerFor(id));\n  DPRINTF((stderr,\"VM:   request id: %i\\n\", id));\n  return 1;\n}\n\n\n/*\n  primitivePluginRequestURL: url target: target semaIndex: semaIndex\n  Request a URL into the given target.\n*/\nint primitivePluginRequestURL()\n{\n  sqStreamRequest *req;\n  int urlLength;\n  int targetLength;\n  sqInt target,url;\n  int id, semaIndex;\n\n  if (!gSqueakBrowserSubProcess) return primitiveFail();\n  DPRINTF((stderr,\"VM: primitivePluginRequestURL()\\n\"));\n\n  for (id=0; id<MAX_REQUESTS; id++) {\n    if (!requests[id]) break;\n  }\n\n  if (id >= MAX_REQUESTS) return primitiveFail();\n\n  semaIndex= stackIntegerValue(0);\n  target= stackObjectValue(1);\n  url= stackObjectValue(2);\n\n  if (failed()) return 0;\n  if (!isBytes(url) || !isBytes(target)) return primitiveFail();\n\n  urlLength= byteSizeOf(url);\n  targetLength= byteSizeOf(target);\n\n  req= calloc(1, sizeof(sqStreamRequest));\n  if(!req) return primitiveFail();\n  req->localName= NULL;\n  req->semaIndex= semaIndex;\n  req->state= -1;\n  requests[id]= req;\n\n  browserGetURLRequest(id,  (char *)  firstIndexableField(url), urlLength, (char *)  firstIndexableField(target), targetLength);\n  pop(4);\n  push(positive32BitIntegerFor(id));\n  return 1;\n}\n\nstatic int isFileURL(int urlOop) {\n  int urlLen;\n  char *urlPtr;\n  urlLen = byteSizeOf(urlOop);\n  urlPtr =  (char *) firstIndexableField(urlOop);\n  while(*urlPtr == ' ' && urlLen) {\n    urlPtr++;\n    urlLen--;\n  }\n  if(urlLen < 5) return 0;\n  return strncmp(\"file:\", urlPtr, 5) == 0;\n}\n\n/*\n  primitivePluginPostURL\n*/\n/*\n  primitivePluginPostURL: url target: target data: data semaIndex: semaIndex\n  Post data to a URL.\n*/\nEXPORT(int) primitivePluginPostURL(void)\n{\n  sqStreamRequest *req;\n  int urlLength;\n  int dataLength;\n  sqInt data,target,url,targetLength;\n  int id, semaIndex;\n\n  if (!gSqueakBrowserSubProcess) return primitiveFail();\n  if(methodArgumentCount() != 4) return primitiveFail();\n  for(id=0; id<MAX_REQUESTS;id++) {\n    if(!requests[id]) break;\n  }\n\n  if(id >= MAX_REQUESTS) return primitiveFail();\n\n  semaIndex = stackIntegerValue(0);\n  data = stackObjectValue(1);\n  target = stackObjectValue(2);\n  url = stackObjectValue(3);\n\n  if(failed()) return 0;\n  if(!isBytes(url) || !isBytes(data)) return primitiveFail();\n  if(isFileURL(url)) return primitiveFail();\n\n  if(target == nilObject()) {\n    target = 0;\n    targetLength = 0;\n  } else {\n    if(!isBytes(target)) return primitiveFail();\n    targetLength = byteSizeOf(target);\n  }\n\n  urlLength = byteSizeOf(url);\n  dataLength = byteSizeOf(data);\n\n  req = calloc(1, sizeof(sqStreamRequest));\n  if(!req) return primitiveFail();\n  req->localName = NULL;\n  req->semaIndex = semaIndex;\n  req->state = -1;\n  requests[id] = req;\n\n  browserPostURLRequest(id, \n\t\t (char *) firstIndexableField(url), urlLength, \n\t\ttarget ? ( (char *) firstIndexableField(target)) : NULL, targetLength,\n\t\t (char *) firstIndexableField(data), dataLength); \n  pop(4);\n  push(positive32BitIntegerFor(id));\n  return 1;\n}\n\n/* \n  primitivePluginRequestFileHandle: id\n  After a URL file request has been successfully\n  completed, return a file handle for the received\n  data. Note: The file handle must be read-only for\n  security reasons.\n*/\nint primitivePluginRequestFileHandle()\n{\n  sqStreamRequest *req;\n  int id, fileOop;\n  void *openFn;\n\n  DPRINTF((stderr,\"VM: primitivePluginRequestFileHandle()\\n\"));\n  id= stackIntegerValue(0);\n  if (failed()) return 0;\n  if (id < 0 || id >= MAX_REQUESTS) return primitiveFail();\n\n  req= requests[id];\n  if (!req || !req->localName) return primitiveFail();\n\n  fileOop= nilObject();\n\n  if (req->localName)\n    {\n      DPRINTF((stderr,\"VM: Creating file handle for %s\\n\", req->localName));\n \n      openFn= ioLoadFunctionFrom(\"fileOpenNamesizewritesecure\", \"FilePlugin\");\n      if (!openFn)\n      {\n\tDPRINTF((stderr,\"VM:   Couldn't load fileOpenName:size:write:secure: from FilePlugin!\\n\"));\n\treturn primitiveFail();\n      }\n  \n      fileOop= ((sqInt (*)(char *, sqInt, sqInt, sqInt))openFn)\n\t(req->localName, strlen(req->localName), 0 /* readonly */, 0 /* insecure */);\n \n      /* if file ends in a $, it was a temp link created by the plugin */\n      if ('$' == req->localName[strlen(req->localName) - 1])\n      {\n\tDPRINTF((stderr,\"VM:   unlink %s\\n\", req->localName));\n\tif (-1 == unlink(req->localName))\n\t  DPRINTF((stderr,\"VM:   unlink failed: %s\\n\", strerror(errno)));\n      }\n\n      if (failed()) \n\t{\n\t  DPRINTF((stderr,\"VM:   file open failed\\n\"));\n\t  return 0;\n\t}\n    }\n  pop(2);\n  push(fileOop);\n  return 1;\n}\n\n\n/*\n  primitivePluginDestroyRequest: id\n  Destroy a request that has been issued before.\n*/\nsqInt primitivePluginDestroyRequest()\n{\n  sqStreamRequest *req;\n  int id;\n\n  DPRINTF((stderr,\"VM: primitivePluginDestroyRequest()\\n\"));\n  id= stackIntegerValue(0);\n  if (id < 0 || id >= MAX_REQUESTS) return primitiveFail();\n  req= requests[id];\n  if (req) {\n    if (req->localName) free(req->localName);\n    free(req);\n  }\n  requests[id]= NULL;\n  pop(1);\n  return 1;\n}\n\n\n/*\n  primitivePluginRequestState: id\n  Return true if the operation was successfully completed.\n  Return false if the operation was aborted.\n  Return nil if the operation is still in progress.\n*/\nsqInt primitivePluginRequestState()\n{\n  sqStreamRequest *req;\n  int id;\n\n  DPRINTF((stderr,\"VM: primitivePluginRequestState()\\n\"));\n  id= stackIntegerValue(0);\n  if (id < 0 || id >= MAX_REQUESTS) return primitiveFail();\n  req= requests[id];\n  if (!req) return primitiveFail();\n  pop(2);\n  if (req->state == -1) push(nilObject());\n  else pushBool(req->state);\n  return 1;\n}\n\nint browserGetWindowSize() {\n\treturn (width << 16) | (height & 0xFFFF);  /* w is high 16 bits; h is low 16 bits */\n}\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacNSPluginUILogic2.h",
    "content": "/*\n *  sqMacNSPluginUILogic2.h\n *  SqueakVMUNIXPATHS\n *\n */\n\nvoid setupPipes(void);\nint plugInTimeToReturn(void);\nint plugInNotifyUser(char *msg);\nint primitivePluginBrowserReady(void);\nvoid browserProcessCommand(void);\nint MouseModifierStateFromBrowser(EventRecord*);\nvoid signalAnyInterestedParties(void);\nint recordKeyboardEvent(EventRecord *, int );\nvoid recordMouseEvent(EventRecord *);\nvoid recordMouseEventCarbon(EventRef ,UInt32 ,Boolean noPointConversion);\nBoolean inline browserActiveAndDrawingContextOk(void);\nvoid browserSetCursor(Cursor *macCursor);\nint primitivePluginRequestState(void);\nint primitivePluginDestroyRequest(void);\nint primitivePluginRequestFileHandle(void);\nint primitivePluginPostURL(void);\nint primitivePluginRequestURLStream(void);\nint primitivePluginRequestURL(void);\nint browserGetWindowSize(void);\nBoolean inline browserActiveAndDrawingContextOkAndNOTInFullScreenMode(void);\nBoolean inline browserActiveAndDrawingContextOkAndInFullScreenMode(void);\n\ntypedef struct SqueakSharedMemoryBlock {\n\tint\t\twritten;\n\tint\t\ttop;\n\tint\t\tright;\n\tint\t\tbottom;\n\tint\t\tleft;\n\tchar\tscreenBits[];\n} SqueakSharedMemoryBlock;"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacTime.c",
    "content": "/****************************************************************************\n*   PROJECT: Mac time and millisecond clock logic \n*   FILE:    sqMacTime.c\n*   CONTENT: \n*\n*   AUTHOR:  John McIntosh.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacTime.c 1468 2006-04-19 02:39:08Z johnmci $\n*\n*   NOTES: \n*  Feb 22nd, 2002, JMM moved code into 10 other files, see sqMacMain.c for comments\n*  Feb 27th, 2002, JMM a bit of cleanup for carbon event usage\n*  Apr 17th, 2002, JMM Use accessors for VM variables.\n*  Apr 25th, 2002, JMM low res clock is broken after 0x7FFFFFF\n*  3.9.1b2 Oct 4th, 2005 Jmm add MillisecondClockMask\n 3.8.11b1 Mar 4th, 2006 JMM refactor, cleanup and add headless support\n\n*****************************************************************************/\n#include \"sq.h\"\n#include \"sqMacTime.h\"\n#include \"sqMacUIEvents.h\"\n\n#include <pthread.h>\n#include <sys/types.h>\n#include <sys/time.h>\n#include <unistd.h>\n#include \"sqaio.h\"\n\nstatic struct timeval\t startUpTime;\n/*\n * In the Cog VMs time management is in platforms/unix/vm/sqUnixHeartbeat.c.\n */\n#if STACKVM\n/*\n * Compute the time via the old method for sanity checking purposes.\n */\nint ioOldMSecs() {\n  struct timeval now;\n  gettimeofday(&now, 0);\n  if ((now.tv_usec-= startUpTime.tv_usec) < 0) {\n    now.tv_usec+= 1000000;\n    now.tv_sec-= 1;\n  }\n  now.tv_sec-= startUpTime.tv_sec;\n  return (now.tv_usec / 1000 + now.tv_sec * 1000);\n}\nvoid SetUpTimers(void)\n{\nextern void ioInitTime(void);\n\n  /* set up the backwardcompatibility micro/millisecond clock */\n    gettimeofday(&startUpTime, 0);\n  /* setup the spiffy new 64-bit microsecond clock. */\n\tioInitTime();\n}\n#else /* STACKVM */\n\nvoid SetUpTimers(void)\n{\n  /* set up the micro/millisecond clock */\n    gettimeofday(&startUpTime, 0);\n}\n\nint ioMicroMSecs(void)\n{\n  struct timeval now;\n  gettimeofday(&now, 0);\n  if ((now.tv_usec-= startUpTime.tv_usec) < 0) {\n    now.tv_usec+= 1000000;\n    now.tv_sec-= 1;\n  }\n  now.tv_sec-= startUpTime.tv_sec;\n  return (now.tv_usec / 1000 + now.tv_sec * 1000);\n}\n\nint ioSeconds(void) {\n    time_t unixTime;\n\n    unixTime = time(0);\n    unixTime += localtime(&unixTime)->tm_gmtoff;\n    /* Squeak epoch is Jan 1, 1901.  Unix epoch is Jan 1, 1970: 17 leap years\n        and 52 non-leap years later than Squeak. */\n    return unixTime + ((52*365UL + 17*366UL) * 24*60*60UL);\n}\n\nint ioRelinquishProcessorForMicroseconds(int microSeconds) {\n\t/* This operation is platform dependent. \t */\n\n    long\t   realTimeToWait,now;\n\textern int getNextWakeupTick();\n\n    now = (ioMSecs() & MillisecondClockMask);\n    if (getNextWakeupTick() <= now)\n        if (getNextWakeupTick() == 0)\n            realTimeToWait = microSeconds;\n        else {\n            return 0;\n    }\n    else\n        realTimeToWait = (getNextWakeupTick() - now) * 1000; \n\n\taioSleepForUsecs(realTimeToWait);\n\n\treturn 0;\n}\n\n\n#undef ioMSecs\n//Issue with unix aio.c sept 2003\n\nint ioMSecs() {\n    return ioMicroMSecs();\n}\n#endif /* STACKVM */\n\ntime_t convertToSqueakTime(time_t unixTime)\n{\n#ifdef HAVE_TM_GMTOFF\n  unixTime+= localtime(&unixTime)->tm_gmtoff;\n#else\n# ifdef HAVE_TIMEZONE\n  unixTime+= ((daylight) * 60*60) - timezone;\n# else\n#  error: cannot determine timezone correction\n# endif\n#endif\n  /* Squeak epoch is Jan 1, 1901.  Unix epoch is Jan 1, 1970: 17 leap years\n     and 52 non-leap years later than Squeak. */\n  return unixTime + ((52*365UL + 17*366UL) * 24*60*60UL);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacTime.h",
    "content": "/****************************************************************************\n*   PROJECT: Squeak Headers\n*   FILE:    sqMacTime.c\n*   CONTENT: \n*\n*   AUTHOR:  John Maloney, John McIntosh, and others.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacTime.h 1344 2006-03-05 21:07:15Z johnmci $\n*\n*   NOTES: \n*  Feb 22nd, 2002, JMM moved code into 10 other files, see sqMacMain.c for comments\n****************************************************************************/\n\n    #include <Carbon/Carbon.h>\n\nvoid SetUpTimers(void);\ntime_t convertToSqueakTime(time_t unixTime);\nint ioLowResMSecs(void);\ntime_t convertToSqueakTime(time_t unixTime);\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacUIAppleEvents.c",
    "content": "/****************************************************************************\n*   PROJECT: mac apple event handler\n*   FILE:    sqMacUIAppleEvents.c\n*   CONTENT: \n*\n*   AUTHOR:  John Maloney, John McIntosh, and others.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacUIAppleEvents.c 1615 2007-03-11 00:07:44Z johnmci $\n*\n*   NOTES: \n*  3.7.3b2 Apr 10th, 2004 JMM Tetsuya HAYASHI <tetha@st.rim.or.jp>  encoding for image name at startup time.\n*  3.8.9b1 Sept 13th, 2005 JMM add logic to open application to open image files\n 3.8.11b1 Mar 4th, 2006 JMM refactor, cleanup and add headless support\n *\t3.8.14b1 Oct\t,2006 JMM browser rewrite\n\n*/\n\n#include \"sq.h\"\n#include \"sqMacUIAppleEvents.h\"\n#include \"sqMacUIConstants.h\"\n#include \"sqMacUIEvents.h\"\n#include \"sqMacEncoding.h\"\n#include \"sqMacFileLogic.h\"\n#include \"DropPlugin.h\"\n\nextern char gSqueakImageName;\n\nstruct HFSFlavorSqueak {\n  OSType              fileType;               /* file type */\n  OSType              fileCreator;            /* file creator */\n  UInt16              fdFlags;                /* Finder flags */\n  FSRef               theFSRef;               /* file system Ref */\n  };\ntypedef struct HFSFlavorSqueak                HFSFlavorSqueak;\n\nint getFirstImageNameIfPossible(AEDesc\t*fileList);\nvoid processDocumentsButExcludeOne(AEDesc\t*fileList,long whichToExclude);\nOSStatus SimpleRunAppleScript(const char* theScript);\nvoid sqRevealWindowAndHandleQuit () ;\n\n/*** Apple Event Handlers ***/\nstatic pascal OSErr HandleOpenAppEvent(const AEDescList *aevt,  AEDescList *reply, long refCon);\nstatic pascal OSErr HandleOpenDocEvent(const AEDescList *aevt,  AEDescList *reply, long refCon);\nstatic pascal OSErr HandlePrintDocEvent(const AEDescList *aevt, AEDescList *reply, long refCon);\nstatic pascal OSErr HandleQuitAppEvent(const AEDescList *aevt,  AEDescList *reply, long refCon);\n\n/*** Apple Event Handling ***/\n\nvoid InstallAppleEventHandlers() {\n\tOSErr\terr;\n\tlong\tresult;\n\n\terr = Gestalt(gestaltAppleEventsAttr, &result);\n\tif (err == noErr) {\n\t\tAEInstallEventHandler(kCoreEventClass, kAEOpenApplication, NewAEEventHandlerUPP(HandleOpenAppEvent),  0, false);\n\t\tAEInstallEventHandler(kCoreEventClass, kAEOpenDocuments,   NewAEEventHandlerUPP(HandleOpenDocEvent),  0, false);\n\t\tAEInstallEventHandler(kCoreEventClass, kAEPrintDocuments,  NewAEEventHandlerUPP(HandlePrintDocEvent), 0, false);\n\t\tAEInstallEventHandler(kCoreEventClass, kAEQuitApplication, NewAEEventHandlerUPP(HandleQuitAppEvent),  0, false);\n\t}\n}\n\npascal OSErr HandleOpenAppEvent(const AEDescList *aevt,  AEDescList *reply, long refCon) {\n\t/* User double-clicked application; look for \"Squeak.image\" in same directory */\n#pragma unused(aevt)\n#pragma unused(refCon)\n#pragma unused(reply)\n\n\t/* use default image name in same directory as the VM */\n\tSetShortImageNameViaString(&gSqueakImageName,gCurrentVMEncoding);\n\treturn noErr;\n}\n\npascal OSErr HandleOpenDocEvent(const AEDescList *aevt, AEDescList *reply, long refCon) {\n\t/* User double-clicked an image file. Record the path to the VM's directory,\n\t   then set the default directory to the folder containing the image and\n\t   record the image name. */\n\n\tOSErr\t\terr;\n\tAEDesc\t\tfileList = {'NULL', NULL};\n\tlong\t\tnumFiles, size, imageFileIsNumber;\n\tDescType\ttype;\n\tAEKeyword\tkeyword;\n\tFSRef\t\ttheFSRef;\n\tchar        shortImageName[SHORTIMAGE_NAME_SIZE+1];\n\tchar\t\tpathName[IMAGE_NAME_SIZE+1];\t\t\t\t\n\n#pragma unused(reply)\n#pragma unused(refCon)  /* reference args to avoid compiler warnings */\n\t\n\t/* copy document list */\n\terr = AEGetKeyDesc(aevt, keyDirectObject, typeAEList, &fileList);\n\tif (err) \n\t    return errAEEventNotHandled;;\n\n\t/* count list elements */\n\terr = AECountItems( &fileList, &numFiles);\n\tif (err) \n\t    goto done;\n\t\n\tif (!ShortImageNameIsEmpty()) {\n        /* Do the rest of the documents */\n        processDocumentsButExcludeOne(&fileList,-1);\n\t\tgoto done;\n\t}\n\n    imageFileIsNumber = getFirstImageNameIfPossible(&fileList);\n    \n    if (imageFileIsNumber == 0) { \n\t\tSetShortImageNameViaString(&gSqueakImageName,gCurrentVMEncoding);\n\t\tif (numFiles)\n\t\t\tgoto processPendingDocs;\n\t\telse\n\t\t\tgoto done;\n    } else {\n    \t/* get image name */\n    \terr = AEGetNthPtr(&fileList, imageFileIsNumber, typeFSRef, &keyword, &type, (Ptr) &theFSRef, sizeof(theFSRef), &size);\n    \tif (err) \n    \t    goto done;\n    \t        \t\t\n\t\tPathToFileViaFSRef(pathName, IMAGE_NAME_SIZE, &theFSRef,gCurrentVMEncoding);\n\t\tgetLastPathComponentInCurrentEncoding(pathName,shortImageName,gCurrentVMEncoding);\n\t\tSetShortImageNameViaString(shortImageName,gCurrentVMEncoding);\n        SetImageNameViaString(pathName,gCurrentVMEncoding);\n   }\n    \n    /* Do the rest of the documents */\nprocessPendingDocs:\n    processDocumentsButExcludeOne(&fileList,imageFileIsNumber);\ndone:\n\tAEDisposeDesc(&fileList);\n\treturn err;\n}\n\nvoid processDocumentsButExcludeOne(AEDesc\t*fileList,long whichToExclude) {\n\tOSErr\t\terr;\n\tlong\t\tnumFiles, size, i, actualFilteredNumber=0,actualFilteredIndexNumber;\n\tDescType\ttype;\n\tAEKeyword\tkeyword;\n\tFSRef\t\ttheFSRef;\n\tFInfo\t\tfinderInformation;\n    EventRecord theEvent;\n    HFSFlavorSqueak   dropFile;\n    Point       where;\n\tchar        shortImageName[SHORTIMAGE_NAME_SIZE+1];\n\tchar\t\tpathName[IMAGE_NAME_SIZE+1];\t\t\t\t\n\n\t/* count list elements */\n\terr = AECountItems( fileList, &numFiles);\n\tif (err)\n\t    return;\n\t\n\ttheEvent.what = 0;\n\ttheEvent.message = 0;\n\ttheEvent.when = TickCount();\n\twhere.v = 100;\n\twhere.h = 100;\n\ttheEvent.where = where;\n\ttheEvent.modifiers = 0;\n\t\n\tfor(i=1;i<=numFiles;i++) {\n\t    err = AEGetNthPtr(fileList, i, typeFSRef,  &keyword, &type, (Ptr) &theFSRef, sizeof(FSRef), &size);\n\t    if (err) \n\t        goto done;\n\t\n\t\terr = getFInfoViaFSRef(&theFSRef,&finderInformation);\n\t    if (err) \n\t        goto done;\n\t\t\n\t    if (i == whichToExclude || (finderInformation.fdCreator == 'MACS' && \n\t        (finderInformation.fdType == 'fold' ||\n    \t\tfinderInformation.fdType == 'disk'))) \n\t        continue;\n\t\tPathToFileViaFSRef(pathName, IMAGE_NAME_SIZE, &theFSRef,gCurrentVMEncoding);\n\t\tgetLastPathComponentInCurrentEncoding(pathName,shortImageName,gCurrentVMEncoding);\n\n       if (IsImageName(shortImageName)  || finderInformation.fdType == 'STim') {\n\t\t\tchar commandStuff[4096];\n\t\t\textern char **argVec;\n\t\t\t\t\t\n\t\t\tPathToFileViaFSRef(pathName, 2048, &theFSRef,kCFStringEncodingMacRoman);\n\t\t\tcommandStuff [0] = 0x00;\n\t\t\tstrcat(commandStuff,\"set pimage to  \\\"\");\n\t\t\tstrcat(commandStuff,pathName);\n\t\t\tstrcat(commandStuff,\"\\\" \\n\");\n\t\t\tstrcat(commandStuff,\"set qimage to quoted form of pimage\\n\");\n\t\t\tstrcat(commandStuff,\"set pVM to \\\"\");\n\t\t\tstrcat(commandStuff,argVec[0]);\n\t\t\tstrcat(commandStuff,\"\\\"\\n\");\n\t\t\tstrcat(commandStuff,\"set qVM to quoted form of pVM\\n\");\n\t\t\tstrcat(commandStuff,\"do shell script qVM\");\n\t\t\tstrcat(commandStuff,\" & \\\" \\\" &  qimage\");\n\t\t\tstrcat(commandStuff,\" & \\\" &> /dev/null &  echo $!\\\" \\n\");\n\t\t\tstrcat(commandStuff,\"set pid to the result as number\\n\");\n\t\t\tstrcat(commandStuff,\"on findProcessID(appID)\\n\");\n\t\t\tstrcat(commandStuff,\"  tell application \\\"Finder\\\"\\n\");\n\t\t\tstrcat(commandStuff,\"    repeat with ap in every application process\\n\");\n\t\t\tstrcat(commandStuff,\"      if class idux of ap is appID then return ap\\n\");\n\t\t\tstrcat(commandStuff,\"    end repeat\\n\");\n\t\t\tstrcat(commandStuff,\"  end tell\\n\");\n\t\t\tstrcat(commandStuff,\"end findProcessID\\n\");\n\t\t\tstrcat(commandStuff,\"delay 1\\n\");\n\t\t\tstrcat(commandStuff,\"set a to findProcessID(pid)\\n\");\n\t\t\tstrcat(commandStuff,\"set the frontmost of a to true\\n\");\n\t\t\t\n\t\t\tSimpleRunAppleScript(commandStuff);\n\t\t\tcontinue;\n\t\t\t}\n\t    actualFilteredNumber++;\n\n    }\n\n    if (actualFilteredNumber == 0) \n        goto done;\n        \n    sqSetNumberOfDropFiles(actualFilteredNumber);\n    actualFilteredIndexNumber=1;\n    \n    recordDragDropEvent(&theEvent, actualFilteredNumber, DragEnter);\n    for(i=1;i<=numFiles;i++) {\n\t    err = AEGetNthPtr(fileList, i, typeFSRef,  &keyword, &type, (Ptr) &theFSRef, sizeof(FSRef), &size);\n\t    if (err) \n\t        goto done;\n\t\n\t\terr = getFInfoViaFSRef(&theFSRef,&finderInformation);\n\t    if (err) \n\t        goto done;\n\t\t\n\t    if (i == whichToExclude || (finderInformation.fdCreator == 'MACS' && \n\t        (finderInformation.fdType == 'fold' ||\n    \t\tfinderInformation.fdType == 'disk'))) \n\t        continue;\n\n\t\t\n\t    dropFile.fileType = finderInformation.fdType;\n\t    dropFile.fileCreator = finderInformation.fdCreator;\n\t    dropFile.fdFlags = finderInformation.fdFlags;\n\t\tdropFile.theFSRef = theFSRef;\n\t     \n        sqSetFileInformation(actualFilteredIndexNumber, &dropFile);\n        actualFilteredIndexNumber++;\n    }\n\ttheEvent.where = where;\n    recordDragDropEvent(&theEvent, actualFilteredNumber, DragDrop);\n\ttheEvent.where = where;\n    recordDragDropEvent(&theEvent, actualFilteredNumber, DragLeave);\n   \n   done: \n   return;\n    \n}\n\n\nint getFirstImageNameIfPossible(AEDesc\t*fileList) {\n\tOSErr\t\terr;\n\tlong\t\tnumFiles, size, i;\n\tDescType\ttype;\n\tAEKeyword\tkeyword;\n\tFSRef\t\ttheFSRef;\n\tFInfo\t\tfinderInformation;\n\tchar        shortImageName[SHORTIMAGE_NAME_SIZE+1];\n\n\t/* count list elements */\n\terr = AECountItems( fileList, &numFiles);\n\tif (err) \n\t    goto done;\n\t\n\t/* get image name */\n\tfor(i=1;i<=numFiles;i++) {\n\t    err = AEGetNthPtr(fileList, i, typeFSRef,\n\t\t\t\t\t  &keyword, &type, (Ptr) &theFSRef, sizeof(FSRef), &size);\n\t    if (err) \n\t        goto done;\n\t\terr = getFInfoViaFSRef(&theFSRef,&finderInformation);\n\t    if (err) \n\t        goto done;\n                \n\t\t{\n\t\t\tchar pathName[DOCUMENT_NAME_SIZE+1];\n\t\t\t\t\n\t\t\tPathToFileViaFSRef(pathName, DOCUMENT_NAME_SIZE, &theFSRef,gCurrentVMEncoding);\n\t\t\tgetLastPathComponentInCurrentEncoding(pathName,shortImageName,gCurrentVMEncoding);\n\t\t}\n\t\tSetShortImageNameViaString(shortImageName,gCurrentVMEncoding);\n\n        if (IsImageName(shortImageName)  || finderInformation.fdType == 'STim')\n            return i;\n    }\n    done: \n        return 0;\n}       \n\n\npascal OSErr HandlePrintDocEvent(const AEDescList *aevt,  AEDescList *reply, long refCon) {\n#pragma unused(aevt)\n#pragma unused(reply)\n#pragma unused(refCon)  /* reference args to avoid compiler warnings */\n\treturn errAEEventNotHandled;\n}\n\npascal OSErr HandleQuitAppEvent(const AEDescList *aevt,  AEDescList *reply, long refCon) {\n#pragma unused(aevt)\n#pragma unused(reply)\n#pragma unused(refCon)  /* reference args to avoid compiler warnings */\n\textern Boolean gSqueakQuitOnQuitAppleEvent;\n\t\n\tif (gSqueakQuitOnQuitAppleEvent) {\n\t\tsqRevealWindowAndHandleQuit ();\n\t}\n\treturn noErr;  \n}\n\n\n/* LowRunAppleScript compiles and runs an AppleScript\n    provided as text in the buffer pointed to by text.  textLength\n    bytes will be compiled from this buffer and run as an AppleScript\n    using all of the default environment and execution settings.  If\n    resultData is not NULL, then the result returned by the execution\n    command will be returned as typeChar in this descriptor record\n    (or typeNull if there is no result information).  If the function\n    returns errOSAScriptError, then resultData will be set to a\n    descriptive error message describing the error (if one is\n    available).  */\nstatic OSStatus LowRunAppleScript(const void* text, long textLength,\n                                    AEDesc *resultData) {\n    ComponentInstance theComponent;\n    AEDesc scriptTextDesc;\n    OSStatus err;\n    OSAID scriptID, resultID;\n\n        /* set up locals to a known state */\n    theComponent = NULL;\n    AECreateDesc(typeNull, NULL, 0, &scriptTextDesc);\n    scriptID = kOSANullScript;\n    resultID = kOSANullScript;\n\n        /* open the scripting component */\n    theComponent = OpenDefaultComponent(kOSAComponentType,\n                    typeAppleScript);\n    if (theComponent == NULL) { err = paramErr; goto bail; }\n\n        /* put the script text into an aedesc */\n    err = AECreateDesc(typeChar, text, textLength, &scriptTextDesc);\n    if (err != noErr) goto bail;\n\n        /* compile the script */\n    err = OSACompile(theComponent, &scriptTextDesc,\n                    kOSAModeNull, &scriptID);\n    if (err != noErr) goto bail;\n\n        /* run the script */\n    err = OSAExecute(theComponent, scriptID, kOSANullScript,\n                    kOSAModeNull, &resultID);\n\n        /* collect the results - if any */\n    if (resultData != NULL) {\n        AECreateDesc(typeNull, NULL, 0, resultData);\n        if (err == errOSAScriptError) {\n            OSAScriptError(theComponent, kOSAErrorMessage,\n                        typeChar, resultData);\n        } else if (err == noErr && resultID != kOSANullScript) {\n            OSADisplay(theComponent, resultID, typeChar,\n                        kOSAModeNull, resultData);\n        }\n    }\nbail:\n    AEDisposeDesc(&scriptTextDesc);\n    if (scriptID != kOSANullScript) OSADispose(theComponent, scriptID);\n    if (resultID != kOSANullScript) OSADispose(theComponent, resultID);\n    if (theComponent != NULL) CloseComponent(theComponent);\n    return err;\n}\n\n\n    /* SimpleRunAppleScript compiles and runs the AppleScript in\n    the c-style string provided as a parameter.  The result returned\n    indicates the success of the operation. */\n\nOSStatus SimpleRunAppleScript(const char* theScript) {\n    return LowRunAppleScript(theScript, strlen(theScript), NULL);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacUIAppleEvents.h",
    "content": "/****************************************************************************\n*   PROJECT: Squeak Headers\n*   FILE:    sqMacUIAppleEvents.c\n*   CONTENT: \n*\n*   AUTHOR:  John Maloney, John McIntosh, and others.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacUIAppleEvents.h 1344 2006-03-05 21:07:15Z johnmci $\n*\n*   NOTES: \n*  Feb 22nd, 2002, JMM moved code into 10 other files, see sqMacMain.c for comments\n****************************************************************************/\n\n    #include <Carbon/Carbon.h>\n\nvoid InstallAppleEventHandlers(void);\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacUIClipBoard.c",
    "content": "/****************************************************************************\n *   PROJECT: Mac clipboard interface.\n *   FILE:    sqMacUIClipBoard.c\n *   CONTENT: \n *\n *   AUTHOR:  John Maloney, John McIntosh, and others.\n *   ADDRESS: \n *   EMAIL:   johnmci@smalltalkconsulting.com\n *   RCSID:   $Id: sqMacUIClipBoard.c 1344 2006-03-05 21:07:15Z johnmci $\n *\n *   NOTES: \n *  Feb 22nd, 2002, JMM moved code into 10 other files, see sqMacMain.c for comments\n 3.8.11b1 Mar 4th, 2006 JMM refactor, cleanup and add headless support\n *\n *  Aug 2008 - BGF changed to Pasteboard API's for UTF-8 compatibility;\n *\t\t\t  was using deprecated Scrap Manager.\n *****************************************************************************/\n#include \"sq.h\"\n#include \"sqMacUIClipBoard.h\"\n\nint clipboardSize(void);\n\n/*** Clipboard Support (text only for now) ***/\n\nvoid SetUpClipboard(void) {\n}\n\nvoid FreeClipboard(void) {\n}\n\n/**\n * Implementation straight out of Apple's pasteboard guide. \n * Assumes the image treats Macintosh as having UTF-8 clipboard.\n * Puts both UTF-8 and UTF-16 flavors into the scrap,\n * to reach the widest variety of applications.\n */\nsqInt clipboardWriteFromAt(sqInt count, sqInt byteArrayIndex, sqInt startIndex) {\n\t\n\tOSStatus err;\n\tPasteboardRef pb;\n\tCFDataRef data;\n\tCFStringRef str;\n\tCFRange range;\n\tCFIndex converted, needed;\n\tUInt8 * bytes;\n\t\n\terr = PasteboardCreate (kPasteboardClipboard, & pb);\n\tif (err) return 0;\n\t\n\terr = PasteboardClear(pb);\n\tif (err) return 0;\n\t\n\tPasteboardSynchronize (pb);\n\tdata = CFDataCreate (kCFAllocatorDefault, (UInt8*) (byteArrayIndex+startIndex), count);\n\tif (! data) return 0;\n \t\n\terr = PasteboardPutItemFlavor( pb, (PasteboardItemID)1, kUTTypeUTF8PlainText, data, 0);\n\tif (err) return 0;\n\t\n\t/** To get the UTF-16 form most apps (e.g. Word, Thunderbird) need, use an intermediate CFString **/\n\tstr = CFStringCreateWithBytes(kCFAllocatorDefault, (UInt8*) (byteArrayIndex+startIndex), count, kCFStringEncodingUTF8, false);\n\tif (! str) { return 0; }\n\t\n\trange.length = CFStringGetLength( str );\n\trange.location = 0;\n\t/** First call just gives us the needed size **/\n\tconverted = CFStringGetBytes( \n\t\t\t\t\t\t\t\t str,\n\t\t\t\t\t\t\t\t range,\n\t\t\t\t\t\t\t\t kCFStringEncodingUTF16,\n\t\t\t\t\t\t\t\t '?',\n\t\t\t\t\t\t\t\t false,\n\t\t\t\t\t\t\t\t NULL,\t\t/** Meaning, tell me how many bytes are needed **/\n\t\t\t\t\t\t\t\t 0,\n\t\t\t\t\t\t\t\t & needed);\n\tif (converted > 0) {\n\t\tbytes = malloc(needed);\n\t\tconverted = CFStringGetBytes( \n\t\t\t\t\t\t\t\t\t str,\n\t\t\t\t\t\t\t\t\t range,\n\t\t\t\t\t\t\t\t\t kCFStringEncodingUTF16,\n\t\t\t\t\t\t\t\t\t '?',\n\t\t\t\t\t\t\t\t\t false,\n\t\t\t\t\t\t\t\t\t bytes,\t\t/** This time, we're really encoding **/\n\t\t\t\t\t\t\t\t\t needed,\n\t\t\t\t\t\t\t\t\t NULL);\n\t\tif (converted > 0) {\n\t\t\tdata = CFDataCreateWithBytesNoCopy (kCFAllocatorDefault, bytes, needed, kCFAllocatorMalloc);\n\t\t\terr = PasteboardPutItemFlavor (pb, (PasteboardItemID)1, kUTTypeUTF16PlainText, data, 0);\n\t\t\tCFRelease (str);\n\t\t\treturn (err = 0);\t\n\t\t} else {\n\t\t\tfree (bytes);\n\t\t}\n\t}\n\tCFRelease (str);\n\treturn 0;\n}\n\n/**\n * Implementation straight out of Apple's pasteboard guide.\n * Just look for the first Pasteboard item whose data flavor conforms to utf-16,\n * and convert it into a UTF-8 string for the VM.\n * (UTF-16 seems the pasteboard lingua-franca.)\n */\nsqInt clipboardSize(void) {\n\tItemCount itemCount;\n\tOSStatus err;\n\tCFRange range;\n\tCFIndex itemIndex;\n\tCFIndex flavorIndex;\n\tCFIndex converted, needed;\n\tCFStringRef str;\n\tPasteboardRef pb;\n\t\n\terr = PasteboardCreate (kPasteboardClipboard, & pb);\n\tif (err) return 0;\n\tPasteboardSynchronize (pb);\n\terr = PasteboardGetItemCount (pb, &itemCount);\t\n\tif (err) return 0;\n\t\n\tfor (itemIndex = 1; itemIndex <= itemCount; itemIndex++) {\n\t\t\n        PasteboardItemID    itemID;\n        CFArrayRef          flavorTypeArray;\n        CFIndex             flavorCount;\n\t\t\n        err = PasteboardGetItemIdentifier( pb, itemIndex, &itemID );\n\t\tif (err) continue;\n\t\terr = PasteboardCopyItemFlavors( pb, itemID, &flavorTypeArray );\n\t\t\n\t\tif (err) continue;\n        flavorCount = CFArrayGetCount( flavorTypeArray );\n        for( flavorIndex = 0; flavorIndex < flavorCount; flavorIndex++ )\n        {\n\t\t\t\n\t\t\tCFStringRef             flavorType;\n\t\t\tCFDataRef               flavorData;\n\t\t\t\n\t\t\tflavorType = (CFStringRef) CFArrayGetValueAtIndex (flavorTypeArray, flavorIndex);\n\t\t\tif (err) continue;\n\t\t\t\n\t\t\t/** We have to search for UTF-16 as that seems to be the lingua franca;\n\t\t\t if this is done looking for UTF-8, various paste-sources (Thunderbird, Microsoft Office)\n\t\t\t seem not to yield conforming scraps.\n\t\t\t **/\n\t\t\t\n\t\t\tif (UTTypeConformsTo(flavorType, kUTTypeUTF16PlainText))\n            {\n                err = PasteboardCopyItemFlavorData(pb, itemID, flavorType, &flavorData );\n\t\t\t\tif (! err) {\n\t\t\t\t\t\n\t\t\t\t\t/** Convert the UTF-16 to UTF-8 by making an intermediate CFString **/\n\t\t\t\t\tstr = CFStringCreateWithBytes(kCFAllocatorDefault, CFDataGetBytePtr(flavorData), CFDataGetLength(flavorData), kCFStringEncodingUTF16, false);\n\t\t\t\t\tif (! str) {\n\t\t\t\t\t\tCFRelease (flavorData);\n\t\t\t\t\t\tCFRelease (flavorTypeArray);\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t\trange.length = CFStringGetLength(str);\n\t\t\t\t\trange.location = 0;\n\t\t\t\t\t\n\t\t\t\t\tconverted = CFStringGetBytes( \n\t\t\t\t\t\t\t\t\t\t\t\t str,\n\t\t\t\t\t\t\t\t\t\t\t\t range,\n\t\t\t\t\t\t\t\t\t\t\t\t kCFStringEncodingUTF8,\n\t\t\t\t\t\t\t\t\t\t\t\t '?',\n\t\t\t\t\t\t\t\t\t\t\t\t false,\n\t\t\t\t\t\t\t\t\t\t\t\t NULL,\t\t/** Meaning, tell me how many bytes are needed **/\n\t\t\t\t\t\t\t\t\t\t\t\t 0,\n\t\t\t\t\t\t\t\t\t\t\t\t & needed);\n\t\t\t\t\tCFRelease (str);\n\t\t\t\t\tCFRelease (flavorData);\n\t\t\t\t\tCFRelease (flavorTypeArray);\n\t\t\t\t\tif (converted > 0) {\t/* Meaning, conversion is possible */\n\t\t\t\t\t\treturn needed;\n\t\t\t\t\t}\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tCFRelease (flavorTypeArray);\n\t}\n\treturn 0;\n}\n\n/*\n * Implementation straight out of Apple's pasteboard guide.\n * Just look for the first Pasteboard item whose data flavor is conforms to utf-8.\n */\nsqInt clipboardReadIntoAt(sqInt count, sqInt byteArrayPtr, sqInt startIndex) {\n\t\n\tItemCount itemCount;\n\tCFIndex itemIndex;\n\tCFIndex flavorIndex;\n\tOSStatus err;\n\t\n\tPasteboardRef pb;\n\terr = PasteboardCreate (kPasteboardClipboard, & pb);\n\tif (err) return 0;\n\t\n\tPasteboardSynchronize (pb);\n\terr = PasteboardGetItemCount (pb, &itemCount);\t\n\tif (err) return 0;\n\t\n\tfor (itemIndex = 1; itemIndex <= itemCount; itemIndex++) \t{\n\t\t\n        PasteboardItemID    itemID;\n        CFArrayRef          flavorTypeArray;\n        CFIndex             flavorCount;\n\t\t\n        err = PasteboardGetItemIdentifier( pb, itemIndex, &itemID );\n\t\tif (err) continue;\n        err = PasteboardCopyItemFlavors( pb, itemID, &flavorTypeArray );\n\t\tif (err) continue;\n\t\t\n        flavorCount = CFArrayGetCount( flavorTypeArray );\n        for( flavorIndex = 0; flavorIndex < flavorCount; flavorIndex++ )\n        {\n\t\t\tCFStringRef flavorType;\n\t\t\tCFDataRef   flavorData;\n\t\t\t\n\t\t\tflavorType = (CFStringRef) CFArrayGetValueAtIndex(flavorTypeArray, flavorIndex);\n\t\t\t\n\t\t\t/** We have to search for UTF-16 as that seems to be the lingua franca;\n\t\t\t if this is done looking for UTF-8, various paste-sources (Thunderbird, Microsoft Office)\n\t\t\t seem not to yield conforming scraps.\n\t\t\t **/\n\t\t\tif (UTTypeConformsTo(flavorType, kUTTypeUTF16PlainText))\n       \t\t{\n\t\t\t\tCFRange range;\n\t\t\t\tCFIndex converted, bytesUsed;\n\t\t\t\tCFStringRef str;\n\t\t\t\terr = PasteboardCopyItemFlavorData (pb, itemID,  flavorType, &flavorData);\n\t\t\t\tif (!err) {\n\t\t\t\t\t\n\t\t\t\t\t/** Convert the UTF-16 to UTF-8 by making an intermediate CFString **/\n\t\t\t\t\tstr = CFStringCreateWithBytes (kCFAllocatorDefault, CFDataGetBytePtr(flavorData), CFDataGetLength(flavorData), kCFStringEncodingUTF16, false);\n\t\t\t\t\tif (! str) {\n\t\t\t\t\t\tCFRelease (flavorData);\n\t\t\t\t\t\tCFRelease (flavorTypeArray);\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t\trange.length = CFStringGetLength (str);\n\t\t\t\t\trange.location = 0;\n\t\t\t\t\t\n\t\t\t\t\tconverted = CFStringGetBytes( \n\t\t\t\t\t\t\t\t\t\t\t\t str,\n\t\t\t\t\t\t\t\t\t\t\t\t range,\n\t\t\t\t\t\t\t\t\t\t\t\t kCFStringEncodingUTF8,\n\t\t\t\t\t\t\t\t\t\t\t\t '?',\n\t\t\t\t\t\t\t\t\t\t\t\t false,\n\t\t\t\t\t\t\t\t\t\t\t\t (UInt8*) (byteArrayPtr+startIndex),\n\t\t\t\t\t\t\t\t\t\t\t\t count,\n\t\t\t\t\t\t\t\t\t\t\t\t & bytesUsed);\n\t\t\t\t\tCFRelease (str);\n\t\t\t\t\tCFRelease (flavorData);\n\t\t\t\t\tCFRelease (flavorTypeArray);\n\t\t\t\t\treturn (converted > 0) ? bytesUsed : 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tCFRelease (flavorTypeArray);\n\t}\n\treturn 0;\n}\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacUIClipBoard.h",
    "content": "/****************************************************************************\n*   PROJECT: Squeak Headers\n*   FILE:    sqMacUIClipBoard.c\n*   CONTENT: \n*\n*   AUTHOR:  John Maloney, John McIntosh, and others.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacUIClipBoard.h 1344 2006-03-05 21:07:15Z johnmci $\n*\n*   NOTES: \n*  Feb 22nd, 2002, JMM moved code into 10 other files, see sqMacMain.c for comments\n****************************************************************************/\n\n    #include <Carbon/Carbon.h>\n\nvoid FreeClipboard(void);\nvoid SetUpClipboard(void);\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacUIConstants.h",
    "content": "/****************************************************************************\n*   PROJECT: mac apple constants\n*   FILE:    sqMacUIConstants.h\n*   CONTENT: \n*\n*   AUTHOR:   John McIntosh\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacUIConstants.h 1344 2006-03-05 21:07:15Z johnmci $\n*\n*   NOTES: \n*/\n#define IMAGE_NAME_SIZE 1000\n#define SHORTIMAGE_NAME_SIZE 255\n#define DOCUMENT_NAME_SIZE 1000\n#define VMPATH_SIZE 1000\n\n  #define DELIMITER \"/\"\n  #define DELIMITERInt '/'\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacUIEvents.c",
    "content": "/****************************************************************************\n*   PROJECT: Mac event interface.\n*   FILE:    sqMacUIEvents.c\n*   CONTENT: \n*\n*   AUTHOR:  John Maloney, John McIntosh, and others.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacUIEvents.c 1301 2006-02-04 07:09:08Z johnmci $\n*\n*   NOTES: \n*  Feb 22nd, 2002, JMM moved code into 10 other files, see sqMacMain.c for comments\n*  Mar 1st, 2002, JMM carbon event logic, mutiple buttons with scroll wheels.\n*  Mar 8th,  2002, JMM Add logic to pass in external prim calls that require main thread UI execution\n*  Mar 10th, 2002, JMM correct bad char cast, ensure we can get all characters.\n*  Mar 14th, 2002, JMM fix text input for encoding keys (textinput versus raw char)\n*  Apr 17th, 2002, JMM Use accessors for VM variables.\n*  3.2.8b1 July 24th, 2002 JMM support for os-x plugin under IE 5.x drop usb stuff\n*  3.5.1b2 June 6th, 2003 JMM support for aio polling under unix socket support\n*  3.5.1b3 June 7th, 2003 JMM fix up full screen pthread issue.\n*  3.5.1b5 June 25th, 2003 JMM don't close window on floating full screen, handle issue with keydown and floating window if required.\n*  3.6.0b1 Aug 5th, 2003 JMM only invoke event timer loop logic if gTapPowerManager is true (OS supports!)\n*  3.6.2b3 Nov 25th, 2003 JMM Tetsuya HAYASHI <tetha@st.rim.or.jp> supplied multiple unicode extraction\n*  3.7.0bx Nov 24th, 2003 JMM gCurrentVMEncoding\n*  3.7.1b3 Jan 29th, 2004  JMM return unicode for classic version versus virtual keyboard code \n*  3.7.3b2 Apr 10th, 2004 JMM Tetsuya HAYASHI <tetha@st.rim.or.jp>  alteration to unicode key capture\n*  3.8.0b1 July 20th, 2004 JMM Multiple window support\n*  3.8.5b2 Jan 25th, 2005 JMM reduce qd buffer flushing.\n*  3.8.7b1 Mar 13th, 2005 JMM fire keydown/keychar on key repeat to mimic ms windows behavior.\n*  3.8.7b2 Mar 19th, 2005 JMM change keydown/up back to virtual keycode, add unicode to keychar\n*  3.8.8b9 Aug 15th, 2005 JMM flush quartz buffer if needded\n*  3.9.1b2 Oct 4th, 2005 Jmm add MillisecondClockMask\nnotes: IsUserCancelEventRef\n\n*****************************************************************************/\n#if !TARGET_API_MAC_CARBON \n#include <Power.h>\n#include <USB.h>\n#include <DeskBus.h>\n#endif\n\n#include \"sq.h\"\n#include \"sqMacUIEvents.h\"\n#include \"sqMacUIMenuBar.h\"\n#include \"sqMacWindow.h\"\n#include \"sqMacHostWindow.h\"\n\n#if I_AM_CARBON_EVENT\n    #include <pthread.h>\n    #include \"sqaio.h\"\n    \n\tenum { KeyMapSize= 32 };\n\n\ttypedef struct\n\t{\n\t  int keyCode;\n\t  int keyChar;\n\t  int keyRepeated;\n\t} KeyMapping;\n\n\tstatic KeyMapping keyMap[KeyMapSize];\n\tstatic int keyMapSize=\t   0;\n    \n    pthread_mutex_t gEventQueueLock,gEventUILock;\n    pthread_cond_t  gEventUILockCondition;\n    extern pthread_mutex_t gSleepLock;\n    extern pthread_cond_t  gSleepLockCondition;\n    #define EventTypeFullScreenUpdate 98\n    #define EventTypePostEventProcessing 99\n    void doPostMessageHook(EventRef event);\n    void postFullScreenUpdate(void);\n    void signalAnyInterestedParties(void);\n    Boolean gQuitNowRightNow=false;\n\tsqKeyboardEvent *enterKeystroke (long type, long cc, long pc, UniChar utf32Char, long m);\n\t\n\tstatic int addToKeyMap(int keyCode, int keyChar);\n\tstatic int findInKeyMap(int keyCode);\n\tstatic int removeFromKeyMap(int keyCode);\n\tstatic int indexInKeyMap(int keyCode);\n\tstatic int findRepeatInKeyMap(int keyCode);\n\tstatic void setRepeatInKeyMap(int keyCode);\n\tvoid SetUpCarbonEventForWindowIndex(int index);\n\tvoid doPendingFlush(void);\n\tint ioLowResMSecs(void);\n#endif\n\n/*** Variables -- Event Recording ***/\n#ifdef MINIMALVM\n#define MAX_EVENT_BUFFER 128\n#else\n#define MAX_EVENT_BUFFER 1024\n#endif\n\nextern int getInterruptKeycode();\nextern int setInterruptPending(int value);\nextern int getFullScreenFlag();\nextern struct VirtualMachine* interpreterProxy;\n\nextern MenuHandle editMenu;\nextern MenuHandle appleMenu;\nextern Boolean gThreadManager;\nextern Boolean gTapPowerManager;\nextern Boolean gDisablePowerManager;\n\nint inputSemaphoreIndex = 0;/* if non-zero the event semaphore index */\n\nsqInputEvent eventBuffer[MAX_EVENT_BUFFER];\nint eventBufferGet = 0;\nint eventBufferPut = 0;\n\n/* declaration of the event message hook */\neventMessageHook messageHook = NULL;\neventMessageHook postMessageHook = NULL;\n\n/* event capture */\nsqInputEvent *nextEventPut(void);\n\n#define KEYBUF_SIZE 64\nint keyBuf[KEYBUF_SIZE];\t/* circular buffer */\nint keyBufGet = 0;\t\t\t/* index of next item of keyBuf to read */\nint keyBufPut = 0;\t\t\t/* index of next item of keyBuf to write */\nint keyBufOverflows = 0;\t/* number of characters dropped */\n\nint buttonState = 0;\t\t/* mouse button and modifier state when mouse\n\t\t\t\t\t\t\t   button went down or 0 if not pressed */\nint cachedButtonState = 0;\t/* buffered mouse button and modifier state for\n\t\t\t\t\t\t\t   last mouse click even if button has since gone up;\n\t\t\t\t\t\t\t   this cache is kept until the next time ioGetButtonState()\n\t\t\t\t\t\t\t   is called to avoid missing short clicks */\nint gButtonIsDown = 0;\n\nPoint savedMousePosition;\t/* mouse position when window is inactive */\nint windowActive = 0;\t\t/* positive indicates the active window */\n\n/* This table maps the 5 Macintosh modifier key bits to 4 Squeak modifier\n   bits. (The Mac shift and caps lock keys are both mapped to the single\n   Squeak shift bit).  This was true for squeak upto 3.0.7. Then in 3.0.8 we \n   decided to not map the cap lock key to shift\n   \n\t\tMac bits: <control><option><caps lock><shift><command>\n\t\tST bits:  <command><option><control><shift>\n*/\nchar modifierMap[256] = {\n//\t0,  8, 1,  9, 1,  9, 1,  9, 4, 12, 5, 13, 5, 13, 5, 13, caps lock\n//\t2, 10, 3, 11, 3, 11, 3, 11, 6, 14, 7, 15, 7, 15, 7, 15\n//    0,  8, 1,  9, 0,  8, 1,  9, 4, 12, 5, 13, 4, 12, 5, 13, //no caps lock\n//    2, 10, 3, 11, 2, 10, 3, 11, 6, 14, 7, 15, 6, 14, 7, 15\n\t\n 0, 8, 1, 9, 0, 8, 1, 9, 4, 12, 5, 13, 4, 12, 5, 13, //Track left and right shift keys\n 2, 10, 3, 11, 2, 10, 3, 11, 6, 14, 7, 15, 6, 14, 7, \n15, 1, 9, 1, 9, 1, 9, 1, 9, 5, 13, 5, 13, 5, 13, 5, \n13, 3, 11, 3, 11, 3, 11, 3, 11, 7, 15, 7, 15, 7, 15,\n 7, 15, 4, 12, 5, 13, 4, 12, 5, 13, 4, 12, 5, 13, 4,\n12, 5, 13, 6, 14, 7, 15, 6, 14, 7, 15, 6, 14, 7, 15, \n 6, 14, 7, 15, 5, 13, 5, 13, 5, 13, 5, 13, 5, 13, 5,\n13, 5, 13, 5, 13, 7, 15, 7, 15, 7, 15, 7, 15, 7, 15, \n 7, 15, 7, 15, 7, 15, 2, 10, 3, 11, 2, 10, 3, 11, 6, \n14, 7, 15, 6, 14, 7, 15, 2, 10, 3, 11, 2, 10, 3, 11, \n 6, 14, 7, 15, 6, 14, 7, 15, 3, 11, 3, 11, 3, 11, 3, \n 11, 7, 15, 7, 15, 7, 15, 7, 15, 3, 11, 3, 11, 3, 11, \n 3, 11, 7, 15, 7, 15, 7, 15, 7, 15, 6, 14, 7, 15, 6, \n 14, 7, 15, 6, 14, 7, 15, 6, 14, 7, 15, 6, 14, 7, 15, \n 6, 14, 7, 15, 6, 14, 7, 15, 6, 14, 7, 15, 7, 15, 7, \n 15, 7, 15, 7, 15, 7, 15, 7, 15, 7, 15, 7, 15, 7, 15, \n 7, 15, 7, 15, 7, 15, 7, 15, 7, 15, 7, 15, 7, 15 };\n \n \nvoid ADBIOCompletionPPC(Byte *dataBufPtr, Byte *opDataPtr, long command);\nBoolean IsKeyDown(void);    \n\n#if !defined(I_AM_CARBON_EVENT) || defined(BROWSERPLUGIN)\nint  HandleEvents(void);\nvoid HandleMenu(int mSelect);\nvoid HandleMouseDown(EventRecord *theEvent);\nint ioProcessEvents(void) {\n\t/* This is a noop when running as a plugin; the browser handles events. */\n\tstatic unsigned long   nextPollTick = 0, nextPowerCheck=0, disableIdleTickLimit=0;\n\tunsigned long   clockTime;\n\n#ifndef BROWSERPLUGIN\n    clockTime = ioLowResMSecs();\n\tif (abs(nextPollTick - clockTime) >= 16) {\n\t\t/* time to process events! */\n\t\twhile (HandleEvents()) {\n\t\t\t/* process all pending events */\n\t\t}\n\n        clockTime = ioLowResMSecs();        \n\t\tnextPollTick = clockTime;\n\t\t\n        if (gDisablePowerManager && gTapPowerManager) {\n            if (abs(disableIdleTickLimit - clockTime) >= 6000) {\n                IdleUpdate();\n                disableIdleTickLimit = clockTime;\n            }\n                \n#if !defined(MINIMALVM)\n            if (abs(nextPowerCheck - clockTime) >= 500) {\n                 UpdateSystemActivity(UsrActivity);\n                 nextPowerCheck = clockTime;\n            }\n#endif\n        }        \n\t}\n#endif\n\treturn 0;\n}\n\n#ifndef BROWSERPLUGIN\nint HandleEvents(void) {\n\tEventRecord\t\ttheEvent;\n\tint\t\t\t\tok,isMenuKey;\n\n\tok = WaitNextEvent(everyEvent, &theEvent,0,null);\n\tif((messageHook) && (messageHook(&theEvent))) {\n        return ok;\n    }\n\tif (ok) {\n\t\tswitch (theEvent.what) {\n\t\t\tcase mouseDown:\n\t\t\t\tHandleMouseDown(&theEvent);\n\t\t\t\tif(postMessageHook) postMessageHook(&theEvent);\n\t\t\t\treturn false;\n\t\t\tbreak;\n\n\t\t\tcase mouseUp:\n\t\t\t    gButtonIsDown = false;\n\t\t\t\tif(inputSemaphoreIndex) {\n\t\t\t\t\trecordMouseEvent(&theEvent,MouseModifierState(&theEvent));\n    \t\t\t\tif(postMessageHook) postMessageHook(&theEvent);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\trecordModifierButtons(&theEvent);\n\t\t\t\tif(postMessageHook) postMessageHook(&theEvent);\n\t\t\t\treturn false;\n\t\t\tbreak;\n\n\t\t\tcase keyDown:\n\t\t\tcase autoKey:\n                if ((theEvent.modifiers & cmdKey) != 0) {\n\t\t\t\t\tAdjustMenus();\n\t\t\t\t\tisMenuKey = MenuKey(theEvent.message & charCodeMask);\n\t\t\t\t\tif (isMenuKey) {\n\t\t\t\t\t\tHandleMenu(isMenuKey);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(inputSemaphoreIndex) {\n\t\t\t\t\trecordKeyboardEvent(&theEvent,EventKeyDown);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\trecordModifierButtons(&theEvent);\n\t\t\t\trecordKeystroke(&theEvent);\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase keyUp:\n\t\t\t\tif(inputSemaphoreIndex) {\n\t\t\t\t\trecordKeyboardEvent(&theEvent,EventKeyUp);\n\t\t\t\t}\n\t\t\tbreak;\n\n#ifndef IHAVENOHEAD\n\t\t\tcase updateEvt:\n\t\t\t\t {\n\t\t\t\tWindowPtr window = (WindowPtr) theEvent.message;\n\n\t\t\t\tRgnHandle updateRgn = NewRgn();\n\t\t\t\tRect structureRect;\n\t\t\t\t\n\t\t\t\tBeginUpdate(window);\n\t\t\t\tGetPortVisibleRegion((CGrafPtr)window,updateRgn);\n\t\t\t\tGetRegionBounds(updateRgn,&structureRect);\n\t\t\t\tDisposeRgn(updateRgn);\n\t\t\t\tif (windowIndexFromHandle(window))\n\t\t\t\t\trecordWindowEvent(WindowEventPaint,structureRect.left, structureRect.top, structureRect.right, structureRect.bottom);\n\t\t\t\tif (windowIndexFromHandle(window) == 1) fullDisplayUpdate();  /* this makes VM call ioShowDisplay */\t\t\t\t\t\n\t\t\t\tEndUpdate(window);\n\t\t\t\t}\n\t\t\tbreak;\n\n\t\t\tcase activateEvt:\n\t\t\t\tif (theEvent.modifiers & activeFlag && ((windowIndexFromHandle((WindowPtr) theEvent.message)))) {\n\t\t\t\t\twindowActive = (windowIndexFromHandle((WindowPtr) theEvent.message));\n\t\t\t\t\trecordWindowEvent(WindowEventActivated,0, 0, 0, 0);\n\t\t\t\t} else {\n\t\t\t\t\tGetMouse(&savedMousePosition);\n\t\t\t\t\twindowActive = 0;\n\t\t\t\t}\n\t\t\t\tfullDisplayUpdate();  /* Fix for full screen menu bar tabbing*/\n\t\t\tbreak;\n#endif\n\n\t\t\tcase kHighLevelEvent:\n\t\t\t\tAEProcessAppleEvent(&theEvent);\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase osEvt: \n\t\t\t\tif (((theEvent.message>>24)& 0xFF) == suspendResumeMessage) {\n\t\t\t\t\n\t\t\t\t\t//JMM July 4th 2000\n\t\t\t\t\t//Fix for menu bar tabbing, thanks to Javier Diaz-Reinoso for pointing this out\n\t\t\t\t\t//\n\t\t\t\t\tif ((theEvent.message & resumeFlag) == 0) {\n\t\t\t\t\t\tGetMouse(&savedMousePosition);\n\t\t\t\t\t\twindowActive = 0;\n\t\t\t\t\t\tif (getFullScreenFlag())\n\t\t\t\t\t\t\tMenuBarRestore();\n\t\t\t\t\t} else {\n \t\t\t\t\t\twindowActive = (windowIndexFromHandle((WindowPtr) FrontWindow()));\n \t\t\t\t\t\tif (getFullScreenFlag()) {\n\t\t\t\t\t\t\tMenuBarHide();\n            \t\t\t\tfullDisplayUpdate();  /* Fix for full screen menu bar tabbing*/\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n\telse {\n\t\tif(inputSemaphoreIndex && windowActive ) {\n    \t\ttheEvent.modifiers = checkForModifierKeys();\n \t\t\trecordMouseEvent(&theEvent,MouseModifierState(&theEvent));\n \t\t}\n \t}\n\tif(postMessageHook) postMessageHook(&theEvent); \n\treturn ok;\n}\n\nvoid HandleMenu(int mSelect) {\n\tint\t\t\tmenuID, menuItem;\n\tStr255\t\tname;\n\tGrafPtr\t\tsavePort;\n\n\tmenuID = HiWord(mSelect);\n\tmenuItem = LoWord(mSelect);\n\tHiliteMenu(menuID);\n\tswitch (menuID) {\n\t\tcase appleID:\n\t\t\tGetPort(&savePort);\n\t\t\tGetMenuItemText(appleMenu, menuItem, name);\n#if !TARGET_API_MAC_CARBON\n\t\t\tOpenDeskAcc(name);\n#endif \n\t\t\tSetPort(savePort);\n\t\tbreak;\n\n\t\tcase fileID:\n\t\t\tif (menuItem == quitItem) {\n\t\t\t\tioExit();\n\t\t\t}\n\t\t\trecordMenu(menuID,menuItem);\n\t\tbreak;\n\n\t\tcase editID:\n#if !TARGET_API_MAC_CARBON\n\t\t\tif (!SystemEdit(menuItem - 1)) {\n\t\t\t\trecordMenu(menuID,menuItem);\n\t\t\t}\n#endif\n\t\tbreak;\n\t\t\n        default:\n\t\t\trecordMenu(menuID,menuItem);\n        break;\n\t}\n\tHiliteMenu(0);\n}\n\n#define GetWindowContentRgn(window, r) (MacCopyRgn(((WindowPeek)window)->contRgn, r))\n\nvoid HandleMouseDown(EventRecord *theEvent) {\n\tWindowPtr\ttheWindow;\n\tstatic Rect\t\tgrowLimits = { 20, 20, 10000, 10000 };\n\tRect        dragBounds,globalBounds;\n\tint\t\t\twindowCode, newSize, isMenuKey;\n\tstatic RgnHandle\tioWinRgn=null;\n\t\n    if (ioWinRgn == null) \n        ioWinRgn = NewRgn();\n\n\twindowCode = FindWindow(theEvent->where, &theWindow);\n\tswitch (windowCode) {\n\t\tcase inSysWindow:\n#if !TARGET_API_MAC_CARBON\n\t\t\tSystemClick(theEvent, theWindow);\n#endif\n\t\tbreak;\n\n\t\tcase inMenuBar:\n\t\t\tAdjustMenus();\n\t\t\tisMenuKey = MenuSelect(theEvent->where);\n\t\t\tif (isMenuKey) {\n\t\t\t\tHandleMenu(isMenuKey);\n\t\t\t}\n\t\tbreak;\n\n#ifndef IHAVENOHEAD\n\t\tcase inDrag:\n\t\t\tif (getFullScreenFlag()) \t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tGetRegionBounds(GetGrayRgn(), &dragBounds);\n\t\t\tDragWindow( theWindow, theEvent->where, &dragBounds);\n\t\t\tGetWindowContentRgn (theWindow, ioWinRgn);\n\t\t\tGetRegionBounds(ioWinRgn,&globalBounds);\n\t\t\trecordWindowEvent(WindowEventMetricChange,globalBounds.left, globalBounds.top, globalBounds.right, globalBounds.bottom);\n\t\tbreak;\n\n\t\tcase inGrow:\n\t\t\tif (getFullScreenFlag()) \t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tnewSize = GrowWindow(theWindow, theEvent->where, &growLimits);\n\t\t\t\tif (newSize != 0) {\n\t\t\t\tSizeWindow( theWindow, LoWord(newSize), HiWord(newSize), true);\n\t\t\t\tGetWindowContentRgn (theWindow, ioWinRgn);\n\t\t\t\tGetRegionBounds(ioWinRgn,&globalBounds);\n\t\t\t\trecordWindowEvent(WindowEventMetricChange,globalBounds.left, globalBounds.top, globalBounds.right, globalBounds.bottom);\n\t\t\t}\n\t\tbreak;\n\n\t\tcase inZoomIn:\n\t\tcase inZoomOut:\n\t\t\tif (getFullScreenFlag()) \t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tDoZoomWindow(theEvent, theWindow, windowCode,10000, 10000);\n\t\t\tGetWindowContentRgn (theWindow, ioWinRgn);\n\t\t\tGetRegionBounds(ioWinRgn,&globalBounds);\n\t\t\trecordWindowEvent(WindowEventMetricChange,globalBounds.left, globalBounds.top, globalBounds.right, globalBounds.bottom);\n\t\tbreak;\n\n\t\tcase inContent:\n\t\t\tgButtonIsDown = true;\n\t\t\tif (theWindow == windowHandleFromIndex(windowActive)) {\n\t\t\t\tif(inputSemaphoreIndex) {\n\t\t\t\t\trecordMouseEvent(theEvent,MouseModifierState(theEvent));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\trecordMouseDown(theEvent);\n\t\t\t} else {\n\t\t\t\tSelectWindow(theWindow);\n\t\t\t}\n\t\tbreak;\n\n\t\tcase inCollapseBox:\n\t\t\trecordWindowEvent(WindowEventIconise,0, 0, 0, 0);\n\t\tbreak;\n\t\t\n\t\tcase inGoAway:\n\t\t\trecordWindowEvent(WindowEventClose,0, 0, 0, 0);\n\t\tbreak;\n#endif\n\t}\n}\n#endif\n\n/*** Event Recording Functions ***/\n\nvoid recordKeystroke(EventRecord *theEvent) {\n\tint asciiChar, modifierBits, keystate;\n\n\t/* keystate: low byte is the ascii character; next 8 bits are modifier bits */\n\tasciiChar = theEvent->message & charCodeMask;\n\tmodifierBits = modifierMap[(theEvent->modifiers >> 8)];\n\tif ((modifierBits & 0x9) == 0x9) {  /* command and shift */\n\t\tif ((asciiChar >= 97) && (asciiChar <= 122)) {\n\t\t\t/* convert ascii code of command-shift-letter to upper case */\n\t\t\tasciiChar = asciiChar - 32;\n\t\t}\n\t}\n\n\tkeystate = (modifierBits << 8) | asciiChar;\n\tif (keystate == getInterruptKeycode()) {\n\t\t/* Note: interrupt key is \"meta\"; it not reported as a keystroke */\n\t\tsetInterruptPending(true);\n\t} else {\n\t\tkeyBuf[keyBufPut] = keystate;\n\t\tkeyBufPut = (keyBufPut + 1) % KEYBUF_SIZE;\n\t\tif (keyBufGet == keyBufPut) {\n\t\t\t/* buffer overflow; drop the last character */\n\t\t\tkeyBufGet = (keyBufGet + 1) % KEYBUF_SIZE;\n\t\t\tkeyBufOverflows++;\n\t\t}\n\t}\n}\n\nvoid recordMouseDown(EventRecord *theEvent) {\n\n\t/* button state: low three bits are mouse buttons; next 4 bits are modifier bits */\n\tbuttonState = MouseModifierState(theEvent);\n\tcachedButtonState = cachedButtonState | buttonState;\n}\n\nvoid recordModifierButtons(EventRecord *theEvent) {\n\tint stButtons = 0;\n\n\tif ((theEvent->modifiers & btnState) == false) {\n\t\tstButtons = buttonState & 0x7;\n\t} else {\n\t\tstButtons = 0;\n\t}\n\t/* button state: low three bits are mouse buttons; next 8 bits are modifier bits */\n\tbuttonState =\n\t\t(modifierMap[(theEvent->modifiers >> 8)] << 3) |\n\t\t(stButtons & 0x7);\n}\n\nint recordMouseEvent(EventRecord *theEvent, int theButtonState) {\n\tsqMouseEvent *evt;\n\tstatic sqMouseEvent oldEvent;\n\t\n\tevt = (sqMouseEvent*) nextEventPut();\n\n\t/* first the basics */\n\tevt->type = EventTypeMouse;\n\tevt->timeStamp = ioMSecs() & MillisecondClockMask; \n\tSetPortWindowPort(windowHandleFromIndex(windowActive));\n\tGlobalToLocal((Point *) &theEvent->where);\n\tevt->x = theEvent->where.h;\n\tevt->y = theEvent->where.v;\n\t/* then the buttons */\n\tevt->buttons = theButtonState & 0x07;\n\t/* then the modifiers */\n\tevt->modifiers = theButtonState >> 3;\n\tevt->windowIndex = windowActive;\n\t\n\tif (oldEvent.buttons == evt->buttons && \n\t    oldEvent.x == evt->x &&\n\t    oldEvent.y == evt->y &&\n\t    oldEvent.modifiers == evt->modifiers) \n\t    ignoreLastEvent();\n\t    \n    oldEvent = *evt;\n\n\t\n//\tsignalSemaphoreWithIndex(inputSemaphoreIndex);\n\treturn 1;\n}\n\nvoid recordMenu(int menuID,UInt32 menuItem) {\n\tsqMenuEvent *evt;\n\n\tevt = (sqMenuEvent*) nextEventPut();\n\n\tevt->type = EventTypeMenu;\n\tevt->timeStamp = ioMSecs() & MillisecondClockMask; \n\tevt->menu = menuID;\n\tevt->menuItem = menuItem;\n\tevt->reserved1 = 0;\n\tevt->reserved2 = 0;\n\tevt->reserved3 = 0;\n\tevt->windowIndex = windowActive;\n\n\treturn;\n}\n\nvoid recordWindowEvent(int windowType,int left, int top, int right, int bottom) \n{\n\tsqWindowEvent *evt;\n\n\tevt = (sqWindowEvent*) nextEventPut();\n\n\tevt->type = EventTypeWindow;\n\tevt->timeStamp = ioMSecs() & MillisecondClockMask; \n\tevt->action = windowType;\n\tevt->value1 = left;\n\tevt->value2 = top;\n\tevt->value3 = right;\n\tevt->value4 = bottom;\n\tevt->windowIndex = windowActive;\n\n\treturn;\n}\n\nstatic int MacRomanToUnicode[256] = \n{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,\n 25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,\n 47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,\n 69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,\n 91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,\n 110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,\n 127,196,197,199,201,209,214,220,225,224,226,228,227,229,231,233,232,\n 234,235,237,236,238,239,241,243,242,244,246,245,250,249,251,252,8224,\n 176,162,163,167,8226,182,223,174,169,8482,180,168,8800,198,216,8734,177,\n 8804,8805,165,181,8706,8721,8719,960,8747,170,186,937,230,248,191,161,172,\n 8730,402,8776,8710,171,187,8230,160,192,195,213,338,339,8211,8212,8220,8221,\n 8216,8217,247,9674,255,376,8260,8364,8249,8250,64257,64258,8225,183,8218,8222,\n 8240,194,202,193,203,200,205,206,207,204,211,212,63743,210,218,219,217,305,710,\n 732,175,728,729,730,184,733,731,711};\n\nint recordKeyboardEvent(EventRecord *theEvent, int keyType) {\n\tint asciiChar, modifierBits;\n\tsqKeyboardEvent *evt, *extra;\n\n\tevt = (sqKeyboardEvent*) nextEventPut();\n\n\t/* keystate: low byte is the ascii character; next 4 bits are modifier bits */\n\tasciiChar = theEvent->message & charCodeMask;\n\tmodifierBits = MouseModifierState(theEvent); //Capture mouse/option states\n\tif (((modifierBits >> 3) & 0x9) == 0x9) {  /* command and shift */\n\t\tif ((asciiChar >= 97) && (asciiChar <= 122)) {\n\t\t\t/* convert ascii code of command-shift-letter to upper case */\n\t\t\tasciiChar = asciiChar - 32;\n\t\t}\n\t}\n\n\t/* first the basics */\n\tevt->type = EventTypeKeyboard;\n\tevt->timeStamp = ioMSecs() & MillisecondClockMask;\n\t/* now the key code */\n\t/* press code must differentiate */\n\t// Jan 2004, changed for TWEAK instead of doing virtual keycode return  unicode\n\t// Unicode generated from CFSTring\n\t// March 19th 2005, again alter we pass keyCode on keydown/keyup but pass unicode in keychar as extra field\n\tevt->charCode = (theEvent->message & keyCodeMask) >> 8;\n\tevt->pressCode = keyType;\n\tevt->modifiers = modifierBits >> 3;\n\tevt->windowIndex = windowActive;\n\t/* clean up reserved */\n\tevt->reserved1 = 0;\n\t/* generate extra character event */\n\tif (keyType == EventKeyDown) {\n\t\textra = (sqKeyboardEvent*)nextEventPut();\n\t\t*extra = *evt;\n\t\textra->charCode = asciiChar;\n\t\textra->pressCode = EventKeyChar;\n\t\textra->utf32Code = MacRomanToUnicode[asciiChar];\n\t}\n//\tsignalSemaphoreWithIndex(inputSemaphoreIndex);\n\treturn 1;\n}\n\nint checkForModifierKeys() {\n\tenum {\n\t\t\t/* modifier keys */\n\t\tkVirtualCapsLockKey = 0x039,\n\t\tkVirtualShiftKey = 0x038,\n\t\tkVirtualControlKey = 0x03B,\n\t\tkVirtualOptionKey = 0x03A,\n\t\tkVirtualRShiftKey = 0x03C,\n\t\tkVirtualRControlKey = 0x03E,\n\t\tkVirtualROptionKey = 0x03D,\n\t\tkVirtualCommandKey = 0x037\n\t};\n\tKeyMap theKeys;\n\tunsigned char *keybytes;\n\tint result;\n\t\n\tGetKeys(theKeys);\n\tkeybytes = (unsigned char *) theKeys;\n\tresult  = gButtonIsDown ?  0 : btnState ;\n\tresult += ((keybytes[kVirtualCapsLockKey>>3] & (1 << (kVirtualCapsLockKey&7))) != 0) ? alphaLock : 0;\n\tresult += ((keybytes[kVirtualShiftKey>>3] & (1 << (kVirtualShiftKey&7))) != 0)       ? shiftKey : 0;\n\tresult += ((keybytes[kVirtualControlKey>>3] & (1 << (kVirtualControlKey&7))) != 0)   ? controlKey : 0;\n\tresult += ((keybytes[kVirtualOptionKey>>3] & (1 << (kVirtualOptionKey&7))) != 0)     ? optionKey : 0;\n\tresult += ((keybytes[kVirtualRShiftKey>>3] & (1 << (kVirtualRShiftKey&7))) != 0)       ? shiftKey : 0;\n\tresult += ((keybytes[kVirtualRControlKey>>3] & (1 << (kVirtualRControlKey&7))) != 0)   ? controlKey : 0;\n\tresult += ((keybytes[kVirtualROptionKey>>3] & (1 << (kVirtualROptionKey&7))) != 0)     ? optionKey : 0;\n\tresult += ((keybytes[kVirtualCommandKey>>3] & (1 << (kVirtualCommandKey&7))) != 0)   ? cmdKey : 0;\n\t\n\treturn result;\n}\n\n#endif\n\nint recordDragDropEvent(EventRecord *theEvent, int numberOfItems, int dragType) {\n\tsqDragDropFilesEvent *evt;\n\tint theButtonState;\n\t\n#if I_AM_CARBON_EVENT\n        pthread_mutex_lock(&gEventQueueLock);\n#endif\n        evt = (sqDragDropFilesEvent*) nextEventPut();\n\n\t/* first the basics */\n\ttheButtonState = MouseModifierState(theEvent);\n\tevt->type = EventTypeDragDropFiles;\n\tevt->timeStamp = ioMSecs() & MillisecondClockMask; \n\tGlobalToLocal((Point *) &theEvent->where);\n\tevt->x = theEvent->where.h;\n\tevt->y = theEvent->where.v;\n\tevt->numFiles = numberOfItems;\n\tevt->dragType = dragType;\n\t\n\t/* then the modifiers */\n\tevt->modifiers = theButtonState >> 3;\n\tevt->windowIndex = windowActive;\n#if I_AM_CARBON_EVENT\n        pthread_mutex_unlock(&gEventQueueLock);\n        signalAnyInterestedParties();\n#endif\n//\tsignalSemaphoreWithIndex(inputSemaphoreIndex);\n\treturn 1;\n}\nint MouseModifierState(EventRecord *theEvent) {\n\tint stButtons;\n\n\tstButtons = 0;\n\tif ((theEvent->modifiers & btnState) == false) {  /* is false if button is down */\n\t\tstButtons = 4;\t\t/* red button by default */\n\t\tif ((theEvent->modifiers & optionKey) != 0) {\n\t\t\tstButtons = 2;\t/* yellow button if option down */\n\t\t}\n\t\tif ((theEvent->modifiers & cmdKey) != 0) {\n\t\t\tstButtons = 1;\t/* blue button if command down */\n\t\t}\n\t} \n\n\t/* button state: low three bits are mouse buttons; next 8 bits are modifier bits */\n\treturn ((modifierMap[(theEvent->modifiers >> 8)] << 3) |\n\t\t(stButtons & 0x7));\n}\n\n\nsqInputEvent *nextEventPut(void) {\n\tsqInputEvent *evt;\n\tevt = eventBuffer + eventBufferPut;\n\teventBufferPut = (eventBufferPut + 1) % MAX_EVENT_BUFFER;\n\tif (eventBufferGet == eventBufferPut) {\n\t\t/* buffer overflow; drop the last event */\n\t\teventBufferGet = (eventBufferGet + 1) % MAX_EVENT_BUFFER;\n\t}\n\treturn evt;\n}\n\nvoid ignoreLastEvent() {\n    eventBufferPut -= 1;\n    if (eventBufferPut < 0) \n        eventBufferPut = MAX_EVENT_BUFFER -1;\n}\n\nint ioSetInputSemaphore(int semaIndex) {\n\tinputSemaphoreIndex = semaIndex;\n\treturn 1;\n}\n\nint ioGetNextEvent(sqInputEvent *evt) {\n#if I_AM_CARBON_EVENT\n\t\tdoPendingFlush();\n        aioPoll(0);\t\t\n\t\tpthread_mutex_lock(&gEventQueueLock);\n#else\n    if (eventBufferGet == eventBufferPut) {\n        if (gThreadManager)\n            SqueakYieldToAnyThread();\n        else\n            ioProcessEvents();\n    }\n#endif\n\tif (eventBufferGet == eventBufferPut) {\n#if I_AM_CARBON_EVENT\n            pthread_mutex_unlock(&gEventQueueLock);\n#endif\n            return false;\n        }\n\t*evt = eventBuffer[eventBufferGet];\n\teventBufferGet = (eventBufferGet+1) % MAX_EVENT_BUFFER;\n#if I_AM_CARBON_EVENT\n        pthread_mutex_unlock(&gEventQueueLock);\n        if (evt->type == EventTypeFullScreenUpdate) {\n            fullDisplayUpdate();\t//Note I think it's ok to unlock by now\n            return ioGetNextEvent(evt);\n        }\n        \n        if (evt->type == EventTypePostEventProcessing) {\n            if (postMessageHook) \n                postMessageHook((EventRecord *) evt->unused1);\n            free((void *) evt->unused1);\n            return ioGetNextEvent(evt);\n        }\n#endif\n\treturn true;\n}\n\nint ioGetButtonState(void) {\n\tif (gThreadManager)\n\t\tSqueakYieldToAnyThread();\n\telse\n\t    ioProcessEvents();\n\tif ((cachedButtonState & 0x7) != 0) {\n\t\tint result = cachedButtonState;\n\t\tcachedButtonState = 0;  /* clear cached button state */\n\t\treturn result;\n\t}\n\tcachedButtonState = 0;  /* clear cached button state */\n\treturn buttonState;\n}\n\nint ioGetKeystroke(void) {\n\tint keystate;\n\n\tif (gThreadManager)\n\t\tSqueakYieldToAnyThread();\n\telse\n\t    ioProcessEvents();\n\tif (keyBufGet == keyBufPut) {\n\t\treturn -1;  /* keystroke buffer is empty */\n\t} else {\n\t\tkeystate = keyBuf[keyBufGet];\n\t\tkeyBufGet = (keyBufGet + 1) % KEYBUF_SIZE;\n\t\t/* set modifer bits in buttonState to reflect the last keystroke fetched */\n\t\tbuttonState = ((keystate >> 5) & 0xF8) | (buttonState & 0x7);\n\t}\n\treturn keystate;\n}\nint ioMousePoint(void) {\n\tPoint p;\n\n\tif (gThreadManager)\n\t\tSqueakYieldToAnyThread();\n\telse\n\t    ioProcessEvents();\n\tif (windowActive) {\n                GrafPtr savePort;\n                GetPort(&savePort);\n                SetPortWindowPort(windowHandleFromIndex(windowActive));\n\t\tGetMouse(&p);\n                SetPort(savePort);\n\t} else {\n\t\t/* don't report mouse motion if window is not active */\n\t\tp = savedMousePosition;\n\t}\n\treturn (p.h << 16) | (p.v & 0xFFFF);  /* x is high 16 bits; y is low 16 bits */\n}\n\nint ioPeekKeystroke(void) {\n\tint keystate;\n\n\tif (gThreadManager)\n\t\tSqueakYieldToAnyThread();\n\telse\n\t    ioProcessEvents();\n\tif (keyBufGet == keyBufPut) {\n\t\treturn -1;  /* keystroke buffer is empty */\n\t} else {\n\t\tkeystate = keyBuf[keyBufGet];\n\t\t/* set modifer bits in buttonState to reflect the last keystroke peeked at */\n\t\tbuttonState = ((keystate >> 5) & 0xF8) | (buttonState & 0x7);\n\t}\n\treturn keystate;\n}\n\nvoid setMessageHook(eventMessageHook theHook) {\n    messageHook = theHook;\n}\n\nvoid setPostMessageHook(eventMessageHook theHook) {\n    postMessageHook = theHook;\n}\n\n#if defined(__MWERKS__) && !defined(__APPLE__) && !defined(__MACH__) && JMMFoo\n  \nBoolean USBKeyboardCheckKey(int macKeyCode);\n#define kNumberOfKeyboardDispatch 10\nstatic USBHIDModuleDispatchTable *keyboardDispatch[kNumberOfKeyboardDispatch] = { NULL, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL};\n\nBoolean IsKeyDown()\n {\n   KeyMap theKeys;\n   int    keyToCheck,result;\n   Boolean  checkValue;\n   \n    keyToCheck = interpreterProxy->stackIntegerValue(0);\n    if (interpreterProxy->failed()) {\n\t\treturn null;\n    }\n    if (keyboardDispatch[0] == NULL ) {\n        GetKeys(theKeys);\n        checkValue = ((unsigned char *)(theKeys))[keyToCheck/ 8] & 1 << ((keyToCheck) % 8);\n    } else {\n        checkValue = USBKeyboardCheckKey(keyToCheck);\n    }\n    \n    result = checkValue ? interpreterProxy->trueObject(): interpreterProxy->falseObject();\n\t\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, result);\n\treturn null;\n }\n\nvoid USBKeyboardInit(void);\n\n#if !TARGET_API_MAC_CARBON\nvoid ADBIOCompletionPPC(Byte *dataBufPtr, Byte *opDataPtr, long command) {\n\t*opDataPtr = true;\n}\n  \n \n\nvoid SetupKeyboard(void) {\n \tADBAddress     currentDev;\n \tADBDataBlock   info;\n \tvolatile short data = 0;\n \tshort       number;\n \tByte        buffer[3], ADBReg;\n \tshort       talk, listen,i;\n \tOSErr       myErr;\n    ADBCompletionUPP  compProcPtr=NULL;      // PPC completion routine \n    ADBDataBlock    adbData;\n        \n    USBKeyboardInit();\n\n    number = CountADBs();\n    compProcPtr = NewADBCompletionProc(ADBIOCompletionPPC);\n    \n    for(i=1;i<=number;i++) {\n        currentDev = GetIndADB(&info, i);\n        if (currentDev < 0)\n           return;\n           \n        myErr = GetADBInfo(&adbData, currentDev);\n        if (!((adbData.origADBAddr == 2) && (adbData.devType == 2) ))\n          continue;\n                        \n        buffer[0] = 2;             // length byte\n        buffer[1] = 0;\n        buffer[2] = 0;\n        ADBReg = 3;                // get register 3\n     \n        talk = (currentDev << 4) + 0x0C + ADBReg;    \n     \n        data = 0;\n        myErr = ADBOp((Ptr)&data, (ADBCompletionUPP)compProcPtr, (Ptr)buffer, talk);\n        if (myErr != noErr) \n           goto done;\n     \n        while(!data); \n        \n        buffer[2] = 3; // change from 2 to 3 so we can differentiate between left and right shift keys\n        listen = (currentDev << 4) + 0x08 + ADBReg; \n     \n    \tdata = 0;\n        myErr = ADBOp((Ptr)&data, (ADBCompletionUPP)compProcPtr, (Ptr)buffer, listen);\n        while(!data); \n    }\ndone:  \n    if (compProcPtr)\n        DisposeRoutineDescriptor(compProcPtr);\n}\n#endif\n\n\n\n// index represents USB keyboard usage value, content is Mac virtual keycode\nstatic UInt8\tUSBKMAPReverse[256],USBKMAP[256] = {  \n\t0xFF, \t/* 00 no event */\t\t\n\t0xFF,\t/* 01 ErrorRollOver */\t\n\t0xFF,\t/* 02 POSTFail */\t\n\t0xFF,\t/* 03 ErrorUndefined */\t\n\t0x00,\t/* 04 A */\n\t0x0B,\t/* 05 B */\n\t0x08,\t/* 06 C */\n\t0x02,\t/* 07 D */\n\t0x0E,\t/* 08 E */\n\t0x03,\t/* 09 F */\n\t0x05,\t/* 0A G */\n\t0x04,\t/* 0B H */\n\t0x22,\t/* 0C I */\n\t0x26,\t/* 0D J */\n\t0x28,\t/* 0E K */\n\t0x25,\t/* 0F L */\n\n\t0x2E, \t/* 10 M */\t\t\n\t0x2D,\t/* 11 N */\t\n\t0x1F,\t/* 12 O */\t\n\t0x23,\t/* 13 P */\t\n\t0x0C,\t/* 14 Q */\n\t0x0F,\t/* 15 R */\n\t0x01,\t/* 16 S */\n\t0x11,\t/* 17 T */\n\t0x20,\t/* 18 U */\n\t0x09,\t/* 19 V */\n\t0x0D,\t/* 1A W */\n\t0x07,\t/* 1B X */\n\t0x10,\t/* 1C Y */\n\t0x06,\t/* 1D Z */\n\t0x12,\t/* 1E 1/! */\n\t0x13,\t/* 1F 2/@ */\n\n\t0x14, \t/* 20 3 # */\t\t\n\t0x15,\t/* 21 4 $ */\t\n\t0x17,\t/* 22 5 % */\t\n\t0x16,\t/* 23 6 ^ */\t\n\t0x1A,\t/* 24 7 & */\n\t0x1C,\t/* 25 8 * */\n\t0x19,\t/* 26 9 ( */\n\t0x1D,\t/* 27 0 ) */\n\t0x24,\t/* 28 Return (Enter) */\n\t0x35,\t/* 29 ESC */\n\t0x33,\t/* 2A Delete (Backspace) */\n\t0x30,\t/* 2B Tab */\n\t0x31,\t/* 2C Spacebar */\n\t0x1B,\t/* 2D - _ */\n\t0x18,\t/* 2E = + */\n\t0x21,\t/* 2F [ { */\n\n\t0x1E, \t/* 30 ] } */\t\t\n\t0x2A,\t/* 31 \\ | */\t\n\t0xFF,\t/* 32 Non-US # and ~ (what?!!!) */\t\n\t0x29,\t/* 33 ; : */\t\n\t0x27,\t/* 34 ' \" */\n\t0x32,\t/* 35 ` ~ */\n\t0x2B,\t/* 36 , < */\n\t0x2F,\t/* 37 . > */\n\t0x2C,\t/* 38 / ? */\n\t0x39,\t/* 39 Caps Lock */\n\t0x7A,\t/* 3A F1 */\n\t0x78,\t/* 3B F2 */\n\t0x63,\t/* 3C F3 */\n\t0x76,\t/* 3D F4 */\n\t0x60,\t/* 3E F5 */\n\t0x61,\t/* 3F F6 */\n\n\t0x62, \t/* 40 F7 */\t\t\n\t0x64,\t/* 41 F8 */\t\n\t0x65,\t/* 42 F9 */\t\n\t0x6D,\t/* 43 F10 */\t\n\t0x67,\t/* 44 F11 */\n\t0x6F,\t/* 45 F12 */\n\t0x69,\t/* 46 F13/PrintScreen */\n\t0x6B,\t/* 47 F14/ScrollLock */\n\t0x71,\t/* 48 F15/Pause */\t\t\t\t\n\t0x72,\t/* 49 Insert */\n\t0x73,\t/* 4A Home */\n\t0x74,\t/* 4B PageUp */\n\t0x75,\t/* 4C Delete Forward */\n\t0x77,\t/* 4D End */\n\t0x79,\t/* 4E PageDown */\n\t0x7C,\t/* 4F RightArrow */\n\n\t0x7B, \t/* 50 LeftArrow */\t\t\n\t0x7D,\t/* 51 DownArrow */\t\n\t0x7E,\t/* 52 UpArrow */\t\n\t0x47,\t/* 53 NumLock/Clear */\t\n\t0x4B,\t/* 54 Keypad / */\n\t0x43,\t/* 55 Keypad * */\n\t0x4E,\t/* 56 Keypad - */\n\t0x45,\t/* 57 Keypad + */\n\t0x4C,\t/* 58 Keypad Enter */\n\t0x53,\t/* 59 Keypad 1 */\n\t0x54,\t/* 5A Keypad 2 */\n\t0x55,\t/* 5B Keypad 3 */\n\t0x56,\t/* 5C Keypad 4 */\n\t0x57,\t/* 5D Keypad 5 */\n\t0x58,\t/* 5E Keypad 6 */\n\t0x59,\t/* 5F Keypad 7 */\n\n\t0x5B, \t/* 60 Keypad 8 */\t\t\n\t0x5C,\t/* 61 Keypad 9 */\t\n\t0x52,\t/* 62 Keypad 0 */\t\n\t0x41,\t/* 63 Keypad . */\t\n\t0xFF,\t/* 64 Non-US \\ and  | (what ??!!) */\n\t0x6E,\t/* 65 ApplicationKey (not on a mac!)*/\n\t0x7F,\t/* 66 PowerKey  */\n\t0x51,\t/* 67 Keypad = */\n\t0x69,\t/* 68 F13 */\n\t0x6B,\t/* 69 F14 */\n\t0x71,\t/* 6A F15 */\n\t0xFF,\t/* 6B F16 */\n\t0xFF,\t/* 6C F17 */\n\t0xFF,\t/* 6D F18 */\n\t0xFF,\t/* 6E F19 */\n\t0xFF,\t/* 6F F20 */\n\n\t0x5B, \t/* 70 F21 */\t\t\n\t0x5C,\t/* 71 F22 */\t\n\t0x52,\t/* 72 F23 */\t\n\t0x41,\t/* 73 F24 */\t\n\t0xFF,\t/* 74 Execute */\n\t0xFF,\t/* 75 Help */\n\t0x7F,\t/* 76 Menu */\n\t0x4C,\t/* 77 Select */\n\t0x69,\t/* 78 Stop */\n\t0x6B,\t/* 79 Again */\n\t0x71,\t/* 7A Undo */\n\t0xFF,\t/* 7B Cut */\n\t0xFF,\t/* 7C Copy */\n\t0xFF,\t/* 7D Paste */\n\t0xFF,\t/* 7E Find */\n\t0xFF,\t/* 7F Mute */\n\t\n\t0xFF, \t/* 80 no event */\t\t\n\t0xFF,\t/* 81 no event */\t\n\t0xFF,\t/* 82 no event */\t\n\t0xFF,\t/* 83 no event */\t\n\t0xFF,\t/* 84 no event */\n\t0xFF,\t/* 85 no event */\n\t0xFF,\t/* 86 no event */\n\t0xFF,\t/* 87 no event */\n\t0xFF,\t/* 88 no event */\n\t0xFF,\t/* 89 no event */\n\t0xFF,\t/* 8A no event */\n\t0xFF,\t/* 8B no event */\n\t0xFF,\t/* 8C no event */\n\t0xFF,\t/* 8D no event */\n\t0xFF,\t/* 8E no event */\n\t0xFF,\t/* 8F no event */\n\n\t0xFF, \t/* 90 no event */\t\t\n\t0xFF,\t/* 91 no event */\t\n\t0xFF,\t/* 92 no event */\t\n\t0xFF,\t/* 93 no event */\t\n\t0xFF,\t/* 94 no event */\n\t0xFF,\t/* 95 no event */\n\t0xFF,\t/* 96 no event */\n\t0xFF,\t/* 97 no event */\n\t0xFF,\t/* 98 no event */\n\t0xFF,\t/* 99 no event */\n\t0xFF,\t/* 9A no event */\n\t0xFF,\t/* 9B no event */\n\t0xFF,\t/* 9C no event */\n\t0xFF,\t/* 9D no event */\n\t0xFF,\t/* 9E no event */\n\t0xFF,\t/* 9F no event */\n\n\t0xFF, \t/* A0 no event */\t\t\n\t0xFF,\t/* A1 no event */\t\n\t0xFF,\t/* A2 no event */\t\n\t0xFF,\t/* A3 no event */\t\n\t0xFF,\t/* A4 no event */\n\t0xFF,\t/* A5 no event */\n\t0xFF,\t/* A6 no event */\n\t0xFF,\t/* A7 no event */\n\t0xFF,\t/* A8 no event */\n\t0xFF,\t/* A9 no event */\n\t0xFF,\t/* AA no event */\n\t0xFF,\t/* AB no event */\n\t0xFF,\t/* AC no event */\n\t0xFF,\t/* AD no event */\n\t0xFF,\t/* AE no event */\n\t0xFF,\t/* AF no event */\n\n\t0xFF, \t/* B0 no event */\t\t\n\t0xFF,\t/* B1 no event */\t\n\t0xFF,\t/* B2 no event */\t\n\t0xFF,\t/* B3 no event */\t\n\t0xFF,\t/* B4 no event */\n\t0xFF,\t/* B5 no event */\n\t0xFF,\t/* B6 no event */\n\t0xFF,\t/* B7 no event */\n\t0xFF,\t/* B8 no event */\n\t0xFF,\t/* B9 no event */\n\t0xFF,\t/* BA no event */\n\t0xFF,\t/* BB no event */\n\t0xFF,\t/* BC no event */\n\t0xFF,\t/* BD no event */\n\t0xFF,\t/* BE no event */\n\t0xFF,\t/* BF no event */\n\n\t0xFF, \t/* C0 no event */\t\t\n\t0xFF,\t/* C1 no event */\t\n\t0xFF,\t/* C2 no event */\t\n\t0xFF,\t/* C3 no event */\t\n\t0xFF,\t/* C4 no event */\n\t0xFF,\t/* C5 no event */\n\t0xFF,\t/* C6 no event */\n\t0xFF,\t/* C7 no event */\n\t0xFF,\t/* C8 no event */\n\t0xFF,\t/* C9 no event */\n\t0xFF,\t/* CA no event */\n\t0xFF,\t/* CB no event */\n\t0xFF,\t/* CC no event */\n\t0xFF,\t/* CD no event */\n\t0xFF,\t/* CE no event */\n\t0xFF,\t/* CF no event */\n\n\t0xFF, \t/* D0 no event */\t\t\n\t0xFF,\t/* D1 no event */\t\n\t0xFF,\t/* D2 no event */\t\n\t0xFF,\t/* D3 no event */\t\n\t0xFF,\t/* D4 no event */\n\t0xFF,\t/* D5 no event */\n\t0xFF,\t/* D6 no event */\n\t0xFF,\t/* D7 no event */\n\t0xFF,\t/* D8 no event */\n\t0xFF,\t/* D9 no event */\n\t0xFF,\t/* DA no event */\n\t0xFF,\t/* DB no event */\n\t0xFF,\t/* DC no event */\n\t0xFF,\t/* DD no event */\n\t0xFF,\t/* DE no event */\n\t0xFF,\t/* DF no event */\n\n\t0x3B, \t/* E0 left control key */\t\t\n\t0x38,\t/* E1 left shift key key */\t\n\t0x3A,\t/* E2 left alt/option key */\t\n\t0x37,\t/* E3 left GUI (windows/cmd) key */\t\n\t\n\t0x3E,\t/* E4 right control key */ \n\t0x3C,\t/* E5 right shift key key */ \n\t0x3D,\t/* E6 right alt/option key */ \n\t0x37,\t/* E7 right GUI (windows/cmd) key */\n\t0xFF,\t/* E8 no event */\n\t0xFF,\t/* E9 no event */\n\t0xFF,\t/* EA no event */\n\t0xFF,\t/* EB no event */\n\t0xFF,\t/* EC no event */\n\t0xFF,\t/* ED no event */\n\t0xFF,\t/* EE no event */\n\t0xFF,\t/* EF no event */\n\t\n\t0xFF, \t/* F0 no event */\t\t\n\t0xFF,\t/* F1 no event */\t\n\t0xFF,\t/* F2 no event */\t\n\t0xFF,\t/* F3 no event */\t\n\t0xFF,\t/* F4 no event */\n\t0xFF,\t/* F5 no event */\n\t0xFF,\t/* F6 no event */\n\t0xFF,\t/* F7 no event */\n\t0xFF,\t/* F8 no event */\n\t0xFF,\t/* F9 no event */\n\t0xFF,\t/* FA no event */\n\t0xFF,\t/* FB no event */\n\t0xFF,\t/* FC no event */\n\t0xFF,\t/* FD no event */\n\t0xFF,\t/* FE no event */\n\t0xFF,\t/* FF no event */\n};\n\n\n/* USBKeyboardInit - find a USB keyboard driver, and get its dispatch \ntable.\n */\nvoid USBKeyboardInit(void){\n    int i;\n    OSErr          errCode;\n    USBDeviceRef      deviceRef;\n    CFragConnectionID connID;\n    CFragSymbolClass  symClass;\n    THz curzone;\n    \n    for(i=0;i<256;i++) {\n        USBKMAPReverse[USBKMAP[i]] = i;\n    }\n    \n    if((Ptr)USBGetNextDeviceByClass == (Ptr)kUnresolvedCFragSymbolAddress)\n    \treturn;\n    \t\n#if CALL_NOT_IN_CARBON\n    deviceRef = kNoDeviceRef;\n    for (i=0;i< kNumberOfKeyboardDispatch; i++ ) {\n          errCode = USBGetNextDeviceByClass(&deviceRef, &connID, kUSBHIDInterfaceClass, kUSBAnySubClass, kUSBKeyboardInterfaceProtocol);\n          if (errCode == fnfErr) \n            return;\n            \n          curzone = GetZone();\n          SetZone(SystemZone());\n          errCode =  FindSymbol(connID,\"\\pTheHIDModuleDispatchTable\", (Ptr*) &keyboardDispatch[i], &symClass);\n          SetZone(curzone); \n    } \n#endif\n}\n\n\nBoolean USBKeyboardCheckKey(int macKeyCode) {\n    USBHIDData  data;\n    SInt16 i,j;\n    for(i=0;i<kNumberOfKeyboardDispatch;i++) {\n        if(NULL != keyboardDispatch[i] && NULL != keyboardDispatch[i]->pUSBHIDGetDeviceInfo) {\n          if(noErr == (*keyboardDispatch[i]->pUSBHIDGetDeviceInfo)(kHIDGetCurrentKeys, &data)) {\n                for(j = 0;j < data.kbd.keycount;j++){\n                    if (USBKMAPReverse[macKeyCode] ==  data.kbd.usbkeycode[i])\n                        return true;\n             }\n          }\n        }\n    }\n    return false;\n} \n#else\nBoolean IsKeyDown() {\n    interpreterProxy->success(false);\n    return null;\n}\n#endif\n\n#ifdef I_AM_CARBON_EVENT\n\nextern MenuHandle fileMenu, editMenu;\nEventLoopTimerRef  gPowerManagerDefeatTimer;\n\nEventTypeSpec appEventCmdList[] = {{kEventClassCommand, kEventCommandProcess}};\n\nEventTypeSpec appEventList[] = {{kEventClassApplication, kEventAppActivated},\n                                {kEventClassApplication, kEventAppDeactivated}};\n\nEventTypeSpec windEventList[] = {{kEventClassWindow, kEventWindowDrawContent },\n                            { kEventClassWindow, kEventWindowHidden },\n                            { kEventClassWindow, kEventWindowActivated},\n\t\t\t\t\t\t\t{ kEventClassWindow, kEventWindowBoundsChanged},\n\t\t\t\t\t\t\t{ kEventClassWindow, kEventWindowResizeStarted},\n\t\t\t\t\t\t\t{ kEventClassWindow, kEventWindowClose},\n\t\t\t\t\t\t\t{ kEventClassWindow, kEventWindowCollapsed},\n                            { kEventClassWindow, kEventWindowDeactivated}};\n                            \nEventTypeSpec windEventMouseList[] = {\n\t\t\t\t\t\t\t{ kEventClassMouse, kEventMouseMoved},\n                            { kEventClassMouse, kEventMouseWheelMoved},\n                            { kEventClassMouse, kEventMouseDragged},\n                            { kEventClassMouse, kEventMouseUp},\n\t\t\t\t\t\t\t{ kEventClassMouse, kEventMouseDown}\n\t\t\t\t\t\t\t};\n                            \nEventTypeSpec windEventKBList[] = {{ kEventClassKeyboard, kEventRawKeyDown},\n                            { kEventClassKeyboard, kEventRawKeyUp},\n\t\t\t\t\t\t\t{ kEventClassKeyboard, kEventRawKeyRepeat},\n                            { kEventClassKeyboard, kEventRawKeyModifiersChanged}};\n                            \n                            \nEventTypeSpec appleEventEventList[] = {{ kEventClassAppleEvent, kEventAppleEvent}};\n\nEventTypeSpec textInputEventList[] = {{ kEventClassTextInput, kEventTextInputUnicodeForKeyEvent}};\n\nEventTypeSpec customEventEventList[] = {{ 'JMM1', 'JMM1'}};\n\nstatic pascal OSStatus MyAppEventHandler (EventHandlerCallRef myHandlerChain,\n                EventRef event, void* userData);\nstatic pascal OSStatus MyAppEventCmdHandler (EventHandlerCallRef myHandlerChain,\n                EventRef event, void* userData);\nstatic pascal OSStatus MyWindowEventHandler(EventHandlerCallRef myHandler,\n            EventRef event, void* userData);\nstatic pascal OSStatus MyWindowEventMouseHandler(EventHandlerCallRef myHandler,\n            EventRef event, void* userData);\nstatic pascal OSStatus MyWindowEventKBHandler(EventHandlerCallRef myHandler,\n            EventRef event, void* userData);\nstatic pascal OSStatus MyAppleEventEventHandler(EventHandlerCallRef myHandler,\n            EventRef event, void* userData);\nstatic pascal OSStatus MyTextInputEventHandler(EventHandlerCallRef myHandler,\n            EventRef event, void* userData);\nstatic pascal OSStatus customHandleForUILocks(EventHandlerCallRef myHandler,\n            EventRef event, void* userData);\nstatic pascal void PowerManagerDefeatTimer (EventLoopTimerRef theTimer,void* userData);\n            \nint MouseModifierStateCarbon(EventRef theEvent,UInt32 whatHappened);   \nint ModifierStateCarbon(EventRef theEvent,UInt32 whatHappened);   \nvoid recordMouseEventCarbon(EventRef event,UInt32 whatHappened);\nvoid recordKeyboardEventCarbon(EventRef event);\nvoid recordMenuEventCarbon(MenuRef menu, UInt32 menuItem);\nvoid recordWindowEventCarbon(int windowType,int left, int top, int right, int bottom,int windowIndex);\nint doPreMessageHook(EventRef event); \nvoid fakeMouseWheelKeyboardEvents(EventMouseWheelAxis wheelMouseDirection,long wheelMouseDelta);\n            \nvoid SetUpCarbonEvent() {\n    AdjustMenus();\n\n/* Installing the application event handler */\n\tInstallApplicationEventHandler(NewEventHandlerUPP(MyAppEventCmdHandler), GetEventTypeCount(appEventCmdList), appEventCmdList, 0, NULL);\n    InstallApplicationEventHandler(NewEventHandlerUPP(MyAppEventHandler), GetEventTypeCount(appEventList), appEventList, 0, NULL);\n    InstallApplicationEventHandler (NewEventHandlerUPP(customHandleForUILocks), GetEventTypeCount(customEventEventList), customEventEventList, 0, NULL);\n    \n/* timmer loops */\n    if (gTapPowerManager) \n\t\tInstallEventLoopTimer (GetMainEventLoop(),\n                       6*kEventDurationSecond,\n                       kEventDurationSecond,\n                       NewEventLoopTimerUPP(PowerManagerDefeatTimer),\n                       NULL,&gPowerManagerDefeatTimer);\n\n}\n\nvoid SetUpCarbonEventForWindowIndex(int index) {\n/* Installing the window event handler */\n    InstallWindowEventHandler(windowHandleFromIndex(index), NewEventHandlerUPP(MyWindowEventHandler), GetEventTypeCount(windEventList), windEventList, 0, NULL);\n    InstallWindowEventHandler(windowHandleFromIndex(index), NewEventHandlerUPP(MyWindowEventMouseHandler), GetEventTypeCount(windEventMouseList), windEventMouseList, 0, NULL);\n    InstallWindowEventHandler(windowHandleFromIndex(index), NewEventHandlerUPP(MyWindowEventKBHandler), GetEventTypeCount(windEventKBList), windEventKBList, 0, NULL);\n    InstallWindowEventHandler(windowHandleFromIndex(index), NewEventHandlerUPP(MyAppleEventEventHandler), GetEventTypeCount(appleEventEventList), appleEventEventList, 0, NULL);\n    InstallWindowEventHandler(windowHandleFromIndex(index), NewEventHandlerUPP(MyTextInputEventHandler), GetEventTypeCount(textInputEventList), textInputEventList, 0, NULL);\n}\n\nint   doPreMessageHook(EventRef event) {\n   /* jmm rethink, breaks not thread safe\n    if (messageHook) {\n        EventRecord theOldEventType;\n        if (!ConvertEventRefToEventRecord(event,&theOldEventType))\n            return eventNotHandledErr;\n        if (messageHook(&theOldEventType))\n            return noErr;\n    } */\n    return eventNotHandledErr;\n}\n\nvoid   doPostMessageHook(EventRef event) {\n    if (postMessageHook) {\n        EventRecord *theOldEventType;\n        sqInputEvent *evt;\n        \n        theOldEventType = malloc(sizeof(EventRecord));\n        if (!ConvertEventRefToEventRecord(event,theOldEventType)) {\n            free(theOldEventType);\n            return;\n        }\n        pthread_mutex_lock(&gEventQueueLock);\n\tevt = nextEventPut();\n\tevt->type = EventTypePostEventProcessing;\n\tevt->windowIndex = windowActive;\n\tevt->unused1 = (long) theOldEventType;\n        pthread_mutex_unlock(&gEventQueueLock);\n\n        // not quite this postMessageHook(&theOldEventType);\n    }\n}\n\nvoid   postFullScreenUpdate() {\n    sqInputEvent *evt;\n    \n    pthread_mutex_lock(&gEventQueueLock);\n    evt = nextEventPut();\n    evt->type = EventTypeFullScreenUpdate;\n\tevt->windowIndex = windowActive;\n    pthread_mutex_unlock(&gEventQueueLock);\n}\n\nstatic pascal OSStatus MyAppEventHandler (EventHandlerCallRef myHandlerChain,\n    EventRef event, void* userData)\n{\n    UInt32 whatHappened;\n    OSStatus result = eventNotHandledErr; /* report failure by default */\n    extern Boolean gSqueakWindowIsFloating;\n    \n    if (messageHook && ((result = doPreMessageHook(event)) != eventNotHandledErr))\n        return result;\n\n    whatHappened = GetEventKind(event);\n\n\t//fprintf(stderr,\"\\nAppEvent %i\",whatHappened);\n    switch (whatHappened)\n    {\n        case kEventAppActivated:\n            if (getFullScreenFlag()) {\n                MenuBarHide();\n            }\n            break;\n        case kEventAppDeactivated:\n            if (gSqueakWindowIsFloating) break;\n\t\t\twindowActive = 0;\n            if (getFullScreenFlag())\n                MenuBarRestore();\n            break;\n        default:\n            break;\n    }\n    if (postMessageHook) \n        doPostMessageHook(event);\n    return result;\n}\n\nstatic pascal OSStatus MyAppEventCmdHandler (EventHandlerCallRef myHandlerChain,\nEventRef event, void* userData)\n{\n    UInt32 whatHappened;\n    HICommand commandStruct;    \n    OSStatus result = eventNotHandledErr; /* report failure by default */\n\n    if(messageHook && ((result = doPreMessageHook(event)) != eventNotHandledErr))\n        return result;\n    whatHappened = GetEventKind(event);\n    switch (whatHappened)\n    {\n        case kEventCommandProcess:\n            GetEventParameter (event, kEventParamDirectObject,\n                typeHICommand, NULL, sizeof(HICommand),NULL, &commandStruct);\n\n            if (commandStruct.menu.menuRef == fileMenu && commandStruct.menu.menuItemIndex == quitItem) {\n                        gQuitNowRightNow = true;\n\t\t\t\tresult = noErr;\n\t\t\t} else if (commandStruct.commandID == kHICommandHide) {\n\t\t\t} else if (commandStruct.commandID == kHICommandHideOthers) {\n\t\t\t} else if (commandStruct.commandID == kHICommandShowAll) {\n\t\t\t} else if (windowActive) {\n\t\t\t\trecordMenuEventCarbon(commandStruct.menu.menuRef,commandStruct.menu.menuItemIndex);\n\t\t\t\tresult = noErr;\n\t\t\t}\n            break;\n        default:\n            break;\n    }\n    if (postMessageHook) \n        doPostMessageHook(event);\n    return result;\n}\n\nstatic pascal OSStatus MyWindowEventHandler(EventHandlerCallRef myHandler,\n            EventRef event, void* userData)\n{\n    UInt32 whatHappened;\n    OSStatus result = eventNotHandledErr; /* report failure by default */\n    extern Boolean gSqueakWindowIsFloating;\n\tRect globalBounds;\n    WindowRef window;\n  \n    if(messageHook && ((result = doPreMessageHook(event)) != eventNotHandledErr))\n        return result;\n    GetEventParameter(event, kEventParamDirectObject, typeWindowRef, NULL,sizeof(window), NULL, &window);\n    whatHappened = GetEventKind(event);\n\t//fprintf(stderr,\"\\nWindowEvent %i %i %i\",whatHappened,IsWindowActive(window),windowIndexFromHandle((int)window));\n    switch (whatHappened)\n    {\n         case kEventWindowActivated:\n            windowActive = windowIndexFromHandle((wHandleType)window);\n            postFullScreenUpdate();\n\t\t\trecordWindowEventCarbon(WindowEventActivated,0, 0, 0, 0,windowActive);\n             break;\n        case kEventWindowDeactivated:\n            if (gSqueakWindowIsFloating) break;\n            GetEventParameter (event, kEventParamMouseLocation, typeQDPoint,NULL,\n                    sizeof(Point), NULL, &savedMousePosition);\n\t\t\tif (windowIndexFromHandle((wHandleType)window)) {\n\t\t\t\tGrafPtr\toldPort;\n\t\t\t\tGetPort(&oldPort);\n\t\t\t\tSetPortWindowPort(windowHandleFromIndex(windowIndexFromHandle((wHandleType)window)));\n\t\t\t\tGlobalToLocal(&savedMousePosition);\n\t\t\t\tSetPort(oldPort);\n\t\t\t}\n            windowActive = 0;\n             break;\n       case kEventWindowDrawContent:\n            result = noErr;\n            break;\n       case kEventWindowResizeStarted:\n\t\t\t{ \n\t\t\t\twindowDescriptorBlock *targetWindowBlock;\n\t\t\t\ttargetWindowBlock = windowBlockFromHandle((wHandleType)window);\t\n\t\t\t\ttargetWindowBlock->sync = true;\n\t\t\t}\n            break;\n\t\tcase kEventWindowBoundsChanged:\n\t\t\tGetWindowBounds(window,kWindowContentRgn,&globalBounds);\n\t\t\trecordWindowEventCarbon(WindowEventMetricChange,globalBounds.left, globalBounds.top, \n\t\t\t\t\tglobalBounds.right, globalBounds.bottom,windowIndexFromHandle((wHandleType)window));\n\t\t\tbreak;\n\t\tcase kEventWindowCollapsed:\n\t\t\trecordWindowEventCarbon(WindowEventIconise,0, 0, 0, 0,windowIndexFromHandle((wHandleType)window));\n\t\t\tbreak;\n\t\tcase kEventWindowClose:\n\t\t\trecordWindowEventCarbon(WindowEventClose,0, 0, 0, 0,windowIndexFromHandle((wHandleType)window));\n\t\t\tresult = noErr;\n\t\t\tbreak;\n        case kEventWindowHidden:\n            if (gSqueakWindowIsFloating && windowIndexFromHandle((wHandleType)window)) {\n                ShowWindow(windowHandleFromIndex(windowIndexFromHandle((wHandleType)window)));\n                result = noErr;\n            }\n            break;\n        default:\n        /* If nobody handled the event, it gets propagated to the */\n        /* application-level handler. */\n        break;\n    }\n    if (postMessageHook) \n        doPostMessageHook(event);\n    return result;\n}\n\nstatic pascal OSStatus MyWindowEventMouseHandler(EventHandlerCallRef myHandler,\n            EventRef event, void* userData)\n{\n    UInt32 whatHappened;\n    Point  mouseLocation;\n    OSStatus result = eventNotHandledErr; /* report failure by default */\n    static RgnHandle\tioWinRgn=null;\n\tstatic Boolean mouseDownActivate=false;\n    extern Boolean gSqueakWindowIsFloating,gSqueakFloatingWindowGetsFocus;\n    \n    whatHappened\t= GetEventKind(event);\n\t\n\n\t//fprintf(stderr,\"\\nMouseEvent %i-%i \",whatHappened,windowActive);\n\n\tif (!windowActive) {\n\t\tif (whatHappened == kEventMouseDown)\n\t\t\tmouseDownActivate = true;\n        return result;\n\t}\n    if (ioWinRgn == null) \n        ioWinRgn = NewRgn();\n        \n    GetWindowRegion(windowHandleFromIndex(windowActive),kWindowGlobalPortRgn,ioWinRgn);\n    GetEventParameter (event, kEventParamMouseLocation, typeQDPoint,NULL,sizeof(Point), NULL, &mouseLocation);\n    \n    if (!PtInRgn(mouseLocation,ioWinRgn)) {\n\t\tif (mouseDownActivate && whatHappened == kEventMouseUp) {\n\t\t\tmouseDownActivate = false;\n\t\t\treturn result;\n\t\t}\n\t\tif (!gButtonIsDown) \n\t\t\treturn result;\n    }\n    \n   /* if (gSqueakFloatingWindowGetsFocus && gSqueakWindowIsFloating && \n            GetUserFocusWindow() != getSTWindowXXXX()) {\n        SetUserFocusWindow(kUserFocusAuto);\n        SetUserFocusWindow(getSTWindowXXXX());\n    }*/\n    if(messageHook && ((result = doPreMessageHook(event)) != eventNotHandledErr))\n        return result;\n    \n\n    switch (whatHappened)\n    {\n        case kEventMouseMoved:\n        case kEventMouseDragged:\n        case kEventMouseWheelMoved:\n\t\t\tif (mouseDownActivate) \n\t\t\t\treturn result;\n            recordMouseEventCarbon(event,whatHappened);\n            result = noErr;\n            return result; //Return early not an event we deal with for post event logic\n        case kEventMouseDown:\n\t\t\tGetWindowRegion(windowHandleFromIndex(windowActive),kWindowGrowRgn,ioWinRgn);\n            if (PtInRgn(mouseLocation,ioWinRgn))\n                return result;\n\t\t\tif (mouseDownActivate) \n\t\t\t\treturn result;\n            if (gSqueakFloatingWindowGetsFocus && gSqueakWindowIsFloating) {\n                SetUserFocusWindow(kUserFocusAuto);\n                SetUserFocusWindow(windowHandleFromIndex(windowActive));\n            }\n            gButtonIsDown = true;\n            recordMouseEventCarbon(event,whatHappened);\n            result = noErr;\n            break;\n        case kEventMouseUp:\n\t\t\tif (mouseDownActivate) {\n\t\t\t\tmouseDownActivate = false;\n\t\t\t\treturn result;\n\t\t\t}\n            gButtonIsDown = false;\n            recordMouseEventCarbon(event,whatHappened);\n            result = noErr;\n            break;\n        default:\n        /* If nobody handled the event, it gets propagated to the */\n        /* application-level handler. */\n        break;\n    }\n    if (postMessageHook) \n        doPostMessageHook(event);\n\t//fprintf(stderr,\"handled %i\",result);\n    return result;\n}\n\nstatic pascal OSStatus MyWindowEventKBHandler(EventHandlerCallRef myHandler,\n            EventRef event, void* userData)\n{\n    UInt32 whatHappened,keyCode;\n\tSInt32 key;\n    OSStatus result = eventNotHandledErr; /* report failure by default */\n\t \n    if (!windowActive)\n        return result;\n\n    if(messageHook && ((result = doPreMessageHook(event)) != eventNotHandledErr))\n        return result;\n\t\t\n    whatHappened = GetEventKind(event);\n\tGetEventParameter (event, kEventParamKeyCode, typeUInt32,NULL, sizeof(typeUInt32), NULL, &keyCode);\n    switch (whatHappened)\n    {\n        case kEventRawKeyDown:\n\t\t\t//fprintf(stdout,\"\\nrawkey down %i\",ioMSecs());\n\t\t\taddToKeyMap(keyCode, 0);\t\n            result = eventNotHandledErr;\n            break;\n        case kEventRawKeyRepeat:\n\t\t\t//fprintf(stdout,\"\\nrawkey repeat %i\",ioMSecs());\n\t\t\tsetRepeatInKeyMap(keyCode);\n            result = eventNotHandledErr;\n            break;\n        case kEventRawKeyUp:\n\t\t\t//fprintf(stdout,\"\\nrawkey up %i\",ioMSecs());\n\t\t\tkey = findInKeyMap(keyCode);\n\t\t\tif (key != -1) {\n\t\t\t\tenterKeystroke ( EventTypeKeyboard,keyCode, EventKeyUp, 0, ModifierStateCarbon(event,0));\n\t\t\t}\n\t\t\tremoveFromKeyMap(keyCode);\n            result = eventNotHandledErr;\n            break;\n        case kEventRawKeyModifiersChanged: \n            /* ok in this case we fake a mouse event to deal with the modifiers changing */\n            if(inputSemaphoreIndex)\n                recordMouseEventCarbon(event,kEventMouseMoved);\n            result = noErr;\n            break;\n        default: \n        /* If nobody handled the event, it gets propagated to the */\n        /* application-level handler. */\n        break;\n    }\n    if (postMessageHook) \n        doPostMessageHook(event);\n    return result;\n}\nstatic pascal OSStatus MyAppleEventEventHandler(EventHandlerCallRef myHandler,\n            EventRef event, void* userData)\n{\n    return eventNotHandledErr;\n}\n\nstatic pascal OSStatus MyTextInputEventHandler(EventHandlerCallRef myHandler,\n            EventRef event, void* userData)\n{\n    UInt32 whatHappened;\n    OSStatus result = eventNotHandledErr; /* report failure by default */\n    \n    if (!windowActive)\n        return result;\n\t\t\n    if(messageHook && ((result = doPreMessageHook(event)) != eventNotHandledErr))\n        return result;\n\n    whatHappened = GetEventKind(event);\n    switch (whatHappened)\n    {\n        case kEventTextInputUnicodeForKeyEvent:\n            recordKeyboardEventCarbon(event);\n            result = noErr;\n        default: \n        /* If nobody handled the event, it gets propagated to the */\n        /* application-level handler. */\n        break;\n    }\n    if (postMessageHook) \n        doPostMessageHook(event);\n    return result;\n}\n\nvoid recordMenuEventCarbon(MenuRef menu,UInt32 menuItem) {\n\tsqMenuEvent *evt;\n\tpthread_mutex_lock(&gEventQueueLock);\n\tevt = (sqMenuEvent*) nextEventPut();\n\n\tevt->type = EventTypeMenu;\n\tevt->timeStamp = ioMSecs() & MillisecondClockMask; \n\tevt->menu = (int) GetMenuID(menu);\n\tevt->menuItem = menuItem;\n\tevt->reserved1 = 0;\n\tevt->reserved2 = 0;\n\tevt->reserved3 = 0;\n\tevt->windowIndex = windowActive;\n\tpthread_mutex_unlock(&gEventQueueLock);\n\tsignalAnyInterestedParties();\n\treturn;\n}\n\nvoid recordWindowEventCarbon(int windowType,int left, int top, int right, int bottom, int windowIndex) {\n\tsqWindowEvent *evt;\n\tpthread_mutex_lock(&gEventQueueLock);\n\tevt = (sqWindowEvent*) nextEventPut();\n\n\tevt->type = EventTypeWindow;\n\tevt->timeStamp = ioMSecs() & MillisecondClockMask; \n\tevt->action = windowType;\n\tevt->value1 = left;\n\tevt->value2 = top;\n\tevt->value3 = right;\n\tevt->value4 = bottom;\n\tevt->windowIndex = windowIndex;\n\tpthread_mutex_unlock(&gEventQueueLock);\n\tsignalAnyInterestedParties();\n\treturn;\n}\n\nvoid recordMouseEventCarbon(EventRef event,UInt32 whatHappened) {\n\tsqMouseEvent *evt;\n\tstatic sqMouseEvent oldEvent;\n\tPoint  where;\n        EventMouseWheelAxis wheelMouseDirection=0;\n        long\twheelMouseDelta=0;\n        OSErr\t\terr;\n        \n        err = GetEventParameter (event, kEventParamMouseLocation, typeQDPoint,NULL,\n                    sizeof(Point), NULL, &where);\n                    \n        SetPortWindowPort(windowHandleFromIndex(windowActive));\n\tif (err != noErr)\n            GetMouse(&where); //fake mouse event\n        else\n            GlobalToLocal((Point *) &where);\n        buttonState = MouseModifierStateCarbon(event,whatHappened);\n \tcachedButtonState = cachedButtonState | buttonState;\n       \n        if (whatHappened == kEventMouseWheelMoved) {\n            GetEventParameter( event,\n                                kEventParamKeyModifiers,\n                                typeMouseWheelAxis,\n                                NULL,\n                                sizeof(EventMouseWheelAxis),\n                                NULL,\n                                &wheelMouseDirection); \n            GetEventParameter( event,\n                                kEventParamMouseWheelDelta,\n                                typeLongInteger,\n                                NULL,\n                                sizeof(long),\n                                NULL,\n                                &wheelMouseDelta); \n       }\n\n        pthread_mutex_lock(&gEventQueueLock);\n\tevt = (sqMouseEvent*) nextEventPut();\n\n\t/* first the basics */\n\tevt->type = EventTypeMouse;\n\tevt->timeStamp = ioMSecs() & MillisecondClockMask; \n        evt->x = where.h;\n\tevt->y = where.v;\n\t/* then the buttons */\n\tevt->buttons = buttonState & 0x07;\n\t/* then the modifiers */\n\tevt->modifiers = buttonState >> 3;\n\t/* clean up reserved */\n\tevt->reserved1 = 0;\n\tevt->windowIndex = windowActive;\n\t\n\tif (oldEvent.buttons == evt->buttons && \n\t    oldEvent.x == evt->x &&\n\t    oldEvent.y == evt->y &&\n\t    oldEvent.modifiers == evt->modifiers &&\n            whatHappened != kEventMouseWheelMoved) \n\t    ignoreLastEvent();\n\t    \n        oldEvent = *evt;\n     \tpthread_mutex_unlock(&gEventQueueLock);\n        signalAnyInterestedParties();\n                \n        if (whatHappened == kEventMouseWheelMoved) \n            fakeMouseWheelKeyboardEvents(wheelMouseDirection,wheelMouseDelta);\n}\n\nvoid fakeMouseWheelKeyboardEvents(EventMouseWheelAxis wheelMouseDirection,long wheelMouseDelta) {\n    long \ti,asciiChar;\n    sqKeyboardEvent *evt,*extra;\n    UInt32\tmacKeyCode;\n    \n    pthread_mutex_lock(&gEventQueueLock);\n    for(i=0;i<abs(wheelMouseDelta);i++) {\n        if (wheelMouseDirection == kEventMouseWheelAxisX) \n            if (wheelMouseDelta > 0) {//up/down\n                macKeyCode = 126;\n                asciiChar = kUpArrowCharCode;\n            } else {\n                macKeyCode = 125;\n                asciiChar = kDownArrowCharCode;\n            }\n        else\n            if (wheelMouseDelta > 0) {//left/right\n                macKeyCode = 124;\n                asciiChar = kRightArrowCharCode;\n            } else {\n                macKeyCode = 123;\n                asciiChar = kLeftArrowCharCode;\n            }\n            \n\tevt = (sqKeyboardEvent*) nextEventPut();\n\t/* first the basics */\n\tevt->type = EventTypeKeyboard;\n\tevt->timeStamp = ioMSecs() & MillisecondClockMask;\n\t/* now the key code */\n\t/* press code must differentiate */\n\tevt->charCode = macKeyCode;\n\tevt->pressCode = EventKeyDown;\n\tevt->modifiers = modifierMap[(controlKey >> 8)];\n\tevt->windowIndex = windowActive;\n\t/* generate extra character event */\n        extra = (sqKeyboardEvent*)nextEventPut();\n        *extra = *evt;\n        extra->charCode = asciiChar;\n        extra->utf32Code = asciiChar;\n        extra->pressCode = EventKeyChar;\n        \n       if(!inputSemaphoreIndex) {\n            int  keystate;\n    \n            /* keystate: low byte is the ascii character; next 8 bits are modifier bits */\n    \n            keystate = (evt->modifiers << 8) | asciiChar;\n            if (keystate == getInterruptKeycode()) {\n                    /* Note: interrupt key is \"meta\"; it not reported as a keystroke */\n                    setInterruptPending(true);\n            } else {\n                    keyBuf[keyBufPut] = keystate;\n                    keyBufPut = (keyBufPut + 1) % KEYBUF_SIZE;\n                    if (keyBufGet == keyBufPut) {\n                            /* buffer overflow; drop the last character */\n                            keyBufGet = (keyBufGet + 1) % KEYBUF_SIZE;\n                            keyBufOverflows++;\n                    }\n            }\n\n        }\n    }\n    if (wheelMouseDelta != 0) {\n    \tevt = (sqKeyboardEvent*) nextEventPut();\n\t/* first the basics */\n\tevt->type = EventTypeKeyboard;\n\tevt->timeStamp = ioMSecs() & MillisecondClockMask;\n\t/* now the key code */\n\t/* press code must differentiate */\n\tevt->charCode = macKeyCode;\n\tevt->pressCode = EventKeyUp;\n\tevt->modifiers = modifierMap[(controlKey >> 8)];\n\tevt->windowIndex = windowActive;\n    }\n    pthread_mutex_unlock(&gEventQueueLock);\n    signalAnyInterestedParties();                \n}\n\nvoid recordKeyboardEventCarbon(EventRef event) {\n    int\t\t\t\tmodifierBits, keyIndex, i, ISawRawKeyRepeat;\n    UniCharCount\tuniCharCount;\n    UniChar\t\t\tmodifiedUniChar, *uniCharBufPtr, *uniCharBuf;\n    OSErr\t\t\terr;\n    UInt32\t\t\tactualSize,macKeyCode,textEntryServices; \n    EventRef\t\tactualEvent;\n\tchar\t\tmackeycodeFromCarbon;\n    \n    //  Tetsuya HAYASHI <tetha@st.rim.or.jp> supplied multiple unicode extraction\n    \n    /*  kEventTextInputUnicodeForKeyEvent\n        Required parameters:\n        -->     kEventParamTextInputSendComponentInstance           typeComponentInstance\n        -->     kEventParamTextInputSendRefCon                      typeLongInteger\n        -->     kEventParamTextInputSendSLRec                       typeIntlWritingCode\n        -->     kEventParamTextInputSendText                        typeUnicodeText\n        -->     kEventParamTextInputSendKeyboardEvent               typeEventRef\n                    (This parameter is the original raw keyboard event that produced the\n                     text.  It enables access to kEventParamKeyModifiers and \n                     kEventParamKeyCode parameters.\n                     You can also extract from this event either Unicodes or Mac encoding\n                     characters as follows:\n                            kEventParamKeyUnicodes              typeUnicodeText\n                            kEventParamKeyMacCharCodes          typeChar (if available)\n                     The kEventParamKeyUnicodes parameter of the raw keyboard event is\n                     identical to the TextInput event's kEventParamTextInputSendText\n                     parameter.  Note that when contents of TSM's bottom-line input\n                     window (i.e. during typing Chinese, Korean, or Japanese) are confirmed,\n                     the raw keyboard event's keyCode and modifiers are set to default values.)\n    */\n\n    /* Get the actual keyboard event */\n    err = GetEventParameter (event, kEventParamTextInputSendKeyboardEvent,\n            typeEventRef, NULL, sizeof(EventRef), NULL, &actualEvent);\n    /* Get the actual data size */\n    err = GetEventParameter (event, kEventParamTextInputSendText,\n            typeUnicodeText, NULL, 0, &actualSize, NULL);\n\n    /* Get the actual character data */\n    uniCharBuf = uniCharBufPtr = malloc(actualSize);\n    err = GetEventParameter (actualEvent, kEventParamKeyUnicodes,\n            typeUnicodeText, NULL, actualSize, NULL, uniCharBuf);\n                            \n    err = GetEventParameter (event, kEventParamTextInputSendComponentInstance,\n            typeComponentInstance, NULL, sizeof(UInt32), NULL, &textEntryServices);\n\n\terr = GetEventParameter( actualEvent, kEventParamKeyCode, \n\t\t\ttypeUInt32, NULL, sizeof(UInt32), NULL, &macKeyCode); \n\n\terr = GetEventParameter( actualEvent, kEventParamKeyMacCharCodes, \n\t\t\ttypeChar, NULL, sizeof(char), NULL, &mackeycodeFromCarbon);\n\n\n    modifiedUniChar = *uniCharBufPtr;\n    buttonState = modifierBits =ModifierStateCarbon(actualEvent,0); //Capture option states\n    if (((modifierBits >> 3) & 0x9) == 0x9) {  /* command and shift */\n            if ((modifiedUniChar >= 97) && (modifiedUniChar <= 122)) {\n                    /* convert ascii code of command-shift-letter to upper case */\n                    modifiedUniChar = modifiedUniChar - 32;\n            }\n    }\n\n\tmodifierBits = modifierBits >> 3;\n    pthread_mutex_lock(&gEventQueueLock);\n    \n    /* Put sqKeyboardEvent in actualSize times */\n    uniCharCount = actualSize / sizeof(UniChar);\n\tkeyIndex = indexInKeyMap(macKeyCode);\n\tISawRawKeyRepeat = findRepeatInKeyMap(macKeyCode);\n\tif (keyIndex >= 0)\n\t\tkeyMap[keyIndex].keyChar = modifiedUniChar;\n\n    for (i=0; i<uniCharCount; i++) {\n        CFStringRef theString;\n        unsigned char macRomanString[2];\n        int macRomanCode;\n        \n        theString = CFStringCreateWithCharacters (nil, &modifiedUniChar, (CFIndex) 1);\n        CFStringGetCString (theString,(char *)&macRomanString,2, kCFStringEncodingMacRoman);\n        macRomanCode = macRomanString[0];\n        CFRelease(theString);\n        \n       /* Put the sqKeyboardEvent for KeyDown */\n\t\tenterKeystroke ( EventTypeKeyboard, macKeyCode, EventKeyDown, 0, modifierBits);\n\t\t\n        /* generate extra character event */\n\t\tenterKeystroke ( EventTypeKeyboard, macRomanCode, EventKeyChar, modifiedUniChar, modifierBits);\n        \n    /* Put the sqKeyboardEvent for KeyUp */\n\t\tif (!ISawRawKeyRepeat && (uniCharCount> 1 || (keyIndex < 0)))\n\t\t\tenterKeystroke ( EventTypeKeyboard, macKeyCode, EventKeyUp, 0,  modifierBits);\n        \n        uniCharBufPtr++;\n        modifiedUniChar = *uniCharBufPtr;\n    }\n\n    free(uniCharBuf);\n    pthread_mutex_unlock(&gEventQueueLock);\t\t        \n    signalAnyInterestedParties();\n}\n\n\nint MouseModifierStateCarbon(EventRef event,UInt32 whatHappened) {\n\tlong stButtons = 0;\n        UInt32 keyBoardModifiers=0;\n        EventMouseButton mouseButton=0;\n        static long buttonState[4] = {0,0,0,0};\n        OSErr err;\n        \n\terr = GetEventParameter( event,\n                                kEventParamKeyModifiers,\n                                typeUInt32,\n                                NULL,\n                                sizeof(UInt32),\n                                NULL,\n                                &keyBoardModifiers); \n  \tif (whatHappened != kEventMouseMoved && whatHappened != kEventMouseWheelMoved)\n            err = GetEventParameter( event,\n                                kEventParamMouseButton,\n                                typeMouseButton,\n                                NULL,\n                                sizeof(EventMouseButton),\n                                NULL,\n                                &mouseButton); \n                                \n        if (mouseButton > 0 && mouseButton < 4) {\n            buttonState[mouseButton] = (whatHappened == kEventMouseUp) ? 0 : 1;\n            stButtons |= buttonState[1]*4*\n                        (!((keyBoardModifiers & optionKey) || (keyBoardModifiers & cmdKey)));\n            stButtons |= buttonState[1]*((keyBoardModifiers & optionKey)> 0)*2;\n            stButtons |= buttonState[1]*((keyBoardModifiers & cmdKey)> 0)*1;\n            stButtons |= buttonState[2]*1;\n            stButtons |= buttonState[3]*2;\n       }\n            \n\t/* button state: low three bits are mouse buttons; next 8 bits are modifier bits */\n\treturn ((modifierMap[((keyBoardModifiers & 0xFFFF) >> 8)] << 3) |\n\t\t(stButtons & 0x7));\n}\n\nint ModifierStateCarbon(EventRef event,UInt32 whatHappened) {\n        UInt32 keyBoardModifiers=0;\n        OSErr err;\n        \n\terr = GetEventParameter( event,\n                                kEventParamKeyModifiers,\n                                typeUInt32,\n                                NULL,\n                                sizeof(UInt32),\n                                NULL,\n                                &keyBoardModifiers); \n \t/* button state: low three bits are mouse buttons; next 8 bits are modifier bits */\n\treturn ((modifierMap[((keyBoardModifiers & 0xFFFF) >> 8)] << 3));\n}\n\nstatic pascal void PowerManagerDefeatTimer (EventLoopTimerRef theTimer,void* userData) {\n#ifdef UNIVERSALBINARY\n#else\n#ifndef BROWSERPLUGIN\n    if (gDisablePowerManager && gTapPowerManager) {\n        IdleUpdate();\n#if !defined(MINIMALVM)\n        UpdateSystemActivity(UsrActivity);\n#endif\n    }\n#endif\n#endif \n}\n\n\n#ifndef BROWSERPLUGIN\n\nvoid doPendingFlush(void) {\n\textern  Boolean gSqueakUIFlushUseHighPercisionClock;\n\textern\tlong\tgSqueakUIFlushSecondaryCleanupDelayMilliseconds,gSqueakUIFlushSecondaryCheckForPossibleNeedEveryNMilliseconds;\n\tstatic int lastTick = 0;\n\tint now = gSqueakUIFlushUseHighPercisionClock ? ioMSecs(): ioLowResMSecs();\n\tint delta = now - lastTick;\n\t\t\n\tif ((delta >= gSqueakUIFlushSecondaryCheckForPossibleNeedEveryNMilliseconds) || (delta < 0))  {\n\t\twindowDescriptorBlock *windowBlock;\n\t\tint i;\n\t\t\n\t\tfor(i=1;i<=getCurrentIndexInUse();i++) {\n\t\t\twindowBlock = windowBlockFromIndex(i);\n\t\t\tif ((windowBlock) && (windowBlock->dirty) ) {\n\t\t\t\tdelta = now - windowBlock->rememberTicker;\n\t\t\t\tif ((delta >= gSqueakUIFlushSecondaryCleanupDelayMilliseconds) || (delta < 0))  {\n\t\t\t\t\tCGContextFlush(windowBlock->context);\n\t\t\t\t\twindowBlock-> dirty = 0;\n\t\t\t\t\twindowBlock->rememberTicker = now =  gSqueakUIFlushUseHighPercisionClock ? ioMSecs(): ioLowResMSecs();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tlastTick = now;\n\t} \n}\n\nint ioProcessEvents(void) {\n\n\tdoPendingFlush();\n    if (gQuitNowRightNow) {\n        ioExit();  //This might not return, might call exittoshell\n        QuitApplicationEventLoop();\n        pthread_exit(null);\n    }\n\treturn 0;\n}\n#endif \n\nint getUIToLock(long *data) {\n    OSStatus err;\n    EventRef dummyEvent;\n    \n    err = MacCreateEvent(null,'JMM1','JMM1', 0, kEventAttributeUserEvent, &dummyEvent);\n    if (err == noErr) {\n        err = SetEventParameter(dummyEvent,1,1,sizeof(long *),&data);\n        pthread_mutex_lock(&gEventUILock);\n        err = PostEventToQueue(GetMainEventQueue(), dummyEvent,kEventPriorityHigh);\n\t\tReleaseEvent(dummyEvent);\n        pthread_cond_wait(&gEventUILockCondition,&gEventUILock);\t\n        pthread_mutex_unlock(&gEventUILock);\n    }\n\treturn 0;\n}\n\nstatic pascal OSStatus customHandleForUILocks(EventHandlerCallRef myHandler,\n            EventRef event, void* userData)\n{\n    long *data;\n    long numberOfParms;\n    OSErr\terr;\n        \n    pthread_mutex_lock(&gEventUILock);\n        \n    err = GetEventParameter(event, 1, 1, NULL, sizeof(long *), NULL, &data);\n    if (err != noErr) {\n        pthread_cond_signal(&gEventUILockCondition);\t\n        pthread_mutex_unlock(&gEventUILock);\n    }\n    \n    numberOfParms = data[0];\n    \n    if (0 == numberOfParms)\n        data[2] = ((int (*) (void)) data[1]) ();\n    if (1 == numberOfParms)\n        data[3] = ((int (*) (long)) data[1]) (data[2]);\n    if (2 == numberOfParms)\n        data[4] = ((int (*) (long,long)) data[1]) (data[2],data[3]);\n    if (3 == numberOfParms)\n        data[5] = ((int (*) (long,long,long)) data[1]) (data[2],data[3],data[4]);\n    if (4 == numberOfParms)\n        data[6] = ((int (*) (long,long,long,long)) data[1]) (data[2],data[3],data[4],data[5]);\n    if (5 == numberOfParms)\n        data[7] = ((int (*) (long,long,long,long,long)) data[1]) (data[2],data[3],data[4],data[5],data[6]);\n    if (6 == numberOfParms)\n        data[8] = ((int (*) (long,long,long,long,long,long)) data[1]) (data[2],data[3],data[4],data[5],data[6], data[7]);\n\n    pthread_cond_signal(&gEventUILockCondition);\t\n    pthread_mutex_unlock(&gEventUILock);\n    return noErr;\n}\n\nvoid signalAnyInterestedParties() {\n    if (inputSemaphoreIndex != 0)\n        signalSemaphoreWithIndex(inputSemaphoreIndex);\n    /* I'm not sure this buys anything, usually we are waiting for mophic to step so \n    waking up early doesn't do much except drive CPU up\n    pthread_mutex_lock(&gSleepLock);\n    pthread_cond_signal(&gSleepLockCondition);\t\n    pthread_mutex_unlock(&gSleepLock);*/\n}\n\n\nsqKeyboardEvent *enterKeystroke (long type, long cc, long pc, UniChar utf32Code, long m) {\n\tsqKeyboardEvent \t*evt;\n\tevt = (sqKeyboardEvent*) nextEventPut();\n\n\t/* first the basics */\n\t//fprintf(stdout,\"\\nKeyStroke time %i Type %i Value %i\",ioMSecs(),pc,cc);\n\tevt->type = type;\n\tevt->timeStamp = ioMSecs() & MillisecondClockMask;\n\t/* now the key code */\n\t/* press code must differentiate */\n\tevt->charCode = cc;\n\tevt->pressCode = pc;\n\tevt->modifiers = m;\n\tevt->windowIndex = windowActive;\n\tevt->utf32Code = 0;\n\tif(pc == EventKeyChar) {\n\t\tevt->utf32Code = utf32Code;\n\t\tif (!inputSemaphoreIndex) {\n\t\t\tint  keystate;\n\n\t\t\t/* keystate: low byte is the ascii character; next 8 bits are modifier bits */\n\t\t\t\tkeystate = (evt->modifiers << 8) | (unsigned char)  ((char) cc);\n\t\t\tif (keystate == getInterruptKeycode()) {\n\t\t\t\t\t/* Note: interrupt key is \"meta\"; it not reported as a keystroke */\n\t\t\t\t\tsetInterruptPending(true);\n\t\t\t} else {\n\t\t\t\t\tkeyBuf[keyBufPut] = keystate;\n\t\t\t\t\tkeyBufPut = (keyBufPut + 1) % KEYBUF_SIZE;\n\t\t\t\t\tif (keyBufGet == keyBufPut) {\n\t\t\t\t\t\t\t/* buffer overflow; drop the last character */\n\t\t\t\t\t\t\tkeyBufGet = (keyBufGet + 1) % KEYBUF_SIZE;\n\t\t\t\t\t\t\tkeyBufOverflows++;\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn evt;\n}\n\n\nstatic int addToKeyMap(int keyCode, int keyChar)\n{\n  //fprintf(stdout, \"\\nAddToKeyMap T %i c %i i %i\",ioMSecs(),keyCode,keyMapSize);\n  if (keyMapSize > KeyMapSize) { fprintf(stderr, \"keymap overflow\\n\");  return -1; }\n  keyMap[keyMapSize++]= (KeyMapping){ keyCode, keyChar, 0};\n  return keyChar;\n}\n\nstatic int indexInKeyMap(int keyCode)\n{\n  int i;\n  for (i= 0;  i < keyMapSize;  ++i)\n    if (keyMap[i].keyCode == keyCode)\n      return i;\n  return -1;\n}\n\nstatic int findInKeyMap(int keyCode)\n{\n  int idx= indexInKeyMap(keyCode);\n  return (idx != -1) ? keyMap[idx].keyChar : -1;\n}\n\nstatic int findRepeatInKeyMap(int keyCode)\n{\n  int idx= indexInKeyMap(keyCode);\n  return (idx != -1) ? keyMap[idx].keyRepeated : 0;\n}\n\nstatic void setRepeatInKeyMap(int keyCode)\n{\n  int idx= indexInKeyMap(keyCode);\n  if (idx != -1) keyMap[idx].keyRepeated = 1;\n}\n\nstatic int removeFromKeyMap(int keyCode)\n{\n  int idx= indexInKeyMap(keyCode);\n  int keyChar= -1;\n  //fprintf(stdout, \"\\nremoveFromKeyMap T %i c %i i %i\",ioMSecs(),keyCode,keyMapSize-1);\n  if (idx == -1) { fprintf(stderr, \"keymap underflow\\n\");  return -1; }\n  keyChar= keyMap[idx].keyChar;\n  for (; idx < keyMapSize - 1;  ++idx)\n    keyMap[idx]= keyMap[idx + 1];\n  --keyMapSize;\n  return keyChar;\n}\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacUIEvents.h",
    "content": "/****************************************************************************\n*   PROJECT: Squeak Headers\n*   FILE:    sqMacUIEvents.c\n*   CONTENT: \n*\n*   AUTHOR:  John Maloney, John McIntosh, and others.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacUIEvents.h 1708 2007-06-10 00:40:04Z johnmci $\n*\n*   NOTES: \n*  Feb 22nd, 2002, JMM moved code into 10 other files, see sqMacMain.c for comments\n*  Feb 27th, 2002, JMM changed for carbon event logic.\n*  Mar 8th,  2002, JMM external prims that make dialog windows must do this on main thread\n*   3.7.0bx Nov 24th, 2003 JMM gCurrentVMEncoding, plus multiple keystrokes for input\n****************************************************************************/\n \n    #include <Carbon/Carbon.h>\n\ntypedef int (*eventMessageHook)(EventRecord* event);\n\nvoid recordKeystroke(EventRecord *theEvent);\nvoid recordModifierButtons(EventRecord *theEvent);\nvoid recordMouseDown(EventRecord *theEvent);\nint recordDragDropEvent(EventRecord *theEvent, int numberOfItems, int dragType);\nint recordKeyboardEvent(EventRecord *theEvent, int keyType);\nvoid recordWindowEvent(int windowType,int left, int top, int right, int bottom);\nvoid recordMenu(int menuID,UInt32 menuItem);\nint MouseModifierState(EventRecord *theEvent);\nWindowPtr getSTWindow(void);\nvoid setMessageHook(eventMessageHook theHook);\nvoid setPostMessageHook(eventMessageHook theHook);\nint checkForModifierKeys();\nvoid ignoreLastEvent();\nvoid DoZoomWindow (EventRecord* theEvent, WindowPtr theWindow, short zoomDir, short hMax, short vMax);\nvoid SetupKeyboard(void);    \nint getUIToLock(sqInt *);\nvoid SetUpCarbonEvent();\nvoid SetUpCarbonEventForWindowIndex(int index);\nvoid RunApplicationEventLoopWithSqueak(void);\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacUIEventsUniversal.c",
    "content": "/****************************************************************************\n*   PROJECT: Mac event interface.\n*   FILE:    sqMacUIEvents.c\n*   CONTENT: \n*\n*   AUTHOR:  John Maloney, John McIntosh, and others.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacUIEvents.c 1297 2006-02-02 07:59:16Z johnmci $\n*\n*   NOTES: \n*  Feb 22nd, 2002, JMM moved code into 10 other files, see sqMacMain.c for comments\n*  Mar 1st, 2002, JMM carbon event logic, mutiple buttons with scroll wheels.\n*  Mar 8th,  2002, JMM Add logic to pass in external prim calls that require main thread UI execution\n*  Mar 10th, 2002, JMM correct bad char cast, ensure we can get all characters.\n*  Mar 14th, 2002, JMM fix text input for encoding keys (textinput versus raw char)\n*  Apr 17th, 2002, JMM Use accessors for VM variables.\n*  3.2.8b1 July 24th, 2002 JMM support for os-x plugin under IE 5.x drop usb stuff\n*  3.5.1b2 June 6th, 2003 JMM support for aio polling under unix socket support\n*  3.5.1b3 June 7th, 2003 JMM fix up full screen pthread issue.\n*  3.5.1b5 June 25th, 2003 JMM don't close window on floating full screen, handle issue with keydown and floating window if required.\n*  3.6.0b1 Aug 5th, 2003 JMM only invoke event timer loop logic if gTapPowerManager is true (OS supports!)\n*  3.6.2b3 Nov 25th, 2003 JMM Tetsuya HAYASHI <tetha@st.rim.or.jp> supplied multiple unicode extraction\n*  3.7.0bx Nov 24th, 2003 JMM gCurrentVMEncoding\n*  3.7.1b3 Jan 29th, 2004  JMM return unicode for classic version versus virtual keyboard code \n*  3.7.3b2 Apr 10th, 2004 JMM Tetsuya HAYASHI <tetha@st.rim.or.jp>  alteration to unicode key capture\n*  3.8.0b1 July 20th, 2004 JMM Multiple window support\n*  3.8.5b2 Jan 25th, 2005 JMM reduce qd buffer flushing.\n*  3.8.7b1 Mar 13th, 2005 JMM fire keydown/keychar on key repeat to mimic ms windows behavior.\n*  3.8.7b2 Mar 19th, 2005 JMM change keydown/up back to virtual keycode, add unicode to keychar\n*  3.8.8b9 Aug 15th, 2005 JMM flush quartz buffer if needded\n*  3.9.1b2 Oct 4th, 2005 Jmm add MillisecondClockMask\n 3.8.11b1 Mar 4th, 2006 JMM refactor, cleanup and add headless support\n 3.8.12b6u Sept 5th, 2006 JMM rework mouse logic for mac\n 3.8.13b4u  Oct 16th, 2006 JMM headless\n *\t3.8.14b1 Oct\t,2006 JMM browser rewrite\n 3.8.14b4 Nov 17th, 2006 JMM fix issue with mouse location and pre 3.0 (input semaphore driven) squeak images\n 3.8.15b3  Feb 19th, 2007 JMM add cursor set logic\n 3.8.15b5\tMar 10th, 2007 JMM check on menu item quit\n 3.8.17b5\tMay 1st, 2007 JMM set tracking on bounds changed, not resize complete (which doesn't see the use of maximum button)\n \n notes: IsUserCancelEventRef\n\n*****************************************************************************/\n\n\n#include \"sq.h\"\n#include \"sqMacUIEvents.h\"\n#include \"sqMacUIMenuBar.h\"\n#include \"sqMacWindow.h\"\n#include \"sqMacHostWindow.h\"\n#include \"sqMacTime.h\"\n#include \"sqMacNSPluginUILogic2.h\"\n#include \"nsPoolManagement.h\"\n\n#include <pthread.h>\n#include \"sqaio.h\"\n#include <Quickdraw.h>\n#include <unistd.h>\n\nenum { KeyMapSize= 32 };\n\ntypedef struct\n{\n  int keyCode;\n  int keyChar;\n  int keyRepeated;\n} KeyMapping;\n\nextern int gSqueakDebug;\npthread_mutex_t gEventQueueLock;\n\n# define DPRINTF(ARGS) if (gSqueakDebug) fprintf ARGS\n\n#define EventTypeFullScreenUpdate 98\n#define EventTypePostEventProcessing 99\nstatic void doPostMessageHook(EventRef event);\nstatic void postFullScreenUpdate(void);\nvoid signalAnyInterestedParties(void);\nstatic sqKeyboardEvent *enterKeystroke (long type, long cc, long pc, UniChar utf32Char, long m);\n\nstatic int addToKeyMap(int keyCode, int keyChar);\nstatic int findInKeyMap(int keyCode);\nstatic int removeFromKeyMap(int keyCode);\nstatic int indexInKeyMap(int keyCode);\nstatic int findRepeatInKeyMap(int keyCode);\nstatic void setRepeatInKeyMap(int keyCode);\n\nstatic void doPendingFlush(void);\nvoid ignoreLastEvent(void);\nvoid sqRevealWindowAndHandleQuit () ;\n\n/*** Variables -- Event Recording ***/\n#define MAX_EVENT_BUFFER 1024\n\nextern int getInterruptKeycode();\nextern int setInterruptPending(int value);\nextern int getFullScreenFlag();\nextern struct VirtualMachine* interpreterProxy;\nextern Boolean gSqueakHeadless;\nextern void SetCursorBackToSomething(void);\n\n\nstatic KeyMapping keyMap[KeyMapSize];\nstatic int keyMapSize=\t   0;\nBoolean gQuitNowRightNow=false;\nBoolean NeedToSetCursorBackOnApplicationActivate = false;\n\nextern MenuHandle editMenu;\nextern MenuHandle appleMenu;\n\nstatic sqInputEvent eventBuffer[MAX_EVENT_BUFFER];\nstatic int eventBufferGet = 0;\nstatic int eventBufferPut = 0;\nstatic Boolean NeedToSetCursorBack=false;\n\n\n/* event capture */\nsqInputEvent *nextEventPut(void);\n\n#define MAKETHESESTATIC static\n \n#define KEYBUF_SIZE 64\n/* declaration of the event message hook */\nMAKETHESESTATIC eventMessageHook messageHook = NULL;\nMAKETHESESTATIC eventMessageHook postMessageHook = NULL;\nMAKETHESESTATIC int inputSemaphoreIndex = 0;/* if non-zero the event semaphore index */\n int keyBuf[KEYBUF_SIZE];\t/* circular buffer */\n int keyBufGet = 0;\t\t\t/* index of next item of keyBuf to read */\n int keyBufPut = 0;\t\t\t/* index of next item of keyBuf to write */\n int keyBufOverflows = 0;\t/* number of characters dropped */\n\n int buttonState = 0;\t\t/* mouse button and modifier state when mouse\n\t\t\t\t\t\t\t   button went down or 0 if not pressed */\n int cachedButtonState = 0;\t/* buffered mouse button and modifier state for\n\t\t\t\t\t\t\t   last mouse click even if button has since gone up;\n\t\t\t\t\t\t\t   this cache is kept until the next time ioGetButtonState()\n\t\t\t\t\t\t\t   is called to avoid missing short clicks */\nint gButtonIsDown = 0;\nint windowActive = 0;\t\t/* positive indicates the active window */\n\nstatic Point savedMousePosition;\t/* mouse position when window is inactive */\nstatic Point carbonMousePosition;\t/* mouse position when carbon is running for squeak 2.8 images */\n\n/* This table maps the 5 Macintosh modifier key bits to 4 Squeak modifier\n   bits. (The Mac shift and caps lock keys are both mapped to the single\n   Squeak shift bit).  This was true for squeak upto 3.0.7. Then in 3.0.8 we \n   decided to not map the cap lock key to shift\n   \n\t\tMac bits: <control><option><caps lock><shift><command>\n\t\tST bits:  <command><option><control><shift>\n*/\n char modifierMap[256] = {\t\n 0, 8, 1, 9, 0, 8, 1, 9, 4, 12, 5, 13, 4, 12, 5, 13, //Track left and right shift keys\n 2, 10, 3, 11, 2, 10, 3, 11, 6, 14, 7, 15, 6, 14, 7, \n15, 1, 9, 1, 9, 1, 9, 1, 9, 5, 13, 5, 13, 5, 13, 5, \n13, 3, 11, 3, 11, 3, 11, 3, 11, 7, 15, 7, 15, 7, 15,\n 7, 15, 4, 12, 5, 13, 4, 12, 5, 13, 4, 12, 5, 13, 4,\n12, 5, 13, 6, 14, 7, 15, 6, 14, 7, 15, 6, 14, 7, 15, \n 6, 14, 7, 15, 5, 13, 5, 13, 5, 13, 5, 13, 5, 13, 5,\n13, 5, 13, 5, 13, 7, 15, 7, 15, 7, 15, 7, 15, 7, 15, \n 7, 15, 7, 15, 7, 15, 2, 10, 3, 11, 2, 10, 3, 11, 6, \n14, 7, 15, 6, 14, 7, 15, 2, 10, 3, 11, 2, 10, 3, 11, \n 6, 14, 7, 15, 6, 14, 7, 15, 3, 11, 3, 11, 3, 11, 3, \n 11, 7, 15, 7, 15, 7, 15, 7, 15, 3, 11, 3, 11, 3, 11, \n 3, 11, 7, 15, 7, 15, 7, 15, 7, 15, 6, 14, 7, 15, 6, \n 14, 7, 15, 6, 14, 7, 15, 6, 14, 7, 15, 6, 14, 7, 15, \n 6, 14, 7, 15, 6, 14, 7, 15, 6, 14, 7, 15, 7, 15, 7, \n 15, 7, 15, 7, 15, 7, 15, 7, 15, 7, 15, 7, 15, 7, 15, \n 7, 15, 7, 15, 7, 15, 7, 15, 7, 15, 7, 15, 7, 15 };\n\nBoolean IsKeyDown(void);    \n\nint recordDragDropEvent(EventRecord *theEvent, int numberOfItems, int dragType) {\n\tsqDragDropFilesEvent *evt;\n\tint theButtonState;\n\t\n        pthread_mutex_lock(&gEventQueueLock);\n        evt = (sqDragDropFilesEvent*) nextEventPut();\n\n\t/* first the basics */\n\ttheButtonState = MouseModifierState(theEvent);\n\tevt->type = EventTypeDragDropFiles;\n\tevt->timeStamp = ioMSecs() & MillisecondClockMask; \n\tGlobalToLocal((Point *) &theEvent->where);\n\tevt->x = theEvent->where.h;\n\tevt->y = theEvent->where.v;\n\tevt->numFiles = numberOfItems;\n\tevt->dragType = dragType;\n\t\n\t/* then the modifiers */\n\tevt->modifiers = theButtonState >> 3;\n\tevt->windowIndex = windowActive;\n        pthread_mutex_unlock(&gEventQueueLock);\n        signalAnyInterestedParties();\n\treturn 1;\n}\n\nint MouseModifierState(EventRecord *theEvent) {\n\tint stButtons;\n\n\tstButtons = 0;\n\tif ((theEvent->modifiers & btnState) == false) {  /* is false if button is down */\n\t\tstButtons = 4;\t\t/* red button by default */\n\t\tif ((theEvent->modifiers & optionKey) != 0) {\n\t\t\tstButtons = 2;\t/* yellow button if option down */\n\t\t}\n\t\tif ((theEvent->modifiers & cmdKey) != 0) {\n\t\t\tstButtons = 1;\t/* blue button if command down */\n\t\t}\n\t} \n\n\t/* button state: low three bits are mouse buttons; next 8 bits are modifier bits */\n\treturn ((modifierMap[(theEvent->modifiers >> 8)] << 3) |\n\t\t(stButtons & 0x7));\n}\n\n\nsqInputEvent *nextEventPut(void) {\n\tsqInputEvent *evt;\n\tevt = eventBuffer + eventBufferPut;\n\teventBufferPut = (eventBufferPut + 1) % MAX_EVENT_BUFFER;\n\tif (eventBufferGet == eventBufferPut) {\n\t\t/* buffer overflow; drop the last event */\n\t\teventBufferGet = (eventBufferGet + 1) % MAX_EVENT_BUFFER;\n\t}\n\treturn evt;\n}\n\nvoid ignoreLastEvent() {\n    eventBufferPut -= 1;\n    if (eventBufferPut < 0) \n        eventBufferPut = MAX_EVENT_BUFFER -1;\n}\n\nint ioSetInputSemaphore(int semaIndex) {\n\tinputSemaphoreIndex = semaIndex;\n\treturn 1;\n}\n\nint ioGetNextEvent(sqInputEvent *evt) {\n\t\tioProcessEvents();\n\t\tpthread_mutex_lock(&gEventQueueLock);\n\tif (eventBufferGet == eventBufferPut) {\n            pthread_mutex_unlock(&gEventQueueLock);\n            return false;\n        }\n\t*evt = eventBuffer[eventBufferGet];\n\teventBufferGet = (eventBufferGet+1) % MAX_EVENT_BUFFER;\n        pthread_mutex_unlock(&gEventQueueLock);\n        if (evt->type == EventTypeFullScreenUpdate) {\n            fullDisplayUpdate();\t//Note I think it's ok to unlock by now\n            return ioGetNextEvent(evt);\n        }\n        \n        if (evt->type == EventTypePostEventProcessing) {\n            if (postMessageHook) \n                postMessageHook((EventRecord *) evt->unused1);\n            free((void *) evt->unused1);\n            return ioGetNextEvent(evt);\n        }\n\treturn true;\n}\n\nint ioGetButtonState(void) {\n\t    ioProcessEvents();\n\tif ((cachedButtonState & 0x7) != 0) {\n\t\tint result = cachedButtonState;\n\t\tcachedButtonState = 0;  /* clear cached button state */\n\t\treturn result;\n\t}\n\tcachedButtonState = 0;  /* clear cached button state */\n\treturn buttonState;\n}\n\nint ioGetKeystroke(void) {\n\tint keystate;\n\n\t    ioProcessEvents();\n\tif (keyBufGet == keyBufPut) {\n\t\treturn -1;  /* keystroke buffer is empty */\n\t} else {\n\t\tkeystate = keyBuf[keyBufGet];\n\t\tkeyBufGet = (keyBufGet + 1) % KEYBUF_SIZE;\n\t\t/* set modifer bits in buttonState to reflect the last keystroke fetched */\n\t\tbuttonState = ((keystate >> 5) & 0xF8) | (buttonState & 0x7);\n\t}\n\treturn keystate;\n}\nint ioMousePoint(void) {\n\tPoint p;\n\n\t    ioProcessEvents();\n\tif (windowActive) {\n\t\tp = carbonMousePosition;\n\t} else {\n\t\t/* don't report mouse motion if window is not active */\n\t\tp = savedMousePosition;\n\t}\n\treturn (p.h << 16) | (p.v & 0xFFFF);  /* x is high 16 bits; y is low 16 bits */\n}\n\nint ioPeekKeystroke(void) {\n\tint keystate;\n\t    ioProcessEvents();\n\tif (keyBufGet == keyBufPut) {\n\t\treturn -1;  /* keystroke buffer is empty */\n\t} else {\n\t\tkeystate = keyBuf[keyBufGet];\n\t\t/* set modifer bits in buttonState to reflect the last keystroke peeked at */\n\t\tbuttonState = ((keystate >> 5) & 0xF8) | (buttonState & 0x7);\n\t}\n\treturn keystate;\n}\n\nvoid setMessageHook(eventMessageHook theHook) {\n    messageHook = theHook;\n}\n\nvoid setPostMessageHook(eventMessageHook theHook) {\n    postMessageHook = theHook;\n}\n\nBoolean IsKeyDown() {\n    interpreterProxy->success(false);\n    return null;\n}\n\nextern MenuHandle fileMenu, editMenu;\n\nstatic EventTypeSpec appEventCmdList[] = {{kEventClassCommand, kEventCommandProcess}};\n\nstatic EventTypeSpec appEventList[] = {{kEventClassApplication, kEventAppActivated},\n                                {kEventClassApplication, kEventAppDeactivated}};\n\nstatic EventTypeSpec windEventList[] = {{kEventClassWindow, kEventWindowDrawContent },\n                            { kEventClassWindow, kEventWindowHidden },\n                            { kEventClassWindow, kEventWindowActivated},\n\t\t\t\t\t\t\t{ kEventClassWindow, kEventWindowBoundsChanged},\n\t\t\t\t\t\t\t{ kEventClassWindow, kEventWindowResizeStarted},\n\t\t\t\t\t\t\t{ kEventClassWindow, kEventWindowResizeCompleted},\n\t\t\t\t\t\t\t{ kEventClassWindow, kEventWindowClose},\n\t\t\t\t\t\t\t{ kEventClassWindow, kEventWindowCollapsed},\n                            { kEventClassWindow, kEventWindowDeactivated}};\n                            \nstatic EventTypeSpec windEventMouseList[] = {\n\t\t\t\t\t\t\t{ kEventClassMouse, kEventMouseMoved},\n                            { kEventClassMouse, kEventMouseWheelMoved},\n                            { kEventClassMouse, kEventMouseDragged},\n                            { kEventClassMouse, kEventMouseUp},\n\t\t\t\t\t\t\t{ kEventClassMouse, kEventMouseDown},\n\t\t                    { kEventClassMouse, kEventMouseEntered },\n\t\t                    { kEventClassMouse, kEventMouseExited }\n\t\t\t\t\t\t\t};\n                            \nstatic EventTypeSpec windEventKBList[] = {{ kEventClassKeyboard, kEventRawKeyDown},\n                            { kEventClassKeyboard, kEventRawKeyUp},\n\t\t\t\t\t\t\t{ kEventClassKeyboard, kEventRawKeyRepeat},\n                            { kEventClassKeyboard, kEventRawKeyModifiersChanged}};\n                            \n                            \nstatic EventTypeSpec appleEventEventList[] = {{ kEventClassAppleEvent, kEventAppleEvent}};\n\nstatic EventTypeSpec textInputEventList[] = {{ kEventClassTextInput, kEventTextInputUnicodeForKeyEvent}};\n\nstatic pascal OSStatus MyAppEventHandler (EventHandlerCallRef myHandlerChain,\n                EventRef event, void* userData);\nstatic pascal OSStatus MyAppEventCmdHandler (EventHandlerCallRef myHandlerChain,\n                EventRef event, void* userData);\nstatic pascal OSStatus MyWindowEventHandler(EventHandlerCallRef myHandler,\n            EventRef event, void* userData);\nstatic pascal OSStatus MyWindowEventMouseHandler(EventHandlerCallRef myHandler,\n            EventRef event, void* userData);\nstatic pascal OSStatus MyWindowEventKBHandler(EventHandlerCallRef myHandler,\n            EventRef event, void* userData);\nstatic pascal OSStatus MyAppleEventEventHandler(EventHandlerCallRef myHandler,\n            EventRef event, void* userData);\nstatic pascal OSStatus MyTextInputEventHandler(EventHandlerCallRef myHandler,\n            EventRef event, void* userData);\nstatic pascal OSStatus customHandleForUILocks(EventHandlerCallRef myHandler,\n            EventRef event, void* userData);\n            \nstatic int MouseModifierStateCarbon(EventRef theEvent,UInt32 whatHappened);   \nstatic int ModifierStateCarbon(EventRef theEvent);   \nvoid recordMouseEventCarbon(EventRef event,UInt32 whatHappened,Boolean noPointConversion);\nstatic void recordKeyboardEventCarbon(EventRef event);\nstatic void recordMenuEventCarbon(MenuRef menu, UInt32 menuItem);\nstatic void recordWindowEventCarbon(int windowType,int left, int top, int right, int bottom,int windowIndex);\nstatic int doPreMessageHook(EventRef event); \nstatic void fakeMouseWheelKeyboardEvents(EventMouseWheelAxis wheelMouseDirection,long wheelMouseDelta);\nvoid SetUpCarbonEvent(void);\n            \nvoid SetUpCarbonEvent() {\n\t\n\tif (!gSqueakHeadless) AdjustMenus();\n\n/* Installing the application event handler */\n\tInstallApplicationEventHandler(NewEventHandlerUPP(MyAppEventCmdHandler), GetEventTypeCount(appEventCmdList), appEventCmdList, 0, NULL);\n    InstallApplicationEventHandler(NewEventHandlerUPP(MyAppEventHandler), GetEventTypeCount(appEventList), appEventList, 0, NULL);\n    \n}\n\nvoid SetUpCarbonEventForWindowIndex(int index) {\n\textern \tvoid setWindowTrackingRgn(int index);\n/* Installing the window event handler */\n    InstallWindowEventHandler(windowHandleFromIndex(index), NewEventHandlerUPP(MyWindowEventHandler), GetEventTypeCount(windEventList), windEventList, 0, NULL);\n    InstallWindowEventHandler(windowHandleFromIndex(index), NewEventHandlerUPP(MyWindowEventMouseHandler), GetEventTypeCount(windEventMouseList), windEventMouseList, 0, NULL);\n    InstallWindowEventHandler(windowHandleFromIndex(index), NewEventHandlerUPP(MyWindowEventKBHandler), GetEventTypeCount(windEventKBList), windEventKBList, 0, NULL);\n    InstallWindowEventHandler(windowHandleFromIndex(index), NewEventHandlerUPP(MyAppleEventEventHandler), GetEventTypeCount(appleEventEventList), appleEventEventList, 0, NULL);\n    InstallWindowEventHandler(windowHandleFromIndex(index), NewEventHandlerUPP(MyTextInputEventHandler), GetEventTypeCount(textInputEventList), textInputEventList, 0, NULL);\n\tsetWindowTrackingRgn(index);\n}\n\nstatic int   doPreMessageHook(EventRef event) {\n#pragma unused(event)\n   /* jmm rethink, breaks not thread safe\n    if (messageHook) {\n        EventRecord theOldEventType;\n        if (!ConvertEventRefToEventRecord(event,&theOldEventType))\n            return eventNotHandledErr;\n        if (messageHook(&theOldEventType))\n            return noErr;\n    } */\n    return eventNotHandledErr;\n}\n\nstatic void   doPostMessageHook(EventRef event) {\n    if (postMessageHook) {\n        EventRecord *theOldEventType;\n        sqInputEvent *evt;\n        \n        theOldEventType = malloc(sizeof(EventRecord));\n        if (!ConvertEventRefToEventRecord(event,theOldEventType)) {\n            free(theOldEventType);\n            return;\n        }\n        pthread_mutex_lock(&gEventQueueLock);\n\tevt = nextEventPut();\n\tevt->type = EventTypePostEventProcessing;\n\tevt->windowIndex = windowActive;\n\tevt->unused1 = (long) theOldEventType;\n        pthread_mutex_unlock(&gEventQueueLock);\n\n        // not quite this postMessageHook(&theOldEventType);\n    }\n}\n\nstatic void   postFullScreenUpdate() {\n    sqInputEvent *evt;\n    \n    pthread_mutex_lock(&gEventQueueLock);\n    evt = nextEventPut();\n    evt->type = EventTypeFullScreenUpdate;\n\tevt->windowIndex = windowActive;\n    pthread_mutex_unlock(&gEventQueueLock);\n}\n\nstatic pascal OSStatus MyAppEventHandler (EventHandlerCallRef myHandlerChain,\n    EventRef event, void* userData)\n{\n#pragma unused(myHandlerChain,userData)\n    UInt32 whatHappened;\n    OSStatus result = eventNotHandledErr; /* report failure by default */\n    extern Boolean gSqueakWindowIsFloating;\n\textern Boolean gSqueakHasCursor;\n\n    if (messageHook && ((result = doPreMessageHook(event)) != eventNotHandledErr))\n        return result;\n\n    whatHappened = GetEventKind(event);\n\n\t//fprintf(stderr,\"\\nAppEvent %i\",whatHappened);\n    switch (whatHappened)\n    {\n        case kEventAppActivated: {\n\t\t\tif ((!gSqueakHeadless || browserActiveAndDrawingContextOkAndInFullScreenMode()) && NeedToSetCursorBack) {\n\t\t\t\tNeedToSetCursorBackOnApplicationActivate = true;\n\t\t\t\tNeedToSetCursorBack = false;\n\t\t\t\tgSqueakHasCursor = true;\n\t\t\t}\n\t\t\t}\n             break;\n        case kEventAppDeactivated: {\n            if (gSqueakWindowIsFloating) break;\n\t\t\tInitCursor();\n\t\t\tif ((!gSqueakHeadless || browserActiveAndDrawingContextOkAndInFullScreenMode()) && gSqueakHasCursor) {\n\t\t\t\tgSqueakHasCursor = false;\n\t\t\t\tNeedToSetCursorBack = true;\n\t\t\t}\n\t\t\twindowActive = 0;\n\t\t\t}\n            break;\n        default:\n            break;\n    }\n    if (postMessageHook) \n        doPostMessageHook(event);\n    return result;\n}\n\nstatic pascal OSStatus MyAppEventCmdHandler (EventHandlerCallRef myHandlerChain,\nEventRef event, void* userData)\n{\n#pragma unused(myHandlerChain,userData)\n    UInt32 whatHappened;\n    HICommand commandStruct;    \n    OSStatus result = eventNotHandledErr; /* report failure by default */\n\n    if(messageHook && ((result = doPreMessageHook(event)) != eventNotHandledErr))\n        return result;\n    whatHappened = GetEventKind(event);\n    switch (whatHappened)\n    {\n        case kEventCommandProcess:\n            GetEventParameter (event, kEventParamDirectObject,\n                typeHICommand, NULL, sizeof(HICommand),NULL, &commandStruct);\n\n            if (commandStruct.menu.menuRef == fileMenu && commandStruct.menu.menuItemIndex == quitItem) {\n\t\t\t\tStr255  itemString;\n\t\t\t\tchar\tcString[256];\n\t\t\t\tGetMenuItemText(commandStruct.menu.menuRef,commandStruct.menu.menuItemIndex,itemString);\n\t\t\t\tCopyPascalStringToC((unsigned char *)itemString,cString);\n\t\t\t\tif (strcmp(cString, \"Quit Without Saving\") == 0)\n\t\t\t\t\tgQuitNowRightNow = true;\n\t\t\t\telse {\n\t\t\t\t\tsqRevealWindowAndHandleQuit ();\n\t\t\t\t}\n\t\t\t\tresult = noErr;\n\t\t\t} else if (commandStruct.commandID == kHICommandHide) {\n\t\t\t} else if (commandStruct.commandID == kHICommandQuit) {\n\t\t\t\tsqRevealWindowAndHandleQuit ();\n\t\t\t} else if (commandStruct.commandID == kHICommandHideOthers) {\n\t\t\t} else if (commandStruct.commandID == kHICommandShowAll) {\n\t\t\t} else if (windowActive) {\n\t\t\t\trecordMenuEventCarbon(commandStruct.menu.menuRef,commandStruct.menu.menuItemIndex);\n\t\t\t\tresult = noErr;\n\t\t\t}\n            break;\n        default:\n            break;\n    }\n    if (postMessageHook) \n        doPostMessageHook(event);\n    return result;\n}\n\nstatic pascal OSStatus MyWindowEventHandler(EventHandlerCallRef myHandler,\n            EventRef event, void* userData)\n{\n#pragma unused(myHandler,userData)\n    UInt32 whatHappened;\n    OSStatus result = eventNotHandledErr; /* report failure by default */\n    extern Boolean gSqueakWindowIsFloating;\n\tRect globalBounds;\n    WindowRef window;\n  \n    if(messageHook && ((result = doPreMessageHook(event)) != eventNotHandledErr))\n        return result;\n    GetEventParameter(event, kEventParamDirectObject, typeWindowRef, NULL,sizeof(window), NULL, &window);\n    whatHappened = GetEventKind(event);\n\t//fprintf(stderr,\"\\nWindowEvent %i %i %i\",whatHappened,IsWindowActive(window),windowIndexFromHandle((int)window));\n\tif (windowIndexFromHandle(window) == 0) \n\t\treturn result;\n    switch (whatHappened)\n    {\n         case kEventWindowActivated:\n          windowActive = windowIndexFromHandle((wHandleType)window);\n            postFullScreenUpdate();\n\t\t\trecordWindowEventCarbon(WindowEventActivated,0, 0, 0, 0,windowActive);\n             break;\n        case kEventWindowDeactivated:\n            if (gSqueakWindowIsFloating) break; \n#warning HIView Point\n            GetEventParameter (event, kEventParamMouseLocation, typeQDPoint,NULL,\n                    sizeof(Point), NULL, &savedMousePosition);\n\t\t\tif (windowIndexFromHandle((wHandleType)window)) {\n\t\t\t\tQDGlobalToLocalPoint(GetWindowPort((wHandleType)window),&savedMousePosition);\n\t\t\t}\n            windowActive = 0;\n             break;\n       case kEventWindowDrawContent:\n            result = noErr;\n            break;\n       case kEventWindowResizeStarted:\n\t\t\t{ \n\t\t\t\twindowDescriptorBlock *targetWindowBlock;\n\t\t\t\ttargetWindowBlock = windowBlockFromHandle((wHandleType)window);\t\n\t\t\t\ttargetWindowBlock->sync = true;\n\t\t\t}\n            break;\n       case kEventWindowResizeCompleted:\n            break;\n\t\tcase kEventWindowBoundsChanged: {\n\t\t\textern void setWindowTrackingRgn(int index);\n\t\t\tsetWindowTrackingRgn(windowIndexFromHandle((wHandleType)window));\n\t\t\tGetWindowBounds(window,kWindowContentRgn,&globalBounds);\n\t\t\trecordWindowEventCarbon(WindowEventMetricChange,globalBounds.left, globalBounds.top, \n\t\t\t\t\tglobalBounds.right, globalBounds.bottom,windowIndexFromHandle((wHandleType)window));\n\t\t\t}\n\t\t\tbreak;\n\t\tcase kEventWindowCollapsed:\n\t\t\trecordWindowEventCarbon(WindowEventIconise,0, 0, 0, 0,windowIndexFromHandle((wHandleType)window));\n\t\t\tbreak;\n\t\tcase kEventWindowClose:\n\t\t\trecordWindowEventCarbon(WindowEventClose,0, 0, 0, 0,windowIndexFromHandle((wHandleType)window));\n\t\t\tresult = noErr;\n\t\t\tbreak;\n        case kEventWindowHidden:\n            if (gSqueakWindowIsFloating && windowIndexFromHandle((wHandleType)window)) {\n                ShowWindow(windowHandleFromIndex(windowIndexFromHandle((wHandleType)window)));\n                result = noErr;\n            }\n            break;\n        default:\n        /* If nobody handled the event, it gets propagated to the */\n        /* application-level handler. */\n        break;\n    }\n    if (postMessageHook) \n        doPostMessageHook(event);\n    return result;\n}\n\nint amIOSX102X(void);\n\nint amIOSX102X() {\n\tstatic int amI102=-1;\n\tif (amI102 == -1) {\n\t\tlong version;\n\t\tGestalt(gestaltSystemVersion, &version);\n\t\tif (version < 0x1030)\n\t\t\tamI102 = 1;\n\t\telse\n\t\t\tamI102 = 0;\n\t}\n\treturn amI102;\n}\n\nstatic pascal OSStatus MyWindowEventMouseHandler(EventHandlerCallRef myHandler,\n            EventRef event, void* userData)\n{\n#pragma unused(myHandler,userData)\n    UInt32 whatHappened;\n    OSStatus result = eventNotHandledErr; /* report failure by default */\n\tOSStatus crosscheckForErrors;\n \tstatic Boolean mouseDownActivate=false;\n    extern Boolean gSqueakWindowIsFloating,gSqueakFloatingWindowGetsFocus;\n    WindowPartCode windowPartCode;\n    Point  mouseLocation;\n\tstatic RgnHandle\tioWinRgn=null;\n    whatHappened\t= GetEventKind(event);\n\t\n\n//\tif (whatHappened != 5) \n//\t\tfprintf(stderr,\"\\nMouseEvent %i-%i \",whatHappened,windowActive);\n\n\tif (!windowActive) {\n\t\tif (whatHappened == kEventMouseDown)\n\t\t\tmouseDownActivate = true;\n        return result;\n\t}\n\t\n    switch (whatHappened)\n    {\n\t\t\tcase kEventMouseEntered: {\n\t\t\t\textern Boolean gSqueakHasCursor;\n\t\t\t\tif ((!gSqueakHeadless  || browserActiveAndDrawingContextOkAndInFullScreenMode()) && gSqueakHasCursor && NeedToSetCursorBack) {\n\t\t\t\t\tSetCursorBackToSomething();\n\t\t\t\t\tNeedToSetCursorBack = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase kEventMouseExited: {\n\t\t\t\textern Boolean gSqueakHasCursor;\n\t\t\t\tif ((!gSqueakHeadless  || browserActiveAndDrawingContextOkAndInFullScreenMode()) && gSqueakHasCursor) {\n\t\t\t\t\tInitCursor();\n\t\t\t\t\tNeedToSetCursorBack = true;\n\t\t\t\t}\n\t\t\t\t}\n\t\t\tbreak;\n        default:\n        /* If nobody handled the event */\n        break;\n    }\n\n\tif (amIOSX102X()) {\n\t\tif (ioWinRgn == null) \n\t\t\tioWinRgn = NewRgn();\n\t\t\t\n\t\tGetWindowRegion(windowHandleFromIndex(windowActive),kWindowGlobalPortRgn,ioWinRgn);\n\t\tGetEventParameter (event, kEventParamMouseLocation, typeQDPoint,NULL,sizeof(Point), NULL, &mouseLocation);\n\t\t\n\t\tif (!PtInRgn(mouseLocation,ioWinRgn)) {\n\t\t\tif (mouseDownActivate && whatHappened == kEventMouseUp) {\n\t\t\t\tmouseDownActivate = false;\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tif (!gButtonIsDown) \n\t\t\t\treturn result;\n\t\t}\n\t} else {\n\t\tcrosscheckForErrors = GetEventParameter (event, kEventParamWindowPartCode, typeWindowPartCode,NULL,sizeof(WindowPartCode), NULL, &windowPartCode);\n\t\tif (windowPartCode < 3) {\n\t\t\tif (mouseDownActivate && whatHappened == kEventMouseUp) {\n\t\t\t\tmouseDownActivate = false;\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tif (!gButtonIsDown) \n\t\t\t\treturn result;\n\t\t}\n\t}\n\n    if(messageHook && ((result = doPreMessageHook(event)) != eventNotHandledErr))\n        return result;\n    \n    switch (whatHappened)\n    {\n        case kEventMouseMoved:\n        case kEventMouseDragged:\n        case kEventMouseWheelMoved:\n\t\t\tif (mouseDownActivate) \n\t\t\t\treturn result;\n            recordMouseEventCarbon(event,whatHappened,false);\n            result = noErr;\n            return result; //Return early not an event we deal with for post event logic\n        case kEventMouseDown:\n\t\t\tif (amIOSX102X()) {\n\t\t\t\tGetWindowRegion(windowHandleFromIndex(windowActive),kWindowGrowRgn,ioWinRgn);\n\t\t\t\tif (PtInRgn(mouseLocation,ioWinRgn))\n\t\t\t\t\treturn result;\n\t\t\t} else {\n\t\t\t\tif (windowPartCode != inContent)\n\t\t\t\t\treturn result;\n\t\t\t}\n\t\t\tif (mouseDownActivate) \n\t\t\t\treturn result;\n            if (gSqueakFloatingWindowGetsFocus && gSqueakWindowIsFloating) {\n                SetUserFocusWindow(kUserFocusAuto);\n                SetUserFocusWindow(windowHandleFromIndex(windowActive));\n            }\n            gButtonIsDown = true;\n            recordMouseEventCarbon(event,whatHappened,false);\n            result = noErr;\n            break;\n        case kEventMouseUp:\n\t\t\tif (mouseDownActivate) {\n\t\t\t\tmouseDownActivate = false;\n\t\t\t\treturn result;\n\t\t\t}\n            gButtonIsDown = false;\n            recordMouseEventCarbon(event,whatHappened,false);\n            result = noErr;\n            break;\n        default:\n        /* If nobody handled the event, it gets propagated to the */\n        /* application-level handler. */\n        break;\n    }\n    if (postMessageHook) \n        doPostMessageHook(event);\n\t//fprintf(stderr,\"handled %i\",result);\n    return result;\n}\n\nstatic pascal OSStatus MyWindowEventKBHandler(EventHandlerCallRef myHandler,\n            EventRef event, void* userData)\n{\n#pragma unused(myHandler,userData)\n    UInt32 whatHappened,keyCode;\n\tSInt32 key;\n    OSStatus result = eventNotHandledErr; /* report failure by default */\n\t \n    if (!windowActive)\n        return result;\n\n    if(messageHook && ((result = doPreMessageHook(event)) != eventNotHandledErr))\n        return result;\n\t\t\n    whatHappened = GetEventKind(event);\n\tGetEventParameter (event, kEventParamKeyCode, typeUInt32,NULL, sizeof(typeUInt32), NULL, &keyCode);\n    switch (whatHappened)\n    {\n        case kEventRawKeyDown:\n\t\t\t//fprintf(stdout,\"\\nrawkey down %i\",ioMSecs());\n\t\t\taddToKeyMap(keyCode, 0);\t\n            result = eventNotHandledErr;\n            break;\n        case kEventRawKeyRepeat:\n\t\t\t//fprintf(stdout,\"\\nrawkey repeat %i\",ioMSecs());\n\t\t\tsetRepeatInKeyMap(keyCode);\n            result = eventNotHandledErr;\n            break;\n        case kEventRawKeyUp:\n\t\t\t//fprintf(stdout,\"\\nrawkey up %i\",ioMSecs());\n\t\t\tkey = findInKeyMap(keyCode);\n\t\t\tif (key != -1) {\n\t\t\t\tenterKeystroke ( EventTypeKeyboard,keyCode, EventKeyUp, 0, ModifierStateCarbon(event));\n\t\t\t}\n\t\t\tremoveFromKeyMap(keyCode);\n            result = eventNotHandledErr;\n            break;\n        case kEventRawKeyModifiersChanged: \n            /* ok in this case we fake a mouse event to deal with the modifiers changing */\n            if(inputSemaphoreIndex)\n                recordMouseEventCarbon(event,kEventMouseMoved,false);\n            result = noErr;\n            break;\n        default: \n        /* If nobody handled the event, it gets propagated to the */\n        /* application-level handler. */\n        break;\n    }\n    if (postMessageHook) \n        doPostMessageHook(event);\n    return result;\n}\nstatic pascal OSStatus MyAppleEventEventHandler(EventHandlerCallRef myHandler,\n            EventRef event, void* userData)\n{\n#pragma unused(myHandler,userData,event)\n    return eventNotHandledErr;\n}\n\nstatic pascal OSStatus MyTextInputEventHandler(EventHandlerCallRef myHandler,\n            EventRef event, void* userData)\n{\n#pragma unused(myHandler,userData)\n    UInt32 whatHappened;\n    OSStatus result = eventNotHandledErr; /* report failure by default */\n    \n    if (!windowActive)\n        return result;\n\t\t\n    if(messageHook && ((result = doPreMessageHook(event)) != eventNotHandledErr))\n        return result;\n\n    whatHappened = GetEventKind(event);\n    switch (whatHappened)\n    {\n        case kEventTextInputUnicodeForKeyEvent:\n            recordKeyboardEventCarbon(event);\n            result = noErr;\n        default: \n        /* If nobody handled the event, it gets propagated to the */\n        /* application-level handler. */\n        break;\n    }\n    if (postMessageHook) \n        doPostMessageHook(event);\n    return result;\n}\n\nstatic void recordMenuEventCarbon(MenuRef menu,UInt32 menuItem) {\n\tsqMenuEvent *evt;\n\tpthread_mutex_lock(&gEventQueueLock);\n\tevt = (sqMenuEvent*) nextEventPut();\n\n\tevt->type = EventTypeMenu;\n\tevt->timeStamp = ioMSecs() & MillisecondClockMask; \n\tevt->menu = (int) GetMenuID(menu);\n\tevt->menuItem = menuItem;\n\tevt->reserved1 = 0;\n\tevt->reserved2 = 0;\n\tevt->reserved3 = 0;\n\tevt->windowIndex = windowActive;\n\tpthread_mutex_unlock(&gEventQueueLock);\n\tsignalAnyInterestedParties();\n\treturn;\n}\n\nstatic void recordWindowEventCarbon(int windowType,int left, int top, int right, int bottom, int windowIndex) {\n\tsqWindowEvent *evt;\n\tpthread_mutex_lock(&gEventQueueLock);\n\tevt = (sqWindowEvent*) nextEventPut();\n\n\tevt->type = EventTypeWindow;\n\tevt->timeStamp = ioMSecs() & MillisecondClockMask; \n\tevt->action = windowType;\n\tevt->value1 = left;\n\tevt->value2 = top;\n\tevt->value3 = right;\n\tevt->value4 = bottom;\n\tevt->windowIndex = windowIndex;\n\tpthread_mutex_unlock(&gEventQueueLock);\n\tsignalAnyInterestedParties();\n\treturn;\n}\n\nvoid recordMouseEventCarbon(EventRef event,UInt32 whatHappened,Boolean noPointConversion) {\n\tsqMouseEvent *evt;\n\tstatic sqMouseEvent oldEvent;\n\tstatic Point  where;\n\tEventMouseWheelAxis wheelMouseDirection=0;\n\tlong\twheelMouseDelta=0;\n\tOSErr\t\terr;\n\t\n\terr = GetEventParameter (event, kEventParamMouseLocation, typeQDPoint,NULL,\n\t\t\t\tsizeof(Point), NULL, &where);\n                    \n \tif (err == noErr && !noPointConversion && windowHandleFromIndex(windowActive))\n\t\tQDGlobalToLocalPoint(GetWindowPort(windowHandleFromIndex(windowActive)),&where);\n\t// on error use last known mouse location. \n\tcarbonMousePosition = where;\n\n\tbuttonState = MouseModifierStateCarbon(event,whatHappened);\n \tcachedButtonState = cachedButtonState | buttonState;\n\n      \n        if (whatHappened == kEventMouseWheelMoved) {\n            GetEventParameter( event,\n                                kEventParamKeyModifiers,\n                                typeMouseWheelAxis,\n                                NULL,\n                                sizeof(EventMouseWheelAxis),\n                                NULL,\n                                &wheelMouseDirection); \n            GetEventParameter( event,\n                                kEventParamMouseWheelDelta,\n                                typeLongInteger,\n                                NULL,\n                                sizeof(long),\n                                NULL,\n                                &wheelMouseDelta); \n       }\n\n        pthread_mutex_lock(&gEventQueueLock);\n\tevt = (sqMouseEvent*) nextEventPut();\n\n\t/* first the basics */\n\tevt->type = EventTypeMouse;\n\tevt->timeStamp = ioMSecs() & MillisecondClockMask; \n        evt->x = where.h;\n\tevt->y = where.v;\n\t/* then the buttons */\n\tevt->buttons = buttonState & 0x07;\n\t/* then the modifiers */\n\tevt->modifiers = buttonState >> 3;\n\n\tif ((whatHappened == kEventMouseDown) || (whatHappened == kEventMouseUp))\n        {\n\t       evt->nrClicks = 1;\n               // Mac provides nrClicks directly\n               GetEventParameter(\n                       event,\n                       kEventParamClickCount,\n                       typeLongInteger,\n                       NULL,\n                       sizeof(typeUInt32),\n                       NULL,\n                       &evt->nrClicks\n               );\n        } else {\n                evt->nrClicks = 0;\n        }\n\n\tevt->windowIndex = windowActive;\n\t\n\tif (oldEvent.buttons == evt->buttons && \n\t    oldEvent.x == evt->x &&\n\t    oldEvent.y == evt->y &&\n\t    oldEvent.modifiers == evt->modifiers &&\n            whatHappened != kEventMouseWheelMoved) \n\t    ignoreLastEvent();\n\t    \n        oldEvent = *evt;\n     \tpthread_mutex_unlock(&gEventQueueLock);\n        signalAnyInterestedParties();\n                \n        if (whatHappened == kEventMouseWheelMoved) \n            fakeMouseWheelKeyboardEvents(wheelMouseDirection,wheelMouseDelta);\n}\n\nstatic void fakeMouseWheelKeyboardEvents(EventMouseWheelAxis wheelMouseDirection,long wheelMouseDelta) {\n    long \ti,asciiChar;\n    sqKeyboardEvent *evt,*extra;\n    UInt32\tmacKeyCode=0;\n    \n    pthread_mutex_lock(&gEventQueueLock);\n    for(i=0;i<abs(wheelMouseDelta);i++) {\n        if (wheelMouseDirection == kEventMouseWheelAxisX) \n            if (wheelMouseDelta > 0) {//up/down\n                macKeyCode = 126;\n                asciiChar = kUpArrowCharCode;\n            } else {\n                macKeyCode = 125;\n                asciiChar = kDownArrowCharCode;\n            }\n        else\n            if (wheelMouseDelta > 0) {//left/right\n                macKeyCode = 124;\n                asciiChar = kRightArrowCharCode;\n            } else {\n                macKeyCode = 123;\n                asciiChar = kLeftArrowCharCode;\n            }\n            \n\tevt = (sqKeyboardEvent*) nextEventPut();\n\t/* first the basics */\n\tevt->type = EventTypeKeyboard;\n\tevt->timeStamp = ioMSecs() & MillisecondClockMask;\n\t/* now the key code */\n\t/* press code must differentiate */\n\tevt->charCode = macKeyCode;\n\tevt->pressCode = EventKeyDown;\n\tevt->utf32Code = 0;\n\tevt->modifiers = modifierMap[(controlKey >> 8)];\n\tevt->windowIndex = windowActive;\n\t/* generate extra character event */\n        extra = (sqKeyboardEvent*)nextEventPut();\n        *extra = *evt;\n        extra->charCode = asciiChar;\n        extra->utf32Code = asciiChar;\n        extra->pressCode = EventKeyChar;\n        \n       if(!inputSemaphoreIndex) {\n            int  keystate;\n    \n            /* keystate: low byte is the ascii character; next 8 bits are modifier bits */\n    \n            keystate = (evt->modifiers << 8) | asciiChar;\n            if (keystate == getInterruptKeycode()) {\n                    /* Note: interrupt key is \"meta\"; it not reported as a keystroke */\n                    setInterruptPending(true);\n            } else {\n                    keyBuf[keyBufPut] = keystate;\n                    keyBufPut = (keyBufPut + 1) % KEYBUF_SIZE;\n                    if (keyBufGet == keyBufPut) {\n                            /* buffer overflow; drop the last character */\n                            keyBufGet = (keyBufGet + 1) % KEYBUF_SIZE;\n                            keyBufOverflows++;\n                    }\n            }\n\n        }\n    }\n    if (wheelMouseDelta != 0) {\n    \tevt = (sqKeyboardEvent*) nextEventPut();\n\t/* first the basics */\n\tevt->type = EventTypeKeyboard;\n\tevt->timeStamp = ioMSecs() & MillisecondClockMask;\n\t/* now the key code */\n\t/* press code must differentiate */\n\tevt->charCode = macKeyCode;\n\tevt->pressCode = EventKeyUp;\n\tevt->utf32Code = 0;\n\tevt->modifiers = modifierMap[(controlKey >> 8)];\n\tevt->windowIndex = windowActive;\n    }\n    pthread_mutex_unlock(&gEventQueueLock);\n    signalAnyInterestedParties();                \n}\n\nstatic void recordKeyboardEventCarbon(EventRef event) {\n    int\t\t\t\tmodifierBits, keyIndex,ISawRawKeyRepeat;\n    UniCharCount\tuniCharCount,i;\n    UniChar\t\t\tmodifiedUniChar, *uniCharBufPtr, *uniCharBuf;\n    OSErr\t\t\terr;\n    UInt32\t\t\tactualSize,macKeyCode,textEntryServices; \n    EventRef\t\tactualEvent;\n\tchar\t\tmackeycodeFromCarbon;\n    \n    //  Tetsuya HAYASHI <tetha@st.rim.or.jp> supplied multiple unicode extraction\n    \n    /*  kEventTextInputUnicodeForKeyEvent\n        Required parameters:\n        -->     kEventParamTextInputSendComponentInstance           typeComponentInstance\n        -->     kEventParamTextInputSendRefCon                      typeLongInteger\n        -->     kEventParamTextInputSendSLRec                       typeIntlWritingCode\n        -->     kEventParamTextInputSendText                        typeUnicodeText\n        -->     kEventParamTextInputSendKeyboardEvent               typeEventRef\n                    (This parameter is the original raw keyboard event that produced the\n                     text.  It enables access to kEventParamKeyModifiers and \n                     kEventParamKeyCode parameters.\n                     You can also extract from this event either Unicodes or Mac encoding\n                     characters as follows:\n                            kEventParamKeyUnicodes              typeUnicodeText\n                            kEventParamKeyMacCharCodes          typeChar (if available)\n                     The kEventParamKeyUnicodes parameter of the raw keyboard event is\n                     identical to the TextInput event's kEventParamTextInputSendText\n                     parameter.  Note that when contents of TSM's bottom-line input\n                     window (i.e. during typing Chinese, Korean, or Japanese) are confirmed,\n                     the raw keyboard event's keyCode and modifiers are set to default values.)\n    */\n\n    /* Get the actual keyboard event */\n    err = GetEventParameter (event, kEventParamTextInputSendKeyboardEvent,\n            typeEventRef, NULL, sizeof(EventRef), NULL, &actualEvent);\n    /* Get the actual data size */\n    err = GetEventParameter (event, kEventParamTextInputSendText,\n            typeUnicodeText, NULL, 0, &actualSize, NULL);\n\n    /* Get the actual character data */\n    uniCharBuf = uniCharBufPtr = malloc(actualSize);\n    err = GetEventParameter (actualEvent, kEventParamKeyUnicodes,\n            typeUnicodeText, NULL, actualSize, NULL, uniCharBuf);\n                            \n    err = GetEventParameter (event, kEventParamTextInputSendComponentInstance,\n            typeComponentInstance, NULL, sizeof(UInt32), NULL, &textEntryServices);\n\n\terr = GetEventParameter( actualEvent, kEventParamKeyCode, \n\t\t\ttypeUInt32, NULL, sizeof(UInt32), NULL, &macKeyCode); \n\n\terr = GetEventParameter( actualEvent, kEventParamKeyMacCharCodes, \n\t\t\ttypeChar, NULL, sizeof(char), NULL, &mackeycodeFromCarbon);\n\n\n    modifiedUniChar = *uniCharBufPtr;\n    buttonState = modifierBits =ModifierStateCarbon(actualEvent); //Capture option states\n    if (((modifierBits >> 3) & 0x9) == 0x9) {  /* command and shift */\n            if ((modifiedUniChar >= 97) && (modifiedUniChar <= 122)) {\n                    /* convert ascii code of command-shift-letter to upper case */\n                    modifiedUniChar = modifiedUniChar - 32;\n            }\n    }\n\n\tmodifierBits = modifierBits >> 3;\n    pthread_mutex_lock(&gEventQueueLock);\n    \n    /* Put sqKeyboardEvent in actualSize times */\n    uniCharCount = actualSize / sizeof(UniChar);\n\tkeyIndex = indexInKeyMap(macKeyCode);\n\tISawRawKeyRepeat = findRepeatInKeyMap(macKeyCode);\n\tif (keyIndex >= 0)\n\t\tkeyMap[keyIndex].keyChar = modifiedUniChar;\n\n    for (i=0; i<uniCharCount; i++) {\n        CFStringRef theString;\n        unsigned char macRomanString[2];\n        int macRomanCode;\n        \n        theString = CFStringCreateWithCharacters (nil, &modifiedUniChar, (CFIndex) 1);\n        CFStringGetCString (theString,(char *)&macRomanString,2, kCFStringEncodingMacRoman);\n        macRomanCode = macRomanString[0];\n        CFRelease(theString);\n        \n       /* Put the sqKeyboardEvent for KeyDown */\n\t\tenterKeystroke ( EventTypeKeyboard, macKeyCode, EventKeyDown, 0, modifierBits);\n\t\t\n        /* generate extra character event */\n\t\tenterKeystroke ( EventTypeKeyboard, macRomanCode, EventKeyChar, modifiedUniChar, modifierBits);\n        \n    /* Put the sqKeyboardEvent for KeyUp */\n\t\tif (!ISawRawKeyRepeat && (uniCharCount> 1 || (keyIndex < 0)))\n\t\t\tenterKeystroke ( EventTypeKeyboard, macKeyCode, EventKeyUp, 0,  modifierBits);\n        \n        uniCharBufPtr++;\n        modifiedUniChar = *uniCharBufPtr;\n    }\n\n    free(uniCharBuf);\n    pthread_mutex_unlock(&gEventQueueLock);\t\t        \n    signalAnyInterestedParties();\n}\n\n\nstatic int MouseModifierStateCarbon(EventRef event,UInt32 whatHappened) {\n/* On a two- or three-button mouse, the left button is normally considered primary and the \nright button secondary, \nbut left-handed users can reverse these settings as a matter of preference. \nThe middle button on a three-button mouse is always the tertiary button. '\n\nBut mapping assumes 1,2,3  red, yellow, blue\n*/\n\textern long gSqueakMouseMappings[4][4];\n\textern long gSqueakBrowserMouseMappings[4][4];\n\tlong stButtons,modifier,mappedButton;\n\tUInt32 keyBoardModifiers=0;\n\tEventMouseButton mouseButton=0;\n\tOSErr err;\n\tstatic long buttonStateBits[4] = {0,0,0,0};\n\tstButtons = buttonState;\n\t\n\terr = GetEventParameter( event,\n                                kEventParamKeyModifiers,\n                                typeUInt32,\n                                NULL,\n                                sizeof(UInt32),\n                                NULL,\n                                &keyBoardModifiers); \n\t\t\t\t\t\t\t\t\n  \tif (whatHappened != kEventMouseMoved && whatHappened != kEventMouseWheelMoved) {\n\t\tstButtons = 0;\n\t\terr = GetEventParameter( event,\n                                kEventParamMouseButton,\n                                typeMouseButton,\n                                NULL,\n                                sizeof(EventMouseButton),\n                                NULL,\n                                &mouseButton); \n\t\t\t\t\t\t\t\n\tDPRINTF((stderr,\"VM: MouseModifierStateCarbon buttonStateBits %i modifiers %ui\\n \",mouseButton,(unsigned int) keyBoardModifiers));\n \n\t\t         if (mouseButton > 0 && mouseButton < 4) {\n          /* OLD original carbon code \n\t\t\tbuttonStateBits[mouseButton] = (whatHappened == kEventMouseUp) ? 0 : 1;\n            stButtons |= buttonStateBits[1]*4*\n                        (!((keyBoardModifiers & optionKey) || (keyBoardModifiers & cmdKey)));\n            stButtons |= buttonStateBits[1]*((keyBoardModifiers & optionKey)> 0)*2;\n            stButtons |= buttonStateBits[1]*((keyBoardModifiers & cmdKey)> 0)*1;\n            stButtons |= buttonStateBits[2]*1;\n            stButtons |= buttonStateBits[3]*2; */\n\t\t\t\n\t\t\tmodifier = 0;\n\t\t\tif (keyBoardModifiers & cmdKey)\n\t\t\t\tmodifier = 1;\n\t\t\tif (keyBoardModifiers & optionKey)\n\t\t\t\tmodifier = 2;\n\t\t\tif (keyBoardModifiers & controlKey)\n\t\t\t\tmodifier = 3;\n\t\t\t\t\n\t\t\tif (browserActiveAndDrawingContextOkAndNOTInFullScreenMode())\n\t\t\t\t\tmappedButton = gSqueakBrowserMouseMappings[modifier][mouseButton];\n\t\t\t\telse\n\t\t\t\t\tmappedButton = gSqueakMouseMappings[modifier][mouseButton];\n\t\t\tbuttonStateBits[mappedButton] = (whatHappened == kEventMouseUp) ? 0 : 1;\n\t\t\tstButtons |= mappedButton == 1 ? (buttonStateBits[mappedButton] ? RedButtonBit : 0) : 0;\n\t\t\tstButtons |= mappedButton == 2 ? (buttonStateBits[mappedButton] ? YellowButtonBit : 0) : 0;\n\t\t\tstButtons |= mappedButton == 3 ? (buttonStateBits[mappedButton] ? BlueButtonBit : 0)  : 0;\n\t\t}\n\t}\n\t\n\t// button state: low three bits are mouse buttons; next 8 bits are modifier bits\n\treturn ((modifierMap[((keyBoardModifiers & 0xFFFF) >> 8)] << 3) | (stButtons & 0x7));\n\n}\n\nstatic int ModifierStateCarbon(EventRef event) {\n        UInt32 keyBoardModifiers=0;\n        OSErr err;\n        \n\terr = GetEventParameter( event,\n                                kEventParamKeyModifiers,\n                                typeUInt32,\n                                NULL,\n                                sizeof(UInt32),\n                                NULL,\n                                &keyBoardModifiers); \n \t/* button state: low three bits are mouse buttons; next 8 bits are modifier bits */\n\treturn ((modifierMap[((keyBoardModifiers & 0xFFFF) >> 8)] << 3));\n}\n\nstatic void checkBrowserForHeartBeat(void) {\n\tstatic int counter=0;\n\tif (counter++ > 200) {\n\t\tcounter = 0;\n\t\tif (getppid() == 1) \n\t\t\tgQuitNowRightNow = 1;\n\t\t\t\n\t}\n\t\n}\n\nstatic void doPendingFlush(void) {\n\n\textern  Boolean gSqueakUIFlushUseHighPercisionClock,gSqueakBrowserSubProcess;\n\textern\tlong\tgSqueakUIFlushSecondaryCleanupDelayMilliseconds,gSqueakUIFlushSecondaryCheckForPossibleNeedEveryNMilliseconds;\n\tstatic int lastTick = 0;\n\tstatic int nextPollTick = 0;\n\tint now = gSqueakUIFlushUseHighPercisionClock ? ioMSecs(): ioLowResMSecs();\n\tint delta = now - lastTick;\n\t\t\n\tif (browserActiveAndDrawingContextOkAndInFullScreenMode() || (!gSqueakHeadless && !gSqueakBrowserSubProcess)) {\n\t\t\tif ((delta >= gSqueakUIFlushSecondaryCheckForPossibleNeedEveryNMilliseconds) || (delta < 0))  {\n\t\t\twindowDescriptorBlock *windowBlock;\n\t\t\tint i;\n\t\t\t\n\t\t\tfor(i=1;i<=getCurrentIndexInUse();i++) {\n\t\t\t\twindowBlock = windowBlockFromIndex(i);\n\t\t\t\tif ((windowBlock) && (windowBlock->dirty) ) {\n\t\t\t\t\tdelta = now - windowBlock->rememberTicker;\n\t\t\t\t\tif ((delta >= gSqueakUIFlushSecondaryCleanupDelayMilliseconds) || (delta < 0))  {\n\t\t\t\t\t\tCGContextFlush(windowBlock->context);\n\t\t\t\t\t\twindowBlock-> dirty = 0;\n\t\t\t\t\t\twindowBlock->rememberTicker = now =  gSqueakUIFlushUseHighPercisionClock ? ioMSecs(): ioLowResMSecs();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tlastTick = now;\n\t\t}\n\t}\n\n\tif (ioLowResMSecs() != nextPollTick) {\n\t\tEventRef event;\n\t\tstatic EventTargetRef target = NULL;\n\t\t\n\t\tif (target == NULL)\n\t\t\ttarget = GetEventDispatcherTarget();\n\t  \n\t\tif (ReceiveNextEvent(0, NULL, kEventDurationNoWait, true, &event) == noErr) {\n\t\t\tSendEventToEventTarget (event, target);\n\t\t\tReleaseEvent(event);\n\t\t}\n\t\tif (browserActiveAndDrawingContextOk())\n\t\t\tcheckBrowserForHeartBeat();\n\t\t\n\t\tif (NeedToSetCursorBackOnApplicationActivate) {  // special case of setting large cursor on app activate\n\t\t\tNeedToSetCursorBackOnApplicationActivate = false;\n\t\t\tSetCursorBackToSomething();\n\t\t}\n\t\t\n\t\tnextPollTick = ioLowResMSecs();\n\t}\n\n}\n\nint ioProcessEvents(void) {\n\n\taioPoll(0);\t\t\n\tdoPendingFlush();\n    if (gQuitNowRightNow) {\n        ioExit();  //This might not return, might call exittoshell\n        QuitApplicationEventLoop();\n        pthread_exit(null);\n    } else {\n\t\tsqCycleMainAutoreleasePool();\n\t}\n\treturn 0;\n}\n\nint getUIToLock(sqInt *data) {\n\tcustomHandleForUILocks(NULL,NULL,(void*) data);\n\treturn 0;\n}\n\nstatic pascal OSStatus customHandleForUILocks(EventHandlerCallRef myHandler,\n            EventRef event, void* userData)\n{\n#pragma unused(myHandler,event)\n    sqInt *data;\n    long numberOfParms;\n        \n         \n\tdata = userData;\n\t\t    \n    numberOfParms = data[0];\n    \n    if (0 == numberOfParms)\n        data[2] = ((sqInt (*) (void)) data[1]) ();\n    if (1 == numberOfParms)\n        data[3] = ((sqInt (*) (sqInt)) data[1]) (data[2]);\n    if (2 == numberOfParms)\n        data[4] = ((sqInt (*) (sqInt,sqInt)) data[1]) (data[2],data[3]);\n    if (3 == numberOfParms)\n        data[5] = ((sqInt (*) (sqInt,sqInt,sqInt)) data[1]) (data[2],data[3],data[4]);\n    if (4 == numberOfParms)\n        data[6] = ((sqInt (*) (sqInt,sqInt,sqInt,sqInt)) data[1]) (data[2],data[3],data[4],data[5]);\n    if (5 == numberOfParms)\n        data[7] = ((sqInt (*) (sqInt,sqInt,sqInt,sqInt,sqInt)) data[1]) (data[2],data[3],data[4],data[5],data[6]);\n    if (6 == numberOfParms)\n        data[8] = ((sqInt (*) (sqInt,sqInt,sqInt,sqInt,sqInt,sqInt)) data[1]) (data[2],data[3],data[4],data[5],data[6], data[7]);\n\n    return noErr;\n}\n\nvoid signalAnyInterestedParties() {\n    if (inputSemaphoreIndex != 0)\n        signalSemaphoreWithIndex(inputSemaphoreIndex);\n}\n\nstatic EventHandlerUPP gEventLoopEventHandlerUPP;   // -> EventLoopEventHandler\n\nstatic pascal OSStatus EventLoopEventHandler(EventHandlerCallRef inHandlerCallRef,\n                                             EventRef inEvent, void *inUserData)\n    // This code contains the standard Carbon event dispatch loop,\n    // as per \"Inside Macintosh: Handling Carbon Events\", Listing 3-10,\n{\n        // Run our event loop until quitNow is set.\n#pragma unused(inHandlerCallRef,inEvent,inUserData)\n\tSetUpCarbonEvent();\n\tinterpret(); //Note the application under carbon event mgr starts running here\n\treturn 0;\n }\n\n\nvoid RunApplicationEventLoopWithSqueak(void)\n    // A reimplementation of RunApplicationEventLoop that supports\n    // yielding time to cooperative threads.  It relies on the\n    // rest of your application to maintain a global variable,\n    // gNumberOfRunningThreads, that reflects the number of threads\n    // that are ready to run.\n{\n    static const EventTypeSpec eventSpec = {'JMM2', 'JMM2' };\n    OSStatus        err;\n    OSStatus        junk;\n    EventHandlerRef installedHandler;\n    EventRef        dummyEvent;\n\n\n    dummyEvent = nil;\n\n    // Create a UPP for EventLoopEventHandler and QuitEventHandler\n    // (if we haven't already done so).\n\n    err = noErr;\n    if (gEventLoopEventHandlerUPP == nil) {\n        gEventLoopEventHandlerUPP = NewEventHandlerUPP(EventLoopEventHandler);\n    }\n    if (gEventLoopEventHandlerUPP == nil) {\n        err = memFullErr;\n    }\n\n    // Install EventLoopEventHandler, create a dummy event and post it,\n    // and then call RunApplicationEventLoop.  The rationale for this\n    // is as follows:  We want to unravel RunApplicationEventLoop so\n    // that we can can yield to cooperative threads.  In fact, the\n    // core code for RunApplicationEventLoop is pretty easy (you\n    // can see it above in EventLoopEventHandler).  However, if you\n    // just execute this code you miss out on all the standard event\n    // handlers.  These are relatively easy to reproduce (handling\n    // the quit event and so on), but doing so is a pain because\n    // a) it requires a bunch boilerplate code, and b) if Apple\n    // extends the list of standard event handlers, your application\n    // wouldn't benefit.  So, we execute our event loop from within\n    // a Carbon event handler that we cause to be executed by\n    // explicitly posting an event to our event loop.  Thus, the\n    // standard event handlers are installed while our event loop runs.\n\n    if (err == noErr) {\n        err = InstallEventHandler(GetApplicationEventTarget(), gEventLoopEventHandlerUPP,\n                                  1, &eventSpec, nil, &installedHandler);\n        if (err == noErr) {\n            err = MacCreateEvent(nil, 'JMM2', 'JMM2', GetCurrentEventTime(),\n                                  kEventAttributeNone, &dummyEvent);\n            if (err == noErr) {\n                err = PostEventToQueue(GetMainEventQueue(), dummyEvent,\n                                  kEventPriorityHigh);\n            }\n            if (err == noErr) {\n                RunApplicationEventLoop();\n            }\n\n            junk = RemoveEventHandler(installedHandler);\n        }\n    }\n\n    // Clean up.\n\n    if (dummyEvent != nil) {\n        ReleaseEvent(dummyEvent);\n    }\n}\n\nstatic sqKeyboardEvent *enterKeystroke (long type, long cc, long pc, UniChar utf32Code, long m) {\n\tsqKeyboardEvent \t*evt;\n\tevt = (sqKeyboardEvent*) nextEventPut();\n\n\t/* first the basics */\n\t//fprintf(stdout,\"\\nKeyStroke time %i Type %i Value %i\",ioMSecs(),pc,cc);\n\tevt->type = type;\n\tevt->timeStamp = ioMSecs() & MillisecondClockMask;\n\t/* now the key code */\n\t/* press code must differentiate */\n\tevt->charCode = cc;\n\tevt->pressCode = pc;\n\tevt->modifiers = m;\n\tevt->windowIndex = windowActive;\n\tevt->utf32Code = 0;\n\tif(pc == EventKeyChar) {\n\t\tevt->utf32Code = utf32Code;\n\t\tif (!inputSemaphoreIndex) {\n\t\t\tint  keystate;\n\n\t\t\t/* keystate: low byte is the ascii character; next 8 bits are modifier bits */\n\t\t\t\tkeystate = (evt->modifiers << 8) | (unsigned char)  ((char) cc);\n\t\t\tif (keystate == getInterruptKeycode()) {\n\t\t\t\t\t/* Note: interrupt key is \"meta\"; it not reported as a keystroke */\n\t\t\t\t\tsetInterruptPending(true);\n\t\t\t} else {\n\t\t\t\t\tkeyBuf[keyBufPut] = keystate;\n\t\t\t\t\tkeyBufPut = (keyBufPut + 1) % KEYBUF_SIZE;\n\t\t\t\t\tif (keyBufGet == keyBufPut) {\n\t\t\t\t\t\t\t/* buffer overflow; drop the last character */\n\t\t\t\t\t\t\tkeyBufGet = (keyBufGet + 1) % KEYBUF_SIZE;\n\t\t\t\t\t\t\tkeyBufOverflows++;\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn evt;\n}\n\n\nstatic int addToKeyMap(int keyCode, int keyChar)\n{\n  //fprintf(stdout, \"\\nAddToKeyMap T %i c %i i %i\",ioMSecs(),keyCode,keyMapSize);\n  if (keyMapSize > KeyMapSize) { fprintf(stderr, \"keymap overflow\\n\");  return -1; }\n  keyMap[keyMapSize++]= (KeyMapping){ keyCode, keyChar, 0};\n  return keyChar;\n}\n\nstatic int indexInKeyMap(int keyCode)\n{\n  int i;\n  for (i= 0;  i < keyMapSize;  ++i)\n    if (keyMap[i].keyCode == keyCode)\n      return i;\n  return -1;\n}\n\nstatic int findInKeyMap(int keyCode)\n{\n  int idx= indexInKeyMap(keyCode);\n  return (idx != -1) ? keyMap[idx].keyChar : -1;\n}\n\nstatic int findRepeatInKeyMap(int keyCode)\n{\n  int idx= indexInKeyMap(keyCode);\n  return (idx != -1) ? keyMap[idx].keyRepeated : 0;\n}\n\nstatic void setRepeatInKeyMap(int keyCode)\n{\n  int idx= indexInKeyMap(keyCode);\n  if (idx != -1) keyMap[idx].keyRepeated = 1;\n}\n\nstatic int removeFromKeyMap(int keyCode)\n{\n  int idx= indexInKeyMap(keyCode);\n  int keyChar= -1;\n  //fprintf(stdout, \"\\nremoveFromKeyMap T %i c %i i %i\",ioMSecs(),keyCode,keyMapSize-1);\n  if (idx == -1) { //fprintf(stderr, \"keymap underflow\\n\");  \n\t\treturn -1; }\n  keyChar= keyMap[idx].keyChar;\n  for (; idx < keyMapSize - 1;  ++idx)\n    keyMap[idx]= keyMap[idx + 1];\n  --keyMapSize;\n  return keyChar;\n}\n\nvoid sqRevealWindowAndHandleQuit ()\n{\n\t/*  When we receive a Quit command, since the image may or may not want input,\n\t\twe have to activate (uncollapse) the main window, just in case, so the user\n\t\tcan see the (possible) confirmation dialog.\n\t\tWe reat Quit the same as main-window close, for parity with the Windows VM */\n\n\t\t\n\tWindowRef win = windowHandleFromIndex(1);\n\tif (win) {\n\t\twindowBlockFromIndex(1)->isInvisible  = false;\n\t\tSelectWindow(win);\n\t\tShowWindow( win );\n\t}\n\t\n\trecordWindowEventCarbon(WindowEventClose,0, 0, 0, 0, 1 /* main ST window index */ );\n\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacUIMenuBar.c",
    "content": "/****************************************************************************\n*   PROJECT: Mac menu bar logic\n*   FILE:    sqMacUIMenuBar.c\n*   CONTENT: \n*\n*   AUTHOR:  John Maloney, John McIntosh, and others.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacUIMenuBar.c 1238 2005-08-16 12:36:18Z johnmci $\n*\n*   NOTES: \n*  Feb 22nd, 2002, JMM moved code into 10 other files, see sqMacMain.c for comments\n*  Oct 18th, 2004, JMM changes for host menu support\n*****************************************************************************/\n\n#include \"sqMacUIMenuBar.h\"\n#include \"sqMacMain.h\"\n#include \"sqMacWindow.h\"\n#include \"sq.h\"\n\nMenuHandle\tappleMenu = nil;\nMenuHandle\teditMenu = nil;\nint\t\tmenuBarHeight = 20;\nRgnHandle\tmenuBarRegion = nil;  /* if non-nil, then menu bar has been hidden */\nMenuHandle\tfileMenu = nil;\nextern struct VirtualMachine* interpreterProxy;\n\n \n#if TARGET_API_MAC_CARBON\n    #define EnableMenuItemCarbon(m1,v1)  EnableMenuItem(m1,v1);\n    #define DisableMenuItemCarbon(m1,v1)  DisableMenuItem(m1,v1);\n#else\n    #define EnableMenuItemCarbon(m1,v1)  EnableItem(m1,v1);\n    #define DisableMenuItemCarbon(m1,v1)  DisableItem(m1,v1);\n#endif\n\n#if TARGET_API_MAC_CARBON\n\nvoid MenuBarHide(void) {\n \tif (menuBarRegion != nil) return;  /* saved state, so menu bar is already hidden */\n\tif (!(getThatDominateGDevice(getSTWindow()) == GetMainDevice())) return;  /*Do not did if main window on secondary screen */\n    menuBarRegion = (RgnHandle) 1;\n    ShowMenuBar();\n    HideMenuBar();\n}\nvoid MenuBarRestore(void) {\n\tif (menuBarRegion == nil) return;  /* no saved state, so menu bar is not hidden */\n    ShowMenuBar();\n    menuBarRegion = nil;\n}\n\n#else\nvoid MenuBarHide(void) {\n  /* Remove the menu bar, saving its old state. */\n  /* Many thanks to John McIntosh for this code! */\n\tRect screenRect, mBarRect;\n\n\tif (menuBarRegion != nil) return;  /* saved state, so menu bar is already hidden */\n\tscreenRect = (**GetMainDevice()).gdRect;\n\tmenuBarHeight = GetMBarHeight();\n\tSetRect(&mBarRect, screenRect.left, screenRect.top, screenRect.right, screenRect.top + menuBarHeight);\n\tmenuBarRegion = NewRgn();\n\tif (menuBarRegion != nil) {\n\t\tLMSetMBarHeight(0);\n\t\tRectRgn(menuBarRegion, &mBarRect);\n\t\tUnionRgn(GetGrayRgn(), menuBarRegion, GetGrayRgn());\n\t\tPaintOne(NULL,menuBarRegion);\n\t\tCalcVisBehind(getSTWindow(),menuBarRegion);\n\t}\n}\n\nvoid MenuBarRestore(void) {\n  /* Restore the menu bar from its saved state. Do nothing if it isn't hidden. */\n  /* Many thanks to John McIntosh for this code! */\n \n \tWindowPtr win;\n \t\n\tif (menuBarRegion == nil) return;  /* no saved state, so menu bar is not hidden */\n\tDiffRgn(GetGrayRgn(), menuBarRegion, GetGrayRgn());\n\tLMSetMBarHeight(menuBarHeight);\n\t\n\twin = FrontWindow();\n\tif (win) {\n\t\tCalcVis(win);\n\t\tCalcVisBehind(win,menuBarRegion);\n\t}\n\tHiliteMenu(0);\n\tDisposeRgn(menuBarRegion);\n\t\n\tmenuBarRegion = nil;\n\tDrawMenuBar();\n}\n\n#endif\n\nvoid SetUpMenus(void) {\n#if TARGET_API_MAC_CARBON\n\tlong decideOnQuitMenu;\n#endif \n\t\n\tInsertMenu(appleMenu = NewMenu(appleID, \"\\p\\024\"), 0);\n\tInsertMenu(fileMenu  = NewMenu(fileID,  \"\\pFile\"), 0);\n\tInsertMenu(editMenu  = NewMenu(editID,  \"\\pEdit\"), 0);\n#if TARGET_API_MAC_CARBON\n    Gestalt( gestaltMenuMgrAttr, &decideOnQuitMenu);\n    if (!(decideOnQuitMenu & gestaltMenuMgrAquaLayoutMask) || true)\t\n        AppendMenu(fileMenu, \"\\pQuit Without Saving\");\n    if (RunningOnCarbonX()) {\n        DisableMenuCommand(NULL,'quit');\n\t}\n#else\n\tAppendResMenu(appleMenu, 'DRVR');\n    AppendMenu(fileMenu, \"\\pQuit Without Saving\");\n#endif\n \tAppendMenu(editMenu, \"\\pUndo/Z;(-;Cut/X;Copy/C;Paste/V;Clear\");\n\t/* Disable items in the Edit menu */\n\tDisableMenuItemCarbon(editMenu, 1);\n\tDisableMenuItemCarbon(editMenu, 3);\n\tDisableMenuItemCarbon(editMenu, 4);\n\tDisableMenuItemCarbon(editMenu, 5);\n\tDisableMenuItemCarbon(editMenu, 6);\n\tDrawMenuBar();\n}\n\n void AdjustMenus(void) {\n\tWindowRef\t\twp;\n\tint\t\t\t\tisDeskAccessory;\n\tint\t\t\t\tcutState;\t\n\t\t\n\tcutState = IsMenuItemEnabled(editMenu, 1);\n\n\twp = FrontWindow();\n\tif (wp != NULL) {\n\t\tisDeskAccessory = GetWindowKind(wp) < 0;\n\t} else {\n\t\tisDeskAccessory = false;\n\t}\n\n\tif (isDeskAccessory) {\n\t\t/* Enable items in the Edit menu */\n\t\tEnableMenuItemCarbon(editMenu, 1);\n\t\tEnableMenuItemCarbon(editMenu, 3);\n\t\tEnableMenuItemCarbon(editMenu, 4);\n\t\tEnableMenuItemCarbon(editMenu, 5);\n\t\tEnableMenuItemCarbon(editMenu, 6);\n\t} else {\n\t\tif (cutState) {\n\t\t\t/* Enable items in the Edit menu */\n\t\t\tEnableMenuItemCarbon(editMenu, 1);\n\t\t\tEnableMenuItemCarbon(editMenu, 3);\n\t\t\tEnableMenuItemCarbon(editMenu, 4);\n\t\t\tEnableMenuItemCarbon(editMenu, 5);\n\t\t} else {\n\t\t\t/* Disable items in the Edit menu */\n\t\t\tDisableMenuItemCarbon(editMenu, 1);\n\t\t\tDisableMenuItemCarbon(editMenu, 3);\n\t\t\tDisableMenuItemCarbon(editMenu, 4);\n\t\t\tDisableMenuItemCarbon(editMenu, 5);\n\t\t\tDisableMenuItemCarbon(editMenu, 6);\n\t\t}\n\t}\n}\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacUIMenuBar.h",
    "content": "/****************************************************************************\n*   PROJECT: Squeak Headers\n*   FILE:    sqMacUIMenuBar.c\n*   CONTENT: \n*\n*   AUTHOR:  John Maloney, John McIntosh, and others.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacUIMenuBar.h 1344 2006-03-05 21:07:15Z johnmci $\n*\n*   NOTES: \n*  Feb 22nd, 2002, JMM moved code into 10 other files, see sqMacMain.c for comments\n****************************************************************************/\n\n    #include <Carbon/Carbon.h>\n\nvoid SetUpMenus(void);\nvoid MenuBarHide(void);\nvoid MenuBarRestore(void);\nvoid AdjustMenus(void);\n \n/*** Enumerations ***/\nenum { appleID = 1, fileID, editID };\nenum { quitItem = 1 };\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacUIMenuBarUniversal.c",
    "content": "/****************************************************************************\n*   PROJECT: Mac menu bar logic\n*   FILE:    sqMacUIMenuBar.c\n*   CONTENT: \n*\n*   AUTHOR:  John Maloney, John McIntosh, and others.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacUIMenuBar.c 1238 2005-08-16 12:36:18Z johnmci $\n*\n*   NOTES: \n*  Feb 22nd, 2002, JMM moved code into 10 other files, see sqMacMain.c for comments\n*  Oct 18th, 2004, JMM changes for host menu support\n 3.8.11b1 Mar 4th, 2006 JMM refactor, cleanup and add headless support\n*****************************************************************************/\n\n#include \"sqMacUIMenuBar.h\"\n#include \"sqMacMain.h\"\n#include \"sqMacWindow.h\"\n#include \"sq.h\"\n\nMenuHandle\tappleMenu = nil;\nMenuHandle\teditMenu = nil;\nMenuHandle\tfileMenu = nil;\n\nstatic RgnHandle\tmenuBarRegion = nil;  /* if non-nil, then menu bar has been hidden */\nextern struct VirtualMachine* interpreterProxy;\n\n \n    #define EnableMenuItemCarbon(m1,v1)  EnableMenuItem(m1,v1);\n    #define DisableMenuItemCarbon(m1,v1)  DisableMenuItem(m1,v1);\n\nextern Boolean gSqueakHasQuitWithoutSaving;\n\nstatic int isAqua (void) {\n\tsigned long int theResponse;\n\tGestalt(gestaltMenuMgrAttr,&theResponse);\n\treturn (theResponse & gestaltMenuMgrAquaLayoutMask );\n}\n\nvoid MenuBarHide(void) {\n \tif (menuBarRegion != nil) return;  /* saved state, so menu bar is already hidden */\n\tif (!(getThatDominateGDevice(getSTWindow()) == GetMainDevice())) return;  /*Do not did if main window on secondary screen */\n    menuBarRegion = (RgnHandle) 1;\n    ShowMenuBar();\n    HideMenuBar();\n}\nvoid MenuBarRestore(void) {\n\tif (menuBarRegion == nil) return;  /* no saved state, so menu bar is not hidden */\n    ShowMenuBar();\n    menuBarRegion = nil;\n}\n\nvoid SetUpMenus(void) {\n\t\n\tInsertMenu(appleMenu = NewMenu(appleID, \"\\p\\024\"), 0);\n\t\n\t/* If not OS/X aqua, use a File submenu Quit-Without-Save. \n\t   This is just placeholder stuff to reconcile with the original VM.  */\n\n\tif ((! isAqua()) || gSqueakHasQuitWithoutSaving) {\n\t\tInsertMenu(fileMenu  = NewMenu(fileID,  \"\\pFile\"), 0);\n        \tAppendMenu(fileMenu, \"\\pQuit Without Saving\");\n\t}\n\n\tInsertMenu(editMenu  = NewMenu(editID,  \"\\pEdit\"), 0);\n\n\t/* DisableMenuCommand(NULL,'quit');  */\n \tAppendMenu(editMenu, \"\\pUndo/Z;(-;Cut/X;Copy/C;Paste/V;Clear\");\n\t/* Disable items in the Edit menu */\n\tDisableMenuItemCarbon(editMenu, 1);\n\tDisableMenuItemCarbon(editMenu, 3);\n\tDisableMenuItemCarbon(editMenu, 4);\n\tDisableMenuItemCarbon(editMenu, 5);\n\tDisableMenuItemCarbon(editMenu, 6);\n\tDrawMenuBar();\n}\n\n void AdjustMenus(void) {\n\tWindowRef\t\twp;\n\tint\t\t\t\tisDeskAccessory;\n\tint\t\t\t\tcutState;\t\n\t\t\n\tcutState = IsMenuItemEnabled(editMenu, 1);\n\n\twp = FrontWindow();\n\tif (wp != NULL) {\n\t\tisDeskAccessory = GetWindowKind(wp) < 0;\n\t} else {\n\t\tisDeskAccessory = false;\n\t}\n\n\tif (isDeskAccessory) {\n\t\t/* Enable items in the Edit menu */\n\t\tEnableMenuItemCarbon(editMenu, 1);\n\t\tEnableMenuItemCarbon(editMenu, 3);\n\t\tEnableMenuItemCarbon(editMenu, 4);\n\t\tEnableMenuItemCarbon(editMenu, 5);\n\t\tEnableMenuItemCarbon(editMenu, 6);\n\t} else {\n\t\tif (cutState) {\n\t\t\t/* Enable items in the Edit menu */\n\t\t\tEnableMenuItemCarbon(editMenu, 1);\n\t\t\tEnableMenuItemCarbon(editMenu, 3);\n\t\t\tEnableMenuItemCarbon(editMenu, 4);\n\t\t\tEnableMenuItemCarbon(editMenu, 5);\n\t\t} else {\n\t\t\t/* Disable items in the Edit menu */\n\t\t\tDisableMenuItemCarbon(editMenu, 1);\n\t\t\tDisableMenuItemCarbon(editMenu, 3);\n\t\t\tDisableMenuItemCarbon(editMenu, 4);\n\t\t\tDisableMenuItemCarbon(editMenu, 5);\n\t\t\tDisableMenuItemCarbon(editMenu, 6);\n\t\t}\n\t}\n}\n\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacUnixCommandLineInterface.c",
    "content": "/*\n *  sqMacUnixCommandLineInterface.c\n *  SqueakVMForCarbon\n *\n *  Created by John M McIntosh on 3/19/05.\n *\n *   \n *   This file was part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n * \n * Much of this code comes from the unix port\n * Ian Piumarta <ian.piumarta@inria.fr>\n * \n * 3.8.13b4  Oct 16th, 2006 JMM headless\n */\n\n#include \"sq.h\"\n#include \"sqMacUnixCommandLineInterface.h\"\n#include \"sqMacEncoding.h\"\n#include \"sqMacFileLogic.h\"\n#include \"sqMacUIConstants.h\"\n#include \"sqMacUnixFileInterface.h\"\n\n\nextern CFStringEncoding gCurrentVMEncoding;\nextern Boolean gSqueakHeadless;\nstatic int    vmArgCnt=\t\t0;\t/* for getAttributeIntoLength() */\nstatic char **vmArgVec=\t\t0;\nstatic int    squeakArgCnt=\t0;\nstatic char **squeakArgVec=\t0;\nextern       int    argCnt;\t/* global copies for access from plugins */\nextern       char **argVec;\nextern       char **envVec;\nextern UInt32 gMaxHeapSize;\n\nstatic void outOfMemory(void);\nstatic void parseArguments(int argc, char **argv);\nstatic int parseArgument(int argc, char **argv);\nstatic void usage(void);\nstatic void parseEnvironment(void);\nstatic int strtobkm(const char *str);\nstatic void printUsage(void);\nstatic void printUsageNotes(void);\nvoid resolveWhatTheImageNameIs(char *guess);\n\nchar *unixArgcInterfaceGetParm(int n) {\n\tint actual;\n\t\n\tif (n < 0) \n\t\tactual = -n;\n\telse\n\t\tactual = n - 2;\n\t\t\n\tif (actual < squeakArgCnt) \n\t\treturn squeakArgVec[actual];\n\treturn nil;\n}\n\nvoid unixArgcInterface(int argc, char **argv, char **envp) {\n#pragma unused(envp)\n  if ((vmArgVec= calloc(argc + 1, sizeof(char *))) == 0)\n    outOfMemory();\n\n  if ((squeakArgVec= calloc(argc + 1, sizeof(char *))) == 0)\n    outOfMemory();\n\n  parseEnvironment();\n  parseArguments(argc, argv);\n}\n\n\nstatic void parseArguments(int argc, char **argv)\n{\n# define skipArg()\t(--argc, argv++)\n# define saveArg()\t(vmArgVec[vmArgCnt++]= *skipArg())\n\n  saveArg();\t/* vm name */\n\n  while ((argc > 0) && (**argv == '-'))\t/* more options to parse */\n    {\n      int n= 0;\n      \n\t  if (!strcmp(*argv, \"--\"))\t\n\t\tbreak; /* escape from option processing */\n\t  else\n\t\t n= parseArgument(argc, argv);\n\t  \n\t  if (n == 0)\t\t\t/* option not recognised */ {\n\t\tfprintf(stderr, \"unknown option: %s\\n\", argv[0]);\n\t\tusage();\n\t  }\n      while (n--)\n\t     saveArg();\n    }\n\n  if (!argc)\n    return;\n\n  if (!strcmp(*argv, \"--\"))\n    skipArg();\n  else\t\t\t\t\t/* image name default to normal mac expectations */\n\tresolveWhatTheImageNameIs(saveArg());\n  /* save remaining arguments as Squeak arguments */\n  while (argc > 0)\n    squeakArgVec[squeakArgCnt++]= *skipArg();\n\n# undef saveArg\n# undef skipArg\n}\n\nvoid resolveWhatTheImageNameIs(char *guess)  \n{\n\tchar possibleImageName[DOCUMENT_NAME_SIZE+1],  fullPath [DOCUMENT_NAME_SIZE+1],  lastPath [SHORTIMAGE_NAME_SIZE+1];\n\tFSRef\t\ttheFSRef;\n\tOSErr\t\terr;\n\t\n\tstrncpy(possibleImageName, guess,DOCUMENT_NAME_SIZE);\n\terr = getFSRef(possibleImageName,&theFSRef,kCFStringEncodingUTF8);\n\tif (err) {\n\t\tSetImageNameViaString(\"\",gCurrentVMEncoding);\n\t\tSetShortImageNameViaString(\"\",gCurrentVMEncoding);\n\t\treturn;\n\t}\n\tPathToFileViaFSRef(fullPath,DOCUMENT_NAME_SIZE, &theFSRef,gCurrentVMEncoding);\n\tgetLastPathComponentInCurrentEncoding(fullPath,lastPath,gCurrentVMEncoding);\n\tSetImageNameViaString(fullPath,gCurrentVMEncoding);\n\tSetShortImageNameViaString(lastPath,gCurrentVMEncoding);\n}\n\n\nstatic int parseArgument(int argc, char **argv)\n{\n   /* vm arguments */\n  \n  if      (!strcmp(argv[0], \"-help\"))\t\t{ \n\tusage();\n\treturn 1; }\n  else if (!strncmp(argv[0], \"-psn_\", 5)) { \n\treturn 1; }\n  else if (!strcmp(argv[0], \"-headless\")) { \n\tgSqueakHeadless = true; return 1; }\n  else if (!strcmp(argv[0], \"-headfull\")) { \n\tgSqueakHeadless = false; return 1; }\n  else if (argc > 1) {\n\t  if (!strcmp(argv[0], \"-memory\"))\t{ \n\t\tgMaxHeapSize = strtobkm(argv[1]);\t \n\t\treturn 2; }\n#if STACKVM\n      else if (!strcmp(argv[0], \"-eden\")) { \n\t\textern sqInt desiredEdenBytes;\n\t\tdesiredEdenBytes = strtobkm(argv[1]);\t \n\t\treturn 2; }\n      else if (!strcmp(argv[0], \"-leakcheck\")) { \n\t\textern sqInt checkForLeaks;\n\t\tcheckForLeaks = atoi(argv[1]);\t \n\t\treturn 2; }\n      else if (!strcmp(argv[0], \"-stackpages\")) { \n\t\textern sqInt desiredNumStackPages;\n\t\tdesiredNumStackPages = atoi(argv[1]);\t \n\t\treturn 2; }\n      else if (!strcmp(argv[0], \"-breaksel\")) { \n\t\textern void setBreakSelector(char *);\n\t\tsetBreakSelector(argv[1]);\n\t\treturn 2; }\n      else if (!strcmp(argv[0], \"-noheartbeat\")) { \n\t\textern sqInt suppressHeartbeatFlag;\n\t\tsuppressHeartbeatFlag = 1;\n\t\treturn 1; }\n      else if (!strcmp(argv[0], \"-pollpip\")) { \n\t\textern sqInt pollpip;\n\t\tpollpip = atoi(argv[1]);\t \n\t\treturn 2; }\n#endif /* STACKVM */\n#if COGVM\n      else if (!strcmp(argv[0], \"-codesize\")) { \n\t\textern sqInt desiredCogCodeSize;\n\t\tdesiredCogCodeSize = strtobkm(argv[1]);\t \n\t\treturn 2; }\n# define TLSLEN (sizeof(\"-sendtrace\")-1)\n      else if (!strncmp(argv[0], \"-sendtrace\", TLSLEN)) { \n\t\textern int traceLinkedSends;\n\t\tchar *equalsPos = strchr(argv[0],'=');\n\n\t\tif (!equalsPos) {\n\t\t\ttraceLinkedSends = 1;\n\t\t\treturn 1;\n\t\t}\n\t\tif (equalsPos - argv[0] != TLSLEN\n\t\t  || (equalsPos[1] != '-' && !isdigit(equalsPos[1])))\n\t\t\treturn 0;\n\n\t\ttraceLinkedSends = atoi(equalsPos + 1);\n\t\treturn 1; }\n      else if (!strcmp(argv[0], \"-tracestores\")) { \n\t\textern sqInt traceStores;\n\t\ttraceStores = 1;\n\t\treturn 1; }\n      else if (!strcmp(argv[0], \"-dpcso\")) { \n\t\textern unsigned long debugPrimCallStackOffset;\n\t\tdebugPrimCallStackOffset = (unsigned long)strtobkm(argv[1]);\t \n\t\treturn 2; }\n      else if (!strcmp(argv[0], \"-cogmaxlits\")) { \n\t\textern sqInt maxLiteralCountForCompile;\n\t\tmaxLiteralCountForCompile = strtobkm(argv[1]);\t \n\t\treturn 2; }\n      else if (!strcmp(argv[0], \"-cogminjumps\")) { \n\t\textern sqInt minBackwardJumpCountForCompile;\n\t\tminBackwardJumpCountForCompile = strtobkm(argv[1]);\t \n\t\treturn 2; }\n#endif /* COGVM */\n      else if (!strcmp(argv[0], \"-pathenc\")) { \n\t\tsetEncodingType(argv[1]); \n\t\treturn 2; }\n      else if (!strcmp(argv[0], \"-browserPipes\")) {\n\t\textern int\t\t gSqueakBrowserPipes[]; /* read/write fd for browser communication */\n\t\textern Boolean gSqueakBrowserSubProcess;\n\t\t\n\t\tif (!argv[2]) return 0;\n\t\tsscanf(argv[1], \"%i\", &gSqueakBrowserPipes[0]);\n\t\tsscanf(argv[2], \"%i\", &gSqueakBrowserPipes[1]);\n\t\tgSqueakBrowserSubProcess = true;\n\t\treturn 3;\n\t}\n  }\n  return 0;\t/* option not recognised */\n}\n\nstatic void usage(void)\n{\n  printf(\"Usage: %s [<option>...] [<imageName> [<argument>...]]\\n\", argVec[0]);\n  printf(\"       %s [<option>...] -- [<argument>...]\\n\", argVec[0]);\n  printUsage();\n  printf(\"\\nNotes:\\n\");\n  printf(\"  <imageName> defaults to `Squeak.image'.\\n\");\n  printUsageNotes();\n  exit(1);\n}\n\nstatic void printUsage(void)\n{\n  printf(\"\\nCommon <option>s:\\n\");\n  printf(\"  -help                 print this help message, then exit\\n\");\n  printf(\"  -memory <size>[mk]    use fixed heap size (added to image size)\\n\");\n#if STACKVM\n  printf(\"  -eden <size>[mk]      set eden memory to bytes\\n\");\n  printf(\"  -stackpages num       use n stack pages\\n\");\n  printf(\"  -breaksel selector    set breakpoint on send of selector\\n\");\n#endif\n#if COGVM\n  printf(\"  -codesize <size>[mk]  set machine code memory to bytes\\n\");\n  printf(\"  -sendtrace[=num]      enable send tracing (optionally to a specific value)\\n\");\n  printf(\"  -tracestores          enable store tracing (assert check stores)\\n\");\n  printf(\"  -cogmaxlits <n>       set max number of literals for methods compiled to machine code\\n\");\n  printf(\"  -cogminjumps <n>      set min number of backward jumps for interpreted methods to be considered for compilation to machine code\\n\");\n#endif\n  printf(\"  -pathenc <enc>        set encoding for pathnames (default: macintosh)\\n\");\n  printf(\"  -headless             run in headless (no window) mode (default: false)\\n\");\n}\n\nstatic void printUsageNotes(void)\n{\n  printf(\"  If `-memory' is not specified then the heap will grow dynamically.\\n\");\n  printf(\"  <argument>s are ignored, but are processed by the Squeak image.\\n\");\n  printf(\"  The first <argument> normally names a Squeak `script' to execute.\\n\");\n  printf(\"  Precede <arguments> by `--' to use default image.\\n\");\n}\n\nstatic void outOfMemory(void)\n{\n  fprintf(stderr, \"out of memory\\n\");\n  exit(1);\n}\n\nstatic int strtobkm(const char *str)\n{\n  char *suffix;\n  int value= strtol(str, &suffix, 10);\n  switch (*suffix)\n    {\n    case 'k': case 'K':\n      value*= 1024;\n      break;\n    case 'm': case 'M':\n      value*= 1024*1024;\n      break;\n    }\n  return value;\n}\n\nstatic void parseEnvironment(void)\n{\n  char *ev= 0;\n\n  if ((ev= getenv(\"SQUEAK_IMAGE\")))\t\t\n\tresolveWhatTheImageNameIs(ev);\n  if ((ev= getenv(\"SQUEAK_MEMORY\")))\tgMaxHeapSize= strtobkm(ev);\n  if ((ev= getenv(\"SQUEAK_PATHENC\")))\tsetEncodingType(ev);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacUnixCommandLineInterface.h",
    "content": "/*\n *  sqMacUnixCommandLineInterface.h\n *  SqueakVMForCarbon\n *\n *  Created by John M McIntosh on 3/19/05 from the altered Unix File. \n * \n *   Copyright (C) 1996-2004 by John M McIntosh and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file was part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n * \n * Much of this code comes from the unix port\n * Ian Piumarta <ian.piumarta@inria.fr>\n */\n\n#include <Carbon/Carbon.h>\nvoid unixArgcInterface(int argc, char **argv, char **envp);\nchar *unixArgcInterfaceGetParm(int n);\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacUnixExternalPrims.c",
    "content": "/* sqUnixExternalPrims.c -- Unix named primitives and loadable modules\n * \n *   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file was part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n */\n\n/* Author: Ian.Piumarta@INRIA.Fr\n *\n * Last edited: 2005-04-06 06:09:36 by piumarta on pauillac.hpl.hp.com\n\t\n * Altered by John M McIntosh johnmci@smalltalkconsulting.com Feb 24th, 2006 for os-x carbon support\n 3.8.11b2 load from resource location first, avoid plugins external directory because of intel migration effort issues.\n 3.8.17b1 April 25, 2007, JMM rework for 10.2.8 backwards support using Ian's dl* logic. \n \n */\n \n#include \"sq.h\"\t\t/* sqUnixConfig.h */\n#include \"sqMacUIConstants.h\"\n#include \"sqMacEncoding.h\"\n#include \"sqMacUnixFileInterface.h\"\nextern int gSqueakDebug;\n\n# define DPRINTF(ARGS) if (gSqueakDebug) fprintf ARGS\n \n#if defined(HAVE_LIBDL)\t/* non-starter without this! */\n\n# include <dlfcn.h>\n    void *dlopen(const char *filename, int flag) __attribute__((weak_import));\n\tchar *dlerror(void) __attribute__((weak_import));\n    void *dlsym(void *handle, const char *symbol) __attribute__((weak_import));\n    int dlclose(void *handle) __attribute__((weak_import));\n   static void *dlopenSqueak (const char *filename, int flag);\n   static const char *dlerrorSqueak(void);\n   static void *dlsymSqueak(void *handle, const char *symbol);\n   static int dlcloseSqueak (void *handle);\n \n#include <sys/param.h>\n#include <sys/stat.h>\n\n/* get a value for RTLD_NOW, with increasing levels of desperation... */\n\n#if !defined(RTLD_NOW)\n# if defined(DL_NOW)\n#   define RTLD_NOW DL_NOW\n# elif defined(RTLD_LAZY)\n#   define RTLD_NOW RTLD_LAZY\n# elif defined(DL_LAZY)\n#   define RTLD_NOW DL_LAZY\n# else\n#   warning: defining RTLD_NOW as 1\n#   define RTLD_NOW 1\n# endif\n#endif\n\n#if !defined(RTLD_GLOBAL)\n# define RTLD_GLOBAL 0\n#endif\n \n#ifndef NAME_MAX\n# ifdef MAXPATHLEN\n#   define NAME_MAX MAXPATHLEN\n# else\n#   ifdef FILENAME_MAX\n#     define NAME_MAX FILENAME_MAX\n#   else\n#     define NAME_MAX 256\t/* nobody has fewer than this (since the PDP-8 ;) */\n#   endif\n# endif\n#endif\n\n#if !defined(HAVE_SNPRINTF)\n# if defined(HAVE___SNPRINTF)\t/* Solaris 2.5 */\n    extern int __snprintf(char *buf, size_t limit, const char *fmt, ...);\n#   define snprintf __snprintf\n#   define HAVE_SNPRINTF\n# endif\n#endif\n\n\n/*** options ***/\n\nextern Boolean gSqueakPluginsBuiltInOrLocalOnly;\n\n/*** configured variables ***/\n\nextern char vmLibDir[];\n\n/*** local functions ***/\n\n\n/*  Attempt to load the shared library named by the concatenation of prefix,\n *  moduleName and suffix.  Answer the new module entry, or 0 if the shared\n *  library could not be loaded.\n */\nstatic void *tryLoadingInternals(char *libName)\n{\t\n  struct stat buf;\n  int         err;\n  void        *handle= 0;\n\n\tif ((!(err= stat(libName, &buf))) && S_ISDIR(buf.st_mode)) {\n\t  DPRINTF((stderr, \"ignoring directory: %s\\n\", libName));\n\t}\n\telse\n\t  {\n\t    DPRINTF((stderr, \"tryLoading %s\\n\", libName));\n\t\tif (dlopen == NULL)\n\t\t\thandle= dlopenSqueak(libName, RTLD_NOW | RTLD_GLOBAL);\n\t\telse\n\t\t\thandle= dlopen(libName, RTLD_NOW | RTLD_GLOBAL);\n\t    if (handle == 0)\n\t      {\n\t\t\tchar* why;\n\t\t\tif (dlerror == NULL)\n\t\t\t\twhy = dlerrorSqueak();\n\t\t\telse\n\t\t\t\twhy = dlerror();\n\t\t\tif ((!err) && (gSqueakDebug))\n\t\t\t\tfprintf(stderr, \"ioLoadModule(%s):\\n  %s\\n\", libName, why);\n\t      }\n\t    else\n\t      {\n#if EXTERNALPRIMSDEBUG\n\t\t\tfprintf(stderr,\"squeak: loaded plugin `%s'\\n\", libName);\n#endif\n\t\t    return handle;\n\t      }\n\t  }\n\treturn 0;\n}\n\nstatic void *tryLoading(char *dirName, char *moduleName)\n{\n  static char *prefixes[]= { \"\", \"lib\", 0 };\n  static char *suffixes[]= { \"\", \".so\", \".dylib\",0 };\n  void        *handle= 0;\n  char\t     **prefix= 0, **suffix= 0;\n  char        libName[MAXPATHLEN + 32];\t/* headroom for prefix/suffix */\n  \n  sprintf(libName, \"%s%s%s%s\", dirName, moduleName,\".bundle/Contents/MacOS/\", moduleName);\n  handle = tryLoadingInternals(libName);\n  if (handle) \n\t return handle;\n\n  sprintf(libName, \"%s%s\", dirName, moduleName);\n  handle = tryLoadingInternals(libName);\n  if (handle) \n\t return handle;\n\n  if (gSqueakPluginsBuiltInOrLocalOnly)\n\treturn 0;\n\t\n  for (prefix= prefixes;  *prefix;  ++prefix)\n    for (suffix= suffixes;  *suffix;  ++suffix)\n      {\n\t\tsprintf(libName, \"%s%s%s%s\", dirName, *prefix, moduleName, *suffix);\n\t\thandle = tryLoadingInternals(libName);\n\t\tif (handle) \n\t\t\treturn handle;\n      }\n  return 0;\n}\n\n\nstatic void *tryLoadingPath(char *varName, char *pluginName)\n{\n  char *path= getenv(varName);\n  void *handle= 0;\n\n  if (path)\n    {\n      char pbuf[MAXPATHLEN];\n      DPRINTF((stderr, \"try %s=%s\\n\", varName, path));\n      strncpy(pbuf, path, sizeof(pbuf));\n      pbuf[sizeof(pbuf) - 1]= '\\0';\n      for (path= strtok(pbuf, \":\");\n\t   path != 0;\n\t   path= strtok(0, \":\"))\n\t{\n\t  char buf[MAXPATHLEN];\n\t  sprintf(buf, \"%s/\", path);\n\t  DPRINTF((stderr, \"  path dir = %s\\n\", buf));\n\t  if ((handle= tryLoading(buf, pluginName)) != 0)\n\t    break;\n\t}\n    }\n  return handle;\n}\n\n\n/*  Find and load the named module.  Answer 0 if not found (do NOT fail\n *  the primitive!).\n */\nvoid *ioLoadModule(char *pluginName)\n{\n  void *handle= 0;\n  char pluginDirPath[DOCUMENT_NAME_SIZE+1+8];\n  static char vmDirPath[DOCUMENT_NAME_SIZE] = { 0 };\n\n  if ((pluginName == 0) || (pluginName[0] == '\\0'))\n    {\n      if (dlopen == NULL)\n\t\thandle= dlopenSqueak(0, RTLD_NOW | RTLD_GLOBAL);\n\t  else\n\t\thandle= dlopen(0, RTLD_NOW | RTLD_GLOBAL);\n      if (handle == 0) {\n\t\tchar *why; \n\t\t\tif (dlerror == NULL)\n\t\t\t\twhy = dlerrorSqueak();\n\t\t\telse\n\t\t\t\twhy = dlerror();\n\t\tfprintf(stderr, \"ioLoadModule(<intrinsic>): %s\\n\", why);\n\t  }\n      else\n\t{\n\t  DPRINTF((stderr, \"loaded: <intrinsic>\\n\"));\n\t  return handle;\n\t}\n    }\n\n\t/* first, look in the \"<Squeak VM directory>Plugins\" directory for the library */\n\tgetVMPathWithEncoding(pluginDirPath,kCFStringEncodingUTF8);\n\t\n\tstrcat(pluginDirPath, \"Plugins/\");\n\tif (!vmDirPath[0]) {\n            CFBundleRef mainBundle;\n            CFURLRef\tbundleURL,bundleURL2,resourceURL;\n\t\t\tCFStringRef filePath,resourcePathString;\n\t\t\t\n            mainBundle = CFBundleGetMainBundle();   \n\t\t\tbundleURL = CFBundleCopyBundleURL(mainBundle);\n\t\t\tresourceURL = CFBundleCopyResourcesDirectoryURL(mainBundle);\n\t\t\tresourcePathString = CFURLCopyPath(resourceURL);\n\t\t\tCFRelease(resourceURL);\n\n\t\t\tbundleURL2 = CFURLCreateCopyAppendingPathComponent( kCFAllocatorSystemDefault, bundleURL, resourcePathString, false );\n\t\t\tCFRelease(bundleURL);\n\t\t\tfilePath = CFURLCopyFileSystemPath (bundleURL2, kCFURLPOSIXPathStyle);\n\t\t\tCFRelease(bundleURL2);\n\t\t\t\n\t\t\tCFStringGetCString (filePath,vmDirPath,DOCUMENT_NAME_SIZE, kCFStringEncodingUTF8);\n\t\t\tstrcat(vmDirPath,\"/\");\n\t\t\tCFRelease(filePath);\n\t\t\t\n \t\t}\n\n    if (gSqueakPluginsBuiltInOrLocalOnly) {\n\t  if ( (handle= tryLoading( vmDirPath, pluginName))\n\t\t|| (handle= tryLoading( pluginDirPath,\tpluginName))\n\t\t)\n\t\t\treturn handle;\n    } else {\n\t\t  if ((   handle= tryLoading( pluginDirPath,\tpluginName))\n\t\t\t  || (handle= tryLoading( vmDirPath,\t\tpluginName))\n\t\t\t  || (handle= tryLoadingPath(\"SQUEAK_PLUGIN_PATH\",\tpluginName))\n\t\t//JMM || (handle= tryLoadingPath(\"LD_LIBRARY_PATH\",\tpluginName))\n\t\t\t  || (handle= tryLoading(    \"./\",\t\t\tpluginName))\n\t\t\t  || (handle= tryLoading(    \"\",\t\t\tpluginName))\n#    if defined(VM_X11DIR)\n\t\t\t  || (handle= tryLoading(VM_X11DIR\"/\",\t\tpluginName))\n#    endif\n\t\t\t  )\n\t\t\treturn handle;\n\t}\n\n#if defined(DARWIN)\n  // the following is needed so that, for example, the FFI can pick up\n  // things like <cdecl: 'xyz' module: 'CoreServices'>\n  {\n    static char *frameworks[]=\n      {\n\t\"\",\n\t\"/CoreServices.framework/Frameworks\",\n\t\"/ApplicationServices.framework/Frameworks\",\n\t\"/Carbon.framework/Frameworks\",\n\t0\n      };\n\n\tstatic char systemFolder[MAXPATHLEN+1]={0};\n    char **framework= 0;\n\tchar workingData[MAXPATHLEN+1];\n\tint pluginNameLength;\n\tchar path[DOCUMENT_NAME_SIZE],path2[DOCUMENT_NAME_SIZE];\n\t\n\tif (!systemFolder[0]) {\n\t\tOSErr err;\n\t\tFSRef frameworksFolderRef;\n\t\t\n\t\terr = FSFindFolder(kSystemDomain, kFrameworksFolderType, false, &frameworksFolderRef);\n\t\tif (err) \n\t\t\tstrcpy(systemFolder,\"/System/Library/Frameworks/\");\n\t\telse {\n\t\t\tPathToFileViaFSRef(systemFolder,MAXPATHLEN,&frameworksFolderRef,kCFStringEncodingUTF8);     \n\t\t}\n\t}\n\t\n\tpluginNameLength = strlen(pluginName);\n\tif (pluginNameLength > 10) {\n\t\tstrncpy(workingData,pluginName+pluginNameLength-10,10);\n\t\tworkingData[10] = 0x00;\n\t\tif (strcmp(workingData,\".framework\") == 0) {\n\t\t\tstrncpy(workingData,pluginName,pluginNameLength-10);\n\t\t\tworkingData[pluginNameLength-10] = 0x00;\n\t\t\tsprintf(path, \"%s%s/\",vmDirPath,pluginName);\n\t\t\tif (gSqueakPluginsBuiltInOrLocalOnly) {\n\t\t\t\tsprintf(path2, \"%s%s\", path, workingData);\n\t\t\t\tif ((handle = tryLoadingInternals(path2)))\n\t\t\t\t\treturn handle;\n\t\t\t} else {\n\t\t\t\tif ((handle= tryLoading(path, workingData)))\n\t\t\t\t\treturn handle;\n\t\t\t}\n\t\t\tsprintf(path, \"%s%s/\",pluginDirPath,pluginName);\n\t\t\tif (gSqueakPluginsBuiltInOrLocalOnly) {\n\t\t\t\tsprintf(path2, \"%s%s\", path, workingData);\n\t\t\t\tif ((handle = tryLoadingInternals(path2)))\n\t\t\t\t\treturn handle;\n\t\t\t} else {\n\t\t\t\tif ((handle= tryLoading(path, workingData)))\n\t\t\t\t\treturn handle;\n\t\t\t}\n\t\t\tsprintf(path, \"%s%s/\",systemFolder,pluginName);\n\t\t\tif (gSqueakPluginsBuiltInOrLocalOnly) {\n\t\t\t\tsprintf(path2, \"%s%s\", path, workingData);\n\t\t\t\tif ((handle = tryLoadingInternals(path2)))\n\t\t\t\t\treturn handle;\n\t\t\t} else {\n\t\t\t\tif ((handle= tryLoading(path, workingData)))\n\t\t\t\t\treturn handle;\n\t\t\t}\n\t\t}\n\t}\n\t\n if (gSqueakPluginsBuiltInOrLocalOnly)\n\treturn 0;\n\t\n    for (framework= frameworks;  *framework;  ++framework)\n      {\n\tsprintf(path, \"%s%s/%s/\", systemFolder,*framework, pluginName);\n\tif ((handle= tryLoading(path, pluginName)))\n\t  return handle;\n\tsprintf(path, \"%s%s/%s.framework/\", systemFolder,*framework, pluginName);\n\tif ((handle= tryLoading(path, pluginName)))\n\t  return handle;\n      }\n  }\n#endif\n\n  /* finally (for VM hackers) try the pre-install build location */\n  {\n    char pluginDir[DOCUMENT_NAME_SIZE];\n\tchar vmPath[VMPATH_SIZE+1];\n\tgetVMPathWithEncoding(vmPath,kCFStringEncodingUTF8);\n#  ifdef HAVE_SNPRINTF\n    snprintf(pluginDir, sizeof(pluginDir), \"%s%s/.libs/\", vmPath, pluginName);\n#  else\n    sprintf(pluginDir, \"%s%s/.libs/\", vmPath, pluginName);\n#  endif\n    if ((handle= tryLoading(pluginDir, pluginName)))\n      return handle;\n  }\n\n#if EXTERNALPRIMSDEBUG\n  fprintf(stderr, \"squeak: could not load plugin `%s'\\n\", pluginName);\n#endif \n  return 0;\n}\n\n\n/*  Find a function in a loaded module.  Answer 0 if not found (do NOT\n *  fail the primitive!).\n */\nvoid *ioFindExternalFunctionIn(char *lookupName, void *moduleHandle)\n{\n  char buf[256];\n  void *fn;\n\n#ifdef HAVE_SNPRINTF\n  snprintf(buf, sizeof(buf), \"%s\", lookupName);\n#else\n  sprintf(buf, \"%s\", lookupName);\n#endif\n\n  if (dlsym == NULL)\n\tfn= dlsymSqueak(moduleHandle, buf);\n  else\n\tfn= dlsym(moduleHandle, buf);\n\n  DPRINTF((stderr, \"ioFindExternalFunctionIn(%s, %d)\\n\",\n\t   lookupName, (int) moduleHandle));\n\n  if ((fn == 0) && (gSqueakDebug)\n      && strcmp(lookupName, \"initialiseModule\")\n      && strcmp(lookupName, \"shutdownModule\")\n      && strcmp(lookupName, \"setInterpreter\")\n      && strcmp(lookupName, \"getModuleName\")) {\n\t\tchar *why;\n\t  if (dlerror == NULL)\n\t\t\t\twhy = dlerrorSqueak();\n\t\t\telse\n\t\t\t\twhy = dlerror();\n    fprintf(stderr, \"ioFindExternalFunctionIn(%s, %p):\\n  %s\\n\",\n\t    lookupName, moduleHandle, why);\n\t}\n\n  return fn;\n}\n\n\n\n/*  Free the module with the associated handle.  Answer 0 on error (do\n *  NOT fail the primitive!).\n*/\nsqInt ioFreeModule(void *moduleHandle)\n{\n  int results;\n  if (dlclose == NULL)\n\tresults = dlcloseSqueak(moduleHandle);\n  else\n\tresults = dlclose(moduleHandle);\n\t\n  if (results)\n    {\n\tchar* why;\n\tif (dlerror == NULL)\n\t\twhy = dlerrorSqueak();\n\telse\n\t\twhy = dlerror();\n      DPRINTF((stderr, \"ioFreeModule(%d): %s\\n\", (int) moduleHandle, why));\n      return 0;\n    }\n  return 1;\n}\n\n\n#else /* !HAVE_LIBDL */\n\n\n\nvoid *ioLoadModule(char *pluginName)\n{\n  return 0;\n}\n\nvoid *ioFindExternalFunctionIn(char *lookupName, void *moduleHandle)\n{\n  return 0;\n}\n\nsqInt ioFreeModule(void *moduleHandle)\n{\n  return 0;\n}\n\n\n#endif /* !HAVE_LIBDL */\n\n/* dlfcn-dyld.c -- provides dlopen() and friends as wrappers around Mach dyld\n * \n * Author: Ian.Piumarta@INRIA.Fr\n * \n *   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *      You are NOT ALLOWED to distribute modified versions of this file\n *      under its original name.  If you modify this file then you MUST\n *      rename it before making your modifications available publicly.\n * \n *   This file is distributed in the hope that it will be useful, but WITHOUT\n *   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n *   FITNESS FOR A PARTICULAR PURPOSE.\n *   \n *   You may use and/or distribute this file ONLY as part of Squeak, under\n *   the terms of the Squeak License as described in `LICENSE' in the base of\n *   this distribution, subject to the following additional restrictions:\n * \n *   1. The origin of this software must not be misrepresented; you must not\n *      claim that you wrote the original software.  If you use this software\n *      in a product, an acknowledgment to the original author(s) (and any\n *      other contributors mentioned herein) in the product documentation\n *      would be appreciated but is not required.\n * \n *   2. You must not distribute (or make publicly available by any\n *      means) a modified copy of this file unless you first rename it.\n * \n *   3. This notice must not be removed or altered in any source distribution.\n * \n *   Using (or modifying this file for use) in any context other than Squeak\n *   changes these copyright conditions.  Read the file `COPYING' in the\n *   directory `platforms/unix/doc' before proceeding with any such use.\n * \n * Last edited: 2004-04-03 11:33:44 by piumarta on emilia.local\n */\n\n#include <stdio.h>\n#include <stdarg.h>\n#include <mach-o/dyld.h>\n\n#define RTLD_NOW\t0\n#define RTLD_GLOBAL\t0\n\n#define\tDL_APP_CONTEXT\t((void *)-1)\n\n\nstatic char dlErrorString[256];\nstatic int  dlErrorSet= 0;\n\n\nstatic void dlSetError(const char *fmt, ...)\n{\n  va_list ap;\n  va_start(ap, fmt);\n  vsnprintf(dlErrorString, sizeof(dlErrorString), fmt, ap);\n  va_end(ap);\n  dlErrorSet= 1;\n}\n\n\nstatic const char *dlerrorSqueak(void)\n{\n  if (dlErrorSet)\n    {\n      dlErrorSet= 0;\n      return (const char *)dlErrorString;\n    }\n  return 0;\n}\n\n\nstatic void dlUndefined(const char *symbol)\n{\n  fprintf(stderr, \"dyld: undefined symbol: %s\\n\", symbol);\n}\n\nstatic NSModule dlMultiple(NSSymbol s, NSModule oldModule, NSModule newModule)\n{\n  DPRINTF((stderr, \"dyld: %s: %s previously defined in %s\\n\",\n\t   NSNameOfSymbol(s), NSNameOfModule(oldModule), NSNameOfModule(newModule)));\n  return newModule;\n}\n\nstatic void dlLinkEdit(NSLinkEditErrors errorClass, int errorNumber,\n\t\t       const char *fileName, const char *errorString)\n\n{\n#pragma unused(errorClass,errorNumber,mode)\n  fprintf(stderr, \"dyld: %s: %s\\n\", fileName, errorString);\n}\n\nstatic NSLinkEditErrorHandlers errorHandlers=\n  {\n    dlUndefined,\n    dlMultiple,\n    dlLinkEdit\n  };\n\nstatic void dlinit(void)\n{\n  NSInstallLinkEditErrorHandlers(&errorHandlers);\n}\n\nstatic int dlInitialised= 0;\n\n\nstatic void *dlopenSqueak(const char *path, int mode)\n{\n#pragma unused(mode)\n  void\t\t\t*handle= 0;\n  NSObjectFileImage\t ofi= 0;\n\n  if (!dlInitialised)\n    {\n      dlinit();\n      dlInitialised= 1;\n    }\n\n  if (!path)\n    return DL_APP_CONTEXT;\n\n  switch (NSCreateObjectFileImageFromFile(path, &ofi))\n    {\n    case NSObjectFileImageSuccess:\n      handle= NSLinkModule(ofi, path, NSLINKMODULE_OPTION_RETURN_ON_ERROR);\n      NSDestroyObjectFileImage(ofi);\n      break;\n    case NSObjectFileImageInappropriateFile:\n      handle= (void *)NSAddImage(path, NSADDIMAGE_OPTION_RETURN_ON_ERROR);\n      break;\n    default:\n      handle= 0;\n      break;\n    }\n\n  if (!handle)\n    dlSetError(\"could not load shared object: %s\", path);\n\n  DPRINTF((stderr, \"dlopen: %s => %d\\n\", path, (int)handle));\n\n  return handle;\n}\n\n\nstatic void *dlsymSqueak(void *handle, const char *symbol)\n{\n  char\t\t_symbol[256];\n  NSSymbol\t*nsSymbol= 0;\n\n  snprintf(_symbol, sizeof(_symbol), \"_%s\", symbol);\n\n  DPRINTF((stderr, \"dlsym: looking for %s (%s) in %d\\n\", symbol, _symbol, (int)handle));\n\n  if (!handle)\n    {\n      DPRINTF((stderr, \"dlsym: setting app context for this handle\\n\"));\n      handle= DL_APP_CONTEXT;\n    }\n\n  if (DL_APP_CONTEXT == handle)\n    {\n      DPRINTF((stderr, \"dlsym: looking in app context\\n\"));\n      if (NSIsSymbolNameDefined(_symbol))\n\tnsSymbol= NSLookupAndBindSymbol(_symbol);\n    }\n  else\n    {\n      if ((  (MH_MAGIC == ((struct mach_header *)handle)->magic))\t/* ppc */\n\t  || (MH_CIGAM == ((struct mach_header *)handle)->magic))\t/* 386 */\n\t{\n\t  if (NSIsSymbolNameDefinedInImage((struct mach_header *)handle, _symbol))\n\t    {\n\t      nsSymbol= NSLookupSymbolInImage\n\t\t((struct mach_header *)handle,\n\t\t _symbol,\n\t\t NSLOOKUPSYMBOLINIMAGE_OPTION_BIND\n\t\t /*| NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR*/);\n\t      DPRINTF((stderr, \"dlsym: bundle (image) lookup returned %p\\n\", nsSymbol));\n\t    }\n\t  else\n\t    DPRINTF((stderr, \"dlsym: bundle (image) symbol not defined\\n\"));\n\t}\n      else\n\t{\n\t  nsSymbol= NSLookupSymbolInModule(handle, _symbol);\n\t  DPRINTF((stderr, \"dlsym: dylib (module) lookup returned %p\\n\", nsSymbol));\n\t}\n    }\n\n  if (!nsSymbol)\n    {\n      dlSetError(\"symbol not found: %s\", _symbol);\n      return 0;\n    }\n\n  return NSAddressOfSymbol(nsSymbol);\n}\n\n\nint dlcloseSqueak(void *handle)\n{\n  if ((  (MH_MAGIC == ((struct mach_header *)handle)->magic))\t/* ppc */\n      || (MH_CIGAM == ((struct mach_header *)handle)->magic))\t/* 386 */\n    return 0;\t/* can't unlink, but pretend we did */\n\n  if (!NSUnLinkModule(handle, 0))\n    {\n      dlSetError(\"could not unlink shared object: %s\", NSNameOfModule(handle));\n      return -1;\n    }\n\n  return 0;\n}\n\n\n\n#ifndef HAVE_LIBDL\n# define HAVE_LIBDL\n#endif  \n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacWindow.c",
    "content": "/****************************************************************************\n*   PROJECT: Mac window, memory, keyboard interface.\n*   FILE:    sqMacWindow.c\n*   CONTENT: \n*\n*   AUTHOR:  John Maloney, John McIntosh, and others.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:  $Id: sqMacWindow.c 1296 2006-02-02 07:50:50Z johnmci $\n*\n*   NOTES: \n*  Feb 22nd, 2002, JMM moved code into 10 other files, see sqMacMain.c for comments\n*  Feb 26th, 2002, JMM - use carbon get dominate device \n*  Apr  17th, 2002, JMM Use accessors for VM variables.\n*  May 5th, 2002, JMM cleanup for building as NS plugin\n 3.2.8b1 July 24th, 2002 JMM support for os-x plugin under IE 5.x\n 3.5.1b5 June 25th, 2003 JMM fix memory leak on color table free, pull preferences from Info.plist under os-x\n 3.7.0bx Nov 24th, 2003 JMM move preferences to main, the proper place.\n 3.7.3bx Apr 10th, 2004 JMM fix crash on showscreen\n 3.8.1b1 Jul 20th, 2004 JMM Start on multiple window logic\n 3.8.6b1 Jan 25th, 2005 JMM flush qd buffers less often\n 3.8.6b3 Jan 25th, 2005 JMM Change locking of pixels (less often)\n 3.8.8b3 Jul 15th, 2005 JMM Add window(s) flush logic every 1/60 second for os-x\n 3.8.8b6 Jul 19th, 2005 JMM tuning of the window flush\n 3.8.8b15\tSept 12th, 2005, JMM set full screen only if not in full screen. \n*****************************************************************************/\n\n#if TARGET_API_MAC_CARBON\n    #include <Carbon/Carbon.h>\n#else\n#endif\n\n#include \"sq.h\"\n#include \"sqMacUIConstants.h\"\n#include \"sqMacWindow.h\"\n#include \"sqMacFileLogic.h\"\n#include \"sqmacUIEvents.h\"\n#include \"sqMacUIMenuBar.h\"\n#include \"sqMacEncoding.h\"\n#include \"sqMacHostWindow.h\"\n\n/*** Variables -- Imported from Virtual Machine ***/\nextern int getFullScreenFlag();    /* set from header when image file is loaded */\nextern int setFullScreenFlag(int value);    /* set from header when image file is loaded */\nextern int getSavedWindowSize();   /* set from header when image file is loaded */\nextern int setSavedWindowSize(int value);   /* set from header when image file is loaded */\nextern struct VirtualMachine *interpreterProxy;\n\n/*** Variables -- Mac Related ***/\nCTabHandle\tstColorTable = nil;\nPixMapHandle\tstPixMap = nil;\nBoolean  \tgWindowsIsInvisible=true;\n\n\n/*** Functions ***/\nvoid SetColorEntry(int index, int red, int green, int blue);\nGDHandle getDominateDevice(WindowPtr theWindow,Rect *windRect);\nvoid getDominateGDeviceRect(GDHandle dominantGDevice,Rect *dGDRect,Boolean forgetMenuBar);\n\nWindowPtr getSTWindow(void) {\n    return  windowHandleFromIndex(1);\n}\n\n#ifndef BROWSERPLUGIN\n#if TARGET_API_MAC_CARBON\nextern struct VirtualMachine *interpreterProxy;\nint ioSetFullScreenActual(int fullScreen);\nvoid SetupSurface(int whichWindowIndex);\nextern int ioLowResMSecs(void);\n\nint ioSetFullScreen(int fullScreen) {\n        void *  giLocker;\n\t\tint return_value=0;\n        giLocker = interpreterProxy->ioLoadFunctionFrom(\"getUIToLock\", \"\");\n        if (giLocker != 0) {\n            long *foo;\n            foo = malloc(sizeof(long)*4);\n            foo[0] = 1;\n            foo[1] = (int) ioSetFullScreenActual;\n            foo[2] = fullScreen;\n            foo[3] = 0;\n            ((int (*) (void *)) giLocker)(foo);\n            return_value = interpreterProxy->positive32BitIntegerFor(foo[3]);\n            free(foo);\n        }\n        return return_value;\n}\n\nint ioSetFullScreenActual(int fullScreen) {\n#else\nint ioSetFullScreen(int fullScreen) {\n#endif\n    Rect                screen,portRect;\n    int                 width, height, maxWidth, maxHeight;\n    int                 oldWidth, oldHeight;\n    static Rect\t\trememberOldLocation = {0,0,0,0};\t\t\n    GDHandle            dominantGDevice;\n\t\n\tif (fullScreen && getFullScreenFlag() && !gWindowsIsInvisible)\n\t\t\treturn 0;\n\n\tdominantGDevice = getThatDominateGDevice(getSTWindow());\n    if (dominantGDevice == null) {\n        success(false);\n        return 0;\n    }\n\n#if TARGET_API_MAC_CARBON\n    screen = (**dominantGDevice).gdRect;\n#else\n    getDominateGDeviceRect(dominantGDevice,&screen,true);\n#endif  \n        \n    if (fullScreen) {\n\t\tGetPortBounds(GetWindowPort(getSTWindow()),&rememberOldLocation);\n\t\tif (gWindowsIsInvisible) {\n\t\t\trememberOldLocation.top = 44;\n\t\t\trememberOldLocation.left = 8;\n\t\t}\n\t\tLocalToGlobal((Point*) &rememberOldLocation.top);\n\t\tLocalToGlobal((Point*) &rememberOldLocation.bottom);\n\t\tMenuBarHide();\n\t\tGetPortBounds(GetWindowPort(getSTWindow()),&portRect);\n\t\toldWidth =  portRect.right -  portRect.left;\n\t\toldHeight =  portRect.bottom -  portRect.top;\n\t\twidth  = screen.right - screen.left; \n\t\theight = (screen.bottom - screen.top);\n\t\tMoveWindow(getSTWindow(), screen.left, screen.top, true);\n\t\tSizeWindow(getSTWindow(), width, height, true);\n\t\tsetFullScreenFlag(true);\n\t} else {\n\t\tMenuBarRestore();\n\n\t\tif (EmptyRect(&rememberOldLocation)) {\n\t\t\t/* get old window size */\n\t\t\twidth  = (unsigned) getSavedWindowSize() >> 16;\n\t\t\theight = getSavedWindowSize() & 0xFFFF;\n\n\t\t\t/* minimum size is 1 x 1 */\n\t\t\twidth  = (width  > 0) ?  width : 64;\n\t\t\theight = (height > 0) ? height : 64;\n\n\t\t/* maximum size is screen size inset slightly */\n\t\tmaxWidth  = (screen.right  - screen.left) - 16;\n\t\tmaxHeight = (screen.bottom - screen.top)  - 52;\n\t\twidth  = (width  <= maxWidth)  ?  width : maxWidth;\n\t\theight = (height <= maxHeight) ? height : maxHeight;\n\t\t\tMoveWindow(getSTWindow(), 8, 44, true);\n\t\t\tSizeWindow(getSTWindow(), width, height, true);\n\t\t} else {\n\t\tMoveWindow(getSTWindow(), rememberOldLocation.left, rememberOldLocation.top, true);\n\t\t\tSizeWindow(getSTWindow(), rememberOldLocation.right - rememberOldLocation.left, rememberOldLocation.bottom - rememberOldLocation.top, true);\n\t\t}\n\t\t\n\t\tsetFullScreenFlag(false);\n\t}\n\treturn 0;\n}\n\n#if TARGET_API_MAC_CARBON\n\nextern struct VirtualMachine *interpreterProxy;\nvoid sqShowWindow(int windowIndex);\nvoid sqShowWindowActual(int windowIndex);\n\nvoid sqShowWindow(int windowIndex) {\n        void *  giLocker;\n        giLocker = interpreterProxy->ioLoadFunctionFrom(\"getUIToLock\", \"\");\n        if (giLocker != 0) {\n            long *foo;\n            foo = malloc(sizeof(long)*4);\n            foo[0] = 1;\n            foo[1] = (int) sqShowWindowActual;\n            foo[2] = windowIndex;\n            foo[3] = 0;\n            ((int (*) (void *)) giLocker)(foo);\n            free(foo);\n        }\n}\n\nvoid sqShowWindowActual(int windowIndex){\n#else\nvoid sqShowWindow(int windowIndex) {\n#endif\n\tif ( windowHandleFromIndex(windowIndex))\n\tShowWindow( windowHandleFromIndex(windowIndex));\n}\n\nint ioShowDisplay(\n\tint dispBitsIndex, int width, int height, int depth,\n\tint affectedL, int affectedR, int affectedT, int affectedB) {\n\t\n\tioShowDisplayOnWindow( (unsigned int*)  dispBitsIndex,  width,  height,  depth, affectedL,  affectedR,  affectedT,  affectedB, 1);\n\treturn 1;\n}\n\n#define bytesPerLine(width, depth)\t((((width)*(depth) + 31) >> 5) << 2)\n#if !TARGET_API_MAC_CARBON\nint ioShowDisplayOnWindow( unsigned int* dispBitsIndex, int width, int height, int depth, \n\tint affectedL, int affectedR, int affectedT, int affectedB, int windowIndex) {\n\n        CGrafPtr\twindowPort;\n\tstatic \t\tRgnHandle maskRect = nil;\n\tstatic Rect\tdstRect = { 0, 0, 0, 0 };\n\tstatic Rect\tsrcRect = { 0, 0, 0, 0 };\n        static int\trememberWidth=0,rememberHeight=0,rememberDepth=0;\n        \n\tif (gWindowsIsInvisible && getSTWindow() == NULL) {\n\t\tmakeMainWindow();\n\t}\n\t\n\tif (windowHandleFromIndex(windowIndex) == nil) {\n            return 0;\n\t}\n    \n        if (maskRect == nil) {\n            maskRect = NewRgn();\n        }\n\n        (*stPixMap)->baseAddr = (void *) dispBitsIndex;\n        \n\tif (!((rememberHeight == height) && (rememberWidth == width) && (rememberDepth == depth))) {\n            rememberWidth  = dstRect.right = width;\n            rememberHeight = dstRect.bottom = height;\n    \n            srcRect.right = width;\n            srcRect.bottom = height;\n    \n            /* Note: top three bits of rowBytes indicate this is a PixMap, not a BitMap */\n            (*stPixMap)->rowBytes = (((((width * depth) + 31) / 32) * 4) & 0x1FFF) | 0x8000;\n            (*stPixMap)->bounds = srcRect;\n            rememberDepth = (*stPixMap)->pixelSize = depth;\n    \n            if (depth<=8) { /*Duane Maxwell <dmaxwell@exobox.com> fix cmpSize Sept 18,2000 */\n                (*stPixMap)->cmpSize = depth;\n                (*stPixMap)->cmpCount = 1;\n            } else if (depth==16) {\n                (*stPixMap)->cmpSize = 5;\n                (*stPixMap)->cmpCount = 3;\n            } else if (depth==32) {\n                (*stPixMap)->cmpSize = 8;\n                (*stPixMap)->cmpCount = 3;\n            }\n        }\n        \n\t/* create a mask region so that only the affected rectangle is copied */\n\tSetRectRgn(maskRect, affectedL, affectedT, affectedR, affectedB);\n\twindowPort = GetWindowPort(windowHandleFromIndex(windowIndex));\n\tSetPort((GrafPtr) windowPort);\n\tCopyBits((BitMap *) *stPixMap, GetPortBitMapForCopyBits(windowPort), &srcRect, &dstRect, srcCopy, maskRect);\n\n        if (gWindowsIsInvisible) {\n\t\tsqShowWindow(1);\n\t\tgWindowsIsInvisible = false;\n\t}\n\treturn 1;\n}\n#else\nvoid * copy124BitsTheHardWay(\n\tunsigned int * dispBitsIndex, int width, int height, int depth, int desiredDepth,\n\tint affectedL, int affectedR, int affectedT, int affectedB, int windowIndex,int *pixPitch);\n\n#ifdef JMMFoo\nvoid ReduceQDFlushLoad(CGrafPtr\twindowPort, int windowIndexToUse,  int affectedL, int affectedT, int affectedR, int affectedB);\n\t\nint ioShowDisplayOnWindow( unsigned int* dispBitsIndex, int width, int height, int depth, \n\tint affectedL, int affectedR, int affectedT, int affectedB, int windowIndex) {\n\n        CGrafPtr\twindowPort;\n\t\tstatic RgnHandle maskRect = nil;\n        static int\ttitleH=0,lastWindowIndex=-1;\n        int \t\taffectedW,affectedH;\n        \n\tif (gWindowsIsInvisible && getSTWindow() == NULL) {\n\t\tmakeMainWindow();\n\t}\n\t\tif (affectedL < 0) affectedL = 0;\n\t\tif (affectedT < 0) affectedT = 0;\n\t\tif (affectedR > width) affectedR = width;\n\t\tif (affectedB > height) affectedB = height;\n\t\t\n        affectedW= affectedR - affectedL;\n        affectedH= affectedB - affectedT;\n\n\tif ((windowHandleFromIndex(windowIndex) == nil) || (affectedW <= 0) || (affectedH <= 0)){\n            return 0;\n\t}\n\n        windowPort = GetWindowPort(windowHandleFromIndex(windowIndex));\n\t\tif (windowPort == nil) \n\t\t\treturn 0;\n \n        if (maskRect == nil) {            \n            maskRect = NewRgn();            \n        }\n\t\t\n\t\t\n\t\tif (lastWindowIndex != windowIndex) {\n            Rect structureRect;\n            GetWindowRegion(windowHandleFromIndex(windowIndex),kWindowTitleBarRgn,maskRect);\n            GetRegionBounds(maskRect,&structureRect);\n            titleH = structureRect.bottom- structureRect.top;\n\t\t\tlastWindowIndex = windowIndex;\n        }\n\n#if TARGET_API_MAC_CARBON\n\t\tLockPortBits(windowPort);\n#endif          \n       {\n            PixMapHandle    pix;\n            int   pixPitch,pixDepth,pitch,bytes;\n            char *in,*out;\n                        \n            pix = GetPortPixMap(windowPort);\n            pixPitch = GetPixRowBytes(pix);\n            pixDepth = GetPixDepth(pix);\n            \n\t\t\tif (depth == 1 || depth == 2 || depth == 4) {\n\t\t\t\tdispBitsIndex = copy124BitsTheHardWay((unsigned int *) dispBitsIndex, width, height, depth, pixDepth, affectedL, affectedR, affectedT,  affectedB,  windowIndex, &pitch);\n\t\t\t\tdepth = pixDepth;\n\t\t\t} else {\n\t\t\t\tpitch = bytesPerLine(width, depth);\n\t\t\t}\n \n            bytes= affectedW * (depth / 8);\n            \n            in = (char *)dispBitsIndex + affectedL * (depth / 8) + affectedT * pitch;\n            out = ((char *)GetPixBaseAddr(pix) + ((int)titleH * pixPitch)) +\n                (affectedL * (pixDepth/8)) + (affectedT * pixPitch);\n    \n  \n            if (depth == pixDepth) {  // either 16 or 32 bit 2 or 4 bytes */\n                if (bytes > 32)\n                    while (affectedH--)  {\n                        memcpy((void *)out, (void *)in, bytes);\n                        in  += pitch;\n                        out += pixPitch;\n                    }\n                else if (bytes == 2)  // empirical\n                    while (affectedH--) {\n                        *((short *)out)= *((short *)in);\n                        in  += pitch;\n                        out += pixPitch;\n                    } \n                else if (depth == 16)\n                 while (affectedH--) {\n                        register long   count= bytes/2;\n                        register short   *to=   (short *) out;\n                        register short   *from= (short *) in;\n                        while (count--)\n                            *to++= *from++;\n                        in  += pitch;\n                        out += pixPitch;\n                    } \n                else while (affectedH--) {\n                        register long   count= bytes/4;\n                        register long   *to=   (long *) out;\n                        register long   *from=  (long *)in;\n                        while (count--)\n                            *to++= *from++;\n                        in  += pitch;\n                        out += pixPitch;\n                }\n            } else if ( depth == 16 && pixDepth == 32) {\n\t\t\t\t//(2r0 to: 2r11111000 by: 2r1000) collectWithIndex: [:e :i | (e + ((8/32*(i-1)) asInteger)) bitShift: 16]\n\t\t\t\tlong lookupTableB[32] = { \n\t\t\t\t 0, 8, 16, 24, 33, 41, 49, 57,\n\t\t\t\t 66, 74, 82, 90, 99, 107, 115, 123,\n\t\t\t\t 132, 140, 148, 156, 165, 173, 181, 189,\n\t\t\t\t 198, 206, 214, 222, 231, 239, 247, 255};\n\n\t\t\t\tlong lookupTableG[32] = { \n\t\t\t\t0, 2048, 4096, 6144, 8448, 10496, 12544, 14592, \n\t\t\t\t16896, 18944, 20992, 23040, 25344, 27392, 29440, 31488, \n\t\t\t\t33792, 35840, 37888, 39936, 42240, 44288, 46336, 48384, \n\t\t\t\t50688, 52736, 54784, 56832, 59136, 61184, 63232, 65280};\n\n \t\t\t\tlong lookupTableR[32] = { \n\t\t\t\t0, 524288, 1048576, 1572864, 2162688, 2686976, 3211264, 3735552,\n\t\t\t\t4325376, 4849664, 5373952, 5898240, 6488064, 7012352, 7536640, 8060928,\n\t\t\t\t8650752, 9175040, 9699328, 10223616, 10813440, 11337728, 11862016, 12386304,\n\t\t\t\t12976128, 13500416, 14024704, 14548992, 15138816, 15663104, 16187392, 16711680};\n\t\t\t\t\n                while (affectedH--)  {\n                        register long   *to=    (long *) out;\n                        register short  *from=  (short *) in;\n                        register long   count= bytes/2,target,r,g,b;  \n\n                        while (count--) { /* see '11111'b needs to be '11111111'b */\n                            target = *from++;\n                            r = (target & 0x00007C00) >> 10;\n                            g = (target & 0x000003E0) >> 5;\n                            b = (target & 0x0000001F);\n                            r = lookupTableR[r];\n                            g = lookupTableG[g];\n                            b = lookupTableB[b];\n                            *to++ =   r | g | b ; \n                        }\n                        in  += pitch;\n                        out += pixPitch;\n                }\n            } else if (depth == 32 && pixDepth == 16) {\n                while (affectedH--)  {\n                        register short *to=    (short *) out;\n                        register long  *from=   (long *) in;\n                        register long   count= bytes/4,target;  \n                        while (count--) {\n                            target = *from++;\n                            *to++ = ((target & 0x00F80000) >> 9) |\n                                ((target    &  0x0000F800) >> 6) |\n                                ((target & 0x000000F8) >> 3); \n                        }\n                        in  += pitch;\n                        out += pixPitch;\n                }\n            } else if (depth == 8 && pixDepth == 16) {\n                while (affectedH--)  {\n                        short *to=   (short *)  out;\n                        unsigned char  *from= ( unsigned char *) in;\n                        long   count= bytes;\n                        unsigned short r,g,b;\n                        unsigned long target;\n                        while (count--) {\n                            target = *from++;\n                            r = (short) (*stColorTable)->ctTable[target].rgb.red;  \n                            g = (short) (*stColorTable)->ctTable[target].rgb.green;  \n                            b = (short) (*stColorTable)->ctTable[target].rgb.blue;  \n                            *to++ = ((r>>11) << 10) |\n                                ((g>>11) << 5) |\n                                ((b>>11)); \n                        }\n                        in  += pitch;\n                        out += pixPitch;\n                }\n            }else if (depth == 8 && pixDepth == 32) {\n                while (affectedH--)  {\n                    long *to=   (long *) out;\n                    unsigned char  *from=  (unsigned char *) in;\n                        long   count= bytes;\n                        unsigned short r,g,b;\n                        unsigned long target;\n                        while (count--) {\n                            target = *from++;\n                            r = (short) (*stColorTable)->ctTable[target].rgb.red;  \n                            g = (short) (*stColorTable)->ctTable[target].rgb.green;  \n                            b = (short) (*stColorTable)->ctTable[target].rgb.blue;  \n                            *to++ = ((r>>8) << 16) |\n                                ((g>>8) << 8) |\n                                ((b>>8)); \n                        }\n                        in  += pitch;\n                        out += pixPitch;\n                }\n            } else if (depth == 16 && pixDepth == 8) { //Tested by Steve Moffitt <stevia@citlink.net> not all machines do true 8bit windows, some the GPU does and window stays as 16bits\n                SetPort(windowPort);\n                while (affectedH--)  {\n                    unsigned char   *to=   (unsigned char *) out;\n                    unsigned short  *from=  (unsigned short *) in;\n                    long   count= bytes/2;\n                    unsigned short target;\n                    RGBColor colorPixel;\n            \n                    while (count--) {\n                        target = *from++;\n                        colorPixel.red = (target & 0x7C00) >> 10;\n                        colorPixel.green = (target & 0x03E0) >> 5;\n                        colorPixel.blue = (target & 0x001F);\n                        *to++ = (unsigned char) Color2Index(&colorPixel);\n                    }\n                    in  += pitch;\n                    out += pixPitch;\n                }\n            } else if (depth == 32 && pixDepth == 8) {\n                SetPort(windowPort);\n                while (affectedH--)  {\n                    unsigned char   *to=   (unsigned char *) out;\n                    unsigned short  *from=  (unsigned short *) in;\n                    long   count= bytes/4;\n                    unsigned long target;\n                    RGBColor colorPixel;\n            \n                    while (count--) {\n                        target = *from++;\n                        colorPixel.red = (target & 0x00FF0000) >> 16;\n                        colorPixel.green = (target & 0x0000FF00) >> 8;\n                        colorPixel.blue = (target & 0x000000FF);\n                        *to++ = (unsigned char) Color2Index(&colorPixel);\n                    }\n                    in  += pitch;\n                    out += pixPitch;\n                }\n            }\n\n#if TARGET_API_MAC_CARBON\n\t\t\tReduceQDFlushLoad(windowPort, windowIndex, affectedL,  affectedT,  affectedR,  affectedB);\t\t\n#endif\n        }\n\n\tUnlockPortBits(windowPort);\t\t\t //JMM BEWARE\n\n\tif (gWindowsIsInvisible) {\n\t\tsqShowWindow(1);\n\t\tgWindowsIsInvisible = false;\n\t}\n\treturn 1;\n}\n\nvoid ReduceQDFlushLoad(CGrafPtr\twindowPort, int windowIndexToUse, int affectedL, int affectedT, int affectedR, int affectedB) {\n\tRect rect;\n\twindowDescriptorBlock * validWindowHandle = windowBlockFromIndex(windowIndexToUse);\n\n\t\t\n\trect.top = affectedT;\n\trect.left = affectedL;\n\trect.bottom = affectedB;\n\trect.right = affectedR; \n\n\tif (EmptyRect(&validWindowHandle->dirtyRectangle))\n\t\tvalidWindowHandle->dirtyRectangle = rect;\n\telse\n\t\tUnionRect(&validWindowHandle->dirtyRectangle,&rect,&validWindowHandle->dirtyRectangle);\n\t\t\t\n}\n\n\n#endif \n\nstatic const void *get_byte_pointer(void *bitmap)\n{\n    return (void *) bitmap;\n}\n\nCGDataProviderDirectAccessCallbacks gProviderCallbacks = {\n    get_byte_pointer,\n    NULL,\n    NULL,\n    NULL\n};\n\n\nint ioShowDisplayOnWindow(\n\tunsigned int*  dispBitsIndex, int width, int height, int depth,\n\tint affectedL, int affectedR, int affectedT, int affectedB, int windowIndex) {\n\n\tstatic CGColorSpaceRef colorspace = NULL;\n\tint \t\tpitch;\n\tCGImageRef image;\n\tCGRect\t\tclip;\n\twindowDescriptorBlock *targetWindowBlock;\n\tCGDataProviderRef provider;\n\n\tif (gWindowsIsInvisible) {\n\t\tif (getSTWindow() == NULL) {\n\t\t\tmakeMainWindow();\n\t\t}\n\t\tif (colorspace == NULL) {\n\t\t\t\t// Get the Systems Profile for the main display\n\t\t\tCMProfileRef sysprof = NULL;\n\t\t\tif (CMGetSystemProfile(&sysprof) == noErr) {\n\t\t\t\t// Create a colorspace with the systems profile\n\t\t\t\tcolorspace = CGColorSpaceCreateWithPlatformColorSpace(sysprof);\n\t\t\t\tCMCloseProfile(sysprof);\n\t\t\t} else \n\t\t\t\tcolorspace = CGColorSpaceCreateDeviceRGB();\n\t\t}\n\t}\n\n\tif (affectedL < 0) affectedL = 0;\n\tif (affectedT < 0) affectedT = 0;\n\tif (affectedR > width) affectedR = width;\n\tif (affectedB > height) affectedB = height;\n\t\n\tif ((windowHandleFromIndex(windowIndex) == nil) || ((affectedR - affectedL) <= 0) || ((affectedB - affectedT) <= 0)){\n            return 0;\n\t}\n\n\tif (depth > 0 && depth <= 8) {\n\t\tdispBitsIndex = copy124BitsTheHardWay((unsigned int *) dispBitsIndex, width, height, depth, 32, affectedL, affectedR, affectedT,  affectedB,  windowIndex, &pitch);\n\t\tdepth = 32;\n\t} else {\n\t\tpitch = bytesPerLine(width, depth);\n\t}\n\t\t\t\n\ttargetWindowBlock = windowBlockFromIndex(windowIndex);\t\n\tprovider = CGDataProviderCreateDirectAccess((void*)dispBitsIndex\n\t\t\t\t+ pitch*affectedT \n\t\t\t\t+ affectedL*(depth==32 ? 4 : 2),  \n\t\t\t\tpitch * (affectedB-affectedT)-affectedL*(depth==32 ? 4 : 2), \n\t\t\t\t&gProviderCallbacks);\n\timage = CGImageCreate( affectedR-affectedL, affectedB-affectedT, depth==32 ? 8 : 5 /* bitsPerComponent */,\n\t\t\t\tdepth /* bitsPerPixel */,\n\t\t\t\tpitch, colorspace, kCGImageAlphaNoneSkipFirst, provider, NULL, 0, kCGRenderingIntentDefault);\n\n\tclip = CGRectMake(affectedL,height-affectedB, affectedR-affectedL, affectedB-affectedT);\n\n\tif (gWindowsIsInvisible) {\n\t\tsqShowWindow(1);\n\t\tgWindowsIsInvisible = false;\n\t}\n\n\tif (targetWindowBlock->width != width && targetWindowBlock->height  != height) {\n\t\tif (targetWindowBlock->context) {\n\t\t\tQDEndCGContext(GetWindowPort(targetWindowBlock->handle),&targetWindowBlock->context);\n\t\t\t//CGContextRelease(targetWindowBlock->context);\n\t\t}\n \t\t//CreateCGContextForPort(GetWindowPort(targetWindowBlock->handle),&targetWindowBlock->context); \n\t\tQDBeginCGContext(GetWindowPort(targetWindowBlock->handle),&targetWindowBlock->context); \n\t\ttargetWindowBlock->sync = false;\n\t\t\n\t\ttargetWindowBlock->width = width;\n\t\ttargetWindowBlock->height = height; \n\t}\n\t\n\tif (targetWindowBlock->sync) {\n\t\t\tCGRect\tclip2;\n\t\t\tRect\tportRect;\n\t\t\tint\t\tw,h;\n\t\t\t\n\t\t\tGetPortBounds(GetWindowPort(windowHandleFromIndex(windowIndex)),&portRect);\n            w =  portRect.right -  portRect.left;\n            h =  portRect.bottom - portRect.top;\n\t\t\tclip2 = CGRectMake(0,0, w, h);\n\t\t\tCGContextClipToRect(targetWindowBlock->context, clip2);\n\t}\n\t\t\n\t/* Draw the image to the Core Graphics context */\n\tCGContextDrawImage(targetWindowBlock->context, clip, image);\n\t\n\t{ \n\t\t\textern Boolean gSqueakUIFlushUseHighPercisionClock;\n\t\t\textern\tlong\tgSqueakUIFlushPrimaryDeferNMilliseconds;\n\t\t\t\n\t\t\tint now = (gSqueakUIFlushUseHighPercisionClock ? ioMSecs(): ioLowResMSecs()) - targetWindowBlock->rememberTicker;\n \n\t\tif (((now >= gSqueakUIFlushPrimaryDeferNMilliseconds) || (now < 0))) {\n\t\t\tCGContextFlush(targetWindowBlock->context);\n\t\t\ttargetWindowBlock->dirty = 0;\n\t\t\ttargetWindowBlock->rememberTicker = gSqueakUIFlushUseHighPercisionClock ? ioMSecs(): ioLowResMSecs();\n\t\t} else {\n\t\t\tif (targetWindowBlock->sync)\n\t\t\t\tCGContextSynchronize(targetWindowBlock->context);\n\t\t\ttargetWindowBlock->dirty = 1;\n\t\t}\n\t} \n\t\n\tCGImageRelease(image);\n\tCGDataProviderRelease(provider);\n\t\n\treturn 1;\n}\n\n\nvoid * copy124BitsTheHardWay(unsigned int* dispBitsIndex, int width, int height, int depth, int desiredDepth,\n\tint affectedL, int affectedR, int affectedT, int affectedB, int windowIndex, int *pitch) {\n\t\n\tstatic GWorldPtr offscreenGWorld = nil;\n\tRect structureRect;\n\tQDErr error;\n\tstatic \t\tRgnHandle maskRect = nil;\n\tstatic Rect\tdstRect = { 0, 0, 0, 0 };\n\tstatic Rect\tsrcRect = { 0, 0, 0, 0 };\n\tstatic int\trememberWidth=0,rememberHeight=0,rememberDepth=0,lastWindowIndex=0;\n\t\n\tif (maskRect == nil)\n\t\tmaskRect = NewRgn();            \n \t\t\n\t(*stPixMap)->baseAddr = (void *) dispBitsIndex;\n        \n\tif (!((lastWindowIndex == windowIndex) && (rememberHeight == height) && (rememberWidth == width) && (rememberDepth == depth))) {\n\t\t\tlastWindowIndex = windowIndex;\n\t\t\tGetWindowRegion(windowHandleFromIndex(windowIndex),kWindowContentRgn,maskRect);\n\t\t\tGetRegionBounds(maskRect,&structureRect);\n\t\t\tstructureRect.bottom = structureRect.bottom - structureRect.top;\n\t\t\tstructureRect.right = structureRect.right - structureRect.left;\n\t\t\tstructureRect.top = structureRect.left = 0;\n\t\t\t\n\t\t\tif (offscreenGWorld != nil)\n\t\t\t\tDisposeGWorld(offscreenGWorld);\n\t\t\t\n\t\t\terror\t= NewGWorld (&offscreenGWorld,desiredDepth,&structureRect,0,0,keepLocal);\n\t\t\tLockPixels(GetGWorldPixMap(offscreenGWorld));\n\t\t\t\n            rememberWidth  = dstRect.right = width;\n            rememberHeight = dstRect.bottom = height;\n    \n            srcRect.right = width;\n            srcRect.bottom = height;\n    \n            /* Note: top three bits of rowBytes indicate this is a PixMap, not a BitMap */\n            (*stPixMap)->rowBytes = (((((width * depth) + 31) / 32) * 4) & 0x1FFF) | 0x8000;\n            (*stPixMap)->bounds = srcRect;\n            rememberDepth = (*stPixMap)->pixelSize = depth;\n    \n            if (depth<=8) { /*Duane Maxwell <dmaxwell@exobox.com> fix cmpSize Sept 18,2000 */\n                (*stPixMap)->cmpSize = depth;\n                (*stPixMap)->cmpCount = 1;\n            } else if (depth==16) {\n                (*stPixMap)->cmpSize = 5;\n                (*stPixMap)->cmpCount = 3;\n            } else if (depth==32) {\n                (*stPixMap)->cmpSize = 8;\n                (*stPixMap)->cmpCount = 3;\n            }\n        }\n        \n\t/* create a mask region so that only the affected rectangle is copied */\n\tSetRectRgn(maskRect, affectedL, affectedT, affectedR, affectedB);\n\tCopyBits((BitMap *) *stPixMap,(BitMap *)*GetGWorldPixMap(offscreenGWorld), &srcRect, &dstRect, srcCopy, maskRect);\n\t*pitch = GetPixRowBytes(GetGWorldPixMap(offscreenGWorld));\n\treturn GetPixBaseAddr(GetGWorldPixMap(offscreenGWorld));\n}\n\n#endif\n#endif\n\nvoid SetUpPixmap(void) {\n\tint i, r, g, b;\n\n\tstColorTable = (CTabHandle) NewHandle(sizeof(ColorTable) + (256 * sizeof(ColorSpec)));\n\t(*stColorTable)->ctSeed = GetCTSeed();\n\t(*stColorTable)->ctFlags = 0;\n\t(*stColorTable)->ctSize = 255;\n\n\t/* 1-bit colors (monochrome) */\n\tSetColorEntry(0, 65535, 65535, 65535);\t/* white or transparent */\n\tSetColorEntry(1,     0,     0,     0);\t/* black */\n\n\t/* additional colors for 2-bit color */\n\tSetColorEntry(2, 65535, 65535, 65535);\t/* opaque white */\n\tSetColorEntry(3, 32768, 32768, 32768);\t/* 1/2 gray */\n\n\t/* additional colors for 4-bit color */\n\tSetColorEntry( 4, 65535,     0,     0);\t/* red */\n\tSetColorEntry( 5,     0, 65535,     0);\t/* green */\n\tSetColorEntry( 6,     0,     0, 65535);\t/* blue */\n\tSetColorEntry( 7,     0, 65535, 65535);\t/* cyan */\n\tSetColorEntry( 8, 65535, 65535,     0);\t/* yellow */\n\tSetColorEntry( 9, 65535,     0, 65535);\t/* magenta */\n\tSetColorEntry(10,  8192,  8192,  8192);\t/* 1/8 gray */\n\tSetColorEntry(11, 16384, 16384, 16384);\t/* 2/8 gray */\n\tSetColorEntry(12, 24576, 24576, 24576);\t/* 3/8 gray */\n\tSetColorEntry(13, 40959, 40959, 40959);\t/* 5/8 gray */\n\tSetColorEntry(14, 49151, 49151, 49151);\t/* 6/8 gray */\n\tSetColorEntry(15, 57343, 57343, 57343);\t/* 7/8 gray */\n\n\t/* additional colors for 8-bit color */\n\t/* 24 more shades of gray (does not repeat 1/8th increments) */\n\tSetColorEntry(16,  2048,  2048,  2048);\t/*  1/32 gray */\n\tSetColorEntry(17,  4096,  4096,  4096);\t/*  2/32 gray */\n\tSetColorEntry(18,  6144,  6144,  6144);\t/*  3/32 gray */\n\tSetColorEntry(19, 10240, 10240, 10240);\t/*  5/32 gray */\n\tSetColorEntry(20, 12288, 12288, 12288);\t/*  6/32 gray */\n\tSetColorEntry(21, 14336, 14336, 14336);\t/*  7/32 gray */\n\tSetColorEntry(22, 18432, 18432, 18432);\t/*  9/32 gray */\n\tSetColorEntry(23, 20480, 20480, 20480);\t/* 10/32 gray */\n\tSetColorEntry(24, 22528, 22528, 22528);\t/* 11/32 gray */\n\tSetColorEntry(25, 26624, 26624, 26624);\t/* 13/32 gray */\n\tSetColorEntry(26, 28672, 28672, 28672);\t/* 14/32 gray */\n\tSetColorEntry(27, 30720, 30720, 30720);\t/* 15/32 gray */\n\tSetColorEntry(28, 34815, 34815, 34815);\t/* 17/32 gray */\n\tSetColorEntry(29, 36863, 36863, 36863);\t/* 18/32 gray */\n\tSetColorEntry(30, 38911, 38911, 38911);\t/* 19/32 gray */\n\tSetColorEntry(31, 43007, 43007, 43007);\t/* 21/32 gray */\n\tSetColorEntry(32, 45055, 45055, 45055);\t/* 22/32 gray */\n\tSetColorEntry(33, 47103, 47103, 47103);\t/* 23/32 gray */\n\tSetColorEntry(34, 51199, 51199, 51199);\t/* 25/32 gray */\n\tSetColorEntry(35, 53247, 53247, 53247);\t/* 26/32 gray */\n\tSetColorEntry(36, 55295, 55295, 55295);\t/* 27/32 gray */\n\tSetColorEntry(37, 59391, 59391, 59391);\t/* 29/32 gray */\n\tSetColorEntry(38, 61439, 61439, 61439);\t/* 30/32 gray */\n\tSetColorEntry(39, 63487, 63487, 63487);\t/* 31/32 gray */\n\n\t/* The remainder of color table defines a color cube with six steps\n\t   for each primary color. Note that the corners of this cube repeat\n\t   previous colors, but simplifies the mapping between RGB colors and\n\t   color map indices. This color cube spans indices 40 through 255.\n\t*/\n\tfor (r = 0; r < 6; r++) {\n\t\tfor (g = 0; g < 6; g++) {\n\t\t\tfor (b = 0; b < 6; b++) {\n\t\t\t\ti = 40 + ((36 * r) + (6 * b) + g);\n\t\t\t\tif (i > 255) error(\"index out of range in color table compuation\");\n\t\t\t\tSetColorEntry(i, (r * 65535) / 5, (g * 65535) / 5, (b * 65535) / 5);\n\t\t\t}\n\t\t}\n\t}\n\n\tstPixMap = NewPixMap();\n\t(*stPixMap)->pixelType = 0; /* chunky */\n\t(*stPixMap)->cmpCount = 1;\n        DisposeCTable((*stPixMap)->pmTable);\n\t(*stPixMap)->pmTable = stColorTable;\n}\n\nvoid SetColorEntry(int index, int red, int green, int blue) {\n\t(*stColorTable)->ctTable[index].value = index;\n\t(*stColorTable)->ctTable[index].rgb.red = red;\n\t(*stColorTable)->ctTable[index].rgb.green = green;\n\t(*stColorTable)->ctTable[index].rgb.blue = blue;\n}\n\nvoid FreePixmap(void) {\n\tif (stPixMap != nil) {\n\t\tDisposePixMap(stPixMap);\n\t\tstPixMap = nil;\n\t}\n\n\tif (stColorTable != nil) {\n\t\t//JMM disposepixmap does this DisposeHandle((void *) stColorTable);\n\t\tstColorTable = nil;\n\t}\n}\n\nextern Boolean gSqueakWindowHasTitle;\nextern int SetUpCarbonEventForWindowIndex(int index);\nint makeMainWindow(void) {\n\tWindowPtr window;\n\tchar\tshortImageName[256];\n\tint width,height;\n\twindowDescriptorBlock *windowBlock;\n\textern UInt32 gSqueakWindowType,gSqueakWindowAttributes;\n\t\t\n\t/* get old window size */\n\twidth  = (unsigned) getSavedWindowSize() >> 16;\n\theight = getSavedWindowSize() & 0xFFFF;\n\t\n\t\n\twindow = SetUpWindow(44, 8, 44+height, 8+width,gSqueakWindowType,gSqueakWindowAttributes);\n\twindowBlock = AddWindowBlock();\n\twindowBlock-> handle = (wHandleType) window;\n\n#ifndef MINIMALVM\n\t ioLoadFunctionFrom(NULL, \"DropPlugin\");\n#endif\n    \n#ifndef IHAVENOHEAD\n\tif (gSqueakWindowHasTitle) {\n\t\tgetShortImageNameWithEncoding(shortImageName,gCurrentVMEncoding);\n\t\tSetWindowTitle(1,shortImageName);\n\t}\n#ifndef BROWSERPLUGIN\n#if I_AM_CARBON_EVENT\t\n        ioSetFullScreenActual(getFullScreenFlag());\n\t\tSetUpCarbonEventForWindowIndex(1);\n\t\tCreateCGContextForPort(GetWindowPort(windowBlock->handle),&windowBlock->context);  \n   \n \tRect portRect;\n\tint\tw,h;\n\t\n\t\tGetPortBounds(GetWindowPort(windowBlock->handle),&portRect);\n\t\tw =  portRect.right -  portRect.left;\n\t\th =  portRect.bottom - portRect.top;\n\t\tsetSavedWindowSize((w << 16) |(h & 0xFFFF));\n\t\twindowBlock->width = w;\n\t\twindowBlock->height = h; \n#else\n\tioSetFullScreen(getFullScreenFlag());\n#endif\n#endif \n#endif\n\n\t//SetupSurface(1);\n\treturn (int) window;\n}\n\n\nWindowPtr SetUpWindow(int t,int l,int b, int r, UInt32 windowType, UInt32 windowAttributes) {\n\tRect windowBounds;\n\tWindowPtr   createdWindow;\n\t\n\tSetRect (&windowBounds,l,t,r,b);\n\n#ifndef IHAVENOHEAD\n#if TARGET_API_MAC_CARBON & !defined(__MWERKS__)\n\n    if ((Ptr)CreateNewWindow != (Ptr)kUnresolvedCFragSymbolAddress) {\n\t\tCreateNewWindow(windowType,windowAttributes,&windowBounds,&createdWindow);\n    } else\n#endif\n\tcreatedWindow = NewCWindow(\n\t\t0L, &windowBounds,\n\t\t\"\\p\",\n\t\tfalse, windowType, (WindowPtr) -1L, windowAttributes, 0);\n#endif\n\treturn createdWindow;\n}\n\nvoid SetWindowTitle(int windowIndex,char *title) {\n    Str255 tempTitle;\n\tCopyCStringToPascal(title,tempTitle);\n#ifndef IHAVENOHEAD\n\tif (windowHandleFromIndex(windowIndex))\n\tSetWTitle(windowHandleFromIndex(windowIndex), tempTitle);\n#endif\n}\n\nint ioForceDisplayUpdate(void) {\n\t/* do nothing on a Mac */\n\treturn 0;\n}\n\nint ioHasDisplayDepth(int depth) {\n\t/* Return true if this platform supports the given color display depth. */\n\n\tswitch (depth) {\n\tcase 1:\n\tcase 2:\n\tcase 4:\n//            return false;  //OS-X 10.3.0/1 bug in copybits, force silly manual move\n//            break;\n\tcase 8:\n\tcase 16:\n\tcase 32:\n\t\treturn true;\n\t}\n\treturn false;\n}\n\nint ioScreenDepth(void) {\n    GDHandle mainDevice;\n    \n\tmainDevice = getThatDominateGDevice(getSTWindow());\n    if (mainDevice == null) \n        return 8;\n    \n    return (*(*mainDevice)->gdPMap)->pixelSize;\n}\n\n#ifndef BROWSERPLUGIN\nint ioScreenSize(void) {\n\tint w, h;\n    Rect portRect;\n    \n\tw  = (unsigned) getSavedWindowSize() >> 16;\n\th= getSavedWindowSize() & 0xFFFF;\n\n#ifndef IHAVENOHEAD\n\tif (getSTWindow() == NULL && gWindowsIsInvisible) {\n\t\tmakeMainWindow();\n\t}\n\n\tif (getSTWindow() != nil) {\n            GetPortBounds(GetWindowPort(getSTWindow()),&portRect);\n            w =  portRect.right -  portRect.left;\n            h =  portRect.bottom - portRect.top;\n\t}\n#endif\n\treturn (w << 16) | (h & 0xFFFF);  /* w is high 16 bits; h is low 16 bits */\n}\n#endif\n\nint ioSetCursorARGB(sqInt bitsIndex, sqInt w, sqInt h, sqInt x, sqInt y) {\n  return 0;\n}\n\nint ioSetCursor(int cursorBitsIndex, int offsetX, int offsetY) {\n\t/* Old version; forward to new version. */\n\tioSetCursorWithMask(cursorBitsIndex, nil, offsetX, offsetY);\n\treturn 0;\n}\n\nint ioSetCursorWithMask(int cursorBitsIndex, int cursorMaskIndex, int offsetX, int offsetY) {\n\t/* Set the 16x16 cursor bitmap. If cursorMaskIndex is nil, then make the mask the same as\n\t   the cursor bitmap. If not, then mask and cursor bits combined determine how cursor is\n\t   displayed:\n\t\t\tmask\tcursor\teffect\n\t\t\t 0\t\t  0\t\ttransparent (underlying pixel shows through)\n\t\t\t 1\t\t  1\t\topaque black\n\t\t\t 1\t\t  0\t\topaque white\n\t\t\t 0\t\t  1\t\tinvert the underlying pixel\n\t*/\n\tCursor macCursor;\n\tint i;\n\n\tif (cursorMaskIndex == nil) {\n\t\tfor (i = 0; i < 16; i++) {\n\t\t\tmacCursor.data[i] = (checkedLongAt(cursorBitsIndex + (4 * i)) >> 16) & 0xFFFF;\n\t\t\tmacCursor.mask[i] = (checkedLongAt(cursorBitsIndex + (4 * i)) >> 16) & 0xFFFF;\n\t\t}\n\t} else {\n\t\tfor (i = 0; i < 16; i++) {\n\t\t\tmacCursor.data[i] = (checkedLongAt(cursorBitsIndex + (4 * i)) >> 16) & 0xFFFF;\n\t\t\tmacCursor.mask[i] = (checkedLongAt(cursorMaskIndex + (4 * i)) >> 16) & 0xFFFF;\n\t\t}\n\t}\n\n\t/* Squeak hotspot offsets are negative; Mac's are positive */\n\tmacCursor.hotSpot.h = -offsetX;\n\tmacCursor.hotSpot.v = -offsetY;\n\tSetCursor(&macCursor);\n\treturn 0;\n}\n\n// requestFlags bit values in VideoRequestRec (example use: 1<<kAbsoluteRequestBit)\nenum {\n\tkBitDepthPriorityBit\t\t= 0,\t// Bit depth setting has priority over resolution\n\tkAbsoluteRequestBit\t\t\t= 1,\t// Available setting must match request\n\tkShallowDepthBit\t\t\t= 2,\t// Match bit depth less than or equal to request\n\tkMaximizeResBit\t\t\t\t= 3,\t// Match screen resolution greater than or equal to request\n\tkAllValidModesBit\t\t\t= 4\t\t// Match display with valid timing modes (may include modes which are not marked as safe)\n};\n\n// availFlags bit values in VideoRequestRec (example use: 1<<kModeValidNotSafeBit)\nenum {\n\tkModeValidNotSafeBit\t\t= 0\t\t//  Available timing mode is valid but not safe (requires user confirmation of switch)\n};\n\n// video request structure\nstruct VideoRequestRec\t{\n\tGDHandle\t\tscreenDevice;\t\t// <in/out>\tnil will force search of best device, otherwise search this device only\n\tshort\t\t\treqBitDepth;\t\t// <in>\t\trequested bit depth\n\tshort\t\t\tavailBitDepth;\t\t// <out>\tavailable bit depth\n\tunsigned long\treqHorizontal;\t\t// <in>\t\trequested horizontal resolution\n\tunsigned long\treqVertical;\t\t// <in>\t\trequested vertical resolution\n\tunsigned long\tavailHorizontal;\t// <out>\tavailable horizontal resolution\n\tunsigned long\tavailVertical;\t\t// <out>\tavailable vertical resolution\n\tunsigned long\trequestFlags;\t\t// <in>\t\trequest flags\n\tunsigned long\tavailFlags;\t\t\t// <out>\tavailable mode flags\n\tunsigned long\tdisplayMode;\t\t// <out>\tmode used to set the screen resolution\n\tunsigned long\tdepthMode;\t\t\t// <out>\tmode used to set the depth\n\tVDSwitchInfoRec\tswitchInfo;\t\t\t// <out>\tDM2.0 uses this rather than displayMode/depthMode combo\n};\ntypedef struct VideoRequestRec VideoRequestRec;\ntypedef struct VideoRequestRec *VideoRequestRecPtr;\n\nstruct DepthInfo {\n\tVDSwitchInfoRec\t\t\tdepthSwitchInfo;\t\t\t// This is the switch mode to choose this timing/depth\n\tVPBlock\t\t\t\t\tdepthVPBlock;\t\t\t\t// VPBlock (including size, depth and format)\n};\ntypedef struct DepthInfo DepthInfo;\n\nstruct ListIteratorDataRec {\n\tVDTimingInfoRec\t\t\tdisplayModeTimingInfo;\t\t// Contains timing flags and such\n\tunsigned long\t\t\tdepthBlockCount;\t\t\t// How many depths available for a particular timing\n\tDepthInfo\t\t\t\t*depthBlocks;\t\t\t\t// Array of DepthInfo\n};\ntypedef struct ListIteratorDataRec ListIteratorDataRec;\nvoid GetRequestTheDM2Way (\t\tVideoRequestRecPtr requestRecPtr,\n\t\t\t\t\t\t\t\tGDHandle walkDevice,\n\t\t\t\t\t\t\t\tDMDisplayModeListIteratorUPP myModeIteratorProc,\n\t\t\t\t\t\t\t\tDMListIndexType theDisplayModeCount,\n\t\t\t\t\t\t\t\tDMListType *theDisplayModeList);\n\npascal void ModeListIterator (\tvoid *userData,\n\t\t\t\t\t\t\t\tDMListIndexType itemIndex,\n\t\t\t\t\t\t\t\tDMDisplayModeListEntryPtr displaymodeInfo);\n\nBoolean FindBestMatch (\t\t\tVideoRequestRecPtr requestRecPtr,\n\t\t\t\t\t\t\t\tshort bitDepth,\n\t\t\t\t\t\t\t\tunsigned long horizontal,\n\t\t\t\t\t\t\t\tunsigned long vertical);\n\n\nint ioSetDisplayMode(int width, int height, int depth, int fullscreenFlag) {\n\t/* Set the window to the given width, height, and color depth. Put the window\n\t   into the full screen mode specified by fullscreenFlag. */\n\t\n\n    GDHandle\t\tdominantGDevice;\n\tHandle\t\t\tdisplayState;\n\tUInt32\t\t\tdepthMode=depth;\n\tlong\t\t\tvalue = 0,displayMgrPresent;\n\tDMDisplayModeListIteratorUPP\tmyModeIteratorProc = nil;\t\n\tDisplayIDType\ttheDisplayID;\t\t\t\t\n\tDMListIndexType\ttheDisplayModeCount;\t\t\n\tDMListType\t\ttheDisplayModeList;\t\t\t\n\tVideoRequestRec\trequest;\n\t\n#ifndef IHAVENOHEAD\n\n\n\tGestalt(gestaltDisplayMgrAttr,&value);\n\tdisplayMgrPresent=value&(1<<gestaltDisplayMgrPresent);\n    if (!displayMgrPresent) {\n    \tsuccess(false);\n    \treturn 0;\n    }\n\n\tdominantGDevice = getThatDominateGDevice(getSTWindow());\n        if (dominantGDevice == null) {\n            success(false);\n            return 0;\n        }\n\trequest.screenDevice  = dominantGDevice;\n\trequest.reqBitDepth = depth;\n\trequest.reqHorizontal = width;\n\trequest.reqVertical = height;\n\trequest.requestFlags = 1<<kAbsoluteRequestBit;\n\trequest.displayMode = 0;\n\tmyModeIteratorProc = NewDMDisplayModeListIteratorUPP(ModeListIterator);\t// for DM2.0 searches\n\n\tif  (dominantGDevice && myModeIteratorProc) {\n\t\tif( noErr == DMGetDisplayIDByGDevice( dominantGDevice, &theDisplayID, false ) ) {\n\t\t\ttheDisplayModeCount = 0;\n\t\t\tif (noErr == DMNewDisplayModeList(theDisplayID, 0, 0, &theDisplayModeCount, &theDisplayModeList) ) {\n\t\t\t\tGetRequestTheDM2Way (&request, dominantGDevice, myModeIteratorProc, theDisplayModeCount, &theDisplayModeList);\n\t\t\t\tDMDisposeList(theDisplayModeList);\t\n\t\t\t} else {\n\t\t\t}\n\t\t}\n\t}\n\t\n\tif (myModeIteratorProc)\n\t\tDisposeDMDisplayModeListIteratorUPP(myModeIteratorProc);\n\tif (request.displayMode == 0)  {\n    \tsuccess(false);\n    \treturn 0;\n    }\n\tDMBeginConfigureDisplays(&displayState);\n\tDMSetDisplayMode(dominantGDevice,request.displayMode,&depthMode,null,displayState);\n\tDMEndConfigureDisplays(displayState);\n\tioSetFullScreen(fullscreenFlag);\n\t\n    return 1;\n#endif\n}\n\nGDHandle\tgetThatDominateGDevice(WindowPtr window) {\n\tGDHandle\t\tdominantGDevice=NULL;\n#if TARGET_API_MAC_CARBON\n\tGetWindowGreatestAreaDevice((WindowRef) window,kWindowContentRgn,&dominantGDevice,NULL); \n#else\n        dominantGDevice = getDominateDevice((WindowRef) window,&ignore);\n#endif\n\t\n\treturn dominantGDevice;\n}\n\n\n#if !I_AM_CARBON_EVENT || defined(BROWSERPLUGIN)\n#define rectWidth(aRect) ((aRect).right - (aRect).left)\n#define rectHeight(aRect) ((aRect).bottom - (aRect).top)\n#define MinWindowWidth(foo) 72*3\n#define MinWindowHeight(foo) 72*3\n\n#define max(X, Y) ( ((X)>(Y)) ? (X) : (Y) )\n#define min(X, Y) (  ((X)>(Y)) ? (Y) : (X) )\n\n#define pin(VALUE, MIN, MAX) ( ((VALUE) < (MIN)) ? (MIN) : ( ((VALUE) > (MAX)) ? (MAX) : (VALUE) ) )\n\nvoid DoZoomWindow (EventRecord* theEvent, WindowPtr theWindow, short zoomDir, short hMax, short vMax)\n{\n\n\tRect\t\t\t\tzoomRect,windRect,globalPortRect, dGDRect;\n\tGDHandle\t\t\tdominantGDevice;\n   \n\tif (TrackBox(theWindow, theEvent->where, zoomDir)) {\n\t\tSetPortWindowPort(theWindow);\n\t\tGetPortBounds(GetWindowPort(theWindow),&windRect);\n\t\tEraseRect(&windRect);\t// recommended for cosmetic reasons\n\n\t\tif (zoomDir == inZoomOut) {\n\n\t\t\t/*\n\t\t\t *\tZoomWindow() is a good basic tool, but it doesn't do everything necessary to\n\t\t\t *\timplement a good human interface when zooming. In fact it's not even close for\n\t\t\t *\tmore high-end hardware configurations. We must help it along by calculating an\n\t\t\t *\tappropriate window size and location any time a window zooms out.\n\t\t\t */\n\n            dominantGDevice = getDominateDevice(theWindow,&windRect);\n            if (dominantGDevice == null) {\n                return;\n            }\n\n\t\t\t/*\n\t\t\t *\tAt this point, we know the dimensions of the window we're zooming, and we know\n\t\t\t *\twhat screen we're going to put it on. To be more specific, however, we need a\n\t\t\t *\trectangle which defines the maximum dimensions of the resized window's contents.\n\t\t\t *\tThis rectangle accounts for the thickness of the window frame, the menu bar, and\n\t\t\t *\tone or two pixels around the edges for cosmetic compatibility with ZoomWindow().\n\t\t\t */\n\n            getDominateGDeviceRect(dominantGDevice,&dGDRect,false);\n            \n\t\t\tGetPortBounds(GetWindowPort(theWindow),&globalPortRect);\n\t\t\tLocalToGlobal(&(((Point *) &(globalPortRect))[0]));\t\t// calculate the window's portRect\n\t\t\tLocalToGlobal(&(((Point *) &(globalPortRect))[1]));\t\t// in global coordinates\n\n\t\t\t// account for the window frame and inset it a few pixels\n\t\t\tdGDRect.left\t+= 2 + globalPortRect.left - windRect.left;\n\t\t\tdGDRect.top\t\t+= 2 + globalPortRect.top - windRect.top;\n\t\t\tdGDRect.right\t-= 1 + windRect.right - globalPortRect.right;\n\t\t\tdGDRect.bottom\t-= 1 + windRect.bottom - globalPortRect.bottom;\n\n\t\t\t/*\n\t\t\t *\tNow we know exactly what our limits are, and since there are input parameters\n\t\t\t *\tspecifying the dimensions we'd like to see, we can move and resize the zoom\n\t\t\t *\tstate rectangle for the best possible results. We have three goals in this:\n\t\t\t *\t1. Display the window entirely visible on a single device.\n\t\t\t *\t2. Resize the window to best represent the dimensions of the document itself.\n\t\t\t *\t3. Move the window as short a distance as possible to achieve #1 and #2.\n\t\t\t */\n\n\t\t\tGetWindowStandardState(theWindow, &zoomRect);\n\n\t\t\t/*\n\t\t\t *\tInitially set the zoom rectangle to the size requested by the input parameters,\n\t\t\t *\talthough not smaller than a minimum size. We do this without moving the origin.\n\t\t\t */\n\n\t\t\tzoomRect.right = (zoomRect.left = globalPortRect.left) +\n\t\t\t\t\t\t\t\t\tmax(hMax, MinWindowWidth(theWindow));\n\t\t\tzoomRect.bottom = (zoomRect.top = globalPortRect.top) +\n\t\t\t\t\t\t\t\t\tmax(vMax, MinWindowHeight(theWindow));\n\n\t\t\t// Shift the entire rectangle if necessary to bring its origin inside dGDRect.\n\t\t\tOffsetRect(&zoomRect,\n\t\t\t\t\t\tmax(dGDRect.left - zoomRect.left, 0),\n\t\t\t\t\t\tmax(dGDRect.top - zoomRect.top, 0));\n\n\t\t\t/*\n\t\t\t *\tShift the rectangle up and/or to the left if necessary to accomodate the view,\n\t\t\t *\tand if it is possible to do so. The rectangle may not be moved such that its\n\t\t\t *\torigin would fall outside of dGDRect.\n\t\t\t */\n\n\t\t\tOffsetRect(&zoomRect,\n\t\t\t\t\t\t-pin(zoomRect.right - dGDRect.right, 0, zoomRect.left - dGDRect.left),\n\t\t\t\t\t\t-pin(zoomRect.bottom - dGDRect.bottom, 0, zoomRect.top - dGDRect.top));\n\n\t\t\t// Clip expansion to dGDRect, in case view is larger than dGDRect.\n\t\t\tzoomRect.right = min(zoomRect.right, dGDRect.right);\n\t\t\tzoomRect.bottom = min(zoomRect.bottom, dGDRect.bottom);\n\t\t\tSetWindowStandardState(theWindow, &zoomRect);\n\t\t}\n\n\t\tZoomWindow(theWindow, zoomDir, false);\t\t// all it needed was a brain transplant\n\t}\n}\n\nGDHandle getDominateDevice( WindowPtr theWindow,Rect *windRect) {\n\tGDHandle\t\t\tnthDevice, dominantGDevice;\n\tlong\t\t\t\tsectArea, greatestArea;\n    long                quickDrawAttributes;\n\tRect\t\t\t\ttheSect;\n \n    \n#if TARGET_API_MAC_CARBON\n    RgnHandle           windowRegion;\n\t\t\twindowRegion = NewRgn();\n\t\t\tGetWindowRegion(theWindow,kWindowStructureRgn,windowRegion);\n\t\t\tGetRegionBounds(windowRegion,windRect);\n#else\n\t\t\t*windRect = (**((WindowPeek) theWindow)->strucRgn).rgnBBox;\n\t\t\tif (windRect->left == 0 && windRect->top == 0 && windRect->bottom == 0 && windRect->right == 0) {\n\t\t\t\twindRect->right = (unsigned) getSavedWindowSize() >> 16;\n\t\t\t\twindRect->bottom = getSavedWindowSize() & 0xFFFF;\n\n\t\t\t}\n#endif\n\t\t\tdominantGDevice = nil;\n    \t    if (! Gestalt(gestaltQuickdrawFeatures, &quickDrawAttributes) && \n    \t        (quickDrawAttributes & (1<<gestaltHasColor))) {\n\n\t\t\t\t/*\n\t\t\t\t *\tColor QuickDraw implies the possibility of multiple monitors. This is where\n\t\t\t\t *\tzooming becomes more interesting. One should zoom onto the monitor containing\n\t\t\t\t *\tthe greatest portion of the window. This requires walking the gDevice list.\n\t\t\t\t */\n\n\t\t\t\tnthDevice = GetDeviceList();\n\t\t\t\tgreatestArea = 0;\n\t\t\t\twhile (nthDevice != nil) {\n\t\t\t\t\tif (TestDeviceAttribute(nthDevice, screenDevice)) {\n\t\t\t\t\t\tif (TestDeviceAttribute(nthDevice, screenActive)) {\n\t\t\t\t\t\t\tSectRect(windRect, &(**nthDevice).gdRect, &theSect);\n\t\t\t\t\t\t\tsectArea = (long) rectWidth(theSect) * (long) rectHeight(theSect);\n\t\t\t\t\t\t\tif (sectArea > greatestArea) {\n\t\t\t\t\t\t\t\tgreatestArea = sectArea;\t\t// save the greatest intersection\n\t\t\t\t\t\t\t\tdominantGDevice = nthDevice;\t// and which device it belongs to\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tnthDevice = GetNextDevice(nthDevice);\n\t\t\t\t}\n\t\t\t}\n    return dominantGDevice;\n}\n\nvoid getDominateGDeviceRect(GDHandle dominantGDevice,Rect *dGDRect,Boolean forgetMenuBar) {\n    BitMap              bmap;\n\n\tif (dominantGDevice != nil) {\n\t\t\t*dGDRect = (**dominantGDevice).gdRect;\n\t\t\tif (dominantGDevice == GetMainDevice())\t\t// account for menu bar on main device\n\t\t\t\tif (!forgetMenuBar) \n\t\t\t\t        dGDRect->top += GetMBarHeight();\n\t\t}\n\t\telse {\n\t\t\tGetQDGlobalsScreenBits(&bmap);\n\t\t\t*dGDRect = bmap.bounds;\t\t\t\t// if no gDevice, use default monitor\n\t\t\tif (!forgetMenuBar)\n\t\t\t    dGDRect->top += GetMBarHeight();\n\t\t}\n}\n#endif\n\n/*#\tMacOS Sample Code\n#\t\n#\tWritten by: Eric Anderson\n#\t email: eric3@apple.com\n#\n#\tDisplay Manager sample code\n#\tRequestVideo demonstrates the usage of the Display Manager introduced\n#\twith the PowerMacs and integrated into the system under System 7.5. With\n#\tthe RequestVideo sample code library, developers will be able to explore\n#\tthe Display Manager API by changing bit depth and screen resolution on\n#\tmultisync displays on built-in, NuBus, and PCI based video. Display Manager 1.0\n#\tis built into the Systems included with the first PowerMacs up through System 7.5.\n#\tDisplay Manager 2.0 is included with the release of the new PCI based PowerMacs,\n#\tand will be included in post 7.5 System Software releases. \n*/\n\npascal void ModeListIterator(void *userData, DMListIndexType itemIndex, DMDisplayModeListEntryPtr displaymodeInfo)\n{\n\tunsigned long\t\t\tdepthCount;\n\tshort\t\t\t\t\tiCount;\n\tListIteratorDataRec\t\t*myIterateData\t\t= (ListIteratorDataRec*) userData;\n\tDepthInfo\t\t\t\t*myDepthInfo;\n\t\n\t// set user data in a round about way\n\tmyIterateData->displayModeTimingInfo\t\t= *displaymodeInfo->displayModeTimingInfo;\n\t\n\t// now get the DMDepthInfo info into memory we own\n\tdepthCount = displaymodeInfo->displayModeDepthBlockInfo->depthBlockCount;\n\tmyDepthInfo = (DepthInfo*)NewPtrClear(depthCount * sizeof(DepthInfo));\n\n\t// set the info for the caller\n\tmyIterateData->depthBlockCount = depthCount;\n\tmyIterateData->depthBlocks = myDepthInfo;\n\n\t// and fill out all the entries\n\tif (depthCount) for (iCount=0; iCount < depthCount; iCount++)\n\t{\n\t\tmyDepthInfo[iCount].depthSwitchInfo = \n\t\t\t*displaymodeInfo->displayModeDepthBlockInfo->depthVPBlock[iCount].depthSwitchInfo;\n\t\tmyDepthInfo[iCount].depthVPBlock = \n\t\t\t*displaymodeInfo->displayModeDepthBlockInfo->depthVPBlock[iCount].depthVPBlock;\n\t}\n}\n\nvoid GetRequestTheDM2Way (\tVideoRequestRecPtr requestRecPtr,\n\t\t\t\t\t\t\tGDHandle walkDevice,\n\t\t\t\t\t\t\tDMDisplayModeListIteratorUPP myModeIteratorProc,\n\t\t\t\t\t\t\tDMListIndexType theDisplayModeCount,\n\t\t\t\t\t\t\tDMListType *theDisplayModeList)\n{\n\tshort\t\t\t\t\tjCount;\n\tshort\t\t\t\t\tkCount;\n\tListIteratorDataRec\t\tsearchData;\n\n\tsearchData.depthBlocks = nil;\n\t// get the mode lists for this GDevice\n\tfor (jCount=0; jCount<theDisplayModeCount; jCount++)\t\t// get info on all the resolution timings\n\t{\n\t\tDMGetIndexedDisplayModeFromList(*theDisplayModeList, jCount, 0, myModeIteratorProc, &searchData);\n\t\t\n\t\t// for all the depths for this resolution timing (mode)...\n\t\tif (searchData.depthBlockCount) for (kCount = 0; kCount < searchData.depthBlockCount; kCount++)\n\t\t{\n\t\t\t// only if the mode is valid and is safe or we override it with the kAllValidModesBit request flag\n\t\t\tif\t(\tsearchData.displayModeTimingInfo.csTimingFlags & 1<<kModeValid && \n\t\t\t\t\t(\tsearchData.displayModeTimingInfo.csTimingFlags & 1<<kModeSafe ||\n\t\t\t\t\t\trequestRecPtr->requestFlags & 1<<kAllValidModesBit\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t{\n\t\t\t\tif (FindBestMatch (\trequestRecPtr,\n\t\t\t\t\t\t\t\t\tsearchData.depthBlocks[kCount].depthVPBlock.vpPixelSize,\n\t\t\t\t\t\t\t\t\tsearchData.depthBlocks[kCount].depthVPBlock.vpBounds.right,\n\t\t\t\t\t\t\t\t\tsearchData.depthBlocks[kCount].depthVPBlock.vpBounds.bottom))\n\t\t\t\t{\n\t\t\t\t\trequestRecPtr->screenDevice = walkDevice;\n\t\t\t\t\trequestRecPtr->availBitDepth = searchData.depthBlocks[kCount].depthVPBlock.vpPixelSize;\n\t\t\t\t\trequestRecPtr->availHorizontal = searchData.depthBlocks[kCount].depthVPBlock.vpBounds.right;\n\t\t\t\t\trequestRecPtr->availVertical = searchData.depthBlocks[kCount].depthVPBlock.vpBounds.bottom;\n\t\t\t\t\t\n\t\t\t\t\t// now set the important info for DM to set the display\n\t\t\t\t\trequestRecPtr->depthMode = searchData.depthBlocks[kCount].depthSwitchInfo.csMode;\n\t\t\t\t\trequestRecPtr->displayMode = searchData.depthBlocks[kCount].depthSwitchInfo.csData;\n\t\t\t\t\trequestRecPtr->switchInfo = searchData.depthBlocks[kCount].depthSwitchInfo;\n\t\t\t\t\tif (searchData.displayModeTimingInfo.csTimingFlags & 1<<kModeSafe)\n\t\t\t\t\t\trequestRecPtr->availFlags = 0;\t\t\t\t\t\t\t// mode safe\n\t\t\t\t\telse requestRecPtr->availFlags = 1<<kModeValidNotSafeBit;\t// mode valid but not safe, requires user validation of mode switch\n\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\n\t\tif (searchData.depthBlocks)\n\t\t{\n\t\t\tDisposePtr ((Ptr)searchData.depthBlocks);\t// toss for this timing mode of this gdevice\n\t\t\tsearchData.depthBlocks = nil;\t\t\t\t// init it just so we know\n\t\t}\n\t}\n}\n\nBoolean FindBestMatch (VideoRequestRecPtr requestRecPtr, short bitDepth, unsigned long horizontal, unsigned long vertical)\n{\n\t//  do the big comparison \n\t// first time only if\t(no mode yet) and\n\t//\t\t\t\t\t\t(bounds are greater/equal or kMaximizeRes not set) and\n\t//\t\t\t\t\t\t(depth is less/equal or kShallowDepth not set) and\n\t//\t\t\t\t\t\t(request match or kAbsoluteRequest not set)\n\tif\t(\tnil == requestRecPtr->displayMode\n\t\t\t&&\n\t\t\t(\t(horizontal >= requestRecPtr->reqHorizontal &&\n\t\t\t\tvertical >= requestRecPtr->reqVertical)\n\t\t\t\t||\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t!(requestRecPtr->requestFlags & 1<<kMaximizeResBit)\t\n\t\t\t)\n\t\t\t&&\n\t\t\t(\tbitDepth <= requestRecPtr->reqBitDepth ||\t\n\t\t\t\t!(requestRecPtr->requestFlags & 1<<kShallowDepthBit)\t\t\n\t\t\t)\n\t\t\t&&\n\t\t\t(\t(horizontal == requestRecPtr->reqHorizontal &&\t\n\t\t\t\tvertical == requestRecPtr->reqVertical &&\n\t\t\t\tbitDepth == requestRecPtr->reqBitDepth)\n\t\t\t\t||\n\t\t\t\t!(requestRecPtr->requestFlags & 1<<kAbsoluteRequestBit)\t\n\t\t\t)\n\t\t)\n\t\t{\n\t\t\t// go ahead and set the new values\n\t\t\treturn (true);\n\t\t}\n\telse\t// can we do better than last time?\n\t{\n\t\t// if\t(kBitDepthPriority set and avail not equal req) and\n\t\t//\t\t((depth is greater avail and depth is less/equal req) or kShallowDepth not set) and\n\t\t//\t\t(avail depth less reqested and new greater avail)\n\t\t//\t\t(request match or kAbsoluteRequest not set)\n\t\tif\t(\t(\trequestRecPtr->requestFlags & 1<<kBitDepthPriorityBit && \n\t\t\t\t\trequestRecPtr->availBitDepth != requestRecPtr->reqBitDepth\n\t\t\t\t)\n\t\t\t\t&&\n\t\t\t\t(\t(\tbitDepth > requestRecPtr->availBitDepth &&\n\t\t\t\t\t\tbitDepth <= requestRecPtr->reqBitDepth\n\t\t\t\t\t)\n\t\t\t\t\t||\n\t\t\t\t\t!(requestRecPtr->requestFlags & 1<<kShallowDepthBit)\t\n\t\t\t\t)\n\t\t\t\t&&\n\t\t\t\t(\trequestRecPtr->availBitDepth < requestRecPtr->reqBitDepth &&\n\t\t\t\t\tbitDepth > requestRecPtr->availBitDepth\t\n\t\t\t\t)\n\t\t\t\t&&\n\t\t\t\t(\t(horizontal == requestRecPtr->reqHorizontal &&\t\n\t\t\t\t\tvertical == requestRecPtr->reqVertical &&\n\t\t\t\t\tbitDepth == requestRecPtr->reqBitDepth)\n\t\t\t\t\t||\n\t\t\t\t\t!(requestRecPtr->requestFlags & 1<<kAbsoluteRequestBit)\t\n\t\t\t\t)\n\t\t\t)\n\t\t{\n\t\t\t// go ahead and set the new values\n\t\t\treturn (true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// match resolution: minimize h & v\n\t\t\tif\t(\tabs((requestRecPtr->reqHorizontal - horizontal)) <=\n\t\t\t\t\tabs((requestRecPtr->reqHorizontal - requestRecPtr->availHorizontal)) &&\n\t\t\t\t\tabs((requestRecPtr->reqVertical - vertical)) <=\n\t\t\t\t\tabs((requestRecPtr->reqVertical - requestRecPtr->availVertical))\n\t\t\t\t)\n\t\t\t{\n\t\t\t\t// now we have a smaller or equal delta\n\t\t\t\t//\tif (h or v greater/equal to request or kMaximizeRes not set) \n\t\t\t\tif (\t(horizontal >= requestRecPtr->reqHorizontal &&\n\t\t\t\t\t\tvertical >= requestRecPtr->reqVertical)\n\t\t\t\t\t\t||\n\t\t\t\t\t\t!(requestRecPtr->requestFlags & 1<<kMaximizeResBit)\n\t\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t// if\t(depth is equal or kBitDepthPriority not set) and\n\t\t\t\t\t//\t\t(depth is less/equal or kShallowDepth not set) and\n\t\t\t\t\t//\t\t([h or v not equal] or [avail depth less reqested and new greater avail] or depth equal avail) and\n\t\t\t\t\t//\t\t(request match or kAbsoluteRequest not set)\n\t\t\t\t\tif\t(\t(\trequestRecPtr->availBitDepth == bitDepth ||\t\t\t\n\t\t\t\t\t\t\t\t!(requestRecPtr->requestFlags & 1<<kBitDepthPriorityBit)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t&&\n\t\t\t\t\t\t\t(\tbitDepth <= requestRecPtr->reqBitDepth ||\t\n\t\t\t\t\t\t\t\t!(requestRecPtr->requestFlags & 1<<kShallowDepthBit)\t\t\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t&&\n\t\t\t\t\t\t\t(\t(requestRecPtr->availHorizontal != horizontal ||\n\t\t\t\t\t\t\t\trequestRecPtr->availVertical != vertical)\n\t\t\t\t\t\t\t\t||\n\t\t\t\t\t\t\t\t(requestRecPtr->availBitDepth < requestRecPtr->reqBitDepth &&\n\t\t\t\t\t\t\t\tbitDepth > requestRecPtr->availBitDepth)\n\t\t\t\t\t\t\t\t||\n\t\t\t\t\t\t\t\t(bitDepth == requestRecPtr->reqBitDepth)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t&&\n\t\t\t\t\t\t\t(\t(horizontal == requestRecPtr->reqHorizontal &&\t\n\t\t\t\t\t\t\t\tvertical == requestRecPtr->reqVertical &&\n\t\t\t\t\t\t\t\tbitDepth == requestRecPtr->reqBitDepth)\n\t\t\t\t\t\t\t\t||\n\t\t\t\t\t\t\t\t!(requestRecPtr->requestFlags & 1<<kAbsoluteRequestBit)\t\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\t// go ahead and set the new values\n\t\t\t\t\t\treturn (true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn (false);\n}\n  \n\n#include \"SurfacePlugin.h\"\n\nint osxGetSurfaceFormat(int handle, int* width, int* height, int* depth, int* isMSB);\nchar *osxLockSurface(int handle, int *pitch, int x, int y, int w, int h);\nint osxUnlockSurface(int handle, int x, int y, int w, int h);\nint osxShowSurface(int handle, int x, int y, int w, int h);\n\n\nstatic sqSurfaceDispatch osxTargetDispatch = {\n  1,\n  0,\n  (fn_getSurfaceFormat) osxGetSurfaceFormat,\n  (fn_lockSurface) osxLockSurface,\n  (fn_unlockSurface) osxUnlockSurface,\n  (fn_showSurface) osxShowSurface\n};\n\nstatic fn_ioRegisterSurface registerSurface = 0;\nstatic fn_ioUnregisterSurface unregisterSurface = 0;\nstatic int surfaceID;\n\nvoid SetupSurface(int whichWindowIndex) {\n    registerSurface = (fn_ioRegisterSurface) interpreterProxy->ioLoadFunctionFrom(\"ioRegisterSurface\",\"SurfacePlugin\");\n    unregisterSurface = (fn_ioUnregisterSurface) interpreterProxy->ioLoadFunctionFrom(\"ioUnregisterSurface\",\"SurfacePlugin\");\n    (*registerSurface)(whichWindowIndex, &osxTargetDispatch, &surfaceID);\n}\n\n\nint osxGetSurfaceFormat(int index, int* width, int* height, int* depth, int* isMSB) {\n    PixMapHandle pix;\n    Rect        rectangle;\n    \n    pix = GetPortPixMap(GetWindowPort(windowHandleFromIndex(index)));\n    *depth= GetPixDepth(pix);\n    GetPixBounds(pix,&rectangle);\n    *width = rectangle.right - rectangle.left;\n    *height = rectangle.bottom - rectangle.top;\n    *isMSB = 1;\n#warning \"fix for intel\"\n    return 1;\n}\n\nchar *osxLockSurface(int index, int *pitch, int x, int y, int w, int h) {\n    static int rememberW=0;\n    static int offsetTitle=0;\n\twindowDescriptorBlock *targetWindowBlock = windowBlockFromIndex(index);\n    CGrafPtr    windowPort = GetWindowPort(targetWindowBlock->handle);\n    PixMapHandle pixMap;\n\t\n    if (!targetWindowBlock->locked) {\n\t\tLockPortBits(windowPort);\n\t\ttargetWindowBlock->locked = ioMSecs();\n//\t\tfprintf(stderr,\"<L %i> \",ioMSecs());\n\t}\n\t\n    pixMap =  GetPortPixMap(windowPort);\n    *pitch = GetPixRowBytes(pixMap);\n\n    if (rememberW == 0) {\n        Rect structureRect;\n        RgnHandle rect;\n\n\t\trememberW = 1;\t\n        rect = NewRgn();            \n        GetWindowRegion(windowHandleFromIndex(index),kWindowTitleBarRgn,rect);\n        GetRegionBounds(rect,&structureRect);\n        offsetTitle = (structureRect.bottom- structureRect.top)* *pitch;\n        DisposeRgn(rect);\n    }\n    \n    return (char *)GetPixBaseAddr(pixMap) + offsetTitle;\n}\n\nint osxUnlockSurface(int index, int x, int y, int w, int h) {\n    //NOPE UnlockPortBits(GetWindowPort(windowHandleFromIndex(index))); \n\treturn 1;\n}\n\nint osxShowSurface(int index, int x, int y, int w, int h) {\n\tstatic RgnHandle dirtyRgn = NULL;\n\tstatic RgnHandle maskRect;\n\textern Boolean gSqueakUIFlushUseHighPercisionClock;\n\textern\tlong\tgSqueakUIFlushPrimaryDeferNMilliseconds;\n\twindowDescriptorBlock *targetWindowBlock = windowBlockFromIndex(index);\n\tint now = (gSqueakUIFlushUseHighPercisionClock ? ioMSecs(): ioLowResMSecs()) - targetWindowBlock->rememberTicker;\n\n\tif (dirtyRgn == NULL) {\n\t\tdirtyRgn = NewRgn();\n\t\tmaskRect = NewRgn();\n\t}\n\t\t\t\t\t\t\t\n\tSetRectRgn(maskRect, x, y, x+w, y+h);\n\tUnionRgn (dirtyRgn, maskRect, dirtyRgn);\n\t\n\tif (targetWindowBlock->dirty && ((now >= gSqueakUIFlushPrimaryDeferNMilliseconds) || (now < 0))) {\n\t\tif ((ioMSecs() - targetWindowBlock->locked) > 500) {\n\t\t\tUnlockPortBits(GetWindowPort(targetWindowBlock->handle)); \n//\t\t\tfprintf(stderr,\"<U %i> \",ioMSecs());\n\t\t\ttargetWindowBlock->locked = 0;\n\t\t}\n\t\tQDFlushPortBuffer(GetWindowPort(targetWindowBlock->handle), dirtyRgn);\n//\t\tfprintf(stderr,\"<F %i> \",ioMSecs());\n\t\tSetEmptyRgn(dirtyRgn);\n\t\ttargetWindowBlock->dirty = 0;\n\t\ttargetWindowBlock->rememberTicker = gSqueakUIFlushUseHighPercisionClock ? ioMSecs(): ioLowResMSecs();\n\t} else {\n\t\ttargetWindowBlock->dirty = 1;\n//\t\tfprintf(stderr,\"<W %i> \",ioMSecs());\n\t}\n\treturn 1;\n}\n\n#if JMMFoo \n\ninline void DuffsDevicesCopyLong(long *to, long *from, long count) {\n    long n=(count+7)/8;\n    switch(count%8){\n    case 0: do{     *to = *from++;\n    case 7:         *to = *from++;\n    case 6:         *to = *from++;\n    case 5:         *to = *from++;\n    case 4:         *to = *from++;\n    case 3:         *to = *from++;\n    case 2:         *to = *from++;\n    case 1:         *to = *from++;\n            }while(--n>0);\n    }\n}\n\n\t\t\n\t\t\t{\n\t\t\t\tstatic int pastTime=0;\n\t\t\t\tint check;\n\t\t\t\tstatic RgnHandle dirtyRgn = NULL;\n\n\t\t\t\tif (dirtyRgn == NULL) \n\t\t\t\t\tdirtyRgn = NewRgn();\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tUnionRgn (dirtyRgn, maskRect, dirtyRgn);\n\t\t\t\t\n\t\t\t\tif (((check = (ioMSecs() - pastTime)) > 7) || check < 0) {\n\t\t\t\t\tQDFlushPortBuffer(windowPort, dirtyRgn);\n\t\t\t\t\tSetEmptyRgn(dirtyRgn);\n\t\t\t\t\tpastTime = pastTime + check;\n\t\t\t\t}\n\t\t\t} \n\n\t\t\t\n\t\t\n#endif \n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacWindow.h",
    "content": "/****************************************************************************\n*   PROJECT: Squeak Headers\n*   FILE:    sqMacWindow.c\n*   CONTENT: \n*\n*   AUTHOR:  John Maloney, John McIntosh, and others.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacWindow.h 1344 2006-03-05 21:07:15Z johnmci $\n*\n*   NOTES: \n*  Feb 22nd, 2002, JMM moved code into 10 other files, see sqMacMain.c for comments\n*  May 5th, 2002, JMM build as NS plugin\n*  Jun 7th, 2003, JMM fix up full screen threading issue\n*  Sept 11th, 2004, JMM add getDominateScreen\n*  Jul 20th, 2004, JMM support for multiple windows\n****************************************************************************/\n\n#include <Carbon/Carbon.h>\nvoid SetWindowTitle(int windowIndex,char *title);\nWindowPtr getSTWindow(void);\nWindowPtr SetUpWindow(int t,int l,int b, int r, UInt32 windowType, UInt32 windowAttributes);\nvoid SetUpPixmap(void);\nvoid FreePixmap(void);\nGDHandle\tgetThatDominateGDevice(WindowPtr window);\nvoid sqShowWindow(int windowIndex);\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqMacWindowUniversal.c",
    "content": "/****************************************************************************\n*   PROJECT: Mac window, memory, keyboard interface.\n*   FILE:    sqMacWindow.c\n*   CONTENT: \n*\n*   AUTHOR:  John Maloney, John McIntosh, and others.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:  $Id: sqMacWindow.c 1296 2006-02-02 07:50:50Z johnmci $\n*\n*   NOTES: \n*  Feb 22nd, 2002, JMM moved code into 10 other files, see sqMacMain.c for comments\n*  Feb 26th, 2002, JMM - use carbon get dominate device \n*  Apr  17th, 2002, JMM Use accessors for VM variables.\n*  May 5th, 2002, JMM cleanup for building as NS plugin\n 3.2.8b1 July 24th, 2002 JMM support for os-x plugin under IE 5.x\n 3.5.1b5 June 25th, 2003 JMM fix memory leak on color table free, pull preferences from Info.plist under os-x\n 3.7.0bx Nov 24th, 2003 JMM move preferences to main, the proper place.\n 3.7.3bx Apr 10th, 2004 JMM fix crash on showscreen\n 3.8.1b1 Jul 20th, 2004 JMM Start on multiple window logic\n 3.8.6b1 Jan 25th, 2005 JMM flush qd buffers less often\n 3.8.6b3 Jan 25th, 2005 JMM Change locking of pixels (less often)\n 3.8.8b3 Jul 15th, 2005 JMM Add window(s) flush logic every 1/60 second for os-x\n 3.8.8b6 Jul 19th, 2005 JMM tuning of the window flush\n 3.8.8b15\tSept 12th, 2005, JMM set full screen only if not in full screen. \n 3.8.10B5  Feb 3rd, 2006 JMM complete rewrite carbon only for universal\n 3.8.11b1 Mar 4th, 2006 JMM refactor, cleanup and add headless support\n 3.8.13b4 Oct 16th, 2006 JMM headless\n 3.8.14b1 Oct\t,2006 JMM browser rewrite\n 3.8.15b3  Feb 19th, 2007 JMM add cursor set logic\n 3.8.17b1  Apr 25th, 2007 JMM explict window open, add back ioSetDisplayModeOLD for 10.2.8\n\n*****************************************************************************/\n\n#include <Carbon/Carbon.h>\n#include <Movies.h>\n#include <sys/types.h>\n#include <sys/mman.h>\n#include <pthread.h>\n#include <unistd.h>\n\n#include \"sq.h\"\n#include \"sqMacUIConstants.h\"\n#include \"sqMacWindow.h\"\n#include \"sqMacFileLogic.h\"\n#include \"sqmacUIEvents.h\"\n#include \"sqMacUIMenuBar.h\"\n#include \"sqMacEncoding.h\"\n#include \"sqMacHostWindow.h\"\n#include \"sqMacTime.h\"\n#include \"sqMacNSPluginUILogic2.h\"\n\nextern int gSqueakDebug;\n\n# define DPRINTF(ARGS) if (gSqueakDebug) fprintf ARGS\n\n/*** Variables -- Imported from Virtual Machine ***/\nextern int getFullScreenFlag();    /* set from header when image file is loaded */\nextern int setFullScreenFlag(int value);    /* set from header when image file is loaded */\nextern int getSavedWindowSize();   /* set from header when image file is loaded */\nextern int setSavedWindowSize(int value);   /* set from header when image file is loaded */\nextern struct VirtualMachine *interpreterProxy;\nextern Boolean gSqueakHeadless;\nstatic void sqShowWindowActual(int windowIndex);\n\nBoolean gSqueakHasCursor = false;\n\n/*** Variables -- Mac Related ***/\nstatic CTabHandle\tstColorTable = nil;\nPixMapHandle\tstPixMap = nil;\n\n\n/*** Functions ***/\nstatic void SetColorEntry(int index, int red, int green, int blue);\n\nWindowPtr getSTWindow(void) {\n\tif (gSqueakHeadless && !browserActiveAndDrawingContextOk()) return NULL;\t\n    return  windowHandleFromIndex(1);\n}\n\n/*\n * Brad's Mac-ification of Andreas' window sizing prims.\n */\nsqInt ioGetWindowWidth(void) {\n  Rect r;\n  WindowPtr win = getSTWindow();\n\n  if (! win) return -1;\n\n  r.left = r.right = r.top = r.bottom = 0;\n  if (GetWindowBounds( win, kWindowStructureRgn, &r) != 0) {\n\treturn -1;\n  } \n  return (r.right - r.left);\n}\n\nsqInt ioGetWindowHeight(void) {\n  Rect r;\n  WindowPtr win = getSTWindow();\n\n  if (! win) return -1;\n\n  r.left = r.right = r.top = r.bottom = 0;\n  if (GetWindowBounds( win, kWindowStructureRgn, &r) != 0) {\n\treturn -1;\n  } \n  return (r.bottom - r.top);\n}\n\nvoid* ioGetWindowHandle(void)\n{\n\treturn getSTWindow();\n}\n\nsqInt ioSetWindowWidthHeight(sqInt w, sqInt h) {\n  Rect workArea;\n  Rect newBounds; \n  Rect oldBounds; \n  int width, height, maxWidth, maxHeight;\n  WindowPtr win;\n  GDHandle device;\n  OSStatus result;\n  void *  giLocker;\n\n  win = getSTWindow();\n  if(! win) return 0;\n  device = getThatDominateGDevice (win);\n  if (! device) return 0;\n\n  windowDescriptorBlock *windowBlock = windowBlockFromIndex(1);\t\n  if (! windowBlock) return 0;\n\n  if (GetAvailableWindowPositioningBounds (device, &workArea) != 0) return 0;\n\n  width = w;\n  height = h;\n\n  /* minimum size is 64 x 64 */\n  width  = (width > 64) ? width : 64;\n  height = (height > 64) ? height : 64;\n\n  /* maximum size is working area less a bit of slop so the result\n     remains 'within' the screen' */\n  maxWidth  = workArea.right - workArea.left;\n  maxHeight = workArea.bottom - workArea.top;\n  width  = (width <= (maxWidth-4)) ? width : maxWidth-4;\n  height = (height <= (maxHeight-4)) ? height : maxHeight-4;\n\n  result = GetWindowBounds (win, kWindowStructureRgn, &oldBounds);\n  if (result != 0) return 0;\n     \n  /* Do we need to move the window to fit onscreen? */\n  if ((oldBounds.top >= workArea.top) && (oldBounds.left >= workArea.left) &&\n      (oldBounds.left + width < workArea.right) && (oldBounds.top + height <= workArea.bottom)) {\n  \tnewBounds.left = oldBounds.left;\n  \tnewBounds.top = oldBounds.top;\n  } else {\n  \tnewBounds.left = workArea.left + ((maxWidth - width) / 2);\n  \tnewBounds.top = workArea.top + ((maxHeight - height) / 2);\n  }\n  newBounds.right = newBounds.left + width;\n  newBounds.bottom = newBounds.top + height;\n\n  /* Do we need to do anything? */\n  if ( (oldBounds.top = newBounds.top) && (oldBounds.left == newBounds.left) &&\n\t   ((oldBounds.right - oldBounds.left) == (newBounds.right - newBounds.left)) &&\n       ((oldBounds.bottom - oldBounds.top) == (newBounds.bottom - newBounds.top)) ) {\n\treturn 1;\n  } \n \n  /** And awayyyyyy we go **/\n  giLocker = interpreterProxy->ioLoadFunctionFrom(\"getUIToLock\", \"\");\n  if (giLocker != 0) {\n    sqInt foo[6] = { 3, (int)SetWindowBounds, (int)win, kWindowStructureRgn, (int) (&(newBounds)), 0 };\n    ((sqInt (*) (void *)) giLocker)(foo);\n    result = interpreterProxy->positive32BitIntegerFor(foo[5]);\n  }\n\n  /* Remember new port extent for subsequent drawing */\n  {\n    Rect portRect;\n    GetWindowPortBounds(win, &portRect);\n    w =  portRect.right -  portRect.left;\n    h =  portRect.bottom - portRect.top;\n    windowBlock->width = w;\n    windowBlock->height = h; \n  }\n\n  if (result != 0) return 0;\t /* Failed */\n\n  return 1;\n}\n\n\nstatic char windowTitle[1024];\n\nchar *ioGetWindowLabel(void) {\n\tCFStringRef cfTitle;\n\tif (CopyWindowTitleAsCFString(getSTWindow(), & cfTitle) != 0) {\n\t\treturn 0;\n\t}\n\tif (! CFStringGetCString( cfTitle, windowTitle, sizeof(windowTitle), kCFStringEncodingUTF8)) {\n\t\twindowTitle[0] = 0;\n\t}\n\tCFRelease(cfTitle);\n\treturn windowTitle;\n}\n\nsqInt ioSetWindowLabelOfSize(void *lblIndex, sqInt sz) {\n\tchar string[1024];\n\tif(sz > 1023) sz = 1023;\n\tif (sz > 0) {\n\t\tmemcpy(string, lblIndex, sz);\n\t\tstring[sz] = 0;\n\t} else {\n\t\t/* Empty string means reset to short image name */\n\t\tgetShortImageNameWithEncoding(string,gCurrentVMEncoding);\n\t}\n\tSetWindowTitle(1, string);\n\treturn 1;\n}\n\nsqInt ioIsWindowObscured(void) {\n  /* not knowing any better just lie and pretend we're visible */\n  return false;\n}\n\nint makeMainWindow(void);\nstatic int ioSetFullScreenActual(int fullScreen);\n\nint ioSetFullScreen(int fullScreen) {\n        void *  giLocker;\n\t\tint return_value=0;\n\t\tif (gSqueakHeadless && !browserActiveAndDrawingContextOk()) return 0;\t\n        giLocker = interpreterProxy->ioLoadFunctionFrom(\"getUIToLock\", \"\");\n        if (giLocker != 0) {\n            sqInt *foo;\n            foo = malloc(sizeof(sqInt)*4);\n            foo[0] = 1;\n            foo[1] = (sqInt) ioSetFullScreenActual;\n            foo[2] = fullScreen;\n            foo[3] = 0;\n            ((sqInt (*) (void *)) giLocker)(foo);\n            return_value = interpreterProxy->positive32BitIntegerFor(foo[3]);\n            free(foo);\n        }\n        return return_value;\n}\n\nstatic int ioSetFullScreenActual(int fullScreen) {\n    Rect                screen, workArea;\n    int                 width, height, maxWidth, maxHeight;\n    int                 oldWidth, oldHeight;\n    static Rect\t\t\trememberOldLocation = {0,0,0,0};\t\t\n    GDHandle            dominantGDevice;\n\twindowDescriptorBlock *\ttargetWindowBlock  = windowBlockFromIndex(1);\n\textern Boolean gSqueakBrowserWasHeadlessButMadeFullScreen;\n\textern Boolean gSqueakBrowserSubProcess;\n\t\n\t\n\tif (browserActiveAndDrawingContextOk()) {\n\t\tif (!gSqueakBrowserWasHeadlessButMadeFullScreen) {\n\t\t\tgSqueakBrowserWasHeadlessButMadeFullScreen = true;\n\t\t\tSetUpMenus();\n\t\t\tAdjustMenus();\n\t\t}\n\t\tsqShowWindowActual(1);\n\t\tif (targetWindowBlock->context)  //Set context to NULL, if screen is same size as fullscreen we wouldn't get new context\n\t\t\tQDEndCGContext(GetWindowPort(targetWindowBlock->handle),&targetWindowBlock->context);\n\t\ttargetWindowBlock->context = NULL;\n\t}\n\t\n\tif ((targetWindowBlock == NULL) || (fullScreen && getFullScreenFlag() && !targetWindowBlock->isInvisible))\n\t\treturn 0;\n\t\n\tdominantGDevice = getThatDominateGDevice(targetWindowBlock->handle);\n    if (dominantGDevice == null) {\n        success(false);\n        return 0;\n    }\n    GetAvailableWindowPositioningBounds (dominantGDevice, &workArea);\n    screen = (**dominantGDevice).gdRect;\n\t\n    if (fullScreen) {\n\t\t\n\t\tGetWindowBounds(targetWindowBlock->handle, kWindowContentRgn, &rememberOldLocation);\n\t\tif (targetWindowBlock->isInvisible) {\n\t\t\t/* I.e. we're going straight to fullscreen */\n\t\t\trememberOldLocation.top = workArea.top + 28;\n\t\t\trememberOldLocation.left = workArea.left + 8;\n\t\t\trememberOldLocation.bottom = (rememberOldLocation.bottom >= workArea.bottom-8) ? workArea.bottom-8 : rememberOldLocation.bottom;\n\t\t\trememberOldLocation.right = (rememberOldLocation.right >= workArea.right-8) ? workArea.right-8 : rememberOldLocation.right;\n\t\t}\n\t\t\n\t\tif (gSqueakBrowserSubProcess) {\n\t\t\tProcessSerialNumber psn = { 0, kCurrentProcess };\n\t\t\tProcessInfoRec info;\n\t\t\tinfo.processName = NULL;\n\t\t\tinfo.processAppSpec = NULL;\n\t\t\tinfo.processInfoLength = sizeof(ProcessInfoRec);\n\t\t\tGetProcessInformation(&psn,&info);\n\t\t\tSetFrontProcess(&psn);\n\t\t}\n\t\tMenuBarHide();\n\t\twidth  = screen.right - screen.left;\n\t\theight = (screen.bottom - screen.top);\n\t\tSetWindowBounds (targetWindowBlock->handle, kWindowContentRgn, &screen);\n\t\tsetFullScreenFlag(true);\n\t\t\n\t} else {\n\t\tMenuBarRestore();\n\t\t\n\t\tif (gSqueakBrowserWasHeadlessButMadeFullScreen) {\n\t\t\tHideWindow(targetWindowBlock->handle);\n\t\t\t{\n\t\t\t\tProcessSerialNumber psn;\n\t\t\t\tpid_t parent;\n\t\t\t\tOSStatus err;\n\t\t\t\tparent = getppid();\n\t\t\t\tif (parent != 1) {\n\t\t\t\t\terr = GetProcessForPID(parent,&psn); \n\t\t\t\t\tif(err == 0) \n\t\t\t\t\t\tSetFrontProcess(&psn);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tif (EmptyRect(&rememberOldLocation)) {\n\t\t\tRect newBounds;\n\t\t\t\n\t\t\t/* get old window size */\n\t\t\twidth  = (unsigned) getSavedWindowSize() >> 16;\n\t\t\theight = getSavedWindowSize() & 0xFFFF;\n\t\t\t\n\t\t\t/* minimum size is 1 x 1 */\n\t\t\twidth  = (width  > 0) ? width : 64;\n\t\t\theight = (height > 0) ? height : 64;\n\t\t\t\n\t\t\tworkArea.top = workArea.top + 20; \t/* Cheat a bit, for my win title bar's space,\n\t\t\t since we have to set bounds via ContentRgn */\n\t\t\t\n\t\t\t/* maximum size is working area less a bit of slop so the result\n\t\t\t remains 'within' the screen' */\n\t\t\tmaxWidth  = workArea.right - workArea.left;\n\t\t\tmaxHeight = workArea.bottom - workArea.top;\n\t\t\t\n\t\t\twidth  = (width <= (maxWidth-4)) ? width : maxWidth-4;\n\t\t\theight = (height <= (maxHeight-24)) ? height : maxHeight-24;\t /* Cheat a bit for the window title bar */\n\t\t\t\n\t\t\tnewBounds.left = workArea.left + ((maxWidth - width) / 2);\n\t\t\tnewBounds.top = workArea.top + ((maxHeight - height) / 2);\n\t\t\tnewBounds.right = newBounds.left + width;\n\t\t\tnewBounds.bottom = newBounds.top + height;\n\t\t\t\n\t\t\tSetWindowBounds (targetWindowBlock->handle, kWindowContentRgn, &newBounds);\n\t\t} else {\n\t\t\tSetWindowBounds (targetWindowBlock->handle, kWindowContentRgn, &rememberOldLocation);\n\t\t}\n\t\tsetFullScreenFlag(false);\n\t}\n\treturn 0;\n}\n\nvoid sqShowWindow(int windowIndex) {\n        void *  giLocker;\n\t\t\n\t\tif (gSqueakHeadless && browserActiveAndDrawingContextOkAndNOTInFullScreenMode()) return;\n        giLocker = interpreterProxy->ioLoadFunctionFrom(\"getUIToLock\", \"\");\n        if (giLocker != 0) {\n            sqInt *foo;\n            foo = malloc(sizeof(sqInt)*4);\n            foo[0] = 1;\n            foo[1] = (sqInt) sqShowWindowActual;\n            foo[2] = windowIndex;\n            foo[3] = 0;\n            ((sqInt (*) (void *)) giLocker)(foo);\n            free(foo);\n        }\n}\n\nstatic void sqShowWindowActual(int windowIndex){\n\tif (windowHandleFromIndex(windowIndex)) {\n\t\tShowWindow( windowHandleFromIndex(windowIndex));\n\t\twindowBlockFromIndex(windowIndex)->isInvisible  = false;\n\t}\n}\n\nint ioShowDisplay(\n\tsqInt dispBitsIndex, int width, int height, int depth,\n\tint affectedL, int affectedR, int affectedT, int affectedB) {\n\t\n\tif (gSqueakHeadless && !browserActiveAndDrawingContextOk()) return 1;\n\tioShowDisplayOnWindow( (unsigned char*)  dispBitsIndex,  width,  height,  depth, affectedL,  affectedR,  affectedT,  affectedB, 1);\n\treturn 1;\n}\n\n#define bytesPerLine(width, depth)\t((((width)*(depth) + 31) >> 5) << 2)\n\nstatic const void *get_byte_pointer(void *bitmap)\n{\n    return (void *) bitmap;\n}\n\nstatic CGDataProviderDirectAccessCallbacks gProviderCallbacks = {\n    get_byte_pointer,\n    NULL,\n    NULL,\n    NULL\n};\n\nstatic void * copy124BitsTheHardWay(unsigned int* dispBitsIndex, int width, int height, int depth, int desiredDepth,\n\tint affectedL, int affectedR, int affectedT, int affectedB, int windowIndex, int *pitch);\n\nint ioShowDisplayOnWindow(\n\tunsigned char*  dispBitsIndex, int width, int height, int depth,\n\tint affectedL, int affectedR, int affectedT, int affectedB, int windowIndex) {\n\n\tstatic CGColorSpaceRef colorspace = NULL;\n\textern CGContextRef SharedBrowserBitMapContextRef;\n\textern SqueakSharedMemoryBlock *SharedMemoryBlock;\n\textern int SharedBrowserBitMapLength;\n\t\n\tint \t\tpitch;\n\tCGImageRef image;\n\tCGRect\t\tclip;\n\twindowDescriptorBlock *targetWindowBlock = windowBlockFromIndex(windowIndex);\t\n\tCGDataProviderRef provider;\n\t\n\tif (gSqueakHeadless && !browserActiveAndDrawingContextOk()) return 1;\n\n\tif (colorspace == NULL) {\n\t\t\t// Get the Systems Profile for the main display\n\t\tCMProfileRef sysprof = NULL;\n\t\tif (CMGetSystemProfile(&sysprof) == noErr) {\n\t\t\t// Create a colorspace with the systems profile\n\t\t\tcolorspace = CGColorSpaceCreateWithPlatformColorSpace(sysprof);\n\t\t\tCMCloseProfile(sysprof);\n\t\t} else \n\t\t\tcolorspace = CGColorSpaceCreateDeviceRGB();\n\t}\n\n\tif (targetWindowBlock == NULL) {\n\t\textern Boolean gSqueakExplicitWindowOpenNeeded;\n\t\tif (gSqueakExplicitWindowOpenNeeded || (windowIndex != 1))\n\t\t\treturn 0;\n\t\tmakeMainWindow();\n\t\ttargetWindowBlock = windowBlockFromIndex(windowIndex);\n\t}\n\n\t\t\n\tif (affectedL < 0) affectedL = 0;\n\tif (affectedT < 0) affectedT = 0;\n\tif (affectedR > width) affectedR = width;\n\tif (affectedB > height) affectedB = height;\n\t\n\tif ((targetWindowBlock->handle == nil) || ((affectedR - affectedL) <= 0) || ((affectedB - affectedT) <= 0)){\n            return 0;\n\t}\n\n\tif (depth > 0 && depth <= 16) {\n\t\tdispBitsIndex = copy124BitsTheHardWay((unsigned int *) dispBitsIndex, width, height, depth, 32, affectedL, affectedR, affectedT,  affectedB,  windowIndex, &pitch);\n\t\tdepth = 32;\n\t} else {\n\t\tpitch = bytesPerLine(width, depth);\n\t}\n\t\t\t\n\tprovider = CGDataProviderCreateDirectAccess((void*)dispBitsIndex\n\t\t\t\t+ pitch*affectedT \n\t\t\t\t+ affectedL*(depth==32 ? 4 : 2),  \n\t\t\t\tpitch * (affectedB-affectedT)-affectedL*(depth==32 ? 4 : 2), \n\t\t\t\t&gProviderCallbacks);\n\timage = CGImageCreate( affectedR-affectedL, affectedB-affectedT, depth==32 ? 8 : 5 /* bitsPerComponent */,\n\t\t\t\tdepth /* bitsPerPixel */, \n#ifdef __BIG_ENDIAN__\n\t\t\t\tpitch, colorspace, kCGImageAlphaNoneSkipFirst, provider, NULL, 0, kCGRenderingIntentDefault);\n#else\n\t\t\t\tpitch, colorspace, kCGImageAlphaNoneSkipFirst | (depth==32 ? kCGBitmapByteOrder32Host : kCGBitmapByteOrder16Host), provider, NULL, 0, kCGRenderingIntentDefault);\n#endif\n\n\n\tclip = CGRectMake(affectedL,height-affectedB, affectedR-affectedL, affectedB-affectedT);\n\n\tif (targetWindowBlock->isInvisible) {\n\t\tsqShowWindow(windowIndex);\n\t}\n\n\t\tif (targetWindowBlock->context == nil || (targetWindowBlock->width != width || targetWindowBlock->height  != height)) {\n\t\t\tif (targetWindowBlock->context) {\n\t\t\t\tQDEndCGContext(GetWindowPort(targetWindowBlock->handle),&targetWindowBlock->context);\n\t\t\t\t//CGContextRelease(targetWindowBlock->context);\n\t\t\t}\n\t\t\t//CreateCGContextForPort(GetWindowPort(targetWindowBlock->handle),&targetWindowBlock->context); \n\t\t\tQDBeginCGContext(GetWindowPort(targetWindowBlock->handle),&targetWindowBlock->context); \n\t\t\ttargetWindowBlock->sync = false;\n\t\t\t\n\t\t\ttargetWindowBlock->width = width;\n\t\t\ttargetWindowBlock->height = height; \n\t\t\tDPRINTF((stderr,\"targetWindow index %i, width %i height %i\\n\",windowIndex,width,height));\n\t}\n\n\t\n\tif (targetWindowBlock->sync) {\n\t\t\tCGRect\tclip2;\n\t\t\tRect\tportRect;\n\t\t\tint\t\tw,h;\n\t\t\t\n\t\t\tGetPortBounds(GetWindowPort(windowHandleFromIndex(windowIndex)),&portRect);\n            w =  portRect.right -  portRect.left;\n            h =  portRect.bottom - portRect.top;\n\t\t\tclip2 = CGRectMake(0,0, w, h);\n\t\t\tCGContextClipToRect(targetWindowBlock->context, clip2);\n\t}\n\t\t\n\t/* Draw the image to the Core Graphics context */\n\tif (provider && image) {\n\t\t\n\t\tif (browserActiveAndDrawingContextOkAndNOTInFullScreenMode() ) {\n\t\t\tstatic pthread_mutex_t SleepLock;\n\t\t\tstatic pthread_cond_t SleepLockCondition;\n\t\t\tstruct timespec tspec;\t\n\t\t\tstatic bool mutexTimerStartNeeded = true;\n\t\t\tint err,counter = 0;\n\t\t\t\t\t\n\t\t\tif (mutexTimerStartNeeded) {\n\t\t\t\tmutexTimerStartNeeded = false;\n\t\t\t\tpthread_mutex_init(&SleepLock, NULL);\n\t\t\t\tpthread_cond_init(&SleepLockCondition,NULL);\n\t\t\t}\n\n\t\t\twhile (SharedMemoryBlock->written && counter++ < 100) {\n\t\t\t\t\n\t\t\t\ttspec.tv_sec=  10 / 1000;\n\t\t\t\ttspec.tv_nsec= (10 % 1000)*1000000;\n\t\t\n\t\t\t\terr = pthread_mutex_lock(&SleepLock);\n\t\t\t\terr = pthread_cond_timedwait_relative_np(&SleepLockCondition,&SleepLock,&tspec);\t\n\t\t\t\terr = pthread_mutex_unlock(&SleepLock);\n\t\t\t}\n\t\t\t\n\t\t\tCGContextDrawImage(SharedBrowserBitMapContextRef, clip, image);\n\t\t\tCGContextFlush(SharedBrowserBitMapContextRef);\n\t\t\tSharedMemoryBlock->top = affectedT;\n\t\t\tSharedMemoryBlock->left = affectedL;\n\t\t\tSharedMemoryBlock->bottom = affectedB;\n\t\t\tSharedMemoryBlock->right = affectedR;\n\t\t\tSharedMemoryBlock->written = 1;\n\t\t\tmsync(SharedMemoryBlock,SharedBrowserBitMapLength,MS_SYNC);\n\t\t\t\n\t} else\n\t\t\tif (targetWindowBlock->context)\n\t\tCGContextDrawImage(targetWindowBlock->context, clip, image);\n\t}\n\n\tCGImageRelease(image);\n\tCGDataProviderRelease(provider);\n\n\tif (browserActiveAndDrawingContextOkAndNOTInFullScreenMode()) \n\t\treturn 1;\n\t\t\n\t{ \n\t\t\textern Boolean gSqueakUIFlushUseHighPercisionClock;\n\t\t\textern\tlong\tgSqueakUIFlushPrimaryDeferNMilliseconds;\n\t\t\t\n\t\t\tint now = (gSqueakUIFlushUseHighPercisionClock ? ioMSecs(): ioLowResMSecs()) - targetWindowBlock->rememberTicker;\n \n\t\tif (((now >= gSqueakUIFlushPrimaryDeferNMilliseconds) || (now < 0))) {\n\t\t\tCGContextFlush(targetWindowBlock->context);\n\t\t\ttargetWindowBlock->dirty = 0;\n\t\t\ttargetWindowBlock->rememberTicker = gSqueakUIFlushUseHighPercisionClock ? ioMSecs(): ioLowResMSecs();\n\t\t} else {\n\t\t\tif (targetWindowBlock->sync)\n\t\t\t\tCGContextSynchronize(targetWindowBlock->context);\n\t\t\ttargetWindowBlock->dirty = 1;\n\t\t}\n\t} \t\n\t\n\treturn 1;\n}\n\n\nstatic void * copy124BitsTheHardWay(unsigned int* dispBitsIndex, int width, int height, int depth, int desiredDepth,\n\tint affectedL, int affectedR, int affectedT, int affectedB, int windowIndex, int *pitch) {\n\t\n\tstatic GWorldPtr offscreenGWorld = nil;\n\tQDErr error;\n\tstatic \t\tRgnHandle maskRect = nil;\n\tstatic Rect\tdstRect = { 0, 0, 0, 0 };\n\tstatic Rect\tsrcRect = { 0, 0, 0, 0 };\n\tstatic int\trememberWidth=0,rememberHeight=0,rememberDepth=0,lastWindowIndex=0;\n\t\n\tif (maskRect == nil)\n\t\tmaskRect = NewRgn();            \n \t\t\n\t(*stPixMap)->baseAddr = (void *) dispBitsIndex;\n        \n\tif (!((lastWindowIndex == windowIndex) && (rememberHeight == height) && (rememberWidth == width) && (rememberDepth == depth))) {\n\t\t\tlastWindowIndex = windowIndex;\n            rememberWidth  = srcRect.right = dstRect.right = width;\n            rememberHeight = srcRect.bottom = dstRect.bottom = height;\n\t\t\tif (offscreenGWorld != nil)\n\t\t\t\tDisposeGWorld(offscreenGWorld);\n\t\t\t\n#ifdef __BIG_ENDIAN__\n\t\t\terror\t= NewGWorld (&offscreenGWorld,desiredDepth,&dstRect,0,0,keepLocal);\n#else\n\t\t\terror\t= NewGWorld (&offscreenGWorld,desiredDepth,&dstRect,0,0,keepLocal | kNativeEndianPixMap);\n#endif\t\t\n\t\t\tLockPixels(GetGWorldPixMap(offscreenGWorld));\n\t\t\t\n            /* Note: top three bits of rowBytes indicate this is a PixMap, not a BitMap */\n            (*stPixMap)->rowBytes = (((((width * depth) + 31) / 32) * 4) & 0x1FFF) | 0x8000;\n            (*stPixMap)->bounds = srcRect;\n            rememberDepth = (*stPixMap)->pixelSize = depth;\n    \n            if (depth<=8) { /*Duane Maxwell <dmaxwell@exobox.com> fix cmpSize Sept 18,2000 */\n                (*stPixMap)->cmpSize = depth;\n                (*stPixMap)->cmpCount = 1;\n            } else if (depth==16) {\n                (*stPixMap)->cmpSize = 5;\n                (*stPixMap)->cmpCount = 3;\n            } else if (depth==32) {\n                (*stPixMap)->cmpSize = 8;\n                (*stPixMap)->cmpCount = 3;\n            }\n        }\n        \n\t/* create a mask region so that only the affected rectangle is copied */\n\tSetRectRgn(maskRect, affectedL, affectedT, affectedR, affectedB);\n\tCopyBits((BitMap *) *stPixMap,(BitMap *)*GetGWorldPixMap(offscreenGWorld), &srcRect, &dstRect, srcCopy, maskRect);\n\t*pitch = GetPixRowBytes(GetGWorldPixMap(offscreenGWorld));\n\treturn GetPixBaseAddr(GetGWorldPixMap(offscreenGWorld));\n}\n\nvoid SetUpPixmap(void) {\n\tint i, r, g, b;\n\n\tstColorTable = (CTabHandle) NewHandle(sizeof(ColorTable) + (256 * sizeof(ColorSpec)));\n\t(*stColorTable)->ctSeed = GetCTSeed();\n\t(*stColorTable)->ctFlags = 0;\n\t(*stColorTable)->ctSize = 255;\n\n\t/* 1-bit colors (monochrome) */\n\tSetColorEntry(0, 65535, 65535, 65535);\t/* white or transparent */\n\tSetColorEntry(1,     0,     0,     0);\t/* black */\n\n\t/* additional colors for 2-bit color */\n\tSetColorEntry(2, 65535, 65535, 65535);\t/* opaque white */\n\tSetColorEntry(3, 32768, 32768, 32768);\t/* 1/2 gray */\n\n\t/* additional colors for 4-bit color */\n\tSetColorEntry( 4, 65535,     0,     0);\t/* red */\n\tSetColorEntry( 5,     0, 65535,     0);\t/* green */\n\tSetColorEntry( 6,     0,     0, 65535);\t/* blue */\n\tSetColorEntry( 7,     0, 65535, 65535);\t/* cyan */\n\tSetColorEntry( 8, 65535, 65535,     0);\t/* yellow */\n\tSetColorEntry( 9, 65535,     0, 65535);\t/* magenta */\n\tSetColorEntry(10,  8192,  8192,  8192);\t/* 1/8 gray */\n\tSetColorEntry(11, 16384, 16384, 16384);\t/* 2/8 gray */\n\tSetColorEntry(12, 24576, 24576, 24576);\t/* 3/8 gray */\n\tSetColorEntry(13, 40959, 40959, 40959);\t/* 5/8 gray */\n\tSetColorEntry(14, 49151, 49151, 49151);\t/* 6/8 gray */\n\tSetColorEntry(15, 57343, 57343, 57343);\t/* 7/8 gray */\n\n\t/* additional colors for 8-bit color */\n\t/* 24 more shades of gray (does not repeat 1/8th increments) */\n\tSetColorEntry(16,  2048,  2048,  2048);\t/*  1/32 gray */\n\tSetColorEntry(17,  4096,  4096,  4096);\t/*  2/32 gray */\n\tSetColorEntry(18,  6144,  6144,  6144);\t/*  3/32 gray */\n\tSetColorEntry(19, 10240, 10240, 10240);\t/*  5/32 gray */\n\tSetColorEntry(20, 12288, 12288, 12288);\t/*  6/32 gray */\n\tSetColorEntry(21, 14336, 14336, 14336);\t/*  7/32 gray */\n\tSetColorEntry(22, 18432, 18432, 18432);\t/*  9/32 gray */\n\tSetColorEntry(23, 20480, 20480, 20480);\t/* 10/32 gray */\n\tSetColorEntry(24, 22528, 22528, 22528);\t/* 11/32 gray */\n\tSetColorEntry(25, 26624, 26624, 26624);\t/* 13/32 gray */\n\tSetColorEntry(26, 28672, 28672, 28672);\t/* 14/32 gray */\n\tSetColorEntry(27, 30720, 30720, 30720);\t/* 15/32 gray */\n\tSetColorEntry(28, 34815, 34815, 34815);\t/* 17/32 gray */\n\tSetColorEntry(29, 36863, 36863, 36863);\t/* 18/32 gray */\n\tSetColorEntry(30, 38911, 38911, 38911);\t/* 19/32 gray */\n\tSetColorEntry(31, 43007, 43007, 43007);\t/* 21/32 gray */\n\tSetColorEntry(32, 45055, 45055, 45055);\t/* 22/32 gray */\n\tSetColorEntry(33, 47103, 47103, 47103);\t/* 23/32 gray */\n\tSetColorEntry(34, 51199, 51199, 51199);\t/* 25/32 gray */\n\tSetColorEntry(35, 53247, 53247, 53247);\t/* 26/32 gray */\n\tSetColorEntry(36, 55295, 55295, 55295);\t/* 27/32 gray */\n\tSetColorEntry(37, 59391, 59391, 59391);\t/* 29/32 gray */\n\tSetColorEntry(38, 61439, 61439, 61439);\t/* 30/32 gray */\n\tSetColorEntry(39, 63487, 63487, 63487);\t/* 31/32 gray */\n\n\t/* The remainder of color table defines a color cube with six steps\n\t   for each primary color. Note that the corners of this cube repeat\n\t   previous colors, but simplifies the mapping between RGB colors and\n\t   color map indices. This color cube spans indices 40 through 255.\n\t*/\n\tfor (r = 0; r < 6; r++) {\n\t\tfor (g = 0; g < 6; g++) {\n\t\t\tfor (b = 0; b < 6; b++) {\n\t\t\t\ti = 40 + ((36 * r) + (6 * b) + g);\n\t\t\t\tif (i > 255) error(\"index out of range in color table compuation\");\n\t\t\t\tSetColorEntry(i, (r * 65535) / 5, (g * 65535) / 5, (b * 65535) / 5);\n\t\t\t}\n\t\t}\n\t}\n\n\tstPixMap = NewPixMap();\n\t(*stPixMap)->pixelType = 0; /* chunky */\n\t(*stPixMap)->cmpCount = 1;\n        DisposeCTable((*stPixMap)->pmTable);\n\t(*stPixMap)->pmTable = stColorTable;\n}\n\nstatic void SetColorEntry(int index, int red, int green, int blue) {\n\t(*stColorTable)->ctTable[index].value = index;\n\t(*stColorTable)->ctTable[index].rgb.red = red;\n\t(*stColorTable)->ctTable[index].rgb.green = green;\n\t(*stColorTable)->ctTable[index].rgb.blue = blue;\n}\n\nvoid FreePixmap(void) {\n\textern Boolean gSqueakBrowserWasHeadlessButMadeFullScreen;\n\t\n\tif (gSqueakHeadless && !gSqueakBrowserWasHeadlessButMadeFullScreen) return;\n\tif (stPixMap != nil) {\n\t\tDisposePixMap(stPixMap);\n\t\tstPixMap = nil;\n\t}\n\n\tif (stColorTable != nil) {\n\t\t//JMM disposepixmap does this DisposeHandle((void *) stColorTable);\n\t\tstColorTable = nil;\n\t}\n}\n\n\nint makeMainWindow(void) {\n\tWindowPtr window;\n\tchar\tshortImageName[256];\n\tint width,height;\n\twindowDescriptorBlock *windowBlock;\n\textern UInt32 gSqueakWindowType,gSqueakWindowAttributes;\n\textern Boolean gSqueakWindowHasTitle;\n\t\t\n\t/* get old window size */\n\twidth  = (unsigned) getSavedWindowSize() >> 16;\n\theight = getSavedWindowSize() & 0xFFFF;\n\t\n\twindow = SetUpWindow(44, 8, 44+height, 8+width,gSqueakWindowType,gSqueakWindowAttributes);\n\twindowBlock = AddWindowBlock();\n\twindowBlock-> handle = (wHandleType) window;\n\twindowBlock->isInvisible = !MacIsWindowVisible(window);\n\n\tioLoadFunctionFrom(NULL, \"DropPlugin\");\n    \n\tif (gSqueakWindowHasTitle) {\n\t\tgetShortImageNameWithEncoding(shortImageName,gCurrentVMEncoding);\n\t\tSetWindowTitle(1,shortImageName);\n\t}\n\n\tioSetFullScreenActual(getFullScreenFlag());\n\tSetUpCarbonEventForWindowIndex(1);\n\tQDBeginCGContext(GetWindowPort(windowBlock->handle),&windowBlock->context);    \n\n\tRect portRect;\n\tint\tw,h;\n\n\tGetPortBounds(GetWindowPort(windowBlock->handle),&portRect);\n\tw =  portRect.right -  portRect.left;\n\th =  portRect.bottom - portRect.top;\n\tsetSavedWindowSize((w << 16) |(h & 0xFFFF));\n\twindowBlock->width = w;\n\twindowBlock->height = h; \n\n\t//SetupSurface(1);\n\treturn (int) window;\n}\n\nWindowPtr SetUpWindow(int t,int l,int b, int r, UInt32 windowType, UInt32 windowAttributes) {\n\tRect windowBounds;\n\tOSStatus err;\n\tWindowPtr   createdWindow;\n\twindowBounds.left = l;\n\twindowBounds.top = t;\n\twindowBounds.right = r;\n\twindowBounds.bottom = b;\n\terr = CreateNewWindow(windowType,windowAttributes,&windowBounds,&createdWindow);\n\treturn createdWindow;\n}\n\nvoid SetWindowTitle(int windowIndex,char *title) {\n\tif (gSqueakHeadless && !browserActiveAndDrawingContextOk()) return;\n\n    if (windowIndex == 1) {\n\t\tint sz = strlen(title);\n\t\tif (sz > 1023) sz = 1023;\n\t\tmemcpy(windowTitle, title, sz);\n\t\twindowTitle[sz] = 0;\n\t}\n\n\tCFStringRef tempTitle = CFStringCreateWithCString(NULL, title, kCFStringEncodingMacRoman);\n\tif (windowHandleFromIndex(windowIndex))\n\t\tSetWindowTitleWithCFString(windowHandleFromIndex(windowIndex), tempTitle);\n\tCFRelease(tempTitle);\n}\n\nint ioForceDisplayUpdate(void) {\n\t/* do nothing on a Mac */\n\treturn 0;\n}\n\nint ioHasDisplayDepth(int depth) {\n\t/* Return true if this platform supports the given color display depth. */\n\n\tswitch (depth) {\n\tcase 1:\n\tcase 2:\n\tcase 4:\n\tcase 8:\n\tcase 16:\n\tcase 32:\n\t\treturn true;\n\t}\n\treturn false;\n}\n\nint ioScreenDepth(void) {\n    GDHandle mainDevice;\n    \n\tif (gSqueakHeadless && !browserActiveAndDrawingContextOk()) return 32;\n\tmainDevice = getThatDominateGDevice(getSTWindow());\n    if (mainDevice == null) \n        return 8;\n    \n    return (*(*mainDevice)->gdPMap)->pixelSize;\n}\n\nint ioScreenSize(void) {\n\tint w, h;\n    Rect portRect;\n    extern Boolean gSqueakExplicitWindowOpenNeeded;\n\t\n\tif (gSqueakHeadless && !browserActiveAndDrawingContextOk())\n\t\treturn getSavedWindowSize();\n\n\tif (browserActiveAndDrawingContextOkAndNOTInFullScreenMode())\n\t\treturn browserGetWindowSize();\n\t\n\tw  = (unsigned) getSavedWindowSize() >> 16;\n\th= getSavedWindowSize() & 0xFFFF;\n\n\tif (getSTWindow() == NULL && !gSqueakExplicitWindowOpenNeeded) {\n\t\tmakeMainWindow();\n\t}\n\n\tif (getSTWindow() != nil) {\n            GetPortBounds(GetWindowPort(getSTWindow()),&portRect);\n            w =  portRect.right -  portRect.left;\n            h =  portRect.bottom - portRect.top;\n\t}\n\t\n\treturn (w << 16) | (h & 0xFFFF);  /* w is high 16 bits; h is low 16 bits */\n}\n\nint ioSetCursor(sqInt cursorBitsIndex, int offsetX, int offsetY) {\n\t/* Old version; forward to new version. */\n\tioSetCursorWithMask(cursorBitsIndex, nil, offsetX, offsetY);\n\treturn 0;\n}\n\nCursor macCursor;\n\nint ioSetCursorWithMask(sqInt cursorBitsIndex, sqInt cursorMaskIndex, int offsetX, int offsetY) {\n\t/* Set the 16x16 cursor bitmap. If cursorMaskIndex is nil, then make the mask the same as\n\t   the cursor bitmap. If not, then mask and cursor bits combined determine how cursor is\n\t   displayed:\n\t\t\tmask\tcursor\teffect\n\t\t\t 0\t\t  0\t\ttransparent (underlying pixel shows through)\n\t\t\t 1\t\t  1\t\topaque black\n\t\t\t 1\t\t  0\t\topaque white\n\t\t\t 0\t\t  1\t\tinvert the underlying pixel\n\t*/\n\tint i;\n\textern Boolean biggerCursorActive;\n\t\n\tif (gSqueakHeadless && !browserActiveAndDrawingContextOk()) return 0;\n\tbiggerCursorActive = false;\n\t\n\tif (cursorMaskIndex == nil) {\n\t\tfor (i = 0; i < 16; i++) {\n\t\t\tmacCursor.data[i] = CFSwapInt16BigToHost((short)(checkedLongAt(cursorBitsIndex + (4 * i)) >> 16)) & 0xFFFF;\n\t\t\tmacCursor.mask[i] = CFSwapInt16BigToHost((short)(checkedLongAt(cursorBitsIndex + (4 * i)) >> 16)) & 0xFFFF;\n\t\t}\n\t} else {\n\t\tfor (i = 0; i < 16; i++) {\n\t\t\tmacCursor.data[i] = CFSwapInt16BigToHost((short)(checkedLongAt(cursorBitsIndex + (4 * i)) >> 16)) & 0xFFFF;\n\t\t\tmacCursor.mask[i] = CFSwapInt16BigToHost((short)(checkedLongAt(cursorMaskIndex + (4 * i)) >> 16)) & 0xFFFF;\n\t\t}\n\t}\n\n\t/* Squeak hotspot offsets are negative; Mac's are positive */\n\tmacCursor.hotSpot.h = -offsetX;\n\tmacCursor.hotSpot.v = -offsetY;\n\tif (browserActiveAndDrawingContextOkAndNOTInFullScreenMode())\n\t\tbrowserSetCursor(&macCursor);\n\tif (!gSqueakHeadless || browserActiveAndDrawingContextOkAndInFullScreenMode()) {\n\t\tgSqueakHasCursor = true;\n\t\tSetCursor(&macCursor);\n\t}\n\treturn 0;\n}\n\n// requestFlags bit values in VideoRequestRec (example use: 1<<kAbsoluteRequestBit)\nenum {\n\tkBitDepthPriorityBit\t\t= 0,\t// Bit depth setting has priority over resolution\n\tkAbsoluteRequestBit\t\t\t= 1,\t// Available setting must match request\n\tkShallowDepthBit\t\t\t= 2,\t// Match bit depth less than or equal to request\n\tkMaximizeResBit\t\t\t\t= 3,\t// Match screen resolution greater than or equal to request\n\tkAllValidModesBit\t\t\t= 4\t\t// Match display with valid timing modes (may include modes which are not marked as safe)\n};\n\n// availFlags bit values in VideoRequestRec (example use: 1<<kModeValidNotSafeBit)\nenum {\n\tkModeValidNotSafeBit\t\t= 0\t\t//  Available timing mode is valid but not safe (requires user confirmation of switch)\n};\n\n// video request structure\nstruct VideoRequestRec\t{\n\tGDHandle\t\tscreenDevice;\t\t// <in/out>\tnil will force search of best device, otherwise search this device only\n\tshort\t\t\treqBitDepth;\t\t// <in>\t\trequested bit depth\n\tshort\t\t\tavailBitDepth;\t\t// <out>\tavailable bit depth\n\tunsigned long\treqHorizontal;\t\t// <in>\t\trequested horizontal resolution\n\tunsigned long\treqVertical;\t\t// <in>\t\trequested vertical resolution\n\tunsigned long\tavailHorizontal;\t// <out>\tavailable horizontal resolution\n\tunsigned long\tavailVertical;\t\t// <out>\tavailable vertical resolution\n\tunsigned long\trequestFlags;\t\t// <in>\t\trequest flags\n\tunsigned long\tavailFlags;\t\t\t// <out>\tavailable mode flags\n\tunsigned long\tdisplayMode;\t\t// <out>\tmode used to set the screen resolution\n\tunsigned long\tdepthMode;\t\t\t// <out>\tmode used to set the depth\n\tVDSwitchInfoRec\tswitchInfo;\t\t\t// <out>\tDM2.0 uses this rather than displayMode/depthMode combo\n};\ntypedef struct VideoRequestRec VideoRequestRec;\ntypedef struct VideoRequestRec *VideoRequestRecPtr;\n\nstruct DepthInfo {\n\tVDSwitchInfoRec\t\t\tdepthSwitchInfo;\t\t\t// This is the switch mode to choose this timing/depth\n\tVPBlock\t\t\t\t\tdepthVPBlock;\t\t\t\t// VPBlock (including size, depth and format)\n};\ntypedef struct DepthInfo DepthInfo;\n\nstruct ListIteratorDataRec {\n\tVDTimingInfoRec\t\t\tdisplayModeTimingInfo;\t\t// Contains timing flags and such\n\tunsigned long\t\t\tdepthBlockCount;\t\t\t// How many depths available for a particular timing\n\tDepthInfo\t\t\t\t*depthBlocks;\t\t\t\t// Array of DepthInfo\n};\ntypedef struct ListIteratorDataRec ListIteratorDataRec;\nvoid GetRequestTheDM2Way (\t\tVideoRequestRecPtr requestRecPtr,\n\t\t\t\t\t\t\t\tGDHandle walkDevice,\n\t\t\t\t\t\t\t\tDMDisplayModeListIteratorUPP myModeIteratorProc,\n\t\t\t\t\t\t\t\tDMListIndexType theDisplayModeCount,\n\t\t\t\t\t\t\t\tDMListType *theDisplayModeList);\n\npascal void ModeListIterator (\tvoid *userData,\n\t\t\t\t\t\t\t\tDMListIndexType itemIndex,\n\t\t\t\t\t\t\t\tDMDisplayModeListEntryPtr displaymodeInfo);\n\nBoolean FindBestMatch (\t\t\tVideoRequestRecPtr requestRecPtr,\n\t\t\t\t\t\t\t\tshort bitDepth,\n\t\t\t\t\t\t\t\tunsigned long horizontal,\n\t\t\t\t\t\t\t\tunsigned long vertical);\n\nint ioSetDisplayModeOLD(int width, int height, int depth, int fullscreenFlag);\n\nint ioSetDisplayModeOLD(int width, int height, int depth, int fullscreenFlag) {\n\t/* Set the window to the given width, height, and color depth. Put the window\n\t   into the full screen mode specified by fullscreenFlag. */\n\t\n\n    GDHandle\t\tdominantGDevice;\n\tHandle\t\t\tdisplayState;\n\tUInt32\t\t\tdepthMode=depth;\n\tlong\t\t\tvalue = 0,displayMgrPresent;\n\tDMDisplayModeListIteratorUPP\tmyModeIteratorProc = nil;\t\n\tDisplayIDType\ttheDisplayID;\t\t\t\t\n\tDMListIndexType\ttheDisplayModeCount;\t\t\n\tDMListType\t\ttheDisplayModeList;\t\t\t\n\tVideoRequestRec\trequest;\n\t\n\tif (gSqueakHeadless && !browserActiveAndDrawingContextOk()) return 0;\n\t\n\tGestalt(gestaltDisplayMgrAttr,&value);\n\tdisplayMgrPresent=value&(1<<gestaltDisplayMgrPresent);\n    if (!displayMgrPresent) {\n    \tsuccess(false);\n    \treturn 0;\n    }\n\n\tdominantGDevice = getThatDominateGDevice(getSTWindow());\n        if (dominantGDevice == null) {\n            success(false);\n            return 0;\n        }\n\trequest.screenDevice  = dominantGDevice;\n\trequest.reqBitDepth = depth;\n\trequest.reqHorizontal = width;\n\trequest.reqVertical = height;\n\trequest.requestFlags = 1<<kAbsoluteRequestBit;\n\trequest.displayMode = 0;\n\tmyModeIteratorProc = NewDMDisplayModeListIteratorUPP(ModeListIterator);\t// for DM2.0 searches\n\n\tif  (dominantGDevice && myModeIteratorProc) {\n\t\tif( noErr == DMGetDisplayIDByGDevice( dominantGDevice, &theDisplayID, false ) ) {\n\t\t\ttheDisplayModeCount = 0;\n\t\t\tif (noErr == DMNewDisplayModeList(theDisplayID, 0, 0, &theDisplayModeCount, &theDisplayModeList) ) {\n\t\t\t\tGetRequestTheDM2Way (&request, dominantGDevice, myModeIteratorProc, theDisplayModeCount, &theDisplayModeList);\n\t\t\t\tDMDisposeList(theDisplayModeList);\t\n\t\t\t} else {\n\t\t\t}\n\t\t}\n\t}\n\t\n\tif (myModeIteratorProc)\n\t\tDisposeDMDisplayModeListIteratorUPP(myModeIteratorProc);\n\tif (request.displayMode == 0)  {\n    \tsuccess(false);\n    \treturn 0;\n    }\n\tDMBeginConfigureDisplays(&displayState);\n\tDMSetDisplayMode(dominantGDevice,request.displayMode,&depthMode,null,displayState);\n\tDMEndConfigureDisplays(displayState);\n\tioSetFullScreen(fullscreenFlag);\n\t\n    return 1;\n}\n\n/*#\tMacOS Sample Code\n#\t\n#\tWritten by: Eric Anderson\n#\t email: eric3@apple.com\n#\n#\tDisplay Manager sample code\n#\tRequestVideo demonstrates the usage of the Display Manager introduced\n#\twith the PowerMacs and integrated into the system under System 7.5. With\n#\tthe RequestVideo sample code library, developers will be able to explore\n#\tthe Display Manager API by changing bit depth and screen resolution on\n#\tmultisync displays on built-in, NuBus, and PCI based video. Display Manager 1.0\n#\tis built into the Systems included with the first PowerMacs up through System 7.5.\n#\tDisplay Manager 2.0 is included with the release of the new PCI based PowerMacs,\n#\tand will be included in post 7.5 System Software releases. \n*/\n\npascal void ModeListIterator(void *userData, DMListIndexType itemIndex, DMDisplayModeListEntryPtr displaymodeInfo)\n{\n#pragma unused(itemIndex)\n\tunsigned long\t\t\tdepthCount;\n\tunsigned long\t\t\tiCount;\n\tListIteratorDataRec\t\t*myIterateData\t\t= (ListIteratorDataRec*) userData;\n\tDepthInfo\t\t\t\t*myDepthInfo;\n\t\n\t// set user data in a round about way\n\tmyIterateData->displayModeTimingInfo\t\t= *displaymodeInfo->displayModeTimingInfo;\n\t\n\t// now get the DMDepthInfo info into memory we own\n\tdepthCount = displaymodeInfo->displayModeDepthBlockInfo->depthBlockCount;\n\tmyDepthInfo = (DepthInfo*)NewPtrClear(depthCount * sizeof(DepthInfo));\n\n\t// set the info for the caller\n\tmyIterateData->depthBlockCount = depthCount;\n\tmyIterateData->depthBlocks = myDepthInfo;\n\n\t// and fill out all the entries\n\tif (depthCount) for (iCount=0; iCount < depthCount; iCount++)\n\t{\n\t\tmyDepthInfo[iCount].depthSwitchInfo = \n\t\t\t*displaymodeInfo->displayModeDepthBlockInfo->depthVPBlock[iCount].depthSwitchInfo;\n\t\tmyDepthInfo[iCount].depthVPBlock = \n\t\t\t*displaymodeInfo->displayModeDepthBlockInfo->depthVPBlock[iCount].depthVPBlock;\n\t}\n}\n\nvoid GetRequestTheDM2Way (\tVideoRequestRecPtr requestRecPtr,\n\t\t\t\t\t\t\tGDHandle walkDevice,\n\t\t\t\t\t\t\tDMDisplayModeListIteratorUPP myModeIteratorProc,\n\t\t\t\t\t\t\tDMListIndexType theDisplayModeCount,\n\t\t\t\t\t\t\tDMListType *theDisplayModeList)\n{\n\tDMListIndexType\t\t\tjCount;\n\tDMListIndexType\t\t\tkCount;\n\tListIteratorDataRec\t\tsearchData;\n\n\tsearchData.depthBlocks = nil;\n\t// get the mode lists for this GDevice\n\tfor (jCount=0; jCount<theDisplayModeCount; jCount++)\t\t// get info on all the resolution timings\n\t{\n\t\tDMGetIndexedDisplayModeFromList(*theDisplayModeList, jCount, 0, myModeIteratorProc, &searchData);\n\t\t\n\t\t// for all the depths for this resolution timing (mode)...\n\t\tif (searchData.depthBlockCount) for (kCount = 0; kCount < searchData.depthBlockCount; kCount++)\n\t\t{\n\t\t\t// only if the mode is valid and is safe or we override it with the kAllValidModesBit request flag\n\t\t\tif\t(\tsearchData.displayModeTimingInfo.csTimingFlags & 1<<kModeValid && \n\t\t\t\t\t(\tsearchData.displayModeTimingInfo.csTimingFlags & 1<<kModeSafe ||\n\t\t\t\t\t\trequestRecPtr->requestFlags & 1<<kAllValidModesBit\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t{\n\t\t\t\tif (FindBestMatch (\trequestRecPtr,\n\t\t\t\t\t\t\t\t\tsearchData.depthBlocks[kCount].depthVPBlock.vpPixelSize,\n\t\t\t\t\t\t\t\t\tsearchData.depthBlocks[kCount].depthVPBlock.vpBounds.right,\n\t\t\t\t\t\t\t\t\tsearchData.depthBlocks[kCount].depthVPBlock.vpBounds.bottom))\n\t\t\t\t{\n\t\t\t\t\trequestRecPtr->screenDevice = walkDevice;\n\t\t\t\t\trequestRecPtr->availBitDepth = searchData.depthBlocks[kCount].depthVPBlock.vpPixelSize;\n\t\t\t\t\trequestRecPtr->availHorizontal = searchData.depthBlocks[kCount].depthVPBlock.vpBounds.right;\n\t\t\t\t\trequestRecPtr->availVertical = searchData.depthBlocks[kCount].depthVPBlock.vpBounds.bottom;\n\t\t\t\t\t\n\t\t\t\t\t// now set the important info for DM to set the display\n\t\t\t\t\trequestRecPtr->depthMode = searchData.depthBlocks[kCount].depthSwitchInfo.csMode;\n\t\t\t\t\trequestRecPtr->displayMode = searchData.depthBlocks[kCount].depthSwitchInfo.csData;\n\t\t\t\t\trequestRecPtr->switchInfo = searchData.depthBlocks[kCount].depthSwitchInfo;\n\t\t\t\t\tif (searchData.displayModeTimingInfo.csTimingFlags & 1<<kModeSafe)\n\t\t\t\t\t\trequestRecPtr->availFlags = 0;\t\t\t\t\t\t\t// mode safe\n\t\t\t\t\telse requestRecPtr->availFlags = 1<<kModeValidNotSafeBit;\t// mode valid but not safe, requires user validation of mode switch\n\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\n\t\tif (searchData.depthBlocks)\n\t\t{\n\t\t\tDisposePtr ((Ptr)searchData.depthBlocks);\t// toss for this timing mode of this gdevice\n\t\t\tsearchData.depthBlocks = nil;\t\t\t\t// init it just so we know\n\t\t}\n\t}\n}\n\nBoolean FindBestMatch (VideoRequestRecPtr requestRecPtr, short bitDepth, unsigned long horizontal, unsigned long vertical)\n{\n\t//  do the big comparison \n\t// first time only if\t(no mode yet) and\n\t//\t\t\t\t\t\t(bounds are greater/equal or kMaximizeRes not set) and\n\t//\t\t\t\t\t\t(depth is less/equal or kShallowDepth not set) and\n\t//\t\t\t\t\t\t(request match or kAbsoluteRequest not set)\n\tif\t(\tnil == requestRecPtr->displayMode\n\t\t\t&&\n\t\t\t(\t(horizontal >= requestRecPtr->reqHorizontal &&\n\t\t\t\tvertical >= requestRecPtr->reqVertical)\n\t\t\t\t||\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t!(requestRecPtr->requestFlags & 1<<kMaximizeResBit)\t\n\t\t\t)\n\t\t\t&&\n\t\t\t(\tbitDepth <= requestRecPtr->reqBitDepth ||\t\n\t\t\t\t!(requestRecPtr->requestFlags & 1<<kShallowDepthBit)\t\t\n\t\t\t)\n\t\t\t&&\n\t\t\t(\t(horizontal == requestRecPtr->reqHorizontal &&\t\n\t\t\t\tvertical == requestRecPtr->reqVertical &&\n\t\t\t\tbitDepth == requestRecPtr->reqBitDepth)\n\t\t\t\t||\n\t\t\t\t!(requestRecPtr->requestFlags & 1<<kAbsoluteRequestBit)\t\n\t\t\t)\n\t\t)\n\t\t{\n\t\t\t// go ahead and set the new values\n\t\t\treturn (true);\n\t\t}\n\telse\t// can we do better than last time?\n\t{\n\t\t// if\t(kBitDepthPriority set and avail not equal req) and\n\t\t//\t\t((depth is greater avail and depth is less/equal req) or kShallowDepth not set) and\n\t\t//\t\t(avail depth less reqested and new greater avail)\n\t\t//\t\t(request match or kAbsoluteRequest not set)\n\t\tif\t(\t(\trequestRecPtr->requestFlags & 1<<kBitDepthPriorityBit && \n\t\t\t\t\trequestRecPtr->availBitDepth != requestRecPtr->reqBitDepth\n\t\t\t\t)\n\t\t\t\t&&\n\t\t\t\t(\t(\tbitDepth > requestRecPtr->availBitDepth &&\n\t\t\t\t\t\tbitDepth <= requestRecPtr->reqBitDepth\n\t\t\t\t\t)\n\t\t\t\t\t||\n\t\t\t\t\t!(requestRecPtr->requestFlags & 1<<kShallowDepthBit)\t\n\t\t\t\t)\n\t\t\t\t&&\n\t\t\t\t(\trequestRecPtr->availBitDepth < requestRecPtr->reqBitDepth &&\n\t\t\t\t\tbitDepth > requestRecPtr->availBitDepth\t\n\t\t\t\t)\n\t\t\t\t&&\n\t\t\t\t(\t(horizontal == requestRecPtr->reqHorizontal &&\t\n\t\t\t\t\tvertical == requestRecPtr->reqVertical &&\n\t\t\t\t\tbitDepth == requestRecPtr->reqBitDepth)\n\t\t\t\t\t||\n\t\t\t\t\t!(requestRecPtr->requestFlags & 1<<kAbsoluteRequestBit)\t\n\t\t\t\t)\n\t\t\t)\n\t\t{\n\t\t\t// go ahead and set the new values\n\t\t\treturn (true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// match resolution: minimize h & v\n\t\t\tif\t(\tabs((requestRecPtr->reqHorizontal - horizontal)) <=\n\t\t\t\t\tabs((requestRecPtr->reqHorizontal - requestRecPtr->availHorizontal)) &&\n\t\t\t\t\tabs((requestRecPtr->reqVertical - vertical)) <=\n\t\t\t\t\tabs((requestRecPtr->reqVertical - requestRecPtr->availVertical))\n\t\t\t\t)\n\t\t\t{\n\t\t\t\t// now we have a smaller or equal delta\n\t\t\t\t//\tif (h or v greater/equal to request or kMaximizeRes not set) \n\t\t\t\tif (\t(horizontal >= requestRecPtr->reqHorizontal &&\n\t\t\t\t\t\tvertical >= requestRecPtr->reqVertical)\n\t\t\t\t\t\t||\n\t\t\t\t\t\t!(requestRecPtr->requestFlags & 1<<kMaximizeResBit)\n\t\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t// if\t(depth is equal or kBitDepthPriority not set) and\n\t\t\t\t\t//\t\t(depth is less/equal or kShallowDepth not set) and\n\t\t\t\t\t//\t\t([h or v not equal] or [avail depth less reqested and new greater avail] or depth equal avail) and\n\t\t\t\t\t//\t\t(request match or kAbsoluteRequest not set)\n\t\t\t\t\tif\t(\t(\trequestRecPtr->availBitDepth == bitDepth ||\t\t\t\n\t\t\t\t\t\t\t\t!(requestRecPtr->requestFlags & 1<<kBitDepthPriorityBit)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t&&\n\t\t\t\t\t\t\t(\tbitDepth <= requestRecPtr->reqBitDepth ||\t\n\t\t\t\t\t\t\t\t!(requestRecPtr->requestFlags & 1<<kShallowDepthBit)\t\t\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t&&\n\t\t\t\t\t\t\t(\t(requestRecPtr->availHorizontal != horizontal ||\n\t\t\t\t\t\t\t\trequestRecPtr->availVertical != vertical)\n\t\t\t\t\t\t\t\t||\n\t\t\t\t\t\t\t\t(requestRecPtr->availBitDepth < requestRecPtr->reqBitDepth &&\n\t\t\t\t\t\t\t\tbitDepth > requestRecPtr->availBitDepth)\n\t\t\t\t\t\t\t\t||\n\t\t\t\t\t\t\t\t(bitDepth == requestRecPtr->reqBitDepth)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t&&\n\t\t\t\t\t\t\t(\t(horizontal == requestRecPtr->reqHorizontal &&\t\n\t\t\t\t\t\t\t\tvertical == requestRecPtr->reqVertical &&\n\t\t\t\t\t\t\t\tbitDepth == requestRecPtr->reqBitDepth)\n\t\t\t\t\t\t\t\t||\n\t\t\t\t\t\t\t\t!(requestRecPtr->requestFlags & 1<<kAbsoluteRequestBit)\t\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\t// go ahead and set the new values\n\t\t\t\t\t\treturn (true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn (false);\n}\n  \nint ioSetDisplayMode(int width, int height, int depth, int fullscreenFlag) {\n\t/* Set the window to the given width, height, and color depth. Put the window\n\t   into the full screen mode specified by fullscreenFlag. */\n\n    GDHandle\t\tdominantGDevice;\n\tCGDirectDisplayID\tmainDominateWindow;\n    CFDictionaryRef mode;\n\tCGDisplayErr err;\n\tboolean_t exactMatch;\n\t\n\tif (gSqueakHeadless && !browserActiveAndDrawingContextOk()) return 0;\n\n\tif (QDGetCGDirectDisplayID == NULL)\n\t\treturn ioSetDisplayMode( width,  height,  depth,  fullscreenFlag);\n\t\t\n\tdominantGDevice = getThatDominateGDevice(getSTWindow());\n       if (dominantGDevice == null) {\n            success(false);\n            return 0;\n        }\n\t\t\n\t\t\n\tmainDominateWindow = QDGetCGDirectDisplayID(dominantGDevice);\n\t\n\tmode = CGDisplayBestModeForParameters(mainDominateWindow, depth,  width, height,  &exactMatch);\n\terr = CGDisplaySwitchToMode(mainDominateWindow, mode);\n\tif ( err != CGDisplayNoErr ) {\n\t\treturn 0;\n\t}\n\n\tioSetFullScreen(fullscreenFlag);\n\t\n    return 1;\n}\n\nGDHandle\tgetThatDominateGDevice(WindowPtr window) {\n\tGDHandle\t\tdominantGDevice=NULL;\n\t\n\tif (!window) return NULL;\n\t\n\tGetWindowGreatestAreaDevice((WindowRef) window,kWindowContentRgn,&dominantGDevice,NULL); \t\n\treturn dominantGDevice;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqNamedPrims.h",
    "content": "/* This is an automatically generated table of all builtin modules in the VM */\n\nextern sqExport vm_exports[];\nextern sqExport os_exports[];\nextern sqExport ADPCMCodecPlugin_exports[];\nextern sqExport AsynchFilePlugin_exports[];\nextern sqExport B3DAcceleratorPlugin_exports[];\nextern sqExport Squeak3D_exports[];\nextern sqExport BMPReadWriterPlugin_exports[];\nextern sqExport B2DPlugin_exports[];\nextern sqExport BitBltPlugin_exports[];\nextern sqExport DSAPrims_exports[];\n//extern sqExport ExuperyPlugin_exports[];\nextern sqExport ZipPlugin_exports[];\nextern sqExport DropPlugin_exports[];\nextern sqExport FFTPlugin_exports[];\nextern sqExport FilePlugin_exports[];\nextern sqExport FloatArrayPlugin_exports[];\nextern sqExport GeniePlugin_exports[];\nextern sqExport HostWindowPlugin_exports[];\nextern sqExport InternetConfigPlugin_exports[];\nextern sqExport JPEGReadWriter2Plugin_exports[];\nextern sqExport JPEGReaderPlugin_exports[];\nextern sqExport JoystickTabletPlugin_exports[];\nextern sqExport Klatt_exports[];\nextern sqExport LargeIntegers_exports[];\nextern sqExport MIDIPlugin_exports[];\nextern sqExport MacMenubarPlugin_exports[];\nextern sqExport Matrix2x3Plugin_exports[];\nextern sqExport MiscPrimitivePlugin_exports[];\nextern sqExport RePlugin_exports[];\nextern sqExport SecurityPlugin_exports[];\nextern sqExport SerialPlugin_exports[];\nextern sqExport SocketPlugin_exports[];\nextern sqExport SoundCodecPrims_exports[];\nextern sqExport SoundGenerationPlugin_exports[];\nextern sqExport SoundPlugin_exports[];\nextern sqExport StarSqueakPlugin_exports[];\nextern sqExport SurfacePlugin_exports[];\nextern sqExport UUIDPlugin_exports[];\n\nsqExport *pluginExports[] = {\n\tvm_exports,\n\tos_exports,\n\tADPCMCodecPlugin_exports,\n\tAsynchFilePlugin_exports,\n\tB3DAcceleratorPlugin_exports,\n\tSqueak3D_exports,\n\tBMPReadWriterPlugin_exports,\n\tB2DPlugin_exports,\n\tBitBltPlugin_exports,\n\tDSAPrims_exports,\n// \tExuperyPlugin_exports,\n\tZipPlugin_exports,\n\tDropPlugin_exports,\n\tFFTPlugin_exports,\n\tFilePlugin_exports,\n\tFloatArrayPlugin_exports,\n\tGeniePlugin_exports,\n\tHostWindowPlugin_exports,\n\tInternetConfigPlugin_exports,\n\tJPEGReadWriter2Plugin_exports,\n\tJPEGReaderPlugin_exports,\n\tJoystickTabletPlugin_exports,\n\tKlatt_exports,\n\tLargeIntegers_exports,\n\tMacMenubarPlugin_exports,\n\tMIDIPlugin_exports,\n\tMatrix2x3Plugin_exports,\n\tMiscPrimitivePlugin_exports,\n\tRePlugin_exports,\n\tSecurityPlugin_exports,\n\tSerialPlugin_exports,\n\tSocketPlugin_exports,\n\tSoundCodecPrims_exports,\n\tSoundGenerationPlugin_exports,\n\tSoundPlugin_exports,\n\tStarSqueakPlugin_exports,\n\tSurfacePlugin_exports,\n\tUUIDPlugin_exports,\n\tNULL\n};\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/sqPlatformSpecific.h",
    "content": "/****************************************************************************\n*   PROJECT: Platform-specific prototypes and definitions for the mac\n*   FILE:    sqPlatformSpecific.h\n*   CONTENT: \n*\n*   AUTHOR:  John Maloney, John McIntosh, and others.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqPlatformSpecific.h 1708 2007-06-10 00:40:04Z johnmci $\n*\n*   Jan 22nd 2002, JMM type for squeak file offset\n*   May 5th, 2002, JMM added define for plugin for CW\n*   May 12th, 2002, JMM added SQUEAK_BUILTIN_PLUGIN for CW Pro\n*   3.2.8b1 July 24th, 2002 JMM support for os-x plugin under IE 5.x\n*   3.5.1  May 28th, 2003 JMM SQUEAK_BUILTIN_PLUGIN in PB defs\n*\t3.8.8b2 May 23rd, 2005 JMM Undef 64bit procedure function ptrs\n*\t3.8.14b1 Oct\t,2006 JMM browser rewrite\n*\n   How to use this file:\n   This file is for general platform-specific macros and declarations.\n   Function prototypes that are unlikely to introduce name conflicts on\n   other platforms can be added directly. Macro re-definitions or conflicting\n   function prototypes can be wrapped in a #ifdefs. Alternatively, a customized\n   version of this file can be used on that platform. The goal is to keep all\n   the other header files generic across platforms. To override a definition or\n   macro from sq.h, you must first #undef it, then provide the new definition.\n   \n   Define plugin for Netscape Plugin building, needed for CodeWarrior\n*/\n\n#ifdef macintoshSqueak\n#if defined(TARGET_API_MAC_CARBON)\n# include <Types.h>\n#endif\n#define ENABLE_URL_FETCH\n/* replace the image file manipulation macros with functions */\n#undef sqImageFile\n#undef sqImageFileClose\n#undef sqImageFileOpen\n#undef sqImageFilePosition\n#undef sqImageFileRead\n#undef sqImageFileSeek\n#undef sqImageFileWrite\n\n#undef sqAllocateMemory\n\n//64bit function pointers undef\n#undef dispatchFunctionPointer\n#undef dispatchFunctionPointerOnin\n\n#undef squeakFileOffsetType\n#define squeakFileOffsetType off_t\n\n#include <unistd.h> /* for declaration of ftruncate */\n\n#undef sqFTruncate\n/* sqFTruncate should return 0 on success, ftruncate does also */\n#define sqFTruncate(f,o) ftruncate(fileno(f), o)\n#define ftell ftello\n#define fseek fseeko\n\ntypedef FILE *sqImageFile;\n\n#undef sqFilenameFromStringOpen\n#undef sqFilenameFromString\nvoid\t\tsqFilenameFromStringOpen(char *buffer,sqInt fileIndex, long fileLength);\nvoid\t\tsqFilenameFromString(char *buffer,sqInt fileIndex, long fileLength);\nvoid        sqImageFileClose(sqImageFile f);\nsqImageFile sqImageFileOpen(char *fileName, char *mode);\nsqueakFileOffsetType       sqImageFilePosition(sqImageFile f);\nsize_t      sqImageFileRead(void *ptr, size_t elementSize, size_t count, sqImageFile f);\nvoid        sqImageFileSeek(sqImageFile f, squeakFileOffsetType pos);\nsqInt       sqImageFileWrite(void *ptr, size_t elementSize, size_t count, sqImageFile f);\n\n#define allocateMemoryMinimumImageFileHeaderSize(heapSize, minimumMemory, fileStream, headerSize) \\\n\tsqAllocateMemoryMac(heapSize, minimumMemory)\nusqInt\t    sqAllocateMemoryMac(sqInt minHeapSize, sqInt *desiredHeapSize);\n\n\n#define sqAllocateMemory(x,y) sqAllocateMemoryMac(x,&y);\n\n/* override reserveExtraCHeapBytes() macro to reduce Squeak object heap size on Mac */\n#undef reserveExtraCHeapBytes\n#define reserveExtraCHeapBytes(origHeapSize, bytesToReserve) (origHeapSize - bytesToReserve)\n\n/* undefine clock macros that are implemented as functions */\n#undef ioLowResMSecs\n#undef ioMicroMSecs\n#undef ioMSecs\n#if STACKVM /* In the Cog VMs time management is in sqUnixHeartbeat.c */\n#define ioLowResMSecs ioMSecs /* i.e. use ioMSecs in sqUnixHeartbeat.c */\n#else\n#define ioMSecs ioMicroMSecs\n#endif\n\n/* macro to return from interpret() loop in browser plugin VM */\n#define ReturnFromInterpret() return 0\n\n// CARBON\n\n#ifdef TARGET_API_MAC_CARBON  \n# undef TARGET_API_MAC_CARBON\n# define TARGET_API_MAC_CARBON 1\n#endif \n\n#if defined(TARGET_API_MAC_CARBON)\n/* prototypes missing from CW11 headers */\n#include <TextUtils.h>\nvoid CopyPascalStringToC(ConstStr255Param src, char* dst);\nvoid CopyCStringToPascal(const char* src, Str255 dst);\n#endif\n\n/* undef the memory routines for our logic */\n#undef sqGrowMemoryBy\n#undef sqShrinkMemoryBy\n#undef sqMemoryExtraBytesLeft\n\nsqInt sqGrowMemoryBy(sqInt memoryLimit, sqInt delta);\nsqInt sqShrinkMemoryBy(sqInt memoryLimit, sqInt delta);\nsqInt sqMemoryExtraBytesLeft(int flag);\n#if COGVM\nextern void sqMakeMemoryExecutableFromTo(unsigned long, unsigned long);\nextern void sqMakeMemoryNotExecutableFromTo(unsigned long, unsigned long);\n\nextern int isCFramePointerInUse(void);\n#endif\n\n/* warnPrintf is provided (and needed) on the win32 platform.\n * But it may be mentioned elsewhere, so provide a suitable def.\n */\n#define warnPrintf printf\n\n/* Thread support for thread-safe signalSemaphoreWithIndex and/or the COGMTVM */\n#if STACKVM\n# define sqLowLevelYield() sched_yield()\n# include <pthread.h>\n# define sqOSThread pthread_t\n/* these are used both in the STACKVM & the COGMTVM */\n# define ioOSThreadsEqual(a,b) pthread_equal(a,b)\n# define ioCurrentOSThread() pthread_self()\n# if COGMTVM\n/* Please read the comment for CogThreadManager in the VMMaker package for\n * documentation of this API.\n */\ntypedef struct {\n\t\tpthread_cond_t\tcond;\n\t\tpthread_mutex_t mutex;\n\t\tint\t\t\t\tcount;\n\t} sqOSSemaphore;\n#  define ioDestroyOSSemaphore(ptr) 0\n#  if !ForCOGMTVMImplementation /* this is a read-only export */\nextern const pthread_key_t tltiIndex;\n#  endif\n#  define ioGetThreadLocalThreadIndex() ((long)pthread_getspecific(tltiIndex))\n#  define ioSetThreadLocalThreadIndex(v) (pthread_setspecific(tltiIndex,(void*)(v)))\n#  define ioOSThreadIsAlive(thread) (pthread_kill(thread,0) == 0)\n#  define ioTransferTimeslice() sched_yield()\n#  define ioMilliSleep(ms) usleep((ms) * 1000)\n# endif /* COGMTVM */\n#endif /* STACKVM */\n\n#ifdef BROWSERPLUGIN\n# undef insufficientMemorySpecifiedError\n# undef insufficientMemoryAvailableError\n# undef unableToReadImageError\n# undef browserPluginReturnIfNeeded\n# undef browserPluginInitialiseIfNeeded\n# define insufficientMemorySpecifiedError() plugInNotifyUser(\"The amount of memory specified by the 'memory' EMBED tag is not enough for the installed Squeak image file.\")\n# define insufficientMemoryAvailableError() plugInNotifyUser(\"There is not enough memory to give Squeak the amount specified by the 'memory' EMBED tag.\")\n# define unableToReadImageError() plugInNotifyUser(\"Read failed or premature end of image file\")\n# define browserPluginReturnIfNeeded() if (plugInTimeToReturn()) {ReturnFromInterpret();}\n# define browserPluginInitialiseIfNeeded()\n#endif\n\n//exupery\n#define addressOf(x) &x\n\n// From Joshua Gargus, for XCode 3.1\n#ifdef __GNUC__\n# undef EXPORT\n# define EXPORT(returnType) __attribute__((visibility(\"default\"))) returnType\n# define VM_LABEL(foo) asm(\"\\n.globl L\" #foo \"\\nL\" #foo \":\")\n#endif\n\n#if !defined(VM_LABEL) || COGVM\n# undef VM_LABEL\n# define VM_LABEL(foo) 0\n#endif\n#endif /* macintoshSqueak */\n"
  },
  {
    "path": "vm/src/from_squeak/Mac OS/vm/version.c",
    "content": "#if !defined __VERSION__\r\n#\tdefine __VERSION__ \"Unknown\"\r\n#endif\r\n\r\nchar vmBuildString[] = \"Mac OS X built on \"__DATE__\" \"__TIME__\" Compiler: \"__VERSION__;\r\n"
  },
  {
    "path": "vm/src/from_squeak/README.rst",
    "content": "From Squeak - The Upstream Sources of the SqueakVM\n==================================================\n\nThis directory contains the upstream sources of the SqueakVM.\nCurrently, we are only sharing the code for VM plugins.\n\nThe subdirectories contain the platform specific code for the platform\nindicated by the folders name.\n\nThe `intplugins` folder contains the sources generated by VMMaker.\nThat is, it contains the sources for iOS and unix plugins.\nThey happen to be identical beside that some plugins are not supported for\nboth platforms.\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/B3DAcceleratorPlugin/sqMacOpenGL.c",
    "content": "/****************************************************************************\n*   PROJECT: Squeak 3D accelerator\n*   FILE:    sqMacOpenGL.c\n*   CONTENT: MacOS specific bindings for OpenGL\n*\n*   AUTHOR:  Andreas Raab (ar)\n*   ADDRESS: Walt Disney Imagineering, Glendale, CA\n*   EMAIL:   Andreas.Raab@disney.com\n*   RCSID:   $Id: sqMacOpenGL.c 1367 2006-03-21 06:49:10Z johnmci $\n* \n*   NOTES:\n*\n*\tChanges May 14th 2001 John M McIntosh Carbon support\n*   Changes Jun 2001 JMM browser internal plugin support\n* \tChanges Jan 2002 JMM carbon cleanup\n*  Feb 26th, 2002, JMM - use carbon get dominate device \n*  Apr 3rd, 2003, JMM - use BROWSERPLUGIN \n*\n*****************************************************************************/\n#include <stdio.h>\n#include <stdlib.h>\n\n#include <Carbon/Carbon.h>\n#include <unistd.h>\n#include <AGL/agl.h>\n#include <AGL/gl.h>\n#include <OpenGL/OpenGL.h>\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n#include \"sqMacUIConstants.h\"\n#include \"B3DAcceleratorPlugin.h\"\n#include \"sqMacOpenGL.h\"\n#include \"sqOpenGLRenderer.h\"\n\n#define INTERNAL\n\n#ifdef BROWSERPLUGIN\n#include \"npapi.h\"\n#endif\n\nint printRendererInfo(void);\nint printFormatInfo(AGLPixelFormat info);\n\nstatic glRenderer *current = NULL;\nstatic glRenderer allRenderer[MAX_RENDERER];\ntypedef int (*eventMessageHook)(EventRecord* event);\n\n#ifdef INTERNAL\n#ifdef BROWSERPLUGIN\nint gPortX,gPortY;\nextern NP_Port *getNP_Port(void);\n#endif\nvoid StartDraw(void);\nvoid EndDraw(void);\nextern WindowPtr getSTWindow(void);\nextern int setMessageHook(eventMessageHook theHook);\nextern int setPostMessageHook(eventMessageHook theHook);\nextern GDHandle getDominateDevice(WindowPtr theWindow,Rect *windRect);\n#else\ntypedef WindowPtr (*getSTWindowFn)(void);\ngetSTWindowFn getSTWindow = 0;\neventMessageHook setMessageHook = 0;\n#endif\n\n\n/* Verbose level for debugging purposes:\n\t0 - print NO information ever\n\t1 - print critical debug errors\n\t2 - print debug warnings\n\t3 - print extra information\n\t4 - print extra warnings\n\t5 - print information about primitive execution\n\n   10 - print information about each vertex and face\n*/\nextern int verboseLevel;\n/* define forceFlush if we should fflush() before closing file */\n#define forceFlush 1\n\n//#include \"sqMacFileLogic.h\"\t\n\n/* Note: Print this stuff into a file in case we lock up*/\n#undef DPRINTF3D\n# define DPRINTF3D(vLevel, args) if(vLevel <= verboseLevel) {\\\n\tchar fileName[DOCUMENT_NAME_SIZE+1]; \\\n\tsqFilenameFromStringOpen(fileName,(sqInt) &\"Squeak3D.log\", strlen(\"Squeak3D.log\")); \\\n\tFILE *fp = fopen(fileName, \"at\");\\\n\tif(fp) { fprintf args; if(forceFlush) fflush(fp); fclose(fp); }}\n        \n/* Plugin refs */\nextern struct VirtualMachine *interpreterProxy;\nstatic float blackLight[4] = { 0.0f, 0.0f, 0.0f, 0.0f };\n\n/*****************************************************************************/\n/*****************************************************************************/\n/*                      Mac event hook                                       */\n/*****************************************************************************/\n/*****************************************************************************/\n\nstatic int macEventHook(EventRecord *event) {\n\tAGLDrawable win;\n\tint result;\n\tint i,windowCode;\n\tBoolean windowHasChanged=false;\n\tWindowPtr checkMouseDown,checkMouseUp;\n\tstatic WindowPtr oldWindow = NULL;\n\n#ifdef BROWSERPLUGIN\n\tNP_Port\t*anNPPort;\n\t\n#endif\t\t\n\n\tif (oldWindow == NULL) \n\t\toldWindow = getSTWindow();\n\t\n\tresult = 0;\n\tswitch(event->what) {\n\t\tcase osEvt:\n\t\t\tif (((event->message>>24)& 0xFF) != suspendResumeMessage) return 0;\n\t\t\tDPRINTF3D(5, (fp, \"<Mac event: suspendResumeMessage>\\n\"));\n\t\t\tbreak;\n\t\tcase activateEvt:\n\t\t\tDPRINTF3D(5, (fp, \"<Mac event: activateEvt>\\n\"));\n\t\t\tbreak;\n\t\tcase updateEvt:\n\t\t\tDPRINTF3D(5, (fp, \"<Mac event: updateEvt>\\n\"));\n\t\t\tbreak;\n\t\tcase mouseDown:\n\t\t\tDPRINTF3D(5, (fp, \"<Mac event: mouseDown>\\n\"));\n\t\t\twindowCode = FindWindow(event->where, &checkMouseDown);\n\t\t\tif (windowCode == inContent)\n\t\t\t\treturn 0;\n\n\t\t\tbreak;\n\t\tcase mouseUp:\n\t\t\tDPRINTF3D(5, (fp, \"<Mac event: mouseUp>\\n\"));\n\t\t\twindowCode = FindWindow(event->where, &checkMouseUp);\n\t\t\tif (windowCode == inContent)\n\t\t\t\treturn 0;\n\n\t\t\tbreak;\n\t\tdefault: \n\t\t\t#ifdef BROWSERPLUGIN\n\t\t\tif (oldWindow != getSTWindow()) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\twindowHasChanged = true;\n\t\t\t}\n\t\t\t\n\t\t\tanNPPort = getNP_Port();\n\t\t\tif (!(anNPPort->portx == gPortX && anNPPort->porty == gPortY)) {\n\t\t\t\twindowHasChanged = true;\n\t\t\t}\n\t\t\t\n\t\t\tif (windowHasChanged) \n\t\t\t\tbreak;\n\t\t\t#endif\n\t\t\t\n\t\t\treturn 0;\n\t\t\t\n\t}\n\twin = (AGLDrawable) getSTWindow();\n\tif(!win) return 0;\n\tfor(i=0; i< MAX_RENDERER; i++) {\n\t\tglRenderer *renderer = allRenderer+i;\n\t\tif(renderer->used) {\n\t\t\tif (renderer->drawable == win || (WindowPtr) renderer->drawable == oldWindow) {\n\t\t\t\tint\t\tx,y,w,h;\n\t\t\t\tRect\tportRect;\n\t\t\t\tGLint \tbufferRect[4];\n\t\t\t\tCGrafPtr\twindowPort;\n\t\t\t\t\n\t\t\t\t#ifdef BROWSERPLUGIN\n\t\t\t\t\tStartDraw();\n\t\t\t\t\tanNPPort = getNP_Port();\n\t\t \t\t\tgPortX = anNPPort->portx;\n\t\t \t\t\tgPortY = anNPPort->porty;\n\t\t\t\t\tx = renderer->bufferRect[0] - gPortX;\n\t\t\t\t\ty = renderer->bufferRect[1] - gPortY;\n\t \t\t\t#else\n\t\t\t\t\tx = renderer->bufferRect[0];\n\t\t\t\t\ty = renderer->bufferRect[1];\n\t\t\t\t#endif \n\t\t\t\tw = renderer->bufferRect[2];\n\t\t\t\th = renderer->bufferRect[3];\n\n\t\t\t\twindowPort = GetWindowPort((WindowPtr)win);\n\t\t\t\tGetPortBounds(windowPort,&portRect);\n\t\t\t\t\n\t\t\t\tbufferRect[0] = x;\n\t\t\t\tbufferRect[1] = portRect.bottom - portRect.top - (y+h);\n\t\t\t\tbufferRect[2] = w;\n\t\t\t\tbufferRect[3] = h;\n\n\t\t\t\t// aglSetDrawable(renderer->context,nil);\n\t\t\t\trenderer->drawable = (AGLDrawable) win;\t\t\n\t\t\t\taglSetDrawable(renderer->context,windowPort);\n\t\t\t\taglSetInteger(renderer->context, AGL_BUFFER_RECT, bufferRect);\n\t\t\t\taglUpdateContext(renderer->context);\n\t\t\t\twindowHasChanged = false;\n\t\t\t\t#ifdef BROWSERPLUGIN\n\t\t\t\t\tEndDraw();\n\t\t\t\t#endif\n\t\t\t} \n\t\t}\n\t}\n\toldWindow = getSTWindow();\n\treturn result;\n}\n\n/*****************************************************************************/\n/*****************************************************************************/\n/*                      Renderer creation primitives                         */\n/*****************************************************************************/\n/*****************************************************************************/\n\nint glDestroyRenderer(int handle)\n{\n\tglRenderer *renderer = glRendererFromHandle(handle);\n\n\tif(!renderer) return 1; /* already destroyed */\n\n\t/* Now really destroy the renderer */\n\tif(renderer->drawable) {\n\t\t/* was a direct drawable */\n\t\taglSetDrawable(renderer->context, NULL);\n\t}\n\tif(renderer == current)\n\t\tglMakeCurrentRenderer(NULL);\n\taglDestroyContext(renderer->context);\n\tif(renderer->gWorld) {\n\t\tUnlockPixels(renderer->pixMap);\n\t\tDisposeGWorld(renderer->gWorld);\n\t}\n\trenderer->context = (AGLContext) NULL;\n\trenderer->drawable = (AGLDrawable) NULL;\n\trenderer->gWorld = NULL;\n\trenderer->used = 0;\n\treturn 1;\n}\n\n/*\n * Is ARB_Multisample supported?\n */\nstatic int glHasARBMultisampling () {\n\n\t/* We need an open gl connection in which to test for extensions,\n\t * so we setup a throwaway context.\n\t */\n\tGLint attrib[] = { AGL_RGBA, AGL_NONE};\n\tAGLContext ctx;\n\tAGLPixelFormat fmt = aglChoosePixelFormat(NULL, 0, attrib);\n\t\n\tif (! fmt) { return 0; }\n\tctx = aglCreateContext(fmt, NULL);\n\taglDestroyPixelFormat(fmt);\n\tif (! ctx) {\n\t\treturn 0;\n\t}\n\taglSetCurrentContext(ctx);\n\tint result = gluCheckExtension((const GLubyte*) \"GL_ARB_multisample\", glGetString(GL_EXTENSIONS));\n\taglDestroyContext(ctx);\n\t\n\treturn result;\n}\n\n\nint glCreateRendererFlags(int x, int y, int w, int h, int flags)\n{\n \tint index, i, allowSoftware, allowHardware;\n \tGLint          hwAttrib[] = { AGL_STENCIL_SIZE, 0, AGL_RGBA, AGL_DOUBLEBUFFER, AGL_ACCELERATED, AGL_DEPTH_SIZE, 16, \n\t\t\t\t      AGL_SAMPLE_BUFFERS_ARB, 1, AGL_SAMPLES_ARB, 4, AGL_MULTISAMPLE, AGL_NO_RECOVERY, AGL_NONE};\n\t\t\t\t      /* Note - we honor antialiasing requests only for hardware renderers. */\n \tGLint          swAttrib[] = { AGL_STENCIL_SIZE, 0, AGL_RGBA, AGL_PIXEL_SIZE, 0, AGL_OFFSCREEN, AGL_DEPTH_SIZE, 16, AGL_NONE };\n\tAGLPixelFormat fmt;\n\tAGLContext     ctx;\n\tGLboolean      ok;\n\tGLenum         err;\n\tAGLDrawable    win;\n\tglRenderer     *renderer;\n\tchar *string;\n\tGDHandle tempGDH;\n        Rect ignore;\n \tlong swapInterval = 0;\n\n #define SUPPORTED_FLAGS (B3D_HARDWARE_RENDERER | B3D_SOFTWARE_RENDERER | B3D_STENCIL_BUFFER | B3D_ANTIALIASING | B3D_STEREO | B3D_SYNCVBL)\n         if(flags & ~SUPPORTED_FLAGS) {\n             DPRINTF3D(1, (fp, \"ERROR: Unsupported renderer flags (%d)\\n\", flags));\n             return -1;\n         }\n #undef SUPPORTED_FLAGS\n \n         /* interpret renderer flags */\n         allowSoftware = (flags & B3D_SOFTWARE_RENDERER) != 0;\n         allowHardware = (flags & B3D_HARDWARE_RENDERER) != 0;\n         if(flags & B3D_STENCIL_BUFFER) {\n             hwAttrib[1] = 1;\n             swAttrib[1] = 1;\n         }\n\n\t /* enable/disable stereo requests */\n\t if(flags & B3D_STEREO) {\n\t   return -1; /* not supported for now */\n\t }\n\n\t/* Suppress the multisampling flags if antialiasing is not requested (or not supported.) */\n\tif (! ((flags & B3D_ANTIALIASING) && glHasARBMultisampling())) {\n\t\thwAttrib[7] = AGL_NONE;\n\t}\n\t\n\tfor(index=0; index < MAX_RENDERER; index++) {\n\t\tif(allRenderer[index].used == 0) break;\n\t}\n\tif(index >= MAX_RENDERER) {\n\t\tDPRINTF3D(1, (fp, \"ERROR: Maximum number of renderers (%d) exceeded\\n\", MAX_RENDERER));\n\t\treturn 0;\n\t}\n\trenderer = allRenderer+index;\n\trenderer->used = 0;\n\trenderer->finished = 0;\n\trenderer->context = NULL;\n\trenderer->drawable = NULL;\n\trenderer->gWorld = NULL;\n\n#ifdef INTERNAL\n\tif (! getSTWindow()) {\n\t\treturn 0;\n\t}\n        GetWindowGreatestAreaDevice(getSTWindow(),kWindowContentRgn,&tempGDH,&ignore); \n        if (tempGDH == nil) \n            return -1;\n\tswAttrib[2] = (*(*tempGDH)->gdPMap)->pixelSize;\n#else\n\tswAttrib[2] = (*(*GetMainDevice())->gdPMap)->pixelSize;\n#endif\n\tif(swAttrib[2] < 16) swAttrib[2] = 16;\n\n\t/* Choose an rgb pixel format */\n\tfor(i = 0; i<2; i++) {\n\t\tif( (i == 0) && !allowHardware) continue;\n\t\tif( (i == 1) && !allowSoftware) continue;\n\t\tctx = 0;\n\t\tif(i == 0) {\n\t\t\tDPRINTF3D(3, (fp, \"### Attempting to find hardware renderer\\n\"));\n\t\t\twin = (AGLDrawable) getSTWindow();\n\t\t\tif(!win) {\n\t\t\t\tDPRINTF3D(1, (fp, \"ERROR: stWindow is invalid (NULL)\\n\"));\n\t\t\t\tgoto FAILED;\n\t\t\t}\n\t\t\tfmt = aglChoosePixelFormat(NULL, 0, hwAttrib);\n\t\t} else {\n\t\t\tDPRINTF3D(3, (fp, \"### Attempting to find software renderer\\n\"));\n\t\t\twin = NULL;\n\t\t\tfmt = aglChoosePixelFormat(NULL, 0, swAttrib);\n\t\t}\n\t\tDPRINTF3D(3, (fp,\"\\tx: %d\\n\\ty: %d\\n\\tw: %d\\n\\th: %d\\n\", x, y, w, h));\n\n\t\tif((err = aglGetError()) != AGL_NO_ERROR) DPRINTF3D(3,(fp,\"aglGetError - %s\\n\", aglErrorString(err)));\n\t\tif(fmt == NULL) {\n\t\t\tDPRINTF3D(1, (fp, \"ERROR: aglChoosePixelFormat failed\\n\"));\n\t\t\tgoto FAILED;\n\t\t}\n\n\t\tprintFormatInfo(fmt);\n\n\t\t/* Create an AGL context */\n\t\tctx = aglCreateContext(fmt, NULL);\n\t\tif((err = aglGetError()) != AGL_NO_ERROR) DPRINTF3D(3,(fp,\"aglGetError - %s\\n\", aglErrorString(err)));\n\t\t/* The pixel format is no longer needed */\n\t\taglDestroyPixelFormat(fmt);\n\t\tif(ctx == NULL) {\n\t\t\tDPRINTF3D(1, (fp, \"ERROR: aglCreateContext failed\\n\"));\n\t\t\tgoto FAILED;\n\t\t}\n\n\t\tif(i == 0) {\n\t\t\tGLint bufferRect[4];\n\t\t\tRect\tportRect; \n\t\t\t\n#ifdef BROWSERPLUGIN\n\n\t\t\tNP_Port\t*anNPPort;\n\t\t\t\n\t\t\tStartDraw();\n \t\t\twin = (AGLDrawable) getSTWindow();\n \t\t\tanNPPort = getNP_Port();\n \t\t\t\n\t\t\tGetPortBounds(GetWindowPort((WindowPtr)win),&portRect);\n\t\t\tbufferRect[0] = x - anNPPort->portx;\n\t\t\tbufferRect[1] = portRect.bottom - portRect.top - (y+h)  + anNPPort->porty;\n\t\t\tbufferRect[2] = w;\n\t\t\tbufferRect[3] = h;\n\t\t\tEndDraw();\n#else\n\t\t\tGetPortBounds(GetWindowPort((WindowPtr)win),&portRect);\n\t\t\tbufferRect[0] = x;\n\t\t\tbufferRect[1] = portRect.bottom - portRect.top - (y+h);\n\t\t\tbufferRect[2] = w;\n\t\t\tbufferRect[3] = h;\n#endif\t\t\n\n\t\t\t/* hardware renderer; attach buffer rect and window */\n\t\t\tok = aglEnable(ctx, AGL_BUFFER_RECT);\n\t\t\tif((err = aglGetError()) != AGL_NO_ERROR) \n\t\t\t\tDPRINTF3D(3,(fp,\"aglEnable(AGL_BUFFER_RECT) failed: aglGetError - %s\\n\", aglErrorString(err)));\n\t\t\tif(!ok) goto FAILED;\n\t\t\tok = aglSetInteger(ctx, AGL_BUFFER_RECT, bufferRect);\n\t\t\tif((err = aglGetError()) != AGL_NO_ERROR) \n\t\t\t\tDPRINTF3D(3,(fp,\"aglSetInteger(AGL_BUFFER_RECT) failed: aglGetError - %s\\n\", aglErrorString(err)));\n\t\t\tif(!ok) goto FAILED;\n\t\t\t/* Attach the context to the target */\n\t\t\tok = aglSetDrawable(ctx,GetWindowPort( (WindowPtr)win));\n\t\t\tif((err = aglGetError()) != AGL_NO_ERROR) \n\t\t\t\tDPRINTF3D(3,(fp,\"aglSetDrawable() failed: aglGetError - %s\\n\", aglErrorString(err)));\n\t\t\tif(!ok) goto FAILED;\n\t\t\trenderer->drawable = (AGLDrawable) win;\n\n\t\t\t/* Set VBL SYNC if requested */\n\t\t\tif(flags & B3D_SYNCVBL) swapInterval = 1;\n\t\t\taglSetInteger(ctx, AGL_SWAP_INTERVAL, &swapInterval);\n\t\t\n\t\t} else {\n\t\t\t/* software renderer; attach offscreen buffer to context */\n\t\t\tRect rect;\n\t\t\tQDErr qdErr;\n\n\t\t\trenderer->depth = swAttrib[2];\n\t\t\t/* Create the offscreen gworld */\n\t\t\tSetRect(&rect, 0, 0, w, h);\n\t\t\tqdErr = NewGWorld(&renderer->gWorld, (short) renderer->depth, &rect, NULL, NULL, useTempMem);\n\t\t\tif(qdErr || !renderer->gWorld) {\n\t\t\t\tDPRINTF3D(1,(fp,\"ERROR: Failed to create new GWorld\\n\"));\n\t\t\t\trenderer->gWorld = NULL;\n\t\t\t\tgoto FAILED;\n\t\t\t}\n\t\t\trenderer->pixMap = GetGWorldPixMap(renderer->gWorld);\n\t\t\tLockPixels(renderer->pixMap);\n\t\t\trenderer->pitch = (**(renderer->pixMap)).rowBytes & 0x7FFF;\n\t\t\trenderer->bits = (unsigned char*) GetPixBaseAddr(renderer->pixMap);\n\t\t\tok = aglSetOffScreen(ctx, w, h, renderer->pitch, renderer->bits);\n\t\t\tif((err = aglGetError()) != AGL_NO_ERROR) DPRINTF3D(3,(fp,\"aglGetError - %s\\n\", aglErrorString(err)));\n\t\t\tif(!ok) {\n\t\t\t\tDPRINTF3D(1, (fp, \"ERROR: aglSetOffScreen failed\\n\"));\n\t\t\t\tgoto FAILED;\n\t\t\t}\n\t\t}\n\t\trenderer->context = ctx;\n\t\trenderer->used = 1;\n\t\trenderer->finished = 0;\n\t\trenderer->bufferRect[0] = x;\n\t\trenderer->bufferRect[1] = y;\n\t\trenderer->bufferRect[2] = w;\n\t\trenderer->bufferRect[3] = h;\n\n\t\t/* Make the context the current context */\n\t\tglMakeCurrentRenderer(renderer);\n\n\t\t/* finally, try to enable multithreaded OpenGL */\n\t\tif (0) /* disable it, because it's broken */\n\t\t{\n\t\t\tCGLContextObj cglContext = CGLGetCurrentContext();\n\t\t\tCGLError cglErr =  CGLEnable( cglContext, kCGLCEMPEngine);\n\t\t\tif (cglErr != kCGLNoError ) {\n\t\t\t\tDPRINTF3D(3,(fp,\"CGLEnable(kCGLCEMPEngine) failed: cannot set multithreaded OpenGL\\n\"));\n\t\t\t\texit(0);\n\t\t\t}\n\t\t}\n\n\t\t/* print some information about the context */\n\t\tstring = (char*) glGetString(GL_VENDOR);\n\t\tDPRINTF3D(3,(fp, \"\\nOpenGL vendor: %s\\n\", string));\n\t\tstring = (char*) glGetString(GL_RENDERER);\n\t\tDPRINTF3D(3,(fp, \"OpenGL renderer: %s\\n\", string));\n\t\tstring = (char*) glGetString(GL_VERSION);\n\t\tDPRINTF3D(3,(fp, \"OpenGL version: %s\\n\", string));\n\t\tstring = (char*) glGetString(GL_EXTENSIONS);\n\t\tDPRINTF3D(3,(fp, \"OpenGL extensions: %s\\n\", string));\n\t\tERROR_CHECK;\n\n\t\tDPRINTF3D(3, (fp,\"### Renderer created! (id = %d)\\n\", index));\n\t\t/* setup user context */\n\t\tglDisable(GL_LIGHTING);\n\t\tglDisable(GL_COLOR_MATERIAL);\n\t\tglDisable(GL_BLEND);\n\t\tglDisable(GL_ALPHA_TEST);\n\t\tglEnable(GL_DITHER);\n\t\tglEnable(GL_DEPTH_TEST);\n\t\tglEnable(GL_NORMALIZE);\n\t\tglDepthFunc(GL_LEQUAL);\n\t\tglClearDepth(1.0);\n\t\tglHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);\n\t\tglShadeModel(GL_SMOOTH);\n\t\tglLightModelfv(GL_LIGHT_MODEL_AMBIENT, blackLight);\n\t\tERROR_CHECK;\n\n\t\treturn index;\nFAILED:\n\t\tif(ctx) aglDestroyContext(ctx);\n\t\tif(renderer->gWorld) DisposeGWorld(renderer->gWorld);\n\t}\n\treturn -1;\n}\n\n/*****************************************************************************/\n/*****************************************************************************/\n\nint glGetIntPropertyOS(int handle, int prop)\n{\n\tGLint v;\n\tglRenderer *renderer = glRendererFromHandle(handle);\n\tif(!renderer || !glMakeCurrentRenderer(renderer)) return 0;\n\n\tswitch(prop) {\n\t\tcase -1: /* vertical blank synchronization */\n\t\t\taglGetInteger(renderer->context, AGL_SWAP_INTERVAL, &v);\n\t\t\treturn v;\n\t}\n\treturn 0;\n}\n\nint glSetIntPropertyOS(int handle, int prop, int value)\n{\n\tglRenderer *renderer = glRendererFromHandle(handle);\n\tif(!renderer || !glMakeCurrentRenderer(renderer)) return 0;\n\n\tswitch(prop) {\n\t\tcase -1: /* vertical blank synchronization */\n\t\t\taglSetInteger(renderer->context, AGL_SWAP_INTERVAL, (GLint*) &value);\n\t\t\treturn 1;\n\t}\n\treturn 0;\n}\n\n\nglRenderer *glRendererFromHandle(int handle) {\n\tDPRINTF3D(7, (fp, \"Looking for renderer id: %d\\n\", handle));\n\tif(handle < 0 || handle >= MAX_RENDERER) return NULL;\n\tif(allRenderer[handle].used) return allRenderer+handle;\n\treturn NULL;\n}\n\nint glSwapBuffers(glRenderer *renderer) {\n\tGLint err;\n\n\tif(!renderer) return 0;\n\tif(!renderer->used || !renderer->context) return 0;\n\tif(renderer->drawable) {\n#ifdef BROWSERPLUGIN\n\t\tNP_Port\t*anNPPort;\n\t\t\n\t\tanNPPort = getNP_Port();\n\t\tif (!(anNPPort->portx == gPortX && anNPPort->porty == gPortY)) {\n\t\t\treturn 0;\n\t\t}\n#endif\n\t\taglSwapBuffers(renderer->context);\n\t\tif((err = aglGetError()) != AGL_NO_ERROR) DPRINTF3D(3,(fp,\"ERROR (glSwapBuffers): aglGetError - %s\\n\", aglErrorString(err)));\n\t\tERROR_CHECK;\n\t} else {\n\t\tWindowPtr win;\n\t\tRect src, dst, portBounds;\n\t\tGrafPtr oldPort,winPort;\n\t\tBoolean portChanged;\n\t\t\n\t\t/* ensure execution for offscreen contexts */\n\t\tglFinish();\n\t\tERROR_CHECK;\n\t\t/* Copy the image to the window */\n\t\t\n\t\twin =  getSTWindow();\n\t\tif(!win) return 0;\n\t\t\n\t\twinPort = (GrafPtr) GetWindowPort((WindowRef) win);\n#ifdef BROWSERPLUGIN\n\t\tStartDraw();\n#else\n\t\tportChanged = QDSwapPort(winPort, &oldPort);\n\t\tGetPortBounds((CGrafPtr) winPort,&portBounds);\n\n//  Draw into the new port here\n\n#endif\t\t\n\t\tSetRect(&src, 0, 0, renderer->bufferRect[2], renderer->bufferRect[3]);\n\t\tSetRect(&dst, renderer->bufferRect[0], renderer->bufferRect[1], \n\t\t\t\trenderer->bufferRect[0] + renderer->bufferRect[2],\n\t\t\t\trenderer->bufferRect[1] + renderer->bufferRect[3]);\n\t\tCopyBits(GetPortBitMapForCopyBits(renderer->gWorld), GetPortBitMapForCopyBits((CGrafPtr) winPort), &src, &dst, srcCopy, NULL);\n#ifdef BROWSERPLUGIN\n\t\tEndDraw();\n#else\n\t\tif (portChanged)\n\t\t\tQDSwapPort(oldPort, NULL);\n#endif\t\t\n\t}\n\treturn 1;\n}\n\nint glMakeCurrentRenderer(glRenderer *renderer) {\n\tGLboolean ok;\n\tGLint err;\n\n\tif(current == renderer) return 1;\n\tif(renderer)\n\t\tif(!renderer->used || !renderer->context) return 0;\n\t// ERROR_CHECK;\n\tok = aglSetCurrentContext(renderer ? renderer->context : NULL);\n\tif((err = aglGetError()) != AGL_NO_ERROR) DPRINTF3D(3,(fp,\"ERROR (glMakeCurrentRenderer): aglGetError - %s\\n\", aglErrorString(err)));\n\tif(!ok) {\n\t\tDPRINTF3D(1, (fp, \"ERROR (glMakeCurrentRenderer): aglSetCurrentContext failed\\n\"));\n\t\treturn 0;\n\t}\n\t// ERROR_CHECK;\n\tcurrent = renderer;\n\treturn 1;\n}\n\nint glSetBufferRect(int handle, int x, int y, int w, int h) {\n\tglRenderer *renderer = glRendererFromHandle(handle);\n\tif(!renderer || !glMakeCurrentRenderer(renderer)) return 0;\n\tif(renderer->drawable) {\n\t\t/* hardware renderer */\n\t\tGLboolean ok;\n\t\tGLenum err;\n\t\tGLint bufferRect[4];\n\t\tRect\tportRect; \n\t\t\n#ifdef BROWSERPLUGIN\n\t\tAGLDrawable\twin;\n\t\tNP_Port\t*anNPPort;\n\n\t\tStartDraw();\n\t\twin = (AGLDrawable) getSTWindow();\n\t\tanNPPort = getNP_Port();\n\n\t\tGetPortBounds(GetWindowPort((WindowPtr)win),&portRect);\n\t\tbufferRect[0] = x - anNPPort->portx;\n\t\tbufferRect[1] = portRect.bottom - portRect.top - (y+h)  + anNPPort->porty;\n\t\tbufferRect[2] = w;\n\t\tbufferRect[3] = h;\n\n\t\tEndDraw();\n#else\n\t\tGetPortBounds(GetWindowPort((WindowPtr) renderer->drawable),&portRect);\n\t\tbufferRect[0] = x;\n\t\tbufferRect[1] = portRect.bottom - portRect.top - (y+h);\n\t\tbufferRect[2] = w;\n\t\tbufferRect[3] = h;\n#endif\n\t\tok = aglSetInteger(renderer->context, AGL_BUFFER_RECT, bufferRect);\n\t\tif((err = aglGetError()) != AGL_NO_ERROR) \n\t\t\tDPRINTF3D(3,(fp,\"aglSetInteger(AGL_BUFFER_RECT) failed: aglGetError - %s\\n\", aglErrorString(err)));\n\t\tif(!ok) return 0;\n\t} else {\n\t\t/* software renderer */\n\t\tif(renderer->bufferRect[2] != w && renderer->bufferRect[3] != h) {\n\t\t\t/* do not allow resizing the software renderer */\n\t\t\treturn 0;\n\t\t}\n\t}\n\trenderer->bufferRect[0] = x;\n\trenderer->bufferRect[1] = y;\n\trenderer->bufferRect[2] = w;\n\trenderer->bufferRect[3] = h;\n\treturn 1;\n}\n\nint glSetVerboseLevel(int level) {\n\tverboseLevel = level;\n\treturn 1;\n}\n\nint glIsOverlayRenderer(int handle) {\n#pragma unused(handle)\n  /* we never use overlay renderers */\n  return 0;\n}\n\n/***************************************************************************\n ***************************************************************************\n\t\t\t\t\tModule initializers\n ***************************************************************************\n ***************************************************************************/\n\nint glInitialize(void)\n{\n\tint i;\n\tfor(i = 0; i < MAX_RENDERER; i++) {\n\t\tallRenderer[i].used = 0;\n\t}\n#ifdef INTERNAL\n\tsetPostMessageHook(macEventHook);\n#else\n\tgetSTWindow = (getSTWindowFn) interpreterProxy->ioLoadFunctionFrom(\"getSTWindow\", \"\");\n\tif(!getSTWindow) {\n\t\tDPRINTF3D(1,(fp,\"ERROR: Failed to look up getSTWindow()\\n\"));\n\t\treturn 0;\n\t}\n\tsetMessageHook = (eventMessageHook) interpreterProxy->ioLoadFunctionFrom(\"setPostMessageHook\", \"\");\n\tif(!setMessageHook) {\n\t\tDPRINTF3D(1, (fp, \"ERROR: Failed to look up setMessageHook()\\n\"));\n\t\treturn 0;\n\t}\n\t((void (*)(void*))setMessageHook)(macEventHook);\n#endif\n\treturn 1;\n}\n\nint glShutdown(void)\n{\n\tint i;\n\tfor(i=0; i< MAX_RENDERER; i++) {\n\t\tif(allRenderer[i].used)\n\t\t\tglDestroyRenderer(i);\n\t}\n\treturn 1;\n}\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/B3DAcceleratorPlugin/sqMacOpenGL.h",
    "content": "#ifndef SQ_MAC_OPENGL_H\n#define SQ_MAC_OPENGL_H\n\n#define MAX_RENDERER 16\n\t\n#if defined(__MWERKS__) \n#include <agl.h>\n#include <gl.h>\n#else\n#include <AGL/agl.h>\n#include <AGL/gl.h>\n#endif\ntypedef struct glRenderer {\n\tGLint bufferRect[4];\n\tGLint viewport[4];\n\n\tint used;\n\tint finished;\n\tAGLContext context;\n\n\t/* hardware attributes */\n\tAGLDrawable drawable;\n\n\t/* software attributes */\n\tGWorldPtr gWorld;\n\tPixMapHandle pixMap;\n\tint depth;\n\tint pitch;\n\tunsigned char *bits;\n} glRenderer;\n\n#define GL_RENDERER_DEFINED 1\n\n#endif /* SQ_MAC_OPENGL_H */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/B3DAcceleratorPlugin/sqMacOpenGLInfo.c",
    "content": "/****************************************************************************\n*   PROJECT: Squeak 3D accelerator\n*   FILE:    sqMacOpenGLInfo.c\n*   CONTENT: MacOS specific bindings for OpenGL\n*\n*   AUTHOR:  Andreas Raab (ar)\n*   ADDRESS: Walt Disney Imagineering, Glendale, CA\n*   EMAIL:   Andreas.Raab@disney.com\n*   RCSID:   $Id: sqMacOpenGLInfo.c 1708 2007-06-10 00:40:04Z johnmci $\n*\n*   NOTES:\n*\n*****************************************************************************/\n#include <stdio.h>\n#include <stdlib.h>\n\t#include <Carbon/Carbon.h>\n\t#include <AGL/gl.h>\n\t#include <AGL/agl.h>\n\n#include \"sq.h\"\n#include \"sqVirtualMachine.h\"\n#include \"sqMacUIConstants.h\"\nint printRendererInfo(void);\nint printFormatInfo(AGLPixelFormat info);\n\n/* Verbose level for debugging purposes:\n\t0 - print NO information ever\n\t1 - print critical debug errors\n\t2 - print debug warnings\n\t3 - print extra information\n\t4 - print extra warnings\n\t5 - print information about primitive execution\n\n   10 - print information about each vertex and face\n*/\nint verboseLevel = 3;\n/* define forceFlush if we should fflush() before closing file */\n#define forceFlush 1\n\n//#include \"sqMacFileLogic.h\"\t\n\n/* Note: Print this stuff into a file in case we lock up*/\n/* Note: Print this stuff into a file in case we lock up*/\n#undef DPRINTF3D\n# define DPRINTF3D(vLevel, args) if(vLevel <= verboseLevel) {\\\n\tchar fileName[DOCUMENT_NAME_SIZE+1]; \\\n\tsqFilenameFromStringOpen(fileName,(sqInt) &\"Squeak3D.log\", strlen(\"Squeak3D.log\")); \\\n\tFILE *fp = fopen(fileName, \"at\");\\\n\tif(fp) { fprintf args; if(forceFlush) fflush(fp); fclose(fp); }}\n\n/*****************************************************************************/\n/*****************************************************************************/\n/*****************************************************************************/\n/*****************************************************************************/\n\nstatic void PrintBufferModes(GLint v)\n{\n\tif(v & AGL_MONOSCOPIC_BIT)   DPRINTF3D(3,(fp,\"            AGL_MONOSCOPIC_BIT\\n\"));\n\tif(v & AGL_STEREOSCOPIC_BIT) DPRINTF3D(3,(fp,\"            AGL_STEREOSCOPIC_BIT\\n\"));\n\tif(v & AGL_SINGLEBUFFER_BIT) DPRINTF3D(3,(fp,\"            AGL_SINGLEBUFFER_BIT\\n\"));\n\tif(v & AGL_DOUBLEBUFFER_BIT) DPRINTF3D(3,(fp,\"            AGL_DOUBLEBUFFER_BIT\\n\"));\n}\n\nstatic void PrintColorModes(GLint v)\n{\n\tif(v & AGL_RGB8_BIT)         DPRINTF3D(3,(fp,\"            AGL_RGB8_BIT\\n\"));\n\tif(v & AGL_RGB8_A8_BIT)      DPRINTF3D(3,(fp,\"            AGL_RGB8_A8_BIT\\n\"));\n\tif(v & AGL_BGR233_BIT)       DPRINTF3D(3,(fp,\"            AGL_BGR233_BIT\\n\"));\n\tif(v & AGL_BGR233_A8_BIT)    DPRINTF3D(3,(fp,\"            AGL_BGR233_A8_BIT\\n\"));\n\tif(v & AGL_RGB332_BIT)       DPRINTF3D(3,(fp,\"            AGL_RGB332_BIT\\n\"));\n\tif(v & AGL_RGB332_A8_BIT)    DPRINTF3D(3,(fp,\"            AGL_RGB332_A8_BIT\\n\"));\n\tif(v & AGL_RGB444_BIT)       DPRINTF3D(3,(fp,\"            AGL_RGB444_BIT\\n\"));\n\tif(v & AGL_ARGB4444_BIT)     DPRINTF3D(3,(fp,\"            AGL_ARGB4444_BIT\\n\"));\n\tif(v & AGL_RGB444_A8_BIT)    DPRINTF3D(3,(fp,\"            AGL_RGB444_A8_BIT\\n\"));\n\tif(v & AGL_RGB555_BIT)       DPRINTF3D(3,(fp,\"            AGL_RGB555_BIT\\n\"));\n\tif(v & AGL_ARGB1555_BIT)     DPRINTF3D(3,(fp,\"            AGL_ARGB1555_BIT\\n\"));\n\tif(v & AGL_RGB555_A8_BIT)    DPRINTF3D(3,(fp,\"            AGL_RGB555_A8_BIT\\n\"));\n\tif(v & AGL_RGB565_BIT)       DPRINTF3D(3,(fp,\"            AGL_RGB565_BIT\\n\"));\n\tif(v & AGL_RGB565_A8_BIT)    DPRINTF3D(3,(fp,\"            AGL_RGB565_A8_BIT\\n\"));\n\tif(v & AGL_RGB888_BIT)       DPRINTF3D(3,(fp,\"            AGL_RGB888_BIT\\n\"));\n\tif(v & AGL_ARGB8888_BIT)     DPRINTF3D(3,(fp,\"            AGL_ARGB8888_BIT\\n\"));\n\tif(v & AGL_RGB888_A8_BIT)    DPRINTF3D(3,(fp,\"            AGL_RGB888_A8_BIT\\n\"));\n\tif(v & AGL_RGB101010_BIT)    DPRINTF3D(3,(fp,\"            AGL_RGB101010_BIT\\n\"));\n\tif(v & AGL_ARGB2101010_BIT)  DPRINTF3D(3,(fp,\"            AGL_ARGB2101010_BIT\\n\"));\n\tif(v & AGL_RGB101010_A8_BIT) DPRINTF3D(3,(fp,\"            AGL_RGB101010_A8_BIT\\n\"));\n\tif(v & AGL_RGB121212_BIT)    DPRINTF3D(3,(fp,\"            AGL_RGB121212_BIT\\n\"));\n\tif(v & AGL_ARGB12121212_BIT) DPRINTF3D(3,(fp,\"            AGL_ARGB12121212_BIT\\n\"));\n\tif(v & AGL_RGB161616_BIT)    DPRINTF3D(3,(fp,\"            AGL_RGB161616_BIT\\n\"));\n\tif(v & AGL_ARGB16161616_BIT) DPRINTF3D(3,(fp,\"            AGL_ARGB16161616_BIT\\n\"));\n\tif(v & AGL_INDEX8_BIT)       DPRINTF3D(3,(fp,\"            AGL_INDEX8_BIT\\n\"));\n\tif(v & AGL_INDEX16_BIT)      DPRINTF3D(3,(fp,\"            AGL_INDEX16_BIT\\n\"));\n}\n\nstatic void PrintBitModes(GLint v)\n{\n\tif(v & AGL_0_BIT)            DPRINTF3D(3,(fp,\"            AGL_0_BIT\\n\"));\n\tif(v & AGL_1_BIT)            DPRINTF3D(3,(fp,\"            AGL_1_BIT\\n\"));\n\tif(v & AGL_2_BIT)            DPRINTF3D(3,(fp,\"            AGL_2_BIT\\n\"));\n\tif(v & AGL_3_BIT)            DPRINTF3D(3,(fp,\"            AGL_3_BIT\\n\"));\n\tif(v & AGL_4_BIT)            DPRINTF3D(3,(fp,\"            AGL_4_BIT\\n\"));\n\tif(v & AGL_5_BIT)            DPRINTF3D(3,(fp,\"            AGL_5_BIT\\n\"));\n\tif(v & AGL_6_BIT)            DPRINTF3D(3,(fp,\"            AGL_6_BIT\\n\"));\n\tif(v & AGL_8_BIT)            DPRINTF3D(3,(fp,\"            AGL_8_BIT\\n\"));\n\tif(v & AGL_10_BIT)           DPRINTF3D(3,(fp,\"            AGL_10_BIT\\n\"));\n\tif(v & AGL_12_BIT)           DPRINTF3D(3,(fp,\"            AGL_12_BIT\\n\"));\n\tif(v & AGL_16_BIT)           DPRINTF3D(3,(fp,\"            AGL_16_BIT\\n\"));\n\tif(v & AGL_24_BIT)           DPRINTF3D(3,(fp,\"            AGL_24_BIT\\n\"));\n\tif(v & AGL_32_BIT)           DPRINTF3D(3,(fp,\"            AGL_32_BIT\\n\"));\n\tif(v & AGL_48_BIT)           DPRINTF3D(3,(fp,\"            AGL_48_BIT\\n\"));\n\tif(v & AGL_64_BIT)           DPRINTF3D(3,(fp,\"            AGL_64_BIT\\n\"));\n\tif(v & AGL_96_BIT)           DPRINTF3D(3,(fp,\"            AGL_96_BIT\\n\"));\n\tif(v & AGL_128_BIT)          DPRINTF3D(3,(fp,\"            AGL_128_BIT\\n\"));\n}\n\nstatic void PrintInfoStats(AGLRendererInfo info)\n{\n\tGLint rv;\n\t\n\taglDescribeRenderer(info, AGL_RENDERER_ID, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_RENDERER_ID     : 0x%X\\n\", rv));\n\t\n\taglDescribeRenderer(info, AGL_OFFSCREEN, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_OFFSCREEN       : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribeRenderer(info, AGL_FULLSCREEN, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_FULLSCREEN      : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribeRenderer(info, AGL_WINDOW, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_WINDOW          : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribeRenderer(info, AGL_ACCELERATED, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_ACCELERATED     : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribeRenderer(info, AGL_ROBUST, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_ROBUST          : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribeRenderer(info, AGL_BACKING_STORE, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_BACKING_STORE   : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribeRenderer(info, AGL_MP_SAFE, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_MP_SAFE         : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribeRenderer(info, AGL_COMPLIANT, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_COMPLIANT       : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribeRenderer(info, AGL_MULTISCREEN, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_MULTISCREEN     : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribeRenderer(info, AGL_BUFFER_MODES, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_BUFFER_MODES    : 0x%X\\n\", rv));\n\tPrintBufferModes(rv);\n\t\n\taglDescribeRenderer(info, AGL_MIN_LEVEL, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_MIN_LEVEL       : %d\\n\", rv));\n\t\n\taglDescribeRenderer(info, AGL_MAX_LEVEL, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_MAX_LEVEL       : %d\\n\", rv));\n\t\n\taglDescribeRenderer(info, AGL_COLOR_MODES, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_COLOR_MODES     : 0x%X\\n\", rv));\n\tPrintColorModes(rv);\n\t\n\taglDescribeRenderer(info, AGL_ACCUM_MODES, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_ACCUM_MODES     : 0x%X\\n\", rv));\n\tPrintColorModes(rv);\n\t\n\taglDescribeRenderer(info, AGL_DEPTH_MODES, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_DEPTH_MODES     : 0x%X\\n\", rv));\n\tPrintBitModes(rv);\n\t\n\taglDescribeRenderer(info, AGL_STENCIL_MODES, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_STENCIL_MODES   : 0x%X\\n\", rv));\n\tPrintBitModes(rv);\n\t\n\taglDescribeRenderer(info, AGL_MAX_AUX_BUFFERS, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_MAX_AUX_BUFFERS : %d\\n\", rv));\n\t\n\taglDescribeRenderer(info, AGL_VIDEO_MEMORY, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_VIDEO_MEMORY    : %d\\n\", rv));\n\t\n\taglDescribeRenderer(info, AGL_TEXTURE_MEMORY, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_TEXTURE_MEMORY  : %d\\n\", rv));\n}\n\nstatic void CheckGetRendererInfo(GDHandle device)\n{\n\tAGLRendererInfo info, head_info;\n\tGLint inum;\n\n\thead_info =  aglQueryRendererInfo(&device, 1);\n\tif(!head_info)\n\t{\n\t\tDPRINTF3D(3,(fp,\"aglQueryRendererInfo : Info Error\\n\"));\n\t\treturn;\n\t}\n\t\n\tinfo = head_info;\n\tinum = 0;\n\twhile(info)\n\t{\n\t\tDPRINTF3D(3,(fp,\"\\n    Renderer : %d\\n\", inum));\n\t\tPrintInfoStats(info);\n\t\tinfo = aglNextRendererInfo(info);\n\t\tinum++;\n\t}\n\t\n\taglDestroyRendererInfo(head_info);\n}\n\nint printRendererInfo(void)\n{\n\tGLenum   err;\n\tGDHandle device;\n\tGLuint   dnum = 0;\n\t\n\tdevice = GetDeviceList();\n\twhile(device)\n\t{\n\t\tDPRINTF3D(3,(fp,\"\\nDevice : %d\\n\", dnum));\n\t\tCheckGetRendererInfo(device);\n\t\tdevice = GetNextDevice(device);\n\t\tdnum++;\n\t}\n\t\t\n\terr = aglGetError();\n\tif(err != AGL_NO_ERROR) DPRINTF3D(3,(fp,\"aglGetError - %s\\n\", aglErrorString(err)));\n\n   return 1;\n}\n\nint printFormatInfo(AGLPixelFormat info)\n{\n\tGLint rv;\n\n\tDPRINTF3D(3, (fp, \"\\n\\nSelected pixel format:\\n\"));\n\n\taglDescribePixelFormat(info, AGL_RENDERER_ID, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_RENDERER_ID     : 0x%X\\n\", rv));\n\t\n\taglDescribePixelFormat(info, AGL_OFFSCREEN, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_OFFSCREEN       : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribePixelFormat(info, AGL_FULLSCREEN, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_FULLSCREEN      : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribePixelFormat(info, AGL_WINDOW, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_WINDOW          : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribePixelFormat(info, AGL_ACCELERATED, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_ACCELERATED     : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribePixelFormat(info, AGL_ROBUST, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_ROBUST          : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribePixelFormat(info, AGL_BACKING_STORE, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_BACKING_STORE   : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribePixelFormat(info, AGL_MP_SAFE, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_MP_SAFE         : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribePixelFormat(info, AGL_COMPLIANT, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_COMPLIANT       : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribePixelFormat(info, AGL_MULTISCREEN, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_MULTISCREEN     : %s\\n\", (rv ? \"GL_TRUE\" : \"GL_FALSE\")));\n\t\n\taglDescribePixelFormat(info, AGL_BUFFER_SIZE, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_BUFFER_SIZE     : %d\\n\", rv));\n\t\n\taglDescribePixelFormat(info, AGL_LEVEL, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_LEVEL           : %d\\n\", rv));\n\n\taglDescribePixelFormat(info, AGL_PIXEL_SIZE, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_PIXEL_SIZE      : %d\\n\", rv));\n\n#if 0\n\taglDescribePixelFormat(info, AGL_ACCUM_MODES, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_ACCUM_MODES     : 0x%X\\n\", rv));\n\tPrintColorModes(rv);\n#endif\t\n\taglDescribePixelFormat(info, AGL_DEPTH_SIZE, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_DEPTH_SIZE      : %d\\n\", rv));\n\t\n\taglDescribePixelFormat(info, AGL_STENCIL_SIZE, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_STENCIL_SIZE    : %d\\n\", rv));\n\tPrintBitModes(rv);\n\t\n\taglDescribePixelFormat(info, AGL_AUX_BUFFERS, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_AUX_BUFFERS     : %d\\n\", rv));\n#if 0\n\taglDescribePixelFormat(info, AGL_VIDEO_MEMORY, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_VIDEO_MEMORY    : %d\\n\", rv));\n\t\n\taglDescribePixelFormat(info, AGL_TEXTURE_MEMORY, &rv);\n\tDPRINTF3D(3,(fp,\"        AGL_TEXTURE_MEMORY  : %d\\n\", rv));\n#endif\n\n#if 0\n\taglDescribePixelFormat(pix, AGL_BUFFER_SIZE, &rv);\n\tDPRINTF3D(3, (fp, \"\\tAGL_BUFFER_SIZE: %d\\n\", rv));\n\taglDescribePixelFormat(pix, AGL_LEVEL, &rv);\n\tDPRINTF3D(3, (fp, \"\\tAGL_LEVEL: %d\\n\", rv));\n\taglDescribePixelFormat(pix, AGL_RGBA, &rv);\n\tDPRINTF3D(3, (fp, \"\\tAGL_RGBA: %s\\n\", (rv == GL_TRUE ? \"GL_TRUE\" : \"GL_FALSE\")));\n\taglDescribePixelFormat(pix, AGL_DOUBLEBUFFER, &rv);\n\tDPRINTF3D(3, (fp, \"\\tAGL_DOUBLEBUFFER: %s\\n\", (rv == GL_TRUE ? \"GL_TRUE\" : \"GL_FALSE\")));\n\taglDescribePixelFormat(pix, AGL_STEREO, &rv);\n\tDPRINTF3D(3, (fp, \"\\tAGL_STEREO: %s\\n\", (rv == GL_TRUE ? \"GL_TRUE\" : \"GL_FALSE\")));\n\taglDescribePixelFormat(pix, AGL_AUX_BUFFERS, &rv);\n\tDPRINTF3D(3, (fp, \"\\tAGL_AUX_BUFFERS: %d\\n\", rv));\n\taglDescribePixelFormat(pix, AGL_PIXEL_SIZE, &rv);\n\tDPRINTF3D(3, (fp, \"\\tAGL_PIXEL_SIZE: %d\\n\", rv));\n\n\taglDescribePixelFormat(pix, AGL_RED_SIZE, &rv);\n\tDPRINTF3D(3, (fp, \"\\n\\tAGL_RED_SIZE: %d\\n\", rv));\n\taglDescribePixelFormat(pix, AGL_GREEN_SIZE, &rv);\n\tDPRINTF3D(3, (fp, \"\\tAGL_GREEN_SIZE: %d\\n\", rv));\n\taglDescribePixelFormat(pix, AGL_BLUE_SIZE, &rv);\n\tDPRINTF3D(3, (fp, \"\\tAGL_BLUE_SIZE: %d\\n\", rv));\n\taglDescribePixelFormat(pix, AGL_ALPHA_SIZE, &rv);\n\tDPRINTF3D(3, (fp, \"\\tAGL_ALPHA_SIZE: %d\\n\", rv));\n\n\taglDescribePixelFormat(pix, AGL_DEPTH_SIZE, &rv);\n\tDPRINTF3D(3, (fp, \"\\n\\tAGL_DEPTH_SIZE: %d\\n\", rv));\n\taglDescribePixelFormat(pix, AGL_STENCIL_SIZE, &rv);\n\tDPRINTF3D(3, (fp, \"\\tAGL_STENCIL_SIZE: %d\\n\", rv));\n\t\n\taglDescribePixelFormat(pix, AGL_ACCUM_RED_SIZE, &rv);\n\tDPRINTF3D(3, (fp, \"\\tAGL_ACCUM_RED_SIZE: %d\\n\", rv));\n\taglDescribePixelFormat(pix, AGL_ACCUM_GREEN_SIZE, &rv);\n\tDPRINTF3D(3, (fp, \"\\tAGL_ACCUM_GREEN_SIZE: %d\\n\", rv));\n\taglDescribePixelFormat(pix, AGL_ACCUM_BLUE_SIZE, &rv);\n\tDPRINTF3D(3, (fp, \"\\tAGL_ACCUM_BLUE_SIZE: %d\\n\", rv));\n\taglDescribePixelFormat(pix, AGL_ACCUM_ALPHA_SIZE, &rv);\n\tDPRINTF3D(3, (fp, \"\\tAGL_ACCUM_ALPHA_SIZE: %d\\n\", rv));\n#endif\n\treturn 1;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/B3DAcceleratorPlugin/sqMacUIConstants.h",
    "content": "/****************************************************************************\n*   PROJECT: mac apple constants\n*   FILE:    sqMacUIConstants.h\n*   CONTENT: \n*\n*   AUTHOR:   John McIntosh\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacUIConstants.h 1344 2006-03-05 21:07:15Z johnmci $\n*\n*   NOTES: \n*   2011/04/01  WARNING: I'm usinf this file as is, copying it from platforms/Mac OS/vm because this plugin sources needs to be rewritten, and in the mean time there is \n*               no good reason to pollute the other code.\n*/\n\n\n#define IMAGE_NAME_SIZE 1000\n#define SHORTIMAGE_NAME_SIZE 255\n#define DOCUMENT_NAME_SIZE 1000\n#define VMPATH_SIZE 1000\n\n  #define DELIMITER \"/\"\n  #define DELIMITERInt '/'\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/ClipboardExtended/sqMacExtendedClipboard.h",
    "content": "/*\n *  sqMacExtendedClipboard.h\n *  SqueakClipboardExtendedxcodeproj\n *\n *  Created by John Sterling Mcintosh on 4/21/06.\n *  Copyright 2006-2010 Corporate Smalltalk Consulting ltd. All rights reserved.\n *\n * Permission is hereby granted, free of charge, to any person\n *  obtaining a copy of this software and associated documentation\n *  files (the \"Software\"), to deal in the Software without\n *  restriction, including without limitation the rights to use,\n *  copy, modify, merge, publish, distribute, sublicense, and/or sell\n *  copies of the Software, and to permit persons to whom the\n *  Software is furnished to do so, subject to the following\n *  conditions:\n *  \n *  The above copyright notice and this permission notice shall be\n *  included in all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n *  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n *  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n *  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n *  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n *  OTHER DEALINGS IN THE SOFTWARE.\n *\n */\n/* The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n\nvoid sqPasteboardClear( void * inPasteboard );\nsqInt sqPasteboardGetItemCount ( void *inPasteboard );\nsqInt sqPasteboardCopyItemFlavorsitemNumber (  void *inPasteboard, sqInt formatNumber );\nvoid * sqCreateClipboard( void );\nvoid sqPasteboardPutItemFlavordatalengthformatTypeformatLength ( void *inPasteboard, char* inData, sqInt dataLength, char* format, sqInt formatLength);\nsqInt sqPasteboardCopyItemFlavorDataformatformatLength ( void* inPasteboard, char* format, sqInt formatLength);\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/ClipboardExtended/sqMacExtendedClipboard.m",
    "content": "/*\n *  sqMacExtendedClipboard.m\n *  SqueakClipboardExtendedxcodeproj\n *\n *  Created by John Sterling Mcintosh on 4/21/06.\n *  Copyright 2006-2010 Corporate Smalltalk Consulting ltd. All rights reserved.\n *\n * Permission is hereby granted, free of charge, to any person\n *  obtaining a copy of this software and associated documentation\n *  files (the \"Software\"), to deal in the Software without\n *  restriction, including without limitation the rights to use,\n *  copy, modify, merge, publish, distribute, sublicense, and/or sell\n *  copies of the Software, and to permit persons to whom the\n *  Software is furnished to do so, subject to the following\n *  conditions:\n *  \n *  The above copyright notice and this permission notice shall be\n *  included in all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n *  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n *  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n *  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n *  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n *  OTHER DEALINGS IN THE SOFTWARE.\n *\n */\n\n#include \"sqMacExtendedClipboard.h\"\n#import <Cocoa/Cocoa.h>\n\n\nextern struct VirtualMachine* interpreterProxy;\n\nvoid sqPasteboardClear(void *inPasteboard )\n{\n\tNSArray *arrayOfTypes = [[NSArray alloc] init];\n\t\n\t[(NSPasteboard*) inPasteboard declareTypes: arrayOfTypes owner: nil];\n\t[arrayOfTypes release];\n\n}\n\nsqInt sqPasteboardGetItemCount (void *inPasteboard )\n{\n\treturn [[(NSPasteboard *)inPasteboard types] count];\n}\n\nsqInt sqPasteboardCopyItemFlavorsitemNumber (  void *inPasteboard, sqInt formatNumber )\n{\n\n\tsqInt formatTypeLength;\n\tsqInt flavorCount;\n\t\n\tflavorCount =  [[(NSPasteboard *)inPasteboard types] count];\n\tif (formatNumber > flavorCount) {\n\t\treturn interpreterProxy->nilObject();\n\t}\n\t\n\tNSString *formatType = [[(NSPasteboard *)inPasteboard types] objectAtIndex: formatNumber-1];\n\t\n\tconst char *utf8data = [formatType UTF8String];\n\tformatTypeLength = strlen(utf8data);\n\tsqInt outData = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), formatTypeLength);\n\tunsigned char* formatConverted = interpreterProxy->firstIndexableField(outData);\n\tmemcpy(formatConverted,utf8data,formatTypeLength);\n\t\n\treturn outData;\n}\n\nvoid * sqCreateClipboard( void )\n{\n\treturn (void*) [NSPasteboard generalPasteboard];\n}\n\nvoid sqPasteboardPutItemFlavordatalengthformatTypeformatLength ( void *inPasteboard, char* inData, sqInt dataLength, char* format, sqInt formatLength)\n{\t\n\tNSString *formatType = [[NSString alloc] initWithBytes: format length: formatLength encoding:  NSUTF8StringEncoding];\n\tNSData* data = [[NSData alloc ] initWithBytes: inData length: dataLength];\n\tNSArray *arrayOfTypes = [[NSArray alloc] initWithObjects: formatType,nil];\n\n\t[(NSPasteboard *)inPasteboard declareTypes: arrayOfTypes owner: nil];\n\t[(NSPasteboard *)inPasteboard setData: data forType: formatType];\n\n\t[arrayOfTypes release];\n\t[data release];\n\t[formatType release];\n}\n\t\nsqInt sqPasteboardCopyItemFlavorDataformatformatLength ( void *inPasteboard, char* format, sqInt formatLength)\n{\n\tNSString *formatType = [[NSString alloc] initWithBytes: format length: formatLength encoding:  NSUTF8StringEncoding];\n\tNSArray *arrayOfTypes = [[NSArray alloc] initWithObjects: formatType,nil];\n\tNSString     *type= [(NSPasteboard *)inPasteboard availableTypeFromArray: arrayOfTypes];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\tif (type == NULL) {\n\t\t[formatType  release];\n\t\t[arrayOfTypes release];\n\t\treturn interpreterProxy->nilObject();\n\t}\t\t\n\n\tNSData *dataBuffer = [(NSPasteboard *)inPasteboard dataForType: type];\n\tsqInt dataLength = [dataBuffer length];\n\tsqInt outData = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), dataLength );\n\tchar *outDataPtr = (char *) interpreterProxy->firstIndexableField(outData);\n\t[dataBuffer getBytes: outDataPtr];\n\n\t[formatType release];\n\t[arrayOfTypes release];\n\treturn outData;\n}"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/CroquetPlugin/sqMacCroquet.c",
    "content": "/*\n *  sqMacCroquet.c\n *  SqueakCroquet\n *\n *  Created by John M McIntosh on 04/04/06.\n *  Copyright 2006 Corporate Smalltalk Consulting Ltd. All rights reserved.\n *  Licenced under the Squeak-L\n *  taken from Ian's unix example\n *\n */\n\n#include \"sqMacCroquet.h\"\n#include \"sqMemoryAccess.h\"\n#include <stdio.h>\n#include <fcntl.h>\n#include <unistd.h> \n\n\nsqInt ioGatherEntropy(char *buffer, sqInt bufSize)\n{\n  int fd, count= 0;\n\n  if ((fd= open(\"/dev/urandom\", O_RDONLY)) < 0)\n    return 0;\n\n  while (count < bufSize)\n    {\n      int n;\n      if ((n= read(fd, buffer + count, bufSize)) < 1)\n\tbreak;\n      count += n;\n    }\n\n  close(fd);\n\n  return count == bufSize;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/CroquetPlugin/sqMacCroquet.h",
    "content": "/*\n *  sqMacCroquet.h\n *  SqueakCroquet\n *\n *  Created by John M McIntosh on 04/04/06.\n *  Copyright 2006 Corporate Smalltalk Consulting Ltd. All rights reserved.\n *  Licenced under the Squeak-L\n *\n */\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/FT2Plugin.xcodeproj/MAC.mode1v3",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>ActivePerspectiveName</key>\n\t<string>Project</string>\n\t<key>AllowedModules</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Groups and Files Outline View</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCTaskListModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Task List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDetailModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>File and Smart Group Detail Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Detailed Build Results Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Batch Find Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Format Conflicts List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXCVSModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Source Code Control Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Breakpoints Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDockableInspector</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Inspector</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXOpenQuicklyModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Open Quickly Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Console</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCSnapshotModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Snapshots Tool</string>\n\t\t</dict>\n\t</array>\n\t<key>BundlePath</key>\n\t<string>/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources</string>\n\t<key>Description</key>\n\t<string>DefaultDescriptionKey</string>\n\t<key>DockingSystemVisible</key>\n\t<false/>\n\t<key>Extension</key>\n\t<string>mode1v3</string>\n\t<key>FavBarConfig</key>\n\t<dict>\n\t\t<key>PBXProjectModuleGUID</key>\n\t\t<string>040F1C6012CD1CDD008BA0CB</string>\n\t\t<key>XCBarModuleItemNames</key>\n\t\t<dict/>\n\t\t<key>XCBarModuleItems</key>\n\t\t<array/>\n\t</dict>\n\t<key>FirstTimeWindowDisplayed</key>\n\t<false/>\n\t<key>Identifier</key>\n\t<string>com.apple.perspectives.project.mode1v3</string>\n\t<key>MajorVersion</key>\n\t<integer>33</integer>\n\t<key>MinorVersion</key>\n\t<integer>0</integer>\n\t<key>Name</key>\n\t<string>Default</string>\n\t<key>Notifications</key>\n\t<array/>\n\t<key>OpenEditors</key>\n\t<array/>\n\t<key>PerspectiveWidths</key>\n\t<array>\n\t\t<integer>-1</integer>\n\t\t<integer>-1</integer>\n\t</array>\n\t<key>Perspectives</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>ChosenToolbarItems</key>\n\t\t\t<array>\n\t\t\t\t<string>active-combo-popup</string>\n\t\t\t\t<string>action</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>debugger-enable-breakpoints</string>\n\t\t\t\t<string>build-and-go</string>\n\t\t\t\t<string>com.apple.ide.PBXToolbarStopButton</string>\n\t\t\t\t<string>get-info</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>com.apple.pbx.toolbar.searchfield</string>\n\t\t\t</array>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProjectWithEditor</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.project</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>66DF6BFE01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66DF6BFF01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>4CA7E553092CC67E0044FE85</string>\n\t\t\t\t\t\t\t\t<string>4CA7E552092CC66D0044FE85</string>\n\t\t\t\t\t\t\t\t<string>66DF6C3901D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66DF6C4501D7DEEE00A80119</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>3</integer>\n\t\t\t\t\t\t\t\t\t<integer>2</integer>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 445}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 463}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>383 236 788 504 0 0 1280 778 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>203pt</string>\n\t\t\t\t</dict>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>macFileNameBits.c</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CE0B20406471E060097A5F4</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>macFileNameBits.c</string>\n\t\t\t\t\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t\t\t\t\t<string>040F1E8312CD278E008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F1E7F12CD278E008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F1E8012CD278E008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F1E8112CD278E008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F1E8212CD278E008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {580, 269}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>383 236 788 504 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>269pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 274}, {580, 189}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>383 236 788 504 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>189pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>580pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>040F1E8412CD278E008BA0CB</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>040F1E8512CD278E008BA0CB</string>\n\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfigUserDefaultsMinorVersion</key>\n\t\t\t<string>2</string>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.defaultV3</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProject</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.morph</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>29B97314FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 337}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 355}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>373 269 690 397 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Morph</string>\n\t\t\t<key>PreferredWidth</key>\n\t\t\t<integer>300</integer>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default.shortV3</string>\n\t\t</dict>\n\t</array>\n\t<key>PerspectivesBarVisible</key>\n\t<false/>\n\t<key>ShelfIsVisible</key>\n\t<false/>\n\t<key>SourceDescription</key>\n\t<string>file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string>\n\t<key>StatusbarIsVisible</key>\n\t<true/>\n\t<key>TimeStamp</key>\n\t<real>0.0</real>\n\t<key>ToolbarConfigUserDefaultsMinorVersion</key>\n\t<string>2</string>\n\t<key>ToolbarDisplayMode</key>\n\t<integer>1</integer>\n\t<key>ToolbarIsVisible</key>\n\t<true/>\n\t<key>ToolbarSizeMode</key>\n\t<integer>1</integer>\n\t<key>Type</key>\n\t<string>Perspectives</string>\n\t<key>UpdateMessage</key>\n\t<string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the \"Metro-Morph\" feature).  You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature.  Do you wish to update to the latest Workspace defaults for project '%@'?</string>\n\t<key>WindowJustification</key>\n\t<integer>5</integer>\n\t<key>WindowOrderList</key>\n\t<array>\n\t\t<string>040F1C6112CD1CDD008BA0CB</string>\n\t\t<string>/Users/MAC/Desktop/Dev/VM/cog-osx/platforms/iOS/plugins/FT2Plugin/FT2Plugin.xcodeproj</string>\n\t</array>\n\t<key>WindowString</key>\n\t<string>383 236 788 504 0 0 1280 778 </string>\n\t<key>WindowToolsV3</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.build</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string></string>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {500, 218}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>122 193 500 500 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>218pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Build Results</string>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Collapse</key>\n\t\t\t\t\t\t\t\t<integer>1021</integer>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Open</key>\n\t\t\t\t\t\t\t\t<integer>1011</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 223}, {500, 236}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>122 193 500 500 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>236pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>459pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Build Results</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>040F1C6112CD1CDD008BA0CB</string>\n\t\t\t\t<string>040F1E8612CD278E008BA0CB</string>\n\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.buildV3</string>\n\t\t\t<key>WindowContentMinSize</key>\n\t\t\t<string>486 300</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>122 193 500 500 0 0 1280 778 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>040F1C6112CD1CDD008BA0CB</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugger</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Debugger</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {317, 164}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{317, 0}, {377, 164}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {694, 164}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 164}, {694, 216}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debug - GLUTExamples (Underwater)</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>DebugConsoleDrawerSize</key>\n\t\t\t\t\t\t\t\t<string>{100, 120}</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleVisible</key>\n\t\t\t\t\t\t\t\t<string>None</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>DebugSTDIOWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {694, 380}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>321 238 694 422 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t\t<string>1C0AD2AB069F1E9B00FABCE6</string>\n\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t<string>1C0AD2AC069F1E9B00FABCE6</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>321 238 694 422 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.find</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t\t\t<string>1CD0528D0623707200166675</string>\n\t\t\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {781, 167}}</string>\n\t\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t\t<string>62 385 781 470 0 0 1440 878 </string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t\t\t<string>781pt</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>50%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Project Find</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{8, 0}, {773, 254}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>62 385 781 470 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>50%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>428pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Find</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t\t<string>1C530D58069F1CE1000CFCEE</string>\n\t\t\t\t<string>1C530D59069F1CE1000CFCEE</string>\n\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t<string>1C530D5A069F1CE1000CFCEE</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>62 385 781 470 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>MENUSEPARATOR</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debuggerConsole</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debugger Console</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {650, 250}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>516 632 650 250 0 0 1680 1027 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>209pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>209pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger Console</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t\t<string>1C78EAAE065D492600B07095</string>\n\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.consoleV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>650 41 650 250 0 0 1280 1002 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.snapshots</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCSnapshotModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Snapshots</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCSnapshotModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<string>Yes</string>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.snapshots</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>315 824 300 550 0 0 1440 878 </string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<string>Yes</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.scm</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1C78EAB3065D492600B07095</string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>0pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>SCM</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ConsoleFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 259}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 7}, {452, 259}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t\t<key>TableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>Status</string>\n\t\t\t\t\t\t\t\t\t<real>30</real>\n\t\t\t\t\t\t\t\t\t<string>FileName</string>\n\t\t\t\t\t\t\t\t\t<real>199</real>\n\t\t\t\t\t\t\t\t\t<string>Path</string>\n\t\t\t\t\t\t\t\t\t<real>197.0950012207031</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>TableFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 250}}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>262pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>266pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>SCM</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAB4065D492600B07095</string>\n\t\t\t\t<string>1C78EAB5065D492600B07095</string>\n\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.scm</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.breakpoints</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t\t\t<string>no</string>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {168, 350}}</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {185, 368}}</string>\n\t\t\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>185pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{190, 0}, {554, 368}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>554pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>368pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>MajorVersion</key>\n\t\t\t<integer>3</integer>\n\t\t\t<key>MinorVersion</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Name</key>\n\t\t\t<string>Breakpoints</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CDDB66807F98D9800BB5817</string>\n\t\t\t\t<string>1CDDB66907F98D9800BB5817</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.breakpointsV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CDDB66807F98D9800BB5817</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugAnimator</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Visualizer</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugAnimatorV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>100 100 700 500 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.bookmarks</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>538 42 401 187 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.projectFormatConflicts</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Format Conflicts</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowContentMinSize</key>\n\t\t\t<string>450 300</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>50 850 472 307 0 0 1440 877</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.classBrowser</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>OptionsSetName</key>\n\t\t\t\t\t\t\t\t<string>Hierarchy, all classes</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Class Browser - NSObject</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ClassesFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {374, 96}}</string>\n\t\t\t\t\t\t\t\t<key>ClassesTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXClassNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>208</real>\n\t\t\t\t\t\t\t\t\t<string>PBXClassBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {630, 331}}</string>\n\t\t\t\t\t\t\t\t<key>MembersFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 105}, {374, 395}}</string>\n\t\t\t\t\t\t\t\t<key>MembersTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeIconColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>216</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>97</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>332pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>332pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t\t<string>1C0AD2B0069F1E9B00FABCE6</string>\n\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.classbrowser</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.refactoring</string>\n\t\t\t<key>IncludeInToolsMenu</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{0, 0}, {500, 335}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{0, 0}, {500, 335}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCRefactoringModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Refactoring</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCRefactoringModule</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>200 200 500 356 0 0 1920 1200 </string>\n\t\t</dict>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/FT2Plugin.xcodeproj/MAC.pbxuser",
    "content": "// !$*UTF8*$!\n{\n\t040F1C6312CD1CDD008BA0CB /* Source Control */ = {\n\t\tisa = PBXSourceControlManager;\n\t\tfallbackIsa = XCSourceControlManager;\n\t\tisSCMEnabled = 0;\n\t\tscmConfiguration = {\n\t\t\trepositoryNamesForRoots = {\n\t\t\t\t\"\" = \"\";\n\t\t\t};\n\t\t};\n\t};\n\t040F1C6412CD1CDD008BA0CB /* Code sense */ = {\n\t\tisa = PBXCodeSenseManager;\n\t\tindexTemplatePath = \"\";\n\t};\n\t040F1E7F12CD278E008BA0CB /* PlistBookmark */ = {\n\t\tisa = PlistBookmark;\n\t\tfRef = 4CA7E530092CC16B0044FE85 /* Info-FT2Plugin.plist */;\n\t\tfallbackIsa = PBXBookmark;\n\t\tisK = 0;\n\t\tkPath = (\n\t\t\tCFBundleShortVersionString,\n\t\t);\n\t\tname = \"/Users/MAC/Desktop/Dev/VM/cog-osx/platforms/iOS/plugins/FT2Plugin/Info-FT2Plugin.plist\";\n\t\trLen = 0;\n\t\trLoc = 9223372036854775807;\n\t};\n\t040F1E8012CD278E008BA0CB /* PBXBookmark */ = {\n\t\tisa = PBXBookmark;\n\t\tfRef = 66C6C8E501DB1EC300A80109 /* SqueakPlugin.icns */;\n\t};\n\t040F1E8112CD278E008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 4C2DFB1309335838008B95AB /* PkgInfo */;\n\t\tname = \"PkgInfo: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 8;\n\t\tvrLoc = 0;\n\t};\n\t040F1E8212CD278E008BA0CB /* PBXBookmark */ = {\n\t\tisa = PBXBookmark;\n\t\tfRef = 940E416E09A448AA004715E5 /* macFileNameBits.c */;\n\t};\n\t040F1E8312CD278E008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 940E416E09A448AA004715E5 /* macFileNameBits.c */;\n\t\tname = \"macFileNameBits.c: 47\";\n\t\trLen = 0;\n\t\trLoc = 1203;\n\t\trType = 0;\n\t\tvrLen = 645;\n\t\tvrLoc = 639;\n\t};\n\t4C2DFB1309335838008B95AB /* PkgInfo */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {519, 237}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 8}\";\n\t\t};\n\t};\n\t66DF6BFD01D7DCEA00A80119 /* Project object */ = {\n\t\tactiveBuildConfigurationName = Development;\n\t\tactiveTarget = 942103F2084F50DF006A0FD2 /* FT2Plugin */;\n\t\tcodeSenseManager = 040F1C6412CD1CDD008BA0CB /* Code sense */;\n\t\tperUserDictionary = {\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t341,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t\t20,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Target_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXPerProjectTemplateStateSaveDate = 315434769;\n\t\t\tPBXWorkspaceStateSaveDate = 315434769;\n\t\t};\n\t\tperUserProjectItems = {\n\t\t\t040F1E7F12CD278E008BA0CB /* PlistBookmark */ = 040F1E7F12CD278E008BA0CB /* PlistBookmark */;\n\t\t\t040F1E8012CD278E008BA0CB /* PBXBookmark */ = 040F1E8012CD278E008BA0CB /* PBXBookmark */;\n\t\t\t040F1E8112CD278E008BA0CB /* PBXTextBookmark */ = 040F1E8112CD278E008BA0CB /* PBXTextBookmark */;\n\t\t\t040F1E8212CD278E008BA0CB /* PBXBookmark */ = 040F1E8212CD278E008BA0CB /* PBXBookmark */;\n\t\t\t040F1E8312CD278E008BA0CB /* PBXTextBookmark */ = 040F1E8312CD278E008BA0CB /* PBXTextBookmark */;\n\t\t};\n\t\tsourceControlManager = 040F1C6312CD1CDD008BA0CB /* Source Control */;\n\t\tuserBuildSettings = {\n\t\t};\n\t};\n\t940E416E09A448AA004715E5 /* macFileNameBits.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {698, 650}}\";\n\t\t\tsepNavSelRange = \"{1203, 0}\";\n\t\t\tsepNavVisRange = \"{639, 645}\";\n\t\t};\n\t};\n\t942103F2084F50DF006A0FD2 /* FT2Plugin */ = {\n\t\tactiveExec = 0;\n\t};\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/FT2Plugin.xcodeproj/bert.mode1",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>ActivePerspectiveName</key>\n\t<string>Project</string>\n\t<key>AllowedModules</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Groups and Files Outline View</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCTaskListModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Task List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDetailModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>File and Smart Group Detail Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Detailed Build Results Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Batch Find Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Run Log</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXCVSModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Source Code Control Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Breakpoints Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDockableInspector</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Inspector</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXOpenQuicklyModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Open Quickly Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Console</string>\n\t\t</dict>\n\t</array>\n\t<key>Description</key>\n\t<string>DefaultDescriptionKey</string>\n\t<key>DockingSystemVisible</key>\n\t<false/>\n\t<key>Extension</key>\n\t<string>mode1</string>\n\t<key>FavBarConfig</key>\n\t<dict>\n\t\t<key>PBXProjectModuleGUID</key>\n\t\t<string>4C4BDFAA08EBD932008EB73B</string>\n\t\t<key>XCBarModuleItemNames</key>\n\t\t<dict/>\n\t\t<key>XCBarModuleItems</key>\n\t\t<array/>\n\t</dict>\n\t<key>FirstTimeWindowDisplayed</key>\n\t<false/>\n\t<key>Identifier</key>\n\t<string>com.apple.perspectives.project.mode1</string>\n\t<key>MajorVersion</key>\n\t<integer>31</integer>\n\t<key>MinorVersion</key>\n\t<integer>1</integer>\n\t<key>Name</key>\n\t<string>Default</string>\n\t<key>Notifications</key>\n\t<array/>\n\t<key>OpenEditors</key>\n\t<array/>\n\t<key>PerspectiveWidths</key>\n\t<array>\n\t\t<integer>-1</integer>\n\t\t<integer>-1</integer>\n\t</array>\n\t<key>Perspectives</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>ChosenToolbarItems</key>\n\t\t\t<array>\n\t\t\t\t<string>active-target-popup</string>\n\t\t\t\t<string>action</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>buildOrClean</string>\n\t\t\t\t<string>build-and-runOrDebug</string>\n\t\t\t\t<string>com.apple.ide.PBXToolbarStopButton</string>\n\t\t\t\t<string>get-info</string>\n\t\t\t\t<string>toggle-editor</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>com.apple.pbx.toolbar.searchfield</string>\n\t\t\t</array>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProjectWithEditor</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.project</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<true/>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>66DF6BFE01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66DF6BFF01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>4CA7E553092CC67E0044FE85</string>\n\t\t\t\t\t\t\t\t<string>4CA7E552092CC66D0044FE85</string>\n\t\t\t\t\t\t\t\t<string>66DF6C3901D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>29</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 427}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 445}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>185 311 862 486 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>203pt</string>\n\t\t\t\t</dict>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>MyNewFile14.java</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CE0B20406471E060097A5F4</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>MyNewFile14.java</string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {654, 0}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>185 311 862 486 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>0pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 5}, {654, 440}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>185 311 862 486 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>440pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>654pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>4C703A0509336218008E817B</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>4C703A0609336218008E817B</string>\n\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProject</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.morph</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>29B97314FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 337}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 355}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>373 269 690 397 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Morph</string>\n\t\t\t<key>PreferredWidth</key>\n\t\t\t<integer>300</integer>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default.short</string>\n\t\t</dict>\n\t</array>\n\t<key>PerspectivesBarVisible</key>\n\t<false/>\n\t<key>ShelfIsVisible</key>\n\t<false/>\n\t<key>SourceDescription</key>\n\t<string>file at '/System/Library/PrivateFrameworks/DevToolsInterface.framework/Versions/A/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string>\n\t<key>StatusbarIsVisible</key>\n\t<true/>\n\t<key>TimeStamp</key>\n\t<real>0.0</real>\n\t<key>ToolbarDisplayMode</key>\n\t<integer>1</integer>\n\t<key>ToolbarIsVisible</key>\n\t<true/>\n\t<key>ToolbarSizeMode</key>\n\t<integer>1</integer>\n\t<key>Type</key>\n\t<string>Perspectives</string>\n\t<key>UpdateMessage</key>\n\t<string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the \"Metro-Morph\" feature).  You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature.  Do you wish to update to the latest Workspace defaults for project '%@'?</string>\n\t<key>WindowJustification</key>\n\t<integer>5</integer>\n\t<key>WindowOrderList</key>\n\t<array>\n\t\t<string>4CED2BC108EC5536007BDF80</string>\n\t\t<string>/Users/bert/Squeak/VM/squeak/FT2Plugin.xcodeproj</string>\n\t</array>\n\t<key>WindowString</key>\n\t<string>185 311 862 486 0 0 1440 878 </string>\n\t<key>WindowTools</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.build</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string></string>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {837, 290}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>394 248 837 572 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>290pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Build</string>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Collapse</key>\n\t\t\t\t\t\t\t\t<integer>1021</integer>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Open</key>\n\t\t\t\t\t\t\t\t<integer>1011</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 295}, {837, 236}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>394 248 837 572 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>236pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>531pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Build Results</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>4CED2BC108EC5536007BDF80</string>\n\t\t\t\t<string>4C703A0709336218008E817B</string>\n\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.build</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>394 248 837 572 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>4CED2BC108EC5536007BDF80</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugger</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Debugger</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {317, 164}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{317, 0}, {377, 164}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {694, 164}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 164}, {694, 216}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debug - GLUTExamples (Underwater)</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>DebugConsoleDrawerSize</key>\n\t\t\t\t\t\t\t\t<string>{100, 120}</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleVisible</key>\n\t\t\t\t\t\t\t\t<string>None</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>DebugSTDIOWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {694, 380}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>321 238 694 422 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t\t<string>1C0AD2AB069F1E9B00FABCE6</string>\n\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t<string>1C0AD2AC069F1E9B00FABCE6</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debug</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>321 238 694 422 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.find</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t\t\t<string>1CD0528D0623707200166675</string>\n\t\t\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {781, 167}}</string>\n\t\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t\t<string>62 385 781 470 0 0 1440 878 </string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t\t\t<string>781pt</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>50%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Project Find</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{8, 0}, {773, 254}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>62 385 781 470 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>50%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>428pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Find</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t\t<string>1C530D58069F1CE1000CFCEE</string>\n\t\t\t\t<string>1C530D59069F1CE1000CFCEE</string>\n\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t<string>1C530D5A069F1CE1000CFCEE</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>62 385 781 470 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>MENUSEPARATOR</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debuggerConsole</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debugger Console</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {440, 358}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>650 41 440 400 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>358pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>358pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger Console</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t\t<string>1C78EAAE065D492600B07095</string>\n\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>650 41 440 400 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.run</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>3</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528B0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Run</string>\n\t\t\t\t\t\t\t\t<key>Runner</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {493, 167}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 176}, {493, 267}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {405, 443}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{414, 0}, {514, 443}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {460, 159}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>316 696 459 200 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>159pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>159pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Run Log</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2B3069F1EA900FABCE6</string>\n\t\t\t\t<string>1C0AD2B4069F1EA900FABCE6</string>\n\t\t\t\t<string>1CD0528B0623707200166675</string>\n\t\t\t\t<string>1C0AD2B5069F1EA900FABCE6</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.run</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>316 696 459 200 0 0 1280 1002 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2B3069F1EA900FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.scm</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1C78EAB3065D492600B07095</string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>0pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>SCM</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ConsoleFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 259}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 7}, {452, 259}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t\t<key>TableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>Status</string>\n\t\t\t\t\t\t\t\t\t<real>30</real>\n\t\t\t\t\t\t\t\t\t<string>FileName</string>\n\t\t\t\t\t\t\t\t\t<real>199</real>\n\t\t\t\t\t\t\t\t\t<string>Path</string>\n\t\t\t\t\t\t\t\t\t<real>197.09500122070312</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>TableFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 250}}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>262pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>266pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>SCM</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAB4065D492600B07095</string>\n\t\t\t\t<string>1C78EAB5065D492600B07095</string>\n\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.scm</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.breakpoints</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t\t\t<string>no</string>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {168, 350}}</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t\t\t<false/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {185, 368}}</string>\n\t\t\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>185pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{190, 0}, {554, 368}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>554pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>368pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>MajorVersion</key>\n\t\t\t<integer>2</integer>\n\t\t\t<key>MinorVersion</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Name</key>\n\t\t\t<string>Breakpoints</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CDDB66807F98D9800BB5817</string>\n\t\t\t\t<string>1CDDB66907F98D9800BB5817</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.breakpoints</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CDDB66807F98D9800BB5817</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugAnimator</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Visualizer</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugAnimator</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>100 100 700 500 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.bookmarks</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>538 42 401 187 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.classBrowser</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>OptionsSetName</key>\n\t\t\t\t\t\t\t\t<string>Hierarchy, all classes</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Class Browser - NSObject</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ClassesFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {374, 96}}</string>\n\t\t\t\t\t\t\t\t<key>ClassesTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXClassNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>208</real>\n\t\t\t\t\t\t\t\t\t<string>PBXClassBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {630, 331}}</string>\n\t\t\t\t\t\t\t\t<key>MembersFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 105}, {374, 395}}</string>\n\t\t\t\t\t\t\t\t<key>MembersTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeIconColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>216</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>97</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>332pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>332pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t\t<string>1C0AD2B0069F1E9B00FABCE6</string>\n\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.classbrowser</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/FT2Plugin.xcodeproj/bert.pbxuser",
    "content": "// !$*UTF8*$!\n{\n\t4C4BDFA608EBD91A008EB73B /* Source Control */ = {\n\t\tisa = PBXSourceControlManager;\n\t\tfallbackIsa = XCSourceControlManager;\n\t\tisSCMEnabled = 0;\n\t\tscmConfiguration = {\n\t\t};\n\t\tscmType = \"\";\n\t};\n\t4C4BDFA708EBD91A008EB73B /* Code sense */ = {\n\t\tisa = PBXCodeSenseManager;\n\t\tindexTemplatePath = \"\";\n\t};\n\t4CA7E52C092CC14E0044FE85 /* FT2Plugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1055, 15414}}\";\n\t\t\tsepNavSelRange = \"{32183, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 14633}, {1055, 375}}\";\n\t\t\tsepNavWindowFrame = \"{{146, 180}, {1094, 504}}\";\n\t\t};\n\t};\n\t4CA7E530092CC16B0044FE85 /* Info-FT2Plugin.plist */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1055, 406}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {1055, 375}}\";\n\t\t\tsepNavWindowFrame = \"{{87, 348}, {1094, 504}}\";\n\t\t};\n\t};\n\t4CA7E550092CC6680044FE85 /* ft2build.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1055, 854}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 479}, {1055, 375}}\";\n\t\t\tsepNavWindowFrame = \"{{223, 222}, {1094, 504}}\";\n\t\t};\n\t};\n\t66DF6BFD01D7DCEA00A80119 /* Project object */ = {\n\t\tactiveBuildConfigurationName = Deployment;\n\t\tactiveBuildStyle = 66DF6C4301D7DCEA00A80119 /* Development */;\n\t\tactiveTarget = 942103F2084F50DF006A0FD2 /* FT2Plugin */;\n\t\taddToTargets = (\n\t\t\t942103F2084F50DF006A0FD2 /* FT2Plugin */,\n\t\t);\n\t\tcodeSenseManager = 4C4BDFA708EBD91A008EB73B /* Code sense */;\n\t\tperUserDictionary = {\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXBookmarksDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXBookmarksDataSource_NameID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t200,\n\t\t\t\t\t200,\n\t\t\t\t\t57.5835,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXBookmarksDataSource_LocationID,\n\t\t\t\t\tPBXBookmarksDataSource_NameID,\n\t\t\t\t\tPBXBookmarksDataSource_CommentsID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXErrorsWarningsDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXErrorsWarningsDataSource_LocationID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t300,\n\t\t\t\t\t305,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXErrorsWarningsDataSource_TypeID,\n\t\t\t\t\tPBXErrorsWarningsDataSource_MessageID,\n\t\t\t\t\tPBXErrorsWarningsDataSource_LocationID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXExecutablesDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXExecutablesDataSource_NameID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t22,\n\t\t\t\t\t300,\n\t\t\t\t\t131,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXExecutablesDataSource_ActiveFlagID,\n\t\t\t\t\tPBXExecutablesDataSource_NameID,\n\t\t\t\t\tPBXExecutablesDataSource_CommentsID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t415,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t\t20,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Target_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXFindDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFindDataSource_LocationID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t200,\n\t\t\t\t\t120,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFindDataSource_MessageID,\n\t\t\t\t\tPBXFindDataSource_LocationID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXSymbolsDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXSymbolsDataSource_SymbolNameID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t16,\n\t\t\t\t\t200,\n\t\t\t\t\t50,\n\t\t\t\t\t183,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXSymbolsDataSource_SymbolTypeIconID,\n\t\t\t\t\tPBXSymbolsDataSource_SymbolNameID,\n\t\t\t\t\tPBXSymbolsDataSource_SymbolTypeID,\n\t\t\t\t\tPBXSymbolsDataSource_ReferenceNameID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.XCSCMDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t20,\n\t\t\t\t\t391,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t\t20,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_SCM_ColumnID,\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Target_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t200,\n\t\t\t\t\t235,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXTargetDataSource_PrimaryAttribute,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXPerProjectTemplateStateSaveDate = 154362372;\n\t\t\tPBXWorkspaceStateSaveDate = 154362372;\n\t\t};\n\t\tsourceControlManager = 4C4BDFA608EBD91A008EB73B /* Source Control */;\n\t\tuserBuildSettings = {\n\t\t};\n\t};\n\t942103F2084F50DF006A0FD2 /* FT2Plugin */ = {\n\t\tactiveExec = 0;\n\t};\n\t944E9BEC05E91D17003F0BED /* sqConfig.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1055, 375}}\";\n\t\t\tsepNavSelRange = \"{342, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {1055, 375}}\";\n\t\t\tsepNavWindowFrame = \"{{163, 96}, {1094, 504}}\";\n\t\t};\n\t};\n\t949BB07809328BF600684056 /* sqMacFileLogic.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1055, 17332}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 14696}, {1055, 375}}\";\n\t\t\tsepNavWindowFrame = \"{{64, 369}, {1094, 504}}\";\n\t\t};\n\t};\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/FT2Plugin.xcodeproj/johnmci.mode1",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>ActivePerspectiveName</key>\n\t<string>Project</string>\n\t<key>AllowedModules</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Groups and Files Outline View</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCTaskListModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Task List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDetailModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>File and Smart Group Detail Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Detailed Build Results Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Batch Find Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Run Log</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXCVSModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Source Code Control Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Breakpoints Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDockableInspector</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Inspector</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXOpenQuicklyModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Open Quickly Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Console</string>\n\t\t</dict>\n\t</array>\n\t<key>Description</key>\n\t<string>DefaultDescriptionKey</string>\n\t<key>DockingSystemVisible</key>\n\t<false/>\n\t<key>Extension</key>\n\t<string>mode1</string>\n\t<key>FavBarConfig</key>\n\t<dict>\n\t\t<key>PBXProjectModuleGUID</key>\n\t\t<string>949BB01409327C5100684056</string>\n\t\t<key>XCBarModuleItemNames</key>\n\t\t<dict/>\n\t\t<key>XCBarModuleItems</key>\n\t\t<array/>\n\t</dict>\n\t<key>FirstTimeWindowDisplayed</key>\n\t<false/>\n\t<key>Identifier</key>\n\t<string>com.apple.perspectives.project.mode1</string>\n\t<key>MajorVersion</key>\n\t<integer>31</integer>\n\t<key>MinorVersion</key>\n\t<integer>1</integer>\n\t<key>Name</key>\n\t<string>Default</string>\n\t<key>Notifications</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>XCObserverAutoDisconnectKey</key>\n\t\t\t<true/>\n\t\t\t<key>XCObserverDefintionKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusErrorsKey</key>\n\t\t\t\t<integer>0</integer>\n\t\t\t</dict>\n\t\t\t<key>XCObserverFactoryKey</key>\n\t\t\t<string>XCPerspectivesSpecificationIdentifier</string>\n\t\t\t<key>XCObserverGUIDKey</key>\n\t\t\t<string>XCObserverProjectIdentifier</string>\n\t\t\t<key>XCObserverNotificationKey</key>\n\t\t\t<string>PBXStatusBuildStateMessageNotification</string>\n\t\t\t<key>XCObserverTargetKey</key>\n\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t<key>XCObserverTriggerKey</key>\n\t\t\t<string>awakenModuleWithObserver:</string>\n\t\t\t<key>XCObserverValidationKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusErrorsKey</key>\n\t\t\t\t<integer>2</integer>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>XCObserverAutoDisconnectKey</key>\n\t\t\t<true/>\n\t\t\t<key>XCObserverDefintionKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusWarningsKey</key>\n\t\t\t\t<integer>0</integer>\n\t\t\t</dict>\n\t\t\t<key>XCObserverFactoryKey</key>\n\t\t\t<string>XCPerspectivesSpecificationIdentifier</string>\n\t\t\t<key>XCObserverGUIDKey</key>\n\t\t\t<string>XCObserverProjectIdentifier</string>\n\t\t\t<key>XCObserverNotificationKey</key>\n\t\t\t<string>PBXStatusBuildStateMessageNotification</string>\n\t\t\t<key>XCObserverTargetKey</key>\n\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t<key>XCObserverTriggerKey</key>\n\t\t\t<string>awakenModuleWithObserver:</string>\n\t\t\t<key>XCObserverValidationKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusWarningsKey</key>\n\t\t\t\t<integer>2</integer>\n\t\t\t</dict>\n\t\t</dict>\n\t</array>\n\t<key>OpenEditors</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>Content</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t<string>941C754A0C066D47006D7AAC</string>\n\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t<string>freetype.h</string>\n\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>941C754B0C066D47006D7AAC</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>freetype.h</string>\n\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t<string>948177AB0C6F8439000C8E8C</string>\n\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>941C756D0C069601006D7AAC</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t<string>1</string>\n\t\t\t\t</dict>\n\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t<true/>\n\t\t\t</dict>\n\t\t\t<key>Geometry</key>\n\t\t\t<dict>\n\t\t\t\t<key>Frame</key>\n\t\t\t\t<string>{{0, 20}, {987, 883}}</string>\n\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t<false/>\n\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t<string>15 99 987 924 0 0 1680 1028 </string>\n\t\t\t</dict>\n\t\t</dict>\n\t</array>\n\t<key>PerspectiveWidths</key>\n\t<array>\n\t\t<integer>-1</integer>\n\t\t<integer>-1</integer>\n\t</array>\n\t<key>Perspectives</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>ChosenToolbarItems</key>\n\t\t\t<array>\n\t\t\t\t<string>active-target-popup</string>\n\t\t\t\t<string>active-buildstyle-popup</string>\n\t\t\t\t<string>action</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>buildOrClean</string>\n\t\t\t\t<string>build-and-runOrDebug</string>\n\t\t\t\t<string>com.apple.ide.PBXToolbarStopButton</string>\n\t\t\t\t<string>get-info</string>\n\t\t\t\t<string>toggle-editor</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>com.apple.pbx.toolbar.searchfield</string>\n\t\t\t</array>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProjectWithEditor</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.project</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<true/>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>326</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>66DF6BFE01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66DF6BFF01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>4CA7E553092CC67E0044FE85</string>\n\t\t\t\t\t\t\t\t<string>4CA7E552092CC66D0044FE85</string>\n\t\t\t\t\t\t\t\t<string>66DF6C3901D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66DF6C4501D7DEEE00A80119</string>\n\t\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>24</integer>\n\t\t\t\t\t\t\t\t\t<integer>23</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {326, 794}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {343, 812}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>326</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>4 161 1184 853 0 0 1680 1028 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>343pt</string>\n\t\t\t\t</dict>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>FT2Plugin.c</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CE0B20406471E060097A5F4</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>FT2Plugin.c</string>\n\t\t\t\t\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t\t\t\t\t<string>948177A80C6F8439000C8E8C</string>\n\t\t\t\t\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>940E41A709A44B07004715E5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>940E41F009A44C0E004715E5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>943BD83109C005AD0013220E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>943BD83309C005AD0013220E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9495AC950ACA07A100D58F66</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>945838D60BD1454000CB0CB0</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>941BF5330BDECAEA00D361A5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>941BF5340BDECAEA00D361A5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>941BF5520BDECB7300D361A5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>941C756C0C069601006D7AAC</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t\t<key>prevStack</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>949BB31F0932DE2B00684056</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E854C409339FA600B1FC29</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>940E41AB09A44B07004715E5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>940E41AD09A44B07004715E5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>943BD83809C005AD0013220E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>945838D90BD1454000CB0CB0</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>941BF5380BDECAEA00D361A5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>941BF53A0BDECAEA00D361A5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>941BF5540BDECB7300D361A5</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {836, 698}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>4 161 1184 853 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>698pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 703}, {836, 109}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>4 161 1184 853 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>109pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>836pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>948177A90C6F8439000C8E8C</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>948177AA0C6F8439000C8E8C</string>\n\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProject</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.morph</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>29B97314FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 337}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 355}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>373 269 690 397 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Morph</string>\n\t\t\t<key>PreferredWidth</key>\n\t\t\t<integer>300</integer>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default.short</string>\n\t\t</dict>\n\t</array>\n\t<key>PerspectivesBarVisible</key>\n\t<false/>\n\t<key>ShelfIsVisible</key>\n\t<false/>\n\t<key>SourceDescription</key>\n\t<string>file at '/System/Library/PrivateFrameworks/DevToolsInterface.framework/Versions/A/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string>\n\t<key>StatusbarIsVisible</key>\n\t<true/>\n\t<key>TimeStamp</key>\n\t<real>208633425.40347701</real>\n\t<key>ToolbarDisplayMode</key>\n\t<integer>1</integer>\n\t<key>ToolbarIsVisible</key>\n\t<true/>\n\t<key>ToolbarSizeMode</key>\n\t<integer>2</integer>\n\t<key>Type</key>\n\t<string>Perspectives</string>\n\t<key>UpdateMessage</key>\n\t<string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the \"Metro-Morph\" feature).  You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature.  Do you wish to update to the latest Workspace defaults for project '%@'?</string>\n\t<key>WindowJustification</key>\n\t<integer>5</integer>\n\t<key>WindowOrderList</key>\n\t<array>\n\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t<string>9481777B0C6F7E56000C8E8C</string>\n\t\t<string>941C754A0C066D47006D7AAC</string>\n\t\t<string>/Users/johnmci/Documents/SqueakFontsBertFT2/FT2PluginProj/FT2Plugin copy.xcodeproj</string>\n\t</array>\n\t<key>WindowString</key>\n\t<string>4 161 1184 853 0 0 1680 1028 </string>\n\t<key>WindowTools</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.build</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>FT2Plugin.c</string>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1065, 489}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>602 232 1065 683 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>489pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Build</string>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Collapse</key>\n\t\t\t\t\t\t\t\t<integer>1021</integer>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Open</key>\n\t\t\t\t\t\t\t\t<integer>1013</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 494}, {1065, 148}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>602 232 1065 683 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>148pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>642pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Build Results</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>94E8549C09339D8200B1FC29</string>\n\t\t\t\t<string>941BF5220BDECACE00D361A5</string>\n\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.build</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>602 232 1065 683 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>94E8549C09339D8200B1FC29</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugger</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Debugger</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {477, 466}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{477, 0}, {728, 466}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {1205, 466}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 466}, {1205, 233}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debug - GLUTExamples (Underwater)</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>DebugConsoleDrawerSize</key>\n\t\t\t\t\t\t\t\t<string>{100, 120}</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleVisible</key>\n\t\t\t\t\t\t\t\t<string>None</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>DebugSTDIOWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1205, 699}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>281 172 1205 740 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>699pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>699pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t\t<string>948177750C6F7E56000C8E8C</string>\n\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t<string>948177760C6F7E56000C8E8C</string>\n\t\t\t\t<string>948177770C6F7E56000C8E8C</string>\n\t\t\t\t<string>948177780C6F7E56000C8E8C</string>\n\t\t\t\t<string>948177790C6F7E56000C8E8C</string>\n\t\t\t\t<string>9481777A0C6F7E56000C8E8C</string>\n\t\t\t\t<string>9481777B0C6F7E56000C8E8C</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debug</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>281 172 1205 740 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.find</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>FT2Plugin.c</string>\n\t\t\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {1108, 288}}</string>\n\t\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t\t<string>181 128 1108 722 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t\t\t<string>1108pt</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>288pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Project Find</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 293}, {1108, 388}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>181 128 1108 722 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>388pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>681pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Find</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t\t<string>947C55DA0C03365B003F76BD</string>\n\t\t\t\t<string>947C55DB0C03365B003F76BD</string>\n\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>181 128 1108 722 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>MENUSEPARATOR</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debuggerConsole</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debugger Console</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {440, 358}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>655 401 440 400 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>358pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>359pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger Console</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>949BB2980932C81E00684056</string>\n\t\t\t\t<string>941C75580C066DB6006D7AAC</string>\n\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>655 401 440 400 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>949BB2980932C81E00684056</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.run</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>3</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528B0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Run</string>\n\t\t\t\t\t\t\t\t<key>Runner</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {493, 167}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 176}, {493, 267}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {405, 443}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{414, 0}, {514, 443}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {460, 159}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>316 696 459 200 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>159pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>159pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Run Log</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2B3069F1EA900FABCE6</string>\n\t\t\t\t<string>1C0AD2B4069F1EA900FABCE6</string>\n\t\t\t\t<string>1CD0528B0623707200166675</string>\n\t\t\t\t<string>1C0AD2B5069F1EA900FABCE6</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.run</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>316 696 459 200 0 0 1280 1002 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2B3069F1EA900FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.scm</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1C78EAB3065D492600B07095</string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>0pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>SCM</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ConsoleFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 259}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 7}, {452, 259}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t\t<key>TableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>Status</string>\n\t\t\t\t\t\t\t\t\t<real>30</real>\n\t\t\t\t\t\t\t\t\t<string>FileName</string>\n\t\t\t\t\t\t\t\t\t<real>199</real>\n\t\t\t\t\t\t\t\t\t<string>Path</string>\n\t\t\t\t\t\t\t\t\t<real>197.09500122070312</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>TableFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 250}}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>262pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>266pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>SCM</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAB4065D492600B07095</string>\n\t\t\t\t<string>1C78EAB5065D492600B07095</string>\n\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.scm</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.breakpoints</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t\t\t<string>no</string>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {168, 350}}</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t\t\t<false/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {185, 368}}</string>\n\t\t\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>79 552 744 409 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>185pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{190, 0}, {554, 368}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>79 552 744 409 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>554pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>368pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>MajorVersion</key>\n\t\t\t<integer>2</integer>\n\t\t\t<key>MinorVersion</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Name</key>\n\t\t\t<string>Breakpoints</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>941C75590C066DB6006D7AAC</string>\n\t\t\t\t<string>941C755A0C066DB6006D7AAC</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.breakpoints</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>79 552 744 409 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>941C75590C066DB6006D7AAC</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugAnimator</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Visualizer</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugAnimator</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>100 100 700 500 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.bookmarks</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>538 42 401 187 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.classBrowser</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>OptionsSetName</key>\n\t\t\t\t\t\t\t\t<string>Hierarchy, all classes</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Class Browser - NSObject</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ClassesFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {374, 96}}</string>\n\t\t\t\t\t\t\t\t<key>ClassesTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXClassNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>208</real>\n\t\t\t\t\t\t\t\t\t<string>PBXClassBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {630, 331}}</string>\n\t\t\t\t\t\t\t\t<key>MembersFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 105}, {374, 395}}</string>\n\t\t\t\t\t\t\t\t<key>MembersTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeIconColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>216</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>97</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>332pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>332pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t\t<string>1C0AD2B0069F1E9B00FABCE6</string>\n\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.classbrowser</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/FT2Plugin.xcodeproj/johnmci.mode1v3",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>ActivePerspectiveName</key>\n\t<string>Project</string>\n\t<key>AllowedModules</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Groups and Files Outline View</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCTaskListModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Task List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDetailModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>File and Smart Group Detail Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Detailed Build Results Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Batch Find Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Format Conflicts List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXCVSModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Source Code Control Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Breakpoints Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDockableInspector</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Inspector</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXOpenQuicklyModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Open Quickly Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Console</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCSnapshotModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Snapshots Tool</string>\n\t\t</dict>\n\t</array>\n\t<key>Description</key>\n\t<string>DefaultDescriptionKey</string>\n\t<key>DockingSystemVisible</key>\n\t<false/>\n\t<key>Extension</key>\n\t<string>mode1v3</string>\n\t<key>FavBarConfig</key>\n\t<dict>\n\t\t<key>PBXProjectModuleGUID</key>\n\t\t<string>94B1A5F10D4496030012B20F</string>\n\t\t<key>XCBarModuleItemNames</key>\n\t\t<dict/>\n\t\t<key>XCBarModuleItems</key>\n\t\t<array/>\n\t</dict>\n\t<key>FirstTimeWindowDisplayed</key>\n\t<false/>\n\t<key>Identifier</key>\n\t<string>com.apple.perspectives.project.mode1v3</string>\n\t<key>MajorVersion</key>\n\t<integer>33</integer>\n\t<key>MinorVersion</key>\n\t<integer>0</integer>\n\t<key>Name</key>\n\t<string>Default</string>\n\t<key>Notifications</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>XCObserverAutoDisconnectKey</key>\n\t\t\t<true/>\n\t\t\t<key>XCObserverDefintionKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusErrorsKey</key>\n\t\t\t\t<integer>0</integer>\n\t\t\t</dict>\n\t\t\t<key>XCObserverFactoryKey</key>\n\t\t\t<string>XCPerspectivesSpecificationIdentifier</string>\n\t\t\t<key>XCObserverGUIDKey</key>\n\t\t\t<string>XCObserverProjectIdentifier</string>\n\t\t\t<key>XCObserverNotificationKey</key>\n\t\t\t<string>PBXStatusBuildStateMessageNotification</string>\n\t\t\t<key>XCObserverTargetKey</key>\n\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t<key>XCObserverTriggerKey</key>\n\t\t\t<string>awakenModuleWithObserver:</string>\n\t\t\t<key>XCObserverValidationKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusErrorsKey</key>\n\t\t\t\t<integer>2</integer>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>XCObserverAutoDisconnectKey</key>\n\t\t\t<true/>\n\t\t\t<key>XCObserverDefintionKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusWarningsKey</key>\n\t\t\t\t<integer>0</integer>\n\t\t\t</dict>\n\t\t\t<key>XCObserverFactoryKey</key>\n\t\t\t<string>XCPerspectivesSpecificationIdentifier</string>\n\t\t\t<key>XCObserverGUIDKey</key>\n\t\t\t<string>XCObserverProjectIdentifier</string>\n\t\t\t<key>XCObserverNotificationKey</key>\n\t\t\t<string>PBXStatusBuildStateMessageNotification</string>\n\t\t\t<key>XCObserverTargetKey</key>\n\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t<key>XCObserverTriggerKey</key>\n\t\t\t<string>awakenModuleWithObserver:</string>\n\t\t\t<key>XCObserverValidationKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusWarningsKey</key>\n\t\t\t\t<integer>2</integer>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>XCObserverAutoDisconnectKey</key>\n\t\t\t<true/>\n\t\t\t<key>XCObserverDefintionKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusAnalyzerResultsKey</key>\n\t\t\t\t<integer>0</integer>\n\t\t\t</dict>\n\t\t\t<key>XCObserverFactoryKey</key>\n\t\t\t<string>XCPerspectivesSpecificationIdentifier</string>\n\t\t\t<key>XCObserverGUIDKey</key>\n\t\t\t<string>XCObserverProjectIdentifier</string>\n\t\t\t<key>XCObserverNotificationKey</key>\n\t\t\t<string>PBXStatusBuildStateMessageNotification</string>\n\t\t\t<key>XCObserverTargetKey</key>\n\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t<key>XCObserverTriggerKey</key>\n\t\t\t<string>awakenModuleWithObserver:</string>\n\t\t\t<key>XCObserverValidationKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusAnalyzerResultsKey</key>\n\t\t\t\t<integer>2</integer>\n\t\t\t</dict>\n\t\t</dict>\n\t</array>\n\t<key>OpenEditors</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>Content</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t<string>944067E810E6ACE300353B27</string>\n\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t<string>fttypes.h</string>\n\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>944067E910E6ACE300353B27</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>fttypes.h</string>\n\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t<string>9460BC771116DA46003C837E</string>\n\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>944067EC10E6ACE300353B27</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t<string>1</string>\n\t\t\t\t</dict>\n\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t<true/>\n\t\t\t</dict>\n\t\t\t<key>Geometry</key>\n\t\t\t<dict>\n\t\t\t\t<key>Frame</key>\n\t\t\t\t<string>{{0, 20}, {1326, 913}}</string>\n\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t<false/>\n\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t<string>15 69 1326 954 0 0 1680 1028 </string>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Content</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t<string>944067EE10E6ACE300353B27</string>\n\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t<string>freetype.h</string>\n\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>944067EF10E6ACE300353B27</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>freetype.h</string>\n\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t<string>9460BC791116DA46003C837E</string>\n\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>944067F210E6ACE300353B27</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t<string>1</string>\n\t\t\t\t</dict>\n\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t<true/>\n\t\t\t</dict>\n\t\t\t<key>Geometry</key>\n\t\t\t<dict>\n\t\t\t\t<key>Frame</key>\n\t\t\t\t<string>{{0, 20}, {1326, 913}}</string>\n\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t<false/>\n\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t<string>15 69 1326 954 0 0 1680 1028 </string>\n\t\t\t</dict>\n\t\t</dict>\n\t</array>\n\t<key>PerspectiveWidths</key>\n\t<array>\n\t\t<integer>-1</integer>\n\t\t<integer>-1</integer>\n\t</array>\n\t<key>Perspectives</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>ChosenToolbarItems</key>\n\t\t\t<array>\n\t\t\t\t<string>active-combo-popup</string>\n\t\t\t\t<string>action</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>debugger-enable-breakpoints</string>\n\t\t\t\t<string>build-and-go</string>\n\t\t\t\t<string>com.apple.ide.PBXToolbarStopButton</string>\n\t\t\t\t<string>get-info</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>com.apple.pbx.toolbar.searchfield</string>\n\t\t\t</array>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProjectWithEditor</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.project</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>326</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>66DF6BFE01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66DF6BFF01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>4CA7E553092CC67E0044FE85</string>\n\t\t\t\t\t\t\t\t<string>4CA7E552092CC66D0044FE85</string>\n\t\t\t\t\t\t\t\t<string>66DF6C3901D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66DF6C4501D7DEEE00A80119</string>\n\t\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>25</integer>\n\t\t\t\t\t\t\t\t\t<integer>24</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {326, 919}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {343, 937}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>326</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>306 50 1353 978 0 0 1680 1028 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>343pt</string>\n\t\t\t\t</dict>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>FT2Plugin.c</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CE0B20406471E060097A5F4</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>FT2Plugin.c</string>\n\t\t\t\t\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t\t\t\t\t<string>9460BC741116DA46003C837E</string>\n\t\t\t\t\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>9495AC950ACA07A100D58F66</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>941BF5340BDECAEA00D361A5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F6F5970D86101D00E75319</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9467D0D10E7BC0020031C57C</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C1A1310F3771F500A2AC5E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9433FBBF10DA2F6900405B56</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9480105710DEFB9C001E390E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>948010CC10DF048B001E390E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9440665810E5ADDB00353B27</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>944067E510E6ACE300353B27</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1005, 793}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>306 50 1353 978 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>793pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 798}, {1005, 139}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>306 50 1353 978 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>139pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>1005pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>9460BC751116DA46003C837E</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>9460BC761116DA46003C837E</string>\n\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfigUserDefaultsMinorVersion</key>\n\t\t\t<string>2</string>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.defaultV3</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProject</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.morph</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>29B97314FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 337}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 355}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>373 269 690 397 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Morph</string>\n\t\t\t<key>PreferredWidth</key>\n\t\t\t<integer>300</integer>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default.shortV3</string>\n\t\t</dict>\n\t</array>\n\t<key>PerspectivesBarVisible</key>\n\t<false/>\n\t<key>ShelfIsVisible</key>\n\t<false/>\n\t<key>StatusbarIsVisible</key>\n\t<true/>\n\t<key>TimeStamp</key>\n\t<real>286710342.34468597</real>\n\t<key>ToolbarDisplayMode</key>\n\t<integer>1</integer>\n\t<key>ToolbarIsVisible</key>\n\t<true/>\n\t<key>ToolbarSizeMode</key>\n\t<integer>2</integer>\n\t<key>Type</key>\n\t<string>Perspectives</string>\n\t<key>UpdateMessage</key>\n\t<string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the \"Metro-Morph\" feature).  You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature.  Do you wish to update to the latest Workspace defaults for project '%@'?</string>\n\t<key>WindowJustification</key>\n\t<integer>5</integer>\n\t<key>WindowOrderList</key>\n\t<array>\n\t\t<string>94F6F4C60D85FFD500E75319</string>\n\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t<string>944067EE10E6ACE300353B27</string>\n\t\t<string>944067E810E6ACE300353B27</string>\n\t\t<string>/Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/platforms/Mac OSObjC/plugins/FT2Plugin/FT2Plugin.xcodeproj</string>\n\t</array>\n\t<key>WindowString</key>\n\t<string>306 50 1353 978 0 0 1680 1028 </string>\n\t<key>WindowToolsV3</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.build</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string></string>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1219, 220}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>111 283 1219 701 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>220pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Build Results</string>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Collapse</key>\n\t\t\t\t\t\t\t\t<integer>1021</integer>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Open</key>\n\t\t\t\t\t\t\t\t<integer>1013</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 225}, {1219, 435}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>111 283 1219 701 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>435pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>660pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Build Results</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>94F6F4C60D85FFD500E75319</string>\n\t\t\t\t<string>9460BC7B1116DA46003C837E</string>\n\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.buildV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>111 283 1219 701 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>94F6F4C60D85FFD500E75319</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugger</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Debugger</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {489, 478}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{489, 0}, {909, 478}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {1398, 478}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 478}, {1398, 449}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debug - GLUTExamples (Underwater)</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>DebugConsoleVisible</key>\n\t\t\t\t\t\t\t\t<string>None</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>DebugSTDIOWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1398, 927}}</string>\n\t\t\t\t\t\t\t\t<key>PBXDebugSessionStackFrameViewKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>DebugVariablesTableConfiguration</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>Name</string>\n\t\t\t\t\t\t\t\t\t\t<real>217</real>\n\t\t\t\t\t\t\t\t\t\t<string>Value</string>\n\t\t\t\t\t\t\t\t\t\t<real>178</real>\n\t\t\t\t\t\t\t\t\t\t<string>Summary</string>\n\t\t\t\t\t\t\t\t\t\t<real>489</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t<string>{{489, 0}, {909, 478}}</string>\n\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t<string>260 60 1398 968 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>260 60 1398 968 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>927pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>927pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t\t<string>9460BC7C1116DA46003C837E</string>\n\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t<string>9460BC7D1116DA46003C837E</string>\n\t\t\t\t<string>9460BC7E1116DA46003C837E</string>\n\t\t\t\t<string>9460BC7F1116DA46003C837E</string>\n\t\t\t\t<string>9460BC801116DA46003C837E</string>\n\t\t\t\t<string>9460BC811116DA46003C837E</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>260 60 1398 968 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.find</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>FT2Plugin.c</string>\n\t\t\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {1208, 526}}</string>\n\t\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t\t<string>333 35 1208 930 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t\t\t<string>1208pt</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>526pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Project Find</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 531}, {1208, 358}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>333 35 1208 930 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>358pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>889pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Find</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t\t<string>9440665510E5ADC100353B27</string>\n\t\t\t\t<string>9440665610E5ADC100353B27</string>\n\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>333 35 1208 930 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>MENUSEPARATOR</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debuggerConsole</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debugger Console</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1563, 702}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>5 197 1563 743 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>702pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>702pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger Console</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t\t<string>9440665710E5ADC100353B27</string>\n\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.consoleV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>5 197 1563 743 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.snapshots</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCSnapshotModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Snapshots</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCSnapshotModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<string>Yes</string>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.snapshots</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>315 824 300 550 0 0 1440 878 </string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<string>Yes</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.scm</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1C78EAB3065D492600B07095</string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>0pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>SCM</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ConsoleFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 259}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 7}, {452, 259}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t\t<key>TableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>Status</string>\n\t\t\t\t\t\t\t\t\t<real>30</real>\n\t\t\t\t\t\t\t\t\t<string>FileName</string>\n\t\t\t\t\t\t\t\t\t<real>199</real>\n\t\t\t\t\t\t\t\t\t<string>Path</string>\n\t\t\t\t\t\t\t\t\t<real>197.09500122070312</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>TableFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 250}}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>262pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>266pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>SCM</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAB4065D492600B07095</string>\n\t\t\t\t<string>1C78EAB5065D492600B07095</string>\n\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.scm</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.breakpoints</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t\t\t<string>no</string>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {168, 350}}</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t\t\t<false/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {185, 368}}</string>\n\t\t\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>31 162 744 409 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>185pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{190, 0}, {554, 368}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>31 162 744 409 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>554pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>368pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>MajorVersion</key>\n\t\t\t<integer>3</integer>\n\t\t\t<key>MinorVersion</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Name</key>\n\t\t\t<string>Breakpoints</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>9440671910E5B9EE00353B27</string>\n\t\t\t\t<string>9440671A10E5B9EE00353B27</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.breakpointsV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>31 162 744 409 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>9440671910E5B9EE00353B27</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugAnimator</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Visualizer</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugAnimatorV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>100 100 700 500 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.bookmarks</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<false/>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>538 42 401 187 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.projectFormatConflicts</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Format Conflicts</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<false/>\n\t\t\t<key>WindowContentMinSize</key>\n\t\t\t<string>450 300</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>50 850 472 307 0 0 1440 877</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.classBrowser</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>OptionsSetName</key>\n\t\t\t\t\t\t\t\t<string>Hierarchy, all classes</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Class Browser - NSObject</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ClassesFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {374, 96}}</string>\n\t\t\t\t\t\t\t\t<key>ClassesTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXClassNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>208</real>\n\t\t\t\t\t\t\t\t\t<string>PBXClassBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {630, 331}}</string>\n\t\t\t\t\t\t\t\t<key>MembersFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 105}, {374, 395}}</string>\n\t\t\t\t\t\t\t\t<key>MembersTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeIconColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>216</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>97</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>332pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>332pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<false/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t\t<string>1C0AD2B0069F1E9B00FABCE6</string>\n\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.classbrowser</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.refactoring</string>\n\t\t\t<key>IncludeInToolsMenu</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{0, 0}, {500, 335}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{0, 0}, {500, 335}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCRefactoringModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Refactoring</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCRefactoringModule</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>200 200 500 356 0 0 1920 1200 </string>\n\t\t</dict>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/FT2Plugin.xcodeproj/johnmci.pbxuser",
    "content": "// !$*UTF8*$!\n{\n\t4C2DFB1309335838008B95AB /* PkgInfo */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1024, 457}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {1024, 457}}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {1044, 869}}\";\n\t\t};\n\t};\n\t4CA7E52C092CC14E0044FE85 /* FT2Plugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {956, 23972}}\";\n\t\t\tsepNavSelRange = \"{1145, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1838}\";\n\t\t\tsepNavVisRect = \"{{0, 12144}, {795, 666}}\";\n\t\t\tsepNavWindowFrame = \"{{38, 55}, {772, 797}}\";\n\t\t};\n\t};\n\t4CA7E530092CC16B0044FE85 /* Info-FT2Plugin.plist */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {733, 668}}\";\n\t\t\tsepNavSelRange = \"{637, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {733, 668}}\";\n\t\t\tsepNavWindowFrame = \"{{61, 34}, {772, 797}}\";\n\t\t};\n\t};\n\t4CA7E550092CC6680044FE85 /* ft2build.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {787, 770}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 3590}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {719, 496}}\";\n\t\t\tsepNavWindowFrame = \"{{15, 68}, {980, 805}}\";\n\t\t};\n\t};\n\t4CED2BBF08EC3935007BDF80 /* sqVirtualMachine.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {781, 4862}}\";\n\t\t\tsepNavSelRange = \"{1000, 20}\";\n\t\t\tsepNavVisRange = \"{526, 2209}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {491, 512}}\";\n\t\t\tsepNavWindowFrame = \"{{61, 36}, {828, 795}}\";\n\t\t};\n\t};\n\t66DF6BFD01D7DCEA00A80119 /* Project object */ = {\n\t\tactiveBuildConfigurationName = Deployment;\n\t\tactiveExecutable = 949BB27E0932C7DF00684056 /* SqueakVM */;\n\t\tactiveSDKPreference = macosx10.5;\n\t\tactiveTarget = 942103F2084F50DF006A0FD2 /* FT2Plugin */;\n\t\taddToTargets = (\n\t\t\t942103F2084F50DF006A0FD2 /* FT2Plugin */,\n\t\t);\n\t\tbreakpoints = (\n\t\t);\n\t\tcodeSenseManager = 949BAFE809326DA600684056 /* Code sense */;\n\t\texecutables = (\n\t\t\t949BB27E0932C7DF00684056 /* SqueakVM */,\n\t\t);\n\t\tperUserDictionary = {\n\t\t\t\"PBXConfiguration.PBXBreakpointsDataSource.v1:1CA1AED706398EBD00589147\" = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXBreakpointsDataSource_ContinueID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t20,\n\t\t\t\t\t210,\n\t\t\t\t\t20,\n\t\t\t\t\t110,\n\t\t\t\t\t109,\n\t\t\t\t\t20,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXBreakpointsDataSource_ActionID,\n\t\t\t\t\tPBXBreakpointsDataSource_TypeID,\n\t\t\t\t\tPBXBreakpointsDataSource_BreakpointID,\n\t\t\t\t\tPBXBreakpointsDataSource_UseID,\n\t\t\t\t\tPBXBreakpointsDataSource_LocationID,\n\t\t\t\t\tPBXBreakpointsDataSource_ConditionID,\n\t\t\t\t\tPBXBreakpointsDataSource_ContinueID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXExecutablesDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXExecutablesDataSource_NameID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t22,\n\t\t\t\t\t300,\n\t\t\t\t\t666,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXExecutablesDataSource_ActiveFlagID,\n\t\t\t\t\tPBXExecutablesDataSource_NameID,\n\t\t\t\t\tPBXExecutablesDataSource_CommentsID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t766,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t\t20,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Target_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXFindDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFindDataSource_LocationID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t200,\n\t\t\t\t\t792,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFindDataSource_MessageID,\n\t\t\t\t\tPBXFindDataSource_LocationID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t726,\n\t\t\t\t\t60,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXTargetDataSource_PrimaryAttribute,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXPerProjectTemplateStateSaveDate = 286710319;\n\t\t\tPBXWorkspaceStateSaveDate = 286710319;\n\t\t};\n\t\tperUserProjectItems = {\n\t\t\t941BF5340BDECAEA00D361A5 /* PBXTextBookmark */ = 941BF5340BDECAEA00D361A5 /* PBXTextBookmark */;\n\t\t\t9433FBBF10DA2F6900405B56 /* PBXTextBookmark */ = 9433FBBF10DA2F6900405B56 /* PBXTextBookmark */;\n\t\t\t9440665810E5ADDB00353B27 /* PBXTextBookmark */ = 9440665810E5ADDB00353B27 /* PBXTextBookmark */;\n\t\t\t944067E510E6ACE300353B27 /* PBXTextBookmark */ = 944067E510E6ACE300353B27 /* PBXTextBookmark */;\n\t\t\t944067EC10E6ACE300353B27 /* PBXTextBookmark */ = 944067EC10E6ACE300353B27 /* PBXTextBookmark */;\n\t\t\t944067F210E6ACE300353B27 /* PBXTextBookmark */ = 944067F210E6ACE300353B27 /* PBXTextBookmark */;\n\t\t\t9460BC741116DA46003C837E /* PBXTextBookmark */ = 9460BC741116DA46003C837E /* PBXTextBookmark */;\n\t\t\t9460BC771116DA46003C837E /* PBXTextBookmark */ = 9460BC771116DA46003C837E /* PBXTextBookmark */;\n\t\t\t9460BC791116DA46003C837E /* PBXTextBookmark */ = 9460BC791116DA46003C837E /* PBXTextBookmark */;\n\t\t\t9467D0D10E7BC0020031C57C /* PBXTextBookmark */ = 9467D0D10E7BC0020031C57C /* PBXTextBookmark */;\n\t\t\t9480105710DEFB9C001E390E /* PBXTextBookmark */ = 9480105710DEFB9C001E390E /* PBXTextBookmark */;\n\t\t\t948010CC10DF048B001E390E /* PBXTextBookmark */ = 948010CC10DF048B001E390E /* PBXTextBookmark */;\n\t\t\t9495AC950ACA07A100D58F66 /* PBXTextBookmark */ = 9495AC950ACA07A100D58F66 /* PBXTextBookmark */;\n\t\t\t94C1A1310F3771F500A2AC5E /* PBXTextBookmark */ = 94C1A1310F3771F500A2AC5E /* PBXTextBookmark */;\n\t\t\t94F6F5970D86101D00E75319 /* PBXTextBookmark */ = 94F6F5970D86101D00E75319 /* PBXTextBookmark */;\n\t\t};\n\t\tsourceControlManager = 949BAFE709326DA600684056 /* Source Control */;\n\t\tuserBuildSettings = {\n\t\t};\n\t};\n\t9407B2F910DA271000AE2B55 /* sqVirtualMachine.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1279, 3471}}\";\n\t\t\tsepNavSelRange = \"{2625, 19}\";\n\t\t\tsepNavVisRange = \"{1025, 3006}\";\n\t\t\tsepNavWindowFrame = \"{{15, 13}, {1326, 1010}}\";\n\t\t};\n\t};\n\t940E416E09A448AA004715E5 /* macFileNameBits.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {956, 719}}\";\n\t\t\tsepNavSelRange = \"{302, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1284}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {1024, 457}}\";\n\t\t\tsepNavWindowFrame = \"{{763, 43}, {828, 795}}\";\n\t\t};\n\t};\n\t941BF43E0BDEB4B700D361A5 /* tttables.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {787, 9254}}\";\n\t\t\tsepNavSelRange = \"{160, 11}\";\n\t\t\tsepNavVisRange = \"{0, 2768}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {719, 496}}\";\n\t\t\tsepNavWindowFrame = \"{{38, 128}, {841, 874}}\";\n\t\t};\n\t};\n\t941BF5340BDECAEA00D361A5 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 4C2DFB1309335838008B95AB /* PkgInfo */;\n\t\tname = \"PkgInfo: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 8;\n\t\tvrLoc = 0;\n\t};\n\t941FC1910A75607B0071CA29 /* Squeak VM Opt.app */ = {\n\t\tisa = PBXFileReference;\n\t\texplicitFileType = wrapper.application;\n\t\tname = \"Squeak VM Opt.app\";\n\t\tpath = ../../../../build/Debug/Squeak.app;\n\t\tsourceTree = SOURCE_ROOT;\n\t};\n\t942103F2084F50DF006A0FD2 /* FT2Plugin */ = {\n\t\tactiveExec = 0;\n\t};\n\t9433FBBF10DA2F6900405B56 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 944E9BEE05E91D17003F0BED /* sqPlatformSpecific.h */;\n\t\tname = \"sqPlatformSpecific.h: 74\";\n\t\trLen = 0;\n\t\trLoc = 3027;\n\t\trType = 0;\n\t\tvrLen = 2127;\n\t\tvrLoc = 1864;\n\t};\n\t9440665810E5ADDB00353B27 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 940E416E09A448AA004715E5 /* macFileNameBits.c */;\n\t\tname = \"macFileNameBits.c: 14\";\n\t\trLen = 0;\n\t\trLoc = 302;\n\t\trType = 0;\n\t\tvrLen = 1284;\n\t\tvrLoc = 0;\n\t};\n\t944067E510E6ACE300353B27 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 4CA7E52C092CC14E0044FE85 /* FT2Plugin.c */;\n\t\tname = \"FT2Plugin.c: 1\";\n\t\trLen = 1;\n\t\trLoc = 64;\n\t\trType = 0;\n\t\tvrLen = 1708;\n\t\tvrLoc = 0;\n\t};\n\t944067EC10E6ACE300353B27 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 944067ED10E6ACE300353B27 /* fttypes.h */;\n\t\tname = \"fttypes.h: 579\";\n\t\trLen = 48;\n\t\trLoc = 34831;\n\t\trType = 0;\n\t\tvrLen = 2881;\n\t\tvrLoc = 32095;\n\t};\n\t944067ED10E6ACE300353B27 /* fttypes.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = fttypes.h;\n\t\tpath = \"/Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/fttypes.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t944067F210E6ACE300353B27 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 944067F310E6ACE300353B27 /* freetype.h */;\n\t\tname = \"freetype.h: 3020\";\n\t\trLen = 7;\n\t\trLoc = 187419;\n\t\trType = 0;\n\t\tvrLen = 4656;\n\t\tvrLoc = 185351;\n\t};\n\t944067F310E6ACE300353B27 /* freetype.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = freetype.h;\n\t\tpath = \"/Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/freetype.h\";\n\t\tsourceTree = \"<absolute>\";\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1279, 50427}}\";\n\t\t\tsepNavSelRange = \"{187419, 7}\";\n\t\t\tsepNavVisRange = \"{185351, 4578}\";\n\t\t\tsepNavWindowFrame = \"{{15, 13}, {1326, 1010}}\";\n\t\t};\n\t};\n\t944E9BEE05E91D17003F0BED /* sqPlatformSpecific.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {838, 1651}}\";\n\t\t\tsepNavSelRange = \"{3027, 0}\";\n\t\t\tsepNavVisRange = \"{1864, 2127}\";\n\t\t\tsepNavVisRect = \"{{0, 1209}, {1067, 256}}\";\n\t\t};\n\t};\n\t9460BC741116DA46003C837E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 4CA7E52C092CC14E0044FE85 /* FT2Plugin.c */;\n\t\tname = \"FT2Plugin.c: 45\";\n\t\trLen = 0;\n\t\trLoc = 1145;\n\t\trType = 0;\n\t\tvrLen = 1838;\n\t\tvrLoc = 0;\n\t};\n\t9460BC771116DA46003C837E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9460BC781116DA46003C837E /* fttypes.h */;\n\t\tname = \"fttypes.h: 579\";\n\t\trLen = 48;\n\t\trLoc = 34831;\n\t\trType = 0;\n\t\tvrLen = 2959;\n\t\tvrLoc = 32017;\n\t};\n\t9460BC781116DA46003C837E /* fttypes.h */ = {\n\t\tisa = PBXFileReference;\n\t\tname = fttypes.h;\n\t\tpath = \"/Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/fttypes.h\";\n\t\tsourceTree = \"<absolute>\";\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1279, 7865}}\";\n\t\t\tsepNavSelRange = \"{34831, 48}\";\n\t\t\tsepNavVisRange = \"{32017, 2959}\";\n\t\t\tsepNavWindowFrame = \"{{15, 13}, {1326, 1010}}\";\n\t\t};\n\t};\n\t9460BC791116DA46003C837E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9460BC7A1116DA46003C837E /* freetype.h */;\n\t\tname = \"freetype.h: 3020\";\n\t\trLen = 7;\n\t\trLoc = 187419;\n\t\trType = 0;\n\t\tvrLen = 4578;\n\t\tvrLoc = 185351;\n\t};\n\t9460BC7A1116DA46003C837E /* freetype.h */ = {\n\t\tisa = PBXFileReference;\n\t\tname = freetype.h;\n\t\tpath = \"/Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/freetype.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9467D0D10E7BC0020031C57C /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 941BF43E0BDEB4B700D361A5 /* tttables.h */;\n\t\tname = \"tttables.h: 3\";\n\t\trLen = 11;\n\t\trLoc = 160;\n\t\trType = 0;\n\t\tvrLen = 2768;\n\t\tvrLoc = 0;\n\t};\n\t9480105710DEFB9C001E390E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 949BB01909327CC500684056 /* sqMemoryAccess.h */;\n\t\tname = \"sqMemoryAccess.h: 95\";\n\t\trLen = 0;\n\t\trLoc = 3934;\n\t\trType = 0;\n\t\tvrLen = 3568;\n\t\tvrLoc = 2563;\n\t};\n\t948010CC10DF048B001E390E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 949BB01709327C9D00684056 /* interp.h */;\n\t\tname = \"interp.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 697;\n\t\tvrLoc = 0;\n\t};\n\t9495AC950ACA07A100D58F66 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 4CA7E530092CC16B0044FE85 /* Info-FT2Plugin.plist */;\n\t\tname = \"Info-FT2Plugin.plist: 26\";\n\t\trLen = 0;\n\t\trLoc = 877;\n\t\trType = 0;\n\t\tvrLen = 900;\n\t\tvrLoc = 0;\n\t};\n\t949BAFE709326DA600684056 /* Source Control */ = {\n\t\tisa = PBXSourceControlManager;\n\t\tfallbackIsa = XCSourceControlManager;\n\t\tisSCMEnabled = 0;\n\t\tscmConfiguration = {\n\t\t\trepositoryNamesForRoots = {\n\t\t\t\t\"\" = \"\";\n\t\t\t};\n\t\t};\n\t\tscmType = \"\";\n\t};\n\t949BAFE809326DA600684056 /* Code sense */ = {\n\t\tisa = PBXCodeSenseManager;\n\t\tindexTemplatePath = \"\";\n\t};\n\t949BB01709327C9D00684056 /* interp.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {968, 635}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 697}\";\n\t\t};\n\t};\n\t949BB01909327CC500684056 /* sqMemoryAccess.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {968, 2288}}\";\n\t\t\tsepNavSelRange = \"{3934, 0}\";\n\t\t\tsepNavVisRange = \"{2563, 3568}\";\n\t\t\tsepNavWindowFrame = \"{{15, 13}, {1326, 1010}}\";\n\t\t};\n\t};\n\t949BB07A09328C1500684056 /* sq.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1067, 5866}}\";\n\t\t\tsepNavSelRange = \"{5164, 23}\";\n\t\t\tsepNavVisRect = \"{{0, 1601}, {1067, 256}}\";\n\t\t};\n\t};\n\t949BB23909328D7E00684056 /* macFileNameBits.c */ = {\n\t\tisa = PBXFileReference;\n\t\tfileEncoding = 4;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = macFileNameBits.c;\n\t\tpath = /Users/johnmci/Documents/SqueakFontsBertFT2/FT2PluginProj/macFileNameBits.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t949BB27E0932C7DF00684056 /* SqueakVM */ = {\n\t\tisa = PBXExecutable;\n\t\tactiveArgIndices = (\n\t\t);\n\t\targumentStrings = (\n\t\t);\n\t\tautoAttachOnCrash = 1;\n\t\tbreakpointsEnabled = 1;\n\t\tconfigStateDict = {\n\t\t\t\"PBXLSLaunchAction-0\" = {\n\t\t\t\tPBXLSLaunchAction = 0;\n\t\t\t\tPBXLSLaunchStartAction = 1;\n\t\t\t\tPBXLSLaunchStdioStyle = 2;\n\t\t\t\tPBXLSLaunchStyle = 0;\n\t\t\t\tclass = PBXLSRunLaunchConfig;\n\t\t\t\tcommandLineArgs = (\n\t\t\t\t);\n\t\t\t\tdisplayName = \"Executable Runner\";\n\t\t\t\tenvironment = {\n\t\t\t\t};\n\t\t\t\tidentifier = com.apple.Xcode.launch.runConfig;\n\t\t\t\tremoteHostInfo = \"\";\n\t\t\t\tstartActionInfo = \"\";\n\t\t\t};\n\t\t};\n\t\tcustomDataFormattersEnabled = 1;\n\t\tdataTipCustomDataFormattersEnabled = 1;\n\t\tdataTipShowTypeColumn = 1;\n\t\tdataTipSortType = 0;\n\t\tdebuggerPlugin = GDBDebugging;\n\t\tdisassemblyDisplayState = 0;\n\t\tdylibVariantSuffix = \"\";\n\t\tenableDebugStr = 1;\n\t\tenvironmentEntries = (\n\t\t);\n\t\texecutableSystemSymbolLevel = 0;\n\t\texecutableUserSymbolLevel = 0;\n\t\tlaunchableReference = 941FC1910A75607B0071CA29 /* Squeak VM Opt.app */;\n\t\tlibgmallocEnabled = 0;\n\t\tname = SqueakVM;\n\t\tsavedGlobals = {\n\t\t};\n\t\tshowTypeColumn = 0;\n\t\tsourceDirectories = (\n\t\t);\n\t\tvariableFormatDictionary = {\n\t\t};\n\t};\n\t94C1A1310F3771F500A2AC5E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 949BB23909328D7E00684056 /* macFileNameBits.c */;\n\t\tname = \"macFileNameBits.c: 17\";\n\t\trLen = 0;\n\t\trLoc = 427;\n\t\trType = 0;\n\t\tvrLen = 1280;\n\t\tvrLoc = 0;\n\t};\n\t94F6F5970D86101D00E75319 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 4CA7E550092CC6680044FE85 /* ft2build.h */;\n\t\tname = \"ft2build.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 3590;\n\t\tvrLoc = 0;\n\t};\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/FT2Plugin.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 42;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t4C2DFB2D093359A8008B95AB /* PkgInfo in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4C2DFB1309335838008B95AB /* PkgInfo */; };\n\t\t4CA7E52D092CC14E0044FE85 /* FT2Plugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 4CA7E52C092CC14E0044FE85 /* FT2Plugin.c */; };\n\t\t4CA7E551092CC6680044FE85 /* ft2build.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CA7E550092CC6680044FE85 /* ft2build.h */; };\n\t\t4CED2BC008EC3935007BDF80 /* sqVirtualMachine.c in Headers */ = {isa = PBXBuildFile; fileRef = 4CED2BBF08EC3935007BDF80 /* sqVirtualMachine.c */; };\n\t\t9407B2FA10DA271000AE2B55 /* sqVirtualMachine.h in Headers */ = {isa = PBXBuildFile; fileRef = 9407B2F910DA271000AE2B55 /* sqVirtualMachine.h */; };\n\t\t940E416F09A448AA004715E5 /* macFileNameBits.c in Sources */ = {isa = PBXBuildFile; fileRef = 940E416E09A448AA004715E5 /* macFileNameBits.c */; };\n\t\t941BF43F0BDEB4B700D361A5 /* tttables.h in Headers */ = {isa = PBXBuildFile; fileRef = 941BF43E0BDEB4B700D361A5 /* tttables.h */; };\n\t\t942103F9084F50DF006A0FD2 /* sqConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 944E9BEC05E91D17003F0BED /* sqConfig.h */; };\n\t\t942103FB084F50DF006A0FD2 /* sqPlatformSpecific.h in Headers */ = {isa = PBXBuildFile; fileRef = 944E9BEE05E91D17003F0BED /* sqPlatformSpecific.h */; };\n\t\t942103FD084F50DF006A0FD2 /* SqueakPlugin.icns in Resources */ = {isa = PBXBuildFile; fileRef = 66C6C8E501DB1EC300A80109 /* SqueakPlugin.icns */; };\n\t\t949BB00D09327C3300684056 /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = 949BB00C09327C3300684056 /* config.h */; };\n\t\t949BB01809327C9D00684056 /* interp.h in Headers */ = {isa = PBXBuildFile; fileRef = 949BB01709327C9D00684056 /* interp.h */; };\n\t\t949BB01A09327CC500684056 /* sqMemoryAccess.h in Headers */ = {isa = PBXBuildFile; fileRef = 949BB01909327CC500684056 /* sqMemoryAccess.h */; };\n\t\t949BB07B09328C1500684056 /* sq.h in Headers */ = {isa = PBXBuildFile; fileRef = 949BB07A09328C1500684056 /* sq.h */; };\n\t\t949BB07D09328C9D00684056 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 949BB07C09328C9D00684056 /* CoreFoundation.framework */; };\n\t\t949BB08209328CD500684056 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 949BB08109328CD500684056 /* Carbon.framework */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXBuildRule section */\n\t\t94D066A8084F978100D2CF17 /* PBXBuildRule */ = {\n\t\t\tisa = PBXBuildRule;\n\t\t\tcompilerSpec = com.apple.compilers.gcc.4_2;\n\t\t\tfileType = sourcecode.c;\n\t\t\tisEditable = 1;\n\t\t\toutputFiles = (\n\t\t\t);\n\t\t};\n/* End PBXBuildRule section */\n\n/* Begin PBXCopyFilesBuildPhase section */\n\t\t4C2DFB2B09335970008B95AB /* CopyFiles */ = {\n\t\t\tisa = PBXCopyFilesBuildPhase;\n\t\t\tbuildActionMask = 12;\n\t\t\tdstPath = ..;\n\t\t\tdstSubfolderSpec = 7;\n\t\t\tfiles = (\n\t\t\t\t4C2DFB2D093359A8008B95AB /* PkgInfo in CopyFiles */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXCopyFilesBuildPhase section */\n\n/* Begin PBXFileReference section */\n\t\t4C2DFB1309335838008B95AB /* PkgInfo */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = PkgInfo; sourceTree = \"<group>\"; };\n\t\t4CA7E52C092CC14E0044FE85 /* FT2Plugin.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = FT2Plugin.c; path = ../../../../src/plugins/FT2Plugin/FT2Plugin.c; sourceTree = \"<group>\"; };\n\t\t4CA7E530092CC16B0044FE85 /* Info-FT2Plugin.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = \"Info-FT2Plugin.plist\"; sourceTree = \"<group>\"; };\n\t\t4CA7E550092CC6680044FE85 /* ft2build.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ft2build.h; path = /usr/X11R6/include/ft2build.h; sourceTree = \"<absolute>\"; };\n\t\t4CED2BBF08EC3935007BDF80 /* sqVirtualMachine.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = sqVirtualMachine.c; path = ../../../Cross/vm/sqVirtualMachine.c; sourceTree = \"<group>\"; };\n\t\t4CF9AFE9092E090000DBD378 /* FT2Plugin.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FT2Plugin.bundle; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t66C6C8E501DB1EC300A80109 /* SqueakPlugin.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = SqueakPlugin.icns; path = ../../vm/OSX/SqueakPlugin.icns; sourceTree = \"<group>\"; };\n\t\t9407B2F910DA271000AE2B55 /* sqVirtualMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqVirtualMachine.h; path = ../../../Cross/vm/sqVirtualMachine.h; sourceTree = SOURCE_ROOT; };\n\t\t940E416E09A448AA004715E5 /* macFileNameBits.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = macFileNameBits.c; sourceTree = \"<group>\"; };\n\t\t941BF43E0BDEB4B700D361A5 /* tttables.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = tttables.h; path = /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include/freetype2/freetype/tttables.h; sourceTree = \"<absolute>\"; };\n\t\t944E9BEC05E91D17003F0BED /* sqConfig.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sqConfig.h; path = ../../vm/iPhone/sqConfig.h; sourceTree = \"<group>\"; };\n\t\t944E9BEE05E91D17003F0BED /* sqPlatformSpecific.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sqPlatformSpecific.h; path = ../../vm/iPhone/sqPlatformSpecific.h; sourceTree = \"<group>\"; };\n\t\t949BB00C09327C3300684056 /* config.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = config.h; path = ../../vm/iPhone/config.h; sourceTree = \"<group>\"; };\n\t\t949BB01709327C9D00684056 /* interp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = interp.h; path = ../../../../src/vm/interp.h; sourceTree = \"<group>\"; };\n\t\t949BB01909327CC500684056 /* sqMemoryAccess.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sqMemoryAccess.h; path = ../../../Cross/vm/sqMemoryAccess.h; sourceTree = \"<group>\"; };\n\t\t949BB07A09328C1500684056 /* sq.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sq.h; path = ../../../Cross/vm/sq.h; sourceTree = \"<group>\"; };\n\t\t949BB07C09328C9D00684056 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = \"<absolute>\"; };\n\t\t949BB08109328CD500684056 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = \"<absolute>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t94210404084F50DF006A0FD2 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t949BB07D09328C9D00684056 /* CoreFoundation.framework in Frameworks */,\n\t\t\t\t949BB08209328CD500684056 /* Carbon.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t4CA7E552092CC66D0044FE85 /* Headers */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t9407B2F910DA271000AE2B55 /* sqVirtualMachine.h */,\n\t\t\t\t949BB07A09328C1500684056 /* sq.h */,\n\t\t\t\t949BB01909327CC500684056 /* sqMemoryAccess.h */,\n\t\t\t\t949BB01709327C9D00684056 /* interp.h */,\n\t\t\t\t949BB00C09327C3300684056 /* config.h */,\n\t\t\t\t4CA7E550092CC6680044FE85 /* ft2build.h */,\n\t\t\t\t4CED2BBF08EC3935007BDF80 /* sqVirtualMachine.c */,\n\t\t\t\t944E9BEC05E91D17003F0BED /* sqConfig.h */,\n\t\t\t\t944E9BEE05E91D17003F0BED /* sqPlatformSpecific.h */,\n\t\t\t);\n\t\t\tname = Headers;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t4CA7E553092CC67E0044FE85 /* Libraries */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t949BB08109328CD500684056 /* Carbon.framework */,\n\t\t\t\t949BB07C09328C9D00684056 /* CoreFoundation.framework */,\n\t\t\t);\n\t\t\tname = Libraries;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66DF6BFE01D7DCEA00A80119 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t4C2DFB1309335838008B95AB /* PkgInfo */,\n\t\t\t\t66DF6BFF01D7DCEA00A80119 /* Sources */,\n\t\t\t\t4CA7E553092CC67E0044FE85 /* Libraries */,\n\t\t\t\t4CA7E552092CC66D0044FE85 /* Headers */,\n\t\t\t\t66DF6C3901D7DCEA00A80119 /* resources */,\n\t\t\t\t66DF6C4501D7DEEE00A80119 /* Products */,\n\t\t\t\t4CA7E530092CC16B0044FE85 /* Info-FT2Plugin.plist */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66DF6BFF01D7DCEA00A80119 /* Sources */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t940E416E09A448AA004715E5 /* macFileNameBits.c */,\n\t\t\t\t4CA7E52C092CC14E0044FE85 /* FT2Plugin.c */,\n\t\t\t\t941BF43E0BDEB4B700D361A5 /* tttables.h */,\n\t\t\t);\n\t\t\tname = Sources;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66DF6C3901D7DCEA00A80119 /* resources */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t66C6C8E501DB1EC300A80109 /* SqueakPlugin.icns */,\n\t\t\t);\n\t\t\tname = resources;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66DF6C4501D7DEEE00A80119 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t4CF9AFE9092E090000DBD378 /* FT2Plugin.bundle */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXHeadersBuildPhase section */\n\t\t942103F3084F50DF006A0FD2 /* Headers */ = {\n\t\t\tisa = PBXHeadersBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t942103F9084F50DF006A0FD2 /* sqConfig.h in Headers */,\n\t\t\t\t942103FB084F50DF006A0FD2 /* sqPlatformSpecific.h in Headers */,\n\t\t\t\t4CED2BC008EC3935007BDF80 /* sqVirtualMachine.c in Headers */,\n\t\t\t\t4CA7E551092CC6680044FE85 /* ft2build.h in Headers */,\n\t\t\t\t949BB00D09327C3300684056 /* config.h in Headers */,\n\t\t\t\t949BB01809327C9D00684056 /* interp.h in Headers */,\n\t\t\t\t949BB01A09327CC500684056 /* sqMemoryAccess.h in Headers */,\n\t\t\t\t949BB07B09328C1500684056 /* sq.h in Headers */,\n\t\t\t\t941BF43F0BDEB4B700D361A5 /* tttables.h in Headers */,\n\t\t\t\t9407B2FA10DA271000AE2B55 /* sqVirtualMachine.h in Headers */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXHeadersBuildPhase section */\n\n/* Begin PBXNativeTarget section */\n\t\t942103F2084F50DF006A0FD2 /* FT2Plugin */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 949BAFDF09326DA600684056 /* Build configuration list for PBXNativeTarget \"FT2Plugin\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t942103F3084F50DF006A0FD2 /* Headers */,\n\t\t\t\t942103FC084F50DF006A0FD2 /* Resources */,\n\t\t\t\t4C2DFB2B09335970008B95AB /* CopyFiles */,\n\t\t\t\t942103FF084F50DF006A0FD2 /* Sources */,\n\t\t\t\t94210404084F50DF006A0FD2 /* Frameworks */,\n\t\t\t\t94210406084F50DF006A0FD2 /* Rez */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t\t94D066A8084F978100D2CF17 /* PBXBuildRule */,\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = FT2Plugin;\n\t\t\tproductName = \"PrintJobPlugin Debug\";\n\t\t\tproductReference = 4CF9AFE9092E090000DBD378 /* FT2Plugin.bundle */;\n\t\t\tproductType = \"com.apple.product-type.bundle\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t66DF6BFD01D7DCEA00A80119 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tbuildConfigurationList = 949BAFE309326DA600684056 /* Build configuration list for PBXProject \"FT2Plugin\" */;\n\t\t\tcompatibilityVersion = \"Xcode 2.4\";\n\t\t\tdevelopmentRegion = English;\n\t\t\thasScannedForEncodings = 1;\n\t\t\tknownRegions = (\n\t\t\t\tEnglish,\n\t\t\t\tJapanese,\n\t\t\t\tFrench,\n\t\t\t\tGerman,\n\t\t\t);\n\t\t\tmainGroup = 66DF6BFE01D7DCEA00A80119;\n\t\t\tproductRefGroup = 66DF6C4501D7DEEE00A80119 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t942103F2084F50DF006A0FD2 /* FT2Plugin */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t942103FC084F50DF006A0FD2 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t942103FD084F50DF006A0FD2 /* SqueakPlugin.icns in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXRezBuildPhase section */\n\t\t94210406084F50DF006A0FD2 /* Rez */ = {\n\t\t\tisa = PBXRezBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXRezBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t942103FF084F50DF006A0FD2 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t4CA7E52D092CC14E0044FE85 /* FT2Plugin.c in Sources */,\n\t\t\t\t940E416F09A448AA004715E5 /* macFileNameBits.c in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin XCBuildConfiguration section */\n\t\t949BAFE009326DA600684056 /* Development */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tARCHS = \"$(ARCHS_STANDARD_64_BIT_PRE_XCODE_3_1)\";\n\t\t\t\tARCHS_STANDARD_64_BIT_PRE_XCODE_3_1 = x86_64;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_ENABLE_FIX_AND_CONTINUE = YES;\n\t\t\t\tGCC_GENERATE_DEBUGGING_SYMBOLS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = \"\";\n\t\t\t\tHEADER_SEARCH_PATHS = \"\\\"$(SRCROOT)/freetype2\\\"\";\n\t\t\t\tINFOPLIST_FILE = \"Info-FT2Plugin.plist\";\n\t\t\t\tOTHER_CFLAGS = \"\";\n\t\t\t\tOTHER_LDFLAGS = (\n\t\t\t\t\t\"-undefined\",\n\t\t\t\t\tdynamic_lookup,\n\t\t\t\t\t\"-lz\",\n\t\t\t\t\t/tmp/libfreetype.a,\n\t\t\t\t);\n\t\t\t\tOTHER_REZFLAGS = \"\";\n\t\t\t\tPRODUCT_NAME = FT2Plugin;\n\t\t\t\tSDKROOT = /Developer/SDKs/MacOSX10.5.sdk;\n\t\t\t\tSECTORDER_FLAGS = \"\";\n\t\t\t\tWARNING_CFLAGS = (\n\t\t\t\t\t\"-Wmost\",\n\t\t\t\t\t\"-Wno-four-char-constants\",\n\t\t\t\t\t\"-Wno-unknown-pragmas\",\n\t\t\t\t);\n\t\t\t\tWRAPPER_EXTENSION = bundle;\n\t\t\t\tZERO_LINK = YES;\n\t\t\t};\n\t\t\tname = Development;\n\t\t};\n\t\t949BAFE109326DA600684056 /* Deployment */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tARCHS = \"$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)\";\n\t\t\t\tARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = \"x86_64 i386 ppc\";\n\t\t\t\tCOPY_PHASE_STRIP = YES;\n\t\t\t\tGCC_ENABLE_FIX_AND_CONTINUE = NO;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = \"\";\n\t\t\t\tHEADER_SEARCH_PATHS = \"\\\"$(SRCROOT)/freetype2\\\"\";\n\t\t\t\tINFOPLIST_FILE = \"Info-FT2Plugin.plist\";\n\t\t\t\tOTHER_CFLAGS = \"\";\n\t\t\t\tOTHER_LDFLAGS = (\n\t\t\t\t\t\"-undefined\",\n\t\t\t\t\tdynamic_lookup,\n\t\t\t\t\t\"-lz\",\n\t\t\t\t\t/tmp/libfreetype.a,\n\t\t\t\t);\n\t\t\t\tPER_ARCH_CFLAGS_i386 = \"-O3 -Wall\";\n\t\t\t\tPER_ARCH_CFLAGS_ppc = \"-O3  -fPIC\";\n\t\t\t\tPRELINK_LIBS = \"\";\n\t\t\t\tPRODUCT_NAME = FT2Plugin;\n\t\t\t\tSECTORDER_FLAGS = \"\";\n\t\t\t\tWARNING_CFLAGS = (\n\t\t\t\t\t\"-Wmost\",\n\t\t\t\t\t\"-Wno-four-char-constants\",\n\t\t\t\t\t\"-Wno-unknown-pragmas\",\n\t\t\t\t);\n\t\t\t\tWRAPPER_EXTENSION = bundle;\n\t\t\t\tZERO_LINK = NO;\n\t\t\t};\n\t\t\tname = Deployment;\n\t\t};\n\t\t949BAFE209326DA600684056 /* Default */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tARCHS = (\n\t\t\t\t\tppc,\n\t\t\t\t\ti386,\n\t\t\t\t);\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 2;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = TARGET_API_MAC_CARBON;\n\t\t\t\tHEADER_SEARCH_PATHS = (\n\t\t\t\t\t/Developer/Headers/FlatCarbon,\n\t\t\t\t\t/usr/X11R6/include/freetype2,\n\t\t\t\t);\n\t\t\t\tINFOPLIST_FILE = \"Info-FT2Plugin.plist\";\n\t\t\t\tLIBRARY_SEARCH_PATHS = (\n\t\t\t\t\t\"$(SRCROOT)\",\n\t\t\t\t\t\"$(SYSTEM_DEVELOPER_DIR)/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib\",\n\t\t\t\t\t\"$(SRCROOT)/../fonts/freetype-2.1.10/objs\",\n\t\t\t\t\t\"$(SRCROOT)/../fonts/freetype-2.1.10/objs/intel\",\n\t\t\t\t);\n\t\t\t\tOTHER_CFLAGS = \"\";\n\t\t\t\tOTHER_REZFLAGS = \"\";\n\t\t\t\tPRODUCT_NAME = FT2Plugin;\n\t\t\t\tSECTORDER_FLAGS = \"\";\n\t\t\t\tWARNING_CFLAGS = (\n\t\t\t\t\t\"-Wmost\",\n\t\t\t\t\t\"-Wno-four-char-constants\",\n\t\t\t\t\t\"-Wno-unknown-pragmas\",\n\t\t\t\t);\n\t\t\t\tWRAPPER_EXTENSION = bundle;\n\t\t\t};\n\t\t\tname = Default;\n\t\t};\n\t\t949BAFE409326DA600684056 /* Development */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tGENERATE_MASTER_OBJECT_FILE = NO;\n\t\t\t\tSDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;\n\t\t\t};\n\t\t\tname = Development;\n\t\t};\n\t\t949BAFE509326DA600684056 /* Deployment */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tGENERATE_MASTER_OBJECT_FILE = NO;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tPRELINK_FLAGS = \"\";\n\t\t\t\tPRELINK_LIBS = \"\";\n\t\t\t\tSDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;\n\t\t\t};\n\t\t\tname = Deployment;\n\t\t};\n\t\t949BAFE609326DA600684056 /* Default */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tGENERATE_MASTER_OBJECT_FILE = NO;\n\t\t\t\tSDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;\n\t\t\t};\n\t\t\tname = Default;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t949BAFDF09326DA600684056 /* Build configuration list for PBXNativeTarget \"FT2Plugin\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t949BAFE009326DA600684056 /* Development */,\n\t\t\t\t949BAFE109326DA600684056 /* Deployment */,\n\t\t\t\t949BAFE209326DA600684056 /* Default */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Default;\n\t\t};\n\t\t949BAFE309326DA600684056 /* Build configuration list for PBXProject \"FT2Plugin\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t949BAFE409326DA600684056 /* Development */,\n\t\t\t\t949BAFE509326DA600684056 /* Deployment */,\n\t\t\t\t949BAFE609326DA600684056 /* Default */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Default;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 66DF6BFD01D7DCEA00A80119 /* Project object */;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/Info-FT2Plugin.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>FT2Plugin</string>\n\t<key>CFBundleGetInfoString</key>\n\t<string>FT2Plugin V2.3.11 for Squeak</string>\n\t<key>CFBundleIconFile</key>\n\t<string>SqueakPlugin.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>de.impara.FT2Plugin</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>FT2Plugin V2.3.11 for Squeak</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>2.3.11</string>\n\t<key>CFBundleSignature</key>\n\t<string>FAST</string>\n\t<key>CFBundleVersion</key>\n\t<string>2.3.11</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/PkgInfo",
    "content": "BNDLFAST"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/config/ftconfig.h",
    "content": "/* ftconfig.h.  Generated from ftconfig.in by configure.  */\n/***************************************************************************/\n/*                                                                         */\n/*  ftconfig.in                                                            */\n/*                                                                         */\n/*    UNIX-specific configuration file (specification only).               */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009 by       */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This header file contains a number of macro definitions that are used */\n  /* by the rest of the engine.  Most of the macros here are automatically */\n  /* determined at compile time, and you should not need to change it to   */\n  /* port FreeType, except to compile the library with a non-ANSI          */\n  /* compiler.                                                             */\n  /*                                                                       */\n  /* Note however that if some specific modifications are needed, we       */\n  /* advise you to place a modified copy in your build directory.          */\n  /*                                                                       */\n  /* The build directory is usually `freetype/builds/<system>', and        */\n  /* contains system-specific files that are always included first when    */\n  /* building the library.                                                 */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#ifndef __FTCONFIG_H__\n#define __FTCONFIG_H__\n\n#include <ft2build.h>\n#include FT_CONFIG_OPTIONS_H\n#include FT_CONFIG_STANDARD_LIBRARY_H\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*               PLATFORM-SPECIFIC CONFIGURATION MACROS                  */\n  /*                                                                       */\n  /* These macros can be toggled to suit a specific system.  The current   */\n  /* ones are defaults used to compile FreeType in an ANSI C environment   */\n  /* (16bit compilers are also supported).  Copy this file to your own     */\n  /* `freetype/builds/<system>' directory, and edit it to port the engine. */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#define HAVE_UNISTD_H 1\n#define HAVE_FCNTL_H 1\n#define HAVE_STDINT_H 1\n\n\n  /* There are systems (like the Texas Instruments 'C54x) where a `char' */\n  /* has 16 bits.  ANSI C says that sizeof(char) is always 1.  Since an  */\n  /* `int' has 16 bits also for this system, sizeof(int) gives 1 which   */\n  /* is probably unexpected.                                             */\n  /*                                                                     */\n  /* `CHAR_BIT' (defined in limits.h) gives the number of bits in a      */\n  /* `char' type.                                                        */\n\n#ifndef FT_CHAR_BIT\n#define FT_CHAR_BIT  CHAR_BIT\n#endif\n\n\n#if defined (__i386__) || defined(__x86_64__)\n#ifndef __LP64__\n#endif /* __i386__ || __x86_64__ */\n/* #undef FT_USE_AUTOCONF_SIZEOF_TYPES */\n#if defined (__i386__) || defined(__x86_64__)\n#else /* __LP64__ */\n#define FT_USE_AUTOCONF_SIZEOF_TYPES 1\n#endif /* __LP64__ */\n#endif /* __i386__ || __x86_64__ */\n#ifdef FT_USE_AUTOCONF_SIZEOF_TYPES\n\n#define SIZEOF_INT 4\n#if defined (__i386__) || defined(__x86_64__)\n#ifndef __LP64__\n#endif /* __i386__ || __x86_64__ */\n#define SIZEOF_LONG 4\n#if defined (__i386__) || defined(__x86_64__)\n#else /* __LP64__ */\n#define SIZEOF_LONG 8\n#endif /* __LP64__ */\n#endif /* __i386__ || __x86_64__ */\n#define FT_SIZEOF_INT  SIZEOF_INT\n#define FT_SIZEOF_LONG SIZEOF_LONG\n\n#else /* !FT_USE_AUTOCONF_SIZEOF_TYPES */\n\n  /* Following cpp computation of the bit length of int and long */\n  /* is copied from default include/freetype/config/ftconfig.h.  */\n  /* If any improvement is required for this file, it should be  */\n  /* applied to the original header file for the builders that   */\n  /* does not use configure script.                              */\n\n  /* The size of an `int' type.  */\n#if                                 FT_UINT_MAX == 0xFFFFUL\n#define FT_SIZEOF_INT  (16 / FT_CHAR_BIT)\n#elif                               FT_UINT_MAX == 0xFFFFFFFFUL\n#define FT_SIZEOF_INT  (32 / FT_CHAR_BIT)\n#elif FT_UINT_MAX > 0xFFFFFFFFUL && FT_UINT_MAX == 0xFFFFFFFFFFFFFFFFUL\n#define FT_SIZEOF_INT  (64 / FT_CHAR_BIT)\n#else\n#error \"Unsupported size of `int' type!\"\n#endif\n\n  /* The size of a `long' type.  A five-byte `long' (as used e.g. on the */\n  /* DM642) is recognized but avoided.                                   */\n#if                                  FT_ULONG_MAX == 0xFFFFFFFFUL\n#define FT_SIZEOF_LONG  (32 / FT_CHAR_BIT)\n#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFUL\n#define FT_SIZEOF_LONG  (32 / FT_CHAR_BIT)\n#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFUL\n#define FT_SIZEOF_LONG  (64 / FT_CHAR_BIT)\n#else\n#error \"Unsupported size of `long' type!\"\n#endif\n\n#endif /* !FT_USE_AUTOCONF_SIZEOF_TYPES */\n\n\n  /* Preferred alignment of data */\n#define FT_ALIGNMENT  8\n\n\n  /* FT_UNUSED is a macro used to indicate that a given parameter is not  */\n  /* used -- this is only used to get rid of unpleasant compiler warnings */\n#ifndef FT_UNUSED\n#define FT_UNUSED( arg )  ( (arg) = (arg) )\n#endif\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*                     AUTOMATIC CONFIGURATION MACROS                    */\n  /*                                                                       */\n  /* These macros are computed from the ones defined above.  Don't touch   */\n  /* their definition, unless you know precisely what you are doing.  No   */\n  /* porter should need to mess with them.                                 */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Mac support                                                           */\n  /*                                                                       */\n  /*   This is the only necessary change, so it is defined here instead    */\n  /*   providing a new configuration file.                                 */\n  /*                                                                       */\n#if ( defined( __APPLE__ ) && !defined( DARWIN_NO_CARBON ) ) || \\\n    ( defined( __MWERKS__ ) && defined( macintosh )        )\n  /* no Carbon frameworks for 64bit 10.4.x */\n#include \"AvailabilityMacros.h\"\n#if defined( __LP64__ ) && \\\n    ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 )\n#define DARWIN_NO_CARBON 1\n#else\n#define FT_MACINTOSH 1\n#endif\n\n#elif defined( __SC__ ) || defined( __MRC__ )\n  /* Classic MacOS compilers */\n#include \"ConditionalMacros.h\"\n#if TARGET_OS_MAC\n#define FT_MACINTOSH 1\n#endif\n\n#endif\n\n\n  /* Fix compiler warning with sgi compiler */\n#if defined( __sgi ) && !defined( __GNUC__ )\n#if defined( _COMPILER_VERSION ) && ( _COMPILER_VERSION >= 730 )\n#pragma set woff 3505\n#endif\n#endif\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* IntN types                                                            */\n  /*                                                                       */\n  /*   Used to guarantee the size of some specific integers.               */\n  /*                                                                       */\n  typedef signed short    FT_Int16;\n  typedef unsigned short  FT_UInt16;\n\n#if FT_SIZEOF_INT == 4\n\n  typedef signed int      FT_Int32;\n  typedef unsigned int    FT_UInt32;\n\n#elif FT_SIZEOF_LONG == 4\n\n  typedef signed long     FT_Int32;\n  typedef unsigned long   FT_UInt32;\n\n#else\n#error \"no 32bit type found -- please check your configuration files\"\n#endif\n\n\n  /* look up an integer type that is at least 32 bits */\n#if FT_SIZEOF_INT >= 4\n\n  typedef int            FT_Fast;\n  typedef unsigned int   FT_UFast;\n\n#elif FT_SIZEOF_LONG >= 4\n\n  typedef long           FT_Fast;\n  typedef unsigned long  FT_UFast;\n\n#endif\n\n\n  /* determine whether we have a 64-bit int type for platforms without */\n  /* Autoconf                                                          */\n#if FT_SIZEOF_LONG == 8\n\n  /* FT_LONG64 must be defined if a 64-bit type is available */\n#define FT_LONG64\n#define FT_INT64  long\n\n#elif defined( _MSC_VER ) && _MSC_VER >= 900  /* Visual C++ (and Intel C++) */\n\n  /* this compiler provides the __int64 type */\n#define FT_LONG64\n#define FT_INT64  __int64\n\n#elif defined( __BORLANDC__ )  /* Borland C++ */\n\n  /* XXXX: We should probably check the value of __BORLANDC__ in order */\n  /*       to test the compiler version.                               */\n\n  /* this compiler provides the __int64 type */\n#define FT_LONG64\n#define FT_INT64  __int64\n\n#elif defined( __WATCOMC__ )   /* Watcom C++ */\n\n  /* Watcom doesn't provide 64-bit data types */\n\n#elif defined( __MWERKS__ )    /* Metrowerks CodeWarrior */\n\n#define FT_LONG64\n#define FT_INT64  long long int\n\n#elif defined( __GNUC__ )\n\n  /* GCC provides the `long long' type */\n#define FT_LONG64\n#define FT_INT64  long long int\n\n#endif /* FT_SIZEOF_LONG == 8 */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* A 64-bit data type will create compilation problems if you compile    */\n  /* in strict ANSI mode.  To avoid them, we disable its use if __STDC__   */\n  /* is defined.  You can however ignore this rule by defining the         */\n  /* FT_CONFIG_OPTION_FORCE_INT64 configuration macro.                     */\n  /*                                                                       */\n#if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 )\n\n#ifdef __STDC__\n\n  /* Undefine the 64-bit macros in strict ANSI compilation mode.  */\n  /* Since `#undef' doesn't survive in configuration header files */\n  /* we use the postprocessing facility of AC_CONFIG_HEADERS to   */\n  /* replace the leading `/' with `#'.                            */\n#undef FT_LONG64\n#undef FT_INT64\n\n#endif /* __STDC__ */\n\n#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */\n\n\n#define FT_BEGIN_STMNT  do {\n#define FT_END_STMNT    } while ( 0 )\n#define FT_DUMMY_STMNT  FT_BEGIN_STMNT FT_END_STMNT\n\n\n#ifndef  FT_CONFIG_OPTION_NO_ASSEMBLER\n  /* Provide assembler fragments for performance-critical functions. */\n  /* These must be defined `static __inline__' with GCC.             */\n\n#ifdef __GNUC__\n\n#if defined( __arm__ ) && !defined( __thumb__ )\n#define FT_MULFIX_ASSEMBLER  FT_MulFix_arm\n\n  static __inline__ FT_Int32\n  FT_MulFix_arm( FT_Int32  a,\n                 FT_Int32  b )\n  {\n    register FT_Int32  t, t2;\n\n\n    __asm__ __volatile__ (\n      \"smull  %1, %2, %4, %3\\n\\t\"       /* (lo=%1,hi=%2) = a*b */\n      \"mov    %0, %2, asr #31\\n\\t\"      /* %0  = (hi >> 31) */\n      \"add    %0, %0, #0x8000\\n\\t\"      /* %0 += 0x8000 */\n      \"adds   %1, %1, %0\\n\\t\"           /* %1 += %0 */\n      \"adc    %2, %2, #0\\n\\t\"           /* %2 += carry */\n      \"mov    %0, %1, lsr #16\\n\\t\"      /* %0  = %1 >> 16 */\n      \"orr    %0, %0, %2, lsl #16\\n\\t\"  /* %0 |= %2 << 16 */\n      : \"=r\"(a), \"=&r\"(t2), \"=&r\"(t)\n      : \"r\"(a), \"r\"(b) );\n    return a;\n  }\n\n#endif /* __arm__ && !__thumb__ */\n\n#if defined( i386 )\n#define FT_MULFIX_ASSEMBLER  FT_MulFix_i386\n\n  static __inline__ FT_Int32\n  FT_MulFix_i386( FT_Int32  a,\n                  FT_Int32  b )\n  {\n    register FT_Int32  result;\n\n\n    __asm__ __volatile__ (\n      \"imul  %%edx\\n\"\n      \"movl  %%edx, %%ecx\\n\"\n      \"sarl  $31, %%ecx\\n\"\n      \"addl  $0x8000, %%ecx\\n\"\n      \"addl  %%ecx, %%eax\\n\"\n      \"adcl  $0, %%edx\\n\"\n      \"shrl  $16, %%eax\\n\"\n      \"shll  $16, %%edx\\n\"\n      \"addl  %%edx, %%eax\\n\"\n      : \"=a\"(result), \"+d\"(b)\n      : \"a\"(a)\n      : \"%ecx\" );\n    return result;\n  }\n\n#endif /* i386 */\n\n#endif /* __GNUC__ */\n\n#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */\n\n\n#ifdef FT_CONFIG_OPTION_INLINE_MULFIX\n#ifdef FT_MULFIX_ASSEMBLER\n#define FT_MULFIX_INLINED  FT_MULFIX_ASSEMBLER\n#endif\n#endif\n\n\n#ifdef FT_MAKE_OPTION_SINGLE_OBJECT\n\n#define FT_LOCAL( x )      static  x\n#define FT_LOCAL_DEF( x )  static  x\n\n#else\n\n#ifdef __cplusplus\n#define FT_LOCAL( x )      extern \"C\"  x\n#define FT_LOCAL_DEF( x )  extern \"C\"  x\n#else\n#define FT_LOCAL( x )      extern  x\n#define FT_LOCAL_DEF( x )  x\n#endif\n\n#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */\n\n\n#ifndef FT_BASE\n\n#ifdef __cplusplus\n#define FT_BASE( x )  extern \"C\"  x\n#else\n#define FT_BASE( x )  extern  x\n#endif\n\n#endif /* !FT_BASE */\n\n\n#ifndef FT_BASE_DEF\n\n#ifdef __cplusplus\n#define FT_BASE_DEF( x )  x\n#else\n#define FT_BASE_DEF( x )  x\n#endif\n\n#endif /* !FT_BASE_DEF */\n\n\n#ifndef FT_EXPORT\n\n#ifdef __cplusplus\n#define FT_EXPORT( x )  extern \"C\"  x\n#else\n#define FT_EXPORT( x )  extern  x\n#endif\n\n#endif /* !FT_EXPORT */\n\n\n#ifndef FT_EXPORT_DEF\n\n#ifdef __cplusplus\n#define FT_EXPORT_DEF( x )  extern \"C\"  x\n#else\n#define FT_EXPORT_DEF( x )  extern  x\n#endif\n\n#endif /* !FT_EXPORT_DEF */\n\n\n#ifndef FT_EXPORT_VAR\n\n#ifdef __cplusplus\n#define FT_EXPORT_VAR( x )  extern \"C\"  x\n#else\n#define FT_EXPORT_VAR( x )  extern  x\n#endif\n\n#endif /* !FT_EXPORT_VAR */\n\n  /* The following macros are needed to compile the library with a   */\n  /* C++ compiler and with 16bit compilers.                          */\n  /*                                                                 */\n\n  /* This is special.  Within C++, you must specify `extern \"C\"' for */\n  /* functions which are used via function pointers, and you also    */\n  /* must do that for structures which contain function pointers to  */\n  /* assure C linkage -- it's not possible to have (local) anonymous */\n  /* functions which are accessed by (global) function pointers.     */\n  /*                                                                 */\n  /*                                                                 */\n  /* FT_CALLBACK_DEF is used to _define_ a callback function.        */\n  /*                                                                 */\n  /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */\n  /* contains pointers to callback functions.                        */\n  /*                                                                 */\n  /* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable   */\n  /* that contains pointers to callback functions.                   */\n  /*                                                                 */\n  /*                                                                 */\n  /* Some 16bit compilers have to redefine these macros to insert    */\n  /* the infamous `_cdecl' or `__fastcall' declarations.             */\n  /*                                                                 */\n#ifndef FT_CALLBACK_DEF\n#ifdef __cplusplus\n#define FT_CALLBACK_DEF( x )  extern \"C\"  x\n#else\n#define FT_CALLBACK_DEF( x )  static  x\n#endif\n#endif /* FT_CALLBACK_DEF */\n\n#ifndef FT_CALLBACK_TABLE\n#ifdef __cplusplus\n#define FT_CALLBACK_TABLE      extern \"C\"\n#define FT_CALLBACK_TABLE_DEF  extern \"C\"\n#else\n#define FT_CALLBACK_TABLE      extern\n#define FT_CALLBACK_TABLE_DEF  /* nothing */\n#endif\n#endif /* FT_CALLBACK_TABLE */\n\n\nFT_END_HEADER\n\n\n#endif /* __FTCONFIG_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/config/ftheader.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftheader.h                                                             */\n/*                                                                         */\n/*    Build macros of the FreeType 2 library.                              */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by       */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n#ifndef __FT_HEADER_H__\n#define __FT_HEADER_H__\n\n\n  /*@***********************************************************************/\n  /*                                                                       */\n  /* <Macro>                                                               */\n  /*    FT_BEGIN_HEADER                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This macro is used in association with @FT_END_HEADER in header    */\n  /*    files to ensure that the declarations within are properly          */\n  /*    encapsulated in an `extern \"C\" { .. }' block when included from a  */\n  /*    C++ compiler.                                                      */\n  /*                                                                       */\n#ifdef __cplusplus\n#define FT_BEGIN_HEADER  extern \"C\" {\n#else\n#define FT_BEGIN_HEADER  /* nothing */\n#endif\n\n\n  /*@***********************************************************************/\n  /*                                                                       */\n  /* <Macro>                                                               */\n  /*    FT_END_HEADER                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This macro is used in association with @FT_BEGIN_HEADER in header  */\n  /*    files to ensure that the declarations within are properly          */\n  /*    encapsulated in an `extern \"C\" { .. }' block when included from a  */\n  /*    C++ compiler.                                                      */\n  /*                                                                       */\n#ifdef __cplusplus\n#define FT_END_HEADER  }\n#else\n#define FT_END_HEADER  /* nothing */\n#endif\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Aliases for the FreeType 2 public and configuration files.            */\n  /*                                                                       */\n  /*************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    header_file_macros                                                 */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    Header File Macros                                                 */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    Macro definitions used to #include specific header files.          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The following macros are defined to the name of specific           */\n  /*    FreeType~2 header files.  They can be used directly in #include    */\n  /*    statements as in:                                                  */\n  /*                                                                       */\n  /*    {                                                                  */\n  /*      #include FT_FREETYPE_H                                           */\n  /*      #include FT_MULTIPLE_MASTERS_H                                   */\n  /*      #include FT_GLYPH_H                                              */\n  /*    }                                                                  */\n  /*                                                                       */\n  /*    There are several reasons why we are now using macros to name      */\n  /*    public header files.  The first one is that such macros are not    */\n  /*    limited to the infamous 8.3~naming rule required by DOS (and       */\n  /*    `FT_MULTIPLE_MASTERS_H' is a lot more meaningful than `ftmm.h').   */\n  /*                                                                       */\n  /*    The second reason is that it allows for more flexibility in the    */\n  /*    way FreeType~2 is installed on a given system.                     */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /* configuration files */\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_CONFIG_CONFIG_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing\n   *   FreeType~2 configuration data.\n   *\n   */\n#ifndef FT_CONFIG_CONFIG_H\n#define FT_CONFIG_CONFIG_H  <freetype/config/ftconfig.h>\n#endif\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_CONFIG_STANDARD_LIBRARY_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing\n   *   FreeType~2 interface to the standard C library functions.\n   *\n   */\n#ifndef FT_CONFIG_STANDARD_LIBRARY_H\n#define FT_CONFIG_STANDARD_LIBRARY_H  <freetype/config/ftstdlib.h>\n#endif\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_CONFIG_OPTIONS_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing\n   *   FreeType~2 project-specific configuration options.\n   *\n   */\n#ifndef FT_CONFIG_OPTIONS_H\n#define FT_CONFIG_OPTIONS_H  <freetype/config/ftoption.h>\n#endif\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_CONFIG_MODULES_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   list of FreeType~2 modules that are statically linked to new library\n   *   instances in @FT_Init_FreeType.\n   *\n   */\n#ifndef FT_CONFIG_MODULES_H\n#define FT_CONFIG_MODULES_H  <freetype/config/ftmodule.h>\n#endif\n\n  /* */\n\n  /* public headers */\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_FREETYPE_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   base FreeType~2 API.\n   *\n   */\n#define FT_FREETYPE_H  <freetype/freetype.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_ERRORS_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   list of FreeType~2 error codes (and messages).\n   *\n   *   It is included by @FT_FREETYPE_H.\n   *\n   */\n#define FT_ERRORS_H  <freetype/fterrors.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_MODULE_ERRORS_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   list of FreeType~2 module error offsets (and messages).\n   *\n   */\n#define FT_MODULE_ERRORS_H  <freetype/ftmoderr.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_SYSTEM_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   FreeType~2 interface to low-level operations (i.e., memory management\n   *   and stream i/o).\n   *\n   *   It is included by @FT_FREETYPE_H.\n   *\n   */\n#define FT_SYSTEM_H  <freetype/ftsystem.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_IMAGE_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing type\n   *   definitions related to glyph images (i.e., bitmaps, outlines,\n   *   scan-converter parameters).\n   *\n   *   It is included by @FT_FREETYPE_H.\n   *\n   */\n#define FT_IMAGE_H  <freetype/ftimage.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_TYPES_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   basic data types defined by FreeType~2.\n   *\n   *   It is included by @FT_FREETYPE_H.\n   *\n   */\n#define FT_TYPES_H  <freetype/fttypes.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_LIST_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   list management API of FreeType~2.\n   *\n   *   (Most applications will never need to include this file.)\n   *\n   */\n#define FT_LIST_H  <freetype/ftlist.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_OUTLINE_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   scalable outline management API of FreeType~2.\n   *\n   */\n#define FT_OUTLINE_H  <freetype/ftoutln.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_SIZES_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   API which manages multiple @FT_Size objects per face.\n   *\n   */\n#define FT_SIZES_H  <freetype/ftsizes.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_MODULE_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   module management API of FreeType~2.\n   *\n   */\n#define FT_MODULE_H  <freetype/ftmodapi.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_RENDER_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   renderer module management API of FreeType~2.\n   *\n   */\n#define FT_RENDER_H  <freetype/ftrender.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_TYPE1_TABLES_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   types and API specific to the Type~1 format.\n   *\n   */\n#define FT_TYPE1_TABLES_H  <freetype/t1tables.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_TRUETYPE_IDS_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   enumeration values which identify name strings, languages, encodings,\n   *   etc.  This file really contains a _large_ set of constant macro\n   *   definitions, taken from the TrueType and OpenType specifications.\n   *\n   */\n#define FT_TRUETYPE_IDS_H  <freetype/ttnameid.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_TRUETYPE_TABLES_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   types and API specific to the TrueType (as well as OpenType) format.\n   *\n   */\n#define FT_TRUETYPE_TABLES_H  <freetype/tttables.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_TRUETYPE_TAGS_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   definitions of TrueType four-byte `tags' which identify blocks in\n   *   SFNT-based font formats (i.e., TrueType and OpenType).\n   *\n   */\n#define FT_TRUETYPE_TAGS_H  <freetype/tttags.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_BDF_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   definitions of an API which accesses BDF-specific strings from a\n   *   face.\n   *\n   */\n#define FT_BDF_H  <freetype/ftbdf.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_CID_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   definitions of an API which access CID font information from a\n   *   face.\n   *\n   */\n#define FT_CID_H  <freetype/ftcid.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_GZIP_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   definitions of an API which supports gzip-compressed files.\n   *\n   */\n#define FT_GZIP_H  <freetype/ftgzip.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_LZW_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   definitions of an API which supports LZW-compressed files.\n   *\n   */\n#define FT_LZW_H  <freetype/ftlzw.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_WINFONTS_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   definitions of an API which supports Windows FNT files.\n   *\n   */\n#define FT_WINFONTS_H   <freetype/ftwinfnt.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_GLYPH_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   API of the optional glyph management component.\n   *\n   */\n#define FT_GLYPH_H  <freetype/ftglyph.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_BITMAP_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   API of the optional bitmap conversion component.\n   *\n   */\n#define FT_BITMAP_H  <freetype/ftbitmap.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_BBOX_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   API of the optional exact bounding box computation routines.\n   *\n   */\n#define FT_BBOX_H  <freetype/ftbbox.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_CACHE_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   API of the optional FreeType~2 cache sub-system.\n   *\n   */\n#define FT_CACHE_H  <freetype/ftcache.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_CACHE_IMAGE_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   `glyph image' API of the FreeType~2 cache sub-system.\n   *\n   *   It is used to define a cache for @FT_Glyph elements.  You can also\n   *   use the API defined in @FT_CACHE_SMALL_BITMAPS_H if you only need to\n   *   store small glyph bitmaps, as it will use less memory.\n   *\n   *   This macro is deprecated.  Simply include @FT_CACHE_H to have all\n   *   glyph image-related cache declarations.\n   *\n   */\n#define FT_CACHE_IMAGE_H  FT_CACHE_H\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_CACHE_SMALL_BITMAPS_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   `small bitmaps' API of the FreeType~2 cache sub-system.\n   *\n   *   It is used to define a cache for small glyph bitmaps in a relatively\n   *   memory-efficient way.  You can also use the API defined in\n   *   @FT_CACHE_IMAGE_H if you want to cache arbitrary glyph images,\n   *   including scalable outlines.\n   *\n   *   This macro is deprecated.  Simply include @FT_CACHE_H to have all\n   *   small bitmaps-related cache declarations.\n   *\n   */\n#define FT_CACHE_SMALL_BITMAPS_H  FT_CACHE_H\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_CACHE_CHARMAP_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   `charmap' API of the FreeType~2 cache sub-system.\n   *\n   *   This macro is deprecated.  Simply include @FT_CACHE_H to have all\n   *   charmap-based cache declarations.\n   *\n   */\n#define FT_CACHE_CHARMAP_H  FT_CACHE_H\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_MAC_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   Macintosh-specific FreeType~2 API.  The latter is used to access\n   *   fonts embedded in resource forks.\n   *\n   *   This header file must be explicitly included by client applications\n   *   compiled on the Mac (note that the base API still works though).\n   *\n   */\n#define FT_MAC_H  <freetype/ftmac.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_MULTIPLE_MASTERS_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   optional multiple-masters management API of FreeType~2.\n   *\n   */\n#define FT_MULTIPLE_MASTERS_H  <freetype/ftmm.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_SFNT_NAMES_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   optional FreeType~2 API which accesses embedded `name' strings in\n   *   SFNT-based font formats (i.e., TrueType and OpenType).\n   *\n   */\n#define FT_SFNT_NAMES_H  <freetype/ftsnames.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_OPENTYPE_VALIDATE_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   optional FreeType~2 API which validates OpenType tables (BASE, GDEF,\n   *   GPOS, GSUB, JSTF).\n   *\n   */\n#define FT_OPENTYPE_VALIDATE_H  <freetype/ftotval.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_GX_VALIDATE_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   optional FreeType~2 API which validates TrueTypeGX/AAT tables (feat,\n   *   mort, morx, bsln, just, kern, opbd, trak, prop).\n   *\n   */\n#define FT_GX_VALIDATE_H  <freetype/ftgxval.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_PFR_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   FreeType~2 API which accesses PFR-specific data.\n   *\n   */\n#define FT_PFR_H  <freetype/ftpfr.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_STROKER_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   FreeType~2 API which provides functions to stroke outline paths.\n   */\n#define FT_STROKER_H  <freetype/ftstroke.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_SYNTHESIS_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   FreeType~2 API which performs artificial obliquing and emboldening.\n   */\n#define FT_SYNTHESIS_H  <freetype/ftsynth.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_XFREE86_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   FreeType~2 API which provides functions specific to the XFree86 and\n   *   X.Org X11 servers.\n   */\n#define FT_XFREE86_H  <freetype/ftxf86.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_TRIGONOMETRY_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   FreeType~2 API which performs trigonometric computations (e.g.,\n   *   cosines and arc tangents).\n   */\n#define FT_TRIGONOMETRY_H  <freetype/fttrigon.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_LCD_FILTER_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   FreeType~2 API which performs color filtering for subpixel rendering.\n   */\n#define FT_LCD_FILTER_H  <freetype/ftlcdfil.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_UNPATENTED_HINTING_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   FreeType~2 API which performs color filtering for subpixel rendering.\n   */\n#define FT_UNPATENTED_HINTING_H  <freetype/ttunpat.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_INCREMENTAL_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   FreeType~2 API which performs color filtering for subpixel rendering.\n   */\n#define FT_INCREMENTAL_H  <freetype/ftincrem.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_GASP_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   FreeType~2 API which returns entries from the TrueType GASP table.\n   */\n#define FT_GASP_H  <freetype/ftgasp.h>\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_ADVANCES_H\n   *\n   * @description:\n   *   A macro used in #include statements to name the file containing the\n   *   FreeType~2 API which returns individual and ranged glyph advances.\n   */\n#define FT_ADVANCES_H  <freetype/ftadvanc.h>\n\n\n  /* */\n\n#define FT_ERROR_DEFINITIONS_H  <freetype/fterrdef.h>\n\n\n  /* The internals of the cache sub-system are no longer exposed.  We */\n  /* default to FT_CACHE_H at the moment just in case, but we know of */\n  /* no rogue client that uses them.                                  */\n  /*                                                                  */\n#define FT_CACHE_MANAGER_H           <freetype/ftcache.h>\n#define FT_CACHE_INTERNAL_MRU_H      <freetype/ftcache.h>\n#define FT_CACHE_INTERNAL_MANAGER_H  <freetype/ftcache.h>\n#define FT_CACHE_INTERNAL_CACHE_H    <freetype/ftcache.h>\n#define FT_CACHE_INTERNAL_GLYPH_H    <freetype/ftcache.h>\n#define FT_CACHE_INTERNAL_IMAGE_H    <freetype/ftcache.h>\n#define FT_CACHE_INTERNAL_SBITS_H    <freetype/ftcache.h>\n\n\n#define FT_INCREMENTAL_H          <freetype/ftincrem.h>\n\n#define FT_TRUETYPE_UNPATENTED_H  <freetype/ttunpat.h>\n\n\n  /*\n   * Include internal headers definitions from <freetype/internal/...>\n   * only when building the library.\n   */\n#ifdef FT2_BUILD_LIBRARY\n#define  FT_INTERNAL_INTERNAL_H  <freetype/internal/internal.h>\n#include FT_INTERNAL_INTERNAL_H\n#endif /* FT2_BUILD_LIBRARY */\n\n\n#endif /* __FT2_BUILD_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/config/ftmodule.h",
    "content": "/* This is a generated file. */\nFT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class )\nFT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class )\nFT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class )\nFT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class )\nFT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class )\nFT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class )\nFT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class )\nFT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class )\nFT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class )\nFT_USE_MODULE( FT_Module_Class, sfnt_module_class )\nFT_USE_MODULE( FT_Module_Class, autofit_module_class )\nFT_USE_MODULE( FT_Module_Class, pshinter_module_class )\nFT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class )\nFT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class )\nFT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class )\nFT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class )\nFT_USE_MODULE( FT_Module_Class, otv_module_class )\nFT_USE_MODULE( FT_Module_Class, psaux_module_class )\nFT_USE_MODULE( FT_Module_Class, psnames_module_class )\n/* EOF */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/config/ftoption.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftoption.h                                                             */\n/*                                                                         */\n/*    User-selectable configuration macros (specification only).           */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTOPTION_H__\n#define __FTOPTION_H__\n\n\n#include <ft2build.h>\n\n\nFT_BEGIN_HEADER\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*                 USER-SELECTABLE CONFIGURATION MACROS                  */\n  /*                                                                       */\n  /* This file contains the default configuration macro definitions for    */\n  /* a standard build of the FreeType library.  There are three ways to    */\n  /* use this file to build project-specific versions of the library:      */\n  /*                                                                       */\n  /*  - You can modify this file by hand, but this is not recommended in   */\n  /*    cases where you would like to build several versions of the        */\n  /*    library from a single source directory.                            */\n  /*                                                                       */\n  /*  - You can put a copy of this file in your build directory, more      */\n  /*    precisely in `$BUILD/freetype/config/ftoption.h', where `$BUILD'   */\n  /*    is the name of a directory that is included _before_ the FreeType  */\n  /*    include path during compilation.                                   */\n  /*                                                                       */\n  /*    The default FreeType Makefiles and Jamfiles use the build          */\n  /*    directory `builds/<system>' by default, but you can easily change  */\n  /*    that for your own projects.                                        */\n  /*                                                                       */\n  /*  - Copy the file <ft2build.h> to `$BUILD/ft2build.h' and modify it    */\n  /*    slightly to pre-define the macro FT_CONFIG_OPTIONS_H used to       */\n  /*    locate this file during the build.  For example,                   */\n  /*                                                                       */\n  /*      #define FT_CONFIG_OPTIONS_H  <myftoptions.h>                     */\n  /*      #include <freetype/config/ftheader.h>                            */\n  /*                                                                       */\n  /*    will use `$BUILD/myftoptions.h' instead of this file for macro     */\n  /*    definitions.                                                       */\n  /*                                                                       */\n  /*    Note also that you can similarly pre-define the macro              */\n  /*    FT_CONFIG_MODULES_H used to locate the file listing of the modules */\n  /*    that are statically linked to the library at compile time.  By     */\n  /*    default, this file is <freetype/config/ftmodule.h>.                */\n  /*                                                                       */\n  /*  We highly recommend using the third method whenever possible.        */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /**** G E N E R A L   F R E E T Y P E   2   C O N F I G U R A T I O N ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Uncomment the line below if you want to activate sub-pixel rendering  */\n  /* (a.k.a. LCD rendering, or ClearType) in this build of the library.    */\n  /*                                                                       */\n  /* Note that this feature is covered by several Microsoft patents        */\n  /* and should not be activated in any default build of the library.      */\n  /*                                                                       */\n  /* This macro has no impact on the FreeType API, only on its             */\n  /* _implementation_.  For example, using FT_RENDER_MODE_LCD when calling */\n  /* FT_Render_Glyph still generates a bitmap that is 3 times larger than  */\n  /* the original size; the difference will be that each triplet of        */\n  /* subpixels has R=G=B.                                                  */\n  /*                                                                       */\n  /* This is done to allow FreeType clients to run unmodified, forcing     */\n  /* them to display normal gray-level anti-aliased glyphs.                */\n  /*                                                                       */\n/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Many compilers provide a non-ANSI 64-bit data type that can be used   */\n  /* by FreeType to speed up some computations.  However, this will create */\n  /* some problems when compiling the library in strict ANSI mode.         */\n  /*                                                                       */\n  /* For this reason, the use of 64-bit integers is normally disabled when */\n  /* the __STDC__ macro is defined.  You can however disable this by       */\n  /* defining the macro FT_CONFIG_OPTION_FORCE_INT64 here.                 */\n  /*                                                                       */\n  /* For most compilers, this will only create compilation warnings when   */\n  /* building the library.                                                 */\n  /*                                                                       */\n  /* ObNote: The compiler-specific 64-bit integers are detected in the     */\n  /*         file `ftconfig.h' either statically or through the            */\n  /*         `configure' script on supported platforms.                    */\n  /*                                                                       */\n#undef FT_CONFIG_OPTION_FORCE_INT64\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* If this macro is defined, do not try to use an assembler version of   */\n  /* performance-critical functions (e.g. FT_MulFix).  You should only do  */\n  /* that to verify that the assembler function works properly, or to      */\n  /* execute benchmark tests of the various implementations.               */\n/* #define FT_CONFIG_OPTION_NO_ASSEMBLER */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* If this macro is defined, try to use an inlined assembler version of  */\n  /* the `FT_MulFix' function, which is a `hotspot' when loading and       */\n  /* hinting glyphs, and which should be executed as fast as possible.     */\n  /*                                                                       */\n  /* Note that if your compiler or CPU is not supported, this will default */\n  /* to the standard and portable implementation found in `ftcalc.c'.      */\n  /*                                                                       */\n#define FT_CONFIG_OPTION_INLINE_MULFIX\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* LZW-compressed file support.                                          */\n  /*                                                                       */\n  /*   FreeType now handles font files that have been compressed with the  */\n  /*   `compress' program.  This is mostly used to parse many of the PCF   */\n  /*   files that come with various X11 distributions.  The implementation */\n  /*   uses NetBSD's `zopen' to partially uncompress the file on the fly   */\n  /*   (see src/lzw/ftgzip.c).                                             */\n  /*                                                                       */\n  /*   Define this macro if you want to enable this `feature'.             */\n  /*                                                                       */\n#define FT_CONFIG_OPTION_USE_LZW\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Gzip-compressed file support.                                         */\n  /*                                                                       */\n  /*   FreeType now handles font files that have been compressed with the  */\n  /*   `gzip' program.  This is mostly used to parse many of the PCF files */\n  /*   that come with XFree86.  The implementation uses `zlib' to          */\n  /*   partially uncompress the file on the fly (see src/gzip/ftgzip.c).   */\n  /*                                                                       */\n  /*   Define this macro if you want to enable this `feature'.  See also   */\n  /*   the macro FT_CONFIG_OPTION_SYSTEM_ZLIB below.                       */\n  /*                                                                       */\n#define FT_CONFIG_OPTION_USE_ZLIB\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* ZLib library selection                                                */\n  /*                                                                       */\n  /*   This macro is only used when FT_CONFIG_OPTION_USE_ZLIB is defined.  */\n  /*   It allows FreeType's `ftgzip' component to link to the system's     */\n  /*   installation of the ZLib library.  This is useful on systems like   */\n  /*   Unix or VMS where it generally is already available.                */\n  /*                                                                       */\n  /*   If you let it undefined, the component will use its own copy        */\n  /*   of the zlib sources instead.  These have been modified to be        */\n  /*   included directly within the component and *not* export external    */\n  /*   function names.  This allows you to link any program with FreeType  */\n  /*   _and_ ZLib without linking conflicts.                               */\n  /*                                                                       */\n  /*   Do not #undef this macro here since the build system might define   */\n  /*   it for certain configurations only.                                 */\n  /*                                                                       */\n/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* DLL export compilation                                                */\n  /*                                                                       */\n  /*   When compiling FreeType as a DLL, some systems/compilers need a     */\n  /*   special keyword in front OR after the return type of function       */\n  /*   declarations.                                                       */\n  /*                                                                       */\n  /*   Two macros are used within the FreeType source code to define       */\n  /*   exported library functions: FT_EXPORT and FT_EXPORT_DEF.            */\n  /*                                                                       */\n  /*     FT_EXPORT( return_type )                                          */\n  /*                                                                       */\n  /*       is used in a function declaration, as in                        */\n  /*                                                                       */\n  /*         FT_EXPORT( FT_Error )                                         */\n  /*         FT_Init_FreeType( FT_Library*  alibrary );                    */\n  /*                                                                       */\n  /*                                                                       */\n  /*     FT_EXPORT_DEF( return_type )                                      */\n  /*                                                                       */\n  /*       is used in a function definition, as in                         */\n  /*                                                                       */\n  /*         FT_EXPORT_DEF( FT_Error )                                     */\n  /*         FT_Init_FreeType( FT_Library*  alibrary )                     */\n  /*         {                                                             */\n  /*           ... some code ...                                           */\n  /*           return FT_Err_Ok;                                           */\n  /*         }                                                             */\n  /*                                                                       */\n  /*   You can provide your own implementation of FT_EXPORT and            */\n  /*   FT_EXPORT_DEF here if you want.  If you leave them undefined, they  */\n  /*   will be later automatically defined as `extern return_type' to      */\n  /*   allow normal compilation.                                           */\n  /*                                                                       */\n  /*   Do not #undef these macros here since the build system might define */\n  /*   them for certain configurations only.                               */\n  /*                                                                       */\n/* #define FT_EXPORT(x)      extern x */\n/* #define FT_EXPORT_DEF(x)  x */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Glyph Postscript Names handling                                       */\n  /*                                                                       */\n  /*   By default, FreeType 2 is compiled with the `psnames' module.  This */\n  /*   module is in charge of converting a glyph name string into a        */\n  /*   Unicode value, or return a Macintosh standard glyph name for the    */\n  /*   use with the TrueType `post' table.                                 */\n  /*                                                                       */\n  /*   Undefine this macro if you do not want `psnames' compiled in your   */\n  /*   build of FreeType.  This has the following effects:                 */\n  /*                                                                       */\n  /*   - The TrueType driver will provide its own set of glyph names,      */\n  /*     if you build it to support postscript names in the TrueType       */\n  /*     `post' table.                                                     */\n  /*                                                                       */\n  /*   - The Type 1 driver will not be able to synthesize a Unicode        */\n  /*     charmap out of the glyphs found in the fonts.                     */\n  /*                                                                       */\n  /*   You would normally undefine this configuration macro when building  */\n  /*   a version of FreeType that doesn't contain a Type 1 or CFF driver.  */\n  /*                                                                       */\n#define FT_CONFIG_OPTION_POSTSCRIPT_NAMES\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Postscript Names to Unicode Values support                            */\n  /*                                                                       */\n  /*   By default, FreeType 2 is built with the `PSNames' module compiled  */\n  /*   in.  Among other things, the module is used to convert a glyph name */\n  /*   into a Unicode value.  This is especially useful in order to        */\n  /*   synthesize on the fly a Unicode charmap from the CFF/Type 1 driver  */\n  /*   through a big table named the `Adobe Glyph List' (AGL).             */\n  /*                                                                       */\n  /*   Undefine this macro if you do not want the Adobe Glyph List         */\n  /*   compiled in your `PSNames' module.  The Type 1 driver will not be   */\n  /*   able to synthesize a Unicode charmap out of the glyphs found in the */\n  /*   fonts.                                                              */\n  /*                                                                       */\n#define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Support for Mac fonts                                                 */\n  /*                                                                       */\n  /*   Define this macro if you want support for outline fonts in Mac      */\n  /*   format (mac dfont, mac resource, macbinary containing a mac         */\n  /*   resource) on non-Mac platforms.                                     */\n  /*                                                                       */\n  /*   Note that the `FOND' resource isn't checked.                        */\n  /*                                                                       */\n#define FT_CONFIG_OPTION_MAC_FONTS\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Guessing methods to access embedded resource forks                    */\n  /*                                                                       */\n  /*   Enable extra Mac fonts support on non-Mac platforms (e.g.           */\n  /*   GNU/Linux).                                                         */\n  /*                                                                       */\n  /*   Resource forks which include fonts data are stored sometimes in     */\n  /*   locations which users or developers don't expected.  In some cases, */\n  /*   resource forks start with some offset from the head of a file.  In  */\n  /*   other cases, the actual resource fork is stored in file different   */\n  /*   from what the user specifies.  If this option is activated,         */\n  /*   FreeType tries to guess whether such offsets or different file      */\n  /*   names must be used.                                                 */\n  /*                                                                       */\n  /*   Note that normal, direct access of resource forks is controlled via */\n  /*   the FT_CONFIG_OPTION_MAC_FONTS option.                              */\n  /*                                                                       */\n#ifdef FT_CONFIG_OPTION_MAC_FONTS\n#define FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK\n#endif\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Allow the use of FT_Incremental_Interface to load typefaces that      */\n  /* contain no glyph data, but supply it via a callback function.         */\n  /* This allows FreeType to be used with the PostScript language, using   */\n  /* the GhostScript interpreter.                                          */\n  /*                                                                       */\n/* #define FT_CONFIG_OPTION_INCREMENTAL */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* The size in bytes of the render pool used by the scan-line converter  */\n  /* to do all of its work.                                                */\n  /*                                                                       */\n  /* This must be greater than 4KByte if you use FreeType to rasterize     */\n  /* glyphs; otherwise, you may set it to zero to avoid unnecessary        */\n  /* allocation of the render pool.                                        */\n  /*                                                                       */\n#define FT_RENDER_POOL_SIZE  16384L\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* FT_MAX_MODULES                                                        */\n  /*                                                                       */\n  /*   The maximum number of modules that can be registered in a single    */\n  /*   FreeType library object.  32 is the default.                        */\n  /*                                                                       */\n#define FT_MAX_MODULES  32\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Debug level                                                           */\n  /*                                                                       */\n  /*   FreeType can be compiled in debug or trace mode.  In debug mode,    */\n  /*   errors are reported through the `ftdebug' component.  In trace      */\n  /*   mode, additional messages are sent to the standard output during    */\n  /*   execution.                                                          */\n  /*                                                                       */\n  /*   Define FT_DEBUG_LEVEL_ERROR to build the library in debug mode.     */\n  /*   Define FT_DEBUG_LEVEL_TRACE to build it in trace mode.              */\n  /*                                                                       */\n  /*   Don't define any of these macros to compile in `release' mode!      */\n  /*                                                                       */\n  /*   Do not #undef these macros here since the build system might define */\n  /*   them for certain configurations only.                               */\n  /*                                                                       */\n/* #define FT_DEBUG_LEVEL_ERROR */\n/* #define FT_DEBUG_LEVEL_TRACE */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Memory Debugging                                                      */\n  /*                                                                       */\n  /*   FreeType now comes with an integrated memory debugger that is       */\n  /*   capable of detecting simple errors like memory leaks or double      */\n  /*   deletes.  To compile it within your build of the library, you       */\n  /*   should define FT_DEBUG_MEMORY here.                                 */\n  /*                                                                       */\n  /*   Note that the memory debugger is only activated at runtime when     */\n  /*   when the _environment_ variable `FT2_DEBUG_MEMORY' is defined also! */\n  /*                                                                       */\n  /*   Do not #undef this macro here since the build system might define   */\n  /*   it for certain configurations only.                                 */\n  /*                                                                       */\n/* #define FT_DEBUG_MEMORY */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Module errors                                                         */\n  /*                                                                       */\n  /*   If this macro is set (which is _not_ the default), the higher byte  */\n  /*   of an error code gives the module in which the error has occurred,  */\n  /*   while the lower byte is the real error code.                        */\n  /*                                                                       */\n  /*   Setting this macro makes sense for debugging purposes only, since   */\n  /*   it would break source compatibility of certain programs that use    */\n  /*   FreeType 2.                                                         */\n  /*                                                                       */\n  /*   More details can be found in the files ftmoderr.h and fterrors.h.   */\n  /*                                                                       */\n#undef FT_CONFIG_OPTION_USE_MODULE_ERRORS\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Position Independent Code                                             */\n  /*                                                                       */\n  /*   If this macro is set (which is _not_ the default), FreeType2 will   */\n  /*   avoid creating constants that require address fixups. Instead the   */\n  /*   constants will be moved into a struct and additional intialization  */\n  /*   code will be used.                                                  */\n  /*                                                                       */\n  /*   Setting this macro is needed for systems that prohibit address      */\n  /*   fixups, such as BREW.                                               */\n  /*                                                                       */\n/* #define FT_CONFIG_OPTION_PIC */\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****        S F N T   D R I V E R    C O N F I G U R A T I O N       ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define TT_CONFIG_OPTION_EMBEDDED_BITMAPS if you want to support       */\n  /* embedded bitmaps in all formats using the SFNT module (namely         */\n  /* TrueType & OpenType).                                                 */\n  /*                                                                       */\n#define TT_CONFIG_OPTION_EMBEDDED_BITMAPS\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define TT_CONFIG_OPTION_POSTSCRIPT_NAMES if you want to be able to    */\n  /* load and enumerate the glyph Postscript names in a TrueType or        */\n  /* OpenType file.                                                        */\n  /*                                                                       */\n  /* Note that when you do not compile the `PSNames' module by undefining  */\n  /* the above FT_CONFIG_OPTION_POSTSCRIPT_NAMES, the `sfnt' module will   */\n  /* contain additional code used to read the PS Names table from a font.  */\n  /*                                                                       */\n  /* (By default, the module uses `PSNames' to extract glyph names.)       */\n  /*                                                                       */\n#define TT_CONFIG_OPTION_POSTSCRIPT_NAMES\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define TT_CONFIG_OPTION_SFNT_NAMES if your applications need to       */\n  /* access the internal name table in a SFNT-based format like TrueType   */\n  /* or OpenType.  The name table contains various strings used to         */\n  /* describe the font, like family name, copyright, version, etc.  It     */\n  /* does not contain any glyph name though.                               */\n  /*                                                                       */\n  /* Accessing SFNT names is done through the functions declared in        */\n  /* `freetype/ftsnames.h'.                                                */\n  /*                                                                       */\n#define TT_CONFIG_OPTION_SFNT_NAMES\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* TrueType CMap support                                                 */\n  /*                                                                       */\n  /*   Here you can fine-tune which TrueType CMap table format shall be    */\n  /*   supported.                                                          */\n#define TT_CONFIG_CMAP_FORMAT_0\n#define TT_CONFIG_CMAP_FORMAT_2\n#define TT_CONFIG_CMAP_FORMAT_4\n#define TT_CONFIG_CMAP_FORMAT_6\n#define TT_CONFIG_CMAP_FORMAT_8\n#define TT_CONFIG_CMAP_FORMAT_10\n#define TT_CONFIG_CMAP_FORMAT_12\n#define TT_CONFIG_CMAP_FORMAT_13\n#define TT_CONFIG_CMAP_FORMAT_14\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****    T R U E T Y P E   D R I V E R    C O N F I G U R A T I O N   ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile   */\n  /* a bytecode interpreter in the TrueType driver.  Note that there are   */\n  /* important patent issues related to the use of the interpreter.        */\n  /*                                                                       */\n  /* By undefining this, you will only compile the code necessary to load  */\n  /* TrueType glyphs without hinting.                                      */\n  /*                                                                       */\n  /*   Do not #undef this macro here, since the build system might         */\n  /*   define it for certain configurations only.                          */\n  /*                                                                       */\n/* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version  */\n  /* of the TrueType bytecode interpreter is used that doesn't implement   */\n  /* any of the patented opcodes and algorithms.  Note that the            */\n  /* TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* if you define  */\n  /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, either define  */\n  /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER or                              */\n  /* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time.    */\n  /*                                                                       */\n  /* This macro is only useful for a small number of font files (mostly    */\n  /* for Asian scripts) that require bytecode interpretation to properly   */\n  /* load glyphs.  For all other fonts, this produces unpleasant results,  */\n  /* thus the unpatented interpreter is never used to load glyphs from     */\n  /* TrueType fonts unless one of the following two options is used.       */\n  /*                                                                       */\n  /*   - The unpatented interpreter is explicitly activated by the user    */\n  /*     through the FT_PARAM_TAG_UNPATENTED_HINTING parameter tag         */\n  /*     when opening the FT_Face.                                         */\n  /*                                                                       */\n  /*   - FreeType detects that the FT_Face corresponds to one of the       */\n  /*     `trick' fonts (e.g., `Mingliu') it knows about.  The font engine  */\n  /*     contains a hard-coded list of font names and other matching       */\n  /*     parameters (see function `tt_face_init' in file                   */\n  /*     `src/truetype/ttobjs.c').                                         */\n  /*                                                                       */\n  /* Here a sample code snippet for using FT_PARAM_TAG_UNPATENTED_HINTING. */\n  /*                                                                       */\n  /*   {                                                                   */\n  /*     FT_Parameter  parameter;                                          */\n  /*     FT_Open_Args  open_args;                                          */\n  /*                                                                       */\n  /*                                                                       */\n  /*     parameter.tag = FT_PARAM_TAG_UNPATENTED_HINTING;                  */\n  /*                                                                       */\n  /*     open_args.flags      = FT_OPEN_PATHNAME | FT_OPEN_PARAMS;         */\n  /*     open_args.pathname   = my_font_pathname;                          */\n  /*     open_args.num_params = 1;                                         */\n  /*     open_args.params     = &parameter;                                */\n  /*                                                                       */\n  /*     error = FT_Open_Face( library, &open_args, index, &face );        */\n  /*     ...                                                               */\n  /*   }                                                                   */\n  /*                                                                       */\n#define TT_CONFIG_OPTION_UNPATENTED_HINTING\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define TT_CONFIG_OPTION_INTERPRETER_SWITCH to compile the TrueType    */\n  /* bytecode interpreter with a huge switch statement, rather than a call */\n  /* table.  This results in smaller and faster code for a number of       */\n  /* architectures.                                                        */\n  /*                                                                       */\n  /* Note however that on some compiler/processor combinations, undefining */\n  /* this macro will generate faster, though larger, code.                 */\n  /*                                                                       */\n#define TT_CONFIG_OPTION_INTERPRETER_SWITCH\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the        */\n  /* TrueType glyph loader to use Apple's definition of how to handle      */\n  /* component offsets in composite glyphs.                                */\n  /*                                                                       */\n  /* Apple and MS disagree on the default behavior of component offsets    */\n  /* in composites.  Apple says that they should be scaled by the scaling  */\n  /* factors in the transformation matrix (roughly, it's more complex)     */\n  /* while MS says they should not.  OpenType defines two bits in the      */\n  /* composite flags array which can be used to disambiguate, but old      */\n  /* fonts will not have them.                                             */\n  /*                                                                       */\n  /*   http://partners.adobe.com/asn/developer/opentype/glyf.html          */\n  /*   http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html                 */\n  /*                                                                       */\n#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define TT_CONFIG_OPTION_GX_VAR_SUPPORT if you want to include         */\n  /* support for Apple's distortable font technology (fvar, gvar, cvar,    */\n  /* and avar tables).  This has many similarities to Type 1 Multiple      */\n  /* Masters support.                                                      */\n  /*                                                                       */\n#define TT_CONFIG_OPTION_GX_VAR_SUPPORT\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define TT_CONFIG_OPTION_BDF if you want to include support for        */\n  /* an embedded `BDF ' table within SFNT-based bitmap formats.            */\n  /*                                                                       */\n#define TT_CONFIG_OPTION_BDF\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****      T Y P E 1   D R I V E R    C O N F I G U R A T I O N       ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* T1_MAX_DICT_DEPTH is the maximal depth of nest dictionaries and       */\n  /* arrays in the Type 1 stream (see t1load.c).  A minimum of 4 is        */\n  /* required.                                                             */\n  /*                                                                       */\n#define T1_MAX_DICT_DEPTH  5\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine   */\n  /* calls during glyph loading.                                           */\n  /*                                                                       */\n#define T1_MAX_SUBRS_CALLS  16\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity.  A     */\n  /* minimum of 16 is required.                                            */\n  /*                                                                       */\n  /* The Chinese font MingTiEG-Medium (CNS 11643 character set) needs 256. */\n  /*                                                                       */\n#define T1_MAX_CHARSTRINGS_OPERANDS  256\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define this configuration macro if you want to prevent the            */\n  /* compilation of `t1afm', which is in charge of reading Type 1 AFM      */\n  /* files into an existing face.  Note that if set, the T1 driver will be */\n  /* unable to produce kerning distances.                                  */\n  /*                                                                       */\n#undef T1_CONFIG_OPTION_NO_AFM\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Define this configuration macro if you want to prevent the            */\n  /* compilation of the Multiple Masters font support in the Type 1        */\n  /* driver.                                                               */\n  /*                                                                       */\n#undef T1_CONFIG_OPTION_NO_MM_SUPPORT\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /****                                                                 ****/\n  /****    A U T O F I T   M O D U L E    C O N F I G U R A T I O N     ****/\n  /****                                                                 ****/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Compile autofit module with CJK (Chinese, Japanese, Korean) script    */\n  /* support.                                                              */\n  /*                                                                       */\n#define AF_CONFIG_OPTION_CJK\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Compile autofit module with Indic script support.                     */\n  /*                                                                       */\n#define AF_CONFIG_OPTION_INDIC\n\n  /* */\n\n\n  /*\n   * Define this variable if you want to keep the layout of internal\n   * structures that was used prior to FreeType 2.2.  This also compiles in\n   * a few obsolete functions to avoid linking problems on typical Unix\n   * distributions.\n   *\n   * For embedded systems or building a new distribution from scratch, it\n   * is recommended to disable the macro since it reduces the library's code\n   * size and activates a few memory-saving optimizations as well.\n   */\n#define FT_CONFIG_OPTION_OLD_INTERNALS\n\n\n  /*\n   * This macro is defined if either unpatented or native TrueType\n   * hinting is requested by the definitions above.\n   */\n#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER\n#define  TT_USE_BYTECODE_INTERPRETER\n#undef   TT_CONFIG_OPTION_UNPATENTED_HINTING\n#elif defined TT_CONFIG_OPTION_UNPATENTED_HINTING\n#define  TT_USE_BYTECODE_INTERPRETER\n#endif\n\nFT_END_HEADER\n\n\n#endif /* __FTOPTION_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/config/ftstdlib.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftstdlib.h                                                             */\n/*                                                                         */\n/*    ANSI-specific library and header configuration file (specification   */\n/*    only).                                                               */\n/*                                                                         */\n/*  Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2009 by                  */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This file is used to group all #includes to the ANSI C library that   */\n  /* FreeType normally requires.  It also defines macros to rename the     */\n  /* standard functions within the FreeType source code.                   */\n  /*                                                                       */\n  /* Load a file which defines __FTSTDLIB_H__ before this one to override  */\n  /* it.                                                                   */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#ifndef __FTSTDLIB_H__\n#define __FTSTDLIB_H__\n\n\n#include <stddef.h>\n\n#define ft_ptrdiff_t  ptrdiff_t\n\n\n  /**********************************************************************/\n  /*                                                                    */\n  /*                           integer limits                           */\n  /*                                                                    */\n  /* UINT_MAX and ULONG_MAX are used to automatically compute the size  */\n  /* of `int' and `long' in bytes at compile-time.  So far, this works  */\n  /* for all platforms the library has been tested on.                  */\n  /*                                                                    */\n  /* Note that on the extremely rare platforms that do not provide      */\n  /* integer types that are _exactly_ 16 and 32 bits wide (e.g. some    */\n  /* old Crays where `int' is 36 bits), we do not make any guarantee    */\n  /* about the correct behaviour of FT2 with all fonts.                 */\n  /*                                                                    */\n  /* In these case, `ftconfig.h' will refuse to compile anyway with a   */\n  /* message like `couldn't find 32-bit type' or something similar.     */\n  /*                                                                    */\n  /**********************************************************************/\n\n\n#include <limits.h>\n\n#define FT_CHAR_BIT   CHAR_BIT\n#define FT_INT_MAX    INT_MAX\n#define FT_INT_MIN    INT_MIN\n#define FT_UINT_MAX   UINT_MAX\n#define FT_ULONG_MAX  ULONG_MAX\n\n\n  /**********************************************************************/\n  /*                                                                    */\n  /*                 character and string processing                    */\n  /*                                                                    */\n  /**********************************************************************/\n\n\n#include <string.h>\n\n#define ft_memchr   memchr\n#define ft_memcmp   memcmp\n#define ft_memcpy   memcpy\n#define ft_memmove  memmove\n#define ft_memset   memset\n#define ft_strcat   strcat\n#define ft_strcmp   strcmp\n#define ft_strcpy   strcpy\n#define ft_strlen   strlen\n#define ft_strncmp  strncmp\n#define ft_strncpy  strncpy\n#define ft_strrchr  strrchr\n#define ft_strstr   strstr\n\n\n  /**********************************************************************/\n  /*                                                                    */\n  /*                           file handling                            */\n  /*                                                                    */\n  /**********************************************************************/\n\n\n#include <stdio.h>\n\n#define FT_FILE     FILE\n#define ft_fclose   fclose\n#define ft_fopen    fopen\n#define ft_fread    fread\n#define ft_fseek    fseek\n#define ft_ftell    ftell\n#define ft_sprintf  sprintf\n\n\n  /**********************************************************************/\n  /*                                                                    */\n  /*                             sorting                                */\n  /*                                                                    */\n  /**********************************************************************/\n\n\n#include <stdlib.h>\n\n#define ft_qsort  qsort\n\n\n  /**********************************************************************/\n  /*                                                                    */\n  /*                        memory allocation                           */\n  /*                                                                    */\n  /**********************************************************************/\n\n\n#define ft_scalloc   calloc\n#define ft_sfree     free\n#define ft_smalloc   malloc\n#define ft_srealloc  realloc\n\n\n  /**********************************************************************/\n  /*                                                                    */\n  /*                          miscellaneous                             */\n  /*                                                                    */\n  /**********************************************************************/\n\n\n#define ft_atol   atol\n#define ft_labs   labs\n\n\n  /**********************************************************************/\n  /*                                                                    */\n  /*                         execution control                          */\n  /*                                                                    */\n  /**********************************************************************/\n\n\n#include <setjmp.h>\n\n#define ft_jmp_buf     jmp_buf  /* note: this cannot be a typedef since */\n                                /*       jmp_buf is defined as a macro  */\n                                /*       on certain platforms           */\n\n#define ft_longjmp     longjmp\n#define ft_setjmp( b ) setjmp( *(jmp_buf*) &(b) )    /* same thing here */\n\n\n  /* the following is only used for debugging purposes, i.e., if */\n  /* FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined    */\n\n#include <stdarg.h>\n\n\n#endif /* __FTSTDLIB_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/freetype.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  freetype.h                                                             */\n/*                                                                         */\n/*    FreeType high-level API and common types (specification only).       */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef FT_FREETYPE_H\n#error \"`ft2build.h' hasn't been included yet!\"\n#error \"Please always use macros to include FreeType header files.\"\n#error \"Example:\"\n#error \"  #include <ft2build.h>\"\n#error \"  #include FT_FREETYPE_H\"\n#endif\n\n\n#ifndef __FREETYPE_H__\n#define __FREETYPE_H__\n\n\n#include <ft2build.h>\n#include FT_CONFIG_CONFIG_H\n#include FT_ERRORS_H\n#include FT_TYPES_H\n\n\nFT_BEGIN_HEADER\n\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    user_allocation                                                    */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    User allocation                                                    */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    How client applications should allocate FreeType data structures.  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    FreeType assumes that structures allocated by the user and passed  */\n  /*    as arguments are zeroed out except for the actual data.  In other  */\n  /*    words, it is recommended to use `calloc' (or variants of it)       */\n  /*    instead of `malloc' for allocation.                                */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*                                                                       */\n  /*                        B A S I C   T Y P E S                          */\n  /*                                                                       */\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    base_interface                                                     */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    Base Interface                                                     */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    The FreeType~2 base font interface.                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section describes the public high-level API of FreeType~2.    */\n  /*                                                                       */\n  /* <Order>                                                               */\n  /*    FT_Library                                                         */\n  /*    FT_Face                                                            */\n  /*    FT_Size                                                            */\n  /*    FT_GlyphSlot                                                       */\n  /*    FT_CharMap                                                         */\n  /*    FT_Encoding                                                        */\n  /*                                                                       */\n  /*    FT_FaceRec                                                         */\n  /*                                                                       */\n  /*    FT_FACE_FLAG_SCALABLE                                              */\n  /*    FT_FACE_FLAG_FIXED_SIZES                                           */\n  /*    FT_FACE_FLAG_FIXED_WIDTH                                           */\n  /*    FT_FACE_FLAG_HORIZONTAL                                            */\n  /*    FT_FACE_FLAG_VERTICAL                                              */\n  /*    FT_FACE_FLAG_SFNT                                                  */\n  /*    FT_FACE_FLAG_KERNING                                               */\n  /*    FT_FACE_FLAG_MULTIPLE_MASTERS                                      */\n  /*    FT_FACE_FLAG_GLYPH_NAMES                                           */\n  /*    FT_FACE_FLAG_EXTERNAL_STREAM                                       */\n  /*    FT_FACE_FLAG_FAST_GLYPHS                                           */\n  /*    FT_FACE_FLAG_HINTER                                                */\n  /*                                                                       */\n  /*    FT_STYLE_FLAG_BOLD                                                 */\n  /*    FT_STYLE_FLAG_ITALIC                                               */\n  /*                                                                       */\n  /*    FT_SizeRec                                                         */\n  /*    FT_Size_Metrics                                                    */\n  /*                                                                       */\n  /*    FT_GlyphSlotRec                                                    */\n  /*    FT_Glyph_Metrics                                                   */\n  /*    FT_SubGlyph                                                        */\n  /*                                                                       */\n  /*    FT_Bitmap_Size                                                     */\n  /*                                                                       */\n  /*    FT_Init_FreeType                                                   */\n  /*    FT_Done_FreeType                                                   */\n  /*                                                                       */\n  /*    FT_New_Face                                                        */\n  /*    FT_Done_Face                                                       */\n  /*    FT_New_Memory_Face                                                 */\n  /*    FT_Open_Face                                                       */\n  /*    FT_Open_Args                                                       */\n  /*    FT_Parameter                                                       */\n  /*    FT_Attach_File                                                     */\n  /*    FT_Attach_Stream                                                   */\n  /*                                                                       */\n  /*    FT_Set_Char_Size                                                   */\n  /*    FT_Set_Pixel_Sizes                                                 */\n  /*    FT_Request_Size                                                    */\n  /*    FT_Select_Size                                                     */\n  /*    FT_Size_Request_Type                                               */\n  /*    FT_Size_Request                                                    */\n  /*    FT_Set_Transform                                                   */\n  /*    FT_Load_Glyph                                                      */\n  /*    FT_Get_Char_Index                                                  */\n  /*    FT_Get_Name_Index                                                  */\n  /*    FT_Load_Char                                                       */\n  /*                                                                       */\n  /*    FT_OPEN_MEMORY                                                     */\n  /*    FT_OPEN_STREAM                                                     */\n  /*    FT_OPEN_PATHNAME                                                   */\n  /*    FT_OPEN_DRIVER                                                     */\n  /*    FT_OPEN_PARAMS                                                     */\n  /*                                                                       */\n  /*    FT_LOAD_DEFAULT                                                    */\n  /*    FT_LOAD_RENDER                                                     */\n  /*    FT_LOAD_MONOCHROME                                                 */\n  /*    FT_LOAD_LINEAR_DESIGN                                              */\n  /*    FT_LOAD_NO_SCALE                                                   */\n  /*    FT_LOAD_NO_HINTING                                                 */\n  /*    FT_LOAD_NO_BITMAP                                                  */\n  /*    FT_LOAD_CROP_BITMAP                                                */\n  /*                                                                       */\n  /*    FT_LOAD_VERTICAL_LAYOUT                                            */\n  /*    FT_LOAD_IGNORE_TRANSFORM                                           */\n  /*    FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH                                */\n  /*    FT_LOAD_FORCE_AUTOHINT                                             */\n  /*    FT_LOAD_NO_RECURSE                                                 */\n  /*    FT_LOAD_PEDANTIC                                                   */\n  /*                                                                       */\n  /*    FT_LOAD_TARGET_NORMAL                                              */\n  /*    FT_LOAD_TARGET_LIGHT                                               */\n  /*    FT_LOAD_TARGET_MONO                                                */\n  /*    FT_LOAD_TARGET_LCD                                                 */\n  /*    FT_LOAD_TARGET_LCD_V                                               */\n  /*                                                                       */\n  /*    FT_Render_Glyph                                                    */\n  /*    FT_Render_Mode                                                     */\n  /*    FT_Get_Kerning                                                     */\n  /*    FT_Kerning_Mode                                                    */\n  /*    FT_Get_Track_Kerning                                               */\n  /*    FT_Get_Glyph_Name                                                  */\n  /*    FT_Get_Postscript_Name                                             */\n  /*                                                                       */\n  /*    FT_CharMapRec                                                      */\n  /*    FT_Select_Charmap                                                  */\n  /*    FT_Set_Charmap                                                     */\n  /*    FT_Get_Charmap_Index                                               */\n  /*                                                                       */\n  /*    FT_FSTYPE_INSTALLABLE_EMBEDDING                                    */\n  /*    FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING                             */\n  /*    FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING                              */\n  /*    FT_FSTYPE_EDITABLE_EMBEDDING                                       */\n  /*    FT_FSTYPE_NO_SUBSETTING                                            */\n  /*    FT_FSTYPE_BITMAP_EMBEDDING_ONLY                                    */\n  /*                                                                       */\n  /*    FT_Get_FSType_Flags                                                */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Glyph_Metrics                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to model the metrics of a single glyph.  The      */\n  /*    values are expressed in 26.6 fractional pixel format; if the flag  */\n  /*    @FT_LOAD_NO_SCALE has been used while loading the glyph, values    */\n  /*    are expressed in font units instead.                               */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    width ::                                                           */\n  /*      The glyph's width.                                               */\n  /*                                                                       */\n  /*    height ::                                                          */\n  /*      The glyph's height.                                              */\n  /*                                                                       */\n  /*    horiBearingX ::                                                    */\n  /*      Left side bearing for horizontal layout.                         */\n  /*                                                                       */\n  /*    horiBearingY ::                                                    */\n  /*      Top side bearing for horizontal layout.                          */\n  /*                                                                       */\n  /*    horiAdvance ::                                                     */\n  /*      Advance width for horizontal layout.                             */\n  /*                                                                       */\n  /*    vertBearingX ::                                                    */\n  /*      Left side bearing for vertical layout.                           */\n  /*                                                                       */\n  /*    vertBearingY ::                                                    */\n  /*      Top side bearing for vertical layout.                            */\n  /*                                                                       */\n  /*    vertAdvance ::                                                     */\n  /*      Advance height for vertical layout.                              */\n  /*                                                                       */\n  typedef struct  FT_Glyph_Metrics_\n  {\n    FT_Pos  width;\n    FT_Pos  height;\n\n    FT_Pos  horiBearingX;\n    FT_Pos  horiBearingY;\n    FT_Pos  horiAdvance;\n\n    FT_Pos  vertBearingX;\n    FT_Pos  vertBearingY;\n    FT_Pos  vertAdvance;\n\n  } FT_Glyph_Metrics;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Bitmap_Size                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This structure models the metrics of a bitmap strike (i.e., a set  */\n  /*    of glyphs for a given point size and resolution) in a bitmap font. */\n  /*    It is used for the `available_sizes' field of @FT_Face.            */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    height :: The vertical distance, in pixels, between two            */\n  /*              consecutive baselines.  It is always positive.           */\n  /*                                                                       */\n  /*    width  :: The average width, in pixels, of all glyphs in the       */\n  /*              strike.                                                  */\n  /*                                                                       */\n  /*    size   :: The nominal size of the strike in 26.6 fractional        */\n  /*              points.  This field is not very useful.                  */\n  /*                                                                       */\n  /*    x_ppem :: The horizontal ppem (nominal width) in 26.6 fractional   */\n  /*              pixels.                                                  */\n  /*                                                                       */\n  /*    y_ppem :: The vertical ppem (nominal height) in 26.6 fractional    */\n  /*              pixels.                                                  */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Windows FNT:                                                       */\n  /*      The nominal size given in a FNT font is not reliable.  Thus when */\n  /*      the driver finds it incorrect, it sets `size' to some calculated */\n  /*      values and sets `x_ppem' and `y_ppem' to the pixel width and     */\n  /*      height given in the font, respectively.                          */\n  /*                                                                       */\n  /*    TrueType embedded bitmaps:                                         */\n  /*      `size', `width', and `height' values are not contained in the    */\n  /*      bitmap strike itself.  They are computed from the global font    */\n  /*      parameters.                                                      */\n  /*                                                                       */\n  typedef struct  FT_Bitmap_Size_\n  {\n    FT_Short  height;\n    FT_Short  width;\n\n    FT_Pos    size;\n\n    FT_Pos    x_ppem;\n    FT_Pos    y_ppem;\n\n  } FT_Bitmap_Size;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*                                                                       */\n  /*                     O B J E C T   C L A S S E S                       */\n  /*                                                                       */\n  /*************************************************************************/\n  /*************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Library                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a FreeType library instance.  Each `library' is        */\n  /*    completely independent from the others; it is the `root' of a set  */\n  /*    of objects like fonts, faces, sizes, etc.                          */\n  /*                                                                       */\n  /*    It also embeds a memory manager (see @FT_Memory), as well as a     */\n  /*    scan-line converter object (see @FT_Raster).                       */\n  /*                                                                       */\n  /*    For multi-threading applications each thread should have its own   */\n  /*    FT_Library object.                                                 */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Library objects are normally created by @FT_Init_FreeType, and     */\n  /*    destroyed with @FT_Done_FreeType.                                  */\n  /*                                                                       */\n  typedef struct FT_LibraryRec_  *FT_Library;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Module                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a given FreeType module object.  Each module can be a  */\n  /*    font driver, a renderer, or anything else that provides services   */\n  /*    to the formers.                                                    */\n  /*                                                                       */\n  typedef struct FT_ModuleRec_*  FT_Module;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Driver                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a given FreeType font driver object.  Each font driver */\n  /*    is a special module capable of creating faces from font files.     */\n  /*                                                                       */\n  typedef struct FT_DriverRec_*  FT_Driver;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Renderer                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a given FreeType renderer.  A renderer is a special    */\n  /*    module in charge of converting a glyph image to a bitmap, when     */\n  /*    necessary.  Each renderer supports a given glyph image format, and */\n  /*    one or more target surface depths.                                 */\n  /*                                                                       */\n  typedef struct FT_RendererRec_*  FT_Renderer;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Face                                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a given typographic face object.  A face object models */\n  /*    a given typeface, in a given style.                                */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Each face object also owns a single @FT_GlyphSlot object, as well  */\n  /*    as one or more @FT_Size objects.                                   */\n  /*                                                                       */\n  /*    Use @FT_New_Face or @FT_Open_Face to create a new face object from */\n  /*    a given filepathname or a custom input stream.                     */\n  /*                                                                       */\n  /*    Use @FT_Done_Face to destroy it (along with its slot and sizes).   */\n  /*                                                                       */\n  /* <Also>                                                                */\n  /*    See @FT_FaceRec for the publicly accessible fields of a given face */\n  /*    object.                                                            */\n  /*                                                                       */\n  typedef struct FT_FaceRec_*  FT_Face;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Size                                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to an object used to model a face scaled to a given       */\n  /*    character size.                                                    */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Each @FT_Face has an _active_ @FT_Size object that is used by      */\n  /*    functions like @FT_Load_Glyph to determine the scaling             */\n  /*    transformation which is used to load and hint glyphs and metrics.  */\n  /*                                                                       */\n  /*    You can use @FT_Set_Char_Size, @FT_Set_Pixel_Sizes,                */\n  /*    @FT_Request_Size or even @FT_Select_Size to change the content     */\n  /*    (i.e., the scaling values) of the active @FT_Size.                 */\n  /*                                                                       */\n  /*    You can use @FT_New_Size to create additional size objects for a   */\n  /*    given @FT_Face, but they won't be used by other functions until    */\n  /*    you activate it through @FT_Activate_Size.  Only one size can be   */\n  /*    activated at any given time per face.                              */\n  /*                                                                       */\n  /* <Also>                                                                */\n  /*    See @FT_SizeRec for the publicly accessible fields of a given size */\n  /*    object.                                                            */\n  /*                                                                       */\n  typedef struct FT_SizeRec_*  FT_Size;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_GlyphSlot                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a given `glyph slot'.  A slot is a container where it  */\n  /*    is possible to load any of the glyphs contained in its parent      */\n  /*    face.                                                              */\n  /*                                                                       */\n  /*    In other words, each time you call @FT_Load_Glyph or               */\n  /*    @FT_Load_Char, the slot's content is erased by the new glyph data, */\n  /*    i.e., the glyph's metrics, its image (bitmap or outline), and      */\n  /*    other control information.                                         */\n  /*                                                                       */\n  /* <Also>                                                                */\n  /*    See @FT_GlyphSlotRec for the publicly accessible glyph fields.     */\n  /*                                                                       */\n  typedef struct FT_GlyphSlotRec_*  FT_GlyphSlot;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_CharMap                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a given character map.  A charmap is used to translate */\n  /*    character codes in a given encoding into glyph indexes for its     */\n  /*    parent's face.  Some font formats may provide several charmaps per */\n  /*    font.                                                              */\n  /*                                                                       */\n  /*    Each face object owns zero or more charmaps, but only one of them  */\n  /*    can be `active' and used by @FT_Get_Char_Index or @FT_Load_Char.   */\n  /*                                                                       */\n  /*    The list of available charmaps in a face is available through the  */\n  /*    `face->num_charmaps' and `face->charmaps' fields of @FT_FaceRec.   */\n  /*                                                                       */\n  /*    The currently active charmap is available as `face->charmap'.      */\n  /*    You should call @FT_Set_Charmap to change it.                      */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    When a new face is created (either through @FT_New_Face or         */\n  /*    @FT_Open_Face), the library looks for a Unicode charmap within     */\n  /*    the list and automatically activates it.                           */\n  /*                                                                       */\n  /* <Also>                                                                */\n  /*    See @FT_CharMapRec for the publicly accessible fields of a given   */\n  /*    character map.                                                     */\n  /*                                                                       */\n  typedef struct FT_CharMapRec_*  FT_CharMap;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Macro>                                                               */\n  /*    FT_ENC_TAG                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This macro converts four-letter tags into an unsigned long.  It is */\n  /*    used to define `encoding' identifiers (see @FT_Encoding).          */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Since many 16-bit compilers don't like 32-bit enumerations, you    */\n  /*    should redefine this macro in case of problems to something like   */\n  /*    this:                                                              */\n  /*                                                                       */\n  /*    {                                                                  */\n  /*      #define FT_ENC_TAG( value, a, b, c, d )  value                   */\n  /*    }                                                                  */\n  /*                                                                       */\n  /*    to get a simple enumeration without assigning special numbers.     */\n  /*                                                                       */\n\n#ifndef FT_ENC_TAG\n#define FT_ENC_TAG( value, a, b, c, d )         \\\n          value = ( ( (FT_UInt32)(a) << 24 ) |  \\\n                    ( (FT_UInt32)(b) << 16 ) |  \\\n                    ( (FT_UInt32)(c) <<  8 ) |  \\\n                      (FT_UInt32)(d)         )\n\n#endif /* FT_ENC_TAG */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    FT_Encoding                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    An enumeration used to specify character sets supported by         */\n  /*    charmaps.  Used in the @FT_Select_Charmap API function.            */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Despite the name, this enumeration lists specific character        */\n  /*    repertories (i.e., charsets), and not text encoding methods (e.g., */\n  /*    UTF-8, UTF-16, etc.).                                              */\n  /*                                                                       */\n  /*    Other encodings might be defined in the future.                    */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    FT_ENCODING_NONE ::                                                */\n  /*      The encoding value~0 is reserved.                                */\n  /*                                                                       */\n  /*    FT_ENCODING_UNICODE ::                                             */\n  /*      Corresponds to the Unicode character set.  This value covers     */\n  /*      all versions of the Unicode repertoire, including ASCII and      */\n  /*      Latin-1.  Most fonts include a Unicode charmap, but not all      */\n  /*      of them.                                                         */\n  /*                                                                       */\n  /*      For example, if you want to access Unicode value U+1F028 (and    */\n  /*      the font contains it), use value 0x1F028 as the input value for  */\n  /*      @FT_Get_Char_Index.                                              */\n  /*                                                                       */\n  /*    FT_ENCODING_MS_SYMBOL ::                                           */\n  /*      Corresponds to the Microsoft Symbol encoding, used to encode     */\n  /*      mathematical symbols in the 32..255 character code range.  For   */\n  /*      more information, see `http://www.ceviz.net/symbol.htm'.         */\n  /*                                                                       */\n  /*    FT_ENCODING_SJIS ::                                                */\n  /*      Corresponds to Japanese SJIS encoding.  More info at             */\n  /*      at `http://langsupport.japanreference.com/encoding.shtml'.       */\n  /*      See note on multi-byte encodings below.                          */\n  /*                                                                       */\n  /*    FT_ENCODING_GB2312 ::                                              */\n  /*      Corresponds to an encoding system for Simplified Chinese as used */\n  /*      used in mainland China.                                          */\n  /*                                                                       */\n  /*    FT_ENCODING_BIG5 ::                                                */\n  /*      Corresponds to an encoding system for Traditional Chinese as     */\n  /*      used in Taiwan and Hong Kong.                                    */\n  /*                                                                       */\n  /*    FT_ENCODING_WANSUNG ::                                             */\n  /*      Corresponds to the Korean encoding system known as Wansung.      */\n  /*      For more information see                                         */\n  /*      `http://www.microsoft.com/typography/unicode/949.txt'.           */\n  /*                                                                       */\n  /*    FT_ENCODING_JOHAB ::                                               */\n  /*      The Korean standard character set (KS~C 5601-1992), which        */\n  /*      corresponds to MS Windows code page 1361.  This character set    */\n  /*      includes all possible Hangeul character combinations.            */\n  /*                                                                       */\n  /*    FT_ENCODING_ADOBE_LATIN_1 ::                                       */\n  /*      Corresponds to a Latin-1 encoding as defined in a Type~1         */\n  /*      PostScript font.  It is limited to 256 character codes.          */\n  /*                                                                       */\n  /*    FT_ENCODING_ADOBE_STANDARD ::                                      */\n  /*      Corresponds to the Adobe Standard encoding, as found in Type~1,  */\n  /*      CFF, and OpenType/CFF fonts.  It is limited to 256 character     */\n  /*      codes.                                                           */\n  /*                                                                       */\n  /*    FT_ENCODING_ADOBE_EXPERT ::                                        */\n  /*      Corresponds to the Adobe Expert encoding, as found in Type~1,    */\n  /*      CFF, and OpenType/CFF fonts.  It is limited to 256 character     */\n  /*      codes.                                                           */\n  /*                                                                       */\n  /*    FT_ENCODING_ADOBE_CUSTOM ::                                        */\n  /*      Corresponds to a custom encoding, as found in Type~1, CFF, and   */\n  /*      OpenType/CFF fonts.  It is limited to 256 character codes.       */\n  /*                                                                       */\n  /*    FT_ENCODING_APPLE_ROMAN ::                                         */\n  /*      Corresponds to the 8-bit Apple roman encoding.  Many TrueType    */\n  /*      and OpenType fonts contain a charmap for this encoding, since    */\n  /*      older versions of Mac OS are able to use it.                     */\n  /*                                                                       */\n  /*    FT_ENCODING_OLD_LATIN_2 ::                                         */\n  /*      This value is deprecated and was never used nor reported by      */\n  /*      FreeType.  Don't use or test for it.                             */\n  /*                                                                       */\n  /*    FT_ENCODING_MS_SJIS ::                                             */\n  /*      Same as FT_ENCODING_SJIS.  Deprecated.                           */\n  /*                                                                       */\n  /*    FT_ENCODING_MS_GB2312 ::                                           */\n  /*      Same as FT_ENCODING_GB2312.  Deprecated.                         */\n  /*                                                                       */\n  /*    FT_ENCODING_MS_BIG5 ::                                             */\n  /*      Same as FT_ENCODING_BIG5.  Deprecated.                           */\n  /*                                                                       */\n  /*    FT_ENCODING_MS_WANSUNG ::                                          */\n  /*      Same as FT_ENCODING_WANSUNG.  Deprecated.                        */\n  /*                                                                       */\n  /*    FT_ENCODING_MS_JOHAB ::                                            */\n  /*      Same as FT_ENCODING_JOHAB.  Deprecated.                          */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    By default, FreeType automatically synthesizes a Unicode charmap   */\n  /*    for PostScript fonts, using their glyph names dictionaries.        */\n  /*    However, it also reports the encodings defined explicitly in the   */\n  /*    font file, for the cases when they are needed, with the Adobe      */\n  /*    values as well.                                                    */\n  /*                                                                       */\n  /*    FT_ENCODING_NONE is set by the BDF and PCF drivers if the charmap  */\n  /*    is neither Unicode nor ISO-8859-1 (otherwise it is set to          */\n  /*    FT_ENCODING_UNICODE).  Use @FT_Get_BDF_Charset_ID to find out      */\n  /*    which encoding is really present.  If, for example, the            */\n  /*    `cs_registry' field is `KOI8' and the `cs_encoding' field is `R',  */\n  /*    the font is encoded in KOI8-R.                                     */\n  /*                                                                       */\n  /*    FT_ENCODING_NONE is always set (with a single exception) by the    */\n  /*    winfonts driver.  Use @FT_Get_WinFNT_Header and examine the        */\n  /*    `charset' field of the @FT_WinFNT_HeaderRec structure to find out  */\n  /*    which encoding is really present.  For example,                    */\n  /*    @FT_WinFNT_ID_CP1251 (204) means Windows code page 1251 (for       */\n  /*    Russian).                                                          */\n  /*                                                                       */\n  /*    FT_ENCODING_NONE is set if `platform_id' is @TT_PLATFORM_MACINTOSH */\n  /*    and `encoding_id' is not @TT_MAC_ID_ROMAN (otherwise it is set to  */\n  /*    FT_ENCODING_APPLE_ROMAN).                                          */\n  /*                                                                       */\n  /*    If `platform_id' is @TT_PLATFORM_MACINTOSH, use the function       */\n  /*    @FT_Get_CMap_Language_ID  to query the Mac language ID which may   */\n  /*    be needed to be able to distinguish Apple encoding variants.  See  */\n  /*                                                                       */\n  /*      http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/README.TXT  */\n  /*                                                                       */\n  /*    to get an idea how to do that.  Basically, if the language ID      */\n  /*    is~0, don't use it, otherwise subtract 1 from the language ID.     */\n  /*    Then examine `encoding_id'.  If, for example, `encoding_id' is     */\n  /*    @TT_MAC_ID_ROMAN and the language ID (minus~1) is                  */\n  /*    `TT_MAC_LANGID_GREEK', it is the Greek encoding, not Roman.        */\n  /*    @TT_MAC_ID_ARABIC with `TT_MAC_LANGID_FARSI' means the Farsi       */\n  /*    variant the Arabic encoding.                                       */\n  /*                                                                       */\n  typedef enum  FT_Encoding_\n  {\n    FT_ENC_TAG( FT_ENCODING_NONE, 0, 0, 0, 0 ),\n\n    FT_ENC_TAG( FT_ENCODING_MS_SYMBOL, 's', 'y', 'm', 'b' ),\n    FT_ENC_TAG( FT_ENCODING_UNICODE,   'u', 'n', 'i', 'c' ),\n\n    FT_ENC_TAG( FT_ENCODING_SJIS,    's', 'j', 'i', 's' ),\n    FT_ENC_TAG( FT_ENCODING_GB2312,  'g', 'b', ' ', ' ' ),\n    FT_ENC_TAG( FT_ENCODING_BIG5,    'b', 'i', 'g', '5' ),\n    FT_ENC_TAG( FT_ENCODING_WANSUNG, 'w', 'a', 'n', 's' ),\n    FT_ENC_TAG( FT_ENCODING_JOHAB,   'j', 'o', 'h', 'a' ),\n\n    /* for backwards compatibility */\n    FT_ENCODING_MS_SJIS    = FT_ENCODING_SJIS,\n    FT_ENCODING_MS_GB2312  = FT_ENCODING_GB2312,\n    FT_ENCODING_MS_BIG5    = FT_ENCODING_BIG5,\n    FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG,\n    FT_ENCODING_MS_JOHAB   = FT_ENCODING_JOHAB,\n\n    FT_ENC_TAG( FT_ENCODING_ADOBE_STANDARD, 'A', 'D', 'O', 'B' ),\n    FT_ENC_TAG( FT_ENCODING_ADOBE_EXPERT,   'A', 'D', 'B', 'E' ),\n    FT_ENC_TAG( FT_ENCODING_ADOBE_CUSTOM,   'A', 'D', 'B', 'C' ),\n    FT_ENC_TAG( FT_ENCODING_ADOBE_LATIN_1,  'l', 'a', 't', '1' ),\n\n    FT_ENC_TAG( FT_ENCODING_OLD_LATIN_2, 'l', 'a', 't', '2' ),\n\n    FT_ENC_TAG( FT_ENCODING_APPLE_ROMAN, 'a', 'r', 'm', 'n' )\n\n  } FT_Encoding;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    ft_encoding_xxx                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    These constants are deprecated; use the corresponding @FT_Encoding */\n  /*    values instead.                                                    */\n  /*                                                                       */\n#define ft_encoding_none            FT_ENCODING_NONE\n#define ft_encoding_unicode         FT_ENCODING_UNICODE\n#define ft_encoding_symbol          FT_ENCODING_MS_SYMBOL\n#define ft_encoding_latin_1         FT_ENCODING_ADOBE_LATIN_1\n#define ft_encoding_latin_2         FT_ENCODING_OLD_LATIN_2\n#define ft_encoding_sjis            FT_ENCODING_SJIS\n#define ft_encoding_gb2312          FT_ENCODING_GB2312\n#define ft_encoding_big5            FT_ENCODING_BIG5\n#define ft_encoding_wansung         FT_ENCODING_WANSUNG\n#define ft_encoding_johab           FT_ENCODING_JOHAB\n\n#define ft_encoding_adobe_standard  FT_ENCODING_ADOBE_STANDARD\n#define ft_encoding_adobe_expert    FT_ENCODING_ADOBE_EXPERT\n#define ft_encoding_adobe_custom    FT_ENCODING_ADOBE_CUSTOM\n#define ft_encoding_apple_roman     FT_ENCODING_APPLE_ROMAN\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_CharMapRec                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The base charmap structure.                                        */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    face        :: A handle to the parent face object.                 */\n  /*                                                                       */\n  /*    encoding    :: An @FT_Encoding tag identifying the charmap.  Use   */\n  /*                   this with @FT_Select_Charmap.                       */\n  /*                                                                       */\n  /*    platform_id :: An ID number describing the platform for the        */\n  /*                   following encoding ID.  This comes directly from    */\n  /*                   the TrueType specification and should be emulated   */\n  /*                   for other formats.                                  */\n  /*                                                                       */\n  /*    encoding_id :: A platform specific encoding number.  This also     */\n  /*                   comes from the TrueType specification and should be */\n  /*                   emulated similarly.                                 */\n  /*                                                                       */\n  typedef struct  FT_CharMapRec_\n  {\n    FT_Face      face;\n    FT_Encoding  encoding;\n    FT_UShort    platform_id;\n    FT_UShort    encoding_id;\n\n  } FT_CharMapRec;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*                                                                       */\n  /*                 B A S E   O B J E C T   C L A S S E S                 */\n  /*                                                                       */\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Face_Internal                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    An opaque handle to an `FT_Face_InternalRec' structure, used to    */\n  /*    model private data of a given @FT_Face object.                     */\n  /*                                                                       */\n  /*    This structure might change between releases of FreeType~2 and is  */\n  /*    not generally available to client applications.                    */\n  /*                                                                       */\n  typedef struct FT_Face_InternalRec_*  FT_Face_Internal;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_FaceRec                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    FreeType root face class structure.  A face object models a        */\n  /*    typeface in a font file.                                           */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    num_faces           :: The number of faces in the font file.  Some */\n  /*                           font formats can have multiple faces in     */\n  /*                           a font file.                                */\n  /*                                                                       */\n  /*    face_index          :: The index of the face in the font file.  It */\n  /*                           is set to~0 if there is only one face in    */\n  /*                           the font file.                              */\n  /*                                                                       */\n  /*    face_flags          :: A set of bit flags that give important      */\n  /*                           information about the face; see             */\n  /*                           @FT_FACE_FLAG_XXX for the details.          */\n  /*                                                                       */\n  /*    style_flags         :: A set of bit flags indicating the style of  */\n  /*                           the face; see @FT_STYLE_FLAG_XXX for the    */\n  /*                           details.                                    */\n  /*                                                                       */\n  /*    num_glyphs          :: The number of glyphs in the face.  If the   */\n  /*                           face is scalable and has sbits (see         */\n  /*                           `num_fixed_sizes'), it is set to the number */\n  /*                           of outline glyphs.                          */\n  /*                                                                       */\n  /*                           For CID-keyed fonts, this value gives the   */\n  /*                           highest CID used in the font.               */\n  /*                                                                       */\n  /*    family_name         :: The face's family name.  This is an ASCII   */\n  /*                           string, usually in English, which describes */\n  /*                           the typeface's family (like `Times New      */\n  /*                           Roman', `Bodoni', `Garamond', etc).  This   */\n  /*                           is a least common denominator used to list  */\n  /*                           fonts.  Some formats (TrueType & OpenType)  */\n  /*                           provide localized and Unicode versions of   */\n  /*                           this string.  Applications should use the   */\n  /*                           format specific interface to access them.   */\n  /*                           Can be NULL (e.g., in fonts embedded in a   */\n  /*                           PDF file).                                  */\n  /*                                                                       */\n  /*    style_name          :: The face's style name.  This is an ASCII    */\n  /*                           string, usually in English, which describes */\n  /*                           the typeface's style (like `Italic',        */\n  /*                           `Bold', `Condensed', etc).  Not all font    */\n  /*                           formats provide a style name, so this field */\n  /*                           is optional, and can be set to NULL.  As    */\n  /*                           for `family_name', some formats provide     */\n  /*                           localized and Unicode versions of this      */\n  /*                           string.  Applications should use the format */\n  /*                           specific interface to access them.          */\n  /*                                                                       */\n  /*    num_fixed_sizes     :: The number of bitmap strikes in the face.   */\n  /*                           Even if the face is scalable, there might   */\n  /*                           still be bitmap strikes, which are called   */\n  /*                           `sbits' in that case.                       */\n  /*                                                                       */\n  /*    available_sizes     :: An array of @FT_Bitmap_Size for all bitmap  */\n  /*                           strikes in the face.  It is set to NULL if  */\n  /*                           there is no bitmap strike.                  */\n  /*                                                                       */\n  /*    num_charmaps        :: The number of charmaps in the face.         */\n  /*                                                                       */\n  /*    charmaps            :: An array of the charmaps of the face.       */\n  /*                                                                       */\n  /*    generic             :: A field reserved for client uses.  See the  */\n  /*                           @FT_Generic type description.               */\n  /*                                                                       */\n  /*    bbox                :: The font bounding box.  Coordinates are     */\n  /*                           expressed in font units (see                */\n  /*                           `units_per_EM').  The box is large enough   */\n  /*                           to contain any glyph from the font.  Thus,  */\n  /*                           `bbox.yMax' can be seen as the `maximal     */\n  /*                           ascender', and `bbox.yMin' as the `minimal  */\n  /*                           descender'.  Only relevant for scalable     */\n  /*                           formats.                                    */\n  /*                                                                       */\n  /*                           Note that the bounding box might be off by  */\n  /*                           (at least) one pixel for hinted fonts.  See */\n  /*                           @FT_Size_Metrics for further discussion.    */\n  /*                                                                       */\n  /*    units_per_EM        :: The number of font units per EM square for  */\n  /*                           this face.  This is typically 2048 for      */\n  /*                           TrueType fonts, and 1000 for Type~1 fonts.  */\n  /*                           Only relevant for scalable formats.         */\n  /*                                                                       */\n  /*    ascender            :: The typographic ascender of the face,       */\n  /*                           expressed in font units.  For font formats  */\n  /*                           not having this information, it is set to   */\n  /*                           `bbox.yMax'.  Only relevant for scalable    */\n  /*                           formats.                                    */\n  /*                                                                       */\n  /*    descender           :: The typographic descender of the face,      */\n  /*                           expressed in font units.  For font formats  */\n  /*                           not having this information, it is set to   */\n  /*                           `bbox.yMin'.  Note that this field is       */\n  /*                           usually negative.  Only relevant for        */\n  /*                           scalable formats.                           */\n  /*                                                                       */\n  /*    height              :: The height is the vertical distance         */\n  /*                           between two consecutive baselines,          */\n  /*                           expressed in font units.  It is always      */\n  /*                           positive.  Only relevant for scalable       */\n  /*                           formats.                                    */\n  /*                                                                       */\n  /*    max_advance_width   :: The maximal advance width, in font units,   */\n  /*                           for all glyphs in this face.  This can be   */\n  /*                           used to make word wrapping computations     */\n  /*                           faster.  Only relevant for scalable         */\n  /*                           formats.                                    */\n  /*                                                                       */\n  /*    max_advance_height  :: The maximal advance height, in font units,  */\n  /*                           for all glyphs in this face.  This is only  */\n  /*                           relevant for vertical layouts, and is set   */\n  /*                           to `height' for fonts that do not provide   */\n  /*                           vertical metrics.  Only relevant for        */\n  /*                           scalable formats.                           */\n  /*                                                                       */\n  /*    underline_position  :: The position, in font units, of the         */\n  /*                           underline line for this face.  It is the    */\n  /*                           center of the underlining stem.  Only       */\n  /*                           relevant for scalable formats.              */\n  /*                                                                       */\n  /*    underline_thickness :: The thickness, in font units, of the        */\n  /*                           underline for this face.  Only relevant for */\n  /*                           scalable formats.                           */\n  /*                                                                       */\n  /*    glyph               :: The face's associated glyph slot(s).        */\n  /*                                                                       */\n  /*    size                :: The current active size for this face.      */\n  /*                                                                       */\n  /*    charmap             :: The current active charmap for this face.   */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Fields may be changed after a call to @FT_Attach_File or           */\n  /*    @FT_Attach_Stream.                                                 */\n  /*                                                                       */\n  typedef struct  FT_FaceRec_\n  {\n    FT_Long           num_faces;\n    FT_Long           face_index;\n\n    FT_Long           face_flags;\n    FT_Long           style_flags;\n\n    FT_Long           num_glyphs;\n\n    FT_String*        family_name;\n    FT_String*        style_name;\n\n    FT_Int            num_fixed_sizes;\n    FT_Bitmap_Size*   available_sizes;\n\n    FT_Int            num_charmaps;\n    FT_CharMap*       charmaps;\n\n    FT_Generic        generic;\n\n    /*# The following member variables (down to `underline_thickness') */\n    /*# are only relevant to scalable outlines; cf. @FT_Bitmap_Size    */\n    /*# for bitmap fonts.                                              */\n    FT_BBox           bbox;\n\n    FT_UShort         units_per_EM;\n    FT_Short          ascender;\n    FT_Short          descender;\n    FT_Short          height;\n\n    FT_Short          max_advance_width;\n    FT_Short          max_advance_height;\n\n    FT_Short          underline_position;\n    FT_Short          underline_thickness;\n\n    FT_GlyphSlot      glyph;\n    FT_Size           size;\n    FT_CharMap        charmap;\n\n    /*@private begin */\n\n    FT_Driver         driver;\n    FT_Memory         memory;\n    FT_Stream         stream;\n\n    FT_ListRec        sizes_list;\n\n    FT_Generic        autohint;\n    void*             extensions;\n\n    FT_Face_Internal  internal;\n\n    /*@private end */\n\n  } FT_FaceRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    FT_FACE_FLAG_XXX                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A list of bit flags used in the `face_flags' field of the          */\n  /*    @FT_FaceRec structure.  They inform client applications of         */\n  /*    properties of the corresponding face.                              */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    FT_FACE_FLAG_SCALABLE ::                                           */\n  /*      Indicates that the face contains outline glyphs.  This doesn't   */\n  /*      prevent bitmap strikes, i.e., a face can have both this and      */\n  /*      and @FT_FACE_FLAG_FIXED_SIZES set.                               */\n  /*                                                                       */\n  /*    FT_FACE_FLAG_FIXED_SIZES ::                                        */\n  /*      Indicates that the face contains bitmap strikes.  See also the   */\n  /*      `num_fixed_sizes' and `available_sizes' fields of @FT_FaceRec.   */\n  /*                                                                       */\n  /*    FT_FACE_FLAG_FIXED_WIDTH ::                                        */\n  /*      Indicates that the face contains fixed-width characters (like    */\n  /*      Courier, Lucido, MonoType, etc.).                                */\n  /*                                                                       */\n  /*    FT_FACE_FLAG_SFNT ::                                               */\n  /*      Indicates that the face uses the `sfnt' storage scheme.  For     */\n  /*      now, this means TrueType and OpenType.                           */\n  /*                                                                       */\n  /*    FT_FACE_FLAG_HORIZONTAL ::                                         */\n  /*      Indicates that the face contains horizontal glyph metrics.  This */\n  /*      should be set for all common formats.                            */\n  /*                                                                       */\n  /*    FT_FACE_FLAG_VERTICAL ::                                           */\n  /*      Indicates that the face contains vertical glyph metrics.  This   */\n  /*      is only available in some formats, not all of them.              */\n  /*                                                                       */\n  /*    FT_FACE_FLAG_KERNING ::                                            */\n  /*      Indicates that the face contains kerning information.  If set,   */\n  /*      the kerning distance can be retrieved through the function       */\n  /*      @FT_Get_Kerning.  Otherwise the function always return the       */\n  /*      vector (0,0).  Note that FreeType doesn't handle kerning data    */\n  /*      from the `GPOS' table (as present in some OpenType fonts).       */\n  /*                                                                       */\n  /*    FT_FACE_FLAG_FAST_GLYPHS ::                                        */\n  /*      THIS FLAG IS DEPRECATED.  DO NOT USE OR TEST IT.                 */\n  /*                                                                       */\n  /*    FT_FACE_FLAG_MULTIPLE_MASTERS ::                                   */\n  /*      Indicates that the font contains multiple masters and is capable */\n  /*      of interpolating between them.  See the multiple-masters         */\n  /*      specific API for details.                                        */\n  /*                                                                       */\n  /*    FT_FACE_FLAG_GLYPH_NAMES ::                                        */\n  /*      Indicates that the font contains glyph names that can be         */\n  /*      retrieved through @FT_Get_Glyph_Name.  Note that some TrueType   */\n  /*      fonts contain broken glyph name tables.  Use the function        */\n  /*      @FT_Has_PS_Glyph_Names when needed.                              */\n  /*                                                                       */\n  /*    FT_FACE_FLAG_EXTERNAL_STREAM ::                                    */\n  /*      Used internally by FreeType to indicate that a face's stream was */\n  /*      provided by the client application and should not be destroyed   */\n  /*      when @FT_Done_Face is called.  Don't read or test this flag.     */\n  /*                                                                       */\n  /*    FT_FACE_FLAG_HINTER ::                                             */\n  /*      Set if the font driver has a hinting machine of its own.  For    */\n  /*      example, with TrueType fonts, it makes sense to use data from    */\n  /*      the SFNT `gasp' table only if the native TrueType hinting engine */\n  /*      (with the bytecode interpreter) is available and active.         */\n  /*                                                                       */\n  /*    FT_FACE_FLAG_CID_KEYED ::                                          */\n  /*      Set if the font is CID-keyed.  In that case, the font is not     */\n  /*      accessed by glyph indices but by CID values.  For subsetted      */\n  /*      CID-keyed fonts this has the consequence that not all index      */\n  /*      values are a valid argument to FT_Load_Glyph.  Only the CID      */\n  /*      values for which corresponding glyphs in the subsetted font      */\n  /*      exist make FT_Load_Glyph return successfully; in all other cases */\n  /*      you get an `FT_Err_Invalid_Argument' error.                      */\n  /*                                                                       */\n  /*      Note that CID-keyed fonts which are in an SFNT wrapper don't     */\n  /*      have this flag set since the glyphs are accessed in the normal   */\n  /*      way (using contiguous indices); the `CID-ness' isn't visible to  */\n  /*      the application.                                                 */\n  /*                                                                       */\n  /*    FT_FACE_FLAG_TRICKY ::                                             */\n  /*      Set if the font is `tricky', this is, it always needs the        */\n  /*      font format's native hinting engine to get a reasonable result.  */\n  /*      A typical example is the Chinese font `mingli.ttf' which uses    */\n  /*      TrueType bytecode instructions to move and scale all of its      */\n  /*      subglyphs.                                                       */\n  /*                                                                       */\n  /*      It is not possible to autohint such fonts using                  */\n  /*      @FT_LOAD_FORCE_AUTOHINT; it will also ignore                     */\n  /*      @FT_LOAD_NO_HINTING.  You have to set both FT_LOAD_NO_HINTING    */\n  /*      and @FT_LOAD_NO_AUTOHINT to really disable hinting; however, you */\n  /*      probably never want this except for demonstration purposes.      */\n  /*                                                                       */\n  /*      Currently, there are six TrueType fonts in the list of tricky    */\n  /*      fonts; they are hard-coded in file `ttobjs.c'.                   */\n  /*                                                                       */\n#define FT_FACE_FLAG_SCALABLE          ( 1L <<  0 )\n#define FT_FACE_FLAG_FIXED_SIZES       ( 1L <<  1 )\n#define FT_FACE_FLAG_FIXED_WIDTH       ( 1L <<  2 )\n#define FT_FACE_FLAG_SFNT              ( 1L <<  3 )\n#define FT_FACE_FLAG_HORIZONTAL        ( 1L <<  4 )\n#define FT_FACE_FLAG_VERTICAL          ( 1L <<  5 )\n#define FT_FACE_FLAG_KERNING           ( 1L <<  6 )\n#define FT_FACE_FLAG_FAST_GLYPHS       ( 1L <<  7 )\n#define FT_FACE_FLAG_MULTIPLE_MASTERS  ( 1L <<  8 )\n#define FT_FACE_FLAG_GLYPH_NAMES       ( 1L <<  9 )\n#define FT_FACE_FLAG_EXTERNAL_STREAM   ( 1L << 10 )\n#define FT_FACE_FLAG_HINTER            ( 1L << 11 )\n#define FT_FACE_FLAG_CID_KEYED         ( 1L << 12 )\n#define FT_FACE_FLAG_TRICKY            ( 1L << 13 )\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_HAS_HORIZONTAL( face )\n   *\n   * @description:\n   *   A macro that returns true whenever a face object contains\n   *   horizontal metrics (this is true for all font formats though).\n   *\n   * @also:\n   *   @FT_HAS_VERTICAL can be used to check for vertical metrics.\n   *\n   */\n#define FT_HAS_HORIZONTAL( face ) \\\n          ( face->face_flags & FT_FACE_FLAG_HORIZONTAL )\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_HAS_VERTICAL( face )\n   *\n   * @description:\n   *   A macro that returns true whenever a face object contains vertical\n   *   metrics.\n   *\n   */\n#define FT_HAS_VERTICAL( face ) \\\n          ( face->face_flags & FT_FACE_FLAG_VERTICAL )\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_HAS_KERNING( face )\n   *\n   * @description:\n   *   A macro that returns true whenever a face object contains kerning\n   *   data that can be accessed with @FT_Get_Kerning.\n   *\n   */\n#define FT_HAS_KERNING( face ) \\\n          ( face->face_flags & FT_FACE_FLAG_KERNING )\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_IS_SCALABLE( face )\n   *\n   * @description:\n   *   A macro that returns true whenever a face object contains a scalable\n   *   font face (true for TrueType, Type~1, Type~42, CID, OpenType/CFF,\n   *   and PFR font formats.\n   *\n   */\n#define FT_IS_SCALABLE( face ) \\\n          ( face->face_flags & FT_FACE_FLAG_SCALABLE )\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_IS_SFNT( face )\n   *\n   * @description:\n   *   A macro that returns true whenever a face object contains a font\n   *   whose format is based on the SFNT storage scheme.  This usually\n   *   means: TrueType fonts, OpenType fonts, as well as SFNT-based embedded\n   *   bitmap fonts.\n   *\n   *   If this macro is true, all functions defined in @FT_SFNT_NAMES_H and\n   *   @FT_TRUETYPE_TABLES_H are available.\n   *\n   */\n#define FT_IS_SFNT( face ) \\\n          ( face->face_flags & FT_FACE_FLAG_SFNT )\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_IS_FIXED_WIDTH( face )\n   *\n   * @description:\n   *   A macro that returns true whenever a face object contains a font face\n   *   that contains fixed-width (or `monospace', `fixed-pitch', etc.)\n   *   glyphs.\n   *\n   */\n#define FT_IS_FIXED_WIDTH( face ) \\\n          ( face->face_flags & FT_FACE_FLAG_FIXED_WIDTH )\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_HAS_FIXED_SIZES( face )\n   *\n   * @description:\n   *   A macro that returns true whenever a face object contains some\n   *   embedded bitmaps.  See the `available_sizes' field of the\n   *   @FT_FaceRec structure.\n   *\n   */\n#define FT_HAS_FIXED_SIZES( face ) \\\n          ( face->face_flags & FT_FACE_FLAG_FIXED_SIZES )\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_HAS_FAST_GLYPHS( face )\n   *\n   * @description:\n   *   Deprecated.\n   *\n   */\n#define FT_HAS_FAST_GLYPHS( face )  0\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_HAS_GLYPH_NAMES( face )\n   *\n   * @description:\n   *   A macro that returns true whenever a face object contains some glyph\n   *   names that can be accessed through @FT_Get_Glyph_Name.\n   *\n   */\n#define FT_HAS_GLYPH_NAMES( face ) \\\n          ( face->face_flags & FT_FACE_FLAG_GLYPH_NAMES )\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_HAS_MULTIPLE_MASTERS( face )\n   *\n   * @description:\n   *   A macro that returns true whenever a face object contains some\n   *   multiple masters.  The functions provided by @FT_MULTIPLE_MASTERS_H\n   *   are then available to choose the exact design you want.\n   *\n   */\n#define FT_HAS_MULTIPLE_MASTERS( face ) \\\n          ( face->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS )\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_IS_CID_KEYED( face )\n   *\n   * @description:\n   *   A macro that returns true whenever a face object contains a CID-keyed\n   *   font.  See the discussion of @FT_FACE_FLAG_CID_KEYED for more\n   *   details.\n   *\n   *   If this macro is true, all functions defined in @FT_CID_H are\n   *   available.\n   *\n   */\n#define FT_IS_CID_KEYED( face ) \\\n          ( face->face_flags & FT_FACE_FLAG_CID_KEYED )\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_IS_TRICKY( face )\n   *\n   * @description:\n   *   A macro that returns true whenever a face represents a `tricky' font.\n   *   See the discussion of @FT_FACE_FLAG_TRICKY for more details.\n   *\n   */\n#define FT_IS_TRICKY( face ) \\\n          ( face->face_flags & FT_FACE_FLAG_TRICKY )\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Const>                                                               */\n  /*    FT_STYLE_FLAG_XXX                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A list of bit-flags used to indicate the style of a given face.    */\n  /*    These are used in the `style_flags' field of @FT_FaceRec.          */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    FT_STYLE_FLAG_ITALIC ::                                            */\n  /*      Indicates that a given face style is italic or oblique.          */\n  /*                                                                       */\n  /*    FT_STYLE_FLAG_BOLD ::                                              */\n  /*      Indicates that a given face is bold.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The style information as provided by FreeType is very basic.  More */\n  /*    details are beyond the scope and should be done on a higher level  */\n  /*    (for example, by analyzing various fields of the `OS/2' table in   */\n  /*    SFNT based fonts).                                                 */\n  /*                                                                       */\n#define FT_STYLE_FLAG_ITALIC  ( 1 << 0 )\n#define FT_STYLE_FLAG_BOLD    ( 1 << 1 )\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Size_Internal                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    An opaque handle to an `FT_Size_InternalRec' structure, used to    */\n  /*    model private data of a given @FT_Size object.                     */\n  /*                                                                       */\n  typedef struct FT_Size_InternalRec_*  FT_Size_Internal;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Size_Metrics                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The size metrics structure gives the metrics of a size object.     */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    x_ppem       :: The width of the scaled EM square in pixels, hence */\n  /*                    the term `ppem' (pixels per EM).  It is also       */\n  /*                    referred to as `nominal width'.                    */\n  /*                                                                       */\n  /*    y_ppem       :: The height of the scaled EM square in pixels,      */\n  /*                    hence the term `ppem' (pixels per EM).  It is also */\n  /*                    referred to as `nominal height'.                   */\n  /*                                                                       */\n  /*    x_scale      :: A 16.16 fractional scaling value used to convert   */\n  /*                    horizontal metrics from font units to 26.6         */\n  /*                    fractional pixels.  Only relevant for scalable     */\n  /*                    font formats.                                      */\n  /*                                                                       */\n  /*    y_scale      :: A 16.16 fractional scaling value used to convert   */\n  /*                    vertical metrics from font units to 26.6           */\n  /*                    fractional pixels.  Only relevant for scalable     */\n  /*                    font formats.                                      */\n  /*                                                                       */\n  /*    ascender     :: The ascender in 26.6 fractional pixels.  See       */\n  /*                    @FT_FaceRec for the details.                       */\n  /*                                                                       */\n  /*    descender    :: The descender in 26.6 fractional pixels.  See      */\n  /*                    @FT_FaceRec for the details.                       */\n  /*                                                                       */\n  /*    height       :: The height in 26.6 fractional pixels.  See         */\n  /*                    @FT_FaceRec for the details.                       */\n  /*                                                                       */\n  /*    max_advance  :: The maximal advance width in 26.6 fractional       */\n  /*                    pixels.  See @FT_FaceRec for the details.          */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The scaling values, if relevant, are determined first during a     */\n  /*    size changing operation.  The remaining fields are then set by the */\n  /*    driver.  For scalable formats, they are usually set to scaled      */\n  /*    values of the corresponding fields in @FT_FaceRec.                 */\n  /*                                                                       */\n  /*    Note that due to glyph hinting, these values might not be exact    */\n  /*    for certain fonts.  Thus they must be treated as unreliable        */\n  /*    with an error margin of at least one pixel!                        */\n  /*                                                                       */\n  /*    Indeed, the only way to get the exact metrics is to render _all_   */\n  /*    glyphs.  As this would be a definite performance hit, it is up to  */\n  /*    client applications to perform such computations.                  */\n  /*                                                                       */\n  /*    The FT_Size_Metrics structure is valid for bitmap fonts also.      */\n  /*                                                                       */\n  typedef struct  FT_Size_Metrics_\n  {\n    FT_UShort  x_ppem;      /* horizontal pixels per EM               */\n    FT_UShort  y_ppem;      /* vertical pixels per EM                 */\n\n    FT_Fixed   x_scale;     /* scaling values used to convert font    */\n    FT_Fixed   y_scale;     /* units to 26.6 fractional pixels        */\n\n    FT_Pos     ascender;    /* ascender in 26.6 frac. pixels          */\n    FT_Pos     descender;   /* descender in 26.6 frac. pixels         */\n    FT_Pos     height;      /* text height in 26.6 frac. pixels       */\n    FT_Pos     max_advance; /* max horizontal advance, in 26.6 pixels */\n\n  } FT_Size_Metrics;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_SizeRec                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    FreeType root size class structure.  A size object models a face   */\n  /*    object at a given size.                                            */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    face    :: Handle to the parent face object.                       */\n  /*                                                                       */\n  /*    generic :: A typeless pointer, which is unused by the FreeType     */\n  /*               library or any of its drivers.  It can be used by       */\n  /*               client applications to link their own data to each size */\n  /*               object.                                                 */\n  /*                                                                       */\n  /*    metrics :: Metrics for this size object.  This field is read-only. */\n  /*                                                                       */\n  typedef struct  FT_SizeRec_\n  {\n    FT_Face           face;      /* parent face object              */\n    FT_Generic        generic;   /* generic pointer for client uses */\n    FT_Size_Metrics   metrics;   /* size metrics                    */\n    FT_Size_Internal  internal;\n\n  } FT_SizeRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_SubGlyph                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The subglyph structure is an internal object used to describe      */\n  /*    subglyphs (for example, in the case of composites).                */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The subglyph implementation is not part of the high-level API,     */\n  /*    hence the forward structure declaration.                           */\n  /*                                                                       */\n  /*    You can however retrieve subglyph information with                 */\n  /*    @FT_Get_SubGlyph_Info.                                             */\n  /*                                                                       */\n  typedef struct FT_SubGlyphRec_*  FT_SubGlyph;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Slot_Internal                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    An opaque handle to an `FT_Slot_InternalRec' structure, used to    */\n  /*    model private data of a given @FT_GlyphSlot object.                */\n  /*                                                                       */\n  typedef struct FT_Slot_InternalRec_*  FT_Slot_Internal;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_GlyphSlotRec                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    FreeType root glyph slot class structure.  A glyph slot is a       */\n  /*    container where individual glyphs can be loaded, be they in        */\n  /*    outline or bitmap format.                                          */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    library           :: A handle to the FreeType library instance     */\n  /*                         this slot belongs to.                         */\n  /*                                                                       */\n  /*    face              :: A handle to the parent face object.           */\n  /*                                                                       */\n  /*    next              :: In some cases (like some font tools), several */\n  /*                         glyph slots per face object can be a good     */\n  /*                         thing.  As this is rare, the glyph slots are  */\n  /*                         listed through a direct, single-linked list   */\n  /*                         using its `next' field.                       */\n  /*                                                                       */\n  /*    generic           :: A typeless pointer which is unused by the     */\n  /*                         FreeType library or any of its drivers.  It   */\n  /*                         can be used by client applications to link    */\n  /*                         their own data to each glyph slot object.     */\n  /*                                                                       */\n  /*    metrics           :: The metrics of the last loaded glyph in the   */\n  /*                         slot.  The returned values depend on the last */\n  /*                         load flags (see the @FT_Load_Glyph API        */\n  /*                         function) and can be expressed either in 26.6 */\n  /*                         fractional pixels or font units.              */\n  /*                                                                       */\n  /*                         Note that even when the glyph image is        */\n  /*                         transformed, the metrics are not.             */\n  /*                                                                       */\n  /*    linearHoriAdvance :: The advance width of the unhinted glyph.      */\n  /*                         Its value is expressed in 16.16 fractional    */\n  /*                         pixels, unless @FT_LOAD_LINEAR_DESIGN is set  */\n  /*                         when loading the glyph.  This field can be    */\n  /*                         important to perform correct WYSIWYG layout.  */\n  /*                         Only relevant for outline glyphs.             */\n  /*                                                                       */\n  /*    linearVertAdvance :: The advance height of the unhinted glyph.     */\n  /*                         Its value is expressed in 16.16 fractional    */\n  /*                         pixels, unless @FT_LOAD_LINEAR_DESIGN is set  */\n  /*                         when loading the glyph.  This field can be    */\n  /*                         important to perform correct WYSIWYG layout.  */\n  /*                         Only relevant for outline glyphs.             */\n  /*                                                                       */\n  /*    advance           :: This is the transformed advance width for the */\n  /*                         glyph (in 26.6 fractional pixel format).      */\n  /*                                                                       */\n  /*    format            :: This field indicates the format of the image  */\n  /*                         contained in the glyph slot.  Typically       */\n  /*                         @FT_GLYPH_FORMAT_BITMAP,                      */\n  /*                         @FT_GLYPH_FORMAT_OUTLINE, or                  */\n  /*                         @FT_GLYPH_FORMAT_COMPOSITE, but others are    */\n  /*                         possible.                                     */\n  /*                                                                       */\n  /*    bitmap            :: This field is used as a bitmap descriptor     */\n  /*                         when the slot format is                       */\n  /*                         @FT_GLYPH_FORMAT_BITMAP.  Note that the       */\n  /*                         address and content of the bitmap buffer can  */\n  /*                         change between calls of @FT_Load_Glyph and a  */\n  /*                         few other functions.                          */\n  /*                                                                       */\n  /*    bitmap_left       :: This is the bitmap's left bearing expressed   */\n  /*                         in integer pixels.  Of course, this is only   */\n  /*                         valid if the format is                        */\n  /*                         @FT_GLYPH_FORMAT_BITMAP.                      */\n  /*                                                                       */\n  /*    bitmap_top        :: This is the bitmap's top bearing expressed in */\n  /*                         integer pixels.  Remember that this is the    */\n  /*                         distance from the baseline to the top-most    */\n  /*                         glyph scanline, upwards y~coordinates being   */\n  /*                         *positive*.                                   */\n  /*                                                                       */\n  /*    outline           :: The outline descriptor for the current glyph  */\n  /*                         image if its format is                        */\n  /*                         @FT_GLYPH_FORMAT_OUTLINE.  Once a glyph is    */\n  /*                         loaded, `outline' can be transformed,         */\n  /*                         distorted, embolded, etc.  However, it must   */\n  /*                         not be freed.                                 */\n  /*                                                                       */\n  /*    num_subglyphs     :: The number of subglyphs in a composite glyph. */\n  /*                         This field is only valid for the composite    */\n  /*                         glyph format that should normally only be     */\n  /*                         loaded with the @FT_LOAD_NO_RECURSE flag.     */\n  /*                         For now this is internal to FreeType.         */\n  /*                                                                       */\n  /*    subglyphs         :: An array of subglyph descriptors for          */\n  /*                         composite glyphs.  There are `num_subglyphs'  */\n  /*                         elements in there.  Currently internal to     */\n  /*                         FreeType.                                     */\n  /*                                                                       */\n  /*    control_data      :: Certain font drivers can also return the      */\n  /*                         control data for a given glyph image (e.g.    */\n  /*                         TrueType bytecode, Type~1 charstrings, etc.). */\n  /*                         This field is a pointer to such data.         */\n  /*                                                                       */\n  /*    control_len       :: This is the length in bytes of the control    */\n  /*                         data.                                         */\n  /*                                                                       */\n  /*    other             :: Really wicked formats can use this pointer to */\n  /*                         present their own glyph image to client       */\n  /*                         applications.  Note that the application      */\n  /*                         needs to know about the image format.         */\n  /*                                                                       */\n  /*    lsb_delta         :: The difference between hinted and unhinted    */\n  /*                         left side bearing while autohinting is        */\n  /*                         active.  Zero otherwise.                      */\n  /*                                                                       */\n  /*    rsb_delta         :: The difference between hinted and unhinted    */\n  /*                         right side bearing while autohinting is       */\n  /*                         active.  Zero otherwise.                      */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    If @FT_Load_Glyph is called with default flags (see                */\n  /*    @FT_LOAD_DEFAULT) the glyph image is loaded in the glyph slot in   */\n  /*    its native format (e.g., an outline glyph for TrueType and Type~1  */\n  /*    formats).                                                          */\n  /*                                                                       */\n  /*    This image can later be converted into a bitmap by calling         */\n  /*    @FT_Render_Glyph.  This function finds the current renderer for    */\n  /*    the native image's format, then invokes it.                        */\n  /*                                                                       */\n  /*    The renderer is in charge of transforming the native image through */\n  /*    the slot's face transformation fields, then converting it into a   */\n  /*    bitmap that is returned in `slot->bitmap'.                         */\n  /*                                                                       */\n  /*    Note that `slot->bitmap_left' and `slot->bitmap_top' are also used */\n  /*    to specify the position of the bitmap relative to the current pen  */\n  /*    position (e.g., coordinates (0,0) on the baseline).  Of course,    */\n  /*    `slot->format' is also changed to @FT_GLYPH_FORMAT_BITMAP.         */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Here a small pseudo code fragment which shows how to use           */\n  /*    `lsb_delta' and `rsb_delta':                                       */\n  /*                                                                       */\n  /*    {                                                                  */\n  /*      FT_Pos  origin_x       = 0;                                      */\n  /*      FT_Pos  prev_rsb_delta = 0;                                      */\n  /*                                                                       */\n  /*                                                                       */\n  /*      for all glyphs do                                                */\n  /*        <compute kern between current and previous glyph and add it to */\n  /*         `origin_x'>                                                   */\n  /*                                                                       */\n  /*        <load glyph with `FT_Load_Glyph'>                              */\n  /*                                                                       */\n  /*        if ( prev_rsb_delta - face->glyph->lsb_delta >= 32 )           */\n  /*          origin_x -= 64;                                              */\n  /*        else if ( prev_rsb_delta - face->glyph->lsb_delta < -32 )      */\n  /*          origin_x += 64;                                              */\n  /*                                                                       */\n  /*        prev_rsb_delta = face->glyph->rsb_delta;                       */\n  /*                                                                       */\n  /*        <save glyph image, or render glyph, or ...>                    */\n  /*                                                                       */\n  /*        origin_x += face->glyph->advance.x;                            */\n  /*      endfor                                                           */\n  /*    }                                                                  */\n  /*                                                                       */\n  typedef struct  FT_GlyphSlotRec_\n  {\n    FT_Library        library;\n    FT_Face           face;\n    FT_GlyphSlot      next;\n    FT_UInt           reserved;       /* retained for binary compatibility */\n    FT_Generic        generic;\n\n    FT_Glyph_Metrics  metrics;\n    FT_Fixed          linearHoriAdvance;\n    FT_Fixed          linearVertAdvance;\n    FT_Vector         advance;\n\n    FT_Glyph_Format   format;\n\n    FT_Bitmap         bitmap;\n    FT_Int            bitmap_left;\n    FT_Int            bitmap_top;\n\n    FT_Outline        outline;\n\n    FT_UInt           num_subglyphs;\n    FT_SubGlyph       subglyphs;\n\n    void*             control_data;\n    long              control_len;\n\n    FT_Pos            lsb_delta;\n    FT_Pos            rsb_delta;\n\n    void*             other;\n\n    FT_Slot_Internal  internal;\n\n  } FT_GlyphSlotRec;\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*                                                                       */\n  /*                         F U N C T I O N S                             */\n  /*                                                                       */\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Init_FreeType                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Initialize a new FreeType library object.  The set of modules      */\n  /*    that are registered by this function is determined at build time.  */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    alibrary :: A handle to a new library object.                      */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    In case you want to provide your own memory allocating routines,   */\n  /*    use @FT_New_Library instead, followed by a call to                 */\n  /*    @FT_Add_Default_Modules (or a series of calls to @FT_Add_Module).  */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Init_FreeType( FT_Library  *alibrary );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Done_FreeType                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Destroy a given FreeType library object and all of its children,   */\n  /*    including resources, drivers, faces, sizes, etc.                   */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library :: A handle to the target library object.                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Done_FreeType( FT_Library  library );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    FT_OPEN_XXX                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A list of bit-field constants used within the `flags' field of the */\n  /*    @FT_Open_Args structure.                                           */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    FT_OPEN_MEMORY   :: This is a memory-based stream.                 */\n  /*                                                                       */\n  /*    FT_OPEN_STREAM   :: Copy the stream from the `stream' field.       */\n  /*                                                                       */\n  /*    FT_OPEN_PATHNAME :: Create a new input stream from a C~path        */\n  /*                        name.                                          */\n  /*                                                                       */\n  /*    FT_OPEN_DRIVER   :: Use the `driver' field.                        */\n  /*                                                                       */\n  /*    FT_OPEN_PARAMS   :: Use the `num_params' and `params' fields.      */\n  /*                                                                       */\n  /*    ft_open_memory   :: Deprecated; use @FT_OPEN_MEMORY instead.       */\n  /*                                                                       */\n  /*    ft_open_stream   :: Deprecated; use @FT_OPEN_STREAM instead.       */\n  /*                                                                       */\n  /*    ft_open_pathname :: Deprecated; use @FT_OPEN_PATHNAME instead.     */\n  /*                                                                       */\n  /*    ft_open_driver   :: Deprecated; use @FT_OPEN_DRIVER instead.       */\n  /*                                                                       */\n  /*    ft_open_params   :: Deprecated; use @FT_OPEN_PARAMS instead.       */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The `FT_OPEN_MEMORY', `FT_OPEN_STREAM', and `FT_OPEN_PATHNAME'     */\n  /*    flags are mutually exclusive.                                      */\n  /*                                                                       */\n#define FT_OPEN_MEMORY    0x1\n#define FT_OPEN_STREAM    0x2\n#define FT_OPEN_PATHNAME  0x4\n#define FT_OPEN_DRIVER    0x8\n#define FT_OPEN_PARAMS    0x10\n\n#define ft_open_memory    FT_OPEN_MEMORY     /* deprecated */\n#define ft_open_stream    FT_OPEN_STREAM     /* deprecated */\n#define ft_open_pathname  FT_OPEN_PATHNAME   /* deprecated */\n#define ft_open_driver    FT_OPEN_DRIVER     /* deprecated */\n#define ft_open_params    FT_OPEN_PARAMS     /* deprecated */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Parameter                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A simple structure used to pass more or less generic parameters to */\n  /*    @FT_Open_Face.                                                     */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    tag  :: A four-byte identification tag.                            */\n  /*                                                                       */\n  /*    data :: A pointer to the parameter data.                           */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The ID and function of parameters are driver-specific.             */\n  /*                                                                       */\n  typedef struct  FT_Parameter_\n  {\n    FT_ULong    tag;\n    FT_Pointer  data;\n\n  } FT_Parameter;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Open_Args                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to indicate how to open a new font file or        */\n  /*    stream.  A pointer to such a structure can be used as a parameter  */\n  /*    for the functions @FT_Open_Face and @FT_Attach_Stream.             */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    flags       :: A set of bit flags indicating how to use the        */\n  /*                   structure.                                          */\n  /*                                                                       */\n  /*    memory_base :: The first byte of the file in memory.               */\n  /*                                                                       */\n  /*    memory_size :: The size in bytes of the file in memory.            */\n  /*                                                                       */\n  /*    pathname    :: A pointer to an 8-bit file pathname.                */\n  /*                                                                       */\n  /*    stream      :: A handle to a source stream object.                 */\n  /*                                                                       */\n  /*    driver      :: This field is exclusively used by @FT_Open_Face;    */\n  /*                   it simply specifies the font driver to use to open  */\n  /*                   the face.  If set to~0, FreeType tries to load the  */\n  /*                   face with each one of the drivers in its list.      */\n  /*                                                                       */\n  /*    num_params  :: The number of extra parameters.                     */\n  /*                                                                       */\n  /*    params      :: Extra parameters passed to the font driver when     */\n  /*                   opening a new face.                                 */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The stream type is determined by the contents of `flags' which     */\n  /*    are tested in the following order by @FT_Open_Face:                */\n  /*                                                                       */\n  /*    If the `FT_OPEN_MEMORY' bit is set, assume that this is a          */\n  /*    memory file of `memory_size' bytes, located at `memory_address'.   */\n  /*    The data are are not copied, and the client is responsible for     */\n  /*    releasing and destroying them _after_ the corresponding call to    */\n  /*    @FT_Done_Face.                                                     */\n  /*                                                                       */\n  /*    Otherwise, if the `FT_OPEN_STREAM' bit is set, assume that a       */\n  /*    custom input stream `stream' is used.                              */\n  /*                                                                       */\n  /*    Otherwise, if the `FT_OPEN_PATHNAME' bit is set, assume that this  */\n  /*    is a normal file and use `pathname' to open it.                    */\n  /*                                                                       */\n  /*    If the `FT_OPEN_DRIVER' bit is set, @FT_Open_Face only tries to    */\n  /*    open the file with the driver whose handler is in `driver'.        */\n  /*                                                                       */\n  /*    If the `FT_OPEN_PARAMS' bit is set, the parameters given by        */\n  /*    `num_params' and `params' is used.  They are ignored otherwise.    */\n  /*                                                                       */\n  /*    Ideally, both the `pathname' and `params' fields should be tagged  */\n  /*    as `const'; this is missing for API backwards compatibility.  In   */\n  /*    other words, applications should treat them as read-only.          */\n  /*                                                                       */\n  typedef struct  FT_Open_Args_\n  {\n    FT_UInt         flags;\n    const FT_Byte*  memory_base;\n    FT_Long         memory_size;\n    FT_String*      pathname;\n    FT_Stream       stream;\n    FT_Module       driver;\n    FT_Int          num_params;\n    FT_Parameter*   params;\n\n  } FT_Open_Args;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_New_Face                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This function calls @FT_Open_Face to open a font by its pathname.  */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    library    :: A handle to the library resource.                    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    pathname   :: A path to the font file.                             */\n  /*                                                                       */\n  /*    face_index :: The index of the face within the font.  The first    */\n  /*                  face has index~0.                                    */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    aface      :: A handle to a new face object.  If `face_index' is   */\n  /*                  greater than or equal to zero, it must be non-NULL.  */\n  /*                  See @FT_Open_Face for more details.                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_New_Face( FT_Library   library,\n               const char*  filepathname,\n               FT_Long      face_index,\n               FT_Face     *aface );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_New_Memory_Face                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This function calls @FT_Open_Face to open a font which has been    */\n  /*    loaded into memory.                                                */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    library    :: A handle to the library resource.                    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    file_base  :: A pointer to the beginning of the font data.         */\n  /*                                                                       */\n  /*    file_size  :: The size of the memory chunk used by the font data.  */\n  /*                                                                       */\n  /*    face_index :: The index of the face within the font.  The first    */\n  /*                  face has index~0.                                    */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    aface      :: A handle to a new face object.  If `face_index' is   */\n  /*                  greater than or equal to zero, it must be non-NULL.  */\n  /*                  See @FT_Open_Face for more details.                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    You must not deallocate the memory before calling @FT_Done_Face.   */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_New_Memory_Face( FT_Library      library,\n                      const FT_Byte*  file_base,\n                      FT_Long         file_size,\n                      FT_Long         face_index,\n                      FT_Face        *aface );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Open_Face                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Create a face object from a given resource described by            */\n  /*    @FT_Open_Args.                                                     */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    library    :: A handle to the library resource.                    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    args       :: A pointer to an `FT_Open_Args' structure which must  */\n  /*                  be filled by the caller.                             */\n  /*                                                                       */\n  /*    face_index :: The index of the face within the font.  The first    */\n  /*                  face has index~0.                                    */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    aface      :: A handle to a new face object.  If `face_index' is   */\n  /*                  greater than or equal to zero, it must be non-NULL.  */\n  /*                  See note below.                                      */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Unlike FreeType 1.x, this function automatically creates a glyph   */\n  /*    slot for the face object which can be accessed directly through    */\n  /*    `face->glyph'.                                                     */\n  /*                                                                       */\n  /*    FT_Open_Face can be used to quickly check whether the font         */\n  /*    format of a given font resource is supported by FreeType.  If the  */\n  /*    `face_index' field is negative, the function's return value is~0   */\n  /*    if the font format is recognized, or non-zero otherwise;           */\n  /*    the function returns a more or less empty face handle in `*aface'  */\n  /*    (if `aface' isn't NULL).  The only useful field in this special    */\n  /*    case is `face->num_faces' which gives the number of faces within   */\n  /*    the font file.  After examination, the returned @FT_Face structure */\n  /*    should be deallocated with a call to @FT_Done_Face.                */\n  /*                                                                       */\n  /*    Each new face object created with this function also owns a        */\n  /*    default @FT_Size object, accessible as `face->size'.               */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Open_Face( FT_Library           library,\n                const FT_Open_Args*  args,\n                FT_Long              face_index,\n                FT_Face             *aface );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Attach_File                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This function calls @FT_Attach_Stream to attach a file.            */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face         :: The target face object.                            */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    filepathname :: The pathname.                                      */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Attach_File( FT_Face      face,\n                  const char*  filepathname );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Attach_Stream                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    `Attach' data to a face object.  Normally, this is used to read    */\n  /*    additional information for the face object.  For example, you can  */\n  /*    attach an AFM file that comes with a Type~1 font to get the        */\n  /*    kerning values and other metrics.                                  */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face       :: The target face object.                              */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    parameters :: A pointer to @FT_Open_Args which must be filled by   */\n  /*                  the caller.                                          */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The meaning of the `attach' (i.e., what really happens when the    */\n  /*    new file is read) is not fixed by FreeType itself.  It really      */\n  /*    depends on the font format (and thus the font driver).             */\n  /*                                                                       */\n  /*    Client applications are expected to know what they are doing       */\n  /*    when invoking this function.  Most drivers simply do not implement */\n  /*    file attachments.                                                  */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Attach_Stream( FT_Face        face,\n                    FT_Open_Args*  parameters );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Done_Face                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Discard a given face object, as well as all of its child slots and */\n  /*    sizes.                                                             */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face :: A handle to a target face object.                          */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Done_Face( FT_Face  face );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Select_Size                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Select a bitmap strike.                                            */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face         :: A handle to a target face object.                  */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    strike_index :: The index of the bitmap strike in the              */\n  /*                    `available_sizes' field of @FT_FaceRec structure.  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Select_Size( FT_Face  face,\n                  FT_Int   strike_index );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    FT_Size_Request_Type                                               */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    An enumeration type that lists the supported size request types.   */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    FT_SIZE_REQUEST_TYPE_NOMINAL ::                                    */\n  /*      The nominal size.  The `units_per_EM' field of @FT_FaceRec is    */\n  /*      used to determine both scaling values.                           */\n  /*                                                                       */\n  /*    FT_SIZE_REQUEST_TYPE_REAL_DIM ::                                   */\n  /*      The real dimension.  The sum of the the `Ascender' and (minus    */\n  /*      of) the `Descender' fields of @FT_FaceRec are used to determine  */\n  /*      both scaling values.                                             */\n  /*                                                                       */\n  /*    FT_SIZE_REQUEST_TYPE_BBOX ::                                       */\n  /*      The font bounding box.  The width and height of the `bbox' field */\n  /*      of @FT_FaceRec are used to determine the horizontal and vertical */\n  /*      scaling value, respectively.                                     */\n  /*                                                                       */\n  /*    FT_SIZE_REQUEST_TYPE_CELL ::                                       */\n  /*      The `max_advance_width' field of @FT_FaceRec is used to          */\n  /*      determine the horizontal scaling value; the vertical scaling     */\n  /*      value is determined the same way as                              */\n  /*      @FT_SIZE_REQUEST_TYPE_REAL_DIM does.  Finally, both scaling      */\n  /*      values are set to the smaller one.  This type is useful if you   */\n  /*      want to specify the font size for, say, a window of a given      */\n  /*      dimension and 80x24 cells.                                       */\n  /*                                                                       */\n  /*    FT_SIZE_REQUEST_TYPE_SCALES ::                                     */\n  /*      Specify the scaling values directly.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The above descriptions only apply to scalable formats.  For bitmap */\n  /*    formats, the behaviour is up to the driver.                        */\n  /*                                                                       */\n  /*    See the note section of @FT_Size_Metrics if you wonder how size    */\n  /*    requesting relates to scaling values.                              */\n  /*                                                                       */\n  typedef enum  FT_Size_Request_Type_\n  {\n    FT_SIZE_REQUEST_TYPE_NOMINAL,\n    FT_SIZE_REQUEST_TYPE_REAL_DIM,\n    FT_SIZE_REQUEST_TYPE_BBOX,\n    FT_SIZE_REQUEST_TYPE_CELL,\n    FT_SIZE_REQUEST_TYPE_SCALES,\n\n    FT_SIZE_REQUEST_TYPE_MAX\n\n  } FT_Size_Request_Type;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Size_RequestRec                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to model a size request.                          */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    type           :: See @FT_Size_Request_Type.                       */\n  /*                                                                       */\n  /*    width          :: The desired width.                               */\n  /*                                                                       */\n  /*    height         :: The desired height.                              */\n  /*                                                                       */\n  /*    horiResolution :: The horizontal resolution.  If set to zero,      */\n  /*                      `width' is treated as a 26.6 fractional pixel    */\n  /*                      value.                                           */\n  /*                                                                       */\n  /*    vertResolution :: The vertical resolution.  If set to zero,        */\n  /*                      `height' is treated as a 26.6 fractional pixel   */\n  /*                      value.                                           */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    If `width' is zero, then the horizontal scaling value is set equal */\n  /*    to the vertical scaling value, and vice versa.                     */\n  /*                                                                       */\n  typedef struct  FT_Size_RequestRec_\n  {\n    FT_Size_Request_Type  type;\n    FT_Long               width;\n    FT_Long               height;\n    FT_UInt               horiResolution;\n    FT_UInt               vertResolution;\n\n  } FT_Size_RequestRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Size_Request                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a size request structure.                              */\n  /*                                                                       */\n  typedef struct FT_Size_RequestRec_  *FT_Size_Request;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Request_Size                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Resize the scale of the active @FT_Size object in a face.          */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face :: A handle to a target face object.                          */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    req  :: A pointer to a @FT_Size_RequestRec.                        */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Although drivers may select the bitmap strike matching the         */\n  /*    request, you should not rely on this if you intend to select a     */\n  /*    particular bitmap strike.  Use @FT_Select_Size instead in that     */\n  /*    case.                                                              */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Request_Size( FT_Face          face,\n                   FT_Size_Request  req );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Set_Char_Size                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This function calls @FT_Request_Size to request the nominal size   */\n  /*    (in points).                                                       */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face            :: A handle to a target face object.               */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    char_width      :: The nominal width, in 26.6 fractional points.   */\n  /*                                                                       */\n  /*    char_height     :: The nominal height, in 26.6 fractional points.  */\n  /*                                                                       */\n  /*    horz_resolution :: The horizontal resolution in dpi.               */\n  /*                                                                       */\n  /*    vert_resolution :: The vertical resolution in dpi.                 */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    If either the character width or height is zero, it is set equal   */\n  /*    to the other value.                                                */\n  /*                                                                       */\n  /*    If either the horizontal or vertical resolution is zero, it is set */\n  /*    equal to the other value.                                          */\n  /*                                                                       */\n  /*    A character width or height smaller than 1pt is set to 1pt; if     */\n  /*    both resolution values are zero, they are set to 72dpi.            */\n  /*                                                                       */\n  /*    Don't use this function if you are using the FreeType cache API.   */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Set_Char_Size( FT_Face     face,\n                    FT_F26Dot6  char_width,\n                    FT_F26Dot6  char_height,\n                    FT_UInt     horz_resolution,\n                    FT_UInt     vert_resolution );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Set_Pixel_Sizes                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This function calls @FT_Request_Size to request the nominal size   */\n  /*    (in pixels).                                                       */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face         :: A handle to the target face object.                */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    pixel_width  :: The nominal width, in pixels.                      */\n  /*                                                                       */\n  /*    pixel_height :: The nominal height, in pixels.                     */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Set_Pixel_Sizes( FT_Face  face,\n                      FT_UInt  pixel_width,\n                      FT_UInt  pixel_height );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Load_Glyph                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function used to load a single glyph into the glyph slot of a    */\n  /*    face object.                                                       */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face        :: A handle to the target face object where the glyph  */\n  /*                   is loaded.                                          */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    glyph_index :: The index of the glyph in the font file.  For       */\n  /*                   CID-keyed fonts (either in PS or in CFF format)     */\n  /*                   this argument specifies the CID value.              */\n  /*                                                                       */\n  /*    load_flags  :: A flag indicating what to load for this glyph.  The */\n  /*                   @FT_LOAD_XXX constants can be used to control the   */\n  /*                   glyph loading process (e.g., whether the outline    */\n  /*                   should be scaled, whether to load bitmaps or not,   */\n  /*                   whether to hint the outline, etc).                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The loaded glyph may be transformed.  See @FT_Set_Transform for    */\n  /*    the details.                                                       */\n  /*                                                                       */\n  /*    For subsetted CID-keyed fonts, `FT_Err_Invalid_Argument' is        */\n  /*    returned for invalid CID values (this is, for CID values which     */\n  /*    don't have a corresponding glyph in the font).  See the discussion */\n  /*    of the @FT_FACE_FLAG_CID_KEYED flag for more details.              */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Load_Glyph( FT_Face   face,\n                 FT_UInt   glyph_index,\n                 FT_Int32  load_flags );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Load_Char                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function used to load a single glyph into the glyph slot of a    */\n  /*    face object, according to its character code.                      */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face        :: A handle to a target face object where the glyph    */\n  /*                   is loaded.                                          */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    char_code   :: The glyph's character code, according to the        */\n  /*                   current charmap used in the face.                   */\n  /*                                                                       */\n  /*    load_flags  :: A flag indicating what to load for this glyph.  The */\n  /*                   @FT_LOAD_XXX constants can be used to control the   */\n  /*                   glyph loading process (e.g., whether the outline    */\n  /*                   should be scaled, whether to load bitmaps or not,   */\n  /*                   whether to hint the outline, etc).                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This function simply calls @FT_Get_Char_Index and @FT_Load_Glyph.  */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Load_Char( FT_Face   face,\n                FT_ULong  char_code,\n                FT_Int32  load_flags );\n\n\n  /*************************************************************************\n   *\n   * @enum:\n   *   FT_LOAD_XXX\n   *\n   * @description:\n   *   A list of bit-field constants used with @FT_Load_Glyph to indicate\n   *   what kind of operations to perform during glyph loading.\n   *\n   * @values:\n   *   FT_LOAD_DEFAULT ::\n   *     Corresponding to~0, this value is used as the default glyph load\n   *     operation.  In this case, the following happens:\n   *\n   *     1. FreeType looks for a bitmap for the glyph corresponding to the\n   *        face's current size.  If one is found, the function returns.\n   *        The bitmap data can be accessed from the glyph slot (see note\n   *        below).\n   *\n   *     2. If no embedded bitmap is searched or found, FreeType looks for a\n   *        scalable outline.  If one is found, it is loaded from the font\n   *        file, scaled to device pixels, then `hinted' to the pixel grid\n   *        in order to optimize it.  The outline data can be accessed from\n   *        the glyph slot (see note below).\n   *\n   *     Note that by default, the glyph loader doesn't render outlines into\n   *     bitmaps.  The following flags are used to modify this default\n   *     behaviour to more specific and useful cases.\n   *\n   *   FT_LOAD_NO_SCALE ::\n   *     Don't scale the outline glyph loaded, but keep it in font units.\n   *\n   *     This flag implies @FT_LOAD_NO_HINTING and @FT_LOAD_NO_BITMAP, and\n   *     unsets @FT_LOAD_RENDER.\n   *\n   *   FT_LOAD_NO_HINTING ::\n   *     Disable hinting.  This generally generates `blurrier' bitmap glyph\n   *     when the glyph is rendered in any of the anti-aliased modes.  See\n   *     also the note below.\n   *\n   *     This flag is implied by @FT_LOAD_NO_SCALE.\n   *\n   *   FT_LOAD_RENDER ::\n   *     Call @FT_Render_Glyph after the glyph is loaded.  By default, the\n   *     glyph is rendered in @FT_RENDER_MODE_NORMAL mode.  This can be\n   *     overridden by @FT_LOAD_TARGET_XXX or @FT_LOAD_MONOCHROME.\n   *\n   *     This flag is unset by @FT_LOAD_NO_SCALE.\n   *\n   *   FT_LOAD_NO_BITMAP ::\n   *     Ignore bitmap strikes when loading.  Bitmap-only fonts ignore this\n   *     flag.\n   *\n   *     @FT_LOAD_NO_SCALE always sets this flag.\n   *\n   *   FT_LOAD_VERTICAL_LAYOUT ::\n   *     Load the glyph for vertical text layout.  _Don't_ use it as it is\n   *     problematic currently.\n   *\n   *   FT_LOAD_FORCE_AUTOHINT ::\n   *     Indicates that the auto-hinter is preferred over the font's native\n   *     hinter.  See also the note below.\n   *\n   *   FT_LOAD_CROP_BITMAP ::\n   *     Indicates that the font driver should crop the loaded bitmap glyph\n   *     (i.e., remove all space around its black bits).  Not all drivers\n   *     implement this.\n   *\n   *   FT_LOAD_PEDANTIC ::\n   *     Indicates that the font driver should perform pedantic verifications\n   *     during glyph loading.  This is mostly used to detect broken glyphs\n   *     in fonts.  By default, FreeType tries to handle broken fonts also.\n   *\n   *   FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ::\n   *     Indicates that the font driver should ignore the global advance\n   *     width defined in the font.  By default, that value is used as the\n   *     advance width for all glyphs when the face has\n   *     @FT_FACE_FLAG_FIXED_WIDTH set.\n   *\n   *     This flag exists for historical reasons (to support buggy CJK\n   *     fonts).\n   *\n   *   FT_LOAD_NO_RECURSE ::\n   *     This flag is only used internally.  It merely indicates that the\n   *     font driver should not load composite glyphs recursively.  Instead,\n   *     it should set the `num_subglyph' and `subglyphs' values of the\n   *     glyph slot accordingly, and set `glyph->format' to\n   *     @FT_GLYPH_FORMAT_COMPOSITE.\n   *\n   *     The description of sub-glyphs is not available to client\n   *     applications for now.\n   *\n   *     This flag implies @FT_LOAD_NO_SCALE and @FT_LOAD_IGNORE_TRANSFORM.\n   *\n   *   FT_LOAD_IGNORE_TRANSFORM ::\n   *     Indicates that the transform matrix set by @FT_Set_Transform should\n   *     be ignored.\n   *\n   *   FT_LOAD_MONOCHROME ::\n   *     This flag is used with @FT_LOAD_RENDER to indicate that you want to\n   *     render an outline glyph to a 1-bit monochrome bitmap glyph, with\n   *     8~pixels packed into each byte of the bitmap data.\n   *\n   *     Note that this has no effect on the hinting algorithm used.  You\n   *     should rather use @FT_LOAD_TARGET_MONO so that the\n   *     monochrome-optimized hinting algorithm is used.\n   *\n   *   FT_LOAD_LINEAR_DESIGN ::\n   *     Indicates that the `linearHoriAdvance' and `linearVertAdvance'\n   *     fields of @FT_GlyphSlotRec should be kept in font units.  See\n   *     @FT_GlyphSlotRec for details.\n   *\n   *   FT_LOAD_NO_AUTOHINT ::\n   *     Disable auto-hinter.  See also the note below.\n   *\n   * @note:\n   *   By default, hinting is enabled and the font's native hinter (see\n   *   @FT_FACE_FLAG_HINTER) is preferred over the auto-hinter.  You can\n   *   disable hinting by setting @FT_LOAD_NO_HINTING or change the\n   *   precedence by setting @FT_LOAD_FORCE_AUTOHINT.  You can also set\n   *   @FT_LOAD_NO_AUTOHINT in case you don't want the auto-hinter to be\n   *   used at all.\n   *\n   *   See the description of @FT_FACE_FLAG_TRICKY for a special exception\n   *   (affecting only a handful of Asian fonts).\n   *\n   *   Besides deciding which hinter to use, you can also decide which\n   *   hinting algorithm to use.  See @FT_LOAD_TARGET_XXX for details.\n   *\n   */\n#define FT_LOAD_DEFAULT                      0x0\n#define FT_LOAD_NO_SCALE                     0x1\n#define FT_LOAD_NO_HINTING                   0x2\n#define FT_LOAD_RENDER                       0x4\n#define FT_LOAD_NO_BITMAP                    0x8\n#define FT_LOAD_VERTICAL_LAYOUT              0x10\n#define FT_LOAD_FORCE_AUTOHINT               0x20\n#define FT_LOAD_CROP_BITMAP                  0x40\n#define FT_LOAD_PEDANTIC                     0x80\n#define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH  0x200\n#define FT_LOAD_NO_RECURSE                   0x400\n#define FT_LOAD_IGNORE_TRANSFORM             0x800\n#define FT_LOAD_MONOCHROME                   0x1000\n#define FT_LOAD_LINEAR_DESIGN                0x2000\n#define FT_LOAD_NO_AUTOHINT                  0x8000U\n\n  /* */\n\n  /* used internally only by certain font drivers! */\n#define FT_LOAD_ADVANCE_ONLY                 0x100\n#define FT_LOAD_SBITS_ONLY                   0x4000\n\n\n  /**************************************************************************\n   *\n   * @enum:\n   *   FT_LOAD_TARGET_XXX\n   *\n   * @description:\n   *   A list of values that are used to select a specific hinting algorithm\n   *   to use by the hinter.  You should OR one of these values to your\n   *   `load_flags' when calling @FT_Load_Glyph.\n   *\n   *   Note that font's native hinters may ignore the hinting algorithm you\n   *   have specified (e.g., the TrueType bytecode interpreter).  You can set\n   *   @FT_LOAD_FORCE_AUTOHINT to ensure that the auto-hinter is used.\n   *\n   *   Also note that @FT_LOAD_TARGET_LIGHT is an exception, in that it\n   *   always implies @FT_LOAD_FORCE_AUTOHINT.\n   *\n   * @values:\n   *   FT_LOAD_TARGET_NORMAL ::\n   *     This corresponds to the default hinting algorithm, optimized for\n   *     standard gray-level rendering.  For monochrome output, use\n   *     @FT_LOAD_TARGET_MONO instead.\n   *\n   *   FT_LOAD_TARGET_LIGHT ::\n   *     A lighter hinting algorithm for non-monochrome modes.  Many\n   *     generated glyphs are more fuzzy but better resemble its original\n   *     shape.  A bit like rendering on Mac OS~X.\n   *\n   *     As a special exception, this target implies @FT_LOAD_FORCE_AUTOHINT.\n   *\n   *   FT_LOAD_TARGET_MONO ::\n   *     Strong hinting algorithm that should only be used for monochrome\n   *     output.  The result is probably unpleasant if the glyph is rendered\n   *     in non-monochrome modes.\n   *\n   *   FT_LOAD_TARGET_LCD ::\n   *     A variant of @FT_LOAD_TARGET_NORMAL optimized for horizontally\n   *     decimated LCD displays.\n   *\n   *   FT_LOAD_TARGET_LCD_V ::\n   *     A variant of @FT_LOAD_TARGET_NORMAL optimized for vertically\n   *     decimated LCD displays.\n   *\n   * @note:\n   *   You should use only _one_ of the FT_LOAD_TARGET_XXX values in your\n   *   `load_flags'.  They can't be ORed.\n   *\n   *   If @FT_LOAD_RENDER is also set, the glyph is rendered in the\n   *   corresponding mode (i.e., the mode which matches the used algorithm\n   *   best) unless @FT_LOAD_MONOCHROME is set.\n   *\n   *   You can use a hinting algorithm that doesn't correspond to the same\n   *   rendering mode.  As an example, it is possible to use the `light'\n   *   hinting algorithm and have the results rendered in horizontal LCD\n   *   pixel mode, with code like\n   *\n   *     {\n   *       FT_Load_Glyph( face, glyph_index,\n   *                      load_flags | FT_LOAD_TARGET_LIGHT );\n   *\n   *       FT_Render_Glyph( face->glyph, FT_RENDER_MODE_LCD );\n   *     }\n   *\n   */\n#define FT_LOAD_TARGET_( x )   ( (FT_Int32)( (x) & 15 ) << 16 )\n\n#define FT_LOAD_TARGET_NORMAL  FT_LOAD_TARGET_( FT_RENDER_MODE_NORMAL )\n#define FT_LOAD_TARGET_LIGHT   FT_LOAD_TARGET_( FT_RENDER_MODE_LIGHT  )\n#define FT_LOAD_TARGET_MONO    FT_LOAD_TARGET_( FT_RENDER_MODE_MONO   )\n#define FT_LOAD_TARGET_LCD     FT_LOAD_TARGET_( FT_RENDER_MODE_LCD    )\n#define FT_LOAD_TARGET_LCD_V   FT_LOAD_TARGET_( FT_RENDER_MODE_LCD_V  )\n\n\n  /**************************************************************************\n   *\n   * @macro:\n   *   FT_LOAD_TARGET_MODE\n   *\n   * @description:\n   *   Return the @FT_Render_Mode corresponding to a given\n   *   @FT_LOAD_TARGET_XXX value.\n   *\n   */\n#define FT_LOAD_TARGET_MODE( x )  ( (FT_Render_Mode)( ( (x) >> 16 ) & 15 ) )\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Set_Transform                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function used to set the transformation that is applied to glyph */\n  /*    images when they are loaded into a glyph slot through              */\n  /*    @FT_Load_Glyph.                                                    */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face   :: A handle to the source face object.                      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    matrix :: A pointer to the transformation's 2x2 matrix.  Use~0 for */\n  /*              the identity matrix.                                     */\n  /*    delta  :: A pointer to the translation vector.  Use~0 for the null */\n  /*              vector.                                                  */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The transformation is only applied to scalable image formats after */\n  /*    the glyph has been loaded.  It means that hinting is unaltered by  */\n  /*    the transformation and is performed on the character size given in */\n  /*    the last call to @FT_Set_Char_Size or @FT_Set_Pixel_Sizes.         */\n  /*                                                                       */\n  /*    Note that this also transforms the `face.glyph.advance' field, but */\n  /*    *not* the values in `face.glyph.metrics'.                          */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_Set_Transform( FT_Face     face,\n                    FT_Matrix*  matrix,\n                    FT_Vector*  delta );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    FT_Render_Mode                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    An enumeration type that lists the render modes supported by       */\n  /*    FreeType~2.  Each mode corresponds to a specific type of scanline  */\n  /*    conversion performed on the outline.                               */\n  /*                                                                       */\n  /*    For bitmap fonts and embedded bitmaps the `bitmap->pixel_mode'     */\n  /*    field in the @FT_GlyphSlotRec structure gives the format of the    */\n  /*    returned bitmap.                                                   */\n  /*                                                                       */\n  /*    All modes except @FT_RENDER_MODE_MONO use 256 levels of opacity.   */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    FT_RENDER_MODE_NORMAL ::                                           */\n  /*      This is the default render mode; it corresponds to 8-bit         */\n  /*      anti-aliased bitmaps.                                            */\n  /*                                                                       */\n  /*    FT_RENDER_MODE_LIGHT ::                                            */\n  /*      This is equivalent to @FT_RENDER_MODE_NORMAL.  It is only        */\n  /*      defined as a separate value because render modes are also used   */\n  /*      indirectly to define hinting algorithm selectors.  See           */\n  /*      @FT_LOAD_TARGET_XXX for details.                                 */\n  /*                                                                       */\n  /*    FT_RENDER_MODE_MONO ::                                             */\n  /*      This mode corresponds to 1-bit bitmaps (with 2~levels of         */\n  /*      opacity).                                                        */\n  /*                                                                       */\n  /*    FT_RENDER_MODE_LCD ::                                              */\n  /*      This mode corresponds to horizontal RGB and BGR sub-pixel        */\n  /*      displays like LCD screens.  It produces 8-bit bitmaps that are   */\n  /*      3~times the width of the original glyph outline in pixels, and   */\n  /*      which use the @FT_PIXEL_MODE_LCD mode.                           */\n  /*                                                                       */\n  /*    FT_RENDER_MODE_LCD_V ::                                            */\n  /*      This mode corresponds to vertical RGB and BGR sub-pixel displays */\n  /*      (like PDA screens, rotated LCD displays, etc.).  It produces     */\n  /*      8-bit bitmaps that are 3~times the height of the original        */\n  /*      glyph outline in pixels and use the @FT_PIXEL_MODE_LCD_V mode.   */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The LCD-optimized glyph bitmaps produced by FT_Render_Glyph can be */\n  /*    filtered to reduce color-fringes by using @FT_Library_SetLcdFilter */\n  /*    (not active in the default builds).  It is up to the caller to     */\n  /*    either call @FT_Library_SetLcdFilter (if available) or do the      */\n  /*    filtering itself.                                                  */\n  /*                                                                       */\n  /*    The selected render mode only affects vector glyphs of a font.     */\n  /*    Embedded bitmaps often have a different pixel mode like            */\n  /*    @FT_PIXEL_MODE_MONO.  You can use @FT_Bitmap_Convert to transform  */\n  /*    them into 8-bit pixmaps.                                           */\n  /*                                                                       */\n  typedef enum  FT_Render_Mode_\n  {\n    FT_RENDER_MODE_NORMAL = 0,\n    FT_RENDER_MODE_LIGHT,\n    FT_RENDER_MODE_MONO,\n    FT_RENDER_MODE_LCD,\n    FT_RENDER_MODE_LCD_V,\n\n    FT_RENDER_MODE_MAX\n\n  } FT_Render_Mode;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    ft_render_mode_xxx                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    These constants are deprecated.  Use the corresponding             */\n  /*    @FT_Render_Mode values instead.                                    */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    ft_render_mode_normal :: see @FT_RENDER_MODE_NORMAL                */\n  /*    ft_render_mode_mono   :: see @FT_RENDER_MODE_MONO                  */\n  /*                                                                       */\n#define ft_render_mode_normal  FT_RENDER_MODE_NORMAL\n#define ft_render_mode_mono    FT_RENDER_MODE_MONO\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Render_Glyph                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Convert a given glyph image to a bitmap.  It does so by inspecting */\n  /*    the glyph image format, finding the relevant renderer, and         */\n  /*    invoking it.                                                       */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    slot        :: A handle to the glyph slot containing the image to  */\n  /*                   convert.                                            */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    render_mode :: This is the render mode used to render the glyph    */\n  /*                   image into a bitmap.  See @FT_Render_Mode for a     */\n  /*                   list of possible values.                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Render_Glyph( FT_GlyphSlot    slot,\n                   FT_Render_Mode  render_mode );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    FT_Kerning_Mode                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    An enumeration used to specify which kerning values to return in   */\n  /*    @FT_Get_Kerning.                                                   */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    FT_KERNING_DEFAULT  :: Return scaled and grid-fitted kerning       */\n  /*                           distances (value is~0).                     */\n  /*                                                                       */\n  /*    FT_KERNING_UNFITTED :: Return scaled but un-grid-fitted kerning    */\n  /*                           distances.                                  */\n  /*                                                                       */\n  /*    FT_KERNING_UNSCALED :: Return the kerning vector in original font  */\n  /*                           units.                                      */\n  /*                                                                       */\n  typedef enum  FT_Kerning_Mode_\n  {\n    FT_KERNING_DEFAULT  = 0,\n    FT_KERNING_UNFITTED,\n    FT_KERNING_UNSCALED\n\n  } FT_Kerning_Mode;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Const>                                                               */\n  /*    ft_kerning_default                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This constant is deprecated.  Please use @FT_KERNING_DEFAULT       */\n  /*    instead.                                                           */\n  /*                                                                       */\n#define ft_kerning_default   FT_KERNING_DEFAULT\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Const>                                                               */\n  /*    ft_kerning_unfitted                                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This constant is deprecated.  Please use @FT_KERNING_UNFITTED      */\n  /*    instead.                                                           */\n  /*                                                                       */\n#define ft_kerning_unfitted  FT_KERNING_UNFITTED\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Const>                                                               */\n  /*    ft_kerning_unscaled                                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This constant is deprecated.  Please use @FT_KERNING_UNSCALED      */\n  /*    instead.                                                           */\n  /*                                                                       */\n#define ft_kerning_unscaled  FT_KERNING_UNSCALED\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Kerning                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return the kerning vector between two glyphs of a same face.       */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face        :: A handle to a source face object.                   */\n  /*                                                                       */\n  /*    left_glyph  :: The index of the left glyph in the kern pair.       */\n  /*                                                                       */\n  /*    right_glyph :: The index of the right glyph in the kern pair.      */\n  /*                                                                       */\n  /*    kern_mode   :: See @FT_Kerning_Mode for more information.          */\n  /*                   Determines the scale and dimension of the returned  */\n  /*                   kerning vector.                                     */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    akerning    :: The kerning vector.  This is either in font units   */\n  /*                   or in pixels (26.6 format) for scalable formats,    */\n  /*                   and in pixels for fixed-sizes formats.              */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Only horizontal layouts (left-to-right & right-to-left) are        */\n  /*    supported by this method.  Other layouts, or more sophisticated    */\n  /*    kernings, are out of the scope of this API function -- they can be */\n  /*    implemented through format-specific interfaces.                    */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Get_Kerning( FT_Face     face,\n                  FT_UInt     left_glyph,\n                  FT_UInt     right_glyph,\n                  FT_UInt     kern_mode,\n                  FT_Vector  *akerning );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Track_Kerning                                               */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return the track kerning for a given face object at a given size.  */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face       :: A handle to a source face object.                    */\n  /*                                                                       */\n  /*    point_size :: The point size in 16.16 fractional points.           */\n  /*                                                                       */\n  /*    degree     :: The degree of tightness.                             */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    akerning   :: The kerning in 16.16 fractional points.              */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Get_Track_Kerning( FT_Face    face,\n                        FT_Fixed   point_size,\n                        FT_Int     degree,\n                        FT_Fixed*  akerning );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Glyph_Name                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Retrieve the ASCII name of a given glyph in a face.  This only     */\n  /*    works for those faces where @FT_HAS_GLYPH_NAMES(face) returns~1.   */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face        :: A handle to a source face object.                   */\n  /*                                                                       */\n  /*    glyph_index :: The glyph index.                                    */\n  /*                                                                       */\n  /*    buffer_max  :: The maximal number of bytes available in the        */\n  /*                   buffer.                                             */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    buffer      :: A pointer to a target buffer where the name is      */\n  /*                   copied to.                                          */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    An error is returned if the face doesn't provide glyph names or if */\n  /*    the glyph index is invalid.  In all cases of failure, the first    */\n  /*    byte of `buffer' is set to~0 to indicate an empty name.            */\n  /*                                                                       */\n  /*    The glyph name is truncated to fit within the buffer if it is too  */\n  /*    long.  The returned string is always zero-terminated.              */\n  /*                                                                       */\n  /*    This function is not compiled within the library if the config     */\n  /*    macro `FT_CONFIG_OPTION_NO_GLYPH_NAMES' is defined in              */\n  /*    `include/freetype/config/ftoptions.h'.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Get_Glyph_Name( FT_Face     face,\n                     FT_UInt     glyph_index,\n                     FT_Pointer  buffer,\n                     FT_UInt     buffer_max );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Postscript_Name                                             */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Retrieve the ASCII PostScript name of a given face, if available.  */\n  /*    This only works with PostScript and TrueType fonts.                */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face :: A handle to the source face object.                        */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    A pointer to the face's PostScript name.  NULL if unavailable.     */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The returned pointer is owned by the face and is destroyed with    */\n  /*    it.                                                                */\n  /*                                                                       */\n  FT_EXPORT( const char* )\n  FT_Get_Postscript_Name( FT_Face  face );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Select_Charmap                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Select a given charmap by its encoding tag (as listed in           */\n  /*    `freetype.h').                                                     */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face     :: A handle to the source face object.                    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    encoding :: A handle to the selected encoding.                     */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This function returns an error if no charmap in the face           */\n  /*    corresponds to the encoding queried here.                          */\n  /*                                                                       */\n  /*    Because many fonts contain more than a single cmap for Unicode     */\n  /*    encoding, this function has some special code to select the one    */\n  /*    which covers Unicode best (`best' in the sense that a UCS-4 cmap   */\n  /*    is preferred to a UCS-2 cmap).  It is thus preferable to           */\n  /*    @FT_Set_Charmap in this case.                                      */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Select_Charmap( FT_Face      face,\n                     FT_Encoding  encoding );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Set_Charmap                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Select a given charmap for character code to glyph index mapping.  */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face    :: A handle to the source face object.                     */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    charmap :: A handle to the selected charmap.                       */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This function returns an error if the charmap is not part of       */\n  /*    the face (i.e., if it is not listed in the `face->charmaps'        */\n  /*    table).                                                            */\n  /*                                                                       */\n  /*    It also fails if a type~14 charmap is selected.                    */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Set_Charmap( FT_Face     face,\n                  FT_CharMap  charmap );\n\n\n  /*************************************************************************\n   *\n   * @function:\n   *   FT_Get_Charmap_Index\n   *\n   * @description:\n   *   Retrieve index of a given charmap.\n   *\n   * @input:\n   *   charmap ::\n   *     A handle to a charmap.\n   *\n   * @return:\n   *   The index into the array of character maps within the face to which\n   *   `charmap' belongs.\n   *\n   */\n  FT_EXPORT( FT_Int )\n  FT_Get_Charmap_Index( FT_CharMap  charmap );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Char_Index                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return the glyph index of a given character code.  This function   */\n  /*    uses a charmap object to do the mapping.                           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face     :: A handle to the source face object.                    */\n  /*                                                                       */\n  /*    charcode :: The character code.                                    */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The glyph index.  0~means `undefined character code'.              */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    If you use FreeType to manipulate the contents of font files       */\n  /*    directly, be aware that the glyph index returned by this function  */\n  /*    doesn't always correspond to the internal indices used within      */\n  /*    the file.  This is done to ensure that value~0 always corresponds  */\n  /*    to the `missing glyph'.                                            */\n  /*                                                                       */\n  FT_EXPORT( FT_UInt )\n  FT_Get_Char_Index( FT_Face   face,\n                     FT_ULong  charcode );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_First_Char                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This function is used to return the first character code in the    */\n  /*    current charmap of a given face.  It also returns the              */\n  /*    corresponding glyph index.                                         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face    :: A handle to the source face object.                     */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    agindex :: Glyph index of first character code.  0~if charmap is   */\n  /*               empty.                                                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The charmap's first character code.                                */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    You should use this function with @FT_Get_Next_Char to be able to  */\n  /*    parse all character codes available in a given charmap.  The code  */\n  /*    should look like this:                                             */\n  /*                                                                       */\n  /*    {                                                                  */\n  /*      FT_ULong  charcode;                                              */\n  /*      FT_UInt   gindex;                                                */\n  /*                                                                       */\n  /*                                                                       */\n  /*      charcode = FT_Get_First_Char( face, &gindex );                   */\n  /*      while ( gindex != 0 )                                            */\n  /*      {                                                                */\n  /*        ... do something with (charcode,gindex) pair ...               */\n  /*                                                                       */\n  /*        charcode = FT_Get_Next_Char( face, charcode, &gindex );        */\n  /*      }                                                                */\n  /*    }                                                                  */\n  /*                                                                       */\n  /*    Note that `*agindex' is set to~0 if the charmap is empty.  The     */\n  /*    result itself can be~0 in two cases: if the charmap is empty or    */\n  /*    if the value~0 is the first valid character code.                  */\n  /*                                                                       */\n  FT_EXPORT( FT_ULong )\n  FT_Get_First_Char( FT_Face   face,\n                     FT_UInt  *agindex );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Next_Char                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This function is used to return the next character code in the     */\n  /*    current charmap of a given face following the value `char_code',   */\n  /*    as well as the corresponding glyph index.                          */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face      :: A handle to the source face object.                   */\n  /*    char_code :: The starting character code.                          */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    agindex   :: Glyph index of next character code.  0~if charmap     */\n  /*                 is empty.                                             */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The charmap's next character code.                                 */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    You should use this function with @FT_Get_First_Char to walk       */\n  /*    over all character codes available in a given charmap.  See the    */\n  /*    note for this function for a simple code example.                  */\n  /*                                                                       */\n  /*    Note that `*agindex' is set to~0 when there are no more codes in   */\n  /*    the charmap.                                                       */\n  /*                                                                       */\n  FT_EXPORT( FT_ULong )\n  FT_Get_Next_Char( FT_Face    face,\n                    FT_ULong   char_code,\n                    FT_UInt   *agindex );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Name_Index                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return the glyph index of a given glyph name.  This function uses  */\n  /*    driver specific objects to do the translation.                     */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face       :: A handle to the source face object.                  */\n  /*                                                                       */\n  /*    glyph_name :: The glyph name.                                      */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The glyph index.  0~means `undefined character code'.              */\n  /*                                                                       */\n  FT_EXPORT( FT_UInt )\n  FT_Get_Name_Index( FT_Face     face,\n                     FT_String*  glyph_name );\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_SUBGLYPH_FLAG_XXX\n   *\n   * @description:\n   *   A list of constants used to describe subglyphs.  Please refer to the\n   *   TrueType specification for the meaning of the various flags.\n   *\n   * @values:\n   *   FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS ::\n   *   FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES ::\n   *   FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID ::\n   *   FT_SUBGLYPH_FLAG_SCALE ::\n   *   FT_SUBGLYPH_FLAG_XY_SCALE ::\n   *   FT_SUBGLYPH_FLAG_2X2 ::\n   *   FT_SUBGLYPH_FLAG_USE_MY_METRICS ::\n   *\n   */\n#define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS          1\n#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES      2\n#define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID        4\n#define FT_SUBGLYPH_FLAG_SCALE                   8\n#define FT_SUBGLYPH_FLAG_XY_SCALE             0x40\n#define FT_SUBGLYPH_FLAG_2X2                  0x80\n#define FT_SUBGLYPH_FLAG_USE_MY_METRICS      0x200\n\n\n  /*************************************************************************\n   *\n   * @func:\n   *   FT_Get_SubGlyph_Info\n   *\n   * @description:\n   *   Retrieve a description of a given subglyph.  Only use it if\n   *   `glyph->format' is @FT_GLYPH_FORMAT_COMPOSITE; an error is\n   *   returned otherwise.\n   *\n   * @input:\n   *   glyph ::\n   *     The source glyph slot.\n   *\n   *   sub_index ::\n   *     The index of the subglyph.  Must be less than\n   *     `glyph->num_subglyphs'.\n   *\n   * @output:\n   *   p_index ::\n   *     The glyph index of the subglyph.\n   *\n   *   p_flags ::\n   *     The subglyph flags, see @FT_SUBGLYPH_FLAG_XXX.\n   *\n   *   p_arg1 ::\n   *     The subglyph's first argument (if any).\n   *\n   *   p_arg2 ::\n   *     The subglyph's second argument (if any).\n   *\n   *   p_transform ::\n   *     The subglyph transformation (if any).\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   The values of `*p_arg1', `*p_arg2', and `*p_transform' must be\n   *   interpreted depending on the flags returned in `*p_flags'.  See the\n   *   TrueType specification for details.\n   *\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_SubGlyph_Info( FT_GlyphSlot  glyph,\n                        FT_UInt       sub_index,\n                        FT_Int       *p_index,\n                        FT_UInt      *p_flags,\n                        FT_Int       *p_arg1,\n                        FT_Int       *p_arg2,\n                        FT_Matrix    *p_transform );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    FT_FSTYPE_XXX                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A list of bit flags used in the `fsType' field of the OS/2 table   */\n  /*    in a TrueType or OpenType font and the `FSType' entry in a         */\n  /*    PostScript font.  These bit flags are returned by                  */\n  /*    @FT_Get_FSType_Flags; they inform client applications of embedding */\n  /*    and subsetting restrictions associated with a font.                */\n  /*                                                                       */\n  /*    See http://www.adobe.com/devnet/acrobat/pdfs/FontPolicies.pdf for  */\n  /*    more details.                                                      */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    FT_FSTYPE_INSTALLABLE_EMBEDDING ::                                 */\n  /*      Fonts with no fsType bit set may be embedded and permanently     */\n  /*      installed on the remote system by an application.                */\n  /*                                                                       */\n  /*    FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING ::                          */\n  /*      Fonts that have only this bit set must not be modified, embedded */\n  /*      or exchanged in any manner without first obtaining permission of */\n  /*      the font software copyright owner.                               */\n  /*                                                                       */\n  /*    FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING ::                           */\n  /*      If this bit is set, the font may be embedded and temporarily     */\n  /*      loaded on the remote system.  Documents containing Preview &     */\n  /*      Print fonts must be opened `read-only'; no edits can be applied  */\n  /*      to the document.                                                 */\n  /*                                                                       */\n  /*    FT_FSTYPE_EDITABLE_EMBEDDING ::                                    */\n  /*      If this bit is set, the font may be embedded but must only be    */\n  /*      installed temporarily on other systems.  In contrast to Preview  */\n  /*      & Print fonts, documents containing editable fonts may be opened */\n  /*      for reading, editing is permitted, and changes may be saved.     */\n  /*                                                                       */\n  /*    FT_FSTYPE_NO_SUBSETTING ::                                         */\n  /*      If this bit is set, the font may not be subsetted prior to       */\n  /*      embedding.                                                       */\n  /*                                                                       */\n  /*    FT_FSTYPE_BITMAP_EMBEDDING_ONLY ::                                 */\n  /*      If this bit is set, only bitmaps contained in the font may be    */\n  /*      embedded; no outline data may be embedded.  If there are no      */\n  /*      bitmaps available in the font, then the font is unembeddable.    */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    While the fsType flags can indicate that a font may be embedded, a */\n  /*    license with the font vendor may be separately required to use the */\n  /*    font in this way.                                                  */\n  /*                                                                       */\n#define FT_FSTYPE_INSTALLABLE_EMBEDDING         0x0000\n#define FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING  0x0002\n#define FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING   0x0004\n#define FT_FSTYPE_EDITABLE_EMBEDDING            0x0008\n#define FT_FSTYPE_NO_SUBSETTING                 0x0100\n#define FT_FSTYPE_BITMAP_EMBEDDING_ONLY         0x0200\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_FSType_Flags                                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return the fsType flags for a font.                                */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face :: A handle to the source face object.                        */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The fsType flags, @FT_FSTYPE_XXX.                                  */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Use this function rather than directly reading the `fs_type' field */\n  /*    in the @PS_FontInfoRec structure which is only guaranteed to       */\n  /*    return the correct results for Type~1 fonts.                       */\n  /*                                                                       */\n  FT_EXPORT( FT_UShort )\n  FT_Get_FSType_Flags( FT_Face  face );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    glyph_variants                                                     */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    Glyph Variants                                                     */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    The FreeType~2 interface to Unicode Ideographic Variation          */\n  /*    Sequences (IVS), using the SFNT cmap format~14.                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Many CJK characters have variant forms.  They are a sort of grey   */\n  /*    area somewhere between being totally irrelevant and semantically   */\n  /*    distinct; for this reason, the Unicode consortium decided to       */\n  /*    introduce Ideographic Variation Sequences (IVS), consisting of a   */\n  /*    Unicode base character and one of 240 variant selectors            */\n  /*    (U+E0100-U+E01EF), instead of further extending the already huge   */\n  /*    code range for CJK characters.                                     */\n  /*                                                                       */\n  /*    An IVS is registered and unique; for further details please refer  */\n  /*    to Unicode Technical Report #37, the Ideographic Variation         */\n  /*    Database.  To date (October 2007), the character with the most     */\n  /*    variants is U+908A, having 8~such IVS.                             */\n  /*                                                                       */\n  /*    Adobe and MS decided to support IVS with a new cmap subtable       */\n  /*    (format~14).  It is an odd subtable because it is not a mapping of */\n  /*    input code points to glyphs, but contains lists of all variants    */\n  /*    supported by the font.                                             */\n  /*                                                                       */\n  /*    A variant may be either `default' or `non-default'.  A default     */\n  /*    variant is the one you will get for that code point if you look it */\n  /*    up in the standard Unicode cmap.  A non-default variant is a       */\n  /*    different glyph.                                                   */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Face_GetCharVariantIndex                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return the glyph index of a given character code as modified by    */\n  /*    the variation selector.                                            */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face ::                                                            */\n  /*      A handle to the source face object.                              */\n  /*                                                                       */\n  /*    charcode ::                                                        */\n  /*      The character code point in Unicode.                             */\n  /*                                                                       */\n  /*    variantSelector ::                                                 */\n  /*      The Unicode code point of the variation selector.                */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The glyph index.  0~means either `undefined character code', or    */\n  /*    `undefined selector code', or `no variation selector cmap          */\n  /*    subtable', or `current CharMap is not Unicode'.                    */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    If you use FreeType to manipulate the contents of font files       */\n  /*    directly, be aware that the glyph index returned by this function  */\n  /*    doesn't always correspond to the internal indices used within      */\n  /*    the file.  This is done to ensure that value~0 always corresponds  */\n  /*    to the `missing glyph'.                                            */\n  /*                                                                       */\n  /*    This function is only meaningful if                                */\n  /*      a) the font has a variation selector cmap sub table,             */\n  /*    and                                                                */\n  /*      b) the current charmap has a Unicode encoding.                   */\n  /*                                                                       */\n  /* <Since>                                                               */\n  /*    2.3.6                                                              */\n  /*                                                                       */\n  FT_EXPORT( FT_UInt )\n  FT_Face_GetCharVariantIndex( FT_Face   face,\n                               FT_ULong  charcode,\n                               FT_ULong  variantSelector );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Face_GetCharVariantIsDefault                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Check whether this variant of this Unicode character is the one to */\n  /*    be found in the `cmap'.                                            */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face ::                                                            */\n  /*      A handle to the source face object.                              */\n  /*                                                                       */\n  /*    charcode ::                                                        */\n  /*      The character codepoint in Unicode.                              */\n  /*                                                                       */\n  /*    variantSelector ::                                                 */\n  /*      The Unicode codepoint of the variation selector.                 */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    1~if found in the standard (Unicode) cmap, 0~if found in the       */\n  /*    variation selector cmap, or -1 if it is not a variant.             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This function is only meaningful if the font has a variation       */\n  /*    selector cmap subtable.                                            */\n  /*                                                                       */\n  /* <Since>                                                               */\n  /*    2.3.6                                                              */\n  /*                                                                       */\n  FT_EXPORT( FT_Int )\n  FT_Face_GetCharVariantIsDefault( FT_Face   face,\n                                   FT_ULong  charcode,\n                                   FT_ULong  variantSelector );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Face_GetVariantSelectors                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return a zero-terminated list of Unicode variant selectors found   */\n  /*    in the font.                                                       */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face ::                                                            */\n  /*      A handle to the source face object.                              */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    A pointer to an array of selector code points, or NULL if there is */\n  /*    no valid variant selector cmap subtable.                           */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The last item in the array is~0; the array is owned by the         */\n  /*    @FT_Face object but can be overwritten or released on the next     */\n  /*    call to a FreeType function.                                       */\n  /*                                                                       */\n  /* <Since>                                                               */\n  /*    2.3.6                                                              */\n  /*                                                                       */\n  FT_EXPORT( FT_UInt32* )\n  FT_Face_GetVariantSelectors( FT_Face  face );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Face_GetVariantsOfChar                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return a zero-terminated list of Unicode variant selectors found   */\n  /*    for the specified character code.                                  */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face ::                                                            */\n  /*      A handle to the source face object.                              */\n  /*                                                                       */\n  /*    charcode ::                                                        */\n  /*      The character codepoint in Unicode.                              */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    A pointer to an array of variant selector code points which are    */\n  /*    active for the given character, or NULL if the corresponding list  */\n  /*    is empty.                                                          */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The last item in the array is~0; the array is owned by the         */\n  /*    @FT_Face object but can be overwritten or released on the next     */\n  /*    call to a FreeType function.                                       */\n  /*                                                                       */\n  /* <Since>                                                               */\n  /*    2.3.6                                                              */\n  /*                                                                       */\n  FT_EXPORT( FT_UInt32* )\n  FT_Face_GetVariantsOfChar( FT_Face   face,\n                             FT_ULong  charcode );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Face_GetCharsOfVariant                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return a zero-terminated list of Unicode character codes found for */\n  /*    the specified variant selector.                                    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face ::                                                            */\n  /*      A handle to the source face object.                              */\n  /*                                                                       */\n  /*    variantSelector ::                                                 */\n  /*      The variant selector code point in Unicode.                      */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    A list of all the code points which are specified by this selector */\n  /*    (both default and non-default codes are returned) or NULL if there */\n  /*    is no valid cmap or the variant selector is invalid.               */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The last item in the array is~0; the array is owned by the         */\n  /*    @FT_Face object but can be overwritten or released on the next     */\n  /*    call to a FreeType function.                                       */\n  /*                                                                       */\n  /* <Since>                                                               */\n  /*    2.3.6                                                              */\n  /*                                                                       */\n  FT_EXPORT( FT_UInt32* )\n  FT_Face_GetCharsOfVariant( FT_Face   face,\n                             FT_ULong  variantSelector );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    computations                                                       */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    Computations                                                       */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    Crunching fixed numbers and vectors.                               */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains various functions used to perform            */\n  /*    computations on 16.16 fixed-float numbers or 2d vectors.           */\n  /*                                                                       */\n  /* <Order>                                                               */\n  /*    FT_MulDiv                                                          */\n  /*    FT_MulFix                                                          */\n  /*    FT_DivFix                                                          */\n  /*    FT_RoundFix                                                        */\n  /*    FT_CeilFix                                                         */\n  /*    FT_FloorFix                                                        */\n  /*    FT_Vector_Transform                                                */\n  /*    FT_Matrix_Multiply                                                 */\n  /*    FT_Matrix_Invert                                                   */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_MulDiv                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A very simple function used to perform the computation `(a*b)/c'   */\n  /*    with maximal accuracy (it uses a 64-bit intermediate integer       */\n  /*    whenever necessary).                                               */\n  /*                                                                       */\n  /*    This function isn't necessarily as fast as some processor specific */\n  /*    operations, but is at least completely portable.                   */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    a :: The first multiplier.                                         */\n  /*    b :: The second multiplier.                                        */\n  /*    c :: The divisor.                                                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The result of `(a*b)/c'.  This function never traps when trying to */\n  /*    divide by zero; it simply returns `MaxInt' or `MinInt' depending   */\n  /*    on the signs of `a' and `b'.                                       */\n  /*                                                                       */\n  FT_EXPORT( FT_Long )\n  FT_MulDiv( FT_Long  a,\n             FT_Long  b,\n             FT_Long  c );\n\n\n  /* */\n\n  /* The following #if 0 ... #endif is for the documentation formatter, */\n  /* hiding the internal `FT_MULFIX_INLINED' macro.                     */\n\n#if 0\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_MulFix                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A very simple function used to perform the computation             */\n  /*    `(a*b)/0x10000' with maximal accuracy.  Most of the time this is   */\n  /*    used to multiply a given value by a 16.16 fixed float factor.      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    a :: The first multiplier.                                         */\n  /*    b :: The second multiplier.  Use a 16.16 factor here whenever      */\n  /*         possible (see note below).                                    */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The result of `(a*b)/0x10000'.                                     */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This function has been optimized for the case where the absolute   */\n  /*    value of `a' is less than 2048, and `b' is a 16.16 scaling factor. */\n  /*    As this happens mainly when scaling from notional units to         */\n  /*    fractional pixels in FreeType, it resulted in noticeable speed     */\n  /*    improvements between versions 2.x and 1.x.                         */\n  /*                                                                       */\n  /*    As a conclusion, always try to place a 16.16 factor as the         */\n  /*    _second_ argument of this function; this can make a great          */\n  /*    difference.                                                        */\n  /*                                                                       */\n  FT_EXPORT( FT_Long )\n  FT_MulFix( FT_Long  a,\n             FT_Long  b );\n\n  /* */\n#endif\n\n#ifdef FT_MULFIX_INLINED\n#define FT_MulFix( a, b )  FT_MULFIX_INLINED( a, b )\n#else\n  FT_EXPORT( FT_Long )\n  FT_MulFix( FT_Long  a,\n             FT_Long  b );\n#endif\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_DivFix                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A very simple function used to perform the computation             */\n  /*    `(a*0x10000)/b' with maximal accuracy.  Most of the time, this is  */\n  /*    used to divide a given value by a 16.16 fixed float factor.        */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    a :: The first multiplier.                                         */\n  /*    b :: The second multiplier.  Use a 16.16 factor here whenever      */\n  /*         possible (see note below).                                    */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The result of `(a*0x10000)/b'.                                     */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The optimization for FT_DivFix() is simple: If (a~<<~16) fits in   */\n  /*    32~bits, then the division is computed directly.  Otherwise, we    */\n  /*    use a specialized version of @FT_MulDiv.                           */\n  /*                                                                       */\n  FT_EXPORT( FT_Long )\n  FT_DivFix( FT_Long  a,\n             FT_Long  b );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_RoundFix                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A very simple function used to round a 16.16 fixed number.         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    a :: The number to be rounded.                                     */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The result of `(a + 0x8000) & -0x10000'.                           */\n  /*                                                                       */\n  FT_EXPORT( FT_Fixed )\n  FT_RoundFix( FT_Fixed  a );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_CeilFix                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A very simple function used to compute the ceiling function of a   */\n  /*    16.16 fixed number.                                                */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    a :: The number for which the ceiling function is to be computed.  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The result of `(a + 0x10000 - 1) & -0x10000'.                      */\n  /*                                                                       */\n  FT_EXPORT( FT_Fixed )\n  FT_CeilFix( FT_Fixed  a );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_FloorFix                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A very simple function used to compute the floor function of a     */\n  /*    16.16 fixed number.                                                */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    a :: The number for which the floor function is to be computed.    */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The result of `a & -0x10000'.                                      */\n  /*                                                                       */\n  FT_EXPORT( FT_Fixed )\n  FT_FloorFix( FT_Fixed  a );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Vector_Transform                                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Transform a single vector through a 2x2 matrix.                    */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    vector :: The target vector to transform.                          */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    matrix :: A pointer to the source 2x2 matrix.                      */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The result is undefined if either `vector' or `matrix' is invalid. */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_Vector_Transform( FT_Vector*        vec,\n                       const FT_Matrix*  matrix );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    version                                                            */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    FreeType Version                                                   */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    Functions and macros related to FreeType versions.                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Note that those functions and macros are of limited use because    */\n  /*    even a new release of FreeType with only documentation changes     */\n  /*    increases the version number.                                      */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************\n   *\n   * @enum:\n   *   FREETYPE_XXX\n   *\n   * @description:\n   *   These three macros identify the FreeType source code version.\n   *   Use @FT_Library_Version to access them at runtime.\n   *\n   * @values:\n   *   FREETYPE_MAJOR :: The major version number.\n   *   FREETYPE_MINOR :: The minor version number.\n   *   FREETYPE_PATCH :: The patch level.\n   *\n   * @note:\n   *   The version number of FreeType if built as a dynamic link library\n   *   with the `libtool' package is _not_ controlled by these three\n   *   macros.\n   *\n   */\n#define FREETYPE_MAJOR  2\n#define FREETYPE_MINOR  3\n#define FREETYPE_PATCH  11\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Library_Version                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return the version of the FreeType library being used.  This is    */\n  /*    useful when dynamically linking to the library, since one cannot   */\n  /*    use the macros @FREETYPE_MAJOR, @FREETYPE_MINOR, and               */\n  /*    @FREETYPE_PATCH.                                                   */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library :: A source library handle.                                */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    amajor  :: The major version number.                               */\n  /*                                                                       */\n  /*    aminor  :: The minor version number.                               */\n  /*                                                                       */\n  /*    apatch  :: The patch version number.                               */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The reason why this function takes a `library' argument is because */\n  /*    certain programs implement library initialization in a custom way  */\n  /*    that doesn't use @FT_Init_FreeType.                                */\n  /*                                                                       */\n  /*    In such cases, the library version might not be available before   */\n  /*    the library object has been created.                               */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_Library_Version( FT_Library   library,\n                      FT_Int      *amajor,\n                      FT_Int      *aminor,\n                      FT_Int      *apatch );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Face_CheckTrueTypePatents                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Parse all bytecode instructions of a TrueType font file to check   */\n  /*    whether any of the patented opcodes are used.  This is only useful */\n  /*    if you want to be able to use the unpatented hinter with           */\n  /*    fonts that do *not* use these opcodes.                             */\n  /*                                                                       */\n  /*    Note that this function parses *all* glyph instructions in the     */\n  /*    font file, which may be slow.                                      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face :: A face handle.                                             */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    1~if this is a TrueType font that uses one of the patented         */\n  /*    opcodes, 0~otherwise.                                              */\n  /*                                                                       */\n  /* <Since>                                                               */\n  /*    2.3.5                                                              */\n  /*                                                                       */\n  FT_EXPORT( FT_Bool )\n  FT_Face_CheckTrueTypePatents( FT_Face  face );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Face_SetUnpatentedHinting                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Enable or disable the unpatented hinter for a given face.          */\n  /*    Only enable it if you have determined that the face doesn't        */\n  /*    use any patented opcodes (see @FT_Face_CheckTrueTypePatents).      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face  :: A face handle.                                            */\n  /*                                                                       */\n  /*    value :: New boolean setting.                                      */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The old setting value.  This will always be false if this is not   */\n  /*    an SFNT font, or if the unpatented hinter is not compiled in this  */\n  /*    instance of the library.                                           */\n  /*                                                                       */\n  /* <Since>                                                               */\n  /*    2.3.5                                                              */\n  /*                                                                       */\n  FT_EXPORT( FT_Bool )\n  FT_Face_SetUnpatentedHinting( FT_Face  face,\n                                FT_Bool  value );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FREETYPE_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ftadvanc.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftadvanc.h                                                             */\n/*                                                                         */\n/*    Quick computation of advance widths (specification only).            */\n/*                                                                         */\n/*  Copyright 2008 by                                                      */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTADVANC_H__\n#define __FTADVANC_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   quick_advance\n   *\n   * @title:\n   *   Quick retrieval of advance values\n   *\n   * @abstract:\n   *   Retrieve horizontal and vertical advance values without processing\n   *   glyph outlines, if possible.\n   *\n   * @description:\n   *   This section contains functions to quickly extract advance values\n   *   without handling glyph outlines, if possible.\n   */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Const>                                                               */\n  /*    FT_ADVANCE_FLAG_FAST_ONLY                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A bit-flag to be OR-ed with the `flags' parameter of the           */\n  /*    @FT_Get_Advance and @FT_Get_Advances functions.                    */\n  /*                                                                       */\n  /*    If set, it indicates that you want these functions to fail if the  */\n  /*    corresponding hinting mode or font driver doesn't allow for very   */\n  /*    quick advance computation.                                         */\n  /*                                                                       */\n  /*    Typically, glyphs which are either unscaled, unhinted, bitmapped,  */\n  /*    or light-hinted can have their advance width computed very         */\n  /*    quickly.                                                           */\n  /*                                                                       */\n  /*    Normal and bytecode hinted modes, which require loading, scaling,  */\n  /*    and hinting of the glyph outline, are extremely slow by            */\n  /*    comparison.                                                        */\n  /*                                                                       */\n#define FT_ADVANCE_FLAG_FAST_ONLY  0x20000000UL\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Advance                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Retrieve the advance value of a given glyph outline in an          */\n  /*    @FT_Face.  By default, the unhinted advance is returned in font    */\n  /*    units.                                                             */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face       :: The source @FT_Face handle.                          */\n  /*                                                                       */\n  /*    gindex     :: The glyph index.                                     */\n  /*                                                                       */\n  /*    load_flags :: A set of bit flags similar to those used when        */\n  /*                  calling @FT_Load_Glyph, used to determine what kind  */\n  /*                  of advances you need.                                */\n  /* <Output>                                                              */\n  /*    padvance :: The advance value, in either font units or 16.16       */\n  /*                format.                                                */\n  /*                                                                       */\n  /*                If @FT_LOAD_VERTICAL_LAYOUT is set, this is the        */\n  /*                vertical advance corresponding to a vertical layout.   */\n  /*                Otherwise, it is the horizontal advance in a           */\n  /*                horizontal layout.                                     */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This function may fail if you use @FT_ADVANCE_FLAG_FAST_ONLY and   */\n  /*    if the corresponding font backend doesn't have a quick way to      */\n  /*    retrieve the advances.                                             */\n  /*                                                                       */\n  /*    A scaled advance is returned in 16.16 format but isn't transformed */\n  /*    by the affine transformation specified by @FT_Set_Transform.       */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Get_Advance( FT_Face    face,\n                  FT_UInt    gindex,\n                  FT_Int32   load_flags,\n                  FT_Fixed  *padvance );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Advances                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Retrieve the advance values of several glyph outlines in an        */\n  /*    @FT_Face.  By default, the unhinted advances are returned in font  */\n  /*    units.                                                             */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face        :: The source @FT_Face handle.                         */\n  /*                                                                       */\n  /*    start       :: The first glyph index.                              */\n  /*                                                                       */\n  /*    count       :: The number of advance values you want to retrieve.  */\n  /*                                                                       */\n  /*    load_flags  :: A set of bit flags similar to those used when       */\n  /*                   calling @FT_Load_Glyph.                             */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    padvance :: The advances, in either font units or 16.16 format.    */\n  /*                This array must contain at least `count' elements.     */\n  /*                                                                       */\n  /*                If @FT_LOAD_VERTICAL_LAYOUT is set, these are the      */\n  /*                vertical advances corresponding to a vertical layout.  */\n  /*                Otherwise, they are the horizontal advances in a       */\n  /*                horizontal layout.                                     */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0 means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This function may fail if you use @FT_ADVANCE_FLAG_FAST_ONLY and   */\n  /*    if the corresponding font backend doesn't have a quick way to      */\n  /*    retrieve the advances.                                             */\n  /*                                                                       */\n  /*    Scaled advances are returned in 16.16 format but aren't            */\n  /*    transformed by the affine transformation specified by              */\n  /*    @FT_Set_Transform.                                                 */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Get_Advances( FT_Face    face,\n                   FT_UInt    start,\n                   FT_UInt    count,\n                   FT_Int32   load_flags,\n                   FT_Fixed  *padvances );\n\n/* */\n\n\nFT_END_HEADER\n\n#endif /* __FTADVANC_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ftbbox.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftbbox.h                                                               */\n/*                                                                         */\n/*    FreeType exact bbox computation (specification).                     */\n/*                                                                         */\n/*  Copyright 1996-2001, 2003, 2007 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This component has a _single_ role: to compute exact outline bounding */\n  /* boxes.                                                                */\n  /*                                                                       */\n  /* It is separated from the rest of the engine for various technical     */\n  /* reasons.  It may well be integrated in `ftoutln' later.               */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#ifndef __FTBBOX_H__\n#define __FTBBOX_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    outline_processing                                                 */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Outline_Get_BBox                                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Compute the exact bounding box of an outline.  This is slower      */\n  /*    than computing the control box.  However, it uses an advanced      */\n  /*    algorithm which returns _very_ quickly when the two boxes          */\n  /*    coincide.  Otherwise, the outline Bézier arcs are traversed to     */\n  /*    extract their extrema.                                             */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    outline :: A pointer to the source outline.                        */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    abbox   :: The outline's exact bounding box.                       */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Outline_Get_BBox( FT_Outline*  outline,\n                       FT_BBox     *abbox );\n\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTBBOX_H__ */\n\n\n/* END */\n\n\n/* Local Variables: */\n/* coding: utf-8    */\n/* End:             */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ftbdf.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftbdf.h                                                                */\n/*                                                                         */\n/*    FreeType API for accessing BDF-specific strings (specification).     */\n/*                                                                         */\n/*  Copyright 2002, 2003, 2004, 2006, 2009 by                              */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTBDF_H__\n#define __FTBDF_H__\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    bdf_fonts                                                          */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    BDF and PCF Files                                                  */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    BDF and PCF specific API.                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains the declaration of functions specific to BDF */\n  /*    and PCF fonts.                                                     */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /**********************************************************************\n   *\n   * @enum:\n   *    FT_PropertyType\n   *\n   * @description:\n   *    A list of BDF property types.\n   *\n   * @values:\n   *    BDF_PROPERTY_TYPE_NONE ::\n   *      Value~0 is used to indicate a missing property.\n   *\n   *    BDF_PROPERTY_TYPE_ATOM ::\n   *      Property is a string atom.\n   *\n   *    BDF_PROPERTY_TYPE_INTEGER ::\n   *      Property is a 32-bit signed integer.\n   *\n   *    BDF_PROPERTY_TYPE_CARDINAL ::\n   *      Property is a 32-bit unsigned integer.\n   */\n  typedef enum  BDF_PropertyType_\n  {\n    BDF_PROPERTY_TYPE_NONE     = 0,\n    BDF_PROPERTY_TYPE_ATOM     = 1,\n    BDF_PROPERTY_TYPE_INTEGER  = 2,\n    BDF_PROPERTY_TYPE_CARDINAL = 3\n\n  } BDF_PropertyType;\n\n\n  /**********************************************************************\n   *\n   * @type:\n   *    BDF_Property\n   *\n   * @description:\n   *    A handle to a @BDF_PropertyRec structure to model a given\n   *    BDF/PCF property.\n   */\n  typedef struct BDF_PropertyRec_*  BDF_Property;\n\n\n /**********************************************************************\n  *\n  * @struct:\n  *    BDF_PropertyRec\n  *\n  * @description:\n  *    This structure models a given BDF/PCF property.\n  *\n  * @fields:\n  *    type ::\n  *      The property type.\n  *\n  *    u.atom ::\n  *      The atom string, if type is @BDF_PROPERTY_TYPE_ATOM.\n  *\n  *    u.integer ::\n  *      A signed integer, if type is @BDF_PROPERTY_TYPE_INTEGER.\n  *\n  *    u.cardinal ::\n  *      An unsigned integer, if type is @BDF_PROPERTY_TYPE_CARDINAL.\n  */\n  typedef struct  BDF_PropertyRec_\n  {\n    BDF_PropertyType  type;\n    union {\n      const char*     atom;\n      FT_Int32        integer;\n      FT_UInt32       cardinal;\n\n    } u;\n\n  } BDF_PropertyRec;\n\n\n /**********************************************************************\n  *\n  * @function:\n  *    FT_Get_BDF_Charset_ID\n  *\n  * @description:\n  *    Retrieve a BDF font character set identity, according to\n  *    the BDF specification.\n  *\n  * @input:\n  *    face ::\n  *       A handle to the input face.\n  *\n  * @output:\n  *    acharset_encoding ::\n  *       Charset encoding, as a C~string, owned by the face.\n  *\n  *    acharset_registry ::\n  *       Charset registry, as a C~string, owned by the face.\n  *\n  * @return:\n  *   FreeType error code.  0~means success.\n  *\n  * @note:\n  *   This function only works with BDF faces, returning an error otherwise.\n  */\n  FT_EXPORT( FT_Error )\n  FT_Get_BDF_Charset_ID( FT_Face       face,\n                         const char*  *acharset_encoding,\n                         const char*  *acharset_registry );\n\n\n /**********************************************************************\n  *\n  * @function:\n  *    FT_Get_BDF_Property\n  *\n  * @description:\n  *    Retrieve a BDF property from a BDF or PCF font file.\n  *\n  * @input:\n  *    face :: A handle to the input face.\n  *\n  *    name :: The property name.\n  *\n  * @output:\n  *    aproperty :: The property.\n  *\n  * @return:\n  *   FreeType error code.  0~means success.\n  *\n  * @note:\n  *   This function works with BDF _and_ PCF fonts.  It returns an error\n  *   otherwise.  It also returns an error if the property is not in the\n  *   font.\n  *\n  *   A `property' is a either key-value pair within the STARTPROPERTIES\n  *   ... ENDPROPERTIES block of a BDF font or a key-value pair from the\n  *   `info->props' array within a `FontRec' structure of a PCF font.\n  *\n  *   Integer properties are always stored as `signed' within PCF fonts;\n  *   consequently, @BDF_PROPERTY_TYPE_CARDINAL is a possible return value\n  *   for BDF fonts only.\n  *\n  *   In case of error, `aproperty->type' is always set to\n  *   @BDF_PROPERTY_TYPE_NONE.\n  */\n  FT_EXPORT( FT_Error )\n  FT_Get_BDF_Property( FT_Face           face,\n                       const char*       prop_name,\n                       BDF_PropertyRec  *aproperty );\n\n /* */\n\nFT_END_HEADER\n\n#endif /* __FTBDF_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ftbitmap.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftbitmap.h                                                             */\n/*                                                                         */\n/*    FreeType utility functions for bitmaps (specification).              */\n/*                                                                         */\n/*  Copyright 2004, 2005, 2006, 2008 by                                    */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTBITMAP_H__\n#define __FTBITMAP_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    bitmap_handling                                                    */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    Bitmap Handling                                                    */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    Handling FT_Bitmap objects.                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains functions for converting FT_Bitmap objects.  */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Bitmap_New                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Initialize a pointer to an @FT_Bitmap structure.                   */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    abitmap :: A pointer to the bitmap structure.                      */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_Bitmap_New( FT_Bitmap  *abitmap );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Bitmap_Copy                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Copy a bitmap into another one.                                    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library :: A handle to a library object.                           */\n  /*                                                                       */\n  /*    source  :: A handle to the source bitmap.                          */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    target  :: A handle to the target bitmap.                          */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Bitmap_Copy( FT_Library        library,\n                  const FT_Bitmap  *source,\n                  FT_Bitmap        *target);\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Bitmap_Embolden                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Embolden a bitmap.  The new bitmap will be about `xStrength'       */\n  /*    pixels wider and `yStrength' pixels higher.  The left and bottom   */\n  /*    borders are kept unchanged.                                        */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library   :: A handle to a library object.                         */\n  /*                                                                       */\n  /*    xStrength :: How strong the glyph is emboldened horizontally.      */\n  /*                 Expressed in 26.6 pixel format.                       */\n  /*                                                                       */\n  /*    yStrength :: How strong the glyph is emboldened vertically.        */\n  /*                 Expressed in 26.6 pixel format.                       */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    bitmap    :: A handle to the target bitmap.                        */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The current implementation restricts `xStrength' to be less than   */\n  /*    or equal to~8 if bitmap is of pixel_mode @FT_PIXEL_MODE_MONO.      */\n  /*                                                                       */\n  /*    If you want to embolden the bitmap owned by a @FT_GlyphSlotRec,    */\n  /*    you should call @FT_GlyphSlot_Own_Bitmap on the slot first.        */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Bitmap_Embolden( FT_Library  library,\n                      FT_Bitmap*  bitmap,\n                      FT_Pos      xStrength,\n                      FT_Pos      yStrength );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Bitmap_Convert                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, or 8bpp to a  */\n  /*    bitmap object with depth 8bpp, making the number of used bytes per */\n  /*    line (a.k.a. the `pitch') a multiple of `alignment'.               */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library   :: A handle to a library object.                         */\n  /*                                                                       */\n  /*    source    :: The source bitmap.                                    */\n  /*                                                                       */\n  /*    alignment :: The pitch of the bitmap is a multiple of this         */\n  /*                 parameter.  Common values are 1, 2, or 4.             */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    target    :: The target bitmap.                                    */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    It is possible to call @FT_Bitmap_Convert multiple times without   */\n  /*    calling @FT_Bitmap_Done (the memory is simply reallocated).        */\n  /*                                                                       */\n  /*    Use @FT_Bitmap_Done to finally remove the bitmap object.           */\n  /*                                                                       */\n  /*    The `library' argument is taken to have access to FreeType's       */\n  /*    memory handling functions.                                         */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Bitmap_Convert( FT_Library        library,\n                     const FT_Bitmap  *source,\n                     FT_Bitmap        *target,\n                     FT_Int            alignment );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_GlyphSlot_Own_Bitmap                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Make sure that a glyph slot owns `slot->bitmap'.                   */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    slot :: The glyph slot.                                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This function is to be used in combination with                    */\n  /*    @FT_Bitmap_Embolden.                                               */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_GlyphSlot_Own_Bitmap( FT_GlyphSlot  slot );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Bitmap_Done                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Destroy a bitmap object created with @FT_Bitmap_New.               */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library :: A handle to a library object.                           */\n  /*                                                                       */\n  /*    bitmap  :: The bitmap object to be freed.                          */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The `library' argument is taken to have access to FreeType's       */\n  /*    memory handling functions.                                         */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Bitmap_Done( FT_Library  library,\n                  FT_Bitmap  *bitmap );\n\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTBITMAP_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ftcache.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftcache.h                                                              */\n/*                                                                         */\n/*    FreeType Cache subsystem (specification).                            */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by       */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTCACHE_H__\n#define __FTCACHE_H__\n\n\n#include <ft2build.h>\n#include FT_GLYPH_H\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************\n   *\n   * <Section>\n   *    cache_subsystem\n   *\n   * <Title>\n   *    Cache Sub-System\n   *\n   * <Abstract>\n   *    How to cache face, size, and glyph data with FreeType~2.\n   *\n   * <Description>\n   *   This section describes the FreeType~2 cache sub-system, which is used\n   *   to limit the number of concurrently opened @FT_Face and @FT_Size\n   *   objects, as well as caching information like character maps and glyph\n   *   images while limiting their maximum memory usage.\n   *\n   *   Note that all types and functions begin with the `FTC_' prefix.\n   *\n   *   The cache is highly portable and thus doesn't know anything about the\n   *   fonts installed on your system, or how to access them.  This implies\n   *   the following scheme:\n   *\n   *   First, available or installed font faces are uniquely identified by\n   *   @FTC_FaceID values, provided to the cache by the client.  Note that\n   *   the cache only stores and compares these values, and doesn't try to\n   *   interpret them in any way.\n   *\n   *   Second, the cache calls, only when needed, a client-provided function\n   *   to convert a @FTC_FaceID into a new @FT_Face object.  The latter is\n   *   then completely managed by the cache, including its termination\n   *   through @FT_Done_Face.\n   *\n   *   Clients are free to map face IDs to anything else.  The most simple\n   *   usage is to associate them to a (pathname,face_index) pair that is\n   *   used to call @FT_New_Face.  However, more complex schemes are also\n   *   possible.\n   *\n   *   Note that for the cache to work correctly, the face ID values must be\n   *   *persistent*, which means that the contents they point to should not\n   *   change at runtime, or that their value should not become invalid.\n   *\n   *   If this is unavoidable (e.g., when a font is uninstalled at runtime),\n   *   you should call @FTC_Manager_RemoveFaceID as soon as possible, to let\n   *   the cache get rid of any references to the old @FTC_FaceID it may\n   *   keep internally.  Failure to do so will lead to incorrect behaviour\n   *   or even crashes.\n   *\n   *   To use the cache, start with calling @FTC_Manager_New to create a new\n   *   @FTC_Manager object, which models a single cache instance.  You can\n   *   then look up @FT_Face and @FT_Size objects with\n   *   @FTC_Manager_LookupFace and @FTC_Manager_LookupSize, respectively.\n   *\n   *   If you want to use the charmap caching, call @FTC_CMapCache_New, then\n   *   later use @FTC_CMapCache_Lookup to perform the equivalent of\n   *   @FT_Get_Char_Index, only much faster.\n   *\n   *   If you want to use the @FT_Glyph caching, call @FTC_ImageCache, then\n   *   later use @FTC_ImageCache_Lookup to retrieve the corresponding\n   *   @FT_Glyph objects from the cache.\n   *\n   *   If you need lots of small bitmaps, it is much more memory efficient\n   *   to call @FTC_SBitCache_New followed by @FTC_SBitCache_Lookup.  This\n   *   returns @FTC_SBitRec structures, which are used to store small\n   *   bitmaps directly.  (A small bitmap is one whose metrics and\n   *   dimensions all fit into 8-bit integers).\n   *\n   *   We hope to also provide a kerning cache in the near future.\n   *\n   *\n   * <Order>\n   *   FTC_Manager\n   *   FTC_FaceID\n   *   FTC_Face_Requester\n   *\n   *   FTC_Manager_New\n   *   FTC_Manager_Reset\n   *   FTC_Manager_Done\n   *   FTC_Manager_LookupFace\n   *   FTC_Manager_LookupSize\n   *   FTC_Manager_RemoveFaceID\n   *\n   *   FTC_Node\n   *   FTC_Node_Unref\n   *\n   *   FTC_ImageCache\n   *   FTC_ImageCache_New\n   *   FTC_ImageCache_Lookup\n   *\n   *   FTC_SBit\n   *   FTC_SBitCache\n   *   FTC_SBitCache_New\n   *   FTC_SBitCache_Lookup\n   *\n   *   FTC_CMapCache\n   *   FTC_CMapCache_New\n   *   FTC_CMapCache_Lookup\n   *\n   *************************************************************************/\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                    BASIC TYPE DEFINITIONS                     *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************\n   *\n   * @type: FTC_FaceID\n   *\n   * @description:\n   *   An opaque pointer type that is used to identity face objects.  The\n   *   contents of such objects is application-dependent.\n   *\n   *   These pointers are typically used to point to a user-defined\n   *   structure containing a font file path, and face index.\n   *\n   * @note:\n   *   Never use NULL as a valid @FTC_FaceID.\n   *\n   *   Face IDs are passed by the client to the cache manager, which calls,\n   *   when needed, the @FTC_Face_Requester to translate them into new\n   *   @FT_Face objects.\n   *\n   *   If the content of a given face ID changes at runtime, or if the value\n   *   becomes invalid (e.g., when uninstalling a font), you should\n   *   immediately call @FTC_Manager_RemoveFaceID before any other cache\n   *   function.\n   *\n   *   Failure to do so will result in incorrect behaviour or even\n   *   memory leaks and crashes.\n   */\n  typedef FT_Pointer  FTC_FaceID;\n\n\n  /************************************************************************\n   *\n   * @functype:\n   *   FTC_Face_Requester\n   *\n   * @description:\n   *   A callback function provided by client applications.  It is used by\n   *   the cache manager to translate a given @FTC_FaceID into a new valid\n   *   @FT_Face object, on demand.\n   *\n   * <Input>\n   *   face_id ::\n   *     The face ID to resolve.\n   *\n   *   library ::\n   *     A handle to a FreeType library object.\n   *\n   *   req_data ::\n   *     Application-provided request data (see note below).\n   *\n   * <Output>\n   *   aface ::\n   *     A new @FT_Face handle.\n   *\n   * <Return>\n   *   FreeType error code.  0~means success.\n   *\n   * <Note>\n   *   The third parameter `req_data' is the same as the one passed by the\n   *   client when @FTC_Manager_New is called.\n   *\n   *   The face requester should not perform funny things on the returned\n   *   face object, like creating a new @FT_Size for it, or setting a\n   *   transformation through @FT_Set_Transform!\n   */\n  typedef FT_Error\n  (*FTC_Face_Requester)( FTC_FaceID  face_id,\n                         FT_Library  library,\n                         FT_Pointer  request_data,\n                         FT_Face*    aface );\n\n /* */\n\n#define FT_POINTER_TO_ULONG( p )  ( (FT_ULong)(FT_Pointer)(p) )\n\n#define FTC_FACE_ID_HASH( i )                                \\\n          ((FT_UInt32)(( FT_POINTER_TO_ULONG( i ) >> 3 ) ^   \\\n                       ( FT_POINTER_TO_ULONG( i ) << 7 ) ) )\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                      CACHE MANAGER OBJECT                     *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FTC_Manager                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This object corresponds to one instance of the cache-subsystem.    */\n  /*    It is used to cache one or more @FT_Face objects, along with       */\n  /*    corresponding @FT_Size objects.                                    */\n  /*                                                                       */\n  /*    The manager intentionally limits the total number of opened        */\n  /*    @FT_Face and @FT_Size objects to control memory usage.  See the    */\n  /*    `max_faces' and `max_sizes' parameters of @FTC_Manager_New.        */\n  /*                                                                       */\n  /*    The manager is also used to cache `nodes' of various types while   */\n  /*    limiting their total memory usage.                                 */\n  /*                                                                       */\n  /*    All limitations are enforced by keeping lists of managed objects   */\n  /*    in most-recently-used order, and flushing old nodes to make room   */\n  /*    for new ones.                                                      */\n  /*                                                                       */\n  typedef struct FTC_ManagerRec_*  FTC_Manager;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FTC_Node                                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    An opaque handle to a cache node object.  Each cache node is       */\n  /*    reference-counted.  A node with a count of~0 might be flushed      */\n  /*    out of a full cache whenever a lookup request is performed.        */\n  /*                                                                       */\n  /*    If you lookup nodes, you have the ability to `acquire' them, i.e., */\n  /*    to increment their reference count.  This will prevent the node    */\n  /*    from being flushed out of the cache until you explicitly `release' */\n  /*    it (see @FTC_Node_Unref).                                          */\n  /*                                                                       */\n  /*    See also @FTC_SBitCache_Lookup and @FTC_ImageCache_Lookup.         */\n  /*                                                                       */\n  typedef struct FTC_NodeRec_*  FTC_Node;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FTC_Manager_New                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Create a new cache manager.                                        */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library   :: The parent FreeType library handle to use.            */\n  /*                                                                       */\n  /*    max_faces :: Maximum number of opened @FT_Face objects managed by  */\n  /*                 this cache instance.  Use~0 for defaults.             */\n  /*                                                                       */\n  /*    max_sizes :: Maximum number of opened @FT_Size objects managed by  */\n  /*                 this cache instance.  Use~0 for defaults.             */\n  /*                                                                       */\n  /*    max_bytes :: Maximum number of bytes to use for cached data nodes. */\n  /*                 Use~0 for defaults.  Note that this value does not    */\n  /*                 account for managed @FT_Face and @FT_Size objects.    */\n  /*                                                                       */\n  /*    requester :: An application-provided callback used to translate    */\n  /*                 face IDs into real @FT_Face objects.                  */\n  /*                                                                       */\n  /*    req_data  :: A generic pointer that is passed to the requester     */\n  /*                 each time it is called (see @FTC_Face_Requester).     */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    amanager  :: A handle to a new manager object.  0~in case of       */\n  /*                 failure.                                              */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FTC_Manager_New( FT_Library          library,\n                   FT_UInt             max_faces,\n                   FT_UInt             max_sizes,\n                   FT_ULong            max_bytes,\n                   FTC_Face_Requester  requester,\n                   FT_Pointer          req_data,\n                   FTC_Manager        *amanager );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FTC_Manager_Reset                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Empty a given cache manager.  This simply gets rid of all the      */\n  /*    currently cached @FT_Face and @FT_Size objects within the manager. */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    manager :: A handle to the manager.                                */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FTC_Manager_Reset( FTC_Manager  manager );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FTC_Manager_Done                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Destroy a given manager after emptying it.                         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    manager :: A handle to the target cache manager object.            */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FTC_Manager_Done( FTC_Manager  manager );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FTC_Manager_LookupFace                                             */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Retrieve the @FT_Face object that corresponds to a given face ID   */\n  /*    through a cache manager.                                           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    manager :: A handle to the cache manager.                          */\n  /*                                                                       */\n  /*    face_id :: The ID of the face object.                              */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    aface   :: A handle to the face object.                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The returned @FT_Face object is always owned by the manager.  You  */\n  /*    should never try to discard it yourself.                           */\n  /*                                                                       */\n  /*    The @FT_Face object doesn't necessarily have a current size object */\n  /*    (i.e., face->size can be 0).  If you need a specific `font size',  */\n  /*    use @FTC_Manager_LookupSize instead.                               */\n  /*                                                                       */\n  /*    Never change the face's transformation matrix (i.e., never call    */\n  /*    the @FT_Set_Transform function) on a returned face!  If you need   */\n  /*    to transform glyphs, do it yourself after glyph loading.           */\n  /*                                                                       */\n  /*    When you perform a lookup, out-of-memory errors are detected       */\n  /*    _within_ the lookup and force incremental flushes of the cache     */\n  /*    until enough memory is released for the lookup to succeed.         */\n  /*                                                                       */\n  /*    If a lookup fails with `FT_Err_Out_Of_Memory' the cache has        */\n  /*    already been completely flushed, and still no memory was available */\n  /*    for the operation.                                                 */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FTC_Manager_LookupFace( FTC_Manager  manager,\n                          FTC_FaceID   face_id,\n                          FT_Face     *aface );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FTC_ScalerRec                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to describe a given character size in either      */\n  /*    pixels or points to the cache manager.  See                        */\n  /*    @FTC_Manager_LookupSize.                                           */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    face_id :: The source face ID.                                     */\n  /*                                                                       */\n  /*    width   :: The character width.                                    */\n  /*                                                                       */\n  /*    height  :: The character height.                                   */\n  /*                                                                       */\n  /*    pixel   :: A Boolean.  If 1, the `width' and `height' fields are   */\n  /*               interpreted as integer pixel character sizes.           */\n  /*               Otherwise, they are expressed as 1/64th of points.      */\n  /*                                                                       */\n  /*    x_res   :: Only used when `pixel' is value~0 to indicate the       */\n  /*               horizontal resolution in dpi.                           */\n  /*                                                                       */\n  /*    y_res   :: Only used when `pixel' is value~0 to indicate the       */\n  /*               vertical resolution in dpi.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This type is mainly used to retrieve @FT_Size objects through the  */\n  /*    cache manager.                                                     */\n  /*                                                                       */\n  typedef struct  FTC_ScalerRec_\n  {\n    FTC_FaceID  face_id;\n    FT_UInt     width;\n    FT_UInt     height;\n    FT_Int      pixel;\n    FT_UInt     x_res;\n    FT_UInt     y_res;\n\n  } FTC_ScalerRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FTC_Scaler                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to an @FTC_ScalerRec structure.                           */\n  /*                                                                       */\n  typedef struct FTC_ScalerRec_*  FTC_Scaler;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FTC_Manager_LookupSize                                             */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Retrieve the @FT_Size object that corresponds to a given           */\n  /*    @FTC_ScalerRec pointer through a cache manager.                    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    manager :: A handle to the cache manager.                          */\n  /*                                                                       */\n  /*    scaler  :: A scaler handle.                                        */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    asize   :: A handle to the size object.                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The returned @FT_Size object is always owned by the manager.  You  */\n  /*    should never try to discard it by yourself.                        */\n  /*                                                                       */\n  /*    You can access the parent @FT_Face object simply as `size->face'   */\n  /*    if you need it.  Note that this object is also owned by the        */\n  /*    manager.                                                           */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    When you perform a lookup, out-of-memory errors are detected       */\n  /*    _within_ the lookup and force incremental flushes of the cache     */\n  /*    until enough memory is released for the lookup to succeed.         */\n  /*                                                                       */\n  /*    If a lookup fails with `FT_Err_Out_Of_Memory' the cache has        */\n  /*    already been completely flushed, and still no memory is available  */\n  /*    for the operation.                                                 */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FTC_Manager_LookupSize( FTC_Manager  manager,\n                          FTC_Scaler   scaler,\n                          FT_Size     *asize );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FTC_Node_Unref                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Decrement a cache node's internal reference count.  When the count */\n  /*    reaches 0, it is not destroyed but becomes eligible for subsequent */\n  /*    cache flushes.                                                     */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    node    :: The cache node handle.                                  */\n  /*                                                                       */\n  /*    manager :: The cache manager handle.                               */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FTC_Node_Unref( FTC_Node     node,\n                  FTC_Manager  manager );\n\n\n  /*************************************************************************\n   *\n   * @function:\n   *   FTC_Manager_RemoveFaceID\n   *\n   * @description:\n   *   A special function used to indicate to the cache manager that\n   *   a given @FTC_FaceID is no longer valid, either because its\n   *   content changed, or because it was deallocated or uninstalled.\n   *\n   * @input:\n   *   manager ::\n   *     The cache manager handle.\n   *\n   *   face_id ::\n   *     The @FTC_FaceID to be removed.\n   *\n   * @note:\n   *   This function flushes all nodes from the cache corresponding to this\n   *   `face_id', with the exception of nodes with a non-null reference\n   *   count.\n   *\n   *   Such nodes are however modified internally so as to never appear\n   *   in later lookups with the same `face_id' value, and to be immediately\n   *   destroyed when released by all their users.\n   *\n   */\n  FT_EXPORT( void )\n  FTC_Manager_RemoveFaceID( FTC_Manager  manager,\n                            FTC_FaceID   face_id );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    cache_subsystem                                                    */\n  /*                                                                       */\n  /*************************************************************************/\n\n  /*************************************************************************\n   *\n   * @type:\n   *   FTC_CMapCache\n   *\n   * @description:\n   *   An opaque handle used to model a charmap cache.  This cache is to\n   *   hold character codes -> glyph indices mappings.\n   *\n   */\n  typedef struct FTC_CMapCacheRec_*  FTC_CMapCache;\n\n\n  /*************************************************************************\n   *\n   * @function:\n   *   FTC_CMapCache_New\n   *\n   * @description:\n   *   Create a new charmap cache.\n   *\n   * @input:\n   *   manager ::\n   *     A handle to the cache manager.\n   *\n   * @output:\n   *   acache ::\n   *     A new cache handle.  NULL in case of error.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   Like all other caches, this one will be destroyed with the cache\n   *   manager.\n   *\n   */\n  FT_EXPORT( FT_Error )\n  FTC_CMapCache_New( FTC_Manager     manager,\n                     FTC_CMapCache  *acache );\n\n\n  /************************************************************************\n   *\n   * @function:\n   *   FTC_CMapCache_Lookup\n   *\n   * @description:\n   *   Translate a character code into a glyph index, using the charmap\n   *   cache.\n   *\n   * @input:\n   *   cache ::\n   *     A charmap cache handle.\n   *\n   *   face_id ::\n   *     The source face ID.\n   *\n   *   cmap_index ::\n   *     The index of the charmap in the source face.  Any negative value\n   *     means to use the cache @FT_Face's default charmap.\n   *\n   *   char_code ::\n   *     The character code (in the corresponding charmap).\n   *\n   * @return:\n   *    Glyph index.  0~means `no glyph'.\n   *\n   */\n  FT_EXPORT( FT_UInt )\n  FTC_CMapCache_Lookup( FTC_CMapCache  cache,\n                        FTC_FaceID     face_id,\n                        FT_Int         cmap_index,\n                        FT_UInt32      char_code );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    cache_subsystem                                                    */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****                       IMAGE CACHE OBJECT                      *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************\n   *\n   * @struct:\n   *   FTC_ImageTypeRec\n   *\n   * @description:\n   *   A structure used to model the type of images in a glyph cache.\n   *\n   * @fields:\n   *   face_id ::\n   *     The face ID.\n   *\n   *   width ::\n   *     The width in pixels.\n   *\n   *   height ::\n   *     The height in pixels.\n   *\n   *   flags ::\n   *     The load flags, as in @FT_Load_Glyph.\n   *\n   */\n  typedef struct  FTC_ImageTypeRec_\n  {\n    FTC_FaceID  face_id;\n    FT_Int      width;\n    FT_Int      height;\n    FT_Int32    flags;\n\n  } FTC_ImageTypeRec;\n\n\n  /*************************************************************************\n   *\n   * @type:\n   *   FTC_ImageType\n   *\n   * @description:\n   *   A handle to an @FTC_ImageTypeRec structure.\n   *\n   */\n  typedef struct FTC_ImageTypeRec_*  FTC_ImageType;\n\n\n  /* */\n\n\n#define FTC_IMAGE_TYPE_COMPARE( d1, d2 )      \\\n          ( (d1)->face_id == (d2)->face_id && \\\n            (d1)->width   == (d2)->width   && \\\n            (d1)->flags   == (d2)->flags   )\n\n#define FTC_IMAGE_TYPE_HASH( d )                          \\\n          (FT_UFast)( FTC_FACE_ID_HASH( (d)->face_id )  ^ \\\n                      ( (d)->width << 8 ) ^ (d)->height ^ \\\n                      ( (d)->flags << 4 )               )\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FTC_ImageCache                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to an glyph image cache object.  They are designed to     */\n  /*    hold many distinct glyph images while not exceeding a certain      */\n  /*    memory threshold.                                                  */\n  /*                                                                       */\n  typedef struct FTC_ImageCacheRec_*  FTC_ImageCache;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FTC_ImageCache_New                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Create a new glyph image cache.                                    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    manager :: The parent manager for the image cache.                 */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    acache  :: A handle to the new glyph image cache object.           */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FTC_ImageCache_New( FTC_Manager      manager,\n                      FTC_ImageCache  *acache );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FTC_ImageCache_Lookup                                              */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Retrieve a given glyph image from a glyph image cache.             */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    cache  :: A handle to the source glyph image cache.                */\n  /*                                                                       */\n  /*    type   :: A pointer to a glyph image type descriptor.              */\n  /*                                                                       */\n  /*    gindex :: The glyph index to retrieve.                             */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    aglyph :: The corresponding @FT_Glyph object.  0~in case of        */\n  /*              failure.                                                 */\n  /*                                                                       */\n  /*    anode  :: Used to return the address of of the corresponding cache */\n  /*              node after incrementing its reference count (see note    */\n  /*              below).                                                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The returned glyph is owned and managed by the glyph image cache.  */\n  /*    Never try to transform or discard it manually!  You can however    */\n  /*    create a copy with @FT_Glyph_Copy and modify the new one.          */\n  /*                                                                       */\n  /*    If `anode' is _not_ NULL, it receives the address of the cache     */\n  /*    node containing the glyph image, after increasing its reference    */\n  /*    count.  This ensures that the node (as well as the @FT_Glyph) will */\n  /*    always be kept in the cache until you call @FTC_Node_Unref to      */\n  /*    `release' it.                                                      */\n  /*                                                                       */\n  /*    If `anode' is NULL, the cache node is left unchanged, which means  */\n  /*    that the @FT_Glyph could be flushed out of the cache on the next   */\n  /*    call to one of the caching sub-system APIs.  Don't assume that it  */\n  /*    is persistent!                                                     */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FTC_ImageCache_Lookup( FTC_ImageCache  cache,\n                         FTC_ImageType   type,\n                         FT_UInt         gindex,\n                         FT_Glyph       *aglyph,\n                         FTC_Node       *anode );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FTC_ImageCache_LookupScaler                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A variant of @FTC_ImageCache_Lookup that uses an @FTC_ScalerRec    */\n  /*    to specify the face ID and its size.                               */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    cache      :: A handle to the source glyph image cache.            */\n  /*                                                                       */\n  /*    scaler     :: A pointer to a scaler descriptor.                    */\n  /*                                                                       */\n  /*    load_flags :: The corresponding load flags.                        */\n  /*                                                                       */\n  /*    gindex     :: The glyph index to retrieve.                         */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    aglyph     :: The corresponding @FT_Glyph object.  0~in case of    */\n  /*                  failure.                                             */\n  /*                                                                       */\n  /*    anode      :: Used to return the address of of the corresponding   */\n  /*                  cache node after incrementing its reference count    */\n  /*                  (see note below).                                    */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The returned glyph is owned and managed by the glyph image cache.  */\n  /*    Never try to transform or discard it manually!  You can however    */\n  /*    create a copy with @FT_Glyph_Copy and modify the new one.          */\n  /*                                                                       */\n  /*    If `anode' is _not_ NULL, it receives the address of the cache     */\n  /*    node containing the glyph image, after increasing its reference    */\n  /*    count.  This ensures that the node (as well as the @FT_Glyph) will */\n  /*    always be kept in the cache until you call @FTC_Node_Unref to      */\n  /*    `release' it.                                                      */\n  /*                                                                       */\n  /*    If `anode' is NULL, the cache node is left unchanged, which means  */\n  /*    that the @FT_Glyph could be flushed out of the cache on the next   */\n  /*    call to one of the caching sub-system APIs.  Don't assume that it  */\n  /*    is persistent!                                                     */\n  /*                                                                       */\n  /*    Calls to @FT_Set_Char_Size and friends have no effect on cached    */\n  /*    glyphs; you should always use the FreeType cache API instead.      */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FTC_ImageCache_LookupScaler( FTC_ImageCache  cache,\n                               FTC_Scaler      scaler,\n                               FT_ULong        load_flags,\n                               FT_UInt         gindex,\n                               FT_Glyph       *aglyph,\n                               FTC_Node       *anode );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FTC_SBit                                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a small bitmap descriptor.  See the @FTC_SBitRec       */\n  /*    structure for details.                                             */\n  /*                                                                       */\n  typedef struct FTC_SBitRec_*  FTC_SBit;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FTC_SBitRec                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A very compact structure used to describe a small glyph bitmap.    */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    width     :: The bitmap width in pixels.                           */\n  /*                                                                       */\n  /*    height    :: The bitmap height in pixels.                          */\n  /*                                                                       */\n  /*    left      :: The horizontal distance from the pen position to the  */\n  /*                 left bitmap border (a.k.a. `left side bearing', or    */\n  /*                 `lsb').                                               */\n  /*                                                                       */\n  /*    top       :: The vertical distance from the pen position (on the   */\n  /*                 baseline) to the upper bitmap border (a.k.a. `top     */\n  /*                 side bearing').  The distance is positive for upwards */\n  /*                 y~coordinates.                                        */\n  /*                                                                       */\n  /*    format    :: The format of the glyph bitmap (monochrome or gray).  */\n  /*                                                                       */\n  /*    max_grays :: Maximum gray level value (in the range 1 to~255).     */\n  /*                                                                       */\n  /*    pitch     :: The number of bytes per bitmap line.  May be positive */\n  /*                 or negative.                                          */\n  /*                                                                       */\n  /*    xadvance  :: The horizontal advance width in pixels.               */\n  /*                                                                       */\n  /*    yadvance  :: The vertical advance height in pixels.                */\n  /*                                                                       */\n  /*    buffer    :: A pointer to the bitmap pixels.                       */\n  /*                                                                       */\n  typedef struct  FTC_SBitRec_\n  {\n    FT_Byte   width;\n    FT_Byte   height;\n    FT_Char   left;\n    FT_Char   top;\n\n    FT_Byte   format;\n    FT_Byte   max_grays;\n    FT_Short  pitch;\n    FT_Char   xadvance;\n    FT_Char   yadvance;\n\n    FT_Byte*  buffer;\n\n  } FTC_SBitRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FTC_SBitCache                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a small bitmap cache.  These are special cache objects */\n  /*    used to store small glyph bitmaps (and anti-aliased pixmaps) in a  */\n  /*    much more efficient way than the traditional glyph image cache     */\n  /*    implemented by @FTC_ImageCache.                                    */\n  /*                                                                       */\n  typedef struct FTC_SBitCacheRec_*  FTC_SBitCache;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FTC_SBitCache_New                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Create a new cache to store small glyph bitmaps.                   */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    manager :: A handle to the source cache manager.                   */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    acache  :: A handle to the new sbit cache.  NULL in case of error. */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FTC_SBitCache_New( FTC_Manager     manager,\n                     FTC_SBitCache  *acache );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FTC_SBitCache_Lookup                                               */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Look up a given small glyph bitmap in a given sbit cache and       */\n  /*    `lock' it to prevent its flushing from the cache until needed.     */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    cache  :: A handle to the source sbit cache.                       */\n  /*                                                                       */\n  /*    type   :: A pointer to the glyph image type descriptor.            */\n  /*                                                                       */\n  /*    gindex :: The glyph index.                                         */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    sbit   :: A handle to a small bitmap descriptor.                   */\n  /*                                                                       */\n  /*    anode  :: Used to return the address of of the corresponding cache */\n  /*              node after incrementing its reference count (see note    */\n  /*              below).                                                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The small bitmap descriptor and its bit buffer are owned by the    */\n  /*    cache and should never be freed by the application.  They might    */\n  /*    as well disappear from memory on the next cache lookup, so don't   */\n  /*    treat them as persistent data.                                     */\n  /*                                                                       */\n  /*    The descriptor's `buffer' field is set to~0 to indicate a missing  */\n  /*    glyph bitmap.                                                      */\n  /*                                                                       */\n  /*    If `anode' is _not_ NULL, it receives the address of the cache     */\n  /*    node containing the bitmap, after increasing its reference count.  */\n  /*    This ensures that the node (as well as the image) will always be   */\n  /*    kept in the cache until you call @FTC_Node_Unref to `release' it.  */\n  /*                                                                       */\n  /*    If `anode' is NULL, the cache node is left unchanged, which means  */\n  /*    that the bitmap could be flushed out of the cache on the next      */\n  /*    call to one of the caching sub-system APIs.  Don't assume that it  */\n  /*    is persistent!                                                     */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FTC_SBitCache_Lookup( FTC_SBitCache    cache,\n                        FTC_ImageType    type,\n                        FT_UInt          gindex,\n                        FTC_SBit        *sbit,\n                        FTC_Node        *anode );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FTC_SBitCache_LookupScaler                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A variant of @FTC_SBitCache_Lookup that uses an @FTC_ScalerRec     */\n  /*    to specify the face ID and its size.                               */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    cache      :: A handle to the source sbit cache.                   */\n  /*                                                                       */\n  /*    scaler     :: A pointer to the scaler descriptor.                  */\n  /*                                                                       */\n  /*    load_flags :: The corresponding load flags.                        */\n  /*                                                                       */\n  /*    gindex     :: The glyph index.                                     */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    sbit       :: A handle to a small bitmap descriptor.               */\n  /*                                                                       */\n  /*    anode      :: Used to return the address of of the corresponding   */\n  /*                  cache node after incrementing its reference count    */\n  /*                  (see note below).                                    */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The small bitmap descriptor and its bit buffer are owned by the    */\n  /*    cache and should never be freed by the application.  They might    */\n  /*    as well disappear from memory on the next cache lookup, so don't   */\n  /*    treat them as persistent data.                                     */\n  /*                                                                       */\n  /*    The descriptor's `buffer' field is set to~0 to indicate a missing  */\n  /*    glyph bitmap.                                                      */\n  /*                                                                       */\n  /*    If `anode' is _not_ NULL, it receives the address of the cache     */\n  /*    node containing the bitmap, after increasing its reference count.  */\n  /*    This ensures that the node (as well as the image) will always be   */\n  /*    kept in the cache until you call @FTC_Node_Unref to `release' it.  */\n  /*                                                                       */\n  /*    If `anode' is NULL, the cache node is left unchanged, which means  */\n  /*    that the bitmap could be flushed out of the cache on the next      */\n  /*    call to one of the caching sub-system APIs.  Don't assume that it  */\n  /*    is persistent!                                                     */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FTC_SBitCache_LookupScaler( FTC_SBitCache  cache,\n                              FTC_Scaler     scaler,\n                              FT_ULong       load_flags,\n                              FT_UInt        gindex,\n                              FTC_SBit      *sbit,\n                              FTC_Node      *anode );\n\n\n /* */\n\n#ifdef FT_CONFIG_OPTION_OLD_INTERNALS\n\n  /*@***********************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FTC_FontRec                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A simple structure used to describe a given `font' to the cache    */\n  /*    manager.  Note that a `font' is the combination of a given face    */\n  /*    with a given character size.                                       */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    face_id    :: The ID of the face to use.                           */\n  /*                                                                       */\n  /*    pix_width  :: The character width in integer pixels.               */\n  /*                                                                       */\n  /*    pix_height :: The character height in integer pixels.              */\n  /*                                                                       */\n  typedef struct  FTC_FontRec_\n  {\n    FTC_FaceID  face_id;\n    FT_UShort   pix_width;\n    FT_UShort   pix_height;\n\n  } FTC_FontRec;\n\n\n  /* */\n\n\n#define FTC_FONT_COMPARE( f1, f2 )                  \\\n          ( (f1)->face_id    == (f2)->face_id    && \\\n            (f1)->pix_width  == (f2)->pix_width  && \\\n            (f1)->pix_height == (f2)->pix_height )\n\n#define FTC_FONT_HASH( f )                              \\\n          (FT_UInt32)( FTC_FACE_ID_HASH((f)->face_id) ^ \\\n                       ((f)->pix_width << 8)          ^ \\\n                       ((f)->pix_height)              )\n\n  typedef FTC_FontRec*  FTC_Font;\n\n\n  FT_EXPORT( FT_Error )\n  FTC_Manager_Lookup_Face( FTC_Manager  manager,\n                           FTC_FaceID   face_id,\n                           FT_Face     *aface );\n\n  FT_EXPORT( FT_Error )\n  FTC_Manager_Lookup_Size( FTC_Manager  manager,\n                           FTC_Font     font,\n                           FT_Face     *aface,\n                           FT_Size     *asize );\n\n#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */\n\n\n /* */\n\nFT_END_HEADER\n\n#endif /* __FTCACHE_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ftchapters.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/* This file defines the structure of the FreeType reference.              */\n/* It is used by the python script which generates the HTML files.         */\n/*                                                                         */\n/***************************************************************************/\n\n\n/***************************************************************************/\n/*                                                                         */\n/* <Chapter>                                                               */\n/*    general_remarks                                                      */\n/*                                                                         */\n/* <Title>                                                                 */\n/*    General Remarks                                                      */\n/*                                                                         */\n/* <Sections>                                                              */\n/*    user_allocation                                                      */\n/*                                                                         */\n/***************************************************************************/\n\n\n/***************************************************************************/\n/*                                                                         */\n/* <Chapter>                                                               */\n/*    core_api                                                             */\n/*                                                                         */\n/* <Title>                                                                 */\n/*    Core API                                                             */\n/*                                                                         */\n/* <Sections>                                                              */\n/*    version                                                              */\n/*    basic_types                                                          */\n/*    base_interface                                                       */\n/*    glyph_variants                                                       */\n/*    glyph_management                                                     */\n/*    mac_specific                                                         */\n/*    sizes_management                                                     */\n/*    header_file_macros                                                   */\n/*                                                                         */\n/***************************************************************************/\n\n\n/***************************************************************************/\n/*                                                                         */\n/* <Chapter>                                                               */\n/*    format_specific                                                      */\n/*                                                                         */\n/* <Title>                                                                 */\n/*    Format-Specific API                                                  */\n/*                                                                         */\n/* <Sections>                                                              */\n/*    multiple_masters                                                     */\n/*    truetype_tables                                                      */\n/*    type1_tables                                                         */\n/*    sfnt_names                                                           */\n/*    bdf_fonts                                                            */\n/*    cid_fonts                                                            */\n/*    pfr_fonts                                                            */\n/*    winfnt_fonts                                                         */\n/*    font_formats                                                         */\n/*    gasp_table                                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n/***************************************************************************/\n/*                                                                         */\n/* <Chapter>                                                               */\n/*    cache_subsystem                                                      */\n/*                                                                         */\n/* <Title>                                                                 */\n/*    Cache Sub-System                                                     */\n/*                                                                         */\n/* <Sections>                                                              */\n/*    cache_subsystem                                                      */\n/*                                                                         */\n/***************************************************************************/\n\n\n/***************************************************************************/\n/*                                                                         */\n/* <Chapter>                                                               */\n/*    support_api                                                          */\n/*                                                                         */\n/* <Title>                                                                 */\n/*    Support API                                                          */\n/*                                                                         */\n/* <Sections>                                                              */\n/*    computations                                                         */\n/*    list_processing                                                      */\n/*    outline_processing                                                   */\n/*    quick_advance                                                        */\n/*    bitmap_handling                                                      */\n/*    raster                                                               */\n/*    glyph_stroker                                                        */\n/*    system_interface                                                     */\n/*    module_management                                                    */\n/*    gzip                                                                 */\n/*    lzw                                                                  */\n/*    lcd_filtering                                                        */\n/*                                                                         */\n/***************************************************************************/\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ftcid.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftcid.h                                                                */\n/*                                                                         */\n/*    FreeType API for accessing CID font information (specification).     */\n/*                                                                         */\n/*  Copyright 2007, 2009 by Dereg Clegg, Michael Toftdal.                  */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTCID_H__\n#define __FTCID_H__\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    cid_fonts                                                          */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    CID Fonts                                                          */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    CID-keyed font specific API.                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains the declaration of CID-keyed font specific   */\n  /*    functions.                                                         */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /**********************************************************************\n   *\n   * @function:\n   *    FT_Get_CID_Registry_Ordering_Supplement\n   *\n   * @description:\n   *    Retrieve the Registry/Ordering/Supplement triple (also known as the\n   *    \"R/O/S\") from a CID-keyed font.\n   *\n   * @input:\n   *    face ::\n   *       A handle to the input face.\n   *\n   * @output:\n   *    registry ::\n   *       The registry, as a C~string, owned by the face.\n   *\n   *    ordering ::\n   *       The ordering, as a C~string, owned by the face.\n   *\n   *    supplement ::\n   *       The supplement.\n   *\n   * @return:\n   *    FreeType error code.  0~means success.\n   *\n   * @note:\n   *    This function only works with CID faces, returning an error\n   *    otherwise.\n   *\n   * @since:\n   *    2.3.6\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_CID_Registry_Ordering_Supplement( FT_Face       face,\n                                           const char*  *registry,\n                                           const char*  *ordering,\n                                           FT_Int       *supplement);\n\n\n  /**********************************************************************\n   *\n   * @function:\n   *    FT_Get_CID_Is_Internally_CID_Keyed\n   *\n   * @description:\n   *    Retrieve the type of the input face, CID keyed or not.  In\n   *    constrast to the @FT_IS_CID_KEYED macro this function returns\n   *    successfully also for CID-keyed fonts in an SNFT wrapper.\n   *\n   * @input:\n   *    face ::\n   *       A handle to the input face.\n   *\n   * @output:\n   *    is_cid ::\n   *       The type of the face as an @FT_Bool.\n   *\n   * @return:\n   *    FreeType error code.  0~means success.\n   *\n   * @note:\n   *    This function only works with CID faces and OpenType fonts,\n   *    returning an error otherwise.\n   *\n   * @since:\n   *    2.3.9\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_CID_Is_Internally_CID_Keyed( FT_Face   face,\n                                      FT_Bool  *is_cid );\n\n\n  /**********************************************************************\n   *\n   * @function:\n   *    FT_Get_CID_From_Glyph_Index\n   *\n   * @description:\n   *    Retrieve the CID of the input glyph index.\n   *\n   * @input:\n   *    face ::\n   *       A handle to the input face.\n   *\n   *    glyph_index ::\n   *       The input glyph index.\n   *\n   * @output:\n   *    cid ::\n   *       The CID as an @FT_UInt.\n   *\n   * @return:\n   *    FreeType error code.  0~means success.\n   *\n   * @note:\n   *    This function only works with CID faces and OpenType fonts,\n   *    returning an error otherwise.\n   *\n   * @since:\n   *    2.3.9\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_CID_From_Glyph_Index( FT_Face   face,\n                               FT_UInt   glyph_index,\n                               FT_UInt  *cid );\n\n /* */\n\nFT_END_HEADER\n\n#endif /* __FTCID_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/fterrdef.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  fterrdef.h                                                             */\n/*                                                                         */\n/*    FreeType error codes (specification).                                */\n/*                                                                         */\n/*  Copyright 2002, 2004, 2006, 2007 by                                    */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*******************************************************************/\n  /*******************************************************************/\n  /*****                                                         *****/\n  /*****                LIST OF ERROR CODES/MESSAGES             *****/\n  /*****                                                         *****/\n  /*******************************************************************/\n  /*******************************************************************/\n\n\n  /* You need to define both FT_ERRORDEF_ and FT_NOERRORDEF_ before */\n  /* including this file.                                           */\n\n\n  /* generic errors */\n\n  FT_NOERRORDEF_( Ok,                                        0x00, \\\n                  \"no error\" )\n\n  FT_ERRORDEF_( Cannot_Open_Resource,                        0x01, \\\n                \"cannot open resource\" )\n  FT_ERRORDEF_( Unknown_File_Format,                         0x02, \\\n                \"unknown file format\" )\n  FT_ERRORDEF_( Invalid_File_Format,                         0x03, \\\n                \"broken file\" )\n  FT_ERRORDEF_( Invalid_Version,                             0x04, \\\n                \"invalid FreeType version\" )\n  FT_ERRORDEF_( Lower_Module_Version,                        0x05, \\\n                \"module version is too low\" )\n  FT_ERRORDEF_( Invalid_Argument,                            0x06, \\\n                \"invalid argument\" )\n  FT_ERRORDEF_( Unimplemented_Feature,                       0x07, \\\n                \"unimplemented feature\" )\n  FT_ERRORDEF_( Invalid_Table,                               0x08, \\\n                \"broken table\" )\n  FT_ERRORDEF_( Invalid_Offset,                              0x09, \\\n                \"broken offset within table\" )\n  FT_ERRORDEF_( Array_Too_Large,                             0x0A, \\\n                \"array allocation size too large\" )\n\n  /* glyph/character errors */\n\n  FT_ERRORDEF_( Invalid_Glyph_Index,                         0x10, \\\n                \"invalid glyph index\" )\n  FT_ERRORDEF_( Invalid_Character_Code,                      0x11, \\\n                \"invalid character code\" )\n  FT_ERRORDEF_( Invalid_Glyph_Format,                        0x12, \\\n                \"unsupported glyph image format\" )\n  FT_ERRORDEF_( Cannot_Render_Glyph,                         0x13, \\\n                \"cannot render this glyph format\" )\n  FT_ERRORDEF_( Invalid_Outline,                             0x14, \\\n                \"invalid outline\" )\n  FT_ERRORDEF_( Invalid_Composite,                           0x15, \\\n                \"invalid composite glyph\" )\n  FT_ERRORDEF_( Too_Many_Hints,                              0x16, \\\n                \"too many hints\" )\n  FT_ERRORDEF_( Invalid_Pixel_Size,                          0x17, \\\n                \"invalid pixel size\" )\n\n  /* handle errors */\n\n  FT_ERRORDEF_( Invalid_Handle,                              0x20, \\\n                \"invalid object handle\" )\n  FT_ERRORDEF_( Invalid_Library_Handle,                      0x21, \\\n                \"invalid library handle\" )\n  FT_ERRORDEF_( Invalid_Driver_Handle,                       0x22, \\\n                \"invalid module handle\" )\n  FT_ERRORDEF_( Invalid_Face_Handle,                         0x23, \\\n                \"invalid face handle\" )\n  FT_ERRORDEF_( Invalid_Size_Handle,                         0x24, \\\n                \"invalid size handle\" )\n  FT_ERRORDEF_( Invalid_Slot_Handle,                         0x25, \\\n                \"invalid glyph slot handle\" )\n  FT_ERRORDEF_( Invalid_CharMap_Handle,                      0x26, \\\n                \"invalid charmap handle\" )\n  FT_ERRORDEF_( Invalid_Cache_Handle,                        0x27, \\\n                \"invalid cache manager handle\" )\n  FT_ERRORDEF_( Invalid_Stream_Handle,                       0x28, \\\n                \"invalid stream handle\" )\n\n  /* driver errors */\n\n  FT_ERRORDEF_( Too_Many_Drivers,                            0x30, \\\n                \"too many modules\" )\n  FT_ERRORDEF_( Too_Many_Extensions,                         0x31, \\\n                \"too many extensions\" )\n\n  /* memory errors */\n\n  FT_ERRORDEF_( Out_Of_Memory,                               0x40, \\\n                \"out of memory\" )\n  FT_ERRORDEF_( Unlisted_Object,                             0x41, \\\n                \"unlisted object\" )\n\n  /* stream errors */\n\n  FT_ERRORDEF_( Cannot_Open_Stream,                          0x51, \\\n                \"cannot open stream\" )\n  FT_ERRORDEF_( Invalid_Stream_Seek,                         0x52, \\\n                \"invalid stream seek\" )\n  FT_ERRORDEF_( Invalid_Stream_Skip,                         0x53, \\\n                \"invalid stream skip\" )\n  FT_ERRORDEF_( Invalid_Stream_Read,                         0x54, \\\n                \"invalid stream read\" )\n  FT_ERRORDEF_( Invalid_Stream_Operation,                    0x55, \\\n                \"invalid stream operation\" )\n  FT_ERRORDEF_( Invalid_Frame_Operation,                     0x56, \\\n                \"invalid frame operation\" )\n  FT_ERRORDEF_( Nested_Frame_Access,                         0x57, \\\n                \"nested frame access\" )\n  FT_ERRORDEF_( Invalid_Frame_Read,                          0x58, \\\n                \"invalid frame read\" )\n\n  /* raster errors */\n\n  FT_ERRORDEF_( Raster_Uninitialized,                        0x60, \\\n                \"raster uninitialized\" )\n  FT_ERRORDEF_( Raster_Corrupted,                            0x61, \\\n                \"raster corrupted\" )\n  FT_ERRORDEF_( Raster_Overflow,                             0x62, \\\n                \"raster overflow\" )\n  FT_ERRORDEF_( Raster_Negative_Height,                      0x63, \\\n                \"negative height while rastering\" )\n\n  /* cache errors */\n\n  FT_ERRORDEF_( Too_Many_Caches,                             0x70, \\\n                \"too many registered caches\" )\n\n  /* TrueType and SFNT errors */\n\n  FT_ERRORDEF_( Invalid_Opcode,                              0x80, \\\n                \"invalid opcode\" )\n  FT_ERRORDEF_( Too_Few_Arguments,                           0x81, \\\n                \"too few arguments\" )\n  FT_ERRORDEF_( Stack_Overflow,                              0x82, \\\n                \"stack overflow\" )\n  FT_ERRORDEF_( Code_Overflow,                               0x83, \\\n                \"code overflow\" )\n  FT_ERRORDEF_( Bad_Argument,                                0x84, \\\n                \"bad argument\" )\n  FT_ERRORDEF_( Divide_By_Zero,                              0x85, \\\n                \"division by zero\" )\n  FT_ERRORDEF_( Invalid_Reference,                           0x86, \\\n                \"invalid reference\" )\n  FT_ERRORDEF_( Debug_OpCode,                                0x87, \\\n                \"found debug opcode\" )\n  FT_ERRORDEF_( ENDF_In_Exec_Stream,                         0x88, \\\n                \"found ENDF opcode in execution stream\" )\n  FT_ERRORDEF_( Nested_DEFS,                                 0x89, \\\n                \"nested DEFS\" )\n  FT_ERRORDEF_( Invalid_CodeRange,                           0x8A, \\\n                \"invalid code range\" )\n  FT_ERRORDEF_( Execution_Too_Long,                          0x8B, \\\n                \"execution context too long\" )\n  FT_ERRORDEF_( Too_Many_Function_Defs,                      0x8C, \\\n                \"too many function definitions\" )\n  FT_ERRORDEF_( Too_Many_Instruction_Defs,                   0x8D, \\\n                \"too many instruction definitions\" )\n  FT_ERRORDEF_( Table_Missing,                               0x8E, \\\n                \"SFNT font table missing\" )\n  FT_ERRORDEF_( Horiz_Header_Missing,                        0x8F, \\\n                \"horizontal header (hhea) table missing\" )\n  FT_ERRORDEF_( Locations_Missing,                           0x90, \\\n                \"locations (loca) table missing\" )\n  FT_ERRORDEF_( Name_Table_Missing,                          0x91, \\\n                \"name table missing\" )\n  FT_ERRORDEF_( CMap_Table_Missing,                          0x92, \\\n                \"character map (cmap) table missing\" )\n  FT_ERRORDEF_( Hmtx_Table_Missing,                          0x93, \\\n                \"horizontal metrics (hmtx) table missing\" )\n  FT_ERRORDEF_( Post_Table_Missing,                          0x94, \\\n                \"PostScript (post) table missing\" )\n  FT_ERRORDEF_( Invalid_Horiz_Metrics,                       0x95, \\\n                \"invalid horizontal metrics\" )\n  FT_ERRORDEF_( Invalid_CharMap_Format,                      0x96, \\\n                \"invalid character map (cmap) format\" )\n  FT_ERRORDEF_( Invalid_PPem,                                0x97, \\\n                \"invalid ppem value\" )\n  FT_ERRORDEF_( Invalid_Vert_Metrics,                        0x98, \\\n                \"invalid vertical metrics\" )\n  FT_ERRORDEF_( Could_Not_Find_Context,                      0x99, \\\n                \"could not find context\" )\n  FT_ERRORDEF_( Invalid_Post_Table_Format,                   0x9A, \\\n                \"invalid PostScript (post) table format\" )\n  FT_ERRORDEF_( Invalid_Post_Table,                          0x9B, \\\n                \"invalid PostScript (post) table\" )\n\n  /* CFF, CID, and Type 1 errors */\n\n  FT_ERRORDEF_( Syntax_Error,                                0xA0, \\\n                \"opcode syntax error\" )\n  FT_ERRORDEF_( Stack_Underflow,                             0xA1, \\\n                \"argument stack underflow\" )\n  FT_ERRORDEF_( Ignore,                                      0xA2, \\\n                \"ignore\" )\n\n  /* BDF errors */\n\n  FT_ERRORDEF_( Missing_Startfont_Field,                     0xB0, \\\n                \"`STARTFONT' field missing\" )\n  FT_ERRORDEF_( Missing_Font_Field,                          0xB1, \\\n                \"`FONT' field missing\" )\n  FT_ERRORDEF_( Missing_Size_Field,                          0xB2, \\\n                \"`SIZE' field missing\" )\n  FT_ERRORDEF_( Missing_Chars_Field,                         0xB3, \\\n                \"`CHARS' field missing\" )\n  FT_ERRORDEF_( Missing_Startchar_Field,                     0xB4, \\\n                \"`STARTCHAR' field missing\" )\n  FT_ERRORDEF_( Missing_Encoding_Field,                      0xB5, \\\n                \"`ENCODING' field missing\" )\n  FT_ERRORDEF_( Missing_Bbx_Field,                           0xB6, \\\n                \"`BBX' field missing\" )\n  FT_ERRORDEF_( Bbx_Too_Big,                                 0xB7, \\\n                \"`BBX' too big\" )\n  FT_ERRORDEF_( Corrupted_Font_Header,                       0xB8, \\\n                \"Font header corrupted or missing fields\" )\n  FT_ERRORDEF_( Corrupted_Font_Glyphs,                       0xB9, \\\n                \"Font glyphs corrupted or missing fields\" )\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/fterrors.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  fterrors.h                                                             */\n/*                                                                         */\n/*    FreeType error code handling (specification).                        */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2004, 2007 by                               */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This special header file is used to define the handling of FT2        */\n  /* enumeration constants.  It can also be used to generate error message */\n  /* strings with a small macro trick explained below.                     */\n  /*                                                                       */\n  /* I - Error Formats                                                     */\n  /* -----------------                                                     */\n  /*                                                                       */\n  /*   The configuration macro FT_CONFIG_OPTION_USE_MODULE_ERRORS can be   */\n  /*   defined in ftoption.h in order to make the higher byte indicate     */\n  /*   the module where the error has happened (this is not compatible     */\n  /*   with standard builds of FreeType 2).  You can then use the macro    */\n  /*   FT_ERROR_BASE macro to extract the generic error code from an       */\n  /*   FT_Error value.                                                     */\n  /*                                                                       */\n  /*                                                                       */\n  /* II - Error Message strings                                            */\n  /* --------------------------                                            */\n  /*                                                                       */\n  /*   The error definitions below are made through special macros that    */\n  /*   allow client applications to build a table of error message strings */\n  /*   if they need it.  The strings are not included in a normal build of */\n  /*   FreeType 2 to save space (most client applications do not use       */\n  /*   them).                                                              */\n  /*                                                                       */\n  /*   To do so, you have to define the following macros before including  */\n  /*   this file:                                                          */\n  /*                                                                       */\n  /*   FT_ERROR_START_LIST ::                                              */\n  /*     This macro is called before anything else to define the start of  */\n  /*     the error list.  It is followed by several FT_ERROR_DEF calls     */\n  /*     (see below).                                                      */\n  /*                                                                       */\n  /*   FT_ERROR_DEF( e, v, s ) ::                                          */\n  /*     This macro is called to define one single error.                  */\n  /*     `e' is the error code identifier (e.g. FT_Err_Invalid_Argument).  */\n  /*     `v' is the error numerical value.                                 */\n  /*     `s' is the corresponding error string.                            */\n  /*                                                                       */\n  /*   FT_ERROR_END_LIST ::                                                */\n  /*     This macro ends the list.                                         */\n  /*                                                                       */\n  /*   Additionally, you have to undefine __FTERRORS_H__ before #including */\n  /*   this file.                                                          */\n  /*                                                                       */\n  /*   Here is a simple example:                                           */\n  /*                                                                       */\n  /*     {                                                                 */\n  /*       #undef __FTERRORS_H__                                           */\n  /*       #define FT_ERRORDEF( e, v, s )  { e, s },                       */\n  /*       #define FT_ERROR_START_LIST     {                               */\n  /*       #define FT_ERROR_END_LIST       { 0, 0 } };                     */\n  /*                                                                       */\n  /*       const struct                                                    */\n  /*       {                                                               */\n  /*         int          err_code;                                        */\n  /*         const char*  err_msg;                                         */\n  /*       } ft_errors[] =                                                 */\n  /*                                                                       */\n  /*       #include FT_ERRORS_H                                            */\n  /*     }                                                                 */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#ifndef __FTERRORS_H__\n#define __FTERRORS_H__\n\n\n  /* include module base error codes */\n#include FT_MODULE_ERRORS_H\n\n\n  /*******************************************************************/\n  /*******************************************************************/\n  /*****                                                         *****/\n  /*****                       SETUP MACROS                      *****/\n  /*****                                                         *****/\n  /*******************************************************************/\n  /*******************************************************************/\n\n\n#undef  FT_NEED_EXTERN_C\n\n#undef  FT_ERR_XCAT\n#undef  FT_ERR_CAT\n\n#define FT_ERR_XCAT( x, y )  x ## y\n#define FT_ERR_CAT( x, y )   FT_ERR_XCAT( x, y )\n\n\n  /* FT_ERR_PREFIX is used as a prefix for error identifiers. */\n  /* By default, we use `FT_Err_'.                            */\n  /*                                                          */\n#ifndef FT_ERR_PREFIX\n#define FT_ERR_PREFIX  FT_Err_\n#endif\n\n\n  /* FT_ERR_BASE is used as the base for module-specific errors. */\n  /*                                                             */\n#ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS\n\n#ifndef FT_ERR_BASE\n#define FT_ERR_BASE  FT_Mod_Err_Base\n#endif\n\n#else\n\n#undef FT_ERR_BASE\n#define FT_ERR_BASE  0\n\n#endif /* FT_CONFIG_OPTION_USE_MODULE_ERRORS */\n\n\n  /* If FT_ERRORDEF is not defined, we need to define a simple */\n  /* enumeration type.                                         */\n  /*                                                           */\n#ifndef FT_ERRORDEF\n\n#define FT_ERRORDEF( e, v, s )  e = v,\n#define FT_ERROR_START_LIST     enum {\n#define FT_ERROR_END_LIST       FT_ERR_CAT( FT_ERR_PREFIX, Max ) };\n\n#ifdef __cplusplus\n#define FT_NEED_EXTERN_C\n  extern \"C\" {\n#endif\n\n#endif /* !FT_ERRORDEF */\n\n\n  /* this macro is used to define an error */\n#define FT_ERRORDEF_( e, v, s )   \\\n          FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v + FT_ERR_BASE, s )\n\n  /* this is only used for <module>_Err_Ok, which must be 0! */\n#define FT_NOERRORDEF_( e, v, s ) \\\n          FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v, s )\n\n\n#ifdef FT_ERROR_START_LIST\n  FT_ERROR_START_LIST\n#endif\n\n\n  /* now include the error codes */\n#include FT_ERROR_DEFINITIONS_H\n\n\n#ifdef FT_ERROR_END_LIST\n  FT_ERROR_END_LIST\n#endif\n\n\n  /*******************************************************************/\n  /*******************************************************************/\n  /*****                                                         *****/\n  /*****                      SIMPLE CLEANUP                     *****/\n  /*****                                                         *****/\n  /*******************************************************************/\n  /*******************************************************************/\n\n#ifdef FT_NEED_EXTERN_C\n  }\n#endif\n\n#undef FT_ERROR_START_LIST\n#undef FT_ERROR_END_LIST\n\n#undef FT_ERRORDEF\n#undef FT_ERRORDEF_\n#undef FT_NOERRORDEF_\n\n#undef FT_NEED_EXTERN_C\n#undef FT_ERR_CONCAT\n#undef FT_ERR_BASE\n\n  /* FT_KEEP_ERR_PREFIX is needed for ftvalid.h */\n#ifndef FT_KEEP_ERR_PREFIX\n#undef FT_ERR_PREFIX\n#endif\n\n#endif /* __FTERRORS_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ftgasp.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftgasp.h                                                               */\n/*                                                                         */\n/*    Access of TrueType's `gasp' table (specification).                   */\n/*                                                                         */\n/*  Copyright 2007, 2008 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef _FT_GASP_H_\n#define _FT_GASP_H_\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\n  /***************************************************************************\n   *\n   * @section:\n   *   gasp_table\n   *\n   * @title:\n   *   Gasp Table\n   *\n   * @abstract:\n   *   Retrieving TrueType `gasp' table entries.\n   *\n   * @description:\n   *   The function @FT_Get_Gasp can be used to query a TrueType or OpenType\n   *   font for specific entries in its `gasp' table, if any.  This is\n   *   mainly useful when implementing native TrueType hinting with the\n   *   bytecode interpreter to duplicate the Windows text rendering results.\n   */\n\n  /*************************************************************************\n   *\n   * @enum:\n   *   FT_GASP_XXX\n   *\n   * @description:\n   *   A list of values and/or bit-flags returned by the @FT_Get_Gasp\n   *   function.\n   *\n   * @values:\n   *   FT_GASP_NO_TABLE ::\n   *     This special value means that there is no GASP table in this face.\n   *     It is up to the client to decide what to do.\n   *\n   *   FT_GASP_DO_GRIDFIT ::\n   *     Grid-fitting and hinting should be performed at the specified ppem.\n   *     This *really* means TrueType bytecode interpretation.\n   *\n   *   FT_GASP_DO_GRAY ::\n   *     Anti-aliased rendering should be performed at the specified ppem.\n   *\n   *   FT_GASP_SYMMETRIC_SMOOTHING ::\n   *     Smoothing along multiple axes must be used with ClearType.\n   *\n   *   FT_GASP_SYMMETRIC_GRIDFIT ::\n   *     Grid-fitting must be used with ClearType's symmetric smoothing.\n   *\n   * @note:\n   *   `ClearType' is Microsoft's implementation of LCD rendering, partly\n   *   protected by patents.\n   *\n   * @since:\n   *   2.3.0\n   */\n#define FT_GASP_NO_TABLE               -1\n#define FT_GASP_DO_GRIDFIT           0x01\n#define FT_GASP_DO_GRAY              0x02\n#define FT_GASP_SYMMETRIC_SMOOTHING  0x08\n#define FT_GASP_SYMMETRIC_GRIDFIT    0x10\n\n\n  /*************************************************************************\n   *\n   * @func:\n   *   FT_Get_Gasp\n   *\n   * @description:\n   *   Read the `gasp' table from a TrueType or OpenType font file and\n   *   return the entry corresponding to a given character pixel size.\n   *\n   * @input:\n   *   face :: The source face handle.\n   *   ppem :: The vertical character pixel size.\n   *\n   * @return:\n   *   Bit flags (see @FT_GASP_XXX), or @FT_GASP_NO_TABLE if there is no\n   *   `gasp' table in the face.\n   *\n   * @since:\n   *   2.3.0\n   */\n  FT_EXPORT( FT_Int )\n  FT_Get_Gasp( FT_Face  face,\n               FT_UInt  ppem );\n\n/* */\n\n#endif /* _FT_GASP_H_ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ftglyph.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftglyph.h                                                              */\n/*                                                                         */\n/*    FreeType convenience functions to handle glyphs (specification).     */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2003, 2006, 2008, 2009 by                   */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This file contains the definition of several convenience functions    */\n  /* that can be used by client applications to easily retrieve glyph      */\n  /* bitmaps and outlines from a given face.                               */\n  /*                                                                       */\n  /* These functions should be optional if you are writing a font server   */\n  /* or text layout engine on top of FreeType.  However, they are pretty   */\n  /* handy for many other simple uses of the library.                      */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#ifndef __FTGLYPH_H__\n#define __FTGLYPH_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    glyph_management                                                   */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    Glyph Management                                                   */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    Generic interface to manage individual glyph data.                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains definitions used to manage glyph data        */\n  /*    through generic FT_Glyph objects.  Each of them can contain a      */\n  /*    bitmap, a vector outline, or even images in other formats.         */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /* forward declaration to a private type */\n  typedef struct FT_Glyph_Class_  FT_Glyph_Class;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Glyph                                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Handle to an object used to model generic glyph images.  It is a   */\n  /*    pointer to the @FT_GlyphRec structure and can contain a glyph      */\n  /*    bitmap or pointer.                                                 */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Glyph objects are not owned by the library.  You must thus release */\n  /*    them manually (through @FT_Done_Glyph) _before_ calling            */\n  /*    @FT_Done_FreeType.                                                 */\n  /*                                                                       */\n  typedef struct FT_GlyphRec_*  FT_Glyph;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_GlyphRec                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The root glyph structure contains a given glyph image plus its     */\n  /*    advance width in 16.16 fixed float format.                         */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    library :: A handle to the FreeType library object.                */\n  /*                                                                       */\n  /*    clazz   :: A pointer to the glyph's class.  Private.               */\n  /*                                                                       */\n  /*    format  :: The format of the glyph's image.                        */\n  /*                                                                       */\n  /*    advance :: A 16.16 vector that gives the glyph's advance width.    */\n  /*                                                                       */\n  typedef struct  FT_GlyphRec_\n  {\n    FT_Library             library;\n    const FT_Glyph_Class*  clazz;\n    FT_Glyph_Format        format;\n    FT_Vector              advance;\n\n  } FT_GlyphRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_BitmapGlyph                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to an object used to model a bitmap glyph image.  This is */\n  /*    a sub-class of @FT_Glyph, and a pointer to @FT_BitmapGlyphRec.     */\n  /*                                                                       */\n  typedef struct FT_BitmapGlyphRec_*  FT_BitmapGlyph;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_BitmapGlyphRec                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used for bitmap glyph images.  This really is a        */\n  /*    `sub-class' of @FT_GlyphRec.                                       */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    root   :: The root @FT_Glyph fields.                               */\n  /*                                                                       */\n  /*    left   :: The left-side bearing, i.e., the horizontal distance     */\n  /*              from the current pen position to the left border of the  */\n  /*              glyph bitmap.                                            */\n  /*                                                                       */\n  /*    top    :: The top-side bearing, i.e., the vertical distance from   */\n  /*              the current pen position to the top border of the glyph  */\n  /*              bitmap.  This distance is positive for upwards~y!        */\n  /*                                                                       */\n  /*    bitmap :: A descriptor for the bitmap.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    You can typecast an @FT_Glyph to @FT_BitmapGlyph if you have       */\n  /*    `glyph->format == FT_GLYPH_FORMAT_BITMAP'.  This lets you access   */\n  /*    the bitmap's contents easily.                                      */\n  /*                                                                       */\n  /*    The corresponding pixel buffer is always owned by @FT_BitmapGlyph  */\n  /*    and is thus created and destroyed with it.                         */\n  /*                                                                       */\n  typedef struct  FT_BitmapGlyphRec_\n  {\n    FT_GlyphRec  root;\n    FT_Int       left;\n    FT_Int       top;\n    FT_Bitmap    bitmap;\n\n  } FT_BitmapGlyphRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_OutlineGlyph                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to an object used to model an outline glyph image.  This  */\n  /*    is a sub-class of @FT_Glyph, and a pointer to @FT_OutlineGlyphRec. */\n  /*                                                                       */\n  typedef struct FT_OutlineGlyphRec_*  FT_OutlineGlyph;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_OutlineGlyphRec                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used for outline (vectorial) glyph images.  This       */\n  /*    really is a `sub-class' of @FT_GlyphRec.                           */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    root    :: The root @FT_Glyph fields.                              */\n  /*                                                                       */\n  /*    outline :: A descriptor for the outline.                           */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    You can typecast an @FT_Glyph to @FT_OutlineGlyph if you have      */\n  /*    `glyph->format == FT_GLYPH_FORMAT_OUTLINE'.  This lets you access  */\n  /*    the outline's content easily.                                      */\n  /*                                                                       */\n  /*    As the outline is extracted from a glyph slot, its coordinates are */\n  /*    expressed normally in 26.6 pixels, unless the flag                 */\n  /*    @FT_LOAD_NO_SCALE was used in @FT_Load_Glyph() or @FT_Load_Char(). */\n  /*                                                                       */\n  /*    The outline's tables are always owned by the object and are        */\n  /*    destroyed with it.                                                 */\n  /*                                                                       */\n  typedef struct  FT_OutlineGlyphRec_\n  {\n    FT_GlyphRec  root;\n    FT_Outline   outline;\n\n  } FT_OutlineGlyphRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Glyph                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function used to extract a glyph image from a slot.  Note that   */\n  /*    the created @FT_Glyph object must be released with @FT_Done_Glyph. */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    slot   :: A handle to the source glyph slot.                       */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    aglyph :: A handle to the glyph object.                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Get_Glyph( FT_GlyphSlot  slot,\n                FT_Glyph     *aglyph );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Glyph_Copy                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function used to copy a glyph image.  Note that the created      */\n  /*    @FT_Glyph object must be released with @FT_Done_Glyph.             */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    source :: A handle to the source glyph object.                     */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    target :: A handle to the target glyph object.  0~in case of       */\n  /*              error.                                                   */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Glyph_Copy( FT_Glyph   source,\n                 FT_Glyph  *target );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Glyph_Transform                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Transform a glyph image if its format is scalable.                 */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    glyph  :: A handle to the target glyph object.                     */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    matrix :: A pointer to a 2x2 matrix to apply.                      */\n  /*                                                                       */\n  /*    delta  :: A pointer to a 2d vector to apply.  Coordinates are      */\n  /*              expressed in 1/64th of a pixel.                          */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code (if not 0, the glyph format is not scalable).  */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The 2x2 transformation matrix is also applied to the glyph's       */\n  /*    advance vector.                                                    */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Glyph_Transform( FT_Glyph    glyph,\n                      FT_Matrix*  matrix,\n                      FT_Vector*  delta );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    FT_Glyph_BBox_Mode                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The mode how the values of @FT_Glyph_Get_CBox are returned.        */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    FT_GLYPH_BBOX_UNSCALED ::                                          */\n  /*      Return unscaled font units.                                      */\n  /*                                                                       */\n  /*    FT_GLYPH_BBOX_SUBPIXELS ::                                         */\n  /*      Return unfitted 26.6 coordinates.                                */\n  /*                                                                       */\n  /*    FT_GLYPH_BBOX_GRIDFIT ::                                           */\n  /*      Return grid-fitted 26.6 coordinates.                             */\n  /*                                                                       */\n  /*    FT_GLYPH_BBOX_TRUNCATE ::                                          */\n  /*      Return coordinates in integer pixels.                            */\n  /*                                                                       */\n  /*    FT_GLYPH_BBOX_PIXELS ::                                            */\n  /*      Return grid-fitted pixel coordinates.                            */\n  /*                                                                       */\n  typedef enum  FT_Glyph_BBox_Mode_\n  {\n    FT_GLYPH_BBOX_UNSCALED  = 0,\n    FT_GLYPH_BBOX_SUBPIXELS = 0,\n    FT_GLYPH_BBOX_GRIDFIT   = 1,\n    FT_GLYPH_BBOX_TRUNCATE  = 2,\n    FT_GLYPH_BBOX_PIXELS    = 3\n\n  } FT_Glyph_BBox_Mode;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    ft_glyph_bbox_xxx                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    These constants are deprecated.  Use the corresponding             */\n  /*    @FT_Glyph_BBox_Mode values instead.                                */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*   ft_glyph_bbox_unscaled  :: See @FT_GLYPH_BBOX_UNSCALED.             */\n  /*   ft_glyph_bbox_subpixels :: See @FT_GLYPH_BBOX_SUBPIXELS.            */\n  /*   ft_glyph_bbox_gridfit   :: See @FT_GLYPH_BBOX_GRIDFIT.              */\n  /*   ft_glyph_bbox_truncate  :: See @FT_GLYPH_BBOX_TRUNCATE.             */\n  /*   ft_glyph_bbox_pixels    :: See @FT_GLYPH_BBOX_PIXELS.               */\n  /*                                                                       */\n#define ft_glyph_bbox_unscaled   FT_GLYPH_BBOX_UNSCALED\n#define ft_glyph_bbox_subpixels  FT_GLYPH_BBOX_SUBPIXELS\n#define ft_glyph_bbox_gridfit    FT_GLYPH_BBOX_GRIDFIT\n#define ft_glyph_bbox_truncate   FT_GLYPH_BBOX_TRUNCATE\n#define ft_glyph_bbox_pixels     FT_GLYPH_BBOX_PIXELS\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Glyph_Get_CBox                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return a glyph's `control box'.  The control box encloses all the  */\n  /*    outline's points, including Bézier control points.  Though it      */\n  /*    coincides with the exact bounding box for most glyphs, it can be   */\n  /*    slightly larger in some situations (like when rotating an outline  */\n  /*    which contains Bézier outside arcs).                               */\n  /*                                                                       */\n  /*    Computing the control box is very fast, while getting the bounding */\n  /*    box can take much more time as it needs to walk over all segments  */\n  /*    and arcs in the outline.  To get the latter, you can use the       */\n  /*    `ftbbox' component which is dedicated to this single task.         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    glyph :: A handle to the source glyph object.                      */\n  /*                                                                       */\n  /*    mode  :: The mode which indicates how to interpret the returned    */\n  /*             bounding box values.                                      */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    acbox :: The glyph coordinate bounding box.  Coordinates are       */\n  /*             expressed in 1/64th of pixels if it is grid-fitted.       */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Coordinates are relative to the glyph origin, using the y~upwards  */\n  /*    convention.                                                        */\n  /*                                                                       */\n  /*    If the glyph has been loaded with @FT_LOAD_NO_SCALE, `bbox_mode'   */\n  /*    must be set to @FT_GLYPH_BBOX_UNSCALED to get unscaled font        */\n  /*    units in 26.6 pixel format.  The value @FT_GLYPH_BBOX_SUBPIXELS    */\n  /*    is another name for this constant.                                 */\n  /*                                                                       */\n  /*    Note that the maximum coordinates are exclusive, which means that  */\n  /*    one can compute the width and height of the glyph image (be it in  */\n  /*    integer or 26.6 pixels) as:                                        */\n  /*                                                                       */\n  /*    {                                                                  */\n  /*      width  = bbox.xMax - bbox.xMin;                                  */\n  /*      height = bbox.yMax - bbox.yMin;                                  */\n  /*    }                                                                  */\n  /*                                                                       */\n  /*    Note also that for 26.6 coordinates, if `bbox_mode' is set to      */\n  /*    @FT_GLYPH_BBOX_GRIDFIT, the coordinates will also be grid-fitted,  */\n  /*    which corresponds to:                                              */\n  /*                                                                       */\n  /*    {                                                                  */\n  /*      bbox.xMin = FLOOR(bbox.xMin);                                    */\n  /*      bbox.yMin = FLOOR(bbox.yMin);                                    */\n  /*      bbox.xMax = CEILING(bbox.xMax);                                  */\n  /*      bbox.yMax = CEILING(bbox.yMax);                                  */\n  /*    }                                                                  */\n  /*                                                                       */\n  /*    To get the bbox in pixel coordinates, set `bbox_mode' to           */\n  /*    @FT_GLYPH_BBOX_TRUNCATE.                                           */\n  /*                                                                       */\n  /*    To get the bbox in grid-fitted pixel coordinates, set `bbox_mode'  */\n  /*    to @FT_GLYPH_BBOX_PIXELS.                                          */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_Glyph_Get_CBox( FT_Glyph  glyph,\n                     FT_UInt   bbox_mode,\n                     FT_BBox  *acbox );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Glyph_To_Bitmap                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Convert a given glyph object to a bitmap glyph object.             */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    the_glyph   :: A pointer to a handle to the target glyph.          */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    render_mode :: An enumeration that describes how the data is       */\n  /*                   rendered.                                           */\n  /*                                                                       */\n  /*    origin      :: A pointer to a vector used to translate the glyph   */\n  /*                   image before rendering.  Can be~0 (if no            */\n  /*                   translation).  The origin is expressed in           */\n  /*                   26.6 pixels.                                        */\n  /*                                                                       */\n  /*    destroy     :: A boolean that indicates that the original glyph    */\n  /*                   image should be destroyed by this function.  It is  */\n  /*                   never destroyed in case of error.                   */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This function does nothing if the glyph format isn't scalable.     */\n  /*                                                                       */\n  /*    The glyph image is translated with the `origin' vector before      */\n  /*    rendering.                                                         */\n  /*                                                                       */\n  /*    The first parameter is a pointer to an @FT_Glyph handle, that will */\n  /*    be _replaced_ by this function (with newly allocated data).        */\n  /*    Typically, you would use (omitting error handling):                */\n  /*                                                                       */\n  /*                                                                       */\n  /*      {                                                                */\n  /*        FT_Glyph        glyph;                                         */\n  /*        FT_BitmapGlyph  glyph_bitmap;                                  */\n  /*                                                                       */\n  /*                                                                       */\n  /*        // load glyph                                                  */\n  /*        error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAUT );     */\n  /*                                                                       */\n  /*        // extract glyph image                                         */\n  /*        error = FT_Get_Glyph( face->glyph, &glyph );                   */\n  /*                                                                       */\n  /*        // convert to a bitmap (default render mode + destroying old)  */\n  /*        if ( glyph->format != FT_GLYPH_FORMAT_BITMAP )                 */\n  /*        {                                                              */\n  /*          error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_DEFAULT,  */\n  /*                                      0, 1 );                          */\n  /*          if ( error ) // `glyph' unchanged                            */\n  /*            ...                                                        */\n  /*        }                                                              */\n  /*                                                                       */\n  /*        // access bitmap content by typecasting                        */\n  /*        glyph_bitmap = (FT_BitmapGlyph)glyph;                          */\n  /*                                                                       */\n  /*        // do funny stuff with it, like blitting/drawing               */\n  /*        ...                                                            */\n  /*                                                                       */\n  /*        // discard glyph image (bitmap or not)                         */\n  /*        FT_Done_Glyph( glyph );                                        */\n  /*      }                                                                */\n  /*                                                                       */\n  /*                                                                       */\n  /*    Here another example, again without error handling:                */\n  /*                                                                       */\n  /*                                                                       */\n  /*      {                                                                */\n  /*        FT_Glyph  glyphs[MAX_GLYPHS]                                   */\n  /*                                                                       */\n  /*                                                                       */\n  /*        ...                                                            */\n  /*                                                                       */\n  /*        for ( idx = 0; i < MAX_GLYPHS; i++ )                           */\n  /*          error = FT_Load_Glyph( face, idx, FT_LOAD_DEFAULT ) ||       */\n  /*                  FT_Get_Glyph ( face->glyph, &glyph[idx] );           */\n  /*                                                                       */\n  /*        ...                                                            */\n  /*                                                                       */\n  /*        for ( idx = 0; i < MAX_GLYPHS; i++ )                           */\n  /*        {                                                              */\n  /*          FT_Glyph  bitmap = glyphs[idx];                              */\n  /*                                                                       */\n  /*                                                                       */\n  /*          ...                                                          */\n  /*                                                                       */\n  /*          // after this call, `bitmap' no longer points into           */\n  /*          // the `glyphs' array (and the old value isn't destroyed)    */\n  /*          FT_Glyph_To_Bitmap( &bitmap, FT_RENDER_MODE_MONO, 0, 0 );    */\n  /*                                                                       */\n  /*          ...                                                          */\n  /*                                                                       */\n  /*          FT_Done_Glyph( bitmap );                                     */\n  /*        }                                                              */\n  /*                                                                       */\n  /*        ...                                                            */\n  /*                                                                       */\n  /*        for ( idx = 0; i < MAX_GLYPHS; i++ )                           */\n  /*          FT_Done_Glyph( glyphs[idx] );                                */\n  /*      }                                                                */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Glyph_To_Bitmap( FT_Glyph*       the_glyph,\n                      FT_Render_Mode  render_mode,\n                      FT_Vector*      origin,\n                      FT_Bool         destroy );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Done_Glyph                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Destroy a given glyph.                                             */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    glyph :: A handle to the target glyph object.                      */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_Done_Glyph( FT_Glyph  glyph );\n\n  /* */\n\n\n  /* other helpful functions */\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    computations                                                       */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Matrix_Multiply                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Perform the matrix operation `b = a*b'.                            */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    a :: A pointer to matrix `a'.                                      */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    b :: A pointer to matrix `b'.                                      */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The result is undefined if either `a' or `b' is zero.              */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_Matrix_Multiply( const FT_Matrix*  a,\n                      FT_Matrix*        b );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Matrix_Invert                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Invert a 2x2 matrix.  Return an error if it can't be inverted.     */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    matrix :: A pointer to the target matrix.  Remains untouched in    */\n  /*              case of error.                                           */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Matrix_Invert( FT_Matrix*  matrix );\n\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTGLYPH_H__ */\n\n\n/* END */\n\n\n/* Local Variables: */\n/* coding: utf-8    */\n/* End:             */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ftgxval.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftgxval.h                                                              */\n/*                                                                         */\n/*    FreeType API for validating TrueTypeGX/AAT tables (specification).   */\n/*                                                                         */\n/*  Copyright 2004, 2005, 2006 by                                          */\n/*  Masatake YAMATO, Redhat K.K,                                           */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n/***************************************************************************/\n/*                                                                         */\n/* gxvalid is derived from both gxlayout module and otvalid module.        */\n/* Development of gxlayout is supported by the Information-technology      */\n/* Promotion Agency(IPA), Japan.                                           */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTGXVAL_H__\n#define __FTGXVAL_H__\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    gx_validation                                                      */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    TrueTypeGX/AAT Validation                                          */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    An API to validate TrueTypeGX/AAT tables.                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains the declaration of functions to validate     */\n  /*    some TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd,  */\n  /*    trak, prop, lcar).                                                 */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*                                                                       */\n  /* Warning: Use FT_VALIDATE_XXX to validate a table.                     */\n  /*          Following definitions are for gxvalid developers.            */\n  /*                                                                       */\n  /*                                                                       */\n  /*************************************************************************/\n\n#define FT_VALIDATE_feat_INDEX     0\n#define FT_VALIDATE_mort_INDEX     1\n#define FT_VALIDATE_morx_INDEX     2\n#define FT_VALIDATE_bsln_INDEX     3\n#define FT_VALIDATE_just_INDEX     4\n#define FT_VALIDATE_kern_INDEX     5\n#define FT_VALIDATE_opbd_INDEX     6\n#define FT_VALIDATE_trak_INDEX     7\n#define FT_VALIDATE_prop_INDEX     8\n#define FT_VALIDATE_lcar_INDEX     9\n#define FT_VALIDATE_GX_LAST_INDEX  FT_VALIDATE_lcar_INDEX\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_VALIDATE_GX_LENGTH\n   *\n   * @description:\n   *   The number of tables checked in this module.  Use it as a parameter\n   *   for the `table-length' argument of function @FT_TrueTypeGX_Validate.\n   */\n#define FT_VALIDATE_GX_LENGTH     (FT_VALIDATE_GX_LAST_INDEX + 1)\n\n  /* */\n\n  /* Up to 0x1000 is used by otvalid.\n     Ox2xxx is reserved for feature OT extension. */\n#define FT_VALIDATE_GX_START 0x4000\n#define FT_VALIDATE_GX_BITFIELD( tag )                  \\\n  ( FT_VALIDATE_GX_START << FT_VALIDATE_##tag##_INDEX )\n\n\n /**********************************************************************\n  *\n  * @enum:\n  *    FT_VALIDATE_GXXXX\n  *\n  * @description:\n  *    A list of bit-field constants used with @FT_TrueTypeGX_Validate to\n  *    indicate which TrueTypeGX/AAT Type tables should be validated.\n  *\n  * @values:\n  *    FT_VALIDATE_feat ::\n  *      Validate `feat' table.\n  *\n  *    FT_VALIDATE_mort ::\n  *      Validate `mort' table.\n  *\n  *    FT_VALIDATE_morx ::\n  *      Validate `morx' table.\n  *\n  *    FT_VALIDATE_bsln ::\n  *      Validate `bsln' table.\n  *\n  *    FT_VALIDATE_just ::\n  *      Validate `just' table.\n  *\n  *    FT_VALIDATE_kern ::\n  *      Validate `kern' table.\n  *\n  *    FT_VALIDATE_opbd ::\n  *      Validate `opbd' table.\n  *\n  *    FT_VALIDATE_trak ::\n  *      Validate `trak' table.\n  *\n  *    FT_VALIDATE_prop ::\n  *      Validate `prop' table.\n  *\n  *    FT_VALIDATE_lcar ::\n  *      Validate `lcar' table.\n  *\n  *    FT_VALIDATE_GX ::\n  *      Validate all TrueTypeGX tables (feat, mort, morx, bsln, just, kern,\n  *      opbd, trak, prop and lcar).\n  *\n  */\n\n#define FT_VALIDATE_feat  FT_VALIDATE_GX_BITFIELD( feat )\n#define FT_VALIDATE_mort  FT_VALIDATE_GX_BITFIELD( mort )\n#define FT_VALIDATE_morx  FT_VALIDATE_GX_BITFIELD( morx )\n#define FT_VALIDATE_bsln  FT_VALIDATE_GX_BITFIELD( bsln )\n#define FT_VALIDATE_just  FT_VALIDATE_GX_BITFIELD( just )\n#define FT_VALIDATE_kern  FT_VALIDATE_GX_BITFIELD( kern )\n#define FT_VALIDATE_opbd  FT_VALIDATE_GX_BITFIELD( opbd )\n#define FT_VALIDATE_trak  FT_VALIDATE_GX_BITFIELD( trak )\n#define FT_VALIDATE_prop  FT_VALIDATE_GX_BITFIELD( prop )\n#define FT_VALIDATE_lcar  FT_VALIDATE_GX_BITFIELD( lcar )\n\n#define FT_VALIDATE_GX  ( FT_VALIDATE_feat | \\\n                          FT_VALIDATE_mort | \\\n                          FT_VALIDATE_morx | \\\n                          FT_VALIDATE_bsln | \\\n                          FT_VALIDATE_just | \\\n                          FT_VALIDATE_kern | \\\n                          FT_VALIDATE_opbd | \\\n                          FT_VALIDATE_trak | \\\n                          FT_VALIDATE_prop | \\\n                          FT_VALIDATE_lcar )\n\n\n  /* */\n\n /**********************************************************************\n  *\n  * @function:\n  *    FT_TrueTypeGX_Validate\n  *\n  * @description:\n  *    Validate various TrueTypeGX tables to assure that all offsets and\n  *    indices are valid.  The idea is that a higher-level library which\n  *    actually does the text layout can access those tables without\n  *    error checking (which can be quite time consuming).\n  *\n  * @input:\n  *    face ::\n  *       A handle to the input face.\n  *\n  *    validation_flags ::\n  *       A bit field which specifies the tables to be validated.  See\n  *       @FT_VALIDATE_GXXXX for possible values.\n  *\n  *    table_length ::\n  *       The size of the `tables' array.  Normally, @FT_VALIDATE_GX_LENGTH\n  *       should be passed.\n  *\n  * @output:\n  *    tables ::\n  *       The array where all validated sfnt tables are stored.\n  *       The array itself must be allocated by a client.\n  *\n  * @return:\n  *   FreeType error code.  0~means success.\n  *\n  * @note:\n  *   This function only works with TrueTypeGX fonts, returning an error\n  *   otherwise.\n  *\n  *   After use, the application should deallocate the buffers pointed to by\n  *   each `tables' element, by calling @FT_TrueTypeGX_Free.  A NULL value\n  *   indicates that the table either doesn't exist in the font, the\n  *   application hasn't asked for validation, or the validator doesn't have\n  *   the ability to validate the sfnt table.\n  */\n  FT_EXPORT( FT_Error )\n  FT_TrueTypeGX_Validate( FT_Face   face,\n                          FT_UInt   validation_flags,\n                          FT_Bytes  tables[FT_VALIDATE_GX_LENGTH],\n                          FT_UInt   table_length );\n\n\n  /* */\n\n /**********************************************************************\n  *\n  * @function:\n  *    FT_TrueTypeGX_Free\n  *\n  * @description:\n  *    Free the buffer allocated by TrueTypeGX validator.\n  *\n  * @input:\n  *    face ::\n  *       A handle to the input face.\n  *\n  *    table ::\n  *       The pointer to the buffer allocated by\n  *       @FT_TrueTypeGX_Validate.\n  *\n  * @note:\n  *   This function must be used to free the buffer allocated by\n  *   @FT_TrueTypeGX_Validate only.\n  */\n  FT_EXPORT( void )\n  FT_TrueTypeGX_Free( FT_Face   face,\n                      FT_Bytes  table );\n\n\n  /* */\n\n /**********************************************************************\n  *\n  * @enum:\n  *    FT_VALIDATE_CKERNXXX\n  *\n  * @description:\n  *    A list of bit-field constants used with @FT_ClassicKern_Validate\n  *    to indicate the classic kern dialect or dialects.  If the selected\n  *    type doesn't fit, @FT_ClassicKern_Validate regards the table as\n  *    invalid.\n  *\n  * @values:\n  *    FT_VALIDATE_MS ::\n  *      Handle the `kern' table as a classic Microsoft kern table.\n  *\n  *    FT_VALIDATE_APPLE ::\n  *      Handle the `kern' table as a classic Apple kern table.\n  *\n  *    FT_VALIDATE_CKERN ::\n  *      Handle the `kern' as either classic Apple or Microsoft kern table.\n  */\n#define FT_VALIDATE_MS     ( FT_VALIDATE_GX_START << 0 )\n#define FT_VALIDATE_APPLE  ( FT_VALIDATE_GX_START << 1 )\n\n#define FT_VALIDATE_CKERN  ( FT_VALIDATE_MS | FT_VALIDATE_APPLE )\n\n\n  /* */\n\n /**********************************************************************\n  *\n  * @function:\n  *    FT_ClassicKern_Validate\n  *\n  * @description:\n  *    Validate classic (16-bit format) kern table to assure that the offsets\n  *    and indices are valid.  The idea is that a higher-level library which\n  *    actually does the text layout can access those tables without error\n  *    checking (which can be quite time consuming).\n  *\n  *    The `kern' table validator in @FT_TrueTypeGX_Validate deals with both\n  *    the new 32-bit format and the classic 16-bit format, while\n  *    FT_ClassicKern_Validate only supports the classic 16-bit format.\n  *\n  * @input:\n  *    face ::\n  *       A handle to the input face.\n  *\n  *    validation_flags ::\n  *       A bit field which specifies the dialect to be validated.  See\n  *       @FT_VALIDATE_CKERNXXX for possible values.\n  *\n  * @output:\n  *    ckern_table ::\n  *       A pointer to the kern table.\n  *\n  * @return:\n  *   FreeType error code.  0~means success.\n  *\n  * @note:\n  *   After use, the application should deallocate the buffers pointed to by\n  *   `ckern_table', by calling @FT_ClassicKern_Free.  A NULL value\n  *   indicates that the table doesn't exist in the font.\n  */\n  FT_EXPORT( FT_Error )\n  FT_ClassicKern_Validate( FT_Face    face,\n                           FT_UInt    validation_flags,\n                           FT_Bytes  *ckern_table );\n\n\n  /* */\n\n /**********************************************************************\n  *\n  * @function:\n  *    FT_ClassicKern_Free\n  *\n  * @description:\n  *    Free the buffer allocated by classic Kern validator.\n  *\n  * @input:\n  *    face ::\n  *       A handle to the input face.\n  *\n  *    table ::\n  *       The pointer to the buffer that is allocated by\n  *       @FT_ClassicKern_Validate.\n  *\n  * @note:\n  *   This function must be used to free the buffer allocated by\n  *   @FT_ClassicKern_Validate only.\n  */\n  FT_EXPORT( void )\n  FT_ClassicKern_Free( FT_Face   face,\n                       FT_Bytes  table );\n\n\n /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTGXVAL_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ftgzip.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftgzip.h                                                               */\n/*                                                                         */\n/*    Gzip-compressed stream support.                                      */\n/*                                                                         */\n/*  Copyright 2002, 2003, 2004, 2006 by                                    */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTGZIP_H__\n#define __FTGZIP_H__\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    gzip                                                               */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    GZIP Streams                                                       */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    Using gzip-compressed font files.                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains the declaration of Gzip-specific functions.  */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n /************************************************************************\n  *\n  * @function:\n  *   FT_Stream_OpenGzip\n  *\n  * @description:\n  *   Open a new stream to parse gzip-compressed font files.  This is\n  *   mainly used to support the compressed `*.pcf.gz' fonts that come\n  *   with XFree86.\n  *\n  * @input:\n  *   stream ::\n  *     The target embedding stream.\n  *\n  *   source ::\n  *     The source stream.\n  *\n  * @return:\n  *   FreeType error code.  0~means success.\n  *\n  * @note:\n  *   The source stream must be opened _before_ calling this function.\n  *\n  *   Calling the internal function `FT_Stream_Close' on the new stream will\n  *   *not* call `FT_Stream_Close' on the source stream.  None of the stream\n  *   objects will be released to the heap.\n  *\n  *   The stream implementation is very basic and resets the decompression\n  *   process each time seeking backwards is needed within the stream.\n  *\n  *   In certain builds of the library, gzip compression recognition is\n  *   automatically handled when calling @FT_New_Face or @FT_Open_Face.\n  *   This means that if no font driver is capable of handling the raw\n  *   compressed file, the library will try to open a gzipped stream from\n  *   it and re-open the face with it.\n  *\n  *   This function may return `FT_Err_Unimplemented_Feature' if your build\n  *   of FreeType was not compiled with zlib support.\n  */\n  FT_EXPORT( FT_Error )\n  FT_Stream_OpenGzip( FT_Stream  stream,\n                      FT_Stream  source );\n\n /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTGZIP_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ftimage.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftimage.h                                                              */\n/*                                                                         */\n/*    FreeType glyph image formats and default raster interface            */\n/*    (specification).                                                     */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Note: A `raster' is simply a scan-line converter, used to render      */\n  /*       FT_Outlines into FT_Bitmaps.                                    */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#ifndef __FTIMAGE_H__\n#define __FTIMAGE_H__\n\n\n  /* _STANDALONE_ is from ftgrays.c */\n#ifndef _STANDALONE_\n#include <ft2build.h>\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    basic_types                                                        */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Pos                                                             */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The type FT_Pos is a 32-bit integer used to store vectorial        */\n  /*    coordinates.  Depending on the context, these can represent        */\n  /*    distances in integer font units, or 16.16, or 26.6 fixed float     */\n  /*    pixel coordinates.                                                 */\n  /*                                                                       */\n  typedef signed long  FT_Pos;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Vector                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A simple structure used to store a 2D vector; coordinates are of   */\n  /*    the FT_Pos type.                                                   */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    x :: The horizontal coordinate.                                    */\n  /*    y :: The vertical coordinate.                                      */\n  /*                                                                       */\n  typedef struct  FT_Vector_\n  {\n    FT_Pos  x;\n    FT_Pos  y;\n\n  } FT_Vector;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_BBox                                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to hold an outline's bounding box, i.e., the      */\n  /*    coordinates of its extrema in the horizontal and vertical          */\n  /*    directions.                                                        */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    xMin :: The horizontal minimum (left-most).                        */\n  /*                                                                       */\n  /*    yMin :: The vertical minimum (bottom-most).                        */\n  /*                                                                       */\n  /*    xMax :: The horizontal maximum (right-most).                       */\n  /*                                                                       */\n  /*    yMax :: The vertical maximum (top-most).                           */\n  /*                                                                       */\n  typedef struct  FT_BBox_\n  {\n    FT_Pos  xMin, yMin;\n    FT_Pos  xMax, yMax;\n\n  } FT_BBox;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    FT_Pixel_Mode                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    An enumeration type used to describe the format of pixels in a     */\n  /*    given bitmap.  Note that additional formats may be added in the    */\n  /*    future.                                                            */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    FT_PIXEL_MODE_NONE ::                                              */\n  /*      Value~0 is reserved.                                             */\n  /*                                                                       */\n  /*    FT_PIXEL_MODE_MONO ::                                              */\n  /*      A monochrome bitmap, using 1~bit per pixel.  Note that pixels    */\n  /*      are stored in most-significant order (MSB), which means that     */\n  /*      the left-most pixel in a byte has value 128.                     */\n  /*                                                                       */\n  /*    FT_PIXEL_MODE_GRAY ::                                              */\n  /*      An 8-bit bitmap, generally used to represent anti-aliased glyph  */\n  /*      images.  Each pixel is stored in one byte.  Note that the number */\n  /*      of `gray' levels is stored in the `num_grays' field of the       */\n  /*      @FT_Bitmap structure (it generally is 256).                      */\n  /*                                                                       */\n  /*    FT_PIXEL_MODE_GRAY2 ::                                             */\n  /*      A 2-bit per pixel bitmap, used to represent embedded             */\n  /*      anti-aliased bitmaps in font files according to the OpenType     */\n  /*      specification.  We haven't found a single font using this        */\n  /*      format, however.                                                 */\n  /*                                                                       */\n  /*    FT_PIXEL_MODE_GRAY4 ::                                             */\n  /*      A 4-bit per pixel bitmap, representing embedded anti-aliased     */\n  /*      bitmaps in font files according to the OpenType specification.   */\n  /*      We haven't found a single font using this format, however.       */\n  /*                                                                       */\n  /*    FT_PIXEL_MODE_LCD ::                                               */\n  /*      An 8-bit bitmap, representing RGB or BGR decimated glyph images  */\n  /*      used for display on LCD displays; the bitmap is three times      */\n  /*      wider than the original glyph image.  See also                   */\n  /*      @FT_RENDER_MODE_LCD.                                             */\n  /*                                                                       */\n  /*    FT_PIXEL_MODE_LCD_V ::                                             */\n  /*      An 8-bit bitmap, representing RGB or BGR decimated glyph images  */\n  /*      used for display on rotated LCD displays; the bitmap is three    */\n  /*      times taller than the original glyph image.  See also            */\n  /*      @FT_RENDER_MODE_LCD_V.                                           */\n  /*                                                                       */\n  typedef enum  FT_Pixel_Mode_\n  {\n    FT_PIXEL_MODE_NONE = 0,\n    FT_PIXEL_MODE_MONO,\n    FT_PIXEL_MODE_GRAY,\n    FT_PIXEL_MODE_GRAY2,\n    FT_PIXEL_MODE_GRAY4,\n    FT_PIXEL_MODE_LCD,\n    FT_PIXEL_MODE_LCD_V,\n\n    FT_PIXEL_MODE_MAX      /* do not remove */\n\n  } FT_Pixel_Mode;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    ft_pixel_mode_xxx                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A list of deprecated constants.  Use the corresponding             */\n  /*    @FT_Pixel_Mode values instead.                                     */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    ft_pixel_mode_none  :: See @FT_PIXEL_MODE_NONE.                    */\n  /*    ft_pixel_mode_mono  :: See @FT_PIXEL_MODE_MONO.                    */\n  /*    ft_pixel_mode_grays :: See @FT_PIXEL_MODE_GRAY.                    */\n  /*    ft_pixel_mode_pal2  :: See @FT_PIXEL_MODE_GRAY2.                   */\n  /*    ft_pixel_mode_pal4  :: See @FT_PIXEL_MODE_GRAY4.                   */\n  /*                                                                       */\n#define ft_pixel_mode_none   FT_PIXEL_MODE_NONE\n#define ft_pixel_mode_mono   FT_PIXEL_MODE_MONO\n#define ft_pixel_mode_grays  FT_PIXEL_MODE_GRAY\n#define ft_pixel_mode_pal2   FT_PIXEL_MODE_GRAY2\n#define ft_pixel_mode_pal4   FT_PIXEL_MODE_GRAY4\n\n /* */\n\n#if 0\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    FT_Palette_Mode                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    THIS TYPE IS DEPRECATED.  DO NOT USE IT!                           */\n  /*                                                                       */\n  /*    An enumeration type to describe the format of a bitmap palette,    */\n  /*    used with ft_pixel_mode_pal4 and ft_pixel_mode_pal8.               */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    ft_palette_mode_rgb  :: The palette is an array of 3-byte RGB      */\n  /*                            records.                                   */\n  /*                                                                       */\n  /*    ft_palette_mode_rgba :: The palette is an array of 4-byte RGBA     */\n  /*                            records.                                   */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    As ft_pixel_mode_pal2, pal4 and pal8 are currently unused by       */\n  /*    FreeType, these types are not handled by the library itself.       */\n  /*                                                                       */\n  typedef enum  FT_Palette_Mode_\n  {\n    ft_palette_mode_rgb = 0,\n    ft_palette_mode_rgba,\n\n    ft_palette_mode_max   /* do not remove */\n\n  } FT_Palette_Mode;\n\n  /* */\n\n#endif\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Bitmap                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to describe a bitmap or pixmap to the raster.     */\n  /*    Note that we now manage pixmaps of various depths through the      */\n  /*    `pixel_mode' field.                                                */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    rows         :: The number of bitmap rows.                         */\n  /*                                                                       */\n  /*    width        :: The number of pixels in bitmap row.                */\n  /*                                                                       */\n  /*    pitch        :: The pitch's absolute value is the number of bytes  */\n  /*                    taken by one bitmap row, including padding.        */\n  /*                    However, the pitch is positive when the bitmap has */\n  /*                    a `down' flow, and negative when it has an `up'    */\n  /*                    flow.  In all cases, the pitch is an offset to add */\n  /*                    to a bitmap pointer in order to go down one row.   */\n  /*                                                                       */\n  /*    buffer       :: A typeless pointer to the bitmap buffer.  This     */\n  /*                    value should be aligned on 32-bit boundaries in    */\n  /*                    most cases.                                        */\n  /*                                                                       */\n  /*    num_grays    :: This field is only used with                       */\n  /*                    @FT_PIXEL_MODE_GRAY; it gives the number of gray   */\n  /*                    levels used in the bitmap.                         */\n  /*                                                                       */\n  /*    pixel_mode   :: The pixel mode, i.e., how pixel bits are stored.   */\n  /*                    See @FT_Pixel_Mode for possible values.            */\n  /*                                                                       */\n  /*    palette_mode :: This field is intended for paletted pixel modes;   */\n  /*                    it indicates how the palette is stored.  Not       */\n  /*                    used currently.                                    */\n  /*                                                                       */\n  /*    palette      :: A typeless pointer to the bitmap palette; this     */\n  /*                    field is intended for paletted pixel modes.  Not   */\n  /*                    used currently.                                    */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*   For now, the only pixel modes supported by FreeType are mono and    */\n  /*   grays.  However, drivers might be added in the future to support    */\n  /*   more `colorful' options.                                            */\n  /*                                                                       */\n  typedef struct  FT_Bitmap_\n  {\n    int             rows;\n    int             width;\n    int             pitch;\n    unsigned char*  buffer;\n    short           num_grays;\n    char            pixel_mode;\n    char            palette_mode;\n    void*           palette;\n\n  } FT_Bitmap;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    outline_processing                                                 */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Outline                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This structure is used to describe an outline to the scan-line     */\n  /*    converter.                                                         */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    n_contours :: The number of contours in the outline.               */\n  /*                                                                       */\n  /*    n_points   :: The number of points in the outline.                 */\n  /*                                                                       */\n  /*    points     :: A pointer to an array of `n_points' @FT_Vector       */\n  /*                  elements, giving the outline's point coordinates.    */\n  /*                                                                       */\n  /*    tags       :: A pointer to an array of `n_points' chars, giving    */\n  /*                  each outline point's type.                           */\n  /*                                                                       */\n  /*                  If bit~0 is unset, the point is `off' the curve,     */\n  /*                  i.e., a Bézier control point, while it is `on' if    */\n  /*                  set.                                                 */\n  /*                                                                       */\n  /*                  Bit~1 is meaningful for `off' points only.  If set,  */\n  /*                  it indicates a third-order Bézier arc control point; */\n  /*                  and a second-order control point if unset.           */\n  /*                                                                       */\n  /*                  If bit~2 is set, bits 5-7 contain the drop-out mode  */\n  /*                  (as defined in the OpenType specification; the value */\n  /*                  is the same as the argument to the SCANMODE          */\n  /*                  instruction).                                        */\n  /*                                                                       */\n  /*                  Bits 3 and~4 are reserved for internal purposes.     */\n  /*                                                                       */\n  /*    contours   :: An array of `n_contours' shorts, giving the end      */\n  /*                  point of each contour within the outline.  For       */\n  /*                  example, the first contour is defined by the points  */\n  /*                  `0' to `contours[0]', the second one is defined by   */\n  /*                  the points `contours[0]+1' to `contours[1]', etc.    */\n  /*                                                                       */\n  /*    flags      :: A set of bit flags used to characterize the outline  */\n  /*                  and give hints to the scan-converter and hinter on   */\n  /*                  how to convert/grid-fit it.  See @FT_OUTLINE_FLAGS.  */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The B/W rasterizer only checks bit~2 in the `tags' array for the   */\n  /*    first point of each contour.  The drop-out mode as given with      */\n  /*    @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, and       */\n  /*    @FT_OUTLINE_INCLUDE_STUBS in `flags' is then overridden.           */\n  /*                                                                       */\n  typedef struct  FT_Outline_\n  {\n    short       n_contours;      /* number of contours in glyph        */\n    short       n_points;        /* number of points in the glyph      */\n\n    FT_Vector*  points;          /* the outline's points               */\n    char*       tags;            /* the points flags                   */\n    short*      contours;        /* the contour end points             */\n\n    int         flags;           /* outline masks                      */\n\n  } FT_Outline;\n\n  /* Following limits must be consistent with */\n  /* FT_Outline.{n_contours,n_points}         */\n#define FT_OUTLINE_CONTOURS_MAX  SHRT_MAX\n#define FT_OUTLINE_POINTS_MAX    SHRT_MAX\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    FT_OUTLINE_FLAGS                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A list of bit-field constants use for the flags in an outline's    */\n  /*    `flags' field.                                                     */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    FT_OUTLINE_NONE ::                                                 */\n  /*      Value~0 is reserved.                                             */\n  /*                                                                       */\n  /*    FT_OUTLINE_OWNER ::                                                */\n  /*      If set, this flag indicates that the outline's field arrays      */\n  /*      (i.e., `points', `flags', and `contours') are `owned' by the     */\n  /*      outline object, and should thus be freed when it is destroyed.   */\n  /*                                                                       */\n  /*    FT_OUTLINE_EVEN_ODD_FILL ::                                        */\n  /*      By default, outlines are filled using the non-zero winding rule. */\n  /*      If set to 1, the outline will be filled using the even-odd fill  */\n  /*      rule (only works with the smooth rasterizer).                    */\n  /*                                                                       */\n  /*    FT_OUTLINE_REVERSE_FILL ::                                         */\n  /*      By default, outside contours of an outline are oriented in       */\n  /*      clock-wise direction, as defined in the TrueType specification.  */\n  /*      This flag is set if the outline uses the opposite direction      */\n  /*      (typically for Type~1 fonts).  This flag is ignored by the scan  */\n  /*      converter.                                                       */\n  /*                                                                       */\n  /*    FT_OUTLINE_IGNORE_DROPOUTS ::                                      */\n  /*      By default, the scan converter will try to detect drop-outs in   */\n  /*      an outline and correct the glyph bitmap to ensure consistent     */\n  /*      shape continuity.  If set, this flag hints the scan-line         */\n  /*      converter to ignore such cases.  See below for more information. */\n  /*                                                                       */\n  /*    FT_OUTLINE_SMART_DROPOUTS ::                                       */\n  /*      Select smart dropout control.  If unset, use simple dropout      */\n  /*      control.  Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set.  See    */\n  /*      below for more information.                                      */\n  /*                                                                       */\n  /*    FT_OUTLINE_INCLUDE_STUBS ::                                        */\n  /*      If set, turn pixels on for `stubs', otherwise exclude them.      */\n  /*      Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set.  See below for    */\n  /*      more information.                                                */\n  /*                                                                       */\n  /*    FT_OUTLINE_HIGH_PRECISION ::                                       */\n  /*      This flag indicates that the scan-line converter should try to   */\n  /*      convert this outline to bitmaps with the highest possible        */\n  /*      quality.  It is typically set for small character sizes.  Note   */\n  /*      that this is only a hint that might be completely ignored by a   */\n  /*      given scan-converter.                                            */\n  /*                                                                       */\n  /*    FT_OUTLINE_SINGLE_PASS ::                                          */\n  /*      This flag is set to force a given scan-converter to only use a   */\n  /*      single pass over the outline to render a bitmap glyph image.     */\n  /*      Normally, it is set for very large character sizes.  It is only  */\n  /*      a hint that might be completely ignored by a given               */\n  /*      scan-converter.                                                  */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The flags @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, */\n  /*    and @FT_OUTLINE_INCLUDE_STUBS are ignored by the smooth            */\n  /*    rasterizer.                                                        */\n  /*                                                                       */\n  /*    There exists a second mechanism to pass the drop-out mode to the   */\n  /*    B/W rasterizer; see the `tags' field in @FT_Outline.               */\n  /*                                                                       */\n  /*    Please refer to the description of the `SCANTYPE' instruction in   */\n  /*    the OpenType specification (in file `ttinst1.doc') how simple      */\n  /*    drop-outs, smart drop-outs, and stubs are defined.                 */\n  /*                                                                       */\n#define FT_OUTLINE_NONE             0x0\n#define FT_OUTLINE_OWNER            0x1\n#define FT_OUTLINE_EVEN_ODD_FILL    0x2\n#define FT_OUTLINE_REVERSE_FILL     0x4\n#define FT_OUTLINE_IGNORE_DROPOUTS  0x8\n#define FT_OUTLINE_SMART_DROPOUTS   0x10\n#define FT_OUTLINE_INCLUDE_STUBS    0x20\n\n#define FT_OUTLINE_HIGH_PRECISION   0x100\n#define FT_OUTLINE_SINGLE_PASS      0x200\n\n\n /*************************************************************************\n  *\n  * @enum:\n  *   ft_outline_flags\n  *\n  * @description:\n  *   These constants are deprecated.  Please use the corresponding\n  *   @FT_OUTLINE_FLAGS values.\n  *\n  * @values:\n  *   ft_outline_none            :: See @FT_OUTLINE_NONE.\n  *   ft_outline_owner           :: See @FT_OUTLINE_OWNER.\n  *   ft_outline_even_odd_fill   :: See @FT_OUTLINE_EVEN_ODD_FILL.\n  *   ft_outline_reverse_fill    :: See @FT_OUTLINE_REVERSE_FILL.\n  *   ft_outline_ignore_dropouts :: See @FT_OUTLINE_IGNORE_DROPOUTS.\n  *   ft_outline_high_precision  :: See @FT_OUTLINE_HIGH_PRECISION.\n  *   ft_outline_single_pass     :: See @FT_OUTLINE_SINGLE_PASS.\n  */\n#define ft_outline_none             FT_OUTLINE_NONE\n#define ft_outline_owner            FT_OUTLINE_OWNER\n#define ft_outline_even_odd_fill    FT_OUTLINE_EVEN_ODD_FILL\n#define ft_outline_reverse_fill     FT_OUTLINE_REVERSE_FILL\n#define ft_outline_ignore_dropouts  FT_OUTLINE_IGNORE_DROPOUTS\n#define ft_outline_high_precision   FT_OUTLINE_HIGH_PRECISION\n#define ft_outline_single_pass      FT_OUTLINE_SINGLE_PASS\n\n  /* */\n\n#define FT_CURVE_TAG( flag )  ( flag & 3 )\n\n#define FT_CURVE_TAG_ON            1\n#define FT_CURVE_TAG_CONIC         0\n#define FT_CURVE_TAG_CUBIC         2\n\n#define FT_CURVE_TAG_HAS_SCANMODE  4\n\n#define FT_CURVE_TAG_TOUCH_X       8  /* reserved for the TrueType hinter */\n#define FT_CURVE_TAG_TOUCH_Y      16  /* reserved for the TrueType hinter */\n\n#define FT_CURVE_TAG_TOUCH_BOTH    ( FT_CURVE_TAG_TOUCH_X | \\\n                                     FT_CURVE_TAG_TOUCH_Y )\n\n#define FT_Curve_Tag_On       FT_CURVE_TAG_ON\n#define FT_Curve_Tag_Conic    FT_CURVE_TAG_CONIC\n#define FT_Curve_Tag_Cubic    FT_CURVE_TAG_CUBIC\n#define FT_Curve_Tag_Touch_X  FT_CURVE_TAG_TOUCH_X\n#define FT_Curve_Tag_Touch_Y  FT_CURVE_TAG_TOUCH_Y\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_Outline_MoveToFunc                                              */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function pointer type used to describe the signature of a `move  */\n  /*    to' function during outline walking/decomposition.                 */\n  /*                                                                       */\n  /*    A `move to' is emitted to start a new contour in an outline.       */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    to   :: A pointer to the target point of the `move to'.            */\n  /*                                                                       */\n  /*    user :: A typeless pointer which is passed from the caller of the  */\n  /*            decomposition function.                                    */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    Error code.  0~means success.                                      */\n  /*                                                                       */\n  typedef int\n  (*FT_Outline_MoveToFunc)( const FT_Vector*  to,\n                            void*             user );\n\n#define FT_Outline_MoveTo_Func  FT_Outline_MoveToFunc\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_Outline_LineToFunc                                              */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function pointer type used to describe the signature of a `line  */\n  /*    to' function during outline walking/decomposition.                 */\n  /*                                                                       */\n  /*    A `line to' is emitted to indicate a segment in the outline.       */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    to   :: A pointer to the target point of the `line to'.            */\n  /*                                                                       */\n  /*    user :: A typeless pointer which is passed from the caller of the  */\n  /*            decomposition function.                                    */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    Error code.  0~means success.                                      */\n  /*                                                                       */\n  typedef int\n  (*FT_Outline_LineToFunc)( const FT_Vector*  to,\n                            void*             user );\n\n#define FT_Outline_LineTo_Func  FT_Outline_LineToFunc\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_Outline_ConicToFunc                                             */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function pointer type use to describe the signature of a `conic  */\n  /*    to' function during outline walking/decomposition.                 */\n  /*                                                                       */\n  /*    A `conic to' is emitted to indicate a second-order Bézier arc in   */\n  /*    the outline.                                                       */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    control :: An intermediate control point between the last position */\n  /*               and the new target in `to'.                             */\n  /*                                                                       */\n  /*    to      :: A pointer to the target end point of the conic arc.     */\n  /*                                                                       */\n  /*    user    :: A typeless pointer which is passed from the caller of   */\n  /*               the decomposition function.                             */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    Error code.  0~means success.                                      */\n  /*                                                                       */\n  typedef int\n  (*FT_Outline_ConicToFunc)( const FT_Vector*  control,\n                             const FT_Vector*  to,\n                             void*             user );\n\n#define FT_Outline_ConicTo_Func  FT_Outline_ConicToFunc\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_Outline_CubicToFunc                                             */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function pointer type used to describe the signature of a `cubic */\n  /*    to' function during outline walking/decomposition.                 */\n  /*                                                                       */\n  /*    A `cubic to' is emitted to indicate a third-order Bézier arc.      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    control1 :: A pointer to the first Bézier control point.           */\n  /*                                                                       */\n  /*    control2 :: A pointer to the second Bézier control point.          */\n  /*                                                                       */\n  /*    to       :: A pointer to the target end point.                     */\n  /*                                                                       */\n  /*    user     :: A typeless pointer which is passed from the caller of  */\n  /*                the decomposition function.                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    Error code.  0~means success.                                      */\n  /*                                                                       */\n  typedef int\n  (*FT_Outline_CubicToFunc)( const FT_Vector*  control1,\n                             const FT_Vector*  control2,\n                             const FT_Vector*  to,\n                             void*             user );\n\n#define FT_Outline_CubicTo_Func  FT_Outline_CubicToFunc\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Outline_Funcs                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure to hold various function pointers used during outline  */\n  /*    decomposition in order to emit segments, conic, and cubic Béziers, */\n  /*    as well as `move to' and `close to' operations.                    */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    move_to  :: The `move to' emitter.                                 */\n  /*                                                                       */\n  /*    line_to  :: The segment emitter.                                   */\n  /*                                                                       */\n  /*    conic_to :: The second-order Bézier arc emitter.                   */\n  /*                                                                       */\n  /*    cubic_to :: The third-order Bézier arc emitter.                    */\n  /*                                                                       */\n  /*    shift    :: The shift that is applied to coordinates before they   */\n  /*                are sent to the emitter.                               */\n  /*                                                                       */\n  /*    delta    :: The delta that is applied to coordinates before they   */\n  /*                are sent to the emitter, but after the shift.          */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The point coordinates sent to the emitters are the transformed     */\n  /*    version of the original coordinates (this is important for high    */\n  /*    accuracy during scan-conversion).  The transformation is simple:   */\n  /*                                                                       */\n  /*    {                                                                  */\n  /*      x' = (x << shift) - delta                                        */\n  /*      y' = (x << shift) - delta                                        */\n  /*    }                                                                  */\n  /*                                                                       */\n  /*    Set the value of `shift' and `delta' to~0 to get the original      */\n  /*    point coordinates.                                                 */\n  /*                                                                       */\n  typedef struct  FT_Outline_Funcs_\n  {\n    FT_Outline_MoveToFunc   move_to;\n    FT_Outline_LineToFunc   line_to;\n    FT_Outline_ConicToFunc  conic_to;\n    FT_Outline_CubicToFunc  cubic_to;\n\n    int                     shift;\n    FT_Pos                  delta;\n\n  } FT_Outline_Funcs;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    basic_types                                                        */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Macro>                                                               */\n  /*    FT_IMAGE_TAG                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This macro converts four-letter tags to an unsigned long type.     */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Since many 16-bit compilers don't like 32-bit enumerations, you    */\n  /*    should redefine this macro in case of problems to something like   */\n  /*    this:                                                              */\n  /*                                                                       */\n  /*    {                                                                  */\n  /*      #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 )  value         */\n  /*    }                                                                  */\n  /*                                                                       */\n  /*    to get a simple enumeration without assigning special numbers.     */\n  /*                                                                       */\n#ifndef FT_IMAGE_TAG\n#define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 )  \\\n          value = ( ( (unsigned long)_x1 << 24 ) | \\\n                    ( (unsigned long)_x2 << 16 ) | \\\n                    ( (unsigned long)_x3 << 8  ) | \\\n                      (unsigned long)_x4         )\n#endif /* FT_IMAGE_TAG */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    FT_Glyph_Format                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    An enumeration type used to describe the format of a given glyph   */\n  /*    image.  Note that this version of FreeType only supports two image */\n  /*    formats, even though future font drivers will be able to register  */\n  /*    their own format.                                                  */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    FT_GLYPH_FORMAT_NONE ::                                            */\n  /*      The value~0 is reserved.                                         */\n  /*                                                                       */\n  /*    FT_GLYPH_FORMAT_COMPOSITE ::                                       */\n  /*      The glyph image is a composite of several other images.  This    */\n  /*      format is _only_ used with @FT_LOAD_NO_RECURSE, and is used to   */\n  /*      report compound glyphs (like accented characters).               */\n  /*                                                                       */\n  /*    FT_GLYPH_FORMAT_BITMAP ::                                          */\n  /*      The glyph image is a bitmap, and can be described as an          */\n  /*      @FT_Bitmap.  You generally need to access the `bitmap' field of  */\n  /*      the @FT_GlyphSlotRec structure to read it.                       */\n  /*                                                                       */\n  /*    FT_GLYPH_FORMAT_OUTLINE ::                                         */\n  /*      The glyph image is a vectorial outline made of line segments     */\n  /*      and Bézier arcs; it can be described as an @FT_Outline; you      */\n  /*      generally want to access the `outline' field of the              */\n  /*      @FT_GlyphSlotRec structure to read it.                           */\n  /*                                                                       */\n  /*    FT_GLYPH_FORMAT_PLOTTER ::                                         */\n  /*      The glyph image is a vectorial path with no inside and outside   */\n  /*      contours.  Some Type~1 fonts, like those in the Hershey family,  */\n  /*      contain glyphs in this format.  These are described as           */\n  /*      @FT_Outline, but FreeType isn't currently capable of rendering   */\n  /*      them correctly.                                                  */\n  /*                                                                       */\n  typedef enum  FT_Glyph_Format_\n  {\n    FT_IMAGE_TAG( FT_GLYPH_FORMAT_NONE, 0, 0, 0, 0 ),\n\n    FT_IMAGE_TAG( FT_GLYPH_FORMAT_COMPOSITE, 'c', 'o', 'm', 'p' ),\n    FT_IMAGE_TAG( FT_GLYPH_FORMAT_BITMAP,    'b', 'i', 't', 's' ),\n    FT_IMAGE_TAG( FT_GLYPH_FORMAT_OUTLINE,   'o', 'u', 't', 'l' ),\n    FT_IMAGE_TAG( FT_GLYPH_FORMAT_PLOTTER,   'p', 'l', 'o', 't' )\n\n  } FT_Glyph_Format;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    ft_glyph_format_xxx                                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A list of deprecated constants.  Use the corresponding             */\n  /*    @FT_Glyph_Format values instead.                                   */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    ft_glyph_format_none      :: See @FT_GLYPH_FORMAT_NONE.            */\n  /*    ft_glyph_format_composite :: See @FT_GLYPH_FORMAT_COMPOSITE.       */\n  /*    ft_glyph_format_bitmap    :: See @FT_GLYPH_FORMAT_BITMAP.          */\n  /*    ft_glyph_format_outline   :: See @FT_GLYPH_FORMAT_OUTLINE.         */\n  /*    ft_glyph_format_plotter   :: See @FT_GLYPH_FORMAT_PLOTTER.         */\n  /*                                                                       */\n#define ft_glyph_format_none       FT_GLYPH_FORMAT_NONE\n#define ft_glyph_format_composite  FT_GLYPH_FORMAT_COMPOSITE\n#define ft_glyph_format_bitmap     FT_GLYPH_FORMAT_BITMAP\n#define ft_glyph_format_outline    FT_GLYPH_FORMAT_OUTLINE\n#define ft_glyph_format_plotter    FT_GLYPH_FORMAT_PLOTTER\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*****                                                               *****/\n  /*****            R A S T E R   D E F I N I T I O N S                *****/\n  /*****                                                               *****/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* A raster is a scan converter, in charge of rendering an outline into  */\n  /* a a bitmap.  This section contains the public API for rasters.        */\n  /*                                                                       */\n  /* Note that in FreeType 2, all rasters are now encapsulated within      */\n  /* specific modules called `renderers'.  See `freetype/ftrender.h' for   */\n  /* more details on renderers.                                            */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    raster                                                             */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    Scanline Converter                                                 */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    How vectorial outlines are converted into bitmaps and pixmaps.     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains technical definitions.                       */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Raster                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle (pointer) to a raster object.  Each object can be used    */\n  /*    independently to convert an outline into a bitmap or pixmap.       */\n  /*                                                                       */\n  typedef struct FT_RasterRec_*  FT_Raster;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Span                                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to model a single span of gray (or black) pixels  */\n  /*    when rendering a monochrome or anti-aliased bitmap.                */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    x        :: The span's horizontal start position.                  */\n  /*                                                                       */\n  /*    len      :: The span's length in pixels.                           */\n  /*                                                                       */\n  /*    coverage :: The span color/coverage, ranging from 0 (background)   */\n  /*                to 255 (foreground).  Only used for anti-aliased       */\n  /*                rendering.                                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This structure is used by the span drawing callback type named     */\n  /*    @FT_SpanFunc which takes the y~coordinate of the span as a         */\n  /*    a parameter.                                                       */\n  /*                                                                       */\n  /*    The coverage value is always between 0 and 255.  If you want less  */\n  /*    gray values, the callback function has to reduce them.             */\n  /*                                                                       */\n  typedef struct  FT_Span_\n  {\n    short           x;\n    unsigned short  len;\n    unsigned char   coverage;\n\n  } FT_Span;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_SpanFunc                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function used as a call-back by the anti-aliased renderer in     */\n  /*    order to let client applications draw themselves the gray pixel    */\n  /*    spans on each scan line.                                           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    y     :: The scanline's y~coordinate.                              */\n  /*                                                                       */\n  /*    count :: The number of spans to draw on this scanline.             */\n  /*                                                                       */\n  /*    spans :: A table of `count' spans to draw on the scanline.         */\n  /*                                                                       */\n  /*    user  :: User-supplied data that is passed to the callback.        */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This callback allows client applications to directly render the    */\n  /*    gray spans of the anti-aliased bitmap to any kind of surfaces.     */\n  /*                                                                       */\n  /*    This can be used to write anti-aliased outlines directly to a      */\n  /*    given background bitmap, and even perform translucency.            */\n  /*                                                                       */\n  /*    Note that the `count' field cannot be greater than a fixed value   */\n  /*    defined by the `FT_MAX_GRAY_SPANS' configuration macro in          */\n  /*    `ftoption.h'.  By default, this value is set to~32, which means    */\n  /*    that if there are more than 32~spans on a given scanline, the      */\n  /*    callback is called several times with the same `y' parameter in    */\n  /*    order to draw all callbacks.                                       */\n  /*                                                                       */\n  /*    Otherwise, the callback is only called once per scan-line, and     */\n  /*    only for those scanlines that do have `gray' pixels on them.       */\n  /*                                                                       */\n  typedef void\n  (*FT_SpanFunc)( int             y,\n                  int             count,\n                  const FT_Span*  spans,\n                  void*           user );\n\n#define FT_Raster_Span_Func  FT_SpanFunc\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_Raster_BitTest_Func                                             */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    THIS TYPE IS DEPRECATED.  DO NOT USE IT.                           */\n  /*                                                                       */\n  /*    A function used as a call-back by the monochrome scan-converter    */\n  /*    to test whether a given target pixel is already set to the drawing */\n  /*    `color'.  These tests are crucial to implement drop-out control    */\n  /*    per-se the TrueType spec.                                          */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    y     :: The pixel's y~coordinate.                                 */\n  /*                                                                       */\n  /*    x     :: The pixel's x~coordinate.                                 */\n  /*                                                                       */\n  /*    user  :: User-supplied data that is passed to the callback.        */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*   1~if the pixel is `set', 0~otherwise.                               */\n  /*                                                                       */\n  typedef int\n  (*FT_Raster_BitTest_Func)( int    y,\n                             int    x,\n                             void*  user );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_Raster_BitSet_Func                                              */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    THIS TYPE IS DEPRECATED.  DO NOT USE IT.                           */\n  /*                                                                       */\n  /*    A function used as a call-back by the monochrome scan-converter    */\n  /*    to set an individual target pixel.  This is crucial to implement   */\n  /*    drop-out control according to the TrueType specification.          */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    y     :: The pixel's y~coordinate.                                 */\n  /*                                                                       */\n  /*    x     :: The pixel's x~coordinate.                                 */\n  /*                                                                       */\n  /*    user  :: User-supplied data that is passed to the callback.        */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    1~if the pixel is `set', 0~otherwise.                              */\n  /*                                                                       */\n  typedef void\n  (*FT_Raster_BitSet_Func)( int    y,\n                            int    x,\n                            void*  user );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    FT_RASTER_FLAG_XXX                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A list of bit flag constants as used in the `flags' field of a     */\n  /*    @FT_Raster_Params structure.                                       */\n  /*                                                                       */\n  /* <Values>                                                              */\n  /*    FT_RASTER_FLAG_DEFAULT :: This value is 0.                         */\n  /*                                                                       */\n  /*    FT_RASTER_FLAG_AA      :: This flag is set to indicate that an     */\n  /*                              anti-aliased glyph image should be       */\n  /*                              generated.  Otherwise, it will be        */\n  /*                              monochrome (1-bit).                      */\n  /*                                                                       */\n  /*    FT_RASTER_FLAG_DIRECT  :: This flag is set to indicate direct      */\n  /*                              rendering.  In this mode, client         */\n  /*                              applications must provide their own span */\n  /*                              callback.  This lets them directly       */\n  /*                              draw or compose over an existing bitmap. */\n  /*                              If this bit is not set, the target       */\n  /*                              pixmap's buffer _must_ be zeroed before  */\n  /*                              rendering.                               */\n  /*                                                                       */\n  /*                              Note that for now, direct rendering is   */\n  /*                              only possible with anti-aliased glyphs.  */\n  /*                                                                       */\n  /*    FT_RASTER_FLAG_CLIP    :: This flag is only used in direct         */\n  /*                              rendering mode.  If set, the output will */\n  /*                              be clipped to a box specified in the     */\n  /*                              `clip_box' field of the                  */\n  /*                              @FT_Raster_Params structure.             */\n  /*                                                                       */\n  /*                              Note that by default, the glyph bitmap   */\n  /*                              is clipped to the target pixmap, except  */\n  /*                              in direct rendering mode where all spans */\n  /*                              are generated if no clipping box is set. */\n  /*                                                                       */\n#define FT_RASTER_FLAG_DEFAULT  0x0\n#define FT_RASTER_FLAG_AA       0x1\n#define FT_RASTER_FLAG_DIRECT   0x2\n#define FT_RASTER_FLAG_CLIP     0x4\n\n  /* deprecated */\n#define ft_raster_flag_default  FT_RASTER_FLAG_DEFAULT\n#define ft_raster_flag_aa       FT_RASTER_FLAG_AA\n#define ft_raster_flag_direct   FT_RASTER_FLAG_DIRECT\n#define ft_raster_flag_clip     FT_RASTER_FLAG_CLIP\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Raster_Params                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure to hold the arguments used by a raster's render        */\n  /*    function.                                                          */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    target      :: The target bitmap.                                  */\n  /*                                                                       */\n  /*    source      :: A pointer to the source glyph image (e.g., an       */\n  /*                   @FT_Outline).                                       */\n  /*                                                                       */\n  /*    flags       :: The rendering flags.                                */\n  /*                                                                       */\n  /*    gray_spans  :: The gray span drawing callback.                     */\n  /*                                                                       */\n  /*    black_spans :: The black span drawing callback.  UNIMPLEMENTED!    */\n  /*                                                                       */\n  /*    bit_test    :: The bit test callback.  UNIMPLEMENTED!              */\n  /*                                                                       */\n  /*    bit_set     :: The bit set callback.  UNIMPLEMENTED!               */\n  /*                                                                       */\n  /*    user        :: User-supplied data that is passed to each drawing   */\n  /*                   callback.                                           */\n  /*                                                                       */\n  /*    clip_box    :: An optional clipping box.  It is only used in       */\n  /*                   direct rendering mode.  Note that coordinates here  */\n  /*                   should be expressed in _integer_ pixels (and not in */\n  /*                   26.6 fixed-point units).                            */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    An anti-aliased glyph bitmap is drawn if the @FT_RASTER_FLAG_AA    */\n  /*    bit flag is set in the `flags' field, otherwise a monochrome       */\n  /*    bitmap is generated.                                               */\n  /*                                                                       */\n  /*    If the @FT_RASTER_FLAG_DIRECT bit flag is set in `flags', the      */\n  /*    raster will call the `gray_spans' callback to draw gray pixel      */\n  /*    spans, in the case of an aa glyph bitmap, it will call             */\n  /*    `black_spans', and `bit_test' and `bit_set' in the case of a       */\n  /*    monochrome bitmap.  This allows direct composition over a          */\n  /*    pre-existing bitmap through user-provided callbacks to perform the */\n  /*    span drawing/composition.                                          */\n  /*                                                                       */\n  /*    Note that the `bit_test' and `bit_set' callbacks are required when */\n  /*    rendering a monochrome bitmap, as they are crucial to implement    */\n  /*    correct drop-out control as defined in the TrueType specification. */\n  /*                                                                       */\n  typedef struct  FT_Raster_Params_\n  {\n    const FT_Bitmap*        target;\n    const void*             source;\n    int                     flags;\n    FT_SpanFunc             gray_spans;\n    FT_SpanFunc             black_spans;  /* doesn't work! */\n    FT_Raster_BitTest_Func  bit_test;     /* doesn't work! */\n    FT_Raster_BitSet_Func   bit_set;      /* doesn't work! */\n    void*                   user;\n    FT_BBox                 clip_box;\n\n  } FT_Raster_Params;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_Raster_NewFunc                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function used to create a new raster object.                     */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    memory :: A handle to the memory allocator.                        */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    raster :: A handle to the new raster object.                       */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    Error code.  0~means success.                                      */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The `memory' parameter is a typeless pointer in order to avoid     */\n  /*    un-wanted dependencies on the rest of the FreeType code.  In       */\n  /*    practice, it is an @FT_Memory object, i.e., a handle to the        */\n  /*    standard FreeType memory allocator.  However, this field can be    */\n  /*    completely ignored by a given raster implementation.               */\n  /*                                                                       */\n  typedef int\n  (*FT_Raster_NewFunc)( void*       memory,\n                        FT_Raster*  raster );\n\n#define FT_Raster_New_Func  FT_Raster_NewFunc\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_Raster_DoneFunc                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function used to destroy a given raster object.                  */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    raster :: A handle to the raster object.                           */\n  /*                                                                       */\n  typedef void\n  (*FT_Raster_DoneFunc)( FT_Raster  raster );\n\n#define FT_Raster_Done_Func  FT_Raster_DoneFunc\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_Raster_ResetFunc                                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    FreeType provides an area of memory called the `render pool',      */\n  /*    available to all registered rasters.  This pool can be freely used */\n  /*    during a given scan-conversion but is shared by all rasters.  Its  */\n  /*    content is thus transient.                                         */\n  /*                                                                       */\n  /*    This function is called each time the render pool changes, or just */\n  /*    after a new raster object is created.                              */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    raster    :: A handle to the new raster object.                    */\n  /*                                                                       */\n  /*    pool_base :: The address in memory of the render pool.             */\n  /*                                                                       */\n  /*    pool_size :: The size in bytes of the render pool.                 */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Rasters can ignore the render pool and rely on dynamic memory      */\n  /*    allocation if they want to (a handle to the memory allocator is    */\n  /*    passed to the raster constructor).  However, this is not           */\n  /*    recommended for efficiency purposes.                               */\n  /*                                                                       */\n  typedef void\n  (*FT_Raster_ResetFunc)( FT_Raster       raster,\n                          unsigned char*  pool_base,\n                          unsigned long   pool_size );\n\n#define FT_Raster_Reset_Func  FT_Raster_ResetFunc\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_Raster_SetModeFunc                                              */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This function is a generic facility to change modes or attributes  */\n  /*    in a given raster.  This can be used for debugging purposes, or    */\n  /*    simply to allow implementation-specific `features' in a given      */\n  /*    raster module.                                                     */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    raster :: A handle to the new raster object.                       */\n  /*                                                                       */\n  /*    mode   :: A 4-byte tag used to name the mode or property.          */\n  /*                                                                       */\n  /*    args   :: A pointer to the new mode/property to use.               */\n  /*                                                                       */\n  typedef int\n  (*FT_Raster_SetModeFunc)( FT_Raster      raster,\n                            unsigned long  mode,\n                            void*          args );\n\n#define FT_Raster_Set_Mode_Func  FT_Raster_SetModeFunc\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_Raster_RenderFunc                                               */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Invoke a given raster to scan-convert a given glyph image into a   */\n  /*    target bitmap.                                                     */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    raster :: A handle to the raster object.                           */\n  /*                                                                       */\n  /*    params :: A pointer to an @FT_Raster_Params structure used to      */\n  /*              store the rendering parameters.                          */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    Error code.  0~means success.                                      */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The exact format of the source image depends on the raster's glyph */\n  /*    format defined in its @FT_Raster_Funcs structure.  It can be an    */\n  /*    @FT_Outline or anything else in order to support a large array of  */\n  /*    glyph formats.                                                     */\n  /*                                                                       */\n  /*    Note also that the render function can fail and return a           */\n  /*    `FT_Err_Unimplemented_Feature' error code if the raster used does  */\n  /*    not support direct composition.                                    */\n  /*                                                                       */\n  /*    XXX: For now, the standard raster doesn't support direct           */\n  /*         composition but this should change for the final release (see */\n  /*         the files `demos/src/ftgrays.c' and `demos/src/ftgrays2.c'    */\n  /*         for examples of distinct implementations which support direct */\n  /*         composition).                                                 */\n  /*                                                                       */\n  typedef int\n  (*FT_Raster_RenderFunc)( FT_Raster                raster,\n                           const FT_Raster_Params*  params );\n\n#define FT_Raster_Render_Func  FT_Raster_RenderFunc\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Raster_Funcs                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*   A structure used to describe a given raster class to the library.   */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    glyph_format  :: The supported glyph format for this raster.       */\n  /*                                                                       */\n  /*    raster_new    :: The raster constructor.                           */\n  /*                                                                       */\n  /*    raster_reset  :: Used to reset the render pool within the raster.  */\n  /*                                                                       */\n  /*    raster_render :: A function to render a glyph into a given bitmap. */\n  /*                                                                       */\n  /*    raster_done   :: The raster destructor.                            */\n  /*                                                                       */\n  typedef struct  FT_Raster_Funcs_\n  {\n    FT_Glyph_Format        glyph_format;\n    FT_Raster_NewFunc      raster_new;\n    FT_Raster_ResetFunc    raster_reset;\n    FT_Raster_SetModeFunc  raster_set_mode;\n    FT_Raster_RenderFunc   raster_render;\n    FT_Raster_DoneFunc     raster_done;\n\n  } FT_Raster_Funcs;\n\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTIMAGE_H__ */\n\n\n/* END */\n\n\n/* Local Variables: */\n/* coding: utf-8    */\n/* End:             */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ftincrem.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftincrem.h                                                             */\n/*                                                                         */\n/*    FreeType incremental loading (specification).                        */\n/*                                                                         */\n/*  Copyright 2002, 2003, 2006, 2007, 2008 by                              */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTINCREM_H__\n#define __FTINCREM_H__\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n  /***************************************************************************\n   *\n   * @section:\n   *    incremental\n   *\n   * @title:\n   *    Incremental Loading\n   *\n   * @abstract:\n   *    Custom Glyph Loading.\n   *\n   * @description:\n   *   This section contains various functions used to perform so-called\n   *   `incremental' glyph loading.  This is a mode where all glyphs loaded\n   *   from a given @FT_Face are provided by the client application,\n   *\n   *   Apart from that, all other tables are loaded normally from the font\n   *   file.  This mode is useful when FreeType is used within another\n   *   engine, e.g., a PostScript Imaging Processor.\n   *\n   *   To enable this mode, you must use @FT_Open_Face, passing an\n   *   @FT_Parameter with the @FT_PARAM_TAG_INCREMENTAL tag and an\n   *   @FT_Incremental_Interface value.  See the comments for\n   *   @FT_Incremental_InterfaceRec for an example.\n   *\n   */\n\n\n  /***************************************************************************\n   *\n   * @type:\n   *   FT_Incremental\n   *\n   * @description:\n   *   An opaque type describing a user-provided object used to implement\n   *   `incremental' glyph loading within FreeType.  This is used to support\n   *   embedded fonts in certain environments (e.g., PostScript interpreters),\n   *   where the glyph data isn't in the font file, or must be overridden by\n   *   different values.\n   *\n   * @note:\n   *   It is up to client applications to create and implement @FT_Incremental\n   *   objects, as long as they provide implementations for the methods\n   *   @FT_Incremental_GetGlyphDataFunc, @FT_Incremental_FreeGlyphDataFunc\n   *   and @FT_Incremental_GetGlyphMetricsFunc.\n   *\n   *   See the description of @FT_Incremental_InterfaceRec to understand how\n   *   to use incremental objects with FreeType.\n   *\n   */\n  typedef struct FT_IncrementalRec_*  FT_Incremental;\n\n\n  /***************************************************************************\n   *\n   * @struct:\n   *   FT_Incremental_MetricsRec\n   *\n   * @description:\n   *   A small structure used to contain the basic glyph metrics returned\n   *   by the @FT_Incremental_GetGlyphMetricsFunc method.\n   *\n   * @fields:\n   *   bearing_x ::\n   *     Left bearing, in font units.\n   *\n   *   bearing_y ::\n   *     Top bearing, in font units.\n   *\n   *   advance ::\n   *     Glyph advance, in font units.\n   *\n   * @note:\n   *   These correspond to horizontal or vertical metrics depending on the\n   *   value of the `vertical' argument to the function\n   *   @FT_Incremental_GetGlyphMetricsFunc.\n   *\n   */\n  typedef struct  FT_Incremental_MetricsRec_\n  {\n    FT_Long  bearing_x;\n    FT_Long  bearing_y;\n    FT_Long  advance;\n\n  } FT_Incremental_MetricsRec;\n\n\n  /***************************************************************************\n   *\n   * @struct:\n   *   FT_Incremental_Metrics\n   *\n   * @description:\n   *   A handle to an @FT_Incremental_MetricsRec structure.\n   *\n   */\n   typedef struct FT_Incremental_MetricsRec_*  FT_Incremental_Metrics;\n\n\n  /***************************************************************************\n   *\n   * @type:\n   *   FT_Incremental_GetGlyphDataFunc\n   *\n   * @description:\n   *   A function called by FreeType to access a given glyph's data bytes\n   *   during @FT_Load_Glyph or @FT_Load_Char if incremental loading is\n   *   enabled.\n   *\n   *   Note that the format of the glyph's data bytes depends on the font\n   *   file format.  For TrueType, it must correspond to the raw bytes within\n   *   the `glyf' table.  For PostScript formats, it must correspond to the\n   *   *unencrypted* charstring bytes, without any `lenIV' header.  It is\n   *   undefined for any other format.\n   *\n   * @input:\n   *   incremental ::\n   *     Handle to an opaque @FT_Incremental handle provided by the client\n   *     application.\n   *\n   *   glyph_index ::\n   *     Index of relevant glyph.\n   *\n   * @output:\n   *   adata ::\n   *     A structure describing the returned glyph data bytes (which will be\n   *     accessed as a read-only byte block).\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   If this function returns successfully the method\n   *   @FT_Incremental_FreeGlyphDataFunc will be called later to release\n   *   the data bytes.\n   *\n   *   Nested calls to @FT_Incremental_GetGlyphDataFunc can happen for\n   *   compound glyphs.\n   *\n   */\n  typedef FT_Error\n  (*FT_Incremental_GetGlyphDataFunc)( FT_Incremental  incremental,\n                                      FT_UInt         glyph_index,\n                                      FT_Data*        adata );\n\n\n  /***************************************************************************\n   *\n   * @type:\n   *   FT_Incremental_FreeGlyphDataFunc\n   *\n   * @description:\n   *   A function used to release the glyph data bytes returned by a\n   *   successful call to @FT_Incremental_GetGlyphDataFunc.\n   *\n   * @input:\n   *   incremental ::\n   *     A handle to an opaque @FT_Incremental handle provided by the client\n   *     application.\n   *\n   *   data ::\n   *     A structure describing the glyph data bytes (which will be accessed\n   *     as a read-only byte block).\n   *\n   */\n  typedef void\n  (*FT_Incremental_FreeGlyphDataFunc)( FT_Incremental  incremental,\n                                       FT_Data*        data );\n\n\n  /***************************************************************************\n   *\n   * @type:\n   *   FT_Incremental_GetGlyphMetricsFunc\n   *\n   * @description:\n   *   A function used to retrieve the basic metrics of a given glyph index\n   *   before accessing its data.  This is necessary because, in certain\n   *   formats like TrueType, the metrics are stored in a different place from\n   *   the glyph images proper.\n   *\n   * @input:\n   *   incremental ::\n   *     A handle to an opaque @FT_Incremental handle provided by the client\n   *     application.\n   *\n   *   glyph_index ::\n   *     Index of relevant glyph.\n   *\n   *   vertical ::\n   *     If true, return vertical metrics.\n   *\n   *   ametrics ::\n   *     This parameter is used for both input and output.\n   *     The original glyph metrics, if any, in font units.  If metrics are\n   *     not available all the values must be set to zero.\n   *\n   * @output:\n   *   ametrics ::\n   *     The replacement glyph metrics in font units.\n   *\n   */\n  typedef FT_Error\n  (*FT_Incremental_GetGlyphMetricsFunc)\n                      ( FT_Incremental              incremental,\n                        FT_UInt                     glyph_index,\n                        FT_Bool                     vertical,\n                        FT_Incremental_MetricsRec  *ametrics );\n\n\n  /**************************************************************************\n   *\n   * @struct:\n   *   FT_Incremental_FuncsRec\n   *\n   * @description:\n   *   A table of functions for accessing fonts that load data\n   *   incrementally.  Used in @FT_Incremental_InterfaceRec.\n   *\n   * @fields:\n   *   get_glyph_data ::\n   *     The function to get glyph data.  Must not be null.\n   *\n   *   free_glyph_data ::\n   *     The function to release glyph data.  Must not be null.\n   *\n   *   get_glyph_metrics ::\n   *     The function to get glyph metrics.  May be null if the font does\n   *     not provide overriding glyph metrics.\n   *\n   */\n  typedef struct  FT_Incremental_FuncsRec_\n  {\n    FT_Incremental_GetGlyphDataFunc     get_glyph_data;\n    FT_Incremental_FreeGlyphDataFunc    free_glyph_data;\n    FT_Incremental_GetGlyphMetricsFunc  get_glyph_metrics;\n\n  } FT_Incremental_FuncsRec;\n\n\n  /***************************************************************************\n   *\n   * @struct:\n   *   FT_Incremental_InterfaceRec\n   *\n   * @description:\n   *   A structure to be used with @FT_Open_Face to indicate that the user\n   *   wants to support incremental glyph loading.  You should use it with\n   *   @FT_PARAM_TAG_INCREMENTAL as in the following example:\n   *\n   *     {\n   *       FT_Incremental_InterfaceRec  inc_int;\n   *       FT_Parameter                 parameter;\n   *       FT_Open_Args                 open_args;\n   *\n   *\n   *       // set up incremental descriptor\n   *       inc_int.funcs  = my_funcs;\n   *       inc_int.object = my_object;\n   *\n   *       // set up optional parameter\n   *       parameter.tag  = FT_PARAM_TAG_INCREMENTAL;\n   *       parameter.data = &inc_int;\n   *\n   *       // set up FT_Open_Args structure\n   *       open_args.flags      = FT_OPEN_PATHNAME | FT_OPEN_PARAMS;\n   *       open_args.pathname   = my_font_pathname;\n   *       open_args.num_params = 1;\n   *       open_args.params     = &parameter; // we use one optional argument\n   *\n   *       // open the font\n   *       error = FT_Open_Face( library, &open_args, index, &face );\n   *       ...\n   *     }\n   *\n   */\n  typedef struct  FT_Incremental_InterfaceRec_\n  {\n    const FT_Incremental_FuncsRec*  funcs;\n    FT_Incremental                  object;\n\n  } FT_Incremental_InterfaceRec;\n\n\n  /***************************************************************************\n   *\n   * @type:\n   *   FT_Incremental_Interface\n   *\n   * @description:\n   *   A pointer to an @FT_Incremental_InterfaceRec structure.\n   *\n   */\n  typedef FT_Incremental_InterfaceRec*   FT_Incremental_Interface;\n\n\n  /***************************************************************************\n   *\n   * @constant:\n   *   FT_PARAM_TAG_INCREMENTAL\n   *\n   * @description:\n   *   A constant used as the tag of @FT_Parameter structures to indicate\n   *   an incremental loading object to be used by FreeType.\n   *\n   */\n#define FT_PARAM_TAG_INCREMENTAL  FT_MAKE_TAG( 'i', 'n', 'c', 'r' )\n\n  /* */\n\nFT_END_HEADER\n\n#endif /* __FTINCREM_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ftlcdfil.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftlcdfil.h                                                             */\n/*                                                                         */\n/*    FreeType API for color filtering of subpixel bitmap glyphs           */\n/*    (specification).                                                     */\n/*                                                                         */\n/*  Copyright 2006, 2007, 2008 by                                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FT_LCD_FILTER_H__\n#define __FT_LCD_FILTER_H__\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n  /***************************************************************************\n   *\n   * @section:\n   *   lcd_filtering\n   *\n   * @title:\n   *   LCD Filtering\n   *\n   * @abstract:\n   *   Reduce color fringes of LCD-optimized bitmaps.\n   *\n   * @description:\n   *   The @FT_Library_SetLcdFilter API can be used to specify a low-pass\n   *   filter which is then applied to LCD-optimized bitmaps generated\n   *   through @FT_Render_Glyph.  This is useful to reduce color fringes\n   *   which would occur with unfiltered rendering.\n   *\n   *   Note that no filter is active by default, and that this function is\n   *   *not* implemented in default builds of the library.  You need to\n   *   #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your `ftoption.h' file\n   *   in order to activate it.\n   */\n\n\n  /****************************************************************************\n   *\n   * @func:\n   *   FT_LcdFilter\n   *\n   * @description:\n   *   A list of values to identify various types of LCD filters.\n   *\n   * @values:\n   *   FT_LCD_FILTER_NONE ::\n   *     Do not perform filtering.  When used with subpixel rendering, this\n   *     results in sometimes severe color fringes.\n   *\n   *   FT_LCD_FILTER_DEFAULT ::\n   *     The default filter reduces color fringes considerably, at the cost\n   *     of a slight blurriness in the output.\n   *\n   *   FT_LCD_FILTER_LIGHT ::\n   *     The light filter is a variant that produces less blurriness at the\n   *     cost of slightly more color fringes than the default one.  It might\n   *     be better, depending on taste, your monitor, or your personal vision.\n   *\n   *   FT_LCD_FILTER_LEGACY ::\n   *     This filter corresponds to the original libXft color filter.  It\n   *     provides high contrast output but can exhibit really bad color\n   *     fringes if glyphs are not extremely well hinted to the pixel grid.\n   *     In other words, it only works well if the TrueType bytecode\n   *     interpreter is enabled *and* high-quality hinted fonts are used.\n   *\n   *     This filter is only provided for comparison purposes, and might be\n   *     disabled or stay unsupported in the future.\n   *\n   * @since:\n   *   2.3.0\n   */\n  typedef enum  FT_LcdFilter_\n  {\n    FT_LCD_FILTER_NONE    = 0,\n    FT_LCD_FILTER_DEFAULT = 1,\n    FT_LCD_FILTER_LIGHT   = 2,\n    FT_LCD_FILTER_LEGACY  = 16,\n\n    FT_LCD_FILTER_MAX   /* do not remove */\n\n  } FT_LcdFilter;\n\n\n  /**************************************************************************\n   *\n   * @func:\n   *   FT_Library_SetLcdFilter\n   *\n   * @description:\n   *   This function is used to apply color filtering to LCD decimated\n   *   bitmaps, like the ones used when calling @FT_Render_Glyph with\n   *   @FT_RENDER_MODE_LCD or @FT_RENDER_MODE_LCD_V.\n   *\n   * @input:\n   *   library ::\n   *     A handle to the target library instance.\n   *\n   *   filter ::\n   *     The filter type.\n   *\n   *     You can use @FT_LCD_FILTER_NONE here to disable this feature, or\n   *     @FT_LCD_FILTER_DEFAULT to use a default filter that should work\n   *     well on most LCD screens.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   This feature is always disabled by default.  Clients must make an\n   *   explicit call to this function with a `filter' value other than\n   *   @FT_LCD_FILTER_NONE in order to enable it.\n   *\n   *   Due to *PATENTS* covering subpixel rendering, this function doesn't\n   *   do anything except returning `FT_Err_Unimplemented_Feature' if the\n   *   configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not\n   *   defined in your build of the library, which should correspond to all\n   *   default builds of FreeType.\n   *\n   *   The filter affects glyph bitmaps rendered through @FT_Render_Glyph,\n   *   @FT_Outline_Get_Bitmap, @FT_Load_Glyph, and @FT_Load_Char.\n   *\n   *   It does _not_ affect the output of @FT_Outline_Render and\n   *   @FT_Outline_Get_Bitmap.\n   *\n   *   If this feature is activated, the dimensions of LCD glyph bitmaps are\n   *   either larger or taller than the dimensions of the corresponding\n   *   outline with regards to the pixel grid.  For example, for\n   *   @FT_RENDER_MODE_LCD, the filter adds up to 3~pixels to the left, and\n   *   up to 3~pixels to the right.\n   *\n   *   The bitmap offset values are adjusted correctly, so clients shouldn't\n   *   need to modify their layout and glyph positioning code when enabling\n   *   the filter.\n   *\n   * @since:\n   *   2.3.0\n   */\n  FT_EXPORT( FT_Error )\n  FT_Library_SetLcdFilter( FT_Library    library,\n                           FT_LcdFilter  filter );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FT_LCD_FILTER_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ftlist.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftlist.h                                                               */\n/*                                                                         */\n/*    Generic list support for FreeType (specification).                   */\n/*                                                                         */\n/*  Copyright 1996-2001, 2003, 2007 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*  This file implements functions relative to list processing.  Its     */\n  /*  data structures are defined in `freetype.h'.                         */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#ifndef __FTLIST_H__\n#define __FTLIST_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    list_processing                                                    */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    List Processing                                                    */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    Simple management of lists.                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains various definitions related to list          */\n  /*    processing using doubly-linked nodes.                              */\n  /*                                                                       */\n  /* <Order>                                                               */\n  /*    FT_List                                                            */\n  /*    FT_ListNode                                                        */\n  /*    FT_ListRec                                                         */\n  /*    FT_ListNodeRec                                                     */\n  /*                                                                       */\n  /*    FT_List_Add                                                        */\n  /*    FT_List_Insert                                                     */\n  /*    FT_List_Find                                                       */\n  /*    FT_List_Remove                                                     */\n  /*    FT_List_Up                                                         */\n  /*    FT_List_Iterate                                                    */\n  /*    FT_List_Iterator                                                   */\n  /*    FT_List_Finalize                                                   */\n  /*    FT_List_Destructor                                                 */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_List_Find                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Find the list node for a given listed object.                      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    list :: A pointer to the parent list.                              */\n  /*    data :: The address of the listed object.                          */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    List node.  NULL if it wasn't found.                               */\n  /*                                                                       */\n  FT_EXPORT( FT_ListNode )\n  FT_List_Find( FT_List  list,\n                void*    data );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_List_Add                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Append an element to the end of a list.                            */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    list :: A pointer to the parent list.                              */\n  /*    node :: The node to append.                                        */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_List_Add( FT_List      list,\n               FT_ListNode  node );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_List_Insert                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Insert an element at the head of a list.                           */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    list :: A pointer to parent list.                                  */\n  /*    node :: The node to insert.                                        */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_List_Insert( FT_List      list,\n                  FT_ListNode  node );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_List_Remove                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Remove a node from a list.  This function doesn't check whether    */\n  /*    the node is in the list!                                           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    node :: The node to remove.                                        */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    list :: A pointer to the parent list.                              */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_List_Remove( FT_List      list,\n                  FT_ListNode  node );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_List_Up                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Move a node to the head/top of a list.  Used to maintain LRU       */\n  /*    lists.                                                             */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    list :: A pointer to the parent list.                              */\n  /*    node :: The node to move.                                          */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_List_Up( FT_List      list,\n              FT_ListNode  node );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_List_Iterator                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    An FT_List iterator function which is called during a list parse   */\n  /*    by @FT_List_Iterate.                                               */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    node :: The current iteration list node.                           */\n  /*                                                                       */\n  /*    user :: A typeless pointer passed to @FT_List_Iterate.             */\n  /*            Can be used to point to the iteration's state.             */\n  /*                                                                       */\n  typedef FT_Error\n  (*FT_List_Iterator)( FT_ListNode  node,\n                       void*        user );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_List_Iterate                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Parse a list and calls a given iterator function on each element.  */\n  /*    Note that parsing is stopped as soon as one of the iterator calls  */\n  /*    returns a non-zero value.                                          */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    list     :: A handle to the list.                                  */\n  /*    iterator :: An iterator function, called on each node of the list. */\n  /*    user     :: A user-supplied field which is passed as the second    */\n  /*                argument to the iterator.                              */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The result (a FreeType error code) of the last iterator call.      */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_List_Iterate( FT_List           list,\n                   FT_List_Iterator  iterator,\n                   void*             user );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_List_Destructor                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    An @FT_List iterator function which is called during a list        */\n  /*    finalization by @FT_List_Finalize to destroy all elements in a     */\n  /*    given list.                                                        */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    system :: The current system object.                               */\n  /*                                                                       */\n  /*    data   :: The current object to destroy.                           */\n  /*                                                                       */\n  /*    user   :: A typeless pointer passed to @FT_List_Iterate.  It can   */\n  /*              be used to point to the iteration's state.               */\n  /*                                                                       */\n  typedef void\n  (*FT_List_Destructor)( FT_Memory  memory,\n                         void*      data,\n                         void*      user );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_List_Finalize                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Destroy all elements in the list as well as the list itself.       */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    list    :: A handle to the list.                                   */\n  /*                                                                       */\n  /*    destroy :: A list destructor that will be applied to each element  */\n  /*               of the list.                                            */\n  /*                                                                       */\n  /*    memory  :: The current memory object which handles deallocation.   */\n  /*                                                                       */\n  /*    user    :: A user-supplied field which is passed as the last       */\n  /*               argument to the destructor.                             */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_List_Finalize( FT_List             list,\n                    FT_List_Destructor  destroy,\n                    FT_Memory           memory,\n                    void*               user );\n\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTLIST_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ftlzw.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftlzw.h                                                                */\n/*                                                                         */\n/*    LZW-compressed stream support.                                       */\n/*                                                                         */\n/*  Copyright 2004, 2006 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTLZW_H__\n#define __FTLZW_H__\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    lzw                                                                */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    LZW Streams                                                        */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    Using LZW-compressed font files.                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains the declaration of LZW-specific functions.   */\n  /*                                                                       */\n  /*************************************************************************/\n\n /************************************************************************\n  *\n  * @function:\n  *   FT_Stream_OpenLZW\n  *\n  * @description:\n  *   Open a new stream to parse LZW-compressed font files.  This is\n  *   mainly used to support the compressed `*.pcf.Z' fonts that come\n  *   with XFree86.\n  *\n  * @input:\n  *   stream :: The target embedding stream.\n  *\n  *   source :: The source stream.\n  *\n  * @return:\n  *   FreeType error code.  0~means success.\n  *\n  * @note:\n  *   The source stream must be opened _before_ calling this function.\n  *\n  *   Calling the internal function `FT_Stream_Close' on the new stream will\n  *   *not* call `FT_Stream_Close' on the source stream.  None of the stream\n  *   objects will be released to the heap.\n  *\n  *   The stream implementation is very basic and resets the decompression\n  *   process each time seeking backwards is needed within the stream\n  *\n  *   In certain builds of the library, LZW compression recognition is\n  *   automatically handled when calling @FT_New_Face or @FT_Open_Face.\n  *   This means that if no font driver is capable of handling the raw\n  *   compressed file, the library will try to open a LZW stream from it\n  *   and re-open the face with it.\n  *\n  *   This function may return `FT_Err_Unimplemented_Feature' if your build\n  *   of FreeType was not compiled with LZW support.\n  */\n  FT_EXPORT( FT_Error )\n  FT_Stream_OpenLZW( FT_Stream  stream,\n                     FT_Stream  source );\n\n /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTLZW_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ftmac.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftmac.h                                                                */\n/*                                                                         */\n/*    Additional Mac-specific API.                                         */\n/*                                                                         */\n/*  Copyright 1996-2001, 2004, 2006, 2007 by                               */\n/*  Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg.     */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n/***************************************************************************/\n/*                                                                         */\n/* NOTE: Include this file after <freetype/freetype.h> and after any       */\n/*       Mac-specific headers (because this header uses Mac types such as  */\n/*       Handle, FSSpec, FSRef, etc.)                                      */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTMAC_H__\n#define __FTMAC_H__\n\n\n#include <ft2build.h>\n\n\nFT_BEGIN_HEADER\n\n\n/* gcc-3.4.1 and later can warn about functions tagged as deprecated */\n#ifndef FT_DEPRECATED_ATTRIBUTE\n#if defined(__GNUC__)                                               && \\\n    ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))\n#define FT_DEPRECATED_ATTRIBUTE  __attribute__((deprecated))\n#else\n#define FT_DEPRECATED_ATTRIBUTE\n#endif\n#endif\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    mac_specific                                                       */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    Mac Specific Interface                                             */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    Only available on the Macintosh.                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The following definitions are only available if FreeType is        */\n  /*    compiled on a Macintosh.                                           */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_New_Face_From_FOND                                              */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Create a new face object from a FOND resource.                     */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    library    :: A handle to the library resource.                    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    fond       :: A FOND resource.                                     */\n  /*                                                                       */\n  /*    face_index :: Only supported for the -1 `sanity check' special     */\n  /*                  case.                                                */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    aface      :: A handle to a new face object.                       */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Notes>                                                               */\n  /*    This function can be used to create @FT_Face objects from fonts    */\n  /*    that are installed in the system as follows.                       */\n  /*                                                                       */\n  /*    {                                                                  */\n  /*      fond = GetResource( 'FOND', fontName );                          */\n  /*      error = FT_New_Face_From_FOND( library, fond, 0, &face );        */\n  /*    }                                                                  */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_New_Face_From_FOND( FT_Library  library,\n                         Handle      fond,\n                         FT_Long     face_index,\n                         FT_Face    *aface )\n                       FT_DEPRECATED_ATTRIBUTE;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_GetFile_From_Mac_Name                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return an FSSpec for the disk file containing the named font.      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    fontName   :: Mac OS name of the font (e.g., Times New Roman       */\n  /*                  Bold).                                               */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    pathSpec   :: FSSpec to the file.  For passing to                  */\n  /*                  @FT_New_Face_From_FSSpec.                            */\n  /*                                                                       */\n  /*    face_index :: Index of the face.  For passing to                   */\n  /*                  @FT_New_Face_From_FSSpec.                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_GetFile_From_Mac_Name( const char*  fontName,\n                            FSSpec*      pathSpec,\n                            FT_Long*     face_index )\n                          FT_DEPRECATED_ATTRIBUTE;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_GetFile_From_Mac_ATS_Name                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return an FSSpec for the disk file containing the named font.      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    fontName   :: Mac OS name of the font in ATS framework.            */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    pathSpec   :: FSSpec to the file. For passing to                   */\n  /*                  @FT_New_Face_From_FSSpec.                            */\n  /*                                                                       */\n  /*    face_index :: Index of the face. For passing to                    */\n  /*                  @FT_New_Face_From_FSSpec.                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_GetFile_From_Mac_ATS_Name( const char*  fontName,\n                                FSSpec*      pathSpec,\n                                FT_Long*     face_index )\n                              FT_DEPRECATED_ATTRIBUTE;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_GetFilePath_From_Mac_ATS_Name                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return a pathname of the disk file and face index for given font   */\n  /*    name which is handled by ATS framework.                            */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    fontName    :: Mac OS name of the font in ATS framework.           */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    path        :: Buffer to store pathname of the file.  For passing  */\n  /*                   to @FT_New_Face.  The client must allocate this     */\n  /*                   buffer before calling this function.                */\n  /*                                                                       */\n  /*    maxPathSize :: Lengths of the buffer `path' that client allocated. */\n  /*                                                                       */\n  /*    face_index  :: Index of the face.  For passing to @FT_New_Face.    */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_GetFilePath_From_Mac_ATS_Name( const char*  fontName,\n                                    UInt8*       path,\n                                    UInt32       maxPathSize,\n                                    FT_Long*     face_index )\n                                  FT_DEPRECATED_ATTRIBUTE;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_New_Face_From_FSSpec                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Create a new face object from a given resource and typeface index  */\n  /*    using an FSSpec to the font file.                                  */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    library    :: A handle to the library resource.                    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    spec       :: FSSpec to the font file.                             */\n  /*                                                                       */\n  /*    face_index :: The index of the face within the resource.  The      */\n  /*                  first face has index~0.                              */\n  /* <Output>                                                              */\n  /*    aface      :: A handle to a new face object.                       */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    @FT_New_Face_From_FSSpec is identical to @FT_New_Face except       */\n  /*    it accepts an FSSpec instead of a path.                            */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_New_Face_From_FSSpec( FT_Library     library,\n                           const FSSpec  *spec,\n                           FT_Long        face_index,\n                           FT_Face       *aface )\n                         FT_DEPRECATED_ATTRIBUTE;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_New_Face_From_FSRef                                             */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Create a new face object from a given resource and typeface index  */\n  /*    using an FSRef to the font file.                                   */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    library    :: A handle to the library resource.                    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    spec       :: FSRef to the font file.                              */\n  /*                                                                       */\n  /*    face_index :: The index of the face within the resource.  The      */\n  /*                  first face has index~0.                              */\n  /* <Output>                                                              */\n  /*    aface      :: A handle to a new face object.                       */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    @FT_New_Face_From_FSRef is identical to @FT_New_Face except        */\n  /*    it accepts an FSRef instead of a path.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_New_Face_From_FSRef( FT_Library    library,\n                          const FSRef  *ref,\n                          FT_Long       face_index,\n                          FT_Face      *aface )\n                        FT_DEPRECATED_ATTRIBUTE;\n\n  /* */\n\n\nFT_END_HEADER\n\n\n#endif /* __FTMAC_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ftmm.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftmm.h                                                                 */\n/*                                                                         */\n/*    FreeType Multiple Master font interface (specification).             */\n/*                                                                         */\n/*  Copyright 1996-2001, 2003, 2004, 2006, 2009 by                         */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTMM_H__\n#define __FTMM_H__\n\n\n#include <ft2build.h>\n#include FT_TYPE1_TABLES_H\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    multiple_masters                                                   */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    Multiple Masters                                                   */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    How to manage Multiple Masters fonts.                              */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The following types and functions are used to manage Multiple      */\n  /*    Master fonts, i.e., the selection of specific design instances by  */\n  /*    setting design axis coordinates.                                   */\n  /*                                                                       */\n  /*    George Williams has extended this interface to make it work with   */\n  /*    both Type~1 Multiple Masters fonts and GX distortable (var)        */\n  /*    fonts.  Some of these routines only work with MM fonts, others     */\n  /*    will work with both types.  They are similar enough that a         */\n  /*    consistent interface makes sense.                                  */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_MM_Axis                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A simple structure used to model a given axis in design space for  */\n  /*    Multiple Masters fonts.                                            */\n  /*                                                                       */\n  /*    This structure can't be used for GX var fonts.                     */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    name    :: The axis's name.                                        */\n  /*                                                                       */\n  /*    minimum :: The axis's minimum design coordinate.                   */\n  /*                                                                       */\n  /*    maximum :: The axis's maximum design coordinate.                   */\n  /*                                                                       */\n  typedef struct  FT_MM_Axis_\n  {\n    FT_String*  name;\n    FT_Long     minimum;\n    FT_Long     maximum;\n\n  } FT_MM_Axis;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Multi_Master                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to model the axes and space of a Multiple Masters */\n  /*    font.                                                              */\n  /*                                                                       */\n  /*    This structure can't be used for GX var fonts.                     */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    num_axis    :: Number of axes.  Cannot exceed~4.                   */\n  /*                                                                       */\n  /*    num_designs :: Number of designs; should be normally 2^num_axis    */\n  /*                   even though the Type~1 specification strangely      */\n  /*                   allows for intermediate designs to be present. This */\n  /*                   number cannot exceed~16.                            */\n  /*                                                                       */\n  /*    axis        :: A table of axis descriptors.                        */\n  /*                                                                       */\n  typedef struct  FT_Multi_Master_\n  {\n    FT_UInt     num_axis;\n    FT_UInt     num_designs;\n    FT_MM_Axis  axis[T1_MAX_MM_AXIS];\n\n  } FT_Multi_Master;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Var_Axis                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A simple structure used to model a given axis in design space for  */\n  /*    Multiple Masters and GX var fonts.                                 */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    name    :: The axis's name.                                        */\n  /*               Not always meaningful for GX.                           */\n  /*                                                                       */\n  /*    minimum :: The axis's minimum design coordinate.                   */\n  /*                                                                       */\n  /*    def     :: The axis's default design coordinate.                   */\n  /*               FreeType computes meaningful default values for MM; it  */\n  /*               is then an integer value, not in 16.16 format.          */\n  /*                                                                       */\n  /*    maximum :: The axis's maximum design coordinate.                   */\n  /*                                                                       */\n  /*    tag     :: The axis's tag (the GX equivalent to `name').           */\n  /*               FreeType provides default values for MM if possible.    */\n  /*                                                                       */\n  /*    strid   :: The entry in `name' table (another GX version of        */\n  /*               `name').                                                */\n  /*               Not meaningful for MM.                                  */\n  /*                                                                       */\n  typedef struct  FT_Var_Axis_\n  {\n    FT_String*  name;\n\n    FT_Fixed    minimum;\n    FT_Fixed    def;\n    FT_Fixed    maximum;\n\n    FT_ULong    tag;\n    FT_UInt     strid;\n\n  } FT_Var_Axis;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Var_Named_Style                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A simple structure used to model a named style in a GX var font.   */\n  /*                                                                       */\n  /*    This structure can't be used for MM fonts.                         */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    coords :: The design coordinates for this style.                   */\n  /*              This is an array with one entry for each axis.           */\n  /*                                                                       */\n  /*    strid  :: The entry in `name' table identifying this style.        */\n  /*                                                                       */\n  typedef struct  FT_Var_Named_Style_\n  {\n    FT_Fixed*  coords;\n    FT_UInt    strid;\n\n  } FT_Var_Named_Style;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_MM_Var                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to model the axes and space of a Multiple Masters */\n  /*    or GX var distortable font.                                        */\n  /*                                                                       */\n  /*    Some fields are specific to one format and not to the other.       */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    num_axis        :: The number of axes.  The maximum value is~4 for */\n  /*                       MM; no limit in GX.                             */\n  /*                                                                       */\n  /*    num_designs     :: The number of designs; should be normally       */\n  /*                       2^num_axis for MM fonts.  Not meaningful for GX */\n  /*                       (where every glyph could have a different       */\n  /*                       number of designs).                             */\n  /*                                                                       */\n  /*    num_namedstyles :: The number of named styles; only meaningful for */\n  /*                       GX which allows certain design coordinates to   */\n  /*                       have a string ID (in the `name' table)          */\n  /*                       associated with them.  The font can tell the    */\n  /*                       user that, for example, Weight=1.5 is `Bold'.   */\n  /*                                                                       */\n  /*    axis            :: A table of axis descriptors.                    */\n  /*                       GX fonts contain slightly more data than MM.    */\n  /*                                                                       */\n  /*    namedstyles     :: A table of named styles.                        */\n  /*                       Only meaningful with GX.                        */\n  /*                                                                       */\n  typedef struct  FT_MM_Var_\n  {\n    FT_UInt              num_axis;\n    FT_UInt              num_designs;\n    FT_UInt              num_namedstyles;\n    FT_Var_Axis*         axis;\n    FT_Var_Named_Style*  namedstyle;\n\n  } FT_MM_Var;\n\n\n  /* */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Multi_Master                                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Retrieve the Multiple Master descriptor of a given font.           */\n  /*                                                                       */\n  /*    This function can't be used with GX fonts.                         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face    :: A handle to the source face.                            */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    amaster :: The Multiple Masters descriptor.                        */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Get_Multi_Master( FT_Face           face,\n                       FT_Multi_Master  *amaster );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_MM_Var                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Retrieve the Multiple Master/GX var descriptor of a given font.    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face    :: A handle to the source face.                            */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    amaster :: The Multiple Masters/GX var descriptor.                 */\n  /*               Allocates a data structure, which the user must free    */\n  /*               (a single call to FT_FREE will do it).                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Get_MM_Var( FT_Face      face,\n                 FT_MM_Var*  *amaster );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Set_MM_Design_Coordinates                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    For Multiple Masters fonts, choose an interpolated font design     */\n  /*    through design coordinates.                                        */\n  /*                                                                       */\n  /*    This function can't be used with GX fonts.                         */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face       :: A handle to the source face.                         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    num_coords :: The number of design coordinates (must be equal to   */\n  /*                  the number of axes in the font).                     */\n  /*                                                                       */\n  /*    coords     :: An array of design coordinates.                      */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Set_MM_Design_Coordinates( FT_Face   face,\n                                FT_UInt   num_coords,\n                                FT_Long*  coords );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Set_Var_Design_Coordinates                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    For Multiple Master or GX Var fonts, choose an interpolated font   */\n  /*    design through design coordinates.                                 */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face       :: A handle to the source face.                         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    num_coords :: The number of design coordinates (must be equal to   */\n  /*                  the number of axes in the font).                     */\n  /*                                                                       */\n  /*    coords     :: An array of design coordinates.                      */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Set_Var_Design_Coordinates( FT_Face    face,\n                                 FT_UInt    num_coords,\n                                 FT_Fixed*  coords );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Set_MM_Blend_Coordinates                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    For Multiple Masters and GX var fonts, choose an interpolated font */\n  /*    design through normalized blend coordinates.                       */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    face       :: A handle to the source face.                         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    num_coords :: The number of design coordinates (must be equal to   */\n  /*                  the number of axes in the font).                     */\n  /*                                                                       */\n  /*    coords     :: The design coordinates array (each element must be   */\n  /*                  between 0 and 1.0).                                  */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Set_MM_Blend_Coordinates( FT_Face    face,\n                               FT_UInt    num_coords,\n                               FT_Fixed*  coords );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Set_Var_Blend_Coordinates                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This is another name of @FT_Set_MM_Blend_Coordinates.              */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Set_Var_Blend_Coordinates( FT_Face    face,\n                                FT_UInt    num_coords,\n                                FT_Fixed*  coords );\n\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTMM_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ftmodapi.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftmodapi.h                                                             */\n/*                                                                         */\n/*    FreeType modules public interface (specification).                   */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2003, 2006, 2008, 2009 by                   */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTMODAPI_H__\n#define __FTMODAPI_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    module_management                                                  */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    Module Management                                                  */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    How to add, upgrade, and remove modules from FreeType.             */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The definitions below are used to manage modules within FreeType.  */\n  /*    Modules can be added, upgraded, and removed at runtime.            */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /* module bit flags */\n#define FT_MODULE_FONT_DRIVER         1  /* this module is a font driver  */\n#define FT_MODULE_RENDERER            2  /* this module is a renderer     */\n#define FT_MODULE_HINTER              4  /* this module is a glyph hinter */\n#define FT_MODULE_STYLER              8  /* this module is a styler       */\n\n#define FT_MODULE_DRIVER_SCALABLE     0x100   /* the driver supports      */\n                                              /* scalable fonts           */\n#define FT_MODULE_DRIVER_NO_OUTLINES  0x200   /* the driver does not      */\n                                              /* support vector outlines  */\n#define FT_MODULE_DRIVER_HAS_HINTER   0x400   /* the driver provides its  */\n                                              /* own hinter               */\n\n\n  /* deprecated values */\n#define ft_module_font_driver         FT_MODULE_FONT_DRIVER\n#define ft_module_renderer            FT_MODULE_RENDERER\n#define ft_module_hinter              FT_MODULE_HINTER\n#define ft_module_styler              FT_MODULE_STYLER\n\n#define ft_module_driver_scalable     FT_MODULE_DRIVER_SCALABLE\n#define ft_module_driver_no_outlines  FT_MODULE_DRIVER_NO_OUTLINES\n#define ft_module_driver_has_hinter   FT_MODULE_DRIVER_HAS_HINTER\n\n\n  typedef FT_Pointer  FT_Module_Interface;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_Module_Constructor                                              */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function used to initialize (not create) a new module object.    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    module :: The module to initialize.                                */\n  /*                                                                       */\n  typedef FT_Error\n  (*FT_Module_Constructor)( FT_Module  module );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_Module_Destructor                                               */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function used to finalize (not destroy) a given module object.   */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    module :: The module to finalize.                                  */\n  /*                                                                       */\n  typedef void\n  (*FT_Module_Destructor)( FT_Module  module );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_Module_Requester                                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A function used to query a given module for a specific interface.  */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    module :: The module to finalize.                                  */\n  /*                                                                       */\n  /*    name ::   The name of the interface in the module.                 */\n  /*                                                                       */\n  typedef FT_Module_Interface\n  (*FT_Module_Requester)( FT_Module    module,\n                          const char*  name );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Module_Class                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The module class descriptor.                                       */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    module_flags    :: Bit flags describing the module.                */\n  /*                                                                       */\n  /*    module_size     :: The size of one module object/instance in       */\n  /*                       bytes.                                          */\n  /*                                                                       */\n  /*    module_name     :: The name of the module.                         */\n  /*                                                                       */\n  /*    module_version  :: The version, as a 16.16 fixed number            */\n  /*                       (major.minor).                                  */\n  /*                                                                       */\n  /*    module_requires :: The version of FreeType this module requires,   */\n  /*                       as a 16.16 fixed number (major.minor).  Starts  */\n  /*                       at version 2.0, i.e., 0x20000.                  */\n  /*                                                                       */\n  /*    module_init     :: The initializing function.                      */\n  /*                                                                       */\n  /*    module_done     :: The finalizing function.                        */\n  /*                                                                       */\n  /*    get_interface   :: The interface requesting function.              */\n  /*                                                                       */\n  typedef struct  FT_Module_Class_\n  {\n    FT_ULong               module_flags;\n    FT_Long                module_size;\n    const FT_String*       module_name;\n    FT_Fixed               module_version;\n    FT_Fixed               module_requires;\n\n    const void*            module_interface;\n\n    FT_Module_Constructor  module_init;\n    FT_Module_Destructor   module_done;\n    FT_Module_Requester    get_interface;\n\n  } FT_Module_Class;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Add_Module                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Add a new module to a given library instance.                      */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    library :: A handle to the library object.                         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    clazz   :: A pointer to class descriptor for the module.           */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    An error will be returned if a module already exists by that name, */\n  /*    or if the module requires a version of FreeType that is too great. */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Add_Module( FT_Library              library,\n                 const FT_Module_Class*  clazz );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Module                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Find a module by its name.                                         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library     :: A handle to the library object.                     */\n  /*                                                                       */\n  /*    module_name :: The module's name (as an ASCII string).             */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    A module handle.  0~if none was found.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    FreeType's internal modules aren't documented very well, and you   */\n  /*    should look up the source code for details.                        */\n  /*                                                                       */\n  FT_EXPORT( FT_Module )\n  FT_Get_Module( FT_Library   library,\n                 const char*  module_name );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Remove_Module                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Remove a given module from a library instance.                     */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    library :: A handle to a library object.                           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    module  :: A handle to a module object.                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The module object is destroyed by the function in case of success. */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Remove_Module( FT_Library  library,\n                    FT_Module   module );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_New_Library                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This function is used to create a new FreeType library instance    */\n  /*    from a given memory object.  It is thus possible to use libraries  */\n  /*    with distinct memory allocators within the same program.           */\n  /*                                                                       */\n  /*    Normally, you would call this function (followed by a call to      */\n  /*    @FT_Add_Default_Modules or a series of calls to @FT_Add_Module)    */\n  /*    instead of @FT_Init_FreeType to initialize the FreeType library.   */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    memory   :: A handle to the original memory object.                */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    alibrary :: A pointer to handle of a new library object.           */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_New_Library( FT_Memory    memory,\n                  FT_Library  *alibrary );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Done_Library                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Discard a given library object.  This closes all drivers and       */\n  /*    discards all resource objects.                                     */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library :: A handle to the target library.                         */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Done_Library( FT_Library  library );\n\n/* */\n\n  typedef void\n  (*FT_DebugHook_Func)( void*  arg );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Set_Debug_Hook                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Set a debug hook function for debugging the interpreter of a font  */\n  /*    format.                                                            */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    library    :: A handle to the library object.                      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    hook_index :: The index of the debug hook.  You should use the     */\n  /*                  values defined in `ftobjs.h', e.g.,                  */\n  /*                  `FT_DEBUG_HOOK_TRUETYPE'.                            */\n  /*                                                                       */\n  /*    debug_hook :: The function used to debug the interpreter.          */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Currently, four debug hook slots are available, but only two (for  */\n  /*    the TrueType and the Type~1 interpreter) are defined.              */\n  /*                                                                       */\n  /*    Since the internal headers of FreeType are no longer installed,    */\n  /*    the symbol `FT_DEBUG_HOOK_TRUETYPE' isn't available publicly.      */\n  /*    This is a bug and will be fixed in a forthcoming release.          */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_Set_Debug_Hook( FT_Library         library,\n                     FT_UInt            hook_index,\n                     FT_DebugHook_Func  debug_hook );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Add_Default_Modules                                             */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Add the set of default drivers to a given library object.          */\n  /*    This is only useful when you create a library object with          */\n  /*    @FT_New_Library (usually to plug a custom memory manager).         */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    library :: A handle to a new library object.                       */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_Add_Default_Modules( FT_Library  library );\n\n\n\n  /**************************************************************************\n   *\n   * @section:\n   *   truetype_engine\n   *\n   * @title:\n   *   The TrueType Engine\n   *\n   * @abstract:\n   *   TrueType bytecode support.\n   *\n   * @description:\n   *   This section contains a function used to query the level of TrueType\n   *   bytecode support compiled in this version of the library.\n   *\n   */\n\n\n  /**************************************************************************\n   *\n   *  @enum:\n   *     FT_TrueTypeEngineType\n   *\n   *  @description:\n   *     A list of values describing which kind of TrueType bytecode\n   *     engine is implemented in a given FT_Library instance.  It is used\n   *     by the @FT_Get_TrueType_Engine_Type function.\n   *\n   *  @values:\n   *     FT_TRUETYPE_ENGINE_TYPE_NONE ::\n   *       The library doesn't implement any kind of bytecode interpreter.\n   *\n   *     FT_TRUETYPE_ENGINE_TYPE_UNPATENTED ::\n   *       The library implements a bytecode interpreter that doesn't\n   *       support the patented operations of the TrueType virtual machine.\n   *\n   *       Its main use is to load certain Asian fonts which position and\n   *       scale glyph components with bytecode instructions.  It produces\n   *       bad output for most other fonts.\n   *\n   *    FT_TRUETYPE_ENGINE_TYPE_PATENTED ::\n   *       The library implements a bytecode interpreter that covers\n   *       the full instruction set of the TrueType virtual machine.\n   *       See the file `docs/PATENTS' for legal aspects.\n   *\n   *  @since:\n   *       2.2\n   *\n   */\n  typedef enum  FT_TrueTypeEngineType_\n  {\n    FT_TRUETYPE_ENGINE_TYPE_NONE = 0,\n    FT_TRUETYPE_ENGINE_TYPE_UNPATENTED,\n    FT_TRUETYPE_ENGINE_TYPE_PATENTED\n\n  } FT_TrueTypeEngineType;\n\n\n  /**************************************************************************\n   *\n   *  @func:\n   *     FT_Get_TrueType_Engine_Type\n   *\n   *  @description:\n   *     Return an @FT_TrueTypeEngineType value to indicate which level of\n   *     the TrueType virtual machine a given library instance supports.\n   *\n   *  @input:\n   *     library ::\n   *       A library instance.\n   *\n   *  @return:\n   *     A value indicating which level is supported.\n   *\n   *  @since:\n   *     2.2\n   *\n   */\n  FT_EXPORT( FT_TrueTypeEngineType )\n  FT_Get_TrueType_Engine_Type( FT_Library  library );\n\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTMODAPI_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ftmoderr.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftmoderr.h                                                             */\n/*                                                                         */\n/*    FreeType module error offsets (specification).                       */\n/*                                                                         */\n/*  Copyright 2001, 2002, 2003, 2004, 2005 by                              */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* This file is used to define the FreeType module error offsets.        */\n  /*                                                                       */\n  /* The lower byte gives the error code, the higher byte gives the        */\n  /* module.  The base module has error offset 0.  For example, the error  */\n  /* `FT_Err_Invalid_File_Format' has value 0x003, the error               */\n  /* `TT_Err_Invalid_File_Format' has value 0x1103, the error              */\n  /* `T1_Err_Invalid_File_Format' has value 0x1203, etc.                   */\n  /*                                                                       */\n  /* Undefine the macro FT_CONFIG_OPTION_USE_MODULE_ERRORS in ftoption.h   */\n  /* to make the higher byte always zero (disabling the module error       */\n  /* mechanism).                                                           */\n  /*                                                                       */\n  /* It can also be used to create a module error message table easily     */\n  /* with something like                                                   */\n  /*                                                                       */\n  /*   {                                                                   */\n  /*     #undef __FTMODERR_H__                                             */\n  /*     #define FT_MODERRDEF( e, v, s )  { FT_Mod_Err_ ## e, s },         */\n  /*     #define FT_MODERR_START_LIST     {                                */\n  /*     #define FT_MODERR_END_LIST       { 0, 0 } };                      */\n  /*                                                                       */\n  /*     const struct                                                      */\n  /*     {                                                                 */\n  /*       int          mod_err_offset;                                    */\n  /*       const char*  mod_err_msg                                        */\n  /*     } ft_mod_errors[] =                                               */\n  /*                                                                       */\n  /*     #include FT_MODULE_ERRORS_H                                       */\n  /*   }                                                                   */\n  /*                                                                       */\n  /* To use such a table, all errors must be ANDed with 0xFF00 to remove   */\n  /* the error code.                                                       */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#ifndef __FTMODERR_H__\n#define __FTMODERR_H__\n\n\n  /*******************************************************************/\n  /*******************************************************************/\n  /*****                                                         *****/\n  /*****                       SETUP MACROS                      *****/\n  /*****                                                         *****/\n  /*******************************************************************/\n  /*******************************************************************/\n\n\n#undef  FT_NEED_EXTERN_C\n\n#ifndef FT_MODERRDEF\n\n#ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS\n#define FT_MODERRDEF( e, v, s )  FT_Mod_Err_ ## e = v,\n#else\n#define FT_MODERRDEF( e, v, s )  FT_Mod_Err_ ## e = 0,\n#endif\n\n#define FT_MODERR_START_LIST  enum {\n#define FT_MODERR_END_LIST    FT_Mod_Err_Max };\n\n#ifdef __cplusplus\n#define FT_NEED_EXTERN_C\n  extern \"C\" {\n#endif\n\n#endif /* !FT_MODERRDEF */\n\n\n  /*******************************************************************/\n  /*******************************************************************/\n  /*****                                                         *****/\n  /*****               LIST MODULE ERROR BASES                   *****/\n  /*****                                                         *****/\n  /*******************************************************************/\n  /*******************************************************************/\n\n\n#ifdef FT_MODERR_START_LIST\n  FT_MODERR_START_LIST\n#endif\n\n\n  FT_MODERRDEF( Base,      0x000, \"base module\" )\n  FT_MODERRDEF( Autofit,   0x100, \"autofitter module\" )\n  FT_MODERRDEF( BDF,       0x200, \"BDF module\" )\n  FT_MODERRDEF( Cache,     0x300, \"cache module\" )\n  FT_MODERRDEF( CFF,       0x400, \"CFF module\" )\n  FT_MODERRDEF( CID,       0x500, \"CID module\" )\n  FT_MODERRDEF( Gzip,      0x600, \"Gzip module\" )\n  FT_MODERRDEF( LZW,       0x700, \"LZW module\" )\n  FT_MODERRDEF( OTvalid,   0x800, \"OpenType validation module\" )\n  FT_MODERRDEF( PCF,       0x900, \"PCF module\" )\n  FT_MODERRDEF( PFR,       0xA00, \"PFR module\" )\n  FT_MODERRDEF( PSaux,     0xB00, \"PS auxiliary module\" )\n  FT_MODERRDEF( PShinter,  0xC00, \"PS hinter module\" )\n  FT_MODERRDEF( PSnames,   0xD00, \"PS names module\" )\n  FT_MODERRDEF( Raster,    0xE00, \"raster module\" )\n  FT_MODERRDEF( SFNT,      0xF00, \"SFNT module\" )\n  FT_MODERRDEF( Smooth,   0x1000, \"smooth raster module\" )\n  FT_MODERRDEF( TrueType, 0x1100, \"TrueType module\" )\n  FT_MODERRDEF( Type1,    0x1200, \"Type 1 module\" )\n  FT_MODERRDEF( Type42,   0x1300, \"Type 42 module\" )\n  FT_MODERRDEF( Winfonts, 0x1400, \"Windows FON/FNT module\" )\n\n\n#ifdef FT_MODERR_END_LIST\n  FT_MODERR_END_LIST\n#endif\n\n\n  /*******************************************************************/\n  /*******************************************************************/\n  /*****                                                         *****/\n  /*****                      CLEANUP                            *****/\n  /*****                                                         *****/\n  /*******************************************************************/\n  /*******************************************************************/\n\n\n#ifdef FT_NEED_EXTERN_C\n  }\n#endif\n\n#undef FT_MODERR_START_LIST\n#undef FT_MODERR_END_LIST\n#undef FT_MODERRDEF\n#undef FT_NEED_EXTERN_C\n\n\n#endif /* __FTMODERR_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ftotval.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftotval.h                                                              */\n/*                                                                         */\n/*    FreeType API for validating OpenType tables (specification).         */\n/*                                                                         */\n/*  Copyright 2004, 2005, 2006, 2007 by                                    */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n/***************************************************************************/\n/*                                                                         */\n/*                                                                         */\n/* Warning: This module might be moved to a different library in the       */\n/*          future to avoid a tight dependency between FreeType and the    */\n/*          OpenType specification.                                        */\n/*                                                                         */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTOTVAL_H__\n#define __FTOTVAL_H__\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    ot_validation                                                      */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    OpenType Validation                                                */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    An API to validate OpenType tables.                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains the declaration of functions to validate     */\n  /*    some OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH).         */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n /**********************************************************************\n  *\n  * @enum:\n  *    FT_VALIDATE_OTXXX\n  *\n  * @description:\n  *    A list of bit-field constants used with @FT_OpenType_Validate to\n  *    indicate which OpenType tables should be validated.\n  *\n  * @values:\n  *    FT_VALIDATE_BASE ::\n  *      Validate BASE table.\n  *\n  *    FT_VALIDATE_GDEF ::\n  *      Validate GDEF table.\n  *\n  *    FT_VALIDATE_GPOS ::\n  *      Validate GPOS table.\n  *\n  *    FT_VALIDATE_GSUB ::\n  *      Validate GSUB table.\n  *\n  *    FT_VALIDATE_JSTF ::\n  *      Validate JSTF table.\n  *\n  *    FT_VALIDATE_MATH ::\n  *      Validate MATH table.\n  *\n  *    FT_VALIDATE_OT ::\n  *      Validate all OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH).\n  *\n  */\n#define FT_VALIDATE_BASE  0x0100\n#define FT_VALIDATE_GDEF  0x0200\n#define FT_VALIDATE_GPOS  0x0400\n#define FT_VALIDATE_GSUB  0x0800\n#define FT_VALIDATE_JSTF  0x1000\n#define FT_VALIDATE_MATH  0x2000\n\n#define FT_VALIDATE_OT  FT_VALIDATE_BASE | \\\n                        FT_VALIDATE_GDEF | \\\n                        FT_VALIDATE_GPOS | \\\n                        FT_VALIDATE_GSUB | \\\n                        FT_VALIDATE_JSTF | \\\n                        FT_VALIDATE_MATH\n\n  /* */\n\n /**********************************************************************\n  *\n  * @function:\n  *    FT_OpenType_Validate\n  *\n  * @description:\n  *    Validate various OpenType tables to assure that all offsets and\n  *    indices are valid.  The idea is that a higher-level library which\n  *    actually does the text layout can access those tables without\n  *    error checking (which can be quite time consuming).\n  *\n  * @input:\n  *    face ::\n  *       A handle to the input face.\n  *\n  *    validation_flags ::\n  *       A bit field which specifies the tables to be validated.  See\n  *       @FT_VALIDATE_OTXXX for possible values.\n  *\n  * @output:\n  *    BASE_table ::\n  *       A pointer to the BASE table.\n  *\n  *    GDEF_table ::\n  *       A pointer to the GDEF table.\n  *\n  *    GPOS_table ::\n  *       A pointer to the GPOS table.\n  *\n  *    GSUB_table ::\n  *       A pointer to the GSUB table.\n  *\n  *    JSTF_table ::\n  *       A pointer to the JSTF table.\n  *\n  * @return:\n  *   FreeType error code.  0~means success.\n  *\n  * @note:\n  *   This function only works with OpenType fonts, returning an error\n  *   otherwise.\n  *\n  *   After use, the application should deallocate the five tables with\n  *   @FT_OpenType_Free.  A NULL value indicates that the table either\n  *   doesn't exist in the font, or the application hasn't asked for\n  *   validation.\n  */\n  FT_EXPORT( FT_Error )\n  FT_OpenType_Validate( FT_Face    face,\n                        FT_UInt    validation_flags,\n                        FT_Bytes  *BASE_table,\n                        FT_Bytes  *GDEF_table,\n                        FT_Bytes  *GPOS_table,\n                        FT_Bytes  *GSUB_table,\n                        FT_Bytes  *JSTF_table );\n\n  /* */\n\n /**********************************************************************\n  *\n  * @function:\n  *    FT_OpenType_Free\n  *\n  * @description:\n  *    Free the buffer allocated by OpenType validator.\n  *\n  * @input:\n  *    face ::\n  *       A handle to the input face.\n  *\n  *    table ::\n  *       The pointer to the buffer that is allocated by\n  *       @FT_OpenType_Validate.\n  *\n  * @note:\n  *   This function must be used to free the buffer allocated by\n  *   @FT_OpenType_Validate only.\n  */\n  FT_EXPORT( void )\n  FT_OpenType_Free( FT_Face   face,\n                    FT_Bytes  table );\n\n\n /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTOTVAL_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ftoutln.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftoutln.h                                                              */\n/*                                                                         */\n/*    Support for the FT_Outline type used to store glyph shapes of        */\n/*    most scalable font formats (specification).                          */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009 by       */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTOUTLN_H__\n#define __FTOUTLN_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    outline_processing                                                 */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    Outline Processing                                                 */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    Functions to create, transform, and render vectorial glyph images. */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains routines used to create and destroy scalable */\n  /*    glyph images known as `outlines'.  These can also be measured,     */\n  /*    transformed, and converted into bitmaps and pixmaps.               */\n  /*                                                                       */\n  /* <Order>                                                               */\n  /*    FT_Outline                                                         */\n  /*    FT_OUTLINE_FLAGS                                                   */\n  /*    FT_Outline_New                                                     */\n  /*    FT_Outline_Done                                                    */\n  /*    FT_Outline_Copy                                                    */\n  /*    FT_Outline_Translate                                               */\n  /*    FT_Outline_Transform                                               */\n  /*    FT_Outline_Embolden                                                */\n  /*    FT_Outline_Reverse                                                 */\n  /*    FT_Outline_Check                                                   */\n  /*                                                                       */\n  /*    FT_Outline_Get_CBox                                                */\n  /*    FT_Outline_Get_BBox                                                */\n  /*                                                                       */\n  /*    FT_Outline_Get_Bitmap                                              */\n  /*    FT_Outline_Render                                                  */\n  /*                                                                       */\n  /*    FT_Outline_Decompose                                               */\n  /*    FT_Outline_Funcs                                                   */\n  /*    FT_Outline_MoveTo_Func                                             */\n  /*    FT_Outline_LineTo_Func                                             */\n  /*    FT_Outline_ConicTo_Func                                            */\n  /*    FT_Outline_CubicTo_Func                                            */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Outline_Decompose                                               */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Walk over an outline's structure to decompose it into individual   */\n  /*    segments and Bézier arcs.  This function is also able to emit      */\n  /*    `move to' and `close to' operations to indicate the start and end  */\n  /*    of new contours in the outline.                                    */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    outline        :: A pointer to the source target.                  */\n  /*                                                                       */\n  /*    func_interface :: A table of `emitters', i.e., function pointers   */\n  /*                      called during decomposition to indicate path     */\n  /*                      operations.                                      */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    user           :: A typeless pointer which is passed to each       */\n  /*                      emitter during the decomposition.  It can be     */\n  /*                      used to store the state during the               */\n  /*                      decomposition.                                   */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Outline_Decompose( FT_Outline*              outline,\n                        const FT_Outline_Funcs*  func_interface,\n                        void*                    user );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Outline_New                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Create a new outline of a given size.                              */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library     :: A handle to the library object from where the       */\n  /*                   outline is allocated.  Note however that the new    */\n  /*                   outline will *not* necessarily be *freed*, when     */\n  /*                   destroying the library, by @FT_Done_FreeType.       */\n  /*                                                                       */\n  /*    numPoints   :: The maximal number of points within the outline.    */\n  /*                                                                       */\n  /*    numContours :: The maximal number of contours within the outline.  */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    anoutline   :: A handle to the new outline.                        */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The reason why this function takes a `library' parameter is simply */\n  /*    to use the library's memory allocator.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Outline_New( FT_Library   library,\n                  FT_UInt      numPoints,\n                  FT_Int       numContours,\n                  FT_Outline  *anoutline );\n\n\n  FT_EXPORT( FT_Error )\n  FT_Outline_New_Internal( FT_Memory    memory,\n                           FT_UInt      numPoints,\n                           FT_Int       numContours,\n                           FT_Outline  *anoutline );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Outline_Done                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Destroy an outline created with @FT_Outline_New.                   */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library :: A handle of the library object used to allocate the     */\n  /*               outline.                                                */\n  /*                                                                       */\n  /*    outline :: A pointer to the outline object to be discarded.        */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    If the outline's `owner' field is not set, only the outline        */\n  /*    descriptor will be released.                                       */\n  /*                                                                       */\n  /*    The reason why this function takes an `library' parameter is       */\n  /*    simply to use ft_mem_free().                                       */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Outline_Done( FT_Library   library,\n                   FT_Outline*  outline );\n\n\n  FT_EXPORT( FT_Error )\n  FT_Outline_Done_Internal( FT_Memory    memory,\n                            FT_Outline*  outline );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Outline_Check                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Check the contents of an outline descriptor.                       */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    outline :: A handle to a source outline.                           */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Outline_Check( FT_Outline*  outline );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Outline_Get_CBox                                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return an outline's `control box'.  The control box encloses all   */\n  /*    the outline's points, including Bézier control points.  Though it  */\n  /*    coincides with the exact bounding box for most glyphs, it can be   */\n  /*    slightly larger in some situations (like when rotating an outline  */\n  /*    which contains Bézier outside arcs).                               */\n  /*                                                                       */\n  /*    Computing the control box is very fast, while getting the bounding */\n  /*    box can take much more time as it needs to walk over all segments  */\n  /*    and arcs in the outline.  To get the latter, you can use the       */\n  /*    `ftbbox' component which is dedicated to this single task.         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    outline :: A pointer to the source outline descriptor.             */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    acbox   :: The outline's control box.                              */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_Outline_Get_CBox( const FT_Outline*  outline,\n                       FT_BBox           *acbox );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Outline_Translate                                               */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Apply a simple translation to the points of an outline.            */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    outline :: A pointer to the target outline descriptor.             */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    xOffset :: The horizontal offset.                                  */\n  /*                                                                       */\n  /*    yOffset :: The vertical offset.                                    */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_Outline_Translate( const FT_Outline*  outline,\n                        FT_Pos             xOffset,\n                        FT_Pos             yOffset );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Outline_Copy                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Copy an outline into another one.  Both objects must have the      */\n  /*    same sizes (number of points & number of contours) when this       */\n  /*    function is called.                                                */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    source :: A handle to the source outline.                          */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    target :: A handle to the target outline.                          */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Outline_Copy( const FT_Outline*  source,\n                   FT_Outline        *target );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Outline_Transform                                               */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Apply a simple 2x2 matrix to all of an outline's points.  Useful   */\n  /*    for applying rotations, slanting, flipping, etc.                   */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    outline :: A pointer to the target outline descriptor.             */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    matrix  :: A pointer to the transformation matrix.                 */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    You can use @FT_Outline_Translate if you need to translate the     */\n  /*    outline's points.                                                  */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_Outline_Transform( const FT_Outline*  outline,\n                        const FT_Matrix*   matrix );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Outline_Embolden                                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Embolden an outline.  The new outline will be at most 4~times      */\n  /*    `strength' pixels wider and higher.  You may think of the left and */\n  /*    bottom borders as unchanged.                                       */\n  /*                                                                       */\n  /*    Negative `strength' values to reduce the outline thickness are     */\n  /*    possible also.                                                     */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    outline  :: A handle to the target outline.                        */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    strength :: How strong the glyph is emboldened.  Expressed in      */\n  /*                26.6 pixel format.                                     */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The used algorithm to increase or decrease the thickness of the    */\n  /*    glyph doesn't change the number of points; this means that certain */\n  /*    situations like acute angles or intersections are sometimes        */\n  /*    handled incorrectly.                                               */\n  /*                                                                       */\n  /*    If you need `better' metrics values you should call                */\n  /*    @FT_Outline_Get_CBox ot @FT_Outline_Get_BBox.                      */\n  /*                                                                       */\n  /*    Example call:                                                      */\n  /*                                                                       */\n  /*    {                                                                  */\n  /*      FT_Load_Glyph( face, index, FT_LOAD_DEFAULT );                   */\n  /*      if ( face->slot->format == FT_GLYPH_FORMAT_OUTLINE )             */\n  /*        FT_Outline_Embolden( &face->slot->outline, strength );         */\n  /*    }                                                                  */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Outline_Embolden( FT_Outline*  outline,\n                       FT_Pos       strength );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Outline_Reverse                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Reverse the drawing direction of an outline.  This is used to      */\n  /*    ensure consistent fill conventions for mirrored glyphs.            */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    outline :: A pointer to the target outline descriptor.             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This function toggles the bit flag @FT_OUTLINE_REVERSE_FILL in     */\n  /*    the outline's `flags' field.                                       */\n  /*                                                                       */\n  /*    It shouldn't be used by a normal client application, unless it     */\n  /*    knows what it is doing.                                            */\n  /*                                                                       */\n  FT_EXPORT( void )\n  FT_Outline_Reverse( FT_Outline*  outline );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Outline_Get_Bitmap                                              */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Render an outline within a bitmap.  The outline's image is simply  */\n  /*    OR-ed to the target bitmap.                                        */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library :: A handle to a FreeType library object.                  */\n  /*                                                                       */\n  /*    outline :: A pointer to the source outline descriptor.             */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    abitmap :: A pointer to the target bitmap descriptor.              */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This function does NOT CREATE the bitmap, it only renders an       */\n  /*    outline image within the one you pass to it!  Consequently, the    */\n  /*    various fields in `abitmap' should be set accordingly.             */\n  /*                                                                       */\n  /*    It will use the raster corresponding to the default glyph format.  */\n  /*                                                                       */\n  /*    The value of the `num_grays' field in `abitmap' is ignored.  If    */\n  /*    you select the gray-level rasterizer, and you want less than 256   */\n  /*    gray levels, you have to use @FT_Outline_Render directly.          */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Outline_Get_Bitmap( FT_Library        library,\n                         FT_Outline*       outline,\n                         const FT_Bitmap  *abitmap );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Outline_Render                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Render an outline within a bitmap using the current scan-convert.  */\n  /*    This function uses an @FT_Raster_Params structure as an argument,  */\n  /*    allowing advanced features like direct composition, translucency,  */\n  /*    etc.                                                               */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library :: A handle to a FreeType library object.                  */\n  /*                                                                       */\n  /*    outline :: A pointer to the source outline descriptor.             */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    params  :: A pointer to an @FT_Raster_Params structure used to     */\n  /*               describe the rendering operation.                       */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    You should know what you are doing and how @FT_Raster_Params works */\n  /*    to use this function.                                              */\n  /*                                                                       */\n  /*    The field `params.source' will be set to `outline' before the scan */\n  /*    converter is called, which means that the value you give to it is  */\n  /*    actually ignored.                                                  */\n  /*                                                                       */\n  /*    The gray-level rasterizer always uses 256 gray levels.  If you     */\n  /*    want less gray levels, you have to provide your own span callback. */\n  /*    See the @FT_RASTER_FLAG_DIRECT value of the `flags' field in the   */\n  /*    @FT_Raster_Params structure for more details.                      */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Outline_Render( FT_Library         library,\n                     FT_Outline*        outline,\n                     FT_Raster_Params*  params );\n\n\n /**************************************************************************\n  *\n  * @enum:\n  *   FT_Orientation\n  *\n  * @description:\n  *   A list of values used to describe an outline's contour orientation.\n  *\n  *   The TrueType and PostScript specifications use different conventions\n  *   to determine whether outline contours should be filled or unfilled.\n  *\n  * @values:\n  *   FT_ORIENTATION_TRUETYPE ::\n  *     According to the TrueType specification, clockwise contours must\n  *     be filled, and counter-clockwise ones must be unfilled.\n  *\n  *   FT_ORIENTATION_POSTSCRIPT ::\n  *     According to the PostScript specification, counter-clockwise contours\n  *     must be filled, and clockwise ones must be unfilled.\n  *\n  *   FT_ORIENTATION_FILL_RIGHT ::\n  *     This is identical to @FT_ORIENTATION_TRUETYPE, but is used to\n  *     remember that in TrueType, everything that is to the right of\n  *     the drawing direction of a contour must be filled.\n  *\n  *   FT_ORIENTATION_FILL_LEFT ::\n  *     This is identical to @FT_ORIENTATION_POSTSCRIPT, but is used to\n  *     remember that in PostScript, everything that is to the left of\n  *     the drawing direction of a contour must be filled.\n  *\n  *   FT_ORIENTATION_NONE ::\n  *     The orientation cannot be determined.  That is, different parts of\n  *     the glyph have different orientation.\n  *\n  */\n  typedef enum  FT_Orientation_\n  {\n    FT_ORIENTATION_TRUETYPE   = 0,\n    FT_ORIENTATION_POSTSCRIPT = 1,\n    FT_ORIENTATION_FILL_RIGHT = FT_ORIENTATION_TRUETYPE,\n    FT_ORIENTATION_FILL_LEFT  = FT_ORIENTATION_POSTSCRIPT,\n    FT_ORIENTATION_NONE\n\n  } FT_Orientation;\n\n\n /**************************************************************************\n  *\n  * @function:\n  *   FT_Outline_Get_Orientation\n  *\n  * @description:\n  *   This function analyzes a glyph outline and tries to compute its\n  *   fill orientation (see @FT_Orientation).  This is done by computing\n  *   the direction of each global horizontal and/or vertical extrema\n  *   within the outline.\n  *\n  *   Note that this will return @FT_ORIENTATION_TRUETYPE for empty\n  *   outlines.\n  *\n  * @input:\n  *   outline ::\n  *     A handle to the source outline.\n  *\n  * @return:\n  *   The orientation.\n  *\n  */\n  FT_EXPORT( FT_Orientation )\n  FT_Outline_Get_Orientation( FT_Outline*  outline );\n\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTOUTLN_H__ */\n\n\n/* END */\n\n\n/* Local Variables: */\n/* coding: utf-8    */\n/* End:             */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ftpfr.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftpfr.h                                                                */\n/*                                                                         */\n/*    FreeType API for accessing PFR-specific data (specification only).   */\n/*                                                                         */\n/*  Copyright 2002, 2003, 2004, 2006, 2008, 2009 by                        */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTPFR_H__\n#define __FTPFR_H__\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    pfr_fonts                                                          */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    PFR Fonts                                                          */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    PFR/TrueDoc specific API.                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains the declaration of PFR-specific functions.   */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n /**********************************************************************\n  *\n  * @function:\n  *    FT_Get_PFR_Metrics\n  *\n  * @description:\n  *    Return the outline and metrics resolutions of a given PFR face.\n  *\n  * @input:\n  *    face :: Handle to the input face.  It can be a non-PFR face.\n  *\n  * @output:\n  *    aoutline_resolution ::\n  *      Outline resolution.  This is equivalent to `face->units_per_EM'\n  *      for non-PFR fonts.  Optional (parameter can be NULL).\n  *\n  *    ametrics_resolution ::\n  *      Metrics resolution.  This is equivalent to `outline_resolution'\n  *      for non-PFR fonts.  Optional (parameter can be NULL).\n  *\n  *    ametrics_x_scale ::\n  *      A 16.16 fixed-point number used to scale distance expressed\n  *      in metrics units to device sub-pixels.  This is equivalent to\n  *      `face->size->x_scale', but for metrics only.  Optional (parameter\n  *      can be NULL).\n  *\n  *    ametrics_y_scale ::\n  *      Same as `ametrics_x_scale' but for the vertical direction.\n  *      optional (parameter can be NULL).\n  *\n  * @return:\n  *    FreeType error code.  0~means success.\n  *\n  * @note:\n  *   If the input face is not a PFR, this function will return an error.\n  *   However, in all cases, it will return valid values.\n  */\n  FT_EXPORT( FT_Error )\n  FT_Get_PFR_Metrics( FT_Face    face,\n                      FT_UInt   *aoutline_resolution,\n                      FT_UInt   *ametrics_resolution,\n                      FT_Fixed  *ametrics_x_scale,\n                      FT_Fixed  *ametrics_y_scale );\n\n\n /**********************************************************************\n  *\n  * @function:\n  *    FT_Get_PFR_Kerning\n  *\n  * @description:\n  *    Return the kerning pair corresponding to two glyphs in a PFR face.\n  *    The distance is expressed in metrics units, unlike the result of\n  *    @FT_Get_Kerning.\n  *\n  * @input:\n  *    face  :: A handle to the input face.\n  *\n  *    left  :: Index of the left glyph.\n  *\n  *    right :: Index of the right glyph.\n  *\n  * @output:\n  *    avector :: A kerning vector.\n  *\n  * @return:\n  *    FreeType error code.  0~means success.\n  *\n  * @note:\n  *    This function always return distances in original PFR metrics\n  *    units.  This is unlike @FT_Get_Kerning with the @FT_KERNING_UNSCALED\n  *    mode, which always returns distances converted to outline units.\n  *\n  *    You can use the value of the `x_scale' and `y_scale' parameters\n  *    returned by @FT_Get_PFR_Metrics to scale these to device sub-pixels.\n  */\n  FT_EXPORT( FT_Error )\n  FT_Get_PFR_Kerning( FT_Face     face,\n                      FT_UInt     left,\n                      FT_UInt     right,\n                      FT_Vector  *avector );\n\n\n /**********************************************************************\n  *\n  * @function:\n  *    FT_Get_PFR_Advance\n  *\n  * @description:\n  *    Return a given glyph advance, expressed in original metrics units,\n  *    from a PFR font.\n  *\n  * @input:\n  *    face   :: A handle to the input face.\n  *\n  *    gindex :: The glyph index.\n  *\n  * @output:\n  *    aadvance :: The glyph advance in metrics units.\n  *\n  * @return:\n  *    FreeType error code.  0~means success.\n  *\n  * @note:\n  *    You can use the `x_scale' or `y_scale' results of @FT_Get_PFR_Metrics\n  *    to convert the advance to device sub-pixels (i.e., 1/64th of pixels).\n  */\n  FT_EXPORT( FT_Error )\n  FT_Get_PFR_Advance( FT_Face   face,\n                      FT_UInt   gindex,\n                      FT_Pos   *aadvance );\n\n /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTPFR_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ftrender.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftrender.h                                                             */\n/*                                                                         */\n/*    FreeType renderer modules public interface (specification).          */\n/*                                                                         */\n/*  Copyright 1996-2001, 2005, 2006 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTRENDER_H__\n#define __FTRENDER_H__\n\n\n#include <ft2build.h>\n#include FT_MODULE_H\n#include FT_GLYPH_H\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    module_management                                                  */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /* create a new glyph object */\n  typedef FT_Error\n  (*FT_Glyph_InitFunc)( FT_Glyph      glyph,\n                        FT_GlyphSlot  slot );\n\n  /* destroys a given glyph object */\n  typedef void\n  (*FT_Glyph_DoneFunc)( FT_Glyph  glyph );\n\n  typedef void\n  (*FT_Glyph_TransformFunc)( FT_Glyph          glyph,\n                             const FT_Matrix*  matrix,\n                             const FT_Vector*  delta );\n\n  typedef void\n  (*FT_Glyph_GetBBoxFunc)( FT_Glyph  glyph,\n                           FT_BBox*  abbox );\n\n  typedef FT_Error\n  (*FT_Glyph_CopyFunc)( FT_Glyph   source,\n                        FT_Glyph   target );\n\n  typedef FT_Error\n  (*FT_Glyph_PrepareFunc)( FT_Glyph      glyph,\n                           FT_GlyphSlot  slot );\n\n/* deprecated */\n#define FT_Glyph_Init_Func       FT_Glyph_InitFunc\n#define FT_Glyph_Done_Func       FT_Glyph_DoneFunc\n#define FT_Glyph_Transform_Func  FT_Glyph_TransformFunc\n#define FT_Glyph_BBox_Func       FT_Glyph_GetBBoxFunc\n#define FT_Glyph_Copy_Func       FT_Glyph_CopyFunc\n#define FT_Glyph_Prepare_Func    FT_Glyph_PrepareFunc\n\n\n  struct  FT_Glyph_Class_\n  {\n    FT_Long                 glyph_size;\n    FT_Glyph_Format         glyph_format;\n    FT_Glyph_InitFunc       glyph_init;\n    FT_Glyph_DoneFunc       glyph_done;\n    FT_Glyph_CopyFunc       glyph_copy;\n    FT_Glyph_TransformFunc  glyph_transform;\n    FT_Glyph_GetBBoxFunc    glyph_bbox;\n    FT_Glyph_PrepareFunc    glyph_prepare;\n  };\n\n\n  typedef FT_Error\n  (*FT_Renderer_RenderFunc)( FT_Renderer       renderer,\n                             FT_GlyphSlot      slot,\n                             FT_UInt           mode,\n                             const FT_Vector*  origin );\n\n  typedef FT_Error\n  (*FT_Renderer_TransformFunc)( FT_Renderer       renderer,\n                                FT_GlyphSlot      slot,\n                                const FT_Matrix*  matrix,\n                                const FT_Vector*  delta );\n\n\n  typedef void\n  (*FT_Renderer_GetCBoxFunc)( FT_Renderer   renderer,\n                              FT_GlyphSlot  slot,\n                              FT_BBox*      cbox );\n\n\n  typedef FT_Error\n  (*FT_Renderer_SetModeFunc)( FT_Renderer  renderer,\n                              FT_ULong     mode_tag,\n                              FT_Pointer   mode_ptr );\n\n/* deprecated identifiers */\n#define FTRenderer_render  FT_Renderer_RenderFunc\n#define FTRenderer_transform  FT_Renderer_TransformFunc\n#define FTRenderer_getCBox  FT_Renderer_GetCBoxFunc\n#define FTRenderer_setMode  FT_Renderer_SetModeFunc\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Renderer_Class                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The renderer module class descriptor.                              */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    root            :: The root @FT_Module_Class fields.               */\n  /*                                                                       */\n  /*    glyph_format    :: The glyph image format this renderer handles.   */\n  /*                                                                       */\n  /*    render_glyph    :: A method used to render the image that is in a  */\n  /*                       given glyph slot into a bitmap.                 */\n  /*                                                                       */\n  /*    transform_glyph :: A method used to transform the image that is in */\n  /*                       a given glyph slot.                             */\n  /*                                                                       */\n  /*    get_glyph_cbox  :: A method used to access the glyph's cbox.       */\n  /*                                                                       */\n  /*    set_mode        :: A method used to pass additional parameters.    */\n  /*                                                                       */\n  /*    raster_class    :: For @FT_GLYPH_FORMAT_OUTLINE renderers only.    */\n  /*                       This is a pointer to its raster's class.        */\n  /*                                                                       */\n  /*    raster          :: For @FT_GLYPH_FORMAT_OUTLINE renderers only.    */\n  /*                       This is a pointer to the corresponding raster   */\n  /*                       object, if any.                                 */\n  /*                                                                       */\n  typedef struct  FT_Renderer_Class_\n  {\n    FT_Module_Class            root;\n\n    FT_Glyph_Format            glyph_format;\n\n    FT_Renderer_RenderFunc     render_glyph;\n    FT_Renderer_TransformFunc  transform_glyph;\n    FT_Renderer_GetCBoxFunc    get_glyph_cbox;\n    FT_Renderer_SetModeFunc    set_mode;\n\n    FT_Raster_Funcs*           raster_class;\n\n  } FT_Renderer_Class;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Renderer                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Retrieve the current renderer for a given glyph format.            */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    library :: A handle to the library object.                         */\n  /*                                                                       */\n  /*    format  :: The glyph format.                                       */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    A renderer handle.  0~if none found.                               */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    An error will be returned if a module already exists by that name, */\n  /*    or if the module requires a version of FreeType that is too great. */\n  /*                                                                       */\n  /*    To add a new renderer, simply use @FT_Add_Module.  To retrieve a   */\n  /*    renderer by its name, use @FT_Get_Module.                          */\n  /*                                                                       */\n  FT_EXPORT( FT_Renderer )\n  FT_Get_Renderer( FT_Library       library,\n                   FT_Glyph_Format  format );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Set_Renderer                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Set the current renderer to use, and set additional mode.          */\n  /*                                                                       */\n  /* <InOut>                                                               */\n  /*    library    :: A handle to the library object.                      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    renderer   :: A handle to the renderer object.                     */\n  /*                                                                       */\n  /*    num_params :: The number of additional parameters.                 */\n  /*                                                                       */\n  /*    parameters :: Additional parameters.                               */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    In case of success, the renderer will be used to convert glyph     */\n  /*    images in the renderer's known format into bitmaps.                */\n  /*                                                                       */\n  /*    This doesn't change the current renderer for other formats.        */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Set_Renderer( FT_Library     library,\n                   FT_Renderer    renderer,\n                   FT_UInt        num_params,\n                   FT_Parameter*  parameters );\n\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTRENDER_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ftsizes.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftsizes.h                                                              */\n/*                                                                         */\n/*    FreeType size objects management (specification).                    */\n/*                                                                         */\n/*  Copyright 1996-2001, 2003, 2004, 2006, 2009 by                         */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Typical application would normally not need to use these functions.   */\n  /* However, they have been placed in a public API for the rare cases     */\n  /* where they are needed.                                                */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n#ifndef __FTSIZES_H__\n#define __FTSIZES_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    sizes_management                                                   */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    Size Management                                                    */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    Managing multiple sizes per face.                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    When creating a new face object (e.g., with @FT_New_Face), an      */\n  /*    @FT_Size object is automatically created and used to store all     */\n  /*    pixel-size dependent information, available in the `face->size'    */\n  /*    field.                                                             */\n  /*                                                                       */\n  /*    It is however possible to create more sizes for a given face,      */\n  /*    mostly in order to manage several character pixel sizes of the     */\n  /*    same font family and style.  See @FT_New_Size and @FT_Done_Size.   */\n  /*                                                                       */\n  /*    Note that @FT_Set_Pixel_Sizes and @FT_Set_Char_Size only           */\n  /*    modify the contents of the current `active' size; you thus need    */\n  /*    to use @FT_Activate_Size to change it.                             */\n  /*                                                                       */\n  /*    99% of applications won't need the functions provided here,        */\n  /*    especially if they use the caching sub-system, so be cautious      */\n  /*    when using these.                                                  */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_New_Size                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Create a new size object from a given face object.                 */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face :: A handle to a parent face object.                          */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    asize :: A handle to a new size object.                            */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    You need to call @FT_Activate_Size in order to select the new size */\n  /*    for upcoming calls to @FT_Set_Pixel_Sizes, @FT_Set_Char_Size,      */\n  /*    @FT_Load_Glyph, @FT_Load_Char, etc.                                */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_New_Size( FT_Face   face,\n               FT_Size*  size );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Done_Size                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Discard a given size object.  Note that @FT_Done_Face              */\n  /*    automatically discards all size objects allocated with             */\n  /*    @FT_New_Size.                                                      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    size :: A handle to a target size object.                          */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Done_Size( FT_Size  size );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Activate_Size                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Even though it is possible to create several size objects for a    */\n  /*    given face (see @FT_New_Size for details), functions like          */\n  /*    @FT_Load_Glyph or @FT_Load_Char only use the one which has been    */\n  /*    activated last to determine the `current character pixel size'.    */\n  /*                                                                       */\n  /*    This function can be used to `activate' a previously created size  */\n  /*    object.                                                            */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    size :: A handle to a target size object.                          */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    If `face' is the size's parent face object, this function changes  */\n  /*    the value of `face->size' to the input size handle.                */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Activate_Size( FT_Size  size );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTSIZES_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ftsnames.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftsnames.h                                                             */\n/*                                                                         */\n/*    Simple interface to access SFNT name tables (which are used          */\n/*    to hold font names, copyright info, notices, etc.) (specification).  */\n/*                                                                         */\n/*    This is _not_ used to retrieve glyph names!                          */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2003, 2006, 2009 by                         */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FT_SFNT_NAMES_H__\n#define __FT_SFNT_NAMES_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    sfnt_names                                                         */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    SFNT Names                                                         */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    Access the names embedded in TrueType and OpenType files.          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The TrueType and OpenType specifications allow the inclusion of    */\n  /*    a special `names table' in font files.  This table contains        */\n  /*    textual (and internationalized) information regarding the font,    */\n  /*    like family name, copyright, version, etc.                         */\n  /*                                                                       */\n  /*    The definitions below are used to access them if available.        */\n  /*                                                                       */\n  /*    Note that this has nothing to do with glyph names!                 */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_SfntName                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to model an SFNT `name' table entry.              */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    platform_id :: The platform ID for `string'.                       */\n  /*                                                                       */\n  /*    encoding_id :: The encoding ID for `string'.                       */\n  /*                                                                       */\n  /*    language_id :: The language ID for `string'.                       */\n  /*                                                                       */\n  /*    name_id     :: An identifier for `string'.                         */\n  /*                                                                       */\n  /*    string      :: The `name' string.  Note that its format differs    */\n  /*                   depending on the (platform,encoding) pair.  It can  */\n  /*                   be a Pascal String, a UTF-16 one, etc.              */\n  /*                                                                       */\n  /*                   Generally speaking, the string is not               */\n  /*                   zero-terminated.  Please refer to the TrueType      */\n  /*                   specification for details.                          */\n  /*                                                                       */\n  /*    string_len  :: The length of `string' in bytes.                    */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    Possible values for `platform_id', `encoding_id', `language_id',   */\n  /*    and `name_id' are given in the file `ttnameid.h'.  For details     */\n  /*    please refer to the TrueType or OpenType specification.            */\n  /*                                                                       */\n  /*    See also @TT_PLATFORM_XXX, @TT_APPLE_ID_XXX, @TT_MAC_ID_XXX,       */\n  /*    @TT_ISO_ID_XXX, and @TT_MS_ID_XXX.                                 */\n  /*                                                                       */\n  typedef struct  FT_SfntName_\n  {\n    FT_UShort  platform_id;\n    FT_UShort  encoding_id;\n    FT_UShort  language_id;\n    FT_UShort  name_id;\n\n    FT_Byte*   string;      /* this string is *not* null-terminated! */\n    FT_UInt    string_len;  /* in bytes */\n\n  } FT_SfntName;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Sfnt_Name_Count                                             */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Retrieve the number of name strings in the SFNT `name' table.      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face :: A handle to the source face.                               */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The number of strings in the `name' table.                         */\n  /*                                                                       */\n  FT_EXPORT( FT_UInt )\n  FT_Get_Sfnt_Name_Count( FT_Face  face );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Sfnt_Name                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Retrieve a string of the SFNT `name' table for a given index.      */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face  :: A handle to the source face.                              */\n  /*                                                                       */\n  /*    idx   :: The index of the `name' string.                           */\n  /*                                                                       */\n  /* <Output>                                                              */\n  /*    aname :: The indexed @FT_SfntName structure.                       */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    FreeType error code.  0~means success.                             */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The `string' array returned in the `aname' structure is not        */\n  /*    null-terminated.  The application should deallocate it if it is no */\n  /*    longer in use.                                                     */\n  /*                                                                       */\n  /*    Use @FT_Get_Sfnt_Name_Count to get the total number of available   */\n  /*    `name' table entries, then do a loop until you get the right       */\n  /*    platform, encoding, and name ID.                                   */\n  /*                                                                       */\n  FT_EXPORT( FT_Error )\n  FT_Get_Sfnt_Name( FT_Face       face,\n                    FT_UInt       idx,\n                    FT_SfntName  *aname );\n\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FT_SFNT_NAMES_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ftstroke.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftstroke.h                                                             */\n/*                                                                         */\n/*    FreeType path stroker (specification).                               */\n/*                                                                         */\n/*  Copyright 2002, 2003, 2004, 2005, 2006, 2008, 2009 by                  */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FT_STROKE_H__\n#define __FT_STROKE_H__\n\n#include <ft2build.h>\n#include FT_OUTLINE_H\n#include FT_GLYPH_H\n\n\nFT_BEGIN_HEADER\n\n\n /************************************************************************\n  *\n  * @section:\n  *    glyph_stroker\n  *\n  * @title:\n  *    Glyph Stroker\n  *\n  * @abstract:\n  *    Generating bordered and stroked glyphs.\n  *\n  * @description:\n  *    This component generates stroked outlines of a given vectorial\n  *    glyph.  It also allows you to retrieve the `outside' and/or the\n  *    `inside' borders of the stroke.\n  *\n  *    This can be useful to generate `bordered' glyph, i.e., glyphs\n  *    displayed with a coloured (and anti-aliased) border around their\n  *    shape.\n  */\n\n\n /**************************************************************\n  *\n  * @type:\n  *   FT_Stroker\n  *\n  * @description:\n  *   Opaque handler to a path stroker object.\n  */\n  typedef struct FT_StrokerRec_*  FT_Stroker;\n\n\n  /**************************************************************\n   *\n   * @enum:\n   *   FT_Stroker_LineJoin\n   *\n   * @description:\n   *   These values determine how two joining lines are rendered\n   *   in a stroker.\n   *\n   * @values:\n   *   FT_STROKER_LINEJOIN_ROUND ::\n   *     Used to render rounded line joins.  Circular arcs are used\n   *     to join two lines smoothly.\n   *\n   *   FT_STROKER_LINEJOIN_BEVEL ::\n   *     Used to render beveled line joins; i.e., the two joining lines\n   *     are extended until they intersect.\n   *\n   *   FT_STROKER_LINEJOIN_MITER ::\n   *     Same as beveled rendering, except that an additional line\n   *     break is added if the angle between the two joining lines\n   *     is too closed (this is useful to avoid unpleasant spikes\n   *     in beveled rendering).\n   */\n  typedef enum  FT_Stroker_LineJoin_\n  {\n    FT_STROKER_LINEJOIN_ROUND = 0,\n    FT_STROKER_LINEJOIN_BEVEL,\n    FT_STROKER_LINEJOIN_MITER\n\n  } FT_Stroker_LineJoin;\n\n\n  /**************************************************************\n   *\n   * @enum:\n   *   FT_Stroker_LineCap\n   *\n   * @description:\n   *   These values determine how the end of opened sub-paths are\n   *   rendered in a stroke.\n   *\n   * @values:\n   *   FT_STROKER_LINECAP_BUTT ::\n   *     The end of lines is rendered as a full stop on the last\n   *     point itself.\n   *\n   *   FT_STROKER_LINECAP_ROUND ::\n   *     The end of lines is rendered as a half-circle around the\n   *     last point.\n   *\n   *   FT_STROKER_LINECAP_SQUARE ::\n   *     The end of lines is rendered as a square around the\n   *     last point.\n   */\n  typedef enum  FT_Stroker_LineCap_\n  {\n    FT_STROKER_LINECAP_BUTT = 0,\n    FT_STROKER_LINECAP_ROUND,\n    FT_STROKER_LINECAP_SQUARE\n\n  } FT_Stroker_LineCap;\n\n\n  /**************************************************************\n   *\n   * @enum:\n   *   FT_StrokerBorder\n   *\n   * @description:\n   *   These values are used to select a given stroke border\n   *   in @FT_Stroker_GetBorderCounts and @FT_Stroker_ExportBorder.\n   *\n   * @values:\n   *   FT_STROKER_BORDER_LEFT ::\n   *     Select the left border, relative to the drawing direction.\n   *\n   *   FT_STROKER_BORDER_RIGHT ::\n   *     Select the right border, relative to the drawing direction.\n   *\n   * @note:\n   *   Applications are generally interested in the `inside' and `outside'\n   *   borders.  However, there is no direct mapping between these and the\n   *   `left' and `right' ones, since this really depends on the glyph's\n   *   drawing orientation, which varies between font formats.\n   *\n   *   You can however use @FT_Outline_GetInsideBorder and\n   *   @FT_Outline_GetOutsideBorder to get these.\n   */\n  typedef enum  FT_StrokerBorder_\n  {\n    FT_STROKER_BORDER_LEFT = 0,\n    FT_STROKER_BORDER_RIGHT\n\n  } FT_StrokerBorder;\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Outline_GetInsideBorder\n   *\n   * @description:\n   *   Retrieve the @FT_StrokerBorder value corresponding to the\n   *   `inside' borders of a given outline.\n   *\n   * @input:\n   *   outline ::\n   *     The source outline handle.\n   *\n   * @return:\n   *   The border index.  @FT_STROKER_BORDER_RIGHT for empty or invalid\n   *   outlines.\n   */\n  FT_EXPORT( FT_StrokerBorder )\n  FT_Outline_GetInsideBorder( FT_Outline*  outline );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Outline_GetOutsideBorder\n   *\n   * @description:\n   *   Retrieve the @FT_StrokerBorder value corresponding to the\n   *   `outside' borders of a given outline.\n   *\n   * @input:\n   *   outline ::\n   *     The source outline handle.\n   *\n   * @return:\n   *   The border index.  @FT_STROKER_BORDER_LEFT for empty or invalid\n   *   outlines.\n   */\n  FT_EXPORT( FT_StrokerBorder )\n  FT_Outline_GetOutsideBorder( FT_Outline*  outline );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Stroker_New\n   *\n   * @description:\n   *   Create a new stroker object.\n   *\n   * @input:\n   *   library ::\n   *     FreeType library handle.\n   *\n   * @output:\n   *   astroker ::\n   *     A new stroker object handle.  NULL in case of error.\n   *\n   * @return:\n   *    FreeType error code.  0~means success.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Stroker_New( FT_Library   library,\n                  FT_Stroker  *astroker );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Stroker_Set\n   *\n   * @description:\n   *   Reset a stroker object's attributes.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   *   radius ::\n   *     The border radius.\n   *\n   *   line_cap ::\n   *     The line cap style.\n   *\n   *   line_join ::\n   *     The line join style.\n   *\n   *   miter_limit ::\n   *     The miter limit for the FT_STROKER_LINEJOIN_MITER style,\n   *     expressed as 16.16 fixed point value.\n   *\n   * @note:\n   *   The radius is expressed in the same units as the outline\n   *   coordinates.\n   */\n  FT_EXPORT( void )\n  FT_Stroker_Set( FT_Stroker           stroker,\n                  FT_Fixed             radius,\n                  FT_Stroker_LineCap   line_cap,\n                  FT_Stroker_LineJoin  line_join,\n                  FT_Fixed             miter_limit );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Stroker_Rewind\n   *\n   * @description:\n   *   Reset a stroker object without changing its attributes.\n   *   You should call this function before beginning a new\n   *   series of calls to @FT_Stroker_BeginSubPath or\n   *   @FT_Stroker_EndSubPath.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   */\n  FT_EXPORT( void )\n  FT_Stroker_Rewind( FT_Stroker  stroker );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Stroker_ParseOutline\n   *\n   * @description:\n   *   A convenience function used to parse a whole outline with\n   *   the stroker.  The resulting outline(s) can be retrieved\n   *   later by functions like @FT_Stroker_GetCounts and @FT_Stroker_Export.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   *   outline ::\n   *     The source outline.\n   *\n   *   opened ::\n   *     A boolean.  If~1, the outline is treated as an open path instead\n   *     of a closed one.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   If `opened' is~0 (the default), the outline is treated as a closed\n   *   path, and the stroker generates two distinct `border' outlines.\n   *\n   *   If `opened' is~1, the outline is processed as an open path, and the\n   *   stroker generates a single `stroke' outline.\n   *\n   *   This function calls @FT_Stroker_Rewind automatically.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Stroker_ParseOutline( FT_Stroker   stroker,\n                           FT_Outline*  outline,\n                           FT_Bool      opened );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Stroker_BeginSubPath\n   *\n   * @description:\n   *   Start a new sub-path in the stroker.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   *   to ::\n   *     A pointer to the start vector.\n   *\n   *   open ::\n   *     A boolean.  If~1, the sub-path is treated as an open one.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   This function is useful when you need to stroke a path that is\n   *   not stored as an @FT_Outline object.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Stroker_BeginSubPath( FT_Stroker  stroker,\n                           FT_Vector*  to,\n                           FT_Bool     open );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Stroker_EndSubPath\n   *\n   * @description:\n   *   Close the current sub-path in the stroker.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   You should call this function after @FT_Stroker_BeginSubPath.\n   *   If the subpath was not `opened', this function `draws' a\n   *   single line segment to the start position when needed.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Stroker_EndSubPath( FT_Stroker  stroker );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Stroker_LineTo\n   *\n   * @description:\n   *   `Draw' a single line segment in the stroker's current sub-path,\n   *   from the last position.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   *   to ::\n   *     A pointer to the destination point.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   You should call this function between @FT_Stroker_BeginSubPath and\n   *   @FT_Stroker_EndSubPath.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Stroker_LineTo( FT_Stroker  stroker,\n                     FT_Vector*  to );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Stroker_ConicTo\n   *\n   * @description:\n   *   `Draw' a single quadratic Bézier in the stroker's current sub-path,\n   *   from the last position.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   *   control ::\n   *     A pointer to a Bézier control point.\n   *\n   *   to ::\n   *     A pointer to the destination point.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   You should call this function between @FT_Stroker_BeginSubPath and\n   *   @FT_Stroker_EndSubPath.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Stroker_ConicTo( FT_Stroker  stroker,\n                      FT_Vector*  control,\n                      FT_Vector*  to );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Stroker_CubicTo\n   *\n   * @description:\n   *   `Draw' a single cubic Bézier in the stroker's current sub-path,\n   *   from the last position.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   *   control1 ::\n   *     A pointer to the first Bézier control point.\n   *\n   *   control2 ::\n   *     A pointer to second Bézier control point.\n   *\n   *   to ::\n   *     A pointer to the destination point.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   You should call this function between @FT_Stroker_BeginSubPath and\n   *   @FT_Stroker_EndSubPath.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Stroker_CubicTo( FT_Stroker  stroker,\n                      FT_Vector*  control1,\n                      FT_Vector*  control2,\n                      FT_Vector*  to );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Stroker_GetBorderCounts\n   *\n   * @description:\n   *   Call this function once you have finished parsing your paths\n   *   with the stroker.  It returns the number of points and\n   *   contours necessary to export one of the `border' or `stroke'\n   *   outlines generated by the stroker.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   *   border ::\n   *     The border index.\n   *\n   * @output:\n   *   anum_points ::\n   *     The number of points.\n   *\n   *   anum_contours ::\n   *     The number of contours.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   When an outline, or a sub-path, is `closed', the stroker generates\n   *   two independent `border' outlines, named `left' and `right'.\n   *\n   *   When the outline, or a sub-path, is `opened', the stroker merges\n   *   the `border' outlines with caps.  The `left' border receives all\n   *   points, while the `right' border becomes empty.\n   *\n   *   Use the function @FT_Stroker_GetCounts instead if you want to\n   *   retrieve the counts associated to both borders.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Stroker_GetBorderCounts( FT_Stroker        stroker,\n                              FT_StrokerBorder  border,\n                              FT_UInt          *anum_points,\n                              FT_UInt          *anum_contours );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Stroker_ExportBorder\n   *\n   * @description:\n   *   Call this function after @FT_Stroker_GetBorderCounts to\n   *   export the corresponding border to your own @FT_Outline\n   *   structure.\n   *\n   *   Note that this function appends the border points and\n   *   contours to your outline, but does not try to resize its\n   *   arrays.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   *   border ::\n   *     The border index.\n   *\n   *   outline ::\n   *     The target outline handle.\n   *\n   * @note:\n   *   Always call this function after @FT_Stroker_GetBorderCounts to\n   *   get sure that there is enough room in your @FT_Outline object to\n   *   receive all new data.\n   *\n   *   When an outline, or a sub-path, is `closed', the stroker generates\n   *   two independent `border' outlines, named `left' and `right'\n   *\n   *   When the outline, or a sub-path, is `opened', the stroker merges\n   *   the `border' outlines with caps. The `left' border receives all\n   *   points, while the `right' border becomes empty.\n   *\n   *   Use the function @FT_Stroker_Export instead if you want to\n   *   retrieve all borders at once.\n   */\n  FT_EXPORT( void )\n  FT_Stroker_ExportBorder( FT_Stroker        stroker,\n                           FT_StrokerBorder  border,\n                           FT_Outline*       outline );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Stroker_GetCounts\n   *\n   * @description:\n   *   Call this function once you have finished parsing your paths\n   *   with the stroker.  It returns the number of points and\n   *   contours necessary to export all points/borders from the stroked\n   *   outline/path.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   * @output:\n   *   anum_points ::\n   *     The number of points.\n   *\n   *   anum_contours ::\n   *     The number of contours.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Stroker_GetCounts( FT_Stroker  stroker,\n                        FT_UInt    *anum_points,\n                        FT_UInt    *anum_contours );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Stroker_Export\n   *\n   * @description:\n   *   Call this function after @FT_Stroker_GetBorderCounts to\n   *   export all borders to your own @FT_Outline structure.\n   *\n   *   Note that this function appends the border points and\n   *   contours to your outline, but does not try to resize its\n   *   arrays.\n   *\n   * @input:\n   *   stroker ::\n   *     The target stroker handle.\n   *\n   *   outline ::\n   *     The target outline handle.\n   */\n  FT_EXPORT( void )\n  FT_Stroker_Export( FT_Stroker   stroker,\n                     FT_Outline*  outline );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Stroker_Done\n   *\n   * @description:\n   *   Destroy a stroker object.\n   *\n   * @input:\n   *   stroker ::\n   *     A stroker handle.  Can be NULL.\n   */\n  FT_EXPORT( void )\n  FT_Stroker_Done( FT_Stroker  stroker );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Glyph_Stroke\n   *\n   * @description:\n   *   Stroke a given outline glyph object with a given stroker.\n   *\n   * @inout:\n   *   pglyph ::\n   *     Source glyph handle on input, new glyph handle on output.\n   *\n   * @input:\n   *   stroker ::\n   *     A stroker handle.\n   *\n   *   destroy ::\n   *     A Boolean.  If~1, the source glyph object is destroyed\n   *     on success.\n   *\n   * @return:\n   *    FreeType error code.  0~means success.\n   *\n   * @note:\n   *   The source glyph is untouched in case of error.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Glyph_Stroke( FT_Glyph    *pglyph,\n                   FT_Stroker   stroker,\n                   FT_Bool      destroy );\n\n\n  /**************************************************************\n   *\n   * @function:\n   *   FT_Glyph_StrokeBorder\n   *\n   * @description:\n   *   Stroke a given outline glyph object with a given stroker, but\n   *   only return either its inside or outside border.\n   *\n   * @inout:\n   *   pglyph ::\n   *     Source glyph handle on input, new glyph handle on output.\n   *\n   * @input:\n   *   stroker ::\n   *     A stroker handle.\n   *\n   *   inside ::\n   *     A Boolean.  If~1, return the inside border, otherwise\n   *     the outside border.\n   *\n   *   destroy ::\n   *     A Boolean.  If~1, the source glyph object is destroyed\n   *     on success.\n   *\n   * @return:\n   *    FreeType error code.  0~means success.\n   *\n   * @note:\n   *   The source glyph is untouched in case of error.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Glyph_StrokeBorder( FT_Glyph    *pglyph,\n                         FT_Stroker   stroker,\n                         FT_Bool      inside,\n                         FT_Bool      destroy );\n\n /* */\n\nFT_END_HEADER\n\n#endif /* __FT_STROKE_H__ */\n\n\n/* END */\n\n\n/* Local Variables: */\n/* coding: utf-8    */\n/* End:             */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ftsynth.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftsynth.h                                                              */\n/*                                                                         */\n/*    FreeType synthesizing code for emboldening and slanting              */\n/*    (specification).                                                     */\n/*                                                                         */\n/*  Copyright 2000-2001, 2003, 2006, 2008 by                               */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*********                                                       *********/\n  /*********        WARNING, THIS IS ALPHA CODE!  THIS API         *********/\n  /*********    IS DUE TO CHANGE UNTIL STRICTLY NOTIFIED BY THE    *********/\n  /*********            FREETYPE DEVELOPMENT TEAM                  *********/\n  /*********                                                       *********/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /* Main reason for not lifting the functions in this module to a  */\n  /* `standard' API is that the used parameters for emboldening and */\n  /* slanting are not configurable.  Consider the functions as a    */\n  /* code resource which should be copied into the application and  */\n  /* adapted to the particular needs.                               */\n\n\n#ifndef __FTSYNTH_H__\n#define __FTSYNTH_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n  /* Embolden a glyph by a `reasonable' value (which is highly a matter of */\n  /* taste).  This function is actually a convenience function, providing  */\n  /* a wrapper for @FT_Outline_Embolden and @FT_Bitmap_Embolden.           */\n  /*                                                                       */\n  /* For emboldened outlines the metrics are estimates only; if you need   */\n  /* precise values you should call @FT_Outline_Get_CBox.                  */\n  FT_EXPORT( void )\n  FT_GlyphSlot_Embolden( FT_GlyphSlot  slot );\n\n  /* Slant an outline glyph to the right by about 12 degrees. */\n  FT_EXPORT( void )\n  FT_GlyphSlot_Oblique( FT_GlyphSlot  slot );\n\n  /* */\n\nFT_END_HEADER\n\n#endif /* __FTSYNTH_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ftsystem.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftsystem.h                                                             */\n/*                                                                         */\n/*    FreeType low-level system interface definition (specification).      */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2005 by                                     */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTSYSTEM_H__\n#define __FTSYSTEM_H__\n\n\n#include <ft2build.h>\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*   system_interface                                                    */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*   System Interface                                                    */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*   How FreeType manages memory and i/o.                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*   This section contains various definitions related to memory         */\n  /*   management and i/o access.  You need to understand this             */\n  /*   information if you want to use a custom memory manager or you own   */\n  /*   i/o streams.                                                        */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*                  M E M O R Y   M A N A G E M E N T                    */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************\n   *\n   * @type:\n   *   FT_Memory\n   *\n   * @description:\n   *   A handle to a given memory manager object, defined with an\n   *   @FT_MemoryRec structure.\n   *\n   */\n  typedef struct FT_MemoryRec_*  FT_Memory;\n\n\n  /*************************************************************************\n   *\n   * @functype:\n   *   FT_Alloc_Func\n   *\n   * @description:\n   *   A function used to allocate `size' bytes from `memory'.\n   *\n   * @input:\n   *   memory ::\n   *     A handle to the source memory manager.\n   *\n   *   size ::\n   *     The size in bytes to allocate.\n   *\n   * @return:\n   *   Address of new memory block.  0~in case of failure.\n   *\n   */\n  typedef void*\n  (*FT_Alloc_Func)( FT_Memory  memory,\n                    long       size );\n\n\n  /*************************************************************************\n   *\n   * @functype:\n   *   FT_Free_Func\n   *\n   * @description:\n   *   A function used to release a given block of memory.\n   *\n   * @input:\n   *   memory ::\n   *     A handle to the source memory manager.\n   *\n   *   block ::\n   *     The address of the target memory block.\n   *\n   */\n  typedef void\n  (*FT_Free_Func)( FT_Memory  memory,\n                   void*      block );\n\n\n  /*************************************************************************\n   *\n   * @functype:\n   *   FT_Realloc_Func\n   *\n   * @description:\n   *   A function used to re-allocate a given block of memory.\n   *\n   * @input:\n   *   memory ::\n   *     A handle to the source memory manager.\n   *\n   *   cur_size ::\n   *     The block's current size in bytes.\n   *\n   *   new_size ::\n   *     The block's requested new size.\n   *\n   *   block ::\n   *     The block's current address.\n   *\n   * @return:\n   *   New block address.  0~in case of memory shortage.\n   *\n   * @note:\n   *   In case of error, the old block must still be available.\n   *\n   */\n  typedef void*\n  (*FT_Realloc_Func)( FT_Memory  memory,\n                      long       cur_size,\n                      long       new_size,\n                      void*      block );\n\n\n  /*************************************************************************\n   *\n   * @struct:\n   *   FT_MemoryRec\n   *\n   * @description:\n   *   A structure used to describe a given memory manager to FreeType~2.\n   *\n   * @fields:\n   *   user ::\n   *     A generic typeless pointer for user data.\n   *\n   *   alloc ::\n   *     A pointer type to an allocation function.\n   *\n   *   free ::\n   *     A pointer type to an memory freeing function.\n   *\n   *   realloc ::\n   *     A pointer type to a reallocation function.\n   *\n   */\n  struct  FT_MemoryRec_\n  {\n    void*            user;\n    FT_Alloc_Func    alloc;\n    FT_Free_Func     free;\n    FT_Realloc_Func  realloc;\n  };\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /*                       I / O   M A N A G E M E N T                     */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************\n   *\n   * @type:\n   *   FT_Stream\n   *\n   * @description:\n   *   A handle to an input stream.\n   *\n   */\n  typedef struct FT_StreamRec_*  FT_Stream;\n\n\n  /*************************************************************************\n   *\n   * @struct:\n   *   FT_StreamDesc\n   *\n   * @description:\n   *   A union type used to store either a long or a pointer.  This is used\n   *   to store a file descriptor or a `FILE*' in an input stream.\n   *\n   */\n  typedef union  FT_StreamDesc_\n  {\n    long   value;\n    void*  pointer;\n\n  } FT_StreamDesc;\n\n\n  /*************************************************************************\n   *\n   * @functype:\n   *   FT_Stream_IoFunc\n   *\n   * @description:\n   *   A function used to seek and read data from a given input stream.\n   *\n   * @input:\n   *   stream ::\n   *     A handle to the source stream.\n   *\n   *   offset ::\n   *     The offset of read in stream (always from start).\n   *\n   *   buffer ::\n   *     The address of the read buffer.\n   *\n   *   count ::\n   *     The number of bytes to read from the stream.\n   *\n   * @return:\n   *   The number of bytes effectively read by the stream.\n   *\n   * @note:\n   *   This function might be called to perform a seek or skip operation\n   *   with a `count' of~0.\n   *\n   */\n  typedef unsigned long\n  (*FT_Stream_IoFunc)( FT_Stream       stream,\n                       unsigned long   offset,\n                       unsigned char*  buffer,\n                       unsigned long   count );\n\n\n  /*************************************************************************\n   *\n   * @functype:\n   *   FT_Stream_CloseFunc\n   *\n   * @description:\n   *   A function used to close a given input stream.\n   *\n   * @input:\n   *  stream ::\n   *     A handle to the target stream.\n   *\n   */\n  typedef void\n  (*FT_Stream_CloseFunc)( FT_Stream  stream );\n\n\n  /*************************************************************************\n   *\n   * @struct:\n   *   FT_StreamRec\n   *\n   * @description:\n   *   A structure used to describe an input stream.\n   *\n   * @input:\n   *   base ::\n   *     For memory-based streams, this is the address of the first stream\n   *     byte in memory.  This field should always be set to NULL for\n   *     disk-based streams.\n   *\n   *   size ::\n   *     The stream size in bytes.\n   *\n   *   pos ::\n   *     The current position within the stream.\n   *\n   *   descriptor ::\n   *     This field is a union that can hold an integer or a pointer.  It is\n   *     used by stream implementations to store file descriptors or `FILE*'\n   *     pointers.\n   *\n   *   pathname ::\n   *     This field is completely ignored by FreeType.  However, it is often\n   *     useful during debugging to use it to store the stream's filename\n   *     (where available).\n   *\n   *   read ::\n   *     The stream's input function.\n   *\n   *   close ::\n   *     The stream;s close function.\n   *\n   *   memory ::\n   *     The memory manager to use to preload frames.  This is set\n   *     internally by FreeType and shouldn't be touched by stream\n   *     implementations.\n   *\n   *   cursor ::\n   *     This field is set and used internally by FreeType when parsing\n   *     frames.\n   *\n   *   limit ::\n   *     This field is set and used internally by FreeType when parsing\n   *     frames.\n   *\n   */\n  typedef struct  FT_StreamRec_\n  {\n    unsigned char*       base;\n    unsigned long        size;\n    unsigned long        pos;\n\n    FT_StreamDesc        descriptor;\n    FT_StreamDesc        pathname;\n    FT_Stream_IoFunc     read;\n    FT_Stream_CloseFunc  close;\n\n    FT_Memory            memory;\n    unsigned char*       cursor;\n    unsigned char*       limit;\n\n  } FT_StreamRec;\n\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTSYSTEM_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/fttrigon.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  fttrigon.h                                                             */\n/*                                                                         */\n/*    FreeType trigonometric functions (specification).                    */\n/*                                                                         */\n/*  Copyright 2001, 2003, 2005, 2007 by                                    */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTTRIGON_H__\n#define __FTTRIGON_H__\n\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*   computations                                                        */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************\n   *\n   * @type:\n   *   FT_Angle\n   *\n   * @description:\n   *   This type is used to model angle values in FreeType.  Note that the\n   *   angle is a 16.16 fixed float value expressed in degrees.\n   *\n   */\n  typedef FT_Fixed  FT_Angle;\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_ANGLE_PI\n   *\n   * @description:\n   *   The angle pi expressed in @FT_Angle units.\n   *\n   */\n#define FT_ANGLE_PI  ( 180L << 16 )\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_ANGLE_2PI\n   *\n   * @description:\n   *   The angle 2*pi expressed in @FT_Angle units.\n   *\n   */\n#define FT_ANGLE_2PI  ( FT_ANGLE_PI * 2 )\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_ANGLE_PI2\n   *\n   * @description:\n   *   The angle pi/2 expressed in @FT_Angle units.\n   *\n   */\n#define FT_ANGLE_PI2  ( FT_ANGLE_PI / 2 )\n\n\n  /*************************************************************************\n   *\n   * @macro:\n   *   FT_ANGLE_PI4\n   *\n   * @description:\n   *   The angle pi/4 expressed in @FT_Angle units.\n   *\n   */\n#define FT_ANGLE_PI4  ( FT_ANGLE_PI / 4 )\n\n\n  /*************************************************************************\n   *\n   * @function:\n   *   FT_Sin\n   *\n   * @description:\n   *   Return the sinus of a given angle in fixed point format.\n   *\n   * @input:\n   *   angle ::\n   *     The input angle.\n   *\n   * @return:\n   *   The sinus value.\n   *\n   * @note:\n   *   If you need both the sinus and cosinus for a given angle, use the\n   *   function @FT_Vector_Unit.\n   *\n   */\n  FT_EXPORT( FT_Fixed )\n  FT_Sin( FT_Angle  angle );\n\n\n  /*************************************************************************\n   *\n   * @function:\n   *   FT_Cos\n   *\n   * @description:\n   *   Return the cosinus of a given angle in fixed point format.\n   *\n   * @input:\n   *   angle ::\n   *     The input angle.\n   *\n   * @return:\n   *   The cosinus value.\n   *\n   * @note:\n   *   If you need both the sinus and cosinus for a given angle, use the\n   *   function @FT_Vector_Unit.\n   *\n   */\n  FT_EXPORT( FT_Fixed )\n  FT_Cos( FT_Angle  angle );\n\n\n  /*************************************************************************\n   *\n   * @function:\n   *   FT_Tan\n   *\n   * @description:\n   *   Return the tangent of a given angle in fixed point format.\n   *\n   * @input:\n   *   angle ::\n   *     The input angle.\n   *\n   * @return:\n   *   The tangent value.\n   *\n   */\n  FT_EXPORT( FT_Fixed )\n  FT_Tan( FT_Angle  angle );\n\n\n  /*************************************************************************\n   *\n   * @function:\n   *   FT_Atan2\n   *\n   * @description:\n   *   Return the arc-tangent corresponding to a given vector (x,y) in\n   *   the 2d plane.\n   *\n   * @input:\n   *   x ::\n   *     The horizontal vector coordinate.\n   *\n   *   y ::\n   *     The vertical vector coordinate.\n   *\n   * @return:\n   *   The arc-tangent value (i.e. angle).\n   *\n   */\n  FT_EXPORT( FT_Angle )\n  FT_Atan2( FT_Fixed  x,\n            FT_Fixed  y );\n\n\n  /*************************************************************************\n   *\n   * @function:\n   *   FT_Angle_Diff\n   *\n   * @description:\n   *   Return the difference between two angles.  The result is always\n   *   constrained to the ]-PI..PI] interval.\n   *\n   * @input:\n   *   angle1 ::\n   *     First angle.\n   *\n   *   angle2 ::\n   *     Second angle.\n   *\n   * @return:\n   *   Constrained value of `value2-value1'.\n   *\n   */\n  FT_EXPORT( FT_Angle )\n  FT_Angle_Diff( FT_Angle  angle1,\n                 FT_Angle  angle2 );\n\n\n  /*************************************************************************\n   *\n   * @function:\n   *   FT_Vector_Unit\n   *\n   * @description:\n   *   Return the unit vector corresponding to a given angle.  After the\n   *   call, the value of `vec.x' will be `sin(angle)', and the value of\n   *   `vec.y' will be `cos(angle)'.\n   *\n   *   This function is useful to retrieve both the sinus and cosinus of a\n   *   given angle quickly.\n   *\n   * @output:\n   *   vec ::\n   *     The address of target vector.\n   *\n   * @input:\n   *   angle ::\n   *     The address of angle.\n   *\n   */\n  FT_EXPORT( void )\n  FT_Vector_Unit( FT_Vector*  vec,\n                  FT_Angle    angle );\n\n\n  /*************************************************************************\n   *\n   * @function:\n   *   FT_Vector_Rotate\n   *\n   * @description:\n   *   Rotate a vector by a given angle.\n   *\n   * @inout:\n   *   vec ::\n   *     The address of target vector.\n   *\n   * @input:\n   *   angle ::\n   *     The address of angle.\n   *\n   */\n  FT_EXPORT( void )\n  FT_Vector_Rotate( FT_Vector*  vec,\n                    FT_Angle    angle );\n\n\n  /*************************************************************************\n   *\n   * @function:\n   *   FT_Vector_Length\n   *\n   * @description:\n   *   Return the length of a given vector.\n   *\n   * @input:\n   *   vec ::\n   *     The address of target vector.\n   *\n   * @return:\n   *   The vector length, expressed in the same units that the original\n   *   vector coordinates.\n   *\n   */\n  FT_EXPORT( FT_Fixed )\n  FT_Vector_Length( FT_Vector*  vec );\n\n\n  /*************************************************************************\n   *\n   * @function:\n   *   FT_Vector_Polarize\n   *\n   * @description:\n   *   Compute both the length and angle of a given vector.\n   *\n   * @input:\n   *   vec ::\n   *     The address of source vector.\n   *\n   * @output:\n   *   length ::\n   *     The vector length.\n   *\n   *   angle ::\n   *     The vector angle.\n   *\n   */\n  FT_EXPORT( void )\n  FT_Vector_Polarize( FT_Vector*  vec,\n                      FT_Fixed   *length,\n                      FT_Angle   *angle );\n\n\n  /*************************************************************************\n   *\n   * @function:\n   *   FT_Vector_From_Polar\n   *\n   * @description:\n   *   Compute vector coordinates from a length and angle.\n   *\n   * @output:\n   *   vec ::\n   *     The address of source vector.\n   *\n   * @input:\n   *   length ::\n   *     The vector length.\n   *\n   *   angle ::\n   *     The vector angle.\n   *\n   */\n  FT_EXPORT( void )\n  FT_Vector_From_Polar( FT_Vector*  vec,\n                        FT_Fixed    length,\n                        FT_Angle    angle );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTTRIGON_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/fttypes.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  fttypes.h                                                              */\n/*                                                                         */\n/*    FreeType simple types definitions (specification only).              */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2004, 2006, 2007, 2008 by                   */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTTYPES_H__\n#define __FTTYPES_H__\n\n\n#include <ft2build.h>\n#include FT_CONFIG_CONFIG_H\n#include FT_SYSTEM_H\n#include FT_IMAGE_H\n\n#include <stddef.h>\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    basic_types                                                        */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    Basic Data Types                                                   */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    The basic data types defined by the library.                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains the basic data types defined by FreeType~2,  */\n  /*    ranging from simple scalar types to bitmap descriptors.  More      */\n  /*    font-specific structures are defined in a different section.       */\n  /*                                                                       */\n  /* <Order>                                                               */\n  /*    FT_Byte                                                            */\n  /*    FT_Bytes                                                           */\n  /*    FT_Char                                                            */\n  /*    FT_Int                                                             */\n  /*    FT_UInt                                                            */\n  /*    FT_Int16                                                           */\n  /*    FT_UInt16                                                          */\n  /*    FT_Int32                                                           */\n  /*    FT_UInt32                                                          */\n  /*    FT_Short                                                           */\n  /*    FT_UShort                                                          */\n  /*    FT_Long                                                            */\n  /*    FT_ULong                                                           */\n  /*    FT_Bool                                                            */\n  /*    FT_Offset                                                          */\n  /*    FT_PtrDist                                                         */\n  /*    FT_String                                                          */\n  /*    FT_Tag                                                             */\n  /*    FT_Error                                                           */\n  /*    FT_Fixed                                                           */\n  /*    FT_Pointer                                                         */\n  /*    FT_Pos                                                             */\n  /*    FT_Vector                                                          */\n  /*    FT_BBox                                                            */\n  /*    FT_Matrix                                                          */\n  /*    FT_FWord                                                           */\n  /*    FT_UFWord                                                          */\n  /*    FT_F2Dot14                                                         */\n  /*    FT_UnitVector                                                      */\n  /*    FT_F26Dot6                                                         */\n  /*                                                                       */\n  /*                                                                       */\n  /*    FT_Generic                                                         */\n  /*    FT_Generic_Finalizer                                               */\n  /*                                                                       */\n  /*    FT_Bitmap                                                          */\n  /*    FT_Pixel_Mode                                                      */\n  /*    FT_Palette_Mode                                                    */\n  /*    FT_Glyph_Format                                                    */\n  /*    FT_IMAGE_TAG                                                       */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Bool                                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A typedef of unsigned char, used for simple booleans.  As usual,   */\n  /*    values 1 and~0 represent true and false, respectively.             */\n  /*                                                                       */\n  typedef unsigned char  FT_Bool;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_FWord                                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A signed 16-bit integer used to store a distance in original font  */\n  /*    units.                                                             */\n  /*                                                                       */\n  typedef signed short  FT_FWord;   /* distance in FUnits */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_UFWord                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    An unsigned 16-bit integer used to store a distance in original    */\n  /*    font units.                                                        */\n  /*                                                                       */\n  typedef unsigned short  FT_UFWord;  /* unsigned distance */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Char                                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A simple typedef for the _signed_ char type.                       */\n  /*                                                                       */\n  typedef signed char  FT_Char;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Byte                                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A simple typedef for the _unsigned_ char type.                     */\n  /*                                                                       */\n  typedef unsigned char  FT_Byte;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Bytes                                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A typedef for constant memory areas.                               */\n  /*                                                                       */\n  typedef const FT_Byte*  FT_Bytes;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Tag                                                             */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A typedef for 32-bit tags (as used in the SFNT format).            */\n  /*                                                                       */\n  typedef FT_UInt32  FT_Tag;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_String                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A simple typedef for the char type, usually used for strings.      */\n  /*                                                                       */\n  typedef char  FT_String;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Short                                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A typedef for signed short.                                        */\n  /*                                                                       */\n  typedef signed short  FT_Short;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_UShort                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A typedef for unsigned short.                                      */\n  /*                                                                       */\n  typedef unsigned short  FT_UShort;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Int                                                             */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A typedef for the int type.                                        */\n  /*                                                                       */\n  typedef signed int  FT_Int;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_UInt                                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A typedef for the unsigned int type.                               */\n  /*                                                                       */\n  typedef unsigned int  FT_UInt;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Long                                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A typedef for signed long.                                         */\n  /*                                                                       */\n  typedef signed long  FT_Long;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_ULong                                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A typedef for unsigned long.                                       */\n  /*                                                                       */\n  typedef unsigned long  FT_ULong;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_F2Dot14                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A signed 2.14 fixed float type used for unit vectors.              */\n  /*                                                                       */\n  typedef signed short  FT_F2Dot14;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_F26Dot6                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A signed 26.6 fixed float type used for vectorial pixel            */\n  /*    coordinates.                                                       */\n  /*                                                                       */\n  typedef signed long  FT_F26Dot6;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Fixed                                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This type is used to store 16.16 fixed float values, like scaling  */\n  /*    values or matrix coefficients.                                     */\n  /*                                                                       */\n  typedef signed long  FT_Fixed;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Error                                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The FreeType error code type.  A value of~0 is always interpreted  */\n  /*    as a successful operation.                                         */\n  /*                                                                       */\n  typedef int  FT_Error;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Pointer                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A simple typedef for a typeless pointer.                           */\n  /*                                                                       */\n  typedef void*  FT_Pointer;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_Offset                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This is equivalent to the ANSI~C `size_t' type, i.e., the largest  */\n  /*    _unsigned_ integer type used to express a file size or position,   */\n  /*    or a memory block size.                                            */\n  /*                                                                       */\n  typedef size_t  FT_Offset;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_PtrDist                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This is equivalent to the ANSI~C `ptrdiff_t' type, i.e., the       */\n  /*    largest _signed_ integer type used to express the distance         */\n  /*    between two pointers.                                              */\n  /*                                                                       */\n  typedef ft_ptrdiff_t  FT_PtrDist;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_UnitVector                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A simple structure used to store a 2D vector unit vector.  Uses    */\n  /*    FT_F2Dot14 types.                                                  */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    x :: Horizontal coordinate.                                        */\n  /*                                                                       */\n  /*    y :: Vertical coordinate.                                          */\n  /*                                                                       */\n  typedef struct  FT_UnitVector_\n  {\n    FT_F2Dot14  x;\n    FT_F2Dot14  y;\n\n  } FT_UnitVector;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Matrix                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A simple structure used to store a 2x2 matrix.  Coefficients are   */\n  /*    in 16.16 fixed float format.  The computation performed is:        */\n  /*                                                                       */\n  /*       {                                                               */\n  /*          x' = x*xx + y*xy                                             */\n  /*          y' = x*yx + y*yy                                             */\n  /*       }                                                               */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    xx :: Matrix coefficient.                                          */\n  /*                                                                       */\n  /*    xy :: Matrix coefficient.                                          */\n  /*                                                                       */\n  /*    yx :: Matrix coefficient.                                          */\n  /*                                                                       */\n  /*    yy :: Matrix coefficient.                                          */\n  /*                                                                       */\n  typedef struct  FT_Matrix_\n  {\n    FT_Fixed  xx, xy;\n    FT_Fixed  yx, yy;\n\n  } FT_Matrix;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Data                                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Read-only binary data represented as a pointer and a length.       */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    pointer :: The data.                                               */\n  /*                                                                       */\n  /*    length  :: The length of the data in bytes.                        */\n  /*                                                                       */\n  typedef struct  FT_Data_\n  {\n    const FT_Byte*  pointer;\n    FT_Int          length;\n\n  } FT_Data;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <FuncType>                                                            */\n  /*    FT_Generic_Finalizer                                               */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Describe a function used to destroy the `client' data of any       */\n  /*    FreeType object.  See the description of the @FT_Generic type for  */\n  /*    details of usage.                                                  */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    The address of the FreeType object which is under finalization.    */\n  /*    Its client data is accessed through its `generic' field.           */\n  /*                                                                       */\n  typedef void  (*FT_Generic_Finalizer)(void*  object);\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_Generic                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Client applications often need to associate their own data to a    */\n  /*    variety of FreeType core objects.  For example, a text layout API  */\n  /*    might want to associate a glyph cache to a given size object.      */\n  /*                                                                       */\n  /*    Most FreeType object contains a `generic' field, of type           */\n  /*    FT_Generic, which usage is left to client applications and font    */\n  /*    servers.                                                           */\n  /*                                                                       */\n  /*    It can be used to store a pointer to client-specific data, as well */\n  /*    as the address of a `finalizer' function, which will be called by  */\n  /*    FreeType when the object is destroyed (for example, the previous   */\n  /*    client example would put the address of the glyph cache destructor */\n  /*    in the `finalizer' field).                                         */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    data      :: A typeless pointer to any client-specified data. This */\n  /*                 field is completely ignored by the FreeType library.  */\n  /*                                                                       */\n  /*    finalizer :: A pointer to a `generic finalizer' function, which    */\n  /*                 will be called when the object is destroyed.  If this */\n  /*                 field is set to NULL, no code will be called.         */\n  /*                                                                       */\n  typedef struct  FT_Generic_\n  {\n    void*                 data;\n    FT_Generic_Finalizer  finalizer;\n\n  } FT_Generic;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Macro>                                                               */\n  /*    FT_MAKE_TAG                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This macro converts four-letter tags which are used to label       */\n  /*    TrueType tables into an unsigned long to be used within FreeType.  */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The produced values *must* be 32-bit integers.  Don't redefine     */\n  /*    this macro.                                                        */\n  /*                                                                       */\n#define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \\\n          (FT_Tag)                        \\\n          ( ( (FT_ULong)_x1 << 24 ) |     \\\n            ( (FT_ULong)_x2 << 16 ) |     \\\n            ( (FT_ULong)_x3 <<  8 ) |     \\\n              (FT_ULong)_x4         )\n\n\n  /*************************************************************************/\n  /*************************************************************************/\n  /*                                                                       */\n  /*                    L I S T   M A N A G E M E N T                      */\n  /*                                                                       */\n  /*************************************************************************/\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    list_processing                                                    */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_ListNode                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*     Many elements and objects in FreeType are listed through an       */\n  /*     @FT_List record (see @FT_ListRec).  As its name suggests, an      */\n  /*     FT_ListNode is a handle to a single list element.                 */\n  /*                                                                       */\n  typedef struct FT_ListNodeRec_*  FT_ListNode;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Type>                                                                */\n  /*    FT_List                                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a list record (see @FT_ListRec).                       */\n  /*                                                                       */\n  typedef struct FT_ListRec_*  FT_List;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_ListNodeRec                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to hold a single list element.                    */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    prev :: The previous element in the list.  NULL if first.          */\n  /*                                                                       */\n  /*    next :: The next element in the list.  NULL if last.               */\n  /*                                                                       */\n  /*    data :: A typeless pointer to the listed object.                   */\n  /*                                                                       */\n  typedef struct  FT_ListNodeRec_\n  {\n    FT_ListNode  prev;\n    FT_ListNode  next;\n    void*        data;\n\n  } FT_ListNodeRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_ListRec                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to hold a simple doubly-linked list.  These are   */\n  /*    used in many parts of FreeType.                                    */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    head :: The head (first element) of doubly-linked list.            */\n  /*                                                                       */\n  /*    tail :: The tail (last element) of doubly-linked list.             */\n  /*                                                                       */\n  typedef struct  FT_ListRec_\n  {\n    FT_ListNode  head;\n    FT_ListNode  tail;\n\n  } FT_ListRec;\n\n\n  /* */\n\n#define FT_IS_EMPTY( list )  ( (list).head == 0 )\n\n  /* return base error code (without module-specific prefix) */\n#define FT_ERROR_BASE( x )    ( (x) & 0xFF )\n\n  /* return module error code */\n#define FT_ERROR_MODULE( x )  ( (x) & 0xFF00U )\n\n#define FT_BOOL( x )  ( (FT_Bool)( x ) )\n\nFT_END_HEADER\n\n#endif /* __FTTYPES_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ftwinfnt.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftwinfnt.h                                                             */\n/*                                                                         */\n/*    FreeType API for accessing Windows fnt-specific data.                */\n/*                                                                         */\n/*  Copyright 2003, 2004, 2008 by                                          */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTWINFNT_H__\n#define __FTWINFNT_H__\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    winfnt_fonts                                                       */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    Window FNT Files                                                   */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    Windows FNT specific API.                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains the declaration of Windows FNT specific      */\n  /*    functions.                                                         */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************\n   *\n   * @enum:\n   *   FT_WinFNT_ID_XXX\n   *\n   * @description:\n   *   A list of valid values for the `charset' byte in\n   *   @FT_WinFNT_HeaderRec.  Exact mapping tables for the various cpXXXX\n   *   encodings (except for cp1361) can be found at ftp://ftp.unicode.org\n   *   in the MAPPINGS/VENDORS/MICSFT/WINDOWS subdirectory.  cp1361 is\n   *   roughly a superset of MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT.\n   *\n   * @values:\n   *   FT_WinFNT_ID_DEFAULT ::\n   *     This is used for font enumeration and font creation as a\n   *     `don't care' value.  Valid font files don't contain this value.\n   *     When querying for information about the character set of the font\n   *     that is currently selected into a specified device context, this\n   *     return value (of the related Windows API) simply denotes failure.\n   *\n   *   FT_WinFNT_ID_SYMBOL ::\n   *     There is no known mapping table available.\n   *\n   *   FT_WinFNT_ID_MAC ::\n   *     Mac Roman encoding.\n   *\n   *   FT_WinFNT_ID_OEM ::\n   *     From Michael Pöttgen <michael@poettgen.de>:\n   *\n   *       The `Windows Font Mapping' article says that FT_WinFNT_ID_OEM\n   *       is used for the charset of vector fonts, like `modern.fon',\n   *       `roman.fon', and `script.fon' on Windows.\n   *\n   *       The `CreateFont' documentation says: The FT_WinFNT_ID_OEM value\n   *       specifies a character set that is operating-system dependent.\n   *\n   *       The `IFIMETRICS' documentation from the `Windows Driver\n   *       Development Kit' says: This font supports an OEM-specific\n   *       character set.  The OEM character set is system dependent.\n   *\n   *       In general OEM, as opposed to ANSI (i.e., cp1252), denotes the\n   *       second default codepage that most international versions of\n   *       Windows have.  It is one of the OEM codepages from\n   *\n   *         http://www.microsoft.com/globaldev/reference/cphome.mspx,\n   *\n   *       and is used for the `DOS boxes', to support legacy applications.\n   *       A German Windows version for example usually uses ANSI codepage\n   *       1252 and OEM codepage 850.\n   *\n   *   FT_WinFNT_ID_CP874 ::\n   *     A superset of Thai TIS 620 and ISO 8859-11.\n   *\n   *   FT_WinFNT_ID_CP932 ::\n   *     A superset of Japanese Shift-JIS (with minor deviations).\n   *\n   *   FT_WinFNT_ID_CP936 ::\n   *     A superset of simplified Chinese GB 2312-1980 (with different\n   *     ordering and minor deviations).\n   *\n   *   FT_WinFNT_ID_CP949 ::\n   *     A superset of Korean Hangul KS~C 5601-1987 (with different\n   *     ordering and minor deviations).\n   *\n   *   FT_WinFNT_ID_CP950 ::\n   *     A superset of traditional Chinese Big~5 ETen (with different\n   *     ordering and minor deviations).\n   *\n   *   FT_WinFNT_ID_CP1250 ::\n   *     A superset of East European ISO 8859-2 (with slightly different\n   *     ordering).\n   *\n   *   FT_WinFNT_ID_CP1251 ::\n   *     A superset of Russian ISO 8859-5 (with different ordering).\n   *\n   *   FT_WinFNT_ID_CP1252 ::\n   *     ANSI encoding.  A superset of ISO 8859-1.\n   *\n   *   FT_WinFNT_ID_CP1253 ::\n   *     A superset of Greek ISO 8859-7 (with minor modifications).\n   *\n   *   FT_WinFNT_ID_CP1254 ::\n   *     A superset of Turkish ISO 8859-9.\n   *\n   *   FT_WinFNT_ID_CP1255 ::\n   *     A superset of Hebrew ISO 8859-8 (with some modifications).\n   *\n   *   FT_WinFNT_ID_CP1256 ::\n   *     A superset of Arabic ISO 8859-6 (with different ordering).\n   *\n   *   FT_WinFNT_ID_CP1257 ::\n   *     A superset of Baltic ISO 8859-13 (with some deviations).\n   *\n   *   FT_WinFNT_ID_CP1258 ::\n   *     For Vietnamese.  This encoding doesn't cover all necessary\n   *     characters.\n   *\n   *   FT_WinFNT_ID_CP1361 ::\n   *     Korean (Johab).\n   */\n\n#define FT_WinFNT_ID_CP1252    0\n#define FT_WinFNT_ID_DEFAULT   1\n#define FT_WinFNT_ID_SYMBOL    2\n#define FT_WinFNT_ID_MAC      77\n#define FT_WinFNT_ID_CP932   128\n#define FT_WinFNT_ID_CP949   129\n#define FT_WinFNT_ID_CP1361  130\n#define FT_WinFNT_ID_CP936   134\n#define FT_WinFNT_ID_CP950   136\n#define FT_WinFNT_ID_CP1253  161\n#define FT_WinFNT_ID_CP1254  162\n#define FT_WinFNT_ID_CP1258  163\n#define FT_WinFNT_ID_CP1255  177\n#define FT_WinFNT_ID_CP1256  178\n#define FT_WinFNT_ID_CP1257  186\n#define FT_WinFNT_ID_CP1251  204\n#define FT_WinFNT_ID_CP874   222\n#define FT_WinFNT_ID_CP1250  238\n#define FT_WinFNT_ID_OEM     255\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_WinFNT_HeaderRec                                                */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Windows FNT Header info.                                           */\n  /*                                                                       */\n  typedef struct  FT_WinFNT_HeaderRec_\n  {\n    FT_UShort  version;\n    FT_ULong   file_size;\n    FT_Byte    copyright[60];\n    FT_UShort  file_type;\n    FT_UShort  nominal_point_size;\n    FT_UShort  vertical_resolution;\n    FT_UShort  horizontal_resolution;\n    FT_UShort  ascent;\n    FT_UShort  internal_leading;\n    FT_UShort  external_leading;\n    FT_Byte    italic;\n    FT_Byte    underline;\n    FT_Byte    strike_out;\n    FT_UShort  weight;\n    FT_Byte    charset;\n    FT_UShort  pixel_width;\n    FT_UShort  pixel_height;\n    FT_Byte    pitch_and_family;\n    FT_UShort  avg_width;\n    FT_UShort  max_width;\n    FT_Byte    first_char;\n    FT_Byte    last_char;\n    FT_Byte    default_char;\n    FT_Byte    break_char;\n    FT_UShort  bytes_per_row;\n    FT_ULong   device_offset;\n    FT_ULong   face_name_offset;\n    FT_ULong   bits_pointer;\n    FT_ULong   bits_offset;\n    FT_Byte    reserved;\n    FT_ULong   flags;\n    FT_UShort  A_space;\n    FT_UShort  B_space;\n    FT_UShort  C_space;\n    FT_UShort  color_table_offset;\n    FT_ULong   reserved1[4];\n\n  } FT_WinFNT_HeaderRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    FT_WinFNT_Header                                                   */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to an @FT_WinFNT_HeaderRec structure.                     */\n  /*                                                                       */\n  typedef struct FT_WinFNT_HeaderRec_*  FT_WinFNT_Header;\n\n\n  /**********************************************************************\n   *\n   * @function:\n   *    FT_Get_WinFNT_Header\n   *\n   * @description:\n   *    Retrieve a Windows FNT font info header.\n   *\n   * @input:\n   *    face    :: A handle to the input face.\n   *\n   * @output:\n   *    aheader :: The WinFNT header.\n   *\n   * @return:\n   *   FreeType error code.  0~means success.\n   *\n   * @note:\n   *   This function only works with Windows FNT faces, returning an error\n   *   otherwise.\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_WinFNT_Header( FT_Face               face,\n                        FT_WinFNT_HeaderRec  *aheader );\n\n\n  /* */\n\nFT_END_HEADER\n\n#endif /* __FTWINFNT_H__ */\n\n\n/* END */\n\n\n/* Local Variables: */\n/* coding: utf-8    */\n/* End:             */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ftxf86.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ftxf86.h                                                               */\n/*                                                                         */\n/*    Support functions for X11.                                           */\n/*                                                                         */\n/*  Copyright 2002, 2003, 2004, 2006, 2007 by                              */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __FTXF86_H__\n#define __FTXF86_H__\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*   font_formats                                                        */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*   Font Formats                                                        */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*   Getting the font format.                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*   The single function in this section can be used to get the font     */\n  /*   format.  Note that this information is not needed normally;         */\n  /*   however, there are special cases (like in PDF devices) where it is  */\n  /*   important to differentiate, in spite of FreeType's uniform API.     */\n  /*                                                                       */\n  /*   This function is in the X11/xf86 namespace for historical reasons   */\n  /*   and in no way depends on that windowing system.                     */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*   FT_Get_X11_Font_Format                                              */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*   Return a string describing the format of a given face, using values */\n  /*   which can be used as an X11 FONT_PROPERTY.  Possible values are     */\n  /*   `TrueType', `Type~1', `BDF', `PCF', `Type~42', `CID~Type~1', `CFF', */\n  /*   `PFR', and `Windows~FNT'.                                           */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*   face ::                                                             */\n  /*     Input face handle.                                                */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*   Font format string.  NULL in case of error.                         */\n  /*                                                                       */\n  FT_EXPORT( const char* )\n  FT_Get_X11_Font_Format( FT_Face  face );\n\n /* */\n\nFT_END_HEADER\n\n#endif /* __FTXF86_H__ */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/t1tables.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  t1tables.h                                                             */\n/*                                                                         */\n/*    Basic Type 1/Type 2 tables definitions and interface (specification  */\n/*    only).                                                               */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2003, 2004, 2006, 2008, 2009 by             */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __T1TABLES_H__\n#define __T1TABLES_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    type1_tables                                                       */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    Type 1 Tables                                                      */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    Type~1 (PostScript) specific font tables.                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains the definition of Type 1-specific tables,    */\n  /*    including structures related to other PostScript font formats.     */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /* Note that we separate font data in PS_FontInfoRec and PS_PrivateRec */\n  /* structures in order to support Multiple Master fonts.               */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    PS_FontInfoRec                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to model a Type~1 or Type~2 FontInfo dictionary.  */\n  /*    Note that for Multiple Master fonts, each instance has its own     */\n  /*    FontInfo dictionary.                                               */\n  /*                                                                       */\n  typedef struct  PS_FontInfoRec_\n  {\n    FT_String*  version;\n    FT_String*  notice;\n    FT_String*  full_name;\n    FT_String*  family_name;\n    FT_String*  weight;\n    FT_Long     italic_angle;\n    FT_Bool     is_fixed_pitch;\n    FT_Short    underline_position;\n    FT_UShort   underline_thickness;\n\n  } PS_FontInfoRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    PS_FontInfo                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a @PS_FontInfoRec structure.                           */\n  /*                                                                       */\n  typedef struct PS_FontInfoRec_*  PS_FontInfo;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    T1_FontInfo                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This type is equivalent to @PS_FontInfoRec.  It is deprecated but  */\n  /*    kept to maintain source compatibility between various versions of  */\n  /*    FreeType.                                                          */\n  /*                                                                       */\n  typedef PS_FontInfoRec  T1_FontInfo;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    PS_PrivateRec                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to model a Type~1 or Type~2 private dictionary.   */\n  /*    Note that for Multiple Master fonts, each instance has its own     */\n  /*    Private dictionary.                                                */\n  /*                                                                       */\n  typedef struct  PS_PrivateRec_\n  {\n    FT_Int     unique_id;\n    FT_Int     lenIV;\n\n    FT_Byte    num_blue_values;\n    FT_Byte    num_other_blues;\n    FT_Byte    num_family_blues;\n    FT_Byte    num_family_other_blues;\n\n    FT_Short   blue_values[14];\n    FT_Short   other_blues[10];\n\n    FT_Short   family_blues      [14];\n    FT_Short   family_other_blues[10];\n\n    FT_Fixed   blue_scale;\n    FT_Int     blue_shift;\n    FT_Int     blue_fuzz;\n\n    FT_UShort  standard_width[1];\n    FT_UShort  standard_height[1];\n\n    FT_Byte    num_snap_widths;\n    FT_Byte    num_snap_heights;\n    FT_Bool    force_bold;\n    FT_Bool    round_stem_up;\n\n    FT_Short   snap_widths [13];  /* including std width  */\n    FT_Short   snap_heights[13];  /* including std height */\n\n    FT_Fixed   expansion_factor;\n\n    FT_Long    language_group;\n    FT_Long    password;\n\n    FT_Short   min_feature[2];\n\n  } PS_PrivateRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    PS_Private                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a @PS_PrivateRec structure.                            */\n  /*                                                                       */\n  typedef struct PS_PrivateRec_*  PS_Private;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    T1_Private                                                         */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*   This type is equivalent to @PS_PrivateRec.  It is deprecated but    */\n  /*   kept to maintain source compatibility between various versions of   */\n  /*   FreeType.                                                           */\n  /*                                                                       */\n  typedef PS_PrivateRec  T1_Private;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    T1_Blend_Flags                                                     */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A set of flags used to indicate which fields are present in a      */\n  /*    given blend dictionary (font info or private).  Used to support    */\n  /*    Multiple Masters fonts.                                            */\n  /*                                                                       */\n  typedef enum  T1_Blend_Flags_\n  {\n    /*# required fields in a FontInfo blend dictionary */\n    T1_BLEND_UNDERLINE_POSITION = 0,\n    T1_BLEND_UNDERLINE_THICKNESS,\n    T1_BLEND_ITALIC_ANGLE,\n\n    /*# required fields in a Private blend dictionary */\n    T1_BLEND_BLUE_VALUES,\n    T1_BLEND_OTHER_BLUES,\n    T1_BLEND_STANDARD_WIDTH,\n    T1_BLEND_STANDARD_HEIGHT,\n    T1_BLEND_STEM_SNAP_WIDTHS,\n    T1_BLEND_STEM_SNAP_HEIGHTS,\n    T1_BLEND_BLUE_SCALE,\n    T1_BLEND_BLUE_SHIFT,\n    T1_BLEND_FAMILY_BLUES,\n    T1_BLEND_FAMILY_OTHER_BLUES,\n    T1_BLEND_FORCE_BOLD,\n\n    /*# never remove */\n    T1_BLEND_MAX\n\n  } T1_Blend_Flags;\n\n  /* */\n\n\n  /*# backwards compatible definitions */\n#define t1_blend_underline_position   T1_BLEND_UNDERLINE_POSITION\n#define t1_blend_underline_thickness  T1_BLEND_UNDERLINE_THICKNESS\n#define t1_blend_italic_angle         T1_BLEND_ITALIC_ANGLE\n#define t1_blend_blue_values          T1_BLEND_BLUE_VALUES\n#define t1_blend_other_blues          T1_BLEND_OTHER_BLUES\n#define t1_blend_standard_widths      T1_BLEND_STANDARD_WIDTH\n#define t1_blend_standard_height      T1_BLEND_STANDARD_HEIGHT\n#define t1_blend_stem_snap_widths     T1_BLEND_STEM_SNAP_WIDTHS\n#define t1_blend_stem_snap_heights    T1_BLEND_STEM_SNAP_HEIGHTS\n#define t1_blend_blue_scale           T1_BLEND_BLUE_SCALE\n#define t1_blend_blue_shift           T1_BLEND_BLUE_SHIFT\n#define t1_blend_family_blues         T1_BLEND_FAMILY_BLUES\n#define t1_blend_family_other_blues   T1_BLEND_FAMILY_OTHER_BLUES\n#define t1_blend_force_bold           T1_BLEND_FORCE_BOLD\n#define t1_blend_max                  T1_BLEND_MAX\n\n\n  /* maximum number of Multiple Masters designs, as defined in the spec */\n#define T1_MAX_MM_DESIGNS     16\n\n  /* maximum number of Multiple Masters axes, as defined in the spec */\n#define T1_MAX_MM_AXIS        4\n\n  /* maximum number of elements in a design map */\n#define T1_MAX_MM_MAP_POINTS  20\n\n\n  /* this structure is used to store the BlendDesignMap entry for an axis */\n  typedef struct  PS_DesignMap_\n  {\n    FT_Byte    num_points;\n    FT_Long*   design_points;\n    FT_Fixed*  blend_points;\n\n  } PS_DesignMapRec, *PS_DesignMap;\n\n  /* backwards-compatible definition */\n  typedef PS_DesignMapRec  T1_DesignMap;\n\n\n  typedef struct  PS_BlendRec_\n  {\n    FT_UInt          num_designs;\n    FT_UInt          num_axis;\n\n    FT_String*       axis_names[T1_MAX_MM_AXIS];\n    FT_Fixed*        design_pos[T1_MAX_MM_DESIGNS];\n    PS_DesignMapRec  design_map[T1_MAX_MM_AXIS];\n\n    FT_Fixed*        weight_vector;\n    FT_Fixed*        default_weight_vector;\n\n    PS_FontInfo      font_infos[T1_MAX_MM_DESIGNS + 1];\n    PS_Private       privates  [T1_MAX_MM_DESIGNS + 1];\n\n    FT_ULong         blend_bitflags;\n\n    FT_BBox*         bboxes    [T1_MAX_MM_DESIGNS + 1];\n\n    /* since 2.3.0 */\n\n    /* undocumented, optional: the default design instance;   */\n    /* corresponds to default_weight_vector --                */\n    /* num_default_design_vector == 0 means it is not present */\n    /* in the font and associated metrics files               */\n    FT_UInt          default_design_vector[T1_MAX_MM_DESIGNS];\n    FT_UInt          num_default_design_vector;\n\n  } PS_BlendRec, *PS_Blend;\n\n\n  /* backwards-compatible definition */\n  typedef PS_BlendRec  T1_Blend;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    CID_FaceDictRec                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to represent data in a CID top-level dictionary.  */\n  /*                                                                       */\n  typedef struct  CID_FaceDictRec_\n  {\n    PS_PrivateRec  private_dict;\n\n    FT_UInt        len_buildchar;\n    FT_Fixed       forcebold_threshold;\n    FT_Pos         stroke_width;\n    FT_Fixed       expansion_factor;\n\n    FT_Byte        paint_type;\n    FT_Byte        font_type;\n    FT_Matrix      font_matrix;\n    FT_Vector      font_offset;\n\n    FT_UInt        num_subrs;\n    FT_ULong       subrmap_offset;\n    FT_Int         sd_bytes;\n\n  } CID_FaceDictRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    CID_FaceDict                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a @CID_FaceDictRec structure.                          */\n  /*                                                                       */\n  typedef struct CID_FaceDictRec_*  CID_FaceDict;\n\n  /* */\n\n\n  /* backwards-compatible definition */\n  typedef CID_FaceDictRec  CID_FontDict;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    CID_FaceInfoRec                                                    */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to represent CID Face information.                */\n  /*                                                                       */\n  typedef struct  CID_FaceInfoRec_\n  {\n    FT_String*      cid_font_name;\n    FT_Fixed        cid_version;\n    FT_Int          cid_font_type;\n\n    FT_String*      registry;\n    FT_String*      ordering;\n    FT_Int          supplement;\n\n    PS_FontInfoRec  font_info;\n    FT_BBox         font_bbox;\n    FT_ULong        uid_base;\n\n    FT_Int          num_xuid;\n    FT_ULong        xuid[16];\n\n    FT_ULong        cidmap_offset;\n    FT_Int          fd_bytes;\n    FT_Int          gd_bytes;\n    FT_ULong        cid_count;\n\n    FT_Int          num_dicts;\n    CID_FaceDict    font_dicts;\n\n    FT_ULong        data_offset;\n\n  } CID_FaceInfoRec;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    CID_FaceInfo                                                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A handle to a @CID_FaceInfoRec structure.                          */\n  /*                                                                       */\n  typedef struct CID_FaceInfoRec_*  CID_FaceInfo;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    CID_Info                                                           */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*   This type is equivalent to @CID_FaceInfoRec.  It is deprecated but  */\n  /*   kept to maintain source compatibility between various versions of   */\n  /*   FreeType.                                                           */\n  /*                                                                       */\n  typedef CID_FaceInfoRec  CID_Info;\n\n\n  /************************************************************************\n   *\n   * @function:\n   *    FT_Has_PS_Glyph_Names\n   *\n   * @description:\n   *    Return true if a given face provides reliable PostScript glyph\n   *    names.  This is similar to using the @FT_HAS_GLYPH_NAMES macro,\n   *    except that certain fonts (mostly TrueType) contain incorrect\n   *    glyph name tables.\n   *\n   *    When this function returns true, the caller is sure that the glyph\n   *    names returned by @FT_Get_Glyph_Name are reliable.\n   *\n   * @input:\n   *    face ::\n   *       face handle\n   *\n   * @return:\n   *    Boolean.  True if glyph names are reliable.\n   *\n   */\n  FT_EXPORT( FT_Int )\n  FT_Has_PS_Glyph_Names( FT_Face  face );\n\n\n  /************************************************************************\n   *\n   * @function:\n   *    FT_Get_PS_Font_Info\n   *\n   * @description:\n   *    Retrieve the @PS_FontInfoRec structure corresponding to a given\n   *    PostScript font.\n   *\n   * @input:\n   *    face ::\n   *       PostScript face handle.\n   *\n   * @output:\n   *    afont_info ::\n   *       Output font info structure pointer.\n   *\n   * @return:\n   *    FreeType error code.  0~means success.\n   *\n   * @note:\n   *    The string pointers within the font info structure are owned by\n   *    the face and don't need to be freed by the caller.\n   *\n   *    If the font's format is not PostScript-based, this function will\n   *    return the `FT_Err_Invalid_Argument' error code.\n   *\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_PS_Font_Info( FT_Face      face,\n                       PS_FontInfo  afont_info );\n\n\n  /************************************************************************\n   *\n   * @function:\n   *    FT_Get_PS_Font_Private\n   *\n   * @description:\n   *    Retrieve the @PS_PrivateRec structure corresponding to a given\n   *    PostScript font.\n   *\n   * @input:\n   *    face ::\n   *       PostScript face handle.\n   *\n   * @output:\n   *    afont_private ::\n   *       Output private dictionary structure pointer.\n   *\n   * @return:\n   *    FreeType error code.  0~means success.\n   *\n   * @note:\n   *    The string pointers within the @PS_PrivateRec structure are owned by\n   *    the face and don't need to be freed by the caller.\n   *\n   *    If the font's format is not PostScript-based, this function returns\n   *    the `FT_Err_Invalid_Argument' error code.\n   *\n   */\n  FT_EXPORT( FT_Error )\n  FT_Get_PS_Font_Private( FT_Face     face,\n                          PS_Private  afont_private );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __T1TABLES_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ttnameid.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttnameid.h                                                             */\n/*                                                                         */\n/*    TrueType name ID definitions (specification only).                   */\n/*                                                                         */\n/*  Copyright 1996-2002, 2003, 2004, 2006, 2007, 2008 by                   */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __TTNAMEID_H__\n#define __TTNAMEID_H__\n\n\n#include <ft2build.h>\n\n\nFT_BEGIN_HEADER\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    truetype_tables                                                    */\n  /*                                                                       */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Possible values for the `platform' identifier code in the name        */\n  /* records of the TTF `name' table.                                      */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /***********************************************************************\n   *\n   * @enum:\n   *   TT_PLATFORM_XXX\n   *\n   * @description:\n   *   A list of valid values for the `platform_id' identifier code in\n   *   @FT_CharMapRec and @FT_SfntName structures.\n   *\n   * @values:\n   *   TT_PLATFORM_APPLE_UNICODE ::\n   *     Used by Apple to indicate a Unicode character map and/or name entry.\n   *     See @TT_APPLE_ID_XXX for corresponding `encoding_id' values.  Note\n   *     that name entries in this format are coded as big-endian UCS-2\n   *     character codes _only_.\n   *\n   *   TT_PLATFORM_MACINTOSH ::\n   *     Used by Apple to indicate a MacOS-specific charmap and/or name entry.\n   *     See @TT_MAC_ID_XXX for corresponding `encoding_id' values.  Note that\n   *     most TrueType fonts contain an Apple roman charmap to be usable on\n   *     MacOS systems (even if they contain a Microsoft charmap as well).\n   *\n   *   TT_PLATFORM_ISO ::\n   *     This value was used to specify Unicode charmaps.  It is however\n   *     now deprecated.  See @TT_ISO_ID_XXX for a list of corresponding\n   *     `encoding_id' values.\n   *\n   *   TT_PLATFORM_MICROSOFT ::\n   *     Used by Microsoft to indicate Windows-specific charmaps.  See\n   *     @TT_MS_ID_XXX for a list of corresponding `encoding_id' values.\n   *     Note that most fonts contain a Unicode charmap using\n   *     (TT_PLATFORM_MICROSOFT, @TT_MS_ID_UNICODE_CS).\n   *\n   *   TT_PLATFORM_CUSTOM ::\n   *     Used to indicate application-specific charmaps.\n   *\n   *   TT_PLATFORM_ADOBE ::\n   *     This value isn't part of any font format specification, but is used\n   *     by FreeType to report Adobe-specific charmaps in an @FT_CharMapRec\n   *     structure.  See @TT_ADOBE_ID_XXX.\n   */\n\n#define TT_PLATFORM_APPLE_UNICODE  0\n#define TT_PLATFORM_MACINTOSH      1\n#define TT_PLATFORM_ISO            2 /* deprecated */\n#define TT_PLATFORM_MICROSOFT      3\n#define TT_PLATFORM_CUSTOM         4\n#define TT_PLATFORM_ADOBE          7 /* artificial */\n\n\n  /***********************************************************************\n   *\n   * @enum:\n   *   TT_APPLE_ID_XXX\n   *\n   * @description:\n   *   A list of valid values for the `encoding_id' for\n   *   @TT_PLATFORM_APPLE_UNICODE charmaps and name entries.\n   *\n   * @values:\n   *   TT_APPLE_ID_DEFAULT ::\n   *     Unicode version 1.0.\n   *\n   *   TT_APPLE_ID_UNICODE_1_1 ::\n   *     Unicode 1.1; specifies Hangul characters starting at U+34xx.\n   *\n   *   TT_APPLE_ID_ISO_10646 ::\n   *     Deprecated (identical to preceding).\n   *\n   *   TT_APPLE_ID_UNICODE_2_0 ::\n   *     Unicode 2.0 and beyond (UTF-16 BMP only).\n   *\n   *   TT_APPLE_ID_UNICODE_32 ::\n   *     Unicode 3.1 and beyond, using UTF-32.\n   *\n   *   TT_APPLE_ID_VARIANT_SELECTOR ::\n   *     From Adobe, not Apple.  Not a normal cmap.  Specifies variations\n   *     on a real cmap.\n   */\n\n#define TT_APPLE_ID_DEFAULT           0 /* Unicode 1.0 */\n#define TT_APPLE_ID_UNICODE_1_1       1 /* specify Hangul at U+34xx */\n#define TT_APPLE_ID_ISO_10646         2 /* deprecated */\n#define TT_APPLE_ID_UNICODE_2_0       3 /* or later */\n#define TT_APPLE_ID_UNICODE_32        4 /* 2.0 or later, full repertoire */\n#define TT_APPLE_ID_VARIANT_SELECTOR  5 /* variation selector data */\n\n\n  /***********************************************************************\n   *\n   * @enum:\n   *   TT_MAC_ID_XXX\n   *\n   * @description:\n   *   A list of valid values for the `encoding_id' for\n   *   @TT_PLATFORM_MACINTOSH charmaps and name entries.\n   *\n   * @values:\n   *   TT_MAC_ID_ROMAN ::\n   *   TT_MAC_ID_JAPANESE ::\n   *   TT_MAC_ID_TRADITIONAL_CHINESE ::\n   *   TT_MAC_ID_KOREAN ::\n   *   TT_MAC_ID_ARABIC ::\n   *   TT_MAC_ID_HEBREW ::\n   *   TT_MAC_ID_GREEK ::\n   *   TT_MAC_ID_RUSSIAN ::\n   *   TT_MAC_ID_RSYMBOL ::\n   *   TT_MAC_ID_DEVANAGARI ::\n   *   TT_MAC_ID_GURMUKHI ::\n   *   TT_MAC_ID_GUJARATI ::\n   *   TT_MAC_ID_ORIYA ::\n   *   TT_MAC_ID_BENGALI ::\n   *   TT_MAC_ID_TAMIL ::\n   *   TT_MAC_ID_TELUGU ::\n   *   TT_MAC_ID_KANNADA ::\n   *   TT_MAC_ID_MALAYALAM ::\n   *   TT_MAC_ID_SINHALESE ::\n   *   TT_MAC_ID_BURMESE ::\n   *   TT_MAC_ID_KHMER ::\n   *   TT_MAC_ID_THAI ::\n   *   TT_MAC_ID_LAOTIAN ::\n   *   TT_MAC_ID_GEORGIAN ::\n   *   TT_MAC_ID_ARMENIAN ::\n   *   TT_MAC_ID_MALDIVIAN ::\n   *   TT_MAC_ID_SIMPLIFIED_CHINESE ::\n   *   TT_MAC_ID_TIBETAN ::\n   *   TT_MAC_ID_MONGOLIAN ::\n   *   TT_MAC_ID_GEEZ ::\n   *   TT_MAC_ID_SLAVIC ::\n   *   TT_MAC_ID_VIETNAMESE ::\n   *   TT_MAC_ID_SINDHI ::\n   *   TT_MAC_ID_UNINTERP ::\n   */\n\n#define TT_MAC_ID_ROMAN                 0\n#define TT_MAC_ID_JAPANESE              1\n#define TT_MAC_ID_TRADITIONAL_CHINESE   2\n#define TT_MAC_ID_KOREAN                3\n#define TT_MAC_ID_ARABIC                4\n#define TT_MAC_ID_HEBREW                5\n#define TT_MAC_ID_GREEK                 6\n#define TT_MAC_ID_RUSSIAN               7\n#define TT_MAC_ID_RSYMBOL               8\n#define TT_MAC_ID_DEVANAGARI            9\n#define TT_MAC_ID_GURMUKHI             10\n#define TT_MAC_ID_GUJARATI             11\n#define TT_MAC_ID_ORIYA                12\n#define TT_MAC_ID_BENGALI              13\n#define TT_MAC_ID_TAMIL                14\n#define TT_MAC_ID_TELUGU               15\n#define TT_MAC_ID_KANNADA              16\n#define TT_MAC_ID_MALAYALAM            17\n#define TT_MAC_ID_SINHALESE            18\n#define TT_MAC_ID_BURMESE              19\n#define TT_MAC_ID_KHMER                20\n#define TT_MAC_ID_THAI                 21\n#define TT_MAC_ID_LAOTIAN              22\n#define TT_MAC_ID_GEORGIAN             23\n#define TT_MAC_ID_ARMENIAN             24\n#define TT_MAC_ID_MALDIVIAN            25\n#define TT_MAC_ID_SIMPLIFIED_CHINESE   25\n#define TT_MAC_ID_TIBETAN              26\n#define TT_MAC_ID_MONGOLIAN            27\n#define TT_MAC_ID_GEEZ                 28\n#define TT_MAC_ID_SLAVIC               29\n#define TT_MAC_ID_VIETNAMESE           30\n#define TT_MAC_ID_SINDHI               31\n#define TT_MAC_ID_UNINTERP             32\n\n\n  /***********************************************************************\n   *\n   * @enum:\n   *   TT_ISO_ID_XXX\n   *\n   * @description:\n   *   A list of valid values for the `encoding_id' for\n   *   @TT_PLATFORM_ISO charmaps and name entries.\n   *\n   *   Their use is now deprecated.\n   *\n   * @values:\n   *   TT_ISO_ID_7BIT_ASCII ::\n   *     ASCII.\n   *   TT_ISO_ID_10646 ::\n   *     ISO/10646.\n   *   TT_ISO_ID_8859_1 ::\n   *     Also known as Latin-1.\n   */\n\n#define TT_ISO_ID_7BIT_ASCII  0\n#define TT_ISO_ID_10646       1\n#define TT_ISO_ID_8859_1      2\n\n\n  /***********************************************************************\n   *\n   * @enum:\n   *   TT_MS_ID_XXX\n   *\n   * @description:\n   *   A list of valid values for the `encoding_id' for\n   *   @TT_PLATFORM_MICROSOFT charmaps and name entries.\n   *\n   * @values:\n   *   TT_MS_ID_SYMBOL_CS ::\n   *     Corresponds to Microsoft symbol encoding. See\n   *     @FT_ENCODING_MS_SYMBOL.\n   *\n   *   TT_MS_ID_UNICODE_CS ::\n   *     Corresponds to a Microsoft WGL4 charmap, matching Unicode.  See\n   *     @FT_ENCODING_UNICODE.\n   *\n   *   TT_MS_ID_SJIS ::\n   *     Corresponds to SJIS Japanese encoding.  See @FT_ENCODING_SJIS.\n   *\n   *   TT_MS_ID_GB2312 ::\n   *     Corresponds to Simplified Chinese as used in Mainland China.  See\n   *     @FT_ENCODING_GB2312.\n   *\n   *   TT_MS_ID_BIG_5 ::\n   *     Corresponds to Traditional Chinese as used in Taiwan and Hong Kong.\n   *     See @FT_ENCODING_BIG5.\n   *\n   *   TT_MS_ID_WANSUNG ::\n   *     Corresponds to Korean Wansung encoding.  See @FT_ENCODING_WANSUNG.\n   *\n   *   TT_MS_ID_JOHAB ::\n   *     Corresponds to Johab encoding.  See @FT_ENCODING_JOHAB.\n   *\n   *   TT_MS_ID_UCS_4 ::\n   *     Corresponds to UCS-4 or UTF-32 charmaps.  This has been added to\n   *     the OpenType specification version 1.4 (mid-2001.)\n   */\n\n#define TT_MS_ID_SYMBOL_CS    0\n#define TT_MS_ID_UNICODE_CS   1\n#define TT_MS_ID_SJIS         2\n#define TT_MS_ID_GB2312       3\n#define TT_MS_ID_BIG_5        4\n#define TT_MS_ID_WANSUNG      5\n#define TT_MS_ID_JOHAB        6\n#define TT_MS_ID_UCS_4       10\n\n\n  /***********************************************************************\n   *\n   * @enum:\n   *   TT_ADOBE_ID_XXX\n   *\n   * @description:\n   *   A list of valid values for the `encoding_id' for\n   *   @TT_PLATFORM_ADOBE charmaps.  This is a FreeType-specific extension!\n   *\n   * @values:\n   *   TT_ADOBE_ID_STANDARD ::\n   *     Adobe standard encoding.\n   *   TT_ADOBE_ID_EXPERT ::\n   *     Adobe expert encoding.\n   *   TT_ADOBE_ID_CUSTOM ::\n   *     Adobe custom encoding.\n   *   TT_ADOBE_ID_LATIN_1 ::\n   *     Adobe Latin~1 encoding.\n   */\n\n#define TT_ADOBE_ID_STANDARD  0\n#define TT_ADOBE_ID_EXPERT    1\n#define TT_ADOBE_ID_CUSTOM    2\n#define TT_ADOBE_ID_LATIN_1   3\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Possible values of the language identifier field in the name records  */\n  /* of the TTF `name' table if the `platform' identifier code is          */\n  /* TT_PLATFORM_MACINTOSH.                                                */\n  /*                                                                       */\n  /* The canonical source for the Apple assigned Language ID's is at       */\n  /*                                                                       */\n  /*   http://fonts.apple.com/TTRefMan/RM06/Chap6name.html                 */\n  /*                                                                       */\n#define TT_MAC_LANGID_ENGLISH                       0\n#define TT_MAC_LANGID_FRENCH                        1\n#define TT_MAC_LANGID_GERMAN                        2\n#define TT_MAC_LANGID_ITALIAN                       3\n#define TT_MAC_LANGID_DUTCH                         4\n#define TT_MAC_LANGID_SWEDISH                       5\n#define TT_MAC_LANGID_SPANISH                       6\n#define TT_MAC_LANGID_DANISH                        7\n#define TT_MAC_LANGID_PORTUGUESE                    8\n#define TT_MAC_LANGID_NORWEGIAN                     9\n#define TT_MAC_LANGID_HEBREW                       10\n#define TT_MAC_LANGID_JAPANESE                     11\n#define TT_MAC_LANGID_ARABIC                       12\n#define TT_MAC_LANGID_FINNISH                      13\n#define TT_MAC_LANGID_GREEK                        14\n#define TT_MAC_LANGID_ICELANDIC                    15\n#define TT_MAC_LANGID_MALTESE                      16\n#define TT_MAC_LANGID_TURKISH                      17\n#define TT_MAC_LANGID_CROATIAN                     18\n#define TT_MAC_LANGID_CHINESE_TRADITIONAL          19\n#define TT_MAC_LANGID_URDU                         20\n#define TT_MAC_LANGID_HINDI                        21\n#define TT_MAC_LANGID_THAI                         22\n#define TT_MAC_LANGID_KOREAN                       23\n#define TT_MAC_LANGID_LITHUANIAN                   24\n#define TT_MAC_LANGID_POLISH                       25\n#define TT_MAC_LANGID_HUNGARIAN                    26\n#define TT_MAC_LANGID_ESTONIAN                     27\n#define TT_MAC_LANGID_LETTISH                      28\n#define TT_MAC_LANGID_SAAMISK                      29\n#define TT_MAC_LANGID_FAEROESE                     30\n#define TT_MAC_LANGID_FARSI                        31\n#define TT_MAC_LANGID_RUSSIAN                      32\n#define TT_MAC_LANGID_CHINESE_SIMPLIFIED           33\n#define TT_MAC_LANGID_FLEMISH                      34\n#define TT_MAC_LANGID_IRISH                        35\n#define TT_MAC_LANGID_ALBANIAN                     36\n#define TT_MAC_LANGID_ROMANIAN                     37\n#define TT_MAC_LANGID_CZECH                        38\n#define TT_MAC_LANGID_SLOVAK                       39\n#define TT_MAC_LANGID_SLOVENIAN                    40\n#define TT_MAC_LANGID_YIDDISH                      41\n#define TT_MAC_LANGID_SERBIAN                      42\n#define TT_MAC_LANGID_MACEDONIAN                   43\n#define TT_MAC_LANGID_BULGARIAN                    44\n#define TT_MAC_LANGID_UKRAINIAN                    45\n#define TT_MAC_LANGID_BYELORUSSIAN                 46\n#define TT_MAC_LANGID_UZBEK                        47\n#define TT_MAC_LANGID_KAZAKH                       48\n#define TT_MAC_LANGID_AZERBAIJANI                  49\n#define TT_MAC_LANGID_AZERBAIJANI_CYRILLIC_SCRIPT  49\n#define TT_MAC_LANGID_AZERBAIJANI_ARABIC_SCRIPT    50\n#define TT_MAC_LANGID_ARMENIAN                     51\n#define TT_MAC_LANGID_GEORGIAN                     52\n#define TT_MAC_LANGID_MOLDAVIAN                    53\n#define TT_MAC_LANGID_KIRGHIZ                      54\n#define TT_MAC_LANGID_TAJIKI                       55\n#define TT_MAC_LANGID_TURKMEN                      56\n#define TT_MAC_LANGID_MONGOLIAN                    57\n#define TT_MAC_LANGID_MONGOLIAN_MONGOLIAN_SCRIPT   57\n#define TT_MAC_LANGID_MONGOLIAN_CYRILLIC_SCRIPT    58\n#define TT_MAC_LANGID_PASHTO                       59\n#define TT_MAC_LANGID_KURDISH                      60\n#define TT_MAC_LANGID_KASHMIRI                     61\n#define TT_MAC_LANGID_SINDHI                       62\n#define TT_MAC_LANGID_TIBETAN                      63\n#define TT_MAC_LANGID_NEPALI                       64\n#define TT_MAC_LANGID_SANSKRIT                     65\n#define TT_MAC_LANGID_MARATHI                      66\n#define TT_MAC_LANGID_BENGALI                      67\n#define TT_MAC_LANGID_ASSAMESE                     68\n#define TT_MAC_LANGID_GUJARATI                     69\n#define TT_MAC_LANGID_PUNJABI                      70\n#define TT_MAC_LANGID_ORIYA                        71\n#define TT_MAC_LANGID_MALAYALAM                    72\n#define TT_MAC_LANGID_KANNADA                      73\n#define TT_MAC_LANGID_TAMIL                        74\n#define TT_MAC_LANGID_TELUGU                       75\n#define TT_MAC_LANGID_SINHALESE                    76\n#define TT_MAC_LANGID_BURMESE                      77\n#define TT_MAC_LANGID_KHMER                        78\n#define TT_MAC_LANGID_LAO                          79\n#define TT_MAC_LANGID_VIETNAMESE                   80\n#define TT_MAC_LANGID_INDONESIAN                   81\n#define TT_MAC_LANGID_TAGALOG                      82\n#define TT_MAC_LANGID_MALAY_ROMAN_SCRIPT           83\n#define TT_MAC_LANGID_MALAY_ARABIC_SCRIPT          84\n#define TT_MAC_LANGID_AMHARIC                      85\n#define TT_MAC_LANGID_TIGRINYA                     86\n#define TT_MAC_LANGID_GALLA                        87\n#define TT_MAC_LANGID_SOMALI                       88\n#define TT_MAC_LANGID_SWAHILI                      89\n#define TT_MAC_LANGID_RUANDA                       90\n#define TT_MAC_LANGID_RUNDI                        91\n#define TT_MAC_LANGID_CHEWA                        92\n#define TT_MAC_LANGID_MALAGASY                     93\n#define TT_MAC_LANGID_ESPERANTO                    94\n#define TT_MAC_LANGID_WELSH                       128\n#define TT_MAC_LANGID_BASQUE                      129\n#define TT_MAC_LANGID_CATALAN                     130\n#define TT_MAC_LANGID_LATIN                       131\n#define TT_MAC_LANGID_QUECHUA                     132\n#define TT_MAC_LANGID_GUARANI                     133\n#define TT_MAC_LANGID_AYMARA                      134\n#define TT_MAC_LANGID_TATAR                       135\n#define TT_MAC_LANGID_UIGHUR                      136\n#define TT_MAC_LANGID_DZONGKHA                    137\n#define TT_MAC_LANGID_JAVANESE                    138\n#define TT_MAC_LANGID_SUNDANESE                   139\n\n\n#if 0  /* these seem to be errors that have been dropped */\n\n#define TT_MAC_LANGID_SCOTTISH_GAELIC             140\n#define TT_MAC_LANGID_IRISH_GAELIC                141\n\n#endif\n\n\n  /* The following codes are new as of 2000-03-10 */\n#define TT_MAC_LANGID_GALICIAN                    140\n#define TT_MAC_LANGID_AFRIKAANS                   141\n#define TT_MAC_LANGID_BRETON                      142\n#define TT_MAC_LANGID_INUKTITUT                   143\n#define TT_MAC_LANGID_SCOTTISH_GAELIC             144\n#define TT_MAC_LANGID_MANX_GAELIC                 145\n#define TT_MAC_LANGID_IRISH_GAELIC                146\n#define TT_MAC_LANGID_TONGAN                      147\n#define TT_MAC_LANGID_GREEK_POLYTONIC             148\n#define TT_MAC_LANGID_GREELANDIC                  149\n#define TT_MAC_LANGID_AZERBAIJANI_ROMAN_SCRIPT    150\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Possible values of the language identifier field in the name records  */\n  /* of the TTF `name' table if the `platform' identifier code is          */\n  /* TT_PLATFORM_MICROSOFT.                                                */\n  /*                                                                       */\n  /* The canonical source for the MS assigned LCID's (seems to) be at      */\n  /*                                                                       */\n  /*   http://www.microsoft.com/globaldev/reference/lcid-all.mspx          */\n  /*                                                                       */\n  /* It used to be at various places, among them                           */\n  /*                                                                       */\n  /*   http://www.microsoft.com/typography/OTSPEC/lcid-cp.txt              */\n  /*   http://www.microsoft.com/globaldev/reference/loclanghome.asp        */\n  /*   http://support.microsoft.com/support/kb/articles/Q224/8/04.ASP      */\n  /*   http://msdn.microsoft.com/library/en-us/passport25/                 */\n  /*           NET_Passport_VBScript_Documentation/Single_Sign_In/         */\n  /*           Advanced_Single_Sign_In/Localization_and_LCIDs.asp          */\n  /*                                                                       */\n  /* Hopefully, it seems now that the Globaldev site prevails...           */\n  /*                                   (updated by Antoine, 2004-02-17)    */\n\n#define TT_MS_LANGID_ARABIC_GENERAL                    0x0001\n#define TT_MS_LANGID_ARABIC_SAUDI_ARABIA               0x0401\n#define TT_MS_LANGID_ARABIC_IRAQ                       0x0801\n#define TT_MS_LANGID_ARABIC_EGYPT                      0x0c01\n#define TT_MS_LANGID_ARABIC_LIBYA                      0x1001\n#define TT_MS_LANGID_ARABIC_ALGERIA                    0x1401\n#define TT_MS_LANGID_ARABIC_MOROCCO                    0x1801\n#define TT_MS_LANGID_ARABIC_TUNISIA                    0x1c01\n#define TT_MS_LANGID_ARABIC_OMAN                       0x2001\n#define TT_MS_LANGID_ARABIC_YEMEN                      0x2401\n#define TT_MS_LANGID_ARABIC_SYRIA                      0x2801\n#define TT_MS_LANGID_ARABIC_JORDAN                     0x2c01\n#define TT_MS_LANGID_ARABIC_LEBANON                    0x3001\n#define TT_MS_LANGID_ARABIC_KUWAIT                     0x3401\n#define TT_MS_LANGID_ARABIC_UAE                        0x3801\n#define TT_MS_LANGID_ARABIC_BAHRAIN                    0x3c01\n#define TT_MS_LANGID_ARABIC_QATAR                      0x4001\n#define TT_MS_LANGID_BULGARIAN_BULGARIA                0x0402\n#define TT_MS_LANGID_CATALAN_SPAIN                     0x0403\n#define TT_MS_LANGID_CHINESE_GENERAL                   0x0004\n#define TT_MS_LANGID_CHINESE_TAIWAN                    0x0404\n#define TT_MS_LANGID_CHINESE_PRC                       0x0804\n#define TT_MS_LANGID_CHINESE_HONG_KONG                 0x0c04\n#define TT_MS_LANGID_CHINESE_SINGAPORE                 0x1004\n\n#if 1  /* this looks like the correct value */\n#define TT_MS_LANGID_CHINESE_MACAU                     0x1404\n#else  /* but beware, Microsoft may change its mind...\n          the most recent Word reference has the following: */\n#define TT_MS_LANGID_CHINESE_MACAU  TT_MS_LANGID_CHINESE_HONG_KONG\n#endif\n\n#if 0  /* used only with .NET `cultures'; commented out */\n#define TT_MS_LANGID_CHINESE_TRADITIONAL               0x7C04\n#endif\n\n#define TT_MS_LANGID_CZECH_CZECH_REPUBLIC              0x0405\n#define TT_MS_LANGID_DANISH_DENMARK                    0x0406\n#define TT_MS_LANGID_GERMAN_GERMANY                    0x0407\n#define TT_MS_LANGID_GERMAN_SWITZERLAND                0x0807\n#define TT_MS_LANGID_GERMAN_AUSTRIA                    0x0c07\n#define TT_MS_LANGID_GERMAN_LUXEMBOURG                 0x1007\n#define TT_MS_LANGID_GERMAN_LIECHTENSTEI               0x1407\n#define TT_MS_LANGID_GREEK_GREECE                      0x0408\n\n  /* don't ask what this one means... It is commented out currently. */\n#if 0\n#define TT_MS_LANGID_GREEK_GREECE2                     0x2008\n#endif\n\n#define TT_MS_LANGID_ENGLISH_GENERAL                   0x0009\n#define TT_MS_LANGID_ENGLISH_UNITED_STATES             0x0409\n#define TT_MS_LANGID_ENGLISH_UNITED_KINGDOM            0x0809\n#define TT_MS_LANGID_ENGLISH_AUSTRALIA                 0x0c09\n#define TT_MS_LANGID_ENGLISH_CANADA                    0x1009\n#define TT_MS_LANGID_ENGLISH_NEW_ZEALAND               0x1409\n#define TT_MS_LANGID_ENGLISH_IRELAND                   0x1809\n#define TT_MS_LANGID_ENGLISH_SOUTH_AFRICA              0x1c09\n#define TT_MS_LANGID_ENGLISH_JAMAICA                   0x2009\n#define TT_MS_LANGID_ENGLISH_CARIBBEAN                 0x2409\n#define TT_MS_LANGID_ENGLISH_BELIZE                    0x2809\n#define TT_MS_LANGID_ENGLISH_TRINIDAD                  0x2c09\n#define TT_MS_LANGID_ENGLISH_ZIMBABWE                  0x3009\n#define TT_MS_LANGID_ENGLISH_PHILIPPINES               0x3409\n#define TT_MS_LANGID_ENGLISH_INDONESIA                 0x3809\n#define TT_MS_LANGID_ENGLISH_HONG_KONG                 0x3c09\n#define TT_MS_LANGID_ENGLISH_INDIA                     0x4009\n#define TT_MS_LANGID_ENGLISH_MALAYSIA                  0x4409\n#define TT_MS_LANGID_ENGLISH_SINGAPORE                 0x4809\n#define TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT    0x040a\n#define TT_MS_LANGID_SPANISH_MEXICO                    0x080a\n#define TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT  0x0c0a\n#define TT_MS_LANGID_SPANISH_GUATEMALA                 0x100a\n#define TT_MS_LANGID_SPANISH_COSTA_RICA                0x140a\n#define TT_MS_LANGID_SPANISH_PANAMA                    0x180a\n#define TT_MS_LANGID_SPANISH_DOMINICAN_REPUBLIC        0x1c0a\n#define TT_MS_LANGID_SPANISH_VENEZUELA                 0x200a\n#define TT_MS_LANGID_SPANISH_COLOMBIA                  0x240a\n#define TT_MS_LANGID_SPANISH_PERU                      0x280a\n#define TT_MS_LANGID_SPANISH_ARGENTINA                 0x2c0a\n#define TT_MS_LANGID_SPANISH_ECUADOR                   0x300a\n#define TT_MS_LANGID_SPANISH_CHILE                     0x340a\n#define TT_MS_LANGID_SPANISH_URUGUAY                   0x380a\n#define TT_MS_LANGID_SPANISH_PARAGUAY                  0x3c0a\n#define TT_MS_LANGID_SPANISH_BOLIVIA                   0x400a\n#define TT_MS_LANGID_SPANISH_EL_SALVADOR               0x440a\n#define TT_MS_LANGID_SPANISH_HONDURAS                  0x480a\n#define TT_MS_LANGID_SPANISH_NICARAGUA                 0x4c0a\n#define TT_MS_LANGID_SPANISH_PUERTO_RICO               0x500a\n#define TT_MS_LANGID_SPANISH_UNITED_STATES             0x540a\n  /* The following ID blatantly violate MS specs by using a */\n  /* sublanguage > 0x1F.                                    */\n#define TT_MS_LANGID_SPANISH_LATIN_AMERICA             0xE40aU\n#define TT_MS_LANGID_FINNISH_FINLAND                   0x040b\n#define TT_MS_LANGID_FRENCH_FRANCE                     0x040c\n#define TT_MS_LANGID_FRENCH_BELGIUM                    0x080c\n#define TT_MS_LANGID_FRENCH_CANADA                     0x0c0c\n#define TT_MS_LANGID_FRENCH_SWITZERLAND                0x100c\n#define TT_MS_LANGID_FRENCH_LUXEMBOURG                 0x140c\n#define TT_MS_LANGID_FRENCH_MONACO                     0x180c\n#define TT_MS_LANGID_FRENCH_WEST_INDIES                0x1c0c\n#define TT_MS_LANGID_FRENCH_REUNION                    0x200c\n#define TT_MS_LANGID_FRENCH_CONGO                      0x240c\n  /* which was formerly: */\n#define TT_MS_LANGID_FRENCH_ZAIRE  TT_MS_LANGID_FRENCH_CONGO\n#define TT_MS_LANGID_FRENCH_SENEGAL                    0x280c\n#define TT_MS_LANGID_FRENCH_CAMEROON                   0x2c0c\n#define TT_MS_LANGID_FRENCH_COTE_D_IVOIRE              0x300c\n#define TT_MS_LANGID_FRENCH_MALI                       0x340c\n#define TT_MS_LANGID_FRENCH_MOROCCO                    0x380c\n#define TT_MS_LANGID_FRENCH_HAITI                      0x3c0c\n  /* and another violation of the spec (see 0xE40aU) */\n#define TT_MS_LANGID_FRENCH_NORTH_AFRICA               0xE40cU\n#define TT_MS_LANGID_HEBREW_ISRAEL                     0x040d\n#define TT_MS_LANGID_HUNGARIAN_HUNGARY                 0x040e\n#define TT_MS_LANGID_ICELANDIC_ICELAND                 0x040f\n#define TT_MS_LANGID_ITALIAN_ITALY                     0x0410\n#define TT_MS_LANGID_ITALIAN_SWITZERLAND               0x0810\n#define TT_MS_LANGID_JAPANESE_JAPAN                    0x0411\n#define TT_MS_LANGID_KOREAN_EXTENDED_WANSUNG_KOREA     0x0412\n#define TT_MS_LANGID_KOREAN_JOHAB_KOREA                0x0812\n#define TT_MS_LANGID_DUTCH_NETHERLANDS                 0x0413\n#define TT_MS_LANGID_DUTCH_BELGIUM                     0x0813\n#define TT_MS_LANGID_NORWEGIAN_NORWAY_BOKMAL           0x0414\n#define TT_MS_LANGID_NORWEGIAN_NORWAY_NYNORSK          0x0814\n#define TT_MS_LANGID_POLISH_POLAND                     0x0415\n#define TT_MS_LANGID_PORTUGUESE_BRAZIL                 0x0416\n#define TT_MS_LANGID_PORTUGUESE_PORTUGAL               0x0816\n#define TT_MS_LANGID_RHAETO_ROMANIC_SWITZERLAND        0x0417\n#define TT_MS_LANGID_ROMANIAN_ROMANIA                  0x0418\n#define TT_MS_LANGID_MOLDAVIAN_MOLDAVIA                0x0818\n#define TT_MS_LANGID_RUSSIAN_RUSSIA                    0x0419\n#define TT_MS_LANGID_RUSSIAN_MOLDAVIA                  0x0819\n#define TT_MS_LANGID_CROATIAN_CROATIA                  0x041a\n#define TT_MS_LANGID_SERBIAN_SERBIA_LATIN              0x081a\n#define TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC           0x0c1a\n\n#if 0  /* this used to be this value, but it looks like we were wrong */\n#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA        0x101a\n#else  /* current sources say */\n#define TT_MS_LANGID_CROATIAN_BOSNIA_HERZEGOVINA       0x101a\n#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA        0x141a\n       /* and XPsp2 Platform SDK added (2004-07-26) */\n       /* Names are shortened to be significant within 40 chars. */\n#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_LATIN         0x181a\n#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC      0x181a\n#endif\n\n#define TT_MS_LANGID_SLOVAK_SLOVAKIA                   0x041b\n#define TT_MS_LANGID_ALBANIAN_ALBANIA                  0x041c\n#define TT_MS_LANGID_SWEDISH_SWEDEN                    0x041d\n#define TT_MS_LANGID_SWEDISH_FINLAND                   0x081d\n#define TT_MS_LANGID_THAI_THAILAND                     0x041e\n#define TT_MS_LANGID_TURKISH_TURKEY                    0x041f\n#define TT_MS_LANGID_URDU_PAKISTAN                     0x0420\n#define TT_MS_LANGID_URDU_INDIA                        0x0820\n#define TT_MS_LANGID_INDONESIAN_INDONESIA              0x0421\n#define TT_MS_LANGID_UKRAINIAN_UKRAINE                 0x0422\n#define TT_MS_LANGID_BELARUSIAN_BELARUS                0x0423\n#define TT_MS_LANGID_SLOVENE_SLOVENIA                  0x0424\n#define TT_MS_LANGID_ESTONIAN_ESTONIA                  0x0425\n#define TT_MS_LANGID_LATVIAN_LATVIA                    0x0426\n#define TT_MS_LANGID_LITHUANIAN_LITHUANIA              0x0427\n#define TT_MS_LANGID_CLASSIC_LITHUANIAN_LITHUANIA      0x0827\n#define TT_MS_LANGID_TAJIK_TAJIKISTAN                  0x0428\n#define TT_MS_LANGID_FARSI_IRAN                        0x0429\n#define TT_MS_LANGID_VIETNAMESE_VIET_NAM               0x042a\n#define TT_MS_LANGID_ARMENIAN_ARMENIA                  0x042b\n#define TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN            0x042c\n#define TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC         0x082c\n#define TT_MS_LANGID_BASQUE_SPAIN                      0x042d\n#define TT_MS_LANGID_SORBIAN_GERMANY                   0x042e\n#define TT_MS_LANGID_MACEDONIAN_MACEDONIA              0x042f\n#define TT_MS_LANGID_SUTU_SOUTH_AFRICA                 0x0430\n#define TT_MS_LANGID_TSONGA_SOUTH_AFRICA               0x0431\n#define TT_MS_LANGID_TSWANA_SOUTH_AFRICA               0x0432\n#define TT_MS_LANGID_VENDA_SOUTH_AFRICA                0x0433\n#define TT_MS_LANGID_XHOSA_SOUTH_AFRICA                0x0434\n#define TT_MS_LANGID_ZULU_SOUTH_AFRICA                 0x0435\n#define TT_MS_LANGID_AFRIKAANS_SOUTH_AFRICA            0x0436\n#define TT_MS_LANGID_GEORGIAN_GEORGIA                  0x0437\n#define TT_MS_LANGID_FAEROESE_FAEROE_ISLANDS           0x0438\n#define TT_MS_LANGID_HINDI_INDIA                       0x0439\n#define TT_MS_LANGID_MALTESE_MALTA                     0x043a\n  /* Added by XPsp2 Platform SDK (2004-07-26) */\n#define TT_MS_LANGID_SAMI_NORTHERN_NORWAY              0x043b\n#define TT_MS_LANGID_SAMI_NORTHERN_SWEDEN              0x083b\n#define TT_MS_LANGID_SAMI_NORTHERN_FINLAND             0x0C3b\n#define TT_MS_LANGID_SAMI_LULE_NORWAY                  0x103b\n#define TT_MS_LANGID_SAMI_LULE_SWEDEN                  0x143b\n#define TT_MS_LANGID_SAMI_SOUTHERN_NORWAY              0x183b\n#define TT_MS_LANGID_SAMI_SOUTHERN_SWEDEN              0x1C3b\n#define TT_MS_LANGID_SAMI_SKOLT_FINLAND                0x203b\n#define TT_MS_LANGID_SAMI_INARI_FINLAND                0x243b\n  /* ... and we also keep our old identifier... */\n#define TT_MS_LANGID_SAAMI_LAPONIA                     0x043b\n\n#if 0 /* this seems to be a previous inversion */\n#define TT_MS_LANGID_IRISH_GAELIC_IRELAND              0x043c\n#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM    0x083c\n#else\n#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM    0x083c\n#define TT_MS_LANGID_IRISH_GAELIC_IRELAND              0x043c\n#endif\n\n#define TT_MS_LANGID_YIDDISH_GERMANY                   0x043d\n#define TT_MS_LANGID_MALAY_MALAYSIA                    0x043e\n#define TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM           0x083e\n#define TT_MS_LANGID_KAZAK_KAZAKSTAN                   0x043f\n#define TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN /* Cyrillic*/ 0x0440\n  /* alias declared in Windows 2000 */\n#define TT_MS_LANGID_KIRGHIZ_KIRGHIZ_REPUBLIC \\\n          TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN\n\n#define TT_MS_LANGID_SWAHILI_KENYA                     0x0441\n#define TT_MS_LANGID_TURKMEN_TURKMENISTAN              0x0442\n#define TT_MS_LANGID_UZBEK_UZBEKISTAN_LATIN            0x0443\n#define TT_MS_LANGID_UZBEK_UZBEKISTAN_CYRILLIC         0x0843\n#define TT_MS_LANGID_TATAR_TATARSTAN                   0x0444\n#define TT_MS_LANGID_BENGALI_INDIA                     0x0445\n#define TT_MS_LANGID_BENGALI_BANGLADESH                0x0845\n#define TT_MS_LANGID_PUNJABI_INDIA                     0x0446\n#define TT_MS_LANGID_PUNJABI_ARABIC_PAKISTAN           0x0846\n#define TT_MS_LANGID_GUJARATI_INDIA                    0x0447\n#define TT_MS_LANGID_ORIYA_INDIA                       0x0448\n#define TT_MS_LANGID_TAMIL_INDIA                       0x0449\n#define TT_MS_LANGID_TELUGU_INDIA                      0x044a\n#define TT_MS_LANGID_KANNADA_INDIA                     0x044b\n#define TT_MS_LANGID_MALAYALAM_INDIA                   0x044c\n#define TT_MS_LANGID_ASSAMESE_INDIA                    0x044d\n#define TT_MS_LANGID_MARATHI_INDIA                     0x044e\n#define TT_MS_LANGID_SANSKRIT_INDIA                    0x044f\n#define TT_MS_LANGID_MONGOLIAN_MONGOLIA /* Cyrillic */ 0x0450\n#define TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN      0x0850\n#define TT_MS_LANGID_TIBETAN_CHINA                     0x0451\n  /* Don't use the next constant!  It has            */\n  /*   (1) the wrong spelling (Dzonghka)             */\n  /*   (2) Microsoft doesn't officially define it -- */\n  /*       at least it is not in the List of Local   */\n  /*       ID Values.                                */\n  /*   (3) Dzongkha is not the same language as      */\n  /*       Tibetan, so merging it is wrong anyway.   */\n  /*                                                 */\n  /* TT_MS_LANGID_TIBETAN_BHUTAN is correct, BTW.    */\n#define TT_MS_LANGID_DZONGHKA_BHUTAN                   0x0851\n\n#if 0\n  /* the following used to be defined */\n#define TT_MS_LANGID_TIBETAN_BHUTAN                    0x0451\n  /* ... but it was changed; */\n#else\n  /* So we will continue to #define it, but with the correct value */\n#define TT_MS_LANGID_TIBETAN_BHUTAN   TT_MS_LANGID_DZONGHKA_BHUTAN\n#endif\n\n#define TT_MS_LANGID_WELSH_WALES                       0x0452\n#define TT_MS_LANGID_KHMER_CAMBODIA                    0x0453\n#define TT_MS_LANGID_LAO_LAOS                          0x0454\n#define TT_MS_LANGID_BURMESE_MYANMAR                   0x0455\n#define TT_MS_LANGID_GALICIAN_SPAIN                    0x0456\n#define TT_MS_LANGID_KONKANI_INDIA                     0x0457\n#define TT_MS_LANGID_MANIPURI_INDIA  /* Bengali */     0x0458\n#define TT_MS_LANGID_SINDHI_INDIA /* Arabic */         0x0459\n#define TT_MS_LANGID_SINDHI_PAKISTAN                   0x0859\n  /* Missing a LCID for Sindhi in Devanagari script */\n#define TT_MS_LANGID_SYRIAC_SYRIA                      0x045a\n#define TT_MS_LANGID_SINHALESE_SRI_LANKA               0x045b\n#define TT_MS_LANGID_CHEROKEE_UNITED_STATES            0x045c\n#define TT_MS_LANGID_INUKTITUT_CANADA                  0x045d\n#define TT_MS_LANGID_AMHARIC_ETHIOPIA                  0x045e\n#define TT_MS_LANGID_TAMAZIGHT_MOROCCO /* Arabic */    0x045f\n#define TT_MS_LANGID_TAMAZIGHT_MOROCCO_LATIN           0x085f\n  /* Missing a LCID for Tifinagh script */\n#define TT_MS_LANGID_KASHMIRI_PAKISTAN /* Arabic */    0x0460\n  /* Spelled this way by XPsp2 Platform SDK (2004-07-26) */\n  /* script is yet unclear... might be Arabic, Nagari or Sharada */\n#define TT_MS_LANGID_KASHMIRI_SASIA                    0x0860\n  /* ... and aliased (by MS) for compatibility reasons. */\n#define TT_MS_LANGID_KASHMIRI_INDIA TT_MS_LANGID_KASHMIRI_SASIA\n#define TT_MS_LANGID_NEPALI_NEPAL                      0x0461\n#define TT_MS_LANGID_NEPALI_INDIA                      0x0861\n#define TT_MS_LANGID_FRISIAN_NETHERLANDS               0x0462\n#define TT_MS_LANGID_PASHTO_AFGHANISTAN                0x0463\n#define TT_MS_LANGID_FILIPINO_PHILIPPINES              0x0464\n#define TT_MS_LANGID_DHIVEHI_MALDIVES                  0x0465\n  /* alias declared in Windows 2000 */\n#define TT_MS_LANGID_DIVEHI_MALDIVES  TT_MS_LANGID_DHIVEHI_MALDIVES\n#define TT_MS_LANGID_EDO_NIGERIA                       0x0466\n#define TT_MS_LANGID_FULFULDE_NIGERIA                  0x0467\n#define TT_MS_LANGID_HAUSA_NIGERIA                     0x0468\n#define TT_MS_LANGID_IBIBIO_NIGERIA                    0x0469\n#define TT_MS_LANGID_YORUBA_NIGERIA                    0x046a\n#define TT_MS_LANGID_QUECHUA_BOLIVIA                   0x046b\n#define TT_MS_LANGID_QUECHUA_ECUADOR                   0x086b\n#define TT_MS_LANGID_QUECHUA_PERU                      0x0c6b\n#define TT_MS_LANGID_SEPEDI_SOUTH_AFRICA               0x046c\n  /* Also spelled by XPsp2 Platform SDK (2004-07-26) */\n#define TT_MS_LANGID_SOTHO_SOUTHERN_SOUTH_AFRICA \\\n          TT_MS_LANGID_SEPEDI_SOUTH_AFRICA\n  /* language codes 0x046d, 0x046e and 0x046f are (still) unknown. */\n#define TT_MS_LANGID_IGBO_NIGERIA                      0x0470\n#define TT_MS_LANGID_KANURI_NIGERIA                    0x0471\n#define TT_MS_LANGID_OROMO_ETHIOPIA                    0x0472\n#define TT_MS_LANGID_TIGRIGNA_ETHIOPIA                 0x0473\n#define TT_MS_LANGID_TIGRIGNA_ERYTHREA                 0x0873\n  /* also spelled in the `Passport SDK' list as: */\n#define TT_MS_LANGID_TIGRIGNA_ERYTREA  TT_MS_LANGID_TIGRIGNA_ERYTHREA\n#define TT_MS_LANGID_GUARANI_PARAGUAY                  0x0474\n#define TT_MS_LANGID_HAWAIIAN_UNITED_STATES            0x0475\n#define TT_MS_LANGID_LATIN                             0x0476\n#define TT_MS_LANGID_SOMALI_SOMALIA                    0x0477\n  /* Note: Yi does not have a (proper) ISO 639-2 code, since it is mostly */\n  /*       not written (but OTOH the peculiar writing system is worth     */\n  /*       studying).                                                     */\n#define TT_MS_LANGID_YI_CHINA                          0x0478\n#define TT_MS_LANGID_PAPIAMENTU_NETHERLANDS_ANTILLES   0x0479\n  /* language codes from 0x047a to 0x047f are (still) unknown. */\n#define TT_MS_LANGID_UIGHUR_CHINA                      0x0480\n#define TT_MS_LANGID_MAORI_NEW_ZEALAND                 0x0481\n\n#if 0  /* not deemed useful for fonts */\n#define TT_MS_LANGID_HUMAN_INTERFACE_DEVICE            0x04ff\n#endif\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Possible values of the `name' identifier field in the name records of */\n  /* the TTF `name' table.  These values are platform independent.         */\n  /*                                                                       */\n#define TT_NAME_ID_COPYRIGHT            0\n#define TT_NAME_ID_FONT_FAMILY          1\n#define TT_NAME_ID_FONT_SUBFAMILY       2\n#define TT_NAME_ID_UNIQUE_ID            3\n#define TT_NAME_ID_FULL_NAME            4\n#define TT_NAME_ID_VERSION_STRING       5\n#define TT_NAME_ID_PS_NAME              6\n#define TT_NAME_ID_TRADEMARK            7\n\n  /* the following values are from the OpenType spec */\n#define TT_NAME_ID_MANUFACTURER         8\n#define TT_NAME_ID_DESIGNER             9\n#define TT_NAME_ID_DESCRIPTION          10\n#define TT_NAME_ID_VENDOR_URL           11\n#define TT_NAME_ID_DESIGNER_URL         12\n#define TT_NAME_ID_LICENSE              13\n#define TT_NAME_ID_LICENSE_URL          14\n  /* number 15 is reserved */\n#define TT_NAME_ID_PREFERRED_FAMILY     16\n#define TT_NAME_ID_PREFERRED_SUBFAMILY  17\n#define TT_NAME_ID_MAC_FULL_NAME        18\n\n  /* The following code is new as of 2000-01-21 */\n#define TT_NAME_ID_SAMPLE_TEXT          19\n\n  /* This is new in OpenType 1.3 */\n#define TT_NAME_ID_CID_FINDFONT_NAME    20\n\n  /* This is new in OpenType 1.5 */\n#define TT_NAME_ID_WWS_FAMILY           21\n#define TT_NAME_ID_WWS_SUBFAMILY        22\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Bit mask values for the Unicode Ranges from the TTF `OS2 ' table.     */\n  /*                                                                       */\n  /* Updated 08-Nov-2008.                                                  */\n  /*                                                                       */\n\n  /* Bit  0   Basic Latin */\n#define TT_UCR_BASIC_LATIN                     (1L <<  0) /* U+0020-U+007E */\n  /* Bit  1   C1 Controls and Latin-1 Supplement */\n#define TT_UCR_LATIN1_SUPPLEMENT               (1L <<  1) /* U+0080-U+00FF */\n  /* Bit  2   Latin Extended-A */\n#define TT_UCR_LATIN_EXTENDED_A                (1L <<  2) /* U+0100-U+017F */\n  /* Bit  3   Latin Extended-B */\n#define TT_UCR_LATIN_EXTENDED_B                (1L <<  3) /* U+0180-U+024F */\n  /* Bit  4   IPA Extensions                 */\n  /*          Phonetic Extensions            */\n  /*          Phonetic Extensions Supplement */\n#define TT_UCR_IPA_EXTENSIONS                  (1L <<  4) /* U+0250-U+02AF */\n                                                          /* U+1D00-U+1D7F */\n                                                          /* U+1D80-U+1DBF */\n  /* Bit  5   Spacing Modifier Letters */\n  /*          Modifier Tone Letters    */\n#define TT_UCR_SPACING_MODIFIER                (1L <<  5) /* U+02B0-U+02FF */\n                                                          /* U+A700-U+A71F */\n  /* Bit  6   Combining Diacritical Marks            */\n  /*          Combining Diacritical Marks Supplement */\n#define TT_UCR_COMBINING_DIACRITICS            (1L <<  6) /* U+0300-U+036F */\n                                                          /* U+1DC0-U+1DFF */\n  /* Bit  7   Greek and Coptic */\n#define TT_UCR_GREEK                           (1L <<  7) /* U+0370-U+03FF */\n  /* Bit  8   Coptic */\n#define TT_UCR_COPTIC                          (1L <<  8) /* U+2C80-U+2CFF */\n  /* Bit  9   Cyrillic            */\n  /*          Cyrillic Supplement */\n  /*          Cyrillic Extended-A */\n  /*          Cyrillic Extended-B */\n#define TT_UCR_CYRILLIC                        (1L <<  9) /* U+0400-U+04FF */\n                                                          /* U+0500-U+052F */\n                                                          /* U+2DE0-U+2DFF */\n                                                          /* U+A640-U+A69F */\n  /* Bit 10   Armenian */\n#define TT_UCR_ARMENIAN                        (1L << 10) /* U+0530-U+058F */\n  /* Bit 11   Hebrew */\n#define TT_UCR_HEBREW                          (1L << 11) /* U+0590-U+05FF */\n  /* Bit 12   Vai */\n#define TT_UCR_VAI                             (1L << 12) /* U+A500-U+A63F */\n  /* Bit 13   Arabic            */\n  /*          Arabic Supplement */\n#define TT_UCR_ARABIC                          (1L << 13) /* U+0600-U+06FF */\n                                                          /* U+0750-U+077F */\n  /* Bit 14   NKo */\n#define TT_UCR_NKO                             (1L << 14) /* U+07C0-U+07FF */\n  /* Bit 15   Devanagari */\n#define TT_UCR_DEVANAGARI                      (1L << 15) /* U+0900-U+097F */\n  /* Bit 16   Bengali */\n#define TT_UCR_BENGALI                         (1L << 16) /* U+0980-U+09FF */\n  /* Bit 17   Gurmukhi */\n#define TT_UCR_GURMUKHI                        (1L << 17) /* U+0A00-U+0A7F */\n  /* Bit 18   Gujarati */\n#define TT_UCR_GUJARATI                        (1L << 18) /* U+0A80-U+0AFF */\n  /* Bit 19   Oriya */\n#define TT_UCR_ORIYA                           (1L << 19) /* U+0B00-U+0B7F */\n  /* Bit 20   Tamil */\n#define TT_UCR_TAMIL                           (1L << 20) /* U+0B80-U+0BFF */\n  /* Bit 21   Telugu */\n#define TT_UCR_TELUGU                          (1L << 21) /* U+0C00-U+0C7F */\n  /* Bit 22   Kannada */\n#define TT_UCR_KANNADA                         (1L << 22) /* U+0C80-U+0CFF */\n  /* Bit 23   Malayalam */\n#define TT_UCR_MALAYALAM                       (1L << 23) /* U+0D00-U+0D7F */\n  /* Bit 24   Thai */\n#define TT_UCR_THAI                            (1L << 24) /* U+0E00-U+0E7F */\n  /* Bit 25   Lao */\n#define TT_UCR_LAO                             (1L << 25) /* U+0E80-U+0EFF */\n  /* Bit 26   Georgian            */\n  /*          Georgian Supplement */\n#define TT_UCR_GEORGIAN                        (1L << 26) /* U+10A0-U+10FF */\n                                                          /* U+2D00-U+2D2F */\n  /* Bit 27   Balinese */\n#define TT_UCR_BALINESE                        (1L << 27) /* U+1B00-U+1B7F */\n  /* Bit 28   Hangul Jamo */\n#define TT_UCR_HANGUL_JAMO                     (1L << 28) /* U+1100-U+11FF */\n  /* Bit 29   Latin Extended Additional */\n  /*          Latin Extended-C          */\n  /*          Latin Extended-D          */\n#define TT_UCR_LATIN_EXTENDED_ADDITIONAL       (1L << 29) /* U+1E00-U+1EFF */\n                                                          /* U+2C60-U+2C7F */\n                                                          /* U+A720-U+A7FF */\n  /* Bit 30   Greek Extended */\n#define TT_UCR_GREEK_EXTENDED                  (1L << 30) /* U+1F00-U+1FFF */\n  /* Bit 31   General Punctuation      */\n  /*          Supplemental Punctuation */\n#define TT_UCR_GENERAL_PUNCTUATION             (1L << 31) /* U+2000-U+206F */\n                                                          /* U+2E00-U+2E7F */\n  /* Bit 32   Superscripts And Subscripts */\n#define TT_UCR_SUPERSCRIPTS_SUBSCRIPTS         (1L <<  0) /* U+2070-U+209F */\n  /* Bit 33   Currency Symbols */\n#define TT_UCR_CURRENCY_SYMBOLS                (1L <<  1) /* U+20A0-U+20CF */\n  /* Bit 34   Combining Diacritical Marks For Symbols */\n#define TT_UCR_COMBINING_DIACRITICS_SYMB       (1L <<  2) /* U+20D0-U+20FF */\n  /* Bit 35   Letterlike Symbols */\n#define TT_UCR_LETTERLIKE_SYMBOLS              (1L <<  3) /* U+2100-U+214F */\n  /* Bit 36   Number Forms */\n#define TT_UCR_NUMBER_FORMS                    (1L <<  4) /* U+2150-U+218F */\n  /* Bit 37   Arrows                           */\n  /*          Supplemental Arrows-A            */\n  /*          Supplemental Arrows-B            */\n  /*          Miscellaneous Symbols and Arrows */\n#define TT_UCR_ARROWS                          (1L <<  5) /* U+2190-U+21FF */\n                                                          /* U+27F0-U+27FF */\n                                                          /* U+2900-U+297F */\n                                                          /* U+2B00-U+2BFF */\n  /* Bit 38   Mathematical Operators               */\n  /*          Supplemental Mathematical Operators  */\n  /*          Miscellaneous Mathematical Symbols-A */\n  /*          Miscellaneous Mathematical Symbols-B */\n#define TT_UCR_MATHEMATICAL_OPERATORS          (1L <<  6) /* U+2200-U+22FF */\n                                                          /* U+2A00-U+2AFF */\n                                                          /* U+27C0-U+27EF */\n                                                          /* U+2980-U+29FF */\n  /* Bit 39 Miscellaneous Technical */\n#define TT_UCR_MISCELLANEOUS_TECHNICAL         (1L <<  7) /* U+2300-U+23FF */\n  /* Bit 40   Control Pictures */\n#define TT_UCR_CONTROL_PICTURES                (1L <<  8) /* U+2400-U+243F */\n  /* Bit 41   Optical Character Recognition */\n#define TT_UCR_OCR                             (1L <<  9) /* U+2440-U+245F */\n  /* Bit 42   Enclosed Alphanumerics */\n#define TT_UCR_ENCLOSED_ALPHANUMERICS          (1L << 10) /* U+2460-U+24FF */\n  /* Bit 43   Box Drawing */\n#define TT_UCR_BOX_DRAWING                     (1L << 11) /* U+2500-U+257F */\n  /* Bit 44   Block Elements */\n#define TT_UCR_BLOCK_ELEMENTS                  (1L << 12) /* U+2580-U+259F */\n  /* Bit 45   Geometric Shapes */\n#define TT_UCR_GEOMETRIC_SHAPES                (1L << 13) /* U+25A0-U+25FF */\n  /* Bit 46   Miscellaneous Symbols */\n#define TT_UCR_MISCELLANEOUS_SYMBOLS           (1L << 14) /* U+2600-U+26FF */\n  /* Bit 47   Dingbats */\n#define TT_UCR_DINGBATS                        (1L << 15) /* U+2700-U+27BF */\n  /* Bit 48   CJK Symbols and Punctuation */\n#define TT_UCR_CJK_SYMBOLS                     (1L << 16) /* U+3000-U+303F */\n  /* Bit 49   Hiragana */\n#define TT_UCR_HIRAGANA                        (1L << 17) /* U+3040-U+309F */\n  /* Bit 50   Katakana                     */\n  /*          Katakana Phonetic Extensions */\n#define TT_UCR_KATAKANA                        (1L << 18) /* U+30A0-U+30FF */\n                                                          /* U+31F0-U+31FF */\n  /* Bit 51   Bopomofo          */\n  /*          Bopomofo Extended */\n#define TT_UCR_BOPOMOFO                        (1L << 19) /* U+3100-U+312F */\n                                                          /* U+31A0-U+31BF */\n  /* Bit 52   Hangul Compatibility Jamo */\n#define TT_UCR_HANGUL_COMPATIBILITY_JAMO       (1L << 20) /* U+3130-U+318F */\n  /* Bit 53   Phags-Pa */\n#define TT_UCR_CJK_MISC                        (1L << 21) /* U+A840-U+A87F */\n#define TT_UCR_KANBUN  TT_UCR_CJK_MISC /* deprecated */\n#define TT_UCR_PHAGSPA\n  /* Bit 54   Enclosed CJK Letters and Months */\n#define TT_UCR_ENCLOSED_CJK_LETTERS_MONTHS     (1L << 22) /* U+3200-U+32FF */\n  /* Bit 55   CJK Compatibility */\n#define TT_UCR_CJK_COMPATIBILITY               (1L << 23) /* U+3300-U+33FF */\n  /* Bit 56   Hangul Syllables */\n#define TT_UCR_HANGUL                          (1L << 24) /* U+AC00-U+D7A3 */\n  /* Bit 57   High Surrogates              */\n  /*          High Private Use Surrogates  */\n  /*          Low Surrogates               */\n  /*                                       */\n  /* According to OpenType specs v.1.3+,   */\n  /* setting bit 57 implies that there is  */\n  /* at least one codepoint beyond the     */\n  /* Basic Multilingual Plane that is      */\n  /* supported by this font.  So it really */\n  /* means >= U+10000                      */\n#define TT_UCR_SURROGATES                      (1L << 25) /* U+D800-U+DB7F */\n                                                          /* U+DB80-U+DBFF */\n                                                          /* U+DC00-U+DFFF */\n#define TT_UCR_NON_PLANE_0  TT_UCR_SURROGATES\n  /* Bit 58  Phoenician */\n#define TT_UCR_PHOENICIAN                      (1L << 26) /*U+10900-U+1091F*/\n  /* Bit 59   CJK Unified Ideographs             */\n  /*          CJK Radicals Supplement            */\n  /*          Kangxi Radicals                    */\n  /*          Ideographic Description Characters */\n  /*          CJK Unified Ideographs Extension A */\n  /*          CJK Unified Ideographs Extension B */\n  /*          Kanbun                             */\n#define TT_UCR_CJK_UNIFIED_IDEOGRAPHS          (1L << 27) /* U+4E00-U+9FFF */\n                                                          /* U+2E80-U+2EFF */\n                                                          /* U+2F00-U+2FDF */\n                                                          /* U+2FF0-U+2FFF */\n                                                          /* U+3400-U+4DB5 */\n                                                          /*U+20000-U+2A6DF*/\n                                                          /* U+3190-U+319F */\n  /* Bit 60   Private Use */\n#define TT_UCR_PRIVATE_USE                     (1L << 28) /* U+E000-U+F8FF */\n  /* Bit 61   CJK Strokes                             */\n  /*          CJK Compatibility Ideographs            */\n  /*          CJK Compatibility Ideographs Supplement */\n#define TT_UCR_CJK_COMPATIBILITY_IDEOGRAPHS    (1L << 29) /* U+31C0-U+31EF */\n                                                          /* U+F900-U+FAFF */\n                                                          /*U+2F800-U+2FA1F*/\n  /* Bit 62   Alphabetic Presentation Forms */\n#define TT_UCR_ALPHABETIC_PRESENTATION_FORMS   (1L << 30) /* U+FB00-U+FB4F */\n  /* Bit 63   Arabic Presentation Forms-A */\n#define TT_UCR_ARABIC_PRESENTATIONS_A          (1L << 31) /* U+FB50-U+FDFF */\n  /* Bit 64   Combining Half Marks */\n#define TT_UCR_COMBINING_HALF_MARKS            (1L <<  0) /* U+FE20-U+FE2F */\n  /* Bit 65   Vertical forms          */\n  /*          CJK Compatibility Forms */\n#define TT_UCR_CJK_COMPATIBILITY_FORMS         (1L <<  1) /* U+FE10-U+FE1F */\n                                                          /* U+FE30-U+FE4F */\n  /* Bit 66   Small Form Variants */\n#define TT_UCR_SMALL_FORM_VARIANTS             (1L <<  2) /* U+FE50-U+FE6F */\n  /* Bit 67   Arabic Presentation Forms-B */\n#define TT_UCR_ARABIC_PRESENTATIONS_B          (1L <<  3) /* U+FE70-U+FEFE */\n  /* Bit 68   Halfwidth and Fullwidth Forms */\n#define TT_UCR_HALFWIDTH_FULLWIDTH_FORMS       (1L <<  4) /* U+FF00-U+FFEF */\n  /* Bit 69   Specials */\n#define TT_UCR_SPECIALS                        (1L <<  5) /* U+FFF0-U+FFFD */\n  /* Bit 70   Tibetan */\n#define TT_UCR_TIBETAN                         (1L <<  6) /* U+0F00-U+0FFF */\n  /* Bit 71   Syriac */\n#define TT_UCR_SYRIAC                          (1L <<  7) /* U+0700-U+074F */\n  /* Bit 72   Thaana */\n#define TT_UCR_THAANA                          (1L <<  8) /* U+0780-U+07BF */\n  /* Bit 73   Sinhala */\n#define TT_UCR_SINHALA                         (1L <<  9) /* U+0D80-U+0DFF */\n  /* Bit 74   Myanmar */\n#define TT_UCR_MYANMAR                         (1L << 10) /* U+1000-U+109F */\n  /* Bit 75   Ethiopic            */\n  /*          Ethiopic Supplement */\n  /*          Ethiopic Extended   */\n#define TT_UCR_ETHIOPIC                        (1L << 11) /* U+1200-U+137F */\n                                                          /* U+1380-U+139F */\n                                                          /* U+2D80-U+2DDF */\n  /* Bit 76   Cherokee */\n#define TT_UCR_CHEROKEE                        (1L << 12) /* U+13A0-U+13FF */\n  /* Bit 77   Unified Canadian Aboriginal Syllabics */\n#define TT_UCR_CANADIAN_ABORIGINAL_SYLLABICS   (1L << 13) /* U+1400-U+167F */\n  /* Bit 78   Ogham */\n#define TT_UCR_OGHAM                           (1L << 14) /* U+1680-U+169F */\n  /* Bit 79   Runic */\n#define TT_UCR_RUNIC                           (1L << 15) /* U+16A0-U+16FF */\n  /* Bit 80   Khmer         */\n  /*          Khmer Symbols */\n#define TT_UCR_KHMER                           (1L << 16) /* U+1780-U+17FF */\n                                                          /* U+19E0-U+19FF */\n  /* Bit 81   Mongolian */\n#define TT_UCR_MONGOLIAN                       (1L << 17) /* U+1800-U+18AF */\n  /* Bit 82   Braille Patterns */\n#define TT_UCR_BRAILLE                         (1L << 18) /* U+2800-U+28FF */\n  /* Bit 83   Yi Syllables */\n  /*          Yi Radicals  */\n#define TT_UCR_YI                              (1L << 19) /* U+A000-U+A48F */\n                                                          /* U+A490-U+A4CF */\n  /* Bit 84   Tagalog  */\n  /*          Hanunoo  */\n  /*          Buhid    */\n  /*          Tagbanwa */\n#define TT_UCR_PHILIPPINE                      (1L << 20) /* U+1700-U+171F */\n                                                          /* U+1720-U+173F */\n                                                          /* U+1740-U+175F */\n                                                          /* U+1760-U+177F */\n  /* Bit 85   Old Italic */\n#define TT_UCR_OLD_ITALIC                      (1L << 21) /*U+10300-U+1032F*/\n  /* Bit 86   Gothic */\n#define TT_UCR_GOTHIC                          (1L << 22) /*U+10330-U+1034F*/\n  /* Bit 87   Deseret */\n#define TT_UCR_DESERET                         (1L << 23) /*U+10400-U+1044F*/\n  /* Bit 88   Byzantine Musical Symbols      */\n  /*          Musical Symbols                */\n  /*          Ancient Greek Musical Notation */\n#define TT_UCR_MUSICAL_SYMBOLS                 (1L << 24) /*U+1D000-U+1D0FF*/\n                                                          /*U+1D100-U+1D1FF*/\n                                                          /*U+1D200-U+1D24F*/\n  /* Bit 89   Mathematical Alphanumeric Symbols */\n#define TT_UCR_MATH_ALPHANUMERIC_SYMBOLS       (1L << 25) /*U+1D400-U+1D7FF*/\n  /* Bit 90   Private Use (plane 15) */\n  /*          Private Use (plane 16) */\n#define TT_UCR_PRIVATE_USE_SUPPLEMENTARY       (1L << 26) /*U+F0000-U+FFFFD*/\n                                                        /*U+100000-U+10FFFD*/\n  /* Bit 91   Variation Selectors            */\n  /*          Variation Selectors Supplement */\n#define TT_UCR_VARIATION_SELECTORS             (1L << 27) /* U+FE00-U+FE0F */\n                                                          /*U+E0100-U+E01EF*/\n  /* Bit 92   Tags */\n#define TT_UCR_TAGS                            (1L << 28) /*U+E0000-U+E007F*/\n  /* Bit 93   Limbu */\n#define TT_UCR_LIMBU                           (1L << 29) /* U+1900-U+194F */\n  /* Bit 94   Tai Le */\n#define TT_UCR_TAI_LE                          (1L << 30) /* U+1950-U+197F */\n  /* Bit 95   New Tai Lue */\n#define TT_UCR_NEW_TAI_LUE                     (1L << 31) /* U+1980-U+19DF */\n  /* Bit 96   Buginese */\n#define TT_UCR_BUGINESE                        (1L <<  0) /* U+1A00-U+1A1F */\n  /* Bit 97   Glagolitic */\n#define TT_UCR_GLAGOLITIC                      (1L <<  1) /* U+2C00-U+2C5F */\n  /* Bit 98   Tifinagh */\n#define TT_UCR_TIFINAGH                        (1L <<  2) /* U+2D30-U+2D7F */\n  /* Bit 99   Yijing Hexagram Symbols */\n#define TT_UCR_YIJING                          (1L <<  3) /* U+4DC0-U+4DFF */\n  /* Bit 100  Syloti Nagri */\n#define TT_UCR_SYLOTI_NAGRI                    (1L <<  4) /* U+A800-U+A82F */\n  /* Bit 101  Linear B Syllabary */\n  /*          Linear B Ideograms */\n  /*          Aegean Numbers     */\n#define TT_UCR_LINEAR_B                        (1L <<  5) /*U+10000-U+1007F*/\n                                                          /*U+10080-U+100FF*/\n                                                          /*U+10100-U+1013F*/\n  /* Bit 102  Ancient Greek Numbers */\n#define TT_UCR_ANCIENT_GREEK_NUMBERS           (1L <<  6) /*U+10140-U+1018F*/\n  /* Bit 103  Ugaritic */\n#define TT_UCR_UGARITIC                        (1L <<  7) /*U+10380-U+1039F*/\n  /* Bit 104  Old Persian */\n#define TT_UCR_OLD_PERSIAN                     (1L <<  8) /*U+103A0-U+103DF*/\n  /* Bit 105  Shavian */\n#define TT_UCR_SHAVIAN                         (1L <<  9) /*U+10450-U+1047F*/\n  /* Bit 106  Osmanya */\n#define TT_UCR_OSMANYA                         (1L << 10) /*U+10480-U+104AF*/\n  /* Bit 107  Cypriot Syllabary */\n#define TT_UCR_CYPRIOT_SYLLABARY               (1L << 11) /*U+10800-U+1083F*/\n  /* Bit 108  Kharoshthi */\n#define TT_UCR_KHAROSHTHI                      (1L << 12) /*U+10A00-U+10A5F*/\n  /* Bit 109  Tai Xuan Jing Symbols */\n#define TT_UCR_TAI_XUAN_JING                   (1L << 13) /*U+1D300-U+1D35F*/\n  /* Bit 110  Cuneiform                         */\n  /*          Cuneiform Numbers and Punctuation */\n#define TT_UCR_CUNEIFORM                       (1L << 14) /*U+12000-U+123FF*/\n                                                          /*U+12400-U+1247F*/\n  /* Bit 111  Counting Rod Numerals */\n#define TT_UCR_COUNTING_ROD_NUMERALS           (1L << 15) /*U+1D360-U+1D37F*/\n  /* Bit 112  Sundanese */\n#define TT_UCR_SUNDANESE                       (1L << 16) /* U+1B80-U+1BBF */\n  /* Bit 113  Lepcha */\n#define TT_UCR_LEPCHA                          (1L << 17) /* U+1C00-U+1C4F */\n  /* Bit 114  Ol Chiki */\n#define TT_UCR_OL_CHIKI                        (1L << 18) /* U+1C50-U+1C7F */\n  /* Bit 115  Saurashtra */\n#define TT_UCR_SAURASHTRA                      (1L << 19) /* U+A880-U+A8DF */\n  /* Bit 116  Kayah Li */\n#define TT_UCR_KAYAH_LI                        (1L << 20) /* U+A900-U+A92F */\n  /* Bit 117  Rejang */\n#define TT_UCR_REJANG                          (1L << 21) /* U+A930-U+A95F */\n  /* Bit 118  Cham */\n#define TT_UCR_CHAM                            (1L << 22) /* U+AA00-U+AA5F */\n  /* Bit 119  Ancient Symbols */\n#define TT_UCR_ANCIENT_SYMBOLS                 (1L << 23) /*U+10190-U+101CF*/\n  /* Bit 120  Phaistos Disc */\n#define TT_UCR_PHAISTOS_DISC                   (1L << 24) /*U+101D0-U+101FF*/\n  /* Bit 121  Carian */\n  /*          Lycian */\n  /*          Lydian */\n#define TT_UCR_OLD_ANATOLIAN                   (1L << 25) /*U+102A0-U+102DF*/\n                                                          /*U+10280-U+1029F*/\n                                                          /*U+10920-U+1093F*/\n  /* Bit 122  Domino Tiles  */\n  /*          Mahjong Tiles */\n#define TT_UCR_GAME_TILES                      (1L << 26) /*U+1F030-U+1F09F*/\n                                                          /*U+1F000-U+1F02F*/\n  /* Bit 123-127 Reserved for process-internal usage */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Some compilers have a very limited length of identifiers.             */\n  /*                                                                       */\n#if defined( __TURBOC__ ) && __TURBOC__ < 0x0410 || defined( __PACIFIC__ )\n#define HAVE_LIMIT_ON_IDENTS\n#endif\n\n\n#ifndef HAVE_LIMIT_ON_IDENTS\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* Here some alias #defines in order to be clearer.                      */\n  /*                                                                       */\n  /* These are not always #defined to stay within the 31~character limit   */\n  /* which some compilers have.                                            */\n  /*                                                                       */\n  /* Credits go to Dave Hoo <dhoo@flash.net> for pointing out that modern  */\n  /* Borland compilers (read: from BC++ 3.1 on) can increase this limit.   */\n  /* If you get a warning with such a compiler, use the -i40 switch.       */\n  /*                                                                       */\n#define TT_UCR_ARABIC_PRESENTATION_FORMS_A      \\\n         TT_UCR_ARABIC_PRESENTATIONS_A\n#define TT_UCR_ARABIC_PRESENTATION_FORMS_B      \\\n         TT_UCR_ARABIC_PRESENTATIONS_B\n\n#define TT_UCR_COMBINING_DIACRITICAL_MARKS      \\\n         TT_UCR_COMBINING_DIACRITICS\n#define TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB \\\n         TT_UCR_COMBINING_DIACRITICS_SYMB\n\n\n#endif /* !HAVE_LIMIT_ON_IDENTS */\n\n\nFT_END_HEADER\n\n#endif /* __TTNAMEID_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/tttables.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  tttables.h                                                             */\n/*                                                                         */\n/*    Basic SFNT/TrueType tables definitions and interface                 */\n/*    (specification only).                                                */\n/*                                                                         */\n/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2008, 2009 by             */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __TTTABLES_H__\n#define __TTTABLES_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Section>                                                             */\n  /*    truetype_tables                                                    */\n  /*                                                                       */\n  /* <Title>                                                               */\n  /*    TrueType Tables                                                    */\n  /*                                                                       */\n  /* <Abstract>                                                            */\n  /*    TrueType specific table types and functions.                       */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    This section contains the definition of TrueType-specific tables   */\n  /*    as well as some routines used to access and process them.          */\n  /*                                                                       */\n  /*************************************************************************/\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_Header                                                          */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to model a TrueType font header table.  All       */\n  /*    fields follow the TrueType specification.                          */\n  /*                                                                       */\n  typedef struct  TT_Header_\n  {\n    FT_Fixed   Table_Version;\n    FT_Fixed   Font_Revision;\n\n    FT_Long    CheckSum_Adjust;\n    FT_Long    Magic_Number;\n\n    FT_UShort  Flags;\n    FT_UShort  Units_Per_EM;\n\n    FT_Long    Created [2];\n    FT_Long    Modified[2];\n\n    FT_Short   xMin;\n    FT_Short   yMin;\n    FT_Short   xMax;\n    FT_Short   yMax;\n\n    FT_UShort  Mac_Style;\n    FT_UShort  Lowest_Rec_PPEM;\n\n    FT_Short   Font_Direction;\n    FT_Short   Index_To_Loc_Format;\n    FT_Short   Glyph_Data_Format;\n\n  } TT_Header;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_HoriHeader                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to model a TrueType horizontal header, the `hhea' */\n  /*    table, as well as the corresponding horizontal metrics table,      */\n  /*    i.e., the `hmtx' table.                                            */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    Version                :: The table version.                       */\n  /*                                                                       */\n  /*    Ascender               :: The font's ascender, i.e., the distance  */\n  /*                              from the baseline to the top-most of all */\n  /*                              glyph points found in the font.          */\n  /*                                                                       */\n  /*                              This value is invalid in many fonts, as  */\n  /*                              it is usually set by the font designer,  */\n  /*                              and often reflects only a portion of the */\n  /*                              glyphs found in the font (maybe ASCII).  */\n  /*                                                                       */\n  /*                              You should use the `sTypoAscender' field */\n  /*                              of the OS/2 table instead if you want    */\n  /*                              the correct one.                         */\n  /*                                                                       */\n  /*    Descender              :: The font's descender, i.e., the distance */\n  /*                              from the baseline to the bottom-most of  */\n  /*                              all glyph points found in the font.  It  */\n  /*                              is negative.                             */\n  /*                                                                       */\n  /*                              This value is invalid in many fonts, as  */\n  /*                              it is usually set by the font designer,  */\n  /*                              and often reflects only a portion of the */\n  /*                              glyphs found in the font (maybe ASCII).  */\n  /*                                                                       */\n  /*                              You should use the `sTypoDescender'      */\n  /*                              field of the OS/2 table instead if you   */\n  /*                              want the correct one.                    */\n  /*                                                                       */\n  /*    Line_Gap               :: The font's line gap, i.e., the distance  */\n  /*                              to add to the ascender and descender to  */\n  /*                              get the BTB, i.e., the                   */\n  /*                              baseline-to-baseline distance for the    */\n  /*                              font.                                    */\n  /*                                                                       */\n  /*    advance_Width_Max      :: This field is the maximum of all advance */\n  /*                              widths found in the font.  It can be     */\n  /*                              used to compute the maximum width of an  */\n  /*                              arbitrary string of text.                */\n  /*                                                                       */\n  /*    min_Left_Side_Bearing  :: The minimum left side bearing of all     */\n  /*                              glyphs within the font.                  */\n  /*                                                                       */\n  /*    min_Right_Side_Bearing :: The minimum right side bearing of all    */\n  /*                              glyphs within the font.                  */\n  /*                                                                       */\n  /*    xMax_Extent            :: The maximum horizontal extent (i.e., the */\n  /*                              `width' of a glyph's bounding box) for   */\n  /*                              all glyphs in the font.                  */\n  /*                                                                       */\n  /*    caret_Slope_Rise       :: The rise coefficient of the cursor's     */\n  /*                              slope of the cursor (slope=rise/run).    */\n  /*                                                                       */\n  /*    caret_Slope_Run        :: The run coefficient of the cursor's      */\n  /*                              slope.                                   */\n  /*                                                                       */\n  /*    Reserved               :: 8~reserved bytes.                        */\n  /*                                                                       */\n  /*    metric_Data_Format     :: Always~0.                                */\n  /*                                                                       */\n  /*    number_Of_HMetrics     :: Number of HMetrics entries in the `hmtx' */\n  /*                              table -- this value can be smaller than  */\n  /*                              the total number of glyphs in the font.  */\n  /*                                                                       */\n  /*    long_metrics           :: A pointer into the `hmtx' table.         */\n  /*                                                                       */\n  /*    short_metrics          :: A pointer into the `hmtx' table.         */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should   */\n  /*               be identical except for the names of their fields which */\n  /*               are different.                                          */\n  /*                                                                       */\n  /*               This ensures that a single function in the `ttload'     */\n  /*               module is able to read both the horizontal and vertical */\n  /*               headers.                                                */\n  /*                                                                       */\n  typedef struct  TT_HoriHeader_\n  {\n    FT_Fixed   Version;\n    FT_Short   Ascender;\n    FT_Short   Descender;\n    FT_Short   Line_Gap;\n\n    FT_UShort  advance_Width_Max;      /* advance width maximum */\n\n    FT_Short   min_Left_Side_Bearing;  /* minimum left-sb       */\n    FT_Short   min_Right_Side_Bearing; /* minimum right-sb      */\n    FT_Short   xMax_Extent;            /* xmax extents          */\n    FT_Short   caret_Slope_Rise;\n    FT_Short   caret_Slope_Run;\n    FT_Short   caret_Offset;\n\n    FT_Short   Reserved[4];\n\n    FT_Short   metric_Data_Format;\n    FT_UShort  number_Of_HMetrics;\n\n    /* The following fields are not defined by the TrueType specification */\n    /* but they are used to connect the metrics header to the relevant    */\n    /* `HMTX' table.                                                      */\n\n    void*      long_metrics;\n    void*      short_metrics;\n\n  } TT_HoriHeader;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_VertHeader                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to model a TrueType vertical header, the `vhea'   */\n  /*    table, as well as the corresponding vertical metrics table, i.e.,  */\n  /*    the `vmtx' table.                                                  */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    Version                 :: The table version.                      */\n  /*                                                                       */\n  /*    Ascender                :: The font's ascender, i.e., the distance */\n  /*                               from the baseline to the top-most of    */\n  /*                               all glyph points found in the font.     */\n  /*                                                                       */\n  /*                               This value is invalid in many fonts, as */\n  /*                               it is usually set by the font designer, */\n  /*                               and often reflects only a portion of    */\n  /*                               the glyphs found in the font (maybe     */\n  /*                               ASCII).                                 */\n  /*                                                                       */\n  /*                               You should use the `sTypoAscender'      */\n  /*                               field of the OS/2 table instead if you  */\n  /*                               want the correct one.                   */\n  /*                                                                       */\n  /*    Descender               :: The font's descender, i.e., the         */\n  /*                               distance from the baseline to the       */\n  /*                               bottom-most of all glyph points found   */\n  /*                               in the font.  It is negative.           */\n  /*                                                                       */\n  /*                               This value is invalid in many fonts, as */\n  /*                               it is usually set by the font designer, */\n  /*                               and often reflects only a portion of    */\n  /*                               the glyphs found in the font (maybe     */\n  /*                               ASCII).                                 */\n  /*                                                                       */\n  /*                               You should use the `sTypoDescender'     */\n  /*                               field of the OS/2 table instead if you  */\n  /*                               want the correct one.                   */\n  /*                                                                       */\n  /*    Line_Gap                :: The font's line gap, i.e., the distance */\n  /*                               to add to the ascender and descender to */\n  /*                               get the BTB, i.e., the                  */\n  /*                               baseline-to-baseline distance for the   */\n  /*                               font.                                   */\n  /*                                                                       */\n  /*    advance_Height_Max      :: This field is the maximum of all        */\n  /*                               advance heights found in the font.  It  */\n  /*                               can be used to compute the maximum      */\n  /*                               height of an arbitrary string of text.  */\n  /*                                                                       */\n  /*    min_Top_Side_Bearing    :: The minimum top side bearing of all     */\n  /*                               glyphs within the font.                 */\n  /*                                                                       */\n  /*    min_Bottom_Side_Bearing :: The minimum bottom side bearing of all  */\n  /*                               glyphs within the font.                 */\n  /*                                                                       */\n  /*    yMax_Extent             :: The maximum vertical extent (i.e., the  */\n  /*                               `height' of a glyph's bounding box) for */\n  /*                               all glyphs in the font.                 */\n  /*                                                                       */\n  /*    caret_Slope_Rise        :: The rise coefficient of the cursor's    */\n  /*                               slope of the cursor (slope=rise/run).   */\n  /*                                                                       */\n  /*    caret_Slope_Run         :: The run coefficient of the cursor's     */\n  /*                               slope.                                  */\n  /*                                                                       */\n  /*    caret_Offset            :: The cursor's offset for slanted fonts.  */\n  /*                               This value is `reserved' in vmtx        */\n  /*                               version 1.0.                            */\n  /*                                                                       */\n  /*    Reserved                :: 8~reserved bytes.                       */\n  /*                                                                       */\n  /*    metric_Data_Format      :: Always~0.                               */\n  /*                                                                       */\n  /*    number_Of_HMetrics      :: Number of VMetrics entries in the       */\n  /*                               `vmtx' table -- this value can be       */\n  /*                               smaller than the total number of glyphs */\n  /*                               in the font.                            */\n  /*                                                                       */\n  /*    long_metrics           :: A pointer into the `vmtx' table.         */\n  /*                                                                       */\n  /*    short_metrics          :: A pointer into the `vmtx' table.         */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should   */\n  /*               be identical except for the names of their fields which */\n  /*               are different.                                          */\n  /*                                                                       */\n  /*               This ensures that a single function in the `ttload'     */\n  /*               module is able to read both the horizontal and vertical */\n  /*               headers.                                                */\n  /*                                                                       */\n  typedef struct  TT_VertHeader_\n  {\n    FT_Fixed   Version;\n    FT_Short   Ascender;\n    FT_Short   Descender;\n    FT_Short   Line_Gap;\n\n    FT_UShort  advance_Height_Max;      /* advance height maximum */\n\n    FT_Short   min_Top_Side_Bearing;    /* minimum left-sb or top-sb       */\n    FT_Short   min_Bottom_Side_Bearing; /* minimum right-sb or bottom-sb   */\n    FT_Short   yMax_Extent;             /* xmax or ymax extents            */\n    FT_Short   caret_Slope_Rise;\n    FT_Short   caret_Slope_Run;\n    FT_Short   caret_Offset;\n\n    FT_Short   Reserved[4];\n\n    FT_Short   metric_Data_Format;\n    FT_UShort  number_Of_VMetrics;\n\n    /* The following fields are not defined by the TrueType specification */\n    /* but they're used to connect the metrics header to the relevant     */\n    /* `HMTX' or `VMTX' table.                                            */\n\n    void*      long_metrics;\n    void*      short_metrics;\n\n  } TT_VertHeader;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_OS2                                                             */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to model a TrueType OS/2 table. This is the long  */\n  /*    table version.  All fields comply to the TrueType specification.   */\n  /*                                                                       */\n  /*    Note that we now support old Mac fonts which do not include an     */\n  /*    OS/2 table.  In this case, the `version' field is always set to    */\n  /*    0xFFFF.                                                            */\n  /*                                                                       */\n  typedef struct  TT_OS2_\n  {\n    FT_UShort  version;                /* 0x0001 - more or 0xFFFF */\n    FT_Short   xAvgCharWidth;\n    FT_UShort  usWeightClass;\n    FT_UShort  usWidthClass;\n    FT_Short   fsType;\n    FT_Short   ySubscriptXSize;\n    FT_Short   ySubscriptYSize;\n    FT_Short   ySubscriptXOffset;\n    FT_Short   ySubscriptYOffset;\n    FT_Short   ySuperscriptXSize;\n    FT_Short   ySuperscriptYSize;\n    FT_Short   ySuperscriptXOffset;\n    FT_Short   ySuperscriptYOffset;\n    FT_Short   yStrikeoutSize;\n    FT_Short   yStrikeoutPosition;\n    FT_Short   sFamilyClass;\n\n    FT_Byte    panose[10];\n\n    FT_ULong   ulUnicodeRange1;        /* Bits 0-31   */\n    FT_ULong   ulUnicodeRange2;        /* Bits 32-63  */\n    FT_ULong   ulUnicodeRange3;        /* Bits 64-95  */\n    FT_ULong   ulUnicodeRange4;        /* Bits 96-127 */\n\n    FT_Char    achVendID[4];\n\n    FT_UShort  fsSelection;\n    FT_UShort  usFirstCharIndex;\n    FT_UShort  usLastCharIndex;\n    FT_Short   sTypoAscender;\n    FT_Short   sTypoDescender;\n    FT_Short   sTypoLineGap;\n    FT_UShort  usWinAscent;\n    FT_UShort  usWinDescent;\n\n    /* only version 1 tables: */\n\n    FT_ULong   ulCodePageRange1;       /* Bits 0-31   */\n    FT_ULong   ulCodePageRange2;       /* Bits 32-63  */\n\n    /* only version 2 tables: */\n\n    FT_Short   sxHeight;\n    FT_Short   sCapHeight;\n    FT_UShort  usDefaultChar;\n    FT_UShort  usBreakChar;\n    FT_UShort  usMaxContext;\n\n  } TT_OS2;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_Postscript                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to model a TrueType PostScript table.  All fields */\n  /*    comply to the TrueType specification.  This structure does not     */\n  /*    reference the PostScript glyph names, which can be nevertheless    */\n  /*    accessed with the `ttpost' module.                                 */\n  /*                                                                       */\n  typedef struct  TT_Postscript_\n  {\n    FT_Fixed  FormatType;\n    FT_Fixed  italicAngle;\n    FT_Short  underlinePosition;\n    FT_Short  underlineThickness;\n    FT_ULong  isFixedPitch;\n    FT_ULong  minMemType42;\n    FT_ULong  maxMemType42;\n    FT_ULong  minMemType1;\n    FT_ULong  maxMemType1;\n\n    /* Glyph names follow in the file, but we don't   */\n    /* load them by default.  See the ttpost.c file.  */\n\n  } TT_Postscript;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_PCLT                                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    A structure used to model a TrueType PCLT table.  All fields       */\n  /*    comply to the TrueType specification.                              */\n  /*                                                                       */\n  typedef struct  TT_PCLT_\n  {\n    FT_Fixed   Version;\n    FT_ULong   FontNumber;\n    FT_UShort  Pitch;\n    FT_UShort  xHeight;\n    FT_UShort  Style;\n    FT_UShort  TypeFamily;\n    FT_UShort  CapHeight;\n    FT_UShort  SymbolSet;\n    FT_Char    TypeFace[16];\n    FT_Char    CharacterComplement[8];\n    FT_Char    FileName[6];\n    FT_Char    StrokeWeight;\n    FT_Char    WidthType;\n    FT_Byte    SerifStyle;\n    FT_Byte    Reserved;\n\n  } TT_PCLT;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Struct>                                                              */\n  /*    TT_MaxProfile                                                      */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    The maximum profile is a table containing many max values which    */\n  /*    can be used to pre-allocate arrays.  This ensures that no memory   */\n  /*    allocation occurs during a glyph load.                             */\n  /*                                                                       */\n  /* <Fields>                                                              */\n  /*    version               :: The version number.                       */\n  /*                                                                       */\n  /*    numGlyphs             :: The number of glyphs in this TrueType     */\n  /*                             font.                                     */\n  /*                                                                       */\n  /*    maxPoints             :: The maximum number of points in a         */\n  /*                             non-composite TrueType glyph.  See also   */\n  /*                             the structure element                     */\n  /*                             `maxCompositePoints'.                     */\n  /*                                                                       */\n  /*    maxContours           :: The maximum number of contours in a       */\n  /*                             non-composite TrueType glyph.  See also   */\n  /*                             the structure element                     */\n  /*                             `maxCompositeContours'.                   */\n  /*                                                                       */\n  /*    maxCompositePoints    :: The maximum number of points in a         */\n  /*                             composite TrueType glyph.  See also the   */\n  /*                             structure element `maxPoints'.            */\n  /*                                                                       */\n  /*    maxCompositeContours  :: The maximum number of contours in a       */\n  /*                             composite TrueType glyph.  See also the   */\n  /*                             structure element `maxContours'.          */\n  /*                                                                       */\n  /*    maxZones              :: The maximum number of zones used for      */\n  /*                             glyph hinting.                            */\n  /*                                                                       */\n  /*    maxTwilightPoints     :: The maximum number of points in the       */\n  /*                             twilight zone used for glyph hinting.     */\n  /*                                                                       */\n  /*    maxStorage            :: The maximum number of elements in the     */\n  /*                             storage area used for glyph hinting.      */\n  /*                                                                       */\n  /*    maxFunctionDefs       :: The maximum number of function            */\n  /*                             definitions in the TrueType bytecode for  */\n  /*                             this font.                                */\n  /*                                                                       */\n  /*    maxInstructionDefs    :: The maximum number of instruction         */\n  /*                             definitions in the TrueType bytecode for  */\n  /*                             this font.                                */\n  /*                                                                       */\n  /*    maxStackElements      :: The maximum number of stack elements used */\n  /*                             during bytecode interpretation.           */\n  /*                                                                       */\n  /*    maxSizeOfInstructions :: The maximum number of TrueType opcodes    */\n  /*                             used for glyph hinting.                   */\n  /*                                                                       */\n  /*    maxComponentElements  :: The maximum number of simple (i.e., non-  */\n  /*                             composite) glyphs in a composite glyph.   */\n  /*                                                                       */\n  /*    maxComponentDepth     :: The maximum nesting depth of composite    */\n  /*                             glyphs.                                   */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    This structure is only used during font loading.                   */\n  /*                                                                       */\n  typedef struct  TT_MaxProfile_\n  {\n    FT_Fixed   version;\n    FT_UShort  numGlyphs;\n    FT_UShort  maxPoints;\n    FT_UShort  maxContours;\n    FT_UShort  maxCompositePoints;\n    FT_UShort  maxCompositeContours;\n    FT_UShort  maxZones;\n    FT_UShort  maxTwilightPoints;\n    FT_UShort  maxStorage;\n    FT_UShort  maxFunctionDefs;\n    FT_UShort  maxInstructionDefs;\n    FT_UShort  maxStackElements;\n    FT_UShort  maxSizeOfInstructions;\n    FT_UShort  maxComponentElements;\n    FT_UShort  maxComponentDepth;\n\n  } TT_MaxProfile;\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Enum>                                                                */\n  /*    FT_Sfnt_Tag                                                        */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    An enumeration used to specify the index of an SFNT table.         */\n  /*    Used in the @FT_Get_Sfnt_Table API function.                       */\n  /*                                                                       */\n  typedef enum  FT_Sfnt_Tag_\n  {\n    ft_sfnt_head = 0,\n    ft_sfnt_maxp = 1,\n    ft_sfnt_os2  = 2,\n    ft_sfnt_hhea = 3,\n    ft_sfnt_vhea = 4,\n    ft_sfnt_post = 5,\n    ft_sfnt_pclt = 6,\n\n    sfnt_max   /* internal end mark */\n\n  } FT_Sfnt_Tag;\n\n  /* */\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_Sfnt_Table                                                  */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return a pointer to a given SFNT table within a face.              */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    face :: A handle to the source.                                    */\n  /*                                                                       */\n  /*    tag  :: The index of the SFNT table.                               */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    A type-less pointer to the table.  This will be~0 in case of       */\n  /*    error, or if the corresponding table was not found *OR* loaded     */\n  /*    from the file.                                                     */\n  /*                                                                       */\n  /* <Note>                                                                */\n  /*    The table is owned by the face object and disappears with it.      */\n  /*                                                                       */\n  /*    This function is only useful to access SFNT tables that are loaded */\n  /*    by the sfnt, truetype, and opentype drivers.  See @FT_Sfnt_Tag for */\n  /*    a list.                                                            */\n  /*                                                                       */\n  FT_EXPORT( void* )\n  FT_Get_Sfnt_Table( FT_Face      face,\n                     FT_Sfnt_Tag  tag );\n\n\n /**************************************************************************\n  *\n  * @function:\n  *   FT_Load_Sfnt_Table\n  *\n  * @description:\n  *   Load any font table into client memory.\n  *\n  * @input:\n  *   face ::\n  *     A handle to the source face.\n  *\n  *   tag ::\n  *     The four-byte tag of the table to load.  Use the value~0 if you want\n  *     to access the whole font file.  Otherwise, you can use one of the\n  *     definitions found in the @FT_TRUETYPE_TAGS_H file, or forge a new\n  *     one with @FT_MAKE_TAG.\n  *\n  *   offset ::\n  *     The starting offset in the table (or file if tag == 0).\n  *\n  * @output:\n  *   buffer ::\n  *     The target buffer address.  The client must ensure that the memory\n  *     array is big enough to hold the data.\n  *\n  * @inout:\n  *   length ::\n  *     If the `length' parameter is NULL, then try to load the whole table.\n  *     Return an error code if it fails.\n  *\n  *     Else, if `*length' is~0, exit immediately while returning the\n  *     table's (or file) full size in it.\n  *\n  *     Else the number of bytes to read from the table or file, from the\n  *     starting offset.\n  *\n  * @return:\n  *   FreeType error code.  0~means success.\n  *\n  * @note:\n  *   If you need to determine the table's length you should first call this\n  *   function with `*length' set to~0, as in the following example:\n  *\n  *     {\n  *       FT_ULong  length = 0;\n  *\n  *\n  *       error = FT_Load_Sfnt_Table( face, tag, 0, NULL, &length );\n  *       if ( error ) { ... table does not exist ... }\n  *\n  *       buffer = malloc( length );\n  *       if ( buffer == NULL ) { ... not enough memory ... }\n  *\n  *       error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length );\n  *       if ( error ) { ... could not load table ... }\n  *     }\n  */\n  FT_EXPORT( FT_Error )\n  FT_Load_Sfnt_Table( FT_Face    face,\n                      FT_ULong   tag,\n                      FT_Long    offset,\n                      FT_Byte*   buffer,\n                      FT_ULong*  length );\n\n\n /**************************************************************************\n  *\n  * @function:\n  *   FT_Sfnt_Table_Info\n  *\n  * @description:\n  *   Return information on an SFNT table.\n  *\n  * @input:\n  *   face ::\n  *     A handle to the source face.\n  *\n  *   table_index ::\n  *     The index of an SFNT table.  The function returns\n  *     FT_Err_Table_Missing for an invalid value.\n  *\n  * @output:\n  *   tag ::\n  *     The name tag of the SFNT table.\n  *\n  *   length ::\n  *     The length of the SFNT table.\n  *\n  * @return:\n  *   FreeType error code.  0~means success.\n  *\n  * @note:\n  *   SFNT tables with length zero are treated as missing.\n  *\n  */\n  FT_EXPORT( FT_Error )\n  FT_Sfnt_Table_Info( FT_Face    face,\n                      FT_UInt    table_index,\n                      FT_ULong  *tag,\n                      FT_ULong  *length );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_CMap_Language_ID                                            */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return TrueType/sfnt specific cmap language ID.  Definitions of    */\n  /*    language ID values are in `freetype/ttnameid.h'.                   */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    charmap ::                                                         */\n  /*      The target charmap.                                              */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The language ID of `charmap'.  If `charmap' doesn't belong to a    */\n  /*    TrueType/sfnt face, just return~0 as the default value.            */\n  /*                                                                       */\n  FT_EXPORT( FT_ULong )\n  FT_Get_CMap_Language_ID( FT_CharMap  charmap );\n\n\n  /*************************************************************************/\n  /*                                                                       */\n  /* <Function>                                                            */\n  /*    FT_Get_CMap_Format                                                 */\n  /*                                                                       */\n  /* <Description>                                                         */\n  /*    Return TrueType/sfnt specific cmap format.                         */\n  /*                                                                       */\n  /* <Input>                                                               */\n  /*    charmap ::                                                         */\n  /*      The target charmap.                                              */\n  /*                                                                       */\n  /* <Return>                                                              */\n  /*    The format of `charmap'.  If `charmap' doesn't belong to a         */\n  /*    TrueType/sfnt face, return -1.                                     */\n  /*                                                                       */\n  FT_EXPORT( FT_Long )\n  FT_Get_CMap_Format( FT_CharMap  charmap );\n\n  /* */\n\n\nFT_END_HEADER\n\n#endif /* __TTTABLES_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/tttags.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  tttags.h                                                               */\n/*                                                                         */\n/*    Tags for TrueType and OpenType tables (specification only).          */\n/*                                                                         */\n/*  Copyright 1996-2001, 2004, 2005, 2007, 2008 by                         */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __TTAGS_H__\n#define __TTAGS_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n#define TTAG_avar  FT_MAKE_TAG( 'a', 'v', 'a', 'r' )\n#define TTAG_BASE  FT_MAKE_TAG( 'B', 'A', 'S', 'E' )\n#define TTAG_bdat  FT_MAKE_TAG( 'b', 'd', 'a', 't' )\n#define TTAG_BDF   FT_MAKE_TAG( 'B', 'D', 'F', ' ' )\n#define TTAG_bhed  FT_MAKE_TAG( 'b', 'h', 'e', 'd' )\n#define TTAG_bloc  FT_MAKE_TAG( 'b', 'l', 'o', 'c' )\n#define TTAG_bsln  FT_MAKE_TAG( 'b', 's', 'l', 'n' )\n#define TTAG_CFF   FT_MAKE_TAG( 'C', 'F', 'F', ' ' )\n#define TTAG_CID   FT_MAKE_TAG( 'C', 'I', 'D', ' ' )\n#define TTAG_cmap  FT_MAKE_TAG( 'c', 'm', 'a', 'p' )\n#define TTAG_cvar  FT_MAKE_TAG( 'c', 'v', 'a', 'r' )\n#define TTAG_cvt   FT_MAKE_TAG( 'c', 'v', 't', ' ' )\n#define TTAG_DSIG  FT_MAKE_TAG( 'D', 'S', 'I', 'G' )\n#define TTAG_EBDT  FT_MAKE_TAG( 'E', 'B', 'D', 'T' )\n#define TTAG_EBLC  FT_MAKE_TAG( 'E', 'B', 'L', 'C' )\n#define TTAG_EBSC  FT_MAKE_TAG( 'E', 'B', 'S', 'C' )\n#define TTAG_feat  FT_MAKE_TAG( 'f', 'e', 'a', 't' )\n#define TTAG_FOND  FT_MAKE_TAG( 'F', 'O', 'N', 'D' )\n#define TTAG_fpgm  FT_MAKE_TAG( 'f', 'p', 'g', 'm' )\n#define TTAG_fvar  FT_MAKE_TAG( 'f', 'v', 'a', 'r' )\n#define TTAG_gasp  FT_MAKE_TAG( 'g', 'a', 's', 'p' )\n#define TTAG_GDEF  FT_MAKE_TAG( 'G', 'D', 'E', 'F' )\n#define TTAG_glyf  FT_MAKE_TAG( 'g', 'l', 'y', 'f' )\n#define TTAG_GPOS  FT_MAKE_TAG( 'G', 'P', 'O', 'S' )\n#define TTAG_GSUB  FT_MAKE_TAG( 'G', 'S', 'U', 'B' )\n#define TTAG_gvar  FT_MAKE_TAG( 'g', 'v', 'a', 'r' )\n#define TTAG_hdmx  FT_MAKE_TAG( 'h', 'd', 'm', 'x' )\n#define TTAG_head  FT_MAKE_TAG( 'h', 'e', 'a', 'd' )\n#define TTAG_hhea  FT_MAKE_TAG( 'h', 'h', 'e', 'a' )\n#define TTAG_hmtx  FT_MAKE_TAG( 'h', 'm', 't', 'x' )\n#define TTAG_JSTF  FT_MAKE_TAG( 'J', 'S', 'T', 'F' )\n#define TTAG_just  FT_MAKE_TAG( 'j', 'u', 's', 't' )\n#define TTAG_kern  FT_MAKE_TAG( 'k', 'e', 'r', 'n' )\n#define TTAG_lcar  FT_MAKE_TAG( 'l', 'c', 'a', 'r' )\n#define TTAG_loca  FT_MAKE_TAG( 'l', 'o', 'c', 'a' )\n#define TTAG_LTSH  FT_MAKE_TAG( 'L', 'T', 'S', 'H' )\n#define TTAG_LWFN  FT_MAKE_TAG( 'L', 'W', 'F', 'N' )\n#define TTAG_MATH  FT_MAKE_TAG( 'M', 'A', 'T', 'H' )\n#define TTAG_maxp  FT_MAKE_TAG( 'm', 'a', 'x', 'p' )\n#define TTAG_META  FT_MAKE_TAG( 'M', 'E', 'T', 'A' )\n#define TTAG_MMFX  FT_MAKE_TAG( 'M', 'M', 'F', 'X' )\n#define TTAG_MMSD  FT_MAKE_TAG( 'M', 'M', 'S', 'D' )\n#define TTAG_mort  FT_MAKE_TAG( 'm', 'o', 'r', 't' )\n#define TTAG_morx  FT_MAKE_TAG( 'm', 'o', 'r', 'x' )\n#define TTAG_name  FT_MAKE_TAG( 'n', 'a', 'm', 'e' )\n#define TTAG_opbd  FT_MAKE_TAG( 'o', 'p', 'b', 'd' )\n#define TTAG_OS2   FT_MAKE_TAG( 'O', 'S', '/', '2' )\n#define TTAG_OTTO  FT_MAKE_TAG( 'O', 'T', 'T', 'O' )\n#define TTAG_PCLT  FT_MAKE_TAG( 'P', 'C', 'L', 'T' )\n#define TTAG_POST  FT_MAKE_TAG( 'P', 'O', 'S', 'T' )\n#define TTAG_post  FT_MAKE_TAG( 'p', 'o', 's', 't' )\n#define TTAG_prep  FT_MAKE_TAG( 'p', 'r', 'e', 'p' )\n#define TTAG_prop  FT_MAKE_TAG( 'p', 'r', 'o', 'p' )\n#define TTAG_sfnt  FT_MAKE_TAG( 's', 'f', 'n', 't' )\n#define TTAG_SING  FT_MAKE_TAG( 'S', 'I', 'N', 'G' )\n#define TTAG_trak  FT_MAKE_TAG( 't', 'r', 'a', 'k' )\n#define TTAG_true  FT_MAKE_TAG( 't', 'r', 'u', 'e' )\n#define TTAG_ttc   FT_MAKE_TAG( 't', 't', 'c', ' ' )\n#define TTAG_ttcf  FT_MAKE_TAG( 't', 't', 'c', 'f' )\n#define TTAG_TYP1  FT_MAKE_TAG( 'T', 'Y', 'P', '1' )\n#define TTAG_typ1  FT_MAKE_TAG( 't', 'y', 'p', '1' )\n#define TTAG_VDMX  FT_MAKE_TAG( 'V', 'D', 'M', 'X' )\n#define TTAG_vhea  FT_MAKE_TAG( 'v', 'h', 'e', 'a' )\n#define TTAG_vmtx  FT_MAKE_TAG( 'v', 'm', 't', 'x' )\n\n\nFT_END_HEADER\n\n#endif /* __TTAGS_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/freetype2/freetype/ttunpat.h",
    "content": "/***************************************************************************/\n/*                                                                         */\n/*  ttunpat.h                                                              */\n/*                                                                         */\n/*    Definitions for the unpatented TrueType hinting system               */\n/*                                                                         */\n/*  Copyright 2003, 2006 by                                                */\n/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n/*                                                                         */\n/*  Written by Graham Asher <graham.asher@btinternet.com>                  */\n/*                                                                         */\n/*  This file is part of the FreeType project, and may only be used,       */\n/*  modified, and distributed under the terms of the FreeType project      */\n/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */\n/*  this file you indicate that you have read the license and              */\n/*  understand and accept it fully.                                        */\n/*                                                                         */\n/***************************************************************************/\n\n\n#ifndef __TTUNPAT_H__\n#define __TTUNPAT_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n /***************************************************************************\n  *\n  * @constant:\n  *   FT_PARAM_TAG_UNPATENTED_HINTING\n  *\n  * @description:\n  *   A constant used as the tag of an @FT_Parameter structure to indicate\n  *   that unpatented methods only should be used by the TrueType bytecode\n  *   interpreter for a typeface opened by @FT_Open_Face.\n  *\n  */\n#define FT_PARAM_TAG_UNPATENTED_HINTING  FT_MAKE_TAG( 'u', 'n', 'p', 'a' )\n\n /* */\n\nFT_END_HEADER\n\n\n#endif /* __TTUNPAT_H__ */\n\n\n/* END */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/FT2Plugin/macFileNameBits.c",
    "content": "/*\n *  macFileNameBits.c\n *  FT2Plugin support\n *\n *  Created by John M McIntosh on 21/11/05.\n * Feb 15th, 2006, use sqFilenameFromString\n *\n */\n#include \"sqVirtualMachine.h\" \n\nextern struct VirtualMachine * interpreterProxy;\n\nvoid\t\tsqFilenameFromString(char *buffer,long fileIndex, long fileLength) {\n\tinterpreterProxy->ioFilenamefromStringofLengthresolveAliases(buffer,fileIndex, fileLength, 1);\n}\n\nvoid fetchPreferences() {}\n\n/* int IsImageName(char *name) {\n\treturn 1;\n};\n\nint isSystem9_0_or_better(void)\n{\n\treturn 1;\n}\n\nCFStringEncoding gCurrentVMEncoding=kCFStringEncodingMacRoman;\n\nvoid fetchPreferences() {\n\tCFBundleRef  myBundle;\n\tCFDictionaryRef myDictionary;\n\tCFStringRef    SqueakVMEncodingType;\n\tchar        encoding[256];\n\n\tmyBundle = CFBundleGetMainBundle();\n\tmyDictionary = CFBundleGetInfoDictionary(myBundle);\n\tSqueakVMEncodingType = CFDictionaryGetValue(myDictionary, CFSTR(\"SqueakEncodingType\"));\n\tif (SqueakVMEncodingType) \n\t\tCFStringGetCString (SqueakVMEncodingType, encoding, 256, kCFStringEncodingMacRoman);\n\telse\n\t\t*encoding = 0x00;\n\n\tgCurrentVMEncoding = kCFStringEncodingMacRoman;\n\tif (strcmp(\"UTF-8\",encoding) == 0)\n\t  gCurrentVMEncoding = kCFStringEncodingUTF8;\n\tif (strcmp(\"ShiftJIS\",encoding) == 0)\n\t  gCurrentVMEncoding = kCFStringEncodingShiftJIS;\n}\n*/"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/JoystickTabletPlugin/HID_Error_Handler.c",
    "content": "/*\n\tFile:\t\tError Handler.c\n\n\tContains:\tImplementation of the HID utility error handlers for the HID Utilities\n    \n\tDRI: George Warner\n\n\tCopyright:\tCopyright  2002 Apple Computer, Inc., All Rights Reserved\n\n\tDisclaimer:\tIMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc.\n\t\t\t\t(\"Apple\") in consideration of your agreement to the following terms, and your\n\t\t\t\tuse, installation, modification or redistribution of this Apple software\n\t\t\t\tconstitutes acceptance of these terms.  If you do not agree with these terms,\n\t\t\t\tplease do not use, install, modify or redistribute this Apple software.\n\n\t\t\t\tIn consideration of your agreement to abide by the following terms, and subject\n\t\t\t\tto these terms, Apple grants you a personal, non-exclusive license, under Apples\n\t\t\t\tcopyrights in this original Apple software (the \"Apple Software\"), to use,\n\t\t\t\treproduce, modify and redistribute the Apple Software, with or without\n\t\t\t\tmodifications, in source and/or binary forms; provided that if you redistribute\n\t\t\t\tthe Apple Software in its entirety and without modifications, you must retain\n\t\t\t\tthis notice and the following text and disclaimers in all such redistributions of\n\t\t\t\tthe Apple Software.  Neither the name, trademarks, service marks or logos of\n\t\t\t\tApple Computer, Inc. may be used to endorse or promote products derived from the\n\t\t\t\tApple Software without specific prior written permission from Apple.  Except as\n\t\t\t\texpressly stated in this notice, no other rights or licenses, express or implied,\n\t\t\t\tare granted by Apple herein, including but not limited to any patent rights that\n\t\t\t\tmay be infringed by your derivative works or by other works in which the Apple\n\t\t\t\tSoftware may be incorporated.\n\n\t\t\t\tThe Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE MAKES NO\n\t\t\t\tWARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED\n\t\t\t\tWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n\t\t\t\tPURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN\n\t\t\t\tCOMBINATION WITH YOUR PRODUCTS.\n\n\t\t\t\tIN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR\n\t\t\t\tCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n\t\t\t\tGOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n\t\t\t\tARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION\n\t\t\t\tOF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT\n\t\t\t\t(INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN\n\t\t\t\tADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n#if !defined  (kBuildingLibrary)\n\t#define kVerboseErrors\n\n// system includes ----------------------------------------------------------\n\n\t#ifdef kVerboseErrors\n\t\t#include <Carbon/Carbon.h>\n\t#endif\n#endif // not kBuildingLibrary \n\n#include <stdio.h>\n\n// project includes ---------------------------------------------------------\n\n#include \"HID_Utilities_Internal.h\"\n\n// globals (internal/private) -----------------------------------------------\n\n// prototypes (internal/private) --------------------------------------------\n\n// functions (internal/private) ---------------------------------------------\n\n#pragma mark -\n// -------------------------------------\n\n// central error reporting\n\nvoid HIDReportErrorNum (char * strError, long numError)\n{\n\tchar errMsgCStr [256];\n\t\n\tsprintf (errMsgCStr, \"%s #%ld (0x%lx)\", strError, numError, numError); \n\n\t// out as debug string\n#ifdef kVerboseErrors\n\t{\n\t\tStr255 strErr = \"\\p\";\n\t\tCopyCStringToPascal (errMsgCStr, strErr);\n\t\tDebugStr (strErr);\n\t}\n#endif // kVerboseErrors\n}\n\n// -------------------------------------\n\nvoid HIDReportError (char * strError)\n{\n\tchar errMsgCStr [256];\n\n\tsprintf (errMsgCStr, \"%s\", strError); \n\n\t// out as debug string\n#ifdef kVerboseErrors\n\t{\n\t\tStr255 strErr = \"\\p\";\n\t\tCopyCStringToPascal (errMsgCStr, strErr);\n\t\tDebugStr (strErr);\n\t}\n#endif // kVerboseErrors\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/JoystickTabletPlugin/HID_Error_Handler.h",
    "content": "/*\n\tFile:\t\tHID_Error_Handler.h\n\n\tContains:   Definition of the interfaces to <HID_Error_Handler.c>\n    \n\tDRI: George Warner\n\n\tCopyright:\tCopyright  2002 Apple Computer, Inc., All Rights Reserved\n\n\tDisclaimer:\tIMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc.\n\t\t\t\t(\"Apple\") in consideration of your agreement to the following terms, and your\n\t\t\t\tuse, installation, modification or redistribution of this Apple software\n\t\t\t\tconstitutes acceptance of these terms.  If you do not agree with these terms,\n\t\t\t\tplease do not use, install, modify or redistribute this Apple software.\n\n\t\t\t\tIn consideration of your agreement to abide by the following terms, and subject\n\t\t\t\tto these terms, Apple grants you a personal, non-exclusive license, under Apples\n\t\t\t\tcopyrights in this original Apple software (the \"Apple Software\"), to use,\n\t\t\t\treproduce, modify and redistribute the Apple Software, with or without\n\t\t\t\tmodifications, in source and/or binary forms; provided that if you redistribute\n\t\t\t\tthe Apple Software in its entirety and without modifications, you must retain\n\t\t\t\tthis notice and the following text and disclaimers in all such redistributions of\n\t\t\t\tthe Apple Software.  Neither the name, trademarks, service marks or logos of\n\t\t\t\tApple Computer, Inc. may be used to endorse or promote products derived from the\n\t\t\t\tApple Software without specific prior written permission from Apple.  Except as\n\t\t\t\texpressly stated in this notice, no other rights or licenses, express or implied,\n\t\t\t\tare granted by Apple herein, including but not limited to any patent rights that\n\t\t\t\tmay be infringed by your derivative works or by other works in which the Apple\n\t\t\t\tSoftware may be incorporated.\n\n\t\t\t\tThe Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE MAKES NO\n\t\t\t\tWARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED\n\t\t\t\tWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n\t\t\t\tPURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN\n\t\t\t\tCOMBINATION WITH YOUR PRODUCTS.\n\n\t\t\t\tIN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR\n\t\t\t\tCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n\t\t\t\tGOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n\t\t\t\tARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION\n\t\t\t\tOF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT\n\t\t\t\t(INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN\n\t\t\t\tADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n*/\n\n// Usage notes: \n\n// include control --------------------------------------------------\n\n#ifndef Error_Handler_h\n#define Error_Handler_h\n\n// includes ---------------------------------------------------------\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n// structures (public) -----------------------------------------------\n\n// public function declarations -------------------------------------\n\n// Error reporter, can be set to report however the application desires\nextern void HIDReportError (char * strError);\n\n// Error with numeric code reporter, can be set to report however the application desires\nextern void HIDReportErrorNum (char * strError, long numError);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif // Error_Handler_h"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/JoystickTabletPlugin/HID_Name_Lookup.c",
    "content": "/*\n\tFile:\t\tHID_Name_Lookup.c\n\n\tContains:\tImplementation of the HID device name lookup functions for the HID utilites.\n    \n\tDRI: George Warner\n\n\tCopyright:\tCopyright  2002 Apple Computer, Inc., All Rights Reserved\n\n\tDisclaimer:\tIMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc.\n\t\t\t\t(\"Apple\") in consideration of your agreement to the following terms, and your\n\t\t\t\tuse, installation, modification or redistribution of this Apple software\n\t\t\t\tconstitutes acceptance of these terms.  If you do not agree with these terms,\n\t\t\t\tplease do not use, install, modify or redistribute this Apple software.\n\n\t\t\t\tIn consideration of your agreement to abide by the following terms, and subject\n\t\t\t\tto these terms, Apple grants you a personal, non-exclusive license, under Apples\n\t\t\t\tcopyrights in this original Apple software (the \"Apple Software\"), to use,\n\t\t\t\treproduce, modify and redistribute the Apple Software, with or without\n\t\t\t\tmodifications, in source and/or binary forms; provided that if you redistribute\n\t\t\t\tthe Apple Software in its entirety and without modifications, you must retain\n\t\t\t\tthis notice and the following text and disclaimers in all such redistributions of\n\t\t\t\tthe Apple Software.  Neither the name, trademarks, service marks or logos of\n\t\t\t\tApple Computer, Inc. may be used to endorse or promote products derived from the\n\t\t\t\tApple Software without specific prior written permission from Apple.  Except as\n\t\t\t\texpressly stated in this notice, no other rights or licenses, express or implied,\n\t\t\t\tare granted by Apple herein, including but not limited to any patent rights that\n\t\t\t\tmay be infringed by your derivative works or by other works in which the Apple\n\t\t\t\tSoftware may be incorporated.\n\n\t\t\t\tThe Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE MAKES NO\n\t\t\t\tWARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED\n\t\t\t\tWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n\t\t\t\tPURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN\n\t\t\t\tCOMBINATION WITH YOUR PRODUCTS.\n\n\t\t\t\tIN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR\n\t\t\t\tCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n\t\t\t\tGOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n\t\t\t\tARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION\n\t\t\t\tOF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT\n\t\t\t\t(INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN\n\t\t\t\tADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n#include \"HID_Utilities_Internal.h\"\n#include \"HID_Name_Lookup.h\"\n\n#define FAKE_IT\t1\t// set true for debugging; returns the vendor, product & cookie (or usage info) as numbers.\n\n// ---------------------------------\n// Load the element strings from the given resource (XML) file into a CFPropertyListRef\nstatic CFPropertyListRef xml_load(const CFStringRef pResourceName,const CFStringRef pResourceExtension)\n{\n\tCFPropertyListRef tCFPropertyListRef = NULL;\n\tCFURLRef resFileCFURLRef = CFBundleCopyResourceURL(CFBundleGetMainBundle(), pResourceName, pResourceExtension, NULL);\n\n\tif (NULL != resFileCFURLRef)\n\t{\n\t\tCFDataRef resCFDataRef;\n\n\t\tif (CFURLCreateDataAndPropertiesFromResource(kCFAllocatorDefault, resFileCFURLRef, &resCFDataRef, nil, nil, nil))\n\t\t{\n\t\t\tif (NULL != resCFDataRef)\n\t\t\t{\n\t\t\t\tCFStringRef errorString;\n\n\t\t\t\ttCFPropertyListRef = CFPropertyListCreateFromXMLData(kCFAllocatorDefault, resCFDataRef, kCFPropertyListImmutable, &errorString);\n\t\t\t\tif (NULL == tCFPropertyListRef)\n\t\t\t\t\tCFShow(errorString);\n\t\t\t\tCFRelease(resCFDataRef);\n\t\t\t}\n\t\t}\n\t\tCFRelease(resFileCFURLRef);\n\t}\n\treturn tCFPropertyListRef;\n}\n\n// ---------------------------------\n// Find an element string in the <HID_cookie_strings.plist> resource (XML) file\nstatic Boolean xml_search_cookie(const long pVendorID, const long pProductID, const long pCookie, char* pCstr)\n{\n\tstatic CFPropertyListRef tCFPropertyListRef = NULL;\n\tBoolean results = false;\n\n\tif (NULL == tCFPropertyListRef)\n\t\ttCFPropertyListRef = xml_load(CFSTR(\"HID_cookie_strings\"), CFSTR(\"plist\"));\n\tif (NULL != tCFPropertyListRef)\n\t{\n\t\tif (CFDictionaryGetTypeID() == CFGetTypeID(tCFPropertyListRef))\n\t\t{\n\t\t\tCFDictionaryRef vendorCFDictionaryRef;\n\t\t\tCFStringRef\tvendorKeyCFStringRef;\n\t\t\tvendorKeyCFStringRef = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR(\"%ld\"), pVendorID);\n\n\t\t\tif (CFDictionaryGetValueIfPresent(tCFPropertyListRef, vendorKeyCFStringRef, (const void**) &vendorCFDictionaryRef))\n\t\t\t{\n\t\t\t\tCFDictionaryRef productCFDictionaryRef;\n\t\t\t\tCFStringRef\tproductKeyCFStringRef;\n\t\t\t\tCFStringRef\tvendorCFStringRef;\n\n\t\t\t\tif (CFDictionaryGetValueIfPresent(vendorCFDictionaryRef, CFSTR(\"Name\"), (const void**) &vendorCFStringRef))\n\t\t\t\t{\n\t\t\t\t\t//CFShow(vendorCFStringRef);\n\t\t\t\t}\n\t\t\t\tproductKeyCFStringRef = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR(\"%ld\"), pProductID);\n\n\t\t\t\tif (CFDictionaryGetValueIfPresent(vendorCFDictionaryRef, productKeyCFStringRef, (const void**) &productCFDictionaryRef))\n\t\t\t\t{\n\t\t\t\t\tCFStringRef fullCFStringRef = NULL;\n\t\t\t\t\tCFStringRef\tcookieKeyCFStringRef;\n\t\t\t\t\tCFStringRef\tproductCFStringRef;\n\t\t\t\t\tCFStringRef\tcookieCFStringRef;\n\n\t\t\t\t\tif (CFDictionaryGetValueIfPresent(productCFDictionaryRef, CFSTR(\"Name\"), (const void**) &productCFStringRef))\n\t\t\t\t\t{\n\t\t\t\t\t\t//CFShow(productCFStringRef);\n\t\t\t\t\t}\n\t\t\t\t\tcookieKeyCFStringRef = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR(\"%ld\"), pCookie);\n\n\t\t\t\t\tif (CFDictionaryGetValueIfPresent(productCFDictionaryRef, cookieKeyCFStringRef, (const void**) &cookieCFStringRef))\n\t\t\t\t\t{\n\t\t\t\t\t\tfullCFStringRef = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR(\"%@ %@ %@\"), \n\t\t\t\t\t\t\t\t\t\t\t\t vendorCFStringRef, productCFStringRef, cookieCFStringRef);\n\t\t\t\t\t\t// CFShow(cookieCFStringRef);\n\t\t\t\t\t}\n#if FAKE_IT\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tfullCFStringRef = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR(\"%@ %@ #%@\"), \n\t\t\t\t\t\t\t\t\t\t\t\t vendorCFStringRef, productCFStringRef, cookieKeyCFStringRef);\n\t\t\t\t\t}\n#endif\n\t\t\t\t\tif (fullCFStringRef)\n\t\t\t\t\t{\n\t\t\t\t\t\t// CFShow(fullCFStringRef);\n\t\t\t\t\t\tresults = CFStringGetCString(\n\t\t\t\t\t\t\t\t   fullCFStringRef, pCstr, CFStringGetLength(fullCFStringRef) * sizeof(UniChar) + 1, kCFStringEncodingMacRoman);\n\t\t\t\t\t\tCFRelease(fullCFStringRef);\n\t\t\t\t\t}\n\t\t\t\t\tCFRelease(cookieKeyCFStringRef);\n\t\t\t\t}\n\t\t\t\tCFRelease(productKeyCFStringRef);\n\t\t\t}\n\t\t\tCFRelease(vendorKeyCFStringRef);\n\t\t}\n\t\t//++CFRelease(tCFPropertyListRef);\t// Leak this!\n\t}\n\treturn results;\n}\n\n// ---------------------------------\n// Find an element string in the <HID_device_usage_strings.plist> resource (XML) file\nstatic Boolean xml_search_usage(const long pVendorID, const long pProductID, const long pUsagePage, const long pUsage, char* pCstr)\n{\n\tstatic CFPropertyListRef tCFPropertyListRef = NULL;\n\tBoolean results = false;\n\n\tif (NULL == tCFPropertyListRef)\n\t\ttCFPropertyListRef = xml_load(CFSTR(\"HID_device_usage_strings\"), CFSTR(\"plist\"));\n\tif (NULL != tCFPropertyListRef)\n\t{\n\t\tif (CFDictionaryGetTypeID() == CFGetTypeID(tCFPropertyListRef))\n\t\t{\n\t\t\tCFDictionaryRef vendorCFDictionaryRef;\n\t\t\tCFStringRef\tvendorKeyCFStringRef;\n\t\t\tvendorKeyCFStringRef = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR(\"%ld\"), pVendorID);\n\n\t\t\tif (CFDictionaryGetValueIfPresent(tCFPropertyListRef, vendorKeyCFStringRef, (const void**) &vendorCFDictionaryRef))\n\t\t\t{\n\t\t\t\tCFDictionaryRef productCFDictionaryRef;\n\t\t\t\tCFStringRef\tproductKeyCFStringRef;\n\t\t\t\tCFStringRef\tvendorCFStringRef;\n\n\t\t\t\tif (!CFDictionaryGetValueIfPresent(vendorCFDictionaryRef, CFSTR(\"Name\"), (const void**) &vendorCFStringRef))\n\t\t\t\t{\n\t\t\t\t\tvendorCFStringRef = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR(\"v: %ld\"), pVendorID);\n\t\t\t\t\t//CFShow(vendorCFStringRef);\n\t\t\t\t}\n\t\t\t\tproductKeyCFStringRef = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR(\"%ld\"), pProductID);\n\n\t\t\t\tif (CFDictionaryGetValueIfPresent(vendorCFDictionaryRef, productKeyCFStringRef, (const void**) &productCFDictionaryRef))\n\t\t\t\t{\n\t\t\t\t\tCFStringRef fullCFStringRef = NULL;\n\t\t\t\t\tCFStringRef\tusageKeyCFStringRef;\n\t\t\t\t\tCFStringRef\tproductCFStringRef;\n\t\t\t\t\tCFStringRef\tusageCFStringRef;\n\n\t\t\t\t\tif (CFDictionaryGetValueIfPresent(productCFDictionaryRef, CFSTR(\"Name\"), (const void**) &productCFStringRef))\n\t\t\t\t\t{\n\t\t\t\t\t\t//CFShow(productCFStringRef);\n\t\t\t\t\t}\n\t\t\t\t\tusageKeyCFStringRef = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR(\"%ld:%ld\"), pUsagePage, pUsage);\n\n\t\t\t\t\tif (CFDictionaryGetValueIfPresent(productCFDictionaryRef, usageKeyCFStringRef, (const void**) &usageCFStringRef))\n\t\t\t\t\t{\n\t\t\t\t\t\tfullCFStringRef = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR(\"%@ %@ %@\"),\n\t\t\t\t\t\t\t\t\t\t\t\t vendorCFStringRef, productCFStringRef, usageCFStringRef);\n\t\t\t\t\t\t// CFShow(usageCFStringRef);\n\t\t\t\t\t}\n#if FAKE_IT\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tfullCFStringRef = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR(\"%@ %@ #%@\"),\n\t\t\t\t\t\t\t\t\t\t\t\t vendorCFStringRef, productCFStringRef, usageKeyCFStringRef);\n\t\t\t\t\t}\n#endif\n\t\t\t\t\tif (fullCFStringRef)\n\t\t\t\t\t{\n\t\t\t\t\t\t// CFShow(fullCFStringRef);\n\t\t\t\t\t\tresults = CFStringGetCString(\n\t\t\t\t\t\t\t\t   fullCFStringRef, pCstr, CFStringGetLength(fullCFStringRef) * sizeof(UniChar) + 1, kCFStringEncodingMacRoman);\n\t\t\t\t\t\tCFRelease(fullCFStringRef);\n\t\t\t\t\t}\n\t\t\t\t\tCFRelease(usageKeyCFStringRef);\n\t\t\t\t}\n\t\t\t\tCFRelease(productKeyCFStringRef);\n\t\t\t}\n\t\t\tCFRelease(vendorKeyCFStringRef);\n\t\t}\n\t\t//++CFRelease(tCFPropertyListRef);\t// Leak this!\n\t}\n\treturn results;\n}\n\n// ---------------------------------\n// set name from vendor id/product id look up\nBoolean HIDGetElementNameFromVendorProductCookie (const long pVendorID, const long pProductID, const long pCookie, char * pName)\n{\n\tBoolean result = false;\n\t*pName = 0; // clear name\n\n\tif (xml_search_cookie(pVendorID, pProductID, pCookie, pName))\n\t\treturn true;\n\t\n\tswitch (pVendorID) {\n\t\tcase kMacally:\n\t\t\tswitch (pProductID) {\n\t\t\t\tcase kiShock:\n\t\t\t\t\tresult = true;\n\t\t\t\t\tswitch (pCookie) {\n\t\t\t\t\t\tcase 3: sprintf(pName, \"D-Pad Up\"); break;\n\t\t\t\t\t\tcase 4: sprintf(pName, \"D-Pad Down\"); break;\n\t\t\t\t\t\tcase 5: sprintf(pName, \"D-Pad Left\"); break;\n\t\t\t\t\t\tcase 6: sprintf(pName, \"D-Pad Right\"); break;\n\t\t\t\t\t\tcase 7: sprintf(pName, \"Up Button\"); break;\n\t\t\t\t\t\tcase 8: sprintf(pName, \"Right Button\"); break;\n\t\t\t\t\t\tcase 9: sprintf(pName, \"Down Button\"); break;\n\t\t\t\t\t\tcase 10: sprintf(pName, \"Left Button\"); break;\n\t\t\t\t\t\tcase 11: sprintf(pName, \"C Button\"); break;\n\t\t\t\t\t\tcase 12: sprintf(pName, \"B Button [Select]\"); break;\n\t\t\t\t\t\tcase 13: sprintf(pName, \"A Button [Start]\"); break;\n\t\t\t\t\t\tcase 14: sprintf(pName, \"F Button\"); break;\n\t\t\t\t\t\tcase 15: sprintf(pName, \"R1 Trigger\"); break;\n\t\t\t\t\t\tcase 16: sprintf(pName, \"R2 Trigger\"); break;\n\t\t\t\t\t\tcase 17: sprintf(pName, \"L1 Trigger\"); break;\n\t\t\t\t\t\tcase 18: sprintf(pName, \"L2 Trigger\"); break;\n\t\t\t\t\t\tcase 19: sprintf(pName, \"Left Stick Button\"); break;\n\t\t\t\t\t\tcase 20: sprintf(pName, \"Right Stick Button\"); break;\n\t\t\t\t\t\tcase 21: sprintf(pName, \"D Button\"); break;\n\t\t\t\t\t\tcase 22: sprintf(pName, \"E Button\"); break;\n\t\t\t\t\t\tcase 23: sprintf(pName, \"Left Stick X-Axis\"); break;\n\t\t\t\t\t\tcase 24: sprintf(pName, \"Left Stick Y-Axis\"); break;\n\t\t\t\t\t\tcase 25: sprintf(pName, \"Right Stick X-Axis\"); break;\n\t\t\t\t\t\tcase 26: sprintf(pName, \"Right Stick Y-Axis\"); break;\n\t\t\t\t\t\tdefault:\n#if FAKE_IT\n\t\t\t\t\t\t\tsprintf(pName, \"#{V:Macally, P:iShock, C:%ld}#\", pCookie);\n#else\n\t\t\t\t\t\t\tresult = false;\n#endif FAKE_IT\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n#if FAKE_IT\n\t\t\t\t\tsprintf(pName, \"#{V:Macally, P:%ld, C:%ld}#\", pProductID, pCookie); break;\n#else\n\t\t\t\t\tresult = false;\n#endif FAKE_IT\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase kMacsense:\n\t\t\tswitch (pProductID) {\n\t\t\t\tcase kFunPadF107:\n\t\t\t\t\tresult = true;\n\t\t\t\t\tswitch (pCookie) {\n\t\t\t\t\t\tcase  3: sprintf(pName, \"Button 1\"); break;\n\t\t\t\t\t\tcase  4: sprintf(pName, \"Button 2\"); break;\n\t\t\t\t\t\tcase  5: sprintf(pName, \"Button 3\"); break;\n\t\t\t\t\t\tcase  6: sprintf(pName, \"Button 4\"); break;\n\t\t\t\t\t\tcase  7: sprintf(pName, \"L1 Trigger\"); break;\n\t\t\t\t\t\tcase  8: sprintf(pName, \"R1 Trigger\"); break;\n\t\t\t\t\t\tcase  9: sprintf(pName, \"L2 Trigger\"); break;\n\t\t\t\t\t\tcase 10: sprintf(pName, \"R2 Trigger\"); break;\n\t\t\t\t\t\tcase 11: sprintf(pName, \"Right Stick X-Axis\"); break;\n\t\t\t\t\t\tcase 12: sprintf(pName, \"Right Stick Y-Axis\"); break;\n\t\t\t\t\t\tcase 13: sprintf(pName, \"Left Stick X-Axis\"); break;\n\t\t\t\t\t\tcase 14: sprintf(pName, \"Left Stick Y-Axis\"); break;\n\t\t\t\t\t\tcase 15: sprintf(pName, \"Hat Switch\"); break;\n\t\t\t\t\t\tdefault:\n#if FAKE_IT\n\t\t\t\t\t\t\tsprintf(pName, \"#{V:Macsense, P:FunPad F-107, C:%ld}#\", pCookie);\n#else\n\t\t\t\t\t\t\tresult = false;\n#endif FAKE_IT\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\tdefault:\n#if FAKE_IT\n\t\t\t\t\tsprintf(pName, \"#{V:Macsense, P:%ld, C:%ld}#\", pProductID, pCookie);\n#else\n\t\t\t\t\tresult = false;\n#endif FAKE_IT\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n#if FAKE_IT\n\t\t\tsprintf(pName, \"#{V:%ld, P:%ld, C:%ld}#\", pVendorID, pProductID, pCookie);\n#else\n\t\t\tresult = false;\n#endif FAKE_IT\n\t\t\tbreak;\n\t}\n\treturn result;\n}\n\n\n// ---------------------------------\n// set name from vendor id/product id & usage look up\nBoolean HIDGetElementNameFromVendorProductUsage (const long pVendorID, const long pProductID, const long pUsagePage, const long pUsage, char * pName)\n{\n\tBoolean result = false;\n\t*pName = 0; // clear name\n\n\tif (xml_search_usage(pVendorID, pProductID, pUsagePage, pUsage, pName))\n\t\treturn true;\n\n#if FAKE_IT\n\tsprintf(pName, \"#{V:%ld, P:%ld, U:%ld:%ld}#\", pVendorID, pProductID, pUsagePage, pUsage);\n\tresult = true;\n#endif\n\t\n\treturn result;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/JoystickTabletPlugin/HID_Name_Lookup.h",
    "content": "/*\n\tFile:\t\tHID_Name_Lookup.h\n\n\tContains:\tDefinition of the HID device name lookup functions for the HID utilites.\n    \n\tDRI: George Warner\n\n\tCopyright:\tCopyright  2002 Apple Computer, Inc., All Rights Reserved\n\n\tDisclaimer:\tIMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc.\n\t\t\t\t(\"Apple\") in consideration of your agreement to the following terms, and your\n\t\t\t\tuse, installation, modification or redistribution of this Apple software\n\t\t\t\tconstitutes acceptance of these terms.  If you do not agree with these terms,\n\t\t\t\tplease do not use, install, modify or redistribute this Apple software.\n\n\t\t\t\tIn consideration of your agreement to abide by the following terms, and subject\n\t\t\t\tto these terms, Apple grants you a personal, non-exclusive license, under Apples\n\t\t\t\tcopyrights in this original Apple software (the \"Apple Software\"), to use,\n\t\t\t\treproduce, modify and redistribute the Apple Software, with or without\n\t\t\t\tmodifications, in source and/or binary forms; provided that if you redistribute\n\t\t\t\tthe Apple Software in its entirety and without modifications, you must retain\n\t\t\t\tthis notice and the following text and disclaimers in all such redistributions of\n\t\t\t\tthe Apple Software.  Neither the name, trademarks, service marks or logos of\n\t\t\t\tApple Computer, Inc. may be used to endorse or promote products derived from the\n\t\t\t\tApple Software without specific prior written permission from Apple.  Except as\n\t\t\t\texpressly stated in this notice, no other rights or licenses, express or implied,\n\t\t\t\tare granted by Apple herein, including but not limited to any patent rights that\n\t\t\t\tmay be infringed by your derivative works or by other works in which the Apple\n\t\t\t\tSoftware may be incorporated.\n\n\t\t\t\tThe Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE MAKES NO\n\t\t\t\tWARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED\n\t\t\t\tWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n\t\t\t\tPURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN\n\t\t\t\tCOMBINATION WITH YOUR PRODUCTS.\n\n\t\t\t\tIN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR\n\t\t\t\tCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n\t\t\t\tGOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n\t\t\t\tARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION\n\t\t\t\tOF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT\n\t\t\t\t(INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN\n\t\t\t\tADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n#ifndef _HID_Name_Lookup_h_\n#define _HID_Name_Lookup_h_\n\n#include \"HID_Utilities.h\"\n\n// ==================================\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n// ==================================\n// Note: Now that as the device data has now been moved into external .XML files these\n//\tconstansts should no longer be used. They will eventually be eliminated from this header.\n\n#define kMicrosoft \t\t\t\t1118\n#define kSideWinderFFB2 \t\t27\n\n#define kLogitech \t\t\t\t1133\n#define kWingManStrikeForce3D \t49797\n\t\n#define kMacally \t\t\t\t8738\n#define kiShock \t\t\t\t16400\n#define kiShockIIFFB \t\t\t16416\n\n#define kMacsense \t\t\t\t1635\n#define kFunPadF107\t\t\t\t38916\n// ==================================\n\n// set name from vendor id/product id look up (using cookies)\nextern Boolean HIDGetElementNameFromVendorProductCookie (const long vendorID, const long productID, const long cookie, char * pName);\n\n// set name from vendor id/product id look up (using usage page & usage)\nextern Boolean HIDGetElementNameFromVendorProductUsage (const long vendorID, const long productID, const long pUsagePage, const long pUsage, char * pName);\n// ==================================\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif // _HID_Name_Lookup_h_\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/JoystickTabletPlugin/HID_Queue_Utilities.c",
    "content": "/*\n\tFile:\t\tHID_Queue_Utilities.c\n\n\tContains:\tImplementation of the HID queue functions for the HID utilites.\n    \n\tDRI: George Warner\n\n\tCopyright:\tCopyright  2002 Apple Computer, Inc., All Rights Reserved\n\n\tDisclaimer:\tIMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc.\n\t\t\t\t(\"Apple\") in consideration of your agreement to the following terms, and your\n\t\t\t\tuse, installation, modification or redistribution of this Apple software\n\t\t\t\tconstitutes acceptance of these terms.  If you do not agree with these terms,\n\t\t\t\tplease do not use, install, modify or redistribute this Apple software.\n\n\t\t\t\tIn consideration of your agreement to abide by the following terms, and subject\n\t\t\t\tto these terms, Apple grants you a personal, non-exclusive license, under Apples\n\t\t\t\tcopyrights in this original Apple software (the \"Apple Software\"), to use,\n\t\t\t\treproduce, modify and redistribute the Apple Software, with or without\n\t\t\t\tmodifications, in source and/or binary forms; provided that if you redistribute\n\t\t\t\tthe Apple Software in its entirety and without modifications, you must retain\n\t\t\t\tthis notice and the following text and disclaimers in all such redistributions of\n\t\t\t\tthe Apple Software.  Neither the name, trademarks, service marks or logos of\n\t\t\t\tApple Computer, Inc. may be used to endorse or promote products derived from the\n\t\t\t\tApple Software without specific prior written permission from Apple.  Except as\n\t\t\t\texpressly stated in this notice, no other rights or licenses, express or implied,\n\t\t\t\tare granted by Apple herein, including but not limited to any patent rights that\n\t\t\t\tmay be infringed by your derivative works or by other works in which the Apple\n\t\t\t\tSoftware may be incorporated.\n\n\t\t\t\tThe Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE MAKES NO\n\t\t\t\tWARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED\n\t\t\t\tWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n\t\t\t\tPURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN\n\t\t\t\tCOMBINATION WITH YOUR PRODUCTS.\n\n\t\t\t\tIN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR\n\t\t\t\tCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n\t\t\t\tGOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n\t\t\t\tARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION\n\t\t\t\tOF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT\n\t\t\t\t(INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN\n\t\t\t\tADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n//#include <IOKit/hid/IOHIDDevice.h>\n\n#include \"HID_Utilities_Internal.h\"\n#include \"HID_Utilities_External.h\"\n\n// ==================================\n// compiler directives\n// ==================================\n#define USE_ASYNC_EVENTS TRUE\n#define REPORT_ERRORS FALSE\n// ==================================\n#if REPORT_ERRORS\n#define HIDREPORTERRORNUM(s,n) HIDReportErrorNum(s,n)\n#define HIDREPORTERROR(s)\t\tHIDReportError(s)\n#else\n#define HIDREPORTERRORNUM(s,n)\tdo {} while (false)\n#define HIDREPORTERROR(s)\t\tdo {} while (false)\n#endif\n// ==================================\n// private functions\n// ==================================\n\n// creates a queue for a device\n\nstatic IOReturn hid_CreateQueue (pRecDevice pDevice)\n{\n    IOReturn result = kIOReturnError;\t// assume failure (pessimist!)\n\n\tif (HIDIsValidDevice(pDevice))\n\t{\n\t\tif (NULL == pDevice->queue) // do we already have a queue\n\t\t{\n\t\t\tif (NULL != pDevice->interface)\n\t\t\t{\n\t\t\t\tpDevice->queue = (void *) (*(IOHIDDeviceInterface**) pDevice->interface)->allocQueue (pDevice->interface); // alloc queue\n\t\t\t\tif (pDevice->queue)\n\t\t\t\t{\n\t\t\t\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->create (pDevice->queue, 0, kDeviceQueueSize); // create actual queue\n\t\t\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\t\t\tHIDREPORTERRORNUM (\"hid_CreateQueue - Failed to create queue via create\", result);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tHIDREPORTERROR (\"hid_CreateQueue - Failed to alloc IOHIDQueueInterface ** via allocQueue\");\n\t\t\t\t\tresult = kIOReturnError; // synthesis error\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\tHIDREPORTERRORNUM (\"hid_CreateQueue - Device inteface does not exist for queue creation\", result);\n\t\t}\n\t}\n\telse\n\t\tHIDREPORTERRORNUM (\"hid_CreateQueue - Invalid Device\", result);\n    return result;\n}\n\n// ---------------------------------\n// returns true if queue is empty false otherwise\n// error if no device, empty if no queue\n\nstatic unsigned char hid_IsDeviceQueueEmpty (pRecDevice pDevice)\n{\n\tif (HIDIsValidDevice(pDevice))\t// need valid device\n\t{\n\t\tif (pDevice->queue) // and queue\n\t\t{\n\t\t\tpRecElement pElement = HIDGetFirstDeviceElement (pDevice, kHIDElementTypeIO);\n\t\t\twhile (pElement)\n\t\t\t{\n\t\t\t\tif ((*(IOHIDQueueInterface**) pDevice->queue)->hasElement (pDevice->queue, pElement->cookie))\n\t\t\t\t\treturn false;\n\t\t\t\tpElement = HIDGetNextDeviceElement (pElement, kHIDElementTypeIO);\n\t\t\t} \n\t\t}\n\t\telse\n\t\t\tHIDREPORTERROR (\"hid_IsDeviceQueueEmpty - no queue.\");\n\t}\n\telse\n\t\tHIDREPORTERROR (\"hid_IsDeviceQueueEmpty - Invalid device.\");\n\treturn true;   \n}\n\n// ---------------------------------\n// disposes and releases queue, sets queue to NULL,.\n// Note: will have no effect if device or queue do not exist\n\nstatic IOReturn hid_DisposeReleaseQueue (pRecDevice pDevice)\n{\n    IOReturn result = kIOReturnError;\t// assume failure (pessimist!)\n\n\tif (HIDIsValidDevice(pDevice))\t// need valid device\n\t{\n\t\tif (pDevice->queue) // and queue\n\t\t{\n\t\t\t// stop queue\n\t\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->stop (pDevice->queue);\n\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\tHIDREPORTERRORNUM (\"hid_DisposeReleaseQueue - Failed to stop queue.\", result);\n\t\t\t// dispose of queue\n\t\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->dispose (pDevice->queue);\n\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\tHIDREPORTERRORNUM (\"hid_DisposeReleaseQueue - Failed to dipose queue.\", result);\n\t\t\t// release the queue\n\t\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->Release (pDevice->queue);\n\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\tHIDREPORTERRORNUM (\"hid_DisposeReleaseQueue - Failed to release queue.\", result);\n\n\t\t\tpDevice->queue = NULL;\n\t\t}\n\t\telse\n\t\t\tHIDREPORTERROR (\"hid_DisposeReleaseQueue - no queue.\");\n\t}\n\telse\n\t\tHIDREPORTERROR (\"hid_DisposeReleaseQueue - Invalid device.\");\n    return result;\n}\n\n// ==================================\n// public functions\n\n// ---------------------------------\n// queues specific element, performing any device queue set up required\n// queue is started and ready to return events on exit from this function\n\nunsigned long  HIDQueueElement (pRecDevice pDevice, pRecElement pElement)\n{\n    IOReturn result = kIOReturnError;\t// assume failure (pessimist!)\n\n\tif (HIDIsValidElement(pDevice,pElement))\n\t{\n\t\tif (NULL == pDevice->interface) // must have interface\n\t\t{\n\t\t\tHIDREPORTERROR (\"HIDQueueElement - Device does not have interface.\");\n\t\t\treturn kIOReturnError;\n\t\t}\n\t\tif (NULL == pDevice->queue) // if no queue create queue\n\t\t\tresult = hid_CreateQueue (pDevice);\n\t\tif ((kIOReturnSuccess != result) || (NULL == pDevice->queue))\n\t\t{\n\t\t\tHIDREPORTERRORNUM (\"HIDQueueElement - problem creating queue.\", result);\n\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\treturn result;\n\t\t\telse\n\t\t\t\treturn kIOReturnError;\n\t\t}\n\n\t\t// stop queue\n\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->stop (pDevice->queue);\n\t\tif (kIOReturnSuccess != result)\n\t\t\tHIDREPORTERROR (\"HIDQueueElement - Failed to stop queue.\");\n\n\t\t// queue element\n\t\tif (!(*(IOHIDQueueInterface**) pDevice->queue)->hasElement (pDevice->queue, pElement->cookie))\n\t\t{\n\t\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->addElement (pDevice->queue, pElement->cookie, 0);\n\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\tHIDREPORTERROR (\"HIDQueueElement - Failed to add Element to queue.\");\n\t\t}\n\n\t\t// restart queue\n\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->start (pDevice->queue);\n\t\tif (kIOReturnSuccess != result)\n\t\t\tHIDREPORTERROR (\"HIDQueueElement - Failed to start queue.\");\n\t}\n\telse\n\t{\n\t\tHIDREPORTERROR (\"HIDQueueElement - Invalid Device and/or element.\");\n        return kIOReturnBadArgument;\n\t}\n\n   return result;\n}\n\n// ---------------------------------\n// adds all elements to queue, performing any device queue set up required\n// queue is started and ready to return events on exit from this function\n\nunsigned long  HIDQueueDevice (pRecDevice pDevice)\n{\n    IOReturn result = kIOReturnError;\t// assume failure (pessimist!)\n    pRecElement pElement;\n\n\tif (HIDIsValidDevice(pDevice))\n\t{\n\t\t// error checking\n\t\tif (NULL == pDevice)\n\t\t{\n\t\t\tHIDREPORTERROR (\"HIDQueueDevice - Device does not exist.\");\n\t\t\treturn kIOReturnBadArgument;\n\t\t}\n\t\tif (NULL == pDevice->interface) // must have interface\n\t\t{\n\t\t\tHIDREPORTERROR (\"HIDQueueDevice - Device does not have interface.\");\n\t\t\treturn kIOReturnError;\n\t\t}\n\t\tif (NULL == pDevice->queue) // if no queue create queue\n\t\t\tresult = hid_CreateQueue (pDevice);\n\t\tif ((kIOReturnSuccess != result) || (NULL == pDevice->queue))\n\t\t{\n\t\t\tHIDREPORTERRORNUM (\"HIDQueueDevice - problem creating queue.\", result);\n\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\treturn result;\n\t\t\telse\n\t\t\t\treturn kIOReturnError;\n\t\t}\n\n\t\t// stop queue\n\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->stop (pDevice->queue);\n\t\tif (kIOReturnSuccess != result)\n\t\t\tHIDREPORTERRORNUM (\"HIDQueueDevice - Failed to stop queue.\", result);\n\n\t\t// queue element\n  // pElement = HIDGetFirstDeviceElement (pDevice, kHIDElementTypeIO);\n\t\tpElement = HIDGetFirstDeviceElement (pDevice, kHIDElementTypeInput | kHIDElementTypeFeature);\n\n\t\twhile (pElement)\n\t\t{\n\t\t\tif (!(*(IOHIDQueueInterface**) pDevice->queue)->hasElement (pDevice->queue, pElement->cookie))\n\t\t\t{\n\t\t\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->addElement (pDevice->queue, pElement->cookie, 0);\n\t\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\t\tHIDREPORTERRORNUM (\"HIDQueueDevice - Failed to add element to queue.\", result);\n\t\t\t}\n\t\t\t// pElement = HIDGetNextDeviceElement (pElement, kHIDElementTypeIO);\n\t\t\tpElement = HIDGetNextDeviceElement (pElement, kHIDElementTypeInput | kHIDElementTypeFeature);\n\t\t}\n\n\t\t// start queue\n\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->start (pDevice->queue);\n\t\tif (kIOReturnSuccess != result)\n\t\t\tHIDREPORTERRORNUM (\"HIDQueueDevice - Failed to start queue.\", result);\n\t\t\n\t}\n\telse\n\t\tHIDREPORTERROR (\"HIDQueueDevice - Invalid device.\");\n\n    return result;\n}\n\n// ---------------------------------\n// removes element for queue, if last element in queue will release queue and closes device interface\n\nunsigned long  HIDDequeueElement (pRecDevice pDevice, pRecElement pElement)\n{\n    IOReturn result = kIOReturnError;\t// assume failure (pessimist!)\n\n\tif (HIDIsValidElement(pDevice,pElement))\n\t{\n\t\tif (!pDevice || !pElement)\n\t\t\tresult = kIOReturnBadArgument;\n\t\telse\n\t\t{\n\t\t\tif ((pDevice->interface) && (pDevice->queue))\n\t\t\t{\n\t\t\t\t// stop queue\n\t\t\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->stop (pDevice->queue);\n\t\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\t\tHIDREPORTERRORNUM (\"HIDDequeueElement - Failed to stop queue.\", result);\n\n\t\t\t\tif ((*(IOHIDQueueInterface**) pDevice->queue)->hasElement (pDevice->queue, pElement->cookie)) // if has element then remove\n\t\t\t\t{\n\t\t\t\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->removeElement (pDevice->queue, pElement->cookie);\n\t\t\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\t\t\tHIDREPORTERRORNUM (\"HIDDequeueElement - Failed to add element to queue\", result);\n\t\t\t\t}\n\n\t\t\t\tif (hid_IsDeviceQueueEmpty (pDevice)) // release device queue and close interface if queue empty\n\t\t\t\t{\n\t\t\t\t\tresult = hid_DisposeReleaseQueue (pDevice);\n\t\t\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\t\t\tHIDREPORTERRORNUM (\"HIDDequeueElement - Failed to dispose and release queue.\", result);\n\t\t\t\t}\n\t\t\t\telse // not empty so restart queue\n\t\t\t\t{\n\t\t\t\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->start (pDevice->queue);\n\t\t\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\t\t\tHIDREPORTERRORNUM (\"HIDDequeueElement - Failed to start queue.\", result);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tHIDREPORTERROR (\"HIDDequeueElement - No device inteface or queue.\");\n\t\t\t\treturn kIOReturnError;\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t\tHIDREPORTERROR (\"HIDDequeueElement - Invalid device.\");\n\n    return result;\n}\n\n// ---------------------------------\n// completely removes all elements from queue and releases queue and closes device interface\n// does not release device interfaces, application must call HIDReleaseDeviceList on exit\n\nunsigned long  HIDDequeueDevice (pRecDevice pDevice)\n{\n    IOReturn result = kIOReturnSuccess;\n\n    if (HIDIsValidDevice(pDevice))\n\t{\n\t\tif ((pDevice->interface) && (pDevice->queue))\n\t\t{\n\t\t\t// iterate through elements and if queued, remove\n\t\t\tpRecElement pElement = HIDGetFirstDeviceElement (pDevice, kHIDElementTypeIO);\n\t\t\twhile (pElement)\n\t\t\t{\n\t\t\t\tif ((*(IOHIDQueueInterface**) pDevice->queue)->hasElement (pDevice->queue, pElement->cookie))\n\t\t\t\t{\n\t\t\t\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->removeElement (pDevice->queue, pElement->cookie);\n\t\t\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\t\t\tHIDREPORTERRORNUM (\"HIDDequeueDevice - Failed to remove element from queue.\", result);\n\t\t\t\t}\n\t\t\t\tpElement = HIDGetNextDeviceElement (pElement, kHIDElementTypeIO);\n\t\t\t}\n\t\t}\n\t\t// ensure queue is disposed and released\n\t\t// interface will be closed and released on call to HIDReleaseDeviceList\n\t\tresult = hid_DisposeReleaseQueue (pDevice);\n\t\tif (kIOReturnSuccess != result)\n\t\t\tHIDREPORTERRORNUM (\"removeElement - Failed to dispose and release queue.\", result);\n#if USE_ASYNC_EVENTS\n\t\telse if (NULL != pDevice->queueRunLoopSource)\n\t\t{\n\t\t\tif (CFRunLoopContainsSource(CFRunLoopGetCurrent(), pDevice->queueRunLoopSource, kCFRunLoopDefaultMode))\n\t\t\t\tCFRunLoopRemoveSource(CFRunLoopGetCurrent(), pDevice->queueRunLoopSource, kCFRunLoopDefaultMode);\n\t\t\tCFRelease(pDevice->queueRunLoopSource);\n\t\t\tpDevice->queueRunLoopSource = NULL;\n\t\t}\n#endif USE_ASYNC_EVENTS\n\t}\n\telse\n\t{\n\t\tHIDREPORTERROR (\"HIDDequeueDevice - Invalid device.\");\n\t\tresult = kIOReturnBadArgument;\n\t}\n    return result;\n}\n\n// ---------------------------------\n// releases all device queues for quit or rebuild (must be called)\n// does not release device interfaces, application must call HIDReleaseDeviceList on exit\n\nunsigned long HIDReleaseAllDeviceQueues (void)\n{\n    IOReturn result = kIOReturnBadArgument;\n    pRecDevice pDevice = HIDGetFirstDevice ();\n\n    while (pDevice)\n    {\n        result = HIDDequeueDevice (pDevice);\n        if (kIOReturnSuccess != result)\n            HIDREPORTERRORNUM (\"HIDReleaseAllDeviceQueues - Could not dequeue device.\", result);\n        pDevice = HIDGetNextDevice (pDevice);\n    }\n    return result;\n}\n\n// ---------------------------------\n// Closes and releases interface to device, should be done prior to exting application\n// Note: will have no affect if device or interface do not exist\n// application will \"own\" the device if interface is not closed\n// (device may have to be plug and re-plugged in different location to get it working again without a restart)\n\nunsigned long HIDCloseReleaseInterface (pRecDevice pDevice)\n{\n\tIOReturn result = kIOReturnSuccess;\n\t\n\tif (HIDIsValidDevice(pDevice) && (NULL != pDevice->interface))\n\t{\n\t\t// close the interface\n\t\tresult = (*(IOHIDDeviceInterface**) pDevice->interface)->close (pDevice->interface);\n\t\tif (kIOReturnNotOpen == result)\n\t\t{\n\t\t\t//  do nothing as device was not opened, thus can't be closed\n\t\t}\n\t\telse if (kIOReturnSuccess != result)\n\t\t\tHIDREPORTERRORNUM (\"HIDCloseReleaseInterface - Failed to close IOHIDDeviceInterface.\", result);\n\t\t//release the interface\n\t\tresult = (*(IOHIDDeviceInterface**) pDevice->interface)->Release (pDevice->interface);\n\t\tif (kIOReturnSuccess != result)\n\t\t\tHIDREPORTERRORNUM (\"HIDCloseReleaseInterface - Failed to release interface.\", result);\n\t\tpDevice->interface = NULL;\n\t}\t\n\treturn result;\n}      \n\n// ---------------------------------\n// Get the next event in the queue for a device\n// elements or entire device should be queued prior to calling this with HIDQueueElement or HIDQueueDevice\n// returns true if an event is avialable for the element and fills out *pHIDEvent structure, returns false otherwise\n// Note: kIOReturnUnderrun returned from getNextEvent indicates an empty queue not an error condition\n// Note: application should pass in a pointer to a IOHIDEventStruct cast to a void (for CFM compatibility)\n\nunsigned char HIDGetEvent (pRecDevice pDevice, void * pHIDEvent)\n{\n    IOReturn result = kIOReturnBadArgument;\n    AbsoluteTime zeroTime = {0,0};\n\n    if (HIDIsValidDevice(pDevice))\n\t{\n\t\tif (pDevice->queue)\n\t\t{\n\t\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->getNextEvent (pDevice->queue, (IOHIDEventStruct *)pHIDEvent, zeroTime, 0);\n\t\t\tif (kIOReturnUnderrun == result)\n\t\t\t\treturn false;  // no events in queue not an error per say\n\t\t\telse if (kIOReturnSuccess != result) // actual error versus just an empty queue\n\t\t\t\tHIDREPORTERRORNUM (\"HIDGetEvent - Could not get HID event via getNextEvent.\", result);\n\t\t\telse\n\t\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\tHIDREPORTERROR (\"HIDGetEvent - queue does not exist.\");\n\t}\n\telse\n\t\tHIDREPORTERROR (\"HIDGetEvent - invalid device.\");\n\n    return false; // did not get event\n}\n\n// ---------------------------------\n// returns current value for element, polling element\n// will return 0 on error conditions which should be accounted for by application\n\nlong HIDGetElementValue (pRecDevice pDevice, pRecElement pElement)\n{\n    IOReturn result = kIOReturnBadArgument;\n    IOHIDEventStruct hidEvent;\n\n\thidEvent.value = 0;\n    hidEvent.longValueSize = 0;\n\thidEvent.longValue = nil;\n\n\tif (HIDIsValidElement(pDevice, pElement))\n\t{\n\t\tif (NULL != pDevice->interface)\n\t\t{\n\t\t\t// ++ NOTE: If the element type is feature then use queryElementValue instead of getElementValue\n\t\t\tif (kIOHIDElementTypeFeature == pElement->type)\n\t\t\t{\n\t\t\t\tresult = (*(IOHIDDeviceInterface**) pDevice->interface)->queryElementValue (pDevice->interface, pElement->cookie, &hidEvent,0,NULL,NULL,NULL);\n\t\t\t\tif (kIOReturnUnsupported == result)\t// unless it's unsuported.\n\t\t\t\t\tgoto try_getElementValue;\n\t\t\t\telse if (kIOReturnSuccess != result)\n\t\t\t\t\tHIDREPORTERRORNUM (\"HIDGetElementValue - Could not get HID element value via queryElementValue.\", result);\n\t\t\t}\n\t\t\telse if (pElement->type <= kIOHIDElementTypeInput_ScanCodes)\n\t\t\t{\ntry_getElementValue:\n\t\t\t\tresult = (*(IOHIDDeviceInterface**) pDevice->interface)->getElementValue (pDevice->interface, pElement->cookie, &hidEvent);\n\t\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\t\tHIDREPORTERRORNUM (\"HIDGetElementValue - Could not get HID element value via getElementValue.\", result);\n\t\t\t}\n\t\t\t// on 10.0.x this returns the incorrect result for negative ranges, so fix it!!!\n   // this is not required on Mac OS X 10.1+\n\t\t\tif ((pElement->min < 0) && (hidEvent.value > pElement->max)) // assume range problem\n\t\t\t\thidEvent.value = hidEvent.value + pElement->min - pElement->max - 1;\n\t\t}\n\t\telse\n\t\t\tHIDREPORTERROR (\"HIDGetElementValue - no interface for device.\");\n\t}\n\telse\n\t\tHIDREPORTERROR (\"HIDGetElementValue - invalid device and/or element.\");\n\n    // record min and max for auto scale and auto ...\n    if (hidEvent.value < pElement->calMin)\n        pElement->calMin = hidEvent.value; \n    if (hidEvent.value > pElement->calMax)\n        pElement->calMax = hidEvent.value; \n\n    // auto user scale\n    return hidEvent.value;\n}\n\n// ---------------------------------\n// Set an elements value\n// NOTE: This should only be used when a single element of a report needs to be sent.\n// If multiple elements are to be send then transactions should be used.\n\nlong HIDSetElementValue (pRecDevice pDevice, pRecElement pElement,void* pIOHIDEvent)\n{\n\tIOHIDEventStruct* pMyIOHIDEvent = (IOHIDEventStruct*) pIOHIDEvent;\n    IOReturn result = kIOReturnError;\t// assume failure (pessimist!)\n\n\tif (HIDIsValidElement(pDevice, pElement))\n\t{\n\t\tif (NULL != pDevice->interface)\n\t\t{\n\t\t\tresult = (*(IOHIDDeviceInterface**) pDevice->interface)->setElementValue (pDevice->interface, pElement->cookie, pMyIOHIDEvent, -1, nil, nil, nil);\n\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\tHIDREPORTERRORNUM (\"HIDSetElementValue - Could not set HID element value via setElementValue.\", result);\n\t\t}\n\t\telse\n\t\t\tHIDREPORTERROR (\"HIDSetElementValue - no interface for device.\");\n\t}\n\telse\n\t\tHIDREPORTERROR (\"HIDSetElementValue - invalid device and/or element.\");\n\t\n    return result;\n}\n\n// ---------------------------------\n// Set a callback to be called when a queue goes from empty to non-empty\nlong HIDSetQueueCallback (pRecDevice pDevice, IOHIDCallbackFunction callback)\n{\n    IOReturn result = kIOReturnError;\t// assume failure (pessimist!)\n\n\tif (HIDIsValidDevice(pDevice))\n\t{\n#if USE_ASYNC_EVENTS\n\t\t// if we don't have a queue runloop source\n\t\tif (NULL == pDevice->queueRunLoopSource)\n\t\t{\n\t\t\t// then create one\n\t\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->createAsyncEventSource((void *) pDevice->queue,\n\t\t\t\t(CFRunLoopSourceRef*) &pDevice->queueRunLoopSource);\n\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\tHIDREPORTERRORNUM (\"HIDSetQueueCallback - Failed to createAsyncEventSource error: \", result);\n\t\t}\n\t\t// if we have one now\n\t\tif (NULL != pDevice->queueRunLoopSource)\n\t\t{\n\t\t\t// and it's not already attached to our runloop\n\t\t\tif (!CFRunLoopContainsSource(CFRunLoopGetCurrent(), pDevice->queueRunLoopSource, kCFRunLoopDefaultMode))\n\t\t\t\t// then attach it now.\n\t\t\t\tCFRunLoopAddSource(CFRunLoopGetCurrent(), pDevice->queueRunLoopSource, kCFRunLoopDefaultMode);\n\t\t}\n\n\t\t// now install our callback\n\t\tresult = (*(IOHIDQueueInterface**) pDevice->queue)->setEventCallout(pDevice->queue, callback, pDevice, pDevice);\n\t\tif (kIOReturnSuccess != result)\n\t\t\tHIDREPORTERRORNUM (\"HIDSetQueueCallback - Could not set HID queue callback via setEventCallout.\", result);\n#endif USE_ASYNC_EVENTS\n\t}\n\telse\n\t\tHIDREPORTERROR (\"HIDSetQueueCallback - invalid device and/or element.\");\n    return result;\n}\n\n#if 1\n// ---------------------------------\n// Get a report from a device\nlong HIDGetReport (pRecDevice pDevice,const IOHIDReportType reportType, const UInt32 reportID, void* reportBuffer, UInt32* reportBufferSize);\nlong HIDGetReport (pRecDevice pDevice,const IOHIDReportType reportType, const UInt32 reportID, void* reportBuffer, UInt32* reportBufferSize)\n{\n    IOReturn result = kIOReturnError;\t// assume failure (pessimist!)\n\n    if (HIDIsValidDevice(pDevice))\n    {\n\t\tif (NULL != pDevice->interface)\n\t\t{\n\t\t\tresult = (*(IOHIDDeviceInterface**) pDevice->interface)->getReport (pDevice->interface, reportType, reportID, reportBuffer, reportBufferSize, -1, nil, nil, nil);\n\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\tHIDREPORTERRORNUM (\"HIDGetReport - Could not getReport, error: \", result);\n\t\t}\n\t\telse\n\t\t\tHIDREPORTERROR (\"HIDGetReport - no interface for device.\");\n    }\n    else\n        HIDREPORTERROR (\"HIDGetReport - invalid device.\");\n\n    return result;\n}\n\n// ---------------------------------\n// Send a report to a device\nlong HIDSetReport (pRecDevice pDevice,const IOHIDReportType reportType, const UInt32 reportID, void* reportBuffer, const UInt32 reportBufferSize);\nlong HIDSetReport (pRecDevice pDevice,const IOHIDReportType reportType, const UInt32 reportID, void* reportBuffer, const UInt32 reportBufferSize)\n{\n    IOReturn result = kIOReturnError;\t// assume failure (pessimist!)\n\n    if (HIDIsValidDevice(pDevice))\n    {\n\t\tif (NULL != pDevice->interface)\n\t\t{\n\t\t\tresult = (*(IOHIDDeviceInterface**) pDevice->interface)->setReport (pDevice->interface, reportType, reportID, reportBuffer, reportBufferSize, -1, nil, nil, nil);\n\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\tHIDREPORTERRORNUM (\"HIDGetReport - Could not setReport; error: \", result);\n\t\t}\n\t\telse\n\t\t\tHIDREPORTERROR (\"HIDGetReport - no interface for device.\");\n    }\n    else\n        HIDREPORTERROR (\"HIDGetReport - invalid device.\");\n\n    return result;\n}\n#endif"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/JoystickTabletPlugin/HID_Queue_Utilities.h",
    "content": "/*\n\tFile:\t\tHID_Queue_Utilities.h\n\n\tContains:\tDefinition of the HID queue functions for the HID utilites.\n    \n\tDRI: George Warner\n\n\tCopyright:\tCopyright  2002 Apple Computer, Inc., All Rights Reserved\n\n\tDisclaimer:\tIMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc.\n\t\t\t\t(\"Apple\") in consideration of your agreement to the following terms, and your\n\t\t\t\tuse, installation, modification or redistribution of this Apple software\n\t\t\t\tconstitutes acceptance of these terms.  If you do not agree with these terms,\n\t\t\t\tplease do not use, install, modify or redistribute this Apple software.\n\n\t\t\t\tIn consideration of your agreement to abide by the following terms, and subject\n\t\t\t\tto these terms, Apple grants you a personal, non-exclusive license, under Apples\n\t\t\t\tcopyrights in this original Apple software (the \"Apple Software\"), to use,\n\t\t\t\treproduce, modify and redistribute the Apple Software, with or without\n\t\t\t\tmodifications, in source and/or binary forms; provided that if you redistribute\n\t\t\t\tthe Apple Software in its entirety and without modifications, you must retain\n\t\t\t\tthis notice and the following text and disclaimers in all such redistributions of\n\t\t\t\tthe Apple Software.  Neither the name, trademarks, service marks or logos of\n\t\t\t\tApple Computer, Inc. may be used to endorse or promote products derived from the\n\t\t\t\tApple Software without specific prior written permission from Apple.  Except as\n\t\t\t\texpressly stated in this notice, no other rights or licenses, express or implied,\n\t\t\t\tare granted by Apple herein, including but not limited to any patent rights that\n\t\t\t\tmay be infringed by your derivative works or by other works in which the Apple\n\t\t\t\tSoftware may be incorporated.\n\n\t\t\t\tThe Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE MAKES NO\n\t\t\t\tWARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED\n\t\t\t\tWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n\t\t\t\tPURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN\n\t\t\t\tCOMBINATION WITH YOUR PRODUCTS.\n\n\t\t\t\tIN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR\n\t\t\t\tCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n\t\t\t\tGOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n\t\t\t\tARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION\n\t\t\t\tOF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT\n\t\t\t\t(INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN\n\t\t\t\tADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n#ifndef _HID_Queue_Utilities_h_\n#define _HID_Queue_Utilities_h_\n\n#include \"HID_Utilities.h\"\n\n// ==================================\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n// ==================================\n\nenum\n{\n    kDeviceQueueSize = 50\t// this is wired kernel memory so should be set to as small as possible\n\t\t\t\t\t\t\t// but should account for the maximum possible events in the queue\n\t\t\t\t\t\t\t// USB updates will likely occur at 100 Hz so one must account for this rate of\n\t\t\t\t\t\t\t// if states change quickly (updates are only posted on state changes)\n};\n\n// ==================================\n// queues specific element, performing any device queue set up required\nextern unsigned long  HIDQueueElement (pRecDevice pDevice, pRecElement pElement);\n\n// adds all elements to queue, performing any device queue set up required\nextern unsigned long  HIDQueueDevice (pRecDevice pDevice);\n\n// removes element for queue, if last element in queue will release queue and device\nextern unsigned long  HIDDequeueElement (pRecDevice pDevice, pRecElement pElement);\n\n// completely removes all elements from queue and releases queue and device\nextern unsigned long  HIDDequeueDevice (pRecDevice pDevice);\n\n// releases all device queues for quit or rebuild (must be called)\nextern unsigned long  HIDReleaseAllDeviceQueues (void);\n\n// releases interface to device, should be done prior to exiting application (called from HIDReleaseDeviceList)\nextern unsigned long  HIDCloseReleaseInterface (pRecDevice pDevice);\n\n// returns true if an event is avialable for the element and fills out *pHIDEvent structure, returns false otherwise\n// pHIDEvent is a poiner to a IOHIDEventStruct, using void here for compatibility, users can cast a required\nextern unsigned char HIDGetEvent (pRecDevice pDevice, void * pHIDEvent);\n\n// returns current value for element, creating device interface as required, polling element\nextern long HIDGetElementValue (pRecDevice pDevice, pRecElement pElement);\n\n// Set an elements value\n// NOTE: This should only be used when a single element report needs to be sent.\n// If multiple elements reports are to be send then transactions should be used.\nextern long HIDSetElementValue (pRecDevice pDevice, pRecElement pElement,IOHIDEventStruct* pIOHIDEvent);\n\n// Set a callback to be called when a queue goes from empty to non-empty\nextern long HIDSetQueueCallback (pRecDevice pDevice, IOHIDCallbackFunction callback);\n\n#if 0\n// Get a report from a device\nextern long HIDGetReport (pRecDevice pDevice,const IOHIDReportType reportType, const UInt32 reportID, void* reportBuffer, UInt32* reportBufferSize);\n\n// Send a report to a device\nextern long HIDSetReport (pRecDevice pDevice,const IOHIDReportType reportType, const UInt32 reportID, void* reportBuffer, const UInt32 reportBufferSize);\n#endif\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif // _HID_Queue_Utilities_h_\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/JoystickTabletPlugin/HID_Utilities.c",
    "content": "/*\n\tFile:\t\tHID_Utilities.c\n\n\tContains:\tImplementation of HID Utilities\n    \n\tDRI: George Warner\n\n\tCopyright:\tCopyright  2002 Apple Computer, Inc., All Rights Reserved\n\n\tDisclaimer:\tIMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc.\n\t\t\t\t(\"Apple\") in consideration of your agreement to the following terms, and your\n\t\t\t\tuse, installation, modification or redistribution of this Apple software\n\t\t\t\tconstitutes acceptance of these terms.  If you do not agree with these terms,\n\t\t\t\tplease do not use, install, modify or redistribute this Apple software.\n\n\t\t\t\tIn consideration of your agreement to abide by the following terms, and subject\n\t\t\t\tto these terms, Apple grants you a personal, non-exclusive license, under Apples\n\t\t\t\tcopyrights in this original Apple software (the \"Apple Software\"), to use,\n\t\t\t\treproduce, modify and redistribute the Apple Software, with or without\n\t\t\t\tmodifications, in source and/or binary forms; provided that if you redistribute\n\t\t\t\tthe Apple Software in its entirety and without modifications, you must retain\n\t\t\t\tthis notice and the following text and disclaimers in all such redistributions of\n\t\t\t\tthe Apple Software.  Neither the name, trademarks, service marks or logos of\n\t\t\t\tApple Computer, Inc. may be used to endorse or promote products derived from the\n\t\t\t\tApple Software without specific prior written permission from Apple.  Except as\n\t\t\t\texpressly stated in this notice, no other rights or licenses, express or implied,\n\t\t\t\tare granted by Apple herein, including but not limited to any patent rights that\n\t\t\t\tmay be infringed by your derivative works or by other works in which the Apple\n\t\t\t\tSoftware may be incorporated.\n\n\t\t\t\tThe Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE MAKES NO\n\t\t\t\tWARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED\n\t\t\t\tWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n\t\t\t\tPURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN\n\t\t\t\tCOMBINATION WITH YOUR PRODUCTS.\n\n\t\t\t\tIN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR\n\t\t\t\tCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n\t\t\t\tGOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n\t\t\t\tARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION\n\t\t\t\tOF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT\n\t\t\t\t(INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN\n\t\t\t\tADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n#include \"HID_Utilities_Internal.h\"\n#include \"HID_Utilities_External.h\"\n\n#include <IOKit/IOCFPlugIn.h>\n#include <IOKit/IOKitLib.h>\n#include <IOKit/IOMessage.h>\n#include <IOKit/hid/IOHIDUsageTables.h>\n\n//================================================================================================\n#define USE_NOTIFICATIONS 1\n//================================================================================================\n// local (static) functions\n//================================================================================================\nstatic void hid_GetCollectionElements (CFMutableDictionaryRef deviceProperties, pRecElement *ppCurrentCollection);\nstatic pRecDevice hid_DisposeDevice (pRecDevice ppDevice);\n//================================================================================================\n//   globals\n//================================================================================================\n#if USE_NOTIFICATIONS\nstatic IONotificationPortRef\tgNotifyPort;\nstatic io_iterator_t\t\tgAddedIter;\nstatic CFRunLoopRef\t\tgRunLoop;\n#endif USE_NOTIFICATIONS\n\n// for element retrieval\nstatic pRecDevice gCurrentGetDevice = NULL;\nstatic Boolean gAddAsChild = false;\nstatic int gDepth = false;\n\nstatic pRecDevice gpDeviceList = NULL;\nstatic UInt32 gNumDevices = 0;\n\n#pragma mark private functions\n// ==================================\n// private functions\n\nstatic UInt32 hid_CountCurrentDevices (void);\n\n// extracts actual specific element information from each element CF dictionary entry\nstatic void hid_GetElementInfo (CFTypeRef refElement, pRecElement pElement)\n{\n\tlong number;\n\tCFTypeRef refType;\n\t// type, usagePage, usage already stored\n\trefType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementCookieKey));\n\tif (refType && CFNumberGetValue (refType, kCFNumberLongType, &number))\n\t\tpElement->cookie = (IOHIDElementCookie) number;\n\telse\n\t\tpElement->cookie = (IOHIDElementCookie) 0;\n\n\trefType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementMinKey));\n\tif (refType && CFNumberGetValue (refType, kCFNumberLongType, &number))\n\t\tpElement->min = number;\n\telse\n\t\tpElement->min = 0;\n\n\tpElement->calMax = pElement->min;\n\tpElement->userMin = kDefaultUserMin;\n\n\trefType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementMaxKey));\n\tif (refType && CFNumberGetValue (refType, kCFNumberLongType, &number))\n\t\tpElement->max = number;\n\telse\n\t\tpElement->max = 0;\n\n\tpElement->calMin = pElement->max;\n\tpElement->userMax = kDefaultUserMax;\n\n\trefType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementScaledMinKey));\n\tif (refType && CFNumberGetValue (refType, kCFNumberLongType, &number))\n\t\tpElement->scaledMin = number;\n\telse\n\t\tpElement->scaledMin = 0;\n\n\trefType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementScaledMaxKey));\n\tif (refType && CFNumberGetValue (refType, kCFNumberLongType, &number))\n\t\tpElement->scaledMax = number;\n\telse\n\t\tpElement->scaledMax = 0;\n\n\trefType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementSizeKey));\n\tif (refType && CFNumberGetValue (refType, kCFNumberLongType, &number))\n\t\tpElement->size = number;\n\telse\n\t\tpElement->size = 0;\n\n\trefType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementIsRelativeKey));\n\tif (refType)\n\t\tpElement->relative = CFBooleanGetValue (refType);\n\telse\n\t\tpElement->relative = 0;\n\n\trefType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementIsWrappingKey));\n\tif (refType)\n\t\tpElement->wrapping = CFBooleanGetValue (refType);\n\telse\n\t\tpElement->wrapping = false;\n\n\trefType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementIsNonLinearKey));\n\tif (refType)\n\t\tpElement->nonLinear = CFBooleanGetValue (refType);\n\telse\n\t\tpElement->wrapping = false;\n\n#ifdef kIOHIDElementHasPreferredStateKey\n\trefType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementHasPreferredStateKey));\n#else // Mac OS X 10.0 has spelling error\n\trefType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementHasPreferedStateKey));\n#endif\n\tif (refType)\n\t\tpElement->preferredState = CFBooleanGetValue (refType);\n\telse\n\t\tpElement->preferredState = false;\n\n\trefType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementHasNullStateKey));\n\tif (refType)\n\t\tpElement->nullState = CFBooleanGetValue (refType);\n\telse\n\t\tpElement->nullState = false;\n\n\trefType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementUnitKey));\n\tif (refType && CFNumberGetValue (refType, kCFNumberLongType, &number))\n\t\tpElement->units = number;\n\telse\n\t\tpElement->units = 0;\n\n\trefType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementUnitExponentKey));\n\tif (refType && CFNumberGetValue (refType, kCFNumberLongType, &number))\n\t\tpElement->unitExp = number;\n\telse\n\t\tpElement->unitExp = 0;\n\n\trefType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementNameKey));\n\tif (refType)\n\t\tif (!CFStringGetCString (refType, pElement->name, 256, CFStringGetSystemEncoding ()))\n\t\t\tHIDReportError (\"CFStringGetCString error retrieving pElement->name.\");\n\tif (!*pElement->name)\n\t{\n\t\t// set name from vendor id, product id & usage info look up\n\t\tif (!HIDGetElementNameFromVendorProductUsage (gCurrentGetDevice->vendorID, gCurrentGetDevice->productID, pElement->usagePage, pElement->usage, pElement->name))\n\t\t{\n\t\t\t// set name from vendor id/product id look up\n\t\t\tHIDGetElementNameFromVendorProductCookie (gCurrentGetDevice->vendorID, gCurrentGetDevice->productID, (long) pElement->cookie, pElement->name);\n\t\t\tif (!*pElement->name) { // if no name\n\t\t\t\tHIDGetUsageName (pElement->usagePage, pElement->usage, pElement->name);\n\t\t\t\tif (!*pElement->name) // if not usage\n\t\t\t\t\tsprintf (pElement->name, \"Element\");\n\t\t\t}\n\t\t}\n\t}\n}\n\n// ---------------------------------\n// examines CF dictionary vlaue in device element hierarchy to determine if it is element of interest or a collection of more elements\n// if element of interest allocate storage, add to list and retrieve element specific info\n// if collection then pass on to deconstruction collection into additional individual elements\n\nstatic void hid_AddElement (CFTypeRef refElement, pRecElement * ppElementCurrent)\n{\n\tpRecDevice pDevice = gCurrentGetDevice;\n    pRecElement pElement = NULL;\n    long elementType, usagePage, usage;\n    CFTypeRef refElementType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementTypeKey));\n    CFTypeRef refUsagePage = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementUsagePageKey));\n    CFTypeRef refUsage = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementUsageKey));\n\n    if (refElementType)\n\t\tCFNumberGetValue (refElementType, kCFNumberLongType, &elementType);\n\tif (refUsagePage)\n\t\tCFNumberGetValue (refUsagePage, kCFNumberLongType, &usagePage);\n\tif (refUsage)\n\t\tCFNumberGetValue (refUsage, kCFNumberLongType, &usage);\n\n\tif (NULL == pDevice)\n\t\treturn;\n\n    if (elementType)\n    {\n        // look at types of interest\n        if (elementType != kIOHIDElementTypeCollection)\n\t\t{\n            if (usagePage && usage) // if valid usage and page\n\t\t\t{\n\t\t\t\tswitch (usagePage) // only interested in kHIDPage_GenericDesktop and  kHIDPage_Button\n\t\t\t\t{\n\t\t\t\t\tcase kHIDPage_GenericDesktop:\n\t\t\t\t\t{\n\t\t\t\t\t\tswitch (usage) // look at usage to determine function\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase kHIDUsage_GD_X:\n\t\t\t\t\t\t\tcase kHIDUsage_GD_Y:\n\t\t\t\t\t\t\tcase kHIDUsage_GD_Z:\n\t\t\t\t\t\t\tcase kHIDUsage_GD_Rx:\n\t\t\t\t\t\t\tcase kHIDUsage_GD_Ry:\n\t\t\t\t\t\t\tcase kHIDUsage_GD_Rz:\n\t\t\t\t\t\t\t\tpElement = (pRecElement) malloc (sizeof (recElement));\n\t\t\t\t\t\t\t\tif (pElement) pDevice->axis++;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase kHIDUsage_GD_Slider:\n\t\t\t\t\t\t\t\tpElement = (pRecElement) malloc (sizeof (recElement));\n\t\t\t\t\t\t\t\tif (pElement) pDevice->sliders++;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase kHIDUsage_GD_Dial:\n\t\t\t\t\t\t\t\tpElement = (pRecElement) malloc (sizeof (recElement));\n\t\t\t\t\t\t\t\tif (pElement) pDevice->dials++;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase kHIDUsage_GD_Wheel:\n\t\t\t\t\t\t\t\tpElement = (pRecElement) malloc (sizeof (recElement));\n\t\t\t\t\t\t\t\tif (pElement) pDevice->wheels++;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase kHIDUsage_GD_Hatswitch:\n\t\t\t\t\t\t\t\tpElement = (pRecElement) malloc (sizeof (recElement));\n\t\t\t\t\t\t\t\tif (pElement) pDevice->hats++;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tpElement = (pRecElement) malloc (sizeof (recElement));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase kHIDPage_Button:\n\t\t\t\t\t\tpElement = (pRecElement) malloc (sizeof (recElement));\n\t\t\t\t\t\tif (pElement) pDevice->buttons++;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// just add a generic element\n\t\t\t\t\t\tpElement = (pRecElement) malloc (sizeof (recElement));\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n#if 0\n            else\n                HIDReportError (\"CFNumberGetValue error when getting value for refUsage or refUsagePage.\");\n#endif 0\n        }\n        else // collection\n\t\t\tpElement = (pRecElement) malloc (sizeof (recElement));\n    }\n    else\n        HIDReportError (\"CFNumberGetValue error when getting value for refElementType.\");\n\n    if (pElement) // add to list\n    {\n\t\t// this code builds a binary tree based on the collection hierarchy of inherent in the device element layout\n\t\t// it preserves the structure of the lements as collections have children and elements are siblings to each other\n\n\t\t// clear record\n\t\tbzero(pElement,sizeof(recElement));\n\n\t\t// get element info\n        pElement->type = elementType;\n        pElement->usagePage = usagePage;\n        pElement->usage = usage;\n        pElement->depth = 0;\t\t// assume root object\n        hid_GetElementInfo (refElement, pElement);\n\n\t\t// count elements\n\t\tpDevice->totalElements++;\n\n\t\tswitch (pElement->type)\n\t\t{\n\t\t\tcase kIOHIDElementTypeInput_Misc:\n\t\t\tcase kIOHIDElementTypeInput_Button:\n\t\t\tcase kIOHIDElementTypeInput_Axis:\n\t\t\tcase kIOHIDElementTypeInput_ScanCodes:\n\t\t\t\tpDevice->inputs++;\n\t\t\t\tbreak;\n\t\t\tcase kIOHIDElementTypeOutput:\n\t\t\t\tpDevice->outputs++;\n\t\t\t\tbreak;\n\t\t\tcase kIOHIDElementTypeFeature:\n\t\t\t\tpDevice->features++;\n\t\t\t\tbreak;\n\t\t\tcase kIOHIDElementTypeCollection:\n\t\t\t\tpDevice->collections++;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tHIDReportErrorNum (\"Unknown element type : \", pElement->type);\n\t\t}\n\n        if (NULL == *ppElementCurrent) // if at list head\n\t\t{\n            pDevice->pListElements = pElement; // add current element\n\t\t\t*ppElementCurrent = pElement; // set current element to element we just added\n\t\t}\n\t\telse // have exsiting structure\n\t\t{\n\t\t\tif (gAddAsChild) // if the previous element was a collection, let's add this as a child of the previous\n\t\t\t{\n\t\t\t\t// this iteration should not be needed but there maybe some untested degenerate case which this code will ensure works\n\t\t\t\twhile ((*ppElementCurrent)->pChild) // step down tree until free child node found\n\t\t\t\t\t*ppElementCurrent = (*ppElementCurrent)->pChild;\n\t\t\t\t(*ppElementCurrent)->pChild = pElement; // insert there\n\t\t\t\tpElement->depth = (*ppElementCurrent)->depth + 1;\n\t\t\t}\n\t\t\telse // add as sibling\n\t\t\t{\n\t\t\t\t// this iteration should not be needed but there maybe some untested degenerate case which this code will ensure works\n\t\t\t\twhile ((*ppElementCurrent)->pSibling) // step down tree until free sibling node found\n\t\t\t\t\t*ppElementCurrent = (*ppElementCurrent)->pSibling;\n\t\t\t\t(*ppElementCurrent)->pSibling = pElement; // insert there\n\t\t\t\tpElement->depth = (*ppElementCurrent)->depth;\n\t\t\t}\n\t\t\tpElement->pPrevious = *ppElementCurrent; // point to previous\n\t\t\t*ppElementCurrent = pElement; // set current to our collection\n\t\t}\n\n\t\tif (elementType == kIOHIDElementTypeCollection) // if this element is a collection of other elements\n\t\t{\n\t\t\tgAddAsChild = true; // add next set as children to this element\n\t\t\tgDepth++;\n\t\t\thid_GetCollectionElements ((CFMutableDictionaryRef) refElement, &pElement); // recursively process the collection\n\t\t\tgDepth--;\n\t\t}\n\t\tgAddAsChild = false; // add next as this elements sibling (when return from a collection or with non-collections)\n    }\n#if 0\n    else\n        HIDReportError (\"hid_AddElement - no element added.\");\n#endif\n}\n\n// ---------------------------------\n// collects information from each array member in device element list (each array memeber = element)\n\nstatic void hid_GetElementsCFArrayHandler (const void * value, void * parameter)\n{\n    if (CFGetTypeID (value) == CFDictionaryGetTypeID ())\n        hid_AddElement ((CFTypeRef) value, (pRecElement *) parameter);\n}\n\n// ---------------------------------\n// handles retrieval of element information from arrays of elements in device IO registry information\n\nstatic void hid_GetElements (CFTypeRef refElementCurrent, pRecElement *ppCurrentElement)\n{\n    CFTypeID type = CFGetTypeID (refElementCurrent);\n    if (type == CFArrayGetTypeID()) // if element is an array\n    {\n        CFRange range = {0, CFArrayGetCount (refElementCurrent)};\n        // CountElementsCFArrayHandler called for each array member\n        CFArrayApplyFunction (refElementCurrent, range, hid_GetElementsCFArrayHandler, ppCurrentElement);\n    }\n}\n\n// ---------------------------------\n// handles extracting element information from element collection CF types\n// used from top level element decoding and hierarchy deconstruction to flatten device element list\n\nstatic void hid_GetCollectionElements (CFMutableDictionaryRef deviceProperties, pRecElement *ppCurrentCollection)\n{\n    CFTypeRef refElementTop = CFDictionaryGetValue (deviceProperties, CFSTR(kIOHIDElementKey));\n    if (refElementTop)\n        hid_GetElements (refElementTop, ppCurrentCollection);\n    else\n        HIDReportError (\"hid_GetCollectionElements: CFDictionaryGetValue error when creating CFTypeRef for kIOHIDElementKey.\");\n}\n\n// ---------------------------------\n// use top level element usage page and usage to discern device usage page and usage setting appropriate values in device record\n\nstatic void hid_TopLevelElementHandler (const void * value, void * parameter)\n{\n    CFTypeRef refCF = 0;\n    if ((NULL == value) || (NULL == parameter))\n        return;\t// (kIOReturnBadArgument)\n    if (CFGetTypeID (value) != CFDictionaryGetTypeID ())\n        return;\t// (kIOReturnBadArgument)\n    refCF = CFDictionaryGetValue (value, CFSTR(kIOHIDElementUsagePageKey));\n    if (!CFNumberGetValue (refCF, kCFNumberLongType, &((pRecDevice) parameter)->usagePage))\n        HIDReportError (\"CFNumberGetValue error retrieving pDevice->usagePage.\");\n    refCF = CFDictionaryGetValue (value, CFSTR(kIOHIDElementUsageKey));\n    if (!CFNumberGetValue (refCF, kCFNumberLongType, &((pRecDevice) parameter)->usage))\n        HIDReportError (\"CFNumberGetValue error retrieving pDevice->usage.\");\n}\n\n// ---------------------------------\n// extracts device info from CF dictionary records in IO registry\n\nstatic void hid_GetDeviceInfo (io_object_t hidDevice, CFMutableDictionaryRef hidProperties, pRecDevice pDevice)\n{\n\tCFMutableDictionaryRef usbProperties = 0;\n\tio_registry_entry_t parent1, parent2;\n\n    // Mac OS X currently is not mirroring all USB properties to HID page so need to look at USB device page also\n    // get dictionary for usb properties: step up two levels and get CF dictionary for USB properties\n    if ((KERN_SUCCESS == IORegistryEntryGetParentEntry (hidDevice, kIOServicePlane, &parent1)) &&\n        (KERN_SUCCESS == IORegistryEntryGetParentEntry (parent1, kIOServicePlane, &parent2)) &&\n        (KERN_SUCCESS == IORegistryEntryCreateCFProperties (parent2, &usbProperties, kCFAllocatorDefault, kNilOptions)))\n    {\n        if (usbProperties)\n        {\n            CFTypeRef refCF = 0;\n            // get device info\n            // try hid dictionary first, if fail then go to usb dictionary\n\n            // get transport\n            refCF = CFDictionaryGetValue (hidProperties, CFSTR(kIOHIDTransportKey));\n            if (refCF)\n            {\n\t\t\t\tif (!CFStringGetCString (refCF, pDevice->transport, 256, CFStringGetSystemEncoding ()))\n                    HIDReportError (\"CFStringGetCString error retrieving pDevice->transport.\");\n            }\n\n            // get vendorID\n            refCF = CFDictionaryGetValue (hidProperties, CFSTR(kIOHIDVendorIDKey));\n            if (!refCF)\n                refCF = CFDictionaryGetValue (usbProperties, CFSTR(\"idVendor\"));\n            if (refCF)\n            {\n                if (!CFNumberGetValue (refCF, kCFNumberLongType, &pDevice->vendorID))\n                    HIDReportError (\"CFNumberGetValue error retrieving pDevice->vendorID.\");\n            }\n\n            // get product ID\n            refCF = CFDictionaryGetValue (hidProperties, CFSTR(kIOHIDProductIDKey));\n            if (!refCF)\n                refCF = CFDictionaryGetValue (usbProperties, CFSTR(\"idProduct\"));\n            if (refCF)\n            {\n                if (!CFNumberGetValue (refCF, kCFNumberLongType, &pDevice->productID))\n                    HIDReportError (\"CFNumberGetValue error retrieving pDevice->productID.\");\n            }\n\n            // get product version\n            refCF = CFDictionaryGetValue (hidProperties, CFSTR(kIOHIDVersionNumberKey));\n            if (refCF)\n            {\n                if (!CFNumberGetValue (refCF, kCFNumberLongType, &pDevice->version))\n                    HIDReportError (\"CFNumberGetValue error retrieving pDevice->version.\");\n            }\n\n            // get manufacturer name\n            refCF = CFDictionaryGetValue (hidProperties, CFSTR(kIOHIDManufacturerKey));\n            if (!refCF)\n                refCF = CFDictionaryGetValue (usbProperties, CFSTR(\"USB Vendor Name\"));\n            if (refCF)\n            {\n                if (!CFStringGetCString (refCF, pDevice->manufacturer, 256, CFStringGetSystemEncoding ()))\n                    HIDReportError (\"CFStringGetCString error retrieving pDevice->manufacturer.\");\n            }\n\n            // get product name\n            refCF = CFDictionaryGetValue (hidProperties, CFSTR(kIOHIDProductKey));\n            if (!refCF)\n                refCF = CFDictionaryGetValue (usbProperties, CFSTR(\"USB Product Name\"));\n            if (refCF)\n            {\n                if (!CFStringGetCString (refCF, pDevice->product, 256, CFStringGetSystemEncoding ()))\n                    HIDReportError (\"CFStringGetCString error retrieving pDevice->product.\");\n            }\n\n            // get serial\n            refCF = CFDictionaryGetValue (hidProperties, CFSTR(kIOHIDSerialNumberKey));\n            if (refCF)\n            {\n                if (!CFStringGetCString (refCF, pDevice->serial, 256, CFStringGetSystemEncoding ()))\n                    HIDReportError (\"CFStringGetCString error retrieving pDevice->serial.\");\n            }\n\n            // get location ID\n            refCF = CFDictionaryGetValue (hidProperties, CFSTR(kIOHIDLocationIDKey));\n            if (!refCF)\n                refCF = CFDictionaryGetValue (usbProperties, CFSTR(\"locationID\"));\n            if (refCF)\n            {\n                if (!CFNumberGetValue (refCF, kCFNumberLongType, &pDevice->locID))\n                    HIDReportError (\"CFNumberGetValue error retrieving pDevice->locID.\");\n            }\n\n            // get usage page and usage\n            refCF = CFDictionaryGetValue (hidProperties, CFSTR(kIOHIDPrimaryUsagePageKey));\n            if (refCF)\n            {\n                if (!CFNumberGetValue (refCF, kCFNumberLongType, &pDevice->usagePage))\n                    HIDReportError (\"CFNumberGetValue error retrieving pDevice->usagePage.\");\n                refCF = CFDictionaryGetValue (hidProperties, CFSTR(kIOHIDPrimaryUsageKey));\n                if (refCF)\n                    if (!CFNumberGetValue (refCF, kCFNumberLongType, &pDevice->usage))\n                        HIDReportError (\"CFNumberGetValue error retrieving pDevice->usage.\");\n            }\n            if (NULL == refCF) // get top level element HID usage page or usage\n            {\n                // use top level element instead\n                CFTypeRef refCFTopElement = 0;\n                refCFTopElement = CFDictionaryGetValue (hidProperties, CFSTR(kIOHIDElementKey));\n                {\n                    // refCFTopElement points to an array of element dictionaries\n                    CFRange range = {0, CFArrayGetCount (refCFTopElement)};\n                    CFArrayApplyFunction (refCFTopElement, range, hid_TopLevelElementHandler, NULL);\n                }\n            }\n        }\n        else\n            HIDReportError (\"IORegistryEntryCreateCFProperties failed to create usbProperties.\");\n\n        CFRelease (usbProperties);\n        if (kIOReturnSuccess != IOObjectRelease (parent2))\n            HIDReportError (\"IOObjectRelease error with parent2.\");\n        if (kIOReturnSuccess != IOObjectRelease (parent1))\n            HIDReportError (\"IOObjectRelease error with parent1.\");\n    }\n}\n\n// ---------------------------------\n// adds device to linked list of devices passed in (handles NULL lists properly)\n// (returns where you just stored it)\nstatic pRecDevice* hid_AddDevice (pRecDevice *ppListDeviceHead, pRecDevice pNewDevice)\n{\n\tpRecDevice* result = NULL;\n\t\n    if (NULL == *ppListDeviceHead)\n        result = ppListDeviceHead;\n    else\n    {\n        pRecDevice pDevicePrevious = NULL, pDevice = *ppListDeviceHead;\n        while (pDevice)\n        {\n            pDevicePrevious = pDevice;\n            pDevice = pDevicePrevious->pNext;\n        }\n        result = &pDevicePrevious->pNext;\n    }\n    pNewDevice->pNext = NULL;\n\n\t*result = pNewDevice;\n\n\treturn result;\n}\n\n// ---------------------------------\n// given a IO device object build a flat device record including device info and elements\n\nstatic pRecDevice hid_BuildDevice (io_object_t hidDevice)\n{\n    pRecDevice pDevice = (pRecDevice) malloc (sizeof (recDevice));\n\n    if (NULL != pDevice)\n    {\n\t\t// get dictionary for HID properties\n        CFMutableDictionaryRef hidProperties = 0;\n        kern_return_t result = IORegistryEntryCreateCFProperties (hidDevice, &hidProperties, kCFAllocatorDefault, kNilOptions);\n\n\t\t// clear record\n\t\tbzero(pDevice, sizeof(recDevice));\n\n        if ((result == KERN_SUCCESS) && (NULL != hidProperties))\n        {\n\t\t\tpRecElement pCurrentElement = NULL;\n\t\t\t// create device interface\n\t\t\tresult = HIDCreateOpenDeviceInterface (hidDevice, pDevice);\n\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\tHIDReportErrorNum (\"HIDCreateOpenDeviceInterface failed.\", result);\n            hid_GetDeviceInfo (hidDevice, hidProperties, pDevice); // hidDevice used to find parents in registry tree\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   // set current device for use in getting elements\n\t\t\tgCurrentGetDevice = pDevice;\n\t\t\t// Add all elements\n            hid_GetCollectionElements (hidProperties, &pCurrentElement);\n\t\t\tgCurrentGetDevice = NULL;\n            CFRelease (hidProperties);\n        }\n        else\n            HIDReportErrorNum (\"IORegistryEntryCreateCFProperties error when creating deviceProperties.\", result);\n    }\n    else\n        HIDReportError (\"malloc error when allocating pRecDevice.\");\n    return pDevice;\n}\n\n#if USE_NOTIFICATIONS\n//================================================================================================\n//\n//\thid_DeviceNotification\n//\n//\tThis routine will get called whenever any kIOGeneralInterest notification happens.  We are\n//\tinterested in the kIOMessageServiceIsTerminated message so that's what we look for.  Other\n//\tmessages are defined in IOMessage.h.\n//\n//================================================================================================\n//\nstatic void hid_DeviceNotification( void *refCon,\n\t\t\t\t\t\t\t\t\tio_service_t service,\n\t\t\t\t\t\t\t\t\tnatural_t messageType,\n\t\t\t\t\t\t\t\t\tvoid *messageArgument )\n{\n#pragma unused(messageArgument)\n    pRecDevice pDevice = (pRecDevice) refCon;\n\n    if (messageType == kIOMessageServiceIsTerminated)\n    {\n        printf(\"Device 0x%08x \\\"%s\\\"removed.\\n\", service, pDevice->product);\n\n        // Free the data we're no longer using now that the device is going away\n\t\thid_DisposeDevice (pDevice);\n    }\n}\n#else\n\nstatic void hid_RemovalCallbackFunction(void * target, IOReturn result, void * refcon, void * sender)\n{\n\thid_DisposeDevice ((pRecDevice) target);\n}\n\n#endif USE_NOTIFICATIONS\n\n//================================================================================================\n//\n//\thid_AddDevices\n//\n//\tThis routine is the callback for our IOServiceAddMatchingNotification.  When we get called\n//\twe will look at all the devices that were added and we will:\n//\n//\t1.  Create some private data to relate to each device.\n//\t2.  Submit an IOServiceAddInterestNotification of type kIOGeneralInterest for this device,\n//\t    using the refCon field to store a pointer to our data.  When we get called with\n//\t    this interest notification, we can grab the refCon and access our private data.\n//\n//================================================================================================\n//\n// ---------------------------------\n// given a IO device iterator, iterate it and add all its devices\n\nstatic void hid_AddDevices (void *refCon, io_iterator_t iterator)\n{\n\t// NOTE: refcon passed in is used to point to the device list head\n    pRecDevice* pListDeviceHead = (pRecDevice*) refCon;\n    IOReturn result = kIOReturnSuccess;\n    io_object_t ioHIDDeviceObject = 0;\n\n    while ((ioHIDDeviceObject = IOIteratorNext (iterator)))\n    {\n\t\tpRecDevice* pNewDeviceAt = NULL;\n\t\tpRecDevice pNewDevice = hid_BuildDevice (ioHIDDeviceObject);\n\t\tif (pNewDevice)\n\t\t{\n#if 0\t// set true for verbose output\n\t\t\tprintf(\"\\nhid_AddDevices: pNewDevice = {t: \\\"%s\\\", v: %ld, p: %ld, v: %ld, m: \\\"%s\\\", \" \\\n\t\t  \"p: \\\"%s\\\", l: %ld, u: %4.4lX:%4.4lX, #e: %ld, #f: %ld, #i: %ld, #o: %ld, \" \\\n\t\t  \"#c: %ld, #a: %ld, #b: %ld, #h: %ld, #s: %ld, #d: %ld, #w: %ld}.\",\n\t\t  pNewDevice->transport,\n\t\t  pNewDevice->vendorID,\n\t\t  pNewDevice->productID,\n\t\t  pNewDevice->version,\n\t\t  pNewDevice->manufacturer,\n\t\t  pNewDevice->product,\n\t\t  pNewDevice->locID,\n\t\t  pNewDevice->usagePage,\n\t\t  pNewDevice->usage,\n\t\t  pNewDevice->totalElements,\n\t\t  pNewDevice->features,\n\t\t  pNewDevice->inputs,\n\t\t  pNewDevice->outputs,\n\t\t  pNewDevice->collections,\n\t\t  pNewDevice->axis,\n\t\t  pNewDevice->buttons,\n\t\t  pNewDevice->hats,\n\t\t  pNewDevice->sliders,\n\t\t  pNewDevice->dials,\n\t\t  pNewDevice->wheels\n\t\t  );\n\t\t\tfflush(stdout);\n#elif\t0\t// otherwise output brief description\n\t\t\tprintf(\"\\nhid_AddDevices: pNewDevice = {m: \\\"%s\\\" p: \\\"%s\\\", vid: %ld, pid: %ld, loc: %8.8lX, usage: %4.4lX:%4.4lX}.\",\n\t\t  pNewDevice->manufacturer,\n\t\t  pNewDevice->product,\n\t\t  pNewDevice->vendorID,\n\t\t  pNewDevice->productID,\n\t\t  pNewDevice->locID,\n\t\t  pNewDevice->usagePage,\n\t\t  pNewDevice->usage\n\t\t  );\n\t\t\tfflush(stdout);\n#endif\n\t\t\tpNewDeviceAt = hid_AddDevice (pListDeviceHead, pNewDevice);\n\t\t}\n\n#if USE_NOTIFICATIONS\n        // Register for an interest notification of this device being removed. Use a reference to our\n        // private data as the refCon which will be passed to the notification callback.\n        result = IOServiceAddInterestNotification( gNotifyPort,\t\t\t\t\t// notifyPort\n\t\t\t\t\t\t\t\t\t\t\t\t   ioHIDDeviceObject,\t\t\t// service\n\t\t\t\t\t\t\t\t\t\t\t\t   kIOGeneralInterest,\t\t\t// interestType\n\t\t\t\t\t\t\t\t\t\t\t\t   hid_DeviceNotification,\t\t// callback\n\t\t\t\t\t\t\t\t\t\t\t\t   pNewDevice,\t\t\t\t\t// refCon\n\t\t\t\t\t\t\t\t\t\t\t\t   (io_object_t*) &pNewDevice->notification);\t// notification\n\t\tif (KERN_SUCCESS != result)\n\t\t\tHIDReportErrorNum (\"hid_AddDevices: IOServiceAddInterestNotification error: x0%8.8lX.\", result);\n#else\n\t\tresult = (*(IOHIDDeviceInterface**)pNewDevice->interface)->setRemovalCallback (pNewDevice->interface, hid_RemovalCallbackFunction,pNewDeviceAt,0);\n#endif USE_NOTIFICATIONS\n\n\t\t// release the device object, it is no longer needed\n\t\tresult = IOObjectRelease (ioHIDDeviceObject);\n\t\tif (KERN_SUCCESS != result)\n\t\t\tHIDReportErrorNum (\"hid_AddDevices: IOObjectRelease error with ioHIDDeviceObject.\", result);\n    }\n}\n\n// ---------------------------------\n// disposes of the element list associated with a device and the memory associated with the list\n// uses depthwise recursion to dispose both collections and elements.\n\nstatic void hid_DisposeDeviceElements (pRecElement pElement)\n{\n\tif (pElement)\n\t{\n\t\tif (pElement->pChild)\n\t\t\thid_DisposeDeviceElements (pElement->pChild);\n\t\tif (pElement->pSibling)\n\t\t\thid_DisposeDeviceElements (pElement->pSibling);\n\t\tfree (pElement);\n\t}\n}\n\n// ---------------------------------\n// disposes of a single device, closing and releaseing interface, freeing memory fro device and elements, setting device pointer to NULL\n// all your device no longer belong to us... (i.e., you do not 'own' the device anymore)\n\nstatic pRecDevice hid_DisposeDevice (pRecDevice pDevice)\n{\n    kern_return_t result = KERN_SUCCESS;\n    pRecDevice pDeviceNext = NULL;\n\n    if (HIDIsValidDevice(pDevice))\n    {\n        // save next device prior to disposing of this device\n        pDeviceNext = pDevice->pNext;\n\n\t\tresult = HIDDequeueDevice (pDevice);\n#if 0\n\t\tif (kIOReturnSuccess != result)\n\t\t\tHIDReportErrorNum (\"hid_DisposeDevice: HIDDequeueDevice error: 0x%8.8X.\", result);\n#endif 1\n\n        hid_DisposeDeviceElements (pDevice->pListElements);\n\t\tpDevice->pListElements = NULL;\n\n\t\tresult = HIDCloseReleaseInterface (pDevice); // function sanity checks interface value (now application does not own device)\n\t\tif (kIOReturnSuccess != result)\n\t\t\tHIDReportErrorNum (\"hid_DisposeDevice: HIDCloseReleaseInterface error: 0x%8.8X.\", result);\n\n#if USE_NOTIFICATIONS\n        if (pDevice->interface)\n        {\n\t\t\t// replace (*pDevice->interface)->Release(pDevice->interface);\n\t\t\tresult = IODestroyPlugInInterface (pDevice->interface);\n\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\tHIDReportErrorNum (\"hid_DisposeDevice: IODestroyPlugInInterface error: 0x%8.8X.\", result);\n        }\n\n        if (pDevice->notification)\n\t\t{\n\t\t\tresult = IOObjectRelease((io_object_t) pDevice->notification);\n\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\tHIDReportErrorNum (\"hid_DisposeDevice: IOObjectRelease error: 0x%8.8X.\", result);\n\t\t}\n#endif USE_NOTIFICATIONS\n\n\t\t// remove this device from the device list\n\t\tif (gpDeviceList == pDevice)\t// head of list?\n\t\t\tgpDeviceList = pDeviceNext;\n\t\telse\n\t\t{\n\t\t\tpRecDevice pDeviceTemp = pDeviceNext = gpDeviceList;\t// we're going to return this if we don't find ourselfs in the list\n\t\t\twhile (pDeviceTemp)\n\t\t\t{\n\t\t\t\tif (pDeviceTemp->pNext == pDevice) // found us!\n\t\t\t\t{\n\t\t\t\t\t// take us out of linked list\n\t\t\t\t\tpDeviceTemp->pNext = pDeviceNext = pDevice->pNext;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tpDeviceTemp = pDeviceTemp->pNext;\n\t\t\t}\n\t\t}\n        free (pDevice);\n    }\n\n\t// update device count\n\tgNumDevices = hid_CountCurrentDevices ();\n\n    return pDeviceNext;\n}\n\n// ---------------------------------\n// count number of devices in global device list (gpDeviceList)\nstatic UInt32 hid_CountCurrentDevices (void)\n{\n    pRecDevice pDevice = gpDeviceList;\n    UInt32 devices = 0;\n    while (pDevice)\n    {\n        devices++;\n        pDevice = pDevice->pNext;\n    }\n    return devices;\n}\n\n// ---------------------------------\n// matches type masks passed in to actual element types (which are not set up to be used as a mask\nstatic Boolean hid_MatchElementTypeMask (IOHIDElementType type, HIDElementTypeMask typeMask)\n{\n\tif (typeMask & kHIDElementTypeInput)\n\t\tif ((type == kIOHIDElementTypeInput_Misc) || (type == kIOHIDElementTypeInput_Button) || (type == kIOHIDElementTypeInput_Axis) || (type == kIOHIDElementTypeInput_ScanCodes))\n\t\t\treturn true;\n\tif (typeMask & kHIDElementTypeOutput)\n\t\tif (type == kIOHIDElementTypeOutput)\n\t\t\treturn true;\n\tif (typeMask & kHIDElementTypeFeature)\n\t\tif (type == kIOHIDElementTypeFeature)\n\t\t\treturn true;\n\tif (typeMask & kHIDElementTypeCollection)\n\t\tif (type == kIOHIDElementTypeCollection)\n\t\t\treturn true;\n\treturn false;\n}\n\n// ---------------------------------\n\nstatic pRecElement hid_GetDeviceElement (pRecElement pElement, HIDElementTypeMask typeMask)\n{\n\t// we are asking for this element\n    if (NULL != pElement)\n\t{\n\t\tif (hid_MatchElementTypeMask (pElement->type, typeMask)) // if the type match what we are looking for\n\t\t\treturn pElement; // return the element\n\t\telse\n\t\t\treturn HIDGetNextDeviceElement (pElement, typeMask); // else get the next one\n\t}\n\treturn NULL;\n}\n\n#define FAKE_IT\t0\t// set true for debugging; returns the usage & usage page as numbers\n\n// ---------------------------------\n// Load the usage strings from the <HID_usage_strings.plist> resource (XML) file into a CFPropertyListRef\nstatic CFPropertyListRef xml_load_usage_strings(void)\n{\n\tCFPropertyListRef tCFPropertyListRef = NULL;\n\tCFURLRef resFileCFURLRef = CFBundleCopyResourceURL(CFBundleGetMainBundle(), CFSTR(\"HID_usage_strings\"), CFSTR(\"plist\"), NULL);\n\n\tif (NULL != resFileCFURLRef)\n\t{\n\t\tCFDataRef resCFDataRef;\n\n\t\tif (CFURLCreateDataAndPropertiesFromResource(kCFAllocatorDefault, resFileCFURLRef, &resCFDataRef, nil, nil, nil))\n\t\t{\n\t\t\tif (NULL != resCFDataRef)\n\t\t\t{\n\t\t\t\tCFStringRef errorString;\n\n\t\t\t\ttCFPropertyListRef = CFPropertyListCreateFromXMLData(kCFAllocatorDefault, resCFDataRef, kCFPropertyListImmutable, &errorString);\n\t\t\t\tif (NULL == tCFPropertyListRef)\n\t\t\t\t\tCFShow(errorString);\n\t\t\t\tCFRelease(resCFDataRef);\n\t\t\t}\n\t\t}\n\t\tCFRelease(resFileCFURLRef);\n\t}\n\treturn tCFPropertyListRef;\n}\n\n// ---------------------------------\n// Find a usage string in the <HID_usage_strings.plist> resource (XML) file\n\nstatic Boolean xml_GetUsageName(const long valueUsagePage, const long valueUsage, char* pCstr)\n{\n\tstatic CFPropertyListRef tCFPropertyListRef = NULL;\n\tBoolean results = false;\n\n\tif (NULL == tCFPropertyListRef)\n\t\ttCFPropertyListRef = xml_load_usage_strings();\n\tif (NULL != tCFPropertyListRef)\n\t{\n\t\tif (CFDictionaryGetTypeID() == CFGetTypeID(tCFPropertyListRef))\n\t\t{\n\t\t\tCFDictionaryRef pageCFDictionaryRef;\n\t\t\tCFStringRef\tpageKeyCFStringRef;\n\t\t\tpageKeyCFStringRef = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR(\"0x%4.4lX\"), valueUsagePage);\n\n\t\t\tif (CFDictionaryGetValueIfPresent(tCFPropertyListRef, pageKeyCFStringRef, (const void**) &pageCFDictionaryRef))\n\t\t\t{\n\t\t\t\tCFStringRef\tpageCFStringRef;\n\n\t\t\t\tif (CFDictionaryGetValueIfPresent(pageCFDictionaryRef, CFSTR(\"Name\"), (const void**) &pageCFStringRef))\n\t\t\t\t{\n\t\t\t\t\t//CFShow(pageCFStringRef);\n\t\t\t\t}\n\n\t\t\t\t{\n\t\t\t\t\tCFStringRef fullCFStringRef = NULL;\n\t\t\t\t\tCFStringRef\tusageKeyCFStringRef;\n\t\t\t\t\tCFStringRef\tusageCFStringRef;\n\n\t\t\t\t\tusageKeyCFStringRef = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR(\"0x%4.4lX\"), valueUsage);\n\n\t\t\t\t\tif (CFDictionaryGetValueIfPresent(pageCFDictionaryRef, usageKeyCFStringRef, (const void**) &usageCFStringRef))\n\t\t\t\t\t{\n\t\t\t\t\t\tfullCFStringRef = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR(\"%@ %@\"),\n\t\t\t\t\t\t\t\t\t\t\t\t pageCFStringRef, usageCFStringRef);\n\t\t\t\t\t\t// CFShow(usageCFStringRef);\n\t\t\t\t\t}\n#if FAKE_IT\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tfullCFStringRef = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR(\"%@ #%@\"),\n\t\t\t\t\t\t\t\t\t\t\t\t pageCFStringRef, usageKeyCFStringRef);\n\t\t\t\t\t}\n#endif\n\t\t\t\t\tif (fullCFStringRef)\n\t\t\t\t\t{\n\t\t\t\t\t\t// CFShow(fullCFStringRef);\n\t\t\t\t\t\tresults = CFStringGetCString(\n\t\t\t\t\t\t\t\t   fullCFStringRef, pCstr, CFStringGetLength(fullCFStringRef) * sizeof(UniChar) + 1, kCFStringEncodingMacRoman);\n\t\t\t\t\t\tCFRelease(fullCFStringRef);\n\t\t\t\t\t}\n\t\t\t\t\tCFRelease(usageKeyCFStringRef);\n\t\t\t\t}\n\t\t\t}\n\t\t\tCFRelease(pageKeyCFStringRef);\n\t\t}\n\t\t//++CFRelease(tCFPropertyListRef);\t// Leak this!\n\t}\n\treturn results;\n}\n\n#pragma mark public functions\n// =================================\n// public functions\n\n// ---------------------------------\n// Create and open an interface to device, required prior to extracting values or building queues\n// Note: appliction now owns the device and must close and release it prior to exiting\n\nunsigned long HIDCreateOpenDeviceInterface (UInt32 hidDevice, pRecDevice pDevice)\n{\n    IOReturn result = kIOReturnSuccess;\n    HRESULT plugInResult = S_OK;\n    SInt32 score = 0;\n    IOCFPlugInInterface ** ppPlugInInterface = NULL;\n\n\tif (NULL == pDevice->interface)\n\t{\n\t\tresult = IOCreatePlugInInterfaceForService (hidDevice, kIOHIDDeviceUserClientTypeID,\n\t\t\t\t\t\t\t\t\t\t\t  kIOCFPlugInInterfaceID, &ppPlugInInterface, &score);\n\t\tif (kIOReturnSuccess == result)\n\t\t{\n\t\t\t// Call a method of the intermediate plug-in to create the device interface\n\t\t\tplugInResult = (*ppPlugInInterface)->QueryInterface (ppPlugInInterface,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tCFUUIDGetUUIDBytes (kIOHIDDeviceInterfaceID), (void *) &(pDevice->interface));\n\t\t\tif (S_OK != plugInResult)\n\t\t\t\tHIDReportErrorNum (\"Couldnt query HID class device interface from plugInInterface\", plugInResult);\n\t\t\tIODestroyPlugInInterface (ppPlugInInterface); // replace (*ppPlugInInterface)->Release (ppPlugInInterface)\n\t\t}\n\t\telse\n\t\t\tHIDReportErrorNum (\"Failed to create **plugInInterface via IOCreatePlugInInterfaceForService.\", result);\n\t}\n\tif (NULL != pDevice->interface)\n\t{\n\t\tresult = (*(IOHIDDeviceInterface**)pDevice->interface)->open (pDevice->interface, 0);\n\t\tif (kIOReturnSuccess != result)\n\t\t\tHIDReportErrorNum (\"Failed to open pDevice->interface via open.\", result);\n\t}\n    return result;\n}\n\n// ---------------------------------\n// builds list of device with elements (allocates memory and captures devices)\n// list is allcoated internally within HID Utilites and can be accessed via accessor functions\n// structures within list are considered flat and user accessable, but not user modifiable\n// can be called again to rebuild list to account for new devices (will do the right thing in case of disposing existing list)\n// returns true if succesful\n\nBoolean HIDBuildDeviceList (UInt32 usagePage, UInt32 usage)\n{\n    IOReturn result = kIOReturnSuccess;\n    mach_port_t masterPort = 0;\n\n    if (NULL != gpDeviceList)\n        HIDReleaseDeviceList ();\n\n    result = IOMasterPort (bootstrap_port, &masterPort);\n    if (kIOReturnSuccess != result)\n        HIDReportErrorNum (\"IOMasterPort error with bootstrap_port.\", result);\n    else\n    {\n\t\tCFMutableDictionaryRef hidMatchDictionary = NULL;\n\n\t\t// Set up matching dictionary to search the I/O Registry for HID devices we are interested in. Dictionary reference is NULL if error.\n\t\t{\n\t\t\tCFNumberRef refUsage = NULL, refUsagePage = NULL;\n\n\t\t\t// Set up a matching dictionary to search I/O Registry by class name for all HID class devices.\n\t\t\thidMatchDictionary = IOServiceMatching (kIOHIDDeviceKey);\n\t\t\tif (NULL != hidMatchDictionary)\n\t\t\t{\n\t\t\t\tif (usagePage)\n\t\t\t\t{\n\t\t\t\t\t// Add key for device type (joystick, in this case) to refine the matching dictionary.\n\t\t\t\t\trefUsagePage = CFNumberCreate (kCFAllocatorDefault, kCFNumberLongType, &usagePage);\n\t\t\t\t\tCFDictionarySetValue (hidMatchDictionary, CFSTR (kIOHIDPrimaryUsagePageKey), refUsagePage);\n\t\t\t\t\tCFRelease (refUsagePage);\n\t\t\t\t\tif (usage)\n\t\t\t\t\t{\n\t\t\t\t\t\trefUsage = CFNumberCreate (kCFAllocatorDefault, kCFNumberLongType, &usage);\n\t\t\t\t\t\tCFDictionarySetValue (hidMatchDictionary, CFSTR (kIOHIDPrimaryUsageKey), refUsage);\n\t\t\t\t\t\tCFRelease (refUsage);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tCFRetain(hidMatchDictionary);\n\t\t\t}\n\t\t\telse\n\t\t\t\tHIDReportError (\"Failed to get HID CFMutableDictionaryRef via IOServiceMatching.\");\n\t\t}\n\n#if USE_NOTIFICATIONS\n\t\t// Create a notification port and add its run loop event source to our run loop\n\t\t// This is how async notifications get set up.\n\t\t{\n\t\t\tCFRunLoopSourceRef\t\trunLoopSource;\n\n\t\t\tgNotifyPort = IONotificationPortCreate(masterPort);\n\t\t\trunLoopSource = IONotificationPortGetRunLoopSource(gNotifyPort);\n\n\t\t\tgRunLoop = CFRunLoopGetCurrent();\n\t\t\tCFRunLoopAddSource(gRunLoop, runLoopSource, kCFRunLoopDefaultMode);\n\n\t\t\t// Now set up a notification to be called when a device is first matched by I/O Kit.\n\t\t\tresult = IOServiceAddMatchingNotification(gNotifyPort,\t\t\t// notifyPort\n\t\t\t\t\t\t\t\t\t\t\t kIOFirstMatchNotification,\t\t// notificationType\n\t\t\t\t\t\t\t\t\t\t\t hidMatchDictionary,\t\t\t// matching\n\t\t\t\t\t\t\t\t\t\t\t hid_AddDevices,\t\t\t\t// callback\n\t\t\t\t\t\t\t\t\t\t\t &gpDeviceList,\t\t\t\t\t// refCon\n\t\t\t\t\t\t\t\t\t\t\t &gAddedIter\t\t\t\t\t// notification\n\t\t\t\t\t\t\t\t\t\t\t );\n\n\t\t\t// call it now to add all existing devices\n\t\t\thid_AddDevices(&gpDeviceList,gAddedIter);\n\t\t}\n#else\n\t\t{\n\t\t\tio_iterator_t hidObjectIterator = NULL;\n\n\t\t\t// Now search I/O Registry for matching devices.\n\t\t\tresult = IOServiceGetMatchingServices (masterPort, hidMatchDictionary, &hidObjectIterator);\n\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\tHIDReportErrorNum (\"Failed to create IO object iterator, error:\", result);\n\t\t\telse if (NULL == hidObjectIterator) // likely no HID devices which matched selection criteria are connected\n\t\t\t\tHIDReportError (\"Warning: Could not find any matching devices, thus iterator creation failed.\");\n\n\t\t\tif (NULL != hidObjectIterator)\n\t\t\t{\n\t\t\t\thid_AddDevices(&gpDeviceList,hidObjectIterator);\n\n\t\t\t\tresult = IOObjectRelease (hidObjectIterator); // release the iterator\n\t\t\t\tif (kIOReturnSuccess != result)\n\t\t\t\t\tHIDReportErrorNum (\"IOObjectRelease error with hidObjectIterator.\", result);\n\n\t\t\t\tgNumDevices = hid_CountCurrentDevices ();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n#endif USE_NOTIFICATIONS\n\t\t// IOServiceGetMatchingServices consumes a reference to the dictionary, so we don't need to release the dictionary ref.\n\t\thidMatchDictionary = NULL;\n    }\n\treturn false;\n}\n\n// ---------------------------------\n// release list built by above function\n// MUST be called prior to application exit to properly release devices\n// if not called (or app crashes) devices can be recovered by pluging into different location in USB chain\n\nvoid HIDReleaseDeviceList (void)\n{\n    while (NULL != gpDeviceList)\n\t\tgpDeviceList = hid_DisposeDevice (gpDeviceList); // dispose current device return next device will set gpDeviceList to NULL\n    gNumDevices = 0;\n}\n\n// ---------------------------------\n// does a device list exist\n\nBoolean HIDHaveDeviceList (void)\n{\n    if (NULL != gpDeviceList)\n\t\treturn true;\n    return false;\n}\n\n// ---------------------------------\n// how many HID devices have been found\n// returns 0 if no device list exist\n\nUInt32 HIDCountDevices (void)\n{\n\tgNumDevices = hid_CountCurrentDevices ();\n\n    return gNumDevices;\n}\n\n// ---------------------------------\n// how many elements does a specific device have\n// returns 0 if device is invlaid or NULL\n\nUInt32 HIDCountDeviceElements (pRecDevice pDevice, HIDElementTypeMask typeMask)\n{\n\tlong count = 0;\n    if (HIDIsValidDevice(pDevice))\n\t{\n\t\tif (typeMask & kHIDElementTypeInput)\n\t\t\tcount += pDevice->inputs;\n\t\tif (typeMask & kHIDElementTypeOutput)\n\t\t\tcount += pDevice->outputs;\n\t\tif (typeMask & kHIDElementTypeFeature)\n\t\t\tcount += pDevice->features;\n\t\tif (typeMask & kHIDElementTypeCollection)\n\t\t\tcount += pDevice->collections;\n\t}\n\treturn count;\n}\n\n// ---------------------------------\n// get the first device in the device list\n// returns NULL if no list exists\n\npRecDevice HIDGetFirstDevice (void)\n{\n    return gpDeviceList;\n}\n\n// ---------------------------------\n// get next device in list given current device as parameter\n// returns NULL if end of list\n\npRecDevice HIDGetNextDevice (pRecDevice pDevice)\n{\n    if (NULL != pDevice)\n        return pDevice->pNext;\n    else\n        return NULL;\n}\n\n// ---------------------------------\n// get the first element of device passed in as parameter\n// returns NULL if no list exists or device does not exists or is NULL\npRecElement HIDGetFirstDeviceElement (pRecDevice pDevice, HIDElementTypeMask typeMask)\n{\n    if (HIDIsValidDevice(pDevice))\n\t{\n        if (hid_MatchElementTypeMask (pDevice->pListElements->type, typeMask)) // ensure first type matches\n\t\t\treturn pDevice->pListElements;\n\t\telse\n\t\t\treturn HIDGetNextDeviceElement (pDevice->pListElements, typeMask);\n\t}\n    else\n        return NULL;\n}\n\n// ---------------------------------\n// get next element of given device in list given current element as parameter\n// will walk down each collection then to next element or collection (depthwise traverse)\n// returns NULL if end of list\n// uses mask of HIDElementTypeMask to restrict element found\n// use kHIDElementTypeIO to get previous HIDGetNextDeviceElement functionality\npRecElement HIDGetNextDeviceElement (pRecElement pElement, HIDElementTypeMask typeMask)\n{\n\t// should only have elements passed in (though someone could mix calls and pass us a collection)\n\t// collection means return the next child or sibling (in that order)\n\t// element means returnt he next sibling (as elements can't have children\n    if (NULL != pElement)\n\t{\n\t\tif (pElement->pChild)\n\t\t{\n\t\t\tif (pElement->type != kIOHIDElementTypeCollection)\n\t\t\t\tHIDReportError (\"Malformed element list: found child of element.\");\n\t\t\telse\n\t\t\t\treturn hid_GetDeviceElement (pElement->pChild, typeMask); // return the child of this element\n\t\t}\n\t\telse if (pElement->pSibling)\n\t\t{\n\t\t\treturn hid_GetDeviceElement (pElement->pSibling, typeMask); //return the sibling of this element\n\t\t}\n\t\telse // at end back up correctly\n\t\t{\n\t\t\tpRecElement pPreviousElement = NULL;\n\t\t\t// malformed device ending in collection\n\t\t\tif (pElement->type == kIOHIDElementTypeCollection)\n\t\t\t\tHIDReportError (\"Malformed device: found collection at end of element chain.\");\n\t\t\t// walk back up tree to element prior to first collection ecountered and take next element\n\t\t\twhile (NULL != pElement->pPrevious)\n\t\t\t{\n\t\t\t\tpPreviousElement = pElement;\n\t\t\t\tpElement = pElement->pPrevious; // look at previous element\n\t\t\t\t\t\t\t\t\t// if we have a collection and the previous element is the branch element (should have both a colection and next element attached to it)\n\t\t // if we found a collection, which we are not at the sibling level that actually does have siblings\n\t\t\t\tif (((pElement->type == kIOHIDElementTypeCollection) && (pPreviousElement != pElement->pSibling) && pElement->pSibling) ||\n\t\t// or if we are at the top\n\t\t(NULL == pElement->pPrevious)) // at top of tree\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (NULL == pElement->pPrevious)\n\t\t\t\treturn NULL; // got to top of list with only a collection as the first element\n\t\t\t\t // now we must have been down the child route so go down the sibling route\n\t\t\tpElement = pElement->pSibling; // element of interest\n\t\t\treturn hid_GetDeviceElement (pElement, typeMask); // otherwise return this element\n\t\t}\n\t}\n\treturn NULL;\n}\n\n// ---------------------------------\n// get previous element of given device in list given current element as parameter\n// this wlaks directly up the tree to the top element and does not search at each level\n// returns NULL if beginning of list\n// uses mask of HIDElementTypeMask to restrict element found\n// use kHIDElementTypeIO to get non-collection elements\npRecElement HIDGetPreviousDeviceElement (pRecElement pElement, HIDElementTypeMask typeMask)\n{\n\tpRecElement pPreviousElement = pElement->pPrevious;\n\t// walk back up tree to element prior\n\twhile (pPreviousElement && !hid_MatchElementTypeMask (pPreviousElement->type, typeMask))\n\t{\n\t\tpElement = pPreviousElement; // look at previous element\n\t\tpPreviousElement = pElement->pPrevious;\n\t}\n\treturn pPreviousElement; // return this element\n}\n\n// ---------------------------------\n// returns C string type name given a type enumeration passed in as parameter (see IOHIDKeys.h)\n// returns \"Unknown Type\" for invalid types\n\nvoid HIDGetTypeName (IOHIDElementType theType, char * cstrName)\n{\n    switch (theType)\n    {\n        case kIOHIDElementTypeInput_Misc:\n            sprintf(cstrName, \"Miscellaneous Input\");\n            break;\n        case kIOHIDElementTypeInput_Button:\n            sprintf(cstrName, \"Button Input\");\n            break;\n        case kIOHIDElementTypeInput_Axis:\n            sprintf(cstrName, \"Axis Input\");\n            break;\n        case kIOHIDElementTypeInput_ScanCodes:\n            sprintf(cstrName, \"Scan Code Input\");\n            break;\n        case kIOHIDElementTypeOutput:\n            sprintf(cstrName, \"Output\");\n            break;\n        case kIOHIDElementTypeFeature:\n            sprintf(cstrName, \"Feature\");\n            break;\n        case kIOHIDElementTypeCollection:\n            sprintf(cstrName, \"Collection\");\n            break;\n        default:\n            sprintf(cstrName, \"Unknown Type\");\n            break;\n    }\n}\n\n// ---------------------------------\n// returns C string usage given usage page and usage passed in as parameters (see IOUSBHIDParser.h)\n// returns usage page and usage values in string form for unknown values\n\nvoid HIDGetUsageName (const long valueUsagePage, const long valueUsage, char * cstrName)\n{\n\tif (xml_GetUsageName(valueUsagePage, valueUsage, cstrName))\n\t\treturn;\n\n    switch (valueUsagePage)\n    {\n        case kHIDPage_Undefined:\n\t\t\tswitch (valueUsage)\n            {\n                default: sprintf (cstrName, \"Undefined Page, Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_GenericDesktop:\n            switch (valueUsage)\n            {\n                case kHIDUsage_GD_Pointer: sprintf (cstrName, \"Pointer\"); break;\n                case kHIDUsage_GD_Mouse: sprintf (cstrName, \"Mouse\"); break;\n                case kHIDUsage_GD_Joystick: sprintf (cstrName, \"Joystick\"); break;\n                case kHIDUsage_GD_GamePad: sprintf (cstrName, \"GamePad\"); break;\n                case kHIDUsage_GD_Keyboard: sprintf (cstrName, \"Keyboard\"); break;\n                case kHIDUsage_GD_Keypad: sprintf (cstrName, \"Keypad\"); break;\n                case kHIDUsage_GD_MultiAxisController: sprintf (cstrName, \"Multi-Axis Controller\"); break;\n\n                case kHIDUsage_GD_X: sprintf (cstrName, \"X-Axis\"); break;\n                case kHIDUsage_GD_Y: sprintf (cstrName, \"Y-Axis\"); break;\n                case kHIDUsage_GD_Z: sprintf (cstrName, \"Z-Axis\"); break;\n                case kHIDUsage_GD_Rx: sprintf (cstrName, \"X-Rotation\"); break;\n                case kHIDUsage_GD_Ry: sprintf (cstrName, \"Y-Rotation\"); break;\n                case kHIDUsage_GD_Rz: sprintf (cstrName, \"Z-Rotation\"); break;\n                case kHIDUsage_GD_Slider: sprintf (cstrName, \"Slider\"); break;\n                case kHIDUsage_GD_Dial: sprintf (cstrName, \"Dial\"); break;\n                case kHIDUsage_GD_Wheel: sprintf (cstrName, \"Wheel\"); break;\n                case kHIDUsage_GD_Hatswitch: sprintf (cstrName, \"Hatswitch\"); break;\n                case kHIDUsage_GD_CountedBuffer: sprintf (cstrName, \"Counted Buffer\"); break;\n                case kHIDUsage_GD_ByteCount: sprintf (cstrName, \"Byte Count\"); break;\n                case kHIDUsage_GD_MotionWakeup: sprintf (cstrName, \"Motion Wakeup\"); break;\n                case kHIDUsage_GD_Start: sprintf (cstrName, \"Start\"); break;\n                case kHIDUsage_GD_Select: sprintf (cstrName, \"Select\"); break;\n\n                case kHIDUsage_GD_Vx: sprintf (cstrName, \"X-Velocity\"); break;\n                case kHIDUsage_GD_Vy: sprintf (cstrName, \"Y-Velocity\"); break;\n                case kHIDUsage_GD_Vz: sprintf (cstrName, \"Z-Velocity\"); break;\n                case kHIDUsage_GD_Vbrx: sprintf (cstrName, \"X-Rotation Velocity\"); break;\n                case kHIDUsage_GD_Vbry: sprintf (cstrName, \"Y-Rotation Velocity\"); break;\n                case kHIDUsage_GD_Vbrz: sprintf (cstrName, \"Z-Rotation Velocity\"); break;\n                case kHIDUsage_GD_Vno: sprintf (cstrName, \"Vno\"); break;\n\n                case kHIDUsage_GD_SystemControl: sprintf (cstrName, \"System Control\"); break;\n                case kHIDUsage_GD_SystemPowerDown: sprintf (cstrName, \"System Power Down\"); break;\n                case kHIDUsage_GD_SystemSleep: sprintf (cstrName, \"System Sleep\"); break;\n                case kHIDUsage_GD_SystemWakeUp: sprintf (cstrName, \"System Wake Up\"); break;\n                case kHIDUsage_GD_SystemContextMenu: sprintf (cstrName, \"System Context Menu\"); break;\n                case kHIDUsage_GD_SystemMainMenu: sprintf (cstrName, \"System Main Menu\"); break;\n                case kHIDUsage_GD_SystemAppMenu: sprintf (cstrName, \"System App Menu\"); break;\n                case kHIDUsage_GD_SystemMenuHelp: sprintf (cstrName, \"System Menu Help\"); break;\n                case kHIDUsage_GD_SystemMenuExit: sprintf (cstrName, \"System Menu Exit\"); break;\n                case kHIDUsage_GD_SystemMenu: sprintf (cstrName, \"System Menu\"); break;\n                case kHIDUsage_GD_SystemMenuRight: sprintf (cstrName, \"System Menu Right\"); break;\n                case kHIDUsage_GD_SystemMenuLeft: sprintf (cstrName, \"System Menu Left\"); break;\n                case kHIDUsage_GD_SystemMenuUp: sprintf (cstrName, \"System Menu Up\"); break;\n                case kHIDUsage_GD_SystemMenuDown: sprintf (cstrName, \"System Menu Down\"); break;\n\n                case kHIDUsage_GD_DPadUp: sprintf (cstrName, \"DPad Up\"); break;\n                case kHIDUsage_GD_DPadDown: sprintf (cstrName, \"DPad Down\"); break;\n                case kHIDUsage_GD_DPadRight: sprintf (cstrName, \"DPad Right\"); break;\n                case kHIDUsage_GD_DPadLeft: sprintf (cstrName, \"DPad Left\"); break;\n\n                case kHIDUsage_GD_Reserved: sprintf (cstrName, \"Reserved\"); break;\n\n                default: sprintf (cstrName, \"Generic Desktop Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_Simulation:\n            switch (valueUsage)\n            {\n                default: sprintf (cstrName, \"Simulation Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_VR:\n            switch (valueUsage)\n            {\n                default: sprintf (cstrName, \"VR Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_Sport:\n            switch (valueUsage)\n            {\n                default: sprintf (cstrName, \"Sport Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_Game:\n            switch (valueUsage)\n            {\n                default: sprintf (cstrName, \"Game Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_KeyboardOrKeypad:\n            switch (valueUsage)\n            {\n                default: sprintf (cstrName, \"Keyboard Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_LEDs:\n            switch (valueUsage)\n            {\n\t\t\t\t// some LED usages\n\t\t\t\tcase kHIDUsage_LED_IndicatorRed: sprintf (cstrName, \"Red LED\"); break;\n\t\t\t\tcase kHIDUsage_LED_IndicatorGreen: sprintf (cstrName, \"Green LED\"); break;\n\t\t\t\tcase kHIDUsage_LED_IndicatorAmber: sprintf (cstrName, \"Amber LED\"); break;\n\t\t\t\tcase kHIDUsage_LED_GenericIndicator: sprintf (cstrName, \"Generic LED\"); break;\n\t\t\t\tcase kHIDUsage_LED_SystemSuspend: sprintf (cstrName, \"System Suspend LED\"); break;\n\t\t\t\tcase kHIDUsage_LED_ExternalPowerConnected: sprintf (cstrName, \"External Power LED\"); break;\n\t\t\t\tdefault: sprintf (cstrName, \"LED Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_Button:\n            switch (valueUsage)\n            {\n                default: sprintf (cstrName, \"Button #%ld\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_Ordinal:\n            switch (valueUsage)\n            {\n                default: sprintf (cstrName, \"Ordinal Instance %lx\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_Telephony:\n            switch (valueUsage)\n            {\n                default: sprintf (cstrName, \"Telephony Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_Consumer:\n            switch (valueUsage)\n            {\n                default: sprintf (cstrName, \"Consumer Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_Digitizer:\n            switch (valueUsage)\n            {\n                default: sprintf (cstrName, \"Digitizer Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_PID:\n\t\t\tif (((valueUsage >= 0x02) && (valueUsage <= 0x1F)) || ((valueUsage >= 0x29) && (valueUsage <= 0x2F)) ||\n\t   ((valueUsage >= 0x35) && (valueUsage <= 0x3F)) || ((valueUsage >= 0x44) && (valueUsage <= 0x4F)) ||\n\t   (valueUsage == 0x8A) || (valueUsage == 0x93)  || ((valueUsage >= 0x9D) && (valueUsage <= 0x9E)) ||\n\t   ((valueUsage >= 0xA1) && (valueUsage <= 0xA3)) || ((valueUsage >= 0xAD) && (valueUsage <= 0xFFFF)))\n                sprintf (cstrName, \"PID Reserved\");\n\t\t\telse\n\t\t\t\tswitch (valueUsage)\n\t\t\t\t{\n\t\t\t\t\tcase 0x00: sprintf (cstrName, \"PID Undefined Usage\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_PhysicalInterfaceDevice: sprintf (cstrName, \"Physical Interface Device\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_Normal: sprintf (cstrName, \"Normal Force\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_SetEffectReport: sprintf (cstrName, \"Set Effect Report\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_EffectBlockIndex: sprintf (cstrName, \"Effect Block Index\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ParamBlockOffset: sprintf (cstrName, \"Parameter Block Offset\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ROM_Flag: sprintf (cstrName, \"ROM Flag\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_EffectType: sprintf (cstrName, \"Effect Type\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ET_ConstantForce: sprintf (cstrName, \"Effect Type Constant Force\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ET_Ramp: sprintf (cstrName, \"Effect Type Ramp\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ET_CustomForceData: sprintf (cstrName, \"Effect Type Custom Force Data\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ET_Square: sprintf (cstrName, \"Effect Type Square\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ET_Sine: sprintf (cstrName, \"Effect Type Sine\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ET_Triangle: sprintf (cstrName, \"Effect Type Triangle\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ET_SawtoothUp: sprintf (cstrName, \"Effect Type Sawtooth Up\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ET_SawtoothDown: sprintf (cstrName, \"Effect Type Sawtooth Down\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ET_Spring: sprintf (cstrName, \"Effect Type Spring\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ET_Damper: sprintf (cstrName, \"Effect Type Damper\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ET_Inertia: sprintf (cstrName, \"Effect Type Inertia\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ET_Friction: sprintf (cstrName, \"Effect Type Friction\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_Duration: sprintf (cstrName, \"Effect Duration\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_SamplePeriod: sprintf (cstrName, \"Effect Sample Period\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_Gain: sprintf (cstrName, \"Effect Gain\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_TriggerButton: sprintf (cstrName, \"Effect Trigger Button\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_TriggerRepeatInterval: sprintf (cstrName, \"Effect Trigger Repeat Interval\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_AxesEnable: sprintf (cstrName, \"Axis Enable\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_DirectionEnable: sprintf (cstrName, \"Direction Enable\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_Direction: sprintf (cstrName, \"Direction\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_TypeSpecificBlockOffset: sprintf (cstrName, \"Type Specific Block Offset\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_BlockType: sprintf (cstrName, \"Block Type\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_SetEnvelopeReport: sprintf (cstrName, \"Set Envelope Report\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_AttackLevel: sprintf (cstrName, \"Envelope Attack Level\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_AttackTime: sprintf (cstrName, \"Envelope Attack Time\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_FadeLevel: sprintf (cstrName, \"Envelope Fade Level\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_FadeTime: sprintf (cstrName, \"Envelope Fade Time\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_SetConditionReport: sprintf (cstrName, \"Set Condition Report\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_CP_Offset: sprintf (cstrName, \"Condition CP Offset\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_PositiveCoefficient: sprintf (cstrName, \"Condition Positive Coefficient\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_NegativeCoefficient: sprintf (cstrName, \"Condition Negative Coefficient\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_PositiveSaturation: sprintf (cstrName, \"Condition Positive Saturation\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_NegativeSaturation: sprintf (cstrName, \"Condition Negative Saturation\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_DeadBand: sprintf (cstrName, \"Condition Dead Band\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_DownloadForceSample: sprintf (cstrName, \"Download Force Sample\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_IsochCustomForceEnable: sprintf (cstrName, \"Isoch Custom Force Enable\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_CustomForceDataReport: sprintf (cstrName, \"Custom Force Data Report\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_CustomForceData: sprintf (cstrName, \"Custom Force Data\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_CustomForceVendorDefinedData: sprintf (cstrName, \"Custom Force Vendor Defined Data\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_SetCustomForceReport: sprintf (cstrName, \"Set Custom Force Report\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_CustomForceDataOffset: sprintf (cstrName, \"Custom Force Data Offset\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_SampleCount: sprintf (cstrName, \"Custom Force Sample Count\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_SetPeriodicReport: sprintf (cstrName, \"Set Periodic Report\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_Offset: sprintf (cstrName, \"Periodic Offset\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_Magnitude: sprintf (cstrName, \"Periodic Magnitude\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_Phase: sprintf (cstrName, \"Periodic Phase\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_Period: sprintf (cstrName, \"Periodic Period\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_SetConstantForceReport: sprintf (cstrName, \"Set Constant Force Report\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_SetRampForceReport: sprintf (cstrName, \"Set Ramp Force Report\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_RampStart: sprintf (cstrName, \"Ramp Start\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_RampEnd: sprintf (cstrName, \"Ramp End\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_EffectOperationReport: sprintf (cstrName, \"Effect Operation Report\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_EffectOperation: sprintf (cstrName, \"Effect Operation\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_OpEffectStart: sprintf (cstrName, \"Op Effect Start\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_OpEffectStartSolo: sprintf (cstrName, \"Op Effect Start Solo\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_OpEffectStop: sprintf (cstrName, \"Op Effect Stop\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_LoopCount: sprintf (cstrName, \"Op Effect Loop Count\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_DeviceGainReport: sprintf (cstrName, \"Device Gain Report\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_DeviceGain: sprintf (cstrName, \"Device Gain\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_PoolReport: sprintf (cstrName, \"PID Pool Report\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_RAM_PoolSize: sprintf (cstrName, \"RAM Pool Size\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ROM_PoolSize: sprintf (cstrName, \"ROM Pool Size\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ROM_EffectBlockCount: sprintf (cstrName, \"ROM Effect Block Count\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_SimultaneousEffectsMax: sprintf (cstrName, \"Simultaneous Effects Max\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_PoolAlignment: sprintf (cstrName, \"Pool Alignment\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_PoolMoveReport: sprintf (cstrName, \"PID Pool Move Report\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_MoveSource: sprintf (cstrName, \"Move Source\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_MoveDestination: sprintf (cstrName, \"Move Destination\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_MoveLength: sprintf (cstrName, \"Move Length\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_BlockLoadReport: sprintf (cstrName, \"PID Block Load Report\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_BlockLoadStatus: sprintf (cstrName, \"Block Load Status\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_BlockLoadSuccess: sprintf (cstrName, \"Block Load Success\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_BlockLoadFull: sprintf (cstrName, \"Block Load Full\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_BlockLoadError: sprintf (cstrName, \"Block Load Error\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_BlockHandle: sprintf (cstrName, \"Block Handle\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_BlockFreeReport: sprintf (cstrName, \"PID Block Free Report\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_TypeSpecificBlockHandle: sprintf (cstrName, \"Type Specific Block Handle\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_StateReport: sprintf (cstrName, \"PID State Report\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_EffectPlaying: sprintf (cstrName, \"Effect Playing\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_DeviceControlReport: sprintf (cstrName, \"PID Device Control Report\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_DeviceControl: sprintf (cstrName, \"PID Device Control\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_DC_EnableActuators: sprintf (cstrName, \"Device Control Enable Actuators\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_DC_DisableActuators: sprintf (cstrName, \"Device Control Disable Actuators\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_DC_StopAllEffects: sprintf (cstrName, \"Device Control Stop All Effects\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_DC_DeviceReset: sprintf (cstrName, \"Device Control Reset\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_DC_DevicePause: sprintf (cstrName, \"Device Control Pause\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_DC_DeviceContinue: sprintf (cstrName, \"Device Control Continue\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_DevicePaused: sprintf (cstrName, \"Device Paused\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ActuatorsEnabled: sprintf (cstrName, \"Actuators Enabled\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_SafetySwitch: sprintf (cstrName, \"Safety Switch\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ActuatorOverrideSwitch: sprintf (cstrName, \"Actuator Override Switch\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_ActuatorPower: sprintf (cstrName, \"Actuator Power\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_StartDelay: sprintf (cstrName, \"Start Delay\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_ParameterBlockSize: sprintf (cstrName, \"Parameter Block Size\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_DeviceManagedPool: sprintf (cstrName, \"Device Managed Pool\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_SharedParameterBlocks: sprintf (cstrName, \"Shared Parameter Blocks\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PID_CreateNewEffectReport: sprintf (cstrName, \"Create New Effect Report\"); break;\n\t\t\t\t\tcase kHIDUsage_PID_RAM_PoolAvailable: sprintf (cstrName, \"RAM Pool Available\"); break;\n\t\t\t\t\tdefault: sprintf (cstrName, \"PID Usage 0x%lx\", valueUsage); break;\n\t\t\t\t}\n\t\t\t\t\tbreak;\n        case kHIDPage_Unicode:\n            switch (valueUsage)\n            {\n                default: sprintf (cstrName, \"Unicode Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_PowerDevice:\n\t\t\tif (((valueUsage >= 0x06) && (valueUsage <= 0x0F)) || ((valueUsage >= 0x26) && (valueUsage <= 0x2F)) ||\n\t   ((valueUsage >= 0x39) && (valueUsage <= 0x3F)) || ((valueUsage >= 0x48) && (valueUsage <= 0x4F)) ||\n\t   ((valueUsage >= 0x58) && (valueUsage <= 0x5F)) || (valueUsage == 0x6A) ||\n\t   ((valueUsage >= 0x74) && (valueUsage <= 0xFC)))\n                sprintf (cstrName, \"Power Device Reserved\");\n\t\t\telse\n\t\t\t\tswitch (valueUsage)\n\t\t\t\t{\n\t\t\t\t\tcase kHIDUsage_PD_Undefined: sprintf (cstrName, \"Power Device Undefined Usage\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_iName: sprintf (cstrName, \"Power Device Name Index\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_PresentStatus: sprintf (cstrName, \"Power Device Present Status\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_ChangedStatus: sprintf (cstrName, \"Power Device Changed Status\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_UPS: sprintf (cstrName, \"Uninterruptible Power Supply\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_PowerSupply: sprintf (cstrName, \"Power Supply\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PD_BatterySystem: sprintf (cstrName, \"Battery System Power Module\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_BatterySystemID: sprintf (cstrName, \"Battery System ID\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Battery: sprintf (cstrName, \"Battery\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_BatteryID: sprintf (cstrName, \"Battery ID\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Charger: sprintf (cstrName, \"Charger\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_ChargerID: sprintf (cstrName, \"Charger ID\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_PowerConverter: sprintf (cstrName, \"Power Converter Power Module\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_PowerConverterID: sprintf (cstrName, \"Power Converter ID\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_OutletSystem: sprintf (cstrName, \"Outlet System power module\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_OutletSystemID: sprintf (cstrName, \"Outlet System ID\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Input: sprintf (cstrName, \"Power Device Input\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_InputID: sprintf (cstrName, \"Power Device Input ID\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Output: sprintf (cstrName, \"Power Device Output\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_OutputID: sprintf (cstrName, \"Power Device Output ID\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Flow: sprintf (cstrName, \"Power Device Flow\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_FlowID: sprintf (cstrName, \"Power Device Flow ID\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Outlet: sprintf (cstrName, \"Power Device Outlet\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_OutletID: sprintf (cstrName, \"Power Device Outlet ID\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Gang: sprintf (cstrName, \"Power Device Gang\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_GangID: sprintf (cstrName, \"Power Device Gang ID\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_PowerSummary: sprintf (cstrName, \"Power Device Power Summary\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_PowerSummaryID: sprintf (cstrName, \"Power Device Power Summary ID\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PD_Voltage: sprintf (cstrName, \"Power Device Voltage\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Current: sprintf (cstrName, \"Power Device Current\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Frequency: sprintf (cstrName, \"Power Device Frequency\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_ApparentPower: sprintf (cstrName, \"Power Device Apparent Power\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_ActivePower: sprintf (cstrName, \"Power Device RMS Power\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_PercentLoad: sprintf (cstrName, \"Power Device Percent Load\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Temperature: sprintf (cstrName, \"Power Device Temperature\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Humidity: sprintf (cstrName, \"Power Device Humidity\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_BadCount: sprintf (cstrName, \"Power Device Bad Condition Count\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PD_ConfigVoltage: sprintf (cstrName, \"Power Device Nominal Voltage\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_ConfigCurrent: sprintf (cstrName, \"Power Device Nominal Current\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_ConfigFrequency: sprintf (cstrName, \"Power Device Nominal Frequency\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_ConfigApparentPower: sprintf (cstrName, \"Power Device Nominal Apparent Power\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_ConfigActivePower: sprintf (cstrName, \"Power Device Nominal RMS Power\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_ConfigPercentLoad: sprintf (cstrName, \"Power Device Nominal Percent Load\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_ConfigTemperature: sprintf (cstrName, \"Power Device Nominal Temperature\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PD_ConfigHumidity: sprintf (cstrName, \"Power Device Nominal Humidity\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_SwitchOnControl: sprintf (cstrName, \"Power Device Switch On Control\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_SwitchOffControl: sprintf (cstrName, \"Power Device Switch Off Control\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_ToggleControl: sprintf (cstrName, \"Power Device Toogle Sequence Control\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_LowVoltageTransfer: sprintf (cstrName, \"Power Device Min Transfer Voltage\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_HighVoltageTransfer: sprintf (cstrName, \"Power Device Max Transfer Voltage\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_DelayBeforeReboot: sprintf (cstrName, \"Power Device Delay Before Reboot\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_DelayBeforeStartup: sprintf (cstrName, \"Power Device Delay Before Startup\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_DelayBeforeShutdown: sprintf (cstrName, \"Power Device Delay Before Shutdown\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Test: sprintf (cstrName, \"Power Device Test Request/Result\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_ModuleReset: sprintf (cstrName, \"Power Device Reset Request/Result\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_AudibleAlarmControl: sprintf (cstrName, \"Power Device Audible Alarm Control\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PD_Present: sprintf (cstrName, \"Power Device Present\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Good: sprintf (cstrName, \"Power Device Good\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_InternalFailure: sprintf (cstrName, \"Power Device Internal Failure\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_VoltageOutOfRange: sprintf (cstrName, \"Power Device Voltage Out Of Range\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_FrequencyOutOfRange: sprintf (cstrName, \"Power Device Frequency Out Of Range\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Overload: sprintf (cstrName, \"Power Device Overload\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_OverCharged: sprintf (cstrName, \"Power Device Over Charged\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_OverTemperature: sprintf (cstrName, \"Power Device Over Temperature\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_ShutdownRequested: sprintf (cstrName, \"Power Device Shutdown Requested\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PD_ShutdownImminent: sprintf (cstrName, \"Power Device Shutdown Imminent\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_SwitchOnOff: sprintf (cstrName, \"Power Device On/Off Switch Status\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Switchable: sprintf (cstrName, \"Power Device Switchable\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Used: sprintf (cstrName, \"Power Device Used\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Boost: sprintf (cstrName, \"Power Device Boosted\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Buck: sprintf (cstrName, \"Power Device Bucked\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Initialized: sprintf (cstrName, \"Power Device Initialized\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_Tested: sprintf (cstrName, \"Power Device Tested\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_AwaitingPower: sprintf (cstrName, \"Power Device Awaiting Power\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_CommunicationLost: sprintf (cstrName, \"Power Device Communication Lost\"); break;\n\n\t\t\t\t\tcase kHIDUsage_PD_iManufacturer: sprintf (cstrName, \"Power Device Manufacturer String Index\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_iProduct: sprintf (cstrName, \"Power Device Product String Index\"); break;\n\t\t\t\t\tcase kHIDUsage_PD_iserialNumber: sprintf (cstrName, \"Power Device Serial Number String Index\"); break;\n\t\t\t\t\tdefault: sprintf (cstrName, \"Power Device Usage 0x%lx\", valueUsage); break;\n\t\t\t\t}\n\t\t\t\t\tbreak;\n        case kHIDPage_BatterySystem:\n\t\t\tif (((valueUsage >= 0x0A) && (valueUsage <= 0x0F)) || ((valueUsage >= 0x1E) && (valueUsage <= 0x27)) ||\n\t   ((valueUsage >= 0x30) && (valueUsage <= 0x3F)) || ((valueUsage >= 0x4C) && (valueUsage <= 0x5F)) ||\n\t   ((valueUsage >= 0x6C) && (valueUsage <= 0x7F)) || ((valueUsage >= 0x90) && (valueUsage <= 0xBF)) ||\n\t   ((valueUsage >= 0xC3) && (valueUsage <= 0xCF)) || ((valueUsage >= 0xDD) && (valueUsage <= 0xEF)) ||\n\t   ((valueUsage >= 0xF2) && (valueUsage <= 0xFF)))\n                sprintf (cstrName, \"Power Device Reserved\");\n\t\t\telse\n\t\t\t\tswitch (valueUsage)\n\t\t\t\t{\n\t\t\t\t\tcase kHIDUsage_BS_Undefined: sprintf (cstrName, \"Battery System Undefined\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_SMBBatteryMode: sprintf (cstrName, \"SMB Mode\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_SMBBatteryStatus: sprintf (cstrName, \"SMB Status\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_SMBAlarmWarning: sprintf (cstrName, \"SMB Alarm Warning\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_SMBChargerMode: sprintf (cstrName, \"SMB Charger Mode\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_SMBChargerStatus: sprintf (cstrName, \"SMB Charger Status\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_SMBChargerSpecInfo: sprintf (cstrName, \"SMB Charger Extended Status\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_SMBSelectorState: sprintf (cstrName, \"SMB Selector State\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_SMBSelectorPresets: sprintf (cstrName, \"SMB Selector Presets\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_SMBSelectorInfo: sprintf (cstrName, \"SMB Selector Info\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_OptionalMfgFunction1: sprintf (cstrName, \"Battery System Optional SMB Mfg Function 1\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_OptionalMfgFunction2: sprintf (cstrName, \"Battery System Optional SMB Mfg Function 2\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_OptionalMfgFunction3: sprintf (cstrName, \"Battery System Optional SMB Mfg Function 3\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_OptionalMfgFunction4: sprintf (cstrName, \"Battery System Optional SMB Mfg Function 4\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_OptionalMfgFunction5: sprintf (cstrName, \"Battery System Optional SMB Mfg Function 5\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_ConnectionToSMBus: sprintf (cstrName, \"Battery System Connection To System Management Bus\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_OutputConnection: sprintf (cstrName, \"Battery System Output Connection Status\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_ChargerConnection: sprintf (cstrName, \"Battery System Charger Connection\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_BatteryInsertion: sprintf (cstrName, \"Battery System Battery Insertion\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_Usenext: sprintf (cstrName, \"Battery System Use Next\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_OKToUse: sprintf (cstrName, \"Battery System OK To Use\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_BatterySupported: sprintf (cstrName, \"Battery System Battery Supported\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_SelectorRevision: sprintf (cstrName, \"Battery System Selector Revision\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_ChargingIndicator: sprintf (cstrName, \"Battery System Charging Indicator\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_ManufacturerAccess: sprintf (cstrName, \"Battery System Manufacturer Access\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_RemainingCapacityLimit: sprintf (cstrName, \"Battery System Remaining Capacity Limit\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_RemainingTimeLimit: sprintf (cstrName, \"Battery System Remaining Time Limit\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_AtRate: sprintf (cstrName, \"Battery System At Rate...\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_CapacityMode: sprintf (cstrName, \"Battery System Capacity Mode\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_BroadcastToCharger: sprintf (cstrName, \"Battery System Broadcast To Charger\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_PrimaryBattery: sprintf (cstrName, \"Battery System Primary Battery\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_ChargeController: sprintf (cstrName, \"Battery System Charge Controller\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_TerminateCharge: sprintf (cstrName, \"Battery System Terminate Charge\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_TerminateDischarge: sprintf (cstrName, \"Battery System Terminate Discharge\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_BelowRemainingCapacityLimit: sprintf (cstrName, \"Battery System Below Remaining Capacity Limit\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_RemainingTimeLimitExpired: sprintf (cstrName, \"Battery System Remaining Time Limit Expired\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_Charging: sprintf (cstrName, \"Battery System Charging\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_Discharging: sprintf (cstrName, \"Battery System Discharging\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_FullyCharged: sprintf (cstrName, \"Battery System Fully Charged\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_FullyDischarged: sprintf (cstrName, \"Battery System Fully Discharged\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_ConditioningFlag: sprintf (cstrName, \"Battery System Conditioning Flag\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_AtRateOK: sprintf (cstrName, \"Battery System At Rate OK\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_SMBErrorCode: sprintf (cstrName, \"Battery System SMB Error Code\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_NeedReplacement: sprintf (cstrName, \"Battery System Need Replacement\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_AtRateTimeToFull: sprintf (cstrName, \"Battery System At Rate Time To Full\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_AtRateTimeToEmpty: sprintf (cstrName, \"Battery System At Rate Time To Empty\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_AverageCurrent: sprintf (cstrName, \"Battery System Average Current\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_Maxerror: sprintf (cstrName, \"Battery System Max Error\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_RelativeStateOfCharge: sprintf (cstrName, \"Battery System Relative State Of Charge\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_AbsoluteStateOfCharge: sprintf (cstrName, \"Battery System Absolute State Of Charge\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_RemainingCapacity: sprintf (cstrName, \"Battery System Remaining Capacity\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_FullChargeCapacity: sprintf (cstrName, \"Battery System Full Charge Capacity\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_RunTimeToEmpty: sprintf (cstrName, \"Battery System Run Time To Empty\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_AverageTimeToEmpty: sprintf (cstrName, \"Battery System Average Time To Empty\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_AverageTimeToFull: sprintf (cstrName, \"Battery System Average Time To Full\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_CycleCount: sprintf (cstrName, \"Battery System Cycle Count\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_BattPackModelLevel: sprintf (cstrName, \"Battery System Batt Pack Model Level\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_InternalChargeController: sprintf (cstrName, \"Battery System Internal Charge Controller\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_PrimaryBatterySupport: sprintf (cstrName, \"Battery System Primary Battery Support\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_DesignCapacity: sprintf (cstrName, \"Battery System Design Capacity\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_SpecificationInfo: sprintf (cstrName, \"Battery System Specification Info\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_ManufacturerDate: sprintf (cstrName, \"Battery System Manufacturer Date\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_SerialNumber: sprintf (cstrName, \"Battery System Serial Number\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_iManufacturerName: sprintf (cstrName, \"Battery System Manufacturer Name Index\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_iDevicename: sprintf (cstrName, \"Battery System Device Name Index\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_iDeviceChemistry: sprintf (cstrName, \"Battery System Device Chemistry Index\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_ManufacturerData: sprintf (cstrName, \"Battery System Manufacturer Data\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_Rechargable: sprintf (cstrName, \"Battery System Rechargable\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_WarningCapacityLimit: sprintf (cstrName, \"Battery System Warning Capacity Limit\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_CapacityGranularity1: sprintf (cstrName, \"Battery System Capacity Granularity 1\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_CapacityGranularity2: sprintf (cstrName, \"Battery System Capacity Granularity 2\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_iOEMInformation: sprintf (cstrName, \"Battery System OEM Information Index\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_InhibitCharge: sprintf (cstrName, \"Battery System Inhibit Charge\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_EnablePolling: sprintf (cstrName, \"Battery System Enable Polling\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_ResetToZero: sprintf (cstrName, \"Battery System Reset To Zero\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_ACPresent: sprintf (cstrName, \"Battery System AC Present\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_BatteryPresent: sprintf (cstrName, \"Battery System Battery Present\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_PowerFail: sprintf (cstrName, \"Battery System Power Fail\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_AlarmInhibited: sprintf (cstrName, \"Battery System Alarm Inhibited\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_ThermistorUnderRange: sprintf (cstrName, \"Battery System Thermistor Under Range\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_ThermistorHot: sprintf (cstrName, \"Battery System Thermistor Hot\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_ThermistorCold: sprintf (cstrName, \"Battery System Thermistor Cold\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_ThermistorOverRange: sprintf (cstrName, \"Battery System Thermistor Over Range\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_VoltageOutOfRange: sprintf (cstrName, \"Battery System Voltage Out Of Range\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_CurrentOutOfRange: sprintf (cstrName, \"Battery System Current Out Of Range\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_CurrentNotRegulated: sprintf (cstrName, \"Battery System Current Not Regulated\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_VoltageNotRegulated: sprintf (cstrName, \"Battery System Voltage Not Regulated\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_MasterMode: sprintf (cstrName, \"Battery System Master Mode\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_ChargerSelectorSupport: sprintf (cstrName, \"Battery System Charger Support Selector\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_ChargerSpec: sprintf (cstrName, \"attery System Charger Specification\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_Level2: sprintf (cstrName, \"Battery System Charger Level 2\"); break;\n\t\t\t\t\tcase kHIDUsage_BS_Level3: sprintf (cstrName, \"Battery System Charger Level 3\"); break;\n\t\t\t\t\tdefault: sprintf (cstrName, \"Battery System Usage 0x%lx\", valueUsage); break;\n\t\t\t\t}\n\t\t\t\t\tbreak;\n        case kHIDPage_AlphanumericDisplay:\n            switch (valueUsage)\n            {\n                default: sprintf (cstrName, \"Alphanumeric Display Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n\t\tcase kHIDPage_BarCodeScanner:\n            switch (valueUsage)\n            {\n                default: sprintf (cstrName, \"Bar Code Scanner Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_Scale:\n            switch (valueUsage)\n            {\n                default: sprintf (cstrName, \"Scale Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_CameraControl:\n            switch (valueUsage)\n            {\n                default: sprintf (cstrName, \"Camera Control Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n        case kHIDPage_Arcade:\n            switch (valueUsage)\n            {\n                default: sprintf (cstrName, \"Arcade Usage 0x%lx\", valueUsage); break;\n            }\n            break;\n        default:\n\t\t\tif (valueUsagePage > kHIDPage_VendorDefinedStart)\n\t\t\t\tsprintf (cstrName, \"Vendor Defined Usage 0x%lx\", valueUsage);\n\t\t\telse\n\t\t\t\tsprintf (cstrName, \"Page: 0x%lx, Usage: 0x%lx\", valueUsagePage, valueUsage);\n            break;\n    }\n}\n\n// ---------------------------------\n// returns calibrated value given raw value passed in\n// calibrated value is equal to min and max values returned by HIDGetElementValue since device list built scaled to element reported min and max values\n\nSInt32 HIDCalibrateValue (SInt32 value, pRecElement pElement)\n{\n\tif (NULL != pElement)\n\t{\n\t\tfloat deviceScale = pElement->max - pElement->min;\n\t\tfloat readScale = pElement->calMax - pElement->calMin;\n\t\tif (readScale == 0)\n\t\t\treturn value; // no scaling as\n\t\telse\n\t\t\treturn ((value - pElement->calMin) * deviceScale / readScale) + pElement->min;\n\t}\n\telse\n\t\treturn 0; // bad element passed in\n}\n\n// ---------------------------------\n// returns scaled value given raw value passed in\n// scaled value is equal to current value assumed to be in the range of element reported min and max values scaled to user min and max scaled values\n\nSInt32 HIDScaleValue (SInt32 value, pRecElement pElement)\n{\n    float deviceScale = pElement->userMax - pElement->userMin;\n    float readScale = pElement->max - pElement->min;\n    if (readScale == 0)\n\t\treturn value;\n\telse\n\t\treturn (value - pElement->min) * deviceScale / readScale + pElement->userMin;\n}\n\n// ---------------------------------\n// convert an element type to a mask\nHIDElementTypeMask HIDConvertElementTypeToMask (const long type)\n{\n    HIDElementTypeMask result = kHIDElementTypeAll;\n\n    switch (type)\n    {\n        case kIOHIDElementTypeInput_Misc:\n        case kIOHIDElementTypeInput_Button:\n        case kIOHIDElementTypeInput_Axis:\n        case kIOHIDElementTypeInput_ScanCodes:\n            result = kHIDElementTypeInput;\n            break;\n        case kIOHIDElementTypeOutput:\n            result = kHIDElementTypeOutput;\n            break;\n        case kIOHIDElementTypeFeature:\n            result = kHIDElementTypeFeature;\n            break;\n        case kIOHIDElementTypeCollection:\n            result = kHIDElementTypeCollection;\n            break;\n        default:\n            result = kHIDElementTypeAll;\n            break;\n    }\n    return result;\n}\n\nBoolean HIDFindDevice(const pRecDevice pSearchDevice, pRecDevice *ppFoundDevice)\n{\n    pRecDevice pDevice, pBestDevice = NULL;\n    long bestScore = 0;\n\n    // iterate over all devices\n    pDevice = HIDGetFirstDevice();\n    while (pDevice)\n    {\n        long deviceScore = 1;\n\n        if (pSearchDevice->vendorID && (pSearchDevice->vendorID == pDevice->vendorID))\n        {\n            deviceScore += 10;\n            if (pSearchDevice->productID && (pSearchDevice->productID == pDevice->productID))\n                deviceScore += 8;\n        }\n\n        if ((pSearchDevice->usagePage && (pSearchDevice->usagePage == pDevice->usagePage)) &&\n            (pSearchDevice->usage && (pSearchDevice->usage == pDevice->usage)))\n            deviceScore += 9;\n\n        if (pSearchDevice->locID && (pSearchDevice->locID == pDevice->locID))\n            deviceScore += 5;\n\n\t\tif (deviceScore > bestScore)\n\t\t{\n\t\t\tpBestDevice = pDevice;\n\t\t\tbestScore = deviceScore;\n#if 0\t// set true to output scoring informaton\n\t\t\tprintf(\"\\n-HIDFindDevice(%ld:%ld)-I-Debug, better score: %ld.\",pSearchElement->usagePage, pSearchElement->usage, score);\n\t\t\tHIDPrintElement(pBestElement);\n#endif\n        }\n        pDevice = HIDGetNextDevice(pDevice);\n    }\n\n    if (NULL != pBestDevice)\n    {\n        *ppFoundDevice = pBestDevice;\n#if 0\t// set true to output scoring informaton\n\t\tprintf(\"\\n-HIDFindDevice(%ld:%ld)-I-Debug, best score: %ld.\",pSearchElement->usagePage, pSearchElement->usage, bestScore);\n\t\tHIDPrintElement(pBestElement);\n\t\tprintf(\"\\n\");\n#endif\n        return true;\n    }\n    else\n        return false;\n}\n\n// ---------------------------------\n// find the device and element for this action\n// Device: serial, vendorID, productID, location, usagePage, usage\n// Element: cookie, usagePage, usage,\n\nBoolean HIDFindActionDeviceAndElement(const pRecDevice pSearchDevice, const pRecElement pSearchElement,\n\t\t\t\t\t\t\t\t\t  pRecDevice *ppFoundDevice, pRecElement *ppFoundElement)\n{\n    pRecDevice pDevice, pBestDevice = NULL;\n    pRecElement pElement, pBestElement = NULL;\n\tHIDElementTypeMask hidMask = HIDConvertElementTypeToMask (pSearchElement->type);\n    long bestScore = 0;\n\n    // iterate over all devices\n    pDevice = HIDGetFirstDevice();\n    while (pDevice)\n    {\n        long deviceScore = 1;\n\n        if (pSearchDevice->vendorID && (pSearchDevice->vendorID == pDevice->vendorID))\n        {\n            deviceScore += 10;\n            if (pSearchDevice->productID && (pSearchDevice->productID == pDevice->productID))\n                deviceScore += 8;\n        }\n        if ((pSearchDevice->usagePage && (pSearchDevice->usagePage == pDevice->usagePage)) &&\n            (pSearchDevice->usage && (pSearchDevice->usage == pDevice->usage)))\n            deviceScore += 9;\n\n        if (pSearchDevice->locID && (pSearchDevice->locID == pDevice->locID))\n            deviceScore += 5;\n\n        // iterate over all elements of this device\n        pElement = HIDGetFirstDeviceElement(pDevice, hidMask);\n        while (pElement)\n        {\n            long score = deviceScore;\n\n            if ((pSearchElement->usagePage && (pSearchElement->usagePage == pElement->usagePage)) &&\n                (pSearchElement->usage && (pSearchElement->usage == pElement->usage)))\n\t\t\t{\n                score += 5;\n\n\t\t\t\tif (pSearchElement->cookie && (pSearchElement->cookie == pElement->cookie))\n\t\t\t\t\tscore += 4;\n\t\t\t}\n\t\t\telse\n\t\t\t\tscore = 0;\n#if 0\t\t// set true to output scoring informaton\n\t\t\tif (kHIDPage_KeyboardOrKeypad != pElement->usagePage)\t// skip keyboards here\n\t\t\t{\n\t\t\t\tprintf(\"\\n-HIDFindActionDeviceAndElement(%ld:%ld)-I-Debug, score: %ld.\",pSearchElement->usagePage, pSearchElement->usage, score);\n\t\t\t\tHIDPrintElement(pElement);\n\t\t\t}\n#endif\n            if (score > bestScore)\n            {\n                pBestDevice = pDevice;\n                pBestElement = pElement;\n                bestScore = score;\n#if 0\t\t// set true to output scoring informaton\n\t\t\t\tprintf(\"\\n-HIDFindActionDeviceAndElement(%ld:%ld)-I-Debug, better score: %ld.\",pSearchElement->usagePage, pSearchElement->usage, score);\n\t\t\t\tHIDPrintElement(pBestElement);\n#endif\n            }\n            pElement = HIDGetNextDeviceElement(pElement, hidMask);\n        }\n        pDevice = HIDGetNextDevice(pDevice);\n    }\n\n    if ((NULL != pBestDevice) || (NULL != pBestElement))\n    {\n        *ppFoundDevice = pBestDevice;\n        *ppFoundElement = pBestElement;\n#if 0\t\t// set true to output scoring informaton\n\t\tprintf(\"\\n-HIDFindActionDeviceAndElement(%ld:%ld)-I-Debug, best score: %ld.\",pSearchElement->usagePage, pSearchElement->usage, bestScore);\n\t\tHIDPrintElement(pBestElement);\n\t\tprintf(\"\\n\");\n#endif\n        return true;\n    }\n    else\n        return false;\n}\n\n// ---------------------------------\n// find the device and element for this action\n// Device: serial, vendorID, productID, location, usagePage, usage\n// Element: cookie, usagePage, usage,\n\nBoolean HIDFindSubElement(const pRecElement pStartElement, const pRecElement pSearchElement, pRecElement *ppFoundElement)\n{\n    pRecElement pElement, pBestElement = NULL;\n\tHIDElementTypeMask hidMask = HIDConvertElementTypeToMask (pSearchElement->type);\n    long bestScore = 0;\n\n    if ((NULL == pStartElement) || (NULL == pSearchElement) || (NULL == ppFoundElement))\n        return false;\n\n\t// iterate over all children of this element\n\tpElement = pStartElement->pChild;\n\n\twhile (pElement)\n\t{\n\t\tlong score = 0;\n#if 0\t\t// set true to output searching informaton\n\t\tprintf(\"\\n-HIDFindSubElement, search = {t:%.2lX, u:%.4lX:%.4lX}, match = {t:%.2lX, u:%.4lX:%.4lX, s:\\\"%s\\\"}\",\n\t\t pSearchElement->type, pSearchElement->usagePage, pSearchElement->usage,\n\t\t pElement->type, pElement->usagePage, pElement->usage, pElement->name);\n\t\tfflush(stdout);\n#endif\n\t\tif ((pSearchElement->usagePage && (pSearchElement->usagePage == pElement->usagePage)) && (pSearchElement->usage && (pSearchElement->usage == pElement->usage)))\n\t\t{\n\t\t\tscore += 4;\n\t\t\tif (pSearchElement->cookie && (pSearchElement->cookie == pElement->cookie))\n\t\t\t\tscore += 5;\n\t\t}\n#if 0\t\t// set true to output searching informaton\n\t\tif (kHIDPage_KeyboardOrKeypad != pElement->usagePage)\t// skip keyboards here\n\t\t{\n\t\t\tprintf(\"\\n-HIDFindSubElement(%ld:%ld)-I-Debug, score: %ld.\",pSearchElement->usagePage, pSearchElement->usage, score);\n\t\t\tHIDPrintElement(pElement);\n\t\t}\n#endif\n\t\t\n\t\tif (score > bestScore)\n\t\t{\n\t\t\tpBestElement = pElement;\n\t\t\tbestScore = score;\n#if 0\t\t// set true to output searching informaton\n\t\t\tprintf(\"\\n-HIDFindSubElement(%ld:%ld)-I-Debug, better score: %ld.\",pSearchElement->usagePage, pSearchElement->usage, score);\n\t\t\tHIDPrintElement(pBestElement);\n#endif\n\t\t}\n\t\tpElement = HIDGetNextDeviceElement(pElement, hidMask);\n\t}\n#if 0\t\t// set true to output searching informaton\n\tif (pBestElement)\n\t{\n\t\tprintf(\"\\n-HIDFindSubElement(%ld:%ld)-I-Debug, best score: %ld.\",pSearchElement->usagePage, pSearchElement->usage, bestScore);\n\t\tHIDPrintElement(pBestElement);\n\t\tprintf(\"\\n\");\n\t}\n#endif\n\t\n\t*ppFoundElement = pBestElement;\n\treturn (NULL != pBestElement);\n}\n\n// print out all of an elements information\nint HIDPrintElement(const pRecElement pElement)\n{\n\tint results;\n\tint count;\n\n\tprintf(\"\\n\");\n\n\tif (gDepth != pElement->depth)\n\t\tprintf(\"%d\",gDepth);\n\tfor (count = 0;count < pElement->depth;count++)\n\t\tprintf(\"  | \");\n\n#if 0\t// this is verbose\n\tresults =\n\t\tprintf(\"-HIDPrintElement = {name: \\\"%s\\\", t: 0x%.2lX, u:%ld:%ld, c: %ld, min/max: %ld/%ld, scaled: %ld/%ld, size: %ld, rel: %s, wrap: %s, nonLinear: %s, preferred: %s, nullState: %s, units: %ld, exp: %ld, cal: %ld/%ld, user: %ld/%ld, depth: %ld}.\",\n\t\t pElement->name,\t\t\t\t\t\t\t// name of element (c string)\n\t\t pElement->type,\t\t\t\t\t\t\t// the type defined by IOHIDElementType in IOHIDKeys.h\n\t\t pElement->usagePage,\t\t\t\t\t// usage page from IOUSBHIDParser.h which defines general usage\n\t\t pElement->usage,\t\t\t\t\t\t// usage within above page from IOUSBHIDParser.h which defines specific usage\n\t\t (long) pElement->cookie,\t\t\t\t// unique value (within device of specific vendorID and productID) which identifies element, will NOT change\n\t\t pElement->min,\t\t\t\t\t\t\t// reported min value possible\n\t\t pElement->max,\t\t\t\t\t\t\t// reported max value possible\n\t\t pElement->scaledMin,\t\t\t\t\t// reported scaled min value possible\n\t\t pElement->scaledMax,\t\t\t\t\t// reported scaled max value possible\n\t\t pElement->size,\t\t\t\t\t\t\t// size in bits of data return from element\n\t\t pElement->relative ? \"YES\" : \"NO\",\t\t// are reports relative to last report (deltas)\n\t\t pElement->wrapping ? \"YES\" : \"NO\",\t\t// does element wrap around (one value higher than max is min)\n\t\t pElement->nonLinear ? \"YES\" : \"NO\",\t\t// are the values reported non-linear relative to element movement\n\t\t pElement->preferredState ? \"YES\" : \"NO\",// does element have a preferred state (such as a button)\n\t\t pElement->nullState ? \"YES\" : \"NO\",\t\t// does element have null state\n\t\t pElement->units,\t\t\t\t\t\t// units value is reported in (not used very often)\n\t\t pElement->unitExp,\t\t\t\t\t\t// exponent for units (also not used very often)\n\t\t pElement->calMin, \t\t\t\t\t\t// min returned value (for calibrate call)\n\t\t pElement->calMax, \t\t\t\t\t\t// max returned value\n\t\t pElement->userMin, \t\t\t\t\t\t// user set min to scale to (for scale call)\n\t\t pElement->userMax, \t\t\t\t\t\t// user set max\n\t\t pElement->depth\n\t\t );\n#else\t// this is brief\n\tresults =\n\t\tprintf(\"-HIDPrintElement = {t: 0x%lX, u:%ld:%ld, c: %ld, name: \\\"%s\\\", d: %ld}.\",\n\t\t pElement->type,\t\t\t\t// the type defined by IOHIDElementType in IOHIDKeys.h\n\t\t pElement->usagePage,\t\t\t// usage page from IOUSBHIDParser.h which defines general usage\n\t\t pElement->usage,\t\t\t\t// usage within above page from IOUSBHIDParser.h which defines specific usage\n\t\t (long) pElement->cookie,\t\t// unique value (within device of specific vendorID and productID) which identifies element, will NOT change\n\t\t pElement->name,\t\t\t\t// name of element (c string)\n\t\t pElement->depth\n\t\t );\n#endif\n\tfflush(stdout);\n\treturn results;\n}\n\n// return true if this is a valid device pointer\nBoolean HIDIsValidDevice(const pRecDevice pSearchDevice)\n{\n\tpRecDevice pDevice = gpDeviceList;\n\n\twhile (pDevice)\n\t{\n\t\tif (pDevice == pSearchDevice)\n\t\t\treturn true;\n\t\tpDevice = pDevice->pNext;\n\t}\n\treturn false;\n}\n\n// return true if this is a valid element pointer for this device\nBoolean HIDIsValidElement(const pRecDevice pSearchDevice, const pRecElement pSearchElement)\n{\n\tif (HIDIsValidDevice(pSearchDevice))\n\t{\n\t\tpRecElement pRecElementTemp = HIDGetFirstDeviceElement(pSearchDevice,kHIDElementTypeAll);\n\t\twhile (pRecElementTemp)\n\t\t{\n\t\t\tif (pRecElementTemp == pSearchElement)\n\t\t\t\treturn true;\n\t\t\tpRecElementTemp = HIDGetNextDeviceElement(pRecElementTemp,kHIDElementTypeAll);\t\n\t\t}\n\t}\n\treturn false;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/JoystickTabletPlugin/HID_Utilities.h",
    "content": "/*\n\tFile:\t\tHID_Utilities.h\n\n\tContains:\tExternal interface for HID Utilities\n    \n\tDRI: George Warner\n\n\tCopyright:\tCopyright  2002 Apple Computer, Inc., All Rights Reserved\n\n\tDisclaimer:\tIMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc.\n\t\t\t\t(\"Apple\") in consideration of your agreement to the following terms, and your\n\t\t\t\tuse, installation, modification or redistribution of this Apple software\n\t\t\t\tconstitutes acceptance of these terms.  If you do not agree with these terms,\n\t\t\t\tplease do not use, install, modify or redistribute this Apple software.\n\n\t\t\t\tIn consideration of your agreement to abide by the following terms, and subject\n\t\t\t\tto these terms, Apple grants you a personal, non-exclusive license, under Apples\n\t\t\t\tcopyrights in this original Apple software (the \"Apple Software\"), to use,\n\t\t\t\treproduce, modify and redistribute the Apple Software, with or without\n\t\t\t\tmodifications, in source and/or binary forms; provided that if you redistribute\n\t\t\t\tthe Apple Software in its entirety and without modifications, you must retain\n\t\t\t\tthis notice and the following text and disclaimers in all such redistributions of\n\t\t\t\tthe Apple Software.  Neither the name, trademarks, service marks or logos of\n\t\t\t\tApple Computer, Inc. may be used to endorse or promote products derived from the\n\t\t\t\tApple Software without specific prior written permission from Apple.  Except as\n\t\t\t\texpressly stated in this notice, no other rights or licenses, express or implied,\n\t\t\t\tare granted by Apple herein, including but not limited to any patent rights that\n\t\t\t\tmay be infringed by your derivative works or by other works in which the Apple\n\t\t\t\tSoftware may be incorporated.\n\n\t\t\t\tThe Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE MAKES NO\n\t\t\t\tWARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED\n\t\t\t\tWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n\t\t\t\tPURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN\n\t\t\t\tCOMBINATION WITH YOUR PRODUCTS.\n\n\t\t\t\tIN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR\n\t\t\t\tCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n\t\t\t\tGOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n\t\t\t\tARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION\n\t\t\t\tOF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT\n\t\t\t\t(INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN\n\t\t\t\tADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n#ifndef _HID_Utilities_h_\n#define _HID_Utilities_h_\n\n#include <Carbon/Carbon.h>\n\n#include <IOKit/IOTypes.h>\n// 10.0.x\n//#include <IOKit/IOUSBHIDParser.h>\n// 10.1.x\n#include <IOKit/hid/IOHIDUsageTables.h>\n\n#include <IOKit/hid/IOHIDLib.h>\n\n// ==================================\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n// ==================================\n\nenum\n{\n    kDefaultUserMin = 0,\t\t\t\t\t// default user min and max used for scaling\n    kDefaultUserMax = 255,\n};\n\ntypedef enum HIDElementTypeMask\n{\n\tkHIDElementTypeInput\t\t\t\t= 1 << 1,\n\tkHIDElementTypeOutput            \t= 1 << 2,\n\tkHIDElementTypeFeature           \t= 1 << 3,\n\tkHIDElementTypeCollection        \t= 1 << 4,\n\tkHIDElementTypeIO\t\t\t\t\t= kHIDElementTypeInput | kHIDElementTypeOutput | kHIDElementTypeFeature,\n\tkHIDElementTypeAll\t\t\t\t\t= kHIDElementTypeIO | kHIDElementTypeCollection\n}HIDElementTypeMask;\n\nstruct recElement\n{\n    IOHIDElementType type;\t\t\t\t\t// the type defined by IOHIDElementType in IOHIDKeys.h\n    long usagePage;\t\t\t\t\t\t\t// usage page from IOUSBHIDParser.h which defines general usage\n    long usage;\t\t\t\t\t\t\t\t// usage within above page from IOUSBHIDParser.h which defines specific usage\n    IOHIDElementCookie cookie;\t\t\t\t// unique value (within device of specific vendorID and productID) which identifies element, will NOT change\n    long min;\t\t\t\t\t\t\t\t// reported min value possible\n    long max;\t\t\t\t\t\t\t\t// reported max value possible\n    long scaledMin;\t\t\t\t\t\t\t// reported scaled min value possible\n    long scaledMax;\t\t\t\t\t\t\t// reported scaled max value possible\n    long size;\t\t\t\t\t\t\t\t// size in bits of data return from element\n    Boolean relative;\t\t\t\t\t\t// are reports relative to last report (deltas)\n    Boolean wrapping;\t\t\t\t\t\t// does element wrap around (one value higher than max is min)\n    Boolean nonLinear;\t\t\t\t\t\t// are the values reported non-linear relative to element movement\n    Boolean preferredState;\t\t\t\t\t// does element have a preferred state (such as a button)\n    Boolean nullState;\t\t\t\t\t\t// does element have null state\n    long units;\t\t\t\t\t\t\t\t// units value is reported in (not used very often)\n    long unitExp;\t\t\t\t\t\t\t// exponent for units (also not used very often)\n    Str255 name;\t\t\t\t\t\t\t// name of element (not used often)\n\n// runtime variables\n    long minReport; \t\t\t\t\t\t// min returned value\n    long maxReport; \t\t\t\t\t\t// max returned value (calibrate call)\n    long userMin; \t\t\t\t\t\t\t// user set value to scale to (scale call)\n    long userMax;\t\t\t\t\t\t\t\n    \n\tstruct recElement * pPrevious;\t\t\t// previous element (NULL at list head)\n    struct recElement * pChild;\t\t\t\t// next child (only of collections)\n    struct recElement * pSibling;\t\t\t// next sibling (for elements and collections)\n\t\n};\ntypedef struct recElement recElement;\ntypedef recElement* pRecElement;\n\nstruct recDevice\n{\n    IOHIDDeviceInterface ** interface;\t\t// interface to device, NULL = no interface\n    IOHIDQueueInterface ** queue;\t\t\t// device queue, NULL = no queue\n\tCFRunLoopSourceRef\tqueueRunLoopSource;\t\t// device queue run loop source, NULL == no source\n\tIOHIDOutputTransactionInterface ** transaction;\t\t// output transaction interface, NULL == no transaction\n\tio_object_t notification;\t\t\t\t// notifications\n\tStr255 transport;\t\t\t\t\t\t// device transport\n    long vendorID;\t\t\t\t\t\t\t// id for device vendor, unique across all devices\n    long productID;\t\t\t\t\t\t\t// id for particular product, unique across all of a vendors devices\n    long version;\t\t\t\t\t\t\t// version of product\n    Str255 manufacturer;\t\t\t\t\t// name of manufacturer\n    Str255 product;\t\t\t\t\t\t\t// name of product\n    Str255 serial;\t\t\t\t\t\t\t// serial number of specific product, can be assumed unique across specific product or specific vendor (not used often)\n    long locID;\t\t\t\t\t\t\t\t// long representing location in USB (or other I/O) chain which device is pluged into, can identify specific device on machine\n    long usage;\t\t\t\t\t\t\t\t// usage page from IOUSBHID Parser.h which defines general usage\n    long usagePage;\t\t\t\t\t\t\t// usage within above page from IOUSBHID Parser.h which defines specific usage\n    long totalElements;\t\t\t\t\t\t// number of total elements (should be total of all elements on device including collections) (calculated, not reported by device)\n\tlong features;\t\t\t\t\t\t\t// number of elements of type kIOHIDElementTypeFeature\n\tlong inputs;\t\t\t\t\t\t\t// number of elements of type kIOHIDElementTypeInput_Misc or kIOHIDElementTypeInput_Button or kIOHIDElementTypeInput_Axis or kIOHIDElementTypeInput_ScanCodes\n\tlong outputs;\t\t\t\t\t\t\t// number of elements of type kIOHIDElementTypeOutput\n\tlong collections;\t\t\t\t\t\t// number of elements of type kIOHIDElementTypeCollection\n    long axis;\t\t\t\t\t\t\t\t// number of axis (calculated, not reported by device)\n    long buttons;\t\t\t\t\t\t\t// number of buttons (calculated, not reported by device)\n    long hats;\t\t\t\t\t\t\t\t// number of hat switches (calculated, not reported by device)\n    long sliders;\t\t\t\t\t\t\t// number of sliders (calculated, not reported by device)\n    long dials;\t\t\t\t\t\t\t\t// number of dials (calculated, not reported by device)\n    long wheels;\t\t\t\t\t\t\t// number of wheels (calculated, not reported by device)\n    recElement* pListElements; \t\t\t\t// head of linked list of elements \n    struct recDevice* pNext; \t\t\t\t// next device\n};\ntypedef struct recDevice recDevice;\ntypedef recDevice* pRecDevice;\n\n// ==================================\n// Create and open an interface to device, required prior to extracting values or building queues\n// Note: appliction now owns the device and must close and release it prior to exiting\nextern IOReturn HIDCreateOpenDeviceInterface (io_object_t hidDevice, pRecDevice pDevice);\n\n// builds list of device with elements (allocates memory and captures devices)\n// list is allcoated internally within HID Utilites and can be accessed via accessor functions\n// structures within list are considered flat and user accessable, butnot user modifiable\n// can be called again to rebuild list to account for new devices (will do the right thing in case of disposing existing list)\nextern Boolean HIDBuildDeviceList (UInt32 usagePage, UInt32 usage);\n\n// release list built by above function\n// MUST be called prior to application exit to properly release devices\n// if not called (or app crashes) devices can be recovered by pluging into different location in USB chain\nextern void HIDReleaseDeviceList (void);\n\n// does a device list exist\nextern Boolean HIDHaveDeviceList (void);\n\n// how many HID devices have been found\n// returns 0 if no device list exist\nextern UInt32 HIDCountDevices (void);\n\n// how many elements does a specific device have\n// returns 0 if device is invalid or NULL\n// uses mask of HIDElementTypeMask to restrict element found\n// use kHIDElementTypeIO to get non-collection elements\nextern UInt32 HIDCountDeviceElements (pRecDevice pDevice, HIDElementTypeMask typeMask);\n\n// get the first device in the device list\n// returns NULL if no list exists\nextern pRecDevice HIDGetFirstDevice (void);\n\n// get next device in list given current device as parameter\n// returns NULL if end of list\nextern pRecDevice HIDGetNextDevice (pRecDevice pDevice);\n\n// get the first element of device passed in as parameter\n// returns NULL if no list exists or device does not exists or is NULL\n// uses mask of HIDElementTypeMask to restrict element found\n// use kHIDElementTypeIO to get previous HIDGetFirstDeviceElement functionality\nextern pRecElement HIDGetFirstDeviceElement (pRecDevice pDevice, HIDElementTypeMask typeMask);\n\n// get next element of given device in list given current element as parameter\n// will walk down each collection then to next element or collection (depthwise traverse)\n// returns NULL if end of list\n// uses mask of HIDElementTypeMask to restrict element found\n// use kHIDElementTypeIO to get previous HIDGetNextDeviceElement functionality\nextern pRecElement HIDGetNextDeviceElement (pRecElement pElement, HIDElementTypeMask typeMask);\n\n// get previous element of given device in list given current element as parameter\n// this wlaks directly up the tree to the top element and does not search at each level\n// returns NULL if beginning of list\n// uses mask of HIDElementTypeMask to restrict element found\n// use kHIDElementTypeIO to get non-collection elements\nextern pRecElement HIDGetPreviousDeviceElement (pRecElement pElement, HIDElementTypeMask typeMask);\n\n// returns C string type name given a type enumeration passed in as parameter (see IOHIDKeys.h)\n// returns empty string for invlid types\nextern void HIDGetTypeName (IOHIDElementType type, char * cstrName);\n\n// returns C string usage given usage page and usage passed in as parameters (see IOUSBHIDParser.h)\n// returns usage page and usage values in string form for unknown values\nextern void HIDGetUsageName (long valueUsagePage, long valueUsage, char * cstrName);\n\n// returns calibrated value given raw value passed in\n// calibrated value is equal to min and max values returned by HIDGetElementValue since device list built scaled to element reported min and max values\nextern SInt32 HIDCalibrateValue (SInt32 value, pRecElement pElement);\n\n// returns scaled value given raw value passed in\n// scaled value is equal to current value assumed to be in the range of element reported min and max values scaled to user min and max scaled values\nextern SInt32 HIDScaleValue (SInt32 value, pRecElement pElement);\n\n// ---------------------------------\n// convert an element type to a mask\nextern HIDElementTypeMask HIDConvertElementTypeToMask (const long type);\n\n// find this device\nextern Boolean HIDFindDevice(const pRecDevice pSearchDevice, pRecDevice *ppFoundDevice);\n\n// find the device and element for this action\n// Device: serial, vendorID, productID, location, usagePage, usage\n// Element: cookie, usagePage, usage, \nextern Boolean HIDFindActionDeviceAndElement(const pRecDevice pSearchDevice, const pRecElement pSearchElement,\n\t\t\t\t\t\t\t\t\t\t  pRecDevice *ppFoundDevice, pRecElement *ppFoundElement);\n\n// find the device and element for this action\n// Device: serial, vendorID, productID, location, usagePage, usage\n// Element: cookie, usagePage, usage, \n\nextern Boolean HIDFindSubElement(const pRecElement pStartElement, const pRecElement pSearchElement, pRecElement *ppFoundElement);\n\n// print out all of an elements information\nextern int HIDPrintElement(const pRecElement pElement);\n\n// return true if this is a valid device pointer\nextern Boolean HIDIsValidDevice(const pRecDevice pSearchDevice);\n\n// return true if this is a valid element pointer for this device\nextern Boolean HIDIsValidElement(const pRecDevice pSearchDevice, const pRecElement pSearchElement);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif // _HID_Utilities_h_\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/JoystickTabletPlugin/HID_Utilities_External.h",
    "content": "/*\n\tFile:\t\tHID_Utilities_External.h\n\n\tContains:   Definition of the HID Utilities exported functions\n    \n\tDRI: George Warner\n\n\tCopyright:\tCopyright  2002 Apple Computer, Inc., All Rights Reserved\n\n\tDisclaimer:\tIMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc.\n\t\t\t\t(\"Apple\") in consideration of your agreement to the following terms, and your\n\t\t\t\tuse, installation, modification or redistribution of this Apple software\n\t\t\t\tconstitutes acceptance of these terms.  If you do not agree with these terms,\n\t\t\t\tplease do not use, install, modify or redistribute this Apple software.\n\n\t\t\t\tIn consideration of your agreement to abide by the following terms, and subject\n\t\t\t\tto these terms, Apple grants you a personal, non-exclusive license, under Apples\n\t\t\t\tcopyrights in this original Apple software (the \"Apple Software\"), to use,\n\t\t\t\treproduce, modify and redistribute the Apple Software, with or without\n\t\t\t\tmodifications, in source and/or binary forms; provided that if you redistribute\n\t\t\t\tthe Apple Software in its entirety and without modifications, you must retain\n\t\t\t\tthis notice and the following text and disclaimers in all such redistributions of\n\t\t\t\tthe Apple Software.  Neither the name, trademarks, service marks or logos of\n\t\t\t\tApple Computer, Inc. may be used to endorse or promote products derived from the\n\t\t\t\tApple Software without specific prior written permission from Apple.  Except as\n\t\t\t\texpressly stated in this notice, no other rights or licenses, express or implied,\n\t\t\t\tare granted by Apple herein, including but not limited to any patent rights that\n\t\t\t\tmay be infringed by your derivative works or by other works in which the Apple\n\t\t\t\tSoftware may be incorporated.\n\n\t\t\t\tThe Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE MAKES NO\n\t\t\t\tWARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED\n\t\t\t\tWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n\t\t\t\tPURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN\n\t\t\t\tCOMBINATION WITH YOUR PRODUCTS.\n\n\t\t\t\tIN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR\n\t\t\t\tCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n\t\t\t\tGOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n\t\t\t\tARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION\n\t\t\t\tOF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT\n\t\t\t\t(INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN\n\t\t\t\tADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n#ifndef _HID_Utilities_External_h_\n#define _HID_Utilities_External_h_\n\n// ==================================\n//includes\n\n#if TARGET_RT_MAC_CFM\n\ttypedef void (*IOHIDCallbackFunction)(void * target, unsigned long result, void* refcon, void * sender);\n#else\n\t#include <IOKit/hid/IOHIDLib.h>\n#endif TARGET_RT_MAC_CFM\n\n#include <stdio.h>\n\n#if 0\n#include <IOKit/hid/IOHIDUsageTables.h>\n\n#include \"PID.h\"\t\t\t\t// NOTE: These are now in <IOHIDUsageTables.h>\n#include \"IOHIDPowerUsage.h\"\t// NOTE: These are now in <IOHIDUsageTables.h>\n#endif\n\n// ==================================\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n// ==================================\n// Device and Element Interfaces\n\ntypedef enum HIDElementTypeMask\n{\n\tkHIDElementTypeInput\t\t\t\t= 1 << 1,\n\tkHIDElementTypeOutput            \t= 1 << 2,\n\tkHIDElementTypeFeature           \t= 1 << 3,\n\tkHIDElementTypeCollection        \t= 1 << 4,\n\tkHIDElementTypeIO\t\t\t\t\t= kHIDElementTypeInput | kHIDElementTypeOutput | kHIDElementTypeFeature,\n\tkHIDElementTypeAll\t\t\t\t\t= kHIDElementTypeIO | kHIDElementTypeCollection\n}HIDElementTypeMask;\n\nstruct recElement\n{\n    unsigned long type;\t\t\t\t\t\t// the type defined by IOHIDElementType in IOHIDKeys.h\n    long usagePage;\t\t\t\t\t\t\t// usage page from IOUSBHIDParser.h which defines general usage\n    long usage;\t\t\t\t\t\t\t\t// usage within above page from IOUSBHIDParser.h which defines specific usage\n    void * cookie;\t\t\t\t \t\t\t// unique value (within device of specific vendorID and productID) which identifies element, will NOT change\n    long min;\t\t\t\t\t\t\t\t// reported min value possible\n    long max;\t\t\t\t\t\t\t\t// reported max value possible\n    long scaledMin;\t\t\t\t\t\t\t// reported scaled min value possible\n    long scaledMax;\t\t\t\t\t\t\t// reported scaled max value possible\n    long size;\t\t\t\t\t\t\t\t// size in bits of data return from element\n    unsigned char relative;\t\t\t\t\t// are reports relative to last report (deltas)\n    unsigned char wrapping;\t\t\t\t\t// does element wrap around (one value higher than max is min)\n    unsigned char nonLinear;\t\t\t\t// are the values reported non-linear relative to element movement\n    unsigned char preferredState;\t\t\t// does element have a preferred state (such as a button)\n    unsigned char nullState;\t\t\t\t// does element have null state\n    long units;\t\t\t\t\t\t\t\t// units value is reported in (not used very often)\n    long unitExp;\t\t\t\t\t\t\t// exponent for units (also not used very often)\n    char name[256];\t\t\t\t\t\t\t// name of element (c string)\n\n// runtime variables\n    long calMin; \t\t\t\t\t\t\t// min returned value\n    long calMax; \t\t\t\t\t\t\t// max returned value (calibrate call)\n    long userMin; \t\t\t\t\t\t\t// user set value to scale to (scale call)\n    long userMax;\t\t\t\t\t\t\t\n    \n\tstruct recElement * pPrevious;\t\t\t// previous element (NULL at list head)\n    struct recElement * pChild;\t\t\t\t// next child (only of collections)\n    struct recElement * pSibling;\t\t\t// next sibling (for elements and collections)\n\n\tlong depth;\n};\ntypedef struct recElement recElement;\ntypedef recElement* pRecElement;\n\nstruct recDevice\n{\n    void * interface;\t\t\t\t\t\t// interface to device, NULL = no interface\n    void * queue;\t\t\t\t\t\t\t// device queue, NULL = no queue\n\tvoid * queueRunLoopSource;\t\t\t\t// device queue run loop source, NULL == no source\n\tvoid * transaction;\t\t\t\t\t\t// output transaction interface, NULL == no interface\n\tvoid * notification;\t\t\t\t\t// notifications\n    char transport[256];\t\t\t\t\t// device transport (c string)\n    long vendorID;\t\t\t\t\t\t\t// id for device vendor, unique across all devices\n    long productID;\t\t\t\t\t\t\t// id for particular product, unique across all of a vendors devices\n    long version;\t\t\t\t\t\t\t// version of product\n    char manufacturer[256];\t\t\t\t\t// name of manufacturer\n    char product[256];\t\t\t\t\t\t// name of product\n    char serial[256];\t\t\t\t\t\t// serial number of specific product, can be assumed unique across specific product or specific vendor (not used often)\n    long locID;\t\t\t\t\t\t\t\t// long representing location in USB (or other I/O) chain which device is pluged into, can identify specific device on machine\n    long usage;\t\t\t\t\t\t\t\t// usage page from IOUSBHID Parser.h which defines general usage\n    long usagePage;\t\t\t\t\t\t\t// usage within above page from IOUSBHID Parser.h which defines specific usage\n    long totalElements;\t\t\t\t\t\t// number of total elements (should be total of all elements on device including collections) (calculated, not reported by device)\n\tlong features;\t\t\t\t\t\t\t// number of elements of type kIOHIDElementTypeFeature\n\tlong inputs;\t\t\t\t\t\t\t// number of elements of type kIOHIDElementTypeInput_Misc or kIOHIDElementTypeInput_Button or kIOHIDElementTypeInput_Axis or kIOHIDElementTypeInput_ScanCodes\n\tlong outputs;\t\t\t\t\t\t\t// number of elements of type kIOHIDElementTypeOutput\n\tlong collections;\t\t\t\t\t\t// number of elements of type kIOHIDElementTypeCollection\n    long axis;\t\t\t\t\t\t\t\t// number of axis (calculated, not reported by device)\n    long buttons;\t\t\t\t\t\t\t// number of buttons (calculated, not reported by device)\n    long hats;\t\t\t\t\t\t\t\t// number of hat switches (calculated, not reported by device)\n    long sliders;\t\t\t\t\t\t\t// number of sliders (calculated, not reported by device)\n    long dials;\t\t\t\t\t\t\t\t// number of dials (calculated, not reported by device)\n    long wheels;\t\t\t\t\t\t\t// number of wheels (calculated, not reported by device)\n    recElement* pListElements; \t\t\t\t// head of linked list of elements \n    struct recDevice* pNext; \t\t\t\t// next device\n};\ntypedef struct recDevice recDevice;\ntypedef recDevice* pRecDevice;\n\n// ==================================\n// HID Utilities interface\n// ==================================\n// Create and open an interface to device, required prior to extracting values or building queues\n// Note: appliction now owns the device and must close and release it prior to exiting\nextern unsigned long HIDCreateOpenDeviceInterface (UInt32 hidDevice, pRecDevice pDevice);\n\n// builds list of device with elements (allocates memory and captures devices)\n// list is allcoated internally within HID Utilites and can be accessed via accessor functions\n// structures within list are considered flat and user accessable, butnot user modifiable\n// can be called again to rebuild list to account for new devices (will do the right thing in case of disposing existing list)\nextern Boolean HIDBuildDeviceList (UInt32 usagePage, UInt32 usage);\n\n// release list built by above function\n// MUST be called prior to application exit to properly release devices\n// if not called (or app crashes) devices can be recovered by pluging into different location in USB chain\nextern void HIDReleaseDeviceList (void);\n\n// does a device list exist\nextern Boolean HIDHaveDeviceList (void);\n\n// how many HID devices have been found\n// returns 0 if no device list exist\nextern UInt32 HIDCountDevices (void);\n\n// how many elements does a specific device have\n// returns 0 if device is invalid or NULL\n// uses mask of HIDElementTypeMask to restrict element found\n// use kHIDElementTypeIO to get non-collection elements\nextern UInt32 HIDCountDeviceElements (pRecDevice pDevice, HIDElementTypeMask typeMask);\n\n// get the first device in the device list\n// returns NULL if no list exists\nextern pRecDevice HIDGetFirstDevice (void);\n\n// get next device in list given current device as parameter\n// returns NULL if end of list\nextern pRecDevice HIDGetNextDevice (pRecDevice pDevice);\n\n// get the first element of device passed in as parameter\n// returns NULL if no list exists or device does not exists or is NULL\n// uses mask of HIDElementTypeMask to restrict element found\n// use kHIDElementTypeIO to get previous HIDGetFirstDeviceElement functionality\nextern pRecElement HIDGetFirstDeviceElement (pRecDevice pDevice, HIDElementTypeMask typeMask);\n\n// get next element of given device in list given current element as parameter\n// will walk down each collection then to next element or collection (depthwise traverse)\n// returns NULL if end of list\n// uses mask of HIDElementTypeMask to restrict element found\n// use kHIDElementTypeIO to get previous HIDGetNextDeviceElement functionality\nextern pRecElement HIDGetNextDeviceElement (pRecElement pElement, HIDElementTypeMask typeMask);\n\n// get previous element of given device in list given current element as parameter\n// this wlaks directly up the tree to the top element and does not search at each level\n// returns NULL if beginning of list\n// uses mask of HIDElementTypeMask to restrict element found\n// use kHIDElementTypeIO to get non-collection elements\nextern pRecElement HIDGetPreviousDeviceElement (pRecElement pElement, HIDElementTypeMask typeMask);\n\n// returns C string type name given a type enumeration passed in as parameter (see IOHIDKeys.h)\n// returns empty string for invlid types\nextern void HIDGetTypeName (IOHIDElementType theType, char * cstrName);\n\n// set name from vendor id/product id look up (using cookies)\nextern Boolean HIDGetElementNameFromVendorProductCookie (const long vendorID, const long productID, const long cookie, char * pName);\n\n// set name from vendor id/product id look up (using usage page & usage)\nextern Boolean HIDGetElementNameFromVendorProductUsage (const long vendorID, const long productID, const long pUsagePage, const long pUsage, char * pName);\n\n// returns C string usage given usage page and usage passed in as parameters (see IOUSBHIDParser.h)\n// returns usage page and usage values in string form for unknown values\nextern void HIDGetUsageName (long valueUsagePage, long valueUsage, char * cstrName);\n\n// returns calibrated value given raw value passed in\n// calibrated value is equal to min and max values returned by HIDGetElementValue since device list built scaled to element reported min and max values\nextern SInt32 HIDCalibrateValue (SInt32 value, pRecElement pElement);\n\n// returns scaled value given raw value passed in\n// scaled value is equal to current value assumed to be in the range of element reported min and max values scaled to user min and max scaled values\nextern SInt32 HIDScaleValue (SInt32 value, pRecElement pElement);\n\n// ---------------------------------\n// convert an element type to a mask\nextern HIDElementTypeMask HIDConvertElementTypeToMask (const long type);\n\n// find this device\nextern Boolean HIDFindDevice(const pRecDevice pSearchDevice, pRecDevice *ppFoundDevice);\n\n// find the device and element for this action\n// Device: serial, vendorID, productID, location, usagePage, usage\n// Element: cookie, usagePage, usage,\nextern Boolean HIDFindActionDeviceAndElement(const pRecDevice pSearchDevice, const pRecElement pSearchElement,\n\t\t\t\t\t\t\t\t\t\t\t pRecDevice *ppFoundDevice, pRecElement *ppFoundElement);\n\n// find the device and element for this action\n// Device: serial, vendorID, productID, location, usagePage, usage\n// Element: cookie, usagePage, usage,\n\nextern Boolean HIDFindSubElement(const pRecElement pStartElement, const pRecElement pSearchElement, pRecElement *ppFoundElement);\n\n// print out all of an elements information\nextern int HIDPrintElement(const pRecElement pElement);\n\n// return true if this is a valid device pointer\nextern Boolean HIDIsValidDevice(const pRecDevice pSearchDevice);\n\n// return true if this is a valid element pointer for this device\nextern Boolean HIDIsValidElement(const pRecDevice pSearchDevice, const pRecElement pSearchElement);\n\n// ==================================\n// Element Event Queue and Value Interfaces\n\nenum\n{\n    kDefaultUserMin = 0,\t\t\t\t\t// default user min and max used for scaling\n    kDefaultUserMax = 255\n};\n\nenum\n{\n    kDeviceQueueSize = 50\t// this is wired kernel memory so should be set to as small as possible\n\t\t\t\t\t\t\t// but should account for the maximum possible events in the queue\n\t\t\t\t\t\t\t// USB updates will likely occur at 100 Hz so one must account for this rate of\n\t\t\t\t\t\t\t// if states change quickly (updates are only posted on state changes)\n};\n\n// ==================================\n// queues specific element, performing any device queue set up required\nextern unsigned long  HIDQueueElement (pRecDevice pDevice, pRecElement pElement);\n\n// adds all elements to queue, performing any device queue set up required\nextern unsigned long HIDQueueDevice (pRecDevice pDevice);\n\n// removes element for queue, if last element in queue will release queue and device\nextern unsigned long HIDDequeueElement (pRecDevice pDevice, pRecElement pElement);\n\n// completely removes all elements from queue and releases queue and device\nextern unsigned long HIDDequeueDevice (pRecDevice pDevice);\n\n// releases all device queues for quit or rebuild (must be called)\nextern unsigned long HIDReleaseAllDeviceQueues (void);\n\n// releases interface to device, should be done prior to exiting application (called from HIDReleaseDeviceList)\nextern unsigned long HIDCloseReleaseInterface (pRecDevice pDevice);\n\n// returns true if an event is avialable for the element and fills out *pHIDEvent structure, returns false otherwise\n// pHIDEvent is a poiner to a IOHIDEventStruct, using void here for compatibility, users can cast a required\nextern unsigned char HIDGetEvent (pRecDevice pDevice, void * pHIDEvent);\n\n// returns current value for element, creating device interface as required, polling element\nextern long HIDGetElementValue (pRecDevice pDevice, pRecElement pElement);\n\n// Set an elements value\n// NOTE: This should only be used when a single element report needs to be sent.\n// If multiple elements reports are to be send then transactions should be used.\n// pIOHIDEvent is a poiner to a IOHIDEventStruct, using void here for compatibility, users can cast a required\nextern long HIDSetElementValue (pRecDevice pDevice, pRecElement pElement,void* pIOHIDEvent);\n\n// Set a callback to be called when a queue goes from empty to non-empty\nextern long HIDSetQueueCallback (pRecDevice pDevice, IOHIDCallbackFunction callback);\n\n#if 0\n// Get a report from a device\nextern long HIDGetReport (pRecDevice pDevice,const IOHIDReportType reportType, const unsigned long reportID, void* reportBuffer, unsigned long* reportBufferSize);\n\n// Send a report to a device\nextern long HIDSetReport (pRecDevice pDevice,const IOHIDReportType reportType, const unsigned long reportID, void* reportBuffer, const unsigned long reportBufferSize);\n#endif\n\n// ==================================\n// HUD utilities interfaces\n\n// returns calibrated value given raw value passed in\n// calibrated value is equal to min and max values returned by HIDGetElementValue since device list built scaled to element reported min and max values\nextern long HIDCalibrateValue (long value, pRecElement pElement);\n\n// returns scaled value given raw value passed in\n// scaled value is equal to current value assumed to be in the range of element reported min and max values scaled to user min and max scaled values\nextern long HIDScaleValue (long value, pRecElement pElement);\n\n// convert an element type to a mask\nextern HIDElementTypeMask HIDConvertElementTypeToMask (const long type);\n\n// find this device\nextern Boolean HIDFindDevice(const pRecDevice pSearchDevice, pRecDevice *ppFoundDevice);\n\n// find the device and element for this action\n// Device: serial, vendorID, productID, location, usagePage, usage\n// Element: cookie, usagePage, usage, \nextern Boolean HIDFindActionDeviceAndElement(const pRecDevice pSearchDevice, const pRecElement pSearchElement,\n\t\t\t\t\t\t\t\t\t\t  pRecDevice *ppFoundDevice, pRecElement *ppFoundElement);\n// find the device and element for this action\n// Device: serial, vendorID, productID, location, usagePage, usage\n// Element: cookie, usagePage, usage, \n\nextern Boolean HIDFindSubElement(const pRecElement pStartElement, const pRecElement pSearchElement, pRecElement *ppFoundElement);\n\n// print out all of an elements information\nextern int HIDPrintElement(const pRecElement pElement);\n\n// return true if this is a valid device pointer\nextern Boolean HIDIsValidDevice(const pRecDevice pSearchDevice);\n\n// return true if this is a valid element pointer for this device\nextern Boolean HIDIsValidElement(const pRecDevice pSearchDevice, const pRecElement pSearchElement);\n\n// ==================================\n// Name Lookup Interfaces\n\n// set name from vendor id/product id look up (using cookies)\nextern Boolean HIDGetElementNameFromVendorProductCookie (const long vendorID, const long productID, const long cookie, char * pName);\n\n// set name from vendor id/product id look up (using usage page & usage)\nextern Boolean HIDGetElementNameFromVendorProductUsage (const long vendorID, const long productID, const long pUsagePage, const long pUsage, char * pName);\n\n// ==================================\n// Conguration and Save Interfaces\n\nenum\n{\n    kPercentMove = 10 // precent of overall range a element must move to register\n};\n\ntypedef struct recSaveHID\n{\n    long actionCookie;\n    // device\n\t\t// need to add serial number when I have a test case\n    long vendorID;\n    long productID;\n    long locID;\n    long usage;\n    long usagePage;\n    // elements\n    long usagePageE;\n    long usageE;\n    void * cookie;\n}recSaveHID,*pRecSaveHID;\n\n// polls all devices and elements for a change greater than kPercentMove.  Times out after given time\n// returns true and pointer to device and element if found\n// returns false and NULL for both parameters if not found\nextern unsigned char HIDConfigureAction (pRecDevice * ppDevice, pRecElement * ppElement, float timeout);\n\n// take input records, save required info\n// assume file is open and at correct position.\nextern void HIDSaveElementConfig (FILE * fileRef, pRecDevice pDevice, pRecElement pElement, long actionCookie);\n\n// take file, read one record (assume file position is correct and file is open)\n// search for matching device\n// return pDevice, pElement and cookie for action\nextern long HIDRestoreElementConfig (FILE * fileRef, pRecDevice * ppDevice, pRecElement * ppElement);\n\n// Save the device & element values into the specified key in the specified applications preferences\nextern Boolean HIDSaveElementPref (CFStringRef keyCFStringRef, CFStringRef appCFStringRef, pRecDevice pDevice, pRecElement pElement);\n\n// Find the specified preference in the specified application\n// search for matching device and element\n// return pDevice, pElement that matches\n\nextern Boolean HIDRestoreElementPref (CFStringRef keyCFStringRef, CFStringRef appCFStringRef, pRecDevice * ppDevice, pRecElement * ppElement);\n\n// ==================================\n// Output Transaction interface\n\n// Create and open an transaction interface to device, required prior to extracting values or building Transactions\nextern unsigned long HIDTransactionAddElement(pRecDevice pDevice, pRecElement pElement);\n\n// removes an element from a Transaction\nextern unsigned long HIDTransactionRemoveElement(pRecDevice pDevice, pRecElement pElement);\n\n// return true if this transaction contains this element\nextern Boolean HIDTransactionHasElement(pRecDevice pDevice, pRecElement pElement);\n\n/* This changes the default value of an element, when the values of the */\n/* elements are cleared, on clear or commit, they are reset to the */\n/* default value */\n/* This call can be made on elements that are not in the transaction, but */\n/* has undefined behavior if made on elements not in the transaction */\n/* which are later added to the transaction. */\n/* In other words, an element should be added before its default is */\n/* set, for well defined behavior. */\n// pHIDEvent is a poiner to a IOHIDEventStruct, using void here for compatibility, users can cast a required\nextern unsigned long HIDTransactionSetElementDefault(pRecDevice pDevice, pRecElement pElement,IOHIDEventStruct* pValueEvent);\n\n/* Get the current setting of an element's default value */\n// pHIDEvent is a poiner to a IOHIDEventStruct, using void here for compatibility, users can cast a required\nextern unsigned long HIDTransactionGetElementDefault(pRecDevice pDevice, pRecElement pElement,IOHIDEventStruct* pValueEvent);\n\n/* Add a change to the transaction, by setting an element value */\n/* The change is not actually made until it is commited */\n/* The element must be part of the transaction or this call will fail */\n// pHIDEvent is a poiner to a IOHIDEventStruct, using void here for compatibility, users can cast a required\nextern unsigned long HIDTransactionSetElementValue(pRecDevice pDevice, pRecElement pElement,IOHIDEventStruct* pValueEvent);\n\n/* Get the current setting of an element value */\n// pHIDEvent is a poiner to a IOHIDEventStruct, using void here for compatibility, users can cast a required\nextern unsigned long HIDTransactionGetElementValue(pRecDevice pDevice, pRecElement pElement,IOHIDEventStruct* pValueEvent);\n\n/* Commit the transaction, or clear all the changes and start over */\n/* timoutMS is the timeout in milliseconds, a zero timeout will cause */\n/*\tthis call to be non-blocking (returning queue empty) if there */\n/*\tis a NULL callback, and blocking forever until the queue is */\n/*\tnon-empty if their is a valid callback */\n/* callback, if non-NULL is a callback to be called when data is */\n/*  inserted to the queue  */\n/* callbackTarget and callbackRefcon are passed to the callback */\nextern unsigned long HIDTransactionCommit(pRecDevice pDevice);\n\n/* Clear all the changes and start over */\nextern unsigned long HIDTransactionClear(pRecDevice pDevice);\n\n// ==================================\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif // _HID_Utilities_External_h_\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/JoystickTabletPlugin/HID_Utilities_Internal.h",
    "content": "/*\n\tFile:\t\tHID_Utilities_Internal.h\n\n\tContains:   Definition of HID Utilities internal functions\n    \n\tDRI: George Warner\n\n\tCopyright:\tCopyright  2002 Apple Computer, Inc., All Rights Reserved\n\n\tDisclaimer:\tIMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc.\n\t\t\t\t(\"Apple\") in consideration of your agreement to the following terms, and your\n\t\t\t\tuse, installation, modification or redistribution of this Apple software\n\t\t\t\tconstitutes acceptance of these terms.  If you do not agree with these terms,\n\t\t\t\tplease do not use, install, modify or redistribute this Apple software.\n\n\t\t\t\tIn consideration of your agreement to abide by the following terms, and subject\n\t\t\t\tto these terms, Apple grants you a personal, non-exclusive license, under Apples\n\t\t\t\tcopyrights in this original Apple software (the \"Apple Software\"), to use,\n\t\t\t\treproduce, modify and redistribute the Apple Software, with or without\n\t\t\t\tmodifications, in source and/or binary forms; provided that if you redistribute\n\t\t\t\tthe Apple Software in its entirety and without modifications, you must retain\n\t\t\t\tthis notice and the following text and disclaimers in all such redistributions of\n\t\t\t\tthe Apple Software.  Neither the name, trademarks, service marks or logos of\n\t\t\t\tApple Computer, Inc. may be used to endorse or promote products derived from the\n\t\t\t\tApple Software without specific prior written permission from Apple.  Except as\n\t\t\t\texpressly stated in this notice, no other rights or licenses, express or implied,\n\t\t\t\tare granted by Apple herein, including but not limited to any patent rights that\n\t\t\t\tmay be infringed by your derivative works or by other works in which the Apple\n\t\t\t\tSoftware may be incorporated.\n\n\t\t\t\tThe Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE MAKES NO\n\t\t\t\tWARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED\n\t\t\t\tWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n\t\t\t\tPURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN\n\t\t\t\tCOMBINATION WITH YOUR PRODUCTS.\n\n\t\t\t\tIN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR\n\t\t\t\tCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n\t\t\t\tGOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n\t\t\t\tARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION\n\t\t\t\tOF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT\n\t\t\t\t(INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN\n\t\t\t\tADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n#ifndef _HID_Utilities_Internal_h_\n#define _HID_Utilities_Internal_h_\n\n// Moved into specific \"HID_xxx.h\" files.\n\n#include \"HID_Error_Handler.h\"\n\n#endif // _HID_Utilities_Internal_h_\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/JoystickTabletPlugin/sqMacJoystickAndTablet.c",
    "content": "/* Adjustments for pluginized VM\n *\n * Note: The Mac support files have not yet been fully converted to\n * pluginization. For the time being, it is assumed that they are linked\n * with the VM. When conversion is complete, they will no longer import\n * \"sq.h\" and they will access all VM functions and variables through\n * the interpreterProxy mechanism.\n */\n\n#include \"sq.h\"\n#include \"JoystickTabletPlugin.h\"\n\n/* End of adjustments for pluginized VM */\n\n\n#pragma mark Joystick support for Mac OS X\n\n#include \"HID_Utilities.h\"\nlong HIDGetElementValue (pRecDevice pDevice, pRecElement pElement);\n\nint joystickInit(void)\n{\n    HIDBuildDeviceList(kHIDPage_GenericDesktop, 0);\n\treturn true;\n}\n \nint joystickShutdown()\n{\n    HIDReleaseDeviceList();\n    return true;\n}\n\nstatic pRecDevice getJoystickDevice(int stickIndex)\n{\n\tpRecDevice device = HIDGetFirstDevice();\n\tint stickCount = 0;\n\twhile (device)\n\t{\n\t\tif ( (device->usage == kHIDUsage_GD_Joystick) || (device->usage == kHIDUsage_GD_GamePad) )\n\t\t{\n\t\t\tstickCount++;\n\t\t\tif (stickCount == stickIndex)\n\t\t\t\treturn device;\n\t\t}\n\t\tdevice = HIDGetNextDevice(device);\n\t}\n\treturn NULL;\n}\n\n\nstatic int getScaledAxisValue(pRecDevice device, pRecElement element, int userMin, int userMax)\n{\n\tSInt32 raw = HIDGetElementValue(device, element);\n\telement -> userMin = userMin;\n\telement -> userMax = userMax;\n\treturn (int) HIDScaleValue(raw, element);\n}\n\nint joystickRead(int stickIndex)\n{\n   /* Return input word for the joystick with the given index (starting at 1).\n\tThis word is encoded as follows:\n\n    <onFlag (1 bit)><buttonFlags (5 bits)><x-value (11 bits)><y-value (11 bits)>\n\n    The highest four bits of the input word are zero. If the onFlag bit is zero,\n    there is no joystick at the given index. The x and y values are\n    11-bit signed values in the range [-1024..1023] representing the raw (unencoded)\n    joystick position.\n    */\n\n\tint onFlag = 0;\n\tint buttons = 0;\n\tint xValue = 0;\n\tint yValue = 0;\n\t\n\tpRecDevice device = getJoystickDevice(stickIndex);\t\n\tif (device)\n\t{\n\t\tonFlag = 1;\n\t\n\t\tpRecElement element = HIDGetFirstDeviceElement(device, kHIDElementTypeAll);\n\t\twhile (element)\n\t\t{\n\t\t\tswitch (element->usagePage)\n\t\t\t{\n\t\t\t\tcase kHIDPage_GenericDesktop:\n\t\t\t\t\tswitch (element->usage)\n\t\t\t\t\t{\n\t\t\t\t\t\tcase kHIDUsage_GD_X:\n\t\t\t\t\t\t\txValue = getScaledAxisValue(device, element, -1024, 1023);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase kHIDUsage_GD_Y:\n\t\t\t\t\t\t\tyValue = getScaledAxisValue(device, element, -1024, 1023);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase kHIDPage_Button:\n\t\t\t\t\t{\n\t\t\t\t\t\tint button = element->usage - kHIDUsage_Button_1;\n\t\t\t\t\t\tif ((button >= 0) && (button <= 4) ) \n\t\t\t\t\t\t\tbuttons |= (HIDGetElementValue(device, element) << button);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\telement = HIDGetNextDeviceElement(element, kHIDElementTypeAll);\t\n\t\t}\n\t}\n\treturn (onFlag << 27) | (buttons << 22) | ((yValue + 1024) << 11) | (xValue + 1024);\n}\n\n\n#pragma mark Tablet support for older versions of Mac OS\n\n/* Tablet Record (see  Apple Tech. Note 266, version 2) */\n\n#define MAX_TRANSDUCERS 4\n\ntypedef struct {\n    char\tDOFTrans;\t\t\t/* degrees of freedom and transducer type */\n    char\torientFlag;\t\t\t/* type of orientation information */\n    short\tpressLevels;\t\t/* pressure support and number of levels */\n    unsigned short xScale;\t\t/* x scale factor for screen mapping */\n    short\txTrans;\t\t\t\t/* x translation factor for screen */\n    unsigned short yScale;\t\t/* y scale factor for screen mapping */\n    short\tyTrans;\t\t\t\t/* y translation factor for screen */\n    unsigned char flags;\t\t/* proximity, update flag, and # buttons */\n    unsigned char pressThresh;\t/* pressure threshold - normally unused */\n    short\tbuttonMask;\t\t\t/* button mask of driver-reserved buttons */\n    short\terrorFlag;\t\t\t/* error code generated */\n    short\tbuttons;\t\t\t/* buttons pressed */\n    short\ttangPress;\t\t\t/* tangential pressure level */\n    short\tpressure;\t\t\t/* normal pressure level */\n    long\ttimeStamp;\t\t\t/* ticks at latest update */\n    long\txCoord;\t\t\t\t/* x coordinate in resolution units */\n    long\tyCoord;\t\t\t\t/* y coordinate in resolution units */\n    long\tzCoord;\t\t\t\t/* z coordinate in resolution units */\n    short\txTilt;\t\t\t\t/* x tilt */\n    short\tyTilt;\t\t\t\t/* y tilt */\n    short\tunused[8];\t\t\t/* remainder of unused attitude matrix */\n} TransducerRec, *TransducerRecPtr;\n\ntypedef struct {\n    char\tversion;\t\t\t/* version of this data format */\n    char\tsemaphore;\t\t\t/* for future use -- tells if drvr is enabled */\n    char\tcursors;\t\t\t/* number of cursors with tablet */\n    char\tupdateFlags;\t\t/* flags used when updating structure */\n    short\tangleRes;\t\t\t/* metric bit & angular resolution */\n    short\tspaceRes;\t\t\t/* spatial resolution of the tablet */\n    long\txDimension;\t\t\t/* x dimension in resolution units */\n    long\tyDimension;\t\t\t/* y dimension in resolution units */\n    long\tzDimension;\t\t\t/* z dimension in resolution units */\n    long\txDisplace;\t\t\t/* x displacement - minimum x value */\n    long\tyDisplace;\t\t\t/* y displacement - minimum y value */\n    long\tzDisplace;\t\t\t/* z displacement - minimum z value */\n    long\treserved;\t\t\t/* reserved */\n    long\ttabletID;\t\t\t/* contains 'TBLT' identifying the device */\n\tTransducerRec transducer[MAX_TRANSDUCERS];\n} TabletRec, *TabletRecPtr;\n\n/*** Variables ***/\n\nTabletRecPtr tablet = nil;  \t\t/* pointer to a tablet record or nil */\n\nint tabletInit(void);\nint tabletInit(void) {\n\t/* Open the tablet driver and initialize the global pointer to its status\n\t   record. Return true if a tablet exists, false otherwise. */\n\n    return false;\n}\n\nint tabletGetParameters(int cursorIndex, int result[]) {\n\t/* Fill in the integer array 'result' with tablet parameter information.\n\t   For cursor-specific parameters, such as the number of pressure levels,\n\t   return the information for the cursor with the given index, an integer\n\t   between 1 and tablet->cursors. */\n\n\tTransducerRecPtr cursorPtr;\n\tint cursor;\n\n\t/* open tablet if necessary; return false if no tablet */\n\tif (tablet == nil) {\n\t\tif (!tabletInit()) return false;\n\t}\n\n\tcursor = cursorIndex - 1;\n\tif ((cursor < 0)  || (cursor >= tablet->cursors)) {\n\t\treturn false;\n\t}\n\tcursorPtr = &tablet->transducer[cursor];\n\n\tresult[0] = tablet->xDimension;\n\tresult[1] = tablet->yDimension;\n\tresult[2] = tablet->spaceRes;\n\tresult[3] = tablet->cursors;  /* number of cursors */\n\n\tresult[4] = cursor + 1;\n\tresult[5] = cursorPtr->xScale;\n\tresult[6] = cursorPtr->xTrans;\n\tresult[7] = cursorPtr->yScale;\n\tresult[8] = cursorPtr->yTrans;\n\tresult[9] = cursorPtr->pressLevels;\n\tresult[10] = cursorPtr->pressThresh;\n\n\tif (tablet->angleRes == 0) {\n\t\tresult[11] = 0;  /* no pen tilt support */\n\t} else {\n\t\tresult[11] = tablet->angleRes >> 1;  /* number of pen tilt levels */\n\t}\n\n\treturn true;\n}\n\nint tabletRead(int cursorIndex, int result[]) {\n\t/* Fill in the integer array 'result' with the current data\n\t   the cursor with the given index, an integer between 1 and\n\t   tablet->cursors. Note that the timestamp changes only\n\t   when some new data has arrived from the tablet. */\n\n\tTransducerRecPtr cursorPtr;\n\tint cursor;\n\n\t/* open tablet if necessary; return false if no tablet */\n\tif (tablet == nil) {\n\t\tif (!tabletInit()) return false;\n\t}\n\n\tcursor = cursorIndex - 1;\n\tif ((cursor < 0)  || (cursor >= tablet->cursors)) {\n\t\treturn false;\n\t}\n\tcursorPtr = &tablet->transducer[cursor];\n\n\tresult[0] = cursor + 1;\n\tresult[1] = cursorPtr->timeStamp;\n\tresult[2] = cursorPtr->xCoord;\n\tresult[3] = cursorPtr->yCoord;\n\tresult[4] = cursorPtr->zCoord;\n\tresult[5] = cursorPtr->xTilt;\n\tresult[6] = cursorPtr->yTilt;\n\tresult[7] = (cursorPtr->DOFTrans & 0x30) >> 4;  /* cursor type; 1-pen, 2-puck, 3-eraser */\n\tresult[8] = cursorPtr->buttons;\n\tresult[9] = cursorPtr->pressure;\n\tresult[10] = cursorPtr->tangPress;\n\tresult[11] = cursorPtr->flags;\n\treturn true;\n}\n\nint tabletResultSize(void) {\n\t/* Return the size of the integer array required to hold the results of\n\t   either a tabletGetParameters() or tabletRead() call. The VM allocates\n\t   an array of this length and passes it as a parameter to be filled in. */\n\n\treturn 12;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/LocalePlugin/sqMacLocaleCarbon.c",
    "content": "/*\n *  sqMacLocaleCarbon.c\n *  SqueakLocale\n *\n *  Created by John M McIntosh on 6/9/05.\n *\n */\n\n#include \"sqMacLocaleCarbon.h\"\n\n/* Locale support functions */\nchar * thisLocale;\nstruct lconv * localeTable;\n\nsqInt sqLocInitialize(void) {\n\tthisLocale = setlocale(LC_ALL,\"\");\n\tlocaleTable = localeconv();\n\treturn true;\n}\n/************** Country and language ******************/\n\n/* write the country code into the string ptr. ISO 3166 is the relevant source\n * here; see http://www.unicode.org/onlinedat/countries.html for details.\n * Using the 3 character Alpha-3 codes */\nvoid\tsqLocGetCountryInto(char * str) {\n\tCFLocaleRef\t\tuserLocaleRef;\n\tCFStringRef\t\tstringRef;\n\tchar\t\t\tbuffer[4];\n\t\n\tuserLocaleRef = CFLocaleCopyCurrent();\n\tstringRef = CFLocaleGetValue(userLocaleRef, kCFLocaleCountryCode);\n\tCFStringGetCString(stringRef, buffer, 4,kCFStringEncodingMacRoman);\t\n\tmemcpy(str,buffer,3);\n\tCFRelease(userLocaleRef);\n}\n\n/* write the 3 char string describing the language in use into string ptr.\n * ISO 639 is the relevant source here;\n * see http://www.w3.org/WAI/ER/IG/ert/iso639.html\n * for details */\nvoid\tsqLocGetLanguageInto(char * str) {\n\tCFLocaleRef\t\tuserLocaleRef;\n\tCFStringRef\t\tstringRef;\n\tchar\t\t\tbuffer[4];\n\t\n\tuserLocaleRef = CFLocaleCopyCurrent();\n\tstringRef = CFLocaleGetValue(userLocaleRef, kCFLocaleLanguageCode);\n\tCFStringGetCString(stringRef, buffer, 4,kCFStringEncodingMacRoman);\t\n\tmemcpy(str,buffer,3);\n\tCFRelease(userLocaleRef);\n}\n\n/***************** Currency ********************/\n\n/* return 1 (true) if the currency symbol is to be placed in front of the\n *currency amount */\nsqInt\tsqLocCurrencyNotation(void) {\n\treturn localeTable->p_cs_precedes;\n}\n\n/* return the length in chars of the curency symbol string */\nsqInt\tsqLocCurrencySymbolSize(void) {\n\treturn strlen(localeTable->currency_symbol);\n}\n/* write the currency symbol into the string ptr */\nvoid\tsqLocGetCurrencySymbolInto(char * str) {\n\tstrcpy(str, localeTable->currency_symbol);\n}\n\n\n/***************** Numbers and measurements **************/\n\n/* return true if the metric measurements system is to be used, false otherwise\n * (USA is about it) */\nsqInt\tsqLocMeasurementMetric(void) {\n\tCFLocaleRef\t\tuserLocaleRef;\n\tCFStringRef\t\tstringRef;\n\tchar\t\t\tbuffer[7];\n\t\n\tuserLocaleRef = CFLocaleCopyCurrent();\n\tstringRef = CFLocaleGetValue(userLocaleRef, kCFLocaleMeasurementSystem);\n\tCFStringGetCString(stringRef, buffer, 7,kCFStringEncodingMacRoman);\t\n\tCFRelease(userLocaleRef);\n\tif (strcmp(buffer, \"Metric\") == 0)\n\t\treturn 1;\n\telse\n\t\treturn 0;\n}\n\n/* write the 1 char used for digit grouping into string ptr.\n * Usually this is . or ,  as in 1,000,000 */\nvoid\tsqLocGetDigitGroupingSymbolInto(char * str) {\n\tstrncpy(str, localeTable->thousands_sep, 1);\n}\n/* write the 1 char used for decimal separation into string ptr.\n * Usually this is . or , */\nvoid\tsqLocGetDecimalSymbolInto(char * str) {\n\tstrncpy(str, localeTable->decimal_point, 1);\n}\n\n\n/****************** time and date *********************/\n\nsqInt\tsqLocGetVMOffsetToUTC(void) {\n\t/* return 0 for now */\n\treturn 0;\n}\n\nsqInt\tsqLocGetTimezoneOffset(void) {\n\tCFTimeZoneRef zoneRef = CFTimeZoneCopySystem ();\n\tCFAbsoluteTime  timeIs = CFAbsoluteTimeGetCurrent();\n\tCFTimeInterval interval;\n\t\n\tinterval = CFTimeZoneGetSecondsFromGMT (zoneRef,timeIs);\n\tCFRelease(zoneRef);\n\treturn ((sqInt) interval)/60;\n}\n\n/* return true if DST is in use, false otherwise */\nsqInt\tsqLocDaylightSavings(void) {\nstruct tm * timeBlock;\ntime_t theTime;\n\ttheTime = time((time_t)NULL);\n\ttimeBlock = localtime(&theTime);\n\treturn timeBlock->tm_isdst;\n}\n\nvoid dateFormatIs(char *buffer,CFDateFormatterStyle type ) {\n\tCFDateFormatterRef longFormatter = CFDateFormatterCreate(NULL, NULL, type, type);\n\tCFStringRef longStrRef = CFDateFormatterGetFormat(longFormatter);\n\tCFStringGetCString(longStrRef, buffer, 255,kCFStringEncodingMacRoman);\t\n\tCFRelease(longFormatter);\n}\n/* return the size in chars of the long date format string */\nsqInt\tsqLocLongDateFormatSize(void) {\n\tchar buffer[256];\n\tdateFormatIs(buffer,kCFDateFormatterLongStyle);\n\n\treturn strlen(buffer);\n}\n/*Write the string describing the long date formatting into string ptr.\n * Format is made up of\n * \t\td day, m month, y year,\n * \t\tdouble symbol is null padded, single not padded (m=6, mm=06)\n * \t\tdddd weekday\n * \t\tmmmm month name */\nvoid\tsqLocGetLongDateFormatInto(char * str) {\n\tchar buffer[256];\n\tdateFormatIs(buffer,kCFDateFormatterLongStyle);\n\tmemcpy(str, buffer,strlen(buffer));\n}\n\n/* return the size in chars of the short date format string */\nsqInt\tsqLocShortDateFormatSize(void) {\n\tchar buffer[256];\n\tdateFormatIs(buffer,kCFDateFormatterShortStyle);\n\n\treturn strlen(buffer);\n}\n/*Write the string describing the short date formatting into string ptr.\n * Format is made up of\n * \t\td day, m month, y year,\n * \t\tdouble symbol is null padded, single not padded (m=6, mm=06)\n * \t\tdddd weekday\n * \t\tmmmm month name */\nvoid\tsqLocGetShortDateFormatInto(char * str) {\n\tchar buffer[256];\n\tdateFormatIs(buffer,kCFDateFormatterShortStyle);\n\tmemcpy(str, buffer,strlen(buffer));\n}\n\n/* return the size in chars of the time format string */\nsqInt\tsqLocTimeFormatSize(void) {\n\tchar buffer[256];\n\tdateFormatIs(buffer,kCFDateFormatterLongStyle);\n\n\treturn strlen(buffer);\n}\n/* write the string describing the time formatting into string ptr.\n * Format is made up of\n * \t\th hour (h 12, H 24), m minute, s seconds, x (am/pm String)\n * \t\tdouble symbol is null padded, single not padded (h=6, hh=06)  */\nvoid\tsqLocGetTimeFormatInto(char * str) {\n\tchar buffer[256]; \n\tdateFormatIs(buffer,kCFDateFormatterLongStyle);\n\tmemcpy(str, buffer,strlen(buffer));\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/LocalePlugin/sqMacLocaleCarbon.h",
    "content": "/*\n *  sqMacLocaleCarbon.h\n *  SqueakLocale\n *\n *  Created by John M McIntosh on 6/9/05.\n *\n */\n\n#include <Carbon/Carbon.h>\n#include \"sqMemoryAccess.h\"\n#include <locale.h>\n#include \"sq.h\"\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/MIDIPlugin/sqMacMIDI.c",
    "content": "#include \"sq.h\"\n#include \"MIDIPlugin.h\"\n    #include <Carbon/Carbon.h>\n    #include <QuickTime/QuickTimeMusic.h>\n\nextern struct VirtualMachine *interpreterProxy;\n\n/* Quicktime MIDI note allocator and channels */\n#define FIRST_DRUM_KIT 16385\n\nvoid* portNamesFn;\nvoid* portIsOpenFn;\nvoid* portSetControlFn;\nvoid* serialPortOpenFn;\nvoid* serialPortCloseFn;\nvoid* serialPortCountFn;\nvoid* serialPortReadIntoFn;\nvoid* serialPortWriteFromFn;\n\nNoteAllocator na = nil;\nNoteChannel channel[16] = {\n\tnil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil};\n\n/* Initial instruments: drums on channel 10, piano on all other channels */\nint channelInstrument[16] = {\n\t1, 1, 1, 1, 1, 1, 1, 1, 1, FIRST_DRUM_KIT, 1, 1, 1, 1, 1, 1};\n\n/* Quicktime MIDI parser state */\nenum {idle, want1of2, want2of2, want1of1, sysExclusive};\nint state = idle;\nint argByte1 = 0;\nint argByte2 = 0;\nint lastCmdByte = nil;\n\n/* number of argument bytes for each MIDI command */\nchar argumentBytes[128] = {\n\t2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n\t2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n\t2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n\t2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n\t1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n\t1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n\t2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n\t3, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n};\n\n\n/*** Private Functions ***/\nint setMidiClockRate(int portNum, int interfaceClockRate);\nint sqMIDIGetSerialPortCount(void);\n\n/*** Quicktime MIDI Support Functions ***/\nvoid closeQuicktimeMIDIPort(void);\nvoid openQuicktimeMIDIPort(void);\nvoid performMIDICmd(int cmdByte, int arg1, int arg2);\nvoid processMIDIByte(int aByte);\nvoid startMIDICommand(int cmdByte);\n\n/* initialize/shutdown */\nint midiInit() { \n\tportIsOpenFn = interpreterProxy->ioLoadFunctionFrom(\"serialPortIsOpen\", \"SerialPlugin\");\n    if (portIsOpenFn == 0) {\n    \tportIsOpenFn = interpreterProxy->ioLoadFunctionFrom(\"serialPortIsOpen\", \"\");\n\t\t   if (portIsOpenFn == 0)\n\t\t    return interpreterProxy->success(false);\n\t}\n\n\tportSetControlFn = interpreterProxy->ioLoadFunctionFrom(\"serialPortSetControl\", \"SerialPlugin\");\n    if (portSetControlFn == 0) {\n    \tportSetControlFn = interpreterProxy->ioLoadFunctionFrom(\"serialPortSetControl\", \"\");\n\t\tif (portSetControlFn == 0)\n\t\t    return interpreterProxy->success(false);\n\t}\n\n\tserialPortCloseFn = interpreterProxy->ioLoadFunctionFrom(\"serialPortClose\", \"SerialPlugin\");\n    if (serialPortCloseFn == 0) {\n    \tserialPortCloseFn = interpreterProxy->ioLoadFunctionFrom(\"serialPortClose\", \"\");\n\t\tif (serialPortCloseFn == 0)\n\t\t    return interpreterProxy->success(false);\n\t}\n\n\tserialPortCountFn = interpreterProxy->ioLoadFunctionFrom(\"serialPortCount\", \"SerialPlugin\");\n    if (serialPortCountFn == 0) {\n\t    serialPortCountFn = interpreterProxy->ioLoadFunctionFrom(\"serialPortCount\", \"\");\n\t    if (serialPortCountFn == 0)\n\t    \treturn interpreterProxy->success(false);\n\t}\n\n\tportNamesFn = interpreterProxy->ioLoadFunctionFrom(\"serialPortNames\", \"SerialPlugin\");\n    if (portNamesFn == 0) {\n    \tportNamesFn = interpreterProxy->ioLoadFunctionFrom(\"serialPortNames\", \"\");\n        if (portNamesFn == 0) \n\t\t    return interpreterProxy->success(false);\n\t}\n\n\tserialPortOpenFn = interpreterProxy->ioLoadFunctionFrom(\"serialPortOpen\", \"SerialPlugin\");\n    if (serialPortOpenFn == 0) {\n\t    serialPortOpenFn = interpreterProxy->ioLoadFunctionFrom(\"serialPortOpen\", \"\");\n        if (serialPortOpenFn == 0)\n \t\t    return interpreterProxy->success(false);\n\t}\n\n\tserialPortReadIntoFn = interpreterProxy->ioLoadFunctionFrom(\"serialPortReadInto\", \"SerialPlugin\");\n    if (serialPortReadIntoFn == 0) {\n    \tserialPortReadIntoFn = interpreterProxy->ioLoadFunctionFrom(\"serialPortReadInto\", \"\");\n        if (serialPortReadIntoFn == 0)\n            return interpreterProxy->success(false);\n\t}\n\n\tserialPortWriteFromFn = interpreterProxy->ioLoadFunctionFrom(\"serialPortWriteFrom\", \"SerialPlugin\");\n    if (serialPortWriteFromFn == 0) {\n    \tserialPortWriteFromFn = interpreterProxy->ioLoadFunctionFrom(\"serialPortWriteFrom\", \"\");\n        if (serialPortWriteFromFn == 0)\n            return interpreterProxy->success(false);\n\t}\n\n    return true; \n}\n\nint midiShutdown() {\n\treturn 1;\n}\n\n/* helper function for MIDI module */\nint sqMIDIParameter(int whichParameter, int modify, int newValue);\n\nint sqMIDIParameterSet(int whichParameter, int newValue) {\n\tsqMIDIParameter(whichParameter, true, newValue);\n\treturn 0;\n}\n\nint sqMIDIParameterGet(int whichParameter) {\n\tsqMIDIParameter(whichParameter, false, 0);\n\treturn 0;\n}\n\nint setMidiClockRate(int portNum, int interfaceClockRate) {\n#pragma unused(portNum, interfaceClockRate)\n/* Put the given port into MIDI mode, which uses a clock supplied\n   by an external MIDI interface adaptor to determine the baud rate.\n   Possible external clock rates: 31.25 KHz, 0.5 MHz, 1 MHz, or 2 MHz. */\n    return false;\n}/*** MIDI Parameters (used with sqMIDIParameter function) ***/\n\n#define sqMIDIInstalled\t\t\t\t1\n/* Read-only. Return 1 if a MIDI driver is installed, 0 if not.\n   On OMS-based MIDI drivers, this returns 1 only if the OMS\n   system is properly installed and configured. */\n\n#define sqMIDIVersion\t\t\t\t2\n/* Read-only. Return the integer version number of this MIDI driver.\n   The version numbering sequence is relative to a particular driver.\n   That is, version 3 of the Macintosh MIDI driver is not necessarily\n   related to version 3 of the Win95 MIDI driver. */\n\n#define sqMIDIHasBuffer\t\t\t\t3\n/* Read-only. Return 1 if this MIDI driver has a time-stamped output\n   buffer, 0 otherwise. Such a buffer allows the client to schedule\n   MIDI output packets to be sent later. This can allow more precise\n   timing, since the driver uses timer interrupts to send the data\n   at the right time even if the processor is in the midst of a\n   long-running Squeak primitive or is running some other application\n   or system task. */\n\n#define sqMIDIHasDurs\t\t\t\t4\n/* Read-only. Return 1 if this MIDI driver supports an extended\n   primitive for note-playing that includes the note duration and\n   schedules both the note-on and the note-off messages in the\n   driver. Otherwise, return 0. */\n\n#define sqMIDICanSetClock\t\t\t5\n/* Read-only. Return 1 if this MIDI drivers clock can be set\n   via an extended primitive, 0 if not. */\n\n#define sqMIDICanUseSemaphore\t\t6\n/* Read-only. Return 1 if this MIDI driver can signal a semaphore\n   when MIDI input arrives. Otherwise, return 0. If this driver\n   supports controller caching and it is enabled, then incoming\n   controller messages will not signal the semaphore. */\n\n#define sqMIDIEchoOn\t\t\t\t7\n/* Read-write. If this flag is set to a non-zero value, and if\n   the driver supports echoing, then incoming MIDI events will\n   be echoed immediately. If this driver does not support echoing,\n   then queries of this parameter will always return 0 and\n   attempts to change its value will do nothing. */\n\n#define sqMIDIUseControllerCache\t8\n/* Read-write. If this flag is set to a non-zero value, and if\n   the driver supports a controller cache, then the driver will\n   maintain a cache of the latest value seen for each MIDI controller,\n   and control update messages will be filtered out of the incoming\n   MIDI stream. An extended MIDI primitive allows the client to\n   poll the driver for the current value of each controller. If\n   this driver does not support a controller cache, then queries\n   of this parameter will always return 0 and attempts to change\n   its value will do nothing. */\n\n#define sqMIDIEventsAvailable\t\t9\n/* Read-only. Return the number of MIDI packets in the input queue. */\n\n#define sqMIDIFlushDriver\t\t\t10\n/* Write-only. Setting this parameter to any value forces the driver\n   to flush its I/0 buffer, discarding all unprocessed data. Reading\n   this parameter returns 0. Setting this parameter will do nothing\n   if the driver does not support buffer flushing. */\n\n#define sqMIDIClockTicksPerSec\t\t11\n/* Read-only. Return the MIDI clock rate in ticks per second. */\n\n#define sqMIDIHasInputClock\t\t\t12\n/* Read-only. Return 1 if this MIDI driver timestamps incoming\n   MIDI data with the current value of the MIDI clock, 0 otherwise.\n   If the driver does not support such timestamping, then the\n   client must read input data frequently and provide its own\n   timestamping. */\n\n/*** MIDI Functions ***/\n\nint sqMIDIClosePort(int portNum) {\n/* Close the given MIDI port. Do nothing if the port is not open.\n   Fail if there is no port of the given number.*/\n\n\tint serialPorts;\n\n\tserialPorts = sqMIDIGetSerialPortCount();\n\tif (portNum == serialPorts) {\n\t\tcloseQuicktimeMIDIPort();\n\t\treturn 0;\n\t} else {\n\n    \tif (serialPortCloseFn == 0) {\n\t\t\treturn interpreterProxy->success(false);\n\t\t}\n\n\t\treturn ((int (*) (int)) serialPortCloseFn)(portNum);\n\t}\n}\n\nint sqMIDIGetClock(void) {\n/* Return the current value of the clock used to schedule MIDI events.\n   The MIDI clock is assumed to wrap at or before half the maximum\n   positive SmallInteger value. This allows events to be scheduled\n   into the future without overflowing into LargePositiveIntegers. \n   This implementation does not support event scheduling, so it\n   just returns the value of the Squeak millisecond clock. */\n\n\treturn interpreterProxy->ioMicroMSecs();\n}\n\nint sqMIDIGetSerialPortCount(void) {\n/* Return the number of available \n   hardware ports and software entities that act like ports. Ports\n   are numbered from 0 to N-1, where N is the number returned by this\n   primitive. */\n\n    int serialPorts;\n\n    if (serialPortCountFn == 0) {\n\t\treturn 0;\n\t}\n\n\tserialPorts = ((int (*) (void)) serialPortCountFn)();\n\treturn serialPorts;  /* serial ports */\n}\n\nint sqMIDIGetPortCount(void) {\n/* Return the number of available MIDI interfaces, including both\n   hardware ports and software entities that act like ports. Ports\n   are numbered from 0 to N-1, where N is the number returned by this\n   primitive. */\n\n\treturn sqMIDIGetSerialPortCount() + 1;  /* serial ports + QuickTime Synth */\n}\n\nint sqMIDIGetPortDirectionality(int portNum) {\n/* Return an integer indicating the directionality of the given\n   port where: 1 = input, 2 = output, 3 = bidirectional. Fail if\n   there is no port of the given number. */\n\n\t\n\tint serialPorts;\n\t\n\tserialPorts = sqMIDIGetSerialPortCount();\n\tif (portNum > serialPorts) return interpreterProxy->success(false);\n\tif (portNum == serialPorts) {\n\t\treturn 2;\n\t} else {\n\t\treturn 3;\n\t}\n}\n\nint sqMIDIGetPortName(int portNum, int namePtr, int length) {\n/* Copy the name of the given MIDI port into the string at the given\n   address. Copy at most length characters, and return the number of\n   characters copied. Fail if there is no port of the given number.*/\n\n\tchar userName[256], inName[256], outName[256];\n\tint serialPorts, count;\n\t\n\tserialPorts = sqMIDIGetSerialPortCount();\n\tif (portNum > serialPorts) return interpreterProxy->success(false);\n\n\tif (portNum == serialPorts) {\n\t\tstrcpy(userName, \"QuickTime MIDI\");\n\t} else {\n \n    \tif (portNamesFn == 0) {\n\t\t\treturn 0;\n\t\t}\n\n\t\t((int (*) (int , char *, char *, char *)) portNamesFn)(portNum, userName, inName, outName);\n\t}\n\n\tcount = strlen(userName);\n\tif (count > length) count = length;\n\tmemcpy((void *) namePtr, userName, count);\n\treturn count;\n}\n\nint sqMIDIOpenPort(int portNum, int readSemaIndex, int interfaceClockRate) {\n/* Open the given port, if possible. If non-zero, readSemaphoreIndex\n   specifies the index in the external objects array of a semaphore\n   to be signalled when incoming MIDI data is available. Note that\n   not all implementations support read semaphores (this one does\n   not); see sqMIDICanUseSemaphore. The interfaceClockRate parameter\n   specifies the clock speed for an external MIDI interface\n   adaptor on platforms that use such adaptors (e.g., Macintosh).\n   Fail if there is no port of the given number.*/\n\n#pragma unused(readSemaIndex)\n\tint serialPorts;\n\tint err;\n\n\n\tserialPorts = sqMIDIGetSerialPortCount();\n\tif (portNum > serialPorts) return interpreterProxy->success(false);\n\n\tif (portNum == serialPorts) {\n\t\topenQuicktimeMIDIPort();\n\t\treturn 0;\n\t}\n\n    if (serialPortOpenFn == 0) {\n\t\treturn interpreterProxy->success(false);\n\t}\n\n\terr = ((int (*) (int , int , int , int , int , int , int , int , int ))serialPortOpenFn)(portNum, 9600, 1, 0, 8, 0, 0, 0, 0);\n\tif (!err) {\n\t\terr = setMidiClockRate(portNum, interfaceClockRate);\n\t\tif (err) {\n\t\t\tsqMIDIClosePort(portNum);\n\t\t}\n\t}   \n\treturn 0;\n}\n\nint sqMIDIParameter(int whichParameter, int modify, int newValue) {\n/* Read or write the given MIDI driver parameter. If modify is 0,\n   then newValue is ignored and the current value of the specified\n   parameter is returned. If modify is non-zero, then the specified\n   parameter is set to newValue. Note that many MIDI driver parameters\n   are read-only; attempting to set one of these parameters fails.\n   For boolean parameters, true = 1, false = 0. */\n#pragma unused(newValue)\n\n\tif (modify == 0) {\n\t\tswitch(whichParameter) {\n\t\tcase sqMIDIInstalled:\n\t\t\treturn 1;\n\t\t\tbreak;\n\t\tcase sqMIDIVersion:\n\t\t\treturn 100;\n\t\t\tbreak;\n\t\tcase sqMIDIHasBuffer:\n\t\tcase sqMIDIHasDurs:\n\t\tcase sqMIDICanSetClock:\n\t\tcase sqMIDICanUseSemaphore:\n\t\tcase sqMIDIEchoOn:\n\t\tcase sqMIDIUseControllerCache:\n\t\t\treturn 0;\n\t\t\tbreak;\n\t\tcase sqMIDIEventsAvailable:\n\t\t\treturn 1;  /* pretend that events are always available */\n\t\t\tbreak;\n\t\tcase sqMIDIFlushDriver:\n\t\t\treturn 0;\n\t\t\tbreak;\n\t\tcase sqMIDIClockTicksPerSec:\n\t\t\treturn 1000;\n\t\t\tbreak;\n\t\tcase sqMIDIHasInputClock:\n\t\t\treturn 0;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn interpreterProxy->success(false);\n\t\t}\n\t} else {\n\t\tswitch(whichParameter) {\n\t\tcase sqMIDIInstalled:\n\t\tcase sqMIDIVersion:\n\t\tcase sqMIDIHasBuffer:\n\t\tcase sqMIDIHasDurs:\n\t\tcase sqMIDICanSetClock:\n\t\tcase sqMIDICanUseSemaphore:\n\t\t\treturn interpreterProxy->success(false);\n\t\t\tbreak;\n\t\tcase sqMIDIEchoOn:\n\t\t\t/* noop; echoing not supported */\n\t\t\tbreak;\n\t\tcase sqMIDIUseControllerCache:\n\t\t\t/* noop; controller cache not supported */\n\t\t\tbreak;\n\t\tcase sqMIDIEventsAvailable:\n\t\t\treturn interpreterProxy->success(false);\n\t\t\tbreak;\n\t\tcase sqMIDIFlushDriver:\n\t\t\t/* noop; buffer flushing not supported */\n\t\t\tbreak;\n\t\tcase sqMIDIClockTicksPerSec:\n\t\t\treturn interpreterProxy->success(false);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn interpreterProxy->success(false);\n\t\t}\n\t}\n\treturn 0;\n}\n\nint sqMIDIPortReadInto(int portNum, int count, int bufferPtr) {\n/* bufferPtr is the address of the first byte of a Smalltalk\n   ByteArray of the given length. Copy up to (length - 4) bytes\n   of incoming MIDI data into that buffer, preceded by a 4-byte\n   timestamp in the units of the MIDI clock, most significant byte\n   first. Implementations that do not support timestamping of\n   incoming data as it arrives (see sqMIDIHasInputClock) simply\n   set the timestamp to the value of the MIDI clock when this\n   function is called. Return the total number of bytes read,\n   including the timestamp bytes. Return zero if no data is\n   available. Fail if the buffer is shorter than five bytes,\n   since there must be enough room for the timestamp plus at\n   least one data byte. */\n\n\tint bytesRead;\n\n\tif (count < 5) return interpreterProxy->success(false);\n\n    if (serialPortReadIntoFn == 0) {\n\t\treturn interpreterProxy->success(false);\n\t}\n\n\tbytesRead = ((int (*) (int , int , int )) serialPortReadIntoFn)(portNum, count - 4, bufferPtr + 4);\n\n\tif (bytesRead == 0) return 0;\n\t*((int *) bufferPtr) = sqMIDIGetClock();  /* set timestamp */\n\treturn bytesRead + 4;\n}\n\nint sqMIDIPortWriteFromAt(int portNum, int count, int bufferPtr, int time) {\n/* bufferPtr is the address of the first byte of a Smalltalk\n   ByteArray of the given length. Send its contents to the given\n   port when the MIDI clock reaches the given time. If time equals\n   zero, then send the data immediately. Implementations that do\n   not support a timestamped output queue, such as this one, always\n   send the data immediately; see sqMIDIHasBuffer. */\n#pragma unused(time)\n\tint serialPorts, i;\n\tunsigned char *bytePtr;\n\t\n\tserialPorts = sqMIDIGetSerialPortCount();\n\tif (portNum > serialPorts) return interpreterProxy->success(false);\n\n\tif (portNum == serialPorts) {\n\t\tif (!na) return interpreterProxy->success(false);  /* QuickTime port not open */\n\t\tbytePtr = (unsigned char *) bufferPtr;\n\t\tfor (i = 0; i < count; i++) {\n\t\t\tprocessMIDIByte(*bytePtr++);\n\t\t}\n\t\treturn count;\n\t}\n\n    if (serialPortWriteFromFn == 0) {\n\t\treturn interpreterProxy->success(false);\n\t}\n\n\treturn ((int (*) (int , int , int )) serialPortWriteFromFn)(portNum, count - 4, bufferPtr + 4);\n}\n\n/*** Quicktime MIDI Support Functions ***/\n\nvoid closeQuicktimeMIDIPort(void) {\n\tint i;\n\n\tif (!na) return;\n\tfor (i = 0; i < 16; i++) {\n\t\t/* dispose of note channels */\n\t\tif (channel[i]) NADisposeNoteChannel(na, channel[i]);\n\t\tchannel[i] = nil;\n\t}\n\tCloseComponent(na);  /* close note allocator */\n}\n\nvoid openQuicktimeMIDIPort(void) {\n\tComponentResult err;\n\tNoteRequest nr;\n\tNoteChannel nc;\n\tint i;\n\tshort shortpoly;\n\tFixed fixedtypical;\n\t\n\tcloseQuicktimeMIDIPort();\n\tna = OpenDefaultComponent('nota', 0);\n\tif (!na) return;\n\n\tfor (i = 0; i < 16; i++) {\n\t\tshortpoly = CFSwapInt16HostToBig(11);\n\t\tmemcpy(&nr.info.polyphony,&shortpoly,2);\t\t\t/* max simultaneous tones */\n\t\tfixedtypical = CFSwapInt32HostToBig(0x00010000);\n\t\tmemcpy(&nr.info.typicalPolyphony,&fixedtypical,4);\n\n\t\tNAStuffToneDescription(na, 1, &nr.tone);\n\t\terr = NANewNoteChannel(na, &nr, &nc);\n\t\tif (err || !nc) {\n\t\t\tcloseQuicktimeMIDIPort();\n\t\t\treturn;\n\t\t}\n\t\tNAResetNoteChannel(na, nc);\n\t\tNASetInstrumentNumber(na, nc, channelInstrument[i]);\n\t\tchannel[i] = nc;\n\t}\n\tstate = idle;\n\targByte1 = 0;\n\targByte2 = 0;\n\tlastCmdByte = nil;\n\treturn;\n}\n\nvoid performMIDICmd(int cmdByte, int arg1, int arg2) {\n\t/* Perform the given MIDI command with the given arguments. */\n\n\tint ch, cmd, val, instrument, bend;\n\n\tch = cmdByte & 0x0F;\n\tcmd = cmdByte & 0xF0;\n\tif (cmd == 128) {  /* note off */\n\t\tNAPlayNote(na, channel[ch], arg1, 0);\n\t}\n\tif (cmd == 144) {  /* note on */\n\t\tNAPlayNote(na, channel[ch], arg1, arg2);\n\t}\n\tif (cmd == 176) {  /* control change */\n\t\tif ((arg1 >= 32) && (arg1 <= 63)) {\n\t\t\tval = arg2 << 1;  /* LSB of controllers 0-31 */\n\t\t} else {\n\t\t\tval = arg2 << 8;  /* scale MSB to QT controller range */\n\t\t}\n\t\tNASetController(na, channel[ch], arg1, val);\n\t}\n\tif (cmd == 192) {  /* program change */\n\t\tif (ch == 9) {\n\t\t\tinstrument = FIRST_DRUM_KIT + arg1;  /* if channel 10, select a drum set */\n\t\t} else {\n\t\t\tinstrument = arg1 + 1;\n\t\t}\n\t\tNASetInstrumentNumber(na, channel[ch], instrument);\n\t\tchannelInstrument[ch] = instrument;\n\t}\n\tif (cmd == 224) {  /* pitch bend */\n\t\tbend = ((arg2 << 7) + arg1) - (64 << 7);\n\t\tbend = bend / 32;  /* default sensitivity = +/- 2 semitones */\n\t\tNASetController(na, channel[ch], kControllerPitchBend, bend);\n\t}\n}\n\nvoid processMIDIByte(int aByte) {\n\t/* Process the given incoming MIDI byte and perform any completed commands. */\n\n\tif (aByte > 247) return;  /* skip all real-time messages */\n\n\tswitch (state) {\n\tcase idle:\n\t\tif (aByte >= 128) {\n\t\t\t/* start a new command using the action table */\n\t\t\tstartMIDICommand(aByte);\n\t\t} else {\n\t\t\t/* data byte arrived in idle state: use running status if possible */\n\t\t\tif (lastCmdByte == nil) {\n\t\t\t\treturn;  /* last command byte is not defined; just skip this byte */\n\t\t\t} else {\n\t\t\t\t/* process this data as if it had the last command byte in front of it */\n\t\t\t\tstartMIDICommand(lastCmdByte);\n\t\t\t\t/* the previous line put us into a new state; we now do a recursive\n\t\t\t   \t   call to process the data byte in this new state. */\n\t\t\t\tprocessMIDIByte(aByte);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\tcase want1of2:\n\t\targByte1 = aByte;\n\t\tstate = want2of2;\n\t\tbreak;\n\tcase want2of2:\n\t\targByte2 = aByte;\n\t\tperformMIDICmd(lastCmdByte, argByte1, argByte2);\n\t\tstate = idle;\n\t\tbreak;\n\tcase want1of1:\n\t\targByte1 = aByte;\n\t\tperformMIDICmd(lastCmdByte, argByte1, 0);\n\t\tstate = idle;\n\t\tbreak;\n\tcase sysExclusive:\n\t\tif (aByte < 128) {\n\t\t\t/* skip a system exclusive data byte */\n\t\t} else {\n\t\t\tif (aByte < 248) {\n\t\t\t\t/* a system exclusive message can be terminated by any non-real-time command byte */\n\t\t\t\tstate = idle;\n\t\t\t\tif (aByte != 247) {\n\t\t\t\t\tprocessMIDIByte(aByte);\t/* if not endSysExclusive, byte is the start the next command */\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\nvoid startMIDICommand(int cmdByte) {\n\t/* Start processing a MIDI message beginning with the given command byte. */\n\n\tint argCount;\n\n\targCount = argumentBytes[cmdByte - 128];\n\tswitch (argCount) {\n\tcase 0:\t\t\t\t\t\t/* start a zero argument command (e.g., a real-time message) */\n\t\t/* Stay in the current state and don't change active status.\n\t\t   Real-time messages may arrive between data bytes without disruption. */\n\t\tperformMIDICmd(cmdByte, 0, 0);\n\t\tbreak;\n\tcase 1:\t\t\t\t\t\t/* start a one argument command */\n\t\tlastCmdByte = cmdByte;\n\t\tstate = want1of1;\n\t\tbreak;\n\tcase 2:\t\t\t\t\t\t/* start a two argument command */\n\t\tlastCmdByte = cmdByte;\n\t\tstate = want1of2;\n\t\tbreak;\n\tcase 3:\t\t\t\t\t\t/* start a variable length 'system exclusive' command */\n\t\t/* a system exclusive command clears running status */\n\t\tlastCmdByte = nil;\n\t\tstate = sysExclusive;\n\t\tbreak;\n\t}\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/MacMenubarPlugin/MacMenuOS9ToOSX.h",
    "content": "//\n//  MacMenuOS9ToOSX.h\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-12-26.\n//  Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n//\n#include \"MacMenubarPlugin.h\"\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/MacMenubarPlugin/MacMenuOS9ToOSX.m",
    "content": "//\n//  MacMenuOS9ToOSX.m\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-12-26.\n//  Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n//\n\n#import \"MacMenuOS9ToOSX.h\"\n\nBoolean ioCheckMenuHandle(MenuHandle menuHandle) {\n\tint menuID;\n\tif (menuHandle == 0) return true;\n\tmenuID = GetMenuID(menuHandle);\n\tif (menuID == 0) return false;\n\treturn true;\n}\n\n\nMenuRef GetMenuHandle(MenuID menuID){\n\tNSMenu *mainMenu = [[NSApplication sharedApplication] mainMenu];\n\tNSMenuItem *menuRef =  [mainMenu itemAtIndex: menuID];\n\tMenuRef handle = (MenuRef)menuRef;\n\treturn handle; \n};\n\nvoid \nDisableMenuItem(\n\t\t\t\tMenuRef         theMenu,\n\t\t\t\tMenuItemIndex   item){};\nvoid \nGetMenuItemText(\n\t\t\t\tMenuRef         theMenu,\n\t\t\t\tMenuItemIndex   item,\n\t\t\t\tStr255          itemString){};\nOSErr \nSetMenuItemCommandID(\n\t\t\t\t\t MenuRef         inMenu,\n\t\t\t\t\t MenuItemIndex   inItem,\n\t\t\t\t\t MenuCommand     inCommandID){};\n\nvoid DisposeMenu(MenuRef theMenu){\n\t//Do nothing I think\n};\n\nOSErr \nGetMenuItemFontID(\n\t\t\t\t  MenuRef         inMenu,\n\t\t\t\t  MenuItemIndex   inItem,\n\t\t\t\t  SInt16 *        outFontID){};\nOSErr \nSetMenuItemHierarchicalID(\n\t\t\t\t\t\t  MenuRef         inMenu,\n\t\t\t\t\t\t  MenuItemIndex   inItem,\n\t\t\t\t\t\t  MenuID          inHierID){};\nOSErr \nGetMenuItemCommandID(\n\t\t\t\t\t MenuRef         inMenu,\n\t\t\t\t\t MenuItemIndex   inItem,\n\t\t\t\t\t MenuCommand *   outCommandID){};\nvoid \nSetItemIcon(\n\t\t\tMenuRef         theMenu,\n\t\t\tMenuItemIndex   item,\n\t\t\tshort           iconIndex) {};\nvoid \nSetItemCmd(\n\t\t   MenuRef         theMenu,\n\t\t   MenuItemIndex   item,\n\t\t   CharParameter   cmdChar){};\nMenuRef \nNewMenu(\n\t\tMenuID             menuID,\n\t\tConstStr255Param   menuTitle){};\nvoid \nSetItemMark(\n\t\t\tMenuRef         theMenu,\n\t\t\tMenuItemIndex   item,\n\t\t\tCharParameter   markChar){};\nextern Boolean \nIsMenuBarVisible(void){};\n\nvoid DeleteMenu(MenuID menuID){\n\tNSMenu *mainMenu = [[NSApplication sharedApplication] mainMenu];\n\t[mainMenu removeItemAtIndex: menuID];\n};\n\nvoid \nShowMenuBar(void){};\nOSStatus \nAppendMenuItemText(\n\t\t\t\t   MenuRef            menu,\n\t\t\t\t   ConstStr255Param   inString) {};\nOSErr \nSetMenuItemKeyGlyph(\n\t\t\t\t\tMenuRef         inMenu,\n\t\t\t\t\tMenuItemIndex   inItem,\n\t\t\t\t\tSInt16          inGlyph){};\nvoid \nDeleteMenuItem(\n\t\t\t   MenuRef         theMenu,\n\t\t\t   MenuItemIndex   item) {};\nOSErr \nGetMenuItemKeyGlyph(\n\t\t\t\t\tMenuRef         inMenu,\n\t\t\t\t\tMenuItemIndex   inItem,\n\t\t\t\t\tSInt16 *        outGlyph){};\nvoid \nClearMenuBar(void){};\nvoid \nSetItemStyle(\n\t\t\t MenuRef          theMenu,\n\t\t\t MenuItemIndex    item,\n\t\t\t StyleParameter   chStyle) {};\nvoid \nGetItemIcon(\n\t\t\tMenuRef         theMenu,\n\t\t\tMenuItemIndex   item,\n\t\t\tshort *         iconIndex){};\nvoid \nEnableMenuItem(\n\t\t\t\t  MenuRef         theMenu,\n\t\t\t\t  MenuItemIndex   item){};\nMenuBarHandle \nGetMenuBar(void){};\nvoid \nGetItemMark(\n\t\t\tMenuRef          theMenu,\n\t\t\tMenuItemIndex    item,\n\t\t\tCharParameter *  markChar){};\nvoid \nHideMenuBar(void){};\nvoid \nGetItemStyle(\n\t\t\t MenuRef         theMenu,\n\t\t\t MenuItemIndex   item,\n\t\t\t Style *         chStyle){};\nvoid\nEnableMenuItemIcon(\n\t\t\t\t   MenuRef         theMenu,\n\t\t\t\t   MenuItemIndex   item){};\nvoid \nHiliteMenu(MenuID menuID){};\nvoid \nInsertMenuItem(\n\t\t\t   MenuRef            theMenu,\n\t\t\t   ConstStr255Param   itemString,\n\t\t\t   MenuItemIndex      afterItem){};\nvoid \nDisableMenuItemIcon(\n\t\t\t\t\tMenuRef         theMenu,\n\t\t\t\t\tMenuItemIndex   item){};\nOSErr \nSetMenuItemModifiers(\n\t\t\t\t\t MenuRef         inMenu,\n\t\t\t\t\t MenuItemIndex   inItem,\n\t\t\t\t\t UInt8           inModifiers){};\nvoid \nSetMenuItemText(\n\t\t\t\tMenuRef            theMenu,\n\t\t\t\tMenuItemIndex      item,\n\t\t\t\tConstStr255Param   itemString){};\nOSErr \nSetMenuItemTextEncoding(\n\t\t\t\t\t\tMenuRef         inMenu,\n\t\t\t\t\t\tMenuItemIndex   inItem,\n\t\t\t\t\t\tTextEncoding    inScriptID){};\nOSStatus \nSetMenuTitle(\n\t\t\t MenuRef            menu,\n\t\t\t ConstStr255Param   title) {};\nvoid \nCheckMenuItem(\n\t\t\t  MenuRef         theMenu,\n\t\t\t  MenuItemIndex   item,\n\t\t\t  Boolean         checked){};\nBoolean \nIsMenuItemIconEnabled(\n\t\t\t\t\t  MenuRef         menu,\n\t\t\t\t\t  MenuItemIndex   item){};\nOSErr \nSetMenuItemFontID(\n\t\t\t\t  MenuRef         inMenu,\n\t\t\t\t  MenuItemIndex   inItem,\n\t\t\t\t  SInt16          inFontID){};\nvoid \nInsertIntlResMenu(\n\t\t\t\t  MenuRef         theMenu,\n\t\t\t\t  ResType         theType,\n\t\t\t\t  MenuItemIndex   afterItem,\n\t\t\t\t  short           scriptFilter){};\nBoolean \nIsMenuItemEnabled(\n\t\t\t\t  MenuRef         menu,\n\t\t\t\t  MenuItemIndex   item){};\nextern void \nDrawMenuBar(void){};\nOSErr \nGetMenuItemModifiers(\n\t\t\t\t\t MenuRef         inMenu,\n\t\t\t\t\t MenuItemIndex   inItem,\n\t\t\t\t\t UInt8 *         outModifiers){};\nOSErr \nGetMenuItemHierarchicalID(\n\t\t\t\t\t\t  MenuRef         inMenu,\n\t\t\t\t\t\t  MenuItemIndex   inItem,\n\t\t\t\t\t\t  MenuID *        outHierID){};\nStringPtr \nGetMenuTitle(\n\t\t\t MenuRef   menu,\n\t\t\t Str255    title){};\nvoid \nSetMenuBar(MenuBarHandle mbar){};\nUInt16 \nCountMenuItems(MenuRef theMenu){};\nvoid \nGetItemCmd(\n\t\t   MenuRef          theMenu,\n\t\t   MenuItemIndex    item,\n\t\t   CharParameter *  cmdChar){};\n\nMenuID  GetMenuID(MenuRef menu){\n\tNSMenu *mainMenu = [[NSApplication sharedApplication] mainMenu];\n\tNSMenuItem *menuItem = (NSMenuItem *) menu;\n\treturn (MenuID) [mainMenu indexOfItem: menuItem]; \n};\n\nvoid \nInsertMenu(\n\t\t   MenuRef   theMenu,\n\t\t   MenuID    beforeID) {};\nvoid \nInsertFontResMenu(\n\t\t\t\t  MenuRef         theMenu,\n\t\t\t\t  MenuItemIndex   afterItem,\n\t\t\t\t  short           scriptFilter){};\nvoid \nAppendMenu(\n\t\t   MenuRef            menu,\n\t\t   ConstStr255Param   data){};\nOSErr \nGetMenuItemTextEncoding(\n\t\t\t\t\t\tMenuRef         inMenu,\n\t\t\t\t\t\tMenuItemIndex   inItem,\n\t\t\t\t\t\tTextEncoding *  outScriptID){};\nvoid \nInvalMenuBar(void){};\n\nvoid \nEnableMenuCommand(\n\t\t\t\t  MenuRef       inMenu,\n\t\t\t\t  MenuCommand   inCommandID){};\n\nOSStatus \nCreateStandardWindowMenu(\n\t\t\t\t\t\t OptionBits   inOptions,\n\t\t\t\t\t\t MenuRef *    outMenu){};\n\nvoid \nDisableMenuCommand(\n\t\t\t\t   MenuRef       inMenu,\n\t\t\t\t   MenuCommand   inCommandID){};\n\nOSStatus \nDisposeMenuBar(MenuBarHandle inMbar){};\n\nOSStatus GetIndMenuItemWithCommandID(\n\t\t\t\t\t\t\tMenuRef          inMenu,\n\t\t\t\t\t\t\tMenuCommand      inCommandID,\n\t\t\t\t\t\t\tUInt32           inItemIndex,\n\t\t\t\t\t\t\tMenuRef *        outMenu,           /* can be NULL */\n\t\t\t\t\t\t\tMenuItemIndex *  outIndex){\n\n\tNSMenu *mainMenu = [[NSApplication sharedApplication] mainMenu];\n\tNSMenuItem *inputMenu = (NSMenuItem *) inMenu;\n\tOSType\t\tinputCommandID = inCommandID;\n};"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/MacMenubarPlugin/MacMenubarPlugin.h",
    "content": "#if __LP64__\ntypedef unsigned int                    UInt32;\ntypedef signed int                      SInt32;\n#else\ntypedef unsigned long                   UInt32;\ntypedef signed long                     SInt32;\n#endif\n\ntypedef void * MenuHandle;\ntypedef unsigned char Boolean;\ntypedef const unsigned char *           ConstStr255Param;\ntypedef\tint\tMenuCommand;\ntypedef char *                          Ptr;\ntypedef Ptr *                           Handle;\ntypedef int MenuItemIndex;\ntypedef short CharParameter;\ntypedef unsigned char                   Style;\ntypedef int MenuID;\ntypedef short SInt16;\ntypedef UInt32                          TextEncoding;\ntypedef unsigned char                   Str255[256];\ntypedef UInt32                          FourCharCode;\ntypedef FourCharCode                    ResType;\ntypedef void*\t\t\t\t\t\t\tMenuBarHandle;\ntypedef SInt16                          OSErr;\ntypedef SInt32                          OSStatus;\ntypedef short                           StyleParameter;\ntypedef unsigned char                   UInt8;\ntypedef unsigned char *                 StringPtr;\ntypedef unsigned short                  UInt16;\ntypedef UInt32                          OptionBits;\n\ntypedef void*           MenuRef;\n\n\nBoolean ioCheckMenuHandle(MenuHandle menuHandle);\n#define TARGET_API_MAC_CARBON 1\n#define kHICommandHide 'hide'\n\nMenuRef GetMenuHandle(MenuID menuID);\nvoid \nDisableMenuItem(\n\t\t\t\tMenuRef         theMenu,\n\t\t\t\tMenuItemIndex   item);\nvoid \nGetMenuItemText(\n\t\t\t\tMenuRef         theMenu,\n\t\t\t\tMenuItemIndex   item,\n\t\t\t\tStr255          itemString);\nOSErr \nSetMenuItemCommandID(\n\t\t\t\t\t MenuRef         inMenu,\n\t\t\t\t\t MenuItemIndex   inItem,\n\t\t\t\t\t MenuCommand     inCommandID);\nvoid \nDisposeMenu(MenuRef theMenu);\nOSErr \nGetMenuItemFontID(\n\t\t\t\t  MenuRef         inMenu,\n\t\t\t\t  MenuItemIndex   inItem,\n\t\t\t\t  SInt16 *        outFontID);\nOSErr \nSetMenuItemHierarchicalID(\n\t\t\t\t\t\t  MenuRef         inMenu,\n\t\t\t\t\t\t  MenuItemIndex   inItem,\n\t\t\t\t\t\t  MenuID          inHierID);\nOSErr \nGetMenuItemCommandID(\n\t\t\t\t\t MenuRef         inMenu,\n\t\t\t\t\t MenuItemIndex   inItem,\n\t\t\t\t\t MenuCommand *   outCommandID);\nvoid \nSetItemIcon(\n\t\t\tMenuRef         theMenu,\n\t\t\tMenuItemIndex   item,\n\t\t\tshort           iconIndex) ;\nvoid \nSetItemCmd(\n\t\t   MenuRef         theMenu,\n\t\t   MenuItemIndex   item,\n\t\t   CharParameter   cmdChar);\nMenuRef \nNewMenu(\n\t\tMenuID             menuID,\n\t\tConstStr255Param   menuTitle);\nvoid \nSetItemMark(\n\t\t\tMenuRef         theMenu,\n\t\t\tMenuItemIndex   item,\n\t\t\tCharParameter   markChar);\nextern Boolean \nIsMenuBarVisible(void);\nvoid \nDeleteMenu(MenuID menuID);\nvoid \nShowMenuBar(void);\nOSStatus \nAppendMenuItemText(\n\t\t\t\t   MenuRef            menu,\n\t\t\t\t   ConstStr255Param   inString) ;\nOSErr \nSetMenuItemKeyGlyph(\n\t\t\t\t\tMenuRef         inMenu,\n\t\t\t\t\tMenuItemIndex   inItem,\n\t\t\t\t\tSInt16          inGlyph);\nvoid \nDeleteMenuItem(\n\t\t\t   MenuRef         theMenu,\n\t\t\t   MenuItemIndex   item) ;\nOSErr \nGetMenuItemKeyGlyph(\n\t\t\t\t\tMenuRef         inMenu,\n\t\t\t\t\tMenuItemIndex   inItem,\n\t\t\t\t\tSInt16 *        outGlyph);\nvoid \nClearMenuBar(void);\nvoid \nSetItemStyle(\n\t\t\t MenuRef          theMenu,\n\t\t\t MenuItemIndex    item,\n\t\t\t StyleParameter   chStyle) ;\nvoid \nGetItemIcon(\n\t\t\tMenuRef         theMenu,\n\t\t\tMenuItemIndex   item,\n\t\t\tshort *         iconIndex);\nvoid \nMacEnableMenuItem(\n\t\t\t\t  MenuRef         theMenu,\n\t\t\t\t  MenuItemIndex   item);\nMenuBarHandle \nGetMenuBar(void);\nvoid \nGetItemMark(\n\t\t\tMenuRef          theMenu,\n\t\t\tMenuItemIndex    item,\n\t\t\tCharParameter *  markChar);\nvoid \nHideMenuBar(void);\nvoid \nGetItemStyle(\n\t\t\t MenuRef         theMenu,\n\t\t\t MenuItemIndex   item,\n\t\t\t Style *         chStyle);\nvoid\nEnableMenuItemIcon(\n\t\t\t\t   MenuRef         theMenu,\n\t\t\t\t   MenuItemIndex   item);\nvoid \nHiliteMenu(MenuID menuID);\nvoid \nInsertMenuItem(\n\t\t\t   MenuRef            theMenu,\n\t\t\t   ConstStr255Param   itemString,\n\t\t\t   MenuItemIndex      afterItem);\nvoid \nDisableMenuItemIcon(\n\t\t\t\t\tMenuRef         theMenu,\n\t\t\t\t\tMenuItemIndex   item);\nOSErr \nSetMenuItemModifiers(\n\t\t\t\t\t MenuRef         inMenu,\n\t\t\t\t\t MenuItemIndex   inItem,\n\t\t\t\t\t UInt8           inModifiers);\nvoid \nSetMenuItemText(\n\t\t\t\tMenuRef            theMenu,\n\t\t\t\tMenuItemIndex      item,\n\t\t\t\tConstStr255Param   itemString);\nOSErr \nSetMenuItemTextEncoding(\n\t\t\t\t\t\tMenuRef         inMenu,\n\t\t\t\t\t\tMenuItemIndex   inItem,\n\t\t\t\t\t\tTextEncoding    inScriptID);\nOSStatus \nSetMenuTitle(\n\t\t\t MenuRef            menu,\n\t\t\t ConstStr255Param   title) ;\nvoid \nCheckMenuItem(\n\t\t\t  MenuRef         theMenu,\n\t\t\t  MenuItemIndex   item,\n\t\t\t  Boolean         checked);\nBoolean \nIsMenuItemIconEnabled(\n\t\t\t\t\t  MenuRef         menu,\n\t\t\t\t\t  MenuItemIndex   item);\nOSErr \nSetMenuItemFontID(\n\t\t\t\t  MenuRef         inMenu,\n\t\t\t\t  MenuItemIndex   inItem,\n\t\t\t\t  SInt16          inFontID);\nvoid \nInsertIntlResMenu(\n\t\t\t\t  MenuRef         theMenu,\n\t\t\t\t  ResType         theType,\n\t\t\t\t  MenuItemIndex   afterItem,\n\t\t\t\t  short           scriptFilter);\nBoolean \nIsMenuItemEnabled(\n\t\t\t\t  MenuRef         menu,\n\t\t\t\t  MenuItemIndex   item);\nextern void \nDrawMenuBar(void);\nOSErr \nGetMenuItemModifiers(\n\t\t\t\t\t MenuRef         inMenu,\n\t\t\t\t\t MenuItemIndex   inItem,\n\t\t\t\t\t UInt8 *         outModifiers);\nOSErr \nGetMenuItemHierarchicalID(\n\t\t\t\t\t\t  MenuRef         inMenu,\n\t\t\t\t\t\t  MenuItemIndex   inItem,\n\t\t\t\t\t\t  MenuID *        outHierID);\nStringPtr \nGetMenuTitle(\n\t\t\t MenuRef   menu,\n\t\t\t Str255    title);\nvoid \nSetMenuBar(MenuBarHandle mbar);\nUInt16 \nCountMenuItems(MenuRef theMenu);\nvoid \nGetItemCmd(\n\t\t   MenuRef          theMenu,\n\t\t   MenuItemIndex    item,\n\t\t   CharParameter *  cmdChar);\nMenuID \nGetMenuID(MenuRef menu);\nvoid \nInsertMenu(\n\t\t   MenuRef   theMenu,\n\t\t   MenuID    beforeID) ;\nvoid \nInsertFontResMenu(\n\t\t\t\t  MenuRef         theMenu,\n\t\t\t\t  MenuItemIndex   afterItem,\n\t\t\t\t  short           scriptFilter);\nvoid \nAppendMenu(\n\t\t   MenuRef            menu,\n\t\t   ConstStr255Param   data);\nOSErr \nGetMenuItemTextEncoding(\n\t\t\t\t\t\tMenuRef         inMenu,\n\t\t\t\t\t\tMenuItemIndex   inItem,\n\t\t\t\t\t\tTextEncoding *  outScriptID);\nvoid \nInvalMenuBar(void);\n\nvoid \nEnableMenuCommand(\n\t\t\t\t  MenuRef       inMenu,\n\t\t\t\t  MenuCommand   inCommandID);\n\nOSStatus \nCreateStandardWindowMenu(\n\t\t\t\t\t\t OptionBits   inOptions,\n\t\t\t\t\t\t MenuRef *    outMenu);\n\nvoid \nDisableMenuCommand(\n\t\t\t\t   MenuRef       inMenu,\n\t\t\t\t   MenuCommand   inCommandID);\n\nOSStatus \nDisposeMenuBar(MenuBarHandle inMbar);\n\nOSStatus \nGetIndMenuItemWithCommandID(\n\t\t\t\t\t\t\tMenuRef          inMenu,\n\t\t\t\t\t\t\tMenuCommand      inCommandID,\n\t\t\t\t\t\t\tUInt32           inItemIndex,\n\t\t\t\t\t\t\tMenuRef *        outMenu,           /* can be NULL */\n\t\t\t\t\t\t\tMenuItemIndex *  outIndex);\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/Mpeg3Plugin/changesetsForInMemoryBuffer/JMMMpegBuffer.1.cs",
    "content": "'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 20 January 2006 at 11:22:15 pm'!\rObject subclass: #MPEGFile\r\tinstanceVariableNames: 'pathToFile fileBits fileIndex endianness buffer '\r\tclassVariableNames: 'Registry '\r\tpoolDictionaries: ''\r\tcategory: 'Movies-Kernel'!\rObject subclass: #MPEGPlayer\r\tinstanceVariableNames: 'external form startTime clockBias frameRate lastDelay noSound sampleRate audioPlayerProcess videoPlayerProcess playerProcessPriority soundQueue timeCheck semaphoreForSound errorForSoundStart morph volume buffer isBuffer '\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Movies-Kernel'!\r\r!MPEGFile methodsFor: 'access' stamp: 'JMM 1/20/2006 18:12'!\rbuffer\r\t^buffer! !\r\r!MPEGFile methodsFor: 'access' stamp: 'JMM 1/20/2006 23:15'!\risBufferBased\r\t^(buffer == nil) not ! !\r\r!MPEGFile methodsFor: 'initialize-release' stamp: 'JMM 1/20/2006 18:11'!\ropenBuffer: aByteArray\r\tpathToFile := nil.\r\tbuffer _ aByteArray.\r\tfileBits := self primFileOpenABuffer: aByteArray size: aByteArray size.\r\tfileBits notNil ifTrue: \r\t\t[fileIndex := Smalltalk registerExternalObject: fileBits.\r\t\tself register.]\r\t! !\r\r!MPEGFile methodsFor: 'primitives' stamp: 'JMM 1/20/2006 17:52'!\rprimFileOpenABuffer: buffer size: aSize\r\t\"Open the file\"\r\t<primitive: 'primitiveMPEG3OpenABuffer' module: 'Mpeg3Plugin'>\r\tself primitiveFailed! !\r\r\r!MPEGFile class methodsFor: 'instance creation' stamp: 'JMM 1/20/2006 18:18'!\ropenBuffer: aBuffer \r\t^self new openBuffer: aBuffer! !\r\r!MPEGFile class methodsFor: 'instance creation' stamp: 'JMM 1/20/2006 23:05'!\ropenFileUseBuffer: aPath \r\t| bar bytes |\r\tbar _ StandardFileStream oldFileNamed: aPath.\r\tbar binary.\r\tbytes _ bar contents.\r\t^self new openBuffer: bytes! !\r\r\r!MPEGPlayer methodsFor: 'access' stamp: 'JMM 1/20/2006 18:10'!\rexternal\r\t[external hasVideo] on: Error do: \r\t\t[self isBuffer\r\t\t\tifTrue:\r\t\t\t[external := MPEGFile openBuffer: external buffer]\r\t\t\tifFalse: \r\t\t\t\t[(MPEGFile isFileValidMPEG: external fileName) \r\t\t\t\t\tifFalse: [^self error: 'Mpeg File is invalid'].\r\t\t\t\texternal := MPEGFile openFile: external fileName]].\r\t^external! !\r\r!MPEGPlayer methodsFor: 'access' stamp: 'JMM 1/20/2006 18:05'!\risBuffer\r\t^isBuffer == true! !\r\r!MPEGPlayer methodsFor: 'initialize-release' stamp: 'JMM 1/20/2006 18:17'!\rinitializeWithBuffer: aBuffer form: aForm\r\tisBuffer := true.\r\tbuffer := aBuffer.\r\tself initialize: aBuffer.\r\tself form: aForm.\r\t^self! !\r\r!MPEGPlayer methodsFor: 'initialize-release' stamp: 'JMM 1/20/2006 18:07'!\rinitializeWithBuffer: aBuffer morph: aMorphic\r\tisBuffer _ true.\r\tbuffer _ aBuffer.\r\tself initialize: aBuffer.\r\tself morph: aMorphic.\r\t^self! !\r\r!MPEGPlayer methodsFor: 'initialize-release' stamp: 'JMM 1/20/2006 18:54'!\rinitialize: aPath\r\r\tself halt.\r\tself isBuffer ifTrue: \r\t\t[external := MPEGFile openBuffer: buffer]\r\t ifFalse: \r\t\t[(MPEGFile isFileValidMPEG: aPath) ifFalse: [^nil].\r\t\texternal := MPEGFile openFile: aPath.].\r\tself playerProcessPriority: Processor userSchedulingPriority.\r\tself lastDelay: 10.\r\tvolume := 1.0.\r\terrorForSoundStart := 500.\r\tsemaphoreForSound := Semaphore new.\r\tself startTime: (Array new: self totalVideoStreams).\r\tself clockBias: (Array new: self totalVideoStreams withAll: 0).! !\r\r\r!MPEGPlayer class methodsFor: 'instance creation' stamp: 'JMM 1/20/2006 18:16'!\rplayBuffer: aBuffer onForm: aForm\r\t^self new initializeWithBuffer: aBuffer morph: aForm! !\r\r!MPEGPlayer class methodsFor: 'instance creation' stamp: 'JMM 1/20/2006 18:06'!\rplayBuffer: aBuffer onMorph: aMorph\r\t^self new initializeWithBuffer: aBuffer morph: aMorph! !\r\rObject subclass: #MPEGPlayer\r\tinstanceVariableNames: 'external form startTime clockBias frameRate lastDelay noSound sampleRate audioPlayerProcess videoPlayerProcess playerProcessPriority soundQueue timeCheck semaphoreForSound errorForSoundStart morph volume buffer isBuffer'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Movies-Kernel'!\rObject subclass: #MPEGFile\r\tinstanceVariableNames: 'pathToFile fileBits fileIndex endianness buffer'\r\tclassVariableNames: 'Registry'\r\tpoolDictionaries: ''\r\tcategory: 'Movies-Kernel'!\r"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/Mpeg3Plugin/changesetsForInMemoryBuffer/JMMMpegBufferTest.1.cs",
    "content": "'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 20 January 2006 at 11:22:22 pm'!\r\r!MPEGDisplayMorph methodsFor: 'accessing' stamp: 'JMM 1/20/2006 23:15'!\risThereAFile\r\tmpegFile isBufferBased ifTrue: [^true].\r\t^(FileStream isAFileNamed: mpegFile fileName)! !\r\r!MPEGDisplayMorph methodsFor: 'accessing' stamp: 'JMM 1/20/2006 23:15'!\rmoviePosition\r\t\"Answer a number between 0.0 and 1.0 indicating the current position within the movie.\"\r\r\tmpegFile ifNil: [^ 0.0].\r\tmpegFile fileHandle ifNil: [^ 0.0].\r\tself isThereAFile ifFalse: [^0.0].\r\tmpegFile hasVideo\r\t\tifTrue: [^ ((mpegFile videoGetFrame: 0) asFloat / (mpegFile videoFrames: 0)) min: 1.0].\r\tsoundTrack ifNotNil: [^ soundTrack soundPosition].\r\t^ 0.0\r! !\r\r!MPEGDisplayMorph methodsFor: 'accessing' stamp: 'JMM 1/20/2006 23:16'!\rtotalFrames\r\t\"Answer the total number of frames in this movie.\"\r\r\tmpegFile ifNil: [^ 0].\r\tmpegFile fileHandle ifNil: [^ 0].\r\tself isThereAFile ifFalse: [^ 0].\r\tmpegFile hasVideo ifFalse: [^ 0].\r\t^ mpegFile videoFrames: 0! !\r\r!MPEGDisplayMorph methodsFor: 'accessing' stamp: 'JMM 1/20/2006 23:16'!\rtotalSeconds\r\t\"Answer the total number of seconds in this movie.\"\r\r\tmpegFile ifNil: [^ 0].\r\tmpegFile fileHandle ifNil: [^ 0].\r\tself isThereAFile ifFalse: [^ 0].\r\tmpegFile hasVideo ifFalse: [^ 0].\r\t^ self totalFrames asFloat / (mpegFile videoFrameRate: 0)! !\r\r!MPEGDisplayMorph methodsFor: 'commands' stamp: 'JMM 1/20/2006 23:09'!\rstartPlaying\r\t\"Start playing the movie at the current position.\"\r\r\t| frameIndex |\r\tself stopPlaying.\r\tstopFrame := nil.\r\tself mpegFileIsOpen ifFalse: [^ self].\r\r\t (mpegFile fileName notNil) ifTrue:\r\t\t[(FileStream isAFileNamed: mpegFile fileName) ifFalse: [ | newFileResult newFileName |\r\t\tself inform: 'Path changed. Enter new one for: ', (FileDirectory localNameFor: mpegFile fileName).\r\t\tnewFileResult := StandardFileMenu oldFile.\r\t\tnewFileName := newFileResult directory fullNameFor: newFileResult name.\t\r\t\tmpegFile openFile: newFileName]].\r\t\r\tmpegFile hasAudio\r\t\tifTrue:\r\t\t\t[mpegFile hasVideo ifTrue:\r\t\t\t\t[\"set movie frame position from soundTrack position\"\r\t\t\t\tsoundTrack reset.  \"ensure file is open before positioning\"\r\t\t\t\tsoundTrack soundPosition: (mpegFile videoGetFrame: 0) asFloat / (mpegFile videoFrames: 0).\r\t\t\t\t\"now set frame index from the soundtrack position for best sync\"\r\t\t\t\tframeIndex := ((soundTrack millisecondsSinceStart * desiredFrameRate) // 1000).\r\t\t\t\tframeIndex := (frameIndex max: 0) min: ((mpegFile videoFrames: 0) - 3).\r\t\t\t\tmpegFile videoSetFrame: frameIndex stream: 0].\r\r\t\t\tSoundPlayer stopReverb.\r\t\t\tsoundTrack volume: volume.\r\t\t\tsoundTrack repeat: repeat.\r\t\t\tsoundTrack resumePlaying.\r\t\t\tstartFrame := startMSecs := 0]\r\t\tifFalse:\r\t\t\t[soundTrack := nil.\r\t\t\tstartFrame := mpegFile videoGetFrame: 0.\r\t\t\tstartMSecs := Time millisecondClockValue].\r\trunning := true! !\r\r!MPEGDisplayMorph methodsFor: 'file open/close' stamp: 'JMM 1/20/2006 23:02'!\ropenFileNamed: mpegFileName\r\t\"Try to open the MPEG file with the given name. Answer true if successful.\"\r\r\t| e |\r\tself closeFile.\r\t(FileDirectory default fileExists: mpegFileName)\r\t\tifFalse: [self inform: ('File not found: {1}' translated format: {mpegFileName}). ^ false].\r\r\t(MPEGFile isFileValidMPEG: mpegFileName)\r\t\tifTrue: [mpegFile := MPEGFile openFileUseBuffer: mpegFileName]\r\t\tifFalse: [\r\t\t\t(JPEGMovieFile isJPEGMovieFile: mpegFileName)\r\t\t\t\tifTrue: [mpegFile := JPEGMovieFile new openFileNamed: mpegFileName]\r\t\t\t\tifFalse: [self inform: ('Not an MPEG or JPEG movie file: {1}' translated format: {mpegFileName}). ^ false]].\r\tmpegFile fileHandle ifNil: [^ false].\r\r\t\"initialize soundTrack\"\r\tmpegFile hasAudio\r\t\tifTrue: [soundTrack := mpegFile audioPlayerForChannel: 1]\r\t\tifFalse: [soundTrack := nil].\r\r\tmpegFile hasVideo\r\t\tifTrue: [  \"set screen size and display first frame\"\r\t\t\tdesiredFrameRate := mpegFile videoFrameRate: 0.\r\t\t\tsoundTrack ifNotNil: [  \"compute frame rate from length of audio track\"\r\t\t\t\tdesiredFrameRate := (mpegFile videoFrames: 0) / soundTrack duration].\r\t\t\te := (mpegFile videoFrameWidth: 0)@(mpegFile videoFrameHeight: 0).\r\t\t\tframeBuffer := Form extent: e depth: (Display depth max: 16).\r\t\t\tsuper extent: e.\r\t\t\tself nextFrame]\r\t\tifFalse: [  \"hide screen for audio-only files\"\r\t\t\tsuper extent: 250@0].\r! !\r\r"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/Mpeg3Plugin/changesetsForInMemoryBuffer/JMMMpegPluginBuffer.1.cs",
    "content": "'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 20 January 2006 at 11:22:10 pm'!\r\r!Mpeg3Plugin methodsFor: 'primitives' stamp: 'JMM 1/20/2006 19:07'!\rprimitiveMPEG3CheckSig: path\r\t| result sz storage |\r\r\t\"int mpeg3_check_sig(char *path)\"\r\tself var: #storage declareC: 'char storage[1024] '.\r\tself primitive: 'primitiveMPEG3CheckSig'\r\t\tparameters: #(String).\r\tsz _ interpreterProxy byteSizeOf: path cPtrAsOop.\r\tself cCode: 'sqFilenameFromStringOpen(storage, path, sz)'.\r\tself cCode: 'result = mpeg3_check_sig(storage)'.\r\t^result asOop: Boolean\r! !\r\r!Mpeg3Plugin methodsFor: 'primitives' stamp: 'JMM 1/20/2006 18:38'!\rprimitiveMPEG3OpenABuffer: path size: size\r\t| mpeg3Oop index |\r\r\tself var: #index declareC: 'mpeg3_t ** index'.\r\tself primitive: 'primitiveMPEG3OpenABuffer'\r\t\tparameters: #(String SmallInteger).\r\tmpeg3Oop := interpreterProxy instantiateClass: interpreterProxy classByteArray\r\t\t\t\t\tindexableSize: 4.\t\r\tindex := self cCoerce: (interpreterProxy firstIndexableField: mpeg3Oop)\r\t\t\t\t\t\tto: 'mpeg3_t **'.\r\tself cCode: '*index = mpeg3_open(path,size); makeFileEntry(*index)'.\r\t^mpeg3Oop.\r! !\r\r!Mpeg3Plugin methodsFor: 'primitives' stamp: 'JMM 1/20/2006 19:11'!\rprimitiveMPEG3Open: path\r\t| mpeg3Oop index sz storage |\r\r\t\"mpeg3_t* mpeg3_open(char *path)\"\r\tself var: #index declareC: 'mpeg3_t ** index'.\r\tself var: #storage declareC: 'char storage[1024]'.\r\tself primitive: 'primitiveMPEG3Open'\r\t\tparameters: #(String).\r\tsz := interpreterProxy byteSizeOf: path cPtrAsOop.\r\tself cCode: 'sqFilenameFromStringOpen(storage, path, sz)'.\r\tmpeg3Oop := interpreterProxy instantiateClass: interpreterProxy classByteArray\r\t\t\t\t\tindexableSize: 4.\r\tindex := self cCoerce: (interpreterProxy firstIndexableField: mpeg3Oop)\r\t\t\t\t\t\tto: 'mpeg3_t **'.\r\tself cCode: '*index = mpeg3_open(storage,0); makeFileEntry(*index)'.\r\t^mpeg3Oop.\r! !\r\r"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/Mpeg3Plugin/sqMacFileBits.c",
    "content": "/*\n *  sqMacFileBits.c\n *  mpeglibAudioVideo\n *\n *  Created by John M McIntosh on 15/02/06.\n *  Copyright 2006 __MyCompanyName__. All rights reserved.\n *\n */\n\n#include \"sqMacFileBits.h\"\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/Mpeg3Plugin/sqMacFileBits.h",
    "content": "/*\n *  macFileNameBits.c\n *  FT2Plugin support\n *\n *  Created by John M McIntosh on 21/11/05.\n * Feb 15th, 2006, use sqFilenameFromString\n *\n */\n#include \"sqVirtualMachine.h\" \n\nextern struct VirtualMachine * interpreterProxy;\n\nvoid\t\tsqFilenameFromStringOpen(char *buffer,long fileIndex, long fileLength, int flag) {\n\tinterpreterProxy->ioFilenamefromStringofLengthresolveAliases(buffer,fileIndex, fileLength, flag);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/SecurityPlugin/sqMacSecurity.c",
    "content": "//  John M McIntosh on 5/15/08.\n//  Copyright Corporate Smalltalk Consulting Ltd 2000-2008. All rights reserved.\n/*\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n*/\n//\n\n//JMM 2/13/01 create docs folder if non-existant\n//JMM 4/4/01  look for documents/My Squeak folder versus just documents as secure location\n//JMM 5/3/01  path was wrong for unsecure folder which uncovered a bug in lookupPath\n//JMM 8/15/01 only allow call to ioInitSecurity Once, also return  proper return code\n//JMM 9/5/01  make it as a plugin\n// 3.7.0bx Nov 24th, 2003 JMM gCurrentVMEncoding\n//May 16th, 2008. IPhone\n\n#include \"sq.h\"\n#include \"SecurityPlugin.h\"\n#include \"FilePlugin.h\"\n#include <limits.h>\ntypedef unsigned char                   Boolean;\n#define DELIMITERInt '/'\n\nextern struct VirtualMachine * interpreterProxy;\n\n#define fromSqueak(string,length) string\nvoid fixPath(char *path);\nsqInt dir_CreateSecurity(char *pathString, sqInt pathStringLength);\nsqInt _ioSetFileAccess(sqInt enable);\n\nstatic char secureUserDirectory[PATH_MAX];\nstatic char untrustedUserDirectory[PATH_MAX];\nstatic Boolean gInitialized = false;\n\n/***************************************************************************/\n/***************************************************************************/\n/***************************************************************************/\n/***************************************************************************/\n/* file security */\nstatic sqInt allowFileAccess = 1;  /* full access to files */\n\nstatic sqInt isAccessiblePathName(char *pathName) {\n  sqInt i;\n  /* Check if the path/file name is subdirectory of the image path */\n  for(i=0; i<strlen(untrustedUserDirectory)-1; i++)\n    if(untrustedUserDirectory[i] != pathName[i]) return 0;\n  /* special check for the trusted directory */\n  if(pathName[i] == 0) return 1; /* allow access to trusted directory */\n  /* check last character in image path (e.g., backslash) */\n  if(untrustedUserDirectory[i] != pathName[i]) return 0;\n\nreturn 1;\n}\n\nstatic sqInt isAccessibleFileName(char *fileName) {\n  sqInt i;\n  /* Check if the path/file name is subdirectory of the image path */\n  for(i=0; i<strlen(untrustedUserDirectory); i++)\n    if(untrustedUserDirectory[i] != fileName[i]) return 0;\n  return 1;\n}\n\n/* directory access */\nsqInt ioCanCreatePathOfSize(char* pathString, sqInt pathStringLength) {\n#pragma unused(pathStringLength)\n  if(allowFileAccess) return 1;\n  return isAccessiblePathName(fromSqueak(pathString, pathStringLength));\n}\n\nsqInt ioCanListPathOfSize(char* pathString, sqInt pathStringLength) {\n#pragma unused(pathStringLength)\n  if(allowFileAccess) return 1;\n  return isAccessiblePathName(fromSqueak(pathString, pathStringLength));\n}\n\nsqInt ioCanDeletePathOfSize(char* pathString, sqInt pathStringLength) {\n#pragma unused(pathStringLength)\n  if(allowFileAccess) return 1;\n  return isAccessiblePathName(fromSqueak(pathString, pathStringLength));\n}\n\n/* file access */\nsqInt ioCanOpenFileOfSizeWritable(char* pathString, sqInt pathStringLength, sqInt writeFlag) {\n#pragma unused(pathStringLength,writeFlag)\n  if(allowFileAccess) return 1;\n  return isAccessibleFileName(fromSqueak(pathString, pathStringLength));\n}\n\nsqInt ioCanOpenAsyncFileOfSizeWritable(char* pathString, sqInt pathStringLength, sqInt writeFlag) {\n  return ioCanOpenFileOfSizeWritable(pathString,pathStringLength,writeFlag);\n}\nsqInt ioCanDeleteFileOfSize(char* pathString, sqInt pathStringLength) {\n#pragma unused(pathStringLength)\n  if(allowFileAccess) return 1;\n  return isAccessibleFileName(fromSqueak(pathString, pathStringLength));\n}\n\nsqInt ioCanRenameFileOfSize(char* pathString, sqInt pathStringLength) {\n#pragma unused(pathStringLength)\n  if(allowFileAccess) return 1;\n  return isAccessibleFileName(fromSqueak(pathString, pathStringLength));\n}\n\n\nsqInt ioCanGetFileTypeOfSize(char* pathString, sqInt pathStringLength) {\n#pragma unused(pathString,pathStringLength)\n  return 1; /* of no importance here */\n}\n\nsqInt ioCanSetFileTypeOfSize(char* pathString, sqInt pathStringLength) {\n#pragma unused(pathString,pathStringLength)\n  return 1; /* of no importance here */\n}\n\n/* disabling/querying */\nsqInt ioDisableFileAccess(void) {\n  allowFileAccess = 0;\n return 0;\n}\n\nsqInt ioHasFileAccess(void) {\n  return allowFileAccess;\n}\n\n/***************************************************************************/\n/***************************************************************************/\n/***************************************************************************/\n/***************************************************************************/\n/* image security */\n\nstatic sqInt allowImageWrite = 1;  /* allow writing the image */\n\nsqInt ioCanRenameImage(void) {\n  return allowImageWrite; /* only when we're allowed to save the image */\n}\n\nsqInt ioCanWriteImage() {\n  return allowImageWrite;\n}\n\nsqInt ioDisableImageWrite() {\n  allowImageWrite = 0;\n\treturn 0;\n}\n\n\n/***************************************************************************/\n/***************************************************************************/\n/***************************************************************************/\n/***************************************************************************/\n/* socket security - for now it's all or nothing */\nstatic sqInt allowSocketAccess = 1; /* allow access to sockets */\n\nsqInt ioCanCreateSocketOfType(sqInt netType, sqInt socketType) {\n#pragma unused(netType,socketType)\n  return allowSocketAccess;\n}\n\nsqInt ioCanConnectToPort(sqInt netAddr, sqInt port) {\n#pragma unused(netAddr,port)\n  return allowSocketAccess;\n}\n\nsqInt ioCanListenOnPort(sqInt  s, sqInt port) {\n#pragma unused(s,port)\n  return allowSocketAccess;\n}\n\nsqInt ioDisableSocketAccess() {\n  allowSocketAccess = 0;\n\treturn 0;\n}\n\nsqInt ioHasSocketAccess() {\n  return allowSocketAccess;\n}\n\n/***************************************************************************/\n/***************************************************************************/\n/***************************************************************************/\n/***************************************************************************/\n/* SecurityPlugin primitive support */\n\n\nchar *ioGetSecureUserDirectory(void) {\n  return  secureUserDirectory;\n}\n\nchar *ioGetUntrustedUserDirectory(void) {\n  return untrustedUserDirectory;\n}\n\n/* note: following is called from VM directly, not from plugin */\nsqInt ioInitSecurity(void) {\n  extern char gSqueakUntrustedDirectoryName[],gSqueakTrustedDirectoryName[];\n  \n  if (gInitialized) return 1;\n  gInitialized  = true;\n\n  secureUserDirectory[0] = 0x00;\n  strlcpy(secureUserDirectory, gSqueakTrustedDirectoryName,PATH_MAX);\n  untrustedUserDirectory[0] = 0x00;\n  strlcpy(untrustedUserDirectory, gSqueakUntrustedDirectoryName,PATH_MAX);\n  return 1;\n}\n\n/***************************************************************************/\n/***************************************************************************/\n/***************************************************************************/\n/***************************************************************************/\n/* private entries for restoring rights */\nsqInt _ioSetImageWrite(sqInt enable);\n\nsqInt _ioSetImageWrite(sqInt enable) {\n  if(enable == allowImageWrite) return 1;\n  allowImageWrite = enable;\n  return 1;\n}\n\nsqInt _ioSetFileAccess(sqInt enable);\n\nsqInt _ioSetFileAccess(sqInt enable) {\n  if(enable == allowFileAccess) return 1;\n  allowFileAccess = enable;\n  return 1;\n}\n\nsqInt _ioSetSocketAccess(sqInt enable);\n\nsqInt _ioSetSocketAccess(sqInt enable) {\n  if(enable == allowSocketAccess) return 1;\n  allowSocketAccess = enable;\n  return 1;\n}\n\n\nvoid fixPath(char *path) {\n    long i;\n    for(i=strlen(path);i>0;i--) \n        if(path[i-1]==DELIMITERInt) {\n            path[i-1]=0x00;\n            return;\n        }\n}\n\nsqInt dir_CreateSecurity(char *pathString, sqInt pathStringLength) {\n\t/* Create a new directory with the given path. By default, this\n\t   directory is created in the current directory. Use\n\t   a full path name such as \"MyDisk:Working:New Folder\" to\n\t   create folders elsewhere. */\n\n    //JMM tests create file in Vm directory, other place, other volume\n\treturn (sqInt) dir_Create(pathString, pathStringLength);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/SerialPlugin/sqMacSerialPort.c",
    "content": "/****************************************************************************\n*   PROJECT: Squeak Headers\n*   FILE:    sqMacSerialPort.c\n*   CONTENT: \n*\n*   AUTHOR:  John Maloney, John McIntosh, and others.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   $Id: sqMacSerialPort.c 1708 2007-06-10 00:40:04Z johnmci $\n*\n*   NOTES: \n*  Feb 22nd, 2002, JMM enable 16 ports for serial, versus four, which was capped at 2?\n****************************************************************************/\n#include \"sq.h\"\n#include \"SerialPlugin.h\"\n#include <Carbon/Carbon.h>\n\nextern struct VirtualMachine *interpreterProxy;\n\n/*** Constants ***/\n#define INPUT_BUF_SIZE 1000\n\n/*** Serial Ports ***/\n#define MAX_PORTS 16\nstatic short outRefNum[MAX_PORTS] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};\n\n/*** Private Functions ***/\nint setHandshakeOptions(int portNum, int inFlowCtrl, int outFlowCtrl, int xOnChar, int xOffChar);\nint serialPortSetControl(int portNum,int control, char *data);\nint serialPortIsOpen(int portNum);\nint serialPortNames(int portNum, char *portName, char *inName, char *outName);\n\n/* initialize/shutdown */\nint serialPortInit() { return true; }\nint serialPortShutdown() {\n    int i;\n    for(i=0;i<MAX_PORTS;i++) {\n        if (serialPortIsOpen(i))\n            serialPortClose(i);\n    }\n\treturn 1;\n}\n\nEXPORT (int) serialPortCount(void) {\n  /* Return the number of serial ports available on this machine */\n    return false;\n\n }\n\nint serialPortIsOpen(int portNum) {\n\tif ((portNum < 0) || (portNum >= MAX_PORTS)) return false;\n\treturn outRefNum[portNum] != 0;\n}\n\nint serialPortSetControl(int portNum,int control, char *data) {\n#pragma unused(portNum,control,data)\n    return -1;\n}\n\nint serialPortNames(int portNum, char *portName, char *inName, char *outName) {\n/* Fill in the user name and input and output port names for the given\n   port number. Note that ports are numbered starting with zero. */\n#pragma unused(portNum,portName,inName,outName)\n\n    return false;\n }\n\nint setHandshakeOptions(\n  int portNum, int inFlowCtrl, int outFlowCtrl, int xOnChar, int xOffChar) {\n/* Set the given port's handshaking parameters. */\n#pragma unused(portNum,inFlowCtrl,outFlowCtrl,xOnChar,xOffChar)\n    return false;\n}\n/*** Serial Port Functions ***/\n\nEXPORT (int) serialPortClose(int portNum) {\n#pragma unused(portNum)\n    return false;\n}\n\nEXPORT (int) serialPortOpen(\n  int portNum, int baudRate, int stopBitsType, int parityType, int dataBits,\n  int inFlowCtrl, int outFlowCtrl, int xOnChar, int xOffChar) {\n/* Open the given serial port using the given settings. The baud rate can be\n   any number between about 224 and 57600; the driver will pick a clock\n   divisor that will generate the closest available baud rate. */\n#pragma unused(portNum,baudRate,stopBitsType,parityType,dataBits,inFlowCtrl,outFlowCtrl,xOnChar,xOffChar)\n    return false;\n}\n\nEXPORT (int) serialPortReadInto(int portNum, int count, int bufferPtr) {\n/* Read up to count bytes from the given serial port into the given byte array.\n   Read only up to the number of bytes in the port's input buffer; if fewer bytes\n   than count have been received, do not wait for additional data to arrive.\n   Return zero if no data is available. */\n#pragma unused(portNum,count,bufferPtr)\n    return false;\n}\n\nEXPORT (int) serialPortWriteFrom(int portNum, int count, int bufferPtr) {\n/* Write count bytes from the given byte array to the given serial port's\n   output buffer. Return the number of bytes written. This implementation is\n   synchronous: it doesn't return until the data has been sent. However, other\n   implementations may return before transmission is complete. */\n\n\tlong int byteCount = count;\n\tint osErr;\n\n\tif (!serialPortIsOpen(portNum)) {\n\t\treturn interpreterProxy->success(false);\n\t}\n\n\tosErr = FSWrite(outRefNum[portNum], &byteCount, (char *) bufferPtr);\n\tif (osErr != noErr) {\n\t\treturn interpreterProxy->success(false);\n\t}\n\treturn byteCount;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/SoundPlugin/sqSqueakSoundCoreAudio.h",
    "content": "//\n//  sqSqueakSoundCoreAudio.h\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 11/10/08.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n#import \"sq.h\"\n#import \"Queue.h\"\n\n#import <AudioToolbox/AudioToolbox.h>\n\nstatic const int kNumberOfBuffers=4;\n\n@interface sqSqueakSoundCoreAudio : NSObject {\n\tAudioQueueRef\tinputAudioQueue;\n\tsqInt\t\t\tsemaIndexForInput;\n\tUInt32\t\t\tbufferSizeForInput;\n\tsqInt\t\t\tinputIsRunning;\n\tdouble\t\t\tinputSampleRate;\n\tsqInt\t\t\tinputChannels;\n\tAudioStreamBasicDescription *inputFormat;\n\tAudioQueueBufferRef *inputBuffers;\n\tAudioQueueRef\toutputAudioQueue;\n\tQueue*\t\t\tsoundInQueue;\n\tsqInt\t\t\tsemaIndexForOutput;\n\tUInt32\t\t\tbufferSizeForOutput;\n\tBOOL\t\t\toutputIsRunning;\n\tAudioStreamBasicDescription *outputFormat;\n\tAudioQueueBufferRef *outputBuffers;\n\tQueue*\t\t\tsoundOutQueue;\n}\n- (sqInt)\tsoundInit;\n- (sqInt)\tsoundShutdown;\n- (sqInt)\tsnd_Start: (sqInt) frameCount samplesPerSec: (sqInt) samplesPerSec stereo: (sqInt) stereo semaIndex: (sqInt) semaIndex;\n- (sqInt)\tsnd_Stop;\n- (void)\tsnd_Stop_Force;\n- (sqInt)\tsnd_StopAndDispose;\n- (sqInt)\tsnd_PlaySilence;\n- (sqInt)\tsnd_AvailableSpace;\n- (sqInt)\tsnd_PlaySamplesFromAtLength: (sqInt) frameCount arrayIndex: (char *) arrayIndex startIndex: (usqInt) startIndex;\n- (sqInt)\tsnd_InsertSamplesFromLeadTime: (sqInt) frameCount srcBufPtr: (char*) srcBufPtr samplesOfLeadTime: (sqInt) samplesOfLeadTime;\n- (sqInt)\tsnd_StartRecording: (sqInt) desiredSamplesPerSec stereo: (sqInt) stereo semaIndex: (sqInt) semaIndex;\n- (sqInt)\tsnd_RecordSamplesIntoAtLength: (char*) arrayIndex startSliceIndex: (usqInt) startSliceIndex bufferSizeInBytes: (usqInt) bufferSizeInBytes;\n- (sqInt)\tsnd_StopRecording;\n- (double)\tsnd_GetRecordingSampleRate;\n\n@property (nonatomic) AudioQueueRef\toutputAudioQueue;\n@property (nonatomic) AudioQueueRef\tinputAudioQueue;\n@property (nonatomic) sqInt\tsemaIndexForOutput;\n@property (nonatomic) UInt32 bufferSizeForOutput;\n@property (nonatomic) sqInt\tsemaIndexForInput;\n@property (nonatomic) UInt32 bufferSizeForInput;\n@property (nonatomic) sqInt inputChannels;\n@property (nonatomic) sqInt inputIsRunning;\n@property (nonatomic) BOOL outputIsRunning;\n@property (nonatomic) double inputSampleRate;\n@property (nonatomic) AudioStreamBasicDescription* outputFormat;\n@property (nonatomic) AudioStreamBasicDescription* inputFormat;\n@property (nonatomic) AudioQueueBufferRef * outputBuffers;\n@property (nonatomic) AudioQueueBufferRef * inputBuffers;\n@property (nonatomic,retain) Queue* soundOutQueue;\n@property (nonatomic,retain) Queue* soundInQueue;\n@end\n\n@interface soundAtom : NSObject {\n\tchar\t*data; \n\tusqInt\tbyteCount;\n\tusqInt\tstartOffset;\n}\n- (id) initWith: (char*) buffer count: (usqInt) bytes;\n\n@property (nonatomic,assign) char *\tdata;\n@property (nonatomic,assign) usqInt byteCount;\n@property (nonatomic,assign) usqInt startOffset;\n@end\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/SoundPlugin/sqSqueakSoundCoreAudio.m",
    "content": "//\n//  sqSqueakSoundCoreAudio.m\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 11/10/08.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n#import \"sqSqueakSoundCoreAudio.h\"\n\n#define SqueakFrameSize\t4\t// guaranteed (see class SoundPlayer)\nextern struct VirtualMachine* interpreterProxy;\n\nvoid MyAudioQueueOutputCallback (void *inUserData,\nAudioQueueRef        inAQ,\n\t\t\t\t\t\t\t\t AudioQueueBufferRef  inBuffer);\n\nvoid MyAudioQueueOutputCallback (void *inUserData,\n\t\t\t\t\t\t\t\t AudioQueueRef        inAQ,\n\t\t\t\t\t\t\t\t AudioQueueBufferRef  inBuffer) {\n\t\n\tsqSqueakSoundCoreAudio * myInstance = ( sqSqueakSoundCoreAudio *)inUserData;\n\tsoundAtom\t*atom = [myInstance.soundOutQueue returnOldest];\n\t\n\tif (!atom) {\n\t\tinBuffer->mAudioDataByteSize   = MIN(inBuffer->mAudioDataBytesCapacity,2644);\n\t\tmemset(inBuffer->mAudioData,0,inBuffer->mAudioDataByteSize);\n//NSLog(@\"%i Fill sound buffer with zero %i bytes\",ioMSecs(),inBuffer->mAudioDataByteSize);\n\t} else {\n\t\tif (inBuffer->mAudioDataBytesCapacity >= atom.byteCount) {\n\t\t\tatom = [myInstance.soundOutQueue returnAndRemoveOldest];\n\t\t\tinBuffer->mAudioDataByteSize = (int) atom.byteCount;\n\t\t\tmemcpy(inBuffer->mAudioData,atom.data,atom.byteCount);\n\t\t\t[atom release];\n//NSLog(@\"%i Fill sound buffer with %i bytesA\",ioMSecs(),inBuffer->mAudioDataByteSize);\n\t\t} else {\n\t\t\tinBuffer->mAudioDataByteSize = (int) MIN(atom.byteCount - atom.startOffset,inBuffer->mAudioDataBytesCapacity);\n\t\t\tmemcpy(inBuffer->mAudioData,atom.data+atom.startOffset,inBuffer->mAudioDataByteSize);\n\t\t\tatom.startOffset = atom.startOffset + inBuffer->mAudioDataByteSize;\n\t\t\tif (atom.startOffset == atom.byteCount) {\n\t\t\t\tatom = [myInstance.soundOutQueue returnAndRemoveOldest]; //ignore now it's empty\n\t\t\t\t[atom release];\n\t\t\t}\n//NSLog(@\"%i Fill sound buffer with %i bytesB\",ioMSecs(),inBuffer->mAudioDataByteSize);\n\t\t}\n\t}\n\tAudioQueueEnqueueBuffer(inAQ,inBuffer,0,nil);\t\t\t\n\tinterpreterProxy->signalSemaphoreWithIndex(myInstance.semaIndexForOutput);\t\n\t\n}\nvoid\tMyAudioQueuePropertyListenerProc (  void *              inUserData,\n\t\t\t\t\t\t\t\t\t\t\tAudioQueueRef           inAQ,\n\t\t\t\t\t\t\t\t\t\t  AudioQueuePropertyID    inID);\n\nvoid\tMyAudioQueuePropertyListenerProc (  void *              inUserData,\n\t\t\t\t\t\t\t\t\t\t  AudioQueueRef           inAQ,\n\t\t\t\t\t\t\t\t\t\t  AudioQueuePropertyID    inID)\n{\n\tsqInt\tisRunning;\n\tUInt32 size = sizeof(isRunning);\n\tsqSqueakSoundCoreAudio * myInstance = ( sqSqueakSoundCoreAudio *)inUserData;\n\n\tAudioQueueGetProperty (inAQ, kAudioQueueProperty_IsRunning, &isRunning, &size);\n\tmyInstance.outputIsRunning = isRunning;\n\t//NSLog(@\"%i Is Running %i\",ioMSecs(),isRunning);\n\n}\n\nvoid MyAudioQueueInputCallback (\n\t\t\t\t\t\t\t\tvoid                                *inUserData,\n\t\t\t\t\t\t\t\tAudioQueueRef                       inAQ,\n\t\t\t\t\t\t\t\tAudioQueueBufferRef                 inBuffer,\n\t\t\t\t\t\t\t\tconst AudioTimeStamp                *inStartTime,\n\t\t\t\t\t\t\t\tUInt32                              inNumberPacketDescriptions,\n\t\t\t\t\t\t\t\tconst AudioStreamPacketDescription  *inPacketDescs);\n\nvoid MyAudioQueueInputCallback (\n\t\t\t\t\t\t\t\tvoid                                *inUserData,\n\t\t\t\t\t\t\t\tAudioQueueRef                       inAQ,\n\t\t\t\t\t\t\t\tAudioQueueBufferRef                 inBuffer,\n\t\t\t\t\t\t\t\tconst AudioTimeStamp                *inStartTime,\n\t\t\t\t\t\t\t\tUInt32                              inNumberPacketDescriptions,\n\t\t\t\t\t\t\t\tconst AudioStreamPacketDescription  *inPacketDescs) {\n\t\n\tsqSqueakSoundCoreAudio * myInstance = ( sqSqueakSoundCoreAudio *)inUserData;\n\t\n\tif (!myInstance.inputIsRunning) \n\t\treturn;\n\t\n\tif (inNumberPacketDescriptions > 0) {\n\t\tsoundAtom *atom = [[soundAtom alloc] initWith: inBuffer->mAudioData count: inBuffer->mAudioDataByteSize];\n\t\t[myInstance.soundInQueue addItem: atom];\n\t\t[atom release];\n    }\n\t\n\tAudioQueueEnqueueBuffer (inAQ,\n\t\t\t\t\t\t\t\t inBuffer,\n\t\t\t\t\t\t\t\t 0,\n\t\t\t\t\t\t\t\t NULL\n\t\t\t\t\t\t\t\t );\n\tinterpreterProxy->signalSemaphoreWithIndex(myInstance.semaIndexForInput);\t\n }\n\n\n@implementation soundAtom\n@synthesize\tdata; \n@synthesize\tbyteCount;\n@synthesize\tstartOffset;\n\n- initWith: (char*) buffer count: (usqInt) bytes {\n\tdata = malloc(bytes);\n\tmemcpy(data,buffer,bytes);\n\tbyteCount = bytes;\n\tstartOffset = 0;\n\treturn self;\n}\n\n- (void)dealloc {\n\tif (data) free(data);\n\tdata = 0;\n\tbyteCount = 0;\n\tstartOffset = 0;\n\t[super dealloc];\n}\n\n@end\n\n@implementation sqSqueakSoundCoreAudio\n@synthesize outputAudioQueue;\n@synthesize inputAudioQueue;\n@synthesize semaIndexForOutput;\n@synthesize bufferSizeForOutput;\n@synthesize semaIndexForInput;\n@synthesize bufferSizeForInput;\n@synthesize\tinputSampleRate;\n@synthesize outputFormat;\n@synthesize inputFormat;\n@synthesize outputIsRunning;\n@synthesize inputIsRunning;\n@synthesize soundOutQueue;\n@synthesize soundInQueue;\n@synthesize\toutputBuffers;\n@synthesize\tinputBuffers;\n@synthesize inputChannels;\n\n-\t(sqInt) soundInit {\n\t//NSLog(@\"%i sound init\",ioMSecs());\n\tself.outputAudioQueue = nil;\n\tself.inputAudioQueue = nil;\n\tself.semaIndexForOutput = 0;\n\tself.semaIndexForInput = 0;\n\tself.outputFormat = calloc(1,sizeof(AudioStreamBasicDescription));\n\tself.inputFormat = calloc(1,sizeof(AudioStreamBasicDescription));\n\tself.outputBuffers = calloc((unsigned)kNumberOfBuffers,sizeof(AudioQueueBufferRef));\n\tself.inputBuffers = calloc((unsigned) kNumberOfBuffers,sizeof(AudioQueueBufferRef));\n\tsoundOutQueue = [Queue new];\n\tsoundInQueue = [Queue new];\n\treturn 1;\n}\n\n- (sqInt) soundShutdown {\n\t//NSLog(@\"%i sound shutdown\",ioMSecs());\n\tif (self.outputAudioQueue) {\n\t\t[self snd_StopAndDispose];\n\t}\n\tif (self.inputAudioQueue) {\n\t\t[self snd_StopRecording];\n\t}\n\treturn 1;\n}\n\n- (sqInt)\tsnd_Start: (sqInt) frameCount samplesPerSec: (sqInt) samplesPerSec stereo: (sqInt) stereo semaIndex: (sqInt) semaIndex {\n\t//NSLog(@\"%i sound start playing frame count %i samples %i\",ioMSecs(),frameCount,samplesPerSec);\n\tOSStatus result;\n\tint nChannels= 1 + (int)stereo;\n\t\n\tif (frameCount <= 0 || samplesPerSec <= 0 || stereo < 0 || stereo > 1) \n\t\treturn interpreterProxy->primitiveFail();\n\n\tself.semaIndexForOutput = semaIndex;\n\tAudioStreamBasicDescription check;\n\tbzero(&check,sizeof(AudioStreamBasicDescription));\n\t\n\tcheck.mSampleRate = (Float64)samplesPerSec;\n\tcheck.mFormatID = kAudioFormatLinearPCM;\n\tcheck.mFormatFlags = kAudioFormatFlagsNativeEndian | kLinearPCMFormatFlagIsSignedInteger;\n\tcheck.mBytesPerPacket   = SqueakFrameSize / (3 - nChannels);\n\tcheck.mFramesPerPacket  = 1;\n\tcheck.mBytesPerFrame    = SqueakFrameSize / (3 - nChannels);\n\tcheck.mChannelsPerFrame = nChannels;\n\tcheck.mBitsPerChannel   = 16;\n\t\n\t/* we want to create a new audio queue only if we have to */\n\t\n\tif (self.outputAudioQueue == nil || (memcmp(&check,self.outputFormat,sizeof(AudioStreamBasicDescription) != 0))) {\t\n\t\tAudioQueueRef newQueue;\n\t\t//NSLog(@\"%i create new audioqueue\",ioMSecs());\n\t\tif (self.outputAudioQueue) \n\t\t\t[self snd_StopAndDispose];\n\t\t*self.outputFormat = check;\n\t\tresult =  AudioQueueNewOutput (self.outputFormat, &MyAudioQueueOutputCallback,\n\t\t\t\t\t\t\t\t   (void*) self,\n\t\t\t\t\t\t\t\t   NULL,\n\t\t\t\t\t\t\t\t   NULL,\n\t\t\t\t\t\t\t\t   0,\n\t\t\t\t\t\t\t\t   &newQueue);\n\t\n\t\tif (result) \n\t\t\treturn interpreterProxy->primitiveFail();\n\t\tself.outputAudioQueue = newQueue;\n\t\n\t\tAudioQueueAddPropertyListener (self.outputAudioQueue, kAudioQueueProperty_IsRunning, MyAudioQueuePropertyListenerProc, self);\n\t\n\t\tself.bufferSizeForOutput = (unsigned) (SqueakFrameSize * nChannels * frameCount * 2);\n\t\tint i;\n\t\tfor (i = 0; i < kNumberOfBuffers; ++i) {\n\t\t\tresult = AudioQueueAllocateBuffer(self.outputAudioQueue, self.bufferSizeForOutput/16, &self.outputBuffers[i]);\n\t\t\tif(result)\n\t\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t} else {\n\t\t//NSLog(@\"%i reuse audioqueue\",ioMSecs());\n\t}\n\t\t\n\treturn 1;\n}\n\n- (sqInt)\tsnd_Stop {\n\tif (!self.outputIsRunning)\n\t\treturn 1;\n\t//NSLog(@\"%i sound stop\",ioMSecs());\n\tself.outputIsRunning = NO;\n\tif (!self.outputAudioQueue) \n\t\treturn 0;\n\tOSStatus result = AudioQueueStop (self.outputAudioQueue,true);  //This implicitly invokes AudioQueueReset\n\tif (result) \n\t\treturn 0;\n\treturn 1;\n}\n\n- (void) snd_Stop_Force {\n\tif (!self.outputAudioQueue) \n\t\treturn;\n\t//NSLog(@\"%i sound stop force\",ioMSecs());\n\tOSStatus result = AudioQueueStop (self.outputAudioQueue,true);  //This implicitly invokes AudioQueueReset\n#pragma unused(result)\n}\n\n\n- (sqInt)\tsnd_StopAndDispose {\n\t//NSLog(@\"%i sound stopAndDispose\",ioMSecs());\n\tif (!self.outputAudioQueue) \n\t\treturn 0;\n\t\n\t[self snd_Stop];\n\tOSStatus result  = AudioQueueDispose (self.outputAudioQueue,true);\n#pragma unused(result)\n\tself.outputAudioQueue = nil;\n\tself.soundOutQueue = [Queue new];\n\treturn 1;\n}\n\n- (sqInt)\tsnd_PlaySilence {\n\t//NSLog(@\"%i sound play silence\",ioMSecs());\n\tinterpreterProxy->success(false);\n\treturn 8192;\n\t\n}\n\n- (sqInt)\tsnd_AvailableSpace {\n\tif (!self.outputAudioQueue) return interpreterProxy->primitiveFail();\n\tif ([self.soundOutQueue pendingElements] > 2) return 0;\n\treturn self.bufferSizeForOutput;\n}\n\n- (sqInt)\tsnd_PlaySamplesFromAtLength: (sqInt) frameCount arrayIndex: (char *) arrayIndex startIndex: (usqInt) startIndex {\n\tOSStatus result;\n\tusqInt byteCount= frameCount * SqueakFrameSize;\n\t\n\tif (!self.outputAudioQueue) \n\t\treturn interpreterProxy->primitiveFail();\n\tif (frameCount <= 0 || startIndex > byteCount) \n\t\treturn interpreterProxy->primitiveFail();\n\t//NSLog(@\"%i sound place samples on queue frames %i startIndex %i count %i\",ioMSecs(),frameCount,startIndex,byteCount-startIndex);\n\t\t\n\tsoundAtom *atom = [[soundAtom alloc] initWith: arrayIndex+startIndex count: (unsigned) (byteCount-startIndex)];\n\t[self.soundOutQueue addItem: atom];\n\t[atom release];\n\t\n\tif (!self.outputIsRunning) {\n\t\tint i;\n\t\tfor (i = 0; i < kNumberOfBuffers; ++i) {\n\t\t\tMyAudioQueueOutputCallback (self,self.outputAudioQueue,self.outputBuffers[i]);\n\t\t}\n\t\tUInt32 outNumberOfFramesPrepared;\n\t\tAudioQueuePrime(self.outputAudioQueue,0,&outNumberOfFramesPrepared);\n\t\tresult =  AudioQueueStart (self.outputAudioQueue,NULL);\n\t\t//Force it as running\n\t\tself.outputIsRunning = YES;\n\t}\n\treturn 1;\n}\n\n- (sqInt)\tsnd_InsertSamplesFromLeadTime: (sqInt) frameCount srcBufPtr: (char*) srcBufPtr samplesOfLeadTime: (sqInt) samplesOfLeadTime {\n\t//NOT IMPLEMEMENTED \n\treturn 0;\n}\n\n- (sqInt)\tsnd_StartRecording: (sqInt) desiredSamplesPerSec stereo: (sqInt) stereo semaIndex: (sqInt) semaIndex {\n\t\n\tif (desiredSamplesPerSec <= 0 || stereo < 0 || stereo > 1) \n\t\treturn interpreterProxy->primitiveFail();\n\n\tif (self.inputAudioQueue) {\n\t\t[self snd_StopRecording];\n\t}\n\t\n\tself.semaIndexForInput = semaIndex;\n\tself.inputSampleRate = (float) desiredSamplesPerSec;\n\tsqInt frameCount = 5288 * desiredSamplesPerSec / 44100;\n\tself.inputChannels = 1 + stereo;\n\tself.inputFormat->mSampleRate = (Float64)desiredSamplesPerSec;\n\tself.inputFormat->mFormatID = kAudioFormatLinearPCM;\n\tself.inputFormat->mFormatFlags = kAudioFormatFlagsNativeEndian | kLinearPCMFormatFlagIsSignedInteger \n\t\t| kAudioFormatFlagIsPacked ;\n\t\n\tself.inputFormat->mBytesPerPacket   = (int) SqueakFrameSize / (3 - (int)self.inputChannels);\n\tself.inputFormat->mFramesPerPacket  = 1;\n\tself.inputFormat->mBytesPerFrame    =(int)  SqueakFrameSize / (3 - (int)self.inputChannels);\n\tself.inputFormat->mChannelsPerFrame =(int) self.inputChannels;\n\tself.inputFormat->mBitsPerChannel   = 16;\n\t\n\tself.bufferSizeForInput = (unsigned) (SqueakFrameSize * self.inputChannels * frameCount * 2/4);   \n\t//Currently squeak does this thing where it stops yet leaves data in queue, this causes us to lose dota if the buffer is too big\n\n\tAudioQueueRef newQueue;\n\t\n\tOSStatus result =  AudioQueueNewInput (self.inputFormat, &MyAudioQueueInputCallback,\n\t\t\t\t\t\t\t\t   (void*) self,\n\t\t\t\t\t\t\t\t   NULL,\n\t\t\t\t\t\t\t\t   NULL,\n\t\t\t\t\t\t\t\t   0,\n\t\t\t\t\t\t\t\t   &newQueue);\n\t\n\tif (result) \n\t\treturn interpreterProxy->primitiveFail();\n\n\tself.inputAudioQueue = newQueue;\n\n\tint i;\n\tfor (i = 0; i < kNumberOfBuffers; ++i) {\n\t\tresult = AudioQueueAllocateBuffer(self.inputAudioQueue, self.bufferSizeForInput, &self.inputBuffers[i]);\n\t\tif(result)\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\tresult = AudioQueueEnqueueBuffer(self.inputAudioQueue,self.inputBuffers[i],0,NULL);\t\t\t\n\t\tif(result) \n\t\t\treturn interpreterProxy->primitiveFail();\t\n\t}\n\tinputIsRunning = 1;\n\tresult =  AudioQueueStart (self.inputAudioQueue,NULL);\n\tif(result) \n\t\treturn interpreterProxy->primitiveFail();\t\n\treturn 1;\n}\n\n- (sqInt)\tsnd_StopRecording {\n\tif (!self.inputAudioQueue) \n\t\treturn 0;\n\tself.inputIsRunning = 0;\n\tOSStatus result = AudioQueueStop (self.inputAudioQueue,true);  //This implicitly invokes AudioQueueReset\n\tif (result) \n\t\treturn 0;\n\tresult = AudioQueueDispose (self.inputAudioQueue,true);\n\tself.inputAudioQueue = nil;\n\tself.soundInQueue = [Queue new];\n\treturn 1;\n}\n\n- (double) snd_GetRecordingSampleRate {\n\tif (!self.inputAudioQueue) \n\t\treturn interpreterProxy->primitiveFail();\n\n\treturn inputSampleRate;\n}\n\n- (sqInt)\tsnd_RecordSamplesIntoAtLength: (char*) arrayIndex startSliceIndex: (usqInt) startSliceIndex bufferSizeInBytes: (usqInt) bufferSizeInBytes {\n\t\n\tusqInt\tcount;\n\t\n\tif (!self.inputAudioQueue) \n\t\treturn interpreterProxy->primitiveFail();\n\tif (startSliceIndex > bufferSizeInBytes) \n\t\treturn interpreterProxy->primitiveFail();\n\n\tusqInt    start= startSliceIndex * SqueakFrameSize / 2;\n\tsoundAtom\t*atom = [self.soundInQueue returnOldest];\n\tif (atom == nil) \n\t\treturn 0;\n\tif (bufferSizeInBytes-start >= atom.byteCount && atom.startOffset == 0) {\n\t\tatom = [self.soundInQueue returnAndRemoveOldest];\n\t\tmemcpy(arrayIndex+start,atom.data,atom.byteCount);\n\t\tcount= MIN(atom.byteCount, bufferSizeInBytes - start);\n\t\t[atom release];\n\t\treturn count / (SqueakFrameSize / 2) / self.inputChannels;\n\t} else {\n\t\tcount= MIN(atom.byteCount-atom.startOffset, bufferSizeInBytes - start);\n\t\tmemcpy(arrayIndex+start,atom.data+atom.startOffset,count);\n\t\tatom.startOffset = atom.startOffset + (count);\n\t\tif (atom.startOffset == atom.byteCount) {\n\t\t\tatom = [self.soundInQueue returnAndRemoveOldest]; //ignore now it's empty\n\t\t\t[atom release];\n\t\t}\n\t\treturn count / (SqueakFrameSize / 2) / self.inputChannels;\n\t}\n\t\t\n}\n\n@end\n\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/SoundPlugin/sqSqueakSoundCoreAudioAPI.h",
    "content": "/*\n *  sqSqueakSoundCoreAudioAPI.h\n *  SqueakNoOGLIPhone\n *\n   Created by John M McIntosh on 11/10/08.\n  Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\nCopyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\nMIT License\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n*/\n#include \"sq.h\"\n#include \"SoundPlugin.h\""
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/SoundPlugin/sqSqueakSoundCoreAudioAPI.m",
    "content": "/*\n *  sqSqueakSoundCoreAudioAPI.c\n *  SqueakNoOGLIPhone\n *\n  Created by John M McIntosh on 11/10/08.\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\nCopyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\nMIT License\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n*/\n//\n\n#import \"sqSqueakSoundCoreAudioAPI.h\"\n#import \"sqSqueakAppDelegate.h\"\n\nextern sqSqueakAppDelegate *gDelegateApp;\n\nsqInt soundInit(void){\n\treturn [gDelegateApp.squeakApplication.soundInterfaceLogic soundInit];\n}\n\nsqInt soundShutdown(void){\n\treturn [gDelegateApp.squeakApplication.soundInterfaceLogic soundShutdown];\n}\n\n/* sound output */\nsqInt snd_AvailableSpace(void){\n\treturn [gDelegateApp.squeakApplication.soundInterfaceLogic snd_AvailableSpace];\n}\nsqInt snd_InsertSamplesFromLeadTime(sqInt frameCount, void * srcBufPtr, sqInt samplesOfLeadTime){\n\treturn [gDelegateApp.squeakApplication.soundInterfaceLogic snd_InsertSamplesFromLeadTime: frameCount srcBufPtr: (char *)srcBufPtr samplesOfLeadTime: samplesOfLeadTime];\n}\nsqInt snd_PlaySamplesFromAtLength(sqInt frameCount, void * arrayIndex, sqInt startIndex){\n\treturn [gDelegateApp.squeakApplication.soundInterfaceLogic snd_PlaySamplesFromAtLength: frameCount arrayIndex: (char*) arrayIndex startIndex: (usqInt) startIndex];\n}\nsqInt snd_PlaySilence(void){\n\treturn [gDelegateApp.squeakApplication.soundInterfaceLogic snd_PlaySilence];\n}\nsqInt snd_Start(sqInt frameCount, sqInt samplesPerSec, sqInt stereo, sqInt semaIndex){\n\treturn [gDelegateApp.squeakApplication.soundInterfaceLogic snd_Start: frameCount samplesPerSec: samplesPerSec stereo: stereo semaIndex: semaIndex];\n}\nsqInt snd_Stop(void){\n\treturn [gDelegateApp.squeakApplication.soundInterfaceLogic snd_Stop];\n}\n\n/* sound input */\nsqInt snd_SetRecordLevel(sqInt level) { return 0; }\n\nsqInt snd_StartRecording(sqInt desiredSamplesPerSec, sqInt stereo, sqInt semaIndex){\n\treturn [gDelegateApp.squeakApplication.soundInterfaceLogic snd_StartRecording:desiredSamplesPerSec stereo: stereo semaIndex: semaIndex ];\n}\nsqInt snd_StopRecording(void){\n\treturn [gDelegateApp.squeakApplication.soundInterfaceLogic snd_StopRecording];\n}\ndouble snd_GetRecordingSampleRate(void){\n\treturn [gDelegateApp.squeakApplication.soundInterfaceLogic snd_GetRecordingSampleRate];\n}\nsqInt snd_RecordSamplesIntoAtLength(void * buf, sqInt startSliceIndex, sqInt bufferSizeInBytes){\n\treturn [gDelegateApp.squeakApplication.soundInterfaceLogic snd_RecordSamplesIntoAtLength:(char *) buf startSliceIndex: (usqInt) startSliceIndex bufferSizeInBytes: (usqInt) bufferSizeInBytes];\n}\n\n\nvoid snd_Volume(double *left, double *right){} \nvoid snd_SetVolume(double left, double right){}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/SqueakFFIPrims/dummyFFI.c",
    "content": "\n//\n//  SqueakNoOGLIPhoneAppDelegate.m\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 5/15/08.\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\nCopyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\nMIT License\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n*/\n//\n#include \"dummyFFI.h\"\n#include \"sqFFI.h\"\n\nint ffiPushSignedByte(int value)\n{\nreturn 1;\n}\n\nint ffiPushUnsignedByte(int value)\n{\nreturn 1;\n}\n\nint ffiPushSignedShort(int value)\n{\n\nreturn 1;\n}\n\nint ffiPushUnsignedShort(int value)\n{\n\nreturn 1;\n}\n\nint ffiPushSignedInt(int value)\n{\n\nreturn 1;\n}\n\nint ffiPushUnsignedInt(int value)\n{\n\nreturn 1;\n}\n\n# define primitiveFail() 0\n\n\nint ffiPushSignedLongLong(int low, int high)\n{\nreturn primitiveFail();\n}\n\nint ffiPushUnsignedLongLong(int low, int high)\n{\nreturn primitiveFail();\n}\n\nint ffiPushSignedChar(int value)\n{\nreturn 1;\n}\n\nint ffiPushUnsignedChar(int value)\n{\nreturn 1;\n}\n\nint ffiPushBool(int value)\n{\nreturn 1;\n}\n\nint ffiPushSingleFloat(double value)\n{\nreturn 1;\n}\n\nint ffiPushDoubleFloat(double value)\n{\nreturn 1;\n}\n\n/*  ffiReturnFloatValue:\nReturn the value from a previous ffi call with float return type. */\ndouble ffiReturnFloatValue(void)\n{\nreturn 0;\n}\n\n/*  ffiLongLongResultLow:\nReturn the low 32bit from the 64bit result of a call to an external function */\nint ffiLongLongResultLow(void)\n{\nreturn 0;\n}\n\n\n/*  ffiLongLongResultHigh:\nReturn the high 32bit from the 64bit result of a call to an external function */\nint ffiLongLongResultHigh(void)\n{\nreturn 0;\n}\n\n/*  ffiStoreStructure:\nStore the structure result of a previous ffi call into the given address*/\nint ffiStoreStructure(int address, int structSize)\n{\nreturn 1;\n}\n\nint ffiCallAddressOfWithPointerReturn(int fn, int callType) \n{\n\treturn 0;\n}\nint ffiPushStringOfLength(int srcIndex, int length)\n{\n\treturn 0;\n}\n/*  ffiAlloc:\nAllocate space from the external heap */\nint ffiAlloc(int byteSize)\n{\n\treturn 0;\n}\n\n/*  ffiFree:\nFree space from the external heap */\nint ffiFree(int pointer)\n{\nreturn 1;\n}\n\nint ffiInitialize(void) {\n\treturn 1;\n}\n\nint ffiCallAddressOfWithStructReturn(int fn, int callType, \nint *structSpec, int specSize)\n{\n\treturn 0;\n}\n\nint ffiCallAddressOfWithReturnType(int fn, int callType, int typeSpec)\n{\nreturn 0;\n}\n\nint ffiCanReturn(int *structSpec, int specSize) \n{\nreturn 0;\n}\n\n/*  ffiCleanup:\n Cleanup after a foreign function call has completed.\n The generic support code only frees the temporarily\n allocated strings. */\nint ffiCleanup(void)\n{\n\treturn 0;\n}\n\n/*  ffiSupportsCallingConvention:\n Return true if the support code supports the given calling convention */\nint ffiSupportsCallingConvention(int callType)\n{\n\treturn 0;\n}\n\nint ffiPushStructureOfLength(int pointer, int* structSpec, int structSize)\n{\n\treturn 0;\n}\nint ffiPushPointer(int pointer)\n{\n\treturn 0;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/SqueakFFIPrims/dummyFFI.h",
    "content": "/*\n *  dummyFFI.h\n *  SqueakNoOGLIPhone\n *\n *  Created by John M McIntosh on 10/24/08.\n *\n */\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\nCopyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\nMIT License\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n*/"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/SqueakLocale/Info-SqueakLocalePlugin__Upgraded_.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>LocalePlugin</string>\n\t<key>CFBundleGetInfoString</key>\n\t<string>LocalePlugin for Squeak, Cocoa based</string>\n\t<key>CFBundleIconFile</key>\n\t<string>SqueakPlugin.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.LocalePlugin</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>LocalePlugin</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>2.1b1</string>\n\t<key>CFBundleSignature</key>\n\t<string>FAST</string>\n\t<key>CFBundleVersion</key>\n\t<string>3</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/SqueakLocale/SqueakLocale.xcodeproj/MAC.mode1v3",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>ActivePerspectiveName</key>\n\t<string>Project</string>\n\t<key>AllowedModules</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Groups and Files Outline View</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCTaskListModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Task List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDetailModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>File and Smart Group Detail Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Detailed Build Results Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Batch Find Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Format Conflicts List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXCVSModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Source Code Control Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Breakpoints Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDockableInspector</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Inspector</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXOpenQuicklyModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Open Quickly Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Console</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCSnapshotModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Snapshots Tool</string>\n\t\t</dict>\n\t</array>\n\t<key>BundlePath</key>\n\t<string>/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources</string>\n\t<key>Description</key>\n\t<string>DefaultDescriptionKey</string>\n\t<key>DockingSystemVisible</key>\n\t<false/>\n\t<key>Extension</key>\n\t<string>mode1v3</string>\n\t<key>FavBarConfig</key>\n\t<dict>\n\t\t<key>PBXProjectModuleGUID</key>\n\t\t<string>040F1CC512CD2220008BA0CB</string>\n\t\t<key>XCBarModuleItemNames</key>\n\t\t<dict/>\n\t\t<key>XCBarModuleItems</key>\n\t\t<array/>\n\t</dict>\n\t<key>FirstTimeWindowDisplayed</key>\n\t<false/>\n\t<key>Identifier</key>\n\t<string>com.apple.perspectives.project.mode1v3</string>\n\t<key>MajorVersion</key>\n\t<integer>33</integer>\n\t<key>MinorVersion</key>\n\t<integer>0</integer>\n\t<key>Name</key>\n\t<string>Default</string>\n\t<key>Notifications</key>\n\t<array/>\n\t<key>OpenEditors</key>\n\t<array/>\n\t<key>PerspectiveWidths</key>\n\t<array>\n\t\t<integer>-1</integer>\n\t\t<integer>-1</integer>\n\t</array>\n\t<key>Perspectives</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>ChosenToolbarItems</key>\n\t\t\t<array>\n\t\t\t\t<string>active-combo-popup</string>\n\t\t\t\t<string>action</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>debugger-enable-breakpoints</string>\n\t\t\t\t<string>build-and-go</string>\n\t\t\t\t<string>com.apple.ide.PBXToolbarStopButton</string>\n\t\t\t\t<string>get-info</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>com.apple.pbx.toolbar.searchfield</string>\n\t\t\t</array>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProjectWithEditor</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.project</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<true/>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>66DF6BFE01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>94E7F9191237565E00A03A11</string>\n\t\t\t\t\t\t\t\t<string>66B8BC570381F53800A8011A</string>\n\t\t\t\t\t\t\t\t<string>94E7F8371237541300A03A11</string>\n\t\t\t\t\t\t\t\t<string>66DF6BFF01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66DF6C3901D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66DF6C4501D7DEEE00A80119</string>\n\t\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>23</integer>\n\t\t\t\t\t\t\t\t\t<integer>22</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 65}, {186, 445}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 463}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>334 210 788 504 0 0 1280 778 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>203pt</string>\n\t\t\t\t</dict>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Cocoa.h</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CE0B20406471E060097A5F4</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>Cocoa.h</string>\n\t\t\t\t\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t\t\t\t\t<string>040F1DB112CD26E4008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F1CB812CD2220008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F1CB912CD2220008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F1CBA12CD2220008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F1CBB12CD2220008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F1CBC12CD2220008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F1CBD12CD2220008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F1CBE12CD2220008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F1CBF12CD2220008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F1CC012CD2220008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F1DAF12CD26E4008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F1DB012CD26E4008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {580, 269}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>334 210 788 504 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>269pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 274}, {580, 189}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>334 210 788 504 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>189pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>580pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>040F1DB312CD26E4008BA0CB</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>040F1DB412CD26E4008BA0CB</string>\n\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfigUserDefaultsMinorVersion</key>\n\t\t\t<string>2</string>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.defaultV3</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProject</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.morph</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>29B97314FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 337}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 355}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>373 269 690 397 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Morph</string>\n\t\t\t<key>PreferredWidth</key>\n\t\t\t<integer>300</integer>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default.shortV3</string>\n\t\t</dict>\n\t</array>\n\t<key>PerspectivesBarVisible</key>\n\t<false/>\n\t<key>ShelfIsVisible</key>\n\t<false/>\n\t<key>SourceDescription</key>\n\t<string>file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string>\n\t<key>StatusbarIsVisible</key>\n\t<true/>\n\t<key>TimeStamp</key>\n\t<real>0.0</real>\n\t<key>ToolbarConfigUserDefaultsMinorVersion</key>\n\t<string>2</string>\n\t<key>ToolbarDisplayMode</key>\n\t<integer>1</integer>\n\t<key>ToolbarIsVisible</key>\n\t<true/>\n\t<key>ToolbarSizeMode</key>\n\t<integer>1</integer>\n\t<key>Type</key>\n\t<string>Perspectives</string>\n\t<key>UpdateMessage</key>\n\t<string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the \"Metro-Morph\" feature).  You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature.  Do you wish to update to the latest Workspace defaults for project '%@'?</string>\n\t<key>WindowJustification</key>\n\t<integer>5</integer>\n\t<key>WindowOrderList</key>\n\t<array>\n\t\t<string>040F1CC612CD2220008BA0CB</string>\n\t\t<string>/Users/MAC/Desktop/Dev/VM/cog-osx/platforms/iOS/plugins/SqueakLocale/SqueakLocale.xcodeproj</string>\n\t</array>\n\t<key>WindowString</key>\n\t<string>334 210 788 504 0 0 1280 778 </string>\n\t<key>WindowToolsV3</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.build</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string></string>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {500, 218}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>355 191 500 500 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>218pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Build Results</string>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Collapse</key>\n\t\t\t\t\t\t\t\t<integer>1021</integer>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Open</key>\n\t\t\t\t\t\t\t\t<integer>1011</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 223}, {500, 236}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>355 191 500 500 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>236pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>459pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Build Results</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>040F1CC612CD2220008BA0CB</string>\n\t\t\t\t<string>040F1DB512CD26E4008BA0CB</string>\n\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.buildV3</string>\n\t\t\t<key>WindowContentMinSize</key>\n\t\t\t<string>486 300</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>355 191 500 500 0 0 1280 778 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>040F1CC612CD2220008BA0CB</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugger</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Debugger</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {317, 164}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{317, 0}, {377, 164}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {694, 164}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 164}, {694, 216}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debug - GLUTExamples (Underwater)</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>DebugConsoleDrawerSize</key>\n\t\t\t\t\t\t\t\t<string>{100, 120}</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleVisible</key>\n\t\t\t\t\t\t\t\t<string>None</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>DebugSTDIOWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {694, 380}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>321 238 694 422 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t\t<string>1C0AD2AB069F1E9B00FABCE6</string>\n\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t<string>1C0AD2AC069F1E9B00FABCE6</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>321 238 694 422 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.find</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t\t\t<string>1CD0528D0623707200166675</string>\n\t\t\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {781, 167}}</string>\n\t\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t\t<string>62 385 781 470 0 0 1440 878 </string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t\t\t<string>781pt</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>50%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Project Find</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{8, 0}, {773, 254}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>62 385 781 470 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>50%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>428pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Find</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t\t<string>1C530D58069F1CE1000CFCEE</string>\n\t\t\t\t<string>1C530D59069F1CE1000CFCEE</string>\n\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t<string>1C530D5A069F1CE1000CFCEE</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>62 385 781 470 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>MENUSEPARATOR</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debuggerConsole</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debugger Console</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {650, 250}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>516 632 650 250 0 0 1680 1027 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>209pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>209pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger Console</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t\t<string>1C78EAAE065D492600B07095</string>\n\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.consoleV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>650 41 650 250 0 0 1280 1002 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.snapshots</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCSnapshotModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Snapshots</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCSnapshotModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<string>Yes</string>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.snapshots</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>315 824 300 550 0 0 1440 878 </string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<string>Yes</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.scm</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1C78EAB3065D492600B07095</string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>0pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>SCM</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ConsoleFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 259}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 7}, {452, 259}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t\t<key>TableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>Status</string>\n\t\t\t\t\t\t\t\t\t<real>30</real>\n\t\t\t\t\t\t\t\t\t<string>FileName</string>\n\t\t\t\t\t\t\t\t\t<real>199</real>\n\t\t\t\t\t\t\t\t\t<string>Path</string>\n\t\t\t\t\t\t\t\t\t<real>197.0950012207031</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>TableFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 250}}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>262pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>266pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>SCM</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAB4065D492600B07095</string>\n\t\t\t\t<string>1C78EAB5065D492600B07095</string>\n\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.scm</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.breakpoints</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t\t\t<string>no</string>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {168, 350}}</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {185, 368}}</string>\n\t\t\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>185pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{190, 0}, {554, 368}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>554pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>368pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>MajorVersion</key>\n\t\t\t<integer>3</integer>\n\t\t\t<key>MinorVersion</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Name</key>\n\t\t\t<string>Breakpoints</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CDDB66807F98D9800BB5817</string>\n\t\t\t\t<string>1CDDB66907F98D9800BB5817</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.breakpointsV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CDDB66807F98D9800BB5817</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugAnimator</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Visualizer</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugAnimatorV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>100 100 700 500 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.bookmarks</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>538 42 401 187 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.projectFormatConflicts</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Format Conflicts</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowContentMinSize</key>\n\t\t\t<string>450 300</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>50 850 472 307 0 0 1440 877</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.classBrowser</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>OptionsSetName</key>\n\t\t\t\t\t\t\t\t<string>Hierarchy, all classes</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Class Browser - NSObject</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ClassesFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {374, 96}}</string>\n\t\t\t\t\t\t\t\t<key>ClassesTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXClassNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>208</real>\n\t\t\t\t\t\t\t\t\t<string>PBXClassBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {630, 331}}</string>\n\t\t\t\t\t\t\t\t<key>MembersFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 105}, {374, 395}}</string>\n\t\t\t\t\t\t\t\t<key>MembersTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeIconColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>216</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>97</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>332pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>332pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t\t<string>1C0AD2B0069F1E9B00FABCE6</string>\n\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.classbrowser</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.refactoring</string>\n\t\t\t<key>IncludeInToolsMenu</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{0, 0}, {500, 335}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{0, 0}, {500, 335}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCRefactoringModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Refactoring</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCRefactoringModule</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>200 200 500 356 0 0 1920 1200 </string>\n\t\t</dict>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/SqueakLocale/SqueakLocale.xcodeproj/MAC.pbxuser",
    "content": "// !$*UTF8*$!\n{\n\t040F1C9D12CD1FEF008BA0CB /* Source Control */ = {\n\t\tisa = PBXSourceControlManager;\n\t\tfallbackIsa = XCSourceControlManager;\n\t\tisSCMEnabled = 0;\n\t\tscmConfiguration = {\n\t\t\trepositoryNamesForRoots = {\n\t\t\t\t\"\" = \"\";\n\t\t\t};\n\t\t};\n\t};\n\t040F1C9E12CD1FEF008BA0CB /* Code sense */ = {\n\t\tisa = PBXCodeSenseManager;\n\t\tindexTemplatePath = \"\";\n\t};\n\t040F1CB812CD2220008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 66B8BC5C0381F66500A8011A /* sq.h */;\n\t\tname = \"sq.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 393;\n\t\tvrLoc = 0;\n\t};\n\t040F1CB912CD2220008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 66B8BC5E0381F69100A8011A /* sqVirtualMachine.h */;\n\t\tname = \"sqVirtualMachine.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 510;\n\t\tvrLoc = 0;\n\t};\n\t040F1CBA12CD2220008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94ABA8920858C40D00079BE1 /* sqMemoryAccess.h */;\n\t\tname = \"sqMemoryAccess.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 652;\n\t\tvrLoc = 0;\n\t};\n\t040F1CBB12CD2220008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94AF35000846F98600FA5ACB /* config.h */;\n\t\tname = \"config.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 904;\n\t\tvrLoc = 0;\n\t};\n\t040F1CBC12CD2220008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 66B8BC580381F61C00A8011A /* sqConfig.h */;\n\t\tname = \"sqConfig.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 302;\n\t\tvrLoc = 0;\n\t};\n\t040F1CBD12CD2220008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 66B8BC5A0381F63A00A8011A /* sqPlatformSpecific.h */;\n\t\tname = \"sqPlatformSpecific.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 870;\n\t\tvrLoc = 0;\n\t};\n\t040F1CBE12CD2220008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94ABA8900858C3F900079BE1 /* LocalePlugin.h */;\n\t\tname = \"LocalePlugin.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 522;\n\t\tvrLoc = 0;\n\t};\n\t040F1CBF12CD2220008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94ABA8870858C2CB00079BE1 /* LocalePlugin.c */;\n\t\tname = \"LocalePlugin.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 533;\n\t\tvrLoc = 0;\n\t};\n\t040F1CC012CD2220008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E7F6C5123740F900A03A11 /* sqMacLocaleCocoa.h */;\n\t\tname = \"sqMacLocaleCocoa.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 755;\n\t\tvrLoc = 0;\n\t};\n\t040F1DA112CD2673008BA0CB /* Cocoa.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tpath = Cocoa.h;\n\t\tsourceTree = \"<group>\";\n\t};\n\t040F1DAF12CD26E4008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E7F6C6123740F900A03A11 /* sqMacLocaleCocoa.m */;\n\t\tname = \"sqMacLocaleCocoa.m: 6\";\n\t\trLen = 0;\n\t\trLoc = 92;\n\t\trType = 0;\n\t\tvrLen = 754;\n\t\tvrLoc = 0;\n\t};\n\t040F1DB012CD26E4008BA0CB /* PBXBookmark */ = {\n\t\tisa = PBXBookmark;\n\t\tfRef = 040F1DA112CD2673008BA0CB /* Cocoa.h */;\n\t};\n\t040F1DB112CD26E4008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 040F1DB212CD26E4008BA0CB /* Cocoa.h */;\n\t\tname = \"Cocoa.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 485;\n\t\tvrLoc = 0;\n\t};\n\t040F1DB212CD26E4008BA0CB /* Cocoa.h */ = {\n\t\tisa = PBXFileReference;\n\t\tname = Cocoa.h;\n\t\tpath = /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h;\n\t\tsourceTree = \"<absolute>\";\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1370, 237}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 485}\";\n\t\t};\n\t};\n\t66B8BC580381F61C00A8011A /* sqConfig.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {519, 245}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 302}\";\n\t\t};\n\t};\n\t66B8BC5A0381F63A00A8011A /* sqPlatformSpecific.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {579, 2210}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 870}\";\n\t\t};\n\t};\n\t66B8BC5C0381F66500A8011A /* sq.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {551, 7254}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 393}\";\n\t\t};\n\t};\n\t66B8BC5E0381F69100A8011A /* sqVirtualMachine.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {519, 3952}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 510}\";\n\t\t};\n\t};\n\t66DF6BFD01D7DCEA00A80119 /* Project object */ = {\n\t\tactiveBuildConfigurationName = Development;\n\t\tactiveTarget = 94AF34E00846F91100FA5ACB /* SqueakLocalePlugin */;\n\t\tcodeSenseManager = 040F1C9E12CD1FEF008BA0CB /* Code sense */;\n\t\tperUserDictionary = {\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t341,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t\t20,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Target_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t301,\n\t\t\t\t\t60,\n\t\t\t\t\t20,\n\t\t\t\t\t48.16259765625,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXTargetDataSource_PrimaryAttribute,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXPerProjectTemplateStateSaveDate = 315434587;\n\t\t\tPBXWorkspaceStateSaveDate = 315434587;\n\t\t};\n\t\tperUserProjectItems = {\n\t\t\t040F1CB812CD2220008BA0CB /* PBXTextBookmark */ = 040F1CB812CD2220008BA0CB /* PBXTextBookmark */;\n\t\t\t040F1CB912CD2220008BA0CB /* PBXTextBookmark */ = 040F1CB912CD2220008BA0CB /* PBXTextBookmark */;\n\t\t\t040F1CBA12CD2220008BA0CB /* PBXTextBookmark */ = 040F1CBA12CD2220008BA0CB /* PBXTextBookmark */;\n\t\t\t040F1CBB12CD2220008BA0CB /* PBXTextBookmark */ = 040F1CBB12CD2220008BA0CB /* PBXTextBookmark */;\n\t\t\t040F1CBC12CD2220008BA0CB /* PBXTextBookmark */ = 040F1CBC12CD2220008BA0CB /* PBXTextBookmark */;\n\t\t\t040F1CBD12CD2220008BA0CB /* PBXTextBookmark */ = 040F1CBD12CD2220008BA0CB /* PBXTextBookmark */;\n\t\t\t040F1CBE12CD2220008BA0CB /* PBXTextBookmark */ = 040F1CBE12CD2220008BA0CB /* PBXTextBookmark */;\n\t\t\t040F1CBF12CD2220008BA0CB /* PBXTextBookmark */ = 040F1CBF12CD2220008BA0CB /* PBXTextBookmark */;\n\t\t\t040F1CC012CD2220008BA0CB /* PBXTextBookmark */ = 040F1CC012CD2220008BA0CB /* PBXTextBookmark */;\n\t\t\t040F1DAF12CD26E4008BA0CB /* PBXTextBookmark */ = 040F1DAF12CD26E4008BA0CB /* PBXTextBookmark */;\n\t\t\t040F1DB012CD26E4008BA0CB /* PBXBookmark */ = 040F1DB012CD26E4008BA0CB /* PBXBookmark */;\n\t\t\t040F1DB112CD26E4008BA0CB /* PBXTextBookmark */ = 040F1DB112CD26E4008BA0CB /* PBXTextBookmark */;\n\t\t};\n\t\tsourceControlManager = 040F1C9D12CD1FEF008BA0CB /* Source Control */;\n\t\tuserBuildSettings = {\n\t\t};\n\t};\n\t94ABA8870858C2CB00079BE1 /* LocalePlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {519, 4771}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 533}\";\n\t\t};\n\t};\n\t94ABA8900858C3F900079BE1 /* LocalePlugin.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {558, 1274}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 522}\";\n\t\t};\n\t};\n\t94ABA8920858C40D00079BE1 /* sqMemoryAccess.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {523, 2314}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 652}\";\n\t\t};\n\t};\n\t94AF34E00846F91100FA5ACB /* SqueakLocalePlugin */ = {\n\t\tactiveExec = 0;\n\t};\n\t94AF35000846F98600FA5ACB /* config.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {537, 2249}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 904}\";\n\t\t};\n\t};\n\t94E7F6C5123740F900A03A11 /* sqMacLocaleCocoa.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {544, 533}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 755}\";\n\t\t};\n\t};\n\t94E7F6C6123740F900A03A11 /* sqMacLocaleCocoa.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {537, 3380}}\";\n\t\t\tsepNavSelRange = \"{92, 0}\";\n\t\t\tsepNavVisRange = \"{0, 754}\";\n\t\t};\n\t};\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/SqueakLocale/SqueakLocale.xcodeproj/johnmci.mode1",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>ActivePerspectiveName</key>\n\t<string>Project</string>\n\t<key>AllowedModules</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Groups and Files Outline View</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCTaskListModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Task List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDetailModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>File and Smart Group Detail Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Detailed Build Results Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Batch Find Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Run Log</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXCVSModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Source Code Control Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Breakpoints Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDockableInspector</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Inspector</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXOpenQuicklyModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Open Quickly Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Console</string>\n\t\t</dict>\n\t</array>\n\t<key>Description</key>\n\t<string>DefaultDescriptionKey</string>\n\t<key>DockingSystemVisible</key>\n\t<false/>\n\t<key>Extension</key>\n\t<string>mode1</string>\n\t<key>FavBarConfig</key>\n\t<dict>\n\t\t<key>PBXProjectModuleGUID</key>\n\t\t<string>94AF35A4084782DD00FA5ACB</string>\n\t\t<key>XCBarModuleItemNames</key>\n\t\t<dict/>\n\t\t<key>XCBarModuleItems</key>\n\t\t<array/>\n\t</dict>\n\t<key>FirstTimeWindowDisplayed</key>\n\t<false/>\n\t<key>Identifier</key>\n\t<string>com.apple.perspectives.project.mode1</string>\n\t<key>MajorVersion</key>\n\t<integer>31</integer>\n\t<key>MinorVersion</key>\n\t<integer>1</integer>\n\t<key>Name</key>\n\t<string>Default</string>\n\t<key>Notifications</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>XCObserverAutoDisconnectKey</key>\n\t\t\t<true/>\n\t\t\t<key>XCObserverDefintionKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusErrorsKey</key>\n\t\t\t\t<integer>0</integer>\n\t\t\t</dict>\n\t\t\t<key>XCObserverFactoryKey</key>\n\t\t\t<string>XCPerspectivesSpecificationIdentifier</string>\n\t\t\t<key>XCObserverGUIDKey</key>\n\t\t\t<string>XCObserverProjectIdentifier</string>\n\t\t\t<key>XCObserverNotificationKey</key>\n\t\t\t<string>PBXStatusBuildStateMessageNotification</string>\n\t\t\t<key>XCObserverTargetKey</key>\n\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t<key>XCObserverTriggerKey</key>\n\t\t\t<string>awakenModuleWithObserver:</string>\n\t\t\t<key>XCObserverValidationKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusErrorsKey</key>\n\t\t\t\t<integer>2</integer>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>XCObserverAutoDisconnectKey</key>\n\t\t\t<true/>\n\t\t\t<key>XCObserverDefintionKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusWarningsKey</key>\n\t\t\t\t<integer>0</integer>\n\t\t\t</dict>\n\t\t\t<key>XCObserverFactoryKey</key>\n\t\t\t<string>XCPerspectivesSpecificationIdentifier</string>\n\t\t\t<key>XCObserverGUIDKey</key>\n\t\t\t<string>XCObserverProjectIdentifier</string>\n\t\t\t<key>XCObserverNotificationKey</key>\n\t\t\t<string>PBXStatusBuildStateMessageNotification</string>\n\t\t\t<key>XCObserverTargetKey</key>\n\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t<key>XCObserverTriggerKey</key>\n\t\t\t<string>awakenModuleWithObserver:</string>\n\t\t\t<key>XCObserverValidationKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusWarningsKey</key>\n\t\t\t\t<integer>2</integer>\n\t\t\t</dict>\n\t\t</dict>\n\t</array>\n\t<key>OpenEditors</key>\n\t<array/>\n\t<key>PerspectiveWidths</key>\n\t<array>\n\t\t<integer>-1</integer>\n\t\t<integer>-1</integer>\n\t</array>\n\t<key>Perspectives</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>ChosenToolbarItems</key>\n\t\t\t<array>\n\t\t\t\t<string>active-target-popup</string>\n\t\t\t\t<string>active-buildstyle-popup</string>\n\t\t\t\t<string>action</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>buildOrClean</string>\n\t\t\t\t<string>build-and-runOrDebug</string>\n\t\t\t\t<string>com.apple.ide.PBXToolbarStopButton</string>\n\t\t\t\t<string>get-info</string>\n\t\t\t\t<string>toggle-editor</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>com.apple.pbx.toolbar.searchfield</string>\n\t\t\t</array>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProjectWithEditor</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.project</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<true/>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>66DF6BFE01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66B8BC570381F53800A8011A</string>\n\t\t\t\t\t\t\t\t<string>66DF6BFF01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66DF6C3901D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66DF6C4501D7DEEE00A80119</string>\n\t\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>11</integer>\n\t\t\t\t\t\t\t\t\t<integer>8</integer>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 733}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 751}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>115 104 919 792 0 0 1680 1028 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>203pt</string>\n\t\t\t\t</dict>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>LocalePlugin.c</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CE0B20406471E060097A5F4</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>LocalePlugin.c</string>\n\t\t\t\t\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t\t\t\t\t<string>94B4E4A70C75EA3800F83D97</string>\n\t\t\t\t\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>944D6258085F474800600D6E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94BBFE8908A46E3D00181406</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94BB001D08A54ECD00181406</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94CB5D6309E1DEC400AD2895</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94ACFA7709EEFA300043ED40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94ACFA7809EEFA300043ED40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94B4E4990C75EA3700F83D97</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9457F0A509C0D6F000D1610A</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t\t<key>prevStack</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>947907390858EDF80068B3F8</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94461699085E5999004F7BD5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9446169B085E5999004F7BD5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>944D625B085F474800600D6E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>946D55B2089DFA400081F0EE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94BBFE8E08A46E3D00181406</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94BB005208A5562100181406</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94B4E49A0C75EA3700F83D97</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {711, 692}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>115 104 919 792 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>692pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 697}, {711, 54}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>115 104 919 792 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>54pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>711pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>94B4E49C0C75EA3700F83D97</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>94B4E49D0C75EA3700F83D97</string>\n\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProject</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.morph</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>29B97314FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 337}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 355}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>373 269 690 397 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Morph</string>\n\t\t\t<key>PreferredWidth</key>\n\t\t\t<integer>300</integer>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default.short</string>\n\t\t</dict>\n\t</array>\n\t<key>PerspectivesBarVisible</key>\n\t<false/>\n\t<key>ShelfIsVisible</key>\n\t<false/>\n\t<key>SourceDescription</key>\n\t<string>file at '/System/Library/PrivateFrameworks/DevToolsInterface.framework/Versions/A/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string>\n\t<key>StatusbarIsVisible</key>\n\t<true/>\n\t<key>TimeStamp</key>\n\t<real>209054117.07446</real>\n\t<key>ToolbarDisplayMode</key>\n\t<integer>1</integer>\n\t<key>ToolbarIsVisible</key>\n\t<true/>\n\t<key>ToolbarSizeMode</key>\n\t<integer>2</integer>\n\t<key>Type</key>\n\t<string>Perspectives</string>\n\t<key>UpdateMessage</key>\n\t<string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the \"Metro-Morph\" feature).  You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature.  Do you wish to update to the latest Workspace defaults for project '%@'?</string>\n\t<key>WindowJustification</key>\n\t<integer>5</integer>\n\t<key>WindowOrderList</key>\n\t<array>\n\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t<string>/Users/johnmci/Documents/SqueakLocale/SqueakLocale.xcodeproj</string>\n\t</array>\n\t<key>WindowString</key>\n\t<string>115 104 919 792 0 0 1680 1028 </string>\n\t<key>WindowTools</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.build</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string></string>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {879, 130}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>444 71 879 795 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>130pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXBuildLogShowsTranscriptDefaultKey</key>\n\t\t\t\t\t\t\t\t<string>{{0, 5}, {879, 614}}</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Build</string>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Collapse</key>\n\t\t\t\t\t\t\t\t<integer>1021</integer>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Open</key>\n\t\t\t\t\t\t\t\t<integer>1013</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 135}, {879, 619}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>444 71 879 795 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>619pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>754pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Build Results</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>94BBFEA708A46E3D00181406</string>\n\t\t\t\t<string>94B2DFEA09C7B53D00C46523</string>\n\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.build</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>444 71 879 795 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>94BBFEA708A46E3D00181406</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugger</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Debugger</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {410, 251}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 251}, {410, 371}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {410, 622}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{410, 0}, {820, 622}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debug - GLUTExamples (Underwater)</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>DebugConsoleDrawerSize</key>\n\t\t\t\t\t\t\t\t<string>{100, 120}</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleVisible</key>\n\t\t\t\t\t\t\t\t<string>None</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>DebugSTDIOWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1230, 622}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>208 95 1230 663 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>622pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>622pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t\t<string>94BBFEA908A46E3D00181406</string>\n\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t<string>94BBFEAA08A46E3D00181406</string>\n\t\t\t\t<string>94BBFEAB08A46E3D00181406</string>\n\t\t\t\t<string>94BBFEAC08A46E3D00181406</string>\n\t\t\t\t<string>94BBFEAD08A46E3D00181406</string>\n\t\t\t\t<string>94BBFEAE08A46E3D00181406</string>\n\t\t\t\t<string>94BBFEAF08A46E3D00181406</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debug</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>208 95 1230 663 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.find</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string></string>\n\t\t\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {791, 416}}</string>\n\t\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t\t<string>629 73 791 674 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t\t\t<string>791pt</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>416pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Project Find</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 421}, {791, 212}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>629 73 791 674 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>212pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>633pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Find</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t\t<string>94B4E49E0C75EA3700F83D97</string>\n\t\t\t\t<string>94B4E49F0C75EA3700F83D97</string>\n\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>629 73 791 674 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>MENUSEPARATOR</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debuggerConsole</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debugger Console</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {686, 500}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>759 114 686 541 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>500pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>500pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger Console</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>94ABA92F0858D3A300079BE1</string>\n\t\t\t\t<string>94BBFFFF08A5476700181406</string>\n\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>759 114 686 541 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>94ABA92F0858D3A300079BE1</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.run</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>3</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528B0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Run</string>\n\t\t\t\t\t\t\t\t<key>Runner</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {493, 167}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 176}, {493, 267}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {405, 443}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{414, 0}, {514, 443}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {460, 159}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>316 696 459 200 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>159pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>159pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Run Log</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2B3069F1EA900FABCE6</string>\n\t\t\t\t<string>1C0AD2B4069F1EA900FABCE6</string>\n\t\t\t\t<string>1CD0528B0623707200166675</string>\n\t\t\t\t<string>1C0AD2B5069F1EA900FABCE6</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.run</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>316 696 459 200 0 0 1280 1002 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2B3069F1EA900FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.scm</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1C78EAB3065D492600B07095</string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>0pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>SCM</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ConsoleFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 259}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 7}, {452, 259}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t\t<key>TableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>Status</string>\n\t\t\t\t\t\t\t\t\t<real>30</real>\n\t\t\t\t\t\t\t\t\t<string>FileName</string>\n\t\t\t\t\t\t\t\t\t<real>199</real>\n\t\t\t\t\t\t\t\t\t<string>Path</string>\n\t\t\t\t\t\t\t\t\t<real>197.09500122070312</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>TableFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 250}}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>262pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>266pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>SCM</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAB4065D492600B07095</string>\n\t\t\t\t<string>1C78EAB5065D492600B07095</string>\n\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.scm</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.breakpoints</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t\t\t<string>no</string>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {168, 350}}</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t\t\t<false/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {185, 368}}</string>\n\t\t\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>185pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{190, 0}, {554, 368}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>554pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>368pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>MajorVersion</key>\n\t\t\t<integer>2</integer>\n\t\t\t<key>MinorVersion</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Name</key>\n\t\t\t<string>Breakpoints</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CDDB66807F98D9800BB5817</string>\n\t\t\t\t<string>1CDDB66907F98D9800BB5817</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.breakpoints</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CDDB66807F98D9800BB5817</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugAnimator</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Visualizer</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugAnimator</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>100 100 700 500 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.bookmarks</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>538 42 401 187 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.classBrowser</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>OptionsSetName</key>\n\t\t\t\t\t\t\t\t<string>Hierarchy, all classes</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Class Browser - NSObject</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ClassesFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {374, 96}}</string>\n\t\t\t\t\t\t\t\t<key>ClassesTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXClassNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>208</real>\n\t\t\t\t\t\t\t\t\t<string>PBXClassBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {630, 331}}</string>\n\t\t\t\t\t\t\t\t<key>MembersFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 105}, {374, 395}}</string>\n\t\t\t\t\t\t\t\t<key>MembersTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeIconColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>216</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>97</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>332pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>332pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t\t<string>1C0AD2B0069F1E9B00FABCE6</string>\n\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.classbrowser</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/SqueakLocale/SqueakLocale.xcodeproj/johnmci.mode1v3",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>ActivePerspectiveName</key>\n\t<string>Project</string>\n\t<key>AllowedModules</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Groups and Files Outline View</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCTaskListModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Task List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDetailModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>File and Smart Group Detail Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Detailed Build Results Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Batch Find Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Format Conflicts List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXCVSModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Source Code Control Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Breakpoints Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDockableInspector</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Inspector</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXOpenQuicklyModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Open Quickly Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Console</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCSnapshotModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Snapshots Tool</string>\n\t\t</dict>\n\t</array>\n\t<key>Description</key>\n\t<string>DefaultDescriptionKey</string>\n\t<key>DockingSystemVisible</key>\n\t<false/>\n\t<key>Extension</key>\n\t<string>mode1v3</string>\n\t<key>FavBarConfig</key>\n\t<dict>\n\t\t<key>PBXProjectModuleGUID</key>\n\t\t<string>9471AF5E1107A072004DD8A7</string>\n\t\t<key>XCBarModuleItemNames</key>\n\t\t<dict/>\n\t\t<key>XCBarModuleItems</key>\n\t\t<array/>\n\t</dict>\n\t<key>FirstTimeWindowDisplayed</key>\n\t<false/>\n\t<key>Identifier</key>\n\t<string>com.apple.perspectives.project.mode1v3</string>\n\t<key>MajorVersion</key>\n\t<integer>33</integer>\n\t<key>MinorVersion</key>\n\t<integer>0</integer>\n\t<key>Name</key>\n\t<string>Default</string>\n\t<key>Notifications</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>XCObserverAutoDisconnectKey</key>\n\t\t\t<true/>\n\t\t\t<key>XCObserverDefintionKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusErrorsKey</key>\n\t\t\t\t<integer>0</integer>\n\t\t\t</dict>\n\t\t\t<key>XCObserverFactoryKey</key>\n\t\t\t<string>XCPerspectivesSpecificationIdentifier</string>\n\t\t\t<key>XCObserverGUIDKey</key>\n\t\t\t<string>XCObserverProjectIdentifier</string>\n\t\t\t<key>XCObserverNotificationKey</key>\n\t\t\t<string>PBXStatusBuildStateMessageNotification</string>\n\t\t\t<key>XCObserverTargetKey</key>\n\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t<key>XCObserverTriggerKey</key>\n\t\t\t<string>awakenModuleWithObserver:</string>\n\t\t\t<key>XCObserverValidationKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusErrorsKey</key>\n\t\t\t\t<integer>2</integer>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>XCObserverAutoDisconnectKey</key>\n\t\t\t<true/>\n\t\t\t<key>XCObserverDefintionKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusWarningsKey</key>\n\t\t\t\t<integer>0</integer>\n\t\t\t</dict>\n\t\t\t<key>XCObserverFactoryKey</key>\n\t\t\t<string>XCPerspectivesSpecificationIdentifier</string>\n\t\t\t<key>XCObserverGUIDKey</key>\n\t\t\t<string>XCObserverProjectIdentifier</string>\n\t\t\t<key>XCObserverNotificationKey</key>\n\t\t\t<string>PBXStatusBuildStateMessageNotification</string>\n\t\t\t<key>XCObserverTargetKey</key>\n\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t<key>XCObserverTriggerKey</key>\n\t\t\t<string>awakenModuleWithObserver:</string>\n\t\t\t<key>XCObserverValidationKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusWarningsKey</key>\n\t\t\t\t<integer>2</integer>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>XCObserverAutoDisconnectKey</key>\n\t\t\t<true/>\n\t\t\t<key>XCObserverDefintionKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusAnalyzerResultsKey</key>\n\t\t\t\t<integer>0</integer>\n\t\t\t</dict>\n\t\t\t<key>XCObserverFactoryKey</key>\n\t\t\t<string>XCPerspectivesSpecificationIdentifier</string>\n\t\t\t<key>XCObserverGUIDKey</key>\n\t\t\t<string>XCObserverProjectIdentifier</string>\n\t\t\t<key>XCObserverNotificationKey</key>\n\t\t\t<string>PBXStatusBuildStateMessageNotification</string>\n\t\t\t<key>XCObserverTargetKey</key>\n\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t<key>XCObserverTriggerKey</key>\n\t\t\t<string>awakenModuleWithObserver:</string>\n\t\t\t<key>XCObserverValidationKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusAnalyzerResultsKey</key>\n\t\t\t\t<integer>2</integer>\n\t\t\t</dict>\n\t\t</dict>\n\t</array>\n\t<key>OpenEditors</key>\n\t<array/>\n\t<key>PerspectiveWidths</key>\n\t<array>\n\t\t<integer>-1</integer>\n\t\t<integer>-1</integer>\n\t</array>\n\t<key>Perspectives</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>ChosenToolbarItems</key>\n\t\t\t<array>\n\t\t\t\t<string>active-combo-popup</string>\n\t\t\t\t<string>action</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>debugger-enable-breakpoints</string>\n\t\t\t\t<string>build-and-go</string>\n\t\t\t\t<string>com.apple.ide.PBXToolbarStopButton</string>\n\t\t\t\t<string>get-info</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>com.apple.pbx.toolbar.searchfield</string>\n\t\t\t</array>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProjectWithEditor</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.project</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>373</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>66DF6BFE01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>94E7F9191237565E00A03A11</string>\n\t\t\t\t\t\t\t\t<string>66B8BC570381F53800A8011A</string>\n\t\t\t\t\t\t\t\t<string>94E7F8371237541300A03A11</string>\n\t\t\t\t\t\t\t\t<string>66DF6BFF01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66DF6C3901D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66DF6C4501D7DEEE00A80119</string>\n\t\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>15</integer>\n\t\t\t\t\t\t\t\t\t<integer>13</integer>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {373, 917}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {390, 935}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>373</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>10 52 1502 976 0 0 1680 1028 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>390pt</string>\n\t\t\t\t</dict>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>sqMacLocaleCocoa.m</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CE0B20406471E060097A5F4</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>sqMacLocaleCocoa.m</string>\n\t\t\t\t\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t\t\t\t\t<string>9420ABC41239521400EF4FDF</string>\n\t\t\t\t\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>944D6258085F474800600D6E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94BB001D08A54ECD00181406</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E7F76F1237474100A03A11</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E7F7711237474100A03A11</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E7F92F1237572100A03A11</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E7F989123759D900A03A11</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E7F98A123759D900A03A11</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E7FA0112375E5F00A03A11</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E9A04012380A3A0048557C</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E9A04212380A3A0048557C</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E9A04D12380B990048557C</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E9A0A012380D830048557C</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E9A0B012380E2B0048557C</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E9A0B112380E2B0048557C</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E9A0B212380E2B0048557C</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E9A0B312380E2B0048557C</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E9A0B412380E2B0048557C</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E9A0B512380E2B0048557C</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9420ABBC123951F800EF4FDF</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9420ABBD123951F800EF4FDF</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9420ABBE123951F800EF4FDF</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9420ABBF123951F800EF4FDF</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1107, 867}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>10 52 1502 976 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>867pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 872}, {1107, 63}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>10 52 1502 976 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>63pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>1107pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>9420ABC1123951F800EF4FDF</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>9420ABC2123951F800EF4FDF</string>\n\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfigUserDefaultsMinorVersion</key>\n\t\t\t<string>2</string>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.defaultV3</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProject</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.morph</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>29B97314FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 337}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 355}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>373 269 690 397 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Morph</string>\n\t\t\t<key>PreferredWidth</key>\n\t\t\t<integer>300</integer>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default.shortV3</string>\n\t\t</dict>\n\t</array>\n\t<key>PerspectivesBarVisible</key>\n\t<false/>\n\t<key>ShelfIsVisible</key>\n\t<false/>\n\t<key>StatusbarIsVisible</key>\n\t<true/>\n\t<key>TimeStamp</key>\n\t<real>305746452.50028902</real>\n\t<key>ToolbarConfigUserDefaultsMinorVersion</key>\n\t<string>2</string>\n\t<key>ToolbarDisplayMode</key>\n\t<integer>1</integer>\n\t<key>ToolbarIsVisible</key>\n\t<true/>\n\t<key>ToolbarSizeMode</key>\n\t<integer>2</integer>\n\t<key>Type</key>\n\t<string>Perspectives</string>\n\t<key>UpdateMessage</key>\n\t<string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the \"Metro-Morph\" feature).  You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature.  Do you wish to update to the latest Workspace defaults for project '%@'?</string>\n\t<key>WindowJustification</key>\n\t<integer>5</integer>\n\t<key>WindowOrderList</key>\n\t<array>\n\t\t<string>9471AF5F1107A072004DD8A7</string>\n\t\t<string>/Users/johnmci/Documents/Squeak3.8.0/platforms/iOS/plugins/SqueakLocale/SqueakLocale.xcodeproj</string>\n\t</array>\n\t<key>WindowString</key>\n\t<string>10 52 1502 976 0 0 1680 1028 </string>\n\t<key>WindowToolsV3</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.build</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string></string>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {879, 255}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>281 201 879 795 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>255pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Build Results</string>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Collapse</key>\n\t\t\t\t\t\t\t\t<integer>1021</integer>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Open</key>\n\t\t\t\t\t\t\t\t<integer>1013</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 260}, {879, 494}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>281 201 879 795 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>494pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>754pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Build Results</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>9471AF5F1107A072004DD8A7</string>\n\t\t\t\t<string>9420ABC3123951F800EF4FDF</string>\n\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.buildV3</string>\n\t\t\t<key>WindowContentMinSize</key>\n\t\t\t<string>486 300</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>281 201 879 795 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>9471AF5F1107A072004DD8A7</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugger</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Debugger</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {615, 332}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{615, 0}, {615, 332}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {1230, 332}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 332}, {1230, 290}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debug - GLUTExamples (Underwater)</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>DebugConsoleVisible</key>\n\t\t\t\t\t\t\t\t<string>None</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>DebugSTDIOWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1230, 622}}</string>\n\t\t\t\t\t\t\t\t<key>PBXDebugSessionStackFrameViewKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>DebugVariablesTableConfiguration</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>Name</string>\n\t\t\t\t\t\t\t\t\t\t<real>120</real>\n\t\t\t\t\t\t\t\t\t\t<string>Value</string>\n\t\t\t\t\t\t\t\t\t\t<real>85</real>\n\t\t\t\t\t\t\t\t\t\t<string>Summary</string>\n\t\t\t\t\t\t\t\t\t\t<real>385</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t<string>{{615, 0}, {615, 332}}</string>\n\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t<string>446 132 1230 663 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>446 132 1230 663 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>622pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>622pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t\t<string>94E9A0321237F5DB0048557C</string>\n\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t<string>94E9A0331237F5DB0048557C</string>\n\t\t\t\t<string>94E9A0341237F5DB0048557C</string>\n\t\t\t\t<string>94E9A0351237F5DB0048557C</string>\n\t\t\t\t<string>94E9A0361237F5DB0048557C</string>\n\t\t\t\t<string>94E9A0371237F5DB0048557C</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>446 132 1230 663 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.find</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>LocalePlugin.c</string>\n\t\t\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {791, 294}}</string>\n\t\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t\t<string>629 73 791 674 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t\t\t<string>791pt</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>294pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Project Find</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 299}, {791, 334}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>629 73 791 674 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>334pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>633pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Find</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t\t<string>94E9A0BE12380FBC0048557C</string>\n\t\t\t\t<string>94E9A0BF12380FBC0048557C</string>\n\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>629 73 791 674 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>MENUSEPARATOR</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debuggerConsole</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debugger Console</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {686, 500}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>25 376 686 541 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>500pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>500pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger Console</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t\t<string>94E9A05A12380BB30048557C</string>\n\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.consoleV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>25 376 686 541 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.snapshots</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCSnapshotModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Snapshots</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCSnapshotModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<string>Yes</string>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.snapshots</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>315 824 300 550 0 0 1440 878 </string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<string>Yes</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.scm</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1C78EAB3065D492600B07095</string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>0pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>SCM</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ConsoleFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 259}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 7}, {452, 259}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t\t<key>TableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>Status</string>\n\t\t\t\t\t\t\t\t\t<real>30</real>\n\t\t\t\t\t\t\t\t\t<string>FileName</string>\n\t\t\t\t\t\t\t\t\t<real>199</real>\n\t\t\t\t\t\t\t\t\t<string>Path</string>\n\t\t\t\t\t\t\t\t\t<real>197.09500122070312</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>TableFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 250}}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>262pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>266pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>SCM</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAB4065D492600B07095</string>\n\t\t\t\t<string>1C78EAB5065D492600B07095</string>\n\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.scm</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.breakpoints</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t\t\t<string>no</string>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {168, 350}}</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t\t\t<false/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {185, 368}}</string>\n\t\t\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>185pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{190, 0}, {554, 368}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>554pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>368pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>MajorVersion</key>\n\t\t\t<integer>3</integer>\n\t\t\t<key>MinorVersion</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Name</key>\n\t\t\t<string>Breakpoints</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CDDB66807F98D9800BB5817</string>\n\t\t\t\t<string>1CDDB66907F98D9800BB5817</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.breakpointsV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CDDB66807F98D9800BB5817</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugAnimator</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Visualizer</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugAnimatorV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>100 100 700 500 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.bookmarks</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<false/>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>538 42 401 187 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.projectFormatConflicts</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Format Conflicts</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<false/>\n\t\t\t<key>WindowContentMinSize</key>\n\t\t\t<string>450 300</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>50 850 472 307 0 0 1440 877</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.classBrowser</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>OptionsSetName</key>\n\t\t\t\t\t\t\t\t<string>Hierarchy, all classes</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Class Browser - NSObject</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ClassesFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {374, 96}}</string>\n\t\t\t\t\t\t\t\t<key>ClassesTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXClassNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>208</real>\n\t\t\t\t\t\t\t\t\t<string>PBXClassBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {630, 331}}</string>\n\t\t\t\t\t\t\t\t<key>MembersFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 105}, {374, 395}}</string>\n\t\t\t\t\t\t\t\t<key>MembersTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeIconColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>216</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>97</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>332pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>332pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<false/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t\t<string>1C0AD2B0069F1E9B00FABCE6</string>\n\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.classbrowser</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.refactoring</string>\n\t\t\t<key>IncludeInToolsMenu</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{0, 0}, {500, 335}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{0, 0}, {500, 335}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCRefactoringModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Refactoring</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCRefactoringModule</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>200 200 500 356 0 0 1920 1200 </string>\n\t\t</dict>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/SqueakLocale/SqueakLocale.xcodeproj/johnmci.pbxuser",
    "content": "// !$*UTF8*$!\n{\n\t66B8BC580381F61C00A8011A /* sqConfig.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1058, 788}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 302}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {673, 397}}\";\n\t\t};\n\t};\n\t66B8BC5A0381F63A00A8011A /* sqPlatformSpecific.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1058, 2197}}\";\n\t\t\tsepNavSelRange = \"{1460, 0}\";\n\t\t\tsepNavVisRange = \"{0, 2732}\";\n\t\t\tsepNavVisRect = \"{{0, 190}, {673, 397}}\";\n\t\t};\n\t};\n\t66B8BC5C0381F66500A8011A /* sq.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1058, 5889}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 2268}\";\n\t\t\tsepNavVisRect = \"{{0, 5935}, {740, 73}}\";\n\t\t};\n\t};\n\t66B8BC5E0381F69100A8011A /* sqVirtualMachine.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1058, 3575}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1859}\";\n\t\t\tsepNavVisRect = \"{{0, 2585}, {673, 397}}\";\n\t\t\tsepNavWindowFrame = \"{{84, 252}, {750, 558}}\";\n\t\t};\n\t};\n\t66DF6BFD01D7DCEA00A80119 /* Project object */ = {\n\t\tactiveBuildConfigurationName = Deployment;\n\t\tactiveExecutable = 94ABA91E0858D35E00079BE1 /* Squeak */;\n\t\tactiveTarget = 94AF34E00846F91100FA5ACB /* SqueakLocalePlugin */;\n\t\taddToTargets = (\n\t\t\t94AF34E00846F91100FA5ACB /* SqueakLocalePlugin */,\n\t\t);\n\t\tbreakpoints = (\n\t\t\t947906FD0858E5030068B3F8 /* sqMacLocaleCarbon.c:67 */,\n\t\t\t94BB001C08A54ECA00181406 /* sqMacLocaleCarbon.c:205 */,\n\t\t\t94E7F7F91237521E00A03A11 /* sqMacLocaleCocoa.m:188 */,\n\t\t\t94E9A0231237F5D80048557C /* sqMacLocaleCocoa.m:49 */,\n\t\t\t94E9A0251237F5D90048557C /* sqMacLocaleCocoa.m:66 */,\n\t\t);\n\t\tcodeSenseManager = 9444E60E06E7B8740063F6CC /* Code sense */;\n\t\texecutables = (\n\t\t\t94ABA91E0858D35E00079BE1 /* Squeak */,\n\t\t);\n\t\texpressions = (\n\t\t\tbuffer,\n\t\t);\n\t\tperUserDictionary = {\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXExecutablesDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXExecutablesDataSource_NameID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t22,\n\t\t\t\t\t300,\n\t\t\t\t\t377,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXExecutablesDataSource_ActiveFlagID,\n\t\t\t\t\tPBXExecutablesDataSource_NameID,\n\t\t\t\t\tPBXExecutablesDataSource_CommentsID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t868,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t\t20,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Target_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXFindDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFindDataSource_LocationID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t200,\n\t\t\t\t\t120,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFindDataSource_MessageID,\n\t\t\t\t\tPBXFindDataSource_LocationID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t828,\n\t\t\t\t\t60,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXTargetDataSource_PrimaryAttribute,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXPerProjectTemplateStateSaveDate = 305745864;\n\t\t\tPBXPrepackagedSmartGroups_v2 = (\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tactivationKey = OldTargetSmartGroup;\n\t\t\t\t\tclz = PBXTargetSmartGroup;\n\t\t\t\t\tdescription = \"Displays all targets of the project.\";\n\t\t\t\t\tglobalID = 1C37FABC04509CD000000102;\n\t\t\t\t\tname = Targets;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = Targets;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXTargetSmartGroup2;\n\t\t\t\t\tdescription = \"Displays all targets of the project as well as nested build phases.\";\n\t\t\t\t\tglobalID = 1C37FBAC04509CD000000102;\n\t\t\t\t\tname = Targets;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = Targets;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXExecutablesSmartGroup;\n\t\t\t\t\tdescription = \"Displays all executables of the project.\";\n\t\t\t\t\tglobalID = 1C37FAAC04509CD000000102;\n\t\t\t\t\tname = Executables;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = Executable;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\" PBXTransientLocationAtTop \" = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXErrorsWarningsSmartGroup;\n\t\t\t\t\tdescription = \"Displays files with errors or warnings.\";\n\t\t\t\t\tglobalID = 1C08E77C0454961000C914BD;\n\t\t\t\t\tname = \"Errors and Warnings\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\tfnmatch = \"\";\n\t\t\t\t\t\timage = WarningsErrors;\n\t\t\t\t\t\trecursive = 1;\n\t\t\t\t\t\tregex = \"\";\n\t\t\t\t\t\troot = \"<PROJECT>\";\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXFilenameSmartGroup;\n\t\t\t\t\tdescription = \"Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter.\";\n\t\t\t\t\tglobalID = 1CC0EA4004350EF90044410B;\n\t\t\t\t\tname = \"Implementation Files\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\tcanSave = 1;\n\t\t\t\t\t\tfnmatch = \"\";\n\t\t\t\t\t\timage = SmartFolder;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t\trecursive = 1;\n\t\t\t\t\t\tregex = \"?*\\\\.[mcMC]\";\n\t\t\t\t\t\troot = \"<PROJECT>\";\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXFilenameSmartGroup;\n\t\t\t\t\tdescription = \"This group displays Interface Builder NIB Files.\";\n\t\t\t\t\tglobalID = 1CC0EA4004350EF90041110B;\n\t\t\t\t\tname = \"NIB Files\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\tcanSave = 1;\n\t\t\t\t\t\tfnmatch = \"*.nib\";\n\t\t\t\t\t\timage = SmartFolder;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t\trecursive = 1;\n\t\t\t\t\t\tregex = \"\";\n\t\t\t\t\t\troot = \"<PROJECT>\";\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = no;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXFindSmartGroup;\n\t\t\t\t\tdescription = \"Displays Find Results.\";\n\t\t\t\t\tglobalID = 1C37FABC05509CD000000102;\n\t\t\t\t\tname = \"Find Results\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = spyglass;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = no;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXBookmarksSmartGroup;\n\t\t\t\t\tdescription = \"Displays Project Bookmarks.\";\n\t\t\t\t\tglobalID = 1C37FABC05539CD112110102;\n\t\t\t\t\tname = Bookmarks;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = Bookmarks;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = XCSCMSmartGroup;\n\t\t\t\t\tdescription = \"Displays files with interesting SCM status.\";\n\t\t\t\t\tglobalID = E2644B35053B69B200211256;\n\t\t\t\t\tname = SCM;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = PBXRepository;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXSymbolsSmartGroup;\n\t\t\t\t\tdescription = \"Displays all symbols for the project.\";\n\t\t\t\t\tglobalID = 1C37FABC04509CD000100104;\n\t\t\t\t\tname = \"Project Symbols\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = ProjectSymbols;\n\t\t\t\t\t\tisLeaf = 1;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXFilenameSmartGroup;\n\t\t\t\t\tdescription = \"Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter.\";\n\t\t\t\t\tglobalID = PBXTemplateMarker;\n\t\t\t\t\tname = \"Simple Filter SmartGroup\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\tcanSave = 1;\n\t\t\t\t\t\tfnmatch = \"*.nib\";\n\t\t\t\t\t\timage = SmartFolder;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t\trecursive = 1;\n\t\t\t\t\t\tregex = \"\";\n\t\t\t\t\t\troot = \"<PROJECT>\";\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXFilenameSmartGroup;\n\t\t\t\t\tdescription = \"Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter.\";\n\t\t\t\t\tglobalID = PBXTemplateMarker;\n\t\t\t\t\tname = \"Simple Regular Expression SmartGroup\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\tcanSave = 1;\n\t\t\t\t\t\tfnmatch = \"\";\n\t\t\t\t\t\timage = SmartFolder;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t\trecursive = 1;\n\t\t\t\t\t\tregex = \"?*\\\\.[mcMC]\";\n\t\t\t\t\t\troot = \"<PROJECT>\";\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tclz = XDDesignSmartGroup;\n\t\t\t\t\tdescription = \"Displays Xdesign models\";\n\t\t\t\t\tglobalID = 2E4A936305E6979E00701470;\n\t\t\t\t\tname = Design;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = Design;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t);\n\t\t\tPBXWorkspaceContents = (\n\t\t\t\t{\n\t\t\t\t\tPBXProjectWorkspaceModule_StateKey_Rev39 = {\n\t\t\t\t\t\tPBXProjectWorkspaceModule_DataSourceSelectionKey_Rev6 = {\n\t\t\t\t\t\t\tBoundsStr = \"{{0, 0}, {469, 441}}\";\n\t\t\t\t\t\t\tRows = (\n\t\t\t\t\t\t\t\t9,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tVisibleRectStr = \"{{0, 0}, {469, 441}}\";\n\t\t\t\t\t\t};\n\t\t\t\t\t\tPBXProjectWorkspaceModule_EditorOpen = false;\n\t\t\t\t\t\tPBXProjectWorkspaceModule_EmbeddedNavigatorGroup = {\n\t\t\t\t\t\t\tPBXSplitModuleInNavigatorKey = {\n\t\t\t\t\t\t\t\tSplitCount = 1;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t};\n\t\t\t\t\t\tPBXProjectWorkspaceModule_GeometryKey_Rev15 = {\n\t\t\t\t\t\t\tPBXProjectWorkspaceModule_SGTM_Geometry = {\n\t\t\t\t\t\t\t\t_collapsingFrameDimension = 0;\n\t\t\t\t\t\t\t\t_indexOfCollapsedView = 0;\n\t\t\t\t\t\t\t\t_percentageOfCollapsedView = 0;\n\t\t\t\t\t\t\t\tsizes = (\n\t\t\t\t\t\t\t\t\t\"{{0, 0}, {182, 458}}\",\n\t\t\t\t\t\t\t\t\t\"{{182, 0}, {484, 458}}\",\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t};\n\t\t\t\t\t\tPBXProjectWorkspaceModule_OldDetailFrame = \"{{0, 0}, {484, 458}}\";\n\t\t\t\t\t\tPBXProjectWorkspaceModule_OldEditorFrame = \"{{0, 0}, {750, 480}}\";\n\t\t\t\t\t\tPBXProjectWorkspaceModule_OldSuperviewFrame = \"{{182, 0}, {484, 458}}\";\n\t\t\t\t\t\tPBXProjectWorkspaceModule_SGTM = {\n\t\t\t\t\t\t\tPBXBottomSmartGroupGIDs = (\n\t\t\t\t\t\t\t\t1C37FBAC04509CD000000102,\n\t\t\t\t\t\t\t\t1C37FAAC04509CD000000102,\n\t\t\t\t\t\t\t\t1C08E77C0454961000C914BD,\n\t\t\t\t\t\t\t\t1CC0EA4004350EF90044410B,\n\t\t\t\t\t\t\t\t1CC0EA4004350EF90041110B,\n\t\t\t\t\t\t\t\t1C37FABC05509CD000000102,\n\t\t\t\t\t\t\t\t1C37FABC05539CD112110102,\n\t\t\t\t\t\t\t\tE2644B35053B69B200211256,\n\t\t\t\t\t\t\t\t1C37FABC04509CD000100104,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnData = {\n\t\t\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnWidthsKey = (\n\t\t\t\t\t\t\t\t\t165,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnsKey_v4 = (\n\t\t\t\t\t\t\t\t\tMainColumn,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateKey_v7 = {\n\t\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateExpansionKey = (\n\t\t\t\t\t\t\t\t\t66DF6BFE01D7DCEA00A80119,\n\t\t\t\t\t\t\t\t\t66B8BC570381F53800A8011A,\n\t\t\t\t\t\t\t\t\t66DF6BFF01D7DCEA00A80119,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateSelectionKey = (\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateVisibleRectKey = \"{{0, 0}, {165, 440}}\";\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tPBXTopSmartGroupGIDs = (\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t);\n\t\t\t\"PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXBuildResultsModule\" = {\n\t\t\t};\n\t\t\t\"PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXDebugCLIModule\" = {\n\t\t\t};\n\t\t\t\"PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXNavigatorGroup\" = {\n\t\t\t\tPBXSplitModuleInNavigatorKey = {\n\t\t\t\t\tSplitCount = 1;\n\t\t\t\t};\n\t\t\t};\n\t\t\t\"PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXProjectWorkspaceModule\" = {\n\t\t\t\tPBXProjectWorkspaceModule_StateKey_Rev39 = {\n\t\t\t\t\tPBXProjectWorkspaceModule_DataSourceSelectionKey_Rev6 = {\n\t\t\t\t\t\tBoundsStr = \"{{0, 0}, {469, 441}}\";\n\t\t\t\t\t\tRows = (\n\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tVisibleRectStr = \"{{0, 0}, {469, 441}}\";\n\t\t\t\t\t};\n\t\t\t\t\tPBXProjectWorkspaceModule_EditorOpen = false;\n\t\t\t\t\tPBXProjectWorkspaceModule_EmbeddedNavigatorGroup = {\n\t\t\t\t\t\tPBXSplitModuleInNavigatorKey = {\n\t\t\t\t\t\t\tSplitCount = 1;\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t\tPBXProjectWorkspaceModule_GeometryKey_Rev15 = {\n\t\t\t\t\t\tPBXProjectWorkspaceModule_SGTM_Geometry = {\n\t\t\t\t\t\t\t_collapsingFrameDimension = 0;\n\t\t\t\t\t\t\t_indexOfCollapsedView = 0;\n\t\t\t\t\t\t\t_percentageOfCollapsedView = 0;\n\t\t\t\t\t\t\tsizes = (\n\t\t\t\t\t\t\t\t\"{{0, 0}, {182, 458}}\",\n\t\t\t\t\t\t\t\t\"{{182, 0}, {484, 458}}\",\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t\tPBXProjectWorkspaceModule_OldDetailFrame = \"{{0, 0}, {484, 458}}\";\n\t\t\t\t\tPBXProjectWorkspaceModule_OldEditorFrame = \"{{0, 0}, {750, 480}}\";\n\t\t\t\t\tPBXProjectWorkspaceModule_OldSuperviewFrame = \"{{182, 0}, {484, 458}}\";\n\t\t\t\t\tPBXProjectWorkspaceModule_SGTM = {\n\t\t\t\t\t\tPBXBottomSmartGroupGIDs = (\n\t\t\t\t\t\t\t1C37FBAC04509CD000000102,\n\t\t\t\t\t\t\t1C37FAAC04509CD000000102,\n\t\t\t\t\t\t\t1C08E77C0454961000C914BD,\n\t\t\t\t\t\t\t1CC0EA4004350EF90044410B,\n\t\t\t\t\t\t\t1CC0EA4004350EF90041110B,\n\t\t\t\t\t\t\t1C37FABC05509CD000000102,\n\t\t\t\t\t\t\t1C37FABC05539CD112110102,\n\t\t\t\t\t\t\tE2644B35053B69B200211256,\n\t\t\t\t\t\t\t1C37FABC04509CD000100104,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnData = {\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnWidthsKey = (\n\t\t\t\t\t\t\t\t165,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnsKey_v4 = (\n\t\t\t\t\t\t\t\tMainColumn,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t};\n\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateKey_v7 = {\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateExpansionKey = (\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateSelectionKey = (\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateVisibleRectKey = \"{{0, 0}, {165, 440}}\";\n\t\t\t\t\t\t};\n\t\t\t\t\t\tPBXTopSmartGroupGIDs = (\n\t\t\t\t\t\t);\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tPBXWorkspaceGeometries = (\n\t\t\t\t{\n\t\t\t\t\tFrame = \"{{0, 0}, {666, 458}}\";\n\t\t\t\t\tPBXProjectWorkspaceModule_GeometryKey_Rev15 = {\n\t\t\t\t\t};\n\t\t\t\t\tRubberWindowFrame = \"212 190 666 500 0 0 1024 746 \";\n\t\t\t\t},\n\t\t\t);\n\t\t\t\"PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXBuildResultsModule\" = {\n\t\t\t\tFrame = \"{{0, 0}, {480, 217}}\";\n\t\t\t\tPBXModuleWindowStatusBarHidden = YES;\n\t\t\t\tRubberWindowFrame = \"272 407 480 238 0 0 1024 746 \";\n\t\t\t};\n\t\t\t\"PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXDebugCLIModule\" = {\n\t\t\t\tFrame = \"{{0, 0}, {400, 201}}\";\n\t\t\t\tPBXModuleWindowStatusBarHidden = YES;\n\t\t\t\tRubberWindowFrame = \"50 718 400 222 0 0 1024 746 \";\n\t\t\t};\n\t\t\t\"PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXNavigatorGroup\" = {\n\t\t\t\tFrame = \"{{0, 0}, {750, 481}}\";\n\t\t\t\tPBXModuleWindowStatusBarHidden = YES;\n\t\t\t\tRubberWindowFrame = \"61 197 750 502 0 0 1024 746 \";\n\t\t\t};\n\t\t\t\"PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXProjectWorkspaceModule\" = {\n\t\t\t\tFrame = \"{{0, 0}, {666, 458}}\";\n\t\t\t\tPBXProjectWorkspaceModule_GeometryKey_Rev15 = {\n\t\t\t\t};\n\t\t\t\tRubberWindowFrame = \"212 190 666 500 0 0 1024 746 \";\n\t\t\t};\n\t\t\tPBXWorkspaceStateSaveDate = 305745864;\n\t\t};\n\t\tperUserProjectItems = {\n\t\t\t9420ABBC123951F800EF4FDF /* PBXTextBookmark */ = 9420ABBC123951F800EF4FDF /* PBXTextBookmark */;\n\t\t\t9420ABBD123951F800EF4FDF /* PBXTextBookmark */ = 9420ABBD123951F800EF4FDF /* PBXTextBookmark */;\n\t\t\t9420ABBE123951F800EF4FDF /* PlistBookmark */ = 9420ABBE123951F800EF4FDF /* PlistBookmark */;\n\t\t\t9420ABBF123951F800EF4FDF /* PBXTextBookmark */ = 9420ABBF123951F800EF4FDF /* PBXTextBookmark */;\n\t\t\t9420ABC41239521400EF4FDF /* PBXTextBookmark */ = 9420ABC41239521400EF4FDF /* PBXTextBookmark */;\n\t\t\t944D6258085F474800600D6E /* PBXTextBookmark */ = 944D6258085F474800600D6E /* PBXTextBookmark */;\n\t\t\t94BB001D08A54ECD00181406 /* PBXTextBookmark */ = 94BB001D08A54ECD00181406 /* PBXTextBookmark */;\n\t\t\t94E7F76F1237474100A03A11 /* PBXTextBookmark */ = 94E7F76F1237474100A03A11 /* PBXTextBookmark */;\n\t\t\t94E7F7711237474100A03A11 /* PBXTextBookmark */ = 94E7F7711237474100A03A11 /* PBXTextBookmark */;\n\t\t\t94E7F92F1237572100A03A11 /* PBXTextBookmark */ = 94E7F92F1237572100A03A11 /* PBXTextBookmark */;\n\t\t\t94E7F989123759D900A03A11 /* PBXTextBookmark */ = 94E7F989123759D900A03A11 /* PBXTextBookmark */;\n\t\t\t94E7F98A123759D900A03A11 /* PBXTextBookmark */ = 94E7F98A123759D900A03A11 /* PBXTextBookmark */;\n\t\t\t94E7FA0112375E5F00A03A11 /* PBXTextBookmark */ = 94E7FA0112375E5F00A03A11 /* PBXTextBookmark */;\n\t\t\t94E9A04012380A3A0048557C /* PBXTextBookmark */ = 94E9A04012380A3A0048557C /* PBXTextBookmark */;\n\t\t\t94E9A04212380A3A0048557C /* PBXTextBookmark */ = 94E9A04212380A3A0048557C /* PBXTextBookmark */;\n\t\t\t94E9A04D12380B990048557C /* PBXTextBookmark */ = 94E9A04D12380B990048557C /* PBXTextBookmark */;\n\t\t\t94E9A0A012380D830048557C /* PBXTextBookmark */ = 94E9A0A012380D830048557C /* PBXTextBookmark */;\n\t\t\t94E9A0B012380E2B0048557C /* PBXTextBookmark */ = 94E9A0B012380E2B0048557C /* PBXTextBookmark */;\n\t\t\t94E9A0B112380E2B0048557C /* PBXTextBookmark */ = 94E9A0B112380E2B0048557C /* PBXTextBookmark */;\n\t\t\t94E9A0B212380E2B0048557C /* PBXTextBookmark */ = 94E9A0B212380E2B0048557C /* PBXTextBookmark */;\n\t\t\t94E9A0B312380E2B0048557C /* PBXTextBookmark */ = 94E9A0B312380E2B0048557C /* PBXTextBookmark */;\n\t\t\t94E9A0B412380E2B0048557C /* PBXTextBookmark */ = 94E9A0B412380E2B0048557C /* PBXTextBookmark */;\n\t\t\t94E9A0B512380E2B0048557C /* PBXTextBookmark */ = 94E9A0B512380E2B0048557C /* PBXTextBookmark */;\n\t\t};\n\t\tsourceControlManager = 9444E60D06E7B8740063F6CC /* Source Control */;\n\t\tuserBuildSettings = {\n\t\t};\n\t};\n\t9420ABBC123951F800EF4FDF /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94AF35040846F9AB00FA5ACB /* interp.h */;\n\t\tname = \"interp.h: 12\";\n\t\trLen = 1;\n\t\trLoc = 317;\n\t\trType = 0;\n\t\tvrLen = 1522;\n\t\tvrLoc = 0;\n\t};\n\t9420ABBD123951F800EF4FDF /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94ABA8870858C2CB00079BE1 /* LocalePlugin.c */;\n\t\tname = \"LocalePlugin.c: 115\";\n\t\trLen = 19;\n\t\trLoc = 3116;\n\t\trType = 0;\n\t\tvrLen = 1770;\n\t\tvrLoc = 2156;\n\t};\n\t9420ABBE123951F800EF4FDF /* PlistBookmark */ = {\n\t\tisa = PlistBookmark;\n\t\tfRef = 94AF34F10846F91100FA5ACB /* Info-SqueakLocalePlugin__Upgraded_.plist */;\n\t\tfallbackIsa = PBXBookmark;\n\t\tisK = 0;\n\t\tkPath = (\n\t\t\tCFBundleVersion,\n\t\t);\n\t\tname = \"/Users/johnmci/Documents/Squeak3.8.0/platforms/iOS/plugins/SqueakLocale/Info-SqueakLocalePlugin__Upgraded_.plist\";\n\t\trLen = 0;\n\t\trLoc = 9223372036854775807;\n\t};\n\t9420ABBF123951F800EF4FDF /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E7F6C6123740F900A03A11 /* sqMacLocaleCocoa.m */;\n\t\tname = \"sqMacLocaleCocoa.m: 56\";\n\t\trLen = 9;\n\t\trLoc = 2315;\n\t\trType = 0;\n\t\tvrLen = 2544;\n\t\tvrLoc = 1005;\n\t};\n\t9420ABC41239521400EF4FDF /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E7F6C6123740F900A03A11 /* sqMacLocaleCocoa.m */;\n\t\tname = \"sqMacLocaleCocoa.m: 102\";\n\t\trLen = 22;\n\t\trLoc = 4212;\n\t\trType = 0;\n\t\tvrLen = 2600;\n\t\tvrLoc = 3379;\n\t};\n\t94405843085E5A7A004495D0 /* InfoPlist.strings */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = text.plist.strings;\n\t\tname = InfoPlist.strings;\n\t\tpath = /Users/johnmci/Documents/SqueakLocale/build/LocalePlugin.bundle/Contents/Resources/English.lproj/InfoPlist.strings;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9444E60D06E7B8740063F6CC /* Source Control */ = {\n\t\tisa = PBXSourceControlManager;\n\t\tfallbackIsa = XCSourceControlManager;\n\t\tisSCMEnabled = 0;\n\t\tscmConfiguration = {\n\t\t\trepositoryNamesForRoots = {\n\t\t\t\t\"\" = \"\";\n\t\t\t};\n\t\t};\n\t\tscmType = scm.cvs;\n\t};\n\t9444E60E06E7B8740063F6CC /* Code sense */ = {\n\t\tisa = PBXCodeSenseManager;\n\t\tindexTemplatePath = \"\";\n\t};\n\t944D6258085F474800600D6E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94405843085E5A7A004495D0 /* InfoPlist.strings */;\n\t\tname = \"InfoPlist.strings: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 263;\n\t\tvrLoc = 0;\n\t};\n\t947906FD0858E5030068B3F8 /* sqMacLocaleCarbon.c:67 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 94ABA89B0858C5FA00079BE1 /* sqMacLocaleCarbon.c */;\n\t\tfunctionName = \"sqLocMeasurementMetric()\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 67;\n\t\tmodificationTime = 305664750.455028;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t94ABA8870858C2CB00079BE1 /* LocalePlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1405, 4797}}\";\n\t\t\tsepNavSelRange = \"{3116, 19}\";\n\t\t\tsepNavVisRange = \"{2156, 1770}\";\n\t\t\tsepNavVisRect = \"{{0, 1920}, {670, 660}}\";\n\t\t\tsepNavWindowFrame = \"{{153, 28}, {962, 719}}\";\n\t\t};\n\t};\n\t94ABA8900858C3F900079BE1 /* LocalePlugin.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1058, 1222}}\";\n\t\t\tsepNavSelRange = \"{1369, 0}\";\n\t\t\tsepNavVisRange = \"{878, 2289}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {400, 654}}\";\n\t\t};\n\t};\n\t94ABA8920858C40D00079BE1 /* sqMemoryAccess.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1058, 2535}}\";\n\t\t\tsepNavSelRange = \"{145, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1639}\";\n\t\t\tsepNavWindowFrame = \"{{38, 28}, {1206, 974}}\";\n\t\t};\n\t};\n\t94ABA89B0858C5FA00079BE1 /* sqMacLocaleCarbon.c */ = {\n\t\tisa = PBXFileReference;\n\t\tfileEncoding = 4;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqMacLocaleCarbon.c;\n\t\tpath = /Users/johnmci/Documents/Squeak3.8.0/platforms/iOS/plugins/SqueakLocale/sqMacLocaleCarbon.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94ABA91E0858D35E00079BE1 /* Squeak */ = {\n\t\tisa = PBXExecutable;\n\t\tactiveArgIndices = (\n\t\t);\n\t\targumentStrings = (\n\t\t);\n\t\tautoAttachOnCrash = 1;\n\t\tbreakpointsEnabled = 1;\n\t\tconfigStateDict = {\n\t\t\t\"PBXLSLaunchAction-0\" = {\n\t\t\t\tPBXLSLaunchAction = 0;\n\t\t\t\tPBXLSLaunchStartAction = 1;\n\t\t\t\tPBXLSLaunchStdioStyle = 2;\n\t\t\t\tPBXLSLaunchStyle = 0;\n\t\t\t\tclass = PBXLSRunLaunchConfig;\n\t\t\t\tcommandLineArgs = (\n\t\t\t\t);\n\t\t\t\tdisplayName = \"Executable Runner\";\n\t\t\t\tenvironment = {\n\t\t\t\t};\n\t\t\t\tidentifier = com.apple.Xcode.launch.runConfig;\n\t\t\t\tremoteHostInfo = \"\";\n\t\t\t\tstartActionInfo = \"\";\n\t\t\t};\n\t\t};\n\t\tcustomDataFormattersEnabled = 1;\n\t\tdataTipCustomDataFormattersEnabled = 1;\n\t\tdataTipShowTypeColumn = 1;\n\t\tdataTipSortType = 0;\n\t\tdebuggerPlugin = GDBDebugging;\n\t\tdisassemblyDisplayState = 0;\n\t\tdylibVariantSuffix = \"\";\n\t\tenableDebugStr = 1;\n\t\tenvironmentEntries = (\n\t\t);\n\t\texecutableSystemSymbolLevel = 0;\n\t\texecutableUserSymbolLevel = 0;\n\t\tlaunchableReference = 94ABA91F0858D35E00079BE1 /* Squeak.app */;\n\t\tlibgmallocEnabled = 0;\n\t\tname = Squeak;\n\t\tsavedGlobals = {\n\t\t};\n\t\tshowTypeColumn = 0;\n\t\tsourceDirectories = (\n\t\t);\n\t\tvariableFormatDictionary = {\n\t\t};\n\t};\n\t94ABA91F0858D35E00079BE1 /* Squeak.app */ = {\n\t\tisa = PBXFileReference;\n\t\texplicitFileType = wrapper.application;\n\t\tname = Squeak.app;\n\t\tpath = ../../vm/build/Debug/Squeak.app;\n\t\tsourceTree = SOURCE_ROOT;\n\t};\n\t94AF34E00846F91100FA5ACB /* SqueakLocalePlugin */ = {\n\t\tactiveExec = 0;\n\t};\n\t94AF34F10846F91100FA5ACB /* Info-SqueakLocalePlugin__Upgraded_.plist */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {686, 654}}\";\n\t\t\tsepNavSelRange = \"{823, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {400, 654}}\";\n\t\t\tsepNavWindowFrame = \"{{84, 91}, {962, 719}}\";\n\t\t};\n\t};\n\t94AF35000846F98600FA5ACB /* config.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1058, 2288}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1913}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {673, 397}}\";\n\t\t};\n\t};\n\t94AF35040846F9AB00FA5ACB /* interp.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1058, 835}}\";\n\t\t\tsepNavSelRange = \"{317, 1}\";\n\t\t\tsepNavVisRange = \"{0, 1522}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {673, 397}}\";\n\t\t\tsepNavWindowFrame = \"{{61, 7}, {1206, 974}}\";\n\t\t};\n\t};\n\t94BB001C08A54ECA00181406 /* sqMacLocaleCarbon.c:205 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 94ABA89B0858C5FA00079BE1 /* sqMacLocaleCarbon.c */;\n\t\tfunctionName = \"getCountryOrLanguage()\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 205;\n\t\tmodificationTime = 305664750.455007;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t94BB001D08A54ECD00181406 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BBFE8D08A46E3D00181406 /* sqMacLocaleOS9.c */;\n\t\tname = smRegionCode;\n\t\trLen = 12;\n\t\trLoc = 737;\n\t\trType = 0;\n\t\tvrLen = 1065;\n\t\tvrLoc = 0;\n\t};\n\t94BBFE8D08A46E3D00181406 /* sqMacLocaleOS9.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqMacLocaleOS9.c;\n\t\tpath = /Users/johnmci/Documents/SqueakLocale/sqMacLocaleOS9.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E7F6C5123740F900A03A11 /* sqMacLocaleCocoa.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1058, 815}}\";\n\t\t\tsepNavSelRange = \"{1727, 14}\";\n\t\t\tsepNavVisRange = \"{0, 1741}\";\n\t\t\tsepNavWindowFrame = \"{{61, 7}, {1206, 974}}\";\n\t\t};\n\t};\n\t94E7F6C6123740F900A03A11 /* sqMacLocaleCocoa.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1058, 3341}}\";\n\t\t\tsepNavSelRange = \"{4212, 22}\";\n\t\t\tsepNavVisRange = \"{3379, 2600}\";\n\t\t\tsepNavWindowFrame = \"{{38, 28}, {1206, 974}}\";\n\t\t};\n\t};\n\t94E7F76F1237474100A03A11 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E7F7701237474100A03A11 /* sqMacLocaleCarbon.h */;\n\t\tname = \"sqMacLocaleCarbon.h: 9\";\n\t\trLen = 6;\n\t\trLoc = 107;\n\t\trType = 0;\n\t\tvrLen = 189;\n\t\tvrLoc = 0;\n\t};\n\t94E7F7701237474100A03A11 /* sqMacLocaleCarbon.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = sqMacLocaleCarbon.h;\n\t\tpath = /Users/johnmci/Documents/SqueakLocale/sqMacLocaleCarbon.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E7F7711237474100A03A11 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E7F7721237474100A03A11 /* sqMacLocaleCarbon.c */;\n\t\tname = \"sqMacLocaleCarbon.c: 3\";\n\t\trLen = 12;\n\t\trLoc = 31;\n\t\trType = 0;\n\t\tvrLen = 1756;\n\t\tvrLoc = 0;\n\t};\n\t94E7F7721237474100A03A11 /* sqMacLocaleCarbon.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqMacLocaleCarbon.c;\n\t\tpath = /Users/johnmci/Documents/SqueakLocale/sqMacLocaleCarbon.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E7F7F91237521E00A03A11 /* sqMacLocaleCocoa.m:188 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 94E7F6C6123740F900A03A11 /* sqMacLocaleCocoa.m */;\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 188;\n\t\tlocation = LocalePlugin;\n\t\tmodificationTime = 305663429.897318;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t94E7F92F1237572100A03A11 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E7F6C5123740F900A03A11 /* sqMacLocaleCocoa.h */;\n\t\tname = \"sqMacLocaleCocoa.h: 39\";\n\t\trLen = 14;\n\t\trLoc = 1727;\n\t\trType = 0;\n\t\tvrLen = 1741;\n\t\tvrLoc = 0;\n\t};\n\t94E7F989123759D900A03A11 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94ABA8900858C3F900079BE1 /* LocalePlugin.h */;\n\t\tname = \"LocalePlugin.h: 45\";\n\t\trLen = 0;\n\t\trLoc = 1369;\n\t\trType = 0;\n\t\tvrLen = 2289;\n\t\tvrLoc = 878;\n\t};\n\t94E7F98A123759D900A03A11 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E7F98B123759D900A03A11 /* sqUnixLocale.c */;\n\t\tname = \"sqUnixLocale.c: 74\";\n\t\trLen = 21;\n\t\trLoc = 1811;\n\t\trType = 0;\n\t\tvrLen = 1507;\n\t\tvrLoc = 606;\n\t};\n\t94E7F98B123759D900A03A11 /* sqUnixLocale.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqUnixLocale.c;\n\t\tpath = \"/Volumes/330GB Photos/Cog/platforms/unix/plugins/LocalePlugin/sqUnixLocale.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E7FA0112375E5F00A03A11 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E7FA0212375E5F00A03A11 /* sqSqueakOSXApplication+clipboard.m */;\n\t\tname = \"sqSqueakOSXApplication+clipboard.m: 76\";\n\t\trLen = 0;\n\t\trLoc = 3258;\n\t\trType = 0;\n\t\tvrLen = 2662;\n\t\tvrLoc = 945;\n\t};\n\t94E7FA0212375E5F00A03A11 /* sqSqueakOSXApplication+clipboard.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = \"sqSqueakOSXApplication+clipboard.m\";\n\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/platforms/iOS/vm/OSX/sqSqueakOSXApplication+clipboard.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E9A0231237F5D80048557C /* sqMacLocaleCocoa.m:49 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 94E7F6C6123740F900A03A11 /* sqMacLocaleCocoa.m */;\n\t\thitCount = 1;\n\t\tignoreCount = 0;\n\t\tlineNumber = 49;\n\t\tlocation = LocalePlugin;\n\t\tmodificationTime = 305663558.04379;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t94E9A0251237F5D90048557C /* sqMacLocaleCocoa.m:66 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 94E7F6C6123740F900A03A11 /* sqMacLocaleCocoa.m */;\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 66;\n\t\tlocation = LocalePlugin;\n\t\tmodificationTime = 305663429.897705;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t94E9A04012380A3A0048557C /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E9A04112380A3A0048557C /* sqMacLocaleOS9.c */;\n\t\tname = \"sqMacLocaleOS9.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1838;\n\t\tvrLoc = 3456;\n\t};\n\t94E9A04112380A3A0048557C /* sqMacLocaleOS9.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqMacLocaleOS9.c;\n\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/platforms/Mac OS/plugins/LocalePlugin/sqMacLocaleOS9.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E9A04212380A3A0048557C /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E9A04312380A3A0048557C /* sqMacLocaleCarbon.c */;\n\t\tname = \"sqMacLocaleCarbon.c: 23\";\n\t\trLen = 48;\n\t\trLoc = 469;\n\t\trType = 0;\n\t\tvrLen = 1869;\n\t\tvrLoc = 0;\n\t};\n\t94E9A04312380A3A0048557C /* sqMacLocaleCarbon.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqMacLocaleCarbon.c;\n\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/platforms/Mac OS/plugins/LocalePlugin/sqMacLocaleCarbon.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E9A04D12380B990048557C /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E9A04E12380B990048557C /* sqUnixLocale.c */;\n\t\tname = \"sqUnixLocale.c: 742\";\n\t\trLen = 19;\n\t\trLoc = 22241;\n\t\trType = 0;\n\t\tvrLen = 1146;\n\t\tvrLoc = 21234;\n\t};\n\t94E9A04E12380B990048557C /* sqUnixLocale.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqUnixLocale.c;\n\t\tpath = /Users/johnmci/Documents/Squeak3.8.0/platforms/unix/plugins/LocalePlugin/sqUnixLocale.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E9A05212380B990048557C /* sqUnixLocale.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqUnixLocale.c;\n\t\tpath = /Users/johnmci/Documents/Squeak3.8.0/History/4.2.4b1/platforms/unix/plugins/LocalePlugin/sqUnixLocale.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E9A0A012380D830048557C /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E9A05212380B990048557C /* sqUnixLocale.c */;\n\t\tname = \"sqUnixLocale.c: 736\";\n\t\trLen = 9;\n\t\trLoc = 22178;\n\t\trType = 0;\n\t\tvrLen = 1082;\n\t\tvrLoc = 21298;\n\t};\n\t94E9A0B012380E2B0048557C /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 66B8BC5C0381F66500A8011A /* sq.h */;\n\t\tname = \"sq.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 2268;\n\t\tvrLoc = 0;\n\t};\n\t94E9A0B112380E2B0048557C /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 66B8BC5E0381F69100A8011A /* sqVirtualMachine.h */;\n\t\tname = \"sqVirtualMachine.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1859;\n\t\tvrLoc = 0;\n\t};\n\t94E9A0B212380E2B0048557C /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94ABA8920858C40D00079BE1 /* sqMemoryAccess.h */;\n\t\tname = \"sqMemoryAccess.h: 5\";\n\t\trLen = 0;\n\t\trLoc = 145;\n\t\trType = 0;\n\t\tvrLen = 1639;\n\t\tvrLoc = 0;\n\t};\n\t94E9A0B312380E2B0048557C /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 66B8BC580381F61C00A8011A /* sqConfig.h */;\n\t\tname = \"sqConfig.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 302;\n\t\tvrLoc = 0;\n\t};\n\t94E9A0B412380E2B0048557C /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 66B8BC5A0381F63A00A8011A /* sqPlatformSpecific.h */;\n\t\tname = \"sqPlatformSpecific.h: 31\";\n\t\trLen = 0;\n\t\trLoc = 1460;\n\t\trType = 0;\n\t\tvrLen = 2732;\n\t\tvrLoc = 0;\n\t};\n\t94E9A0B512380E2B0048557C /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94AF35000846F98600FA5ACB /* config.h */;\n\t\tname = \"config.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1913;\n\t\tvrLoc = 0;\n\t};\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/SqueakLocale/SqueakLocale.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t94ABA8880858C2CB00079BE1 /* LocalePlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94ABA8870858C2CB00079BE1 /* LocalePlugin.c */; };\n\t\t94ABA8910858C3F900079BE1 /* LocalePlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 94ABA8900858C3F900079BE1 /* LocalePlugin.h */; };\n\t\t94ABA8930858C40D00079BE1 /* sqMemoryAccess.h in Headers */ = {isa = PBXBuildFile; fileRef = 94ABA8920858C40D00079BE1 /* sqMemoryAccess.h */; };\n\t\t94AF34E20846F91100FA5ACB /* sqConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B8BC580381F61C00A8011A /* sqConfig.h */; };\n\t\t94AF34E30846F91100FA5ACB /* sqPlatformSpecific.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B8BC5A0381F63A00A8011A /* sqPlatformSpecific.h */; };\n\t\t94AF34E40846F91100FA5ACB /* sq.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B8BC5C0381F66500A8011A /* sq.h */; };\n\t\t94AF34E50846F91100FA5ACB /* sqVirtualMachine.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B8BC5E0381F69100A8011A /* sqVirtualMachine.h */; };\n\t\t94AF34E80846F91100FA5ACB /* SqueakPlugin.icns in Resources */ = {isa = PBXBuildFile; fileRef = 66C6C8E501DB1EC300A80109 /* SqueakPlugin.icns */; };\n\t\t94AF35010846F98600FA5ACB /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = 94AF35000846F98600FA5ACB /* config.h */; };\n\t\t94AF35050846F9AB00FA5ACB /* interp.h in Headers */ = {isa = PBXBuildFile; fileRef = 94AF35040846F9AB00FA5ACB /* interp.h */; };\n\t\t94E7F6C7123740F900A03A11 /* sqMacLocaleCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 94E7F6C5123740F900A03A11 /* sqMacLocaleCocoa.h */; };\n\t\t94E7F6C8123740F900A03A11 /* sqMacLocaleCocoa.m in Sources */ = {isa = PBXBuildFile; fileRef = 94E7F6C6123740F900A03A11 /* sqMacLocaleCocoa.m */; };\n\t\t94E7F9051237550300A03A11 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94E7F9041237550300A03A11 /* Cocoa.framework */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXBuildRule section */\n\t\t94AF34F70846F94F00FA5ACB /* PBXBuildRule */ = {\n\t\t\tisa = PBXBuildRule;\n\t\t\tcompilerSpec = com.apple.compilers.gcc.3_3;\n\t\t\tfileType = sourcecode.c;\n\t\t\tisEditable = 1;\n\t\t\toutputFiles = (\n\t\t\t);\n\t\t};\n/* End PBXBuildRule section */\n\n/* Begin PBXFileReference section */\n\t\t66B8BC580381F61C00A8011A /* sqConfig.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = sqConfig.h; sourceTree = \"<group>\"; };\n\t\t66B8BC5A0381F63A00A8011A /* sqPlatformSpecific.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = sqPlatformSpecific.h; sourceTree = \"<group>\"; };\n\t\t66B8BC5C0381F66500A8011A /* sq.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = sq.h; sourceTree = \"<group>\"; };\n\t\t66B8BC5E0381F69100A8011A /* sqVirtualMachine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = sqVirtualMachine.h; sourceTree = \"<group>\"; };\n\t\t66C6C8E501DB1EC300A80109 /* SqueakPlugin.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = SqueakPlugin.icns; path = ../../vm/OSX/SqueakPlugin.icns; sourceTree = \"<group>\"; };\n\t\t94ABA8870858C2CB00079BE1 /* LocalePlugin.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = LocalePlugin.c; sourceTree = \"<group>\"; };\n\t\t94ABA8900858C3F900079BE1 /* LocalePlugin.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = LocalePlugin.h; path = ../../../../../Cross/plugins/LocalePlugin/LocalePlugin.h; sourceTree = \"<group>\"; };\n\t\t94ABA8920858C40D00079BE1 /* sqMemoryAccess.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = sqMemoryAccess.h; sourceTree = \"<group>\"; };\n\t\t94AF34F10846F91100FA5ACB /* Info-SqueakLocalePlugin__Upgraded_.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = \"Info-SqueakLocalePlugin__Upgraded_.plist\"; sourceTree = \"<group>\"; };\n\t\t94AF34F20846F91100FA5ACB /* LocalePlugin.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LocalePlugin.bundle; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t94AF35000846F98600FA5ACB /* config.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = \"<group>\"; };\n\t\t94AF35040846F9AB00FA5ACB /* interp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = interp.h; path = ../../vm/interp.h; sourceTree = \"<group>\"; };\n\t\t94E7F6C5123740F900A03A11 /* sqMacLocaleCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqMacLocaleCocoa.h; sourceTree = \"<group>\"; };\n\t\t94E7F6C6123740F900A03A11 /* sqMacLocaleCocoa.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = sqMacLocaleCocoa.m; sourceTree = \"<group>\"; };\n\t\t94E7F9041237550300A03A11 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t94AF34EE0846F91100FA5ACB /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t94E7F9051237550300A03A11 /* Cocoa.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t66B8BC570381F53800A8011A /* iPhone */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94AF35000846F98600FA5ACB /* config.h */,\n\t\t\t\t66B8BC580381F61C00A8011A /* sqConfig.h */,\n\t\t\t\t66B8BC5A0381F63A00A8011A /* sqPlatformSpecific.h */,\n\t\t\t);\n\t\t\tname = iPhone;\n\t\t\tpath = ../../vm/iPhone;\n\t\t\tsourceTree = SOURCE_ROOT;\n\t\t};\n\t\t66DF6BFE01D7DCEA00A80119 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E7F9191237565E00A03A11 /* vm */,\n\t\t\t\t66B8BC570381F53800A8011A /* iPhone */,\n\t\t\t\t94E7F8371237541300A03A11 /* LocalePlugin */,\n\t\t\t\t66DF6BFF01D7DCEA00A80119 /* Sources */,\n\t\t\t\t66DF6C3901D7DCEA00A80119 /* resources */,\n\t\t\t\t66DF6C4501D7DEEE00A80119 /* Products */,\n\t\t\t\t94AF34F10846F91100FA5ACB /* Info-SqueakLocalePlugin__Upgraded_.plist */,\n\t\t\t\t94E7F9041237550300A03A11 /* Cocoa.framework */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66DF6BFF01D7DCEA00A80119 /* Sources */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E7F6C5123740F900A03A11 /* sqMacLocaleCocoa.h */,\n\t\t\t\t94E7F6C6123740F900A03A11 /* sqMacLocaleCocoa.m */,\n\t\t\t);\n\t\t\tname = Sources;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66DF6C3901D7DCEA00A80119 /* resources */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t66C6C8E501DB1EC300A80109 /* SqueakPlugin.icns */,\n\t\t\t);\n\t\t\tname = resources;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66DF6C4501D7DEEE00A80119 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94AF34F20846F91100FA5ACB /* LocalePlugin.bundle */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E7F8371237541300A03A11 /* LocalePlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94ABA8900858C3F900079BE1 /* LocalePlugin.h */,\n\t\t\t\t94ABA8870858C2CB00079BE1 /* LocalePlugin.c */,\n\t\t\t\t94AF35040846F9AB00FA5ACB /* interp.h */,\n\t\t\t);\n\t\t\tname = LocalePlugin;\n\t\t\tpath = ../../vm/src/plugins/LocalePlugin;\n\t\t\tsourceTree = SOURCE_ROOT;\n\t\t};\n\t\t94E7F9191237565E00A03A11 /* vm */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t66B8BC5C0381F66500A8011A /* sq.h */,\n\t\t\t\t66B8BC5E0381F69100A8011A /* sqVirtualMachine.h */,\n\t\t\t\t94ABA8920858C40D00079BE1 /* sqMemoryAccess.h */,\n\t\t\t);\n\t\t\tname = vm;\n\t\t\tpath = ../../../Cross/vm;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXHeadersBuildPhase section */\n\t\t94AF34E10846F91100FA5ACB /* Headers */ = {\n\t\t\tisa = PBXHeadersBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t94AF34E20846F91100FA5ACB /* sqConfig.h in Headers */,\n\t\t\t\t94AF34E30846F91100FA5ACB /* sqPlatformSpecific.h in Headers */,\n\t\t\t\t94AF34E40846F91100FA5ACB /* sq.h in Headers */,\n\t\t\t\t94AF34E50846F91100FA5ACB /* sqVirtualMachine.h in Headers */,\n\t\t\t\t94AF35010846F98600FA5ACB /* config.h in Headers */,\n\t\t\t\t94AF35050846F9AB00FA5ACB /* interp.h in Headers */,\n\t\t\t\t94ABA8910858C3F900079BE1 /* LocalePlugin.h in Headers */,\n\t\t\t\t94ABA8930858C40D00079BE1 /* sqMemoryAccess.h in Headers */,\n\t\t\t\t94E7F6C7123740F900A03A11 /* sqMacLocaleCocoa.h in Headers */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXHeadersBuildPhase section */\n\n/* Begin PBXNativeTarget section */\n\t\t94AF34E00846F91100FA5ACB /* SqueakLocalePlugin */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 943BD77109BFD3D00013220E /* Build configuration list for PBXNativeTarget \"SqueakLocalePlugin\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t94AF34E10846F91100FA5ACB /* Headers */,\n\t\t\t\t94AF34E70846F91100FA5ACB /* Resources */,\n\t\t\t\t94AF34EA0846F91100FA5ACB /* Sources */,\n\t\t\t\t94AF34EE0846F91100FA5ACB /* Frameworks */,\n\t\t\t\t94AF34F00846F91100FA5ACB /* Rez */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t\t94AF34F70846F94F00FA5ACB /* PBXBuildRule */,\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = SqueakLocalePlugin;\n\t\t\tproductInstallPath = \"$(USER_LIBRARY_DIR)/Bundles\";\n\t\t\tproductName = \"mpeg3PluginBundle Debug\";\n\t\t\tproductReference = 94AF34F20846F91100FA5ACB /* LocalePlugin.bundle */;\n\t\t\tproductType = \"com.apple.product-type.bundle\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t66DF6BFD01D7DCEA00A80119 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tbuildConfigurationList = 943BD77509BFD3D00013220E /* Build configuration list for PBXProject \"SqueakLocale\" */;\n\t\t\tcompatibilityVersion = \"Xcode 3.2\";\n\t\t\tdevelopmentRegion = English;\n\t\t\thasScannedForEncodings = 1;\n\t\t\tknownRegions = (\n\t\t\t\tEnglish,\n\t\t\t\tJapanese,\n\t\t\t\tFrench,\n\t\t\t\tGerman,\n\t\t\t);\n\t\t\tmainGroup = 66DF6BFE01D7DCEA00A80119;\n\t\t\tproductRefGroup = 66DF6C4501D7DEEE00A80119 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t94AF34E00846F91100FA5ACB /* SqueakLocalePlugin */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t94AF34E70846F91100FA5ACB /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t94AF34E80846F91100FA5ACB /* SqueakPlugin.icns in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXRezBuildPhase section */\n\t\t94AF34F00846F91100FA5ACB /* Rez */ = {\n\t\t\tisa = PBXRezBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXRezBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t94AF34EA0846F91100FA5ACB /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t94ABA8880858C2CB00079BE1 /* LocalePlugin.c in Sources */,\n\t\t\t\t94E7F6C8123740F900A03A11 /* sqMacLocaleCocoa.m in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin XCBuildConfiguration section */\n\t\t943BD77209BFD3D00013220E /* Development */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_ENABLE_FIX_AND_CONTINUE = YES;\n\t\t\t\tGCC_GENERATE_DEBUGGING_SYMBOLS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGENERATE_PKGINFO_FILE = YES;\n\t\t\t\tINFOPLIST_FILE = \"Info-SqueakLocalePlugin__Upgraded_.plist\";\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tPRODUCT_NAME = LocalePlugin;\n\t\t\t\tSECTORDER_FLAGS = \"\";\n\t\t\t\tUSER_HEADER_SEARCH_PATHS = \"\\\"$(SRCROOT)/../../vm/iPhone\\\"\";\n\t\t\t\tWARNING_CFLAGS = (\n\t\t\t\t\t\"-Wmost\",\n\t\t\t\t\t\"-Wno-four-char-constants\",\n\t\t\t\t\t\"-Wno-unknown-pragmas\",\n\t\t\t\t);\n\t\t\t\tWRAPPER_EXTENSION = bundle;\n\t\t\t};\n\t\t\tname = Development;\n\t\t};\n\t\t943BD77309BFD3D00013220E /* Deployment */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tARCHS = \"$(ARCHS_STANDARD_32_64_BIT)\";\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Distribution: Corporate Smalltalk Consulting Ltd\";\n\t\t\t\tCOPY_PHASE_STRIP = YES;\n\t\t\t\tGENERATE_PKGINFO_FILE = YES;\n\t\t\t\tINFOPLIST_FILE = \"Info-SqueakLocalePlugin__Upgraded_.plist\";\n\t\t\t\tPRODUCT_NAME = LocalePlugin;\n\t\t\t\tSDKROOT = macosx10.5;\n\t\t\t\tUSER_HEADER_SEARCH_PATHS = \"\\\"$(SRCROOT)/../../vm/iPhone\\\"\";\n\t\t\t\tWRAPPER_EXTENSION = bundle;\n\t\t\t};\n\t\t\tname = Deployment;\n\t\t};\n\t\t943BD77609BFD3D00013220E /* Development */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.5;\n\t\t\t\tSDKROOT = macosx10.5;\n\t\t\t};\n\t\t\tname = Development;\n\t\t};\n\t\t943BD77709BFD3D00013220E /* Deployment */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.5;\n\t\t\t\tSDKROOT = macosx10.5;\n\t\t\t};\n\t\t\tname = Deployment;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t943BD77109BFD3D00013220E /* Build configuration list for PBXNativeTarget \"SqueakLocalePlugin\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t943BD77209BFD3D00013220E /* Development */,\n\t\t\t\t943BD77309BFD3D00013220E /* Deployment */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Development;\n\t\t};\n\t\t943BD77509BFD3D00013220E /* Build configuration list for PBXProject \"SqueakLocale\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t943BD77609BFD3D00013220E /* Development */,\n\t\t\t\t943BD77709BFD3D00013220E /* Deployment */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Development;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 66DF6BFD01D7DCEA00A80119 /* Project object */;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/SqueakLocale/sqMacLocaleCocoa.h",
    "content": "//\n//  sqMacLocaleCocoa.h\n//  SqueakLocale\n//\n//  Created by John M McIntosh on 10-09-07.\n/*\n Copyright (c) 2010 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import <Cocoa/Cocoa.h>\n#import \"sq.h\""
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/SqueakLocale/sqMacLocaleCocoa.m",
    "content": "//\n//  sqMacLocaleCocoa.m\n//  SqueakLocale\n//\n//  Created by John M McIntosh on 10-09-07.\n/*\nCopyright (c) 2010 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import \"sqMacLocaleCocoa.h\"\n\nsqInt sqLocInitialize(void) {\n\treturn true;\n}\n\n/************** Country and language ******************/\n\n/* write the country code into the string ptr. ISO 3166 is the relevant source\n * here; see http://www.unicode.org/onlinedat/countries.html for details.\n * Using the 3 character Alpha-3 codes */\nvoid\tsqLocGetCountryInto(char * str) {\n\tNSLocale *locale = [NSLocale autoupdatingCurrentLocale];\n\tNSString *countryCode = [locale objectForKey: NSLocaleCountryCode];\n\tNSUInteger usedByteCount = 0;\n\t[countryCode getBytes: str \n\t\t\t\tmaxLength: 3 \n\t\t\t   usedLength: &usedByteCount \n\t\t\t\t encoding: NSMacOSRomanStringEncoding \n\t\t\t\t  options:NSStringEncodingConversionExternalRepresentation \n\t\t\t\t\trange:NSMakeRange(0,3) \n\t\t   remainingRange: NULL];\n}\n\n/* write the 3 char string describing the language in use into string ptr.\n * ISO 639 is the relevant source here;\n * see http://www.w3.org/WAI/ER/IG/ert/iso639.html\n * for details */\nvoid\tsqLocGetLanguageInto(char * str) {\n\tNSLocale *locale = [NSLocale autoupdatingCurrentLocale];\n\tNSString *languageCode = [locale objectForKey: NSLocaleLanguageCode];\n\tNSUInteger usedByteCount = 0;\n\t[languageCode getBytes: str \n\t\t\t\tmaxLength: 3 \n\t\t\t   usedLength: &usedByteCount \n\t\t\t\t encoding: NSMacOSRomanStringEncoding \n\t\t\t\t  options:NSStringEncodingConversionExternalRepresentation \n\t\t\t\t\trange:NSMakeRange(0,3) \n\t\t   remainingRange: NULL];\n}\n\n/***************** Currency ********************/\n\n/* return 1 (true) if the currency symbol is to be placed in front of the\n *currency amount */\nsqInt\tsqLocCurrencyNotation(void) {\n\n\tNSNumberFormatter *numberFormatter = [[[NSNumberFormatter alloc] init] autorelease];\n    [numberFormatter setNumberStyle: NSNumberFormatterCurrencyStyle];\n    NSString *numberAsString = [numberFormatter stringFromNumber:[NSNumber numberWithFloat: 1.2f]];\n\tNSRange currencyLocation = [numberAsString rangeOfString:[numberFormatter currencySymbol]];\n\treturn (sqInt) (currencyLocation.location == 0);\n}\n\n/* return the length in chars of the curency symbol string */\nsqInt\tsqLocCurrencySymbolSize(void) {\n\tNSLocale *locale = [NSLocale autoupdatingCurrentLocale];\n\tNSString *currencySymbol = [locale objectForKey: NSLocaleCurrencySymbol];\n\treturn [currencySymbol lengthOfBytesUsingEncoding: NSUTF8StringEncoding];\n}\n\n/* write the currency symbol into the string ptr */\nvoid\tsqLocGetCurrencySymbolInto(char * str) {\n\tNSLocale *locale = [NSLocale autoupdatingCurrentLocale];\n\tNSString *currencySymbol = [locale objectForKey: NSLocaleCurrencySymbol];\n\tNSUInteger usedByteCount = 0;\n\t[currencySymbol getBytes: str \n\t\t\t\t maxLength: sqLocCurrencySymbolSize()\n\t\t\t\tusedLength: &usedByteCount \n\t\t\t\t  encoding: NSUTF8StringEncoding \n\t\t\t\t   options:NSStringEncodingConversionExternalRepresentation \n\t\t\t\t\t range:NSMakeRange(0,[currencySymbol length]) \n\t\t\tremainingRange: NULL];\n}\n\n/***************** Numbers and measurements **************/\n\n/* return true if the metric measurements system is to be used, false otherwise\n * (USA is about it) */\nsqInt\tsqLocMeasurementMetric(void) {\n\tNSLocale *locale = [NSLocale autoupdatingCurrentLocale];\n\tNSNumber *metric = [locale objectForKey: NSLocaleUsesMetricSystem];\n\treturn [metric boolValue];\n}\n\n/* write the 1 char used for digit grouping into string ptr.\n * Usually this is . or ,  as in 1,000,000 */\nvoid\tsqLocGetDigitGroupingSymbolInto(char * str) {\n\tNSLocale *locale = [NSLocale autoupdatingCurrentLocale];\n\tNSString *grouping = [locale objectForKey: NSLocaleGroupingSeparator];\t\n\tNSUInteger usedByteCount = 0;\n\t[grouping getBytes: str \n\t\t\t\t maxLength: 1 \n\t\t\t\tusedLength: &usedByteCount \n\t\t\t\t  encoding: NSMacOSRomanStringEncoding \n\t\t\t\t   options:NSStringEncodingConversionExternalRepresentation \n\t\t\t\t\t range:NSMakeRange(0,[grouping length]) \n\t\t\tremainingRange: NULL];\n}\n\n/* write the 1 char used for decimal separation into string ptr.\n * Usually this is . or , */\nvoid\tsqLocGetDecimalSymbolInto(char * str) {\n\tNSLocale *locale = [NSLocale autoupdatingCurrentLocale];\n\tNSString *decimal = [locale objectForKey: NSLocaleDecimalSeparator];\t\n\tNSUInteger usedByteCount = 0;\n\t[decimal getBytes: str \n\t\t\t maxLength: 1 \n\t\t\tusedLength: &usedByteCount \n\t\t\t  encoding: NSMacOSRomanStringEncoding \n\t\t\t   options:NSStringEncodingConversionExternalRepresentation \n\t\t\t\t range:NSMakeRange(0,[decimal length]) \n\t\tremainingRange: NULL];\n}\n\n\n/****************** time and date *********************/\n\nsqInt\tsqLocGetVMOffsetToUTC(void) {\n\t/* return 0 for now */\n\treturn 0;\n}\n\nsqInt\tsqLocGetTimezoneOffset(void) {\n\tNSTimeZone *tz = [NSTimeZone systemTimeZone];\n\tNSInteger offset = [tz secondsFromGMT];\n\treturn (offset)/60;\n}\n\n/* return true if DST is in use, false otherwise */\nsqInt\tsqLocDaylightSavings(void) {\n\tNSTimeZone *tz = [NSTimeZone systemTimeZone];\n\treturn [tz isDaylightSavingTime];\n}\n\n/* return the size in chars of the long date format string */\n\nsqInt\tsqLocLongDateFormatSize(void) {\n\tNSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init]  autorelease];\n\t[dateFormatter setDateStyle:NSDateFormatterLongStyle];\n\t[dateFormatter setTimeStyle:NSDateFormatterNoStyle];\n\tNSString *fmt = [dateFormatter dateFormat];\t\n\treturn [fmt lengthOfBytesUsingEncoding: NSUTF8StringEncoding];\n}\n/*Write the string describing the long date formatting into string ptr.\n * Format is made up of\n * \t\td day, m month, y year,\n * \t\tdouble symbol is null padded, single not padded (m=6, mm=06)\n * \t\tdddd weekday\n * \t\tmmmm month name */\nvoid\tsqLocGetLongDateFormatInto(char * str) {\n\tNSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init]  autorelease];\n\t[dateFormatter setDateStyle:NSDateFormatterLongStyle];\n\t[dateFormatter setTimeStyle:NSDateFormatterNoStyle];\n\tNSString *fmt = [dateFormatter dateFormat];\t\n\tNSUInteger usedByteCount = 0;\n\t[fmt getBytes: str \n\t\t\t maxLength: sqLocLongDateFormatSize() \n\t\t\tusedLength: &usedByteCount \n\t\t\t  encoding: NSUTF8StringEncoding \n\t\t\t   options:NSStringEncodingConversionExternalRepresentation \n\t\t\t\t range:NSMakeRange(0,[fmt length]) \n\t\tremainingRange: NULL];\n\t\n}\n\n/* return the size in chars of the short date format string */\nsqInt\tsqLocShortDateFormatSize(void) {\n\tNSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init]  autorelease];\n\t[dateFormatter setDateStyle:kCFDateFormatterShortStyle];\n\t[dateFormatter setTimeStyle:NSDateFormatterNoStyle];\n\tNSString *fmt = [dateFormatter dateFormat];\t\n\treturn [fmt lengthOfBytesUsingEncoding: NSUTF8StringEncoding];\n}\n/*Write the string describing the short date formatting into string ptr.\n * Format is made up of\n * \t\td day, m month, y year,\n * \t\tdouble symbol is null padded, single not padded (m=6, mm=06)\n * \t\tdddd weekday\n * \t\tmmmm month name */\nvoid\tsqLocGetShortDateFormatInto(char * str) {\n\tNSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init]  autorelease];\n\t[dateFormatter setDateStyle:kCFDateFormatterShortStyle];\n\t[dateFormatter setTimeStyle:NSDateFormatterNoStyle];\n\tNSString *fmt = [dateFormatter dateFormat];\t\n\tNSUInteger usedByteCount = 0;\n\t[fmt getBytes: str \n\t\tmaxLength: sqLocLongDateFormatSize() \n\t   usedLength: &usedByteCount \n\t\t encoding: NSUTF8StringEncoding \n\t\t  options:NSStringEncodingConversionExternalRepresentation \n\t\t\trange:NSMakeRange(0,[fmt length]) \n   remainingRange: NULL];\n}\n\n/* return the size in chars of the time format string */\nsqInt\tsqLocTimeFormatSize(void) {\n\tNSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init]  autorelease];\n\t[dateFormatter setDateStyle:kCFDateFormatterNoStyle];\n\t[dateFormatter setTimeStyle:kCFDateFormatterMediumStyle];\n\tNSString *fmt = [dateFormatter dateFormat];\t\n\treturn [fmt lengthOfBytesUsingEncoding: NSUTF8StringEncoding];\n}\n/* write the string describing the time formatting into string ptr.\n * Format is made up of\n * \t\th hour (h 12, H 24), m minute, s seconds, x (am/pm String)\n * \t\tdouble symbol is null padded, single not padded (h=6, hh=06)  */\nvoid\tsqLocGetTimeFormatInto(char * str) {\n\tNSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init]  autorelease];\n\t[dateFormatter setDateStyle:kCFDateFormatterNoStyle];\n\t[dateFormatter setTimeStyle:kCFDateFormatterMediumStyle];\n\tNSString *fmt = [dateFormatter dateFormat];\t\n\tNSUInteger usedByteCount = 0;\n\t[fmt getBytes: str \n\t\tmaxLength: sqLocTimeFormatSize() \n\t   usedLength: &usedByteCount \n\t\t encoding: NSUTF8StringEncoding \n\t\t  options:NSStringEncodingConversionExternalRepresentation \n\t\t\trange:NSMakeRange(0,[fmt length]) \n   remainingRange: NULL];\n}"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/SqueakObjectiveC/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>ObjectiveCPlugin</string>\n\t<key>CFBundleIconFile</key>\n\t<string>SqueakPlugin.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.ObjectiveCPlugin</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0.3</string>\n\t<key>CFBundleSignature</key>\n\t<string>FAST</string>\n\t<key>CFBundleVersion</key>\n\t<string>1.0.3</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/SqueakObjectiveC/PDColoredProgressView.h",
    "content": "//\n//  PDColoredProgressView.h\n//  PDColoredProgressViewDemo\n//\n//  Created by Pascal Widdershoven on 03-01-09.\n//  Copyright 2009 P-development. All rights reserved.\n//\n//\tThis software is provided 'as-is', without any express or implied \n//\twarranty. In no event will the authors be held liable for any damages \n//\tarising from the use of this software.\n//\n//\tPermission is granted to anyone to use this software for any purpose, \n//\tincluding commercial applications, and to alter it and redistribute it \n//\tfreely, subject to the following restrictions:\n//\n//     1. The origin of this software must not be misrepresented; you must \n//        not claim that you wrote the original software. If you use this \n//        software in a product, an acknowledgment in the product \n//        documentation (and/or about box) would be appreciated but is not \n//        required.\n//\n//     2. Altered source versions must be plainly marked as such, and must\n//        not be misrepresented as being the original software.\n//\n//     3. This notice may not be removed or altered from any source \n//        distribution.\n//        \n\n#import <UIKit/UIKit.h>\n\n\n@interface PDColoredProgressView : UIProgressView {\n\tUIColor *_tintColor;\n}\n\n/**\n Set the desired tintColor for this control\n **/\n- (void) setTintColor: (UIColor *) aColor;\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/SqueakObjectiveC/PDColoredProgressView.m",
    "content": "//\n//  PDColoredProgressView.m\n//  PDColoredProgressViewDemo\n//\n//  Created by Pascal Widdershoven on 03-01-09.\n//  Copyright 2009 P-development. All rights reserved.\n//\n//\tThis software is provided 'as-is', without any express or implied \n//\twarranty. In no event will the authors be held liable for any damages \n//\tarising from the use of this software.\n//\n//\tPermission is granted to anyone to use this software for any purpose, \n//\tincluding commercial applications, and to alter it and redistribute it \n//\tfreely, subject to the following restrictions:\n//\n//     1. The origin of this software must not be misrepresented; you must \n//        not claim that you wrote the original software. If you use this \n//        software in a product, an acknowledgment in the product \n//        documentation (and/or about box) would be appreciated but is not \n//        required.\n//\n//     2. Altered source versions must be plainly marked as such, and must\n//        not be misrepresented as being the original software.\n//\n//     3. This notice may not be removed or altered from any source \n//        distribution.\n//    \n\n#import \"PDColoredProgressView.h\"\n#import \"drawing.m\"\n\n\n@implementation PDColoredProgressView\n\n- (void)drawRect:(CGRect)rect {\n\tif([self progressViewStyle] == UIProgressViewStyleDefault)\n\t{\n\t\tCGContextRef ctx = UIGraphicsGetCurrentContext();\n\t\t\n\t\t//draw first white layer\n\t\taddRoundedRectToPath(ctx, rect, 4, 4);\n\t\tCGContextClip(ctx);\n\t\t\n\t\tCGContextSetRGBFillColor(ctx, 1, 1, 1, 1);\n\t\tCGContextFillRect(ctx, rect);\n\t\t\n\t\t//draw lower gray line\n\t\tCGContextSetRGBStrokeColor(ctx, 178.0/255.0, 178.0/255.0, 178.0/255.0, 0.9);\n\t\tCGContextSetLineWidth(ctx, 2);\n\t\tCGContextMoveToPoint(ctx, 2.2, rect.size.height);\n\t\tCGContextAddLineToPoint(ctx, rect.size.width - 2.2, rect.size.height);\n\t\tCGContextStrokePath(ctx);\n\t\t\n\t\t//fill upperhalf with light grey\n\t\tCGRect upperhalf = rect;\n\t\tupperhalf.size.height /= 1.75;\n\t\tupperhalf.origin.y = 0;\n\t\t\n\t\tCGContextSetRGBFillColor(ctx, 202.0/255.0, 202.0/255.0, 202.0/255.0, 0.9);\n\t\tCGContextFillRect(ctx, upperhalf);\n\t\t\n\t\t//fill a part of the upper half with a somewhat darker grey\n\t\tCGRect upperhalfTop = upperhalf;\n\t\tupperhalfTop.size.height /= 2.7;\n\t\tCGContextSetRGBFillColor(ctx, 163.0/255.0, 163.0/255.0, 163.0/255.0, 0.8);\n\t\tCGContextFillRect(ctx, upperhalfTop);\n\t\t\n\t\t//fill the progress part with our tintcolor\n\t\tif(_tintColor == nil)\n\t\t\t_tintColor = [[UIColor alloc]initWithRed: 43.0/255.0 green: 134.0/255.0 blue: 225.0/255.0 alpha: 1];\n\t\t\n\t\tCGRect progressRect = rect;\n\t\tprogressRect.size.width *= [self progress];\n\t\t\n\t\taddRoundedRectToPath(ctx, progressRect, 4, 4);\n\t\tCGContextClip(ctx);\n\t\t\n\t\tCGContextSetFillColorWithColor(ctx, [_tintColor CGColor]);\n\t\tCGContextFillRect(ctx, progressRect);\n\t\t\n\t\tprogressRect.size.width -= 1.25;\n\t\tprogressRect.origin.x += 0.625;\n\t\tprogressRect.size.height -= 1.25;\n\t\tprogressRect.origin.y += 0.625;\n\t\t\n\t\taddRoundedRectToPath(ctx, progressRect, 4, 4);\n\t\tCGContextClip(ctx);\n\t\tCGContextSetLineWidth(ctx, 1);\n\t\tCGContextSetRGBStrokeColor(ctx, 20.0/255.0, 20.0/255.0, 20.0/255.0, 0.6);\n\t\tCGContextStrokeRect(ctx, progressRect);\n\t\t\n\t\t//draw white linear gradient over upperhalf\n\t\tCGFloat colors[8] = {\n\t\t\t1, 1, 1, 0.45,\n\t\t\t1, 1, 1, 0.75\n\t\t};\n\t\t\n\t\tfillRectWithLinearGradient(ctx, upperhalf, colors, 2, nil);\n\t}\n\telse\n\t{\n\t\t[super drawRect: rect];\n\t}\n}\n\n- (void) setTintColor: (UIColor *) aColor {\n\t[_tintColor release];\n\t_tintColor = [aColor retain];\n}\n\n\n- (void)dealloc {\n    [super dealloc];\n\t[_tintColor release];\n}\n\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/SqueakObjectiveC/drawing.m",
    "content": "//\n//  drawing.m\n//  PDColoredProgressViewDemo\n//\n//  Created by Pascal Widdershoven on 03-01-09.\n//  Copyright 2009 P-development. All rights reserved.\n//\n\nstatic void addRoundedRectToPath(CGContextRef context, CGRect rect, float ovalWidth,\n\t\t\t\t\t\t\t\t float ovalHeight)\n{\n\tfloat fw, fh;\n\t// If the width or height of the corner oval is zero, then it reduces to a right angle,\n\t// so instead of a rounded rectangle we have an ordinary one.\n\tif (ovalWidth == 0 || ovalHeight == 0) {\n\t\tCGContextAddRect(context, rect);\n\t\treturn;\n\t}\n\t\n\t//  Save the context's state so that the translate and scale can be undone with a call\n\t//  to CGContextRestoreGState.\n\tCGContextSaveGState(context);\n\t\n\t//  Translate the origin of the contex to the lower left corner of the rectangle.\n\tCGContextTranslateCTM(context, CGRectGetMinX(rect), CGRectGetMinY(rect));\n\t\n\t//Normalize the scale of the context so that the width and height of the arcs are 1.0\n\tCGContextScaleCTM(context, ovalWidth, ovalHeight);\n\t\n\t// Calculate the width and height of the rectangle in the new coordinate system.\n\tfw = CGRectGetWidth(rect) / ovalWidth;\n\tfh = CGRectGetHeight(rect) / ovalHeight;\n\t\n\t// CGContextAddArcToPoint adds an arc of a circle to the context's path (creating the rounded\n\t// corners).  It also adds a line from the path's last point to the begining of the arc, making\n\t// the sides of the rectangle.\n\tCGContextMoveToPoint(context, fw, fh/2);  // Start at lower right corner\n\tCGContextAddArcToPoint(context, fw, fh, fw/2, fh, 1);  // Top right corner\n\tCGContextAddArcToPoint(context, 0, fh, 0, fh/2, 1); // Top left corner\n\tCGContextAddArcToPoint(context, 0, 0, fw/2, 0, 1); // Lower left corner\n\tCGContextAddArcToPoint(context, fw, 0, fw, fh/2, 1); // Back to lower right\n\t\n\t// Close the path\n\tCGContextClosePath(context);\n\t\n\t// Restore the context's state. This removes the translation and scaling\n\t// but leaves the path, since the path is not part of the graphics state.\n\tCGContextRestoreGState(context);\n}\n\nstatic void fillRectWithLinearGradient(CGContextRef context, CGRect rect, CGFloat colors[], int numberOfColors, CGFloat locations[]) {\n\tCGContextSaveGState(context);\n\t\n\tif(!CGContextIsPathEmpty(context))\n\t\tCGContextClip(context);\n\t\n\tCGContextTranslateCTM(context, CGRectGetMinX(rect), CGRectGetMinY(rect));\n\tCGPoint start = CGPointMake(0, 0);\n\tCGPoint end = CGPointMake(0, rect.size.height);\n\t\n\tCGColorSpaceRef space = CGColorSpaceCreateDeviceRGB();\n    CGGradientRef gradient = CGGradientCreateWithColorComponents(space, colors, locations, numberOfColors);\n\tCGContextDrawLinearGradient(context, gradient, end, start, 0);\n\tCGContextRestoreGState(context);\n\t\n\tCGColorSpaceRelease(space);\n\tCGGradientRelease(gradient);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/SqueakObjectiveC/squeakProxy.h",
    "content": "//\n//  squeakProxy.h\n//  SqueakObjectiveC\n//\n//  Created by John M McIntosh on 01/02/09.\n//  Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n/* \n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n\n#import <objc/runtime.h>\n#import \"sq.h\"\n\n\nextern struct VirtualMachine* interpreterProxy;\n\n/* Protocol * foo1 = @protocol(CLLocationManagerDelegate);\t\n Protocol * foo2 = @protocol(NSCoding);\t\n Protocol * foo3 = @protocol(NSCopying);\t\n Protocol * foo4 = @protocol(NSDecimalNumberBehaviors);\t\n Protocol * foo5 = @protocol(NSFastEnumeration);\t\n Protocol * foo6 = @protocol(NSLocking);\t\n Protocol * foo7 = @protocol(NSMutableCopying);\t\n Protocol * foo8 = @protocol(NSObject);\t\n Protocol * foo9 = @protocol(NSURLAuthenticationChallengeSender);\t\n Protocol * foo10 = @protocol(NSURLProtocolClient);\t\n Protocol * foo11 = @protocol(UIAccelerometerDelegate);\t\n Protocol * foo12 = @protocol(UIAlertViewDelegate);\t\n Protocol * foo13 = @protocol(UIApplicationDelegate);\t\n Protocol * foo14 = @protocol(UIImagePickerControllerDelegate);\t\n Protocol * foo15 = @protocol(UINavigationBarDelegate);\t\n Protocol * foo16 = @protocol(UINavigationControllerDelegate);\t\n Protocol * foo17 = @protocol(UIPickerViewDataSource);\t\n Protocol * foo18 = @protocol(UIPickerViewDelegate);\t\n Protocol * foo19 = @protocol(UISearchBarDelegate);\t\n Protocol * foo20 = @protocol(UIScrollViewDelegate);\t\n Protocol * foo21 = @protocol(UITabBarControllerDelegate);\n Protocol * foo22 = @protocol(UITabBarDelegate);\t\n Protocol * foo23 = @protocol(UITableViewDataSource);\t\n Protocol * foo24 = @protocol(UITableViewDelegate);\t\n Protocol * foo25 = @protocol(UITextFieldDelegate);\t\n Protocol * foo26 = @protocol(UITextInputTraits);\t\n Protocol * foo27 = @protocol(UITextViewDelegate);\t\n Protocol * foo28 = @protocol(UIWebViewDelegate);\t*/\n\n@interface SqueakProxy : NSObject\n{\n\tsqInt sem;\n\tProtocol* protocol;\n\tNSInvocation* invocation;\n\tNSConditionLock* lockForSqueak;\n\tNSMutableDictionary *sigs;\n\tid\ttarget;\n\tsqInt\tcallbackid;\n\tBOOL\tisCarbonVM;\n}\n- (id) initWithSemaphore: (sqInt) squeakSem protocolNSString: (NSString *) nameString target: (id) aTarget;\n- (void) setReturnValue: (void*) pointer;\n- (BOOL) isDataTypeAware;\n- (void) setIsCarbonVM;\n\n@property (nonatomic,assign) sqInt sem;\n@property (nonatomic,assign) Protocol* protocol;\n@property (nonatomic,assign) NSInvocation* invocation;\n@property (nonatomic,assign) NSConditionLock* lockForSqueak;\n@property (nonatomic,assign) NSMutableDictionary *sigs;\n@property (nonatomic,retain) id target;\n@property (nonatomic,assign) sqInt callbackid;\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/SqueakObjectiveC/squeakProxy.m",
    "content": "//\n//  squeakProxy.m\n//  SqueakObjectiveC\n//\n//  Created by John M McIntosh on 01/02/09.\n//  Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n\n/* \n Some code from \n http://www.squeaksource.com/ObjectiveCBridge.html\n developers and contributors \n Creator:\tAlain Fischer\n Admin:\tAvi Bryant, Alain Fischer\n Developer:\tTodd Blanchard\n \n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell \n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import \"squeakProxy.h\"\n\n\n@implementation SqueakProxy\n\n@synthesize sem;\n@synthesize invocation;\n@synthesize lockForSqueak;\n@synthesize sigs;\n@synthesize protocol;\n@synthesize target;\n@synthesize callbackid;\n\n- (id) initWithSemaphore: (sqInt) squeakSem protocolNSString: (NSString *) nameString target: aTarget\n{\n\tsem = squeakSem;\n\tif (nameString)\n\t\tprotocol = objc_getProtocol([nameString UTF8String]);\n\telse\n\t\tprotocol = nil;\n\t\n\tif (aTarget) {\n\t\t[self setTarget: aTarget];\n\t} else {\n\t\tNSObject *dummy = [[NSObject alloc] init];\n\t\t[self setTarget: dummy];\n\t\t[dummy release];\n\t}\n\t\n\tlockForSqueak = [[NSConditionLock alloc] initWithCondition: 0];\n\tsigs = [[NSMutableDictionary alloc] initWithCapacity: 10];\n\tisCarbonVM = NO;\n\tcallbackid = 0;\n\t\n\treturn self;\n}\n\n#include <dlfcn.h>\n/*- (void) forwardInvocation: (NSInvocation*) anInvocation\n{\n\tNSDate *timeout;\n\t//\tNSLog(@\"forwardInvocation: %@\", anInvocation);\n\t//\tNSLog(@\"currentThread: %@\", [NSThread currentThread]);\n\tSEL selector = [anInvocation selector];\n\tNSString *selectorString = NSStringFromSelector(selector);\n\tif (![sigs objectForKey: selectorString]) {\n\t\t[anInvocation invokeWithTarget: target];\n\t\treturn;\n\t}\n\t\n\tif([lockForSqueak lockWhenCondition: 0 beforeDate: (timeout = [[NSDate alloc] initWithTimeIntervalSinceNow: 3.0])])\n\t{ \n\t\t// NSLog(@\"inside lock 0\");\n\t\t[lockForSqueak unlockWithCondition: 1];\n\t\t[timeout release];\n\t\tinvocation = [anInvocation retain];\n\t\t\n\t\t// NSLog(@\"signalling squeak\");\n\t\tinterpreterProxy->signalSemaphoreWithIndex(sem);\n\t\t\n\t\tif (isCarbonVM)\n\t\t\tinterpreterProxy->callbackEnter(&callbackid);\n\t\t\n\t\tif([lockForSqueak lockWhenCondition: 2 beforeDate: (timeout = [[NSDate alloc] initWithTimeIntervalSinceNow: 5.0])])\n\t\t{\n\t\t\t// NSLog(@\"inside lock 2\");\n\t\t\t[timeout release];\n\t\t\t[invocation release];\n\t\t\tinvocation = nil;\n\t\t\t[lockForSqueak unlockWithCondition: 0];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// NSLog(@\"failed lock 2\");\n\t\t\t[timeout release];\n\t\t\t[invocation release];\n\t\t\tinvocation = nil;\n\t\t\t[lockForSqueak unlockWithCondition: 0];\n\t\t}\n\t\t//NSLog(@\"returning\");\n\t}\n\telse\n\t{\n\t\t[timeout release];\n\t\t//NSLog(@\"failed lock 0\");\n\t}\n}*/\n\n- (NSMethodSignature *) methodSignatureForSelector: (SEL) selector\n{\n\tNSMethodSignature* sig;\n\tNSString* sigAsString;\n\tsig = [target methodSignatureForSelector: selector];\n\tif (sig)\n\t\treturn sig;\n\t\n\tsig = [super methodSignatureForSelector: selector];\n\tif(sig) \n\t\treturn sig;\n\t\n\tNSString *selectorString = NSStringFromSelector (selector);\n\t\n\tif (sigAsString = [sigs objectForKey: selectorString]) {\n\t\t\n\t\tif (protocol) {\n\t\t\tstruct objc_method_description methodDescription;\n\t\t\tmethodDescription = protocol_getMethodDescription(protocol, selector, YES, YES);\n\t\t\tif(methodDescription.name == NULL) {\n\t\t\t\tmethodDescription = protocol_getMethodDescription(protocol, selector, NO, YES);\n\t\t\t}\n\t\t\t\n\t\t\tif(methodDescription.name != NULL) {\n\t\t\t\tNSMethodSignature *foo = [NSMethodSignature signatureWithObjCTypes:methodDescription.types];\n\t\t\t\treturn foo;\n\t\t\t}\n\t\t}\n\t\tNSMethodSignature *foo = [NSMethodSignature signatureWithObjCTypes: [sigAsString cStringUsingEncoding: NSASCIIStringEncoding]];\n\t\treturn foo;\n\t}\n\t\n\treturn nil;\n}\t\n\n- (BOOL) respondsToSelector: (SEL) selector\n{\n\tif([super respondsToSelector: selector]) \n\t\treturn true;\n\t\n\tif ([target respondsToSelector: selector]) \n\t\treturn true;\n\t\n\tNSString *which = NSStringFromSelector(selector);\n\t\n\tif ([sigs objectForKey: which]) \n\t\treturn true;\n\t\n\treturn false;\n}\n\n- (void) setReturnValue: (void*) pointer {\n\t[invocation setReturnValue: &pointer];\n}\n\n- (BOOL) isDataTypeAware {\n\treturn YES;\n}\n\n- (void) setIsCarbonVM {\n\tisCarbonVM = YES;\n}\n\n- (void) dealloc\n{\n\t[lockForSqueak release];\n\t[sigs release];\n\t[target release];\n\t[super dealloc];\n}\n\n@end\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/SqueakObjectiveC/squeakSUnitTester.h",
    "content": "//\n//  squeakSUnitTester.h\n//  SqueakObjectiveC\n//\n//  Created by John M McIntosh on 9/25/08.\n/* Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n//\n\n@interface squeakSUnitTester : NSObject \n\t- (char) test0char;\n- (int) test0int;\n- (short) test0short;\n- (long) test0long;\n- (long long) test0longlong;\n- (unsigned char) test0unsignedchar;\n- (unsigned int) test0unsignedint;\n- (unsigned short) test0unsignedshort;\n- (unsigned long) test0unsignedlong;\n- (unsigned long long) test0unsignedlonglong;\n- (float) test0float;\n- (double) test0double;\n- (void) test0void;\n- (char *) test0charpointer;\n- (squeakSUnitTester *) test0object;\n- (Class) test0class;\n- (SEL) test0methodselector;\n- (CGRect) test0CGRect;\n\n- (char) test0char: (char *) ignore;\n- (int) test0int: (char *) ignore;\n- (short) test0short: (char *) ignore;\n- (long) test0long: (char *) ignore;\n- (long long) test0longlong: (char *) ignore;\n- (unsigned char) test0unsignedchar: (char *) ignore;\n- (unsigned int) test0unsignedint: (char *) ignore;\n- (unsigned short) test0unsignedshort: (char *) ignore;\n- (unsigned long) test0unsignedlong: (char *) ignore;\n- (unsigned long long) test0unsignedlonglong: (char *) ignore;\n- (float) test0float: (char *) ignore;\n- (double) test0double: (char *) ignore;\n- (void) test0void: (char *) ignore;\n- (char *) test0charpointer: (char *) ignore;\n- (squeakSUnitTester *) test0object: (char *) ignore;\n- (Class) test0class: (char *) ignore;\n- (SEL) test0methodselector: (char *) ignore;\n- (CGRect) test0CGRect: (char *) ignore;\n\n- (char) test0char: (char *) ignore two: (char *) ignore2;\n\t- (int) test0int: (char *) ignore two: (char *) ignore2;\n\t   - (short) test0short: (char *) ignore two: (char *) ignore2;\n- (long) test0long: (char *) ignore two: (char *) ignore2;\n- (long long) test0longlong: (char *) ignore two: (char *) ignore2;\n- (unsigned char) test0unsignedchar: (char *) ignore two: (char *) ignore2;\n- (unsigned int) test0unsignedint: (char *) ignore two: (char *) ignore2;\n- (unsigned short) test0unsignedshort: (char *) ignore two: (char *) ignore2;\n- (unsigned long) test0unsignedlong: (char *) ignore two: (char *) ignore2;\n- (unsigned long long) test0unsignedlonglong: (char *) ignore two: (char *) ignore2;\n- (float) test0float: (char *) ignore two: (char *) ignore2;\n- (double) test0double: (char *) ignore two: (char *) ignore2;\n- (void) test0void: (char *) ignore two: (char *) ignore2;\n- (char *) test0charpointer: (char *) ignore two: (char *) ignore2;\n- (squeakSUnitTester *) test0object: (char *) ignore two: (char *) ignore2;\n- (Class) test0class: (char *) ignore two: (char *) ignore2;\n- (SEL) test0methodselector: (char *) ignore two: (char *) ignore2;\n- (CGRect) test0CGRect: (char *) ignore two: (char *) ignore2;\n\t\t\t\t\t\t\t\t\t\t\t  \n\t\t\t\t\t\t\t\t\t\t\t  - (char) test0char: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n- (int) test0int: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n- (short) test0short: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n- (long) test0long: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n- (long long) test0longlong: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   - (unsigned char) test0unsignedchar: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n- (unsigned int) test0unsignedint: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n- (unsigned short) test0unsignedshort: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t - (unsigned long) test0unsignedlong: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n- (unsigned long long) test0unsignedlonglong: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n- (float) test0float: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n- (double) test0double: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n- (void) test0void: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n- (char *) test0charpointer: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   - (squeakSUnitTester *) test0object: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n- (Class) test0class: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n- (SEL) test0methodselector: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n- (CGRect) test0CGRect: (char *) ignore two: (char *) ignore2 three: (char *) ignore3;\n\n- (char) test1char: (char) ignore;\n- (int) test1int: (int) ignore;\n- (short) test1short: (short) ignore;\n- (long) test1long: (long) ignore;\n- (long long) test1longlong: (long long) ignore;\n- (unsigned char) test1unsignedchar: (unsigned char) ignore;\n- (unsigned int) test1unsignedint: (unsigned int) ignore;\n- (unsigned short) test1unsignedshort: (unsigned short) ignore;\n- (unsigned long) test1unsignedlong: (unsigned long) ignore;\n- (unsigned long long) test1unsignedlonglong: (unsigned long long) ignore;\n- (float) test1float: (float) ignore;\n- (double) test1double: (double) ignore;\n- (char *) test1charpointer: (char *) ignore;\n- (squeakSUnitTester *) test1object: (squeakSUnitTester *) ignore;\n- (Class) test1class: (Class) ignore;\n- (SEL) test1methodselector: (SEL) ignore;\n- (CGRect) test1CGRect: (CGRect) ignore;\n\n- (char) test2char: (squeakSUnitTester *)ignore two: (squeakSUnitTester *) ignore2;\n- (int) test2int: (squeakSUnitTester *)ignore two: (squeakSUnitTester *) ignore2;\n- (short) test2short: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2;\n- (long) test2long: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2;\n- (long long) test2longlong: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2;\n- (unsigned char) test2unsignedchar: (squeakSUnitTester *)ignore two: (squeakSUnitTester *) ignore2;\n- (unsigned int) test2unsignedint: (squeakSUnitTester *)ignore two: (squeakSUnitTester *) ignore2;\n- (unsigned short) test2unsignedshort: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2;\n- (unsigned long) test2unsignedlong: (squeakSUnitTester *)ignore two: (squeakSUnitTester *) ignore2;\n- (unsigned long long) test2unsignedlonglong: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2;\n- (float) test2float: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2;\n- (double) test2double: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2;\n- (void) test2void: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2;\n- (char *) test2charpointer: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2;\n- (squeakSUnitTester *) test2object: (squeakSUnitTester *)ignore two: (squeakSUnitTester *) ignore2;\n- (Class) test2class: (squeakSUnitTester *)ignore two: (squeakSUnitTester *) ignore2;\n- (SEL) test2methodselector: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2 ;\n- (CGRect) test2CGRect: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2 ;\n\n- (oneway void) testQualifier0v;\n- (oneway void) testQualifier1v: (squeakSUnitTester *)ignore;\n- (oneway void) testQualifier2v: (squeakSUnitTester *)ignore two:  (squeakSUnitTester *)ignore2;\n- (oneway void) testQualifier3v: (squeakSUnitTester *)ignore two:  (squeakSUnitTester *)ignore2  three: (squeakSUnitTester *)ignore3;\n- (squeakSUnitTester *) testQualifier1io: (inout squeakSUnitTester *)ignore;\n- (squeakSUnitTester *) testQualifier2io: (inout squeakSUnitTester *)ignore two:  (inout squeakSUnitTester *)ignore2;\n- (squeakSUnitTester *) testQualifier3io: (inout squeakSUnitTester *)ignore two:  (inout squeakSUnitTester *)ignore2  three: (inout squeakSUnitTester *)ignore3;\n- (squeakSUnitTester *) testQualifier1i: (in squeakSUnitTester *)ignore;\n- (squeakSUnitTester *) testQualifier2i: (in squeakSUnitTester *)ignore two:  (in squeakSUnitTester *)ignore2;\n- (squeakSUnitTester *) testQualifier3i: (in squeakSUnitTester *)ignore two:  (in squeakSUnitTester *)ignore2  three: (in squeakSUnitTester *)ignore3;\n- (squeakSUnitTester *) testQualifier1o: (out squeakSUnitTester *)ignore;\n- (squeakSUnitTester *) testQualifier2o: (out squeakSUnitTester *)ignore two:  (out squeakSUnitTester *)ignore2;\n- (squeakSUnitTester *) testQualifier3o: (out squeakSUnitTester *)ignore two:  (out squeakSUnitTester *)ignore2  three: (out squeakSUnitTester *)ignore3;\n- (squeakSUnitTester *) testQualifier1r: (inout byref squeakSUnitTester *)ignore;\n- (squeakSUnitTester *) testQualifier2r: (inout byref  squeakSUnitTester *)ignore two:  (inout byref  squeakSUnitTester *)ignore2;\n- (squeakSUnitTester *) testQualifier3r: (inout byref  squeakSUnitTester *)ignore two:  (inout byref  squeakSUnitTester *)ignore2  three: (inout byref  squeakSUnitTester *)ignore3;\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/SqueakObjectiveC/squeakSUnitTester.m",
    "content": "//\n//  squeakSUnitTester.m\n//  SqueakObjectiveC\n//\n//  Created by John M McIntosh on 9/25/08.\n/* Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import \"squeakSUnitTester.h\"\n\n\n@implementation squeakSUnitTester\n- (char) test0char {\n\treturn 'A';\n}\n- (int) test0int {\n\treturn -1;\n}\n- (short) test0short {\n\treturn 0xFFFF;\n}\n- (long) test0long {\n\treturn 0xFFFFFFFF;\n}\n- (long long) test0longlong {\n\treturn 0xFFFFFFFFFFFFFFFFLL;\n}\n- (unsigned char) test0unsignedchar{\n\treturn 'A';\n}\n- (unsigned int) test0unsignedint{\n\treturn 0xFFFFFFFF;\n}\n- (unsigned short) test0unsignedshort {\n\treturn 0xFFFF;\n}\n- (unsigned long) test0unsignedlong{\n\treturn 0xFFFFFFFF;\n}\n- (unsigned long long) test0unsignedlonglong {\n\treturn 0xFFFFFFFFFFFFFFFFLL;\n}\n- (float) test0float {\n\treturn 8.8f;\n}\n- (double) test0double {\n\treturn 8.8;\n}\n- (void) test0void {\n}\n- (char *) test0charpointer {\n\tstatic char* squeak = \"squeak\";\n\treturn squeak;\n}\n- (squeakSUnitTester *) test0object {\n\treturn [squeakSUnitTester new];\n}\n- (Class) test0class {\n\treturn [squeakSUnitTester class];\n}\n- (SEL) test0methodselector {\n\tSEL selector;\n\tselector = NSSelectorFromString(\n\t\t\t\t\t\t\t\t\t@\"initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:\");\n\treturn selector;\n}\n- (CGRect) test0CGRect {\nCGRect foo;\n\tfoo.origin.x = 1.0;\nfoo.origin.y = 2.0;\nfoo.size.width = 3.0;\nfoo.size.height = 4.0;\nreturn foo;\n\t}\n\t\n\t- (char) test0char: (char *)ignore {\nreturn 'A';\n\t\t}\n\t\t- (int) test0int: (char *)ignore {\nreturn -1;\n}\n- (short) test0short: (char *)ignore {\n\t\t\treturn 0xFFFF;\n}\n- (long) test0long: (char *)ignore {\nreturn 0xFFFFFFFF;\n\t\t\t\t}\n\t\t\t\t- (long long) test0longlong: (char *)ignore {\n\t  return 0xFFFFFFFFFFFFFFFFLL;\n}\n- (unsigned char) test0unsignedchar: (char *)ignore{\n\t\t  return 'A';\n\t\t  }\n\t  - (unsigned int) test0unsignedint: (char *)ignore{\nreturn 0xFFFFFFFF;\n\t\t  }\n\t\t  - (unsigned short) test0unsignedshort: (char *)ignore {\nreturn 0xFFFF;\n\t\t\t  }\n\t\t\t  - (unsigned long) test0unsignedlong: (char *)ignore{\nreturn 0xFFFFFFFF;\n\t\t\t\t  }\n\t\t\t\t  - (unsigned long long) test0unsignedlonglong: (char *)ignore {\nreturn 0xFFFFFFFFFFFFFFFFLL;\n}\n- (float) test0float: (char *)ignore {\nreturn 8.8f;\n\t}\n\t- (double) test0double: (char *)ignore {\n\treturn 8.8;\n}\n- (void) test0void: (char *)ignore {\n}\n- (char *) test0charpointer: (char *)ignore {\nstatic char* squeak = \"squeak\";\nreturn squeak;\n\t}\n\t- (squeakSUnitTester *) test0object: (char *)ignore {\nreturn [squeakSUnitTester new];\n\t\t}\n\t\t- (Class) test0class: (char *)ignore {\n\t\treturn [squeakSUnitTester class];\n\t\t}\n\t\t- (SEL) test0methodselector: (char *)ignore {\n\t\tSEL selector;\n\t\tselector = NSSelectorFromString(\n\t\t@\"initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:\");\nreturn selector;\n\t\t\t}\n\t\t\t- (CGRect) test0CGRect: (char *)ignore {\n\t\t CGRect foo;\n\t\t foo.origin.x = 1.0;\n\t\t\t\tfoo.origin.y = 2.0;\nfoo.size.width = 3.0;\nfoo.size.height = 4.0;\n\t\t\t\t\treturn foo;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t- (char) test0char: (char *)ignore two: (char *) ignore2 {\nreturn 'A';\n}\n- (int) test0int: (char *)ignore two: (char *) ignore2 {\nreturn -1;\n}\n- (short) test0short: (char *)ignore  two: (char *) ignore2{\nreturn 0xFFFF;\n}\n- (long) test0long: (char *)ignore  two: (char *) ignore2{\n\treturn 0xFFFFFFFF;\n}\n- (long long) test0longlong: (char *)ignore  two: (char *) ignore2{\n\t\treturn 0xFFFFFFFFFFFFFFFFLL;\n}\n- (unsigned char) test0unsignedchar: (char *)ignore two: (char *) ignore2{\n\t\t\treturn 'A';\n}\n- (unsigned int) test0unsignedint: (char *)ignore two: (char *) ignore2{\nreturn 0xFFFFFFFF;\n\t\t\t\t}\n\t\t\t\t- (unsigned short) test0unsignedshort: (char *)ignore  two: (char *) ignore2{\n\t\t\t\t\treturn 0xFFFF;\n}\n- (unsigned long) test0unsignedlong: (char *)ignore two: (char *) ignore2{\nreturn 0xFFFFFFFF;\n}\n- (unsigned long long) test0unsignedlonglong: (char *)ignore  two: (char *) ignore2{\nreturn 0xFFFFFFFFFFFFFFFFLL;\n\t}\n\t- (float) test0float: (char *)ignore  two: (char *) ignore2{\nreturn 8.8f;\n}\n- (double) test0double: (char *)ignore  two: (char *) ignore2{\n\t\treturn 8.8;\n}\n- (void) test0void: (char *)ignore  two: (char *) ignore2{\n\t\t\t}\n\t\t\t- (char *) test0charpointer: (char *)ignore  two: (char *) ignore2{\nstatic char* squeak = \"squeak\";\n\t\t\t\treturn squeak;\n\t\t\t\t}\n\t\t\t\t- (squeakSUnitTester *) test0object: (char *)ignore two: (char *) ignore2 {\n\t\t\t\treturn [squeakSUnitTester new];\n\t\t\t\t}\n\t\t\t\t- (Class) test0class: (char *)ignore two: (char *) ignore2 {\n\t\t\t\treturn [squeakSUnitTester class];\n}\n- (SEL) test0methodselector: (char *)ignore  two: (char *) ignore2 {\n\t\t\t\t\tSEL selector;\nselector = NSSelectorFromString(\n @\"initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:\");\nreturn selector;\n\t }\n\t - (CGRect) test0CGRect: (char *)ignore  two: (char *) ignore2 {\nCGRect foo;\nfoo.origin.x = 1.0;\n\t\t foo.origin.y = 2.0;\nfoo.size.width = 3.0;\nfoo.size.height = 4.0;\nreturn foo;\n}\n\n- (char) test0char: (char *)ignore two: (char *) ignore2 three: (char *) ignore3 {\nreturn 'A';\n}\n- (int) test0int: (char *)ignore two: (char *) ignore2  three: (char *) ignore3 {\nreturn -1;\n}\n- (short) test0short: (char *)ignore  two: (char *) ignore2 three: (char *) ignore3 {\n\treturn 0xFFFF;\n}\n- (long) test0long: (char *)ignore  two: (char *) ignore2 three: (char *) ignore3 {\nreturn 0xFFFFFFFF;\n\t\t}\n\t\t- (long long) test0longlong: (char *)ignore  two: (char *) ignore2 three: (char *) ignore3 {\nreturn 0xFFFFFFFFFFFFFFFFLL;\n\t\t\t}\n\t\t\t- (unsigned char) test0unsignedchar: (char *)ignore two: (char *) ignore2 three: (char *) ignore3 {\nreturn 'A';\n}\n- (unsigned int) test0unsignedint: (char *)ignore two: (char *) ignore2 three: (char *) ignore3 {\nreturn 0xFFFFFFFF;\n}\n\t- (unsigned short) test0unsignedshort: (char *)ignore  two: (char *) ignore2 three: (char *) ignore3 {\n\t\treturn 0xFFFF;\n}\n- (unsigned long) test0unsignedlong: (char *)ignore two: (char *) ignore2 three: (char *) ignore3 {\nreturn 0xFFFFFFFF;\n}\n- (unsigned long long) test0unsignedlonglong: (char *)ignore  two: (char *) ignore2 three: (char *) ignore3 {\nreturn 0xFFFFFFFFFFFFFFFFLL;\n}\n- (float) test0float: (char *)ignore  two: (char *) ignore2 three: (char *) ignore3 {\n\treturn 8.8f;\n}\n- (double) test0double: (char *)ignore  two: (char *) ignore2 three: (char *) ignore3 {\n\t\treturn 8.8;\n\t\t}\n\t\t- (void) test0void: (char *)ignore  two: (char *) ignore2 three: (char *) ignore3 {\n}\n- (char *) test0charpointer: (char *)ignore  two: (char *) ignore2 three: (char *) ignore3 {\n\t\t\tstatic char* squeak = \"squeak\";\n\t\t\treturn squeak;\n\t\t\t}\n\t\t\t- (squeakSUnitTester *) test0object: (char *)ignore two: (char *) ignore2  three: (char *) ignore3 {\nreturn [squeakSUnitTester new];\n\t\t\t\t}\n\t\t\t\t- (Class) test0class: (char *)ignore two: (char *) ignore2  three: (char *) ignore3 {\nreturn [squeakSUnitTester class];\n}\n- (SEL) test0methodselector: (char *)ignore  two: (char *) ignore2  three: (char *) ignore3 {\nSEL selector;\n\tselector = NSSelectorFromString(\n@\"initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:\");\nreturn selector;\n}\n- (CGRect) test0CGRect: (char *)ignore  two: (char *) ignore2  three: (char *) ignore3  {\nCGRect foo;\nfoo.origin.x = 1.0;\n\tfoo.origin.y = 2.0;\nfoo.size.width = 3.0;\nfoo.size.height = 4.0;\nreturn foo;\n}\n\n- (char) test1char: (char) ignore {\nreturn ignore;\n}\n- (int) test1int: (int) ignore {\nreturn ignore;\n}\n- (short) test1short: (short) ignore {\nreturn ignore;\n}\n- (long) test1long: (long) ignore {\n\treturn ignore;\n}\n- (long long) test1longlong: (long long) ignore {\nreturn ignore;\n\t\t}\n\t\t- (unsigned char) test1unsignedchar: (unsigned char) ignore {\n\t\t\treturn ignore;\n}\n- (unsigned int) test1unsignedint: (unsigned int) ignore {\nreturn ignore;\n}\n- (unsigned short) test1unsignedshort: (unsigned short) ignore {\n\treturn ignore;\n}\n- (unsigned long) test1unsignedlong: (unsigned long) ignore {\nreturn ignore;\n\t\t}\n\t\t- (unsigned long long) test1unsignedlonglong: (unsigned long long) ignore {\nreturn ignore;\n\t\t\t}\n\t\t\t- (float) test1float: (float) ignore {\nreturn ignore;\n}\n- (double) test1double: (double) ignore {\n\t\t\t\treturn ignore;\n\t\t\t\t}\n\t\t\t- (char *) test1charpointer: (char *) ignore {\nreturn ignore;\n}\n- (squeakSUnitTester *) test1object: (squeakSUnitTester *) ignore {\nreturn ignore;\n}\n- (Class) test1class: (Class) ignore {\nreturn ignore;\n}\n- (SEL) test1methodselector: (SEL) ignore {\nreturn ignore;\n}\n- (CGRect) test1CGRect: (CGRect) ignore {\nreturn ignore;\n}\n\n- (char) test2char: (squeakSUnitTester *)ignore two: (squeakSUnitTester *) ignore2 {\nreturn 'A';\n}\n- (int) test2int: (squeakSUnitTester *)ignore two: (squeakSUnitTester *) ignore2 {\nreturn -1;\n}\n- (short) test2short: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2{\nreturn 0xFFFF;\n}\n- (long) test2long: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2{\nreturn 0xFFFFFFFF;\n\t}\n\t- (long long) test2longlong: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2{\nreturn 0xFFFFFFFFFFFFFFFFLL;\n}\n- (unsigned char) test2unsignedchar: (squeakSUnitTester *)ignore two: (squeakSUnitTester *) ignore2{\nreturn 'A';\n}\n- (unsigned int) test2unsignedint: (squeakSUnitTester *)ignore two: (squeakSUnitTester *) ignore2{\nreturn 0xFFFFFFFF;\n}\n- (unsigned short) test2unsignedshort: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2{\nreturn 0xFFFF;\n}\n- (unsigned long) test2unsignedlong: (squeakSUnitTester *)ignore two: (squeakSUnitTester *) ignore2{\n\treturn 0xFFFFFFFF;\n}\n- (unsigned long long) test2unsignedlonglong: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2{\nreturn 0xFFFFFFFFFFFFFFFFLL;\n}\n- (float) test2float: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2{\n\treturn 8.8f;\n\t}\n\t- (double) test2double: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2{\n\treturn 8.8;\n\t}\n\t- (void) test2void: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2{\n}\n- (char *) test2charpointer: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2{\nstatic char* squeak = \"squeak\";\nreturn squeak;\n}\n- (squeakSUnitTester *) test2object: (squeakSUnitTester *)ignore two: (squeakSUnitTester *) ignore2 {\nreturn [squeakSUnitTester new];\n}\n- (Class) test2class: (squeakSUnitTester *)ignore two: (squeakSUnitTester *) ignore2 {\nreturn [squeakSUnitTester class];\n\t}\n\t- (SEL) test2methodselector: (squeakSUnitTester *)ignore  two: (squeakSUnitTester *) ignore2 {\nSEL selector;\nselector = NSSelectorFromString(\n\t\t@\"initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:\");\nreturn selector;\n}\n- (CGRect) test2CGRect: (squeakSUnitTester *) ignore two: (squeakSUnitTester *) ignore2 {\nCGRect foo;\n\tfoo.origin.x = 1.0;\nfoo.origin.y = 2.0;\nfoo.size.width = 3.0;\nfoo.size.height = 4.0;\nreturn foo;\n}\n\n- (oneway void) testQualifier0v {\n\t\t}\n- (oneway void) testQualifier1v: (squeakSUnitTester *)ignore {\n}\n- (oneway void) testQualifier2v: (squeakSUnitTester *)ignore two:  (squeakSUnitTester *)ignore2;{\n\t}\n\t- (oneway void) testQualifier3v: (squeakSUnitTester *)ignore two:  (squeakSUnitTester *)ignore2  three: (squeakSUnitTester *)ignore3 {\n}\n- (squeakSUnitTester *) testQualifier1io: (inout squeakSUnitTester *)ignore {\n\t\treturn ignore;\n}\n- (squeakSUnitTester *) testQualifier2io: (inout squeakSUnitTester *)ignore two:  (inout squeakSUnitTester *)ignore2  {\nreturn ignore2;\n}\n- (squeakSUnitTester *) testQualifier3io: (inout squeakSUnitTester *)ignore two:  (inout squeakSUnitTester *)ignore2  three: (inout squeakSUnitTester *)ignore3\n{\nreturn ignore3;\n}\n- (squeakSUnitTester *) testQualifier1i: (in squeakSUnitTester *)ignore {\nreturn ignore;\n\t}\n\t- (squeakSUnitTester *) testQualifier2i: (in squeakSUnitTester *)ignore two:  (in squeakSUnitTester *)ignore2  {\nreturn ignore2;\n}\n- (squeakSUnitTester *) testQualifier3i: (in squeakSUnitTester *)ignore two:  (in squeakSUnitTester *)ignore2  three: (in squeakSUnitTester *)ignore3\n{\nreturn ignore3;\n}\n- (squeakSUnitTester *) testQualifier1o: (out squeakSUnitTester *)ignore {\nreturn ignore;\n}\n- (squeakSUnitTester *) testQualifier2o: (out squeakSUnitTester *)ignore two:  (out squeakSUnitTester *)ignore2  {\nreturn ignore2;\n}\n- (squeakSUnitTester *) testQualifier3o: (out squeakSUnitTester *)ignore two:  (out squeakSUnitTester *)ignore2  three: (out squeakSUnitTester *)ignore3\n{\nreturn ignore3;\n}\n- (squeakSUnitTester *) testQualifier1r: (inout byref  squeakSUnitTester *)ignore {\nreturn ignore;\n}\n- (squeakSUnitTester *) testQualifier2r: (inout byref  squeakSUnitTester *)ignore two:  (inout byref  squeakSUnitTester *)ignore2  {\nreturn ignore2;\n}\n- (squeakSUnitTester *) testQualifier3r: (inout byref  squeakSUnitTester *)ignore two:  (inout byref  squeakSUnitTester *)ignore2  three: (inout byref  squeakSUnitTester *)ignore3\n{\nreturn ignore3;\n}\n\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/UnixOSProcessPlugin/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleExecutable</key>\n\t<string>UnixOSProcessPlugin</string>\n\t<key>CFBundleGetInfoString</key>\n\t<string>UnixOSProcessPlugin V6.0.0 for Squeak</string>\n\t<key>CFBundleIconFile</key>\n\t<string>SqueakPlugin.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeakfoundation.UnixOSProcessPlugin</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>UnixOSProcessPlugin V6.0.0 for Squeak</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>2.3.11</string>\n\t<key>CFBundleSignature</key>\n\t<string>FAST</string>\n\t<key>CFBundleVersion</key>\n\t<string>6.0.0</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/UnixOSProcessPlugin/PkgInfo",
    "content": "BNDLFAST"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.xcodeproj/MAC.mode1v3",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>ActivePerspectiveName</key>\n\t<string>Project</string>\n\t<key>AllowedModules</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Groups and Files Outline View</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCTaskListModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Task List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDetailModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>File and Smart Group Detail Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Detailed Build Results Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Batch Find Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Format Conflicts List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXCVSModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Source Code Control Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Breakpoints Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDockableInspector</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Inspector</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXOpenQuicklyModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Open Quickly Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Console</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCSnapshotModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Snapshots Tool</string>\n\t\t</dict>\n\t</array>\n\t<key>BundlePath</key>\n\t<string>/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources</string>\n\t<key>Description</key>\n\t<string>DefaultDescriptionKey</string>\n\t<key>DockingSystemVisible</key>\n\t<false/>\n\t<key>Extension</key>\n\t<string>mode1v3</string>\n\t<key>FavBarConfig</key>\n\t<dict>\n\t\t<key>PBXProjectModuleGUID</key>\n\t\t<string>040F1C0512CD192C008BA0CB</string>\n\t\t<key>XCBarModuleItemNames</key>\n\t\t<dict/>\n\t\t<key>XCBarModuleItems</key>\n\t\t<array/>\n\t</dict>\n\t<key>FirstTimeWindowDisplayed</key>\n\t<false/>\n\t<key>Identifier</key>\n\t<string>com.apple.perspectives.project.mode1v3</string>\n\t<key>MajorVersion</key>\n\t<integer>33</integer>\n\t<key>MinorVersion</key>\n\t<integer>0</integer>\n\t<key>Name</key>\n\t<string>Default</string>\n\t<key>Notifications</key>\n\t<array/>\n\t<key>OpenEditors</key>\n\t<array/>\n\t<key>PerspectiveWidths</key>\n\t<array>\n\t\t<integer>-1</integer>\n\t\t<integer>-1</integer>\n\t</array>\n\t<key>Perspectives</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>ChosenToolbarItems</key>\n\t\t\t<array>\n\t\t\t\t<string>active-combo-popup</string>\n\t\t\t\t<string>action</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>debugger-enable-breakpoints</string>\n\t\t\t\t<string>build-and-go</string>\n\t\t\t\t<string>com.apple.ide.PBXToolbarStopButton</string>\n\t\t\t\t<string>get-info</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>com.apple.pbx.toolbar.searchfield</string>\n\t\t\t</array>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProjectWithEditor</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.project</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>66DF6BFE01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66DF6BFF01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>4CA7E553092CC67E0044FE85</string>\n\t\t\t\t\t\t\t\t<string>4CA7E552092CC66D0044FE85</string>\n\t\t\t\t\t\t\t\t<string>66DF6C3901D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66DF6C4501D7DEEE00A80119</string>\n\t\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 629}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 647}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>30 83 908 688 0 0 1280 778 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>203pt</string>\n\t\t\t\t</dict>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Info.plist</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CE0B20406471E060097A5F4</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>Info.plist</string>\n\t\t\t\t\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t\t\t\t\t<string>04F8801412D5055800C22208</string>\n\t\t\t\t\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F1C8B12CD1FB5008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F1C8D12CD1FB5008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F200612CD355F008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F200812CD355F008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F200912CD355F008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F204F12CD42CD008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F20A612CE03DF008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F1E8912CD27A1008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {700, 434}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>30 83 908 688 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>434pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 439}, {700, 208}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>30 83 908 688 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>208pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>700pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>04F87F9812D4DBD900C22208</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>04F87F9912D4DBD900C22208</string>\n\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfigUserDefaultsMinorVersion</key>\n\t\t\t<string>2</string>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.defaultV3</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProject</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.morph</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>29B97314FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 337}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 355}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>373 269 690 397 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Morph</string>\n\t\t\t<key>PreferredWidth</key>\n\t\t\t<integer>300</integer>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default.shortV3</string>\n\t\t</dict>\n\t</array>\n\t<key>PerspectivesBarVisible</key>\n\t<false/>\n\t<key>ShelfIsVisible</key>\n\t<false/>\n\t<key>SourceDescription</key>\n\t<string>file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string>\n\t<key>StatusbarIsVisible</key>\n\t<true/>\n\t<key>TimeStamp</key>\n\t<real>0.0</real>\n\t<key>ToolbarConfigUserDefaultsMinorVersion</key>\n\t<string>2</string>\n\t<key>ToolbarDisplayMode</key>\n\t<integer>1</integer>\n\t<key>ToolbarIsVisible</key>\n\t<true/>\n\t<key>ToolbarSizeMode</key>\n\t<integer>1</integer>\n\t<key>Type</key>\n\t<string>Perspectives</string>\n\t<key>UpdateMessage</key>\n\t<string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the \"Metro-Morph\" feature).  You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature.  Do you wish to update to the latest Workspace defaults for project '%@'?</string>\n\t<key>WindowJustification</key>\n\t<integer>5</integer>\n\t<key>WindowOrderList</key>\n\t<array>\n\t\t<string>040F1C0612CD192C008BA0CB</string>\n\t\t<string>/Users/MAC/Desktop/Dev/VM/cog-osx/platforms/iOS/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.xcodeproj</string>\n\t</array>\n\t<key>WindowString</key>\n\t<string>30 83 908 688 0 0 1280 778 </string>\n\t<key>WindowToolsV3</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.build</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string></string>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {702, 358}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>191 86 702 640 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>358pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Build Results</string>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Collapse</key>\n\t\t\t\t\t\t\t\t<integer>1021</integer>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Open</key>\n\t\t\t\t\t\t\t\t<integer>1011</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 363}, {702, 236}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>191 86 702 640 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>236pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>599pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Build Results</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>040F1C0612CD192C008BA0CB</string>\n\t\t\t\t<string>04F87F9A12D4DBD900C22208</string>\n\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.buildV3</string>\n\t\t\t<key>WindowContentMinSize</key>\n\t\t\t<string>486 300</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>191 86 702 640 0 0 1280 778 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>040F1C0612CD192C008BA0CB</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugger</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Debugger</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {317, 164}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{317, 0}, {377, 164}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {694, 164}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 164}, {694, 216}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debug - GLUTExamples (Underwater)</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>DebugConsoleDrawerSize</key>\n\t\t\t\t\t\t\t\t<string>{100, 120}</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleVisible</key>\n\t\t\t\t\t\t\t\t<string>None</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>DebugSTDIOWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {694, 380}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>321 238 694 422 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t\t<string>1C0AD2AB069F1E9B00FABCE6</string>\n\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t<string>1C0AD2AC069F1E9B00FABCE6</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>321 238 694 422 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.find</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>sqVirtualMachine.c</string>\n\t\t\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {781, 212}}</string>\n\t\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t\t<string>51 278 781 470 0 0 1280 778 </string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t\t\t<string>781pt</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>212pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Project Find</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 217}, {781, 212}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>51 278 781 470 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>212pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>429pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Find</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t\t<string>040F204D12CD4294008BA0CB</string>\n\t\t\t\t<string>040F204E12CD4294008BA0CB</string>\n\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>51 278 781 470 0 0 1280 778 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>MENUSEPARATOR</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debuggerConsole</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debugger Console</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {650, 250}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>516 632 650 250 0 0 1680 1027 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>209pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>209pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger Console</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t\t<string>1C78EAAE065D492600B07095</string>\n\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.consoleV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>650 41 650 250 0 0 1280 1002 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.snapshots</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCSnapshotModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Snapshots</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCSnapshotModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<string>Yes</string>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.snapshots</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>315 824 300 550 0 0 1440 878 </string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<string>Yes</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.scm</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1C78EAB3065D492600B07095</string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>0pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>SCM</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ConsoleFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 259}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 7}, {452, 259}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t\t<key>TableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>Status</string>\n\t\t\t\t\t\t\t\t\t<real>30</real>\n\t\t\t\t\t\t\t\t\t<string>FileName</string>\n\t\t\t\t\t\t\t\t\t<real>199</real>\n\t\t\t\t\t\t\t\t\t<string>Path</string>\n\t\t\t\t\t\t\t\t\t<real>197.0950012207031</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>TableFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 250}}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>262pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>266pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>SCM</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAB4065D492600B07095</string>\n\t\t\t\t<string>1C78EAB5065D492600B07095</string>\n\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.scm</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.breakpoints</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t\t\t<string>no</string>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {168, 350}}</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {185, 368}}</string>\n\t\t\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>185pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{190, 0}, {554, 368}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>554pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>368pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>MajorVersion</key>\n\t\t\t<integer>3</integer>\n\t\t\t<key>MinorVersion</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Name</key>\n\t\t\t<string>Breakpoints</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CDDB66807F98D9800BB5817</string>\n\t\t\t\t<string>1CDDB66907F98D9800BB5817</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.breakpointsV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CDDB66807F98D9800BB5817</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugAnimator</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Visualizer</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugAnimatorV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>100 100 700 500 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.bookmarks</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>538 42 401 187 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.projectFormatConflicts</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Format Conflicts</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowContentMinSize</key>\n\t\t\t<string>450 300</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>50 850 472 307 0 0 1440 877</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.classBrowser</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>OptionsSetName</key>\n\t\t\t\t\t\t\t\t<string>Hierarchy, all classes</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Class Browser - NSObject</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ClassesFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {374, 96}}</string>\n\t\t\t\t\t\t\t\t<key>ClassesTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXClassNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>208</real>\n\t\t\t\t\t\t\t\t\t<string>PBXClassBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {630, 331}}</string>\n\t\t\t\t\t\t\t\t<key>MembersFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 105}, {374, 395}}</string>\n\t\t\t\t\t\t\t\t<key>MembersTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeIconColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>216</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>97</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>332pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>332pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t\t<string>1C0AD2B0069F1E9B00FABCE6</string>\n\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.classbrowser</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.refactoring</string>\n\t\t\t<key>IncludeInToolsMenu</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{0, 0}, {500, 335}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{0, 0}, {500, 335}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCRefactoringModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Refactoring</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCRefactoringModule</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>200 200 500 356 0 0 1920 1200 </string>\n\t\t</dict>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.xcodeproj/MAC.pbxuser",
    "content": "// !$*UTF8*$!\n{\n\t040F1BF912CD18CC008BA0CB /* Source Control */ = {\n\t\tisa = PBXSourceControlManager;\n\t\tfallbackIsa = XCSourceControlManager;\n\t\tisSCMEnabled = 0;\n\t\tscmConfiguration = {\n\t\t\trepositoryNamesForRoots = {\n\t\t\t\t\"\" = \"\";\n\t\t\t};\n\t\t};\n\t};\n\t040F1BFA12CD18CC008BA0CB /* Code sense */ = {\n\t\tisa = PBXCodeSenseManager;\n\t\tindexTemplatePath = \"\";\n\t};\n\t040F1C0812CD1991008BA0CB /* UnixOSProcessPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {894, 49374}}\";\n\t\t\tsepNavSelRange = \"{52201, 0}\";\n\t\t\tsepNavVisRange = \"{52011, 917}\";\n\t\t};\n\t};\n\t040F1C2D12CD1B19008BA0CB /* SocketPlugin.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1601, 845}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 890}\";\n\t\t};\n\t};\n\t040F1C3112CD1B51008BA0CB /* FilePlugin.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {803, 819}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{884, 1618}\";\n\t\t};\n\t};\n\t040F1C4312CD1C70008BA0CB /* sqaio.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {639, 1339}}\";\n\t\t\tsepNavSelRange = \"{443, 0}\";\n\t\t\tsepNavVisRange = \"{720, 1174}\";\n\t\t};\n\t};\n\t040F1C8B12CD1FB5008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 040F1C2D12CD1B19008BA0CB /* SocketPlugin.h */;\n\t\tname = \"SocketPlugin.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 890;\n\t\tvrLoc = 0;\n\t};\n\t040F1C8D12CD1FB5008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 4C2DFB1309335838008B95AB /* PkgInfo */;\n\t\tname = \"PkgInfo: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 8;\n\t\tvrLoc = 0;\n\t};\n\t040F1E8912CD27A1008BA0CB /* PlistBookmark */ = {\n\t\tisa = PlistBookmark;\n\t\tfRef = 040F1BFB12CD18FF008BA0CB /* Info.plist */;\n\t\tfallbackIsa = PBXBookmark;\n\t\tisK = 0;\n\t\tkPath = (\n\t\t);\n\t\tname = \"/Users/MAC/Desktop/Dev/VM/cog-osx/platforms/iOS/plugins/UnixOSProcessPlugin/Info.plist\";\n\t\trLen = 0;\n\t\trLoc = 9223372036854775808;\n\t};\n\t040F200612CD355F008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 040F200712CD355F008BA0CB /* Carbon.h */;\n\t\tname = \"Carbon.h: 54\";\n\t\trLen = 0;\n\t\trLoc = 1026;\n\t\trType = 0;\n\t\tvrLen = 568;\n\t\tvrLoc = 773;\n\t};\n\t040F200712CD355F008BA0CB /* Carbon.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = Carbon.h;\n\t\tpath = /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t040F200812CD355F008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 040F1C4312CD1C70008BA0CB /* sqaio.h */;\n\t\tname = \"sqaio.h: 11\";\n\t\trLen = 0;\n\t\trLoc = 443;\n\t\trType = 0;\n\t\tvrLen = 1174;\n\t\tvrLoc = 720;\n\t};\n\t040F200912CD355F008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 040F1C3112CD1B51008BA0CB /* FilePlugin.h */;\n\t\tname = \"FilePlugin.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1618;\n\t\tvrLoc = 884;\n\t};\n\t040F204F12CD42CD008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 944E9BEE05E91D17003F0BED /* sqPlatformSpecific.h */;\n\t\tname = \"sqPlatformSpecific.h: 159\";\n\t\trLen = 78;\n\t\trLoc = 6543;\n\t\trType = 0;\n\t\tvrLen = 1044;\n\t\tvrLoc = 5676;\n\t};\n\t040F20A612CE03DF008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 4CA7E550092CC6680044FE85 /* ft2build.h */;\n\t\tname = \"ft2build.h: 13\";\n\t\trLen = 0;\n\t\trLoc = 973;\n\t\trType = 0;\n\t\tvrLen = 2342;\n\t\tvrLoc = 0;\n\t};\n\t04F8801412D5055800C22208 /* PlistBookmark */ = {\n\t\tisa = PlistBookmark;\n\t\tfRef = 040F1BFB12CD18FF008BA0CB /* Info.plist */;\n\t\tfallbackIsa = PBXBookmark;\n\t\tisK = 0;\n\t\tkPath = (\n\t\t\tCFBundleShortVersionString,\n\t\t);\n\t\tname = \"/Users/MAC/Desktop/Dev/VM/cog-osx/platforms/iOS/plugins/UnixOSProcessPlugin/Info.plist\";\n\t\trLen = 0;\n\t\trLoc = 9223372036854775807;\n\t};\n\t4C2DFB1309335838008B95AB /* PkgInfo */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {591, 361}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 8}\";\n\t\t};\n\t};\n\t4CA7E550092CC6680044FE85 /* ft2build.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {639, 754}}\";\n\t\t\tsepNavSelRange = \"{973, 0}\";\n\t\t\tsepNavVisRange = \"{0, 2342}\";\n\t\t};\n\t};\n\t66DF6BFD01D7DCEA00A80119 /* Project object */ = {\n\t\tactiveBuildConfigurationName = Deployment;\n\t\tactiveTarget = 942103F2084F50DF006A0FD2 /* UnixOSProcessPlugin */;\n\t\taddToTargets = (\n\t\t\t942103F2084F50DF006A0FD2 /* UnixOSProcessPlugin */,\n\t\t);\n\t\tcodeSenseManager = 040F1BFA12CD18CC008BA0CB /* Code sense */;\n\t\tperUserDictionary = {\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t461,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t\t20,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Target_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t421,\n\t\t\t\t\t60,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXTargetDataSource_PrimaryAttribute,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXPerProjectTemplateStateSaveDate = 315939788;\n\t\t\tPBXWorkspaceStateSaveDate = 315939788;\n\t\t};\n\t\tperUserProjectItems = {\n\t\t\t040F1C8B12CD1FB5008BA0CB /* PBXTextBookmark */ = 040F1C8B12CD1FB5008BA0CB /* PBXTextBookmark */;\n\t\t\t040F1C8D12CD1FB5008BA0CB /* PBXTextBookmark */ = 040F1C8D12CD1FB5008BA0CB /* PBXTextBookmark */;\n\t\t\t040F1E8912CD27A1008BA0CB /* PlistBookmark */ = 040F1E8912CD27A1008BA0CB /* PlistBookmark */;\n\t\t\t040F200612CD355F008BA0CB /* PBXTextBookmark */ = 040F200612CD355F008BA0CB /* PBXTextBookmark */;\n\t\t\t040F200812CD355F008BA0CB /* PBXTextBookmark */ = 040F200812CD355F008BA0CB /* PBXTextBookmark */;\n\t\t\t040F200912CD355F008BA0CB /* PBXTextBookmark */ = 040F200912CD355F008BA0CB /* PBXTextBookmark */;\n\t\t\t040F204F12CD42CD008BA0CB /* PBXTextBookmark */ = 040F204F12CD42CD008BA0CB /* PBXTextBookmark */;\n\t\t\t040F20A612CE03DF008BA0CB /* PBXTextBookmark */ = 040F20A612CE03DF008BA0CB /* PBXTextBookmark */;\n\t\t\t04F8801412D5055800C22208 /* PlistBookmark */ = 04F8801412D5055800C22208 /* PlistBookmark */;\n\t\t};\n\t\tsourceControlManager = 040F1BF912CD18CC008BA0CB /* Source Control */;\n\t\tuserBuildSettings = {\n\t\t};\n\t};\n\t9407B2F910DA271000AE2B55 /* sqVirtualMachine.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {999, 4056}}\";\n\t\t\tsepNavSelRange = \"{7199, 37}\";\n\t\t\tsepNavVisRange = \"{6939, 429}\";\n\t\t};\n\t};\n\t942103F2084F50DF006A0FD2 /* UnixOSProcessPlugin */ = {\n\t\tactiveExec = 0;\n\t};\n\t944E9BEE05E91D17003F0BED /* sqPlatformSpecific.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1202, 2275}}\";\n\t\t\tsepNavSelRange = \"{6543, 78}\";\n\t\t\tsepNavVisRange = \"{5676, 1044}\";\n\t\t};\n\t};\n\t949BB00C09327C3300684056 /* config.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {537, 2249}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 904}\";\n\t\t};\n\t};\n\t949BB01709327C9D00684056 /* interp.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {663, 361}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 634}\";\n\t\t};\n\t};\n\t949BB07A09328C1500684056 /* sq.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {551, 7254}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 393}\";\n\t\t};\n\t};\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.xcodeproj/bert.mode1",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>ActivePerspectiveName</key>\n\t<string>Project</string>\n\t<key>AllowedModules</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Groups and Files Outline View</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCTaskListModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Task List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDetailModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>File and Smart Group Detail Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Detailed Build Results Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Batch Find Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Run Log</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXCVSModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Source Code Control Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Breakpoints Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDockableInspector</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Inspector</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXOpenQuicklyModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Open Quickly Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Console</string>\n\t\t</dict>\n\t</array>\n\t<key>Description</key>\n\t<string>DefaultDescriptionKey</string>\n\t<key>DockingSystemVisible</key>\n\t<false/>\n\t<key>Extension</key>\n\t<string>mode1</string>\n\t<key>FavBarConfig</key>\n\t<dict>\n\t\t<key>PBXProjectModuleGUID</key>\n\t\t<string>4C4BDFAA08EBD932008EB73B</string>\n\t\t<key>XCBarModuleItemNames</key>\n\t\t<dict/>\n\t\t<key>XCBarModuleItems</key>\n\t\t<array/>\n\t</dict>\n\t<key>FirstTimeWindowDisplayed</key>\n\t<false/>\n\t<key>Identifier</key>\n\t<string>com.apple.perspectives.project.mode1</string>\n\t<key>MajorVersion</key>\n\t<integer>31</integer>\n\t<key>MinorVersion</key>\n\t<integer>1</integer>\n\t<key>Name</key>\n\t<string>Default</string>\n\t<key>Notifications</key>\n\t<array/>\n\t<key>OpenEditors</key>\n\t<array/>\n\t<key>PerspectiveWidths</key>\n\t<array>\n\t\t<integer>-1</integer>\n\t\t<integer>-1</integer>\n\t</array>\n\t<key>Perspectives</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>ChosenToolbarItems</key>\n\t\t\t<array>\n\t\t\t\t<string>active-target-popup</string>\n\t\t\t\t<string>action</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>buildOrClean</string>\n\t\t\t\t<string>build-and-runOrDebug</string>\n\t\t\t\t<string>com.apple.ide.PBXToolbarStopButton</string>\n\t\t\t\t<string>get-info</string>\n\t\t\t\t<string>toggle-editor</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>com.apple.pbx.toolbar.searchfield</string>\n\t\t\t</array>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProjectWithEditor</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.project</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<true/>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>66DF6BFE01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66DF6BFF01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>4CA7E553092CC67E0044FE85</string>\n\t\t\t\t\t\t\t\t<string>4CA7E552092CC66D0044FE85</string>\n\t\t\t\t\t\t\t\t<string>66DF6C3901D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>29</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 427}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 445}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>185 311 862 486 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>203pt</string>\n\t\t\t\t</dict>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>MyNewFile14.java</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CE0B20406471E060097A5F4</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>MyNewFile14.java</string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {654, 0}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>185 311 862 486 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>0pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 5}, {654, 440}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>185 311 862 486 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>440pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>654pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>4C703A0509336218008E817B</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>4C703A0609336218008E817B</string>\n\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProject</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.morph</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>29B97314FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 337}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 355}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>373 269 690 397 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Morph</string>\n\t\t\t<key>PreferredWidth</key>\n\t\t\t<integer>300</integer>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default.short</string>\n\t\t</dict>\n\t</array>\n\t<key>PerspectivesBarVisible</key>\n\t<false/>\n\t<key>ShelfIsVisible</key>\n\t<false/>\n\t<key>SourceDescription</key>\n\t<string>file at '/System/Library/PrivateFrameworks/DevToolsInterface.framework/Versions/A/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string>\n\t<key>StatusbarIsVisible</key>\n\t<true/>\n\t<key>TimeStamp</key>\n\t<real>0.0</real>\n\t<key>ToolbarDisplayMode</key>\n\t<integer>1</integer>\n\t<key>ToolbarIsVisible</key>\n\t<true/>\n\t<key>ToolbarSizeMode</key>\n\t<integer>1</integer>\n\t<key>Type</key>\n\t<string>Perspectives</string>\n\t<key>UpdateMessage</key>\n\t<string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the \"Metro-Morph\" feature).  You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature.  Do you wish to update to the latest Workspace defaults for project '%@'?</string>\n\t<key>WindowJustification</key>\n\t<integer>5</integer>\n\t<key>WindowOrderList</key>\n\t<array>\n\t\t<string>4CED2BC108EC5536007BDF80</string>\n\t\t<string>/Users/bert/Squeak/VM/squeak/FT2Plugin.xcodeproj</string>\n\t</array>\n\t<key>WindowString</key>\n\t<string>185 311 862 486 0 0 1440 878 </string>\n\t<key>WindowTools</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.build</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string></string>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {837, 290}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>394 248 837 572 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>290pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Build</string>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Collapse</key>\n\t\t\t\t\t\t\t\t<integer>1021</integer>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Open</key>\n\t\t\t\t\t\t\t\t<integer>1011</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 295}, {837, 236}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>394 248 837 572 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>236pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>531pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Build Results</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>4CED2BC108EC5536007BDF80</string>\n\t\t\t\t<string>4C703A0709336218008E817B</string>\n\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.build</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>394 248 837 572 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>4CED2BC108EC5536007BDF80</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugger</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Debugger</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {317, 164}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{317, 0}, {377, 164}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {694, 164}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 164}, {694, 216}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debug - GLUTExamples (Underwater)</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>DebugConsoleDrawerSize</key>\n\t\t\t\t\t\t\t\t<string>{100, 120}</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleVisible</key>\n\t\t\t\t\t\t\t\t<string>None</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>DebugSTDIOWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {694, 380}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>321 238 694 422 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t\t<string>1C0AD2AB069F1E9B00FABCE6</string>\n\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t<string>1C0AD2AC069F1E9B00FABCE6</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debug</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>321 238 694 422 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.find</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t\t\t<string>1CD0528D0623707200166675</string>\n\t\t\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {781, 167}}</string>\n\t\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t\t<string>62 385 781 470 0 0 1440 878 </string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t\t\t<string>781pt</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>50%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Project Find</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{8, 0}, {773, 254}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>62 385 781 470 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>50%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>428pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Find</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t\t<string>1C530D58069F1CE1000CFCEE</string>\n\t\t\t\t<string>1C530D59069F1CE1000CFCEE</string>\n\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t<string>1C530D5A069F1CE1000CFCEE</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>62 385 781 470 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>MENUSEPARATOR</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debuggerConsole</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debugger Console</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {440, 358}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>650 41 440 400 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>358pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>358pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger Console</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t\t<string>1C78EAAE065D492600B07095</string>\n\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>650 41 440 400 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.run</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>3</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528B0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Run</string>\n\t\t\t\t\t\t\t\t<key>Runner</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {493, 167}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 176}, {493, 267}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {405, 443}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{414, 0}, {514, 443}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {460, 159}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>316 696 459 200 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>159pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>159pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Run Log</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2B3069F1EA900FABCE6</string>\n\t\t\t\t<string>1C0AD2B4069F1EA900FABCE6</string>\n\t\t\t\t<string>1CD0528B0623707200166675</string>\n\t\t\t\t<string>1C0AD2B5069F1EA900FABCE6</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.run</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>316 696 459 200 0 0 1280 1002 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2B3069F1EA900FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.scm</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1C78EAB3065D492600B07095</string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>0pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>SCM</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ConsoleFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 259}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 7}, {452, 259}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t\t<key>TableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>Status</string>\n\t\t\t\t\t\t\t\t\t<real>30</real>\n\t\t\t\t\t\t\t\t\t<string>FileName</string>\n\t\t\t\t\t\t\t\t\t<real>199</real>\n\t\t\t\t\t\t\t\t\t<string>Path</string>\n\t\t\t\t\t\t\t\t\t<real>197.09500122070312</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>TableFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 250}}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>262pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>266pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>SCM</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAB4065D492600B07095</string>\n\t\t\t\t<string>1C78EAB5065D492600B07095</string>\n\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.scm</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.breakpoints</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t\t\t<string>no</string>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {168, 350}}</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t\t\t<false/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {185, 368}}</string>\n\t\t\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>185pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{190, 0}, {554, 368}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>554pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>368pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>MajorVersion</key>\n\t\t\t<integer>2</integer>\n\t\t\t<key>MinorVersion</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Name</key>\n\t\t\t<string>Breakpoints</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CDDB66807F98D9800BB5817</string>\n\t\t\t\t<string>1CDDB66907F98D9800BB5817</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.breakpoints</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CDDB66807F98D9800BB5817</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugAnimator</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Visualizer</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugAnimator</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>100 100 700 500 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.bookmarks</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>538 42 401 187 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.classBrowser</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>OptionsSetName</key>\n\t\t\t\t\t\t\t\t<string>Hierarchy, all classes</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Class Browser - NSObject</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ClassesFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {374, 96}}</string>\n\t\t\t\t\t\t\t\t<key>ClassesTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXClassNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>208</real>\n\t\t\t\t\t\t\t\t\t<string>PBXClassBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {630, 331}}</string>\n\t\t\t\t\t\t\t\t<key>MembersFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 105}, {374, 395}}</string>\n\t\t\t\t\t\t\t\t<key>MembersTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeIconColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>216</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>97</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>332pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>332pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t\t<string>1C0AD2B0069F1E9B00FABCE6</string>\n\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.classbrowser</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.xcodeproj/bert.pbxuser",
    "content": "// !$*UTF8*$!\n{\n\t4C4BDFA608EBD91A008EB73B /* Source Control */ = {\n\t\tisa = PBXSourceControlManager;\n\t\tfallbackIsa = XCSourceControlManager;\n\t\tisSCMEnabled = 0;\n\t\tscmConfiguration = {\n\t\t};\n\t\tscmType = \"\";\n\t};\n\t4C4BDFA708EBD91A008EB73B /* Code sense */ = {\n\t\tisa = PBXCodeSenseManager;\n\t\tindexTemplatePath = \"\";\n\t};\n\t4CA7E52C092CC14E0044FE85 /* FT2Plugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1055, 15414}}\";\n\t\t\tsepNavSelRange = \"{32183, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 14633}, {1055, 375}}\";\n\t\t\tsepNavWindowFrame = \"{{146, 180}, {1094, 504}}\";\n\t\t};\n\t};\n\t4CA7E530092CC16B0044FE85 /* Info-FT2Plugin.plist */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1055, 406}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {1055, 375}}\";\n\t\t\tsepNavWindowFrame = \"{{87, 348}, {1094, 504}}\";\n\t\t};\n\t};\n\t4CA7E550092CC6680044FE85 /* ft2build.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1055, 854}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 479}, {1055, 375}}\";\n\t\t\tsepNavWindowFrame = \"{{223, 222}, {1094, 504}}\";\n\t\t};\n\t};\n\t66DF6BFD01D7DCEA00A80119 /* Project object */ = {\n\t\tactiveBuildConfigurationName = Deployment;\n\t\tactiveBuildStyle = 66DF6C4301D7DCEA00A80119 /* Development */;\n\t\tactiveTarget = 942103F2084F50DF006A0FD2 /* FT2Plugin */;\n\t\taddToTargets = (\n\t\t\t942103F2084F50DF006A0FD2 /* FT2Plugin */,\n\t\t);\n\t\tcodeSenseManager = 4C4BDFA708EBD91A008EB73B /* Code sense */;\n\t\tperUserDictionary = {\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXBookmarksDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXBookmarksDataSource_NameID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t200,\n\t\t\t\t\t200,\n\t\t\t\t\t57.5835,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXBookmarksDataSource_LocationID,\n\t\t\t\t\tPBXBookmarksDataSource_NameID,\n\t\t\t\t\tPBXBookmarksDataSource_CommentsID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXErrorsWarningsDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXErrorsWarningsDataSource_LocationID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t300,\n\t\t\t\t\t305,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXErrorsWarningsDataSource_TypeID,\n\t\t\t\t\tPBXErrorsWarningsDataSource_MessageID,\n\t\t\t\t\tPBXErrorsWarningsDataSource_LocationID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXExecutablesDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXExecutablesDataSource_NameID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t22,\n\t\t\t\t\t300,\n\t\t\t\t\t131,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXExecutablesDataSource_ActiveFlagID,\n\t\t\t\t\tPBXExecutablesDataSource_NameID,\n\t\t\t\t\tPBXExecutablesDataSource_CommentsID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t415,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t\t20,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Target_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXFindDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFindDataSource_LocationID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t200,\n\t\t\t\t\t120,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFindDataSource_MessageID,\n\t\t\t\t\tPBXFindDataSource_LocationID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXSymbolsDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXSymbolsDataSource_SymbolNameID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t16,\n\t\t\t\t\t200,\n\t\t\t\t\t50,\n\t\t\t\t\t183,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXSymbolsDataSource_SymbolTypeIconID,\n\t\t\t\t\tPBXSymbolsDataSource_SymbolNameID,\n\t\t\t\t\tPBXSymbolsDataSource_SymbolTypeID,\n\t\t\t\t\tPBXSymbolsDataSource_ReferenceNameID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.XCSCMDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t20,\n\t\t\t\t\t391,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t\t20,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_SCM_ColumnID,\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Target_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t200,\n\t\t\t\t\t235,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXTargetDataSource_PrimaryAttribute,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXPerProjectTemplateStateSaveDate = 154362372;\n\t\t\tPBXWorkspaceStateSaveDate = 154362372;\n\t\t};\n\t\tsourceControlManager = 4C4BDFA608EBD91A008EB73B /* Source Control */;\n\t\tuserBuildSettings = {\n\t\t};\n\t};\n\t942103F2084F50DF006A0FD2 /* FT2Plugin */ = {\n\t\tactiveExec = 0;\n\t};\n\t944E9BEC05E91D17003F0BED /* sqConfig.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1055, 375}}\";\n\t\t\tsepNavSelRange = \"{342, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {1055, 375}}\";\n\t\t\tsepNavWindowFrame = \"{{163, 96}, {1094, 504}}\";\n\t\t};\n\t};\n\t949BB07809328BF600684056 /* sqMacFileLogic.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1055, 17332}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 14696}, {1055, 375}}\";\n\t\t\tsepNavWindowFrame = \"{{64, 369}, {1094, 504}}\";\n\t\t};\n\t};\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.xcodeproj/johnmci.mode1",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>ActivePerspectiveName</key>\n\t<string>Project</string>\n\t<key>AllowedModules</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Groups and Files Outline View</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCTaskListModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Task List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDetailModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>File and Smart Group Detail Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Detailed Build Results Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Batch Find Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Run Log</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXCVSModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Source Code Control Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Breakpoints Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDockableInspector</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Inspector</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXOpenQuicklyModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Open Quickly Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Console</string>\n\t\t</dict>\n\t</array>\n\t<key>Description</key>\n\t<string>DefaultDescriptionKey</string>\n\t<key>DockingSystemVisible</key>\n\t<false/>\n\t<key>Extension</key>\n\t<string>mode1</string>\n\t<key>FavBarConfig</key>\n\t<dict>\n\t\t<key>PBXProjectModuleGUID</key>\n\t\t<string>949BB01409327C5100684056</string>\n\t\t<key>XCBarModuleItemNames</key>\n\t\t<dict/>\n\t\t<key>XCBarModuleItems</key>\n\t\t<array/>\n\t</dict>\n\t<key>FirstTimeWindowDisplayed</key>\n\t<false/>\n\t<key>Identifier</key>\n\t<string>com.apple.perspectives.project.mode1</string>\n\t<key>MajorVersion</key>\n\t<integer>31</integer>\n\t<key>MinorVersion</key>\n\t<integer>1</integer>\n\t<key>Name</key>\n\t<string>Default</string>\n\t<key>Notifications</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>XCObserverAutoDisconnectKey</key>\n\t\t\t<true/>\n\t\t\t<key>XCObserverDefintionKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusErrorsKey</key>\n\t\t\t\t<integer>0</integer>\n\t\t\t</dict>\n\t\t\t<key>XCObserverFactoryKey</key>\n\t\t\t<string>XCPerspectivesSpecificationIdentifier</string>\n\t\t\t<key>XCObserverGUIDKey</key>\n\t\t\t<string>XCObserverProjectIdentifier</string>\n\t\t\t<key>XCObserverNotificationKey</key>\n\t\t\t<string>PBXStatusBuildStateMessageNotification</string>\n\t\t\t<key>XCObserverTargetKey</key>\n\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t<key>XCObserverTriggerKey</key>\n\t\t\t<string>awakenModuleWithObserver:</string>\n\t\t\t<key>XCObserverValidationKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusErrorsKey</key>\n\t\t\t\t<integer>2</integer>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>XCObserverAutoDisconnectKey</key>\n\t\t\t<true/>\n\t\t\t<key>XCObserverDefintionKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusWarningsKey</key>\n\t\t\t\t<integer>0</integer>\n\t\t\t</dict>\n\t\t\t<key>XCObserverFactoryKey</key>\n\t\t\t<string>XCPerspectivesSpecificationIdentifier</string>\n\t\t\t<key>XCObserverGUIDKey</key>\n\t\t\t<string>XCObserverProjectIdentifier</string>\n\t\t\t<key>XCObserverNotificationKey</key>\n\t\t\t<string>PBXStatusBuildStateMessageNotification</string>\n\t\t\t<key>XCObserverTargetKey</key>\n\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t<key>XCObserverTriggerKey</key>\n\t\t\t<string>awakenModuleWithObserver:</string>\n\t\t\t<key>XCObserverValidationKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusWarningsKey</key>\n\t\t\t\t<integer>2</integer>\n\t\t\t</dict>\n\t\t</dict>\n\t</array>\n\t<key>OpenEditors</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>Content</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t<string>941C754A0C066D47006D7AAC</string>\n\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t<string>freetype.h</string>\n\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>941C754B0C066D47006D7AAC</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>freetype.h</string>\n\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t<string>948177AB0C6F8439000C8E8C</string>\n\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>941C756D0C069601006D7AAC</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t<string>1</string>\n\t\t\t\t</dict>\n\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t<true/>\n\t\t\t</dict>\n\t\t\t<key>Geometry</key>\n\t\t\t<dict>\n\t\t\t\t<key>Frame</key>\n\t\t\t\t<string>{{0, 20}, {987, 883}}</string>\n\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t<false/>\n\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t<string>15 99 987 924 0 0 1680 1028 </string>\n\t\t\t</dict>\n\t\t</dict>\n\t</array>\n\t<key>PerspectiveWidths</key>\n\t<array>\n\t\t<integer>-1</integer>\n\t\t<integer>-1</integer>\n\t</array>\n\t<key>Perspectives</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>ChosenToolbarItems</key>\n\t\t\t<array>\n\t\t\t\t<string>active-target-popup</string>\n\t\t\t\t<string>active-buildstyle-popup</string>\n\t\t\t\t<string>action</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>buildOrClean</string>\n\t\t\t\t<string>build-and-runOrDebug</string>\n\t\t\t\t<string>com.apple.ide.PBXToolbarStopButton</string>\n\t\t\t\t<string>get-info</string>\n\t\t\t\t<string>toggle-editor</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>com.apple.pbx.toolbar.searchfield</string>\n\t\t\t</array>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProjectWithEditor</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.project</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<true/>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>326</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>66DF6BFE01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66DF6BFF01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>4CA7E553092CC67E0044FE85</string>\n\t\t\t\t\t\t\t\t<string>4CA7E552092CC66D0044FE85</string>\n\t\t\t\t\t\t\t\t<string>66DF6C3901D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66DF6C4501D7DEEE00A80119</string>\n\t\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>24</integer>\n\t\t\t\t\t\t\t\t\t<integer>23</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {326, 794}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {343, 812}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>326</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>4 161 1184 853 0 0 1680 1028 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>343pt</string>\n\t\t\t\t</dict>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>FT2Plugin.c</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CE0B20406471E060097A5F4</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>FT2Plugin.c</string>\n\t\t\t\t\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t\t\t\t\t<string>948177A80C6F8439000C8E8C</string>\n\t\t\t\t\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>940E41A709A44B07004715E5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>940E41F009A44C0E004715E5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>943BD83109C005AD0013220E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>943BD83309C005AD0013220E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9495AC950ACA07A100D58F66</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>945838D60BD1454000CB0CB0</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>941BF5330BDECAEA00D361A5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>941BF5340BDECAEA00D361A5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>941BF5520BDECB7300D361A5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>941C756C0C069601006D7AAC</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t\t<key>prevStack</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>949BB31F0932DE2B00684056</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E854C409339FA600B1FC29</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>940E41AB09A44B07004715E5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>940E41AD09A44B07004715E5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>943BD83809C005AD0013220E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>945838D90BD1454000CB0CB0</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>941BF5380BDECAEA00D361A5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>941BF53A0BDECAEA00D361A5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>941BF5540BDECB7300D361A5</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {836, 698}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>4 161 1184 853 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>698pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 703}, {836, 109}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>4 161 1184 853 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>109pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>836pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>948177A90C6F8439000C8E8C</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>948177AA0C6F8439000C8E8C</string>\n\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProject</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.morph</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>29B97314FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 337}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 355}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>373 269 690 397 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Morph</string>\n\t\t\t<key>PreferredWidth</key>\n\t\t\t<integer>300</integer>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default.short</string>\n\t\t</dict>\n\t</array>\n\t<key>PerspectivesBarVisible</key>\n\t<false/>\n\t<key>ShelfIsVisible</key>\n\t<false/>\n\t<key>SourceDescription</key>\n\t<string>file at '/System/Library/PrivateFrameworks/DevToolsInterface.framework/Versions/A/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string>\n\t<key>StatusbarIsVisible</key>\n\t<true/>\n\t<key>TimeStamp</key>\n\t<real>208633425.40347701</real>\n\t<key>ToolbarDisplayMode</key>\n\t<integer>1</integer>\n\t<key>ToolbarIsVisible</key>\n\t<true/>\n\t<key>ToolbarSizeMode</key>\n\t<integer>2</integer>\n\t<key>Type</key>\n\t<string>Perspectives</string>\n\t<key>UpdateMessage</key>\n\t<string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the \"Metro-Morph\" feature).  You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature.  Do you wish to update to the latest Workspace defaults for project '%@'?</string>\n\t<key>WindowJustification</key>\n\t<integer>5</integer>\n\t<key>WindowOrderList</key>\n\t<array>\n\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t<string>9481777B0C6F7E56000C8E8C</string>\n\t\t<string>941C754A0C066D47006D7AAC</string>\n\t\t<string>/Users/johnmci/Documents/SqueakFontsBertFT2/FT2PluginProj/FT2Plugin copy.xcodeproj</string>\n\t</array>\n\t<key>WindowString</key>\n\t<string>4 161 1184 853 0 0 1680 1028 </string>\n\t<key>WindowTools</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.build</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>FT2Plugin.c</string>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1065, 489}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>602 232 1065 683 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>489pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Build</string>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Collapse</key>\n\t\t\t\t\t\t\t\t<integer>1021</integer>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Open</key>\n\t\t\t\t\t\t\t\t<integer>1013</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 494}, {1065, 148}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>602 232 1065 683 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>148pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>642pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Build Results</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>94E8549C09339D8200B1FC29</string>\n\t\t\t\t<string>941BF5220BDECACE00D361A5</string>\n\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.build</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>602 232 1065 683 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>94E8549C09339D8200B1FC29</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugger</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Debugger</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {477, 466}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{477, 0}, {728, 466}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {1205, 466}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 466}, {1205, 233}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debug - GLUTExamples (Underwater)</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>DebugConsoleDrawerSize</key>\n\t\t\t\t\t\t\t\t<string>{100, 120}</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleVisible</key>\n\t\t\t\t\t\t\t\t<string>None</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>DebugSTDIOWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1205, 699}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>281 172 1205 740 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>699pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>699pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t\t<string>948177750C6F7E56000C8E8C</string>\n\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t<string>948177760C6F7E56000C8E8C</string>\n\t\t\t\t<string>948177770C6F7E56000C8E8C</string>\n\t\t\t\t<string>948177780C6F7E56000C8E8C</string>\n\t\t\t\t<string>948177790C6F7E56000C8E8C</string>\n\t\t\t\t<string>9481777A0C6F7E56000C8E8C</string>\n\t\t\t\t<string>9481777B0C6F7E56000C8E8C</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debug</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>281 172 1205 740 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.find</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>FT2Plugin.c</string>\n\t\t\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {1108, 288}}</string>\n\t\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t\t<string>181 128 1108 722 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t\t\t<string>1108pt</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>288pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Project Find</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 293}, {1108, 388}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>181 128 1108 722 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>388pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>681pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Find</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t\t<string>947C55DA0C03365B003F76BD</string>\n\t\t\t\t<string>947C55DB0C03365B003F76BD</string>\n\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>181 128 1108 722 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>MENUSEPARATOR</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debuggerConsole</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debugger Console</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {440, 358}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>655 401 440 400 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>358pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>359pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger Console</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>949BB2980932C81E00684056</string>\n\t\t\t\t<string>941C75580C066DB6006D7AAC</string>\n\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>655 401 440 400 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>949BB2980932C81E00684056</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.run</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>3</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528B0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Run</string>\n\t\t\t\t\t\t\t\t<key>Runner</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {493, 167}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 176}, {493, 267}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {405, 443}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{414, 0}, {514, 443}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {460, 159}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>316 696 459 200 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>159pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>159pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Run Log</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2B3069F1EA900FABCE6</string>\n\t\t\t\t<string>1C0AD2B4069F1EA900FABCE6</string>\n\t\t\t\t<string>1CD0528B0623707200166675</string>\n\t\t\t\t<string>1C0AD2B5069F1EA900FABCE6</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.run</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>316 696 459 200 0 0 1280 1002 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2B3069F1EA900FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.scm</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1C78EAB3065D492600B07095</string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>0pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>SCM</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ConsoleFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 259}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 7}, {452, 259}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t\t<key>TableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>Status</string>\n\t\t\t\t\t\t\t\t\t<real>30</real>\n\t\t\t\t\t\t\t\t\t<string>FileName</string>\n\t\t\t\t\t\t\t\t\t<real>199</real>\n\t\t\t\t\t\t\t\t\t<string>Path</string>\n\t\t\t\t\t\t\t\t\t<real>197.09500122070312</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>TableFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 250}}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>262pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>266pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>SCM</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAB4065D492600B07095</string>\n\t\t\t\t<string>1C78EAB5065D492600B07095</string>\n\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.scm</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.breakpoints</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t\t\t<string>no</string>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {168, 350}}</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t\t\t<false/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {185, 368}}</string>\n\t\t\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>79 552 744 409 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>185pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{190, 0}, {554, 368}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>79 552 744 409 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>554pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>368pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>MajorVersion</key>\n\t\t\t<integer>2</integer>\n\t\t\t<key>MinorVersion</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Name</key>\n\t\t\t<string>Breakpoints</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>941C75590C066DB6006D7AAC</string>\n\t\t\t\t<string>941C755A0C066DB6006D7AAC</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.breakpoints</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>79 552 744 409 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>941C75590C066DB6006D7AAC</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugAnimator</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Visualizer</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugAnimator</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>100 100 700 500 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.bookmarks</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>538 42 401 187 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.classBrowser</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>OptionsSetName</key>\n\t\t\t\t\t\t\t\t<string>Hierarchy, all classes</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Class Browser - NSObject</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ClassesFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {374, 96}}</string>\n\t\t\t\t\t\t\t\t<key>ClassesTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXClassNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>208</real>\n\t\t\t\t\t\t\t\t\t<string>PBXClassBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {630, 331}}</string>\n\t\t\t\t\t\t\t\t<key>MembersFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 105}, {374, 395}}</string>\n\t\t\t\t\t\t\t\t<key>MembersTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeIconColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>216</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>97</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>332pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>332pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t\t<string>1C0AD2B0069F1E9B00FABCE6</string>\n\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.classbrowser</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.xcodeproj/johnmci.mode1v3",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>ActivePerspectiveName</key>\n\t<string>Project</string>\n\t<key>AllowedModules</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Groups and Files Outline View</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCTaskListModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Task List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDetailModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>File and Smart Group Detail Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Detailed Build Results Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Batch Find Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Format Conflicts List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXCVSModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Source Code Control Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Breakpoints Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDockableInspector</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Inspector</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXOpenQuicklyModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Open Quickly Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Console</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCSnapshotModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Snapshots Tool</string>\n\t\t</dict>\n\t</array>\n\t<key>Description</key>\n\t<string>DefaultDescriptionKey</string>\n\t<key>DockingSystemVisible</key>\n\t<false/>\n\t<key>Extension</key>\n\t<string>mode1v3</string>\n\t<key>FavBarConfig</key>\n\t<dict>\n\t\t<key>PBXProjectModuleGUID</key>\n\t\t<string>94B1A5F10D4496030012B20F</string>\n\t\t<key>XCBarModuleItemNames</key>\n\t\t<dict/>\n\t\t<key>XCBarModuleItems</key>\n\t\t<array/>\n\t</dict>\n\t<key>FirstTimeWindowDisplayed</key>\n\t<false/>\n\t<key>Identifier</key>\n\t<string>com.apple.perspectives.project.mode1v3</string>\n\t<key>MajorVersion</key>\n\t<integer>33</integer>\n\t<key>MinorVersion</key>\n\t<integer>0</integer>\n\t<key>Name</key>\n\t<string>Default</string>\n\t<key>Notifications</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>XCObserverAutoDisconnectKey</key>\n\t\t\t<true/>\n\t\t\t<key>XCObserverDefintionKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusErrorsKey</key>\n\t\t\t\t<integer>0</integer>\n\t\t\t</dict>\n\t\t\t<key>XCObserverFactoryKey</key>\n\t\t\t<string>XCPerspectivesSpecificationIdentifier</string>\n\t\t\t<key>XCObserverGUIDKey</key>\n\t\t\t<string>XCObserverProjectIdentifier</string>\n\t\t\t<key>XCObserverNotificationKey</key>\n\t\t\t<string>PBXStatusBuildStateMessageNotification</string>\n\t\t\t<key>XCObserverTargetKey</key>\n\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t<key>XCObserverTriggerKey</key>\n\t\t\t<string>awakenModuleWithObserver:</string>\n\t\t\t<key>XCObserverValidationKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusErrorsKey</key>\n\t\t\t\t<integer>2</integer>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>XCObserverAutoDisconnectKey</key>\n\t\t\t<true/>\n\t\t\t<key>XCObserverDefintionKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusWarningsKey</key>\n\t\t\t\t<integer>0</integer>\n\t\t\t</dict>\n\t\t\t<key>XCObserverFactoryKey</key>\n\t\t\t<string>XCPerspectivesSpecificationIdentifier</string>\n\t\t\t<key>XCObserverGUIDKey</key>\n\t\t\t<string>XCObserverProjectIdentifier</string>\n\t\t\t<key>XCObserverNotificationKey</key>\n\t\t\t<string>PBXStatusBuildStateMessageNotification</string>\n\t\t\t<key>XCObserverTargetKey</key>\n\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t<key>XCObserverTriggerKey</key>\n\t\t\t<string>awakenModuleWithObserver:</string>\n\t\t\t<key>XCObserverValidationKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusWarningsKey</key>\n\t\t\t\t<integer>2</integer>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>XCObserverAutoDisconnectKey</key>\n\t\t\t<true/>\n\t\t\t<key>XCObserverDefintionKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusAnalyzerResultsKey</key>\n\t\t\t\t<integer>0</integer>\n\t\t\t</dict>\n\t\t\t<key>XCObserverFactoryKey</key>\n\t\t\t<string>XCPerspectivesSpecificationIdentifier</string>\n\t\t\t<key>XCObserverGUIDKey</key>\n\t\t\t<string>XCObserverProjectIdentifier</string>\n\t\t\t<key>XCObserverNotificationKey</key>\n\t\t\t<string>PBXStatusBuildStateMessageNotification</string>\n\t\t\t<key>XCObserverTargetKey</key>\n\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t<key>XCObserverTriggerKey</key>\n\t\t\t<string>awakenModuleWithObserver:</string>\n\t\t\t<key>XCObserverValidationKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusAnalyzerResultsKey</key>\n\t\t\t\t<integer>2</integer>\n\t\t\t</dict>\n\t\t</dict>\n\t</array>\n\t<key>OpenEditors</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>Content</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t<string>944067E810E6ACE300353B27</string>\n\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t<string>fttypes.h</string>\n\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>944067E910E6ACE300353B27</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>fttypes.h</string>\n\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t<string>9460BC771116DA46003C837E</string>\n\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>944067EC10E6ACE300353B27</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t<string>1</string>\n\t\t\t\t</dict>\n\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t<true/>\n\t\t\t</dict>\n\t\t\t<key>Geometry</key>\n\t\t\t<dict>\n\t\t\t\t<key>Frame</key>\n\t\t\t\t<string>{{0, 20}, {1326, 913}}</string>\n\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t<false/>\n\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t<string>15 69 1326 954 0 0 1680 1028 </string>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Content</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t<string>944067EE10E6ACE300353B27</string>\n\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t<string>freetype.h</string>\n\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>944067EF10E6ACE300353B27</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>freetype.h</string>\n\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t<string>9460BC791116DA46003C837E</string>\n\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>944067F210E6ACE300353B27</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t<string>1</string>\n\t\t\t\t</dict>\n\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t<true/>\n\t\t\t</dict>\n\t\t\t<key>Geometry</key>\n\t\t\t<dict>\n\t\t\t\t<key>Frame</key>\n\t\t\t\t<string>{{0, 20}, {1326, 913}}</string>\n\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t<false/>\n\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t<string>15 69 1326 954 0 0 1680 1028 </string>\n\t\t\t</dict>\n\t\t</dict>\n\t</array>\n\t<key>PerspectiveWidths</key>\n\t<array>\n\t\t<integer>-1</integer>\n\t\t<integer>-1</integer>\n\t</array>\n\t<key>Perspectives</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>ChosenToolbarItems</key>\n\t\t\t<array>\n\t\t\t\t<string>active-combo-popup</string>\n\t\t\t\t<string>action</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>debugger-enable-breakpoints</string>\n\t\t\t\t<string>build-and-go</string>\n\t\t\t\t<string>com.apple.ide.PBXToolbarStopButton</string>\n\t\t\t\t<string>get-info</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>com.apple.pbx.toolbar.searchfield</string>\n\t\t\t</array>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProjectWithEditor</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.project</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>326</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>66DF6BFE01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66DF6BFF01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>4CA7E553092CC67E0044FE85</string>\n\t\t\t\t\t\t\t\t<string>4CA7E552092CC66D0044FE85</string>\n\t\t\t\t\t\t\t\t<string>66DF6C3901D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66DF6C4501D7DEEE00A80119</string>\n\t\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>25</integer>\n\t\t\t\t\t\t\t\t\t<integer>24</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {326, 919}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {343, 937}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>326</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>306 50 1353 978 0 0 1680 1028 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>343pt</string>\n\t\t\t\t</dict>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>FT2Plugin.c</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CE0B20406471E060097A5F4</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>FT2Plugin.c</string>\n\t\t\t\t\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t\t\t\t\t<string>9460BC741116DA46003C837E</string>\n\t\t\t\t\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>9495AC950ACA07A100D58F66</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>941BF5340BDECAEA00D361A5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F6F5970D86101D00E75319</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9467D0D10E7BC0020031C57C</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C1A1310F3771F500A2AC5E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9433FBBF10DA2F6900405B56</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9480105710DEFB9C001E390E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>948010CC10DF048B001E390E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9440665810E5ADDB00353B27</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>944067E510E6ACE300353B27</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1005, 793}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>306 50 1353 978 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>793pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 798}, {1005, 139}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>306 50 1353 978 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>139pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>1005pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>9460BC751116DA46003C837E</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>9460BC761116DA46003C837E</string>\n\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfigUserDefaultsMinorVersion</key>\n\t\t\t<string>2</string>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.defaultV3</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProject</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.morph</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>29B97314FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 337}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 355}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>373 269 690 397 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Morph</string>\n\t\t\t<key>PreferredWidth</key>\n\t\t\t<integer>300</integer>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default.shortV3</string>\n\t\t</dict>\n\t</array>\n\t<key>PerspectivesBarVisible</key>\n\t<false/>\n\t<key>ShelfIsVisible</key>\n\t<false/>\n\t<key>StatusbarIsVisible</key>\n\t<true/>\n\t<key>TimeStamp</key>\n\t<real>286710342.34468597</real>\n\t<key>ToolbarDisplayMode</key>\n\t<integer>1</integer>\n\t<key>ToolbarIsVisible</key>\n\t<true/>\n\t<key>ToolbarSizeMode</key>\n\t<integer>2</integer>\n\t<key>Type</key>\n\t<string>Perspectives</string>\n\t<key>UpdateMessage</key>\n\t<string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the \"Metro-Morph\" feature).  You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature.  Do you wish to update to the latest Workspace defaults for project '%@'?</string>\n\t<key>WindowJustification</key>\n\t<integer>5</integer>\n\t<key>WindowOrderList</key>\n\t<array>\n\t\t<string>94F6F4C60D85FFD500E75319</string>\n\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t<string>944067EE10E6ACE300353B27</string>\n\t\t<string>944067E810E6ACE300353B27</string>\n\t\t<string>/Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/platforms/Mac OSObjC/plugins/FT2Plugin/FT2Plugin.xcodeproj</string>\n\t</array>\n\t<key>WindowString</key>\n\t<string>306 50 1353 978 0 0 1680 1028 </string>\n\t<key>WindowToolsV3</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.build</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string></string>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1219, 220}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>111 283 1219 701 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>220pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Build Results</string>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Collapse</key>\n\t\t\t\t\t\t\t\t<integer>1021</integer>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Open</key>\n\t\t\t\t\t\t\t\t<integer>1013</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 225}, {1219, 435}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>111 283 1219 701 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>435pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>660pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Build Results</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>94F6F4C60D85FFD500E75319</string>\n\t\t\t\t<string>9460BC7B1116DA46003C837E</string>\n\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.buildV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>111 283 1219 701 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>94F6F4C60D85FFD500E75319</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugger</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Debugger</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {489, 478}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{489, 0}, {909, 478}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {1398, 478}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 478}, {1398, 449}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debug - GLUTExamples (Underwater)</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>DebugConsoleVisible</key>\n\t\t\t\t\t\t\t\t<string>None</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>DebugSTDIOWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1398, 927}}</string>\n\t\t\t\t\t\t\t\t<key>PBXDebugSessionStackFrameViewKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>DebugVariablesTableConfiguration</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>Name</string>\n\t\t\t\t\t\t\t\t\t\t<real>217</real>\n\t\t\t\t\t\t\t\t\t\t<string>Value</string>\n\t\t\t\t\t\t\t\t\t\t<real>178</real>\n\t\t\t\t\t\t\t\t\t\t<string>Summary</string>\n\t\t\t\t\t\t\t\t\t\t<real>489</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t<string>{{489, 0}, {909, 478}}</string>\n\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t<string>260 60 1398 968 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>260 60 1398 968 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>927pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>927pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t\t<string>9460BC7C1116DA46003C837E</string>\n\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t<string>9460BC7D1116DA46003C837E</string>\n\t\t\t\t<string>9460BC7E1116DA46003C837E</string>\n\t\t\t\t<string>9460BC7F1116DA46003C837E</string>\n\t\t\t\t<string>9460BC801116DA46003C837E</string>\n\t\t\t\t<string>9460BC811116DA46003C837E</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>260 60 1398 968 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.find</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>FT2Plugin.c</string>\n\t\t\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {1208, 526}}</string>\n\t\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t\t<string>333 35 1208 930 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t\t\t<string>1208pt</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>526pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Project Find</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 531}, {1208, 358}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>333 35 1208 930 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>358pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>889pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Find</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t\t<string>9440665510E5ADC100353B27</string>\n\t\t\t\t<string>9440665610E5ADC100353B27</string>\n\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>333 35 1208 930 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>MENUSEPARATOR</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debuggerConsole</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debugger Console</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1563, 702}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>5 197 1563 743 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>702pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>702pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger Console</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t\t<string>9440665710E5ADC100353B27</string>\n\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.consoleV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>5 197 1563 743 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.snapshots</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCSnapshotModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Snapshots</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCSnapshotModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<string>Yes</string>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.snapshots</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>315 824 300 550 0 0 1440 878 </string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<string>Yes</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.scm</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1C78EAB3065D492600B07095</string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>0pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>SCM</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ConsoleFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 259}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 7}, {452, 259}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t\t<key>TableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>Status</string>\n\t\t\t\t\t\t\t\t\t<real>30</real>\n\t\t\t\t\t\t\t\t\t<string>FileName</string>\n\t\t\t\t\t\t\t\t\t<real>199</real>\n\t\t\t\t\t\t\t\t\t<string>Path</string>\n\t\t\t\t\t\t\t\t\t<real>197.09500122070312</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>TableFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 250}}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>262pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>266pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>SCM</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAB4065D492600B07095</string>\n\t\t\t\t<string>1C78EAB5065D492600B07095</string>\n\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.scm</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.breakpoints</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t\t\t<string>no</string>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {168, 350}}</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t\t\t<false/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {185, 368}}</string>\n\t\t\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>31 162 744 409 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>185pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{190, 0}, {554, 368}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>31 162 744 409 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>554pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>368pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>MajorVersion</key>\n\t\t\t<integer>3</integer>\n\t\t\t<key>MinorVersion</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Name</key>\n\t\t\t<string>Breakpoints</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>9440671910E5B9EE00353B27</string>\n\t\t\t\t<string>9440671A10E5B9EE00353B27</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.breakpointsV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>31 162 744 409 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>9440671910E5B9EE00353B27</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugAnimator</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Visualizer</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugAnimatorV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>100 100 700 500 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.bookmarks</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<false/>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>538 42 401 187 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.projectFormatConflicts</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Format Conflicts</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<false/>\n\t\t\t<key>WindowContentMinSize</key>\n\t\t\t<string>450 300</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>50 850 472 307 0 0 1440 877</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.classBrowser</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>OptionsSetName</key>\n\t\t\t\t\t\t\t\t<string>Hierarchy, all classes</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Class Browser - NSObject</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ClassesFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {374, 96}}</string>\n\t\t\t\t\t\t\t\t<key>ClassesTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXClassNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>208</real>\n\t\t\t\t\t\t\t\t\t<string>PBXClassBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {630, 331}}</string>\n\t\t\t\t\t\t\t\t<key>MembersFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 105}, {374, 395}}</string>\n\t\t\t\t\t\t\t\t<key>MembersTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeIconColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>216</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>97</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>332pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>332pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<false/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t\t<string>1C0AD2B0069F1E9B00FABCE6</string>\n\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.classbrowser</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.refactoring</string>\n\t\t\t<key>IncludeInToolsMenu</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{0, 0}, {500, 335}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{0, 0}, {500, 335}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCRefactoringModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Refactoring</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCRefactoringModule</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>200 200 500 356 0 0 1920 1200 </string>\n\t\t</dict>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.xcodeproj/johnmci.pbxuser",
    "content": "// !$*UTF8*$!\n{\n\t4C2DFB1309335838008B95AB /* PkgInfo */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1024, 457}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {1024, 457}}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {1044, 869}}\";\n\t\t};\n\t};\n\t4CA7E52C092CC14E0044FE85 /* FT2Plugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {956, 23972}}\";\n\t\t\tsepNavSelRange = \"{1145, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1838}\";\n\t\t\tsepNavVisRect = \"{{0, 12144}, {795, 666}}\";\n\t\t\tsepNavWindowFrame = \"{{38, 55}, {772, 797}}\";\n\t\t};\n\t};\n\t4CA7E530092CC16B0044FE85 /* Info-FT2Plugin.plist */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {733, 668}}\";\n\t\t\tsepNavSelRange = \"{637, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {733, 668}}\";\n\t\t\tsepNavWindowFrame = \"{{61, 34}, {772, 797}}\";\n\t\t};\n\t};\n\t4CA7E550092CC6680044FE85 /* ft2build.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {787, 770}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 3590}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {719, 496}}\";\n\t\t\tsepNavWindowFrame = \"{{15, 68}, {980, 805}}\";\n\t\t};\n\t};\n\t4CED2BBF08EC3935007BDF80 /* sqVirtualMachine.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {781, 4862}}\";\n\t\t\tsepNavSelRange = \"{1000, 20}\";\n\t\t\tsepNavVisRange = \"{526, 2209}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {491, 512}}\";\n\t\t\tsepNavWindowFrame = \"{{61, 36}, {828, 795}}\";\n\t\t};\n\t};\n\t66DF6BFD01D7DCEA00A80119 /* Project object */ = {\n\t\tactiveBuildConfigurationName = Deployment;\n\t\tactiveExecutable = 949BB27E0932C7DF00684056 /* SqueakVM */;\n\t\tactiveSDKPreference = macosx10.5;\n\t\tactiveTarget = 942103F2084F50DF006A0FD2 /* FT2Plugin */;\n\t\taddToTargets = (\n\t\t\t942103F2084F50DF006A0FD2 /* FT2Plugin */,\n\t\t);\n\t\tbreakpoints = (\n\t\t);\n\t\tcodeSenseManager = 949BAFE809326DA600684056 /* Code sense */;\n\t\texecutables = (\n\t\t\t949BB27E0932C7DF00684056 /* SqueakVM */,\n\t\t);\n\t\tperUserDictionary = {\n\t\t\t\"PBXConfiguration.PBXBreakpointsDataSource.v1:1CA1AED706398EBD00589147\" = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXBreakpointsDataSource_ContinueID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t20,\n\t\t\t\t\t210,\n\t\t\t\t\t20,\n\t\t\t\t\t110,\n\t\t\t\t\t109,\n\t\t\t\t\t20,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXBreakpointsDataSource_ActionID,\n\t\t\t\t\tPBXBreakpointsDataSource_TypeID,\n\t\t\t\t\tPBXBreakpointsDataSource_BreakpointID,\n\t\t\t\t\tPBXBreakpointsDataSource_UseID,\n\t\t\t\t\tPBXBreakpointsDataSource_LocationID,\n\t\t\t\t\tPBXBreakpointsDataSource_ConditionID,\n\t\t\t\t\tPBXBreakpointsDataSource_ContinueID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXExecutablesDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXExecutablesDataSource_NameID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t22,\n\t\t\t\t\t300,\n\t\t\t\t\t666,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXExecutablesDataSource_ActiveFlagID,\n\t\t\t\t\tPBXExecutablesDataSource_NameID,\n\t\t\t\t\tPBXExecutablesDataSource_CommentsID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t766,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t\t20,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Target_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXFindDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFindDataSource_LocationID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t200,\n\t\t\t\t\t792,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFindDataSource_MessageID,\n\t\t\t\t\tPBXFindDataSource_LocationID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t726,\n\t\t\t\t\t60,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXTargetDataSource_PrimaryAttribute,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXPerProjectTemplateStateSaveDate = 286710319;\n\t\t\tPBXWorkspaceStateSaveDate = 286710319;\n\t\t};\n\t\tperUserProjectItems = {\n\t\t\t941BF5340BDECAEA00D361A5 /* PBXTextBookmark */ = 941BF5340BDECAEA00D361A5 /* PBXTextBookmark */;\n\t\t\t9433FBBF10DA2F6900405B56 /* PBXTextBookmark */ = 9433FBBF10DA2F6900405B56 /* PBXTextBookmark */;\n\t\t\t9440665810E5ADDB00353B27 /* PBXTextBookmark */ = 9440665810E5ADDB00353B27 /* PBXTextBookmark */;\n\t\t\t944067E510E6ACE300353B27 /* PBXTextBookmark */ = 944067E510E6ACE300353B27 /* PBXTextBookmark */;\n\t\t\t944067EC10E6ACE300353B27 /* PBXTextBookmark */ = 944067EC10E6ACE300353B27 /* PBXTextBookmark */;\n\t\t\t944067F210E6ACE300353B27 /* PBXTextBookmark */ = 944067F210E6ACE300353B27 /* PBXTextBookmark */;\n\t\t\t9460BC741116DA46003C837E /* PBXTextBookmark */ = 9460BC741116DA46003C837E /* PBXTextBookmark */;\n\t\t\t9460BC771116DA46003C837E /* PBXTextBookmark */ = 9460BC771116DA46003C837E /* PBXTextBookmark */;\n\t\t\t9460BC791116DA46003C837E /* PBXTextBookmark */ = 9460BC791116DA46003C837E /* PBXTextBookmark */;\n\t\t\t9467D0D10E7BC0020031C57C /* PBXTextBookmark */ = 9467D0D10E7BC0020031C57C /* PBXTextBookmark */;\n\t\t\t9480105710DEFB9C001E390E /* PBXTextBookmark */ = 9480105710DEFB9C001E390E /* PBXTextBookmark */;\n\t\t\t948010CC10DF048B001E390E /* PBXTextBookmark */ = 948010CC10DF048B001E390E /* PBXTextBookmark */;\n\t\t\t9495AC950ACA07A100D58F66 /* PBXTextBookmark */ = 9495AC950ACA07A100D58F66 /* PBXTextBookmark */;\n\t\t\t94C1A1310F3771F500A2AC5E /* PBXTextBookmark */ = 94C1A1310F3771F500A2AC5E /* PBXTextBookmark */;\n\t\t\t94F6F5970D86101D00E75319 /* PBXTextBookmark */ = 94F6F5970D86101D00E75319 /* PBXTextBookmark */;\n\t\t};\n\t\tsourceControlManager = 949BAFE709326DA600684056 /* Source Control */;\n\t\tuserBuildSettings = {\n\t\t};\n\t};\n\t9407B2F910DA271000AE2B55 /* sqVirtualMachine.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1279, 3471}}\";\n\t\t\tsepNavSelRange = \"{2625, 19}\";\n\t\t\tsepNavVisRange = \"{1025, 3006}\";\n\t\t\tsepNavWindowFrame = \"{{15, 13}, {1326, 1010}}\";\n\t\t};\n\t};\n\t940E416E09A448AA004715E5 /* macFileNameBits.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {956, 719}}\";\n\t\t\tsepNavSelRange = \"{302, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1284}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {1024, 457}}\";\n\t\t\tsepNavWindowFrame = \"{{763, 43}, {828, 795}}\";\n\t\t};\n\t};\n\t941BF43E0BDEB4B700D361A5 /* tttables.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {787, 9254}}\";\n\t\t\tsepNavSelRange = \"{160, 11}\";\n\t\t\tsepNavVisRange = \"{0, 2768}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {719, 496}}\";\n\t\t\tsepNavWindowFrame = \"{{38, 128}, {841, 874}}\";\n\t\t};\n\t};\n\t941BF5340BDECAEA00D361A5 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 4C2DFB1309335838008B95AB /* PkgInfo */;\n\t\tname = \"PkgInfo: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 8;\n\t\tvrLoc = 0;\n\t};\n\t941FC1910A75607B0071CA29 /* Squeak VM Opt.app */ = {\n\t\tisa = PBXFileReference;\n\t\texplicitFileType = wrapper.application;\n\t\tname = \"Squeak VM Opt.app\";\n\t\tpath = ../../../../build/Debug/Squeak.app;\n\t\tsourceTree = SOURCE_ROOT;\n\t};\n\t942103F2084F50DF006A0FD2 /* FT2Plugin */ = {\n\t\tactiveExec = 0;\n\t};\n\t9433FBBF10DA2F6900405B56 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 944E9BEE05E91D17003F0BED /* sqPlatformSpecific.h */;\n\t\tname = \"sqPlatformSpecific.h: 74\";\n\t\trLen = 0;\n\t\trLoc = 3027;\n\t\trType = 0;\n\t\tvrLen = 2127;\n\t\tvrLoc = 1864;\n\t};\n\t9440665810E5ADDB00353B27 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 940E416E09A448AA004715E5 /* macFileNameBits.c */;\n\t\tname = \"macFileNameBits.c: 14\";\n\t\trLen = 0;\n\t\trLoc = 302;\n\t\trType = 0;\n\t\tvrLen = 1284;\n\t\tvrLoc = 0;\n\t};\n\t944067E510E6ACE300353B27 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 4CA7E52C092CC14E0044FE85 /* FT2Plugin.c */;\n\t\tname = \"FT2Plugin.c: 1\";\n\t\trLen = 1;\n\t\trLoc = 64;\n\t\trType = 0;\n\t\tvrLen = 1708;\n\t\tvrLoc = 0;\n\t};\n\t944067EC10E6ACE300353B27 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 944067ED10E6ACE300353B27 /* fttypes.h */;\n\t\tname = \"fttypes.h: 579\";\n\t\trLen = 48;\n\t\trLoc = 34831;\n\t\trType = 0;\n\t\tvrLen = 2881;\n\t\tvrLoc = 32095;\n\t};\n\t944067ED10E6ACE300353B27 /* fttypes.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = fttypes.h;\n\t\tpath = \"/Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/fttypes.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t944067F210E6ACE300353B27 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 944067F310E6ACE300353B27 /* freetype.h */;\n\t\tname = \"freetype.h: 3020\";\n\t\trLen = 7;\n\t\trLoc = 187419;\n\t\trType = 0;\n\t\tvrLen = 4656;\n\t\tvrLoc = 185351;\n\t};\n\t944067F310E6ACE300353B27 /* freetype.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = freetype.h;\n\t\tpath = \"/Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/freetype.h\";\n\t\tsourceTree = \"<absolute>\";\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1279, 50427}}\";\n\t\t\tsepNavSelRange = \"{187419, 7}\";\n\t\t\tsepNavVisRange = \"{185351, 4578}\";\n\t\t\tsepNavWindowFrame = \"{{15, 13}, {1326, 1010}}\";\n\t\t};\n\t};\n\t944E9BEE05E91D17003F0BED /* sqPlatformSpecific.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {838, 1651}}\";\n\t\t\tsepNavSelRange = \"{3027, 0}\";\n\t\t\tsepNavVisRange = \"{1864, 2127}\";\n\t\t\tsepNavVisRect = \"{{0, 1209}, {1067, 256}}\";\n\t\t};\n\t};\n\t9460BC741116DA46003C837E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 4CA7E52C092CC14E0044FE85 /* FT2Plugin.c */;\n\t\tname = \"FT2Plugin.c: 45\";\n\t\trLen = 0;\n\t\trLoc = 1145;\n\t\trType = 0;\n\t\tvrLen = 1838;\n\t\tvrLoc = 0;\n\t};\n\t9460BC771116DA46003C837E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9460BC781116DA46003C837E /* fttypes.h */;\n\t\tname = \"fttypes.h: 579\";\n\t\trLen = 48;\n\t\trLoc = 34831;\n\t\trType = 0;\n\t\tvrLen = 2959;\n\t\tvrLoc = 32017;\n\t};\n\t9460BC781116DA46003C837E /* fttypes.h */ = {\n\t\tisa = PBXFileReference;\n\t\tname = fttypes.h;\n\t\tpath = \"/Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/fttypes.h\";\n\t\tsourceTree = \"<absolute>\";\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1279, 7865}}\";\n\t\t\tsepNavSelRange = \"{34831, 48}\";\n\t\t\tsepNavVisRange = \"{32017, 2959}\";\n\t\t\tsepNavWindowFrame = \"{{15, 13}, {1326, 1010}}\";\n\t\t};\n\t};\n\t9460BC791116DA46003C837E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9460BC7A1116DA46003C837E /* freetype.h */;\n\t\tname = \"freetype.h: 3020\";\n\t\trLen = 7;\n\t\trLoc = 187419;\n\t\trType = 0;\n\t\tvrLen = 4578;\n\t\tvrLoc = 185351;\n\t};\n\t9460BC7A1116DA46003C837E /* freetype.h */ = {\n\t\tisa = PBXFileReference;\n\t\tname = freetype.h;\n\t\tpath = \"/Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/freetype.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9467D0D10E7BC0020031C57C /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 941BF43E0BDEB4B700D361A5 /* tttables.h */;\n\t\tname = \"tttables.h: 3\";\n\t\trLen = 11;\n\t\trLoc = 160;\n\t\trType = 0;\n\t\tvrLen = 2768;\n\t\tvrLoc = 0;\n\t};\n\t9480105710DEFB9C001E390E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 949BB01909327CC500684056 /* sqMemoryAccess.h */;\n\t\tname = \"sqMemoryAccess.h: 95\";\n\t\trLen = 0;\n\t\trLoc = 3934;\n\t\trType = 0;\n\t\tvrLen = 3568;\n\t\tvrLoc = 2563;\n\t};\n\t948010CC10DF048B001E390E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 949BB01709327C9D00684056 /* interp.h */;\n\t\tname = \"interp.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 697;\n\t\tvrLoc = 0;\n\t};\n\t9495AC950ACA07A100D58F66 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 4CA7E530092CC16B0044FE85 /* Info-FT2Plugin.plist */;\n\t\tname = \"Info-FT2Plugin.plist: 26\";\n\t\trLen = 0;\n\t\trLoc = 877;\n\t\trType = 0;\n\t\tvrLen = 900;\n\t\tvrLoc = 0;\n\t};\n\t949BAFE709326DA600684056 /* Source Control */ = {\n\t\tisa = PBXSourceControlManager;\n\t\tfallbackIsa = XCSourceControlManager;\n\t\tisSCMEnabled = 0;\n\t\tscmConfiguration = {\n\t\t\trepositoryNamesForRoots = {\n\t\t\t\t\"\" = \"\";\n\t\t\t};\n\t\t};\n\t\tscmType = \"\";\n\t};\n\t949BAFE809326DA600684056 /* Code sense */ = {\n\t\tisa = PBXCodeSenseManager;\n\t\tindexTemplatePath = \"\";\n\t};\n\t949BB01709327C9D00684056 /* interp.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {968, 635}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 697}\";\n\t\t};\n\t};\n\t949BB01909327CC500684056 /* sqMemoryAccess.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {968, 2288}}\";\n\t\t\tsepNavSelRange = \"{3934, 0}\";\n\t\t\tsepNavVisRange = \"{2563, 3568}\";\n\t\t\tsepNavWindowFrame = \"{{15, 13}, {1326, 1010}}\";\n\t\t};\n\t};\n\t949BB07A09328C1500684056 /* sq.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1067, 5866}}\";\n\t\t\tsepNavSelRange = \"{5164, 23}\";\n\t\t\tsepNavVisRect = \"{{0, 1601}, {1067, 256}}\";\n\t\t};\n\t};\n\t949BB23909328D7E00684056 /* macFileNameBits.c */ = {\n\t\tisa = PBXFileReference;\n\t\tfileEncoding = 4;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = macFileNameBits.c;\n\t\tpath = /Users/johnmci/Documents/SqueakFontsBertFT2/FT2PluginProj/macFileNameBits.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t949BB27E0932C7DF00684056 /* SqueakVM */ = {\n\t\tisa = PBXExecutable;\n\t\tactiveArgIndices = (\n\t\t);\n\t\targumentStrings = (\n\t\t);\n\t\tautoAttachOnCrash = 1;\n\t\tbreakpointsEnabled = 1;\n\t\tconfigStateDict = {\n\t\t\t\"PBXLSLaunchAction-0\" = {\n\t\t\t\tPBXLSLaunchAction = 0;\n\t\t\t\tPBXLSLaunchStartAction = 1;\n\t\t\t\tPBXLSLaunchStdioStyle = 2;\n\t\t\t\tPBXLSLaunchStyle = 0;\n\t\t\t\tclass = PBXLSRunLaunchConfig;\n\t\t\t\tcommandLineArgs = (\n\t\t\t\t);\n\t\t\t\tdisplayName = \"Executable Runner\";\n\t\t\t\tenvironment = {\n\t\t\t\t};\n\t\t\t\tidentifier = com.apple.Xcode.launch.runConfig;\n\t\t\t\tremoteHostInfo = \"\";\n\t\t\t\tstartActionInfo = \"\";\n\t\t\t};\n\t\t};\n\t\tcustomDataFormattersEnabled = 1;\n\t\tdataTipCustomDataFormattersEnabled = 1;\n\t\tdataTipShowTypeColumn = 1;\n\t\tdataTipSortType = 0;\n\t\tdebuggerPlugin = GDBDebugging;\n\t\tdisassemblyDisplayState = 0;\n\t\tdylibVariantSuffix = \"\";\n\t\tenableDebugStr = 1;\n\t\tenvironmentEntries = (\n\t\t);\n\t\texecutableSystemSymbolLevel = 0;\n\t\texecutableUserSymbolLevel = 0;\n\t\tlaunchableReference = 941FC1910A75607B0071CA29 /* Squeak VM Opt.app */;\n\t\tlibgmallocEnabled = 0;\n\t\tname = SqueakVM;\n\t\tsavedGlobals = {\n\t\t};\n\t\tshowTypeColumn = 0;\n\t\tsourceDirectories = (\n\t\t);\n\t\tvariableFormatDictionary = {\n\t\t};\n\t};\n\t94C1A1310F3771F500A2AC5E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 949BB23909328D7E00684056 /* macFileNameBits.c */;\n\t\tname = \"macFileNameBits.c: 17\";\n\t\trLen = 0;\n\t\trLoc = 427;\n\t\trType = 0;\n\t\tvrLen = 1280;\n\t\tvrLoc = 0;\n\t};\n\t94F6F5970D86101D00E75319 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 4CA7E550092CC6680044FE85 /* ft2build.h */;\n\t\tname = \"ft2build.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 3590;\n\t\tvrLoc = 0;\n\t};\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 42;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t040F1BFC12CD18FF008BA0CB /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 040F1BFB12CD18FF008BA0CB /* Info.plist */; };\n\t\t040F1C0912CD1991008BA0CB /* UnixOSProcessPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 040F1C0812CD1991008BA0CB /* UnixOSProcessPlugin.c */; };\n\t\t040F1C2E12CD1B19008BA0CB /* SocketPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 040F1C2D12CD1B19008BA0CB /* SocketPlugin.h */; };\n\t\t040F1C3212CD1B51008BA0CB /* FilePlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 040F1C3112CD1B51008BA0CB /* FilePlugin.h */; };\n\t\t040F1C4412CD1C70008BA0CB /* sqaio.h in Headers */ = {isa = PBXBuildFile; fileRef = 040F1C4312CD1C70008BA0CB /* sqaio.h */; };\n\t\t4C2DFB2D093359A8008B95AB /* PkgInfo in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4C2DFB1309335838008B95AB /* PkgInfo */; };\n\t\t4CA7E551092CC6680044FE85 /* ft2build.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CA7E550092CC6680044FE85 /* ft2build.h */; };\n\t\t9407B2FA10DA271000AE2B55 /* sqVirtualMachine.h in Headers */ = {isa = PBXBuildFile; fileRef = 9407B2F910DA271000AE2B55 /* sqVirtualMachine.h */; };\n\t\t942103F9084F50DF006A0FD2 /* sqConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 944E9BEC05E91D17003F0BED /* sqConfig.h */; };\n\t\t942103FB084F50DF006A0FD2 /* sqPlatformSpecific.h in Headers */ = {isa = PBXBuildFile; fileRef = 944E9BEE05E91D17003F0BED /* sqPlatformSpecific.h */; };\n\t\t942103FD084F50DF006A0FD2 /* SqueakPlugin.icns in Resources */ = {isa = PBXBuildFile; fileRef = 66C6C8E501DB1EC300A80109 /* SqueakPlugin.icns */; };\n\t\t949BB00D09327C3300684056 /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = 949BB00C09327C3300684056 /* config.h */; };\n\t\t949BB01809327C9D00684056 /* interp.h in Headers */ = {isa = PBXBuildFile; fileRef = 949BB01709327C9D00684056 /* interp.h */; };\n\t\t949BB01A09327CC500684056 /* sqMemoryAccess.h in Headers */ = {isa = PBXBuildFile; fileRef = 949BB01909327CC500684056 /* sqMemoryAccess.h */; };\n\t\t949BB07B09328C1500684056 /* sq.h in Headers */ = {isa = PBXBuildFile; fileRef = 949BB07A09328C1500684056 /* sq.h */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXBuildRule section */\n\t\t94D066A8084F978100D2CF17 /* PBXBuildRule */ = {\n\t\t\tisa = PBXBuildRule;\n\t\t\tcompilerSpec = com.apple.compilers.gcc.4_2;\n\t\t\tfileType = sourcecode.c;\n\t\t\tisEditable = 1;\n\t\t\toutputFiles = (\n\t\t\t);\n\t\t};\n/* End PBXBuildRule section */\n\n/* Begin PBXCopyFilesBuildPhase section */\n\t\t4C2DFB2B09335970008B95AB /* CopyFiles */ = {\n\t\t\tisa = PBXCopyFilesBuildPhase;\n\t\t\tbuildActionMask = 12;\n\t\t\tdstPath = ..;\n\t\t\tdstSubfolderSpec = 7;\n\t\t\tfiles = (\n\t\t\t\t4C2DFB2D093359A8008B95AB /* PkgInfo in CopyFiles */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXCopyFilesBuildPhase section */\n\n/* Begin PBXFileReference section */\n\t\t040F1BFB12CD18FF008BA0CB /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n\t\t040F1C0812CD1991008BA0CB /* UnixOSProcessPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = UnixOSProcessPlugin.c; sourceTree = \"<group>\"; };\n\t\t040F1C2D12CD1B19008BA0CB /* SocketPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SocketPlugin.h; path = ../../../Cross/plugins/SocketPlugin/SocketPlugin.h; sourceTree = SOURCE_ROOT; };\n\t\t040F1C3112CD1B51008BA0CB /* FilePlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FilePlugin.h; path = ../../../Cross/plugins/FilePlugin/FilePlugin.h; sourceTree = SOURCE_ROOT; };\n\t\t040F1C4312CD1C70008BA0CB /* sqaio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqaio.h; path = ../../../unix/vm/sqaio.h; sourceTree = SOURCE_ROOT; };\n\t\t4C2DFB1309335838008B95AB /* PkgInfo */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = PkgInfo; sourceTree = \"<group>\"; };\n\t\t4CA7E550092CC6680044FE85 /* ft2build.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ft2build.h; path = /usr/X11R6/include/ft2build.h; sourceTree = \"<absolute>\"; };\n\t\t4CF9AFE9092E090000DBD378 /* UnixOSProcessPlugin.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UnixOSProcessPlugin.bundle; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t66C6C8E501DB1EC300A80109 /* SqueakPlugin.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = SqueakPlugin.icns; path = ../../vm/OSX/SqueakPlugin.icns; sourceTree = \"<group>\"; };\n\t\t9407B2F910DA271000AE2B55 /* sqVirtualMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqVirtualMachine.h; path = ../../../Cross/vm/sqVirtualMachine.h; sourceTree = SOURCE_ROOT; };\n\t\t944E9BEC05E91D17003F0BED /* sqConfig.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sqConfig.h; path = ../../vm/iPhone/sqConfig.h; sourceTree = \"<group>\"; };\n\t\t944E9BEE05E91D17003F0BED /* sqPlatformSpecific.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sqPlatformSpecific.h; path = ../../vm/iPhone/sqPlatformSpecific.h; sourceTree = \"<group>\"; };\n\t\t949BB00C09327C3300684056 /* config.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = config.h; path = ../../vm/iPhone/config.h; sourceTree = \"<group>\"; };\n\t\t949BB01709327C9D00684056 /* interp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = interp.h; path = ../../../../src/vm/interp.h; sourceTree = \"<group>\"; };\n\t\t949BB01909327CC500684056 /* sqMemoryAccess.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sqMemoryAccess.h; path = ../../../Cross/vm/sqMemoryAccess.h; sourceTree = \"<group>\"; };\n\t\t949BB07A09328C1500684056 /* sq.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sq.h; path = ../../../Cross/vm/sq.h; sourceTree = \"<group>\"; };\n\t\t949BB07C09328C9D00684056 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = \"<absolute>\"; };\n\t\t949BB08109328CD500684056 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = \"<absolute>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t94210404084F50DF006A0FD2 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t4CA7E552092CC66D0044FE85 /* Headers */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t9407B2F910DA271000AE2B55 /* sqVirtualMachine.h */,\n\t\t\t\t949BB07A09328C1500684056 /* sq.h */,\n\t\t\t\t949BB01909327CC500684056 /* sqMemoryAccess.h */,\n\t\t\t\t949BB01709327C9D00684056 /* interp.h */,\n\t\t\t\t949BB00C09327C3300684056 /* config.h */,\n\t\t\t\t4CA7E550092CC6680044FE85 /* ft2build.h */,\n\t\t\t\t944E9BEC05E91D17003F0BED /* sqConfig.h */,\n\t\t\t\t944E9BEE05E91D17003F0BED /* sqPlatformSpecific.h */,\n\t\t\t);\n\t\t\tname = Headers;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t4CA7E553092CC67E0044FE85 /* Libraries */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t949BB08109328CD500684056 /* Carbon.framework */,\n\t\t\t\t949BB07C09328C9D00684056 /* CoreFoundation.framework */,\n\t\t\t);\n\t\t\tname = Libraries;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66DF6BFE01D7DCEA00A80119 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t040F1BFB12CD18FF008BA0CB /* Info.plist */,\n\t\t\t\t4C2DFB1309335838008B95AB /* PkgInfo */,\n\t\t\t\t66DF6BFF01D7DCEA00A80119 /* source */,\n\t\t\t\t4CA7E553092CC67E0044FE85 /* Libraries */,\n\t\t\t\t4CA7E552092CC66D0044FE85 /* Headers */,\n\t\t\t\t66DF6C3901D7DCEA00A80119 /* resources */,\n\t\t\t\t66DF6C4501D7DEEE00A80119 /* Products */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66DF6BFF01D7DCEA00A80119 /* source */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t040F1C4312CD1C70008BA0CB /* sqaio.h */,\n\t\t\t\t040F1C3112CD1B51008BA0CB /* FilePlugin.h */,\n\t\t\t\t040F1C2D12CD1B19008BA0CB /* SocketPlugin.h */,\n\t\t\t\t040F1C0812CD1991008BA0CB /* UnixOSProcessPlugin.c */,\n\t\t\t);\n\t\t\tname = source;\n\t\t\tpath = ../../../../src/plugins/UnixOSProcessPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66DF6C3901D7DCEA00A80119 /* resources */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t66C6C8E501DB1EC300A80109 /* SqueakPlugin.icns */,\n\t\t\t);\n\t\t\tname = resources;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66DF6C4501D7DEEE00A80119 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t4CF9AFE9092E090000DBD378 /* UnixOSProcessPlugin.bundle */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXHeadersBuildPhase section */\n\t\t942103F3084F50DF006A0FD2 /* Headers */ = {\n\t\t\tisa = PBXHeadersBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t942103F9084F50DF006A0FD2 /* sqConfig.h in Headers */,\n\t\t\t\t942103FB084F50DF006A0FD2 /* sqPlatformSpecific.h in Headers */,\n\t\t\t\t4CA7E551092CC6680044FE85 /* ft2build.h in Headers */,\n\t\t\t\t949BB00D09327C3300684056 /* config.h in Headers */,\n\t\t\t\t949BB01809327C9D00684056 /* interp.h in Headers */,\n\t\t\t\t949BB01A09327CC500684056 /* sqMemoryAccess.h in Headers */,\n\t\t\t\t949BB07B09328C1500684056 /* sq.h in Headers */,\n\t\t\t\t9407B2FA10DA271000AE2B55 /* sqVirtualMachine.h in Headers */,\n\t\t\t\t040F1C2E12CD1B19008BA0CB /* SocketPlugin.h in Headers */,\n\t\t\t\t040F1C3212CD1B51008BA0CB /* FilePlugin.h in Headers */,\n\t\t\t\t040F1C4412CD1C70008BA0CB /* sqaio.h in Headers */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXHeadersBuildPhase section */\n\n/* Begin PBXNativeTarget section */\n\t\t942103F2084F50DF006A0FD2 /* UnixOSProcessPlugin */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 949BAFDF09326DA600684056 /* Build configuration list for PBXNativeTarget \"UnixOSProcessPlugin\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t942103F3084F50DF006A0FD2 /* Headers */,\n\t\t\t\t942103FC084F50DF006A0FD2 /* Resources */,\n\t\t\t\t4C2DFB2B09335970008B95AB /* CopyFiles */,\n\t\t\t\t942103FF084F50DF006A0FD2 /* Sources */,\n\t\t\t\t94210404084F50DF006A0FD2 /* Frameworks */,\n\t\t\t\t94210406084F50DF006A0FD2 /* Rez */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t\t94D066A8084F978100D2CF17 /* PBXBuildRule */,\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = UnixOSProcessPlugin;\n\t\t\tproductName = \"PrintJobPlugin Debug\";\n\t\t\tproductReference = 4CF9AFE9092E090000DBD378 /* UnixOSProcessPlugin.bundle */;\n\t\t\tproductType = \"com.apple.product-type.bundle\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t66DF6BFD01D7DCEA00A80119 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tbuildConfigurationList = 949BAFE309326DA600684056 /* Build configuration list for PBXProject \"UnixOSProcessPlugin\" */;\n\t\t\tcompatibilityVersion = \"Xcode 2.4\";\n\t\t\tdevelopmentRegion = English;\n\t\t\thasScannedForEncodings = 1;\n\t\t\tknownRegions = (\n\t\t\t\tEnglish,\n\t\t\t\tJapanese,\n\t\t\t\tFrench,\n\t\t\t\tGerman,\n\t\t\t);\n\t\t\tmainGroup = 66DF6BFE01D7DCEA00A80119;\n\t\t\tproductRefGroup = 66DF6C4501D7DEEE00A80119 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t942103F2084F50DF006A0FD2 /* UnixOSProcessPlugin */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t942103FC084F50DF006A0FD2 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t942103FD084F50DF006A0FD2 /* SqueakPlugin.icns in Resources */,\n\t\t\t\t040F1BFC12CD18FF008BA0CB /* Info.plist in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXRezBuildPhase section */\n\t\t94210406084F50DF006A0FD2 /* Rez */ = {\n\t\t\tisa = PBXRezBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXRezBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t942103FF084F50DF006A0FD2 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t040F1C0912CD1991008BA0CB /* UnixOSProcessPlugin.c in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin XCBuildConfiguration section */\n\t\t949BAFE009326DA600684056 /* Development */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tARCHS = \"$(ONLY_ACTIVE_ARCH_PRE_XCODE_3_1)\";\n\t\t\t\tCOPY_PHASE_STRIP = YES;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_ENABLE_FIX_AND_CONTINUE = YES;\n\t\t\t\tGCC_GENERATE_DEBUGGING_SYMBOLS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = \"\";\n\t\t\t\tINFOPLIST_FILE = Info.plist;\n\t\t\t\tONLY_ACTIVE_ARCH_PRE_XCODE_3_1 = \"$(NATIVE_ARCH_ACTUAL)\";\n\t\t\t\tOTHER_CFLAGS = \"\";\n\t\t\t\tOTHER_LDFLAGS = (\n\t\t\t\t\t\"-undefined\",\n\t\t\t\t\tdynamic_lookup,\n\t\t\t\t);\n\t\t\t\tPRODUCT_NAME = UnixOSProcessPlugin;\n\t\t\t\tSDKROOT = /Developer/SDKs/MacOSX10.5.sdk;\n\t\t\t\tSECTORDER_FLAGS = \"\";\n\t\t\t\tWARNING_CFLAGS = (\n\t\t\t\t\t\"-Wmost\",\n\t\t\t\t\t\"-Wno-four-char-constants\",\n\t\t\t\t\t\"-Wno-unknown-pragmas\",\n\t\t\t\t);\n\t\t\t\tWRAPPER_EXTENSION = bundle;\n\t\t\t};\n\t\t\tname = Development;\n\t\t};\n\t\t949BAFE109326DA600684056 /* Deployment */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tARCHS = \"$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)\";\n\t\t\t\tARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = \"ppc i386\";\n\t\t\t\tCOPY_PHASE_STRIP = YES;\n\t\t\t\tGCC_ENABLE_FIX_AND_CONTINUE = NO;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = \"\";\n\t\t\t\tINFOPLIST_FILE = Info.plist;\n\t\t\t\tOTHER_CFLAGS = \"\";\n\t\t\t\tOTHER_LDFLAGS = (\n\t\t\t\t\t\"-flat_namespace\",\n\t\t\t\t\t\"-undefined\",\n\t\t\t\t\twarning,\n\t\t\t\t);\n\t\t\t\tPER_ARCH_CFLAGS_i386 = \"-O3 -Wall\";\n\t\t\t\tPER_ARCH_CFLAGS_ppc = \"-O3  -fPIC\";\n\t\t\t\tPRELINK_LIBS = \"\";\n\t\t\t\tPRODUCT_NAME = UnixOSProcessPlugin;\n\t\t\t\tSDKROOT = /Developer/SDKs/MacOSX10.5.sdk;\n\t\t\t\tSECTORDER_FLAGS = \"\";\n\t\t\t\tWARNING_CFLAGS = (\n\t\t\t\t\t\"-Wmost\",\n\t\t\t\t\t\"-Wno-four-char-constants\",\n\t\t\t\t\t\"-Wno-unknown-pragmas\",\n\t\t\t\t);\n\t\t\t\tWRAPPER_EXTENSION = bundle;\n\t\t\t\tZERO_LINK = NO;\n\t\t\t};\n\t\t\tname = Deployment;\n\t\t};\n\t\t949BAFE209326DA600684056 /* Default */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tARCHS = (\n\t\t\t\t\tppc,\n\t\t\t\t\ti386,\n\t\t\t\t);\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 2;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = TARGET_API_MAC_CARBON;\n\t\t\t\tHEADER_SEARCH_PATHS = (\n\t\t\t\t\t/Developer/Headers/FlatCarbon,\n\t\t\t\t\t/usr/X11R6/include/freetype2,\n\t\t\t\t);\n\t\t\t\tINFOPLIST_FILE = \"Info-FT2Plugin.plist\";\n\t\t\t\tLIBRARY_SEARCH_PATHS = (\n\t\t\t\t\t\"$(SRCROOT)\",\n\t\t\t\t\t\"$(SYSTEM_DEVELOPER_DIR)/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib\",\n\t\t\t\t\t\"$(SRCROOT)/../fonts/freetype-2.1.10/objs\",\n\t\t\t\t\t\"$(SRCROOT)/../fonts/freetype-2.1.10/objs/intel\",\n\t\t\t\t);\n\t\t\t\tOTHER_CFLAGS = \"\";\n\t\t\t\tOTHER_REZFLAGS = \"\";\n\t\t\t\tPRODUCT_NAME = FT2Plugin;\n\t\t\t\tSECTORDER_FLAGS = \"\";\n\t\t\t\tWARNING_CFLAGS = (\n\t\t\t\t\t\"-Wmost\",\n\t\t\t\t\t\"-Wno-four-char-constants\",\n\t\t\t\t\t\"-Wno-unknown-pragmas\",\n\t\t\t\t);\n\t\t\t\tWRAPPER_EXTENSION = bundle;\n\t\t\t};\n\t\t\tname = Default;\n\t\t};\n\t\t949BAFE409326DA600684056 /* Development */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tGENERATE_MASTER_OBJECT_FILE = NO;\n\t\t\t\tSDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;\n\t\t\t};\n\t\t\tname = Development;\n\t\t};\n\t\t949BAFE509326DA600684056 /* Deployment */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tGENERATE_MASTER_OBJECT_FILE = NO;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tPRELINK_FLAGS = \"\";\n\t\t\t\tPRELINK_LIBS = \"\";\n\t\t\t\tSDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;\n\t\t\t};\n\t\t\tname = Deployment;\n\t\t};\n\t\t949BAFE609326DA600684056 /* Default */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tGENERATE_MASTER_OBJECT_FILE = NO;\n\t\t\t\tSDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;\n\t\t\t};\n\t\t\tname = Default;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t949BAFDF09326DA600684056 /* Build configuration list for PBXNativeTarget \"UnixOSProcessPlugin\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t949BAFE009326DA600684056 /* Development */,\n\t\t\t\t949BAFE109326DA600684056 /* Deployment */,\n\t\t\t\t949BAFE209326DA600684056 /* Default */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Default;\n\t\t};\n\t\t949BAFE309326DA600684056 /* Build configuration list for PBXProject \"UnixOSProcessPlugin\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t949BAFE409326DA600684056 /* Development */,\n\t\t\t\t949BAFE509326DA600684056 /* Deployment */,\n\t\t\t\t949BAFE609326DA600684056 /* Default */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Default;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 66DF6BFD01D7DCEA00A80119 /* Project object */;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/UnixOSProcessPlugin/UnixOSProcessPluginOLD.xcodeproj/MAC.mode1v3",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>ActivePerspectiveName</key>\n\t<string>Project</string>\n\t<key>AllowedModules</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Groups and Files Outline View</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCTaskListModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Task List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDetailModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>File and Smart Group Detail Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Detailed Build Results Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Batch Find Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Format Conflicts List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXCVSModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Source Code Control Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Breakpoints Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDockableInspector</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Inspector</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXOpenQuicklyModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Open Quickly Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Console</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCSnapshotModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Snapshots Tool</string>\n\t\t</dict>\n\t</array>\n\t<key>BundlePath</key>\n\t<string>/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources</string>\n\t<key>Description</key>\n\t<string>DefaultDescriptionKey</string>\n\t<key>DockingSystemVisible</key>\n\t<false/>\n\t<key>Extension</key>\n\t<string>mode1v3</string>\n\t<key>FavBarConfig</key>\n\t<dict>\n\t\t<key>PBXProjectModuleGUID</key>\n\t\t<string>040F1A2512CD1578008BA0CB</string>\n\t\t<key>XCBarModuleItemNames</key>\n\t\t<dict/>\n\t\t<key>XCBarModuleItems</key>\n\t\t<array/>\n\t</dict>\n\t<key>FirstTimeWindowDisplayed</key>\n\t<false/>\n\t<key>Identifier</key>\n\t<string>com.apple.perspectives.project.mode1v3</string>\n\t<key>MajorVersion</key>\n\t<integer>33</integer>\n\t<key>MinorVersion</key>\n\t<integer>0</integer>\n\t<key>Name</key>\n\t<string>Default</string>\n\t<key>Notifications</key>\n\t<array/>\n\t<key>OpenEditors</key>\n\t<array/>\n\t<key>PerspectiveWidths</key>\n\t<array>\n\t\t<integer>-1</integer>\n\t\t<integer>-1</integer>\n\t</array>\n\t<key>Perspectives</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>ChosenToolbarItems</key>\n\t\t\t<array>\n\t\t\t\t<string>active-combo-popup</string>\n\t\t\t\t<string>action</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>debugger-enable-breakpoints</string>\n\t\t\t\t<string>build-and-go</string>\n\t\t\t\t<string>com.apple.ide.PBXToolbarStopButton</string>\n\t\t\t\t<string>get-info</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>com.apple.pbx.toolbar.searchfield</string>\n\t\t\t</array>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProjectWithEditor</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.project</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>66DF6BFE01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66B8BC570381F53800A8011A</string>\n\t\t\t\t\t\t\t\t<string>66DF6BFF01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>11</integer>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 445}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 463}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>20 260 788 504 0 0 1280 778 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>203pt</string>\n\t\t\t\t</dict>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>sqMemoryAccess.h</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CE0B20406471E060097A5F4</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>sqMemoryAccess.h</string>\n\t\t\t\t\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t\t\t\t\t<string>040F1A3512CD16D0008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F1A2F12CD16D0008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F1A3012CD16D0008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F1A3112CD16D0008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F1A3212CD16D0008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F1A3312CD16D0008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F1A3412CD16D0008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {580, 277}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>20 260 788 504 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>277pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 282}, {580, 181}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>20 260 788 504 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>181pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>580pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>040F1A2312CD1578008BA0CB</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>040F1A2412CD1578008BA0CB</string>\n\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfigUserDefaultsMinorVersion</key>\n\t\t\t<string>2</string>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.defaultV3</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProject</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.morph</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>29B97314FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 337}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 355}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>373 269 690 397 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Morph</string>\n\t\t\t<key>PreferredWidth</key>\n\t\t\t<integer>300</integer>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default.shortV3</string>\n\t\t</dict>\n\t</array>\n\t<key>PerspectivesBarVisible</key>\n\t<false/>\n\t<key>ShelfIsVisible</key>\n\t<false/>\n\t<key>SourceDescription</key>\n\t<string>file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string>\n\t<key>StatusbarIsVisible</key>\n\t<true/>\n\t<key>TimeStamp</key>\n\t<real>0.0</real>\n\t<key>ToolbarConfigUserDefaultsMinorVersion</key>\n\t<string>2</string>\n\t<key>ToolbarDisplayMode</key>\n\t<integer>1</integer>\n\t<key>ToolbarIsVisible</key>\n\t<true/>\n\t<key>ToolbarSizeMode</key>\n\t<integer>1</integer>\n\t<key>Type</key>\n\t<string>Perspectives</string>\n\t<key>UpdateMessage</key>\n\t<string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the \"Metro-Morph\" feature).  You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature.  Do you wish to update to the latest Workspace defaults for project '%@'?</string>\n\t<key>WindowJustification</key>\n\t<integer>5</integer>\n\t<key>WindowOrderList</key>\n\t<array>\n\t\t<string>040F1A2612CD1578008BA0CB</string>\n\t\t<string>/Users/MAC/Desktop/Dev/VM/cog-osx/platforms/iOS/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.xcodeproj</string>\n\t</array>\n\t<key>WindowString</key>\n\t<string>20 260 788 504 0 0 1280 778 </string>\n\t<key>WindowToolsV3</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.build</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string></string>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {500, 218}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>191 226 500 500 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>218pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Build Results</string>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Collapse</key>\n\t\t\t\t\t\t\t\t<integer>1021</integer>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Open</key>\n\t\t\t\t\t\t\t\t<integer>1011</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 223}, {500, 236}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>191 226 500 500 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>236pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>459pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Build Results</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>040F1A2612CD1578008BA0CB</string>\n\t\t\t\t<string>040F1A2712CD1578008BA0CB</string>\n\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.buildV3</string>\n\t\t\t<key>WindowContentMinSize</key>\n\t\t\t<string>486 300</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>191 226 500 500 0 0 1280 778 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>040F1A2612CD1578008BA0CB</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugger</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Debugger</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {317, 164}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{317, 0}, {377, 164}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {694, 164}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 164}, {694, 216}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debug - GLUTExamples (Underwater)</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>DebugConsoleDrawerSize</key>\n\t\t\t\t\t\t\t\t<string>{100, 120}</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleVisible</key>\n\t\t\t\t\t\t\t\t<string>None</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>DebugSTDIOWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {694, 380}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>321 238 694 422 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t\t<string>1C0AD2AB069F1E9B00FABCE6</string>\n\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t<string>1C0AD2AC069F1E9B00FABCE6</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>321 238 694 422 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.find</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t\t\t<string>1CD0528D0623707200166675</string>\n\t\t\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {781, 167}}</string>\n\t\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t\t<string>62 385 781 470 0 0 1440 878 </string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t\t\t<string>781pt</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>50%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Project Find</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{8, 0}, {773, 254}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>62 385 781 470 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>50%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>428pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Find</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t\t<string>1C530D58069F1CE1000CFCEE</string>\n\t\t\t\t<string>1C530D59069F1CE1000CFCEE</string>\n\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t<string>1C530D5A069F1CE1000CFCEE</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>62 385 781 470 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>MENUSEPARATOR</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debuggerConsole</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debugger Console</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {650, 250}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>516 632 650 250 0 0 1680 1027 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>209pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>209pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger Console</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t\t<string>1C78EAAE065D492600B07095</string>\n\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.consoleV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>650 41 650 250 0 0 1280 1002 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.snapshots</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCSnapshotModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Snapshots</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCSnapshotModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<string>Yes</string>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.snapshots</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>315 824 300 550 0 0 1440 878 </string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<string>Yes</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.scm</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1C78EAB3065D492600B07095</string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>0pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>SCM</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ConsoleFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 259}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 7}, {452, 259}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t\t<key>TableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>Status</string>\n\t\t\t\t\t\t\t\t\t<real>30</real>\n\t\t\t\t\t\t\t\t\t<string>FileName</string>\n\t\t\t\t\t\t\t\t\t<real>199</real>\n\t\t\t\t\t\t\t\t\t<string>Path</string>\n\t\t\t\t\t\t\t\t\t<real>197.0950012207031</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>TableFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 250}}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>262pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>266pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>SCM</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAB4065D492600B07095</string>\n\t\t\t\t<string>1C78EAB5065D492600B07095</string>\n\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.scm</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.breakpoints</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t\t\t<string>no</string>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {168, 350}}</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {185, 368}}</string>\n\t\t\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>185pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{190, 0}, {554, 368}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>554pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>368pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>MajorVersion</key>\n\t\t\t<integer>3</integer>\n\t\t\t<key>MinorVersion</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Name</key>\n\t\t\t<string>Breakpoints</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CDDB66807F98D9800BB5817</string>\n\t\t\t\t<string>1CDDB66907F98D9800BB5817</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.breakpointsV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CDDB66807F98D9800BB5817</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugAnimator</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Visualizer</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugAnimatorV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>100 100 700 500 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.bookmarks</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>538 42 401 187 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.projectFormatConflicts</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Format Conflicts</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowContentMinSize</key>\n\t\t\t<string>450 300</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>50 850 472 307 0 0 1440 877</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.classBrowser</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>OptionsSetName</key>\n\t\t\t\t\t\t\t\t<string>Hierarchy, all classes</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Class Browser - NSObject</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ClassesFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {374, 96}}</string>\n\t\t\t\t\t\t\t\t<key>ClassesTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXClassNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>208</real>\n\t\t\t\t\t\t\t\t\t<string>PBXClassBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {630, 331}}</string>\n\t\t\t\t\t\t\t\t<key>MembersFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 105}, {374, 395}}</string>\n\t\t\t\t\t\t\t\t<key>MembersTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeIconColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>216</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>97</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>332pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>332pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t\t<string>1C0AD2B0069F1E9B00FABCE6</string>\n\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.classbrowser</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.refactoring</string>\n\t\t\t<key>IncludeInToolsMenu</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{0, 0}, {500, 335}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{0, 0}, {500, 335}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCRefactoringModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Refactoring</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCRefactoringModule</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>200 200 500 356 0 0 1920 1200 </string>\n\t\t</dict>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/UnixOSProcessPlugin/UnixOSProcessPluginOLD.xcodeproj/MAC.pbxuser",
    "content": "// !$*UTF8*$!\n{\n\t040F1A2112CD1470008BA0CB /* Source Control */ = {\n\t\tisa = PBXSourceControlManager;\n\t\tfallbackIsa = XCSourceControlManager;\n\t\tisSCMEnabled = 0;\n\t\tscmConfiguration = {\n\t\t\trepositoryNamesForRoots = {\n\t\t\t\t\"\" = \"\";\n\t\t\t};\n\t\t};\n\t};\n\t040F1A2212CD1470008BA0CB /* Code sense */ = {\n\t\tisa = PBXCodeSenseManager;\n\t\tindexTemplatePath = \"\";\n\t};\n\t040F1A2A12CD1687008BA0CB /* sqConfig.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {519, 245}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 302}\";\n\t\t};\n\t};\n\t040F1A2B12CD1687008BA0CB /* config.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {537, 2249}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 904}\";\n\t\t};\n\t};\n\t040F1A2F12CD16D0008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 040F1A2A12CD1687008BA0CB /* sqConfig.h */;\n\t\tname = \"sqConfig.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 302;\n\t\tvrLoc = 0;\n\t};\n\t040F1A3012CD16D0008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 040F1A2B12CD1687008BA0CB /* config.h */;\n\t\tname = \"config.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 904;\n\t\tvrLoc = 0;\n\t};\n\t040F1A3112CD16D0008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 66B8BC5A0381F63A00A8011A /* sqPlatformSpecific.h */;\n\t\tname = \"sqPlatformSpecific.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 870;\n\t\tvrLoc = 0;\n\t};\n\t040F1A3212CD16D0008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 66B8BC5C0381F66500A8011A /* sq.h */;\n\t\tname = \"sq.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 393;\n\t\tvrLoc = 0;\n\t};\n\t040F1A3312CD16D0008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 66B8BC5E0381F69100A8011A /* sqVirtualMachine.h */;\n\t\tname = \"sqVirtualMachine.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 510;\n\t\tvrLoc = 0;\n\t};\n\t040F1A3412CD16D0008BA0CB /* PBXBookmark */ = {\n\t\tisa = PBXBookmark;\n\t\tfRef = 94ABA8920858C40D00079BE1 /* sqMemoryAccess.h */;\n\t};\n\t040F1A3512CD16D0008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94ABA8920858C40D00079BE1 /* sqMemoryAccess.h */;\n\t\tname = \"sqMemoryAccess.h: 12\";\n\t\trLen = 0;\n\t\trLoc = 497;\n\t\trType = 0;\n\t\tvrLen = 652;\n\t\tvrLoc = 0;\n\t};\n\t66B8BC5A0381F63A00A8011A /* sqPlatformSpecific.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {579, 2210}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 870}\";\n\t\t};\n\t};\n\t66B8BC5C0381F66500A8011A /* sq.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {551, 7254}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 393}\";\n\t\t};\n\t};\n\t66B8BC5E0381F69100A8011A /* sqVirtualMachine.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {519, 3952}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 510}\";\n\t\t};\n\t};\n\t66DF6BFD01D7DCEA00A80119 /* Project object */ = {\n\t\tactiveBuildConfigurationName = Development;\n\t\tactiveTarget = 94AF34E00846F91100FA5ACB /* ObjectiveCPlugin */;\n\t\taddToTargets = (\n\t\t\t94AF34E00846F91100FA5ACB /* ObjectiveCPlugin */,\n\t\t);\n\t\tcodeSenseManager = 040F1A2212CD1470008BA0CB /* Code sense */;\n\t\tperUserDictionary = {\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t341,\n\t\t\t\t\t20,\n\t\t\t\t\t48.16259765625,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t\t20,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Target_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXPerProjectTemplateStateSaveDate = 315429969;\n\t\t\tPBXWorkspaceStateSaveDate = 315429969;\n\t\t};\n\t\tperUserProjectItems = {\n\t\t\t040F1A2F12CD16D0008BA0CB /* PBXTextBookmark */ = 040F1A2F12CD16D0008BA0CB /* PBXTextBookmark */;\n\t\t\t040F1A3012CD16D0008BA0CB /* PBXTextBookmark */ = 040F1A3012CD16D0008BA0CB /* PBXTextBookmark */;\n\t\t\t040F1A3112CD16D0008BA0CB /* PBXTextBookmark */ = 040F1A3112CD16D0008BA0CB /* PBXTextBookmark */;\n\t\t\t040F1A3212CD16D0008BA0CB /* PBXTextBookmark */ = 040F1A3212CD16D0008BA0CB /* PBXTextBookmark */;\n\t\t\t040F1A3312CD16D0008BA0CB /* PBXTextBookmark */ = 040F1A3312CD16D0008BA0CB /* PBXTextBookmark */;\n\t\t\t040F1A3412CD16D0008BA0CB /* PBXBookmark */ = 040F1A3412CD16D0008BA0CB /* PBXBookmark */;\n\t\t\t040F1A3512CD16D0008BA0CB /* PBXTextBookmark */ = 040F1A3512CD16D0008BA0CB /* PBXTextBookmark */;\n\t\t};\n\t\tsourceControlManager = 040F1A2112CD1470008BA0CB /* Source Control */;\n\t\tuserBuildSettings = {\n\t\t};\n\t};\n\t94ABA8920858C40D00079BE1 /* sqMemoryAccess.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {523, 2314}}\";\n\t\t\tsepNavSelRange = \"{497, 0}\";\n\t\t\tsepNavVisRange = \"{0, 652}\";\n\t\t};\n\t};\n\t94AF34E00846F91100FA5ACB /* ObjectiveCPlugin */ = {\n\t\tactiveExec = 0;\n\t};\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/UnixOSProcessPlugin/UnixOSProcessPluginOLD.xcodeproj/johnmci.mode1",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>ActivePerspectiveName</key>\n\t<string>Project</string>\n\t<key>AllowedModules</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Groups and Files Outline View</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCTaskListModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Task List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDetailModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>File and Smart Group Detail Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Detailed Build Results Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Batch Find Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Run Log</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXCVSModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Source Code Control Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Breakpoints Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDockableInspector</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Inspector</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXOpenQuicklyModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Open Quickly Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Console</string>\n\t\t</dict>\n\t</array>\n\t<key>Description</key>\n\t<string>DefaultDescriptionKey</string>\n\t<key>DockingSystemVisible</key>\n\t<false/>\n\t<key>Extension</key>\n\t<string>mode1</string>\n\t<key>FavBarConfig</key>\n\t<dict>\n\t\t<key>PBXProjectModuleGUID</key>\n\t\t<string>94AF35A4084782DD00FA5ACB</string>\n\t\t<key>XCBarModuleItemNames</key>\n\t\t<dict/>\n\t\t<key>XCBarModuleItems</key>\n\t\t<array/>\n\t</dict>\n\t<key>FirstTimeWindowDisplayed</key>\n\t<false/>\n\t<key>Identifier</key>\n\t<string>com.apple.perspectives.project.mode1</string>\n\t<key>MajorVersion</key>\n\t<integer>31</integer>\n\t<key>MinorVersion</key>\n\t<integer>1</integer>\n\t<key>Name</key>\n\t<string>Default</string>\n\t<key>Notifications</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>XCObserverAutoDisconnectKey</key>\n\t\t\t<true/>\n\t\t\t<key>XCObserverDefintionKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusErrorsKey</key>\n\t\t\t\t<integer>0</integer>\n\t\t\t</dict>\n\t\t\t<key>XCObserverFactoryKey</key>\n\t\t\t<string>XCPerspectivesSpecificationIdentifier</string>\n\t\t\t<key>XCObserverGUIDKey</key>\n\t\t\t<string>XCObserverProjectIdentifier</string>\n\t\t\t<key>XCObserverNotificationKey</key>\n\t\t\t<string>PBXStatusBuildStateMessageNotification</string>\n\t\t\t<key>XCObserverTargetKey</key>\n\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t<key>XCObserverTriggerKey</key>\n\t\t\t<string>awakenModuleWithObserver:</string>\n\t\t\t<key>XCObserverValidationKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusErrorsKey</key>\n\t\t\t\t<integer>2</integer>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>XCObserverAutoDisconnectKey</key>\n\t\t\t<true/>\n\t\t\t<key>XCObserverDefintionKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusWarningsKey</key>\n\t\t\t\t<integer>0</integer>\n\t\t\t</dict>\n\t\t\t<key>XCObserverFactoryKey</key>\n\t\t\t<string>XCPerspectivesSpecificationIdentifier</string>\n\t\t\t<key>XCObserverGUIDKey</key>\n\t\t\t<string>XCObserverProjectIdentifier</string>\n\t\t\t<key>XCObserverNotificationKey</key>\n\t\t\t<string>PBXStatusBuildStateMessageNotification</string>\n\t\t\t<key>XCObserverTargetKey</key>\n\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t<key>XCObserverTriggerKey</key>\n\t\t\t<string>awakenModuleWithObserver:</string>\n\t\t\t<key>XCObserverValidationKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusWarningsKey</key>\n\t\t\t\t<integer>2</integer>\n\t\t\t</dict>\n\t\t</dict>\n\t</array>\n\t<key>OpenEditors</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>Content</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t<string>9446BA210C8126AA005E579E</string>\n\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t<string>sqMacQuicktimeInteface.c</string>\n\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>9446BA220C8126AA005E579E</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>sqMacQuicktimeInteface.c</string>\n\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t<string>9446BA230C8126AA005E579E</string>\n\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>9446BA1D0C7F9A3C005E579E</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t<string>1</string>\n\t\t\t\t</dict>\n\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t<true/>\n\t\t\t</dict>\n\t\t\t<key>Geometry</key>\n\t\t\t<dict>\n\t\t\t\t<key>Frame</key>\n\t\t\t\t<string>{{0, 20}, {1364, 623}}</string>\n\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t<false/>\n\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t<string>38 188 1364 664 0 0 1680 1028 </string>\n\t\t\t</dict>\n\t\t</dict>\n\t</array>\n\t<key>PerspectiveWidths</key>\n\t<array>\n\t\t<integer>-1</integer>\n\t\t<integer>-1</integer>\n\t</array>\n\t<key>Perspectives</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>ChosenToolbarItems</key>\n\t\t\t<array>\n\t\t\t\t<string>active-target-popup</string>\n\t\t\t\t<string>active-buildstyle-popup</string>\n\t\t\t\t<string>action</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>buildOrClean</string>\n\t\t\t\t<string>build-and-runOrDebug</string>\n\t\t\t\t<string>com.apple.ide.PBXToolbarStopButton</string>\n\t\t\t\t<string>get-info</string>\n\t\t\t\t<string>toggle-editor</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>com.apple.pbx.toolbar.searchfield</string>\n\t\t\t</array>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProjectWithEditor</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.project</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<true/>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>291</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>66DF6BFE01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66B8BC570381F53800A8011A</string>\n\t\t\t\t\t\t\t\t<string>66DF6BFF01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66DF6C3901D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66DF6C4501D7DEEE00A80119</string>\n\t\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>13</integer>\n\t\t\t\t\t\t\t\t\t<integer>12</integer>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {291, 687}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {308, 705}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>291</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>573 282 1093 746 0 0 1680 1028 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>308pt</string>\n\t\t\t\t</dict>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>SqueakPlugin.icns</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CE0B20406471E060097A5F4</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>SqueakPlugin.icns</string>\n\t\t\t\t\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t\t\t\t\t<string>9446BA1E0C8126AA005E579E</string>\n\t\t\t\t\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F9B20F0AAF9CF20084BAF1</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94A6D45E0ADEAFC4003E9CBE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94A6D4600ADEAFC4003E9CBE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94B4E3640B608E950095E823</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>946618740B8CD72500AA8AE3</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9466187F0B8CD74300AA8AE3</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94255A010BCAB363006C9CF0</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t\t<key>prevStack</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>949CD5C6085CC32700EB8605</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94ECA4AA097E137A00C2C7BA</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94ECA522097E18C600C2C7BA</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94ECA680097EC85D00C2C7BA</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94ECA688097ECFBF00C2C7BA</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E73FC10B0052CB0017E7BA</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94B4E3660B608E950095E823</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {780, 642}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>573 282 1093 746 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>642pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 647}, {780, 58}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>573 282 1093 746 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>58pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>780pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>9446BA1F0C8126AA005E579E</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>9446BA200C8126AA005E579E</string>\n\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProject</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.morph</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>29B97314FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 337}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 355}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>373 269 690 397 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Morph</string>\n\t\t\t<key>PreferredWidth</key>\n\t\t\t<integer>300</integer>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default.short</string>\n\t\t</dict>\n\t</array>\n\t<key>PerspectivesBarVisible</key>\n\t<false/>\n\t<key>ShelfIsVisible</key>\n\t<false/>\n\t<key>SourceDescription</key>\n\t<string>file at '/System/Library/PrivateFrameworks/DevToolsInterface.framework/Versions/A/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string>\n\t<key>StatusbarIsVisible</key>\n\t<true/>\n\t<key>TimeStamp</key>\n\t<real>209689144.27254501</real>\n\t<key>ToolbarDisplayMode</key>\n\t<integer>1</integer>\n\t<key>ToolbarIsVisible</key>\n\t<true/>\n\t<key>ToolbarSizeMode</key>\n\t<integer>2</integer>\n\t<key>Type</key>\n\t<string>Perspectives</string>\n\t<key>UpdateMessage</key>\n\t<string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the \"Metro-Morph\" feature).  You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature.  Do you wish to update to the latest Workspace defaults for project '%@'?</string>\n\t<key>WindowJustification</key>\n\t<integer>5</integer>\n\t<key>WindowOrderList</key>\n\t<array>\n\t\t<string>/Users/johnmci/Documents/SqueakQuicktimePlugin/SqueakQuicktime copy.xcodeproj</string>\n\t\t<string>9446BA210C8126AA005E579E</string>\n\t</array>\n\t<key>WindowString</key>\n\t<string>573 282 1093 746 0 0 1680 1028 </string>\n\t<key>WindowTools</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.build</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string></string>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {879, 326}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>91 68 879 795 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>326pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Build</string>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Collapse</key>\n\t\t\t\t\t\t\t\t<integer>1021</integer>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Open</key>\n\t\t\t\t\t\t\t\t<integer>1013</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 331}, {879, 423}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>91 68 879 795 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>423pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>754pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Build Results</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>94E4F4CD08D0A1CA00B9E724</string>\n\t\t\t\t<string>945C091209E8C91000AD1BBC</string>\n\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.build</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>91 68 879 795 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>94E4F4CD08D0A1CA00B9E724</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugger</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Debugger</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {68, 262}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 262}, {68, 442}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {68, 704}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{68, 0}, {1074, 704}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debug - GLUTExamples (Underwater)</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>DebugConsoleDrawerSize</key>\n\t\t\t\t\t\t\t\t<string>{100, 120}</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleVisible</key>\n\t\t\t\t\t\t\t\t<string>None</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>DebugSTDIOWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1142, 704}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>335 27 1142 745 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>704pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>704pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t\t<string>94C7543D09C9DC4E00CA7462</string>\n\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t<string>94C7543E09C9DC4E00CA7462</string>\n\t\t\t\t<string>94C7543F09C9DC4E00CA7462</string>\n\t\t\t\t<string>94C7544009C9DC4E00CA7462</string>\n\t\t\t\t<string>94C7544109C9DC4E00CA7462</string>\n\t\t\t\t<string>94C7544209C9DC4E00CA7462</string>\n\t\t\t\t<string>94C7544309C9DC4E00CA7462</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debug</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>335 27 1142 745 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.find</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>sqMacQuicktimeInteface.c</string>\n\t\t\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {791, 416}}</string>\n\t\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t\t<string>750 33 791 674 0 0 1440 878 </string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t\t\t<string>791pt</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>416pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Project Find</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 421}, {791, 212}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>750 33 791 674 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>212pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>633pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Find</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t\t<string>94B4E36A0B608E950095E823</string>\n\t\t\t\t<string>94B4E36B0B608E950095E823</string>\n\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>750 33 791 674 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>MENUSEPARATOR</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debuggerConsole</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debugger Console</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {696, 544}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>635 69 696 585 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>544pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>544pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger Console</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>94ABA92F0858D3A300079BE1</string>\n\t\t\t\t<string>9410FB9909AA6FD0002FD7B7</string>\n\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>635 69 696 585 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>94ABA92F0858D3A300079BE1</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.run</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>3</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528B0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Run</string>\n\t\t\t\t\t\t\t\t<key>Runner</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {493, 167}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 176}, {493, 267}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {405, 443}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{414, 0}, {514, 443}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {460, 159}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>316 696 459 200 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>159pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>159pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Run Log</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXRunSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2B3069F1EA900FABCE6</string>\n\t\t\t\t<string>1C0AD2B4069F1EA900FABCE6</string>\n\t\t\t\t<string>1CD0528B0623707200166675</string>\n\t\t\t\t<string>1C0AD2B5069F1EA900FABCE6</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.run</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>316 696 459 200 0 0 1280 1002 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2B3069F1EA900FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.scm</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1C78EAB3065D492600B07095</string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>0pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>SCM</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ConsoleFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 259}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 7}, {452, 259}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t\t<key>TableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>Status</string>\n\t\t\t\t\t\t\t\t\t<real>30</real>\n\t\t\t\t\t\t\t\t\t<string>FileName</string>\n\t\t\t\t\t\t\t\t\t<real>199</real>\n\t\t\t\t\t\t\t\t\t<string>Path</string>\n\t\t\t\t\t\t\t\t\t<real>197.09500122070312</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>TableFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 250}}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>262pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>266pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>SCM</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAB4065D492600B07095</string>\n\t\t\t\t<string>1C78EAB5065D492600B07095</string>\n\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.scm</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.breakpoints</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t\t\t<string>no</string>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {168, 350}}</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t\t\t<false/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {185, 368}}</string>\n\t\t\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>185pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{190, 0}, {554, 368}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>554pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>368pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>MajorVersion</key>\n\t\t\t<integer>2</integer>\n\t\t\t<key>MinorVersion</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Name</key>\n\t\t\t<string>Breakpoints</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CDDB66807F98D9800BB5817</string>\n\t\t\t\t<string>1CDDB66907F98D9800BB5817</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.breakpoints</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CDDB66807F98D9800BB5817</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugAnimator</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Visualizer</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugAnimator</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>100 100 700 500 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.bookmarks</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>538 42 401 187 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.classBrowser</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>OptionsSetName</key>\n\t\t\t\t\t\t\t\t<string>Hierarchy, all classes</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Class Browser - NSObject</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ClassesFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {378, 96}}</string>\n\t\t\t\t\t\t\t\t<key>ClassesTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXClassNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>208</real>\n\t\t\t\t\t\t\t\t\t<string>PBXClassBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {630, 332}}</string>\n\t\t\t\t\t\t\t\t<key>MembersFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 101}, {378, 231}}</string>\n\t\t\t\t\t\t\t\t<key>MembersTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeIconColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>216</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>101</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>312 384 630 352 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>332pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>332pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<false/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t\t<string>949CD652085CD34000EB8605</string>\n\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.classbrowser</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>312 384 630 352 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/UnixOSProcessPlugin/UnixOSProcessPluginOLD.xcodeproj/johnmci.mode1v3",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>ActivePerspectiveName</key>\n\t<string>Project</string>\n\t<key>AllowedModules</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Groups and Files Outline View</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCTaskListModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Task List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDetailModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>File and Smart Group Detail Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Detailed Build Results Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Batch Find Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Format Conflicts List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXCVSModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Source Code Control Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Breakpoints Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDockableInspector</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Inspector</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXOpenQuicklyModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Open Quickly Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Console</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCSnapshotModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Snapshots Tool</string>\n\t\t</dict>\n\t</array>\n\t<key>Description</key>\n\t<string>DefaultDescriptionKey</string>\n\t<key>DockingSystemVisible</key>\n\t<false/>\n\t<key>Extension</key>\n\t<string>mode1v3</string>\n\t<key>FavBarConfig</key>\n\t<dict>\n\t\t<key>PBXProjectModuleGUID</key>\n\t\t<string>94CD97670E87A9D300A81A01</string>\n\t\t<key>XCBarModuleItemNames</key>\n\t\t<dict/>\n\t\t<key>XCBarModuleItems</key>\n\t\t<array/>\n\t</dict>\n\t<key>FirstTimeWindowDisplayed</key>\n\t<false/>\n\t<key>Identifier</key>\n\t<string>com.apple.perspectives.project.mode1v3</string>\n\t<key>MajorVersion</key>\n\t<integer>33</integer>\n\t<key>MinorVersion</key>\n\t<integer>0</integer>\n\t<key>Name</key>\n\t<string>Default</string>\n\t<key>Notifications</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>XCObserverAutoDisconnectKey</key>\n\t\t\t<true/>\n\t\t\t<key>XCObserverDefintionKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusErrorsKey</key>\n\t\t\t\t<integer>0</integer>\n\t\t\t</dict>\n\t\t\t<key>XCObserverFactoryKey</key>\n\t\t\t<string>XCPerspectivesSpecificationIdentifier</string>\n\t\t\t<key>XCObserverGUIDKey</key>\n\t\t\t<string>XCObserverProjectIdentifier</string>\n\t\t\t<key>XCObserverNotificationKey</key>\n\t\t\t<string>PBXStatusBuildStateMessageNotification</string>\n\t\t\t<key>XCObserverTargetKey</key>\n\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t<key>XCObserverTriggerKey</key>\n\t\t\t<string>awakenModuleWithObserver:</string>\n\t\t\t<key>XCObserverValidationKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusErrorsKey</key>\n\t\t\t\t<integer>2</integer>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>XCObserverAutoDisconnectKey</key>\n\t\t\t<true/>\n\t\t\t<key>XCObserverDefintionKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusWarningsKey</key>\n\t\t\t\t<integer>0</integer>\n\t\t\t</dict>\n\t\t\t<key>XCObserverFactoryKey</key>\n\t\t\t<string>XCPerspectivesSpecificationIdentifier</string>\n\t\t\t<key>XCObserverGUIDKey</key>\n\t\t\t<string>XCObserverProjectIdentifier</string>\n\t\t\t<key>XCObserverNotificationKey</key>\n\t\t\t<string>PBXStatusBuildStateMessageNotification</string>\n\t\t\t<key>XCObserverTargetKey</key>\n\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t<key>XCObserverTriggerKey</key>\n\t\t\t<string>awakenModuleWithObserver:</string>\n\t\t\t<key>XCObserverValidationKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusWarningsKey</key>\n\t\t\t\t<integer>2</integer>\n\t\t\t</dict>\n\t\t</dict>\n\t</array>\n\t<key>OpenEditors</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>Content</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t<string>944BAB8B0E942CD80008DAC7</string>\n\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t<string>squeakSUnitTester.m</string>\n\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>944BAB8C0E942CD80008DAC7</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>squeakSUnitTester.m</string>\n\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t<string>9494083D0E95F46800A2D848</string>\n\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>94659C230E955378008D8B0E</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t<string>1</string>\n\t\t\t\t</dict>\n\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t<true/>\n\t\t\t</dict>\n\t\t\t<key>Geometry</key>\n\t\t\t<dict>\n\t\t\t\t<key>Frame</key>\n\t\t\t\t<string>{{0, 20}, {997, 901}}</string>\n\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t<false/>\n\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t<string>662 86 997 942 0 0 1680 1028 </string>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Content</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t<string>944BAB2B0E941B9C0008DAC7</string>\n\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t<string>ObjectiveCPlugin.c</string>\n\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>944BAB2C0E941B9C0008DAC7</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>ObjectiveCPlugin.c</string>\n\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t<string>9494083E0E95F46800A2D848</string>\n\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>94659C240E955378008D8B0E</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t<string>1</string>\n\t\t\t\t</dict>\n\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t<true/>\n\t\t\t</dict>\n\t\t\t<key>Geometry</key>\n\t\t\t<dict>\n\t\t\t\t<key>Frame</key>\n\t\t\t\t<string>{{0, 20}, {1012, 918}}</string>\n\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t<false/>\n\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t<string>739 51 1012 959 0 0 1680 1028 </string>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Content</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t<string>943C82D00E87E32400A8C956</string>\n\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t<string>sqUnixObjC.m</string>\n\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>943C82D10E87E32400A8C956</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>sqUnixObjC.m</string>\n\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t<string>9494083F0E95F46800A2D848</string>\n\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>94659C250E955378008D8B0E</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t<string>1</string>\n\t\t\t\t</dict>\n\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t<true/>\n\t\t\t</dict>\n\t\t\t<key>Geometry</key>\n\t\t\t<dict>\n\t\t\t\t<key>Frame</key>\n\t\t\t\t<string>{{0, 20}, {1012, 918}}</string>\n\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t<false/>\n\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t<string>63 69 1012 959 0 0 1680 1028 </string>\n\t\t\t</dict>\n\t\t</dict>\n\t</array>\n\t<key>PerspectiveWidths</key>\n\t<array>\n\t\t<integer>-1</integer>\n\t\t<integer>-1</integer>\n\t</array>\n\t<key>Perspectives</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>ChosenToolbarItems</key>\n\t\t\t<array>\n\t\t\t\t<string>active-target-popup</string>\n\t\t\t\t<string>active-buildstyle-popup</string>\n\t\t\t\t<string>action</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>buildOrClean</string>\n\t\t\t\t<string>build-and-goOrGo</string>\n\t\t\t\t<string>com.apple.ide.PBXToolbarStopButton</string>\n\t\t\t\t<string>get-info</string>\n\t\t\t\t<string>toggle-editor</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>com.apple.pbx.toolbar.searchfield</string>\n\t\t\t</array>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProjectWithEditor</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.project</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<true/>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>291</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>66DF6BFE01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66B8BC570381F53800A8011A</string>\n\t\t\t\t\t\t\t\t<string>66DF6BFF01D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66DF6C3901D7DCEA00A80119</string>\n\t\t\t\t\t\t\t\t<string>66DF6C4501D7DEEE00A80119</string>\n\t\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>19</integer>\n\t\t\t\t\t\t\t\t\t<integer>18</integer>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {291, 894}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {308, 912}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>291</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>214 75 1190 953 0 0 1680 1028 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>308pt</string>\n\t\t\t\t</dict>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>CFNetworkErrors.h</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CE0B20406471E060097A5F4</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>CFNetworkErrors.h</string>\n\t\t\t\t\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t\t\t\t\t<string>9494083B0E95F46800A2D848</string>\n\t\t\t\t\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>94A6D4600ADEAFC4003E9CBE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9466187F0B8CD74300AA8AE3</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94CD975D0E87A9D300A81A01</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94CD975E0E87A9D300A81A01</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94CD97C60E87AF8E00A81A01</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94CD993D0E87B2D700A81A01</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>943C82CA0E87E32400A8C956</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>943C836E0E8828FE00A8C956</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>943C84110E89158B00A8C956</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94A698220E89A647005A25C0</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94A698240E89A647005A25C0</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D209B80E8AB02E0083E28B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D20B110E8BCDB40083E28B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E6590A0E9043640088C3B5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E6590C0E9043640088C3B5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E659C70E9092870088C3B5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94659C130E9545F2008D8B0E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94659C140E9545F2008D8B0E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9494081F0E95F19600A2D848</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>949408200E95F19600A2D848</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>949408210E95F19600A2D848</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t\t<key>prevStack</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>949CD5C6085CC32700EB8605</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94ECA4AA097E137A00C2C7BA</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94ECA522097E18C600C2C7BA</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94ECA688097ECFBF00C2C7BA</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94CD97620E87A9D300A81A01</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94CD993F0E87B2D700A81A01</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>943C82CE0E87E32400A8C956</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>943C82EE0E8803BA00A8C956</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>943C830C0E88267200A8C956</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>943C836F0E8828FE00A8C956</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D20AE50E8BC5CF0083E28B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D20AE60E8BC5CF0083E28B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D20B2F0E8BDD5B0083E28B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E659110E9043640088C3B5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E659130E9043640088C3B5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>949408230E95F19600A2D848</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>949408240E95F19600A2D848</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {877, 849}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>214 75 1190 953 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>849pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 854}, {877, 58}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>214 75 1190 953 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>58pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>877pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>949408260E95F19600A2D848</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>949408270E95F19600A2D848</string>\n\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.defaultV3</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProject</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.morph</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>29B97314FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 337}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 355}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>373 269 690 397 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Morph</string>\n\t\t\t<key>PreferredWidth</key>\n\t\t\t<integer>300</integer>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default.shortV3</string>\n\t\t</dict>\n\t</array>\n\t<key>PerspectivesBarVisible</key>\n\t<false/>\n\t<key>ShelfIsVisible</key>\n\t<false/>\n\t<key>StatusbarIsVisible</key>\n\t<true/>\n\t<key>TimeStamp</key>\n\t<real>244708456.54791301</real>\n\t<key>ToolbarDisplayMode</key>\n\t<integer>1</integer>\n\t<key>ToolbarIsVisible</key>\n\t<true/>\n\t<key>ToolbarSizeMode</key>\n\t<integer>2</integer>\n\t<key>Type</key>\n\t<string>Perspectives</string>\n\t<key>UpdateMessage</key>\n\t<string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the \"Metro-Morph\" feature).  You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature.  Do you wish to update to the latest Workspace defaults for project '%@'?</string>\n\t<key>WindowJustification</key>\n\t<integer>5</integer>\n\t<key>WindowOrderList</key>\n\t<array>\n\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t<string>943C82D00E87E32400A8C956</string>\n\t\t<string>944BAB2B0E941B9C0008DAC7</string>\n\t\t<string>944BAB8B0E942CD80008DAC7</string>\n\t\t<string>94CD97520E87A82A00A81A01</string>\n\t\t<string>/Users/johnmci/Documents/SqueakObjectiveCPlugin/SqueakObjectiveC.xcodeproj</string>\n\t</array>\n\t<key>WindowString</key>\n\t<string>214 75 1190 953 0 0 1680 1028 </string>\n\t<key>WindowToolsV3</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.build</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>ObjectiveCPlugin.c</string>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {952, 541}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>568 71 952 957 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>541pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXBuildLogShowsTranscriptDefaultKey</key>\n\t\t\t\t\t\t\t\t<string>{{0, 252}, {952, 118}}</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Build</string>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Collapse</key>\n\t\t\t\t\t\t\t\t<integer>1021</integer>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Open</key>\n\t\t\t\t\t\t\t\t<integer>1013</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 546}, {952, 370}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>568 71 952 957 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>370pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>916pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Build Results</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>94CD97520E87A82A00A81A01</string>\n\t\t\t\t<string>949407F50E95F0B000A2D848</string>\n\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.buildV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>568 71 952 957 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>94CD97520E87A82A00A81A01</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugger</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Debugger</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {786, 373}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{786, 0}, {356, 373}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {1142, 373}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 373}, {1142, 331}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debug - GLUTExamples (Underwater)</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>DebugConsoleVisible</key>\n\t\t\t\t\t\t\t\t<string>None</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>DebugSTDIOWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1142, 704}}</string>\n\t\t\t\t\t\t\t\t<key>PBXDebugSessionStackFrameViewKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>DebugVariablesTableConfiguration</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>Name</string>\n\t\t\t\t\t\t\t\t\t\t<real>120</real>\n\t\t\t\t\t\t\t\t\t\t<string>Value</string>\n\t\t\t\t\t\t\t\t\t\t<real>85</real>\n\t\t\t\t\t\t\t\t\t\t<string>Summary</string>\n\t\t\t\t\t\t\t\t\t\t<real>126</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t<string>{{786, 0}, {356, 373}}</string>\n\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t<string>517 103 1142 745 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>517 103 1142 745 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>704pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>704pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t\t<string>949407F60E95F0B000A2D848</string>\n\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t<string>949407F70E95F0B000A2D848</string>\n\t\t\t\t<string>949407F80E95F0B000A2D848</string>\n\t\t\t\t<string>949407F90E95F0B000A2D848</string>\n\t\t\t\t<string>949407FA0E95F0B000A2D848</string>\n\t\t\t\t<string>949407FB0E95F0B000A2D848</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>517 103 1142 745 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.find</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>ObjectiveCPlugin.c</string>\n\t\t\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {791, 416}}</string>\n\t\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t\t<string>990 57 791 674 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t\t\t<string>791pt</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>416pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Project Find</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 421}, {791, 212}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>990 57 791 674 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>212pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>633pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Find</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t\t<string>944BAB360E941B9C0008DAC7</string>\n\t\t\t\t<string>944BAB370E941B9C0008DAC7</string>\n\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>990 57 791 674 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>MENUSEPARATOR</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debuggerConsole</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debugger Console</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {696, 544}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>840 77 696 585 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>544pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>544pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger Console</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t\t<string>944BAB590E9425D90008DAC7</string>\n\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.consoleV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>840 77 696 585 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.snapshots</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCSnapshotModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Snapshots</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCSnapshotModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<string>Yes</string>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.snapshots</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>315 824 300 550 0 0 1440 878 </string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<string>Yes</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.scm</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1C78EAB3065D492600B07095</string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>0pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>SCM</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ConsoleFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 259}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 7}, {452, 259}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t\t<key>TableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>Status</string>\n\t\t\t\t\t\t\t\t\t<real>30</real>\n\t\t\t\t\t\t\t\t\t<string>FileName</string>\n\t\t\t\t\t\t\t\t\t<real>199</real>\n\t\t\t\t\t\t\t\t\t<string>Path</string>\n\t\t\t\t\t\t\t\t\t<real>197.09500122070312</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>TableFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 250}}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>262pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>266pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>SCM</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAB4065D492600B07095</string>\n\t\t\t\t<string>1C78EAB5065D492600B07095</string>\n\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.scm</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.breakpoints</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t\t\t<string>no</string>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t\t\t<string>1C3E0DCA080725EA00A55177</string>\n\t\t\t\t\t\t\t\t\t\t<string>1C3E0DCA080725EA00A55177</string>\n\t\t\t\t\t\t\t\t\t\t<string>1C3E0DCC080725EA11A45113</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {168, 350}}</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t\t\t<false/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {185, 368}}</string>\n\t\t\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>424 558 744 409 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>185pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{190, 0}, {554, 368}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>424 558 744 409 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>554pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>368pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>MajorVersion</key>\n\t\t\t<integer>3</integer>\n\t\t\t<key>MinorVersion</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Name</key>\n\t\t\t<string>Breakpoints</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>94E659030E90432E0088C3B5</string>\n\t\t\t\t<string>94E659040E90432E0088C3B5</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.breakpointsV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>424 558 744 409 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>94E659030E90432E0088C3B5</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugAnimator</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Visualizer</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugAnimatorV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>100 100 700 500 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.bookmarks</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<false/>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>538 42 401 187 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.projectFormatConflicts</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Format Conflicts</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<false/>\n\t\t\t<key>WindowContentMinSize</key>\n\t\t\t<string>450 300</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>50 850 472 307 0 0 1440 877</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.classBrowser</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>OptionsSetName</key>\n\t\t\t\t\t\t\t\t<string>Hierarchy, all classes</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Class Browser - NSObject</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ClassesFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {378, 96}}</string>\n\t\t\t\t\t\t\t\t<key>ClassesTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXClassNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>208</real>\n\t\t\t\t\t\t\t\t\t<string>PBXClassBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {630, 332}}</string>\n\t\t\t\t\t\t\t\t<key>MembersFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 101}, {378, 231}}</string>\n\t\t\t\t\t\t\t\t<key>MembersTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeIconColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>216</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>101</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>312 384 630 352 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>332pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>332pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<false/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t\t<string>1C0AD2B0069F1E9B00FABCE6</string>\n\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.classbrowser</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>312 384 630 352 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.refactoring</string>\n\t\t\t<key>IncludeInToolsMenu</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{0, 0}, {500, 335}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{0, 0}, {500, 335}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCRefactoringModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Refactoring</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCRefactoringModule</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>200 200 500 356 0 0 1920 1200 </string>\n\t\t</dict>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/UnixOSProcessPlugin/UnixOSProcessPluginOLD.xcodeproj/johnmci.pbxuser",
    "content": "// !$*UTF8*$!\n{\n\t66B8BC580381F61C00A8011A /* sqConfig.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {903, 509}}\";\n\t\t\tsepNavSelRange = \"{111, 22}\";\n\t\t\tsepNavVisRange = \"{0, 345}\";\n\t\t};\n\t};\n\t66B8BC5A0381F63A00A8011A /* sqPlatformSpecific.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1056, 1820}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1796}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {609, 594}}\";\n\t\t};\n\t};\n\t66B8BC5C0381F66500A8011A /* sq.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {740, 6117}}\";\n\t\t\tsepNavSelRange = \"{16850, 24}\";\n\t\t\tsepNavVisRect = \"{{0, 5935}, {740, 73}}\";\n\t\t};\n\t};\n\t66B8BC5E0381F69100A8011A /* sqVirtualMachine.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {731, 2954}}\";\n\t\t\tsepNavSelRange = \"{2891, 0}\";\n\t\t\tsepNavVisRange = \"{1476, 2084}\";\n\t\t\tsepNavVisRect = \"{{0, 1587}, {711, 429}}\";\n\t\t\tsepNavWindowFrame = \"{{84, 252}, {750, 558}}\";\n\t\t};\n\t};\n\t66C6C8E501DB1EC300A80109 /* SqueakPlugin.icns */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavWindowFrame = \"{{15, 153}, {1364, 720}}\";\n\t\t};\n\t};\n\t66DF6BFD01D7DCEA00A80119 /* Project object */ = {\n\t\tactiveBuildConfigurationName = Deployment;\n\t\tactiveExecutable = 94ABA91E0858D35E00079BE1 /* Squeak */;\n\t\tactiveTarget = 94AF34E00846F91100FA5ACB /* ObjectiveCPlugin */;\n\t\taddToTargets = (\n\t\t\t94AF34E00846F91100FA5ACB /* ObjectiveCPlugin */,\n\t\t);\n\t\tbreakpoints = (\n\t\t\t94A8BB7D0E91EB65007DDB7F /* ObjectiveCPlugin.c:1104 */,\n\t\t\t944BAB3F0E9421B10008DAC7 /* ObjectiveCPlugin.c:357 */,\n\t\t\t944BAB5D0E9426DB0008DAC7 /* ObjectiveCPlugin.c:360 */,\n\t\t\t944BAB670E94277D0008DAC7 /* ObjectiveCPlugin.c:1220 */,\n\t\t);\n\t\tcodeSenseManager = 9444E60E06E7B8740063F6CC /* Code sense */;\n\t\texecutables = (\n\t\t\t94ABA91E0858D35E00079BE1 /* Squeak */,\n\t\t);\n\t\texpressions = (\n\t\t\tbuffer,\n\t\t);\n\t\tperUserDictionary = {\n\t\t\t\"PBXConfiguration.PBXBreakpointsDataSource.v1:1CA1AED706398EBD00589147\" = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXBreakpointsDataSource_BreakpointID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t20,\n\t\t\t\t\t198,\n\t\t\t\t\t20,\n\t\t\t\t\t99,\n\t\t\t\t\t99,\n\t\t\t\t\t29,\n\t\t\t\t\t20,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXBreakpointsDataSource_ActionID,\n\t\t\t\t\tPBXBreakpointsDataSource_TypeID,\n\t\t\t\t\tPBXBreakpointsDataSource_BreakpointID,\n\t\t\t\t\tPBXBreakpointsDataSource_UseID,\n\t\t\t\t\tPBXBreakpointsDataSource_LocationID,\n\t\t\t\t\tPBXBreakpointsDataSource_ConditionID,\n\t\t\t\t\tPBXBreakpointsDataSource_IgnoreCountID,\n\t\t\t\t\tPBXBreakpointsDataSource_ContinueID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXErrorsWarningsDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXErrorsWarningsDataSource_LocationID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t300,\n\t\t\t\t\t200,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXErrorsWarningsDataSource_TypeID,\n\t\t\t\t\tPBXErrorsWarningsDataSource_MessageID,\n\t\t\t\t\tPBXErrorsWarningsDataSource_LocationID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXExecutablesDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXExecutablesDataSource_NameID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t22,\n\t\t\t\t\t300,\n\t\t\t\t\t429,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXExecutablesDataSource_ActiveFlagID,\n\t\t\t\t\tPBXExecutablesDataSource_NameID,\n\t\t\t\t\tPBXExecutablesDataSource_CommentsID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t638,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t\t20,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Target_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXFindDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFindDataSource_LocationID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t200,\n\t\t\t\t\t425.2085,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFindDataSource_MessageID,\n\t\t\t\t\tPBXFindDataSource_LocationID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t598,\n\t\t\t\t\t60,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXTargetDataSource_PrimaryAttribute,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXPerProjectTemplateStateSaveDate = 244707468;\n\t\t\tPBXPrepackagedSmartGroups_v2 = (\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tactivationKey = OldTargetSmartGroup;\n\t\t\t\t\tclz = PBXTargetSmartGroup;\n\t\t\t\t\tdescription = \"Displays all targets of the project.\";\n\t\t\t\t\tglobalID = 1C37FABC04509CD000000102;\n\t\t\t\t\tname = Targets;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = Targets;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXTargetSmartGroup2;\n\t\t\t\t\tdescription = \"Displays all targets of the project as well as nested build phases.\";\n\t\t\t\t\tglobalID = 1C37FBAC04509CD000000102;\n\t\t\t\t\tname = Targets;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = Targets;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXExecutablesSmartGroup;\n\t\t\t\t\tdescription = \"Displays all executables of the project.\";\n\t\t\t\t\tglobalID = 1C37FAAC04509CD000000102;\n\t\t\t\t\tname = Executables;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = Executable;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\" PBXTransientLocationAtTop \" = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXErrorsWarningsSmartGroup;\n\t\t\t\t\tdescription = \"Displays files with errors or warnings.\";\n\t\t\t\t\tglobalID = 1C08E77C0454961000C914BD;\n\t\t\t\t\tname = \"Errors and Warnings\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\tfnmatch = \"\";\n\t\t\t\t\t\timage = WarningsErrors;\n\t\t\t\t\t\trecursive = 1;\n\t\t\t\t\t\tregex = \"\";\n\t\t\t\t\t\troot = \"<PROJECT>\";\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXFilenameSmartGroup;\n\t\t\t\t\tdescription = \"Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter.\";\n\t\t\t\t\tglobalID = 1CC0EA4004350EF90044410B;\n\t\t\t\t\tname = \"Implementation Files\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\tcanSave = 1;\n\t\t\t\t\t\tfnmatch = \"\";\n\t\t\t\t\t\timage = SmartFolder;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t\trecursive = 1;\n\t\t\t\t\t\tregex = \"?*\\\\.[mcMC]\";\n\t\t\t\t\t\troot = \"<PROJECT>\";\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXFilenameSmartGroup;\n\t\t\t\t\tdescription = \"This group displays Interface Builder NIB Files.\";\n\t\t\t\t\tglobalID = 1CC0EA4004350EF90041110B;\n\t\t\t\t\tname = \"NIB Files\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\tcanSave = 1;\n\t\t\t\t\t\tfnmatch = \"*.nib\";\n\t\t\t\t\t\timage = SmartFolder;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t\trecursive = 1;\n\t\t\t\t\t\tregex = \"\";\n\t\t\t\t\t\troot = \"<PROJECT>\";\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = no;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXFindSmartGroup;\n\t\t\t\t\tdescription = \"Displays Find Results.\";\n\t\t\t\t\tglobalID = 1C37FABC05509CD000000102;\n\t\t\t\t\tname = \"Find Results\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = spyglass;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = no;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXBookmarksSmartGroup;\n\t\t\t\t\tdescription = \"Displays Project Bookmarks.\";\n\t\t\t\t\tglobalID = 1C37FABC05539CD112110102;\n\t\t\t\t\tname = Bookmarks;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = Bookmarks;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = XCSCMSmartGroup;\n\t\t\t\t\tdescription = \"Displays files with interesting SCM status.\";\n\t\t\t\t\tglobalID = E2644B35053B69B200211256;\n\t\t\t\t\tname = SCM;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = PBXRepository;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXSymbolsSmartGroup;\n\t\t\t\t\tdescription = \"Displays all symbols for the project.\";\n\t\t\t\t\tglobalID = 1C37FABC04509CD000100104;\n\t\t\t\t\tname = \"Project Symbols\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = ProjectSymbols;\n\t\t\t\t\t\tisLeaf = 1;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXFilenameSmartGroup;\n\t\t\t\t\tdescription = \"Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter.\";\n\t\t\t\t\tglobalID = PBXTemplateMarker;\n\t\t\t\t\tname = \"Simple Filter SmartGroup\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\tcanSave = 1;\n\t\t\t\t\t\tfnmatch = \"*.nib\";\n\t\t\t\t\t\timage = SmartFolder;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t\trecursive = 1;\n\t\t\t\t\t\tregex = \"\";\n\t\t\t\t\t\troot = \"<PROJECT>\";\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tabsolutePathToBundle = \"\";\n\t\t\t\t\tclz = PBXFilenameSmartGroup;\n\t\t\t\t\tdescription = \"Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter.\";\n\t\t\t\t\tglobalID = PBXTemplateMarker;\n\t\t\t\t\tname = \"Simple Regular Expression SmartGroup\";\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\tcanSave = 1;\n\t\t\t\t\t\tfnmatch = \"\";\n\t\t\t\t\t\timage = SmartFolder;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t\trecursive = 1;\n\t\t\t\t\t\tregex = \"?*\\\\.[mcMC]\";\n\t\t\t\t\t\troot = \"<PROJECT>\";\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tPBXTransientLocationAtTop = bottom;\n\t\t\t\t\tclz = XDDesignSmartGroup;\n\t\t\t\t\tdescription = \"Displays Xdesign models\";\n\t\t\t\t\tglobalID = 2E4A936305E6979E00701470;\n\t\t\t\t\tname = Design;\n\t\t\t\t\tpreferences = {\n\t\t\t\t\t\timage = Design;\n\t\t\t\t\t\tisLeaf = 0;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t);\n\t\t\tPBXWorkspaceContents = (\n\t\t\t\t{\n\t\t\t\t\tPBXProjectWorkspaceModule_StateKey_Rev39 = {\n\t\t\t\t\t\tPBXProjectWorkspaceModule_DataSourceSelectionKey_Rev6 = {\n\t\t\t\t\t\t\tBoundsStr = \"{{0, 0}, {469, 441}}\";\n\t\t\t\t\t\t\tRows = (\n\t\t\t\t\t\t\t\t9,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tVisibleRectStr = \"{{0, 0}, {469, 441}}\";\n\t\t\t\t\t\t};\n\t\t\t\t\t\tPBXProjectWorkspaceModule_EditorOpen = false;\n\t\t\t\t\t\tPBXProjectWorkspaceModule_EmbeddedNavigatorGroup = {\n\t\t\t\t\t\t\tPBXSplitModuleInNavigatorKey = {\n\t\t\t\t\t\t\t\tSplitCount = 1;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t};\n\t\t\t\t\t\tPBXProjectWorkspaceModule_GeometryKey_Rev15 = {\n\t\t\t\t\t\t\tPBXProjectWorkspaceModule_SGTM_Geometry = {\n\t\t\t\t\t\t\t\t_collapsingFrameDimension = 0;\n\t\t\t\t\t\t\t\t_indexOfCollapsedView = 0;\n\t\t\t\t\t\t\t\t_percentageOfCollapsedView = 0;\n\t\t\t\t\t\t\t\tsizes = (\n\t\t\t\t\t\t\t\t\t\"{{0, 0}, {182, 458}}\",\n\t\t\t\t\t\t\t\t\t\"{{182, 0}, {484, 458}}\",\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t};\n\t\t\t\t\t\tPBXProjectWorkspaceModule_OldDetailFrame = \"{{0, 0}, {484, 458}}\";\n\t\t\t\t\t\tPBXProjectWorkspaceModule_OldEditorFrame = \"{{0, 0}, {750, 480}}\";\n\t\t\t\t\t\tPBXProjectWorkspaceModule_OldSuperviewFrame = \"{{182, 0}, {484, 458}}\";\n\t\t\t\t\t\tPBXProjectWorkspaceModule_SGTM = {\n\t\t\t\t\t\t\tPBXBottomSmartGroupGIDs = (\n\t\t\t\t\t\t\t\t1C37FBAC04509CD000000102,\n\t\t\t\t\t\t\t\t1C37FAAC04509CD000000102,\n\t\t\t\t\t\t\t\t1C08E77C0454961000C914BD,\n\t\t\t\t\t\t\t\t1CC0EA4004350EF90044410B,\n\t\t\t\t\t\t\t\t1CC0EA4004350EF90041110B,\n\t\t\t\t\t\t\t\t1C37FABC05509CD000000102,\n\t\t\t\t\t\t\t\t1C37FABC05539CD112110102,\n\t\t\t\t\t\t\t\tE2644B35053B69B200211256,\n\t\t\t\t\t\t\t\t1C37FABC04509CD000100104,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnData = {\n\t\t\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnWidthsKey = (\n\t\t\t\t\t\t\t\t\t165,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnsKey_v4 = (\n\t\t\t\t\t\t\t\t\tMainColumn,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateKey_v7 = {\n\t\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateExpansionKey = (\n\t\t\t\t\t\t\t\t\t66DF6BFE01D7DCEA00A80119,\n\t\t\t\t\t\t\t\t\t66B8BC570381F53800A8011A,\n\t\t\t\t\t\t\t\t\t66DF6BFF01D7DCEA00A80119,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateSelectionKey = (\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateVisibleRectKey = \"{{0, 0}, {165, 440}}\";\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tPBXTopSmartGroupGIDs = (\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t);\n\t\t\t\"PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXBuildResultsModule\" = {\n\t\t\t};\n\t\t\t\"PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXDebugCLIModule\" = {\n\t\t\t};\n\t\t\t\"PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXNavigatorGroup\" = {\n\t\t\t\tPBXSplitModuleInNavigatorKey = {\n\t\t\t\t\tSplitCount = 1;\n\t\t\t\t};\n\t\t\t};\n\t\t\t\"PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXProjectWorkspaceModule\" = {\n\t\t\t\tPBXProjectWorkspaceModule_StateKey_Rev39 = {\n\t\t\t\t\tPBXProjectWorkspaceModule_DataSourceSelectionKey_Rev6 = {\n\t\t\t\t\t\tBoundsStr = \"{{0, 0}, {469, 441}}\";\n\t\t\t\t\t\tRows = (\n\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tVisibleRectStr = \"{{0, 0}, {469, 441}}\";\n\t\t\t\t\t};\n\t\t\t\t\tPBXProjectWorkspaceModule_EditorOpen = false;\n\t\t\t\t\tPBXProjectWorkspaceModule_EmbeddedNavigatorGroup = {\n\t\t\t\t\t\tPBXSplitModuleInNavigatorKey = {\n\t\t\t\t\t\t\tSplitCount = 1;\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t\tPBXProjectWorkspaceModule_GeometryKey_Rev15 = {\n\t\t\t\t\t\tPBXProjectWorkspaceModule_SGTM_Geometry = {\n\t\t\t\t\t\t\t_collapsingFrameDimension = 0;\n\t\t\t\t\t\t\t_indexOfCollapsedView = 0;\n\t\t\t\t\t\t\t_percentageOfCollapsedView = 0;\n\t\t\t\t\t\t\tsizes = (\n\t\t\t\t\t\t\t\t\"{{0, 0}, {182, 458}}\",\n\t\t\t\t\t\t\t\t\"{{182, 0}, {484, 458}}\",\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t\tPBXProjectWorkspaceModule_OldDetailFrame = \"{{0, 0}, {484, 458}}\";\n\t\t\t\t\tPBXProjectWorkspaceModule_OldEditorFrame = \"{{0, 0}, {750, 480}}\";\n\t\t\t\t\tPBXProjectWorkspaceModule_OldSuperviewFrame = \"{{182, 0}, {484, 458}}\";\n\t\t\t\t\tPBXProjectWorkspaceModule_SGTM = {\n\t\t\t\t\t\tPBXBottomSmartGroupGIDs = (\n\t\t\t\t\t\t\t1C37FBAC04509CD000000102,\n\t\t\t\t\t\t\t1C37FAAC04509CD000000102,\n\t\t\t\t\t\t\t1C08E77C0454961000C914BD,\n\t\t\t\t\t\t\t1CC0EA4004350EF90044410B,\n\t\t\t\t\t\t\t1CC0EA4004350EF90041110B,\n\t\t\t\t\t\t\t1C37FABC05509CD000000102,\n\t\t\t\t\t\t\t1C37FABC05539CD112110102,\n\t\t\t\t\t\t\tE2644B35053B69B200211256,\n\t\t\t\t\t\t\t1C37FABC04509CD000100104,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnData = {\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnWidthsKey = (\n\t\t\t\t\t\t\t\t165,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleColumnsKey_v4 = (\n\t\t\t\t\t\t\t\tMainColumn,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t};\n\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateKey_v7 = {\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateExpansionKey = (\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateSelectionKey = (\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tPBXSmartGroupTreeModuleOutlineStateVisibleRectKey = \"{{0, 0}, {165, 440}}\";\n\t\t\t\t\t\t};\n\t\t\t\t\t\tPBXTopSmartGroupGIDs = (\n\t\t\t\t\t\t);\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tPBXWorkspaceGeometries = (\n\t\t\t\t{\n\t\t\t\t\tFrame = \"{{0, 0}, {666, 458}}\";\n\t\t\t\t\tPBXProjectWorkspaceModule_GeometryKey_Rev15 = {\n\t\t\t\t\t};\n\t\t\t\t\tRubberWindowFrame = \"212 190 666 500 0 0 1024 746 \";\n\t\t\t\t},\n\t\t\t);\n\t\t\t\"PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXBuildResultsModule\" = {\n\t\t\t\tFrame = \"{{0, 0}, {480, 217}}\";\n\t\t\t\tPBXModuleWindowStatusBarHidden = YES;\n\t\t\t\tRubberWindowFrame = \"272 407 480 238 0 0 1024 746 \";\n\t\t\t};\n\t\t\t\"PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXDebugCLIModule\" = {\n\t\t\t\tFrame = \"{{0, 0}, {400, 201}}\";\n\t\t\t\tPBXModuleWindowStatusBarHidden = YES;\n\t\t\t\tRubberWindowFrame = \"50 718 400 222 0 0 1024 746 \";\n\t\t\t};\n\t\t\t\"PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXNavigatorGroup\" = {\n\t\t\t\tFrame = \"{{0, 0}, {750, 481}}\";\n\t\t\t\tPBXModuleWindowStatusBarHidden = YES;\n\t\t\t\tRubberWindowFrame = \"61 197 750 502 0 0 1024 746 \";\n\t\t\t};\n\t\t\t\"PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXProjectWorkspaceModule\" = {\n\t\t\t\tFrame = \"{{0, 0}, {666, 458}}\";\n\t\t\t\tPBXProjectWorkspaceModule_GeometryKey_Rev15 = {\n\t\t\t\t};\n\t\t\t\tRubberWindowFrame = \"212 190 666 500 0 0 1024 746 \";\n\t\t\t};\n\t\t\tPBXWorkspaceStateSaveDate = 244707468;\n\t\t};\n\t\tperUserProjectItems = {\n\t\t\t943C82CA0E87E32400A8C956 /* PBXTextBookmark */ = 943C82CA0E87E32400A8C956 /* PBXTextBookmark */;\n\t\t\t943C82CE0E87E32400A8C956 /* PBXTextBookmark */ = 943C82CE0E87E32400A8C956 /* PBXTextBookmark */;\n\t\t\t943C82EE0E8803BA00A8C956 /* PBXTextBookmark */ = 943C82EE0E8803BA00A8C956 /* PBXTextBookmark */;\n\t\t\t943C830C0E88267200A8C956 /* PBXTextBookmark */ = 943C830C0E88267200A8C956 /* PBXTextBookmark */;\n\t\t\t943C836E0E8828FE00A8C956 /* PBXTextBookmark */ = 943C836E0E8828FE00A8C956 /* PBXTextBookmark */;\n\t\t\t943C836F0E8828FE00A8C956 /* PBXTextBookmark */ = 943C836F0E8828FE00A8C956 /* PBXTextBookmark */;\n\t\t\t943C84110E89158B00A8C956 /* PBXTextBookmark */ = 943C84110E89158B00A8C956 /* PBXTextBookmark */;\n\t\t\t94659C130E9545F2008D8B0E /* PBXTextBookmark */ = 94659C130E9545F2008D8B0E /* PBXTextBookmark */;\n\t\t\t94659C140E9545F2008D8B0E /* PBXTextBookmark */ = 94659C140E9545F2008D8B0E /* PBXTextBookmark */;\n\t\t\t94659C230E955378008D8B0E /* PBXTextBookmark */ = 94659C230E955378008D8B0E /* PBXTextBookmark */;\n\t\t\t94659C240E955378008D8B0E /* PBXTextBookmark */ = 94659C240E955378008D8B0E /* PBXTextBookmark */;\n\t\t\t94659C250E955378008D8B0E /* PBXTextBookmark */ = 94659C250E955378008D8B0E /* PBXTextBookmark */;\n\t\t\t9466187F0B8CD74300AA8AE3 /* PBXTextBookmark */ = 9466187F0B8CD74300AA8AE3 /* PBXTextBookmark */;\n\t\t\t9494081F0E95F19600A2D848 /* PBXTextBookmark */ = 9494081F0E95F19600A2D848 /* PBXTextBookmark */;\n\t\t\t949408200E95F19600A2D848 /* PlistBookmark */ = 949408200E95F19600A2D848 /* PlistBookmark */;\n\t\t\t949408210E95F19600A2D848 /* PBXTextBookmark */ = 949408210E95F19600A2D848 /* PBXTextBookmark */;\n\t\t\t949408230E95F19600A2D848 /* PBXTextBookmark */ = 949408230E95F19600A2D848 /* PBXTextBookmark */;\n\t\t\t949408240E95F19600A2D848 /* PlistBookmark */ = 949408240E95F19600A2D848 /* PlistBookmark */;\n\t\t\t9494083B0E95F46800A2D848 /* PBXTextBookmark */ = 9494083B0E95F46800A2D848 /* PBXTextBookmark */;\n\t\t\t9494083D0E95F46800A2D848 /* PBXTextBookmark */ = 9494083D0E95F46800A2D848 /* PBXTextBookmark */;\n\t\t\t9494083E0E95F46800A2D848 /* PBXTextBookmark */ = 9494083E0E95F46800A2D848 /* PBXTextBookmark */;\n\t\t\t9494083F0E95F46800A2D848 /* PBXTextBookmark */ = 9494083F0E95F46800A2D848 /* PBXTextBookmark */;\n\t\t\t949CD5C6085CC32700EB8605 /* PBXBookmark */ = 949CD5C6085CC32700EB8605 /* PBXBookmark */;\n\t\t\t94A698220E89A647005A25C0 /* PBXTextBookmark */ = 94A698220E89A647005A25C0 /* PBXTextBookmark */;\n\t\t\t94A698240E89A647005A25C0 /* PBXTextBookmark */ = 94A698240E89A647005A25C0 /* PBXTextBookmark */;\n\t\t\t94A6D4600ADEAFC4003E9CBE /* PBXTextBookmark */ = 94A6D4600ADEAFC4003E9CBE /* PBXTextBookmark */;\n\t\t\t94CD975D0E87A9D300A81A01 /* PBXBookmark */ = 94CD975D0E87A9D300A81A01 /* PBXBookmark */;\n\t\t\t94CD975E0E87A9D300A81A01 /* PBXTextBookmark */ = 94CD975E0E87A9D300A81A01 /* PBXTextBookmark */;\n\t\t\t94CD97620E87A9D300A81A01 /* PBXTextBookmark */ = 94CD97620E87A9D300A81A01 /* PBXTextBookmark */;\n\t\t\t94CD97C60E87AF8E00A81A01 /* PBXTextBookmark */ = 94CD97C60E87AF8E00A81A01 /* PBXTextBookmark */;\n\t\t\t94CD993D0E87B2D700A81A01 /* PBXTextBookmark */ = 94CD993D0E87B2D700A81A01 /* PBXTextBookmark */;\n\t\t\t94CD993F0E87B2D700A81A01 /* PBXTextBookmark */ = 94CD993F0E87B2D700A81A01 /* PBXTextBookmark */;\n\t\t\t94D209B80E8AB02E0083E28B /* PBXTextBookmark */ = 94D209B80E8AB02E0083E28B /* PBXTextBookmark */;\n\t\t\t94D20AE50E8BC5CF0083E28B /* PBXTextBookmark */ = 94D20AE50E8BC5CF0083E28B /* PBXTextBookmark */;\n\t\t\t94D20AE60E8BC5CF0083E28B /* PBXTextBookmark */ = 94D20AE60E8BC5CF0083E28B /* PBXTextBookmark */;\n\t\t\t94D20B110E8BCDB40083E28B /* PBXTextBookmark */ = 94D20B110E8BCDB40083E28B /* PBXTextBookmark */;\n\t\t\t94D20B2F0E8BDD5B0083E28B /* PBXTextBookmark */ = 94D20B2F0E8BDD5B0083E28B /* PBXTextBookmark */;\n\t\t\t94E6590A0E9043640088C3B5 /* PBXTextBookmark */ = 94E6590A0E9043640088C3B5 /* PBXTextBookmark */;\n\t\t\t94E6590C0E9043640088C3B5 /* PBXTextBookmark */ = 94E6590C0E9043640088C3B5 /* PBXTextBookmark */;\n\t\t\t94E659110E9043640088C3B5 /* PBXTextBookmark */ = 94E659110E9043640088C3B5 /* PBXTextBookmark */;\n\t\t\t94E659130E9043640088C3B5 /* PBXTextBookmark */ = 94E659130E9043640088C3B5 /* PBXTextBookmark */;\n\t\t\t94E659C70E9092870088C3B5 /* PBXTextBookmark */ = 94E659C70E9092870088C3B5 /* PBXTextBookmark */;\n\t\t\t94ECA4AA097E137A00C2C7BA /* PBXTextBookmark */ = 94ECA4AA097E137A00C2C7BA /* PBXTextBookmark */;\n\t\t\t94ECA522097E18C600C2C7BA /* PBXTextBookmark */ = 94ECA522097E18C600C2C7BA /* PBXTextBookmark */;\n\t\t\t94ECA688097ECFBF00C2C7BA /* PBXTextBookmark */ = 94ECA688097ECFBF00C2C7BA /* PBXTextBookmark */;\n\t\t};\n\t\tsourceControlManager = 9444E60D06E7B8740063F6CC /* Source Control */;\n\t\tuserBuildSettings = {\n\t\t};\n\t};\n\t9410FB8509AA6FBF002FD7B7 /* Sophie.app */ = {\n\t\tisa = PBXFileReference;\n\t\texplicitFileType = wrapper.application;\n\t\tname = Sophie.app;\n\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/Squeak 3.8.18beta4U.app\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t943C82B20E87CC1F00A8C956 /* NSNull.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSNull.h;\n\t\tpath = /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSNull.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t943C82CA0E87E32400A8C956 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 943C82CB0E87E32400A8C956 /* NSString.h */;\n\t\tname = \"NSString.h: 58\";\n\t\trLen = 71;\n\t\trLoc = 2261;\n\t\trType = 0;\n\t\tvrLen = 1873;\n\t\tvrLoc = 1388;\n\t};\n\t943C82CB0E87E32400A8C956 /* NSString.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSString.h;\n\t\tpath = /Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSString.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t943C82CE0E87E32400A8C956 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94CD99620E87CBE500A81A01 /* NSObject.h */;\n\t\tname = \"NSObject.h: 40\";\n\t\trLen = 11;\n\t\trLoc = 892;\n\t\trType = 0;\n\t\tvrLen = 932;\n\t\tvrLoc = 0;\n\t};\n\t943C82EE0E8803BA00A8C956 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 943C82B20E87CC1F00A8C956 /* NSNull.h */;\n\t\tname = \"NSNull.h: 9\";\n\t\trLen = 18;\n\t\trLoc = 160;\n\t\trType = 0;\n\t\tvrLen = 185;\n\t\tvrLoc = 0;\n\t};\n\t943C830C0E88267200A8C956 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 66B8BC5E0381F69100A8011A /* sqVirtualMachine.h */;\n\t\tname = \"sqVirtualMachine.h: 27\";\n\t\trLen = 5;\n\t\trLoc = 664;\n\t\trType = 0;\n\t\tvrLen = 1334;\n\t\tvrLoc = 0;\n\t};\n\t943C836E0E8828FE00A8C956 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94ABA8920858C40D00079BE1 /* sqMemoryAccess.h */;\n\t\tname = \"sqMemoryAccess.h: 53\";\n\t\trLen = 6;\n\t\trLoc = 1428;\n\t\trType = 0;\n\t\tvrLen = 1330;\n\t\tvrLoc = 1028;\n\t};\n\t943C836F0E8828FE00A8C956 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94ABA8920858C40D00079BE1 /* sqMemoryAccess.h */;\n\t\tname = \"sqMemoryAccess.h: 53\";\n\t\trLen = 6;\n\t\trLoc = 1428;\n\t\trType = 0;\n\t\tvrLen = 1330;\n\t\tvrLoc = 1028;\n\t};\n\t943C84110E89158B00A8C956 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94CD99620E87CBE500A81A01 /* NSObject.h */;\n\t\tname = \"NSObject.h: 25\";\n\t\trLen = 2;\n\t\trLoc = 524;\n\t\trType = 0;\n\t\tvrLen = 932;\n\t\tvrLoc = 0;\n\t};\n\t9444E60D06E7B8740063F6CC /* Source Control */ = {\n\t\tisa = PBXSourceControlManager;\n\t\tfallbackIsa = XCSourceControlManager;\n\t\tisSCMEnabled = 0;\n\t\tscmConfiguration = {\n\t\t};\n\t\tscmType = scm.cvs;\n\t};\n\t9444E60E06E7B8740063F6CC /* Code sense */ = {\n\t\tisa = PBXCodeSenseManager;\n\t\tindexTemplatePath = \"\";\n\t};\n\t944BAB3F0E9421B10008DAC7 /* ObjectiveCPlugin.c:357 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 94C687380E900903006CAD50 /* ObjectiveCPlugin.c */;\n\t\tfunctionName = \"primitiveMethodSignatureGetMethodReturnLength()\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 357;\n\t\tlocation = ObjectiveCPlugin;\n\t\tmodificationTime = 244590292.240876;\n\t\tstate = 1;\n\t};\n\t944BAB5D0E9426DB0008DAC7 /* ObjectiveCPlugin.c:360 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 94CD97380E87A7CC00A81A01 /* ObjectiveCPlugin.c */;\n\t\tfunctionName = \"primitiveMethodSignatureGetMethodReturnLength()\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 360;\n\t\tlocation = ObjectiveCPlugin;\n\t\tmodificationTime = 244590299.513966;\n\t\tstate = 1;\n\t};\n\t944BAB670E94277D0008DAC7 /* ObjectiveCPlugin.c:1220 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 94CD97380E87A7CC00A81A01 /* ObjectiveCPlugin.c */;\n\t\tfunctionName = \"primitivePerformSelectorWith()\";\n\t\thitCount = 1;\n\t\tignoreCount = 0;\n\t\tlineNumber = 1220;\n\t\tlocation = ObjectiveCPlugin;\n\t\tmodificationTime = 244590626.643746;\n\t\tstate = 1;\n\t};\n\t94659C130E9545F2008D8B0E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C687380E900903006CAD50 /* ObjectiveCPlugin.c */;\n\t\tname = \"ObjectiveCPlugin.c: 121\";\n\t\trLen = 2;\n\t\trLoc = 4044;\n\t\trType = 0;\n\t\tvrLen = 1293;\n\t\tvrLoc = 3051;\n\t};\n\t94659C140E9545F2008D8B0E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D20A4A0E8BBF840083E28B /* squeakSUnitTester.m */;\n\t\tname = \"squeakSUnitTester.m: 348\";\n\t\trLen = 9;\n\t\trLoc = 10513;\n\t\trType = 0;\n\t\tvrLen = 2257;\n\t\tvrLoc = 10591;\n\t};\n\t94659C230E955378008D8B0E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D20A4A0E8BBF840083E28B /* squeakSUnitTester.m */;\n\t\tname = \"squeakSUnitTester.m: 411\";\n\t\trLen = 0;\n\t\trLoc = 13143;\n\t\trType = 0;\n\t\tvrLen = 2432;\n\t\tvrLoc = 10868;\n\t};\n\t94659C240E955378008D8B0E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94CD97380E87A7CC00A81A01 /* ObjectiveCPlugin.c */;\n\t\tname = \"ObjectiveCPlugin.c: 1360\";\n\t\trLen = 0;\n\t\trLoc = 41293;\n\t\trType = 0;\n\t\tvrLen = 1860;\n\t\tvrLoc = 8821;\n\t};\n\t94659C250E955378008D8B0E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94659C260E955378008D8B0E /* sqUnixObjC.m */;\n\t\tname = \"sqUnixObjC.m: 254\";\n\t\trLen = 15;\n\t\trLoc = 7007;\n\t\trType = 0;\n\t\tvrLen = 3311;\n\t\tvrLoc = 6346;\n\t};\n\t94659C260E955378008D8B0E /* sqUnixObjC.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = sqUnixObjC.m;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/CocoaSqueak-3.0.4/src/Squeak/sqUnixObjC.m\";\n\t\tsourceTree = \"<absolute>\";\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {965, 7672}}\";\n\t\t\tsepNavSelRange = \"{7007, 15}\";\n\t\t\tsepNavVisRange = \"{6346, 3311}\";\n\t\t\tsepNavWindowFrame = \"{{63, 13}, {1012, 1015}}\";\n\t\t};\n\t};\n\t9466187F0B8CD74300AA8AE3 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94ECA4E7097E15F800C2C7BA /* PkgInfo */;\n\t\tname = \"PkgInfo: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 8;\n\t\tvrLoc = 0;\n\t};\n\t9494081F0E95F19600A2D848 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D20A490E8BBF840083E28B /* squeakSUnitTester.h */;\n\t\tname = \"squeakSUnitTester.h: 159\";\n\t\trLen = 0;\n\t\trLoc = 9528;\n\t\trType = 0;\n\t\tvrLen = 4749;\n\t\tvrLoc = 5180;\n\t};\n\t949408200E95F19600A2D848 /* PlistBookmark */ = {\n\t\tisa = PlistBookmark;\n\t\tfRef = 94AF34F10846F91100FA5ACB /* Info.plist */;\n\t\tfallbackIsa = PBXBookmark;\n\t\tisK = 0;\n\t\tkPath = (\n\t\t\tCFBundleVersion,\n\t\t);\n\t\tname = /Users/johnmci/Documents/SqueakObjectiveCPlugin/Info.plist;\n\t\trLen = 5;\n\t\trLoc = 0;\n\t};\n\t949408210E95F19600A2D848 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tcomments = \"error: parse error before \\\"__AVAILABILITY_INTERNAL__MAC_10_5\\\"\";\n\t\tfRef = 949408220E95F19600A2D848 /* CFNetworkErrors.h */;\n\t\trLen = 1;\n\t\trLoc = 52;\n\t\trType = 1;\n\t};\n\t949408220E95F19600A2D848 /* CFNetworkErrors.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = CFNetworkErrors.h;\n\t\tpath = /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetworkErrors.h;\n\t\tsourceTree = \"<absolute>\";\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {954, 3346}}\";\n\t\t\tsepNavSelRange = \"{1051, 124}\";\n\t\t\tsepNavVisRange = \"{0, 1298}\";\n\t\t};\n\t};\n\t949408230E95F19600A2D848 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D20A490E8BBF840083E28B /* squeakSUnitTester.h */;\n\t\tname = \"squeakSUnitTester.h: 159\";\n\t\trLen = 0;\n\t\trLoc = 9528;\n\t\trType = 0;\n\t\tvrLen = 4749;\n\t\tvrLoc = 5180;\n\t};\n\t949408240E95F19600A2D848 /* PlistBookmark */ = {\n\t\tisa = PlistBookmark;\n\t\tfRef = 94AF34F10846F91100FA5ACB /* Info.plist */;\n\t\tfallbackIsa = PBXBookmark;\n\t\tisK = 0;\n\t\tkPath = (\n\t\t\tCFBundleVersion,\n\t\t);\n\t\tname = /Users/johnmci/Documents/SqueakObjectiveCPlugin/Info.plist;\n\t\trLen = 5;\n\t\trLoc = 0;\n\t};\n\t9494083B0E95F46800A2D848 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9494083C0E95F46800A2D848 /* CFNetworkErrors.h */;\n\t\tname = \"CFNetworkErrors.h: 53\";\n\t\trLen = 124;\n\t\trLoc = 1051;\n\t\trType = 0;\n\t\tvrLen = 1298;\n\t\tvrLoc = 0;\n\t};\n\t9494083C0E95F46800A2D848 /* CFNetworkErrors.h */ = {\n\t\tisa = PBXFileReference;\n\t\tname = CFNetworkErrors.h;\n\t\tpath = /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetworkErrors.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9494083D0E95F46800A2D848 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D20A4A0E8BBF840083E28B /* squeakSUnitTester.m */;\n\t\tname = \"squeakSUnitTester.m: 411\";\n\t\trLen = 0;\n\t\trLoc = 13143;\n\t\trType = 0;\n\t\tvrLen = 2432;\n\t\tvrLoc = 10868;\n\t};\n\t9494083E0E95F46800A2D848 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94CD97380E87A7CC00A81A01 /* ObjectiveCPlugin.c */;\n\t\tname = \"ObjectiveCPlugin.c: 1360\";\n\t\trLen = 0;\n\t\trLoc = 41293;\n\t\trType = 0;\n\t\tvrLen = 1611;\n\t\tvrLoc = 8821;\n\t};\n\t9494083F0E95F46800A2D848 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 949408400E95F46800A2D848 /* sqUnixObjC.m */;\n\t\tname = \"sqUnixObjC.m: 254\";\n\t\trLen = 15;\n\t\trLoc = 7007;\n\t\trType = 0;\n\t\tvrLen = 3311;\n\t\tvrLoc = 6346;\n\t};\n\t949408400E95F46800A2D848 /* sqUnixObjC.m */ = {\n\t\tisa = PBXFileReference;\n\t\tname = sqUnixObjC.m;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/CocoaSqueak-3.0.4/src/Squeak/sqUnixObjC.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t949CD5C6085CC32700EB8605 /* PBXBookmark */ = {\n\t\tisa = PBXBookmark;\n\t\tfRef = 66C6C8E501DB1EC300A80109 /* SqueakPlugin.icns */;\n\t};\n\t94A698220E89A647005A25C0 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94A698230E89A647005A25C0 /* objc.h */;\n\t\tname = \"objc.h: 39\";\n\t\trLen = 34;\n\t\trLoc = 1260;\n\t\trType = 0;\n\t\tvrLen = 1344;\n\t\tvrLoc = 0;\n\t};\n\t94A698230E89A647005A25C0 /* objc.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = objc.h;\n\t\tpath = /Developer/SDKs/MacOSX10.4u.sdk/usr/include/objc/objc.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94A698240E89A647005A25C0 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94A698250E89A647005A25C0 /* objc.h */;\n\t\tname = \"objc.h: 45\";\n\t\trLen = 40;\n\t\trLoc = 1387;\n\t\trType = 0;\n\t\tvrLen = 815;\n\t\tvrLoc = 1019;\n\t};\n\t94A698250E89A647005A25C0 /* objc.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = objc.h;\n\t\tpath = /Developer/SDKs/MacOSX10.3.9.sdk/usr/include/objc/objc.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94A6D4600ADEAFC4003E9CBE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94ECA52C097E197400C2C7BA /* QuicktimePlugin.h */;\n\t\tname = stQuicktimeSetSemaphorefor;\n\t\trLen = 26;\n\t\trLoc = 467;\n\t\trType = 0;\n\t\tvrLen = 565;\n\t\tvrLoc = 0;\n\t};\n\t94A8BB7D0E91EB65007DDB7F /* ObjectiveCPlugin.c:1104 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 94C687380E900903006CAD50 /* ObjectiveCPlugin.c */;\n\t\tfunctionName = \"primitiveNSInvocationSetStringType()\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 1104;\n\t\tlocation = ObjectiveCPlugin;\n\t\tmodificationTime = 244590037.338519;\n\t\tstate = 2;\n\t};\n\t94ABA8920858C40D00079BE1 /* sqMemoryAccess.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {756, 2422}}\";\n\t\t\tsepNavSelRange = \"{1428, 6}\";\n\t\t\tsepNavVisRange = \"{1028, 1330}\";\n\t\t};\n\t};\n\t94ABA91E0858D35E00079BE1 /* Squeak */ = {\n\t\tisa = PBXExecutable;\n\t\tactiveArgIndices = (\n\t\t);\n\t\targumentStrings = (\n\t\t);\n\t\tautoAttachOnCrash = 1;\n\t\tbreakpointsEnabled = 1;\n\t\tconfigStateDict = {\n\t\t\t\"PBXLSLaunchAction-0\" = {\n\t\t\t\tPBXLSLaunchAction = 0;\n\t\t\t\tPBXLSLaunchStartAction = 1;\n\t\t\t\tPBXLSLaunchStdioStyle = 2;\n\t\t\t\tPBXLSLaunchStyle = 0;\n\t\t\t\tclass = PBXLSRunLaunchConfig;\n\t\t\t\tcommandLineArgs = (\n\t\t\t\t);\n\t\t\t\tdisplayName = \"Executable Runner\";\n\t\t\t\tenvironment = {\n\t\t\t\t};\n\t\t\t\tidentifier = com.apple.Xcode.launch.runConfig;\n\t\t\t\tremoteHostInfo = \"\";\n\t\t\t\tstartActionInfo = \"\";\n\t\t\t};\n\t\t};\n\t\tcustomDataFormattersEnabled = 1;\n\t\tdebuggerPlugin = GDBDebugging;\n\t\tdisassemblyDisplayState = 0;\n\t\tdylibVariantSuffix = \"\";\n\t\tenableDebugStr = 1;\n\t\tenvironmentEntries = (\n\t\t);\n\t\texecutableSystemSymbolLevel = 0;\n\t\texecutableUserSymbolLevel = 0;\n\t\tlaunchableReference = 9410FB8509AA6FBF002FD7B7 /* Sophie.app */;\n\t\tlibgmallocEnabled = 0;\n\t\tname = Squeak;\n\t\tsavedGlobals = {\n\t\t};\n\t\tsourceDirectories = (\n\t\t);\n\t};\n\t94AF34E00846F91100FA5ACB /* ObjectiveCPlugin */ = {\n\t\tactiveExec = 0;\n\t};\n\t94AF34F10846F91100FA5ACB /* Info.plist */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {739, 610}}\";\n\t\t\tsepNavSelRange = \"{731, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {739, 610}}\";\n\t\t\tsepNavWindowFrame = \"{{84, 91}, {962, 719}}\";\n\t\t};\n\t};\n\t94AF35000846F98600FA5ACB /* config.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {673, 2590}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {673, 397}}\";\n\t\t};\n\t};\n\t94C687380E900903006CAD50 /* ObjectiveCPlugin.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = ObjectiveCPlugin.c;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/Squeak3.8.1-6747-basic#2/src32iPhone/plugins/ObjectiveCPlugin/ObjectiveCPlugin.c\";\n\t\tsourceTree = \"<group>\";\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {965, 19390}}\";\n\t\t\tsepNavSelRange = \"{41293, 0}\";\n\t\t\tsepNavVisRange = \"{8821, 1668}\";\n\t\t\tsepNavWindowFrame = \"{{739, -5}, {1012, 1015}}\";\n\t\t};\n\t};\n\t94CD97380E87A7CC00A81A01 /* ObjectiveCPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {965, 19390}}\";\n\t\t\tsepNavSelRange = \"{41293, 0}\";\n\t\t\tsepNavVisRange = \"{8821, 1611}\";\n\t\t\tsepNavWindowFrame = \"{{739, -5}, {1012, 1015}}\";\n\t\t};\n\t};\n\t94CD975D0E87A9D300A81A01 /* PBXBookmark */ = {\n\t\tisa = PBXBookmark;\n\t\tfRef = 66C6C8E501DB1EC300A80109 /* SqueakPlugin.icns */;\n\t};\n\t94CD975E0E87A9D300A81A01 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 66B8BC5A0381F63A00A8011A /* sqPlatformSpecific.h */;\n\t\tname = \"sqPlatformSpecific.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1796;\n\t\tvrLoc = 0;\n\t};\n\t94CD97620E87A9D300A81A01 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 66B8BC5A0381F63A00A8011A /* sqPlatformSpecific.h */;\n\t\tname = \"sqPlatformSpecific.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1796;\n\t\tvrLoc = 0;\n\t};\n\t94CD979D0E87ACBD00A81A01 /* NSNull.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSNull.h;\n\t\tpath = /Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSNull.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94CD97C40E87AF6D00A81A01 /* stdarg.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = stdarg.h;\n\t\tpath = /Developer/SDKs/MacOSX10.4u.sdk/usr/include/stdarg.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94CD97C60E87AF8E00A81A01 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94CD979D0E87ACBD00A81A01 /* NSNull.h */;\n\t\tname = \"NSNull.h: 9\";\n\t\trLen = 18;\n\t\trLoc = 160;\n\t\trType = 0;\n\t\tvrLen = 185;\n\t\tvrLoc = 0;\n\t};\n\t94CD993D0E87B2D700A81A01 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94CD97C40E87AF6D00A81A01 /* stdarg.h */;\n\t\tname = \"stdarg.h: 4\";\n\t\trLen = 25;\n\t\trLoc = 100;\n\t\trType = 0;\n\t\tvrLen = 234;\n\t\tvrLoc = 0;\n\t};\n\t94CD993F0E87B2D700A81A01 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94CD97C40E87AF6D00A81A01 /* stdarg.h */;\n\t\tname = \"stdarg.h: 4\";\n\t\trLen = 25;\n\t\trLoc = 100;\n\t\trType = 0;\n\t\tvrLen = 234;\n\t\tvrLoc = 0;\n\t};\n\t94CD99620E87CBE500A81A01 /* NSObject.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSObject.h;\n\t\tpath = /Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSObject.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D209B80E8AB02E0083E28B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 66B8BC5E0381F69100A8011A /* sqVirtualMachine.h */;\n\t\tname = \"sqVirtualMachine.h: 72\";\n\t\trLen = 0;\n\t\trLoc = 2891;\n\t\trType = 0;\n\t\tvrLen = 2084;\n\t\tvrLoc = 1476;\n\t};\n\t94D20A490E8BBF840083E28B /* squeakSUnitTester.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1686, 2254}}\";\n\t\t\tsepNavSelRange = \"{9528, 0}\";\n\t\t\tsepNavVisRange = \"{5180, 4749}\";\n\t\t\tsepNavWindowFrame = \"{{864, 7}, {583, 1021}}\";\n\t\t};\n\t};\n\t94D20A4A0E8BBF840083E28B /* squeakSUnitTester.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1086, 5768}}\";\n\t\t\tsepNavSelRange = \"{13143, 0}\";\n\t\t\tsepNavVisRange = \"{10868, 2432}\";\n\t\t\tsepNavWindowFrame = \"{{662, 30}, {997, 998}}\";\n\t\t};\n\t};\n\t94D20AE50E8BC5CF0083E28B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94CD97380E87A7CC00A81A01 /* ObjectiveCPlugin.c */;\n\t\tname = \"ObjectiveCPlugin.c: 432\";\n\t\trLen = 27;\n\t\trLoc = 12775;\n\t\trType = 0;\n\t\tvrLen = 1159;\n\t\tvrLoc = 12086;\n\t};\n\t94D20AE60E8BC5CF0083E28B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D20A490E8BBF840083E28B /* squeakSUnitTester.h */;\n\t\tname = \"squeakSUnitTester.h: 37\";\n\t\trLen = 0;\n\t\trLoc = 1764;\n\t\trType = 0;\n\t\tvrLen = 1836;\n\t\tvrLoc = 0;\n\t};\n\t94D20B110E8BCDB40083E28B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D20B120E8BCDB40083E28B /* NSObjCRuntime.h */;\n\t\tname = \"NSObjCRuntime.h: 59\";\n\t\trLen = 3;\n\t\trLoc = 1445;\n\t\trType = 0;\n\t\tvrLen = 1428;\n\t\tvrLoc = 775;\n\t};\n\t94D20B120E8BCDB40083E28B /* NSObjCRuntime.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSObjCRuntime.h;\n\t\tpath = /Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSObjCRuntime.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D20B2F0E8BDD5B0083E28B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D20A4A0E8BBF840083E28B /* squeakSUnitTester.m */;\n\t\tname = \"squeakSUnitTester.m: 65\";\n\t\trLen = 0;\n\t\trLoc = 2182;\n\t\trType = 0;\n\t\tvrLen = 1042;\n\t\tvrLoc = 1886;\n\t};\n\t94E6590A0E9043640088C3B5 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E6590B0E9043640088C3B5 /* sqMacDragDrop.c */;\n\t\tname = \"sqMacDragDrop.c: 543\";\n\t\trLen = 0;\n\t\trLoc = 16628;\n\t\trType = 0;\n\t\tvrLen = 1500;\n\t\tvrLoc = 15128;\n\t};\n\t94E6590B0E9043640088C3B5 /* sqMacDragDrop.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqMacDragDrop.c;\n\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/platforms/Mac OS/plugins/DropPlugin/sqMacDragDrop.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E6590C0E9043640088C3B5 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E6590D0E9043640088C3B5 /* sqMacWindowUniversal.c */;\n\t\tname = \"sqMacWindowUniversal.c: 361\";\n\t\trLen = 27;\n\t\trLoc = 12118;\n\t\trType = 0;\n\t\tvrLen = 1812;\n\t\tvrLoc = 11210;\n\t};\n\t94E6590D0E9043640088C3B5 /* sqMacWindowUniversal.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqMacWindowUniversal.c;\n\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/platforms/Mac OS/vm/sqMacWindowUniversal.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E659110E9043640088C3B5 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E659120E9043640088C3B5 /* sqMacDragDrop.c */;\n\t\tname = \"sqMacDragDrop.c: 456\";\n\t\trLen = 26;\n\t\trLoc = 14041;\n\t\trType = 0;\n\t\tvrLen = 1777;\n\t\tvrLoc = 13155;\n\t};\n\t94E659120E9043640088C3B5 /* sqMacDragDrop.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqMacDragDrop.c;\n\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/platforms/Mac OS/plugins/DropPlugin/sqMacDragDrop.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E659130E9043640088C3B5 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E659140E9043640088C3B5 /* sqMacWindowUniversal.c */;\n\t\tname = \"sqMacWindowUniversal.c: 361\";\n\t\trLen = 27;\n\t\trLoc = 12118;\n\t\trType = 0;\n\t\tvrLen = 1812;\n\t\tvrLoc = 11210;\n\t};\n\t94E659140E9043640088C3B5 /* sqMacWindowUniversal.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqMacWindowUniversal.c;\n\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/platforms/Mac OS/vm/sqMacWindowUniversal.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E659C70E9092870088C3B5 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 943C82B20E87CC1F00A8C956 /* NSNull.h */;\n\t\tname = \"NSNull.h: 9\";\n\t\trLen = 18;\n\t\trLoc = 160;\n\t\trType = 0;\n\t\tvrLen = 185;\n\t\tvrLoc = 0;\n\t};\n\t94ECA4AA097E137A00C2C7BA /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94AF34F10846F91100FA5ACB /* Info.plist */;\n\t\tname = Quickt;\n\t\trLen = 6;\n\t\trLoc = 284;\n\t\trType = 0;\n\t\tvrLen = 758;\n\t\tvrLoc = 0;\n\t};\n\t94ECA4E7097E15F800C2C7BA /* PkgInfo */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {739, 610}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {739, 610}}\";\n\t\t};\n\t};\n\t94ECA522097E18C600C2C7BA /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94ECA4E7097E15F800C2C7BA /* PkgInfo */;\n\t\tname = \"PkgInfo: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 8;\n\t\tvrLoc = 0;\n\t};\n\t94ECA52C097E197400C2C7BA /* QuicktimePlugin.h */ = {\n\t\tisa = PBXFileReference;\n\t\tfileEncoding = 4;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = QuicktimePlugin.h;\n\t\tpath = /Users/johnmci/Documents/SqueakObjectiveCPlugin/platforms/Cross/plugins/QuicktimePlugin/QuicktimePlugin.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94ECA688097ECFBF00C2C7BA /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94ECA52C097E197400C2C7BA /* QuicktimePlugin.h */;\n\t\tname = stQuicktimeSetSemaphorefor;\n\t\trLen = 26;\n\t\trLoc = 467;\n\t\trType = 0;\n\t\tvrLen = 565;\n\t\tvrLoc = 0;\n\t};\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/plugins/UnixOSProcessPlugin/UnixOSProcessPluginOLD.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 45;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t040F1A2C12CD1687008BA0CB /* sqConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 040F1A2A12CD1687008BA0CB /* sqConfig.h */; };\n\t\t040F1A2D12CD1687008BA0CB /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = 040F1A2B12CD1687008BA0CB /* config.h */; };\n\t\t94ABA8930858C40D00079BE1 /* sqMemoryAccess.h in Headers */ = {isa = PBXBuildFile; fileRef = 94ABA8920858C40D00079BE1 /* sqMemoryAccess.h */; };\n\t\t94AF34E30846F91100FA5ACB /* sqPlatformSpecific.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B8BC5A0381F63A00A8011A /* sqPlatformSpecific.h */; };\n\t\t94AF34E40846F91100FA5ACB /* sq.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B8BC5C0381F66500A8011A /* sq.h */; };\n\t\t94AF34E50846F91100FA5ACB /* sqVirtualMachine.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B8BC5E0381F69100A8011A /* sqVirtualMachine.h */; };\n\t\t94AF35050846F9AB00FA5ACB /* interp.h in Headers */ = {isa = PBXBuildFile; fileRef = 94AF35040846F9AB00FA5ACB /* interp.h */; };\n\t\t94CD97E40E87B00D00A81A01 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94CD97E30E87B00D00A81A01 /* Foundation.framework */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXBuildRule section */\n\t\t94AF34F70846F94F00FA5ACB /* PBXBuildRule */ = {\n\t\t\tisa = PBXBuildRule;\n\t\t\tcompilerSpec = com.apple.compilers.gcc.3_3;\n\t\t\tfileType = sourcecode.c;\n\t\t\tisEditable = 1;\n\t\t\toutputFiles = (\n\t\t\t);\n\t\t};\n/* End PBXBuildRule section */\n\n/* Begin PBXFileReference section */\n\t\t040F1A2A12CD1687008BA0CB /* sqConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqConfig.h; path = iOS/vm/iPhone/sqConfig.h; sourceTree = \"<group>\"; };\n\t\t040F1A2B12CD1687008BA0CB /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = config.h; path = iOS/vm/iPhone/config.h; sourceTree = \"<group>\"; };\n\t\t66B8BC5A0381F63A00A8011A /* sqPlatformSpecific.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sqPlatformSpecific.h; path = iOS/vm/iPhone/sqPlatformSpecific.h; sourceTree = \"<group>\"; };\n\t\t66B8BC5C0381F66500A8011A /* sq.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sq.h; path = Cross/vm/sq.h; sourceTree = \"<group>\"; };\n\t\t66B8BC5E0381F69100A8011A /* sqVirtualMachine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sqVirtualMachine.h; path = Cross/vm/sqVirtualMachine.h; sourceTree = \"<group>\"; };\n\t\t943173AF085CD38900DDDC64 /* ObjectiveCPlugin.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ObjectiveCPlugin.bundle; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t94ABA8920858C40D00079BE1 /* sqMemoryAccess.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sqMemoryAccess.h; path = Cross/vm/sqMemoryAccess.h; sourceTree = \"<group>\"; };\n\t\t94AF34F10846F91100FA5ACB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n\t\t94AF35040846F9AB00FA5ACB /* interp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = interp.h; path = ../src/vm/interp.h; sourceTree = \"<group>\"; };\n\t\t94CD97E30E87B00D00A81A01 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };\n\t\t94ECA4E7097E15F800C2C7BA /* PkgInfo */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = PkgInfo; path = build/PkgInfo; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t94AF34EE0846F91100FA5ACB /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t94CD97E40E87B00D00A81A01 /* Foundation.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t66B8BC570381F53800A8011A /* platforms */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t040F1A2A12CD1687008BA0CB /* sqConfig.h */,\n\t\t\t\t040F1A2B12CD1687008BA0CB /* config.h */,\n\t\t\t\t94AF35040846F9AB00FA5ACB /* interp.h */,\n\t\t\t\t66B8BC5A0381F63A00A8011A /* sqPlatformSpecific.h */,\n\t\t\t\t66B8BC5C0381F66500A8011A /* sq.h */,\n\t\t\t\t66B8BC5E0381F69100A8011A /* sqVirtualMachine.h */,\n\t\t\t\t94ABA8920858C40D00079BE1 /* sqMemoryAccess.h */,\n\t\t\t);\n\t\t\tname = platforms;\n\t\t\tpath = ../../..;\n\t\t\tsourceTree = SOURCE_ROOT;\n\t\t};\n\t\t66DF6BFE01D7DCEA00A80119 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94ECA4E7097E15F800C2C7BA /* PkgInfo */,\n\t\t\t\t94AF34F10846F91100FA5ACB /* Info.plist */,\n\t\t\t\t66B8BC570381F53800A8011A /* platforms */,\n\t\t\t\t66DF6BFF01D7DCEA00A80119 /* Sources */,\n\t\t\t\t94CD97E30E87B00D00A81A01 /* Foundation.framework */,\n\t\t\t\t66DF6C4501D7DEEE00A80119 /* Products */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66DF6BFF01D7DCEA00A80119 /* Sources */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t);\n\t\t\tname = Sources;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t66DF6C4501D7DEEE00A80119 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t943173AF085CD38900DDDC64 /* ObjectiveCPlugin.bundle */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXHeadersBuildPhase section */\n\t\t94AF34E10846F91100FA5ACB /* Headers */ = {\n\t\t\tisa = PBXHeadersBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t94AF34E30846F91100FA5ACB /* sqPlatformSpecific.h in Headers */,\n\t\t\t\t94AF34E40846F91100FA5ACB /* sq.h in Headers */,\n\t\t\t\t94AF34E50846F91100FA5ACB /* sqVirtualMachine.h in Headers */,\n\t\t\t\t94AF35050846F9AB00FA5ACB /* interp.h in Headers */,\n\t\t\t\t94ABA8930858C40D00079BE1 /* sqMemoryAccess.h in Headers */,\n\t\t\t\t040F1A2C12CD1687008BA0CB /* sqConfig.h in Headers */,\n\t\t\t\t040F1A2D12CD1687008BA0CB /* config.h in Headers */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXHeadersBuildPhase section */\n\n/* Begin PBXNativeTarget section */\n\t\t94AF34E00846F91100FA5ACB /* ObjectiveCPlugin */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 94ECA1E7097DC27D00C2C7BA /* Build configuration list for PBXNativeTarget \"ObjectiveCPlugin\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t94AF34E10846F91100FA5ACB /* Headers */,\n\t\t\t\t94AF34E70846F91100FA5ACB /* Resources */,\n\t\t\t\t94AF34EA0846F91100FA5ACB /* Sources */,\n\t\t\t\t94AF34EE0846F91100FA5ACB /* Frameworks */,\n\t\t\t\t94AF34F00846F91100FA5ACB /* Rez */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t\t94AF34F70846F94F00FA5ACB /* PBXBuildRule */,\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = ObjectiveCPlugin;\n\t\t\tproductInstallPath = \"$(USER_LIBRARY_DIR)/Bundles\";\n\t\t\tproductName = \"mpeg3PluginBundle Debug\";\n\t\t\tproductReference = 943173AF085CD38900DDDC64 /* ObjectiveCPlugin.bundle */;\n\t\t\tproductType = \"com.apple.product-type.bundle\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t66DF6BFD01D7DCEA00A80119 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tbuildConfigurationList = 94ECA1EB097DC27D00C2C7BA /* Build configuration list for PBXProject \"UnixOSProcessPlugin\" */;\n\t\t\tcompatibilityVersion = \"Xcode 3.1\";\n\t\t\tdevelopmentRegion = English;\n\t\t\thasScannedForEncodings = 1;\n\t\t\tknownRegions = (\n\t\t\t\tEnglish,\n\t\t\t\tJapanese,\n\t\t\t\tFrench,\n\t\t\t\tGerman,\n\t\t\t);\n\t\t\tmainGroup = 66DF6BFE01D7DCEA00A80119;\n\t\t\tproductRefGroup = 66DF6C4501D7DEEE00A80119 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t94AF34E00846F91100FA5ACB /* ObjectiveCPlugin */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t94AF34E70846F91100FA5ACB /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXRezBuildPhase section */\n\t\t94AF34F00846F91100FA5ACB /* Rez */ = {\n\t\t\tisa = PBXRezBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXRezBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t94AF34EA0846F91100FA5ACB /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin XCBuildConfiguration section */\n\t\t94ECA1E8097DC27D00C2C7BA /* Development */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_ENABLE_FIX_AND_CONTINUE = YES;\n\t\t\t\tGCC_GENERATE_DEBUGGING_SYMBOLS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_VERSION = 4.0;\n\t\t\t\tHEADER_SEARCH_PATHS = /Developer/Headers/FlatCarbon;\n\t\t\t\tINFOPLIST_FILE = Info.plist;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tPRODUCT_NAME = ObjectiveCPlugin;\n\t\t\t\tSDKROOT = macosx10.5;\n\t\t\t\tSECTORDER_FLAGS = \"\";\n\t\t\t\tWARNING_CFLAGS = (\n\t\t\t\t\t\"-Wmost\",\n\t\t\t\t\t\"-Wno-four-char-constants\",\n\t\t\t\t\t\"-Wno-unknown-pragmas\",\n\t\t\t\t);\n\t\t\t\tWRAPPER_EXTENSION = bundle;\n\t\t\t};\n\t\t\tname = Development;\n\t\t};\n\t\t94ECA1E9097DC27D00C2C7BA /* Deployment */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tARCHS = \"$(ARCHS_STANDARD_32_BIT)\";\n\t\t\t\tCOPY_PHASE_STRIP = YES;\n\t\t\t\tGCC_ENABLE_FIX_AND_CONTINUE = NO;\n\t\t\t\tGCC_GENERATE_DEBUGGING_SYMBOLS = NO;\n\t\t\t\tGCC_VERSION = 4.0;\n\t\t\t\tHEADER_SEARCH_PATHS = /Developer/Headers/FlatCarbon;\n\t\t\t\tINFOPLIST_FILE = Info.plist;\n\t\t\t\tOTHER_CFLAGS = \"\";\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tPRODUCT_NAME = ObjectiveCPlugin;\n\t\t\t\tSECTORDER_FLAGS = \"\";\n\t\t\t\tWARNING_CFLAGS = (\n\t\t\t\t\t\"-Wmost\",\n\t\t\t\t\t\"-Wno-four-char-constants\",\n\t\t\t\t);\n\t\t\t\tWRAPPER_EXTENSION = bundle;\n\t\t\t};\n\t\t\tname = Deployment;\n\t\t};\n\t\t94ECA1EA097DC27D00C2C7BA /* Default */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tGCC_GENERATE_DEBUGGING_SYMBOLS = NO;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 3;\n\t\t\t\tGCC_VERSION_i386 = \"\";\n\t\t\t\tGCC_VERSION_ppc = \"\";\n\t\t\t\tHEADER_SEARCH_PATHS = /Developer/Headers/FlatCarbon;\n\t\t\t\tINFOPLIST_FILE = Info.plist;\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.5;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tPER_ARCH_CFLAGS_i386 = \"\";\n\t\t\t\tPER_ARCH_CFLAGS_ppc = \"\";\n\t\t\t\tPRODUCT_NAME = QuicktimePlugin;\n\t\t\t\tSDKROOT = macosx10.5;\n\t\t\t\tSDKROOT_i386 = \"\";\n\t\t\t\tSDKROOT_ppc = \"\";\n\t\t\t\tSECTORDER_FLAGS = \"\";\n\t\t\t\tWARNING_CFLAGS = (\n\t\t\t\t\t\"-Wmost\",\n\t\t\t\t\t\"-Wno-four-char-constants\",\n\t\t\t\t\t\"-Wno-unknown-pragmas\",\n\t\t\t\t);\n\t\t\t\tWRAPPER_EXTENSION = bundle;\n\t\t\t};\n\t\t\tname = Default;\n\t\t};\n\t\t94ECA1EC097DC27D00C2C7BA /* Development */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.5;\n\t\t\t\tSDKROOT = macosx10.5;\n\t\t\t};\n\t\t\tname = Development;\n\t\t};\n\t\t94ECA1ED097DC27D00C2C7BA /* Deployment */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.5;\n\t\t\t\tSDKROOT = macosx10.5;\n\t\t\t};\n\t\t\tname = Deployment;\n\t\t};\n\t\t94ECA1EE097DC27D00C2C7BA /* Default */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.3;\n\t\t\t\tSDKROOT = iphoneos2.0;\n\t\t\t};\n\t\t\tname = Default;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t94ECA1E7097DC27D00C2C7BA /* Build configuration list for PBXNativeTarget \"ObjectiveCPlugin\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t94ECA1E8097DC27D00C2C7BA /* Development */,\n\t\t\t\t94ECA1E9097DC27D00C2C7BA /* Deployment */,\n\t\t\t\t94ECA1EA097DC27D00C2C7BA /* Default */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Default;\n\t\t};\n\t\t94ECA1EB097DC27D00C2C7BA /* Build configuration list for PBXProject \"UnixOSProcessPlugin\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t94ECA1EC097DC27D00C2C7BA /* Development */,\n\t\t\t\t94ECA1ED097DC27D00C2C7BA /* Deployment */,\n\t\t\t\t94ECA1EE097DC27D00C2C7BA /* Default */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Default;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 66DF6BFD01D7DCEA00A80119 /* Project object */;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/5.x.x Release Notes.rtf",
    "content": "{\\rtf1\\ansi\\ansicpg1252\\cocoartf1038\\cocoasubrtf320\n{\\fonttbl\\f0\\fnil\\fcharset0 Geneva;\\f1\\fnil\\fcharset0 LucidaGrande;}\n{\\colortbl;\\red255\\green255\\blue255;}\n\\margl1440\\margr1440\\vieww20740\\viewh15740\\viewkind0\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\\pardirnatural\n\n\\f0\\fs24 \\cf0 Mac VM 5.7b1 Cocoa for os-x 10.5 and iPhone 2.x\\\n\n\\f1\\b\\fs22 \\\nRevision: \n\\b0 199 \n\\f0\\fs24 5.7b1\n\\f1\\b\\fs22 \\\nDate: \n\\b0 Wednesday, June 16, 2010 12:04:22 AM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 Mac Cocoa VM 5.7b1  Move towards June 15th VMMaker source\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/SqueakFFIPrims/sqManualSurface.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/AsynchFilePlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/AsynchFilePlugin/AsynchFilePlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/JoystickTabletPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/JoystickTabletPlugin/JoystickTabletPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/SerialPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/SerialPlugin/SerialPlugin.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/plugins.int\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/64interp.h\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/interp.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/AsynchFilePlugin/AsynchFilePlugin.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/B2DPlugin/B2DPlugin.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/B3DAcceleratorPlugin/B3DAcceleratorPlugin.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/BMPReadWriterPlugin/BMPReadWriterPlugin.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/BitBltPlugin/BitBltPlugin.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/DSAPrims/DSAPrims.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/DropPlugin/DropPlugin.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/FFTPlugin/FFTPlugin.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/FilePlugin/FilePlugin.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/FloatArrayPlugin/FloatArrayPlugin.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/GeniePlugin/GeniePlugin.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/HostWindowPlugin/HostWindowPlugin.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/InternetConfigPlugin/InternetConfigPlugin.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/JPEGReaderPlugin/JPEGReaderPlugin.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/JoystickTabletPlugin/JoystickTabletPlugin.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/Klatt/Klatt.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/LargeIntegers/LargeIntegers.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/MIDIPlugin/MIDIPlugin.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/MacMenubarPlugin/MacMenubarPlugin.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/Matrix2x3Plugin/Matrix2x3Plugin.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/MiscPrimitivePlugin/MiscPrimitivePlugin.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/RePlugin/RePlugin.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/SecurityPlugin/SecurityPlugin.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/SerialPlugin/SerialPlugin.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/SocketPlugin/SocketPlugin.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/SoundCodecPrims/SoundCodecPrims.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/SoundGenerationPlugin/SoundGenerationPlugin.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/SoundPlugin/SoundPlugin.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/Squeak3D/Squeak3D.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/StarSqueakPlugin/StarSqueakPlugin.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/UUIDPlugin/UUIDPlugin.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/ZipPlugin/ZipPlugin.c\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/sqNamedPrims.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/Info-iPhone.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info 64*64.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/HostWindowPlugin/HostWindowPlugin.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/SoundPlugin/SoundPlugin.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/SqueakFFIPrims/sqFFI.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/vm/sq.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/vm/sqNamedPrims.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/vm/sqVirtualMachine.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/vm/sqVirtualMachine.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/SoundPlugin/sqSqueakSoundCoreAudioAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+attributes.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/unix/plugins/UUIDPlugin/sqUnixUUID.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/unix/vm/SqDisplay.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/unix/vm/SqSound.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/unix/vm/aio.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/unix/vm/debug.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/unix/vm/debug.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/unix/vm/dlfcn-dyld.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/unix/vm/sqUnixCharConv.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/unix/vm/sqUnixCharConv.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/unix/vm/sqUnixEvent.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/unix/vm/sqUnixExternalPrims.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/unix/vm/sqUnixMain.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/unix/vm/sqUnixMemory.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/interp.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/interp.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/B2DPlugin/B2DPlugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/B3DAcceleratorPlugin/B3DAcceleratorPlugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/BMPReadWriterPlugin/BMPReadWriterPlugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/BitBltPlugin/BitBltPlugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/DropPlugin/DropPlugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/FFTPlugin/FFTPlugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/FilePlugin/FilePlugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/FloatArrayPlugin/FloatArrayPlugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/GeniePlugin/GeniePlugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/HostWindowPlugin/HostWindowPlugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/InternetConfigPlugin/InternetConfigPlugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/JPEGReaderPlugin/JPEGReaderPlugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/Klatt/Klatt.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/LargeIntegers/LargeIntegers.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/MIDIPlugin/MIDIPlugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/MacMenubarPlugin/MacMenubarPlugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/Matrix2x3Plugin/Matrix2x3Plugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/MiscPrimitivePlugin/MiscPrimitivePlugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/RePlugin/RePlugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/SecurityPlugin/SecurityPlugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/SocketPlugin/SocketPlugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/SoundCodecPrims/SoundCodecPrims.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/SoundGenerationPlugin/SoundGenerationPlugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/SoundPlugin/SoundPlugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/Squeak3D/Squeak3D.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/SqueakFFIPrims/SqueakFFIPrims.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/StarSqueakPlugin/StarSqueakPlugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/UUIDPlugin/UUIDPlugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/ZipPlugin/ZipPlugin.c\\\n\n\\b \\\n\\\n5.4b2\\\nFile: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 184\n\\b \\\nDate: \n\\b0 Monday, January 25, 2010 12:15:10 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 rename interp.h header for 64bit squeak it's breaking things by includes from 32bit squeak \\\nsqiPhoneScreenAndWindow.m\\\nuse rect versus *rect in drawRect\\\n\\\nsqSqueakScreenAndWindow.m\\\npass rect in versus pointer to rect since we need to\\\npass rect to invalidateRect anyway\\\n\\\nSqueakOSXAppDelegate.m\\\nremove check for 64bit image in getfullscreen\\\nupdate to 5.4b2\\\n\\\nsqSqueakScreenAndWindow.h\\\npass rect versus *rect\\\n\\\nsqSqueakOSXApplication+attributes.m\\\nversion number change\\\n\\\nsqSqueakOSXScreenAndWindow.m\\\nCLANG hates (NSRect) = (CGRect)\\\n\\\nsqSqueakOSXApplication+cursor.m\\\nlet's not leak cursors\\\n\\\nsqSqueakOSXNSView.m\\\nchange the cursor to arrow when click in resize widget\\\nchange back when unclick\\\ndrawRect: is drawRect (NSRect) not (NSRect*)\\\n\\\nsqSqueakOSXApplication+imageReadWrite.m\\\nOpen panel has to let you click  only on *.image types, not others. \n\\b \\\n\\\nChanges:\\\n\n\\b0 \tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/64interp.h Copied from revision: 183 path: /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/interp.h\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/interp.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAndWindow.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAndWindow.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+attributes.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+cursor.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+imageReadWrite.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXScreenAndWindow.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/sqiPhoneScreenAndWindow.m\\\n\\\n\\\n\n\\f0\\fs24 Mac VM 5.4b1 Cocoa for os-x 10.5 and iPhone 2.x\\\n\n\\f1\\fs22 \\\n\n\\b File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 183\n\\b \\\nDate: \n\\b0 Friday, January 22, 2010 12:46:14 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 Add microSeconds. \\\nRebuild interp.c for 64bit source\\\n\\\nInterp.c\\\nadd ioMicroSeconds\\\n\\\nsq.h\\\nadd ioMicroSeconds\\\n\\\nChipboardExtendedPlugin.c\\\nhas to include sqMacExtendedClipboard.h so that 64bit failure does not occur\\\n\\\nSqueakOSXAppDelegate.m\\\nSome funky issue with storage of headers in 64bit images\\\nand how it affects full screen flag\\\nwork around for now.\\\n\\\nsqMacV2Time\\\nadd ioMicroSeconds\\\n\\\nsqSqueakOSXNSView.h\\\nremove compiler warning\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info 64*64.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/vm/sq.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqMacV2Time.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+attributes.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/interp.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/interp.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/interp.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.c\\\n\\\n\n\\f0\\fs24 Mac VM 5.3b1 Cocoa for os-x 10.5 and iPhone 2.x\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\\cf0 Support for Closures, OS-X, iPhone.\\\n\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\\pardirnatural\n\n\\f1\\b\\fs22 \\cf0 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.m\n\\b \\\nRevision: \n\\b0 176\n\\b \\\nDate: \n\\b0 Sunday, January 10, 2010 11:32:48 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 5.3b1  remove some NSLog, ensure modifier flags get passed onto doCommand: logic properly\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakEventsAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+events.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.m\\\n\n\\f0\\fs24 \\\n\n\\f1\\b\\fs22 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 174\n\\b \\\nDate: \n\\b0 Sunday, January 10, 2010 10:55:42 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 5.3b1 compile work\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakNoOGLIPhone_Prefix.pch\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAndWindow.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/sqiPhoneScreenAndWindow.m\\\n\n\\f0\\fs24 \\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\\cf0 \\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\\pardirnatural\n\n\\f1\\b\\fs22 \\cf0 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.m\n\\b \\\nRevision: \n\\b0 173\n\\b \\\nDate: \n\\b0 Sunday, January 10, 2010 10:24:54 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 We consolidate the drawing logic between os-x and iphone & fix keyboard logic (partially)\\\n\\\nIn ioForceDisplayUpdate we do \\\nlockWhenCondition: 0\\\nmove the drawing queue to the frame queue\\\nunlockWIthCondition: 1\\\nschedule postIoForceDisplayUpdateUsingRectangle on the main thread wait until done. \\\nThis does setNeedsDisplayInRect: on the mainView\\\n\\\nThis ensures we are doing the invalidate rectangle logic on the main view. \\\n\\\nLater drawRect: will run on the view, this does\\\nlockWhenCondition: 1\\\nmove the data from the frameQueue to the CGContext (aka screen). \\\nunlockWithCondition: 0\\\n\\\nTherefore the ioForceDisplayUpdate will block until the last drawRect: happens. \\\nThe drawRect: will block until the ioForceDisplayUpdate: has put data into the frameQueue\\\nhowever it does check for data before doing the lock. \\\n\\\n\\\nsqSqueakSoundCoreAudioAPI.m/h\\\nfix /* & // to remove compiler warning\\\n\\\nsqSqueakEventAPI.m/h \\\nadd optional logging in ioGetNextEvent\\\n\\\nsqSqueakMainApplication+attributes.m/h\\\nadd \"const\" to getAttribute: \\\n\\\nsqSqueakScreenAndWindow.h/m\\\nmoving lockForScreenUpdate down\\\n\\\nsqSqueakScreenAndWindow.h\\\nlockForScreenUpdate logic\\\nadd postIoForceDisplayUpdateUsingRectangle\\\n\\\nSqueakOSXAppDelegate.m\\\nversion number change\\\n\\\nsqSqueakOSXApplication+attributes.m\\\nversion number change\\\n\\\nsqSqueakOSXNSView.h\\\nsqSqueakOSXNSView.m\\\n\\\nsqSqueakOSXScreenAndWindow.m\\\noverride postIoForceDisplayUpdateUsingRectangle\\\n\\\n sqSqueakIPhoneApplication+attributes.m\\\nversion number change\\\n\\\nsqiPhoneScreenAndWindow.m/h\\\nlockForScreenUpdate goes to super class\\\n\\\nWork work work on keyboard logic.\\\n\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakNoOGLIPhone.xcodeproj/johnmci.mode1v3\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakNoOGLIPhone.xcodeproj/johnmci.pbxuser\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakNoOGLIPhone.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/Info-iPhone.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/SoundPlugin/sqSqueakSoundCoreAudioAPI.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/SoundPlugin/sqSqueakSoundCoreAudioAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakEventsAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakMainApplication+attributes.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAndWindow.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAndWindow.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+attributes.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+events.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXScreenAndWindow.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/sqSqueakIPhoneApplication+attributes.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/sqiPhoneScreenAndWindow.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/sqiPhoneScreenAndWindow.m\\\n\n\\f0\\fs24 \\\n\n\\f1\\b\\fs22 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 172\n\\b \\\nDate: \n\\b0 Tuesday, January 5, 2010 6:39:04 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 V5.2b3 mac osx vm  2.1.0 iphone vm\\\nfor 5.2.b3 we fix option arrow key\\\nfor 2.1.0 we move to current pharo pharo1.0-10502-rc1dev09.12.2.image\\\nthis also required changing source file name in _imageReadWrite\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/PharoV10.sources\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/iPhone.10418.changes\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/iPhone.10418.image\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/Info-iPhone.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/iPhone.changes\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/iPhone.image\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+attributes.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/sqSqueakIPhoneApplication+attributes.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/sqSqueakIPhoneApplication+imageReadWrite.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/interp.c\\\n\n\\f0\\fs24 \\\n\n\\f1\\b\\fs22 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 169\n\\b \\\nDate: \n\\b0 Monday, January 4, 2010 1:12:46 AM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 5.2b2  fix for jpeg read/write bad form bitmap addressing code\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+attributes.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/interp.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.c\\\n\n\\f0\\fs24 \\\n\n\\f1\\b\\fs22 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 167\n\\b \\\nDate: \n\\b0 Saturday, January 2, 2010 9:01:04 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 os-x 5.2b1 (11)\\\niphone 2.1.0\\\n\\\nsqMacExtendedClipboard.m/h\\\nadd cocoa support for extended clipboard logic. \\\n\\\nMacMenuOS9ToOSX.m/h \\\nMacMenubarPlugin.h\\\nAdd start of mac menu support. In Progress, not usable\\\n\\\nsqSqueakScreenAndWindow.m\\\nRefactor the iphone versus os-x drawing a bit. Needs more adjustment\\\n\\\nSqueakOSXAppDelegate.m\\\nsqSqueakOSXApplication-attributes.m \\\nTweak version to 5.2b1 (11)\\\n\\\n\\\niphone 2.1.0\\\nFix drawing, yes it was busted. \\\nAdd clipboard support\\\n\\\nsqSqueakiPhoneApplication+clipboard.m/h\\\nsqSqueakIPhoneClipboardClipboardAPI.m/h \\\nclipboard support for squeak\\\n\\\nsqMacExtendedClipboard.m/h\\\nclipboard support for Pharo\\\n\\\nsrc\\\nAdd ClipboardExtendedPlugin\\\nAdd macMenubarPlugin\\\n\\\n\\\n\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/ClipboardExtended\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/ClipboardExtended/sqMacExtendedClipboard.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/ClipboardExtended/sqMacExtendedClipboard.m\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/config\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/config/ftconfig.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/config/ftheader.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/config/ftmodule.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/config/ftoption.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/config/ftstdlib.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/freetype.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftadvanc.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftbbox.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftbdf.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftbitmap.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftcache.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftchapters.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftcid.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/fterrdef.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/fterrors.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftgasp.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftglyph.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftgxval.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftgzip.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftimage.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftincrem.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftlcdfil.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftlist.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftlzw.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftmac.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftmm.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftmodapi.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftmoderr.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftotval.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftoutln.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftpfr.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftrender.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftsizes.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftsnames.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftstroke.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftsynth.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftsystem.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/fttrigon.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/fttypes.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftwinfnt.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ftxf86.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/t1tables.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ttnameid.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/tttables.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/tttags.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/freetype2/freetype/ttunpat.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/MacMenubarPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/MacMenubarPlugin/MacMenuOS9ToOSX.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/MacMenubarPlugin/MacMenuOS9ToOSX.m\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/MacMenubarPlugin/MacMenubarPlugin.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/sqSqueakIPhoneApplication+clipboard.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/sqSqueakIPhoneApplication+clipboard.m\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/sqSqueakIPhoneClipboardAPI.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/sqSqueakIPhoneClipboardAPI.m\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/plugins/ClipboardExtended\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/plugins/ClipboardExtended/sqMacExtendedClipboard.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/plugins/ClipboardExtended/sqMacExtendedClipboard.m\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/ClipboardExtendedPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/MacMenubarPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/MacMenubarPlugin/MacMenubarPlugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/Info-iPhone.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info 64*64.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAndWindow.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+attributes.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/macintoshextra.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/sqNamedPrims.h\\\n\n\\f0\\fs24 \\\n\n\\f1\\b\\fs22 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 166\n\\b \\\nDate: \n\\b0 Friday, January 1, 2010 1:01:54 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 minor changes for 64bit image compile for 32bit powerpc\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/FT2Plugin.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/FT2Plugin.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/sqNamedPrims.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/interp.h\\\n\n\\f0\\fs24 \\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\\cf0 \\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\\pardirnatural\n\n\\f1\\b\\fs22 \\cf0 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 165\n\\b \\\nDate: \n\\b0 Friday, December 25, 2009 8:08:07 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 5.1.b1  changes to expose sqBaseMemory address for plugins to link to .\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/.DS_Store\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/FT2Plugin.xcodeproj\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/FT2Plugin.xcodeproj/.DS_Store\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/FT2Plugin.xcodeproj/bert.mode1\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/FT2Plugin.xcodeproj/bert.pbxuser\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/FT2Plugin.xcodeproj/johnmci.mode1\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/FT2Plugin.xcodeproj/johnmci.mode1v3\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/FT2Plugin.xcodeproj/johnmci.pbxuser\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/FT2Plugin.xcodeproj/project.pbxproj\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/Info-FT2Plugin.plist\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/PkgInfo\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/libfreetype.a\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/FT2Plugin/macFileNameBits.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/plugins/FT2Plugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/plugins/FT2Plugin/.DS_Store\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/plugins/FT2Plugin/FT2Plugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+attributes.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/sqMacV2Memory.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/sqPlatformSpecific.h\\\n\n\\b File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 163\n\\b \\\nDate: \n\\b0 Tuesday, December 8, 2009 10:00:41 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 Fix issue with malloc in 1/2/4/8/16 to 32bit translators. \\\nWe need to allocate storage, then free after the draw. \\\n\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqViewClut.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAndWindow.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAndWindow.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/BitMapConversionLogicFromX11.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqViewBitmapConversion.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqViewBitmapConversion.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXScreenAndWindow.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/drawingImageAtom.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/drawingImageAtom.m\\\n\n\\f0\\fs24 \\\n\n\\f1\\b\\fs22 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 162\n\\b \\\nDate: \n\\b0 Tuesday, December 8, 2009 1:17:32 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 Add 1,2,4,8,16 bit form support\\\nNOT COMPLETED, need to figure out how to dispose of malloc\\\n\\\nsqSqueakScreenAPI.m\\\n\\\nioHasDisplayDepth\\\nshould have used ioHasDisplayDepth: versus ioDisplayDepth (bug)\\\n\\\n\\\nsqSqueakScreenAndWindow.m\\\nsqSqueakScreenAndWindow.h\\\n\\\nrefractor to use \\\nCGDataProviderCreateWithData\\\nby default\\\nand have a method to create the CGImageRef so \\\nos-x can use default or calculate bitmap. \\\n\\\n\\\nsqSqueakOSXNSView.h\\\nsqSqueakOSXNSView.m\\\n\\\nrefactor to use colormap and support 1,2,4,8,16 bit forms\\\n\\\nsqSqueakOSXScreenAndWindow.h\\\nsqSqueakOSXScreenAndWindow.m\\\n\\\nioHasDisplayDepth fix\\\nrefractor to build 32bit screen using default logic or\\\ncalculate 1,2,4,8,16 version\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/BitMapConversionLogicFromX11.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/BitMapConversionLogicFromX11.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqViewBitmapConversion.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqViewBitmapConversion.m\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqViewClut.m\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqMacUnixExternalPrims.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAndWindow.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAndWindow.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXScreenAndWindow.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/.DS_Store\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/.DS_Store\\\n\n\\f0\\fs24 \\\n\n\\f1\\b\\fs22 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 161\n\\b \\\nDate: \n\\b0 Wednesday, December 2, 2009 2:46:02 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 Beta 9\\\nas shipped\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info 64*64.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/DropPlugin/DropPlugin.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/SecurityPlugin/SecurityPlugin.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/SocketPlugin/SocketPlugin.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/SoundPlugin/SoundPlugin.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/UUIDPlugin/UUIDPlugin.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/vm/sqNamedPrims.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/SecurityPlugin/sqMacSecurity.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/SoundPlugin/sqSqueakSoundCoreAudio.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/SoundPlugin/sqSqueakSoundCoreAudioAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqMacV2Time.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakEventsAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+attributes.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+events.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXDropAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/interp.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/sqDummyaio.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/sqDummyaio.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/unix/plugins/SocketPlugin/sqUnixSocket.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/unix/plugins/UUIDPlugin/sqUnixUUID.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/unix/vm/aio.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/interp.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/interp.h\\\n\n\\f0\\fs24 \\\n\n\\f1\\b\\fs22 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 160\n\\b \\\nDate: \n\\b0 Wednesday, December 2, 2009 2:16:07 AM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 beta 9\\\nAdd the 64bit image SRC\\\nfix some implicit routine defs \\\n\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/.DS_Store\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/plugins\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/plugins.ext\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/plugins.int\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/plugins/IA32ABI\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/.DS_Store\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/interp.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/interp.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/ADPCMCodecPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/AsynchFilePlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/AsynchFilePlugin/AsynchFilePlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/B2DPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/B2DPlugin/B2DPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/B3DAcceleratorPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/B3DAcceleratorPlugin/B3DAcceleratorPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/BMPReadWriterPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/BMPReadWriterPlugin/BMPReadWriterPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/BitBltPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/BitBltPlugin/BitBltPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/DSAPrims\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/DSAPrims/DSAPrims.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/DropPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/DropPlugin/DropPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/FFTPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/FFTPlugin/FFTPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/FilePlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/FilePlugin/FilePlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/FloatArrayPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/FloatArrayPlugin/FloatArrayPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/GeniePlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/GeniePlugin/GeniePlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/HostWindowPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/HostWindowPlugin/HostWindowPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/InternetConfigPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/InternetConfigPlugin/InternetConfigPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/JPEGReadWriter2Plugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/JPEGReaderPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/JPEGReaderPlugin/JPEGReaderPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/JoystickTabletPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/JoystickTabletPlugin/JoystickTabletPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/Klatt\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/Klatt/Klatt.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/LargeIntegers\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/LargeIntegers/LargeIntegers.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/MIDIPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/MIDIPlugin/MIDIPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/MacMenubarPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/MacMenubarPlugin/MacMenubarPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/Matrix2x3Plugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/Matrix2x3Plugin/Matrix2x3Plugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/MiscPrimitivePlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/MiscPrimitivePlugin/MiscPrimitivePlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/RePlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/RePlugin/RePlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/SecurityPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/SecurityPlugin/SecurityPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/SerialPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/SerialPlugin/SerialPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/SocketPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/SocketPlugin/SocketPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/SoundCodecPrims\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/SoundCodecPrims/SoundCodecPrims.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/SoundGenerationPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/SoundGenerationPlugin/SoundGenerationPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/SoundPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/SoundPlugin/SoundPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/Squeak3D\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/Squeak3D/Squeak3D.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/StarSqueakPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/StarSqueakPlugin/StarSqueakPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/SurfacePlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/UUIDPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/UUIDPlugin/UUIDPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/ZipPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/intplugins/ZipPlugin/ZipPlugin.c\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src64/vm/sqNamedPrims.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/vm/sqMemoryAccess.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/interp.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/sqPlatformSpecific.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/interp.h\\\n\n\\f0\\fs24 \\\n\n\\f1\\b\\fs22 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 159\n\\b \\\nDate: \n\\b0 Tuesday, December 1, 2009 11:20:44 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 beta 9 \\\nUpdate to vmmaker 153 plus misc fixes for 64bit\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/DropPlugin/DropPlugin.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/SerialPlugin/SerialPlugin.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/vm/sq.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/vm/sqMemoryAccess.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakVmAndImagePathAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/unix/plugins/SecurityPlugin/sqUnixSecurity.c\\\n\n\\f0\\fs24 \\\n\n\\f1\\b\\fs22 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 151\n\\b \\\nDate: \n\\b0 Monday, November 30, 2009 12:17:37 AM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 beta 7\\\nfix leak of Queue objects\\\nrework flush force update to avoid leaks of timer \\\n\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/Queue.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAndWindow.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAndWindow.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXScreenAndWindow.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXScreenAndWindow.m\\\n\n\\f0\\fs24 \\\n\n\\f1\\b\\fs22 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 150\n\\b \\\nDate: \n\\b0 Sunday, November 29, 2009 8:44:42 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 Beta 7\\\n\\\nsqMacUnixExternalPrims.m \t\\\nfix some warning msgs\\\n\\\nQueue.m\\\nQueue.h\\\nadd accessor to get queue array so we can iterate over\\\n\\\nsqSqueakMainApplication+screen.m\\\nsqSqueakMainApplication+screen.h\\\nunionScreenArea, pass rect in, versus pointer\\\n\\\nsqSqueakScreenAndWindow.h\\\nsqSqueakScreenAndWindow.m\\\n\\\nRefactor drawing, before we would draw to a drawing queue\\\nthen move items to the frame queue, then schedule a update\\\non the view to draw the items from the drawing queue\\\n\\\nThis didn't work well on os-x.  So now we draw to the drawing \\\nqueue, on a frame boundary (explicit or forced) we put the drawing queue to the frame queue, and force a draw on the main thread. \\\n\\\nQueues are retain, versus assign\\\n\\\nSqueakOSXAppDelegate.m\\\nupdate prompt\\\nFix issue with path to file to open at launch\\\n\\\nsqSqueakOSXApplication+imageReadWrite.m\\\nFix issue with path to file to open at launch\\\n\\\n\\\nsqSqueakOSXApplication.m\\\ncompiler warning msgs\\\n\\\nsqSqueakOSXDropAPI.m\\\nOops set dropInit and dropShutdown return values to 1, versus 0\\\n\\\n\\\nsqSqueakOSXFileDirectoryInterface.m\\\nUse objective-c 2 iterator\\\n\\\nsqSqueakOSXNSView.h\\\nsqSqueakOSXNSView.m\\\nAdd draw immediate logic\\\nUse objective-c 2 iterator\\\n\\\n\\\nsqSqueakOSXScreenAndWindow.m\\\nrefactor drawing\\\n\\\nSqueakUIController.m\\\ndrop some stale commented out code\\\n\\\nSqueakUIView.m\\\nrefactor drawing\\\n\\\n\\\nsqSqueakIPhoneApplication+events.m\\\nUse objective-c 2 iterator\\\n\\\nsqiPhoneScreenAndWindow.m\\\npostIoForceDisplayUpdateUsingRectangle\\\n\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/sqMacUnixExternalPrims.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/Queue.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/Queue.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakMainApplication+screen.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakMainApplication+screen.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAndWindow.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAndWindow.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+imageReadWrite.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXDropAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXFileDirectoryInterface.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXScreenAndWindow.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/SqueakUIController.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/SqueakUIView.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/sqSqueakIPhoneApplication+events.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/sqiPhoneScreenAndWindow.m\\\n\n\\f0\\fs24 \\\n\n\\f1\\b\\fs22 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 148\n\\b \\\nDate: \n\\b0 Saturday, November 28, 2009 12:21:54 AM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 pre beta 7 check in\\\nwe are adding drag and drop\\\nresize of os-x window\\\nioLoadModule logic\\\n\\\nrevisions to some funky alloc/release to autorelease patterns. \\\n\\\ndetails \\\n\\\nsqSqueakFileDirectoryAPI.m\\\n\\\ncreateFilePathFromString \\\nneeds to better manage autorelease objects\\\n\\\n sqSqueakFileDirectoryInterface.h\\\n sqSqueakFileDirectoryInterface.m\\\nrename copyResolvedAliasFiles to resolvedAliasFiles\\\nrefractor management of autoreleased objects\\\n\\\nsqSqueakScreenAndWindow.m\\\nforce first screen update to catch DOA images\\\n\\\nSqueakOSXAppDelegate.m\\\nenable resize again\\\n\\\nmacintoshosxextra.c\\\nioloadmodule to new class\\\n\\\nsqSqueakOSXApplication+events.h\\\nsqSqueakOSXApplication+events.m\\\nsqSqueakOSXDropAPI.h\\\nsqSqueakOSXDropAPI.m\\\nAdd lots of code for drag/drop, not working yet. \\\n\\\nsqSqueakOSXFileDirectoryInterface.m\\\nresolvedAliasFiles\\\nneeds to better manage autorelease objects\\\n\\\nsqSqueakOSXNSView.m\\\nsqSqueakOSXNSView.h\\\n\\\nlots added for drag/drop\\\n\\\nsqSqueakIPhoneFileDirectoryInterface.m\\\nresolvedAliasFiles.m\\\nis always in a auto-release pool, why add another. \\\n\\\n\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/sqMacUnixExternalPrims.m\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXDropAPI.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXDropAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/English.lproj/MainMenu.xib\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakFileDirectoryAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakFileDirectoryInterface.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakFileDirectoryInterface.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/macintoshosxextra.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+events.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+events.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXFileDirectoryInterface.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/Classes/sqSqueakIPhoneFileDirectoryInterface.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/sqNamedPrims.h\\\n\n\\f0\\fs24 \\\n\n\\f1\\b\\fs22 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 147\n\\b \\\nDate: \n\\b0 Friday, November 27, 2009 2:15:01 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 beta 6\\\n\\\nsqSqueakSoundCoreAudio.h\\\nsqSqueakSoundCoreAudio.m\\\n\\\nadd stop_force, StopAndDispose\\\nuse retain on queues, outputRunning is BOOL\\\nBuffer number goes from 3 to 4\\\nSet zero sound fill to 2644 bytes from 512\\\nDon't make new audioqueue if old one can be reused. \\\nDon't dispose of audioqueue on regular stop\\\nIn playSamples use MyAudioQueueOutputCallback() to populate queues if required. \\\n\\\nsqSqueakOSXSoundCoreAudio.h\\\nsqSqueakOSXSoundCoreAudio.m\\\nOverride class for os-x to ensure we don't \\\nrestart entire sound system on each squeak stop/start sound\\\n\\\nsqSUnitTester.m \\\nFix compiler warnings about double constants being returned as float\\\n\\\nsqSqueakAttributesAPI.m\\\ncast strlen to sqInt\\\n\\\nsqSqueakFileDirectoryInterface.m\\\ncast strlen to sqInt\\\nfix casting for type/creator which are 32bit things\\\n\\\nsqSqueakMainApplication\\\ninputSemaphoreINdex is a sqInt\\\n\\\nsqSqueakScreenAPI.m\\\nioShowDisplayOnWindow first pram is a unsigned char *, fix \\\nreferences, also do pointerForOops in proper place\\\n\\\n\\\nsqSqueakScreenAndWindow.h\\\nwindowIndex is a sqInt \\\n\\\nsqSqueakVmAndImagePathAPI.m\\\ncast strlen to sqInt\\\n\\\nSqueakOSXAppDelegate.m\\\nIt's a cocoa squeak 64bit vm, with 32bit image.. \\\n\\\n\\\nsqSqueakOSXSoundCoreAudio.h\\\nsqSqueakOSXSoundCoreAudio.m\\\nOS-X override to ensure we start sound system only once. \\\n\\\nsqSqueakOSXApplication+clipboard.m\\\ncast strlen to sqInt\\\n\\\nsqSqueakOSXApplication+events.h\\\nsqSqueakOSXApplication+events.m\\\nsqueak modifier & buttonState is an int\\\n\\\nsqSqueakOSXApplication.h\\\ngMaxHeapSize is a usqInt\\\nAlso setup sound system\\\n\\\n\\\nsqSqueakOSXInfoPlistInterface.h\\\nsqSqueakOSXInfoPlistInterface.m\\\nSqueakMaxHeapSize is a usqInt\\\n\\\nTSK \\\nsqMacV2Memory.c\\\nextern memory is a usqInt not a char *\\\nsome casting of void* to (char*)\\\nmemory is zero if in 64bit mode 32bit image. So fix freeMemory\\\n\\\nVarious fixes to the Objective-C plugin \\\nfor casting and for long on 64bit is 64bits wide. \\\n\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/RePlugin/configx.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/plugins\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/plugins/SoundPlugin\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/plugins/SoundPlugin/sqSqueakOSXSoundCoreAudio.h\\\n\tA /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/plugins/SoundPlugin/sqSqueakOSXSoundCoreAudio.m\\\n\tD /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/RePlugin/config.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/RePlugin/internal.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/SoundPlugin/sqSqueakSoundCoreAudio.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/SoundPlugin/sqSqueakSoundCoreAudio.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/SqueakObjectiveC/squeakSUnitTester.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakAttributesAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakFileDirectoryInterface.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakMainApplication.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAndWindow.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakVmAndImagePathAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+attributes.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+clipboard.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+events.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+events.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXInfoPlistInterface.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXInfoPlistInterface.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/sqMacV2Memory.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/interp.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/HostWindowPlugin/HostWindowPlugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/ObjectiveCPlugin/ObjectiveCPlugin.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/Squeak3D/Squeak3D.c\\\n\n\\f0\\fs24 \\\n\n\\f1\\b\\fs22 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 146\n\\b \\\nDate: \n\\b0 Thursday, November 26, 2009 7:29:49 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 HostWindowPlugin.h\\\n64bit prep work\\\nFor all usages of int make those sqInt\\\n\\\nSecurityPlugin.h\\\nSecurityPlugin.c\\\ninDisableImageWrite/ioCanWriteImage/ioCanRenameImage are sqInt\\\n\\\n\\\nsqSqueakCursorAPI.m\\\n64bit prep work\\\nFor all usages of int make those sqInt\\\nioSetCursor\\\n\\\n  sqSqueakScreenAPI.m\\\n64bit prep work\\\nFor all usages of int make those sqInt\\\nioShowDisplayOnWindow\\\n\\\nSqueakOSXAppDelegate.h\\\nFor 10.5 build add protocol NSApplicationDelegate def\\\n\\\nSqueakOSXAppDelegate.m\\\nsetInitialFirstResponder\\\n\\\nmacintoshosxextra.c\\\nFor all usages of int make those squint\\\n\\\nsqSqueakOSXNSView.m\\\n10.5 only calls insertText:  (bug)\\\nenable option/shift for esc/tab/return/cursor/page\\\n\\\nsqSqueakOSXScreenAndWindow.h\\\nFor 10.5 build add protocol NSWndowDelegate def\\\n\\\nsqMacV2Memory.c\\\nsqMemoryBase  set memory base on squeak vmmaker defs, not x64\\\n\\\n\n\\b \\\n\\\nChanges:\\\n\n\\b0 \tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/HostWindowPlugin/HostWindowPlugin.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Cross/plugins/SecurityPlugin/SecurityPlugin.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/plugins/SecurityPlugin/sqMacSecurity.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakCursorAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAPI.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/macintoshosxextra.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+attributes.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+events.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXScreenAndWindow.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/plugins/HostWindowPlugin/sqMacHostWindow.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/iPhone/sqMacV2Memory.c\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/src/vm/intplugins/ObjectiveCPlugin/ObjectiveCPlugin.c\\\n\n\\f0\\fs24 \\\n\n\\f1\\b\\fs22 File: \n\\b0 /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/SqueakPureObjc.xcodeproj/project.pbxproj\n\\b \\\nRevision: \n\\b0 145\n\\b \\\nDate: \n\\b0 Wednesday, November 25, 2009 11:49:52 PM PT\n\\b \\\nAuthor: \n\\b0 jmm\n\\b \\\n\\\n\n\\b0 beta 3\\\nUpdate powerpc compiler options. \\\n\\\nsqSqueakMainApplication+vmAndImagePath.m\\\n10.6 URL call backported to 10.5\\\n\\\nSqueakOSXAppDelegate.m\\\nmess with window open code\\\nfix window title\\\n\\\nsqSqueakOSXApplication+events.m\\\nsqSqueakOSXApplication+events.h\\\nAdd wheel mouse logic\\\n\\\nsqSqueakOSXApplication+imageReadWrite.m\\\nAdd override for setting window title\\\n\\\nsqSqueakOSXInfoPlistInterface.m\\\n10.6 URL call backported to 10.5\\\n\\\nsqSqueakOSXNSView.m\\\n10.6 cursor call backported to 10.5\\\nAdd wheel mouse logic\\\n\\\nsqSqueakOSXScreenAndWindow.h\\\nretain timer for forced flush\\\n\\\nsqSqueakOSXScreenAndWindow.m\\\ntimer was not reset correctly for 2nd+ flushes\\\nThis caused drawing problems. \n\\b \\\n\\\nChanges:\\\n\n\\b0 \tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/English.lproj/MainMenu.xib\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc-Info.plist\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.mode1v3\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/johnmci.pbxuser\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/SqueakPureObjc.xcodeproj/project.pbxproj\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakMainApplication+vmAndImagePath.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakScreenAndWindow.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/SqueakOSXAppDelegate.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+events.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+events.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXApplication+imageReadWrite.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXInfoPlistInterface.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXNSView.m\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXScreenAndWindow.h\\\n\tM /SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhone/platforms/Mac OSObjC/vm/OSX/sqSqueakOSXScreenAndWindow.m\n\\f0\\fs24 \\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\ql\\qnatural\n\\cf0 \\\n}"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/Queue.h",
    "content": "/*\n\nFile: Queue.h\n\nAbstract: Interface file for the Queue class. This class makes use\nof the NSMutableArray to define and maintain a standard queue data\nstructure to hold Cocoa objects. Objects can be added & removed from the\nqueue as desired and their order at insertion time is maintained.\n\nVersion: 1.0\n\nDisclaimer: IMPORTANT:  This Apple software is supplied to you by Apple\nComputer, Inc. (\"Apple\") in consideration of your agreement to the\nfollowing terms, and your use, installation, modification or\nredistribution of this Apple software constitutes acceptance of these\nterms.  If you do not agree with these terms, please do not use,\ninstall, modify or redistribute this Apple software.\n\nIn consideration of your agreement to abide by the following terms, and\nsubject to these terms, Apple grants you a personal, non-exclusive\nlicense, under Apple's copyrights in this original Apple software (the\n\"Apple Software\"), to use, reproduce, modify and redistribute the Apple\nSoftware, with or without modifications, in source and/or binary forms;\nprovided that if you redistribute the Apple Software in its entirety and\nwithout modifications, you must retain this notice and the following\ntext and disclaimers in all such redistributions of the Apple Software. \nNeither the name, trademarks, service marks or logos of Apple Computer,\nInc. may be used to endorse or promote products derived from the Apple\nSoftware without specific prior written permission from Apple.  Except\nas expressly stated in this notice, no other rights or licenses, express\nor implied, are granted by Apple herein, including but not limited to\nany patent rights that may be infringed by your derivative works or by\nother works in which the Apple Software may be incorporated.\n\nThe Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE\nMAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION\nTHE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS\nFOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND\nOPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.\n\nIN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL\nOR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,\nMODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED\nAND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),\nSTRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n\nCopyright (C) 2007 Apple Inc. All Rights Reserved.\n\n*/\n\n\n@interface Queue : NSObject \n{\n\tNSMutableArray *mItemArray;\n}\n-(NSUInteger) pendingElements;\n-(id)returnAndRemoveOldest;\n-(id)returnOldest;\n-(void)addItem:(id)anItem;\n-(NSArray *) elements;\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/Queue.m",
    "content": "\n/*\n\nFile: Queue.m\n\nAbstract: Implementation file for the Queue class. This class makes use\nof the NSMutableArray to define and maintain a standard queue data\nstructure to hold Cocoa objects. Objects can be added & removed from the\nqueue as desired and their order at insertion time is maintained.\n\nVersion: 1.0\n\nDisclaimer: IMPORTANT:  This Apple software is supplied to you by Apple\nComputer, Inc. (\"Apple\") in consideration of your agreement to the\nfollowing terms, and your use, installation, modification or\nredistribution of this Apple software constitutes acceptance of these\nterms.  If you do not agree with these terms, please do not use,\ninstall, modify or redistribute this Apple software.\n\nIn consideration of your agreement to abide by the following terms, and\nsubject to these terms, Apple grants you a personal, non-exclusive\nlicense, under Apple's copyrights in this original Apple software (the\n\"Apple Software\"), to use, reproduce, modify and redistribute the Apple\nSoftware, with or without modifications, in source and/or binary forms;\nprovided that if you redistribute the Apple Software in its entirety and\nwithout modifications, you must retain this notice and the following\ntext and disclaimers in all such redistributions of the Apple Software. \nNeither the name, trademarks, service marks or logos of Apple Computer,\nInc. may be used to endorse or promote products derived from the Apple\nSoftware without specific prior written permission from Apple.  Except\nas expressly stated in this notice, no other rights or licenses, express\nor implied, are granted by Apple herein, including but not limited to\nany patent rights that may be infringed by your derivative works or by\nother works in which the Apple Software may be incorporated.\n\nThe Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE\nMAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION\nTHE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS\nFOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND\nOPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.\n\nIN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL\nOR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,\nMODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED\nAND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),\nSTRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n\nCopyright (C) 2007 Apple Inc. All Rights Reserved.\n\n*/\n\n#import \"Queue.h\"\n\n\n@implementation Queue\n\n// Initialize a empty mutable array for queue items\n// which we can fill\n- (id) init\n{\n\tself = [super init];\n\t{\n\t\tmItemArray = [[NSMutableArray alloc] initWithCapacity :10];\n\t}\n\t\n\treturn self;\n}\n\n// Returns (and removes) the oldest item in the queue\n-(id)returnAndRemoveOldest\n{\n\tid anObject = nil;\n\t@synchronized(self) {\t\n\n\tanObject = [mItemArray lastObject];\n\tif (anObject)\n\t{\n\t\t[anObject retain];\n\t\t[mItemArray removeLastObject];\t\t\n\t}\n\t\t}\n\treturn anObject;\t\n}\n\n// Returns the oldest item in the queue or nil\n-(id)returnOldest\n{\n\tid anObject = nil;\n\t@synchronized(self) {\t\t\n\t\n\tanObject = [mItemArray lastObject];\n\t}\n\treturn anObject;\t\n}\n\n\n// Adds the specified item to the queue\n-(void)addItem:(id)anItem\n{\n\t@synchronized(self) {\t\n\t\t[mItemArray insertObject:anItem atIndex:0];\n\t}\n}\n\n-(NSUInteger) pendingElements {\n\treturn [mItemArray count];\n}\n\n- (NSArray *) elements {\n\treturn mItemArray;\n}\n\n- (void) dealloc\n{\n\t[mItemArray release];\n\t\n\t[super dealloc];\n}\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqMacV2Time.c",
    "content": "/*\n *  sqMacV2Time.c\n *  \n *\n *  Created by John M McIntosh on 5/12/08.\n *\n */\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n *   Small parts of this code is \n *   Copyright (C) 1996-2007 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n*/\n//\n\n#include \"sq.h\"\n#include \"sqDummyaio.h\"\n\n#include \"sqMacV2Time.h\"\n#include <sys/types.h>\n#include <sys/time.h>\n\nstatic struct timeval\t startUpTime;\n\n#if STACKVM\n/* all three methods have their roots in the original unix port from the late 90's */\n/*\n * In the Cog VMs time management is in platforms/unix/vm/sqUnixHeartbeat.c.\n */\n/*\n * Compute the time via the old method for sanity checking purposes.\n */\nint ioOldMSecs() {\n\tstruct timeval now;\n\tgettimeofday(&now, 0);\n\tif ((now.tv_usec-= startUpTime.tv_usec) < 0) {\n\t\tnow.tv_usec+= 1000000;\n\t\tnow.tv_sec-= 1;\n\t}\n\tnow.tv_sec-= startUpTime.tv_sec;\n\treturn (now.tv_usec / 1000 + now.tv_sec * 1000);\n}\nvoid SetUpTimers(void)\n{\n\textern void ioInitTime(void);\n\t\n\t/* set up the backwardcompatibility micro/millisecond clock */\n    gettimeofday(&startUpTime, 0);\n\t/* setup the spiffy new 64-bit microsecond clock. */\n\tioInitTime();\n}\n#else /* STACKVM */\nvoid SetUpTimers(void)\n{\n\t/* set up the micro/millisecond clock */\n\tgettimeofday(&startUpTime, 0);\n}\n\nsqLong ioMicroSeconds(void)\n{\n\t//API Documented\n\tstruct timeval now;\n\tsqLong theTimeIs;\n\t\n\tgettimeofday(&now, 0);\n\tif ((now.tv_usec-= startUpTime.tv_usec) < 0) {\n\t\tnow.tv_usec+= 1000000;\n\t\tnow.tv_sec-= 1;\n\t}\n\tnow.tv_sec-= startUpTime.tv_sec;\n\ttheTimeIs = now.tv_usec;\n\ttheTimeIs = theTimeIs + now.tv_sec * 1000000;\n\treturn theTimeIs;\n}\n\nsqInt ioMicroMSecs(void)\n{\n\t//API Documented\n\tstruct timeval now;\n\tsqInt theTimeIs;\n\t\n\tgettimeofday(&now, 0);\n\tif ((now.tv_usec-= startUpTime.tv_usec) < 0) {\n\t\tnow.tv_usec+= 1000000;\n\t\tnow.tv_sec-= 1;\n\t}\n\tnow.tv_sec-= startUpTime.tv_sec;\n\ttheTimeIs = ((now.tv_usec / 1000 + now.tv_sec * 1000) & MillisecondClockMask);\n\treturn theTimeIs;\n}\n\nsqInt ioMSecs(void) {\n\t//API Documented\n\treturn ioMicroMSecs();\n}\n\nsqInt ioSeconds(void) {\n\t//API Documented\n\ttime_t unixTime;\n\tsqInt\ttheSecondsAre; \n\t\n\tunixTime = time(0);\n\tunixTime += localtime(&unixTime)->tm_gmtoff;\n\t/* Squeak epoch is Jan 1, 1901.  Unix epoch is Jan 1, 1970: 17 leap years\n\t and 52 non-leap years later than Squeak. */\n\ttheSecondsAre = unixTime + ((52*365UL + 17*366UL) * 24*60*60UL);\n\treturn theSecondsAre;\n}\n\nsqInt ioUtcWithOffset(sqLong *microSeconds, int *offset)\n{\n\tstruct timeval timeval;\n\tif (gettimeofday(&timeval, NULL) == -1) return -1;\n\ttime_t seconds = timeval.tv_sec;\n\tsuseconds_t usec = timeval.tv_usec;\n\t*microSeconds = seconds * 1000000 + usec;\n\t*offset = localtime(&seconds)->tm_gmtoff;\n\treturn 0;\n}\n\n\nsqInt ioRelinquishProcessorForMicroseconds(sqInt microSeconds) {\n\t//API Documented\n\t/* This operation is platform dependent. \t */\n  #pragma unused(microSeconds)\n  extern sqInt setInterruptCheckCounter(sqInt value);  //This is a VM Callback\n\n# if ROAR_VM\n  aioSleep(0);\n  setInterruptCheckCounter(0);\n# else\n\tsqInt\t   realTimeToWait,now,next;\n\textern sqInt getNextWakeupTick(void);\t\t\t\t//This is a VM Callback\n\n\tsetInterruptCheckCounter(0);\n\tnow = ioMSecs();\n\tnext = getNextWakeupTick();\n\t\n\t/*BUG??? what if clock wraps? */\n\t\n\tif (next <= now)\n\t\tif (next == 0)\n\t\t\t\trealTimeToWait = 16;\n\t\t\telse {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\telse\n\t\t\trealTimeToWait = next - now; \n\n  aioSleep((int) realTimeToWait*1000);\n# endif // !ROAR_VM\n  \n\treturn 0;\n}\n#endif /* STACKVM */\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqMacV2Time.h",
    "content": "/*\n *  sqMacV2Time.h\n *  \n *\n *  Created by John M McIntosh on 5/12/08.\n *\n */\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n*/\n\nvoid SetUpTimers(void);"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakAppDelegate.h",
    "content": "//\n//  sqSqueakAppDelegate.h\n//  \n//\n//  Created by John M McIntosh on 6/14/08.\n//\n//\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n*/\n// 10/01/08 add <UIAccelerometerDelegate>\n//\n\n#import <Foundation/Foundation.h>\n#import \"sqSqueakMainApplication.h\"\n\n@interface sqSqueakAppDelegate : NSObject {\n\tsqSqueakMainApplication *squeakApplication;\n}\n@property (nonatomic,retain) sqSqueakMainApplication *squeakApplication;\n\n- (void) makeMainWindowOnMainThread ;\n- (void) makeMainWindow;\n- (id) createPossibleWindow;\n- (NSTimeInterval) squeakUIFlushPrimaryDeferNMilliseconds;\n- (sqSqueakMainApplication *) makeApplicationInstance;\n- (void) workerThreadStart;\n- (void) singleThreadStart;\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakAppDelegate.m",
    "content": "//\n//  sqSqueakAppDelegate.m\n//  \n//\n//  Created by John M McIntosh on 6/14/08.\n//\n//\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n*/\n//\n\n#import \"sqSqueakAppDelegate.h\"\n#import \"sqMacHostWindow.h\"\n\n@implementation sqSqueakAppDelegate\n@synthesize squeakApplication;\n\n- (void) makeMainWindow {\n\t\n\t/*Beware creating a main window must be done on main thread it will not work from this interpreter squeak thread */\n\t\n\tsqInt width,height;\n\twindowDescriptorBlock *windowBlock;\n\t\n\tid createdWindow = [self createPossibleWindow];\n\t\n\textern sqInt getSavedWindowSize(void); //This is VM Callback\n\textern sqInt setSavedWindowSize(sqInt value); //This is VM Callback\n\t\n\t/* get old window size */\n\twidth  = ((unsigned) getSavedWindowSize()) >> 16;\n\theight = getSavedWindowSize() & 0xFFFF;\n\twindowBlock = AddWindowBlock();\n\twindowBlock-> handle = createdWindow;\n\twindowBlock->context = nil;\n\twindowBlock->updateArea = CGRectZero;\n\twidth  = (usqInt) ioScreenSize() >> 16;\n\theight = ioScreenSize() & 0xFFFF;\n\t\n\tsetSavedWindowSize( (width << 16) |(height & 0xFFFF));\n\twindowBlock->width = width;\n\twindowBlock->height = height; \t\n\textern sqInt getFullScreenFlag(void);\n\tioSetFullScreen(getFullScreenFlag());\n\n}\n\n- (sqSqueakMainApplication *) makeApplicationInstance {\n\treturn nil;\n}\n\n- (NSTimeInterval) squeakUIFlushPrimaryDeferNMilliseconds {\n\treturn 0.0333f;\n}\n\n- (void) makeMainWindowOnMainThread {};\n\n- (id) createPossibleWindow { return NULL;};\n\n- (void) workerThreadStart {\n\t// Run the squeak process in a worker thread\n\tNSThread* myThread = [[NSThread alloc] initWithTarget: self.squeakApplication\n\t\t\t\t\t\t\t\t\t\t\t\t selector: @selector(runSqueak)\n\t\t\t\t\t\t\t\t\t\t\t\t   object:nil];\n#if COGVM\n\t[myThread setStackSize: [myThread stackSize]*4];\n#endif\n\t\n\t[myThread start];\n}\n\n- (void) singleThreadStart {\n\t/* This the carbon logic model \n\t described by http://developer.apple.com/qa/qa2001/qa1061.html */\n\t\n\t[[NSRunLoop mainRunLoop] performSelector: @selector(runSqueak) \n\t\t\t\t\t\t\t\t\t  target: self.squeakApplication\n\t\t\t\t\t\t\t\t\targument: nil \n\t\t\t\t\t\t\t\t\t   order: 1 \n\t\t\t\t\t\t\t\t\t   modes: [NSArray arrayWithObject: NSDefaultRunLoopMode]];\t\t\n}\n\n- (void)dealloc {\n\t[squeakApplication release];\n\t[super dealloc];\n}\n\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakAttributesAPI.h",
    "content": "//\n//  sqSqueakAttributesAPI.h\n//  \n//\n//  Created by John M McIntosh on 6/14/08.\n//\n//\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n//\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakAttributesAPI.m",
    "content": "//\n//  sqSqueakAttributesAPI.m\n//  \n//\n//  Created by John M McIntosh on 6/14/08.\n//\n//\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n//\n\n#import \"sqSqueakAttributesAPI.h\"\n#import \"sq.h\"\n#import \"sqSqueakAppDelegate.h\"\n#import \"sqSqueakMainApplication+attributes.h\"\n\nextern sqSqueakAppDelegate *gDelegateApp;\n\nsqInt attributeSize(sqInt indexNumber)  {\n\t//API Documented\n\treturn  (sqInt) strlen([gDelegateApp.squeakApplication getAttribute: indexNumber]);\n}\n\nsqInt getAttributeIntoLength(sqInt indexNumber, sqInt byteArrayIndex, sqInt length)  {\n\t//API Documented\n\t[gDelegateApp.squeakApplication getAttribute: indexNumber into: pointerForIndex_xxx_dmu((usqInt) byteArrayIndex) length: length];\n\treturn 0;\n}"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakCursorAPI.h",
    "content": "//\n//  sqSqueakCursorAPI.h\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-14.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakCursorAPI.m",
    "content": "//\n//  sqSqueakCursorAPI.m\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-14.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import \"sqSqueakCursorAPI.h\"\n#import \"sqSqueakAppDelegate.h\"\n#import \"sqSqueakMainApplication+cursor.h\"\n#import \"sqSqueakOSXApplication+cursor.h\"\n\nextern sqSqueakAppDelegate *gDelegateApp;\n\nsqInt ioSetCursor(sqInt cursorBitsIndex, sqInt offsetX, sqInt offsetY) {\n\t/* Old version; forward to new version. */\n\t[gDelegateApp.squeakApplication  setCursor: cursorBitsIndex\n\t\t\t\t\t\t\t\t\t  withMask: 0\n\t\t\t\t\t\t\t\t\t   offsetX: offsetX offsetY: offsetY];\n\treturn 0;\n}\n\nsqInt ioSetCursorWithMask( sqInt cursorBitsIndex, sqInt cursorMaskIndex, sqInt offsetX, sqInt offsetY) \n{\t\n\t[gDelegateApp.squeakApplication  setCursor: cursorBitsIndex\n\t\t\t\t\t\t\t\t\t  withMask: cursorMaskIndex\n\t\t\t\t\t\t\t\t\t   offsetX: offsetX offsetY: offsetY];\n\treturn 0;\n}\n\nsqInt ioSetCursorARGB(sqInt cursorBitsIndex, sqInt extentX, sqInt extentY, sqInt offsetX, sqInt offsetY) {\n\treturn [(sqSqueakOSXApplication *) gDelegateApp.squeakApplication ioSetCursorARGB: cursorBitsIndex extentX: extentX extentY: extentY\n\t\t\t\t\t\t\t\t\t\t\t\t   offsetX: offsetX offsetY: offsetY];\n\n}"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakEventsAPI.h",
    "content": "//\n//  sqSqueakEventsAPI.h\n//  \n//\n//  Created by John M McIntosh on 6/14/08.\n//\n//\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n//\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakEventsAPI.m",
    "content": "//\n//  sqSqueakEventsAPI.m\n//  \n//\n//  Created by John M McIntosh on 6/14/08.\n//\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n//\n#import \"sqSqueakAppDelegate.h\"\n#import \"sqSqueakEventsAPI.h\"\n#import \"sqSqueakMainApplication+events.h\"\n#import \"sqSqueakScreenAndWindow.h\"\n#import \"sqaio.h\"\n\nextern sqSqueakAppDelegate *gDelegateApp;\nextern struct\tVirtualMachine* interpreterProxy;\nextern BOOL gQuitNowRightNow;\nextern sqSqueakScreenAndWindow *getMainWindowDelegate();\n\nsqInt ioProcessEvents(void) {\n\t//API Documented\n\t\n\taioPoll(0);\t\t\n\t\n\tif ([getMainWindowDelegate() forceUpdateFlush]) {\n\t\t[getMainWindowDelegate() ioForceDisplayUpdate];\n\t}\n\n\tif (interpreterProxy->methodPrimitiveIndex() != 0) {\n\t\t[gDelegateApp.squeakApplication pumpRunLoop];\n\t}\n\t\n\tif (gQuitNowRightNow) {\n\t\tioExit();  //This might not return, might call exittoshell\n\t}\n\t\n\treturn 0;\n}\n\nsqInt ioSetInputSemaphore(sqInt semaIndex) {\n\t//API Documented\n\t\n\tgDelegateApp.squeakApplication.inputSemaphoreIndex = semaIndex;\n\treturn 0;\n}\n\nsqInt ioGetNextEvent( sqInputEvent *evt) {\n\t//API Documented\n\t\n\t[gDelegateApp.squeakApplication ioGetNextEvent: evt];\n/*\tif (evt->type != 0) {\n\t\tNSLog(@\"evt.type %i keyboard pc %i cc %i uc %i m %i\",evt->type,((sqKeyboardEvent *)evt)->pressCode,((sqKeyboardEvent *) evt)->charCode,((sqKeyboardEvent *) evt)->utf32Code,((sqKeyboardEvent *) evt)->modifiers);\n\t} */\n\treturn 0;\n}"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakFileDirectoryAPI.h",
    "content": "//\n//  sqSqueakFileDirectoryAPI.h\n//  \n//\n//  Created by John M McIntosh on 6/14/08.\n//\n//\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n*/\n//\n\n#import <Foundation/Foundation.h>\n#import \"sq.h\"\nNSString* createFilePathFromString(char * aFilenameString, \n\t\t\t\t\t\t\t\t   sqInt filenameLength, sqInt resolveAlias);"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakFileDirectoryAPI.m",
    "content": "//\n//  sqSqueakFileDirectoryAPI.m\n//  \n//\n//  Created by John M McIntosh on 6/14/08.\n//\n//\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n\nV1.05b1 Add auto release pool to wrap getting directory information\nV1.05b1 fix issue with sqGetFilenameFromString when getting target of symbolic link ensure we make a copy\n */\n//\n\n#import \"sqSqueakFileDirectoryAPI.h\"\n#import \"sqSqueakAppDelegate.h\"\n#import \"sq.h\"\n#import \"FilePlugin.h\"\n\n#define DELIMITERInt '/'\n\nextern sqSqueakAppDelegate *gDelegateApp;\n\nsqInt dir_GetMacFileTypeAndCreator(char *filename, sqInt filenameSize, char *fType, char *fCreator){\n\t//API Documented\n\t/* filename is file name\n\t filenameSize is size of file name\n\t fType and fCreator is type and creator codes (4 bytes preallocated)\n\t */\n\tNSAutoreleasePool * pool = [NSAutoreleasePool new];\n\tsqInt status = [gDelegateApp.squeakApplication.fileDirectoryLogic dir_GetMacFileTypeAndCreator: filename\n\t\t\tfileNameSize: filenameSize\n\t\t\tfType: fType\n\t\t\tfCreator: fCreator];\n\t[pool drain];\n\treturn status;\n}\n\nsqInt dir_SetMacFileTypeAndCreator(char *filename, sqInt filenameSize, char *fType, char *fCreator) {\n\t//API Documented\n\t/* filename is file name\n\t filenameSize is size of file name\n\t fType and fCreator is type and creator codes (4 bytes)\n\t */\n\tNSAutoreleasePool * pool = [NSAutoreleasePool new];\n\tsqInt status = [gDelegateApp.squeakApplication.fileDirectoryLogic dir_SetMacFileTypeAndCreator: filename\n\t\t\tfileNameSize: filenameSize\n\t\t\tfType: fType\n\t\t\tfCreator: fCreator];\n\t[pool drain];\n\treturn status;\n}\n\nsqInt dir_Delimitor(void)\n{\n\t//API Documented\n\treturn DELIMITERInt;\n}\n\nsqInt dir_Lookup(char *pathString, sqInt pathStringLength, sqInt index,\n/* outputs: */  char *name, sqInt *nameLength, sqInt *creationDate, sqInt *modificationDate,\n\t\t\t\t sqInt *isDirectory, squeakFileOffsetType *sizeIfFile)\n{\n\t//API Documented\n\t/* Lookup the index-th entry of the directory with the given path, starting\n\t at the root of the file system. Set the name, name length, creation date,\n\t creation time, directory flag, and file size (if the entry is a file).\n\t Return:\t0 \tif a entry is found at the given index\n\t 1\tif the directory has fewer than index entries\n\t 2\tif the given path has bad syntax or does not reach a directory\n\t */\n\t\n\t/*Implementation notes\n\t if pathStringLength = 0 then we use the current working directory\n\t if pathStringLength > 0 then we resolve the pathString and alias */\n\tNSAutoreleasePool * pool = [NSAutoreleasePool new];\n\n\tsqInt status =\n\t\t\t[gDelegateApp.squeakApplication.fileDirectoryLogic dir_Lookup: pathString \n\t\t\tlength: pathStringLength \n\t\t\tindex:  index \n\t\t\tname:  name\n\t\t\tlength: nameLength \n\t\t\tcreationDate: creationDate \n\t\t\tmodificationDate: modificationDate\n\t\t\tisDirectory: isDirectory \n\t\t\tsizeIfFile: sizeIfFile];\n\t[pool drain];\n\treturn status;\n}\n\nsqInt dir_EntryLookup(char *pathString, sqInt pathStringLength, char* nameString, sqInt nameStringLength,\n/* outputs: */  char *name, sqInt *nameLength, sqInt *creationDate, sqInt *modificationDate,\n\t\t\t\t\t  sqInt *isDirectory, squeakFileOffsetType *sizeIfFile)\n{\n\tNSAutoreleasePool * pool = [NSAutoreleasePool new];\n\t\n\tsqInt status =\n\t[gDelegateApp.squeakApplication.fileDirectoryLogic dir_EntryLookup: pathString \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t   length: pathStringLength \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturnName: nameString\n\t\t\t\t\t\t\t\t\t\t\t\t\t  returnNameLength: nameStringLength\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t name:  name\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t   length: nameLength \n\t\t\t\t\t\t\t\t\t\t\t\t\t creationDate: creationDate \n\t\t\t\t\t\t\t\t\t\t\t\t modificationDate: modificationDate\n\t\t\t\t\t\t\t\t\t\t\t\t\t  isDirectory: isDirectory \n\t\t\t\t\t\t\t\t\t\t\t\t\t   sizeIfFile: sizeIfFile];\n\t[pool drain];\n\treturn status;\n}\n\nsqInt dir_Create(char *pathString, sqInt pathStringLength){\n\t//API Documented\n\tNSAutoreleasePool * pool = [NSAutoreleasePool new];\n\tsqInt status = [gDelegateApp.squeakApplication.fileDirectoryLogic\n\t\t\tdir_Create: pathString \n\t\t\tlength: pathStringLength];\n\t[pool drain];\n\treturn status;\n}\n\nsqInt dir_Delete(char *pathString, sqInt pathStringLength){\n\tNSAutoreleasePool * pool = [NSAutoreleasePool new];\n\tsqInt status = [gDelegateApp.squeakApplication.fileDirectoryLogic\n\t\t\tdir_Delete: pathString \n\t\t\tlength: pathStringLength];\n\t[pool drain];\n\treturn status;\n}\n\nNSString* createFilePathFromString(char * aFilenameString, \n\t\t\t\t\t\t\t\t\tsqInt filenameLength, sqInt resolveAlias) {\n\t\n\tNSAutoreleasePool * pool = [NSAutoreleasePool new];\n\tNSString * filePath = [[[NSString alloc] initWithBytes: aFilenameString length: (NSUInteger) filenameLength encoding: NSUTF8StringEncoding] autorelease];\n\tif (!filePath) {\n\t\t[pool drain];\n\t\treturn NULL;\n\t}\n\t\n\tif (resolveAlias) {\n\t\tfilePath = [gDelegateApp.squeakApplication.fileDirectoryLogic resolvedAliasFiles: filePath];\n\t} else {\n\t\tNSString *owningDirectoryPath = [filePath stringByDeletingLastPathComponent];\n\t\tNSString *newFilePath = [gDelegateApp.squeakApplication.fileDirectoryLogic resolvedAliasFiles: owningDirectoryPath];\n\t\tfilePath = [newFilePath stringByAppendingPathComponent: [filePath lastPathComponent]];\n\t}\n\t[filePath retain];\n\t[pool drain];\n\treturn filePath;\n}\n\nsqInt sqGetFilenameFromString(char * aCharBuffer, char * aFilenameString, \n\t\t\t\t\t\t\t  sqInt filenameLength, sqInt resolveAlias) {\n\t//API Documented\n\tBOOL ok;\n\t\n\tif (!aCharBuffer || !aFilenameString)\n\t\treturn 0;\n\n\tNSString *filePath = createFilePathFromString(aFilenameString,filenameLength,resolveAlias);\n\t\n\tok = [filePath getFileSystemRepresentation: aCharBuffer maxLength: 1000];  \n\t//1000 is coded by callers, really should pass in, but historical issue, this also includes null byte which is accounted for by maxLength\n\t//Obviously this is a problem that lets a caller do a buffer overflow? \n\t\n\t[filePath release];\n\treturn 0;\n}\n\n/* This routine is exposed but no-one seems to call it from the VM\n in the past the macintosh VM used this to set the working directory based\n on where the VM was opened from, but it seems now post os-x no-one uses it */\n\nsqInt dir_PathToWorkingDir(char *pathName, sqInt pathNameMax){\n\t//API Documented\n\treturn 0;\n}"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakFileDirectoryInterface.h",
    "content": "//\n//  sqSqueakFileDirectoryInterface.h\n//  \n//\n//  Created by John M McIntosh on 6/14/08.\n//\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n*/\n//\n\n#import <Foundation/Foundation.h>\n#import \"sq.h\"\n\n@interface sqSqueakFileDirectoryInterface : NSObject {\n\tNSString* lastPathForDirLookup;\n\tNSInteger lastIndexForDirLookup;\n\tNSArray * directoryContentsForDirLookup;\t\n}\n- (BOOL) setWorkingDirectory;\n- (sqInt) dir_EntryLookup: (const char *) pathString \n\t\t\t  length: (sqInt) pathStringLength \n\t\t  returnName: (char *) nameString\n\treturnNameLength: (sqInt) nameStringLength\t\n\t\t\t\tname: (char *) name\n\t\t\t  length: (sqInt *) nameLength \n\t\tcreationDate: (sqInt *) creationDate \n\tmodificationDate: (sqInt *) modificationDate\n\t\t isDirectory: (sqInt *) isDirectory \n\t\t  sizeIfFile: (squeakFileOffsetType *) sizeIfFile;\n\n- (sqInt) dir_Lookup: (const char *) pathString \n\t\t\t  length: (sqInt) pathStringLength \n\t\t\t   index: (sqInt) index \n\t\t\t\tname: (char *) name\n\t\t\t  length: (sqInt *) nameLength \n\t\tcreationDate: (sqInt *) creationDate \n\tmodificationDate: (sqInt *) modificationDate\n\t\t isDirectory: (sqInt *) isDirectory \n\t\t  sizeIfFile: (squeakFileOffsetType *) sizeIfFile;\n- (sqInt) dir_Create: (char *) pathString\n\t\t\t  length: (sqInt) pathStringLength;\n- (sqInt) dir_Delete: (char *) pathString\n\t\t\t  length: (sqInt) pathStringLength;\n- (sqInt) dir_GetMacFileTypeAndCreator: (char *) filename\n\t\t\t\t\t\t  fileNameSize: (sqInt) filenameSize\n\t\t\t\t\t\t\t\t fType: (char *) fType\n\t\t\t\t\t\t\t  fCreator: (char *) fCreator;\n- (sqInt) dir_SetMacFileTypeAndCreator: (char *) filename\n\t\t\t\t\t\t  fileNameSize: (sqInt) filenameSize\n\t\t\t\t\t\t\t\t fType: (char *) fType\n\t\t\t\t\t\t\t  fCreator: (char *) fCreator;\n- (NSString *) resolvedAliasFiles: (NSString *) filePath;\n\n@property (nonatomic,retain) NSString* lastPathForDirLookup;\n@property (nonatomic,assign) NSInteger lastIndexForDirLookup;\n@property (nonatomic,retain) NSArray * directoryContentsForDirLookup;\n\n@end\n\nsqInt convertToSqueakTime(NSDate *givenDate);\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakFileDirectoryInterface.m",
    "content": "//\n//  sqSqueakFileDirectoryInterface.m\n//  \n//\n//  Created by John M McIntosh on 6/14/08.\n//\n//\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n*/\n//\n\n#import \"sqSqueakFileDirectoryInterface.h\"\n#import \"sqSqueakFileDirectoryAPI.h\"\n\n@implementation sqSqueakFileDirectoryInterface\n@synthesize lastPathForDirLookup;\n@synthesize lastIndexForDirLookup;\n@synthesize directoryContentsForDirLookup;\n\n- (BOOL) setWorkingDirectory {\n\t//\t\"changeCurrentDirectoryPath:(\"\n\treturn YES;\n}\n\n- (sqInt) dir_EntryLookup: (const char *) pathString \n\t\t\t  length: (sqInt) pathStringLength \n\t\t  returnName: (char *) nameString\n\treturnNameLength: (sqInt) nameStringLength\t\n\t\t\t\tname: (char *) name\n\t\t\t  length: (sqInt *) nameLength \n\t\tcreationDate: (sqInt *) creationDate \n\tmodificationDate: (sqInt *) modificationDate\n\t\t isDirectory: (sqInt *) isDirectory \n\t\t  sizeIfFile: (squeakFileOffsetType *) sizeIfFile {\n#warning this is not implementation\n\treturn 0;\n}\n\n\n- (sqInt) dir_Lookup: (const char *) pathString \n\t\t\t  length: (sqInt) pathStringLength \n\t\t\t   index: (sqInt) index \n\t\t\t\tname: (char *) name\n\t\t\t  length: (sqInt *) nameLength \n\t\tcreationDate: (sqInt *) creationDate \n\tmodificationDate: (sqInt *) modificationDate\n\t\t isDirectory: (sqInt *) isDirectory \n\t\t  sizeIfFile: (squeakFileOffsetType *) sizeIfFile {\n\t\n\tNSFileManager * fileMgr = [NSFileManager defaultManager];\n\tNSString*\tdirectoryPath = NULL;\n\tNSString*\tfilePath;\n\tNSString*\tfileName;\n\tNSDictionary * fileAttributes;\n\tBOOL\t\treadDirectory = false;\n\t\n\t/*** Constants ***/\n\t\n#define ENTRY_FOUND     0\n#define NO_MORE_ENTRIES 1\n#define BAD_PATH        2\n\t\n\t\n\t/* default return values */\n\t*name             = 0;\n\t*nameLength       = 0;\n\t*creationDate     = 0;\n\t*modificationDate = 0;\n\t*isDirectory      = false;\n\t*sizeIfFile       = 0;\n\n\tif (pathStringLength <= 0) {\n\t\tself.lastPathForDirLookup =[fileMgr currentDirectoryPath];\n\t}\n\t\n\tif (pathStringLength > 0) \n\t\tdirectoryPath = [[[NSString alloc] initWithBytes: pathString length: (NSUInteger) pathStringLength encoding: NSUTF8StringEncoding] autorelease];\n\tif (directoryPath == NULL)\n\t\treturn BAD_PATH;\n\t\n\tif ([self.lastPathForDirLookup isEqualToString: directoryPath]) {\n\t\tif (lastIndexForDirLookup >= index)\n\t\t\treadDirectory = true;\n\t} else {\n\t\treadDirectory = true;\n\t}\n\t\n\tif (readDirectory) {\n\t\tself.directoryContentsForDirLookup = [fileMgr contentsOfDirectoryAtPath: directoryPath error: NULL];\n\t\t\n\t\tif (!directoryContentsForDirLookup) {\n\t\t\tNSString *newFilePath = [self resolvedAliasFiles: directoryPath];\n\t\t\tself.directoryContentsForDirLookup = [fileMgr contentsOfDirectoryAtPath: newFilePath error: NULL];\n\t\t\tif (!directoryContentsForDirLookup) {\n\t\t\t\treturn BAD_PATH;\n\t\t\t} else {\n\t\t\t\tself.lastPathForDirLookup = directoryPath;\n\t\t\t}\n\t\t} else {\n\t\t\tself.lastPathForDirLookup = directoryPath;\n\t\t}\n\t}\n\t\t\n\tlastIndexForDirLookup = index;  //Note index is 1 based, but objc is 0 based\n\t\n\tif (index < 1 || (NSUInteger) index > [directoryContentsForDirLookup count])\n\t\treturn NO_MORE_ENTRIES;\n\t\n\tfilePath = [ directoryContentsForDirLookup objectAtIndex: (NSUInteger) (index-1)];\n\tfilePath = [[ lastPathForDirLookup stringByAppendingString: @\"/\"] stringByAppendingString: filePath] ;\n\tfileName = [[filePath lastPathComponent] precomposedStringWithCanonicalMapping];\n\tstrlcpy(name,[fileName UTF8String],256);\n\t*nameLength = (sqInt) strlen(name);\n\n\t//This minics the unix port where we resolve the file name, but the symbolic file lookup can fail. \n\t//The unix port says, oh file was there, but stat/lstat fails, so mmm kinda continue\n\t//However to deal with Finder Aliases we have to be more clever.\n\t\n\tNSError *error;\n\tNSString *fileType;\n\tNSString *newFilePath = [self resolvedAliasFiles: filePath];\n\t\n\tfileAttributes = [fileMgr attributesOfItemAtPath: filePath error: &error];  \n\n\tif ([filePath isEqualToString: newFilePath]) {\n\t\tif (!fileAttributes) {\n\t\t\treturn ENTRY_FOUND;\n\t\t}\n\t\tfileType = [fileAttributes objectForKey: NSFileType];\n\t\t*isDirectory = [fileType isEqualToString: NSFileTypeDirectory] ? 1 : 0;\n\t} else {\n\t\tNSDictionary *fileAttributesPossibleAlias = [fileMgr attributesOfItemAtPath: newFilePath error: &error];  // do symbolic link\n\t\tfileAttributes = fileAttributesPossibleAlias;\n\t\t\n\t\tfileType = [fileAttributesPossibleAlias objectForKey: NSFileType];\n\t\t*isDirectory = [fileType isEqualToString: NSFileTypeDirectory] ? 1 : 0;\n\t}\n\n\t*creationDate = convertToSqueakTime([fileAttributes objectForKey: NSFileCreationDate ]);\n\t*modificationDate = convertToSqueakTime([fileAttributes objectForKey: NSFileModificationDate]);\n\t*sizeIfFile = [[fileAttributes objectForKey: NSFileSize] integerValue];\n\t\n\t/* POSSIBLE IPHONE BUG CHECK */\n\tif (*creationDate == 0) \n\t\t*creationDate = *modificationDate;\n\t\n\treturn ENTRY_FOUND;\n}\n\n- (sqInt) dir_Create: (char *) pathString\n\t\t\t  length: (sqInt) pathStringLength; {\n\tNSFileManager * fileMgr = [NSFileManager defaultManager];\n\tNSString*\tdirectoryPath = NULL;\n\tBOOL\tok;\n\t\n\tif (pathString == nil || \n\t\tpathStringLength <= 0 ||\n\t\tpathStringLength >= PATH_MAX) //This is not a null terminated string so >= versus >\n\t\treturn 0;\n\t\n\tdirectoryPath = createFilePathFromString(pathString,pathStringLength, 1);\n\t\n\tif (directoryPath == NULL)\n\t\treturn 0;\n\t\n#warning what file permissions are used here? Defaults according to the manual, but unix port sets permissions & with defaults\n\t\n\tNSError *error;\n\tok = [fileMgr createDirectoryAtPath: directoryPath withIntermediateDirectories: NO attributes: NULL error: &error];\n\n\t[directoryPath release];\n\treturn ok;\n}\n\n- (sqInt) dir_Delete: (char *) pathString\n\t\t\t  length: (sqInt) pathStringLength; {\n\tNSFileManager * fileMgr = [NSFileManager defaultManager];\n\tNSString*\tdirectoryPath = NULL;\n\tBOOL\tok;\n\tNSArray *directoryContentsForDirLookupCheck;\n\t\n\tif (pathString == nil || \n\t\tpathStringLength <= 0 ||\n\t\tpathStringLength >= PATH_MAX)  //This is not a null terminated string so >= versus >\n\t\treturn 0;\n\t\n\tdirectoryPath = createFilePathFromString(pathString,pathStringLength, 1);\n\t\n\tif (directoryPath == NULL)\n\t\treturn 0;\n\t\n\tNSError *error;\n\tdirectoryContentsForDirLookupCheck = [fileMgr contentsOfDirectoryAtPath: directoryPath error: &error];\n\t\n\tif (directoryContentsForDirLookupCheck == NULL || ([directoryContentsForDirLookupCheck count])) {\n\t\t/* We don't recursive delete directory, that is too dangerous, let the squeak programmer do it \n\t\t which is why if the directory content count is > 0 we abort the delete */\n\t\t[directoryPath release];\n\t\treturn 0;\n\t}\n\t\n\t/* The call below deletes the file, link, or directory \n\t (including, recursively, all subdirectories, files, and links in the directory) identified by a given path.\n\t See comment above to protect against disaster, so in theory the directory has to be empty */\n\t\n\tok = [fileMgr removeItemAtPath: directoryPath error: NULL];\n\t\n\t/*Ensure we note we need to clean up the cached directory */\n\t\n\tif (lastPathForDirLookup) {\n\t\tself.lastPathForDirLookup = NULL;\t\t\n\t}\n\t\n\t[directoryPath release];\n\treturn ok;\n}\n\n\n- (sqInt) dir_GetMacFileTypeAndCreator: (char *) filename\n\t\t\t\t\t\t  fileNameSize: (sqInt) filenameSize\n\t\t\t\t\t\t\t\t fType: (char *) fType\n\t\t\t\t\t\t\t  fCreator: (char *) fCreator {\n\t\n\tNSFileManager * fileMgr = [NSFileManager defaultManager];\n\n\tif (filename == nil || \n\t\tfilenameSize <= 0 ||\n\t\t!fType || \n\t\t!fCreator)\n\t\treturn 0;\n\t\n\tbzero(fType, 4);\n\tbzero(fCreator, 4);\n\tNSString *filePath = createFilePathFromString(filename,filenameSize, 1);\n\t\n\tif (!filePath) \n\t\treturn 0;\n\t\n\tNSError *error;\n\tNSDictionary * fileAttributes = [fileMgr  attributesOfItemAtPath:filePath error:&error];\n\t\n\t[filePath release];\n\tif (!fileAttributes) \n\t\treturn 0;\n\t\n\tNSNumber\t*typeCode\t= [fileAttributes objectForKey: NSFileHFSTypeCode];\n\tNSNumber\t*creatorCode = [fileAttributes objectForKey: NSFileHFSCreatorCode];\n\tif (creatorCode == NULL || typeCode == NULL) \n\t\treturn 0;\n\t\n\t*((uint32_t *) fType)\t= (uint32_t) CFSwapInt32BigToHost([typeCode unsignedIntValue]);\n\t*((uint32_t *) fCreator)= (uint32_t) CFSwapInt32BigToHost([creatorCode unsignedIntValue]);\n\t\n\treturn 1;\n}\n\n- (sqInt) dir_SetMacFileTypeAndCreator: (char *) filename\n\t\t\t\t\t\t  fileNameSize: (sqInt) filenameSize\n\t\t\t\t\t\t\t\t fType: (char *) fType\n\t\t\t\t\t\t\t  fCreator: (char *) fCreator {\n\t\n\tNSFileManager * fileMgr = [NSFileManager defaultManager];\n\n\tif (filename == nil || \n\t\tfilenameSize <= 0 ||\n\t\t!fType || \n\t\t!fCreator)\n\t\treturn 0;\n\t\n\tNSString *filePath = createFilePathFromString(filename,filenameSize, 1);\t\n\t\n\tif (!filePath) {\n\t\treturn 0;\n\t}\n\t\n\tNSNumber\t*typeCode,*creatorCode;\n\ttypeCode = [NSNumber numberWithUnsignedLong: CFSwapInt32HostToBig(*((uint32_t *) fType))];\n\tcreatorCode = [NSNumber numberWithUnsignedLong: CFSwapInt32HostToBig(*((uint32_t *) fCreator))];\n\n\tNSMutableDictionary *fileAttributes = [NSMutableDictionary new];\n\t\n\t[fileAttributes setObject: typeCode forKey: NSFileHFSTypeCode];\n\t[fileAttributes setObject: creatorCode forKey: NSFileHFSCreatorCode];\n\t\n\tBOOL ok=[fileMgr  setAttributes: fileAttributes ofItemAtPath: filePath \n\t\t\t\t\t\t\t\t\t\t\t\t\t error: NULL];\n\t[fileAttributes release];\n\t[filePath release];\n\treturn ok;\n}\n\n- (NSString *) resolvedAliasFiles: (NSString *) filePath {\n\treturn filePath;\n}\n\n- (void)dealloc {\n\t[super dealloc];\n\t[lastPathForDirLookup release];\n\t[directoryContentsForDirLookup release];\n}\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakInfoPlistInterface.h",
    "content": "//\n//  sqSqueakInfoPlistInterface.h\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 9/1/08.\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\nCopyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\nMIT License\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n*/\n//\n#import <Foundation/NSUserDefaults.h>\n\n@interface sqSqueakInfoPlistInterface : NSObject {\n\tNSUserDefaults* defaults;\n\tBOOL\t\tSqueakUseFileMappedMMAP;\n}\n- (void) parseInfoPlist;\n\n@property (nonatomic,retain) NSUserDefaults* defaults;\n@property (nonatomic,assign) BOOL\tSqueakUseFileMappedMMAP;\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakInfoPlistInterface.m",
    "content": "//\n//  sqSqueakInfoPlistInterface.m\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 9/1/08.\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\nCopyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\nMIT License\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n*/\n//\n\n#import \"sqSqueakInfoPlistInterface.h\"\n\n@implementation sqSqueakInfoPlistInterface\n@synthesize defaults,SqueakUseFileMappedMMAP;\n\n- (void) parseInfoPlist {\n\tself.defaults = [NSUserDefaults standardUserDefaults];\n\t\n/* Debug code, dump user defaults to NSLog so we can determine what settings the user has\n\tNSDictionary * foodictionaryRepresentation;\n\tfoodictionaryRepresentation = [defaults dictionaryRepresentation];\n\tfor (id key in foodictionaryRepresentation)\n\t{\n    NSLog(@\"key: %@, value: %@\", key, [foodictionaryRepresentation objectForKey:key]);\n\t}\n */\n\treturn;\n}\n\n- (void)dealloc {\n\t[super dealloc];\n\t[defaults release];\n}\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakMainApp.h",
    "content": "/*\n *  sqSqueakMainApp.h\n *  \n *\n *  Created by John M McIntosh on 5/15/08.\n *\n */\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n*/\n//\n\nvoid sigsegv(int ignore);\nvoid mtfsfi(unsigned long long fpscr);\nvoid fldcw(unsigned int cw);"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakMainApp.m",
    "content": "/*\n *  sqSqueakMainApp.m\n *  \n *\n *  Created by John M McIntosh on 5/15/08.\n *\n */\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n *   Small parts of this code is \n *   Copyright (C) 1996-2007 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n*/\n//\n\n#import \"sqSqueakAppDelegate.h\"\n\n#import \"sq.h\"\n#import \"sqSqueakMainApp.h\"\n#import \"sqMacV2Memory.h\"\n#import <limits.h>\n\n#warning what about these guyes?\n/*** Variables -- globals for access from pluggable primitives ***/\nEXPORT(int)\t\targCnt= 0;\nEXPORT(char**)\targVec= 0;\nEXPORT(char**)\tenvVec= 0;\n\nextern sqSqueakAppDelegate *gDelegateApp;\n\nBOOL\t\t\tgQuitNowRightNow=false,gSqueakHeadless=false;\nint\t\t\t\tgSqueakUseFileMappedMMAP=0;\nchar            gSqueakUntrustedDirectoryName[PATH_MAX];\nchar            gSqueakTrustedDirectoryName[PATH_MAX];\n\nsqInt printAllStacks(void);\nsqInt printCallStack(void);\nextern void dumpPrimTraceLog(void);\nextern BOOL NSApplicationLoad(void);\n\n#if COGVM || STACKVM \n/* Print an error message, possibly a stack trace, and exit. */\n/* Disable Intel compiler inlining of error which is used for breakpoints */\n#pragma auto_inline off\nvoid\nerror(char *msg)\n{\n\t/* flag prevents recursive error when trying to print a broken stack */\n\tstatic sqInt printingStack = false;\n\t\n\tprintf(\"\\n%s\\n\\n\", msg);\n\t\n\tif (ioOSThreadsEqual(ioCurrentOSThread(),getVMOSThread())) {\n\t\tif (!printingStack) {\n\t\t\tprintingStack = true;\n\t\t\tprintf(\"\\n\\nSmalltalk stack dump:\\n\");\n\t\t\tprintCallStack();\n\t\t}\n\t}\n\telse\n\t\tprintf(\"\\nCan't dump Smalltalk stack. Not in VM thread\\n\");\n\tprintf(\"\\nMost recent primitives\\n\");\n\tdumpPrimTraceLog();\n\tabort();\n}\n#pragma auto_inline on\n\nvoid sigsegv(int ignore)\n{\n#pragma unused(ignore)\n\t\n\terror(\"Segmentation fault\");\n}\n#else\nvoid sigsegv(int ignore)\n{\n#pragma unused(ignore)\n\t\n\t/* error(\"Segmentation fault\"); */\n\tstatic int printingStack= 0;\n\t\n\tprintf(\"\\nSegmentation fault\\n\\ns\");\n\tif (!printingStack)\n\t{\n\t\tprintingStack= 1;\n\t\tprintAllStacks();\n\t}\n\tabort();\n}\n#endif\n\nsqInt ioExit(void) {\n\t//API Documented\n \t[gDelegateApp.squeakApplication ioExit];\n \treturn 0;\n}\n\nsqInt ioExitWithErrorCode(int ec) {\n\t//API Documented\n \t[gDelegateApp.squeakApplication ioExitWithErrorCode: ec];\n \treturn 0;\n}\n\nsqInt ioDisablePowerManager(sqInt disableIfNonZero) {\n\t//API Documented\n\treturn 0;\n}\t\n\n#if COGVM\n/*\n * Support code for Cog.\n * a) Answer whether the C frame pointer is in use, for capture of the C stack\n *    pointers.\n */\n# if defined(i386) || defined(__i386) || defined(__i386__)\n/*\n * Cog has already captured CStackPointer  before calling this routine.  Record\n * the original value, capture the pointers again and determine if CFramePointer\n * lies between the two stack pointers and hence is likely in use.  This is\n * necessary since optimizing C compilers for x86 may use %ebp as a general-\n * purpose register, in which case it must not be captured.\n */\nint\nisCFramePointerInUse()\n{\n\textern unsigned long CStackPointer, CFramePointer;\n\textern void (*ceCaptureCStackPointers)(void);\n\tunsigned long currentCSP = CStackPointer;\n\t\n\tcurrentCSP = CStackPointer;\n\tceCaptureCStackPointers();\n\tassert(CStackPointer < currentCSP);\n\treturn CFramePointer >= CStackPointer && CFramePointer <= currentCSP;\n}\n# endif /* defined(i386) || defined(__i386) || defined(__i386__) */\n\n\n#endif /* COGVM */\n\n/* Andreas' stubs */\nchar* ioGetLogDirectory(void) { return \"\"; };\nsqInt ioSetLogDirectoryOfSize(void* lblIndex, sqInt sz){ return 1; }\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakMainApplication+attributes.h",
    "content": "//\n//  sqSqueakMainApplication+attributes.h\n//\n//  Created by John M McIntosh on 5/22/08.\n//\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n//\n\n#import \"sqSqueakMainApplication.h\" \n\n@interface sqSqueakMainApplication (attributes) \n- (void) getAttribute:(sqInt) indexNumber into:(char *) byteArray length:(sqInt) length;\n- (const char *) getAttribute:(sqInt) indexNumber;\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakMainApplication+attributes.m",
    "content": "//\n//  sqSqueakMainApplication+attributes.m\n//\n//  Created by John M McIntosh on 5/22/08.\n//\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n//\n\n#import \"sqSqueakMainApplication+attributes.h\"\n#import \"sqSqueakMainApplication+vmAndImagePath.h\"\n\nextern struct VirtualMachine* interpreterProxy;\n\n@implementation sqSqueakMainApplication (attributes) \n\n- (void) getAttribute:(sqInt)indexNumber into:(char *) byteArrayIndex length:(sqInt)length {\n\t//indexNumber is a postive/negative number\n\t//byteArrayIndex is actually the address of where to put the data\n\t//length is how many bytes the target can hold\n\tif(!byteArrayIndex) \n\t\treturn;\n\t*byteArrayIndex = 0x00;\n\tif (length > 0)\n\t\tstrncpy(byteArrayIndex, [self getAttribute: indexNumber], (size_t) length); //This does not need to be strlcpy\n}\n\n- (const char *) getAttribute:(sqInt)indexNumber {\n\t//indexNumber is a postive/negative number\n\t\n\tif (indexNumber < 0)\t/* VM argument */ {\n\t\tif (-indexNumber <= [self.argsArguments count])\n\t\t\treturn (char *) [self.argsArguments objectAtIndex: (NSUInteger) (-indexNumber - 1)];\n\t}\n\telse {\n\t\tswitch (indexNumber) {\n\t\t\tcase 0: \n\t\t\t\treturn (char *) [self getVMPath];\n\n\t\t\tcase 1: \n\t\t\t\treturn (char *) [self getImageName];\n\t\t\t\t\n\t\t\tcase 1004:  { /* Interpreter version string */\n\t\t\t\t\n\t\t\t\tstatic char data[255];\n\t\t\t\tbzero(data,sizeof(data));\n\t\t\t\tstrlcat(data,interpreterVersion,sizeof(data));\n\t\t\t\tstrlcat(data,\" \",sizeof(data));\n\t\t\t\tNSString *versionString =[[NSBundle mainBundle] objectForInfoDictionaryKey: @\"CFBundleVersion\"];\n\t\t\t\tif (versionString == nil)\n\t\t\t\t\treturn data;\n\t\t\t\tconst char *versonStringAsCString =  [ versionString cStringUsingEncoding: [self currentVMEncoding]];\n\t\t\t\tif (versonStringAsCString == nil)\n\t\t\t\t\treturn data;\n\t\t\t\tstrlcat(data,versonStringAsCString,sizeof(data));\n\t\t\t\treturn data;\n\t\t\t}\n\n\t\t\tcase 1201: /* macintosh file name size */\n\t\t\t\treturn \"255\";\n\n\t\t\tcase 1202: /* macintosh file error peek */\n\t\t\t\treturn \"0\";\n\t\t\t\t\n\t\t\tdefault: \n\t\t\t\tif ((indexNumber - 2) >= 0 && ((indexNumber - 2) < [self.argsArguments count]))\n\t\t\t\t\treturn (char *) [[self.argsArguments objectAtIndex: (NSUInteger) (indexNumber - 2)] cStringUsingEncoding: [self currentVMEncoding]];\n\t\t}\n\t}\n\tinterpreterProxy->success(false);\n\treturn \"\";\n}\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakMainApplication+cursor.h",
    "content": "//\n//  sqSqueakMainApplication+cursor.h\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-14.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import \"sqSqueakMainApplication.h\" \n\n@interface sqSqueakMainApplication (cursor)  \n- (void) setCursor: (sqInt) cursorBitsIndex withMask: (sqInt) cursorMaskIndex\n\t\t   offsetX: (sqInt) offsetX offsetY: (sqInt) offsetY;\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakMainApplication+cursor.m",
    "content": "//\n//  sqSqueakMainApplication+cursor.m\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-14.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import \"sqSqueakMainApplication+cursor.h\"\n\n\n@implementation sqSqueakMainApplication (cursor)\n- (void) setCursor: (sqInt)  cursorBitsIndex withMask: (sqInt)  cursorMaskIndex\n\t\t   offsetX: (sqInt) offsetX offsetY: (sqInt) offsetY {\n}\n@end\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakMainApplication+events.h",
    "content": "//\n//  sqSqueakMainApplication+events.h\n//\n//  Created by John M McIntosh on 6/21/08.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n//\n\n#import\t\"sqSqueakMainApplication.h\"\n\n@interface sqSqueakMainApplication (events)\n- (void) ioGetNextEvent: (sqInputEvent *) evt;\n- (void) processAsOldEventOrComplexEvent: (id) event placeIn: (sqInputEvent *) evt;\n- (void) pumpRunLoop;\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakMainApplication+events.m",
    "content": "//\n//  sqSqueakMainApplication+events.m\n//\n//  Created by John M McIntosh on 6/21/08.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n//\n\n#import \"sqSqueakMainApplication+events.h\"\n\n@implementation sqSqueakMainApplication  (events) \n\n- (void) pumpRunLoop {\n/*\tstatic NSTimeInterval old = 0.0;\n\t\n\tNSTimeInterval now = [NSDate timeIntervalSinceReferenceDate];\n\tif ((now - old) < 1.0/60.0) {\n\t\treturn;\n\t}\n\t\n\told = now;\n*/\t\n\t/* This the carbon logic model \n\t described by http://developer.apple.com/qa/qa2001/qa1061.html\n\t but fails on device, bug tracking number  5971848 */\n\n\tNSRunLoop *theRL = [NSRunLoop mainRunLoop];\n\tBOOL result = [theRL runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantPast]];\n\t\n\t//\t\twhile(CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, TRUE) == kCFRunLoopRunHandledSource);\n\t\n\t// TEST WHICH IS BETTER? \t\tSInt32 what = CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, true);\n#pragma unused(result)\n}\n\n- (void) ioGetNextEvent: (sqInputEvent *) evt {\n\t\n\tioProcessEvents();\n\tid event = [eventQueue returnAndRemoveOldest];\n\tif (event) {\n\t\tNSAutoreleasePool * pool = [NSAutoreleasePool new];\n\t\t[self processAsOldEventOrComplexEvent: event placeIn: evt];\n\t\t[event release];\n\t\t[pool drain];\n\t}\n\t\n}\n\n- (void ) processAsOldEventOrComplexEvent: (id) event placeIn: (sqInputEvent *) evt {\n\t\n\tif ([event isKindOfClass: [NSData class]]) {\n\t\t[event getBytes: evt length: sizeof(sqInputEvent)];\n\t\treturn;\n\t}\n}\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakMainApplication+imageReadWrite.h",
    "content": "//\n//  sqSqueakMainApplication+imageReadWrite.h\n//\n//  Created by John M McIntosh on 5/22/08.\n//\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import \"sqSqueakMainApplication.h\" \n\n@interface sqSqueakMainApplication (imageReadWrite) \n- (void) findImageViaBundleOrPreferences;\n- (BOOL) readImageIntoMemory;\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakMainApplication+imageReadWrite.m",
    "content": "//\n//  sqSqueakMainApplication+imageReadWrite.m\n//\n//  Created by John M McIntosh on 5/22/08.\n//\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import \"sqSqueakMainApplication+imageReadWrite.h\"\n#import \"sqMacV2Memory.h\"\n\n@implementation sqSqueakMainApplication (imageReadWrite) \n- (void) findImageViaBundleOrPreferences {\n}\n\n- (BOOL) readImageIntoMemory {\n\tNSAutoreleasePool * pool = [NSAutoreleasePool new];\n\tconst char * characterPathForImage = (const char *) [[NSFileManager defaultManager] fileSystemRepresentationWithPath: [self.imageNameURL path]];\n\tsqImageFile f;\n\tif (!characterPathForImage)  {\n\t\t[pool drain];\n\t\treturn NO;\n\t}\n\tf = sqImageFileOpen(characterPathForImage, \"rb\");\n# ifndef ROAR_VM\n\treadImageFromFileHeapSizeStartingAt(f, sqGetAvailableMemory(), (squeakFileOffsetType) 0);  //This is a VM Callback\n# endif // ROAR_VM\n\tsqImageFileClose(f);\n\t[pool drain];\n\treturn YES;\n}\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakMainApplication+screen.h",
    "content": "//\n//  sqSqueakMainApplication+screen.h\n//  \n//\n//  Created by John M McIntosh on 5/22/08.\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n*/\n//\n\n#import \"sqSqueakMainApplication.h\"\n#import \"sqMacHostWindow.h\"\n\n@interface sqSqueakMainApplication (screen)\n- (void) unionScreenArea: (windowDescriptorBlock *) windowBlock clip: (CGRect ) clip;\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakMainApplication+screen.m",
    "content": "//\n//  sqSqueakMainApplication+screen.m\n//  \n//\n//  Created by John M McIntosh on 5/22/08.\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n//\n\n#import \"sqSqueakMainApplication+screen.h\"\n#import \"HostWindowPlugin.h\"\n\n@implementation sqSqueakMainApplication (screen) \n- (void) unionScreenArea: (windowDescriptorBlock *) windowBlock clip: (CGRect ) clip {\n\tif (CGRectIsEmpty(windowBlock->updateArea))\n\t\twindowBlock->updateArea = clip;\n\telse\n\t\twindowBlock->updateArea = CGRectUnion(windowBlock->updateArea, clip);\t\t\t\t\n}\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakMainApplication+sound.h",
    "content": "//\n//  sqSqueakMainApplication+sound.h\n//\n//  Created by John M McIntosh on 5/31/08.\n//\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n\n#import \"sqSqueakMainApplication.h\"\n\n@interface sqSqueakMainApplication (sound) \n\t- (void) ioBeep;\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakMainApplication+sound.m",
    "content": "//\n//  sqSqueakMainApplication+sound.m\n//\n//  Created by John M McIntosh on 5/31/08.\n//\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n#import \"sqSqueakMainApplication+sound.h\"\n\n@implementation sqSqueakMainApplication (sound)\n- (void) ioBeep {\n//\tSysBeep(1000);\n}\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakMainApplication+vmAndImagePath.h",
    "content": "//\n//  sqSqueakMainApplication+vmAndImagePath.h\n//  \n//\n//  Created by John M McIntosh on 5/22/08.\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n//\n\n#import \"sqSqueakMainApplication.h\"\n\n@interface sqSqueakMainApplication (vmAndImagePath) \n- (void) setVMPathFromApplicationDirectory;\n- (BOOL) ImageNameIsEmpty;\n- (const char *) getImageName;\n- (void) imageNameGet:(char *) sqImageName length:(sqInt) length;\n- (void) imageNamePut:(const char *) sqImageName;\n- (const char *) getVMPath;\n- (void) vmPathGet:(char *) sqVMPath length:(sqInt) length;\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakMainApplication+vmAndImagePath.m",
    "content": "//\n//  sqSqueakMainApplication+vmAndImagePath.m\n//  \n//\n//  Created by John M McIntosh on 5/22/08.\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n \n V1.05b1 use alloc form of NSURL\n */\n\n//\n\n#import \"sqSqueakMainApplication+vmAndImagePath.h\"\n#import \"sqSqueakAppDelegate.h\"\n\nextern sqSqueakAppDelegate *gDelegateApp;\n\n@implementation sqSqueakMainApplication (vmAndImagePath) \n\n- (void) setVMPathFromApplicationDirectory {\n\tself.vmPathStringURL = [NSURL fileURLWithPath: [[[NSBundle mainBundle] bundlePath] stringByDeletingLastPathComponent]];\n}\n\n- (BOOL) ImageNameIsEmpty {\n\tif (self.imageNameURL) \n\t\treturn false;\n\treturn true;\n}\n\n- (const char *) getImageName {\n\treturn [[[self.imageNameURL path] precomposedStringWithCanonicalMapping] UTF8String];\n}\n\n- (void) imageNameGet:(char *) sqImageName length:(sqInt)length {\n\t//sqImageName is actually the address of where to put the data\n\t//length is how many bytes the target can hold\n\t\n\tif (!sqImageName) \n\t\treturn;\n\t\n\t*sqImageName = 0x00;\n\tif (length > 0)\n\t\tstrncpy(sqImageName, [self getImageName],(size_t) length); //This does not need to be strlcpy since the data is not null terminated\n\t/* ok do we need to check for length of getImageName? \n\t if length > strlen(getImageName) then it fills with 0x00\n\t if length < strlen(getImageName) then we get a partial string and no trailing /0\n\t if length == strlen(getImageName) then we get the string and no trailing /0 which is what is desired. */\n}\n\n- (void) imageNamePut:(const char *) sqImageName {\n\t\n\tif (!sqImageName) \n\t\treturn;\n\tself.imageNameURL = [NSURL fileURLWithPath: [NSString stringWithUTF8String: sqImageName] isDirectory: NO];\n}\n\n- (const char *) getVMPath {\n\treturn [[[[self vmPathStringURL] path] precomposedStringWithCanonicalMapping] UTF8String];\n}\n\n- (void) vmPathGet:(char *) sqVMPath length:(sqInt)length {\n\t//sqVMPath is actually the address of where to put the data\n\t//length is how many bytes the target can hold\n\t\n\tif (!sqVMPath) \n\t\treturn;\n\t*sqVMPath = 0x00;\n\tif (length > 0) {\n\t\tstrlcpy(sqVMPath, [self getVMPath], (size_t) length);\n\t\tsqVMPath[length-1] = '/'; // BUG length here is 1 offset, so need to subtract 1 to add on the '/' which is +1 via VMPathLength\n\t}\n}\n@end\n\n\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakMainApplication.h",
    "content": "//\n//  sqSqueakMainApplication.h\n//  \n//\n//  Created by John M McIntosh on 5/15/08.\n//\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n//\n\n#import <Foundation/Foundation.h>\n#import \"sq.h\"\n#import \"Queue.h\"\n#import \"sqSqueakFileDirectoryInterface.h\"\n#import \"sqSqueakScreenAndWindow.h\"\n#import \"sqSqueakInfoPlistInterface.h\"\n#import\t\"sqSqueakSoundCoreAudio.h\"\n\n@interface sqSqueakMainApplication : NSObject {\n\tNSURL*\t\tvmPathStringURL;\n\tNSURL*\t\timageNameURL;\n\tNSStringEncoding\tcurrentVMEncoding;\n\tNSMutableArray *argsArguments;\n\tsqSqueakFileDirectoryInterface* fileDirectoryLogic;\n\tsqSqueakInfoPlistInterface*\t\tinfoPlistInterfaceLogic;\n\tsqSqueakSoundCoreAudio*\t\t\tsoundInterfaceLogic;\n\tsqInt\tinputSemaphoreIndex;\t\t//event semaphore for VM thread\n\tQueue* eventQueue;\t\t\t\t\t\t//event queue for user events from UI thread\n}\n- (void) setupFloat;\n- (void) setupErrorRecovery;\n- (void) fetchPreferences;\n- (sqSqueakInfoPlistInterface *) newSqSqueakInfoPlistInterfaceCreation;\n- (void) doHeadlessSetup;\n- (void) doMemorySetup;\n- (void) parseUnixArgs;\n- (void) setupMenus;\n- (void) setupTimers;\n- (void) setupAIO;\n- (void) setupEventQueue;\n- (void) setupBrowserLogic;\n- (void) setupSoundLogic;\n- (void) runSqueak;\n- (void) MenuBarRestore;\n- (void) ioExit;\n- (void) ioExitWithErrorCode: (int) ec;\n- (sqSqueakFileDirectoryInterface *) newFileDirectoryInterfaceInstance;\n\n@property (nonatomic,retain) NSURL* vmPathStringURL;\n@property (nonatomic,retain) sqSqueakInfoPlistInterface* infoPlistInterfaceLogic;\n@property (nonatomic,retain) sqSqueakSoundCoreAudio* soundInterfaceLogic;\n@property (nonatomic,retain) NSURL* imageNameURL;\n@property (nonatomic,assign) sqInt inputSemaphoreIndex;\n@property (nonatomic,assign) NSStringEncoding currentVMEncoding;\n@property (nonatomic,retain) Queue* eventQueue;\n@property (nonatomic,retain) sqSqueakFileDirectoryInterface * fileDirectoryLogic;\n@property (nonatomic,retain) NSMutableArray* argsArguments;\n@end\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakMainApplication.m",
    "content": "//\n//  sqSqueakMainApplication.m\n//  \n//\n//  Created by John M McIntosh on 5/15/08.\n//\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n V1.05b1 fix various issues with memory allocation/free, rework logic so you can free entire interpreter loop on quit. \n */\n\n//\n\n#import <Foundation/Foundation.h>\n\n#import \"sqSqueakMainApplication.h\"\n#import \"sqSqueakMainApp.h\"\n#import \"sqSqueakAppDelegate.h\"\n\n#import \"sq.h\"\n#import \"sqSqueakMainApplication+vmAndImagePath.h\"\n#import \"sqSqueakMainApplication+imageReadWrite.h\"\n#import\t\"sqSqueakSoundCoreAudio.h\"\n#import \"Queue.h\"\n\nextern BOOL gSqueakHeadless;\nextern sqSqueakAppDelegate *gDelegateApp;\n\n@implementation sqSqueakMainApplication;\n@synthesize vmPathStringURL;\n@synthesize imageNameURL;\n@synthesize inputSemaphoreIndex;\n@synthesize currentVMEncoding;\n@synthesize eventQueue;\n@synthesize fileDirectoryLogic;\n@synthesize infoPlistInterfaceLogic;\n@synthesize soundInterfaceLogic;\n@synthesize argsArguments;\n\n// Define the VM call backs for initalization and similar purposes\n# ifdef ROAR_VM\nextern void initialize_basic_subsystems();\nextern void initialize_interpreter_instances_selftest_and_interpreter_proxy(char** orig_argv);\nextern void read_image(char* image_path);\nextern void begin_interpretation();\nextern void set_num_cores(char* num_cores_str);\n# else\nextern sqInt interpret(void);\nextern void sqMacMemoryFree(void);\n# endif // ! ROAR_VM\n\n- (void) setupFloat {\n}\n\n- (void) setupErrorRecovery {\n\tsignal(SIGSEGV, sigsegv);\n}\n\n- (sqSqueakInfoPlistInterface *) newSqSqueakInfoPlistInterfaceCreation {\n\treturn [sqSqueakInfoPlistInterface new];\n}\n\n- (void) fetchPreferences {\n\tinfoPlistInterfaceLogic = [self newSqSqueakInfoPlistInterfaceCreation];\n\t[infoPlistInterfaceLogic parseInfoPlist]; \n\tcurrentVMEncoding = NSUTF8StringEncoding;\n}\n\n- (void) doHeadlessSetup {\n\tgSqueakHeadless = false;\n}\n\n- (void) doMemorySetup {\n}\n\n- (void) parseUnixArgs {\n}\n\n- (void) setupMenus {\n}\n\n- (void) setupTimers {\n\textern void SetUpTimers(void);\n\tSetUpTimers();\n}\n\n- (void) setupAIO {\n\tvoid aioInit(void);\n\taioInit();\n\t#if STACKVM || COGVM\n\tioInitThreads();\n\t#endif\n}\n\n- (void) setupEventQueue {\n\teventQueue = [Queue new];\n}\n\n- (void) setupBrowserLogic {\n}\n\n- (void) setupSoundLogic {\n\tsoundInterfaceLogic = [sqSqueakSoundCoreAudio new];\n}\n\n- (sqSqueakFileDirectoryInterface *) newFileDirectoryInterfaceInstance {\n\treturn [sqSqueakFileDirectoryInterface new];\n}\n\n- (void) runSqueak {\n  //STEFAN: here is were we need to hack into\n  \n\tNSAutoreleasePool * pool = [NSAutoreleasePool new]; //Needed since this is a worker thread, see comments in NSAutoreleasePool Class Reference about Threads\n\t\n\t[self setupFloat];  //JMM We have code for intel and powerpc float, but arm? \n\t[self setupErrorRecovery];\n\t[self fetchPreferences];\n\t\n\tfileDirectoryLogic = [self newFileDirectoryInterfaceInstance];\n\t[self setVMPathFromApplicationDirectory];\n\tif (![self.fileDirectoryLogic setWorkingDirectory]) {\n\t\t[pool drain];\n\t\treturn;\n\t}\n\t\n\t[self parseUnixArgs];\n\t\n\t//JMM here we parse the unixArgs\n\t//JMM now we wait for the open document apple events (normally)\n\t\n\t[self doHeadlessSetup];\n\t//JMM after wait normally if headless and no imageName then exit -42\n\t\n\t[self doMemorySetup];\n\t\n\tif ([self ImageNameIsEmpty]) \n\t\t[self findImageViaBundleOrPreferences];\n\t\n\tif ([self ImageNameIsEmpty]) {\n\t\t[pool drain];\n\t\treturn;\n\t}\n\t\n# ifdef ROAR_VM\n    char * characterPathForImage = (char *) [[NSFileManager defaultManager] fileSystemRepresentationWithPath: [self.imageNameURL path]];\n# else\n\tif (![self readImageIntoMemory]) {\n\t\t[pool drain];\n\t\treturn;\n\t}\n# endif // ROAR_VM\n\t\n\t[self setupMenus];\n\t[self setupTimers];\n\t[self setupAIO];\n\t[self setupBrowserLogic];\n\t[self setupSoundLogic];\n\t[gDelegateApp makeMainWindow];\n\t\n\n# ifdef ROAR_VM\n  initialize_basic_subsystems();\n  set_num_cores(\"1\"); //STEFAN TODO try 2\n  \n  initialize_interpreter_instances_selftest_and_interpreter_proxy(NULL);\n  \n  read_image(characterPathForImage);\n  begin_interpretation();\n# else\n\tinterpret();\n# endif // ROAR_VM\n  \n\t[pool drain];  //may not return here, could call exit() via quit image\n\t[self release];\n}\n\n- (void) MenuBarRestore {\n}\n\n- (void) ioExit {\n\t[self ioExitWithErrorCode: 0];\n}\n\n- (void) ioExitWithErrorCode: (int) ec {\n\tioShutdownAllModules();\n\t[self MenuBarRestore];\n\texit(ec);  //Will not return\n}\n\n- (void)dealloc {\n\t[infoPlistInterfaceLogic release];\n\t[soundInterfaceLogic release];\n\t[vmPathStringURL release];\n\t[imageNameURL release];\n\t[fileDirectoryLogic release];\n\t[eventQueue release];\n# ifndef ROAR_VM\n\tsqMacMemoryFree();\n# endif // !ROAR_VM\n\t[super dealloc];\n}\n\n@end\n\nint plugInTimeToReturn(void);\nint plugInTimeToReturn(void) {\n\textern BOOL\tgQuitNowRightNow;\n\t\n\tif (gQuitNowRightNow)\n\t\treturn true;\n\treturn false;\n}\n\n\nsqInt convertToSqueakTime(NSDate *givenDate)\n{\n\t\n\ttime_t unixTime = [givenDate timeIntervalSince1970];\n\t\n#ifdef HAVE_TM_GMTOFF\n\tunixTime+= localtime(&unixTime)->tm_gmtoff;\n#else\n# ifdef HAVE_TIMEZONE\n\tunixTime+= ((daylight) * 60*60) - timezone;\n# else\n#  error: cannot determine timezone correction\n# endif\n#endif\n\t/* Squeak epoch is Jan 1, 1901.  Unix epoch is Jan 1, 1970: 17 leap years\n     and 52 non-leap years later than Squeak. */\n\treturn unixTime + ((52*365UL + 17*366UL) * 24*60*60UL);\n}"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakScreenAPI.h",
    "content": "/*\n *  sqSqueakScreenAPI.h\n *  \n *\n *  Created by John M McIntosh on 5/15/08.\n\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n  Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n  MIT License\n  Permission is hereby granted, free of charge, to any person\n  obtaining a copy of this software and associated documentation\n  files (the \"Software\"), to deal in the Software without\n  restriction, including without limitation the rights to use,\n  copy, modify, merge, publish, distribute, sublicense, and/or sell\n  copies of the Software, and to permit persons to whom the\n  Software is furnished to do so, subject to the following\n  conditions:\n  \n  The above copyright notice and this permission notice shall be\n  included in all copies or substantial portions of the Software.\n  \n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n  OTHER DEALINGS IN THE SOFTWARE.\n  \n  The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n  \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n  and its contributors\", in the same place and form as other third-party acknowledgments. \n  Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n  such third-party acknowledgments.\n  */\n\n//\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakScreenAPI.m",
    "content": "/*\n *  sqSqueakScreenAPI.m\n *  \n *\n *  Created by John M McIntosh on 5/15/08.\n *\n */\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n*/\n//\n\n#import \"sq.h\"\n#import \"sqSqueakScreenAPI.h\"\n#import \"sqSqueakScreenAndWindow.h\"\n\n#ifdef BUILD_FOR_OSX\n#include \"sqMacHostWindow.h\"\nextern wHandleType windowHandleFromIndex(sqInt windowIndex);\n#else\n#include \"SqueakNoOGLIPhoneAppDelegate.h\"\nextern SqueakNoOGLIPhoneAppDelegate *gDelegateApp;\n#endif\n\n\nsqSqueakScreenAndWindow *getMainWindowDelegate() {\n#ifdef BUILD_FOR_OSX\n\treturn ((NSWindow *) windowHandleFromIndex(1)).delegate;\n#else\n\treturn [gDelegateApp screenAndWindow];\n#endif\n}\n\nsqInt ioScreenSize(void) {\n\t//API Documented\n\t\t \n\treturn [getMainWindowDelegate() ioScreenSize];\n}\n\nsqInt ioScreenDepth(void) {\n\t//API Documented\n\treturn [getMainWindowDelegate() ioScreenDepth];\n}\n\nsqInt ioHasDisplayDepth(sqInt depth) {\n\t//API Documented\n\treturn [getMainWindowDelegate() ioHasDisplayDepth: depth];\n}\n\n\nsqInt ioForceDisplayUpdate(void){\n\t//API Documented\n\t[getMainWindowDelegate() ioForceDisplayUpdate];\n\treturn 0;\n}\n\nsqInt ioSetFullScreen(sqInt fullScreen) {\n\t//API Documented\n\t[getMainWindowDelegate() ioSetFullScreen: fullScreen];\n\textern sqInt setFullScreenFlag(sqInt fullScreen);\n\tsetFullScreenFlag(fullScreen);\n\treturn 0;\n}\n\n\nsqInt ioShowDisplayOnWindow(unsigned char * dispBitsIndex, sqInt width, \n\t\t\t\t\t\t  sqInt height, sqInt depth, sqInt affectedL, sqInt affectedR, sqInt affectedT, sqInt affectedB, \n\t\t\t\t\t\t  sqInt windowIndex);\n\nsqInt ioShowDisplay(\n\t\t\t\t  sqInt dispBitsIndex, sqInt width, sqInt height, sqInt depth,\n\t\t\t\t  sqInt affectedL, sqInt affectedR, sqInt affectedT, sqInt affectedB) {\n\n\t//API Documented\n\t\n\tioShowDisplayOnWindow((unsigned char *)pointerForIndex_xxx_dmu(dispBitsIndex),  width,  height,  depth, affectedL,  affectedR,  affectedT,  affectedB, 1);\n\treturn 1;\n}\n\n\nsqInt ioShowDisplayOnWindow(unsigned char* dispBitsIndex, sqInt width, \n\t\t\t\t\t\t  sqInt height, sqInt depth, sqInt affectedL, sqInt affectedR, sqInt affectedT, sqInt affectedB, \n\t\t\t\t\t\t  sqInt windowIndex) {\n\t//API Documented\n\treturn [getMainWindowDelegate()  \n\t ioShowDisplayOnWindow: dispBitsIndex\n\t width: (int) width \n\t height: (int) height\n\t depth: (int) depth\n\t affectedL: (int) affectedL\n\t affectedR: (int) affectedR\n\t affectedT: (int) affectedT\n\t affectedB: (int) affectedB\n\t windowIndex:  (int) windowIndex];\n}\n\n\nchar *ioGetWindowLabel(void) {\n\treturn nil;\n}\n\nsqInt ioSetWindowLabelOfSize(void *lblIndex, sqInt sz) {\n\treturn 0;\n}\n\n\nsqInt ioGetWindowWidth(void) {\n\treturn 0;\n}\n\nsqInt ioGetWindowHeight(void) {\n\treturn 0;\n}\n\nsqInt ioSetWindowWidthHeight(sqInt w, sqInt h) {\n\treturn 0;\n}\n\nsqInt ioIsWindowObscured(void) {\n\treturn 0;\n}\n\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakScreenAndWindow.h",
    "content": "//\n//  sqSqueakScreenAndWindow.h\n//  \n//\n//  Created by John M McIntosh on 6/14/08.\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n//\n\n#import <Foundation/Foundation.h>\n#import \"sq.h\"\n\n@interface sqSqueakScreenAndWindow : NSObject {\n\tsqInt windowIndex;\n\tNSTimeInterval squeakUIFlushPrimaryDeferNMilliseconds;\n\tNSTimeInterval lastFlushTime;\n\tNSTimer *blip;\n\tBOOL forceUpdateFlush;\n\tBOOL displayIsDirty;\n}\n\n- (sqInt) ioScreenSize;\n- (sqInt) ioScreenDepth;\n- (sqInt) ioHasDisplayDepth: (sqInt) depth;\n- (void)  ioForceDisplayUpdate;\n- (void)  ioSetFullScreen: (sqInt) fullScreen;\n- (int)   ioShowDisplayOnWindow: (unsigned char*) dispBitsIndex\n\t\t\t\t\t\t  width: (int) width \n\t\t\t\t\t\t height: (int) height\n\t\t\t\t\t\t  depth: (int) depth\n\t\t\t\t\t  affectedL: (int) affectedL\n\t\t\t\t\t  affectedR: (int) affectedR\n\t\t\t\t\t  affectedT: (int) affectedT\n\t\t\t\t\t  affectedB: (int) affectedB\n\t\t\t\t\twindowIndex: (int) windowIndex;\n- (id) getMainView;\n- (void) ioForceDisplayUpdateFlush: (NSTimer*)theTimer;\n@property (nonatomic,assign) sqInt windowIndex;\n@property (nonatomic,retain) NSTimer *blip;\n@property (nonatomic,assign) NSTimeInterval\tsqueakUIFlushPrimaryDeferNMilliseconds;\n@property (nonatomic,assign) NSTimeInterval\tlastFlushTime;\n@property (nonatomic,assign) BOOL forceUpdateFlush;\n@property (nonatomic,assign) BOOL displayIsDirty;\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakScreenAndWindow.m",
    "content": "//\n//  sqSqueakScreenAndWindow.m\n//  \n//\n//  Created by John M McIntosh on 6/14/08.\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n//\n\n#import \"sqSqueakScreenAndWindow.h\"\n#import \"sqSqueakMainApplication+screen.h\"\n#import \"sqMacHostWindow.h\"\n#ifdef BUILD_FOR_OSX\n#import \"SqueakOSXAppDelegate.h\"\nextern SqueakOSXAppDelegate *gDelegateApp;\n#else\n#import \"SqueakNoOGLIPhoneAppDelegate.h\"\nSqueakNoOGLIPhoneAppDelegate *gDelegateApp;\n#endif\n\nvoid MyProviderReleaseData (\n\t\t\t\t\t\t\tvoid *info,\n\t\t\t\t\t\t\tconst void *data,\n\t\t\t\t\t\t\tsize_t size\n\t\t\t\t\t\t\t);\nvoid MyProviderReleaseData (\n\t\t\t\t\t\t\tvoid *info,\n\t\t\t\t\t\t\tconst void *data,\n\t\t\t\t\t\t\tsize_t size\n\t\t\t\t\t\t\t) {\n}\n\n@implementation sqSqueakScreenAndWindow\n@synthesize windowIndex;\n@synthesize blip,squeakUIFlushPrimaryDeferNMilliseconds,forceUpdateFlush,lastFlushTime,displayIsDirty;\n\n- (id)init {\n    self = [super init];\n    if (self) {\n        // Initialization code here.\n\t\tsqueakUIFlushPrimaryDeferNMilliseconds = 0.0f;\n\t\tforceUpdateFlush = NO;\n\t\tdisplayIsDirty = NO;\n\t}\n    return self;\n}\n\n- (id) getMainView {\n\treturn NULL;\n}\n\n- (void)  ioSetFullScreen: (sqInt) fullScreen {\n}\n\n- (sqInt) ioScreenSize {\n\tsqInt w, h;\n\t\n#if BUILD_FOR_OSX\n\t\tNSRect screenSize = [gDelegateApp.mainView bounds];\n#else\n\t\tCGRect screenSize = [gDelegateApp.mainView bounds];\n#endif\n\t\t\n\t\tw = (sqInt) screenSize.size.width;\n\t\th = (sqInt) screenSize.size.height;\n\n\treturn (w << 16) | (h & 0xFFFF);  /* w is high 16 bits; h is low 16 bits */\n\t\n}\n\n- (sqInt) ioScreenDepth {\n\treturn 32;\n}\n\n- (sqInt) ioHasDisplayDepth: (sqInt) depth {\n\tif (depth == 32) \n\t\treturn true;\n\treturn false;\n}\n\n- (void) ioForceDisplayUpdateActual {\n\tlastFlushTime = [NSDate timeIntervalSinceReferenceDate];\n\tself.displayIsDirty = NO;\n\tself.forceUpdateFlush = NO;\n\tif ([NSThread isMainThread]) \n\t\t[[self getMainView] drawThelayers];\n\telse {\n\t\t[[self getMainView] performSelectorOnMainThread: @selector(drawThelayers) withObject: nil waitUntilDone: NO];\n\t}\n}\n\n- (void) ioForceDisplayUpdate {\n\t[self ioForceDisplayUpdateActual];\n}\n\n- (int)   ioShowDisplayOnWindowActual: (unsigned char*) dispBitsIndex\n\t\t\t\t\t\t  width: (int) width \n\t\t\t\t\t\t height: (int) height\n\t\t\t\t\t\t  depth: (int) depth\n\t\t\t\t\t  affectedL: (int) affectedL\n\t\t\t\t\t  affectedR: (int) affectedR\n\t\t\t\t\t  affectedT: (int) affectedT\n\t\t\t\t\t  affectedB: (int) affectedB\n\t\t\t\t\twindowIndex: (int) passedWindowIndex {\n\t\n\tstatic CGColorSpaceRef colorspace = NULL;\n\tsqInt \t\tpitch;\n\twindowDescriptorBlock *targetWindowBlock = windowBlockFromIndex(passedWindowIndex);\t\n\t\n\tif (colorspace == NULL) {\n\t\tcolorspace = CGColorSpaceCreateDeviceRGB();\n\t\t//Special case of first draw\n\t\t[self ioShowDisplayOnWindow:dispBitsIndex width:width height: height depth: depth affectedL: 0 affectedR: width affectedT: 0 affectedB: height windowIndex: passedWindowIndex];\n//\t\t[self ioForceDisplayUpdate];\n\t\treturn 0;\n\t}\n\t\t\n\tif (affectedL < 0) affectedL = 0;\n\tif (affectedT < 0) affectedT = 0;\n\tif (affectedR > width) affectedR = width;\n\tif (affectedB > height) affectedB = height;\n\t\n\tif ((targetWindowBlock->handle == nil) || ((affectedR - affectedL) <= 0) || ((affectedB - affectedT) <= 0)){\n\t\treturn 0;\n\t}\n\t\n\t\n\tpitch = ((((width)*(depth) + 31) >> 5) << 2);\n\t\t\n\tCGRect clip = CGRectMake((CGFloat)affectedL,(CGFloat)(height-affectedB), (CGFloat)(affectedR-affectedL), (CGFloat)(affectedB-affectedT));\n\t[gDelegateApp.mainView drawImageUsingClip: clip];\n\n\tself.displayIsDirty = YES;\n\t\n\tif ((targetWindowBlock->width != width || targetWindowBlock->height  != height)) {\n\t\ttargetWindowBlock->width = width;\n\t\ttargetWindowBlock->height = height; \n\t}\n\t\n\treturn 0;\t\n}\n\n- (void) ioForceDisplayUpdateFlush: (NSTimer*)theTimer {\n\tNSTimeInterval now = [NSDate timeIntervalSinceReferenceDate];\n\tif (self.displayIsDirty && ((now - self.lastFlushTime) > squeakUIFlushPrimaryDeferNMilliseconds)) {\n\t\tself.lastFlushTime = now;\n\t\tself.forceUpdateFlush = YES;\n\t}\n}\n\n- (int)   ioShowDisplayOnWindow: (unsigned char*) dispBitsIndex\n\t\t\t\t\t\t  width: (int) width \n\t\t\t\t\t\t height: (int) height\n\t\t\t\t\t\t  depth: (int) depth\n\t\t\t\t\t  affectedL: (int) affectedL\n\t\t\t\t\t  affectedR: (int) affectedR\n\t\t\t\t\t  affectedT: (int) affectedT\n\t\t\t\t\t  affectedB: (int) affectedB\n\t\t\t\t\twindowIndex: (int) passedWindowIndex {\n\tint value;\n\tvalue = [self ioShowDisplayOnWindowActual:dispBitsIndex width: width height: height depth:depth affectedL:affectedL affectedR:affectedR affectedT:affectedT affectedB:affectedB windowIndex: passedWindowIndex];\n\tif (!self.blip) {\n\t\t\tif (squeakUIFlushPrimaryDeferNMilliseconds == 0.0f) \n\t\t\t\tsqueakUIFlushPrimaryDeferNMilliseconds =  [gDelegateApp squeakUIFlushPrimaryDeferNMilliseconds];\n\t\t\t\n\t\t\tself.blip = [NSTimer timerWithTimeInterval: squeakUIFlushPrimaryDeferNMilliseconds target:self selector:@selector(ioForceDisplayUpdateFlush:) userInfo:nil repeats: YES];\n\t\t\t[[NSRunLoop mainRunLoop] addTimer: self.blip forMode: NSDefaultRunLoopMode];\n\t}\n\treturn value;\n}\n\n- (void)dealloc {\n\t[super dealloc];\n}\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakSoundAPI.h",
    "content": "//\n//  sqSqueakSoundAPI.h\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 6/21/08.\n//\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n//\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakSoundAPI.m",
    "content": "//\n//  sqSqueakSoundAPI.m\n//\n//  Created by John M McIntosh on 6/21/08.\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n//\n\n#import \"sqSqueakSoundAPI.h\"\n#import \"sqSqueakAppDelegate.h\"\n#import \"sqSqueakMainApplication+sound.h\"\n\nextern sqSqueakAppDelegate *gDelegateApp;\n\nsqInt ioBeep() {\n\t//API Documented\n\t\n\t[gDelegateApp.squeakApplication ioBeep];\n\treturn 0;\n}\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakVmAndImagePathAPI.h",
    "content": "//\n//  sqSqueakVmAndImagePathAPI.h\n//\n//  Created by John M McIntosh on 6/19/08.\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n//\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/Classes/sqSqueakVmAndImagePathAPI.m",
    "content": "//\n//  sqSqueakVmAndImagePathAPI.m\n//\n//  Created by John M McIntosh on 6/19/08.\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n//\n/* imageName is a character stored and known by the VM\n but we use a URI for image name. So a bit of house keeping is required to sync the two data items\n*/\n\n#import \"sqSqueakVmAndImagePathAPI.h\"\n#import \"sqSqueakAppDelegate.h\"\n#import \"sqSqueakMainApplication+vmAndImagePath.h\"\n\nextern sqSqueakAppDelegate *gDelegateApp;\nchar\timageName[PATH_MAX]=\"Squeak.image\";\n\nchar *getImageName(void) {\n\treturn (char *) [gDelegateApp.squeakApplication getImageName];\n}\t\n\nsqInt imageNameSize(void){\n\treturn  (sqInt) strlen(getImageName());\n}\t\n\nsqInt imageNameGetLength(sqInt sqImageNameIndex, sqInt length){\n\t[gDelegateApp.squeakApplication imageNameGet: pointerForIndex_xxx_dmu((usqInt)sqImageNameIndex) length: length];\n\treturn 0;\n}\n\nsqInt imageNamePutLength(sqInt sqImageNameIndex, sqInt length){\n\tif (length > 0 && (length < PATH_MAX)) {\n\t\tstrncpy(imageName,pointerForIndex_xxx_dmu((usqInt)sqImageNameIndex),(size_t) length); //This does not need to be strlcpy since the data is not null terminated\n\t\timageName[length] = 0x00;\t\t//Ensure we nil terminate the image name string\n\t\t[gDelegateApp.squeakApplication imageNamePut:imageName];\n\n\t}\n\treturn 0;\n}\t\n\n//getVMPath returns without a trailing '/', so increment by one\n\nsqInt vmPathSize(void){\n\treturn (sqInt) strlen([gDelegateApp.squeakApplication getVMPath]) + 1;\n}\t\n\nsqInt vmPathGetLength(sqInt sqVMPathIndex, sqInt length){\n\t[gDelegateApp.squeakApplication vmPathGet: pointerForIndex_xxx_dmu((usqInt)sqVMPathIndex) length: length];\n\treturn 0;\n}"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/English.lproj/Localizable.strings",
    "content": "/* \n   Localizable.strings\n   SqueakPureObjc\n\n   Created by John M McIntosh on 09-11-24.\n   Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n */\n\n\"SqueakSelectImagePanePrompt\" = \"Select a Squeak image file to open\";"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/aio.c",
    "content": "/* aio.c -- asynchronous file i/o\n * \n *   Copyright (C) 1996-2006 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a copy\n *   of this software and associated documentation files (the \"Software\"), to deal\n *   in the Software without restriction, including without limitation the rights\n *   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n *   copies of the Software, and to permit persons to whom the Software is\n *   furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n *   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n *   SOFTWARE.\n */\n\n/* Author: Ian.Piumarta@squeakland.org\n * \n * Last edited: 2006-10-18 10:07:06 by piumarta on emilia.local\n */\n\n#include \"sqaio.h\"\n\n#ifdef HAVE_CONFIG_H\n\n# include \"config.h\"\n\n# ifdef HAVE_UNISTD_H\n#   include <sys/types.h>\n#   include <unistd.h>\n# endif /* HAVE_UNISTD_H */\n  \n# ifdef NEED_GETHOSTNAME_P\n    extern int gethostname();\n# endif\n  \n# include <stdio.h>\n# include <signal.h>\n# include <errno.h>\n# include <fcntl.h>\n# include <sys/file.h>\n# include <sys/ioctl.h>\n  \n# ifdef HAVE_SYS_TIME_H\n#   include <sys/time.h>\n# else\n#   include <time.h>\n# endif\n  \n# ifdef HAS_SYS_SELECT_H\n#   include <sys/select.h>\n# endif\n  \n# ifndef FIONBIO\n#   ifdef HAVE_SYS_FILIO_H\n#     include <sys/filio.h>\n#   endif\n#   ifndef FIONBIO\n#     ifdef FIOSNBIO\n#       define FIONBIO FIOSNBIO\n#     else\n#       error: FIONBIO is not defined\n#     endif\n#   endif\n# endif\n\n# if !defined(O_NONBLOCK) && defined(O_NDELAY)\n#   define O_NONBLOCK O_NDELAY\n# endif\n# if !defined(FASYNC) && defined(O_ASYNC)\n#   define FASYNC O_ASYNC\n# endif\n\n#else /* !HAVE_CONFIG_H -- assume lowest common demoninator */\n\n# include <stdio.h>\n# include <stdlib.h>\n# include <unistd.h>\n# include <errno.h>\n# include <signal.h>\n# include <sys/types.h>\n# include <sys/time.h>\n# include <sys/select.h>\n# include <sys/ioctl.h>\n# include <fcntl.h>\n\n#endif\n\n\n#undef\tDEBUG\n#undef\tDEBUG_TICKER\n\n#if defined(DEBUG)\n  int aioLastTick= 0;\n  int aioThisTick= 0;\n# define FPRINTF(X) { aioThisTick= ioLowResMSecs();  fprintf(stderr, \"%8d %8d \", aioThisTick, aioThisTick - aioLastTick);  aioLastTick= aioThisTick;  fprintf X; }\n#else\n# define FPRINTF(X)\n#endif\n\n#if defined(DEBUG_TICKER)\n  static char *ticks= \"-\\\\|/\";\n  static char *ticker= \"\";\n  #define DO_TICK()\t\t\t\t\\\n  {\t\t\t\t\t\t\\\n    fprintf(stderr, \"\\r%c\\r\", *ticker);\t\t\\\n    if (!*ticker++) ticker= ticks;\t\t\\\n  }\n#else\n# define DO_TICK()\n#endif\n\n#define _DO_FLAG_TYPE()\t_DO(AIO_R, rd) _DO(AIO_W, wr) _DO(AIO_X, ex)\n\nstatic int one= 1;\n\nstatic aioHandler  rdHandler[FD_SETSIZE];\nstatic aioHandler  wrHandler[FD_SETSIZE];\nstatic aioHandler  exHandler[FD_SETSIZE];\n\nstatic void       *clientData[FD_SETSIZE];\n\nstatic int\tmaxFd;\nstatic fd_set\tfdMask;\t/* handled by aio\t*/\nstatic fd_set\trdMask; /* handle read\t\t*/\nstatic fd_set\twrMask; /* handle write\t\t*/\nstatic fd_set\texMask; /* handle exception\t*/\nstatic fd_set\txdMask; /* external descriptor\t*/\n\n\nstatic void undefinedHandler(int fd, void *clientData, int flags)\n{\n  fprintf(stderr, \"undefined handler called (fd %d, flags %x)\\n\", fd, flags);\n}\n\n#ifdef DEBUG\nstatic char *handlerName(aioHandler h)\n{\n  if (h == undefinedHandler) return \"undefinedHandler\";\n#ifdef DEBUG_SOCKETS\n {\n   extern char *socketHandlerName(aioHandler);\n   return socketHandlerName(h);\n }\n#endif\n return \"***unknown***\";\n}\n#endif\n\n/* initialise asynchronous i/o */\n\nvoid aioInit(void)\n{\n  extern void forceInterruptCheck(int);\t/* not really, but hey */\n\n  FD_ZERO(&fdMask);\n  FD_ZERO(&rdMask);\n  FD_ZERO(&wrMask);\n  FD_ZERO(&exMask);\n  FD_ZERO(&xdMask);\n  maxFd= 0;\n  signal(SIGPIPE, SIG_IGN);\n  signal(SIGIO,   forceInterruptCheck);\n}\n\n\n/* disable handlers and close all handled non-exteral descriptors */\n\nvoid aioFini(void)\n{\n  int fd;\n  for (fd= 0;  fd < maxFd;  fd++)\n    if (FD_ISSET(fd, &fdMask) && !(FD_ISSET(fd, &xdMask)))\n      {\n\taioDisable(fd);\n\tclose(fd);\n\tFD_CLR(fd, &fdMask);\n\tFD_CLR(fd, &rdMask);\n\tFD_CLR(fd, &wrMask);\n\tFD_CLR(fd, &exMask);\n      }\n  while (maxFd && !FD_ISSET(maxFd - 1, &fdMask))\n    --maxFd;\n  signal(SIGPIPE, SIG_DFL);\n}\n\n\n/* answer whether i/o becomes possible within the given number of microSeconds */\n\nint aioPoll(int microSeconds)\n{\n  int\t fd, ms;\n  fd_set rd, wr, ex;\n\n  FPRINTF((stderr, \"aioPoll(%d)\\n\", microSeconds));\n  DO_TICK();\n\n  /* get out early if there is no pending i/o and no need to relinquish cpu */\n\n  if ((maxFd == 0) && (microSeconds == 0))\n    return 0;\n\n  rd= rdMask;\n  wr= wrMask;\n  ex= exMask;\n#ifdef BUILD_FOR_OSX\n#else\n\tif (maxFd == 0) \n\t\treturn 0;\n#endif\n\n\tms= (int) ioMSecs();\n\n  for (;;)\n    {\n      struct timeval tv;\n      int n, now,why;\n      tv.tv_sec=  microSeconds / 1000000;\n      tv.tv_usec= microSeconds % 1000000;\n      n= select(maxFd, &rd, &wr, &ex, &tv);\n\t  why = errno;\n      if (n  > 0) break;\n      if (n == 0) return 0;\n      if (errno && (EINTR != errno))\n\t{\n\t fprintf(stderr, \"errno %d\\n\", errno);\n\t perror(\"select\");\n\t return 0;\n\t}\n      now= (int) ioMSecs();\n      microSeconds -= (now - ms) * 1000;\n      if (microSeconds <= 0)\n\t\t  return 0;\n      ms= now;\n    }\n\n  for (fd= 0; fd < maxFd; ++fd)\n    {\n#     define _DO(FLAG, TYPE)\t\t\t\t\\\n      {\t\t\t\t\t\t\t\\\n\tif (FD_ISSET(fd, &TYPE))\t\t\t\\\n\t  {\t\t\t\t\t\t\\\n\t    aioHandler handler= TYPE##Handler[fd];\t\\\n\t    FD_CLR(fd, &TYPE##Mask);\t\t\t\\\n\t    TYPE##Handler[fd]= undefinedHandler;\t\\\n\t    handler(fd, clientData[fd], FLAG);\t\t\\\n\t  }\t\t\t\t\t\t\\\n      }\n      _DO_FLAG_TYPE();\n#     undef _DO\n    }\n  return 1;\n}\n\n\n/* sleep for microSeconds or until i/o becomes possible, avoiding\n   sleeping in select() is timeout too small */\n\nint aioSleep(int microSeconds)\n{\n#if defined(HAVE_NANOSLEEP)\n  if (microSeconds < (1000000/60))\t/* < 1 timeslice? */\n    {\n      if (!aioPoll(0))\n\t{\n\t\tint error,why;\n\t\tstruct timespec rqtp= { 0, microSeconds * 1000 };\n\t\tstruct timespec rmtp;\n\t\terror = nanosleep(&rqtp, &rmtp);\n\t\tif (error == -1) {\n\t\t why = errno;\n\t\t}\n\t\tmicroSeconds= 0;\t\t\t/* poll but don't block */\n\t}\n    }\n#endif\n  return aioPoll(microSeconds);\n}\n\n\n/* enable asynchronous notification for a descriptor */\n\nvoid aioEnable(int fd, void *data, int flags)\n{\n  FPRINTF((stderr, \"aioEnable(%d)\\n\", fd));\n  if (fd < 0)\n    {\n      FPRINTF((stderr, \"aioEnable(%d): IGNORED\\n\", fd));\n      return;\n    }\n  if (FD_ISSET(fd, &fdMask))\n    {\n      fprintf(stderr, \"aioEnable: descriptor %d already enabled\\n\", fd);\n      return;\n    }\n  clientData[fd]= data;\n  rdHandler[fd]= wrHandler[fd]= exHandler[fd]= undefinedHandler;\n  FD_SET(fd, &fdMask);\n  FD_CLR(fd, &rdMask);\n  FD_CLR(fd, &wrMask);\n  FD_CLR(fd, &exMask);\n  if (fd >= maxFd)\n    maxFd= fd + 1;\n  if (flags & AIO_EXT)\n    {\n      FD_SET(fd, &xdMask);\n      /* we should not set NBIO ourselves on external descriptors! */\n    }\n  else\n    {\n      /* enable non-blocking asynchronous i/o and delivery of SIGIO to the active process */\n      int arg;\n      FD_CLR(fd, &xdMask);\n#    if defined(O_ASYNC)\n      if (      fcntl(fd, F_SETOWN, getpid()                  )  < 0)\tperror(\"fcntl(F_SETOWN, getpid())\");\n      if ((arg= fcntl(fd, F_GETFL,  0                         )) < 0)\tperror(\"fcntl(F_GETFL)\");\n      if (      fcntl(fd, F_SETFL,  arg | O_NONBLOCK | O_ASYNC)  < 0)\tperror(\"fcntl(F_SETFL, O_ASYNC)\");\n#    elif defined(FASYNC)\n      if (      fcntl(fd, F_SETOWN, getpid()                  )  < 0)\tperror(\"fcntl(F_SETOWN, getpid())\");\n      if ((arg= fcntl(fd, F_GETFL,  0                         )) < 0)\tperror(\"fcntl(F_GETFL)\");\n      if (      fcntl(fd, F_SETFL,  arg | O_NONBLOCK | FASYNC )  < 0)\tperror(\"fcntl(F_SETFL, FASYNC)\");\n#    elif defined(FIOASYNC)\n      arg= getpid();\tif (ioctl(fd, SIOCSPGRP, &arg) < 0)\t\tperror(\"ioctl(SIOCSPGRP, getpid())\");\n      arg= 1;\t\tif (ioctl(fd, FIOASYNC,  &arg) < 0)\t\tperror(\"ioctl(FIOASYNC, 1)\");\n#    endif\n    }\n}\n\n\n/* install/change the handler for a descriptor */\n\nvoid aioHandle(int fd, aioHandler handlerFn, int mask)\n{\n  FPRINTF((stderr, \"aioHandle(%d, %s, %d)\\n\", fd, handlerName(handlerFn), mask));\n  if (fd < 0)\n    {\n      FPRINTF((stderr, \"aioHandle(%d): IGNORED\\n\", fd));\n      return;\n    }\n# define _DO(FLAG, TYPE)\t\t\t\\\n    if (mask & FLAG) {\t\t\t\t\\\n      FD_SET(fd, &TYPE##Mask);\t\t\t\\\n      TYPE##Handler[fd]= handlerFn;\t\t\\\n    }\n  _DO_FLAG_TYPE();\n# undef _DO\n}\n\n\n/* temporarily suspend asynchronous notification for a descriptor */\n\nvoid aioSuspend(int fd, int mask)\n{\n  if (fd < 0)\n    {\n      FPRINTF((stderr, \"aioSuspend(%d): IGNORED\\n\", fd));\n      return;\n    }\n  FPRINTF((stderr, \"aioSuspend(%d)\\n\", fd));\n# define _DO(FLAG, TYPE)\t\t\t\\\n  {\t\t\t\t\t\t\\\n    if (mask & FLAG)\t\t\t\t\\\n      {\t\t\t\t\t\t\\\n\tFD_CLR(fd, &TYPE##Mask);\t\t\\\n\tTYPE##Handler[fd]= undefinedHandler;\t\\\n      }\t\t\t\t\t\t\\\n  }\n  _DO_FLAG_TYPE();\n# undef _DO\n}\n\n\n/* definitively disable asynchronous notification for a descriptor */\n\nvoid aioDisable(int fd)\n{\n  if (fd < 0)\n    {\n      FPRINTF((stderr, \"aioDisable(%d): IGNORED\\n\", fd));\n      return;\n    }\n  FPRINTF((stderr, \"aioDisable(%d)\\n\", fd));\n  aioSuspend(fd, AIO_RWX);\n  FD_CLR(fd, &xdMask);\n  FD_CLR(fd, &fdMask);\n  rdHandler[fd]= wrHandler[fd]= exHandler[fd]= 0;\n  clientData[fd]= 0;\n  /* keep maxFd accurate (drops to zero if no more sockets) */\n  while (maxFd && !FD_ISSET(maxFd - 1, &fdMask))\n    --maxFd;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Common/main.m",
    "content": "//\n//  main.m\n//\n//  Created by John M McIntosh on 5/15/08.\n//  11/01/09 Altered for os-x version\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n*/\n//\n\n#ifdef BUILD_FOR_OSX\n#import <Cocoa/Cocoa.h>\n\nint main(int argc, char **argv, char **envp)\n{\t\n\textern int argCnt;\n\textern char **argVec;\n\textern char **envVec;\n\t\n\targCnt = argc;\n\targVec= argv;\n\tenvVec = envp;\n\t\n    return NSApplicationMain(argc,  (const char **) argv);\n}\n#else\n#import <UIKit/UIKit.h>\n\nint main(int argc, char *argv[]) {\n\tNSAutoreleasePool * pool = [NSAutoreleasePool new];\n\tint retVal = UIApplicationMain(argc, argv, nil, nil);\n\t[pool drain];\n\treturn retVal;\n}\n#endif "
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/English.lproj/MainMenu.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<archive type=\"com.apple.InterfaceBuilder3.Cocoa.XIB\" version=\"7.10\">\n\t<data>\n\t\t<int key=\"IBDocument.SystemTarget\">1060</int>\n\t\t<string key=\"IBDocument.SystemVersion\">10F569</string>\n\t\t<string key=\"IBDocument.InterfaceBuilderVersion\">804</string>\n\t\t<string key=\"IBDocument.AppKitVersion\">1038.29</string>\n\t\t<string key=\"IBDocument.HIToolboxVersion\">461.00</string>\n\t\t<object class=\"NSMutableDictionary\" key=\"IBDocument.PluginVersions\">\n\t\t\t<string key=\"NS.key.0\">com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t<string key=\"NS.object.0\">804</string>\n\t\t</object>\n\t\t<object class=\"NSMutableArray\" key=\"IBDocument.EditedObjectIDs\">\n\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t<integer value=\"371\"/>\n\t\t</object>\n\t\t<object class=\"NSArray\" key=\"IBDocument.PluginDependencies\">\n\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t</object>\n\t\t<object class=\"NSMutableDictionary\" key=\"IBDocument.Metadata\">\n\t\t\t<string key=\"NS.key.0\">PluginDependencyRecalculationVersion</string>\n\t\t\t<integer value=\"1\" key=\"NS.object.0\"/>\n\t\t</object>\n\t\t<object class=\"NSMutableArray\" key=\"IBDocument.RootObjects\" id=\"1048\">\n\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t<object class=\"NSCustomObject\" id=\"1021\">\n\t\t\t\t<string key=\"NSClassName\">NSApplication</string>\n\t\t\t</object>\n\t\t\t<object class=\"NSCustomObject\" id=\"1014\">\n\t\t\t\t<string key=\"NSClassName\">FirstResponder</string>\n\t\t\t</object>\n\t\t\t<object class=\"NSCustomObject\" id=\"1050\">\n\t\t\t\t<string key=\"NSClassName\">SqueakOSXApplication</string>\n\t\t\t</object>\n\t\t\t<object class=\"NSMenu\" id=\"649796088\">\n\t\t\t\t<string key=\"NSTitle\">AMainMenu</string>\n\t\t\t\t<object class=\"NSMutableArray\" key=\"NSMenuItems\">\n\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t<object class=\"NSMenuItem\" id=\"694149608\">\n\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"649796088\"/>\n\t\t\t\t\t\t<string key=\"NSTitle\">SqueakOSXApp</string>\n\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t<object class=\"NSCustomResource\" key=\"NSOnImage\" id=\"35465992\">\n\t\t\t\t\t\t\t<string key=\"NSClassName\">NSImage</string>\n\t\t\t\t\t\t\t<string key=\"NSResourceName\">NSMenuCheckmark</string>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<object class=\"NSCustomResource\" key=\"NSMixedImage\" id=\"502551668\">\n\t\t\t\t\t\t\t<string key=\"NSClassName\">NSImage</string>\n\t\t\t\t\t\t\t<string key=\"NSResourceName\">NSMenuMixedState</string>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<string key=\"NSAction\">submenuAction:</string>\n\t\t\t\t\t\t<object class=\"NSMenu\" key=\"NSSubmenu\" id=\"110575045\">\n\t\t\t\t\t\t\t<string key=\"NSTitle\">SqueakOSXApp</string>\n\t\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"NSMenuItems\">\n\t\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"238522557\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"110575045\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">About SqueakOSXApp</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"304266470\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"110575045\"/>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsSeparator\">YES</bool>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"609285721\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"110575045\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Preferences…</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">,</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"481834944\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"110575045\"/>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsSeparator\">YES</bool>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"1046388886\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"110575045\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Services</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSAction\">submenuAction:</string>\n\t\t\t\t\t\t\t\t\t<object class=\"NSMenu\" key=\"NSSubmenu\" id=\"752062318\">\n\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Services</string>\n\t\t\t\t\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"NSMenuItems\">\n\t\t\t\t\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t<string key=\"NSName\">_NSServicesMenu</string>\n\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"646227648\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"110575045\"/>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsSeparator\">YES</bool>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"755159360\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"110575045\"/>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Hide SqueakOSXApp</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">h</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"342932134\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"110575045\"/>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Hide Others</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">h</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1572864</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"908899353\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"110575045\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Show All</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"1056857174\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"110575045\"/>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsSeparator\">YES</bool>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"632727374\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"110575045\"/>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Quit SqueakOSXApp</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">q</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t<string key=\"NSName\">_NSAppleMenu</string>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"NSMenuItem\" id=\"379814623\">\n\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"649796088\"/>\n\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t<bool key=\"NSIsHidden\">YES</bool>\n\t\t\t\t\t\t<string key=\"NSTitle\">File</string>\n\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t<string key=\"NSAction\">submenuAction:</string>\n\t\t\t\t\t\t<object class=\"NSMenu\" key=\"NSSubmenu\" id=\"720053764\">\n\t\t\t\t\t\t\t<string key=\"NSTitle\">File</string>\n\t\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"NSMenuItems\">\n\t\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"705341025\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"720053764\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">New</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">n</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"722745758\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"720053764\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Open…</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">o</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"1025936716\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"720053764\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Open Recent</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSAction\">submenuAction:</string>\n\t\t\t\t\t\t\t\t\t<object class=\"NSMenu\" key=\"NSSubmenu\" id=\"1065607017\">\n\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Open Recent</string>\n\t\t\t\t\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"NSMenuItems\">\n\t\t\t\t\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"759406840\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"1065607017\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Clear Menu</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t<string key=\"NSName\">_NSRecentDocumentsMenu</string>\n\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"425164168\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"720053764\"/>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsSeparator\">YES</bool>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"776162233\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"720053764\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Close</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">w</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"1023925487\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"720053764\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Save</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">s</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"117038363\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"720053764\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Save As…</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">S</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1179648</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"579971712\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"720053764\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Revert to Saved</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"1010469920\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"720053764\"/>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsSeparator\">YES</bool>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"294629803\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"720053764\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Page Setup...</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">P</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1179648</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSToolTip\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"49223823\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"720053764\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Print…</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">p</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"NSMenuItem\" id=\"952259628\">\n\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"649796088\"/>\n\t\t\t\t\t\t<string key=\"NSTitle\">Edit</string>\n\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t<string key=\"NSAction\">submenuAction:</string>\n\t\t\t\t\t\t<object class=\"NSMenu\" key=\"NSSubmenu\" id=\"789758025\">\n\t\t\t\t\t\t\t<string key=\"NSTitle\">Edit</string>\n\t\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"NSMenuItems\">\n\t\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"1058277027\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"789758025\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Undo</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">z</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"790794224\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"789758025\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Redo</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">Z</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1179648</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"1040322652\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"789758025\"/>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsSeparator\">YES</bool>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"296257095\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"789758025\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Cut</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">x</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"860595796\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"789758025\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Copy</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">c</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"29853731\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"789758025\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Paste</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">v</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"437104165\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"789758025\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Delete</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"583158037\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"789758025\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Select All</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">a</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"NSMenuItem\" id=\"713487014\">\n\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"649796088\"/>\n\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t<bool key=\"NSIsHidden\">YES</bool>\n\t\t\t\t\t\t<string key=\"NSTitle\">Window</string>\n\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t<string key=\"NSAction\">submenuAction:</string>\n\t\t\t\t\t\t<object class=\"NSMenu\" key=\"NSSubmenu\" id=\"835318025\">\n\t\t\t\t\t\t\t<string key=\"NSTitle\">Window</string>\n\t\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"NSMenuItems\">\n\t\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"1011231497\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"835318025\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Minimize</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">m</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"575023229\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"835318025\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Zoom</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"299356726\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"835318025\"/>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsSeparator\">YES</bool>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"625202149\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"835318025\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Bring All to Front</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t<string key=\"NSName\">_NSWindowsMenu</string>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"NSMenuItem\" id=\"448692316\">\n\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"649796088\"/>\n\t\t\t\t\t\t<string key=\"NSTitle\">Help</string>\n\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t<string key=\"NSAction\">submenuAction:</string>\n\t\t\t\t\t\t<object class=\"NSMenu\" key=\"NSSubmenu\" id=\"992780483\">\n\t\t\t\t\t\t\t<string key=\"NSTitle\">Help</string>\n\t\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"NSMenuItems\">\n\t\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"105068016\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"992780483\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">SqueakOSXApp Help</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">?</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t<string key=\"NSName\">_NSHelpMenu</string>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<string key=\"NSName\">_NSMainMenu</string>\n\t\t\t</object>\n\t\t\t<object class=\"NSWindowTemplate\" id=\"972006081\">\n\t\t\t\t<int key=\"NSWindowStyleMask\">15</int>\n\t\t\t\t<int key=\"NSWindowBacking\">2</int>\n\t\t\t\t<string key=\"NSWindowRect\">{{335, 390}, {480, 360}}</string>\n\t\t\t\t<int key=\"NSWTFlags\">880279552</int>\n\t\t\t\t<string key=\"NSWindowTitle\">SqueakOSXApp</string>\n\t\t\t\t<string key=\"NSWindowClass\">NSWindow</string>\n\t\t\t\t<nil key=\"NSViewClass\"/>\n\t\t\t\t<string key=\"NSWindowContentMaxSize\">{1.79769e+308, 1.79769e+308}</string>\n\t\t\t\t<object class=\"NSView\" key=\"NSWindowView\" id=\"439893737\">\n\t\t\t\t\t<reference key=\"NSNextResponder\"/>\n\t\t\t\t\t<int key=\"NSvFlags\">274</int>\n\t\t\t\t\t<string key=\"NSFrameSize\">{480, 360}</string>\n\t\t\t\t\t<reference key=\"NSSuperview\"/>\n\t\t\t\t</object>\n\t\t\t\t<string key=\"NSScreenRect\">{{0, 0}, {1920, 1178}}</string>\n\t\t\t\t<string key=\"NSMaxSize\">{1.79769e+308, 1.79769e+308}</string>\n\t\t\t</object>\n\t\t\t<object class=\"NSCustomObject\" id=\"976324537\">\n\t\t\t\t<string key=\"NSClassName\">SqueakOSXAppDelegate</string>\n\t\t\t</object>\n\t\t\t<object class=\"NSCustomObject\" id=\"755631768\">\n\t\t\t\t<string key=\"NSClassName\">NSFontManager</string>\n\t\t\t</object>\n\t\t</object>\n\t\t<object class=\"IBObjectContainer\" key=\"IBDocument.Objects\">\n\t\t\t<object class=\"NSMutableArray\" key=\"connectionRecords\">\n\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">performMiniaturize:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"1011231497\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">37</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">arrangeInFront:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"625202149\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">39</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">print:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"49223823\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">86</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">runPageLayout:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"294629803\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">87</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">clearRecentDocuments:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"759406840\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">127</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">orderFrontStandardAboutPanel:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1021\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"238522557\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">142</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">performClose:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"776162233\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">193</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">undo:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"1058277027\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">223</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">copy:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"860595796\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">224</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">paste:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"29853731\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">226</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">cut:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"296257095\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">228</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">redo:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"790794224\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">231</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">selectAll:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"583158037\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">232</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">delete:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"437104165\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">235</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">performZoom:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"575023229\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">240</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">saveDocument:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"1023925487\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">362</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">saveDocumentAs:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"117038363\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">363</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">revertDocumentToSaved:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"579971712\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">364</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">hide:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"755159360\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">367</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">hideOtherApplications:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"342932134\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">368</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">unhideAllApplications:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"908899353\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">370</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">newDocument:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"705341025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">373</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">openDocument:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"722745758\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">374</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">terminate:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1050\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"632727374\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">449</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">showHelp:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"105068016\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">493</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBOutletConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">delegate</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1021\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"976324537\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">495</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBOutletConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">window</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"976324537\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"972006081\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">532</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBOutletConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">mainView</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"976324537\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"439893737\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">533</int>\n\t\t\t\t</object>\n\t\t\t</object>\n\t\t\t<object class=\"IBMutableOrderedSet\" key=\"objectRecords\">\n\t\t\t\t<object class=\"NSArray\" key=\"orderedObjects\">\n\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">0</int>\n\t\t\t\t\t\t<object class=\"NSArray\" key=\"object\" id=\"0\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"children\" ref=\"1048\"/>\n\t\t\t\t\t\t<nil key=\"parent\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">-2</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"1021\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"0\"/>\n\t\t\t\t\t\t<string key=\"objectName\">File's Owner</string>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">-1</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"0\"/>\n\t\t\t\t\t\t<string key=\"objectName\">First Responder</string>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">-3</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"1050\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"0\"/>\n\t\t\t\t\t\t<string key=\"objectName\">Application</string>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">29</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"649796088\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"713487014\"/>\n\t\t\t\t\t\t\t<reference ref=\"694149608\"/>\n\t\t\t\t\t\t\t<reference ref=\"952259628\"/>\n\t\t\t\t\t\t\t<reference ref=\"379814623\"/>\n\t\t\t\t\t\t\t<reference ref=\"448692316\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"0\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">19</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"713487014\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"835318025\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"649796088\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">56</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"694149608\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"110575045\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"649796088\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">217</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"952259628\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"789758025\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"649796088\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">83</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"379814623\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"720053764\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"649796088\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">81</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"720053764\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"1023925487\"/>\n\t\t\t\t\t\t\t<reference ref=\"117038363\"/>\n\t\t\t\t\t\t\t<reference ref=\"49223823\"/>\n\t\t\t\t\t\t\t<reference ref=\"722745758\"/>\n\t\t\t\t\t\t\t<reference ref=\"705341025\"/>\n\t\t\t\t\t\t\t<reference ref=\"1025936716\"/>\n\t\t\t\t\t\t\t<reference ref=\"294629803\"/>\n\t\t\t\t\t\t\t<reference ref=\"776162233\"/>\n\t\t\t\t\t\t\t<reference ref=\"425164168\"/>\n\t\t\t\t\t\t\t<reference ref=\"579971712\"/>\n\t\t\t\t\t\t\t<reference ref=\"1010469920\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"379814623\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">75</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"1023925487\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"720053764\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">80</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"117038363\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"720053764\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">78</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"49223823\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"720053764\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">72</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"722745758\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"720053764\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">82</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"705341025\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"720053764\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">124</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"1025936716\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"1065607017\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"720053764\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">77</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"294629803\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"720053764\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">73</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"776162233\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"720053764\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">79</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"425164168\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"720053764\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">112</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"579971712\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"720053764\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">74</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"1010469920\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"720053764\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">125</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"1065607017\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"759406840\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"1025936716\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">126</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"759406840\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"1065607017\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">205</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"789758025\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"437104165\"/>\n\t\t\t\t\t\t\t<reference ref=\"583158037\"/>\n\t\t\t\t\t\t\t<reference ref=\"1058277027\"/>\n\t\t\t\t\t\t\t<reference ref=\"296257095\"/>\n\t\t\t\t\t\t\t<reference ref=\"29853731\"/>\n\t\t\t\t\t\t\t<reference ref=\"860595796\"/>\n\t\t\t\t\t\t\t<reference ref=\"1040322652\"/>\n\t\t\t\t\t\t\t<reference ref=\"790794224\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"952259628\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">202</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"437104165\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"789758025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">198</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"583158037\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"789758025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">207</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"1058277027\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"789758025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">199</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"296257095\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"789758025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">203</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"29853731\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"789758025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">197</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"860595796\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"789758025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">206</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"1040322652\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"789758025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">215</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"790794224\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"789758025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">57</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"110575045\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"238522557\"/>\n\t\t\t\t\t\t\t<reference ref=\"755159360\"/>\n\t\t\t\t\t\t\t<reference ref=\"908899353\"/>\n\t\t\t\t\t\t\t<reference ref=\"632727374\"/>\n\t\t\t\t\t\t\t<reference ref=\"646227648\"/>\n\t\t\t\t\t\t\t<reference ref=\"609285721\"/>\n\t\t\t\t\t\t\t<reference ref=\"481834944\"/>\n\t\t\t\t\t\t\t<reference ref=\"304266470\"/>\n\t\t\t\t\t\t\t<reference ref=\"1046388886\"/>\n\t\t\t\t\t\t\t<reference ref=\"1056857174\"/>\n\t\t\t\t\t\t\t<reference ref=\"342932134\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"694149608\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">58</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"238522557\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"110575045\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">134</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"755159360\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"110575045\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">150</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"908899353\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"110575045\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">136</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"632727374\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"110575045\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">144</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"646227648\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"110575045\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">129</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"609285721\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"110575045\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">143</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"481834944\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"110575045\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">236</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"304266470\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"110575045\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">131</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"1046388886\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"752062318\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"110575045\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">149</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"1056857174\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"110575045\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">145</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"342932134\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"110575045\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">130</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"752062318\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"1046388886\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">24</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"835318025\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"299356726\"/>\n\t\t\t\t\t\t\t<reference ref=\"625202149\"/>\n\t\t\t\t\t\t\t<reference ref=\"575023229\"/>\n\t\t\t\t\t\t\t<reference ref=\"1011231497\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"713487014\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">92</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"299356726\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"835318025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">5</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"625202149\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"835318025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">239</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"575023229\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"835318025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">23</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"1011231497\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"835318025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">371</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"972006081\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"439893737\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"0\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">372</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"439893737\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"972006081\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">420</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"755631768\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"0\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">490</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"448692316\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"992780483\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"649796088\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">491</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"992780483\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"105068016\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"448692316\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">492</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"105068016\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"992780483\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">494</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"976324537\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"0\"/>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t</object>\n\t\t\t<object class=\"NSMutableDictionary\" key=\"flattenedProperties\">\n\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t<object class=\"NSArray\" key=\"dict.sortedKeys\">\n\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t<string>-3.IBPluginDependency</string>\n\t\t\t\t\t<string>112.IBPluginDependency</string>\n\t\t\t\t\t<string>112.ImportedFromIB2</string>\n\t\t\t\t\t<string>124.IBPluginDependency</string>\n\t\t\t\t\t<string>124.ImportedFromIB2</string>\n\t\t\t\t\t<string>125.IBPluginDependency</string>\n\t\t\t\t\t<string>125.ImportedFromIB2</string>\n\t\t\t\t\t<string>125.editorWindowContentRectSynchronizationRect</string>\n\t\t\t\t\t<string>126.IBPluginDependency</string>\n\t\t\t\t\t<string>126.ImportedFromIB2</string>\n\t\t\t\t\t<string>129.IBPluginDependency</string>\n\t\t\t\t\t<string>129.ImportedFromIB2</string>\n\t\t\t\t\t<string>130.IBPluginDependency</string>\n\t\t\t\t\t<string>130.ImportedFromIB2</string>\n\t\t\t\t\t<string>130.editorWindowContentRectSynchronizationRect</string>\n\t\t\t\t\t<string>131.IBPluginDependency</string>\n\t\t\t\t\t<string>131.ImportedFromIB2</string>\n\t\t\t\t\t<string>134.IBPluginDependency</string>\n\t\t\t\t\t<string>134.ImportedFromIB2</string>\n\t\t\t\t\t<string>136.IBPluginDependency</string>\n\t\t\t\t\t<string>136.ImportedFromIB2</string>\n\t\t\t\t\t<string>143.IBPluginDependency</string>\n\t\t\t\t\t<string>143.ImportedFromIB2</string>\n\t\t\t\t\t<string>144.IBPluginDependency</string>\n\t\t\t\t\t<string>144.ImportedFromIB2</string>\n\t\t\t\t\t<string>145.IBPluginDependency</string>\n\t\t\t\t\t<string>145.ImportedFromIB2</string>\n\t\t\t\t\t<string>149.IBPluginDependency</string>\n\t\t\t\t\t<string>149.ImportedFromIB2</string>\n\t\t\t\t\t<string>150.IBPluginDependency</string>\n\t\t\t\t\t<string>150.ImportedFromIB2</string>\n\t\t\t\t\t<string>19.IBPluginDependency</string>\n\t\t\t\t\t<string>19.ImportedFromIB2</string>\n\t\t\t\t\t<string>197.IBPluginDependency</string>\n\t\t\t\t\t<string>197.ImportedFromIB2</string>\n\t\t\t\t\t<string>198.IBPluginDependency</string>\n\t\t\t\t\t<string>198.ImportedFromIB2</string>\n\t\t\t\t\t<string>199.IBPluginDependency</string>\n\t\t\t\t\t<string>199.ImportedFromIB2</string>\n\t\t\t\t\t<string>202.IBPluginDependency</string>\n\t\t\t\t\t<string>202.ImportedFromIB2</string>\n\t\t\t\t\t<string>203.IBPluginDependency</string>\n\t\t\t\t\t<string>203.ImportedFromIB2</string>\n\t\t\t\t\t<string>205.IBEditorWindowLastContentRect</string>\n\t\t\t\t\t<string>205.IBPluginDependency</string>\n\t\t\t\t\t<string>205.ImportedFromIB2</string>\n\t\t\t\t\t<string>205.editorWindowContentRectSynchronizationRect</string>\n\t\t\t\t\t<string>206.IBPluginDependency</string>\n\t\t\t\t\t<string>206.ImportedFromIB2</string>\n\t\t\t\t\t<string>207.IBPluginDependency</string>\n\t\t\t\t\t<string>207.ImportedFromIB2</string>\n\t\t\t\t\t<string>215.IBPluginDependency</string>\n\t\t\t\t\t<string>215.ImportedFromIB2</string>\n\t\t\t\t\t<string>217.IBPluginDependency</string>\n\t\t\t\t\t<string>217.ImportedFromIB2</string>\n\t\t\t\t\t<string>23.IBPluginDependency</string>\n\t\t\t\t\t<string>23.ImportedFromIB2</string>\n\t\t\t\t\t<string>236.IBPluginDependency</string>\n\t\t\t\t\t<string>236.ImportedFromIB2</string>\n\t\t\t\t\t<string>239.IBPluginDependency</string>\n\t\t\t\t\t<string>239.ImportedFromIB2</string>\n\t\t\t\t\t<string>24.IBEditorWindowLastContentRect</string>\n\t\t\t\t\t<string>24.IBPluginDependency</string>\n\t\t\t\t\t<string>24.ImportedFromIB2</string>\n\t\t\t\t\t<string>24.editorWindowContentRectSynchronizationRect</string>\n\t\t\t\t\t<string>29.IBEditorWindowLastContentRect</string>\n\t\t\t\t\t<string>29.IBPluginDependency</string>\n\t\t\t\t\t<string>29.ImportedFromIB2</string>\n\t\t\t\t\t<string>29.WindowOrigin</string>\n\t\t\t\t\t<string>29.editorWindowContentRectSynchronizationRect</string>\n\t\t\t\t\t<string>371.IBEditorWindowLastContentRect</string>\n\t\t\t\t\t<string>371.IBPluginDependency</string>\n\t\t\t\t\t<string>371.IBWindowTemplateEditedContentRect</string>\n\t\t\t\t\t<string>371.NSWindowTemplate.visibleAtLaunch</string>\n\t\t\t\t\t<string>371.editorWindowContentRectSynchronizationRect</string>\n\t\t\t\t\t<string>371.windowTemplate.maxSize</string>\n\t\t\t\t\t<string>372.CustomClassName</string>\n\t\t\t\t\t<string>372.IBPluginDependency</string>\n\t\t\t\t\t<string>490.IBPluginDependency</string>\n\t\t\t\t\t<string>491.IBEditorWindowLastContentRect</string>\n\t\t\t\t\t<string>491.IBPluginDependency</string>\n\t\t\t\t\t<string>492.IBPluginDependency</string>\n\t\t\t\t\t<string>5.IBPluginDependency</string>\n\t\t\t\t\t<string>5.ImportedFromIB2</string>\n\t\t\t\t\t<string>56.IBPluginDependency</string>\n\t\t\t\t\t<string>56.ImportedFromIB2</string>\n\t\t\t\t\t<string>57.IBEditorWindowLastContentRect</string>\n\t\t\t\t\t<string>57.IBPluginDependency</string>\n\t\t\t\t\t<string>57.ImportedFromIB2</string>\n\t\t\t\t\t<string>57.editorWindowContentRectSynchronizationRect</string>\n\t\t\t\t\t<string>58.IBPluginDependency</string>\n\t\t\t\t\t<string>58.ImportedFromIB2</string>\n\t\t\t\t\t<string>72.IBPluginDependency</string>\n\t\t\t\t\t<string>72.ImportedFromIB2</string>\n\t\t\t\t\t<string>73.IBPluginDependency</string>\n\t\t\t\t\t<string>73.ImportedFromIB2</string>\n\t\t\t\t\t<string>74.IBPluginDependency</string>\n\t\t\t\t\t<string>74.ImportedFromIB2</string>\n\t\t\t\t\t<string>75.IBPluginDependency</string>\n\t\t\t\t\t<string>75.ImportedFromIB2</string>\n\t\t\t\t\t<string>77.IBPluginDependency</string>\n\t\t\t\t\t<string>77.ImportedFromIB2</string>\n\t\t\t\t\t<string>78.IBPluginDependency</string>\n\t\t\t\t\t<string>78.ImportedFromIB2</string>\n\t\t\t\t\t<string>79.IBPluginDependency</string>\n\t\t\t\t\t<string>79.ImportedFromIB2</string>\n\t\t\t\t\t<string>80.IBPluginDependency</string>\n\t\t\t\t\t<string>80.ImportedFromIB2</string>\n\t\t\t\t\t<string>81.IBEditorWindowLastContentRect</string>\n\t\t\t\t\t<string>81.IBPluginDependency</string>\n\t\t\t\t\t<string>81.ImportedFromIB2</string>\n\t\t\t\t\t<string>81.editorWindowContentRectSynchronizationRect</string>\n\t\t\t\t\t<string>82.IBPluginDependency</string>\n\t\t\t\t\t<string>82.ImportedFromIB2</string>\n\t\t\t\t\t<string>83.IBPluginDependency</string>\n\t\t\t\t\t<string>83.ImportedFromIB2</string>\n\t\t\t\t\t<string>92.IBPluginDependency</string>\n\t\t\t\t\t<string>92.ImportedFromIB2</string>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"NSMutableArray\" key=\"dict.values\">\n\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>{{522, 812}, {146, 23}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>{{436, 809}, {64, 6}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>{{547, 180}, {254, 283}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>{{187, 434}, {243, 243}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>{{654, 239}, {194, 73}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>{{525, 802}, {197, 73}}</string>\n\t\t\t\t\t<string>{{380, 836}, {474, 20}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>{74, 862}</string>\n\t\t\t\t\t<string>{{6, 978}, {478, 20}}</string>\n\t\t\t\t\t<string>{{380, 496}, {480, 360}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>{{380, 496}, {480, 360}}</string>\n\t\t\t\t\t<boolean value=\"NO\"/>\n\t\t\t\t\t<string>{{33, 99}, {480, 360}}</string>\n\t\t\t\t\t<string>{3.40282e+38, 3.40282e+38}</string>\n\t\t\t\t\t<string>sqSqueakOSXNSView</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>{{793, 813}, {210, 23}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>{{286, 129}, {275, 183}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>{{23, 794}, {245, 183}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>{{452, 109}, {196, 203}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>{{145, 474}, {199, 203}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t</object>\n\t\t\t</object>\n\t\t\t<object class=\"NSMutableDictionary\" key=\"unlocalizedProperties\">\n\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t<reference key=\"dict.sortedKeys\" ref=\"0\"/>\n\t\t\t\t<object class=\"NSMutableArray\" key=\"dict.values\">\n\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t</object>\n\t\t\t</object>\n\t\t\t<nil key=\"activeLocalization\"/>\n\t\t\t<object class=\"NSMutableDictionary\" key=\"localizations\">\n\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t<reference key=\"dict.sortedKeys\" ref=\"0\"/>\n\t\t\t\t<object class=\"NSMutableArray\" key=\"dict.values\">\n\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t</object>\n\t\t\t</object>\n\t\t\t<nil key=\"sourceID\"/>\n\t\t\t<int key=\"maxID\">533</int>\n\t\t</object>\n\t\t<object class=\"IBClassDescriber\" key=\"IBDocument.Classes\">\n\t\t\t<object class=\"NSMutableArray\" key=\"referencedPartialClassDescriptions\">\n\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">SqueakOSXAppDelegate</string>\n\t\t\t\t\t<string key=\"superclassName\">sqSqueakAppDelegate</string>\n\t\t\t\t\t<object class=\"NSMutableDictionary\" key=\"outlets\">\n\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t<object class=\"NSArray\" key=\"dict.sortedKeys\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<string>mainView</string>\n\t\t\t\t\t\t\t<string>window</string>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"dict.values\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<string>sqSqueakOSXNSView</string>\n\t\t\t\t\t\t\t<string>NSWindow</string>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"NSMutableDictionary\" key=\"toOneOutletInfosByName\">\n\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t<object class=\"NSArray\" key=\"dict.sortedKeys\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<string>mainView</string>\n\t\t\t\t\t\t\t<string>window</string>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"dict.values\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<object class=\"IBToOneOutletInfo\">\n\t\t\t\t\t\t\t\t<string key=\"name\">mainView</string>\n\t\t\t\t\t\t\t\t<string key=\"candidateClassName\">sqSqueakOSXNSView</string>\n\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t<object class=\"IBToOneOutletInfo\">\n\t\t\t\t\t\t\t\t<string key=\"name\">window</string>\n\t\t\t\t\t\t\t\t<string key=\"candidateClassName\">NSWindow</string>\n\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBProjectSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">OSX/SqueakOSXAppDelegate.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">SqueakOSXApplication</string>\n\t\t\t\t\t<string key=\"superclassName\">NSApplication</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBProjectSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">OSX/SqueakOSXApplication.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">sqSqueakAppDelegate</string>\n\t\t\t\t\t<string key=\"superclassName\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBProjectSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Common/Classes/sqSqueakAppDelegate.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">sqSqueakOSXNSView</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBProjectSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">OSX/SqViewBitmapConversion.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">sqSqueakOSXNSView</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBProjectSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">OSX/SqViewClut.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">sqSqueakOSXNSView</string>\n\t\t\t\t\t<string key=\"superclassName\">NSOpenGLView</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBProjectSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">OSX/sqSqueakOSXNSView.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t</object>\n\t\t\t<object class=\"NSMutableArray\" key=\"referencedPartialClassDescriptionsV3.2+\">\n\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSApplication</string>\n\t\t\t\t\t<string key=\"superclassName\">NSResponder</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\" id=\"822405504\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSApplication.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSApplication</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\" id=\"850738725\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSApplicationScripting.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSApplication</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\" id=\"624831158\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSColorPanel.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSApplication</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSHelpManager.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSApplication</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSPageLayout.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSApplication</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSUserInterfaceItemSearching.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSBrowser</string>\n\t\t\t\t\t<string key=\"superclassName\">NSControl</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSBrowser.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSControl</string>\n\t\t\t\t\t<string key=\"superclassName\">NSView</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\" id=\"310914472\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSControl.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSDocument</string>\n\t\t\t\t\t<string key=\"superclassName\">NSObject</string>\n\t\t\t\t\t<object class=\"NSMutableDictionary\" key=\"actions\">\n\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t<object class=\"NSArray\" key=\"dict.sortedKeys\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<string>printDocument:</string>\n\t\t\t\t\t\t\t<string>revertDocumentToSaved:</string>\n\t\t\t\t\t\t\t<string>runPageLayout:</string>\n\t\t\t\t\t\t\t<string>saveDocument:</string>\n\t\t\t\t\t\t\t<string>saveDocumentAs:</string>\n\t\t\t\t\t\t\t<string>saveDocumentTo:</string>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"dict.values\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<string>id</string>\n\t\t\t\t\t\t\t<string>id</string>\n\t\t\t\t\t\t\t<string>id</string>\n\t\t\t\t\t\t\t<string>id</string>\n\t\t\t\t\t\t\t<string>id</string>\n\t\t\t\t\t\t\t<string>id</string>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"NSMutableDictionary\" key=\"actionInfosByName\">\n\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t<object class=\"NSArray\" key=\"dict.sortedKeys\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<string>printDocument:</string>\n\t\t\t\t\t\t\t<string>revertDocumentToSaved:</string>\n\t\t\t\t\t\t\t<string>runPageLayout:</string>\n\t\t\t\t\t\t\t<string>saveDocument:</string>\n\t\t\t\t\t\t\t<string>saveDocumentAs:</string>\n\t\t\t\t\t\t\t<string>saveDocumentTo:</string>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"dict.values\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<object class=\"IBActionInfo\">\n\t\t\t\t\t\t\t\t<string key=\"name\">printDocument:</string>\n\t\t\t\t\t\t\t\t<string key=\"candidateClassName\">id</string>\n\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t<object class=\"IBActionInfo\">\n\t\t\t\t\t\t\t\t<string key=\"name\">revertDocumentToSaved:</string>\n\t\t\t\t\t\t\t\t<string key=\"candidateClassName\">id</string>\n\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t<object class=\"IBActionInfo\">\n\t\t\t\t\t\t\t\t<string key=\"name\">runPageLayout:</string>\n\t\t\t\t\t\t\t\t<string key=\"candidateClassName\">id</string>\n\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t<object class=\"IBActionInfo\">\n\t\t\t\t\t\t\t\t<string key=\"name\">saveDocument:</string>\n\t\t\t\t\t\t\t\t<string key=\"candidateClassName\">id</string>\n\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t<object class=\"IBActionInfo\">\n\t\t\t\t\t\t\t\t<string key=\"name\">saveDocumentAs:</string>\n\t\t\t\t\t\t\t\t<string key=\"candidateClassName\">id</string>\n\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t<object class=\"IBActionInfo\">\n\t\t\t\t\t\t\t\t<string key=\"name\">saveDocumentTo:</string>\n\t\t\t\t\t\t\t\t<string key=\"candidateClassName\">id</string>\n\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSDocument.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSDocument</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSDocumentScripting.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSDocumentController</string>\n\t\t\t\t\t<string key=\"superclassName\">NSObject</string>\n\t\t\t\t\t<object class=\"NSMutableDictionary\" key=\"actions\">\n\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t<object class=\"NSArray\" key=\"dict.sortedKeys\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<string>clearRecentDocuments:</string>\n\t\t\t\t\t\t\t<string>newDocument:</string>\n\t\t\t\t\t\t\t<string>openDocument:</string>\n\t\t\t\t\t\t\t<string>saveAllDocuments:</string>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"dict.values\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<string>id</string>\n\t\t\t\t\t\t\t<string>id</string>\n\t\t\t\t\t\t\t<string>id</string>\n\t\t\t\t\t\t\t<string>id</string>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"NSMutableDictionary\" key=\"actionInfosByName\">\n\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t<object class=\"NSArray\" key=\"dict.sortedKeys\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<string>clearRecentDocuments:</string>\n\t\t\t\t\t\t\t<string>newDocument:</string>\n\t\t\t\t\t\t\t<string>openDocument:</string>\n\t\t\t\t\t\t\t<string>saveAllDocuments:</string>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"dict.values\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<object class=\"IBActionInfo\">\n\t\t\t\t\t\t\t\t<string key=\"name\">clearRecentDocuments:</string>\n\t\t\t\t\t\t\t\t<string key=\"candidateClassName\">id</string>\n\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t<object class=\"IBActionInfo\">\n\t\t\t\t\t\t\t\t<string key=\"name\">newDocument:</string>\n\t\t\t\t\t\t\t\t<string key=\"candidateClassName\">id</string>\n\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t<object class=\"IBActionInfo\">\n\t\t\t\t\t\t\t\t<string key=\"name\">openDocument:</string>\n\t\t\t\t\t\t\t\t<string key=\"candidateClassName\">id</string>\n\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t<object class=\"IBActionInfo\">\n\t\t\t\t\t\t\t\t<string key=\"name\">saveAllDocuments:</string>\n\t\t\t\t\t\t\t\t<string key=\"candidateClassName\">id</string>\n\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSDocumentController.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSFontManager</string>\n\t\t\t\t\t<string key=\"superclassName\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\" id=\"946436764\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSFontManager.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSFormatter</string>\n\t\t\t\t\t<string key=\"superclassName\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSFormatter.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSMatrix</string>\n\t\t\t\t\t<string key=\"superclassName\">NSControl</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSMatrix.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSMenu</string>\n\t\t\t\t\t<string key=\"superclassName\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\" id=\"1056362899\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSMenu.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSMenuItem</string>\n\t\t\t\t\t<string key=\"superclassName\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\" id=\"472958451\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSMenuItem.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSMovieView</string>\n\t\t\t\t\t<string key=\"superclassName\">NSView</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSMovieView.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSAccessibility.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<reference key=\"sourceIdentifier\" ref=\"822405504\"/>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<reference key=\"sourceIdentifier\" ref=\"850738725\"/>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<reference key=\"sourceIdentifier\" ref=\"624831158\"/>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<reference key=\"sourceIdentifier\" ref=\"310914472\"/>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSDictionaryController.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSDragging.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<reference key=\"sourceIdentifier\" ref=\"946436764\"/>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSFontPanel.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSKeyValueBinding.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<reference key=\"sourceIdentifier\" ref=\"1056362899\"/>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSNibLoading.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSOutlineView.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSPasteboard.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSSavePanel.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\" id=\"809545482\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSTableView.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSToolbarItem.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\" id=\"260078765\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSView.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSError.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSFileManager.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSKeyValueCoding.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSKeyValueObserving.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSKeyedArchiver.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSObject.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSRunLoop.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSThread.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSURL.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSURLConnection.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">PrintCore.framework/Headers/PDEPluginInterface.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">QuartzCore.framework/Headers/CAAnimation.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">QuartzCore.framework/Headers/CALayer.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">QuartzCore.framework/Headers/CIImageProvider.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">UIKit.framework/Headers/UIAccessibility.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">UIKit.framework/Headers/UINibLoading.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">UIKit.framework/Headers/UIResponder.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSOpenGLView</string>\n\t\t\t\t\t<string key=\"superclassName\">NSView</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSOpenGLView.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSResponder</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSInterfaceStyle.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSResponder</string>\n\t\t\t\t\t<string key=\"superclassName\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSResponder.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSTableView</string>\n\t\t\t\t\t<string key=\"superclassName\">NSControl</string>\n\t\t\t\t\t<reference key=\"sourceIdentifier\" ref=\"809545482\"/>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSText</string>\n\t\t\t\t\t<string key=\"superclassName\">NSView</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSText.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSView</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSClipView.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSView</string>\n\t\t\t\t\t<reference key=\"sourceIdentifier\" ref=\"472958451\"/>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSView</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSRulerView.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSView</string>\n\t\t\t\t\t<string key=\"superclassName\">NSResponder</string>\n\t\t\t\t\t<reference key=\"sourceIdentifier\" ref=\"260078765\"/>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSWindow</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSDrawer.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSWindow</string>\n\t\t\t\t\t<string key=\"superclassName\">NSResponder</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSWindow.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSWindow</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSWindowScripting.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t</object>\n\t\t</object>\n\t\t<int key=\"IBDocument.localizationMode\">0</int>\n\t\t<string key=\"IBDocument.TargetRuntimeIdentifier\">IBCocoaFramework</string>\n\t\t<object class=\"NSMutableDictionary\" key=\"IBDocument.PluginDeclaredDependencyDefaults\">\n\t\t\t<string key=\"NS.key.0\">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string>\n\t\t\t<integer value=\"1060\" key=\"NS.object.0\"/>\n\t\t</object>\n\t\t<object class=\"NSMutableDictionary\" key=\"IBDocument.PluginDeclaredDevelopmentDependencies\">\n\t\t\t<string key=\"NS.key.0\">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>\n\t\t\t<integer value=\"3000\" key=\"NS.object.0\"/>\n\t\t</object>\n\t\t<bool key=\"IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion\">YES</bool>\n\t\t<string key=\"IBDocument.LastKnownRelativeProjectPath\">../SqueakPureObjcCOGVM.xcodeproj</string>\n\t\t<int key=\"IBDocument.defaultPropertyAccessControl\">3</int>\n\t\t<object class=\"NSMutableDictionary\" key=\"IBDocument.LastKnownImageSizes\">\n\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t<object class=\"NSArray\" key=\"dict.sortedKeys\">\n\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t<string>NSMenuCheckmark</string>\n\t\t\t\t<string>NSMenuMixedState</string>\n\t\t\t</object>\n\t\t\t<object class=\"NSMutableArray\" key=\"dict.values\">\n\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t<string>{9, 8}</string>\n\t\t\t\t<string>{7, 2}</string>\n\t\t\t</object>\n\t\t</object>\n\t</data>\n</archive>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Entitlements.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>get-task-allow</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Info-iPhone.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>en</string>\n\t<key>CFBundleDisplayName</key>\n\t<string>${PRODUCT_NAME}</string>\n\t<key>CFBundleExecutable</key>\n\t<string>${EXECUTABLE_NAME}</string>\n\t<key>CFBundleIconFile</key>\n\t<string>Squeak72x72.png</string>\n\t<key>CFBundleIconFiles</key>\n\t<array>\n\t\t<string>Squeak72x72.png</string>\n\t\t<string>Squeak72x72.png</string>\n\t</array>\n\t<key>CFBundleIdentifier</key>\n\t<string>soft.roarvm.poc</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>${PRODUCT_NAME}</string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>3.0</string>\n\t<key>CFBundleSignature</key>\n\t<string>FAST</string>\n\t<key>CFBundleVersion</key>\n\t<string>0.1</string>\n\t<key>LSRequiresIPhoneOS</key>\n\t<true/>\n\t<key>NSMainNibFile</key>\n\t<string>MainWindow</string>\n\t<key>NSMainNibFile~ipad</key>\n\t<string>MainWindow-iPad</string>\n\t<key>UIFileSharingEnabled</key>\n\t<true/>\n\t<key>UIInterfaceOrientation</key>\n\t<string>UIInterfaceOrientationPortrait</string>\n\t<key>UIPrerenderedIcon</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/MainWindow.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<archive type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" version=\"7.10\">\n\t<data>\n\t\t<int key=\"IBDocument.SystemTarget\">512</int>\n\t\t<string key=\"IBDocument.SystemVersion\">10D573</string>\n\t\t<string key=\"IBDocument.InterfaceBuilderVersion\">762</string>\n\t\t<string key=\"IBDocument.AppKitVersion\">1038.29</string>\n\t\t<string key=\"IBDocument.HIToolboxVersion\">460.00</string>\n\t\t<object class=\"NSMutableDictionary\" key=\"IBDocument.PluginVersions\">\n\t\t\t<string key=\"NS.key.0\">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>\n\t\t\t<string key=\"NS.object.0\">87</string>\n\t\t</object>\n\t\t<object class=\"NSMutableArray\" key=\"IBDocument.EditedObjectIDs\">\n\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t<integer value=\"2\"/>\n\t\t</object>\n\t\t<object class=\"NSArray\" key=\"IBDocument.PluginDependencies\">\n\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>\n\t\t</object>\n\t\t<object class=\"NSMutableDictionary\" key=\"IBDocument.Metadata\">\n\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t<object class=\"NSArray\" key=\"dict.sortedKeys\" id=\"0\">\n\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t</object>\n\t\t\t<object class=\"NSMutableArray\" key=\"dict.values\">\n\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t</object>\n\t\t</object>\n\t\t<object class=\"NSMutableArray\" key=\"IBDocument.RootObjects\" id=\"1000\">\n\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t<object class=\"IBProxyObject\" id=\"841351856\">\n\t\t\t\t<string key=\"IBProxiedObjectIdentifier\">IBFilesOwner</string>\n\t\t\t\t<string key=\"targetRuntimeIdentifier\">IBCocoaTouchFramework</string>\n\t\t\t</object>\n\t\t\t<object class=\"IBProxyObject\" id=\"64004946\">\n\t\t\t\t<string key=\"IBProxiedObjectIdentifier\">IBFirstResponder</string>\n\t\t\t\t<string key=\"targetRuntimeIdentifier\">IBCocoaTouchFramework</string>\n\t\t\t</object>\n\t\t\t<object class=\"IBUICustomObject\" id=\"664661524\">\n\t\t\t\t<string key=\"targetRuntimeIdentifier\">IBCocoaTouchFramework</string>\n\t\t\t</object>\n\t\t\t<object class=\"IBUIWindow\" id=\"380026005\">\n\t\t\t\t<reference key=\"NSNextResponder\"/>\n\t\t\t\t<int key=\"NSvFlags\">1316</int>\n\t\t\t\t<object class=\"NSPSMatrix\" key=\"NSFrameMatrix\"/>\n\t\t\t\t<string key=\"NSFrameSize\">{320, 480}</string>\n\t\t\t\t<reference key=\"NSSuperview\"/>\n\t\t\t\t<object class=\"NSColor\" key=\"IBUIBackgroundColor\">\n\t\t\t\t\t<int key=\"NSColorSpace\">1</int>\n\t\t\t\t\t<bytes key=\"NSRGB\">MSAxIDEAA</bytes>\n\t\t\t\t</object>\n\t\t\t\t<bool key=\"IBUIOpaque\">NO</bool>\n\t\t\t\t<bool key=\"IBUIClearsContextBeforeDrawing\">NO</bool>\n\t\t\t\t<bool key=\"IBUIMultipleTouchEnabled\">YES</bool>\n\t\t\t\t<string key=\"targetRuntimeIdentifier\">IBCocoaTouchFramework</string>\n\t\t\t\t<bool key=\"IBUIVisibleAtLaunch\">YES</bool>\n\t\t\t</object>\n\t\t</object>\n\t\t<object class=\"IBObjectContainer\" key=\"IBDocument.Objects\">\n\t\t\t<object class=\"NSMutableArray\" key=\"connectionRecords\">\n\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBCocoaTouchOutletConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">delegate</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"841351856\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"664661524\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">4</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBCocoaTouchOutletConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">window</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"664661524\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"380026005\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">5</int>\n\t\t\t\t</object>\n\t\t\t</object>\n\t\t\t<object class=\"IBMutableOrderedSet\" key=\"objectRecords\">\n\t\t\t\t<object class=\"NSArray\" key=\"orderedObjects\">\n\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">0</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"0\"/>\n\t\t\t\t\t\t<reference key=\"children\" ref=\"1000\"/>\n\t\t\t\t\t\t<nil key=\"parent\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">2</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"380026005\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"0\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">-1</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"841351856\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"0\"/>\n\t\t\t\t\t\t<string key=\"objectName\">File's Owner</string>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">3</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"664661524\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"0\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">-2</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"64004946\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"0\"/>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t</object>\n\t\t\t<object class=\"NSMutableDictionary\" key=\"flattenedProperties\">\n\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t<object class=\"NSArray\" key=\"dict.sortedKeys\">\n\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t<string>-1.CustomClassName</string>\n\t\t\t\t\t<string>-2.CustomClassName</string>\n\t\t\t\t\t<string>2.IBAttributePlaceholdersKey</string>\n\t\t\t\t\t<string>2.IBEditorWindowLastContentRect</string>\n\t\t\t\t\t<string>2.IBPluginDependency</string>\n\t\t\t\t\t<string>3.CustomClassName</string>\n\t\t\t\t\t<string>3.IBPluginDependency</string>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"NSMutableArray\" key=\"dict.values\">\n\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t<string>UIApplication</string>\n\t\t\t\t\t<string>UIResponder</string>\n\t\t\t\t\t<object class=\"NSMutableDictionary\">\n\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t<reference key=\"dict.sortedKeys\" ref=\"0\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"dict.values\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t</object>\n\t\t\t\t\t<string>{{362, 376}, {320, 480}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>\n\t\t\t\t\t<string>SqueakNoOGLIPhoneAppDelegate</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>\n\t\t\t\t</object>\n\t\t\t</object>\n\t\t\t<object class=\"NSMutableDictionary\" key=\"unlocalizedProperties\">\n\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t<reference key=\"dict.sortedKeys\" ref=\"0\"/>\n\t\t\t\t<object class=\"NSMutableArray\" key=\"dict.values\">\n\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t</object>\n\t\t\t</object>\n\t\t\t<nil key=\"activeLocalization\"/>\n\t\t\t<object class=\"NSMutableDictionary\" key=\"localizations\">\n\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t<reference key=\"dict.sortedKeys\" ref=\"0\"/>\n\t\t\t\t<object class=\"NSMutableArray\" key=\"dict.values\">\n\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t</object>\n\t\t\t</object>\n\t\t\t<nil key=\"sourceID\"/>\n\t\t\t<int key=\"maxID\">14</int>\n\t\t</object>\n\t\t<object class=\"IBClassDescriber\" key=\"IBDocument.Classes\">\n\t\t\t<object class=\"NSMutableArray\" key=\"referencedPartialClassDescriptions\">\n\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">SqueakNoOGLIPhoneAppDelegate</string>\n\t\t\t\t\t<string key=\"superclassName\">sqSqueakAppDelegate</string>\n\t\t\t\t\t<object class=\"NSMutableDictionary\" key=\"outlets\">\n\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t<object class=\"NSArray\" key=\"dict.sortedKeys\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<string>mainView</string>\n\t\t\t\t\t\t\t<string>viewController</string>\n\t\t\t\t\t\t\t<string>window</string>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"dict.values\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<string>SqueakUIView</string>\n\t\t\t\t\t\t\t<string>SqueakUIController</string>\n\t\t\t\t\t\t\t<string>UIWindow</string>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBProjectSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">platforms/Mac OSObjC/vm/iPhone/Classes/SqueakNoOGLIPhoneAppDelegate.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">SqueakUIController</string>\n\t\t\t\t\t<string key=\"superclassName\">UIViewController</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBProjectSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">platforms/Mac OSObjC/vm/iPhone/Classes/SqueakUIController.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">SqueakUIView</string>\n\t\t\t\t\t<string key=\"superclassName\">UIView</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBProjectSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">platforms/Mac OSObjC/vm/iPhone/Classes/SqueakUIView.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">UIApplication</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBProjectSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">platforms/Mac OSObjC/vm/iPhone/Classes/sqSqueakIPhoneApplication+Network.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">sqSqueakAppDelegate</string>\n\t\t\t\t\t<string key=\"superclassName\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBProjectSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">platforms/Mac OSObjC/vm/Common/Classes/sqSqueakAppDelegate.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t</object>\n\t\t\t<object class=\"NSMutableArray\" key=\"referencedPartialClassDescriptionsV3.2+\">\n\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSAccessibility.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSApplication.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSApplicationScripting.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSColorPanel.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSControl.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSDictionaryController.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSDragging.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSFontManager.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSFontPanel.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSKeyValueBinding.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSMenu.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSNibLoading.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSOutlineView.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSPasteboard.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSSavePanel.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSTableView.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSToolbarItem.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSView.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSArchiver.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSClassDescription.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSError.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSFileManager.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSKeyValueCoding.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSKeyValueObserving.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSKeyedArchiver.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSObject.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSObjectScripting.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSPortCoder.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSRunLoop.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSScriptClassDescription.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSScriptKeyValueCoding.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSScriptObjectSpecifiers.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSScriptWhoseTests.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSThread.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSURL.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSURLConnection.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSURLDownload.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">PrintCore.framework/Headers/PDEPluginInterface.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">QuartzCore.framework/Headers/CAAnimation.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">QuartzCore.framework/Headers/CALayer.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">QuartzCore.framework/Headers/CIImageProvider.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t</object>\n\t\t</object>\n\t\t<int key=\"IBDocument.localizationMode\">0</int>\n\t\t<string key=\"IBDocument.TargetRuntimeIdentifier\">IBCocoaTouchFramework</string>\n\t\t<object class=\"NSMutableDictionary\" key=\"IBDocument.PluginDeclaredDependencies\">\n\t\t\t<string key=\"NS.key.0\">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>\n\t\t\t<integer value=\"512\" key=\"NS.object.0\"/>\n\t\t</object>\n\t\t<object class=\"NSMutableDictionary\" key=\"IBDocument.PluginDeclaredDependencyDefaults\">\n\t\t\t<string key=\"NS.key.0\">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>\n\t\t\t<integer value=\"800\" key=\"NS.object.0\"/>\n\t\t</object>\n\t\t<object class=\"NSMutableDictionary\" key=\"IBDocument.PluginDeclaredDevelopmentDependencies\">\n\t\t\t<string key=\"NS.key.0\">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>\n\t\t\t<integer value=\"3000\" key=\"NS.object.0\"/>\n\t\t</object>\n\t\t<bool key=\"IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion\">YES</bool>\n\t\t<string key=\"IBDocument.LastKnownRelativeProjectPath\">SqueakPureObjc.xcodeproj</string>\n\t\t<int key=\"IBDocument.defaultPropertyAccessControl\">3</int>\n\t\t<string key=\"IBCocoaTouchPluginVersion\">87</string>\n\t</data>\n</archive>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/BitMapConversionLogicFromX11.c",
    "content": "/*\n *  BitMapConversionLogicFromX11.c\n *  SqueakPureObjc\n *\n *  Created by John M McIntosh on 09-12-08.\n *  Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n *\tThis code is comes from the sqUnixX11.c logic to convert Squeak Forms to 32bit image data\n *\n */\n/* sqUnixX11.c -- support for display via the X Window System.\n * \n *   Copyright (C) 1996-2008 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a copy\n *   of this software and associated documentation files (the \"Software\"), to deal\n *   in the Software without restriction, including without limitation the rights\n *   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n *   copies of the Software, and to permit persons to whom the Software is\n *   furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n *   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n *   SOFTWARE.\n */\n\n#include \"BitMapConversionLogicFromX11.h\"\n\n//#define DEBUG\n#include <stdio.h>\n\nvoid copyImage16To32(short *fromImageData, int *toImageData, int width, int height,\n\t\t\t\t\t int affectedL, int affectedT, int affectedR, int affectedB)\n{\n\tlong scanLine16, firstWord16, lastWord16;\n\tlong scanLine32, firstWord32;\n\tint line;\n\tregister unsigned int col;\n\n#if defined(DEBUG)\n\tfprintf(stderr, \"copyImg16to32 %p -> %p (%d %d) %d %d %d %d\\n\",\n\t\t\tfromImageData, toImageData, width, height,\n\t\t\taffectedT, affectedL, affectedB, affectedR);\n#endif\n\t\n#define map16To32(w) (col= (w), \\\n(((col >> 10) & 0x1f) << 3) | \\\n(((col >> 5)  & 0x1f) << 11) | \\\n((col & 0x1f) << 19))\n\t\n\tscanLine16= bytesPerLine(width, 16);\n\tfirstWord16= scanLine16*affectedT + bytesPerLineRD(affectedL, 16);\n\tlastWord16= scanLine16*affectedT + bytesPerLine(affectedR, 16);\n\tscanLine32= bytesPerLine(width, 32);\n\tfirstWord32= 0;\n\t\n\tfor (line= affectedT; line < affectedB; line++)\n    {\n\t\tregister unsigned short *from= (unsigned short *)((long)fromImageData+firstWord16);\n\t\tregister unsigned short *limit= (unsigned short *)((long)fromImageData+lastWord16);\n\t\tregister unsigned int *to= (unsigned int *)((long)toImageData+firstWord32);\n\t\twhile (from < limit)\n\t\t{\n#\t if defined(WORDS_BIGENDIAN)\n\t\t\tto[0]= map16To32(from[0]);\n\t\t\tto[1]= map16To32(from[1]);\n#\t else\n\t\t\tto[0]= map16To32(from[1]);\n\t\t\tto[1]= map16To32(from[0]);\n#\t endif\n\t\t\tfrom+= 2;\n\t\t\tto+= 2;\n\t\t}\n\t\tfirstWord16+= scanLine16;\n\t\tlastWord16+= scanLine16;\n\t\tfirstWord32+= scanLine32;\n    }\n#undef map16To32\n}\n\nvoid copyImage8To32(int *fromImageData, int *toImageData, int width, int height,\n\t\t\t\t\tint affectedL, int affectedT, int affectedR, int affectedB, unsigned int * stColors)\n{\n\tlong scanLine8, firstWord8, lastWord8;\n\tlong scanLine32, firstWord32;\n\tint line;\n\t\n\tscanLine8= bytesPerLine(width, 8);\n\tfirstWord8= scanLine8*affectedT + bytesPerLineRD(affectedL, 8);\n\tlastWord8= scanLine8*affectedT + bytesPerLine(affectedR, 8);\n\tscanLine32= bytesPerLine(width, 32);\n\tfirstWord32= 0;\n\t\n\tfor (line= affectedT; line < affectedB; line++)\n    {\n\t\tregister unsigned char *from= (unsigned char *)((long)fromImageData+firstWord8);\n\t\tregister unsigned char *limit= (unsigned char *)((long)fromImageData+lastWord8);\n\t\tregister unsigned int *to= (unsigned int *)((long)toImageData+firstWord32);\n\t\twhile (from < limit)\n\t\t{\n#\t if defined(WORDS_BIGENDIAN)\n\t\t\tto[0]= stColors[from[0]];\n\t\t\tto[1]= stColors[from[1]];\n\t\t\tto[2]= stColors[from[2]];\n\t\t\tto[3]= stColors[from[3]];\n#\t else\n\t\t\tto[0]= stColors[from[3]];\n\t\t\tto[1]= stColors[from[2]];\n\t\t\tto[2]= stColors[from[1]];\n\t\t\tto[3]= stColors[from[0]];\n#\t endif\n\t\t\tfrom+= 4;\n\t\t\tto+= 4;\n\t\t}\n\t\tfirstWord8+= scanLine8;\n\t\tlastWord8+= scanLine8;\n\t\tfirstWord32+= scanLine32;\n    }\n}\n\nvoid copyImage4To32(int *fromImageData, int *toImageData, int width, int height,\n\t\t\t\t\tint affectedL, int affectedT, int affectedR, int affectedB, unsigned int * stColors)\n{\n\tint scanLine4, firstWord4, firstShift4;\n\tlong scanLine32, firstWord32, lastWord32;\n\tlong line;\n\t\n\tscanLine4= bytesPerLine(width, 4);\n\tfirstWord4= scanLine4*affectedT + bytesPerLineRD(affectedL, 4);\n\tfirstShift4= 28 - ((affectedL & 7) * 4);\n\t\n\tscanLine32= bytesPerLine(width, 32);\n\tfirstWord32= 0;\n\tlastWord32= bytesPerLineRD(affectedR, 32);\n\t\n\tfor (line= affectedT; line < affectedB; line++)\n    {\n\t\tregister unsigned int *from= (unsigned int *)((long)fromImageData+firstWord4);\n\t\tregister unsigned int *to= (unsigned int *)((long)toImageData+firstWord32);\n\t\tregister unsigned int *limit= (unsigned int *)((long)toImageData+lastWord32);\n\t\tregister int shift= firstShift4;\n\t\twhile (to < limit)\n\t\t{\n\t\t\t*to= stColors[(*from >> shift) & 15];\n\t\t\tto++;\n\t\t\tshift-= 4;\n\t\t\tif (shift < 0)\n\t\t\t{\n\t\t\t\tshift= 28;\n\t\t\t\tfrom++;\n\t\t\t}\n\t\t}\n\t\tfirstWord4+= scanLine4;\n\t\tfirstWord32+= scanLine32;\n\t\tlastWord32+= scanLine32;\n    }\n}\n\nvoid copyImage2To32(int *fromImageData, int *toImageData, int width, int height,\n\t\t\t\t\tint affectedL, int affectedT, int affectedR, int affectedB, unsigned int * stColors)\n{\n\tlong scanLine2, firstWord2, firstShift2;\n\tlong scanLine32, firstWord32, lastWord32;\n\tint line;\n\t\n\tscanLine2= bytesPerLine(width, 2);\n\tfirstWord2= scanLine2*affectedT + bytesPerLineRD(affectedL, 2);\n\tfirstShift2= 30 - ((affectedL & 15) * 2);\n\t\n\tscanLine32= bytesPerLine(width, 32);\n\tfirstWord32= 0;\n\tlastWord32= bytesPerLineRD(affectedR, 32);\n\t\n\tfor (line= affectedT; line < affectedB; line++)\n    {\n\t\tregister unsigned int *from= (unsigned int *)((long)fromImageData+firstWord2);\n\t\tregister unsigned int *to= (unsigned int *)((long)toImageData+firstWord32);\n\t\tregister unsigned int *limit= (unsigned int *)((long)toImageData+lastWord32);\n\t\tregister int shift= firstShift2;\n\t\twhile (to < limit)\n\t\t{\n\t\t\t*to= stColors[(*from >> shift) & 3];\n\t\t\tto++;\n\t\t\tshift-= 2;\n\t\t\tif (shift < 0)\n\t\t\t{\n\t\t\t\tshift= 30;\n\t\t\t\tfrom++;\n\t\t\t}\n\t\t}\n\t\tfirstWord2+= scanLine2;\n\t\tfirstWord32+= scanLine32;\n\t\tlastWord32+= scanLine32;\n    }\n}\n\nvoid copyImage1To32(int *fromImageData, int *toImageData, int width, int height,\n\t\t\t\t\tint affectedL, int affectedT, int affectedR, int affectedB, unsigned int * stColors)\n{\n\tlong scanLine1, firstWord1, firstShift1;\n\tlong scanLine32, firstWord32, lastWord32;\n\tint line;\n\t\n\tscanLine1= bytesPerLine(width, 1);\n\tfirstWord1= scanLine1*affectedT + bytesPerLineRD(affectedL, 1);\n\tfirstShift1= 31 - (affectedL & 31);\n\t\n\tscanLine32= bytesPerLine(width, 32);\n\tfirstWord32= 0;\n\tlastWord32= bytesPerLine(affectedR, 32);\n\t\n\tfor (line= affectedT; line < affectedB; line++)\n    {\n\t\tregister unsigned int *from= (unsigned int *)((long)fromImageData+firstWord1);\n\t\tregister unsigned int *to= (unsigned int *)((long)toImageData+firstWord32);\n\t\tregister unsigned int *limit= (unsigned int *)((long)toImageData+lastWord32);\n\t\tregister int shift= firstShift1;\n\t\twhile (to < limit)\n\t\t{\n\t\t\t*to= stColors[(*from >> shift) & 1];\n\t\t\tto++;\n\t\t\tshift--;\n\t\t\tif (shift < 0)\n\t\t\t{\n\t\t\t\tshift= 31;\n\t\t\t\tfrom++;\n\t\t\t}\n\t\t}\n\t\tfirstWord1+= scanLine1;\n\t\tfirstWord32+= scanLine32;\n\t\tlastWord32+= scanLine32;\n    }\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/BitMapConversionLogicFromX11.h",
    "content": "/*\n *  BitMapConversionLogicFromX11.h\n *  SqueakPureObjc\n *\n *  Created by John M McIntosh on 09-12-08.\n *  Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n *\n *\tThis code is comes from the sqUnixX11.c logic to convert Squeak Forms to 32bit image data\n */\n\n#define bytesPerLine(width, depth)\t((((width)*(depth) + 31) >> 5) << 2)\n#define bytesPerLineRD(width, depth)\t((((width)*(depth)) >> 5) << 2)\n\n\nvoid copyImage16To32(short *fromImageData, int *toImageData, int width, int height,\n\t\t\t\t\t int affectedL, int affectedT, int affectedR, int affectedB);\n\nvoid copyImage8To32(int *fromImageData, int *toImageData, int width, int height,\n\t\t\t\t\tint affectedL, int affectedT, int affectedR, int affectedB, unsigned int *colorMap);\n\nvoid copyImage2To32(int *fromImageData, int *toImageData, int width, int height,\n\t\t\t\t\tint affectedL, int affectedT, int affectedR, int affectedB, unsigned int * stColors);\n\nvoid copyImage1To32(int *fromImageData, int *toImageData, int width, int height,\n\t\t\t\t\tint affectedL, int affectedT, int affectedR, int affectedB, unsigned int * stColors);"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/Credits.rtf",
    "content": "{\\rtf1\\ansi\\ansicpg1252\\cocoartf1038\\cocoasubrtf320\n{\\fonttbl\\f0\\fswiss\\fcharset0 Helvetica;}\n{\\colortbl;\\red255\\green255\\blue255;}\n\\pard\\tx566\\tx1133\\tx1700\\tx2267\\tx2834\\tx3401\\tx3968\\tx4535\\tx5102\\tx5669\\tx6236\\tx6803\\qc\n\n\\f0\\fs22 \\cf0 Thanks to the European Smalltalk User Group\\\n(ESUG) for funding the iPhone implementation,\\\nand the Cocoa OS-X rewrite for 64 bits.\\\n\\\nOS-X & iOS port: John M McIntosh.\\\nCopyright (c) 2009-2010 Corporate Smalltalk Consulting Ltd.\\\n\\\nWith some code by Ian Piumarta, \\\nclues from Marcel Weiher's Cocoa port,\\\nand bits from John Maloney and others.\\\n\\\nAll contributions from Teleplace in this release are\\\nCopyright (c) 2010 Teleplace, Inc.}"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/English.lproj/InfoPlist.strings",
    "content": "/* Localized versions of Info.plist keys */\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/English.lproj/MainMenu.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<archive type=\"com.apple.InterfaceBuilder3.Cocoa.XIB\" version=\"7.10\">\n\t<data>\n\t\t<int key=\"IBDocument.SystemTarget\">1060</int>\n\t\t<string key=\"IBDocument.SystemVersion\">10A324</string>\n\t\t<string key=\"IBDocument.InterfaceBuilderVersion\">719</string>\n\t\t<string key=\"IBDocument.AppKitVersion\">1015</string>\n\t\t<string key=\"IBDocument.HIToolboxVersion\">418.00</string>\n\t\t<object class=\"NSMutableDictionary\" key=\"IBDocument.PluginVersions\">\n\t\t\t<string key=\"NS.key.0\">com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t<string key=\"NS.object.0\">719</string>\n\t\t</object>\n\t\t<object class=\"NSMutableArray\" key=\"IBDocument.EditedObjectIDs\">\n\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t<integer value=\"371\"/>\n\t\t\t<integer value=\"29\"/>\n\t\t</object>\n\t\t<object class=\"NSArray\" key=\"IBDocument.PluginDependencies\">\n\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t</object>\n\t\t<object class=\"NSMutableDictionary\" key=\"IBDocument.Metadata\">\n\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t<object class=\"NSArray\" key=\"dict.sortedKeys\" id=\"0\">\n\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t</object>\n\t\t\t<object class=\"NSMutableArray\" key=\"dict.values\">\n\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t</object>\n\t\t</object>\n\t\t<object class=\"NSMutableArray\" key=\"IBDocument.RootObjects\" id=\"1048\">\n\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t<object class=\"NSCustomObject\" id=\"1021\">\n\t\t\t\t<string key=\"NSClassName\">NSApplication</string>\n\t\t\t</object>\n\t\t\t<object class=\"NSCustomObject\" id=\"1014\">\n\t\t\t\t<string key=\"NSClassName\">FirstResponder</string>\n\t\t\t</object>\n\t\t\t<object class=\"NSCustomObject\" id=\"1050\">\n\t\t\t\t<string key=\"NSClassName\">NSApplication</string>\n\t\t\t</object>\n\t\t\t<object class=\"NSMenu\" id=\"649796088\">\n\t\t\t\t<string key=\"NSTitle\">AMainMenu</string>\n\t\t\t\t<object class=\"NSMutableArray\" key=\"NSMenuItems\">\n\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t<object class=\"NSMenuItem\" id=\"694149608\">\n\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"649796088\"/>\n\t\t\t\t\t\t<string key=\"NSTitle\">SqueakOSXApp</string>\n\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t<object class=\"NSCustomResource\" key=\"NSOnImage\" id=\"35465992\">\n\t\t\t\t\t\t\t<string key=\"NSClassName\">NSImage</string>\n\t\t\t\t\t\t\t<string key=\"NSResourceName\">NSMenuCheckmark</string>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<object class=\"NSCustomResource\" key=\"NSMixedImage\" id=\"502551668\">\n\t\t\t\t\t\t\t<string key=\"NSClassName\">NSImage</string>\n\t\t\t\t\t\t\t<string key=\"NSResourceName\">NSMenuMixedState</string>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<string key=\"NSAction\">submenuAction:</string>\n\t\t\t\t\t\t<object class=\"NSMenu\" key=\"NSSubmenu\" id=\"110575045\">\n\t\t\t\t\t\t\t<string key=\"NSTitle\">SqueakOSXApp</string>\n\t\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"NSMenuItems\">\n\t\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"238522557\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"110575045\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">About SqueakOSXApp</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"304266470\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"110575045\"/>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsSeparator\">YES</bool>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"609285721\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"110575045\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Preferences…</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">,</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"481834944\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"110575045\"/>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsSeparator\">YES</bool>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"1046388886\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"110575045\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Services</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSAction\">submenuAction:</string>\n\t\t\t\t\t\t\t\t\t<object class=\"NSMenu\" key=\"NSSubmenu\" id=\"752062318\">\n\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Services</string>\n\t\t\t\t\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"NSMenuItems\">\n\t\t\t\t\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t<string key=\"NSName\">_NSServicesMenu</string>\n\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"646227648\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"110575045\"/>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsSeparator\">YES</bool>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"755159360\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"110575045\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Hide SqueakOSXApp</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">h</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"342932134\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"110575045\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Hide Others</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">h</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1572864</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"908899353\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"110575045\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Show All</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"1056857174\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"110575045\"/>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsSeparator\">YES</bool>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"632727374\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"110575045\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Quit SqueakOSXApp</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">q</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t<string key=\"NSName\">_NSAppleMenu</string>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"NSMenuItem\" id=\"379814623\">\n\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"649796088\"/>\n\t\t\t\t\t\t<string key=\"NSTitle\">File</string>\n\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t<string key=\"NSAction\">submenuAction:</string>\n\t\t\t\t\t\t<object class=\"NSMenu\" key=\"NSSubmenu\" id=\"720053764\">\n\t\t\t\t\t\t\t<string key=\"NSTitle\">File</string>\n\t\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"NSMenuItems\">\n\t\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"705341025\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"720053764\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">New</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">n</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"722745758\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"720053764\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Open…</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">o</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"1025936716\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"720053764\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Open Recent</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSAction\">submenuAction:</string>\n\t\t\t\t\t\t\t\t\t<object class=\"NSMenu\" key=\"NSSubmenu\" id=\"1065607017\">\n\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Open Recent</string>\n\t\t\t\t\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"NSMenuItems\">\n\t\t\t\t\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"759406840\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"1065607017\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Clear Menu</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t<string key=\"NSName\">_NSRecentDocumentsMenu</string>\n\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"425164168\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"720053764\"/>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsSeparator\">YES</bool>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"776162233\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"720053764\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Close</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">w</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"1023925487\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"720053764\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Save</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">s</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"117038363\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"720053764\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Save As…</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">S</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1179648</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"579971712\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"720053764\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Revert to Saved</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"1010469920\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"720053764\"/>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsSeparator\">YES</bool>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"294629803\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"720053764\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Page Setup...</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">P</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1179648</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSToolTip\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"49223823\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"720053764\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Print…</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">p</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"NSMenuItem\" id=\"952259628\">\n\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"649796088\"/>\n\t\t\t\t\t\t<string key=\"NSTitle\">Edit</string>\n\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t<string key=\"NSAction\">submenuAction:</string>\n\t\t\t\t\t\t<object class=\"NSMenu\" key=\"NSSubmenu\" id=\"789758025\">\n\t\t\t\t\t\t\t<string key=\"NSTitle\">Edit</string>\n\t\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"NSMenuItems\">\n\t\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"1058277027\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"789758025\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Undo</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">z</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"790794224\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"789758025\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Redo</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">Z</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1179648</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"1040322652\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"789758025\"/>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsSeparator\">YES</bool>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"296257095\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"789758025\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Cut</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">x</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"860595796\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"789758025\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Copy</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">c</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"29853731\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"789758025\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Paste</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">v</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"82994268\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"789758025\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Paste and Match Style</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">V</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1572864</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"437104165\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"789758025\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Delete</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"583158037\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"789758025\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Select All</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">a</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"212016141\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"789758025\"/>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsSeparator\">YES</bool>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"892235320\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"789758025\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Find</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSAction\">submenuAction:</string>\n\t\t\t\t\t\t\t\t\t<object class=\"NSMenu\" key=\"NSSubmenu\" id=\"963351320\">\n\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Find</string>\n\t\t\t\t\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"NSMenuItems\">\n\t\t\t\t\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"447796847\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"963351320\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Find…</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">f</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSTag\">1</int>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"326711663\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"963351320\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Find Next</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">g</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSTag\">2</int>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"270902937\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"963351320\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Find Previous</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">G</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1179648</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSTag\">3</int>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"159080638\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"963351320\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Use Selection for Find</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">e</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSTag\">7</int>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"88285865\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"963351320\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Jump to Selection</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">j</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"972420730\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"789758025\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Spelling and Grammar</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSAction\">submenuAction:</string>\n\t\t\t\t\t\t\t\t\t<object class=\"NSMenu\" key=\"NSSubmenu\" id=\"769623530\">\n\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Spelling and Grammar</string>\n\t\t\t\t\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"NSMenuItems\">\n\t\t\t\t\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"679648819\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"769623530\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Show Spelling and Grammar</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">:</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"96193923\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"769623530\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Check Document Now</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">;</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"859480356\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"769623530\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t\t<bool key=\"NSIsSeparator\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"948374510\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"769623530\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Check Spelling While Typing</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"967646866\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"769623530\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Check Grammar With Spelling</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"795346622\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"769623530\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Correct Spelling Automatically</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"507821607\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"789758025\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Substitutions</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSAction\">submenuAction:</string>\n\t\t\t\t\t\t\t\t\t<object class=\"NSMenu\" key=\"NSSubmenu\" id=\"698887838\">\n\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Substitutions</string>\n\t\t\t\t\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"NSMenuItems\">\n\t\t\t\t\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"65139061\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"698887838\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Show Substitutions</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"19036812\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"698887838\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t\t<bool key=\"NSIsSeparator\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"605118523\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"698887838\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Smart Copy/Paste</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">f</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSTag\">1</int>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"197661976\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"698887838\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Smart Quotes</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">g</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSTag\">2</int>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"672708820\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"698887838\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Smart Dashes</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"708854459\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"698887838\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Smart Links</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">G</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1179648</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSTag\">3</int>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"537092702\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"698887838\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Text Replacement</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"288088188\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"789758025\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Transformations</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSAction\">submenuAction:</string>\n\t\t\t\t\t\t\t\t\t<object class=\"NSMenu\" key=\"NSSubmenu\" id=\"579392910\">\n\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Transformations</string>\n\t\t\t\t\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"NSMenuItems\">\n\t\t\t\t\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"1060694897\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"579392910\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Make Upper Case</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"879586729\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"579392910\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Make Lower Case</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"56570060\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"579392910\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Capitalize</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"676164635\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"789758025\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Speech</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSAction\">submenuAction:</string>\n\t\t\t\t\t\t\t\t\t<object class=\"NSMenu\" key=\"NSSubmenu\" id=\"785027613\">\n\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Speech</string>\n\t\t\t\t\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"NSMenuItems\">\n\t\t\t\t\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"731782645\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"785027613\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Start Speaking</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"680220178\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"785027613\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Stop Speaking</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"NSMenuItem\" id=\"302598603\">\n\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"649796088\"/>\n\t\t\t\t\t\t<string key=\"NSTitle\">Format</string>\n\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t<string key=\"NSAction\">submenuAction:</string>\n\t\t\t\t\t\t<object class=\"NSMenu\" key=\"NSSubmenu\" id=\"941447902\">\n\t\t\t\t\t\t\t<string key=\"NSTitle\">Format</string>\n\t\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"NSMenuItems\">\n\t\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"792887677\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"941447902\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Font</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSAction\">submenuAction:</string>\n\t\t\t\t\t\t\t\t\t<object class=\"NSMenu\" key=\"NSSubmenu\" id=\"786677654\">\n\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Font</string>\n\t\t\t\t\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"NSMenuItems\">\n\t\t\t\t\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"159677712\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"786677654\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Show Fonts</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">t</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"305399458\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"786677654\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Bold</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">b</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSTag\">2</int>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"814362025\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"786677654\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Italic</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">i</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSTag\">1</int>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"330926929\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"786677654\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Underline</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">u</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"533507878\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"786677654\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t\t<bool key=\"NSIsSeparator\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"158063935\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"786677654\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Bigger</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">+</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSTag\">3</int>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"885547335\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"786677654\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Smaller</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">-</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSTag\">4</int>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"901062459\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"786677654\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t\t<bool key=\"NSIsSeparator\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"767671776\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"786677654\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Kern</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSAction\">submenuAction:</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenu\" key=\"NSSubmenu\" id=\"175441468\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Kern</string>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"NSMenuItems\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"252969304\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"175441468\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Use Default</string>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"766922938\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"175441468\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Use None</string>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"677519740\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"175441468\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Tighten</string>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"238351151\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"175441468\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Loosen</string>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"691570813\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"786677654\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Ligature</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSAction\">submenuAction:</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenu\" key=\"NSSubmenu\" id=\"1058217995\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Ligature</string>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"NSMenuItems\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"706297211\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"1058217995\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Use Default</string>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"568384683\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"1058217995\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Use None</string>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"663508465\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"1058217995\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Use All</string>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"769124883\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"786677654\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Baseline</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSAction\">submenuAction:</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenu\" key=\"NSSubmenu\" id=\"18263474\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Baseline</string>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"NSMenuItems\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"257962622\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"18263474\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Use Default</string>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"644725453\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"18263474\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Superscript</string>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"1037576581\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"18263474\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Subscript</string>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"941806246\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"18263474\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Raise</string>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"1045724900\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"18263474\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Lower</string>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"739652853\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"786677654\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t\t<bool key=\"NSIsSeparator\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"1012600125\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"786677654\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Show Colors</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">C</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"214559597\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"786677654\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t\t<bool key=\"NSIsSeparator\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"596732606\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"786677654\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Copy Style</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">c</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1572864</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"393423671\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"786677654\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Paste Style</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">v</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1572864</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t<string key=\"NSName\">_NSFontMenu</string>\n\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"215659978\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"941447902\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Text</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSAction\">submenuAction:</string>\n\t\t\t\t\t\t\t\t\t<object class=\"NSMenu\" key=\"NSSubmenu\" id=\"446991534\">\n\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Text</string>\n\t\t\t\t\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"NSMenuItems\">\n\t\t\t\t\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"875092757\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"446991534\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Align Left</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">{</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"630155264\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"446991534\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Center</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">|</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"945678886\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"446991534\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Justify</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"512868991\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"446991534\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Align Right</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">}</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"163117631\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"446991534\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t\t<bool key=\"NSIsSeparator\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"31516759\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"446991534\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Writing Direction</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSAction\">submenuAction:</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenu\" key=\"NSSubmenu\" id=\"956096989\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Writing Direction</string>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"NSMenuItems\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"257099033\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"956096989\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Paragraph</string>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"551969625\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"956096989\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string type=\"base64-UTF8\" key=\"NSTitle\">CURlZmF1bHQ</string>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"249532473\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"956096989\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string type=\"base64-UTF8\" key=\"NSTitle\">CUxlZnQgdG8gUmlnaHQ</string>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"607364498\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"956096989\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string type=\"base64-UTF8\" key=\"NSTitle\">CVJpZ2h0IHRvIExlZnQ</string>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"508151438\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"956096989\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<bool key=\"NSIsSeparator\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"981751889\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"956096989\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Selection</string>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"380031999\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"956096989\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string type=\"base64-UTF8\" key=\"NSTitle\">CURlZmF1bHQ</string>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"825984362\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"956096989\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string type=\"base64-UTF8\" key=\"NSTitle\">CUxlZnQgdG8gUmlnaHQ</string>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"560145579\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"956096989\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string type=\"base64-UTF8\" key=\"NSTitle\">CVJpZ2h0IHRvIExlZnQ</string>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"908105787\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"446991534\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t\t<bool key=\"NSIsSeparator\">YES</bool>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"644046920\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"446991534\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Show Ruler</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"231811626\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"446991534\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Copy Ruler</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">c</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1310720</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"883618387\">\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"446991534\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Paste Ruler</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">v</string>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1310720</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"NSMenuItem\" id=\"586577488\">\n\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"649796088\"/>\n\t\t\t\t\t\t<string key=\"NSTitle\">View</string>\n\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t<string key=\"NSAction\">submenuAction:</string>\n\t\t\t\t\t\t<object class=\"NSMenu\" key=\"NSSubmenu\" id=\"466310130\">\n\t\t\t\t\t\t\t<string key=\"NSTitle\">View</string>\n\t\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"NSMenuItems\">\n\t\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"102151532\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"466310130\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Show Toolbar</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">t</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1572864</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"237841660\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"466310130\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Customize Toolbar…</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"NSMenuItem\" id=\"713487014\">\n\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"649796088\"/>\n\t\t\t\t\t\t<string key=\"NSTitle\">Window</string>\n\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t<string key=\"NSAction\">submenuAction:</string>\n\t\t\t\t\t\t<object class=\"NSMenu\" key=\"NSSubmenu\" id=\"835318025\">\n\t\t\t\t\t\t\t<string key=\"NSTitle\">Window</string>\n\t\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"NSMenuItems\">\n\t\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"1011231497\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"835318025\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Minimize</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">m</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"575023229\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"835318025\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Zoom</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"299356726\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"835318025\"/>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsDisabled\">YES</bool>\n\t\t\t\t\t\t\t\t\t<bool key=\"NSIsSeparator\">YES</bool>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"625202149\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"835318025\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">Bring All to Front</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t<string key=\"NSName\">_NSWindowsMenu</string>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"NSMenuItem\" id=\"448692316\">\n\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"649796088\"/>\n\t\t\t\t\t\t<string key=\"NSTitle\">Help</string>\n\t\t\t\t\t\t<string key=\"NSKeyEquiv\"/>\n\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t<string key=\"NSAction\">submenuAction:</string>\n\t\t\t\t\t\t<object class=\"NSMenu\" key=\"NSSubmenu\" id=\"992780483\">\n\t\t\t\t\t\t\t<string key=\"NSTitle\">Help</string>\n\t\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"NSMenuItems\">\n\t\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t\t<object class=\"NSMenuItem\" id=\"105068016\">\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMenu\" ref=\"992780483\"/>\n\t\t\t\t\t\t\t\t\t<string key=\"NSTitle\">SqueakOSXApp Help</string>\n\t\t\t\t\t\t\t\t\t<string key=\"NSKeyEquiv\">?</string>\n\t\t\t\t\t\t\t\t\t<int key=\"NSKeyEquivModMask\">1048576</int>\n\t\t\t\t\t\t\t\t\t<int key=\"NSMnemonicLoc\">2147483647</int>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSOnImage\" ref=\"35465992\"/>\n\t\t\t\t\t\t\t\t\t<reference key=\"NSMixedImage\" ref=\"502551668\"/>\n\t\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t</object>\n\t\t\t\t\t\t\t<string key=\"NSName\">_NSHelpMenu</string>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<string key=\"NSName\">_NSMainMenu</string>\n\t\t\t</object>\n\t\t\t<object class=\"NSWindowTemplate\" id=\"972006081\">\n\t\t\t\t<int key=\"NSWindowStyleMask\">15</int>\n\t\t\t\t<int key=\"NSWindowBacking\">2</int>\n\t\t\t\t<string key=\"NSWindowRect\">{{335, 390}, {480, 360}}</string>\n\t\t\t\t<int key=\"NSWTFlags\">1954021376</int>\n\t\t\t\t<string key=\"NSWindowTitle\">SqueakOSXApp</string>\n\t\t\t\t<string key=\"NSWindowClass\">NSWindow</string>\n\t\t\t\t<nil key=\"NSViewClass\"/>\n\t\t\t\t<string key=\"NSWindowContentMaxSize\">{1.79769e+308, 1.79769e+308}</string>\n\t\t\t\t<object class=\"NSView\" key=\"NSWindowView\" id=\"439893737\">\n\t\t\t\t\t<reference key=\"NSNextResponder\"/>\n\t\t\t\t\t<int key=\"NSvFlags\">256</int>\n\t\t\t\t\t<string key=\"NSFrameSize\">{480, 360}</string>\n\t\t\t\t\t<reference key=\"NSSuperview\"/>\n\t\t\t\t</object>\n\t\t\t\t<string key=\"NSScreenRect\">{{0, 0}, {1920, 1178}}</string>\n\t\t\t\t<string key=\"NSMaxSize\">{1.79769e+308, 1.79769e+308}</string>\n\t\t\t</object>\n\t\t\t<object class=\"NSCustomObject\" id=\"976324537\">\n\t\t\t\t<string key=\"NSClassName\">SqueakOSXAppAppDelegate</string>\n\t\t\t</object>\n\t\t\t<object class=\"NSCustomObject\" id=\"755631768\">\n\t\t\t\t<string key=\"NSClassName\">NSFontManager</string>\n\t\t\t</object>\n\t\t</object>\n\t\t<object class=\"IBObjectContainer\" key=\"IBDocument.Objects\">\n\t\t\t<object class=\"NSMutableArray\" key=\"connectionRecords\">\n\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">performMiniaturize:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"1011231497\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">37</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">arrangeInFront:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"625202149\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">39</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">print:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"49223823\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">86</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">runPageLayout:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"294629803\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">87</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">clearRecentDocuments:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"759406840\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">127</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">orderFrontStandardAboutPanel:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1021\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"238522557\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">142</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">performClose:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"776162233\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">193</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">toggleContinuousSpellChecking:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"948374510\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">222</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">undo:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"1058277027\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">223</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">copy:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"860595796\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">224</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">checkSpelling:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"96193923\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">225</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">paste:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"29853731\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">226</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">stopSpeaking:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"680220178\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">227</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">cut:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"296257095\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">228</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">showGuessPanel:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"679648819\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">230</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">redo:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"790794224\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">231</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">selectAll:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"583158037\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">232</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">startSpeaking:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"731782645\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">233</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">delete:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"437104165\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">235</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">performZoom:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"575023229\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">240</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">performFindPanelAction:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"447796847\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">241</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">centerSelectionInVisibleArea:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"88285865\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">245</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">toggleGrammarChecking:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"967646866\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">347</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">toggleSmartInsertDelete:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"605118523\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">355</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">toggleAutomaticQuoteSubstitution:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"197661976\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">356</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">toggleAutomaticLinkDetection:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"708854459\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">357</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">saveDocument:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"1023925487\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">362</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">saveDocumentAs:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"117038363\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">363</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">revertDocumentToSaved:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"579971712\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">364</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">runToolbarCustomizationPalette:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"237841660\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">365</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">toggleToolbarShown:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"102151532\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">366</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">hide:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"755159360\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">367</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">hideOtherApplications:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"342932134\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">368</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">unhideAllApplications:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"908899353\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">370</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">newDocument:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"705341025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">373</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">openDocument:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"722745758\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">374</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">addFontTrait:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"755631768\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"305399458\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">421</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">addFontTrait:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"755631768\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"814362025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">422</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">modifyFont:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"755631768\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"885547335\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">423</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">orderFrontFontPanel:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"755631768\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"159677712\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">424</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">modifyFont:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"755631768\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"158063935\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">425</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">raiseBaseline:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"941806246\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">426</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">lowerBaseline:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"1045724900\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">427</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">copyFont:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"596732606\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">428</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">subscript:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"1037576581\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">429</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">superscript:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"644725453\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">430</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">tightenKerning:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"677519740\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">431</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">underline:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"330926929\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">432</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">orderFrontColorPanel:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"1012600125\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">433</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">useAllLigatures:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"663508465\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">434</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">loosenKerning:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"238351151\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">435</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">pasteFont:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"393423671\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">436</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">unscript:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"257962622\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">437</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">useStandardKerning:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"252969304\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">438</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">useStandardLigatures:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"706297211\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">439</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">turnOffLigatures:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"568384683\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">440</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">turnOffKerning:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"766922938\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">441</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">terminate:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1050\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"632727374\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">449</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">toggleAutomaticSpellingCorrection:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"795346622\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">456</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">orderFrontSubstitutionsPanel:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"65139061\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">458</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">toggleAutomaticDashSubstitution:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"672708820\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">461</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">toggleAutomaticTextReplacement:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"537092702\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">463</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">uppercaseWord:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"1060694897\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">464</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">capitalizeWord:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"56570060\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">467</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">lowercaseWord:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"879586729\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">468</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">pasteAsPlainText:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"82994268\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">486</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">performFindPanelAction:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"326711663\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">487</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">performFindPanelAction:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"270902937\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">488</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">performFindPanelAction:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"159080638\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">489</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">showHelp:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"105068016\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">493</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBOutletConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">delegate</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1021\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"976324537\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">495</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">alignCenter:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"630155264\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">518</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">pasteRuler:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"883618387\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">519</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">toggleRuler:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"644046920\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">520</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">alignRight:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"512868991\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">521</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">copyRuler:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"231811626\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">522</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">alignJustified:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"945678886\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">523</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">alignLeft:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"875092757\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">524</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">makeBaseWritingDirectionNatural:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"551969625\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">525</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">makeBaseWritingDirectionLeftToRight:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"249532473\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">526</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">makeBaseWritingDirectionRightToLeft:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"607364498\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">527</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">makeTextWritingDirectionNatural:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"380031999\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">528</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">makeTextWritingDirectionLeftToRight:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"825984362\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">529</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBActionConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">makeTextWritingDirectionRightToLeft:</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"560145579\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">530</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBOutletConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">window</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"976324537\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"972006081\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">532</int>\n\t\t\t\t</object>\n\t\t\t</object>\n\t\t\t<object class=\"IBMutableOrderedSet\" key=\"objectRecords\">\n\t\t\t\t<object class=\"NSArray\" key=\"orderedObjects\">\n\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">0</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"0\"/>\n\t\t\t\t\t\t<reference key=\"children\" ref=\"1048\"/>\n\t\t\t\t\t\t<nil key=\"parent\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">-2</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"1021\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"0\"/>\n\t\t\t\t\t\t<string key=\"objectName\">File's Owner</string>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">-1</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"1014\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"0\"/>\n\t\t\t\t\t\t<string key=\"objectName\">First Responder</string>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">-3</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"1050\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"0\"/>\n\t\t\t\t\t\t<string key=\"objectName\">Application</string>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">29</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"649796088\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"713487014\"/>\n\t\t\t\t\t\t\t<reference ref=\"694149608\"/>\n\t\t\t\t\t\t\t<reference ref=\"952259628\"/>\n\t\t\t\t\t\t\t<reference ref=\"379814623\"/>\n\t\t\t\t\t\t\t<reference ref=\"586577488\"/>\n\t\t\t\t\t\t\t<reference ref=\"302598603\"/>\n\t\t\t\t\t\t\t<reference ref=\"448692316\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"0\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">19</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"713487014\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"835318025\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"649796088\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">56</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"694149608\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"110575045\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"649796088\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">217</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"952259628\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"789758025\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"649796088\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">83</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"379814623\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"720053764\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"649796088\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">81</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"720053764\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"1023925487\"/>\n\t\t\t\t\t\t\t<reference ref=\"117038363\"/>\n\t\t\t\t\t\t\t<reference ref=\"49223823\"/>\n\t\t\t\t\t\t\t<reference ref=\"722745758\"/>\n\t\t\t\t\t\t\t<reference ref=\"705341025\"/>\n\t\t\t\t\t\t\t<reference ref=\"1025936716\"/>\n\t\t\t\t\t\t\t<reference ref=\"294629803\"/>\n\t\t\t\t\t\t\t<reference ref=\"776162233\"/>\n\t\t\t\t\t\t\t<reference ref=\"425164168\"/>\n\t\t\t\t\t\t\t<reference ref=\"579971712\"/>\n\t\t\t\t\t\t\t<reference ref=\"1010469920\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"379814623\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">75</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"1023925487\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"720053764\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">80</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"117038363\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"720053764\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">78</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"49223823\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"720053764\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">72</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"722745758\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"720053764\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">82</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"705341025\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"720053764\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">124</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"1025936716\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"1065607017\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"720053764\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">77</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"294629803\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"720053764\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">73</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"776162233\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"720053764\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">79</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"425164168\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"720053764\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">112</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"579971712\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"720053764\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">74</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"1010469920\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"720053764\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">125</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"1065607017\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"759406840\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"1025936716\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">126</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"759406840\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"1065607017\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">205</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"789758025\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"437104165\"/>\n\t\t\t\t\t\t\t<reference ref=\"583158037\"/>\n\t\t\t\t\t\t\t<reference ref=\"1058277027\"/>\n\t\t\t\t\t\t\t<reference ref=\"212016141\"/>\n\t\t\t\t\t\t\t<reference ref=\"296257095\"/>\n\t\t\t\t\t\t\t<reference ref=\"29853731\"/>\n\t\t\t\t\t\t\t<reference ref=\"860595796\"/>\n\t\t\t\t\t\t\t<reference ref=\"1040322652\"/>\n\t\t\t\t\t\t\t<reference ref=\"790794224\"/>\n\t\t\t\t\t\t\t<reference ref=\"892235320\"/>\n\t\t\t\t\t\t\t<reference ref=\"972420730\"/>\n\t\t\t\t\t\t\t<reference ref=\"676164635\"/>\n\t\t\t\t\t\t\t<reference ref=\"507821607\"/>\n\t\t\t\t\t\t\t<reference ref=\"288088188\"/>\n\t\t\t\t\t\t\t<reference ref=\"82994268\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"952259628\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">202</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"437104165\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"789758025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">198</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"583158037\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"789758025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">207</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"1058277027\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"789758025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">214</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"212016141\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"789758025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">199</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"296257095\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"789758025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">203</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"29853731\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"789758025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">197</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"860595796\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"789758025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">206</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"1040322652\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"789758025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">215</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"790794224\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"789758025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">218</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"892235320\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"963351320\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"789758025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">216</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"972420730\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"769623530\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"789758025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">200</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"769623530\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"948374510\"/>\n\t\t\t\t\t\t\t<reference ref=\"96193923\"/>\n\t\t\t\t\t\t\t<reference ref=\"679648819\"/>\n\t\t\t\t\t\t\t<reference ref=\"967646866\"/>\n\t\t\t\t\t\t\t<reference ref=\"859480356\"/>\n\t\t\t\t\t\t\t<reference ref=\"795346622\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"972420730\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">219</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"948374510\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"769623530\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">201</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"96193923\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"769623530\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">204</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"679648819\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"769623530\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">220</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"963351320\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"270902937\"/>\n\t\t\t\t\t\t\t<reference ref=\"88285865\"/>\n\t\t\t\t\t\t\t<reference ref=\"159080638\"/>\n\t\t\t\t\t\t\t<reference ref=\"326711663\"/>\n\t\t\t\t\t\t\t<reference ref=\"447796847\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"892235320\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">213</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"270902937\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"963351320\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">210</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"88285865\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"963351320\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">221</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"159080638\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"963351320\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">208</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"326711663\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"963351320\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">209</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"447796847\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"963351320\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">57</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"110575045\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"238522557\"/>\n\t\t\t\t\t\t\t<reference ref=\"755159360\"/>\n\t\t\t\t\t\t\t<reference ref=\"908899353\"/>\n\t\t\t\t\t\t\t<reference ref=\"632727374\"/>\n\t\t\t\t\t\t\t<reference ref=\"646227648\"/>\n\t\t\t\t\t\t\t<reference ref=\"609285721\"/>\n\t\t\t\t\t\t\t<reference ref=\"481834944\"/>\n\t\t\t\t\t\t\t<reference ref=\"304266470\"/>\n\t\t\t\t\t\t\t<reference ref=\"1046388886\"/>\n\t\t\t\t\t\t\t<reference ref=\"1056857174\"/>\n\t\t\t\t\t\t\t<reference ref=\"342932134\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"694149608\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">58</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"238522557\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"110575045\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">134</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"755159360\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"110575045\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">150</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"908899353\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"110575045\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">136</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"632727374\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"110575045\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">144</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"646227648\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"110575045\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">129</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"609285721\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"110575045\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">143</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"481834944\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"110575045\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">236</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"304266470\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"110575045\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">131</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"1046388886\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"752062318\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"110575045\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">149</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"1056857174\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"110575045\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">145</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"342932134\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"110575045\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">130</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"752062318\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"1046388886\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">24</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"835318025\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"299356726\"/>\n\t\t\t\t\t\t\t<reference ref=\"625202149\"/>\n\t\t\t\t\t\t\t<reference ref=\"575023229\"/>\n\t\t\t\t\t\t\t<reference ref=\"1011231497\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"713487014\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">92</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"299356726\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"835318025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">5</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"625202149\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"835318025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">239</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"575023229\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"835318025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">23</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"1011231497\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"835318025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">295</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"586577488\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"466310130\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"649796088\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">296</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"466310130\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"102151532\"/>\n\t\t\t\t\t\t\t<reference ref=\"237841660\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"586577488\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">297</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"102151532\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"466310130\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">298</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"237841660\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"466310130\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">211</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"676164635\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"785027613\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"789758025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">212</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"785027613\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"680220178\"/>\n\t\t\t\t\t\t\t<reference ref=\"731782645\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"676164635\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">195</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"680220178\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"785027613\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">196</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"731782645\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"785027613\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">346</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"967646866\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"769623530\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">348</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"507821607\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"698887838\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"789758025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">349</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"698887838\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"605118523\"/>\n\t\t\t\t\t\t\t<reference ref=\"197661976\"/>\n\t\t\t\t\t\t\t<reference ref=\"708854459\"/>\n\t\t\t\t\t\t\t<reference ref=\"65139061\"/>\n\t\t\t\t\t\t\t<reference ref=\"19036812\"/>\n\t\t\t\t\t\t\t<reference ref=\"672708820\"/>\n\t\t\t\t\t\t\t<reference ref=\"537092702\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"507821607\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">350</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"605118523\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"698887838\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">351</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"197661976\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"698887838\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">354</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"708854459\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"698887838\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">371</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"972006081\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"439893737\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"0\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">372</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"439893737\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"972006081\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">375</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"302598603\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"941447902\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"649796088\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">376</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"941447902\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"792887677\"/>\n\t\t\t\t\t\t\t<reference ref=\"215659978\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"302598603\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">377</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"792887677\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"786677654\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"941447902\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">388</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"786677654\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"159677712\"/>\n\t\t\t\t\t\t\t<reference ref=\"305399458\"/>\n\t\t\t\t\t\t\t<reference ref=\"814362025\"/>\n\t\t\t\t\t\t\t<reference ref=\"330926929\"/>\n\t\t\t\t\t\t\t<reference ref=\"533507878\"/>\n\t\t\t\t\t\t\t<reference ref=\"158063935\"/>\n\t\t\t\t\t\t\t<reference ref=\"885547335\"/>\n\t\t\t\t\t\t\t<reference ref=\"901062459\"/>\n\t\t\t\t\t\t\t<reference ref=\"767671776\"/>\n\t\t\t\t\t\t\t<reference ref=\"691570813\"/>\n\t\t\t\t\t\t\t<reference ref=\"769124883\"/>\n\t\t\t\t\t\t\t<reference ref=\"739652853\"/>\n\t\t\t\t\t\t\t<reference ref=\"1012600125\"/>\n\t\t\t\t\t\t\t<reference ref=\"214559597\"/>\n\t\t\t\t\t\t\t<reference ref=\"596732606\"/>\n\t\t\t\t\t\t\t<reference ref=\"393423671\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"792887677\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">389</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"159677712\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"786677654\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">390</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"305399458\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"786677654\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">391</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"814362025\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"786677654\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">392</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"330926929\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"786677654\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">393</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"533507878\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"786677654\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">394</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"158063935\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"786677654\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">395</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"885547335\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"786677654\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">396</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"901062459\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"786677654\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">397</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"767671776\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"175441468\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"786677654\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">398</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"691570813\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"1058217995\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"786677654\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">399</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"769124883\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"18263474\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"786677654\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">400</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"739652853\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"786677654\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">401</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"1012600125\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"786677654\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">402</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"214559597\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"786677654\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">403</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"596732606\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"786677654\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">404</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"393423671\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"786677654\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">405</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"18263474\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"257962622\"/>\n\t\t\t\t\t\t\t<reference ref=\"644725453\"/>\n\t\t\t\t\t\t\t<reference ref=\"1037576581\"/>\n\t\t\t\t\t\t\t<reference ref=\"941806246\"/>\n\t\t\t\t\t\t\t<reference ref=\"1045724900\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"769124883\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">406</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"257962622\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"18263474\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">407</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"644725453\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"18263474\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">408</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"1037576581\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"18263474\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">409</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"941806246\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"18263474\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">410</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"1045724900\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"18263474\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">411</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"1058217995\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"706297211\"/>\n\t\t\t\t\t\t\t<reference ref=\"568384683\"/>\n\t\t\t\t\t\t\t<reference ref=\"663508465\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"691570813\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">412</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"706297211\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"1058217995\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">413</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"568384683\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"1058217995\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">414</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"663508465\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"1058217995\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">415</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"175441468\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"252969304\"/>\n\t\t\t\t\t\t\t<reference ref=\"766922938\"/>\n\t\t\t\t\t\t\t<reference ref=\"677519740\"/>\n\t\t\t\t\t\t\t<reference ref=\"238351151\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"767671776\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">416</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"252969304\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"175441468\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">417</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"766922938\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"175441468\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">418</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"677519740\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"175441468\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">419</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"238351151\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"175441468\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">420</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"755631768\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"0\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">450</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"288088188\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"579392910\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"789758025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">451</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"579392910\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"1060694897\"/>\n\t\t\t\t\t\t\t<reference ref=\"879586729\"/>\n\t\t\t\t\t\t\t<reference ref=\"56570060\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"288088188\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">452</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"1060694897\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"579392910\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">453</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"859480356\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"769623530\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">454</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"795346622\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"769623530\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">457</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"65139061\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"698887838\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">459</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"19036812\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"698887838\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">460</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"672708820\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"698887838\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">462</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"537092702\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"698887838\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">465</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"879586729\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"579392910\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">466</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"56570060\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"579392910\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">485</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"82994268\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"789758025\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">490</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"448692316\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"992780483\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"649796088\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">491</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"992780483\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"105068016\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"448692316\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">492</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"105068016\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"992780483\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">494</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"976324537\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"0\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">496</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"215659978\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"446991534\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"941447902\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">497</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"446991534\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"875092757\"/>\n\t\t\t\t\t\t\t<reference ref=\"630155264\"/>\n\t\t\t\t\t\t\t<reference ref=\"945678886\"/>\n\t\t\t\t\t\t\t<reference ref=\"512868991\"/>\n\t\t\t\t\t\t\t<reference ref=\"163117631\"/>\n\t\t\t\t\t\t\t<reference ref=\"31516759\"/>\n\t\t\t\t\t\t\t<reference ref=\"908105787\"/>\n\t\t\t\t\t\t\t<reference ref=\"644046920\"/>\n\t\t\t\t\t\t\t<reference ref=\"231811626\"/>\n\t\t\t\t\t\t\t<reference ref=\"883618387\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"215659978\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">498</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"875092757\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"446991534\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">499</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"630155264\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"446991534\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">500</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"945678886\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"446991534\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">501</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"512868991\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"446991534\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">502</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"163117631\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"446991534\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">503</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"31516759\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"956096989\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"446991534\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">504</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"908105787\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"446991534\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">505</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"644046920\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"446991534\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">506</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"231811626\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"446991534\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">507</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"883618387\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"446991534\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">508</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"956096989\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<reference ref=\"257099033\"/>\n\t\t\t\t\t\t\t<reference ref=\"551969625\"/>\n\t\t\t\t\t\t\t<reference ref=\"249532473\"/>\n\t\t\t\t\t\t\t<reference ref=\"607364498\"/>\n\t\t\t\t\t\t\t<reference ref=\"508151438\"/>\n\t\t\t\t\t\t\t<reference ref=\"981751889\"/>\n\t\t\t\t\t\t\t<reference ref=\"380031999\"/>\n\t\t\t\t\t\t\t<reference ref=\"825984362\"/>\n\t\t\t\t\t\t\t<reference ref=\"560145579\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"31516759\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">509</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"257099033\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"956096989\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">510</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"551969625\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"956096989\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">511</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"249532473\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"956096989\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">512</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"607364498\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"956096989\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">513</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"508151438\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"956096989\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">514</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"981751889\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"956096989\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">515</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"380031999\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"956096989\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">516</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"825984362\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"956096989\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">517</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"560145579\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"956096989\"/>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t</object>\n\t\t\t<object class=\"NSMutableDictionary\" key=\"flattenedProperties\">\n\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t<object class=\"NSArray\" key=\"dict.sortedKeys\">\n\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t<string>-3.IBPluginDependency</string>\n\t\t\t\t\t<string>112.IBPluginDependency</string>\n\t\t\t\t\t<string>112.ImportedFromIB2</string>\n\t\t\t\t\t<string>124.IBPluginDependency</string>\n\t\t\t\t\t<string>124.ImportedFromIB2</string>\n\t\t\t\t\t<string>125.IBPluginDependency</string>\n\t\t\t\t\t<string>125.ImportedFromIB2</string>\n\t\t\t\t\t<string>125.editorWindowContentRectSynchronizationRect</string>\n\t\t\t\t\t<string>126.IBPluginDependency</string>\n\t\t\t\t\t<string>126.ImportedFromIB2</string>\n\t\t\t\t\t<string>129.IBPluginDependency</string>\n\t\t\t\t\t<string>129.ImportedFromIB2</string>\n\t\t\t\t\t<string>130.IBPluginDependency</string>\n\t\t\t\t\t<string>130.ImportedFromIB2</string>\n\t\t\t\t\t<string>130.editorWindowContentRectSynchronizationRect</string>\n\t\t\t\t\t<string>131.IBPluginDependency</string>\n\t\t\t\t\t<string>131.ImportedFromIB2</string>\n\t\t\t\t\t<string>134.IBPluginDependency</string>\n\t\t\t\t\t<string>134.ImportedFromIB2</string>\n\t\t\t\t\t<string>136.IBPluginDependency</string>\n\t\t\t\t\t<string>136.ImportedFromIB2</string>\n\t\t\t\t\t<string>143.IBPluginDependency</string>\n\t\t\t\t\t<string>143.ImportedFromIB2</string>\n\t\t\t\t\t<string>144.IBPluginDependency</string>\n\t\t\t\t\t<string>144.ImportedFromIB2</string>\n\t\t\t\t\t<string>145.IBPluginDependency</string>\n\t\t\t\t\t<string>145.ImportedFromIB2</string>\n\t\t\t\t\t<string>149.IBPluginDependency</string>\n\t\t\t\t\t<string>149.ImportedFromIB2</string>\n\t\t\t\t\t<string>150.IBPluginDependency</string>\n\t\t\t\t\t<string>150.ImportedFromIB2</string>\n\t\t\t\t\t<string>19.IBPluginDependency</string>\n\t\t\t\t\t<string>19.ImportedFromIB2</string>\n\t\t\t\t\t<string>195.IBPluginDependency</string>\n\t\t\t\t\t<string>195.ImportedFromIB2</string>\n\t\t\t\t\t<string>196.IBPluginDependency</string>\n\t\t\t\t\t<string>196.ImportedFromIB2</string>\n\t\t\t\t\t<string>197.IBPluginDependency</string>\n\t\t\t\t\t<string>197.ImportedFromIB2</string>\n\t\t\t\t\t<string>198.IBPluginDependency</string>\n\t\t\t\t\t<string>198.ImportedFromIB2</string>\n\t\t\t\t\t<string>199.IBPluginDependency</string>\n\t\t\t\t\t<string>199.ImportedFromIB2</string>\n\t\t\t\t\t<string>200.IBEditorWindowLastContentRect</string>\n\t\t\t\t\t<string>200.IBPluginDependency</string>\n\t\t\t\t\t<string>200.ImportedFromIB2</string>\n\t\t\t\t\t<string>200.editorWindowContentRectSynchronizationRect</string>\n\t\t\t\t\t<string>201.IBPluginDependency</string>\n\t\t\t\t\t<string>201.ImportedFromIB2</string>\n\t\t\t\t\t<string>202.IBPluginDependency</string>\n\t\t\t\t\t<string>202.ImportedFromIB2</string>\n\t\t\t\t\t<string>203.IBPluginDependency</string>\n\t\t\t\t\t<string>203.ImportedFromIB2</string>\n\t\t\t\t\t<string>204.IBPluginDependency</string>\n\t\t\t\t\t<string>204.ImportedFromIB2</string>\n\t\t\t\t\t<string>205.IBEditorWindowLastContentRect</string>\n\t\t\t\t\t<string>205.IBPluginDependency</string>\n\t\t\t\t\t<string>205.ImportedFromIB2</string>\n\t\t\t\t\t<string>205.editorWindowContentRectSynchronizationRect</string>\n\t\t\t\t\t<string>206.IBPluginDependency</string>\n\t\t\t\t\t<string>206.ImportedFromIB2</string>\n\t\t\t\t\t<string>207.IBPluginDependency</string>\n\t\t\t\t\t<string>207.ImportedFromIB2</string>\n\t\t\t\t\t<string>208.IBPluginDependency</string>\n\t\t\t\t\t<string>208.ImportedFromIB2</string>\n\t\t\t\t\t<string>209.IBPluginDependency</string>\n\t\t\t\t\t<string>209.ImportedFromIB2</string>\n\t\t\t\t\t<string>210.IBPluginDependency</string>\n\t\t\t\t\t<string>210.ImportedFromIB2</string>\n\t\t\t\t\t<string>211.IBPluginDependency</string>\n\t\t\t\t\t<string>211.ImportedFromIB2</string>\n\t\t\t\t\t<string>212.IBPluginDependency</string>\n\t\t\t\t\t<string>212.ImportedFromIB2</string>\n\t\t\t\t\t<string>212.editorWindowContentRectSynchronizationRect</string>\n\t\t\t\t\t<string>213.IBPluginDependency</string>\n\t\t\t\t\t<string>213.ImportedFromIB2</string>\n\t\t\t\t\t<string>214.IBPluginDependency</string>\n\t\t\t\t\t<string>214.ImportedFromIB2</string>\n\t\t\t\t\t<string>215.IBPluginDependency</string>\n\t\t\t\t\t<string>215.ImportedFromIB2</string>\n\t\t\t\t\t<string>216.IBPluginDependency</string>\n\t\t\t\t\t<string>216.ImportedFromIB2</string>\n\t\t\t\t\t<string>217.IBPluginDependency</string>\n\t\t\t\t\t<string>217.ImportedFromIB2</string>\n\t\t\t\t\t<string>218.IBPluginDependency</string>\n\t\t\t\t\t<string>218.ImportedFromIB2</string>\n\t\t\t\t\t<string>219.IBPluginDependency</string>\n\t\t\t\t\t<string>219.ImportedFromIB2</string>\n\t\t\t\t\t<string>220.IBEditorWindowLastContentRect</string>\n\t\t\t\t\t<string>220.IBPluginDependency</string>\n\t\t\t\t\t<string>220.ImportedFromIB2</string>\n\t\t\t\t\t<string>220.editorWindowContentRectSynchronizationRect</string>\n\t\t\t\t\t<string>221.IBPluginDependency</string>\n\t\t\t\t\t<string>221.ImportedFromIB2</string>\n\t\t\t\t\t<string>23.IBPluginDependency</string>\n\t\t\t\t\t<string>23.ImportedFromIB2</string>\n\t\t\t\t\t<string>236.IBPluginDependency</string>\n\t\t\t\t\t<string>236.ImportedFromIB2</string>\n\t\t\t\t\t<string>239.IBPluginDependency</string>\n\t\t\t\t\t<string>239.ImportedFromIB2</string>\n\t\t\t\t\t<string>24.IBEditorWindowLastContentRect</string>\n\t\t\t\t\t<string>24.IBPluginDependency</string>\n\t\t\t\t\t<string>24.ImportedFromIB2</string>\n\t\t\t\t\t<string>24.editorWindowContentRectSynchronizationRect</string>\n\t\t\t\t\t<string>29.IBEditorWindowLastContentRect</string>\n\t\t\t\t\t<string>29.IBPluginDependency</string>\n\t\t\t\t\t<string>29.ImportedFromIB2</string>\n\t\t\t\t\t<string>29.WindowOrigin</string>\n\t\t\t\t\t<string>29.editorWindowContentRectSynchronizationRect</string>\n\t\t\t\t\t<string>295.IBPluginDependency</string>\n\t\t\t\t\t<string>296.IBEditorWindowLastContentRect</string>\n\t\t\t\t\t<string>296.IBPluginDependency</string>\n\t\t\t\t\t<string>296.editorWindowContentRectSynchronizationRect</string>\n\t\t\t\t\t<string>297.IBPluginDependency</string>\n\t\t\t\t\t<string>298.IBPluginDependency</string>\n\t\t\t\t\t<string>346.IBPluginDependency</string>\n\t\t\t\t\t<string>346.ImportedFromIB2</string>\n\t\t\t\t\t<string>348.IBPluginDependency</string>\n\t\t\t\t\t<string>348.ImportedFromIB2</string>\n\t\t\t\t\t<string>349.IBEditorWindowLastContentRect</string>\n\t\t\t\t\t<string>349.IBPluginDependency</string>\n\t\t\t\t\t<string>349.ImportedFromIB2</string>\n\t\t\t\t\t<string>349.editorWindowContentRectSynchronizationRect</string>\n\t\t\t\t\t<string>350.IBPluginDependency</string>\n\t\t\t\t\t<string>350.ImportedFromIB2</string>\n\t\t\t\t\t<string>351.IBPluginDependency</string>\n\t\t\t\t\t<string>351.ImportedFromIB2</string>\n\t\t\t\t\t<string>354.IBPluginDependency</string>\n\t\t\t\t\t<string>354.ImportedFromIB2</string>\n\t\t\t\t\t<string>371.IBEditorWindowLastContentRect</string>\n\t\t\t\t\t<string>371.IBPluginDependency</string>\n\t\t\t\t\t<string>371.IBWindowTemplateEditedContentRect</string>\n\t\t\t\t\t<string>371.NSWindowTemplate.visibleAtLaunch</string>\n\t\t\t\t\t<string>371.editorWindowContentRectSynchronizationRect</string>\n\t\t\t\t\t<string>371.windowTemplate.maxSize</string>\n\t\t\t\t\t<string>372.IBPluginDependency</string>\n\t\t\t\t\t<string>375.IBPluginDependency</string>\n\t\t\t\t\t<string>376.IBEditorWindowLastContentRect</string>\n\t\t\t\t\t<string>376.IBPluginDependency</string>\n\t\t\t\t\t<string>377.IBPluginDependency</string>\n\t\t\t\t\t<string>388.IBEditorWindowLastContentRect</string>\n\t\t\t\t\t<string>388.IBPluginDependency</string>\n\t\t\t\t\t<string>389.IBPluginDependency</string>\n\t\t\t\t\t<string>390.IBPluginDependency</string>\n\t\t\t\t\t<string>391.IBPluginDependency</string>\n\t\t\t\t\t<string>392.IBPluginDependency</string>\n\t\t\t\t\t<string>393.IBPluginDependency</string>\n\t\t\t\t\t<string>394.IBPluginDependency</string>\n\t\t\t\t\t<string>395.IBPluginDependency</string>\n\t\t\t\t\t<string>396.IBPluginDependency</string>\n\t\t\t\t\t<string>397.IBPluginDependency</string>\n\t\t\t\t\t<string>398.IBPluginDependency</string>\n\t\t\t\t\t<string>399.IBPluginDependency</string>\n\t\t\t\t\t<string>400.IBPluginDependency</string>\n\t\t\t\t\t<string>401.IBPluginDependency</string>\n\t\t\t\t\t<string>402.IBPluginDependency</string>\n\t\t\t\t\t<string>403.IBPluginDependency</string>\n\t\t\t\t\t<string>404.IBPluginDependency</string>\n\t\t\t\t\t<string>405.IBPluginDependency</string>\n\t\t\t\t\t<string>406.IBPluginDependency</string>\n\t\t\t\t\t<string>407.IBPluginDependency</string>\n\t\t\t\t\t<string>408.IBPluginDependency</string>\n\t\t\t\t\t<string>409.IBPluginDependency</string>\n\t\t\t\t\t<string>410.IBPluginDependency</string>\n\t\t\t\t\t<string>411.IBPluginDependency</string>\n\t\t\t\t\t<string>412.IBPluginDependency</string>\n\t\t\t\t\t<string>413.IBPluginDependency</string>\n\t\t\t\t\t<string>414.IBPluginDependency</string>\n\t\t\t\t\t<string>415.IBPluginDependency</string>\n\t\t\t\t\t<string>416.IBPluginDependency</string>\n\t\t\t\t\t<string>417.IBPluginDependency</string>\n\t\t\t\t\t<string>418.IBPluginDependency</string>\n\t\t\t\t\t<string>419.IBPluginDependency</string>\n\t\t\t\t\t<string>450.IBPluginDependency</string>\n\t\t\t\t\t<string>451.IBEditorWindowLastContentRect</string>\n\t\t\t\t\t<string>451.IBPluginDependency</string>\n\t\t\t\t\t<string>452.IBPluginDependency</string>\n\t\t\t\t\t<string>453.IBPluginDependency</string>\n\t\t\t\t\t<string>454.IBPluginDependency</string>\n\t\t\t\t\t<string>457.IBPluginDependency</string>\n\t\t\t\t\t<string>459.IBPluginDependency</string>\n\t\t\t\t\t<string>460.IBPluginDependency</string>\n\t\t\t\t\t<string>462.IBPluginDependency</string>\n\t\t\t\t\t<string>465.IBPluginDependency</string>\n\t\t\t\t\t<string>466.IBPluginDependency</string>\n\t\t\t\t\t<string>485.IBPluginDependency</string>\n\t\t\t\t\t<string>490.IBPluginDependency</string>\n\t\t\t\t\t<string>491.IBEditorWindowLastContentRect</string>\n\t\t\t\t\t<string>491.IBPluginDependency</string>\n\t\t\t\t\t<string>492.IBPluginDependency</string>\n\t\t\t\t\t<string>496.IBPluginDependency</string>\n\t\t\t\t\t<string>497.IBEditorWindowLastContentRect</string>\n\t\t\t\t\t<string>497.IBPluginDependency</string>\n\t\t\t\t\t<string>498.IBPluginDependency</string>\n\t\t\t\t\t<string>499.IBPluginDependency</string>\n\t\t\t\t\t<string>5.IBPluginDependency</string>\n\t\t\t\t\t<string>5.ImportedFromIB2</string>\n\t\t\t\t\t<string>500.IBPluginDependency</string>\n\t\t\t\t\t<string>501.IBPluginDependency</string>\n\t\t\t\t\t<string>502.IBPluginDependency</string>\n\t\t\t\t\t<string>503.IBPluginDependency</string>\n\t\t\t\t\t<string>504.IBPluginDependency</string>\n\t\t\t\t\t<string>505.IBPluginDependency</string>\n\t\t\t\t\t<string>506.IBPluginDependency</string>\n\t\t\t\t\t<string>507.IBPluginDependency</string>\n\t\t\t\t\t<string>508.IBEditorWindowLastContentRect</string>\n\t\t\t\t\t<string>508.IBPluginDependency</string>\n\t\t\t\t\t<string>509.IBPluginDependency</string>\n\t\t\t\t\t<string>510.IBPluginDependency</string>\n\t\t\t\t\t<string>511.IBPluginDependency</string>\n\t\t\t\t\t<string>512.IBPluginDependency</string>\n\t\t\t\t\t<string>513.IBPluginDependency</string>\n\t\t\t\t\t<string>514.IBPluginDependency</string>\n\t\t\t\t\t<string>515.IBPluginDependency</string>\n\t\t\t\t\t<string>516.IBPluginDependency</string>\n\t\t\t\t\t<string>517.IBPluginDependency</string>\n\t\t\t\t\t<string>56.IBPluginDependency</string>\n\t\t\t\t\t<string>56.ImportedFromIB2</string>\n\t\t\t\t\t<string>57.IBEditorWindowLastContentRect</string>\n\t\t\t\t\t<string>57.IBPluginDependency</string>\n\t\t\t\t\t<string>57.ImportedFromIB2</string>\n\t\t\t\t\t<string>57.editorWindowContentRectSynchronizationRect</string>\n\t\t\t\t\t<string>58.IBPluginDependency</string>\n\t\t\t\t\t<string>58.ImportedFromIB2</string>\n\t\t\t\t\t<string>72.IBPluginDependency</string>\n\t\t\t\t\t<string>72.ImportedFromIB2</string>\n\t\t\t\t\t<string>73.IBPluginDependency</string>\n\t\t\t\t\t<string>73.ImportedFromIB2</string>\n\t\t\t\t\t<string>74.IBPluginDependency</string>\n\t\t\t\t\t<string>74.ImportedFromIB2</string>\n\t\t\t\t\t<string>75.IBPluginDependency</string>\n\t\t\t\t\t<string>75.ImportedFromIB2</string>\n\t\t\t\t\t<string>77.IBPluginDependency</string>\n\t\t\t\t\t<string>77.ImportedFromIB2</string>\n\t\t\t\t\t<string>78.IBPluginDependency</string>\n\t\t\t\t\t<string>78.ImportedFromIB2</string>\n\t\t\t\t\t<string>79.IBPluginDependency</string>\n\t\t\t\t\t<string>79.ImportedFromIB2</string>\n\t\t\t\t\t<string>80.IBPluginDependency</string>\n\t\t\t\t\t<string>80.ImportedFromIB2</string>\n\t\t\t\t\t<string>81.IBEditorWindowLastContentRect</string>\n\t\t\t\t\t<string>81.IBPluginDependency</string>\n\t\t\t\t\t<string>81.ImportedFromIB2</string>\n\t\t\t\t\t<string>81.editorWindowContentRectSynchronizationRect</string>\n\t\t\t\t\t<string>82.IBPluginDependency</string>\n\t\t\t\t\t<string>82.ImportedFromIB2</string>\n\t\t\t\t\t<string>83.IBPluginDependency</string>\n\t\t\t\t\t<string>83.ImportedFromIB2</string>\n\t\t\t\t\t<string>92.IBPluginDependency</string>\n\t\t\t\t\t<string>92.ImportedFromIB2</string>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"NSMutableArray\" key=\"dict.values\">\n\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>{{522, 812}, {146, 23}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>{{436, 809}, {64, 6}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>{{753, 187}, {275, 113}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>{{608, 612}, {275, 83}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>{{547, 180}, {254, 283}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>{{187, 434}, {243, 243}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>{{608, 612}, {167, 43}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>{{753, 217}, {238, 103}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>{{608, 612}, {241, 103}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>{{654, 239}, {194, 73}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>{{525, 802}, {197, 73}}</string>\n\t\t\t\t\t<string>{{380, 836}, {512, 20}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>{74, 862}</string>\n\t\t\t\t\t<string>{{6, 978}, {478, 20}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>{{604, 269}, {231, 43}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>{{475, 832}, {234, 43}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>{{746, 287}, {220, 133}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>{{608, 612}, {215, 63}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>{{380, 496}, {480, 360}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>{{380, 496}, {480, 360}}</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>{{33, 99}, {480, 360}}</string>\n\t\t\t\t\t<string>{3.40282e+38, 3.40282e+38}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>{{591, 420}, {83, 43}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>{{523, 2}, {178, 283}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>{{753, 197}, {170, 63}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>{{725, 289}, {246, 23}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>{{674, 260}, {204, 183}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>{{878, 180}, {164, 173}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>{{286, 129}, {275, 183}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>{{23, 794}, {245, 183}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>{{452, 109}, {196, 203}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>{{145, 474}, {199, 203}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.CocoaPlugin</string>\n\t\t\t\t\t<integer value=\"1\"/>\n\t\t\t\t</object>\n\t\t\t</object>\n\t\t\t<object class=\"NSMutableDictionary\" key=\"unlocalizedProperties\">\n\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t<reference key=\"dict.sortedKeys\" ref=\"0\"/>\n\t\t\t\t<object class=\"NSMutableArray\" key=\"dict.values\">\n\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t</object>\n\t\t\t</object>\n\t\t\t<nil key=\"activeLocalization\"/>\n\t\t\t<object class=\"NSMutableDictionary\" key=\"localizations\">\n\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t<reference key=\"dict.sortedKeys\" ref=\"0\"/>\n\t\t\t\t<object class=\"NSMutableArray\" key=\"dict.values\">\n\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t</object>\n\t\t\t</object>\n\t\t\t<nil key=\"sourceID\"/>\n\t\t\t<int key=\"maxID\">532</int>\n\t\t</object>\n\t\t<object class=\"IBClassDescriber\" key=\"IBDocument.Classes\">\n\t\t\t<object class=\"NSMutableArray\" key=\"referencedPartialClassDescriptions\">\n\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">SqueakOSXAppAppDelegate</string>\n\t\t\t\t\t<string key=\"superclassName\">NSObject</string>\n\t\t\t\t\t<object class=\"NSMutableDictionary\" key=\"outlets\">\n\t\t\t\t\t\t<string key=\"NS.key.0\">window</string>\n\t\t\t\t\t\t<string key=\"NS.object.0\">NSWindow</string>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBProjectSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">SqueakOSXAppAppDelegate.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t</object>\n\t\t\t<object class=\"NSMutableArray\" key=\"referencedPartialClassDescriptionsV3.2+\">\n\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSApplication</string>\n\t\t\t\t\t<string key=\"superclassName\">NSResponder</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\" id=\"822405504\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSApplication.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSApplication</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\" id=\"850738725\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSApplicationScripting.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSApplication</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\" id=\"624831158\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSColorPanel.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSApplication</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSHelpManager.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSApplication</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSPageLayout.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSApplication</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSUserInterfaceItemSearching.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSBrowser</string>\n\t\t\t\t\t<string key=\"superclassName\">NSControl</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSBrowser.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSControl</string>\n\t\t\t\t\t<string key=\"superclassName\">NSView</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\" id=\"310914472\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSControl.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSDocument</string>\n\t\t\t\t\t<string key=\"superclassName\">NSObject</string>\n\t\t\t\t\t<object class=\"NSMutableDictionary\" key=\"actions\">\n\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t<object class=\"NSArray\" key=\"dict.sortedKeys\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<string>printDocument:</string>\n\t\t\t\t\t\t\t<string>revertDocumentToSaved:</string>\n\t\t\t\t\t\t\t<string>runPageLayout:</string>\n\t\t\t\t\t\t\t<string>saveDocument:</string>\n\t\t\t\t\t\t\t<string>saveDocumentAs:</string>\n\t\t\t\t\t\t\t<string>saveDocumentTo:</string>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"dict.values\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<string>id</string>\n\t\t\t\t\t\t\t<string>id</string>\n\t\t\t\t\t\t\t<string>id</string>\n\t\t\t\t\t\t\t<string>id</string>\n\t\t\t\t\t\t\t<string>id</string>\n\t\t\t\t\t\t\t<string>id</string>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSDocument.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSDocument</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSDocumentScripting.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSDocumentController</string>\n\t\t\t\t\t<string key=\"superclassName\">NSObject</string>\n\t\t\t\t\t<object class=\"NSMutableDictionary\" key=\"actions\">\n\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t<object class=\"NSArray\" key=\"dict.sortedKeys\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<string>clearRecentDocuments:</string>\n\t\t\t\t\t\t\t<string>newDocument:</string>\n\t\t\t\t\t\t\t<string>openDocument:</string>\n\t\t\t\t\t\t\t<string>saveAllDocuments:</string>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"dict.values\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<string>id</string>\n\t\t\t\t\t\t\t<string>id</string>\n\t\t\t\t\t\t\t<string>id</string>\n\t\t\t\t\t\t\t<string>id</string>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSDocumentController.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSFontManager</string>\n\t\t\t\t\t<string key=\"superclassName\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\" id=\"946436764\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSFontManager.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSFormatter</string>\n\t\t\t\t\t<string key=\"superclassName\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSFormatter.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSMatrix</string>\n\t\t\t\t\t<string key=\"superclassName\">NSControl</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSMatrix.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSMenu</string>\n\t\t\t\t\t<string key=\"superclassName\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\" id=\"1056362899\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSMenu.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSMenuItem</string>\n\t\t\t\t\t<string key=\"superclassName\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\" id=\"472958451\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSMenuItem.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSMovieView</string>\n\t\t\t\t\t<string key=\"superclassName\">NSView</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSMovieView.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSAccessibility.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<reference key=\"sourceIdentifier\" ref=\"822405504\"/>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<reference key=\"sourceIdentifier\" ref=\"850738725\"/>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<reference key=\"sourceIdentifier\" ref=\"624831158\"/>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<reference key=\"sourceIdentifier\" ref=\"310914472\"/>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSDictionaryController.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSDragging.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<reference key=\"sourceIdentifier\" ref=\"946436764\"/>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSFontPanel.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSKeyValueBinding.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<reference key=\"sourceIdentifier\" ref=\"1056362899\"/>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSNibLoading.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSOutlineView.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSPasteboard.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSSavePanel.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\" id=\"809545482\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSTableView.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSToolbarItem.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\" id=\"260078765\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSView.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSArchiver.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSClassDescription.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSError.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSFileManager.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSKeyValueCoding.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSKeyValueObserving.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSKeyedArchiver.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSObject.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSObjectScripting.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSPortCoder.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSRunLoop.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSScriptClassDescription.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSScriptKeyValueCoding.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSScriptObjectSpecifiers.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSScriptWhoseTests.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSThread.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSURL.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSURLConnection.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSURLDownload.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSResponder</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSInterfaceStyle.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSResponder</string>\n\t\t\t\t\t<string key=\"superclassName\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSResponder.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSTableView</string>\n\t\t\t\t\t<string key=\"superclassName\">NSControl</string>\n\t\t\t\t\t<reference key=\"sourceIdentifier\" ref=\"809545482\"/>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSText</string>\n\t\t\t\t\t<string key=\"superclassName\">NSView</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSText.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSTextView</string>\n\t\t\t\t\t<string key=\"superclassName\">NSText</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSTextView.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSView</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSClipView.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSView</string>\n\t\t\t\t\t<reference key=\"sourceIdentifier\" ref=\"472958451\"/>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSView</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSRulerView.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSView</string>\n\t\t\t\t\t<string key=\"superclassName\">NSResponder</string>\n\t\t\t\t\t<reference key=\"sourceIdentifier\" ref=\"260078765\"/>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSWindow</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSDrawer.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSWindow</string>\n\t\t\t\t\t<string key=\"superclassName\">NSResponder</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSWindow.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSWindow</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSWindowScripting.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t</object>\n\t\t</object>\n\t\t<int key=\"IBDocument.localizationMode\">0</int>\n\t\t<object class=\"NSMutableDictionary\" key=\"IBDocument.PluginDeclaredDependencyDefaults\">\n\t\t\t<string key=\"NS.key.0\">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string>\n\t\t\t<integer value=\"1060\" key=\"NS.object.0\"/>\n\t\t</object>\n\t\t<object class=\"NSMutableDictionary\" key=\"IBDocument.PluginDeclaredDevelopmentDependencies\">\n\t\t\t<string key=\"NS.key.0\">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>\n\t\t\t<integer value=\"3000\" key=\"NS.object.0\"/>\n\t\t</object>\n\t\t<bool key=\"IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion\">YES</bool>\n\t\t<string key=\"IBDocument.LastKnownRelativeProjectPath\">../SqueakOSXApp.xcodeproj</string>\n\t\t<int key=\"IBDocument.defaultPropertyAccessControl\">3</int>\n\t</data>\n</archive>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/SqViewBitmapConversion.h",
    "content": "/* SqViewBitmapConversion.h created by marcel on Fri 04-Dec-1998 */\n//  CocoaSqueak\n\n// John Notes: Waste not want not. \n\n/*\nFrom: Marcel Weiher <marcel.weiher@gmail.com>\nTo: johnmci@smalltalkconsulting.com\nIn-Reply-To: <BEB4569D-C606-4FF4-9B1B-A95570E38B94@smalltalkconsulting.com>\nSubject: Re: [squeak-dev] Squeak and the iPhone\nReferences: <998FEB36-B9FC-427D-AA74-8A9F517432AB@smalltalkconsulting.com> <1f426d6e0806110542l4fa971bi50f429dbf9ba0809@mail.gmail.com> <FB804A64-E03C-4B68-B8F1-8FF135227F3B@gmail.com> <4D79AAD3-1CFC-431B-AB6B-7E230B0DC5A7@mac.com> <BEB4569D-C606-4FF4-9B1B-A95570E38B94@smalltalkconsulting.com>\nMessage-Id: <CCD6C9FE-483B-4A64-86B9-8D2647E54139@gmail.com>\nContent-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes\nContent-Transfer-Encoding: 7bit\nReply-To: Marcel Weiher <marcel.weiher@gmail.com>,\nThe general-purpose Squeak developers list <squeak-dev@lists.squeakfoundation.org>\nMime-Version: 1.0 (Apple Message framework v924)\nDate: Wed, 18 Jun 2008 12:00:05 -0700\nCc: The general-purpose Squeak developers list <squeak-dev@lists.squeakfoundation.org>\nX-Mailer: Apple Mail (2.924)\nX-Brightmail-Tracker: AAAAAA==\n\nThe source code has been made available again at\n\nhttp://www.metaobject.com/downloads/Squeak/\n...\nIn the meantime, you have my express  \npermission to use it under an MIT license.\n \n*/\n\n\n\n#import \"sqSqueakOSXNSView.h\"\n#import \"BitMapConversionLogicFromX11.h\"\n\n@interface sqSqueakOSXNSView(BitmapConversion)\n\n-(CGImageRef)extractPixels_1_to_32:(void*)srcBits \n\t\t\t\t\t srcPixelWidth:(int)srcPixelWidth height: (int) height\n\t\t\t\t\t\t\t  left:(int)left right:(int)right\n\t\t\t\t\t\t\t   top:(int)top bottom:(int)bottom\n\t\t\t\t\t\t  colorMap: (unsigned int *) colorMap\n\t\t\t\t\t\ttempMemory: (void **) tempMemory;\n\n-(CGImageRef)extractPixels_2_to_32:(void*)srcBits \n\t\t\t\t\t srcPixelWidth:(int)srcPixelWidth height: (int) height\n\t\t\t\t\t\t\t  left:(int)left right:(int)right\n\t\t\t\t\t\t\t   top:(int)top bottom:(int)bottom\n\t\t\t\t\t\t  colorMap: (unsigned int *) colorMap\n\t\t\t\t\t\ttempMemory: (void **) tempMemory;\n\n-(CGImageRef)extractPixels_4_to_32:(void*)srcBits \n\t\t\t\t\t srcPixelWidth:(int)srcPixelWidth height: (int) height\n\t\t\t\t\t\t\t  left:(int)left right:(int)right\n\t\t\t\t\t\t\t   top:(int)top bottom:(int)bottom\n\t\t\t\t\t\t  colorMap: (unsigned int *) colorMap\n\t\t\t\t\t\ttempMemory: (void **) tempMemory;\n\n\n-(CGImageRef)extractPixels_8_to_32:(void*)srcBits \n        srcPixelWidth:(int)srcPixelWidth height: (int) height\n        left:(int)left right:(int)right\n        top:(int)top bottom:(int)bottom\n\t\t\t\t\t\t  colorMap: (unsigned int *) colorMap\n\t\t\t\t\t\ttempMemory: (void **) tempMemory;\n\n\n-(CGImageRef)extractPixels_16_to_32:(void*)srcBits\n\t\tsrcPixelWidth:(int)srcPixelWidth height: (int) height\n        left:(int)left right:(int)right\n\t\t\t\t\t\t\t\ttop:(int)top bottom:(int)bottom\n\t\t\t\t\t\t tempMemory: (void **) tempMemory;\n\n-(CGImageRef)computeBitmapFromBitsIndex:(void*)srcBits\n                width:(int)width height:(int)height depth:(int)depth\n                left:(int)left right:(int)right\n                top:(int)top bottom:(int)bottom\n\t\t\t\t\t\t\t tempMemory: (void**) tempMemory;\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/SqViewBitmapConversion.m",
    "content": "/* SqViewBitmapConversion.m created by marcel on Fri 04-Dec-1998 */\n//  CocoaSqueak\n//\n// John Notes: Waste not want not. \n\n/*\n From: Marcel Weiher <marcel.weiher@gmail.com>\n To: johnmci@smalltalkconsulting.com\n In-Reply-To: <BEB4569D-C606-4FF4-9B1B-A95570E38B94@smalltalkconsulting.com>\n Subject: Re: [squeak-dev] Squeak and the iPhone\n References: <998FEB36-B9FC-427D-AA74-8A9F517432AB@smalltalkconsulting.com> <1f426d6e0806110542l4fa971bi50f429dbf9ba0809@mail.gmail.com> <FB804A64-E03C-4B68-B8F1-8FF135227F3B@gmail.com> <4D79AAD3-1CFC-431B-AB6B-7E230B0DC5A7@mac.com> <BEB4569D-C606-4FF4-9B1B-A95570E38B94@smalltalkconsulting.com>\n Message-Id: <CCD6C9FE-483B-4A64-86B9-8D2647E54139@gmail.com>\n Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes\n Content-Transfer-Encoding: 7bit\n Reply-To: Marcel Weiher <marcel.weiher@gmail.com>,\n The general-purpose Squeak developers list <squeak-dev@lists.squeakfoundation.org>\n Mime-Version: 1.0 (Apple Message framework v924)\n Date: Wed, 18 Jun 2008 12:00:05 -0700\n Cc: The general-purpose Squeak developers list <squeak-dev@lists.squeakfoundation.org>\n X-Mailer: Apple Mail (2.924)\n X-Brightmail-Tracker: AAAAAA==\n \n The source code has been made available again at\n \n http://www.metaobject.com/downloads/Squeak/\n ...\n In the meantime, you have my express  \n permission to use it under an MIT license.\n \n */\n#import \"SqViewBitmapConversion.h\"\n\n@implementation sqSqueakOSXNSView(BitmapConversion)\n\n#define debug(a)\n\n#define CHECKANDRETURN(expr) \\\n\t{ NSBitmapImageRep* bitmap=expr; if(bitmap!=NULL){ CGImageRef ref = [bitmap CGImage]; [bitmap release]; return(ref);}\\\n        NSLog(@\"initData:%08x\\npixelsWide:%d\\npixelsHigh:%d\\nbitsPerSample:%d\\nsamplesPerPixel:%d\\nhasAlpha:%d\\nisPlanar:%d\\ncolorSpaceName:%@\\nbytesPerRow:%d\\nbitsPerPixel:%d\\n\",\\\n\t\t\t\t(int)dBits,right-left,bottom-top,bitsPerSample,\\\n\t\t\t\tsamplesPerPixel,NO,NO,colorSpace,bytesPerRow,bitsPerPixel);\\\n\t\treturn(0);\\\n\t}\n\t\n-(CGImageRef)extractPixels_1_to_32:(void*)srcBits \n\t\t\t\t\t srcPixelWidth:(int)srcPixelWidth height: (int) height\n\t\t\t\t\t\t\t  left:(int)left right:(int)right \n\t\t\t\t\t\t\t   top:(int)top bottom:(int)bottom\n\t\t\t\t\t\t  colorMap: (unsigned int *) colorMap\n\t\t\t\t\t\ttempMemory: (void **) tempMemory\n\n{\n\tint                 bitsPerSample=8;\n\tint                 samplesPerPixel=3;\n\tint                 bitsPerPixel=32;\n\tint                 bytesPerRow=bytesPerLine(srcPixelWidth, 32);\n\tNSString*\t\t\tcolorSpace=NSDeviceRGBColorSpace;\n\tsize_t\t\t\t\ttotalSize=bytesPerRow * ((bottom-top)+1);\n\tint*\t\t\t\tdBits=(int*)malloc(totalSize);\n\t*tempMemory = dBits;\n\n\t\n\tcopyImage1To32(srcBits, dBits, srcPixelWidth, height, left, top, right, bottom,colorMap);\n\t\n\t\n\tCHECKANDRETURN([[NSBitmapImageRep alloc] initWithBitmapDataPlanes:(unsigned char **)&dBits \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t   pixelsWide:right-left\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t   pixelsHigh:bottom-top\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbitsPerSample:bitsPerSample\n\t\t\t\t\t\t\t\t\t\t\t\t\t  samplesPerPixel:samplesPerPixel\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t hasAlpha:NO\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t isPlanar:NO\n\t\t\t\t\t\t\t\t\t\t\t\t\t   colorSpaceName:colorSpace\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t  bytesPerRow:bytesPerRow\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t bitsPerPixel:bitsPerPixel]);\n}//extractPixels_1_to_32;\n\n\n-(CGImageRef)extractPixels_2_to_32:(void*)srcBits \n\t\t\t\t\t srcPixelWidth:(int)srcPixelWidth height: (int) height\n\t\t\t\t\t\t\t  left:(int)left right:(int)right \n\t\t\t\t\t\t\t   top:(int)top bottom:(int)bottom\n\t\t\t\t\t\t  colorMap: (unsigned int *) colorMap\n\t\t\t\t\t\ttempMemory: (void **) tempMemory\n{\n\tint                 bitsPerSample=8;\n\tint                 samplesPerPixel=3;\n\tint                 bitsPerPixel=32;\n\tint                 bytesPerRow=bytesPerLine(srcPixelWidth, 32);\n\tNSString*\t\t\tcolorSpace=NSDeviceRGBColorSpace;\n\tsize_t\t\t\t\ttotalSize=bytesPerRow * ((bottom-top)+1);\n\tint*\t\t\t\tdBits=(int*)malloc(totalSize);\n\t*tempMemory = dBits;\n\n\tcopyImage2To32(srcBits, dBits, srcPixelWidth, height, left, top, right, bottom,colorMap);\n\t\n\t\n\tCHECKANDRETURN([[NSBitmapImageRep alloc] initWithBitmapDataPlanes:(unsigned char **)&dBits \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t   pixelsWide:right-left\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t   pixelsHigh:bottom-top\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbitsPerSample:bitsPerSample\n\t\t\t\t\t\t\t\t\t\t\t\t\t  samplesPerPixel:samplesPerPixel\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t hasAlpha:NO\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t isPlanar:NO\n\t\t\t\t\t\t\t\t\t\t\t\t\t   colorSpaceName:colorSpace\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t  bytesPerRow:bytesPerRow\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t bitsPerPixel:bitsPerPixel]);\n}//extractPixels_2_to_32;\n\n-(CGImageRef)extractPixels_4_to_32:(void*)srcBits \n\t\t\t\t\t srcPixelWidth:(int)srcPixelWidth height: (int) height\n\t\t\t\t\t\t\t  left:(int)left right:(int)right \n\t\t\t\t\t\t\t   top:(int)top bottom:(int)bottom\n\t\t\t\t\t\t  colorMap: (unsigned int *) colorMap\n\t\t\t\t\t\ttempMemory: (void **) tempMemory\n{\n\tint                 bitsPerSample=8;\n\tint                 samplesPerPixel=3;\n\tint                 bitsPerPixel=32;\n\tint                 bytesPerRow=bytesPerLine(srcPixelWidth, 32);\n\tNSString*\t\t\tcolorSpace=NSDeviceRGBColorSpace;\n\tsize_t\t\t\t\ttotalSize=bytesPerRow * ((bottom-top)+1);\n\tint*\t\t\t\tdBits=(int*)malloc(totalSize);\n\t*tempMemory = dBits;\n\n\tcopyImage4To32(srcBits, dBits, srcPixelWidth, height, left, top, right, bottom,colorMap);\n\t\n\t\n\tCHECKANDRETURN([[NSBitmapImageRep alloc] initWithBitmapDataPlanes:(unsigned char **)&dBits \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t   pixelsWide:right-left\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t   pixelsHigh:bottom-top\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbitsPerSample:bitsPerSample\n\t\t\t\t\t\t\t\t\t\t\t\t\t  samplesPerPixel:samplesPerPixel\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t hasAlpha:NO\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t isPlanar:NO\n\t\t\t\t\t\t\t\t\t\t\t\t\t   colorSpaceName:colorSpace\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t  bytesPerRow:bytesPerRow\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t bitsPerPixel:bitsPerPixel]);\n}//extractPixels_4_to_32;\n\n\n-(CGImageRef)extractPixels_8_to_32:(void*)srcBits \n\t\t\t\t\t srcPixelWidth:(int)srcPixelWidth height: (int) height\n\t\t\tleft:(int)left right:(int)right \n\t\t\ttop:(int)top bottom:(int)bottom\n\t\t\t\t\t\t  colorMap: (unsigned int *) colorMap\n\t\t\t\t\t\ttempMemory: (void **) tempMemory\n\t{\n\t\tint                 bitsPerSample=8;\n\t\tint                 samplesPerPixel=3;\n\t\tint                 bitsPerPixel=32;\n\t\tint                 bytesPerRow=bytesPerLine(srcPixelWidth, 32);\n\t\tNSString*\t\t\tcolorSpace=NSDeviceRGBColorSpace;\n\t\tsize_t\t\t\t\ttotalSize=bytesPerRow * ((bottom-top)+1);\n\t\tint*\t\t\t\tdBits=(int*)malloc(totalSize);\n\t\t*tempMemory = dBits;\n\n\t\tcopyImage8To32(srcBits, dBits, srcPixelWidth, height, left, top, right, bottom,colorMap);\n\t\t\n\t\t\n\t\tCHECKANDRETURN([[NSBitmapImageRep alloc] initWithBitmapDataPlanes:(unsigned char **)&dBits \n\t\t\t\tpixelsWide:right-left\n\t\t\t\tpixelsHigh:bottom-top\n\t\t\t\tbitsPerSample:bitsPerSample\n\t\t\t\tsamplesPerPixel:samplesPerPixel\n\t\t\t\thasAlpha:NO\n\t\t\t\tisPlanar:NO\n\t\t\t\tcolorSpaceName:colorSpace\n\t\t\t\tbytesPerRow:bytesPerRow\n\t\t\t\tbitsPerPixel:bitsPerPixel]);\n\t}//extractPixels_8_to_32;\n\t\n\n-(CGImageRef)extractPixels_16_to_32:(void*)srcBits \n\t\t\t\t\t  srcPixelWidth:(int)srcPixelWidth height: (int) height\n\t\t\t\t\t\t\t   left:(int)left right:(int)right \n\t\t\t\t\t\t\t\ttop:(int)top bottom:(int)bottom\n\t\t\t\t\t\t tempMemory: (void **) tempMemory\n{\n\tint                 bitsPerSample=8;\n\tint                 samplesPerPixel=3;\n\tint                 bitsPerPixel=32;\n\tint                 bytesPerRow=bytesPerLine(srcPixelWidth, 32);\n\tNSString*\t\t\tcolorSpace=NSDeviceRGBColorSpace;\n\tsize_t\t\t\t\ttotalSize=bytesPerRow * ((bottom-top)+1);\n\tint*\t\t\t\tdBits=(int*)malloc(totalSize);\n\t*tempMemory = dBits;\n\t\n\tcopyImage16To32(srcBits, dBits, srcPixelWidth, height, left, top, right, bottom);\n\t\n\tCHECKANDRETURN([[NSBitmapImageRep alloc] initWithBitmapDataPlanes:(unsigned char **)&dBits \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t   pixelsWide:right-left\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t   pixelsHigh:bottom-top\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbitsPerSample:bitsPerSample\n\t\t\t\t\t\t\t\t\t\t\t\t\t  samplesPerPixel:samplesPerPixel\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t hasAlpha:NO\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t isPlanar:NO\n\t\t\t\t\t\t\t\t\t\t\t\t\t   colorSpaceName:colorSpace\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t  bytesPerRow:bytesPerRow\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t bitsPerPixel:bitsPerPixel]);\n}//extractPixels_16_to_32;\n\n-(CGImageRef)computeBitmapFromBitsIndex:(void*)srcBits\n                                                        width:(int)width height:(int)height depth:(int)depth\n                                                         left:(int)left right:(int)right\n                                                          top:(int)top bottom:(int)bottom\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttempMemory: (void**) tempMemory\n{\n    /*\n     It seems that NSImage will replace its NSBitmapImageRep with a\n     NXCachedImageRep of the whole bitmap upon receiving a\n     composite:fromRect:toPoint: message.\n     Therefore:\n              1- it is useless to keep our own \"cached\" image;\n              2- we may as well copy to the right format & depth the affected\n     rectangle in a temporary bitmap, and draw it directly.\n     */\n    debug(int dummy=fprintf(stderr,\"%s\\n\",sel_getName(_cmd));\\\n          int fummy=fflush(stderr);)\n    switch(depth){\n        case 1:\n  \t\t\treturn([self extractPixels_1_to_32:srcBits srcPixelWidth:width height: height\n                                          left:left right:right top:top bottom:bottom\n\t\t\t\t\t\t\t\t\t  colorMap: colorMap32\n\t\t\t\t\t\t\t\t\ttempMemory: tempMemory]);\n            break;\n        case 2:\n   \t\t\treturn([self extractPixels_2_to_32:srcBits srcPixelWidth:width height: height\n                                          left:left right:right top:top bottom:bottom\n\t\t\t\t\t\t\t\t\t  colorMap: colorMap32\n\t\t\t\t\t\t\t\t\ttempMemory: tempMemory]);\n\t\t\tbreak;\n\t\tcase 4:\n  \t\t\treturn([self extractPixels_4_to_32:srcBits srcPixelWidth:width height: height\n                                          left:left right:right top:top bottom:bottom\n\t\t\t\t\t\t\t\t\t  colorMap: colorMap32\n\t\t\t\t\t\t\t\t\ttempMemory: tempMemory]);\n\t\t\tbreak;\n        case 8:\n\t\t\treturn([self extractPixels_8_to_32:srcBits srcPixelWidth:width height: height\n                                          left:left right:right top:top bottom:bottom\n\t\t\t\t\t\t\t\t\t  colorMap: colorMap32\n\t\t\t\t\t\t\t\t\ttempMemory: tempMemory]);\n\t\t\tbreak;\n        case 16:\n            return([self extractPixels_16_to_32:srcBits srcPixelWidth:width height: height\n\t\t\t\t\t\t\t\t\t\t   left:left right:right top:top bottom:bottom\n\t\t\t\t\t\t\t\t\t tempMemory: tempMemory]);\n\t\t\tbreak;\n        default:\n            switch(NSRunAlertPanel(@\"Error\",\n                                   @\"Cocoa user interface for Squeak doesn't support image depth of %d.\\n\",\n                                   @\"Continue\",@\"Quit\",NULL,depth)){\n                case NSAlertDefaultReturn:\n                    return(0);\n                case NSAlertAlternateReturn:\n                    ioExit();\n                    return(0);\n                case NSAlertErrorReturn:\n                default:\n                    NSLog(@\"Cocoa user interface for Squeak doesn't support image depth of %d.\\n\",depth);\n                    ioExit();\n                    return(0);\n                    }\n            }\n}\n\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/SqViewClut.h",
    "content": "/* SqViewClut.h created by marcel on Sat 23-Dec-2000 */\n\n#import \"sqSqueakOSXNSView.h\"\n@class sqSqueakOSXNSView;\n\n@interface sqSqueakOSXNSView(Clut)\n\t\n-(void)initializeSqueakColorMap;\n-(void)setColorEntry:(int)i red:(int)r green:(int)g blue:(int)b;\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/SqViewClut.m",
    "content": "/* SqViewClut.m created by marcel on Sat 23-Dec-2000 */\n\n#import \"sqSqueakOSXNSView.h\"\n\n@implementation sqSqueakOSXNSView(Clut)\n\t\n\t-(void)initializeSqueakColorMap\n\t{\n\t\tcolorMap32=(unsigned int*)malloc(sizeof(unsigned int)*256);\n\t\t\t\t\n#define SetColorEntry(i,r,g,b)\t[self setColorEntry:i red:r green:g blue:b]\n\t\t\n\t\t/* 1-bit colors (monochrome) */\n\t\tSetColorEntry(0, 65535, 65535, 65535);    /* white or transparent */\n\t\tSetColorEntry(1,     0,     0,     0);    /* black */\n\t\t\n\t\t/* additional colors for 2-bit color */\n\t\tSetColorEntry(2, 65535, 65535, 65535);    /* opaque white */\n\t\tSetColorEntry(3, 32768, 32768, 32768);    /* 1/2 gray */\n\t\t/* additional colors for 4-bit color */\n\t\tSetColorEntry( 4, 65535,     0,     0);   /* red */\n\t\tSetColorEntry( 5,     0, 65535,     0);   /* green */\n\t\tSetColorEntry( 6,     0,     0, 65535);   /* blue */\n\t\tSetColorEntry( 7,     0, 65535, 65535);   /* cyan */\n\t\tSetColorEntry( 8, 65535, 65535,     0);   /* yellow */\n\t\tSetColorEntry( 9, 65535,     0, 65535);   /* magenta */\n        \n\t\tSetColorEntry(10,  8192,  8192,  8192);   /* 1/8 gray */\n\t\tSetColorEntry(11, 16384, 16384, 16384);   /* 2/8 gray */\n\t\tSetColorEntry(12, 24576, 24576, 24576);   /* 3/8 gray */\n\t\tSetColorEntry(13, 40959, 40959, 40959);   /* 5/8 gray */\n\t\tSetColorEntry(14, 49151, 49151, 49151);   /* 6/8 gray */\n\t\tSetColorEntry(15, 57343, 57343, 57343);   /* 7/8 gray */\n\t\t\n\t\t/* additional colors for 8-bit color */\n\t\t/* 24 more shades of gray (does not repeat 1/8th increments) */\n\t\tSetColorEntry(16,  2048,  2048,  2048);   /*  1/32 gray */\n\t\tSetColorEntry(17,  4096,  4096,  4096);   /*  2/32 gray */\n\t\tSetColorEntry(18,  6144,  6144,  6144);   /*  3/32 gray */\n\t\tSetColorEntry(19, 10240, 10240, 10240);   /*  5/32 gray */\n\t\tSetColorEntry(20, 12288, 12288, 12288);   /*  6/32 gray */\n\t\tSetColorEntry(21, 14336, 14336, 14336);   /*  7/32 gray */\n\t\tSetColorEntry(22, 18432, 18432, 18432);   /*  9/32 gray */\n\t\tSetColorEntry(23, 20480, 20480, 20480);   /* 10/32 gray */\n\t\tSetColorEntry(24, 22528, 22528, 22528);   /* 11/32 gray */\n\t\tSetColorEntry(25, 26624, 26624, 26624);   /* 13/32 gray */\n\t\tSetColorEntry(26, 28672, 28672, 28672);   /* 14/32 gray */\n\t\tSetColorEntry(27, 30720, 30720, 30720);   /* 15/32 gray */\n\t\tSetColorEntry(28, 34815, 34815, 34815);   /* 17/32 gray */\n\t\tSetColorEntry(29, 36863, 36863, 36863);   /* 18/32 gray */\n\t\tSetColorEntry(30, 38911, 38911, 38911);   /* 19/32 gray */\n\t\tSetColorEntry(31, 43007, 43007, 43007);   /* 21/32 gray */\n\t\tSetColorEntry(32, 45055, 45055, 45055);   /* 22/32 gray */\n\t\tSetColorEntry(33, 47103, 47103, 47103);   /* 23/32 gray */\n\t\tSetColorEntry(34, 51199, 51199, 51199);   /* 25/32 gray */\n\t\tSetColorEntry(35, 53247, 53247, 53247);   /* 26/32 gray */\n\t\tSetColorEntry(36, 55295, 55295, 55295);   /* 27/32 gray */\n\t\tSetColorEntry(37, 59391, 59391, 59391);   /* 29/32 gray */\n\t\tSetColorEntry(38, 61439, 61439, 61439);   /* 30/32 gray */\n\t\tSetColorEntry(39, 63487, 63487, 63487);   /* 31/32 gray */\n\t\t\n\t\t/* The remainder of color table defines a color cube with six steps\n\t\t\tfor each primary color. Note that the corners of this cube repeat\n\t\t\tprevious colors, but simplifies the mapping between RGB colors and\n\t\t\tcolor map indices. This color cube spans indices 40 through 255.\n\t\t*/\n\t\t{\n\t\t\tint r,g,b;\n\t\t\n\t\t\tfor(r=0;r<6;r++){\n\t\t\t\tfor(g=0;g<6;g++){\n\t\t\t\t\tfor(b=0;b<6;b++){\n\t\t\t\t\t\tint i=40+((36*r)+(6*b)+g);\n\t\t\t\t\t\tif(i>255){\n\t\t\t\t\t\t\tfprintf(stderr,\"index out of range \"\n\t\t\t\t\t\t\t\t\t\"in color table compuation\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSetColorEntry(i,(r*65535)/5,(g*65535)/5,(b*65535)/5);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}//initializeSqueakColorMap;\n\n\n-(void)setColorEntry:(int)i red:(int)r green:(int)g blue:(int)b\n{\n     colorMap32[i]=NSSwapHostIntToBig((((r)&0xff00)<<16)|(((g)&0xff00)<<8)|((b)&0xff00)|0xff);\n}\n\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/SqueakOSXAppDelegate.h",
    "content": "//\n//  SqueakOSXAppDelegate.h\n//  SqueakOSXApp\n//\n//  Created by John M McIntosh on 09-11-10.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import <Cocoa/Cocoa.h>\n#import \"sqSqueakAppDelegate.h\"\n#import \"sqSqueakOSXApplication.h\"\n#import \"sqSqueakOSXNSView.h\"\n@protocol NSApplicationDelegate <NSObject> @end\n\n@class sqSqueakMainApplication;\n\n@interface SqueakOSXAppDelegate : sqSqueakAppDelegate <NSApplicationDelegate> {\n    NSWindow *window;\n\tsqSqueakOSXNSView\t *mainView;\n\tBOOL checkForFileNameOnFirstParm;\n\tNSString *possibleImageNameAtLaunchTime;\n}\n\n@property (nonatomic,assign) IBOutlet NSWindow *window;\n@property (nonatomic,assign) IBOutlet sqSqueakOSXNSView *mainView;\n@property (nonatomic,retain) NSString *possibleImageNameAtLaunchTime;\n@property (nonatomic,assign) BOOL checkForFileNameOnFirstParm;\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/SqueakOSXAppDelegate.m",
    "content": "//\n//  SqueakOSXAppDelegate.m\n//  SqueakOSXApp\n//\n//  Created by John M McIntosh on 09-11-10.\n//\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n#import \"SqueakOSXAppDelegate.h\"\n#import \"sqSqueakOSXApplication.h\"\n#import \"sqSqueakOSXScreenAndWindow.h\"\n#import \"sqMacHostWindow.h\"\n#import \"sqSqueakOSXInfoPlistInterface.h\"\n\nSqueakOSXAppDelegate *gDelegateApp;\n\n@implementation SqueakOSXAppDelegate\n\n@synthesize window,mainView,possibleImageNameAtLaunchTime,checkForFileNameOnFirstParm;\n\n- (sqSqueakMainApplication *) makeApplicationInstance {\n\treturn [sqSqueakOSXApplication new];\n}\n\n- (void)applicationWillFinishLaunching:(NSNotification *)aNotification {\n\tself.checkForFileNameOnFirstParm = YES;\n}\n\n- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {\n\tNSAutoreleasePool * pool = [NSAutoreleasePool new];\n\tgDelegateApp = self;\t\n\tsqueakApplication = [self makeApplicationInstance];\n\tsqSqueakOSXScreenAndWindow *windowHandler = [sqSqueakOSXScreenAndWindow new];\n\twindowHandler.mainViewOnWindow = self.mainView;\n\tself.mainView.windowLogic = windowHandler;\n\twindowHandler.windowIndex = 1;\n\t[windowHandler.mainViewOnWindow initializeVariables];\n\tself.window.delegate =  windowHandler;\n\tself.window.contentResizeIncrements = NSMakeSize(8.0f,8.0f);\n\t[self.squeakApplication setupEventQueue];\n\t\n\t[self singleThreadStart];\n//\t[self workerThreadStart];\n\t\n\t[pool drain];\n\t\n}\n\n- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender {\n\treturn NO;\n}\n\n- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender {\n\t[self.window performClose: self.window];\n\treturn NSTerminateCancel;\n}\n\n- (id) createPossibleWindow {\n\tsqInt width,height;\n\textern sqInt getSavedWindowSize(void); //This is VM Callback\n\twidth  = ((unsigned) getSavedWindowSize()) >> 16;\n\theight = getSavedWindowSize() & 0xFFFF;\n\twidth = (sqInt) ((width*4)/32.0f+0.5)*8.0;  //JMM OPEN/GL THOUGHTS FOR PERFORMANCE\n\tNSSize sizeOfWindowContent;\n\tsizeOfWindowContent.width = width;\n\tsizeOfWindowContent.height = height;\n\t\n\t[gDelegateApp.window setContentSize: sizeOfWindowContent];\n\tNSRect resetFrame;\n\tresetFrame.origin.x = 0.0f;\n\tresetFrame.origin.y\t= 0.0f;\n\tresetFrame.size.width = width;\n\tresetFrame.size.height = height;\n\t[gDelegateApp.window setAcceptsMouseMovedEvents: YES];\n\t[gDelegateApp.window useOptimizedDrawing: YES];\n\t[gDelegateApp.window setTitle: [[self.squeakApplication.imageNameURL path] lastPathComponent]];\n\t[gDelegateApp.window setRepresentedURL: self.squeakApplication.imageNameURL];\n\t[gDelegateApp.window setInitialFirstResponder: gDelegateApp.mainView];\n\t[gDelegateApp.window setShowsResizeIndicator: NO];\n\n\textern sqInt getFullScreenFlag(void);\n#if (SQ_VI_BYTES_PER_WORD == 4)\n\tNSPanel *panel;\n\tif (sizeof(void*) == 8) {\n\t\tpanel= NSGetAlertPanel(@\"About this Alpha Version of Cocoa Squeak 64/32 bits 5.7b3 (21)\",\n\t\t\t\t\t\t\t\t\t\t\t\t @\"Only use this VM for testing, it lacks mac menu integration.\",\n\t\t\t\t\t\t\t\t\t\t\t\t @\"Dismiss\",\n\t\t\t\t\t\t\t\t\t\t\t\t nil,\n\t\t\t\t\t\t\t\t\t\t\t\t nil);\n\t} else {\n\t\t\treturn self.window;\n\t}\n#else\n#if COGVM\n#error bad\n#endif\n\tNSPanel *panel;\n\tif (sizeof(long) == 8) {\n\t\tpanel= NSGetAlertPanel(@\"About this Alpha Version of Cocoa Squeak 64/64 bits 5.7b3 (21)\",\n\t\t\t\t\t\t\t\t\t@\"Only use this VM for testing, it lacks mac menu integration.\",\n\t\t\t\t\t\t\t\t\t@\"Dismiss\",\n\t\t\t\t\t\t\t\t\tnil,\n\t\t\t\t\t\t\t\t\tnil);\n\t} else {\n\t\tpanel= NSGetAlertPanel(@\"About this Alpha Version of Cocoa Squeak 32/64 bits 5.7b3 (21)\",\n\t\t\t\t\t\t\t   @\"Only use this VM for testing, it lacks mac menu integration.\",\n\t\t\t\t\t\t\t   @\"Dismiss\",\n\t\t\t\t\t\t\t   nil,\n\t\t\t\t\t\t\t   nil);\n\t}\n\t\n#endif\n\t\n\tNSRect frame= [panel frame];\n\tframe.size.width *= 1.5f;\n\t[panel setFrame: frame display: NO];\n\t[NSApp runModalForWindow: panel];\n\t[panel close]; \n\t\n\treturn self.window;\n}\n\n- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)fileName {\n//\tNSLog(@\"openFile state %i with file %@\",checkForFileNameOnFirstParm,fileName);\n\n\tif (self.checkForFileNameOnFirstParm == YES) {\n\t\tself.checkForFileNameOnFirstParm = NO;\n\t\tself.possibleImageNameAtLaunchTime = fileName;\n\t\treturn YES;\n\t} else {\n\t\tif ([(sqSqueakOSXApplication*)self.squeakApplication isImageFile: fileName] == YES) {\n\t\t\tNSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] bundlePath]];\n\t\t\tLSLaunchURLSpec launchSpec;\n\t\t\tlaunchSpec.appURL = (CFURLRef)url;\n\t\t\tlaunchSpec.passThruParams = NULL;\n\t\t\tlaunchSpec.itemURLs = (CFArrayRef)[NSArray arrayWithObject:[NSURL fileURLWithPath: fileName]];\n\t\t\tlaunchSpec.launchFlags = kLSLaunchDefaults | kLSLaunchNewInstance;\n\t\t\tlaunchSpec.asyncRefCon = NULL;\n\t\t\n\t\t\tOSErr err = LSOpenFromURLSpec(&launchSpec, NULL);\n//\t\t\tNSLog(@\"error %i\",err);\n#pragma unused(err)\n\t\t}\n\t}\n\t\t\n\treturn NO;\n}\n\n- (NSTimeInterval) squeakUIFlushPrimaryDeferNMilliseconds {\n\treturn ((sqSqueakOSXInfoPlistInterface*) self.squeakApplication.infoPlistInterfaceLogic).SqueakUIFlushPrimaryDeferNMilliseconds;\n}\n\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/SqueakOSXApplication.h",
    "content": "//\n//  SqueakOSXApplication.h\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-22.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import <Cocoa/Cocoa.h>\n\n\n@interface SqueakOSXApplication : NSApplication {\n\n}\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/SqueakOSXApplication.m",
    "content": "//\n//  SqueakOSXApplication.m\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-22.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import \"SqueakOSXApplication.h\"\n#import \"sqSqueakOSXScreenAndWindow.h\"\n#import \"sqSqueakOSXNSView.h\"\n\n@implementation SqueakOSXApplication \n\n-(void)sendEvent:(NSEvent*)anEvent\n{\n   if ( [anEvent type] == NSKeyDown &&\n\t\t([anEvent modifierFlags] & NSCommandKeyMask) != 0 ) {\n\t\tNSWindow *who = [anEvent window];\n\t\tsqSqueakOSXScreenAndWindow *squeakScreenWindow = (sqSqueakOSXScreenAndWindow *) who.delegate;\n\t\tsqSqueakOSXNSView *view;\n\t\tif (squeakScreenWindow)\n\t\t\tview = squeakScreenWindow.mainViewOnWindow;\n\t\telse\n\t\t\tview = [who contentView];\n\t   [view fakeKeyDownUp: anEvent];\n   } else {\n        [super sendEvent:anEvent];\n    }\n}   \n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/dtraceOperationsPerSecond.d",
    "content": "#pragma D option quiet\n\ndtrace:::BEGIN\n{\n\tprintf(\"Sampling... Hit Ctrl-C to end.\\n\");\n\tstart = timestamp;\t\t\n}\n\nobjc$target::-drawRect?:entry\n{\n\t@operationspercpu[cpu] = count();\t\n\t@totaloperationexecutions[probemod] = count();\n\n\t@multicoredistributionofalloperations = lquantize((cpu + 1), 1, 16, 1);\n\t@multicoredistributionofoperations[probemod] = lquantize((cpu + 1), 1, 16, 1);\n\n\tstarttimeformethod[probemod] = timestamp;\t\n\tcpustarttimeformethod[probemod] = vtimestamp;\t\n\tmethodhasenteredatleastonce[probemod] = 1;\n}\n\nobjc$target::-drawRect?:return\n/methodhasenteredatleastonce[probemod] == 1/\n{\n\t@overallexecutions[probemod] = count();\n\t@averageexecutiontime[probemod] = avg((timestamp - starttimeformethod[probemod]) / 1000);\n\t@averagecpuexecutiontime[probemod] = avg((vtimestamp - cpustarttimeformethod[probemod]) / 1000);\n}\n\ntick-1s\n{\n\tprinta(\"%30s %10@u operations / s\\n\", @totaloperationexecutions);\n\n\tclear(@totaloperationexecutions);\n}\n\ndtrace:::END \n{\n\tseconds = (timestamp - start) / 1000000000;\n\n\tnormalize(@averageexecutiontime, 1000);\n\tnormalize(@averagecpuexecutiontime, 1000);\n\n\tprintf(\"Ran for %u seconds\\n\", seconds);\n\tprintf(\"%30s %20s %20s %20s\\n\", \"Operation\", \"Executions\",\"Average time (ms)\", \"CPU average time (ms)\");\n\tprinta(\"%30s %20@u %20@u %20@u\\n\", @overallexecutions, @averageexecutiontime, @averagecpuexecutiontime);\n\n\tprintf(\"\\nCPU core distribution of all operations:\\n\");\n\tprinta(@multicoredistributionofalloperations);\n\n\tprintf(\"CPU core distribution, by operation type:\\n\");\n\tprinta(@multicoredistributionofoperations);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/dtracedrawrecttiming.d",
    "content": "#pragma D option quiet\n\nobjc$target::-drawRect?:entry\n{\n\tstart[probemod] = timestamp;\t\n}\n\nobjc$target::-drawRect?:return\n{\n\tprintf(\"%30s %10s Execution time: %u us\\n\", probemod, probefunc, (timestamp - start[probemod]) / 1000);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/keyBoardStrokeDetails.h",
    "content": "//\n//  keyBoardStrokeDetails.h\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-22.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import <Cocoa/Cocoa.h>\n\n\n@interface keyBoardStrokeDetails : NSObject {\n\tunsigned short keyCode;\n\tNSUInteger modifierFlags;\n}\n\n@property (nonatomic,assign) unsigned short keyCode;\n@property (nonatomic,assign) NSUInteger modifierFlags;\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/keyBoardStrokeDetails.m",
    "content": "//\n//  keyBoardStrokeDetails.m\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-22.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import \"keyBoardStrokeDetails.h\"\n\n@implementation keyBoardStrokeDetails\n@synthesize keyCode, modifierFlags;\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/macintoshosxextra.c",
    "content": "/*\n *  macintoshosxextra.c\n *  SqueakPureObjc\n *\n *  Created by John M McIntosh on 09-11-14.\n *  Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n *\n */\n\n#include \"macintoshosxextra.h\"\n\n#include <sys/syslimits.h>\n\n\nsqInt ioFormPrint(sqInt bitsAddr, sqInt width, sqInt height, sqInt depth, double hScale, double vScale, sqInt landscapeFlag) {\n\t/* experimental: print a form with the given bitmap, width, height, and depth at\n\t the given horizontal and vertical scales in the given orientation\n\t However John Mcintosh has introduced a printjob class and plugin to replace this primitive */\n#pragma unused( bitsAddr,  width,  height,  depth,  hScale,  vScale,  landscapeFlag)\n\treturn true;\n}\n\nsqInt ioGetButtonState() {return 0;}\nsqInt ioGetKeystroke() {return -1;}\nsqInt ioMousePoint() {return 0;}\nsqInt ioPeekKeystroke() {return 0;}\n\n\nsqInt ioSetDisplayMode( sqInt width, sqInt height, sqInt depth, sqInt fullscreenFlag) {return 0;}\n\n\n//int plugInTimeToReturn(void) {\n//    return false;\n//}\n\nsqInt clearProfile(void){return 0;}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\nsqInt dumpProfile(void){return 0;}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\nsqInt startProfiling(void){return 0;}\t\t\t\t\t\t\t\t\t\t\t\t\t\nsqInt stopProfiling(void)\t{return 0;}\t\t\t\n\nint plugInNotifyUser(char *msg);\nint plugInNotifyUser(char *msg) { return 0; }\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/macintoshosxextra.h",
    "content": "/*\n *  macintoshosxextra.h\n *  SqueakPureObjc\n *\n *  Created by John M McIntosh on 09-11-14.\n *  Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n *\n */\n\n#include \"sq.h\""
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/plugins/HostWindowPlugin/sqMacHostWindow.h",
    "content": "/*\n *  sqMacHostWindow.h\n *  SqueakVMForCarbon\n *\n *  Created by John M McIntosh on Tue Jul 20 2004.\n *\n \n   3.8.15b3  Feb 19th, 2007 JMM add cursor set logic\n   Altered for IPhone\n\n */\n/*\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#include \"HostWindowPlugin.h\"\n#ifdef BUILD_FOR_OSX\n#include <ApplicationServices/ApplicationServices.h>\n#else\n#include <CoreGraphics/CoreGraphics.h>\n#endif\n/* window handle type */\n#define wHandleType void *\n#define wIndexType sqInt \n\ntypedef struct windowDescriptorBlock {\n\tstruct windowDescriptorBlock * next;\n\twHandleType\t\thandle;\n\twIndexType\t\twindowIndex;\n\t/* extra fields to support your platform needs */\n\tvoid * context;\n\tCGRect\tupdateArea;\n\tsqInt\twidth;\n\tsqInt\theight;\n} windowDescriptorBlock;\n\nwindowDescriptorBlock *windowBlockFromHandle(wHandleType windowHandle);\nsqInt windowIndexFromBlock( windowDescriptorBlock * thisWindow);\nsqInt windowIndexFromHandle(wHandleType windowHandle);\nwHandleType windowHandleFromIndex(wIndexType windowIndex);\nwindowDescriptorBlock *AddWindowBlock(void);\nwindowDescriptorBlock *windowBlockFromIndex(sqInt windowIndex);\nsqInt getCurrentIndexInUse(void);\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/plugins/HostWindowPlugin/sqMacHostWindow.m",
    "content": "/*\n *  sqMacHostWindow.m\n *  SqueakVMForCarbon\n *\n *  Created by John M McIntosh on Tue Jul 20 2004.\n *  Copyright Corporate Smalltalk Consulting Ltd 2008. All rights reserved.\n *\n\tJuly 15th 2005 add logic to flush QD buffers for os-x 10.4\n\t 3.8.15b3  Feb 19th, 2007 JMM add cursor set logic\n\tMay 15th, 2008 IPhone\n\tSept 6th, 2010 Cocoa\n\n */\n/*\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n//\n#include <Cocoa/Cocoa.h>\n#include \"sqVirtualMachine.h\"\n#include \"sqMacHostWindow.h\"\n#include <stdlib.h>\n\nextern struct VirtualMachine *interpreterProxy;\nsqInt RemoveWindowBlock(windowDescriptorBlock * thisWindow);\n\nsqInt createWindowWidthheightoriginXyattrlength(sqInt w,sqInt h,sqInt x,sqInt y,  char * list, sqInt listLength) {\n\treturn -1;\n}\n\nint closeWindow(int windowIndex) {\n\tNSWindow\t*windowHandle;\n\twindowHandle = windowHandleFromIndex(windowIndex);\n\tif(windowHandle == NULL) \n\t\treturn 0;\n\twindowBlockFromIndex(windowIndex)->context = NULL;\n\tRemoveWindowBlock(windowBlockFromIndex(windowIndex));\t\n\t[windowHandle close];\n\treturn 1;\n}\n\nsqInt ioPositionOfWindow(wIndexType windowIndex)\n{\n\tif (windowHandleFromIndex(windowIndex) == NULL)\n\t\treturn -1;\n\treturn (0 << 16) | (0 & 0xFFFF);  /* left is high 16 bits; top is low 16 bits */\n}\n\nsqInt ioPositionOfWindowSetxy(wIndexType windowIndex, sqInt x, sqInt y)\n{\n\treturn -1;\n}\n\nsqInt ioSizeOfWindow(wIndexType windowIndex)\n{\n\tsqInt w=0, h=0;\n\treturn (w << 16) | (h & 0xFFFF);  /* w is high 16 bits; h is low 16 bits */\n}\n\nint ioPositionOfNativeDisplay(unsigned long windowHandle)\n{\n\tsqInt w=0, h=0;\n\treturn (w << 16) | (h & 0xFFFF);  /* w is high 16 bits; h is low 16 bits */\n}\n\nsqInt ioSizeOfWindowSetxy(wIndexType windowIndex, sqInt x, sqInt y)\n{\n\treturn (0);  /* w is high 16 bits; h is low 16 bits */\n}\n\nsqInt ioSetTitleOfWindow(sqInt windowIndex, char * newTitle, sqInt sizeOfTitle) {\n\treturn 1;\n}\n\nsqInt ioCloseAllWindows(void) {\n\treturn 1;\n}\n\n\n\n/* addendum to sqPlatformSpecific.h */\n/* multiple host windows stuff */\n\nstatic windowDescriptorBlock *windowListRoot = NULL;\n\n/* end addendum to sqPlatformSpecific.h */\n\n/* simple linked list management code */\n/* window list management */\n\nwindowDescriptorBlock *windowBlockFromIndex(sqInt windowIndex) {\nwindowDescriptorBlock *entry;\n\tentry = windowListRoot;\n\twhile(entry) {\n\t\tif(entry->windowIndex == windowIndex) return entry;\n\t\tentry = entry->next;\n\t}\n\treturn NULL;\n}\n\nwindowDescriptorBlock *windowBlockFromHandle(wHandleType windowHandle) {\nwindowDescriptorBlock *entry;\n\tentry = windowListRoot;\n\twhile(entry) {\n\t\tif(entry->handle == windowHandle) return entry;\n\t\tentry = entry->next;\n\t}\n\treturn NULL;\n}\n\n\nwHandleType windowHandleFromIndex(sqInt windowIndex)  {\nwindowDescriptorBlock *entry;\n\tentry = windowListRoot;\n\twhile(entry) {\n\t\tif(entry->windowIndex == windowIndex) return entry->handle;\n\t\tentry = entry->next;\n\t}\n\treturn NULL;\n}\n\nsqInt windowIndexFromHandle(wHandleType windowHandle) {\nwindowDescriptorBlock *entry;\n\tentry = windowListRoot;\n\twhile(entry) {\n\t\tif(entry->handle == windowHandle) return entry->windowIndex;\n\t\tentry = entry->next;\n\t}\n\treturn 0;\n}\n\nsqInt windowIndexFromBlock( windowDescriptorBlock * thisWindow) {\nwindowDescriptorBlock *entry;\n\tentry = windowListRoot;\n\twhile(entry) {\n\t\tif(entry == thisWindow) return entry->windowIndex;\n\t\tentry = entry->next;\n\t}\n\treturn 0;\n}\n\nstatic sqInt nextIndex = 1; \n\nwindowDescriptorBlock *AddWindowBlock(void) {\n/* create a new entry in the linkedlist of windows.\n * If the calloc fails, return NULL which will then go back to the\n * prim and fail it cleanly.\n * Initialize the block to a sensible state\n */\nwindowDescriptorBlock *thisWindow;\n\n\tthisWindow = (windowDescriptorBlock*) calloc(1, sizeof(windowDescriptorBlock));\n\tif ( thisWindow == NULL) {\n\t\treturn NULL;\n\t}\n\tthisWindow->next = windowListRoot;\n\tthisWindow->windowIndex = nextIndex++;\n\tthisWindow->handle = NULL;\n\twindowListRoot = thisWindow;\n\n\treturn windowListRoot;\n}\n\n/*\n * RemoveWindowBlock:\n * Remove the given entry from the list of windows.\n * free it, if found.\n */\n sqInt RemoveWindowBlock(windowDescriptorBlock * thisWindow) {\nwindowDescriptorBlock *prevEntry;\n\n\n\t/* Unlink the entry from the module chain */\n\tif(thisWindow == windowListRoot) {\n\t\twindowListRoot = thisWindow->next;\n\t} else {\n\t\tprevEntry = windowListRoot;\n\t\twhile(prevEntry->next != thisWindow) {\n\t\t\tprevEntry = prevEntry->next;\n\t\t\tif (prevEntry == NULL) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\tprevEntry->next = thisWindow->next;\n\t}\n\tfree(thisWindow);\n\treturn 1;\n}\n\nsqInt getCurrentIndexInUse(void) {\n\treturn nextIndex-1;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/plugins/SoundPlugin/sqSqueakOSXSoundCoreAudio.h",
    "content": "//\n//  sqSqueakOSXSoundCoreAudio.h\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-27.\n/* Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n //  Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import \"sqSqueakSoundCoreAudio.h\"\n\n@interface sqSqueakOSXSoundCoreAudio : sqSqueakSoundCoreAudio {\n\n}\n-\t(sqInt) soundInitOverride;\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/plugins/SoundPlugin/sqSqueakOSXSoundCoreAudio.m",
    "content": "//\n//  sqSqueakOSXSoundCoreAudio.m\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-27.\n/* Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n //  Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n *///\n\n#import \"sqSqueakOSXSoundCoreAudio.h\"\n\n\n@implementation sqSqueakOSXSoundCoreAudio\n-\t(sqInt) soundInit {\n\treturn 1;\n}\n\n-\t(sqInt) soundInitOverride {\n\t//NSLog(@\"%i sound init\",ioMSecs());\n\tself.outputAudioQueue = nil;\n\tself.inputAudioQueue = nil;\n\tself.semaIndexForOutput = 0;\n\tself.semaIndexForInput = 0;\n\tself.outputFormat = calloc(1,sizeof(AudioStreamBasicDescription));\n\tself.inputFormat = calloc(1,sizeof(AudioStreamBasicDescription));\n\tself.outputBuffers = calloc((unsigned)kNumberOfBuffers,sizeof(AudioQueueBufferRef));\n\tself.inputBuffers = calloc((unsigned) kNumberOfBuffers,sizeof(AudioQueueBufferRef));\n\tsoundOutQueue = [Queue new];\n\tsoundInQueue = [Queue new];\n\treturn 1;\n}\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/sqMacUnixExternalPrims.m",
    "content": "\n//  Created by John M McIntosh on 09-11-27.\n//  This file orginally comes from the sqUnixExternalPrims.c written by Ian Piumarta\n//  With additional work for the 3.x and 4.x series of macintosh carbon vms\n//  To preserve the behavior, bugs, etc I decided to copy the code versus a new re-write\n\n/* sqUnixExternalPrims.c -- Unix named primitives and loadable modules\n * \n *   Copyright (C) 1996-2009 by Ian Piumarta\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a copy\n *   of this software and associated documentation files (the \"Software\"), to deal\n *   in the Software without restriction, including without limitation the rights\n *   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n *   copies of the Software, and to permit persons to whom the Software is\n *   furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n *   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n *   SOFTWARE.\n */\n\n /* Author: Ian.Piumarta@INRIA.Fr\n *\n * Last edited: 2005-04-06 06:09:36 by piumarta on pauillac.hpl.hp.com\n\t\n * Altered by John M McIntosh johnmci@smalltalkconsulting.com Feb 24th, 2006 for os-x carbon support\n 3.8.11b2 load from resource location first, avoid plugins external directory because of intel migration effort issues.\n 3.8.17b1 April 25, 2007, JMM rework for 10.2.8 backwards support using Ian's dl* logic. \n 5.0.0b6  Nov 27, 2009, JMM rework for the 32/64bit 5.0 VM\n  \n */\n#import \"sqSqueakOSXInfoPlistInterface.h\"\n#import \"SqueakOSXAppDelegate.h\"\n#import \"sq.h\"\n\nextern SqueakOSXAppDelegate *gDelegateApp;\n\n# define dprintf(ARGS) if (((sqSqueakOSXInfoPlistInterface*) gDelegateApp.squeakApplication.infoPlistInterfaceLogic).SqueakDebug) fprintf ARGS\n \n#if defined(HAVE_LIBDL)\t/* non-starter without this! */\n\n#include <dlfcn.h> \n#include <sys/param.h>\n#include <sys/stat.h>\n\n/* get a value for RTLD_NOW, with increasing levels of desperation... */\n\n#if !defined(RTLD_NOW)\n# if defined(DL_NOW)\n#   define RTLD_NOW DL_NOW\n# elif defined(RTLD_LAZY)\n#   define RTLD_NOW RTLD_LAZY\n# elif defined(DL_LAZY)\n#   define RTLD_NOW DL_LAZY\n# else\n#   warning: defining RTLD_NOW as 1\n#   define RTLD_NOW 1\n# endif\n#endif\n\n#if !defined(RTLD_GLOBAL)\n# define RTLD_GLOBAL 0\n#endif\n\n#endif\n\n\n/*** local functions ***/\nvoid *ioLoadModuleRaw(char *pluginName);\n\n/*  Attempt to load the shared library named by the concatenation of prefix,\n *  moduleName and suffix.  Answer the new module entry, or 0 if the shared\n *  library could not be loaded.\n */\nstatic void *tryLoadingInternals(NSString *libNameString) {\t\n\tstruct stat buf;\n\tint         err;\n\tvoid        *handle = NULL;\n\tconst char* libName = [libNameString fileSystemRepresentation];\n\t\n\tif ((!(err= stat(libName, &buf))) && S_ISDIR(buf.st_mode)) {\n\t\tdprintf((stderr, \"ignoring directory: %s\\n\", libName));\n\t} else {\n\t    dprintf((stderr, \"tryLoading %s\\n\", libName));\n\t\thandle= dlopen(libName, RTLD_NOW | RTLD_GLOBAL);\n\t    if (handle == NULL) {\n\t\t\tconst char* why = dlerror();\n\t\t\tif ((!err) && (((sqSqueakOSXInfoPlistInterface*) gDelegateApp.squeakApplication.infoPlistInterfaceLogic).SqueakDebug))\n\t\t\t\tfprintf(stderr, \"ioLoadModule(%s):\\n  %s\\n\", libName, why);\n\t\t} else {\n\t\t    return handle;\n\t\t}\n\t}\n\treturn NULL;\n}\n\nstatic void *tryLoading(NSString *dirNameString, char *moduleName)\n{\n\tvoid        *handle= NULL;\n\tNSString    *libName;\n\t\n\tlibName = [dirNameString stringByAppendingPathComponent: [NSString stringWithUTF8String: moduleName]];\n\tlibName = [libName stringByAppendingPathExtension: @\"bundle/Contents/MacOS/\"];\n\tlibName = [libName stringByAppendingPathComponent: [NSString stringWithUTF8String: moduleName]];\n\thandle = tryLoadingInternals(libName);\n\tif (handle) \n\t\treturn handle;\n\t\n\tlibName = [dirNameString stringByAppendingPathComponent: [NSString stringWithUTF8String: moduleName]];\n\thandle = tryLoadingInternals(libName);\n\tif (handle) \n\t\treturn handle;\n\t\n\tif (((sqSqueakOSXInfoPlistInterface*) gDelegateApp.squeakApplication.infoPlistInterfaceLogic).SqueakPluginsBuiltInOrLocalOnly)\n\t\treturn NULL;\n\t\n\tstatic char *prefixes[]= { \"\", \"lib\", 0 };\n\tstatic char *suffixes[]= { \"\", \"so\", \"dylib\",0 };\n\tchar\t     **prefix= NULL, **suffix= NULL;\n\n\tfor (prefix= prefixes;  *prefix;  ++prefix)\n\t\tfor (suffix= suffixes;  *suffix;  ++suffix)\t\t{\n\t\t\tlibName = [dirNameString stringByAppendingPathComponent: [NSString stringWithUTF8String: *prefix]];\n\t\t\tlibName = [libName stringByAppendingString: [NSString stringWithUTF8String: moduleName]];\n\t\t\tlibName = [libName stringByAppendingPathExtension: [NSString stringWithUTF8String: *suffix]];\n\n\t\t\thandle = tryLoadingInternals(libName);\n\t\t\tif (handle) \n\t\t\t\treturn handle;\n\t\t}\n\treturn NULL;\n}\n\n\n/*  Find and load the named module.  Answer 0 if not found (do NOT fail\n *  the primitive!).\n */\nvoid *ioLoadModule(const char *pluginName) {\n\tNSAutoreleasePool * pool = [NSAutoreleasePool new];\n\tvoid* result = ioLoadModuleRaw(pluginName);\n\t[pool drain];\n\treturn result;\n}\n\t\nvoid *ioLoadModuleRaw(char *pluginName)\n{\n\tvoid *handle= null;\n\n\tif ((pluginName == null) || (pluginName[0] == 0x00)) {\n\t\thandle = dlopen(0, RTLD_NOW | RTLD_GLOBAL);\n\t\tif (handle == null) {\n\t\t\tchar * why = dlerror();\n\t\t\tdprintf((stderr, \"ioLoadModule(<intrinsic>): %s\\n\", why));\n\t\t} else {\n\t\t\tdprintf((stderr, \"loaded: <intrinsic>\\n\"));\n\t\t\treturn handle;\n\t\t}\n    }\n\t\n\t/* first, look in the \"<Squeak VM directory>Plugins\" directory for the library */\n\tNSString *pluginDirPath = [[gDelegateApp.squeakApplication.vmPathStringURL path] stringByAppendingPathComponent: @\"Plugins/\"];\n\tNSString *vmDirPath = [[NSBundle mainBundle] resourcePath];\n\n\tif (((sqSqueakOSXInfoPlistInterface*) gDelegateApp.squeakApplication.infoPlistInterfaceLogic).SqueakPluginsBuiltInOrLocalOnly) {\n\t  if ( (handle= tryLoading( vmDirPath, pluginName)) || (handle= tryLoading( pluginDirPath,\tpluginName)))\n\t\t\treturn handle;\n    } else {\n\t\t  if ((   handle= tryLoading( pluginDirPath,\tpluginName))\n\t\t\t  || (handle= tryLoading( @\"./\",\t\t\tpluginName))\n\t\t\t  || (handle= tryLoading( vmDirPath,\t\tpluginName))\n\t\t\t  || (handle= tryLoading( @\"\",\t\t\t\tpluginName))\n\t\t\t  )\n\t\t\treturn handle;\n\t}\n\n\t// the following is needed so that, for example, the FFI can pick up\n\t// things like <cdecl: 'xyz' module: 'CoreServices'>\n\t{\n\t\tstatic char *frameworks[]=\n\t\t{\n\t\t\t\"\",\n\t\t\t\"/CoreServices.framework/Frameworks\",\n\t\t\t\"/ApplicationServices.framework/Frameworks\",\n\t\t\t\"/Carbon.framework/Frameworks\",\n\t\t\t0\n\t\t};\n\t\t\n\t\tstatic NSString *systemFolder = NULL;\n\t\tchar **framework= NULL;\n\t\tchar workingData[PATH_MAX+1];\n\t\tsize_t pluginNameLength;\n\t\tNSString *path,*path2;\n\t\t\n\t\tif (!systemFolder) {\n\t\t\tstruct FSRef frameworksFolderRef;\n\t\t\tOSErr err = FSFindFolder(kSystemDomain, kFrameworksFolderType, false, &frameworksFolderRef);\n#pragma unused(err)\n\t\t\tNSURL *myURLRef = (NSURL *) CFURLCreateFromFSRef(kCFAllocatorDefault, &frameworksFolderRef);\n\t\t\tsystemFolder = [[myURLRef path] retain];\n\t\t\tCFRelease(myURLRef);\n\t\t}\n\t\t\n\t\tpluginNameLength = strlen(pluginName);\n\t\tif (pluginNameLength > 10) {\n\t\t\tstrncpy(workingData,pluginName+pluginNameLength-10,10);\n\t\t\tworkingData[10] = 0x00;\n\t\t\tif (strcmp(workingData,\".framework\") == 0) {\n\t\t\t\tstrncpy(workingData,pluginName,pluginNameLength-10);\n\t\t\t\tworkingData[pluginNameLength-10] = 0x00;\n\t\t\t\tpath = [vmDirPath stringByAppendingPathComponent: [NSString stringWithUTF8String: pluginName]];\n\t\t\t\tif (((sqSqueakOSXInfoPlistInterface*) gDelegateApp.squeakApplication.infoPlistInterfaceLogic).SqueakPluginsBuiltInOrLocalOnly) {\n\t\t\t\t\tpath2 = [path stringByAppendingPathComponent: [NSString stringWithUTF8String: workingData]];\n\t\t\t\t\tif ((handle = tryLoadingInternals(path2)))\n\t\t\t\t\t\treturn handle;\n\t\t\t\t} else {\n\t\t\t\t\tif ((handle= tryLoading(path, workingData)))\n\t\t\t\t\t\treturn handle;\n\t\t\t\t}\n\t\t\t\tpath = [pluginDirPath stringByAppendingPathComponent: [NSString stringWithUTF8String: pluginName]];\n\n\t\t\t\tif (((sqSqueakOSXInfoPlistInterface*) gDelegateApp.squeakApplication.infoPlistInterfaceLogic).SqueakPluginsBuiltInOrLocalOnly) {\n\t\t\t\t\tpath2 = [path stringByAppendingPathComponent: [NSString stringWithUTF8String: workingData]];\n\t\t\t\t\tif ((handle = tryLoadingInternals(path2)))\n\t\t\t\t\t\treturn handle;\n\t\t\t\t} else {\n\t\t\t\t\tif ((handle= tryLoading(path, workingData)))\n\t\t\t\t\t\treturn handle;\n\t\t\t\t}\n\n\t\t\t\tpath = [systemFolder stringByAppendingPathComponent: [NSString stringWithUTF8String: pluginName]];\n\t\t\t\tif (((sqSqueakOSXInfoPlistInterface*) gDelegateApp.squeakApplication.infoPlistInterfaceLogic).SqueakPluginsBuiltInOrLocalOnly) {\n\t\t\t\t\tpath2 = [path stringByAppendingPathComponent: [NSString stringWithUTF8String: workingData]];\n\t\t\t\t\tif ((handle = tryLoadingInternals(path2)))\n\t\t\t\t\t\treturn handle;\n\t\t\t\t} else {\n\t\t\t\t\tif ((handle= tryLoading(path, workingData)))\n\t\t\t\t\t\treturn handle;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (((sqSqueakOSXInfoPlistInterface*) gDelegateApp.squeakApplication.infoPlistInterfaceLogic).SqueakPluginsBuiltInOrLocalOnly)\n\t\t\treturn NULL;\n\t\t\n\t\tfor (framework= frameworks;  *framework;  ++framework) {\n\t\t\tpath = [[systemFolder stringByAppendingPathComponent: [NSString stringWithUTF8String: *framework]]\n\t\t\t\t\tstringByAppendingPathComponent: [NSString stringWithUTF8String: pluginName]];\n\t\t\tif ((handle= tryLoading(path, pluginName)))\n\t\t\t\treturn handle;\n\t\t\t\n\t\t\tpath = [systemFolder stringByAppendingPathComponent: [NSString stringWithUTF8String: *framework]];\n\t\t\tpath = [path stringByAppendingPathComponent: [NSString stringWithUTF8String: pluginName]];\n\t\t\tpath = [path stringByAppendingPathExtension: @\"framework\"];\n\t\t\t\n\t\t\tif ((handle= tryLoading(path, pluginName)))\n\t\t\t\treturn handle;\n\t\t}\n\t}\n\t\n\treturn NULL;\n}\n\n\n/*  Find a function in a loaded module.  Answer 0 if not found (do NOT\n *  fail the primitive!).\n */\nvoid *ioFindExternalFunctionIn(const char *lookupName, void *moduleHandle)\n{\n  char buf[NAME_MAX+1];\n \n  snprintf(buf, sizeof(buf), \"%s\", lookupName);\n  void *fn = dlsym(moduleHandle, buf);\n\n  dprintf((stderr, \"ioFindExternalFunctionIn(%s, %ld)\\n\",lookupName, (long) moduleHandle));\n\n  if ((fn == NULL) && (((sqSqueakOSXInfoPlistInterface*) gDelegateApp.squeakApplication.infoPlistInterfaceLogic).SqueakDebug)\n      && strcmp(lookupName, \"initialiseModule\")\n      && strcmp(lookupName, \"shutdownModule\")\n      && strcmp(lookupName, \"setInterpreter\")\n      && strcmp(lookupName, \"getModuleName\")) {\n\tchar *why = dlerror();\n    fprintf(stderr, \"ioFindExternalFunctionIn(%s, %p):\\n  %s\\n\",lookupName, moduleHandle, why);\n\t}\n\n  return fn;\n}\n\n/*  Free the module with the associated handle.  Answer 0 on error (do\n *  NOT fail the primitive!).\n*/\nsqInt ioFreeModule(void *moduleHandle)\n{\n  int results = dlclose(moduleHandle);\n\t\n  if (results) {\n\t  char* why = dlerror();\n      dprintf((stderr, \"ioFreeModule(%ld): %s\\n\", (long) moduleHandle, why));\n      return 0;\n    }\n  return 1;\n}"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/sqMacV2Browser.h",
    "content": "//\n//  sqMacV2Browser.h\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 5/17/08.\n//  Copyright 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n//\n/* Permission is hereby granted, free of charge, to any person\n*  obtaining a copy of this software and associated documentation\n*  files (the \"Software\"), to deal in the Software without\n*  restriction, including without limitation the rights to use,\n*  copy, modify, merge, publish, distribute, sublicense, and/or sell\n*  copies of the Software, and to permit persons to whom the\n*  Software is furnished to do so, subject to the following\n*  conditions:\n*  \n*  The above copyright notice and this permission notice shall be\n*  included in all copies or substantial portions of the Software.\n*  \n*  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n*  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n*  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n*  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n*  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n*  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n*  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n*  OTHER DEALINGS IN THE SOFTWARE.\n*/\n//\n\nBOOL browserActiveAndDrawingContextOk(void);\nBOOL browserActiveAndDrawingContextOkAndInFullScreenMode(void);\nBOOL browserActiveAndDrawingContextOkAndNOTInFullScreenMode(void);\nBOOL browserWasHeadlessButMadeFullScreen(void);\nsqInt browserGetWindowSize(void);"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/sqMacV2Browser.m",
    "content": "//\n//  sqMacV2Browser.m\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 5/17/08.\n//  Copyright 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n//\n/* Permission is hereby granted, free of charge, to any person\n*  obtaining a copy of this software and associated documentation\n*  files (the \"Software\"), to deal in the Software without\n*  restriction, including without limitation the rights to use,\n*  copy, modify, merge, publish, distribute, sublicense, and/or sell\n*  copies of the Software, and to permit persons to whom the\n*  Software is furnished to do so, subject to the following\n*  conditions:\n*  \n*  The above copyright notice and this permission notice shall be\n*  included in all copies or substantial portions of the Software.\n*  \n*  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n*  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n*  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n*  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n*  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n*  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n*  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n*  OTHER DEALINGS IN THE SOFTWARE.\n*/\n//\n\n#import \"sq.h\"\n#import \"sqMacV2Browser.h\"\n\nBOOL\t\tgSqueakBrowserSubProcess=false,gSqueakBrowserWasHeadlessButMadeFullScreen=false;\nvoid\t\t*SharedBrowserBitMapContextRef=NULL;\n\nextern sqInt getFullScreenFlag(void);  //This is VM callback\n\n\nBOOL b(void) {\n\treturn gSqueakBrowserWasHeadlessButMadeFullScreen;\n}\n\nBOOL browserActiveAndDrawingContextOk(void) {\n\treturn gSqueakBrowserSubProcess && SharedBrowserBitMapContextRef;\n}\n\nBOOL browserActiveAndDrawingContextOkAndInFullScreenMode(void) {\n\treturn browserActiveAndDrawingContextOk() && browserWasHeadlessButMadeFullScreen() && getFullScreenFlag();\n}\n\nBOOL browserActiveAndDrawingContextOkAndNOTInFullScreenMode(void) {\n\treturn browserActiveAndDrawingContextOk() && !getFullScreenFlag();\n}\n\nsqInt browserGetWindowSize(void) {\n\treturn 0;\n}\n\nBOOL browserWasHeadlessButMadeFullScreen() {\n\treturn gSqueakBrowserWasHeadlessButMadeFullScreen;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/sqMacV2Window.h",
    "content": "/*\n *  sqMacV2Window.h\n *  SqueakNoOGLIPhone\n *\n *  Created by John M McIntosh on 5/16/08.\n *  Copyright 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n *\n */\n/* Permission is hereby granted, free of charge, to any person\n *  obtaining a copy of this software and associated documentation\n *  files (the \"Software\"), to deal in the Software without\n *  restriction, including without limitation the rights to use,\n *  copy, modify, merge, publish, distribute, sublicense, and/or sell\n *  copies of the Software, and to permit persons to whom the\n *  Software is furnished to do so, subject to the following\n *  conditions:\n *  \n *  The above copyright notice and this permission notice shall be\n *  included in all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n *  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n *  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n *  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n *  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n *  OTHER DEALINGS IN THE SOFTWARE.\n */\n//\n\nvoid * getSTWindow(void);"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/sqMacV2Window.m",
    "content": "/*\n *  sqMacV2Window.m\n *  SqueakNoOGLIPhone\n *\n *  Created by John M McIntosh on 5/16/08.\n *  Copyright 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n *\n */\n/* Permission is hereby granted, free of charge, to any person\n *  obtaining a copy of this software and associated documentation\n *  files (the \"Software\"), to deal in the Software without\n *  restriction, including without limitation the rights to use,\n *  copy, modify, merge, publish, distribute, sublicense, and/or sell\n *  copies of the Software, and to permit persons to whom the\n *  Software is furnished to do so, subject to the following\n *  conditions:\n *  \n *  The above copyright notice and this permission notice shall be\n *  included in all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n *  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n *  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n *  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n *  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n *  OTHER DEALINGS IN THE SOFTWARE.\n */\n//\n\n#import \"sq.h\"\n#import \"sqMacV2Window.h\"\n#import \"sqMacHostWindow.h\"\n#import \"SqueakOSXAppDelegate.h\"\n#import \"sqMacV2Browser.h\"\n\nextern BOOL gSqueakHeadless;\nextern SqueakOSXAppDelegate *gSqueakApplication;\n\nvoid * getSTWindow(void) {\n\tif (gSqueakHeadless && !browserActiveAndDrawingContextOk()) return NULL;\t\n\treturn  windowHandleFromIndex(1);\n}\n\nvoid makeMainWindow(void) { \n\tsqInt width,height;\n\twindowDescriptorBlock *windowBlock;\n\textern sqInt getSavedWindowSize(void); //This is VM Callback\n\textern sqInt setSavedWindowSize(sqInt value); //This is VM Callback\n\t\n\t/* get old window size */\n\twidth  = (unsigned) getSavedWindowSize() >> 16;\n\theight = getSavedWindowSize() & 0xFFFF;\n\twindowBlock = AddWindowBlock();\n\twindowBlock-> handle = gSqueakApplication.window;\n\twindowBlock->context = nil;\n\twindowBlock->updateArea = CGRectZero;\n\twidth  = (usqInt) ioScreenSize() >> 16;\n\theight = ioScreenSize() & 0xFFFF;\n\t\n\tsetSavedWindowSize( (width << 16) |(height & 0xFFFF));\n\twindowBlock->width = width;\n\twindowBlock->height = height; \n}\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/sqSqueakMainApplication+screen.h",
    "content": "//\n//  sqSqueakMainApplication+screen.h\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 5/22/08.\n//  Copyright 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n//\n/* Permission is hereby granted, free of charge, to any person\n*  obtaining a copy of this software and associated documentation\n*  files (the \"Software\"), to deal in the Software without\n*  restriction, including without limitation the rights to use,\n*  copy, modify, merge, publish, distribute, sublicense, and/or sell\n*  copies of the Software, and to permit persons to whom the\n*  Software is furnished to do so, subject to the following\n*  conditions:\n*  \n*  The above copyright notice and this permission notice shall be\n*  included in all copies or substantial portions of the Software.\n*  \n*  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n*  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n*  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n*  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n*  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n*  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n*  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n*  OTHER DEALINGS IN THE SOFTWARE.\n*/\n//\n\n#import \"sqSqueakMainApplication.h\"\n#import \"sqMacHostWindow.h\"\n\n@interface sqSqueakMainApplication (screen)\n- (sqInt) ioScreenSize;\n- (void) unionScreenArea: (windowDescriptorBlock *) windowBlock clip: (CGRect *) clip;\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/sqSqueakMainApplication+screen.m",
    "content": "//\n//  sqSqueakMainApplication+screen.m\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 5/22/08.\n//  Copyright 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n//\n/* Permission is hereby granted, free of charge, to any person\n*  obtaining a copy of this software and associated documentation\n*  files (the \"Software\"), to deal in the Software without\n*  restriction, including without limitation the rights to use,\n*  copy, modify, merge, publish, distribute, sublicense, and/or sell\n*  copies of the Software, and to permit persons to whom the\n*  Software is furnished to do so, subject to the following\n*  conditions:\n*  \n*  The above copyright notice and this permission notice shall be\n*  included in all copies or substantial portions of the Software.\n*  \n*  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n*  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n*  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n*  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n*  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n*  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n*  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n*  OTHER DEALINGS IN THE SOFTWARE.\n*/\n//\n\n#import \"SqueakNoOGLIPhoneAppDelegate.h\"\n#import \"sqSqueakMainApplication+screen.h\"\n#import \"sqMacV2Browser.h\"\n#import \"sqMacV2Window.h\"\n#import \"HostWindowPlugin.h\"\n\nextern SqueakNoOGLIPhoneAppDelegate *gSqueakApplication;\n\nextern BOOL gSqueakHeadless;\n\n@implementation sqSqueakMainApplication (screen) \n- (sqInt) ioScreenSize {\n\tsqInt w, h;\n\tsqInt browserGetWindowSize(void);\n\tvoid makeMainWindow(void);\n\tsqInt getCurrentIndexInUse(void);\n\textern BOOL gSqueakExplicitWindowOpenNeeded;\t\n\t\n\tif (gSqueakHeadless && !browserActiveAndDrawingContextOk()) \n\t\treturn ((16 << 16) | 16);\n\t\n\tif (browserActiveAndDrawingContextOkAndNOTInFullScreenMode())\n\t\treturn browserGetWindowSize();\n\t\n\tif (getSTWindow() == NULL && !gSqueakExplicitWindowOpenNeeded) {\n\t\tmakeMainWindow();\n\t}\n\t@synchronized(gSqueakApplication.mainView) {\n\t\tCGRect screenSize = [gSqueakApplication.mainView bounds];\n\t\tw = (sqInt) screenSize.size.width;\n\t\th = (sqInt) screenSize.size.height;\n\t}\n\treturn (w << 16) | (h & 0xFFFF);  /* w is high 16 bits; h is low 16 bits */\n\t\n}\n\n- (void) unionScreenArea: (windowDescriptorBlock *) windowBlock clip: (CGRect *) clip {\n\t//\t\tprintf(\"\\n top %f left %f height %f width %f\",clip->origin.y,clip->origin.x,clip->size.height,clip->size.width);\n\tif (CGRectIsEmpty(windowBlock->updateArea))\n\t\twindowBlock->updateArea = *clip;\n\telse\n\t\twindowBlock->updateArea = CGRectUnion(windowBlock->updateArea, *clip);\t\t\t\t\n}\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/sqSqueakOSXApplication+attributes.h",
    "content": "//\n//  sqSqueakOSXApplication+attributes.h\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-11.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import \"sqSqueakOSXApplication.h\" \n\n@interface sqSqueakOSXApplication (attributes)  \n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/sqSqueakOSXApplication+attributes.m",
    "content": "//\n//  sqSqueakOSXApplication+attributes.m\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-11.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import \"sqSqueakOSXApplication+attributes.h\"\n#import \"sqSqueakMainApplication+attributes.h\"\n#import \"sqSqueakMainApplication+vmAndImagePath.h\"\n\nextern struct VirtualMachine* interpreterProxy;\n\n@implementation sqSqueakOSXApplication (attributes) \n\n- (char *) getAttribute:(sqInt)indexNumber {\n\t//indexNumber is a postive/negative number\n#warning to test\n\tswitch (indexNumber) {\n\t\tcase 1001: /* OS type: \"unix\", \"win32\", \"mac\", ... */\n\t\t\treturn \"Mac OS\";\n\t\t\t \n\t\tcase 1002:  { /* OS name: \"solaris2.5\" on unix, \"win95\" on win32, ... */\n\t\t\tSInt32 myattr;\n\t\t\tstatic char data[32];\n\t\t\t\n\t\t\tGestalt(gestaltSystemVersion, &myattr);\n\t\t\tsprintf(data,\"%X\",(unsigned int) myattr);\n\t\t\treturn data;\n\t\t}\n\t\tcase 1003: { /* processor architecture: \"68k\", \"x86\", \"PowerPC\", ...  */\n\t\t\tSInt32 myattr;\n\t\t\t\n\t\t\tGestalt(gestaltSysArchitecture, &myattr);\n\t\t\tif (myattr == gestalt68k) \n\t\t\t\treturn \"68K\";\n\t\t\tif (myattr == gestaltPowerPC) \n\t\t\t\treturn \"powerpc\";\n\t\t\tif (myattr == gestaltIntel) \n\t\t\t\treturn \"intel\";\n\t\t\t\n\t\t\treturn \"unknown\";\n\t\t}\n\t\t\t\n\t\tcase 1005: {\n\t\t\treturn \"Aqua\";\n\t\t}\n\t\t\t\n\t\t\t\n\t\tcase 1006:  {/* vm build string also info.plist */\n#if (SQ_VI_BYTES_PER_WORD == 4)\n\t\t\t\n#if STACKVM\n\t\t\t\n\t\t\treturn \"Mac Cocoa Cog 5.8b12 21-Sep-10 >1B0534FA-246C-47C5-AB29-7A76C81CCDCB<\";\n//\t\t\treturn \"Mac Cocoa Cog 5.8b11 12-Sep-10 >9BFC792A-F173-4C65-AD2A-FFFB1D52DAC2<\";\n//\t\t\treturn \"Mac Cocoa Cog 5.8b10 07-Sep-10 >8AD3A516-DBAC-4CD4-BC89-8F21317DF7E1<\";\n//\t\t\treturn \"Mac Cocoa Cog 5.8b9 06-Sep-10 >01641B99-1842-4422-A99D-43153BEDEFFA<\";\n//\t\t\treturn \"Mac Cocoa Cog 5.8b8 04-Sep-10 >8A66B7E0-B578-4E5F-97B4-6195547A35F5<\";\n//\t\t\treturn \"Mac Cocoa Cog 5.8b7 02-Sep-10 >4EBF00E3-453E-4010-9AC8-6B64C292984B<\";\n//\t\t\treturn \"Mac Cocoa Cog 5.8b6 31-Aug-10 >DFB49E57-40FB-44B9-97D3-B7CA51608429<\";\n//\t\t\treturn \"Mac Cocoa Cog 5.8b5 30-Aug-10 >0A92B82A-9AC1-4B0E-9DEE-440C3FFAE568<\";\n//\t\t\treturn \"Mac Cocoa Cog 5.8b4 27-Aug-10 >5954D562-FB39-4195-9D19-EBB49FAECCF7<\";\n//\t\t\treturn \"Mac Cocoa Cog 5.8b3 21-Aug-10 >5954D562-FB39-4195-9D19-EBB49FAECCF7<\";\n//\t\t\treturn \"Mac Cocoa Cog 5.8b2 08-Jul-10 >7BCAB029-A835-4D12-946D-4AB7083D2955<\";\n//\t\t\treturn \"Mac Cocoa Cog 5.8b1 07-Jul-10 >529F6B5A-DC81-4C1F-81B6-3D99741B954A<\";\n#else\n\t\t\treturn \"Mac Cocoa 5.7b3 27-Aug-10 >7BCAB029-A835-4D12-946D-4AB7083D2955<\";\n//\t\t\treturn \"Mac Cocoa 5.7b2 08-Jul-10 >7BCAB029-A835-4D12-946D-4AB7083D2955<\";\n//\t\t\treturn \"Mac Cocoa 5.7b1 15-Jun-10 >34286DE5-3BD3-40D8-9700-4C41C772B16B<\";\n#endif\n//\t\t\treturn \"Mac Cocoa 5.7b1 15-Jun-10 >34286DE5-3BD3-40D8-9700-4C41C772B16B<\";\n//\t\t\treturn \"Mac Cocoa 5.6b1 02-Mar-10 >9E99B1C2-0B6B-4944-8B6F-74030D14F3C6<\";\n//\t\t\treturn \"Mac Cocoa 5.5b1 16-Feb-10 >2EE2964B-462A-4F66-92AF-C810216EF798<\";\n//\t\t\treturn \"Mac Cocoa 5.4b2 24-Jan-10 >2EE2964B-462A-4F66-92AF-C810216EF798<\";\n//\t\t\treturn \"Mac Cocoa 5.4b1 20-Jan-10 >F0EB07E3-7805-4C09-8419-D8316F7ADC21<\";\n//\t\t\treturn \"Mac Cocoa 5.3b1 06-Jan-10 >0DADC752-8E86-48FC-8D6B-CC97482C6851<\";\n//\t\t\treturn \"Mac Cocoa 5.2b3 05-Jan-10 >1618879A-3D07-427F-A8CB-5B3DF73ED840<\";\n//\t\t\treturn \"Mac Cocoa 5.2b2 04-Jan-10 >94E27C49-8575-4604-A2C4-0A5C659CC734<\";\n//\t\t\treturn \"Mac Cocoa 5.2b1 02-Jan-10 >D94A0034-7415-4AA1-AA7C-B35BBCDBA0D4<\";\n//\t\t\treturn \"Mac Cocoa 5.1b1 25-Dec-09 >C0908D0B-4D97-47CA-9FAB-479AFC6BA978<\";\n//\t\t\treturn \"Mac Cocoa 5.0b9 02-Dec-09 >C8598ABA-DA73-4A71-836C-62C4369D5A0F<\";\n#else\n\t\t\treturn \"Mac Cocoa 5.7b2 64/64 bits 08-Jul-10 >7BCAB029-A835-4D12-946D-4AB7083D2955<\";\n//\t\t\treturn \"Mac Cocoa 5.7b1 64/64 bits 15-Jun-10 >34286DE5-3BD3-40D8-9700-4C41C772B16B<\";\n//\t\t\treturn \"Mac Cocoa 5.6b1 64/64 bits 02-Mar-10 >9E99B1C2-0B6B-4944-8B6F-74030D14F3C6<\";\n//\t\t\treturn \"Mac Cocoa 5.5b1 64/64 bits 16-Feb-10 >70984CDA-9482-4E7F-BCF0-08C635E0A7BF<\";\n//\t\t\treturn \"Mac Cocoa 5.4b2 64/64 bits 24-Jan-10 >70984CDA-9482-4E7F-BCF0-08C635E0A7BF<\";\n//\t\t\treturn \"Mac Cocoa 5.4b1 64/64 bits 20-Jan-10 >E27846BC-15A7-4BE8-B467-B645E9D37163<\";\n//\t\t\treturn \"Mac Cocoa 5.3b1 64/64 bits 06-Jan-10 >0DADC752-8E86-48FC-8D6B-CC97482C6851<\";\n//\t\t\treturn \"Mac Cocoa 5.2b3 64/64 bits 05-Jan-10 >1618879A-3D07-427F-A8CB-5B3DF73ED840<\";\n//\t\t\treturn \"Mac Cocoa 5.2b2 64/64 bits 04-Jan-10 >94E27C49-8575-4604-A2C4-0A5C659CC734<\";\n//\t\t\treturn \"Mac Cocoa 5.2b1 64/64 bits 02-Jan-10 >D94A0034-7415-4AA1-AA7C-B35BBCDBA0D4<\";\n//\t\t\treturn \"Mac Cocoa 5.1b1 64/64 bits 25-Dec-09 >C0908D0B-4D97-47CA-9FAB-479AFC6BA978<\";\n//\t\t\treturn \"Mac Cocoa 5.0b9 64/64 bits 02-Dec-09 >C8598ABA-DA73-4A71-836C-62C4369D5A0F<\";\n//\t\t\treturn \"Mac Cocoa 5.0b8 01-Dec-09 >2329A610-327B-403D-960E-EEF3C369D032<\";\n//\t\t\treturn \"Mac Cocoa 5.0b7 29-Nov-09 >1215B15B-9463-4D53-BA13-AA989DAB5C01<\";\n//\t\t\treturn \"Mac Cocoa 5.0b6 27-Nov-09 >CF087523-A432-4427-9AD3-4ACF26336A08<\";\n//\t\t\treturn \"Mac Cocoa 5.0b5 26-Nov-09 >9C6EF973-CECF-4E38-B5E0-BB9986A03D5D<\";\n//\t\t\treturn \"Mac Cocoa 5.0b4 26-Nov-09 >DA33132E-D7E6-48C4-8363-EB7408E3124B<\";\n//\t\t\treturn \"Mac Cocoa 5.0.0b1 11-Nov-09 >40BF8061-CC65-4E5E-9841-6BB5E809A688<\";\n#endif\n\t\t}\n\t\tcase 1007: { /* vm build string also info.plist */\n#if STACKVM\n\t\t\textern char *__interpBuildInfo;\n\t\t\treturn __interpBuildInfo;\n#endif\n\t\t\tbreak;\n\t\t}\n\t\tcase 1008: { /* vm build string also info.plist */\n# if COGVM\n\t\t\textern char *__cogitBuildInfo;\n\t\t\treturn __cogitBuildInfo;\n#endif\n\t\t\tbreak;\n\t\t}\n\t\tdefault: \n\t\t\tbreak;\n\t}\n\treturn (char *) [super getAttribute: indexNumber];\n}\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/sqSqueakOSXApplication+clipboard.h",
    "content": "//\n//  sqSqueakOSXApplication+clipboard.h\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-23.\n//  Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import \"sqSqueakOSXApplication.h\" \n\n@interface sqSqueakOSXApplication  (clipboard) \n- (sqInt) clipboardSize;\n- (void) clipboardRead: (sqInt) count into: (char *)byteArrayIndex  startingAt: (sqInt) startIndex;\n- (void) clipboardWrite: (sqInt) count from: (char *)byteArrayIndex  startingAt:  (sqInt) startIndex;\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/sqSqueakOSXApplication+clipboard.m",
    "content": "//\n//  sqSqueakOSXApplication+clipboard.m\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-23.\n//  Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n//  Some code sqUnixQuartz.m -- display via native windows on Mac OS X\t-*- ObjC -*-\n//  Author: Ian Piumarta <ian.piumarta@squeakland.org>\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import \"sqSqueakOSXApplication+clipboard.h\"\n\n\nstatic char * clipboard=NULL;\n\n@implementation sqSqueakOSXApplication (clipboard)\n\n/* Cheat, we always call clipboardSize before clipboardRead, so obviously we can do the read when asking for the size */\n\n- (sqInt) clipboardSize {\n\tNSPasteboard *pboard= [NSPasteboard generalPasteboard];\n\tNSString     *type= [pboard availableTypeFromArray: [NSArray arrayWithObject: NSStringPboardType]];\n\tif (clipboard) free(clipboard);\n\tclipboard = NULL;\n\tif (type != NULL) {\n\t\tNSString *possibleData = [pboard stringForType: type];\n\t\tif (!possibleData) \n\t\t\treturn 0;\n\t\tconst char *contents= [[possibleData precomposedStringWithCanonicalMapping] UTF8String];\n\t\tif (contents != nil)\n\t\t\tclipboard= strdup(contents);\n    }\n\treturn clipboard ? (sqInt) strlen(clipboard) : 0;\n}\n\n//Evil assumption is that clipboardSize size <= byteArrayIndex size\n\n- (void) clipboardRead: (sqInt) count into: (char *)byteArrayIndex  startingAt: (sqInt) startIndex {\n\tif (clipboard){\n\t\tmemcpy((char *)byteArrayIndex + startIndex, clipboard, count);  //use memcpy versus strlcpy, targets is not null terminated. \n    }\n}\n\n- (void) clipboardWrite: (sqInt) count from: (char *)byteArrayIndex  startingAt:  (sqInt) startIndex {\n\tNSPasteboard      *pboard= [NSPasteboard generalPasteboard];\n\tNSString * string = [[NSString alloc] initWithBytes: byteArrayIndex length:(NSUInteger)count encoding: NSUTF8StringEncoding];\n\t[pboard declareTypes: [NSArray arrayWithObject: NSStringPboardType] owner: nil];\n\t[pboard setString: string forType: NSStringPboardType];\n\t[string release];\n}\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/sqSqueakOSXApplication+cursor.h",
    "content": "//\n//  sqSqueakOSXApplication+cursor.h\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-14.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import \"sqSqueakOSXApplication.h\" \n\n@interface sqSqueakOSXApplication (cursor)\n- (sqInt) ioSetCursorARGB: (sqInt)  cursorBitsIndex extentX: (sqInt) extentX extentY: (sqInt) extentY\n\t\t\t\t offsetX: (sqInt) offsetX offsetY: (sqInt) offsetY;\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/sqSqueakOSXApplication+cursor.m",
    "content": "//\n//  sqSqueakOSXApplication+cursor.m\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-14.\n//  Some code sqUnixQuartz.m -- display via native windows on Mac OS X\t-*- ObjC -*-\n//  Author: Ian Piumarta <ian.piumarta@squeakland.org>\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n#import \"sqSqueakOSXApplication.h\"\n#import \"sqSqueakOSXApplication+cursor.h\"\nextern BOOL gSqueakHeadless;\nextern BOOL browserActiveAndDrawingContextOk(void);\nBOOL browserActiveAndDrawingContextOkAndInFullScreenMode(void);\n\n\n@implementation sqSqueakOSXApplication (cursor)\n\n- (void) setCursor: (sqInt)  cursorBitsIndex withMask: (sqInt) cursorMaskIndex\n\t\t   offsetX: (sqInt) offsetX offsetY: (sqInt) offsetY {\n\t/* Set the 16x16 cursor bitmap. If cursorMaskIndex is nil, then make the mask the same as\n\t the cursor bitmap. If not, then mask and cursor bits combined determine how cursor is\n\t displayed:\n\t mask\tcursor\teffect\n\t 0\t\t  0\t\ttransparent (underlying pixel shows through)\n\t 1\t\t  1\t\topaque black\n\t 1\t\t  0\t\topaque white\n\t 0\t\t  1\t\tinvert the underlying pixel\n\t */\n\n\tif (gSqueakHeadless && !browserActiveAndDrawingContextOk()) \n\t\treturn;\n\tNSAutoreleasePool * pool = [NSAutoreleasePool new];\n\t \n\tNSBitmapImageRep *bitmap= [[[NSBitmapImageRep alloc]\n\t\t\t initWithBitmapDataPlanes:  NULL pixelsWide: 16 pixelsHigh: 16\n\t\t\t bitsPerSample: 1 samplesPerPixel: 2\n\t\t\t hasAlpha: YES isPlanar: YES\n\t\t\t colorSpaceName: NSCalibratedBlackColorSpace\n\t\t\t bytesPerRow: 2\n\t\t\t bitsPerPixel: 0] autorelease];\n\n    unsigned char*      planes[5];\n\t[bitmap getBitmapDataPlanes:planes];\n\n\tunsigned char*      data;\n    unsigned char*      mask;\n\tNSInteger i;\n\tdata=planes[0];\n\tmask=planes[1];\n\n\tfor (i= 0; i < 16; ++i) {\n\t\tunsigned int word= ((unsigned int *)pointerForIndex_xxx_dmu(cursorBitsIndex))[i];\n\t\tdata[i*2 + 0]= (word >> 24) & 0xFF;\n\t\tdata[i*2 + 1]= (word >> 16) & 0xFF;\n\t\t\n\t\tif (cursorMaskIndex)\n\t\t\tword= ((unsigned int *)pointerForIndex_xxx_dmu(cursorMaskIndex))[i];\n\t\telse \n\t\t\tword = 0xFFFFFFFF;\n\t\t\n\t\tmask[i*2 + 0]= (word >> 24) & 0xFF;\n\t\tmask[i*2 + 1]= (word >> 16) & 0xFF;\n\t}\n\n\tNSImage *image = [[NSImage new] autorelease];\n\t[image addRepresentation: bitmap];\n\t\n\t\n\tNSPoint hotSpot= { -offsetX, -offsetY };\n\tself.squeakCursor = nil;\n\tsqueakCursor = [[NSCursor alloc] initWithImage: image hotSpot: hotSpot];\n\n/*\tif (browserActiveAndDrawingContextOkAndNOTInFullScreenMode())\n\t\tbrowserSetCursor(&macCursor);\n*/\n#warning what about browser\n\t\n\t\n\tif (!gSqueakHeadless || browserActiveAndDrawingContextOkAndInFullScreenMode()) {\n\t\tself.squeakHasCursor = YES;\n\t\t[self.squeakCursor performSelectorOnMainThread: @selector(set) withObject: nil waitUntilDone: NO];\n\t}\n\t[pool drain];\n}\n\n- (sqInt) ioSetCursorARGB: (sqInt) cursorBitsIndex extentX: (sqInt) extentX extentY: (sqInt) extentY\n\t\t\t\t  offsetX: (sqInt) offsetX offsetY: (sqInt) offsetY {\n\tif (gSqueakHeadless) \n\t\treturn 0;\n\tif (browserActiveAndDrawingContextOk() && !browserActiveAndDrawingContextOkAndInFullScreenMode()) \n\t\treturn 0;\n\t\n\tNSAutoreleasePool *pool= [[NSAutoreleasePool alloc] init];\n\t\n\tNSBitmapImageRep *bitmap= [[[NSBitmapImageRep alloc]\n\t\t\t\t\t\t\t\tinitWithBitmapDataPlanes: NULL pixelsWide: extentX pixelsHigh: extentY\n\t\t\t\t\t\t\t\tbitsPerSample: 8 samplesPerPixel: 4\n\t\t\t\t\t\t\t\thasAlpha: YES isPlanar: NO\n\t\t\t\t\t\t\t\tcolorSpaceName: NSCalibratedRGBColorSpace\n\t\t\t\t\t\t\t\tbytesPerRow: extentX * 4\n\t\t\t\t\t\t\t\tbitsPerPixel: 0] autorelease];\n\tunsigned int *planes[5];\n\t[bitmap getBitmapDataPlanes: (unsigned char **) planes];\n\tunsigned int *src= (unsigned int*) pointerForIndex_xxx_dmu(cursorBitsIndex);\n\tunsigned int *dst= planes[0];\n\tsqInt i;\n\tfor (i= 0; i < extentX * extentY; ++i, ++dst, ++src) {\n#if VMENDIANNESS\n\t\t*dst=  ((*src & 0xFF000000) >> 24) | ((*src & 0x00FFFFFF) << 8) ; // ARGB to RGBA\n#else\n\t\t*dst= (*src & 0xFF00FF00) | ((*src & 0x000000FF) << 16) | ((*src & 0x00FF0000) >> 16); // BGRA to RGBA\n#endif\n\t}\n\tNSImage  *image= [[[NSImage alloc] init] autorelease];\n\t[image addRepresentation: bitmap];\n\tNSPoint hotSpot= { -offsetX, -offsetY };\n\tself.squeakHasCursor = YES;\n\tself.squeakCursor = nil;\n\tsqueakCursor= [[NSCursor alloc] initWithImage: image hotSpot: hotSpot];\n\t[self.squeakCursor performSelectorOnMainThread: @selector(set) withObject: nil waitUntilDone: NO];\n\t[pool drain];\n\treturn 1;\n}\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/sqSqueakOSXApplication+events.h",
    "content": "//\n//  sqSqueakOSXApplication+events.h\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-15.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n#import \"sqSqueakOSXApplication.h\"\n#import \"sqSqueakMainApplication+events.h\"\n#import \"sqSqueakOSXNSView.h\"\n@class NSWIndow;\n@interface sqSqueakOSXApplication (events) \n\n- (void) recordCharEvent:(NSString *) unicodeString fromView: (sqSqueakOSXNSView *) mainView;\n- (void) recordKeyUpEvent:(NSEvent *)theEvent fromView: (sqSqueakOSXNSView*) aView ;\n- (void) recordMouseEvent: (NSEvent*) theEvent fromView: (sqSqueakOSXNSView*) aView;\n- (void) recordWheelEvent: (NSEvent*) theEvent  fromView: (sqSqueakOSXNSView*) aView;\n- (void) pushEventToQueue: (sqInputEvent *) evt;\n- (void) fakeMouseWheelKeyboardEventsKeyCode: (int) keyCode ascii: (int) ascii windowIndex: (int) windowIndex;\n- (int) mapMouseAndModifierStateToSqueakBits: (NSEvent *) event;\n- (NSUInteger) translateCocoaModifiersToCarbonModifiers: (NSUInteger) modifiers;\n- (int) translateCocoaModifiersToSqueakModifiers: (NSUInteger) modifiers;\n- (void) recordDragEvent: (int) dragType numberOfFiles: (int) numFiles where: (NSPoint) local_point windowIndex: (sqInt) windowIndex;\n- (void) recordWindowEvent: (int) type window: (NSWIndow *) window;\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/sqSqueakOSXApplication+events.m",
    "content": "//\n//  sqSqueakOSXApplication+events.m\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-15.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import \"sqSqueakOSXApplication+events.h\"\n#import \"SqueakOSXAppDelegate.h\"\n#import \"sqSqueakOSXScreenAndWindow.h\"\n#import \"sqMacV2Browser.h\"\n#import \"sqSqueakOSXInfoPlistInterface.h\"\n#import \"keyBoardStrokeDetails.h\"\n#import \"sqSqueakOSXNSView.h\"\n#import \"sqMacHostWindow.h\"\n\nextern struct\tVirtualMachine* interpreterProxy;\nextern SqueakOSXAppDelegate *gDelegateApp;\n\n/* This table maps the 5 Macintosh modifier key bits to 4 Squeak modifier\n bits. (The Mac shift and caps lock keys are both mapped to the single\n Squeak shift bit).  This was true for squeak upto 3.0.7. Then in 3.0.8 we \n decided to not map the cap lock key to shift\n \n Mac bits: <control><option><caps lock><shift><command>\n ST bits:  <command><option><control><shift>\n */\nchar modifierMap[256] = {\t\n\t0, 8, 1, 9, 0, 8, 1, 9, 4, 12, 5, 13, 4, 12, 5, 13, //Track left and right shift keys\n\t2, 10, 3, 11, 2, 10, 3, 11, 6, 14, 7, 15, 6, 14, 7, \n\t15, 1, 9, 1, 9, 1, 9, 1, 9, 5, 13, 5, 13, 5, 13, 5, \n\t13, 3, 11, 3, 11, 3, 11, 3, 11, 7, 15, 7, 15, 7, 15,\n\t7, 15, 4, 12, 5, 13, 4, 12, 5, 13, 4, 12, 5, 13, 4,\n\t12, 5, 13, 6, 14, 7, 15, 6, 14, 7, 15, 6, 14, 7, 15, \n\t6, 14, 7, 15, 5, 13, 5, 13, 5, 13, 5, 13, 5, 13, 5,\n\t13, 5, 13, 5, 13, 7, 15, 7, 15, 7, 15, 7, 15, 7, 15, \n\t7, 15, 7, 15, 7, 15, 2, 10, 3, 11, 2, 10, 3, 11, 6, \n\t14, 7, 15, 6, 14, 7, 15, 2, 10, 3, 11, 2, 10, 3, 11, \n\t6, 14, 7, 15, 6, 14, 7, 15, 3, 11, 3, 11, 3, 11, 3, \n\t11, 7, 15, 7, 15, 7, 15, 7, 15, 3, 11, 3, 11, 3, 11, \n\t3, 11, 7, 15, 7, 15, 7, 15, 7, 15, 6, 14, 7, 15, 6, \n\t14, 7, 15, 6, 14, 7, 15, 6, 14, 7, 15, 6, 14, 7, 15, \n\t6, 14, 7, 15, 6, 14, 7, 15, 6, 14, 7, 15, 7, 15, 7, \n\t15, 7, 15, 7, 15, 7, 15, 7, 15, 7, 15, 7, 15, 7, 15, \n\t7, 15, 7, 15, 7, 15, 7, 15, 7, 15, 7, 15, 7, 15 };\n\n\nenum {\n\t/* modifiers */\n\tactiveFlagBit                 = 0,    /* activate? (activateEvt and mouseDown)*/\n\tbtnStateBit                   = 7,    /* state of button?*/\n\tcmdKeyBit                     = 8,    /* command key down?*/\n\tshiftKeyBit                   = 9,    /* shift key down?*/\n\talphaLockBit                  = 10,   /* alpha lock down?*/\n\toptionKeyBit                  = 11,   /* option key down?*/\n\tcontrolKeyBit                 = 12,   /* control key down?*/\n\trightShiftKeyBit              = 13,   /* right shift key down? Not supported on Mac OS X.*/\n\trightOptionKeyBit             = 14,   /* right Option key down? Not supported on Mac OS X.*/\n\trightControlKeyBit            = 15    /* right Control key down? Not supported on Mac OS X.*/\n};\n\nenum {\n\tactiveFlag                    = 1 << activeFlagBit,\n\tbtnState                      = 1 << btnStateBit,\n\tcmdKey                        = 1 << cmdKeyBit,\n\tshiftKey                      = 1 << shiftKeyBit,\n\talphaLock                     = 1 << alphaLockBit,\n\toptionKey                     = 1 << optionKeyBit,\n\tcontrolKey                    = 1 << controlKeyBit,\n\trightShiftKey                 = 1 << rightShiftKeyBit, /* Not supported on Mac OS X.*/\n\trightOptionKey                = 1 << rightOptionKeyBit, /* Not supported on Mac OS X.*/\n\trightControlKey               = 1 << rightControlKeyBit /* Not supported on Mac OS X.*/\n};\n\nstatic int buttonState=0;\n\n@implementation sqSqueakOSXApplication (events) \n\n- (void) pumpRunLoop {\n\t[super pumpRunLoop];\n\t\n\t NSEvent *event;\n\t while (event = [NSApp nextEventMatchingMask: NSAnyEventMask untilDate: nil inMode: NSEventTrackingRunLoopMode dequeue: YES])\n\t\t [NSApp sendEvent: event];\n\t\n\t\n\t/* \n\t http://www.cocoabuilder.com/archive/cocoa/228473-receiving-user-events-from-within-an-nstimer-callback.html\n\t The reason you have to do this and can't just run the runloop is\n\t because the event loop is actually a separate concept from the\n\t runloop. It's a bit confusing because the event loop is implemented\n\t using the runloop, but if you just run the runloop on the main thread,\n\t events won't get processed. You have to explicitly run this in order\n\t to get them to be processed.\n\t \n\t Note that using the default runloop mode with this is generally a bad\n\t idea. By running in the default mode you allow *everything* else to\n\t run, which means that some other code might decide that *it* wants an\n\t inner event loop as well. If you then want to quit before that other\n\t code has finished, tough cookies. Much better to control things more\n\t tightly by using a different runloop mode.\n\t \n\t */\n\t\n}\n\n- (void ) processAsOldEventOrComplexEvent: (id) event placeIn: (sqInputEvent *) evt {\n\tif ([[event objectAtIndex: 0] intValue] == 1) {\n\t\t[(NSData *)[event objectAtIndex: 1] getBytes: evt length: sizeof(sqInputEvent)];\n\t\tif (evt->type == EventTypeKeyboard) {\n//\t\t\tNSLog(@\"keyboard pc %i cc %i uc %i m %i\",((sqKeyboardEvent *)evt)->pressCode,((sqKeyboardEvent *) evt)->charCode,((sqKeyboardEvent *) evt)->utf32Code,((sqKeyboardEvent *) evt)->modifiers);\n\t\t}\n\t\treturn;\n\t}\n}\n\n- (void) pushEventToQueue: (sqInputEvent *) evt {\t\n\tNSMutableArray* data = [NSMutableArray new];\n\t[data addObject: [NSNumber numberWithInteger: 1]];\n\t[data addObject: [NSData  dataWithBytes:(const void *) evt length: sizeof(sqInputEvent)]];\n\t[eventQueue addItem: data];\n\t[data release];\t\n}\n\n- (void) recordCharEvent:(NSString *) unicodeString fromView: (sqSqueakOSXNSView *) mainView {\n\tsqKeyboardEvent evt;\n\tunichar unicode;\n\tunsigned char macRomanCharacter;\n\tNSInteger\ti;\n\tNSRange picker;\n\tNSUInteger totaLength;\n\t\n\tevt.type = EventTypeKeyboard;\n\tevt.timeStamp = (int) ioMSecs();\n\tpicker.location = 0;\n\tpicker.length = 1;\n\ttotaLength = [unicodeString length];\n\tfor (i=0;i < totaLength;i++) {\n\t\t\n\t\t\n\t\tunicode = [unicodeString characterAtIndex: i];\n\t\t\n\t\tif (mainView.lastSeenKeyBoardStrokeDetails) {\n\t\t\tevt.modifiers = [self translateCocoaModifiersToSqueakModifiers: mainView.lastSeenKeyBoardStrokeDetails.modifierFlags];\n\t\t\tevt.charCode = mainView.lastSeenKeyBoardStrokeDetails.keyCode;\n\t\t} else {\n\t\t\tevt.modifiers = 0;\n\t\t\tevt.charCode = 0;\n\t\t}\n\t\t\n\t\tif ((evt.modifiers & CommandKeyBit) && (evt.modifiers & ShiftKeyBit)) {  /* command and shift */\n            if ((unicode >= 97) && (unicode <= 122)) {\n\t\t\t\t/* convert ascii code of command-shift-letter to upper case */\n\t\t\t\tunicode = unicode - 32;\n            }\n\t\t}\n\t\t\n\t\tNSString *lookupString = [[NSString alloc] initWithCharacters: &unicode length: 1];\n\t\t[lookupString getBytes: &macRomanCharacter maxLength: 1 usedLength: NULL encoding: NSMacOSRomanStringEncoding\n\t\t\t\t\t   options: 0 range: picker remainingRange: NULL];\n\t\t[lookupString release];\n\t\t\n\t\tevt.pressCode = EventKeyDown;\n\t\tunsigned short keyCodeRemembered = evt.charCode;\n\t\tevt.utf32Code = 0;\n\t\tevt.reserved1 = 0;\n\t\tevt.windowIndex = (int)  mainView.windowLogic.windowIndex;\n\t\t[self pushEventToQueue: (sqInputEvent *)&evt];\n\t\t\n\t\tevt.charCode =\tmacRomanCharacter;\n\t\tevt.pressCode = EventKeyChar;\n\t\tevt.modifiers = evt.modifiers;\t\t\n\t\tevt.utf32Code = unicode;\n\t\t\n\t\t[self pushEventToQueue: (sqInputEvent *) &evt];\n\t\t\n\t\tif (i > 1 || !mainView.lastSeenKeyBoardStrokeDetails) {\n\t\t\tevt.pressCode = EventKeyUp;\n\t\t\tevt.charCode = keyCodeRemembered;\n\t\t\tevt.utf32Code = 0;\n\t\t\t[self pushEventToQueue: (sqInputEvent *) &evt];\n\t\t}\n\t}\n\t\n\tinterpreterProxy->signalSemaphoreWithIndex(gDelegateApp.squeakApplication.inputSemaphoreIndex);\n\n}\n\n- (void) recordKeyUpEvent:(NSEvent *)theEvent fromView: (sqSqueakOSXNSView*) aView {\n\tsqKeyboardEvent evt;\n\t\n\tevt.type = EventTypeKeyboard;\n\tevt.timeStamp = (int) ioMSecs();\n\tevt.charCode =\t[theEvent keyCode];\n\tevt.pressCode = EventKeyUp;\n\tevt.modifiers = [self translateCocoaModifiersToSqueakModifiers: [theEvent modifierFlags]];\n\tevt.utf32Code = 0;\n\tevt.reserved1 = 0;\n\tevt.windowIndex = (int) aView.windowLogic.windowIndex;\n\t[self pushEventToQueue: (sqInputEvent *) &evt];\n\n\tinterpreterProxy->signalSemaphoreWithIndex(gDelegateApp.squeakApplication.inputSemaphoreIndex);\n}\n\n- (void) recordMouseEvent:(NSEvent *)theEvent fromView: (sqSqueakOSXNSView *) aView{\n\tsqMouseEvent evt;\n\t\n\tevt.type = EventTypeMouse;\n\tevt.timeStamp = (int) ioMSecs();\n\t\n\tNSPoint local_point = [aView convertPoint: [theEvent locationInWindow] fromView:nil];\n\t\n\tevt.x = (int) lrintf(local_point.x); \n\tevt.y = (int) lrintf(local_point.y);\n\t\n\tint buttonAndModifiers = [self mapMouseAndModifierStateToSqueakBits: theEvent];\n\tevt.buttons = buttonAndModifiers & 0x07;\n\tevt.modifiers = buttonAndModifiers >> 3;\n#if COGVM | STACKVM\n\tevt.nrClicks = 0;\n#else\n\tevt.reserved1 = 0;\n#endif \n\tevt.windowIndex = (int) aView.windowLogic.windowIndex;\n\t\n\t[self pushEventToQueue:(sqInputEvent *) &evt];\n//NSLog(@\"mouse hit x %i y %i buttons %i mods %i\",evt.x,evt.y,evt.buttons,evt.modifiers);\n\tinterpreterProxy->signalSemaphoreWithIndex(gDelegateApp.squeakApplication.inputSemaphoreIndex);\n}\n\t\t\t\t\t\t   \n- (void) recordWheelEvent:(NSEvent *) theEvent fromView: (sqSqueakOSXNSView *) aView{\n\t\t\n\t[self recordMouseEvent: theEvent fromView: aView];\n\tCGFloat x = [theEvent deltaX];\n\tCGFloat y = [theEvent deltaY];\n\n\tif (x != 0.0f) {\n\t\t[self fakeMouseWheelKeyboardEventsKeyCode: (x < 0 ? 124 : 123) ascii: (x < 0 ? 29 : 28) windowIndex:  (int) aView.windowLogic.windowIndex];\n\t}\n\tif (y != 0.0f) {\n\t\t[self fakeMouseWheelKeyboardEventsKeyCode: (y < 0 ? 125 : 126) ascii: (y < 0 ? 31 : 30) windowIndex: (int) aView.windowLogic.windowIndex];\n\t}\n}\n\t\t  \n- (void) fakeMouseWheelKeyboardEventsKeyCode: (int) keyCode ascii: (int) ascii windowIndex: (int) windowIndex {\n\tsqKeyboardEvent evt;\n\n\tevt.type = EventTypeKeyboard;\n\tevt.timeStamp = (int) ioMSecs();\n\tevt.pressCode = EventKeyDown;\n\tevt.charCode = keyCode;\n\tevt.utf32Code = 0;\n\tevt.reserved1 = 0;\n\tevt.modifiers = modifierMap[(controlKey >> 8)];\n\tevt.windowIndex = windowIndex;\n\t[self pushEventToQueue:(sqInputEvent *) &evt];\n\n\tevt.pressCode = EventKeyChar;\n\tevt.charCode = ascii;\n\tevt.utf32Code = ascii;\n\t[self pushEventToQueue:(sqInputEvent *) &evt];\n\t\n\tevt.pressCode = EventKeyUp;\n\tevt.charCode =\tkeyCode;\n\tevt.utf32Code = 0;\n\t[self pushEventToQueue:(sqInputEvent *) &evt];\n\t\n}\n\n- (int) translateCocoaModifiersToSqueakModifiers: (NSUInteger) modifiers {\n\tNSUInteger keyBoardModifiers = [self translateCocoaModifiersToCarbonModifiers: modifiers];\n\treturn ((modifierMap[((keyBoardModifiers & 0xFFFF) >> 8)]));\n}\n\n- (NSUInteger) translateCocoaModifiersToCarbonModifiers: (NSUInteger) modifiers {\n\tNSUInteger keyBoardModifiers=0;\n\tif (modifiers & NSAlphaShiftKeyMask) \n\t\tkeyBoardModifiers |= alphaLock;\n\tif (modifiers & NSShiftKeyMask)\n\t\tkeyBoardModifiers |= shiftKey;\n\tif (modifiers & NSControlKeyMask)\n\t\tkeyBoardModifiers |= controlKey;\n\tif (modifiers & NSAlternateKeyMask)\n\t\tkeyBoardModifiers |= optionKey;\n\tif (modifiers & NSCommandKeyMask)\n\t\tkeyBoardModifiers |= cmdKey;\n\treturn keyBoardModifiers;\n\t\t\n}\n\t\t\n- (int) mapMouseAndModifierStateToSqueakBits: (NSEvent *) event {\n\t/* On a two- or three-button mouse, the left button is normally considered primary and the \n\t right button secondary, \n\t but left-handed users can reverse these settings as a matter of preference. \n\t The middle button on a three-button mouse is always the tertiary button. '\n\t \n\t But mapping assumes 1,2,3  red, yellow, blue\n\t */\n\t\n\tNSInteger stButtons,modifier,mappedButton;\n\tNSInteger mouseButton=0;\n\t\n\tstatic NSInteger buttonStateBits[4] = {0,0,0,0};\n\t\n\tstButtons = buttonState;\n\tNSUInteger keyBoardCarbonModifiers = [self translateCocoaModifiersToCarbonModifiers: [event modifierFlags]];\n\tNSInteger whatHappened = [event type];\n  \tif (whatHappened != NSMouseMoved  && whatHappened != NSScrollWheel) {\n\t\tstButtons = 0;\n\t\tmouseButton = 0;\n\t\tif (whatHappened == NSLeftMouseUp || whatHappened == NSLeftMouseDown)\n\t\t\tmouseButton = 1;\n\t\tif (whatHappened == NSRightMouseUp || whatHappened == NSRightMouseDown)\n\t\t\tmouseButton = 2;\n\t\tif (!mouseButton)\n\t\t\tmouseButton = [event buttonNumber] + 1; //buttonNumber seems to count from 0.\n\t\t\n\t\tif (mouseButton > 0 && mouseButton < 4) {\n\t\t\t\n\t\t\tmodifier = 0;\n\t\t\tif (keyBoardCarbonModifiers & cmdKey  )\n\t\t\t\tmodifier = 1;\n\t\t\tif (keyBoardCarbonModifiers & optionKey)\n\t\t\t\tmodifier = 2;\n\t\t\tif (keyBoardCarbonModifiers & controlKey)\n\t\t\t\tmodifier = 3;\n\t\t\t\n\t\t\tif (browserActiveAndDrawingContextOkAndNOTInFullScreenMode())\n\t\t\t\tmappedButton = [(sqSqueakOSXInfoPlistInterface *) self.infoPlistInterfaceLogic getSqueakBrowserMouseMappingsAt: modifier by: mouseButton];\n\t\t\telse\n\t\t\t\tmappedButton = [(sqSqueakOSXInfoPlistInterface *) self.infoPlistInterfaceLogic getSqueakMouseMappingsAt: modifier by: mouseButton];\n\t\t\tbuttonStateBits[mappedButton] = \n\t\t\t\t(whatHappened == NSLeftMouseUp || \n\t\t\t\t whatHappened == NSRightMouseUp || \n\t\t\t\t whatHappened == NSOtherMouseUp) ? 0 : 1;\n\t\t\tstButtons |= mappedButton == 1 ? (buttonStateBits[mappedButton] ? RedButtonBit : 0) : 0;\n\t\t\tstButtons |= mappedButton == 2 ? (buttonStateBits[mappedButton] ? YellowButtonBit : 0) : 0;\n\t\t\tstButtons |= mappedButton == 3 ? (buttonStateBits[mappedButton] ? BlueButtonBit : 0)  : 0;\n\t\t}\n\t}\n\t\n\t// button state: low three bits are mouse buttons; next 8 bits are modifier bits\n\tbuttonState = (int) (modifierMap[((keyBoardCarbonModifiers & 0xFFFF) >> 8)] << 3) | (int) (stButtons & 0x7);\n\treturn buttonState;\n}\n\n- (void) recordDragEvent: (int) dragType numberOfFiles: (int) numFiles where: (NSPoint) local_point windowIndex: (sqInt) windowIndex {\n\tsqDragDropFilesEvent evt;\n\t\n\tevt.type= EventTypeDragDropFiles;\n\tevt.timeStamp= (int) ioMSecs();\n\tevt.dragType= dragType;\n\tevt.x = (int) lrintf(local_point.x); \n\tevt.y = (int) lrintf(local_point.y);\n\tevt.modifiers= (buttonState >> 3);\n\tevt.numFiles= numFiles;\n\tevt.windowIndex = (int) windowIndex;\n\t[self pushEventToQueue: (sqInputEvent *) &evt];\n\t\n\tinterpreterProxy->signalSemaphoreWithIndex(gDelegateApp.squeakApplication.inputSemaphoreIndex);\n}\n\n- (void) recordWindowEvent: (int) windowType window: (NSWIndow *) window {\n\tsqWindowEvent evt;\n\t\n\tevt.type= EventTypeWindow;\n\tevt.timeStamp= (int) ioMSecs();\n\tevt.action= windowType;\n\tevt.value1 =  0;\n\tevt.value2 =  0;\n\tevt.value3 =  0;\n\tevt.value4 =  0;\n\tevt.windowIndex = windowIndexFromHandle((wHandleType)window);\n\t[self pushEventToQueue: (sqInputEvent *) &evt];\n\t\n\tinterpreterProxy->signalSemaphoreWithIndex(gDelegateApp.squeakApplication.inputSemaphoreIndex);\n}\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/sqSqueakOSXApplication+imageReadWrite.h",
    "content": "//\n//  sqSqueakOSXApplication+imageReadWrite.h\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-13.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n\n#import \"sqSqueakOSXApplication.h\" \n@interface sqSqueakOSXApplication (imageReadWrite) \n- (void) attempToOpenImageFromOpenPanel;\n- (BOOL) setImageNamePathIfItWasReadable: (NSString *) filePath;\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/sqSqueakOSXApplication+imageReadWrite.m",
    "content": "//\n//  sqSqueakOSXApplication+imageReadWrite.m\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-13.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import \"sqSqueakOSXApplication+imageReadWrite.h\"\n#import \"sqSqueakMainApplication+vmAndImagePath.h\"\n#import \"sqSqueakOSXInfoPlistInterface.h\"\n#import \"SqueakOSXAppDelegate.h\"\n\nextern SqueakOSXAppDelegate *gDelegateApp;\n\n@implementation sqSqueakOSXApplication (imageReadWrite) \n- (void) attempToOpenImageFromOpenPanel {\n\tNSOpenPanel *panel= [NSOpenPanel openPanel];\n\tNSString *promptTitle = NSLocalizedString(@\"SqueakSelectImagePanePrompt\",nil);\n\tNSArray *types = [[NSArray alloc] initWithObjects: @\"image\", nil ];\n\t[panel setTitle: promptTitle];\n\t[panel setFloatingPanel: YES];\n\t[panel setOneShot: YES];\n\t[panel setReleasedWhenClosed: YES];\n\t[panel setAllowedFileTypes: types];\n\t \n\t[panel center];\n\t\n\tif (NSOKButton == [panel runModalForTypes: types]) {\n\t\tNSArray *urls= [panel URLs];\n\t\tif (1 == [urls count])\n\t\t\t[self setImageNamePathIfItWasReadable: [[urls objectAtIndex: 0] path]];\n    } else {\n\t\texit(142);\n\t}\n\t [types release];\n}\n\n- (BOOL) setImageNamePathIfItWasReadable: (NSString *) filePath {\n\tBOOL fileIsReadable = [[NSFileManager defaultManager] isReadableFileAtPath: filePath];\n\tif (fileIsReadable) {\n\t\t[(sqSqueakOSXInfoPlistInterface*)[self infoPlistInterfaceLogic] setOverrideSqueakImageName: filePath];\n\t\t[self imageNamePut: [filePath UTF8String]];\n\t}\n\treturn fileIsReadable;\n}\n\n\n- (void) findImageViaBundleOrPreferences {\n\tNSAutoreleasePool * pool = [NSAutoreleasePool new];\n\t\n\t/* Check for squeak image name in resource directory if not found \n\t then check for image after resolving image name incase it's a ./ or ../ or ~/ etc \n\t plus also could be in working directory? \n\t \n\t So first let's see if the imageName is a partial path, if so use it. \n\t otherwise check the resource directory then the vmpath.\n\t \n\t */\n\t\n\tNSBundle *mainBundle = [NSBundle mainBundle];\n\tNSString *resourcePath = [mainBundle resourcePath];\n\tBOOL fileIsReadable;\n//\textern char\timageName[];\n\t\n#warning do we check for imageName that is elsewhere? like ~/Foo/squeak.image\n\t\n\tNSString *possibleImage;\n\tNSString *imageNameString;\n\t\n\tif (gDelegateApp.possibleImageNameAtLaunchTime) {\n\t\timageNameString = possibleImage = gDelegateApp.possibleImageNameAtLaunchTime;\n\t} else {\n\t\t    imageNameString = [NSString stringWithUTF8String: imageName];\n\t\t\tpossibleImage = [imageNameString stringByStandardizingPath];\n\t}\n\n\tif ([imageNameString compare: possibleImage] == NSOrderedSame) {\n\t\tif ([possibleImage isAbsolutePath]) {\n\t\t\tfileIsReadable = [self setImageNamePathIfItWasReadable: possibleImage];\t\t\t\n\t\t} else {\n\t\t\tNSString *fullResourcePathToImage = [resourcePath stringByAppendingPathComponent: imageNameString];\n\t\t\tfileIsReadable = [self setImageNamePathIfItWasReadable: fullResourcePathToImage];\n\t\t\tif (!fileIsReadable){\n\t\t\t\tNSString *vmPath = [self.vmPathStringURL path];\n\t\t\t\tNSString *fullVMPathToImage = [vmPath stringByAppendingPathComponent: imageNameString];\n\t\t\t\tfileIsReadable = [self setImageNamePathIfItWasReadable: fullVMPathToImage];\n\t\t\t}\t\t\n\t\t}\n\t} else {\n\t\tfileIsReadable = [self setImageNamePathIfItWasReadable: possibleImage];\n\t}\n\t\n\t// At this point we did not find a file name in the resources or in the vm directory or via a set image name\n\tif (!fileIsReadable) {\n\t\t[self performSelectorOnMainThread: @selector(attempToOpenImageFromOpenPanel) withObject: nil waitUntilDone: YES];\n\t}\n\t\n\t[pool drain];\n\treturn;\n}\n\n- (void) imageNamePut:(const char *) sqImageName {\n\tif (!sqImageName) \n\t\treturn;\n\t[super imageNamePut: sqImageName];\n\t[gDelegateApp.window setRepresentedURL: self.imageNameURL];\n\t[gDelegateApp.window setTitle: [[self.imageNameURL path] lastPathComponent]];\n}\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/sqSqueakOSXApplication.h",
    "content": "//\n//  sqSqueakOSXApplication.h\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-10.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import <Cocoa/Cocoa.h>\n\n#import \"sqSqueakMainApplication.h\"\n\n@interface sqSqueakOSXApplication : sqSqueakMainApplication {\n\tNSCursor         *squeakCursor;\n\tBOOL\t\t\tsqueakHasCursor;\n}\n@property (nonatomic,retain) NSCursor\t*squeakCursor;\n@property (nonatomic,assign) BOOL\t\tsqueakHasCursor;\n\n- (NSInteger) parseArgument: (NSString *) argData peek: (NSString *) peek;\n- (void) parseArgs: (NSArray *) args;\n- (void) parseEnv: (NSDictionary *) env;\n- (long long) strtobkm: (const char *) chr;\n- (void) usage;\n- (void) printUsage;\n- (void) printUsageNotes;\n- (BOOL)isImageFile:(NSString *)filePath;\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/sqSqueakOSXApplication.m",
    "content": "//\n//  sqSqueakOSXApplication.m\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-10.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n\n#import \"sqSqueakOSXApplication.h\"\n#import \"sqSqueakOSXFileDirectoryInterface.h\"\n#import \"sqSqueakOSXInfoPlistInterface.h\"\n#import \"sqSqueakOSXSoundCoreAudio.h\"\n#import \"sqSqueakSoundCoreAudioAPI.h\"\n\nusqInt\tgMaxHeapSize=512*1024*1024;\n\n#if defined(__GNUC__) && ( defined(i386) || defined(__i386) || defined(__i386__)  \\\n|| defined(i486) || defined(__i486) || defined (__i486__) \\\n|| defined(intel) || defined(x86) || defined(i86pc) \\\n|| defined(__x86_64__))\nvoid fldcw(unsigned int cw)\n{\n\t__asm__(\"fldcw %0\" :: \"m\"(cw));\n}\n#else\n# define fldcw(cw)\n#endif\n\n#if defined(__GNUC__) && ( defined(ppc) || defined(__ppc) || defined(__ppc__)  \\\n|| defined(POWERPC) || defined(__POWERPC) || defined (__POWERPC__) )\nvoid mtfsfi(unsigned long long fpscr)\n{\n\t__asm__(\"lfd   f0, %0\" :: \"m\"(fpscr));\n\t__asm__(\"mtfsf 0xff, f0\");\n}\n#else\nvoid mtfsfi(unsigned long long fpscr) {}\n\n# define mtfsfi(fpscr)\n#endif\n\n\n@implementation sqSqueakOSXApplication \n@synthesize squeakHasCursor,squeakCursor;\n\n- (void) setupFloat {\n\tfldcw(0x12bf);\t/* signed infinity, round to nearest, REAL8, disable intrs, disable signals */\n\tmtfsfi((unsigned long long ) 0);\t\t/* disable signals, IEEE mode, round to nearest */\n}\n\n- (sqSqueakFileDirectoryInterface *) newFileDirectoryInterfaceInstance {\n\treturn [sqSqueakOSXFileDirectoryInterface new];\n}\n\n- (sqSqueakInfoPlistInterface *) newSqSqueakInfoPlistInterfaceCreation {\n\treturn [sqSqueakOSXInfoPlistInterface new];\n}\n\n- (void) doHeadlessSetup {\n\t[super doHeadlessSetup];\n\textern BOOL gSqueakHeadless;\n\tif (gSqueakHeadless) \n\t\treturn;\n#warning untested\n\tProcessSerialNumber psn = { 0, kCurrentProcess };\n\tProcessInfoRec info;\n\tbzero(&info, sizeof(ProcessInfoRec));\n\tinfo.processInfoLength = sizeof(ProcessInfoRec);\n\tGetProcessInformation(&psn,&info);\n\tif ((info.processMode & modeOnlyBackground) && TransformProcessType != NULL) {\n\t\tOSStatus returnCode = TransformProcessType(& psn, kProcessTransformToForegroundApplication);\n#pragma unused(returnCode)\n\t\tSetFrontProcess(&psn);\t\t\n\t}\n}\n\n- (void) doMemorySetup {\n\tgMaxHeapSize =  ((sqSqueakOSXInfoPlistInterface*) self.infoPlistInterfaceLogic).SqueakMaxHeapSize;\n}\n\n- (void) setupSoundLogic {\n\tself.soundInterfaceLogic = [sqSqueakOSXSoundCoreAudio new];\n \t[(sqSqueakOSXSoundCoreAudio *) self.soundInterfaceLogic soundInitOverride];\n\n\tsnd_Start(2644, 22050, 1, 0);\n\tchar slience[10576];\n\tbzero(&slience, sizeof(slience));\n\tsnd_PlaySamplesFromAtLength(2644,(usqInt * ) &slience,0);\n\t[self.soundInterfaceLogic snd_Stop_Force];\n}\n\n- (void) parseUnixArgs {\n\tNSProcessInfo *p = [NSProcessInfo processInfo];\n\t[self parseArgs: [p arguments]];\n\t[self parseEnv: [p environment]];\n}\n\n- (NSInteger) parseArgument: (NSString *) argData peek: (NSString *) peek {\n\t\n\tif ([argData compare: @\"--\"] == NSOrderedSame) {\n\t\treturn 1;\n\t}\n\n\tNS_DURING;\n\t\tif ([argData compare:  @\"-psn_\" options: NSLiteralSearch range: NSMakeRange(0,5)] == NSOrderedSame) {\n\t\t\treturn 1;\n\t\t}\n\tNS_HANDLER;\n\tNS_ENDHANDLER;\n\t\n\tif ([argData compare: @\"-help\"] == NSOrderedSame) {\n\t\t[self usage];\n\t\treturn 1;\n\t}\n\tif ([argData compare: @\"-headless\"] == NSOrderedSame) {\n\t\textern BOOL gSqueakHeadless;\n\t\tgSqueakHeadless = YES;\n\t\treturn 1;\n\t}\n\tif ([argData compare: @\"-memory\"] == NSOrderedSame) {\n\t\tgMaxHeapSize = (usqInt) [self strtobkm: [peek UTF8String]];\n\t\treturn 2;\n\t}\n\treturn 0;\n}\n\n- (void) parseArgs: (NSArray *) args{\n\t\t  \n\targsArguments = [[NSMutableArray alloc] initWithCapacity: [args count]];\n\t\n\tif ([args count] < 2) \n\t\treturn;\n\tNSMutableArray *revisedArgs = [args mutableCopyWithZone: NULL];\n\t[revisedArgs removeObjectAtIndex:0];\n\t\n\tNSUInteger i,result;\n\tBOOL optionsCompleted = NO;\n\tfor (i=0; i<[revisedArgs count]; i++) {\n\t\tNSString *argData = [revisedArgs objectAtIndex:i];\n\t\tNSString *peek = (i == ([revisedArgs count] - 1)) ? @\"\" : [revisedArgs objectAtIndex:i+1];\n\t\tif ([argData compare: @\"--\"] == NSOrderedSame) {\n\t\t\toptionsCompleted = YES;\n\t\t\tcontinue;\n\t\t}\n\t\tif (!optionsCompleted && [[argData substringToIndex: 1] compare: @\"-\"] != NSOrderedSame) {\n\t\t\toptionsCompleted = YES;\n\t\t\tcontinue;\n\t\t}\n\t\tif (optionsCompleted) {\n\t\t\t[self.argsArguments addObject: argData];\n\t\t} else {\n\t\t\tresult = [self parseArgument: argData peek: peek];\n\t\t\tif (result == 0)\t\t\t/* option not recognised */ {\n\t\t\t\tfprintf(stderr, \"unknown option: %s\\n\", [argData UTF8String]);\n\t\t\t\t[self usage];\n\t\t\t}\n\t\t\tif (result == 2)\n\t\t\t\ti++;\n\t\t}\n\t\t\n\t}\n\t[revisedArgs release];\n}\n\n- (long long) strtobkm: (const char *) str {\n\tchar *suffix;\n\tlong long value= strtoll(str, &suffix, 10);\n\tswitch (*suffix)\n    {\n\t\tcase 'k': case 'K':\n\t\t\tvalue*= 1024LL;\n\t\t\tbreak;\n\t\tcase 'm': case 'M':\n\t\t\tvalue*= 1024LL*1024LL;\n\t\t\tbreak;\n    }\n\treturn value;\n}\n\n- (void) parseEnv: (NSDictionary *) env {\n#warning untested!\n\tNSString *imageNameString = [env objectForKey: @\"SQUEAK_IMAGE\"];\n\tif (imageNameString) {\n\t\t[(sqSqueakOSXInfoPlistInterface*) self.infoPlistInterfaceLogic setOverrideSqueakImageName: imageNameString];\n\t}\n\tNSString *memoryString = [env objectForKey: @\"SQUEAK_MEMORY\"];\n\tif (memoryString) {\n\t\tgMaxHeapSize = (usqInt) [self strtobkm: [memoryString UTF8String]];\n\t}\n}\n   \n- (void) usage {\n\tprintf(\"Usage: [<option>...] [<imageName> [<argument>...]]\\n\");\n\tprintf(\"       [<option>...] -- [<argument>...]\\n\");\n\t[self printUsage];\n\tprintf(\"\\nNotes:\\n\");\n\tprintf(\"  <imageName> defaults to `Squeak.image'.\\n\");\n\t[self printUsageNotes];\n\texit(1);\n}\n\n- (void) printUsage {\n\tprintf(\"\\nCommon <option>s:\\n\");\n\tprintf(\"  -help                 print this help message, then exit\\n\");\n\tprintf(\"  -memory <size>[mk]    use fixed heap size (added to image size)\\n\");\n\tprintf(\"  -headless             run in headless (no window) mode (default: false)\\n\");\n}\n\n- (void) printUsageNotes\n{\n\tprintf(\"  If `-memory' is not specified then the heap will grow dynamically.\\n\");\n\tprintf(\"  <argument>s are ignored, but are processed by the Squeak image.\\n\");\n\tprintf(\"  The first <argument> normally names a Squeak `script' to execute.\\n\");\n\tprintf(\"  Precede <arguments> by `--' to use default image.\\n\");\n}\n\n- (BOOL) isImageFile: (NSString *) filePath\n{\n \tNSFileManager *dfm = [NSFileManager defaultManager];\n\tBOOL isDirectory;\n\t\n\t[dfm fileExistsAtPath: filePath isDirectory: &isDirectory];\n\n\tif (isDirectory) \n\t\treturn NO;\n\n\tBOOL fileIsReadable = [[NSFileManager defaultManager] isReadableFileAtPath: filePath];\n\t\n\tif (fileIsReadable == NO)\n\t\treturn NO;\n\n\tif ([[[filePath lastPathComponent] pathExtension] compare: @\"image\" options: NSCaseInsensitiveSearch] ==   NSOrderedSame)\n\t\treturn YES;\n\t\n\treturn NO;\n}\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/sqSqueakOSXClipboardAPI.h",
    "content": "//\n//  sqSqueakOSXClipboardAPI.h\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-23.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import \"sq.h\""
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/sqSqueakOSXClipboardAPI.m",
    "content": "//\n//  sqSqueakOSXClipboardAPI.m\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-23.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n//\n\n#import \"sqSqueakOSXClipboardAPI.h\"\n#import \"SqueakOSXAppDelegate.h\"\n#import \"sqSqueakOSXApplication+clipboard.h\"\n\nextern SqueakOSXAppDelegate *gDelegateApp;\n\n/* Clipboard (cut/copy/paste). */\nsqInt clipboardSize(void) {\n\tNSAutoreleasePool * pool = [NSAutoreleasePool new];\n\tsqInt value = [(sqSqueakOSXApplication *)gDelegateApp.squeakApplication clipboardSize];\n\t[pool drain];\n\treturn value;\n}\n\nsqInt clipboardReadIntoAt(sqInt count, sqInt byteArrayIndex, sqInt startIndex){\n\tNSAutoreleasePool * pool = [NSAutoreleasePool new];\n\t[(sqSqueakOSXApplication *)gDelegateApp.squeakApplication clipboardRead: count into: (char *) pointerForIndex_xxx_dmu((usqInt)byteArrayIndex)  startingAt: startIndex];\n\t[pool drain];\n\treturn 0;\n}\n\nsqInt clipboardWriteFromAt(sqInt count, sqInt byteArrayIndex, sqInt startIndex){\n\tNSAutoreleasePool * pool = [NSAutoreleasePool new];\n\t[(sqSqueakOSXApplication *)gDelegateApp.squeakApplication clipboardWrite: count from: (char *)pointerForIndex_xxx_dmu((usqInt)byteArrayIndex)  startingAt: startIndex];\n\t[pool drain];\n\treturn 0;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/sqSqueakOSXDropAPI.h",
    "content": "//\n//  sqSqueakOSXDropAPI.h\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-27.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#include \"DropPlugin.h\""
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/sqSqueakOSXDropAPI.m",
    "content": "//\n//  sqSqueakOSXDropAPI.m\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-27.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n#import \"sqSqueakOSXScreenAndWindow.h\"\n#include \"sqMacHostWindow.h\"\n#include \"sq.h\"\n\nextern wHandleType windowHandleFromIndex(sqInt windowIndex);\nextern struct VirtualMachine* interpreterProxy;\n\nsqInt dropInit(void) {\n\treturn 1;\n};\n\nsqInt dropShutdown(void) { \n\treturn 1;\n};\n\nchar* dropRequestFileName(sqInt dropIndex) {\n\t/* return name of file or NULL if error */\n\tsqSqueakOSXNSView* view = ((sqSqueakOSXScreenAndWindow*)((NSWindow *)windowHandleFromIndex(1)).delegate).mainViewOnWindow;\n\tNSString *fileNameString = [view dragFileNameStringAtIndex: dropIndex];\n\treturn (char *) [fileNameString UTF8String];\n}\n\n/* note: dropRequestFileHandle needs to bypass plugin security checks when implemented */\nsqInt dropRequestFileHandle(sqInt dropIndex) {\n\n\t/* return READ-ONLY file handle OOP or nilObject if error */\n\n\tchar *fileName = dropRequestFileName(dropIndex);\n\tif (!fileName)\n\t\treturn 0;\n\n\tvoid *fn = interpreterProxy->ioLoadFunctionFrom(\"fileOpenNamesizewritesecure\", \"FilePlugin\");\n\tif (fn == NULL) {\n\t\t/* begin primitiveFail */\n        interpreterProxy->success(false);\n\t\treturn 0;\n\t}\n\tsqInt result = ((sqInt (*) (char * nameIndex, sqInt nameSize, sqInt writeFlag, sqInt secureFlag)) fn)(fileName,(sqInt) strlen(fileName), 0,0);\n\treturn result;\n}\n\nsqInt sqSecFileAccessCallback(void *ptr) { \n\treturn 0; \n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/sqSqueakOSXFileDirectoryInterface.h",
    "content": "//\n//  sqSqueakOSXFileDirectoryInterface.h\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-11.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import <Cocoa/Cocoa.h>\n#import \"sqSqueakFileDirectoryInterface.h\"\n\n@interface sqSqueakOSXFileDirectoryInterface : sqSqueakFileDirectoryInterface {\n\n}\n- (NSString *)resolveAliasAtPath:(NSString *)aliasFullPath;\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/sqSqueakOSXFileDirectoryInterface.m",
    "content": "//\n//  sqSqueakOSXFileDirectoryInterface.m\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-11.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n/* The resolve Alias logic is via \n http://blacktree-alchemy.googlecode.com/svn/branches/B5X/README.markdown\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this software except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n */\n\n\n//\n\n#import \"sqSqueakOSXFileDirectoryInterface.h\"\n#import \"SqueakOSXAppDelegate.h\"\n\nextern SqueakOSXAppDelegate *gDelegateApp;\n\n\n@implementation sqSqueakOSXFileDirectoryInterface\n- (BOOL) setWorkingDirectory {\n\tif (1) \n\t\treturn 1;\n\t//for people wanting to do  ./Squeak.app foobar.image  zingger.st\n\t\n\t\n\tNSString *path = [gDelegateApp.squeakApplication.vmPathStringURL path];\n\tBOOL results = [[NSFileManager defaultManager] changeCurrentDirectoryPath: path];\n\treturn results;\n}\n\n- (NSString *)resolvedAliasFiles:(NSString *)filePath {\n\tNSArray *compoents = [[filePath stringByStandardizingPath] pathComponents];\n\tNSString *thisComponent;\n\tNSString *path = [[NSString new] autorelease];\n\tfor (thisComponent in compoents) {\n\t\tpath = [path stringByAppendingPathComponent:thisComponent];\n\t\tif (![[NSFileManager defaultManager] fileExistsAtPath:path])\n\t\t\tcontinue;\n\t\tLSItemInfoRecord infoRec;\n\t\tLSCopyItemInfoForURL((CFURLRef) [NSURL fileURLWithPath:path], kLSRequestBasicFlagsOnly, &infoRec);\n\t\tif (infoRec.flags & kLSItemInfoIsAliasFile)\n\t\t\tpath = [[self resolveAliasAtPath:path] stringByResolvingSymlinksInPath];\n\t}\n\treturn path;\n}\n\n- (NSString *)resolveAliasAtPath:(NSString *)aliasFullPath {\n\tNSString *outString = nil;\n\tNSURL *url;\n\tFSRef aliasRef;\n\tBoolean targetIsFolder;\n\tBoolean wasAliased;\n\t\n\tif (!CFURLGetFSRef((CFURLRef) [NSURL fileURLWithPath:aliasFullPath], &aliasRef) || \n\t\tFSResolveAliasFileWithMountFlags(&aliasRef, true, &targetIsFolder, &wasAliased, kResolveAliasFileNoUI) != noErr)\n\t\treturn nil;\n\t\n\tif (url = (NSURL *)CFURLCreateFromFSRef(kCFAllocatorDefault, &aliasRef)) {\n\t\toutString = [url path];\n\t\tCFRelease(url);\n\t\treturn outString;\n\t}\n\t\n\treturn nil;\n}\n\n@end\n\n\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/sqSqueakOSXInfoPlistInterface.h",
    "content": "//\n//  sqSqueakOSXInfoPlistInterface.h\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-12.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import \"sqSqueakInfoPlistInterface.h\"\n#import \"sq.h\"\n\n@interface sqSqueakOSXInfoPlistInterface : sqSqueakInfoPlistInterface {\n\tNSInteger\tSqueakDebug;\n\tBOOL\t\tSqueakQuitOnQuitAppleEvent;\n\tBOOL\t\tSqueakPluginsBuiltInOrLocalOnly;\n\tBOOL\t\tSqueakExplicitWindowOpenNeeded;\n\tusqInt\t\tSqueakMaxHeapSize;\n\tNSURL\t\t*SqueakUnTrustedDirectory;\n\tNSURL\t\t*SqueakTrustedDirectory;\n\tNSURL\t\t*SqueakResourceDirectory;\n\tNSTimeInterval\tSqueakUIFlushPrimaryDeferNMilliseconds;\n\tfloat\t\tSqueakUIFadeForFullScreenInSeconds;\n\tNSInteger\tSqueakMouseMappings[4][4];\n\tNSInteger\tSqueakBrowserMouseMappings[4][4];\n\tNSInteger\t\tSqueakNumStackPages;\n\tNSInteger\t\tSqueakEdenBytes;\n}\n@property (nonatomic,assign) NSInteger\tSqueakDebug;\n@property (nonatomic,assign) NSInteger\tSqueakNumStackPages;\n@property (nonatomic,assign) NSInteger\tSqueakEdenBytes;\n@property (nonatomic,assign) BOOL\tSqueakQuitOnQuitAppleEvent;\n@property (nonatomic,assign) BOOL\tSqueakPluginsBuiltInOrLocalOnly;\n@property (nonatomic,assign) BOOL\tSqueakExplicitWindowOpenNeeded;\n@property (nonatomic,assign) usqInt\tSqueakMaxHeapSize;\n@property (nonatomic,retain) NSURL*\t\tSqueakUnTrustedDirectory;\n@property (nonatomic,retain) NSURL*\t\tSqueakTrustedDirectory;\n@property (nonatomic,retain) NSURL*\t\tSqueakResourceDirectory;\n@property (nonatomic,assign) NSTimeInterval\tSqueakUIFlushPrimaryDeferNMilliseconds;\n@property (nonatomic,assign) float\t\tSqueakUIFadeForFullScreenInSeconds;\n\n- (void) setInfoPlistNumberValueFrom: (NSDictionary*) dict key: (NSString *) key  default: (NSInteger) number using: (SEL) selector;\n- (void) setInfoPlistFloatNumberValueFrom: (NSDictionary*) dict key: (NSString *) key  default: (float) number using: (SEL) selector;\n- (void) setInfoPlistBooleanValueFrom: (NSDictionary*) dict key: (NSString *) key  default: (BOOL) defaultBool using: (SEL) selector;\n- (void) setInfoPlistNumberValueForMouseX: (NSInteger) x Y: (NSInteger) y from: (NSDictionary*) dict key: (NSString *) key  default: (NSInteger) number browser: (BOOL) browser;\n- (NSURL *) expandNSStringIntoNSURL: (NSString*) originalPath doOptionalSqueakLandLogic: (BOOL) isetoysonastick;\n- (NSString *) fixupNonAbsolutePath: (NSString *) partialPathString;\n- (void) setOverrideSqueakImageName: (NSString *) v;\n- (NSInteger) getSqueakMouseMappingsAt: (NSInteger) i by: (NSInteger) j;\n- (NSInteger) getSqueakBrowserMouseMappingsAt: (NSInteger) i by: (NSInteger) j;\n  \n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/sqSqueakOSXInfoPlistInterface.m",
    "content": "//\n//  sqSqueakOSXInfoPlistInterface.m\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-12.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import \"sqSqueakOSXInfoPlistInterface.h\"\n\nextern int gSqueakUseFileMappedMMAP;\n\n@implementation sqSqueakOSXInfoPlistInterface\n@synthesize SqueakDebug,SqueakQuitOnQuitAppleEvent,\n\tSqueakMaxHeapSize,SqueakUnTrustedDirectory,SqueakTrustedDirectory,SqueakResourceDirectory,\n\tSqueakPluginsBuiltInOrLocalOnly,SqueakExplicitWindowOpenNeeded,SqueakUIFlushPrimaryDeferNMilliseconds,SqueakNumStackPages,SqueakEdenBytes,\n\tSqueakUIFadeForFullScreenInSeconds;\n\n- (void) setOverrideSqueakNumStackPages: (NSNumber *) v {\n\tself.SqueakNumStackPages = [v integerValue];\n}\n\n- (void) setOverrideSqueakEdenBytes: (NSNumber *) v {\n\tself.SqueakEdenBytes = [v integerValue];\n}\n\n- (void) setOverrideSqueakDebug: (NSNumber *) v {\n\tself.SqueakDebug = [v integerValue];\n}\n\n- (void) setOverrideSqueakQuitOnQuitAppleEvent: (NSNumber *) v {\n\tself.SqueakQuitOnQuitAppleEvent = [v boolValue];\n}\n\n- (void) setOverrideSqueakUseFileMappedMMAP: (NSNumber *) v {\n\tself.SqueakUseFileMappedMMAP = [v boolValue];\n\tgSqueakUseFileMappedMMAP = [v boolValue] == YES;\n}\n\n- (void) setOverrideSqueakPluginsBuiltInOrLocalOnly: (NSNumber *) v {\n\tself.SqueakPluginsBuiltInOrLocalOnly = [v boolValue];\n}\n\n- (void) setOverrideSqueakExplicitWindowOpenNeeded: (NSNumber *) v {\n\tself.SqueakExplicitWindowOpenNeeded = [v boolValue];\n}\n\n- (void) setOverrideSqueakMaxHeapSize: (NSNumber *) v {\n\tself.SqueakMaxHeapSize = [v unsignedIntValue];\n}\n\n- (void) setOverrideSqueakUIFadeForFullScreenInSeconds: (NSNumber *) v {\n\tself.SqueakUIFadeForFullScreenInSeconds = [v floatValue];\n}\n\n- (void) setOverrideSqueakUIFlushPrimaryDeferNMilliseconds: (NSNumber *) v {\n\tself.SqueakUIFlushPrimaryDeferNMilliseconds = [v doubleValue]/1000.0;\n}\n\n- (void) setOverrideSqueakUnTrustedDirectory: (NSString *) v {\n\tself.SqueakUnTrustedDirectory = [self expandNSStringIntoNSURL: v doOptionalSqueakLandLogic: YES];\n\tconst char *dataInFileSystemRep = [[NSFileManager defaultManager] fileSystemRepresentationWithPath: [self.SqueakUnTrustedDirectory path]];\n\textern char gSqueakUntrustedDirectoryName[];\n\tstrlcpy(gSqueakUntrustedDirectoryName, dataInFileSystemRep, PATH_MAX);\n\tstrlcat(gSqueakUntrustedDirectoryName,\"/\",PATH_MAX);\n}\n\n- (void) setOverrideSqueakTrustedDirectory: (NSString *) v {\n\tself.SqueakTrustedDirectory = [self expandNSStringIntoNSURL: v doOptionalSqueakLandLogic: YES];\n\tconst char *dataInFileSystemRep = [[NSFileManager defaultManager] fileSystemRepresentationWithPath: [self.SqueakTrustedDirectory path]];\n\textern char gSqueakTrustedDirectoryName[];\n\tstrlcpy(gSqueakTrustedDirectoryName, dataInFileSystemRep, PATH_MAX);\n\tstrlcat(gSqueakTrustedDirectoryName,\"/\",PATH_MAX);\n}\n\n- (void) setOverrideSqueakResourceDirectory: (NSString *) v {\n\tif (!v) \n\t\treturn;\n\tself.SqueakResourceDirectory = [self expandNSStringIntoNSURL: v doOptionalSqueakLandLogic: YES];\n}\n\n- (void) setOverrideSqueakImageName: (NSString *) v {\n\tif (!v) \n\t\treturn;\n\textern char imageName[];\n\tstrlcpy(imageName,[v UTF8String],PATH_MAX); \n}\n\n- (NSInteger) getSqueakMouseMappingsAt: (NSInteger) i by: (NSInteger) j {\n\treturn SqueakMouseMappings[i][j];\n}\n   \n- (NSInteger) getSqueakBrowserMouseMappingsAt: (NSInteger) i by: (NSInteger) j {\n\treturn SqueakBrowserMouseMappings[i][j];\n}\n\n- (void) setInfoPlistNSStringValueFrom: (NSDictionary*) dict key: (NSString *) key  default: (NSString*) defaultString using: (SEL) selector{\n\tNSString *str = [dict objectForKey: key];\n\tstr = (str) ? str : defaultString;\n\t[self performSelectorOnMainThread: selector withObject: str waitUntilDone: YES];\n}\n\n- (void) setInfoPlistNumberValueFrom: (NSDictionary*) dict key: (NSString *) key  default: (NSInteger) defaultInteger using: (SEL) selector{\n\tNSNumber *num = [dict objectForKey: key];\n\tnum = (num) ? num : [NSNumber numberWithInteger: defaultInteger];\n\t[self performSelectorOnMainThread: selector withObject: num waitUntilDone: YES];\n}\n\n- (void) setInfoPlistFloatNumberValueFrom: (NSDictionary*) dict key: (NSString *) key  default: (float) defaultFloat using: (SEL) selector{\n\tNSNumber *num = [dict objectForKey: key];\n\tnum = (num) ? num : [NSNumber numberWithFloat: defaultFloat];\n\t[self performSelectorOnMainThread: selector withObject: num waitUntilDone: YES];\n}\n\n- (void) setInfoPlistBooleanValueFrom: (NSDictionary*) dict key: (NSString *) key  default: (BOOL) defaultBool using: (SEL) selector{\n\tNSNumber *num = [dict objectForKey: key];\n\tnum = (num) ? num : [NSNumber numberWithBool: defaultBool];\n\t[self performSelectorOnMainThread: selector withObject: num waitUntilDone: YES];\n}\n\n- (void) setInfoPlistNumberValueForMouseX: (NSInteger) x Y: (NSInteger) y from: (NSDictionary*) dict key: (NSString *) key  default: (NSInteger) number browser: (BOOL) browser {\n\tNSNumber *num = [dict objectForKey: key];\n\tNSInteger numberAsInteger = (num) ? [num integerValue] : number;\n\tif (browser) {\n\t\tSqueakBrowserMouseMappings[x][y] = numberAsInteger;\n\t} else {\n\t\tSqueakMouseMappings[x][y] = numberAsInteger;\n\t}\n}\n\n- (NSURL *) expandNSStringIntoNSURL: (NSString*) originalPath doOptionalSqueakLandLogic: (BOOL) isetoysonastick {\n\t\n\tNSString *checkFortilda = [originalPath stringByStandardizingPath];\n\t\n\tif (isetoysonastick) {\n\t\tNSString *standardizedString;\n\t\tBOOL isAbsolutePath = [checkFortilda isAbsolutePath];\n\t\tif (!isAbsolutePath) {\n\t\t\tNSString *filePath = [self fixupNonAbsolutePath: checkFortilda];\t\n\t\t\tstandardizedString = [filePath stringByStandardizingPath];\n\t\t} else {\n\t\t\tstandardizedString = checkFortilda;\n\t\t}\n\t\treturn [NSURL fileURLWithPath: standardizedString];\n\t}\n\t\n\treturn  [NSURL fileURLWithPath: checkFortilda];\n}\n\n- (NSString *) fixupNonAbsolutePath: (NSString *) partialPathString {\n\tNSBundle *mainBundle = [NSBundle mainBundle];\n\tNSString *resourcePath = [mainBundle resourcePath];\n\tNSString *actualPath = [resourcePath stringByAppendingPathComponent: partialPathString];\n\treturn actualPath ;\n}\n\n\n- (void) parseInfoPlist {\n\tNSAutoreleasePool * pool = [NSAutoreleasePool new];\n\t\n\tNSBundle *mainBundle = [NSBundle mainBundle];\n\tNSDictionary *dict = [mainBundle infoDictionary]; \n\t\n\t[self setInfoPlistNumberValueFrom: dict key: @\"SqueakNumStackPages\" default: 0 using: @selector(setOverrideSqueakNumStackPages:)];\n\t[self setInfoPlistNumberValueFrom: dict key: @\"SqueakEdenBytes\" default: 0 using: @selector(setOverrideSqueakEdenBytes:)];\n\n\t[self setInfoPlistNumberValueFrom: dict key: @\"SqueakDebug\" default: 0 using: @selector(setOverrideSqueakDebug:)];\n\t[self setInfoPlistBooleanValueFrom: dict key: @\"SqueakQuitOnQuitAppleEvent\" default: NO using: @selector(setOverrideSqueakQuitOnQuitAppleEvent:)];\n\t[self setInfoPlistBooleanValueFrom: dict key: @\"SqueakUseFileMappedMMAP\" default: NO using: @selector(setOverrideSqueakUseFileMappedMMAP:)];\n\t[self setInfoPlistNumberValueFrom: dict key: @\"SqueakMaxHeapSize\" default: 512*1024*1024 using: @selector(setOverrideSqueakMaxHeapSize:)];\n\t[self setInfoPlistNumberValueFrom: dict key: @\"SqueakUIFlushPrimaryDeferNMilliseconds\" default: 20 using: @selector(setOverrideSqueakUIFlushPrimaryDeferNMilliseconds:)];\n\t[self setInfoPlistFloatNumberValueFrom: dict key: @\"SqueakUIFadeForFullScreenInSeconds\" default: 1.5 using: @selector(setOverrideSqueakUIFadeForFullScreenInSeconds:)];\n\n\t[self setInfoPlistNSStringValueFrom: dict key: @\"SqueakUnTrustedDirectory\" default: @\"/foobar/tooBar/forSqueak/bogus/\" using: @selector(setOverrideSqueakUnTrustedDirectory:)];\n\t[self setInfoPlistNSStringValueFrom: dict key: @\"SqueakTrustedDirectory\" default: @\"/foobar/tooBar/forSqueak/bogus/\" using: @selector(setOverrideSqueakTrustedDirectory:)];\n\t[self setInfoPlistNSStringValueFrom: dict key: @\"SqueakResourceDirectory\" default: NULL using: @selector(setSqueakResourceDirectory:)];\n\t[self setInfoPlistBooleanValueFrom: dict key: @\"SqueakPluginsBuiltInOrLocalOnly\" default: YES using: @selector(setOverrideSqueakPluginsBuiltInOrLocalOnly:)];\n\t[self setInfoPlistBooleanValueFrom: dict key: @\"SqueakExplicitWindowOpenNeeded\" default: NO using: @selector(setOverrideSqueakExplicitWindowOpenNeeded:)];\n\t[self setInfoPlistNSStringValueFrom: dict key: @\"SqueakImageName\" default: @\"Squeak.image\" using: @selector(setOverrideSqueakImageName:)];\n\t[self setInfoPlistNumberValueForMouseX: 0 Y: 1 from: dict key: @\"SqueakMouseNoneButton1\" default: 1 browser: NO];\n\t[self setInfoPlistNumberValueForMouseX: 0 Y: 2 from: dict key: @\"SqueakMouseNoneButton2\" default: 3 browser: NO];\n\t[self setInfoPlistNumberValueForMouseX: 0 Y: 3 from: dict key: @\"SqueakMouseNoneButton3\" default: 2 browser: NO];\n\t[self setInfoPlistNumberValueForMouseX: 1 Y: 1 from: dict key: @\"SqueakMouseCmdButton1\" default: 3 browser: NO];\n\t[self setInfoPlistNumberValueForMouseX: 1 Y: 2 from: dict key: @\"SqueakMouseCmdButton2\" default: 3 browser: NO];\n\t[self setInfoPlistNumberValueForMouseX: 1 Y: 3 from: dict key: @\"SqueakMouseCmdButton3\" default: 2 browser: NO];\n\t[self setInfoPlistNumberValueForMouseX: 2 Y: 1 from: dict key: @\"SqueakMouseOptionButton1\" default: 2 browser: NO];\n\t[self setInfoPlistNumberValueForMouseX: 2 Y: 2 from: dict key: @\"SqueakMouseOptionButton2\" default: 3 browser: NO];\n\t[self setInfoPlistNumberValueForMouseX: 2 Y: 3 from: dict key: @\"SqueakMouseOptionButton3\" default: 2 browser: NO];\n\t[self setInfoPlistNumberValueForMouseX: 3 Y: 1 from: dict key: @\"SqueakMouseControlButton1\" default: 1 browser: NO];\n\t[self setInfoPlistNumberValueForMouseX: 3 Y: 2 from: dict key: @\"SqueakMouseControlButton2\" default: 3 browser: NO];\n\t[self setInfoPlistNumberValueForMouseX: 3 Y: 3 from: dict key: @\"SqueakMouseControlButton3\" default: 2 browser: NO];\n\t[self setInfoPlistNumberValueForMouseX: 0 Y: 1 from: dict key: @\"SqueakBrowserMouseNoneButton1\" default: 1 browser: YES];\n\t[self setInfoPlistNumberValueForMouseX: 0 Y: 2 from: dict key: @\"SqueakBrowserMouseNoneButton2\" default: 3 browser: YES];\n\t[self setInfoPlistNumberValueForMouseX: 0 Y: 3 from: dict key: @\"SqueakBrowserMouseNoneButton3\" default: 2 browser: YES];\n\t[self setInfoPlistNumberValueForMouseX: 1 Y: 1 from: dict key: @\"SqueakBrowserMouseCmdButton1\" default: 3 browser: YES];\n\t[self setInfoPlistNumberValueForMouseX: 1 Y: 2 from: dict key: @\"SqueakBrowserMouseCmdButton2\" default: 3 browser: YES];\n\t[self setInfoPlistNumberValueForMouseX: 1 Y: 3 from: dict key: @\"SqueakBrowserMouseCmdButton3\" default: 2 browser: YES];\n\t[self setInfoPlistNumberValueForMouseX: 2 Y: 1 from: dict key: @\"SqueakBrowserMouseOptionButton1\" default: 2 browser: YES];\n\t[self setInfoPlistNumberValueForMouseX: 2 Y: 2 from: dict key: @\"SqueakBrowserMouseOptionButton2\" default: 3 browser: YES];\n\t[self setInfoPlistNumberValueForMouseX: 2 Y: 3 from: dict key: @\"SqueakBrowserMouseOptionButton3\" default: 2 browser: YES];\n\t[self setInfoPlistNumberValueForMouseX: 3 Y: 1 from: dict key: @\"SqueakBrowserMouseControlButton1\" default: 1 browser: YES];\n\t[self setInfoPlistNumberValueForMouseX: 3 Y: 2 from: dict key: @\"SqueakBrowserMouseControlButton2\" default: 3 browser: YES];\n\t[self setInfoPlistNumberValueForMouseX: 3 Y: 3 from: dict key: @\"SqueakBrowserMouseControlButton3\" default: 2 browser: YES];\n\t[pool drain];\n}\n\n@end\n\n/*\n @\"SqueakWindowAttribute\" NO\n @\"SqueakWindowHasTitle\" NO\n @\"SqueakFloatingWindowGetsFocus\" NO\n @\"SqueakEncodingType\" NO\n SqueakUIFlushUseHighPercisionClock\n SqueakUIFlushPrimaryDeferNMilliseconds\n SqueakUIFlushSecondaryCleanupDelayMilliseconds\n SqueakUIFlushSecondaryCheckForPossibleNeedEveryNMilliseconds\n*/\n\t\t\n\t\t"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/sqSqueakOSXNSView.h",
    "content": "//\n//  sqSqueakOSXNSView.h\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-14.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import <Cocoa/Cocoa.h>\n#include <ApplicationServices/ApplicationServices.h>\n#import \"keyBoardStrokeDetails.h\"\n\n@class sqSqueakOSXScreenAndWindow;\n#import \"sq.h\"\n\n@interface sqSqueakOSXNSView : NSOpenGLView <NSTextInputClient> {\n\tsqSqueakOSXScreenAndWindow *windowLogic;\n\tNSTrackingRectTag squeakTrackingRectForCursor;\n\tNSRange inputMark;\n\tNSRange inputSelection;\n\tkeyBoardStrokeDetails* lastSeenKeyBoardStrokeDetails;\n\tkeyBoardStrokeDetails* lastSeenKeyBoardModifierDetails;\n\tBOOL\tdragInProgress;\n\tint\t\tdragCount;\n\tBOOL\tfirstDrawCompleted;\n\tBOOL\tsyncNeeded;\n\tNSMutableArray*  dragItems;\n\tCGDisplayFadeReservationToken    fadeToken;\n\tNSRect\tsavedScreenBoundsAtTimeOfFullScreen;\n\tCGColorSpaceRef colorspace;\t\n\tunsigned int*      colorMap32;\n\tBOOL clippyIsEmpty;\n\tCGRect clippy;\n}\n@property (nonatomic,assign) NSTrackingRectTag squeakTrackingRectForCursor;\n@property (nonatomic,retain) keyBoardStrokeDetails* lastSeenKeyBoardStrokeDetails;\n@property (nonatomic,retain) keyBoardStrokeDetails* lastSeenKeyBoardModifierDetails;\n@property (nonatomic,assign) BOOL dragInProgress;\n@property (nonatomic,assign) int dragCount;\n@property (nonatomic,retain) NSMutableArray* dragItems;\n@property (nonatomic,assign) sqSqueakOSXScreenAndWindow *windowLogic;\n@property (nonatomic,assign) NSRect\tsavedScreenBoundsAtTimeOfFullScreen;\n\n- (void) initializeVariables;\n- (void) fakeKeyDownUp: (NSEvent*) theEvent;\n- (NSString*) dragFileNameStringAtIndex:(sqInt) index;\n- (void)  ioSetFullScreen: (sqInt) fullScreen;\n- (void)fadeOut;\n- (void)fadeIn;\n- (void) drawImageUsingClip: (CGRect) clip;\n- (NSUInteger) countNumberOfNoneSqueakImageFilesInDraggedFiles: (id<NSDraggingInfo>)info;\n- (NSMutableArray *) filterOutSqueakImageFilesFromDraggedFiles: (id<NSDraggingInfo>)info;\n- (NSMutableArray *) filterSqueakImageFilesFromDraggedFiles: (id<NSDraggingInfo>)info;\n-(void)setupOpenGL;\n- (void) drawThelayers;\n@end\n\n#import\t\"SqViewClut.h\"\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/sqSqueakOSXNSView.m",
    "content": "//\n//  sqSqueakOSXNSView.m\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-14.\n//  Some code sqUnixQuartz.m -- display via native windows on Mac OS X\t-*- ObjC -*-\n//  Author: Ian Piumarta <ian.piumarta@squeakland.org>\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n#import <QuartzCore/QuartzCore.h>\n\n#import \"sqSqueakOSXNSView.h\"\n#import \"sqSqueakOSXScreenAndWindow.h\"\n#import \"SqueakOSXAppDelegate.h\"\n#import \"sqSqueakOSXApplication+events.h\"\n#import \"sqSqueakOSXInfoPlistInterface.h\"\n#import \"sq.h\"\n#import \"sqVirtualMachine.h\"\n\n//#import <OpenGL/CGLMacro.h>\n\nextern SqueakOSXAppDelegate *gDelegateApp;\nextern struct\tVirtualMachine* interpreterProxy;\n\nstatic NSString *stringWithCharacter(unichar character) {\n\treturn [NSString stringWithCharacters: &character length: 1];\n}\n\n@implementation sqSqueakOSXNSView\n@synthesize squeakTrackingRectForCursor,lastSeenKeyBoardStrokeDetails,\nlastSeenKeyBoardModifierDetails,dragInProgress,dragCount,dragItems,windowLogic,savedScreenBoundsAtTimeOfFullScreen;\n\n+ (NSOpenGLPixelFormat *)defaultPixelFormat {\n\tNSOpenGLPixelFormatAttribute attrs[] =\n    {\n\t\tNSOpenGLPFAAccelerated,\n\t\tNSOpenGLPFANoRecovery,\n\t\tNSOpenGLPFABackingStore,\n\t\t0\n    };\n    return[[NSOpenGLPixelFormat alloc] initWithAttributes:attrs];\n}\n\n- (void)awakeFromNib {\n\tself = [self initWithFrame: self.frame pixelFormat: [[self class] defaultPixelFormat] ];\n\tinputMark = NSMakeRange(NSNotFound, 0);\n\tinputSelection = NSMakeRange(0, 0);\n    [self registerForDraggedTypes: [NSArray arrayWithObjects: NSFilenamesPboardType, nil]];\n\t//\tNSLog(@\"registerForDraggedTypes\");\n\tdragInProgress = NO;\n\tdragCount = 0;\n\tdragItems = NULL;\n\tclippyIsEmpty = YES;\n\tcolorspace = CGColorSpaceCreateDeviceRGB();\n\t[self initializeSqueakColorMap];\n}\n\n- (void) initializeVariables {\n}\n\n- (void) dealloc {\n    [super dealloc];\n\tfree(colorMap32);\n\tCGColorSpaceRelease(colorspace);\n}\n\n- (BOOL) acceptsFirstResponder {\n\treturn YES;\n}\n\n- (BOOL)isFlipped {\n\treturn  YES;\n}\n\n- (BOOL)isOpaque {\n\treturn YES;\n}\n\n- (void)viewDidMoveToWindow {\n\tif (self.squeakTrackingRectForCursor)\n\t\t[self removeTrackingRect: self.squeakTrackingRectForCursor];\n\t\n\tself.squeakTrackingRectForCursor = [self addTrackingRect: [self bounds] owner: self userData:NULL assumeInside: NO];\n}\n\n- (void) updateTrackingAreas {\n\t[super updateTrackingAreas];\n\t[self removeTrackingRect: self.squeakTrackingRectForCursor];\n\tself.squeakTrackingRectForCursor = [self addTrackingRect: [self bounds] owner: self userData:NULL assumeInside: NO];\n}\n\n- (void) viewWillStartLiveResize {\n//\t[self.window setShowsResizeIndicator: YES];\n\t[[NSCursor arrowCursor] set];\n}\n\n- (void) viewDidEndLiveResize {\n//\t[self.window setShowsResizeIndicator: NO];\n\t[((sqSqueakOSXApplication*) gDelegateApp.squeakApplication).squeakCursor performSelectorOnMainThread: @selector(set) withObject: nil waitUntilDone: NO];\t\n}\n\n- (void) drawImageUsingClip: (CGRect) clip {\n\t\n\tif (clippyIsEmpty){\n\t\tclippy = clip;\n\t\tclippyIsEmpty = NO;\n\t} else {\n\t\tclippy = CGRectUnion(clippy, clip);\n\t}\n\tsyncNeeded = YES;\n}\n\n- (void) drawThelayers {\n\tif (syncNeeded) { \n\t\t[self drawRect: NSRectFromCGRect(clippy)];\n\t\tsyncNeeded = NO;\n\t\tclippyIsEmpty = YES;\n//\t\tCGL_MACRO_DECLARE_VARIABLES();\n\t\tglFlush();\n\t\t[[self openGLContext] flushBuffer];  \n\t}\n\tif (!firstDrawCompleted) {\n\t\tfirstDrawCompleted = YES;\n\t\tif (getFullScreenFlag() == 0)\n\t\t\t[self.window makeKeyAndOrderFront: self];\n\t}\n}\n\n-(void)setupOpenGL {\t\n//\tCGL_MACRO_DECLARE_VARIABLES();\n// Enable the multithreading\n\tCGLContextObj ctx = [[self openGLContext] CGLContextObj];\n\tCGLEnable( ctx, kCGLCEMPEngine);\n\n//\tGLint newSwapInterval = 1;\n//\tCGLSetParameter(cgl_ctx, kCGLCPSwapInterval, &newSwapInterval);\n\tglPixelStorei(GL_UNPACK_ALIGNMENT, 1);\n\tglTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);\n\tglClearColor(1.0, 1.0, 1.0, 1.0);\n\tglColor4f(1.0, 1.0, 1.0, 1.0);\n\t\n\tglDisable(GL_DITHER);\n\tglDisable(GL_ALPHA_TEST);\n\tglDisable(GL_BLEND);\n\tglDisable(GL_STENCIL_TEST);\n\tglDisable(GL_FOG);\n\tglDisable(GL_TEXTURE_2D);\n\tglDisable(GL_DEPTH_TEST);\n\tglDisable (GL_SCISSOR_TEST);\n    glDisable (GL_CULL_FACE);\n\tglStencilMask(0);\n\tglPixelZoom(1.0,1.0);\n\t\n\tglEnable(GL_TEXTURE_RECTANGLE_ARB);\n \tglTexParameterf(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_PRIORITY, 0.0);\n\tglPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE);\n \tglTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_STORAGE_HINT_APPLE, GL_STORAGE_SHARED_APPLE);\n\tglTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST);\n\tglTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MAG_FILTER, GL_NEAREST);\n\tglTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);\n\tglTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);\n\tglPixelStorei( GL_UNPACK_ROW_LENGTH, self.frame.size.width );\n\tGLuint dt = 1;\n\tglDeleteTextures(1, &dt);\n\tglBindTexture(GL_TEXTURE_RECTANGLE_ARB, 1);\n\tsyncNeeded = NO;\n}\n\n- (void)loadTexturesFrom: (void*) lastBitsIndex subRectangle: (NSRect) subRect { \n//\tCGL_MACRO_DECLARE_VARIABLES();\n\tstatic void *previousLastBitsIndex=null;\n\tNSRect r=[self frame];\n\tif (!(previousLastBitsIndex == lastBitsIndex)) {\n\t\tpreviousLastBitsIndex = lastBitsIndex;\n\t\tglTextureRangeAPPLE(GL_TEXTURE_RECTANGLE_ARB, r.size.width*r.size.height*4,lastBitsIndex);\t\t\n\t}\n\t\t\n\tglViewport( subRect.origin.x,subRect.origin.y, subRect.size.width,subRect.size.height );\n\tchar *subimg = ((char*)lastBitsIndex) + (unsigned int)(subRect.origin.x + (r.size.height-subRect.origin.y-subRect.size.height)*r.size.width)*4;\n\tglTexImage2D( GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA, subRect.size.width, subRect.size.height, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, subimg );\n\t//\tNSLog(@\" draw %f %f %f %f\",subRect.origin.x,subRect.origin.y,subRect.size.width,subRect.size.height);\t\n}\n\n-(void)defineQuad:(NSRect)r\n{\n\n//\tCGL_MACRO_DECLARE_VARIABLES();\n\t glBegin(GL_QUADS);\n\t glTexCoord2f(0.0f, 0.0f);\t\t\t\t\tglVertex2f(-1.0f, 1.0f);\n\t glTexCoord2f(0.0f, r.size.height);\t\t\tglVertex2f(-1.0f, -1.0f);\n\t glTexCoord2f(r.size.width, r.size.height);  glVertex2f(1.0f, -1.0f);\n\t glTexCoord2f(r.size.width, 0.0f);\t\t\tglVertex2f(1.0f, 1.0f);\n\t glEnd();\n}\n\n- (void)update  // moved or resized\n{\n\tNSRect rect;\n\t\n\t[super update];\n\t\n\t[[self openGLContext] makeCurrentContext];\n//\tCGL_MACRO_DECLARE_VARIABLES();\n\t[[self openGLContext] update];\n\t\n\trect = [self bounds];\n\t\n    glViewport(0, 0, (int) rect.size.width, (int) rect.size.height);\n\tglPixelStorei( GL_UNPACK_ROW_LENGTH, rect.size.width );\n\t\n\tglMatrixMode(GL_PROJECTION);\n    glLoadIdentity();\n\t\n\tglMatrixMode(GL_MODELVIEW);\n    glLoadIdentity(); \n\t\n\t[self setNeedsDisplay:true];\n}\n\n- (void)reshape\t// scrolled, moved or resized\n{\n\tNSRect rect;\n\t\n\t[super reshape];\n\t\n\t[[self openGLContext] makeCurrentContext];\n//\tCGL_MACRO_DECLARE_VARIABLES();\n\t[[self openGLContext] update];\n\t\n\trect = [self bounds];\n\t\n\tglViewport(0, 0, (int) rect.size.width, (int) rect.size.height);\n\tglPixelStorei( GL_UNPACK_ROW_LENGTH, rect.size.width );\n\tglMatrixMode(GL_PROJECTION);\n    glLoadIdentity();\n\t\n\tglMatrixMode(GL_MODELVIEW);\n    glLoadIdentity();\n\t\n\t[self setNeedsDisplay:true];\n}\n\n-(void)drawRect:(NSRect)rect\n{\n//\tNSLog(@\" draw %f %f %f %f\",rect.origin.x,rect.origin.y,rect.size.width,rect.size.height);\n\tsqInt formObj = interpreterProxy->displayObject();\n\tsqInt formPtrOop = interpreterProxy->fetchPointerofObject(0, formObj);\t\n\tvoid* dispBitsIndex = interpreterProxy->firstIndexableField(formPtrOop);\n    static int inited=NO;\n    if ( dispBitsIndex ) {\n\t\t[[self openGLContext] makeCurrentContext];\n\t\tif (!inited) {\n\t\t\t[self setupOpenGL];\n\t\t\tinited=YES;\n\t\t}\n\t\t[self loadTexturesFrom:dispBitsIndex subRectangle: rect];\n\t\t[self defineQuad:rect];\n  }\n}\n\n- (void)mouseEntered:(NSEvent *)theEvent {\n\t[((sqSqueakOSXApplication*) gDelegateApp.squeakApplication).squeakCursor set];\n}\n\n- (void)mouseExited:(NSEvent *)theEvent {\n\t[[NSCursor arrowCursor] set];\n}\n\n- (void)mouseMoved:(NSEvent *)theEvent {\n\t[(sqSqueakOSXApplication *) gDelegateApp.squeakApplication recordMouseEvent: theEvent fromView: self];\n}\n\n- (void)mouseDragged:(NSEvent *)theEvent {\n\t[(sqSqueakOSXApplication *) gDelegateApp.squeakApplication recordMouseEvent: theEvent fromView: self];\n}\n\n- (void)rightMouseDragged:(NSEvent *)theEvent {\n\t[(sqSqueakOSXApplication *) gDelegateApp.squeakApplication recordMouseEvent: theEvent fromView: self];\n}\n\n- (void)otherMouseDragged:(NSEvent *)theEvent {\n\t[(sqSqueakOSXApplication *) gDelegateApp.squeakApplication recordMouseEvent: theEvent fromView: self];\n}\n\n- (void)scrollWheel:(NSEvent *)theEvent {\n\t[(sqSqueakOSXApplication *) gDelegateApp.squeakApplication recordWheelEvent: theEvent fromView: self];\n}\n\n- (void)mouseUp:(NSEvent *)theEvent {\n\t[(sqSqueakOSXApplication *) gDelegateApp.squeakApplication recordMouseEvent: theEvent fromView: self];\n}\n\n- (void)rightMouseUp:(NSEvent *)theEvent {\n\t[(sqSqueakOSXApplication *) gDelegateApp.squeakApplication recordMouseEvent: theEvent fromView: self];\n}\n\n- (void)otherMouseUp:(NSEvent *)theEvent {\n\t[(sqSqueakOSXApplication *) gDelegateApp.squeakApplication recordMouseEvent: theEvent fromView: self];\n}\n\n- (void)mouseDown:(NSEvent *)theEvent {\n\t[(sqSqueakOSXApplication *) gDelegateApp.squeakApplication recordMouseEvent: theEvent fromView: self];\n}\n\n- (void)rightMouseDown:(NSEvent *)theEvent {\n\t[(sqSqueakOSXApplication *) gDelegateApp.squeakApplication recordMouseEvent: theEvent fromView: self];\n}\n- (void)otherMouseDown:(NSEvent *)theEvent {\n\t[(sqSqueakOSXApplication *) gDelegateApp.squeakApplication recordMouseEvent: theEvent fromView: self];\n}\n \n- (NSString *) dealWithOpenStepChars: (NSString *) openStep {\n\t\n\tunichar keyChar; \n\tstatic unichar combiningHelpChar[] = {0x003F, 0x20DD};\n\t\n\tkeyChar = [openStep characterAtIndex: 0]; \n\t\n//http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/KEYBOARD.TXT\n\t\n\tswitch (keyChar) { \n\t\tcase NSUpArrowFunctionKey: keyChar = 30; break; \n\t\tcase NSDownArrowFunctionKey: keyChar = 31; break; \n\t\tcase NSLeftArrowFunctionKey: keyChar = 28; break; \n\t\tcase NSRightArrowFunctionKey: keyChar = 29; break; \n\t\tcase NSInsertFunctionKey: \n\t\t  \treturn [NSString stringWithCharacters: combiningHelpChar length: 2];\n\t\tcase NSDeleteFunctionKey: keyChar = 0x2326; break; \n\t\tcase NSHomeFunctionKey: keyChar = 1; break; \n\t\tcase NSEndFunctionKey: keyChar = 4; break;\n\t\tcase NSPageUpFunctionKey: \n\t\t\tkeyChar = 0x21DE; break;\n\t\tcase NSPageDownFunctionKey: \n\t\t\tkeyChar = 0x21DF; break;\n\t\tcase NSClearLineFunctionKey: keyChar = 0x2327; break;\n\t\tcase 127: keyChar = 8; break;\n\t\tdefault: \n\t\t\tif (keyChar >= NSF1FunctionKey && keyChar <= NSF35FunctionKey) { \n\t\t\t\tkeyChar = 0; \n\t\t\t}\n\t}\n\treturn stringWithCharacter(keyChar);\n}\n\n\n-(void)  fakeKeyDownUp: (NSEvent*) theEvent {\n\t\n\t//http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/CORPCHAR.TXT\n\t//http://www.internet4classrooms.com/mac_ext.gif\n\t//http://developer.apple.com/legacy/mac/library/documentation/mac/Text/Text-571.html\n\t\n\tkeyBoardStrokeDetails *aKeyBoardStrokeDetails = [[keyBoardStrokeDetails alloc] init];\n\taKeyBoardStrokeDetails.keyCode = [theEvent keyCode];\n\taKeyBoardStrokeDetails.modifierFlags = [theEvent modifierFlags];\n\t\n\tNSArray *down = [[NSArray alloc] initWithObjects: theEvent,nil];\n\t@synchronized(self) {\n\t\tlastSeenKeyBoardStrokeDetails = aKeyBoardStrokeDetails;\n\t\tNSString *possibleConversion = [theEvent characters];\n\t\t\n\t\tif ([possibleConversion length] > 0) {\n\t\t\tNSString *c = [self dealWithOpenStepChars: possibleConversion];\n\t\t\t[self insertText: c replacementRange: NSMakeRange(NSNotFound, 0)];\n\t\t}\n\t\tself.lastSeenKeyBoardStrokeDetails = NULL;\n\t\t[self keyUp: theEvent]; \n\t}\n\t[down release];\n}\n\n-(void)keyDown:(NSEvent*)theEvent {\n\tkeyBoardStrokeDetails *aKeyBoardStrokeDetails = [[keyBoardStrokeDetails alloc] init];\n\taKeyBoardStrokeDetails.keyCode = [theEvent keyCode];\n\taKeyBoardStrokeDetails.modifierFlags = [theEvent modifierFlags];\n\t\n\tNSArray *down = [[NSArray alloc] initWithObjects: theEvent,nil];\n\t@synchronized(self) {\n\t\tlastSeenKeyBoardStrokeDetails = aKeyBoardStrokeDetails;\n\t\t[self interpretKeyEvents: down];\n\t\tself.lastSeenKeyBoardStrokeDetails = NULL;\n\t}\n\t[down release];\n}\n\n-(void)keyUp:(NSEvent*)theEvent {\n\t[(sqSqueakOSXApplication *) gDelegateApp.squeakApplication recordKeyUpEvent: theEvent fromView: self];\n}\n\n/* 10.5 seems only to call insertText:, but 10.6 calls insertText:replacementRange: */\n\n- (void)insertText:(id)aString\n{\n\t[(sqSqueakOSXApplication *) gDelegateApp.squeakApplication recordCharEvent: aString fromView: self];\n}\n\n- (void)insertText:(id)aString replacementRange:(NSRange)replacementRange\n{\n\t[(sqSqueakOSXApplication *) gDelegateApp.squeakApplication recordCharEvent: aString fromView: self];\n}\n\n- (void)flagsChanged:(NSEvent *)theEvent {\n\tkeyBoardStrokeDetails *aKeyBoardStrokeDetails = [[keyBoardStrokeDetails alloc] init];\n\taKeyBoardStrokeDetails.keyCode = [theEvent keyCode];\n\taKeyBoardStrokeDetails.modifierFlags = [theEvent modifierFlags];\n\tself.lastSeenKeyBoardModifierDetails = aKeyBoardStrokeDetails;\n\t[aKeyBoardStrokeDetails release];\n}\n\n- (void)doCommandBySelector:(SEL)aSelector {\n\tunichar unicode;\n\tunsigned short keyCode;\n\tNSString *unicodeString;\n\tBOOL isFunctionKey = NO;\n\t\n\tif (self.lastSeenKeyBoardModifierDetails) {\n\t\tisFunctionKey = (self.lastSeenKeyBoardModifierDetails.modifierFlags & NSFunctionKeyMask) == NSFunctionKeyMask;\n\t}\n\t\n#define encode(c, k,  s) \t\t if (aSelector == @selector(s)) { unicode = c; keyCode = k; unicodeString = [NSString stringWithCharacters: &unicode length: 1]; } \n//http://developer.apple.com/documentation/mac/Text/Text-571.html\n\t\n\tencode(  8, 51, deleteBackward:)\n\telse encode( 8, 51, deleteWordBackward:) \n\t\telse encode(127, 51, deleteForward:)\n\t\t\telse encode(127, 51, deleteWordForward:)\n\t\t\t\telse encode( 8, 51, deleteBackwardByDecomposingPreviousCharacter:) \n\t\t\t\t\n\t\t\t\t\n\t\t\t\telse encode( (isFunctionKey ? 3: 13), (isFunctionKey ? 76: 36), insertNewline:) \n\t\t\t\t\telse encode( 13, 36, insertLineBreak:) \n\t\t\t\t\t\telse encode( 13, 36, insertNewlineIgnoringFieldEditor:) \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\telse encode(  9, 48, insertTab:)\n\t\t\t\t\t\t\t\telse encode(  9, 48, insertBacktab:)\n\t\t\t\t\t\t\t\t\telse encode(  9, 48, insertTabIgnoringFieldEditor:)\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\telse encode( 28, 123,  moveLeft:)\n\t\t\t\t\t\t\t\t\t\t\telse encode( 29, 124, moveRight:)\n\t\t\t\t\t\t\t\t\t\t\t\telse encode( 30, 126, moveUp:)\n\t\t\t\t\t\t\t\t\t\t\t\t\telse encode( 31, 125, moveDown:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse encode( 30, 126, moveBackward:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse encode( 31, 125, moveForward:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse encode( 28, 123, moveLeftAndModifySelection:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse encode( 29, 124, moveRightAndModifySelection:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse encode( 30, 126, moveUpAndModifySelection:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse encode( 31, 125, moveDownAndModifySelection:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse encode( 28, 123, moveWordLeftAndModifySelection:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse encode( 29, 124, moveWordRightAndModifySelection:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse encode( 28, 123, moveWordLeft:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse encode( 29, 124, moveWordRight:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse encode( 30, 126, moveParagraphBackwardAndModifySelection:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse encode( 31, 125, moveParagraphForwardAndModifySelection:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse encode( 11, 116, pageUp:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse encode( 12, 121, pageDown:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse encode( 11, 116, pageUpAndModifySelection:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse encode( 12, 121, pageDownAndModifySelection:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse encode( (isFunctionKey ? 11 : 30), (isFunctionKey ? 116 : 126), scrollPageUp:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse encode( (isFunctionKey ? 12 : 31), (isFunctionKey ? 121 : 125), scrollPageDown:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse encode(  1, 115, moveToBeginningOfDocument:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse encode(  4, 119, moveToEndOfDocument:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse encode(  (isFunctionKey ? 1 : 28), (isFunctionKey ? 115 : 123), moveToLeftEndOfLine:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse encode(  (isFunctionKey ? 4 : 29), (isFunctionKey ? 119 : 124), moveToRightEndOfLine:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse encode(  (isFunctionKey ? 1 : 28), (isFunctionKey ? 115 : 123), moveToLeftEndOfLineAndModifySelection:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse encode(  (isFunctionKey ? 4 : 29), (isFunctionKey ? 119 : 124), moveToRightEndOfLineAndModifySelection:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse encode(  1, 115, scrollToBeginningOfDocument:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse encode(  4, 119, scrollToEndOfDocument:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse encode(  1, 115, moveToBeginningOfDocumentAndModifySelection:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse encode(  4, 119, moveToEndOfDocumentAndModifySelection:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse encode( 27, 53, cancelOperation:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse encode( 27, 53, cancel:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse encode( 27, 53, complete:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse encode( 27, 71, delete:)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\n\t@synchronized(self) {\n\t\tkeyBoardStrokeDetails *aKeyBoardStrokeDetails = [[keyBoardStrokeDetails alloc] init];\n\t\taKeyBoardStrokeDetails.keyCode = keyCode;\n\t\taKeyBoardStrokeDetails.modifierFlags = self.lastSeenKeyBoardModifierDetails.modifierFlags;\n\t\tlastSeenKeyBoardStrokeDetails = aKeyBoardStrokeDetails;\n\t\t\t\n\t\t[(sqSqueakOSXApplication *) gDelegateApp.squeakApplication recordCharEvent: unicodeString fromView: self];\n\t\tself.lastSeenKeyBoardStrokeDetails = NULL;\n\t}\n}\n\n\n- (void)setMarkedText:(id)aString selectedRange:(NSRange)selectedRange replacementRange:(NSRange)replacementRange {\n\tinputMark= NSMakeRange(0, 1);\n\tinputSelection= NSMakeRange(NSNotFound, 0);\n}\n\n- (void)\t\t unmarkText {\n\tinputMark= NSMakeRange(NSNotFound, 0); \n}\n\n- (BOOL)\t\t hasMarkedText { \n\treturn inputMark.location != NSNotFound; \n}\n\n- (NSInteger)\t\t conversationIdentifier\t{ \n\treturn (NSInteger )self; \n}\n\n- (NSAttributedString *)attributedSubstringForProposedRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange { \n\treturn nil; \n}\n\n- (NSRange)\t\t markedRange { \n\treturn inputMark; \n}\n\n- (NSRange)\t\t selectedRange { \n\treturn inputSelection; \n}\n\n- (NSRect)firstRectForCharacterRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange {\n\treturn NSMakeRect(0,0, 0,0); \n}\n\n- (NSUInteger) characterIndexForPoint: (NSPoint)thePoint {\n\treturn 0; \n}\n\n- (NSArray *) validAttributesForMarkedText { \n\treturn nil;\n}\n\n- (BOOL)drawsVerticallyForCharacterAtIndex:(NSUInteger)charIndex {\n\treturn NO;\n}\n\n- (NSMutableArray *) filterSqueakImageFilesFromDraggedFiles: (id<NSDraggingInfo>)info {\n\tNSPasteboard *pboard= [info draggingPasteboard];\n\tNSMutableArray *results = [NSMutableArray arrayWithCapacity: 10];\n\tif ([[pboard types] containsObject: NSFilenamesPboardType]) {\n\t\tNSArray *files= [pboard propertyListForType: NSFilenamesPboardType];\n\t\tNSString *fileName;\n\t\tfor (fileName in files) {\n\t\t\tif ([((sqSqueakOSXApplication*) gDelegateApp.squeakApplication) isImageFile: fileName] == YES)\n\t\t\t\t[results addObject: fileName];\n\t\t}\n\t}\n\treturn results;\n}\n\n\n- (NSMutableArray *) filterOutSqueakImageFilesFromDraggedFiles: (id<NSDraggingInfo>)info {\n\tNSPasteboard *pboard= [info draggingPasteboard];\n\tNSMutableArray *results = [NSMutableArray arrayWithCapacity: 10];\n\tif ([[pboard types] containsObject: NSFilenamesPboardType]) {\n\t\tNSArray *files= [pboard propertyListForType: NSFilenamesPboardType];\n\t\tNSString *fileName;\n\t\tfor (fileName in files) {\n\t\t\tif ([((sqSqueakOSXApplication*) gDelegateApp.squeakApplication) isImageFile: fileName] == NO)\n\t\t\t\t[results addObject: fileName];\n\t\t}\n\t}\n\treturn results;\n}\n\n- (NSUInteger) countNumberOfNoneSqueakImageFilesInDraggedFiles: (id<NSDraggingInfo>)info {\n\tNSArray *files = [self filterOutSqueakImageFilesFromDraggedFiles: info];\n\treturn [files count];\n}\n\n- (NSDragOperation)draggingEntered:(id < NSDraggingInfo >)info {\n\tif (self.dragInProgress) \n\t\treturn NSDragOperationNone;\n\tdragInProgress = YES;\n\tself.dragCount = (int) [self countNumberOfNoneSqueakImageFilesInDraggedFiles: info];\n\t\n\tif (self.dragCount)\n\t\t[(sqSqueakOSXApplication *) gDelegateApp.squeakApplication recordDragEvent: DragEnter numberOfFiles: self.dragCount where: [info draggingLocation] windowIndex: self.windowLogic.windowIndex];\n\t\n\treturn NSDragOperationGeneric;\n}\n\n- (NSDragOperation) draggingUpdated: (id<NSDraggingInfo>)info\n{\n\tif (self.dragCount)\n\t\t[(sqSqueakOSXApplication *) gDelegateApp.squeakApplication recordDragEvent: DragMove numberOfFiles: self.dragCount where: [info draggingLocation] windowIndex: self.windowLogic.windowIndex];\n\treturn NSDragOperationGeneric;\n}\n\n- (void) draggingExited: (id<NSDraggingInfo>)info\n{\n\tif (self.dragCount)\n\t\t[(sqSqueakOSXApplication *) gDelegateApp.squeakApplication recordDragEvent: DragLeave numberOfFiles: self.dragCount where: [info draggingLocation] windowIndex: self.windowLogic.windowIndex];\n\tself.dragCount = 0;\n\tself.dragInProgress = NO;\n\tself.dragItems = NULL;\n}\n\n- (BOOL) performDragOperation: (id<NSDraggingInfo>)info {\n\tif (self.dragCount) {\n\t\tself.dragItems = [self filterOutSqueakImageFilesFromDraggedFiles: info];\n\t\t[(sqSqueakOSXApplication *) gDelegateApp.squeakApplication recordDragEvent: DragDrop numberOfFiles: self.dragCount where: [info draggingLocation] windowIndex: self.windowLogic.windowIndex];\n\t} \n\t\n\tNSArray *images = [self filterSqueakImageFilesFromDraggedFiles: info];\n\tif ([images count] > 0) {\n\t\tfor (NSString *item in images ){\n\t\t\tNSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] bundlePath]];\n\t\t\tLSLaunchURLSpec launchSpec;\n\t\t\tlaunchSpec.appURL = (CFURLRef)url;\n\t\t\tlaunchSpec.passThruParams = NULL;\n\t\t\tlaunchSpec.itemURLs = (CFArrayRef) [NSArray arrayWithObject:[NSURL fileURLWithPath: item]];\n\t\t\tlaunchSpec.launchFlags = kLSLaunchDefaults | kLSLaunchNewInstance;\n\t\t\tlaunchSpec.asyncRefCon = NULL;\n\t\t\t\n\t\t\tOSErr err = LSOpenFromURLSpec(&launchSpec, NULL);\n#pragma unused(err)\n\t\t}\n\t}\n\t\t\n\n\t\n\tdragInProgress = NO;\n\treturn YES;\n}\n\n- (NSString*) dragFileNameStringAtIndex: (sqInt) index {\n\tif (!self.dragItems) \n\t\treturn NULL;\n\tif (index < 1 || index > [self.dragItems count])\n\t\treturn NULL;\n\tNSString *filePath = [self.dragItems objectAtIndex: (NSUInteger) index - 1];\n\treturn filePath;\n}\n\n\n- (BOOL)ignoreModifierKeysWhileDragging {\n\treturn YES;\n}\n\n- (void)  ioSetFullScreen: (sqInt) fullScreen {\t\n\t\n\tif ([self isInFullScreenMode] == YES && (fullScreen == 1)) \n\t\treturn;\n\tif ([self isInFullScreenMode] == NO && (fullScreen == 0))\n\t\treturn;\n\t\n\tif ([self isInFullScreenMode] == NO && (fullScreen == 1)) {\n\t\tself.savedScreenBoundsAtTimeOfFullScreen = (NSRect) [self bounds];\n\t\t[self fadeOut];\n\t\t[self enterFullScreenMode:[NSScreen mainScreen] withOptions: nil];\n\t\textern struct\tVirtualMachine* interpreterProxy;\n\t\tinterpreterProxy->fullDisplayUpdate();\n\t\t[self fadeIn];\n\t}\n\t\n\tif ([self isInFullScreenMode] == YES && (fullScreen == 0)) {\n\t\t[self fadeOut];\n\t\t[self exitFullScreenModeWithOptions: NULL];\n\t\t[self fadeIn];\n\t\tif ([self.window isKeyWindow] == NO) {\n\t\t\t[self.window makeKeyAndOrderFront: self];\n\t\t\t//\tNOT SURE IF THIS IS NEEDED, MORE TESTING\t[self.window setContentSize: self.savedScreenBoundsAtTimeOfFullScreen.size];\n\t\t}\n\t}\n}\n\n- (void)fadeOut {\n\tCGDisplayErr    err;\n\t\n\terr = CGAcquireDisplayFadeReservation((CGDisplayReservationInterval)kCGMaxDisplayReservationInterval,\n\t\t\t\t\t\t\t\t\t\t  &fadeToken);\n\tif (err == kCGErrorSuccess) {\n\t\tCGDisplayFade(fadeToken,\n\t\t\t\t\t  ((sqSqueakOSXInfoPlistInterface*) gDelegateApp.squeakApplication.infoPlistInterfaceLogic).SqueakUIFadeForFullScreenInSeconds,\n\t\t\t\t\t  (CGDisplayBlendFraction)kCGDisplayBlendNormal,\n\t\t\t\t\t  (CGDisplayBlendFraction)kCGDisplayBlendSolidColor,\n\t\t\t\t\t  0.0f,\n\t\t\t\t\t  0.0f,\n\t\t\t\t\t  0.0f,\n\t\t\t\t\t  TRUE);\n\t} \n} \n\n- (void)fadeIn {\n\tCGDisplayErr    err;\n\t\n\terr = CGDisplayFade(fadeToken,\n\t\t\t\t\t\t((sqSqueakOSXInfoPlistInterface*) gDelegateApp.squeakApplication.infoPlistInterfaceLogic).SqueakUIFadeForFullScreenInSeconds,\n\t\t\t\t\t\t(CGDisplayBlendFraction)kCGDisplayBlendSolidColor,\n\t\t\t\t\t\t(CGDisplayBlendFraction)kCGDisplayBlendNormal,\n\t\t\t\t\t\t0.0f,\n\t\t\t\t\t\t0.0f,\n\t\t\t\t\t\t0.0f,\n\t\t\t\t\t\tTRUE);\n\tif (err == kCGErrorSuccess) {\n\t\tCGReleaseDisplayFadeReservation(fadeToken);\n\t} \n}\n\n@end"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/sqSqueakOSXScreenAndWindow.h",
    "content": "//\n//  sqSqueakOSXScreenAndWindow.h\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-14.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import \"sqSqueakScreenAndWindow.h\"\n#import \"sqSqueakOSXNSView.h\"\n\n@protocol NSWindowDelegate <NSObject> @end\n\n\n@interface sqSqueakOSXScreenAndWindow : sqSqueakScreenAndWindow  <NSWindowDelegate>{\n\tsqSqueakOSXNSView\t *mainViewOnWindow;\n}\n\n@property (nonatomic,retain)  sqSqueakOSXNSView *mainViewOnWindow;\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/OSX/sqSqueakOSXScreenAndWindow.m",
    "content": "//\n//  sqSqueakOSXScreenAndWindow.m\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 09-11-14.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import \"sqSqueakOSXScreenAndWindow.h\"\n#import \"SqueakOSXAppDelegate.h\"\n#import \"sqMacHostWindow.h\"\n#import \"sqSqueakOSXInfoPlistInterface.h\"\n#import \"SqViewBitmapConversion.h\"\n\nextern SqueakOSXAppDelegate *gDelegateApp;\n\n@implementation sqSqueakOSXScreenAndWindow\n@synthesize mainViewOnWindow;\n\n-(id) getMainView {\n\treturn (sqSqueakOSXNSView*) self.mainViewOnWindow;\n}\n\n- (void) dealloc {\n\t[mainViewOnWindow release];\n\t[super dealloc];\n}\n\n- (void)  ioSetFullScreen: (sqInt) fullScreen {\n\t[[self getMainView] ioSetFullScreen: fullScreen];\n}\n\n- (sqInt) ioHasDisplayDepth: (sqInt) depth {\n\tif (depth == 1 || depth == 2 || depth == 4 || depth == 8 || depth==16 || depth==32 ) \n\t\treturn true;\n\treturn false;\n}\n\n- (BOOL)windowShouldClose:(id)window {\n\t[gDelegateApp.squeakApplication recordWindowEvent: WindowEventClose window: window];\n\treturn NO;\n}\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Resources-iPad/MainWindow-iPad.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<archive type=\"com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB\" version=\"7.10\">\n\t<data>\n\t\t<int key=\"IBDocument.SystemTarget\">512</int>\n\t\t<string key=\"IBDocument.SystemVersion\">10D573</string>\n\t\t<string key=\"IBDocument.InterfaceBuilderVersion\">762</string>\n\t\t<string key=\"IBDocument.AppKitVersion\">1038.29</string>\n\t\t<string key=\"IBDocument.HIToolboxVersion\">460.00</string>\n\t\t<object class=\"NSMutableDictionary\" key=\"IBDocument.PluginVersions\">\n\t\t\t<string key=\"NS.key.0\">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>\n\t\t\t<string key=\"NS.object.0\">87</string>\n\t\t</object>\n\t\t<object class=\"NSMutableArray\" key=\"IBDocument.EditedObjectIDs\">\n\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t</object>\n\t\t<object class=\"NSArray\" key=\"IBDocument.PluginDependencies\">\n\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>\n\t\t</object>\n\t\t<object class=\"NSMutableDictionary\" key=\"IBDocument.Metadata\">\n\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t<object class=\"NSArray\" key=\"dict.sortedKeys\" id=\"0\">\n\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t</object>\n\t\t\t<object class=\"NSMutableArray\" key=\"dict.values\">\n\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t</object>\n\t\t</object>\n\t\t<object class=\"NSMutableArray\" key=\"IBDocument.RootObjects\" id=\"1000\">\n\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t<object class=\"IBProxyObject\" id=\"841351856\">\n\t\t\t\t<string key=\"IBProxiedObjectIdentifier\">IBFilesOwner</string>\n\t\t\t\t<string key=\"targetRuntimeIdentifier\">IBIPadFramework</string>\n\t\t\t</object>\n\t\t\t<object class=\"IBProxyObject\" id=\"64004946\">\n\t\t\t\t<string key=\"IBProxiedObjectIdentifier\">IBFirstResponder</string>\n\t\t\t\t<string key=\"targetRuntimeIdentifier\">IBIPadFramework</string>\n\t\t\t</object>\n\t\t\t<object class=\"IBUICustomObject\" id=\"664661524\">\n\t\t\t\t<string key=\"targetRuntimeIdentifier\">IBIPadFramework</string>\n\t\t\t</object>\n\t\t\t<object class=\"IBUIWindow\" id=\"380026005\">\n\t\t\t\t<nil key=\"NSNextResponder\"/>\n\t\t\t\t<int key=\"NSvFlags\">1292</int>\n\t\t\t\t<object class=\"NSPSMatrix\" key=\"NSFrameMatrix\"/>\n\t\t\t\t<string key=\"NSFrameSize\">{768, 1024}</string>\n\t\t\t\t<object class=\"NSColor\" key=\"IBUIBackgroundColor\">\n\t\t\t\t\t<int key=\"NSColorSpace\">1</int>\n\t\t\t\t\t<bytes key=\"NSRGB\">MSAxIDEAA</bytes>\n\t\t\t\t</object>\n\t\t\t\t<bool key=\"IBUIOpaque\">NO</bool>\n\t\t\t\t<bool key=\"IBUIClearsContextBeforeDrawing\">NO</bool>\n\t\t\t\t<bool key=\"IBUIMultipleTouchEnabled\">YES</bool>\n\t\t\t\t<string key=\"targetRuntimeIdentifier\">IBIPadFramework</string>\n\t\t\t\t<bool key=\"IBUIVisibleAtLaunch\">YES</bool>\n\t\t\t\t<bool key=\"IBUIResizesToFullScreen\">YES</bool>\n\t\t\t</object>\n\t\t</object>\n\t\t<object class=\"IBObjectContainer\" key=\"IBDocument.Objects\">\n\t\t\t<object class=\"NSMutableArray\" key=\"connectionRecords\">\n\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBCocoaTouchOutletConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">delegate</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"841351856\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"664661524\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">4</int>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBCocoaTouchOutletConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">window</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"664661524\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"380026005\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<int key=\"connectionID\">5</int>\n\t\t\t\t</object>\n\t\t\t</object>\n\t\t\t<object class=\"IBMutableOrderedSet\" key=\"objectRecords\">\n\t\t\t\t<object class=\"NSArray\" key=\"orderedObjects\">\n\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">0</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"0\"/>\n\t\t\t\t\t\t<reference key=\"children\" ref=\"1000\"/>\n\t\t\t\t\t\t<nil key=\"parent\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">2</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"380026005\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"0\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">-1</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"841351856\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"0\"/>\n\t\t\t\t\t\t<string key=\"objectName\">File's Owner</string>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">3</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"664661524\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"0\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<int key=\"objectID\">-2</int>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"64004946\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"0\"/>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t</object>\n\t\t\t<object class=\"NSMutableDictionary\" key=\"flattenedProperties\">\n\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t<object class=\"NSArray\" key=\"dict.sortedKeys\">\n\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t<string>-1.CustomClassName</string>\n\t\t\t\t\t<string>-2.CustomClassName</string>\n\t\t\t\t\t<string>2.IBAttributePlaceholdersKey</string>\n\t\t\t\t\t<string>2.IBEditorWindowLastContentRect</string>\n\t\t\t\t\t<string>2.IBPluginDependency</string>\n\t\t\t\t\t<string>3.CustomClassName</string>\n\t\t\t\t\t<string>3.IBPluginDependency</string>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"NSMutableArray\" key=\"dict.values\">\n\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t<string>UIApplication</string>\n\t\t\t\t\t<string>UIResponder</string>\n\t\t\t\t\t<object class=\"NSMutableDictionary\">\n\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t<reference key=\"dict.sortedKeys\" ref=\"0\"/>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"dict.values\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t</object>\n\t\t\t\t\t<string>{{362, 376}, {320, 480}}</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>\n\t\t\t\t\t<string>SqueakNoOGLIPhoneAppDelegate</string>\n\t\t\t\t\t<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>\n\t\t\t\t</object>\n\t\t\t</object>\n\t\t\t<object class=\"NSMutableDictionary\" key=\"unlocalizedProperties\">\n\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t<reference key=\"dict.sortedKeys\" ref=\"0\"/>\n\t\t\t\t<object class=\"NSMutableArray\" key=\"dict.values\">\n\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t</object>\n\t\t\t</object>\n\t\t\t<nil key=\"activeLocalization\"/>\n\t\t\t<object class=\"NSMutableDictionary\" key=\"localizations\">\n\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t<reference key=\"dict.sortedKeys\" ref=\"0\"/>\n\t\t\t\t<object class=\"NSMutableArray\" key=\"dict.values\">\n\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t</object>\n\t\t\t</object>\n\t\t\t<nil key=\"sourceID\"/>\n\t\t\t<int key=\"maxID\">14</int>\n\t\t</object>\n\t\t<object class=\"IBClassDescriber\" key=\"IBDocument.Classes\">\n\t\t\t<object class=\"NSMutableArray\" key=\"referencedPartialClassDescriptions\">\n\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">SqueakNoOGLIPhoneAppDelegate</string>\n\t\t\t\t\t<string key=\"superclassName\">sqSqueakAppDelegate</string>\n\t\t\t\t\t<object class=\"NSMutableDictionary\" key=\"outlets\">\n\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t<object class=\"NSArray\" key=\"dict.sortedKeys\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<string>mainView</string>\n\t\t\t\t\t\t\t<string>viewController</string>\n\t\t\t\t\t\t\t<string>window</string>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<object class=\"NSMutableArray\" key=\"dict.values\">\n\t\t\t\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t\t\t\t<string>SqueakUIView</string>\n\t\t\t\t\t\t\t<string>SqueakUIController</string>\n\t\t\t\t\t\t\t<string>UIWindow</string>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBProjectSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">platforms/Mac OSObjC/vm/iPhone/Classes/SqueakNoOGLIPhoneAppDelegate.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">SqueakUIController</string>\n\t\t\t\t\t<string key=\"superclassName\">UIViewController</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBProjectSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">platforms/Mac OSObjC/vm/iPhone/Classes/SqueakUIController.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">SqueakUIView</string>\n\t\t\t\t\t<string key=\"superclassName\">UIView</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBProjectSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">platforms/Mac OSObjC/vm/iPhone/Classes/SqueakUIView.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">UIApplication</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBProjectSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">platforms/Mac OSObjC/vm/iPhone/Classes/sqSqueakIPhoneApplication+Network.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">sqSqueakAppDelegate</string>\n\t\t\t\t\t<string key=\"superclassName\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBProjectSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">platforms/Mac OSObjC/vm/Common/Classes/sqSqueakAppDelegate.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t</object>\n\t\t\t<object class=\"NSMutableArray\" key=\"referencedPartialClassDescriptionsV3.2+\">\n\t\t\t\t<bool key=\"EncodedWithXMLCoder\">YES</bool>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSAccessibility.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSApplication.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSApplicationScripting.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSColorPanel.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSControl.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSDictionaryController.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSDragging.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSFontManager.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSFontPanel.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSKeyValueBinding.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSMenu.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSNibLoading.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSOutlineView.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSPasteboard.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSSavePanel.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSTableView.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSToolbarItem.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">AppKit.framework/Headers/NSView.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSArchiver.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSClassDescription.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSError.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSFileManager.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSKeyValueCoding.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSKeyValueObserving.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSKeyedArchiver.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSObject.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSObjectScripting.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSPortCoder.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSRunLoop.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSScriptClassDescription.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSScriptKeyValueCoding.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSScriptObjectSpecifiers.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSScriptWhoseTests.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSThread.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSURL.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSURLConnection.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">Foundation.framework/Headers/NSURLDownload.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">PrintCore.framework/Headers/PDEPluginInterface.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">QuartzCore.framework/Headers/CAAnimation.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">QuartzCore.framework/Headers/CALayer.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBPartialClassDescription\">\n\t\t\t\t\t<string key=\"className\">NSObject</string>\n\t\t\t\t\t<object class=\"IBClassDescriptionSource\" key=\"sourceIdentifier\">\n\t\t\t\t\t\t<string key=\"majorKey\">IBFrameworkSource</string>\n\t\t\t\t\t\t<string key=\"minorKey\">QuartzCore.framework/Headers/CIImageProvider.h</string>\n\t\t\t\t\t</object>\n\t\t\t\t</object>\n\t\t\t</object>\n\t\t</object>\n\t\t<int key=\"IBDocument.localizationMode\">0</int>\n\t\t<string key=\"IBDocument.TargetRuntimeIdentifier\">IBIPadFramework</string>\n\t\t<object class=\"NSMutableDictionary\" key=\"IBDocument.PluginDeclaredDependencies\">\n\t\t\t<string key=\"NS.key.0\">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>\n\t\t\t<integer value=\"512\" key=\"NS.object.0\"/>\n\t\t</object>\n\t\t<object class=\"NSMutableDictionary\" key=\"IBDocument.PluginDeclaredDependencyDefaults\">\n\t\t\t<string key=\"NS.key.0\">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>\n\t\t\t<integer value=\"800\" key=\"NS.object.0\"/>\n\t\t</object>\n\t\t<object class=\"NSMutableDictionary\" key=\"IBDocument.PluginDeclaredDevelopmentDependencies\">\n\t\t\t<string key=\"NS.key.0\">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>\n\t\t\t<integer value=\"3000\" key=\"NS.object.0\"/>\n\t\t</object>\n\t\t<bool key=\"IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion\">YES</bool>\n\t\t<string key=\"IBDocument.LastKnownRelativeProjectPath\">SqueakNoOGLIPhone.xcodeproj</string>\n\t\t<int key=\"IBDocument.defaultPropertyAccessControl\">3</int>\n\t\t<string key=\"IBCocoaTouchPluginVersion\">87</string>\n\t</data>\n</archive>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/RoarVMOnIPad.xcodeproj/johnmci.mode1v3",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>ActivePerspectiveName</key>\n\t<string>Project</string>\n\t<key>AllowedModules</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Groups and Files Outline View</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCTaskListModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Task List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDetailModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>File and Smart Group Detail Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Detailed Build Results Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Batch Find Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Format Conflicts List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXCVSModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Source Code Control Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Breakpoints Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDockableInspector</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Inspector</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXOpenQuicklyModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Open Quickly Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Console</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCSnapshotModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Snapshots Tool</string>\n\t\t</dict>\n\t</array>\n\t<key>BundlePath</key>\n\t<string>/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources</string>\n\t<key>Description</key>\n\t<string>DefaultDescriptionKey</string>\n\t<key>DockingSystemVisible</key>\n\t<false/>\n\t<key>Extension</key>\n\t<string>mode1v3</string>\n\t<key>FavBarConfig</key>\n\t<dict>\n\t\t<key>PBXProjectModuleGUID</key>\n\t\t<string>9424FF4A0DDC8675009912BF</string>\n\t\t<key>XCBarModuleItemNames</key>\n\t\t<dict/>\n\t\t<key>XCBarModuleItems</key>\n\t\t<array/>\n\t</dict>\n\t<key>FirstTimeWindowDisplayed</key>\n\t<false/>\n\t<key>Identifier</key>\n\t<string>com.apple.perspectives.project.mode1v3</string>\n\t<key>MajorVersion</key>\n\t<integer>33</integer>\n\t<key>MinorVersion</key>\n\t<integer>0</integer>\n\t<key>Name</key>\n\t<string>Default</string>\n\t<key>Notifications</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>XCObserverAutoDisconnectKey</key>\n\t\t\t<true/>\n\t\t\t<key>XCObserverDefintionKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusErrorsKey</key>\n\t\t\t\t<integer>0</integer>\n\t\t\t</dict>\n\t\t\t<key>XCObserverFactoryKey</key>\n\t\t\t<string>XCPerspectivesSpecificationIdentifier</string>\n\t\t\t<key>XCObserverGUIDKey</key>\n\t\t\t<string>XCObserverProjectIdentifier</string>\n\t\t\t<key>XCObserverNotificationKey</key>\n\t\t\t<string>PBXStatusBuildStateMessageNotification</string>\n\t\t\t<key>XCObserverTargetKey</key>\n\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t<key>XCObserverTriggerKey</key>\n\t\t\t<string>awakenModuleWithObserver:</string>\n\t\t\t<key>XCObserverValidationKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusErrorsKey</key>\n\t\t\t\t<integer>2</integer>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>XCObserverAutoDisconnectKey</key>\n\t\t\t<true/>\n\t\t\t<key>XCObserverDefintionKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusWarningsKey</key>\n\t\t\t\t<integer>0</integer>\n\t\t\t</dict>\n\t\t\t<key>XCObserverFactoryKey</key>\n\t\t\t<string>XCPerspectivesSpecificationIdentifier</string>\n\t\t\t<key>XCObserverGUIDKey</key>\n\t\t\t<string>XCObserverProjectIdentifier</string>\n\t\t\t<key>XCObserverNotificationKey</key>\n\t\t\t<string>PBXStatusBuildStateMessageNotification</string>\n\t\t\t<key>XCObserverTargetKey</key>\n\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t<key>XCObserverTriggerKey</key>\n\t\t\t<string>awakenModuleWithObserver:</string>\n\t\t\t<key>XCObserverValidationKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusWarningsKey</key>\n\t\t\t\t<integer>2</integer>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>XCObserverAutoDisconnectKey</key>\n\t\t\t<true/>\n\t\t\t<key>XCObserverDefintionKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusAnalyzerResultsKey</key>\n\t\t\t\t<integer>0</integer>\n\t\t\t</dict>\n\t\t\t<key>XCObserverFactoryKey</key>\n\t\t\t<string>XCPerspectivesSpecificationIdentifier</string>\n\t\t\t<key>XCObserverGUIDKey</key>\n\t\t\t<string>XCObserverProjectIdentifier</string>\n\t\t\t<key>XCObserverNotificationKey</key>\n\t\t\t<string>PBXStatusBuildStateMessageNotification</string>\n\t\t\t<key>XCObserverTargetKey</key>\n\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t<key>XCObserverTriggerKey</key>\n\t\t\t<string>awakenModuleWithObserver:</string>\n\t\t\t<key>XCObserverValidationKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusAnalyzerResultsKey</key>\n\t\t\t\t<integer>2</integer>\n\t\t\t</dict>\n\t\t</dict>\n\t</array>\n\t<key>OpenEditors</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>Content</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t<string>946720301261864D00F97C81</string>\n\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t<string>SqueakPureObjc-Info.plist</string>\n\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>946720311261864D00F97C81</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>SqueakPureObjc-Info.plist</string>\n\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t<string>946720321261864D00F97C81</string>\n\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>94672008126185F600F97C81</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t<string>1</string>\n\t\t\t\t</dict>\n\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t<true/>\n\t\t\t</dict>\n\t\t\t<key>Geometry</key>\n\t\t\t<dict>\n\t\t\t\t<key>Frame</key>\n\t\t\t\t<string>{{0, 20}, {1346, 877}}</string>\n\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t<false/>\n\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t<string>334 110 1346 918 0 0 1680 1028 </string>\n\t\t\t</dict>\n\t\t</dict>\n\t</array>\n\t<key>PerspectiveWidths</key>\n\t<array>\n\t\t<integer>-1</integer>\n\t\t<integer>-1</integer>\n\t</array>\n\t<key>Perspectives</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>ChosenToolbarItems</key>\n\t\t\t<array>\n\t\t\t\t<string>active-combo-popup</string>\n\t\t\t\t<string>action</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>debugger-enable-breakpoints</string>\n\t\t\t\t<string>build-and-go</string>\n\t\t\t\t<string>com.apple.ide.PBXToolbarStopButton</string>\n\t\t\t\t<string>get-info</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>com.apple.pbx.toolbar.searchfield</string>\n\t\t\t</array>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProjectWithEditor</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.project</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t<real>421</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>SCMStatusColumn</string>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>29B97314FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>9412CAB20E6C037B00DB8625</string>\n\t\t\t\t\t\t\t\t<string>29B97315FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>9424FF570DDCB17F009912BF</string>\n\t\t\t\t\t\t\t\t<string>94BCE77E0DDDF61200F38F31</string>\n\t\t\t\t\t\t\t\t<string>94BCE77F0DDDF61200F38F31</string>\n\t\t\t\t\t\t\t\t<string>94883B3F0E0C2B9C005A4738</string>\n\t\t\t\t\t\t\t\t<string>94BCE7840DDDF61200F38F31</string>\n\t\t\t\t\t\t\t\t<string>94BCE6880DDDECC200F38F31</string>\n\t\t\t\t\t\t\t\t<string>9424FF580DDCB18C009912BF</string>\n\t\t\t\t\t\t\t\t<string>9424FF590DDCB198009912BF</string>\n\t\t\t\t\t\t\t\t<string>947E642610AA0E1100D3B69E</string>\n\t\t\t\t\t\t\t\t<string>94C4B82C10C06F0D00CD4F90</string>\n\t\t\t\t\t\t\t\t<string>943B9C9D1235C5120056205E</string>\n\t\t\t\t\t\t\t\t<string>947E647610AA0FF200D3B69E</string>\n\t\t\t\t\t\t\t\t<string>9452D5EF0E044AC2000AD792</string>\n\t\t\t\t\t\t\t\t<string>9452D5F00E044AD1000AD792</string>\n\t\t\t\t\t\t\t\t<string>9424FF5A0DDCB19F009912BF</string>\n\t\t\t\t\t\t\t\t<string>94BCE6640DDDEB5000F38F31</string>\n\t\t\t\t\t\t\t\t<string>94BCE6650DDDEB5000F38F31</string>\n\t\t\t\t\t\t\t\t<string>080E96DDFE201D6D7F000001</string>\n\t\t\t\t\t\t\t\t<string>94E658DC0DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94E658DF0DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94E658E20DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94210B270E956AC200C1A314</string>\n\t\t\t\t\t\t\t\t<string>94E6590F0DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>29B97317FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>947E64DC10AA18FE00D3B69E</string>\n\t\t\t\t\t\t\t\t<string>29B97323FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>19C28FACFE9D520D11CA2CBB</string>\n\t\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {443, 917}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {460, 935}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>SCMStatusColumn</string>\n\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>421</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>117 49 1383 976 0 0 1680 1028 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>460pt</string>\n\t\t\t\t</dict>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Info-iPhone.plist</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CE0B20406471E060097A5F4</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>Info-iPhone.plist</string>\n\t\t\t\t\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t\t\t\t\t<string>9467202F1261864D00F97C81</string>\n\t\t\t\t\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>94BCE7390DDDEF8200F38F31</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94547F160DE0AC7D00DD588F</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>945481A60DE2A79200DD588F</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94B1514E0DE2CE530059F208</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>945E9D7C0DE525E100CDF01E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F8E42E0DE6129D003F4F53</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E297D10DECA72F009CF73A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E297D30DECA72F009CF73A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E297D50DECA72F009CF73A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E297D70DECA72F009CF73A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94554E670DF1171500FB176B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94554E690DF1171500FB176B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94554EB80DF1A86A00FB176B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F5C1870DF26EF200099B11</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F5C25F0DF42C7600099B11</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F5C2600DF42C7600099B11</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94AB2E6A0E003879006A79E4</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94AB2E6C0E003879006A79E4</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>945F30FC0E0C763800CFF3DC</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>948704AE0E12CABF00D565C3</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>948704B20E12CABF00D565C3</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9487071F0E132B1000D565C3</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94ED7EFA0E6C2ABE00F4DD03</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94B88C560E81500200C98131</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F155570E83EA1F001657CE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F155580E83EA1F001657CE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947332EE0EA70E8C003F9084</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>942B77330EA7E642004B266D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>942B77380EA7E642004B266D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>942B779B0EA7F2E0004B266D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>942B779C0EA7F2E0004B266D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>942B77B90EA800E1004B266D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>942B77BB0EA800E1004B266D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94638CEA0EB16F1100A3F155</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947E210C0EB28486007957D0</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9471E48A0EB6C393000AE79D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94476EC40EBFAB320095D6D7</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9478E13D0EC8EB46007096A7</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E2DAD40ED2351B00012E92</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E2DB270ED2355F00012E92</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>946D973B0FE165B70038846B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9421AB550FF1807D008F54E9</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947E61D610AA049300D3B69E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947E61DA10AA049300D3B69E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947E61DC10AA049300D3B69E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947E644910AA0F2C00D3B69E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947E644B10AA0F2C00D3B69E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947E645010AA0F2C00D3B69E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>942ABEC510AA34820086D908</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94BCAD4A10AB981B00F87527</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94BCAE9010ACA3A300F87527</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94BCAFC710ACC89100F87527</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C887D410ADCC0D007CB39E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C888B710ADE75B007CB39E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C88B6810AF26F8007CB39E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C2074310AF5FB7002F4160</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C2091210AF7413002F4160</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C2092A10AF769A002F4160</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C2092D10AF769A002F4160</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C367C010AF9C0A0041953A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C367C210AF9C0A0041953A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C367D110AF9C830041953A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C3696410AFB7550041953A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C3698D10B082DF0041953A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C3699110B082DF0041953A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9484F86210B0DCC60038BDC0</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9484F86510B0DCC60038BDC0</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9484F8FC10B0E1770038BDC0</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9484F9CE10B13E1C0038BDC0</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94CA691410B1CAD8007F207C</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9456C24F10B2F268000BF3DE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9456C25A10B2F2C9000BF3DE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9456C32210B32F43000BF3DE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9456C34E10B33618000BF3DE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9456C3CB10B341F9000BF3DE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F89AFE10B4997900556475</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F89BDE10B4B77400556475</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F89BE010B4B77400556475</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F89C9110B4C0B800556475</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73E5210B5B9CE00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73E5410B5B9CE00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73E5610B5B9CE00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73E5810B5B9CE00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73E5A10B5B9CE00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73E5C10B5B9CE00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73E5E10B5B9CE00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73E6010B5B9CE00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73E6210B5B9CE00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73E6410B5B9CE00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73E6810B5B9CE00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73E6A10B5B9CE00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73EE610B5CF8400F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73F4910B5DA4E00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73FA010B5E5A200F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73FAD10B5E69900F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73FB510B5E6DA00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D7401510B5F8AF00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D7403810B5FDDB00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D7403A10B5FDDB00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D7403C10B5FDDB00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D740B210B6242000F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9406E7E210B663F4002F81F2</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9406E87110B66A74002F81F2</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9406E8CC10B67499002F81F2</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D715CB10B723B200F69A71</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D7174110B72FDF00F69A71</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D7177D10B73A3800F69A71</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D7178410B73A3800F69A71</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D7178610B73A3800F69A71</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D7178810B73A3800F69A71</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D7178A10B73A3800F69A71</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D7178C10B73A3800F69A71</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D7179110B73A3800F69A71</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D717BE10B73DD900F69A71</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D717F810B743B800F69A71</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D7183810B74BF300F69A71</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D7183A10B74BF300F69A71</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94A1B2AA10B9E92A00C64473</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94A1B41E10BA05E600C64473</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94862F8310BA182500CAA2EB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94862F9E10BA1A0100CAA2EB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9486302A10BA247200CAA2EB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9492450510BA42EF00E726F5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9492450710BA42EF00E726F5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9492450910BA42EF00E726F5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>949245B210BA4A6200E726F5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>945C4D7C10BB0A8500548CC1</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>945C4EAC10BB348300548CC1</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9428BBAD10BB50E200DAD287</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9428BC5510BB74BF00DAD287</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9428BC5710BB74BF00DAD287</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9428BF3810BBC2ED00DAD287</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9428BF4F10BBCAAC00DAD287</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9473A34810BBD84100ED7D00</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F5F29110BC518B00847EEE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F5F29210BC518B00847EEE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F5F29410BC518B00847EEE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F5F29510BC518B00847EEE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F5F2A810BC539700847EEE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>941441FD10BC817D0088F8AC</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9414420110BC817D0088F8AC</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9414425110BC8A620088F8AC</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>949198B010BC8DFC00C629D1</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>949198C910BC8FBB00C629D1</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D16BFC10BCEFEE00A69A89</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D16BFE10BCEFEE00A69A89</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D16C2A10BCF28A00A69A89</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D16C4010BCF3E100A69A89</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D16CA310BCF93000A69A89</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9430325510BD0B6D0045D33B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9430329A10BD103B0045D33B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9430329B10BD103B0045D33B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E4930310BD32D00011AC75</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94CFE4AF10BE3CA600847DF5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94CFE6A910BE63A900847DF5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94CFE6B810BE63A900847DF5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94CFE6B910BE63A900847DF5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94CFE6C010BE63A900847DF5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94CFE70110BE683800847DF5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9475F4DB10BEF4100047A24B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9475F56B10BF20A00047A24B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9475F5A710BF25A10047A24B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E583DB10BF43970073FD63</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E584AE10BF6EE30073FD63</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E584FF10BF79AB0073FD63</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E5850010BF79AB0073FD63</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>948FAA0310BF855500BE88CF</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>948FAB5B10BFAD3C00BE88CF</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C4B83610C0708F00CD4F90</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>946DA7E010C0A7A400F26F56</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>946DA8D910C0C32800F26F56</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>946DA8DA10C0C32800F26F56</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>946DA8DB10C0C32800F26F56</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>946DAA3810C0D8B700F26F56</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>946DAA3A10C0D8B700F26F56</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>946DAA3C10C0D8B700F26F56</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>946DAB5110C0F2B000F26F56</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947713D410C45E5F00890A9B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94B7898910C4F95E005EA70D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9487755C10C64FF100E4AEC5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9487755D10C64FF100E4AEC5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9402DDB610CE12A5005C2102</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D3660B10CEE03900805023</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94B954A010E6D0F700DC476A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9493E98F10EE90BC000C4FB3</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9448940B10F3E8FF00FB3EC8</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947923FE1102BE53007C87F8</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947924171102E275007C87F8</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9473A95A1102F70B00D135CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9473A9701103BE0A00D135CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>948C0820112DE98D0017EE7F</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E8EEEA11C94D5D0049D853</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>949DDD6D11D141080017F79B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E745ED11E5346100E90B3A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E745EF11E5346100E90B3A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E746D011E539AF00E90B3A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>949AD25011E5469C006D6BF4</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94EF6D6D11E55E31003BA64D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C3AC3E11E6C9D000DBE1E9</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F1F6B111EB8E14004B3AE3</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D051D3120CE2D40039F8B7</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9483EAFB121C60C70070C43B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94669D8C1225EF670062028C</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>940CA58B1226E9B2008BF48A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94329B3E122729BA0090298B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94329B3F122729BA0090298B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94329B40122729BA0090298B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94329B5412272A0C0090298B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94329D6412274F350090298B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94329D6612274F350090298B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94329D6812274F350090298B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94329D6A12274F350090298B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94329E0E12275AC30090298B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94329E0F12275AC30090298B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94329FEA122765A60090298B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>941DE8041227A7600027D899</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>941DE8061227A7600027D899</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94A3ED241228213E00DF449D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94A3ED251228213E00DF449D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94A3ED261228213E00DF449D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94A3ED891228429500DF449D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D12BE412289C66006B7504</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>940C29221228BDC80009E415</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947E96231228DB0D0065B3BA</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947E96251228DB0D0065B3BA</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>944EB0211228E96100EF9C64</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>940590F1122AF9ED009939CE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>940590F3122AF9ED009939CE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94B6A65D122C6E760069D952</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94A3D790122CB56400DCE9B4</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>943B9D191235C5FE0056205E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E7F9A912375A9600A03A11</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E7F9AA12375A9600A03A11</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E7F9AB12375A9600A03A11</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E99F3412378CD30048557C</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E99F8012378DAB0048557C</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E9A007123790840048557C</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E9A00B123790840048557C</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E9A19812381F180048557C</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E9A1CB123833B00048557C</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94077C1E1238400500B9AC1E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>940BE5991239F2BF00674A11</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9439F48C123ABD080003F15C</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9431CA91123B509800C97383</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9431CB57123B5AF100C97383</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9431CBD2123B5F9900C97383</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94FB0AA7123B63D200026016</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94FB0B55123B6A8300026016</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94FB0B57123B6A8300026016</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94FB0B59123B6A8300026016</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94FB0B5B123B6A8300026016</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94FB0B5D123B6A8300026016</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>948DB86B123B76F40002F636</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94607E0E123B7A8C008BA756</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>942F452E123BF48A002B05DF</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>942F4564123BF600002B05DF</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>942F4752123C09BF002B05DF</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C16BCB123D78C200A8622A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C16BD5123D7C9300A8622A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94BE8B2C123D943800C89FDD</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94CAA52E123DCAB700651F54</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94CAA5D8123DDCFE00651F54</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94CAA648123DE2EF00651F54</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9489E678123E0AA300ECCD51</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9489E68F123E0D7900ECCD51</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94993996123E2D34005260E4</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C8D074123EC12D0019544B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C8D0AF123EC4A90019544B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C8D26B123EEE2E0019544B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94269EA0123EF54A00CB5A57</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94269F10123EF9E800CB5A57</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9426A1E7123EFEDA00CB5A57</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9426A1F8123F006800CB5A57</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9426A208123F017D00CB5A57</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9426A209123F017D00CB5A57</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9426A228123F01C000CB5A57</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9451E5AE123F051700B4119F</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9451E5C5123F062B00B4119F</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9451E5D5123F07C100B4119F</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94FF88971240458F00B1021A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94FF88981240458F00B1021A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94FF88991240458F00B1021A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>944B0D451248105F00CA74EA</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>944B0D461248105F00CA74EA</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>949CDD0612496F030034C107</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>949CDD0712496F030034C107</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>949CDD0812496F030034C107</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947CB8991249932E00131713</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947CB8B81249949B00131713</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9472586B1254FECD00A8DE45</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9472586C1254FECD00A8DE45</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>941C7389125BE0BC00CF8153</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>941C738A125BE0BC00CF8153</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>941C738B125BE0BC00CF8153</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>941C738C125BE0BC00CF8153</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>941C738D125BE0BC00CF8153</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>941C738E125BE0BC00CF8153</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>941C738F125BE0BC00CF8153</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>941C7390125BE0BC00CF8153</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>941C7391125BE0BC00CF8153</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94CAC151125FBC1400CF9255</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94671FFD12617CFE00F97C81</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>946720241261864D00F97C81</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>946720251261864D00F97C81</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>946720271261864D00F97C81</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>946720291261864D00F97C81</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9467202B1261864D00F97C81</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9467202C1261864D00F97C81</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9467202D1261864D00F97C81</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9467202E1261864D00F97C81</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {918, 708}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>117 49 1383 976 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>708pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 713}, {918, 222}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>117 49 1383 976 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>222pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>918pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>9467200012617CFE00F97C81</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>9467200112617CFE00F97C81</string>\n\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfigUserDefaultsMinorVersion</key>\n\t\t\t<string>2</string>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.defaultV3</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProject</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.morph</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>29B97314FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 337}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 355}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>373 269 690 397 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Morph</string>\n\t\t\t<key>PreferredWidth</key>\n\t\t\t<integer>300</integer>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default.shortV3</string>\n\t\t</dict>\n\t</array>\n\t<key>PerspectivesBarVisible</key>\n\t<false/>\n\t<key>ShelfIsVisible</key>\n\t<false/>\n\t<key>SourceDescription</key>\n\t<string>file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string>\n\t<key>StatusbarIsVisible</key>\n\t<true/>\n\t<key>TimeStamp</key>\n\t<real>308381261.54535502</real>\n\t<key>ToolbarDisplayMode</key>\n\t<integer>1</integer>\n\t<key>ToolbarIsVisible</key>\n\t<true/>\n\t<key>ToolbarSizeMode</key>\n\t<integer>2</integer>\n\t<key>Type</key>\n\t<string>Perspectives</string>\n\t<key>UpdateMessage</key>\n\t<string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the \"Metro-Morph\" feature).  You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature.  Do you wish to update to the latest Workspace defaults for project '%@'?</string>\n\t<key>WindowJustification</key>\n\t<integer>5</integer>\n\t<key>WindowOrderList</key>\n\t<array>\n\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t<string>9424FF6E0DDCB226009912BF</string>\n\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t<string>946720301261864D00F97C81</string>\n\t\t<string>/Users/johnmci/Documents/Squeak3.8.0/platforms/iOS/vm/SqueakPureObjc.xcodeproj</string>\n\t</array>\n\t<key>WindowString</key>\n\t<string>117 49 1383 976 0 0 1680 1028 </string>\n\t<key>WindowToolsV3</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.build</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string></string>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1366, 463}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>51 60 1366 968 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>463pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Build Results</string>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Collapse</key>\n\t\t\t\t\t\t\t\t<integer>1021</integer>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Open</key>\n\t\t\t\t\t\t\t\t<integer>1013</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 468}, {1366, 459}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>51 60 1366 968 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>459pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>927pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Build Results</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>9424FF6E0DDCB226009912BF</string>\n\t\t\t\t<string>9467200212617CFE00F97C81</string>\n\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.buildV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>51 60 1366 968 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>9424FF6E0DDCB226009912BF</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugger</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Debugger</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {544, 394}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{544, 0}, {764, 394}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {1308, 394}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 394}, {1308, 528}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debug - GLUTExamples (Underwater)</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>DebugConsoleVisible</key>\n\t\t\t\t\t\t\t\t<string>None</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>DebugSTDIOWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1308, 922}}</string>\n\t\t\t\t\t\t\t\t<key>PBXDebugSessionStackFrameViewKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>DebugVariablesTableConfiguration</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>Name</string>\n\t\t\t\t\t\t\t\t\t\t<real>262</real>\n\t\t\t\t\t\t\t\t\t\t<string>Value</string>\n\t\t\t\t\t\t\t\t\t\t<real>191</real>\n\t\t\t\t\t\t\t\t\t\t<string>Summary</string>\n\t\t\t\t\t\t\t\t\t\t<real>286</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t<string>{{544, 0}, {764, 394}}</string>\n\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t<string>499 65 1308 963 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>499 65 1308 963 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>922pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>922pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t\t<string>946720331261864D00F97C81</string>\n\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t<string>946720341261864D00F97C81</string>\n\t\t\t\t<string>946720351261864D00F97C81</string>\n\t\t\t\t<string>946720361261864D00F97C81</string>\n\t\t\t\t<string>946720371261864D00F97C81</string>\n\t\t\t\t<string>946720381261864D00F97C81</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>499 65 1308 963 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.find</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>sqSqueakOSXApplication.m</string>\n\t\t\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {1417, 604}}</string>\n\t\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t\t<string>-29 -234 1417 1024 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t\t\t<string>1417pt</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>604pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Project Find</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 609}, {1417, 374}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>-29 -234 1417 1024 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>374pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>983pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Find</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t\t<string>9467200312617CFE00F97C81</string>\n\t\t\t\t<string>9467200412617CFE00F97C81</string>\n\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>-29 -234 1417 1024 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>MENUSEPARATOR</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debuggerConsole</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debugger Console</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1273, 856}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>105 93 1273 897 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>856pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>856pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger Console</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t\t<string>947CB8B1124993E000131713</string>\n\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.consoleV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>105 93 1273 897 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.snapshots</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>945480600DE1484B00DD588F</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Snapshots</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1593, 926}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>-19 61 1593 967 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCSnapshotModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>926pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>926pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Snapshots</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCSnapshotModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>945480610DE1484B00DD588F</string>\n\t\t\t\t<string>94F7102110C332830095BDD8</string>\n\t\t\t\t<string>945480600DE1484B00DD588F</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.snapshots</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>-19 61 1593 967 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>945480610DE1484B00DD588F</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.scm</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>sqSqueakOSXApplication.m</string>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1582, 220}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>98 4 1582 1024 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>220pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXCVSModuleFilterTypeKey</key>\n\t\t\t\t\t\t\t\t<integer>1031</integer>\n\t\t\t\t\t\t\t\t<key>PBXCVSModuleTreeModuleColumnData</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXCVSModuleTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<real>1000</real>\n\t\t\t\t\t\t\t\t\t\t<real>56</real>\n\t\t\t\t\t\t\t\t\t\t<real>63</real>\n\t\t\t\t\t\t\t\t\t\t<real>60</real>\n\t\t\t\t\t\t\t\t\t\t<real>63</real>\n\t\t\t\t\t\t\t\t\t\t<real>139</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXCVSModuleTreeModuleColumnsKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>Name</string>\n\t\t\t\t\t\t\t\t\t\t<string>Status</string>\n\t\t\t\t\t\t\t\t\t\t<string>Update</string>\n\t\t\t\t\t\t\t\t\t\t<string>Revision</string>\n\t\t\t\t\t\t\t\t\t\t<string>Author</string>\n\t\t\t\t\t\t\t\t\t\t<string>Date</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>SCM Results</string>\n\t\t\t\t\t\t\t\t<key>SCMActivityViewerShowingDefaultKey</key>\n\t\t\t\t\t\t\t\t<string>{{0, 652}, {1582, 106}}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 225}, {1582, 758}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>98 4 1582 1024 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>758pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>983pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>SCM</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>9488792B0E0F2F8000555242</string>\n\t\t\t\t<string>947CB89E1249932E00131713</string>\n\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.scm</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>98 4 1582 1024 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>9488792B0E0F2F8000555242</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.breakpoints</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t\t\t<string>no</string>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<real>275</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t\t\t<string>1C3E0DCA080725EA00A55177</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {275, 829}}</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t\t\t<false/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {292, 847}}</string>\n\t\t\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t<real>275</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>7 60 1661 888 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>292pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{297, 0}, {1364, 847}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>7 60 1661 888 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>1364pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>847pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>MajorVersion</key>\n\t\t\t<integer>3</integer>\n\t\t\t<key>MinorVersion</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Name</key>\n\t\t\t<string>Breakpoints</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>949FAC8E116406F800A106F0</string>\n\t\t\t\t<string>949FAC8F116406F800A106F0</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.breakpointsV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>7 60 1661 888 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>949FAC8E116406F800A106F0</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugAnimator</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Visualizer</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugAnimatorV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>100 100 700 500 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.bookmarks</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>538 42 401 187 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.projectFormatConflicts</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Format Conflicts</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowContentMinSize</key>\n\t\t\t<string>450 300</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>50 850 472 307 0 0 1440 877</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.classBrowser</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>OptionsSetName</key>\n\t\t\t\t\t\t\t\t<string>Hierarchy, project classes</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Class Browser - sqSqueakIPhoneApplication</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ClassesFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {870, 155}}</string>\n\t\t\t\t\t\t\t\t<key>ClassesTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXClassNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>208</real>\n\t\t\t\t\t\t\t\t\t<string>PBXClassBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1122, 883}}</string>\n\t\t\t\t\t\t\t\t<key>MembersFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 160}, {870, 723}}</string>\n\t\t\t\t\t\t\t\t<key>MembersTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeIconColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>216</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>593</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>28 117 1122 903 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>883pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>883pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<false/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t\t<string>94269F3A123EFC1B00CB5A57</string>\n\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.classbrowser</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>28 117 1122 903 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.refactoring</string>\n\t\t\t<key>IncludeInToolsMenu</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>949E5F260DE3F297007388E0</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1293, 860}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>268 92 1293 901 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t\t<key>XCRefactoringSplitViewLowerHeight</key>\n\t\t\t\t\t\t\t\t<real>394</real>\n\t\t\t\t\t\t\t\t<key>XCRefactoringSplitViewTotalHeight</key>\n\t\t\t\t\t\t\t\t<real>800</real>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCRefactoringModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>860pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>860pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Refactoring</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCRefactoringModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>949E5F270DE3F297007388E0</string>\n\t\t\t\t<string>941C7371125BE08800CF8153</string>\n\t\t\t\t<string>949E5F260DE3F297007388E0</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>268 92 1293 901 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>949E5F270DE3F297007388E0</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/RoarVMOnIPad.xcodeproj/johnmci.pbxuser",
    "content": "// !$*UTF8*$!\n{\n\t1D3623240D0F684500981E51 /* SqueakNoOGLIPhoneAppDelegate.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1118, 880}}\";\n\t\t\tsepNavSelRange = \"{3090, 0}\";\n\t\t\tsepNavVisRange = \"{0, 3388}\";\n\t\t\tsepNavWindowFrame = \"{{15, 15}, {694, 1008}}\";\n\t\t};\n\t};\n\t1D3623250D0F684500981E51 /* SqueakNoOGLIPhoneAppDelegate.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {943, 3471}}\";\n\t\t\tsepNavSelRange = \"{2481, 8}\";\n\t\t\tsepNavVisRange = \"{1560, 2001}\";\n\t\t\tsepNavWindowFrame = \"{{254, 4}, {1426, 1019}}\";\n\t\t};\n\t};\n\t1D6058900D05DD3D006BFB54 /* SqueakNoOGLIPhone */ = {\n\t\tactiveExec = 0;\n\t\texecutables = (\n\t\t\t9424FF3E0DDC8654009912BF /* Squeak */,\n\t\t);\n\t};\n\t29B97313FDCFA39411CA2CEA /* Project object */ = {\n\t\tactiveArchitecturePreference = armv6;\n\t\tactiveBuildConfigurationName = Debug;\n\t\tactiveExecutable = 947E62FD10AA098300D3B69E /* SqueakPureObjc */;\n\t\tactiveSDKPreference = macosx10.5;\n\t\tactiveTarget = 947E626F10AA098300D3B69E /* SqueakPureObjc */;\n\t\taddToTargets = (\n\t\t\t1D6058900D05DD3D006BFB54 /* SqueakNoOGLIPhone */,\n\t\t);\n\t\tbreakpoints = (\n\t\t\t94D7181B10B74A2500F69A71 /* sqSqueakOSXNSView.m:488 */,\n\t\t\t94D7181D10B74A2600F69A71 /* sqSqueakOSXNSView.m:484 */,\n\t\t\t94D7182310B74A2900F69A71 /* sqSqueakOSXNSView.m:472 */,\n\t\t\t94D7182910B74A4A00F69A71 /* sqSqueakOSXNSView.m:460 */,\n\t\t\t94D7182D10B74A4E00F69A71 /* sqSqueakOSXNSView.m:468 */,\n\t\t\t94D7183310B74BD100F69A71 /* sqSqueakOSXNSView.m:500 */,\n\t\t\t94A1B1B810B9C1A800C64473 /* sqMacUIEventsUniversal.c:1429 */,\n\t\t\t945C4E6310BB29B500548CC1 /* sqSqueakFileDirectoryInterface.m:118 */,\n\t\t\t945C4E8010BB2CE000548CC1 /* sqSqueakFileDirectoryInterface.m:102 */,\n\t\t\t9428BC5C10BB760200DAD287 /* sqSqueakOSXApplication+clipboard.m:59 */,\n\t\t\t9428BCDC10BB937100DAD287 /* sqSqueakFileDirectoryInterface.m:218 */,\n\t\t\t9428BD7010BBA1DC00DAD287 /* sqSqueakFileDirectoryInterface.m:179 */,\n\t\t\t9428BD7710BBA26000DAD287 /* sqSqueakFileDirectoryInterface.m:204 */,\n\t\t\t94F5F28710BC517200847EEE /* sqSqueakOSXNSView.m:455 */,\n\t\t\t94F5F28B10BC517500847EEE /* sqSqueakOSXNSView.m:476 */,\n\t\t\t94F5F28D10BC517700847EEE /* sqSqueakOSXNSView.m:480 */,\n\t\t\t946DA99210C0CE1900F26F56 /* sqSqueakOSXDropAPI.m:79 */,\n\t\t\t946DAB1210C0F00400F26F56 /* sqMacUnixExternalPrims.m:219 */,\n\t\t\t9476030E10C375C300B621C9 /* sqSqueakOSXApplication.m:259 */,\n\t\t\t9476031010C375C600B621C9 /* sqSqueakOSXApplication.m:264 */,\n\t\t\t947713B610C45C0A00890A9B /* Queue.m:117 */,\n\t\t\t9458511410F03996001401E7 /* sqMacExtendedClipboard.m:101 */,\n\t\t\t9458523210F040A0001401E7 /* sqMacExtendedClipboard.m:37 */,\n\t\t\t9458523410F040A1001401E7 /* sqMacExtendedClipboard.m:45 */,\n\t\t\t9458523610F040A2001401E7 /* sqMacExtendedClipboard.m:50 */,\n\t\t\t9458523A10F040AF001401E7 /* sqMacExtendedClipboard.m:72 */,\n\t\t\t9458524810F04272001401E7 /* sqMacExtendedClipboard.m:88 */,\n\t\t\t9458527F10F045FB001401E7 /* sqSqueakIPhoneClipboardAPI.m:31 */,\n\t\t\t9458528110F045FC001401E7 /* sqSqueakIPhoneClipboardAPI.m:24 */,\n\t\t\t9458528310F045FD001401E7 /* sqSqueakIPhoneClipboardAPI.m:17 */,\n\t\t\t9496D5CD10FAFA29007762DE /* sqSqueakOSXNSView.m:375 */,\n\t\t\t940CD113110E3E6500A9344A /* sqSqueakOSXDropAPI.m:53 */,\n\t\t\t94C0D1AC112D5DAE00213581 /* sqSqueakScreenAPI.m:79 */,\n\t\t\t941C24EF1198BBE3008BF398 /* sqSqueakScreenAndWindow.m:96 */,\n\t\t\t947CB8D01249955E00131713 /* sqSqueakFileDirectoryInterface.m:150 */,\n\t\t);\n\t\tcodeSenseManager = 9424FF430DDC8673009912BF /* Code sense */;\n\t\texecutables = (\n\t\t\t9424FF3E0DDC8654009912BF /* Squeak */,\n\t\t\t947E62FD10AA098300D3B69E /* SqueakPureObjc */,\n\t\t\t948774A910C64DD800E4AEC5 /* SqueakPureObjc64*64 */,\n\t\t);\n\t\texpressions = (\n\t\t\tpluginExports,\n\t\t);\n\t\tignoreBreakpointsInProjectsDict = {\n\t\t\tSqueakVMUNIXPATHS = Ignored;\n\t\t};\n\t\tperUserDictionary = {\n\t\t\t\"PBXConfiguration.PBXBreakpointsDataSource.v1:1CA1AED706398EBD00589147\" = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXBreakpointsDataSource_LocationID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t20,\n\t\t\t\t\t401,\n\t\t\t\t\t20,\n\t\t\t\t\t301,\n\t\t\t\t\t301,\n\t\t\t\t\t232,\n\t\t\t\t\t20,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXBreakpointsDataSource_ActionID,\n\t\t\t\t\tPBXBreakpointsDataSource_TypeID,\n\t\t\t\t\tPBXBreakpointsDataSource_BreakpointID,\n\t\t\t\t\tPBXBreakpointsDataSource_UseID,\n\t\t\t\t\tPBXBreakpointsDataSource_LocationID,\n\t\t\t\t\tPBXBreakpointsDataSource_ConditionID,\n\t\t\t\t\tPBXBreakpointsDataSource_IgnoreCountID,\n\t\t\t\t\tPBXBreakpointsDataSource_ContinueID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXBookmarksDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXBookmarksDataSource_NameID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t200,\n\t\t\t\t\t200,\n\t\t\t\t\t481,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXBookmarksDataSource_LocationID,\n\t\t\t\t\tPBXBookmarksDataSource_NameID,\n\t\t\t\t\tPBXBookmarksDataSource_CommentsID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXErrorsWarningsDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXErrorsWarningsDataSource_LocationID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t300,\n\t\t\t\t\t734,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXErrorsWarningsDataSource_TypeID,\n\t\t\t\t\tPBXErrorsWarningsDataSource_MessageID,\n\t\t\t\t\tPBXErrorsWarningsDataSource_LocationID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXExecutablesDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXExecutablesDataSource_NameID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t22,\n\t\t\t\t\t300,\n\t\t\t\t\t737,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXExecutablesDataSource_ActiveFlagID,\n\t\t\t\t\tPBXExecutablesDataSource_NameID,\n\t\t\t\t\tPBXExecutablesDataSource_CommentsID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t679,\n\t\t\t\t\t20,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t\t20,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Target_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXFindDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFindDataSource_LocationID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t200,\n\t\t\t\t\t574,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFindDataSource_MessageID,\n\t\t\t\t\tPBXFindDataSource_LocationID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXSymbolsDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXSymbolsDataSource_SymbolTypeIconID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t16,\n\t\t\t\t\t200,\n\t\t\t\t\t50,\n\t\t\t\t\t534.20849609375,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXSymbolsDataSource_SymbolTypeIconID,\n\t\t\t\t\tPBXSymbolsDataSource_SymbolNameID,\n\t\t\t\t\tPBXSymbolsDataSource_SymbolTypeID,\n\t\t\t\t\tPBXSymbolsDataSource_ReferenceNameID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.XCSCMDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t20,\n\t\t\t\t\t839,\n\t\t\t\t\t20,\n\t\t\t\t\t48.16259765625,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t\t20,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_SCM_ColumnID,\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Target_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t725,\n\t\t\t\t\t60,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXTargetDataSource_PrimaryAttribute,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXPerProjectTemplateStateSaveDate = 308378853;\n\t\t\tPBXWorkspaceStateSaveDate = 308378853;\n\t\t};\n\t\tperUserProjectItems = {\n\t\t\t9402DDB610CE12A5005C2102 /* PBXTextBookmark */ = 9402DDB610CE12A5005C2102 /* PBXTextBookmark */;\n\t\t\t940590F1122AF9ED009939CE /* PBXTextBookmark */ = 940590F1122AF9ED009939CE /* PBXTextBookmark */;\n\t\t\t940590F3122AF9ED009939CE /* PBXTextBookmark */ = 940590F3122AF9ED009939CE /* PBXTextBookmark */;\n\t\t\t9406E7E210B663F4002F81F2 /* PBXTextBookmark */ = 9406E7E210B663F4002F81F2 /* PBXTextBookmark */;\n\t\t\t9406E87110B66A74002F81F2 /* PBXTextBookmark */ = 9406E87110B66A74002F81F2 /* PBXTextBookmark */;\n\t\t\t9406E8CC10B67499002F81F2 /* PBXTextBookmark */ = 9406E8CC10B67499002F81F2 /* PBXTextBookmark */;\n\t\t\t94077C1E1238400500B9AC1E /* PBXTextBookmark */ = 94077C1E1238400500B9AC1E /* PBXTextBookmark */;\n\t\t\t940BE5991239F2BF00674A11 /* PBXTextBookmark */ = 940BE5991239F2BF00674A11 /* PBXTextBookmark */;\n\t\t\t940C29221228BDC80009E415 /* PBXTextBookmark */ = 940C29221228BDC80009E415 /* PBXTextBookmark */;\n\t\t\t940CA58B1226E9B2008BF48A /* PBXTextBookmark */ = 940CA58B1226E9B2008BF48A /* PBXTextBookmark */;\n\t\t\t941441FD10BC817D0088F8AC /* PBXTextBookmark */ = 941441FD10BC817D0088F8AC /* PBXTextBookmark */;\n\t\t\t9414420110BC817D0088F8AC /* PBXTextBookmark */ = 9414420110BC817D0088F8AC /* PBXTextBookmark */;\n\t\t\t9414425110BC8A620088F8AC /* PBXBookmark */ = 9414425110BC8A620088F8AC /* PBXBookmark */;\n\t\t\t941C7389125BE0BC00CF8153 /* PBXTextBookmark */ = 941C7389125BE0BC00CF8153 /* PBXTextBookmark */;\n\t\t\t941C738A125BE0BC00CF8153 /* PBXTextBookmark */ = 941C738A125BE0BC00CF8153 /* PBXTextBookmark */;\n\t\t\t941C738B125BE0BC00CF8153 /* PBXTextBookmark */ = 941C738B125BE0BC00CF8153 /* PBXTextBookmark */;\n\t\t\t941C738C125BE0BC00CF8153 /* PBXTextBookmark */ = 941C738C125BE0BC00CF8153 /* PBXTextBookmark */;\n\t\t\t941C738D125BE0BC00CF8153 /* PBXTextBookmark */ = 941C738D125BE0BC00CF8153 /* PBXTextBookmark */;\n\t\t\t941C738E125BE0BC00CF8153 /* PBXTextBookmark */ = 941C738E125BE0BC00CF8153 /* PBXTextBookmark */;\n\t\t\t941C738F125BE0BC00CF8153 /* PBXTextBookmark */ = 941C738F125BE0BC00CF8153 /* PBXTextBookmark */;\n\t\t\t941C7390125BE0BC00CF8153 /* PBXTextBookmark */ = 941C7390125BE0BC00CF8153 /* PBXTextBookmark */;\n\t\t\t941C7391125BE0BC00CF8153 /* PBXTextBookmark */ = 941C7391125BE0BC00CF8153 /* PBXTextBookmark */;\n\t\t\t941DE8041227A7600027D899 /* PBXTextBookmark */ = 941DE8041227A7600027D899 /* PBXTextBookmark */;\n\t\t\t941DE8061227A7600027D899 /* PBXTextBookmark */ = 941DE8061227A7600027D899 /* PBXTextBookmark */;\n\t\t\t9421AB550FF1807D008F54E9 /* PBXTextBookmark */ = 9421AB550FF1807D008F54E9 /* PBXTextBookmark */;\n\t\t\t94269EA0123EF54A00CB5A57 /* PBXTextBookmark */ = 94269EA0123EF54A00CB5A57 /* PBXTextBookmark */;\n\t\t\t94269F10123EF9E800CB5A57 /* PBXTextBookmark */ = 94269F10123EF9E800CB5A57 /* PBXTextBookmark */;\n\t\t\t9426A1E7123EFEDA00CB5A57 /* PBXTextBookmark */ = 9426A1E7123EFEDA00CB5A57 /* PBXTextBookmark */;\n\t\t\t9426A1F8123F006800CB5A57 /* PBXTextBookmark */ = 9426A1F8123F006800CB5A57 /* PBXTextBookmark */;\n\t\t\t9426A208123F017D00CB5A57 /* PlistBookmark */ = 9426A208123F017D00CB5A57 /* PlistBookmark */;\n\t\t\t9426A209123F017D00CB5A57 /* PBXTextBookmark */ = 9426A209123F017D00CB5A57 /* PBXTextBookmark */;\n\t\t\t9426A228123F01C000CB5A57 /* PBXTextBookmark */ = 9426A228123F01C000CB5A57 /* PBXTextBookmark */;\n\t\t\t9428BBAD10BB50E200DAD287 /* PBXTextBookmark */ = 9428BBAD10BB50E200DAD287 /* PBXTextBookmark */;\n\t\t\t9428BC5510BB74BF00DAD287 /* PBXTextBookmark */ = 9428BC5510BB74BF00DAD287 /* PBXTextBookmark */;\n\t\t\t9428BC5710BB74BF00DAD287 /* PBXTextBookmark */ = 9428BC5710BB74BF00DAD287 /* PBXTextBookmark */;\n\t\t\t9428BF3810BBC2ED00DAD287 /* PBXTextBookmark */ = 9428BF3810BBC2ED00DAD287 /* PBXTextBookmark */;\n\t\t\t9428BF4F10BBCAAC00DAD287 /* PBXTextBookmark */ = 9428BF4F10BBCAAC00DAD287 /* PBXTextBookmark */;\n\t\t\t942ABEC510AA34820086D908 /* PBXTextBookmark */ = 942ABEC510AA34820086D908 /* PBXTextBookmark */;\n\t\t\t942B77330EA7E642004B266D /* PBXTextBookmark */ = 942B77330EA7E642004B266D /* PBXTextBookmark */;\n\t\t\t942B77380EA7E642004B266D /* PBXTextBookmark */ = 942B77380EA7E642004B266D /* PBXTextBookmark */;\n\t\t\t942B779B0EA7F2E0004B266D /* PBXTextBookmark */ = 942B779B0EA7F2E0004B266D /* PBXTextBookmark */;\n\t\t\t942B779C0EA7F2E0004B266D /* PBXTextBookmark */ = 942B779C0EA7F2E0004B266D /* PBXTextBookmark */;\n\t\t\t942B77B90EA800E1004B266D /* PBXTextBookmark */ = 942B77B90EA800E1004B266D /* PBXTextBookmark */;\n\t\t\t942B77BB0EA800E1004B266D /* PBXTextBookmark */ = 942B77BB0EA800E1004B266D /* PBXTextBookmark */;\n\t\t\t942F452E123BF48A002B05DF /* PBXTextBookmark */ = 942F452E123BF48A002B05DF /* PBXTextBookmark */;\n\t\t\t942F4564123BF600002B05DF /* PBXTextBookmark */ = 942F4564123BF600002B05DF /* PBXTextBookmark */;\n\t\t\t942F4752123C09BF002B05DF /* PBXTextBookmark */ = 942F4752123C09BF002B05DF /* PBXTextBookmark */;\n\t\t\t9430325510BD0B6D0045D33B /* PBXTextBookmark */ = 9430325510BD0B6D0045D33B /* PBXTextBookmark */;\n\t\t\t9430329A10BD103B0045D33B /* PBXTextBookmark */ = 9430329A10BD103B0045D33B /* PBXTextBookmark */;\n\t\t\t9430329B10BD103B0045D33B /* PBXTextBookmark */ = 9430329B10BD103B0045D33B /* PBXTextBookmark */;\n\t\t\t9431CA91123B509800C97383 /* PBXTextBookmark */ = 9431CA91123B509800C97383 /* PBXTextBookmark */;\n\t\t\t9431CB57123B5AF100C97383 /* PBXTextBookmark */ = 9431CB57123B5AF100C97383 /* PBXTextBookmark */;\n\t\t\t9431CBD2123B5F9900C97383 /* PBXTextBookmark */ = 9431CBD2123B5F9900C97383 /* PBXTextBookmark */;\n\t\t\t94329B3E122729BA0090298B /* PBXTextBookmark */ = 94329B3E122729BA0090298B /* PBXTextBookmark */;\n\t\t\t94329B3F122729BA0090298B /* PBXTextBookmark */ = 94329B3F122729BA0090298B /* PBXTextBookmark */;\n\t\t\t94329B40122729BA0090298B /* PBXTextBookmark */ = 94329B40122729BA0090298B /* PBXTextBookmark */;\n\t\t\t94329B5412272A0C0090298B /* PBXTextBookmark */ = 94329B5412272A0C0090298B /* PBXTextBookmark */;\n\t\t\t94329D6412274F350090298B /* PBXTextBookmark */ = 94329D6412274F350090298B /* PBXTextBookmark */;\n\t\t\t94329D6612274F350090298B /* PBXTextBookmark */ = 94329D6612274F350090298B /* PBXTextBookmark */;\n\t\t\t94329D6812274F350090298B /* PBXTextBookmark */ = 94329D6812274F350090298B /* PBXTextBookmark */;\n\t\t\t94329D6A12274F350090298B /* PBXTextBookmark */ = 94329D6A12274F350090298B /* PBXTextBookmark */;\n\t\t\t94329E0E12275AC30090298B /* PBXTextBookmark */ = 94329E0E12275AC30090298B /* PBXTextBookmark */;\n\t\t\t94329E0F12275AC30090298B /* PBXTextBookmark */ = 94329E0F12275AC30090298B /* PBXTextBookmark */;\n\t\t\t94329FEA122765A60090298B /* PBXTextBookmark */ = 94329FEA122765A60090298B /* PBXTextBookmark */;\n\t\t\t9439F48C123ABD080003F15C /* PBXTextBookmark */ = 9439F48C123ABD080003F15C /* PBXTextBookmark */;\n\t\t\t943B9D191235C5FE0056205E /* PBXTextBookmark */ = 943B9D191235C5FE0056205E /* PBXTextBookmark */;\n\t\t\t94476EC40EBFAB320095D6D7 /* PBXTextBookmark */ = 94476EC40EBFAB320095D6D7 /* PBXTextBookmark */;\n\t\t\t9448940B10F3E8FF00FB3EC8 /* PBXTextBookmark */ = 9448940B10F3E8FF00FB3EC8 /* PBXTextBookmark */;\n\t\t\t944B0D451248105F00CA74EA /* PBXTextBookmark */ = 944B0D451248105F00CA74EA /* PBXTextBookmark */;\n\t\t\t944B0D461248105F00CA74EA /* PBXTextBookmark */ = 944B0D461248105F00CA74EA /* PBXTextBookmark */;\n\t\t\t944EB0211228E96100EF9C64 /* PBXTextBookmark */ = 944EB0211228E96100EF9C64 /* PBXTextBookmark */;\n\t\t\t9451E5AE123F051700B4119F /* PBXTextBookmark */ = 9451E5AE123F051700B4119F /* PBXTextBookmark */;\n\t\t\t9451E5C5123F062B00B4119F /* PBXTextBookmark */ = 9451E5C5123F062B00B4119F /* PBXTextBookmark */;\n\t\t\t9451E5D5123F07C100B4119F /* PBXTextBookmark */ = 9451E5D5123F07C100B4119F /* PBXTextBookmark */;\n\t\t\t94547F160DE0AC7D00DD588F /* PBXTextBookmark */ = 94547F160DE0AC7D00DD588F /* PBXTextBookmark */;\n\t\t\t945481A60DE2A79200DD588F /* PBXTextBookmark */ = 945481A60DE2A79200DD588F /* PBXTextBookmark */;\n\t\t\t94554E670DF1171500FB176B /* PBXTextBookmark */ = 94554E670DF1171500FB176B /* PBXTextBookmark */;\n\t\t\t94554E690DF1171500FB176B /* PBXTextBookmark */ = 94554E690DF1171500FB176B /* PBXTextBookmark */;\n\t\t\t94554EB80DF1A86A00FB176B /* PBXTextBookmark */ = 94554EB80DF1A86A00FB176B /* PBXTextBookmark */;\n\t\t\t9456C24F10B2F268000BF3DE /* PBXTextBookmark */ = 9456C24F10B2F268000BF3DE /* PBXTextBookmark */;\n\t\t\t9456C25A10B2F2C9000BF3DE /* PBXTextBookmark */ = 9456C25A10B2F2C9000BF3DE /* PBXTextBookmark */;\n\t\t\t9456C32210B32F43000BF3DE /* PBXTextBookmark */ = 9456C32210B32F43000BF3DE /* PBXTextBookmark */;\n\t\t\t9456C34E10B33618000BF3DE /* PBXTextBookmark */ = 9456C34E10B33618000BF3DE /* PBXTextBookmark */;\n\t\t\t9456C3CB10B341F9000BF3DE /* PBXTextBookmark */ = 9456C3CB10B341F9000BF3DE /* PBXTextBookmark */;\n\t\t\t945C4D7C10BB0A8500548CC1 /* PBXTextBookmark */ = 945C4D7C10BB0A8500548CC1 /* PBXTextBookmark */;\n\t\t\t945C4EAC10BB348300548CC1 /* PBXTextBookmark */ = 945C4EAC10BB348300548CC1 /* PBXTextBookmark */;\n\t\t\t945E9D7C0DE525E100CDF01E /* PBXTextBookmark */ = 945E9D7C0DE525E100CDF01E /* PBXTextBookmark */;\n\t\t\t945F30FC0E0C763800CFF3DC /* PBXTextBookmark */ = 945F30FC0E0C763800CFF3DC /* PBXTextBookmark */;\n\t\t\t94607E0E123B7A8C008BA756 /* PBXTextBookmark */ = 94607E0E123B7A8C008BA756 /* PBXTextBookmark */;\n\t\t\t94638CEA0EB16F1100A3F155 /* PBXTextBookmark */ = 94638CEA0EB16F1100A3F155 /* PBXTextBookmark */;\n\t\t\t94669D8C1225EF670062028C /* PBXTextBookmark */ = 94669D8C1225EF670062028C /* PBXTextBookmark */;\n\t\t\t94671FFD12617CFE00F97C81 /* PBXTextBookmark */ = 94671FFD12617CFE00F97C81 /* PBXTextBookmark */;\n\t\t\t94672008126185F600F97C81 /* PBXBookmark */ = 94672008126185F600F97C81 /* PBXBookmark */;\n\t\t\t946720241261864D00F97C81 /* PBXTextBookmark */ = 946720241261864D00F97C81 /* PBXTextBookmark */;\n\t\t\t946720251261864D00F97C81 /* PBXTextBookmark */ = 946720251261864D00F97C81 /* PBXTextBookmark */;\n\t\t\t946720271261864D00F97C81 /* PlistBookmark */ = 946720271261864D00F97C81 /* PlistBookmark */;\n\t\t\t946720291261864D00F97C81 /* PlistBookmark */ = 946720291261864D00F97C81 /* PlistBookmark */;\n\t\t\t9467202B1261864D00F97C81 /* PBXTextBookmark */ = 9467202B1261864D00F97C81 /* PBXTextBookmark */;\n\t\t\t9467202C1261864D00F97C81 /* PlistBookmark */ = 9467202C1261864D00F97C81 /* PlistBookmark */;\n\t\t\t9467202D1261864D00F97C81 /* PlistBookmark */ = 9467202D1261864D00F97C81 /* PlistBookmark */;\n\t\t\t9467202E1261864D00F97C81 /* PlistBookmark */ = 9467202E1261864D00F97C81 /* PlistBookmark */;\n\t\t\t9467202F1261864D00F97C81 /* PlistBookmark */ = 9467202F1261864D00F97C81 /* PlistBookmark */;\n\t\t\t946720321261864D00F97C81 /* PlistBookmark */ = 946720321261864D00F97C81 /* PlistBookmark */;\n\t\t\t946D973B0FE165B70038846B /* PBXTextBookmark */ = 946D973B0FE165B70038846B /* PBXTextBookmark */;\n\t\t\t946DA7E010C0A7A400F26F56 /* PBXTextBookmark */ = 946DA7E010C0A7A400F26F56 /* PBXTextBookmark */;\n\t\t\t946DA8D910C0C32800F26F56 /* PBXTextBookmark */ = 946DA8D910C0C32800F26F56 /* PBXTextBookmark */;\n\t\t\t946DA8DA10C0C32800F26F56 /* PBXTextBookmark */ = 946DA8DA10C0C32800F26F56 /* PBXTextBookmark */;\n\t\t\t946DA8DB10C0C32800F26F56 /* PBXTextBookmark */ = 946DA8DB10C0C32800F26F56 /* PBXTextBookmark */;\n\t\t\t946DAA3810C0D8B700F26F56 /* PBXTextBookmark */ = 946DAA3810C0D8B700F26F56 /* PBXTextBookmark */;\n\t\t\t946DAA3A10C0D8B700F26F56 /* PBXTextBookmark */ = 946DAA3A10C0D8B700F26F56 /* PBXTextBookmark */;\n\t\t\t946DAA3C10C0D8B700F26F56 /* PBXTextBookmark */ = 946DAA3C10C0D8B700F26F56 /* PBXTextBookmark */;\n\t\t\t946DAB5110C0F2B000F26F56 /* PBXTextBookmark */ = 946DAB5110C0F2B000F26F56 /* PBXTextBookmark */;\n\t\t\t9471E48A0EB6C393000AE79D /* PBXTextBookmark */ = 9471E48A0EB6C393000AE79D /* PBXTextBookmark */;\n\t\t\t9472586B1254FECD00A8DE45 /* PBXTextBookmark */ = 9472586B1254FECD00A8DE45 /* PBXTextBookmark */;\n\t\t\t9472586C1254FECD00A8DE45 /* PBXTextBookmark */ = 9472586C1254FECD00A8DE45 /* PBXTextBookmark */;\n\t\t\t947332EE0EA70E8C003F9084 /* PBXTextBookmark */ = 947332EE0EA70E8C003F9084 /* PBXTextBookmark */;\n\t\t\t9473A34810BBD84100ED7D00 /* PBXTextBookmark */ = 9473A34810BBD84100ED7D00 /* PBXTextBookmark */;\n\t\t\t9473A95A1102F70B00D135CB /* PBXTextBookmark */ = 9473A95A1102F70B00D135CB /* PBXTextBookmark */;\n\t\t\t9473A9701103BE0A00D135CB /* PBXTextBookmark */ = 9473A9701103BE0A00D135CB /* PBXTextBookmark */;\n\t\t\t9475F4DB10BEF4100047A24B /* PBXTextBookmark */ = 9475F4DB10BEF4100047A24B /* PBXTextBookmark */;\n\t\t\t9475F56B10BF20A00047A24B /* PBXTextBookmark */ = 9475F56B10BF20A00047A24B /* PBXTextBookmark */;\n\t\t\t9475F5A710BF25A10047A24B /* PBXTextBookmark */ = 9475F5A710BF25A10047A24B /* PBXTextBookmark */;\n\t\t\t947713D410C45E5F00890A9B /* PBXTextBookmark */ = 947713D410C45E5F00890A9B /* PBXTextBookmark */;\n\t\t\t9478E13D0EC8EB46007096A7 /* PBXTextBookmark */ = 9478E13D0EC8EB46007096A7 /* PBXTextBookmark */;\n\t\t\t947923FE1102BE53007C87F8 /* PBXTextBookmark */ = 947923FE1102BE53007C87F8 /* PBXTextBookmark */;\n\t\t\t947924171102E275007C87F8 /* PBXTextBookmark */ = 947924171102E275007C87F8 /* PBXTextBookmark */;\n\t\t\t947CB8991249932E00131713 /* PBXTextBookmark */ = 947CB8991249932E00131713 /* PBXTextBookmark */;\n\t\t\t947CB8B81249949B00131713 /* PBXTextBookmark */ = 947CB8B81249949B00131713 /* PBXTextBookmark */;\n\t\t\t947E210C0EB28486007957D0 /* PBXTextBookmark */ = 947E210C0EB28486007957D0 /* PBXTextBookmark */;\n\t\t\t947E61D610AA049300D3B69E /* PBXTextBookmark */ = 947E61D610AA049300D3B69E /* PBXTextBookmark */;\n\t\t\t947E61DA10AA049300D3B69E /* PBXTextBookmark */ = 947E61DA10AA049300D3B69E /* PBXTextBookmark */;\n\t\t\t947E61DC10AA049300D3B69E /* PBXTextBookmark */ = 947E61DC10AA049300D3B69E /* PBXTextBookmark */;\n\t\t\t947E644910AA0F2C00D3B69E /* PBXTextBookmark */ = 947E644910AA0F2C00D3B69E /* PBXTextBookmark */;\n\t\t\t947E644B10AA0F2C00D3B69E /* PBXTextBookmark */ = 947E644B10AA0F2C00D3B69E /* PBXTextBookmark */;\n\t\t\t947E645010AA0F2C00D3B69E /* PBXTextBookmark */ = 947E645010AA0F2C00D3B69E /* PBXTextBookmark */;\n\t\t\t947E96231228DB0D0065B3BA /* PBXTextBookmark */ = 947E96231228DB0D0065B3BA /* PBXTextBookmark */;\n\t\t\t947E96251228DB0D0065B3BA /* PBXTextBookmark */ = 947E96251228DB0D0065B3BA /* PBXTextBookmark */;\n\t\t\t9483EAFB121C60C70070C43B /* PBXTextBookmark */ = 9483EAFB121C60C70070C43B /* PBXTextBookmark */;\n\t\t\t9484F86210B0DCC60038BDC0 /* PBXTextBookmark */ = 9484F86210B0DCC60038BDC0 /* PBXTextBookmark */;\n\t\t\t9484F86510B0DCC60038BDC0 /* PBXTextBookmark */ = 9484F86510B0DCC60038BDC0 /* PBXTextBookmark */;\n\t\t\t9484F8FC10B0E1770038BDC0 /* PBXBookmark */ = 9484F8FC10B0E1770038BDC0 /* PBXBookmark */;\n\t\t\t9484F9CE10B13E1C0038BDC0 /* PBXTextBookmark */ = 9484F9CE10B13E1C0038BDC0 /* PBXTextBookmark */;\n\t\t\t94862F8310BA182500CAA2EB /* PBXTextBookmark */ = 94862F8310BA182500CAA2EB /* PBXTextBookmark */;\n\t\t\t94862F9E10BA1A0100CAA2EB /* PBXTextBookmark */ = 94862F9E10BA1A0100CAA2EB /* PBXTextBookmark */;\n\t\t\t9486302A10BA247200CAA2EB /* PBXTextBookmark */ = 9486302A10BA247200CAA2EB /* PBXTextBookmark */;\n\t\t\t948704AE0E12CABF00D565C3 /* PBXTextBookmark */ = 948704AE0E12CABF00D565C3 /* PBXTextBookmark */;\n\t\t\t948704B20E12CABF00D565C3 /* PBXTextBookmark */ = 948704B20E12CABF00D565C3 /* PBXTextBookmark */;\n\t\t\t9487071F0E132B1000D565C3 /* PBXTextBookmark */ = 9487071F0E132B1000D565C3 /* PBXTextBookmark */;\n\t\t\t9487755C10C64FF100E4AEC5 /* PBXTextBookmark */ = 9487755C10C64FF100E4AEC5 /* PBXTextBookmark */;\n\t\t\t9487755D10C64FF100E4AEC5 /* PBXTextBookmark */ = 9487755D10C64FF100E4AEC5 /* PBXTextBookmark */;\n\t\t\t9489E678123E0AA300ECCD51 /* PBXTextBookmark */ = 9489E678123E0AA300ECCD51 /* PBXTextBookmark */;\n\t\t\t9489E68F123E0D7900ECCD51 /* PlistBookmark */ = 9489E68F123E0D7900ECCD51 /* PlistBookmark */;\n\t\t\t948C0820112DE98D0017EE7F /* PBXTextBookmark */ = 948C0820112DE98D0017EE7F /* PBXTextBookmark */;\n\t\t\t948DB86B123B76F40002F636 /* PBXTextBookmark */ = 948DB86B123B76F40002F636 /* PBXTextBookmark */;\n\t\t\t948FAA0310BF855500BE88CF /* PBXTextBookmark */ = 948FAA0310BF855500BE88CF /* PBXTextBookmark */;\n\t\t\t948FAB5B10BFAD3C00BE88CF /* PBXTextBookmark */ = 948FAB5B10BFAD3C00BE88CF /* PBXTextBookmark */;\n\t\t\t949198B010BC8DFC00C629D1 /* PBXTextBookmark */ = 949198B010BC8DFC00C629D1 /* PBXTextBookmark */;\n\t\t\t949198C910BC8FBB00C629D1 /* PBXTextBookmark */ = 949198C910BC8FBB00C629D1 /* PBXTextBookmark */;\n\t\t\t9492450510BA42EF00E726F5 /* PBXTextBookmark */ = 9492450510BA42EF00E726F5 /* PBXTextBookmark */;\n\t\t\t9492450710BA42EF00E726F5 /* PBXTextBookmark */ = 9492450710BA42EF00E726F5 /* PBXTextBookmark */;\n\t\t\t9492450910BA42EF00E726F5 /* PBXTextBookmark */ = 9492450910BA42EF00E726F5 /* PBXTextBookmark */;\n\t\t\t949245B210BA4A6200E726F5 /* PBXTextBookmark */ = 949245B210BA4A6200E726F5 /* PBXTextBookmark */;\n\t\t\t9493E98F10EE90BC000C4FB3 /* PBXTextBookmark */ = 9493E98F10EE90BC000C4FB3 /* PBXTextBookmark */;\n\t\t\t94993996123E2D34005260E4 /* PBXTextBookmark */ = 94993996123E2D34005260E4 /* PBXTextBookmark */;\n\t\t\t949AD25011E5469C006D6BF4 /* PBXTextBookmark */ = 949AD25011E5469C006D6BF4 /* PBXTextBookmark */;\n\t\t\t949CDD0612496F030034C107 /* PBXTextBookmark */ = 949CDD0612496F030034C107 /* PBXTextBookmark */;\n\t\t\t949CDD0712496F030034C107 /* PBXTextBookmark */ = 949CDD0712496F030034C107 /* PBXTextBookmark */;\n\t\t\t949CDD0812496F030034C107 /* PBXTextBookmark */ = 949CDD0812496F030034C107 /* PBXTextBookmark */;\n\t\t\t949DDD6D11D141080017F79B /* PBXTextBookmark */ = 949DDD6D11D141080017F79B /* PBXTextBookmark */;\n\t\t\t94A1B2AA10B9E92A00C64473 /* PBXTextBookmark */ = 94A1B2AA10B9E92A00C64473 /* PBXTextBookmark */;\n\t\t\t94A1B41E10BA05E600C64473 /* PBXTextBookmark */ = 94A1B41E10BA05E600C64473 /* PBXTextBookmark */;\n\t\t\t94A3D790122CB56400DCE9B4 /* PBXTextBookmark */ = 94A3D790122CB56400DCE9B4 /* PBXTextBookmark */;\n\t\t\t94A3ED241228213E00DF449D /* PBXTextBookmark */ = 94A3ED241228213E00DF449D /* PBXTextBookmark */;\n\t\t\t94A3ED251228213E00DF449D /* PBXTextBookmark */ = 94A3ED251228213E00DF449D /* PBXTextBookmark */;\n\t\t\t94A3ED261228213E00DF449D /* PBXTextBookmark */ = 94A3ED261228213E00DF449D /* PBXTextBookmark */;\n\t\t\t94A3ED891228429500DF449D /* PBXTextBookmark */ = 94A3ED891228429500DF449D /* PBXTextBookmark */;\n\t\t\t94AB2E6A0E003879006A79E4 /* PBXTextBookmark */ = 94AB2E6A0E003879006A79E4 /* PBXTextBookmark */;\n\t\t\t94AB2E6C0E003879006A79E4 /* PBXTextBookmark */ = 94AB2E6C0E003879006A79E4 /* PBXTextBookmark */;\n\t\t\t94B1514E0DE2CE530059F208 /* PBXTextBookmark */ = 94B1514E0DE2CE530059F208 /* PBXTextBookmark */;\n\t\t\t94B6A65D122C6E760069D952 /* PBXTextBookmark */ = 94B6A65D122C6E760069D952 /* PBXTextBookmark */;\n\t\t\t94B7898910C4F95E005EA70D /* PBXTextBookmark */ = 94B7898910C4F95E005EA70D /* PBXTextBookmark */;\n\t\t\t94B88C560E81500200C98131 /* PBXTextBookmark */ = 94B88C560E81500200C98131 /* PBXTextBookmark */;\n\t\t\t94B954A010E6D0F700DC476A /* PBXTextBookmark */ = 94B954A010E6D0F700DC476A /* PBXTextBookmark */;\n\t\t\t94BCAD4A10AB981B00F87527 /* PBXTextBookmark */ = 94BCAD4A10AB981B00F87527 /* PBXTextBookmark */;\n\t\t\t94BCAE9010ACA3A300F87527 /* PBXTextBookmark */ = 94BCAE9010ACA3A300F87527 /* PBXTextBookmark */;\n\t\t\t94BCAFC710ACC89100F87527 /* PBXTextBookmark */ = 94BCAFC710ACC89100F87527 /* PBXTextBookmark */;\n\t\t\t94BCE7390DDDEF8200F38F31 /* PBXTextBookmark */ = 94BCE7390DDDEF8200F38F31 /* PBXTextBookmark */;\n\t\t\t94BE8B2C123D943800C89FDD /* PBXTextBookmark */ = 94BE8B2C123D943800C89FDD /* PBXTextBookmark */;\n\t\t\t94C16BCB123D78C200A8622A /* PBXTextBookmark */ = 94C16BCB123D78C200A8622A /* PBXTextBookmark */;\n\t\t\t94C16BD5123D7C9300A8622A /* PBXTextBookmark */ = 94C16BD5123D7C9300A8622A /* PBXTextBookmark */;\n\t\t\t94C2074310AF5FB7002F4160 /* PBXTextBookmark */ = 94C2074310AF5FB7002F4160 /* PBXTextBookmark */;\n\t\t\t94C2091210AF7413002F4160 /* PBXTextBookmark */ = 94C2091210AF7413002F4160 /* PBXTextBookmark */;\n\t\t\t94C2092A10AF769A002F4160 /* PBXTextBookmark */ = 94C2092A10AF769A002F4160 /* PBXTextBookmark */;\n\t\t\t94C2092D10AF769A002F4160 /* PBXTextBookmark */ = 94C2092D10AF769A002F4160 /* PBXTextBookmark */;\n\t\t\t94C367C010AF9C0A0041953A /* PBXTextBookmark */ = 94C367C010AF9C0A0041953A /* PBXTextBookmark */;\n\t\t\t94C367C210AF9C0A0041953A /* PBXTextBookmark */ = 94C367C210AF9C0A0041953A /* PBXTextBookmark */;\n\t\t\t94C367D110AF9C830041953A /* PBXTextBookmark */ = 94C367D110AF9C830041953A /* PBXTextBookmark */;\n\t\t\t94C3696410AFB7550041953A /* PBXTextBookmark */ = 94C3696410AFB7550041953A /* PBXTextBookmark */;\n\t\t\t94C3698D10B082DF0041953A /* PBXTextBookmark */ = 94C3698D10B082DF0041953A /* PBXTextBookmark */;\n\t\t\t94C3699110B082DF0041953A /* PBXTextBookmark */ = 94C3699110B082DF0041953A /* PBXTextBookmark */;\n\t\t\t94C3AC3E11E6C9D000DBE1E9 /* PBXTextBookmark */ = 94C3AC3E11E6C9D000DBE1E9 /* PBXTextBookmark */;\n\t\t\t94C4B83610C0708F00CD4F90 /* PBXTextBookmark */ = 94C4B83610C0708F00CD4F90 /* PBXTextBookmark */;\n\t\t\t94C887D410ADCC0D007CB39E /* PBXTextBookmark */ = 94C887D410ADCC0D007CB39E /* PBXTextBookmark */;\n\t\t\t94C888B710ADE75B007CB39E /* PBXTextBookmark */ = 94C888B710ADE75B007CB39E /* PBXTextBookmark */;\n\t\t\t94C88B6810AF26F8007CB39E /* PBXTextBookmark */ = 94C88B6810AF26F8007CB39E /* PBXTextBookmark */;\n\t\t\t94C8D074123EC12D0019544B /* PBXTextBookmark */ = 94C8D074123EC12D0019544B /* PBXTextBookmark */;\n\t\t\t94C8D0AF123EC4A90019544B /* PBXTextBookmark */ = 94C8D0AF123EC4A90019544B /* PBXTextBookmark */;\n\t\t\t94C8D26B123EEE2E0019544B /* PBXTextBookmark */ = 94C8D26B123EEE2E0019544B /* PBXTextBookmark */;\n\t\t\t94CA691410B1CAD8007F207C /* PBXTextBookmark */ = 94CA691410B1CAD8007F207C /* PBXTextBookmark */;\n\t\t\t94CAA52E123DCAB700651F54 /* PBXTextBookmark */ = 94CAA52E123DCAB700651F54 /* PBXTextBookmark */;\n\t\t\t94CAA5D8123DDCFE00651F54 /* PBXTextBookmark */ = 94CAA5D8123DDCFE00651F54 /* PBXTextBookmark */;\n\t\t\t94CAA648123DE2EF00651F54 /* PBXTextBookmark */ = 94CAA648123DE2EF00651F54 /* PBXTextBookmark */;\n\t\t\t94CAC151125FBC1400CF9255 /* PBXTextBookmark */ = 94CAC151125FBC1400CF9255 /* PBXTextBookmark */;\n\t\t\t94CFE4AF10BE3CA600847DF5 /* PBXTextBookmark */ = 94CFE4AF10BE3CA600847DF5 /* PBXTextBookmark */;\n\t\t\t94CFE6A910BE63A900847DF5 /* PBXTextBookmark */ = 94CFE6A910BE63A900847DF5 /* PBXTextBookmark */;\n\t\t\t94CFE6B810BE63A900847DF5 /* PBXTextBookmark */ = 94CFE6B810BE63A900847DF5 /* PBXTextBookmark */;\n\t\t\t94CFE6B910BE63A900847DF5 /* PBXTextBookmark */ = 94CFE6B910BE63A900847DF5 /* PBXTextBookmark */;\n\t\t\t94CFE6C010BE63A900847DF5 /* PBXTextBookmark */ = 94CFE6C010BE63A900847DF5 /* PBXTextBookmark */;\n\t\t\t94CFE70110BE683800847DF5 /* PBXTextBookmark */ = 94CFE70110BE683800847DF5 /* PBXTextBookmark */;\n\t\t\t94D051D3120CE2D40039F8B7 /* PBXTextBookmark */ = 94D051D3120CE2D40039F8B7 /* PBXTextBookmark */;\n\t\t\t94D12BE412289C66006B7504 /* PBXTextBookmark */ = 94D12BE412289C66006B7504 /* PBXTextBookmark */;\n\t\t\t94D16BFC10BCEFEE00A69A89 /* PBXTextBookmark */ = 94D16BFC10BCEFEE00A69A89 /* PBXTextBookmark */;\n\t\t\t94D16BFE10BCEFEE00A69A89 /* PBXTextBookmark */ = 94D16BFE10BCEFEE00A69A89 /* PBXTextBookmark */;\n\t\t\t94D16C2A10BCF28A00A69A89 /* PBXTextBookmark */ = 94D16C2A10BCF28A00A69A89 /* PBXTextBookmark */;\n\t\t\t94D16C4010BCF3E100A69A89 /* PBXTextBookmark */ = 94D16C4010BCF3E100A69A89 /* PBXTextBookmark */;\n\t\t\t94D16CA310BCF93000A69A89 /* PBXTextBookmark */ = 94D16CA310BCF93000A69A89 /* PBXTextBookmark */;\n\t\t\t94D3660B10CEE03900805023 /* PBXTextBookmark */ = 94D3660B10CEE03900805023 /* PBXTextBookmark */;\n\t\t\t94D715CB10B723B200F69A71 /* PBXTextBookmark */ = 94D715CB10B723B200F69A71 /* PBXTextBookmark */;\n\t\t\t94D7174110B72FDF00F69A71 /* PBXTextBookmark */ = 94D7174110B72FDF00F69A71 /* PBXTextBookmark */;\n\t\t\t94D7177D10B73A3800F69A71 /* PBXTextBookmark */ = 94D7177D10B73A3800F69A71 /* PBXTextBookmark */;\n\t\t\t94D7178410B73A3800F69A71 /* PBXTextBookmark */ = 94D7178410B73A3800F69A71 /* PBXTextBookmark */;\n\t\t\t94D7178610B73A3800F69A71 /* PBXTextBookmark */ = 94D7178610B73A3800F69A71 /* PBXTextBookmark */;\n\t\t\t94D7178810B73A3800F69A71 /* PBXTextBookmark */ = 94D7178810B73A3800F69A71 /* PBXTextBookmark */;\n\t\t\t94D7178A10B73A3800F69A71 /* PBXTextBookmark */ = 94D7178A10B73A3800F69A71 /* PBXTextBookmark */;\n\t\t\t94D7178C10B73A3800F69A71 /* PBXTextBookmark */ = 94D7178C10B73A3800F69A71 /* PBXTextBookmark */;\n\t\t\t94D7179110B73A3800F69A71 /* PBXTextBookmark */ = 94D7179110B73A3800F69A71 /* PBXTextBookmark */;\n\t\t\t94D717BE10B73DD900F69A71 /* PBXTextBookmark */ = 94D717BE10B73DD900F69A71 /* PBXTextBookmark */;\n\t\t\t94D717F810B743B800F69A71 /* PBXTextBookmark */ = 94D717F810B743B800F69A71 /* PBXTextBookmark */;\n\t\t\t94D7183810B74BF300F69A71 /* PBXTextBookmark */ = 94D7183810B74BF300F69A71 /* PBXTextBookmark */;\n\t\t\t94D7183A10B74BF300F69A71 /* PBXTextBookmark */ = 94D7183A10B74BF300F69A71 /* PBXTextBookmark */;\n\t\t\t94D73E5210B5B9CE00F8C034 /* PBXTextBookmark */ = 94D73E5210B5B9CE00F8C034 /* PBXTextBookmark */;\n\t\t\t94D73E5410B5B9CE00F8C034 /* PBXTextBookmark */ = 94D73E5410B5B9CE00F8C034 /* PBXTextBookmark */;\n\t\t\t94D73E5610B5B9CE00F8C034 /* PBXTextBookmark */ = 94D73E5610B5B9CE00F8C034 /* PBXTextBookmark */;\n\t\t\t94D73E5810B5B9CE00F8C034 /* PBXTextBookmark */ = 94D73E5810B5B9CE00F8C034 /* PBXTextBookmark */;\n\t\t\t94D73E5A10B5B9CE00F8C034 /* PBXTextBookmark */ = 94D73E5A10B5B9CE00F8C034 /* PBXTextBookmark */;\n\t\t\t94D73E5C10B5B9CE00F8C034 /* PBXTextBookmark */ = 94D73E5C10B5B9CE00F8C034 /* PBXTextBookmark */;\n\t\t\t94D73E5E10B5B9CE00F8C034 /* PBXTextBookmark */ = 94D73E5E10B5B9CE00F8C034 /* PBXTextBookmark */;\n\t\t\t94D73E6010B5B9CE00F8C034 /* PBXTextBookmark */ = 94D73E6010B5B9CE00F8C034 /* PBXTextBookmark */;\n\t\t\t94D73E6210B5B9CE00F8C034 /* PBXTextBookmark */ = 94D73E6210B5B9CE00F8C034 /* PBXTextBookmark */;\n\t\t\t94D73E6410B5B9CE00F8C034 /* PBXTextBookmark */ = 94D73E6410B5B9CE00F8C034 /* PBXTextBookmark */;\n\t\t\t94D73E6810B5B9CE00F8C034 /* PBXTextBookmark */ = 94D73E6810B5B9CE00F8C034 /* PBXTextBookmark */;\n\t\t\t94D73E6A10B5B9CE00F8C034 /* PBXTextBookmark */ = 94D73E6A10B5B9CE00F8C034 /* PBXTextBookmark */;\n\t\t\t94D73EE610B5CF8400F8C034 /* PBXTextBookmark */ = 94D73EE610B5CF8400F8C034 /* PBXTextBookmark */;\n\t\t\t94D73F4910B5DA4E00F8C034 /* PBXTextBookmark */ = 94D73F4910B5DA4E00F8C034 /* PBXTextBookmark */;\n\t\t\t94D73FA010B5E5A200F8C034 /* PBXTextBookmark */ = 94D73FA010B5E5A200F8C034 /* PBXTextBookmark */;\n\t\t\t94D73FAD10B5E69900F8C034 /* PBXTextBookmark */ = 94D73FAD10B5E69900F8C034 /* PBXTextBookmark */;\n\t\t\t94D73FB510B5E6DA00F8C034 /* PBXTextBookmark */ = 94D73FB510B5E6DA00F8C034 /* PBXTextBookmark */;\n\t\t\t94D7401510B5F8AF00F8C034 /* PBXTextBookmark */ = 94D7401510B5F8AF00F8C034 /* PBXTextBookmark */;\n\t\t\t94D7403810B5FDDB00F8C034 /* PBXTextBookmark */ = 94D7403810B5FDDB00F8C034 /* PBXTextBookmark */;\n\t\t\t94D7403A10B5FDDB00F8C034 /* PBXTextBookmark */ = 94D7403A10B5FDDB00F8C034 /* PBXTextBookmark */;\n\t\t\t94D7403C10B5FDDB00F8C034 /* PBXTextBookmark */ = 94D7403C10B5FDDB00F8C034 /* PBXTextBookmark */;\n\t\t\t94D740B210B6242000F8C034 /* PBXTextBookmark */ = 94D740B210B6242000F8C034 /* PBXTextBookmark */;\n\t\t\t94E297D10DECA72F009CF73A /* PBXTextBookmark */ = 94E297D10DECA72F009CF73A /* PBXTextBookmark */;\n\t\t\t94E297D30DECA72F009CF73A /* PBXTextBookmark */ = 94E297D30DECA72F009CF73A /* PBXTextBookmark */;\n\t\t\t94E297D50DECA72F009CF73A /* PBXTextBookmark */ = 94E297D50DECA72F009CF73A /* PBXTextBookmark */;\n\t\t\t94E297D70DECA72F009CF73A /* PBXTextBookmark */ = 94E297D70DECA72F009CF73A /* PBXTextBookmark */;\n\t\t\t94E2DAD40ED2351B00012E92 /* PBXTextBookmark */ = 94E2DAD40ED2351B00012E92 /* PBXTextBookmark */;\n\t\t\t94E2DB270ED2355F00012E92 /* PBXTextBookmark */ = 94E2DB270ED2355F00012E92 /* PBXTextBookmark */;\n\t\t\t94E4930310BD32D00011AC75 /* PBXTextBookmark */ = 94E4930310BD32D00011AC75 /* PBXTextBookmark */;\n\t\t\t94E583DB10BF43970073FD63 /* PBXTextBookmark */ = 94E583DB10BF43970073FD63 /* PBXTextBookmark */;\n\t\t\t94E584AE10BF6EE30073FD63 /* PBXTextBookmark */ = 94E584AE10BF6EE30073FD63 /* PBXTextBookmark */;\n\t\t\t94E584FF10BF79AB0073FD63 /* PBXTextBookmark */ = 94E584FF10BF79AB0073FD63 /* PBXTextBookmark */;\n\t\t\t94E5850010BF79AB0073FD63 /* PBXTextBookmark */ = 94E5850010BF79AB0073FD63 /* PBXTextBookmark */;\n\t\t\t94E745ED11E5346100E90B3A /* PBXTextBookmark */ = 94E745ED11E5346100E90B3A /* PBXTextBookmark */;\n\t\t\t94E745EF11E5346100E90B3A /* PBXTextBookmark */ = 94E745EF11E5346100E90B3A /* PBXTextBookmark */;\n\t\t\t94E746D011E539AF00E90B3A /* PBXTextBookmark */ = 94E746D011E539AF00E90B3A /* PBXTextBookmark */;\n\t\t\t94E7F9A912375A9600A03A11 /* PBXTextBookmark */ = 94E7F9A912375A9600A03A11 /* PBXTextBookmark */;\n\t\t\t94E7F9AA12375A9600A03A11 /* PBXTextBookmark */ = 94E7F9AA12375A9600A03A11 /* PBXTextBookmark */;\n\t\t\t94E7F9AB12375A9600A03A11 /* PBXTextBookmark */ = 94E7F9AB12375A9600A03A11 /* PBXTextBookmark */;\n\t\t\t94E8EEEA11C94D5D0049D853 /* PBXTextBookmark */ = 94E8EEEA11C94D5D0049D853 /* PBXTextBookmark */;\n\t\t\t94E99F3412378CD30048557C /* PBXTextBookmark */ = 94E99F3412378CD30048557C /* PBXTextBookmark */;\n\t\t\t94E99F8012378DAB0048557C /* PBXTextBookmark */ = 94E99F8012378DAB0048557C /* PBXTextBookmark */;\n\t\t\t94E9A007123790840048557C /* PBXTextBookmark */ = 94E9A007123790840048557C /* PBXTextBookmark */;\n\t\t\t94E9A00B123790840048557C /* PBXTextBookmark */ = 94E9A00B123790840048557C /* PBXTextBookmark */;\n\t\t\t94E9A19812381F180048557C /* PBXTextBookmark */ = 94E9A19812381F180048557C /* PBXTextBookmark */;\n\t\t\t94E9A1CB123833B00048557C /* PBXTextBookmark */ = 94E9A1CB123833B00048557C /* PBXTextBookmark */;\n\t\t\t94ED7EFA0E6C2ABE00F4DD03 /* PBXTextBookmark */ = 94ED7EFA0E6C2ABE00F4DD03 /* PBXTextBookmark */;\n\t\t\t94EF6D6D11E55E31003BA64D /* PBXTextBookmark */ = 94EF6D6D11E55E31003BA64D /* PBXTextBookmark */;\n\t\t\t94F155570E83EA1F001657CE /* PBXTextBookmark */ = 94F155570E83EA1F001657CE /* PBXTextBookmark */;\n\t\t\t94F155580E83EA1F001657CE /* PBXTextBookmark */ = 94F155580E83EA1F001657CE /* PBXTextBookmark */;\n\t\t\t94F1F6B111EB8E14004B3AE3 /* PBXTextBookmark */ = 94F1F6B111EB8E14004B3AE3 /* PBXTextBookmark */;\n\t\t\t94F5C1870DF26EF200099B11 /* PBXTextBookmark */ = 94F5C1870DF26EF200099B11 /* PBXTextBookmark */;\n\t\t\t94F5C25F0DF42C7600099B11 /* PBXTextBookmark */ = 94F5C25F0DF42C7600099B11 /* PBXTextBookmark */;\n\t\t\t94F5C2600DF42C7600099B11 /* PBXTextBookmark */ = 94F5C2600DF42C7600099B11 /* PBXTextBookmark */;\n\t\t\t94F5F29110BC518B00847EEE /* PBXTextBookmark */ = 94F5F29110BC518B00847EEE /* PBXTextBookmark */;\n\t\t\t94F5F29210BC518B00847EEE /* PBXTextBookmark */ = 94F5F29210BC518B00847EEE /* PBXTextBookmark */;\n\t\t\t94F5F29410BC518B00847EEE /* PBXTextBookmark */ = 94F5F29410BC518B00847EEE /* PBXTextBookmark */;\n\t\t\t94F5F29510BC518B00847EEE /* PBXTextBookmark */ = 94F5F29510BC518B00847EEE /* PBXTextBookmark */;\n\t\t\t94F5F2A810BC539700847EEE /* PBXTextBookmark */ = 94F5F2A810BC539700847EEE /* PBXTextBookmark */;\n\t\t\t94F89AFE10B4997900556475 /* PBXTextBookmark */ = 94F89AFE10B4997900556475 /* PBXTextBookmark */;\n\t\t\t94F89BDE10B4B77400556475 /* PBXTextBookmark */ = 94F89BDE10B4B77400556475 /* PBXTextBookmark */;\n\t\t\t94F89BE010B4B77400556475 /* PBXTextBookmark */ = 94F89BE010B4B77400556475 /* PBXTextBookmark */;\n\t\t\t94F89C9110B4C0B800556475 /* PBXTextBookmark */ = 94F89C9110B4C0B800556475 /* PBXTextBookmark */;\n\t\t\t94F8E42E0DE6129D003F4F53 /* PBXTextBookmark */ = 94F8E42E0DE6129D003F4F53 /* PBXTextBookmark */;\n\t\t\t94FB0AA7123B63D200026016 /* PBXTextBookmark */ = 94FB0AA7123B63D200026016 /* PBXTextBookmark */;\n\t\t\t94FB0B55123B6A8300026016 /* PBXTextBookmark */ = 94FB0B55123B6A8300026016 /* PBXTextBookmark */;\n\t\t\t94FB0B57123B6A8300026016 /* PBXTextBookmark */ = 94FB0B57123B6A8300026016 /* PBXTextBookmark */;\n\t\t\t94FB0B59123B6A8300026016 /* PBXTextBookmark */ = 94FB0B59123B6A8300026016 /* PBXTextBookmark */;\n\t\t\t94FB0B5B123B6A8300026016 /* PBXTextBookmark */ = 94FB0B5B123B6A8300026016 /* PBXTextBookmark */;\n\t\t\t94FB0B5D123B6A8300026016 /* PBXTextBookmark */ = 94FB0B5D123B6A8300026016 /* PBXTextBookmark */;\n\t\t\t94FF88971240458F00B1021A /* PBXTextBookmark */ = 94FF88971240458F00B1021A /* PBXTextBookmark */;\n\t\t\t94FF88981240458F00B1021A /* PBXTextBookmark */ = 94FF88981240458F00B1021A /* PBXTextBookmark */;\n\t\t\t94FF88991240458F00B1021A /* PBXTextBookmark */ = 94FF88991240458F00B1021A /* PBXTextBookmark */;\n\t\t};\n\t\tsourceControlManager = 9424FF420DDC8673009912BF /* Source Control */;\n\t\tuserBookmarkGroup = 94B8F4B910CF5BFF00F0DD6B /* PBXBookmarkGroup */;\n\t\tuserBuildSettings = {\n\t\t};\n\t};\n\t29B97316FDCFA39411CA2CEA /* main.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {869, 804}}\";\n\t\t\tsepNavSelRange = \"{1872, 0}\";\n\t\t\tsepNavVisRange = \"{0, 2149}\";\n\t\t\tsepNavWindowFrame = \"{{15, 15}, {694, 1008}}\";\n\t\t};\n\t};\n\t9400325B0DEF3936002FA1C4 /* sqDummyaio.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1208, 824}}\";\n\t\t\tsepNavSelRange = \"{1850, 8}\";\n\t\t\tsepNavVisRange = \"{0, 1878}\";\n\t\t\tsepNavWindowFrame = \"{{483, 4}, {694, 1008}}\";\n\t\t};\n\t};\n\t9400325C0DEF3936002FA1C4 /* sqDummyaio.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1357, 1040}}\";\n\t\t\tsepNavSelRange = \"{2139, 0}\";\n\t\t\tsepNavVisRange = \"{2081, 171}\";\n\t\t\tsepNavWindowFrame = \"{{483, -9}, {694, 1008}}\";\n\t\t};\n\t};\n\t9402DD5E10CE0C16005C2102 /* SqViewBitmapConversion.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {2070, 1066}}\";\n\t\t\tsepNavSelRange = \"{2824, 26}\";\n\t\t\tsepNavVisRange = \"{1744, 1329}\";\n\t\t\tsepNavWindowFrame = \"{{15, 13}, {1326, 1010}}\";\n\t\t};\n\t};\n\t9402DD5F10CE0C16005C2102 /* SqViewBitmapConversion.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {2077, 3549}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1455}\";\n\t\t\tsepNavWindowFrame = \"{{15, 13}, {1326, 1010}}\";\n\t\t};\n\t};\n\t9402DD6F10CE0E91005C2102 /* SqViewClut.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 1066}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1379}\";\n\t\t\tsepNavWindowFrame = \"{{15, 13}, {1326, 1010}}\";\n\t\t};\n\t};\n\t9402DDB610CE12A5005C2102 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9402DDB710CE12A5005C2102 /* SqView.h */;\n\t\tname = \"SqView.h: 50\";\n\t\trLen = 33;\n\t\trLoc = 1358;\n\t\trType = 0;\n\t\tvrLen = 1671;\n\t\tvrLoc = 0;\n\t};\n\t9402DDB710CE12A5005C2102 /* SqView.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = SqView.h;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/CocoaSqueak-3.0.4/src/SqueakAppKit/SqView.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9402F2AE0F3F9BB900F3D637 /* PDColoredProgressView.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 546}}\";\n\t\t\tsepNavSelRange = \"{1081, 6}\";\n\t\t\tsepNavVisRange = \"{31, 1299}\";\n\t\t};\n\t};\n\t9402F2AF0F3F9BB900F3D637 /* PDColoredProgressView.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {964, 1547}}\";\n\t\t\tsepNavSelRange = \"{3465, 0}\";\n\t\t\tsepNavVisRange = \"{2282, 1236}\";\n\t\t\tsepNavWindowFrame = \"{{204, 6}, {1346, 974}}\";\n\t\t};\n\t};\n\t9402F2C50F3F9C5600F3D637 /* drawing.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1492, 897}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1669}\";\n\t\t};\n\t};\n\t940590F1122AF9ED009939CE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 940590F2122AF9ED009939CE /* macvideo.cpp */;\n\t\tname = \"macvideo.cpp: 883\";\n\t\trLen = 30;\n\t\trLoc = 41143;\n\t\trType = 0;\n\t\tvrLen = 5248;\n\t\tvrLoc = 36665;\n\t};\n\t940590F2122AF9ED009939CE /* macvideo.cpp */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.cpp.cpp;\n\t\tname = macvideo.cpp;\n\t\tpath = /opt/intel/Compiler/11.1/076/Frameworks/tbb/examples/common/gui/macvideo.cpp;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t940590F3122AF9ED009939CE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 940590F4122AF9ED009939CE /* mglPrivateCreateTexture.c */;\n\t\tname = \"mglPrivateCreateTexture.c: 216\";\n\t\trLen = 19;\n\t\trLoc = 7694;\n\t\trType = 0;\n\t\tvrLen = 2995;\n\t\tvrLoc = 6467;\n\t};\n\t940590F4122AF9ED009939CE /* mglPrivateCreateTexture.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = mglPrivateCreateTexture.c;\n\t\tpath = /Users/johnmci/Shared/mglPrivateCreateTexture.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9406E7E210B663F4002F81F2 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C36A6D10B091BB0041953A /* NSCursor.h */;\n\t\tname = \"NSCursor.h: 75\";\n\t\trLen = 41;\n\t\trLoc = 3288;\n\t\trType = 0;\n\t\tvrLen = 1499;\n\t\tvrLoc = 1836;\n\t};\n\t9406E87110B66A74002F81F2 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9406E87210B66A74002F81F2 /* SqueakInterpreterEventSensor.h */;\n\t\tname = \"SqueakInterpreterEventSensor.h: 11\";\n\t\trLen = 8;\n\t\trLoc = 416;\n\t\trType = 0;\n\t\tvrLen = 555;\n\t\tvrLoc = 0;\n\t};\n\t9406E87210B66A74002F81F2 /* SqueakInterpreterEventSensor.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = SqueakInterpreterEventSensor.h;\n\t\tpath = \"/Users/johnmci/Work In Progress/smalltalk/CocoaSqueakSource/Squeak/SqueakInterpreterEventSensor.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9406E87510B66A74002F81F2 /* SqueakInterpreterEventSensor.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = SqueakInterpreterEventSensor.m;\n\t\tpath = \"/Users/johnmci/Work In Progress/smalltalk/CocoaSqueakSource/Squeak/SqueakInterpreterEventSensor.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9406E87710B66A74002F81F2 /* SqViewEventSensor.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = SqViewEventSensor.m;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/CocoaSqueak-3.0.4/src/SqueakAppKit/SqViewEventSensor.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9406E8CC10B67499002F81F2 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9406E8CD10B67499002F81F2 /* NSTextStorageScripting.h */;\n\t\tname = \"NSTextStorageScripting.h: 21\";\n\t\trLen = 25;\n\t\trLoc = 417;\n\t\trType = 0;\n\t\tvrLen = 620;\n\t\tvrLoc = 0;\n\t};\n\t9406E8CD10B67499002F81F2 /* NSTextStorageScripting.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSTextStorageScripting.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSTextStorageScripting.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9406E8D110B67499002F81F2 /* NSRange.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSRange.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSRange.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94077C1E1238400500B9AC1E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C3687710AFA77F0041953A /* sqSqueakOSXApplication+cursor.m */;\n\t\tname = \"sqSqueakOSXApplication+cursor.m: 79\";\n\t\trLen = 0;\n\t\trLoc = 3281;\n\t\trType = 0;\n\t\tvrLen = 1906;\n\t\tvrLoc = 1937;\n\t};\n\t940BE5791239F10000674A11 /* SqueakUIViewCALayer.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {838, 790}}\";\n\t\t\tsepNavSelRange = \"{1808, 26}\";\n\t\t\tsepNavVisRange = \"{0, 2012}\";\n\t\t};\n\t};\n\t940BE57A1239F10000674A11 /* SqueakUIViewCALayer.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1440, 1703}}\";\n\t\t\tsepNavSelRange = \"{3908, 13}\";\n\t\t\tsepNavVisRange = \"{392, 2904}\";\n\t\t\tsepNavWindowFrame = \"{{170, 4}, {860, 1024}}\";\n\t\t};\n\t};\n\t940BE5991239F2BF00674A11 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9452D7640E0452D3000AD792 /* sqiPhoneScreenAndWindow.m */;\n\t\tname = \"sqiPhoneScreenAndWindow.m: 59\";\n\t\trLen = 12;\n\t\trLoc = 2228;\n\t\trType = 0;\n\t\tvrLen = 2310;\n\t\tvrLoc = 0;\n\t};\n\t940BE5E71239F50100674A11 /* SqueakUIViewOpenGL.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {869, 1105}}\";\n\t\t\tsepNavSelRange = \"{1885, 0}\";\n\t\t\tsepNavVisRange = \"{706, 2099}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {860, 1024}}\";\n\t\t};\n\t};\n\t940BE5E81239F50100674A11 /* SqueakUIViewOpenGL.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {943, 2704}}\";\n\t\t\tsepNavSelRange = \"{5746, 0}\";\n\t\t\tsepNavVisRange = \"{5080, 2039}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {860, 1024}}\";\n\t\t};\n\t};\n\t940C29221228BDC80009E415 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E658F80DDD03FE00358328 /* GeniePlugin.c */;\n\t\tname = \"GeniePlugin.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1889;\n\t\tvrLoc = 0;\n\t};\n\t940CA5401226E8D5008BF48A /* mpeg3io.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = mpeg3io.c;\n\t\tpath = /Users/johnmci/Documents/SqueakmpegFullSource/libmpeg/mpeg3io.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t940CA58B1226E9B2008BF48A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 940CA5401226E8D5008BF48A /* mpeg3io.c */;\n\t\tname = \"mpeg3io.c: 5\";\n\t\trLen = 8;\n\t\trLoc = 48;\n\t\trType = 0;\n\t\tvrLen = 2211;\n\t\tvrLoc = 0;\n\t};\n\t940CD113110E3E6500A9344A /* sqSqueakOSXDropAPI.m:53 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 946DA91410C0C71100F26F56 /* sqSqueakOSXDropAPI.m */;\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 53;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 306811868.294592;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t940CE8540DFCE2D200EBA91B /* SqueakUIController.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {950, 801}}\";\n\t\t\tsepNavSelRange = \"{95, 1688}\";\n\t\t\tsepNavVisRange = \"{0, 1839}\";\n\t\t};\n\t};\n\t940CE8550DFCE2D200EBA91B /* SqueakUIController.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {955, 1378}}\";\n\t\t\tsepNavSelRange = \"{3142, 0}\";\n\t\t\tsepNavVisRange = \"{2103, 2036}\";\n\t\t\tsepNavWindowFrame = \"{{15, 49}, {1346, 974}}\";\n\t\t};\n\t};\n\t9412CAE40E6C05EC00DB8625 /* sqSqueakInfoPlistInterface.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {869, 651}}\";\n\t\t\tsepNavSelRange = \"{1933, 14}\";\n\t\t\tsepNavVisRange = \"{0, 2070}\";\n\t\t\tsepNavWindowFrame = \"{{15, 8}, {1012, 1015}}\";\n\t\t};\n\t};\n\t9412CAE50E6C05EC00DB8625 /* sqSqueakInfoPlistInterface.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {869, 832}}\";\n\t\t\tsepNavSelRange = \"{2410, 0}\";\n\t\t\tsepNavVisRange = \"{0, 2404}\";\n\t\t\tsepNavWindowFrame = \"{{15, 8}, {1012, 1015}}\";\n\t\t};\n\t};\n\t941441FD10BC817D0088F8AC /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 941441FE10BC817D0088F8AC /* NSSavePanel.h */;\n\t\tname = \"NSSavePanel.h: 207\";\n\t\trLen = 23;\n\t\trLoc = 10442;\n\t\trType = 0;\n\t\tvrLen = 3994;\n\t\tvrLoc = 8956;\n\t};\n\t941441FE10BC817D0088F8AC /* NSSavePanel.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSSavePanel.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSSavePanel.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9414420010BC817D0088F8AC /* NSPanel.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSPanel.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSPanel.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9414420110BC817D0088F8AC /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9414420210BC817D0088F8AC /* NSOpenPanel.h */;\n\t\tname = \"NSOpenPanel.h: 43\";\n\t\trLen = 24;\n\t\trLoc = 877;\n\t\trType = 0;\n\t\tvrLen = 1896;\n\t\tvrLoc = 0;\n\t};\n\t9414420210BC817D0088F8AC /* NSOpenPanel.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSOpenPanel.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSOpenPanel.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9414425110BC8A620088F8AC /* PBXBookmark */ = {\n\t\tisa = PBXBookmark;\n\t\tfRef = 94F3A9690E6BFA7C00E0B12A /* Squeak.png */;\n\t};\n\t941724420F36624C0031AF33 /* squeakProxy.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 2509}}\";\n\t\t\tsepNavSelRange = \"{3440, 13}\";\n\t\t\tsepNavVisRange = \"{2612, 1371}\";\n\t\t\tsepNavWindowFrame = \"{{15, 49}, {1346, 974}}\";\n\t\t};\n\t};\n\t941724430F36624C0031AF33 /* squeakProxy.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {838, 1274}}\";\n\t\t\tsepNavSelRange = \"{3291, 34}\";\n\t\t\tsepNavVisRange = \"{1854, 2107}\";\n\t\t};\n\t};\n\t941C24EF1198BBE3008BF398 /* sqSqueakScreenAndWindow.m:96 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 9471D2720E04703B00703D45 /* sqSqueakScreenAndWindow.m */;\n\t\tfunctionName = \"-ioScreenSize\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 96;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 306811863.5436839;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 2;\n\t};\n\t941C7389125BE0BC00CF8153 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94883B400E0C2B9C005A4738 /* sqUnixSocket.c */;\n\t\tname = \"sqUnixSocket.c: 1273\";\n\t\trLen = 91;\n\t\trLoc = 34809;\n\t\trType = 0;\n\t\tvrLen = 1919;\n\t\tvrLoc = 33997;\n\t};\n\t941C738A125BE0BC00CF8153 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 942F76350E0B6CEF00848BF2 /* sqSqueakIPhoneApplication+attributes.h */;\n\t\tname = \"sqSqueakIPhoneApplication+attributes.h: 39\";\n\t\trLen = 39;\n\t\trLoc = 1806;\n\t\trType = 0;\n\t\tvrLen = 1953;\n\t\tvrLoc = 0;\n\t};\n\t941C738B125BE0BC00CF8153 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94A0E8450DE5EB6E0071C8B9 /* sqSqueakIPhoneApplication+attributes.m */;\n\t\tname = \"sqSqueakIPhoneApplication+attributes.m: 62\";\n\t\trLen = 0;\n\t\trLoc = 2521;\n\t\trType = 0;\n\t\tvrLen = 2745;\n\t\tvrLoc = 2069;\n\t};\n\t941C738C125BE0BC00CF8153 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9458525A10F043EB001401E7 /* sqSqueakIPhoneApplication+clipboard.h */;\n\t\tname = \"sqSqueakIPhoneApplication+clipboard.h: 44\";\n\t\trLen = 227;\n\t\trLoc = 1982;\n\t\trType = 0;\n\t\tvrLen = 2214;\n\t\tvrLoc = 0;\n\t};\n\t941C738D125BE0BC00CF8153 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9428BB0410BB478600DAD287 /* sqSqueakOSXApplication+clipboard.h */;\n\t\tname = \"sqSqueakOSXApplication+clipboard.h: 42\";\n\t\trLen = 11;\n\t\trLoc = 1957;\n\t\trType = 0;\n\t\tvrLen = 2202;\n\t\tvrLoc = 0;\n\t};\n\t941C738E125BE0BC00CF8153 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94554F1E0DF1B65700FB176B /* sqSqueakiPhoneApplication+sound.m */;\n\t\tname = \"sqSqueakiPhoneApplication+sound.m: 72\";\n\t\trLen = 8;\n\t\trLoc = 3235;\n\t\trType = 0;\n\t\tvrLen = 2690;\n\t\tvrLoc = 600;\n\t};\n\t941C738F125BE0BC00CF8153 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94A0E8440DE5EB6E0071C8B9 /* sqSqueakMainApplication+attributes.h */;\n\t\tname = \"sqSqueakMainApplication+attributes.h: 42\";\n\t\trLen = 14;\n\t\trLoc = 1867;\n\t\trType = 0;\n\t\tvrLen = 2027;\n\t\tvrLoc = 0;\n\t};\n\t941C7390125BE0BC00CF8153 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9458525B10F043EB001401E7 /* sqSqueakIPhoneApplication+clipboard.m */;\n\t\tname = \"sqSqueakIPhoneApplication+clipboard.m: 13\";\n\t\trLen = 25;\n\t\trLoc = 287;\n\t\trType = 0;\n\t\tvrLen = 1522;\n\t\tvrLoc = 0;\n\t};\n\t941C7391125BE0BC00CF8153 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 943001270E0D5D670040BB27 /* sqSqueakIPhoneApplication+imageReadWrite.m */;\n\t\tname = \"sqSqueakIPhoneApplication+imageReadWrite.m: 68\";\n\t\trLen = 0;\n\t\trLoc = 2953;\n\t\trType = 0;\n\t\tvrLen = 2560;\n\t\tvrLoc = 1667;\n\t};\n\t941D1C9A0E696FC7005B77B3 /* Entitlements.plist */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavWindowFrame = \"{{15, 166}, {1288, 857}}\";\n\t\t};\n\t};\n\t941DE8041227A7600027D899 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 941DE8051227A7600027D899 /* sqUnixQuartzGL.h */;\n\t\tname = \"sqUnixQuartzGL.h: 10\";\n\t\trLen = 0;\n\t\trLoc = 234;\n\t\trType = 0;\n\t\tvrLen = 2585;\n\t\tvrLoc = 0;\n\t};\n\t941DE8051227A7600027D899 /* sqUnixQuartzGL.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = sqUnixQuartzGL.h;\n\t\tpath = \"/Users/johnmci/Documents/SqueakIA32ABIPlugin/platforms/unix/vm-display-Quartz/sqUnixQuartzGL.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t941DE8061227A7600027D899 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 941DE8071227A7600027D899 /* bluepony.c */;\n\t\tname = \"bluepony.c: 374\";\n\t\trLen = 0;\n\t\trLoc = 10642;\n\t\trType = 0;\n\t\tvrLen = 1270;\n\t\tvrLoc = 10231;\n\t};\n\t941DE8071227A7600027D899 /* bluepony.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = bluepony.c;\n\t\tpath = \"/Volumes/330GB Photos/WWDC10-SampleCode/Mac/MultiGPUIOSurface/bluepony.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94210B280E956AC200C1A314 /* ObjectiveCPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 27417}}\";\n\t\t\tsepNavSelRange = \"{50573, 27}\";\n\t\t\tsepNavVisRange = \"{49405, 1113}\";\n\t\t\tsepNavWindowFrame = \"{{50, 470}, {750, 558}}\";\n\t\t};\n\t};\n\t9421AB550FF1807D008F54E9 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 949EFD7D0FF17FED00F540EB /* ObjectiveCPlugin.c */;\n\t\tname = \"ObjectiveCPlugin.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1049;\n\t\tvrLoc = 0;\n\t};\n\t9424FF3E0DDC8654009912BF /* Squeak */ = {\n\t\tisa = PBXExecutable;\n\t\tactiveArgIndices = (\n\t\t);\n\t\targumentStrings = (\n\t\t);\n\t\tautoAttachOnCrash = 1;\n\t\tbreakpointsEnabled = 0;\n\t\tconfigStateDict = {\n\t\t\t\"PBXLSLaunchAction-0\" = {\n\t\t\t\tPBXLSLaunchAction = 0;\n\t\t\t\tPBXLSLaunchStartAction = 1;\n\t\t\t\tPBXLSLaunchStdioStyle = 2;\n\t\t\t\tPBXLSLaunchStyle = 0;\n\t\t\t\tclass = PBXLSRunLaunchConfig;\n\t\t\t\tcommandLineArgs = (\n\t\t\t\t);\n\t\t\t\tdisplayName = \"Executable Runner\";\n\t\t\t\tenvironment = {\n\t\t\t\t};\n\t\t\t\tidentifier = com.apple.Xcode.launch.runConfig;\n\t\t\t\tremoteHostInfo = \"\";\n\t\t\t\tstartActionInfo = \"\";\n\t\t\t};\n\t\t};\n\t\tcustomDataFormattersEnabled = 1;\n\t\tdataTipCustomDataFormattersEnabled = 1;\n\t\tdataTipShowTypeColumn = 1;\n\t\tdataTipSortType = 0;\n\t\tdebuggerPlugin = GDBDebugging;\n\t\tdisassemblyDisplayState = 0;\n\t\tdylibVariantSuffix = \"\";\n\t\tenableDebugStr = 0;\n\t\tenvironmentEntries = (\n\t\t\t{\n\t\t\t\tactive = NO;\n\t\t\t\tname = NSAutoreleaseHaltOnFreedObject;\n\t\t\t\tvalue = YES;\n\t\t\t},\n\t\t\t{\n\t\t\t\tactive = NO;\n\t\t\t\tname = NSZombieEnabled;\n\t\t\t\tvalue = YES;\n\t\t\t},\n\t\t\t{\n\t\t\t\tactive = NO;\n\t\t\t\tname = NSAutoreleaseFreedObjectCheckEnabled;\n\t\t\t\tvalue = YES;\n\t\t\t},\n\t\t);\n\t\texecutableSystemSymbolLevel = 0;\n\t\texecutableUserSymbolLevel = 0;\n\t\tlibgmallocEnabled = 0;\n\t\tname = Squeak;\n\t\tsavedGlobals = {\n\t\t};\n\t\tshowTypeColumn = 0;\n\t\tsourceDirectories = (\n\t\t);\n\t\tstartupPath = \"<<ProductDirectory>>\";\n\t\tvariableFormatDictionary = {\n\t\t\t$cpsr = 1;\n\t\t\t$cs = 1;\n\t\t\t$d0 = 1;\n\t\t\t$d1 = 1;\n\t\t\t$d10 = 1;\n\t\t\t$d11 = 1;\n\t\t\t$d12 = 1;\n\t\t\t$d13 = 1;\n\t\t\t$d14 = 1;\n\t\t\t$d15 = 1;\n\t\t\t$d2 = 1;\n\t\t\t$d3 = 1;\n\t\t\t$d4 = 1;\n\t\t\t$d5 = 1;\n\t\t\t$d6 = 1;\n\t\t\t$d7 = 1;\n\t\t\t$d8 = 1;\n\t\t\t$d9 = 1;\n\t\t\t$ds = 1;\n\t\t\t$eax = 1;\n\t\t\t$ebp = 1;\n\t\t\t$ebx = 1;\n\t\t\t$ecx = 1;\n\t\t\t$edi = 1;\n\t\t\t$edx = 1;\n\t\t\t$eflags = 1;\n\t\t\t$eip = 1;\n\t\t\t$es = 1;\n\t\t\t$esi = 1;\n\t\t\t$esp = 1;\n\t\t\t$fs = 1;\n\t\t\t$gs = 1;\n\t\t\t$ip = 1;\n\t\t\t$lr = 1;\n\t\t\t$mxcsr = 1;\n\t\t\t$pc = 1;\n\t\t\t$r0 = 1;\n\t\t\t$r1 = 1;\n\t\t\t$r2 = 1;\n\t\t\t$r3 = 1;\n\t\t\t$r4 = 1;\n\t\t\t$r5 = 1;\n\t\t\t$r6 = 1;\n\t\t\t$r7 = 1;\n\t\t\t$r8 = 1;\n\t\t\t$r9 = 1;\n\t\t\t$s0 = 1;\n\t\t\t$s1 = 1;\n\t\t\t$s10 = 1;\n\t\t\t$s11 = 1;\n\t\t\t$s12 = 1;\n\t\t\t$s13 = 1;\n\t\t\t$s14 = 1;\n\t\t\t$s15 = 1;\n\t\t\t$s16 = 1;\n\t\t\t$s17 = 1;\n\t\t\t$s18 = 1;\n\t\t\t$s19 = 1;\n\t\t\t$s2 = 1;\n\t\t\t$s20 = 1;\n\t\t\t$s21 = 1;\n\t\t\t$s22 = 1;\n\t\t\t$s23 = 1;\n\t\t\t$s24 = 1;\n\t\t\t$s25 = 1;\n\t\t\t$s26 = 1;\n\t\t\t$s27 = 1;\n\t\t\t$s28 = 1;\n\t\t\t$s29 = 1;\n\t\t\t$s3 = 1;\n\t\t\t$s30 = 1;\n\t\t\t$s31 = 1;\n\t\t\t$s4 = 1;\n\t\t\t$s5 = 1;\n\t\t\t$s6 = 1;\n\t\t\t$s7 = 1;\n\t\t\t$s8 = 1;\n\t\t\t$s9 = 1;\n\t\t\t$sl = 1;\n\t\t\t$sp = 1;\n\t\t\t$ss = 1;\n\t\t\t\"actually-void *-sqAllocateMemoryMac\" = 2;\n\t\t\t\"data-id-primitiveNSInvocationGetObjectType\" = 1;\n\t\t\t\"dateDifference-sqInt-convertToSqueakTime\" = 1;\n\t\t\t\"fileSize-off_t-sqAllocateMemoryMac\" = 2;\n\t\t\t\"mFormatID-UInt32--[sqSqueakSoundCoreAudio snd_StartRecording:stereo:semaIndex:]\" = 5;\n\t\t\t\"possibleLocation-void *-sqAllocateMemoryMac\" = 2;\n\t\t\t\"returnValue-struct objc_object * volatile-primitivePerformSelector\" = 2;\n\t\t\t\"startOfAnonymousMemory-void *-sqAllocateMemoryMac\" = 1;\n\t\t\t\"startOfAnonymousMemoryPageSize-size_t-sqAllocateMemoryMac\" = 1;\n\t\t\t\"what-long int--[SqueakProxy forwardInvocation:]\" = 1;\n\t\t\t\"why-int-aioPoll\" = 1;\n\t\t};\n\t};\n\t9424FF420DDC8673009912BF /* Source Control */ = {\n\t\tisa = PBXSourceControlManager;\n\t\tfallbackIsa = XCSourceControlManager;\n\t\tisSCMEnabled = 0;\n\t\tscmConfiguration = {\n\t\t\trepositoryName = \"http://svn.isqueak.org/\";\n\t\t\trepositoryNamesForRoots = {\n\t\t\t\t\"\" = SqueakVM;\n\t\t\t};\n\t\t};\n\t};\n\t9424FF430DDC8673009912BF /* Code sense */ = {\n\t\tisa = PBXCodeSenseManager;\n\t\tindexTemplatePath = \"\";\n\t};\n\t9424FF5B0DDCB1C7009912BF /* sqGnu.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 2730}}\";\n\t\t\tsepNavSelRange = \"{11912, 7}\";\n\t\t\tsepNavVisRange = \"{10662, 1331}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {1194, 1019}}\";\n\t\t};\n\t};\n\t9424FF5C0DDCB1C7009912BF /* sqMemoryAccess.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {880, 2171}}\";\n\t\t\tsepNavSelRange = \"{5526, 13}\";\n\t\t\tsepNavVisRange = \"{1516, 4419}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {878, 1019}}\";\n\t\t};\n\t};\n\t9424FF5D0DDCB1C7009912BF /* sq.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 5915}}\";\n\t\t\tsepNavSelRange = \"{17240, 12}\";\n\t\t\tsepNavVisRange = \"{15657, 1848}\";\n\t\t\tsepNavWindowFrame = \"{{73, 4}, {1326, 1010}}\";\n\t\t};\n\t};\n\t9424FF5E0DDCB1C7009912BF /* sqNamedPrims.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 6890}}\";\n\t\t\tsepNavSelRange = \"{7355, 12}\";\n\t\t\tsepNavVisRange = \"{6567, 1343}\";\n\t\t\tsepNavWindowFrame = \"{{15, 38}, {847, 985}}\";\n\t\t};\n\t};\n\t9424FF600DDCB1C7009912BF /* sqVirtualMachine.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 5018}}\";\n\t\t\tsepNavSelRange = \"{12743, 13}\";\n\t\t\tsepNavVisRange = \"{11544, 1334}\";\n\t\t};\n\t};\n\t9424FF610DDCB1C7009912BF /* sqVirtualMachine.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 3796}}\";\n\t\t\tsepNavSelRange = \"{8117, 13}\";\n\t\t\tsepNavVisRange = \"{7104, 1841}\";\n\t\t\tsepNavWindowFrame = \"{{15, 55}, {1438, 968}}\";\n\t\t};\n\t};\n\t9424FF640DDCB1EF009912BF /* sqPlatformSpecific.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 2106}}\";\n\t\t\tsepNavSelRange = \"{4053, 0}\";\n\t\t\tsepNavVisRange = \"{1926, 1426}\";\n\t\t\tsepNavWindowFrame = \"{{38, 19}, {905, 983}}\";\n\t\t};\n\t};\n\t9424FF650DDCB1EF009912BF /* config.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1132, 2587}}\";\n\t\t\tsepNavSelRange = \"{3427, 14}\";\n\t\t\tsepNavVisRange = \"{3136, 845}\";\n\t\t\tsepNavWindowFrame = \"{{38, 17}, {847, 985}}\";\n\t\t};\n\t};\n\t9424FF660DDCB1EF009912BF /* sqConfig.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1132, 651}}\";\n\t\t\tsepNavSelRange = \"{302, 0}\";\n\t\t\tsepNavVisRange = \"{0, 302}\";\n\t\t};\n\t};\n\t9424FF670DDCB202009912BF /* sqMacV2Memory.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1069, 2457}}\";\n\t\t\tsepNavSelRange = \"{2732, 0}\";\n\t\t\tsepNavVisRange = \"{2453, 2079}\";\n\t\t\tsepNavWindowFrame = \"{{518, 45}, {905, 983}}\";\n\t\t};\n\t};\n\t9424FF680DDCB202009912BF /* sqMacV2Memory.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1208, 847}}\";\n\t\t\tsepNavSelRange = \"{2075, 15}\";\n\t\t\tsepNavVisRange = \"{0, 2098}\";\n\t\t\tsepNavWindowFrame = \"{{15, 40}, {905, 983}}\";\n\t\t};\n\t};\n\t9424FF710DDCB234009912BF /* macintoshextra.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 676}}\";\n\t\t\tsepNavSelRange = \"{841, 12}\";\n\t\t\tsepNavVisRange = \"{3, 1655}\";\n\t\t\tsepNavWindowFrame = \"{{539, 15}, {905, 983}}\";\n\t\t};\n\t};\n\t9424FF720DDCB234009912BF /* macintoshextra.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1036, 629}}\";\n\t\t\tsepNavSelRange = \"{183, 15}\";\n\t\t\tsepNavVisRange = \"{0, 198}\";\n\t\t};\n\t};\n\t9424FF750DDCB271009912BF /* osExports.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {802, 587}}\";\n\t\t\tsepNavSelRange = \"{389, 0}\";\n\t\t\tsepNavVisRange = \"{0, 571}\";\n\t\t};\n\t};\n\t94269E6A123EF51B00CB5A57 /* Root.plist */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = text.plist.xml;\n\t\tname = Root.plist;\n\t\tpath = /Users/johnmci/Documents/Squeak3.8.0/platforms/iOS/vm/Settings.bundle/Root.plist;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94269EA0123EF54A00CB5A57 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9471D2E00E04743F00703D45 /* sqSqueakAppDelegate.m */;\n\t\tname = \"sqSqueakAppDelegate.m: 63\";\n\t\trLen = 916;\n\t\trLoc = 2465;\n\t\trType = 0;\n\t\tvrLen = 1597;\n\t\tvrLoc = 2227;\n\t};\n\t94269F10123EF9E800CB5A57 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94F8798F0E6C0C7E00662DEA /* sqSqueakIPhoneInfoPlistInterface.h */;\n\t\tname = \"sqSqueakIPhoneInfoPlistInterface.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 2024;\n\t\tvrLoc = 0;\n\t};\n\t9426A1E7123EFEDA00CB5A57 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9452BDC20F4095DE006410DE /* sqSqueakIPhoneApplication+Network.m */;\n\t\tname = \"sqSqueakIPhoneApplication+Network.m: 36\";\n\t\trLen = 0;\n\t\trLoc = 978;\n\t\trType = 0;\n\t\tvrLen = 1575;\n\t\tvrLoc = 0;\n\t};\n\t9426A1F8123F006800CB5A57 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9424FF670DDCB202009912BF /* sqMacV2Memory.c */;\n\t\tname = \"sqMacV2Memory.c: 74\";\n\t\trLen = 0;\n\t\trLoc = 2732;\n\t\trType = 0;\n\t\tvrLen = 2079;\n\t\tvrLoc = 2453;\n\t};\n\t9426A208123F017D00CB5A57 /* PlistBookmark */ = {\n\t\tisa = PlistBookmark;\n\t\tfRef = 94269E6A123EF51B00CB5A57 /* Root.plist */;\n\t\tfallbackIsa = PBXBookmark;\n\t\tisK = 0;\n\t\tkPath = (\n\t\t);\n\t\tname = /Users/johnmci/Documents/Squeak3.8.0/platforms/iOS/vm/Settings.bundle/Root.plist;\n\t\trLen = 0;\n\t\trLoc = 9223372036854775808;\n\t};\n\t9426A209123F017D00CB5A57 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 942F761C0E0B6B6100848BF2 /* sqSqueakIPhoneApplication.m */;\n\t\tname = \"sqSqueakIPhoneApplication.m: 60\";\n\t\trLen = 0;\n\t\trLoc = 2492;\n\t\trType = 0;\n\t\tvrLen = 2437;\n\t\tvrLoc = 855;\n\t};\n\t9426A228123F01C000CB5A57 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9412CAE50E6C05EC00DB8625 /* sqSqueakInfoPlistInterface.m */;\n\t\tname = \"sqSqueakInfoPlistInterface.m: 64\";\n\t\trLen = 0;\n\t\trLoc = 2410;\n\t\trType = 0;\n\t\tvrLen = 2404;\n\t\tvrLoc = 0;\n\t};\n\t9428BA9510BB440800DAD287 /* sqSqueakOSXClipboardAPI.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 623}}\";\n\t\t\tsepNavSelRange = \"{0, 1814}\";\n\t\t\tsepNavVisRange = \"{0, 1814}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {878, 1019}}\";\n\t\t};\n\t};\n\t9428BA9610BB440800DAD287 /* sqSqueakOSXClipboardAPI.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 871}}\";\n\t\t\tsepNavSelRange = \"{2023, 17}\";\n\t\t\tsepNavVisRange = \"{1165, 1672}\";\n\t\t\tsepNavWindowFrame = \"{{16, 4}, {878, 1019}}\";\n\t\t};\n\t};\n\t9428BB0410BB478600DAD287 /* sqSqueakOSXApplication+clipboard.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 611}}\";\n\t\t\tsepNavSelRange = \"{1933, 22}\";\n\t\t\tsepNavVisRange = \"{61, 2141}\";\n\t\t};\n\t};\n\t9428BB0510BB478600DAD287 /* sqSqueakOSXApplication+clipboard.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 1092}}\";\n\t\t\tsepNavSelRange = \"{3341, 105}\";\n\t\t\tsepNavVisRange = \"{2024, 1589}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {878, 1019}}\";\n\t\t};\n\t};\n\t9428BBAD10BB50E200DAD287 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9428BBAE10BB50E200DAD287 /* sqUnixQuartz.m */;\n\t\tname = \"sqUnixQuartz.m: 1028\";\n\t\trLen = 9;\n\t\trLoc = 28100;\n\t\trType = 0;\n\t\tvrLen = 1398;\n\t\tvrLoc = 27330;\n\t};\n\t9428BBAE10BB50E200DAD287 /* sqUnixQuartz.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = sqUnixQuartz.m;\n\t\tpath = \"/Users/johnmci/Documents/SqueakIA32ABIPlugin/platforms/unix/vm-display-Quartz/sqUnixQuartz.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9428BBE210BB565100DAD287 /* sqUnixQuartz.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = sqUnixQuartz.m;\n\t\tpath = \"/Users/johnmci/Documents/SqueakHydra/SqueakVMMAker/platforms/unix/vm-display-Quartz/zzz/sqUnixQuartz.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9428BBE510BB565100DAD287 /* NSPasteboard.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSPasteboard.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSPasteboard.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9428BC5510BB74BF00DAD287 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAFC410ACC89100F87527 /* string.h */;\n\t\tname = \"string.h: 83\";\n\t\trLen = 44;\n\t\trLoc = 3369;\n\t\trType = 0;\n\t\tvrLen = 1928;\n\t\tvrLoc = 2407;\n\t};\n\t9428BC5710BB74BF00DAD287 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9428BBE510BB565100DAD287 /* NSPasteboard.h */;\n\t\tname = \"NSPasteboard.h: 138\";\n\t\trLen = 50;\n\t\trLoc = 9563;\n\t\trType = 0;\n\t\tvrLen = 3372;\n\t\tvrLoc = 7682;\n\t};\n\t9428BC5C10BB760200DAD287 /* sqSqueakOSXApplication+clipboard.m:59 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 9428BB0510BB478600DAD287 /* sqSqueakOSXApplication+clipboard.m */;\n\t\tfunctionName = \"-clipboardSize\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 59;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 306811863.542986;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 2;\n\t};\n\t9428BCDC10BB937100DAD287 /* sqSqueakFileDirectoryInterface.m:218 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 9452D5DE0E044A9D000AD792 /* sqSqueakFileDirectoryInterface.m */;\n\t\tfunctionName = \"-dir_Delete:length:\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 218;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 306811863.5429969;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 2;\n\t};\n\t9428BD7010BBA1DC00DAD287 /* sqSqueakFileDirectoryInterface.m:179 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 9452D5DE0E044A9D000AD792 /* sqSqueakFileDirectoryInterface.m */;\n\t\tfunctionName = \"-dir_Create:length:\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 179;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 306811863.5430089;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 2;\n\t};\n\t9428BD7710BBA26000DAD287 /* sqSqueakFileDirectoryInterface.m:204 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 9452D5DE0E044A9D000AD792 /* sqSqueakFileDirectoryInterface.m */;\n\t\tfunctionName = \"-dir_Delete:length:\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 204;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 306811863.543022;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 2;\n\t};\n\t9428BF3810BBC2ED00DAD287 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAC3710AB79DA00F87527 /* NSArray.h */;\n\t\tname = \"NSArray.h: 91\";\n\t\trLen = 15;\n\t\trLoc = 4609;\n\t\trType = 0;\n\t\tvrLen = 2275;\n\t\tvrLoc = 3251;\n\t};\n\t9428BF4F10BBCAAC00DAD287 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAC3C10AB79DA00F87527 /* NSDictionary.h */;\n\t\tname = \"NSDictionary.h: 75\";\n\t\trLen = 19;\n\t\trLoc = 3192;\n\t\trType = 0;\n\t\tvrLen = 2430;\n\t\tvrLoc = 1218;\n\t};\n\t942ABD9410AA1F8E0086D908 /* CGGeometry.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = CGGeometry.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Headers/CGGeometry.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t942ABE0910AA21270086D908 /* NSView.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSView.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSView.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t942ABEC410AA34820086D908 /* sqMacUIEventsUniversal.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqMacUIEventsUniversal.c;\n\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/platforms/Mac OS/vm/sqMacUIEventsUniversal.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t942ABEC510AA34820086D908 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 942ABEC610AA34820086D908 /* sqMacHostWindow.h */;\n\t\tname = \"sqMacHostWindow.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 845;\n\t\tvrLoc = 0;\n\t};\n\t942ABEC610AA34820086D908 /* sqMacHostWindow.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = sqMacHostWindow.h;\n\t\tpath = \"/Volumes/pm/Mail/IMAP-johnmci@smalltalkconsulting.com@imap.gmail.com/[Gmail]/Sent Mail.imapmbox/Attachments/2958644/8/sqMacHostWindow.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t942B77300EA7E642004B266D /* interp.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = interp.c;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/Squeak3.8.1-6747-basic#2/src32iPhone/vm/interp.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t942B77330EA7E642004B266D /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 942B77340EA7E642004B266D /* sqWin32Prefs.c */;\n\t\tname = \"sqWin32Prefs.c: 184\";\n\t\trLen = 15;\n\t\trLoc = 6379;\n\t\trType = 0;\n\t\tvrLen = 1782;\n\t\tvrLoc = 5482;\n\t};\n\t942B77340EA7E642004B266D /* sqWin32Prefs.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqWin32Prefs.c;\n\t\tpath = /Users/johnmci/Documents/SqueakHydra/platforms/win32/vm/sqWin32Prefs.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t942B77380EA7E642004B266D /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94554E6D0DF1171500FB176B /* sqWin32Window.c */;\n\t\tname = \"sqWin32Window.c: 65\";\n\t\trLen = 19;\n\t\trLoc = 2258;\n\t\trType = 0;\n\t\tvrLen = 2119;\n\t\tvrLoc = 1403;\n\t};\n\t942B778B0EA7EF0B004B266D /* sqUnixX11.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqUnixX11.c;\n\t\tpath = \"/Users/johnmci/Documents/SqueakQuicktimePlugin/platforms/unix/vm-display-X11/sqUnixX11.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t942B779B0EA7F2E0004B266D /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94554E640DF1171500FB176B /* sqUnixX11.c */;\n\t\tname = \"sqUnixX11.c: 1316\";\n\t\trLen = 6;\n\t\trLoc = 37289;\n\t\trType = 0;\n\t\tvrLen = 1058;\n\t\tvrLoc = 36631;\n\t};\n\t942B779C0EA7F2E0004B266D /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 942B778B0EA7EF0B004B266D /* sqUnixX11.c */;\n\t\tname = \"sqUnixX11.c: 1332\";\n\t\trLen = 6;\n\t\trLoc = 37592;\n\t\trType = 0;\n\t\tvrLen = 1035;\n\t\tvrLoc = 36654;\n\t};\n\t942B77B90EA800E1004B266D /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 942B77BA0EA800E1004B266D /* sqWin32Alloc.c */;\n\t\tname = \"sqWin32Alloc.c: 55\";\n\t\trLen = 10;\n\t\trLoc = 2096;\n\t\trType = 0;\n\t\tvrLen = 1633;\n\t\tvrLoc = 2014;\n\t};\n\t942B77BA0EA800E1004B266D /* sqWin32Alloc.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqWin32Alloc.c;\n\t\tpath = /Users/johnmci/Documents/SqueakHydra/platforms/win32/vm/sqWin32Alloc.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t942B77BB0EA800E1004B266D /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 942B77BC0EA800E1004B266D /* sqWin32Alloc.h */;\n\t\tname = \"sqWin32Alloc.h: 15\";\n\t\trLen = 18;\n\t\trLoc = 487;\n\t\trType = 0;\n\t\tvrLen = 955;\n\t\tvrLoc = 0;\n\t};\n\t942B77BC0EA800E1004B266D /* sqWin32Alloc.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = sqWin32Alloc.h;\n\t\tpath = /Users/johnmci/Documents/SqueakHydra/platforms/win32/vm/sqWin32Alloc.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t942CF43710BFCD52008F9BB7 /* sqGnu.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = sqGnu.h;\n\t\tpath = /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/platforms/unix/vm/sqGnu.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t942CF46B10BCE44B009BD905 /* NSWindowController.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSWindowController.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSWindowController.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t942F452E123BF48A002B05DF /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9452D6070E044D2F000AD792 /* sqSqueakEventsAPI.m */;\n\t\tname = \"sqSqueakEventsAPI.m: 47\";\n\t\trLen = 48;\n\t\trLoc = 1984;\n\t\trType = 0;\n\t\tvrLen = 2086;\n\t\tvrLoc = 573;\n\t};\n\t942F4564123BF600002B05DF /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9452D5E40E044A9D000AD792 /* sqSqueakMainApplication.m */;\n\t\tname = \"sqSqueakMainApplication.m: 104\";\n\t\trLen = 11;\n\t\trLoc = 3377;\n\t\trType = 0;\n\t\tvrLen = 1507;\n\t\tvrLoc = 3128;\n\t};\n\t942F4752123C09BF002B05DF /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 940CE8540DFCE2D200EBA91B /* SqueakUIController.h */;\n\t\tname = \"SqueakUIController.h: 6\";\n\t\trLen = 1688;\n\t\trLoc = 95;\n\t\trType = 0;\n\t\tvrLen = 1839;\n\t\tvrLoc = 0;\n\t};\n\t942F6FFC1102F5A300A0A349 /* NSNull.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSNull.h;\n\t\tpath = /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSNull.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t942F75D10E0B67AD00848BF2 /* sqSqueakVmAndImagePathAPI.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1169, 764}}\";\n\t\t\tsepNavSelRange = \"{1777, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1781}\";\n\t\t\tsepNavWindowFrame = \"{{913, 18}, {694, 1008}}\";\n\t\t};\n\t};\n\t942F75D20E0B67AD00848BF2 /* sqSqueakVmAndImagePathAPI.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 1053}}\";\n\t\t\tsepNavSelRange = \"{2669, 0}\";\n\t\t\tsepNavVisRange = \"{2061, 1010}\";\n\t\t\tsepNavWindowFrame = \"{{15, 8}, {1012, 1015}}\";\n\t\t};\n\t};\n\t942F761B0E0B6B6100848BF2 /* sqSqueakIPhoneApplication.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1378, 895}}\";\n\t\t\tsepNavSelRange = \"{1881, 65}\";\n\t\t\tsepNavVisRange = \"{0, 1955}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {1425, 1023}}\";\n\t\t};\n\t};\n\t942F761C0E0B6B6100848BF2 /* sqSqueakIPhoneApplication.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1378, 1053}}\";\n\t\t\tsepNavSelRange = \"{2004, 25}\";\n\t\t\tsepNavVisRange = \"{465, 2827}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {1425, 1023}}\";\n\t\t};\n\t};\n\t942F76310E0B6C7600848BF2 /* sqSqueakMainApplication+attributes.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 1352}}\";\n\t\t\tsepNavSelRange = \"{1982, 14}\";\n\t\t\tsepNavVisRange = \"{1842, 1584}\";\n\t\t\tsepNavWindowFrame = \"{{38, 4}, {997, 998}}\";\n\t\t};\n\t};\n\t942F76350E0B6CEF00848BF2 /* sqSqueakIPhoneApplication+attributes.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 572}}\";\n\t\t\tsepNavSelRange = \"{1882, 14}\";\n\t\t\tsepNavVisRange = \"{0, 1953}\";\n\t\t};\n\t};\n\t943001260E0D5D670040BB27 /* sqSqueakIPhoneApplication+imageReadWrite.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1036, 652}}\";\n\t\t\tsepNavSelRange = \"{1819, 94}\";\n\t\t\tsepNavVisRange = \"{0, 1919}\";\n\t\t\tsepNavWindowFrame = \"{{337, 21}, {1288, 857}}\";\n\t\t};\n\t};\n\t943001270E0D5D670040BB27 /* sqSqueakIPhoneApplication+imageReadWrite.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {985, 1664}}\";\n\t\t\tsepNavSelRange = \"{2953, 0}\";\n\t\t\tsepNavVisRange = \"{1667, 2560}\";\n\t\t\tsepNavWindowFrame = \"{{642, 10}, {1017, 978}}\";\n\t\t};\n\t};\n\t943001A30E0D600C0040BB27 /* sqSqueakIPhoneFileDirectoryInterface.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1036, 652}}\";\n\t\t\tsepNavSelRange = \"{1810, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1951}\";\n\t\t};\n\t};\n\t943001A40E0D600C0040BB27 /* sqSqueakIPhoneFileDirectoryInterface.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1357, 884}}\";\n\t\t\tsepNavSelRange = \"{7, 38}\";\n\t\t\tsepNavVisRange = \"{294, 572}\";\n\t\t\tsepNavWindowFrame = \"{{38, 4}, {1274, 998}}\";\n\t\t};\n\t};\n\t9430325510BD0B6D0045D33B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAB0410AB6DC000F87527 /* NSApplication.h */;\n\t\tname = \"NSApplication.h: 314\";\n\t\trLen = 11;\n\t\trLoc = 14168;\n\t\trType = 0;\n\t\tvrLen = 2745;\n\t\tvrLoc = 14077;\n\t};\n\t9430329A10BD103B0045D33B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAF7D10ACC0D900F87527 /* NSPathUtilities.h */;\n\t\tname = \"NSPathUtilities.h: 26\";\n\t\trLen = 25;\n\t\trLoc = 696;\n\t\trType = 0;\n\t\tvrLen = 1577;\n\t\tvrLoc = 0;\n\t};\n\t9430329B10BD103B0045D33B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAC0310AB759300F87527 /* NSURL.h */;\n\t\tname = \"NSURL.h: 36\";\n\t\trLen = 5;\n\t\trLoc = 1448;\n\t\trType = 0;\n\t\tvrLen = 2612;\n\t\tvrLoc = 0;\n\t};\n\t943198450DDF4D9800EB8E60 /* sqUnixQuartz.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = sqUnixQuartz.m;\n\t\tpath = \"/Users/johnmci/Documents/SqueakHydra/platforms/unix/vm-display-Quartz/sqUnixQuartz.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9431CA91123B509800C97383 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9439F9BA123B3BDB0003F15C /* GLString.m */;\n\t\tname = \"GLString.m: 213\";\n\t\trLen = 15;\n\t\trLoc = 8673;\n\t\trType = 0;\n\t\tvrLen = 1891;\n\t\tvrLoc = 7793;\n\t};\n\t9431CB57123B5AF100C97383 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 940BE5791239F10000674A11 /* SqueakUIViewCALayer.h */;\n\t\tname = \"SqueakUIViewCALayer.h: 40\";\n\t\trLen = 26;\n\t\trLoc = 1808;\n\t\trType = 0;\n\t\tvrLen = 2012;\n\t\tvrLoc = 0;\n\t};\n\t9431CBB2123B5E0400C97383 /* SqueakV41.sources */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {3988, 5.68763e+06}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{752, 3467}\";\n\t\t};\n\t};\n\t9431CBD2123B5F9900C97383 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9431CBB2123B5E0400C97383 /* SqueakV41.sources */;\n\t\tname = \"SqueakV41.sources: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 3467;\n\t\tvrLoc = 752;\n\t};\n\t94329B2F122727BC0090298B /* stack_logging.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = stack_logging.c;\n\t\tpath = \"/Users/johnmci/Shared/Libc-594.9.1/gen/stack_logging.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94329B31122727BC0090298B /* osgdb_ImageIO.cpp */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.cpp.cpp;\n\t\tname = osgdb_ImageIO.cpp;\n\t\tpath = /Users/johnmci/Shared/osgdb_ImageIO.cpp;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94329B33122727BC0090298B /* stack_logging_disk.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = stack_logging_disk.c;\n\t\tpath = \"/Users/johnmci/Shared/Libc-594.9.1/gen/stack_logging_disk.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94329B3E122729BA0090298B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94329B33122727BC0090298B /* stack_logging_disk.c */;\n\t\tname = \"stack_logging_disk.c: 14\";\n\t\trLen = 0;\n\t\trLoc = 615;\n\t\trType = 0;\n\t\tvrLen = 2182;\n\t\tvrLoc = 0;\n\t};\n\t94329B3F122729BA0090298B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94329B31122727BC0090298B /* osgdb_ImageIO.cpp */;\n\t\tname = \"osgdb_ImageIO.cpp: 26\";\n\t\trLen = 0;\n\t\trLoc = 1170;\n\t\trType = 0;\n\t\tvrLen = 2416;\n\t\tvrLoc = 0;\n\t};\n\t94329B40122729BA0090298B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94329B2F122727BC0090298B /* stack_logging.c */;\n\t\tname = \"stack_logging.c: 11\";\n\t\trLen = 0;\n\t\trLoc = 478;\n\t\trType = 0;\n\t\tvrLen = 2414;\n\t\tvrLoc = 0;\n\t};\n\t94329B5412272A0C0090298B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94329B5512272A0C0090298B /* NSZone.h */;\n\t\tname = \"NSZone.h: 59\";\n\t\trLen = 17;\n\t\trLoc = 2898;\n\t\trType = 0;\n\t\tvrLen = 3026;\n\t\tvrLoc = 0;\n\t};\n\t94329B5512272A0C0090298B /* NSZone.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSZone.h;\n\t\tpath = /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSZone.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94329D6412274F350090298B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94329D6512274F350090298B /* ClientOpenGLView.m */;\n\t\tname = \"ClientOpenGLView.m: 145\";\n\t\trLen = 13;\n\t\trLoc = 4761;\n\t\trType = 0;\n\t\tvrLen = 1608;\n\t\tvrLoc = 3748;\n\t};\n\t94329D6512274F350090298B /* ClientOpenGLView.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = ClientOpenGLView.m;\n\t\tpath = \"/Volumes/330GB Photos/WWDC10-SampleCode/Mac/MultiGPUIOSurface/ClientOpenGLView.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94329D6612274F350090298B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94329D6712274F350090298B /* sqOpenGLRenderer.c */;\n\t\tname = \"sqOpenGLRenderer.c: 95\";\n\t\trLen = 0;\n\t\trLoc = 3086;\n\t\trType = 0;\n\t\tvrLen = 2590;\n\t\tvrLoc = 2485;\n\t};\n\t94329D6712274F350090298B /* sqOpenGLRenderer.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqOpenGLRenderer.c;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/Squeak3.0 Folder/Squeak 3.1.1/sqOpenGLRenderer.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94329D6812274F350090298B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94329D6912274F350090298B /* OpenGLRenderer.m */;\n\t\tname = \"OpenGLRenderer.m: 16\";\n\t\trLen = 0;\n\t\trLoc = 729;\n\t\trType = 0;\n\t\tvrLen = 2048;\n\t\tvrLoc = 9387;\n\t};\n\t94329D6912274F350090298B /* OpenGLRenderer.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = OpenGLRenderer.m;\n\t\tpath = \"/Volumes/330GB Photos/WWDC10-SampleCode/Mac/GLEssentials/Classes/OpenGLRenderer.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94329D6A12274F350090298B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94329D6B12274F350090298B /* sqUnixQuartzGL.h */;\n\t\tname = \"sqUnixQuartzGL.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 3333;\n\t\tvrLoc = 0;\n\t};\n\t94329D6B12274F350090298B /* sqUnixQuartzGL.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = sqUnixQuartzGL.h;\n\t\tpath = \"/Volumes/330GB Photos/Cog Before Aug 2010 changes/platforms/unix/vm-display-Quartz/sqUnixQuartzGL.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94329D6D12274F350090298B /* sqUnixQuartz.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = sqUnixQuartz.m;\n\t\tpath = \"/Volumes/330GB Photos/Cog Before Aug 2010 changes/platforms/unix/vm-display-Quartz/sqUnixQuartz.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94329D6F12274F350090298B /* SqView.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = SqView.h;\n\t\tpath = \"/Users/johnmci/Work In Progress/smalltalk/CocoaSqueakSource/SqueakAppKit/SqView.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94329E0E12275AC30090298B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94329D6F12274F350090298B /* SqView.h */;\n\t\tname = \"SqView.h: 4\";\n\t\trLen = 1;\n\t\trLoc = 42;\n\t\trType = 0;\n\t\tvrLen = 1636;\n\t\tvrLoc = 0;\n\t};\n\t94329E0F12275AC30090298B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94329D6D12274F350090298B /* sqUnixQuartz.m */;\n\t\tname = \"sqUnixQuartz.m: 162\";\n\t\trLen = 8;\n\t\trLoc = 5164;\n\t\trType = 0;\n\t\tvrLen = 1838;\n\t\tvrLoc = 3983;\n\t};\n\t94329FEA122765A60090298B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9402DD5F10CE0C16005C2102 /* SqViewBitmapConversion.m */;\n\t\tname = \"SqViewBitmapConversion.m: 203\";\n\t\trLen = 26;\n\t\trLoc = 7753;\n\t\trType = 0;\n\t\tvrLen = 2204;\n\t\tvrLoc = 7161;\n\t};\n\t94360A8C10E84CC90060221A /* NSException.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSException.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSException.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9439F48C123ABD080003F15C /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9452D5D90E044A9D000AD792 /* sqMacV2Time.c */;\n\t\tname = \"sqMacV2Time.c: 153\";\n\t\trLen = 36;\n\t\trLoc = 4434;\n\t\trType = 0;\n\t\tvrLen = 1421;\n\t\tvrLoc = 3666;\n\t};\n\t9439F9BA123B3BDB0003F15C /* GLString.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = GLString.m;\n\t\tpath = \"/Volumes/330GB Photos/WWDC10-SampleCode/Mac/CocoaGL/GLString.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t943B9C9E1235C5120056205E /* sqMacHostWindow.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1039, 2496}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 2559}\";\n\t\t};\n\t};\n\t943B9D191235C5FE0056205E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94A1B0050E0DBE2400EB5EFC /* sqSqueakMainApplication+events.h */;\n\t\tname = \"sqSqueakMainApplication+events.h: 19\";\n\t\trLen = 0;\n\t\trLoc = 788;\n\t\trType = 0;\n\t\tvrLen = 2027;\n\t\tvrLoc = 0;\n\t};\n\t944069CD10E6B63200353B27 /* MacMenubarPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 22139}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 873}\";\n\t\t};\n\t};\n\t94476EC40EBFAB320095D6D7 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E659140DDD03FE00358328 /* SoundGenerationPlugin.c */;\n\t\tname = \"SoundGenerationPlugin.c: 176\";\n\t\trLen = 0;\n\t\trLoc = 5124;\n\t\trType = 0;\n\t\tvrLen = 999;\n\t\tvrLoc = 4556;\n\t};\n\t9448940B10F3E8FF00FB3EC8 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 943198450DDF4D9800EB8E60 /* sqUnixQuartz.m */;\n\t\tname = \"sqUnixQuartz.m: 406\";\n\t\trLen = 36;\n\t\trLoc = 11460;\n\t\trType = 0;\n\t\tvrLen = 1419;\n\t\tvrLoc = 10879;\n\t};\n\t944895AD10F4081300FB3EC8 /* PharoV10.sources */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 3.55387e+06}}\";\n\t\t\tsepNavSelRange = \"{3217524, 3}\";\n\t\t\tsepNavVisRange = \"{3217191, 992}\";\n\t\t};\n\t};\n\t944B0D451248105F00CA74EA /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947E647A10AA100900D3B69E /* SqueakOSXAppDelegate.m */;\n\t\tname = \"SqueakOSXAppDelegate.m: 60\";\n\t\trLen = 17;\n\t\trLoc = 2423;\n\t\trType = 0;\n\t\tvrLen = 2306;\n\t\tvrLoc = 982;\n\t};\n\t944B0D461248105F00CA74EA /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 940BE57A1239F10000674A11 /* SqueakUIViewCALayer.m */;\n\t\tname = \"SqueakUIViewCALayer.m: 102\";\n\t\trLen = 13;\n\t\trLoc = 3908;\n\t\trType = 0;\n\t\tvrLen = 2330;\n\t\tvrLoc = 2527;\n\t};\n\t944EB0211228E96100EF9C64 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947E96281228DB0D0065B3BA /* sqMacOpenGL.c */;\n\t\tname = \"sqMacOpenGL.c: 36\";\n\t\trLen = 26;\n\t\trLoc = 1218;\n\t\trType = 0;\n\t\tvrLen = 1982;\n\t\tvrLoc = 0;\n\t};\n\t9451E5AE123F051700B4119F /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94F879900E6C0C7E00662DEA /* sqSqueakIPhoneInfoPlistInterface.m */;\n\t\tname = \"sqSqueakIPhoneInfoPlistInterface.m: 73\";\n\t\trLen = 0;\n\t\trLoc = 3179;\n\t\trType = 0;\n\t\tvrLen = 2316;\n\t\tvrLoc = 2263;\n\t};\n\t9451E5C5123F062B00B4119F /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94A3488D0DDCCCC700D1D4A9 /* sqSqueakScreenAPI.m */;\n\t\tname = \"sqSqueakScreenAPI.m: 81\";\n\t\trLen = 0;\n\t\trLoc = 2640;\n\t\trType = 0;\n\t\tvrLen = 1683;\n\t\tvrLoc = 2078;\n\t};\n\t9451E5D5123F07C100B4119F /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9471D2720E04703B00703D45 /* sqSqueakScreenAndWindow.m */;\n\t\tname = \"sqSqueakScreenAndWindow.m: 167\";\n\t\trLen = 0;\n\t\trLoc = 5194;\n\t\trType = 0;\n\t\tvrLen = 2293;\n\t\tvrLoc = 4247;\n\t};\n\t9452BDC10F4095DE006410DE /* sqSqueakIPhoneApplication+Network.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1036, 652}}\";\n\t\t\tsepNavSelRange = \"{409, 0}\";\n\t\t\tsepNavVisRange = \"{0, 562}\";\n\t\t};\n\t};\n\t9452BDC20F4095DE006410DE /* sqSqueakIPhoneApplication+Network.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {869, 845}}\";\n\t\t\tsepNavSelRange = \"{978, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1575}\";\n\t\t};\n\t};\n\t9452D5D70E044A9D000AD792 /* Queue.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 845}}\";\n\t\t\tsepNavSelRange = \"{2692, 0}\";\n\t\t\tsepNavVisRange = \"{1337, 1516}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {1593, 1019}}\";\n\t\t};\n\t};\n\t9452D5D80E044A9D000AD792 /* Queue.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {970, 1612}}\";\n\t\t\tsepNavSelRange = \"{3222, 18}\";\n\t\t\tsepNavVisRange = \"{2686, 983}\";\n\t\t\tsepNavWindowFrame = \"{{38, 12}, {1017, 978}}\";\n\t\t};\n\t};\n\t9452D5D90E044A9D000AD792 /* sqMacV2Time.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1394, 2366}}\";\n\t\t\tsepNavSelRange = \"{2909, 23}\";\n\t\t\tsepNavVisRange = \"{2158, 1300}\";\n\t\t\tsepNavWindowFrame = \"{{239, 129}, {1441, 887}}\";\n\t\t};\n\t};\n\t9452D5DA0E044A9D000AD792 /* sqMacV2Time.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {831, 626}}\";\n\t\t\tsepNavSelRange = \"{72, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1791}\";\n\t\t};\n\t};\n\t9452D5DB0E044A9D000AD792 /* sqSqueakFileDirectoryAPI.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 572}}\";\n\t\t\tsepNavSelRange = \"{1792, 10}\";\n\t\t\tsepNavVisRange = \"{3, 1942}\";\n\t\t};\n\t};\n\t9452D5DC0E044A9D000AD792 /* sqSqueakFileDirectoryAPI.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1111, 2665}}\";\n\t\t\tsepNavSelRange = \"{4819, 15}\";\n\t\t\tsepNavVisRange = \"{3477, 2333}\";\n\t\t\tsepNavWindowFrame = \"{{15, 40}, {905, 983}}\";\n\t\t};\n\t};\n\t9452D5DD0E044A9D000AD792 /* sqSqueakFileDirectoryInterface.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 1170}}\";\n\t\t\tsepNavSelRange = \"{3565, 19}\";\n\t\t\tsepNavVisRange = \"{2087, 1518}\";\n\t\t\tsepNavWindowFrame = \"{{15, 8}, {1012, 1015}}\";\n\t\t};\n\t};\n\t9452D5DE0E044A9D000AD792 /* sqSqueakFileDirectoryInterface.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1259, 4251}}\";\n\t\t\tsepNavSelRange = \"{5775, 0}\";\n\t\t\tsepNavVisRange = \"{4703, 1866}\";\n\t\t\tsepNavWindowFrame = \"{{406, 9}, {1334, 1019}}\";\n\t\t};\n\t};\n\t9452D5DF0E044A9D000AD792 /* sqSqueakMainApp.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 1976}}\";\n\t\t\tsepNavSelRange = \"{2096, 153}\";\n\t\t\tsepNavVisRange = \"{1167, 1649}\";\n\t\t};\n\t};\n\t9452D5E00E044A9D000AD792 /* sqSqueakMainApp.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1132, 666}}\";\n\t\t\tsepNavSelRange = \"{1322, 449}\";\n\t\t\tsepNavVisRange = \"{0, 1868}\";\n\t\t};\n\t};\n\t9452D5E10E044A9D000AD792 /* sqSqueakMainApplication+vmAndImagePath.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {850, 778}}\";\n\t\t\tsepNavSelRange = \"{2087, 0}\";\n\t\t\tsepNavVisRange = \"{0, 2202}\";\n\t\t\tsepNavWindowFrame = \"{{15, 15}, {694, 1008}}\";\n\t\t};\n\t};\n\t9452D5E20E044A9D000AD792 /* sqSqueakMainApplication+vmAndImagePath.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 1378}}\";\n\t\t\tsepNavSelRange = \"{2337, 4}\";\n\t\t\tsepNavVisRange = \"{2021, 1680}\";\n\t\t\tsepNavWindowFrame = \"{{15, 15}, {694, 1008}}\";\n\t\t};\n\t};\n\t9452D5E30E044A9D000AD792 /* sqSqueakMainApplication.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 1157}}\";\n\t\t\tsepNavSelRange = \"{2228, 0}\";\n\t\t\tsepNavVisRange = \"{1856, 1684}\";\n\t\t\tsepNavWindowFrame = \"{{264, 4}, {694, 1008}}\";\n\t\t};\n\t};\n\t9452D5E40E044A9D000AD792 /* sqSqueakMainApplication.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {858, 2704}}\";\n\t\t\tsepNavSelRange = \"{2396, 0}\";\n\t\t\tsepNavVisRange = \"{1427, 1757}\";\n\t\t\tsepNavWindowFrame = \"{{657, 4}, {905, 983}}\";\n\t\t};\n\t};\n\t9452D6010E044CB3000AD792 /* sqSqueakAttributesAPI.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {936, 766}}\";\n\t\t\tsepNavSelRange = \"{88, 1700}\";\n\t\t\tsepNavVisRange = \"{0, 1790}\";\n\t\t};\n\t};\n\t9452D6020E044CB3000AD792 /* sqSqueakAttributesAPI.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {873, 754}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 2110}\";\n\t\t};\n\t};\n\t9452D6060E044D2F000AD792 /* sqSqueakEventsAPI.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1036, 652}}\";\n\t\t\tsepNavSelRange = \"{78, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1785}\";\n\t\t};\n\t};\n\t9452D6070E044D2F000AD792 /* sqSqueakEventsAPI.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1538, 1118}}\";\n\t\t\tsepNavSelRange = \"{2380, 11}\";\n\t\t\tsepNavVisRange = \"{1779, 1225}\";\n\t\t\tsepNavWindowFrame = \"{{668, 13}, {1012, 1015}}\";\n\t\t};\n\t};\n\t9452D7630E0452D3000AD792 /* sqiPhoneScreenAndWindow.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {838, 691}}\";\n\t\t\tsepNavSelRange = \"{1872, 63}\";\n\t\t\tsepNavVisRange = \"{0, 1943}\";\n\t\t\tsepNavWindowFrame = \"{{15, 49}, {1346, 974}}\";\n\t\t};\n\t};\n\t9452D7640E0452D3000AD792 /* sqiPhoneScreenAndWindow.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1081, 871}}\";\n\t\t\tsepNavSelRange = \"{2228, 12}\";\n\t\t\tsepNavVisRange = \"{0, 2310}\";\n\t\t\tsepNavWindowFrame = \"{{802, 9}, {878, 1019}}\";\n\t\t};\n\t};\n\t94547F160DE0AC7D00DD588F /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94547F170DE0AC7D00DD588F /* sqMacMain.c */;\n\t\tname = \"sqMacMain.c: 486\";\n\t\trLen = 37;\n\t\trLoc = 19144;\n\t\trType = 0;\n\t\tvrLen = 1112;\n\t\tvrLoc = 18071;\n\t};\n\t94547F170DE0AC7D00DD588F /* sqMacMain.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqMacMain.c;\n\t\tpath = \"/Users/johnmci/Documents/SqueakHydra/platforms/Mac OS/vm/sqMacMain.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9454809B0DE2945300DD588F /* sqMacUnixFileInterface.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqMacUnixFileInterface.c;\n\t\tpath = \"/Users/johnmci/Documents/SqueakHydra/platforms/Mac OS/plugins/FilePlugin/sqMacUnixFileInterface.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t945481A60DE2A79200DD588F /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9454809B0DE2945300DD588F /* sqMacUnixFileInterface.c */;\n\t\tname = \"sqMacUnixFileInterface.c: 512\";\n\t\trLen = 40;\n\t\trLoc = 16278;\n\t\trType = 0;\n\t\tvrLen = 1679;\n\t\tvrLoc = 15123;\n\t};\n\t94554E640DF1171500FB176B /* sqUnixX11.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqUnixX11.c;\n\t\tpath = \"/Users/johnmci/Documents/SqueakSpellingPlugin/platforms/unix/vm-display-X11/sqUnixX11.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94554E670DF1171500FB176B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94554E680DF1171500FB176B /* sqUnixX11.c */;\n\t\tname = \"sqUnixX11.c: 2319\";\n\t\trLen = 12;\n\t\trLoc = 63841;\n\t\trType = 0;\n\t\tvrLen = 1057;\n\t\tvrLoc = 63650;\n\t};\n\t94554E680DF1171500FB176B /* sqUnixX11.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqUnixX11.c;\n\t\tpath = \"/Users/johnmci/Documents/SqueakServicesPlugin/platforms/unix/vm-display-X11/sqUnixX11.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94554E690DF1171500FB176B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94554E6A0DF1171500FB176B /* sqMacWindow.c */;\n\t\tname = \"sqMacWindow.c: 797\";\n\t\trLen = 17;\n\t\trLoc = 29608;\n\t\trType = 0;\n\t\tvrLen = 994;\n\t\tvrLoc = 29083;\n\t};\n\t94554E6A0DF1171500FB176B /* sqMacWindow.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqMacWindow.c;\n\t\tpath = \"/Users/johnmci/Documents/SqueakServicesPlugin/platforms/Mac OS/vm/sqMacWindow.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94554E6D0DF1171500FB176B /* sqWin32Window.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqWin32Window.c;\n\t\tpath = /Users/johnmci/Documents/SqueakServicesPlugin/platforms/win32/vm/sqWin32Window.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94554E7F0DF1171500FB176B /* sqUnixMain.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqUnixMain.c;\n\t\tpath = /Users/johnmci/Documents/SqueakHydra/SqueakVMMAker/platforms/unix/vm/sqUnixMain.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94554EB80DF1A86A00FB176B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94554E7F0DF1171500FB176B /* sqUnixMain.c */;\n\t\tname = \"sqUnixMain.c: 526\";\n\t\trLen = 12;\n\t\trLoc = 12689;\n\t\trType = 0;\n\t\tvrLen = 1587;\n\t\tvrLoc = 12009;\n\t};\n\t94554F1D0DF1B65700FB176B /* sqSqueakIPhoneApplication+sound.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1036, 652}}\";\n\t\t\tsepNavSelRange = \"{1902, 6}\";\n\t\t\tsepNavVisRange = \"{0, 1915}\";\n\t\t\tsepNavWindowFrame = \"{{15, 22}, {1064, 1001}}\";\n\t\t};\n\t};\n\t94554F1E0DF1B65700FB176B /* sqSqueakiPhoneApplication+sound.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {869, 1001}}\";\n\t\t\tsepNavSelRange = \"{3235, 8}\";\n\t\t\tsepNavVisRange = \"{600, 2690}\";\n\t\t};\n\t};\n\t9456C24F10B2F268000BF3DE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 942ABD9410AA1F8E0086D908 /* CGGeometry.h */;\n\t\tname = \"CGGeometry.h: 29\";\n\t\trLen = 16;\n\t\trLoc = 429;\n\t\trType = 0;\n\t\tvrLen = 1403;\n\t\tvrLoc = 0;\n\t};\n\t9456C25A10B2F2C9000BF3DE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9456C25B10B2F2C9000BF3DE /* types.h */;\n\t\tname = \"types.h: 83\";\n\t\trLen = 25;\n\t\trLoc = 3624;\n\t\trType = 0;\n\t\tvrLen = 1820;\n\t\tvrLoc = 2321;\n\t};\n\t9456C25B10B2F2C9000BF3DE /* types.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = types.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/usr/include/i386/types.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9456C2F910B32D2A000BF3DE /* NSString.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSString.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSString.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9456C32210B32F43000BF3DE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9456C32310B32F43000BF3DE /* NSClipView.h */;\n\t\tname = \"NSClipView.h: 22\";\n\t\trLen = 9;\n\t\trLoc = 509;\n\t\trType = 0;\n\t\tvrLen = 2046;\n\t\tvrLoc = 0;\n\t};\n\t9456C32310B32F43000BF3DE /* NSClipView.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSClipView.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSClipView.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9456C34E10B33618000BF3DE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9456C34F10B33618000BF3DE /* CALayer.h */;\n\t\tname = \"CALayer.h: 169\";\n\t\trLen = 35;\n\t\trLoc = 5389;\n\t\trType = 0;\n\t\tvrLen = 2280;\n\t\tvrLoc = 4266;\n\t};\n\t9456C34F10B33618000BF3DE /* CALayer.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = CALayer.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/QuartzCore.framework/Versions/A/Headers/CALayer.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9456C3CB10B341F9000BF3DE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9456C3CC10B341F9000BF3DE /* NSAffineTransform.h */;\n\t\tname = \"NSAffineTransform.h: 39\";\n\t\trLen = 8;\n\t\trLoc = 933;\n\t\trType = 0;\n\t\tvrLen = 1411;\n\t\tvrLoc = 0;\n\t};\n\t9456C3CC10B341F9000BF3DE /* NSAffineTransform.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSAffineTransform.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSAffineTransform.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94584F6110F020BD001401E7 /* ClipboardExtendedPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1317, 3289}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 883}\";\n\t\t};\n\t};\n\t94584FD910F02378001401E7 /* sqMacExtendedClipboard.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1062, 1469}}\";\n\t\t\tsepNavSelRange = \"{2557, 0}\";\n\t\t\tsepNavVisRange = \"{2199, 1891}\";\n\t\t\tsepNavWindowFrame = \"{{242, 4}, {1438, 968}}\";\n\t\t};\n\t};\n\t94584FDA10F02378001401E7 /* sqMacExtendedClipboard.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1357, 507}}\";\n\t\t\tsepNavSelRange = \"{1388, 0}\";\n\t\t\tsepNavVisRange = \"{336, 1542}\";\n\t\t\tsepNavWindowFrame = \"{{15, 55}, {1438, 968}}\";\n\t\t};\n\t};\n\t9458511410F03996001401E7 /* sqMacExtendedClipboard.m:101 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 94584FD910F02378001401E7 /* sqMacExtendedClipboard.m */;\n\t\tfunctionName = \"sqPasteboardCopyItemFlavorDataformatformatLength()\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 101;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 306811868.07592;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t945851EE10F03E60001401E7 /* sqMacExtendedClipboard.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1331, 873}}\";\n\t\t\tsepNavSelRange = \"{7, 24}\";\n\t\t\tsepNavVisRange = \"{0, 1878}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {1378, 1024}}\";\n\t\t};\n\t};\n\t945851EF10F03E60001401E7 /* sqMacExtendedClipboard.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1062, 1365}}\";\n\t\t\tsepNavSelRange = \"{3036, 111}\";\n\t\t\tsepNavVisRange = \"{1719, 1665}\";\n\t\t\tsepNavWindowFrame = \"{{61, 13}, {1438, 968}}\";\n\t\t};\n\t};\n\t9458523210F040A0001401E7 /* sqMacExtendedClipboard.m:37 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 945851EF10F03E60001401E7 /* sqMacExtendedClipboard.m */;\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 37;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 306811868.118221;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t9458523410F040A1001401E7 /* sqMacExtendedClipboard.m:45 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 945851EF10F03E60001401E7 /* sqMacExtendedClipboard.m */;\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 45;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 306811868.142344;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t9458523610F040A2001401E7 /* sqMacExtendedClipboard.m:50 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 945851EF10F03E60001401E7 /* sqMacExtendedClipboard.m */;\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 50;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 306811868.183629;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t9458523A10F040AF001401E7 /* sqMacExtendedClipboard.m:72 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 945851EF10F03E60001401E7 /* sqMacExtendedClipboard.m */;\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 72;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 306811868.2171251;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t9458524810F04272001401E7 /* sqMacExtendedClipboard.m:88 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 945851EF10F03E60001401E7 /* sqMacExtendedClipboard.m */;\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 88;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 306811868.249962;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t9458525410F04339001401E7 /* sqSqueakIPhoneClipboardAPI.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1109, 769}}\";\n\t\t\tsepNavSelRange = \"{58, 44}\";\n\t\t\tsepNavVisRange = \"{0, 1817}\";\n\t\t};\n\t};\n\t9458525510F04339001401E7 /* sqSqueakIPhoneClipboardAPI.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1377, 786}}\";\n\t\t\tsepNavSelRange = \"{586, 13}\";\n\t\t\tsepNavVisRange = \"{0, 1345}\";\n\t\t};\n\t};\n\t9458525A10F043EB001401E7 /* sqSqueakIPhoneApplication+clipboard.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {869, 794}}\";\n\t\t\tsepNavSelRange = \"{1982, 227}\";\n\t\t\tsepNavVisRange = \"{0, 2214}\";\n\t\t\tsepNavWindowFrame = \"{{15, 17}, {1261, 1006}}\";\n\t\t};\n\t};\n\t9458525B10F043EB001401E7 /* sqSqueakIPhoneApplication+clipboard.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {943, 794}}\";\n\t\t\tsepNavSelRange = \"{287, 25}\";\n\t\t\tsepNavVisRange = \"{0, 1522}\";\n\t\t};\n\t};\n\t9458527F10F045FB001401E7 /* sqSqueakIPhoneClipboardAPI.m:31 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 9458525510F04339001401E7 /* sqSqueakIPhoneClipboardAPI.m */;\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 31;\n\t\tmodificationTime = 306812454.06156;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t9458528110F045FC001401E7 /* sqSqueakIPhoneClipboardAPI.m:24 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 9458525510F04339001401E7 /* sqSqueakIPhoneClipboardAPI.m */;\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 24;\n\t\tmodificationTime = 306812454.061646;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t9458528310F045FD001401E7 /* sqSqueakIPhoneClipboardAPI.m:17 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 9458525510F04339001401E7 /* sqSqueakIPhoneClipboardAPI.m */;\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 17;\n\t\tmodificationTime = 306812454.061617;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t945BA53B10B218F700C2020C /* math.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = math.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/usr/include/architecture/i386/math.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t945C4D7C10BB0A8500548CC1 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 945C4D7D10BB0A8500548CC1 /* OSTypes.h */;\n\t\tname = \"OSTypes.h: 73\";\n\t\trLen = 35;\n\t\trLoc = 2233;\n\t\trType = 0;\n\t\tvrLen = 1245;\n\t\tvrLoc = 1528;\n\t};\n\t945C4D7D10BB0A8500548CC1 /* OSTypes.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = OSTypes.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/usr/include/libkern/OSTypes.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t945C4E6310BB29B500548CC1 /* sqSqueakFileDirectoryInterface.m:118 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 9452D5DE0E044A9D000AD792 /* sqSqueakFileDirectoryInterface.m */;\n\t\tfunctionName = \"-dir_Lookup:length:index:name:length:creationDate:modificationDate:isDirectory:sizeIfFile:\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 118;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 306811863.542962;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 2;\n\t};\n\t945C4E8010BB2CE000548CC1 /* sqSqueakFileDirectoryInterface.m:102 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 9452D5DE0E044A9D000AD792 /* sqSqueakFileDirectoryInterface.m */;\n\t\tfunctionName = \"-dir_Lookup:length:index:name:length:creationDate:modificationDate:isDirectory:sizeIfFile:\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 102;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 306811863.542974;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 2;\n\t};\n\t945C4EAC10BB348300548CC1 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAAE810AB6C3500F87527 /* NSFileManager.h */;\n\t\tname = \"NSFileManager.h: 162\";\n\t\trLen = 14;\n\t\trLoc = 11455;\n\t\trType = 0;\n\t\tvrLen = 4578;\n\t\tvrLoc = 9506;\n\t};\n\t945E9D7C0DE525E100CDF01E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 945E9D7D0DE525E100CDF01E /* npsqueak.c */;\n\t\tname = \"npsqueak.c: 1113\";\n\t\trLen = 21;\n\t\trLoc = 33897;\n\t\trType = 0;\n\t\tvrLen = 2274;\n\t\tvrLoc = 32164;\n\t};\n\t945E9D7D0DE525E100CDF01E /* npsqueak.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = npsqueak.c;\n\t\tpath = \"/Users/johnmci/Documents/SqueakBrowserPlugin/platforms/Mac OS/vm/npsqueak/npsqueak.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t945F30620E0C6A5000CFF3DC /* SqueakApplication.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = SqueakApplication.m;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/CocoaSqueak-3.0.4/src/CocoaSqueak/SqueakApplication.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t945F30670E0C6A5000CFF3DC /* SqueakInterpreter.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = SqueakInterpreter.m;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/CocoaSqueak-3.0.4/src/Squeak/SqueakInterpreter.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t945F30FC0E0C763800CFF3DC /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 945F30670E0C6A5000CFF3DC /* SqueakInterpreter.m */;\n\t\tname = \"SqueakInterpreter.m: 200\";\n\t\trLen = 13;\n\t\trLoc = 5497;\n\t\trType = 0;\n\t\tvrLen = 1593;\n\t\tvrLoc = 2040;\n\t};\n\t94607E0E123B7A8C008BA756 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 948DB86E123B76F40002F636 /* SqueakGL.c */;\n\t\tname = \"SqueakGL.c: 715\";\n\t\trLen = 0;\n\t\trLoc = 23713;\n\t\trType = 0;\n\t\tvrLen = 1751;\n\t\tvrLoc = 23260;\n\t};\n\t94638B260EAFB77B00A3F155 /* iPhone.changes */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1533, 898248}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 507}\";\n\t\t};\n\t};\n\t94638CEA0EB16F1100A3F155 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94638CEB0EB16F1100A3F155 /* unxMapMemory.h */;\n\t\tname = \"unxMapMemory.h: 270\";\n\t\trLen = 6;\n\t\trLoc = 8341;\n\t\trType = 0;\n\t\tvrLen = 1425;\n\t\tvrLoc = 0;\n\t};\n\t94638CEB0EB16F1100A3F155 /* unxMapMemory.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = unxMapMemory.h;\n\t\tpath = \"/Users/johnmci/Work In Progress/cincom/VWSourceCode/bkup621/src-51.4/plat/unxMapMemory.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94638CF50EB16F1100A3F155 /* sqUnixMemory.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqUnixMemory.c;\n\t\tpath = /Users/johnmci/Documents/SqueakHydra/platforms/unix/vm/sqUnixMemory.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9463943D0E95845000015851 /* squeakSUnitTester.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1219, 2646}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1036}\";\n\t\t};\n\t};\n\t9463943E0E95845000015851 /* squeakSUnitTester.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 6762}}\";\n\t\t\tsepNavSelRange = \"{4085, 11}\";\n\t\t\tsepNavVisRange = \"{3547, 944}\";\n\t\t};\n\t};\n\t94669D8C1225EF670062028C /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D3654D10CEC86C00805023 /* BitMapConversionLogicFromX11.h */;\n\t\tname = \"BitMapConversionLogicFromX11.h: 18\";\n\t\trLen = 14;\n\t\trLoc = 581;\n\t\trType = 0;\n\t\tvrLen = 1092;\n\t\tvrLoc = 0;\n\t};\n\t94671FFD12617CFE00F97C81 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E659000DDD03FE00358328 /* JPEGReadWriter2Plugin.c */;\n\t\tname = \"JPEGReadWriter2Plugin.c: 679\";\n\t\trLen = 17;\n\t\trLoc = 20722;\n\t\trType = 0;\n\t\tvrLen = 2103;\n\t\tvrLoc = 19321;\n\t};\n\t94672008126185F600F97C81 /* PBXBookmark */ = {\n\t\tisa = PBXBookmark;\n\t\tfRef = 947E5F9F10A9FFA000D3B69E /* SqueakPureObjc-Info.plist */;\n\t};\n\t946720241261864D00F97C81 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947E64CB10AA16FE00D3B69E /* sqSqueakOSXApplication.m */;\n\t\tname = \"sqSqueakOSXApplication.m: 236\";\n\t\trLen = 7;\n\t\trLoc = 7274;\n\t\trType = 0;\n\t\tvrLen = 1802;\n\t\tvrLoc = 6321;\n\t};\n\t946720251261864D00F97C81 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 946720261261864D00F97C81 /* ntpdate.c */;\n\t\tname = \"ntpdate.c: 122\";\n\t\trLen = 18;\n\t\trLoc = 3665;\n\t\trType = 0;\n\t\tvrLen = 1762;\n\t\tvrLoc = 13286;\n\t};\n\t946720261261864D00F97C81 /* ntpdate.c */ = {\n\t\tisa = PBXFileReference;\n\t\tname = ntpdate.c;\n\t\tpath = \"/Users/johnmci/Shared/zntpdate-0.4.12/src/ntpdate.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t946720271261864D00F97C81 /* PlistBookmark */ = {\n\t\tisa = PlistBookmark;\n\t\tfRef = 946720281261864D00F97C81 /* Info.plist */;\n\t\tfallbackIsa = PBXBookmark;\n\t\tisK = 1;\n\t\tkPath = (\n\t\t\tSqueakUnTrustedDirectory,\n\t\t);\n\t\tname = \"/Users/johnmci/Documents/Squeak3.8.0/build/Squeak 4.2.5beta1U.app/Contents/Info.plist\";\n\t\trLen = 24;\n\t\trLoc = 0;\n\t};\n\t946720281261864D00F97C81 /* Info.plist */ = {\n\t\tisa = PBXFileReference;\n\t\tname = Info.plist;\n\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/build/Squeak 4.2.5beta1U.app/Contents/Info.plist\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t946720291261864D00F97C81 /* PlistBookmark */ = {\n\t\tisa = PlistBookmark;\n\t\tfRef = 9467202A1261864D00F97C81 /* Info.plist */;\n\t\tfallbackIsa = PBXBookmark;\n\t\tisK = 0;\n\t\tkPath = (\n\t\t\tSqueakUnTrustedDirectory,\n\t\t);\n\t\tname = \"/Users/johnmci/Documents/Squeak3.8.0/platforms/iOS/vm/build/Distribution/Squeak 5.8b10.app/Contents/Info.plist\";\n\t\trLen = 0;\n\t\trLoc = 9223372036854775807;\n\t};\n\t9467202A1261864D00F97C81 /* Info.plist */ = {\n\t\tisa = PBXFileReference;\n\t\tname = Info.plist;\n\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/platforms/iOS/vm/build/Distribution/Squeak 5.8b10.app/Contents/Info.plist\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9467202B1261864D00F97C81 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9412CAE40E6C05EC00DB8625 /* sqSqueakInfoPlistInterface.h */;\n\t\tname = \"sqSqueakInfoPlistInterface.h: 44\";\n\t\trLen = 14;\n\t\trLoc = 1933;\n\t\trType = 0;\n\t\tvrLen = 2070;\n\t\tvrLoc = 0;\n\t};\n\t9467202C1261864D00F97C81 /* PlistBookmark */ = {\n\t\tisa = PlistBookmark;\n\t\tfRef = 948774B110C64DD800E4AEC5 /* SqueakPureObjc-Info 64x64.plist */;\n\t\tfallbackIsa = PBXBookmark;\n\t\tisK = 0;\n\t\tkPath = (\n\t\t\tSqueakUseFileMappedMMAP,\n\t\t);\n\t\tname = \"/Users/johnmci/Documents/Squeak3.8.0/platforms/iOS/vm/SqueakPureObjc-Info 64x64.plist\";\n\t\trLen = 0;\n\t\trLoc = 9223372036854775807;\n\t};\n\t9467202D1261864D00F97C81 /* PlistBookmark */ = {\n\t\tisa = PlistBookmark;\n\t\tfRef = 947E5F9F10A9FFA000D3B69E /* SqueakPureObjc-Info.plist */;\n\t\tfallbackIsa = PBXBookmark;\n\t\tisK = 0;\n\t\tkPath = (\n\t\t\tSqueakPluginsBuiltInOrLocalOnly,\n\t\t);\n\t\tname = \"/Users/johnmci/Documents/Squeak3.8.0/platforms/iOS/vm/SqueakPureObjc-Info.plist\";\n\t\trLen = 0;\n\t\trLoc = 9223372036854775807;\n\t};\n\t9467202E1261864D00F97C81 /* PlistBookmark */ = {\n\t\tisa = PlistBookmark;\n\t\tfRef = 94C36C9710B0CF290041953A /* Info-iPhone.plist */;\n\t\tfallbackIsa = PBXBookmark;\n\t\tisK = 0;\n\t\tkPath = (\n\t\t\tCFBundleVersion,\n\t\t);\n\t\tname = \"/Users/johnmci/Documents/Squeak3.8.0/platforms/iOS/vm/Info-iPhone.plist\";\n\t\trLen = 5;\n\t\trLoc = 0;\n\t};\n\t9467202F1261864D00F97C81 /* PlistBookmark */ = {\n\t\tisa = PlistBookmark;\n\t\tfRef = 94C36C9710B0CF290041953A /* Info-iPhone.plist */;\n\t\tfallbackIsa = PBXBookmark;\n\t\tisK = 0;\n\t\tkPath = (\n\t\t\tCFBundleVersion,\n\t\t);\n\t\tname = \"/Users/johnmci/Documents/Squeak3.8.0/platforms/iOS/vm/Info-iPhone.plist\";\n\t\trLen = 5;\n\t\trLoc = 0;\n\t};\n\t946720321261864D00F97C81 /* PlistBookmark */ = {\n\t\tisa = PlistBookmark;\n\t\tfRef = 947E5F9F10A9FFA000D3B69E /* SqueakPureObjc-Info.plist */;\n\t\tfallbackIsa = PBXBookmark;\n\t\tisK = 0;\n\t\tkPath = (\n\t\t\tSqueakUnTrustedDirectory,\n\t\t);\n\t\tname = \"/Users/johnmci/Documents/Squeak3.8.0/platforms/iOS/vm/SqueakPureObjc-Info.plist\";\n\t\trLen = 0;\n\t\trLoc = 9223372036854775807;\n\t};\n\t946D973B0FE165B70038846B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 946D973C0FE165B70038846B /* sqSqueakEventsAPI.m */;\n\t\tname = \"sqSqueakEventsAPI.m: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 989;\n\t\tvrLoc = 2044;\n\t};\n\t946D973C0FE165B70038846B /* sqSqueakEventsAPI.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = sqSqueakEventsAPI.m;\n\t\tpath = \"/Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/WikiWikiServer/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakEventsAPI.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t946DA77210C09A8C00F26F56 /* sqUnixQuartz.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = sqUnixQuartz.m;\n\t\tpath = \"/Users/johnmci/Documents/SqueakPrintJobPlugin/platforms/unix/vm-display-Quartz/sqUnixQuartz.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t946DA7D710C0A6C700F26F56 /* NSWindow.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSWindow.h;\n\t\tpath = /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSWindow.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t946DA7E010C0A7A400F26F56 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 946DA7E110C0A7A400F26F56 /* NSView.h */;\n\t\tname = \"NSView.h: 327\";\n\t\trLen = 23;\n\t\trLoc = 10791;\n\t\trType = 0;\n\t\tvrLen = 2404;\n\t\tvrLoc = 9657;\n\t};\n\t946DA7E110C0A7A400F26F56 /* NSView.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSView.h;\n\t\tpath = /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSView.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t946DA8D210C0C30D00F26F56 /* DropPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 2548}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1485}\";\n\t\t\tsepNavWindowFrame = \"{{254, 4}, {1426, 1019}}\";\n\t\t};\n\t};\n\t946DA8D910C0C32800F26F56 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 946DA7D710C0A6C700F26F56 /* NSWindow.h */;\n\t\tname = \"NSWindow.h: 580\";\n\t\trLen = 23;\n\t\trLoc = 22568;\n\t\trType = 0;\n\t\tvrLen = 2638;\n\t\tvrLoc = 21350;\n\t};\n\t946DA8DA10C0C32800F26F56 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 946DA77210C09A8C00F26F56 /* sqUnixQuartz.m */;\n\t\tname = \"sqUnixQuartz.m: 2093\";\n\t\trLen = 0;\n\t\trLoc = 54353;\n\t\trType = 0;\n\t\tvrLen = 1177;\n\t\tvrLoc = 53870;\n\t};\n\t946DA8DB10C0C32800F26F56 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 946DA8DC10C0C32800F26F56 /* NSDragging.h */;\n\t\tname = \"NSDragging.h: 56\";\n\t\trLen = 64;\n\t\trLoc = 1665;\n\t\trType = 0;\n\t\tvrLen = 2094;\n\t\tvrLoc = 0;\n\t};\n\t946DA8DC10C0C32800F26F56 /* NSDragging.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSDragging.h;\n\t\tpath = /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSDragging.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t946DA8EF10C0C38600F26F56 /* DropPlugin.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1357, 169}}\";\n\t\t\tsepNavSelRange = \"{300, 21}\";\n\t\t\tsepNavVisRange = \"{0, 490}\";\n\t\t};\n\t};\n\t946DA91310C0C71100F26F56 /* sqSqueakOSXDropAPI.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1357, 507}}\";\n\t\t\tsepNavSelRange = \"{7, 20}\";\n\t\t\tsepNavVisRange = \"{0, 400}\";\n\t\t};\n\t};\n\t946DA91410C0C71100F26F56 /* sqSqueakOSXDropAPI.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 1079}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1643}\";\n\t\t\tsepNavWindowFrame = \"{{15, 13}, {1326, 1010}}\";\n\t\t};\n\t};\n\t946DA99210C0CE1900F26F56 /* sqSqueakOSXDropAPI.m:79 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 946DA91410C0C71100F26F56 /* sqSqueakOSXDropAPI.m */;\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 79;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 306811867.904445;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t946DA9FF10C0D35500F26F56 /* sqMacUnixExternalPrims.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 3965}}\";\n\t\t\tsepNavSelRange = \"{5437, 17}\";\n\t\t\tsepNavVisRange = \"{4718, 1216}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {1426, 1019}}\";\n\t\t};\n\t};\n\t946DAA3810C0D8B700F26F56 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 946DAA3910C0D8B700F26F56 /* sqUnixMain.c */;\n\t\tname = \"sqUnixMain.c: 709\";\n\t\trLen = 12;\n\t\trLoc = 18115;\n\t\trType = 0;\n\t\tvrLen = 1874;\n\t\tvrLoc = 17010;\n\t};\n\t946DAA3910C0D8B700F26F56 /* sqUnixMain.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqUnixMain.c;\n\t\tpath = /Users/johnmci/Documents/SqueakExuperyPlugin/platforms/unix/vm/sqUnixMain.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t946DAA3A10C0D8B700F26F56 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 946DAA3B10C0D8B700F26F56 /* sqMacMain.c */;\n\t\tname = \"sqMacMain.c: 473\";\n\t\trLen = 13;\n\t\trLoc = 17090;\n\t\trType = 0;\n\t\tvrLen = 2581;\n\t\tvrLoc = 14967;\n\t};\n\t946DAA3B10C0D8B700F26F56 /* sqMacMain.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqMacMain.c;\n\t\tpath = \"/Users/johnmci/Documents/SqueakExuperyPlugin/platforms/Mac OS/vm/sqMacMain.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t946DAA3C10C0D8B700F26F56 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 946DAA3D10C0D8B700F26F56 /* sqUnixExternalPrims.c */;\n\t\tname = \"sqUnixExternalPrims.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1365;\n\t\tvrLoc = 4834;\n\t};\n\t946DAA3D10C0D8B700F26F56 /* sqUnixExternalPrims.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqUnixExternalPrims.c;\n\t\tpath = \"/Users/johnmci/Documents/SqueakHydraZBaseCheck/HydraVM-src/platforms/unix/vm/sqUnixExternalPrims.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t946DAB1210C0F00400F26F56 /* sqMacUnixExternalPrims.m:219 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 946DA9FF10C0D35500F26F56 /* sqMacUnixExternalPrims.m */;\n\t\tfunctionName = \"ioLoadModuleRaw()\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 219;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 306811867.942082;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t946DAB5110C0F2B000F26F56 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 946DA8D210C0C30D00F26F56 /* DropPlugin.c */;\n\t\tname = \"DropPlugin.c: 178\";\n\t\trLen = 18;\n\t\trLoc = 4453;\n\t\trType = 0;\n\t\tvrLen = 1680;\n\t\tvrLoc = 3335;\n\t};\n\t9471D2710E04703B00703D45 /* sqSqueakScreenAndWindow.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 988}}\";\n\t\t\tsepNavSelRange = \"{2843, 13}\";\n\t\t\tsepNavVisRange = \"{1784, 1182}\";\n\t\t\tsepNavWindowFrame = \"{{15, 49}, {1346, 974}}\";\n\t\t};\n\t};\n\t9471D2720E04703B00703D45 /* sqSqueakScreenAndWindow.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1496, 2912}}\";\n\t\t\tsepNavSelRange = \"{5194, 0}\";\n\t\t\tsepNavVisRange = \"{4247, 2293}\";\n\t\t\tsepNavWindowFrame = \"{{148, 9}, {1131, 1019}}\";\n\t\t};\n\t};\n\t9471D2DF0E04743F00703D45 /* sqSqueakAppDelegate.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1331, 896}}\";\n\t\t\tsepNavSelRange = \"{1936, 23}\";\n\t\t\tsepNavVisRange = \"{0, 2324}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {1378, 1024}}\";\n\t\t};\n\t};\n\t9471D2E00E04743F00703D45 /* sqSqueakAppDelegate.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 1547}}\";\n\t\t\tsepNavSelRange = \"{3575, 9}\";\n\t\t\tsepNavVisRange = \"{2835, 989}\";\n\t\t\tsepNavWindowFrame = \"{{731, 4}, {860, 1024}}\";\n\t\t};\n\t};\n\t9471E48A0EB6C393000AE79D /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E6591A0DDD03FE00358328 /* StarSqueakPlugin.c */;\n\t\tname = \"StarSqueakPlugin.c: 95\";\n\t\trLen = 2;\n\t\trLoc = 2480;\n\t\trType = 0;\n\t\tvrLen = 1031;\n\t\tvrLoc = 2015;\n\t};\n\t9472586B1254FECD00A8DE45 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94883B2A0E0C2A5E005A4738 /* aio.c */;\n\t\tname = \"aio.c: 235\";\n\t\trLen = 0;\n\t\trLoc = 5593;\n\t\trType = 0;\n\t\tvrLen = 1297;\n\t\tvrLoc = 4842;\n\t};\n\t9472586C1254FECD00A8DE45 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E659100DDD03FE00358328 /* SocketPlugin.c */;\n\t\tname = \"SocketPlugin.c: 1231\";\n\t\trLen = 91;\n\t\trLoc = 36324;\n\t\trType = 0;\n\t\tvrLen = 2532;\n\t\tvrLoc = 34415;\n\t};\n\t947332EE0EA70E8C003F9084 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947332EF0EA70E8C003F9084 /* sqWin32Stubs.c */;\n\t\tname = \"sqWin32Stubs.c: 18\";\n\t\trLen = 18;\n\t\trLoc = 607;\n\t\trType = 0;\n\t\tvrLen = 2348;\n\t\tvrLoc = 0;\n\t};\n\t947332EF0EA70E8C003F9084 /* sqWin32Stubs.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqWin32Stubs.c;\n\t\tpath = /Users/johnmci/Documents/SqueakHydra/platforms/win32/vm/sqWin32Stubs.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9473A34810BBD84100ED7D00 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCACE310AB8AE300F87527 /* NSObject.h */;\n\t\tname = \"NSObject.h: 74\";\n\t\trLen = 3;\n\t\trLoc = 1310;\n\t\trType = 0;\n\t\tvrLen = 1170;\n\t\tvrLoc = 936;\n\t};\n\t9473A95A1102F70B00D135CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 942F6FFC1102F5A300A0A349 /* NSNull.h */;\n\t\tname = \"NSNull.h: 9\";\n\t\trLen = 0;\n\t\trLoc = 159;\n\t\trType = 0;\n\t\tvrLen = 184;\n\t\tvrLoc = 0;\n\t};\n\t9473A9701103BE0A00D135CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 942CF43710BFCD52008F9BB7 /* sqGnu.h */;\n\t\tname = \"sqGnu.h: 187\";\n\t\trLen = 0;\n\t\trLoc = 11295;\n\t\trType = 0;\n\t\tvrLen = 2361;\n\t\tvrLoc = 9051;\n\t};\n\t9475F4DB10BEF4100047A24B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E4936F10BD39E20011AC75 /* sqUnixQuartz.m */;\n\t\tname = \"sqUnixQuartz.m: 2177\";\n\t\trLen = 0;\n\t\trLoc = 56455;\n\t\trType = 0;\n\t\tvrLen = 1151;\n\t\tvrLoc = 55829;\n\t};\n\t9475F56B10BF20A00047A24B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9475F56C10BF20A00047A24B /* AudioQueue.h */;\n\t\tname = \"AudioQueue.h: 1116\";\n\t\trLen = 66;\n\t\trLoc = 56155;\n\t\trType = 0;\n\t\tvrLen = 2628;\n\t\tvrLoc = 54742;\n\t};\n\t9475F56C10BF20A00047A24B /* AudioQueue.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = AudioQueue.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AudioToolbox.framework/Versions/A/Headers/AudioQueue.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9475F58210BF227D0047A24B /* NSApplication.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSApplication.h;\n\t\tpath = /System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSApplication.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9475F5A710BF25A10047A24B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9475F58210BF227D0047A24B /* NSApplication.h */;\n\t\tname = \"NSApplication.h: 18\";\n\t\trLen = 21;\n\t\trLoc = 470;\n\t\trType = 0;\n\t\tvrLen = 1966;\n\t\tvrLoc = 0;\n\t};\n\t9476030E10C375C300B621C9 /* sqSqueakOSXApplication.m:259 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 947E64CB10AA16FE00D3B69E /* sqSqueakOSXApplication.m */;\n\t\tfunctionName = \"-isImageFile:\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 259;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 306811867.974928;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t9476031010C375C600B621C9 /* sqSqueakOSXApplication.m:264 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 947E64CB10AA16FE00D3B69E /* sqSqueakOSXApplication.m */;\n\t\tfunctionName = \"-isImageFile:\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 264;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 306811868.008287;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t947713B610C45C0A00890A9B /* Queue.m:117 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 9452D5D80E044A9D000AD792 /* Queue.m */;\n\t\tfunctionName = \"-dealloc\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 117;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 306811863.543401;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 2;\n\t};\n\t947713C410C45DD700890A9B /* NSDebug.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSDebug.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSDebug.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t947713D410C45E5F00890A9B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947713C410C45DD700890A9B /* NSDebug.h */;\n\t\tname = \"NSDebug.h: 53\";\n\t\trLen = 36;\n\t\trLoc = 2244;\n\t\trType = 0;\n\t\tvrLen = 2334;\n\t\tvrLoc = 74;\n\t};\n\t9478E0250EC8D957007096A7 /* dummyFFI.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 2652}}\";\n\t\t\tsepNavSelRange = \"{3356, 8}\";\n\t\t\tsepNavVisRange = \"{2987, 642}\";\n\t\t};\n\t};\n\t9478E0260EC8D957007096A7 /* dummyFFI.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {899, 548}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1760}\";\n\t\t\tsepNavWindowFrame = \"{{15, 166}, {1288, 857}}\";\n\t\t};\n\t};\n\t9478E02A0EC8D957007096A7 /* squeakSUnitTester.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {964, 2535}}\";\n\t\t\tsepNavSelRange = \"{1808, 17}\";\n\t\t\tsepNavVisRange = \"{0, 2274}\";\n\t\t};\n\t};\n\t9478E02B0EC8D957007096A7 /* squeakSUnitTester.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 5928}}\";\n\t\t\tsepNavSelRange = \"{12415, 0}\";\n\t\t\tsepNavVisRange = \"{11760, 1507}\";\n\t\t};\n\t};\n\t9478E0320EC8D98F007096A7 /* sqSqueakSoundCoreAudioAPI.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1109, 720}}\";\n\t\t\tsepNavSelRange = \"{103, 1666}\";\n\t\t\tsepNavVisRange = \"{0, 1809}\";\n\t\t};\n\t};\n\t9478E0330EC8D98F007096A7 /* sqSqueakSoundCoreAudioAPI.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1377, 1157}}\";\n\t\t\tsepNavSelRange = \"{2107, 0}\";\n\t\t\tsepNavVisRange = \"{1885, 2226}\";\n\t\t\tsepNavWindowFrame = \"{{15, 13}, {1326, 1010}}\";\n\t\t};\n\t};\n\t9478E05E0EC8DCFB007096A7 /* sqSqueakSoundCoreAudio.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1062, 1404}}\";\n\t\t\tsepNavSelRange = \"{2099, 24}\";\n\t\t\tsepNavVisRange = \"{1871, 2592}\";\n\t\t\tsepNavWindowFrame = \"{{52, 4}, {997, 998}}\";\n\t\t};\n\t};\n\t9478E05F0EC8DCFB007096A7 /* sqSqueakSoundCoreAudio.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 5720}}\";\n\t\t\tsepNavSelRange = \"{10010, 0}\";\n\t\t\tsepNavVisRange = \"{9239, 849}\";\n\t\t\tsepNavWindowFrame = \"{{38, 3}, {1587, 998}}\";\n\t\t};\n\t};\n\t9478E13D0EC8EB46007096A7 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9478E13E0EC8EB46007096A7 /* AudioQueue.h */;\n\t\tname = \"AudioQueue.h: 2\";\n\t\trLen = 10;\n\t\trLoc = 19;\n\t\trType = 0;\n\t\tvrLen = 1351;\n\t\tvrLoc = 0;\n\t};\n\t9478E13E0EC8EB46007096A7 /* AudioQueue.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = AudioQueue.h;\n\t\tpath = /System/Library/Frameworks/AudioToolbox.framework/Headers/AudioQueue.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t947923FE1102BE53007C87F8 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947923FF1102BE53007C87F8 /* sqUnixMain.c */;\n\t\tname = \"sqUnixMain.c: 176\";\n\t\trLen = 281;\n\t\trLoc = 5149;\n\t\trType = 0;\n\t\tvrLen = 1173;\n\t\tvrLoc = 4547;\n\t};\n\t947923FF1102BE53007C87F8 /* sqUnixMain.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqUnixMain.c;\n\t\tpath = /Volumes/px2/business/SqueakiPhone/archivesOLDSTUFF/platformsOLDDrawing/unix/vm/sqUnixMain.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t947924171102E275007C87F8 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E658E60DDD03FE00358328 /* B2DPlugin.c */;\n\t\tname = \"B2DPlugin.c: 6117\";\n\t\trLen = 12;\n\t\trLoc = 189972;\n\t\trType = 0;\n\t\tvrLen = 1391;\n\t\tvrLoc = 189145;\n\t};\n\t947CB8991249932E00131713 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAD1C10AB942300F87527 /* sqSqueakOSXApplication+attributes.m */;\n\t\tname = \"sqSqueakOSXApplication+attributes.m: 47\";\n\t\trLen = 12;\n\t\trLoc = 2065;\n\t\trType = 0;\n\t\tvrLen = 2011;\n\t\tvrLoc = 1048;\n\t};\n\t947CB8B81249949B00131713 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9452D5DE0E044A9D000AD792 /* sqSqueakFileDirectoryInterface.m */;\n\t\tname = \"sqSqueakFileDirectoryInterface.m: 171\";\n\t\trLen = 8;\n\t\trLoc = 6206;\n\t\trType = 0;\n\t\tvrLen = 2075;\n\t\tvrLoc = 5070;\n\t};\n\t947CB8D01249955E00131713 /* sqSqueakFileDirectoryInterface.m:150 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 9452D5DE0E044A9D000AD792 /* sqSqueakFileDirectoryInterface.m */;\n\t\tfunctionName = \"-dir_Lookup:length:index:name:length:creationDate:modificationDate:isDirectory:sizeIfFile:\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 150;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 306812254.47955;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t947E20F50EB281C5007957D0 /* SqueakFFIPrims.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 37401}}\";\n\t\t\tsepNavSelRange = \"{63121, 2}\";\n\t\t\tsepNavVisRange = \"{62724, 744}\";\n\t\t};\n\t};\n\t947E20F90EB2826C007957D0 /* sqFFI.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1132, 2210}}\";\n\t\t\tsepNavSelRange = \"{2071, 8}\";\n\t\t\tsepNavVisRange = \"{1307, 1682}\";\n\t\t};\n\t};\n\t947E210C0EB28486007957D0 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94638CF50EB16F1100A3F155 /* sqUnixMemory.c */;\n\t\tname = \"sqUnixMemory.c: 214\";\n\t\trLen = 6;\n\t\trLoc = 6843;\n\t\trType = 0;\n\t\tvrLen = 1296;\n\t\tvrLoc = 6040;\n\t};\n\t947E21310EB2868A007957D0 /* dummyFFI.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {831, 494}}\";\n\t\t\tsepNavSelRange = \"{87, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1201}\";\n\t\t};\n\t};\n\t947E21320EB2868A007957D0 /* dummyFFI.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 2587}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 891}\";\n\t\t};\n\t};\n\t947E5F9310A9FF4A00D3B69E /* SqueakPureObjc_Prefix.pch */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1039, 823}}\";\n\t\t\tsepNavSelRange = \"{114, 0}\";\n\t\t\tsepNavVisRange = \"{0, 149}\";\n\t\t\tsepNavWindowFrame = \"{{15, 45}, {1017, 978}}\";\n\t\t};\n\t};\n\t947E5F9F10A9FFA000D3B69E /* SqueakPureObjc-Info.plist */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {972, 7812}}\";\n\t\t\tsepNavSelRange = \"{13195, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 7107}, {972, 697}}\";\n\t\t\tsepNavWindowFrame = \"{{334, 54}, {1346, 974}}\";\n\t\t};\n\t};\n\t947E61D610AA049300D3B69E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947E61D710AA049300D3B69E /* Availability.h */;\n\t\tname = \"Availability.h: 124\";\n\t\trLen = 11;\n\t\trLoc = 5703;\n\t\trType = 0;\n\t\tvrLen = 2202;\n\t\tvrLoc = 4378;\n\t};\n\t947E61D710AA049300D3B69E /* Availability.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = Availability.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/usr/include/Availability.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t947E61DA10AA049300D3B69E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947E61DB10AA049300D3B69E /* AudioFileStream.h */;\n\t\tname = \"AudioFileStream.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 805;\n\t\tvrLoc = 0;\n\t};\n\t947E61DB10AA049300D3B69E /* AudioFileStream.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = AudioFileStream.h;\n\t\tpath = /System/Library/Frameworks/AudioToolbox.framework/Headers/AudioFileStream.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t947E61DC10AA049300D3B69E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947E61DD10AA049300D3B69E /* AudioFormat.h */;\n\t\tname = \"AudioFormat.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 779;\n\t\tvrLoc = 0;\n\t};\n\t947E61DD10AA049300D3B69E /* AudioFormat.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = AudioFormat.h;\n\t\tpath = /System/Library/Frameworks/AudioToolbox.framework/Headers/AudioFormat.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t947E626F10AA098300D3B69E /* SqueakPureObjc */ = {\n\t\tactiveExec = 0;\n\t\texecutables = (\n\t\t\t947E62FD10AA098300D3B69E /* SqueakPureObjc */,\n\t\t);\n\t};\n\t947E62FD10AA098300D3B69E /* SqueakPureObjc */ = {\n\t\tisa = PBXExecutable;\n\t\tactiveArgIndices = (\n\t\t\tNO,\n\t\t\tNO,\n\t\t\tNO,\n\t\t\tNO,\n\t\t\tNO,\n\t\t);\n\t\targumentStrings = (\n\t\t\t\"-memory 52m\",\n\t\t\t\"-help\",\n\t\t\tbork.image,\n\t\t\t232,\n\t\t\t242,\n\t\t);\n\t\tautoAttachOnCrash = 1;\n\t\tbreakpointsEnabled = 1;\n\t\tconfigStateDict = {\n\t\t\t\"PBXLSLaunchAction-0\" = {\n\t\t\t\tPBXLSLaunchAction = 0;\n\t\t\t\tPBXLSLaunchStyle = 4;\n\t\t\t\tclass = XCIndigoRunLaunchConfig;\n\t\t\t\tcommandLineArgs = (\n\t\t\t\t);\n\t\t\t\tdisplayName = \"iPhone Simulator runner\";\n\t\t\t\tenvironment = {\n\t\t\t\t};\n\t\t\t\tidentifier = com.apple.Xcode.launch.iPhoneSimulatorRunConfig;\n\t\t\t\tremoteHostInfo = \"\";\n\t\t\t\tstartActionInfo = \"\";\n\t\t\t};\n\t\t};\n\t\tcustomDataFormattersEnabled = 1;\n\t\tdataTipCustomDataFormattersEnabled = 1;\n\t\tdataTipShowTypeColumn = 1;\n\t\tdataTipSortType = 0;\n\t\tdebuggerPlugin = GDBDebugging;\n\t\tdisassemblyDisplayState = 0;\n\t\tdylibVariantSuffix = \"\";\n\t\tenableDebugStr = 1;\n\t\tenvironmentEntries = (\n\t\t\t{\n\t\t\t\tactive = NO;\n\t\t\t\tname = NSAutoreleaseHaltOnFreedObject;\n\t\t\t\tvalue = YES;\n\t\t\t},\n\t\t\t{\n\t\t\t\tactive = NO;\n\t\t\t\tname = NSDebugEnabled;\n\t\t\t\tvalue = YES;\n\t\t\t},\n\t\t\t{\n\t\t\t\tactive = NO;\n\t\t\t\tname = NSAutoreleaseFreedObjectCheckEnabled;\n\t\t\t\tvalue = YES;\n\t\t\t},\n\t\t\t{\n\t\t\t\tactive = NO;\n\t\t\t\tname = NSZombieEnabled;\n\t\t\t\tvalue = YES;\n\t\t\t},\n\t\t\t{\n\t\t\t\tactive = NO;\n\t\t\t\tname = DYLD_INSERT_LIBRARIES;\n\t\t\t\tvalue = /usr/lib/libMallocDebug.A.dylib;\n\t\t\t},\n\t\t\t{\n\t\t\t\tactive = NO;\n\t\t\t\tname = MallocPreScribble;\n\t\t\t\tvalue = YES;\n\t\t\t},\n\t\t\t{\n\t\t\t\tactive = NO;\n\t\t\t\tname = MallocScribble;\n\t\t\t\tvalue = YES;\n\t\t\t},\n\t\t\t{\n\t\t\t\tactive = NO;\n\t\t\t\tname = MallocGuardEdges;\n\t\t\t\tvalue = YES;\n\t\t\t},\n\t\t\t{\n\t\t\t\tactive = NO;\n\t\t\t\tname = NSDebugConcurrentViewDrawing;\n\t\t\t\tvalue = YES;\n\t\t\t},\n\t\t);\n\t\texecutableSystemSymbolLevel = 0;\n\t\texecutableUserSymbolLevel = 0;\n\t\tlibgmallocEnabled = 0;\n\t\tname = SqueakPureObjc;\n\t\tsavedGlobals = {\n\t\t};\n\t\tshowTypeColumn = 0;\n\t\tsourceDirectories = (\n\t\t);\n\t\tstartupPath = \"<<ProductDirectory>>\";\n\t\tvariableFormatDictionary = {\n\t\t\t$cs = 1;\n\t\t\t$ds = 1;\n\t\t\t$eax = 1;\n\t\t\t$ebp = 1;\n\t\t\t$ebx = 1;\n\t\t\t$ecx = 1;\n\t\t\t$edi = 1;\n\t\t\t$edx = 1;\n\t\t\t$eflags = 1;\n\t\t\t$eip = 1;\n\t\t\t$es = 1;\n\t\t\t$esi = 1;\n\t\t\t$esp = 1;\n\t\t\t$fs = 1;\n\t\t\t$gs = 1;\n\t\t\t$r10 = 1;\n\t\t\t$r11 = 1;\n\t\t\t$r12 = 1;\n\t\t\t$r13 = 1;\n\t\t\t$r14 = 1;\n\t\t\t$r15 = 1;\n\t\t\t$r8 = 1;\n\t\t\t$r9 = 1;\n\t\t\t$rax = 1;\n\t\t\t$rbp = 1;\n\t\t\t$rbx = 1;\n\t\t\t$rcx = 1;\n\t\t\t$rdi = 1;\n\t\t\t$rdx = 1;\n\t\t\t$rip = 1;\n\t\t\t$rsi = 1;\n\t\t\t$rsp = 1;\n\t\t\t$ss = 1;\n\t\t\t\"*from-short unsigned int-copyImage16To32\" = 3;\n\t\t\t\"_return_value-sqInt-primitiveGetMenuHandle\" = 1;\n\t\t\t\"b-unsigned char--[sqSqueakOSXNSView(BitmapConversion) extractPixels_16_to_32:srcPixelWidth:left:right:top:bottom:position:]\" = 3;\n\t\t\t\"bits-NSInteger-\\U0001\\U0000-[sqSqueakOSXApplication(cursor) setCursor:withMask:offsetX:offsetY:]\" = 3;\n\t\t\t\"currentVMEncoding-NSInteger-\\U0001\\U0000-[sqSqueakMainApplication(attributes) getAttribute:]\" = 1;\n\t\t\t\"g-unsigned char--[sqSqueakOSXNSView(BitmapConversion) extractPixels_16_to_32:srcPixelWidth:left:right:top:bottom:position:]\" = 3;\n\t\t\t\"inCommandID-MenuCommand-GetIndMenuItemWithCommandID\" = 5;\n\t\t\t\"inputCommandID-OSType-GetIndMenuItemWithCommandID\" = 5;\n\t\t\t\"mask-NSInteger-\\U0001\\U0000-[sqSqueakOSXApplication(cursor) setCursor:withMask:offsetX:offsetY:]\" = 3;\n\t\t\t\"modifierFlags-NSUInteger--[sqSqueakOSXNSView doCommandBySelector:]\" = 3;\n\t\t\t\"modifierFlags-NSUInteger--[sqSqueakOSXNSView fakeKeyDownUp:]\" = 1;\n\t\t\t\"oop-usqInt-pointerForOop\" = 1;\n\t\t\t\"oop-usqInt-sweepPhase\" = 2;\n\t\t\t\"r-unsigned char--[sqSqueakOSXNSView(BitmapConversion) extractPixels_16_to_32:srcPixelWidth:left:right:top:bottom:position:]\" = 3;\n\t\t\t\"rgb-short int--[sqSqueakOSXNSView(BitmapConversion) extractPixels_16_to_32:srcPixelWidth:left:right:top:bottom:position:]\" = 3;\n\t\t\t\"rgb-short unsigned int--[sqSqueakOSXNSView(BitmapConversion) extractPixels_16_to_32:srcPixelWidth:left:right:top:bottom:position:]\" = 3;\n\t\t\t\"shift-NSUInteger-\\U0001\\U0000-[sqSqueakOSXApplication(cursor) setCursor:withMask:offsetX:offsetY:]\" = 3;\n\t\t\t\"to1-int-copyImage16To32\" = 3;\n\t\t\t\"to2-int-copyImage16To32\" = 1;\n\t\t};\n\t};\n\t947E642710AA0E9E00D3B69E /* sqMacV2Browser.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {802, 587}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1518}\";\n\t\t};\n\t};\n\t947E642810AA0E9E00D3B69E /* sqMacV2Browser.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {802, 780}}\";\n\t\t\tsepNavSelRange = \"{1504, 0}\";\n\t\t\tsepNavVisRange = \"{492, 1556}\";\n\t\t};\n\t};\n\t947E644910AA0F2C00D3B69E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E658EC0DDD03FE00358328 /* BMPReadWriterPlugin.c */;\n\t\tname = \"BMPReadWriterPlugin.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1250;\n\t\tvrLoc = 0;\n\t};\n\t947E644B10AA0F2C00D3B69E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E658F20DDD03FE00358328 /* FFTPlugin.c */;\n\t\tname = \"FFTPlugin.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1243;\n\t\tvrLoc = 0;\n\t};\n\t947E645010AA0F2C00D3B69E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E658FE0DDD03FE00358328 /* JPEGReaderPlugin.c */;\n\t\tname = \"JPEGReaderPlugin.c: 115\";\n\t\trLen = 0;\n\t\trLoc = 3465;\n\t\trType = 0;\n\t\tvrLen = 1395;\n\t\tvrLoc = 2800;\n\t};\n\t947E647910AA100900D3B69E /* SqueakOSXAppDelegate.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1533, 780}}\";\n\t\t\tsepNavSelRange = \"{1916, 50}\";\n\t\t\tsepNavVisRange = \"{1643, 459}\";\n\t\t\tsepNavWindowFrame = \"{{522, 48}, {1017, 978}}\";\n\t\t};\n\t};\n\t947E647A10AA100900D3B69E /* SqueakOSXAppDelegate.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {869, 2327}}\";\n\t\t\tsepNavSelRange = \"{2423, 17}\";\n\t\t\tsepNavVisRange = \"{982, 2306}\";\n\t\t\tsepNavWindowFrame = \"{{1157, -86}, {1426, 1019}}\";\n\t\t};\n\t};\n\t947E64CA10AA16FE00D3B69E /* sqSqueakOSXApplication.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1379, 891}}\";\n\t\t\tsepNavSelRange = \"{1861, 62}\";\n\t\t\tsepNavVisRange = \"{0, 2397}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {1426, 1019}}\";\n\t\t};\n\t};\n\t947E64CB10AA16FE00D3B69E /* sqSqueakOSXApplication.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 3484}}\";\n\t\t\tsepNavSelRange = \"{4978, 7}\";\n\t\t\tsepNavVisRange = \"{4433, 1240}\";\n\t\t\tsepNavWindowFrame = \"{{522, 48}, {1017, 978}}\";\n\t\t};\n\t};\n\t947E96231228DB0D0065B3BA /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947E96241228DB0D0065B3BA /* sqWin32OpenGL.c */;\n\t\tname = \"sqWin32OpenGL.c: 23\";\n\t\trLen = 0;\n\t\trLoc = 650;\n\t\trType = 0;\n\t\tvrLen = 1947;\n\t\tvrLoc = 0;\n\t};\n\t947E96241228DB0D0065B3BA /* sqWin32OpenGL.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqWin32OpenGL.c;\n\t\tpath = \"/Users/johnmci/Documents/SqueakHydraZBaseCheck/HydraVM-src/platforms/win32/plugins/B3DAcceleratorPlugin/sqWin32OpenGL.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t947E96251228DB0D0065B3BA /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947E96261228DB0D0065B3BA /* sqOpenGLRenderer.c */;\n\t\tname = \"sqOpenGLRenderer.c: 268\";\n\t\trLen = 20;\n\t\trLoc = 8356;\n\t\trType = 0;\n\t\tvrLen = 1808;\n\t\tvrLoc = 7505;\n\t};\n\t947E96261228DB0D0065B3BA /* sqOpenGLRenderer.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqOpenGLRenderer.c;\n\t\tpath = /Users/johnmci/Documents/SqueakExuperyPlugin/platforms/Cross/plugins/B3DAcceleratorPlugin/sqOpenGLRenderer.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t947E96281228DB0D0065B3BA /* sqMacOpenGL.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqMacOpenGL.c;\n\t\tpath = \"/Volumes/330GB Photos/Cog Before Aug 2010 changes/platforms/Mac OS/plugins/B3DAcceleratorPlugin/sqMacOpenGL.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9483EAFB121C60C70070C43B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9492453010BA43AA00E726F5 /* SqueakOSXApplication.m */;\n\t\tname = \"SqueakOSXApplication.m: 41\";\n\t\trLen = 17;\n\t\trLoc = 1874;\n\t\trType = 0;\n\t\tvrLen = 2433;\n\t\tvrLoc = 0;\n\t};\n\t9484F7B910B0D3600038BDC0 /* SystemConfiguration.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = SystemConfiguration.h;\n\t\tpath = /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/Headers/SystemConfiguration.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9484F86210B0DCC60038BDC0 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9484F7B910B0D3600038BDC0 /* SystemConfiguration.h */;\n\t\tname = \"SystemConfiguration.h: 109\";\n\t\trLen = 30;\n\t\trLoc = 4596;\n\t\trType = 0;\n\t\tvrLen = 1985;\n\t\tvrLoc = 3539;\n\t};\n\t9484F86510B0DCC60038BDC0 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9484F86610B0DCC60038BDC0 /* ABGlobals.h */;\n\t\tname = \"ABGlobals.h: 162\";\n\t\trLen = 6;\n\t\trLoc = 6912;\n\t\trType = 0;\n\t\tvrLen = 2845;\n\t\tvrLoc = 5737;\n\t};\n\t9484F86610B0DCC60038BDC0 /* ABGlobals.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = ABGlobals.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AddressBook.framework/Versions/A/Headers/ABGlobals.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9484F8FC10B0E1770038BDC0 /* PBXBookmark */ = {\n\t\tisa = PBXBookmark;\n\t\tfRef = 945550910DF2041100FB176B /* Default.png */;\n\t};\n\t9484F9CE10B13E1C0038BDC0 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E658F00DDD03FE00358328 /* DSAPrims.c */;\n\t\tname = \"DSAPrims.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 846;\n\t\tvrLoc = 0;\n\t};\n\t94862F8310BA182500CAA2EB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C3696610AFB7550041953A /* NSBitmapImageRep.h */;\n\t\tname = \"NSBitmapImageRep.h: 100\";\n\t\trLen = 24;\n\t\trLoc = 4439;\n\t\trType = 0;\n\t\tvrLen = 3020;\n\t\tvrLoc = 3019;\n\t};\n\t94862F9E10BA1A0100CAA2EB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAD0410AB922600F87527 /* NSObjCRuntime.h */;\n\t\tname = \"NSObjCRuntime.h: 193\";\n\t\trLen = 5;\n\t\trLoc = 6827;\n\t\trType = 0;\n\t\tvrLen = 1591;\n\t\tvrLoc = 6049;\n\t};\n\t9486302A10BA247200CAA2EB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C3696310AFB7550041953A /* NSGraphics.h */;\n\t\tname = \"NSGraphics.h: 92\";\n\t\trLen = 159;\n\t\trLoc = 2874;\n\t\trType = 0;\n\t\tvrLen = 3496;\n\t\tvrLoc = 1601;\n\t};\n\t948704AE0E12CABF00D565C3 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 948704AF0E12CABF00D565C3 /* BitBlt.java */;\n\t\tname = \"BitBlt.java: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1739;\n\t\tvrLoc = 0;\n\t};\n\t948704AF0E12CABF00D565C3 /* BitBlt.java */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.java;\n\t\tname = BitBlt.java;\n\t\tpath = /Users/johnmci/Shared/JSqueak/BitBlt.java;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t948704B20E12CABF00D565C3 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E659060DDD03FE00358328 /* Matrix2x3Plugin.c */;\n\t\tname = \"Matrix2x3Plugin.c: 629\";\n\t\trLen = 25;\n\t\trLoc = 18495;\n\t\trType = 0;\n\t\tvrLen = 1410;\n\t\tvrLoc = 0;\n\t};\n\t9487071F0E132B1000D565C3 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 948707200E132B1000D565C3 /* sqGnu.h */;\n\t\tname = \"sqGnu.h: 3\";\n\t\trLen = 1318;\n\t\trLoc = 43;\n\t\trType = 0;\n\t\tvrLen = 1999;\n\t\tvrLoc = 0;\n\t};\n\t948707200E132B1000D565C3 /* sqGnu.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = sqGnu.h;\n\t\tpath = /Users/johnmci/Documents/SqueakHydra/platforms/unix/vm/sqGnu.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t948773F910C64DD800E4AEC5 /* SqueakPureObjc64*64 */ = {\n\t\tactiveExec = 0;\n\t\texecutables = (\n\t\t\t948774A910C64DD800E4AEC5 /* SqueakPureObjc64*64 */,\n\t\t);\n\t};\n\t948774A910C64DD800E4AEC5 /* SqueakPureObjc64*64 */ = {\n\t\tisa = PBXExecutable;\n\t\tactiveArgIndices = (\n\t\t);\n\t\targumentStrings = (\n\t\t);\n\t\tautoAttachOnCrash = 1;\n\t\tbreakpointsEnabled = 1;\n\t\tconfigStateDict = {\n\t\t};\n\t\tcustomDataFormattersEnabled = 1;\n\t\tdataTipCustomDataFormattersEnabled = 1;\n\t\tdataTipShowTypeColumn = 1;\n\t\tdataTipSortType = 0;\n\t\tdebuggerPlugin = GDBDebugging;\n\t\tdisassemblyDisplayState = 0;\n\t\tdylibVariantSuffix = \"\";\n\t\tenableDebugStr = 1;\n\t\tenvironmentEntries = (\n\t\t);\n\t\texecutableSystemSymbolLevel = 0;\n\t\texecutableUserSymbolLevel = 0;\n\t\tlibgmallocEnabled = 0;\n\t\tname = \"SqueakPureObjc64*64\";\n\t\tsavedGlobals = {\n\t\t};\n\t\tshowTypeColumn = 0;\n\t\tsourceDirectories = (\n\t\t);\n\t\tvariableFormatDictionary = {\n\t\t\t\"localHomeContext-sqInt-interpret\" = 1;\n\t\t\t\"memStart-sqInt-readImageFromFileHeapSizeStartingAt\" = 1;\n\t\t\t\"objectPointer-sqInt-primitiveFileGetPosition\" = 1;\n\t\t\t\"oop-sqInt-longAt\" = 1;\n\t\t\t\"oop-usqInt-sweepPhase\" = 1;\n\t\t\t\"oopSize-sqInt-sweepPhase\" = 2;\n\t\t};\n\t};\n\t948774B110C64DD800E4AEC5 /* SqueakPureObjc-Info 64x64.plist */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavWindowFrame = \"{{354, 18}, {1326, 1010}}\";\n\t\t};\n\t};\n\t9487755C10C64FF100E4AEC5 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E6591F0DDD03FE00358328 /* ZipPlugin.c */;\n\t\tname = \"ZipPlugin.c: 54\";\n\t\trLen = 11;\n\t\trLoc = 1700;\n\t\trType = 0;\n\t\tvrLen = 2153;\n\t\tvrLoc = 710;\n\t};\n\t9487755D10C64FF100E4AEC5 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E6591D0DDD03FE00358328 /* UUIDPlugin.c */;\n\t\tname = \"UUIDPlugin.c: 114\";\n\t\trLen = 19;\n\t\trLoc = 2745;\n\t\trType = 0;\n\t\tvrLen = 1164;\n\t\tvrLoc = 2105;\n\t};\n\t94883B2A0E0C2A5E005A4738 /* aio.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1146, 5525}}\";\n\t\t\tsepNavSelRange = \"{5593, 0}\";\n\t\t\tsepNavVisRange = \"{4842, 1297}\";\n\t\t\tsepNavWindowFrame = \"{{15, 45}, {1017, 978}}\";\n\t\t};\n\t};\n\t94883B400E0C2B9C005A4738 /* sqUnixSocket.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1461, 27508}}\";\n\t\t\tsepNavSelRange = \"{34809, 91}\";\n\t\t\tsepNavVisRange = \"{33997, 1919}\";\n\t\t\tsepNavWindowFrame = \"{{38, 14}, {799, 988}}\";\n\t\t};\n\t};\n\t9489E678123E0AA300ECCD51 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 1D3623240D0F684500981E51 /* SqueakNoOGLIPhoneAppDelegate.h */;\n\t\tname = \"SqueakNoOGLIPhoneAppDelegate.h: 60\";\n\t\trLen = 12;\n\t\trLoc = 3167;\n\t\trType = 0;\n\t\tvrLen = 3201;\n\t\tvrLoc = 109;\n\t};\n\t9489E68F123E0D7900ECCD51 /* PlistBookmark */ = {\n\t\tisa = PlistBookmark;\n\t\tfRef = 941D1C9A0E696FC7005B77B3 /* Entitlements.plist */;\n\t\tfallbackIsa = PBXBookmark;\n\t\tisK = 0;\n\t\tkPath = (\n\t\t);\n\t\tname = /Users/johnmci/Documents/Squeak3.8.0/platforms/iOS/vm/Entitlements.plist;\n\t\trLen = 0;\n\t\trLoc = 9223372036854775808;\n\t};\n\t948C0820112DE98D0017EE7F /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 948C0821112DE98D0017EE7F /* interp.c */;\n\t\tname = \"interp.c: 4824\";\n\t\trLen = 58;\n\t\trLoc = 159330;\n\t\trType = 0;\n\t\tvrLen = 1795;\n\t\tvrLoc = 158125;\n\t};\n\t948C0821112DE98D0017EE7F /* interp.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = interp.c;\n\t\tpath = /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/WikiWikiServer/src/vm/interp.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t948DB86B123B76F40002F636 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94B88C540E81500200C98131 /* SqView.m */;\n\t\tname = \"SqView.m: 409\";\n\t\trLen = 1;\n\t\trLoc = 11128;\n\t\trType = 0;\n\t\tvrLen = 1589;\n\t\tvrLoc = 10506;\n\t};\n\t948DB86E123B76F40002F636 /* SqueakGL.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = SqueakGL.c;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/Disney Related Changes/plugin-build/Squeak3DX/SqueakGL.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t948FAA0310BF855500BE88CF /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 948FAA0410BF855500BE88CF /* string.h */;\n\t\tname = \"string.h: 85\";\n\t\trLen = 35;\n\t\trLoc = 3458;\n\t\trType = 0;\n\t\tvrLen = 2317;\n\t\tvrLoc = 3588;\n\t};\n\t948FAA0410BF855500BE88CF /* string.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = string.h;\n\t\tpath = /Developer/SDKs/MacOSX10.5.sdk/usr/include/string.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t948FAB5B10BFAD3C00BE88CF /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E5838E10BF3E080073FD63 /* AudioQueue.h */;\n\t\tname = \"AudioQueue.h: 695\";\n\t\trLen = 0;\n\t\trLoc = 34190;\n\t\trType = 0;\n\t\tvrLen = 3087;\n\t\tvrLoc = 33171;\n\t};\n\t949198B010BC8DFC00C629D1 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C88C0E10AF4196007CB39E /* NSGeometry.h */;\n\t\tname = \"NSGeometry.h: 100\";\n\t\trLen = 74;\n\t\trLoc = 2081;\n\t\trType = 0;\n\t\tvrLen = 1067;\n\t\tvrLoc = 1388;\n\t};\n\t949198C910BC8FBB00C629D1 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9456C2F910B32D2A000BF3DE /* NSString.h */;\n\t\tname = \"NSString.h: 103\";\n\t\trLen = 7;\n\t\trLoc = 4785;\n\t\trType = 0;\n\t\tvrLen = 3169;\n\t\tvrLoc = 3123;\n\t};\n\t9492450510BA42EF00E726F5 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9492450610BA42EF00E726F5 /* SqueakApplication.h */;\n\t\tname = \"SqueakApplication.h: 12\";\n\t\trLen = 17;\n\t\trLoc = 192;\n\t\trType = 0;\n\t\tvrLen = 237;\n\t\tvrLoc = 0;\n\t};\n\t9492450610BA42EF00E726F5 /* SqueakApplication.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = SqueakApplication.h;\n\t\tpath = \"/Users/johnmci/Work In Progress/smalltalk/CocoaSqueakSource/CocoaSqueak/SqueakApplication.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9492450710BA42EF00E726F5 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9492450810BA42EF00E726F5 /* SqueakApplication.m */;\n\t\tname = \"SqueakApplication.m: 2\";\n\t\trLen = 17;\n\t\trLoc = 7;\n\t\trType = 0;\n\t\tvrLen = 1109;\n\t\tvrLoc = 0;\n\t};\n\t9492450810BA42EF00E726F5 /* SqueakApplication.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = SqueakApplication.m;\n\t\tpath = \"/Users/johnmci/Work In Progress/smalltalk/CocoaSqueakSource/CocoaSqueak/SqueakApplication.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9492450910BA42EF00E726F5 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 945F30620E0C6A5000CFF3DC /* SqueakApplication.m */;\n\t\tname = \"SqueakApplication.m: 12\";\n\t\trLen = 611;\n\t\trLoc = 185;\n\t\trType = 0;\n\t\tvrLen = 797;\n\t\tvrLoc = 0;\n\t};\n\t9492452F10BA43AA00E726F5 /* SqueakOSXApplication.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1104, 674}}\";\n\t\t\tsepNavSelRange = \"{1872, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1877}\";\n\t\t};\n\t};\n\t9492453010BA43AA00E726F5 /* SqueakOSXApplication.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 806}}\";\n\t\t\tsepNavSelRange = \"{1942, 10}\";\n\t\t\tsepNavVisRange = \"{1096, 1337}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {878, 1019}}\";\n\t\t};\n\t};\n\t9492455D10BA462B00E726F5 /* sqUnixQuartz.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = sqUnixQuartz.m;\n\t\tpath = \"/Users/johnmci/Documents/SqueakHydra/SqueakVMMAker/platforms/unix/vm-display-Quartz/sqUnixQuartz.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t949245B210BA4A6200E726F5 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9492455D10BA462B00E726F5 /* sqUnixQuartz.m */;\n\t\tname = \"sqUnixQuartz.m: 1937\";\n\t\trLen = 17;\n\t\trLoc = 51207;\n\t\trType = 0;\n\t\tvrLen = 1549;\n\t\tvrLoc = 51264;\n\t};\n\t9493E98F10EE90BC000C4FB3 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94360A8C10E84CC90060221A /* NSException.h */;\n\t\tname = \"NSException.h: 67\";\n\t\trLen = 9;\n\t\trLoc = 2116;\n\t\trType = 0;\n\t\tvrLen = 2363;\n\t\tvrLoc = 1177;\n\t};\n\t9496D5CD10FAFA29007762DE /* sqSqueakOSXNSView.m:375 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 94C2068910AF4F53002F4160 /* sqSqueakOSXNSView.m */;\n\t\tfunctionName = \"-doCommandBySelector:\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 375;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 306811863.543633;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 2;\n\t};\n\t94993996123E2D34005260E4 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94B6E9D910BC775E00333E9E /* English */;\n\t\tname = \"Localizable.strings: 9\";\n\t\trLen = 0;\n\t\trLoc = 238;\n\t\trType = 0;\n\t\tvrLen = 238;\n\t\tvrLoc = 0;\n\t};\n\t949AD25011E5469C006D6BF4 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9424FF710DDCB234009912BF /* macintoshextra.c */;\n\t\tname = \"macintoshextra.c: 33\";\n\t\trLen = 6;\n\t\trLoc = 1040;\n\t\trType = 0;\n\t\tvrLen = 1922;\n\t\tvrLoc = 0;\n\t};\n\t949CDD0612496F030034C107 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 29B97316FDCFA39411CA2CEA /* main.m */;\n\t\tname = \"main.m: 44\";\n\t\trLen = 0;\n\t\trLoc = 1872;\n\t\trType = 0;\n\t\tvrLen = 2149;\n\t\tvrLoc = 0;\n\t};\n\t949CDD0712496F030034C107 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 1D3623250D0F684500981E51 /* SqueakNoOGLIPhoneAppDelegate.m */;\n\t\tname = \"SqueakNoOGLIPhoneAppDelegate.m: 64\";\n\t\trLen = 8;\n\t\trLoc = 2481;\n\t\trType = 0;\n\t\tvrLen = 2001;\n\t\tvrLoc = 1560;\n\t};\n\t949CDD0812496F030034C107 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 942F76310E0B6C7600848BF2 /* sqSqueakMainApplication+attributes.m */;\n\t\tname = \"sqSqueakMainApplication+attributes.m: 63\";\n\t\trLen = 13;\n\t\trLoc = 2654;\n\t\trType = 0;\n\t\tvrLen = 1981;\n\t\tvrLoc = 1894;\n\t};\n\t949DDD4811D13F630017F79B /* NSDateFormatter.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSDateFormatter.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSDateFormatter.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t949DDD6D11D141080017F79B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 949DDD4811D13F630017F79B /* NSDateFormatter.h */;\n\t\tname = \"NSDateFormatter.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 2173;\n\t\tvrLoc = 0;\n\t};\n\t949E5B970DE3623B007388E0 /* sqUnixMain.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqUnixMain.c;\n\t\tpath = /Users/johnmci/Documents/SqueakHydra/platforms/unix/vm/sqUnixMain.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t949E5DB50DE3AB6A007388E0 /* SqueakUIView.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {950, 755}}\";\n\t\t\tsepNavSelRange = \"{1860, 0}\";\n\t\t\tsepNavVisRange = \"{0, 2260}\";\n\t\t\tsepNavWindowFrame = \"{{21, 20}, {694, 1008}}\";\n\t\t};\n\t};\n\t949E5DB60DE3AB6A007388E0 /* SqueakUIView.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1202, 2626}}\";\n\t\t\tsepNavSelRange = \"{2633, 45}\";\n\t\t\tsepNavVisRange = \"{0, 2530}\";\n\t\t\tsepNavWindowFrame = \"{{152, 50}, {1040, 978}}\";\n\t\t};\n\t};\n\t949EFD7D0FF17FED00F540EB /* ObjectiveCPlugin.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = ObjectiveCPlugin.c;\n\t\tpath = /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/WikiWikiServer/src/vm/intplugins/ObjectiveCPlugin/ObjectiveCPlugin.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94A0E8440DE5EB6E0071C8B9 /* sqSqueakMainApplication+attributes.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 598}}\";\n\t\t\tsepNavSelRange = \"{1867, 14}\";\n\t\t\tsepNavVisRange = \"{0, 2022}\";\n\t\t\tsepNavWindowFrame = \"{{38, 19}, {905, 983}}\";\n\t\t};\n\t};\n\t94A0E8450DE5EB6E0071C8B9 /* sqSqueakIPhoneApplication+attributes.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {869, 1417}}\";\n\t\t\tsepNavSelRange = \"{2521, 0}\";\n\t\t\tsepNavVisRange = \"{2069, 2745}\";\n\t\t\tsepNavWindowFrame = \"{{812, 34}, {818, 994}}\";\n\t\t};\n\t};\n\t94A0E8830DE5EF430071C8B9 /* sqSqueakMainApplication+imageReadWrite.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {850, 778}}\";\n\t\t\tsepNavSelRange = \"{1898, 31}\";\n\t\t\tsepNavVisRange = \"{0, 1966}\";\n\t\t};\n\t};\n\t94A0E8840DE5EF430071C8B9 /* sqSqueakMainApplication+imageReadWrite.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 793}}\";\n\t\t\tsepNavSelRange = \"{2012, 17}\";\n\t\t\tsepNavVisRange = \"{785, 536}\";\n\t\t\tsepNavWindowFrame = \"{{15, 15}, {694, 1008}}\";\n\t\t};\n\t};\n\t94A0E9820DE5F1FE0071C8B9 /* sqSqueakMainApplication+screen.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1039, 796}}\";\n\t\t\tsepNavSelRange = \"{1280, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1983}\";\n\t\t\tsepNavWindowFrame = \"{{15, 15}, {694, 1008}}\";\n\t\t};\n\t};\n\t94A0E9830DE5F1FE0071C8B9 /* sqSqueakMainApplication+screen.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 676}}\";\n\t\t\tsepNavSelRange = \"{1967, 6}\";\n\t\t\tsepNavVisRange = \"{0, 2166}\";\n\t\t\tsepNavWindowFrame = \"{{15, 15}, {694, 1008}}\";\n\t\t};\n\t};\n\t94A0EBB20DE608350071C8B9 /* squeakAudioVideoPipeLineSignalInterface.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = squeakAudioVideoPipeLineSignalInterface.c;\n\t\tpath = \"/Volumes/pm/Mail Downloads/squeakAudioVideoPipeLineSignalInterface.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94A1B0050E0DBE2400EB5EFC /* sqSqueakMainApplication+events.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 598}}\";\n\t\t\tsepNavSelRange = \"{2009, 11}\";\n\t\t\tsepNavVisRange = \"{3, 2024}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {1042, 1024}}\";\n\t\t};\n\t};\n\t94A1B0060E0DBE2400EB5EFC /* sqSqueakMainApplication+events.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 1144}}\";\n\t\t\tsepNavSelRange = \"{2268, 85}\";\n\t\t\tsepNavVisRange = \"{1788, 1208}\";\n\t\t\tsepNavWindowFrame = \"{{744, 20}, {847, 985}}\";\n\t\t};\n\t};\n\t94A1B02B0E0DC10D00EB5EFC /* sqSqueakSoundAPI.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {854, 738}}\";\n\t\t\tsepNavSelRange = \"{7, 16}\";\n\t\t\tsepNavVisRange = \"{0, 1798}\";\n\t\t\tsepNavWindowFrame = \"{{15, 15}, {694, 1008}}\";\n\t\t};\n\t};\n\t94A1B02C0E0DC10D00EB5EFC /* sqSqueakSoundAPI.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {850, 778}}\";\n\t\t\tsepNavSelRange = \"{1957, 42}\";\n\t\t\tsepNavVisRange = \"{0, 2013}\";\n\t\t\tsepNavWindowFrame = \"{{15, 45}, {1017, 978}}\";\n\t\t};\n\t};\n\t94A1B0300E0DC19300EB5EFC /* sqSqueakMainApplication+sound.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1036, 652}}\";\n\t\t\tsepNavSelRange = \"{1878, 6}\";\n\t\t\tsepNavVisRange = \"{0, 1891}\";\n\t\t\tsepNavWindowFrame = \"{{38, 145}, {1288, 857}}\";\n\t\t};\n\t};\n\t94A1B0310E0DC19300EB5EFC /* sqSqueakMainApplication+sound.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {850, 778}}\";\n\t\t\tsepNavSelRange = \"{88, 1697}\";\n\t\t\tsepNavVisRange = \"{0, 1901}\";\n\t\t};\n\t};\n\t94A1B1B810B9C1A800C64473 /* sqMacUIEventsUniversal.c:1429 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 942ABEC410AA34820086D908 /* sqMacUIEventsUniversal.c */;\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 1429;\n\t\tlocation = \"Squeak VM Opt\";\n\t\tmodificationTime = 306811863.5429469;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 2;\n\t};\n\t94A1B21A10B9DE0300C64473 /* keyBoardStrokeDetails.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1279, 859}}\";\n\t\t\tsepNavSelRange = \"{1866, 25}\";\n\t\t\tsepNavVisRange = \"{0, 2034}\";\n\t\t\tsepNavWindowFrame = \"{{15, 13}, {1326, 1010}}\";\n\t\t};\n\t};\n\t94A1B21B10B9DE0300C64473 /* keyBoardStrokeDetails.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1279, 859}}\";\n\t\t\tsepNavSelRange = \"{1829, 38}\";\n\t\t\tsepNavVisRange = \"{0, 1908}\";\n\t\t};\n\t};\n\t94A1B2AA10B9E92A00C64473 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94A1B2AB10B9E92A00C64473 /* NSCache.h */;\n\t\tname = \"NSCache.h: 25\";\n\t\trLen = 52;\n\t\trLoc = 427;\n\t\trType = 0;\n\t\tvrLen = 1024;\n\t\tvrLoc = 0;\n\t};\n\t94A1B2AB10B9E92A00C64473 /* NSCache.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSCache.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSCache.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94A1B41E10BA05E600C64473 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94A1B41F10BA05E600C64473 /* objc.h */;\n\t\tname = \"objc.h: 64\";\n\t\trLen = 46;\n\t\trLoc = 1748;\n\t\trType = 0;\n\t\tvrLen = 1238;\n\t\tvrLoc = 1195;\n\t};\n\t94A1B41F10BA05E600C64473 /* objc.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = objc.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/usr/include/objc/objc.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94A3488C0DDCCCC700D1D4A9 /* sqSqueakScreenAPI.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1169, 764}}\";\n\t\t\tsepNavSelRange = \"{78, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1806}\";\n\t\t\tsepNavWindowFrame = \"{{15, 8}, {1012, 1015}}\";\n\t\t};\n\t};\n\t94A3488D0DDCCCC700D1D4A9 /* sqSqueakScreenAPI.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 1781}}\";\n\t\t\tsepNavSelRange = \"{1975, 0}\";\n\t\t\tsepNavVisRange = \"{1792, 903}\";\n\t\t\tsepNavWindowFrame = \"{{20, 20}, {694, 1008}}\";\n\t\t};\n\t};\n\t94A349B50DDCDBE200D1D4A9 /* iPhone.image */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {807273, 3.9741e+06}}\";\n\t\t\tsepNavSelRange = \"{18277000, 0}\";\n\t\t\tsepNavVisRange = \"{1158, 1564}\";\n\t\t};\n\t};\n\t94A3D780122CB52800DCE9B4 /* johnmci.pbxuser */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = text;\n\t\tname = johnmci.pbxuser;\n\t\tpath = /Users/johnmci/Documents/Squeak3.8.0/platforms/iOS/vm/SqueakPureObjc.xcodeproj/johnmci.pbxuser;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94A3D790122CB56400DCE9B4 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94A3D780122CB52800DCE9B4 /* johnmci.pbxuser */;\n\t\tname = \"johnmci.pbxuser: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 3097;\n\t\tvrLoc = 0;\n\t};\n\t94A3ED241228213E00DF449D /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C887F910ADCEFC007CB39E /* sqSqueakOSXApplication+imageReadWrite.h */;\n\t\tname = \"sqSqueakOSXApplication+imageReadWrite.h: 42\";\n\t\trLen = 0;\n\t\trLoc = 1939;\n\t\trType = 0;\n\t\tvrLen = 2010;\n\t\tvrLoc = 0;\n\t};\n\t94A3ED251228213E00DF449D /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAE6810ACA10100F87527 /* sqSqueakOSXInfoPlistInterface.m */;\n\t\tname = \"sqSqueakOSXInfoPlistInterface.m: 137\";\n\t\trLen = 27;\n\t\trLoc = 5705;\n\t\trType = 0;\n\t\tvrLen = 2312;\n\t\tvrLoc = 4190;\n\t};\n\t94A3ED261228213E00DF449D /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAD1B10AB942300F87527 /* sqSqueakOSXApplication+attributes.h */;\n\t\tname = \"sqSqueakOSXApplication+attributes.h: 6\";\n\t\trLen = 1692;\n\t\trLoc = 109;\n\t\trType = 0;\n\t\tvrLen = 1897;\n\t\tvrLoc = 0;\n\t};\n\t94A3ED891228429500DF449D /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9452D7630E0452D3000AD792 /* sqiPhoneScreenAndWindow.h */;\n\t\tname = \"sqiPhoneScreenAndWindow.h: 42\";\n\t\trLen = 23;\n\t\trLoc = 1909;\n\t\trType = 0;\n\t\tvrLen = 1943;\n\t\tvrLoc = 0;\n\t};\n\t94AB2E6A0E003879006A79E4 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94AB2E6B0E003879006A79E4 /* npsqueak.c */;\n\t\tname = \"npsqueak.c: 984\";\n\t\trLen = 1;\n\t\trLoc = 28701;\n\t\trType = 0;\n\t\tvrLen = 2346;\n\t\tvrLoc = 28415;\n\t};\n\t94AB2E6B0E003879006A79E4 /* npsqueak.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = npsqueak.c;\n\t\tpath = \"/Users/johnmci/Documents/SqueakBrowserPlugin/platforms/Mac OS/vm/npsqueak copy 1/npsqueak.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94AB2E6C0E003879006A79E4 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94AB2E6D0E003879006A79E4 /* npsqueak.c */;\n\t\tname = \"npsqueak.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1371;\n\t\tvrLoc = 0;\n\t};\n\t94AB2E6D0E003879006A79E4 /* npsqueak.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = npsqueak.c;\n\t\tpath = \"/Users/johnmci/Documents/SqueakBrowserPlugin/platforms/Mac OS/vm/npsqueak copy/npsqueak.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94B1514E0DE2CE530059F208 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94B1514F0DE2CE530059F208 /* sqMacWindowUniversal.c */;\n\t\tname = \"sqMacWindowUniversal.c: 580\";\n\t\trLen = 14;\n\t\trLoc = 21540;\n\t\trType = 0;\n\t\tvrLen = 1552;\n\t\tvrLoc = 21405;\n\t};\n\t94B1514F0DE2CE530059F208 /* sqMacWindowUniversal.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqMacWindowUniversal.c;\n\t\tpath = \"/Users/johnmci/Documents/SqueakHydra/platforms/Mac OS/vm/sqMacWindowUniversal.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94B6A65D122C6E760069D952 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9424FF600DDCB1C7009912BF /* sqVirtualMachine.c */;\n\t\tname = \"sqVirtualMachine.c: 169\";\n\t\trLen = 13;\n\t\trLoc = 6331;\n\t\trType = 0;\n\t\tvrLen = 2104;\n\t\tvrLoc = 5268;\n\t};\n\t94B6E9D910BC775E00333E9E /* English */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {955, 760}}\";\n\t\t\tsepNavSelRange = \"{238, 0}\";\n\t\t\tsepNavVisRange = \"{0, 238}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {878, 1019}}\";\n\t\t};\n\t};\n\t94B7898910C4F95E005EA70D /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94CFE6BD10BE63A900847DF5 /* SqViewEventSensor.m */;\n\t\tname = \"SqViewEventSensor.m: 80\";\n\t\trLen = 22;\n\t\trLoc = 2119;\n\t\trType = 0;\n\t\tvrLen = 1922;\n\t\tvrLoc = 499;\n\t};\n\t94B88C540E81500200C98131 /* SqView.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = SqView.m;\n\t\tpath = \"/Users/johnmci/Work In Progress/smalltalk/CocoaSqueakSource/SqueakAppKit/SqView.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94B88C560E81500200C98131 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94B88C570E81500200C98131 /* MsgContext.m */;\n\t\tname = \"MsgContext.m: 97\";\n\t\trLen = 26;\n\t\trLoc = 3007;\n\t\trType = 0;\n\t\tvrLen = 2255;\n\t\tvrLoc = 4983;\n\t};\n\t94B88C570E81500200C98131 /* MsgContext.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = MsgContext.m;\n\t\tpath = \"/Users/johnmci/Work In Progress/smalltalk/FScriptSources-20031020/FScript/FScriptFramework/MsgContext.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94B88C640E81500200C98131 /* SqueakObjcBridge.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = SqueakObjcBridge.m;\n\t\tpath = \"/Users/johnmci/Work In Progress/smalltalk/CocoaSqueakSource/Squeak/SqueakObjcBridge.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94B8F4B910CF5BFF00F0DD6B /* PBXBookmarkGroup */ = {\n\t\tisa = PBXBookmarkGroup;\n\t\tchildren = (\n\t\t\t94B8F54210CF675200F0DD6B /* PBXBookmark */,\n\t\t);\n\t\tname = Root;\n\t};\n\t94B8F54210CF675200F0DD6B /* PBXBookmark */ = {\n\t\tisa = PBXBookmark;\n\t\tfRef = 9402DD6F10CE0E91005C2102 /* SqViewClut.m */;\n\t};\n\t94B8F54E10CF677800F0DD6B /* SqViewClut.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 455}}\";\n\t\t\tsepNavSelRange = \"{66, 17}\";\n\t\t\tsepNavVisRange = \"{0, 254}\";\n\t\t};\n\t};\n\t94B9528510E6B79E00DC476A /* MacMenubarPlugin.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 3354}}\";\n\t\t\tsepNavSelRange = \"{1194, 0}\";\n\t\t\tsepNavVisRange = \"{1043, 535}\";\n\t\t\tsepNavWindowFrame = \"{{602, 4}, {1078, 1014}}\";\n\t\t};\n\t};\n\t94B9533310E6BD7100DC476A /* MacMenuOS9ToOSX.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 537}}\";\n\t\t\tsepNavSelRange = \"{201, 0}\";\n\t\t\tsepNavVisRange = \"{0, 201}\";\n\t\t\tsepNavWindowFrame = \"{{554, 14}, {1078, 1014}}\";\n\t\t};\n\t};\n\t94B9533410E6BD7100DC476A /* MacMenuOS9ToOSX.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 3705}}\";\n\t\t\tsepNavSelRange = \"{1329, 39}\";\n\t\t\tsepNavVisRange = \"{979, 704}\";\n\t\t\tsepNavWindowFrame = \"{{15, 9}, {1078, 1014}}\";\n\t\t};\n\t};\n\t94B954A010E6D0F700DC476A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 944069CD10E6B63200353B27 /* MacMenubarPlugin.c */;\n\t\tname = \"MacMenubarPlugin.c: 711\";\n\t\trLen = 6;\n\t\trLoc = 20318;\n\t\trType = 0;\n\t\tvrLen = 1584;\n\t\tvrLoc = 19909;\n\t};\n\t94BCAAE810AB6C3500F87527 /* NSFileManager.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSFileManager.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSFileManager.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94BCAB0410AB6DC000F87527 /* NSApplication.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSApplication.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSApplication.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94BCABBF10AB72A600F87527 /* sqSqueakOSXFileDirectoryInterface.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {996, 793}}\";\n\t\t\tsepNavSelRange = \"{2017, 0}\";\n\t\t\tsepNavVisRange = \"{0, 2022}\";\n\t\t};\n\t};\n\t94BCABC010AB72A600F87527 /* sqSqueakOSXFileDirectoryInterface.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1227, 1482}}\";\n\t\t\tsepNavSelRange = \"{2931, 56}\";\n\t\t\tsepNavVisRange = \"{1654, 2388}\";\n\t\t\tsepNavWindowFrame = \"{{38, 4}, {1274, 998}}\";\n\t\t};\n\t};\n\t94BCAC0310AB759300F87527 /* NSURL.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSURL.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURL.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94BCAC3710AB79DA00F87527 /* NSArray.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSArray.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSArray.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94BCAC3C10AB79DA00F87527 /* NSDictionary.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSDictionary.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSDictionary.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94BCAC4E10AB7A2B00F87527 /* NSProcessInfo.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSProcessInfo.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSProcessInfo.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94BCACE310AB8AE300F87527 /* NSObject.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSObject.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSObject.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94BCAD0410AB922600F87527 /* NSObjCRuntime.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSObjCRuntime.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSObjCRuntime.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94BCAD1B10AB942300F87527 /* sqSqueakOSXApplication+attributes.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 572}}\";\n\t\t\tsepNavSelRange = \"{1876, 14}\";\n\t\t\tsepNavVisRange = \"{0, 1897}\";\n\t\t};\n\t};\n\t94BCAD1C10AB942300F87527 /* sqSqueakOSXApplication+attributes.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 2093}}\";\n\t\t\tsepNavSelRange = \"{3476, 0}\";\n\t\t\tsepNavVisRange = \"{2592, 2204}\";\n\t\t\tsepNavWindowFrame = \"{{15, 45}, {1017, 978}}\";\n\t\t};\n\t};\n\t94BCAD4A10AB981B00F87527 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAC4E10AB7A2B00F87527 /* NSProcessInfo.h */;\n\t\tname = \"NSProcessInfo.h: 20\";\n\t\trLen = 13;\n\t\trLoc = 437;\n\t\trType = 0;\n\t\tvrLen = 861;\n\t\tvrLoc = 0;\n\t};\n\t94BCAE6710ACA10100F87527 /* sqSqueakOSXInfoPlistInterface.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1279, 1066}}\";\n\t\t\tsepNavSelRange = \"{855, 0}\";\n\t\t\tsepNavVisRange = \"{710, 3469}\";\n\t\t\tsepNavWindowFrame = \"{{29, 4}, {1326, 1010}}\";\n\t\t};\n\t};\n\t94BCAE6810ACA10100F87527 /* sqSqueakOSXInfoPlistInterface.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 3471}}\";\n\t\t\tsepNavSelRange = \"{7638, 17}\";\n\t\t\tsepNavVisRange = \"{6700, 1350}\";\n\t\t\tsepNavWindowFrame = \"{{15, 45}, {1017, 978}}\";\n\t\t};\n\t};\n\t94BCAE9010ACA3A300F87527 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAE9110ACA3A300F87527 /* NSUserDefaults.h */;\n\t\tname = \"NSUserDefaults.h: 13\";\n\t\trLen = 14;\n\t\trLoc = 365;\n\t\trType = 0;\n\t\tvrLen = 2118;\n\t\tvrLoc = 0;\n\t};\n\t94BCAE9110ACA3A300F87527 /* NSUserDefaults.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSUserDefaults.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSUserDefaults.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94BCAE9D10ACA3A300F87527 /* NSBundle.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSBundle.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSBundle.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94BCAEDF10ACAE2500F87527 /* NSValue.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSValue.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSValue.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94BCAF7D10ACC0D900F87527 /* NSPathUtilities.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSPathUtilities.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSPathUtilities.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94BCAFC410ACC89100F87527 /* string.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = string.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/usr/include/string.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94BCAFC710ACC89100F87527 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAFC810ACC89100F87527 /* CFBundle.h */;\n\t\tname = \"CFBundle.h: 113\";\n\t\trLen = 33;\n\t\trLoc = 4376;\n\t\trType = 0;\n\t\tvrLen = 2277;\n\t\tvrLoc = 2928;\n\t};\n\t94BCAFC810ACC89100F87527 /* CFBundle.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = CFBundle.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreFoundation.framework/Versions/A/Headers/CFBundle.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94BCAFCA10ACC89100F87527 /* CFURL.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = CFURL.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreFoundation.framework/Versions/A/Headers/CFURL.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94BCE6660DDDEB5000F38F31 /* sqMacHostWindow.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1279, 936}}\";\n\t\t\tsepNavSelRange = \"{2227, 20}\";\n\t\t\tsepNavVisRange = \"{0, 2553}\";\n\t\t\tsepNavWindowFrame = \"{{15, 13}, {1326, 1010}}\";\n\t\t};\n\t};\n\t94BCE6870DDDECB800F38F31 /* HostWindowPlugin.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 728}}\";\n\t\t\tsepNavSelRange = \"{996, 13}\";\n\t\t\tsepNavVisRange = \"{0, 2779}\";\n\t\t\tsepNavWindowFrame = \"{{15, 59}, {1394, 964}}\";\n\t\t};\n\t};\n\t94BCE7390DDDEF8200F38F31 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E659080DDD03FE00358328 /* MIDIPlugin.c */;\n\t\tname = \"MIDIPlugin.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 864;\n\t\tvrLoc = 0;\n\t};\n\t94BCE7870DDDF61200F38F31 /* sqUnixUUID.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 611}}\";\n\t\t\tsepNavSelRange = \"{20, 18}\";\n\t\t\tsepNavVisRange = \"{0, 275}\";\n\t\t};\n\t};\n\t94BCE7A60DDDF8F800F38F31 /* sqaio.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 1313}}\";\n\t\t\tsepNavSelRange = \"{3879, 7}\";\n\t\t\tsepNavVisRange = \"{2703, 1444}\";\n\t\t};\n\t};\n\t94BCE93E0DDE044700F38F31 /* sqSqueakIPhoneApplication+events.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {838, 691}}\";\n\t\t\tsepNavSelRange = \"{2306, 110}\";\n\t\t\tsepNavVisRange = \"{0, 2421}\";\n\t\t\tsepNavWindowFrame = \"{{73, 45}, {905, 983}}\";\n\t\t};\n\t};\n\t94BCE93F0DDE044700F38F31 /* sqSqueakIPhoneApplication+events.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1272, 3081}}\";\n\t\t\tsepNavSelRange = \"{11094, 0}\";\n\t\t\tsepNavVisRange = \"{1938, 2200}\";\n\t\t\tsepNavWindowFrame = \"{{775, 1}, {905, 983}}\";\n\t\t};\n\t};\n\t94BCEA2B0DDE0C1600F38F31 /* sqMacHostWindow.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {858, 2561}}\";\n\t\t\tsepNavSelRange = \"{2124, 115}\";\n\t\t\tsepNavVisRange = \"{1236, 1931}\";\n\t\t\tsepNavWindowFrame = \"{{775, 4}, {905, 983}}\";\n\t\t};\n\t};\n\t94BCEAF20DDE16B400F38F31 /* sqMacSecurity.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {858, 3341}}\";\n\t\t\tsepNavSelRange = \"{2225, 50}\";\n\t\t\tsepNavVisRange = \"{647, 2896}\";\n\t\t\tsepNavWindowFrame = \"{{15, 40}, {905, 983}}\";\n\t\t};\n\t};\n\t94BD816F11C8A58D00556751 /* sqManualSurface.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1132, 2145}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 2172}\";\n\t\t};\n\t};\n\t94BE8B2C123D943800C89FDD /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9458525510F04339001401E7 /* sqSqueakIPhoneClipboardAPI.m */;\n\t\tname = \"sqSqueakIPhoneClipboardAPI.m: 19\";\n\t\trLen = 13;\n\t\trLoc = 586;\n\t\trType = 0;\n\t\tvrLen = 1345;\n\t\tvrLoc = 0;\n\t};\n\t94C0D1AC112D5DAE00213581 /* sqSqueakScreenAPI.m:79 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 94A3488D0DDCCCC700D1D4A9 /* sqSqueakScreenAPI.m */;\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 79;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 306811863.5436701;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 2;\n\t};\n\t94C16BCB123D78C200A8622A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C36A9310B09EE70041953A /* sqSqueakOSXApplication+events.m */;\n\t\tname = \"sqSqueakOSXApplication+events.m: 94\";\n\t\trLen = 0;\n\t\trLoc = 4315;\n\t\trType = 0;\n\t\tvrLen = 1968;\n\t\tvrLoc = 8312;\n\t};\n\t94C16BD5123D7C9300A8622A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E658E00DDD03FE00358328 /* interp.c */;\n\t\tname = \"interp.c: 15817\";\n\t\trLen = 19;\n\t\trLoc = 512103;\n\t\trType = 0;\n\t\tvrLen = 1945;\n\t\tvrLoc = 511094;\n\t};\n\t94C2068810AF4F53002F4160 /* sqSqueakOSXNSView.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {955, 1157}}\";\n\t\t\tsepNavSelRange = \"{2337, 10}\";\n\t\t\tsepNavVisRange = \"{1313, 2364}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {719, 1019}}\";\n\t\t};\n\t};\n\t94C2068910AF4F53002F4160 /* sqSqueakOSXNSView.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 9737}}\";\n\t\t\tsepNavSelRange = \"{2976, 13}\";\n\t\t\tsepNavVisRange = \"{2225, 1245}\";\n\t\t\tsepNavWindowFrame = \"{{25, 4}, {860, 1024}}\";\n\t\t};\n\t};\n\t94C206AA10AF5107002F4160 /* NSImageRep.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSImageRep.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSImageRep.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C206D210AF5536002F4160 /* CGImage.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = CGImage.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Headers/CGImage.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C206D810AF5536002F4160 /* NSGraphicsContext.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSGraphicsContext.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSGraphicsContext.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C206DA10AF5536002F4160 /* CGContext.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = CGContext.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Headers/CGContext.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C2070610AF5A9E002F4160 /* NSImage.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSImage.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSImage.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C2074310AF5FB7002F4160 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C206AA10AF5107002F4160 /* NSImageRep.h */;\n\t\tname = \"NSImageRep.h: 45\";\n\t\trLen = 33;\n\t\trLoc = 1303;\n\t\trType = 0;\n\t\tvrLen = 1800;\n\t\tvrLoc = 0;\n\t};\n\t94C207E910AF66D7002F4160 /* NSWindow.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSWindow.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSWindow.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C2091010AF7413002F4160 /* CIImage.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = CIImage.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/QuartzCore.framework/Versions/A/Headers/CIImage.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C2091210AF7413002F4160 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C2091310AF7413002F4160 /* NSCIImageRep.h */;\n\t\tname = \"NSCIImageRep.h: 29\";\n\t\trLen = 26;\n\t\trLoc = 776;\n\t\trType = 0;\n\t\tvrLen = 841;\n\t\tvrLoc = 0;\n\t};\n\t94C2091310AF7413002F4160 /* NSCIImageRep.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSCIImageRep.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSCIImageRep.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C2092A10AF769A002F4160 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C2091010AF7413002F4160 /* CIImage.h */;\n\t\tname = \"CIImage.h: 98\";\n\t\trLen = 15;\n\t\trLoc = 3526;\n\t\trType = 0;\n\t\tvrLen = 1904;\n\t\tvrLoc = 2714;\n\t};\n\t94C2092D10AF769A002F4160 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C206D810AF5536002F4160 /* NSGraphicsContext.h */;\n\t\tname = \"NSGraphicsContext.h: 59\";\n\t\trLen = 39;\n\t\trLoc = 2654;\n\t\trType = 0;\n\t\tvrLen = 1997;\n\t\tvrLoc = 2593;\n\t};\n\t94C367C010AF9C0A0041953A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C367C110AF9C0A0041953A /* Aliases.h */;\n\t\tname = \"Aliases.h: 286\";\n\t\trLen = 34;\n\t\trLoc = 9594;\n\t\trType = 0;\n\t\tvrLen = 1442;\n\t\tvrLoc = 8779;\n\t};\n\t94C367C110AF9C0A0041953A /* Aliases.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = Aliases.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/Headers/Aliases.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C367C210AF9C0A0041953A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C367C310AF9C0A0041953A /* LSInfo.h */;\n\t\tname = \"LSInfo.h: 257\";\n\t\trLen = 22;\n\t\trLoc = 9965;\n\t\trType = 0;\n\t\tvrLen = 1369;\n\t\tvrLoc = 9104;\n\t};\n\t94C367C310AF9C0A0041953A /* LSInfo.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = LSInfo.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Headers/LSInfo.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C367D110AF9C830041953A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAFCA10ACC89100F87527 /* CFURL.h */;\n\t\tname = \"CFURL.h: 636\";\n\t\trLen = 20;\n\t\trLoc = 30806;\n\t\trType = 0;\n\t\tvrLen = 2114;\n\t\tvrLoc = 29706;\n\t};\n\t94C3682410AFA39A0041953A /* macintoshosxextra.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {996, 770}}\";\n\t\t\tsepNavSelRange = \"{192, 0}\";\n\t\t\tsepNavVisRange = \"{0, 192}\";\n\t\t};\n\t};\n\t94C3682510AFA39A0041953A /* macintoshosxextra.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 572}}\";\n\t\t\tsepNavSelRange = \"{927, 14}\";\n\t\t\tsepNavVisRange = \"{0, 1287}\";\n\t\t};\n\t};\n\t94C3687610AFA77F0041953A /* sqSqueakOSXApplication+cursor.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 585}}\";\n\t\t\tsepNavSelRange = \"{1874, 6}\";\n\t\t\tsepNavVisRange = \"{0, 2040}\";\n\t\t\tsepNavWindowFrame = \"{{38, 24}, {1017, 978}}\";\n\t\t};\n\t};\n\t94C3687710AFA77F0041953A /* sqSqueakOSXApplication+cursor.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 2028}}\";\n\t\t\tsepNavSelRange = \"{4018, 8}\";\n\t\t\tsepNavVisRange = \"{3843, 1708}\";\n\t\t\tsepNavWindowFrame = \"{{254, 9}, {1426, 1019}}\";\n\t\t};\n\t};\n\t94C3687B10AFA8300041953A /* sqSqueakCursorAPI.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 616}}\";\n\t\t\tsepNavSelRange = \"{9, 12}\";\n\t\t\tsepNavVisRange = \"{0, 1788}\";\n\t\t};\n\t};\n\t94C3687C10AFA8300041953A /* sqSqueakCursorAPI.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 858}}\";\n\t\t\tsepNavSelRange = \"{2229, 0}\";\n\t\t\tsepNavVisRange = \"{909, 1896}\";\n\t\t\tsepNavWindowFrame = \"{{38, 19}, {905, 983}}\";\n\t\t};\n\t};\n\t94C3688A10AFA9EF0041953A /* sqSqueakMainApplication+cursor.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 585}}\";\n\t\t\tsepNavSelRange = \"{1949, 6}\";\n\t\t\tsepNavVisRange = \"{0, 2021}\";\n\t\t};\n\t};\n\t94C3688B10AFA9EF0041953A /* sqSqueakMainApplication+cursor.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 624}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1651}\";\n\t\t};\n\t};\n\t94C368F610AFAEA60041953A /* QuickdrawTypes.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = QuickdrawTypes.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/Headers/QuickdrawTypes.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C368F910AFAEA60041953A /* CFByteOrder.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = CFByteOrder.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreFoundation.framework/Versions/A/Headers/CFByteOrder.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C3696310AFB7550041953A /* NSGraphics.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSGraphics.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSGraphics.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C3696410AFB7550041953A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C368F610AFAEA60041953A /* QuickdrawTypes.h */;\n\t\tname = \"QuickdrawTypes.h: 262\";\n\t\trLen = 16;\n\t\trLoc = 8337;\n\t\trType = 0;\n\t\tvrLen = 1520;\n\t\tvrLoc = 7208;\n\t};\n\t94C3696610AFB7550041953A /* NSBitmapImageRep.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSBitmapImageRep.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSBitmapImageRep.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C3698D10B082DF0041953A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C368F910AFAEA60041953A /* CFByteOrder.h */;\n\t\tname = \"CFByteOrder.h: 78\";\n\t\trLen = 20;\n\t\trLoc = 1887;\n\t\trType = 0;\n\t\tvrLen = 1136;\n\t\tvrLoc = 1325;\n\t};\n\t94C3699110B082DF0041953A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C3699210B082DF0041953A /* NSColor.h */;\n\t\tname = \"NSColor.h: 65\";\n\t\trLen = 7;\n\t\trLoc = 3749;\n\t\trType = 0;\n\t\tvrLen = 2379;\n\t\tvrLoc = 2696;\n\t};\n\t94C3699210B082DF0041953A /* NSColor.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSColor.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSColor.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C36A6D10B091BB0041953A /* NSCursor.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSCursor.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSCursor.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C36A9210B09EE70041953A /* sqSqueakOSXApplication+events.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 715}}\";\n\t\t\tsepNavSelRange = \"{1877, 0}\";\n\t\t\tsepNavVisRange = \"{854, 1965}\";\n\t\t\tsepNavWindowFrame = \"{{149, 4}, {905, 983}}\";\n\t\t};\n\t};\n\t94C36A9310B09EE70041953A /* sqSqueakOSXApplication+events.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1412, 5057}}\";\n\t\t\tsepNavSelRange = \"{5031, 11}\";\n\t\t\tsepNavVisRange = \"{4186, 1935}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {1131, 1019}}\";\n\t\t};\n\t};\n\t94C36AD910B0AF960041953A /* NSEvent.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSEvent.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSEvent.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C36C9710B0CF290041953A /* Info-iPhone.plist */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavWindowFrame = \"{{15, 55}, {1438, 968}}\";\n\t\t};\n\t};\n\t94C3AC3E11E6C9D000DBE1E9 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCE7870DDDF61200F38F31 /* sqUnixUUID.c */;\n\t\tname = \"sqUnixUUID.c: 2\";\n\t\trLen = 18;\n\t\trLoc = 20;\n\t\trType = 0;\n\t\tvrLen = 275;\n\t\tvrLoc = 0;\n\t};\n\t94C4B80F10C06C4700CD4F90 /* configx.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {994, 799}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1946}\";\n\t\t};\n\t};\n\t94C4B82E10C06F8800CD4F90 /* sqSqueakOSXSoundCoreAudio.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1109, 724}}\";\n\t\t\tsepNavSelRange = \"{1876, 22}\";\n\t\t\tsepNavVisRange = \"{0, 1939}\";\n\t\t};\n\t};\n\t94C4B82F10C06F8800CD4F90 /* sqSqueakOSXSoundCoreAudio.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 793}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1758}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {1426, 1019}}\";\n\t\t};\n\t};\n\t94C4B83610C0708F00CD4F90 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E659160DDD03FE00358328 /* SoundPlugin.c */;\n\t\tname = \"SoundPlugin.c: 103\";\n\t\trLen = 9;\n\t\trLoc = 2783;\n\t\trType = 0;\n\t\tvrLen = 1524;\n\t\tvrLoc = 1817;\n\t};\n\t94C887D410ADCC0D007CB39E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C887D510ADCC0D007CB39E /* NSThread.h */;\n\t\tname = \"NSThread.h: 75\";\n\t\trLen = 96;\n\t\trLoc = 1964;\n\t\trType = 0;\n\t\tvrLen = 2073;\n\t\tvrLoc = 503;\n\t};\n\t94C887D510ADCC0D007CB39E /* NSThread.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSThread.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSThread.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C887F910ADCEFC007CB39E /* sqSqueakOSXApplication+imageReadWrite.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {995, 745}}\";\n\t\t\tsepNavSelRange = \"{1939, 0}\";\n\t\t\tsepNavVisRange = \"{0, 2010}\";\n\t\t};\n\t};\n\t94C887FA10ADCEFC007CB39E /* sqSqueakOSXApplication+imageReadWrite.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 1755}}\";\n\t\t\tsepNavSelRange = \"{3696, 8}\";\n\t\t\tsepNavVisRange = \"{2509, 1374}\";\n\t\t\tsepNavWindowFrame = \"{{685, 4}, {878, 1019}}\";\n\t\t};\n\t};\n\t94C888B710ADE75B007CB39E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAE9D10ACA3A300F87527 /* NSBundle.h */;\n\t\tname = \"NSBundle.h: 11\";\n\t\trLen = 8;\n\t\trLoc = 335;\n\t\trType = 0;\n\t\tvrLen = 2317;\n\t\tvrLoc = 0;\n\t};\n\t94C88B6810AF26F8007CB39E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C88B6910AF26F8007CB39E /* squeakProxy.m */;\n\t\tname = \"squeakProxy.m: 124\";\n\t\trLen = 22;\n\t\trLoc = 3876;\n\t\trType = 0;\n\t\tvrLen = 1083;\n\t\tvrLoc = 3252;\n\t};\n\t94C88B6910AF26F8007CB39E /* squeakProxy.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = squeakProxy.m;\n\t\tpath = \"/Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/Blob/platforms/Mac OSObjC/plugins/SqueakObjectiveC/squeakProxy.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C88BDD10AF3C52007CB39E /* sqSqueakOSXScreenAndWindow.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {838, 676}}\";\n\t\t\tsepNavSelRange = \"{1911, 85}\";\n\t\t\tsepNavVisRange = \"{55, 2056}\";\n\t\t\tsepNavWindowFrame = \"{{16, 4}, {1392, 1019}}\";\n\t\t};\n\t};\n\t94C88BDE10AF3C52007CB39E /* sqSqueakOSXScreenAndWindow.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 975}}\";\n\t\t\tsepNavSelRange = \"{2308, 15}\";\n\t\t\tsepNavVisRange = \"{983, 1403}\";\n\t\t\tsepNavWindowFrame = \"{{334, 25}, {1346, 974}}\";\n\t\t};\n\t};\n\t94C88C0E10AF4196007CB39E /* NSGeometry.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSGeometry.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSGeometry.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C8D074123EC12D0019544B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 949E5DB60DE3AB6A007388E0 /* SqueakUIView.m */;\n\t\tname = \"SqueakUIView.m: 68\";\n\t\trLen = 45;\n\t\trLoc = 2633;\n\t\trType = 0;\n\t\tvrLen = 2530;\n\t\tvrLoc = 0;\n\t};\n\t94C8D0A9123EC3920019544B /* gl.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = gl.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/gl.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C8D0AF123EC4A90019544B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C8D0A9123EC3920019544B /* gl.h */;\n\t\tname = \"gl.h: 375\";\n\t\trLen = 16;\n\t\trLoc = 12095;\n\t\trType = 0;\n\t\tvrLen = 1941;\n\t\tvrLoc = 10609;\n\t};\n\t94C8D26B123EEE2E0019544B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 940CE8550DFCE2D200EBA91B /* SqueakUIController.m */;\n\t\tname = \"SqueakUIController.m: 71\";\n\t\trLen = 0;\n\t\trLoc = 3142;\n\t\trType = 0;\n\t\tvrLen = 2036;\n\t\tvrLoc = 2103;\n\t};\n\t94CA691410B1CAD8007F207C /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E6590E0DDD03FE00358328 /* SecurityPlugin.c */;\n\t\tname = \"SecurityPlugin.c: 109\";\n\t\trLen = 14;\n\t\trLoc = 3415;\n\t\trType = 0;\n\t\tvrLen = 1013;\n\t\tvrLoc = 2696;\n\t};\n\t94CAA52E123DCAB700651F54 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 949E5DB50DE3AB6A007388E0 /* SqueakUIView.h */;\n\t\tname = \"SqueakUIView.h: 43\";\n\t\trLen = 0;\n\t\trLoc = 1860;\n\t\trType = 0;\n\t\tvrLen = 2260;\n\t\tvrLoc = 0;\n\t};\n\t94CAA5D8123DDCFE00651F54 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C2068810AF4F53002F4160 /* sqSqueakOSXNSView.h */;\n\t\tname = \"sqSqueakOSXNSView.h: 56\";\n\t\trLen = 10;\n\t\trLoc = 2337;\n\t\trType = 0;\n\t\tvrLen = 2364;\n\t\tvrLoc = 1313;\n\t};\n\t94CAA648123DE2EF00651F54 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C887FA10ADCEFC007CB39E /* sqSqueakOSXApplication+imageReadWrite.m */;\n\t\tname = \"sqSqueakOSXApplication+imageReadWrite.m: 126\";\n\t\trLen = 27;\n\t\trLoc = 4983;\n\t\trType = 0;\n\t\tvrLen = 2097;\n\t\tvrLoc = 3204;\n\t};\n\t94CAC151125FBC1400CF9255 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCE93F0DDE044700F38F31 /* sqSqueakIPhoneApplication+events.m */;\n\t\tname = \"sqSqueakIPhoneApplication+events.m: 229\";\n\t\trLen = 0;\n\t\trLoc = 11094;\n\t\trType = 0;\n\t\tvrLen = 2200;\n\t\tvrLoc = 1938;\n\t};\n\t94CFE4AF10BE3CA600847DF5 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E659120DDD03FE00358328 /* SoundCodecPrims.c */;\n\t\tname = \"SoundCodecPrims.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1395;\n\t\tvrLoc = 0;\n\t};\n\t94CFE6A910BE63A900847DF5 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C207E910AF66D7002F4160 /* NSWindow.h */;\n\t\tname = \"NSWindow.h: 453\";\n\t\trLen = 8;\n\t\trLoc = 19650;\n\t\trType = 0;\n\t\tvrLen = 2322;\n\t\tvrLoc = 18630;\n\t};\n\t94CFE6B810BE63A900847DF5 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9406E87510B66A74002F81F2 /* SqueakInterpreterEventSensor.m */;\n\t\tname = \"SqueakInterpreterEventSensor.m: 54\";\n\t\trLen = 8;\n\t\trLoc = 1477;\n\t\trType = 0;\n\t\tvrLen = 1077;\n\t\tvrLoc = 1241;\n\t};\n\t94CFE6B910BE63A900847DF5 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94F89AED10B497F400556475 /* NSResponder.h */;\n\t\tname = \"NSResponder.h: 31\";\n\t\trLen = 12;\n\t\trLoc = 957;\n\t\trType = 0;\n\t\tvrLen = 1492;\n\t\tvrLoc = 0;\n\t};\n\t94CFE6BD10BE63A900847DF5 /* SqViewEventSensor.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = SqViewEventSensor.m;\n\t\tpath = \"/Users/johnmci/Work In Progress/smalltalk/CocoaSqueakSource/SqueakAppKit/SqViewEventSensor.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94CFE6C010BE63A900847DF5 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 945BA53B10B218F700C2020C /* math.h */;\n\t\tname = \"math.h: 379\";\n\t\trLen = 8;\n\t\trLoc = 15491;\n\t\trType = 0;\n\t\tvrLen = 1479;\n\t\tvrLoc = 14505;\n\t};\n\t94CFE70110BE683800847DF5 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C36AD910B0AF960041953A /* NSEvent.h */;\n\t\tname = \"NSEvent.h: 246\";\n\t\trLen = 6;\n\t\trLoc = 8572;\n\t\trType = 0;\n\t\tvrLen = 1801;\n\t\tvrLoc = 7114;\n\t};\n\t94D051D3120CE2D40039F8B7 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94638B260EAFB77B00A3F155 /* iPhone.changes */;\n\t\tname = \"iPhone.changes: 134722\";\n\t\trLen = 0;\n\t\trLoc = 4068487;\n\t\trType = 0;\n\t\tvrLen = 1428;\n\t\tvrLoc = 940;\n\t};\n\t94D12BE412289C66006B7504 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E658EA0DDD03FE00358328 /* BitBltPlugin.c */;\n\t\tname = \"BitBltPlugin.c: 2459\";\n\t\trLen = 0;\n\t\trLoc = 71472;\n\t\trType = 0;\n\t\tvrLen = 1211;\n\t\tvrLoc = 71047;\n\t};\n\t94D16BFC10BCEFEE00A69A89 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D16BFD10BCEFEE00A69A89 /* Document.m */;\n\t\tname = \"Document.m: 35\";\n\t\trLen = 32;\n\t\trLoc = 1133;\n\t\trType = 0;\n\t\tvrLen = 1663;\n\t\tvrLoc = 14;\n\t};\n\t94D16BFD10BCEFEE00A69A89 /* Document.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = Document.m;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/CocoaSqueak-3.0.4/src/CocoaSqueak/Document.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D16BFE10BCEFEE00A69A89 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 942CF46B10BCE44B009BD905 /* NSWindowController.h */;\n\t\tname = \"NSWindowController.h: 13\";\n\t\trLen = 18;\n\t\trLoc = 224;\n\t\trType = 0;\n\t\tvrLen = 2830;\n\t\tvrLoc = 0;\n\t};\n\t94D16C2A10BCF28A00A69A89 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9428BBE210BB565100DAD287 /* sqUnixQuartz.m */;\n\t\tname = \"sqUnixQuartz.m: 1031\";\n\t\trLen = 1;\n\t\trLoc = 27820;\n\t\trType = 0;\n\t\tvrLen = 1184;\n\t\tvrLoc = 27288;\n\t};\n\t94D16C4010BCF3E100A69A89 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D16C4110BCF3E100A69A89 /* CGDirectDisplay.h */;\n\t\tname = \"CGDirectDisplay.h: 336\";\n\t\trLen = 22;\n\t\trLoc = 13802;\n\t\trType = 0;\n\t\tvrLen = 2189;\n\t\tvrLoc = 12694;\n\t};\n\t94D16C4110BCF3E100A69A89 /* CGDirectDisplay.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = CGDirectDisplay.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Headers/CGDirectDisplay.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D16C6510BCF5B700A69A89 /* NSApplication.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSApplication.h;\n\t\tpath = /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSApplication.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D16CA310BCF93000A69A89 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D16C6510BCF5B700A69A89 /* NSApplication.h */;\n\t\tname = \"NSApplication.h: 269\";\n\t\trLen = 43;\n\t\trLoc = 10310;\n\t\trType = 0;\n\t\tvrLen = 2825;\n\t\tvrLoc = 9201;\n\t};\n\t94D16CAF10BCF96B00A69A89 /* Credits.rtf */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {972, 725}}\";\n\t\t\tsepNavSelRange = \"{51, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {972, 725}}\";\n\t\t\tsepNavWindowFrame = \"{{175, 9}, {878, 1019}}\";\n\t\t};\n\t};\n\t94D3654D10CEC86C00805023 /* BitMapConversionLogicFromX11.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {995, 844}}\";\n\t\t\tsepNavSelRange = \"{581, 14}\";\n\t\t\tsepNavVisRange = \"{0, 1092}\";\n\t\t\tsepNavWindowFrame = \"{{15, 13}, {1326, 1010}}\";\n\t\t};\n\t};\n\t94D3654E10CEC86C00805023 /* BitMapConversionLogicFromX11.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1279, 3029}}\";\n\t\t\tsepNavSelRange = \"{1749, 84}\";\n\t\t\tsepNavVisRange = \"{1665, 2000}\";\n\t\t\tsepNavWindowFrame = \"{{715, -46}, {1326, 1010}}\";\n\t\t};\n\t};\n\t94D3660B10CEE03900805023 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D3660C10CEE03900805023 /* CIImage.h */;\n\t\tname = \"CIImage.h: 32\";\n\t\trLen = 4;\n\t\trLoc = 826;\n\t\trType = 0;\n\t\tvrLen = 2058;\n\t\tvrLoc = 0;\n\t};\n\t94D3660C10CEE03900805023 /* CIImage.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = CIImage.h;\n\t\tpath = /System/Library/Frameworks/QuartzCore.framework/Versions/A/Headers/CIImage.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D715CB10B723B200F69A71 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D715CC10B723B200F69A71 /* NSData.h */;\n\t\tname = \"NSData.h: 45\";\n\t\trLen = 6;\n\t\trLoc = 1410;\n\t\trType = 0;\n\t\tvrLen = 1584;\n\t\tvrLoc = 0;\n\t};\n\t94D715CC10B723B200F69A71 /* NSData.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSData.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSData.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D7173610B72F8800F69A71 /* FunctionKeyNames.strings */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = text.plist.strings;\n\t\tname = FunctionKeyNames.strings;\n\t\tpath = /System/Library/Frameworks/AppKit.framework/Versions/C/Resources/English.lproj/FunctionKeyNames.strings;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D7174110B72FDF00F69A71 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D7173610B72F8800F69A71 /* FunctionKeyNames.strings */;\n\t\tname = \"FunctionKeyNames.strings: 2\";\n\t\trLen = 9;\n\t\trLoc = 29;\n\t\trType = 0;\n\t\tvrLen = 802;\n\t\tvrLoc = 0;\n\t};\n\t94D7177D10B73A3800F69A71 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D7177E10B73A3800F69A71 /* SqueakEventQueue.m */;\n\t\tname = \"SqueakEventQueue.m: 90\";\n\t\trLen = 17;\n\t\trLoc = 2396;\n\t\trType = 0;\n\t\tvrLen = 1483;\n\t\tvrLoc = 736;\n\t};\n\t94D7177E10B73A3800F69A71 /* SqueakEventQueue.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = SqueakEventQueue.m;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/CocoaSqueak-3.0.4/src/Squeak/SqueakEventQueue.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D7178010B73A3800F69A71 /* SqueakInterpreterEventSensor.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = SqueakInterpreterEventSensor.m;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/CocoaSqueak-3.0.4/src/Squeak/SqueakInterpreterEventSensor.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D7178310B73A3800F69A71 /* SqViewInputSensor.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = SqViewInputSensor.m;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/CocoaSqueak-3.0.4/src/SqueakAppKit/SqViewInputSensor.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D7178410B73A3800F69A71 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D7178510B73A3800F69A71 /* SqueakController.m */;\n\t\tname = \"SqueakController.m: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1497;\n\t\tvrLoc = 370;\n\t};\n\t94D7178510B73A3800F69A71 /* SqueakController.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = SqueakController.m;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/CocoaSqueak-3.0.4/src/CocoaSqueak/SqueakController.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D7178610B73A3800F69A71 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D7178710B73A3800F69A71 /* SqViewBitmapConversion.m */;\n\t\tname = \"SqViewBitmapConversion.m: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1336;\n\t\tvrLoc = 7040;\n\t};\n\t94D7178710B73A3800F69A71 /* SqViewBitmapConversion.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = SqViewBitmapConversion.m;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/CocoaSqueak-3.0.4/src/SqueakAppKit/SqViewBitmapConversion.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D7178810B73A3800F69A71 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D7178910B73A3800F69A71 /* SqView.m */;\n\t\tname = \"SqView.m: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 2292;\n\t\tvrLoc = 6209;\n\t};\n\t94D7178910B73A3800F69A71 /* SqView.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = SqView.m;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/CocoaSqueak-3.0.4/src/SqueakAppKit/SqView.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D7178A10B73A3800F69A71 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D7178B10B73A3800F69A71 /* SqClipboardHandler.m */;\n\t\tname = \"SqClipboardHandler.m: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1588;\n\t\tvrLoc = 0;\n\t};\n\t94D7178B10B73A3800F69A71 /* SqClipboardHandler.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = SqClipboardHandler.m;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/CocoaSqueak-3.0.4/src/SqueakAppKit/SqClipboardHandler.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D7178C10B73A3800F69A71 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D7178D10B73A3800F69A71 /* CarbonSound.c */;\n\t\tname = \"CarbonSound.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 2068;\n\t\tvrLoc = 1940;\n\t};\n\t94D7178D10B73A3800F69A71 /* CarbonSound.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = CarbonSound.c;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/CocoaSqueak-3.0.4/src/SqueakAppKit/CarbonSound.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D7178F10B73A3800F69A71 /* SqueakInterpreterEventSensor.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = SqueakInterpreterEventSensor.h;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/CocoaSqueak-3.0.4/src/Squeak/SqueakInterpreterEventSensor.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D7179110B73A3800F69A71 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D7179210B73A3800F69A71 /* FScriptTextView.m */;\n\t\tname = \"FScriptTextView.m: 126\";\n\t\trLen = 138;\n\t\trLoc = 4464;\n\t\trType = 0;\n\t\tvrLen = 1701;\n\t\tvrLoc = 4066;\n\t};\n\t94D7179210B73A3800F69A71 /* FScriptTextView.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = FScriptTextView.m;\n\t\tpath = \"/Users/johnmci/Work In Progress/smalltalk/FScriptSources-20031020/FScript/FScriptFramework/FScriptTextView.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D717BE10B73DD900F69A71 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9406E8D110B67499002F81F2 /* NSRange.h */;\n\t\tname = \"NSRange.h: 12\";\n\t\trLen = 23;\n\t\trLoc = 213;\n\t\trType = 0;\n\t\tvrLen = 1181;\n\t\tvrLoc = 0;\n\t};\n\t94D717E610B7421F00F69A71 /* sqUnixQuartz.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = sqUnixQuartz.m;\n\t\tpath = \"/Users/johnmci/Documents/SqueakSparklePlugin/platforms/unix/vm-display-Quartz/sqUnixQuartz.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D717F810B743B800F69A71 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D717E610B7421F00F69A71 /* sqUnixQuartz.m */;\n\t\tname = \"sqUnixQuartz.m: 2301\";\n\t\trLen = 18;\n\t\trLoc = 59489;\n\t\trType = 0;\n\t\tvrLen = 1347;\n\t\tvrLoc = 59154;\n\t};\n\t94D7181B10B74A2500F69A71 /* sqSqueakOSXNSView.m:488 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 94C2068910AF4F53002F4160 /* sqSqueakOSXNSView.m */;\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 488;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 306811863.542772;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 2;\n\t};\n\t94D7181D10B74A2600F69A71 /* sqSqueakOSXNSView.m:484 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 94C2068910AF4F53002F4160 /* sqSqueakOSXNSView.m */;\n\t\tfunctionName = \"-firstRectForCharacterRange:\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 484;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 306811863.542882;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 2;\n\t};\n\t94D7182310B74A2900F69A71 /* sqSqueakOSXNSView.m:472 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 94C2068910AF4F53002F4160 /* sqSqueakOSXNSView.m */;\n\t\tfunctionName = \"-attributedSubstringFromRange:\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 472;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 306811863.542899;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 2;\n\t};\n\t94D7182910B74A4A00F69A71 /* sqSqueakOSXNSView.m:460 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 94C2068910AF4F53002F4160 /* sqSqueakOSXNSView.m */;\n\t\tfunctionName = \"-unmarkText\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 460;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 306811863.542913;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 2;\n\t};\n\t94D7182D10B74A4E00F69A71 /* sqSqueakOSXNSView.m:468 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 94C2068910AF4F53002F4160 /* sqSqueakOSXNSView.m */;\n\t\tfunctionName = \"-conversationIdentifier\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 468;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 306811863.542924;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 2;\n\t};\n\t94D7183310B74BD100F69A71 /* sqSqueakOSXNSView.m:500 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 94C2068910AF4F53002F4160 /* sqSqueakOSXNSView.m */;\n\t\tfunctionName = \"-drawsVerticallyForCharacterAtIndex:\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 500;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 306811863.542935;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 2;\n\t};\n\t94D7183810B74BF300F69A71 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D7183910B74BF300F69A71 /* NSInputManager.h */;\n\t\tname = \"NSInputManager.h: 21\";\n\t\trLen = 68;\n\t\trLoc = 621;\n\t\trType = 0;\n\t\tvrLen = 1979;\n\t\tvrLoc = 0;\n\t};\n\t94D7183910B74BF300F69A71 /* NSInputManager.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSInputManager.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSInputManager.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D7183A10B74BF300F69A71 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D7183B10B74BF300F69A71 /* NSTextInputClient.h */;\n\t\tname = \"NSTextInputClient.h: 32\";\n\t\trLen = 20;\n\t\trLoc = 1358;\n\t\trType = 0;\n\t\tvrLen = 2207;\n\t\tvrLoc = 0;\n\t};\n\t94D7183B10B74BF300F69A71 /* NSTextInputClient.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSTextInputClient.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSTextInputClient.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D73E5210B5B9CE00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D73E5310B5B9CE00F8C034 /* cl.h */;\n\t\tname = \"cl.h: 118\";\n\t\trLen = 0;\n\t\trLoc = 4914;\n\t\trType = 0;\n\t\tvrLen = 2396;\n\t\tvrLoc = 3357;\n\t};\n\t94D73E5310B5B9CE00F8C034 /* cl.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = cl.h;\n\t\tpath = /System/Library/Frameworks/OpenCL.framework/Versions/A/Headers/cl.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D73E5410B5B9CE00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D73E5510B5B9CE00F8C034 /* float-i32.h */;\n\t\tname = \"float-i32.h: 20\";\n\t\trLen = 35;\n\t\trLoc = 653;\n\t\trType = 0;\n\t\tvrLen = 2227;\n\t\tvrLoc = 0;\n\t};\n\t94D73E5510B5B9CE00F8C034 /* float-i32.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = \"float-i32.h\";\n\t\tpath = \"/Users/johnmci/Documents/Files from Lamie/Documents/Darwin/gcc3-1151/gcc/config/float-i32.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D73E5610B5B9CE00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D73E5710B5B9CE00F8C034 /* float-i128.h */;\n\t\tname = \"float-i128.h: 19\";\n\t\trLen = 11;\n\t\trLoc = 649;\n\t\trType = 0;\n\t\tvrLen = 2262;\n\t\tvrLoc = 0;\n\t};\n\t94D73E5710B5B9CE00F8C034 /* float-i128.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = \"float-i128.h\";\n\t\tpath = \"/Users/johnmci/Documents/Files from Lamie/Documents/Darwin/gcc3-1151/gcc/config/float-i128.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D73E5810B5B9CE00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D73E5910B5B9CE00F8C034 /* float-i386.h */;\n\t\tname = \"float-i386.h: 20\";\n\t\trLen = 11;\n\t\trLoc = 670;\n\t\trType = 0;\n\t\tvrLen = 2261;\n\t\tvrLoc = 0;\n\t};\n\t94D73E5910B5B9CE00F8C034 /* float-i386.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = \"float-i386.h\";\n\t\tpath = \"/Users/johnmci/Documents/Files from Lamie/Documents/Darwin/gcc3-1151/gcc/config/float-i386.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D73E5A10B5B9CE00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D73E5B10B5B9CE00F8C034 /* float-m68k.h */;\n\t\tname = \"float-m68k.h: 20\";\n\t\trLen = 11;\n\t\trLoc = 677;\n\t\trType = 0;\n\t\tvrLen = 2268;\n\t\tvrLoc = 0;\n\t};\n\t94D73E5B10B5B9CE00F8C034 /* float-m68k.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = \"float-m68k.h\";\n\t\tpath = \"/Users/johnmci/Documents/Files from Lamie/Documents/Darwin/gcc3-1151/gcc/config/float-m68k.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D73E5C10B5B9CE00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D73E5D10B5B9CE00F8C034 /* float-sh.h */;\n\t\tname = \"float-sh.h: 19\";\n\t\trLen = 11;\n\t\trLoc = 642;\n\t\trType = 0;\n\t\tvrLen = 2198;\n\t\tvrLoc = 0;\n\t};\n\t94D73E5D10B5B9CE00F8C034 /* float-sh.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = \"float-sh.h\";\n\t\tpath = \"/Users/johnmci/Documents/Files from Lamie/Documents/Darwin/gcc3-1151/gcc/config/float-sh.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D73E5E10B5B9CE00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D73E5F10B5B9CE00F8C034 /* float-sparc.h */;\n\t\tname = \"float-sparc.h: 20\";\n\t\trLen = 11;\n\t\trLoc = 729;\n\t\trType = 0;\n\t\tvrLen = 2320;\n\t\tvrLoc = 0;\n\t};\n\t94D73E5F10B5B9CE00F8C034 /* float-sparc.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = \"float-sparc.h\";\n\t\tpath = \"/Users/johnmci/Documents/Files from Lamie/Documents/Darwin/gcc3-1151/gcc/config/float-sparc.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D73E6010B5B9CE00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D73E6110B5B9CE00F8C034 /* float-vax.h */;\n\t\tname = \"float-vax.h: 6\";\n\t\trLen = 0;\n\t\trLoc = 173;\n\t\trType = 0;\n\t\tvrLen = 2188;\n\t\tvrLoc = 0;\n\t};\n\t94D73E6110B5B9CE00F8C034 /* float-vax.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = \"float-vax.h\";\n\t\tpath = \"/Users/johnmci/Documents/Files from Lamie/Documents/Darwin/gcc3-1151/gcc/config/float-vax.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D73E6210B5B9CE00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D73E6310B5B9CE00F8C034 /* float-i64.h */;\n\t\tname = \"float-i64.h: 20\";\n\t\trLen = 35;\n\t\trLoc = 660;\n\t\trType = 0;\n\t\tvrLen = 2261;\n\t\tvrLoc = 0;\n\t};\n\t94D73E6310B5B9CE00F8C034 /* float-i64.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = \"float-i64.h\";\n\t\tpath = \"/Users/johnmci/Documents/Files from Lamie/Documents/Darwin/gcc3-1151/gcc/config/float-i64.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D73E6410B5B9CE00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D73E6510B5B9CE00F8C034 /* dummyFFI.c */;\n\t\tname = \"dummyFFI.c: 116\";\n\t\trLen = 19;\n\t\trLoc = 2641;\n\t\trType = 0;\n\t\tvrLen = 813;\n\t\tvrLoc = 2018;\n\t};\n\t94D73E6510B5B9CE00F8C034 /* dummyFFI.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = dummyFFI.c;\n\t\tpath = /Users/johnmci/Shared/plugins/SqueakFFIPrims/dummyFFI.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D73E6810B5B9CE00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D73E6910B5B9CE00F8C034 /* c90-float-1.c */;\n\t\tname = \"c90-float-1.c: 47\";\n\t\trLen = 11;\n\t\trLoc = 855;\n\t\trType = 0;\n\t\tvrLen = 1089;\n\t\tvrLoc = 0;\n\t};\n\t94D73E6910B5B9CE00F8C034 /* c90-float-1.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = \"c90-float-1.c\";\n\t\tpath = \"/Users/johnmci/Documents/Files from Lamie/Documents/Darwin/gcc3-1151/gcc/testsuite/gcc.dg/c90-float-1.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D73E6A10B5B9CE00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D73E6B10B5B9CE00F8C034 /* enquire.c */;\n\t\tname = \"enquire.c: 1232\";\n\t\trLen = 48;\n\t\trLoc = 38198;\n\t\trType = 0;\n\t\tvrLen = 1282;\n\t\tvrLoc = 37320;\n\t};\n\t94D73E6B10B5B9CE00F8C034 /* enquire.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = enquire.c;\n\t\tpath = \"/Users/johnmci/Documents/Files from Lamie/Documents/Darwin/gcc3-1151/gcc/enquire.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D73EE610B5CF8400F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94F89C5A10B4BF2800556475 /* NSRunLoop.h */;\n\t\tname = \"NSRunLoop.h: 30\";\n\t\trLen = 8;\n\t\trLoc = 714;\n\t\trType = 0;\n\t\tvrLen = 1899;\n\t\tvrLoc = 0;\n\t};\n\t94D73F4910B5DA4E00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 942ABE0910AA21270086D908 /* NSView.h */;\n\t\tname = \"NSView.h: 219\";\n\t\trLen = 8;\n\t\trLoc = 7448;\n\t\trType = 0;\n\t\tvrLen = 2783;\n\t\tvrLoc = 6088;\n\t};\n\t94D73FA010B5E5A200F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D73FA110B5E5A200F8C034 /* CIColor.h */;\n\t\tname = \"CIColor.h: 50\";\n\t\trLen = 16;\n\t\trLoc = 1220;\n\t\trType = 0;\n\t\tvrLen = 1382;\n\t\tvrLoc = 0;\n\t};\n\t94D73FA110B5E5A200F8C034 /* CIColor.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = CIColor.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/QuartzCore.framework/Versions/A/Headers/CIColor.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D73FA410B5E5A200F8C034 /* CGColor.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = CGColor.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Headers/CGColor.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D73FAD10B5E69900F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D73FA410B5E5A200F8C034 /* CGColor.h */;\n\t\tname = \"CGColor.h: 44\";\n\t\trLen = 68;\n\t\trLoc = 1614;\n\t\trType = 0;\n\t\tvrLen = 2485;\n\t\tvrLoc = 0;\n\t};\n\t94D73FB510B5E6DA00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C206DA10AF5536002F4160 /* CGContext.h */;\n\t\tname = \"CGContext.h: 402\";\n\t\trLen = 62;\n\t\trLoc = 14416;\n\t\trType = 0;\n\t\tvrLen = 511;\n\t\tvrLoc = 14175;\n\t};\n\t94D7401510B5F8AF00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C2070610AF5A9E002F4160 /* NSImage.h */;\n\t\tname = \"NSImage.h: 187\";\n\t\trLen = 103;\n\t\trLoc = 8443;\n\t\trType = 0;\n\t\tvrLen = 6322;\n\t\tvrLoc = 6281;\n\t};\n\t94D7402810B5FA6100F8C034 /* CGDataProvider.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = CGDataProvider.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Headers/CGDataProvider.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D7403810B5FDDB00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C206D210AF5536002F4160 /* CGImage.h */;\n\t\tname = \"CGImage.h: 56\";\n\t\trLen = 17;\n\t\trLoc = 1989;\n\t\trType = 0;\n\t\tvrLen = 2464;\n\t\tvrLoc = 1345;\n\t};\n\t94D7403A10B5FDDB00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D7402810B5FA6100F8C034 /* CGDataProvider.h */;\n\t\tname = \"CGDataProvider.h: 114\";\n\t\trLen = 79;\n\t\trLoc = 4291;\n\t\trType = 0;\n\t\tvrLen = 2286;\n\t\tvrLoc = 4217;\n\t};\n\t94D7403C10B5FDDB00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E659020DDD03FE00358328 /* Klatt.c */;\n\t\tname = \"Klatt.c: 188\";\n\t\trLen = 20;\n\t\trLoc = 4929;\n\t\trType = 0;\n\t\tvrLen = 1387;\n\t\tvrLoc = 4016;\n\t};\n\t94D740B210B6242000F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D740B310B6242000F8C034 /* mman.h */;\n\t\tname = \"mman.h: 161\";\n\t\trLen = 64;\n\t\trLoc = 6016;\n\t\trType = 0;\n\t\tvrLen = 1386;\n\t\tvrLoc = 5938;\n\t};\n\t94D740B310B6242000F8C034 /* mman.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = mman.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/usr/include/sys/mman.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E297D10DECA72F009CF73A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E297D20DECA72F009CF73A /* config.h */;\n\t\tname = \"config.h: 154\";\n\t\trLen = 60;\n\t\trLoc = 3675;\n\t\trType = 0;\n\t\tvrLen = 993;\n\t\tvrLoc = 2863;\n\t};\n\t94E297D20DECA72F009CF73A /* config.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = config.h;\n\t\tpath = /Users/johnmci/Documents/SqueakGStreamer/platforms/unix/bld/config.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E297D30DECA72F009CF73A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E297D40DECA72F009CF73A /* version.c */;\n\t\tname = \"version.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 65;\n\t\tvrLoc = 0;\n\t};\n\t94E297D40DECA72F009CF73A /* version.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = version.c;\n\t\tpath = /Users/johnmci/Documents/SqueakHydra/platforms/win32/vm/version.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E297D50DECA72F009CF73A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E297D60DECA72F009CF73A /* version.h */;\n\t\tname = \"version.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 89;\n\t\tvrLoc = 0;\n\t};\n\t94E297D60DECA72F009CF73A /* version.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = version.h;\n\t\tpath = /Users/johnmci/Documents/SqueakHydra/platforms/win32/vm/version.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E297D70DECA72F009CF73A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 949E5B970DE3623B007388E0 /* sqUnixMain.c */;\n\t\tname = \"sqUnixMain.c: 417\";\n\t\trLen = 15;\n\t\trLoc = 10250;\n\t\trType = 0;\n\t\tvrLen = 1200;\n\t\tvrLoc = 9269;\n\t};\n\t94E2DAD40ED2351B00012E92 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E2DAD50ED2351B00012E92 /* sqMacUnixInterfaceSound.c */;\n\t\tname = \"sqMacUnixInterfaceSound.c: 46\";\n\t\trLen = 29;\n\t\trLoc = 774;\n\t\trType = 0;\n\t\tvrLen = 808;\n\t\tvrLoc = 382;\n\t};\n\t94E2DAD50ED2351B00012E92 /* sqMacUnixInterfaceSound.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqMacUnixInterfaceSound.c;\n\t\tpath = \"/Users/johnmci/Documents/SqueakSpellingPlugin/platforms/Mac OS/plugins/SoundPlugin/sqMacUnixInterfaceSound.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E2DADE0ED2351B00012E92 /* sqUnixSound.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqUnixSound.c;\n\t\tpath = /Users/johnmci/Documents/SqueakServicesPlugin/platforms/unix/plugins/SoundPlugin/sqUnixSound.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E2DB270ED2355F00012E92 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E2DADE0ED2351B00012E92 /* sqUnixSound.c */;\n\t\tname = \"sqUnixSound.c: 114\";\n\t\trLen = 0;\n\t\trLoc = 4098;\n\t\trType = 0;\n\t\tvrLen = 922;\n\t\tvrLoc = 3342;\n\t};\n\t94E4930310BD32D00011AC75 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9414420010BC817D0088F8AC /* NSPanel.h */;\n\t\tname = \"NSPanel.h: 43\";\n\t\trLen = 165;\n\t\trLoc = 3279;\n\t\trType = 0;\n\t\tvrLen = 3883;\n\t\tvrLoc = 0;\n\t};\n\t94E4936F10BD39E20011AC75 /* sqUnixQuartz.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = sqUnixQuartz.m;\n\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0.0CLosureWithEncryption/platforms/unix/vm-display-Quartz/sqUnixQuartz.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E5838A10BF3E080073FD63 /* NSTextInputClient.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSTextInputClient.h;\n\t\tpath = /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSTextInputClient.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E5838E10BF3E080073FD63 /* AudioQueue.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = AudioQueue.h;\n\t\tpath = /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/AudioToolbox.framework/Versions/A/Headers/AudioQueue.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E583DB10BF43970073FD63 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E5838A10BF3E080073FD63 /* NSTextInputClient.h */;\n\t\tname = \"NSTextInputClient.h: 20\";\n\t\trLen = 75;\n\t\trLoc = 497;\n\t\trType = 0;\n\t\tvrLen = 2725;\n\t\tvrLoc = 0;\n\t};\n\t94E5846510BF67600073FD63 /* NSResponder.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSResponder.h;\n\t\tpath = /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSResponder.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E584AE10BF6EE30073FD63 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E5846510BF67600073FD63 /* NSResponder.h */;\n\t\tname = \"NSResponder.h: 99\";\n\t\trLen = 46;\n\t\trLoc = 3759;\n\t\trType = 0;\n\t\tvrLen = 2139;\n\t\tvrLoc = 2704;\n\t};\n\t94E584FF10BF79AB0073FD63 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D7178310B73A3800F69A71 /* SqViewInputSensor.m */;\n\t\tname = \"SqViewInputSensor.m: 34\";\n\t\trLen = 22;\n\t\trLoc = 478;\n\t\trType = 0;\n\t\tvrLen = 1359;\n\t\tvrLoc = 0;\n\t};\n\t94E5850010BF79AB0073FD63 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9406E87710B66A74002F81F2 /* SqViewEventSensor.m */;\n\t\tname = \"SqViewEventSensor.m: 29\";\n\t\trLen = 7;\n\t\trLoc = 449;\n\t\trType = 0;\n\t\tvrLen = 1509;\n\t\tvrLoc = 0;\n\t};\n\t94E658DE0DDD03FE00358328 /* plugins.int */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {3239, 363}}\";\n\t\t\tsepNavSelRange = \"{0, 526}\";\n\t\t\tsepNavVisRange = \"{0, 526}\";\n\t\t};\n\t};\n\t94E658E00DDD03FE00358328 /* interp.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {3694, 358800}}\";\n\t\t\tsepNavSelRange = \"{803236, 0}\";\n\t\t\tsepNavVisRange = \"{801178, 1807}\";\n\t\t\tsepNavWindowFrame = \"{{38, 34}, {1438, 968}}\";\n\t\t};\n\t};\n\t94E658E10DDD03FE00358328 /* interp.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {661, 637}}\";\n\t\t\tsepNavSelRange = \"{422, 14}\";\n\t\t\tsepNavVisRange = \"{258, 1264}\";\n\t\t\tsepNavWindowFrame = \"{{38, 14}, {799, 988}}\";\n\t\t};\n\t};\n\t94E658E40DDD03FE00358328 /* ADPCMCodecPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1533, 10348}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 410}\";\n\t\t};\n\t};\n\t94E658E60DDD03FE00358328 /* B2DPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 131001}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1388}\";\n\t\t};\n\t};\n\t94E658EA0DDD03FE00358328 /* BitBltPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1944, 73697}}\";\n\t\t\tsepNavSelRange = \"{126261, 0}\";\n\t\t\tsepNavVisRange = \"{125512, 1456}\";\n\t\t};\n\t};\n\t94E658EC0DDD03FE00358328 /* BMPReadWriterPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1357, 2860}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 261}\";\n\t\t};\n\t};\n\t94E658F00DDD03FE00358328 /* DSAPrims.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1357, 8112}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 261}\";\n\t\t};\n\t};\n\t94E658F20DDD03FE00358328 /* FFTPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 4823}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 366}\";\n\t\t};\n\t};\n\t94E658F40DDD03FE00358328 /* FilePlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 11648}}\";\n\t\t\tsepNavSelRange = \"{13767, 50}\";\n\t\t\tsepNavVisRange = \"{12643, 1804}\";\n\t\t\tsepNavWindowFrame = \"{{21, 20}, {694, 1008}}\";\n\t\t};\n\t};\n\t94E658F60DDD03FE00358328 /* FloatArrayPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 7592}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 192}\";\n\t\t};\n\t};\n\t94E658F80DDD03FE00358328 /* GeniePlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1594, 5135}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1889}\";\n\t\t};\n\t};\n\t94E658FA0DDD03FE00358328 /* HostWindowPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1860, 5122}}\";\n\t\t\tsepNavSelRange = \"{3964, 41}\";\n\t\t\tsepNavVisRange = \"{3221, 1609}\";\n\t\t};\n\t};\n\t94E658FE0DDD03FE00358328 /* JPEGReaderPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1357, 17043}}\";\n\t\t\tsepNavSelRange = \"{9474, 0}\";\n\t\t\tsepNavVisRange = \"{9324, 406}\";\n\t\t};\n\t};\n\t94E659000DDD03FE00358328 /* JPEGReadWriter2Plugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1195, 9087}}\";\n\t\t\tsepNavSelRange = \"{20722, 17}\";\n\t\t\tsepNavVisRange = \"{19321, 2103}\";\n\t\t};\n\t};\n\t94E659020DDD03FE00358328 /* Klatt.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1357, 19500}}\";\n\t\t\tsepNavSelRange = \"{44049, 0}\";\n\t\t\tsepNavVisRange = \"{43900, 200}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {1426, 1019}}\";\n\t\t};\n\t};\n\t94E659040DDD03FE00358328 /* LargeIntegers.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1342, 30290}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 869}\";\n\t\t};\n\t};\n\t94E659060DDD03FE00358328 /* Matrix2x3Plugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1357, 8814}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 261}\";\n\t\t};\n\t};\n\t94E659080DDD03FE00358328 /* MIDIPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1867, 4784}}\";\n\t\t\tsepNavSelRange = \"{3309, 0}\";\n\t\t\tsepNavVisRange = \"{3006, 515}\";\n\t\t\tsepNavWindowFrame = \"{{15, 8}, {1012, 1015}}\";\n\t\t};\n\t};\n\t94E6590A0DDD03FE00358328 /* MiscPrimitivePlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 10634}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 844}\";\n\t\t};\n\t};\n\t94E6590C0DDD03FE00358328 /* RePlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {3113, 6032}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 871}\";\n\t\t};\n\t};\n\t94E6590E0DDD03FE00358328 /* SecurityPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 4043}}\";\n\t\t\tsepNavSelRange = \"{536, 18}\";\n\t\t\tsepNavVisRange = \"{0, 1028}\";\n\t\t\tsepNavWindowFrame = \"{{15, 45}, {1017, 978}}\";\n\t\t};\n\t};\n\t94E659100DDD03FE00358328 /* SocketPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1377, 23192}}\";\n\t\t\tsepNavSelRange = \"{36324, 91}\";\n\t\t\tsepNavVisRange = \"{34415, 2532}\";\n\t\t\tsepNavWindowFrame = \"{{15, 8}, {1012, 1015}}\";\n\t\t};\n\t};\n\t94E659120DDD03FE00358328 /* SoundCodecPrims.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1357, 2886}}\";\n\t\t\tsepNavSelRange = \"{2059, 0}\";\n\t\t\tsepNavVisRange = \"{1965, 173}\";\n\t\t};\n\t};\n\t94E659140DDD03FE00358328 /* SoundGenerationPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1357, 9087}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 261}\";\n\t\t};\n\t};\n\t94E659160DDD03FE00358328 /* SoundPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 6175}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 895}\";\n\t\t\tsepNavWindowFrame = \"{{38, 28}, {1346, 974}}\";\n\t\t};\n\t};\n\t94E659180DDD03FE00358328 /* Squeak3D.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 39598}}\";\n\t\t\tsepNavSelRange = \"{65323, 16}\";\n\t\t\tsepNavVisRange = \"{64437, 1713}\";\n\t\t};\n\t};\n\t94E6591A0DDD03FE00358328 /* StarSqueakPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1412, 4316}}\";\n\t\t\tsepNavSelRange = \"{4752, 0}\";\n\t\t\tsepNavVisRange = \"{4329, 952}\";\n\t\t};\n\t};\n\t94E6591D0DDD03FE00358328 /* UUIDPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 2067}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 867}\";\n\t\t\tsepNavWindowFrame = \"{{38, 17}, {847, 985}}\";\n\t\t};\n\t};\n\t94E6591F0DDD03FE00358328 /* ZipPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1104, 17446}}\";\n\t\t\tsepNavSelRange = \"{1700, 11}\";\n\t\t\tsepNavVisRange = \"{710, 2153}\";\n\t\t\tsepNavWindowFrame = \"{{15, 22}, {1064, 1001}}\";\n\t\t};\n\t};\n\t94E659200DDD03FE00358328 /* sqNamedPrims.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {870, 1079}}\";\n\t\t\tsepNavSelRange = \"{2091, 0}\";\n\t\t\tsepNavVisRange = \"{558, 1778}\";\n\t\t\tsepNavWindowFrame = \"{{15, 9}, {1078, 1014}}\";\n\t\t};\n\t};\n\t94E659430DDD04FA00358328 /* AsynchFilePlugin.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 501}}\";\n\t\t\tsepNavSelRange = \"{404, 19}\";\n\t\t\tsepNavVisRange = \"{0, 659}\";\n\t\t};\n\t};\n\t94E659450DDD04FA00358328 /* FilePlugin.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 767}}\";\n\t\t\tsepNavSelRange = \"{1735, 10}\";\n\t\t\tsepNavVisRange = \"{440, 1866}\";\n\t\t\tsepNavWindowFrame = \"{{15, 25}, {997, 998}}\";\n\t\t};\n\t};\n\t94E659460DDD04FA00358328 /* sqFilePluginBasicPrims.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 4706}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1082}\";\n\t\t\tsepNavWindowFrame = \"{{38, 19}, {905, 983}}\";\n\t\t};\n\t};\n\t94E659490DDD053900358328 /* SurfacePlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {784, 2990}}\";\n\t\t\tsepNavSelRange = \"{2333, 0}\";\n\t\t\tsepNavVisRange = \"{1279, 2223}\";\n\t\t};\n\t};\n\t94E6594A0DDD053900358328 /* SurfacePlugin.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {784, 1716}}\";\n\t\t\tsepNavSelRange = \"{27, 0}\";\n\t\t\tsepNavVisRange = \"{0, 2637}\";\n\t\t};\n\t};\n\t94E6594D0DDD053900358328 /* SecurityPlugin.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1357, 481}}\";\n\t\t\tsepNavSelRange = \"{290, 3}\";\n\t\t\tsepNavVisRange = \"{117, 443}\";\n\t\t\tsepNavWindowFrame = \"{{15, 13}, {1326, 1010}}\";\n\t\t};\n\t};\n\t94E6594F0DDD053900358328 /* SoundGenerationPlugin.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 527}}\";\n\t\t\tsepNavSelRange = \"{299, 3}\";\n\t\t\tsepNavVisRange = \"{0, 360}\";\n\t\t};\n\t};\n\t94E659530DDD053900358328 /* jcapimin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 3822}}\";\n\t\t\tsepNavSelRange = \"{7008, 3}\";\n\t\t\tsepNavVisRange = \"{5989, 1240}\";\n\t\t};\n\t};\n\t94E659550DDD053900358328 /* jccoefct.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 5863}}\";\n\t\t\tsepNavSelRange = \"{9819, 3}\";\n\t\t\tsepNavVisRange = \"{8276, 1834}\";\n\t\t};\n\t};\n\t94E659560DDD053900358328 /* jccolor.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 5889}}\";\n\t\t\tsepNavSelRange = \"{9842, 3}\";\n\t\t\tsepNavVisRange = \"{9173, 1109}\";\n\t\t};\n\t};\n\t94E659570DDD053900358328 /* jcdctmgr.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 4966}}\";\n\t\t\tsepNavSelRange = \"{6549, 3}\";\n\t\t\tsepNavVisRange = \"{5884, 1542}\";\n\t\t};\n\t};\n\t94E659580DDD053900358328 /* jchuff.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 11778}}\";\n\t\t\tsepNavSelRange = \"{22307, 3}\";\n\t\t\tsepNavVisRange = \"{21622, 1607}\";\n\t\t};\n\t};\n\t94E6595B0DDD053900358328 /* jcmainct.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 3783}}\";\n\t\t\tsepNavSelRange = \"{7591, 3}\";\n\t\t\tsepNavVisRange = \"{6975, 964}\";\n\t\t};\n\t};\n\t94E6595C0DDD053900358328 /* jcmarker.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 8866}}\";\n\t\t\tsepNavSelRange = \"{10933, 3}\";\n\t\t\tsepNavVisRange = \"{10271, 1095}\";\n\t\t};\n\t};\n\t94E6595D0DDD053900358328 /* jcmaster.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 7553}}\";\n\t\t\tsepNavSelRange = \"{10789, 3}\";\n\t\t\tsepNavVisRange = \"{10099, 1218}\";\n\t\t};\n\t};\n\t94E6595E0DDD053900358328 /* jcomapi.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1196, 1512}}\";\n\t\t\tsepNavSelRange = \"{2136, 7}\";\n\t\t\tsepNavVisRange = \"{1428, 1392}\";\n\t\t};\n\t};\n\t94E659600DDD053900358328 /* jcparam.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 8164}}\";\n\t\t\tsepNavSelRange = \"{18163, 3}\";\n\t\t\tsepNavVisRange = \"{17732, 1161}\";\n\t\t};\n\t};\n\t94E659610DDD053900358328 /* jcphuff.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 10920}}\";\n\t\t\tsepNavSelRange = \"{18752, 3}\";\n\t\t\tsepNavVisRange = \"{17946, 1058}\";\n\t\t};\n\t};\n\t94E659620DDD053900358328 /* jcprepct.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 4628}}\";\n\t\t\tsepNavSelRange = \"{9095, 3}\";\n\t\t\tsepNavVisRange = \"{8327, 1337}\";\n\t\t};\n\t};\n\t94E659630DDD053900358328 /* jcsample.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 6994}}\";\n\t\t\tsepNavSelRange = \"{7407, 3}\";\n\t\t\tsepNavVisRange = \"{6537, 1530}\";\n\t\t};\n\t};\n\t94E659640DDD053900358328 /* jctrans.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 5187}}\";\n\t\t\tsepNavSelRange = \"{13272, 3}\";\n\t\t\tsepNavVisRange = \"{12530, 1091}\";\n\t\t};\n\t};\n\t94E659650DDD053900358328 /* jdapimin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 5135}}\";\n\t\t\tsepNavSelRange = \"{7807, 3}\";\n\t\t\tsepNavVisRange = \"{7168, 1550}\";\n\t\t};\n\t};\n\t94E659690DDD053900358328 /* jdcoefct.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 9451}}\";\n\t\t\tsepNavSelRange = \"{21428, 3}\";\n\t\t\tsepNavVisRange = \"{20759, 1160}\";\n\t\t};\n\t};\n\t94E6596A0DDD053900358328 /* jdcolor.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 5057}}\";\n\t\t\tsepNavSelRange = \"{8235, 3}\";\n\t\t\tsepNavVisRange = \"{7573, 1344}\";\n\t\t};\n\t};\n\t94E6596B0DDD053900358328 /* jdct.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 2275}}\";\n\t\t\tsepNavSelRange = \"{693, 3}\";\n\t\t\tsepNavVisRange = \"{0, 1654}\";\n\t\t};\n\t};\n\t94E6596D0DDD053900358328 /* jdhuff.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 8229}}\";\n\t\t\tsepNavSelRange = \"{15652, 3}\";\n\t\t\tsepNavVisRange = \"{14578, 1143}\";\n\t\t};\n\t};\n\t94E6596E0DDD053900358328 /* jdhuff.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 2574}}\";\n\t\t\tsepNavSelRange = \"{4464, 3}\";\n\t\t\tsepNavVisRange = \"{2783, 1780}\";\n\t\t};\n\t};\n\t94E6596F0DDD053900358328 /* jdinput.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 4810}}\";\n\t\t\tsepNavSelRange = \"{6703, 3}\";\n\t\t\tsepNavVisRange = \"{5969, 1701}\";\n\t\t};\n\t};\n\t94E659700DDD053900358328 /* jdmainct.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 6149}}\";\n\t\t\tsepNavSelRange = \"{7953, 3}\";\n\t\t\tsepNavVisRange = \"{7137, 1484}\";\n\t\t};\n\t};\n\t94E659710DDD053900358328 /* jdmarker.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 17706}}\";\n\t\t\tsepNavSelRange = \"{40391, 3}\";\n\t\t\tsepNavVisRange = \"{38997, 1561}\";\n\t\t};\n\t};\n\t94E659720DDD053900358328 /* jdmaster.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 7085}}\";\n\t\t\tsepNavSelRange = \"{14890, 3}\";\n\t\t\tsepNavVisRange = \"{14181, 1516}\";\n\t\t};\n\t};\n\t94E659730DDD053900358328 /* jdmerge.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 5187}}\";\n\t\t\tsepNavSelRange = \"{10331, 3}\";\n\t\t\tsepNavVisRange = \"{9363, 1315}\";\n\t\t};\n\t};\n\t94E659740DDD053900358328 /* jdphuff.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 8606}}\";\n\t\t\tsepNavSelRange = \"{15744, 3}\";\n\t\t\tsepNavVisRange = \"{14845, 1126}\";\n\t\t};\n\t};\n\t94E659760DDD053900358328 /* jdsample.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 6409}}\";\n\t\t\tsepNavSelRange = \"{11463, 3}\";\n\t\t\tsepNavVisRange = \"{10845, 1368}\";\n\t\t};\n\t};\n\t94E659770DDD053900358328 /* jdtrans.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1196, 2002}}\";\n\t\t\tsepNavSelRange = \"{995, 7}\";\n\t\t\tsepNavVisRange = \"{0, 1708}\";\n\t\t};\n\t};\n\t94E659790DDD053900358328 /* jerror.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 4121}}\";\n\t\t\tsepNavSelRange = \"{12583, 3}\";\n\t\t\tsepNavVisRange = \"{11937, 1999}\";\n\t\t};\n\t};\n\t94E6597C0DDD053900358328 /* jfdctint.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 3809}}\";\n\t\t\tsepNavSelRange = \"{5901, 3}\";\n\t\t\tsepNavVisRange = \"{5152, 1247}\";\n\t\t};\n\t};\n\t94E6597D0DDD053900358328 /* jidctflt.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 3094}}\";\n\t\t\tsepNavSelRange = \"{7928, 3}\";\n\t\t\tsepNavVisRange = \"{6879, 1380}\";\n\t\t};\n\t};\n\t94E6597E0DDD053900358328 /* jidctfst.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 4706}}\";\n\t\t\tsepNavSelRange = \"{9786, 3}\";\n\t\t\tsepNavVisRange = \"{8848, 1431}\";\n\t\t};\n\t};\n\t94E6597F0DDD053900358328 /* jidctint.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 5044}}\";\n\t\t\tsepNavSelRange = \"{11723, 3}\";\n\t\t\tsepNavVisRange = \"{10788, 1464}\";\n\t\t};\n\t};\n\t94E659800DDD053900358328 /* jidctred.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 5096}}\";\n\t\t\tsepNavSelRange = \"{11209, 3}\";\n\t\t\tsepNavVisRange = \"{10458, 1488}\";\n\t\t};\n\t};\n\t94E659810DDD053900358328 /* jinclude.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1196, 1372}}\";\n\t\t\tsepNavSelRange = \"{1563, 7}\";\n\t\t\tsepNavVisRange = \"{935, 1412}\";\n\t\t};\n\t};\n\t94E659820DDD053900358328 /* jmemdatadst.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 1924}}\";\n\t\t\tsepNavSelRange = \"{4506, 0}\";\n\t\t\tsepNavVisRange = \"{4026, 877}\";\n\t\t};\n\t};\n\t94E659830DDD053900358328 /* jmemdatasrc.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 2600}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 661}\";\n\t\t\tsepNavWindowFrame = \"{{15, 13}, {1326, 1010}}\";\n\t\t};\n\t};\n\t94E659840DDD053900358328 /* jmemmgr.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 14313}}\";\n\t\t\tsepNavSelRange = \"{20872, 3}\";\n\t\t\tsepNavVisRange = \"{20200, 1407}\";\n\t\t};\n\t};\n\t94E659860DDD053900358328 /* jmemsys.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1196, 2730}}\";\n\t\t\tsepNavSelRange = \"{1380, 7}\";\n\t\t\tsepNavVisRange = \"{578, 1969}\";\n\t\t};\n\t};\n\t94E659870DDD053900358328 /* jmorecfg.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 5096}}\";\n\t\t\tsepNavSelRange = \"{4500, 3}\";\n\t\t\tsepNavVisRange = \"{3819, 1298}\";\n\t\t};\n\t};\n\t94E659880DDD053900358328 /* jpegint.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 5135}}\";\n\t\t\tsepNavSelRange = \"{8138, 3}\";\n\t\t\tsepNavVisRange = \"{6999, 1671}\";\n\t\t};\n\t};\n\t94E659890DDD053900358328 /* jpeglib.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 14287}}\";\n\t\t\tsepNavSelRange = \"{44121, 3}\";\n\t\t\tsepNavVisRange = \"{43159, 1631}\";\n\t\t};\n\t};\n\t94E6598A0DDD053900358328 /* JPEGReadWriter2Plugin.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 527}}\";\n\t\t\tsepNavSelRange = \"{400, 3}\";\n\t\t\tsepNavVisRange = \"{0, 606}\";\n\t\t};\n\t};\n\t94E6598B0DDD053900358328 /* jquant1.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 10946}}\";\n\t\t\tsepNavSelRange = \"{23424, 3}\";\n\t\t\tsepNavVisRange = \"{22008, 1505}\";\n\t\t};\n\t};\n\t94E6598C0DDD053900358328 /* jquant2.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 17212}}\";\n\t\t\tsepNavSelRange = \"{35564, 3}\";\n\t\t\tsepNavVisRange = \"{34161, 1581}\";\n\t\t};\n\t};\n\t94E6598D0DDD053900358328 /* jutils.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 2379}}\";\n\t\t\tsepNavSelRange = \"{709, 3}\";\n\t\t\tsepNavVisRange = \"{0, 1126}\";\n\t\t};\n\t};\n\t94E659910DDD053900358328 /* UUIDPlugin.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1357, 141}}\";\n\t\t\tsepNavSelRange = \"{224, 0}\";\n\t\t\tsepNavVisRange = \"{0, 247}\";\n\t\t};\n\t};\n\t94E659930DDD053900358328 /* SoundPlugin.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {831, 891}}\";\n\t\t\tsepNavSelRange = \"{752, 96}\";\n\t\t\tsepNavVisRange = \"{0, 1267}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {878, 1019}}\";\n\t\t};\n\t};\n\t94E659970DDD053900358328 /* b3d.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 1547}}\";\n\t\t\tsepNavSelRange = \"{1163, 18}\";\n\t\t\tsepNavVisRange = \"{725, 933}\";\n\t\t};\n\t};\n\t94E659990DDD053900358328 /* b3dAlloc.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1196, 2044}}\";\n\t\t\tsepNavSelRange = \"{2615, 7}\";\n\t\t\tsepNavVisRange = \"{1909, 1488}\";\n\t\t};\n\t};\n\t94E6599A0DDD053900358328 /* b3dDraw.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 6643}}\";\n\t\t\tsepNavSelRange = \"{13439, 0}\";\n\t\t\tsepNavVisRange = \"{12902, 1039}\";\n\t\t};\n\t};\n\t94E6599B0DDD053900358328 /* b3dInit.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1104, 9113}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1197}\";\n\t\t};\n\t};\n\t94E6599C0DDD053900358328 /* b3dMain.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 19292}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 866}\";\n\t\t};\n\t};\n\t94E6599D0DDD053900358328 /* b3dRemap.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 3718}}\";\n\t\t\tsepNavSelRange = \"{7538, 0}\";\n\t\t\tsepNavVisRange = \"{6829, 1035}\";\n\t\t};\n\t};\n\t94E6599E0DDD053900358328 /* b3dTypes.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 4420}}\";\n\t\t\tsepNavSelRange = \"{4491, 13}\";\n\t\t\tsepNavVisRange = \"{3977, 898}\";\n\t\t};\n\t};\n\t94E659A00DDD053900358328 /* SocketPlugin.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1601, 1118}}\";\n\t\t\tsepNavSelRange = \"{3647, 30}\";\n\t\t\tsepNavVisRange = \"{757, 4070}\";\n\t\t};\n\t};\n\t94E659A30DDD053900358328 /* SoundCodecPrims.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 527}}\";\n\t\t\tsepNavSelRange = \"{3, 10}\";\n\t\t\tsepNavVisRange = \"{0, 401}\";\n\t\t};\n\t};\n\t94E659A40DDD053900358328 /* sqSoundCodecPluginBasicPrims.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 50479}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 631}\";\n\t\t};\n\t};\n\t94E65A290DDD053900358328 /* chartables.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 2457}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1175}\";\n\t\t};\n\t};\n\t94E65A2B0DDD053900358328 /* get.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 2860}}\";\n\t\t\tsepNavSelRange = \"{4454, 0}\";\n\t\t\tsepNavVisRange = \"{4071, 824}\";\n\t\t};\n\t};\n\t94E65A2C0DDD053900358328 /* internal.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 5629}}\";\n\t\t\tsepNavSelRange = \"{1665, 0}\";\n\t\t\tsepNavVisRange = \"{1415, 1340}\";\n\t\t};\n\t};\n\t94E65A2E0DDD053900358328 /* pcre.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 66248}}\";\n\t\t\tsepNavSelRange = \"{91389, 0}\";\n\t\t\tsepNavVisRange = \"{91065, 550}\";\n\t\t\tsepNavWindowFrame = \"{{683, 16}, {997, 998}}\";\n\t\t};\n\t};\n\t94E65A2F0DDD053900358328 /* pcre.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 1495}}\";\n\t\t\tsepNavSelRange = \"{2990, 3}\";\n\t\t\tsepNavVisRange = \"{1856, 1482}\";\n\t\t};\n\t};\n\t94E65A300DDD053900358328 /* rePlugin.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1010, 637}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1259}\";\n\t\t};\n\t};\n\t94E65A340DDD053900358328 /* study.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 5096}}\";\n\t\t\tsepNavSelRange = \"{3001, 3}\";\n\t\t\tsepNavVisRange = \"{2296, 1397}\";\n\t\t};\n\t};\n\t94E745ED11E5346100E90B3A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAE6710ACA10100F87527 /* sqSqueakOSXInfoPlistInterface.h */;\n\t\tname = \"sqSqueakOSXInfoPlistInterface.h: 39\";\n\t\trLen = 0;\n\t\trLoc = 1840;\n\t\trType = 0;\n\t\tvrLen = 2792;\n\t\tvrLoc = 854;\n\t};\n\t94E745EF11E5346100E90B3A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9452D5E00E044A9D000AD792 /* sqSqueakMainApp.h */;\n\t\tname = \"sqSqueakMainApp.h: 33\";\n\t\trLen = 449;\n\t\trLoc = 1322;\n\t\trType = 0;\n\t\tvrLen = 1868;\n\t\tvrLoc = 0;\n\t};\n\t94E746D011E539AF00E90B3A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E658F40DDD03FE00358328 /* FilePlugin.c */;\n\t\tname = \"FilePlugin.c: 362\";\n\t\trLen = 4;\n\t\trLoc = 12226;\n\t\trType = 0;\n\t\tvrLen = 1651;\n\t\tvrLoc = 11431;\n\t};\n\t94E7F9A912375A9600A03A11 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 943B9C9E1235C5120056205E /* sqMacHostWindow.m */;\n\t\tname = \"sqMacHostWindow.m: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 2559;\n\t\tvrLoc = 0;\n\t};\n\t94E7F9AA12375A9600A03A11 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947E5F9310A9FF4A00D3B69E /* SqueakPureObjc_Prefix.pch */;\n\t\tname = \"SqueakPureObjc_Prefix.pch: 6\";\n\t\trLen = 0;\n\t\trLoc = 114;\n\t\trType = 0;\n\t\tvrLen = 149;\n\t\tvrLoc = 0;\n\t};\n\t94E7F9AB12375A9600A03A11 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9478E05E0EC8DCFB007096A7 /* sqSqueakSoundCoreAudio.h */;\n\t\tname = \"sqSqueakSoundCoreAudio.h: 51\";\n\t\trLen = 24;\n\t\trLoc = 2099;\n\t\trType = 0;\n\t\tvrLen = 2592;\n\t\tvrLoc = 1871;\n\t};\n\t94E8EEEA11C94D5D0049D853 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E8EEEB11C94D5D0049D853 /* sqUnixQuartz.m */;\n\t\tname = \"sqUnixQuartz.m: 2113\";\n\t\trLen = 12;\n\t\trLoc = 55330;\n\t\trType = 0;\n\t\tvrLen = 1130;\n\t\tvrLoc = 54733;\n\t};\n\t94E8EEEB11C94D5D0049D853 /* sqUnixQuartz.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = sqUnixQuartz.m;\n\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/History/4.2.4b1/platforms/unix/vm-display-Quartz/sqUnixQuartz.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E99F3412378CD30048557C /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 942B77300EA7E642004B266D /* interp.c */;\n\t\tname = \"interp.c: 2284\";\n\t\trLen = 14;\n\t\trLoc = 81797;\n\t\trType = 0;\n\t\tvrLen = 2291;\n\t\tvrLoc = 79683;\n\t};\n\t94E99F3612378CD30048557C /* interp.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = interp.c;\n\t\tpath = /Users/johnmci/Documents/Squeak3.8.0.0WithEncryption/src/vm/interp.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E99F4012378D660048557C /* interp.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = interp.c;\n\t\tpath = /Users/johnmci/Documents/SqueakHydra/SqueakVMMAker/src32/vm/interp.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E99F8012378DAB0048557C /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E99F4012378D660048557C /* interp.c */;\n\t\tname = \"interp.c: 16\";\n\t\trLen = 0;\n\t\trLoc = 337;\n\t\trType = 0;\n\t\tvrLen = 2614;\n\t\tvrLoc = 100117;\n\t};\n\t94E9A007123790840048557C /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94A0E9820DE5F1FE0071C8B9 /* sqSqueakMainApplication+screen.h */;\n\t\tname = \"sqSqueakMainApplication+screen.h: 28\";\n\t\trLen = 0;\n\t\trLoc = 1280;\n\t\trType = 0;\n\t\tvrLen = 1983;\n\t\tvrLoc = 0;\n\t};\n\t94E9A00B123790840048557C /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E99F3612378CD30048557C /* interp.c */;\n\t\tname = \"interp.c: 4166\";\n\t\trLen = 13;\n\t\trLoc = 139308;\n\t\trType = 0;\n\t\tvrLen = 1967;\n\t\tvrLoc = 72464;\n\t};\n\t94E9A1071238161A0048557C /* interp.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = interp.c;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/Squeak3.8g-6665#2/platforms/unix/src/vm/interp.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E9A19812381F180048557C /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E9A1071238161A0048557C /* interp.c */;\n\t\tname = \"interp.c: 2267\";\n\t\trLen = 0;\n\t\trLoc = 81024;\n\t\trType = 0;\n\t\tvrLen = 2535;\n\t\tvrLoc = 79835;\n\t};\n\t94E9A1AF12382FFD0048557C /* sqUnixMain.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqUnixMain.c;\n\t\tpath = /Users/johnmci/Documents/Squeak3.8.0/platforms/unix/vm/sqUnixMain.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E9A1CB123833B00048557C /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E9A1AF12382FFD0048557C /* sqUnixMain.c */;\n\t\tname = \"sqUnixMain.c: 225\";\n\t\trLen = 19;\n\t\trLoc = 6421;\n\t\trType = 0;\n\t\tvrLen = 1608;\n\t\tvrLoc = 5582;\n\t};\n\t94ED7EFA0E6C2ABE00F4DD03 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94ED7EFB0E6C2ABE00F4DD03 /* Document.m */;\n\t\tname = \"Document.m: 75\";\n\t\trLen = 20;\n\t\trLoc = 2275;\n\t\trType = 0;\n\t\tvrLen = 1332;\n\t\tvrLoc = 1613;\n\t};\n\t94ED7EFB0E6C2ABE00F4DD03 /* Document.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = Document.m;\n\t\tpath = \"/Users/johnmci/Work In Progress/smalltalk/CocoaSqueakSource/CocoaSqueak/Document.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94EF6D6D11E55E31003BA64D /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94EF6D6E11E55E31003BA64D /* sqUnixSocket.c */;\n\t\tname = \"sqUnixSocket.c: 73\";\n\t\trLen = 1;\n\t\trLoc = 2408;\n\t\trType = 0;\n\t\tvrLen = 976;\n\t\tvrLoc = 1899;\n\t};\n\t94EF6D6E11E55E31003BA64D /* sqUnixSocket.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqUnixSocket.c;\n\t\tpath = \"/Volumes/pm/Mail Downloads/sqUnixSocket.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94F155570E83EA1F001657CE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94B88C640E81500200C98131 /* SqueakObjcBridge.m */;\n\t\tname = \"SqueakObjcBridge.m: 291\";\n\t\trLen = 0;\n\t\trLoc = 8126;\n\t\trType = 0;\n\t\tvrLen = 2591;\n\t\tvrLoc = 6567;\n\t};\n\t94F155580E83EA1F001657CE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94F155590E83EA1F001657CE /* FSNSProxy.m */;\n\t\tname = \"FSNSProxy.m: 24\";\n\t\trLen = 26;\n\t\trLoc = 737;\n\t\trType = 0;\n\t\tvrLen = 1622;\n\t\tvrLoc = 0;\n\t};\n\t94F155590E83EA1F001657CE /* FSNSProxy.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = FSNSProxy.m;\n\t\tpath = \"/Users/johnmci/Work In Progress/smalltalk/FScriptSources-20031020/FScript/FScriptFramework/FSNSProxy.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94F1F6B111EB8E14004B3AE3 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9424FF5B0DDCB1C7009912BF /* sqGnu.h */;\n\t\tname = \"sqGnu.h: 187\";\n\t\trLen = 7;\n\t\trLoc = 11528;\n\t\trType = 0;\n\t\tvrLen = 1875;\n\t\tvrLoc = 0;\n\t};\n\t94F3A9690E6BFA7C00E0B12A /* Squeak.png */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavWindowFrame = \"{{61, 124}, {1288, 857}}\";\n\t\t};\n\t};\n\t94F5C1870DF26EF200099B11 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94F5C1880DF26EF200099B11 /* interp.c */;\n\t\tname = \"interp.c: 5170\";\n\t\trLen = 7;\n\t\trLoc = 155552;\n\t\trType = 0;\n\t\tvrLen = 1874;\n\t\tvrLoc = 154817;\n\t};\n\t94F5C1880DF26EF200099B11 /* interp.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = interp.c;\n\t\tpath = /Users/johnmci/Documents/SqueakSquatSpoon/src/vm/interp.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94F5C1910DF26EF200099B11 /* gnu-interp.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = \"gnu-interp.c\";\n\t\tpath = \"/Volumes/pm/Mail Downloads/gnu-interp.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94F5C1930DF26EF200099B11 /* gnu-interp.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = \"gnu-interp.c\";\n\t\tpath = \"/Users/johnmci/Work In Progress/squeak Bugs/unixcompiletoomanyinstructions]/memoryAllocationNotes/gnu-interp.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94F5C25F0DF42C7600099B11 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94F5C1930DF26EF200099B11 /* gnu-interp.c */;\n\t\tname = \"gnu-interp.c: 5409\";\n\t\trLen = 7;\n\t\trLoc = 161001;\n\t\trType = 0;\n\t\tvrLen = 1782;\n\t\tvrLoc = 160256;\n\t};\n\t94F5C2600DF42C7600099B11 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94F5C1910DF26EF200099B11 /* gnu-interp.c */;\n\t\tname = \"gnu-interp.c: 5916\";\n\t\trLen = 7;\n\t\trLoc = 193171;\n\t\trType = 0;\n\t\tvrLen = 1899;\n\t\tvrLoc = 192393;\n\t};\n\t94F5F28710BC517200847EEE /* sqSqueakOSXNSView.m:455 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 94C2068910AF4F53002F4160 /* sqSqueakOSXNSView.m */;\n\t\tfunctionName = \"-setMarkedText:selectedRange:replacementRange:\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 455;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 306811863.543034;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 2;\n\t};\n\t94F5F28B10BC517500847EEE /* sqSqueakOSXNSView.m:476 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 94C2068910AF4F53002F4160 /* sqSqueakOSXNSView.m */;\n\t\tfunctionName = \"-markedRange\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 476;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 306811863.5430461;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 2;\n\t};\n\t94F5F28D10BC517700847EEE /* sqSqueakOSXNSView.m:480 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 94C2068910AF4F53002F4160 /* sqSqueakOSXNSView.m */;\n\t\tfunctionName = \"-selectedRange\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 480;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 306811863.543057;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 2;\n\t};\n\t94F5F29110BC518B00847EEE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D7178F10B73A3800F69A71 /* SqueakInterpreterEventSensor.h */;\n\t\tname = \"SqueakInterpreterEventSensor.h: 10\";\n\t\trLen = 8;\n\t\trLoc = 322;\n\t\trType = 0;\n\t\tvrLen = 461;\n\t\tvrLoc = 0;\n\t};\n\t94F5F29210BC518B00847EEE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94F5F29310BC518B00847EEE /* macXCanvas.m */;\n\t\tname = \"macXCanvas.m: 174\";\n\t\trLen = 8;\n\t\trLoc = 3716;\n\t\trType = 0;\n\t\tvrLen = 1886;\n\t\tvrLoc = 3759;\n\t};\n\t94F5F29310BC518B00847EEE /* macXCanvas.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = macXCanvas.m;\n\t\tpath = \"/Users/johnmci/Work In Progress/cincom/VWSourceCode/721/src/plat/macXCanvas.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94F5F29410BC518B00847EEE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D7178010B73A3800F69A71 /* SqueakInterpreterEventSensor.m */;\n\t\tname = \"SqueakInterpreterEventSensor.m: 40\";\n\t\trLen = 8;\n\t\trLoc = 1108;\n\t\trType = 0;\n\t\tvrLen = 1744;\n\t\tvrLoc = 0;\n\t};\n\t94F5F29510BC518B00847EEE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94F5F29610BC518B00847EEE /* ShellView.m */;\n\t\tname = \"ShellView.m: 121\";\n\t\trLen = 8;\n\t\trLoc = 4069;\n\t\trType = 0;\n\t\tvrLen = 2026;\n\t\tvrLoc = 3111;\n\t};\n\t94F5F29610BC518B00847EEE /* ShellView.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = ShellView.m;\n\t\tpath = \"/Users/johnmci/Work In Progress/smalltalk/FScriptSources-20031020/FScript/FScriptFramework/ShellView.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94F5F2A810BC539700847EEE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94F5F2A910BC539700847EEE /* NSSet.h */;\n\t\tname = \"NSSet.h: 58\";\n\t\trLen = 69;\n\t\trLoc = 2031;\n\t\trType = 0;\n\t\tvrLen = 1982;\n\t\tvrLoc = 721;\n\t};\n\t94F5F2A910BC539700847EEE /* NSSet.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSSet.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSSet.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94F8798F0E6C0C7E00662DEA /* sqSqueakIPhoneInfoPlistInterface.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {869, 785}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 2024}\";\n\t\t\tsepNavWindowFrame = \"{{896, 50}, {1017, 978}}\";\n\t\t};\n\t};\n\t94F879900E6C0C7E00662DEA /* sqSqueakIPhoneInfoPlistInterface.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 1508}}\";\n\t\t\tsepNavSelRange = \"{2213, 17}\";\n\t\t\tsepNavVisRange = \"{2004, 1724}\";\n\t\t\tsepNavWindowFrame = \"{{15, 8}, {1012, 1015}}\";\n\t\t};\n\t};\n\t94F89AED10B497F400556475 /* NSResponder.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSResponder.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSResponder.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94F89AFE10B4997900556475 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94F89AFF10B4997900556475 /* IOLLEvent.h */;\n\t\tname = \"IOLLEvent.h: 384\";\n\t\trLen = 79;\n\t\trLoc = 14824;\n\t\trType = 0;\n\t\tvrLen = 2433;\n\t\tvrLoc = 0;\n\t};\n\t94F89AFF10B4997900556475 /* IOLLEvent.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = IOLLEvent.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/IOKit.framework/Versions/A/Headers/hidsystem/IOLLEvent.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94F89BDE10B4B77400556475 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94F89BDF10B4B77400556475 /* CGBase.h */;\n\t\tname = \"CGBase.h: 105\";\n\t\trLen = 30;\n\t\trLoc = 2998;\n\t\trType = 0;\n\t\tvrLen = 1747;\n\t\tvrLoc = 1331;\n\t};\n\t94F89BDF10B4B77400556475 /* CGBase.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = CGBase.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Headers/CGBase.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94F89BE010B4B77400556475 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAEDF10ACAE2500F87527 /* NSValue.h */;\n\t\tname = \"NSValue.h: 52\";\n\t\trLen = 27;\n\t\trLoc = 1223;\n\t\trType = 0;\n\t\tvrLen = 1478;\n\t\tvrLoc = 0;\n\t};\n\t94F89C5A10B4BF2800556475 /* NSRunLoop.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSRunLoop.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSRunLoop.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94F89C9110B4C0B800556475 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94F89C9210B4C0B800556475 /* NSTimer.h */;\n\t\tname = \"NSTimer.h: 14\";\n\t\trLen = 30;\n\t\trLoc = 564;\n\t\trType = 0;\n\t\tvrLen = 1132;\n\t\tvrLoc = 0;\n\t};\n\t94F89C9210B4C0B800556475 /* NSTimer.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSTimer.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSTimer.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94F8E42E0DE6129D003F4F53 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94A0EBB20DE608350071C8B9 /* squeakAudioVideoPipeLineSignalInterface.c */;\n\t\tname = \"squeakAudioVideoPipeLineSignalInterface.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 2018;\n\t\tvrLoc = 0;\n\t};\n\t94FB0AA7123B63D200026016 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94FB0AA8123B63D200026016 /* teximage.c */;\n\t\tname = \"teximage.c: 1633\";\n\t\trLen = 15;\n\t\trLoc = 54425;\n\t\trType = 0;\n\t\tvrLen = 1976;\n\t\tvrLoc = 53379;\n\t};\n\t94FB0AA8123B63D200026016 /* teximage.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = teximage.c;\n\t\tpath = \"/Users/johnmci/Work In Progress/stx/support/MESA/Mesa-3.0/src/teximage.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94FB0B55123B6A8300026016 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94FB0B56123B6A8300026016 /* sqOpenGLRenderer.c */;\n\t\tname = \"sqOpenGLRenderer.c: 897\";\n\t\trLen = 0;\n\t\trLoc = 28946;\n\t\trType = 0;\n\t\tvrLen = 1861;\n\t\tvrLoc = 28206;\n\t};\n\t94FB0B56123B6A8300026016 /* sqOpenGLRenderer.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqOpenGLRenderer.c;\n\t\tpath = /Users/johnmci/Documents/SqueakQuicktimePlugin/platforms/Cross/plugins/B3DAcceleratorPlugin/sqOpenGLRenderer.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94FB0B57123B6A8300026016 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94FB0B58123B6A8300026016 /* NeonEngine.m */;\n\t\tname = \"NeonEngine.m: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1183;\n\t\tvrLoc = 1832;\n\t};\n\t94FB0B58123B6A8300026016 /* NeonEngine.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = NeonEngine.m;\n\t\tpath = \"/Volumes/pm/Mail Downloads/iProPutt/NeonEngine/NeonEngine.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94FB0B59123B6A8300026016 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94FB0B5A123B6A8300026016 /* NeonEngine.m */;\n\t\tname = \"NeonEngine.m: 17\";\n\t\trLen = 0;\n\t\trLoc = 287;\n\t\trType = 0;\n\t\tvrLen = 1057;\n\t\tvrLoc = 0;\n\t};\n\t94FB0B5A123B6A8300026016 /* NeonEngine.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = NeonEngine.m;\n\t\tpath = /Volumes/px2/business/archive/iProPutt/NeonEngine/NeonEngine.m;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94FB0B5B123B6A8300026016 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94FB0B5C123B6A8300026016 /* EAGLView.m */;\n\t\tname = \"EAGLView.m: 19\";\n\t\trLen = 0;\n\t\trLoc = 920;\n\t\trType = 0;\n\t\tvrLen = 2853;\n\t\tvrLoc = 0;\n\t};\n\t94FB0B5C123B6A8300026016 /* EAGLView.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = EAGLView.m;\n\t\tpath = \"/Volumes/330GB Photos/temp/GLSprite/Classes/EAGLView.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94FB0B5D123B6A8300026016 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94FB0B5E123B6A8300026016 /* EAGLView.m */;\n\t\tname = \"EAGLView.m: 71\";\n\t\trLen = 0;\n\t\trLoc = 1636;\n\t\trType = 0;\n\t\tvrLen = 1323;\n\t\tvrLoc = 1387;\n\t};\n\t94FB0B5E123B6A8300026016 /* EAGLView.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = EAGLView.m;\n\t\tpath = /Volumes/px2/business/SqueakiPhone/archivesOLDSTUFF/SqueakIPhone/Classes/EAGLView.m;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94FF88971240458F00B1021A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 940BE5E71239F50100674A11 /* SqueakUIViewOpenGL.h */;\n\t\tname = \"SqueakUIViewOpenGL.h: 43\";\n\t\trLen = 0;\n\t\trLoc = 1885;\n\t\trType = 0;\n\t\tvrLen = 2099;\n\t\tvrLoc = 706;\n\t};\n\t94FF88981240458F00B1021A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C2068910AF4F53002F4160 /* sqSqueakOSXNSView.m */;\n\t\tname = \"sqSqueakOSXNSView.m: 74\";\n\t\trLen = 9;\n\t\trLoc = 2921;\n\t\trType = 0;\n\t\tvrLen = 1647;\n\t\tvrLoc = 1928;\n\t};\n\t94FF88991240458F00B1021A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 940BE5E81239F50100674A11 /* SqueakUIViewOpenGL.m */;\n\t\tname = \"SqueakUIViewOpenGL.m: 163\";\n\t\trLen = 0;\n\t\trLoc = 5746;\n\t\trType = 0;\n\t\tvrLen = 2039;\n\t\tvrLoc = 5080;\n\t};\n\t94FFF7A40EBE2B9C00C69C79 /* SqueakV39.sources */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavFolds = \"{\\n    c =     (\\n                {\\n            l = \\\"123>' selector: #zork ] raise: SyntaxErrorNotification.\\\\n\\\\t\\\\n\\\\tself should: [ self compile: '<foo bar>' selector: #zork ] raise: SyntaxErrorNotification.\\\\n\\\\tself should: [ self compile: '<foo 1>' selector: #zork ] raise: SyntaxErrorNotification.\\\\n\\\\tself should: [ self compile: '<foo bar zork>' selector: #zork ] raise: SyntaxErrorNotification.\\\\n\\\\tself should: [ self compile: '<foo bar 1>' selector: #zork ] raise: SyntaxErrorNotification.\\\\n\\\\t\\\\nself should: [ self compile: '<foo: bar:>' selector: #zork ] raise: SyntaxErrorNotification.\\\\n\\\\tself should: [ self compile: '<foo: #bar: zork:>' selector: #zork ] raise: SyntaxErrorNotification.! !\\\\n\\\\n!MethodPragmaTest methodsFor: 'testing-compiler' stamp: 'lr 1/20/2006 02:25'!\\\\ntestCompileNumber\\\\n\\\\tself assertPragma: 'foo: 123' givesKeyword: #foo: arguments: #( 123 ).\\\\n\\\\tself assertPragma: 'foo: -123' givesKeyword: #foo: arguments: #( -123 ).\\\\n\\\\tself assertPragma: 'foo: 12.3' givesKeyword: #foo: arguments: #( 12.3 ).\\\\n\\\\tself assertPragma: 'foo: -12.3' givesKeyword: #foo: arguments: #( -12.3 ).! !\\\\n\\\\n!MethodPragmaTest methodsFor: 'testing-compiler' stamp: 'lr 1/20/2006 02:25'!\\\\ntestCompileString\\\\n\\\\tself assertPragma: 'foo: ''''' givesKeyword: #foo: arguments: #( '' ).\\\\n\\\\tself assertPragma: 'foo: ''bar''' givesKeyword: #foo: arguments: #( 'bar' ).! !\\\\n\\\\n!MethodPragmaTest methodsFor: 'testing-compiler' stamp: 'lr 1/20/2006 02:25'!\\\\ntestCompileSymbol\\\\n\\\\tself assertPragma: 'foo: #bar' givesKeyword: #foo: arguments: #( bar ).\\\\n\\\\tself assertPragma: 'foo: #bar:' givesKeyword: #foo: arguments: #( bar: ).\\\\n\\\\tself assertPragma: 'foo: #bar:zork:' givesKeyword: #foo: arguments: #( bar:zork: ).! !\\\\n\\\\n!MethodPragmaTest methodsFor: 'testing-compiler' stamp: 'lr 7/3/2006 15:00'!\\\\ntestCompileTemps\\\\n\\\\t\\\\\\\"Pragmas should be placeable before and after temps.\\\\\\\"\\\\n\\\\t\\\\n\\\\tself \\\\n\\\\t\\\\tshouldnt: [\\\\n\\\\t\\\\t\\\\tself assert: (self compile: '| temps | <foo>' selector: #zork) \\\\n\\\\t\\\\t\\\\t\\\\tpragmas notEmpty ]\\\\n\\\\t\\\\traise: SyntaxErrorNotification.\\\\n\\\\tself \\\\n\\\\t\\\\tshouldnt: [\\\\n\\\\t\\\\t\\\\tself assert: (self compile: '<foo> | temps |' selector: #zork) \\\\n\\\\t\\\\t\\\\t\\\\tpragmas notEmpty ]\\\\n\\\\t\\\\traise: SyntaxErrorNotification.! !\\\\n\\\\n!MethodPragmaTest methodsFor: 'testing-compiler' stamp: 'lr 2/6/2006 21:04'!\\\\ntestCompileValue\\\\n\\\\tself assertPragma: 'foo: true' givesKeyword: #foo: arguments: #( true ).\\\\n\\\\tself assertPragma: 'foo: false' givesKeyword: #foo: arguments: #( false ).\\\\n\\\\tself assertPragma: 'foo: nil' givesKeyword: #foo: arguments: #( nil ).\\\\n\\\\t\\\\n\\\\tself assertPragma: 'foo: String' givesKeyword: #foo: arguments: { String }.\\\\n\\\\tself assertPragma: 'foo: Pragma' givesKeyword: #foo: arguments: { Pragma }.! !\\\\n\\\\n\\\\n!MethodPragmaTest methodsFor: 'testing-method' stamp: 'lr 1/20/2006 07:54'!\\\\ntestMethod\\\\n\\\\t| pragma |\\\\n\\\\tpragma := self pragma: 'foo' selector: #bar.\\\\n\\\\tself assert: pragma method == (self class >> #bar).! !\\\\n\\\\n!MethodPragmaTest methodsFor: 'testing-method' stamp: 'md 2/18/2006 19:59'!\\\\ntestMethodClass\\\\n\\\\t| pragma |\\\\n\\\\tpragma := self pragma: 'foo' selector: #bar.\\\\n\\\\tself assert: pragma methodClass == self class.! !\\\\n\\\\n!MethodPragmaTest methodsFor: 'testing-method' stamp: 'lr 1/20/2006 07:54'!\\\\ntestSelector\\\\n\\\\t| pragma |\\\\n\\\\tpragma := self pragma: 'foo' selector: #bar.\\\\n\\\\tself assert: pragma selector == #bar.! !\\\\n\\\\n\\\\n!MethodPragmaTest methodsFor: 'testing-compiled' stamp: 'lr 2/6/2006 21:03'!\\\\ntestNoPragma\\\\n\\\\t| method |\\\\n\\\\tmethod := self compile: '' selector: #foo.\\\\n\\\\tself assert: method pragmas = #().! !\\\\n\\\\n\\\\n!MethodPragmaTest methodsFor: 'testing-primitives' stamp: 'lr 1/20/2006 02:31'!\\\\ntestPrimitiveIndexed1\\\\n\\\\t\\\\\\\"This test useses the #instVarAt: primitive.\\\\\\\"\\\\n\\\\t\\\\n\\\\tself compile: '<primitive: 74> ^ #inst' selector: #inst.\\\\n\\\\tself assert: self inst = #inst.! !\\\\n\\\\n!MethodPragmaTest methodsFor: 'testing-primitives' stamp: 'lr 1/20/2006 02:31'!\\\\ntestPrimitiveIndexed2\\\\n\\\\t\\\\\\\"This test useses the #asOop primitive.\\\\\\\"\\\\n\\\\n\\\\tself compile: '<primitive: 75> ^ #oop' selector: #oop.\\\\n\\\\tself assert: self oop = self asOop.! !\\\\n\\\\n!MethodPragmaTest methodsFor: 'testing-primitives' stamp: 'lr 1/20/2006 02:42'!\\\\ntestPrimitiveNamed1\\\\n\\\\t\\\\\\\"This test useses the #primitiveDirectoryLookup primitive.\\\\\\\"\\\\n\\\\n\\\\tself compile: '<primitive: ''primitiveDirectoryLookup'' module: ''FilePlugin''> ^ #lookup' selector: #lookup.\\\\n\\\\tself assert: self lookup = #lookup.\\\\n\\\\t\\\\n! !\\\\n\\\\n!MethodPragmaTest methodsFor: 'testing-primitives' stamp: 'lr 1/20/2006 02:41'!\\\\ntestPrimitiveNamed2\\\\n\\\\t\\\\\\\"This test useses the #primPathNameDelimiter primitive.\\\\\\\"\\\\n\\\\n\\\\tself compile: '<primitive: ''primitiveDirectoryDelimitor'' module: ''FilePlugin''> ^ #delim' selector: #delim.\\\\n\\\\tself assert: self delim = FileDirectory primPathNameDelimiter.\\\\n\\\\t\\\\n! !\\\\nObject subclass: #MethodProperties\\\\n\\\\tinstanceVariableNames: 'properties pragmas selector'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Kernel-Methods'!\\\\n!MethodProperties commentStamp: 'lr 2/6/2006 19:31' prior: 0!\\\\nI am class holding state for compiled methods. All my instance variables should be actually part of the CompiledMethod itself, but the current implementation of the VM doesn't allow this.\\\\n\\\\nI am a compact class and optimized for size and speed, since every CompiledMethod points onto an instance of myself. I am mostly polymorphic to the protocol of an identity-dictionary, so that key-value pairs can be easily stored and retreived without the need to add new variables. However keep in mind that instantiating a dictionary consumes much more memory than adding an instance-variable, so it might be clever to add a new variable if the property is going to be used by every compiled method.!\\\\n\\\\n\\\\n!MethodProperties methodsFor: 'accessing' stamp: 'lr 2/6/2006 19:11'!\\\\npragmas\\\\n\\\\t^ pragmas! !\\\\n\\\\n!MethodProperties methodsFor: 'accessing' stamp: 'md 2/16/2006 17:50'!\\\\nselector\\\\n\\\\t^selector! !\\\\n\\\\n!MethodProperties methodsFor: 'accessing' stamp: 'md 2/16/2006 17:50'!\\\\nselector: aSymbol\\\\n\\\\tselector := aSymbol! !\\\\n\\\\n\\\\n!MethodProperties methodsFor: 'initialization' stamp: 'lr 2/6/2006 19:12'!\\\\ninitialize\\\\n\\\\tsuper initialize.\\\\n\\\\tpragmas := #().! !\\\\n\\\\n\\\\n!MethodProperties methodsFor: 'properties' stamp: 'lr 2/6/2006 19:04'!\\\\nat: aKey\\\\n\\\\t\\\\\\\"Answer the property value associated with aKey.\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ self at: aKey ifAbsent: [ self error: 'Property not found' ].! !\\\\n\\\\n!MethodProperties methodsFor: 'properties' stamp: 'lr 2/6/2006 20:47'!\\\\nat: aKey ifAbsentPut: aBlock\\\\n\\\\t\\\\\\\"Answer the property associated with aKey or, if aKey isn't found store the result of evaluating aBlock as new value.\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ self at: aKey ifAbsent: [ self at: aKey put: aBlock value ].! !\\\\n\\\\n!MethodProperties methodsFor: 'properties' stamp: 'lr 2/6/2006 19:07'!\\\\nat: aKey ifAbsent: aBlock\\\\n\\\\t\\\\\\\"Answer the property value associated with aKey or, if aKey isn't found, answer the result of evaluating aBlock.\\\\\\\"\\\\n\\\\t\\\\n\\\\tproperties isNil ifTrue: [ ^ aBlock value ].\\\\n\\\\t^ properties at: aKey ifAbsent: aBlock.! !\\\\n\\\\n!MethodProperties methodsFor: 'properties' stamp: 'lr 2/6/2006 19:06'!\\\\nat: aKey put: anObject\\\\n\\\\t\\\\\\\"Set the property at aKey to be anObject. If aKey is not found, create a new entry for aKey and set is value to anObject. Answer anObject.\\\\\\\"\\\\n\\\\n\\\\tproperties ifNil: [ properties :=  IdentityDictionary new ].\\\\n\\\\t^ properties at: aKey put: anObject.! !\\\\n\\\\n!MethodProperties methodsFor: 'properties' stamp: 'lr 2/6/2006 19:11'!\\\\nincludesKey: aKey\\\\n\\\\t\\\\\\\"Test if the property aKey is present.\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ properties notNil and: [ properties includesKey: aKey ].! !\\\\n\\\\n!MethodProperties methodsFor: 'properties' stamp: 'lr 2/6/2006 20:48'!\\\\nremoveKey: aKey\\\\n\\\\t\\\\\\\"Remove the property with aKey. Answer the property or raise an error if aKey isn't found.\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ self removeKey: aKey ifAbsent: [ self error: 'Property not found' ].! !\\\\n\\\\n!MethodProperties methodsFor: 'properties' stamp: 'lr 2/6/2006 19:07'!\\\\nremoveKey: aKey ifAbsent: aBlock\\\\n\\\\t\\\\\\\"Remove the property with aKey. Answer the value or, if aKey isn't found, answer the result of evaluating aBlock.\\\\\\\"\\\\n\\\\t\\\\n\\\\t| answer |\\\\n\\\\tproperties isNil ifTrue: [ ^ aBlock value ].\\\\n\\\\tanswer := properties removeKey: aKey ifAbsent: aBlock.\\\\n\\\\tproperties isEmpty ifTrue: [ properties := nil ].\\\\n\\\\t^ answer.! !\\\\n\\\\n\\\\n!MethodProperties methodsFor: 'private' stamp: 'lr 2/6/2006 20:36'!\\\\naddPragma: aPragma\\\\n\\\\tpragmas := pragmas copyWith: aPragma.! !\\\\n\\\\n\\\\n!MethodProperties methodsFor: 'testing' stamp: 'md 2/19/2006 11:24'!\\\\nisMethodProperties\\\\n\\\\t^true! !\\\\n\\\\n\\\\n!MethodProperties methodsFor: 'copying' stamp: 'md 3/1/2006 15:30'!\\\\npostCopy\\\\n\\\\tproperties := properties copy.\\\\n\\\\tpragmas := pragmas copy.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMethodProperties class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MethodProperties class methodsFor: 'class initialization' stamp: 'lr 2/6/2006 22:06'!\\\\ninitialize\\\\n\\\\tself becomeCompact.! !\\\\nTestCase subclass: #MethodPropertiesTest\\\\n\\\\tinstanceVariableNames: 'method'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'KernelTests-Methods'!\\\\n\\\\n!MethodPropertiesTest methodsFor: 'private' stamp: 'lr 2/6/2006 20:43'!\\\\npropertyDictionaryFor: aMethod\\\\n\\\\t^ aMethod properties instVarNamed: 'properties'.! !\\\\n\\\\n\\\\n!MethodPropertiesTest methodsFor: 'running' stamp: 'lr 1/20/2006 19:16'!\\\\nsetUp\\\\n\\\\tmethod := Object >> #halt.! !\\\\n\\\\n!MethodPropertiesTest methodsFor: 'running' stamp: 'lr 1/20/2006 19:20'!\\\\ntearDown\\\\n\\\\tObject recompile: #halt from: Object.! !\\\\n\\\\n\\\\n!MethodPropertiesTest methodsFor: 'testing' stamp: 'kwl 7/26/2006 11:41'!\\\\ntestAllMethodsHaveMethodClass\\\\n\\\\tSmalltalk garbageCollect.\\\\n\\\\tself assert: (CompiledMethod allInstances\\\\n\\\\t\\\\t\\\\treject: [:cm | cm literals last isVariableBinding\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [cm literals last value isBehavior\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tor: [cm literals last value isTrait]]]) isEmpty\\\\n\\\\t\\\\t\\\\tdescription: 'CompiledMethods must have methodClass literal'! !\\\\n\\\\n!MethodPropertiesTest methodsFor: 'testing' stamp: 'kwl 7/26/2006 11:40'!\\\\ntestAllMethodsHaveNewPropertyFormat\\\\n\\\\tSmalltalk garbageCollect.\\\\n\\\\tself assert: (CompiledMethod allInstances\\\\n\\\\t\\\\t\\\\treject: [:cm | cm hasNewPropertyFormat]) isEmpty\\\\n\\\\t\\\\tdescription: 'CompiledMethods must have new property format'! !\\\\n\\\\n!MethodPropertiesTest methodsFor: 'testing' stamp: 'lr 2/6/2006 22:21'!\\\\ntestAt\\\\n\\\\tself should: [ method properties at: #zork ] raise: Error.\\\\n\\\\tself assert: (self propertyDictionaryFor: method) isNil.\\\\n\\\\tmethod properties at: #zork put: 'hello'.\\\\n\\\\tself assert: (method properties at: #zork) = 'hello'.! !\\\\n\\\\n!MethodPropertiesTest methodsFor: 'testing' stamp: 'lr 2/6/2006 22:18'!\\\\ntestAtIfAbsent\\\\n\\\\tself assert: (method properties at: #zork ifAbsent: [ 'hello' ]) = 'hello'.\\\\n\\\\tself assert: (self propertyDictionaryFor: method) isNil.\\\\n\\\\tmethod properties at: #zork put: 'hi'.\\\\n\\\\tself assert: (method properties at: #zork ifAbsent: [ 'hello' ]) = 'hi'.! !\\\\n\\\\n!MethodPropertiesTest methodsFor: 'testing' stamp: 'lr 2/6/2006 22:18'!\\\\ntestAtIfAbsentPut\\\\n\\\\tself assert: (method properties at: #zork ifAbsentPut: [ 'hello' ]) = 'hello'.\\\\n\\\\tself assert: (method properties at: #zork ifAbsentPut: [ 'hi' ]) = 'hello'.! !\\\\n\\\\n!MethodPropertiesTest methodsFor: 'testing' stamp: 'lr 2/6/2006 22:18'!\\\\ntestAtPut\\\\n\\\\tself assert: (method properties at: #zork put: 'hello') = 'hello'.\\\\n\\\\tself assert: (method properties at: #zork) = 'hello'.! !\\\\n\\\\n!MethodPropertiesTest methodsFor: 'testing' stamp: 'lr 2/6/2006 22:19'!\\\\ntestIncludesKey\\\\n\\\\tself deny: (method properties includesKey: #zork).\\\\n\\\\tself assert: (self propertyDictionaryFor: method) isNil.\\\\n\\\\tmethod properties at: #zork put: 123.\\\\n\\\\tself assert: (method properties includesKey: #zork).! !\\\\n\\\\n!MethodPropertiesTest methodsFor: 'testing' stamp: 'lr 2/6/2006 22:18'!\\\\ntestRemoveKey\\\\n\\\\tmethod properties at: #zork put: 'hello'.\\\\n\\\\tself should: [ method properties removeKey: #halt ] raise: Error.\\\\n\\\\tself assert: (method properties removeKey: #zork) = 'hello'.\\\\n\\\\tself assert: (self propertyDictionaryFor: method) isNil.\\\\n\\\\tself should: [ method properties removeKey: #zork ] raise: Error.\\\\n\\\\tself assert: (self propertyDictionaryFor: method) isNil.! !\\\\n\\\\n!MethodPropertiesTest methodsFor: 'testing' stamp: 'lr 2/6/2006 22:18'!\\\\ntestRemoveKeyifAbsent\\\\n\\\\tmethod properties at: #zork put: 'hello'.\\\\n\\\\tself assert: (method properties removeKey: #halt ifAbsent: [ 'hi' ]) = 'hi'.\\\\n\\\\tself assert: (method properties removeKey: #zork ifAbsent: [ 'hi' ]) = 'hello'.\\\\n\\\\tself assert: (self propertyDictionaryFor: method) isNil.\\\\n\\\\tself should: (method properties removeKey: #zork ifAbsent: [ 'hi' ]) = 'hi'.\\\\n\\\\tself assert: (self propertyDictionaryFor: method) isNil.! !\\\\nObject subclass: #MethodReference\\\\n\\\\tinstanceVariableNames: 'classSymbol classIsMeta methodSymbol stringVersion'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Tools'!\\\\n!MethodReference commentStamp: 'tlk 5/9/2006 18:43' prior: 0!\\\\nA MethodReference is is a lightweight proxy for a CompiledMethod.  Has methods for pointed to the CompileMethod's source statements, byte codes. Is heavily used my Tools.\\\\n\\\\nInstance Variables\\\\n\\\\tclassIsMeta:\\\\t\\\\t     Boolean class vs. instance\\\\n\\\\tclassSymbol:\\\\t\\\\tSymbol for method's class (without class keyword if meta)\\\\n\\\\tmethodSymbol:\\\\t\\\\tSymbol for method's selector\\\\n\\\\tstringVersion:\\\\t\\\\t'Class>>selector:' format\\\\n\\\\n!\\\\n\\\\n\\\\n!MethodReference methodsFor: 'comparisons' stamp: 'dgd 3/8/2003 11:54'!\\\\nhash\\\\n\\\\t\\\\\\\"Answer a SmallInteger whose value is related to the receiver's  \\\\n\\\\tidentity.\\\\\\\"\\\\n\\\\t^ (self species hash bitXor: self classSymbol hash)\\\\n\\\\t\\\\tbitXor: self methodSymbol hash! !\\\\n\\\\n!MethodReference methodsFor: 'comparisons' stamp: 'RAA 5/28/2001 11:56'!\\\\n<= anotherMethodReference\\\\n\\\\n\\\\tclassSymbol < anotherMethodReference classSymbol ifTrue: [^true].\\\\n\\\\tclassSymbol > anotherMethodReference classSymbol ifTrue: [^false].\\\\n\\\\tclassIsMeta = anotherMethodReference classIsMeta ifFalse: [^classIsMeta not].\\\\n\\\\t^methodSymbol <= anotherMethodReference methodSymbol\\\\n! !\\\\n\\\\n!MethodReference methodsFor: 'comparisons' stamp: 'dgd 3/7/2003 13:18'!\\\\n= anotherMethodReference \\\\n\\\\t\\\\\\\"Answer whether the receiver and the argument represent the \\\\n\\\\tsame object.\\\\\\\"\\\\n\\\\t^ self species == anotherMethodReference species\\\\n\\\\t\\\\tand: [self classSymbol = anotherMethodReference classSymbol]\\\\n\\\\t\\\\tand: [self classIsMeta = anotherMethodReference classIsMeta]\\\\n\\\\t\\\\tand: [self methodSymbol = anotherMethodReference methodSymbol]! !\\\\n\\\\n\\\\n!MethodReference methodsFor: 'queries' stamp: 'RAA 5/28/2001 06:19'!\\\\nasStringOrText\\\\n\\\\n\\\\t^stringVersion! !\\\\n\\\\n!MethodReference methodsFor: 'queries' stamp: 'RAA 5/28/2001 08:11'!\\\\nclassIsMeta\\\\n\\\\n\\\\t^classIsMeta! !\\\\n\\\\n!MethodReference methodsFor: 'queries' stamp: 'RAA 5/28/2001 08:10'!\\\\nclassSymbol\\\\n\\\\n\\\\t^classSymbol! !\\\\n\\\\n!MethodReference methodsFor: 'queries' stamp: 'md 8/27/2005 17:17'!\\\\nisValid\\\\n\\\\t\\\\\\\"Answer whether the receiver represents a current selector or Comment\\\\\\\"\\\\n\\\\n\\\\t| aClass |\\\\n\\\\tmethodSymbol isDoIt ifTrue: [^ false].\\\\n\\\\t(aClass _ self actualClass) ifNil: [^ false].\\\\n\\\\t^ (aClass includesSelector: methodSymbol) or:\\\\n\\\\t\\\\t[methodSymbol == #Comment]! !\\\\n\\\\n!MethodReference methodsFor: 'queries' stamp: 'RAA 5/28/2001 08:10'!\\\\nmethodSymbol\\\\n\\\\n\\\\t^methodSymbol! !\\\\n\\\\n!MethodReference methodsFor: 'queries' stamp: 'sw 11/5/2001 00:53'!\\\\nprintOn: aStream\\\\n\\\\t\\\\\\\"Print the receiver on a stream\\\\\\\"\\\\n\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream nextPutAll: ' ', self actualClass name, ' >> ', methodSymbol! !\\\\n\\\\n!MethodReference methodsFor: 'queries' stamp: 'sr 6/4/2004 01:55'!\\\\nsourceString\\\\n\\\\t^ (self actualClass sourceCodeAt: self methodSymbol) asString! !\\\\n\\\\n\\\\n!MethodReference methodsFor: 'setting' stamp: 'RAA 5/28/2001 07:34'!\\\\nsetClassAndSelectorIn: csBlock\\\\n\\\\n\\\\t^csBlock value: self actualClass value: methodSymbol! !\\\\n\\\\n!MethodReference methodsFor: 'setting' stamp: 'RAA 5/28/2001 06:04'!\\\\nsetClassSymbol: classSym classIsMeta: isMeta methodSymbol: methodSym stringVersion: aString \\\\n\\\\n\\\\tclassSymbol _ classSym.\\\\n\\\\tclassIsMeta _ isMeta.\\\\n\\\\tmethodSymbol _ methodSym.\\\\n\\\\tstringVersion _ aString.! !\\\\n\\\\n!MethodReference methodsFor: 'setting' stamp: 'RAA 5/28/2001 08:06'!\\\\nsetClass: aClass methodSymbol: methodSym stringVersion: aString \\\\n\\\\n\\\\tclassSymbol _ aClass theNonMetaClass name.\\\\n\\\\tclassIsMeta _ aClass isMeta.\\\\n\\\\tmethodSymbol _ methodSym.\\\\n\\\\tstringVersion _ aString.! !\\\\n\\\\n!MethodReference methodsFor: 'setting' stamp: 'RAA 5/28/2001 11:34'!\\\\nsetStandardClass: aClass methodSymbol: methodSym\\\\n\\\\n\\\\tclassSymbol _ aClass theNonMetaClass name.\\\\n\\\\tclassIsMeta _ aClass isMeta.\\\\n\\\\tmethodSymbol _ methodSym.\\\\n\\\\tstringVersion _ aClass name , ' ' , methodSym.! !\\\\n\\\\n\\\\n!MethodReference methodsFor: 'string version' stamp: 'RAA 5/29/2001 14:44'!\\\\nstringVersion\\\\n\\\\n\\\\t^stringVersion! !\\\\n\\\\n!MethodReference methodsFor: 'string version' stamp: 'RAA 5/29/2001 14:44'!\\\\nstringVersion: aString\\\\n\\\\n\\\\tstringVersion _ aString! !\\\\n\\\\n\\\\n!MethodReference methodsFor: '*fixUnderscores' stamp: 'cmm 5/1/2006 19:38'!\\\\nfixUnderscores\\\\n\\\\t\\\\\\\"Replace underscores with :=. Answer true if fixed or no fix necessary, false if manual fix required\\\\\\\"\\\\n\\\\n\\\\t| src cm ts |\\\\n\\\\t\\\\\\\"Check if we do need to do anything\\\\\\\"\\\\n\\\\tsrc := self actualClass sourceCodeAt: methodSymbol.\\\\n\\\\t(src includes: $_) ifFalse: [^true].\\\\n\\\\n\\\\t\\\\\\\"Chicken out if there is a literal underscore\\\\\\\"\\\\n\\\\tcm := self actualClass compiledMethodAt: methodSymbol.\\\\n\\\\t(cm hasLiteralSuchThat: [:lit | \\\\n\\\\t\\\\tlit = $_ or: [lit isString and: [lit includes: $_]]]) ifTrue: [^false].\\\\n\\\\n\\\\t\\\\\\\"Otherwise, replace underscores with :=\\\\\\\"\\\\n\\\\tsrc := src copyReplaceAll: '_' with: ':='.\\\\n\\\\tts := self timeStamp.\\\\n\\\\tts = '' ifTrue: [ts := nil].\\\\n\\\\tself actualClass \\\\n\\\\t\\\\tcompile: src\\\\n\\\\t\\\\tclassified: ClassOrganizer default\\\\n\\\\t\\\\twithStamp: ts \\\\n\\\\t\\\\tnotifying: nil.\\\\n\\\\n\\\\t^true\\\\n! !\\\\n\\\\n\\\\n!MethodReference methodsFor: '*Kernel-Traits' stamp: 'md 3/3/2006 09:25'!\\\\nactualClass \\\\n\\\\n\\\\t| actualClass |\\\\n\\\\n\\\\tactualClass _ Smalltalk at: classSymbol ifAbsent: [^nil].\\\\n\\\\tclassIsMeta ifTrue: [^actualClass classSide].\\\\n\\\\t^actualClass\\\\n\\\\n! !\\\\n\\\\n\\\\n!MethodReference methodsFor: '*monticello' stamp: 'ab 8/22/2003 17:55'!\\\\nasMethodDefinition\\\\n\\\\t^ MCMethodDefinition forMethodReference: self! !\\\\n\\\\n!MethodReference methodsFor: '*monticello' stamp: 'ab 8/22/2003 17:58'!\\\\ncategory\\\\n\\\\t^ self actualClass organization categoryOfElement: methodSymbol! !\\\\n\\\\n!MethodReference methodsFor: '*monticello' stamp: 'ab 8/22/2003 17:58'!\\\\ncompiledMethod\\\\n\\\\t^ self actualClass compiledMethodAt: methodSymbol! !\\\\n\\\\n!MethodReference methodsFor: '*monticello' stamp: 'al 10/9/2005 20:05'!\\\\nisLocalSelector\\\\n\\\\t^self actualClass\\\\n\\\\t\\\\tincludesLocalSelector: self methodSymbol! !\\\\n\\\\n!MethodReference methodsFor: '*monticello' stamp: 'ab 8/22/2003 17:59'!\\\\nsource\\\\n\\\\t^ (self actualClass sourceCodeAt: methodSymbol) asString withSqueakLineEndings! !\\\\n\\\\n!MethodReference methodsFor: '*monticello' stamp: 'ab 8/22/2003 17:58'!\\\\ntimeStamp\\\\n\\\\t^ self compiledMethod timeStamp! !\\\\n\\\\n\\\\n!MethodReference methodsFor: '*packageinfo-base' stamp: 'ab 5/23/2003 22:58'!\\\\nsourceCode\\\\n\\\\t^ self actualClass sourceCodeAt: methodSymbol! !\\\\n\\\\n\\\\n!MethodReference methodsFor: '*OB-Standard' stamp: 'dvf 8/19/2005 17:16'!\\\\nasNode\\\\n\\\\t^OBMethodNode on: self! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMethodReference class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MethodReference class methodsFor: 'instance creation' stamp: 'ab 2/6/2005 16:22'!\\\\nclass: aClass selector: aSelector\\\\n\\\\t^ self new setStandardClass: aClass methodSymbol: aSelector! !\\\\nClassTestCase subclass: #MethodReferenceTest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Tools-Browser-Tests'!\\\\n\\\\n!MethodReferenceTest methodsFor: 'Running' stamp: 'sd 11/20/2005 21:27'!\\\\ntestEquals\\\\n\\\\t| aMethodReference anotherMethodReference |\\\\n\\\\taMethodReference := MethodReference new.\\\\n\\\\tanotherMethodReference := MethodReference new.\\\\n\\\\t\\\\\\\" \\\\n\\\\ttwo fresh instances should be equals between them\\\\\\\"\\\\n\\\\tself\\\\n\\\\t\\\\tshould: [aMethodReference = anotherMethodReference].\\\\n\\\\tself\\\\n\\\\t\\\\tshould: [aMethodReference hash = anotherMethodReference hash].\\\\n\\\\t\\\\\\\" \\\\n\\\\ttwo instances representing the same method (same class and  \\\\n\\\\tsame selector) should be equals\\\\\\\"\\\\n\\\\taMethodReference setStandardClass: String methodSymbol: #foo.\\\\n\\\\tanotherMethodReference setStandardClass: String methodSymbol: #foo.\\\\n\\\\tself\\\\n\\\\t\\\\tshould: [aMethodReference = anotherMethodReference].\\\\n\\\\tself\\\\n\\\\t\\\\tshould: [aMethodReference hash = anotherMethodReference hash] ! !\\\\n\\\\n!MethodReferenceTest methodsFor: 'Running' stamp: 'sd 11/20/2005 21:27'!\\\\ntestNotEquals\\\\n\\\\t| aMethodReference anotherMethodReference |\\\\n\\\\taMethodReference := MethodReference new.\\\\n\\\\tanotherMethodReference := MethodReference new.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\taMethodReference setStandardClass: String methodSymbol: #foo.\\\\n\\\\tanotherMethodReference setStandardClass: String class methodSymbol: #foo.\\\\n\\\\t\\\\\\\" \\\\n\\\\tdifferente classes, same selector -> no more equals\\\\\\\"\\\\n\\\\tself\\\\n\\\\t\\\\tshouldnt: [aMethodReference = anotherMethodReference].\\\\n\\\\t\\\\\\\" \\\\n\\\\tsame classes, diferente selector -> no more equals\\\\\\\"\\\\n\\\\tanotherMethodReference setStandardClass: String methodSymbol: #bar.\\\\n\\\\tself\\\\n\\\\t\\\\tshouldnt: [aMethodReference = anotherMethodReference] ! !\\\\nParseNode subclass: #MethodTempsNode\\\\n\\\\tinstanceVariableNames: 'temporaries'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Compiler-ParseNodes'!\\\\nMethodInterface subclass: #MethodWithInterface\\\\n\\\\tinstanceVariableNames: 'playerClass'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'EToys-Scripting'!\\\\n!MethodWithInterface commentStamp: '<historical>' prior: 0!\\\\nA MethodInterface bound to an actual class.\\\\n\\\\n\\\\tselector\\\\t\\\\t\\\\t\\\\t\\\\tA symbol - the selector being described\\\\n\\\\targumentSpecifications\\\\tA list of specifications for the formal arguments of the method\\\\n\\\\tresultSpecification \\\\t\\\\tA characterization of the return value of the method\\\\n\\\\tuserLevel\\\\t\\\\t\\\\t\\\\t\\\\n\\\\tattributeKeywords\\\\t\\\\tA list of symbols, comprising keywords that the user wishes to\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tassociate with this method\\\\n\\\\tdefaultStatus\\\\t\\\\t\\\\tThe status to apply to new instances of the class by default\\\\n\\\\tdefaultFiresPerTick\\\\t\\\\tHow many fires per tick, by default, should be allowed if ticking.\\\\n\\\\tplayerClass\\\\t\\\\t\\\\t\\\\tThe actual class with which this script is associated!\\\\n\\\\n\\\\n!MethodWithInterface methodsFor: 'access' stamp: 'sw 3/28/2001 16:25'!\\\\nplayerClass\\\\n\\\\t\\\\\\\"Answer the playerClass associated with the receiver.  Note: fixes up cases where the playerClass slot was a Playerxxx object because of an earlier bug\\\\\\\"\\\\n\\\\n\\\\t^ (playerClass isKindOf: Class)\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[playerClass]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[playerClass _ playerClass class]! !\\\\n\\\\n\\\\n!MethodWithInterface methodsFor: 'initialization' stamp: 'sw 1/30/2001 11:37'!\\\\nconvertFromUserScript: aUserScript\\\\n\\\\t\\\\\\\"The argument represents an old UserScript object.  convert it over\\\\\\\"\\\\n\\\\n\\\\tdefaultStatus _ aUserScript status.! !\\\\n\\\\n!MethodWithInterface methodsFor: 'initialization' stamp: 'sw 1/26/2001 16:44'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Initialize the receiver by setting its inst vars to default values\\\\\\\"\\\\n\\\\n\\\\tsuper initialize.\\\\n\\\\tdefaultStatus _ #normal! !\\\\n\\\\n!MethodWithInterface methodsFor: 'initialization' stamp: 'sw 2/20/2001 03:29'!\\\\nisTextuallyCoded\\\\n\\\\t\\\\\\\"Answer whether the receiver is in a textually-coded state.  A leftover from much earlier times, this is a vacuous backstop\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!MethodWithInterface methodsFor: 'initialization' stamp: 'sw 9/12/2001 11:59'!\\\\nplayerClass: aPlayerClass selector: aSelector\\\\n\\\\t\\\\\\\"Set the playerClass and selector of the receiver\\\\\\\"\\\\n\\\\n\\\\tplayerClass _ aPlayerClass.\\\\n\\\\tselector _ aSelector.! !\\\\n\\\\n!MethodWithInterface methodsFor: 'initialization' stamp: 'nk 7/2/2004 07:18'!\\\\nstatus\\\\n\\\\t^defaultStatus\\\\n! !\\\\n\\\\n\\\\n!MethodWithInterface methodsFor: 'rename' stamp: 'sw 2/17/2001 04:10'!\\\\nokayToRename\\\\n\\\\t\\\\\\\"Answer whether the receiver is in a state to be renamed.\\\\\\\"\\\\n\\\\n\\\\t^ true! !\\\\n\\\\n!MethodWithInterface methodsFor: 'rename' stamp: 'sw 3/11/2003 00:01'!\\\\nrenameScript: newSelector fromPlayer: aPlayer\\\\n\\\\n\\\\t\\\\\\\"The receiver's selector has changed to the new selector.  Get various things right, including the physical appearance of any Scriptor open on this method\\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\tself allScriptEditors do:\\\\n\\\\n\\\\t\\\\t[:aScriptEditor | aScriptEditor renameScriptTo: newSelector].\\\\n\\\\n\\\\n\\\\n\\\\t(selector numArgs = 0 and: [newSelector numArgs = 1])\\\\n\\\\n\\\\t\\\\tifTrue:\\\\n\\\\n\\\\t\\\\t\\\\t[self argumentVariables: (OrderedCollection with:\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t(Variable new name: #parameter type: #Number))].\\\\n\\\\n\\\\t(selector numArgs = 1 and: [newSelector numArgs = 0])\\\\n\\\\n\\\\t\\\\tifTrue:\\\\n\\\\n\\\\t\\\\t\\\\t[self argumentVariables: OrderedCollection new].\\\\n\\\\n\\\\n\\\\n\\\\tselector _ newSelector asSymbol.\\\\n\\\\n\\\\tself bringUpToDate.\\\\n\\\\n\\\\tself playerClass atSelector: selector putScript: self.\\\\n\\\\n\\\\tself allScriptActivationButtons do:\\\\n\\\\n\\\\t\\\\t[:aButton | aButton bringUpToDate].\\\\n\\\\n\\\\n\\\\n! !\\\\n\\\\n\\\\n!MethodWithInterface methodsFor: 'script editor' stamp: 'sw 3/10/2003 23:58'!\\\\nallScriptActivationButtons\\\\n\\\\n\\\\t\\\\\\\"Answer all the script-activation buttons that exist for this interface\\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\t^ ScriptActivationButton allInstances select: \\\\n\\\\n\\\\t\\\\t[:aButton | aButton uniclassScript == self]! !\\\\n\\\\n!MethodWithInterface methodsFor: 'script editor' stamp: 'sw 3/28/2001 16:26'!\\\\nallScriptEditors\\\\n\\\\t\\\\\\\"Answer all the script editors that exist for the class and selector of this interface\\\\\\\"\\\\n\\\\n\\\\t^ ScriptEditorMorph allInstances select: \\\\n\\\\t\\\\t[:aScriptEditor | aScriptEditor playerScripted class == self playerClass and:\\\\n\\\\t\\\\t\\\\t[aScriptEditor scriptName == selector]]! !\\\\n\\\\n!MethodWithInterface methodsFor: 'script editor' stamp: 'sw 2/17/2001 03:28'!\\\\ncurrentScriptEditor: anEditor\\\\n\\\\t\\\\\\\"Set the receiver's currentScriptEditor as indicated, if I care.  MethodWithInterface does not care, since it does not hold on to a ScriptEditor.  A subclass of mine, however does, or did, care\\\\\\\"! !\\\\n\\\\n!MethodWithInterface methodsFor: 'script editor' stamp: 'sw 3/28/2001 16:26'!\\\\ninstantiatedScriptEditorForPlayer: aPlayer\\\\n\\\\t\\\\\\\"Return a new script editor for the player and selector\\\\\\\"\\\\n\\\\n\\\\t| aScriptEditor |\\\\n\\\\taScriptEditor _ (self playerClass includesSelector: selector) \\\\n\\\\t\\\\t\\\\tifTrue: [ScriptEditorMorph new \\\\n\\\\t\\\\t\\\\t\\\\tfromExistingMethod: selector \\\\n\\\\t\\\\t\\\\t\\\\tforPlayer: aPlayer]\\\\n\\\\t\\\\t\\\\tifFalse: [ScriptEditorMorph new\\\\n\\\\t\\\\t\\\\t\\\\tsetMorph: aPlayer costume\\\\n\\\\t\\\\t\\\\t\\\\tscriptName: selector].\\\\n\\\\t\\\\tdefaultStatus == #ticking ifTrue:\\\\n\\\\t\\\\t\\\\t[aPlayer costume arrangeToStartStepping].\\\\n\\\\t\\\\n\\\\t^ aScriptEditor! !\\\\n\\\\n!MethodWithInterface methodsFor: 'script editor' stamp: 'sw 7/28/2001 01:00'!\\\\nrecompileScriptFromTilesUnlessTextuallyCoded\\\\n\\\\t\\\\\\\"Recompile Script From Tiles Unless Textually Coded.  For the universal-tiles MethodWithInterface case, this is moot.  Used only in support of a reintegration of Open-school forked projects from Sept 2000 in 7/01\\\\\\\"! !\\\\n\\\\n\\\\n!MethodWithInterface methodsFor: 'updating' stamp: 'sw 3/28/2001 16:26'!\\\\nbringUpToDate\\\\n\\\\t\\\\\\\"Bring all scriptors related to this method up to date.  Note that this will not change the senders of this method if the selector changed -- that's something still ahead.\\\\\\\"\\\\n\\\\n\\\\t(ScriptEditorMorph allInstances select:\\\\n\\\\t\\\\t[:m | (m playerScripted isMemberOf: self playerClass) and: [m scriptName == selector]])\\\\n\\\\t\\\\t\\\\tdo:\\\\n\\\\t\\\\t\\\\t\\\\t[:m | m bringUpToDate]! !\\\\n\\\\n!MethodWithInterface methodsFor: 'updating' stamp: 'sw 2/20/2001 03:43'!\\\\nrevertToLastSavedTileVersionFor: anEditor\\\\n\\\\t\\\\\\\"revert to the last saved tile version.  Only for universal tiles.\\\\\\\"\\\\n\\\\n\\\\tanEditor removeAllButFirstSubmorph.\\\\n\\\\tanEditor insertUniversalTiles.\\\\n\\\\tanEditor showingMethodPane: false! !\\\\n\\\\n!MethodWithInterface methodsFor: 'updating' stamp: 'sw 2/20/2001 03:41'!\\\\nsaveScriptVersion: timeStamp\\\\n\\\\t\\\\\\\"Save the tile script version if I do that sort of thing\\\\\\\"! !\\\\nAlignmentMorph subclass: #MidiInputMorph\\\\n\\\\tinstanceVariableNames: 'midiPortNumber midiSynth instrumentSelector'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Sound-Scores'!\\\\n!MidiInputMorph commentStamp: '<historical>' prior: 0!\\\\nI am the user interface for a simple software MIDI synthesizer that is driven by external MIDI input. I come with controls for a single MIDI channel (channel 1), but allow channel controls for additional MIDI channels to be added by the user. The volume, pan, and instrument of each channel can be controlled independently.\\\\n!\\\\n\\\\n\\\\n!MidiInputMorph methodsFor: 'as yet unclassified' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\naddChannel\\\\n\\\\t\\\\\\\"Add a set of controls for another channel. Prompt the user for the channel number.\\\\\\\"\\\\n\\\\n\\\\t| menu existingChannels newChannel |\\\\n\\\\tmenu := CustomMenu new.\\\\n\\\\texistingChannels := Set new.\\\\n\\\\t1 to: 16 do: [:ch | (instrumentSelector at: ch) ifNotNil: [existingChannels add: ch]].\\\\n\\\\t1 to: 16 do: [:ch |\\\\n\\\\t\\\\t(existingChannels includes: ch) ifFalse: [\\\\n\\\\t\\\\t\\\\tmenu add: ch printString action: ch]].\\\\n\\\\tnewChannel := menu startUp.\\\\n\\\\tnewChannel ifNotNil: [self addChannelControlsFor: newChannel].\\\\n! !\\\\n\\\\n!MidiInputMorph methodsFor: 'as yet unclassified' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\naddChannelControlsFor: channelIndex\\\\n\\\\n\\\\t| r divider col |\\\\n\\\\tr := self makeRow\\\\n\\\\t\\\\thResizing: #shrinkWrap;\\\\n\\\\t\\\\tvResizing: #shrinkWrap.\\\\n\\\\tr addMorphBack: (self channelNumAndMuteButtonFor: channelIndex).\\\\n\\\\tr addMorphBack: (Morph new extent: 10@5; color: color).  \\\\\\\"spacer\\\\\\\"\\\\n\\\\tr addMorphBack: (self panAndVolControlsFor: channelIndex).\\\\n\\\\n\\\\tdivider := AlignmentMorph new\\\\n\\\\t\\\\textent: 10@1;\\\\n\\\\t\\\\tborderWidth: 1;\\\\n\\\\t\\\\tlayoutInset: 0;\\\\n\\\\t\\\\tborderColor: #raised;\\\\n\\\\t\\\\tcolor: color;\\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tvResizing: #rigid.\\\\n\\\\n\\\\tcol := self lastSubmorph.\\\\n\\\\tcol addMorphBack: divider.\\\\n\\\\tcol addMorphBack: r.\\\\n! !\\\\n\\\\n!MidiInputMorph methodsFor: 'as yet unclassified' stamp: 'gm 2/28/2003 00:00'!\\\\natChannel: channelIndex from: aPopUpChoice selectInstrument: selection \\\\n\\\\t| oldSnd name snd instSelector |\\\\n\\\\toldSnd := midiSynth instrumentForChannel: channelIndex.\\\\n\\\\t(selection beginsWith: 'edit ') \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[name := selection copyFrom: 6 to: selection size.\\\\n\\\\t\\\\t\\\\taPopUpChoice contentsClipped: name.\\\\n\\\\t\\\\t\\\\t(oldSnd isKindOf: FMSound) | (oldSnd isKindOf: LoopedSampledSound) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [EnvelopeEditorMorph openOn: oldSnd title: name].\\\\n\\\\t\\\\t\\\\t(oldSnd isKindOf: SampledInstrument) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [EnvelopeEditorMorph openOn: oldSnd allNotes first title: name].\\\\n\\\\t\\\\t\\\\t^self].\\\\n\\\\tsnd := nil.\\\\n\\\\t1 to: instrumentSelector size\\\\n\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t[:i | \\\\n\\\\t\\\\t\\\\t(channelIndex ~= i and: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[(instSelector := instrumentSelector at: i) notNil \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tand: [selection = instSelector contents]]) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [snd := midiSynth instrumentForChannel: i]].\\\\t\\\\\\\"use existing instrument prototype\\\\\\\"\\\\n\\\\tsnd ifNil: \\\\n\\\\t\\\\t\\\\t[snd := (selection = 'clink' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[(SampledSound samples: SampledSound coffeeCupClink samplingRate: 11025)]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [(AbstractSound soundNamed: selection) ])copy ].\\\\n\\\\tmidiSynth instrumentForChannel: channelIndex put: snd.\\\\n\\\\t(instrumentSelector at: channelIndex) contentsClipped: selection! !\\\\n\\\\n!MidiInputMorph methodsFor: 'as yet unclassified' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nchannelNumAndMuteButtonFor: channelIndex\\\\n\\\\n\\\\t| muteButton instSelector r |\\\\n\\\\tmuteButton := SimpleSwitchMorph new\\\\n\\\\t\\\\tonColor: (Color r: 1.0 g: 0.6 b: 0.6);\\\\n\\\\t\\\\toffColor: color;\\\\n\\\\t\\\\tcolor: color;\\\\n\\\\t\\\\tlabel: 'Mute';\\\\n\\\\t\\\\ttarget: midiSynth;\\\\n\\\\t\\\\tactionSelector: #mutedForChannel:put:;\\\\n\\\\t\\\\targuments: (Array with: channelIndex).\\\\n\\\\tinstSelector := PopUpChoiceMorph new\\\\n\\\\t\\\\textent: 95@14;\\\\n\\\\t\\\\tcontentsClipped: 'oboe1';\\\\n\\\\t\\\\ttarget: self;\\\\n\\\\t\\\\tactionSelector: #atChannel:from:selectInstrument:;\\\\n\\\\t\\\\tgetItemsSelector: #instrumentChoicesForChannel:;\\\\n\\\\t\\\\tgetItemsArgs: (Array with: channelIndex).\\\\n\\\\tinstSelector arguments:\\\\n\\\\t\\\\t(Array with: channelIndex with: instSelector).\\\\n\\\\tinstrumentSelector at: channelIndex put: instSelector.\\\\n\\\\n\\\\tr := self makeRow\\\\n\\\\t\\\\thResizing: #rigid;\\\\n\\\\t\\\\tvResizing: #spaceFill;\\\\n\\\\t\\\\textent: 70@10.\\\\n\\\\tr addMorphBack:\\\\n\\\\t\\\\t(StringMorph\\\\n\\\\t\\\\t\\\\tcontents: channelIndex printString\\\\n\\\\t\\\\t\\\\tfont: (TextStyle default fontOfSize: 24)).\\\\n\\\\tchannelIndex < 10\\\\n\\\\t\\\\tifTrue: [r addMorphBack: (Morph new color: color; extent: 19@8)]  \\\\\\\"spacer\\\\\\\"\\\\n\\\\t\\\\tifFalse: [r addMorphBack: (Morph new color: color; extent: 8@8)].  \\\\\\\"spacer\\\\\\\"\\\\n\\\\tr addMorphBack: instSelector.\\\\n\\\\tr addMorphBack: (AlignmentMorph newRow color: color).  \\\\\\\"spacer\\\\\\\"\\\\n\\\\tr addMorphBack: muteButton.\\\\n\\\\t^ r\\\\n! !\\\\n\\\\n!MidiInputMorph methodsFor: 'as yet unclassified' stamp: 'jm 1/13/1999 07:33'!\\\\ncloseMIDIPort\\\\n\\\\n\\\\tmidiSynth isOn ifTrue: [midiSynth stopMIDITracking].\\\\n\\\\tmidiSynth closeMIDIPort.\\\\n! !\\\\n\\\\n!MidiInputMorph methodsFor: 'as yet unclassified' stamp: 'jm 1/6/1999 07:55'!\\\\ndisableReverb: aBoolean\\\\n\\\\n\\\\taBoolean\\\\n\\\\t\\\\tifTrue: [SoundPlayer stopReverb]\\\\n\\\\t\\\\tifFalse: [SoundPlayer startReverb].\\\\n! !\\\\n\\\\n!MidiInputMorph methodsFor: 'as yet unclassified' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ninstrumentChoicesForChannel: channelIndex\\\\n\\\\n\\\\t| names inst |\\\\n\\\\tnames := AbstractSound soundNames asOrderedCollection.\\\\n\\\\tnames := names collect: [:n |\\\\n\\\\t\\\\tinst := AbstractSound soundNamed: n.\\\\n\\\\t\\\\t(inst isKindOf: UnloadedSound)\\\\n\\\\t\\\\t\\\\tifTrue: [n, '(out)']\\\\n\\\\t\\\\t\\\\tifFalse: [n]].\\\\n\\\\tnames add: 'clink'.\\\\n\\\\tnames add: 'edit ', (instrumentSelector at: channelIndex) contents.\\\\n\\\\t^ names asArray\\\\n! !\\\\n\\\\n!MidiInputMorph methodsFor: 'as yet unclassified' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ninvokeMenu\\\\n\\\\t\\\\\\\"Invoke a menu of additonal commands.\\\\\\\"\\\\n\\\\n\\\\t| aMenu |\\\\n\\\\taMenu := CustomMenu new.\\\\n\\\\taMenu add: 'add channel' translated action: #addChannel.\\\\n\\\\taMenu add: 'reload instruments' translated target: AbstractSound selector: #updateScorePlayers.\\\\n\\\\tmidiSynth isOn ifFalse: [\\\\n\\\\t\\\\taMenu add: 'set MIDI port' translated action: #setMIDIPort.\\\\n\\\\t\\\\tmidiSynth midiPort\\\\n\\\\t\\\\t\\\\tifNotNil: [aMenu add: 'close MIDI port' translated action: #closeMIDIPort]].\\\\t\\\\n\\\\taMenu invokeOn: self defaultSelection: nil.\\\\n! !\\\\n\\\\n!MidiInputMorph methodsFor: 'as yet unclassified' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nmakeControls\\\\n\\\\n\\\\t| bb r reverbSwitch onOffSwitch |\\\\n\\\\tbb := SimpleButtonMorph new\\\\n\\\\t\\\\ttarget: self;\\\\n\\\\t\\\\tborderColor: #raised;\\\\n\\\\t\\\\tborderWidth: 2;\\\\n\\\\t\\\\tcolor: color.\\\\n\\\\tr := AlignmentMorph newRow.\\\\n\\\\tr color: bb color; borderWidth: 0; layoutInset: 0.\\\\n\\\\tr hResizing: #shrinkWrap; vResizing: #shrinkWrap; extent: 5@5.\\\\n\\\\tr addMorphBack: (\\\\n\\\\t\\\\tbb label: '<>';\\\\n\\\\t\\\\t\\\\tactWhen: #buttonDown;\\\\n\\\\t\\\\t\\\\tactionSelector: #invokeMenu).\\\\n\\\\tonOffSwitch := SimpleSwitchMorph new\\\\n\\\\t\\\\toffColor: color;\\\\n\\\\t\\\\tonColor: (Color r: 1.0 g: 0.6 b: 0.6);\\\\n\\\\t\\\\tborderWidth: 2;\\\\n\\\\t\\\\tlabel: 'On';\\\\n\\\\t\\\\tactionSelector: #toggleOnOff;\\\\n\\\\t\\\\ttarget: self;\\\\n\\\\t\\\\tsetSwitchState: false.\\\\n\\\\tr addMorphBack: onOffSwitch.\\\\n\\\\treverbSwitch := SimpleSwitchMorph new\\\\n\\\\t\\\\toffColor: color;\\\\n\\\\t\\\\tonColor: (Color r: 1.0 g: 0.6 b: 0.6);\\\\n\\\\t\\\\tborderWidth: 2;\\\\n\\\\t\\\\tlabel: 'Reverb Disable';\\\\n\\\\t\\\\tactionSelector: #disableReverb:;\\\\n\\\\t\\\\ttarget: self;\\\\n\\\\t\\\\tsetSwitchState: SoundPlayer isReverbOn not.\\\\n\\\\tr addMorphBack: reverbSwitch.\\\\n\\\\t^ r\\\\n! !\\\\n\\\\n!MidiInputMorph methodsFor: 'as yet unclassified' stamp: 'ar 11/9/2000 21:19'!\\\\nmakeRow\\\\n\\\\n\\\\t^ AlignmentMorph newRow\\\\n\\\\t\\\\tcolor: color;\\\\n\\\\t\\\\tlayoutInset: 0;\\\\n\\\\t\\\\twrapCentering: #center; cellPositioning: #leftCenter;\\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tvResizing: #shrinkWrap\\\\n! !\\\\n\\\\n!MidiInputMorph methodsFor: 'as yet unclassified' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\npanAndVolControlsFor: channelIndex\\\\n\\\\n\\\\t| volSlider panSlider c r middleLine |\\\\n\\\\tvolSlider := SimpleSliderMorph new\\\\n\\\\t\\\\tcolor: color;\\\\n\\\\t\\\\textent: 101@2;\\\\n\\\\t\\\\ttarget: midiSynth;\\\\n\\\\t\\\\targuments: (Array with: channelIndex);\\\\n\\\\t\\\\tactionSelector: #volumeForChannel:put:;\\\\n\\\\t\\\\tminVal: 0.0;\\\\n\\\\t\\\\tmaxVal: 1.0;\\\\n\\\\t\\\\tadjustToValue: (midiSynth volumeForChannel: channelIndex).\\\\n\\\\tpanSlider := SimpleSliderMorph new\\\\n\\\\t\\\\tcolor: color;\\\\n\\\\t\\\\textent: 101@2;\\\\n\\\\t\\\\ttarget: midiSynth;\\\\n\\\\t\\\\targuments: (Array with: channelIndex);\\\\n\\\\t\\\\tactionSelector: #panForChannel:put:;\\\\n\\\\t\\\\tminVal: 0.0;\\\\n\\\\t\\\\tmaxVal: 1.0;\\\\t\\\\t\\\\n\\\\t\\\\tadjustToValue: (midiSynth panForChannel: channelIndex).\\\\n\\\\tc := AlignmentMorph newColumn\\\\n\\\\t\\\\tcolor: color;\\\\n\\\\t\\\\tlayoutInset: 0;\\\\n\\\\t\\\\twrapCentering: #center; cellPositioning: #topCenter;\\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tvResizing: #shrinkWrap.\\\\n\\\\tmiddleLine := Morph new  \\\\\\\"center indicator for pan slider\\\\\\\"\\\\n\\\\t\\\\tcolor: (Color r: 0.4 g: 0.4 b: 0.4);\\\\n\\\\t\\\\textent: 1@(panSlider height - 4);\\\\n\\\\t\\\\tposition: panSlider center x@(panSlider top + 2).\\\\n\\\\tpanSlider addMorphBack: middleLine.\\\\n\\\\tr := self makeRow.\\\\n\\\\tr addMorphBack: (StringMorph contents: '0').\\\\n\\\\tr addMorphBack: volSlider.\\\\n\\\\tr addMorphBack: (StringMorph contents: '10').\\\\n\\\\tc addMorphBack: r.\\\\n\\\\tr := self makeRow.\\\\n\\\\tr addMorphBack: (StringMorph contents: 'L').\\\\n\\\\tr addMorphBack: panSlider.\\\\n\\\\tr addMorphBack: (StringMorph contents: 'R').\\\\n\\\\tc addMorphBack: r.\\\\n\\\\t^ c\\\\n! !\\\\n\\\\n!MidiInputMorph methodsFor: 'as yet unclassified' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nsetMIDIPort\\\\n\\\\n\\\\t| portNum |\\\\n\\\\tportNum := SimpleMIDIPort outputPortNumFromUser.\\\\n\\\\tportNum ifNil: [^ self].\\\\n\\\\tmidiPortNumber := portNum.\\\\n! !\\\\n\\\\n!MidiInputMorph methodsFor: 'as yet unclassified' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ntoggleOnOff\\\\n\\\\n\\\\tmidiSynth isOn\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\tmidiSynth stopMIDITracking]\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\tmidiPortNumber ifNil: [self setMIDIPort].\\\\n\\\\t\\\\t\\\\tmidiPortNumber ifNil: [midiPortNumber := 0].\\\\n\\\\t\\\\t\\\\tmidiSynth midiPort: (SimpleMIDIPort openOnPortNumber: midiPortNumber).\\\\n\\\\t\\\\t\\\\tmidiSynth startMIDITracking].\\\\n! !\\\\n\\\\n!MidiInputMorph methodsFor: 'as yet unclassified' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nupdateInstrumentsFromLibraryExcept: soundsBeingEdited\\\\n\\\\t\\\\\\\"The instrument library has been modified. Update my instruments with the new versions from the library. Use a single instrument prototype for all parts with the same name; this allows the envelope editor to edit all the parts by changing a single sound prototype.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"soundsBeingEdited is a collection of sounds being edited (by an EnvelopeEditor).  If any of my instruments share one of these, then they will be left alone so as not to disturb that dynamic linkage.\\\\\\\"\\\\n\\\\n\\\\t| unloadPostfix myInstruments name displaysAsUnloaded isUnloaded |\\\\n\\\\tunloadPostfix := '(out)'.\\\\n\\\\tmyInstruments := Dictionary new.\\\\n\\\\t1 to: instrumentSelector size do: [:i |\\\\n\\\\t\\\\tname := (instrumentSelector at: i) contents.\\\\n\\\\t\\\\tdisplaysAsUnloaded := name endsWith: unloadPostfix.\\\\n\\\\t\\\\tdisplaysAsUnloaded ifTrue: [\\\\n\\\\t\\\\t\\\\tname := name copyFrom: 1 to: name size - unloadPostfix size].\\\\n\\\\t\\\\t(myInstruments includesKey: name) ifFalse: [\\\\n\\\\t\\\\t\\\\tmyInstruments at: name put:\\\\n\\\\t\\\\t\\\\t\\\\t(name = 'clink'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(SampledSound\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsamples: SampledSound coffeeCupClink\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsamplingRate: 11025) copy]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(AbstractSound\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsoundNamed: name\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifAbsent: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(instrumentSelector at: i) contentsClipped: 'default'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tFMSound default]) copy])].\\\\n\\\\t\\\\t(soundsBeingEdited includes: (midiSynth instrumentForChannel: i)) ifFalse:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"Do not update any instrument that is currently being edited\\\\\\\"\\\\n\\\\t\\\\t\\\\tmidiSynth instrumentForChannel: i put: (myInstruments at: name)].\\\\n\\\\n\\\\t\\\\t\\\\\\\"update loaded/unloaded status in instrumentSelector if necessary\\\\\\\"\\\\n\\\\t\\\\tisUnloaded := (myInstruments at: name) isKindOf: UnloadedSound.\\\\n\\\\t\\\\t(displaysAsUnloaded and: [isUnloaded not])\\\\n\\\\t\\\\t\\\\tifTrue: [(instrumentSelector at: i) contentsClipped: name].\\\\n\\\\t\\\\t(displaysAsUnloaded not and: [isUnloaded])\\\\n\\\\t\\\\t\\\\tifTrue: [(instrumentSelector at: i) contentsClipped: name, unloadPostfix]].\\\\n! !\\\\n\\\\n\\\\n!MidiInputMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:38'!\\\\ndefaultBorderWidth\\\\n\\\\t\\\\\\\"answer the default border width for the receiver\\\\\\\"\\\\n\\\\t^ 2! !\\\\n\\\\n!MidiInputMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:28'!\\\\ndefaultColor\\\\n\\\\t\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color veryLightGray! !\\\\n\\\\n!MidiInputMorph methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ninitialize\\\\n\\\\t\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tself listDirection: #topToBottom;\\\\n\\\\t  wrapCentering: #center;\\\\n\\\\t\\\\t cellPositioning: #topCenter;\\\\n\\\\t  hResizing: #spaceFill;\\\\n\\\\t  vResizing: #spaceFill;\\\\n\\\\t  layoutInset: 3.\\\\n\\\\tmidiPortNumber := nil.\\\\n\\\\tmidiSynth := MIDISynth new.\\\\n\\\\tinstrumentSelector := Array new: 16.\\\\n\\\\tself removeAllMorphs.\\\\n\\\\tself addMorphBack: self makeControls.\\\\n\\\\tself addMorphBack: (AlignmentMorph newColumn color: color;\\\\n\\\\t\\\\t\\\\t layoutInset: 0).\\\\n\\\\tself addChannelControlsFor: 1.\\\\n\\\\tself extent: 20 @ 20! !\\\\nObject subclass: #MidiPrimTester\\\\n\\\\tinstanceVariableNames: 'port'\\\\n\\\\tclassVariableNames: 'CanSetClock CanUseSemaphore ClockTicksPerSec EchoOn EventsAvailable FlushDriver HasBuffer HasDurs HasInputClock Installed UseControllerCache Version'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Serial Port'!\\\\n!MidiPrimTester commentStamp: '<historical>' prior: 0!\\\\nThis class simply demonstrates and tests the MIDI primitives. MIDI applications should use Stephen Pope's MIDIPort class, which will replace this one.\\\\n\\\\nThe Macintosh, and perhaps some other platforms, can send and receive MIDI data over a serial port by using an external clock signal supplied by an external MIDI adapter to generate the correct MIDI baud rate. Typical clock speeds of such adapters are 1, 2, or 0.5 MHz. This clock speed can be specified when a MIDI port is opened. On other platforms, this clock speed parameter is ignored.\\\\n!\\\\n\\\\n\\\\n!MidiPrimTester methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimMIDIClosePort: portNum\\\\n\\\\n\\\\t<primitive: 'primitiveMIDIClosePort' module: 'MIDIPlugin'>\\\\n\\\\tself primitiveFailed.\\\\n! !\\\\n\\\\n!MidiPrimTester methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimMIDIGetClock\\\\n\\\\n\\\\t<primitive: 'primitiveMIDIGetClock' module: 'MIDIPlugin'>\\\\n\\\\tself primitiveFailed.\\\\n! !\\\\n\\\\n!MidiPrimTester methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimMIDIGetPortCount\\\\n\\\\n\\\\t<primitive: 'primitiveMIDIGetPortCount' module: 'MIDIPlugin'>\\\\n\\\\tself primitiveFailed.\\\\n! !\\\\n\\\\n!MidiPrimTester methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimMIDIGetPortDirectionality: portNum\\\\n\\\\n\\\\t<primitive: 'primitiveMIDIGetPortDirectionality' module: 'MIDIPlugin'>\\\\n\\\\tself primitiveFailed.\\\\n! !\\\\n\\\\n!MidiPrimTester methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimMIDIGetPortName: portNum\\\\n\\\\n\\\\t<primitive: 'primitiveMIDIGetPortName' module: 'MIDIPlugin'>\\\\n\\\\tself primitiveFailed.\\\\n! !\\\\n\\\\n!MidiPrimTester methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimMIDIOpenPort: portNum readSemaIndex: readSemaIndex interfaceClockRate: interfaceClockRate\\\\n\\\\t\\\\\\\"Open the given MIDI port. If non-zero, readSemaIndex specifies the index in the external objects array of a semaphore to be signalled when incoming MIDI data is available. Not all platforms support signalling the read semaphore. InterfaceClockRate specifies the clock rate of the external MIDI interface adaptor on Macintosh computers; it is ignored on other platforms.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveMIDIOpenPort' module: 'MIDIPlugin'>\\\\n\\\\tself primitiveFailed.\\\\n! !\\\\n\\\\n!MidiPrimTester methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimMIDIParameterGet: whichParameter\\\\n\\\\n\\\\t<primitive: 'primitiveMIDIParameterGetOrSet' module: 'MIDIPlugin'>\\\\n\\\\tself primitiveFailed.\\\\n! !\\\\n\\\\n!MidiPrimTester methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimMIDIParameterSet: whichParameter to: newValue\\\\n\\\\n\\\\t<primitive: 'primitiveMIDIParameterGetOrSet' module: 'MIDIPlugin'>\\\\n\\\\tself primitiveFailed.\\\\n! !\\\\n\\\\n!MidiPrimTester methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimMIDIReadPort: portNum into: byteArray\\\\n\\\\n\\\\t<primitive: 'primitiveMIDIRead' module: 'MIDIPlugin'>\\\\n\\\\tself primitiveFailed.\\\\n! !\\\\n\\\\n!MidiPrimTester methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimMIDIWritePort: portNum from: byteArray at: midiClockValue\\\\n\\\\n\\\\t<primitive: 'primitiveMIDIWrite' module: 'MIDIPlugin'>\\\\n\\\\tself primitiveFailed.\\\\n! !\\\\n\\\\n\\\\n!MidiPrimTester methodsFor: 'tests' stamp: 'jm 5/18/1998 10:30'!\\\\ngetDriverParameters\\\\n\\\\t\\\\\\\"Return a string that describes this platform's MIDI parameters.\\\\\\\"\\\\n\\\\t\\\\\\\"MidiPrimTester new getDriverParameters\\\\\\\"\\\\n\\\\n\\\\t| s parameterNames v |\\\\n\\\\tparameterNames _ #(Installed Version HasBuffer HasDurs CanSetClock CanUseSemaphore EchoOn UseControllerCache EventsAvailable FlushDriver ClockTicksPerSec HasInputClock).\\\\n\\\\n\\\\ts _ WriteStream on: String new.\\\\n\\\\ts cr.\\\\n\\\\t1 to: parameterNames size do: [:i |\\\\n\\\\t\\\\tv _ self primMIDIParameterGet: i.\\\\n\\\\t\\\\ts nextPutAll: (parameterNames at: i).\\\\n\\\\t\\\\ts nextPutAll: ' = '.\\\\n\\\\t\\\\ts print: v; cr].\\\\n\\\\n\\\\ts nextPutAll: 'MIDI Echoing is '.\\\\n\\\\t(self canTurnOnParameter: EchoOn)\\\\n\\\\t\\\\tifTrue: [s nextPutAll: 'supported.'; cr]\\\\n\\\\t\\\\tifFalse: [s nextPutAll: 'not supported.'; cr].\\\\n\\\\n\\\\ts nextPutAll: 'Controller Caching is '.\\\\n\\\\t(self canTurnOnParameter: UseControllerCache)\\\\n\\\\t\\\\tifTrue: [s nextPutAll: 'supported.'; cr]\\\\n\\\\t\\\\tifFalse: [s nextPutAll: 'not supported.'; cr].\\\\n\\\\n\\\\t^ s contents\\\\n! !\\\\n\\\\n!MidiPrimTester methodsFor: 'tests' stamp: 'jm 5/18/1998 15:33'!\\\\ngetInputForSeconds: seconds onPort: portNum\\\\n\\\\t\\\\\\\"Collect MIDI input from the given port for the given number of seconds, and answer a string describing the data read.\\\\\\\"\\\\n\\\\t\\\\\\\"MidiPrimTester new getInputForSeconds: 5 onPort: 0\\\\\\\"\\\\n\\\\n\\\\t| buf bufList endTime n midiStartTime s t |\\\\n\\\\t\\\\\\\"collect the data\\\\\\\"\\\\n\\\\tself openPort: portNum andDo: [\\\\n\\\\t\\\\tbuf _ ByteArray new: 1000.\\\\n\\\\t\\\\tbufList _ OrderedCollection new.\\\\n\\\\t\\\\tmidiStartTime _ self primMIDIGetClock.\\\\n\\\\t\\\\tendTime _ Time millisecondClockValue + (seconds * 1000).\\\\n\\\\t\\\\t[Time millisecondClockValue < endTime] whileTrue: [\\\\n\\\\t\\\\t\\\\tn _ self primMIDIReadPort: portNum into: buf.\\\\n\\\\t\\\\t\\\\tn > 0 ifTrue: [bufList add: (buf copyFrom: 1 to: n)].\\\\n\\\\t\\\\t\\\\t(Delay forMilliseconds: 5) wait]].\\\\n\\\\n\\\\t\\\\\\\"format the data into a string\\\\\\\"\\\\n\\\\ts _ WriteStream on: String new.\\\\n\\\\ts cr.\\\\n\\\\tbufList do: [:b |\\\\n\\\\t\\\\tt _ (self bufferTimeStampFrom: b) - midiStartTime.\\\\n\\\\t\\\\ts print: t.\\\\n\\\\t\\\\ts nextPutAll: ': '.\\\\n\\\\t\\\\t5 to: b size do: [:i | s print: (b at: i); space].\\\\n\\\\t\\\\ts cr].\\\\n\\\\t^ s contents\\\\n! !\\\\n\\\\n!MidiPrimTester methodsFor: 'tests' stamp: 'jm 5/18/1998 10:05'!\\\\ngetPortList\\\\n\\\\t\\\\\\\"Return a string that describes this platform's MIDI ports.\\\\\\\"\\\\n\\\\t\\\\\\\"MidiPrimTester new getPortList\\\\\\\"\\\\n\\\\n\\\\t| s portCount dir directionString |\\\\n\\\\ts _ WriteStream on: String new.\\\\n\\\\ts cr; nextPutAll: 'MIDI Ports:'; cr.\\\\n\\\\tportCount _ self primMIDIGetPortCount.\\\\n\\\\t0 to: portCount - 1 do: [:i |\\\\n\\\\t\\\\ts tab.\\\\n\\\\t\\\\ts print: i; nextPutAll: ': '. \\\\n\\\\t\\\\ts nextPutAll: (self primMIDIGetPortName: i).\\\\n\\\\t\\\\tdir _ self primMIDIGetPortDirectionality: i.\\\\n\\\\t\\\\tdirectionString _ dir printString.  \\\\\\\"default\\\\\\\"\\\\n\\\\t\\\\tdir = 1 ifTrue: [directionString _ '(in)'].\\\\n\\\\t\\\\tdir = 2 ifTrue: [directionString _ '(out)'].\\\\n\\\\t\\\\tdir = 3 ifTrue: [directionString _ '(in/out)'].\\\\n\\\\t\\\\ts space; nextPutAll: directionString; cr].\\\\n\\\\t^ s contents\\\\n! !\\\\n\\\\n!MidiPrimTester methodsFor: 'tests' stamp: 'jm 5/18/1998 11:24'!\\\\nplayDrumRoll: mSecsBetweenNotes count: tapCount onPort: portNum\\\\n\\\\t\\\\\\\"MidiPrimTester new playDrumRoll: 75 count: 64 onPort: 0\\\\\\\"\\\\n\\\\t\\\\\\\"Play middle-C tapCount times with the given space between notes. This example works best with a short percussive voice, like a drum.\\\\\\\"\\\\n\\\\t\\\\\\\"Details: This test can be used to investigate the real-time performance of your system. On a 110 MHz PowerPC Mac, this method can genererate very fast and smooth drum rolls up to about 100 beats/sec (10 mSecs between notes). However, many factors can prevent one from seeing this level of performance including a slow CPU, lack of a level-2 cache, networking or other background processes stealing chunks of processor time from Squeak, or a sluggish MIDI synthesizer.\\\\\\\"\\\\n\\\\t\\\\\\\"Details: By default, this method does an incremental GC on every note. While not really needed for this example, it illustrates a useful technique for real-time processing in Squeak: do an incremental GC when you know you have a few milliseconds of idle time to avoid triggering one during a time-critical task. In this case, we're also using the GC time to provide a small delay between the note-on and note-off events. If the GC time is too short, as it could be on a fast machine, the note may not sound at all unless you add a few milliseconds of additional delay!!\\\\\\\"\\\\n\\\\t\\\\\\\"Note: This example works best if the VM's millisecond clock has 1 millisecond resolution.\\\\\\\"\\\\n\\\\n\\\\t| gcDuringNote noteOn noteOff endTime waitTime |\\\\n\\\\tgcDuringNote _ true.\\\\n\\\\t\\\\\\\"these events use running status, so the command byte is omitted\\\\\\\"\\\\n\\\\tnoteOn _ #(60 100) as: ByteArray.\\\\n\\\\tnoteOff _ #(60 0) as: ByteArray.\\\\n\\\\tself primMIDIOpenPort: portNum readSemaIndex: 0 interfaceClockRate: 1000000.\\\\n\\\\n\\\\t\\\\\\\"send an initial event with command byte to initiate running status\\\\\\\"\\\\n\\\\tself primMIDIWritePort: portNum from: (#(144 60 0) as: ByteArray) at: 0.\\\\n\\\\n\\\\t1 to: tapCount do: [:i |\\\\n\\\\t\\\\tendTime _ Time millisecondClockValue + mSecsBetweenNotes.\\\\n\\\\t\\\\tself primMIDIWritePort: portNum from: noteOn at: 0.\\\\n\\\\t\\\\tgcDuringNote\\\\n\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"do quick GC; takes a few milliseconds and provides the note-down time\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"Note: if GC is too fast on your machine, you need to add a few mSecs delay!!\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tSmalltalk garbageCollectMost]\\\\n\\\\t\\\\t\\\\tifFalse: [(Delay forMilliseconds: 3) wait].\\\\n\\\\n\\\\t\\\\tself primMIDIWritePort: portNum from: noteOff at: 0.\\\\n\\\\t\\\\twaitTime _ endTime - Time millisecondClockValue.\\\\n\\\\t\\\\twaitTime > 0 ifTrue: [(Delay forMilliseconds: waitTime) wait]].\\\\n\\\\n\\\\tself primMIDIClosePort: portNum.\\\\n! !\\\\n\\\\n!MidiPrimTester methodsFor: 'tests' stamp: 'jm 5/18/1998 15:16'!\\\\nplayNoteOnPort: portNum\\\\n\\\\t\\\\\\\"MidiPrimTester new playNoteOnPort: 0\\\\\\\"\\\\n\\\\n\\\\t| noteOn noteOff bytesWritten |\\\\n\\\\tnoteOn _ #(144 60 100) as: ByteArray.\\\\n\\\\tnoteOff _ #(144 60 0) as: ByteArray.\\\\n\\\\tself openPort: portNum andDo: [\\\\n\\\\t\\\\tbytesWritten _ self primMIDIWritePort: portNum from: noteOn at: 0.\\\\n\\\\t\\\\t(Delay forMilliseconds: 500) wait.\\\\n\\\\t\\\\tbytesWritten _ bytesWritten + (self primMIDIWritePort: portNum from: noteOff at: 0)].\\\\n\\\\n\\\\tbytesWritten = 6 ifFalse: [self error: 'not all bytes were sent'].\\\\n! !\\\\n\\\\n!MidiPrimTester methodsFor: 'tests' stamp: 'jm 5/18/1998 15:17'!\\\\nplayScale: mSecsPerNote onPort: portNum\\\\n\\\\t\\\\\\\"MidiPrimTester new playScale: 130 onPort: 0\\\\\\\"\\\\n\\\\n\\\\t| noteOn noteOff |\\\\n\\\\tnoteOn _ #(144 0 100) as: ByteArray.\\\\n\\\\tnoteOff _ #(144 0 0) as: ByteArray.\\\\n\\\\tself openPort: portNum andDo: [\\\\n\\\\t\\\\t#(60 62 64 65 67 69 71 72 74 72 71 69 67 65 64 62 60) do: [:midiKey | \\\\n\\\\t\\\\t\\\\tnoteOn at: 2 put: midiKey.\\\\n\\\\t\\\\t\\\\tnoteOff at: 2 put: midiKey.\\\\n\\\\t\\\\t\\\\tself primMIDIWritePort: portNum from: noteOn at: 0.\\\\n\\\\t\\\\t\\\\t(Delay forMilliseconds: mSecsPerNote - 10) wait.\\\\n\\\\t\\\\t\\\\tself primMIDIWritePort: portNum from: noteOff at: 0.\\\\n\\\\t\\\\t\\\\t(Delay forMilliseconds: 10) wait]].\\\\n! !\\\\n\\\\n\\\\n!MidiPrimTester methodsFor: 'private' stamp: 'jm 5/18/1998 12:48'!\\\\nbufferTimeStampFrom: aByteArray\\\\n\\\\t\\\\\\\"Return the timestamp from the given MIDI input buffer. Assume the given buffer is at least 4 bytes long.\\\\\\\"\\\\n\\\\n\\\\t^ ((aByteArray at: 1) bitShift: 24) +\\\\n\\\\t  ((aByteArray at: 2) bitShift: 16) +\\\\n\\\\t  ((aByteArray at: 3) bitShift: 8) +\\\\n\\\\t   (aByteArray at: 4)\\\\n! !\\\\n\\\\n!MidiPrimTester methodsFor: 'private' stamp: 'jm 5/18/1998 12:48'!\\\\ncanTurnOnParameter: whichParameter\\\\n\\\\t\\\\\\\"Return true if the given MIDI parameter can be turned on. Leave the parameter in its orginal state.\\\\\\\"\\\\n\\\\n\\\\t| old canSet |\\\\n\\\\told _ self primMIDIParameterGet: whichParameter.\\\\n\\\\tself primMIDIParameterSet: whichParameter to: 1.\\\\n\\\\tcanSet _ (self primMIDIParameterGet: whichParameter) = 1.\\\\n\\\\tself primMIDIParameterSet: whichParameter to: old.\\\\n\\\\t^ canSet\\\\n! !\\\\n\\\\n!MidiPrimTester methodsFor: 'private' stamp: 'jm 5/18/1998 15:32'!\\\\nopenPort: portNum andDo: aBlock\\\\n\\\\t\\\\\\\"Open the given MIDI port, evaluate the block, and close the port again. Answer the value of the block.\\\\\\\"\\\\n\\\\n\\\\t| result |\\\\n\\\\tself primMIDIClosePort: portNum.\\\\n\\\\tself primMIDIOpenPort: portNum readSemaIndex: 0 interfaceClockRate: 1000000.\\\\n\\\\tresult _ aBlock value.\\\\n\\\\tself primMIDIClosePort: portNum.\\\\n\\\\t^ result\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMidiPrimTester class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MidiPrimTester class methodsFor: 'class initialization' stamp: 'yo 12/3/2004 17:05'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Initialize the MIDI parameter constants.\\\\\\\"\\\\n\\\\t\\\\\\\"MidiPrimTester initialize\\\\\\\"\\\\n\\\\n\\\\tInstalled _ 1.\\\\n\\\\t\\\\t\\\\\\\"Read-only. Return 1 if a MIDI driver is installed, 0 if not.\\\\n\\\\t\\\\t On OMS-based MIDI drivers, this returns 1 only if the OMS\\\\n\\\\t\\\\t system is properly installed and configured.\\\\\\\"\\\\n\\\\n\\\\tVersion _ 2.\\\\n\\\\t\\\\t\\\\\\\"Read-only. Return the integer version number of this MIDI driver.\\\\n\\\\t\\\\t The version numbering sequence is relative to a particular driver.\\\\n\\\\t\\\\t That is, version 3 of the Macintosh MIDI driver is not necessarily\\\\n\\\\t\\\\t related to version 3 of the Win95 MIDI driver.\\\\\\\"\\\\n\\\\n\\\\tHasBuffer _ 3.\\\\n\\\\t\\\\t\\\\\\\"Read-only. Return 1 if this MIDI driver has a time-stamped output\\\\n\\\\t\\\\t buffer, 0 otherwise. Such a buffer allows the client to schedule\\\\n\\\\t\\\\t MIDI output packets to be sent later. This can allow more precise\\\\n\\\\t\\\\t timing, since the driver uses timer interrupts to send the data\\\\n\\\\t\\\\t at the right time even if the processor is in the midst of a\\\\n\\\\t\\\\t long-running Squeak primitive or is running some other application\\\\n\\\\t\\\\t or system task.\\\\\\\"\\\\n\\\\n\\\\tHasDurs _ 4.\\\\n\\\\t\\\\t\\\\\\\"Read-only. Return 1 if this MIDI driver supports an extended\\\\n\\\\t\\\\t primitive for note-playing that includes the note duration and\\\\n\\\\t\\\\t schedules both the note-on and the note-off messages in the\\\\n\\\\t\\\\t driver. Otherwise, return 0.\\\\\\\"\\\\n\\\\n\\\\tCanSetClock _ 5.\\\\n\\\\t\\\\t\\\\\\\"Read-only. Return 1 if this MIDI driver's clock can be set\\\\n\\\\t\\\\t via an extended primitive, 0 if not.\\\\\\\"\\\\n\\\\n\\\\tCanUseSemaphore _ 6.\\\\n\\\\t\\\\t\\\\\\\"Read-only. Return 1 if this MIDI driver can signal a semaphore\\\\n\\\\t\\\\t when MIDI input arrives. Otherwise, return 0. If this driver\\\\n\\\\t\\\\t supports controller caching and it is enabled, then incoming\\\\n\\\\t\\\\t controller messages will not signal the semaphore.\\\\\\\"\\\\n\\\\n\\\\tEchoOn _ 7.\\\\n\\\\t\\\\t\\\\\\\"Read-write. If this flag is set to a non-zero value, and if\\\\n\\\\t\\\\t the driver supports echoing, then incoming MIDI events will\\\\n\\\\t\\\\t be echoed immediately. If this driver does not support echoing,\\\\n\\\\t\\\\t then queries of this parameter will always return 0 and\\\\n\\\\t\\\\t attempts to change its value will do nothing.\\\\\\\"\\\\n\\\\n\\\\tUseControllerCache _ 8.\\\\n\\\\t\\\\t\\\\\\\"Read-write. If this flag is set to a non-zero value, and if\\\\n\\\\t\\\\t the driver supports a controller cache, then the driver will\\\\n\\\\t\\\\t maintain a cache of the latest value seen for each MIDI controller,\\\\n\\\\t\\\\t and control update messages will be filtered out of the incoming\\\\n\\\\t\\\\t MIDI stream. An extended MIDI primitive allows the client to\\\\n\\\\t\\\\t poll the driver for the current value of each controller. If\\\\n\\\\t\\\\t this driver does not support a controller cache, then queries\\\\n\\\\t\\\\t of this parameter will always return 0 and attempts to change\\\\n\\\\t\\\\t its value will do nothing.\\\\\\\"\\\\n\\\\n\\\\tEventsAvailable _ 9.\\\\n\\\\t\\\\t\\\\\\\"Read-only. Return the number of MIDI packets in the input queue.\\\\\\\"\\\\n\\\\n\\\\tFlushDriver _ 10.\\\\n\\\\t\\\\t\\\\\\\"Write-only. Setting this parameter to any value forces the driver\\\\n\\\\t\\\\t to flush its I/0 buffer, discarding all unprocessed data. Reading\\\\n\\\\t\\\\t this parameter returns 0. Setting this parameter will do nothing\\\\n\\\\t\\\\t if the driver does not support buffer flushing.\\\\\\\"\\\\n\\\\n\\\\tClockTicksPerSec _ 11.\\\\n\\\\t\\\\t\\\\\\\"Read-only. Return the MIDI clock rate in ticks per second.\\\\\\\"\\\\n\\\\n\\\\tHasInputClock _ 12.\\\\n\\\\t\\\\t\\\\\\\"Read-only. Return 1 if this MIDI driver timestamps incoming\\\\n\\\\t\\\\t MIDI data with the current value of the MIDI clock, 0 otherwise.\\\\n\\\\t\\\\t If the driver does not support such timestamping, then the\\\\n\\\\t\\\\t client must read input data frequently and provide its own\\\\n\\\\t\\\\t timestamping.\\\\\\\"\\\\n! !\\\\nObject subclass: #MimeConverter\\\\n\\\\tinstanceVariableNames: 'dataStream mimeStream'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Collections-Streams'!\\\\n\\\\n!MimeConverter methodsFor: 'accessing' stamp: 'tk 12/9/97 13:55'!\\\\ndataStream\\\\n\\\\t^dataStream! !\\\\n\\\\n!MimeConverter methodsFor: 'accessing' stamp: 'tk 12/9/97 13:51'!\\\\ndataStream: anObject\\\\n\\\\tdataStream _ anObject! !\\\\n\\\\n!MimeConverter methodsFor: 'accessing' stamp: 'tk 12/9/97 13:53'!\\\\nmimeStream\\\\n\\\\t^mimeStream! !\\\\n\\\\n!MimeConverter methodsFor: 'accessing' stamp: 'tk 12/9/97 13:51'!\\\\nmimeStream: anObject\\\\n\\\\tmimeStream _ anObject! !\\\\n\\\\n\\\\n!MimeConverter methodsFor: 'conversion' stamp: 'bf 11/12/1998 13:30'!\\\\nmimeDecode\\\\n\\\\t\\\\\\\"Do conversion reading from mimeStream writing to dataStream\\\\\\\"\\\\n\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n!MimeConverter methodsFor: 'conversion' stamp: 'bf 11/12/1998 13:31'!\\\\nmimeEncode\\\\n\\\\t\\\\\\\"Do conversion reading from dataStream writing to mimeStream\\\\\\\"\\\\n\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMimeConverter class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MimeConverter class methodsFor: 'convenience' stamp: 'bf 3/10/2000 14:47'!\\\\nforEncoding: encodingString\\\\n\\\\t\\\\\\\"Answer a converter class for the given encoding or nil if unknown\\\\\\\"\\\\n\\\\tencodingString ifNil: [^nil].\\\\n\\\\t^ encodingString asLowercase caseOf: \\\\n\\\\t\\\\t{ ['base64'] -> [Base64MimeConverter].\\\\n\\\\t\\\\t  ['quoted-printable'] -> [QuotedPrintableMimeConverter]}\\\\n\\\\t\\\\totherwise: [].\\\\n! !\\\\n\\\\n!MimeConverter class methodsFor: 'convenience' stamp: 'bf 3/10/2000 14:43'!\\\\nmimeDecode: aStringOrStream as: contentsClass\\\\n\\\\t^ contentsClass streamContents: [:out |\\\\n\\\\t\\\\tself mimeDecode: aStringOrStream to: out]! !\\\\n\\\\n!MimeConverter class methodsFor: 'convenience' stamp: 'bf 3/10/2000 14:40'!\\\\nmimeDecode: aStringOrStream to: outStream\\\\n\\\\tself new\\\\n\\\\t\\\\tmimeStream: (aStringOrStream isStream\\\\n\\\\t\\\\t\\\\tifTrue: [aStringOrStream]\\\\n\\\\t\\\\t\\\\tifFalse: [ReadStream on: aStringOrStream]);\\\\n\\\\t\\\\tdataStream: outStream;\\\\n\\\\t\\\\tmimeDecode! !\\\\n\\\\n!MimeConverter class methodsFor: 'convenience' stamp: 'bf 3/10/2000 14:40'!\\\\nmimeEncode: aCollectionOrStream\\\\n\\\\t^ String streamContents: [:out |\\\\n\\\\t\\\\tself mimeEncode: aCollectionOrStream to: out]! !\\\\n\\\\n!MimeConverter class methodsFor: 'convenience' stamp: 'bf 3/10/2000 14:40'!\\\\nmimeEncode: aCollectionOrStream to: outStream\\\\n\\\\tself new\\\\n\\\\t\\\\tdataStream: (aCollectionOrStream isStream\\\\n\\\\t\\\\t\\\\tifTrue: [aCollectionOrStream]\\\\n\\\\t\\\\t\\\\tifFalse: [ReadStream on: aCollectionOrStream]);\\\\n\\\\t\\\\tmimeStream: outStream;\\\\n\\\\t\\\\tmimeEncode! !\\\\nPolygonMorph subclass: #MixedCurveMorph\\\\n\\\\tinstanceVariableNames: 'slopeClamps'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Basic-NewCurve'!\\\\n!MixedCurveMorph commentStamp: '<historical>' prior: 0!\\\\nA MixedCurveMorph is Curve that can be broken up into separately curved segments. It allows for the creation of matching edges( e. g. for jigsaw puzzle pieces).\\\\n\\\\nInstance Variables\\\\n\\\\tslopeClamps:\\\\t\\\\t<Array>\\\\n\\\\nslopeClamps\\\\n\\\\t- elements of array are either 0 or nil. Indicating whether slope for the corresponding vertex is 0@0 or unknown and therefore to be calculated. There is one element for each vertex.\\\\n\\\\t\\\\n\\\\t\\\\n!\\\\n\\\\n\\\\n!MixedCurveMorph methodsFor: 'access' stamp: 'wiz 2/8/2006 18:59'!\\\\nclamps\\\\n\\\\\\\" Return a collection of clamps the same size as vertices.\\\\n\\\\tIf necessary default to unclamped slopes.\\\\n\\\\\\\"\\\\n\\\\nslopeClamps \\\\n\\\\tifNil:   [ ^ slopeClamps := Array new: vertices size  ] .\\\\nslopeClamps size = vertices size\\\\n\\\\tifFalse: [ ^ slopeClamps := Array new: vertices size  ] . \\\\n\\\\t^ slopeClamps           ! !\\\\n\\\\n!MixedCurveMorph methodsFor: 'access' stamp: 'wiz 2/8/2006 17:44'!\\\\nhandleColorAt: vertIndex\\\\n      \\\\\\\" clamped handles are cyan     and \\\\n\\\\tunclamped handles are yellow.\\\\\\\"\\\\n\\\\n(self clamps at: vertIndex ) ifNil: [ ^ Color yellow ] .\\\\n^ Color cyan \\\\n! !\\\\n\\\\n\\\\n!MixedCurveMorph methodsFor: 'editing' stamp: 'wiz 2/8/2006 17:50'!\\\\nclickVertex: ix event: evt fromHandle: handle\\\\n\\\\\\\" Toggle the state of the clamp. \\\\\\\"\\\\n\\\\\\\"Note: self clamps assures slopeClamps will be same size as vertices\\\\\\\"\\\\n\\\\n(self clamps at: ix) \\\\n\\\\tifNil:\\\\t [ slopeClamps  at: ix put: 0 ]\\\\n\\\\tifNotNil: [ slopeClamps  at: ix put: nil ] .\\\\n\\\\tself setVertices: vertices .\\\\n\\\\t\\\\n! !\\\\n\\\\n!MixedCurveMorph methodsFor: 'editing' stamp: 'wiz 2/8/2006 18:01'!\\\\ndeleteVertexAt: anIndex\\\\n\\\\t\\\\t\\\\t(slopeClamps :=\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tslopeClamps\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcopyReplaceFrom: anIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tto: anIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twith: Array new) .\\\\n\\\\t\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\t\\\\tsetVertices: (vertices\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcopyReplaceFrom: anIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tto: anIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twith: Array new).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t! !\\\\n\\\\n!MixedCurveMorph methodsFor: 'editing' stamp: 'wiz 2/8/2006 18:29'!\\\\ninsertVertexAt: anIndex put: aValue\\\\n\\\\t\\\\\\\"New vertexs are unclamped.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: order is important. \\\\n\\\\tThe clamps array must match vertex size before setVertices: is performed.\\\\\\\"\\\\n\\\\tslopeClamps := slopeClamps \\\\n\\\\t\\\\tcopyReplaceFrom: anIndex + 1 to: anIndex with: (Array with: nil).\\\\n\\\\tself setVertices: (vertices copyReplaceFrom: anIndex + 1 to: anIndex \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twith: (Array with: aValue)).! !\\\\n\\\\n\\\\n!MixedCurveMorph methodsFor: 'initialization' stamp: 'wiz 2/12/2006 05:59'!\\\\ninitialize\\\\n\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\tself extent: 32@20 .\\\\n\\\\n\\\\tself rectOval.\\\\n\\\\tself clamps . \\\\\\\"This initializes slopeClamps.\\\\\\\"\\\\n\\\\tslopeClamps at: 1 put: 0 .\\\\n\\\\tslopeClamps at: 4 put: 0 .\\\\n\\\\t\\\\n\\\\tclosed _ true.\\\\n\\\\tsmoothCurve _ true.\\\\n\\\\tarrows _ #none.\\\\n\\\\tself computeBounds! !\\\\n\\\\n\\\\n!MixedCurveMorph methodsFor: 'smoothing' stamp: 'wiz 2/18/2006 12:53'!\\\\nslopes: knots \\\\n\\\\t\\\\\\\"Choose slopes according to state of polygon and preferences\\\\\\\"\\\\n\\\\tself isCurvy\\\\n\\\\t\\\\tifFalse: [^ knots segmentedSlopes].\\\\n\\\\t^ (closed\\\\n\\\\t\\\\t\\\\tand: [self isCurvier])\\\\n\\\\t\\\\tifTrue: [ knots closedCubicSlopes: self clamps ]\\\\n\\\\t\\\\tifFalse: [knots naturalCubicSlopes: self clamps ]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMixedCurveMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MixedCurveMorph class methodsFor: 'as yet unclassified' stamp: 'wiz 2/12/2006 17:12'!\\\\ndescriptionForPartsBin\\\\n\\\\t^ self partName:\\\\t'Mixed'\\\\n\\\\t\\\\tcategories:\\\\t\\\\t#('Graphics' 'Basic')\\\\n\\\\t\\\\tdocumentation:\\\\t'A Curve with optional bends and segments. Shift click to get handles.\\\\n\\\\t\\\\t\\\\tClick handles to change bends. Move handles to move the points.'! !\\\\nAbstractSound subclass: #MixedSound\\\\n\\\\tinstanceVariableNames: 'sounds leftVols rightVols soundDone'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Sound-Synthesis'!\\\\n\\\\n!MixedSound methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nduration\\\\n\\\\t\\\\\\\"Answer the duration of this sound in seconds.\\\\\\\"\\\\n\\\\n\\\\t| dur |\\\\n\\\\tdur := 0.\\\\n\\\\tsounds do: [:snd | dur := dur max: snd duration].\\\\n\\\\t^ dur\\\\n! !\\\\n\\\\n!MixedSound methodsFor: 'accessing' stamp: 'jm 12/16/2001 20:23'!\\\\nisStereo\\\\n\\\\n\\\\t^ true\\\\n! !\\\\n\\\\n!MixedSound methodsFor: 'accessing' stamp: 'jm 2/4/98 13:37'!\\\\nsounds\\\\n\\\\n\\\\t^ sounds\\\\n! !\\\\n\\\\n\\\\n!MixedSound methodsFor: 'composition'!\\\\n+ aSound\\\\n\\\\t\\\\\\\"Return the mix of the receiver and the argument sound.\\\\\\\"\\\\n\\\\n\\\\t^ self add: aSound\\\\n! !\\\\n\\\\n!MixedSound methodsFor: 'composition' stamp: 'jm 1/5/98 13:47'!\\\\nadd: aSound\\\\n\\\\t\\\\\\\"Add the given sound with a pan setting of centered and no attenuation.\\\\\\\"\\\\n\\\\n\\\\tself add: aSound pan: 0.5 volume: 1.0.\\\\n! !\\\\n\\\\n!MixedSound methodsFor: 'composition' stamp: 'jm 1/5/98 13:47'!\\\\nadd: aSound pan: leftRightPan\\\\n\\\\t\\\\\\\"Add the given sound with the given left-right panning and no attenuation.\\\\\\\"\\\\n\\\\n\\\\tself add: aSound pan: leftRightPan volume: 1.0.\\\\n! !\\\\n\\\\n!MixedSound methodsFor: 'composition' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nadd: aSound pan: leftRightPan volume: volume\\\\n\\\\t\\\\\\\"Add the given sound with the given left-right pan, where 0.0 is full left, 1.0 is full right, and 0.5 is centered. The loudness of the sound will be scaled by volume, which ranges from 0 to 1.0.\\\\\\\"\\\\n\\\\n\\\\t| pan vol |\\\\n\\\\tpan := ((leftRightPan * ScaleFactor) asInteger max: 0) min: ScaleFactor.\\\\n\\\\tvol := ((volume * ScaleFactor) asInteger max: 0) min: ScaleFactor.\\\\n\\\\tsounds := sounds copyWith: aSound.\\\\n\\\\tleftVols := leftVols copyWith: ((ScaleFactor - pan) * vol) // ScaleFactor.\\\\n\\\\trightVols := rightVols copyWith: (pan * vol) // ScaleFactor.\\\\n! !\\\\n\\\\n\\\\n!MixedSound methodsFor: 'copying' stamp: 'jm 12/15/97 19:13'!\\\\ncopy\\\\n\\\\t\\\\\\\"Copy my component sounds.\\\\\\\"\\\\n\\\\n\\\\t^ super copy copySounds\\\\n! !\\\\n\\\\n!MixedSound methodsFor: 'copying' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ncopySounds\\\\n\\\\t\\\\\\\"Private!! Support for copying. Copy my component sounds and settings array.\\\\\\\"\\\\n\\\\n\\\\tsounds := sounds collect: [:s | s copy].\\\\n\\\\tleftVols := leftVols copy.\\\\n\\\\trightVols := rightVols copy.\\\\n! !\\\\n\\\\n\\\\n!MixedSound methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ninitialize\\\\n\\\\n\\\\tsuper initialize.\\\\n\\\\tsounds := Array new.\\\\n\\\\tleftVols := Array new.\\\\n\\\\trightVols := Array new.\\\\n! !\\\\n\\\\n\\\\n!MixedSound methodsFor: 'sound generation' stamp: 'jm 11/25/97 13:40'!\\\\ndoControl\\\\n\\\\n\\\\tsuper doControl.\\\\n\\\\t1 to: sounds size do: [:i | (sounds at: i) doControl].\\\\n! !\\\\n\\\\n!MixedSound methodsFor: 'sound generation' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nmixSampleCount: n into: aSoundBuffer startingAt: startIndex leftVol: leftVol rightVol: rightVol\\\\n\\\\t\\\\\\\"Play a number of sounds concurrently. The level of each sound can be set independently for the left and right channels.\\\\\\\"\\\\n\\\\n\\\\t| snd left right |\\\\n\\\\t1 to: sounds size do: [:i |\\\\n\\\\t\\\\t(soundDone at: i) ifFalse: [\\\\n\\\\t\\\\t\\\\tsnd := sounds at: i.\\\\n\\\\t\\\\t\\\\tleft := (leftVol * (leftVols at: i)) // ScaleFactor.\\\\n\\\\t\\\\t\\\\tright := (rightVol * (rightVols at: i)) // ScaleFactor.\\\\n\\\\t\\\\t\\\\tsnd samplesRemaining > 0\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsnd mixSampleCount: n into: aSoundBuffer startingAt: startIndex leftVol: left rightVol: right]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [soundDone at: i put: true]]].\\\\n! !\\\\n\\\\n!MixedSound methodsFor: 'sound generation' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nreset\\\\n\\\\n\\\\tsuper reset.\\\\n\\\\tsounds do: [:snd | snd reset].\\\\n\\\\tsoundDone := (Array new: sounds size) atAllPut: false.\\\\n! !\\\\n\\\\n!MixedSound methodsFor: 'sound generation' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nsamplesRemaining\\\\n\\\\n\\\\t| remaining r |\\\\n\\\\tremaining := 0.\\\\n\\\\t1 to: sounds size do: [:i |\\\\n\\\\t\\\\tr := (sounds at: i) samplesRemaining.\\\\n\\\\t\\\\tr > remaining ifTrue: [remaining := r]].\\\\n\\\\n\\\\t^ remaining\\\\n! !\\\\n\\\\n!MixedSound methodsFor: 'sound generation' stamp: 'jm 1/10/1999 08:45'!\\\\nstopGracefully\\\\n\\\\t\\\\\\\"End this note with a graceful decay. If the note has envelopes, determine the decay time from its envelopes.\\\\\\\"\\\\n\\\\n\\\\tsuper stopGracefully.\\\\n\\\\tsounds do: [:s | s stopGracefully].\\\\n! !\\\\nStream subclass: #MockSocketStream\\\\n\\\\tinstanceVariableNames: 'atEnd inStream outStream'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'NetworkTests-Kernel'!\\\\n\\\\n!MockSocketStream methodsFor: 'accessing' stamp: 'fbs 3/22/2004 12:51'!\\\\natEnd: aBoolean\\\\n\\\\tatEnd := aBoolean.! !\\\\n\\\\n!MockSocketStream methodsFor: 'accessing' stamp: 'fbs 3/22/2004 13:29'!\\\\ninStream\\\\n\\\\t^inStream! !\\\\n\\\\n!MockSocketStream methodsFor: 'accessing' stamp: 'fbs 3/22/2004 13:08'!\\\\noutStream\\\\n\\\\t^outStream! !\\\\n\\\\n\\\\n!MockSocketStream methodsFor: 'initialize-release' stamp: 'fbs 3/22/2004 13:29'!\\\\ninitialize\\\\n\\\\tself resetInStream.\\\\n\\\\tself resetOutStream.! !\\\\n\\\\n\\\\n!MockSocketStream methodsFor: 'stream in' stamp: 'fbs 3/22/2004 13:10'!\\\\nnextLine\\\\n\\\\t^self nextLineCrLf! !\\\\n\\\\n!MockSocketStream methodsFor: 'stream in' stamp: 'fbs 3/22/2004 13:09'!\\\\nnextLineCrLf\\\\n\\\\t^(self upToAll: String crlf).! !\\\\n\\\\n!MockSocketStream methodsFor: 'stream in' stamp: 'fbs 3/22/2004 13:28'!\\\\nresetInStream\\\\n\\\\tinStream := WriteStream on: ''.! !\\\\n\\\\n!MockSocketStream methodsFor: 'stream in' stamp: 'fbs 3/22/2004 13:09'!\\\\nupToAll: delims\\\\n\\\\t^self inStream upToAll: delims.! !\\\\n\\\\n\\\\n!MockSocketStream methodsFor: 'stream out' stamp: 'fbs 3/22/2004 13:28'!\\\\nresetOutStream\\\\n\\\\toutStream := WriteStream on: ''.! !\\\\n\\\\n!MockSocketStream methodsFor: 'stream out' stamp: 'fbs 3/22/2004 13:07'!\\\\nsendCommand: aString\\\\n\\\\tself outStream\\\\n\\\\t\\\\tnextPutAll: aString;\\\\n\\\\t\\\\tnextPutAll: String crlf.! !\\\\n\\\\n\\\\n!MockSocketStream methodsFor: 'testing' stamp: 'fbs 3/22/2004 13:08'!\\\\natEnd\\\\n\\\\t^self inStream atEnd.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMockSocketStream class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MockSocketStream class methodsFor: 'instance creation' stamp: 'fbs 3/22/2004 12:46'!\\\\non: socket\\\\n\\\\t^self basicNew initialize! !\\\\nController subclass: #ModalController\\\\n\\\\tinstanceVariableNames: 'modeActive'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'ST80-Framework'!\\\\n!ModalController commentStamp: '<historical>' prior: 0!\\\\nI am a controller that puts the poor user into a mode by not relinquishing control. However, I do pass control onto my underlings. Some underling is expected to end the mode by sending me 'close'. Watch out Larry Tesler, the mode lives on...\\\\n!\\\\n\\\\n\\\\n!ModalController methodsFor: 'as yet unclassified' stamp: 'jm 5/1/1998 07:05'!\\\\nclose\\\\n\\\\t\\\\\\\"This is how we leave the mode.\\\\\\\" \\\\n\\\\n\\\\tmodeActive _ false.\\\\n! !\\\\n\\\\n!ModalController methodsFor: 'as yet unclassified' stamp: 'jm 5/1/1998 07:02'!\\\\ncontrolInitialize\\\\n\\\\n\\\\tmodeActive _ true.\\\\n\\\\t^ super controlInitialize\\\\n! !\\\\n\\\\n!ModalController methodsFor: 'as yet unclassified' stamp: 'jm 5/1/1998 07:00'!\\\\nisControlActive\\\\n\\\\n\\\\t^ modeActive\\\\n! !\\\\n\\\\n!ModalController methodsFor: 'as yet unclassified' stamp: 'jm 5/1/1998 07:00'!\\\\nisControlWanted\\\\n\\\\n\\\\t^ modeActive\\\\n! !\\\\nStandardSystemView subclass: #ModalSystemWindowView\\\\n\\\\tinstanceVariableNames: 'modalBorder'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-FileList'!\\\\n!ModalSystemWindowView commentStamp: '<historical>' prior: 0!\\\\nI am a view for a Modal System Window.  I vary from StandardSystemView, of which I am a subclass in a few ways:\\\\n\\\\n\\\\t(1) I use ModalController as my default controller;\\\\n\\\\t(2) When asked to update with the symbol #close, I direct the controller to close;\\\\n\\\\t(3) I display a slightly different title bar with no control boxes.!\\\\n\\\\n\\\\n!ModalSystemWindowView methodsFor: 'controller access' stamp: 'acg 2/9/2000 00:58'!\\\\ndefaultControllerClass\\\\n\\\\n\\\\t^ModalController! !\\\\n\\\\n\\\\n!ModalSystemWindowView methodsFor: 'displaying' stamp: 'acg 2/18/2000 20:24'!\\\\ndisplay\\\\n\\\\n\\\\tsuper display.\\\\n\\\\tself displayLabelBackground: false.\\\\n\\\\tself displayLabelText.\\\\n! !\\\\n\\\\n!ModalSystemWindowView methodsFor: 'displaying' stamp: 'acg 2/19/2000 00:59'!\\\\ndisplayBorder\\\\n\\\\t\\\\\\\"Display the receiver's border (using the receiver's borderColor).\\\\\\\"\\\\n\\\\n\\\\tmodalBorder ifFalse: [^super displayBorder].\\\\n\\\\n\\\\tDisplay\\\\n\\\\t\\\\tborder: self displayBox\\\\n\\\\t\\\\twidthRectangle: (1@1 corner: 2@2)\\\\n\\\\t\\\\trule: Form over\\\\n\\\\t\\\\tfillColor: Color black.\\\\n\\\\tDisplay\\\\n\\\\t\\\\tborder: (self displayBox insetBy: (1@1 corner: 2@2))\\\\n\\\\t\\\\twidthRectangle: (4@4 corner: 3@3)\\\\n\\\\t\\\\trule: Form over\\\\n\\\\t\\\\tfillColor: (Color r: 16rEA g: 16rEA b: 16rEA).\\\\n! !\\\\n\\\\n!ModalSystemWindowView methodsFor: 'displaying' stamp: 'acg 2/9/2000 07:21'!\\\\ndisplayLabelBoxes\\\\n\\\\t\\\\\\\"Modal dialogs don't have closeBox or growBox.\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!ModalSystemWindowView methodsFor: 'initialize-release' stamp: 'acg 2/18/2000 20:41'!\\\\nborderWidth: anObject\\\\n\\\\n\\\\tmodalBorder _ false.\\\\n\\\\t^super borderWidth: anObject! !\\\\n\\\\n!ModalSystemWindowView methodsFor: 'initialize-release' stamp: 'acg 2/19/2000 00:50'!\\\\ninitialize \\\\n\\\\t\\\\\\\"Refer to the comment in View|initialize.\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\tself borderWidth: 5.\\\\n\\\\tself noLabel.\\\\n\\\\tmodalBorder _ true.! !\\\\n\\\\n\\\\n!ModalSystemWindowView methodsFor: 'label access' stamp: 'acg 2/9/2000 08:35'!\\\\nbackgroundColor\\\\n\\\\t^Color lightYellow! !\\\\n\\\\n\\\\n!ModalSystemWindowView methodsFor: 'modal dialog' stamp: 'BG 12/13/2002 11:33'!\\\\ndoModalDialog\\\\n\\\\n\\\\t| savedArea |\\\\n\\\\tself resizeInitially.\\\\n\\\\tself resizeTo: \\\\n\\\\t\\\\t((self windowBox)\\\\n\\\\t\\\\t\\\\talign: self windowBox center\\\\n\\\\t\\\\t\\\\twith: Display boundingBox aboveCenter).\\\\n\\\\tsavedArea _ Form fromDisplay: self windowBox.\\\\n\\\\tself displayEmphasized.\\\\n\\\\tself controller startUp.\\\\n\\\\tself release.\\\\n\\\\tsavedArea displayOn: Display at: self windowOrigin.\\\\n! !\\\\n\\\\n\\\\n!ModalSystemWindowView methodsFor: 'model access' stamp: 'acg 2/9/2000 00:57'!\\\\nupdate: aSymbol\\\\n\\\\taSymbol = #close\\\\n\\\\t\\\\tifTrue: [^self controller close].\\\\n\\\\t^super update: aSymbol! !\\\\nObject subclass: #Model\\\\n\\\\tinstanceVariableNames: 'dependents'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Kernel-Objects'!\\\\n!Model commentStamp: '<historical>' prior: 0!\\\\nProvides a superclass for classes that function as models.  The only behavior provided is fast dependents maintenance, which bypasses the generic DependentsFields mechanism.  1/23/96 sw!\\\\n\\\\n\\\\n!Model methodsFor: 'copying' stamp: 'tk 10/21/2002 12:59'!\\\\nveryDeepFixupWith: deepCopier \\\\n\\\\t\\\\\\\"See if the dependents are being copied also.  If so, point at the new copies.  (The dependent has self as its model.)\\\\n\\\\tDependents handled in class Object, when the model is not a Model, are fixed up in Object veryDeepCopy.\\\\\\\"\\\\n\\\\n\\\\t| originalDependents refs newDependent |\\\\n\\\\tsuper veryDeepFixupWith: deepCopier.\\\\n\\\\toriginalDependents _ dependents.\\\\n\\\\toriginalDependents ifNil: [\\\\n\\\\t\\\\t^self.\\\\n\\\\t\\\\t].\\\\n\\\\tdependents _ nil.\\\\n\\\\trefs _ deepCopier references.\\\\n\\\\toriginalDependents\\\\n\\\\t\\\\tdo: [:originalDependent | \\\\n\\\\t\\\\t\\\\tnewDependent _ refs\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tat: originalDependent\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifAbsent: [].\\\\n\\\\t\\\\t\\\\tnewDependent\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil: [self addDependent: newDependent]]!\\\\n]style[(29 206 19 395)f1b,f1,f1LObject veryDeepCopy;,f1! !\\\\n\\\\n!Model methodsFor: 'copying' stamp: 'RB 9/20/2001 16:25'!\\\\nveryDeepInner: deepCopier\\\\n\\\\t\\\\\\\"Shallow copy dependents and fix them later\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!Model methodsFor: 'dependents' stamp: 'sma 2/29/2000 19:26'!\\\\ncanDiscardEdits\\\\n\\\\t\\\\\\\"Answer true if none of the views on this model has unaccepted edits that matter.\\\\\\\"\\\\n\\\\n\\\\tdependents ifNil: [^ true].\\\\n\\\\t^ super canDiscardEdits\\\\n! !\\\\n\\\\n!Model methodsFor: 'dependents' stamp: 'sw 2/6/2001 04:13'!\\\\ncontainingWindow\\\\n\\\\t\\\\\\\"Answer the window that holds the receiver.  The dependents technique is odious and may not be airtight, if multiple windows have the same model.\\\\\\\"\\\\n\\\\n\\\\t^ self dependents detect:\\\\n\\\\t\\\\t[:d | ((d isKindOf: SystemWindow orOf: StandardSystemView) or: [d isKindOf: MVCWiWPasteUpMorph]) and: [d model == self]] ifNone: [nil]! !\\\\n\\\\n!Model methodsFor: 'dependents' stamp: 'jm 3/24/98 15:12'!\\\\nhasUnacceptedEdits\\\\n\\\\t\\\\\\\"Answer true if any of the views on this model has unaccepted edits.\\\\\\\"\\\\n\\\\n\\\\tdependents == nil ifTrue: [^ false].\\\\n\\\\t^ super hasUnacceptedEdits\\\\n! !\\\\n\\\\n!Model methodsFor: 'dependents' stamp: 'sma 2/29/2000 19:54'!\\\\nmyDependents\\\\n\\\\t^ dependents! !\\\\n\\\\n!Model methodsFor: 'dependents' stamp: 'sma 2/29/2000 19:54'!\\\\nmyDependents: aCollectionOrNil\\\\n\\\\tdependents _ aCollectionOrNil! !\\\\n\\\\n!Model methodsFor: 'dependents' stamp: 'gm 2/16/2003 20:37'!\\\\ntopView\\\\n\\\\t\\\\\\\"Find the first top view on me. Is there any danger of their being two with the same model?  Any danger from ungarbage collected old views?  Ask if schedulled?\\\\\\\"\\\\n\\\\n\\\\tdependents ifNil: [^nil].\\\\n\\\\tSmalltalk isMorphic \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[dependents \\\\n\\\\t\\\\t\\\\t\\\\tdo: [:v | ((v isSystemWindow) and: [v isInWorld]) ifTrue: [^v]].\\\\n\\\\t\\\\t\\\\t^nil].\\\\n\\\\tdependents do: [:v | v superView ifNil: [v model == self ifTrue: [^v]]].\\\\n\\\\t^nil! !\\\\n\\\\n\\\\n!Model methodsFor: 'keyboard' stamp: 'nk 6/29/2004 14:46'!\\\\narrowKey: aChar from: view\\\\n\\\\t\\\\\\\"backstop; all the PluggableList* classes actually handle arrow keys, and the models handle other keys.\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n\\\\n!Model methodsFor: 'menus' stamp: 'di 4/11/98 11:34'!\\\\nperform: selector orSendTo: otherTarget\\\\n\\\\t\\\\\\\"Selector was just chosen from a menu by a user.  If can respond, then perform it on myself.  If not, send it to otherTarget, presumably the editPane from which the menu was invoked.\\\\\\\" \\\\n\\\\n\\\\t\\\\\\\"default is that the editor does all\\\\\\\"\\\\n\\\\t^ otherTarget perform: selector.! !\\\\n\\\\n!Model methodsFor: 'menus' stamp: 'tk 4/17/1998 17:28'!\\\\nselectedClass\\\\n\\\\t\\\\\\\"All owners of TextViews are asked this during a doIt\\\\\\\"\\\\n\\\\t^ nil! !\\\\n\\\\n!Model methodsFor: 'menus' stamp: 'zz 3/2/2004 23:49'!\\\\nstep\\\\n\\\\t\\\\\\\"Default for morphic models is no-op\\\\\\\"! !\\\\n\\\\n!Model methodsFor: 'menus' stamp: 'sw 12/15/2000 13:21'!\\\\ntrash\\\\n\\\\t\\\\\\\"What should be displayed if a trash pane is restored to initial state\\\\\\\"\\\\n\\\\n\\\\t^ ''! !\\\\n\\\\n!Model methodsFor: 'menus' stamp: 'sw 12/15/2000 13:21'!\\\\ntrash: ignored\\\\n\\\\t\\\\\\\"Whatever the user submits to the trash, it need not be saved.\\\\\\\"\\\\n\\\\n\\\\t^ true! !\\\\n\\\\n\\\\n!Model methodsFor: '*services-base' stamp: 'rr 3/21/2006 11:54'!\\\\nrequestor\\\\n\\\\t^ Requestor default! !\\\\n\\\\n\\\\n!Model methodsFor: '*Tools' stamp: 'ar 9/27/2005 20:59'!\\\\naddItem: classAndMethod\\\\n\\\\t\\\\\\\"Make a linked message list and put this method in it\\\\\\\"\\\\n\\\\t| list |\\\\n\\\\n\\\\tself flag: #mref.\\\\t\\\\\\\"classAndMethod is a String\\\\\\\"\\\\n\\\\n\\\\tMessageSet \\\\n\\\\t\\\\tparse: classAndMethod  \\\\n\\\\t\\\\ttoClassAndSelector: [ :class :sel |\\\\n\\\\t\\\\t\\\\tclass ifNil: [^self].\\\\n\\\\t\\\\t\\\\tlist := OrderedCollection with: (\\\\n\\\\t\\\\t\\\\t\\\\tMethodReference new\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsetClass: class  \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmethodSymbol: sel \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstringVersion: classAndMethod\\\\n\\\\t\\\\t\\\\t).\\\\n\\\\t\\\\t\\\\tMessageSet \\\\n\\\\t\\\\t\\\\t\\\\topenMessageList: list \\\\n\\\\t\\\\t\\\\t\\\\tname: 'Linked by HyperText'.\\\\n\\\\t\\\\t]\\\\n\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nModel class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!Model class methodsFor: 'toolbuilder' stamp: 'ar 2/11/2005 16:26'!\\\\nbuildWith: toolBuilder\\\\n\\\\t^self new buildWith: toolBuilder! !\\\\nObject subclass: #ModelExtension\\\\n\\\\tinstanceVariableNames: 'interests lock'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Traits-LocalSends'!\\\\n\\\\n!ModelExtension methodsFor: 'access to cache' stamp: 'dvf 9/14/2005 11:27'!\\\\nhaveInterestsIn: aClass \\\\n\\\\tlock critical: [^interests includes: aClass]\\\\n! !\\\\n\\\\n\\\\n!ModelExtension methodsFor: 'interests' stamp: 'dvf 9/14/2005 11:11'!\\\\nlostInterest: client inAll: classes\\\\n\\\\tlock critical: [interests removeAll: classes]! !\\\\n\\\\n!ModelExtension methodsFor: 'interests' stamp: 'dvf 9/2/2005 11:43'!\\\\nlostInterest: client in: class\\\\n\\\\tself lostInterest: client inAll: {class}! !\\\\n\\\\n!ModelExtension methodsFor: 'interests' stamp: 'dvf 9/14/2005 11:28'!\\\\nnoteInterestOf: client inAll: classes\\\\n\\\\tlock critical: [interests addAll: classes].! !\\\\n\\\\n!ModelExtension methodsFor: 'interests' stamp: 'dvf 9/2/2005 11:44'!\\\\nnoteInterestOf: client in: class\\\\n\\\\tself noteInterestOf: client inAll: {class}! !\\\\n\\\\n\\\\n!ModelExtension methodsFor: 'invalidation' stamp: 'dvf 9/14/2005 11:11'!\\\\ninitialize\\\\n\\\\tlock := Semaphore forMutualExclusion.  \\\\n\\\\tinterests := IdentityBag new.\\\\n\\\\tSystemChangeNotifier uniqueInstance \\\\n\\\\t\\\\tnotify: self\\\\n\\\\t\\\\tofSystemChangesOfItem: #class\\\\n\\\\t\\\\tusing: #classChanged:.\\\\n\\\\tSystemChangeNotifier uniqueInstance \\\\n\\\\t\\\\tnotify: self\\\\n\\\\t\\\\tofSystemChangesOfItem: #method\\\\n\\\\t\\\\tusing: #classChanged:.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nModelExtension class\\\\n\\\\tinstanceVariableNames: 'current'!\\\\n\\\\n!ModelExtension class methodsFor: 'accessing' stamp: 'dvf 9/1/2005 21:16'!\\\\ncurrent\\\\n\\\\t^current! !\\\\n\\\\n!ModelExtension class methodsFor: 'accessing' stamp: 'dvf 9/1/2005 21:16'!\\\\ncurrent: anObject\\\\n\\\\t^current := anObject! !\\\\n\\\\n\\\\n!ModelExtension class methodsFor: 'initialize-release' stamp: 'dvf 9/2/2005 12:20'!\\\\ninitialize\\\\n\\\\tself isAbstract not ifTrue:\\\\n\\\\t\\\\t[self current: self new]! !\\\\n\\\\n!ModelExtension class methodsFor: 'initialize-release' stamp: 'dvf 9/2/2005 12:20'!\\\\nisAbstract\\\\n\\\\t^self == ModelExtension! !\\\\n\\\\n\\\\n!ModelExtension class methodsFor: 'instance creation' stamp: 'dvf 9/1/2005 21:16'!\\\\ndoWithTemporaryInstance: aBlock \\\\n\\\\t| singleton |\\\\n\\\\tsingleton := self current.\\\\n\\\\t\\\\n\\\\t[self current: self new.\\\\n\\\\taBlock value] ensure: [self current: singleton]! !\\\\nModifiedEvent subclass: #ModifiedClassDefinitionEvent\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Change Notification'!\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: 'accessing' stamp: 'NS 1/20/2004 19:30'!\\\\nclassVarNames\\\\n\\\\t^ item classVarNames asSet! !\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: 'accessing' stamp: 'NS 1/20/2004 19:29'!\\\\ninstVarNames\\\\n\\\\t^ item instVarNames asSet! !\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: 'accessing' stamp: 'NS 1/20/2004 19:30'!\\\\noldClassVarNames\\\\n\\\\t^ oldItem classVarNames asSet! !\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: 'accessing' stamp: 'NS 1/20/2004 19:29'!\\\\noldInstVarNames\\\\n\\\\t^ oldItem instVarNames asSet! !\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: 'accessing' stamp: 'NS 1/20/2004 19:31'!\\\\noldSharedPools\\\\n\\\\t^ oldItem sharedPools! !\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: 'accessing' stamp: 'NS 1/20/2004 19:28'!\\\\noldSuperclass\\\\n\\\\t^ oldItem superclass! !\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: 'accessing' stamp: 'NS 1/20/2004 19:31'!\\\\nsharedPools\\\\n\\\\t^ item sharedPools! !\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: 'accessing' stamp: 'NS 1/20/2004 19:28'!\\\\nsuperclass\\\\n\\\\t^ item superclass! !\\\\n\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: 'testing' stamp: 'NS 1/20/2004 19:31'!\\\\nareClassVarsModified\\\\n\\\\t^ self classVarNames ~= self oldClassVarNames! !\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: 'testing' stamp: 'NS 1/20/2004 19:30'!\\\\nareInstVarsModified\\\\n\\\\t^ self instVarNames ~= self oldInstVarNames! !\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: 'testing' stamp: 'NS 1/20/2004 19:32'!\\\\nareSharedPoolsModified\\\\n\\\\t^ self sharedPools ~= self oldSharedPools! !\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: 'testing' stamp: 'NS 1/20/2004 19:29'!\\\\nisSuperclassModified\\\\n\\\\t^ item superclass ~~ oldItem superclass! !\\\\n\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: '*Kernel-Classes' stamp: 'al 7/17/2004 21:48'!\\\\nanyChanges\\\\n\\\\t^ self isSuperclassModified or: [self areInstVarsModified or: [self areClassVarsModified or: [self areSharedPoolsModified or: [self isTraitCompositionModified]]]]! !\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: '*Kernel-Classes' stamp: 'al 7/17/2004 21:59'!\\\\nisTraitCompositionModified\\\\n\\\\t^self traitComposition printString ~= self oldTraitComposition printString! !\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: '*Kernel-Classes' stamp: 'al 7/17/2004 21:50'!\\\\noldTraitComposition\\\\n\\\\t^ oldItem traitComposition! !\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: '*Kernel-Classes' stamp: 'al 7/18/2004 10:47'!\\\\nprintOn: aStream\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream\\\\n\\\\t\\\\tnextPutAll: ' Super: ';\\\\n\\\\t\\\\tprint: self isSuperclassModified;\\\\n\\\\t\\\\tnextPutAll: ' TraitComposition: ';\\\\n\\\\t\\\\tprint: self isTraitCompositionModified;\\\\n\\\\t\\\\tnextPutAll: ' InstVars: ';\\\\n\\\\t\\\\tprint: self areInstVarsModified;\\\\n\\\\t\\\\tnextPutAll: ' ClassVars: ';\\\\n\\\\t\\\\tprint: self areClassVarsModified;\\\\n\\\\t\\\\tnextPutAll: ' SharedPools: ';\\\\n\\\\t\\\\tprint: self areSharedPoolsModified.! !\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: '*Kernel-Classes' stamp: 'al 7/17/2004 21:50'!\\\\ntraitComposition\\\\n\\\\t^ item traitComposition! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nModifiedClassDefinitionEvent class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!ModifiedClassDefinitionEvent class methodsFor: 'accessing' stamp: 'NS 1/20/2004 12:26'!\\\\nsupportedKinds\\\\n\\\\t\\\\\\\"All the kinds of items that this event can take.\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ Array with: self classKind! !\\\\n\\\\n\\\\n!ModifiedClassDefinitionEvent class methodsFor: 'instance creation' stamp: 'NS 1/20/2004 11:52'!\\\\nclassDefinitionChangedFrom: oldClass to: newClass\\\\n\\\\t| instance |\\\\n\\\\tinstance := self item: newClass kind: self classKind.\\\\n\\\\tinstance oldItem: oldClass.\\\\n\\\\t^instance! !\\\\nAbstractEvent subclass: #ModifiedEvent\\\\n\\\\tinstanceVariableNames: 'oldItem'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Change Notification'!\\\\n\\\\n!ModifiedEvent methodsFor: 'accessing' stamp: 'NS 1/19/2004 15:08'!\\\\noldItem\\\\n\\\\t^ oldItem! !\\\\n\\\\n\\\\n!ModifiedEvent methodsFor: 'printing' stamp: 'NS 1/19/2004 15:10'!\\\\nprintEventKindOn: aStream\\\\n\\\\n\\\\taStream nextPutAll: 'Modified'! !\\\\n\\\\n!ModifiedEvent methodsFor: 'printing' stamp: 'NS 1/19/2004 17:57'!\\\\nprintOn: aStream\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream\\\\n\\\\t\\\\tnextPutAll: ' oldItem: ';\\\\n\\\\t\\\\tprint: oldItem.! !\\\\n\\\\n\\\\n!ModifiedEvent methodsFor: 'testing' stamp: 'NS 1/19/2004 15:09'!\\\\nisModified\\\\n\\\\n\\\\t^true! !\\\\n\\\\n\\\\n!ModifiedEvent methodsFor: 'private-accessing' stamp: 'NS 1/19/2004 15:08'!\\\\noldItem: anItem\\\\n\\\\toldItem _ anItem! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nModifiedEvent class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!ModifiedEvent class methodsFor: 'accessing' stamp: 'NS 1/19/2004 15:10'!\\\\nchangeKind\\\\n\\\\n\\\\t^#Modified! !\\\\n\\\\n!ModifiedEvent class methodsFor: 'accessing' stamp: 'NS 1/20/2004 12:25'!\\\\nsupportedKinds\\\\n\\\\t\\\\\\\"All the kinds of items that this event can take.\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ Array with: self classKind with: self methodKind with: self categoryKind with: self protocolKind! !\\\\n\\\\n\\\\n!ModifiedEvent class methodsFor: 'instance creation' stamp: 'NS 1/20/2004 19:37'!\\\\nclassDefinitionChangedFrom: oldClass to: newClass\\\\n\\\\t^ ModifiedClassDefinitionEvent classDefinitionChangedFrom: oldClass to: newClass! !\\\\n\\\\n!ModifiedEvent class methodsFor: 'instance creation' stamp: 'NS 1/27/2004 11:40'!\\\\nmethodChangedFrom: oldMethod to: newMethod selector: aSymbol inClass: aClass\\\\n\\\\t| instance |\\\\n\\\\tinstance := self method: newMethod selector: aSymbol class: aClass.\\\\n\\\\tinstance oldItem: oldMethod.\\\\n\\\\t^ instance! !\\\\n\\\\n!ModifiedEvent class methodsFor: 'instance creation' stamp: 'NS 1/27/2004 11:40'!\\\\nmethodChangedFrom: oldMethod to: newMethod selector: aSymbol inClass: aClass requestor: requestor\\\\n\\\\t| instance |\\\\n\\\\tinstance := self method: newMethod selector: aSymbol class: aClass requestor: requestor.\\\\n\\\\tinstance oldItem: oldMethod.\\\\n\\\\t^ instance! !\\\\nModifiedEvent subclass: #ModifiedTraitDefinitionEvent\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Change Notification'!\\\\n\\\\n!ModifiedTraitDefinitionEvent methodsFor: 'testing' stamp: 'al 7/18/2004 11:08'!\\\\nanyChanges\\\\n\\\\t^ self isTraitCompositionModified! !\\\\n\\\\n!ModifiedTraitDefinitionEvent methodsFor: 'testing' stamp: 'al 7/18/2004 10:43'!\\\\nisTraitCompositionModified\\\\n\\\\t^self traitComposition printString ~= self oldTraitComposition printString! !\\\\n\\\\n\\\\n!ModifiedTraitDefinitionEvent methodsFor: 'accessing' stamp: 'al 7/18/2004 10:43'!\\\\noldTraitComposition\\\\n\\\\t^ oldItem traitComposition! !\\\\n\\\\n!ModifiedTraitDefinitionEvent methodsFor: 'accessing' stamp: 'al 7/18/2004 10:43'!\\\\ntraitComposition\\\\n\\\\t^ item traitComposition! !\\\\n\\\\n\\\\n!ModifiedTraitDefinitionEvent methodsFor: 'printing' stamp: 'al 7/18/2004 10:47'!\\\\nprintOn: aStream\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream\\\\n\\\\t\\\\tnextPutAll: ' TraitComposition: ';\\\\n\\\\t\\\\tprint: self isTraitCompositionModified! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nModifiedTraitDefinitionEvent class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!ModifiedTraitDefinitionEvent class methodsFor: 'accessing' stamp: 'al 7/18/2004 10:43'!\\\\nsupportedKinds\\\\n\\\\t\\\\\\\"All the kinds of items that this event can take.\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ Array with: self classKind! !\\\\n\\\\n\\\\n!ModifiedTraitDefinitionEvent class methodsFor: 'instance creation' stamp: 'al 7/18/2004 10:50'!\\\\ntraitDefinitionChangedFrom: oldTrait to: newTrait\\\\n\\\\t| instance |\\\\n\\\\tinstance _ self item: newTrait kind: self classKind.\\\\n\\\\tinstance oldItem: oldTrait.\\\\n\\\\t^instance! !\\\\nObject subclass: #Monitor\\\\n\\\\tinstanceVariableNames: 'mutex ownerProcess nestingLevel defaultQueue queueDict queuesMutex'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Kernel-Processes'!\\\\n!Monitor commentStamp: 'md 3/3/2006 09:19' prior: 0!\\\\nA monitor provides process synchronization that is more high level than the one provided by a Semaphore. Similar to the classical definition of a Monitor it has the following properties:\\\\n\\\\n1) At any time, only one process can execute code inside a critical section of a monitor.\\\\n2) A monitor is reentrant, which means that the active process in a monitor never gets blocked when it enters a (nested) critical section of the same monitor.\\\\n3) Inside a critical section, a process can wait for an event that may be coupled to a certain condition. If the condition is not fulfilled, the process leaves the monitor temporarily (in order to let other processes enter) and waits until another process signals the event. Then, the original process checks the condition again (this is often necessary because the state of the monitor could have changed in the meantime) and continues if it is fulfilled.\\\\n4) The monitor is fair, which means that the process that is waiting on a signaled condition the longest gets activated first.\\\\n5) The monitor allows you to define timeouts after which a process gets activated automatically.\\\\n\\\\n\\\\nBasic usage:\\\\n\\\\nMonitor>>critical: aBlock\\\\nCritical section.\\\\nExecutes aBlock as a critical section. At any time, only one process can execute code in a critical section.\\\\nNOTE: All the following synchronization operations are only valid inside the critical section of the monitor!!\\\\n\\\\nMonitor>>wait\\\\nUnconditional waiting for the default event.\\\\nThe current process gets blocked and leaves the monitor, which means that the monitor allows another process to execute critical code. When the default event is signaled, the original process is resumed.\\\\n\\\\nMonitor>>waitWhile: aBlock\\\\nConditional waiting for the default event.\\\\nThe current process gets blocked and leaves the monitor only if the argument block evaluates to true. This means that another process can enter the monitor. When the default event is signaled, the original process is resumed, which means that the condition (argument block) is checked again. Only if it evaluates to false, does execution proceed. Otherwise, the process gets blocked and leaves the monitor again...\\\\n\\\\nMonitor>>waitUntil: aBlock\\\\nConditional waiting for the default event.\\\\nSee Monitor>>waitWhile: aBlock.\\\\n\\\\nMonitor>>signal\\\\nOne process waiting for the default event is woken up.\\\\n\\\\nMonitor>>signalAll\\\\nAll processes waiting for the default event are woken up.\\\\n\\\\n\\\\nUsing non-default (specific) events:\\\\n\\\\nMonitor>>waitFor: aSymbol\\\\nUnconditional waiting for the non-default event represented by the argument symbol.\\\\nSame as Monitor>>wait, but the process gets only reactivated by the specific event and not the default event.\\\\n\\\\nMonitor>>waitWhile: aBlock for: aSymbol\\\\nConfitional waiting for the non-default event represented by the argument symbol.\\\\nSame as Monitor>>waitWhile:for:, but the process gets only reactivated by the specific event and not the default event.\\\\n\\\\nMonitor>>waitUntil: aBlock for: aSymbol\\\\nConfitional waiting for the non-default event represented by the argument symbol.\\\\nSee Monitor>>waitWhile:for: aBlock.\\\\n\\\\nMonitor>>signal: aSymbol\\\\nOne process waiting for the given event is woken up. If there is no process waiting for this specific event, a process waiting for the default event gets resumed.\\\\n\\\\nMonitor>>signalAll: aSymbol\\\\nAll process waiting for the given event or the default event are woken up.\\\\n\\\\nMonitor>>signalReallyAll\\\\nAll processes waiting for any events (default or specific) are woken up.\\\\n\\\\n\\\\nUsing timeouts\\\\n\\\\nMonitor>>waitMaxMilliseconds: anInteger\\\\nMonitor>>waitFor: aSymbol maxMilliseconds: anInteger\\\\nSame as Monitor>>wait (resp. Monitor>>waitFor:), but the process gets automatically woken up when the specified time has passed.\\\\n\\\\nMonitor>>waitWhile: aBlock maxMilliseconds: anInteger\\\\nMonitor>>waitWhile: aBlock for: aSymbol maxMilliseconds: anInteger\\\\nSame as Monitor>>waitWhile: (resp. Monitor>>waitWhile:for:), but the process gets automatically woken up when the specified time has passed.\\\\n\\\\nMonitor>>waitUntil: aBlock maxMilliseconds: anInteger\\\\nMonitor>>waitUntil: aBlock for: aSymbol maxMilliseconds: anInteger\\\\nSame as Monitor>>waitUntil: (resp. Monitor>>waitUntil:for:), but the process gets automatically woken up when the specified time has passed.!\\\\n\\\\n\\\\n!Monitor methodsFor: 'accessing' stamp: 'NS 7/1/2002 20:02'!\\\\ncleanup\\\\n\\\\tself checkOwnerProcess.\\\\n\\\\tself critical: [self privateCleanup].! !\\\\n\\\\n\\\\n!Monitor methodsFor: 'initialize-release' stamp: 'NS 4/13/2004 16:12'!\\\\ninitialize\\\\n\\\\tmutex _ Semaphore forMutualExclusion.\\\\n\\\\tqueuesMutex _ Semaphore forMutualExclusion.\\\\n\\\\tnestingLevel _ 0.! !\\\\n\\\\n\\\\n!Monitor methodsFor: 'signaling-default' stamp: 'NS 7/1/2002 21:57'!\\\\nsignal\\\\n\\\\t\\\\\\\"One process waiting for the default event is woken up.\\\\\\\"\\\\n\\\\n\\\\t^ self signal: nil! !\\\\n\\\\n!Monitor methodsFor: 'signaling-default' stamp: 'NS 7/1/2002 21:57'!\\\\nsignalAll\\\\n\\\\t\\\\\\\"All processes waiting for the default event are woken up.\\\\\\\"\\\\n\\\\n\\\\t^ self signalAll: nil! !\\\\n\\\\n\\\\n!Monitor methodsFor: 'signaling-specific' stamp: 'NS 4/13/2004 15:12'!\\\\nsignal: aSymbolOrNil\\\\n\\\\t\\\\\\\"One process waiting for the given event is woken up. If there is no process waiting \\\\n\\\\tfor this specific event, a process waiting for the default event gets resumed.\\\\\\\"\\\\n\\\\n\\\\t| queue |\\\\n\\\\tself checkOwnerProcess.\\\\n\\\\tqueue _ self queueFor: aSymbolOrNil.\\\\n\\\\tqueue isEmpty ifTrue: [queue _ self defaultQueue].\\\\n\\\\tself signalQueue: queue.! !\\\\n\\\\n!Monitor methodsFor: 'signaling-specific' stamp: 'NS 7/1/2002 22:02'!\\\\nsignalAll: aSymbolOrNil\\\\n\\\\t\\\\\\\"All process waiting for the given event or the default event are woken up.\\\\\\\"\\\\n\\\\n\\\\t| queue |\\\\n\\\\tself checkOwnerProcess.\\\\n\\\\tqueue _ self queueFor: aSymbolOrNil.\\\\n\\\\tself signalAllInQueue: self defaultQueue.\\\\n\\\\tqueue ~~ self defaultQueue ifTrue: [self signalAllInQueue: queue].! !\\\\n\\\\n!Monitor methodsFor: 'signaling-specific' stamp: 'NS 7/1/2002 22:02'!\\\\nsignalReallyAll\\\\n\\\\t\\\\\\\"All processes waiting for any events (default or specific) are woken up.\\\\\\\"\\\\n\\\\n\\\\tself checkOwnerProcess.\\\\n\\\\tself signalAll.\\\\n\\\\tself queueDict valuesDo: [:queue |\\\\n\\\\t\\\\tself signalAllInQueue: queue].! !\\\\n\\\\n\\\\n!Monitor methodsFor: 'synchronization' stamp: 'NS 4/14/2004 13:13'!\\\\ncritical: aBlock\\\\n\\\\t\\\\\\\"Critical section.\\\\n\\\\tExecutes aBlock as a critical section. At any time, only one process can be executing code \\\\n\\\\tin a critical section.\\\\n\\\\tNOTE: All the following synchronization operations are only valid inside the critical section \\\\n\\\\tof the monitor!!\\\\\\\"\\\\n\\\\n\\\\t| result |\\\\n\\\\t[self enter.\\\\n\\\\tresult _ aBlock value] ensure: [self exit].\\\\n\\\\t^ result.! !\\\\n\\\\n\\\\n!Monitor methodsFor: 'waiting-basic' stamp: 'NS 7/1/2002 21:55'!\\\\nwait\\\\n\\\\t\\\\\\\"Unconditional waiting for the default event.\\\\n\\\\tThe current process gets blocked and leaves the monitor, which means that the monitor\\\\n\\\\tallows another process to execute critical code. When the default event is signaled, the\\\\n\\\\toriginal process is resumed.\\\\\\\"\\\\n\\\\n\\\\t^ self waitMaxMilliseconds: nil! !\\\\n\\\\n!Monitor methodsFor: 'waiting-basic' stamp: 'NS 7/1/2002 21:56'!\\\\nwaitUntil: aBlock\\\\n\\\\t\\\\\\\"Conditional waiting for the default event.\\\\n\\\\tSee Monitor>>waitWhile: aBlock.\\\\\\\"\\\\n\\\\n\\\\t^ self waitUntil: aBlock for: nil! !\\\\n\\\\n!Monitor methodsFor: 'waiting-basic' stamp: 'fbs 3/24/2004 14:39'!\\\\nwaitWhile: aBlock\\\\n\\\\t\\\\\\\"Conditional waiting for the default event.\\\\n\\\\tThe current process gets blocked and leaves the monitor only if the argument block\\\\n\\\\tevaluates to true. This means that another process can enter the monitor. When the \\\\n\\\\tdefault event is signaled, the original process is resumed, which means that the condition\\\\n\\\\t(argument block) is checked again. Only if it evaluates to false, does execution proceed.\\\\n\\\\tOtherwise, the process gets blocked and leaves the monitor again...\\\\\\\"\\\\n\\\\n\\\\t^ self waitWhile: aBlock for: nil! !\\\\n\\\\n\\\\n!Monitor methodsFor: 'waiting-specific' stamp: 'NS 7/1/2002 21:58'!\\\\nwaitFor: aSymbolOrNil\\\\n\\\\t\\\\\\\"Unconditional waiting for the non-default event represented by the argument symbol.\\\\n\\\\tSame as Monitor>>wait, but the process gets only reactivated by the specific event and \\\\n\\\\tnot the default event.\\\\\\\"\\\\n\\\\n\\\\t^ self waitFor: aSymbolOrNil maxMilliseconds: nil! !\\\\n\\\\n!Monitor methodsFor: 'waiting-specific' stamp: 'NS 7/1/2002 22:01'!\\\\nwaitUntil: aBlock for: aSymbolOrNil\\\\n\\\\t\\\\\\\"Confitional waiting for the non-default event represented by the argument symbol.\\\\n\\\\tSee Monitor>>waitWhile:for: aBlock.\\\\\\\"\\\\n\\\\n\\\\t^ self waitUntil: aBlock for: aSymbolOrNil maxMilliseconds: nil! !\\\\n\\\\n!Monitor methodsFor: 'waiting-specific' stamp: 'NS 7/1/2002 22:01'!\\\\nwaitWhile: aBlock for: aSymbolOrNil\\\\n\\\\t\\\\\\\"Confitional waiting for the non-default event represented by the argument symbol.\\\\n\\\\tSame as Monitor>>waitWhile:for:, but the process gets only reactivated by the specific \\\\n\\\\tevent and not the default event.\\\\\\\"\\\\n\\\\n\\\\t^ self waitWhile: aBlock for: aSymbolOrNil maxMilliseconds: nil! !\\\\n\\\\n\\\\n!Monitor methodsFor: 'waiting-timeout' stamp: 'NS 7/1/2002 22:03'!\\\\nwaitFor: aSymbolOrNil maxMilliseconds: anIntegerOrNil\\\\n\\\\t\\\\\\\"Same as Monitor>>waitFor:, but the process gets automatically woken up when the \\\\n\\\\tspecified time has passed.\\\\\\\"\\\\n\\\\n\\\\tself checkOwnerProcess.\\\\n\\\\tself waitInQueue: (self queueFor: aSymbolOrNil) maxMilliseconds: anIntegerOrNil.! !\\\\n\\\\n!Monitor methodsFor: 'waiting-timeout' stamp: 'NS 7/1/2002 22:04'!\\\\nwaitFor: aSymbolOrNil maxSeconds: aNumber\\\\n\\\\t\\\\\\\"Same as Monitor>>waitFor:, but the process gets automatically woken up when the \\\\n\\\\tspecified time has passed.\\\\\\\"\\\\n\\\\n\\\\t^ self waitFor: aSymbolOrNil maxMilliseconds: (aNumber * 1000) asInteger! !\\\\n\\\\n!Monitor methodsFor: 'waiting-timeout' stamp: 'NS 7/1/2002 22:04'!\\\\nwaitMaxMilliseconds: anIntegerOrNil\\\\n\\\\t\\\\\\\"Same as Monitor>>wait, but the process gets automatically woken up when the \\\\n\\\\tspecified time has passed.\\\\\\\"\\\\n\\\\n\\\\t^ self waitFor: nil maxMilliseconds: anIntegerOrNil! !\\\\n\\\\n!Monitor methodsFor: 'waiting-timeout' stamp: 'NS 7/1/2002 22:05'!\\\\nwaitMaxSeconds: aNumber\\\\n\\\\t\\\\\\\"Same as Monitor>>wait, but the process gets automatically woken up when the \\\\n\\\\tspecified time has passed.\\\\\\\"\\\\n\\\\n\\\\t^ self waitMaxMilliseconds: (aNumber * 1000) asInteger! !\\\\n\\\\n!Monitor methodsFor: 'waiting-timeout' stamp: 'NS 7/1/2002 22:05'!\\\\nwaitUntil: aBlock for: aSymbolOrNil maxMilliseconds: anIntegerOrNil\\\\n\\\\t\\\\\\\"Same as Monitor>>waitUntil:for:, but the process gets automatically woken up when the \\\\n\\\\tspecified time has passed.\\\\\\\"\\\\n\\\\n\\\\t^ self waitWhile: [aBlock value not] for: aSymbolOrNil maxMilliseconds: anIntegerOrNil! !\\\\n\\\\n!Monitor methodsFor: 'waiting-timeout' stamp: 'NS 7/1/2002 22:05'!\\\\nwaitUntil: aBlock for: aSymbolOrNil maxSeconds: aNumber\\\\n\\\\t\\\\\\\"Same as Monitor>>waitUntil:for:, but the process gets automatically woken up when the \\\\n\\\\tspecified time has passed.\\\\\\\"\\\\n\\\\n\\\\t^ self waitUntil: aBlock for: aSymbolOrNil maxMilliseconds: (aNumber * 1000) asInteger! !\\\\n\\\\n!Monitor methodsFor: 'waiting-timeout' stamp: 'NS 7/1/2002 22:05'!\\\\nwaitUntil: aBlock maxMilliseconds: anIntegerOrNil\\\\n\\\\t\\\\\\\"Same as Monitor>>waitUntil:, but the process gets automatically woken up when the \\\\n\\\\tspecified time has passed.\\\\\\\"\\\\n\\\\n\\\\t^ self waitUntil: aBlock for: nil maxMilliseconds: anIntegerOrNil! !\\\\n\\\\n!Monitor methodsFor: 'waiting-timeout' stamp: 'NS 7/1/2002 22:06'!\\\\nwaitUntil: aBlock maxSeconds: aNumber\\\\n\\\\t\\\\\\\"Same as Monitor>>waitUntil:, but the process gets automatically woken up when the \\\\n\\\\tspecified time has passed.\\\\\\\"\\\\n\\\\n\\\\t^ self waitUntil: aBlock maxMilliseconds: (aNumber * 1000) asInteger! !\\\\n\\\\n!Monitor methodsFor: 'waiting-timeout' stamp: 'NS 7/1/2002 22:06'!\\\\nwaitWhile: aBlock for: aSymbolOrNil maxMilliseconds: anIntegerOrNil\\\\n\\\\t\\\\\\\"Same as Monitor>>waitWhile:for:, but the process gets automatically woken up when the \\\\n\\\\tspecified time has passed.\\\\\\\"\\\\n\\\\n\\\\tself checkOwnerProcess.\\\\n\\\\tself waitWhile: aBlock inQueue: (self queueFor: aSymbolOrNil) maxMilliseconds: anIntegerOrNil.! !\\\\n\\\\n!Monitor methodsFor: 'waiting-timeout' stamp: 'NS 7/1/2002 22:06'!\\\\nwaitWhile: aBlock for: aSymbolOrNil maxSeconds: aNumber\\\\n\\\\t\\\\\\\"Same as Monitor>>waitWhile:for:, but the process gets automatically woken up when the \\\\n\\\\tspecified time has passed.\\\\\\\"\\\\n\\\\n\\\\t^ self waitWhile: aBlock for: aSymbolOrNil maxMilliseconds: (aNumber * 1000) asInteger! !\\\\n\\\\n!Monitor methodsFor: 'waiting-timeout' stamp: 'NS 7/1/2002 22:06'!\\\\nwaitWhile: aBlock maxMilliseconds: anIntegerOrNil\\\\n\\\\t\\\\\\\"Same as Monitor>>waitWhile:, but the process gets automatically woken up when the \\\\n\\\\tspecified time has passed.\\\\\\\"\\\\n\\\\n\\\\t^ self waitWhile: aBlock for: nil maxMilliseconds: anIntegerOrNil! !\\\\n\\\\n!Monitor methodsFor: 'waiting-timeout' stamp: 'NS 7/1/2002 22:06'!\\\\nwaitWhile: aBlock maxSeconds: aNumber\\\\n\\\\t\\\\\\\"Same as Monitor>>waitWhile:, but the process gets automatically woken up when the \\\\n\\\\tspecified time has passed.\\\\\\\"\\\\n\\\\n\\\\t^ self waitWhile: aBlock maxMilliseconds: (aNumber * 1000) asInteger! !\\\\n\\\\n\\\\n!Monitor methodsFor: 'private' stamp: 'NS 4/13/2004 13:40'!\\\\ncheckOwnerProcess\\\\n\\\\tself isOwnerProcess\\\\n\\\\t\\\\tifFalse: [self error: 'Monitor access violation'].! !\\\\n\\\\n!Monitor methodsFor: 'private' stamp: 'NS 7/1/2002 15:06'!\\\\ndefaultQueue\\\\n\\\\tdefaultQueue ifNil: [defaultQueue _ OrderedCollection new].\\\\n\\\\t^ defaultQueue! !\\\\n\\\\n!Monitor methodsFor: 'private' stamp: 'NS 4/13/2004 13:37'!\\\\nenter\\\\n\\\\tself isOwnerProcess ifTrue: [\\\\n\\\\t\\\\tnestingLevel _ nestingLevel + 1.\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tmutex wait.\\\\n\\\\t\\\\townerProcess _ Processor activeProcess.\\\\n\\\\t\\\\tnestingLevel _ 1.\\\\n\\\\t].! !\\\\n\\\\n!Monitor methodsFor: 'private' stamp: 'NS 4/13/2004 13:38'!\\\\nexit\\\\n\\\\tnestingLevel _ nestingLevel - 1.\\\\n\\\\tnestingLevel < 1 ifTrue: [\\\\n\\\\t\\\\townerProcess _ nil.\\\\n\\\\t\\\\tmutex signal\\\\n\\\\t].! !\\\\n\\\\n!Monitor methodsFor: 'private' stamp: 'NS 4/13/2004 16:32'!\\\\nexitAndWaitInQueue: anOrderedCollection maxMilliseconds: anIntegerOrNil\\\\n\\\\t| lock delay |\\\\n\\\\tqueuesMutex \\\\n\\\\t\\\\tcritical: [lock _ anOrderedCollection addLast: Semaphore new].\\\\n\\\\tself exit.\\\\n\\\\tanIntegerOrNil isNil ifTrue: [\\\\n\\\\t\\\\tlock wait\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tdelay _ MonitorDelay signalLock: lock afterMSecs: anIntegerOrNil inMonitor: self queue: anOrderedCollection.\\\\n\\\\t\\\\tlock wait.\\\\n\\\\t\\\\tdelay unschedule.\\\\n\\\\t].\\\\n\\\\tself enter.! !\\\\n\\\\n!Monitor methodsFor: 'private' stamp: 'NS 7/1/2002 15:42'!\\\\nisOwnerProcess\\\\n\\\\t^ Processor activeProcess == ownerProcess! !\\\\n\\\\n!Monitor methodsFor: 'private' stamp: 'NS 4/13/2004 16:14'!\\\\nprivateCleanup\\\\n\\\\tqueuesMutex critical: [\\\\n\\\\t\\\\tdefaultQueue isEmpty ifTrue: [defaultQueue _ nil].\\\\n\\\\t\\\\tqueueDict ifNotNil: [\\\\n\\\\t\\\\t\\\\tqueueDict copy keysAndValuesDo: [:id :queue | \\\\n\\\\t\\\\t\\\\t\\\\tqueue isEmpty ifTrue: [queueDict removeKey: id]].\\\\n\\\\t\\\\t\\\\tqueueDict isEmpty ifTrue: [queueDict _ nil].\\\\n\\\\t\\\\t].\\\\n\\\\t].! !\\\\n\\\\n!Monitor methodsFor: 'private' stamp: 'NS 7/1/2002 15:10'!\\\\nqueueDict\\\\n\\\\tqueueDict ifNil: [queueDict _ IdentityDictionary new].\\\\n\\\\t^ queueDict.! !\\\\n\\\\n!Monitor methodsFor: 'private' stamp: 'NS 7/1/2002 15:12'!\\\\nqueueFor: aSymbol\\\\n\\\\taSymbol ifNil: [^ self defaultQueue].\\\\n\\\\t^ self queueDict \\\\n\\\\t\\\\tat: aSymbol \\\\n\\\\t\\\\tifAbsent: [self queueDict at: aSymbol put: OrderedCollection new].! !\\\\n\\\\n!Monitor methodsFor: 'private' stamp: 'NS 4/13/2004 16:10'!\\\\nsignalAllInQueue: anOrderedCollection\\\\n\\\\tqueuesMutex critical: [\\\\n\\\\t\\\\tanOrderedCollection do: [:lock | lock signal].\\\\n\\\\t\\\\tanOrderedCollection removeAllSuchThat: [:each | true].\\\\n\\\\t].! !\\\\n\\\\n!Monitor methodsFor: 'private' stamp: 'NS 4/13/2004 16:34'!\\\\nsignalLock: aSemaphore inQueue: anOrderedCollection\\\\n\\\\tqueuesMutex critical: [\\\\n\\\\t\\\\taSemaphore signal.\\\\n\\\\t\\\\tanOrderedCollection remove: aSemaphore ifAbsent: [].\\\\n\\\\t].! !\\\\n\\\\n!Monitor methodsFor: 'private' stamp: 'NS 4/13/2004 16:10'!\\\\nsignalQueue: anOrderedCollection\\\\n\\\\tqueuesMutex critical: [\\\\n\\\\t\\\\tanOrderedCollection isEmpty ifTrue: [^ self].\\\\n\\\\t\\\\tanOrderedCollection removeFirst signal.\\\\n\\\\t].! !\\\\n\\\\n!Monitor methodsFor: 'private' stamp: 'NS 7/1/2002 13:17'!\\\\nwaitInQueue: anOrderedCollection maxMilliseconds: anIntegerOrNil\\\\n\\\\tself exitAndWaitInQueue: anOrderedCollection maxMilliseconds: anIntegerOrNil.! !\\\\n\\\\n!Monitor methodsFor: 'private' stamp: 'NS 7/1/2002 13:17'!\\\\nwaitWhile: aBlock inQueue: anOrderedCollection maxMilliseconds: anIntegerOrNil\\\\n\\\\t[aBlock value] whileTrue: [self exitAndWaitInQueue: anOrderedCollection maxMilliseconds: anIntegerOrNil].! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMonitor class\\\\n\\\\tinstanceVariableNames: ''!\\\\nDelay subclass: #MonitorDelay\\\\n\\\\tinstanceVariableNames: 'monitor queue'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Kernel-Processes'!\\\\n!MonitorDelay commentStamp: 'NS 4/13/2004 16:51' prior: 0!\\\\nThis is a specialization of the class Delay that is used for the implementation of the class Monitor.!\\\\n\\\\n\\\\n!MonitorDelay methodsFor: 'private' stamp: 'NS 4/13/2004 16:26'!\\\\nsetDelay: anInteger forSemaphore: aSemaphore monitor: aMonitor queue: anOrderedCollection\\\\n\\\\tmonitor _ aMonitor.\\\\n\\\\tqueue _ anOrderedCollection.\\\\n\\\\tself setDelay: anInteger forSemaphore: aSemaphore.! !\\\\n\\\\n!MonitorDelay methodsFor: 'private' stamp: 'NS 4/13/2004 16:22'!\\\\nsignalWaitingProcess\\\\n\\\\t\\\\\\\"The delay time has elapsed; signal the waiting process.\\\\\\\"\\\\n\\\\n\\\\tbeingWaitedOn _ false.\\\\n\\\\tmonitor signalLock: delaySemaphore inQueue: queue.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMonitorDelay class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MonitorDelay class methodsFor: 'instance creation' stamp: 'NS 4/13/2004 16:25'!\\\\nsignalLock: aSemaphore afterMSecs: anInteger inMonitor: aMonitor queue: anOrderedCollection\\\\n\\\\tanInteger < 0 ifTrue: [self error: 'delay times cannot be negative'].\\\\n\\\\t^ (self new setDelay: anInteger forSemaphore: aSemaphore monitor: aMonitor queue: anOrderedCollection) schedule! !\\\\nTestCase subclass: #MonitorTest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'KernelTests-Processes'!\\\\n\\\\n!MonitorTest methodsFor: 'examples' stamp: 'md 3/19/2006 21:15'!\\\\ntestExample1\\\\n\\\\n\\\\t| producer1 producer2  monitor goal work counter goalReached finished |\\\\n\\\\tgoal _ (1 to: 1000) asOrderedCollection.\\\\n\\\\twork _ OrderedCollection new.\\\\n\\\\tcounter := 0.\\\\n\\\\tgoalReached := false.\\\\n\\\\tfinished := Semaphore new.\\\\n\\\\tmonitor := Monitor new.\\\\n\\\\n\\\\tproducer1 := [\\\\n       [monitor critical:\\\\n             [monitor waitUntil: [counter \\\\\\\\\\\\\\\\5 = 0].\\\\n              goalReached or: [work add: (counter := counter + 1)].\\\\n              goalReached := counter >= goal size.\\\\n              monitor signal\\\\n            ].\\\\n           goalReached\\\\n          ]\\\\n             whileFalse.\\\\n         finished signal.\\\\n\\\\t].\\\\n\\\\n\\\\tproducer2 := [\\\\n         [monitor critical:\\\\n                [monitor waitWhile: [counter \\\\\\\\\\\\\\\\5 = 0].\\\\n                 goalReached or: [work add: (counter := counter + 1)].\\\\n                 goalReached := counter >= goal size.\\\\n                 monitor signal].\\\\n         goalReached\\\\n       ] whileFalse.\\\\n     finished signal\\\\n\\\\t].\\\\n\\\\n\\\\tproducer1 forkAt: Processor userBackgroundPriority.\\\\n\\\\tproducer2 forkAt: Processor userBackgroundPriority.\\\\n\\\\n\\\\tfinished wait; wait.\\\\n\\\\tself assert: goal = work! !\\\\n\\\\n!MonitorTest methodsFor: 'examples' stamp: 'md 3/19/2006 21:19'!\\\\ntestExample2\\\\n\\\\t\\\\\\\"Here is a second version that does not use a semaphore to inform the \\\\n\\\\tforking process about termination of both forked processes\\\\\\\"\\\\n\\\\n\\\\t| producer1 producer2  monitor goal work counter goalReached activeProducers|\\\\n\\\\tgoal _ (1 to: 1000) asOrderedCollection.\\\\n\\\\twork _ OrderedCollection new.\\\\n\\\\tcounter := 0.\\\\n\\\\tgoalReached := false.\\\\n\\\\tactiveProducers := 0.\\\\n\\\\tmonitor := Monitor new.\\\\n\\\\n  producer1 :=\\\\n      [ monitor critical: [activeProducers := activeProducers + 1].\\\\n  [monitor critical:\\\\n            [monitor waitUntil: [counter \\\\\\\\\\\\\\\\5 = 0].\\\\n      goalReached or: [work add: (counter := counter + 1)].\\\\n     \\\\\\\" Transcript show: 'P1  '; show: counter printString; show: '  ';\\\\n       show: activeProducers printString; cr.\\\\\\\"\\\\n      goalReached := counter >= goal size.\\\\n      monitor signal\\\\n            ].\\\\n           goalReached\\\\n          ]\\\\n             whileFalse.\\\\n         monitor critical: [activeProducers := activeProducers - 1.\\\\n        monitor signal: #finish].\\\\n ] .\\\\n\\\\n producer2 :=\\\\n    [monitor critical: [activeProducers := activeProducers + 1].\\\\n\\\\n  [monitor critical:\\\\n          [monitor waitWhile: [counter \\\\\\\\\\\\\\\\5 = 0].\\\\n    goalReached or: [work add: (counter := counter + 1)].\\\\n    goalReached := counter >= goal size.\\\\n    monitor signal].\\\\n         goalReached ] whileFalse.\\\\n     monitor critical: [\\\\n\\\\t\\\\tactiveProducers := activeProducers - 1. \\\\n\\\\t\\\\tmonitor signal: #finish].\\\\n\\\\t].\\\\n\\\\n\\\\tproducer1 forkAt: Processor userBackgroundPriority.\\\\n\\\\tproducer2  forkAt: Processor userBackgroundPriority.\\\\n\\\\n\\\\n\\\\tmonitor critical: [\\\\n\\\\t\\\\tmonitor waitUntil: [activeProducers = 0 & (goalReached)]\\\\n\\\\t\\\\t\\\\t\\\\tfor: #finish.\\\\n  \\\\t].\\\\n\\\\n\\\\tself assert: goal = work\\\\n! !\\\\nTimespan subclass: #Month\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: 'ChronologyConstants'\\\\n\\\\tcategory: 'Kernel-Chronology'!\\\\n!Month commentStamp: 'brp 5/13/2003 09:48' prior: 0!\\\\nI represent a month.!\\\\n\\\\n\\\\n!Month methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 09:04'!\\\\nasMonth\\\\n\\\\n\\\\t^ self\\\\n! !\\\\n\\\\n!Month methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 09:05'!\\\\ndaysInMonth\\\\n\\\\n\\\\t^ self duration days.! !\\\\n\\\\n!Month methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 09:05'!\\\\nindex\\\\n\\\\n\\\\t^ self monthIndex\\\\n! !\\\\n\\\\n!Month methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 09:05'!\\\\nname\\\\n\\\\n\\\\n\\\\t^ self monthName\\\\n! !\\\\n\\\\n!Month methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 09:05'!\\\\nprevious\\\\n\\\\n\\\\n\\\\t^ self class starting: (self start - 1)\\\\n! !\\\\n\\\\n!Month methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 09:05'!\\\\nprintOn: aStream\\\\n\\\\n\\\\n\\\\taStream nextPutAll: self monthName, ' ', self year printString.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMonth class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!Month class methodsFor: 'smalltalk-80' stamp: 'brp 7/27/2003 16:27'!\\\\ndaysInMonth: indexOrName forYear: yearInteger \\\\n\\\\n\\\\t| index |\\\\n\\\\tindex _ indexOrName isInteger \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [indexOrName]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self indexOfMonth: indexOrName].\\\\n\\\\t^ (DaysInMonth at: index)\\\\n\\\\t\\\\t\\\\t+ ((index = 2\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [Year isLeapYear: yearInteger])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [1] ifFalse: [0])! !\\\\n\\\\n!Month class methodsFor: 'smalltalk-80' stamp: 'brp 8/23/2003 09:29'!\\\\nindexOfMonth: aMonthName\\\\n\\\\n\\\\n\\\\t1 to: 12 do: [ :i |  (aMonthName, '*' match: (MonthNames at: i)) ifTrue: [^i] ].\\\\n\\\\n\\\\tself error: aMonthName , ' is not a recognized month name'.! !\\\\n\\\\n!Month class methodsFor: 'smalltalk-80' stamp: 'brp 5/13/2003 09:02'!\\\\nnameOfMonth: anIndex\\\\n\\\\n\\\\t^ MonthNames at: anIndex.! !\\\\n\\\\n\\\\n!Month class methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 16:22'!\\\\nmonth: month year: year\\\\n\\\\t\\\\\\\"Create a Month for the given <year> and <month>.\\\\n\\\\t<month> may be a number or a String with the\\\\n\\\\tname of the month. <year> should be with 4 digits.\\\\\\\"\\\\n\\\\n\\\\t^ self starting: (DateAndTime year: year month: month day: 1)\\\\n! !\\\\n\\\\n!Month class methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 16:21'!\\\\nreadFrom: aStream\\\\n\\\\n\\\\t| m y c |\\\\n\\\\n\\\\tm _ (ReadWriteStream with: '') reset.\\\\n\\\\n\\\\t[(c _ aStream next) isSeparator] whileFalse: [m nextPut: c].\\\\n\\\\n\\\\t[(c _ aStream next) isSeparator] whileTrue.\\\\n\\\\n\\\\ty _ (ReadWriteStream with: '') reset.\\\\n\\\\n\\\\ty nextPut: c.\\\\n\\\\n\\\\t[aStream atEnd] whileFalse: [y nextPut: aStream next].\\\\n\\\\n\\\\n\\\\t^ self \\\\n\\\\t\\\\tmonth: m contents\\\\n\\\\t\\\\tyear: y contents\\\\n\\\\n\\\\\\\"Month readFrom: 'July 1998' readStream\\\\\\\"\\\\n! !\\\\n\\\\n!Month class methodsFor: 'squeak protocol' stamp: 'brp 7/1/2003 13:59'!\\\\nstarting: aDateAndTime duration: aDuration \\\\n\\\\t\\\\\\\"Override - a each month has a defined duration\\\\\\\"\\\\n\\\\t| start adjusted days |\\\\n\\\\tstart _ aDateAndTime asDateAndTime.\\\\n\\\\tadjusted _ DateAndTime\\\\n\\\\t\\\\t\\\\t\\\\tyear: start year\\\\n\\\\t\\\\t\\\\t\\\\tmonth: start month\\\\n\\\\t\\\\t\\\\t\\\\tday: 1.\\\\n\\\\tdays _ self daysInMonth: adjusted month forYear: adjusted year.\\\\n\\\\t^ super\\\\n\\\\t\\\\tstarting: adjusted\\\\n\\\\t\\\\tduration: (Duration days: days)! !\\\\nClassTestCase subclass: #MonthTest\\\\n\\\\tinstanceVariableNames: 'month'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'KernelTests-Chronology'!\\\\n!MonthTest commentStamp: 'brp 7/26/2003 22:44' prior: 0!\\\\nThis is the unit test for the class Month.\\\\n!\\\\n\\\\n\\\\n!MonthTest methodsFor: 'Coverage' stamp: 'brp 7/27/2003 12:42'!\\\\nclassToBeTested\\\\n\\\\n\\\\t^ Month! !\\\\n\\\\n!MonthTest methodsFor: 'Coverage' stamp: 'brp 7/26/2003 23:29'!\\\\nselectorsToBeIgnored\\\\n\\\\n\\\\t| deprecated private special |\\\\n\\\\tdeprecated := #().\\\\n\\\\tprivate := #( #printOn: ).\\\\n\\\\tspecial := #( #next ).\\\\n\\\\n\\\\t^ super selectorsToBeIgnored, deprecated, private, special.! !\\\\n\\\\n\\\\n!MonthTest methodsFor: 'Running' stamp: 'brp 8/6/2003 19:37'!\\\\nsetUp\\\\n\\\\n\\\\tsuper setUp.\\\\n\\\\tmonth _ Month month: 7 year: 1998.! !\\\\n\\\\n!MonthTest methodsFor: 'Running' stamp: 'brp 8/6/2003 19:37'!\\\\ntearDown\\\\n\\\\n\\\\tsuper tearDown.\\\\n\\\\tmonth _ nil.! !\\\\n\\\\n\\\\n!MonthTest methodsFor: 'Tests' stamp: 'brp 7/26/2003 22:52'!\\\\ntestConverting\\\\n\\\\n\\\\tself assert: month asDate = '1 July 1998' asDate! !\\\\n\\\\n!MonthTest methodsFor: 'Tests' stamp: 'brp 1/30/2005 09:35'!\\\\ntestEnumerating\\\\n\\\\t| weeks |\\\\n\\\\tweeks := OrderedCollection new.\\\\n\\\\tmonth weeksDo: [ :w | weeks add: w start ].\\\\n\\\\t0 to: 4 do: [ :i | weeks remove: (Week starting:  ('29 June 1998' asDate addDays: i * 7)) start ].\\\\n\\\\tself assert: weeks isEmpty! !\\\\n\\\\n!MonthTest methodsFor: 'Tests' stamp: 'brp 8/23/2003 16:08'!\\\\ntestInquiries\\\\n\\\\n\\\\tself \\\\n\\\\t\\\\tassert: month index = 7;\\\\n\\\\t\\\\tassert: month name = #July;\\\\n\\\\t\\\\tassert: month duration = (31 days).\\\\n! !\\\\n\\\\n!MonthTest methodsFor: 'Tests' stamp: 'nk 7/30/2004 17:52'!\\\\ntestInstanceCreation\\\\n\\\\t| m1 m2 |\\\\n\\\\tm1 := Month starting:  '4 July 1998' asDate.\\\\n\\\\tm2 := Month month: #July year: 1998.\\\\n\\\\tself\\\\n\\\\t\\\\tassert: month = m1;\\\\n\\\\t\\\\tassert: month = m2! !\\\\n\\\\n!MonthTest methodsFor: 'Tests' stamp: 'brp 7/26/2003 23:02'!\\\\ntestPreviousNext\\\\n\\\\t| n p |\\\\n\\\\tn := month next.\\\\n\\\\tp := month previous.\\\\n\\\\n\\\\tself\\\\n\\\\t\\\\tassert: n year = 1998;\\\\n\\\\t\\\\tassert: n index = 8;\\\\n\\\\t\\\\tassert: p year = 1998;\\\\n\\\\t\\\\tassert: p index = 6.\\\\n\\\\n! !\\\\n\\\\n!MonthTest methodsFor: 'Tests' stamp: 'brp 7/26/2003 22:50'!\\\\ntestPrinting\\\\n\\\\n\\\\tself \\\\n\\\\t\\\\tassert: month printString = 'July 1998'.\\\\n! !\\\\n\\\\n!MonthTest methodsFor: 'Tests' stamp: 'brp 7/26/2003 22:46'!\\\\ntestReadFrom\\\\n\\\\n\\\\t| m |\\\\n\\\\tm := Month readFrom: 'July 1998' readStream.\\\\n\\\\tself \\\\n\\\\t\\\\tassert: m = month! !\\\\nGesturalEvent subclass: #MoodGesturalEvent\\\\n\\\\tinstanceVariableNames: 'state'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Speech-Events'!\\\\n\\\\n!MoodGesturalEvent methodsFor: 'accessing' stamp: 'len 9/7/1999 02:22'!\\\\nstate\\\\n\\\\t^ state! !\\\\n\\\\n!MoodGesturalEvent methodsFor: 'accessing' stamp: 'stephaneducasse 2/3/2006 22:22'!\\\\nstate: aSymbol\\\\n\\\\tstate := aSymbol asSymbol! !\\\\n\\\\n\\\\n!MoodGesturalEvent methodsFor: 'playing' stamp: 'len 9/7/1999 02:23'!\\\\nactOn: aHeadMorph\\\\n\\\\taHeadMorph face perform: self state! !\\\\n\\\\n\\\\n!MoodGesturalEvent methodsFor: 'printing' stamp: 'len 9/7/1999 02:26'!\\\\nprintOn: aStream\\\\n\\\\taStream nextPutAll: 'set ', self state, ' mood'! !\\\\nObject subclass: #Morph\\\\n\\\\tinstanceVariableNames: 'bounds owner submorphs fullBounds color extension'\\\\n\\\\tclassVariableNames: 'EmptyArray'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Kernel'!\\\\n!Morph commentStamp: 'efc 2/26/2003 20:01' prior: 0!\\\\nA Morph (from the Greek \\\\\\\"shape\\\\\\\" or \\\\\\\"form\\\\\\\") is an interactive graphical object. General information on the Morphic system can be found at http://minnow.cc.gatech.edu/squeak/30. \\\\n\\\\nMorphs exist in a tree, rooted at a World (generally a PasteUpMorph). The morphs owned by a morph are its submorphs. Morphs are drawn recursively; if a Morph has no owner it never gets drawn. To hide a Morph and its submorphs, set its #visible property to false using the #visible: method. \\\\n\\\\nThe World (screen) coordinate system is used for most coordinates, but can be changed if there is a TransformMorph somewhere in the owner chain. \\\\n\\\\nMy instance variables have accessor methods (e.g., #bounds, #bounds:). Most users should use the accessor methods instead of using the instance variables directly.\\\\n\\\\nStructure:\\\\ninstance var \\\\tType \\\\t\\\\t\\\\tDescription \\\\nbounds \\\\t\\\\t\\\\tRectangle \\\\t\\\\tA Rectangle indicating my position and a size that will enclose \\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tme. \\\\nowner \\\\t\\\\t\\\\tMorph\\\\t\\\\t \\\\tMy parent Morph, or nil for the top-level Morph, which is a\\\\n \\\\t\\\\t\\\\t\\\\tor nil\\\\t\\\\t\\\\tworld, typically a PasteUpMorph.\\\\nsubmorphs \\\\t\\\\tArray \\\\t\\\\t\\\\tMy child Morphs. \\\\nfullBounds \\\\t\\\\tRectangle \\\\t\\\\tA Rectangle minimally enclosing me and my submorphs. \\\\ncolor \\\\t\\\\t\\\\tColor \\\\t\\\\t\\\\tMy primary color. Subclasses can use this in different ways. \\\\nextension \\\\t\\\\tMorphExtension Allows extra properties to be stored without adding a\\\\n\\\\t\\\\t\\\\t\\\\tor nil  \\\\t\\\\t\\\\t\\\\tstorage burden to all morphs. \\\\n\\\\nBy default, Morphs do not position their submorphs. Morphs may position their submorphs directly or use a LayoutPolicy to automatically control their submorph positioning.\\\\n\\\\nAlthough Morph has some support for BorderStyle, most users should use BorderedMorph if they want borders.!\\\\n]style[(2 5 130 37 59 12 325 14 209 12 2 4 4 11 1 11 9 90 5 123 5 35 9 66 5 78 14 209 12 91 11 24 13 22)f1,f1LMorph Hierarchy;,f1,f1Rhttp://minnow.cc.gatech.edu/squeak/30;,f1,f1LPasteUpMorph Comment;,f1,f1LTransformMorph Comment;,f1,f1u,f1,f1u,f1,f1u,f1i,f1,f1LRectangle Comment;,f1,f1LMorph Comment;,f1,f1LArray Comment;,f1,f1LRectangle Comment;,f1,f1LColor Comment;,f1,f1LMorphExtension Comment;,f1,f1LLayoutPolicy Comment;,f1,f1LBorderStyle Comment;,f1,f1LBorderedMorph Comment;,f1!\\\\n\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 8/11/1998 16:46'!\\\\nactorState\\\\n\\\\t\\\\\\\"This method instantiates actorState as a side-effect.\\\\n\\\\tFor simple queries, use actorStateOrNil\\\\\\\"\\\\n\\\\t| state |\\\\n\\\\tstate _ self actorStateOrNil.\\\\n\\\\tstate ifNil:\\\\n\\\\t\\\\t[state _ ActorState new initializeFor: self assuredPlayer.\\\\n\\\\t\\\\tself actorState: state].\\\\n\\\\t^ state! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'md 2/27/2006 09:51'!\\\\nactorStateOrNil\\\\n\\\\t\\\\\\\"answer the redeiver's actorState\\\\\\\"\\\\n\\\\t^ extension ifNotNil: [extension actorState]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'dgd 2/16/2003 21:52'!\\\\nactorState: anActorState \\\\n\\\\t\\\\\\\"change the receiver's actorState\\\\\\\"\\\\n\\\\tself assureExtension actorState: anActorState! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'ar 12/18/2001 20:09'!\\\\nadoptPaneColor: paneColor\\\\n\\\\tself submorphsDo:[:m| m adoptPaneColor: paneColor].! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'md 2/27/2006 09:51'!\\\\nballoonText\\\\n\\\\t\\\\\\\"Answer balloon help text or nil, if no help is available.  \\\\n\\\\tNB: subclasses may override such that they programatically  \\\\n\\\\tconstruct the text, for economy's sake, such as model phrases in \\\\n\\\\ta Viewer\\\\\\\"\\\\n\\\\n\\\\t| text balloonSelector aString |\\\\n\\\\textension ifNil: [^nil].\\\\n\\\\t(text := extension balloonText) ifNotNil: [^text].\\\\n\\\\t(balloonSelector := extension balloonTextSelector) ifNotNil: \\\\n\\\\t\\\\t\\\\t[aString := ScriptingSystem helpStringOrNilFor: balloonSelector.\\\\n\\\\t\\\\t\\\\t(aString isNil and: [balloonSelector == #methodComment]) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [aString := self methodCommentAsBalloonHelp].\\\\n\\\\t\\\\t\\\\t((aString isNil and: [balloonSelector numArgs = 0]) \\\\n\\\\t\\\\t\\\\t\\\\tand: [self respondsTo: balloonSelector]) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [aString := self perform: balloonSelector]].\\\\n\\\\t^aString ifNotNil: \\\\n\\\\t\\\\t\\\\t[aString asString \\\\n\\\\t\\\\t\\\\t\\\\twithNoLineLongerThan: Preferences maxBalloonHelpLineLength]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'md 2/27/2006 09:52'!\\\\nballoonTextSelector\\\\n\\\\t\\\\\\\"Answer balloon text selector item in the extension, nil if none\\\\\\\"\\\\n\\\\t^ extension ifNotNil: [extension balloonTextSelector]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'dgd 2/16/2003 21:50'!\\\\nballoonTextSelector: aSelector \\\\n\\\\t\\\\\\\"change the receiver's balloonTextSelector\\\\\\\"\\\\n\\\\tself assureExtension balloonTextSelector: aSelector! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 10/31/2001 21:06'!\\\\nbeFlap: aBool\\\\n\\\\t\\\\\\\"Mark the receiver with the #flap property, or unmark it\\\\\\\"\\\\n\\\\n\\\\taBool\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self setProperty: #flap toValue: true.\\\\n\\\\t\\\\t\\\\tself hResizing: #rigid.\\\\n\\\\t\\\\t\\\\tself vResizing: #rigid]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self removeProperty: #flap]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'dgd 2/16/2003 21:57'!\\\\nbeSticky\\\\n\\\\t\\\\\\\"make the receiver sticky\\\\\\\"\\\\n\\\\tself assureExtension sticky: true! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'md 2/27/2006 09:52'!\\\\nbeUnsticky\\\\n\\\\t\\\\\\\"If the receiver is marked as sticky, make it now be unsticky\\\\\\\"\\\\n\\\\textension ifNotNil: [extension sticky: false]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'ar 8/25/2001 18:28'!\\\\nborderColor\\\\n\\\\t^self borderStyle color! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'nk 4/15/2004 10:55'!\\\\nborderColor: aColorOrSymbolOrNil \\\\n\\\\t\\\\\\\"Unfortunately, the argument to borderColor could be more than \\\\tjust a color. \\\\n\\\\tIt could also be a symbol, in which case it is to be interpreted as a style identifier.\\\\n\\\\tBut I might not be able to draw that kind of border, so it may have to be ignored.\\\\n\\\\tOr it could be nil, in which case I should revert to the default border.\\\\\\\"\\\\n\\\\n\\\\t| style newStyle |\\\\n\\\\tstyle := self borderStyle.\\\\n\\\\tstyle baseColor = aColorOrSymbolOrNil\\\\n\\\\t\\\\tifTrue: [^ self].\\\\n\\\\n\\\\taColorOrSymbolOrNil isColor\\\\n\\\\t\\\\tifTrue: [style style = #none \\\\\\\"default border?\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self borderStyle: (SimpleBorder width: 0 color: aColorOrSymbolOrNil)]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [style baseColor: aColorOrSymbolOrNil.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself changed].\\\\n\\\\t\\\\t\\\\t^ self].\\\\n\\\\n\\\\tself\\\\n\\\\t\\\\tborderStyle: ( ({ nil. #none } includes: aColorOrSymbolOrNil)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [BorderStyle default]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [ \\\\\\\"a symbol\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself doesBevels ifFalse: [ ^self ].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnewStyle := (BorderStyle perform: aColorOrSymbolOrNil)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcolor: style color;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twidth: style width;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tyourself.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(self canDrawBorder: newStyle)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [newStyle]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [style]])! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'ar 11/26/2001 14:53'!\\\\nborderStyle\\\\n\\\\t^(self valueOfProperty: #borderStyle ifAbsent:[BorderStyle default]) trackColorFrom: self! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 11/26/2001 16:18'!\\\\nborderStyleForSymbol: aStyleSymbol\\\\n\\\\t\\\\\\\"Answer a suitable BorderStyle for me of the type represented by a given symbol\\\\\\\"\\\\n\\\\n\\\\t| aStyle existing |\\\\n\\\\taStyle _ BorderStyle borderStyleForSymbol: aStyleSymbol asSymbol.\\\\n\\\\taStyle ifNil: [self error: 'bad style'].\\\\n\\\\texisting _ self borderStyle.\\\\n\\\\taStyle width: existing width;\\\\n\\\\t\\\\tbaseColor: existing baseColor.\\\\n\\\\t^ (self canDrawBorder: aStyle)\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[aStyle]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[nil]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'ar 12/11/2001 22:14'!\\\\nborderStyle: newStyle\\\\n\\\\tnewStyle = self borderStyle ifFalse:[\\\\n\\\\t\\\\t(self canDrawBorder: newStyle) ifFalse:[\\\\n\\\\t\\\\t\\\\t\\\\\\\"Replace the suggested border with a simple one\\\\\\\"\\\\n\\\\t\\\\t\\\\t^self borderStyle: (BorderStyle width: newStyle width color: (newStyle trackColorFrom: self) color)].\\\\n\\\\t\\\\tself setProperty: #borderStyle toValue: newStyle.\\\\n\\\\t\\\\tself changed].! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'ar 8/25/2001 18:28'!\\\\nborderWidth\\\\n\\\\t^self borderStyle width! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'di 2/6/2001 14:02'!\\\\nborderWidthForRounding\\\\n\\\\n\\\\t^ self borderWidth! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'nk 4/14/2004 17:48'!\\\\nborderWidth: aNumber\\\\n\\\\t| style |\\\\n\\\\tstyle _ self borderStyle.\\\\n\\\\tstyle width = aNumber ifTrue: [ ^self ].\\\\n\\\\n\\\\tstyle style = #none\\\\n\\\\t\\\\tifTrue: [ self borderStyle: (SimpleBorder width: aNumber color: Color transparent) ]\\\\n\\\\t\\\\tifFalse: [ style width: aNumber. self changed ].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'dgd 9/1/2004 16:10'!\\\\nclearArea\\\\n\\\\t\\\\\\\"Answer the clear area of the receiver. It means the area free  \\\\n\\\\tof docking bars.\\\\\\\"\\\\n\\\\t| visTop visBottom visLeft visRight |\\\\n\\\\n\\\\tvisTop := self top.\\\\n\\\\tvisBottom := self bottom.\\\\n\\\\tvisLeft := self left.\\\\n\\\\tvisRight := self right.\\\\n\\\\n\\\\tself dockingBars\\\\n\\\\t\\\\tdo: [:each | \\\\n\\\\t\\\\t\\\\t(each isAdheringToTop and: [each bottom > visTop])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [visTop := each bottom].\\\\n\\\\n\\\\t\\\\t\\\\t(each isAdheringToBottom and: [each top < visBottom])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [visBottom := each top].\\\\n\\\\n\\\\t\\\\t\\\\t(each isAdheringToLeft and: [each right > visLeft])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [visLeft := each right].\\\\n\\\\n\\\\t\\\\t\\\\t(each isAdheringToRight and: [each left < visRight])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [visRight := each left]\\\\n\\\\t\\\\t].\\\\n\\\\n\\\\t^ Rectangle\\\\n\\\\t\\\\tleft: visLeft\\\\n\\\\t\\\\tright: visRight\\\\n\\\\t\\\\ttop: visTop\\\\n\\\\t\\\\tbottom: visBottom\\\\n! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'tk 2/15/2001 15:55'!\\\\ncolor\\\\n\\\\n\\\\t^ color \\\\t\\\\\\\"has already been set to ((self valueOfProperty: #fillStyle) asColor)\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'ar 8/15/2001 22:40'!\\\\ncolorForInsets\\\\n\\\\t\\\\\\\"Return the color to be used for shading inset borders.  The default is my own color, but it might want to be, eg, my owner's color.  Whoever's color ends up prevailing, the color itself gets the last chance to determine, so that when, for example, an InfiniteForm serves as the color, callers won't choke on some non-Color object being returned\\\\\\\"\\\\n\\\\t(color isColor and:[color isTransparent and:[owner notNil]]) ifTrue:[^owner colorForInsets].\\\\n\\\\t^ color colorForInsets\\\\n! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'ar 8/6/2001 09:03'!\\\\ncolor: aColor\\\\n\\\\t\\\\\\\"Set the receiver's color.  Directly set the color if appropriate, else go by way of fillStyle\\\\\\\"\\\\n\\\\n\\\\t(aColor isColor or: [aColor isKindOf: InfiniteForm]) ifFalse:[^ self fillStyle: aColor].\\\\n\\\\tcolor = aColor ifFalse:\\\\n\\\\t\\\\t[self removeProperty: #fillStyle.\\\\n\\\\t\\\\tcolor _ aColor.\\\\n\\\\t\\\\tself changed]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'dgd 4/4/2006 17:14'!\\\\nconnections\\\\n\\\\t\\\\\\\"Empty method in absence of connectors\\\\\\\"\\\\n\\\\t^ #()! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'ar 12/27/2001 17:56'!\\\\ncouldHaveRoundedCorners\\\\n\\\\t^ true! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'nk 4/15/2004 07:50'!\\\\ndoesBevels\\\\n\\\\t\\\\\\\"To return true means that this object can show bevelled borders, and\\\\n\\\\ttherefore can accept, eg, #raised or #inset as valid borderColors.\\\\n\\\\tMust be overridden by subclasses that do not support bevelled borders.\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'md 2/27/2006 09:53'!\\\\neventHandler\\\\n\\\\t\\\\\\\"answer the receiver's eventHandler\\\\\\\"\\\\n\\\\t^ extension ifNotNil: [extension eventHandler] ! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'dgd 2/16/2003 19:25'!\\\\neventHandler: anEventHandler \\\\n\\\\t\\\\\\\"Note that morphs can share eventHandlers and all is OK. \\\\\\\"\\\\n\\\\tself assureExtension eventHandler: anEventHandler! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'ar 9/22/2000 13:36'!\\\\nforwardDirection\\\\n\\\\t\\\\\\\"Return the receiver's forward direction (in eToy terms)\\\\\\\"\\\\n\\\\t^self valueOfProperty: #forwardDirection ifAbsent:[0.0]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'di 1/3/1999 12:25'!\\\\nhasTranslucentColor\\\\n\\\\t\\\\\\\"Answer true if this any of this morph is translucent but not transparent.\\\\\\\"\\\\n\\\\n\\\\t^ color isColor and: [color isTranslucentColor]\\\\n! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 11/30/1998 12:44'!\\\\nhighlight\\\\n\\\\t\\\\\\\"The receiver is being asked to appear in a highlighted state.  Mostly used for textual morphs\\\\\\\"\\\\n\\\\tself color: self highlightColor! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 3/6/1999 02:09'!\\\\nhighlightColor\\\\n\\\\t\\\\n\\\\t| val |\\\\n\\\\t^ (val _ self valueOfProperty: #highlightColor)\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t[val ifNil: [self error: 'nil highlightColor']]\\\\n\\\\t\\\\tifNil:\\\\n\\\\t\\\\t\\\\t[owner ifNil: [self color] ifNotNil: [owner highlightColor]]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 7/2/1998 13:51'!\\\\nhighlightColor: aColor\\\\n\\\\tself setProperty: #highlightColor toValue: aColor! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'tk 1/31/2002 10:25'!\\\\ninsetColor\\\\n\\\\towner ifNil:[^self color].\\\\n\\\\t^ self colorForInsets! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 6/13/2001 01:04'!\\\\nisFlap\\\\n\\\\t\\\\\\\"Answer whether the receiver claims to be a flap\\\\\\\"\\\\n\\\\n\\\\t^ self hasProperty: #flap! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'md 2/27/2006 09:53'!\\\\nisLocked\\\\n\\\\t\\\\\\\"answer whether the receiver is Locked\\\\\\\"\\\\n\\\\textension ifNil: [^ false].\\\\n\\\\t^ extension locked! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 10/27/2000 17:42'!\\\\nisShared\\\\n\\\\t\\\\\\\"Answer whether the receiver has the #shared property.  This property allows it to be treated as a 'background' item\\\\\\\"\\\\n\\\\n\\\\t^ self hasProperty: #shared! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'md 2/27/2006 09:57'!\\\\nisSticky\\\\n\\\\t\\\\\\\"answer whether the receiver is Sticky\\\\\\\"\\\\n\\\\textension ifNil: [^ false].\\\\n\\\\t^ extension sticky! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 8/4/97 12:05'!\\\\nlock\\\\n\\\\tself lock: true! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'md 2/27/2006 09:58'!\\\\nlock: aBoolean \\\\n\\\\t\\\\\\\"change the receiver's lock property\\\\\\\"\\\\n\\\\t(extension isNil and: [aBoolean not]) ifTrue: [^ self].\\\\n\\\\tself assureExtension locked: aBoolean! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 6/20/2001 15:45'!\\\\nmethodCommentAsBalloonHelp\\\\n\\\\t\\\\\\\"Given that I am a morph that is associated with an object and a method, answer a suitable method comment relating to that object & method if possible\\\\\\\"\\\\n\\\\n\\\\t| inherentSelector actual |\\\\n\\\\t(inherentSelector _ self valueOfProperty: #inherentSelector)\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t[(actual _ (self ownerThatIsA: PhraseTileMorph orA: SyntaxMorph) actualObject) ifNotNil:\\\\n\\\\t\\\\t\\\\t\\\\t[^ actual class precodeCommentOrInheritedCommentFor: inherentSelector]].\\\\n\\\\t^ nil! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 10/23/1999 22:35'!\\\\nmodelOrNil\\\\n\\\\t^ nil! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'md 2/27/2006 09:54'!\\\\nplayer\\\\n\\\\t\\\\\\\"answer the receiver's player\\\\\\\"\\\\n\\\\t^ extension ifNotNil: [extension player]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'dgd 4/4/2006 17:18'!\\\\nplayerRepresented\\\\n\\\\t\\\\\\\"Answer the player represented by the receiver.  Morphs that serve as references to other morphs reimplement this; be default a morph represents its own player.\\\\\\\"\\\\n\\\\n\\\\t^ self player! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'dgd 2/16/2003 21:53'!\\\\nplayer: anObject \\\\n\\\\t\\\\\\\"change the receiver's player\\\\\\\"\\\\n\\\\tself assureExtension player: anObject! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 3/3/1999 13:08'!\\\\npresenter\\\\n\\\\t^ owner ifNotNil: [owner presenter] ifNil: [self currentWorld presenter]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'dgd 3/7/2003 15:24'!\\\\nraisedColor\\\\n\\\\t\\\\\\\"Return the color to be used for shading raised borders. The \\\\n\\\\tdefault is my own color, but it might want to be, eg, my \\\\n\\\\towner's color. Whoever's color ends up prevailing, the color \\\\n\\\\titself gets the last chance to determine, so that when, for \\\\n\\\\texample, an InfiniteForm serves as the color, callers won't choke \\\\n\\\\ton some non-Color object being returned\\\\\\\"\\\\n\\\\t(color isColor\\\\n\\\\t\\\\t\\\\tand: [color isTransparent\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [owner notNil]])\\\\n\\\\t\\\\tifTrue: [^ owner raisedColor].\\\\n\\\\t^ color asColor raisedColor!\\\\n]style[(11 2 355 3 5 18 5 26 5 24 5 18 5 20)f2b,f2,f2c145043000,f2,f2cmagenta;,f2,f2cmagenta;,f2,f2cmagenta;,f2,f2cmagenta;,f2,f2cmagenta;,f2! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 3/6/1999 02:09'!\\\\nregularColor\\\\n\\\\t\\\\n\\\\t| val |\\\\n\\\\t^ (val _ self valueOfProperty: #regularColor)\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t[val ifNil: [self error: 'nil regularColor']]\\\\n\\\\t\\\\tifNil:\\\\n\\\\t\\\\t\\\\t[owner ifNil: [self color] ifNotNil: [owner regularColor]]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 7/2/1998 13:51'!\\\\nregularColor: aColor\\\\n\\\\tself setProperty: #regularColor toValue: aColor! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 8/29/2000 14:56'!\\\\nrememberedColor\\\\n\\\\t\\\\\\\"Answer a rememberedColor, or nil if none\\\\\\\"\\\\n\\\\n\\\\t^ self valueOfProperty: #rememberedColor ifAbsent: [nil]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 8/29/2000 15:47'!\\\\nrememberedColor: aColor\\\\n\\\\t\\\\\\\"Place aColor in a property so I can retrieve it later.  A tortuous but expedient flow of data\\\\\\\"\\\\n\\\\n\\\\t^ self setProperty: #rememberedColor toValue: aColor! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 11/15/2001 16:33'!\\\\nresistsRemoval\\\\n\\\\t\\\\\\\"Answer whether the receiver is marked as resisting removal\\\\\\\"\\\\n\\\\n\\\\t^ self hasProperty: #resistsRemoval! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 11/15/2001 16:33'!\\\\nresistsRemoval: aBoolean\\\\n\\\\t\\\\\\\"Set the receiver's resistsRemoval property as indicated\\\\\\\"\\\\n\\\\n\\\\taBoolean\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self setProperty: #resistsRemoval toValue: true]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self removeProperty: #resistsRemoval]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'nk 9/4/2004 10:49'!\\\\nscaleFactor\\\\n\\\\t^self valueOfProperty: #scaleFactor ifAbsent: [ 1.0 ]\\\\n! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 11/26/2001 16:16'!\\\\nsetBorderStyle: aSymbol\\\\n\\\\t\\\\\\\"Set the border style of my costume\\\\\\\"\\\\n\\\\n\\\\t| aStyle |\\\\n\\\\taStyle _ self borderStyleForSymbol: aSymbol.\\\\n\\\\taStyle ifNil: [^ self].\\\\n\\\\t(self canDrawBorder: aStyle)\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self borderStyle: aStyle]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'tk 12/4/1998 13:06'!\\\\nsqkPage\\\\n\\\\t^ self valueOfProperty: #SqueakPage! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'md 2/27/2006 08:33'!\\\\nsticky: aBoolean \\\\n\\\\t\\\\\\\"change the receiver's sticky property\\\\\\\"\\\\n\\\\textension sticky: aBoolean! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'RAA 2/19/2001 17:38'!\\\\ntoggleLocked\\\\n\\\\t\\\\n\\\\tself lock: self isLocked not! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 11/15/2001 12:21'!\\\\ntoggleResistsRemoval\\\\n\\\\t\\\\\\\"Toggle the resistsRemoval property\\\\\\\"\\\\n\\\\n\\\\tself resistsRemoval\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self removeProperty: #resistsRemoval]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self setProperty: #resistsRemoval toValue: true]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'md 2/27/2006 08:53'!\\\\ntoggleStickiness\\\\n\\\\t\\\\\\\"togle the receiver's Stickiness\\\\\\\"\\\\n\\\\textension ifNil: [^ self beSticky].\\\\n\\\\textension sticky: extension sticky not! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 11/30/1998 12:44'!\\\\nunHighlight\\\\n\\\\tself color: self regularColor! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'di 8/11/1998 12:33'!\\\\nunlock\\\\n\\\\tself lock: false! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 8/15/97 23:59'!\\\\nunlockContents\\\\n\\\\tself submorphsDo:\\\\n\\\\t\\\\t[:m | m unlock]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'tk 2/17/1999 11:45'!\\\\nurl\\\\n\\\\t\\\\\\\"If I have been assigned a url, return it.  For PasteUpMorphs mostly.\\\\\\\"\\\\n\\\\t| sq |\\\\n\\\\t(sq _ self sqkPage) ifNotNil: [^ sq url].\\\\n\\\\t^ self valueOfProperty: #url\\\\n\\\\t\\\\t! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'tk 12/16/1998 11:54'!\\\\nuserString\\\\n\\\\t\\\\\\\"Do I have a text string to be searched on?\\\\\\\"\\\\n\\\\n\\\\t^ nil! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'dgd 9/27/2004 11:45'!\\\\nviewBox\\\\n\\\\t^ self pasteUpMorph viewBox! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'dgd 9/1/2004 16:14'!\\\\nvisibleClearArea\\\\n\\\\t\\\\\\\"Answer the receiver visible clear area. The intersection \\\\n\\\\tbetween the clear area and the viewbox.\\\\\\\"\\\\n\\\\t^ self viewBox intersect: self clearArea! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'dgd 4/4/2006 17:14'!\\\\nwantsEmbeddingsVocabulary\\\\n\\\\t\\\\\\\"Empty method in absence of connectors\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'ar 6/23/2001 16:06'!\\\\nwantsToBeCachedByHand\\\\n\\\\t\\\\\\\"Return true if the receiver wants to be cached by the hand when it is dragged around.\\\\n\\\\tNote: The default implementation queries all submorphs since subclasses may have shapes that do not fill the receiver's bounds completely.\\\\\\\"\\\\n\\\\tself hasTranslucentColor ifTrue:[^false].\\\\n\\\\tself submorphsDo:[:m|\\\\n\\\\t\\\\tm wantsToBeCachedByHand ifFalse:[^false].\\\\n\\\\t].\\\\n\\\\t^true! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'dgd 8/31/2004 16:21'!\\\\nwantsToBeTopmost\\\\n\\\\t\\\\\\\"Answer if the receiver want to be one of the topmost objects in its owner\\\\\\\"\\\\n\\\\t^ self isFlapOrTab! !\\\\n\\\\n\\\\n!Morph methodsFor: 'accessing - extension' stamp: 'md 2/27/2006 08:46'!\\\\nassureExtension\\\\n\\\\t\\\\\\\"creates an extension for the receiver if needed\\\\\\\"\\\\n\\\\textension ifNil: [self initializeExtension].\\\\n\\\\t^ extension! !\\\\n\\\\n!Morph methodsFor: 'accessing - extension' stamp: 'dgd 2/16/2003 19:22'!\\\\nextension\\\\n\\\\t\\\\\\\"answer the recevier's extension\\\\\\\"\\\\n\\\\t^ extension! !\\\\n\\\\n!Morph methodsFor: 'accessing - extension' stamp: 'md 2/27/2006 08:31'!\\\\nhasExtension\\\\n\\\\t\\\\\\\"answer whether the receiver has extention\\\\\\\"\\\\n\\\\t^ extension notNil! !\\\\n\\\\n!Morph methodsFor: 'accessing - extension' stamp: 'md 2/27/2006 08:35'!\\\\ninitializeExtension\\\\n\\\\t\\\\\\\"private - initializes the receiver's extension\\\\\\\"\\\\n\\\\textension := MorphExtension new! !\\\\n\\\\n!Morph methodsFor: 'accessing - extension' stamp: 'md 2/27/2006 08:46'!\\\\nprivateExtension: aMorphExtension\\\\n\\\\t\\\\\\\"private - change the receiver's extension\\\\\\\"\\\\n\\\\textension := aMorphExtension! !\\\\n\\\\n!Morph methodsFor: 'accessing - extension' stamp: 'md 2/27/2006 08:47'!\\\\nresetExtension\\\\n\\\\t\\\\\\\"reset the extension slot if it is not needed\\\\\\\"\\\\n\\\\t(extension notNil and: [extension isDefault]) ifTrue: [extension := nil] ! !\\\\n\\\\n\\\\n!Morph methodsFor: 'accessing - properties' stamp: 'md 2/27/2006 09:47'!\\\\nhasProperty: aSymbol \\\\n\\\\t\\\\\\\"Answer whether the receiver has the property named aSymbol\\\\\\\"\\\\n\\\\textension ifNil: [^ false].\\\\n\\\\t^extension hasProperty: aSymbol! !\\\\n\\\\n!Morph methodsFor: 'accessing - properties' stamp: 'md 2/27/2006 09:47'!\\\\notherProperties\\\\n\\\\t\\\\\\\"answer the receiver's otherProperties\\\\\\\"\\\\n\\\\t^ extension ifNotNil: [extension otherProperties]! !\\\\n\\\\n!Morph methodsFor: 'accessing - properties' stamp: 'md 2/27/2006 09:48'!\\\\nremoveProperty: aSymbol \\\\n\\\\t\\\\\\\"removes the property named aSymbol if it exists\\\\\\\"\\\\n\\\\textension ifNil:  [^ self].\\\\n\\\\textension removeProperty: aSymbol! !\\\\n\\\\n!Morph methodsFor: 'accessing - properties' stamp: 'tk 10/9/2002 08:30'!\\\\nsetProperties: aList\\\\n\\\\t\\\\\\\"Set many properties at once from a list of prop, value, prop, value\\\\\\\"\\\\n\\\\n\\\\t1 to: aList size by: 2 do: [:ii |\\\\n\\\\t\\\\tself setProperty: (aList at: ii) toValue: (aList at: ii+1)].! !\\\\n\\\\n!Morph methodsFor: 'accessing - properties' stamp: 'md 2/27/2006 09:48'!\\\\nsetProperty: aSymbol toValue: anObject \\\\n\\\\t\\\\\\\"change the receiver's property named aSymbol to anObject\\\\\\\"\\\\n\\\\tanObject ifNil: [^ self removeProperty: aSymbol].\\\\n\\\\tself assureExtension setProperty: aSymbol toValue: anObject! !\\\\n\\\\n!Morph methodsFor: 'accessing - properties' stamp: 'md 2/27/2006 08:53'!\\\\nvalueOfProperty: aSymbol \\\\n\\\\t\\\\\\\"answer the value of the receiver's property named aSymbol\\\\\\\"\\\\n\\\\t^ extension ifNotNil: [extension valueOfProperty: aSymbol]! !\\\\n\\\\n!Morph methodsFor: 'accessing - properties' stamp: 'dgd 2/16/2003 20:55'!\\\\nvalueOfProperty: aSymbol ifAbsentPut: aBlock \\\\n\\\\t\\\\\\\"If the receiver possesses a property of the given name, answer  \\\\n\\\\tits value. If not, then create a property of the given name, give \\\\n\\\\tit the value obtained by evaluating aBlock, then answer that  \\\\n\\\\tvalue\\\\\\\"\\\\n\\\\t^ self assureExtension valueOfProperty: aSymbol ifAbsentPut: aBlock! !\\\\n\\\\n!Morph methodsFor: 'accessing - properties' stamp: 'md 2/27/2006 08:50'!\\\\nvalueOfProperty: aSymbol ifAbsent: aBlock \\\\n\\\\t\\\\\\\"if the receiver possesses a property of the given name, answer  \\\\n\\\\tits value. If not then evaluate aBlock and answer the result of  \\\\n\\\\tthis block evaluation\\\\\\\"\\\\n\\\\t^ extension \\\\n\\\\t\\\\tifNotNil: [extension valueOfProperty: aSymbol ifAbsent: aBlock]\\\\n\\\\t\\\\tifNil: [aBlock value]! !\\\\n\\\\n!Morph methodsFor: 'accessing - properties' stamp: 'md 2/27/2006 08:49'!\\\\nvalueOfProperty: aSymbol ifPresentDo: aBlock \\\\n\\\\t\\\\\\\"If the receiver has a property of the given name, evaluate  \\\\n\\\\taBlock on behalf of the value of that property\\\\\\\"\\\\n\\\\textension ifNil:  [^ self].\\\\n\\\\t^ aBlock value: (extension valueOfProperty: aSymbol ifAbsent: [^ self])! !\\\\n\\\\n\\\\n!Morph methodsFor: 'caching' stamp: 'jm 11/13/97 16:35'!\\\\nfullLoadCachedState\\\\n\\\\t\\\\\\\"Load the cached state of the receiver and its full submorph tree.\\\\\\\"\\\\n\\\\n\\\\tself allMorphsDo: [:m | m loadCachedState].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'caching' stamp: 'jm 11/13/97 16:34'!\\\\nfullReleaseCachedState\\\\n\\\\t\\\\\\\"Release the cached state of the receiver and its full submorph tree.\\\\\\\"\\\\n\\\\n\\\\tself allMorphsDo: [:m | m releaseCachedState].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'caching' stamp: 'jm 11/13/97 16:37'!\\\\nloadCachedState\\\\n\\\\t\\\\\\\"Load the cached state of this morph. This method may be called to pre-load the cached state of a morph to avoid delays when it is first used. (Cached state can always be recompued on demand, so a morph should not rely on this method being called.) Implementations of this method should do 'super loadCachedState'. This default implementation does nothing.\\\\\\\"\\\\n! !\\\\n\\\\n!Morph methodsFor: 'caching' stamp: 'md 4/3/2006 12:02'!\\\\nreleaseCachedState\\\\n\\\\t\\\\\\\"Release any state that can be recomputed on demand, such as the pixel values for a color gradient or the editor state for a TextMorph. This method may be called to save space when a morph becomes inaccessible. Implementations of this method should do 'super releaseCachedState'.\\\\\\\"\\\\n\\\\tself borderStyle releaseCachedState. \\\\n! !\\\\n\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'sd 3/30/2005 22:04'!\\\\nabstractAModel\\\\n\\\\t\\\\\\\"Find data-containing fields in me.  Make a new class, whose instance variables are named for my fields, and whose values are the values I am showing.  Use a CardPlayer for now.  Force the user to name the fields.  Make slots for text, Number Watchers, SketchMorphs, and ImageMorphs.\\\\\\\"\\\\n\\\\n\\\\t| instVarNames unnamed ans player twoListsOfMorphs holdsSepData docks oldPlayer iVarName |\\\\n\\\\t(oldPlayer := self player) ifNotNil: \\\\n\\\\t\\\\t\\\\t[oldPlayer belongsToUniClass \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"Player\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\toldPlayer class instVarNames notEmpty \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[self \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinform: 'I already have a regular Player, so I can''t have a CardPlayer'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^true]]].\\\\n\\\\ttwoListsOfMorphs := StackMorph discoverSlots: self.\\\\n\\\\tholdsSepData := twoListsOfMorphs first.\\\\n\\\\tinstVarNames := ''.\\\\n\\\\tholdsSepData do: \\\\n\\\\t\\\\t\\\\t[:ea | \\\\n\\\\t\\\\t\\\\tiVarName := Scanner wellFormedInstanceVariableNameFrom: ea knownName.\\\\n\\\\t\\\\t\\\\tiVarName = ea knownName ifFalse: [ea name: iVarName].\\\\n\\\\t\\\\t\\\\tinstVarNames := instVarNames , iVarName , ' '].\\\\n\\\\tunnamed := twoListsOfMorphs second.\\\\t\\\\\\\"have default names\\\\\\\"\\\\n\\\\tinstVarNames isEmpty \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[self \\\\n\\\\t\\\\t\\\\t\\\\tinform: 'No named fields were found.\\\\nPlease get a halo on each field and give it a name.\\\\nLabels or non-data fields should be named \\\\\\\"shared xxx\\\\\\\".'.\\\\n\\\\t\\\\t\\\\t^false].\\\\n\\\\tunnamed notEmpty \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[ans := PopUpMenu \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tconfirm: 'Data fields are ' , instVarNames printString \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t, ('\\\\\\\\Some fields are not named.  Are they labels or non-data fields?' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t, '\\\\\\\\Please get a halo on each data field and give it a name.') withCRs\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttrueChoice: 'All other fields are non-data fields'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfalseChoice: 'Stop.  Let me give a name to some more fields'.\\\\n\\\\t\\\\t\\\\tans ifFalse: [^false]].\\\\n\\\\tunnamed \\\\n\\\\t\\\\twithIndexDo: [:mm :ind | mm setName: 'shared label ' , ind printString].\\\\n\\\\t\\\\\\\"Make a Player with instVarNames.  Make me be the costume\\\\\\\"\\\\n\\\\tplayer := CardPlayer instanceOfUniqueClassWithInstVarString: instVarNames\\\\n\\\\t\\\\t\\\\t\\\\tandClassInstVarString: ''.\\\\n\\\\tself player: player.\\\\n\\\\tplayer costume: self.\\\\n\\\\t\\\\\\\"Fill in the instance values.  Make docks first.\\\\\\\"\\\\n\\\\tdocks := OrderedCollection new.\\\\n\\\\tholdsSepData do: \\\\n\\\\t\\\\t\\\\t[:morph | \\\\n\\\\t\\\\t\\\\tmorph setProperty: #shared toValue: true.\\\\t\\\\\\\"in case it is deeply embedded\\\\\\\"\\\\n\\\\t\\\\t\\\\tmorph setProperty: #holdsSeparateDataForEachInstance toValue: true.\\\\n\\\\t\\\\t\\\\tplayer class compileInstVarAccessorsFor: morph knownName.\\\\n\\\\t\\\\t\\\\tmorph isSyntaxMorph ifTrue: [morph setTarget: player].\\\\t\\\\\\\"hookup the UpdatingString!!\\\\\\\"\\\\n\\\\t\\\\t\\\\tdocks addAll: morph variableDocks].\\\\n\\\\tplayer class newVariableDocks: docks.\\\\n\\\\tdocks do: [:dd | dd storeMorphDataInInstance: player].\\\\n\\\\t\\\\\\\"oldPlayer class mdict do: [:assoc | move to player].\\\\tmove methods to new class?\\\\\\\"\\\\n\\\\t\\\\\\\"oldPlayer become: player.\\\\\\\"\\\\n\\\\t^true\\\\t\\\\\\\"success\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'tk 11/2/2001 13:31'!\\\\nbeAStackBackground\\\\n\\\\t\\\\\\\"Transform the receiver into one that has stack-background behavior.  If just becoming a stack, allocate a uniclass to represent the cards (if one does not already exist\\\\\\\"\\\\n\\\\n\\\\tself assuredCardPlayer assureUniClass.\\\\n\\\\tself setProperty: #tabAmongFields toValue: true.\\\\n\\\\tself setProperty: #stackBackground toValue: true.\\\\n\\\\t\\\\\\\"put my submorphs onto the background\\\\\\\"\\\\n\\\\tsubmorphs do: [:mm | mm setProperty: #shared toValue: true].\\\\n\\\\tself reassessBackgroundShape! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'sw 11/8/2002 14:57'!\\\\nbecomeSharedBackgroundField\\\\n\\\\t\\\\\\\"Mark the receiver as holding separate data for each instance (i.e., like a 'background field') and reassess the shape of the corresponding background so that it will be able to accommodate this arrangement.\\\\\\\"\\\\n\\\\n\\\\t((self hasProperty: #shared) and: [self hasProperty: #holdsSeparateDataForEachInstance])\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[self setProperty: #shared toValue: true.\\\\n\\\\t\\\\t\\\\tself setProperty: #holdsSeparateDataForEachInstance toValue: true.\\\\n\\\\t\\\\t\\\\tself stack reassessBackgroundShape]! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'tk 10/30/2001 18:54'!\\\\ncontainsCard: aCard\\\\n\\\\t\\\\\\\"Answer whether the given card belongs to the uniclass representing the receiver\\\\\\\"\\\\n\\\\n\\\\t^ self isStackBackground and: [aCard isKindOf: self player class baseUniclass]! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'sw 10/27/2000 17:36'!\\\\ncouldHoldSeparateDataForEachInstance\\\\n\\\\t\\\\\\\"Answer whether this type of morph is inherently capable of holding separate data for each instance ('card data')\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'tk 10/30/2001 13:32'!\\\\ncurrentDataInstance\\\\n\\\\t\\\\\\\"Answer the current data instance\\\\\\\"\\\\n\\\\n\\\\t^ self player! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'tk 10/30/2001 13:33'!\\\\nexplainDesignations\\\\n\\\\t\\\\\\\"Hand the user an object that contains explanations for the designation feedback used\\\\\\\"\\\\n\\\\n\\\\tStackMorph designationsExplainer openInHand\\\\n\\\\n\\\\t\\\\\\\"self currentWorld explainDesignations\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'sw 10/23/2000 14:49'!\\\\ngoToNextCardInStack\\\\n\\\\t\\\\\\\"Tell my stack to advance to the next page\\\\\\\"\\\\n\\\\n\\\\tself stackDo: [:aStack | aStack goToNextCardInStack]! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'sw 10/23/2000 14:52'!\\\\ngoToPreviousCardInStack\\\\n\\\\t\\\\\\\"Tell my stack to advance to the previous card\\\\\\\"\\\\n\\\\t\\\\n\\\\tself stackDo: [:aStack | aStack goToPreviousCardInStack]! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'sw 10/27/2000 17:41'!\\\\nholdsSeparateDataForEachInstance\\\\n\\\\t\\\\\\\"Answer whether the receiver is currently behaving as a 'background field', i.e., whether it is marked as shared (viz. occurring on the background of a stack) *and* is marked as holding separate data for each instance\\\\\\\"\\\\n\\\\n\\\\t^ self isShared and: [self hasProperty: #holdsSeparateDataForEachInstance]! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'yo 2/17/2005 17:47'!\\\\ninsertAsStackBackground\\\\n\\\\t\\\\\\\"I am not yet in a stack.  Find a Stack that my reference point (center) overlaps, and insert me as a new background.\\\\\\\"\\\\n\\\\n\\\\t| aMorph |\\\\n\\\\tself isStackBackground ifTrue: [^ Beeper beep].\\\\t\\\\n\\\\t\\\\t\\\\\\\"already in a stack.  Must clear flags when remove.\\\\\\\"\\\\n\\\\\\\"\\\\tself potentialEmbeddingTargets do: [:mm |   No, force user to choose a stack.  \\\\n\\\\t\\\\t(mm respondsTo: #insertAsBackground:resize:) ifTrue: [\\\\n\\\\t\\\\t\\\\t^ mm insertAsBackground: self resize: false]].\\\\n\\\\\\\"\\\\n\\\\t\\\\\\\"None found, ask user\\\\\\\"\\\\n\\\\tself inform: 'Please click on a Stack' translated.\\\\n\\\\tSensor waitNoButton.\\\\n\\\\taMorph _ self world chooseClickTarget.\\\\n\\\\taMorph ifNil: [^ self].\\\\n\\\\t(aMorph ownerThatIsA: StackMorph) insertAsBackground: self resize: false.! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'tk 10/30/2001 13:35'!\\\\ninsertCard\\\\n\\\\t\\\\\\\"Insert a new card in the stack, with the receiver as its background, and have it become the current card of the stack\\\\\\\"\\\\n\\\\n\\\\tself stackDo: [:aStack | aStack insertCardOfBackground: self]! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'sw 11/8/2002 15:16'!\\\\ninstallAsCurrent: anInstance\\\\n\\\\t\\\\\\\"Install anInstance as the one currently viewed in the receiver.  Dock up all the morphs in the receiver which contain data rooted in the player instance to the instance data.  Run any 'opening' scripts that pertain.\\\\\\\"\\\\n\\\\n\\\\t| fieldList itsFocus |\\\\n\\\\tself player == anInstance ifTrue: [^ self].\\\\n\\\\tfieldList _ self allMorphs select:\\\\n\\\\t\\\\t[:aMorph | (aMorph wouldAcceptKeyboardFocusUponTab) and: [aMorph isLocked not]].\\\\n\\\\tself currentWorld hands do:\\\\n\\\\t\\\\t[:aHand | (itsFocus _ aHand keyboardFocus) notNil ifTrue:\\\\n\\\\t\\\\t\\\\t[(fieldList includes: itsFocus) ifTrue: [aHand newKeyboardFocus: nil]]].\\\\n\\\\n\\\\tself player uninstallFrom: self.  \\\\\\\"out with the old\\\\\\\"\\\\n\\\\n\\\\tanInstance installPrivateMorphsInto: self.\\\\n\\\\tself changed.\\\\n\\\\tanInstance costume: self.\\\\n\\\\tself player: anInstance.\\\\n\\\\tself player class variableDocks do:\\\\n\\\\t\\\\t[:aVariableDock | aVariableDock dockMorphUpToInstance: anInstance].\\\\n\\\\tself currentWorld startSteppingSubmorphsOf: self! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'tk 10/30/2001 13:42'!\\\\nisStackBackground\\\\n\\\\t\\\\\\\"Answer whether the receiver serves as a background of a stack\\\\\\\"\\\\n\\\\n\\\\t^ ((owner isKindOf: StackMorph) and: [owner currentPage == self]) or:\\\\n\\\\t\\\\t[self hasProperty: #stackBackground]\\\\n\\\\n\\\\t\\\\\\\"This odd property-based check is because when a paste-up-morph is not the *current* background of a stack, it is maddeningly ownerlyess\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'tk 11/2/2001 13:38'!\\\\nmakeHoldSeparateDataForEachInstance\\\\n\\\\t\\\\\\\"Mark the receiver as holding separate data for each instance (i.e., like a 'background field') and reassess the shape of the corresponding background so that it will be able to accommodate this arrangement.\\\\\\\"\\\\n\\\\n\\\\tself setProperty: #holdsSeparateDataForEachInstance toValue: true.\\\\n\\\\tself stack reassessBackgroundShape.! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'nb 6/17/2003 12:25'!\\\\nnewCard\\\\n\\\\t\\\\\\\"Create a new card for the receiver and return it\\\\\\\"\\\\n\\\\n\\\\t| aNewInstance |\\\\n\\\\tself isStackBackground ifFalse: [^ Beeper beep].  \\\\\\\"bulletproof against deconstruction\\\\\\\"\\\\n\\\\taNewInstance _ self player class baseUniclass new.\\\\n\\\\t^ aNewInstance! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'md 10/22/2003 15:52'!\\\\nreassessBackgroundShape\\\\n\\\\t\\\\\\\"A change has been made which may affect the instance structure of the Card uniclass that holds the instance state, which can also be thought of as the 'card data'.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Caution: still to be done: the mechanism so that when a new instance variable is added, it gets initialized in all subinstances of the receiver's player, which are the cards of this shape.  One needs to take into account here the instance variable names coming in; those that are unchanged should keep their values, but those that have newly arrived should obtain their default values from the morphs on whose behalf they are being maintained in the model\\\\\\\"\\\\n\\\\n\\\\t| takenNames uniqueName requestedName variableDocks docks sepDataMorphs sorted existing name1 name2 |\\\\n\\\\tself isStackBackground ifFalse: [^Beeper beep].\\\\t\\\\\\\"bulletproof against deconstruction\\\\\\\"\\\\n\\\\tCursor wait showWhile: \\\\n\\\\t\\\\t\\\\t[variableDocks := OrderedCollection new.\\\\t\\\\\\\"This will be stored in the uniclass's \\\\n\\\\t\\\\t\\\\tclass-side inst var #variableDocks\\\\\\\"\\\\n\\\\t\\\\t\\\\ttakenNames := OrderedCollection new.\\\\n\\\\t\\\\t\\\\tsepDataMorphs := OrderedCollection new.\\\\t\\\\\\\"fields, holders of per-card data\\\\\\\"\\\\n\\\\t\\\\t\\\\tself submorphs do: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:aMorph | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\taMorph renderedMorph holdsSeparateDataForEachInstance \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [sepDataMorphs add: aMorph renderedMorph]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"look for buried fields, inside a frame\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taMorph renderedMorph isShared \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[aMorph allMorphs do: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:mm | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmm renderedMorph holdsSeparateDataForEachInstance \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [sepDataMorphs add: mm renderedMorph]]]]].\\\\n\\\\t\\\\t\\\\tsorted := SortedCollection new \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsortBlock: [:a :b | (a valueOfProperty: #cardInstance) notNil].\\\\t\\\\\\\"puts existing ones first\\\\\\\"\\\\n\\\\t\\\\t\\\\tsorted addAll: sepDataMorphs.\\\\n\\\\t\\\\t\\\\tsorted do: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:aMorph | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdocks := aMorph variableDocks.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Each morph can request multiple variables.  \\\\n\\\\tThis complicates matters somewhat but creates a generality for Fabrk-like uses.\\\\n\\\\tEach spec is an instance of VariableDock, and it provides a point of departure\\\\n\\\\tfor the negotiation between the PasteUp and its constitutent morphs\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdocks do: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:aVariableDock | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tuniqueName := self player \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tuniqueInstanceVariableNameLike: (requestedName := aVariableDock \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tvariableName)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\texcluding: takenNames.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tuniqueName ~= requestedName \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[aVariableDock variableName: uniqueName.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taMorph noteNegotiatedName: uniqueName for: requestedName].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttakenNames add: uniqueName].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tvariableDocks addAll: docks].\\\\n\\\\t\\\\t\\\\texisting := self player class instVarNames.\\\\n\\\\t\\\\t\\\\tvariableDocks := (variableDocks asSortedCollection: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:dock1 :dock2 | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tname1 := dock1 variableName.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tname2 := dock2 variableName.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(existing indexOf: name1 ifAbsent: [0]) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t< (existing indexOf: name2 ifAbsent: [variableDocks size])]) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tasOrderedCollection.\\\\n\\\\t\\\\t\\\\tself player class setNewInstVarNames: (variableDocks \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcollect: [:info | info variableName asString]).\\\\n\\\\t\\\\t\\\\t\\\\\\\"NB: sets up accessors, and removes obsolete ones\\\\\\\"\\\\n\\\\t\\\\t\\\\tself player class newVariableDocks: variableDocks]! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'tk 10/30/2001 13:46'!\\\\nrelaxGripOnVariableNames\\\\n\\\\t\\\\\\\"Abandon any memory of specific variable names that should be preserved.  The overall situation here is not yet completely understood, and this relaxation is basically always done on each reassessment of the background shape nowadays.  But this doesn't feel quite right, because if the user has somehow intervened to specify certain name preference we should perhaps honored it.  Or perhaps that is no longer relevant.  ????\\\\\\\"\\\\n\\\\n\\\\tself submorphs do:\\\\n\\\\t\\\\t[:m | m removeProperty: #variableName.\\\\n\\\\t\\\\tm removeProperty: #setterSelector].\\\\n\\\\tself reassessBackgroundShape\\\\n! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'tk 10/30/2001 13:47'!\\\\nreshapeBackground\\\\n\\\\t\\\\\\\"Abandon any memory of variable-name preferences, and reassess the shape of the background\\\\\\\"\\\\n\\\\n\\\\tself relaxGripOnVariableNames.\\\\n\\\\t\\\\\\\"self reassessBackgroundShape.\\\\talready done there\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'sw 10/24/2000 06:30'!\\\\nsetAsDefaultValueForNewCard\\\\n\\\\t\\\\\\\"Set the receiver's current value as the one to be used to supply the default value for a variable on a new card.  This implementation does not support multiple variables per morph, which is problematical\\\\\\\"\\\\n\\\\n\\\\tself setProperty: #defaultValue toValue: self currentDataValue deepCopy! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'tk 10/30/2001 13:48'!\\\\nshowBackgroundObjects\\\\n\\\\t\\\\\\\"Momentarily highlight just the background objects on the current playfield\\\\\\\"\\\\n\\\\n\\\\tself isStackBackground ifFalse: [^ self].\\\\n\\\\tself invalidRect: self bounds.\\\\n\\\\tself currentWorld doOneCycle.\\\\n\\\\tDisplay restoreAfter:\\\\n\\\\t\\\\t[self submorphsDo:\\\\n\\\\t\\\\t\\\\t[:aMorph | (aMorph renderedMorph hasProperty: #shared)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[Display border: (aMorph fullBoundsInWorld insetBy: -6) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twidth: 6 rule: Form over fillColor: Color blue]]]! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'aoy 2/15/2003 21:50'!\\\\nshowDesignationsOfObjects\\\\n\\\\t\\\\\\\"Momentarily show the designations of objects on the receiver\\\\\\\"\\\\n\\\\n\\\\t| colorToUse aLabel |\\\\n\\\\tself isStackBackground ifFalse: [^self].\\\\n\\\\tself submorphsDo: \\\\n\\\\t\\\\t\\\\t[:aMorph | \\\\n\\\\t\\\\t\\\\taLabel :=aMorph renderedMorph holdsSeparateDataForEachInstance \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[colorToUse := Color orange.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t aMorph externalName]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[colorToUse := aMorph isShared ifFalse: [Color red] ifTrue: [Color green].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t nil].\\\\n\\\\t\\\\t\\\\tDisplay \\\\n\\\\t\\\\t\\\\t\\\\tborder: (aMorph fullBoundsInWorld insetBy: -6)\\\\n\\\\t\\\\t\\\\t\\\\twidth: 6\\\\n\\\\t\\\\t\\\\t\\\\trule: Form over\\\\n\\\\t\\\\t\\\\t\\\\tfillColor: colorToUse.\\\\n\\\\t\\\\t\\\\taLabel ifNotNil: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[aLabel asString \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdisplayOn: Display\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tat: aMorph fullBoundsInWorld bottomLeft + (0 @ 5)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttextColor: Color blue]].\\\\n\\\\tSensor anyButtonPressed \\\\n\\\\t\\\\tifTrue: [Sensor waitNoButton]\\\\n\\\\t\\\\tifFalse: [Sensor waitButton].\\\\n\\\\tWorld fullRepaintNeeded! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'tk 10/30/2001 13:50'!\\\\nshowForegroundObjects\\\\n\\\\t\\\\\\\"Temporarily highlight the foreground objects\\\\\\\"\\\\n\\\\n\\\\tself isStackBackground ifFalse: [^ self].\\\\n\\\\tDisplay restoreAfter:\\\\n\\\\t\\\\t[self submorphsDo:\\\\n\\\\t\\\\t\\\\t[:aMorph | aMorph renderedMorph isShared\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[Display border: (aMorph fullBoundsInWorld insetBy: -6) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twidth: 6 rule: Form over fillColor: Color orange]]]! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'tk 11/2/2001 13:53'!\\\\nstack\\\\n\\\\t\\\\\\\"Answer the nearest containing Stack, or, if none, a stack in the current project, and if still none, nil.  The extra messiness is because uninstalled backgrounds don't have an owner pointers to their stack.\\\\\\\"\\\\n\\\\n\\\\t| aStack bkgnd |\\\\n\\\\tbkgnd _ self orOwnerSuchThat: [:oo | oo hasProperty: #myStack].\\\\n\\\\tbkgnd ifNotNil: [^ bkgnd valueOfProperty: #myStack].\\\\n\\\\n\\\\t\\\\\\\"fallbacks\\\\\\\"\\\\n\\\\t(aStack _ self ownerThatIsA: StackMorph) ifNotNil: [^ aStack].\\\\n\\\\t^ Project current currentStack! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'sw 10/23/2000 14:38'!\\\\nstackDo: aBlock\\\\n\\\\t\\\\\\\"If the receiver has a stack, evaluate aBlock on its behalf\\\\\\\"\\\\n\\\\n\\\\t| aStack |\\\\n\\\\t(aStack _ self ownerThatIsA: StackMorph) ifNotNil:\\\\n\\\\t\\\\t[^ aBlock value: aStack]! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'tk 11/2/2001 13:38'!\\\\nstopHoldingSeparateDataForEachInstance\\\\n\\\\t\\\\\\\"Make the receiver no longer hold separate data for each instance\\\\\\\"\\\\n\\\\n\\\\tself removeProperty: #holdsSeparateDataForEachInstance.\\\\n\\\\tself stack reassessBackgroundShape.! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'dgd 8/28/2004 19:15'!\\\\ntabHitWithEvent: anEvent\\\\n\\\\t\\\\\\\"The tab key was hit.  The keyboard focus has referred this event to me, though this perhaps seems rather backwards.  Anyway, the assumption is that I have the property #tabAmongFields, so now the task is to tab to the next field.\\\\\\\"\\\\n\\\\n\\\\t| currentFocus fieldList anIndex itemToHighlight variableBearingMorphs otherAmenableMorphs |\\\\n\\\\tcurrentFocus _ anEvent hand keyboardFocus.\\\\n\\\\tfieldList _ self allMorphs select:\\\\n\\\\t\\\\t[:aMorph | (aMorph wouldAcceptKeyboardFocusUponTab) and: [aMorph isLocked not]].\\\\n\\\\n\\\\tfieldList isEmpty ifTrue:[^ self].\\\\n\\\\n\\\\tvariableBearingMorphs _ self player isNil\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue:[#()]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse:[self player class variableDocks collect: [:vd | vd definingMorph] thenSelect: [:m | m isInWorld]].\\\\n\\\\totherAmenableMorphs _ (self allMorphs select:\\\\n\\\\t\\\\t[:aMorph | (aMorph wouldAcceptKeyboardFocusUponTab) and: [aMorph isLocked not]])\\\\n\\\\t\\\\t\\\\tcopyWithoutAll: variableBearingMorphs.\\\\n\\\\tfieldList _ variableBearingMorphs, otherAmenableMorphs.\\\\n\\\\n\\\\tanIndex _ fieldList indexOf: currentFocus ifAbsent: [nil].\\\\n\\\\titemToHighlight _ fieldList atWrap: \\\\n\\\\t\\\\t(anIndex ifNotNil: [anEvent shiftPressed ifTrue: [anIndex - 1] ifFalse: [anIndex + 1]]\\\\n\\\\t\\\\t\\\\t\\\\tifNil: [1]).\\\\n\\\\tanEvent hand newKeyboardFocus: itemToHighlight. self flag: #arNote. \\\\\\\"really???\\\\\\\"\\\\n\\\\titemToHighlight editor selectAll.\\\\n\\\\titemToHighlight invalidRect: itemToHighlight bounds ! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'tk 11/4/2001 20:57'!\\\\nwrapWithAStack\\\\n\\\\t\\\\\\\"Install me as a card inside a new stack.  The stack has no border or controls, so I my look is unchanged.  If I don't already have a CardPlayer, find my data fields and make one.  Be ready to make new cards in the stack that look like me, but hold different field data.\\\\\\\"\\\\n\\\\n\\\\tself player class officialClass == CardPlayer ifFalse: [\\\\n\\\\t\\\\tself abstractAModel ifFalse: [^ false]].\\\\n\\\\tStackMorph new initializeWith: self.\\\\n\\\\tself stack addHalo.\\\\t\\\\\\\"Makes it easier for the user\\\\\\\"! !\\\\n\\\\n\\\\n!Morph methodsFor: 'change reporting' stamp: 'ar 8/12/2003 21:50'!\\\\naddedMorph: aMorph\\\\n\\\\t\\\\\\\"Notify the receiver that the given morph was just added.\\\\\\\"\\\\n! !\\\\n\\\\n!Morph methodsFor: 'change reporting' stamp: 'sw 9/10/1998 08:18'!\\\\ncolorChangedForSubmorph: aSubmorph\\\\n\\\\t\\\\\\\"The color associated with aSubmorph was changed through the UI; react if needed\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'change reporting' stamp: 'ar 11/12/2000 18:50'!\\\\ninvalidRect: damageRect\\\\n\\\\t^self invalidRect: damageRect from: self! !\\\\n\\\\n!Morph methodsFor: 'change reporting' stamp: 'md 4/3/2006 11:52'!\\\\ninvalidRect: aRectangle from: aMorph\\\\n\\\\t| damageRect |\\\\n\\\\taRectangle hasPositiveExtent ifFalse: [ ^self ].\\\\n\\\\tdamageRect _ aRectangle.\\\\n\\\\taMorph == self ifFalse:[\\\\n\\\\t\\\\t\\\\\\\"Clip to receiver's clipping bounds if the damage came from a child\\\\\\\"\\\\n\\\\t\\\\tself clipSubmorphs \\\\n\\\\t\\\\t\\\\tifTrue:[damageRect _ aRectangle intersect: self clippingBounds]].\\\\n\\\\towner ifNotNil: [owner invalidRect: damageRect from: self].! !\\\\n\\\\n!Morph methodsFor: 'change reporting' stamp: 'sw 7/8/1998 13:21'!\\\\nownerChanged\\\\n\\\\t\\\\\\\"The receiver's owner, some kind of a pasteup, has changed its layout.\\\\\\\"\\\\n\\\\n\\\\tself snapToEdgeIfAppropriate! !\\\\n\\\\n!Morph methodsFor: 'change reporting' stamp: 'ar 8/12/2003 22:26'!\\\\nprivateInvalidateMorph: aMorph\\\\n\\\\t\\\\\\\"Private. Invalidate the given morph after adding or removing.\\\\n\\\\tThis method is private because a) we're invalidating the morph 'remotely'\\\\n\\\\tand b) it forces a fullBounds computation which should not be necessary\\\\n\\\\tfor a general morph c) the morph may or may not actually invalidate\\\\n\\\\tanything (if it's not in the world nothing will happen) and d) the entire\\\\n\\\\tmechanism should be rewritten.\\\\\\\"\\\\n\\\\taMorph fullBounds.\\\\n\\\\taMorph changed! !\\\\n\\\\n!Morph methodsFor: 'change reporting' stamp: 'tk 8/24/2001 22:07'!\\\\nuserSelectedColor: aColor\\\\n\\\\t\\\\\\\"The user, via the UI, chose aColor to be the color for the receiver; set it, and tell my owner in case he wishes to react\\\\\\\"\\\\n\\\\tself color: aColor.\\\\n\\\\tself world ifNotNil: [owner colorChangedForSubmorph: self]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'classification' stamp: 'sw 2/26/2002 23:29'!\\\\ndemandsBoolean\\\\n\\\\t\\\\\\\"Answer whether the receiver will only accept a drop if it is boolean-valued.  Particular to tile-scripting.\\\\\\\"\\\\n\\\\n\\\\t^ self hasProperty: #demandsBoolean! !\\\\n\\\\n!Morph methodsFor: 'classification' stamp: 'di 5/7/1998 01:21'!\\\\nisAlignmentMorph\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'classification' stamp: 'ar 9/15/2000 17:56'!\\\\nisBalloonHelp\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'classification' stamp: 'ar 9/28/2000 13:54'!\\\\nisFlapOrTab\\\\n\\\\t^self isFlap or:[self isFlapTab]! !\\\\n\\\\n!Morph methodsFor: 'classification' stamp: 'ar 9/28/2000 13:53'!\\\\nisFlapTab\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'classification' stamp: 'jm 4/17/1998 00:44'!\\\\nisFlexMorph\\\\n\\\\n\\\\t^ false\\\\n! !\\\\n\\\\n!Morph methodsFor: 'classification'!\\\\nisHandMorph\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'classification' stamp: 'ar 10/3/2000 18:11'!\\\\nisModalShell\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'classification' stamp: 'sw 1/29/98 21:51'!\\\\nisPlayfieldLike\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'classification' stamp: 'jm 5/7/1998 13:45'!\\\\nisRenderer\\\\n\\\\t\\\\\\\"A *renderer* morph transforms the appearance of its submorph in some manner. For example, it might supply a drop shadow or scale and rotate the morph it encases. Answer true if this morph acts as a renderer. This default implementation returns false.\\\\\\\"\\\\n\\\\t\\\\\\\"Details: A renderer is assumed to have a single submorph. Renderers may be nested to concatenate their transformations. It is useful to be able to find the outer-most renderer. This can be done by ascending the owner chain from the rendered morph. To find the morph being rendered, one can descend through the (singleton) submorph lists of the renderer chain until a non-renderer is encountered.\\\\\\\"\\\\n\\\\n\\\\t^ false\\\\n! !\\\\n\\\\n!Morph methodsFor: 'classification' stamp: 'ar 6/30/2001 13:13'!\\\\nisStandardViewer\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'classification' stamp: 'di 11/2/2000 13:24'!\\\\nisSyntaxMorph\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'classification' stamp: 'ar 12/16/2001 18:28'!\\\\nisTextMorph\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'classification'!\\\\nisWorldMorph\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'classification'!\\\\nisWorldOrHandMorph\\\\n\\\\n\\\\t^ self isWorldMorph or: [self isHandMorph]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'connectors-scripting' stamp: 'nk 9/10/2004 11:37'!\\\\nwantsConnectorVocabulary\\\\n\\\\t\\\\\\\"Answer true if I want to show a 'connector' vocabulary\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n\\\\n!Morph methodsFor: 'converting'!\\\\nasDraggableMorph\\\\n\\\\t^self! !\\\\n\\\\n!Morph methodsFor: 'converting' stamp: 'wiz 2/19/2006 19:01'!\\\\nasSnapshotThumbnail\\\\n\\\\t^(ThumbnailImageMorph new  newImage: self imageForm ) extent: 90 asPoint .! !\\\\n\\\\n\\\\n!Morph methodsFor: 'copying' stamp: 'tk 2/19/2001 18:21'!\\\\ncopy\\\\n\\\\n\\\\t^ self veryDeepCopy! !\\\\n\\\\n!Morph methodsFor: 'copying' stamp: 'tk 2/14/2001 12:47'!\\\\ndeepCopy\\\\n\\\\n\\\\tself error: 'Please use veryDeepCopy'.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'copying' stamp: 'sw 4/19/2005 17:02'!\\\\nduplicate\\\\n\\\\t\\\\\\\"Make and return a duplicate of the receiver\\\\\\\"\\\\n\\\\n\\\\t| newMorph aName w aPlayer topRend |\\\\n\\\\t((topRend _ self topRendererOrSelf) ~~ self) ifTrue: [^ topRend duplicate].\\\\n\\\\n\\\\tself okayToDuplicate ifFalse: [^ self].\\\\n\\\\taName _ (w _ self world) ifNotNil:\\\\n\\\\t\\\\t[w nameForCopyIfAlreadyNamed: self].\\\\n\\\\tnewMorph _ self veryDeepCopy.\\\\n\\\\taName ifNotNil: [newMorph setNameTo: aName].\\\\n\\\\n\\\\tnewMorph arrangeToStartStepping.\\\\n\\\\tnewMorph privateOwner: nil. \\\\\\\"no longer in world\\\\\\\"\\\\n\\\\tnewMorph isPartsDonor: false. \\\\\\\"no longer parts donor\\\\\\\"\\\\n\\\\t(aPlayer _ newMorph player) belongsToUniClass ifTrue:\\\\n\\\\t\\\\t[aPlayer class bringScriptsUpToDate].\\\\n\\\\taPlayer ifNotNil: [ActiveWorld presenter flushPlayerListCache].\\\\n\\\\t^ newMorph! !\\\\n\\\\n!Morph methodsFor: 'copying' stamp: 'nk 3/12/2001 17:07'!\\\\nduplicateMorphCollection: aCollection\\\\n\\\\t\\\\\\\"Make and return a duplicate of the receiver\\\\\\\"\\\\n\\\\n\\\\t| newCollection names |\\\\n\\\\n\\\\tnames _ aCollection collect: [ :ea | | newMorph w |\\\\n\\\\t\\\\t(w _ ea world) ifNotNil:\\\\n\\\\t\\\\t\\\\t[w nameForCopyIfAlreadyNamed: ea].\\\\n\\\\t].\\\\n\\\\n\\\\tnewCollection _ aCollection veryDeepCopy.\\\\n\\\\n\\\\tnewCollection with: names do: [ :newMorph :name |\\\\n\\\\t\\\\tname ifNotNil: [ newMorph setNameTo: name ].\\\\n\\\\t\\\\tnewMorph arrangeToStartStepping.\\\\n\\\\t\\\\tnewMorph privateOwner: nil. \\\\\\\"no longer in world\\\\\\\"\\\\n\\\\t\\\\tnewMorph isPartsDonor: false. \\\\\\\"no longer parts donor\\\\\\\"\\\\n\\\\t].\\\\n\\\\n\\\\t^newCollection! !\\\\n\\\\n!Morph methodsFor: 'copying' stamp: 'sw 2/16/2001 16:30'!\\\\nfullCopy\\\\n\\\\t\\\\\\\"Deprecated, but maintained for backward compatibility with existing code (no senders in the base 3.0 image).   Calls are revectored to #veryDeepCopy, but note that #veryDeepCopy does not do exactly the same thing that the original #fullCopy did, so beware!!\\\\\\\"\\\\n\\\\n\\\\t^ self veryDeepCopy! !\\\\n\\\\n!Morph methodsFor: 'copying' stamp: 'md 2/27/2006 08:53'!\\\\nupdateReferencesUsing: aDictionary \\\\n\\\\t\\\\\\\"Update intra-morph references within a composite morph that \\\\n\\\\thas been copied. For example, if a button refers to morph X in \\\\n\\\\tthe orginal \\\\n\\\\tcomposite then the copy of that button in the new composite \\\\n\\\\tshould refer to \\\\n\\\\tthe copy of X in new composite, not the original X. This default \\\\n\\\\timplementation updates the contents of any morph-bearing slot. \\\\n\\\\tIt may be \\\\n\\\\toverridden to avoid this behavior if so desired.\\\\\\\"\\\\n\\\\t| old |\\\\n\\\\tMorph instSize + 1\\\\n\\\\t\\\\tto: self class instSize\\\\n\\\\t\\\\tdo: [:i | \\\\n\\\\t\\\\t\\\\told _ self instVarAt: i.\\\\n\\\\t\\\\t\\\\told isMorph\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinstVarAt: i\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tput: (aDictionary\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tat: old\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifAbsent: [old])]].\\\\n\\\\textension ifNotNil: [extension updateReferencesUsing: aDictionary]! !\\\\n\\\\n!Morph methodsFor: 'copying' stamp: 'nk 10/11/2003 16:59'!\\\\nusableSiblingInstance\\\\n\\\\t\\\\\\\"Return another similar morph whose Player is of the same class as mine.\\\\n\\\\tDo not open it in the world.\\\\\\\"\\\\n\\\\n\\\\t| aName usedNames newPlayer newMorph topRenderer |\\\\n\\\\t(topRenderer := self topRendererOrSelf) == self \\\\n\\\\t\\\\tifFalse: [^topRenderer usableSiblingInstance].\\\\n\\\\tself assuredPlayer assureUniClass.\\\\n\\\\tnewMorph := self veryDeepCopySibling.\\\\n\\\\tnewPlayer := newMorph player.\\\\n\\\\tnewPlayer resetCostumeList.\\\\n\\\\t(aName := self knownName) isNil \\\\n\\\\t\\\\tifTrue: [self player notNil ifTrue: [aName := newMorph innocuousName]].\\\\n\\\\t\\\\\\\"Force a difference here\\\\\\\"\\\\n\\\\taName notNil \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[usedNames := (self world ifNil: [OrderedCollection new]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifNotNil: [self world allKnownNames]) copyWith: aName.\\\\n\\\\t\\\\t\\\\tnewMorph setNameTo: (Utilities keyLike: aName\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsatisfying: [:f | (usedNames includes: f) not])].\\\\n\\\\tnewMorph privateOwner: nil.\\\\n\\\\tnewPlayer assureEventHandlerRepresentsStatus.\\\\n\\\\tself presenter flushPlayerListCache.\\\\n\\\\t^newMorph! !\\\\n\\\\n!Morph methodsFor: 'copying' stamp: 'tk 1/6/1999 17:27'!\\\\nveryDeepCopyWith: deepCopier\\\\n\\\\t\\\\\\\"Copy me and the entire tree of objects I point to.  An object in the tree twice is copied once, and both references point to him.  deepCopier holds a dictionary of objects we have seen.  See veryDeepInner:, veryDeepFixupWith:\\\\\\\"\\\\n\\\\n\\\\tself prepareToBeSaved.\\\\n\\\\t^ super veryDeepCopyWith: deepCopier! !\\\\n\\\\n!Morph methodsFor: 'copying' stamp: 'tk 2/3/2001 14:29'!\\\\nveryDeepFixupWith: deepCopier\\\\n\\\\t\\\\\\\"If some fields were weakly copied, fix new copy here.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"super veryDeepFixupWith: deepCopier.\\\\tObject has no fixups, so don't call it\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"If my owner is being duplicated too, then store his duplicate.\\\\n\\\\t If I am owned outside the duplicated tree, then I am no longer owned!!\\\\\\\"\\\\n\\\\towner _ deepCopier references at: owner ifAbsent: [nil].\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'copying' stamp: 'md 2/27/2006 08:47'!\\\\nveryDeepInner: deepCopier \\\\n\\\\t\\\\\\\"The inner loop, so it can be overridden when a field should not  \\\\n\\\\tbe traced.\\\\\\\"\\\\n\\\\t\\\\\\\"super veryDeepInner: deepCopier.\\\\tknow Object has no inst vars\\\\\\\"\\\\n\\\\tbounds _ bounds clone.\\\\n\\\\t\\\\\\\"Points are shared with original\\\\\\\"\\\\n\\\\t\\\\\\\"owner _ owner.\\\\tspecial, see veryDeepFixupWith:\\\\\\\"\\\\n\\\\tsubmorphs _ submorphs veryDeepCopyWith: deepCopier.\\\\n\\\\t\\\\\\\"each submorph's fixup will install me as the owner\\\\\\\"\\\\n\\\\t\\\\\\\"fullBounds _ fullBounds.\\\\tfullBounds is shared with original!!\\\\\\\"\\\\n\\\\tcolor _ color veryDeepCopyWith: deepCopier.\\\\n\\\\t\\\\\\\"color, if simple, will return self. may be complex\\\\\\\"\\\\n\\\\textension := (extension veryDeepCopyWith: deepCopier)! !\\\\n\\\\n\\\\n!Morph methodsFor: 'creation' stamp: 'tk 2/6/1999 22:43'!\\\\nasMorph\\\\n\\\\t^ self! !\\\\n\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'dgd 8/30/2003 20:36'!\\\\naddDebuggingItemsTo: aMenu hand: aHandMorph\\\\n\\\\taMenu add: 'debug...' translated subMenu:  (self buildDebugMenu: aHandMorph)! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'RAA 1/19/2001 07:51'!\\\\naddMouseActionIndicatorsWidth: anInteger color: aColor\\\\n\\\\n\\\\tself deleteAnyMouseActionIndicators.\\\\n\\\\n\\\\tself changed.\\\\n\\\\tself hasRolloverBorder: true.\\\\n\\\\tself setProperty: #rolloverWidth toValue: anInteger@anInteger.\\\\n\\\\tself setProperty: #rolloverColor toValue: aColor.\\\\n\\\\tself layoutChanged.\\\\n\\\\tself changed.\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'gm 4/25/2004 14:23'!\\\\naddMouseUpAction\\\\n\\\\t| codeToRun oldCode |\\\\n\\\\toldCode := self\\\\n\\\\t\\\\t\\\\t\\\\tvalueOfProperty: #mouseUpCodeToRun\\\\n\\\\t\\\\t\\\\t\\\\tifAbsent: [''].\\\\n\\\\tcodeToRun := FillInTheBlank request: 'MouseUp expression:' translated initialAnswer: oldCode.\\\\n\\\\tself addMouseUpActionWith: codeToRun! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'gm 2/22/2003 13:41'!\\\\naddMouseUpActionWith: codeToRun \\\\n\\\\t((codeToRun isMessageSend) not and: [codeToRun isEmptyOrNil]) \\\\n\\\\t\\\\tifTrue: [^self].\\\\n\\\\tself setProperty: #mouseUpCodeToRun toValue: codeToRun.\\\\n\\\\tself \\\\n\\\\t\\\\ton: #mouseUp\\\\n\\\\t\\\\tsend: #programmedMouseUp:for:\\\\n\\\\t\\\\tto: self.\\\\n\\\\tself \\\\n\\\\t\\\\ton: #mouseDown\\\\n\\\\t\\\\tsend: #programmedMouseDown:for:\\\\n\\\\t\\\\tto: self.\\\\n\\\\tself \\\\n\\\\t\\\\ton: #mouseEnter\\\\n\\\\t\\\\tsend: #programmedMouseEnter:for:\\\\n\\\\t\\\\tto: self.\\\\n\\\\tself \\\\n\\\\t\\\\ton: #mouseLeave\\\\n\\\\t\\\\tsend: #programmedMouseLeave:for:\\\\n\\\\t\\\\tto: self! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'sw 1/3/2001 06:42'!\\\\naddViewingItemsTo: aMenu\\\\n\\\\t\\\\\\\"Add viewing-related items to the given menu.  If any are added, this method is also responsible for adding a line after them\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'dgd 2/22/2003 14:27'!\\\\nallStringsAfter: aSubmorph \\\\n\\\\t\\\\\\\"return an OrderedCollection of strings of text in my submorphs.  If aSubmorph is non-nil, begin with that container.\\\\\\\"\\\\n\\\\n\\\\t| list string ok |\\\\n\\\\tlist := OrderedCollection new.\\\\n\\\\tok := aSubmorph isNil.\\\\n\\\\tself allMorphsDo: \\\\n\\\\t\\\\t\\\\t[:sub | \\\\n\\\\t\\\\t\\\\tok ifFalse: [ok := sub == aSubmorph].\\\\t\\\\\\\"and do this one too\\\\\\\"\\\\n\\\\t\\\\t\\\\tok \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[(string := sub userString) ifNotNil: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[string isString ifTrue: [list add: string] ifFalse: [list addAll: string]]]].\\\\n\\\\t^list! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'RAA 7/7/2000 16:27'!\\\\naltSpecialCursor0\\\\n\\\\t\\\\\\\"an arrow\\\\\\\"\\\\n\\\\t^(Form\\\\n\\\\textent: 16@16\\\\n\\\\tdepth: 8\\\\n\\\\tfromArray: #( 0 0 0 0 14869218 3806520034 3806520034 3791650816 14848144 2425393296 2425393378 0 14848144 2425393296 2425414144 0 14848144 2425393296 2430730240 0 14848144 2425393296 3791650816 0 14848144 2425393378 3791650816 0 14848144 2425414370 3806461952 0 14848144 2430788322 3806519808 0 14848144 3791651042 3806520034 0 14848226 0 3806520034 3791650816 14868992 0 14869218 3806461952 14811136 0 58082 3806519808 0 0 226 3806520034 0 0 0 3806520034 0 0 0 14869218)\\\\n\\\\toffset: 0@0)\\\\n! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'RAA 7/7/2000 16:28'!\\\\naltSpecialCursor1\\\\n\\\\t\\\\\\\"a star and an arrow\\\\\\\"\\\\n\\\\t^(Form\\\\n\\\\textent: 31@26\\\\n\\\\tdepth: 8\\\\n\\\\tfromArray: #( 14417920 0 0 0 0 0 0 0 3705461980 3705461980 3705405440 0 0 0 0 0 3705461980 3705461980 3705461760 0 0 0 0 0 14474460 3705461980 3705405440 0 0 0 0 0 56540 3705461980 3690987520 0 0 3690987520 0 0 220 3705461980 3705461760 0 0 3690987520 0 0 220 3705405440 3705461980 0 0 3705405440 0 0 0 3705461760 56540 3690987520 220 3705405440 0 0 0 3705405440 220 3705461760 220 3705405440 0 0 0 0 0 14474460 220 3705461760 0 0 0 0 0 56540 3691044060 3705461760 0 0 0 0 0 220 3705461980 3705461760 0 0 0 0 56540 3705461980 3705461980 3705461980 3705461980 3705461760 0 0 220 3705461980 3705461980 3705461980 3705461980 3705461760 0 0 0 3705461980 3705461980 3705461980 3705461980 3705405440 0 0 0 14474460 3705461980 3705461980 3705461980 3690987520 0 0 0 56540 3705461980 3705461980 3705461760 0 0 0 0 220 3705461980 3705461980 3705405440 0 0 0 0 0 3705461980 3705461980 3690987520 0 0 0 0 0 3705461980 3705461980 3705405440 0 0 0 0 220 3705461980 3705461980 3705405440 0 0 0 0 220 3705461980 3705461980 3705405440 0 0 0 0 220 3705461980 14474460 3705405440 0 0 0 0 220 3705405440 220 3705461760 0 0 0 0 56540 3690987520 0 3705461760 0 0 0 0 56540 0 0 14474240 0)\\\\n\\\\toffset: 0@0)! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'RAA 7/7/2000 16:41'!\\\\naltSpecialCursor2\\\\n\\\\t| f |\\\\n\\\\t\\\\\\\"a blue box with transparent center\\\\\\\"\\\\n\\\\tf _ Form extent: 32@32 depth: 32.\\\\n\\\\tf offset: (f extent // 2) negated.\\\\n\\\\tf fill: f boundingBox rule: Form over fillColor: (Color blue alpha: 0.5).\\\\n\\\\tf fill: (f boundingBox insetBy: 4) rule: Form over fillColor: Color transparent.\\\\n\\\\t^f\\\\n! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'RAA 7/7/2000 16:42'!\\\\naltSpecialCursor3\\\\n\\\\t\\\\n\\\\t^self altSpecialCursor3: Color blue! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'RAA 7/7/2000 16:41'!\\\\naltSpecialCursor3: aColor\\\\n\\\\t| f box |\\\\n\\\\t\\\\\\\"a bulls-eye pattern in this color\\\\\\\"\\\\n\\\\tf _ Form extent: 32@32 depth: 32.\\\\n\\\\tf offset: (f extent // 2) negated.\\\\n\\\\tbox _ f boundingBox.\\\\n\\\\t[ box width > 0] whileTrue: [\\\\n\\\\t\\\\tf fill: box rule: Form over fillColor: aColor.\\\\n\\\\t\\\\tf fill: (box insetBy: 2) rule: Form over fillColor: Color transparent.\\\\n\\\\t\\\\tbox _ box insetBy: 4.\\\\n\\\\t].\\\\n\\\\t^f\\\\n! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'nk 6/14/2004 16:14'!\\\\nbuildDebugMenu: aHand\\\\n\\\\t\\\\\\\"Answer a debugging menu for the receiver.  The hand argument is seemingly historical and plays no role presently\\\\\\\"\\\\n\\\\n\\\\t| aMenu aPlayer |\\\\n\\\\taMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\taMenu addStayUpItem.\\\\n\\\\t(self hasProperty: #errorOnDraw) ifTrue:\\\\n\\\\t\\\\t[aMenu add: 'start drawing again' translated action: #resumeAfterDrawError.\\\\n\\\\t\\\\taMenu addLine].\\\\n\\\\t(self hasProperty: #errorOnStep) ifTrue:\\\\n\\\\t\\\\t[aMenu add: 'start stepping again' translated action: #resumeAfterStepError.\\\\n\\\\t\\\\taMenu addLine].\\\\n\\\\n\\\\taMenu add: 'inspect morph' translated action: #inspectInMorphic:.\\\\n\\\\taMenu add: 'inspect owner chain' translated action: #inspectOwnerChain.\\\\n\\\\tSmalltalk isMorphic ifFalse:\\\\n\\\\t\\\\t[aMenu add: 'inspect morph (in MVC)' translated action: #inspect].\\\\n\\\\n\\\\tself isMorphicModel ifTrue:\\\\n\\\\t\\\\t[aMenu add: 'inspect model' translated target: self model action: #inspect].\\\\n\\\\t(aPlayer _ self player) ifNotNil:\\\\n\\\\t\\\\t[aMenu add: 'inspect player' translated target: aPlayer action: #inspect].\\\\n\\\\n     aMenu add: 'explore morph' translated target: self selector: #explore.\\\\n\\\\n\\\\taMenu addLine.\\\\n\\\\taPlayer ifNotNil:\\\\n\\\\t\\\\t[ aMenu add: 'viewer for Player' translated target: self player action: #beViewed.\\\\n\\\\taMenu balloonTextForLastItem: 'Opens a viewer on my Player -- this is the same thing you get if you click on the cyan \\\\\\\"View\\\\\\\" halo handle' translated ].\\\\n\\\\n\\\\taMenu add: 'viewer for Morph' translated target: self action: #viewMorphDirectly.\\\\n\\\\taMenu balloonTextForLastItem: 'Opens a Viewer on this Morph, rather than on its Player' translated.\\\\n\\\\taMenu addLine.\\\\n\\\\n\\\\taPlayer ifNotNil:\\\\n\\\\t\\\\t[aPlayer class isUniClass ifTrue: [\\\\n\\\\t\\\\t\\\\taMenu add: 'browse player class' translated target: aPlayer action: #browseHierarchy]].\\\\n\\\\taMenu add: 'browse morph class' translated target: self selector: #browseHierarchy.\\\\n\\\\t(self isMorphicModel)\\\\n\\\\t\\\\tifTrue: [aMenu\\\\n\\\\t\\\\t\\\\t\\\\tadd: 'browse model class'\\\\n\\\\t\\\\t\\\\t\\\\ttarget: self model\\\\n\\\\t\\\\t\\\\t\\\\tselector: #browseHierarchy].\\\\n\\\\taMenu addLine.\\\\n\\\\n\\\\taPlayer ifNotNil:\\\\n\\\\t\\\\t[aMenu add: 'player protocol (tiles)' translated target: aPlayer action: #openInstanceBrowserWithTiles\\\\n\\\\t\\\\t\\\\t\\\\\\\"#browseProtocolForPlayer\\\\\\\"].\\\\n\\\\taMenu add: 'morph protocol (text)' translated target: self selector: #haveFullProtocolBrowsed.\\\\n\\\\taMenu add: 'morph protocol (tiles)' translated target: self selector: #openInstanceBrowserWithTiles.\\\\n\\\\taMenu addLine.\\\\n\\\\n\\\\tself addViewingItemsTo: aMenu.\\\\n\\\\taMenu \\\\n\\\\t\\\\tadd: 'make own subclass' translated action: #subclassMorph;\\\\n\\\\t\\\\tadd: 'internal name ' translated action: #choosePartName;\\\\n\\\\t\\\\tadd: 'save morph in file' translated  action: #saveOnFile;\\\\n\\\\t\\\\taddLine;\\\\n\\\\t\\\\tadd: 'call #tempCommand' translated action: #tempCommand;\\\\n\\\\t\\\\tadd: 'define #tempCommand' translated action: #defineTempCommand;\\\\n\\\\t\\\\taddLine;\\\\n\\\\n\\\\t\\\\tadd: 'control-menu...' translated target: self selector: #invokeMetaMenu:;\\\\n\\\\t\\\\tadd: 'edit balloon help' translated action: #editBalloonHelpText.\\\\n\\\\n\\\\t^ aMenu! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'ar 9/27/2005 20:29'!\\\\ndefineTempCommand\\\\n\\\\t\\\\\\\"To use this, comment out what's below here, and substitute your own code.\\\\nYou will then be able to invoke it from the standard debugging menus.  If invoked from the world menu, you'll always get it invoked on behalf of the world, but if invoked from an individual morph's meta-menu, it will be invoked on behalf of that individual morph.\\\\n\\\\nNote that you can indeed reimplement tempCommand in an individual morph's class if you wish\\\\\\\"\\\\n\\\\n\\\\tToolSet browse: Morph\\\\n\\\\t\\\\tselector: #tempCommand! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'RAA 1/19/2001 07:51'!\\\\ndeleteAnyMouseActionIndicators\\\\n\\\\n\\\\tself changed.\\\\n\\\\t(self valueOfProperty: #mouseActionIndicatorMorphs ifAbsent: [#()]) do: [ :each |\\\\n\\\\t\\\\teach deleteWithSiblings\\\\t\\\\t\\\\\\\"one is probably enough, but be safe\\\\\\\"\\\\n\\\\t].\\\\n\\\\tself removeProperty: #mouseActionIndicatorMorphs.\\\\n\\\\tself hasRolloverBorder: false.\\\\n\\\\tself removeProperty: #rolloverWidth.\\\\n\\\\tself removeProperty: #rolloverColor.\\\\n\\\\tself layoutChanged.\\\\n\\\\tself changed.\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'sw 7/17/2001 19:08'!\\\\nhandMeTilesToFire \\\\n\\\\t\\\\\\\"Construct a phrase of tiles comprising a line of code that will 'fire' this object, and hand it to the user\\\\\\\"\\\\n\\\\n\\\\tActiveHand attachMorph: (self assuredPlayer tilesToCall: MethodInterface firingInterface)! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'ar 10/5/2000 17:38'!\\\\ninspectArgumentsPlayerInMorphic: evt\\\\n\\\\tevt hand attachMorph: ((Inspector openAsMorphOn: self player) extent: 300@200)! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'sw 11/5/1998 20:31'!\\\\ninspectOwnerChain\\\\n\\\\tself ownerChain inspectWithLabel: 'Owner chain for ', self printString! !\\\\n\\\\n!Morph methodsFor: 'debug and other'!\\\\ninstallModelIn: ignored\\\\n\\\\t\\\\\\\"Simple morphs have no model\\\\\\\"\\\\n\\\\t\\\\\\\"See MorphicApp for other behavior\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'sw 2/6/2001 22:35'!\\\\nmouseUpCodeOrNil\\\\n\\\\t\\\\\\\"If the receiver has a mouseUpCodeToRun, return it, else return nil\\\\\\\"\\\\n\\\\n\\\\t^ self valueOfProperty: #mouseUpCodeToRun ifAbsent: [nil]! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'dgd 2/22/2003 19:05'!\\\\nownerChain\\\\n\\\\t\\\\\\\"Answer a list of objects representing the receiver and all of its owners.   The first element is the receiver, and the last one is typically the world in which the receiver resides\\\\\\\"\\\\n\\\\n\\\\t| c next |\\\\n\\\\tc := OrderedCollection with: self.\\\\n\\\\tnext := self.\\\\n\\\\t[(next := next owner) notNil] whileTrue: [c add: next].\\\\n\\\\t^c asArray! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'RAA 7/12/2000 11:16'!\\\\nprogrammedMouseDown: anEvent for: aMorph\\\\n\\\\n\\\\taMorph addMouseActionIndicatorsWidth: 15 color: (Color blue alpha: 0.7).\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'RAA 7/12/2000 11:16'!\\\\nprogrammedMouseEnter: anEvent for: aMorph\\\\n\\\\n\\\\taMorph addMouseActionIndicatorsWidth: 10 color: (Color blue alpha: 0.3).\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'RAA 7/12/2000 11:10'!\\\\nprogrammedMouseLeave: anEvent for: aMorph\\\\n\\\\n\\\\tself deleteAnyMouseActionIndicators.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'gm 2/22/2003 13:41'!\\\\nprogrammedMouseUp: anEvent for: aMorph \\\\n\\\\t| aCodeString |\\\\n\\\\tself deleteAnyMouseActionIndicators.\\\\n\\\\taCodeString := self valueOfProperty: #mouseUpCodeToRun ifAbsent: [^self].\\\\n\\\\t(self fullBounds containsPoint: anEvent cursorPoint) ifFalse: [^self].\\\\n\\\\t\\\\n\\\\t[(aCodeString isMessageSend) \\\\n\\\\t\\\\tifTrue: [aCodeString value]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[Compiler \\\\n\\\\t\\\\t\\\\t\\\\tevaluate: aCodeString\\\\n\\\\t\\\\t\\\\t\\\\tfor: self\\\\n\\\\t\\\\t\\\\t\\\\tnotifying: nil\\\\n\\\\t\\\\t\\\\t\\\\tlogged: false]] \\\\n\\\\t\\\\t\\\\ton: ProgressTargetRequestNotification\\\\n\\\\t\\\\t\\\\tdo: [:ex | ex resume: self]\\\\t\\\\\\\"in case a save/load progress display needs a home\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'RAA 7/7/2000 16:43'!\\\\nremoveMouseUpAction\\\\n\\\\n\\\\tself primaryHand showTemporaryCursor: nil.\\\\n\\\\tself removeProperty: #mouseUpCodeToRun.\\\\n\\\\t#(mouseUp mouseEnter mouseLeave mouseDown) do: [ :sym |\\\\n\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\ton: sym \\\\n\\\\t\\\\t\\\\tsend: #yourself \\\\n\\\\t\\\\t\\\\tto: nil.\\\\n\\\\t]\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'RAA 5/24/2000 18:20'!\\\\nresumeAfterDrawError\\\\n\\\\n\\\\tself changed.\\\\n\\\\tself removeProperty:#errorOnDraw.\\\\n\\\\tself changed.! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'RAA 5/24/2000 18:20'!\\\\nresumeAfterStepError\\\\n\\\\t\\\\\\\"Resume stepping after an error has occured.\\\\\\\"\\\\n\\\\n\\\\tself startStepping. \\\\\\\"Will #step\\\\\\\"\\\\n\\\\tself removeProperty:#errorOnStep. \\\\\\\"Will remove prop only if #step was okay\\\\\\\"\\\\n! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'dgd 8/30/2003 20:43'!\\\\ntempCommand\\\\n\\\\t\\\\\\\"Generic backstop.  If you care to, you can comment out what's below here, and substitute your own code, though the intention of design of the feature is that you leave this method as it is, and instead reimplement tempCommand in the class of whatever individual morph you care to.  In any case, once you have your own #tempCommand in place, you will then be able to invoke it from the standard debugging menus.\\\\\\\"\\\\n\\\\n\\\\tself inform: 'Before calling tempCommand, you\\\\nshould first give it a definition.  To\\\\ndo this, choose \\\\\\\"define tempCommand\\\\\\\"\\\\nfrom the debug menu.' translated! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'sw 8/4/2001 00:33'!\\\\nviewMorphDirectly\\\\n\\\\t\\\\\\\"Open a Viewer directly on the Receiver, i.e. no Player involved\\\\\\\"\\\\n\\\\n\\\\tself presenter viewObjectDirectly: self renderedMorph\\\\n\\\\n\\\\t! !\\\\n\\\\n\\\\n!Morph methodsFor: 'dispatching' stamp: 'nk 2/15/2004 09:16'!\\\\ndisableSubmorphFocusForHand: aHandMorph\\\\n\\\\t\\\\\\\"Check whether this morph or any of its submorph has the Genie focus.\\\\n\\\\tIf yes, disable it.\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'di 6/24/1998 14:10'!\\\\nareasRemainingToFill: aRectangle\\\\n\\\\t\\\\\\\"May be overridden by any subclasses with opaque regions\\\\\\\"\\\\n\\\\n\\\\t^ Array with: aRectangle! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'sw 6/4/2000 22:02'!\\\\nboundingBoxOfSubmorphs\\\\n\\\\t| aBox |\\\\n\\\\taBox _ bounds origin extent: self minimumExtent.  \\\\\\\"so won't end up with something empty\\\\\\\"\\\\n\\\\tsubmorphs do:\\\\n\\\\t\\\\t[:m | m visible ifTrue: [aBox _ aBox quickMerge: m fullBounds]].\\\\n\\\\t^ aBox\\\\n! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'di 2/15/2001 14:51'!\\\\nboundsWithinCorners\\\\n\\\\n\\\\t^ CornerRounder rectWithinCornersOf: self bounds! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'ar 11/4/2000 23:39'!\\\\nchangeClipSubmorphs\\\\n\\\\tself clipSubmorphs: self clipSubmorphs not.! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'dgd 2/16/2003 20:02'!\\\\nclipLayoutCells\\\\n\\\\t\\\\\\\"Drawing/layout specific. If this property is set, clip the  \\\\n\\\\tsubmorphs of the receiver by its cell bounds.\\\\\\\"\\\\n\\\\t^ self\\\\n\\\\t\\\\tvalueOfProperty: #clipLayoutCells\\\\n\\\\t\\\\tifAbsent: [false]! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'ar 10/29/2000 19:22'!\\\\nclipLayoutCells: aBool\\\\n\\\\t\\\\\\\"Drawing/layout specific. If this property is set, clip the submorphs of the receiver by its cell bounds.\\\\\\\"\\\\n\\\\taBool == false\\\\n\\\\t\\\\tifTrue:[self removeProperty: #clipLayoutCells]\\\\n\\\\t\\\\tifFalse:[self setProperty: #clipLayoutCells toValue: aBool].\\\\n\\\\tself changed.! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'ar 10/29/2000 19:16'!\\\\nclippingBounds\\\\n\\\\t\\\\\\\"Return the bounds to which any submorphs should be clipped if the property is set\\\\\\\"\\\\n\\\\t^self innerBounds! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'md 4/3/2006 11:53'!\\\\nclipSubmorphs\\\\n\\\\t\\\\\\\"Drawing specific. If this property is set, clip the receiver's  \\\\n\\\\tsubmorphs to the receiver's clipping bounds.\\\\\\\"\\\\n\\\\t\\\\n\\\\textension ifNil: [^false].\\\\n\\\\t^ self\\\\n\\\\t\\\\tvalueOfProperty: #clipSubmorphs\\\\n\\\\t\\\\tifAbsent: [false]! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'ar 11/12/2000 18:47'!\\\\nclipSubmorphs: aBool\\\\n\\\\t\\\\\\\"Drawing specific. If this property is set, clip the receiver's submorphs to the receiver's clipping bounds.\\\\\\\"\\\\n\\\\tself invalidRect: self fullBounds.\\\\n\\\\taBool == false\\\\n\\\\t\\\\tifTrue:[self removeProperty: #clipSubmorphs]\\\\n\\\\t\\\\tifFalse:[self setProperty: #clipSubmorphs toValue: aBool].\\\\n\\\\tself invalidRect: self fullBounds.! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'tk 8/2/1998 14:33'!\\\\ndoesOwnRotation\\\\n\\\\t\\\\\\\"Some morphs don't want to TransformMorph to rotate their images, but we do\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'panda 4/28/2000 11:59'!\\\\ndrawDropHighlightOn: aCanvas\\\\n\\\\tself highlightedForDrop ifTrue: [\\\\n\\\\t\\\\taCanvas frameRectangle: self fullBounds color: self dropHighlightColor].! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'ar 12/30/2001 19:17'!\\\\ndrawDropShadowOn: aCanvas\\\\n\\\\n\\\\taCanvas \\\\n\\\\t\\\\ttranslateBy: self shadowOffset \\\\n\\\\t\\\\tduring: [ :shadowCanvas |\\\\n\\\\t\\\\t\\\\tshadowCanvas shadowColor: self shadowColor.\\\\n\\\\t\\\\t\\\\tshadowCanvas roundCornersOf: self during: [ \\\\n\\\\t\\\\t\\\\t\\\\t(shadowCanvas isVisible: self bounds) ifTrue:[shadowCanvas drawMorph: self ]]\\\\n\\\\t\\\\t].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'ar 4/2/1999 13:13'!\\\\ndrawErrorOn: aCanvas\\\\n\\\\t\\\\\\\"The morph (or one of its submorphs) had an error in its drawing method.\\\\\\\"\\\\n\\\\taCanvas\\\\n\\\\t\\\\tframeAndFillRectangle: bounds\\\\n\\\\t\\\\tfillColor: Color red\\\\n\\\\t\\\\tborderWidth: 1\\\\n\\\\t\\\\tborderColor: Color yellow.\\\\n\\\\taCanvas line: bounds topLeft to: bounds bottomRight width: 1 color: Color yellow.\\\\n\\\\taCanvas line: bounds topRight to: bounds bottomLeft width: 1 color: Color yellow.! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: '   9/3/2000 13:55'!\\\\ndrawMouseDownHighlightOn: aCanvas\\\\n\\\\tself highlightedForMouseDown ifTrue: [\\\\n\\\\t\\\\taCanvas frameRectangle: self fullBounds color: self color darker darker].! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'ar 8/25/2001 17:31'!\\\\ndrawOn: aCanvas\\\\n\\\\n\\\\taCanvas fillRectangle: self bounds fillStyle: self fillStyle borderStyle: self borderStyle.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'wiz 3/21/2006 20:44'!\\\\ndrawRolloverBorderOn: aCanvas \\\\n\\\\t| colorToUse offsetToUse myShadow newForm f |\\\\n\\\\tcolorToUse := self\\\\n\\\\t\\\\t\\\\t\\\\tvalueOfProperty: #rolloverColor\\\\n\\\\t\\\\t\\\\t\\\\tifAbsent: [Color blue alpha: 0.5].\\\\n\\\\toffsetToUse := self\\\\n\\\\t\\\\t\\\\t\\\\tvalueOfProperty: #rolloverWidth\\\\n\\\\t\\\\t\\\\t\\\\tifAbsent: [10 @ 10].\\\\n\\\\tself hasRolloverBorder: false.\\\\n\\\\tmyShadow := self shadowForm.\\\\n\\\\tself hasRolloverBorder: true.\\\\n\\\\tmyShadow offset: 0 @ 0.\\\\n\\\\tf := ColorForm extent: myShadow extent depth: 1.\\\\n\\\\tmyShadow displayOn: f.\\\\n\\\\tf colors: {Color transparent. colorToUse}.\\\\n\\\\tnewForm := Form extent: offsetToUse * 2 + myShadow extent depth: 32.\\\\n\\\\t(WarpBlt current toForm: newForm) sourceForm: f;\\\\n\\\\t\\\\t cellSize: 1;\\\\n\\\\t\\\\t combinationRule: 3;\\\\n\\\\t\\\\t copyQuad: f boundingBox innerCorners toRect: newForm boundingBox.\\\\n\\\\taCanvas\\\\n\\\\t\\\\ttranslateBy: offsetToUse negated\\\\n\\\\t\\\\tduring: [:shadowCanvas | \\\\n\\\\t\\\\t\\\\tshadowCanvas shadowColor: colorToUse.\\\\n\\\\t\\\\t\\\\tshadowCanvas paintImage: newForm at: self position]! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'dgd 2/22/2003 14:31'!\\\\ndrawSubmorphsOn: aCanvas \\\\n\\\\t\\\\\\\"Display submorphs back to front\\\\\\\"\\\\n\\\\n\\\\t| drawBlock |\\\\n\\\\tsubmorphs isEmpty ifTrue: [^self].\\\\n\\\\tdrawBlock := [:canvas | submorphs reverseDo: [:m | canvas fullDrawMorph: m]].\\\\n\\\\tself clipSubmorphs \\\\n\\\\t\\\\tifTrue: [aCanvas clipBy: self clippingBounds during: drawBlock]\\\\n\\\\t\\\\tifFalse: [drawBlock value: aCanvas]! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'RAA 1/6/2001 22:12'!\\\\nexpandFullBoundsForDropShadow: aRectangle\\\\n\\\\t\\\\\\\"Return an expanded rectangle for an eventual drop shadow\\\\\\\"\\\\n\\\\t| delta box |\\\\n\\\\n\\\\tbox _ aRectangle.\\\\n\\\\tdelta _ self shadowOffset.\\\\n\\\\tbox _ delta x >= 0 \\\\n\\\\t\\\\tifTrue:[box right: aRectangle right + delta x]\\\\n\\\\t\\\\tifFalse:[box left: aRectangle left + delta x].\\\\n\\\\tbox _ delta y >= 0\\\\n\\\\t\\\\tifTrue:[box bottom: aRectangle bottom + delta y]\\\\n\\\\t\\\\tifFalse:[box top: aRectangle top + delta y].\\\\n\\\\t^box! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'ar 11/8/2000 19:29'!\\\\nexpandFullBoundsForRolloverBorder: aRectangle\\\\n\\\\t| delta |\\\\n\\\\tdelta _ self valueOfProperty: #rolloverWidth ifAbsent: [10@10].\\\\n\\\\t^aRectangle expandBy: delta.\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'sw 11/26/2003 17:43'!\\\\nflashBounds\\\\n\\\\t\\\\\\\"Flash the receiver's bounds  -- does not use the receiver's color, thus works with StringMorphs and SketchMorphs, etc., for which #flash is useless.  No senders initially, but useful to send this from a debugger or inspector\\\\\\\"\\\\n\\\\n\\\\t5 timesRepeat:\\\\n\\\\t\\\\t[Display flash: self boundsInWorld  andWait: 120]! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'ar 12/30/2001 15:22'!\\\\nfullDrawOn: aCanvas\\\\n\\\\t\\\\\\\"Draw the full Morphic structure on the given Canvas\\\\\\\"\\\\n\\\\n\\\\tself visible ifFalse: [^ self].\\\\n\\\\t(aCanvas isVisible: self fullBounds) ifFalse:[^self].\\\\n\\\\t(self hasProperty: #errorOnDraw) ifTrue:[^self drawErrorOn: aCanvas].\\\\n\\\\t\\\\\\\"Note: At some point we should generalize this into some sort of \\\\n\\\\tmulti-canvas so that we can cross-optimize some drawing operations.\\\\\\\"\\\\n\\\\t\\\\\\\"Pass 1: Draw eventual drop-shadow\\\\\\\"\\\\n\\\\tself hasDropShadow ifTrue: [self drawDropShadowOn: aCanvas].\\\\n\\\\t(self hasRolloverBorder and: [(aCanvas seesNothingOutside: self bounds) not])\\\\n\\\\t\\\\tifTrue: [self drawRolloverBorderOn: aCanvas].\\\\n\\\\n\\\\t\\\\\\\"Pass 2: Draw receiver itself\\\\\\\"\\\\n\\\\taCanvas roundCornersOf: self during:[\\\\n\\\\t\\\\t(aCanvas isVisible: self bounds) ifTrue:[aCanvas drawMorph: self].\\\\n\\\\t\\\\tself drawSubmorphsOn: aCanvas.\\\\n\\\\t\\\\tself drawDropHighlightOn: aCanvas.\\\\n\\\\t\\\\tself drawMouseDownHighlightOn: aCanvas].! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'dgd 8/30/2003 20:20'!\\\\nhasClipSubmorphsString\\\\n\\\\t\\\\\\\"Answer a string that represents the clip-submophs checkbox\\\\\\\"\\\\n\\\\t^ (self clipSubmorphs\\\\n\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\tifFalse: ['<off>'])\\\\n\\\\t\\\\t, 'provide clipping' translated! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'sw 10/30/1998 18:27'!\\\\nhide\\\\n\\\\towner ifNil: [^ self].\\\\n\\\\tself visible ifTrue: [self visible: false.  self changed]! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'LC 5/18/2000 08:48'!\\\\nhighlightedForMouseDown\\\\n\\\\t^(self valueOfProperty: #highlightedForMouseDown) == true! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'LC 5/18/2000 08:51'!\\\\nhighlightForMouseDown\\\\n\\\\tself highlightForMouseDown: true! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'ar 3/17/2001 15:56'!\\\\nhighlightForMouseDown: aBoolean\\\\n\\\\taBoolean \\\\n\\\\t\\\\tifTrue:[self setProperty: #highlightedForMouseDown toValue: aBoolean]\\\\n\\\\t\\\\tifFalse:[self removeProperty: #highlightedForMouseDown. self resetExtension].\\\\n\\\\tself changed! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'jm 6/11/97 17:21'!\\\\nimageForm\\\\n\\\\n\\\\t^ self imageFormForRectangle: self fullBounds\\\\n! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'di 7/8/1998 12:42'!\\\\nimageFormDepth: depth\\\\n\\\\n\\\\t^ self imageForm: depth forRectangle: self fullBounds\\\\n! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'di 9/9/1998 22:25'!\\\\nimageFormForRectangle: rect\\\\n\\\\n\\\\t^ self imageForm: Display depth forRectangle: rect\\\\n! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'ar 9/1/2000 14:23'!\\\\nimageFormWithout: stopMorph andStopThere: stopThere\\\\n\\\\t\\\\\\\"Like imageForm, except it does not display stopMorph,\\\\n\\\\tand it will not display anything above it if stopThere is true.\\\\n\\\\tReturns a pair of the imageForm and a boolean that is true\\\\n\\\\t\\\\tif it has hit stopMorph, and display should stop.\\\\\\\"\\\\n\\\\t| canvas rect |\\\\n\\\\trect _ self fullBounds.\\\\n\\\\tcanvas _ ColorPatchCanvas extent: rect extent depth: Display depth.\\\\n\\\\tcanvas stopMorph: stopMorph.\\\\n\\\\tcanvas doStop: stopThere.\\\\n\\\\tcanvas translateBy: rect topLeft negated during:[:tempCanvas| tempCanvas fullDrawMorph: self].\\\\n\\\\t^ Array with: (canvas form offset: rect topLeft)\\\\n\\\\t\\\\t\\\\twith: canvas foundMorph! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'nk 9/1/2004 15:08'!\\\\nimageForm: depth backgroundColor: aColor forRectangle: rect\\\\n\\\\t| canvas |\\\\n\\\\tcanvas _ Display defaultCanvasClass extent: rect extent depth: depth.\\\\n\\\\tcanvas translateBy: rect topLeft negated\\\\n\\\\t\\\\tduring:[:tempCanvas| \\\\n\\\\t\\\\t\\\\ttempCanvas fillRectangle: rect color: aColor.\\\\n\\\\t\\\\t\\\\ttempCanvas fullDrawMorph: self].\\\\n\\\\t^ canvas form offset: rect topLeft! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'ar 9/1/2000 14:23'!\\\\nimageForm: depth forRectangle: rect\\\\n\\\\t| canvas |\\\\n\\\\tcanvas _ Display defaultCanvasClass extent: rect extent depth: depth.\\\\n\\\\tcanvas translateBy: rect topLeft negated\\\\n\\\\t\\\\tduring:[:tempCanvas| tempCanvas fullDrawMorph: self].\\\\n\\\\t^ canvas form offset: rect topLeft! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'sw 10/10/1999 23:25'!\\\\nrefreshWorld\\\\n\\\\t| aWorld |\\\\n\\\\t(aWorld _ self world) ifNotNil: [aWorld displayWorldSafely]\\\\n! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'JW 7/12/2005 20:12'!\\\\nshadowForm\\\\n\\\\t\\\\\\\"Return a form representing the 'shadow' of the receiver - e.g., all pixels that are occupied by the receiver are one, all others are zero.\\\\\\\"\\\\n\\\\t| canvas |\\\\n\\\\tcanvas := (Display defaultCanvasClass extent: self fullBounds extent depth: 1)\\\\n\\\\t\\\\t\\\\t\\\\tasShadowDrawingCanvas: Color black. \\\\\\\"Color black represents one for 1bpp\\\\\\\"\\\\n\\\\tcanvas translateBy: bounds topLeft negated\\\\n\\\\t\\\\tduring:[:tempCanvas| tempCanvas fullDrawMorph: self].\\\\n\\\\t^ canvas form offset: bounds topLeft\\\\n! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'sw 10/22/1998 20:29'!\\\\nshow\\\\n\\\\t\\\\\\\"Make sure this morph is on-stage.\\\\\\\"\\\\n\\\\tself visible ifFalse: [self visible: true.  self changed]! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'md 2/27/2006 08:49'!\\\\nvisible\\\\n\\\\t\\\\\\\"answer whether the receiver is visible\\\\\\\"\\\\n\\\\textension ifNil: [^ true].\\\\n\\\\t^ extension visible! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'md 2/27/2006 08:49'!\\\\nvisible: aBoolean \\\\n\\\\t\\\\\\\"set the 'visible' attribute of the receiver to aBoolean\\\\\\\"\\\\n\\\\t(extension isNil and:[aBoolean]) ifTrue: [^ self].\\\\n\\\\tself visible == aBoolean ifTrue: [^ self].\\\\n\\\\tself assureExtension visible: aBoolean.\\\\n\\\\tself changed! !\\\\n\\\\n\\\\n!Morph methodsFor: 'drop shadows' stamp: 'RAA 1/19/2001 07:51'!\\\\naddDropShadow\\\\n\\\\n\\\\tself hasDropShadow ifTrue:[^self].\\\\n\\\\tself changed.\\\\n\\\\tself hasDropShadow: true.\\\\n\\\\tself shadowOffset: 3@3.\\\\n\\\\tself layoutChanged.\\\\n\\\\tself changed.! !\\\\n\\\\n!Morph methodsFor: 'drop shadows' stamp: 'dgd 8/30/2003 16:48'!\\\\naddDropShadowMenuItems: aMenu hand: aHand\\\\n\\\\t| menu |\\\\n\\\\tmenu _ MenuMorph new defaultTarget: self.\\\\n\\\\tmenu\\\\n\\\\t\\\\taddUpdating: #hasDropShadowString\\\\n\\\\t\\\\taction: #toggleDropShadow.\\\\n\\\\tmenu addLine.\\\\n\\\\tmenu add: 'shadow color...' translated target: self selector: #changeShadowColor.\\\\n\\\\tmenu add: 'shadow offset...' translated target: self selector: #setShadowOffset:.\\\\n\\\\taMenu add: 'drop shadow' translated subMenu: menu.! !\\\\n\\\\n!Morph methodsFor: 'drop shadows' stamp: 'ar 10/26/2000 20:22'!\\\\nchangeShadowColor\\\\n\\\\t\\\\\\\"Change the shadow color of the receiver -- triggered, e.g. from a menu\\\\\\\"\\\\n\\\\n\\\\tColorPickerMorph new\\\\n\\\\t\\\\tchoseModalityFromPreference;\\\\n\\\\t\\\\tsourceHand: self activeHand;\\\\n\\\\t\\\\ttarget: self;\\\\n\\\\t\\\\tselector: #shadowColor:;\\\\n\\\\t\\\\toriginalColor: self shadowColor;\\\\n\\\\t\\\\tputUpFor: self near: self fullBoundsInWorld! !\\\\n\\\\n!Morph methodsFor: 'drop shadows' stamp: 'dgd 2/16/2003 21:42'!\\\\nhasDropShadow\\\\n\\\\t\\\\\\\"answer whether the receiver has DropShadow\\\\\\\"\\\\n\\\\t^ self\\\\n\\\\t\\\\tvalueOfProperty: #hasDropShadow\\\\n\\\\t\\\\tifAbsent: [false]! !\\\\n\\\\n!Morph methodsFor: 'drop shadows' stamp: 'dgd 8/30/2003 16:49'!\\\\nhasDropShadowString\\\\n\\\\t^ (self hasDropShadow\\\\n\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\tifFalse: ['<off>'])\\\\n\\\\t\\\\t, 'show shadow' translated! !\\\\n\\\\n!Morph methodsFor: 'drop shadows' stamp: 'ar 10/26/2000 19:03'!\\\\nhasDropShadow: aBool\\\\n\\\\taBool\\\\n\\\\t\\\\tifTrue:[self setProperty: #hasDropShadow toValue: true]\\\\n\\\\t\\\\tifFalse:[self removeProperty: #hasDropShadow]! !\\\\n\\\\n!Morph methodsFor: 'drop shadows' stamp: 'dgd 2/16/2003 21:58'!\\\\nhasRolloverBorder\\\\n\\\\t\\\\\\\"answer whether the receiver has RolloverBorder\\\\\\\"\\\\n\\\\t^ self\\\\n\\\\t\\\\tvalueOfProperty: #hasRolloverBorder\\\\n\\\\t\\\\tifAbsent: [false]! !\\\\n\\\\n!Morph methodsFor: 'drop shadows' stamp: 'RAA 11/7/2000 15:54'!\\\\nhasRolloverBorder: aBool\\\\n\\\\taBool\\\\n\\\\t\\\\tifTrue:[self setProperty: #hasRolloverBorder toValue: true]\\\\n\\\\t\\\\tifFalse:[self removeProperty: #hasRolloverBorder]! !\\\\n\\\\n!Morph methodsFor: 'drop shadows' stamp: 'ar 11/12/2000 18:57'!\\\\nremoveDropShadow\\\\n\\\\tself hasDropShadow ifFalse:[^self].\\\\n\\\\tself changed.\\\\n\\\\tself hasDropShadow: false.\\\\n\\\\tfullBounds ifNotNil:[fullBounds _ self privateFullBounds].\\\\n\\\\tself changed.! !\\\\n\\\\n!Morph methodsFor: 'drop shadows' stamp: 'ar 10/26/2000 18:58'!\\\\nsetShadowOffset: evt\\\\n\\\\t| handle |\\\\n\\\\thandle _ HandleMorph new forEachPointDo:\\\\n\\\\t\\\\t[:newPoint | self shadowPoint: newPoint].\\\\n\\\\tevt hand attachMorph: handle.\\\\n\\\\thandle startStepping.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'drop shadows' stamp: 'ar 10/26/2000 18:59'!\\\\nshadowColor\\\\n\\\\t^self valueOfProperty: #shadowColor ifAbsent:[Color black]! !\\\\n\\\\n!Morph methodsFor: 'drop shadows' stamp: 'ar 10/26/2000 20:22'!\\\\nshadowColor: aColor\\\\n\\\\tself shadowColor = aColor ifFalse:[self changed].\\\\n\\\\tself setProperty: #shadowColor toValue: aColor.! !\\\\n\\\\n!Morph methodsFor: 'drop shadows' stamp: 'ar 10/26/2000 18:57'!\\\\nshadowOffset\\\\n\\\\t\\\\\\\"Return the current shadow offset\\\\\\\"\\\\n\\\\t^self valueOfProperty: #shadowOffset ifAbsent:[0@0]! !\\\\n\\\\n!Morph methodsFor: 'drop shadows' stamp: 'ar 10/26/2000 19:00'!\\\\nshadowOffset: aPoint\\\\n\\\\t\\\\\\\"Set the current shadow offset\\\\\\\"\\\\n\\\\t(aPoint isNil or:[(aPoint x isZero) & (aPoint y isZero)])\\\\n\\\\t\\\\tifTrue:[self removeProperty: #shadowOffset]\\\\n\\\\t\\\\tifFalse:[self setProperty: #shadowOffset toValue: aPoint].! !\\\\n\\\\n!Morph methodsFor: 'drop shadows' stamp: 'ar 11/12/2000 18:58'!\\\\nshadowPoint: newPoint\\\\n\\\\tself changed.\\\\n\\\\tself shadowOffset: newPoint - self center // 5.\\\\n\\\\tfullBounds ifNotNil:[fullBounds _ self privateFullBounds].\\\\n\\\\tself changed.! !\\\\n\\\\n!Morph methodsFor: 'drop shadows' stamp: 'ar 10/26/2000 20:16'!\\\\ntoggleDropShadow\\\\n\\\\tself hasDropShadow\\\\n\\\\t\\\\tifTrue:[self removeDropShadow]\\\\n\\\\t\\\\tifFalse:[self addDropShadow].! !\\\\n\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'ar 10/5/2000 20:00'!\\\\naboutToBeGrabbedBy: aHand\\\\n\\\\t\\\\\\\"The receiver is being grabbed by a hand.\\\\n\\\\tPerform necessary adjustments (if any) and return the actual morph\\\\n\\\\tthat should be added to the hand.\\\\\\\"\\\\n\\\\t| extentToHandToHand cmd |\\\\n\\\\tself formerOwner: owner.\\\\n\\\\tself formerPosition: self position.\\\\n\\\\tcmd _ self undoGrabCommand.\\\\n\\\\tcmd ifNotNil:[self setProperty: #undoGrabCommand toValue: cmd].\\\\n\\\\t(extentToHandToHand _ self valueOfProperty: #expandedExtent)\\\\n\\\\t\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t\\\\t[self removeProperty: #expandedExtent.\\\\n\\\\t\\\\t\\\\t\\\\tself extent: extentToHandToHand].\\\\n\\\\t^self \\\\\\\"Grab me\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'panda 4/25/2000 15:41'!\\\\ndisableDragNDrop\\\\n\\\\tself enableDragNDrop: false! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'panda 4/25/2000 15:50'!\\\\ndragEnabled\\\\n\\\\t\\\\\\\"Get this morph's ability to add and remove morphs via drag-n-drop.\\\\\\\"\\\\n\\\\t^(self valueOfProperty: #dragEnabled) == true\\\\n! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'ar 10/11/2000 18:18'!\\\\ndragEnabled: aBool\\\\n\\\\t^self enableDrag: aBool! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'ar 10/11/2000 18:20'!\\\\ndragNDropEnabled\\\\n\\\\t\\\\\\\"Note: This method is only useful for dragEnabled == dropEnabled at all times\\\\\\\"\\\\n\\\\tself separateDragAndDrop.\\\\n\\\\t^self dragEnabled and:[self dropEnabled]! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'panda 4/25/2000 18:36'!\\\\ndragSelectionColor\\\\n\\\\t^ Color magenta! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'panda 4/25/2000 15:51'!\\\\ndropEnabled\\\\n\\\\t\\\\\\\"Get this morph's ability to add and remove morphs via drag-n-drop.\\\\\\\"\\\\n\\\\t^(self valueOfProperty: #dropEnabled) == true\\\\n! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'ar 10/11/2000 18:18'!\\\\ndropEnabled: aBool\\\\n\\\\t^self enableDrop: aBool! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'panda 4/28/2000 10:52'!\\\\ndropHighlightColor\\\\n\\\\t^ Color blue! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'panda 4/25/2000 18:08'!\\\\ndropSuccessColor\\\\n\\\\t^ Color blue! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'panda 4/25/2000 15:41'!\\\\nenableDragNDrop\\\\n\\\\tself enableDragNDrop: true! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'ar 10/11/2000 18:21'!\\\\nenableDragNDrop: aBoolean\\\\n\\\\t\\\\\\\"Set both properties at once\\\\\\\"\\\\n\\\\tself separateDragAndDrop.\\\\n\\\\tself enableDrag: aBoolean.\\\\n\\\\tself enableDrop: aBoolean.! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'panda 4/25/2000 15:50'!\\\\nenableDrag: aBoolean\\\\n\\\\tself setProperty: #dragEnabled toValue: aBoolean! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'panda 4/25/2000 15:51'!\\\\nenableDrop: aBoolean\\\\n\\\\tself setProperty: #dropEnabled toValue: aBoolean! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'ar 10/5/2000 18:13'!\\\\nformerOwner\\\\n\\\\t^self valueOfProperty: #formerOwner! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'dgd 2/22/2003 14:31'!\\\\nformerOwner: aMorphOrNil \\\\n\\\\taMorphOrNil isNil \\\\n\\\\t\\\\tifTrue: [self removeProperty: #formerOwner]\\\\n\\\\t\\\\tifFalse: [self setProperty: #formerOwner toValue: aMorphOrNil]! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'ar 10/5/2000 18:13'!\\\\nformerPosition\\\\n\\\\t^self valueOfProperty: #formerPosition! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'dgd 2/22/2003 14:31'!\\\\nformerPosition: formerPosition \\\\n\\\\tformerPosition isNil \\\\n\\\\t\\\\tifTrue: [self removeProperty: #formerPosition]\\\\n\\\\t\\\\tifFalse: [self setProperty: #formerPosition toValue: formerPosition]! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'ar 10/6/2000 15:13'!\\\\ngrabTransform\\\\n\\\\t\\\\\\\"Return the transform for the receiver which should be applied during grabbing\\\\\\\"\\\\n\\\\t^owner ifNil:[IdentityTransform new] ifNotNil:[owner grabTransform]! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'panda 4/28/2000 10:53'!\\\\nhighlightedForDrop\\\\n\\\\t^(self valueOfProperty: #highlightedForDrop) == true! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'panda 4/28/2000 11:51'!\\\\nhighlightForDrop\\\\n\\\\tself highlightForDrop: true! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'panda 4/28/2000 12:01'!\\\\nhighlightForDrop: aBoolean\\\\n\\\\tself setProperty: #highlightedForDrop toValue: aBoolean.\\\\n\\\\tself changed! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'dgd 9/10/2004 13:42'!\\\\njustDroppedInto: aMorph event: anEvent\\\\n\\\\t\\\\\\\"This message is sent to a dropped morph after it has been dropped on -- and been accepted by -- a drop-sensitive morph\\\\\\\"\\\\n\\\\n\\\\t| aWindow partsBinCase cmd aStack |\\\\n\\\\t(self formerOwner notNil and: [self formerOwner ~~ aMorph])\\\\n\\\\t\\\\tifTrue: [self removeHalo].\\\\n\\\\tself formerOwner: nil.\\\\n\\\\tself formerPosition: nil.\\\\n\\\\tcmd _ self valueOfProperty: #undoGrabCommand.\\\\n\\\\tcmd ifNotNil:[aMorph rememberCommand: cmd.\\\\n\\\\t\\\\t\\\\t\\\\tself removeProperty: #undoGrabCommand].\\\\n\\\\t(partsBinCase _ aMorph isPartsBin) ifFalse:\\\\n\\\\t\\\\t[self isPartsDonor: false].\\\\n\\\\t(aWindow _ aMorph ownerThatIsA: SystemWindow) ifNotNil:\\\\n\\\\t\\\\t[aWindow isActive ifFalse:\\\\n\\\\t\\\\t\\\\t[aWindow activate]].\\\\n\\\\t(self isInWorld and: [partsBinCase not]) ifTrue:\\\\n\\\\t\\\\t[self world startSteppingSubmorphsOf: self].\\\\n\\\\t\\\\\\\"Note an unhappy inefficiency here:  the startStepping... call will often have already been called in the sequence leading up to entry to this method, but unfortunately the isPartsDonor: call often will not have already happened, with the result that the startStepping... call will not have resulted in the startage of the steppage.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"An object launched by certain parts-launcher mechanisms should end up fully visible...\\\\\\\"\\\\n\\\\t(self hasProperty: #beFullyVisibleAfterDrop) ifTrue:\\\\n\\\\t\\\\t[aMorph == ActiveWorld ifTrue:\\\\n\\\\t\\\\t\\\\t[self goHome].\\\\n\\\\t\\\\tself removeProperty: #beFullyVisibleAfterDrop].\\\\n\\\\n\\\\t(self holdsSeparateDataForEachInstance and: [(aStack _ self stack) notNil])\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[aStack reassessBackgroundShape]\\\\n! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'ar 2/6/2001 22:12'!\\\\njustGrabbedFrom: formerOwner\\\\n\\\\t\\\\\\\"The receiver was just grabbed from its former owner and is now attached to the hand. By default, we pass this message on if we're a renderer.\\\\\\\"\\\\n\\\\t(self isRenderer and:[self hasSubmorphs]) \\\\n\\\\t\\\\tifTrue:[self firstSubmorph justGrabbedFrom: formerOwner].! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'sw 3/27/2001 11:52'!\\\\nnameForUndoWording\\\\n\\\\t\\\\\\\"Return wording appropriate to the receiver for use in an undo-related menu item (and perhaps elsewhere)\\\\\\\"\\\\n\\\\n\\\\t| aName |\\\\n\\\\taName _ self knownName ifNil: [self renderedMorph class name].\\\\n\\\\t^ aName truncateTo: 24! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'di 12/12/2000 14:35'!\\\\nrejectDropMorphEvent: evt\\\\n\\\\t\\\\\\\"The receiver has been rejected, and must be put back somewhere.  There are three cases:\\\\n\\\\t(1)  It remembers its former owner and position, and goes right back there\\\\n\\\\t(2)  It remembers its former position only, in which case it was torn off from a parts bin, and the UI is that it floats back to its donor position and then vanishes.\\\\n\\\\t(3)  Neither former owner nor position is remembered, in which case it is whisked to the Trash\\\\\\\"\\\\n\\\\n\\\\tself removeProperty: #undoGrabCommand.\\\\n\\\\t(self formerOwner notNil and: [self formerOwner isPartsBin not]) ifTrue:\\\\n\\\\t\\\\t[^ self slideBackToFormerSituation: evt].\\\\n\\\\n\\\\tself formerPosition ifNotNil:  \\\\\\\"Position but no owner -- can just make it vanish\\\\\\\"\\\\n\\\\t\\\\t[^ self vanishAfterSlidingTo: self formerPosition event: evt].\\\\n\\\\t\\\\t\\\\n\\\\tself slideToTrash: evt! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'sw 1/11/1999 20:07'!\\\\nrepelsMorph: aMorph event: ev\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'panda 4/28/2000 12:02'!\\\\nresetHighlightForDrop\\\\n\\\\tself highlightForDrop: false! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'ar 10/11/2000 18:24'!\\\\nseparateDragAndDrop\\\\n\\\\t\\\\\\\"Conversion only. Separate the old #dragNDropEnabled into #dragEnabled and #dropEnabled and remove the old property.\\\\\\\"\\\\n\\\\t| dnd |\\\\n\\\\t(self hasProperty: #dragNDropEnabled) ifFalse:[^self].\\\\n\\\\tdnd _ (self valueOfProperty: #dragNDropEnabled) == true.\\\\n\\\\tself dragEnabled: dnd.\\\\n\\\\tself dropEnabled: dnd.\\\\n\\\\tself removeProperty: #dragNDropEnabled.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'ar 8/12/2003 23:35'!\\\\nslideBackToFormerSituation: evt \\\\n\\\\t| slideForm formerOwner formerPosition aWorld startPoint endPoint trans |\\\\n\\\\tformerOwner := self formerOwner.\\\\n\\\\tformerPosition := self formerPosition.\\\\n\\\\taWorld := evt hand world.\\\\n\\\\ttrans := formerOwner transformFromWorld.\\\\n\\\\tslideForm := trans isPureTranslation \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self imageForm offset: 0 @ 0]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[((TransformationMorph new asFlexOf: self) transform: trans) imageForm \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\toffset: 0 @ 0]. \\\\n\\\\tstartPoint := evt hand fullBounds origin.\\\\n\\\\tendPoint := trans localPointToGlobal: formerPosition.\\\\n\\\\towner removeMorph: self.\\\\n\\\\taWorld displayWorld.\\\\n\\\\tslideForm \\\\n\\\\t\\\\tslideFrom: startPoint\\\\n\\\\t\\\\tto: endPoint\\\\n\\\\t\\\\tnSteps: 12\\\\n\\\\t\\\\tdelay: 15.\\\\n\\\\tformerOwner addMorph: self.\\\\n\\\\tself position: formerPosition.\\\\n\\\\tself justDroppedInto: formerOwner event: evt! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'dgd 4/3/2006 14:12'!\\\\nslideToTrash: evt\\\\n\\\\t\\\\\\\"Perhaps slide the receiver across the screen to a trash can and make it disappear into it.  In any case, remove the receiver from the screen.\\\\\\\"\\\\n\\\\n\\\\t| aForm trash startPoint endPoint morphToSlide |\\\\n\\\\t((self renderedMorph == Utilities scrapsBook) or: [self renderedMorph isKindOf: TrashCanMorph]) ifTrue:\\\\n\\\\t\\\\t[self dismissMorph.  ^ self].\\\\n\\\\tPreferences slideDismissalsToTrash ifTrue:\\\\n\\\\t\\\\t[morphToSlide _ self representativeNoTallerThan: 200 norWiderThan: 200 thumbnailHeight: 100.\\\\n\\\\t\\\\taForm _ morphToSlide imageForm offset: (0@0).\\\\n\\\\t\\\\ttrash _ ActiveWorld\\\\n\\\\t\\\\t\\\\tfindDeepSubmorphThat:\\\\n\\\\t\\\\t\\\\t\\\\t[:aMorph | (aMorph isKindOf: TrashCanMorph) and:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[aMorph topRendererOrSelf owner == ActiveWorld]]\\\\n\\\\t\\\\t\\\\tifAbsent:\\\\n\\\\t\\\\t\\\\t\\\\t[trash _ TrashCanMorph new.\\\\n\\\\t\\\\t\\\\t\\\\ttrash bottomLeft: ActiveWorld bottomLeft - (-10@10).\\\\n\\\\t\\\\t\\\\t\\\\ttrash openInWorld.\\\\n\\\\t\\\\t\\\\t\\\\ttrash].\\\\n\\\\t\\\\tendPoint _ trash fullBoundsInWorld center.\\\\n\\\\t\\\\tstartPoint _ self topRendererOrSelf fullBoundsInWorld center - (aForm extent // 2)].\\\\n\\\\tself dismissMorph.\\\\n\\\\tActiveWorld displayWorld.\\\\n\\\\tPreferences slideDismissalsToTrash ifTrue:\\\\n\\\\t\\\\t[aForm slideFrom: startPoint to: endPoint nSteps: 12 delay: 15].\\\\n\\\\tUtilities addToTrash: self! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'mir 1/4/2001 11:02'!\\\\nstartDrag: anItem with: anObject\\\\n\\\\tself currentHand attachMorph: anObject! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'panda 4/25/2000 15:46'!\\\\ntoggleDragNDrop\\\\n\\\\t\\\\\\\"Toggle this morph's ability to add and remove morphs via drag-n-drop.\\\\\\\"\\\\n\\\\n\\\\t\\\\tself enableDragNDrop: self dragNDropEnabled not.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing'!\\\\ntransportedMorph\\\\n\\\\t^self! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'dgd 8/26/2003 21:44'!\\\\nundoGrabCommand\\\\n\\\\t\\\\\\\"Return an undo command for grabbing the receiver\\\\\\\"\\\\n\\\\n\\\\t| cmd |\\\\n\\\\towner ifNil:\\\\n\\\\t\\\\t[^ nil]. \\\\\\\"no owner - no undo\\\\\\\"\\\\n\\\\t^ (cmd _ Command new)\\\\n\\\\t\\\\tcmdWording: 'move ' translated, self nameForUndoWording;\\\\n\\\\t\\\\tundoTarget: self\\\\n\\\\t\\\\tselector: #undoMove:redo:owner:bounds:predecessor:\\\\n\\\\t\\\\targuments: {cmd. false. owner. self bounds. (owner morphPreceding: self)};\\\\n\\\\t\\\\tyourself! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'bf 1/5/2000 19:11'!\\\\nvanishAfterSlidingTo: aPosition event: evt\\\\n\\\\n\\\\t| aForm aWorld startPoint endPoint |\\\\n\\\\taForm _ self imageForm offset: 0@0.\\\\n\\\\taWorld _ self world.\\\\n\\\\tstartPoint _ evt hand fullBounds origin.\\\\n\\\\tself delete.\\\\n\\\\taWorld displayWorld.\\\\n\\\\tendPoint _ aPosition.\\\\n\\\\taForm slideFrom: startPoint  to: endPoint nSteps: 12 delay: 15.\\\\n\\\\tPreferences soundsEnabled ifTrue: [TrashCanMorph playDeleteSound].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'ar 10/11/2000 18:24'!\\\\nwantsDroppedMorph: aMorph event: evt\\\\n\\\\t\\\\\\\"Return true if the receiver wishes to accept the given morph, which is being dropped by a hand in response to the given event. Note that for a successful drop operation both parties need to agree. The symmetric check is done automatically via aMorph wantsToBeDroppedInto: self.\\\\\\\"\\\\n\\\\n\\\\t^self dropEnabled! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'ar 9/18/2000 18:34'!\\\\nwantsToBeDroppedInto: aMorph\\\\n\\\\t\\\\\\\"Return true if it's okay to drop the receiver into aMorph. This check is symmetric to #wantsDroppedMorph:event: to give both parties a chance of figuring out whether they like each other.\\\\\\\"\\\\n\\\\t^true! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'ar 2/10/1999 05:44'!\\\\nwantsToBeOpenedInWorld\\\\n\\\\t\\\\\\\"Return true if the receiver wants to be put into the World directly,\\\\n\\\\trather than allowing the user to place it (e.g., prevent attaching me\\\\n\\\\tto the hand after choosing 'new morph' in the world menu)\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'sw 8/15/2000 16:58'!\\\\nwillingToBeDiscarded\\\\n\\\\t^ true! !\\\\n\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'tk 9/6/2000 12:42'!\\\\nclick\\\\n\\\\t\\\\\\\"Pretend the user clicked on me.\\\\\\\"\\\\n\\\\n\\\\t(self handlesMouseDown: nil) ifTrue: [\\\\n\\\\t\\\\tself mouseDown: nil.\\\\n\\\\t\\\\tself mouseUp: nil].! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'LC 5/18/2000 09:54'!\\\\nclick: evt\\\\n\\\\t\\\\\\\"Handle a single-click event. This message is only sent to clients that request it by sending #waitForClicksOrDrag:event: to the initiating hand in their mouseDown: method. This default implementation does nothing.\\\\n\\\\tLC 2/14/2000 08:32 - added: EventHandler notification\\\\\\\"\\\\n\\\\n\\\\tself eventHandler ifNotNil:\\\\n\\\\t\\\\t[self eventHandler click: evt fromMorph: self].! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'sw 3/8/1999 00:17'!\\\\ncursorPoint\\\\n\\\\t^ self currentHand lastEvent cursorPoint! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'jcg 10/2/2001 09:26'!\\\\ndoubleClickTimeout: evt\\\\n\\\\t\\\\\\\"Handle a double-click timeout event. This message is only sent to clients that request it by sending #waitForClicksOrDrag:event: to the initiating hand in their mouseDown: method. This default implementation does nothing.\\\\\\\"\\\\n\\\\n\\\\tself eventHandler ifNotNil:\\\\n\\\\t\\\\t[self eventHandler doubleClickTimeout: evt fromMorph: self].! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'LC 5/18/2000 09:54'!\\\\ndoubleClick: evt\\\\n\\\\t\\\\\\\"Handle a double-click event. This message is only sent to clients that request it by sending #waitForClicksOrDrag:event: to the initiating hand in their mouseDown: method. This default implementation does nothing.\\\\n\\\\tLC 2/14/2000 08:32 - added: EventHandler notification\\\\\\\"\\\\n\\\\n\\\\tself eventHandler ifNotNil:\\\\n\\\\t\\\\t[self eventHandler doubleClick: evt fromMorph: self].! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'ar 1/10/2001 21:28'!\\\\ndropFiles: anEvent\\\\n\\\\t\\\\\\\"Handle a number of files dropped from the OS\\\\\\\"\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'RAA 2/12/2001 15:26'!\\\\nfirstClickTimedOut: evt\\\\n\\\\t\\\\\\\"Useful for double-click candidates who want to know whether or not the click is a single or double. In this case, ignore the #click: and wait for either this or #doubleClick:\\\\\\\"\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'nk 3/10/2004 19:48'!\\\\nhandlerForYellowButtonDown: anEvent \\\\n\\\\t\\\\\\\"Return the (prospective) handler for a mouse down event with the yellow button pressed.\\\\n\\\\tThe \\\\thandler is temporarily installed and can be used for morphs further \\\\n\\\\tdown the hierarchy to negotiate whether the inner or the outer \\\\n\\\\tmorph should finally handle the event.\\\\\\\"\\\\n\\\\n\\\\t(self hasYellowButtonMenu or: [ self handlesMouseDown: anEvent ])\\\\n\\\\t\\\\tifFalse: [ ^ nil].\\\\t\\\\\\\"Not interested.\\\\\\\"\\\\n\\\\n\\\\tanEvent handler\\\\n\\\\t\\\\tifNil: [^ self].\\\\t\\\\\\\"Nobody else was interested\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Same priority but I am innermost.\\\\\\\"\\\\n\\\\t^ self mouseDownPriority >= anEvent handler mouseDownPriority\\\\n\\\\t\\\\tifFalse: [nil ]\\\\n\\\\t\\\\tifTrue: [self]! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'ar 10/28/2000 22:18'!\\\\nhandlesKeyboard: evt\\\\n\\\\t\\\\\\\"Return true if the receiver wishes to handle the given keyboard event\\\\\\\"\\\\n\\\\tself eventHandler ifNotNil: [^ self eventHandler handlesKeyboard: evt].\\\\n\\\\t^ false\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'nk 2/14/2004 18:42'!\\\\nhandlesMouseDown: evt\\\\n\\\\t\\\\\\\"Do I want to receive mouseDown events (mouseDown:, mouseMove:, mouseUp:)?\\\\\\\"\\\\n\\\\t\\\\\\\"NOTE: The default response is false, except if you have added sensitivity to mouseDown events using the on:send:to: mechanism.  Subclasses that implement these messages directly should override this one to return true.\\\\\\\" \\\\n\\\\n\\\\tself eventHandler ifNotNil: [^ self eventHandler handlesMouseDown: evt].\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'di 9/14/1998 07:31'!\\\\nhandlesMouseOverDragging: evt\\\\n\\\\t\\\\\\\"Return true if I want to receive mouseEnterDragging: and mouseLeaveDragging: when the hand drags something over me (button up or button down), or when the mouse button is down but there is no mouseDown recipient.  The default response is false, except if you have added sensitivity to mouseEnterLaden: or mouseLeaveLaden:, using the on:send:to: mechanism.\\\\\\\"\\\\n\\\\t\\\\\\\"NOTE:  If the hand state matters in these cases, it may be tested by constructs such as\\\\n\\\\t\\\\tevent anyButtonPressed\\\\n\\\\t\\\\tevent hand hasSubmorphs\\\\\\\"\\\\n\\\\n\\\\tself eventHandler ifNotNil: [^ self eventHandler handlesMouseOverDragging: evt].\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'di 9/14/1998 07:31'!\\\\nhandlesMouseOver: evt\\\\n\\\\t\\\\\\\"Do I want to receive mouseEnter: and mouseLeave: when the button is up and the hand is empty?  The default response is false, except if you have added sensitivity to mouseEnter: or mouseLeave:, using the on:send:to: mechanism.\\\\\\\" \\\\n\\\\n\\\\tself eventHandler ifNotNil: [^ self eventHandler handlesMouseOver: evt].\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'ar 10/22/2000 17:06'!\\\\nhandlesMouseStillDown: evt\\\\n\\\\t\\\\\\\"Return true if the receiver wants to get repeated #mouseStillDown: messages between #mouseDown: and #mouseUp\\\\\\\"\\\\n\\\\tself eventHandler ifNotNil: [^ self eventHandler handlesMouseStillDown: evt].\\\\n\\\\t^ false\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'sw 4/2/98 14:16'!\\\\nhasFocus\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'event handling'!\\\\nkeyboardFocusChange: aBoolean\\\\n\\\\t\\\\\\\"The message is sent to a morph when its keyboard focus change. The given argument indicates that the receiver is gaining keyboard focus (versus losing) the keyboard focus. Morphs that accept keystrokes should change their appearance in some way when they are the current keyboard focus. This default implementation does nothing.\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'ar 9/14/2000 18:23'!\\\\nkeyDown: anEvent\\\\n\\\\t\\\\\\\"Handle a key down event. The default response is to do nothing.\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'tk 8/10/1998 16:05'!\\\\nkeyStroke: anEvent\\\\n\\\\t\\\\\\\"Handle a keystroke event.  The default response is to let my eventHandler, if any, handle it.\\\\\\\"\\\\n\\\\n\\\\tself eventHandler ifNotNil:\\\\n\\\\t\\\\t[self eventHandler keyStroke: anEvent fromMorph: self].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'KTT 6/1/2004 11:41'!\\\\nkeyUp: anEvent\\\\n\\\\t\\\\\\\"Handle a key up event. The default response is to do nothing.\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'dgd 9/19/2004 13:14'!\\\\nmouseDown: evt \\\\n\\\\t\\\\\\\"Handle a mouse down event. The default response is to let my \\\\n\\\\teventHandler, if any, handle it.\\\\\\\"\\\\n\\\\tevt yellowButtonPressed\\\\n\\\\t\\\\tifTrue: [\\\\\\\"First check for option (menu) click\\\\\\\"\\\\n\\\\t\\\\t\\\\t^ self yellowButtonActivity: evt shiftPressed].\\\\n\\\\tself eventHandler\\\\n\\\\t\\\\tifNotNil: [self eventHandler mouseDown: evt fromMorph: self]\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'di 9/14/1998 07:33'!\\\\nmouseEnterDragging: evt\\\\n\\\\t\\\\\\\"Handle a mouseEnterDragging event, meaning the mouse just entered my bounds with a button pressed or laden with submorphs.  The default response is to let my eventHandler, if any, handle it, or else to do nothing.\\\\\\\"\\\\n\\\\n\\\\tself eventHandler ifNotNil:\\\\n\\\\t\\\\t[^ self eventHandler mouseEnterDragging: evt fromMorph: self].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'tk 8/10/1998 16:00'!\\\\nmouseEnter: evt\\\\n\\\\t\\\\\\\"Handle a mouseEnter event, meaning the mouse just entered my bounds with no button pressed. The default response is to let my eventHandler, if any, handle it.\\\\\\\"\\\\n\\\\n\\\\tself eventHandler ifNotNil:\\\\n\\\\t\\\\t[self eventHandler mouseEnter: evt fromMorph: self].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'di 9/14/1998 07:38'!\\\\nmouseLeaveDragging: evt\\\\n\\\\t\\\\\\\"Handle a mouseLeaveLaden event, meaning the mouse just left my bounds with a button pressed or laden with submorphs. The default response is to let my eventHandler, if any, handle it; else to do nothing.\\\\\\\"\\\\n\\\\n\\\\tself eventHandler ifNotNil:\\\\n\\\\t\\\\t[self eventHandler mouseLeaveDragging: evt fromMorph: self]! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'tk 8/10/1998 16:01'!\\\\nmouseLeave: evt\\\\n\\\\t\\\\\\\"Handle a mouseLeave event, meaning the mouse just left my bounds with no button pressed. The default response is to let my eventHandler, if any, handle it.\\\\\\\"\\\\n\\\\n\\\\tself eventHandler ifNotNil:\\\\n\\\\t\\\\t[self eventHandler mouseLeave: evt fromMorph: self].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'ar 10/25/2000 18:04'!\\\\nmouseMove: evt\\\\n\\\\t\\\\\\\"Handle a mouse move event. The default response is to let my eventHandler, if any, handle it.\\\\\\\"\\\\n\\\\tself eventHandler ifNotNil:\\\\n\\\\t\\\\t[self eventHandler mouseMove: evt fromMorph: self].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'ar 10/25/2000 18:02'!\\\\nmouseStillDownThreshold\\\\n\\\\t\\\\\\\"Return the number of milliseconds after which mouseStillDown: should be sent\\\\\\\"\\\\n\\\\t^200! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'ar 10/22/2000 17:08'!\\\\nmouseStillDown: evt\\\\n\\\\t\\\\\\\"Handle a mouse move event. The default response is to let my eventHandler, if any, handle it.\\\\\\\"\\\\n\\\\n\\\\tself eventHandler ifNotNil:\\\\n\\\\t\\\\t[self eventHandler mouseStillDown: evt fromMorph: self].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'tk 8/10/1998 16:05'!\\\\nmouseUp: evt\\\\n\\\\t\\\\\\\"Handle a mouse up event. The default response is to let my eventHandler, if any, handle it.\\\\\\\"\\\\n\\\\n\\\\tself eventHandler ifNotNil:\\\\n\\\\t\\\\t[self eventHandler mouseUp: evt fromMorph: self].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'dgd 8/28/2004 18:20'!\\\\nmoveOrResizeFromKeystroke: anEvent \\\\n\\\\t\\\\\\\"move or resize the receiver based on a keystroke\\\\\\\"\\\\n\\\\t| dir | \\\\n\\\\n\\\\tanEvent keyValue = 28 ifTrue: [dir := -1 @ 0].\\\\n\\\\tanEvent keyValue = 29 ifTrue: [dir := 1 @ 0].\\\\n\\\\tanEvent keyValue = 30 ifTrue: [dir := 0 @ -1].\\\\n\\\\tanEvent keyValue = 31 ifTrue: [dir := 0 @ 1].\\\\n\\\\n\\\\tdir notNil\\\\n\\\\t\\\\tifTrue:[\\\\n\\\\t\\\\t\\\\tanEvent controlKeyPressed ifTrue: [dir := dir * 10].\\\\n\\\\n\\\\t\\\\t\\\\tanEvent shiftPressed\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self extent: self extent + dir]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self position: self position + dir].\\\\n\\\\n\\\\t\\\\t\\\\t\\\\\\\"anEvent wasHandled: true.\\\\\\\"\\\\n\\\\t]\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'tk 8/10/1998 16:01'!\\\\non: eventName send: selector to: recipient\\\\n\\\\tself eventHandler ifNil: [self eventHandler: EventHandler new].\\\\n\\\\tself eventHandler on: eventName send: selector to: recipient! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'ar 3/18/2001 17:21'!\\\\non: eventName send: selector to: recipient withValue: value\\\\n\\\\t\\\\\\\"NOTE: selector must take 3 arguments, of which value will be the *** FIRST ***\\\\\\\"\\\\n\\\\n\\\\tself eventHandler ifNil: [self eventHandler: EventHandler new].\\\\n\\\\tself eventHandler on: eventName send: selector to: recipient withValue: value\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'fbs 1/7/2005 15:43'!\\\\npreferredKeyboardBounds\\\\n\\\\n\\\\t^ self bounds: self bounds in: World.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'fbs 1/7/2005 15:42'!\\\\npreferredKeyboardPosition\\\\n\\\\n\\\\t^ (self bounds: self bounds in: World) topLeft.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'tk 8/10/1998 16:02'!\\\\nremoveLink: actionCode\\\\n\\\\tself eventHandler ifNotNil:\\\\n\\\\t\\\\t[self eventHandler on: actionCode send: nil to: nil]! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'sw 11/16/1998 08:06'!\\\\nrestoreSuspendedEventHandler\\\\n\\\\t| savedHandler |\\\\n\\\\t(savedHandler _ self valueOfProperty: #suspendedEventHandler) ifNotNil:\\\\n\\\\t\\\\t[self eventHandler: savedHandler].\\\\n\\\\tsubmorphs do: [:m | m restoreSuspendedEventHandler]\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'mir 5/23/2000 17:43'!\\\\nstartDrag: evt\\\\n\\\\t\\\\\\\"Handle a double-click event. This message is only sent to clients that request it by sending #waitForClicksOrDrag:event: to the initiating hand in their mouseDown: method. This default implementation does nothing.\\\\\\\"\\\\n\\\\n\\\\tself eventHandler ifNotNil:\\\\n\\\\t\\\\t[self eventHandler startDrag: evt fromMorph: self].! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'sw 11/16/1998 08:07'!\\\\nsuspendEventHandler\\\\n\\\\tself eventHandler ifNotNil:\\\\n\\\\t\\\\t[self setProperty: #suspendedEventHandler toValue: self eventHandler.\\\\n\\\\t\\\\tself eventHandler: nil].\\\\n\\\\tsubmorphs do: [:m | m suspendEventHandler].  \\\\\\\"All those rectangles\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'dgd 8/28/2004 18:42'!\\\\ntabAmongFields\\\\n\\\\t^ Preferences tabAmongFields\\\\n\\\\t\\\\tor: [self hasProperty: #tabAmongFields] ! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'RAA 6/19/2000 07:13'!\\\\ntransformFromOutermostWorld\\\\n\\\\t\\\\\\\"Return a transform to map world coordinates into my local coordinates\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"self isWorldMorph ifTrue: [^ MorphicTransform identity].\\\\\\\"\\\\n\\\\t^ self transformFrom: self outermostWorldMorph! !\\\\n\\\\n!Morph methodsFor: 'event handling'!\\\\ntransformFromWorld\\\\n\\\\t\\\\\\\"Return a transform to map world coordinates into my local coordinates\\\\\\\"\\\\n\\\\n\\\\t^ self transformFrom: nil! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'dgd 2/22/2003 14:36'!\\\\ntransformFrom: uberMorph \\\\n\\\\t\\\\\\\"Return a transform to be used to map coordinates in a morph above me into my childrens coordinates, or vice-versa. This is used to support scrolling, scaling, and/or rotation. This default implementation just returns my owner's transform or the identity transform if my owner is nil. \\\\n\\\\tNote:  This method cannot be used to map into the receiver's coordinate system!!\\\\\\\"\\\\n\\\\n\\\\t(self == uberMorph or: [owner isNil]) ifTrue: [^IdentityTransform new].\\\\n\\\\t^owner transformFrom: uberMorph! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'ar 1/10/2001 21:28'!\\\\nwantsDropFiles: anEvent\\\\n\\\\t\\\\\\\"Return true if the receiver wants files dropped from the OS.\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'di 9/14/2000 11:46'!\\\\nwantsEveryMouseMove\\\\n\\\\t\\\\\\\"Unless overridden, this method allows processing to skip mouse move events\\\\n\\\\twhen processing is lagging.  No 'significant' event (down/up, etc) will be skipped.\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'sw 11/3/97 02:11'!\\\\nwantsKeyboardFocusFor: aSubmorph\\\\n\\\\t\\\\\\\"Answer whether a plain mouse click on aSubmorph, a text-edit-capable thing, should result in a text selection there\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'sw 5/6/1998 12:54'!\\\\nwouldAcceptKeyboardFocus\\\\n\\\\t\\\\\\\"Answer whether a plain mouse click on the receiver should result in a text selection there\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'sw 8/29/2000 14:57'!\\\\nwouldAcceptKeyboardFocusUponTab\\\\n\\\\t\\\\\\\"Answer whether the receiver is in the running as the new keyboard focus if the tab key were hit at a meta level.  This provides the leverage for tabbing among fields of a card, for example.\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'dgd 7/28/2005 13:02'!\\\\nyellowButtonActivity: shiftState \\\\n\\\\t\\\\\\\"Find me or my outermost owner that has items to add to a  \\\\n\\\\tyellow button menu.  \\\\n\\\\tshiftState is true if the shift was pressed.  \\\\n\\\\tOtherwise, build a menu that contains the contributions from  \\\\n\\\\tmyself and my interested submorphs,  \\\\n\\\\tand present it to the user.\\\\\\\"\\\\n\\\\t| menu |\\\\n\\\\tself isWorldMorph\\\\n\\\\t\\\\tifFalse: [| outerOwner | \\\\n\\\\t\\\\t\\\\touterOwner := self outermostOwnerWithYellowButtonMenu.\\\\n\\\\t\\\\t\\\\touterOwner\\\\n\\\\t\\\\t\\\\t\\\\tifNil: [^ self].\\\\n\\\\t\\\\t\\\\touterOwner == self\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [^ outerOwner yellowButtonActivity: shiftState]].\\\\n\\\\tmenu := self buildYellowButtonMenu: ActiveHand.\\\\n\\\\tmenu\\\\n\\\\t\\\\taddTitle: self externalName\\\\n\\\\t\\\\ticon: (self iconOrThumbnailOfSize: (Preferences tinyDisplay ifTrue: [16] ifFalse: [28])).\\\\n\\\\tmenu popUpInWorld: self currentWorld! !\\\\n\\\\n\\\\n!Morph methodsFor: 'events-accessing' stamp: 'rw 4/25/2002 07:18'!\\\\nactionMap\\\\n\\\\t\\\\\\\"Answer an action map\\\\\\\"\\\\n\\\\n\\\\t| actionMap |\\\\n\\\\tactionMap := self valueOfProperty: #actionMap.\\\\n\\\\tactionMap ifNil:\\\\n\\\\t\\\\t[actionMap _ self createActionMap].\\\\n\\\\t^ actionMap! !\\\\n\\\\n!Morph methodsFor: 'events-accessing' stamp: 'rw 4/25/2002 07:17'!\\\\nupdateableActionMap\\\\n\\\\t\\\\\\\"Answer an updateable action map, saving it in my #actionMap property\\\\\\\"\\\\n\\\\t\\\\n\\\\t| actionMap |\\\\n\\\\tactionMap := self valueOfProperty: #actionMap.\\\\n\\\\tactionMap ifNil:\\\\n\\\\t\\\\t[actionMap _ self createActionMap.\\\\n\\\\t\\\\tself setProperty: #actionMap toValue: actionMap].\\\\n\\\\t^ actionMap! !\\\\n\\\\n\\\\n!Morph methodsFor: 'events-alarms' stamp: 'ar 9/11/2000 16:35'!\\\\naddAlarm: aSelector after: delayTime\\\\n\\\\t\\\\\\\"Add an alarm (that is an action to be executed once) with the given set of parameters\\\\\\\"\\\\n\\\\t^self addAlarm: aSelector withArguments: #() after: delayTime! !\\\\n\\\\n!Morph methodsFor: 'events-alarms' stamp: 'ar 9/11/2000 16:35'!\\\\naddAlarm: aSelector at: scheduledTime\\\\n\\\\t\\\\\\\"Add an alarm (that is an action to be executed once) with the given set of parameters\\\\\\\"\\\\n\\\\t^self addAlarm: aSelector withArguments: #() at: scheduledTime! !\\\\n\\\\n!Morph methodsFor: 'events-alarms' stamp: 'ar 9/11/2000 16:35'!\\\\naddAlarm: aSelector withArguments: args after: delayTime\\\\n\\\\t\\\\\\\"Add an alarm (that is an action to be executed once) with the given set of parameters\\\\\\\"\\\\n\\\\t^self addAlarm: aSelector withArguments: args at: Time millisecondClockValue + delayTime! !\\\\n\\\\n!Morph methodsFor: 'events-alarms' stamp: 'ar 9/14/2000 12:15'!\\\\naddAlarm: aSelector withArguments: args at: scheduledTime\\\\n\\\\t\\\\\\\"Add an alarm (that is an action to be executed once) with the given set of parameters\\\\\\\"\\\\n\\\\t| scheduler |\\\\n\\\\tscheduler _ self alarmScheduler.\\\\n\\\\tscheduler ifNotNil:[scheduler addAlarm: aSelector withArguments: args for: self at: scheduledTime].! !\\\\n\\\\n!Morph methodsFor: 'events-alarms' stamp: 'ar 9/11/2000 16:35'!\\\\naddAlarm: aSelector with: arg1 after: delayTime\\\\n\\\\t\\\\\\\"Add an alarm (that is an action to be executed once) with the given set of parameters\\\\\\\"\\\\n\\\\t^self addAlarm: aSelector withArguments: (Array with: arg1) after: delayTime! !\\\\n\\\\n!Morph methodsFor: 'events-alarms' stamp: 'ar 9/11/2000 16:35'!\\\\naddAlarm: aSelector with: arg1 at: scheduledTime\\\\n\\\\t\\\\\\\"Add an alarm (that is an action to be executed once) with the given set of parameters\\\\\\\"\\\\n\\\\t^self addAlarm: aSelector withArguments: (Array with: arg1) at: scheduledTime! !\\\\n\\\\n!Morph methodsFor: 'events-alarms' stamp: 'ar 9/11/2000 16:35'!\\\\naddAlarm: aSelector with: arg1 with: arg2 after: delayTime\\\\n\\\\t\\\\\\\"Add an alarm (that is an action to be executed once) with the given set of parameters\\\\\\\"\\\\n\\\\t^self addAlarm: aSelector withArguments: (Array with: arg1 with: arg2) after: delayTime! !\\\\n\\\\n!Morph methodsFor: 'events-alarms' stamp: 'ar 9/11/2000 16:35'!\\\\naddAlarm: aSelector with: arg1 with: arg2 at: scheduledTime\\\\n\\\\t\\\\\\\"Add an alarm (that is an action to be executed once) with the given set of parameters\\\\\\\"\\\\n\\\\t^self addAlarm: aSelector withArguments: (Array with: arg1 with: arg2) at: scheduledTime! !\\\\n\\\\n!Morph methodsFor: 'events-alarms' stamp: 'ar 9/11/2000 16:34'!\\\\nalarmScheduler\\\\n\\\\t\\\\\\\"Return the scheduler being responsible for triggering alarms\\\\\\\"\\\\n\\\\t^self world! !\\\\n\\\\n!Morph methodsFor: 'events-alarms' stamp: 'ar 9/14/2000 12:14'!\\\\nremoveAlarm: aSelector\\\\n\\\\t\\\\\\\"Remove the given alarm\\\\\\\"\\\\n\\\\t| scheduler |\\\\n\\\\tscheduler _ self alarmScheduler.\\\\n\\\\tscheduler ifNotNil:[scheduler removeAlarm: aSelector for: self].! !\\\\n\\\\n!Morph methodsFor: 'events-alarms' stamp: 'ar 9/14/2000 12:15'!\\\\nremoveAlarm: aSelector at: scheduledTime\\\\n\\\\t\\\\\\\"Remove the given alarm\\\\\\\"\\\\n\\\\t| scheduler |\\\\n\\\\tscheduler _ self alarmScheduler.\\\\n\\\\tscheduler ifNotNil:[scheduler removeAlarm: aSelector at: scheduledTime for: self].! !\\\\n\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 9/13/2000 17:58'!\\\\ncontainsPoint: aPoint event: anEvent\\\\n\\\\t\\\\\\\"Return true if aPoint is considered to be inside the receiver for the given event.\\\\n\\\\tThe default implementation treats locked children as integral part of their owners.\\\\\\\"\\\\n\\\\t(self fullBounds containsPoint: aPoint) ifFalse:[^false].\\\\n\\\\t(self containsPoint: aPoint) ifTrue:[^true].\\\\n\\\\tself submorphsDo:[:m|\\\\n\\\\t\\\\t(m isLocked and:[m fullContainsPoint: \\\\n\\\\t\\\\t\\\\t((m transformedFrom: self) globalPointToLocal: aPoint)]) ifTrue:[^true]].\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 9/13/2000 14:51'!\\\\ndefaultEventDispatcher\\\\n\\\\t\\\\\\\"Return the default event dispatcher to use with events that are directly sent to the receiver\\\\\\\"\\\\n\\\\t^MorphicEventDispatcher new! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 1/10/2001 21:35'!\\\\nhandleDropFiles: anEvent\\\\n\\\\t\\\\\\\"Handle a drop from the OS.\\\\\\\"\\\\n\\\\tanEvent wasHandled ifTrue:[^self]. \\\\\\\"not interested\\\\\\\"\\\\n\\\\t(self wantsDropFiles: anEvent) ifFalse:[^self].\\\\n\\\\tanEvent wasHandled: true.\\\\n\\\\tself dropFiles: anEvent.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'di 12/12/2000 14:39'!\\\\nhandleDropMorph: anEvent\\\\n\\\\t\\\\\\\"Handle a dropping morph.\\\\\\\"\\\\n\\\\t| aMorph localPt |\\\\n\\\\taMorph _ anEvent contents.\\\\n\\\\t\\\\\\\"Do a symmetric check if both morphs like each other\\\\\\\"\\\\n\\\\t((self wantsDroppedMorph: aMorph event: anEvent)\\\\t\\\\\\\"I want her\\\\\\\"\\\\n\\\\t\\\\tand: [aMorph wantsToBeDroppedInto: self])\\\\t\\\\t\\\\\\\"she wants me\\\\\\\"\\\\n\\\\t\\\\tifFalse: [aMorph removeProperty: #undoGrabCommand.\\\\n\\\\t\\\\t\\\\t\\\\t^ self].\\\\n\\\\tanEvent wasHandled: true.\\\\n\\\\t\\\\\\\"Transform the morph into the receiver's coordinate frame. This is currently incomplete since it only takes the offset into account where it really should take the entire transform.\\\\\\\"\\\\n\\\\tlocalPt _ (self transformedFrom: anEvent hand world) \\\\\\\"full transform down\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tglobalPointToLocal: aMorph referencePosition.\\\\n\\\\taMorph referencePosition: localPt.\\\\n\\\\tself acceptDroppingMorph: aMorph event: anEvent.\\\\n\\\\taMorph justDroppedInto: self event: anEvent.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 9/15/2000 21:13'!\\\\nhandleEvent: anEvent\\\\n\\\\t\\\\\\\"Handle the given event\\\\\\\"\\\\n\\\\t^anEvent sentTo: self.! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 10/4/2000 18:48'!\\\\nhandleFocusEvent: anEvent\\\\n\\\\t\\\\\\\"Handle the given event. This message is sent if the receiver currently has the focus and is therefore receiving events directly from some hand.\\\\\\\"\\\\n\\\\t^self handleEvent: anEvent! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 9/15/2000 23:01'!\\\\nhandleKeyDown: anEvent\\\\n\\\\t\\\\\\\"System level event handling.\\\\\\\"\\\\n\\\\tanEvent wasHandled ifTrue:[^self].\\\\n\\\\t(self handlesKeyboard: anEvent) ifFalse:[^self].\\\\n\\\\tanEvent wasHandled: true.\\\\n\\\\t^self keyDown: anEvent! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 9/15/2000 23:01'!\\\\nhandleKeyUp: anEvent\\\\n\\\\t\\\\\\\"System level event handling.\\\\\\\"\\\\n\\\\tanEvent wasHandled ifTrue:[^self].\\\\n\\\\t(self handlesKeyboard: anEvent) ifFalse:[^self].\\\\n\\\\tanEvent wasHandled: true.\\\\n\\\\t^self keyUp: anEvent! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'md 8/2/2006 18:57'!\\\\nhandleKeystroke: anEvent \\\\n\\\\t\\\\\\\"System level event handling.\\\\\\\"\\\\n\\\\t\\\\n\\\\tanEvent wasHandled\\\\n\\\\t\\\\tifTrue: [^ self].\\\\n\\\\t(self handlesKeyboard: anEvent)\\\\n\\\\t\\\\tifFalse: [^ self].\\\\n\\\\tanEvent wasHandled: true.\\\\n\\\\t^ self keyStroke: anEvent! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 9/16/2000 14:22'!\\\\nhandleListenEvent: anEvent\\\\n\\\\t\\\\\\\"Handle the given event. This message is sent if the receiver is a registered listener for the given event.\\\\\\\"\\\\n\\\\t^anEvent sentTo: self.! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'dgd 9/10/2004 13:36'!\\\\nhandleMouseDown: anEvent\\\\n\\\\t\\\\\\\"System level event handling.\\\\\\\"\\\\n\\\\tanEvent wasHandled ifTrue:[^self]. \\\\\\\"not interested\\\\\\\"\\\\n\\\\tanEvent hand removePendingBalloonFor: self.\\\\n\\\\tanEvent hand removePendingHaloFor: self.\\\\n\\\\tanEvent wasHandled: true.\\\\n\\\\n\\\\t(anEvent controlKeyPressed\\\\n\\\\t\\\\t\\\\tand: [Preferences cmdGesturesEnabled])\\\\n\\\\t\\\\tifTrue: [^ self invokeMetaMenu: anEvent].\\\\n\\\\n\\\\t\\\\\\\"Make me modal during mouse transitions\\\\\\\"\\\\n\\\\tanEvent hand newMouseFocus: self event: anEvent.\\\\n\\\\tanEvent blueButtonChanged ifTrue:[^self blueButtonDown: anEvent].\\\\n\\\\t\\\\n\\\\t\\\\\\\"this mouse down could be the start of a gesture, or the end of a gesture focus\\\\\\\"\\\\n\\\\t(self isGestureStart: anEvent)\\\\n\\\\t\\\\tifTrue: [^ self gestureStart: anEvent].\\\\n\\\\n\\\\tself mouseDown: anEvent.\\\\n\\\\n\\\\tPreferences maintainHalos\\\\n\\\\t\\\\tifFalse:[ anEvent hand removeHaloFromClick: anEvent on: self ].\\\\n\\\\n\\\\t(self handlesMouseStillDown: anEvent) ifTrue:[\\\\n\\\\t\\\\tself startStepping: #handleMouseStillDown: \\\\n\\\\t\\\\t\\\\tat: Time millisecondClockValue + self mouseStillDownThreshold\\\\n\\\\t\\\\t\\\\targuments: {anEvent copy resetHandlerFields}\\\\n\\\\t\\\\t\\\\tstepTime: self mouseStillDownStepRate ].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 8/8/2001 15:29'!\\\\nhandleMouseEnter: anEvent\\\\n\\\\t\\\\\\\"System level event handling.\\\\\\\"\\\\n\\\\t(anEvent isDraggingEvent) ifTrue:[\\\\n\\\\t\\\\t(self handlesMouseOverDragging: anEvent) ifTrue:[\\\\n\\\\t\\\\t\\\\tanEvent wasHandled: true.\\\\n\\\\t\\\\t\\\\tself mouseEnterDragging: anEvent].\\\\n\\\\t\\\\t^self].\\\\n\\\\tself wantsHalo \\\\\\\"If receiver wants halo and balloon, trigger balloon after halo\\\\\\\"\\\\n\\\\t\\\\tifTrue:[anEvent hand triggerHaloFor: self after: self haloDelayTime]\\\\n\\\\t\\\\tifFalse:[self wantsBalloon\\\\n\\\\t\\\\t\\\\tifTrue:[anEvent hand triggerBalloonFor: self after: self balloonHelpDelayTime]].\\\\n\\\\t(self handlesMouseOver: anEvent) ifTrue:[\\\\n\\\\t\\\\tanEvent wasHandled: true.\\\\n\\\\t\\\\tself mouseEnter: anEvent.\\\\n\\\\t].! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 10/6/2000 00:15'!\\\\nhandleMouseLeave: anEvent\\\\n\\\\t\\\\\\\"System level event handling.\\\\\\\"\\\\n\\\\tanEvent hand removePendingBalloonFor: self.\\\\n\\\\tanEvent hand removePendingHaloFor: self.\\\\n\\\\tanEvent isDraggingEvent ifTrue:[\\\\n\\\\t\\\\t(self handlesMouseOverDragging: anEvent) ifTrue:[\\\\n\\\\t\\\\t\\\\tanEvent wasHandled: true.\\\\n\\\\t\\\\t\\\\tself mouseLeaveDragging: anEvent].\\\\n\\\\t\\\\t^self].\\\\n\\\\t(self handlesMouseOver: anEvent) ifTrue:[\\\\n\\\\t\\\\tanEvent wasHandled: true.\\\\n\\\\t\\\\tself mouseLeave: anEvent.\\\\n\\\\t].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'nk 6/13/2004 09:16'!\\\\nhandleMouseMove: anEvent\\\\n\\\\t\\\\\\\"System level event handling.\\\\\\\"\\\\n\\\\tanEvent wasHandled ifTrue:[^self]. \\\\\\\"not interested\\\\\\\"\\\\n\\\\t\\\\\\\"Rules say that by default a morph gets #mouseMove iff\\\\n\\\\t\\\\t* the hand is not dragging anything,\\\\n\\\\t\\\\t\\\\t+ and some button is down,\\\\n\\\\t\\\\t\\\\t+ and the receiver is the current mouse focus.\\\\\\\"\\\\n\\\\t(anEvent hand hasSubmorphs) ifTrue:[^self].\\\\n\\\\t(anEvent anyButtonPressed and:[anEvent hand mouseFocus == self]) ifFalse:[^self].\\\\n\\\\tanEvent wasHandled: true.\\\\n\\\\tself mouseMove: anEvent.\\\\n\\\\t(self handlesMouseStillDown: anEvent) ifTrue:[\\\\n\\\\t\\\\t\\\\\\\"Step at the new location\\\\\\\"\\\\n\\\\t\\\\tself startStepping: #handleMouseStillDown: \\\\n\\\\t\\\\t\\\\tat: Time millisecondClockValue\\\\n\\\\t\\\\t\\\\targuments: {anEvent copy resetHandlerFields}\\\\n\\\\t\\\\t\\\\tstepTime: self mouseStillDownStepRate ].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 4/23/2001 17:24'!\\\\nhandleMouseOver: anEvent\\\\n\\\\t\\\\\\\"System level event handling.\\\\\\\"\\\\n\\\\tanEvent hand mouseFocus == self ifTrue:[\\\\n\\\\t\\\\t\\\\\\\"Got this directly through #handleFocusEvent: so check explicitly\\\\\\\"\\\\n\\\\t\\\\t(self containsPoint: anEvent position event: anEvent) ifFalse:[^self]].\\\\n\\\\tanEvent hand noticeMouseOver: self event: anEvent! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 10/22/2000 17:11'!\\\\nhandleMouseStillDown: anEvent\\\\n\\\\t\\\\\\\"Called from the stepping mechanism for morphs wanting continuously repeated 'yes the mouse is still down, yes it is still down, yes it has not changed yet, no the mouse is still not up, yes the button is down' etc messages\\\\\\\"\\\\n\\\\t(anEvent hand mouseFocus == self) \\\\n\\\\t\\\\tifFalse:[^self stopSteppingSelector: #handleMouseStillDown:].\\\\n\\\\tself mouseStillDown: anEvent.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 10/22/2000 17:09'!\\\\nhandleMouseUp: anEvent\\\\n\\\\t\\\\\\\"System level event handling.\\\\\\\"\\\\n\\\\tanEvent wasHandled ifTrue:[^self]. \\\\\\\"not interested\\\\\\\"\\\\n\\\\tanEvent hand mouseFocus == self ifFalse:[^self]. \\\\\\\"Not interested in other parties\\\\\\\"\\\\n\\\\tanEvent hand releaseMouseFocus: self.\\\\n\\\\tanEvent wasHandled: true.\\\\n\\\\tanEvent blueButtonChanged\\\\n\\\\t\\\\tifTrue:[self blueButtonUp: anEvent]\\\\n\\\\t\\\\tifFalse:[self mouseUp: anEvent.\\\\n\\\\t\\\\t\\\\t\\\\tself stopSteppingSelector: #handleMouseStillDown:].! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'md 10/22/2003 15:55'!\\\\nhandleUnknownEvent: anEvent\\\\n\\\\t\\\\\\\"An event of an unknown type was sent to the receiver. What shall we do?!!\\\\\\\"\\\\n\\\\tBeeper beep. \\\\n\\\\tanEvent printString displayAt: 0@0.\\\\n\\\\tanEvent wasHandled: true.! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'sw 10/5/2002 01:47'!\\\\nmouseDownPriority\\\\n\\\\t\\\\\\\"Return the default mouse down priority for the receiver\\\\\\\"\\\\n\\\\n\\\\t^ (self isPartsDonor or: [self isPartsBin])\\\\n\\\\t\\\\tifTrue:\\\\t[50]\\\\n\\\\t\\\\tifFalse:\\\\t[0]\\\\n\\\\n\\\\t\\\\\\\"The above is a workaround for the complete confusion between parts donors and parts bins. Morphs residing in a parts bin may or may not have the parts donor property set; if they have they may or may not actually handle events. To work around this, parts bins get an equal priority to parts donors so that when a morph in the parts bin does have the property set but does not handle the event we still get a copy from picking it up through the parts bin. Argh. This just *cries* for a cleanup.\\\\\\\"\\\\n\\\\t\\\\\\\"And the above comment is Andreas's from 10/2000, which was formerly retrievable by a #flag: call which however caused a problem when trying to recompile the method from decompiled source.\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 9/13/2000 17:14'!\\\\nprocessEvent: anEvent\\\\n\\\\t\\\\\\\"Process the given event using the default event dispatcher.\\\\\\\"\\\\n\\\\t^self processEvent: anEvent using: self defaultEventDispatcher! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 9/18/2000 19:14'!\\\\nprocessEvent: anEvent using: defaultDispatcher\\\\n\\\\t\\\\\\\"This is the central entry for dispatching events in morphic. Given some event and a default dispatch strategy, find the right receiver and let him handle it.\\\\n\\\\tWARNING: This is a powerful hook. If you want to use a different event dispatcher from the default, here is the place to hook it in. Depending on how the dispatcher is written (e.g., whether it calls simply #processEvent: or #processEvent:using:) you can change the dispatch strategy for entire trees of morphs. Similarly, you can disable entire trees of morphs from receiving any events whatsoever. Read the documentation in class MorphicEventDispatcher before playing with it. \\\\\\\"\\\\n\\\\t(self rejectsEvent: anEvent) ifTrue:[^#rejected].\\\\n\\\\t^defaultDispatcher dispatchEvent: anEvent with: self! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 10/5/2000 19:25'!\\\\nrejectDropEvent: anEvent\\\\n\\\\t\\\\\\\"This hook allows the receiver to repel a drop operation currently executed. The method is called prior to checking children so the receiver must validate that the event was really designated for it.\\\\n\\\\tNote that the ordering of the tests below is designed to avoid a (possibly expensive) #fullContainsPoint: test. If the receiver doesn't want to repel the morph anyways we don't need to check after all.\\\\\\\"\\\\n\\\\t(self repelsMorph: anEvent contents event: anEvent) ifFalse:[^self]. \\\\\\\"not repelled\\\\\\\"\\\\n\\\\t(self fullContainsPoint: anEvent position) ifFalse:[^self]. \\\\\\\"not for me\\\\\\\"\\\\n\\\\t\\\\\\\"Throw it away\\\\\\\"\\\\n\\\\tanEvent wasHandled: true.\\\\n\\\\tanEvent contents rejectDropMorphEvent: anEvent.! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 9/12/2000 23:40'!\\\\nrejectsEvent: anEvent\\\\n\\\\t\\\\\\\"Return true to reject the given event. Rejecting an event means neither the receiver nor any of it's submorphs will be given any chance to handle it.\\\\\\\"\\\\n\\\\t^self isLocked or:[self visible not]! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 9/15/2000 21:09'!\\\\ntransformedFrom: uberMorph\\\\n\\\\t\\\\\\\"Return a transform to map coordinates of uberMorph, a morph above me in my owner chain, into the coordinates of MYSELF not any of my children.\\\\\\\"\\\\n\\\\tself flag: #arNote. \\\\\\\"rename this method\\\\\\\"\\\\n\\\\towner ifNil:[^IdentityTransform new].\\\\n\\\\t^ (owner transformFrom: uberMorph)! !\\\\n\\\\n\\\\n!Morph methodsFor: 'events-removing' stamp: 'rw 4/25/2002 07:18'!\\\\nreleaseActionMap\\\\n\\\\t\\\\\\\"Release the action map\\\\\\\"\\\\n\\\\t\\\\n \\\\tself removeProperty: #actionMap! !\\\\n\\\\n\\\\n!Morph methodsFor: 'fileIn/out' stamp: 'di 11/18/1999 08:35'!\\\\nattachToResource\\\\n\\\\t\\\\\\\"Produce a morph from a file -- either a saved .morph file or a graphics file\\\\\\\"\\\\n\\\\n\\\\t| pathName |\\\\n\\\\tpathName _ Utilities chooseFileWithSuffixFromList: (#('.morph'), Utilities graphicsFileSuffixes)\\\\n\\\\t\\\\t\\\\twithCaption: 'Choose a file\\\\nto load'.\\\\n\\\\tpathName ifNil: [^ self].  \\\\\\\"User made no choice\\\\\\\"\\\\n\\\\tpathName == #none ifTrue: [^ self inform: \\\\n'Sorry, no suitable files found\\\\n(names should end with .morph, .gif,\\\\n.bmp, .jpeg, .jpe, .jp, or .form)'].\\\\n\\\\n\\\\tself setProperty: #resourceFilePath toValue: pathName! !\\\\n\\\\n!Morph methodsFor: 'fileIn/out' stamp: 'tak 2/10/2006 02:24'!\\\\nprepareToBeSaved\\\\n\\\\t\\\\\\\"Prepare this morph to be saved to disk. Subclasses should nil out any instance variables that holds state that should not be saved, such as cached Forms. Note that this operation may take more drastic measures than releaseCachedState; for example, it might discard the transcript of an interactive chat session.\\\\\\\"\\\\n\\\\n\\\\tself releaseCachedState.\\\\n\\\\tself formerOwner: nil.\\\\n\\\\tself formerPosition: nil.\\\\n\\\\tself removeProperty: #undoGrabCommand.\\\\n\\\\tfullBounds _ nil! !\\\\n\\\\n!Morph methodsFor: 'fileIn/out' stamp: 'tk 2/17/1999 17:50'!\\\\nreserveUrl: urlString\\\\n\\\\t\\\\\\\"Write a dummy object to the server to hold a name and place for this object.\\\\\\\"\\\\n\\\\n\\\\t| dummy ext str |\\\\n\\\\tdummy _ PasteUpMorph new.\\\\n\\\\tdummy borderWidth: 2.\\\\n\\\\tdummy setProperty: #initialExtent toValue: (ext _ 300@100).\\\\n\\\\tdummy topLeft: 50@50; extent: ext.\\\\t\\\\\\\"reset when comes in\\\\\\\"\\\\n\\\\tstr _ (TextMorph new) topLeft: dummy topLeft + (10@10); \\\\n\\\\t\\\\textent: dummy width - 15 @ 30.\\\\n\\\\tdummy addMorph: str.\\\\n\\\\tstr contents: 'This is a place holder only.  Please \\\\\\\\find the original page and choose \\\\\\\\\\\\\\\"send this page to server\\\\\\\"' withCRs.\\\\n\\\\tstr extent: dummy width - 15 @ 30.\\\\n\\\\tdummy saveOnURL: urlString.\\\\n\\\\n\\\\t\\\\\\\"Claim that url myself\\\\\\\"\\\\n\\\\tself setProperty: #SqueakPage toValue: dummy sqkPage.\\\\n\\\\t(dummy sqkPage) contentsMorph: self; dirty: true.\\\\n\\\\t^ self url! !\\\\n\\\\n!Morph methodsFor: 'fileIn/out' stamp: 'di 11/18/1999 08:52'!\\\\nsaveAsResource\\\\n\\\\n\\\\t| pathName |\\\\n\\\\t(self hasProperty: #resourceFilePath) ifFalse: [^ self].\\\\n\\\\tpathName _ self valueOfProperty: #resourceFilePath.\\\\n\\\\t(pathName asLowercase endsWith: '.morph') ifFalse:\\\\n\\\\t\\\\t[^ self error: 'Can only update morphic resources'].\\\\n\\\\t(FileStream newFileNamed: pathName) fileOutClass: nil andObject: self.! !\\\\n\\\\n!Morph methodsFor: 'fileIn/out' stamp: 'ar 9/27/2005 21:02'!\\\\nsaveDocPane\\\\n\\\\n\\\\tSmalltalk at: #DocLibrary ifPresent:[:dl| dl external saveDocCheck: self]! !\\\\n\\\\n!Morph methodsFor: 'fileIn/out' stamp: 'yo 7/2/2004 13:14'!\\\\nsaveOnFile\\\\n\\\\t\\\\\\\"Ask the user for a filename and save myself on a SmartReferenceStream file.  Writes out the version and class structure.  The file is fileIn-able.  UniClasses will be filed out.\\\\\\\"\\\\n\\\\n\\\\t| aFileName fileStream ok |\\\\n\\\\taFileName _ ('my {1}' translated format: {self class name}) asFileName.\\\\t\\\\\\\"do better?\\\\\\\"\\\\n\\\\taFileName _ FillInTheBlank request: 'File name? (\\\\\\\".morph\\\\\\\" will be added to end)' translated \\\\n\\\\t\\\\t\\\\tinitialAnswer: aFileName.\\\\n\\\\taFileName isEmpty ifTrue: [^ Beeper beep].\\\\n\\\\tself allMorphsDo: [:m | m prepareToBeSaved].\\\\n\\\\n\\\\tok _ aFileName endsWith: '.morph'.\\\\t\\\\\\\"don't double them\\\\\\\"\\\\n\\\\tok _ ok | (aFileName endsWith: '.sp').\\\\n\\\\tok ifFalse: [aFileName _ aFileName,'.morph'].\\\\n\\\\tfileStream _ FileStream newFileNamed: aFileName asFileName.\\\\n\\\\tfileStream fileOutClass: nil andObject: self.\\\\t\\\\\\\"Puts UniClass definitions out anyway\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'fileIn/out' stamp: 'tk 7/16/1999 13:03'!\\\\nsaveOnURL\\\\n\\\\t\\\\\\\"Ask the user for a url and save myself on a SmartReferenceStream file.  Writes out the version and class structure.  The file is fileIn-able.  UniClasses will be filed out.\\\\\\\"\\\\n\\\\n\\\\t| um pg |\\\\n\\\\t(pg _ self saveOnURLbasic) == #cancel ifTrue: [^ self].\\\\n\\\\tum _ URLMorph newForURL: pg url.\\\\n\\\\tum setURL: pg url page: pg.\\\\n\\\\tpg isContentsInMemory ifTrue: [pg computeThumbnail].\\\\n\\\\tum isBookmark: true.\\\\n\\\\tum removeAllMorphs.\\\\n\\\\tum color: Color transparent.\\\\n\\\\tself primaryHand attachMorph: um.! !\\\\n\\\\n!Morph methodsFor: 'fileIn/out' stamp: 'dgd 2/22/2003 14:35'!\\\\nsaveOnURLbasic\\\\n\\\\t\\\\\\\"Ask the user for a url and save myself on a SmartReferenceStream file.  Writes out the version and class structure.  The file is fileIn-able.  UniClasses will be filed out.\\\\\\\"\\\\n\\\\n\\\\t| url pg stamp pol |\\\\n\\\\t(pg := self valueOfProperty: #SqueakPage) ifNil: [pg := SqueakPage new]\\\\n\\\\t\\\\tifNotNil: \\\\n\\\\t\\\\t\\\\t[pg contentsMorph ~~ self \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self inform: 'morph''s SqueakPage property is out of date'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpg := SqueakPage new]].\\\\n\\\\t(url := pg url) ifNil: \\\\n\\\\t\\\\t\\\\t[url := ServerDirectory defaultStemUrl , '1.sp'.\\\\t\\\\\\\"A new legal place\\\\\\\"\\\\n\\\\t\\\\t\\\\turl := FillInTheBlank \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trequest: 'url of a place to store this object.\\\\nMust begin with file:// or ftp://'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinitialAnswer: url.\\\\n\\\\t\\\\t\\\\turl isEmpty ifTrue: [^#cancel]].\\\\n\\\\tstamp := Utilities authorInitialsPerSe ifNil: ['*'].\\\\n\\\\tpg saveMorph: self author: stamp.\\\\n\\\\tSqueakPageCache atURL: url put: pg.\\\\t\\\\\\\"setProperty: #SqueakPage\\\\\\\"\\\\n\\\\t(pol := pg policy) ifNil: [pol := #neverWrite].\\\\n\\\\tpg\\\\n\\\\t\\\\tpolicy: #now;\\\\n\\\\t\\\\tdirty: true.\\\\n\\\\tpg write.\\\\t\\\\\\\"force the write\\\\\\\"\\\\n\\\\tpg policy: pol.\\\\n\\\\t^pg! !\\\\n\\\\n!Morph methodsFor: 'fileIn/out' stamp: 'tk 11/20/1998 11:47'!\\\\nsaveOnURL: suggestedUrlString\\\\n\\\\t\\\\\\\"Save myself on a SmartReferenceStream file.  If I don't already have a url, use the suggested one.  Writes out the version and class structure.  The file is fileIn-able.  UniClasses will be filed out.\\\\\\\"\\\\n\\\\n\\\\t| url pg stamp pol |\\\\n\\\\t(pg _ self valueOfProperty: #SqueakPage) ifNil: [pg _ SqueakPage new]\\\\n\\\\t\\\\tifNotNil: [pg contentsMorph ~~ self ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tself inform: 'morph''s SqueakPage property is out of date'.\\\\n\\\\t\\\\t\\\\t\\\\tpg _ SqueakPage new]].\\\\n\\\\t(url _ pg url) ifNil: [url _ pg urlNoOverwrite: suggestedUrlString].\\\\n\\\\tstamp _ Utilities authorInitialsPerSe ifNil: ['*'].\\\\n\\\\tpg saveMorph: self author: stamp.\\\\n\\\\tSqueakPageCache atURL: url put: pg.\\\\t\\\\\\\"setProperty: #SqueakPage\\\\\\\"\\\\n\\\\t(pol _ pg policy) ifNil: [pol _ #neverWrite].\\\\n\\\\tpg policy: #now; dirty: true.  pg write.\\\\t\\\\\\\"force the write\\\\\\\"\\\\n\\\\tpg policy: pol.\\\\n\\\\t^ pg! !\\\\n\\\\n!Morph methodsFor: 'fileIn/out' stamp: 'di 11/18/1999 09:15'!\\\\nupdateAllFromResources\\\\n\\\\n\\\\tself allMorphsDo: [:m | m updateFromResource]! !\\\\n\\\\n!Morph methodsFor: 'fileIn/out' stamp: 'nk 1/6/2004 12:38'!\\\\nupdateFromResource\\\\n\\\\t| pathName newMorph f |\\\\n\\\\t(pathName := self valueOfProperty: #resourceFilePath) ifNil: [^self].\\\\n\\\\t(pathName asLowercase endsWith: '.morph') \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[newMorph := (FileStream readOnlyFileNamed: pathName) fileInObjectAndCode.\\\\n\\\\t\\\\t\\\\t(newMorph isMorph) \\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [^self error: 'Resource not a single morph']]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[f := Form fromFileNamed: pathName.\\\\n\\\\t\\\\t\\\\tf ifNil: [^self error: 'unrecognized image file format'].\\\\n\\\\t\\\\t\\\\tnewMorph := World drawingClass withForm: f].\\\\n\\\\tnewMorph setProperty: #resourceFilePath toValue: pathName.\\\\n\\\\tself owner replaceSubmorph: self by: newMorph! !\\\\n\\\\n\\\\n!Morph methodsFor: 'filter streaming' stamp: 'ar 10/26/2000 19:55'!\\\\ndrawOnCanvas: aCanvas\\\\n\\\\t^aCanvas fullDraw: self.\\\\n! !\\\\n\\\\n\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'di 7/24/97 11:55'!\\\\nalign: aPoint1 with: aPoint2\\\\n\\\\t\\\\\\\"Translate by aPoint2 - aPoint1.\\\\\\\"\\\\n\\\\n\\\\t^ self position: self position + (aPoint2 - aPoint1)! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'efc 2/13/2003 18:17'!\\\\nbottom\\\\n\\\\t\\\\\\\" Return the y-coordinate of my bottom side \\\\\\\"\\\\n\\\\n\\\\t^ bounds bottom! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'di 3/6/2002 13:06'!\\\\nbottomCenter\\\\n\\\\n\\\\t^ bounds bottomCenter! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'tk 9/8/97 10:44'!\\\\nbottomLeft\\\\n\\\\n\\\\t^ bounds bottomLeft! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'efc 2/13/2003 18:08'!\\\\nbottomLeft: aPoint\\\\n\\\\t\\\\\\\" Move me so that my bottom left corner is at aPoint. My extent (width & height) are unchanged \\\\\\\"\\\\n\\\\n\\\\tself position: ((aPoint x) @ (aPoint y - self height)).\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'di 6/12/97 11:17'!\\\\nbottomRight\\\\n\\\\n\\\\t^ bounds bottomRight! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'efc 2/13/2003 18:09'!\\\\nbottomRight: aPoint\\\\n\\\\t\\\\\\\" Move me so that my bottom right corner is at aPoint. My extent (width & height) are unchanged \\\\\\\"\\\\n\\\\n\\\\tself position: ((aPoint x - bounds width) @ (aPoint y - self height))\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'efc 2/13/2003 18:14'!\\\\nbottom: aNumber\\\\n\\\\t\\\\\\\" Move me so that my bottom is at the y-coordinate aNumber. My extent (width & height) are unchanged \\\\\\\"\\\\n\\\\n\\\\tself position: (bounds left @ (aNumber - self height))! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'jm 8/3/97 15:50'!\\\\nbounds\\\\n\\\\t\\\\\\\"Return the bounds of this morph.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: It is best not to override this method because many methods in Morph and its subclasses use the instance variable directly rather than 'self bounds'. Instead, subclasses should be sure that the bounds instance variable is correct.\\\\\\\"\\\\n\\\\n\\\\t^ bounds\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'ar 10/25/2000 15:05'!\\\\nboundsInWorld\\\\n\\\\t^self bounds: self bounds in: self world! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'ar 10/25/2000 15:04'!\\\\nboundsIn: referenceMorph\\\\n\\\\t\\\\\\\"Return the receiver's bounds as seen by aMorphs coordinate frame\\\\\\\"\\\\n\\\\t^self bounds: self bounds in: referenceMorph! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'ar 12/14/2000 13:48'!\\\\nbounds: newBounds\\\\n\\\\t| oldExtent newExtent |\\\\n\\\\toldExtent _ self extent.\\\\n\\\\tnewExtent _ newBounds extent.\\\\n\\\\t(oldExtent dotProduct: oldExtent) <= (newExtent dotProduct: newExtent) ifTrue:[\\\\n\\\\t\\\\t\\\\\\\"We're growing. First move then resize.\\\\\\\"\\\\n\\\\t\\\\tself position: newBounds topLeft; extent: newExtent.\\\\n\\\\t] ifFalse:[\\\\n\\\\t\\\\t\\\\\\\"We're shrinking. First resize then move.\\\\\\\"\\\\n\\\\t\\\\tself extent: newExtent; position: newBounds topLeft.\\\\n\\\\t].! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'ar 10/25/2000 15:04'!\\\\nbounds: aRectangle from: referenceMorph\\\\n\\\\t\\\\\\\"Return the receiver's bounds as seen by aMorphs coordinate frame\\\\\\\"\\\\n\\\\towner ifNil: [^ aRectangle].\\\\n\\\\t^(owner transformFrom: referenceMorph) globalBoundsToLocal: aRectangle\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'ar 10/25/2000 15:04'!\\\\nbounds: aRectangle in: referenceMorph\\\\n\\\\t\\\\\\\"Return the receiver's bounds as seen by aMorphs coordinate frame\\\\\\\"\\\\n\\\\towner ifNil: [^ aRectangle].\\\\n\\\\t^(owner transformFrom: referenceMorph) localBoundsToGlobal: aRectangle\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry'!\\\\ncenter\\\\n\\\\n\\\\t^ bounds center! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'sw 6/11/1999 18:48'!\\\\ncenter: aPoint\\\\n\\\\tself position: (aPoint - (self extent // 2))! !\\\\n\\\\n!Morph methodsFor: 'geometry'!\\\\nextent\\\\n\\\\n\\\\t^ bounds extent! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'laza 3/25/2004 21:31'!\\\\nextent: aPoint\\\\n\\\\n\\\\tbounds extent = aPoint ifTrue: [^ self].\\\\n\\\\tself changed.\\\\n\\\\tbounds _ (bounds topLeft extent: aPoint) rounded.\\\\n\\\\tself layoutChanged.\\\\n\\\\tself changed.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'ar 10/25/2000 15:06'!\\\\nfullBoundsInWorld\\\\n\\\\t^self bounds: self fullBounds in: self world! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'ar 10/25/2000 15:06'!\\\\nglobalPointToLocal: aPoint\\\\n\\\\t^self point: aPoint from: nil! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'ar 9/15/2000 14:21'!\\\\ngriddedPoint: ungriddedPoint\\\\n\\\\n\\\\t| griddingContext |\\\\n\\\\tself flag: #arNote. \\\\\\\"Used by event handling - should transform to pasteUp for gridding\\\\\\\"\\\\n\\\\t(griddingContext _ self pasteUpMorph) ifNil: [^ ungriddedPoint].\\\\n\\\\t^ griddingContext gridPoint: ungriddedPoint! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'di 8/25/2000 00:35'!\\\\ngridPoint: ungriddedPoint\\\\n\\\\n\\\\t^ ungriddedPoint! !\\\\n\\\\n!Morph methodsFor: 'geometry'!\\\\nheight\\\\n\\\\n\\\\t^ bounds height! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'efc 2/13/2003 18:22'!\\\\nheight: aNumber\\\\n\\\\t\\\\\\\" Set my height; my position (top-left corner) and width will remain the same \\\\\\\"\\\\n\\\\n\\\\tself extent: self width@aNumber asInteger.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'ar 12/22/2001 22:43'!\\\\ninnerBounds\\\\n\\\\t\\\\\\\"Return the inner rectangle enclosed by the bounds of this morph excluding the space taken by its borders. For an unbordered morph, this is just its bounds.\\\\\\\"\\\\n\\\\n\\\\t^ self bounds insetBy: self borderWidth! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'efc 2/13/2003 18:16'!\\\\nleft\\\\n\\\\t\\\\\\\" Return the x-coordinate of my left side \\\\\\\"\\\\n\\\\n\\\\t^ bounds left! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'di 3/6/2002 13:06'!\\\\nleftCenter\\\\n\\\\n\\\\t^ bounds leftCenter! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'efc 2/13/2003 18:15'!\\\\nleft: aNumber\\\\n\\\\t\\\\\\\" Move me so that my left side is at the x-coordinate aNumber. My extent (width & height) are unchanged \\\\\\\"\\\\n\\\\n\\\\tself position: (aNumber @ bounds top)! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'ar 10/25/2000 15:07'!\\\\nlocalPointToGlobal: aPoint\\\\n\\\\t^self point: aPoint in: nil! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'sw 6/4/2000 21:59'!\\\\nminimumExtent\\\\n\\\\t| ext |\\\\n\\\\t\\\\\\\"This returns the minimum extent that the morph may be shrunk to.  Not honored in too many places yet, but respected by the resizeToFit feature, at least.  copied up from SystemWindow 6/00\\\\\\\"\\\\n\\\\t(ext _ self valueOfProperty: #minimumExtent)\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t[^ ext].\\\\n\\\\t^ 100 @ 80! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'sw 6/4/2000 22:00'!\\\\nminimumExtent: aPoint\\\\n\\\\t\\\\\\\"Remember a minimumExtent, for possible future use\\\\\\\"\\\\n\\\\n\\\\tself setProperty: #minimumExtent toValue: aPoint\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'sw 7/10/1999 17:26'!\\\\nnextOwnerPage\\\\n\\\\t\\\\\\\"Tell my container to advance to the next page\\\\\\\"\\\\n\\\\t| targ |\\\\n\\\\ttarg _ self ownerThatIsA: BookMorph.\\\\n\\\\ttarg ifNotNil: [targ nextPage]! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'ar 11/12/2000 22:06'!\\\\nouterBounds\\\\n\\\\t\\\\\\\"Return the 'outer' bounds of the receiver, e.g., the bounds that need to be invalidated when the receiver changes.\\\\\\\"\\\\n\\\\t| box |\\\\n\\\\tbox _ self bounds.\\\\n\\\\tself hasDropShadow ifTrue:[box _ self expandFullBoundsForDropShadow: box].\\\\n\\\\tself hasRolloverBorder ifTrue:[box _ self expandFullBoundsForRolloverBorder: box].\\\\n\\\\t^box! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'nk 5/19/2003 20:39'!\\\\noverlapsShadowForm: itsShadow bounds: itsBounds\\\\n\\\\t\\\\\\\"Answer true if itsShadow and my shadow overlap at all\\\\\\\"\\\\n\\\\t| andForm overlapExtent |\\\\n\\\\toverlapExtent _ (itsBounds intersect: self fullBounds) extent.\\\\n\\\\toverlapExtent > (0 @ 0)\\\\n\\\\t\\\\tifFalse: [^ false].\\\\n\\\\tandForm _ self shadowForm.\\\\n\\\\toverlapExtent ~= self fullBounds extent\\\\n\\\\t\\\\tifTrue: [andForm _ andForm\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcontentsOfArea: (0 @ 0 extent: overlapExtent)].\\\\n\\\\tandForm _ andForm\\\\n\\\\t\\\\t\\\\t\\\\tcopyBits: (self fullBounds translateBy: itsShadow offset negated)\\\\n\\\\t\\\\t\\\\t\\\\tfrom: itsShadow\\\\n\\\\t\\\\t\\\\t\\\\tat: 0 @ 0\\\\n\\\\t\\\\t\\\\t\\\\tclippingBox: (0 @ 0 extent: overlapExtent)\\\\n\\\\t\\\\t\\\\t\\\\trule: Form and\\\\n\\\\t\\\\t\\\\t\\\\tfillColor: nil.\\\\n\\\\t^ andForm bits\\\\n\\\\t\\\\tanySatisfy: [:w | w ~= 0]! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'ar 10/25/2000 15:02'!\\\\npointFromWorld: aPoint\\\\n\\\\t^self point: aPoint from: self world! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'ar 10/25/2000 15:03'!\\\\npointInWorld: aPoint\\\\n\\\\t^self point: aPoint in: self world! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'ar 10/25/2000 15:01'!\\\\npoint: aPoint from: aReferenceMorph\\\\n\\\\n\\\\towner ifNil: [^ aPoint].\\\\n\\\\t^ (owner transformFrom: aReferenceMorph) globalPointToLocal: aPoint.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'ar 10/25/2000 15:01'!\\\\npoint: aPoint in: aReferenceMorph\\\\n\\\\n\\\\towner ifNil: [^ aPoint].\\\\n\\\\t^ (owner transformFrom: aReferenceMorph) localPointToGlobal: aPoint.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry'!\\\\nposition\\\\n\\\\n\\\\t^ bounds topLeft! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'di 9/30/1998 12:11'!\\\\npositionInWorld\\\\n\\\\n\\\\t^ self pointInWorld: self position.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'sw 10/9/1998 08:56'!\\\\npositionSubmorphs\\\\n\\\\tself submorphsDo:\\\\n\\\\t\\\\t[:aMorph | aMorph snapToEdgeIfAppropriate]! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'wiz 11/25/2004 12:54'!\\\\nposition: aPoint \\\\n\\\\t\\\\\\\"Change the position of this morph and and all of its\\\\n\\\\tsubmorphs. \\\\\\\"\\\\n\\\\t| delta box |\\\\n\\\\tdelta := aPoint asNonFractionalPoint - bounds topLeft.\\\\n\\\\t(delta x = 0\\\\n\\\\t\\\\t\\\\tand: [delta y = 0])\\\\n\\\\t\\\\tifTrue: [^ self].\\\\n\\\\t\\\\\\\"Null change\\\\\\\"\\\\n\\\\tbox := self fullBounds.\\\\n\\\\t(delta dotProduct: delta)\\\\n\\\\t\\\\t\\\\t> 100\\\\n\\\\t\\\\tifTrue: [\\\\\\\"e.g., more than 10 pixels moved\\\\\\\"\\\\n\\\\t\\\\t\\\\tself invalidRect: box.\\\\n\\\\t\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\t\\\\tinvalidRect: (box translateBy: delta)]\\\\n\\\\t\\\\tifFalse: [self\\\\n\\\\t\\\\t\\\\t\\\\tinvalidRect: (box\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmerge: (box translateBy: delta))].\\\\n\\\\tself privateFullMoveBy: delta.\\\\n\\\\towner\\\\n\\\\t\\\\tifNotNil: [owner layoutChanged]! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'sw 7/10/1999 17:27'!\\\\npreviousOwnerPage\\\\n\\\\t\\\\\\\"Tell my container to advance to the previous page\\\\\\\"\\\\n\\\\t| targ |\\\\n\\\\ttarg _ self ownerThatIsA: BookMorph.\\\\n\\\\ttarg ifNotNil: [targ previousPage]! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'efc 2/13/2003 18:16'!\\\\nright\\\\n\\\\t\\\\\\\" Return the x-coordinate of my right side \\\\\\\"\\\\n\\\\t^ bounds right! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'di 3/6/2002 13:06'!\\\\nrightCenter\\\\n\\\\n\\\\t^ bounds rightCenter! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'efc 2/13/2003 18:15'!\\\\nright: aNumber\\\\n\\\\t\\\\\\\" Move me so that my right side is at the x-coordinate aNumber. My extent (width & height) are unchanged \\\\\\\"\\\\n\\\\n\\\\tself position: ((aNumber - bounds width) @ bounds top)! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'bf 1/5/2000 19:08'!\\\\nscreenLocation\\\\n\\\\t\\\\\\\"For compatibility only\\\\\\\"\\\\n\\\\n\\\\t^ self fullBounds origin! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'sma 2/5/2000 13:58'!\\\\nscreenRectangle\\\\n\\\\t\\\\\\\"For compatibility only\\\\\\\"\\\\n\\\\n\\\\t^ self fullBounds! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'tk 7/14/2001 11:11'!\\\\nsetConstrainedPosition: aPoint hangOut: partiallyOutside\\\\n\\\\t\\\\\\\"Change the position of this morph and and all of its submorphs to aPoint, but don't let me go outside my owner's bounds.  Let me go within two pixels of completely outside if partiallyOutside is true.\\\\\\\"\\\\n\\\\n\\\\t| trialRect delta boundingMorph bRect |\\\\n\\\\towner ifNil:[^self].\\\\n\\\\ttrialRect _ aPoint extent: self bounds extent.\\\\n\\\\tboundingMorph _ self topRendererOrSelf owner.\\\\n\\\\tdelta _ boundingMorph\\\\n\\\\t\\\\t\\\\tifNil:    [0@0]\\\\n\\\\t\\\\t\\\\tifNotNil: [\\\\n\\\\t\\\\t\\\\t\\\\tbRect _ partiallyOutside \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [boundingMorph bounds insetBy: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself extent negated + boundingMorph borderWidth + (2@2)]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [boundingMorph bounds].\\\\n\\\\t\\\\t\\\\t\\\\ttrialRect amountToTranslateWithin: bRect].\\\\n\\\\tself position: aPoint + delta.\\\\n\\\\tself layoutChanged  \\\\\\\"So that, eg, surrounding text will readjust\\\\\\\"\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'sw 2/16/1999 22:05'!\\\\nshiftSubmorphsOtherThan: listNotToShift by: delta\\\\n\\\\t| rejectList |\\\\n\\\\trejectList _ listNotToShift ifNil: [OrderedCollection new].\\\\n\\\\t(submorphs copyWithoutAll: rejectList) do:\\\\n\\\\t\\\\t[:m | m position: (m position + delta)]! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'efc 2/13/2003 18:17'!\\\\ntop\\\\n\\\\t\\\\\\\" Return the y-coordinate of my top side \\\\\\\"\\\\n\\\\n\\\\t^ bounds top! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'di 3/6/2002 13:06'!\\\\ntopCenter\\\\n\\\\n\\\\t^ bounds topCenter! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'di 6/12/97 11:07'!\\\\ntopLeft\\\\n\\\\n\\\\t^ bounds topLeft! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'efc 2/13/2003 18:10'!\\\\ntopLeft: aPoint\\\\n\\\\t\\\\\\\" Move me so that my top left corner is at aPoint. My extent (width & height) are unchanged \\\\\\\"\\\\n\\\\n\\\\tself position: aPoint\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'sw 8/20/97 23:04'!\\\\ntopRight\\\\n\\\\n\\\\t^ bounds topRight! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'efc 2/13/2003 18:12'!\\\\ntopRight: aPoint\\\\n\\\\t\\\\\\\" Move me so that my top right corner is at aPoint. My extent (width & height) are unchanged \\\\\\\"\\\\n\\\\n\\\\tself position: ((aPoint x - bounds width) @ (aPoint y))\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'efc 2/13/2003 18:14'!\\\\ntop: aNumber\\\\n\\\\t\\\\\\\" Move me so that my top is at the y-coordinate aNumber. My extent (width & height) are unchanged \\\\\\\"\\\\n\\\\n\\\\tself position: (bounds left @ aNumber)! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'ar 10/22/2000 18:03'!\\\\ntransformedBy: aTransform\\\\n\\\\taTransform isIdentity ifTrue:[^self].\\\\n\\\\taTransform isPureTranslation ifTrue:[\\\\n\\\\t\\\\t^self position: (aTransform localPointToGlobal: self position).\\\\n\\\\t].\\\\n\\\\t^self addFlexShell transformedBy: aTransform! !\\\\n\\\\n!Morph methodsFor: 'geometry'!\\\\nwidth\\\\n\\\\n\\\\t^ bounds width! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'efc 2/13/2003 18:22'!\\\\nwidth: aNumber\\\\n\\\\t\\\\\\\" Set my width; my position (top-left corner) and height will remain the same \\\\\\\"\\\\n\\\\n\\\\tself extent: aNumber asInteger@self height.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'di 2/23/98 11:36'!\\\\nworldBounds\\\\n\\\\t^ self world bounds! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'dgd 9/10/2004 12:37'!\\\\nworldBoundsForHalo\\\\n\\\\t\\\\\\\"Answer the rectangle to be used as the inner dimension of my halos.\\\\n\\\\tAllow for showing either bounds or fullBounds, and compensate for the optional bounds rectangle.\\\\\\\"\\\\n\\\\n\\\\t| r |\\\\n\\\\tr _ (Preferences haloEnclosesFullBounds)\\\\n\\\\t\\\\tifFalse: [ self boundsIn: nil ]\\\\n\\\\t\\\\tifTrue: [ self fullBoundsInWorld ].\\\\n\\\\tPreferences showBoundsInHalo ifTrue: [ ^r outsetBy: 2 ].\\\\n\\\\t^r! !\\\\n\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'sw 10/23/1998 12:00'!\\\\naddTransparentSpacerOfSize: aPoint\\\\n\\\\tself addMorphBack: (self transparentSpacerOfSize: aPoint)! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'sw 10/23/1998 12:01'!\\\\nbeTransparent\\\\n\\\\tself color: Color transparent! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'RAA 11/8/2000 18:29'!\\\\ncartesianBoundsTopLeft\\\\n\\\\t\\\\\\\"Answer the origin of this morph relative to it's container's cartesian origin. \\\\n\\\\tNOTE: y DECREASES toward the bottom of the screen\\\\\\\"\\\\n\\\\n\\\\t| w container |\\\\n\\\\n\\\\tw _ self world ifNil: [^ bounds origin].\\\\n\\\\tcontainer _ self referencePlayfield ifNil: [w].\\\\n\\\\t^ (bounds left - container cartesianOrigin x) @\\\\n\\\\t\\\\t(container cartesianOrigin y - bounds top)! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'sw 1/17/2000 20:55'!\\\\ncartesianXY: coords\\\\n\\\\t^ self x: coords x y: coords y\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'di 9/9/1998 22:49'!\\\\ncolorUnder\\\\n\\\\t\\\\\\\"Return the color of under the receiver's center.\\\\\\\"\\\\n\\\\n\\\\tself isInWorld\\\\n\\\\t\\\\tifTrue: [^ self world colorAt: (self pointInWorld: self referencePosition) belowMorph: self]\\\\n\\\\t\\\\tifFalse: [^ Color black].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'nk 7/7/2003 17:18'!\\\\ncolor: sensitiveColor sees: soughtColor \\\\n\\\\t\\\\\\\"Return true if any of my pixels of sensitiveColor intersect with pixels of soughtColor.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Make a mask with black where sensitiveColor is, white elsewhere\\\\\\\"\\\\n\\\\n\\\\t| myImage sensitivePixelMask map patchBelowMe tfm morphAsFlexed i1 pasteUp |\\\\n\\\\tpasteUp _ self world ifNil: [ ^false ].\\\\n\\\\ttfm := self transformFrom: pasteUp.\\\\n\\\\tmorphAsFlexed := tfm isIdentity \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [TransformationMorph new flexing: self clone byTransformation: tfm].\\\\n\\\\tmyImage := morphAsFlexed imageForm offset: 0 @ 0.\\\\n\\\\tsensitivePixelMask := Form extent: myImage extent depth: 1.\\\\n\\\\t\\\\\\\"ensure at most a 16-bit map\\\\\\\"\\\\n\\\\tmap := Bitmap new: (1 bitShift: (myImage depth - 1 min: 15)).\\\\n\\\\tmap at: (i1 := sensitiveColor indexInMap: map) put: 1.\\\\n\\\\tsensitivePixelMask \\\\n\\\\t\\\\tcopyBits: sensitivePixelMask boundingBox\\\\n\\\\t\\\\tfrom: myImage form\\\\n\\\\t\\\\tat: 0 @ 0\\\\n\\\\t\\\\tcolorMap: map.\\\\n\\\\n\\\\t\\\\\\\"get an image of the world below me\\\\\\\"\\\\n\\\\tpatchBelowMe := pasteUp \\\\n\\\\t\\\\t\\\\t\\\\tpatchAt: morphAsFlexed fullBounds\\\\n\\\\t\\\\t\\\\t\\\\twithout: self\\\\n\\\\t\\\\t\\\\t\\\\tandNothingAbove: false.\\\\n\\\\t\\\\\\\"\\\\nsensitivePixelMask displayAt: 0@0.\\\\npatchBelowMe displayAt: 100@0.\\\\n\\\\\\\"\\\\n\\\\t\\\\\\\"intersect world pixels of the color we're looking for with the sensitive pixels\\\\\\\"\\\\n\\\\tmap at: i1 put: 0.\\\\t\\\\\\\"clear map and reuse it\\\\\\\"\\\\n\\\\tmap at: (soughtColor indexInMap: map) put: 1.\\\\n\\\\tsensitivePixelMask \\\\n\\\\t\\\\tcopyBits: patchBelowMe boundingBox\\\\n\\\\t\\\\tfrom: patchBelowMe\\\\n\\\\t\\\\tat: 0 @ 0\\\\n\\\\t\\\\tclippingBox: patchBelowMe boundingBox\\\\n\\\\t\\\\trule: Form and\\\\n\\\\t\\\\tfillColor: nil\\\\n\\\\t\\\\tmap: map.\\\\n\\\\t\\\\\\\"\\\\nsensitivePixelMask displayAt: 200@0.\\\\n\\\\\\\"\\\\n\\\\t^(sensitivePixelMask tallyPixelValues second) > 0! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'di 10/1/2000 11:54'!\\\\ndegreesOfFlex\\\\n\\\\t\\\\\\\"Return any rotation due to flexing\\\\\\\"\\\\n\\\\t\\\\\\\"NOTE: because renderedMorph, which is used by the halo to set heading, goes down through dropShadows as well as transformations, we need this method (and its other implems) to come back up through such a chain.\\\\\\\"\\\\n\\\\t^ 0.0! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'ar 9/22/2000 14:29'!\\\\nforwardDirection: newDirection\\\\n\\\\t\\\\\\\"Set the receiver's forward direction (in eToy terms)\\\\\\\"\\\\n\\\\tself setProperty: #forwardDirection toValue: newDirection.! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'sw 9/8/2000 16:35'!\\\\ngetIndexInOwner\\\\n\\\\t\\\\\\\"Answer which position the receiver holds in its owner's hierarchy\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"NB: There is some concern about submorphs that aren't really to be counted, such as a background morph of a playfield.\\\\\\\"\\\\n\\\\n\\\\t| container topRenderer |\\\\n\\\\tcontainer _ (topRenderer _ self topRendererOrSelf) owner.\\\\n\\\\t^ container submorphIndexOf: topRenderer.! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'dgd 9/20/2004 14:15'!\\\\ngoHome\\\\n\\\\t| box fb |\\\\n\\\\towner isInMemory ifFalse: [^ self].\\\\n\\\\towner isNil ifTrue: [^ self].\\\\n\\\\tself visible ifFalse: [^ self].\\\\n\\\\n\\\\tbox := owner visibleClearArea.\\\\n\\\\tfb := self fullBounds.\\\\n\\\\n\\\\tfb left < box left\\\\n\\\\t\\\\tifTrue: [self left: box left - fb left + self left].\\\\n\\\\tfb right > box right\\\\n\\\\t\\\\tifTrue: [self right: box right - fb right + self right].\\\\n\\\\n\\\\tfb top < box top\\\\n\\\\t\\\\tifTrue: [self top: box top - fb top + self top].\\\\n\\\\tfb bottom > box bottom\\\\n\\\\t\\\\tifTrue: [self bottom: box bottom - fb bottom + self bottom].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'di 10/1/2000 11:50'!\\\\nheading\\\\n\\\\t\\\\\\\"Return the receiver's heading (in eToy terms)\\\\\\\"\\\\n\\\\towner ifNil: [^ self forwardDirection].\\\\n\\\\t^ self forwardDirection + owner degreesOfFlex! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'ar 9/22/2000 13:37'!\\\\nheading: newHeading\\\\n\\\\t\\\\\\\"Set the receiver's heading (in eToy terms)\\\\\\\"\\\\n\\\\tself isFlexed ifFalse:[self addFlexShell].\\\\n\\\\towner rotationDegrees: (newHeading - self forwardDirection).! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy'!\\\\nmove: aMorph toPosition: aPointOrNumber\\\\n\\\\t\\\\\\\"Support for e-toy demo. Move the given submorph to the given position. Allows the morph's owner to determine the policy for motion. For example, moving forward through a table might mean motion only in the x-axis with wrapping modulo the table size.\\\\\\\"\\\\n\\\\n\\\\taMorph position: aPointOrNumber asPoint.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'ar 9/22/2000 20:12'!\\\\nreferencePosition\\\\n\\\\t\\\\\\\"Return the current reference position of the receiver\\\\\\\"\\\\n\\\\t| box |\\\\n\\\\tbox _ self bounds.\\\\n\\\\t^box origin + (self rotationCenter * box extent).\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'sw 10/25/1999 16:49'!\\\\nreferencePositionInWorld\\\\n\\\\n\\\\t^ self pointInWorld: self referencePosition\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'sw 10/25/1999 23:33'!\\\\nreferencePositionInWorld: aPoint\\\\n\\\\t| localPosition |\\\\n\\\\tlocalPosition _ owner\\\\n\\\\t\\\\tifNil: [aPoint]\\\\n\\\\t\\\\tifNotNil: [(owner transformFrom: self world) globalPointToLocal: aPoint].\\\\n\\\\n\\\\tself referencePosition: localPosition\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'ar 9/27/2000 14:04'!\\\\nreferencePosition: aPosition\\\\n\\\\t\\\\\\\"Move the receiver to match its reference position with aPosition\\\\\\\"\\\\n\\\\t| newPos intPos |\\\\n\\\\tnewPos _ self position + (aPosition - self referencePosition).\\\\n\\\\tintPos _ newPos asIntegerPoint.\\\\n\\\\tnewPos = intPos \\\\n\\\\t\\\\tifTrue:[self position: intPos]\\\\n\\\\t\\\\tifFalse:[self position: newPos].! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'ar 9/22/2000 20:10'!\\\\nrotationCenter\\\\n\\\\t\\\\\\\"Return the rotation center of the receiver. The rotation center defines the relative offset inside the receiver's bounds for locating the reference position.\\\\\\\"\\\\n\\\\t^self valueOfProperty: #rotationCenter ifAbsent:[0.5@0.5]\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'ar 9/22/2000 20:11'!\\\\nrotationCenter: aPointOrNil\\\\n\\\\t\\\\\\\"Set the new rotation center of the receiver. The rotation center defines the relative offset inside the receiver's bounds for locating the reference position.\\\\\\\"\\\\n\\\\taPointOrNil isNil\\\\n\\\\t\\\\tifTrue:[self removeProperty: #rotationCenter]\\\\n\\\\t\\\\tifFalse:[self setProperty: #rotationCenter toValue: aPointOrNil]\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'nk 9/4/2004 11:04'!\\\\nscaleFactor: newScale \\\\n\\\\t\\\\\\\"Backstop for morphs that don't have to do something special to set their \\\\n\\\\tscale \\\\\\\"\\\\n\\\\t| toBeScaled |\\\\n\\\\ttoBeScaled := self.\\\\n\\\\tnewScale = 1.0\\\\n\\\\t\\\\tifTrue: [(self heading isZero\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [self isFlexMorph])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [toBeScaled := self removeFlexShell]]\\\\n\\\\t\\\\tifFalse: [self isFlexMorph\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [toBeScaled := self addFlexShellIfNecessary]].\\\\n\\\\n\\\\ttoBeScaled scale: newScale.\\\\n\\\\n\\\\ttoBeScaled == self ifTrue: [\\\\n\\\\t\\\\tnewScale = 1.0\\\\n\\\\t\\\\t\\\\tifTrue: [ self removeProperty: #scaleFactor ]\\\\n\\\\t\\\\t\\\\tifFalse: [ self setProperty: #scaleFactor toValue: newScale ]]! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'nk 9/4/2004 11:00'!\\\\nscale: newScale\\\\n\\\\t\\\\\\\"Backstop for morphs that don't have to do something special to set their scale\\\\\\\"\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'ar 6/12/2001 05:23'!\\\\nsetDirectionFrom: aPoint\\\\n\\\\t| delta degrees |\\\\n\\\\tdelta _ (self transformFromWorld globalPointToLocal: aPoint) - self referencePosition.\\\\n\\\\tdegrees _ delta degrees + 90.0.\\\\n\\\\tself forwardDirection: (degrees \\\\\\\\\\\\\\\\ 360) rounded.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'sw 8/31/2000 11:18'!\\\\nsetIndexInOwner: anInteger\\\\n\\\\t\\\\\\\"Answer which position the receiver holds in its owner's hierarchy\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"There is some concern about submorphs that aren't really to be counted, such as a background morph of a playfield.\\\\\\\"\\\\n\\\\t| container topRenderer indexToUse |\\\\n\\\\tcontainer _ (topRenderer _ self topRendererOrSelf) owner.\\\\n\\\\tindexToUse _ (anInteger min: container submorphCount) max: 1.\\\\n\\\\tcontainer addMorph: topRenderer asElementNumber: indexToUse! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'wiz 11/6/2005 17:10'!\\\\nsimplySetVisible: aBoolean\\\\n\\\\t\\\\\\\"Set the receiver's visibility property.  This mild circumlocution is because my TransfomationMorph #visible: method would also set the visibility flag of my flexee, which in this case is pointless because it's the flexee that calls this.\\\\n\\\\tThis appears in morph as a backstop for morphs that don't inherit from TFMorph\\\\\\\"\\\\n\\\\n\\\\tself visible: aBoolean! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'nk 7/7/2003 17:19'!\\\\ntouchesColor: soughtColor \\\\n\\\\t\\\\\\\"Return true if any of my pixels overlap pixels of soughtColor.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Make a shadow mask with black in my shape, white elsewhere\\\\\\\"\\\\n\\\\n\\\\t| map patchBelowMe shadowForm tfm morphAsFlexed pasteUp |\\\\n\\\\tpasteUp := self world ifNil: [ ^false ].\\\\n\\\\n\\\\ttfm := self transformFrom: pasteUp.\\\\n\\\\tmorphAsFlexed := tfm isIdentity \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [TransformationMorph new flexing: self clone byTransformation: tfm].\\\\n\\\\tshadowForm := morphAsFlexed shadowForm offset: 0 @ 0.\\\\n\\\\n\\\\t\\\\\\\"get an image of the world below me\\\\\\\"\\\\n\\\\tpatchBelowMe := (pasteUp \\\\n\\\\t\\\\t\\\\t\\\\tpatchAt: morphAsFlexed fullBounds\\\\n\\\\t\\\\t\\\\t\\\\twithout: self\\\\n\\\\t\\\\t\\\\t\\\\tandNothingAbove: false) offset: 0 @ 0.\\\\n\\\\t\\\\\\\"\\\\nshadowForm displayAt: 0@0.\\\\npatchBelowMe displayAt: 100@0.\\\\n\\\\\\\"\\\\n\\\\t\\\\\\\"intersect world pixels of the color we're looking for with our shape.\\\\\\\"\\\\n\\\\t\\\\\\\"ensure a maximum 16-bit map\\\\\\\"\\\\n\\\\tmap := Bitmap new: (1 bitShift: (patchBelowMe depth - 1 min: 15)).\\\\n\\\\tmap at: (soughtColor indexInMap: map) put: 1.\\\\n\\\\tshadowForm \\\\n\\\\t\\\\tcopyBits: patchBelowMe boundingBox\\\\n\\\\t\\\\tfrom: patchBelowMe\\\\n\\\\t\\\\tat: 0 @ 0\\\\n\\\\t\\\\tclippingBox: patchBelowMe boundingBox\\\\n\\\\t\\\\trule: Form and\\\\n\\\\t\\\\tfillColor: nil\\\\n\\\\t\\\\tmap: map.\\\\n\\\\t\\\\\\\"\\\\nshadowForm displayAt: 200@0.\\\\n\\\\\\\"\\\\n\\\\t^(shadowForm tallyPixelValues second) > 0! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'sw 10/23/1998 11:50'!\\\\ntransparentSpacerOfSize: aPoint\\\\n\\\\t^ (Morph new extent: aPoint) color: Color transparent! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'tk 7/8/1998 23:47'!\\\\nwrap\\\\n\\\\n\\\\t| myBox box newX newY wrapped |\\\\n\\\\towner ifNil: [^ self].\\\\n\\\\tmyBox _ self fullBounds.\\\\n\\\\tmyBox corner < (50000@50000) ifFalse: [\\\\n\\\\t\\\\tself inform: 'Who is trying to wrap a hidden object?'. ^ self].\\\\n\\\\tbox _ owner bounds.\\\\n\\\\tnewX _ self position x.\\\\n\\\\tnewY _ self position y.\\\\n\\\\twrapped _ false.\\\\n\\\\t((myBox right < box left) or: [myBox left > box right]) ifTrue: [\\\\n\\\\t\\\\tnewX _ box left + ((self position x - box left) \\\\\\\\\\\\\\\\ box width).\\\\n\\\\t\\\\twrapped _ true].\\\\n\\\\t((myBox bottom < box top) or: [myBox top > box bottom]) ifTrue: [\\\\n\\\\t\\\\tnewY _ box top + ((self position y - box top) \\\\\\\\\\\\\\\\ box height).\\\\n\\\\t\\\\twrapped _ true].\\\\n\\\\tself position: newX@newY.\\\\n\\\\t(wrapped and: [owner isPlayfieldLike])\\\\n\\\\t\\\\tifTrue: [owner changed].  \\\\\\\"redraw all turtle trails if wrapped\\\\\\\"\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'dgd 2/22/2003 14:37'!\\\\nx\\\\n\\\\t\\\\\\\"Return my horizontal position relative to the cartesian origin of a relevant playfield\\\\\\\"\\\\n\\\\n\\\\t| aPlayfield |\\\\n\\\\taPlayfield := self referencePlayfield.\\\\n\\\\t^aPlayfield isNil \\\\n\\\\t\\\\tifTrue: [self referencePosition x]\\\\n\\\\t\\\\tifFalse: [self referencePosition x - aPlayfield cartesianOrigin x]! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'aoy 2/17/2003 01:00'!\\\\nx: aNumber \\\\n\\\\t\\\\\\\"Set my horizontal position relative to the cartesian origin of the playfield or the world.\\\\\\\"\\\\n\\\\n\\\\t| offset aPlayfield newX |\\\\n\\\\taPlayfield := self referencePlayfield.\\\\n\\\\toffset := self left - self referencePosition x.\\\\n\\\\tnewX := aPlayfield isNil\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [aNumber + offset]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [aPlayfield cartesianOrigin x + aNumber + offset].\\\\n\\\\tself position: newX @ bounds top! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'sw 1/17/2000 20:04'!\\\\nx: xCoord y: yCoord\\\\n\\\\t| aWorld xyOffset delta aPlayfield |\\\\n\\\\t(aWorld _ self world) ifNil: [^ self position: xCoord @ yCoord].\\\\n\\\\txyOffset _ self topLeft - self referencePosition.\\\\n\\\\tdelta _ (aPlayfield _ self referencePlayfield)\\\\n\\\\t\\\\tifNil:\\\\n\\\\t\\\\t\\\\t[xCoord @ (aWorld bottom - yCoord)]\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t[aPlayfield cartesianOrigin + (xCoord @ (yCoord negated))].\\\\n\\\\tself position: (xyOffset + delta)\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'dgd 2/22/2003 14:37'!\\\\ny\\\\n\\\\t\\\\\\\"Return my vertical position relative to the cartesian origin of the playfield or the world. Note that larger y values are closer to the top of the screen.\\\\\\\"\\\\n\\\\n\\\\t| w aPlayfield |\\\\n\\\\tw := self world.\\\\n\\\\tw ifNil: [^bounds top].\\\\n\\\\taPlayfield := self referencePlayfield.\\\\n\\\\t^aPlayfield isNil \\\\n\\\\t\\\\tifTrue: [w cartesianOrigin y - self referencePosition y]\\\\n\\\\t\\\\tifFalse: [aPlayfield cartesianOrigin y - self referencePosition y]! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'aoy 2/17/2003 01:00'!\\\\ny: aNumber \\\\n\\\\t\\\\\\\"Set my vertical position relative to the cartesian origin of the playfield or the world. Note that larger y values are closer to the top of the screen.\\\\\\\"\\\\n\\\\n\\\\t| w offset newY aPlayfield |\\\\n\\\\tw := self world.\\\\n\\\\tw ifNil: [^self position: bounds left @ aNumber].\\\\n\\\\taPlayfield := self referencePlayfield.\\\\n\\\\toffset := self top - self referencePosition y.\\\\n\\\\tnewY := aPlayfield isNil\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [w bottom - aNumber + offset]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [aPlayfield cartesianOrigin y - aNumber + offset].\\\\n\\\\tself position: bounds left @ newY! !\\\\n\\\\n\\\\n!Morph methodsFor: 'geometry testing'!\\\\ncontainsPoint: aPoint\\\\n\\\\n\\\\t^ self bounds containsPoint: aPoint! !\\\\n\\\\n!Morph methodsFor: 'geometry testing' stamp: 'di 5/3/2000 19:05'!\\\\nfullContainsPoint: aPoint\\\\n\\\\n\\\\t(self fullBounds containsPoint: aPoint) ifFalse: [^ false].  \\\\\\\"quick elimination\\\\\\\"\\\\n\\\\t(self containsPoint: aPoint) ifTrue: [^ true].  \\\\\\\"quick acceptance\\\\\\\"\\\\n\\\\tsubmorphs do: [:m | (m fullContainsPoint: aPoint) ifTrue: [^ true]].\\\\n\\\\t^ false\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry testing' stamp: 'dgd 2/22/2003 14:33'!\\\\nobtrudesBeyondContainer\\\\n\\\\t\\\\\\\"Answer whether the receiver obtrudes beyond the bounds of its container\\\\\\\"\\\\n\\\\n\\\\t| top |\\\\n\\\\ttop := self topRendererOrSelf.\\\\n\\\\t(top owner isNil or: [top owner isHandMorph]) ifTrue: [^false].\\\\n\\\\t^(top owner bounds containsRect: top bounds) not! !\\\\n\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'ar 11/7/1999 18:57'!\\\\naddHalo\\\\n\\\\t\\\\\\\"Invoke a halo programatically (e.g., not from a meta gesture)\\\\\\\"\\\\n\\\\t^self addHalo: nil! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'ar 10/10/2000 19:03'!\\\\naddHalo: evt\\\\n\\\\t| halo prospectiveHaloClass |\\\\n\\\\tprospectiveHaloClass _ Smalltalk at: self haloClass ifAbsent: [HaloMorph].\\\\n\\\\thalo _ prospectiveHaloClass new bounds: self worldBoundsForHalo.\\\\n\\\\thalo popUpFor: self event: evt.\\\\n\\\\t^halo! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'ar 11/7/1999 21:55'!\\\\naddHalo: evt from: formerHaloOwner\\\\n\\\\t\\\\\\\"Transfer a halo from the former halo owner to the receiver\\\\\\\"\\\\n\\\\t^self addHalo: evt! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 12/30/2004 02:53'!\\\\naddHandlesTo: aHaloMorph box: box\\\\n\\\\t\\\\\\\"Add halo handles to the halo.  Apply the halo filter if appropriate\\\\\\\"\\\\n\\\\n\\\\t| wantsIt aSelector |\\\\n\\\\taHaloMorph haloBox: box.\\\\n\\\\tPreferences haloSpecifications  do:\\\\n\\\\t\\\\t[:aSpec | \\\\n\\\\t\\\\t\\\\taSelector _  aSpec addHandleSelector.\\\\n\\\\t\\\\t\\\\twantsIt _ Preferences selectiveHalos\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self wantsHaloHandleWithSelector: aSelector inHalo: aHaloMorph]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[true].\\\\n\\\\t\\\\t\\\\twantsIt ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[(#(addMakeSiblingHandle: addDupHandle:) includes: aSelector) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[wantsIt _ self preferredDuplicationHandleSelector = aSelector].\\\\n\\\\t\\\\t\\\\twantsIt ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[aHaloMorph perform: aSelector with: aSpec]]].\\\\n\\\\n\\\\taHaloMorph innerTarget addOptionalHandlesTo: aHaloMorph box: box! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'ar 8/8/2001 17:31'!\\\\naddMagicHaloFor: aHand\\\\n\\\\t| halo prospectiveHaloClass |\\\\n\\\\taHand halo ifNotNil:[\\\\n\\\\t\\\\taHand halo target == self ifTrue:[^self].\\\\n\\\\t\\\\taHand halo isMagicHalo ifFalse:[^self]].\\\\n\\\\tprospectiveHaloClass _ Smalltalk at: self haloClass ifAbsent: [HaloMorph].\\\\n\\\\thalo _ prospectiveHaloClass new bounds: self worldBoundsForHalo.\\\\n\\\\thalo popUpMagicallyFor: self hand: aHand.! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'ar 9/22/2000 20:41'!\\\\naddOptionalHandlesTo: aHalo box: box\\\\n\\\\taHalo addDirectionHandles! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 12/21/1999 17:52'!\\\\naddSimpleHandlesTo: aHaloMorph box: aBox\\\\n\\\\t^ aHaloMorph addSimpleHandlesTo: aHaloMorph box: aBox! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 1/26/2000 19:37'!\\\\naddWorldHandlesTo: aHaloMorph box: box\\\\n\\\\taHaloMorph haloBox: box.\\\\n\\\\tPreferences haloSpecificationsForWorld do:\\\\n\\\\t\\\\t[:aSpec | \\\\n\\\\t\\\\t\\\\taHaloMorph perform: aSpec addHandleSelector with: aSpec].\\\\n\\\\taHaloMorph innerTarget addOptionalHandlesTo: aHaloMorph box: box! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sma 11/11/2000 14:54'!\\\\nballoonColor\\\\n\\\\t^ self\\\\n\\\\t\\\\tvalueOfProperty: #balloonColor\\\\n\\\\t\\\\tifAbsent: [self defaultBalloonColor]! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sma 11/11/2000 14:55'!\\\\nballoonColor: aColor\\\\n\\\\t^ self\\\\n\\\\t\\\\tsetProperty: #balloonColor\\\\n\\\\t\\\\ttoValue: aColor! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sd 12/5/2001 20:29'!\\\\nballoonFont\\\\n\\\\t^ self\\\\n\\\\t\\\\tvalueOfProperty: #balloonFont\\\\n\\\\t\\\\tifAbsent: [self defaultBalloonFont]! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sd 12/5/2001 20:30'!\\\\nballoonFont: aFont \\\\n\\\\t^ self setProperty: #balloonFont toValue: aFont! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 2/7/2000 11:27'!\\\\nballoonHelpAligner\\\\n\\\\t\\\\\\\"Answer the morph to which the receiver's balloon help should point\\\\\\\"\\\\n\\\\t^ (self valueOfProperty: #balloonTarget) ifNil: [self]! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'dgd 9/7/2004 18:35'!\\\\nballoonHelpDelayTime\\\\n\\\\t\\\\\\\"Return the number of milliseconds before a balloon help should be put up on the receiver. The balloon help will only be put up if the receiver responds to #wantsBalloon by returning true.\\\\\\\"\\\\n\\\\t^ Preferences balloonHelpDelayTime! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'dgd 4/3/2006 14:15'!\\\\nballoonHelpTextForHandle: aHandle\\\\n\\\\t\\\\\\\"Answer a string providing balloon help for the given halo handle\\\\\\\"\\\\n\\\\n\\\\t|  itsSelector |\\\\n\\\\titsSelector _ aHandle eventHandler firstMouseSelector.\\\\n\\\\n\\\\t(itsSelector == #doRecolor:with:) ifTrue:\\\\n\\\\t\\\\t[^ Preferences propertySheetFromHalo\\\\n\\\\t\\\\t\\\\tifTrue: ['Open a property sheet.']\\\\n\\\\t\\\\t\\\\tifFalse: ['Change color']].\\\\n\\\\n\\\\t(itsSelector == #mouseDownInDimissHandle:with:) ifTrue:\\\\n\\\\t\\\\t[^ Preferences preserveTrash\\\\n\\\\t\\\\t\\\\tifTrue: ['Move to trash']\\\\n\\\\t\\\\t\\\\tifFalse: ['Remove from screen']].\\\\n\\\\n\\\\t#(\\\\t(addFullHandles\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'More halo handles')\\\\n\\\\t\\\\t(addSimpleHandles\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Fewer halo handles')\\\\n\\\\t\\\\t(chooseEmphasisOrAlignment\\\\t\\\\t\\\\t\\\\t'Emphasis & alignment')\\\\n\\\\t\\\\t(chooseFont\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Change font')\\\\n\\\\t\\\\t(chooseNewGraphicFromHalo\\\\t\\\\t\\\\t\\\\t'Choose a new graphic')\\\\n\\\\t\\\\t(chooseStyle\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Change style')\\\\n\\\\t\\\\t(dismiss\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Remove')\\\\n\\\\t\\\\t(doDebug:with:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Debug')\\\\n\\\\t\\\\t(doDirection:with:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Choose forward direction')\\\\n\\\\t\\\\t(doDup:with:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Duplicate')\\\\n\\\\t\\\\t(doMakeSibling:with: \\\\t\\\\t\\\\t\\\\t\\\\t'Make a sibling')\\\\n\\\\t\\\\t(doMenu:with:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Menu')\\\\n\\\\t\\\\t(doGrab:with:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Pick up')\\\\n\\\\t\\\\t(editButtonsScript\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'See the script for this button')\\\\n\\\\t\\\\t(editDrawing\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Repaint')\\\\n\\\\t\\\\t(maybeDoDup:with:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Duplicate')\\\\n\\\\t\\\\t(makeNascentScript\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Make a scratch script')\\\\n\\\\t\\\\t(makeNewDrawingWithin\\\\t\\\\t\\\\t\\\\t'Paint new object')\\\\n\\\\t\\\\t(mouseDownInCollapseHandle:with:\\\\t\\\\t'Collapse')\\\\n\\\\t\\\\t(mouseDownOnHelpHandle:\\\\t\\\\t\\\\t\\\\t'Help')\\\\n\\\\t\\\\t(openViewerForArgument\\\\t\\\\t\\\\t\\\\t'Open a Viewer for me. Press shift for a snapshot.')\\\\n\\\\t\\\\t(openViewerForTarget:with:\\\\t\\\\t\\\\t\\\\t'Open a Viewer for me. Press shift for a snapshot.')\\\\n\\\\t\\\\t(paintBackground\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Paint background')\\\\n\\\\t\\\\t(prepareToTrackCenterOfRotation:with:\\\\t'Move object or set center of rotation')\\\\n\\\\t\\\\t(presentViewMenu\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Present the Viewing menu')\\\\n\\\\t\\\\t(startDrag:with:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Move')\\\\n\\\\t\\\\t(startGrow:with:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Change size') \\\\n\\\\t\\\\t(startRot:with:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Rotate')\\\\n\\\\t\\\\t(startScale:with:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Change scale') \\\\n\\\\t\\\\t(tearOffTile\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Make a tile representing this object')\\\\n\\\\t\\\\t(tearOffTileForTarget:with:\\\\t\\\\t\\\\t\\\\t'Make a tile representing this object')\\\\n\\\\t\\\\t(trackCenterOfRotation:with:\\\\t\\\\t\\\\t\\\\t'Set center of rotation')\\\\n\\\\t) \\\\n\\\\tdo:\\\\n\\\\t\\\\t[:pair | itsSelector == pair first ifTrue: [^ pair last]].\\\\n\\\\n\\\\t^ 'unknown halo handle'! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'RAA 7/21/2000 11:10'!\\\\nboundsForBalloon\\\\n\\\\n\\\\t\\\\\\\"some morphs have bounds that are way too big\\\\\\\"\\\\n\\\\t^self boundsInWorld! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 3/1/2000 11:39'!\\\\ncomeToFrontAndAddHalo\\\\n\\\\tself comeToFront.\\\\n\\\\tself addHalo! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sma 11/11/2000 16:15'!\\\\ndefaultBalloonColor\\\\n\\\\t^ Display depth <= 2\\\\n\\\\t\\\\tifTrue: [Color white]\\\\n\\\\t\\\\tifFalse: [BalloonMorph balloonColor]! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sd 12/5/2001 20:23'!\\\\ndefaultBalloonFont\\\\n\\\\t^ BalloonMorph balloonFont! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 1/11/2000 18:24'!\\\\ndefersHaloOnClickTo: aSubMorph\\\\n\\\\t\\\\\\\"If a cmd-click on aSubMorph would make it a preferred recipient of the halo, answer true\\\\\\\"\\\\n\\\\t\\\\\\\"May want to add a way (via a property) for morphs to assert true here -- this would let certain kinds of morphs that are unusually reluctant to take the halo on initial click\\\\\\\"\\\\n\\\\n\\\\t^ false\\\\n\\\\t! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'ar 10/3/2000 17:03'!\\\\ndeleteBalloon\\\\n\\\\t\\\\\\\"If I am showing a balloon, delete it.\\\\\\\"\\\\n\\\\t| w |\\\\n\\\\tw _ self world ifNil:[^self].\\\\n\\\\tw deleteBalloonTarget: self.! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'em 3/24/2005 10:02'!\\\\neditBalloonHelpContent: aString\\\\n\\\\t| reply |\\\\n\\\\treply _ FillInTheBlank\\\\n\\\\t\\\\tmultiLineRequest: 'Edit the balloon help text for ' translated, self externalName\\\\n\\\\t\\\\tcenterAt: Sensor cursorPoint\\\\n\\\\t\\\\tinitialAnswer: (aString ifNil: [self noHelpString] ifNotNil: [aString])\\\\n\\\\t\\\\tanswerHeight: 200.\\\\n\\\\treply ifNil: [^ self].  \\\\\\\"User cancelled out of the dialog\\\\\\\"\\\\n\\\\t(reply isEmpty or: [reply asString = self noHelpString])\\\\n\\\\t\\\\tifTrue: [self setBalloonText: nil]\\\\n\\\\t\\\\tifFalse: [self setBalloonText: reply]! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sma 12/23/1999 13:24'!\\\\neditBalloonHelpText\\\\n\\\\t\\\\\\\"Modify the receiver's balloon help text.\\\\\\\"\\\\n\\\\n\\\\tself editBalloonHelpContent: self balloonText! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'ar 3/17/2001 13:19'!\\\\nhalo\\\\n\\\\n\\\\t(self outermostWorldMorph ifNil: [^nil]) haloMorphs do: [:h | h target == self ifTrue: [^ h]].\\\\n\\\\t^ nil! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'ar 9/15/2000 16:13'!\\\\nhaloClass\\\\n\\\\t\\\\\\\"Answer the name of the desired kind of HaloMorph to launch on behalf of the receiver\\\\\\\"\\\\n\\\\n\\\\t^ #HaloMorph\\\\n! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'ar 8/8/2001 15:40'!\\\\nhaloDelayTime\\\\n\\\\t\\\\\\\"Return the number of milliseconds before a halo should be put up on the receiver. The halo will only be put up if the receiver responds to #wantsHalo by returning true.\\\\\\\"\\\\n\\\\t^800! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'ar 9/15/2000 16:16'!\\\\nhasHalo\\\\n\\\\t^self hasProperty: #hasHalo.! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'ar 9/28/2000 17:54'!\\\\nhasHalo: aBool\\\\n\\\\taBool\\\\n\\\\t\\\\tifTrue:[self setProperty: #hasHalo toValue: true]\\\\n\\\\t\\\\tifFalse:[self removeProperty: #hasHalo]! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'dgd 2/22/2003 19:05'!\\\\nisLikelyRecipientForMouseOverHalos\\\\n\\\\t^self player notNil! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'ar 10/3/2000 17:05'!\\\\nmouseDownOnHelpHandle: anEvent\\\\n\\\\t\\\\\\\"The mouse went down in the show-balloon handle\\\\\\\"\\\\n\\\\t\\\\n\\\\t| str |\\\\n\\\\tanEvent shiftPressed ifTrue: [^ self editBalloonHelpText].\\\\n\\\\tstr _ self balloonText.\\\\n\\\\tstr ifNil: [str _ self noHelpString].\\\\n\\\\tself showBalloon: str hand: anEvent hand.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'em 3/24/2005 10:05'!\\\\nnoHelpString\\\\n\\\\t^ 'Help not yet supplied' translated! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 11/15/2001 12:23'!\\\\nokayToAddDismissHandle\\\\n\\\\t\\\\\\\"Answer whether a halo on the receiver should offer a dismiss handle.  This provides a hook for making it harder to disassemble some strucures even momentarily\\\\\\\"\\\\n\\\\n\\\\t^ self holdsSeparateDataForEachInstance not  and:\\\\n\\\\t\\\\t[self resistsRemoval not]! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 10/26/2000 12:11'!\\\\nokayToAddGrabHandle\\\\n\\\\t\\\\\\\"Answer whether a halo on the receiver should offer a grab handle.  This provides a hook for making it harder to deconstruct some strucures even momentarily\\\\\\\"\\\\n\\\\n\\\\t^ self holdsSeparateDataForEachInstance not ! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 11/27/2001 14:50'!\\\\nokayToBrownDragEasily\\\\n\\\\t\\\\\\\"Answer whether it it okay for the receiver to be brown-dragged easily -- i.e. repositioned within its container without extracting it.  At present this is just a hook -- nobody declines.\\\\\\\"\\\\n\\\\n\\\\t^ true\\\\n\\\\n\\\\n\\\\n\\\\\\\"\\\\n\\\\t^ (self topRendererOrSelf owner isKindOf: PasteUpMorph) and:\\\\n\\\\t\\\\t[self layoutPolicy isNil]\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 11/27/2001 15:02'!\\\\nokayToExtractEasily\\\\n\\\\t\\\\\\\"Answer whether it it okay for the receiver to be extracted easily.  Not yet hooked up to the halo-permissions mechanism.\\\\\\\"\\\\n\\\\n\\\\t^ self topRendererOrSelf owner dragNDropEnabled! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 11/29/2001 06:29'!\\\\nokayToResizeEasily\\\\n\\\\t\\\\\\\"Answer whether it is appropriate to have the receiver be easily resized by the user from the halo\\\\\\\"\\\\n\\\\n\\\\t^ true\\\\n\\\\n\\\\t\\\\\\\"This one was too jarring, not that it didn't most of the time do the right  thing but because some of the time it didn't, such as in a holder.  If we pursue this path, the test needs to be airtight, obviously...\\\\n\\\\t^ (self topRendererOrSelf owner isKindOf: PasteUpMorph) and:\\\\n\\\\t\\\\t[self layoutPolicy isNil]\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 11/27/2001 14:44'!\\\\nokayToRotateEasily\\\\n\\\\t\\\\\\\"Answer whether it is appropriate for a rotation handle to be shown for the receiver.  This is a hook -- at present nobody declines.\\\\\\\"\\\\n\\\\n\\\\t^ true! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 12/31/2004 03:30'!\\\\npreferredDuplicationHandleSelector\\\\n\\\\t\\\\\\\"Answer the selector, either #addMakeSiblingHandle: or addDupHandle:, to be offered as the default in a halo open on me\\\\\\\"\\\\n\\\\n\\\\tPreferences oliveHandleForScriptedObjects ifFalse:\\\\n\\\\t\\\\t[^ #addDupHandle:].\\\\n\\\\t^ self renderedMorph valueOfProperty: #preferredDuplicationHandleSelector ifAbsent:\\\\n\\\\t\\\\t[self player class isUniClass\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[#addMakeSiblingHandle:]\\\\n\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[#addDupHandle:]]! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'dgd 9/9/2004 22:43'!\\\\nremoveHalo\\\\n\\\\t\\\\\\\"remove the surrounding halo (if any)\\\\\\\"\\\\n\\\\tself halo isNil\\\\n\\\\t\\\\tifFalse: [self primaryHand removeHalo]! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sma 12/23/1999 13:32'!\\\\nsetBalloonText: stringOrText\\\\n\\\\t\\\\\\\"Set receiver's balloon help text. Pass nil to remove the help.\\\\\\\"\\\\n\\\\n\\\\tself setBalloonText: stringOrText maxLineLength: Preferences maxBalloonHelpLineLength! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'md 2/27/2006 09:54'!\\\\nsetBalloonText: stringOrText maxLineLength: aLength \\\\n\\\\t\\\\\\\"Set receiver's balloon help text. Pass nil to remove the help.\\\\\\\"\\\\n\\\\t(extension isNil and: [stringOrText isNil]) ifTrue: [^ self].\\\\n\\\\tself assureExtension balloonText: \\\\n\\\\t\\\\t(stringOrText ifNotNil: [stringOrText asString withNoLineLongerThan: aLength])! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 10/29/1999 17:38'!\\\\nsetCenteredBalloonText: aString\\\\n\\\\tself setBalloonText: aString.\\\\n\\\\tself setProperty: #helpAtCenter toValue: true! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'ar 10/3/2000 17:06'!\\\\nshowBalloon: msgString\\\\n\\\\t\\\\\\\"Pop up a balloon containing the given string,\\\\n\\\\tfirst removing any existing BalloonMorphs in the world.\\\\\\\"\\\\n\\\\t| w |\\\\n\\\\tself showBalloon: msgString hand: ((w _ self world) ifNotNil:[w activeHand]).! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'bf 11/1/2000 15:58'!\\\\nshowBalloon: msgString hand: aHand\\\\n\\\\t\\\\\\\"Pop up a balloon containing the given string,\\\\n\\\\tfirst removing any existing BalloonMorphs in the world.\\\\\\\"\\\\n\\\\n\\\\t| w balloon h |\\\\n\\\\t(w _ self world) ifNil: [^ self].\\\\n\\\\th _ aHand.\\\\n\\\\th ifNil:[\\\\n\\\\t\\\\th _ w activeHand].\\\\n\\\\tballoon _ BalloonMorph string: msgString for: self balloonHelpAligner.\\\\n\\\\tballoon popUpFor: self hand: h.! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'dgd 9/10/2004 13:59'!\\\\ntransferHalo: event from: formerHaloOwner\\\\n\\\\t\\\\\\\"Progressively transfer the halo to the next likely recipient\\\\\\\"\\\\n\\\\t| localEvt w target |\\\\n\\\\n\\\\tself flag: #workAround. \\\\\\\"For halo's distinction between 'target' and 'innerTarget' we need to bypass any renderers.\\\\\\\"\\\\n\\\\t(formerHaloOwner == self and:[self isRenderer and:[self wantsHaloFromClick not]]) ifTrue:[\\\\n\\\\t\\\\tevent shiftPressed ifTrue:[\\\\n\\\\t\\\\t\\\\ttarget _ owner.\\\\n\\\\t\\\\t\\\\tlocalEvt _ event transformedBy: (self transformedFrom: owner).\\\\n\\\\t\\\\t] ifFalse:[\\\\n\\\\t\\\\t\\\\ttarget _ self renderedMorph.\\\\n\\\\t\\\\t\\\\tlocalEvt _ event transformedBy: (target transformedFrom: self).\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\t^target transferHalo: localEvt from: target].\\\\n\\\\n\\\\\\\"\\\\tformerHaloOwner == self ifTrue:[^ self removeHalo].\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Never transfer halo to top-most world\\\\\\\"\\\\n\\\\t(self isWorldMorph and:[owner isNil]) ifFalse:[\\\\n\\\\t\\\\t(self wantsHaloFromClick and:[formerHaloOwner ~~ self]) \\\\n\\\\t\\\\t\\\\tifTrue:[^self addHalo: event from: formerHaloOwner]].\\\\n\\\\n\\\\tevent shiftPressed ifTrue:[\\\\n\\\\t\\\\t\\\\\\\"Pass it outwards\\\\\\\"\\\\n\\\\t\\\\towner ifNotNil:[^owner transferHalo: event from: formerHaloOwner].\\\\n\\\\t\\\\t\\\\\\\"We're at the top level; throw the event back in to find recipient\\\\\\\"\\\\n\\\\t\\\\tformerHaloOwner removeHalo.\\\\n\\\\t\\\\t^self processEvent: event copy resetHandlerFields.\\\\n\\\\t].\\\\n\\\\tself submorphsDo:[:m|\\\\n\\\\t\\\\tlocalEvt _ event transformedBy: (m transformedFrom: self).\\\\n\\\\t\\\\t(m fullContainsPoint: localEvt position) \\\\n\\\\t\\\\t\\\\tifTrue:[^m transferHalo: event from: formerHaloOwner].\\\\n\\\\t].\\\\n\\\\t\\\\\\\"We're at the bottom most level; throw the event back up to the root to find recipient\\\\\\\"\\\\n\\\\tformerHaloOwner removeHalo.\\\\n\\\\n\\\\tPreferences maintainHalos ifFalse:[\\\\n\\\\t\\\\t(w _ self world) ifNil: [ ^self ].\\\\n\\\\t\\\\tlocalEvt _ event transformedBy: (self transformedFrom: w) inverseTransformation.\\\\n\\\\t\\\\t^w processEvent: localEvt resetHandlerFields.\\\\n\\\\t].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'rhi 10/5/2001 20:49'!\\\\nwantsBalloon\\\\n\\\\t\\\\\\\"Answer true if receiver wants to show a balloon help text is a few moments.\\\\\\\"\\\\n\\\\n\\\\t^ (self balloonText notNil) and: [Preferences balloonHelpEnabled]! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'ar 11/29/2001 19:50'!\\\\nwantsDirectionHandles\\\\n\\\\t^self valueOfProperty: #wantsDirectionHandles ifAbsent:[Preferences showDirectionHandles]! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'ar 11/29/2001 19:52'!\\\\nwantsDirectionHandles: aBool\\\\n\\\\taBool == Preferences showDirectionHandles\\\\n\\\\t\\\\tifTrue:[self removeProperty: #wantsDirectionHandles]\\\\n\\\\t\\\\tifFalse:[self setProperty: #wantsDirectionHandles toValue: aBool].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'dgd 2/22/2003 19:06'!\\\\nwantsHalo\\\\n\\\\t| topOwner |\\\\n\\\\t^(topOwner := self topRendererOrSelf owner) notNil \\\\n\\\\t\\\\tand: [topOwner wantsHaloFor: self]! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 4/8/98 13:26'!\\\\nwantsHaloFor: aSubMorph\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 1/25/2000 17:43'!\\\\nwantsHaloFromClick\\\\n\\\\t^ true! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 11/27/2001 14:49'!\\\\nwantsHaloHandleWithSelector: aSelector inHalo: aHaloMorph\\\\n\\\\t\\\\\\\"Answer whether the receiver would like to offer the halo handle with the given selector (e.g. #addCollapseHandle:)\\\\\\\"\\\\n\\\\n\\\\t(#(addDismissHandle:) includes: aSelector) ifTrue:\\\\n\\\\t\\\\t[^ self resistsRemoval not].\\\\n\\\\n\\\\t(#( addDragHandle: ) includes: aSelector) ifTrue:\\\\n\\\\t\\\\t[^ self okayToBrownDragEasily].\\\\n\\\\n\\\\t(#(addGrowHandle: addScaleHandle:) includes: aSelector) ifTrue:\\\\n\\\\t\\\\t[^ self okayToResizeEasily].\\\\n\\\\n\\\\t(#( addRotateHandle: ) includes: aSelector) ifTrue:\\\\n\\\\t\\\\t[^ self okayToRotateEasily].\\\\n\\\\n\\\\t(#(addRecolorHandle:) includes: aSelector) ifTrue:\\\\n\\\\t\\\\t[^ self renderedMorph wantsRecolorHandle].\\\\n\\\\n\\\\ttrue ifTrue: [^ true]\\\\n\\\\t! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 10/9/2000 16:56'!\\\\nwantsScriptorHaloHandle\\\\n\\\\t\\\\\\\"Answer whether the receiver would like to have a Scriptor halo handle put up on its behalf.  Initially, only the ScriptableButton says yes\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'nk 6/12/2004 09:32'!\\\\nwantsSimpleSketchMorphHandles\\\\n\\\\t\\\\\\\"Answer true if my halo's simple handles should include the simple sketch morph handles.\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:00'!\\\\nbasicInitialize\\\\n\\\\t\\\\\\\"Do basic generic initialization of the instance variables:  \\\\n\\\\tSet up the receiver, created by a #basicNew and now ready to  \\\\n\\\\tbe initialized, by placing initial values in the instance variables  \\\\n\\\\tas appropriate\\\\\\\"\\\\nowner _ nil.\\\\n\\\\tsubmorphs _ EmptyArray.\\\\n\\\\tbounds _ self defaultBounds.\\\\n\\\\t\\\\n\\\\tcolor _ self defaultColor! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'dgd 3/7/2003 15:06'!\\\\ndefaultBounds\\\\n\\\\\\\"answer the default bounds for the receiver\\\\\\\"\\\\n\\\\t^ 0 @ 0 corner: 50 @ 40! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:28'!\\\\ndefaultColor\\\\n\\\\t\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color blue! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'fbs 1/5/2005 09:17'!\\\\ninAScrollPane\\\\n\\\\t\\\\\\\"Answer a scroll pane that allows the user to scroll the receiver in either direction.  It will have permanent scroll bars unless you take some special action.\\\\\\\"\\\\n\\\\n\\\\t| widget |\\\\n\\\\twidget _ ScrollPane new.\\\\n\\\\twidget extent: ((self width min: 300 max: 100) @ (self height min: 150 max: 100));\\\\n\\\\t\\\\tborderWidth: 0.\\\\n\\\\twidget scroller addMorph: self.\\\\n\\\\twidget setScrollDeltas.\\\\n\\\\twidget color: self color darker darker.\\\\n\\\\t^ widget! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'sw 6/26/2001 10:56'!\\\\ninATwoWayScrollPane\\\\n\\\\t\\\\\\\"Answer a two-way scroll pane that allows the user to scroll the receiver in either direction.  It will have permanent scroll bars unless you take some special action.\\\\\\\"\\\\n\\\\n\\\\t| widget |\\\\n\\\\twidget _ TwoWayScrollPane new.\\\\n\\\\twidget extent: ((self width min: 300 max: 100) @ (self height min: 150 max: 100));\\\\n\\\\t\\\\tborderWidth: 0.\\\\n\\\\twidget scroller addMorph: self.\\\\n\\\\twidget setScrollDeltas.\\\\n\\\\twidget color: self color darker darker.\\\\n\\\\t^ widget! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 17:30'!\\\\ninitialize\\\\n\\\\t\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\nowner _ nil.\\\\n\\\\tsubmorphs _ EmptyArray.\\\\n\\\\tbounds _ self defaultBounds.\\\\n\\\\t\\\\n\\\\tcolor _ self defaultColor! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'ar 1/31/2001 13:57'!\\\\nintoWorld: aWorld\\\\n\\\\t\\\\\\\"The receiver has just appeared in a new world. Note:\\\\n\\\\t\\\\t* aWorld can be nil (due to optimizations in other places)\\\\n\\\\t\\\\t* owner is already set\\\\n\\\\t\\\\t* owner's submorphs may not include receiver yet.\\\\n\\\\tImportant: Keep this method fast - it is run whenever morphs are added.\\\\\\\"\\\\n\\\\taWorld ifNil:[^self].\\\\n\\\\tself wantsSteps ifTrue:[aWorld startStepping: self].\\\\n\\\\tself submorphsDo:[:m| m intoWorld: aWorld].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'RAA 10/18/2000 12:33'!\\\\nopenCenteredInWorld\\\\n\\\\n\\\\tself \\\\n\\\\t\\\\tfullBounds;\\\\n\\\\t\\\\tposition: Display extent - self extent // 2;\\\\n\\\\t\\\\topenInWorld.! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'sw 3/21/2000 14:46'!\\\\nopenInHand\\\\n\\\\t\\\\\\\"Attach the receiver to the current hand in the current morphic world\\\\\\\"\\\\n\\\\n\\\\tself currentHand attachMorph: self! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'jm 7/5/1998 12:40'!\\\\nopenInMVC\\\\n\\\\n\\\\tMorphWorldView\\\\n\\\\t\\\\topenWorldWith: self\\\\n\\\\t\\\\tlabelled: self defaultLabelForInspector.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'djp 10/24/1999 17:13'!\\\\nopenInWindow\\\\n\\\\n\\\\t^self openInWindowLabeled: self defaultLabelForInspector\\\\n! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'sma 4/22/2000 20:28'!\\\\nopenInWindowLabeled: aString\\\\n\\\\n\\\\t^self openInWindowLabeled: aString inWorld: self currentWorld! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'RAA 5/25/2000 08:12'!\\\\nopenInWindowLabeled: aString inWorld: aWorld\\\\n\\\\n\\\\t| window extent |\\\\n\\\\n\\\\twindow _ (SystemWindow labelled: aString) model: nil.\\\\n\\\\twindow \\\\n\\\\t\\\\t\\\\\\\" guess at initial extent\\\\\\\"\\\\n\\\\t\\\\tbounds:  (RealEstateAgent initialFrameFor: window initialExtent: self fullBounds extent world: aWorld);\\\\n\\\\t\\\\taddMorph: self frame: (0@0 extent: 1@1);\\\\n\\\\t\\\\tupdatePaneColors.\\\\n\\\\t\\\\\\\" calculate extent after adding in case any size related attributes were changed.  Use\\\\n\\\\tfullBounds in order to trigger re-layout of layout morphs\\\\\\\"\\\\n\\\\textent _ self fullBounds extent + \\\\n\\\\t\\\\t\\\\t(window borderWidth@window labelHeight) + window borderWidth.\\\\n\\\\twindow extent: extent.\\\\n\\\\taWorld addMorph: window.\\\\n\\\\twindow activate.\\\\n\\\\taWorld startSteppingSubmorphsOf: window.\\\\n\\\\t^window\\\\n! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'RAA 6/14/2000 18:09'!\\\\nopenInWorld\\\\n        \\\\\\\"Add this morph to the world.  If in MVC, then provide a Morphic window for it.\\\\\\\"\\\\n\\\\n        self couldOpenInMorphic\\\\n                ifTrue: [self openInWorld: self currentWorld]\\\\n                ifFalse: [self openInMVC]! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'dgd 9/1/2004 16:12'!\\\\nopenInWorld: aWorld\\\\n\\\\t\\\\\\\"Add this morph to the requested World.\\\\\\\"\\\\n\\\\t(aWorld visibleClearArea origin ~= (0@0) and: [self position = (0@0)]) ifTrue:\\\\n\\\\t\\\\t[self position: aWorld visibleClearArea origin].\\\\n\\\\taWorld addMorph: self.\\\\n\\\\taWorld startSteppingSubmorphsOf: self! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'ar 1/31/2001 13:58'!\\\\noutOfWorld: aWorld\\\\n\\\\t\\\\\\\"The receiver has just appeared in a new world. Notes:\\\\n\\\\t\\\\t* aWorld can be nil (due to optimizations in other places)\\\\n\\\\t\\\\t* owner is still valid\\\\n\\\\tImportant: Keep this method fast - it is run whenever morphs are removed.\\\\\\\"\\\\n\\\\taWorld ifNil:[^self].\\\\n\\\\t\\\\\\\"ar 1/31/2001: We could explicitly stop stepping the receiver here but for the sake of speed I'm for now relying on the lazy machinery in the world itself.\\\\\\\"\\\\n\\\\t\\\\\\\"aWorld stopStepping: self.\\\\\\\"\\\\n\\\\tself submorphsDo:[:m| m outOfWorld: aWorld].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'ar 3/3/2001 15:28'!\\\\nresourceJustLoaded\\\\n\\\\t\\\\\\\"In case resource relates to me\\\\\\\"\\\\n\\\\tself releaseCachedState.! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'sw 9/11/1998 11:13'!\\\\nstandardPalette\\\\n\\\\t\\\\\\\"Answer a standard palette forced by some level of enclosing presenter, or nil if none\\\\\\\"\\\\n\\\\t| pal aPresenter itsOwner |\\\\n\\\\t(aPresenter _ self presenter) ifNil: [^ nil].\\\\n\\\\t^ (pal _ aPresenter ownStandardPalette)\\\\n\\\\t\\\\tifNotNil: [pal]\\\\n\\\\t\\\\tifNil:\\\\t[(itsOwner _ aPresenter associatedMorph owner)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[itsOwner standardPalette]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifNil:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[nil]]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'latter day support' stamp: 'sw 1/6/2005 01:26'!\\\\nisEtoyReadout\\\\n\\\\t\\\\\\\"Answer whether the receiver can serve as an etoy readout\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!Morph methodsFor: 'layout' stamp: 'ar 11/12/2000 17:33'!\\\\nacceptDroppingMorph: aMorph event: evt\\\\n\\\\t\\\\\\\"This message is sent when a morph is dropped onto a morph that has agreed to accept the dropped morph by responding 'true' to the wantsDroppedMorph:Event: message. This default implementation just adds the given morph to the receiver.\\\\\\\"\\\\n\\\\t| layout |\\\\n\\\\tlayout _ self layoutPolicy.\\\\n\\\\tlayout ifNil:[^self addMorph: aMorph].\\\\n\\\\tself privateAddMorph: aMorph \\\\n\\\\t\\\\tatIndex: (layout indexForInserting: aMorph at: evt position in: self).! !\\\\n\\\\n!Morph methodsFor: 'layout' stamp: 'ar 11/12/2000 17:34'!\\\\nadjustLayoutBounds\\\\n\\\\t\\\\\\\"Adjust the receivers bounds depending on the resizing strategy imposed\\\\\\\"\\\\n\\\\t| hFit vFit box myExtent extent |\\\\n\\\\thFit _ self hResizing.\\\\n\\\\tvFit _ self vResizing.\\\\n\\\\t(hFit == #shrinkWrap or:[vFit == #shrinkWrap]) ifFalse:[^self]. \\\\\\\"not needed\\\\\\\"\\\\n\\\\tbox _ self layoutBounds.\\\\n\\\\tmyExtent _ box extent.\\\\n\\\\textent _ self submorphBounds corner - box origin.\\\\n\\\\thFit == #shrinkWrap ifTrue:[myExtent _ extent x @ myExtent y].\\\\n\\\\tvFit == #shrinkWrap ifTrue:[myExtent _ myExtent x @ extent y].\\\\n\\\\t\\\\\\\"Make sure we don't get smaller than minWidth/minHeight\\\\\\\"\\\\n\\\\tmyExtent x < self minWidth ifTrue:[\\\\n\\\\t\\\\tmyExtent _ (myExtent x max: \\\\n\\\\t\\\\t\\\\t(self minWidth - self bounds width + self layoutBounds width)) @ myExtent y].\\\\n\\\\tmyExtent y < self minHeight ifTrue:[\\\\n\\\\t\\\\tmyExtent _ myExtent x @ (myExtent y max:\\\\n\\\\t\\\\t\\\\t(self minHeight - self bounds height + self layoutBounds height))].\\\\n\\\\tself layoutBounds: (box origin extent: myExtent).! !\\\\n\\\\n!Morph methodsFor: 'layout' stamp: 'dgd 2/22/2003 14:31'!\\\\ndoLayoutIn: layoutBounds \\\\n\\\\t\\\\\\\"Compute a new layout based on the given layout bounds.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Note: Testing for #bounds or #layoutBounds would be sufficient to\\\\n\\\\tfigure out if we need an invalidation afterwards but #outerBounds\\\\n\\\\tis what we need for all leaf nodes so we use that.\\\\\\\"\\\\n\\\\n\\\\t| layout box priorBounds |\\\\n\\\\tpriorBounds := self outerBounds.\\\\n\\\\tsubmorphs isEmpty ifTrue: [^fullBounds := priorBounds].\\\\n\\\\t\\\\\\\"Send #ownerChanged to our children\\\\\\\"\\\\n\\\\tsubmorphs do: [:m | m ownerChanged].\\\\n\\\\tlayout := self layoutPolicy.\\\\n\\\\tlayout ifNotNil: [layout layout: self in: layoutBounds].\\\\n\\\\tself adjustLayoutBounds.\\\\n\\\\tfullBounds := self privateFullBounds.\\\\n\\\\tbox := self outerBounds.\\\\n\\\\tbox = priorBounds \\\\n\\\\t\\\\tifFalse: [self invalidRect: (priorBounds quickMerge: box)]! !\\\\n\\\\n!Morph methodsFor: 'layout' stamp: 'ar 1/1/2002 20:00'!\\\\nfullBounds\\\\n\\\\t\\\\\\\"Return the bounding box of the receiver and all its children. Recompute the layout if necessary.\\\\\\\"\\\\n\\\\tfullBounds ifNotNil:[^fullBounds].\\\\n\\\\t\\\\\\\"Errors at this point can be critical so make sure we catch 'em all right\\\\\\\"\\\\n\\\\t[self doLayoutIn: self layoutBounds] on: Error do:[:ex|\\\\n\\\\t\\\\t\\\\\\\"This should do it unless you don't screw up the bounds\\\\\\\"\\\\n\\\\t\\\\tfullBounds _ bounds.\\\\n\\\\t\\\\tex pass].\\\\n\\\\t^fullBounds! !\\\\n\\\\n!Morph methodsFor: 'layout' stamp: 'ar 11/12/2000 23:10'!\\\\nlayoutBounds\\\\n\\\\t\\\\\\\"Return the bounds for laying out children of the receiver\\\\\\\"\\\\n\\\\t| inset box |\\\\n\\\\tinset _ self layoutInset.\\\\n\\\\tbox _ self innerBounds.\\\\n\\\\tinset isZero ifTrue:[^box].\\\\n\\\\t^box insetBy: inset.! !\\\\n\\\\n!Morph methodsFor: 'layout' stamp: 'ar 10/31/2000 21:09'!\\\\nlayoutBounds: aRectangle\\\\n\\\\t\\\\\\\"Set the bounds for laying out children of the receiver.\\\\n\\\\tNote: written so that #layoutBounds can be changed without touching this method\\\\\\\"\\\\n\\\\t| outer inner |\\\\n\\\\touter _ self bounds.\\\\n\\\\tinner _ self layoutBounds.\\\\n\\\\tbounds _ aRectangle origin + (outer origin - inner origin) corner:\\\\n\\\\t\\\\t\\\\t\\\\taRectangle corner + (outer corner - inner corner).! !\\\\n\\\\n!Morph methodsFor: 'layout' stamp: 'ar 1/27/2001 14:41'!\\\\nlayoutChanged\\\\n\\\\t| layout |\\\\n\\\\tfullBounds ifNil:[^self]. \\\\\\\"layout will be recomputed so don't bother\\\\\\\"\\\\n\\\\tfullBounds _ nil.\\\\n\\\\tlayout _ self layoutPolicy.\\\\n\\\\tlayout ifNotNil:[layout flushLayoutCache].\\\\n\\\\towner ifNotNil: [owner layoutChanged].\\\\n\\\\t\\\\\\\"note: does not send #ownerChanged here - we'll do this when computing the new layout\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'layout' stamp: 'ar 8/6/2001 09:55'!\\\\nlayoutInBounds: cellBounds\\\\n\\\\t\\\\\\\"Layout specific. Apply the given bounds to the receiver after being layed out in its owner.\\\\\\\"\\\\n\\\\t| box aSymbol delta |\\\\n\\\\tfullBounds ifNil:[\\\\\\\"We are getting new bounds here but we haven't computed the receiver's layout yet. Although the receiver has reported its minimal size before the actual size it has may differ from what would be after the layout. Normally, this isn't a real problem, but if we have #shrinkWrap constraints then the receiver's bounds may be larger than the cellBounds. THAT is a problem because the centering may not work correctly if the receiver shrinks after the owner layout has been computed. To avoid this problem, we compute the receiver's layout now. Note that the layout computation is based on the new cell bounds rather than the receiver's current bounds.\\\\\\\"\\\\n\\\\t\\\\tcellBounds origin = self bounds origin ifFalse:[\\\\n\\\\t\\\\t\\\\tbox _ self outerBounds.\\\\n\\\\t\\\\t\\\\tdelta _ cellBounds origin - self bounds origin.\\\\n\\\\t\\\\t\\\\tself invalidRect: (box merge: (box translateBy: delta)).\\\\n\\\\t\\\\t\\\\tself privateFullMoveBy: delta]. \\\\\\\"sigh...\\\\\\\"\\\\n\\\\t\\\\tbox _ cellBounds origin extent: \\\\\\\"adjust for #rigid receiver\\\\\\\"\\\\n\\\\t\\\\t\\\\t(self hResizing == #rigid ifTrue:[self bounds extent x] ifFalse:[cellBounds extent x]) @\\\\n\\\\t\\\\t\\\\t(self vResizing == #rigid ifTrue:[self bounds extent y] ifFalse:[cellBounds extent y]).\\\\n\\\\t\\\\t\\\\\\\"Compute inset of layout bounds\\\\\\\"\\\\n\\\\t\\\\tbox _ box origin - (self bounds origin - self layoutBounds origin) corner:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbox corner - (self bounds corner - self layoutBounds corner).\\\\n\\\\t\\\\t\\\\\\\"And do the layout within the new bounds\\\\\\\"\\\\n\\\\t\\\\tself layoutBounds: box.\\\\n\\\\t\\\\tself doLayoutIn: box].\\\\n\\\\tcellBounds = self fullBounds ifTrue:[^self]. \\\\\\\"already up to date\\\\\\\"\\\\n\\\\tcellBounds extent = self fullBounds extent \\\\\\\"nice fit\\\\\\\"\\\\n\\\\t\\\\tifTrue:[^self position: cellBounds origin].\\\\n\\\\tbox _ bounds.\\\\n\\\\t\\\\\\\"match #spaceFill constraints\\\\\\\"\\\\n\\\\tself hResizing == #spaceFill \\\\n\\\\t\\\\tifTrue:[box _ box origin extent: cellBounds width @ box height].\\\\n\\\\tself vResizing == #spaceFill\\\\n\\\\t\\\\tifTrue:[box _ box origin extent: box width @ cellBounds height].\\\\n\\\\t\\\\\\\"align accordingly\\\\\\\"\\\\n\\\\taSymbol _ (owner ifNil:[self]) cellPositioning.\\\\n\\\\tbox _ box align: (box perform: aSymbol) with: (cellBounds perform: aSymbol).\\\\n\\\\t\\\\\\\"and install new bounds\\\\\\\"\\\\n\\\\tself bounds: box.! !\\\\n\\\\n!Morph methodsFor: 'layout' stamp: 'ar 11/12/2000 17:35'!\\\\nlayoutProportionallyIn: newBounds\\\\n\\\\t\\\\\\\"Layout specific. Apply the given bounds to the receiver.\\\\\\\"\\\\n\\\\t| box frame |\\\\n\\\\tframe _ self layoutFrame ifNil:[^self].\\\\n\\\\t\\\\\\\"before applying the proportional values make sure the receiver's layout is computed\\\\\\\"\\\\n\\\\tself fullBounds. \\\\\\\"sigh...\\\\\\\"\\\\n\\\\t\\\\\\\"compute the cell size the receiver has given its layout frame\\\\\\\"\\\\n\\\\tbox _ frame layout: self bounds in: newBounds.\\\\n\\\\t(box = self bounds) ifTrue:[^self]. \\\\\\\"no change\\\\\\\"\\\\n\\\\t^self layoutInBounds: box.! !\\\\n\\\\n!Morph methodsFor: 'layout' stamp: 'dgd 2/22/2003 14:32'!\\\\nminExtent\\\\n\\\\t\\\\\\\"Layout specific. Return the minimum size the receiver can be represented in.\\\\n\\\\tImplementation note: When this message is sent from an owner trying to lay out its children it will traverse down the morph tree and recompute the minimal arrangement of the morphs based on which the minimal extent is returned. When a morph with some layout strategy is encountered, the morph will ask its strategy to compute the new arrangement. However, since the final size given to the receiver is unknown at the point of the query, the assumption is made that the current bounds of the receiver are the base on which the layout should be computed. This scheme prevents strange layout changes when for instance, a table is contained in another table. Unless the inner table has been resized manually (which means its bounds are already enlarged) the arrangement of the inner table will not change here. Thus the entire layout computation is basically an iterative process which may have different results depending on the incremental changes applied.\\\\\\\"\\\\n\\\\n\\\\t| layout minExtent extra hFit vFit |\\\\n\\\\thFit := self hResizing.\\\\n\\\\tvFit := self vResizing.\\\\n\\\\t(hFit == #spaceFill or: [vFit == #spaceFill]) \\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"The receiver will not adjust to parents layout by growing or shrinking,\\\\n\\\\t\\\\twhich means that an accurate layout defines the minimum size.\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t^self fullBounds extent].\\\\n\\\\n\\\\t\\\\\\\"An exception -- a receiver with #shrinkWrap constraints but no children is being treated #rigid (the equivalent to a #spaceFill receiver in a non-layouting owner)\\\\\\\"\\\\n\\\\tself hasSubmorphs \\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[hFit == #shrinkWrap ifTrue: [hFit := #rigid].\\\\n\\\\t\\\\t\\\\tvFit == #shrinkWrap ifTrue: [vFit := #rigid]].\\\\n\\\\tlayout := self layoutPolicy.\\\\n\\\\tlayout isNil \\\\n\\\\t\\\\tifTrue: [minExtent := 0 @ 0]\\\\n\\\\t\\\\tifFalse: [minExtent := layout minExtentOf: self in: self layoutBounds].\\\\n\\\\thFit == #rigid \\\\n\\\\t\\\\tifTrue: [minExtent := self fullBounds extent x @ minExtent y]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[extra := self bounds width - self layoutBounds width.\\\\n\\\\t\\\\t\\\\tminExtent := (minExtent x + extra) @ minExtent y].\\\\n\\\\tminExtent := vFit == #rigid \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [minExtent x @ self fullBounds extent y]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[extra := self bounds height - self layoutBounds height.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tminExtent x @ (minExtent y + extra)].\\\\n\\\\tminExtent := minExtent max: self minWidth @ self minHeight.\\\\n\\\\t^minExtent! !\\\\n\\\\n!Morph methodsFor: 'layout' stamp: 'dgd 2/16/2003 21:52'!\\\\nminHeight\\\\n\\\\t\\\\\\\"answer the receiver's minHeight\\\\\\\"\\\\n\\\\t^ self\\\\n\\\\t\\\\tvalueOfProperty: #minHeight\\\\n\\\\t\\\\tifAbsent: [2]! !\\\\n\\\\n!Morph methodsFor: 'layout' stamp: 'dgd 2/22/2003 14:32'!\\\\nminHeight: aNumber \\\\n\\\\taNumber isNil \\\\n\\\\t\\\\tifTrue: [self removeProperty: #minHeight]\\\\n\\\\t\\\\tifFalse: [self setProperty: #minHeight toValue: aNumber].\\\\n\\\\tself layoutChanged! !\\\\n\\\\n!Morph methodsFor: 'layout' stamp: 'dgd 2/16/2003 21:54'!\\\\nminWidth\\\\n\\\\t\\\\\\\"answer the receiver's minWidth\\\\\\\"\\\\n\\\\t^ self\\\\n\\\\t\\\\tvalueOfProperty: #minWidth\\\\n\\\\t\\\\tifAbsent: [2]! !\\\\n\\\\n!Morph methodsFor: 'layout' stamp: 'dgd 2/22/2003 14:32'!\\\\nminWidth: aNumber \\\\n\\\\taNumber isNil \\\\n\\\\t\\\\tifTrue: [self removeProperty: #minWidth]\\\\n\\\\t\\\\tifFalse: [self setProperty: #minWidth toValue: aNumber].\\\\n\\\\tself layoutChanged! !\\\\n\\\\n!Morph methodsFor: 'layout' stamp: 'dgd 2/22/2003 14:33'!\\\\nprivateFullBounds\\\\n\\\\t\\\\\\\"Private. Compute the actual full bounds of the receiver\\\\\\\"\\\\n\\\\n\\\\t| box |\\\\n\\\\tsubmorphs isEmpty ifTrue: [^self outerBounds].\\\\n\\\\tbox := self outerBounds copy.\\\\n\\\\tbox := box quickMerge: (self clipSubmorphs \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self submorphBounds intersect: self clippingBounds]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [self submorphBounds]).\\\\n\\\\t^box origin asIntegerPoint corner: box corner asIntegerPoint! !\\\\n\\\\n!Morph methodsFor: 'layout' stamp: 'ar 11/2/2000 17:42'!\\\\nsubmorphBounds\\\\n\\\\t\\\\\\\"Private. Compute the actual full bounds of the receiver\\\\\\\"\\\\n\\\\t| box subBox |\\\\n\\\\tsubmorphs do: [:m | \\\\n\\\\t\\\\t(m visible) ifTrue: [\\\\n\\\\t\\\\t\\\\tsubBox _ m fullBounds.\\\\n\\\\t\\\\t\\\\tbox \\\\n\\\\t\\\\t\\\\t\\\\tifNil:[box _ subBox copy]\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil:[box _ box quickMerge: subBox]]].\\\\n\\\\tbox ifNil:[^self bounds]. \\\\\\\"e.g., having submorphs but not visible\\\\\\\"\\\\n\\\\t^ box origin asIntegerPoint corner: box corner asIntegerPoint\\\\n! !\\\\n\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'dgd 8/30/2003 16:57'!\\\\naddCellLayoutMenuItems: aMenu hand: aHand\\\\n\\\\t\\\\\\\"Cell (e.g., child) related items\\\\\\\"\\\\n\\\\t| menu sub |\\\\n\\\\tmenu _ MenuMorph new defaultTarget: self.\\\\n\\\\t\\\\tmenu addUpdating: #hasDisableTableLayoutString action: #changeDisableTableLayout.\\\\n\\\\t\\\\tmenu addLine.\\\\n\\\\n\\\\t\\\\tsub _ MenuMorph new defaultTarget: self.\\\\n\\\\t\\\\t#(rigid shrinkWrap spaceFill) do:[:sym|\\\\n\\\\t\\\\t\\\\tsub addUpdating: #hResizingString: target: self selector: #hResizing: argumentList: (Array with: sym)].\\\\n\\\\t\\\\tmenu add:'horizontal resizing' translated subMenu: sub.\\\\n\\\\n\\\\t\\\\tsub _ MenuMorph new defaultTarget: self.\\\\n\\\\t\\\\t#(rigid shrinkWrap spaceFill) do:[:sym|\\\\n\\\\t\\\\t\\\\tsub addUpdating: #vResizingString: target: self selector: #vResizing: argumentList: (Array with: sym)].\\\\n\\\\t\\\\tmenu add:'vertical resizing' translated subMenu: sub.\\\\n\\\\n\\\\taMenu ifNotNil:[aMenu add: 'child layout' translated subMenu: menu].\\\\n\\\\t^menu! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'dgd 8/30/2003 16:51'!\\\\naddLayoutMenuItems: topMenu hand: aHand\\\\n\\\\t| aMenu |\\\\n\\\\taMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\taMenu addUpdating: #hasNoLayoutString action: #changeNoLayout.\\\\n\\\\taMenu addUpdating: #hasProportionalLayoutString action: #changeProportionalLayout.\\\\n\\\\taMenu addUpdating: #hasTableLayoutString action: #changeTableLayout.\\\\n\\\\taMenu addLine.\\\\n\\\\taMenu add: 'change layout inset...' translated action: #changeLayoutInset:.\\\\n\\\\taMenu addLine.\\\\n\\\\tself addCellLayoutMenuItems: aMenu hand: aHand.\\\\n\\\\tself addTableLayoutMenuItems: aMenu hand: aHand.\\\\n\\\\ttopMenu ifNotNil:[topMenu add: 'layout' translated subMenu: aMenu].\\\\n\\\\t^aMenu! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'dgd 8/30/2003 20:07'!\\\\naddTableLayoutMenuItems: aMenu hand: aHand\\\\n\\\\t| menu sub |\\\\n\\\\tmenu _ MenuMorph new defaultTarget: self.\\\\n\\\\tmenu addUpdating: #hasReverseCellsString action: #changeReverseCells.\\\\n\\\\tmenu addUpdating: #hasClipLayoutCellsString action: #changeClipLayoutCells.\\\\n\\\\tmenu addUpdating: #hasRubberBandCellsString action: #changeRubberBandCells.\\\\n\\\\tmenu addLine.\\\\n\\\\tmenu add: 'change cell inset...' translated action: #changeCellInset:.\\\\n\\\\tmenu add: 'change min cell size...' translated action: #changeMinCellSize:.\\\\n\\\\tmenu add: 'change max cell size...' translated action: #changeMaxCellSize:.\\\\n\\\\tmenu addLine.\\\\n\\\\n\\\\tsub _ MenuMorph new defaultTarget: self.\\\\n\\\\t#(leftToRight rightToLeft topToBottom bottomToTop) do:[:sym|\\\\n\\\\t\\\\tsub addUpdating: #listDirectionString: target: self selector: #changeListDirection: argumentList: (Array with: sym)].\\\\n\\\\tmenu add: 'list direction' translated subMenu: sub.\\\\n\\\\n\\\\tsub _ MenuMorph new defaultTarget: self.\\\\n\\\\t#(none leftToRight rightToLeft topToBottom bottomToTop) do:[:sym|\\\\n\\\\t\\\\tsub addUpdating: #wrapDirectionString: target: self selector: #wrapDirection: argumentList: (Array with: sym)].\\\\n\\\\tmenu add: 'wrap direction' translated subMenu: sub.\\\\n\\\\n\\\\tsub _ MenuMorph new defaultTarget: self.\\\\n\\\\t#(center topLeft topRight bottomLeft bottomRight topCenter leftCenter rightCenter bottomCenter) do:[:sym|\\\\n\\\\t\\\\tsub addUpdating: #cellPositioningString: target: self selector: #cellPositioning: argumentList: (Array with: sym)].\\\\n\\\\tmenu add: 'cell positioning' translated subMenu: sub.\\\\n\\\\n\\\\tsub _ MenuMorph new defaultTarget: self.\\\\n\\\\t#(topLeft bottomRight center justified) do:[:sym|\\\\n\\\\t\\\\tsub addUpdating: #listCenteringString: target: self selector: #listCentering: argumentList: (Array with: sym)].\\\\n\\\\tmenu add: 'list centering' translated subMenu: sub.\\\\n\\\\n\\\\tsub _ MenuMorph new defaultTarget: self.\\\\n\\\\t#(topLeft bottomRight center justified) do:[:sym|\\\\n\\\\t\\\\tsub addUpdating: #wrapCenteringString: target: self selector: #wrapCentering: argumentList: (Array with: sym)].\\\\n\\\\tmenu add: 'wrap centering' translated subMenu: sub.\\\\n\\\\n\\\\tsub _ MenuMorph new defaultTarget: self.\\\\n\\\\t#(none equal) do:[:sym|\\\\n\\\\t\\\\tsub addUpdating: #listSpacingString: target: self selector: #listSpacing: argumentList: (Array with: sym)].\\\\n\\\\tmenu add: 'list spacing' translated subMenu: sub.\\\\n\\\\n\\\\tsub _ MenuMorph new defaultTarget: self.\\\\n\\\\t#(none localRect localSquare globalRect globalSquare) do:[:sym|\\\\n\\\\t\\\\tsub addUpdating: #cellSpacingString: target: self selector: #cellSpacing: argumentList: (Array with: sym)].\\\\n\\\\tmenu add: 'cell spacing' translated subMenu: sub.\\\\n\\\\n\\\\taMenu ifNotNil:[aMenu add: 'table layout' translated subMenu: menu].\\\\n\\\\t^menu! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'ar 11/13/2000 19:08'!\\\\nchangeCellInset: evt\\\\n\\\\t| handle |\\\\n\\\\thandle _ HandleMorph new forEachPointDo:[:newPoint |\\\\n\\\\t\\\\tself cellInset: (newPoint - evt cursorPoint) asIntegerPoint // 5].\\\\n\\\\tevt hand attachMorph: handle.\\\\n\\\\thandle startStepping.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'ar 11/13/2000 18:54'!\\\\nchangeClipLayoutCells\\\\n\\\\tself invalidRect: self fullBounds.\\\\n\\\\tself clipLayoutCells: self clipLayoutCells not.\\\\n\\\\tself invalidRect: self fullBounds.! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'ar 10/31/2000 19:19'!\\\\nchangeDisableTableLayout\\\\n\\\\tself disableTableLayout: self disableTableLayout not.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'ar 11/13/2000 19:09'!\\\\nchangeLayoutInset: evt\\\\n\\\\t| handle |\\\\n\\\\thandle _ HandleMorph new forEachPointDo:[:newPoint |\\\\n\\\\t\\\\tself layoutInset: (newPoint - evt cursorPoint) asIntegerPoint // 5].\\\\n\\\\tevt hand attachMorph: handle.\\\\n\\\\thandle startStepping.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'ar 11/13/2000 19:10'!\\\\nchangeListDirection: aSymbol\\\\n\\\\t| listDir wrapDir |\\\\n\\\\tself listDirection: aSymbol.\\\\n\\\\t(self wrapDirection == #none) ifTrue:[^self].\\\\n\\\\t\\\\\\\"otherwise automatically keep a valid table layout\\\\\\\"\\\\n\\\\tlistDir _ self listDirection.\\\\n\\\\twrapDir _ self wrapDirection.\\\\n\\\\t(listDir == #leftToRight or:[listDir == #rightToLeft]) ifTrue:[\\\\n\\\\t\\\\twrapDir == #leftToRight ifTrue:[^self wrapDirection: #topToBottom].\\\\n\\\\t\\\\twrapDir == #rightToLeft ifTrue:[^self wrapDirection: #bottomToTop].\\\\n\\\\t] ifFalse:[\\\\n\\\\t\\\\twrapDir == #topToBottom ifTrue:[^self wrapDirection: #leftToRight].\\\\n\\\\t\\\\twrapDir == #bottomToTop ifTrue:[^self wrapDirection: #rightToLeft].\\\\n\\\\t].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'ar 11/13/2000 19:10'!\\\\nchangeMaxCellSize: evt\\\\n\\\\t| handle |\\\\n\\\\thandle _ HandleMorph new forEachPointDo:[:newPoint |\\\\n\\\\t\\\\tself maxCellSize: (newPoint - evt cursorPoint) asIntegerPoint].\\\\n\\\\tevt hand attachMorph: handle.\\\\n\\\\thandle startStepping.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'ar 11/13/2000 19:10'!\\\\nchangeMinCellSize: evt\\\\n\\\\t| handle |\\\\n\\\\thandle _ HandleMorph new forEachPointDo:[:newPoint |\\\\n\\\\t\\\\tself minCellSize: (newPoint - evt cursorPoint) asIntegerPoint].\\\\n\\\\tevt hand attachMorph: handle.\\\\n\\\\thandle startStepping.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'ar 10/31/2000 19:19'!\\\\nchangeNoLayout\\\\n\\\\tself layoutPolicy ifNil:[^self]. \\\\\\\"already no layout\\\\\\\"\\\\n\\\\tself layoutPolicy: nil.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'ar 10/31/2000 19:19'!\\\\nchangeProportionalLayout\\\\n\\\\t| layout |\\\\n\\\\t((layout _ self layoutPolicy) notNil and:[layout isProportionalLayout])\\\\n\\\\t\\\\tifTrue:[^self]. \\\\\\\"already proportional layout\\\\\\\"\\\\n\\\\tself layoutPolicy: ProportionalLayout new.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'ar 11/13/2000 19:10'!\\\\nchangeReverseCells\\\\n\\\\tself reverseTableCells: self reverseTableCells not.! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'ar 11/13/2000 19:10'!\\\\nchangeRubberBandCells\\\\n\\\\tself rubberBandCells: self rubberBandCells not.! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'ar 10/31/2000 19:20'!\\\\nchangeTableLayout\\\\n\\\\t| layout |\\\\n\\\\t((layout _ self layoutPolicy) notNil and:[layout isTableLayout])\\\\n\\\\t\\\\tifTrue:[^self]. \\\\\\\"already table layout\\\\\\\"\\\\n\\\\tself layoutPolicy: TableLayout new.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'dgd 8/30/2003 20:09'!\\\\nhasClipLayoutCellsString\\\\n\\\\t^ (self clipLayoutCells\\\\n\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\tifFalse: ['<off>']), 'clip to cell size' translated! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'dgd 8/30/2003 16:58'!\\\\nhasDisableTableLayoutString\\\\n\\\\t^ (self disableTableLayout\\\\n\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\tifFalse: ['<off>'])\\\\n\\\\t\\\\t, 'disable layout in tables' translated! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'dgd 10/8/2003 19:23'!\\\\nhasNoLayoutString\\\\n\\\\t^ (self layoutPolicy isNil\\\\n\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\tifFalse: ['<off>'])\\\\n\\\\t\\\\t, 'no layout' translated! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'dgd 8/30/2003 16:55'!\\\\nhasProportionalLayoutString\\\\n\\\\t| layout |\\\\n\\\\t^ (((layout := self layoutPolicy) notNil\\\\n\\\\t\\\\t\\\\tand: [layout isProportionalLayout])\\\\n\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\tifFalse: ['<off>'])\\\\n\\\\t\\\\t, 'proportional layout' translated! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'dgd 8/30/2003 20:08'!\\\\nhasReverseCellsString\\\\n\\\\t^ (self reverseTableCells\\\\n\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\tifFalse: ['<off>']), 'reverse table cells' translated! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'dgd 8/30/2003 20:09'!\\\\nhasRubberBandCellsString\\\\n\\\\t^ (self rubberBandCells\\\\n\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\tifFalse: ['<off>']), 'rubber band cells' translated! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'dgd 8/30/2003 16:59'!\\\\nhasTableLayoutString\\\\n\\\\t| layout |\\\\n\\\\t^ (((layout := self layoutPolicy) notNil\\\\n\\\\t\\\\t\\\\tand: [layout isTableLayout])\\\\n\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\tifFalse: ['<off>'])\\\\n\\\\t\\\\t, 'table layout' translated! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'dgd 10/19/2003 11:23'!\\\\nlayoutMenuPropertyString: aSymbol from: currentSetting \\\\n\\\\t| onOff wording |\\\\n\\\\tonOff := aSymbol == currentSetting\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: ['<off>'].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\twording := String\\\\n\\\\t\\\\t\\\\t\\\\tstreamContents: [:stream | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t| index | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tindex := 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\taSymbol\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tkeysAndValuesDo: [:idx :ch | ch isUppercase\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"\\\\\\\"stream nextPutAll: (aSymbol copyFrom: index to: idx - 1) asLowercase.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstream nextPutAll: ' '.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tindex := idx]].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tindex < aSymbol size\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [stream nextPutAll: (aSymbol copyFrom: index to: aSymbol size) asLowercase]].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t^ onOff , wording translated! !\\\\n\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/14/2000 17:56'!\\\\nassureLayoutProperties\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\tprops == self ifTrue:[props _ nil].\\\\n\\\\tprops ifNil:[\\\\n\\\\t\\\\tprops _ LayoutProperties new initializeFrom: self.\\\\n\\\\t\\\\tself layoutProperties: props].\\\\n\\\\t^props! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/14/2000 17:57'!\\\\nassureTableProperties\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\tprops == self ifTrue:[props _ nil].\\\\n\\\\tprops ifNil:[\\\\n\\\\t\\\\tprops _ TableLayoutProperties new initializeFrom: self.\\\\n\\\\t\\\\tself layoutProperties: props].\\\\n\\\\tprops includesTableProperties \\\\n\\\\t\\\\tifFalse:[self layoutProperties: (props _ props asTableLayoutProperties)].\\\\n\\\\t^props! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 19:54'!\\\\ncellInset\\\\n\\\\t\\\\\\\"Layout specific. This property specifies an extra inset for each cell in the layout.\\\\\\\"\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\t^props ifNil:[0] ifNotNil:[props cellInset].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 19:54'!\\\\ncellInset: aNumber\\\\n\\\\t\\\\\\\"Layout specific. This property specifies an extra inset for each cell in the layout.\\\\\\\"\\\\n\\\\tself assureTableProperties cellInset: aNumber.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 19:54'!\\\\ncellPositioning\\\\n\\\\t\\\\\\\"Layout specific. This property describes how the receiver should be layed out in its owner when the bounds of the cell assigned to the receiver do not exactly match its bounds. Possible values are:\\\\n\\\\t\\\\t#topLeft, #topRight, #bottomLeft, #bottomRight, #topCenter, #leftCenter, #rightCenter, #bottomCenter, #center \\\\n\\\\twhich align the receiver's bounds with the cell at the given point.\\\\\\\"\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\t^props ifNil:[#center] ifNotNil:[props cellPositioning].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 10/29/2000 02:48'!\\\\ncellPositioningString: aSymbol\\\\n\\\\t^self layoutMenuPropertyString: aSymbol from: self cellPositioning! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/14/2000 17:39'!\\\\ncellPositioning: aSymbol\\\\n\\\\t\\\\\\\"Layout specific. This property describes how the receiver should be layed out in its owner when the bounds of the cell assigned to the receiver do not exactly match its bounds. Possible values are:\\\\n\\\\t\\\\t#topLeft, #topRight, #bottomLeft, #bottomRight, #topCenter, #leftCenter, #rightCenter, #bottomCenter, #center \\\\n\\\\twhich align the receiver's bounds with the cell at the given point.\\\\\\\"\\\\n\\\\tself assureTableProperties cellPositioning: aSymbol.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 19:55'!\\\\ncellSpacing\\\\n\\\\t\\\\\\\"Layout specific. This property describes how the cell size for each element in a list should be computed.\\\\n\\\\t\\\\t#globalRect - globally equal rectangular cells\\\\n\\\\t\\\\t#globalSquare - globally equal square cells\\\\n\\\\t\\\\t#localRect - locally (e.g., per row/column) equal rectangular cells\\\\n\\\\t\\\\t#localSquare - locally (e.g., per row/column) equal square cells\\\\n\\\\t\\\\t#none - cells are sized based on available row/column constraints\\\\n\\\\t\\\\\\\"\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\t^props ifNil:[#none] ifNotNil:[props cellSpacing].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 10/29/2000 02:47'!\\\\ncellSpacingString: aSymbol\\\\n\\\\t^self layoutMenuPropertyString: aSymbol from: self cellSpacing! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 19:56'!\\\\ncellSpacing: aSymbol\\\\n\\\\t\\\\\\\"Layout specific. This property describes how the cell size for each element in a list should be computed.\\\\n\\\\t\\\\t#globalRect - globally equal rectangular cells\\\\n\\\\t\\\\t#globalSquare - globally equal square cells\\\\n\\\\t\\\\t#localRect - locally (e.g., per row/column) equal rectangular cells\\\\n\\\\t\\\\t#localSquare - locally (e.g., per row/column) equal square cells\\\\n\\\\t\\\\t#none - cells are sized based on available row/column constraints\\\\n\\\\t\\\\\\\"\\\\n\\\\tself assureTableProperties cellSpacing: aSymbol.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 19:56'!\\\\ndisableTableLayout\\\\n\\\\t\\\\\\\"Layout specific. Disable laying out the receiver in table layout\\\\\\\"\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\t^props ifNil:[false] ifNotNil:[props disableTableLayout].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:06'!\\\\ndisableTableLayout: aBool\\\\n\\\\t\\\\\\\"Layout specific. Disable laying out the receiver in table layout\\\\\\\"\\\\n\\\\tself assureLayoutProperties disableTableLayout: aBool.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 19:57'!\\\\nhResizing\\\\n\\\\t\\\\\\\"Layout specific. This property describes how the receiver should be resized with respect to its owner and its children. Possible values are:\\\\n\\\\t\\\\t#rigid\\\\t\\\\t\\\\t-\\\\tdo not resize the receiver\\\\n\\\\t\\\\t#spaceFill\\\\t\\\\t-\\\\tresize to fill owner's available space\\\\n\\\\t\\\\t#shrinkWrap\\\\t- resize to fit children\\\\n\\\\t\\\\\\\"\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\t^props ifNil:[#rigid] ifNotNil:[props hResizing].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 10/31/2000 20:45'!\\\\nhResizingString: aSymbol\\\\n\\\\t^self layoutMenuPropertyString: aSymbol from: self hResizing! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:06'!\\\\nhResizing: aSymbol\\\\n\\\\t\\\\\\\"Layout specific. This property describes how the receiver should be resized with respect to its owner and its children. Possible values are:\\\\n\\\\t\\\\t#rigid\\\\t\\\\t\\\\t-\\\\tdo not resize the receiver\\\\n\\\\t\\\\t#spaceFill\\\\t\\\\t-\\\\tresize to fill owner's available space\\\\n\\\\t\\\\t#shrinkWrap\\\\t- resize to fit children\\\\n\\\\t\\\\\\\"\\\\n\\\\tself assureLayoutProperties hResizing: aSymbol.\\\\n\\\\tself layoutChanged.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'md 2/27/2006 09:59'!\\\\nlayoutFrame\\\\n\\\\t\\\\\\\"Layout specific. Return the layout frame describing where the  \\\\n\\\\treceiver should appear in a proportional layout\\\\\\\"\\\\n\\\\t^ extension ifNotNil: [extension layoutFrame]! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/14/2000 17:20'!\\\\nlayoutFrame: aLayoutFrame\\\\n\\\\t\\\\\\\"Layout specific. Return the layout frame describing where the receiver should appear in a proportional layout\\\\\\\"\\\\n\\\\tself layoutFrame == aLayoutFrame ifTrue:[^self].\\\\n\\\\tself assureExtension layoutFrame: aLayoutFrame.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/14/2000 16:38'!\\\\nlayoutInset\\\\n\\\\t\\\\\\\"Return the extra inset for layouts\\\\\\\"\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\t^props ifNil:[0] ifNotNil:[props layoutInset].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/14/2000 16:38'!\\\\nlayoutInset: aNumber\\\\n\\\\t\\\\\\\"Return the extra inset for layouts\\\\\\\"\\\\n\\\\tself assureTableProperties layoutInset: aNumber.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'md 2/27/2006 10:00'!\\\\nlayoutPolicy\\\\n\\\\t\\\\\\\"Layout specific. Return the layout policy describing how children \\\\n\\\\tof the receiver should appear.\\\\\\\"\\\\n\\\\t^ extension ifNotNil: [ extension layoutPolicy]! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/14/2000 17:21'!\\\\nlayoutPolicy: aLayoutPolicy\\\\n\\\\t\\\\\\\"Layout specific. Return the layout policy describing how children of the receiver should appear.\\\\\\\"\\\\n\\\\tself layoutPolicy == aLayoutPolicy ifTrue:[^self].\\\\n\\\\tself assureExtension layoutPolicy: aLayoutPolicy.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'md 2/27/2006 09:58'!\\\\nlayoutProperties\\\\n\\\\t\\\\\\\"Return the current layout properties associated with the  \\\\n\\\\treceiver\\\\\\\"\\\\n\\\\t^ extension ifNotNil: [ extension layoutProperties]! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/14/2000 17:21'!\\\\nlayoutProperties: newProperties\\\\n\\\\t\\\\\\\"Return the current layout properties associated with the receiver\\\\\\\"\\\\n\\\\tself layoutProperties == newProperties ifTrue:[^self].\\\\n\\\\tself assureExtension layoutProperties: newProperties.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 19:58'!\\\\nlistCentering\\\\n\\\\t\\\\\\\"Layout specific. This property describes how the rows/columns in a list-like layout should be centered.\\\\n\\\\t\\\\t#topLeft - center at start of primary direction\\\\n\\\\t\\\\t#bottomRight - center at end of primary direction\\\\n\\\\t\\\\t#center - center in the middle of primary direction\\\\n\\\\t\\\\t#justified - insert extra space inbetween rows/columns\\\\n\\\\t\\\\\\\"\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\t^props ifNil:[#topLeft] ifNotNil:[props listCentering].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 10/29/2000 02:47'!\\\\nlistCenteringString: aSymbol\\\\n\\\\t^self layoutMenuPropertyString: aSymbol from: self listCentering! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:05'!\\\\nlistCentering: aSymbol\\\\n\\\\t\\\\\\\"Layout specific. This property describes how the rows/columns in a list-like layout should be centered.\\\\n\\\\t\\\\t#topLeft - center at start of primary direction\\\\n\\\\t\\\\t#bottomRight - center at end of primary direction\\\\n\\\\t\\\\t#center - center in the middle of primary direction\\\\n\\\\t\\\\t#justified - insert extra space inbetween rows/columns\\\\n\\\\t\\\\\\\"\\\\n\\\\tself assureTableProperties listCentering: aSymbol.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 19:59'!\\\\nlistDirection\\\\n\\\\t\\\\\\\"Layout specific. This property describes the direction in which a list-like layout should be applied. Possible values are:\\\\n\\\\t\\\\t#leftToRight\\\\n\\\\t\\\\t#rightToLeft\\\\n\\\\t\\\\t#topToBottom\\\\n\\\\t\\\\t#bottomToTop\\\\n\\\\tindicating the direction in which any layout should take place\\\\\\\"\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\t^props ifNil:[#topToBottom] ifNotNil:[props listDirection].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 10/29/2000 02:47'!\\\\nlistDirectionString: aSymbol\\\\n\\\\t^self layoutMenuPropertyString: aSymbol from: self listDirection! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:04'!\\\\nlistDirection: aSymbol\\\\n\\\\t\\\\\\\"Layout specific. This property describes the direction in which a list-like layout should be applied. Possible values are:\\\\n\\\\t\\\\t#leftToRight\\\\n\\\\t\\\\t#rightToLeft\\\\n\\\\t\\\\t#topToBottom\\\\n\\\\t\\\\t#bottomToTop\\\\n\\\\tindicating the direction in which any layout should take place\\\\\\\"\\\\n\\\\tself assureTableProperties listDirection: aSymbol.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 19:59'!\\\\nlistSpacing\\\\n\\\\t\\\\\\\"Layout specific. This property describes how the heights for different rows in a table layout should be handled.\\\\n\\\\t\\\\t#equal - all rows have the same height\\\\n\\\\t\\\\t#none - all rows may have different heights\\\\n\\\\t\\\\\\\"\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\t^props ifNil:[#none] ifNotNil:[props listSpacing].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 10/29/2000 02:47'!\\\\nlistSpacingString: aSymbol\\\\n\\\\t^self layoutMenuPropertyString: aSymbol from: self listSpacing! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:04'!\\\\nlistSpacing: aSymbol\\\\n\\\\t\\\\\\\"Layout specific. This property describes how the heights for different rows in a table layout should be handled.\\\\n\\\\t\\\\t#equal - all rows have the same height\\\\n\\\\t\\\\t#none - all rows may have different heights\\\\n\\\\t\\\\\\\"\\\\n\\\\tself assureTableProperties listSpacing: aSymbol.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 19:59'!\\\\nmaxCellSize\\\\n\\\\t\\\\\\\"Layout specific. This property specifies the maximum size of a table cell.\\\\\\\"\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\t^props ifNil:[SmallInteger maxVal] ifNotNil:[props maxCellSize].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:04'!\\\\nmaxCellSize: aPoint\\\\n\\\\t\\\\\\\"Layout specific. This property specifies the maximum size of a table cell.\\\\\\\"\\\\n\\\\tself assureTableProperties maxCellSize: aPoint.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:00'!\\\\nminCellSize\\\\n\\\\t\\\\\\\"Layout specific. This property specifies the minimal size of a table cell.\\\\\\\"\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\t^props ifNil:[0] ifNotNil:[props minCellSize].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:04'!\\\\nminCellSize: aPoint\\\\n\\\\t\\\\\\\"Layout specific. This property specifies the minimal size of a table cell.\\\\\\\"\\\\n\\\\tself assureTableProperties minCellSize: aPoint.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:01'!\\\\nreverseTableCells\\\\n\\\\t\\\\\\\"Layout specific. This property describes if the cells should be treated in reverse order of submorphs.\\\\\\\"\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\t^props ifNil:[false] ifNotNil:[props reverseTableCells].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:04'!\\\\nreverseTableCells: aBool\\\\n\\\\t\\\\\\\"Layout specific. This property describes if the cells should be treated in reverse order of submorphs.\\\\\\\"\\\\n\\\\tself assureTableProperties reverseTableCells: aBool.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:01'!\\\\nrubberBandCells\\\\n\\\\t\\\\\\\"Layout specific. This property describes if a parent that is #shrinkWrapped around its children should ignore any #spaceFill children. E.g., when #rubberBandCells is true, the compound layout will always stay at the smallest available size, even though some child may be able to grow.\\\\\\\"\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\t^props ifNil:[false] ifNotNil:[props rubberBandCells].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:04'!\\\\nrubberBandCells: aBool\\\\n\\\\t\\\\\\\"Layout specific. This property describes if a parent that is #shrinkWrapped around its children should ignore any #spaceFill children. E.g., when #rubberBandCells is true, the compound layout will always stay at the smallest available size, even though some child may be able to grow.\\\\\\\"\\\\n\\\\tself assureTableProperties rubberBandCells: aBool.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'dgd 2/16/2003 20:02'!\\\\nspaceFillWeight\\\\n\\\\t\\\\\\\"Layout specific. This property describes the relative weight that \\\\n\\\\tshould be given to the receiver when extra space is distributed \\\\n\\\\tbetween different #spaceFill cells.\\\\\\\"\\\\n\\\\n\\\\t^ self\\\\n\\\\t\\\\tvalueOfProperty: #spaceFillWeight\\\\n\\\\t\\\\tifAbsent: [1]! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/15/2000 14:16'!\\\\nspaceFillWeight: aNumber\\\\n\\\\t\\\\\\\"Layout specific. This property describes the relative weight that should be given to the receiver when extra space is distributed between different #spaceFill cells.\\\\\\\"\\\\n\\\\taNumber = 1\\\\n\\\\t\\\\tifTrue:[self removeProperty: #spaceFillWeight]\\\\n\\\\t\\\\tifFalse:[self setProperty: #spaceFillWeight toValue: aNumber].\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'tk 10/30/2001 18:39'!\\\\nvResizeToFit: aBoolean\\\\n\\\\taBoolean ifTrue:[\\\\n\\\\t\\\\tself vResizing: #shrinkWrap.\\\\n\\\\t] ifFalse:[\\\\n\\\\t\\\\tself vResizing: #rigid.\\\\n\\\\t].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:02'!\\\\nvResizing\\\\n\\\\t\\\\\\\"Layout specific. This property describes how the receiver should be resized with respect to its owner and its children. Possible values are:\\\\n\\\\t\\\\t#rigid\\\\t\\\\t\\\\t-\\\\tdo not resize the receiver\\\\n\\\\t\\\\t#spaceFill\\\\t\\\\t-\\\\tresize to fill owner's available space\\\\n\\\\t\\\\t#shrinkWrap\\\\t- resize to fit children\\\\n\\\\t\\\\\\\"\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\t^props ifNil:[#rigid] ifNotNil:[props vResizing].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 10/31/2000 20:45'!\\\\nvResizingString: aSymbol\\\\n\\\\t^self layoutMenuPropertyString: aSymbol from: self vResizing! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:03'!\\\\nvResizing: aSymbol\\\\n\\\\t\\\\\\\"Layout specific. This property describes how the receiver should be resized with respect to its owner and its children. Possible values are:\\\\n\\\\t\\\\t#rigid\\\\t\\\\t\\\\t-\\\\tdo not resize the receiver\\\\n\\\\t\\\\t#spaceFill\\\\t\\\\t-\\\\tresize to fill owner's available space\\\\n\\\\t\\\\t#shrinkWrap\\\\t- resize to fit children\\\\n\\\\t\\\\\\\"\\\\n\\\\tself assureLayoutProperties vResizing: aSymbol.\\\\n\\\\tself layoutChanged.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:02'!\\\\nwrapCentering\\\\n\\\\t\\\\\\\"Layout specific. This property describes how the rows/columns in a list-like layout should be centered.\\\\n\\\\t\\\\t#topLeft - center at start of secondary direction\\\\n\\\\t\\\\t#bottomRight - center at end of secondary direction\\\\n\\\\t\\\\t#center - center in the middle of secondary direction\\\\n\\\\t\\\\t#justified - insert extra space inbetween rows/columns\\\\n\\\\t\\\\\\\"\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\t^props ifNil:[#topLeft] ifNotNil:[props wrapCentering].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 10/29/2000 03:00'!\\\\nwrapCenteringString: aSymbol\\\\n\\\\t^self layoutMenuPropertyString: aSymbol from: self wrapCentering! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:03'!\\\\nwrapCentering: aSymbol\\\\n\\\\t\\\\\\\"Layout specific. This property describes how the rows/columns in a list-like layout should be centered.\\\\n\\\\t\\\\t#topLeft - center at start of secondary direction\\\\n\\\\t\\\\t#bottomRight - center at end of secondary direction\\\\n\\\\t\\\\t#center - center in the middle of secondary direction\\\\n\\\\t\\\\t#justified - insert extra space inbetween rows/columns\\\\n\\\\t\\\\\\\"\\\\n\\\\tself assureTableProperties wrapCentering: aSymbol.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:03'!\\\\nwrapDirection\\\\n\\\\t\\\\\\\"Layout specific. This property describes the direction along which a list-like layout should be wrapped. Possible values are:\\\\n\\\\t\\\\t#leftToRight\\\\n\\\\t\\\\t#rightToLeft\\\\n\\\\t\\\\t#topToBottom\\\\n\\\\t\\\\t#bottomToTop\\\\n\\\\t\\\\t#none\\\\n\\\\tindicating in which direction wrapping should occur. This direction must be orthogonal to the list direction, that is if listDirection is #leftToRight or #rightToLeft then wrapDirection must be #topToBottom or #bottomToTop and vice versa.\\\\\\\"\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\t^props ifNil:[#none] ifNotNil:[props wrapDirection].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 10/29/2000 03:00'!\\\\nwrapDirectionString: aSymbol\\\\n\\\\t^self layoutMenuPropertyString: aSymbol from: self wrapDirection ! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:03'!\\\\nwrapDirection: aSymbol\\\\n\\\\t\\\\\\\"Layout specific. This property describes the direction along which a list-like layout should be wrapped. Possible values are:\\\\n\\\\t\\\\t#leftToRight\\\\n\\\\t\\\\t#rightToLeft\\\\n\\\\t\\\\t#topToBottom\\\\n\\\\t\\\\t#bottomToTop\\\\n\\\\t\\\\t#none\\\\n\\\\tindicating in which direction wrapping should occur. This direction must be orthogonal to the list direction, that is if listDirection is #leftToRight or #rightToLeft then wrapDirection must be #topToBottom or #bottomToTop and vice versa.\\\\\\\"\\\\n\\\\tself assureTableProperties wrapDirection: aSymbol.\\\\n\\\\tself layoutChanged.\\\\n! !\\\\n\\\\n\\\\n!Morph methodsFor: 'macpal' stamp: 'sw 5/17/2001 17:57'!\\\\ncurrentVocabulary\\\\n\\\\t\\\\\\\"Answer the receiver's current vocabulary\\\\\\\"\\\\n\\\\n\\\\t| outer |\\\\n\\\\t^ (outer _ self ownerThatIsA: StandardViewer orA: ScriptEditorMorph) \\\\n\\\\t\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t\\\\t[outer currentVocabulary]\\\\n\\\\t\\\\t\\\\tifNil:\\\\n\\\\t\\\\t\\\\t\\\\t[super currentVocabulary]! !\\\\n\\\\n!Morph methodsFor: 'macpal' stamp: 'sw 10/10/1999 10:23'!\\\\nflash\\\\n\\\\t| c w |\\\\n\\\\tc _ self color.\\\\n\\\\tself color: Color black.\\\\n\\\\t(w _ self world) ifNotNil: [w displayWorldSafely].\\\\n\\\\tself color: c\\\\n! !\\\\n\\\\n!Morph methodsFor: 'macpal' stamp: 'sw 7/20/1999 08:13'!\\\\nscriptPerformer\\\\n\\\\t^ self topRendererOrSelf player ifNil: [self]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'menu' stamp: 'sw 11/27/2001 15:21'!\\\\naddBorderStyleMenuItems: aMenu hand: aHandMorph\\\\n\\\\t\\\\\\\"Probably one could offer border-style items even if it's not a borderedMorph, so this remains a loose end for the moment\\\\\\\"\\\\n! !\\\\n\\\\n!Morph methodsFor: 'menu' stamp: 'nk 2/15/2004 09:08'!\\\\naddGestureMenuItems: aMenu hand: aHandMorph\\\\n\\\\t\\\\\\\"If the receiver wishes the Genie menu items, add a line to the menu and then those Genie items, else do nothing\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'menu' stamp: 'nk 6/15/2004 07:11'!\\\\naddGraphModelYellowButtonItemsTo: aCustomMenu event: evt\\\\n\\\\t^aCustomMenu! !\\\\n\\\\n!Morph methodsFor: 'menu' stamp: 'dgd 9/18/2004 17:47'!\\\\naddModelYellowButtonItemsTo: aCustomMenu event: evt \\\\n\\\\t\\\\\\\"Give my models a chance to add their context-menu items to  \\\\n\\\\taCustomMenu.\\\\\\\"\\\\n\\\\tself model\\\\n\\\\t\\\\tifNotNilDo: [:mod |\\\\n\\\\t\\\\t\\\\tmod\\\\n\\\\t\\\\t\\\\t\\\\taddModelYellowButtonMenuItemsTo: aCustomMenu\\\\n\\\\t\\\\t\\\\t\\\\tforMorph: self\\\\n\\\\t\\\\t\\\\t\\\\thand: evt hand]! !\\\\n\\\\n!Morph methodsFor: 'menu' stamp: 'nk 3/10/2004 19:49'!\\\\naddMyYellowButtonMenuItemsToSubmorphMenus\\\\n\\\\t\\\\\\\"Answer true if I have items to add to the context menus of my submorphs\\\\\\\"\\\\n\\\\n\\\\t^true! !\\\\n\\\\n!Morph methodsFor: 'menu' stamp: 'dgd 9/13/2004 19:23'!\\\\naddNestedYellowButtonItemsTo: aMenu event: evt \\\\n\\\\t\\\\\\\"Add items to aMenu starting with me and proceeding down \\\\n\\\\tthrough my submorph chain, \\\\n\\\\tletting any submorphs that include the event position \\\\n\\\\tcontribute their items to the bottom of the menu, separated by \\\\n\\\\ta line.\\\\\\\"\\\\n\\\\t| underMouse |\\\\n\\\\n\\\\tself addYellowButtonMenuItemsTo: aMenu event: evt.\\\\n\\\\n\\\\tunderMouse := self\\\\n\\\\t\\\\t\\\\t\\\\tsubmorphThat: [:each | each containsPoint: evt position]\\\\n\\\\t\\\\t\\\\t\\\\tifNone: [^ self].\\\\n\\\\n\\\\t(underMouse addMyYellowButtonMenuItemsToSubmorphMenus\\\\n\\\\t\\\\t\\\\tand: [underMouse hasYellowButtonMenu])\\\\n\\\\t\\\\tifTrue: [| submenu |\\\\n\\\\t\\\\t\\\\taMenu addLine.\\\\n\\\\t\\\\t\\\\tsubmenu := MenuMorph new defaultTarget: underMouse.\\\\n\\\\t\\\\t\\\\tunderMouse addNestedYellowButtonItemsTo: submenu event: evt.\\\\n\\\\t\\\\t\\\\taMenu\\\\n\\\\t\\\\t\\\\t\\\\tadd: underMouse externalName\\\\n\\\\t\\\\t\\\\t\\\\ticon: (underMouse iconOrThumbnailOfSize: 16)\\\\n\\\\t\\\\t\\\\t\\\\tsubMenu: submenu\\\\n\\\\t\\\\t]\\\\n! !\\\\n\\\\n!Morph methodsFor: 'menu' stamp: 'dgd 7/28/2005 13:02'!\\\\naddTitleForHaloMenu: aMenu \\\\n\\\\taMenu\\\\n\\\\t\\\\taddTitle: self externalName\\\\n\\\\t\\\\ticon: (self iconOrThumbnailOfSize: (Preferences tinyDisplay ifFalse:[28] ifTrue:[16]))! !\\\\n\\\\n!Morph methodsFor: 'menu' stamp: 'dgd 10/13/2004 13:47'!\\\\naddYellowButtonMenuItemsTo: aMenu event: evt \\\\n\\\\t\\\\\\\"Populate aMenu with appropriate menu items for a  \\\\n\\\\tyellow-button (context menu) click.\\\\\\\"\\\\n\\\\taMenu defaultTarget: self.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tPreferences noviceMode\\\\n\\\\t\\\\tifFalse: [aMenu addStayUpItem].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tself addModelYellowButtonItemsTo: aMenu event: evt.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tPreferences generalizedYellowButtonMenu\\\\n\\\\t\\\\tifFalse: [^ self].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tPreferences cmdGesturesEnabled\\\\n\\\\t\\\\tifTrue: [\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\taMenu addLine.\\\\n\\\\t\\\\t\\\\taMenu add: 'inspect' translated action: #inspect].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\taMenu addLine.\\\\n\\\\tself world selectedObject == self\\\\n\\\\t\\\\tifTrue: [aMenu add: 'deselect' translated action: #removeHalo]\\\\n\\\\t\\\\tifFalse: [aMenu add: 'select' translated action: #addHalo].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t(self isWorldMorph\\\\n\\\\t\\\\t\\\\tor: [self mustBeBackmost]\\\\n\\\\t\\\\t\\\\tor: [self wantsToBeTopmost])\\\\n\\\\t\\\\tifFalse: [\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\taMenu addLine.\\\\n\\\\t\\\\t\\\\taMenu add: 'send to back' translated action: #goBehind.\\\\n\\\\t\\\\t\\\\taMenu add: 'bring to front' translated action: #comeToFront.\\\\n\\\\t\\\\t\\\\tself addEmbeddingMenuItemsTo: aMenu hand: evt hand].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tself isWorldMorph\\\\n\\\\t\\\\tifFalse: [\\\\\\\"\\\\\\\"\\\\n\\\\tSmalltalk\\\\n\\\\t\\\\tat: #NCAAConnectorMorph\\\\n\\\\t\\\\tifPresent: [:connectorClass | \\\\n\\\\t\\\\t\\\\taMenu addLine.\\\\n\\\\t\\\\t\\\\taMenu add: 'connect to' translated action: #startWiring.\\\\n\\\\t\\\\t\\\\taMenu addLine].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\tself isFullOnScreen\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [aMenu add: 'move onscreen' translated action: #goHome]].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tPreferences noviceMode\\\\n\\\\t\\\\tifFalse: [\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\tself addLayoutMenuItems: aMenu hand: evt hand.\\\\n\\\\t\\\\t\\\\t(owner notNil\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [owner isTextMorph])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self addTextAnchorMenuItems: aMenu hand: evt hand]].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tself isWorldMorph\\\\n\\\\t\\\\tifFalse: [\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\taMenu addLine.\\\\n\\\\t\\\\t\\\\tself addToggleItemsToHaloMenu: aMenu].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\taMenu addLine.\\\\n\\\\tself isWorldMorph\\\\n\\\\t\\\\tifFalse: [aMenu add: 'copy to paste buffer' translated action: #copyToPasteBuffer:].\\\\n\\\\t(self allStringsAfter: nil) isEmpty\\\\n\\\\t\\\\tifFalse: [aMenu add: 'copy text' translated action: #clipText].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tself addExportMenuItems: aMenu hand: evt hand.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t(Preferences noviceMode not\\\\n\\\\t\\\\t\\\\tand: [self isWorldMorph not])\\\\n\\\\t\\\\tifTrue: [\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\taMenu addLine.\\\\n\\\\t\\\\t\\\\taMenu add: 'adhere to edge...' translated action: #adhereToEdge].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tself addCustomMenuItems: aMenu hand: evt hand! !\\\\n\\\\n!Morph methodsFor: 'menu' stamp: 'dgd 9/18/2004 17:23'!\\\\nbuildYellowButtonMenu: aHand \\\\n\\\\t\\\\\\\"build the morph menu for the yellow button\\\\\\\"\\\\n\\\\t| menu |\\\\n\\\\tmenu := MenuMorph new defaultTarget: self.\\\\n\\\\tself addNestedYellowButtonItemsTo: menu event: ActiveEvent.\\\\n\\\\tMenuIcons decorateMenu: menu.\\\\n\\\\t^ menu! !\\\\n\\\\n!Morph methodsFor: 'menu' stamp: 'dgd 4/4/2006 14:43'!\\\\nhasYellowButtonMenu\\\\n\\\\t\\\\\\\"Answer true if I have any items at all for a context (yellow  \\\\n\\\\tbutton) menu.\\\\\\\"\\\\n\\\\t^ self wantsYellowButtonMenu\\\\n\\\\t\\\\t\\\\tor: [self models anySatisfy: [:each | each hasModelYellowButtonMenuItems]]! !\\\\n\\\\n!Morph methodsFor: 'menu' stamp: 'tak 7/17/2004 18:20'!\\\\nofferCostumeViewerMenu: aMenu\\\\n\\\\t\\\\\\\"do nothing\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'menu' stamp: 'nk 3/10/2004 19:51'!\\\\noutermostOwnerWithYellowButtonMenu\\\\n\\\\t\\\\\\\"Answer me or my outermost owner that is willing to contribute menu items to a context menu.\\\\n\\\\tDon't include the world.\\\\\\\"\\\\n\\\\n\\\\t| outermost |\\\\n\\\\toutermost _ self outermostMorphThat: [ :ea |\\\\n\\\\t\\\\tea isWorldMorph not and: [ ea hasYellowButtonMenu ]].\\\\n\\\\t^outermost ifNil: [ self hasYellowButtonMenu ifTrue: [ self ] ifFalse: []] ! !\\\\n\\\\n!Morph methodsFor: 'menu' stamp: 'dgd 9/29/2004 13:26'!\\\\nstartWiring\\\\n\\\\tSmalltalk\\\\n\\\\t\\\\tat: #NCAAConnectorMorph\\\\n\\\\t\\\\tifPresent: [:connectorClass | connectorClass newCurvyArrow startWiringFrom: self] ! !\\\\n\\\\n!Morph methodsFor: 'menu' stamp: 'dgd 9/18/2004 18:20'!\\\\nwantsYellowButtonMenu\\\\n\\\\t\\\\\\\"Answer true if the receiver wants a yellow button menu\\\\\\\"\\\\n\\\\tself\\\\n\\\\t\\\\tvalueOfProperty: #wantsYellowButtonMenu\\\\n\\\\t\\\\tifPresentDo: [:value | ^ value].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tself isInSystemWindow\\\\n\\\\t\\\\tifTrue: [^ false].\\\\\\\"\\\\\\\"\\\\n\\\\t(Preferences noviceMode\\\\n\\\\t\\\\t\\\\tand: [self isInDockingBar])\\\\n\\\\t\\\\tifTrue: [^ false].\\\\\\\"\\\\\\\"\\\\n\\\\t^ Preferences generalizedYellowButtonMenu! !\\\\n\\\\n!Morph methodsFor: 'menu' stamp: 'dgd 9/18/2004 18:35'!\\\\nwantsYellowButtonMenu: aBoolean \\\\n\\\\t\\\\\\\"Change the receiver to wants or not a yellow button menu\\\\\\\"\\\\n\\\\tself setProperty: #wantsYellowButtonMenu toValue: aBoolean! !\\\\n\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 10/6/2004 11:38'!\\\\nabsorbStateFromRenderer: aRenderer \\\\n\\\\t\\\\\\\"Transfer knownName, actorState, visible, and player info over from aRenderer, which was formerly imposed above me as a transformation shell but is now going away.\\\\\\\"\\\\n\\\\n\\\\t| current |\\\\n\\\\t(current _ aRenderer actorStateOrNil) ifNotNil:\\\\n\\\\t\\\\t[self actorState: current.\\\\n\\\\t\\\\taRenderer actorState: nil].\\\\n\\\\n\\\\t(current _ aRenderer knownName) ifNotNil:\\\\n\\\\t\\\\t[self setNameTo: current.\\\\n\\\\t\\\\taRenderer setNameTo: nil].\\\\n\\\\n\\\\t(current _ aRenderer player) ifNotNil:\\\\n\\\\t\\\\t[self player: current.\\\\n\\\\t\\\\tcurrent rawCostume: self.\\\\n\\\\t\\\\taRenderer player: nil].\\\\n\\\\n\\\\tself visible: aRenderer visible! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 11/27/2001 14:36'!\\\\naddAddHandMenuItemsForHalo: aMenu hand: aHandMorph\\\\n\\\\t\\\\\\\"The former charter of this method was to add halo menu items that pertained specifically to the hand.  Over time this charter has withered, and most morphs reimplement this method simply to add their morph-specific menu items.  So in the latest round, all other implementors in the standard image have been removed.  However, this is left here as a hook for the benefit of existing code in client uses.\\\\\\\"\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'dgd 11/15/2003 19:25'!\\\\naddCopyItemsTo: aMenu\\\\n\\\\t\\\\\\\"Add copy-like items to the halo menu\\\\\\\"\\\\n\\\\n\\\\t| subMenu |\\\\n\\\\tsubMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\tsubMenu add: 'copy to paste buffer' translated action: #copyToPasteBuffer:.\\\\n\\\\tsubMenu add: 'copy text' translated action: #clipText.\\\\n\\\\tsubMenu add: 'copy Postscript' translated action: #clipPostscript.\\\\n\\\\tsubMenu add: 'print Postscript to file...' translated target: self selector: #printPSToFile.\\\\n\\\\taMenu add: 'copy & print...' translated subMenu: subMenu! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 4/27/1998 03:44'!\\\\naddCustomHaloMenuItems: aMenu hand: aHandMorph\\\\n\\\\t\\\\\\\"Add morph-specific items to the given menu which was invoked by the given hand from the halo.  To get started, we defer to the counterpart method used with the option-menu, but in time we can have separate menu choices for halo-menus and for option-menus\\\\\\\"\\\\n\\\\n\\\\tself addCustomMenuItems: aMenu hand: aHandMorph! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 11/27/2001 07:17'!\\\\naddCustomMenuItems: aCustomMenu hand: aHandMorph\\\\n\\\\t\\\\\\\"Add morph-specific items to the given menu which was invoked by the given hand.  This method provides is invoked both from the halo-menu and from the control-menu regimes.\\\\\\\"\\\\n! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'nk 2/16/2004 13:29'!\\\\naddExportMenuItems: aMenu hand: aHandMorph\\\\n\\\\t\\\\\\\"Add export items to the menu\\\\\\\"\\\\n\\\\n\\\\taMenu ifNotNil:\\\\n\\\\t\\\\t[ | aSubMenu |\\\\n\\\\t\\\\taSubMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\t\\\\taSubMenu add: 'BMP file' translated action: #exportAsBMP.\\\\n\\\\t\\\\taSubMenu add: 'GIF file' translated action: #exportAsGIF.\\\\n\\\\t\\\\taSubMenu add: 'JPEG file' translated action: #exportAsJPEG.\\\\n\\\\t\\\\taSubMenu add: 'PNG file' translated action: #exportAsPNG.\\\\n\\\\t\\\\taMenu add: 'export...' translated subMenu: aSubMenu]\\\\n! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'dgd 8/30/2003 16:44'!\\\\naddFillStyleMenuItems: aMenu hand: aHand\\\\n\\\\t\\\\\\\"Add the items for changing the current fill style of the Morph\\\\\\\"\\\\n\\\\t| menu |\\\\n\\\\tself canHaveFillStyles ifFalse:[^aMenu add: 'change color...' translated target: self action: #changeColor].\\\\n\\\\tmenu _ MenuMorph new defaultTarget: self.\\\\n\\\\tself fillStyle addFillStyleMenuItems: menu hand: aHand from: self.\\\\n\\\\tmenu addLine.\\\\n\\\\tmenu add: 'solid fill' translated action: #useSolidFill.\\\\n\\\\tmenu add: 'gradient fill' translated action: #useGradientFill.\\\\n\\\\tmenu add: 'bitmap fill' translated action: #useBitmapFill.\\\\n\\\\tmenu add: 'default fill' translated action: #useDefaultFill.\\\\n\\\\taMenu add: 'fill style' translated subMenu: menu.\\\\n\\\\t\\\\\\\"aMenu add: 'change color...' translated action: #changeColor\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 4/12/2005 23:13'!\\\\naddHaloActionsTo: aMenu\\\\n\\\\t\\\\\\\"Add items to aMenu representing actions requestable via halo\\\\\\\"\\\\n\\\\n\\\\t| subMenu |\\\\n\\\\tsubMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\tsubMenu addTitle: self externalName.\\\\n\\\\tsubMenu addStayUpItemSpecial.\\\\n\\\\tsubMenu addLine.\\\\n\\\\tsubMenu add: 'delete' translated action: #dismissViaHalo.\\\\n\\\\tsubMenu balloonTextForLastItem: 'Delete this object -- warning -- can be destructive!!' translated.\\\\n\\\\n\\\\tself maybeAddCollapseItemTo: subMenu.\\\\n\\\\tsubMenu add: 'grab' translated action: #openInHand.\\\\n\\\\tsubMenu balloonTextForLastItem: 'Pick this object up -- warning, since this removes it from its container, it can have adverse effects.' translated.\\\\n\\\\n\\\\tsubMenu addLine.\\\\n\\\\n\\\\tsubMenu add: 'resize' translated action: #resizeFromMenu.\\\\n\\\\tsubMenu balloonTextForLastItem: 'Change the size of this object' translated.\\\\n\\\\n\\\\tsubMenu add: 'duplicate' translated action: #maybeDuplicateMorph.\\\\n\\\\tsubMenu balloonTextForLastItem: 'Hand me a copy of this object' translated.\\\\n\\\\t\\\\\\\"Note that this allows access to the non-instancing duplicate even when this is a uniclass instance\\\\\\\"\\\\n\\\\n\\\\tself couldMakeSibling ifTrue:\\\\n\\\\t\\\\t[subMenu add: 'make a sibling' translated action: #handUserASibling.\\\\n\\\\t\\\\tsubMenu balloonTextForLastItem: 'Make a new sibling of this object and hand it to me' translated].\\\\n\\\\n\\\\tsubMenu addLine.\\\\n\\\\tsubMenu add: 'property sheet' translated target: self renderedMorph action: #openAPropertySheet.\\\\n\\\\tsubMenu balloonTextForLastItem: 'Open a property sheet for me. Allows changing lots of stuff at once.' translated.\\\\n\\\\n\\\\tsubMenu add: 'set color' translated target: self renderedMorph action: #changeColor.\\\\n\\\\tsubMenu balloonTextForLastItem: 'Change the color of this object' translated.\\\\n\\\\n\\\\tsubMenu add: 'viewer' translated target: self action: #beViewed.\\\\n\\\\tsubMenu balloonTextForLastItem: 'Open a Viewer that will allow everything about this object to be seen and controlled.' translated.\\\\n\\\\n\\\\tsubMenu add: 'tile browser' translated target: self action: #openInstanceBrowserWithTiles.\\\\n\\\\tsubMenu balloonTextForLastItem: 'Open a tool that will facilitate tile scripting of this object.' translated.\\\\n\\\\n\\\\tsubMenu add: 'hand me a tile' translated target: self action: #tearOffTile.\\\\n\\\\tsubMenu balloonTextForLastItem: 'Hand me a tile represting this object' translated.\\\\n\\\\tsubMenu addLine.\\\\n\\\\n\\\\tsubMenu add: 'inspect' translated target: self action: #inspect.\\\\n\\\\tsubMenu balloonTextForLastItem: 'Open an Inspector on this object' translated.\\\\n\\\\n\\\\taMenu add: 'halo actions...' translated subMenu: subMenu\\\\n! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 3/2/2004 22:11'!\\\\naddMiscExtrasTo: aMenu\\\\n\\\\n\\\\t\\\\\\\"Add a submenu of miscellaneous extra items to the menu.\\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\t| realOwner realMorph subMenu |\\\\n\\\\n\\\\tsubMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\n\\\\t(self isWorldMorph not and: [(self renderedMorph isSystemWindow) not])\\\\n\\\\n\\\\t\\\\tifTrue: [subMenu add: 'put in a window' translated action: #embedInWindow].\\\\n\\\\n\\\\n\\\\n\\\\tself isWorldMorph ifFalse:\\\\n\\\\n\\\\t\\\\t[subMenu add: 'adhere to edge...' translated action: #adhereToEdge.\\\\n\\\\n\\\\t\\\\tsubMenu addLine].\\\\n\\\\n\\\\n\\\\n\\\\trealOwner _ (realMorph _ self topRendererOrSelf) owner.\\\\n\\\\n\\\\t(realOwner isKindOf: TextPlusPasteUpMorph) ifTrue:\\\\n\\\\n\\\\t\\\\t[subMenu add: 'GeeMail stuff...' translated subMenu: (realOwner textPlusMenuFor: realMorph)].\\\\n\\\\n\\\\n\\\\n\\\\tsubMenu\\\\n\\\\n\\\\t\\\\tadd: 'add mouse up action' translated action: #addMouseUpAction;\\\\n\\\\n\\\\t\\\\tadd: 'remove mouse up action' translated action: #removeMouseUpAction;\\\\n\\\\n\\\\t\\\\tadd: 'hand me tiles to fire this button' translated action: #handMeTilesToFire.\\\\n\\\\n\\\\tsubMenu addLine.\\\\n\\\\n\\\\tsubMenu add: 'arrowheads on pen trails...' translated action: #setArrowheads.\\\\n\\\\n\\\\tsubMenu addLine.\\\\n\\\\n\\\\n\\\\n\\\\tsubMenu defaultTarget: self topRendererOrSelf.\\\\n\\\\n\\\\tsubMenu add: 'draw new path' translated action: #definePath.\\\\n\\\\n\\\\tsubMenu add: 'follow existing path' translated action: #followPath.\\\\n\\\\n\\\\tsubMenu add: 'delete existing path' translated action: #deletePath.\\\\n\\\\n\\\\tsubMenu addLine.\\\\n\\\\n\\\\n\\\\n\\\\tself addGestureMenuItems: subMenu hand: ActiveHand.\\\\n\\\\n\\\\n\\\\n\\\\taMenu add: 'extras...' translated subMenu: subMenu! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'nk 1/6/2004 12:53'!\\\\naddPaintingItemsTo: aMenu hand: aHandMorph \\\\n\\\\t| subMenu movies |\\\\n\\\\tsubMenu := MenuMorph new defaultTarget: self.\\\\n\\\\tsubMenu add: 'repaint' translated action: #editDrawing.\\\\n\\\\tsubMenu add: 'set rotation center' translated action: #setRotationCenter.\\\\n\\\\tsubMenu add: 'reset forward-direction' translated\\\\n\\\\t\\\\taction: #resetForwardDirection.\\\\n\\\\tsubMenu add: 'set rotation style' translated action: #setRotationStyle.\\\\n\\\\tsubMenu add: 'erase pixels of color' translated\\\\n\\\\t\\\\taction: #erasePixelsOfColor:.\\\\n\\\\tsubMenu add: 'recolor pixels of color' translated\\\\n\\\\t\\\\taction: #recolorPixelsOfColor:.\\\\n\\\\tsubMenu add: 'reduce color palette' translated action: #reduceColorPalette:.\\\\n\\\\tsubMenu add: 'add a border around this shape...' translated\\\\n\\\\t\\\\taction: #addBorderToShape:.\\\\n\\\\tmovies := (self world rootMorphsAt: aHandMorph targetOffset) \\\\n\\\\t\\\\t\\\\t\\\\tselect: [:m | (m isKindOf: MovieMorph) or: [m isSketchMorph]].\\\\n\\\\tmovies size > 1 \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[subMenu add: 'insert into movie' translated action: #insertIntoMovie:].\\\\n\\\\taMenu add: 'painting...' translated subMenu: subMenu! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 4/12/2005 23:12'!\\\\naddPlayerItemsTo: aMenu\\\\n\\\\t\\\\\\\"Add player-related items to the menu if appropriate\\\\\\\"\\\\n\\\\n\\\\t| aPlayer subMenu |\\\\n\\\\tself couldMakeSibling ifFalse: [^ self].\\\\n\\\\taPlayer _ self topRendererOrSelf player.\\\\n\\\\tsubMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\tsubMenu add: 'make a sibling instance' translated target: self action: #makeNewPlayerInstance:.\\\\n\\\\tsubMenu balloonTextForLastItem: 'Makes another morph whose player is of the same class as this one.  Both siblings will share the same scripts' translated.\\\\n\\\\n\\\\tsubMenu add: 'make multiple siblings...' translated target: self action: #makeMultipleSiblings:.\\\\n\\\\tsubMenu balloonTextForLastItem: 'Make any number of sibling instances all at once' translated.\\\\n\\\\n\\\\t(aPlayer belongsToUniClass and: [aPlayer class instanceCount > 1]) ifTrue:\\\\n\\\\t\\\\t[subMenu addLine.\\\\n\\\\t\\\\tsubMenu add: 'make all siblings look like me' translated target: self action: #makeSiblingsLookLikeMe:.\\\\n\\\\t\\\\tsubMenu balloonTextForLastItem: 'make all my sibling instances look like me.' translated.\\\\n\\\\n\\\\t\\\\tsubMenu add: 'bring all siblings to my location' translated target: self action: #bringAllSiblingsToMe:.\\\\n\\\\t\\\\tsubMenu balloonTextForLastItem: 'find all sibling instances and bring them to me' translated.\\\\n\\\\n\\\\t\\\\tsubMenu add: 'apply status to all siblngs' translated target: self action: #applyStatusToAllSiblings:.\\\\n\\\\t\\\\tsubMenu balloonTextForLastItem: 'apply the current status of all of my scripts to the scripts of all my siblings' translated].\\\\n\\\\n\\\\t\\\\tsubMenu add: 'indicate all siblings' translated target: self action: #indicateAllSiblings.\\\\n\\\\t\\\\tsubMenu balloonTextForLastItem: 'momentarily show, by flashing , all of my visible siblings.'.\\\\n\\\\n\\\\t\\\\taMenu add: 'siblings...' translated subMenu: subMenu\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'dgd 8/30/2003 20:34'!\\\\naddStackItemsTo: aMenu\\\\n\\\\t\\\\\\\"Add stack-related items to the menu\\\\\\\"\\\\n\\\\n\\\\t| stackSubMenu |\\\\n\\\\tstackSubMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\t(owner notNil and: [owner isStackBackground]) ifTrue:\\\\n\\\\t\\\\t[self isShared\\\\n\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[self couldHoldSeparateDataForEachInstance\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[stackSubMenu add: 'Background field, shared value' translated target: self action: #putOnBackground.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstackSubMenu add: 'Background field, individual values' translated target: self action: #becomeSharedBackgroundField]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[stackSubMenu add: 'put onto Background' translated target: self action: #putOnBackground]]\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[stackSubMenu add: 'remove from Background' translated target: self action: #putOnForeground.\\\\n\\\\t\\\\t\\\\t\\\\tself couldHoldSeparateDataForEachInstance ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self holdsSeparateDataForEachInstance\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[stackSubMenu add: 'start holding separate data for each instance' translated target: self action: #makeHoldSeparateDataForEachInstance]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[stackSubMenu add: 'stop holding separate data for each instance' translated target: self action: #stopHoldingSeparateDataForEachInstance].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstackSubMenu add: 'be default value on new card' translated target: self action: #setAsDefaultValueForNewCard.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(self hasProperty: #thumbnailImage)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[stackSubMenu add: 'stop using for reference thumbnail' translated target: self action: #stopUsingForReferenceThumbnail]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[stackSubMenu add: 'start using for reference thumbnail' translated target: self action: #startUsingForReferenceThumbnail]]].\\\\n\\\\t\\\\t\\\\t\\\\tstackSubMenu addLine].\\\\n\\\\n\\\\t(self isStackBackground) ifFalse:\\\\n\\\\t\\\\t[stackSubMenu add: 'be a card in an existing stack...' translated action: #insertAsStackBackground].\\\\n\\\\tstackSubMenu add: 'make an instance for my data' translated action: #abstractAModel.\\\\n\\\\t(self isStackBackground) ifFalse:\\\\n\\\\t\\\\t[stackSubMenu add: 'become a stack of cards' translated action: #wrapWithAStack].\\\\n\\\\taMenu add: 'stacks and cards...' translated subMenu: stackSubMenu\\\\n! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'nk 2/15/2004 08:19'!\\\\naddStandardHaloMenuItemsTo: aMenu hand: aHandMorph\\\\n\\\\t\\\\\\\"Add standard halo items to the menu\\\\\\\"\\\\n\\\\n\\\\t| unlockables |\\\\n\\\\n\\\\tself isWorldMorph ifTrue:\\\\n\\\\t\\\\t[^ self addWorldHaloMenuItemsTo: aMenu hand: aHandMorph].\\\\n\\\\n\\\\tself mustBeBackmost ifFalse:\\\\n\\\\t\\\\t[aMenu add: 'send to back' translated action: #goBehind.\\\\n\\\\t\\\\taMenu add: 'bring to front' translated action: #comeToFront.\\\\n\\\\t\\\\tself addEmbeddingMenuItemsTo: aMenu hand: aHandMorph.\\\\n\\\\t\\\\taMenu addLine].\\\\n\\\\n\\\\tself addFillStyleMenuItems: aMenu hand: aHandMorph.\\\\n\\\\tself addBorderStyleMenuItems: aMenu hand: aHandMorph.\\\\n\\\\tself addDropShadowMenuItems: aMenu hand: aHandMorph.\\\\n\\\\tself addLayoutMenuItems: aMenu hand: aHandMorph.\\\\n\\\\tself addHaloActionsTo: aMenu.\\\\n\\\\towner isTextMorph ifTrue:[self addTextAnchorMenuItems: aMenu hand: aHandMorph].\\\\n\\\\taMenu addLine.\\\\n\\\\tself addToggleItemsToHaloMenu: aMenu.\\\\n\\\\taMenu addLine.\\\\n\\\\tself addCopyItemsTo: aMenu.\\\\n\\\\tself addPlayerItemsTo: aMenu.\\\\n\\\\tself addExportMenuItems: aMenu hand: aHandMorph.\\\\n\\\\tself addStackItemsTo: aMenu.\\\\n\\\\tself addMiscExtrasTo: aMenu.\\\\n\\\\tPreferences noviceMode ifFalse:\\\\n\\\\t\\\\t[self addDebuggingItemsTo: aMenu hand: aHandMorph].\\\\n\\\\n\\\\taMenu addLine.\\\\n\\\\taMenu defaultTarget: self.\\\\n\\\\n\\\\taMenu addLine.\\\\n\\\\n\\\\tunlockables _ self submorphs select:\\\\n\\\\t\\\\t[:m | m isLocked].\\\\n\\\\tunlockables size == 1 ifTrue:\\\\n\\\\t\\\\t[aMenu\\\\n\\\\t\\\\t\\\\tadd: ('unlock \\\\\\\"{1}\\\\\\\"' translated format: unlockables first externalName)\\\\n\\\\t\\\\t\\\\taction: #unlockContents].\\\\n\\\\tunlockables size > 1 ifTrue:\\\\n\\\\t\\\\t[aMenu add: 'unlock all contents' translated action: #unlockContents.\\\\n\\\\t\\\\taMenu add: 'unlock...' translated action: #unlockOneSubpart].\\\\n\\\\n\\\\taMenu defaultTarget: aHandMorph.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'dgd 4/3/2006 14:11'!\\\\naddToggleItemsToHaloMenu: aMenu\\\\n\\\\t\\\\\\\"Add standard true/false-checkbox items to the memu\\\\\\\"\\\\n\\\\n\\\\t#(\\\\n\\\\t\\\\t(resistsRemovalString toggleResistsRemoval 'whether I should be reistant to easy deletion via the pink X handle' true)\\\\n\\\\t\\\\t(stickinessString toggleStickiness 'whether I should be resistant to a drag done by mousing down on me' true)\\\\n\\\\t\\\\t(lockedString lockUnlockMorph 'when \\\\\\\"locked\\\\\\\", I am inert to all user interactions' true)\\\\n\\\\t\\\\t(hasClipSubmorphsString changeClipSubmorphs 'whether the parts of objects within me that are outside my bounds should be masked.' false)\\\\n\\\\t\\\\t(hasDirectionHandlesString changeDirectionHandles 'whether direction handles are shown with the halo' false)\\\\n\\\\t\\\\t(hasDragAndDropEnabledString changeDragAndDrop 'whether I am open to having objects dropped into me' false)\\\\n\\\\t)\\\\n\\\\t\\\\tselect:[:each | Preferences noviceMode not or:[each fourth]]\\\\n\\\\t\\\\tthenDo:\\\\n\\\\t\\\\t[:each |\\\\n\\\\t\\\\t\\\\taMenu addUpdating: each first action: each second.\\\\n\\\\t\\\\t\\\\taMenu balloonTextForLastItem: each third translated].\\\\n\\\\n\\\\tself couldHaveRoundedCorners ifTrue:\\\\n\\\\t\\\\t[aMenu addUpdating: #roundedCornersString action: #toggleCornerRounding.\\\\n\\\\t\\\\taMenu balloonTextForLastItem: 'whether my corners should be rounded' translated]! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'wiz 2/14/2006 18:54'!\\\\naddWorldTargetSightingItems: aCustomMenu hand: aHandMorph\\\\n\\\\\\\"Use cursor to select a point on screen.\\\\nSet target from all possible morphs under cursor sight.\\\\\\\" \\\\n\\\\t\\\\n\\\\taCustomMenu addLine.\\\\n\\\\t\\\\n\\\\taCustomMenu add: 'sight target' translated action: #sightWorldTargets:.\\\\n\\\\t! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'dgd 10/17/2003 22:51'!\\\\nadhereToEdge\\\\n\\\\t| menu |\\\\n\\\\tmenu _ MenuMorph new defaultTarget: self.\\\\n\\\\t#(top right bottom left - center - topLeft topRight bottomRight bottomLeft - none)\\\\n\\\\t\\\\tdo: [:each |\\\\n\\\\t\\\\t\\\\teach == #-\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [menu addLine]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [menu add: each asString translated selector: #setToAdhereToEdge: argument: each]].\\\\n\\\\tmenu popUpEvent: self currentEvent in: self world! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'dgd 2/22/2003 14:26'!\\\\nadhereToEdge: edgeSymbol \\\\n\\\\t(owner isNil or: [owner isHandMorph]) ifTrue: [^self].\\\\n\\\\tself perform: (edgeSymbol , ':') asSymbol\\\\n\\\\t\\\\twithArguments: (Array with: (owner perform: edgeSymbol))! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 2/3/2000 00:14'!\\\\nadjustedCenter\\\\n\\\\t\\\\\\\"Provides a hook for objects to provide a reference point other than the receiver's center,for the purpose of centering a submorph under special circumstances, such as BalloonMorph\\\\\\\"\\\\n\\\\n\\\\t^ self center! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 2/3/2000 00:12'!\\\\nadjustedCenter: c\\\\n\\\\t\\\\\\\"Set the receiver's position based on the #adjustedCenter protocol for adhereToEdge.  By default this simply sets the receiver's center.   Though there are (at its inception anyway) no other implementors of this method, it is required in use with the #adhereToEdge when the centering of a submorph is to be with reference to a rectangle  other than the receiver's center.\\\\\\\"\\\\n\\\\n\\\\tself center: c! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'ar 10/5/2000 17:20'!\\\\nallMenuWordings\\\\n\\\\t| tempMenu |\\\\n\\\\ttempMenu _ self buildHandleMenu: self currentHand.\\\\n\\\\ttempMenu allMorphsDo: [:m | m step].  \\\\\\\"Get wordings current\\\\\\\"\\\\n\\\\t^ tempMenu allWordings! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 9/6/2000 18:45'!\\\\nchangeColor\\\\n\\\\t\\\\\\\"Change the color of the receiver -- triggered, e.g. from a menu\\\\\\\"\\\\n\\\\n\\\\tColorPickerMorph new\\\\n\\\\t\\\\tchoseModalityFromPreference;\\\\n\\\\t\\\\tsourceHand: self activeHand;\\\\n\\\\t\\\\ttarget: self;\\\\n\\\\t\\\\tselector: #fillStyle:;\\\\n\\\\t\\\\toriginalColor: self color;\\\\n\\\\t\\\\tputUpFor: self near: self fullBoundsInWorld! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'ar 11/29/2001 19:57'!\\\\nchangeDirectionHandles\\\\n\\\\t^self wantsDirectionHandles: self wantsDirectionHandles not! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'ar 11/2/2000 15:04'!\\\\nchangeDragAndDrop\\\\n\\\\t^self enableDragNDrop: self dragNDropEnabled not! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 12/17/1998 12:09'!\\\\nchooseNewGraphic\\\\n\\\\t\\\\\\\"Used by any morph that can be represented by a graphic\\\\\\\"\\\\n\\\\tself chooseNewGraphicCoexisting: false\\\\n! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'nk 6/12/2004 09:58'!\\\\nchooseNewGraphicCoexisting: aBoolean \\\\n\\\\t\\\\\\\"Allow the user to choose a different form for her form-based morph\\\\\\\"\\\\n\\\\t| replacee aGraphicalMenu |\\\\n\\\\taGraphicalMenu := GraphicalMenu new\\\\n\\\\t\\\\t\\\\t\\\\tinitializeFor: self\\\\n\\\\t\\\\t\\\\t\\\\twithForms: self reasonableForms\\\\n\\\\t\\\\t\\\\t\\\\tcoexist: aBoolean.\\\\n\\\\taBoolean\\\\n\\\\t\\\\tifTrue: [self primaryHand attachMorph: aGraphicalMenu]\\\\n\\\\t\\\\tifFalse: [replacee := self topRendererOrSelf.\\\\n\\\\t\\\\t\\\\treplacee owner replaceSubmorph: replacee by: aGraphicalMenu]! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 10/27/2000 17:34'!\\\\nchooseNewGraphicFromHalo\\\\n\\\\t\\\\\\\"Allow the user to select a changed graphic to replace the one in the receiver\\\\\\\"\\\\n\\\\n\\\\tself currentWorld abandonAllHalos.\\\\n\\\\tself chooseNewGraphicCoexisting: true\\\\n! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 2/21/2000 15:21'!\\\\ncollapse\\\\n\\\\tCollapsedMorph new beReplacementFor: self! !\\\\n\\\\n!Morph methodsFor: 'menus'!\\\\ndefaultArrowheadSize\\\\n\\\\t\\\\n\\\\t^ self class defaultArrowheadSize! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'ar 10/25/2000 23:17'!\\\\ndoMenuItem: menuString\\\\n\\\\t| aMenu anItem aNominalEvent aHand |\\\\n\\\\taMenu _ self buildHandleMenu: (aHand _ self currentHand).\\\\n\\\\taMenu allMorphsDo: [:m | m step].  \\\\\\\"Get wordings current\\\\\\\"\\\\n\\\\tanItem _ aMenu itemWithWording: menuString.\\\\n\\\\tanItem ifNil:\\\\n\\\\t\\\\t[^ self player scriptingError: 'Menu item not found: ', menuString].\\\\n\\\\taNominalEvent _  MouseButtonEvent new\\\\n\\\\t\\\\tsetType: #mouseDown\\\\n\\\\t\\\\tposition: anItem bounds center\\\\n\\\\t\\\\twhich: 4 \\\\\\\"red\\\\\\\"\\\\n\\\\t\\\\tbuttons: 4 \\\\\\\"red\\\\\\\"\\\\n\\\\t\\\\thand: aHand\\\\n\\\\t\\\\tstamp: nil.\\\\n\\\\tanItem invokeWithEvent: aNominalEvent! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'yo 2/17/2005 17:50'!\\\\nexportAsBMP\\\\n\\\\t| fName |\\\\n\\\\tfName _ FillInTheBlank request:'Please enter the name' translated initialAnswer: self externalName,'.bmp'.\\\\n\\\\tfName isEmpty ifTrue:[^self].\\\\n\\\\tself imageForm writeBMPfileNamed: fName.! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'yo 2/17/2005 17:50'!\\\\nexportAsGIF\\\\n\\\\t| fName |\\\\n\\\\tfName _ FillInTheBlank request:'Please enter the name' translated initialAnswer: self externalName,'.gif'.\\\\n\\\\tfName isEmpty ifTrue:[^self].\\\\n\\\\tGIFReadWriter putForm: self imageForm onFileNamed: fName.! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'yo 2/17/2005 17:51'!\\\\nexportAsJPEG\\\\n\\\\t\\\\\\\"Export the receiver's image as a JPEG\\\\\\\"\\\\n\\\\n\\\\t| fName |\\\\n\\\\tfName _ FillInTheBlank request: 'Please enter the name' translated initialAnswer: self externalName,'.jpeg'.\\\\n\\\\tfName isEmpty ifTrue: [^ self].\\\\n\\\\tself imageForm writeJPEGfileNamed: fName! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'yo 2/17/2005 17:51'!\\\\nexportAsPNG\\\\n\\\\t| fName |\\\\n\\\\tfName _ FillInTheBlank request:'Please enter the name' translated initialAnswer: self externalName,'.png'.\\\\n\\\\tfName isEmpty ifTrue:[^self].\\\\n\\\\tPNGReadWriter putForm: self imageForm onFileNamed: fName.! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'dgd 8/30/2003 20:23'!\\\\nhasDirectionHandlesString\\\\n\\\\t^ (self wantsDirectionHandles\\\\n\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\tifFalse: ['<off>'])\\\\n\\\\t\\\\t, 'direction handles' translated! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'dgd 8/30/2003 20:24'!\\\\nhasDragAndDropEnabledString\\\\n\\\\t\\\\\\\"Answer a string to characterize the drag & drop status of the  \\\\n\\\\treceiver\\\\\\\"\\\\n\\\\t^ (self dragNDropEnabled\\\\n\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\tifFalse: ['<off>'])\\\\n\\\\t\\\\t, 'accept drops' translated! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'dgd 4/3/2006 14:09'!\\\\nhelpButton\\\\n\\\\t\\\\\\\"Answer a button whose action would be to put up help concerning the receiver\\\\\\\"\\\\n\\\\n\\\\t| aButton |\\\\n\\\\taButton _ SimpleButtonMorph new.\\\\n\\\\taButton\\\\n\\\\t\\\\ttarget: self;\\\\n\\\\t\\\\tcolor: ColorTheme current helpColor;\\\\n\\\\t\\\\tborderColor: ColorTheme current helpColor muchDarker;\\\\n\\\\t\\\\tborderWidth: 1;\\\\n\\\\t\\\\tlabel: '?' translated font: Preferences standardButtonFont;\\\\n\\\\t\\\\tactionSelector: #presentHelp;\\\\n\\\\t\\\\tsetBalloonText: 'click here for help' translated.\\\\n\\\\t^ aButton! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'ar 9/27/2005 21:01'!\\\\ninspectInMorphic\\\\n\\\\tself currentHand attachMorph: ((ToolSet inspect: self) extent: 300@200)! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'ar 9/27/2005 21:01'!\\\\ninspectInMorphic: evt\\\\n\\\\tevt hand attachMorph: ((ToolSet inspect: self) extent: 300@200)! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'dgd 8/30/2003 20:20'!\\\\nlockedString\\\\n\\\\t\\\\\\\"Answer the string to be shown in a menu to represent the \\\\n\\\\t'locked' status\\\\\\\"\\\\n\\\\t^ (self isLocked\\\\n\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\tifFalse: ['<off>']), 'be locked' translated! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 9/21/2000 22:50'!\\\\nlockUnlockMorph\\\\n\\\\t\\\\\\\"If the receiver is locked, unlock it; if unlocked, lock it\\\\\\\"\\\\n\\\\n\\\\tself isLocked ifTrue: [self unlock] ifFalse: [self lock]! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 10/29/1999 15:34'!\\\\nmakeNascentScript\\\\n\\\\t^ self notYetImplemented! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'dgd 8/30/2003 20:15'!\\\\nmaybeAddCollapseItemTo: aMenu\\\\n\\\\t\\\\\\\"If appropriate, add a collapse item to the given menu\\\\\\\"\\\\n\\\\n\\\\t| anOwner |\\\\n\\\\t(anOwner _ self topRendererOrSelf owner) ifNotNil:\\\\n\\\\t\\\\t\\\\t[anOwner isWorldMorph ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[aMenu add: 'collapse' translated target: self action: #collapse]]! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 11/22/1999 12:13'!\\\\nmenuItemAfter: menuString\\\\n\\\\t| allWordings |\\\\n\\\\tallWordings _ self allMenuWordings.\\\\n\\\\t^ allWordings atWrap: ((allWordings indexOf: menuString) + 1)! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 11/22/1999 12:14'!\\\\nmenuItemBefore: menuString\\\\n\\\\t| allWordings |\\\\n\\\\tallWordings _ self allMenuWordings.\\\\n\\\\t^ allWordings atWrap: ((allWordings indexOf: menuString) - 1)! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'dgd 9/22/2004 20:30'!\\\\nmodel\\\\n\\\\t^ nil ! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 6/12/2001 21:08'!\\\\npresentHelp\\\\n\\\\t\\\\\\\"Present a help message if there is one available\\\\\\\"\\\\n\\\\n\\\\tself inform: 'Sorry, no help has been\\\\nprovided here yet.'! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'yo 2/17/2005 18:03'!\\\\nprintPSToFileNamed: aString \\\\n\\\\t\\\\\\\"Ask the user for a filename and print this morph as postscript.\\\\\\\"\\\\n\\\\t| fileName rotateFlag psCanvasType psExtension |\\\\n\\\\tfileName := aString asFileName.\\\\n\\\\tpsCanvasType _ PostscriptCanvas defaultCanvasType.\\\\n\\\\tpsExtension _ psCanvasType defaultExtension.\\\\n\\\\tfileName := FillInTheBlank request: (String streamContents: [ :s |\\\\n\\\\t\\\\ts nextPutAll: ('File name? (\\\\\\\"{1}\\\\\\\" will be added to end)' translated format: {psExtension})])\\\\n\\\\t\\\\t\\\\tinitialAnswer: fileName.\\\\n\\\\tfileName isEmpty\\\\n\\\\t\\\\tifTrue: [^ Beeper beep].\\\\n\\\\t(fileName endsWith: psExtension)\\\\n\\\\t\\\\tifFalse: [fileName := fileName , psExtension].\\\\n\\\\trotateFlag := ((PopUpMenu labels: 'portrait (tall)\\\\nlandscape (wide)' translated)\\\\n\\\\t\\\\t\\\\t\\\\tstartUpWithCaption: 'Choose orientation...' translated)\\\\n\\\\t\\\\t\\\\t\\\\t= 2.\\\\n\\\\t((FileStream newFileNamed: fileName asFileName) converter: TextConverter defaultSystemConverter)\\\\n\\\\t\\\\tnextPutAll: (psCanvasType morphAsPostscript: self rotated: rotateFlag);\\\\n\\\\t\\\\t close! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 10/27/2000 06:39'!\\\\nputOnBackground\\\\n\\\\t\\\\\\\"Place the receiver, formerly private to its card, onto the shared background.  If the receiver needs data carried on its behalf by the card, such data will be represented on every card.\\\\\\\"\\\\n\\\\n\\\\t(self hasProperty: #shared) ifTrue: [^ self].  \\\\\\\"Already done\\\\\\\"\\\\n\\\\n\\\\tself setProperty: #shared toValue: true.\\\\n\\\\tself stack ifNotNil: [self stack reassessBackgroundShape]! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'dgd 9/5/2003 18:25'!\\\\nputOnForeground\\\\n\\\\t\\\\\\\"Place the receiver, formerly on the background, onto the foreground.  If the receiver needs data carried on its behalf by the card, those data will be lost, so in this case get user confirmation before proceeding.\\\\\\\"\\\\n\\\\n\\\\tself holdsSeparateDataForEachInstance \\\\\\\"later add the refinement of not putting up the following confirmer if only a single instance of the current background's uniclass exists\\\\\\\"\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self confirm: 'Caution -- every card of this background\\\\nformerly had its own value for this\\\\nitem.  If you put it on the foreground,\\\\nthe values  of this item on all other\\\\ncards will be lost' translated\\\\n\\\\t\\\\t\\\\t\\\\torCancel: [^ self]].\\\\n\\\\n\\\\tself removeProperty: #shared.\\\\n\\\\tself stack reassessBackgroundShape.\\\\n\\\\t\\\\\\\"still work to be done here!!\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'nk 6/12/2004 22:42'!\\\\nreasonableBitmapFillForms\\\\n\\\\t\\\\\\\"Answer an OrderedCollection of forms that could be used to replace my bitmap fill, with my current form first.\\\\\\\"\\\\n\\\\t| reasonableForms myGraphic |\\\\n\\\\treasonableForms := self class allSketchMorphForms.\\\\n\\\\treasonableForms addAll: Imports default images.\\\\n\\\\treasonableForms addAll: (BitmapFillStyle allSubInstances collect:[:f| f form]).\\\\n\\\\treasonableForms\\\\n\\\\t\\\\tremove: (myGraphic := self fillStyle form)\\\\n\\\\t\\\\tifAbsent: [].\\\\n\\\\treasonableForms := reasonableForms asOrderedCollection.\\\\n\\\\treasonableForms addFirst: myGraphic.\\\\n\\\\t^reasonableForms! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'nk 6/12/2004 09:55'!\\\\nreasonableForms\\\\n\\\\t\\\\\\\"Answer an OrderedCollection of forms that could be used to replace my form, with my current form first.\\\\\\\"\\\\n\\\\t| reasonableForms myGraphic |\\\\n\\\\treasonableForms := self class allSketchMorphForms.\\\\n\\\\treasonableForms addAll: Imports default images.\\\\n\\\\treasonableForms\\\\n\\\\t\\\\tremove: (myGraphic := self form)\\\\n\\\\t\\\\tifAbsent: [].\\\\n\\\\treasonableForms := reasonableForms asOrderedCollection.\\\\n\\\\treasonableForms addFirst: myGraphic.\\\\n\\\\t^reasonableForms! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'ar 9/22/2000 20:36'!\\\\nresetForwardDirection\\\\n\\\\tself forwardDirection: 0.! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'dgd 8/30/2003 20:18'!\\\\nresistsRemovalString\\\\n\\\\t\\\\\\\"Answer the string to be shown in a menu to represent the \\\\n\\\\t'resistsRemoval' status\\\\\\\"\\\\n\\\\t^ (self resistsRemoval\\\\n\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\tifFalse: ['<off>']), 'resist being deleted' translated! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'yo 2/17/2005 16:58'!\\\\nsetArrowheads\\\\n\\\\t\\\\\\\"Let the user edit the size of arrowheads for this object\\\\\\\"\\\\n\\\\n\\\\t| aParameter result  |\\\\n\\\\taParameter _ self renderedMorph valueOfProperty:  #arrowSpec ifAbsent:\\\\n\\\\t\\\\t[Preferences parameterAt: #arrowSpec ifAbsent: [5 @ 4]].\\\\n\\\\tresult _ Morph obtainArrowheadFor: 'Head size for arrowheads: ' translated defaultValue: aParameter asString.\\\\n\\\\tresult ifNotNil:\\\\n\\\\t\\\\t\\\\t[self renderedMorph  setProperty: #arrowSpec toValue: result]\\\\n\\\\t\\\\tifNil:\\\\n\\\\t\\\\t\\\\t[Beeper beep]! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'ar 9/22/2000 20:15'!\\\\nsetRotationCenter\\\\n\\\\t| p |\\\\n\\\\tself world displayWorld.\\\\n\\\\tCursor crossHair showWhile:\\\\n\\\\t\\\\t[p _ Sensor waitButton].\\\\n\\\\tSensor waitNoButton.\\\\n\\\\tself setRotationCenterFrom: (self transformFromWorld globalPointToLocal: p).\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'ar 9/22/2000 20:14'!\\\\nsetRotationCenterFrom: aPoint\\\\n\\\\tself rotationCenter: (aPoint - self bounds origin) / self bounds extent asFloatPoint.! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'di 12/21/2000 17:18'!\\\\nsetToAdhereToEdge: anEdge\\\\n\\\\tanEdge ifNil: [^ self].\\\\n\\\\tanEdge == #none ifTrue: [^ self removeProperty: #edgeToAdhereTo].\\\\n\\\\tself setProperty: #edgeToAdhereTo toValue: anEdge.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 8/30/1998 09:42'!\\\\nsnapToEdgeIfAppropriate\\\\n\\\\t| edgeSymbol oldBounds aWorld |\\\\n\\\\t(edgeSymbol _ self valueOfProperty: #edgeToAdhereTo) ifNotNil:\\\\n\\\\t\\\\t[oldBounds _ bounds.\\\\n\\\\t\\\\tself adhereToEdge: edgeSymbol.\\\\n\\\\t\\\\tbounds ~= oldBounds ifTrue: [(aWorld _ self world) ifNotNil: [aWorld viewBox ifNotNil:\\\\n\\\\t\\\\t\\\\t[aWorld displayWorld]]]]! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'dgd 8/30/2003 20:19'!\\\\nstickinessString\\\\n\\\\t\\\\\\\"Answer the string to be shown in a menu to represent the  \\\\n\\\\tstickiness status\\\\\\\"\\\\n\\\\t^ (self isSticky\\\\n\\\\t\\\\tifTrue: ['<yes>']\\\\n\\\\t\\\\tifFalse: ['<no>'])\\\\n\\\\t\\\\t, 'resist being picked up' translated! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 10/6/2004 12:16'!\\\\ntransferStateToRenderer: aRenderer\\\\n\\\\t\\\\\\\"Transfer knownName, actorState, visible, and player info over to aRenderer, which is being imposed above me as a transformation shell\\\\\\\"\\\\n\\\\n\\\\t| current |\\\\n\\\\t(current _ self actorStateOrNil) ifNotNil:\\\\n\\\\t\\\\t[aRenderer actorState: current.\\\\n\\\\t\\\\tself actorState: nil].\\\\n\\\\n\\\\t(current _ self knownName) ifNotNil:\\\\n\\\\t\\\\t[aRenderer setNameTo: current.\\\\n\\\\t\\\\tself setNameTo: nil].\\\\n\\\\n\\\\t(current _ self player) ifNotNil:\\\\n\\\\t\\\\t[aRenderer player: current.\\\\n\\\\t\\\\tself player rawCostume: aRenderer.\\\\n\\\\t\\\\t\\\\\\\"NB player is redundantly pointed to in the extension of both the renderer and the rendee; this is regrettable but many years ago occasionally people tried to make that clean but always ran into problems iirc\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"self player: nil\\\\\\\"].\\\\n\\\\n\\\\taRenderer simplySetVisible: self visible\\\\n\\\\n\\\\n\\\\n \\\\n\\\\n\\\\t\\\\t! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'RAA 11/14/2000 13:46'!\\\\nuncollapseSketch\\\\n\\\\n\\\\t| uncollapsedVersion w whomToDelete |\\\\n\\\\n\\\\t(w _ self world) ifNil: [^self].\\\\n\\\\tuncollapsedVersion _ self valueOfProperty: #uncollapsedMorph.\\\\n\\\\tuncollapsedVersion ifNil: [^self].\\\\n\\\\twhomToDelete _ self valueOfProperty: #collapsedMorphCarrier.\\\\n\\\\tuncollapsedVersion setProperty: #collapsedPosition toValue: whomToDelete position.\\\\n\\\\n\\\\twhomToDelete delete.\\\\n\\\\tw addMorphFront: uncollapsedVersion.\\\\n\\\\n! !\\\\n\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'dgd 9/18/2004 16:24'!\\\\naddEmbeddingMenuItemsTo: aMenu hand: aHandMorph\\\\n\\\\t\\\\\\\"Construct a menu offerring embed targets for the receiver.  If the incoming menu is is not degenerate, add the constructed menu as a submenu; in any case, answer the embed-target menu\\\\\\\"\\\\n\\\\n\\\\t| menu potentialEmbeddingTargets |\\\\n\\\\n\\\\tpotentialEmbeddingTargets := self potentialEmbeddingTargets.\\\\n\\\\tpotentialEmbeddingTargets size > 1 ifFalse:[^ self].\\\\n\\\\n\\\\tmenu := MenuMorph new defaultTarget: self.\\\\n\\\\n\\\\tpotentialEmbeddingTargets reverseDo: [:m | \\\\n\\\\t\\\\t\\\\tmenu\\\\n\\\\t\\\\t\\\\t\\\\tadd: (m knownName ifNil:[m class name asString])\\\\n\\\\t\\\\t\\\\t\\\\ttarget: m\\\\n\\\\t\\\\t\\\\t\\\\tselector: #addMorphFrontFromWorldPosition:\\\\n\\\\t\\\\t\\\\t\\\\targument: self topRendererOrSelf.\\\\n\\\\n\\\\t\\\\t\\\\tmenu lastItem icon: (m iconOrThumbnailOfSize: 16).\\\\n\\\\n\\\\t\\\\t\\\\tself owner == m ifTrue:[menu lastItem emphasis: 1].\\\\n\\\\t\\\\t].\\\\n\\\\n\\\\taMenu add:'embed into' translated subMenu: menu.\\\\n\\\\n\\\\t^ menu! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'sw 1/29/2001 02:50'!\\\\napplyStatusToAllSiblings: evt\\\\n\\\\t\\\\\\\"Apply the statuses of all my scripts to the script status of all my siblings\\\\\\\"\\\\n\\\\n\\\\t| aPlayer |\\\\n\\\\t(aPlayer _ self topRendererOrSelf player) belongsToUniClass ifFalse: [self error: 'not uniclass'].\\\\n\\\\taPlayer instantiatedUserScriptsDo: \\\\n\\\\t\\\\t[:aScriptInstantiation | aScriptInstantiation assignStatusToAllSiblings]! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 10/5/2000 16:51'!\\\\nbeThisWorldsModel\\\\n\\\\n\\\\tself world setModel: self.\\\\n\\\\tself model: nil slotName: nil.\\\\t\\\\\\\"A world's model cannot have another model\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'yo 3/15/2005 14:45'!\\\\nblueButtonDown: anEvent\\\\n\\\\t\\\\\\\"Special gestures (cmd-mouse on the Macintosh; Alt-mouse on Windows and Unix) allow a mouse-sensitive morph to be moved or bring up a halo for the morph.\\\\\\\"\\\\n\\\\t| h tfm doNotDrag |\\\\n\\\\th _ anEvent hand halo.\\\\n\\\\t\\\\\\\"Prevent wrap around halo transfers originating from throwing the event back in\\\\\\\"\\\\n\\\\tdoNotDrag _ false.\\\\n\\\\th ifNotNil:[\\\\n\\\\t\\\\t(h innerTarget == self) ifTrue:[doNotDrag _ true].\\\\n\\\\t\\\\t(h innerTarget hasOwner: self) ifTrue:[doNotDrag _ true].\\\\n\\\\t\\\\t(self hasOwner: h target) ifTrue:[doNotDrag _ true]].\\\\n\\\\n\\\\ttfm _ (self transformedFrom: nil) inverseTransformation.\\\\n\\\\n\\\\t\\\\\\\"cmd-drag on flexed morphs works better this way\\\\\\\"\\\\n\\\\th _ self addHalo: (anEvent transformedBy: tfm).\\\\n\\\\th ifNil: [^ self].\\\\n\\\\tdoNotDrag ifTrue:[^self].\\\\n\\\\t\\\\\\\"Initiate drag transition if requested\\\\\\\"\\\\n\\\\tanEvent hand \\\\n\\\\t\\\\twaitForClicksOrDrag: h\\\\n\\\\t\\\\tevent: (anEvent transformedBy: tfm)\\\\n\\\\t\\\\tselectors: { nil. nil. nil. #dragTarget:. }\\\\n\\\\t\\\\tthreshold: 5.\\\\n\\\\t\\\\\\\"Pass focus explicitly here\\\\\\\"\\\\n\\\\tanEvent hand newMouseFocus: h.! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 9/15/2000 20:25'!\\\\nblueButtonUp: anEvent\\\\n\\\\t\\\\\\\"Ignored. Theoretically we should never get here since control is transferred to the halo on #blueButtonDown: but subclasses may implement this differently.\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'sw 1/19/2001 18:10'!\\\\nbringAllSiblingsToMe: evt\\\\n\\\\t\\\\\\\"bring all siblings of the receiver's player found in the same container to the receiver's location.\\\\\\\"\\\\n\\\\n\\\\t| aPlayer aPosition aContainer |\\\\n\\\\t(aPlayer _ self topRendererOrSelf player) belongsToUniClass ifFalse: [self error: 'not uniclass'].\\\\n\\\\taPosition _ self topRendererOrSelf position.\\\\n\\\\taContainer _ self topRendererOrSelf owner.\\\\n\\\\t(aPlayer class allInstances copyWithout: aPlayer) do:\\\\n\\\\t\\\\t[:each |\\\\n\\\\t\\\\t\\\\t(aContainer submorphs includes: each costume) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[each costume  position: aPosition]]! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'dgd 9/18/2004 17:23'!\\\\nbuildHandleMenu: aHand\\\\n\\\\t\\\\\\\"Build the morph menu for the given morph's halo's menu handle. This menu has two sections. The first section contains commands that are interpreted by the hand; the second contains commands provided by the target morph. This method allows the morph to decide which items should be included in the hand's section of the menu.\\\\\\\"\\\\n\\\\n\\\\t| menu |\\\\n\\\\n\\\\t(Preferences generalizedYellowButtonMenu\\\\n\\\\t\\\\t\\\\tand: [Preferences noviceMode])\\\\n\\\\t\\\\tifTrue: [^ self buildYellowButtonMenu: aHand].\\\\n\\\\n\\\\tmenu _ MenuMorph new defaultTarget: self.\\\\n\\\\tmenu addStayUpItem.\\\\n\\\\tmenu addLine.\\\\n\\\\tself addStandardHaloMenuItemsTo: menu hand: aHand.\\\\n\\\\tmenu defaultTarget: aHand.\\\\n\\\\tself addAddHandMenuItemsForHalo: menu  hand: aHand.\\\\n\\\\tmenu defaultTarget: self.\\\\n\\\\tself addCustomHaloMenuItems: menu hand: aHand.\\\\n\\\\tmenu defaultTarget: aHand.\\\\n\\\\t^ menu\\\\n! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'dgd 11/15/2003 19:29'!\\\\nbuildMetaMenu: evt\\\\n\\\\t\\\\\\\"Build the morph menu. This menu has two sections. The first section contains commands that are handled by the hand; the second contains commands handled by the argument morph.\\\\\\\"\\\\n\\\\t| menu |\\\\n\\\\tmenu _ MenuMorph new defaultTarget: self.\\\\n\\\\tmenu addStayUpItem.\\\\n\\\\tmenu add: 'grab' translated action: #grabMorph:.\\\\n\\\\tmenu add: 'copy to paste buffer' translated action: #copyToPasteBuffer:.\\\\n\\\\tself maybeAddCollapseItemTo: menu.\\\\n\\\\tmenu add: 'delete' translated action: #dismissMorph:.\\\\n\\\\tmenu addLine.\\\\n\\\\tmenu add: 'copy text' translated action: #clipText.\\\\n\\\\tmenu add: 'copy Postscript' translated action: #clipPostscript.\\\\n\\\\tmenu add: 'print Postscript to file...' translated action: #printPSToFile.\\\\n\\\\tmenu addLine.\\\\n\\\\tmenu add: 'go behind' translated action: #goBehind.\\\\n\\\\tmenu add: 'add halo' translated action: #addHalo:.\\\\n\\\\tmenu add: 'duplicate' translated action: #maybeDuplicateMorph:.\\\\n\\\\n\\\\tself addEmbeddingMenuItemsTo: menu hand: evt hand.\\\\n\\\\n\\\\tmenu add: 'resize' translated action: #resizeMorph:.\\\\n\\\\t\\\\\\\"Give the argument control over what should be done about fill styles\\\\\\\"\\\\n\\\\tself addFillStyleMenuItems: menu hand: evt hand.\\\\n\\\\tself addDropShadowMenuItems: menu hand: evt hand.\\\\n\\\\tself addLayoutMenuItems: menu hand: evt hand.\\\\n\\\\tmenu addUpdating: #hasClipSubmorphsString target: self selector: #changeClipSubmorphs argumentList: #().\\\\n\\\\tmenu addLine.\\\\n\\\\n\\\\t(self morphsAt: evt position) size > 1 ifTrue:\\\\n\\\\t\\\\t[menu add: 'submorphs...' translated\\\\n\\\\t\\\\t\\\\ttarget: self\\\\n\\\\t\\\\t\\\\tselector: #invokeMetaMenuAt:event:\\\\n\\\\t\\\\t\\\\targument: evt position].\\\\n\\\\tmenu addLine.\\\\n\\\\tmenu add: 'inspect' translated selector: #inspectAt:event: argument: evt position.\\\\n\\\\tmenu add: 'explore' translated action: #explore.\\\\n\\\\tmenu add: 'browse hierarchy' translated action: #browseHierarchy.\\\\n\\\\tmenu add: 'make own subclass' translated action: #subclassMorph.\\\\n\\\\tmenu addLine.\\\\n\\\\tmenu add: 'set variable name...' translated action: #choosePartName.\\\\n\\\\t(self isMorphicModel) ifTrue:\\\\n\\\\t\\\\t[menu add: 'save morph as prototype' translated action: #saveAsPrototype.\\\\n\\\\t\\\\t(self ~~ self world modelOrNil) ifTrue:\\\\n\\\\t\\\\t\\\\t [menu add: 'become this world''s model' translated action: #beThisWorldsModel]].\\\\n\\\\tmenu add: 'save morph in file' translated action: #saveOnFile.\\\\n\\\\t(self hasProperty: #resourceFilePath)\\\\n\\\\t\\\\tifTrue: [((self valueOfProperty: #resourceFilePath) endsWith: '.morph')\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [menu add: 'save as resource' translated action: #saveAsResource].\\\\n\\\\t\\\\t\\\\t\\\\tmenu add: 'update from resource' translated action: #updateFromResource]\\\\n\\\\t\\\\tifFalse: [menu add: 'attach to resource' translated action: #attachToResource].\\\\n\\\\tmenu add: 'show actions' translated action: #showActions.\\\\n\\\\tmenu addLine.\\\\n\\\\tself addDebuggingItemsTo: menu hand: evt hand.\\\\n\\\\n\\\\tself addCustomMenuItems: menu hand: evt hand.\\\\n\\\\t^ menu\\\\n! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 10/5/2000 18:54'!\\\\nchangeColorTarget: anObject selector: aSymbol originalColor: aColor hand: aHand\\\\n\\\\t\\\\\\\"Put up a color picker for changing some kind of color.  May be modal or modeless, depending on #modalColorPickers setting\\\\\\\"\\\\n\\\\tself flag: #arNote. \\\\\\\"Simplify this due to anObject == self for almost all cases\\\\\\\"\\\\n\\\\t^ ColorPickerMorph new\\\\n\\\\t\\\\tchoseModalityFromPreference;\\\\n\\\\t\\\\tsourceHand: aHand;\\\\n\\\\t\\\\ttarget: anObject;\\\\n\\\\t\\\\tselector: aSymbol;\\\\n\\\\t\\\\toriginalColor: aColor;\\\\n\\\\t\\\\tputUpFor: anObject near: (anObject isMorph\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue:\\\\t [Rectangle center: self position extent: 20]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [anObject == self world\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [anObject viewBox bottomLeft + (20@-20) extent: 200]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [anObject fullBoundsInWorld]]);\\\\n\\\\t\\\\tyourself! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 10/5/2000 16:44'!\\\\ncopyToPasteBuffer: evt\\\\n\\\\tself okayToDuplicate ifTrue:[evt hand copyToPasteBuffer: self].! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'mir 3/17/2006 18:02'!\\\\ndismissMorph\\\\n\\\\t\\\\\\\"This is called from an explicit halo destroy/delete action.\\\\\\\"\\\\n\\\\n\\\\t| w |\\\\n\\\\tw _ self world ifNil:[^self].\\\\n\\\\tw abandonAllHalos; stopStepping: self.\\\\n\\\\tself delete! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'mir 3/17/2006 18:01'!\\\\ndismissMorph: evt\\\\n\\\\tself dismissMorph! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'wiz 2/19/2006 12:41'!\\\\nduplicateMorphImage: evt \\\\n\\\\t\\\\\\\"Make and return a imageMorph of the receiver's argument imageForm\\\\\\\"\\\\n\\\\t| dup |\\\\n\\\\tdup := self asSnapshotThumbnail withSnapshotBorder.\\\\n\\\\tdup bounds: self bounds.\\\\n\\\\tevt hand grabMorph: dup from: owner.\\\\n\\\\t\\\\\\\"duplicate was ownerless so use #grabMorph:from: here\\\\\\\"\\\\n\\\\t^ dup! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 11/4/2000 17:56'!\\\\nduplicateMorph: evt\\\\n\\\\t\\\\\\\"Make and return a duplicate of the receiver's argument\\\\\\\"\\\\n\\\\t| dup |\\\\n\\\\tdup _ self duplicate.\\\\n\\\\tevt hand grabMorph: dup from: owner. \\\\\\\"duplicate was ownerless so use #grabMorph:from: here\\\\\\\"\\\\n\\\\t^dup! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 10/7/2000 20:53'!\\\\nembedInto: evt\\\\n\\\\t\\\\\\\"Embed the receiver into some other morph\\\\\\\"\\\\n\\\\t|  menu target |\\\\n\\\\tmenu _ CustomMenu new.\\\\n\\\\tself potentialEmbeddingTargets  do: [:m | \\\\n\\\\t\\\\tmenu add: (m knownName ifNil:[m class name asString]) action: m].\\\\n\\\\ttarget _ menu startUpWithCaption: ('Place ', self externalName, ' in...').\\\\n\\\\ttarget ifNil:[^self].\\\\n\\\\ttarget addMorphFront: self fromWorldPosition: self positionInWorld.! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 10/6/2000 16:37'!\\\\ngrabMorph: evt\\\\n\\\\n\\\\tevt hand grabMorph: self! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 10/7/2000 18:44'!\\\\nhandlerForBlueButtonDown: anEvent\\\\n\\\\t\\\\\\\"Return the (prospective) handler for a mouse down event. The handler is temporarily installed and can be used for morphs further down the hierarchy to negotiate whether the inner or the outer morph should finally handle the event.\\\\n\\\\tNote: Halos handle blue button events themselves so we will only be asked if there is currently no halo on top of us.\\\\\\\"\\\\n\\\\tself wantsHaloFromClick ifFalse:[^nil].\\\\n\\\\tanEvent handler ifNil:[^self].\\\\n\\\\tanEvent handler isPlayfieldLike ifTrue:[^self]. \\\\\\\"by default exclude playfields\\\\\\\"\\\\n\\\\t(anEvent shiftPressed)\\\\n\\\\t\\\\tifFalse:[^nil] \\\\\\\"let outer guy have it\\\\\\\"\\\\n\\\\t\\\\tifTrue:[^self] \\\\\\\"let me have it\\\\\\\"\\\\n! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 10/12/2000 17:07'!\\\\nhandlerForMetaMenu: evt\\\\n\\\\t\\\\\\\"Return the prospective handler for invoking the meta menu. By default, the top-most morph in the innermost world gets this menu\\\\\\\"\\\\n\\\\tself isWorldMorph ifTrue:[^self].\\\\n\\\\tevt handler ifNotNil:[evt handler isWorldMorph ifTrue:[^self]].\\\\n\\\\t^nil! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'yo 2/12/2005 15:25'!\\\\nindicateAllSiblings\\\\n\\\\t\\\\\\\"Indicate all the receiver and all its siblings by flashing momentarily.\\\\\\\"\\\\n\\\\n\\\\t| aPlayer allBoxes |\\\\n\\\\t(aPlayer _ self topRendererOrSelf player) belongsToUniClass ifFalse: [^ self \\\\\\\"error: 'not uniclass'\\\\\\\"].\\\\n\\\\tallBoxes _ aPlayer class allInstances\\\\n\\\\t\\\\tselect: [:m | m costume world == ActiveWorld]\\\\n\\\\t\\\\tthenCollect: [:m | m costume boundsInWorld].\\\\n\\\\n\\\\t5 timesRepeat:\\\\n\\\\t\\\\t[Display flashAll: allBoxes andWait: 120]! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 10/10/2000 14:09'!\\\\ninspectAt: aPoint event: evt\\\\n\\\\t| menu morphs target |\\\\n\\\\tmenu _ CustomMenu new.\\\\n\\\\tmorphs _ self morphsAt: aPoint.\\\\n\\\\t(morphs includes: self) ifFalse:[morphs _ morphs copyWith: self].\\\\n\\\\tmorphs do: [:m | \\\\n\\\\t\\\\tmenu add: (m knownName ifNil:[m class name asString]) action: m].\\\\n\\\\ttarget _ menu startUpWithCaption: ('inspect whom?\\\\n(deepest at top)').\\\\n\\\\ttarget ifNil:[^self].\\\\n\\\\ttarget inspectInMorphic: evt! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 10/10/2000 14:26'!\\\\ninvokeMetaMenuAt: aPoint event: evt\\\\n\\\\t| menu morphs target |\\\\n\\\\tmenu _ CustomMenu new.\\\\n\\\\tmorphs _ self morphsAt: aPoint.\\\\n\\\\t(morphs includes: self) ifFalse:[morphs _ morphs copyWith: self].\\\\n\\\\tmorphs size = 1 ifTrue:[morphs first invokeMetaMenu: evt].\\\\n\\\\tmorphs do: [:m | \\\\n\\\\t\\\\tmenu add: (m knownName ifNil:[m class name asString]) action: m].\\\\n\\\\ttarget _ menu startUp.\\\\n\\\\ttarget ifNil:[^self].\\\\n\\\\ttarget invokeMetaMenu: evt! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'fc 4/27/2004 21:54'!\\\\ninvokeMetaMenu: evt\\\\n\\\\t| menu |\\\\n\\\\tmenu _ self buildMetaMenu: evt.\\\\n\\\\tmenu addTitle: self externalName.\\\\n\\\\tself world ifNotNil: [\\\\n\\\\t\\\\tmenu popUpEvent: evt in: self world\\\\n\\\\t]! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'sw 4/12/2005 23:09'!\\\\nmakeMultipleSiblings: evt\\\\n\\\\t\\\\\\\"Make multiple siblings, first prompting the user for how many\\\\\\\"\\\\n\\\\n\\\\t| result |\\\\n\\\\tself topRendererOrSelf couldMakeSibling ifFalse: [^ Beeper beep].\\\\n\\\\tresult _ FillInTheBlank request: 'how many siblings do you want?' translated initialAnswer: '2'.\\\\n\\\\tresult isEmptyOrNil ifTrue: [^ self].\\\\n\\\\tresult first isDigit ifFalse: [^ Beeper beep].\\\\n\\\\tself topRendererOrSelf makeSiblings: result asInteger.! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 10/5/2000 19:20'!\\\\nmakeNewPlayerInstance: evt\\\\n\\\\t\\\\\\\"Make a duplicate of the receiver's argument.  This is called only where the argument has an associated Player as its costumee, and the intent here is to make another instance of the same uniclass as the donor Player itself.  Much works, but there are flaws so this shouldn't be used without recognizing the risks\\\\\\\"\\\\n\\\\n\\\\tevt hand attachMorph: self usableSiblingInstance! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'sw 1/12/2001 22:47'!\\\\nmakeSiblingsLookLikeMe: evt\\\\n\\\\t\\\\\\\"Make all my siblings wear the same costume that I am wearing.\\\\\\\"\\\\n\\\\n\\\\t| aPlayer |\\\\n\\\\t(aPlayer _ self topRendererOrSelf player) belongsToUniClass ifFalse: [self error: 'not uniclass'].\\\\n\\\\taPlayer class allInstancesDo:\\\\n\\\\t\\\\t[:anInstance | anInstance == aPlayer ifFalse:\\\\n\\\\t\\\\t\\\\t[anInstance wearCostumeOf: aPlayer]]! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'sw 1/29/2001 17:11'!\\\\nmakeSiblings: count\\\\n\\\\t\\\\\\\"Make multiple sibling, and return the list\\\\\\\"\\\\n\\\\n\\\\t| aPosition anInstance listOfNewborns |\\\\n\\\\taPosition _ self position.\\\\n\\\\tlistOfNewborns _ (1 to: count asInteger) asArray collect: \\\\n\\\\t\\\\t[:anIndex |\\\\n\\\\t\\\\t\\\\tanInstance _ self usableSiblingInstance.\\\\n\\\\t\\\\t\\\\towner addMorphFront: anInstance.\\\\n\\\\t\\\\t\\\\taPosition _ aPosition + (10@10).\\\\n\\\\t\\\\t\\\\tanInstance position: aPosition.\\\\n\\\\t\\\\t\\\\tanInstance].\\\\n\\\\tself currentWorld startSteppingSubmorphsOf: self topRendererOrSelf owner.\\\\n\\\\t^ listOfNewborns! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'sw 4/19/2005 14:55'!\\\\nmaybeDuplicateMorph\\\\n\\\\t\\\\\\\"Maybe duplicate the morph\\\\\\\"\\\\n\\\\n\\\\tself okayToDuplicate ifTrue:\\\\n\\\\t\\\\t[self topRendererOrSelf duplicate openInHand]! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 10/5/2000 17:32'!\\\\nmaybeDuplicateMorph: evt\\\\n\\\\tself okayToDuplicate ifTrue:[^self duplicateMorph: evt]! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'RAA 2/19/2001 16:52'!\\\\nopenAPropertySheet\\\\n\\\\n\\\\tObjectPropertiesMorph basicNew\\\\n\\\\t\\\\ttargetMorph: self;\\\\n\\\\t\\\\tinitialize;\\\\n\\\\t\\\\topenNearTarget! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'RAA 3/15/2001 12:56'!\\\\nopenATextPropertySheet\\\\n\\\\n\\\\t\\\\\\\"should only be sent to morphs that are actually supportive\\\\\\\"\\\\n\\\\n\\\\tTextPropertiesMorph basicNew\\\\n\\\\t\\\\ttargetMorph: self;\\\\n\\\\t\\\\tinitialize;\\\\n\\\\t\\\\topenNearTarget! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'wiz 1/2/2005 01:06'!\\\\npotentialEmbeddingTargets\\\\n\\\\t\\\\\\\"Return the potential targets for embedding the receiver\\\\\\\"\\\\n\\\\n\\\\t| oneUp topRend |\\\\n\\\\t(oneUp _ (topRend _ self topRendererOrSelf) owner) ifNil:[^#()].\\\\n\\\\t^ (oneUp morphsAt: topRend referencePosition behind: topRend unlocked: true) select:\\\\n\\\\t\\\\t[:m | m  isFlexMorph not]! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'wiz 7/17/2004 22:17'!\\\\npotentialTargets\\\\n\\\\t\\\\\\\"Return the potential targets for the receiver.\\\\n\\\\tThis is derived from Morph>>potentialEmbeddingTargets.\\\\\\\"\\\\n\\\\towner ifNil:[^#()].\\\\n\\\\t^owner morphsAt: self referencePosition behind: self unlocked: true not! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'wiz 7/20/2004 02:46'!\\\\npotentialTargetsAt: aPoint \\\\n\\\\t\\\\\\\"Return the potential targets for the receiver.  \\\\n\\\\tThis is derived from Morph>>potentialEmbeddingTargets.\\\\\\\"\\\\n\\\\towner\\\\n\\\\t\\\\tifNil: [^ #()].\\\\n\\\\t^ owner\\\\n\\\\t\\\\tmorphsAt: aPoint\\\\n\\\\t\\\\t! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'sw 11/27/2001 14:59'!\\\\nresizeFromMenu\\\\n\\\\t\\\\\\\"Commence an interaction that will resize the receiver\\\\\\\"\\\\n\\\\n\\\\tself resizeMorph: ActiveEvent! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'st 9/14/2004 12:30'!\\\\nresizeMorph: evt\\\\n\\\\t| handle |\\\\n\\\\thandle _ HandleMorph new forEachPointDo: [:newPoint | \\\\n\\\\t\\\\tself extent: (self griddedPoint: newPoint) - self bounds topLeft].\\\\n\\\\tevt hand attachMorph: handle.\\\\n\\\\thandle startStepping.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 10/5/2000 16:50'!\\\\nsaveAsPrototype\\\\n\\\\t(SelectionMenu confirm: 'Make this morph the prototype for ', self class printString, '?')\\\\n\\\\t\\\\tifFalse: [^ self].\\\\n\\\\tself class prototype: self.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 9/27/2005 20:29'!\\\\nshowActions\\\\n\\\\t\\\\\\\"Put up a message list browser of all the code that this morph  \\\\n\\\\twould run for mouseUp, mouseDown, mouseMove, mouseEnter,  \\\\n\\\\tmouseLeave, and  \\\\n\\\\tmouseLinger. tk 9/13/97\\\\\\\"\\\\n\\\\t| list cls selector adder |\\\\n\\\\tlist := SortedCollection new.\\\\n\\\\tadder := [:mrClass :mrSel | list\\\\n\\\\t\\\\t\\\\t\\\\tadd: (MethodReference new setStandardClass: mrClass methodSymbol: mrSel)].\\\\n\\\\t\\\\\\\"the eventHandler\\\\\\\"\\\\n\\\\tself eventHandler\\\\n\\\\t\\\\tifNotNil: [list := self eventHandler methodRefList.\\\\n\\\\t\\\\t\\\\t(self eventHandler handlesMouseDown: nil)\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [adder value: HandMorph value: #grabMorph:]].\\\\n\\\\t\\\\\\\"If not those, then non-default raw events\\\\\\\"\\\\n\\\\t#(#keyStroke: #mouseDown: #mouseEnter: #mouseLeave: #mouseMove: #mouseUp: #doButtonAction )\\\\n\\\\t\\\\tdo: [:sel | \\\\n\\\\t\\\\t\\\\tcls := self class whichClassIncludesSelector: sel.\\\\n\\\\t\\\\t\\\\tcls\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil: [\\\\\\\"want more than default behavior\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcls == Morph\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [adder value: cls value: sel]]].\\\\n\\\\t\\\\\\\"The mechanism on a Button\\\\\\\"\\\\n\\\\t(self respondsTo: #actionSelector)\\\\n\\\\t\\\\tifTrue: [\\\\\\\"A button\\\\\\\"\\\\n\\\\t\\\\t\\\\tselector := self actionSelector.\\\\n\\\\t\\\\t\\\\tcls := self target class whichClassIncludesSelector: selector.\\\\n\\\\t\\\\t\\\\tcls\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil: [\\\\\\\"want more than default behavior\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcls == Morph\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [adder value: cls value: selector]]].\\\\n\\\\tToolSet openMessageList: list name: 'Actions of ' , self printString autoSelect: false! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 10/5/2000 19:21'!\\\\nshowHiders\\\\n\\\\tself allMorphsDo:[:m | m show]! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'wiz 7/13/2006 22:09'!\\\\nsightTargets: event \\\\n\\\\t\\\\\\\"Return the potential targets for the receiver.  \\\\n\\\\tThis is derived from Morph>>potentialEmbeddingTargets.\\\\\\\"\\\\n\\\\t| bullseye |\\\\n\\\\towner\\\\n\\\\t\\\\tifNil: [^ #()].\\\\n\\\\tbullseye := Point fromUserWithCursor: Cursor target.\\\\n\\\\tself targetFromMenu: (self potentialTargetsAt: bullseye) asKnownNameMenu popupAt: bullseye! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'wiz 7/13/2006 22:10'!\\\\nsightWorldTargets: event \\\\n\\\\t\\\\\\\"Return the potential targets for the receiver.  \\\\n\\\\tThis is derived from Morph>>potentialEmbeddingTargets.\\\\\\\"\\\\n\\\\t| bullseye myWorld |\\\\n\\\\tmyWorld := self world\\\\n\\\\t\\\\tifNil: [^ #()].\\\\n\\\\tbullseye := Point fromUserWithCursor: Cursor target.\\\\n\\\\tself targetFromMenu: ( myWorld morphsAt: bullseye) asKnownNameMenu popupAt: bullseye! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 10/5/2000 16:50'!\\\\nsubclassMorph\\\\n\\\\t\\\\\\\"Create a new subclass of this morph's class and make this morph be an instance of it.\\\\\\\"\\\\n\\\\n\\\\t| oldClass newClassName newClass newMorph |\\\\n\\\\toldClass _ self class.\\\\n\\\\tnewClassName _ FillInTheBlank\\\\n\\\\t\\\\trequest: 'Please give this new class a name'\\\\n\\\\t\\\\tinitialAnswer: oldClass name.\\\\n\\\\tnewClassName = '' ifTrue: [^ self].\\\\n\\\\t(Smalltalk includesKey: newClassName)\\\\n\\\\t\\\\tifTrue: [^ self inform: 'Sorry, there is already a class of that name'].\\\\n\\\\n\\\\tnewClass _ oldClass subclass: newClassName asSymbol\\\\n\\\\t\\\\tinstanceVariableNames: ''\\\\n\\\\t\\\\tclassVariableNames: ''\\\\n\\\\t\\\\tpoolDictionaries: ''\\\\n\\\\t\\\\tcategory: oldClass category asString.\\\\n\\\\tnewMorph _ self as: newClass.\\\\n\\\\tself become: newMorph.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'wiz 7/20/2004 01:25'!\\\\ntargetFromMenu: aMenu \\\\n\\\\t\\\\\\\"Some other morph become target of the receiver\\\\\\\"\\\\n\\\\t| newTarget |\\\\n\\\\t\\\\n\\\\tnewTarget := aMenu startUpWithCaption: self externalName , ' targets...'.\\\\n\\\\tnewTarget\\\\n\\\\t\\\\tifNil: [^ self].\\\\n\\\\tself target: newTarget! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'wiz 7/20/2004 12:22'!\\\\ntargetFromMenu: aMenu popupAt: aPoint \\\\n\\\\t\\\\\\\"Some other morph become target of the receiver\\\\\\\"\\\\n\\\\t| newTarget |\\\\n\\\\tnewTarget := aMenu startUpWithCaption: self externalName , ' targets... '\\\\n\\\\tat: aPoint .\\\\n\\\\t\\\\\\\"self halt .\\\\\\\"\\\\n\\\\tnewTarget\\\\n\\\\t\\\\tifNil: [^ self].\\\\n\\\\tself target: newTarget! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'wiz 7/17/2004 23:27'!\\\\ntargetWith: evt\\\\n\\\\t\\\\\\\"Some other morph become target of the receiver\\\\\\\"\\\\n\\\\t|  menu newTarget |\\\\n\\\\tmenu _ CustomMenu new.\\\\n\\\\tself potentialTargets  do: [:m | \\\\n\\\\t\\\\tmenu add: (m knownName ifNil:[m class name asString]) action: m].\\\\n\\\\tnewTarget _ menu startUpWithCaption: ( self externalName, ' targets...').\\\\n\\\\tnewTarget ifNil:[^self].\\\\n\\\\tself target: newTarget.! !\\\\n\\\\n\\\\n!Morph methodsFor: 'miscellaneous' stamp: 'dgd 9/27/2004 12:12'!\\\\nroundUpStrays\\\\n\\\\tself submorphs\\\\n\\\\t\\\\tdo: [:each | each roundUpStrays]! !\\\\n\\\\n!Morph methodsFor: 'miscellaneous' stamp: 'sw 7/20/2001 00:15'!\\\\nsetExtentFromHalo: anExtent\\\\n\\\\t\\\\\\\"The user has dragged the grow box such that the receiver's extent would be anExtent.  Do what's needed\\\\\\\"\\\\n\\\\n\\\\tself extent: anExtent! !\\\\n\\\\n!Morph methodsFor: 'miscellaneous' stamp: 'sw 2/2/2006 00:43'!\\\\nsetFlexExtentFromHalo: anExtent\\\\n\\\\t\\\\\\\"The user has dragged the grow box such that the receiver's extent would be anExtent.  Do what's needed.  Set the extent of the top renderer as indicated.\\\\\\\"\\\\n\\\\n\\\\tself addFlexShellIfNecessary.\\\\n\\\\tself topRendererOrSelf extent: anExtent! !\\\\n\\\\n\\\\n!Morph methodsFor: 'naming' stamp: 'fc 4/27/2004 21:58'!\\\\nchoosePartName\\\\n\\\\t\\\\\\\"Pick an unused name for this morph.\\\\\\\"\\\\n\\\\t| className |\\\\n\\\\tself world ifNil: [^nil].\\\\n\\\\t(self world model isKindOf: Component) ifTrue:\\\\n\\\\t\\\\t[self knownName ifNil: [^ self nameMeIn: self world]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifNotNil: [^ self renameMe]].\\\\n\\\\tclassName _ self class name.\\\\n\\\\t(className size > 5 and: [className endsWith: 'Morph'])\\\\n\\\\t\\\\tifTrue: [className _ className copyFrom: 1 to: className size - 5].\\\\n\\\\t^ self world model addPartNameLike: className withValue: self! !\\\\n\\\\n!Morph methodsFor: 'naming' stamp: 'sw 10/31/2000 09:28'!\\\\ndownshiftedNameOfObjectRepresented\\\\n\\\\t\\\\\\\"Answer the downshiped version of the external name of the object represented\\\\\\\"\\\\n\\\\n\\\\t^ self nameOfObjectRepresented asLowercase! !\\\\n\\\\n!Morph methodsFor: 'naming' stamp: 'dgd 8/30/2003 15:52'!\\\\ninnocuousName\\\\n\\\\t\\\\\\\"Choose an innocuous name for the receiver -- one that does not end in the word Morph\\\\\\\"\\\\n\\\\n\\\\t| className allKnownNames |\\\\n\\\\tclassName _ self defaultNameStemForInstances.\\\\n\\\\t(className size > 5 and: [className endsWith: 'Morph'])\\\\n\\\\t\\\\tifTrue: [className _ className copyFrom: 1 to: className size - 5].\\\\n\\\\tclassName _ className asString translated.\\\\n\\\\tallKnownNames _ self world ifNil: [OrderedCollection new] ifNotNil: [self world allKnownNames].\\\\n\\\\t^ Utilities keyLike: className asString satisfying:\\\\n\\\\t\\\\t[:aName | (allKnownNames includes: aName) not]! !\\\\n\\\\n!Morph methodsFor: 'naming' stamp: 'sw 9/21/2000 13:18'!\\\\nnameForFindWindowFeature\\\\n\\\\t\\\\\\\"Answer the name to show in a list of windows-and-morphs to represent the receiver\\\\\\\"\\\\n\\\\n\\\\t^ self knownName ifNil: [self class name]! !\\\\n\\\\n!Morph methodsFor: 'naming' stamp: 'dgd 2/22/2003 14:33'!\\\\nnameInModel\\\\n\\\\t\\\\\\\"Return the name for this morph in the underlying model or nil.\\\\\\\"\\\\n\\\\n\\\\t| w |\\\\n\\\\tw := self world.\\\\n\\\\tw isNil ifTrue: [^nil] ifFalse: [^w model nameFor: self]! !\\\\n\\\\n!Morph methodsFor: 'naming' stamp: 'sw 10/31/2000 09:24'!\\\\nnameOfObjectRepresented\\\\n\\\\t\\\\\\\"Answer the external name of the object represented\\\\\\\"\\\\n\\\\n\\\\t^ self externalName! !\\\\n\\\\n!Morph methodsFor: 'naming' stamp: 'gm 2/22/2003 13:16'!\\\\nname: aName \\\\n\\\\t(aName isString) ifTrue: [self setNameTo: aName]! !\\\\n\\\\n!Morph methodsFor: 'naming' stamp: 'dgd 2/16/2003 21:57'!\\\\nsetNamePropertyTo: aName \\\\n\\\\t\\\\\\\"change the receiver's externalName\\\\\\\"\\\\n\\\\tself assureExtension externalName: aName! !\\\\n\\\\n!Morph methodsFor: 'naming' stamp: 'yo 12/3/2004 17:02'!\\\\nsetNameTo: aName \\\\n\\\\t| nameToUse nameString |\\\\n\\\\tnameToUse := aName ifNotNil: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[(nameString := aName asString) notEmpty ifTrue: [nameString] ifFalse: ['*']].\\\\n\\\\tself setNamePropertyTo: nameToUse\\\\t\\\\\\\"no Texts here!!\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'naming' stamp: 'gm 2/22/2003 13:16'!\\\\nspecialNameInModel\\\\n\\\\t\\\\\\\"Return the name for this morph in the underlying model or nil.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Not an easy problem.  For now, take the first part of the mouseDownSelector symbol in my eventHandler (fillBrushMouseUp:morph: gives 'fillBrush').  5/26/97 tk\\\\\\\"\\\\n\\\\n\\\\t| hh |\\\\n\\\\t(self isMorphicModel) \\\\n\\\\t\\\\tifTrue: [^self slotName]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[self eventHandler ifNotNil: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self eventHandler mouseDownSelector ifNotNil: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[hh := self eventHandler mouseDownSelector indexOfSubCollection: 'Mouse'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\thh > 0 \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [^self eventHandler mouseDownSelector copyFrom: 1 to: hh - 1]].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself eventHandler mouseUpSelector ifNotNil: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[hh := self eventHandler mouseUpSelector indexOfSubCollection: 'Mouse'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\thh > 0 ifTrue: [^self eventHandler mouseUpSelector copyFrom: 1 to: hh - 1]]]].\\\\n\\\\n\\\\t\\\\\\\"\\\\t(self eventHandler mouseDownRecipient respondsTo: #nameFor:) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ self eventHandler mouseDownRecipient nameFor: self]]].\\\\t\\\\\\\"\\\\n\\\\t\\\\\\\"myModel _ self findA: MorphicModel.\\\\n\\\\t\\\\t\\\\tmyModel ifNotNil: [^ myModel slotName]\\\\\\\"\\\\n\\\\t^self world specialNameInModelFor: self! !\\\\n\\\\n!Morph methodsFor: 'naming' stamp: 'sw 10/27/2000 17:47'!\\\\ntryToRenameTo: aName\\\\n\\\\t\\\\\\\"A new name has been submited; make sure it's appropriate, and react accordingly.  This circumlocution provides the hook by which the simple renaming of a field can result in a change to variable names in a stack, etc.  There are some problems to worry about here.\\\\\\\"\\\\n\\\\n\\\\t| aStack |\\\\n\\\\t(self holdsSeparateDataForEachInstance and: [(aStack _ self stack) notNil])\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self topRendererOrSelf setNameTo: aName.\\\\n\\\\t\\\\t\\\\taStack reassessBackgroundShape]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self renameTo: aName]! !\\\\n\\\\n!Morph methodsFor: 'naming' stamp: 'sw 1/29/2001 02:49'!\\\\nupdateAllScriptingElements\\\\n\\\\t\\\\\\\"A sledge-hammer sweep from the world down to make sure that all live scripting elements are up to date.  Presently in eclipse, not sent at the moment.\\\\\\\"\\\\n\\\\n\\\\t| aPasteUp |\\\\n\\\\t(aPasteUp _ self topPasteUp) ifNotNil:\\\\n\\\\t\\\\t[aPasteUp allTileScriptingElements do: [:m | m bringUpToDate]]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'objects from disk' stamp: 'tk 11/26/2004 06:02'!\\\\nconvertToCurrentVersion: varDict refStream: smartRefStrm\\\\n\\\\n\\\\n\\\\n\\\\t(varDict at: #ClassName) == #DropShadowMorph ifTrue: [\\\\n\\\\n\\\\t\\\\tvarDict at: #ClassName put: #Morph.\\\\t\\\\\\\"so we don't\\\\n\\\\nrepeat this\\\\\\\"\\\\n\\\\n\\\\t\\\\t^ self convertNovember2000DropShadow: varDict using:\\\\n\\\\nsmartRefStrm\\\\n\\\\n\\\\t\\\\t\\\\t\\\\\\\"always returns a new object of a different class\\\\\\\"\\\\n\\\\n\\\\t].\\\\n\\\\n\\\\tvarDict at: 'costumee' ifPresent: [ :x |\\\\n\\\\n\\\\t\\\\tself convertAugust1998: varDict using: smartRefStrm].\\\\n\\\\n\\\\t\\\\t\\\\\\\"never returns a different object\\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\t\\\\\\\"5/18/2000\\\\\\\"\\\\n\\\\n\\\\tvarDict at: 'openToDragNDrop' ifPresent: [ :x | self\\\\n\\\\nenableDragNDrop: x ].\\\\n\\\\n\\\\t^super convertToCurrentVersion: varDict refStream: smartRefStrm.\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'objects from disk' stamp: 'dgd 2/22/2003 14:33'!\\\\nobjectForDataStream: refStrm \\\\n\\\\t\\\\\\\"I am being written out on an object file\\\\\\\"\\\\n\\\\n\\\\t| dp |\\\\n\\\\tself sqkPage ifNotNil: \\\\n\\\\t\\\\t\\\\t[refStrm rootObject == self | (refStrm rootObject == self sqkPage) \\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self url notEmpty \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[dp := self sqkPage copyForSaving.\\\\t\\\\\\\"be careful touching this object!!\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trefStrm replace: self with: dp.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^dp]]].\\\\n\\\\tself prepareToBeSaved.\\\\t\\\\\\\"Amen\\\\\\\"\\\\n\\\\t^self! !\\\\n\\\\n!Morph methodsFor: 'objects from disk' stamp: 'tk 7/11/1998 18:53'!\\\\nstoreDataOn: aDataStream\\\\n\\\\t\\\\\\\"Let all Morphs be written out.  All owners are weak references.  They only go out if the owner is in the tree being written.\\\\\\\"\\\\n\\\\t| cntInstVars cntIndexedVars ti localInstVars |\\\\n\\\\n\\\\t\\\\\\\"block my owner unless he is written out by someone else\\\\\\\"\\\\n\\\\tcntInstVars _ self class instSize.\\\\n\\\\tcntIndexedVars _ self basicSize.\\\\n\\\\tlocalInstVars _ Morph instVarNames.\\\\n\\\\tti _ 2.  \\\\n\\\\t((localInstVars at: ti) = 'owner') & (Morph superclass == Object) ifFalse:\\\\n\\\\t\\\\t\\\\t[self error: 'this method is out of date'].\\\\n\\\\taDataStream\\\\n\\\\t\\\\tbeginInstance: self class\\\\n\\\\t\\\\tsize: cntInstVars + cntIndexedVars.\\\\n\\\\t1 to: ti-1 do:\\\\n\\\\t\\\\t[:i | aDataStream nextPut: (self instVarAt: i)].\\\\n\\\\taDataStream nextPutWeak: owner.\\\\t\\\\\\\"owner only written if in our tree\\\\\\\"\\\\n\\\\tti+1 to: cntInstVars do:\\\\n\\\\t\\\\t[:i | aDataStream nextPut: (self instVarAt: i)].\\\\n\\\\t1 to: cntIndexedVars do:\\\\n\\\\t\\\\t[:i | aDataStream nextPut: (self basicAt: i)]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'other events' stamp: 'sw 8/1/2001 14:08'!\\\\nmenuButtonMouseEnter: event\\\\n\\\\t\\\\\\\"The mouse entered a menu-button area; show the menu cursor temporarily\\\\\\\"\\\\n\\\\n\\\\tevent hand showTemporaryCursor: Cursor menu! !\\\\n\\\\n!Morph methodsFor: 'other events' stamp: 'sw 8/1/2001 14:09'!\\\\nmenuButtonMouseLeave: event\\\\n\\\\t\\\\\\\"The mouse left a menu-button area; restore standard cursor\\\\\\\"\\\\n\\\\n\\\\tevent hand showTemporaryCursor: nil! !\\\\n\\\\n\\\\n!Morph methodsFor: 'parts bin' stamp: 'sw 8/12/2001 02:07'!\\\\ninitializeToStandAlone\\\\n\\\\t\\\\\\\"Set up the receiver, created by a #basicNew and now ready to be initialized, as a fully-formed morph suitable for providing a graphic for a parts bin surrogate, and, when such a parts-bin surrogate is clicked on, for attaching to the hand as a viable stand-alone morph.  Because of historical precedent, #initialize has been expected to handle this burden, though a great number of morphs actually cannot stand alone.  In any case, by default we call the historical #initialize, though unhappily, so that all existing morphs will work no worse than before when using this protocol.\\\\\\\"\\\\n\\\\n\\\\tself initialize! !\\\\n\\\\n!Morph methodsFor: 'parts bin' stamp: 'di 11/13/2000 00:49'!\\\\ninPartsBin\\\\n\\\\n\\\\tself isPartsDonor ifTrue: [^ true].\\\\n\\\\tself allOwnersDo: [:m | m isPartsBin ifTrue: [^ true]].\\\\n\\\\t^ false\\\\n! !\\\\n\\\\n!Morph methodsFor: 'parts bin' stamp: 'sw 8/12/97 14:16'!\\\\nisPartsBin\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'parts bin' stamp: 'md 2/27/2006 09:53'!\\\\nisPartsDonor\\\\n\\\\t\\\\\\\"answer whether the receiver is PartsDonor\\\\\\\"\\\\n\\\\textension ifNil: [^ false].\\\\n\\\\t^ extension isPartsDonor! !\\\\n\\\\n!Morph methodsFor: 'parts bin' stamp: 'md 2/27/2006 09:59'!\\\\nisPartsDonor: aBoolean \\\\n\\\\t\\\\\\\"change the receiver's isPartDonor property\\\\\\\"\\\\n\\\\t(extension isNil and: [aBoolean not]) ifTrue: [^ self].\\\\n\\\\tself assureExtension isPartsDonor: aBoolean! !\\\\n\\\\n!Morph methodsFor: 'parts bin' stamp: 'di 8/11/1998 13:02'!\\\\nmarkAsPartsDonor\\\\n\\\\t\\\\\\\"Mark the receiver specially so that mouse actions on it are interpreted as 'tearing off a copy'\\\\\\\"\\\\n\\\\n\\\\tself isPartsDonor: true! !\\\\n\\\\n!Morph methodsFor: 'parts bin' stamp: 'ar 10/6/2000 22:45'!\\\\npartRepresented\\\\n\\\\t^self! !\\\\n\\\\n!Morph methodsFor: 'parts bin' stamp: 'sw 4/22/1998 14:45'!\\\\nresidesInPartsBin\\\\n\\\\t\\\\\\\"Answer true if the receiver is, or has some ancestor owner who is, a parts bin\\\\\\\"\\\\n\\\\t^ owner ifNotNil: [owner residesInPartsBin] ifNil: [false]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'pen' stamp: 'sw 8/11/1998 16:46'!\\\\nchoosePenColor: evt\\\\n\\\\tself assuredPlayer choosePenColor: evt! !\\\\n\\\\n!Morph methodsFor: 'pen' stamp: 'sw 8/11/1998 16:46'!\\\\nchoosePenSize\\\\n\\\\tself assuredPlayer choosePenSize! !\\\\n\\\\n!Morph methodsFor: 'pen' stamp: 'sw 8/11/1998 16:53'!\\\\ngetPenColor\\\\n\\\\t^ self player ifNotNil: [self actorState getPenColor] ifNil: [Color green]! !\\\\n\\\\n!Morph methodsFor: 'pen' stamp: 'sw 8/11/1998 16:53'!\\\\ngetPenDown\\\\n\\\\tself player ifNil: [^ false].\\\\n\\\\t^ self actorState getPenDown! !\\\\n\\\\n!Morph methodsFor: 'pen' stamp: 'sw 8/11/1998 16:53'!\\\\ngetPenSize\\\\n\\\\tself player ifNil: [^ 1].\\\\n\\\\t^ self actorState getPenSize! !\\\\n\\\\n!Morph methodsFor: 'pen' stamp: 'sw 8/11/1998 16:46'!\\\\nliftPen\\\\n\\\\tself assuredPlayer liftPen! !\\\\n\\\\n!Morph methodsFor: 'pen' stamp: 'sw 8/11/1998 16:46'!\\\\nlowerPen\\\\n\\\\tself assuredPlayer lowerPen! !\\\\n\\\\n!Morph methodsFor: 'pen' stamp: 'sw 8/11/1998 16:46'!\\\\npenColor: aColor\\\\n\\\\tself assuredPlayer penColor: aColor! !\\\\n\\\\n!Morph methodsFor: 'pen' stamp: 'di 9/3/1998 10:38'!\\\\npenUpWhile: changeBlock \\\\n\\\\t\\\\\\\"Suppress any possible pen trail during the execution of changeBlock\\\\\\\"\\\\n\\\\tself getPenDown\\\\n\\\\t\\\\tifTrue: [\\\\\\\"If this is a costume for a player with its pen down, suppress any line.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tself liftPen.\\\\n\\\\t\\\\t\\\\t\\\\tchangeBlock value.\\\\n\\\\t\\\\t\\\\t\\\\tself lowerPen]\\\\n\\\\t\\\\tifFalse: [\\\\\\\"But usually, just do it.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tchangeBlock value]! !\\\\n\\\\n!Morph methodsFor: 'pen' stamp: 'dgd 2/22/2003 14:36'!\\\\ntrailMorph\\\\n\\\\t\\\\\\\"You can't draw trails on me, but try my owner.\\\\\\\"\\\\n\\\\n\\\\towner isNil ifTrue: [^nil].\\\\n\\\\t^owner trailMorph! !\\\\n\\\\n\\\\n!Morph methodsFor: 'printing' stamp: 'bf 7/17/2003 12:53'!\\\\nclipText\\\\n\\\\t\\\\\\\"Copy the text in the receiver or in its submorphs to the clipboard\\\\\\\"\\\\n\\\\t| content |\\\\n\\\\t\\\\\\\"My own text\\\\\\\"\\\\n\\\\tcontent _ self userString.\\\\n\\\\t\\\\\\\"Or in my submorphs\\\\\\\"\\\\n\\\\tcontent ifNil: [\\\\n\\\\t\\\\t| list |\\\\n\\\\t\\\\tlist _ self allStringsAfter: nil.\\\\n\\\\t\\\\tlist notEmpty ifTrue: [\\\\n\\\\t\\\\t\\\\tcontent _ String streamContents: [:stream |\\\\n\\\\t\\\\t\\\\t\\\\tlist do: [:each | stream nextPutAll: each; cr]]]].\\\\n\\\\t\\\\\\\"Did we find something?\\\\\\\"\\\\n\\\\tcontent\\\\n\\\\t\\\\tifNil: [self flash \\\\\\\"provide feedback\\\\\\\"]\\\\n\\\\t\\\\tifNotNil: [Clipboard clipboardText: content].! !\\\\n\\\\n!Morph methodsFor: 'printing' stamp: 'dgd 2/22/2003 14:27'!\\\\ncolorString: aColor \\\\n\\\\taColor isNil ifTrue: [^'nil'].\\\\n\\\\tColor colorNames \\\\n\\\\t\\\\tdo: [:colorName | aColor = (Color perform: colorName) ifTrue: [^'Color ' , colorName]].\\\\n\\\\t^aColor storeString! !\\\\n\\\\n!Morph methodsFor: 'printing'!\\\\nconstructorString\\\\n\\\\n\\\\t^ String streamContents: [:s | self printConstructorOn: s indent: 0].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'printing'!\\\\nfullPrintOn: aStream\\\\n\\\\n\\\\taStream nextPutAll: self class name , ' newBounds: (';\\\\n\\\\t\\\\tprint: bounds;\\\\n\\\\t\\\\tnextPutAll: ') color: ' , (self colorString: color)! !\\\\n\\\\n!Morph methodsFor: 'printing'!\\\\ninitString\\\\n\\\\n\\\\t^ String streamContents: [:s | self fullPrintOn: s]! !\\\\n\\\\n!Morph methodsFor: 'printing' stamp: 'RAA 2/26/2001 07:22'!\\\\nmorphReport\\\\n\\\\n\\\\t^self morphReportFor: #(hResizing vResizing bounds)! !\\\\n\\\\n!Morph methodsFor: 'printing' stamp: 'RAA 2/25/2001 17:47'!\\\\nmorphReportFor: attributeList\\\\n\\\\n\\\\t| s |\\\\n\\\\n\\\\ts _ WriteStream on: String new.\\\\n\\\\tself\\\\n\\\\t\\\\tmorphReportFor: attributeList \\\\n\\\\t\\\\ton: s \\\\n\\\\t\\\\tindent: 0.\\\\n\\\\tStringHolder new contents: s contents; openLabel: 'morph report'! !\\\\n\\\\n!Morph methodsFor: 'printing' stamp: 'RAA 2/25/2001 17:48'!\\\\nmorphReportFor: attributeList on: aStream indent: anInteger\\\\n\\\\n\\\\tanInteger timesRepeat: [aStream tab].\\\\n\\\\taStream print: self; space.\\\\n\\\\tattributeList do: [ :a | aStream print: (self perform: a); space].\\\\n\\\\taStream cr.\\\\n\\\\tsubmorphs do: [ :sub |\\\\n\\\\t\\\\tsub morphReportFor: attributeList on: aStream indent: anInteger + 1\\\\n\\\\t].! !\\\\n\\\\n!Morph methodsFor: 'printing' stamp: 'RAA 2/1/2001 17:42'!\\\\npagesHandledAutomatically\\\\n\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'printing'!\\\\nprintConstructorOn: aStream indent: level\\\\n\\\\n\\\\t^ self printConstructorOn: aStream indent: level nodeDict: IdentityDictionary new\\\\n! !\\\\n\\\\n!Morph methodsFor: 'printing'!\\\\nprintConstructorOn: aStream indent: level nodeDict: nodeDict\\\\n\\\\t| nodeString |\\\\n\\\\t(nodeString _ nodeDict at: self ifAbsent: [nil])\\\\n\\\\t\\\\tifNotNil: [^ aStream nextPutAll: nodeString].\\\\n\\\\tsubmorphs isEmpty ifFalse: [aStream nextPutAll: '('].\\\\n\\\\taStream nextPutAll: '('.\\\\n\\\\tself fullPrintOn: aStream.\\\\n\\\\taStream nextPutAll: ')'.\\\\n\\\\tsubmorphs isEmpty ifTrue: [^ self].\\\\n\\\\tsubmorphs size <= 4\\\\n\\\\tifTrue:\\\\n\\\\t\\\\t[aStream crtab: level+1;\\\\n\\\\t\\\\t\\\\tnextPutAll: 'addAllMorphs: (Array'.\\\\n\\\\t\\\\t1 to: submorphs size do:\\\\n\\\\t\\\\t\\\\t[:i | aStream crtab: level+1; nextPutAll: 'with: '.\\\\n\\\\t\\\\t\\\\t(submorphs at: i) printConstructorOn: aStream indent: level+1 nodeDict: nodeDict].\\\\n\\\\t\\\\taStream nextPutAll: '))']\\\\n\\\\tifFalse:\\\\n\\\\t\\\\t[aStream crtab: level+1;\\\\n\\\\t\\\\t\\\\tnextPutAll: 'addAllMorphs: ((Array new: ', submorphs size printString, ')'.\\\\n\\\\t\\\\t1 to: submorphs size do:\\\\n\\\\t\\\\t\\\\t[:i |\\\\n\\\\t\\\\t\\\\taStream crtab: level+1; nextPutAll: 'at: ', i printString, ' put: '.\\\\n\\\\t\\\\t\\\\t(submorphs at: i) printConstructorOn: aStream indent: level+1 nodeDict: nodeDict.\\\\n\\\\t\\\\t\\\\taStream nextPutAll: ';'].\\\\n\\\\t\\\\taStream crtab: level+1; nextPutAll: 'yourself))']! !\\\\n\\\\n!Morph methodsFor: 'printing' stamp: 'dgd 2/22/2003 19:05'!\\\\nprintOn: aStream \\\\n\\\\t| aName |\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\t(aName := self knownName) notNil \\\\n\\\\t\\\\tifTrue: [aStream nextPutAll: '<' , aName , '>'].\\\\n\\\\taStream nextPutAll: '('.\\\\n\\\\taStream\\\\n\\\\t\\\\tprint: self identityHash;\\\\n\\\\t\\\\tnextPutAll: ')'! !\\\\n\\\\n!Morph methodsFor: 'printing' stamp: 'RAA 9/18/2000 10:22'!\\\\nprintSpecs\\\\n\\\\n\\\\t| printSpecs |\\\\n\\\\n\\\\tprintSpecs _ self valueOfProperty: #PrintSpecifications.\\\\n\\\\tprintSpecs ifNil: [\\\\n\\\\t\\\\tprintSpecs _ PrintSpecifications defaultSpecs.\\\\n\\\\t\\\\tself printSpecs: printSpecs.\\\\n\\\\t].\\\\n\\\\t^printSpecs! !\\\\n\\\\n!Morph methodsFor: 'printing' stamp: 'RAA 9/18/2000 10:21'!\\\\nprintSpecs: aPrintSecification\\\\n\\\\n\\\\tself setProperty: #PrintSpecifications toValue: aPrintSecification.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'printing' stamp: 'jm 5/28/1998 18:00'!\\\\nprintStructureOn: aStream indent: tabCount\\\\n\\\\n\\\\ttabCount timesRepeat: [aStream tab].\\\\n\\\\tself printOn: aStream.\\\\n\\\\taStream cr.\\\\n\\\\tself submorphsDo: [:m | m printStructureOn: aStream indent: tabCount + 1].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'printing' stamp: 'sw 10/27/2000 17:45'!\\\\nreportableSize\\\\n\\\\t\\\\\\\"Answer a size worth reporting as the receiver's size in a list view\\\\\\\"\\\\n\\\\n\\\\t| total |\\\\n\\\\ttotal _ super reportableSize.\\\\n\\\\tsubmorphs do:\\\\n\\\\t\\\\t[:m | total _ total + m reportableSize].\\\\n\\\\t^ total! !\\\\n\\\\n!Morph methodsFor: 'printing' stamp: 'jm 5/28/1998 17:58'!\\\\nstructureString\\\\n\\\\t\\\\\\\"Return a string that showing this morph and all its submorphs in an indented list that reflects its structure.\\\\\\\"\\\\n\\\\n\\\\t| s |\\\\n\\\\ts _ WriteStream on: (String new: 1000).\\\\n\\\\tself printStructureOn: s indent: 0.\\\\n\\\\t^ s contents\\\\n! !\\\\n\\\\n!Morph methodsFor: 'printing' stamp: 'sw 10/27/2000 17:47'!\\\\ntextToPaste\\\\n\\\\t\\\\\\\"If the receiver has text to offer pasting, answer it, else answer nil\\\\\\\"\\\\n\\\\n\\\\t^ nil! !\\\\n\\\\n\\\\n!Morph methodsFor: 'rotate scale and flex' stamp: 'sw 3/30/2005 03:44'!\\\\naddFlexShell\\\\n\\\\t\\\\\\\"Wrap a rotating and scaling shell around this morph.\\\\\\\"\\\\n\\\\n\\\\t| oldHalo flexMorph myWorld anIndex |\\\\n\\\\n\\\\tmyWorld _ self world.\\\\n\\\\toldHalo _ self halo.\\\\n\\\\tanIndex _ self owner submorphIndexOf: self.\\\\n\\\\tself owner addMorph: (flexMorph _ self newTransformationMorph asFlexOf: self)\\\\n\\\\t\\\\tasElementNumber: anIndex.\\\\n\\\\tself transferStateToRenderer: flexMorph.\\\\n\\\\toldHalo ifNotNil: [oldHalo setTarget: flexMorph].\\\\n\\\\tmyWorld ifNotNil: [myWorld startSteppingSubmorphsOf: flexMorph].\\\\n\\\\n\\\\t^ flexMorph! !\\\\n\\\\n!Morph methodsFor: 'rotate scale and flex' stamp: 'di 11/28/2001 18:22'!\\\\naddFlexShellIfNecessary\\\\n\\\\t\\\\\\\"If this morph requires a flex shell to scale or rotate,\\\\n\\\\t\\\\tthen wrap it in one and return it.\\\\n\\\\tPolygons, eg, may override to return themselves.\\\\\\\"\\\\n\\\\n\\\\t^ self addFlexShell! !\\\\n\\\\n!Morph methodsFor: 'rotate scale and flex' stamp: 'ar 11/24/1998 14:19'!\\\\nkeepsTransform\\\\n\\\\t\\\\\\\"Return true if the receiver will keep it's transform while being grabbed by a hand.\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'rotate scale and flex' stamp: 'ar 2/16/1999 18:59'!\\\\nnewTransformationMorph\\\\n\\\\t^TransformationMorph new! !\\\\n\\\\n!Morph methodsFor: 'rotate scale and flex' stamp: 'mu 3/29/2004 17:33'!\\\\nremoveFlexShell\\\\n\\\\tself isFlexed\\\\n\\\\t\\\\tifTrue: [self owner removeFlexShell]! !\\\\n\\\\n!Morph methodsFor: 'rotate scale and flex' stamp: 'jm 4/25/1998 05:19'!\\\\nrotationDegrees\\\\n\\\\t\\\\\\\"Default implementation.\\\\\\\"\\\\n\\\\n\\\\t^ 0.0\\\\n! !\\\\n\\\\n\\\\n!Morph methodsFor: 'rounding' stamp: 'mk 8/7/2005 10:03'!\\\\ncornerStyle: aSymbol\\\\n\\\\t\\\\\\\"This method makes it possible to set up desired corner style. aSymbol has to be one of:\\\\n\\\\t\\\\t#square\\\\n\\\\t\\\\t#rounded\\\\\\\"\\\\n\\\\n\\\\taSymbol == #square\\\\n\\\\t\\\\tifTrue:[self removeProperty: #cornerStyle]\\\\n\\\\t\\\\tifFalse:[self setProperty: #cornerStyle toValue: aSymbol].\\\\n\\\\tself changed! !\\\\n\\\\n!Morph methodsFor: 'rounding' stamp: 'mk 8/14/2005 13:31'!\\\\nroundedCorners\\\\n\\\\t\\\\\\\"Return a list of those corners to round.\\\\n\\\\n\\\\t\\\\t1-4\\\\n\\\\t\\\\t|  |\\\\n\\\\t\\\\t2-3\\\\n\\\\n\\\\tReturned array contains `codes' of those corners, which should be rounded.\\\\n\\\\n\\\\t1 denotes top-left corner\\\\n\\\\t2 denotes bottom-left corner\\\\n\\\\t3 denotes bottom-right corner\\\\n\\\\t4 denotes top-right corner.\\\\n\\\\n\\\\tThus, if this method returned #(2 3) that would mean that bottom (left and right)\\\\n\\\\tcorners would be rounded whereas top (left and right) corners wouldn't be rounded.\\\\n\\\\n\\\\tThis method returns #(1 2 3 4) and that means that all the corners should be rounded.\\\\\\\"\\\\n\\\\n\\\\t^ #(1 2 3 4)! !\\\\n\\\\n!Morph methodsFor: 'rounding' stamp: 'dgd 9/6/2003 18:27'!\\\\nroundedCornersString\\\\n\\\\t\\\\\\\"Answer the string to put in a menu that will invite the user to \\\\n\\\\tswitch to the opposite corner-rounding mode\\\\\\\"\\\\n\\\\t^ (self wantsRoundedCorners\\\\n\\\\t\\\\tifTrue: ['<yes>']\\\\n\\\\t\\\\tifFalse: ['<no>'])\\\\n\\\\t\\\\t, 'round corners' translated! !\\\\n\\\\n!Morph methodsFor: 'rounding' stamp: 'ar 12/25/2001 19:44'!\\\\ntoggleCornerRounding\\\\n\\\\tself cornerStyle == #rounded\\\\n\\\\t\\\\tifTrue: [self cornerStyle: #square]\\\\n\\\\t\\\\tifFalse: [self cornerStyle: #rounded].\\\\n\\\\tself changed! !\\\\n\\\\n!Morph methodsFor: 'rounding' stamp: 'ar 12/22/2001 22:45'!\\\\nwantsRoundedCorners\\\\n\\\\t\\\\\\\"Return true if the receiver wants its corners rounded\\\\\\\"\\\\n\\\\t^ self cornerStyle == #rounded! !\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'dgd 7/4/2004 12:41'!\\\\narrowDeltaFor: aGetSelector \\\\n\\\\t\\\\\\\"Answer a number indicating the default arrow delta to be  \\\\n\\\\tused in a numeric readout with the given get-selector. This is  \\\\n\\\\ta hook that subclasses of Morph can reimplement.\\\\\\\"\\\\n\\\\taGetSelector == #getScaleFactor\\\\n\\\\t\\\\tifTrue: [^ 0.1].\\\\n\\\\t^ 1! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'ar 1/25/2001 12:50'!\\\\nasEmptyPermanentScriptor\\\\n\\\\t\\\\\\\"Answer a new empty permanent scriptor derived from info deftly secreted in the receiver.  Good grief\\\\\\\"\\\\n\\\\n\\\\t| aScriptor aPlayer |\\\\n\\\\taPlayer _ self valueOfProperty: #newPermanentPlayer.\\\\n\\\\taPlayer assureUniClass.\\\\n\\\\taScriptor _  aPlayer newScriptorAround: nil.\\\\n\\\\taScriptor position: (self world primaryHand position - (10 @ 10)).\\\\n\\\\taPlayer updateAllViewersAndForceToShow: #scripts.\\\\n\\\\t^ aScriptor! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'sw 10/17/2001 09:46'!\\\\nbringTileScriptingElementsUpToDate\\\\n\\\\t\\\\\\\"Send #bringUpToDate to every tile-scripting element of the receiver, including possibly the receiver itself\\\\\\\"\\\\n\\\\n\\\\t(self allMorphs select: [:s | s isTileScriptingElement]) do:\\\\n\\\\t\\\\t[:el | el bringUpToDate]! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'RAA 3/9/2001 11:39'!\\\\nbringUpToDate\\\\n\\\\n\\\\t(self buttonProperties ifNil: [^self]) bringUpToDate! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'sw 7/19/2005 01:55'!\\\\ndefaultFloatPrecisionFor: aGetSelector\\\\n\\\\t\\\\\\\"Answer a number indicating the default float precision to be used in a numeric readout for which the receiver provides the data.   Individual morphs can override this.  Showing fractional values for readouts of getCursor was in response to an explicit request from ack\\\\\\\"\\\\n\\\\n\\\\t(self renderedMorph decimalPlacesForGetter: aGetSelector) ifNotNilDo: [:places | ^ (Utilities floatPrecisionForDecimalPlaces: places)].\\\\n\\\\n\\\\t(#(getCursor getNumericValue getNumberAtCursor getCursorWrapped getScaleFactor getUnitVector getAlpha) includes: aGetSelector)\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[^ 0.01].\\\\n\\\\t^ 1! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'sw 8/12/2005 13:26'!\\\\nfilterViewerCategoryDictionary: dict\\\\n\\\\t\\\\\\\"dict has keys of categories and values of priority.\\\\n\\\\tYou can re-order or remove categories here.\\\\\\\"\\\\n\\\\n\\\\tself wantsConnectionVocabulary\\\\n\\\\t\\\\tifFalse: [ dict removeKey: #'connections to me' ifAbsent: [].\\\\n\\\\t\\\\t\\\\tdict removeKey: #connection ifAbsent: []].\\\\n\\\\tself wantsConnectorVocabulary\\\\n\\\\t\\\\tifFalse: [ dict removeKey: #connector ifAbsent: [] ].\\\\n\\\\tself wantsEmbeddingsVocabulary\\\\n\\\\t\\\\tifFalse: [dict removeKey: #embeddings ifAbsent: []].\\\\n\\\\tPreferences eToyFriendly\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[dict removeKey: #layout ifAbsent: []].\\\\n\\\\t(Preferences eToyFriendly or: [self isWorldMorph not]) ifTrue:\\\\n\\\\t\\\\t[dict removeKey: #preferences ifAbsent: []].! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'tk 10/1/97 18:23'!\\\\nisTileLike\\\\n\\\\t\\\\\\\"Cannot be dropped into a script\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'RAA 3/9/2001 11:47'!\\\\nisTileScriptingElement\\\\n\\\\n\\\\t^ self hasButtonProperties and: [self buttonProperties isTileScriptingElement]! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'sw 8/11/1998 16:53'!\\\\njettisonScripts\\\\n\\\\tself player ifNotNil: [self player class jettisonScripts]! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'LC 9/28/1999 21:57'!\\\\nmakeAllTilesColored\\\\n\\\\tself allMorphsDo: \\\\n\\\\t\\\\t[:m | m restoreTypeColor]! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'LC 9/28/1999 21:57'!\\\\nmakeAllTilesGreen\\\\n\\\\tself allMorphsDo: \\\\n\\\\t\\\\t[:m | m useUniformTileColor]! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'sw 8/11/1998 16:59'!\\\\nrestoreTypeColor\\\\n\\\\tself player ifNotNil: [self player allScriptEditors do:\\\\n\\\\t\\\\t[:anEditor | anEditor allMorphsDo:\\\\n\\\\t\\\\t\\\\t[:m | m restoreTypeColor]]]! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'sw 8/11/1998 16:46'!\\\\nscriptEditorFor: aScriptName\\\\n\\\\t^ self assuredPlayer scriptEditorFor: aScriptName! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'sw 7/5/2005 00:31'!\\\\ntearOffTile\\\\n\\\\t\\\\\\\"Tear off a tile representing the player associated with the receiver.  This is obtained from the top renderer\\\\\\\"\\\\n\\\\n\\\\t^ self topRendererOrSelf assuredPlayer tearOffTileForSelf! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'nk 8/21/2004 12:17'!\\\\ntriggerScript: aSymbol\\\\n\\\\t\\\\\\\"Have my player perform the script of the given name, which is guaranteed to exist.\\\\\\\"\\\\n\\\\n\\\\t^self assuredPlayer triggerScript: aSymbol! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'sw 8/11/1998 16:55'!\\\\nuseUniformTileColor\\\\n\\\\tself player ifNotNil:\\\\n\\\\t\\\\t[self player allScriptEditors do:\\\\n\\\\t\\\\t\\\\t[:anEditor | anEditor allMorphsDo:\\\\n\\\\t\\\\t\\\\t\\\\t[:m | m useUniformTileColor]]]! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'sw 10/18/2000 10:32'!\\\\nviewAfreshIn: aPasteUp showingScript: aScriptName at: aPosition\\\\n\\\\t\\\\\\\"Obtain a smartly updated ScriptEditor for the given script name and zap it into place at aPosition\\\\\\\"\\\\n\\\\n\\\\t| anEditor |\\\\n\\\\tself player updateAllViewersAndForceToShow: #scripts.\\\\n\\\\tanEditor _ self player scriptEditorFor: aScriptName.\\\\n\\\\taPasteUp ifNotNil: [aPasteUp addMorph: anEditor].\\\\n\\\\tanEditor position: aPosition.\\\\n\\\\tanEditor currentWorld startSteppingSubmorphsOf: anEditor! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'nk 8/21/2004 08:39'!\\\\nwantsConnectionVocabulary\\\\n\\\\tsubmorphs ifNil: [ ^true ].\\\\t\\\\\\\"called from EToyVocabulary>>initialize after basicNew\\\\\\\"\\\\n\\\\n\\\\t^ (Preferences valueOfFlag: #alwaysShowConnectionVocabulary)\\\\n\\\\t\\\\tor: [ self connections isEmpty not ]! !\\\\n\\\\n\\\\n\\\\n!Morph methodsFor: 'stepping and presenter' stamp: 'sw 3/22/2000 14:27'!\\\\narrangeToStartStepping\\\\n\\\\t\\\\\\\"Arrange to start getting sent the 'step' message, but don't do that initial #step call that startStepping does\\\\\\\"\\\\n\\\\n\\\\tself arrangeToStartSteppingIn: self world! !\\\\n\\\\n!Morph methodsFor: 'stepping and presenter' stamp: 'sw 3/22/2000 14:26'!\\\\narrangeToStartSteppingIn: aWorld\\\\n\\\\t\\\\\\\"Start getting sent the 'step' message in aWorld.  Like startSteppingIn:, but without the initial one to get started'\\\\\\\"\\\\n\\\\taWorld ifNotNil:\\\\n\\\\t\\\\t[aWorld startStepping: self.\\\\n\\\\t\\\\tself changed]! !\\\\n\\\\n!Morph methodsFor: 'stepping and presenter' stamp: 'sw 3/22/2000 14:28'!\\\\nisStepping\\\\n\\\\t\\\\\\\"Return true if the receiver is currently stepping in its world\\\\\\\"\\\\n\\\\t| aWorld |\\\\n\\\\t^ (aWorld _ self world)\\\\n\\\\t\\\\tifNil:\\\\t\\\\t[false]\\\\n\\\\t\\\\tifNotNil:\\\\t[aWorld isStepping: self]! !\\\\n\\\\n!Morph methodsFor: 'stepping and presenter' stamp: 'ar 10/22/2000 16:43'!\\\\nisSteppingSelector: aSelector\\\\n\\\\t\\\\\\\"Return true if the receiver is currently stepping in its world\\\\\\\"\\\\n\\\\t| aWorld |\\\\n\\\\t^ (aWorld _ self world)\\\\n\\\\t\\\\tifNil:\\\\t\\\\t[false]\\\\n\\\\t\\\\tifNotNil:\\\\t[aWorld isStepping: self selector: aSelector]! !\\\\n\\\\n!Morph methodsFor: 'stepping and presenter'!\\\\nstart\\\\n\\\\t\\\\\\\"Start running my script. For ordinary morphs, this means start stepping.\\\\\\\"\\\\n\\\\n\\\\tself startStepping.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'stepping and presenter' stamp: 'ar 1/31/2001 13:07'!\\\\nstartStepping\\\\n\\\\t\\\\\\\"Start getting sent the 'step' message.\\\\\\\"\\\\n\\\\tself startStepping: #stepAt: at: Time millisecondClockValue arguments: nil stepTime: nil.! !\\\\n\\\\n!Morph methodsFor: 'stepping and presenter' stamp: 'sw 7/19/1998 11:51'!\\\\nstartSteppingIn: aWorld\\\\n\\\\t\\\\\\\"Start getting sent the 'step' message in aWorld\\\\\\\"\\\\n\\\\n\\\\tself step.  \\\\\\\"one to get started!!\\\\\\\"\\\\n\\\\taWorld ifNotNil: [aWorld startStepping: self].\\\\n\\\\tself changed! !\\\\n\\\\n!Morph methodsFor: 'stepping and presenter' stamp: 'ar 10/22/2000 16:42'!\\\\nstartSteppingSelector: aSelector\\\\n\\\\t\\\\\\\"Start getting sent the 'step' message.\\\\\\\"\\\\n\\\\tself startStepping: aSelector at: Time millisecondClockValue arguments: nil stepTime: nil.! !\\\\n\\\\n!Morph methodsFor: 'stepping and presenter' stamp: 'ar 10/22/2000 16:36'!\\\\nstartStepping: aSelector at: scheduledTime arguments: args stepTime: stepTime\\\\n\\\\t\\\\\\\"Start stepping the receiver\\\\\\\"\\\\n\\\\t| w |\\\\n\\\\tw _ self world.\\\\n\\\\tw ifNotNil: [\\\\n\\\\t\\\\tw startStepping: self at: scheduledTime selector: aSelector arguments: args stepTime: stepTime.\\\\n\\\\t\\\\tself changed].! !\\\\n\\\\n!Morph methodsFor: 'stepping and presenter' stamp: 'ar 2/12/2001 17:04'!\\\\nstep\\\\n\\\\t\\\\\\\"Do some periodic activity. Use startStepping/stopStepping to start and stop getting sent this message. The time between steps is specified by this morph's answer to the stepTime message.  The generic version dispatches control to the player, if any.  The nasty circumlocation about owner's transformation is necessitated by the flexing problem that the player remains in the properties dictionary both of the flex and the real morph.  In the current architecture, only the top renderer's pointer to the player should actually be honored for the purpose of firing.\\\\\\\"\\\\n! !\\\\n\\\\n!Morph methodsFor: 'stepping and presenter' stamp: 'ar 2/12/2001 18:05'!\\\\nstepAt: millisecondClockValue\\\\n\\\\t\\\\\\\"Do some periodic activity. Use startStepping/stopStepping to start and stop getting sent this message. The time between steps is specified by this morph's answer to the stepTime message.\\\\n\\\\tThe millisecondClockValue parameter gives the value of the millisecond clock at the moment of dispatch.\\\\n\\\\tDefault is to dispatch to the parameterless step method for the morph, but this protocol makes it possible for some morphs to do differing things depending on the clock value\\\\\\\"\\\\n\\\\tself player ifNotNilDo:[:p| p stepAt: millisecondClockValue].\\\\n\\\\tself step\\\\n! !\\\\n\\\\n!Morph methodsFor: 'stepping and presenter'!\\\\nstop\\\\n\\\\t\\\\\\\"Stop running my script. For ordinary morphs, this means stop stepping.\\\\\\\"\\\\n\\\\n\\\\tself stopStepping.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'stepping and presenter' stamp: 'ar 12/15/2000 00:00'!\\\\nstopStepping\\\\n\\\\t\\\\\\\"Stop getting sent the 'step' message.\\\\\\\"\\\\n\\\\n\\\\t| w |\\\\n\\\\tw _ self world.\\\\n\\\\tw ifNotNil: [w stopStepping: self].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'stepping and presenter' stamp: 'ar 12/15/2000 00:00'!\\\\nstopSteppingSelector: aSelector\\\\n\\\\t\\\\\\\"Stop getting sent the given message.\\\\\\\"\\\\n\\\\t| w |\\\\n\\\\tw _ self world.\\\\n\\\\tw ifNotNil: [w stopStepping: self selector: aSelector].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'stepping and presenter' stamp: 'sw 10/11/1999 12:59'!\\\\nstopSteppingSelfAndSubmorphs\\\\n\\\\tself allMorphsDo: [:m | m stopStepping]\\\\n! !\\\\n\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'ar 3/18/2001 00:11'!\\\\nactiveHand\\\\n\\\\t^ActiveHand! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'di 11/13/2000 01:00'!\\\\nallOwners\\\\n\\\\t\\\\\\\"Return the owners of the reciever\\\\\\\"\\\\n\\\\n\\\\t^ Array streamContents: [:strm | self allOwnersDo: [:m | strm nextPut: m]]! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'ar 9/14/2000 16:47'!\\\\nallOwnersDo: aBlock\\\\n\\\\t\\\\\\\"Evaluate aBlock with all owners of the receiver\\\\\\\"\\\\n\\\\towner ifNotNil:[^owner withAllOwnersDo: aBlock].! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'di 11/13/2000 00:48'!\\\\nfirstOwnerSuchThat: conditionBlock\\\\n\\\\n\\\\tself allOwnersDo: [:m | (conditionBlock value: m) ifTrue: [^ m]].\\\\n\\\\t^ nil\\\\n! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'ar 10/3/2000 15:36'!\\\\nhasOwner: aMorph\\\\n\\\\t\\\\\\\"Return true if the receiver has aMorph in its owner chain\\\\\\\"\\\\n\\\\taMorph ifNil:[^true].\\\\n\\\\tself allOwnersDo:[:m| m = aMorph ifTrue:[^true]].\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'dgd 9/1/2004 17:17'!\\\\nisInDockingBar\\\\n\\\\t\\\\\\\"answer if the receiver is in a menu bar\\\\\\\"\\\\n\\\\t^ (owner notNil) and: [owner isDockingBar]! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'dgd 9/18/2004 15:56'!\\\\nisInSystemWindow\\\\n\\\\t\\\\\\\"answer if the receiver is in a system window\\\\\\\"\\\\n\\\\t^ owner isMorph and:[owner isSystemWindow or:[owner isInSystemWindow]]! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'dgd 2/22/2003 19:05'!\\\\nisInWorld\\\\n\\\\t\\\\\\\"Return true if this morph is in a world.\\\\\\\"\\\\n\\\\n\\\\t^self world notNil! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'sw 8/29/2000 14:55'!\\\\nmorphPreceding: aSubmorph\\\\n\\\\t\\\\\\\"Answer the morph immediately preceding aSubmorph, or nil if none\\\\\\\"\\\\n\\\\n\\\\t| anIndex |\\\\n\\\\tanIndex _ submorphs indexOf: aSubmorph ifAbsent: [^ nil].\\\\n\\\\t^ anIndex > 1\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[submorphs at: (anIndex - 1)]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[nil]! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'di 11/12/2000 16:13'!\\\\nnearestOwnerThat: conditionBlock\\\\n\\\\t\\\\\\\"Return the first enclosing morph for which aBlock evaluates to true, or nil if none\\\\\\\"\\\\n\\\\n\\\\t^ self firstOwnerSuchThat: conditionBlock\\\\n! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'di 11/13/2000 00:49'!\\\\norOwnerSuchThat: conditionBlock\\\\n\\\\n\\\\t(conditionBlock value: self) ifTrue: [^ self].\\\\n\\\\tself allOwnersDo: [:m | (conditionBlock value: m) ifTrue: [^ m]].\\\\n\\\\t^ nil\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'di 11/13/2000 00:50'!\\\\noutermostMorphThat: conditionBlock\\\\n\\\\t\\\\\\\"Return the outermost containing morph for which aBlock is true, or nil if none\\\\\\\"\\\\n\\\\n\\\\t| outermost |\\\\n\\\\tself allOwnersDo: [:m | (conditionBlock value: m) ifTrue: [outermost _ m]].\\\\n\\\\t^ outermost! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'ar 3/18/2001 00:12'!\\\\noutermostWorldMorph\\\\n\\\\n\\\\t| outer |\\\\n\\\\tWorld ifNotNil:[^World].\\\\n\\\\tself flag: #arNote. \\\\\\\"stuff below is really only for MVC\\\\\\\"\\\\n\\\\touter _ self outermostMorphThat: [ :x | x isWorldMorph].\\\\n\\\\touter ifNotNil: [^outer].\\\\n\\\\tself isWorldMorph ifTrue: [^self].\\\\n\\\\t^nil! !\\\\n\\\\n!Morph methodsFor: 'structure'!\\\\nowner\\\\n\\\\t\\\\\\\"Returns the owner of this morph, which may be nil.\\\\\\\"\\\\n\\\\n\\\\t^ owner! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'di 11/12/2000 16:18'!\\\\nownerThatIsA: aClass\\\\n\\\\t\\\\\\\"Return the first enclosing morph that is a kind of aClass, or nil if none\\\\\\\"\\\\n\\\\n\\\\t^ self firstOwnerSuchThat: [:m | m isKindOf: aClass]! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'di 11/12/2000 16:20'!\\\\nownerThatIsA: firstClass orA: secondClass\\\\n\\\\t\\\\\\\"Return the first enclosing morph that is a kind of one of the two classes given, or nil if none\\\\\\\"\\\\n\\\\n\\\\t^ self firstOwnerSuchThat: [:m | (m isKindOf: firstClass) or: [m isKindOf: secondClass]]! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'sw 7/1/1998 18:02'!\\\\npasteUpMorph\\\\n\\\\t\\\\\\\"Answer the closest containing morph that is a PasteUp morph\\\\\\\"\\\\n\\\\t^ self ownerThatIsA: PasteUpMorph! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'dgd 8/28/2004 18:43'!\\\\npasteUpMorphHandlingTabAmongFields\\\\n\\\\t\\\\\\\"Answer the nearest PasteUpMorph in my owner chain that has the tabAmongFields property, or nil if none\\\\\\\"\\\\n\\\\n\\\\t| aPasteUp |\\\\n\\\\taPasteUp _ self owner.\\\\n\\\\t[aPasteUp notNil] whileTrue:\\\\n\\\\t\\\\t[aPasteUp tabAmongFields ifTrue:\\\\n\\\\t\\\\t\\\\t[^ aPasteUp].\\\\n\\\\t\\\\taPasteUp _ aPasteUp owner].\\\\n\\\\t^ nil! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'RAA 6/13/2000 15:01'!\\\\nprimaryHand\\\\n\\\\n        | outer |\\\\n        outer _ self outermostWorldMorph ifNil: [^ nil].\\\\n        ^ outer activeHand ifNil: [outer firstHand]! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'dgd 2/22/2003 14:34'!\\\\nrenderedMorph\\\\n\\\\t\\\\\\\"If the receiver is a renderer morph, answer the rendered morph. Otherwise, answer the receiver. A renderer morph with no submorphs answers itself. See the comment in Morph>isRenderer.\\\\\\\"\\\\n\\\\n\\\\tself isRenderer ifFalse: [^self].\\\\n\\\\tsubmorphs isEmpty ifTrue: [^self].\\\\n\\\\t^self firstSubmorph renderedMorph! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'dgd 2/22/2003 14:34'!\\\\nroot\\\\n\\\\t\\\\\\\"Return the root of the composite morph containing the receiver. The owner of the root is either nil, a WorldMorph, or a HandMorph. If the receiver's owner is nil, the root is the receiver itself. This method always returns a morph.\\\\\\\"\\\\n\\\\n\\\\t(owner isNil or: [owner isWorldOrHandMorph]) ifTrue: [^self].\\\\n\\\\t^owner root! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'di 8/4/1999 15:41'!\\\\nrootAt: location\\\\n\\\\t\\\\\\\"Just return myself, unless I am a WorldWindow.\\\\n\\\\tIf so, then return the appropriate root in that world\\\\\\\"\\\\n\\\\n\\\\t^ self! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'sw 8/30/1998 09:47'!\\\\ntopPasteUp\\\\n\\\\t\\\\\\\"If the receiver is in a world, return that; otherwise return the outermost pasteup morph\\\\\\\"\\\\n\\\\t^ self outermostMorphThat: [:m | m isKindOf: PasteUpMorph]! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'dgd 2/22/2003 19:06'!\\\\ntopRendererOrSelf\\\\n\\\\t\\\\\\\"Answer the topmost renderer for this morph, or this morph itself if it has no renderer. See the comment in Morph>isRenderer.\\\\\\\"\\\\n\\\\n\\\\t| top topsOwner |\\\\n\\\\towner ifNil: [^self].\\\\n\\\\tself isWorldMorph ifTrue: [^self].\\\\t\\\\\\\"ignore scaling of this world\\\\\\\"\\\\n\\\\ttop := self.\\\\n\\\\ttopsOwner := top owner.\\\\n\\\\t[topsOwner notNil and: [topsOwner isRenderer]] whileTrue: \\\\n\\\\t\\\\t\\\\t[top := topsOwner.\\\\n\\\\t\\\\t\\\\ttopsOwner := top owner].\\\\n\\\\t^top! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'di 11/13/2000 00:59'!\\\\nwithAllOwners\\\\n\\\\t\\\\\\\"Return the receiver and all its owners\\\\\\\"\\\\n\\\\n\\\\t^ Array streamContents: [:strm | self withAllOwnersDo: [:m | strm nextPut: m]]! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'ar 9/14/2000 16:48'!\\\\nwithAllOwnersDo: aBlock\\\\n\\\\t\\\\\\\"Evaluate aBlock with the receiver and all of its owners\\\\\\\"\\\\n\\\\taBlock value: self.\\\\n\\\\towner ifNotNil:[^owner withAllOwnersDo: aBlock].! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'dgd 2/22/2003 14:36'!\\\\nworld\\\\n\\\\t^owner isNil ifTrue: [nil] ifFalse: [owner world]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'di 11/14/2001 12:50'!\\\\nallKnownNames\\\\n\\\\t\\\\\\\"Return a list of all known names based on the scope of the receiver.  Does not include the name of the receiver itself.  Items in parts bins are excluded.  Reimplementors (q.v.) can extend the list\\\\\\\"\\\\n\\\\n\\\\t^ Array streamContents:\\\\n\\\\t\\\\t[:s | self allSubmorphNamesDo: [:n | s nextPut: n]]\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing'!\\\\nallMorphs\\\\n\\\\t\\\\\\\"Return a collection containing all morphs in this composite morph (including the receiver).\\\\\\\"\\\\n\\\\n\\\\t| all |\\\\n\\\\tall _ OrderedCollection new: 100.\\\\n\\\\tself allMorphsDo: [: m | all add: m].\\\\n\\\\t^ all! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'dgd 2/22/2003 14:27'!\\\\nallMorphsDo: aBlock \\\\n\\\\t\\\\\\\"Evaluate the given block for all morphs in this composite morph (including the receiver).\\\\\\\"\\\\n\\\\n\\\\tsubmorphs do: [:m | m allMorphsDo: aBlock].\\\\n\\\\taBlock value: self! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'sw 10/31/97 20:05'!\\\\nallNonSubmorphMorphs\\\\n\\\\t\\\\\\\"Return a collection containing all morphs in this morph which are not currently in the submorph containment hierarchy (put in primarily for bookmorphs)\\\\\\\"\\\\n\\\\n\\\\t^ OrderedCollection new! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'di 11/14/2001 12:44'!\\\\nallSubmorphNamesDo: nameBlock\\\\n\\\\t\\\\\\\"Return a list of all known names of submorphs and nested submorphs of the receiver, based on the scope of the receiver.  Items in parts bins are excluded\\\\\\\"\\\\n\\\\n\\\\tself isPartsBin ifTrue: [^ self]. \\\\\\\"Don't report names from parts bins\\\\\\\"\\\\n\\\\tself submorphsDo: \\\\n\\\\t\\\\t[:m | m knownName ifNotNilDo: [:n | nameBlock value: n].\\\\n\\\\t\\\\tm allSubmorphNamesDo: nameBlock].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'dgd 8/31/2004 16:53'!\\\\ndockingBars\\\\n\\\\t\\\\\\\"Answer the receiver's dockingBars\\\\\\\"\\\\n\\\\t^ self submorphs\\\\n\\\\t\\\\tselect: [:each | each isDockingBar]\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'rhi 9/10/2000 12:12'!\\\\nfindA: aClass\\\\n\\\\t\\\\\\\"Return the first submorph of the receiver that is descended from the given class. Return nil if there is no such submorph. Clients of this code should always check for a nil return value so that the code will be robust if the user takes the morph apart.\\\\\\\"\\\\n\\\\n\\\\t^self submorphs\\\\n\\\\t\\\\tdetect: [:p | p isKindOf: aClass]\\\\n\\\\t\\\\tifNone: [nil]! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'sw 1/9/2001 12:30'!\\\\nfindDeeplyA: aClass\\\\n\\\\t\\\\\\\"Return a morph in the submorph tree of the receiver that is descended from the given class. Return nil if there is no such morph. Clients of this code should always check for a nil return value so that the code will be robust if the user takes the morph apart.\\\\\\\"\\\\n\\\\n\\\\t^ (self allMorphs copyWithout: self)\\\\n\\\\t\\\\tdetect: [:p | p isKindOf: aClass]\\\\n\\\\t\\\\tifNone: [nil]! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'LC 9/28/1999 19:12'!\\\\nfindDeepSubmorphThat: block1 ifAbsent: block2 \\\\n\\\\tself\\\\n\\\\t\\\\tallMorphsDo: [:m | (block1 value: m)\\\\n\\\\t\\\\t\\\\t\\\\t== true ifTrue: [^ m]].\\\\n\\\\t^ block2 value! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'ar 3/17/2001 15:32'!\\\\nfindSubmorphBinary: aBlock\\\\n\\\\t\\\\\\\"Use binary search for finding a specific submorph of the receiver. Caller must be certain that the ordering holds for the submorphs.\\\\\\\"\\\\n\\\\t^submorphs findBinary: aBlock ifNone:[nil].! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'dgd 2/22/2003 14:31'!\\\\nfirstSubmorph\\\\n\\\\t^submorphs first! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'dgd 2/22/2003 14:32'!\\\\nhasSubmorphs\\\\n\\\\t^submorphs notEmpty! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'sw 7/3/1998 17:11'!\\\\nhasSubmorphWithProperty: aSymbol\\\\n\\\\tsubmorphs detect: [:m | m hasProperty: aSymbol] ifNone: [^ false].\\\\n\\\\t^ true! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'tk 10/31/2000 11:04'!\\\\nindexOfMorphAbove: aPoint\\\\n\\\\t\\\\\\\"Return index of lowest morph whose bottom is above aPoint.\\\\n\\\\tWill return 0 if the first morph is not above aPoint.\\\\\\\"\\\\n\\\\n\\\\tsubmorphs withIndexDo: [:mm :ii | \\\\n\\\\t\\\\tmm fullBounds bottom >= aPoint y ifTrue: [^ ii - 1]].\\\\n\\\\t^ submorphs size! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'dgd 2/22/2003 14:32'!\\\\nlastSubmorph\\\\n\\\\t^submorphs last! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'dgd 9/6/2004 14:17'!\\\\nmainDockingBars\\\\n\\\\t\\\\\\\"Answer the receiver's main dockingBars\\\\\\\"\\\\n\\\\t^ self dockingBars\\\\n\\\\t\\\\tselect: [:each | each hasProperty: #mainDockingBarTimeStamp]! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'ar 10/8/2000 15:40'!\\\\nmorphsAt: aPoint\\\\n\\\\t\\\\\\\"Return a collection of all morphs in this morph structure that contain the given point, possibly including the receiver itself.  The order is deepest embedding first.\\\\\\\"\\\\n\\\\t^self morphsAt: aPoint unlocked: false! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'dgd 2/22/2003 14:32'!\\\\nmorphsAt: aPoint behind: aMorph unlocked: aBool \\\\n\\\\t\\\\\\\"Return all morphs at aPoint that are behind frontMorph; if aBool is true return only unlocked, visible morphs.\\\\\\\"\\\\n\\\\n\\\\t| isBack found all tfm |\\\\n\\\\tall := (aMorph isNil or: [owner isNil]) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"Traverse down\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(self fullBounds containsPoint: aPoint) ifFalse: [^#()].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(aBool and: [self isLocked or: [self visible not]]) ifTrue: [^#()].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnil]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"Traverse up\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttfm := self transformedFrom: owner.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tall := owner \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmorphsAt: (tfm localPointToGlobal: aPoint)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbehind: self\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tunlocked: aBool.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tWriteStream with: all].\\\\n\\\\tisBack := aMorph isNil.\\\\n\\\\tself submorphsDo: \\\\n\\\\t\\\\t\\\\t[:m | \\\\n\\\\t\\\\t\\\\tisBack \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[tfm := m transformedFrom: self.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tfound := m \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmorphsAt: (tfm globalPointToLocal: aPoint)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbehind: nil\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tunlocked: aBool.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tfound notEmpty \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[all ifNil: [all := WriteStream on: #()].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tall nextPutAll: found]].\\\\n\\\\t\\\\t\\\\tm == aMorph ifTrue: [isBack := true]].\\\\n\\\\t(isBack and: [self containsPoint: aPoint]) \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[all ifNil: [^Array with: self].\\\\n\\\\t\\\\t\\\\tall nextPut: self].\\\\n\\\\t^all ifNil: [#()] ifNotNil: [all contents]! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'ar 10/8/2000 15:40'!\\\\nmorphsAt: aPoint unlocked: aBool\\\\n\\\\t\\\\\\\"Return a collection of all morphs in this morph structure that contain the given point, possibly including the receiver itself.  The order is deepest embedding first.\\\\\\\"\\\\n\\\\t| mList |\\\\n\\\\tmList _ WriteStream on: #().\\\\n\\\\tself morphsAt: aPoint unlocked: aBool do:[:m| mList nextPut: m].\\\\n\\\\t^mList contents! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'ar 10/8/2000 15:37'!\\\\nmorphsAt: aPoint unlocked: aBool do: aBlock\\\\n\\\\t\\\\\\\"Evaluate aBlock with all the morphs starting at the receiver which appear at aPoint. If aBool is true take only visible, unlocked morphs into account.\\\\\\\"\\\\n\\\\t| tfm |\\\\n\\\\t(self fullBounds containsPoint: aPoint) ifFalse:[^self].\\\\n\\\\t(aBool and:[self isLocked or:[self visible not]]) ifTrue:[^self].\\\\n\\\\tself submorphsDo:[:m|\\\\n\\\\t\\\\ttfm _ m transformedFrom: self.\\\\n\\\\t\\\\tm morphsAt: (tfm globalPointToLocal: aPoint) unlocked: aBool do: aBlock].\\\\n\\\\t(self containsPoint: aPoint) ifTrue:[aBlock value: self].! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'ar 9/9/2000 17:31'!\\\\nmorphsInFrontOf: someMorph overlapping: aRectangle do: aBlock\\\\n\\\\t\\\\\\\"Evaluate aBlock with all top-level morphs in front of someMorph that overlap with the given rectangle. someMorph is either an immediate child of the receiver or nil (in which case all submorphs of the receiver are enumerated).\\\\\\\"\\\\n\\\\tself submorphsDo:[:m|\\\\n\\\\t\\\\tm == someMorph ifTrue:[\\\\\\\"Try getting out quickly\\\\\\\"\\\\n\\\\t\\\\t\\\\towner ifNil:[^self].\\\\n\\\\t\\\\t\\\\t^owner morphsInFrontOf: self overlapping: aRectangle do: aBlock].\\\\n\\\\t\\\\t(m fullBoundsInWorld intersects: aRectangle)\\\\n\\\\t\\\\t\\\\tifTrue:[aBlock value: m]].\\\\n\\\\towner ifNil:[^self].\\\\n\\\\t^owner morphsInFrontOf: self overlapping: aRectangle do: aBlock.! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'ar 9/9/2000 17:31'!\\\\nmorphsInFrontOverlapping: aRectangle\\\\n\\\\t\\\\\\\"Return all top-level morphs in front of someMorph that overlap with the given rectangle.\\\\\\\"\\\\n\\\\t| morphList |\\\\n\\\\tmorphList _ WriteStream on: Array new.\\\\n\\\\tself morphsInFrontOf: nil overlapping: aRectangle do:[:m | morphList nextPut: m].\\\\n\\\\t^morphList contents! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'ar 9/9/2000 17:31'!\\\\nmorphsInFrontOverlapping: aRectangle do: aBlock\\\\n\\\\t\\\\\\\"Evaluate aBlock with all top-level morphs in front of someMorph that overlap with the given rectangle.\\\\\\\"\\\\n\\\\t^self morphsInFrontOf: nil overlapping: aRectangle do: aBlock! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'ar 8/13/2003 11:32'!\\\\nnoteNewOwner: aMorph\\\\n\\\\t\\\\\\\"I have just been added as a submorph of aMorph\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'RAA 6/11/2000 20:41'!\\\\nrootMorphsAtGlobal: aPoint\\\\n\\\\t\\\\\\\"Return the list of root morphs containing the given point, excluding the receiver.\\\\n\\\\tar 11/8/1999: Moved into morph for an incredibly ugly hack in 3D worlds\\\\\\\"\\\\n\\\\n\\\\t^ self rootMorphsAt: (self pointFromWorld: aPoint)! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'ar 10/8/2000 15:44'!\\\\nrootMorphsAt: aPoint\\\\n\\\\t\\\\\\\"Return the list of root morphs containing the given point, excluding the receiver.\\\\n\\\\tar 11/8/1999: Moved into morph for an incredibly ugly hack in 3D worlds\\\\\\\"\\\\nself flag: #arNote. \\\\\\\"check this at some point\\\\\\\"\\\\n\\\\t^ self submorphs select:\\\\n\\\\t\\\\t[:m | (m fullContainsPoint: aPoint) and: [m isLocked not]]! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'dgd 2/22/2003 14:35'!\\\\nshuffleSubmorphs\\\\n\\\\t\\\\\\\"Randomly shuffle the order of my submorphs.  Don't call this method lightly!!\\\\\\\"\\\\n\\\\n\\\\t| bg |\\\\n\\\\tself invalidRect: self fullBounds.\\\\n\\\\t(submorphs notEmpty and: [submorphs last mustBeBackmost]) \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[bg := submorphs last.\\\\n\\\\t\\\\t\\\\tbg privateDelete].\\\\n\\\\tsubmorphs := submorphs shuffled.\\\\n\\\\tbg ifNotNil: [self addMorphBack: bg].\\\\n\\\\tself layoutChanged! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'tk 10/20/2000 13:12'!\\\\nsubmorphAfter\\\\n\\\\t\\\\\\\"Return the submorph after (behind) me, or nil\\\\\\\"\\\\n\\\\t| ii |\\\\n\\\\towner ifNil: [^ nil].\\\\n\\\\t^ (ii _ owner submorphIndexOf: self) = owner submorphs size \\\\n\\\\t\\\\tifTrue: [nil]\\\\n\\\\t\\\\tifFalse: [owner submorphs at: ii+1].\\\\n\\\\t\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'tk 10/20/2000 13:13'!\\\\nsubmorphBefore\\\\n\\\\t\\\\\\\"Return the submorph after (behind) me, or nil\\\\\\\"\\\\n\\\\t| ii |\\\\n\\\\towner ifNil: [^ nil].\\\\n\\\\t^ (ii _ owner submorphIndexOf: self) = 1 \\\\n\\\\t\\\\tifTrue: [nil]\\\\n\\\\t\\\\tifFalse: [owner submorphs at: ii-1].\\\\n\\\\t\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing'!\\\\nsubmorphCount\\\\n\\\\n\\\\t^ submorphs size! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'sw 4/9/98 14:26'!\\\\nsubmorphNamed: aName\\\\n\\\\t^ self submorphNamed: aName ifNone: [nil]! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'gm 2/22/2003 13:16'!\\\\nsubmorphNamed: aName ifNone: aBlock \\\\n\\\\t\\\\\\\"Find the first submorph with this name, or a button with an action selector of that name\\\\\\\"\\\\n\\\\n\\\\t| sub args |\\\\n\\\\tself submorphs do: [:p | p knownName = aName ifTrue: [^p]].\\\\n\\\\tself submorphs do: \\\\n\\\\t\\\\t\\\\t[:button | \\\\n\\\\t\\\\t\\\\t(button respondsTo: #actionSelector) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [button actionSelector == aName ifTrue: [^button]].\\\\n\\\\t\\\\t\\\\t((button respondsTo: #arguments) and: [(args := button arguments) notNil]) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [(args at: 2 ifAbsent: [nil]) == aName ifTrue: [^button]].\\\\n\\\\t\\\\t\\\\t(button isAlignmentMorph) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [(sub := button submorphNamed: aName ifNone: [nil]) ifNotNil: [^sub]]].\\\\n\\\\t^aBlock value! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'rhi 9/10/2000 12:12'!\\\\nsubmorphOfClass: aClass\\\\n\\\\n\\\\t^self findA: aClass! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'efc 8/6/2005 11:35'!\\\\nsubmorphs\\\\n\\\\t\\\\\\\"This method returns my actual submorphs collection. Modifying the collection directly could be dangerous; make a copy if you need to alter it.\\\\\\\"\\\\n\\\\t^ submorphs ! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'di 11/4/97 14:30'!\\\\nsubmorphsBehind: aMorph do: aBlock\\\\n\\\\t| behind |\\\\n\\\\tbehind _ false.\\\\n\\\\tsubmorphs do:\\\\n\\\\t\\\\t[:m | m == aMorph ifTrue: [behind _ true]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [behind ifTrue: [aBlock value: m]]].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'dgd 2/22/2003 14:35'!\\\\nsubmorphsDo: aBlock \\\\n\\\\tsubmorphs do: aBlock! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'di 11/4/97 14:29'!\\\\nsubmorphsInFrontOf: aMorph do: aBlock\\\\n\\\\t| behind |\\\\n\\\\tbehind _ false.\\\\n\\\\tsubmorphs do:\\\\n\\\\t\\\\t[:m | m == aMorph ifTrue: [behind _ true]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [behind ifFalse: [aBlock value: m]]].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing'!\\\\nsubmorphsReverseDo: aBlock\\\\n\\\\n\\\\tsubmorphs reverseDo: aBlock.! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'sw 8/15/97 22:03'!\\\\nsubmorphsSatisfying: aBlock\\\\n\\\\t^ submorphs select: [:m | (aBlock value: m) == true]! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'sw 10/26/1999 23:42'!\\\\nsubmorphThat: block1 ifNone: block2\\\\n\\\\t^ submorphs detect: [:m | (block1 value: m) == true] ifNone: [block2 value]\\\\n\\\\t! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'sw 7/3/1998 18:47'!\\\\nsubmorphWithProperty: aSymbol\\\\n\\\\t^ submorphs detect: [:aMorph | aMorph hasProperty: aSymbol] ifNone: [nil]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'tk 12/15/1998 14:23'!\\\\nabandon\\\\n\\\\t\\\\\\\"Like delete, but we really intend not to use this morph again.  Clean up a few things.\\\\\\\"\\\\n\\\\n\\\\tself delete! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'sw 9/28/2001 08:39'!\\\\nactWhen\\\\n\\\\t\\\\\\\"Answer when the receiver, probably being used as a button, should have its action triggered\\\\\\\"\\\\n\\\\n\\\\t^ self valueOfProperty: #actWhen ifAbsentPut: [#buttonDown]! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'sw 9/25/2001 10:23'!\\\\nactWhen: aButtonPhase\\\\n\\\\t\\\\\\\"Set the receiver's actWhen trait\\\\\\\"\\\\n\\\\n\\\\tself setProperty: #actWhen toValue: aButtonPhase! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'ar 8/12/2003 23:28'!\\\\naddAllMorphs: aCollection\\\\n\\\\t^self privateAddAllMorphs: aCollection atIndex: submorphs size! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'ar 8/12/2003 23:29'!\\\\naddAllMorphs: aCollection after: anotherMorph\\\\n\\\\t^self privateAddAllMorphs: aCollection \\\\n\\\\t\\\\t\\\\tatIndex: (submorphs indexOf: anotherMorph ifAbsent: [submorphs size])! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'ar 1/31/2001 12:55'!\\\\naddMorphBack: aMorph\\\\n\\\\t^self privateAddMorph: aMorph atIndex: submorphs size+1! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'RAA 12/15/2000 19:34'!\\\\naddMorphCentered: aMorph\\\\n\\\\n\\\\taMorph position: bounds center - (aMorph extent // 2).\\\\n\\\\tself addMorphFront: aMorph.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'ar 12/16/2001 21:08'!\\\\naddMorphFrontFromWorldPosition: aMorph\\\\n\\\\t^self addMorphFront: aMorph fromWorldPosition: aMorph positionInWorld.! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'ar 1/31/2001 12:54'!\\\\naddMorphFront: aMorph\\\\n\\\\t^self privateAddMorph: aMorph atIndex: 1! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'ar 11/15/1998 23:42'!\\\\naddMorphFront: aMorph fromWorldPosition: wp\\\\n\\\\n\\\\tself addMorphFront: aMorph.\\\\n\\\\taMorph position: (self transformFromWorld globalPointToLocal: wp)! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'dgd 2/22/2003 14:26'!\\\\naddMorphNearBack: aMorph \\\\n\\\\t| bg |\\\\n\\\\t(submorphs notEmpty and: [submorphs last mustBeBackmost]) \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[bg := submorphs last.\\\\n\\\\t\\\\t\\\\tbg privateDelete].\\\\n\\\\tself addMorphBack: aMorph.\\\\n\\\\tbg ifNotNil: [self addMorphBack: bg]! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove'!\\\\naddMorph: aMorph\\\\n\\\\n\\\\tself addMorphFront: aMorph.! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'ar 1/31/2001 12:54'!\\\\naddMorph: newMorph after: aMorph\\\\n\\\\t\\\\\\\"Add the given morph as one of my submorphs, inserting it after anotherMorph\\\\\\\"\\\\n\\\\t^self privateAddMorph: newMorph atIndex: (submorphs indexOf: aMorph)+1! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'sw 9/7/2000 08:29'!\\\\naddMorph: aMorph asElementNumber: aNumber\\\\n\\\\t\\\\\\\"Add the given morph so that it becomes the aNumber'th element of my submorph list.  If aMorph is already one of my submorphs, reposition it\\\\\\\"\\\\n\\\\n\\\\t(submorphs includes: aMorph) ifTrue:\\\\n\\\\t\\\\t[aMorph privateDelete].\\\\n\\\\t(aNumber <= submorphs size)\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self addMorph: aMorph inFrontOf: (submorphs at: aNumber)]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self addMorphBack: aMorph]\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'ar 1/31/2001 12:44'!\\\\naddMorph: newMorph behind: aMorph\\\\n\\\\t\\\\\\\"Add a morph to the list of submorphs behind the specified morph\\\\\\\"\\\\n\\\\t^self privateAddMorph: newMorph atIndex: (submorphs indexOf: aMorph) + 1.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'JW 2/1/2001 12:52'!\\\\naddMorph: aMorph fullFrame: aLayoutFrame\\\\n\\\\n\\\\taMorph layoutFrame: aLayoutFrame.\\\\n\\\\taMorph hResizing: #spaceFill; vResizing: #spaceFill.\\\\n\\\\tself addMorph: aMorph.\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'ar 1/31/2001 12:45'!\\\\naddMorph: newMorph inFrontOf: aMorph\\\\n\\\\t\\\\\\\"Add a morph to the list of submorphs in front of the specified morph\\\\\\\"\\\\n\\\\t^self privateAddMorph: newMorph atIndex: ((submorphs indexOf: aMorph) max: 1).! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'dgd 4/4/2006 17:17'!\\\\nallMorphsWithPlayersDo: aTwoArgumentBlock \\\\n\\\\t\\\\\\\"Evaluate the given block for all morphs in this composite morph that have non-nil players.\\\\n\\\\tAlso evaluate the block for the receiver if it has a player.\\\\\\\"\\\\n\\\\n\\\\tsubmorphs do: [:m | m allMorphsWithPlayersDo: aTwoArgumentBlock ].\\\\n\\\\tself playerRepresented ifNotNilDo: [ :p | aTwoArgumentBlock value: self value: p ].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'dgd 2/22/2003 14:30'!\\\\ncomeToFront\\\\n\\\\t| outerMorph |\\\\n\\\\touterMorph := self topRendererOrSelf.\\\\n\\\\t(outerMorph owner isNil or: [outerMorph owner hasSubmorphs not]) \\\\n\\\\t\\\\tifTrue: [^self].\\\\n\\\\touterMorph owner firstSubmorph == outerMorph \\\\n\\\\t\\\\tifFalse: [outerMorph owner addMorphFront: outerMorph]! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'di 10/27/97 23:26'!\\\\ncopyWithoutSubmorph: sub\\\\n\\\\t\\\\\\\"Needed to get a morph to draw without one of its submorphs.\\\\n\\\\tNOTE:  This must be thrown away immediately after use.\\\\\\\"\\\\n\\\\t^ self clone privateSubmorphs: (submorphs copyWithout: sub)! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'dgd 9/10/2004 19:02'!\\\\ndelete\\\\n\\\\t\\\\\\\"Remove the receiver as a submorph of its owner and make its \\\\n\\\\tnew owner be nil.\\\\\\\"\\\\n\\\\n\\\\t| aWorld |\\\\n\\\\tself removeHalo.\\\\n\\\\taWorld := self world ifNil: [World].\\\\n\\\\t\\\\\\\"Terminate genie recognition focus\\\\\\\"\\\\n\\\\t\\\\\\\"I encountered a case where the hand was nil, so I put in a little \\\\n\\\\tprotection - raa \\\\\\\"\\\\n\\\\t\\\\\\\" This happens when we are in an MVC project and open\\\\n\\\\t  a morphic window. - BG \\\\\\\"\\\\n\\\\taWorld ifNotNil:\\\\n\\\\t  [self disableSubmorphFocusForHand: self activeHand.\\\\n\\\\t  self activeHand releaseKeyboardFocus: self;\\\\n\\\\t\\\\t  releaseMouseFocus: self.].\\\\n\\\\towner ifNotNil:[ self privateDelete.\\\\n\\\\t\\\\tself player ifNotNilDo: [ :player |\\\\n\\\\t\\\\t\\\\t\\\\\\\"Player must be notified\\\\\\\"\\\\n\\\\t\\\\t\\\\tplayer noteDeletionOf: self fromWorld: aWorld]].! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'dgd 9/1/2004 16:26'!\\\\ndeleteDockingBars\\\\n\\\\t\\\\\\\"Delete the receiver's docking bars\\\\\\\"\\\\n\\\\tself dockingBars\\\\n\\\\t\\\\tdo: [:each | each delete]! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'sw 7/3/1998 11:02'!\\\\ndeleteSubmorphsWithProperty: aSymbol\\\\n\\\\tsubmorphs copy do:\\\\n\\\\t\\\\t[:m | (m hasProperty: aSymbol) ifTrue: [m delete]]! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'sw 2/2/2006 02:39'!\\\\ndismissViaHalo\\\\n\\\\t\\\\\\\"The user has clicked in the delete halo-handle.  This provides a hook in case some concomitant action should be taken, or if the particular morph is not one which should be put in the trash can, for example.\\\\\\\"\\\\n\\\\n\\\\t| cmd |\\\\n\\\\tself setProperty: #lastPosition toValue: self positionInWorld.\\\\n\\\\tself dismissMorph.\\\\n\\\\tPreferences preserveTrash ifTrue: [ \\\\n\\\\t\\\\tPreferences slideDismissalsToTrash\\\\n\\\\t\\\\t\\\\tifTrue:[self slideToTrash: nil]\\\\n\\\\t\\\\t\\\\tifFalse:[TrashCanMorph moveToTrash: self].\\\\n\\\\t].\\\\n\\\\n\\\\tcmd _ Command new cmdWording: 'dismiss ' translated, self externalName.\\\\n\\\\tcmd undoTarget: ActiveWorld selector: #reintroduceIntoWorld: argument: self.\\\\n\\\\tcmd redoTarget: ActiveWorld selector: #onceAgainDismiss: argument: self.\\\\n\\\\tActiveWorld rememberCommand: cmd! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'sw 4/9/98 22:44'!\\\\ngoBehind\\\\n\\\\n\\\\towner addMorphNearBack: self.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'ar 8/10/2003 18:31'!\\\\nprivateDelete\\\\n\\\\t\\\\\\\"Remove the receiver as a submorph of its owner\\\\\\\"\\\\n\\\\towner ifNotNil:[owner removeMorph: self].! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'nk 10/16/2003 14:08'!\\\\nremoveAllMorphs\\\\n\\\\t| oldMorphs myWorld |\\\\n\\\\tmyWorld _ self world.\\\\n\\\\t(fullBounds notNil or:[myWorld notNil]) ifTrue:[self invalidRect: self fullBounds].\\\\n\\\\tsubmorphs do: [:m | myWorld ifNotNil: [ m outOfWorld: myWorld ]. m privateOwner: nil].\\\\n\\\\toldMorphs _ submorphs.\\\\n\\\\tsubmorphs _ EmptyArray.\\\\n\\\\toldMorphs do: [ :m | self removedMorph: m ].\\\\n\\\\tself layoutChanged.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'nk 10/16/2003 14:02'!\\\\nremoveAllMorphsIn: aCollection\\\\n\\\\t\\\\\\\"greatly speeds up the removal of *lots* of submorphs\\\\\\\"\\\\n\\\\t| set myWorld |\\\\n\\\\tset _ IdentitySet new: aCollection size * 4 // 3.\\\\n\\\\taCollection do: [:each | each owner == self ifTrue: [ set add: each]].\\\\n\\\\tmyWorld _ self world.\\\\n\\\\t(fullBounds notNil or:[myWorld notNil]) ifTrue:[self invalidRect: self fullBounds].\\\\n\\\\tset do: [:m | myWorld ifNotNil: [ m outOfWorld: myWorld ]. m privateOwner: nil].\\\\n\\\\tsubmorphs _ submorphs reject: [ :each | set includes: each].\\\\n\\\\tset do: [ :m | self removedMorph: m ].\\\\n\\\\tself layoutChanged.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'ar 8/12/2003 22:01'!\\\\nremovedMorph: aMorph\\\\n\\\\t\\\\\\\"Notify the receiver that aMorph was just removed from its children\\\\\\\"\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'di 10/18/2004 21:50'!\\\\nremoveMorph: aMorph\\\\n\\\\t\\\\\\\"Remove the given morph from my submorphs\\\\\\\"\\\\n\\\\t| aWorld |\\\\n\\\\taMorph owner == self ifFalse:[^self].\\\\n\\\\taWorld := self world.\\\\n\\\\taWorld ifNotNil:[\\\\n\\\\t\\\\taMorph outOfWorld: aWorld.\\\\n\\\\t\\\\tself privateInvalidateMorph: aMorph.\\\\n\\\\t].\\\\n\\\\tself privateRemove: aMorph.\\\\n\\\\taMorph privateOwner: nil.\\\\n\\\\tself removedMorph: aMorph.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'sw 10/25/1999 23:34'!\\\\nreplaceSubmorph: oldMorph by: newMorph\\\\n\\\\t| index itsPosition w |\\\\n\\\\toldMorph stopStepping.\\\\n\\\\titsPosition _ oldMorph referencePositionInWorld.\\\\n\\\\tindex _ submorphs indexOf: oldMorph.\\\\n\\\\toldMorph privateDelete.\\\\n\\\\tself privateAddMorph: newMorph atIndex: index.\\\\n\\\\tnewMorph referencePositionInWorld: itsPosition.\\\\n\\\\t(w _ newMorph world) ifNotNil:\\\\n\\\\t\\\\t[w startSteppingSubmorphsOf: newMorph]! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'sw 9/1/2000 10:16'!\\\\nsubmorphIndexOf: aMorph\\\\n\\\\t\\\\\\\"Assuming aMorph to be one of my submorphs, answer where it occurs in my submorph list\\\\\\\"\\\\n\\\\n\\\\t^ submorphs indexOf: aMorph ifAbsent: [nil]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'testing' stamp: 'RAA 12/4/2000 10:44'!\\\\ncanDrawAtHigherResolution\\\\n\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'testing' stamp: 'ar 8/25/2001 19:14'!\\\\ncanDrawBorder: aBorderStyle\\\\n\\\\t\\\\\\\"Return true if the receiver can be drawn with the given border style.\\\\\\\"\\\\n\\\\t^true! !\\\\n\\\\n!Morph methodsFor: 'testing' stamp: 'RAA 10/20/2000 14:47'!\\\\ncompleteModificationHash\\\\n\\\\n\\\\\\\"World completeModificationHash\\\\\\\"\\\\n\\\\n\\\\t| resultSize result here i |\\\\n\\\\tresultSize _ 10.\\\\n\\\\tresult _ ByteArray new: resultSize.\\\\n\\\\tself allMorphsDo: [ :each | \\\\n\\\\t\\\\there _ each modificationHash.\\\\n\\\\t\\\\there withIndexDo: [ :ch :index |\\\\n\\\\t\\\\t\\\\ti _ index \\\\\\\\\\\\\\\\ resultSize + 1.\\\\n\\\\t\\\\t\\\\tresult at: i put: ((result at: i) bitXor: ch asciiValue)\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\t^result! !\\\\n\\\\n!Morph methodsFor: 'testing' stamp: 'sw 3/30/2005 04:17'!\\\\ncouldMakeSibling\\\\n\\\\t\\\\\\\"Answer whether it is appropriate to ask the receiver to make a sibling\\\\\\\"\\\\n\\\\n\\\\t^ true! !\\\\n\\\\n!Morph methodsFor: 'testing' stamp: 'dgd 8/31/2004 15:00'!\\\\nisDockingBar\\\\n\\\\t\\\\\\\"Return true if the receiver is a docking bar\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'testing' stamp: 'ar 9/22/2000 13:44'!\\\\nisFlexed\\\\n\\\\t\\\\\\\"Return true if the receiver is currently flexed\\\\\\\"\\\\n\\\\towner ifNil:[^false].\\\\n\\\\t^owner isFlexMorph! !\\\\n\\\\n!Morph methodsFor: 'testing' stamp: 'dgd 9/20/2004 14:31'!\\\\nisFullOnScreen\\\\n\\\\t\\\\\\\"Answer if the receiver is full contained in the owner visible  \\\\n\\\\tarea.\\\\\\\"\\\\n\\\\towner isInMemory\\\\n\\\\t\\\\tifFalse: [^ true].\\\\n\\\\towner isNil\\\\n\\\\t\\\\tifTrue: [^ true].\\\\n\\\\tself visible\\\\n\\\\t\\\\tifFalse: [^ true].\\\\n\\\\t^ owner clearArea containsRect: self fullBounds! !\\\\n\\\\n!Morph methodsFor: 'testing' stamp: 'nk 10/13/2003 18:36'!\\\\nisLineMorph\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'testing'!\\\\nisMorph\\\\n\\\\n\\\\t^ true! !\\\\n\\\\n!Morph methodsFor: 'testing' stamp: 'nk 6/12/2004 09:17'!\\\\nisSketchMorph\\\\n\\\\t^self class isSketchMorphClass! !\\\\n\\\\n!Morph methodsFor: 'testing' stamp: 'md 2/27/2006 09:59'!\\\\nknownName\\\\n\\\\t\\\\\\\"answer a name by which the receiver is known, or nil if none\\\\\\\"\\\\n\\\\t^ extension ifNotNil: [extension externalName]! !\\\\n\\\\n!Morph methodsFor: 'testing' stamp: 'RAA 10/20/2000 14:47'!\\\\nmodificationHash\\\\n\\\\n\\\\t^String \\\\n\\\\t\\\\tstreamContents: [ :strm |\\\\n\\\\t\\\\t\\\\tself longPrintOn: strm\\\\n\\\\t\\\\t]\\\\n\\\\t\\\\tlimitedTo: 25\\\\n! !\\\\n\\\\n!Morph methodsFor: 'testing' stamp: 'tk 7/28/2005 04:46'!\\\\nrenameInternal: aName \\\\n\\\\t\\\\\\\"Change the internal name (because of a conflict) but leave the external name unchanged.  Change Player class name, but do not change the names that appear in tiles.  When coming in from disk, and have name conflict, References will already have the new name. \\\\\\\"\\\\n\\\\n\\\\tself knownName = aName ifTrue: [^ aName].\\\\n\\\\tself topRendererOrSelf setNameTo: aName.\\\\n\\\\t\\\\n\\\\t\\\\\\\"References dictionary already has key aName\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"If this player has a viewer flap, it will remain present\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Tiles in scripts all stay the same\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Compiled methods for scripts have been fixed up because the same association was reused\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ aName! !\\\\n\\\\n!Morph methodsFor: 'testing' stamp: 'dvf 8/23/2003 11:50'!\\\\nrenameTo: aName \\\\n\\\\t\\\\\\\"Set Player name in costume. Update Viewers. Fix all tiles (old style). fix \\\\n\\\\tReferences. New tiles: recompile, and recreate open scripts. If coming in \\\\n\\\\tfrom disk, and have name conflict, References will already have new \\\\n\\\\tname. \\\\\\\"\\\\n\\\\n\\\\t| aPresenter putInViewer aPasteUp renderer oldKey assoc classes oldName |\\\\n\\\\toldName := self knownName.\\\\n\\\\t(renderer := self topRendererOrSelf) setNameTo: aName.\\\\n\\\\tputInViewer := false.\\\\n\\\\t((aPresenter := self presenter) isNil or: [renderer player isNil]) \\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[putInViewer := aPresenter currentlyViewing: renderer player.\\\\n\\\\t\\\\t\\\\tputInViewer ifTrue: [renderer player viewerFlapTab hibernate]].\\\\n\\\\t\\\\\\\"empty it temporarily\\\\\\\"\\\\n\\\\t(aPasteUp := self topPasteUp) \\\\n\\\\t\\\\tifNotNil: [aPasteUp allTileScriptingElements do: [:m | m bringUpToDate]].\\\\n\\\\t\\\\\\\"Fix References dictionary. See restoreReferences to know why oldKey is  \\\\n\\\\talready aName, but oldName is the old name.\\\\\\\"\\\\n\\\\toldKey := References keyAtIdentityValue: renderer player ifAbsent: [].\\\\n\\\\toldKey ifNotNil: \\\\n\\\\t\\\\t\\\\t[assoc := References associationAt: oldKey.\\\\n\\\\t\\\\t\\\\toldKey = aName \\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"normal rename\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tassoc key: (renderer player uniqueNameForReferenceFrom: aName).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tReferences rehash]].\\\\n\\\\tputInViewer ifTrue: [aPresenter viewMorph: self].\\\\n\\\\t\\\\\\\"recreate my viewer\\\\\\\"\\\\n\\\\toldKey ifNil: [^aName].\\\\n\\\\t\\\\\\\"Force strings in tiles to be remade with new name. New tiles only.\\\\\\\"\\\\n\\\\tPreferences universalTiles ifFalse: [^aName].\\\\n\\\\tclasses := (self systemNavigation allCallsOn: assoc) \\\\n\\\\t\\\\t\\\\t\\\\tcollect: [:each | each classSymbol].\\\\n\\\\tclasses asSet \\\\n\\\\t\\\\tdo: [:clsName | (Smalltalk at: clsName) replaceSilently: oldName to: aName].\\\\n\\\\t\\\\\\\"replace in text body of all methods. Can be wrong!!\\\\\\\"\\\\n\\\\t\\\\\\\"Redo the tiles that are showing. This is also done in caller in \\\\n\\\\tunhibernate. \\\\\\\"\\\\n\\\\taPasteUp ifNotNil: \\\\n\\\\t\\\\t\\\\t[aPasteUp allTileScriptingElements do: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:mm | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"just ScriptEditorMorphs\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnil.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(mm isKindOf: ScriptEditorMorph) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[((mm playerScripted class compiledMethodAt: mm scriptName) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\thasLiteral: assoc) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[mm\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\thibernate;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tunhibernate]]]].\\\\n\\\\t^aName! !\\\\n\\\\n!Morph methodsFor: 'testing' stamp: 'ar 12/3/2001 12:33'!\\\\nshouldDropOnMouseUp\\\\n\\\\t| former |\\\\n\\\\tformer _ self formerPosition ifNil:[^false].\\\\n\\\\t^(former dist: self position) > 10! !\\\\n\\\\n!Morph methodsFor: 'testing' stamp: 'RAA 1/16/2001 17:20'!\\\\nstepTime\\\\n\\\\t\\\\\\\"Answer the desired time between steps in milliseconds. This default implementation requests that the 'step' method be called once every second.\\\\\\\"\\\\n\\\\n\\\\t^ self topRendererOrSelf player ifNotNil: [10] ifNil: [1000]! !\\\\n\\\\n!Morph methodsFor: 'testing' stamp: 'sw 10/24/2004 15:28'!\\\\nwantsSteps\\\\n\\\\t\\\\\\\"Return true if the receiver overrides the default Morph step method.\\\\\\\"\\\\n\\\\t\\\\\\\"Details: Find first class in superclass chain that implements #step and return true if it isn't class Morph.\\\\\\\"\\\\n\\\\n\\\\t| c |\\\\n\\\\tself isPartsDonor ifTrue: [^ false].\\\\n\\\\t(self == self topRendererOrSelf) ifTrue: [self player wantsSteps ifTrue: [^ true]].\\\\n\\\\tc _ self class.\\\\n\\\\t[c includesSelector: #step] whileFalse: [c _ c superclass].\\\\n\\\\t^ c ~= Morph! !\\\\n\\\\n\\\\n!Morph methodsFor: 'text-anchor' stamp: 'ar 12/17/2001 12:45'!\\\\naddTextAnchorMenuItems: topMenu hand: aHand\\\\n\\\\t| aMenu |\\\\n\\\\taMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\taMenu addUpdating: #hasInlineAnchorString action: #changeInlineAnchor.\\\\n\\\\taMenu addUpdating: #hasParagraphAnchorString action: #changeParagraphAnchor.\\\\n\\\\taMenu addUpdating: #hasDocumentAnchorString action: #changeDocumentAnchor.\\\\n\\\\ttopMenu ifNotNil:[topMenu add: 'text anchor' subMenu: aMenu].\\\\n\\\\t^aMenu! !\\\\n\\\\n!Morph methodsFor: 'text-anchor' stamp: 'aoy 2/15/2003 21:47'!\\\\nchangeDocumentAnchor\\\\n\\\\t\\\\\\\"Change the anchor from/to document anchoring\\\\\\\"\\\\n\\\\n\\\\t| newType |\\\\n\\\\tnewType := self textAnchorType == #document \\\\n\\\\t\\\\tifTrue: [#paragraph]\\\\n\\\\t\\\\tifFalse: [ #document].\\\\n\\\\towner isTextMorph \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[owner \\\\n\\\\t\\\\t\\\\t\\\\tanchorMorph: self\\\\n\\\\t\\\\t\\\\t\\\\tat: self position\\\\n\\\\t\\\\t\\\\t\\\\ttype: newType]! !\\\\n\\\\n!Morph methodsFor: 'text-anchor' stamp: 'aoy 2/15/2003 21:48'!\\\\nchangeInlineAnchor\\\\n\\\\t\\\\\\\"Change the anchor from/to line anchoring\\\\\\\"\\\\n\\\\n\\\\t| newType |\\\\n\\\\tnewType := self textAnchorType == #inline \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [#paragraph]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [#inline]. \\\\n\\\\towner isTextMorph \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[owner \\\\n\\\\t\\\\t\\\\t\\\\tanchorMorph: self\\\\n\\\\t\\\\t\\\\t\\\\tat: self position\\\\n\\\\t\\\\t\\\\t\\\\ttype: newType]! !\\\\n\\\\n!Morph methodsFor: 'text-anchor' stamp: 'aoy 2/15/2003 21:48'!\\\\nchangeParagraphAnchor\\\\n\\\\t\\\\\\\"Change the anchor from/to paragraph anchoring\\\\\\\"\\\\n\\\\n\\\\t| newType |\\\\n\\\\tnewType := self textAnchorType == #paragraph \\\\n\\\\t\\\\tifTrue: [#document]\\\\n\\\\t\\\\tifFalse: [#paragraph].\\\\n\\\\towner isTextMorph \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[owner \\\\n\\\\t\\\\t\\\\t\\\\tanchorMorph: self\\\\n\\\\t\\\\t\\\\t\\\\tat: self position\\\\n\\\\t\\\\t\\\\t\\\\ttype: newType]! !\\\\n\\\\n!Morph methodsFor: 'text-anchor' stamp: 'dgd 9/6/2003 18:14'!\\\\nhasDocumentAnchorString\\\\n\\\\t^ (self textAnchorType == #document\\\\n\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\tifFalse: ['<off>'])\\\\n\\\\t\\\\t, 'Document' translated! !\\\\n\\\\n!Morph methodsFor: 'text-anchor' stamp: 'dgd 9/6/2003 18:14'!\\\\nhasInlineAnchorString\\\\n\\\\t^ (self textAnchorType == #inline\\\\n\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\tifFalse: ['<off>'])\\\\n\\\\t\\\\t, 'Inline' translated! !\\\\n\\\\n!Morph methodsFor: 'text-anchor' stamp: 'dgd 9/6/2003 18:14'!\\\\nhasParagraphAnchorString\\\\n\\\\t^ (self textAnchorType == #paragraph\\\\n\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\tifFalse: ['<off>'])\\\\n\\\\t\\\\t, 'Paragraph' translated! !\\\\n\\\\n!Morph methodsFor: 'text-anchor' stamp: 'ar 12/16/2001 19:47'!\\\\nrelativeTextAnchorPosition\\\\n\\\\t^self valueOfProperty: #relativeTextAnchorPosition! !\\\\n\\\\n!Morph methodsFor: 'text-anchor' stamp: 'ar 12/16/2001 19:22'!\\\\nrelativeTextAnchorPosition: aPoint\\\\n\\\\t^self setProperty: #relativeTextAnchorPosition toValue: aPoint! !\\\\n\\\\n!Morph methodsFor: 'text-anchor' stamp: 'ar 12/16/2001 18:36'!\\\\ntextAnchorType\\\\n\\\\t^self valueOfProperty: #textAnchorType ifAbsent:[#document]! !\\\\n\\\\n!Morph methodsFor: 'text-anchor' stamp: 'ar 12/16/2001 18:37'!\\\\ntextAnchorType: aSymbol\\\\n\\\\taSymbol == #document\\\\n\\\\t\\\\tifTrue:[^self removeProperty: #textAnchorType]\\\\n\\\\t\\\\tifFalse:[^self setProperty: #textAnchorType toValue: aSymbol].! !\\\\n\\\\n\\\\n!Morph methodsFor: 'thumbnail' stamp: 'sw 10/26/2000 08:32'!\\\\ndemandsThumbnailing\\\\n\\\\t\\\\\\\"Answer whether the receiver, if in a thumbnailable parts bin, wants to be thumbnailed whether or not size requires it\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'thumbnail' stamp: 'dgd 9/12/2004 21:12'!\\\\nicon\\\\n\\\\t\\\\\\\"Answer a form with an icon to represent the receiver\\\\\\\"\\\\n\\\\t^ self valueOfProperty: #icon! !\\\\n\\\\n!Morph methodsFor: 'thumbnail' stamp: 'dgd 9/12/2004 20:33'!\\\\niconOrThumbnail\\\\n\\\\t\\\\\\\"Answer an appropiate form to represent the receiver\\\\\\\"\\\\n\\\\n\\\\t^ self icon\\\\n\\\\t\\\\tifNil: [ | maxExtent fb |maxExtent := 320 @ 240.\\\\n\\\\t\\\\t\\\\tfb := self fullBounds.\\\\n\\\\t\\\\t\\\\tfb area <= (maxExtent x * maxExtent y)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self imageForm]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self imageFormForRectangle: (fb topLeft extent: maxExtent)]\\\\n\\\\t\\\\t]\\\\n! !\\\\n\\\\n!Morph methodsFor: 'thumbnail' stamp: 'dgd 9/13/2004 12:43'!\\\\niconOrThumbnailOfSize: aNumberOrPoint \\\\n\\\\t\\\\\\\"Answer an appropiate form to represent the receiver\\\\\\\"\\\\n\\\\n\\\\t^ self iconOrThumbnail scaledIntoFormOfSize: aNumberOrPoint\\\\n! !\\\\n\\\\n!Morph methodsFor: 'thumbnail' stamp: 'sw 8/16/2000 17:40'!\\\\nmorphRepresented\\\\n\\\\t\\\\\\\"If the receiver is an alias, answer the morph it represents; else answer self\\\\\\\"\\\\n\\\\n\\\\t^ self! !\\\\n\\\\n!Morph methodsFor: 'thumbnail' stamp: 'sw 6/16/1999 11:29'!\\\\npermitsThumbnailing\\\\n\\\\t^ true! !\\\\n\\\\n!Morph methodsFor: 'thumbnail' stamp: 'ar 11/9/2000 20:42'!\\\\nreadoutForField: fieldSym\\\\n\\\\t\\\\\\\"Provide a readout that will show the value of the slot/pseudoslot of the receiver generated by sending fieldSym to the receiver\\\\\\\"\\\\n\\\\n\\\\t| aContainer |\\\\n\\\\t\\\\\\\"still need to get this right\\\\\\\"\\\\n\\\\taContainer _ AlignmentMorph newColumn.\\\\n\\\\taContainer layoutInset: 0; hResizing: #rigid; vResizing: #shrinkWrap.\\\\n\\\\taContainer addMorphBack: (StringMorph new contents: (self perform: fieldSym) asString).\\\\n\\\\t^ aContainer! !\\\\n\\\\n!Morph methodsFor: 'thumbnail' stamp: 'sw 12/6/2000 21:28'!\\\\nrepresentativeNoTallerThan: maxHeight norWiderThan: maxWidth thumbnailHeight: thumbnailHeight\\\\n\\\\t\\\\\\\"Return a morph representing the receiver but which is no taller than aHeight.  If the receiver is already small enough, just return it, else return a MorphThumbnail companioned to the receiver, enforcing the maxWidth.  If the receiver personally *demands* thumbnailing, do it even if there is no size-related reason to do it.\\\\\\\"\\\\n\\\\n\\\\tself demandsThumbnailing ifFalse:\\\\n\\\\t\\\\t[self permitsThumbnailing ifFalse: [^ self].\\\\n\\\\t\\\\t(self fullBounds height <= maxHeight and: [self fullBounds width <= maxWidth]) ifTrue: [^ self]].\\\\n\\\\n\\\\t^ MorphThumbnail new extent: maxWidth @ (thumbnailHeight min: self fullBounds height); morphRepresented: self! !\\\\n\\\\n!Morph methodsFor: 'thumbnail' stamp: 'tk 3/28/2000 11:08'!\\\\nupdateThumbnailUrl\\\\n\\\\t\\\\\\\"If I have a cached thumbnail, then update it's urls.\\\\\\\"\\\\n\\\\t| cachedThumbnail |\\\\n\\\\n\\\\t(cachedThumbnail _ self valueOfProperty: #cachedThumbnail) ifNotNil:\\\\n\\\\t\\\\t[(cachedThumbnail respondsTo: #computeThumbnail) \\\\n\\\\t\\\\t\\\\tifTrue: [cachedThumbnail pageMorph: self url inBook: owner url]\\\\n\\\\t\\\\t\\\\tifFalse: [self removeProperty: #computeThumbnail]].\\\\n\\\\t\\\\t\\\\t\\\\\\\"Test and removal are because the thumbnail is being replaced \\\\n\\\\t\\\\t\\\\tby another Morph.  We don't know why.  Need to fix that at \\\\n\\\\t\\\\t\\\\tthe source.\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'thumbnail' stamp: 'tk 3/28/2000 21:55'!\\\\nupdateThumbnailUrlInBook: bookUrl\\\\n\\\\t\\\\\\\"If I have a cached thumbnail, then update it's urls.\\\\\\\"\\\\n\\\\t| cachedThumbnail |\\\\n\\\\n\\\\t(cachedThumbnail _ self valueOfProperty: #cachedThumbnail) ifNotNil:\\\\n\\\\t\\\\t[(cachedThumbnail respondsTo: #computeThumbnail) \\\\n\\\\t\\\\t\\\\tifTrue: [cachedThumbnail pageMorph: self url inBook: bookUrl]\\\\n\\\\t\\\\t\\\\tifFalse: [self removeProperty: #computeThumbnail]].\\\\n\\\\t\\\\t\\\\t\\\\\\\"Test and removal are because the thumbnail is being replaced \\\\n\\\\t\\\\t\\\\tby another Morph.  We don't know why.  Need to fix that at \\\\n\\\\t\\\\t\\\\tthe source.\\\\\\\"! !\\\\n\\\\n\\\\n!Morph methodsFor: 'undo' stamp: 'ar 8/31/2000 23:15'!\\\\ncommandHistory\\\\n\\\\t\\\\\\\"Return the command history for the receiver\\\\\\\"\\\\n\\\\t| w |\\\\n\\\\t(w _ self world) ifNotNil:[^w commandHistory].\\\\n\\\\t(w _ self currentWorld) ifNotNil:[^w commandHistory].\\\\n\\\\t^CommandHistory new. \\\\\\\"won't really record anything but prevent breaking things\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'undo' stamp: 'md 10/22/2003 15:56'!\\\\nundoMove: cmd redo: redo owner: formerOwner bounds: formerBounds predecessor: formerPredecessor \\\\n\\\\t\\\\\\\"Handle undo and redo of move commands in morphic\\\\\\\"\\\\n\\\\n\\\\tself owner ifNil: [^Beeper beep].\\\\n\\\\tredo \\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"undo sets up the redo state first\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\tcmd \\\\n\\\\t\\\\t\\\\t\\\\tredoTarget: self\\\\n\\\\t\\\\t\\\\t\\\\tselector: #undoMove:redo:owner:bounds:predecessor:\\\\n\\\\t\\\\t\\\\t\\\\targuments: { \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcmd.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttrue.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\towner.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbounds.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\towner morphPreceding: self}].\\\\n\\\\tformerOwner ifNotNil: \\\\n\\\\t\\\\t\\\\t[formerPredecessor ifNil: [formerOwner addMorphFront: self]\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil: [formerOwner addMorph: self after: formerPredecessor]].\\\\n\\\\tself bounds: formerBounds.\\\\n\\\\t(self isSystemWindow) ifTrue: [self activate]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'updating' stamp: 'ar 6/25/2001 19:46'!\\\\nchanged\\\\n\\\\t\\\\\\\"Report that the area occupied by this morph should be redrawn.\\\\\\\"\\\\n\\\\t^fullBounds \\\\n\\\\t\\\\tifNil:[self invalidRect: self outerBounds]\\\\n\\\\t\\\\tifNotNil:[self invalidRect: fullBounds]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'user interface' stamp: 'tak 3/15/2005 17:36'!\\\\nbecomeModal\\\\n\\\\tself currentWorld\\\\n\\\\t\\\\tifNotNil: [self currentWorld modalWindow: self]! !\\\\n\\\\n!Morph methodsFor: 'user interface' stamp: 'sw 5/29/2000 00:41'!\\\\ndefaultLabelForInspector\\\\n\\\\t\\\\\\\"Answer the default label to be used for an Inspector window on the receiver.\\\\\\\"\\\\n\\\\t^ super printString truncateTo: 40! !\\\\n\\\\n!Morph methodsFor: 'user interface' stamp: 'tak 3/15/2005 17:10'!\\\\ndoCancel\\\\n\\\\tself delete! !\\\\n\\\\n!Morph methodsFor: 'user interface' stamp: 'sw 10/2/97 23:08'!\\\\ninitialExtent\\\\n\\\\t| ext |\\\\n\\\\t(ext _ self valueOfProperty: #initialExtent)\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t[^ ext].\\\\n\\\\t^ super initialExtent! !\\\\n\\\\n\\\\n!Morph methodsFor: 'viewer' stamp: 'sw 10/30/1998 14:46'!\\\\nexternalName\\\\n\\\\t^ self knownName ifNil: [self innocuousName]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'visual properties' stamp: 'ar 6/25/1999 11:11'!\\\\ncanHaveFillStyles\\\\n\\\\t\\\\\\\"Return true if the receiver can have general fill styles; not just colors.\\\\n\\\\tThis method is for gradually converting old morphs.\\\\\\\"\\\\n\\\\t^self class == Morph \\\\\\\"no subclasses\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'visual properties' stamp: 'mk 8/7/2005 10:02'!\\\\ncornerStyle\\\\n\\\\t\\\\\\\"Returns one of the following symbols:\\\\n\\\\t\\\\t#square\\\\n\\\\t\\\\t#rounded\\\\n\\\\taccording to the current corner style.\\\\\\\"\\\\n\\\\n\\\\t^ self valueOfProperty: #cornerStyle ifAbsent: [#square]! !\\\\n\\\\n!Morph methodsFor: 'visual properties' stamp: 'nk 8/28/2003 15:56'!\\\\ndefaultBitmapFillForm\\\\n\\\\t^ImageMorph defaultForm.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'visual properties' stamp: 'dgd 2/16/2003 20:02'!\\\\nfillStyle\\\\n\\\\t\\\\\\\"Return the current fillStyle of the receiver.\\\\\\\"\\\\n\\\\t^ self\\\\n\\\\t\\\\tvalueOfProperty: #fillStyle\\\\n\\\\t\\\\tifAbsent: [\\\\\\\"Workaround already converted morphs\\\\\\\"\\\\n\\\\t\\\\t\\\\tcolor\\\\n\\\\t\\\\t\\\\t\\\\tifNil: [self defaultColor]]! !\\\\n\\\\n!Morph methodsFor: 'visual properties' stamp: 'ar 6/18/1999 07:05'!\\\\nfillStyle: aFillStyle\\\\n\\\\t\\\\\\\"Set the current fillStyle of the receiver.\\\\\\\"\\\\n\\\\tself setProperty: #fillStyle toValue: aFillStyle.\\\\n\\\\t\\\\\\\"Workaround for Morphs not yet converted\\\\\\\"\\\\n\\\\tcolor _ aFillStyle asColor.\\\\n\\\\tself changed.! !\\\\n\\\\n!Morph methodsFor: 'visual properties' stamp: 'dgd 1/7/2005 19:31'!\\\\nfillWithRamp: rampSpecsOrColor oriented: aRatio \\\\n\\\\trampSpecsOrColor isColor\\\\n\\\\t\\\\tifTrue: [self color: rampSpecsOrColor\\\\\\\".\\\\n\\\\t\\\\t\\\\tself borderColor: rampSpecsOrColor muchDarker\\\\\\\"]\\\\n\\\\t\\\\tifFalse: [| fill | \\\\n\\\\t\\\\t\\\\tfill := GradientFillStyle ramp: rampSpecsOrColor.\\\\n\\\\t\\\\t\\\\tfill origin: self bounds topLeft.\\\\n\\\\t\\\\t\\\\tfill direction: (self bounds extent * aRatio) truncated.\\\\n\\\\t\\\\t\\\\tfill radial: false.\\\\n\\\\t\\\\t\\\\tself fillStyle: fill.\\\\n\\\\t\\\\t\\\\tself borderColor: (rampSpecsOrColor first value mixed: 0.5 with: rampSpecsOrColor last value) muchDarker]! !\\\\n\\\\n!Morph methodsFor: 'visual properties' stamp: 'nk 8/28/2003 15:57'!\\\\nuseBitmapFill\\\\n\\\\t\\\\\\\"Make receiver use a solid fill style (e.g., a simple color)\\\\\\\"\\\\n\\\\t| fill |\\\\n\\\\tself fillStyle isBitmapFill ifTrue:[^self]. \\\\\\\"Already done\\\\\\\"\\\\n\\\\tfill _ BitmapFillStyle fromForm: self defaultBitmapFillForm.\\\\n\\\\t\\\\\\\"Note: Must fix the origin due to global coordinates\\\\\\\"\\\\n\\\\tfill origin: self bounds origin.\\\\n\\\\tself fillStyle: fill.! !\\\\n\\\\n!Morph methodsFor: 'visual properties' stamp: 'ar 6/25/1999 11:11'!\\\\nuseDefaultFill\\\\n\\\\t\\\\\\\"Make receiver use a solid fill style (e.g., a simple color)\\\\\\\"\\\\n\\\\tself fillStyle: self defaultColor.! !\\\\n\\\\n!Morph methodsFor: 'visual properties' stamp: 'nk 2/27/2003 11:48'!\\\\nuseGradientFill\\\\n\\\\t\\\\\\\"Make receiver use a solid fill style (e.g., a simple color)\\\\\\\"\\\\n\\\\t| fill color1 color2 |\\\\n\\\\tself fillStyle isGradientFill ifTrue:[^self]. \\\\\\\"Already done\\\\\\\"\\\\n\\\\tcolor1 _ self color asColor.\\\\n\\\\tcolor2 _ color1 negated.\\\\n\\\\tfill _ GradientFillStyle ramp: {0.0 -> color1. 1.0 -> color2}.\\\\n\\\\tfill origin: self topLeft.\\\\n\\\\tfill direction: 0 @ self bounds extent y.\\\\n\\\\tfill normal: self bounds extent x @ 0.\\\\n\\\\tfill radial: false.\\\\n\\\\tself fillStyle: fill! !\\\\n\\\\n!Morph methodsFor: 'visual properties' stamp: 'ar 6/18/1999 06:57'!\\\\nuseSolidFill\\\\n\\\\t\\\\\\\"Make receiver use a solid fill style (e.g., a simple color)\\\\\\\"\\\\n\\\\tself fillStyle isSolidFill ifTrue:[^self]. \\\\\\\"Already done\\\\\\\"\\\\n\\\\tself fillStyle: self fillStyle asColor. \\\\\\\"Try minimizing changes\\\\\\\"! !\\\\n\\\\n\\\\n!Morph methodsFor: 'WiW support' stamp: 'RAA 2/16/2001 13:57'!\\\\naddMorphInFrontOfLayer: aMorph\\\\n\\\\n\\\\t| targetLayer layerHere |\\\\n\\\\n\\\\ttargetLayer _ aMorph morphicLayerNumberWithin: self.\\\\n\\\\tsubmorphs do: [ :each |\\\\n\\\\t\\\\teach == aMorph ifTrue: [^self].\\\\n\\\\t\\\\tlayerHere _ each morphicLayerNumberWithin: self.\\\\n\\\\t\\\\t\\\\\\\"the <= is the difference - it insures we go to the front of our layer\\\\\\\"\\\\n\\\\t\\\\ttargetLayer <= layerHere ifTrue: [\\\\n\\\\t\\\\t\\\\t^self addMorph: aMorph inFrontOf: each\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\tself addMorphBack: aMorph.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'WiW support' stamp: 'RAA 6/29/2000 10:49'!\\\\naddMorphInLayer: aMorph\\\\n\\\\n\\\\tsubmorphs do: [ :each |\\\\n\\\\t\\\\teach == aMorph ifTrue: [^self].\\\\n\\\\t\\\\taMorph morphicLayerNumber < each morphicLayerNumber ifTrue: [\\\\n\\\\t\\\\t\\\\t^self addMorph: aMorph inFrontOf: each\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\tself addMorphBack: aMorph\\\\n! !\\\\n\\\\n!Morph methodsFor: 'WiW support' stamp: 'gk 5/24/2004 15:43'!\\\\neToyRejectDropMorph: morphToDrop event: evt\\\\n\\\\n\\\\t| tm am |\\\\n\\\\n\\\\ttm _ TextMorph new \\\\n\\\\t\\\\tbeAllFont: ((TextStyle named: Preferences standardEToysFont familyName) fontOfSize: 24);\\\\n\\\\t\\\\tcontents: 'GOT IT!!'.\\\\n\\\\t(am _ AlignmentMorph new)\\\\n\\\\t\\\\tcolor: Color yellow;\\\\n\\\\t\\\\tlayoutInset: 10;\\\\n\\\\t\\\\tuseRoundedCorners;\\\\n\\\\t\\\\tvResizing: #shrinkWrap;\\\\n\\\\t\\\\thResizing: #shrinkWrap;\\\\n\\\\t\\\\taddMorph: tm;\\\\n\\\\t\\\\tfullBounds;\\\\n\\\\t\\\\tposition: (self bounds center - (am extent // 2));\\\\n\\\\t\\\\topenInWorld: self world.\\\\n\\\\tSoundService default playSoundNamed: 'yum' ifAbsentReadFrom: 'yum.aif'.\\\\n\\\\tmorphToDrop rejectDropMorphEvent: evt.\\\\t\\\\t\\\\\\\"send it back where it came from\\\\\\\"\\\\n\\\\tam delete\\\\n! !\\\\n\\\\n!Morph methodsFor: 'WiW support' stamp: 'RAA 7/19/2000 20:44'!\\\\nmorphicLayerNumber\\\\n\\\\n\\\\t\\\\\\\"helpful for insuring some morphs always appear in front of or behind others.\\\\n\\\\tsmaller numbers are in front\\\\\\\"\\\\n\\\\n\\\\t^(owner isNil or: [owner isWorldMorph]) ifTrue: [\\\\n\\\\t\\\\tself valueOfProperty: #morphicLayerNumber ifAbsent: [100]\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\towner morphicLayerNumber\\\\n\\\\t].\\\\n\\\\n\\\\t\\\\\\\"leave lots of room for special things\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'WiW support' stamp: 'RAA 2/16/2001 13:54'!\\\\nmorphicLayerNumberWithin: anOwner\\\\n\\\\n\\\\t\\\\\\\"helpful for insuring some morphs always appear in front of or behind others.\\\\n\\\\tsmaller numbers are in front\\\\\\\"\\\\n\\\\n\\\\t^(owner isNil or: [owner isWorldMorph or: [anOwner == owner]]) ifTrue: [\\\\n\\\\t\\\\tself valueOfProperty: #morphicLayerNumber ifAbsent: [100]\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\towner morphicLayerNumber\\\\n\\\\t].\\\\n\\\\n\\\\t\\\\\\\"leave lots of room for special things\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'WiW support' stamp: 'RAA 7/16/2000 13:54'!\\\\nrandomBoundsFor: aMorph\\\\n\\\\n\\\\t| trialRect |\\\\n\\\\ttrialRect _ (\\\\n\\\\t\\\\tself topLeft + \\\\n\\\\t\\\\t\\\\t((self width * (15 + 75 atRandom/100)) rounded @\\\\n\\\\t\\\\t\\\\t(self height * (15 + 75 atRandom/100)) rounded)\\\\n\\\\t) extent: aMorph extent.\\\\n\\\\t^trialRect translateBy: (trialRect amountToTranslateWithin: self bounds)\\\\n! !\\\\n\\\\n!Morph methodsFor: 'WiW support' stamp: 'ar 3/18/2001 00:14'!\\\\nshouldGetStepsFrom: aWorld\\\\n\\\\t^self world == aWorld! !\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n!Morph methodsFor: '*eToys-customevents-scripting' stamp: 'nk 9/24/2003 17:31'!\\\\ninstantiatedUserScriptsDo: aBlock\\\\n\\\\tself actorStateOrNil ifNotNilDo: [ :aState | aState instantiatedUserScriptsDictionary do: aBlock]! !\\\\n\\\\n!Morph methodsFor: '*eToys-customevents-scripting' stamp: 'nk 9/25/2003 11:36'!\\\\nremoveAllEventTriggers\\\\n\\\\t\\\\\\\"Remove all the event registrations for my Player.\\\\n\\\\tUser custom events are triggered at the World,\\\\n\\\\twhile system custom events are triggered on individual Morphs.\\\\\\\"\\\\n\\\\n\\\\t| player |\\\\n\\\\t(player _ self player) ifNil: [ ^self ].\\\\n\\\\tself removeAllEventTriggersFor: player.\\\\n\\\\tself currentWorld removeAllEventTriggersFor: player.! !\\\\n\\\\n!Morph methodsFor: '*eToys-customevents-scripting' stamp: 'nk 9/24/2003 17:46'!\\\\nremoveAllEventTriggersFor: aPlayer\\\\n\\\\t\\\\\\\"Remove all the event registrations for aPlayer.\\\\n\\\\tUser custom events are triggered at the World,\\\\n\\\\twhile system custom events are triggered on individual Morphs.\\\\\\\"\\\\n\\\\n\\\\tself removeActionsSatisfying: \\\\n\\\\t\\\\t\\\\t[:action | action receiver == aPlayer and: [(#(#doScript: #triggerScript:) includes: action selector) ]].! !\\\\n\\\\n!Morph methodsFor: '*eToys-customevents-scripting' stamp: 'nk 9/25/2003 11:37'!\\\\nremoveEventTrigger: aSymbol\\\\n\\\\t\\\\\\\"Remove all the event registrations for my Player that are triggered by aSymbol.\\\\n\\\\tUser custom events are triggered at the World,\\\\n\\\\twhile system custom events are triggered on individual Morphs.\\\\\\\"\\\\n\\\\n\\\\t| player |\\\\n\\\\t(player _ self player) ifNil: [ ^self ].\\\\n\\\\tself removeEventTrigger: aSymbol for: player.\\\\n\\\\tself currentWorld removeEventTrigger: aSymbol for: player.! !\\\\n\\\\n!Morph methodsFor: '*eToys-customevents-scripting' stamp: 'nk 9/25/2003 11:24'!\\\\nremoveEventTrigger: aSymbol for: aPlayer \\\\n\\\\t\\\\\\\"Remove all the event registrations for aPlayer that are triggered by \\\\n\\\\taSymbol. User custom events are triggered at the World, \\\\n\\\\twhile system custom events are triggered on individual Morphs.\\\\\\\"\\\\n\\\\tself removeActionsSatisfying: [:action | action receiver == aPlayer\\\\n\\\\t\\\\t\\\\t\\\\tand: [(#(#doScript: #triggerScript: ) includes: action selector)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tand: [action arguments first == aSymbol]]]! !\\\\n\\\\n!Morph methodsFor: '*eToys-customevents-scripting' stamp: 'nk 9/25/2003 11:11'!\\\\nrenameScriptActionsFor: aPlayer from: oldSelector to: newSelector\\\\n\\\\n\\\\tself updateableActionMap keysAndValuesDo: [ :event :sequence |\\\\n\\\\t\\\\tsequence asActionSequence do: [ :action |\\\\n\\\\t\\\\t\\\\t((action receiver == aPlayer)\\\\n\\\\t\\\\t\\\\t\\\\tand: [ (#(doScript: triggerScript:) includes: action selector)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [ action arguments first == oldSelector ]])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [ action arguments at: 1 put: newSelector ]]]\\\\n! !\\\\n\\\\n!Morph methodsFor: '*eToys-customevents-scripting' stamp: 'nk 11/1/2004 11:00'!\\\\ntriggerCustomEvent: aSymbol\\\\n\\\\t\\\\\\\"Trigger whatever scripts may be connected to the custom event named aSymbol\\\\\\\"\\\\n\\\\n\\\\tself currentWorld triggerEtoyEvent: aSymbol from: self! !\\\\n\\\\n!Morph methodsFor: '*eToys-customevents-scripting' stamp: 'nk 11/1/2004 10:54'!\\\\ntriggerEtoyEvent: aSymbol\\\\n\\\\t\\\\\\\"Trigger whatever scripts may be connected to the event named aSymbol.\\\\n\\\\tIf anyone comes back to ask who sent it, return our player.\\\\\\\"\\\\n\\\\n\\\\t[ self triggerEvent: aSymbol ]\\\\n\\\\t\\\\ton: GetTriggeringObjectNotification do: [ :ex |\\\\n\\\\t\\\\t\\\\tex isNested\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [ ex pass ]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [ ex resume: self assuredPlayer ]]\\\\n! !\\\\n\\\\n!Morph methodsFor: '*eToys-customevents-scripting' stamp: 'nk 11/1/2004 10:58'!\\\\ntriggerEtoyEvent: aSymbol from: aMorph\\\\n\\\\t\\\\\\\"Trigger whatever scripts may be connected to the event named aSymbol.\\\\n\\\\tIf anyone comes back to ask who sent it, return aMorph's player.\\\\\\\"\\\\n\\\\n\\\\t[ self triggerEvent: aSymbol ]\\\\n\\\\t\\\\ton: GetTriggeringObjectNotification do: [ :ex |\\\\n\\\\t\\\\t\\\\tex isNested\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [ ex pass ]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [ ex resume: aMorph assuredPlayer ]]\\\\n! !\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n!Morph methodsFor: '*Flash-classification' stamp: 'ar 8/10/1998 18:50'!\\\\nisFlashMorph\\\\n\\\\t^false! !\\\\n\\\\n\\\\n!Morph methodsFor: '*flexibleVocabularies-flexiblevocabularies-scripting' stamp: 'nk 9/11/2004 17:31'!\\\\nunfilteredCategoriesForViewer\\\\n\\\\t\\\\\\\"Answer a list of symbols representing the categories to offer in the viewer, in order of:\\\\n\\\\t- masterOrderingOfCategorySymbols first\\\\n\\\\t- others last in order by translated wording\\\\\\\"\\\\n\\\\t\\\\\\\"\\\\n\\\\tMorph basicNew unfilteredCategoriesForViewer\\\\n\\\\t\\\\\\\"\\\\n\\\\t^self renderedMorph class unfilteredCategoriesForViewer.\\\\n! !\\\\n\\\\n\\\\n!Morph methodsFor: '*MorphicExtras-accessing' stamp: 'dgd 1/7/2005 19:07'!\\\\nhighlightOnlySubmorph: aMorph\\\\n\\\\t\\\\\\\"Distinguish only aMorph with border highlighting (2-pixel wide red); make all my other submorphs have one-pixel-black highlighting.  This is a rather special-purpose and hard-coded highlighting regime, of course.  Later, if someone cared to do it, we could parameterize the widths and colors via properties, or some such.\\\\\\\"\\\\n\\\\n\\\\tself submorphs do:\\\\n\\\\t\\\\t[:m |\\\\n\\\\t\\\\t\\\\tm == aMorph\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [m borderWidth: 1; borderColor: Color red. m firstSubmorph color: Color red]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [m borderWidth: 1; borderColor: Color black. m firstSubmorph color: Color black]\\\\n\\\\t\\\\t].\\\\n! !\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n!Morph methodsFor: '*MorphicExtras-geometry' stamp: 'dgd 8/31/2004 16:22'!\\\\nshiftSubmorphsBy: delta\\\\n\\\\tself shiftSubmorphsOtherThan: (submorphs select: [:m | m wantsToBeTopmost]) by: delta! !\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n!Morph methodsFor: '*MorphicExtras-menus' stamp: 'dgd 4/3/2006 14:18'!\\\\ndismissButton\\\\n\\\\t\\\\\\\"Answer a button whose action would be to dismiss the receiver, and whose action is to send #delete to the receiver\\\\\\\"\\\\n\\\\n\\\\t| aButton |\\\\n\\\\taButton _ SimpleButtonMorph new.\\\\n\\\\taButton\\\\n\\\\t\\\\ttarget: self topRendererOrSelf;\\\\n\\\\t\\\\tcolor: ColorTheme current cancelColor;\\\\n\\\\t\\\\tborderColor: ColorTheme current cancelColor muchDarker;\\\\n\\\\t\\\\tborderWidth: 1;\\\\n\\\\t\\\\tlabel: 'X' font: Preferences standardButtonFont;\\\\n\\\\t\\\\tactionSelector: #delete;\\\\n\\\\t\\\\tsetBalloonText: 'dismiss' translated.\\\\n\\\\t^ aButton! !\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n!Morph methodsFor: '*services-base' stamp: 'rr 6/10/2005 11:30'!\\\\nrequestor\\\\n\\\\t^ owner ifNil: [super requestor] ifNotNil: [owner requestor]! !\\\\n\\\\n\\\\n!Morph methodsFor: '*sound-piano rolls' stamp: 'RAA 12/11/2000 17:29'!\\\\naddMorphsTo: morphList pianoRoll: pianoRoll eventTime: t betweenTime: leftTime and: rightTime\\\\n\\\\n\\\\t\\\\\\\"a hack to allow for abitrary morphs to be dropped into piano roll\\\\\\\"\\\\n\\\\tt > rightTime ifTrue: [^ self].  \\\\n\\\\tt < leftTime ifTrue: [^ self].\\\\n\\\\tmorphList add: (self left: (pianoRoll xForTime: t)).\\\\n! !\\\\n\\\\n!Morph methodsFor: '*sound-piano rolls' stamp: 'RAA 12/11/2000 15:48'!\\\\nencounteredAtTime: ticks inScorePlayer: scorePlayer atIndex: index inEventTrack: track secsPerTick: secsPerTick\\\\n\\\\n\\\\t\\\\\\\"a hack to allow for abitrary morphs to be dropped into piano roll\\\\\\\"\\\\n\\\\tself triggerActionFromPianoRoll.! !\\\\n\\\\n!Morph methodsFor: '*sound-piano rolls' stamp: 'stephaneducasse 2/4/2006 20:40'!\\\\njustDroppedIntoPianoRoll: pianoRoll event: evt\\\\n\\\\t\\\\n\\\\t| ambientEvent startTimeInScore |\\\\n\\\\tstartTimeInScore := pianoRoll timeForX: self left.\\\\n\\\\n\\\\tambientEvent := AmbientEvent new \\\\n\\\\t\\\\tmorph: self;\\\\n\\\\t\\\\ttime: startTimeInScore.\\\\n\\\\n\\\\tpianoRoll score addAmbientEvent: ambientEvent.\\\\n\\\\n\\\\t\\\\\\\"self endTime > pianoRoll scorePlayer durationInTicks ifTrue:\\\\n\\\\t\\\\t[pianoRoll scorePlayer updateDuration]\\\\\\\"\\\\n! !\\\\n\\\\n!Morph methodsFor: '*sound-piano rolls' stamp: 'RAA 12/11/2000 23:21'!\\\\npauseFrom: scorePlayer\\\\n\\\\n\\\\t\\\\\\\"subclasses should take five\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: '*sound-piano rolls' stamp: 'RAA 12/11/2000 23:22'!\\\\nresetFrom: scorePlayer\\\\n\\\\n\\\\t\\\\\\\"subclasses should revert to their initial state\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: '*sound-piano rolls' stamp: 'RAA 12/11/2000 23:21'!\\\\nresumeFrom: scorePlayer\\\\n\\\\n\\\\t\\\\\\\"subclasses should continue from their current position\\\\\\\"\\\\n\\\\t\\\\\\\"a hack to allow for abitrary morphs to be dropped into piano roll\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: '*sound-piano rolls' stamp: 'stephaneducasse 2/4/2006 20:40'!\\\\ntriggerActionFromPianoRoll\\\\n\\\\n\\\\t| evt |\\\\n\\\\t\\\\\\\"a hack to allow for abitrary morphs to be dropped into piano roll\\\\\\\"\\\\n\\\\tself world ifNil: [^self].\\\\n\\\\tevt := MouseEvent new setType: nil position: self center buttons: 0 hand: self world activeHand.\\\\n\\\\tself programmedMouseUp: evt for: self.\\\\n\\\\n! !\\\\n\\\\n\\\\n!Morph methodsFor: 'private' stamp: 'sw 10/25/2000 06:11'!\\\\nmoveWithPenDownBy: delta\\\\n\\\\t\\\\\\\"If this is a costume for a player with its pen down, draw a line.\\\\\\\"\\\\n\\\\n\\\\t| trailMorph tfm start tfmEnd |\\\\n\\\\t(trailMorph _ self trailMorph) ifNotNil:\\\\n\\\\t\\\\t[tfm _ self owner transformFrom: trailMorph.\\\\n\\\\t\\\\tstart _  self referencePosition.\\\\n\\\\t\\\\ttrailMorph batchPenTrails\\\\n\\\\t\\\\t\\\\tifTrue: [trailMorph notePenDown: true\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforPlayer: self player\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tat: (tfm localPointToGlobal: start)]\\\\n\\\\t\\\\t\\\\tifFalse: [trailMorph drawPenTrailFor: self\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfrom: (tfm localPointToGlobal: start)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tto: (tfmEnd _ tfm localPointToGlobal: start + delta).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttrailMorph noteNewLocation: tfmEnd forPlayer: self player]]\\\\n! !\\\\n\\\\n!Morph methodsFor: 'private' stamp: 'nk 10/11/2003 16:08'!\\\\nprivateAddAllMorphs: aCollection atIndex: index\\\\n\\\\t\\\\\\\"Private. Add aCollection of morphs to the receiver\\\\\\\"\\\\n\\\\t| myWorld itsWorld otherSubmorphs |\\\\n\\\\tmyWorld _ self world.\\\\n\\\\totherSubmorphs _ submorphs copyWithoutAll: aCollection.\\\\n\\\\t(index between: 0 and: otherSubmorphs size)\\\\n\\\\t\\\\tifFalse: [^ self error: 'index out of range'].\\\\n\\\\tindex = 0\\\\n\\\\t\\\\tifTrue:[\\\\tsubmorphs _ aCollection asArray, otherSubmorphs]\\\\n\\\\t\\\\tifFalse:[\\\\tindex = otherSubmorphs size\\\\n\\\\t\\\\t\\\\tifTrue:[\\\\tsubmorphs _ otherSubmorphs, aCollection]\\\\n\\\\t\\\\t\\\\tifFalse:[\\\\tsubmorphs _ otherSubmorphs copyReplaceFrom: index + 1 to: index with: aCollection ]].\\\\n\\\\taCollection do: [:m | | itsOwner |\\\\n\\\\t\\\\titsOwner _ m owner.\\\\n\\\\t\\\\titsOwner ifNotNil: [\\\\n\\\\t\\\\t\\\\titsWorld _ m world.\\\\n\\\\t\\\\t\\\\t(itsWorld == myWorld) ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\titsWorld ifNotNil: [self privateInvalidateMorph: m].\\\\n\\\\t\\\\t\\\\t\\\\tm outOfWorld: itsWorld].\\\\n\\\\t\\\\t\\\\t(itsOwner ~~ self) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tm owner privateRemove: m.\\\\n\\\\t\\\\t\\\\t\\\\tm owner removedMorph: m ]].\\\\n\\\\t\\\\tm privateOwner: self.\\\\n\\\\t\\\\tmyWorld ifNotNil: [self privateInvalidateMorph: m].\\\\n\\\\t\\\\t(myWorld == itsWorld) ifFalse: [m intoWorld: myWorld].\\\\n\\\\t\\\\titsOwner == self ifFalse: [\\\\n\\\\t\\\\t\\\\tself addedMorph: m.\\\\n\\\\t\\\\t\\\\tm noteNewOwner: self ].\\\\n\\\\t].\\\\n\\\\tself layoutChanged.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'private' stamp: 'nk 10/11/2003 16:08'!\\\\nprivateAddMorph: aMorph atIndex: index\\\\n\\\\n\\\\t| oldIndex myWorld itsWorld oldOwner |\\\\n\\\\t((index >= 1) and: [index <= (submorphs size + 1)])\\\\n\\\\t\\\\tifFalse: [^ self error: 'index out of range'].\\\\n\\\\tmyWorld _ self world.\\\\n\\\\toldOwner _ aMorph owner.\\\\n\\\\t(oldOwner == self and: [(oldIndex _ submorphs indexOf: aMorph) > 0]) ifTrue:[\\\\n\\\\t\\\\t\\\\\\\"aMorph's position changes within in the submorph chain\\\\\\\"\\\\n\\\\t\\\\toldIndex < index ifTrue:[\\\\n\\\\t\\\\t\\\\t\\\\\\\"moving aMorph to back\\\\\\\"\\\\n\\\\t\\\\t\\\\tsubmorphs replaceFrom: oldIndex to: index-2 with: submorphs startingAt: oldIndex+1.\\\\n\\\\t\\\\t\\\\tsubmorphs at: index-1 put: aMorph.\\\\n\\\\t\\\\t] ifFalse:[\\\\n\\\\t\\\\t\\\\t\\\\\\\"moving aMorph to front\\\\\\\"\\\\n\\\\t\\\\t\\\\toldIndex-1 to: index by: -1 do:[:i|\\\\n\\\\t\\\\t\\\\t\\\\tsubmorphs at: i+1 put: (submorphs at: i)].\\\\n\\\\t\\\\t\\\\tsubmorphs at: index put: aMorph.\\\\n\\\\t\\\\t].\\\\n\\\\t] ifFalse:[\\\\n\\\\t\\\\t\\\\\\\"adding a new morph\\\\\\\"\\\\n\\\\t\\\\toldOwner ifNotNil:[\\\\n\\\\t\\\\t\\\\titsWorld _ aMorph world.\\\\n\\\\t\\\\t\\\\titsWorld ifNotNil: [self privateInvalidateMorph: aMorph].\\\\n\\\\t\\\\t\\\\t(itsWorld == myWorld) ifFalse: [aMorph outOfWorld: itsWorld].\\\\n\\\\t\\\\t\\\\toldOwner privateRemove: aMorph.\\\\n\\\\t\\\\t\\\\toldOwner removedMorph: aMorph.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\taMorph privateOwner: self.\\\\n\\\\t\\\\tsubmorphs _ submorphs copyReplaceFrom: index to: index-1 with: (Array with: aMorph).\\\\n\\\\t\\\\t(itsWorld == myWorld) ifFalse: [aMorph intoWorld: myWorld].\\\\n\\\\t].\\\\n\\\\tmyWorld ifNotNil:[self privateInvalidateMorph: aMorph].\\\\n\\\\tself layoutChanged.\\\\n\\\\toldOwner == self ifFalse: [\\\\n\\\\t\\\\tself addedMorph: aMorph.\\\\n\\\\t\\\\taMorph noteNewOwner: self ].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'private'!\\\\nprivateBounds: boundsRect\\\\n\\\\t\\\\\\\"Private!! Use position: and/or extent: instead.\\\\\\\"\\\\n\\\\n\\\\tfullBounds _ nil.\\\\n\\\\tbounds _ boundsRect.! !\\\\n\\\\n!Morph methodsFor: 'private' stamp: 'jm 5/29/1998 21:28'!\\\\nprivateColor: aColor\\\\n\\\\n\\\\tcolor _ aColor.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'private' stamp: 'RAA 5/23/2000 11:31'!\\\\nprivateDeleteWithAbsolutelyNoSideEffects\\\\n\\\\t\\\\\\\"Private!! Should only be used by methods that maintain the ower/submorph invariant.\\\\\\\"\\\\n\\\\t\\\\\\\"used to delete a morph from an inactive world\\\\\\\"\\\\n\\\\n\\\\towner ifNil: [^self].\\\\n\\\\towner privateRemoveMorphWithAbsolutelyNoSideEffects: self.\\\\n\\\\towner _ nil.\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'private' stamp: 'tk 8/30/1998 09:58'!\\\\nprivateFullBounds: boundsRect\\\\n\\\\t\\\\\\\"Private!! Computed automatically.\\\\\\\"\\\\n\\\\n\\\\tfullBounds _ boundsRect.! !\\\\n\\\\n!Morph methodsFor: 'private' stamp: 'ar 12/16/2001 21:47'!\\\\nprivateFullMoveBy: delta\\\\n\\\\t\\\\\\\"Private!! Relocate me and all of my subMorphs by recursion. Subclasses that implement different coordinate systems may override this method.\\\\\\\"\\\\n\\\\n\\\\tself privateMoveBy: delta.\\\\n\\\\t1 to: submorphs size do: [:i |\\\\n\\\\t\\\\t(submorphs at: i) privateFullMoveBy: delta].\\\\n\\\\towner ifNotNil:[\\\\n\\\\t\\\\towner isTextMorph ifTrue:[owner adjustTextAnchor: self]].! !\\\\n\\\\n!Morph methodsFor: 'private' stamp: 'md 2/27/2006 08:55'!\\\\nprivateMoveBy: delta \\\\n\\\\t\\\\\\\"Private!! Use 'position:' instead.\\\\\\\"\\\\n\\\\t| fill |\\\\n\\\\textension ifNotNil: [extension player\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil: [\\\\\\\"Most cases eliminated fast by above test\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself getPenDown\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"If this is a costume for a player with its \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tpen down, draw a line.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself moveWithPenDownBy: delta]]].\\\\n\\\\tbounds _ bounds translateBy: delta.\\\\n\\\\tfullBounds ifNotNil: [fullBounds _ fullBounds translateBy: delta].\\\\n\\\\tfill _ self fillStyle.\\\\n\\\\tfill isOrientedFill ifTrue: [fill origin: fill origin + delta]! !\\\\n\\\\n!Morph methodsFor: 'private'!\\\\nprivateOwner: aMorph\\\\n\\\\t\\\\\\\"Private!! Should only be used by methods that maintain the ower/submorph invariant.\\\\\\\"\\\\n\\\\n\\\\towner _ aMorph.! !\\\\n\\\\n!Morph methodsFor: 'private' stamp: 'RAA 5/23/2000 11:30'!\\\\nprivateRemoveMorphWithAbsolutelyNoSideEffects: aMorph\\\\n\\\\t\\\\\\\"Private!! Should only be used by methods that maintain the ower/submorph invariant.\\\\\\\"\\\\n\\\\t\\\\\\\"used to delete a morph from an inactive world\\\\\\\"\\\\n\\\\n\\\\tsubmorphs _ submorphs copyWithout: aMorph.\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'private' stamp: 'di 10/18/2004 21:49'!\\\\nprivateRemove: aMorph\\\\n\\\\t\\\\\\\"Private!! Should only be used by methods that maintain the ower/submorph invariant.\\\\\\\"\\\\n\\\\n\\\\tsubmorphs _ submorphs copyWithout: aMorph.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'private'!\\\\nprivateSubmorphs\\\\n\\\\t\\\\\\\"Private!! Use 'submorphs' instead.\\\\\\\"\\\\n\\\\n\\\\t^ submorphs! !\\\\n\\\\n!Morph methodsFor: 'private'!\\\\nprivateSubmorphs: aCollection\\\\n\\\\t\\\\\\\"Private!! Should only be used by methods that maintain the ower/submorph invariant.\\\\\\\"\\\\n\\\\n\\\\tsubmorphs _ aCollection.! !\\\\n\\\\n\\\\n!Morph methodsFor: 'accessing-backstop' stamp: 'wiz 2/14/2006 19:02'!\\\\ntarget: aMorph\\\\n\\\\\\\"Morphs with targets will override. This backstop does nothing.\\\\\\\"\\\\n\\\\\\\"This is here because targeting meta-actions are taken at morph level. \\\\nDo not remove.\\\\\\\"! !\\\\n\\\\n\\\\n!Morph methodsFor: 'translation' stamp: 'yo 1/27/2005 23:29'!\\\\naccumlatePlayersInto: aCollection andSelectorsInto: selectorsCollection\\\\n\\\\n\\\\tsubmorphs do: [:tile |\\\\n\\\\t\\\\t(tile isMemberOf: TileMorph) ifTrue: [\\\\n\\\\t\\\\t\\\\t(tile type = #objRef and: [tile actualObject isKindOf: Player]) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\taCollection add: tile actualObject\\\\n\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\t(tile isKindOf: AssignmentTileMorph) ifTrue: [\\\\n\\\\t\\\\t\\\\t(tile type = #operator) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tselectorsCollection add: tile operatorOrExpression\\\\n\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\ttile accumlatePlayersInto: aCollection andSelectorsInto: selectorsCollection\\\\n\\\\t].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'translation' stamp: 'sw 3/7/2004 13:03'!\\\\nisPlayer: aPlayer ofReferencingTile: tile\\\\n\\\\t\\\\\\\"Answer whether the given player is the object referred to by the given tile, or a sibling of that object.  This theoretically is only sent to PhraseTileMorphs, so this version is theoretically never reached\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'translation' stamp: 'yo 1/27/2005 23:33'!\\\\nisTurtleRow\\\\n\\\\n\\\\t| aCollection selectorCollection |\\\\n\\\\taCollection _ Set new.\\\\n\\\\tselectorCollection _ Set new.\\\\n\\\\tself accumlatePlayersInto: aCollection andSelectorsInto: selectorCollection.\\\\n\\\\t#(turtleCount: turtleCount grouped: grouped) do: [:sel |\\\\n\\\\t\\\\t(selectorCollection includes: sel) ifTrue: [^ false].\\\\n\\\\t].\\\\n\\\\n\\\\taCollection do: [:e |\\\\n\\\\t\\\\t(e isKindOf: KedamaExamplerPlayer) ifTrue: [^ true].\\\\n\\\\t].\\\\n\\\\t^ false.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'translation' stamp: 'yo 1/18/2004 10:31'!\\\\ntraverseRowTranslateSlotOld: oldSlotName of: aPlayer to: newSlotName\\\\n\\\\t\\\\\\\"Traverse my submorphs, translating submorphs appropriately given the slot rename\\\\\\\"\\\\n\\\\n\\\\tsubmorphs do: [:tile |\\\\n\\\\t\\\\t(tile isKindOf: AssignmentTileMorph) ifTrue:\\\\n\\\\t\\\\t\\\\t[tile assignmentRoot = oldSlotName ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[(self isPlayer: aPlayer ofReferencingTile: tile) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[tile setRoot: newSlotName]]].\\\\n\\\\t\\\\t(tile isMemberOf: TileMorph) ifTrue:\\\\n\\\\t\\\\t\\\\t[(tile operatorOrExpression = (Utilities getterSelectorFor: oldSlotName)) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[(self isPlayer: aPlayer ofReferencingTile: tile) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[tile setOperator: (Utilities getterSelectorFor: newSlotName)]]].\\\\n\\\\t\\\\ttile traverseRowTranslateSlotOld: oldSlotName of: aPlayer to: newSlotName]! !\\\\n\\\\n!Morph methodsFor: 'translation' stamp: 'yo 1/18/2004 10:32'!\\\\ntraverseRowTranslateSlotOld: oldSlotName to: newSlotName\\\\n\\\\t\\\\\\\"Traverse my submorphs, translating submorphs appropriately given the slot rename\\\\\\\"\\\\n\\\\n\\\\tsubmorphs do: [:tile |\\\\n\\\\t\\\\t(tile isKindOf: AssignmentTileMorph) ifTrue: \\\\n\\\\t\\\\t\\\\t[tile assignmentRoot = oldSlotName ifTrue: [tile setRoot: newSlotName]].\\\\n\\\\t\\\\t(tile isMemberOf: TileMorph) ifTrue:\\\\n\\\\t\\\\t\\\\t[(tile operatorOrExpression = (Utilities getterSelectorFor: oldSlotName)) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[tile setOperator: (Utilities getterSelectorFor: newSlotName)]].\\\\n\\\\t\\\\ttile traverseRowTranslateSlotOld: oldSlotName to: newSlotName]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 2/9/1999 17:43'!\\\\nadaptToWorld: aWorld\\\\n\\\\t\\\\\\\"The receiver finds itself operating in a possibly-different new world.  If any of the receiver's parts are world-dependent (such as a target of a SimpleButtonMorph, etc.), then have them adapt accordingly\\\\\\\"\\\\n\\\\tsubmorphs do: [:m | m adaptToWorld: aWorld].\\\\n\\\\tself eventHandler ifNotNil:\\\\n\\\\t\\\\t[self eventHandler adaptToWorld: aWorld]! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 5/17/2001 12:47'!\\\\nadoptVocabulary: aVocabulary\\\\n\\\\t\\\\\\\"Make aVocabulary be the one used by me and my submorphs\\\\\\\"\\\\n\\\\n\\\\tself submorphsDo: [:m | m adoptVocabulary: aVocabulary]! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'yo 1/9/2004 16:10'!\\\\nallMorphsAndBookPagesInto: aSet\\\\n\\\\t\\\\\\\"Return a set of all submorphs.  Don't forget the hidden ones like BookMorph pages that are not showing.  Consider only objects that are in memory (see allNonSubmorphMorphs).\\\\\\\" \\\\n\\\\n\\\\tsubmorphs do: [:m | m allMorphsAndBookPagesInto: aSet].\\\\n\\\\tself allNonSubmorphMorphs do: [:m | \\\\n\\\\t\\\\t\\\\t(aSet includes: m) ifFalse: [\\\\\\\"Stop infinite recursion\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tm allMorphsAndBookPagesInto: aSet]].\\\\n\\\\taSet add: self.\\\\n\\\\tself player ifNotNil:\\\\n\\\\t\\\\t[self player allScriptEditors do: [:e | e allMorphsAndBookPagesInto: aSet]].\\\\n\\\\t^ aSet! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'RAA 1/13/2001 11:27'!\\\\nappearsToBeSameCostumeAs: aMorph\\\\n\\\\n\\\\t^false\\\\n! !\\\\n\\\\n!Morph methodsFor: 'e-toy support'!\\\\nasNumber: aPointOrNumber\\\\n\\\\t\\\\\\\"Support for e-toy demo.\\\\\\\"\\\\n\\\\n\\\\taPointOrNumber class = Point\\\\n\\\\t\\\\tifTrue: [^ aPointOrNumber r]\\\\n\\\\t\\\\tifFalse: [^ aPointOrNumber].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'nk 1/6/2004 12:37'!\\\\nasWearableCostume\\\\n\\\\t\\\\\\\"Return a wearable costume for some player\\\\\\\"\\\\n\\\\t^(World drawingClass withForm: self imageForm) copyCostumeStateFrom: self! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'mir 6/13/2001 14:34'!\\\\nasWearableCostumeOfExtent: extent\\\\n\\\\t\\\\\\\"Return a wearable costume for some player\\\\\\\"\\\\n\\\\t^self asWearableCostume! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 12/20/1999 17:36'!\\\\nautomaticViewing\\\\n\\\\t\\\\\\\"Backstop, in case this message gets sent to an owner that is not a playfield\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 5/18/2001 11:17'!\\\\nchangeAllBorderColorsFrom: oldColor to: newColor\\\\n\\\\t\\\\\\\"Set any occurrence of oldColor as a border color in my entire submorph tree to be newColor\\\\\\\"\\\\n\\\\n\\\\t(self allMorphs select: [:m | m respondsTo: #borderColor:]) do:\\\\n\\\\t\\\\t[:aMorph | aMorph borderColor = oldColor ifTrue: [aMorph borderColor: newColor]]! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 10/1/97 00:18'!\\\\nconfigureForKids\\\\n\\\\tsubmorphs ifNotNil:\\\\n\\\\t\\\\t[submorphs do: [:m | m configureForKids]]! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 2/6/2001 04:21'!\\\\ncontainingWindow\\\\n\\\\t\\\\\\\"Answer a window or window-with-mvc that contains the receiver\\\\\\\"\\\\n\\\\n\\\\t^ self ownerThatIsA: SystemWindow orA: MVCWiWPasteUpMorph! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'ar 9/23/2000 22:38'!\\\\ncopyCostumeStateFrom: aMorph\\\\n\\\\t\\\\\\\"Copy all state that should be persistant for costumes from aMorph\\\\\\\"\\\\n\\\\tself rotationCenter: aMorph rotationCenter.\\\\n\\\\tself rotationStyle: aMorph rotationStyle.\\\\n\\\\tself referencePosition: aMorph referencePosition.\\\\n\\\\tself forwardDirection: aMorph forwardDirection.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 10/22/1998 20:28'!\\\\ncurrentPlayerDo: aBlock\\\\n\\\\t\\\\\\\"If the receiver is a viewer/scriptor associated with a current Player object, evaluate the given block against that object\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 9/8/2000 16:34'!\\\\ncursor\\\\n\\\\t\\\\\\\"vacuous backstop in case it gets sent to a morph that doesn't know what to do with it\\\\\\\"\\\\n\\\\n\\\\t^ 1! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 9/7/2000 09:28'!\\\\ncursor: aNumber\\\\n\\\\t\\\\\\\"vacuous backstop in case it gets sent to a morph that doesn't know what to do with it\\\\\\\"\\\\n! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 9/13/2002 17:44'!\\\\ndecimalPlacesForGetter: aGetter\\\\n\\\\t\\\\\\\"Answer the decimal places I prefer for showing a slot with the given getter, or nil if none\\\\\\\"\\\\n\\\\n\\\\t| decimalPrefs |\\\\n\\\\tdecimalPrefs _ self renderedMorph valueOfProperty: #decimalPlacePreferences ifAbsent: [^ nil].\\\\n\\\\t^ decimalPrefs at: aGetter ifAbsent: [nil]! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 10/24/2000 05:52'!\\\\ndefaultValueOrNil\\\\n\\\\t\\\\\\\"If the receiver has a property named #defaultValue, return that property's value, else return nil\\\\\\\"\\\\n\\\\n\\\\t^ self valueOfProperty: #defaultValue ifAbsent: [nil]! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sd 3/30/2005 22:04'!\\\\ndefaultVariableName\\\\n\\\\t\\\\\\\"If the receiver is of the sort that wants a variable maintained on its behalf in the 'card' data, then return a variable name to be used for that datum.  What is returned here is only a point of departure in the forthcoming negotiation\\\\\\\"\\\\n\\\\n\\\\t^ Scanner wellFormedInstanceVariableNameFrom: (self valueOfProperty: #variableName ifAbsent: [self externalName])! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'nb 6/17/2003 12:25'!\\\\ndefinePath\\\\n\\\\t| points lastPoint aForm offset currentPoint dwell ownerPosition |\\\\n\\\\tpoints _ OrderedCollection new: 70.\\\\n\\\\tlastPoint _ nil.\\\\n\\\\taForm _ self imageForm.\\\\n\\\\toffset _ aForm extent // 2.\\\\n\\\\townerPosition _ owner position.\\\\n\\\\tCursor move show.\\\\n\\\\tSensor waitButton.\\\\n\\\\t[Sensor anyButtonPressed and: [points size < 100]] whileTrue:\\\\n\\\\t\\\\t[currentPoint _ Sensor cursorPoint.\\\\n\\\\t\\\\tdwell _ 0.\\\\n\\\\t\\\\tcurrentPoint = lastPoint\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[dwell _ dwell + 1.\\\\n\\\\t\\\\t\\\\t\\\\t((dwell \\\\\\\\\\\\\\\\ 1000) = 0) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[Beeper beep]]\\\\n\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[self position: (currentPoint - offset).\\\\n\\\\t\\\\t\\\\t\\\\tself world displayWorld.\\\\n\\\\t\\\\t\\\\t\\\\t(Delay forMilliseconds: 20) wait.\\\\n\\\\t\\\\t\\\\t\\\\tpoints add: currentPoint.\\\\n\\\\t\\\\t\\\\t\\\\tlastPoint _ currentPoint]].\\\\n\\\\tpoints size > 1\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self inform: 'no path obtained']\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[points size = 100 ifTrue: [self playSoundNamed: 'croak'].\\\\n\\\\n\\\\t\\\\t\\\\tTranscript cr; show: 'path defined with\\\\n', points size printString, ' points'.\\\\n\\\\t\\\\t\\\\tself renderedMorph setProperty: #pathPoints toValue: \\\\n\\\\t\\\\t\\\\t\\\\t(points collect: [:p | p - ownerPosition])].\\\\n\\\\n\\\\tCursor normal show\\\\n\\\\t\\\\t! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 1/5/1999 10:05'!\\\\ndeletePath\\\\n\\\\tself removeProperty: #pathPoints! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 10/26/1999 23:32'!\\\\nembeddedInMorphicWindowLabeled: labelString\\\\n\\\\t| window |\\\\n\\\\twindow _ (SystemWindow labelled: labelString) model: nil.\\\\n\\\\twindow setStripeColorsFrom: nil defaultBackgroundColor.\\\\n\\\\twindow addMorph: self frame: (0@0 extent: 1@1).\\\\n\\\\t^ window! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'RAA 5/25/2000 09:06'!\\\\nembedInWindow\\\\n\\\\n\\\\t| window worldToUse |\\\\n\\\\n\\\\tworldToUse _ self world.\\\\t\\\\t\\\\\\\"I'm assuming we are already in a world\\\\\\\"\\\\n\\\\twindow _ (SystemWindow labelled: self defaultLabelForInspector) model: nil.\\\\n\\\\twindow bounds: ((self position - ((0@window labelHeight) + window borderWidth))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: self bottomRight + window borderWidth).\\\\n\\\\twindow addMorph: self frame: (0@0 extent: 1@1).\\\\n\\\\twindow updatePaneColors.\\\\n\\\\tworldToUse addMorph: window.\\\\n\\\\twindow activate! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'dgd 2/22/2003 14:31'!\\\\nenclosingEditor\\\\n\\\\t\\\\\\\"Return the next editor around the receiver\\\\\\\"\\\\n\\\\n\\\\t| tested |\\\\n\\\\ttested := owner.\\\\n\\\\t[tested isNil] whileFalse: \\\\n\\\\t\\\\t\\\\t[tested isTileEditor ifTrue: [^tested].\\\\n\\\\t\\\\t\\\\ttested := tested owner].\\\\n\\\\t^nil! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 2/15/1999 19:38'!\\\\nenforceTileColorPolicy\\\\n\\\\tPreferences coloredTilesEnabled\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self makeAllTilesColored]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self makeAllTilesGreen]! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'RAA 10/4/2000 08:29'!\\\\nfenceEnabled\\\\n\\\\n\\\\t\\\\\\\"in case a non-pasteUp is used as a container\\\\\\\"\\\\n\\\\n\\\\t^Preferences fenceEnabled! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'nb 6/17/2003 12:25'!\\\\nfollowPath\\\\n\\\\t| pathPoints offset |\\\\n\\\\t(pathPoints _ self renderedMorph valueOfProperty: #pathPoints) ifNil: [^ Beeper beep].\\\\n\\\\toffset _ owner position - (self extent // 2).\\\\n\\\\tpathPoints do:\\\\n\\\\t\\\\t[:aPoint |\\\\n\\\\t\\\\t\\\\tself position: aPoint + offset.\\\\n\\\\t\\\\t\\\\tself world displayWorld.\\\\n\\\\t\\\\t\\\\t(Delay forMilliseconds: 20) wait]! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 2/18/2003 02:54'!\\\\ngetCharacters\\\\n\\\\t\\\\\\\"obtain a string value from the receiver.  The default generic response is simply the name of the object.\\\\\\\"\\\\n\\\\n\\\\t^ self externalName! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 9/1/2000 10:15'!\\\\ngetNumericValue\\\\n\\\\t\\\\\\\"Only certain kinds of morphs know how to deal with this frontally; here we provide support for a numeric property of any morph\\\\\\\"\\\\n\\\\n\\\\t^ self valueOfProperty: #numericValue ifAbsent: [0]! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'kfr 9/4/2004 15:22'!\\\\ngridFormOrigin: origin grid: smallGrid background: backColor line: lineColor\\\\n\\\\n\\\\t| bigGrid gridForm gridOrigin |\\\\n\\\\tgridOrigin _ origin \\\\\\\\\\\\\\\\ smallGrid.\\\\n\\\\tbigGrid _ (smallGrid asPoint x) @ (smallGrid asPoint y).\\\\n\\\\tgridForm _ Form extent: bigGrid depth: Display depth.\\\\n\\\\tbackColor ifNotNil: [gridForm fillWithColor: backColor].\\\\n\\\\tgridOrigin x to: gridForm width by: smallGrid x do:\\\\n\\\\t\\\\t[:x | gridForm fill: (x@0 extent: 1@gridForm height) fillColor: lineColor].\\\\n\\\\tgridOrigin y to: gridForm height by: smallGrid y do:\\\\n\\\\t\\\\t[:y | gridForm fill: (0@y extent: gridForm width@1) fillColor: lineColor].\\\\n\\\\t^ InfiniteForm with: gridForm\\\\n! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 4/12/2005 23:07'!\\\\nhandUserASibling\\\\n\\\\t\\\\\\\"Make and hand the user a sibling instance.  Force the creation of a uniclass at this point if one does not already exist for the receiver.\\\\\\\"\\\\n\\\\n\\\\t| topRend |\\\\n\\\\ttopRend _ self topRendererOrSelf.\\\\n\\\\ttopRend couldMakeSibling ifFalse: [^ Beeper beep].\\\\n\\\\n\\\\ttopRend assuredPlayer assureUniClass.\\\\n\\\\t(topRend makeSiblings: 1) first openInHand! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 10/21/1998 15:54'!\\\\nisAViewer\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 6/30/1999 20:29'!\\\\nisCandidateForAutomaticViewing\\\\n\\\\t^ true! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'ar 2/7/2001 17:58'!\\\\nisTileEditor\\\\n\\\\t\\\\\\\"No, I'm not\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 10/9/2000 16:48'!\\\\nlistViewLineForFieldList: aFieldList\\\\n\\\\t\\\\\\\"Answer a ListLineView object which describes the receiver\\\\\\\"\\\\n\\\\n\\\\t| aLine |\\\\n\\\\taLine _ ListViewLine new objectRepresented: self.\\\\n\\\\taFieldList do:\\\\n\\\\t\\\\t[:fieldSym | aLine addMorphBack: (self readoutForField: fieldSym).\\\\n\\\\t\\\\taLine addTransparentSpacerOfSize: (7 @ 0)].\\\\n\\\\t^ aLine! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'dgd 9/6/2003 18:10'!\\\\nmakeGraphPaper\\\\n\\\\t| smallGrid backColor lineColor |\\\\n\\\\tsmallGrid _ Compiler evaluate: (FillInTheBlank request: 'Enter grid size' translated initialAnswer: '16').\\\\n\\\\tsmallGrid ifNil: [^ self].\\\\n\\\\tUtilities informUser: 'Choose a background color' translated during: [backColor _ Color fromUser].\\\\n\\\\tUtilities informUser: 'Choose a line color' translated during: [lineColor _ Color fromUser].\\\\n\\\\tself makeGraphPaperGrid: smallGrid background: backColor line: lineColor.! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'di 9/7/2000 20:44'!\\\\nmakeGraphPaperGrid: smallGrid background: backColor line: lineColor\\\\n\\\\n\\\\t| gridForm |\\\\n\\\\tgridForm _ self gridFormOrigin: 0@0 grid: smallGrid asPoint background: backColor line: lineColor.\\\\n\\\\tself color: gridForm.\\\\n\\\\tself world ifNotNil: [self world fullRepaintNeeded].\\\\n\\\\tself changed: #newColor.  \\\\\\\"propagate to view\\\\\\\"\\\\n! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 4/16/1998 13:46'!\\\\nmustBeBackmost\\\\n\\\\t\\\\\\\"Answer whether the receiver needs to be the backmost morph in its owner's submorph list\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 9/13/2002 17:45'!\\\\nnoteDecimalPlaces: aNumber forGetter: aGetter\\\\n\\\\t\\\\\\\"Make a mental note of the user's preference for a particular number of decimal places to be associated with the slot with the given getter\\\\\\\"\\\\n\\\\n\\\\t(self renderedMorph valueOfProperty: #decimalPlacePreferences ifAbsentPut: [IdentityDictionary new])\\\\n\\\\t\\\\tat: aGetter put: aNumber! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 10/26/2000 11:37'!\\\\nnoteNegotiatedName: uniqueName for: requestedName\\\\n\\\\t\\\\\\\"This works, kind of, for morphs that have a single variable.  Still holding out for generality of morphs being able to have multiple variables, but need a driving example\\\\\\\"\\\\n\\\\n\\\\tself setProperty: #variableName toValue: uniqueName.\\\\n\\\\tself setProperty: #setterSelector toValue: (Utilities setterSelectorFor: uniqueName).\\\\n\\\\tself setNameTo: uniqueName! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 10/9/2000 06:43'!\\\\nobjectViewed\\\\n\\\\t\\\\\\\"Answer the morph associated with the player that the structure the receiver currently finds itself within represents.\\\\\\\"\\\\n\\\\n\\\\t^ (self outermostMorphThat: [:o | o isKindOf: Viewer orOf: ScriptEditorMorph]) objectViewed! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 8/31/2004 14:11'!\\\\npinkXButton\\\\n\\\\t\\\\\\\"Answer a button with the old X on a pink background, targeted to self\\\\\\\"\\\\n\\\\n\\\\t| aButton |\\\\n\\\\taButton _ IconicButton new labelGraphic: (ScriptingSystem formAtKey: #PinkX).\\\\n\\\\taButton color: Color transparent; borderWidth: 0; shedSelvedge; actWhen: #buttonUp.\\\\n\\\\taButton target: self.\\\\n\\\\t^ aButton! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 9/11/2004 16:23'!\\\\nreferencePlayfield\\\\n\\\\t\\\\\\\"Answer the PasteUpMorph to be used for cartesian-coordinate reference\\\\\\\"\\\\n\\\\n\\\\t| former |\\\\n\\\\towner ifNotNil:\\\\n\\\\t\\\\t[(self topRendererOrSelf owner isHandMorph and: [(former _ self formerOwner) notNil])\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[former _ former renderedMorph.\\\\n\\\\t\\\\t\\\\t\\\\t^ former isPlayfieldLike \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [former]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [former referencePlayfield]]].\\\\n\\\\n\\\\tself allOwnersDo: [:o | o isPlayfieldLike ifTrue: [^ o]].\\\\n\\\\t^ ActiveWorld! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'ar 9/23/2000 22:40'!\\\\nrotationStyle\\\\n\\\\t\\\\\\\"Return the 'rotation style' of the receiver\\\\\\\"\\\\n\\\\t^#normal! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'ar 9/23/2000 22:40'!\\\\nrotationStyle: aSymbol\\\\n\\\\t\\\\\\\"Set the 'rotation style' of the receiver; this is ignored for non-sketches\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'RAA 3/9/2001 14:37'!\\\\nsetAsActionInButtonProperties: buttonProperties\\\\n\\\\n\\\\t^false\\\\t\\\\\\\"means I don't know how to be set as a button action\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 9/15/2000 06:26'!\\\\nsetNumericValue: aValue\\\\n\\\\t\\\\\\\"Set the receiver's contents to reflect the given numeric value.  Only certain kinds of morphs know what to do with this, the rest, for now, stash the number in a property, where it may not be visible but at least it won't be lost, and can be retrieved by the companion getter.  This code is never reached under normal circumstances, because the #numericValue slot is not shown in Viewers for most kinds of morphs, and those kinds of morphs that do show it also reimplement this method.  However, this code *could* be reached via a user script which sends #setNumericValue: but whose receiver has been changed, via tile-scripting drag and drop for example, to one that doesn't directly handle numbers\\\\\\\"\\\\n\\\\n\\\\tScriptingSystem informScriptingUser: 'an unusual setNumericValue: call was made'.\\\\n\\\\tself renderedMorph setProperty: #numericValue toValue: aValue\\\\n! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 7/21/1998 21:18'!\\\\nsetStandardTexture\\\\n\\\\t| parms |\\\\n\\\\tparms _ self textureParameters.\\\\n\\\\tself makeGraphPaperGrid: parms first\\\\n\\\\t\\\\tbackground: parms second\\\\n\\\\t\\\\tline: parms third! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 10/27/2000 17:46'!\\\\nslotSpecifications\\\\n\\\\t\\\\\\\"A once and possibly future feature; retained here for backward-compatibility bulletproofing.\\\\\\\"\\\\n\\\\n\\\\t^ #()! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 8/11/1998 16:55'!\\\\nsucceededInRevealing: aPlayer\\\\n\\\\taPlayer == self player ifTrue: [^ true].\\\\n\\\\tsubmorphs do:\\\\n\\\\t\\\\t[:m | (m succeededInRevealing: aPlayer) ifTrue: [^ true]].\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 8/31/2004 14:06'!\\\\ntanOButton\\\\n\\\\t\\\\\\\"Answer a button with the old O on a tan background, targeted to self\\\\\\\"\\\\n\\\\n\\\\t| aButton |\\\\n\\\\taButton _ IconicButton new labelGraphic: (ScriptingSystem formAtKey: #TanO).\\\\n\\\\taButton color: Color transparent; borderWidth: 0; shedSelvedge; actWhen: #buttonUp.\\\\n\\\\taButton target: self.\\\\n\\\\t^ aButton! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 7/21/1998 21:17'!\\\\ntextureParameters\\\\n\\\\t\\\\\\\"Answer a triplet giving the preferred grid size, background color, and line color.  The choices here are as suggested by Alan, 9/13/97\\\\\\\"\\\\n\\\\n\\\\t^ Array with: 16 with: Color lightYellow with: Color lightGreen lighter lighter! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'dgd 2/22/2003 14:35'!\\\\ntopEditor\\\\n\\\\t\\\\\\\"Return the top-most editor around the receiver\\\\\\\"\\\\n\\\\n\\\\t| found tested |\\\\n\\\\ttested := self.\\\\n\\\\t[tested isNil] whileFalse: \\\\n\\\\t\\\\t\\\\t[tested isTileEditor ifTrue: [found := tested].\\\\n\\\\t\\\\t\\\\ttested := tested owner].\\\\n\\\\t^found! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'dgd 10/8/2003 19:30'!\\\\nunlockOneSubpart\\\\n\\\\t| unlockables aMenu reply |\\\\n\\\\tunlockables _ self submorphs select:\\\\n\\\\t\\\\t[:m | m isLocked].\\\\n\\\\tunlockables size <= 1 ifTrue: [^ self unlockContents].\\\\n\\\\taMenu _ SelectionMenu labelList: (unlockables collect: [:m | m externalName]) selections: unlockables.\\\\n\\\\treply _ aMenu startUpWithCaption: 'Who should be be unlocked?' translated.\\\\n\\\\treply isNil ifTrue: [^ self].\\\\n\\\\treply unlock! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'tk 10/19/1999 07:16'!\\\\nupdateCachedThumbnail\\\\n\\\\t\\\\\\\"If I have a cached thumbnail, then update it.  Copied up from Dan's original version in PasteUpMorph so it can be used by all morphs.\\\\\\\"\\\\n\\\\t| cachedThumbnail |\\\\n\\\\n\\\\t(cachedThumbnail _ self valueOfProperty: #cachedThumbnail) ifNotNil:\\\\n\\\\t\\\\t[(cachedThumbnail respondsTo: #computeThumbnail) \\\\n\\\\t\\\\t\\\\tifTrue: [cachedThumbnail computeThumbnail]\\\\n\\\\t\\\\t\\\\tifFalse: [self removeProperty: #computeThumbnail]].\\\\n\\\\t\\\\t\\\\\\\"Test and removal are because the thumbnail is being replaced by another Morph.  We don't know why.  Need to fix that at the source.\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 11/27/2001 14:52'!\\\\nwantsRecolorHandle\\\\n\\\\t\\\\\\\"Answer whether the receiver would like a recoloring halo handle to be put up.  Since this handle also presently affords access to the property-sheet, it is presently always allowed, even though SketchMorphs don't like regular recoloring\\\\\\\"\\\\n\\\\n\\\\t^ true\\\\n\\\\t\\\\n! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'RAA 2/5/2001 15:35'!\\\\nwrappedInWindowWithTitle: aTitle\\\\n\\\\t| aWindow w2 |\\\\n\\\\taWindow _ (SystemWindow labelled: aTitle) model: Model new.\\\\n\\\\taWindow addMorph: self frame: (0@0 extent: 1@1).\\\\n\\\\tw2 _ aWindow borderWidth * 2.\\\\n\\\\tw2 _ 3.\\\\t\\\\t\\\\\\\"oh, well\\\\\\\"\\\\n\\\\taWindow extent: self fullBounds extent + (0 @ aWindow labelHeight) + (w2 @ w2).\\\\n\\\\t^ aWindow! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'tk 9/3/1999 11:46'!\\\\nwrappedInWindow: aSystemWindow\\\\n\\\\t| aWindow |\\\\n\\\\taWindow _ aSystemWindow model: Model new.\\\\n\\\\taWindow addMorph: self frame: (0@0 extent: 1@1).\\\\n\\\\taWindow extent: self extent.\\\\n\\\\t^ aWindow! !\\\\n\\\\n\\\\n!Morph methodsFor: 'messenger' stamp: 'sw 11/3/2001 12:23'!\\\\naffiliatedSelector\\\\n\\\\t\\\\\\\"Answer a selector affiliated with the receiver for the purposes of launching a messenger.   Reimplement this to plug into the messenger service\\\\\\\"\\\\n\\\\n\\\\t^ nil! !\\\\n\\\\n\\\\n!Morph methodsFor: 'geniestubs' stamp: 'nk 3/10/2004 09:58'!\\\\nallowsGestureStart: evt\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'geniestubs' stamp: 'nk 3/11/2004 17:45'!\\\\nisGestureStart: anEvent\\\\n\\\\t\\\\\\\"This mouse down could be the start of a gesture, or the end of a gesture focus\\\\\\\"\\\\n\\\\n\\\\tanEvent hand isGenieEnabled\\\\n\\\\t\\\\tifFalse: [ ^false ].\\\\n\\\\n\\\\t(self allowsGestureStart: anEvent)\\\\n\\\\t\\\\tifTrue: [^ true ].\\\\t\\\\t\\\\\\\"could be the start of a gesture\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"otherwise, check for whether it's time to disable the Genie auto-focus\\\\\\\"\\\\n\\\\t(anEvent hand isGenieFocused\\\\n\\\\t\\\\tand: [anEvent whichButton ~= anEvent hand focusStartEvent whichButton])\\\\n\\\\t\\\\t\\\\tifTrue: [anEvent hand disableGenieFocus].\\\\n\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'geniestubs' stamp: 'nk 3/11/2004 17:30'!\\\\nmouseStillDownStepRate\\\\n\\\\t\\\\\\\"At what rate do I want to receive #mouseStillDown: notifications?\\\\\\\"\\\\n\\\\t^1! !\\\\n\\\\n!Morph methodsFor: 'geniestubs' stamp: 'nk 3/10/2004 06:38'!\\\\nredButtonGestureDictionaryOrName: aSymbolOrDictionary! !\\\\n\\\\n!Morph methodsFor: 'geniestubs' stamp: 'nk 3/10/2004 06:38'!\\\\nyellowButtonGestureDictionaryOrName: aSymbolOrDictionary! !\\\\n\\\\n\\\\n!Morph methodsFor: '*morphic-Postscript Canvases' stamp: 'di 9/22/1999 08:45'!\\\\nasEPS\\\\n\\\\n\\\\t^ EPSCanvas morphAsPostscript: self rotated: false.\\\\n! !\\\\n\\\\n!Morph methodsFor: '*morphic-Postscript Canvases'!\\\\nasPostscript\\\\n\\\\t^self asEPS.\\\\n! !\\\\n\\\\n!Morph methodsFor: '*morphic-Postscript Canvases' stamp: 'di 9/22/1999 08:45'!\\\\nasPostscriptPrintJob\\\\n\\\\n\\\\t^ DSCPostscriptCanvas morphAsPostscript: self rotated: false.\\\\n! !\\\\n\\\\n!Morph methodsFor: '*morphic-Postscript Canvases' stamp: 'ar 1/16/2001 17:06'!\\\\nclipPostscript\\\\n\\\\t^Clipboard clipboardText: self asPostscript.\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: '*morphic-Postscript Canvases' stamp: 'mpw 8/10/1930 05:21'!\\\\ndrawPostscriptOn: aCanvas\\\\n\\\\n\\\\tself drawOn:aCanvas.\\\\n! !\\\\n\\\\n!Morph methodsFor: '*morphic-Postscript Canvases' stamp: 'mpw 8/10/1930 05:25'!\\\\nfullDrawPostscriptOn: aCanvas\\\\n\\\\n\\\\tself fullDrawOn:aCanvas.\\\\n! !\\\\n\\\\n!Morph methodsFor: '*morphic-Postscript Canvases' stamp: 'nk 12/29/2003 10:55'!\\\\nprintPSToFile\\\\n\\\\t\\\\n\\\\tself printPSToFileNamed: self externalName! !\\\\n\\\\n\\\\n!Morph methodsFor: 'player' stamp: 'tk 10/30/2001 12:13'!\\\\nassuredCardPlayer\\\\n\\\\t\\\\\\\"Answer the receiver's player, creating a new one if none currently exists\\\\\\\"\\\\n\\\\n\\\\t| aPlayer |\\\\n\\\\t(aPlayer _ self player) ifNotNil: [\\\\n\\\\t\\\\t(aPlayer isKindOf: CardPlayer) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [^ aPlayer]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self error: 'Must convert to a CardPlayer']\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"later convert using as: and remove the error\\\\\\\"].\\\\n\\\\tself assureExternalName.  \\\\\\\"a default may be given if not named yet\\\\\\\"\\\\n\\\\tself player: (aPlayer _ UnscriptedCardPlayer newUserInstance).\\\\n\\\\t\\\\t\\\\\\\"Force it to be a CardPlayer.  Morph class no longer dictates what kind of player\\\\\\\"\\\\n\\\\taPlayer costume: self.\\\\n\\\\tself presenter ifNotNil: [self presenter flushPlayerListCache].\\\\n\\\\t^ aPlayer! !\\\\n\\\\n!Morph methodsFor: 'player' stamp: 'sw 2/19/1999 09:06'!\\\\nassuredPlayer\\\\n\\\\t\\\\\\\"Answer the receiver's player, creating a new one if none currently exists\\\\\\\"\\\\n\\\\n\\\\t| aPlayer |\\\\n\\\\t(aPlayer _ self player) ifNil:\\\\n\\\\t\\\\t[self assureExternalName.  \\\\\\\"a default may be given if not named yet\\\\\\\"\\\\n\\\\t\\\\tself player: (aPlayer _ self newPlayerInstance).  \\\\n\\\\t\\\\t\\\\t\\\\\\\"Different morphs may demand different player types\\\\\\\"\\\\n\\\\t\\\\taPlayer costume: self.\\\\n\\\\t\\\\tself presenter ifNotNil: [self presenter flushPlayerListCache]].\\\\n\\\\t^ aPlayer! !\\\\n\\\\n!Morph methodsFor: 'player' stamp: 'sw 8/10/2000 00:06'!\\\\nassureExternalName\\\\n\\\\t| aName |\\\\n\\\\t^ (aName _ self knownName) ifNil:\\\\n\\\\t\\\\t[self setNameTo: (aName _ self externalName).\\\\n\\\\t\\\\t^ aName]! !\\\\n\\\\n!Morph methodsFor: 'player' stamp: 'sw 10/27/2000 17:38'!\\\\ncurrentDataValue\\\\n\\\\t\\\\\\\"Answer the data value associated with the receiver.  Useful in conjunction with default-value setting\\\\\\\"\\\\n\\\\n\\\\t^ nil! !\\\\n\\\\n!Morph methodsFor: 'player' stamp: 'sw 9/15/1998 13:33'!\\\\nnewPlayerInstance\\\\n\\\\t^ UnscriptedPlayer newUserInstance! !\\\\n\\\\n!Morph methodsFor: 'player' stamp: 'sw 1/22/2001 14:25'!\\\\nokayToDuplicate\\\\n\\\\t\\\\\\\"Formerly this protocol was used to guard against awkward situations when there were anonymous scripts in the etoy system.  Nowadays we just always allow duplication\\\\\\\"\\\\n\\\\n\\\\t^ true! !\\\\n\\\\n!Morph methodsFor: 'player' stamp: 'mir 6/13/2001 14:45'!\\\\nshouldRememberCostumes\\\\n\\\\t^true! !\\\\n\\\\n!Morph methodsFor: 'player' stamp: 'sw 8/11/1998 16:54'!\\\\nshowPlayerMenu\\\\n\\\\tself player ifNotNil:\\\\n\\\\t\\\\t[self player showPlayerMenu]! !\\\\n\\\\n!Morph methodsFor: 'player' stamp: 'sw 10/6/2000 07:37'!\\\\nvariableDocks\\\\n\\\\t\\\\\\\"Answer a list of VariableDocker objects for docking up my data with an instance held in my containing playfield.  The simple presence of some objects on a Playfield will result in the maintenance of instance data on the corresponding Card.  This is a generalization of the HyperCard 'field' idea.  If there is already a cachedVariableDocks cached, use that.  For this all to work happily, one must be certain to invalidate the #cachedVariableDocks cache when that's appropriate.\\\\\\\"\\\\n\\\\n\\\\t^ self valueOfProperty: #cachedVariableDocks ifAbsent: [#()]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'player commands' stamp: 'nb 6/17/2003 12:25'!\\\\nbeep: soundName\\\\n\\\\n\\\\tself playSoundNamed: soundName\\\\n! !\\\\n\\\\n!Morph methodsFor: 'player commands'!\\\\njumpTo: aPoint\\\\n\\\\t\\\\\\\"Let my owner decide how I move.\\\\\\\"\\\\n\\\\n\\\\towner move: self toPosition: aPoint.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'player commands' stamp: 'sw 2/16/1999 11:33'!\\\\nmakeFenceSound\\\\n\\\\tPreferences soundsEnabled ifTrue:\\\\n\\\\t\\\\t[self playSoundNamed: 'scratch'].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'player commands' stamp: 'gk 2/23/2004 21:08'!\\\\nplaySoundNamed: soundName\\\\n\\\\t\\\\\\\"Play the sound with the given name.\\\\n\\\\tDoes nothing if this image lacks sound playing facilities.\\\\\\\"\\\\n\\\\n\\\\tSoundService default playSoundNamed: soundName asString! !\\\\n\\\\n!Morph methodsFor: 'player commands'!\\\\nset: aPointOrNumber\\\\n\\\\t\\\\\\\"Set my position.\\\\\\\"\\\\n\\\\n\\\\tself jumpTo: aPointOrNumber.\\\\n! !\\\\n\\\\n\\\\n!Morph methodsFor: 'button properties' stamp: 'RAA 3/8/2001 14:45'!\\\\nbuttonProperties\\\\n\\\\n\\\\t^self valueOfProperty: #universalButtonProperties! !\\\\n\\\\n!Morph methodsFor: 'button properties' stamp: 'RAA 3/8/2001 14:45'!\\\\nbuttonProperties: propertiesOrNil\\\\n\\\\n\\\\tpropertiesOrNil ifNil: [\\\\n\\\\t\\\\tself removeProperty: #universalButtonProperties\\\\n\\\\t] ifNotNil: [\\\\n\\\\t\\\\tself setProperty: #universalButtonProperties toValue: propertiesOrNil\\\\n\\\\t].! !\\\\n\\\\n!Morph methodsFor: 'button properties' stamp: 'RAA 3/8/2001 07:49'!\\\\nensuredButtonProperties\\\\n\\\\n\\\\tself hasButtonProperties ifFalse: [\\\\n\\\\t\\\\tself buttonProperties: (ButtonProperties new visibleMorph: self)\\\\n\\\\t].\\\\n\\\\t^self buttonProperties! !\\\\n\\\\n!Morph methodsFor: 'button properties' stamp: 'RAA 3/8/2001 07:18'!\\\\nhasButtonProperties\\\\n\\\\n\\\\t^self hasProperty: #universalButtonProperties! !\\\\n\\\\n\\\\n!Morph methodsFor: '*flexiblevocabularies-scripting' stamp: 'nk 9/11/2004 17:12'!\\\\ncategoriesForViewer\\\\n\\\\t\\\\\\\"Answer a list of symbols representing the categories to offer in the \\\\n\\\\tviewer, in order\\\\\\\"\\\\n\\\\t| dict aList |\\\\n\\\\tdict := Dictionary new.\\\\n\\\\tself unfilteredCategoriesForViewer\\\\n\\\\t\\\\twithIndexDo: [:cat :index | dict at: cat put: index].\\\\n\\\\tself filterViewerCategoryDictionary: dict.\\\\n\\\\taList := SortedCollection\\\\n\\\\t\\\\t\\\\t\\\\tsortBlock: [:a :b | (dict at: a)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t< (dict at: b)].\\\\n\\\\taList addAll: dict keys.\\\\n\\\\t^ aList asArray! !\\\\n\\\\n!Morph methodsFor: '*flexiblevocabularies-scripting' stamp: 'nk 8/29/2004 17:09'!\\\\nselectorsForViewer\\\\n\\\\t\\\\\\\"Answer a list of symbols representing all the selectors available in all my viewer categories\\\\\\\"\\\\n\\\\n\\\\t| aClass aList itsAdditions added addBlock |\\\\n\\\\taClass := self renderedMorph class.\\\\n\\\\taList := OrderedCollection new.\\\\n\\\\tadded := Set new.\\\\n\\\\taddBlock := [ :sym | (added includes: sym) ifFalse: [ added add: sym. aList add: sym ]].\\\\n\\\\n\\\\t[aClass == Morph superclass] whileFalse: \\\\n\\\\t\\\\t\\\\t[(aClass hasAdditionsToViewerCategories) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[itsAdditions := aClass allAdditionsToViewerCategories.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\titsAdditions do: [ :add | add do: [:aSpec |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"the spec list\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taSpec first == #command ifTrue: [ addBlock value: aSpec second].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taSpec first == #slot \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[ addBlock value: (aSpec seventh).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t addBlock value: aSpec ninth]]]].\\\\n\\\\t\\\\t\\\\taClass := aClass superclass].\\\\n\\\\n\\\\t^aList copyWithoutAll: #(#unused #dummy)\\\\n\\\\n\\\\t\\\\\\\"SimpleSliderMorph basicNew selectorsForViewer\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: '*flexiblevocabularies-scripting' stamp: 'nk 8/29/2004 17:14'!\\\\nselectorsForViewerIn: aCollection\\\\n\\\\t\\\\\\\"Answer a list of symbols representing all the selectors available in all my viewer categories, selecting only the ones in aCollection\\\\\\\"\\\\n\\\\n\\\\t| aClass aList itsAdditions added addBlock |\\\\n\\\\taClass := self renderedMorph class.\\\\n\\\\taList := OrderedCollection new.\\\\n\\\\tadded := Set new.\\\\n\\\\taddBlock := [ :sym |\\\\n\\\\t\\\\t(added includes: sym) ifFalse: [ (aCollection includes: sym)\\\\n\\\\t\\\\t\\\\tifTrue: [ added add: sym. aList add: sym ]]].\\\\n\\\\n\\\\t[aClass == Morph superclass] whileFalse: \\\\n\\\\t\\\\t\\\\t[(aClass hasAdditionsToViewerCategories) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[itsAdditions := aClass allAdditionsToViewerCategories.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\titsAdditions do: [ :add | add do: [:aSpec |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"the spec list\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taSpec first == #command ifTrue: [ addBlock value: aSpec second].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taSpec first == #slot \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[ addBlock value: (aSpec seventh).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t addBlock value: aSpec ninth]]]].\\\\n\\\\t\\\\t\\\\taClass := aClass superclass].\\\\n\\\\n\\\\t^aList copyWithoutAll: #(#unused #dummy)\\\\n\\\\n\\\\t\\\\\\\"SimpleSliderMorph basicNew selectorsForViewerIn: \\\\n\\\\t#(setTruncate: getColor setColor: getKnobColor setKnobColor: getWidth setWidth: getHeight setHeight: getDropEnabled setDropEnabled:)\\\\n\\\\t\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: '*flexiblevocabularies-scripting' stamp: 'nk 9/4/2004 11:47'!\\\\nunderstandsBorderVocabulary\\\\n\\\\t\\\\\\\"Replace the 'isKindOf: BorderedMorph' so that (for instance) Connectors can have their border vocabulary visible in viewers.\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n\\\\n!Morph methodsFor: 'object fileIn' stamp: 'dgd 2/22/2003 14:30'!\\\\nconvertAugust1998: varDict using: smartRefStrm \\\\n\\\\t\\\\\\\"These variables are automatically stored into the new instance \\\\n\\\\t('bounds' 'owner' 'submorphs' 'fullBounds' 'color' ). \\\\n\\\\tThis method is for additional changes. Use statements like (foo _ \\\\n\\\\tvarDict at: 'foo').\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Be sure to to fill in ('extension' ) and deal with the information \\\\n\\\\tin ('eventHandler' 'properties' 'costumee' )\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"This method moves all property variables as well as \\\\n\\\\teventHandler, and costumee into a morphicExtension.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Move refs to eventhandler and costumee into extension\\\\\\\"\\\\n\\\\n\\\\t| propVal |\\\\n\\\\t(varDict at: 'eventHandler') isNil \\\\n\\\\t\\\\tifFalse: [self eventHandler: (varDict at: 'eventHandler')].\\\\n\\\\t(varDict at: 'costumee') isNil \\\\n\\\\t\\\\tifFalse: [self player: (varDict at: 'costumee')].\\\\n\\\\t(varDict at: 'properties') isNil \\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[(varDict at: 'properties') keys do: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:key | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Move property extensions into extension\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpropVal := (varDict at: 'properties') at: key.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpropVal ifNotNil: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[key == #possessive \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [propVal == true ifTrue: [self bePossessive]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[key ifNotNil: [self assureExtension convertProperty: key toValue: propVal]]]]]! !\\\\n\\\\n!Morph methodsFor: 'object fileIn' stamp: 'md 2/27/2006 09:56'!\\\\nconvertNovember2000DropShadow: varDict using: smartRefStrm \\\\n\\\\t\\\\\\\"Work hard to eliminate the DropShadow. Inst vars are already  \\\\n\\\\tstored into.\\\\\\\"\\\\n\\\\n\\\\t| rend |\\\\n\\\\tsubmorphs notEmpty \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[rend := submorphs first renderedMorph.\\\\n\\\\t\\\\t\\\\t\\\\\\\"a text?\\\\\\\"\\\\n\\\\t\\\\t\\\\trend setProperty: #hasDropShadow toValue: true.\\\\n\\\\t\\\\t\\\\trend setProperty: #shadowColor toValue: (varDict at: 'color').\\\\n\\\\t\\\\t\\\\trend setProperty: #shadowOffset toValue: (varDict at: 'shadowOffset').\\\\n\\\\t\\\\t\\\\t\\\\\\\"ds owner ifNotNil: [ds owner addAllMorphs: ds  \\\\n\\\\t\\\\t\\\\tsubmorphs]. ^rend does this\\\\\\\"\\\\n\\\\t\\\\t\\\\trend privateOwner: owner.\\\\n\\\\t\\\\t\\\\textension ifNotNil: [\\\\n\\\\t\\\\t\\\\t\\\\textension actorState  ifNotNil: [rend actorState: self extension actorState].\\\\n\\\\t\\\\t\\\\t\\\\textension externalName ifNotNil: [rend setNameTo: self extension externalName].\\\\n\\\\t\\\\t\\\\t\\\\textension player ifNotNil: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trend player: extension player.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\textension player rawCostume: rend]].\\\\n\\\\t\\\\t\\\\t^rend].\\\\n\\\\t(rend := Morph new) color: Color transparent.\\\\n\\\\t^rend! !\\\\n\\\\n\\\\n!Morph methodsFor: 'system primitives' stamp: 'sw 10/27/2000 17:37'!\\\\ncreationStamp\\\\n\\\\t\\\\\\\"Answer the creation stamp stored within the receiver, if any\\\\\\\"\\\\n\\\\n\\\\t^ self valueOfProperty: #creationStamp ifAbsent: [super creationStamp]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'button' stamp: 'sw 2/6/2001 23:09'!\\\\ndoButtonAction\\\\n\\\\t\\\\\\\"If the receiver has a button-action defined, do it now.  The default button action of any morph is, well, to do nothing.  Note that there are several ways -- too many ways -- for morphs to have button-like actions.  This one refers not to the #mouseUpCodeToRun feature, nor does it refer to the Player-scripting mechanism.  Instead it is intended for morph classes whose very nature is to be buttons -- this method provides glue so that arbitrary buttons on the UI can be 'fired' programatticaly from user scripts\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'button' stamp: 'sw 2/6/2001 23:22'!\\\\nfire\\\\n\\\\t\\\\\\\"If the receiver has any kind of button-action defined, fire that action now.   Any morph can have special, personal mouseUpCodeToRun, and that will be triggered by this.  Additionally, some morphs have specific buttonness, and these get sent the #doButtonAction message to carry out their firing.  Finally, some morphs have mouse behaviors associated with one or more Player scripts.\\\\n\\\\tFor the present, we'll try out doing *all* the firings this object can do. \\\\\\\"\\\\n\\\\n\\\\tself firedMouseUpCode.   \\\\t\\\\\\\"This will run the mouseUpCodeToRun, if any\\\\\\\"\\\\n\\\\n\\\\tself player ifNotNil:\\\\t\\\\t\\\\n\\\\t\\\\t[self player fireOnce].  \\\\\\\"Run mouseDown and mouseUp scripts\\\\\\\"\\\\n\\\\n\\\\tself doButtonAction\\\\t\\\\t\\\\t\\\\\\\"Do my native button action, if any\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'button' stamp: 'dgd 2/22/2003 14:31'!\\\\nfiredMouseUpCode\\\\n\\\\t\\\\\\\"If the user has special mouseUpCodeToRun, then fire it once right now and return true, else return false\\\\\\\"\\\\n\\\\n\\\\t| evt |\\\\n\\\\t(self world isNil or: [self mouseUpCodeOrNil isNil]) ifTrue: [^false].\\\\n\\\\tevt := MouseEvent new \\\\n\\\\t\\\\t\\\\t\\\\tsetType: nil\\\\n\\\\t\\\\t\\\\t\\\\tposition: self center\\\\n\\\\t\\\\t\\\\t\\\\tbuttons: 0\\\\n\\\\t\\\\t\\\\t\\\\thand: self world activeHand.\\\\n\\\\tself programmedMouseUp: evt for: self.\\\\n\\\\t^true! !\\\\n\\\\n\\\\n!Morph methodsFor: 'event handling-override' stamp: 'nk 3/10/2004 19:47'!\\\\nhandlerForMouseDown: anEvent \\\\n\\\\t\\\\\\\"Return the (prospective) handler for a mouse down event. The handler is temporarily \\\\n\\\\tinstalled and can be used for morphs further down the hierarchy to negotiate whether \\\\n\\\\tthe inner or the outer morph should finally handle the event.\\\\\\\"\\\\n\\\\n\\\\tanEvent blueButtonPressed\\\\n\\\\t\\\\tifTrue: [^ self handlerForBlueButtonDown: anEvent].\\\\n\\\\tanEvent yellowButtonPressed\\\\n\\\\t\\\\tifTrue: [^ self handlerForYellowButtonDown: anEvent].\\\\n\\\\tanEvent controlKeyPressed\\\\n\\\\t\\\\tifTrue: [^ self handlerForMetaMenu: anEvent].\\\\n\\\\t(self handlesMouseDown: anEvent)\\\\n\\\\t\\\\tifFalse: [^ nil].\\\\t\\\\\\\"not interested\\\\\\\"\\\\n\\\\n\\\\tanEvent handler\\\\n\\\\t\\\\tifNil: [^ self ].\\\\t\\\\\\\"Same priority but I am innermost\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Nobody else was interested\\\\\\\"\\\\n\\\\t^self mouseDownPriority >= anEvent handler mouseDownPriority\\\\n\\\\t\\\\tifTrue: [ self]\\\\n\\\\t\\\\tifFalse: [ nil]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'texture support' stamp: 'dgd 2/16/2003 20:02'!\\\\nisValidWonderlandTexture\\\\n\\\\t\\\\\\\"Return true if the receiver is a valid wonderland texture\\\\\\\"\\\\n\\\\t^ self\\\\n\\\\t\\\\tvalueOfProperty: #isValidWonderlandTexture\\\\n\\\\t\\\\tifAbsent: [true]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'model access' stamp: 'nk 3/10/2004 19:51'!\\\\nmodels\\\\n\\\\t\\\\\\\"Answer a collection of whatever models I may have.\\\\\\\"\\\\n\\\\n\\\\tself modelOrNil ifNil: [ ^EmptyArray ].\\\\n\\\\t^Array with: self modelOrNil! !\\\\n\\\\n\\\\n!Morph methodsFor: 'player viewer' stamp: 'wiz 1/1/2006 12:58'!\\\\nopenViewerForArgument\\\\n\\\\t\\\\\\\"Open up a viewer for a player associated with the morph in question. \\\\\\\"\\\\n\\\\tself presenter viewMorph: self! !\\\\n\\\\n!Morph methodsFor: 'player viewer' stamp: 'sw 3/13/98 17:40'!\\\\nupdateLiteralLabel\\\\n\\\\t\\\\\\\"Backstop -- updatingStringMorphs inform their owners with this message when they've changed; some Morphs care, others don't\\\\\\\"! !\\\\n\\\\n\\\\n!Morph methodsFor: 'other' stamp: 'sw 10/30/2001 13:12'!\\\\nremoveAllButFirstSubmorph\\\\n\\\\t\\\\\\\"Remove all of the receiver's submorphs other than the first one.\\\\\\\"\\\\n\\\\n\\\\tself submorphs allButFirst do: [:m | m delete]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'selected object' stamp: 'dgd 8/28/2004 16:30'!\\\\nselectedObject\\\\n\\\\t\\\\\\\"answer the selected object for the hand or nil is none\\\\\\\"\\\\n\\\\t^ self primaryHand selectedObject! !\\\\n\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!Morph class methodsFor: 'class initialization' stamp: 'hg 8/3/2000 16:43'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Morph initialize\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"this empty array object is shared by all morphs with no submorphs:\\\\\\\"\\\\n\\\\tEmptyArray _ Array new.\\\\n\\\\tFileList registerFileReader: self! !\\\\n\\\\n\\\\n!Morph class methodsFor: 'connectors-scripting' stamp: 'nk 9/10/2004 11:34'!\\\\nadditionsToViewerCategoryConnection\\\\n\\\\t\\\\\\\"Answer viewer additions for the 'connection' category\\\\\\\"\\\\n\\\\t\\\\\\\"Vocabulary initialize\\\\\\\"\\\\n\\\\n\\\\t^{\\\\n\\\\t\\\\t#'connections to me'.\\\\n\\\\t\\\\t#(\\\\n\\\\t\\\\t(command tellAllPredecessors: 'Send a message to all graph predecessors' ScriptName)\\\\n\\\\t\\\\t(command tellAllSuccessors: 'Send a message to all graph predecessors' ScriptName)\\\\n\\\\t\\\\t(command tellAllIncomingConnections: 'Send a message to all the connectors whose destination end is connected to me' ScriptName)\\\\n\\\\t\\\\t(command tellAllOutgoingConnections: 'Send a message to all the connectors whose source end is connected to me' ScriptName)\\\\n\\\\t\\\\t(slot incomingConnectionCount 'The number of connectors whose destination end is connected to me' Number readOnly Player getIncomingConnectionCount unused unused)\\\\n\\\\t\\\\t(slot outgoingConnectionCount 'The number of connectors whose source end is connected to me' Number readOnly Player getOutgoingConnectionCount unused unused)\\\\n\\\\t\\\\t)\\\\n\\\\t}\\\\n! !\\\\n\\\\n\\\\n!Morph class methodsFor: 'fileIn/Out' stamp: 'nk 7/16/2003 15:54'!\\\\nfileReaderServicesForFile: fullName suffix: suffix\\\\n\\\\n\\\\t^({ 'morph'. 'morphs'. 'sp'. '*' } includes: suffix)\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t{SimpleServiceEntry \\\\n\\\\t\\\\t\\\\t\\\\tprovider: self \\\\n\\\\t\\\\t\\\\t\\\\tlabel: 'load as morph'\\\\n\\\\t\\\\t\\\\t\\\\tselector: #fromFileName:\\\\n\\\\t\\\\t\\\\t\\\\tdescription: 'load as morph'}]\\\\n\\\\t\\\\tifFalse: [#()]! !\\\\n\\\\n!Morph class methodsFor: 'fileIn/Out' stamp: 'yo 8/7/2003 11:02'!\\\\nfromFileName: fullName\\\\n\\\\t\\\\\\\"Reconstitute a Morph from the file, presumed to be represent a Morph saved\\\\n\\\\tvia the SmartRefStream mechanism, and open it in an appropriate Morphic world\\\\\\\"\\\\n\\\\n \\\\t| aFileStream morphOrList |\\\\n\\\\taFileStream _ (MultiByteBinaryOrTextStream with: ((FileStream readOnlyFileNamed: fullName) binary contentsOfEntireFile)) binary reset.\\\\n\\\\tmorphOrList _ aFileStream fileInObjectAndCode.\\\\n\\\\t(morphOrList isKindOf: SqueakPage) ifTrue: [morphOrList _ morphOrList contentsMorph].\\\\n\\\\tSmalltalk isMorphic\\\\n\\\\t\\\\tifTrue: [ActiveWorld addMorphsAndModel: morphOrList]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[morphOrList isMorph ifFalse: [self inform: 'Can only load a single morph\\\\ninto an mvc project via this mechanism.'].\\\\n\\\\t\\\\t\\\\tmorphOrList openInWorld]! !\\\\n\\\\n!Morph class methodsFor: 'fileIn/Out' stamp: 'sw 2/17/2002 02:43'!\\\\nserviceLoadMorphFromFile\\\\n\\\\t\\\\\\\"Answer a service for loading a .morph file\\\\\\\"\\\\n\\\\n\\\\t^ SimpleServiceEntry \\\\n\\\\t\\\\tprovider: self \\\\n\\\\t\\\\tlabel: 'load as morph'\\\\n\\\\t\\\\tselector: #fromFileName:\\\\n\\\\t\\\\tdescription: 'load as morph'\\\\n\\\\t\\\\tbuttonLabel: 'load'! !\\\\n\\\\n!Morph class methodsFor: 'fileIn/Out' stamp: 'sd 2/1/2002 21:45'!\\\\nservices\\\\n\\\\n\\\\t^ Array with: self serviceLoadMorphFromFile! !\\\\n\\\\n\\\\n!Morph class methodsFor: 'initialize-release' stamp: 'SD 11/15/2001 22:22'!\\\\nunload\\\\n\\\\n\\\\tFileList unregisterFileReader: self ! !\\\\n\\\\n\\\\n!Morph class methodsFor: 'instance creation' stamp: 'efo 5/3/2002 14:59'!\\\\ninitializedInstance\\\\n\\\\t\\\\\\\"Answer an instance of the receiver which in some sense is initialized.  In the case of Morphs, this will yield an instance that can be attached to the Hand after having received the same kind of basic initialization that would be obtained from an instance chosen from the 'new morph' menu.\\\\n\\\\tReturn nil if the receiver is reluctant for some reason to return such a thing\\\\\\\"\\\\n\\\\n\\\\t^ (self class includesSelector: #descriptionForPartsBin)\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self newStandAlone]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self new]! !\\\\n\\\\n!Morph class methodsFor: 'instance creation'!\\\\nnewBounds: bounds\\\\n\\\\n\\\\t^ self new privateBounds: bounds! !\\\\n\\\\n!Morph class methodsFor: 'instance creation' stamp: 'jm 5/29/1998 21:28'!\\\\nnewBounds: bounds color: color\\\\n\\\\n\\\\t^ (self new privateBounds: bounds) privateColor: color\\\\n! !\\\\n\\\\n!Morph class methodsFor: 'instance creation' stamp: 'sw 8/4/97 12:05'!\\\\nnewSticky\\\\n\\\\n\\\\t^ self new beSticky! !\\\\n\\\\n\\\\n!Morph class methodsFor: 'misc' stamp: 'sw 8/4/1998 16:51'!\\\\nmorphsUnknownToTheirOwners\\\\n\\\\t\\\\\\\"Return a list of all morphs (other than HandMorphs) whose owners do not contain them in their submorph lists\\\\\\\"\\\\n\\\\t\\\\\\\"Morph morphsUnknownToTheirOwners\\\\\\\"\\\\n\\\\t| problemMorphs itsOwner |\\\\n\\\\tproblemMorphs _ OrderedCollection new.\\\\n\\\\tself allSubInstances do:\\\\n\\\\t\\\\t[:m | (m isHandMorph not and: [((itsOwner _ m owner) ~~ nil and: [(itsOwner submorphs includes: m) not])])\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[problemMorphs add: m]].\\\\n\\\\t^ problemMorphs! !\\\\n\\\\n\\\\n!Morph class methodsFor: 'new-morph participation' stamp: 'di 6/22/97 09:07'!\\\\nincludeInNewMorphMenu\\\\n\\\\t\\\\\\\"Return true for all classes that can be instantiated from the menu\\\\\\\"\\\\n\\\\t^ true! !\\\\n\\\\n!Morph class methodsFor: 'new-morph participation' stamp: 'sw 6/28/2001 11:33'!\\\\nnewStandAlone\\\\n\\\\t\\\\\\\"Answer an instance capable of standing by itself as a usable morph.\\\\\\\"\\\\n\\\\n\\\\t^ self basicNew initializeToStandAlone! !\\\\n\\\\n!Morph class methodsFor: 'new-morph participation' stamp: 'sw 8/2/2001 12:01'!\\\\npartName: aName categories: aList documentation: aDoc\\\\n\\\\t\\\\\\\"Answer a DescriptionForPartsBin which will represent a launch of a new instance of my class via the #newStandAlone protocol sent to my class. Use the category-list and documentation provided\\\\\\\"\\\\n\\\\n\\\\n\\\\t^ DescriptionForPartsBin new\\\\n\\\\t\\\\tformalName: aName\\\\n\\\\t\\\\tcategoryList: aList\\\\n\\\\t\\\\tdocumentation: aDoc\\\\n\\\\t\\\\tglobalReceiverSymbol: self name\\\\n\\\\t\\\\tnativitySelector: #newStandAlone! !\\\\n\\\\n\\\\n!Morph class methodsFor: 'scripting' stamp: 'sw 7/20/2005 01:20'!\\\\nadditionsToViewerCategoryColorAndBorder\\\\n\\\\t\\\\\\\"Answer viewer additions for the 'color & border' category\\\\\\\"\\\\n\\\\n\\\\t^#(\\\\n\\\\t\\\\t#'color & border' \\\\n\\\\t\\\\t(\\\\n\\\\t\\\\t\\\\t(slot color 'The color of the object' Color readWrite Player getColor  Player  setColor:)\\\\n\\\\t\\\\t\\\\t(slot opacity '0 means completely transparent, 1 means completely opaque' Number readWrite Player getAlpha Player setAlpha:)\\\\n\\\\t\\\\t\\\\t(slot borderStyle 'The style of the object''s border' BorderStyle readWrite Player getBorderStyle player setBorderStyle:)\\\\n\\\\t\\\\t\\\\t(slot borderColor 'The color of the object''s border' Color readWrite Player getBorderColor Player  setBorderColor:)\\\\n\\\\t\\\\t\\\\t(slot borderWidth 'The width of the object''s border' Number readWrite Player getBorderWidth Player setBorderWidth:)\\\\n\\\\t\\\\t\\\\t(slot roundedCorners 'Whether corners should be rounded' Boolean readWrite Player getRoundedCorners Player setRoundedCorners:)\\\\n\\\\n\\\\t\\\\t\\\\t(slot gradientFill 'Whether a gradient fill should be used' Boolean readWrite Player getUseGradientFill Player setUseGradientFill:)\\\\n\\\\t\\\\t\\\\t(slot secondColor 'The second color used when gradientFill is in effect' Color readWrite Player getSecondColor Player setSecondColor:)\\\\n\\\\n\\\\t\\\\t\\\\t(slot radialFill 'Whether the gradient fill, if used, should be radial' Boolean readWrite Player getRadialGradientFill Player setRadialGradientFill:)\\\\n\\\\n\\\\t\\\\t\\\\t(slot dropShadow 'Whether a drop shadow is shown' Boolean readWrite Player getDropShadow Player setDropShadow:)\\\\n\\\\t\\\\t\\\\t(slot shadowColor 'The color of the drop shadow' Color readWrite Player getShadowColor Player setShadowColor:)\\\\n\\\\t\\\\t)\\\\n\\\\t)\\\\n\\\\n! !\\\\n\\\\n!Morph class methodsFor: 'scripting' stamp: 'sw 8/11/97 13:17'!\\\\nauthoringPrototype\\\\n\\\\t\\\\\\\"Answer an instance of the receiver suitable for placing in a parts bin for authors\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ self new markAsPartsDonor! !\\\\n\\\\n!Morph class methodsFor: 'scripting' stamp: 'bf 9/11/2004 17:18'!\\\\nhasAdditionsToViewerCategories\\\\n\\\\t^ self class selectors\\\\n\\\\t\\\\tanySatisfy: [:each | each == #additionsToViewerCategories\\\\n\\\\t\\\\t\\\\t\\\\tor: [(each beginsWith: 'additionsToViewerCategory')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tand: [(each at: 26 ifAbsent: []) ~= $:]]]! !\\\\n\\\\n!Morph class methodsFor: 'scripting' stamp: 'yo 3/15/2005 14:10'!\\\\nhelpContributions\\\\n\\\\t\\\\\\\"Answer a list of pairs of the form (<symbol> <help message> ) to contribute to the system help dictionary\\\\\\\"\\\\n\\\\t\\\\n\\\\\\\"NB: Many of the items here are not needed any more since they're specified as part of command definitions now.  Someone needs to take the time to go through the list and remove items no longer needed.  But who's got that kind of time?\\\\\\\"\\\\n\\\\n\\\\t^ #(\\\\n\\\\t\\\\t(acceptScript:for:\\\\n\\\\t\\\\t\\\\t'submit the contents of the given script editor as the code defining the given selector')\\\\n\\\\t\\\\t(actorState\\\\n\\\\t\\\\t\\\\t'return the ActorState object for the receiver, creating it if necessary')\\\\n\\\\t\\\\t(addInstanceVariable\\\\n\\\\t\\\\t\\\\t'start the interaction for adding a new variable to the object')\\\\n\\\\t\\\\t(addPlayerMenuItemsTo:hand:\\\\n\\\\t\\\\t\\\\t'add player-specific menu items to the given menu, on behalf of the given hand.  At present, these are only commands relating to the turtle')\\\\n\\\\t\\\\t(addYesNoToHand\\\\n\\\\t\\\\t\\\\t'Press here to tear off a  TEST/YES/NO unit which you can drop into your script')\\\\n\\\\t\\\\t(allScriptEditors\\\\n\\\\t\\\\t\\\\t'answer a list off the extant ScriptEditors for the receiver')\\\\n\\\\t\\\\t(amount\\\\n\\\\t\\\\t\\\\t'The amount of displacement')\\\\n\\\\t\\\\t(angle\\\\t\\\\n\\\\t\\\\t\\\\t'The angular displacement')\\\\n\\\\t\\\\t(anonymousScriptEditorFor:\\\\n\\\\t\\\\t\\\\t'answer a new ScriptEditor object to serve as the place for scripting an anonymous (unnamed, unsaved) script for the receiver')\\\\n\\\\t\\\\t(append:\\\\n\\\\t\\\\t\\\\t'add an object to this container')\\\\n\\\\t\\\\t(prepend:\\\\n\\\\t\\\\t\\\\t'add an object to this container')\\\\n\\\\t\\\\t(assignDecrGetter:setter:amt:\\\\n\\\\t\\\\t\\\\t'evaluate the decrement variant of assignment')\\\\n\\\\t\\\\t(assignGetter:setter:amt:\\\\n\\\\t\\\\t\\\\t'evaluate the vanilla variant of assignment')\\\\n\\\\t\\\\t(assignIncrGetter:setter:amt:\\\\n\\\\t\\\\t\\\\t'evalute the increment version of assignment')\\\\n\\\\t\\\\t(assignMultGetter:setter:amt:\\\\n\\\\t\\\\t\\\\t'evaluate the multiplicative version of assignment')\\\\n\\\\t\\\\t(assureEventHandlerRepresentsStatus\\\\n\\\\t\\\\t\\\\t'make certain that the event handler associated with my current costume is set up to conform to my current script-status')\\\\n\\\\t\\\\t(assureExternalName\\\\n\\\\t\\\\t\\\\t'If I do not currently have an external name assigned, get one now')\\\\n\\\\t\\\\t(assureUniClass\\\\n\\\\t\\\\t\\\\t'make certain that I am a member a uniclass (i.e. a unique subclass); if I am not, create one now and become me into an instance of it')\\\\n\\\\t\\\\t(availableCostumeNames\\\\n\\\\t\\\\t\\\\t'answer a list of strings representing the names of all costumes currently available for me')\\\\n\\\\t\\\\t(availableCostumesForArrows\\\\n\\\\t\\\\t\\\\t'answer a list of actual, instantiated costumes for me, which can be cycled through as the user hits a next-costume or previous-costume button in a viewer')\\\\n\\\\t\\\\t(beep:\\\\n\\\\t\\\\t\\\\t'make the specified sound')\\\\n\\\\t\\\\t(borderColor\\\\n\\\\t\\\\t\\\\t'The color of the object''s border')\\\\n\\\\t\\\\t(borderWidth\\\\n\\\\t\\\\t\\\\t'The width of the object''s border')\\\\n\\\\t\\\\t(bottom\\\\n\\\\t\\\\t\\\\t'My bottom edge, measured downward from the top edge of the world')\\\\n\\\\t\\\\t(bounce:\\\\n\\\\t\\\\t\\\\t'If object strayed beyond the boundaries of its container, make it reflect back into it, making the specified noise while doing so.')\\\\n\\\\t\\\\t(bounce\\\\n\\\\t\\\\t\\\\t'If object strayed beyond the boundaries of its container, make it reflect back into it')\\\\n\\\\t\\\\t(chooseTrigger\\\\n'When this script should run.\\\\n\\\\\\\"normal\\\\\\\" means \\\\\\\"only when called\\\\\\\"')\\\\n\\\\t\\\\t(clearTurtleTrails\\\\n\\\\t\\\\t\\\\t'Clear all the pen trails in the interior.')\\\\n\\\\t\\\\t(clearOwnersPenTrails\\\\n\\\\t\\\\t\\\\t'Clear all the pen trails in my container.')\\\\n\\\\t\\\\t(color\\\\t\\\\n\\\\t\\\\t\\\\t'The object''s interior color')\\\\n\\\\t\\\\t(colorSees\\\\n\\\\t\\\\t\\\\t'Whether a given color in the object is over another given color')\\\\n\\\\t\\\\t(colorUnder\\\\n\\\\t\\\\t\\\\t'The color under the center of the object')\\\\n\\\\t\\\\t(copy\\\\n\\\\t\\\\t\\\\t'Return a new object that is very much like this one')\\\\n\\\\t\\\\t(cursor\\\\t\\\\n\\\\t\\\\t\\\\t'The index of the chosen element')\\\\n\\\\t\\\\t(deleteCard\\\\n\\\\t\\\\t\\\\t'Delete the current card.')\\\\n\\\\t\\\\t(dismiss\\\\n\\\\t\\\\t\\\\t'Click here to dismiss me')\\\\n\\\\t\\\\t(doMenuItem:\\\\n\\\\t\\\\t\\\\t'Do a menu item, the same way as if it were chosen manually')\\\\n\\\\t\\\\t(doScript:\\\\n\\\\t\\\\t\\\\t'Perform the given script once, on the next tick.')\\\\n\\\\t\\\\t(elementNumber\\\\n\\\\t\\\\t\\\\t'My element number as seen by my owner')\\\\n\\\\t\\\\t(fire\\\\n\\\\t\\\\t\\\\t'Run any and all button-firing scripts of this object')\\\\n\\\\t\\\\t(firstPage\\\\n\\\\t\\\\t\\\\t'Go to first page of book')\\\\n\\\\t\\\\t(followPath\\\\n\\\\t\\\\t\\\\t\\\\t'Retrace the path the object has memorized, if any.')\\\\n\\\\t\\\\t(forward:\\\\n\\\\t\\\\t\\\\t'Moves the object forward in the direction it is heading') \\\\n\\\\t\\\\t(goto:\\\\n\\\\t\\\\t\\\\t'Go to the specfied book page')\\\\n\\\\t\\\\t(goToNextCardInStack\\\\n\\\\t\\\\t\\\\t'Go to the next card')\\\\n\\\\t\\\\t(goToPreviousCardInStack\\\\n\\\\t\\\\t\\\\t'Go to the previous card.')\\\\n\\\\t\\\\t(goToRightOf:\\\\n\\\\t\\\\t\\\\t'Align the object just to the right of any specified object.')\\\\n\\\\t\\\\t(heading\\\\n\\\\t\\\\t\\\\t'Which direction the object is facing.  0 is straight up') \\\\n\\\\t\\\\t(height\\\\t\\\\n\\\\t\\\\t\\\\t'The distance between the top and bottom edges of the object')\\\\n\\\\t\\\\t(hide\\\\n\\\\t\\\\t\\\\t'Make the object so that it does not display and cannot handle input')\\\\n\\\\t\\\\t(initiatePainting\\\\t\\\\n\\\\t\\\\t\\\\t'Initiate painting of a new object in the standard playfield.')\\\\n\\\\t\\\\t(initiatePaintingIn:\\\\n\\\\t\\\\t\\\\t'Initiate painting of a new object in the given place.')\\\\n\\\\t\\\\t(isOverColor\\\\n\\\\t\\\\t\\\\t'Whether any part of this object is directly over the specified color')\\\\n\\\\t\\\\t(isUnderMouse\\\\n\\\\t\\\\t\\\\t'Whether any part of this object is beneath the current mouse-cursor position')\\\\n\\\\t\\\\t(lastPage\\\\n\\\\t\\\\t\\\\t'Go to the last page of the book.')\\\\n\\\\t\\\\t(left\\\\n\\\\t\\\\t\\\\t'My left edge, measured from the left edge of the World')\\\\n\\\\t\\\\t(leftRight\\\\n\\\\t\\\\t\\\\t'The horizontal displacement')\\\\n\\\\t\\\\t(liftAllPens\\\\n\\\\t\\\\t\\\\t'Lift the pens on all the objects in my interior.')\\\\n\\\\t\\\\t(lowerAllPens\\\\n\\\\t\\\\t\\\\t'Lower the pens on all the objects in my interior.')\\\\n\\\\t\\\\t(mouseX\\\\n\\\\t\\\\t\\\\t'The x coordinate of the mouse pointer')\\\\n\\\\t\\\\t(mouseY\\\\n\\\\t\\\\t\\\\t'The y coordinate of the mouse pointer')\\\\n\\\\t\\\\t(moveToward:\\\\n\\\\t\\\\t\\\\t'Move in the direction of another object.')\\\\n\\\\t\\\\t(insertCard\\\\n\\\\t\\\\t\\\\t'Create a new card.')\\\\n\\\\t\\\\t(nextPage\\\\n\\\\t\\\\t\\\\t'Go to next page.')\\\\n\\\\t\\\\t(numberAtCursor\\\\n\\\\t\\\\t\\\\t'The number held by the object at the chosen element')\\\\n\\\\t\\\\t(objectNameInHalo\\\\n\\\\t\\\\t\\\\t'Object''s name -- To change: click here, edit, hit ENTER')\\\\n\\\\t\\\\t(obtrudes\\\\n\\\\t\\\\t\\\\t'Whether any part of the object sticks out beyond its container''s borders')\\\\n\\\\t\\\\t(offerScriptorMenu\\\\n\\\\t\\\\t\\\\t'The Scriptee.\\\\nPress here to get a menu')\\\\n\\\\t\\\\t(pauseScript:\\\\n\\\\t\\\\t\\\\t'Make a running script become paused.')\\\\n\\\\t\\\\t(penDown\\\\n\\\\t\\\\t\\\\t'Whether the object''s pen is down (true) or up (false)')\\\\n\\\\t\\\\t(penColor\\\\n\\\\t\\\\t\\\\t'The color of the object''s pen')\\\\n\\\\t\\\\t(penSize\\\\t\\\\n\\\\t\\\\t\\\\t'The size of the object''s pen')\\\\n\\\\t\\\\t(clearPenTrails\\\\n\\\\t\\\\t\\\\t'Clear all pen trails in the current playfield')\\\\n\\\\t\\\\t(playerSeeingColorPhrase\\\\n\\\\t\\\\t\\\\t'The player who \\\\\\\"sees\\\\\\\" a given color')\\\\n\\\\t\\\\t(previousPage\\\\n\\\\t\\\\t\\\\t'Go to previous page')\\\\n\\\\n\\\\t\\\\t(show\\\\n\\\\t\\\\t\\\\t'If object was hidden, make it show itself again.')\\\\n\\\\t\\\\t(startScript:\\\\n\\\\t\\\\t\\\\t'Make a script start running.')\\\\n\\\\t\\\\t(stopScript:\\\\n\\\\t\\\\t\\\\t'Make a script stop running.')\\\\n\\\\t\\\\t(top\\\\n\\\\t\\\\t\\\\t'My top edge, measured downward from the top edge of the world')\\\\n\\\\t\\\\t(right\\\\n\\\\t\\\\t\\\\t'My right edge, measured from the left edge of the world')\\\\n\\\\t\\\\t(roundUpStrays\\\\n\\\\t\\\\t\\\\t'Bring all out-of-container subparts back into view.')\\\\n\\\\t\\\\t(scaleFactor\\\\n\\\\t\\\\t\\\\t'The amount by which the object is scaled')\\\\n\\\\t\\\\t(stopScript:\\\\n\\\\t\\\\t\\\\t'make the specified script stop running')\\\\n\\\\t\\\\t(tellAllSiblings:\\\\n\\\\t\\\\t\\\\t'send a message to all of my sibling instances')\\\\n\\\\t\\\\t(try\\\\n\\\\t\\\\t\\\\t'Run this command once.')\\\\n\\\\t\\\\t(tryMe\\\\n\\\\t\\\\t\\\\t'Click here to run this script once; hold button down to run repeatedly')\\\\n\\\\t\\\\t(turn:\\\\t\\\\t\\\\t\\\\t\\\\n\\\\t\\\\t\\\\t'Change the heading of the object by the specified amount')\\\\n\\\\t\\\\t(unhideHiddenObjects\\\\n\\\\t\\\\t\\\\t'Unhide all hidden objects.')\\\\n\\\\t\\\\t(upDown\\\\n\\\\t\\\\t\\\\t'The vertical displacement')\\\\n\\\\t\\\\t(userScript\\\\n\\\\t\\\\t\\\\t'This is a script defined by you.')\\\\n\\\\t\\\\t(userSlot\\\\n\\\\t\\\\t\\\\t'This is a variable defined by you.  Click here to change its type')\\\\n\\\\t\\\\t(valueAtCursor\\\\n\\\\t\\\\t\\\\t'The chosen element')\\\\n\\\\t\\\\t(wearCostumeOf:\\\\n\\\\t\\\\t\\\\t'Wear the same kind of costume as the other object')\\\\n\\\\t\\\\t(width\\\\t\\\\n\\\\t\\\\t\\\\t'The distance between the left and right edges of the object')\\\\n\\\\t\\\\t(wrap\\\\n\\\\t\\\\t\\\\t'If object has strayed beond the boundaries of its container, make it reappear from the opposite edge.')\\\\n\\\\t\\\\t(x\\\\n\\\\t\\\\t\\\\t'The x coordinate, measured from the left of the container')\\\\n\\\\t\\\\t(y\\\\n\\\\t\\\\t\\\\t'The y-coordinate, measured upward from the bottom of the container')\\\\n\\\\n\\\\t\\\\t)\\\\n! !\\\\n\\\\n\\\\n!Morph class methodsFor: 'testing' stamp: 'nk 6/12/2004 09:20'!\\\\nallSketchMorphClasses\\\\n\\\\t\\\\\\\"Morph allSketchMorphClasses\\\\\\\"\\\\n\\\\t^ Array\\\\n\\\\t\\\\tstreamContents: [:s | self\\\\n\\\\t\\\\t\\\\t\\\\twithAllSubclassesDo: [:cls | cls isSketchMorphClass\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [s nextPut: cls ]]]\\\\n! !\\\\n\\\\n!Morph class methodsFor: 'testing' stamp: 'yo 3/17/2005 09:07'!\\\\nallSketchMorphForms\\\\n\\\\t\\\\\\\"Answer a Set of forms of SketchMorph (sub) instances, except those \\\\n\\\\tused as button images, ones being edited, and those with 0 extent.\\\\\\\"\\\\n\\\\n\\\\t| reasonableForms form |\\\\n\\\\treasonableForms := Set new.\\\\n\\\\tMorph allSketchMorphClasses do:\\\\n\\\\t\\\\t[:cls | cls allInstances do:\\\\n\\\\t\\\\t\\\\t[:m | (m owner isKindOf: SketchEditorMorph orOf: IconicButton)\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[form _ m form.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t((form width > 0) and: [form height > 0]) ifTrue: [reasonableForms add: form]]]].\\\\n\\\\t^ reasonableForms! !\\\\n\\\\n!Morph class methodsFor: 'testing' stamp: 'nk 6/12/2004 09:17'!\\\\nisSketchMorphClass\\\\n\\\\t^false! !\\\\n\\\\n\\\\n!Morph class methodsFor: '*eToys-customevents-user events' stamp: 'sw 6/16/2005 01:26'!\\\\nadditionsToViewerCategoryUserEvents\\\\n\\\\t\\\\\\\"Answer further viewer additions relating to user-defined events; these appear in the 'scripting' category\\\\\\\"\\\\n\\\\n\\\\t^ Preferences allowEtoyUserCustomEvents\\\\n\\\\t\\\\tifTrue: [ #(scripting (\\\\n\\\\t\\\\t\\\\t(command triggerCustomEvent: 'trigger a user-defined (global) event' CustomEvents)\\\\n\\\\t\\\\t\\\\t(slot triggeringObject 'the object that is triggering an event, either user-defined or pre-defined' Player readOnly Player getTriggeringObject unused unused)))]\\\\n\\\\t\\\\tifFalse: [#(scripting ())]! !\\\\n\\\\n\\\\n!Morph class methodsFor: '*eToys-new-morph participation' stamp: 'sw 10/24/2001 15:51'!\\\\npartName: aName categories: aList documentation: aDoc sampleImageForm: aForm\\\\n\\\\t\\\\\\\"Answer a DescriptionForPartsBin which will represent a launch of a new instance of my class via the #newStandAlone protocol sent to my class. Use the category-list and documentation provided.  This variant allows an overriding image form to be provided, useful in cases where we don't want to launch a sample instance just to get the form\\\\\\\"\\\\n\\\\n\\\\n\\\\t| descr |\\\\n\\\\tdescr _ DescriptionForPartsBin new\\\\n\\\\t\\\\tformalName: aName\\\\n\\\\t\\\\tcategoryList: aList\\\\n\\\\t\\\\tdocumentation: aDoc\\\\n\\\\t\\\\tglobalReceiverSymbol: self name\\\\n\\\\t\\\\tnativitySelector: #newStandAlone.\\\\n\\\\tdescr sampleImageForm: aForm.\\\\n\\\\t^ descr\\\\n! !\\\\n\\\\n\\\\n!Morph class methodsFor: '*eToys-scripting' stamp: 'sw 9/27/2001 17:40'!\\\\nadditionsToViewerCategoryBasic\\\\n\\\\t\\\\\\\"Answer viewer additions for the 'basic' category\\\\\\\"\\\\n\\\\n\\\\t^#(\\\\n\\\\t\\\\tbasic \\\\n\\\\t\\\\t(\\\\n\\\\t\\\\t\\\\t(slot x 'The x coordinate' Number readWrite Player getX Player setX:)\\\\n\\\\t\\\\t\\\\t(slot y  \\\\t'The y coordinate' Number readWrite Player \\\\tgetY Player setY:)\\\\n\\\\t\\\\t\\\\t(slot heading  'Which direction the object is facing.  0 is straight up' Number readWrite Player getHeading Player setHeading:)\\\\n\\\\t\\\\t\\\\t(command forward: 'Moves the object forward in the direction it is heading' Number)\\\\n\\\\t\\\\t\\\\t(command turn: 'Change the heading of the object by the specified amount' Number)\\\\n\\\\t\\\\t\\\\t(command beep: 'Make the specified sound' Sound)\\\\n\\\\t\\\\t)\\\\n\\\\t)\\\\n! !\\\\n\\\\n!Morph class methodsFor: '*eToys-scripting' stamp: 'sw 4/20/2002 00:47'!\\\\nadditionsToViewerCategoryDragAndDrop\\\\n\\\\t\\\\\\\"Answer viewer additions for the 'drag & drop' category\\\\\\\"\\\\n\\\\n\\\\t^#(\\\\n\\\\t\\\\t#'drag & drop'\\\\n \\\\n\\\\t\\\\t(\\\\n\\\\t\\\\t\\\\t(slot 'drop enabled' 'Whether drop is enabled' Boolean readWrite Player getDropEnabled Player setDropEnabled:)\\\\n\\\\t\\\\t\\\\t(slot 'resist being picked up' 'Whether a simple mouse-drag on this object should allow it to be picked up' Boolean readWrite Player getSticky Player setSticky:)\\\\n\\\\t\\\\t\\\\t(slot 'resist deletion' 'Whether this is resistant to easy removal via the pink X halo handle.' Boolean readWrite Player getResistsRemoval Player setResistsRemoval:)\\\\n\\\\t\\\\t\\\\t(slot 'be locked' 'Whether this object should be blind to all input' Boolean readWrite Player getIsLocked Player setIsLocked:)\\\\n\\\\t\\\\t\\\\n\\\\t\\\\t))! !\\\\n\\\\n!Morph class methodsFor: '*eToys-scripting' stamp: 'sw 9/17/2002 13:58'!\\\\nadditionsToViewerCategoryGeometry\\\\n\\\\t\\\\\\\"answer additions to the geometry viewer category\\\\\\\"\\\\n\\\\n\\\\t^ #(geometry \\\\n\\\\t\\\\t(\\\\n\\\\t\\\\t\\\\t(slot x   'The x coordinate' Number readWrite Player  getX   Player setX:)\\\\n\\\\t\\\\t\\\\t(slot y   'The y coordinate' Number readWrite Player  getY  Player setY:)\\\\n\\\\t\\\\t\\\\t(slot heading  'Which direction the object is facing.  0 is straight up' Number readWrite Player getHeading  Player setHeading:)\\\\n\\\\n\\\\t\\\\t\\\\t(slot  scaleFactor 'The factor by which the object is magnified' Number readWrite Player getScaleFactor Player setScaleFactor:)\\\\n\\\\t\\\\t\\\\t(slot  left   'The left edge' Number readWrite Player getLeft  Player  setLeft:)\\\\n\\\\t\\\\t\\\\t(slot  right  'The right edge' Number readWrite Player getRight  Player  setRight:)\\\\n\\\\t\\\\t\\\\t(slot  top  'The top edge' Number readWrite Player getTop  Player  setTop:) \\\\n\\\\t\\\\t\\\\t(slot  bottom  'The bottom edge' Number readWrite Player getBottom  Player  setBottom:) \\\\n\\\\t\\\\t\\\\t(slot  length  'The length' Number readWrite Player getLength  Player  setLength:) \\\\n\\\\t\\\\t\\\\t(slot  width  'The width' Number readWrite Player getWidth  Player  setWidth:)\\\\n\\\\n\\\\t\\\\t\\\\t(slot headingTheta 'The angle, in degrees, that my heading vector makes with the positive x-axis' Number readWrite Player getHeadingTheta Player setHeadingTheta:)\\\\n\\\\n\\\\t\\\\t\\\\t(slot distance 'The length of the vector connecting the origin to the object''s position' Number readWrite Player getDistance Player setDistance:)\\\\n\\\\t\\\\t\\\\t(slot theta 'The angle between the positive x-axis and the vector connecting the origin to the object''s position' Number readWrite Player getTheta Player setTheta: )\\\\n\\\\t\\\\t)\\\\n\\\\t)\\\\n\\\\n\\\\n! !\\\\n\\\\n!Morph class methodsFor: '*eToys-scripting' stamp: 'sw 11/16/2001 10:21'!\\\\nadditionsToViewerCategoryLayout\\\\n\\\\t\\\\\\\"Answer viewer additions for the 'layout' category\\\\\\\"\\\\n\\\\n\\\\t^#(\\\\n\\\\t\\\\tlayout \\\\n\\\\t\\\\t(\\\\n\\\\t\\\\t\\\\t(slot clipSubmorphs 'Whether or not to clip my submorphs' Boolean readWrite Player getClipSubmorphs Player setClipSubmorphs:)\\\\n\\\\n\\\\t\\\\t))\\\\n! !\\\\n\\\\n!Morph class methodsFor: '*eToys-scripting' stamp: 'sw 7/8/2004 00:20'!\\\\nadditionsToViewerCategoryMiscellaneous\\\\n\\\\t\\\\\\\"Answer viewer additions for the 'miscellaneous' category\\\\\\\"\\\\n\\\\n\\\\t^#(\\\\n\\\\t\\\\tmiscellaneous \\\\n\\\\t\\\\t(\\\\n\\\\t\\\\t\\\\t(command doMenuItem: 'do the menu item' Menu)\\\\n\\\\t\\\\t\\\\t(command show 'make the object visible')\\\\n\\\\t\\\\t\\\\t(command hide 'make the object invisible')\\\\n\\\\t\\\\t\\\\t(command wearCostumeOf: 'wear the costume of...' Player)\\\\n\\\\n\\\\t\\\\t\\\\t(command fire 'trigger any and all of this object''s button actions')\\\\n\\\\t\\\\t\\\\t(slot copy 'returns a copy of this object' Player readOnly Player getNewClone\\\\t unused unused)\\\\n\\\\t\\\\t\\\\t(slot elementNumber 'my index in my container' Number readWrite Player getIndexInOwner Player setIndexInOwner:)\\\\n\\\\t\\\\t\\\\t(slot holder 'the object''s container' Player readOnly Player getHolder Player setHolder:)\\\\n\\\\t\\\\t\\\\t(command stamp 'add my image to the pen trails')\\\\n\\\\t\\\\t\\\\t(command erase 'remove this object from the screen')\\\\n\\\\t\\\\t\\\\t(command stampAndErase 'add my image to the pen trails and go away')\\\\n\\\\t\\\\t)\\\\n\\\\t)\\\\n\\\\n! !\\\\n\\\\n!Morph class methodsFor: '*eToys-scripting' stamp: 'dgd 8/8/2003 22:17'!\\\\nadditionsToViewerCategoryMotion\\\\n\\\\t\\\\\\\"Answer viewer additions for the 'motion' category\\\\\\\"\\\\n\\\\n\\\\t^#(\\\\n\\\\t\\\\tmotion \\\\n\\\\t\\\\t(\\\\n\\\\t\\\\t\\\\t(slot x 'The x coordinate' Number readWrite Player getX Player setX:)\\\\n\\\\t\\\\t\\\\t(slot y  \\\\t'The y coordinate' Number readWrite Player \\\\tgetY Player setY:)\\\\n\\\\t\\\\t\\\\t(slot heading  'Which direction the object is facing.  0 is straight up' Number readWrite Player getHeading Player setHeading:)\\\\n\\\\t\\\\t\\\\t(command forward: 'Moves the object forward in the direction it is heading' Number)\\\\n\\\\t\\\\t\\\\t(slot obtrudes 'whether the object sticks out over its container''s edge' Boolean readOnly Player getObtrudes unused unused) \\\\n\\\\t\\\\t\\\\t(command turnToward: 'turn toward the given object' Player) \\\\n\\\\t\\\\t\\\\t(command moveToward: 'move toward the given object' Player) \\\\n\\\\t\\\\t\\\\t(command turn: 'Change the heading of the object by the specified amount' Number)\\\\n\\\\t\\\\t\\\\t(command bounce: 'bounce off the edge if hit' Sound) \\\\n\\\\t\\\\t\\\\t(command wrap 'wrap off the edge if appropriate') \\\\n\\\\t\\\\t\\\\t(command followPath 'follow the yellow brick road') \\\\n\\\\t\\\\t\\\\t(command goToRightOf: 'place this object to the right of another' Player)\\\\n\\\\t\\\\t)\\\\n\\\\t)\\\\n\\\\n! !\\\\n\\\\n!Morph class methodsFor: '*eToys-scripting' stamp: 'sw 12/9/2001 23:26'!\\\\nadditionsToViewerCategoryObservation\\\\n\\\\t\\\\\\\"Answer viewer additions for the 'observations' category\\\\\\\"\\\\n\\\\n\\\\t^#(\\\\n\\\\t\\\\tobservation\\\\n \\\\n\\\\t\\\\t(\\\\n\\\\t\\\\t\\\\t(slot colorUnder 'The color under the center of the object' Color readOnly Player getColorUnder unused  unused )\\\\n\\\\t\\\\t\\\\t(slot brightnessUnder 'The brightness under the center of the object' Number readOnly Player getBrightnessUnder unused unused)\\\\n\\\\t\\\\t\\\\t(slot luminanceUnder 'The luminance under the center of the object' Number readOnly Player getLuminanceUnder unused unused)\\\\n\\\\t\\\\t\\\\t(slot saturationUnder 'The saturation under the center of the object' Number readOnly Player getSaturationUnder unused unused)\\\\n\\\\t\\\\t\\\\n\\\\t\\\\t))\\\\n! !\\\\n\\\\n!Morph class methodsFor: '*eToys-scripting' stamp: 'sw 4/17/2003 12:05'!\\\\nadditionsToViewerCategoryPenUse\\\\n\\\\t\\\\\\\"Answer viewer additions for the 'pen use' category\\\\\\\"\\\\n\\\\n\\\\t^#(\\\\n\\\\t\\\\t#'pen use' \\\\n\\\\t\\\\t(\\\\n\\\\t\\\\t\\\\t(slot penColor 'the color of ink used by the pen' Color readWrite Player getPenColor Player setPenColor:) \\\\n\\\\t\\\\t\\\\t(slot penSize 'the width of the pen' Number readWrite Player getPenSize Player setPenSize:) \\\\n\\\\t\\\\t\\\\t(slot penDown 'whether the pen is currently down' Boolean readWrite Player getPenDown Player setPenDown:)\\\\n\\\\t\\\\t\\\\t(slot trailStyle 'determines whether lines, arrows, arrowheads, or dots are used when I put down a pen trail' TrailStyle readWrite Player getTrailStyle Player setTrailStyle:)\\\\n\\\\t\\\\t\\\\t(slot dotSize 'diameter of dot to use when trailStyle is dots' Number readWrite Player getDotSize Player setDotSize:)\\\\n\\\\t\\\\t\\\\t(command clearOwnersPenTrails 'clear all pen trails in my containing playfield')\\\\n\\\\t\\\\t)\\\\n\\\\t)\\\\n! !\\\\n\\\\n!Morph class methodsFor: '*eToys-scripting' stamp: 'sw 2/19/2003 18:04'!\\\\nadditionsToViewerCategoryScripting\\\\n\\\\t\\\\\\\"Answer viewer additions for the 'scripting' category\\\\\\\"\\\\n\\\\n\\\\t^#(\\\\n\\\\t\\\\tscripting \\\\n\\\\t\\\\t(\\\\n\\\\n\\\\t\\\\t\\\\t(command startScript: 'start the given script ticking' ScriptName)\\\\n\\\\t\\\\t\\\\t(command pauseScript: 'make the given script be \\\\\\\"paused\\\\\\\"' ScriptName)\\\\n\\\\t\\\\t\\\\t(command stopScript: 'make the given script be \\\\\\\"normal\\\\\\\"' ScriptName)\\\\n\\\\n\\\\t\\\\t\\\\t(command startAll: 'start the given script ticking in the object and all of its siblings.' ScriptName)\\\\n\\\\t\\\\t\\\\t(command pauseAll: 'make the given script be \\\\\\\"paused\\\\\\\" in the object and all of its siblings' ScriptName)\\\\n\\\\t\\\\t\\\\t(command stopAll: 'make the given script be \\\\\\\"normal\\\\\\\" in the object and all of its siblings' ScriptName)\\\\n\\\\n\\\\t\\\\t\\\\t(command doScript: 'run the given script once, on the next tick' ScriptName)\\\\n\\\\t\\\\t\\\\t(command tellSelfAndAllSiblings: 'run the given script in the object and in all of its siblings' ScriptName)\\\\n\\\\t\\\\t\\\\t(command tellAllSiblings: 'send a message to all siblings' ScriptName)))! !\\\\n\\\\n!Morph class methodsFor: '*eToys-scripting' stamp: 'RAA 5/18/2001 12:48'!\\\\nadditionsToViewerCategoryScripts\\\\n\\\\n\\\\t\\\\\\\"note: if you change the thing below you also need to change #tileScriptCommands.\\\\\\\"\\\\n\\\\n\\\\t^#(\\\\n\\\\t\\\\tscripts \\\\n\\\\t\\\\t(\\\\n\\\\t\\\\t\\\\t(command emptyScript 'an empty script')\\\\n\\\\t\\\\t)\\\\n\\\\t)\\\\n\\\\n! !\\\\n\\\\n!Morph class methodsFor: '*eToys-scripting' stamp: 'nk 10/14/2004 10:59'!\\\\nadditionsToViewerCategoryTests\\\\n\\\\t\\\\\\\"Answer viewer additions for the 'tests' category.\\\\\\\"\\\\n\\\\n\\\\\\\"Note:  Because of intractable performance problems in continuously evaluating isOverColor in a Viewer, the isOverColor entry is not given a readout\\\\\\\"\\\\n\\\\n\\\\t^#(\\\\n\\\\t\\\\t#tests \\\\n\\\\t\\\\t(\\\\n\\\\t\\\\t\\\\t(slot isOverColor 'whether any part of the object is over the given color' Boolean\\\\treadOnly Player seesColor: unused unused)\\\\n\\\\t\\\\t\\\\t(slot isUnderMouse 'whether the object is under the current mouse position' Boolean readOnly\\\\tPlayer getIsUnderMouse unused unused)\\\\n\\\\t\\\\t\\\\t(slot colorSees\\\\t'whether the given color sees the given color' Boolean readOnly\\\\tPlayer color:sees:\\\\tunused\\\\tunused)\\\\n\\\\t\\\\t\\\\t(slot overlaps    'whether I overlap a given object' Boolean readOnly Player overlaps: unused unused)\\\\n\\\\t\\\\t\\\\t(slot overlapsAny    'whether I overlap a given object or one of its siblings or similar objects' Boolean readOnly Player overlapsAny: unused unused)\\\\n\\\\t\\\\t\\\\t(slot touchesA\\\\t'whether I overlap any  Sketch that is showing the same picture as a particular prototype.' Boolean readOnly Player touchesA:\\\\tunused\\\\tunused)\\\\n\\\\t\\\\t\\\\t(slot obtrudes 'whether the object sticks out over its container''s edge' Boolean readOnly Player getObtrudes unused unused)\\\\n\\\\t\\\\t)\\\\n\\\\t)\\\\n! !\\\\n\\\\n!Morph class methodsFor: '*eToys-scripting' stamp: 'sw 9/17/2002 10:00'!\\\\nvectorAdditions\\\\n\\\\t\\\\\\\"Answer slot/command definitions for the vector experiment\\\\\\\"\\\\n\\\\n\\\\t^ # (\\\\n(slot x   'The x coordinate' Number readWrite Player  getX   Player setX:)\\\\n(slot y   'The y coordinate' Number readWrite Player  getY  Player setY:)\\\\n(slot heading  'Which direction the object is facing.  0 is straight up' Number readWrite Player getHeading  Player setHeading:)\\\\n(slot distance 'The length of the vector connecting the origin to the object''s position' Number readWrite Player getDistance Player setDistance:)\\\\n(slot theta 'The angle between the positive x-axis and the vector connecting the origin to the object''s position' Number readWrite Player getTheta Player setTheta: )\\\\n(slot headingTheta 'The angle that my heading vector makes with the positive x-axis' Number readWrite Player getHeadingTheta Player setHeadingTheta:)\\\\n\\\\n(command + 'Adds two players together, treating each as a vector from the origin.' Player)\\\\n(command - 'Subtracts one player from another, treating each as a vector from the origin.' Player)\\\\n(command * 'Multiply a player by a Number, treating the Player as a vector from the origin.' Number)\\\\n(command / 'Divide a player by a Number, treating the Player as a vector from the origin.' Number)\\\\n\\\\n(command incr: 'Each Player is a vector from the origin.  Increase one by the amount of the other.' Player)\\\\n(command decr: 'Each Player is a vector from the origin.  Decrease one by the amount of the other.' Player)\\\\n(command multBy: 'A Player is a vector from the origin.  Multiply its length by the factor.' Number)\\\\n(command dividedBy: 'A Player is a vector from the origin.  Divide its length by the factor.' Number)\\\\n\\\\t)! !\\\\n\\\\n\\\\n!Morph class methodsFor: '*flexibleVocabularies-flexiblevocabularies-scripting' stamp: 'nk 10/11/2003 18:17'!\\\\nadditionsToViewerCategories\\\\n\\\\t\\\\\\\"Answer a list of (<categoryName> <list of category specs>) pairs that characterize the\\\\n\\\\tphrases this kind of morph wishes to add to various Viewer categories.\\\\n\\\\n\\\\tThis version factors each category definition into a separate method.\\\\n\\\\n\\\\tSubclasses that have additions can either:\\\\n\\\\t\\\\t- override this method, or\\\\n\\\\t\\\\t- (preferably) define one or more additionToViewerCategory* methods.\\\\n\\\\n\\\\tThe advantage of the latter technique is that class extensions may be added\\\\n\\\\tby external packages without having to re-define additionsToViewerCategories.\\\\n\\\\t\\\\\\\"\\\\n\\\\t^#()! !\\\\n\\\\n!Morph class methodsFor: '*flexibleVocabularies-flexiblevocabularies-scripting' stamp: 'nk 8/29/2004 16:35'!\\\\nadditionsToViewerCategory: aCategoryName\\\\n\\\\t\\\\\\\"Answer a list of viewer specs for items to be added to the given category on behalf of the receiver.  Each class in a morph's superclass chain is given the opportunity to add more things\\\\\\\"\\\\n\\\\n\\\\taCategoryName == #vector ifTrue:\\\\n\\\\t\\\\t[^ self vectorAdditions].\\\\n\\\\t^self allAdditionsToViewerCategories at: aCategoryName ifAbsent: [ #() ].! !\\\\n\\\\n!Morph class methodsFor: '*flexibleVocabularies-flexiblevocabularies-scripting' stamp: 'nk 10/11/2003 18:06'!\\\\nadditionToViewerCategorySelectors\\\\n\\\\t\\\\\\\"Answer the list of my selectors matching additionsToViewerCategory*\\\\\\\"\\\\n\\\\t^self class organization allMethodSelectors select: [ :ea |\\\\n\\\\t\\\\t(ea beginsWith: 'additionsToViewerCategory')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [ (ea at: 26 ifAbsent: []) ~= $: ]]! !\\\\n\\\\n!Morph class methodsFor: '*flexibleVocabularies-flexiblevocabularies-scripting' stamp: 'nk 9/11/2004 16:56'!\\\\nallAdditionsToViewerCategories\\\\n\\\\t\\\\\\\"Answer a Dictionary of (<categoryName> <list of category specs>) that \\\\n\\\\tdefines the phrases this kind of morph wishes to add to various Viewer categories. \\\\n\\\\t \\\\n\\\\tThis version allows each category definition to be defined in one or more separate methods. \\\\n\\\\t \\\\n\\\\tSubclasses that have additions can either:\\\\n\\\\t- override #additionsToViewerCategories, or\\\\n\\\\t- (preferably) define one or more additionToViewerCategory* methods.\\\\n\\\\n\\\\tThe advantage of the latter technique is that class extensions may be added by\\\\n\\\\texternal packages without having to re-define additionsToViewerCategories.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"\\\\n\\\\tMorph allAdditionsToViewerCategories\\\\n\\\\t\\\\\\\"\\\\n\\\\t| dict |\\\\n\\\\tdict := IdentityDictionary new.\\\\n\\\\t(self class includesSelector: #additionsToViewerCategories)\\\\n\\\\t\\\\tifTrue: [self additionsToViewerCategories\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:group | group\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tpairsDo: [:key :list | (dict\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tat: key\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifAbsentPut: [OrderedCollection new])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taddAll: list]]].\\\\n\\\\tself class selectors\\\\n\\\\t\\\\tdo: [:aSelector | ((aSelector beginsWith: 'additionsToViewerCategory')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [(aSelector at: 26 ifAbsent: []) ~= $:])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [(self perform: aSelector)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tpairsDo: [:key :list | (dict\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tat: key\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifAbsentPut: [OrderedCollection new])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taddAll: list]]].\\\\n\\\\t^ dict! !\\\\n\\\\n!Morph class methodsFor: '*flexibleVocabularies-flexiblevocabularies-scripting' stamp: 'stephaneducasse 2/4/2006 20:33'!\\\\nunfilteredCategoriesForViewer\\\\n\\\\t\\\\\\\"Answer a list of symbols representing the categories to offer in the viewer for one of my instances, in order of:\\\\n\\\\t- masterOrderingOfCategorySymbols first\\\\n\\\\t- others last in order by translated wording\\\\\\\"\\\\n\\\\t\\\\\\\"\\\\n\\\\tMorph unfilteredCategoriesForViewer\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t| aClass additions masterOrder |\\\\n\\\\taClass := self.\\\\n\\\\tadditions := OrderedCollection new.\\\\n\\\\t[aClass == Morph superclass ] whileFalse: [\\\\n\\\\t\\\\tadditions addAll: (aClass allAdditionsToViewerCategories keys\\\\n\\\\t\\\\t\\\\tasSortedCollection: [ :a :b | a translated < b translated ]).\\\\n\\\\t\\\\taClass := aClass superclass ]. \\\\n\\\\n\\\\tmasterOrder := EToyVocabulary masterOrderingOfCategorySymbols.\\\\n\\\\n\\\\t^(masterOrder intersection: additions), (additions difference: masterOrder).! !\\\\n\\\\n\\\\n!Morph class methodsFor: '*MorphicExtras-arrow head size'!\\\\ndefaultArrowheadSize\\\\n\\\\t\\\\n\\\\t^ 5 @ 4! !\\\\n\\\\n!Morph class methodsFor: '*MorphicExtras-arrow head size'!\\\\nobtainArrowheadFor: aPrompt defaultValue: defaultPoint\\\\n\\\\t\\\\\\\"Allow the user to supply a point to serve as an arrowhead size.  Answer nil if we fail to get a good point\\\\\\\"\\\\n\\\\n\\\\t| result  |\\\\n\\\\tresult := FillInTheBlank request: aPrompt initialAnswer: defaultPoint asString.\\\\n\\\\tresult isEmptyOrNil ifTrue: [^ nil].\\\\n\\\\t^ [(Point readFrom: (ReadStream on: result))]\\\\n\\\\t\\\\ton: Error do: [:ex |  nil].! !\\\\n\\\\n\\\\n!Morph class methodsFor: '*MorphicExtras-new-morph participation' stamp: 'sw 11/27/2001 13:20'!\\\\naddPartsDescriptorQuadsTo: aList if: aBlock\\\\n\\\\t\\\\\\\"For each of the standard objects to be put into parts bins based on declarations in this class, add a parts-launching quintuplet to aList, provided that the boolean-valued-block-with-one-argument supplied evaluates to true when provided the DescriptionForPartsBin\\\\\\\"\\\\n\\\\n\\\\t| info more |\\\\n\\\\t(self class includesSelector: #descriptionForPartsBin) ifTrue:\\\\n\\\\t\\\\t[info _ self descriptionForPartsBin.\\\\n\\\\t\\\\t(aBlock value: info) ifTrue:\\\\n\\\\t\\\\t\\\\t[aList add:\\\\n\\\\t\\\\t\\\\t\\\\t{info globalReceiverSymbol.\\\\n\\\\t\\\\t\\\\t\\\\tinfo nativitySelector.\\\\n\\\\t\\\\t\\\\t\\\\tinfo formalName.\\\\n\\\\t\\\\t\\\\t\\\\tinfo documentation.\\\\n\\\\t\\\\t\\\\t\\\\tinfo sampleImageFormOrNil}]].\\\\n\\\\n\\\\t(self class includesSelector: #supplementaryPartsDescriptions)\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[more _ self supplementaryPartsDescriptions.\\\\n\\\\t\\\\t\\\\t(more isKindOf: DescriptionForPartsBin) ifTrue: [more _ Array with: more].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"The above being a mild bit of forgiveness, so that in the usual only-one\\\\n\\\\t\\\\t\\\\t\\\\tcase, the user need not return a collection\\\\\\\"\\\\n\\\\t\\\\t\\\\tmore do:\\\\n\\\\t\\\\t\\\\t\\\\t[:aPartsDescription |  (aBlock value: aPartsDescription) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[aList add:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t{aPartsDescription globalReceiverSymbol.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taPartsDescription nativitySelector.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taPartsDescription formalName.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taPartsDescription documentation.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taPartsDescription sampleImageFormOrNil}]]]! !\\\\n\\\\n\\\\n!Morph class methodsFor: '*MorphicExtras-parts bin' stamp: 'sw 8/12/2001 14:26'!\\\\nsupplementaryPartsDescriptions\\\\n\\\\t\\\\\\\"Answer a list of DescriptionForPartsBin objects that characterize objects that this class wishes to contribute to Stationery bins *other* than by the standard default #newStandAlone protocol\\\\\\\"\\\\n\\\\n\\\\t^ {\\\\tDescriptionForPartsBin\\\\n\\\\t\\\\t\\\\tformalName: 'Status'\\\\n\\\\t\\\\t\\\\tcategoryList: #(Scripting)\\\\n\\\\t\\\\t\\\\tdocumentation: 'Buttons to run, stop, or single-step scripts'\\\\n\\\\t\\\\t\\\\tglobalReceiverSymbol: #ScriptingSystem\\\\n\\\\t\\\\t\\\\tnativitySelector: #scriptControlButtons.\\\\n\\\\t\\\\tDescriptionForPartsBin\\\\n\\\\t\\\\t\\\\tformalName: 'Scripting'\\\\n\\\\t\\\\t\\\\tcategoryList: #(Scripting)\\\\n\\\\t\\\\t\\\\tdocumentation: 'A confined place for drawing and scripting, with its own private stop/step/go buttons.'\\\\n\\\\t\\\\t\\\\tglobalReceiverSymbol: #ScriptingSystem\\\\n\\\\t\\\\t\\\\tnativitySelector: #newScriptingSpace.\\\\n\\\\t\\\\tDescriptionForPartsBin\\\\n\\\\t\\\\t\\\\tformalName: 'Random'\\\\n\\\\t\\\\t\\\\tcategoryList: #(Scripting)\\\\n\\\\t\\\\t\\\\tdocumentation: 'A tile that will produce a random number in a given range'\\\\n\\\\t\\\\t\\\\tglobalReceiverSymbol: #RandomNumberTile\\\\n\\\\t\\\\t\\\\tnativitySelector: #new.\\\\n\\\\t\\\\tDescriptionForPartsBin\\\\n\\\\t\\\\t\\\\tformalName: 'ButtonDown?'\\\\n\\\\t\\\\t\\\\tcategoryList: #(Scripting)\\\\n\\\\t\\\\t\\\\tdocumentation: 'Tiles for querying whether the mouse button is down'\\\\n\\\\t\\\\t\\\\tglobalReceiverSymbol: #ScriptingSystem\\\\n\\\\t\\\\t\\\\tnativitySelector: #anyButtonPressedTiles.\\\\n\\\\t\\\\tDescriptionForPartsBin\\\\n\\\\t\\\\t\\\\tformalName: 'ButtonUp?'\\\\n\\\\t\\\\t\\\\tcategoryList: #(Scripting)\\\\n\\\\t\\\\t\\\\tdocumentation: 'Tiles for querying whether the mouse button is up'\\\\n\\\\t\\\\t\\\\tglobalReceiverSymbol: #ScriptingSystem\\\\n\\\\t\\\\t\\\\tnativitySelector: #noButtonPressedTiles.\\\\n\\\\t\\\\tDescriptionForPartsBin\\\\n\\\\t\\\\t\\\\tformalName: 'NextPage'\\\\n\\\\t\\\\t\\\\tcategoryList: #(Presentation)\\\\n\\\\t\\\\t\\\\tdocumentation: 'A button which, when clicked, takes the reader to the next page of a book'\\\\n\\\\t\\\\t\\\\tglobalReceiverSymbol: #BookMorph\\\\n\\\\t\\\\t\\\\tnativitySelector: #nextPageButton.\\\\n\\\\t\\\\tDescriptionForPartsBin\\\\n\\\\t\\\\t\\\\tformalName: 'PreviousPage'\\\\n\\\\t\\\\t\\\\tcategoryList: #(Presentation)\\\\n\\\\t\\\\t\\\\tdocumentation: 'A button which, when clicked, takes the reader to the next page of a book'\\\\n\\\\t\\\\t\\\\tglobalReceiverSymbol: #BookMorph\\\\n\\\\t\\\\t\\\\tnativitySelector: #previousPageButton.},\\\\n\\\\n\\\\t(Flaps quadsDefiningToolsFlap collect:\\\\n\\\\t\\\\t[:aQuad | DescriptionForPartsBin fromQuad: aQuad categoryList: #(Tools)])! !\\\\n\\\\n\\\\n\\\\n!Morph class methodsFor: '*flexibleVocabularies-flexibleVocabularies' stamp: 'al 11/28/2005 16:46'!\\\\nnoteAddedSelector: aSelector meta: isMeta\\\\n\\\\t\\\\\\\"Any change to an additionsToViewer... method can invalidate existing etoy vocabularies.\\\\n\\\\tThe #respondsTo: test is to allow loading the FlexibleVocabularies change set without having to worry about method ordering.\\\\\\\"\\\\n\\\\t(isMeta\\\\n\\\\t\\\\t\\\\tand: [(aSelector beginsWith: 'additionsToViewer')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [self respondsTo: #hasAdditionsToViewerCategories]])\\\\n\\\\t\\\\tifTrue: [Vocabulary changeMadeToViewerAdditions].\\\\n\\\\tsuper noteCompilationOf: aSelector meta: isMeta! !\\\\n\\\\n!Morph class methodsFor: '*flexibleVocabularies-flexibleVocabularies' stamp: 'NS 4/15/2004 12:40'!\\\\nnoteCompilationOf: aSelector meta: isMeta\\\\n\\\\t\\\\\\\"This method does nothing and should be removed!!\\\\\\\"\\\\n\\\\n\\\\t^ super noteCompilationOf: aSelector meta: isMeta! !\\\\nRectangleMorph subclass: #MorphExample\\\\n\\\\tinstanceVariableNames: 'phase ball star'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-Demo'!\\\\n!MorphExample commentStamp: 'kfr 10/26/2003 18:38' prior: 0!\\\\nThis is a example of how to use a morph. It consists of only two \\\\nmethods, initialize and step.\\\\n\\\\nDoIt:\\\\nMorphExample new openInWorld.\\\\n\\\\n\\\\n\\\\n!\\\\n\\\\n\\\\n!MorphExample methodsFor: 'initialization' stamp: 'dgd 2/21/2003 19:59'!\\\\ninitialize\\\\n\\\\t\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\tphase _ 1.\\\\n\\\\tself extent: 200 @ 200.\\\\n\\\\tball _ EllipseMorph new extent: 30 @ 30.\\\\n\\\\tself\\\\n\\\\t\\\\taddMorph: ((star _ StarMorph new extent: 150 @ 150) center: self center)! !\\\\n\\\\n\\\\n!MorphExample methodsFor: 'stepping and presenter' stamp: 'kfr 10/26/2003 18:33'!\\\\nstep\\\\n\\\\tphase _ phase\\\\\\\\\\\\\\\\8 + 1.\\\\n\\\\tphase = 1 ifTrue: [^ ball delete].\\\\n\\\\tphase < 4 ifTrue:[^self].\\\\n\\\\tphase = 4 ifTrue: [self addMorph: ball].\\\\n\\\\tball align: ball center with: (star vertices at: (phase-3*2)).! !\\\\nObject subclass: #MorphExtension\\\\n\\\\tinstanceVariableNames: 'locked visible sticky balloonText balloonTextSelector externalName isPartsDonor actorState player eventHandler otherProperties'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Kernel'!\\\\n!MorphExtension commentStamp: '<historical>' prior: 0!\\\\nMorphExtension provides access to extra instance state that is not required in most simple morphs.  This allows simple morphs to remain relatively lightweight while still admitting more complex structures as necessary.  The otherProperties field takes this policy to the extreme of allowing any number of additional named attributes, albeit at a certain cost in speed and space.!\\\\n\\\\n\\\\n!MorphExtension methodsFor: 'accessing' stamp: 'di 8/10/1998 12:52'!\\\\nballoonText\\\\n\\\\t^ balloonText! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing' stamp: 'di 8/10/1998 12:52'!\\\\nballoonTextSelector\\\\n\\\\t^ balloonTextSelector! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing' stamp: 'dgd 2/16/2003 21:51'!\\\\nballoonTextSelector: aSymbol \\\\n\\\\t\\\\\\\"change the receiver's balloonTextSelector\\\\\\\"\\\\n\\\\tballoonTextSelector _ aSymbol! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing' stamp: 'di 8/10/1998 12:55'!\\\\nballoonText: newValue\\\\n\\\\tballoonText _ newValue! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing' stamp: 'dgd 2/16/2003 21:51'!\\\\neventHandler\\\\n\\\\t\\\\\\\"answer the receiver's eventHandler\\\\\\\"\\\\n\\\\t^ eventHandler ! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing' stamp: 'di 8/10/1998 12:56'!\\\\neventHandler: newValue\\\\n\\\\teventHandler _ newValue! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing' stamp: 'dgd 2/16/2003 21:57'!\\\\nexternalName: aString \\\\n\\\\t\\\\\\\"change the receiver's externalName\\\\\\\"\\\\n\\\\texternalName _ aString! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing' stamp: 'dgd 2/16/2003 21:38'!\\\\nlocked\\\\n\\\\t\\\\\\\"answer whether the receiver is Locked\\\\\\\"\\\\n\\\\t^ locked! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing' stamp: 'dgd 2/16/2003 21:48'!\\\\nlocked: aBoolean \\\\n\\\\t\\\\\\\"change the receiver's locked property\\\\\\\"\\\\n\\\\tlocked _ aBoolean! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing' stamp: 'di 8/14/1998 13:07'!\\\\nsticky\\\\n\\\\t^ sticky! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing' stamp: 'dgd 2/16/2003 21:47'!\\\\nsticky: aBoolean \\\\n\\\\t\\\\\\\"change the receiver's sticky property\\\\\\\"\\\\n\\\\tsticky _ aBoolean! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing' stamp: 'dgd 2/16/2003 21:41'!\\\\nvisible\\\\n\\\\t\\\\\\\"answer whether the receiver is visible\\\\\\\"\\\\n\\\\t^ visible! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing' stamp: 'di 8/10/1998 12:55'!\\\\nvisible: newValue\\\\n\\\\tvisible _ newValue! !\\\\n\\\\n\\\\n!MorphExtension methodsFor: 'accessing - layout properties' stamp: 'ar 11/14/2000 17:17'!\\\\nlayoutFrame\\\\n\\\\t^self valueOfProperty: #layoutFrame ifAbsent:[nil]! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - layout properties' stamp: 'dgd 2/22/2003 13:32'!\\\\nlayoutFrame: aLayoutFrame \\\\n\\\\taLayoutFrame isNil\\\\n\\\\t\\\\tifTrue: [self removeProperty: #layoutFrame]\\\\n\\\\t\\\\tifFalse: [self setProperty: #layoutFrame toValue: aLayoutFrame]! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - layout properties' stamp: 'ar 11/14/2000 17:17'!\\\\nlayoutPolicy\\\\n\\\\t^self valueOfProperty: #layoutPolicy ifAbsent:[nil]! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - layout properties' stamp: 'dgd 2/22/2003 13:32'!\\\\nlayoutPolicy: aLayoutPolicy \\\\n\\\\taLayoutPolicy isNil\\\\n\\\\t\\\\tifTrue: [self removeProperty: #layoutPolicy]\\\\n\\\\t\\\\tifFalse: [self setProperty: #layoutPolicy toValue: aLayoutPolicy]! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - layout properties' stamp: 'ar 11/14/2000 17:18'!\\\\nlayoutProperties\\\\n\\\\t^self valueOfProperty: #layoutProperties ifAbsent:[nil]! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - layout properties' stamp: 'dgd 2/22/2003 13:32'!\\\\nlayoutProperties: newProperties \\\\n\\\\t\\\\\\\"Return the current layout properties associated with the receiver\\\\\\\"\\\\n\\\\n\\\\tnewProperties isNil\\\\n\\\\t\\\\tifTrue: [self removeProperty: #layoutProperties]\\\\n\\\\t\\\\tifFalse: [self setProperty: #layoutProperties toValue: newProperties]! !\\\\n\\\\n\\\\n!MorphExtension methodsFor: 'accessing - other properties' stamp: 'md 2/27/2006 08:41'!\\\\nassureOtherProperties\\\\n\\\\t\\\\\\\"creates an otherProperties for the receiver if needed\\\\\\\"\\\\n\\\\totherProperties ifNil: [self initializeOtherProperties].\\\\n\\\\t^ otherProperties! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - other properties' stamp: 'md 2/27/2006 08:36'!\\\\nhasOtherProperties\\\\n\\\\t\\\\\\\"answer whether the receiver has otherProperties\\\\\\\"\\\\n\\\\t^ otherProperties notNil! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - other properties' stamp: 'md 2/27/2006 08:42'!\\\\nhasProperty: aSymbol \\\\n\\\\t\\\\\\\"Answer whether the receiver has the property named aSymbol\\\\\\\"\\\\n\\\\t| property |\\\\n\\\\totherProperties ifNil: [^ false].\\\\n\\\\tproperty := otherProperties at: aSymbol ifAbsent: [].\\\\n\\\\tproperty isNil ifTrue: [^ false].\\\\n\\\\tproperty == false ifTrue: [^ false].\\\\n\\\\t^ true! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - other properties' stamp: 'md 2/27/2006 08:36'!\\\\ninitializeOtherProperties\\\\n\\\\t\\\\\\\"private - initializes the receiver's otherProperties\\\\\\\"\\\\n\\\\totherProperties :=  IdentityDictionary new! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - other properties' stamp: 'dgd 2/16/2003 21:04'!\\\\notherProperties\\\\n\\\\t\\\\\\\"answer the receiver's otherProperties\\\\\\\"\\\\n\\\\t^ otherProperties! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - other properties' stamp: 'dgd 2/16/2003 21:20'!\\\\nprivateOtherProperties: anIndentityDictionary \\\\n\\\\t\\\\\\\"private - change the receiver's otherProperties\\\\\\\"\\\\n\\\\totherProperties _ anIndentityDictionary ! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - other properties' stamp: 'md 2/27/2006 08:37'!\\\\nremoveOtherProperties\\\\n\\\\t\\\\\\\"Remove the 'other' properties\\\\\\\"\\\\n\\\\totherProperties := nil! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - other properties' stamp: 'md 2/27/2006 08:43'!\\\\nremoveProperty: aSymbol \\\\n\\\\t\\\\\\\"removes the property named aSymbol if it exists\\\\\\\"\\\\n\\\\totherProperties ifNil: [^ self].\\\\n\\\\totherProperties removeKey: aSymbol ifAbsent: [].\\\\n\\\\totherProperties isEmpty ifTrue: [self removeOtherProperties]! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - other properties' stamp: 'dgd 2/16/2003 21:49'!\\\\nsetProperty: aSymbol toValue: abObject \\\\n\\\\t\\\\\\\"change the receiver's property named aSymbol to anObject\\\\\\\"\\\\n\\\\tself assureOtherProperties at: aSymbol put: abObject! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - other properties' stamp: 'md 2/27/2006 08:45'!\\\\nsortedPropertyNames\\\\n\\\\t\\\\\\\"answer the receiver's property names in a sorted way\\\\\\\"\\\\n\\\\n\\\\t| props |\\\\n\\\\tprops := WriteStream on: (Array new: 10).\\\\n\\\\tlocked == true ifTrue: [props nextPut: #locked].\\\\n\\\\tvisible == false ifTrue: [props nextPut: #visible].\\\\n\\\\tsticky == true ifTrue: [props nextPut: #sticky].\\\\n\\\\tballoonText isNil ifFalse: [props nextPut: #balloonText].\\\\n\\\\tballoonTextSelector isNil ifFalse: [props nextPut: #balloonTextSelector].\\\\n\\\\texternalName isNil ifFalse: [props nextPut: #externalName].\\\\n\\\\tisPartsDonor == true ifTrue: [props nextPut: #isPartsDonor].\\\\n\\\\tactorState isNil ifFalse: [props nextPut: #actorState].\\\\n\\\\tplayer isNil ifFalse: [props nextPut: #player].\\\\n\\\\teventHandler isNil ifFalse: [props nextPut: #eventHandler].\\\\n\\\\t otherProperties ifNotNil: [otherProperties associationsDo: [:a | props nextPut: a key]].\\\\n\\\\t^props contents sort: [:s1 :s2 | s1 <= s2]! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - other properties' stamp: 'dgd 2/16/2003 21:00'!\\\\nvalueOfProperty: aSymbol \\\\n\\\\\\\"answer the value of the receiver's property named aSymbol\\\\\\\"\\\\n\\\\t^ self\\\\n\\\\t\\\\tvalueOfProperty: aSymbol\\\\n\\\\t\\\\tifAbsent: []! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - other properties' stamp: 'dgd 2/16/2003 21:28'!\\\\nvalueOfProperty: aSymbol ifAbsentPut: aBlock \\\\n\\\\t\\\\\\\"If the receiver possesses a property of the given name, answer  \\\\n\\\\tits value. If not, then create a property of the given name, give \\\\n\\\\tit the value obtained by evaluating aBlock, then answer that  \\\\n\\\\tvalue\\\\\\\"\\\\n\\\\t^self assureOtherProperties at: aSymbol ifAbsentPut: aBlock! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - other properties' stamp: 'md 2/27/2006 08:43'!\\\\nvalueOfProperty: aSymbol ifAbsent: aBlock \\\\n\\\\t\\\\\\\"if the receiver possesses a property of the given name, answer  \\\\n\\\\tits value. If not then evaluate aBlock and answer the result of  \\\\n\\\\tthis block evaluation\\\\\\\"\\\\n\\\\totherProperties ifNil: [^ aBlock value].\\\\n\\\\t^ otherProperties at: aSymbol ifAbsent: [^ aBlock value]! !\\\\n\\\\n\\\\n!MorphExtension methodsFor: 'connectors-copying' stamp: 'nk 5/1/2004 17:20'!\\\\ncopyWeakly\\\\n\\\\t\\\\\\\"list of names of properties whose values should be weak-copied when veryDeepCopying a morph.  See DeepCopier.\\\\\\\"\\\\n\\\\n\\\\t^ #(formerOwner newPermanentPlayer logger graphModel gestureDictionaryOrName)\\\\n\\\\t\\\\\\\"add yours to this list\\\\\\\" \\\\n\\\\n\\\\t\\\\\\\"formerOwner should really be nil at the time of the copy, but this will work just fine.\\\\\\\"! !\\\\n\\\\n!MorphExtension methodsFor: 'connectors-copying' stamp: 'nk 5/1/2004 17:23'!\\\\npropertyNamesNotCopied\\\\n\\\\t\\\\\\\"list of names of properties whose values should be deleted when veryDeepCopying a morph.\\\\n\\\\tSee DeepCopier.\\\\\\\"\\\\n\\\\n\\\\t^ #(connectedConstraints connectionHighlights highlightedTargets)\\\\n\\\\t\\\\\\\"add yours to this list\\\\\\\" \\\\n! !\\\\n\\\\n!MorphExtension methodsFor: 'connectors-copying' stamp: 'nk 5/1/2004 17:39'!\\\\nveryDeepFixupWith: deepCopier \\\\n\\\\t\\\\\\\"If target and arguments fields were weakly copied, fix them here.\\\\n\\\\tIf they were in the tree being copied, fix them up, otherwise point to the originals!!!!\\\\\\\"\\\\n\\\\n\\\\tsuper veryDeepFixupWith: deepCopier.\\\\n\\\\totherProperties ifNil: [ ^self ].\\\\n\\\\n\\\\t\\\\\\\"Properties whose values are only copied weakly replace those values if they were copied via another path\\\\\\\"\\\\n\\\\tself copyWeakly do: [ :propertyName |\\\\n\\\\t\\\\totherProperties at: propertyName ifPresent: [ :property |\\\\n\\\\t\\\\t\\\\totherProperties at: propertyName\\\\n\\\\t\\\\t\\\\t\\\\tput: (deepCopier references at: property ifAbsent: [ property ])]].\\\\n! !\\\\n\\\\n!MorphExtension methodsFor: 'connectors-copying' stamp: 'nk 5/1/2004 17:45'!\\\\nveryDeepInner: deepCopier \\\\n\\\\t\\\\\\\"Copy all of my instance variables.\\\\n\\\\tSome otherProperties need to be not copied at all, but shared. Their names are given by copyWeakly.\\\\n\\\\tSome otherProperties should not be copied or shared. Their names are given by propertyNamesNotCopied.\\\\n\\\\tThis is special code for the dictionary. See DeepCopier, and veryDeepFixupWith:.\\\\\\\"\\\\n\\\\n\\\\t| namesOfWeaklyCopiedProperties weaklyCopiedValues |\\\\n\\\\tsuper veryDeepInner: deepCopier.\\\\n\\\\tlocked _ locked veryDeepCopyWith: deepCopier.\\\\n\\\\tvisible _ visible veryDeepCopyWith: deepCopier.\\\\n\\\\tsticky _ sticky veryDeepCopyWith: deepCopier.\\\\n\\\\tballoonText _ balloonText veryDeepCopyWith: deepCopier.\\\\n\\\\tballoonTextSelector _ balloonTextSelector veryDeepCopyWith: deepCopier.\\\\n\\\\texternalName _ externalName veryDeepCopyWith: deepCopier.\\\\n\\\\tisPartsDonor _ isPartsDonor veryDeepCopyWith: deepCopier.\\\\n\\\\tactorState _ actorState veryDeepCopyWith: deepCopier.\\\\n\\\\tplayer _ player veryDeepCopyWith: deepCopier.\\\\t\\\\t\\\\\\\"Do copy the player of this morph\\\\\\\"\\\\n\\\\teventHandler _ eventHandler veryDeepCopyWith: deepCopier. \\\\t\\\\\\\"has its own restrictions\\\\\\\"\\\\n\\\\n\\\\totherProperties ifNil: [ ^self ].\\\\n\\\\n\\\\totherProperties := otherProperties copy.\\\\n\\\\tself propertyNamesNotCopied do: [ :propName | otherProperties removeKey: propName ifAbsent: [] ].\\\\n\\\\n\\\\tnamesOfWeaklyCopiedProperties _ self copyWeakly.\\\\n\\\\tweaklyCopiedValues _ namesOfWeaklyCopiedProperties collect: [  :propName | otherProperties removeKey: propName ifAbsent: [] ].\\\\n\\\\n\\\\t\\\\\\\"Now copy all the others.\\\\\\\"\\\\n\\\\totherProperties := otherProperties veryDeepCopyWith: deepCopier.\\\\n\\\\n\\\\t\\\\\\\"And replace the weak ones.\\\\\\\"\\\\n\\\\tnamesOfWeaklyCopiedProperties with: weaklyCopiedValues do: [ :name :value | value ifNotNil: [ otherProperties at: name put: value ]].\\\\n! !\\\\n\\\\n\\\\n!MorphExtension methodsFor: 'initialization' stamp: 'di 8/16/1998 12:02'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Init all booleans to default values\\\\\\\"\\\\n\\\\tlocked _ false.\\\\n\\\\tvisible _ true.\\\\n\\\\tsticky _ false.\\\\n\\\\tisPartsDonor _ false.\\\\n! !\\\\n\\\\n\\\\n!MorphExtension methodsFor: 'object fileIn' stamp: 'dgd 2/16/2003 21:06'!\\\\nconvertProperty: aSymbol toValue: anObject \\\\n\\\\t\\\\\\\"These special cases move old properties into named fields of the \\\\n\\\\textension\\\\\\\"\\\\n\\\\taSymbol == #locked\\\\n\\\\t\\\\tifTrue: [^ locked _ anObject].\\\\n\\\\taSymbol == #visible\\\\n\\\\t\\\\tifTrue: [^ visible _ anObject].\\\\n\\\\taSymbol == #sticky\\\\n\\\\t\\\\tifTrue: [^ sticky _ anObject].\\\\n\\\\taSymbol == #balloonText\\\\n\\\\t\\\\tifTrue: [^ balloonText _ anObject].\\\\n\\\\taSymbol == #balloonTextSelector\\\\n\\\\t\\\\tifTrue: [^ balloonTextSelector _ anObject].\\\\n\\\\taSymbol == #actorState\\\\n\\\\t\\\\tifTrue: [^ actorState _ anObject].\\\\n\\\\taSymbol == #player\\\\n\\\\t\\\\tifTrue: [^ player _ anObject].\\\\n\\\\taSymbol == #name\\\\n\\\\t\\\\tifTrue: [^ externalName _ anObject].\\\\n\\\\t\\\\\\\"*renamed*\\\\\\\"\\\\n\\\\taSymbol == #partsDonor\\\\n\\\\t\\\\tifTrue: [^ isPartsDonor _ anObject].\\\\n\\\\t\\\\\\\"*renamed*\\\\\\\"\\\\n\\\\tself assureOtherProperties at: aSymbol put: anObject! !\\\\n\\\\n\\\\n!MorphExtension methodsFor: 'objects from disk' stamp: 'tk 4/8/1999 12:45'!\\\\ncomeFullyUpOnReload: smartRefStream\\\\n\\\\t\\\\\\\"inst vars have default booplean values.\\\\\\\"\\\\n\\\\n\\\\tlocked ifNil: [locked _ false].\\\\n\\\\tvisible ifNil: [visible _ true].\\\\n\\\\tsticky ifNil: [sticky _ false].\\\\n\\\\tisPartsDonor ifNil: [isPartsDonor _ false].\\\\n\\\\t^ self! !\\\\n\\\\n\\\\n!MorphExtension methodsFor: 'other' stamp: 'md 2/27/2006 08:39'!\\\\ninspectElement\\\\n\\\\t\\\\\\\"Create and schedule an Inspector on the otherProperties and the \\\\n\\\\tnamed properties.\\\\\\\"\\\\n\\\\t| key obj |\\\\n\\\\tkey _ (SelectionMenu selections: self sortedPropertyNames)\\\\n\\\\t\\\\t\\\\t\\\\tstartUpWithCaption: 'Inspect which property?'.\\\\n\\\\tkey\\\\n\\\\t\\\\tifNil: [^ self].\\\\n\\\\tobj _ otherProperties\\\\n\\\\t\\\\t\\\\t\\\\tat: key\\\\n\\\\t\\\\t\\\\t\\\\tifAbsent: ['nOT a vALuE'].\\\\n\\\\tobj = 'nOT a vALuE'\\\\n\\\\t\\\\tifTrue: [(self perform: key) inspect\\\\n\\\\t\\\\t\\\\t\\\\\\\"named properties\\\\\\\"]\\\\n\\\\t\\\\tifFalse: [obj inspect]! !\\\\n\\\\n!MorphExtension methodsFor: 'other' stamp: 'md 2/27/2006 08:42'!\\\\nisDefault\\\\n\\\\t\\\\\\\"Return true if the receiver is a default and can be omitted\\\\\\\"\\\\n\\\\tlocked == true\\\\n\\\\t\\\\tifTrue: [^ false].\\\\n\\\\tvisible == false\\\\n\\\\t\\\\tifTrue: [^ false].\\\\n\\\\tsticky == true\\\\n\\\\t\\\\tifTrue: [^ false].\\\\n\\\\tballoonText isNil\\\\n\\\\t\\\\tifFalse: [^ false].\\\\n\\\\tballoonTextSelector isNil\\\\n\\\\t\\\\tifFalse: [^ false].\\\\n\\\\texternalName isNil\\\\n\\\\t\\\\tifFalse: [^ false].\\\\n\\\\tisPartsDonor == true\\\\n\\\\t\\\\tifTrue: [^ false].\\\\n\\\\tactorState isNil\\\\n\\\\t\\\\tifFalse: [^ false].\\\\n\\\\tplayer isNil\\\\n\\\\t\\\\tifFalse: [^ false].\\\\n\\\\teventHandler isNil\\\\n\\\\t\\\\tifFalse: [^ false].\\\\n\\\\totherProperties ifNotNil: [otherProperties isEmpty ifFalse: [^ false]].\\\\n\\\\t^ true! !\\\\n\\\\n\\\\n!MorphExtension methodsFor: 'printing' stamp: 'md 2/27/2006 08:45'!\\\\nprintOn: aStream \\\\n\\\\t\\\\\\\"Append to the argument, aStream, a sequence of characters that \\\\n\\\\tidentifies the receiver.\\\\\\\" \\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream nextPutAll: ' ' , self identityHashPrintString.\\\\n\\\\tlocked == true\\\\n\\\\t\\\\tifTrue: [aStream nextPutAll: ' [locked] '].\\\\n\\\\tvisible == false\\\\n\\\\t\\\\tifTrue: [aStream nextPutAll: '[not visible] '].\\\\n\\\\tsticky == true\\\\n\\\\t\\\\tifTrue: [aStream nextPutAll: ' [sticky] '].\\\\n\\\\tballoonText\\\\n\\\\t\\\\tifNotNil: [aStream nextPutAll: ' [balloonText] '].\\\\n\\\\tballoonTextSelector\\\\n\\\\t\\\\tifNotNil: [aStream nextPutAll: ' [balloonTextSelector: ' , balloonTextSelector printString , '] '].\\\\n\\\\texternalName\\\\n\\\\t\\\\tifNotNil: [aStream nextPutAll: ' [externalName = ' , externalName , ' ] '].\\\\n\\\\tisPartsDonor == true\\\\n\\\\t\\\\tifTrue: [aStream nextPutAll: ' [isPartsDonor] '].\\\\n\\\\tplayer\\\\n\\\\t\\\\tifNotNil: [aStream nextPutAll: ' [player = ' , player printString , '] '].\\\\n\\\\teventHandler\\\\n\\\\t\\\\tifNotNil: [aStream nextPutAll: ' [eventHandler = ' , eventHandler printString , '] '].\\\\n\\\\t(otherProperties isNil or: [otherProperties isEmpty ]) ifTrue: [^ self].\\\\n\\\\taStream nextPutAll: ' [other: '.\\\\n\\\\tself otherProperties\\\\n\\\\t\\\\tkeysDo: [:aKey | aStream nextPutAll: ' (' , aKey , ' -> ' , (self otherProperties at: aKey) printString , ')'].\\\\n\\\\taStream nextPut: $]! !\\\\n\\\\n\\\\n!MorphExtension methodsFor: 'viewer' stamp: 'di 8/10/1998 14:47'!\\\\nexternalName\\\\n\\\\t^ externalName! !\\\\n\\\\n\\\\n!MorphExtension methodsFor: '*eToys-accessing' stamp: 'dgd 2/16/2003 21:56'!\\\\nactorState\\\\n\\\\t\\\\\\\"answer the redeiver's actorState\\\\\\\"\\\\n\\\\t^ actorState ! !\\\\n\\\\n!MorphExtension methodsFor: '*eToys-accessing' stamp: 'dgd 2/16/2003 21:53'!\\\\nactorState: anActorState \\\\n\\\\\\\"change the receiver's actorState\\\\\\\"\\\\n\\\\tactorState _ anActorState! !\\\\n\\\\n!MorphExtension methodsFor: '*eToys-accessing' stamp: 'dgd 2/16/2003 21:42'!\\\\nplayer\\\\n\\\\t\\\\\\\"answer the receiver's player\\\\\\\"\\\\n\\\\t^ player! !\\\\n\\\\n!MorphExtension methodsFor: '*eToys-accessing' stamp: 'dgd 2/16/2003 21:53'!\\\\nplayer: anObject \\\\n\\\\t\\\\\\\"change the receiver's player\\\\\\\"\\\\n\\\\tplayer _ anObject ! !\\\\n\\\\n\\\\n!MorphExtension methodsFor: '*MorphicExtras-accessing' stamp: 'dgd 2/16/2003 21:37'!\\\\nisPartsDonor\\\\n\\\\t\\\\\\\"answer whether the receiver is PartsDonor\\\\\\\"\\\\n\\\\t^ isPartsDonor! !\\\\n\\\\n!MorphExtension methodsFor: '*MorphicExtras-accessing' stamp: 'dgd 2/16/2003 21:40'!\\\\nisPartsDonor: aBoolean \\\\n\\\\t\\\\\\\"change the receiver's isPartDonor property\\\\\\\"\\\\n\\\\tisPartsDonor _ aBoolean! !\\\\n\\\\n\\\\n!MorphExtension methodsFor: '*MorphicExtras-copying' stamp: 'md 2/27/2006 08:44'!\\\\nupdateReferencesUsing: aDictionary \\\\n\\\\t\\\\\\\"Update intra-morph references within a composite morph that  \\\\n\\\\thas been copied. For example, if a button refers to morph X in  \\\\n\\\\tthe orginal  \\\\n\\\\tcomposite then the copy of that button in the new composite  \\\\n\\\\tshould refer to  \\\\n\\\\tthe copy of X in new composite, not the original X. This default  \\\\n\\\\timplementation updates the contents of any morph-bearing slot.\\\\\\\"\\\\n\\\\n\\\\t| old |\\\\n\\\\teventHandler isNil \\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[self eventHandler: self eventHandler copy.\\\\n\\\\t\\\\t\\\\t1 to: self eventHandler class instSize\\\\n\\\\t\\\\t\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:i | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\told := eventHandler instVarAt: i.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\told isMorph \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [eventHandler instVarAt: i put: (aDictionary at: old ifAbsent: [old])]]].\\\\n\\\\totherProperties ifNotNil: [otherProperties associationsDo:  [:assn | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tassn value: (aDictionary at: assn value ifAbsent: [assn value])]]! !\\\\nObject subclass: #MorphHierarchy\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Widgets'!\\\\n\\\\n!MorphHierarchy methodsFor: 'private' stamp: 'dgd 9/26/2004 18:28'!\\\\nasMorph\\\\n\\\\t\\\\\\\"Answer the morph version of the receiver\\\\\\\"\\\\n\\\\t| morph |\\\\n\\\\tmorph := MorphHierarchyListMorph\\\\n\\\\t\\\\t\\\\t\\\\ton: self\\\\n\\\\t\\\\t\\\\t\\\\tlist: #roots\\\\n\\\\t\\\\t\\\\t\\\\tselected: nil\\\\n\\\\t\\\\t\\\\t\\\\tchangeSelected: #selected:.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t^ morph inAContainer! !\\\\n\\\\n\\\\n!MorphHierarchy methodsFor: 'accessing' stamp: 'dgd 9/26/2004 18:29'!\\\\nroots\\\\n\\\\t\\\\\\\"Answer the roots for the Object Hierarchy, that means answer the World\\\\\\\"\\\\n\\\\t^ {MorphListItemWrapper with: World}! !\\\\n\\\\n!MorphHierarchy methodsFor: 'accessing' stamp: 'dgd 9/26/2004 18:30'!\\\\nselected: aMorphListItemWrapper \\\\n\\\\t\\\\\\\"Change the selected object\\\\\\\"\\\\n\\\\t| newSelection |\\\\n\\\\taMorphListItemWrapper isNil\\\\n\\\\t\\\\tifTrue: [^ self].\\\\n\\\\tnewSelection := aMorphListItemWrapper withoutListWrapper.\\\\n\\\\tnewSelection == World selectedObject\\\\n\\\\t\\\\tifTrue: [newSelection removeHalo]\\\\n\\\\t\\\\tifFalse: [newSelection addHalo].\\\\n\\\\tself changed: #selected! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMorphHierarchy class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MorphHierarchy class methodsFor: 'opening' stamp: 'dgd 9/25/2004 21:50'!\\\\nopenOrDelete\\\\n\\\\t| oldMorph |\\\\n\\\\toldMorph := World submorphs\\\\n\\\\t\\\\t\\\\t\\\\tdetect: [:each | each hasProperty: #morphHierarchy]\\\\n\\\\t\\\\t\\\\t\\\\tifNone: [| newMorph | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnewMorph := self new asMorph.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnewMorph bottomLeft: ActiveHand position.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnewMorph openInWorld.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnewMorph isFullOnScreen\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [newMorph goHome].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ self].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\toldMorph delete! !\\\\nSimpleHierarchicalListMorph subclass: #MorphHierarchyListMorph\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Widgets'!\\\\n\\\\n!MorphHierarchyListMorph methodsFor: 'private' stamp: 'dgd 9/26/2004 18:57'!\\\\ncreateContainer\\\\n\\\\t\\\\\\\"Private - Create a container\\\\\\\"\\\\n\\\\t| container |\\\\n\\\\tcontainer := BorderedMorph new.\\\\n\\\\tcontainer extent: (World extent * (1 / 4 @ (2 / 3))) rounded.\\\\n\\\\tcontainer layoutPolicy: TableLayout new.\\\\n\\\\tcontainer hResizing: #rigid.\\\\n\\\\tcontainer vResizing: #rigid.\\\\n\\\\tcontainer\\\\n\\\\t\\\\tsetColor: Preferences menuColor\\\\n\\\\t\\\\tborderWidth: Preferences menuBorderWidth\\\\n\\\\t\\\\tborderColor: Preferences menuBorderColor.\\\\n\\\\tcontainer layoutInset: 0.\\\\n\\\\t\\\\\\\"container useRoundedCorners.\\\\\\\"\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tcontainer setProperty: #morphHierarchy toValue: true.\\\\n\\\\tcontainer setNameTo: 'Objects Hierarchy' translated.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t^ container! !\\\\n\\\\n!MorphHierarchyListMorph methodsFor: 'private' stamp: 'dgd 9/26/2004 18:27'!\\\\ninAContainer\\\\n\\\\t\\\\\\\"Answer the receiver contained in a proper container\\\\\\\"\\\\n\\\\t| container |\\\\n\\\\tcontainer := self createContainer.\\\\n\\\\tcontainer addMorphBack: self.\\\\n\\\\t\\\\\\\" \\\\n\\\\tnasty hack to force the scroolbar recreation\\\\\\\"\\\\n\\\\tself extent: container extent - container borderWidth.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t^ container! !\\\\n\\\\n\\\\n!MorphHierarchyListMorph methodsFor: 'initialization' stamp: 'dgd 9/26/2004 18:18'!\\\\non: anObject list: getListSel selected: getSelectionSel changeSelected: setSelectionSel menu: getMenuSel keystroke: keyActionSel \\\\n\\\\tsuper\\\\n\\\\t\\\\ton: anObject\\\\n\\\\t\\\\tlist: getListSel\\\\n\\\\t\\\\tselected: getSelectionSel\\\\n\\\\t\\\\tchangeSelected: setSelectionSel\\\\n\\\\t\\\\tmenu: getMenuSel\\\\n\\\\t\\\\tkeystroke: keyActionSel.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tself borderWidth: 0.\\\\n\\\\tself autoDeselect: false.\\\\n\\\\tself enableDrag: false.\\\\n\\\\tself enableDrop: true.\\\\n\\\\tself hResizing: #spaceFill.\\\\n\\\\tself vResizing: #spaceFill.\\\\nself expandRoots! !\\\\n\\\\n\\\\n!MorphHierarchyListMorph methodsFor: 'selection' stamp: 'dgd 9/25/2004 21:28'!\\\\nsetSelectedMorph: aMorph \\\\n\\\\tsuper setSelectedMorph: aMorph.\\\\nself owner isNil ifFalse:[self owner delete]! !\\\\nListItemWrapper subclass: #MorphListItemWrapper\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Widgets'!\\\\n\\\\n!MorphListItemWrapper methodsFor: 'converting' stamp: 'dgd 9/26/2004 18:26'!\\\\nasString\\\\n\\\\t\\\\\\\"Answer the string representation of the receiver\\\\\\\"\\\\n\\\\t^ item externalName! !\\\\n\\\\n\\\\n!MorphListItemWrapper methodsFor: 'accessing' stamp: 'dgd 1/7/2005 20:01'!\\\\ncontents\\\\n\\\\t\\\\\\\"Answer the receiver's contents\\\\\\\"\\\\n\\\\n\\\\t| tentative submorphs |\\\\n\\\\ttentative := item submorphs\\\\n\\\\t\\\\t\\\\t\\\\tcollect: [:each | each renderedMorph].\\\\n\\\\n\\\\tsubmorphs := Preferences noviceMode\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttentative\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\treject: [:each | \\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\teach isSystemWindow\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tor: [each isDockingBar]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tor: [each isKindOf: HaloMorph]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tor: [each hasProperty: #morphHierarchy]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tor: [each isFlapOrTab]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tor: [each isObjectsTool]]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttentative\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\treject: [:each | each isKindOf: HaloMorph]].\\\\n\\\\n\\\\t^ submorphs\\\\n\\\\t\\\\tcollect: [:each | self class with: each]! !\\\\n\\\\n!MorphListItemWrapper methodsFor: 'accessing' stamp: 'dgd 7/28/2005 13:03'!\\\\nicon\\\\n\\\\t\\\\\\\"Answer a form to be used as icon\\\\\\\"\\\\n\\\\t^ item iconOrThumbnailOfSize: ((Preferences tinyDisplay ifTrue: [16] ifFalse: [28]))! !\\\\nObjectOut subclass: #MorphObjectOut\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-SqueakPage'!\\\\n\\\\n!MorphObjectOut methodsFor: 'as yet unclassified' stamp: 'tk 4/6/1999 10:00'!\\\\ndoesNotUnderstand: aMessage \\\\n\\\\t\\\\\\\"Bring in the object, install, then resend aMessage\\\\\\\"\\\\n\\\\t| aMorph myUrl oldFlag response |\\\\n\\\\t\\\\\\\"Transcript show: thisContext sender selector; cr.\\\\\\\" \\\\\\\"useful for debugging\\\\\\\"\\\\n\\\\toldFlag _ recursionFlag.\\\\n\\\\trecursionFlag _ true.\\\\n\\\\tmyUrl _ url.\\\\t\\\\\\\"can't use inst vars after become\\\\\\\"\\\\n\\\\t\\\\\\\"fetch the object\\\\\\\"\\\\n\\\\taMorph _ self xxxFetch.\\\\t\\\\t\\\\\\\"watch out for the become!!\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\\\\"Now we ARE a MORPH\\\\\\\"\\\\n\\\\toldFlag == true ifTrue: [\\\\n\\\\t\\\\tresponse _ (PopUpMenu labels: 'proceed normally\\\\\\\\debug' withCRs)\\\\n\\\\t\\\\t\\\\tstartUpWithCaption: 'Object being fetched for a second time.\\\\nShould not happen, and needs to be fixed later.'.\\\\n\\\\t\\\\tresponse = 2 ifTrue: [self halt]].\\\\t\\\\\\\"We are already the new object\\\\\\\"\\\\n\\\\n\\\\taMorph setProperty: #SqueakPage toValue: \\\\n\\\\t\\\\t\\\\t(SqueakPageCache pageCache at: myUrl).\\\\n\\\\t\\\\\\\"Can't be a super message, since this is the first message sent to this object\\\\\\\"\\\\n\\\\t^ aMorph perform: aMessage selector withArguments: aMessage arguments\\\\n! !\\\\n\\\\n!MorphObjectOut methodsFor: 'as yet unclassified' stamp: 'tk 10/22/1998 15:43'!\\\\nfullReleaseCachedState\\\\n\\\\t\\\\\\\"do nothing, especially don't bring in my object!!\\\\\\\"! !\\\\n\\\\n!MorphObjectOut methodsFor: 'as yet unclassified' stamp: 'tk 2/24/1999 00:08'!\\\\nsmallThumbnailForPageSorter\\\\n\\\\n\\\\t^ self sqkPage thumbnail! !\\\\n\\\\n!MorphObjectOut methodsFor: 'as yet unclassified' stamp: 'tk 2/24/1999 00:09'!\\\\nthumbnailForPageSorter\\\\n\\\\n\\\\t^ self sqkPage thumbnail! !\\\\nTestCase subclass: #MorphTest\\\\n\\\\tinstanceVariableNames: 'morph world'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicTests-Kernel'!\\\\n!MorphTest commentStamp: '<historical>' prior: 0!\\\\nThis is the unit test for the class Morph. Unit tests are a good way to exercise the functionality of your system in a repeatable and automatic manner. They are therefore recommended if you plan to release anything. For more information, see: \\\\n\\\\t- http://www.c2.com/cgi/wiki?UnitTest\\\\n\\\\t- http://minnow.cc.gatech.edu/squeak/1547\\\\n\\\\t- the sunit class category!\\\\n\\\\n\\\\n!MorphTest methodsFor: 'initialize-release' stamp: 'tak 1/21/2005 11:12'!\\\\ngetWorld\\\\n\\\\t^ world\\\\n\\\\t\\\\tifNil: [world := Project newMorphic world]! !\\\\n\\\\n!MorphTest methodsFor: 'initialize-release' stamp: 'tak 1/21/2005 11:12'!\\\\nsetUp\\\\n\\\\tmorph := Morph new! !\\\\n\\\\n!MorphTest methodsFor: 'initialize-release' stamp: 'tak 1/21/2005 11:12'!\\\\ntearDown\\\\n\\\\tmorph delete.\\\\n\\\\tworld\\\\n\\\\t\\\\tifNotNil: [Project deletingProject: world project]! !\\\\n\\\\n\\\\n!MorphTest methodsFor: 'testing - classification' stamp: 'md 4/16/2003 17:11'!\\\\ntestIsMorph\\\\n\\\\tself assert: (morph isMorph).! !\\\\n\\\\n\\\\n!MorphTest methodsFor: 'testing - etoys' stamp: 'tak 1/21/2005 11:31'!\\\\ntestOverlapAny\\\\n\\\\t\\\\\\\"self debug: #testOverlapAny\\\\\\\"\\\\n\\\\t| p1 p2 |\\\\n\\\\tp1 _ Morph new assuredPlayer.\\\\n\\\\tp2 _ EllipseMorph new assuredPlayer.\\\\n\\\\t\\\\\\\"Same position\\\\\\\"\\\\n\\\\tp1 costume position: 0@0.\\\\n\\\\tp2 costume position: 0@0.\\\\n\\\\tself assert: (p1 overlapsAny: p2).\\\\n\\\\t\\\\\\\"Different position\\\\\\\"\\\\n\\\\tp1 costume position: 0@0.\\\\n\\\\tp2 costume position: 500@0.\\\\n\\\\tself assert: (p1 overlapsAny: p2) not.! !\\\\n\\\\n!MorphTest methodsFor: 'testing - etoys' stamp: 'tak 1/21/2005 11:56'!\\\\ntestOverlapAnyDeletedPlayer\\\\n\\\\t\\\\\\\"self debug: #testOverlapAnyDeletedPlayer\\\\\\\"\\\\n\\\\t| me friend sibling |\\\\n\\\\tme := Morph new assuredPlayer assureUniClass; yourself.\\\\n\\\\tfriend := EllipseMorph new assuredPlayer assureUniClass; yourself.\\\\n\\\\tsibling := friend getNewClone.\\\\n\\\\tsibling costume delete.\\\\n\\\\tself getWorld addMorph: me costume.\\\\n\\\\t\\\\\\\"Same position but deleted\\\\\\\"\\\\n\\\\tme costume position: 0 @ 0.\\\\n\\\\tfriend costume position: 0 @ 0.\\\\n\\\\tsibling costume position: 0 @ 0.\\\\n\\\\tself assert: (me overlapsAny: friend) not.\\\\n\\\\tself assert: (me overlapsAny: sibling) not! !\\\\n\\\\n!MorphTest methodsFor: 'testing - etoys' stamp: 'tak 1/21/2005 11:40'!\\\\ntestOverlapAnyScriptedPlayer\\\\n\\\\t\\\\\\\"self debug: #testOverlapAnyScriptedPlayer\\\\\\\"\\\\n\\\\t| me friend other sibling |\\\\n\\\\tme := Morph new assuredPlayer assureUniClass; yourself.\\\\n\\\\tfriend := EllipseMorph new assuredPlayer assureUniClass; yourself.\\\\n\\\\tsibling := friend getNewClone.\\\\n\\\\tother := EllipseMorph new assuredPlayer assureUniClass; yourself.\\\\n\\\\tself getWorld addMorph: me costume;\\\\n\\\\t\\\\t addMorph: friend costume;\\\\n\\\\t\\\\t addMorph: other costume;\\\\n\\\\t\\\\t addMorph: sibling costume.\\\\n\\\\t\\\\\\\"myself\\\\\\\"\\\\n\\\\tself assert: (me overlapsAny: me) not.\\\\n\\\\t\\\\\\\"Same position with sibling\\\\\\\"\\\\n\\\\tme costume position: 0 @ 0.\\\\n\\\\tfriend costume position: 500 @ 0.\\\\n\\\\tother costume position: 500 @ 0.\\\\n\\\\tsibling costume position: 0@0.\\\\n\\\\tself assert: (me overlapsAny: friend).\\\\n\\\\t\\\\\\\"Different position with sibling but same class\\\\\\\"\\\\n\\\\tme costume position: 0 @ 0.\\\\n\\\\tfriend costume position: 500 @ 0.\\\\n\\\\tsibling costume position: 500@ 0.\\\\n\\\\tother costume position: 0 @ 0.\\\\n\\\\tself assert: (me overlapsAny: friend) not! !\\\\n\\\\n!MorphTest methodsFor: 'testing - etoys' stamp: 'tak 1/21/2005 11:32'!\\\\ntestOverlapAnyUnscriptedPlayer\\\\n\\\\t\\\\\\\"self debug: #testOverlapAnyUnscriptedPlayer\\\\\\\"\\\\n\\\\t| p1 p2 p3 |\\\\n\\\\tp1 := Morph new assuredPlayer.\\\\n\\\\tp2 := EllipseMorph new assuredPlayer.\\\\n\\\\tp3 := EllipseMorph new assuredPlayer.\\\\n\\\\tself getWorld addMorph: p1 costume;\\\\n\\\\t\\\\t addMorph: p2 costume;\\\\n\\\\t\\\\t addMorph: p3 costume.\\\\n\\\\t\\\\\\\"Same class, same position\\\\\\\"\\\\n\\\\tp1 costume position: 0 @ 0.\\\\n\\\\tp2 costume position: 500 @ 0.\\\\n\\\\tp3 costume position: 0 @ 0.\\\\n\\\\tself\\\\n\\\\t\\\\tassert: (p1 overlapsAny: p2).\\\\n\\\\t\\\\\\\"Same class, different position\\\\\\\"\\\\n\\\\tp1 costume position: 0 @ 0.\\\\n\\\\tp2 costume position: 1000 @ 0.\\\\n\\\\tp3 costume position: 500 @ 0.\\\\n\\\\tself assert: (p1 overlapsAny: p2) not.\\\\n! !\\\\n\\\\n\\\\n!MorphTest methodsFor: 'testing - initialization' stamp: 'md 4/16/2003 17:10'!\\\\ntestOpenInWorld\\\\n\\\\tself shouldnt: [morph openInWorld] raise: Error.! !\\\\n\\\\n\\\\n!MorphTest methodsFor: 'testing - into/outOf World' stamp: 'ar 8/4/2003 00:11'!\\\\ntestIntoWorldCollapseOutOfWorld\\\\n\\\\t| m1 m2 collapsed |\\\\n\\\\t\\\\\\\"Create the guys\\\\\\\"\\\\n\\\\tm1 := TestInWorldMorph new.\\\\n\\\\tm2 := TestInWorldMorph new.\\\\n\\\\tself assert: (m1 intoWorldCount = 0).\\\\n\\\\tself assert: (m1 outOfWorldCount = 0).\\\\n\\\\tself assert: (m2 intoWorldCount = 0).\\\\n\\\\tself assert: (m2 outOfWorldCount = 0).\\\\n\\\\n\\\\t\\\\\\\"add them to basic morph\\\\\\\"\\\\n\\\\tmorph addMorphFront: m1.\\\\n\\\\tm1 addMorphFront: m2.\\\\n\\\\tself assert: (m1 intoWorldCount = 0).\\\\n\\\\tself assert: (m1 outOfWorldCount = 0).\\\\n\\\\tself assert: (m2 intoWorldCount = 0).\\\\n\\\\tself assert: (m2 outOfWorldCount = 0).\\\\n\\\\n\\\\t\\\\\\\"open the guy\\\\\\\"\\\\n\\\\tmorph openInWorld.\\\\n\\\\tself assert: (m1 intoWorldCount = 1).\\\\n\\\\tself assert: (m1 outOfWorldCount = 0).\\\\n\\\\tself assert: (m2 intoWorldCount = 1).\\\\n\\\\tself assert: (m2 outOfWorldCount = 0).\\\\n\\\\n\\\\t\\\\\\\"collapse it\\\\\\\"\\\\n\\\\tcollapsed := \\\\tCollapsedMorph new beReplacementFor: morph.\\\\n\\\\tself assert: (m1 intoWorldCount = 1).\\\\n\\\\tself assert: (m1 outOfWorldCount = 1).\\\\n\\\\tself assert: (m2 intoWorldCount = 1).\\\\n\\\\tself assert: (m2 outOfWorldCount = 1).\\\\n\\\\n\\\\t\\\\\\\"expand it\\\\\\\"\\\\n\\\\tcollapsed collapseOrExpand.\\\\n\\\\tself assert: (m1 intoWorldCount = 2).\\\\n\\\\tself assert: (m1 outOfWorldCount = 1).\\\\n\\\\tself assert: (m2 intoWorldCount = 2).\\\\n\\\\tself assert: (m2 outOfWorldCount = 1).\\\\n\\\\n\\\\t\\\\\\\"delete it\\\\\\\"\\\\n\\\\tmorph delete.\\\\n\\\\tself assert: (m1 intoWorldCount = 2).\\\\n\\\\tself assert: (m1 outOfWorldCount = 2).\\\\n\\\\tself assert: (m2 intoWorldCount = 2).\\\\n\\\\tself assert: (m2 outOfWorldCount = 2).\\\\n! !\\\\n\\\\n!MorphTest methodsFor: 'testing - into/outOf World' stamp: 'ar 8/4/2003 00:12'!\\\\ntestIntoWorldDeleteOutOfWorld\\\\n\\\\t| m1 m2 |\\\\n\\\\t\\\\\\\"Create the guys\\\\\\\"\\\\n\\\\tm1 := TestInWorldMorph new.\\\\n\\\\tm2 := TestInWorldMorph new.\\\\n\\\\tself assert: (m1 intoWorldCount = 0).\\\\n\\\\tself assert: (m1 outOfWorldCount = 0).\\\\n\\\\tself assert: (m2 intoWorldCount = 0).\\\\n\\\\tself assert: (m2 outOfWorldCount = 0).\\\\n\\\\n\\\\tmorph addMorphFront: m1.\\\\n\\\\tm1 addMorphFront:  m2.\\\\n\\\\tself assert: (m1 intoWorldCount = 0).\\\\n\\\\tself assert: (m1 outOfWorldCount = 0).\\\\n\\\\tself assert: (m2 intoWorldCount = 0).\\\\n\\\\tself assert: (m2 outOfWorldCount = 0).\\\\n\\\\n\\\\tmorph openInWorld.\\\\n\\\\tself assert: (m1 intoWorldCount = 1).\\\\n\\\\tself assert: (m1 outOfWorldCount = 0).\\\\n\\\\tself assert: (m2 intoWorldCount = 1).\\\\n\\\\tself assert: (m2 outOfWorldCount = 0).\\\\n\\\\n\\\\tmorph delete.\\\\n\\\\tself assert: (m1 intoWorldCount = 1).\\\\n\\\\tself assert: (m1 outOfWorldCount = 1).\\\\n\\\\tself assert: (m2 intoWorldCount = 1).\\\\n\\\\tself assert: (m2 outOfWorldCount = 1).\\\\n\\\\t! !\\\\n\\\\n!MorphTest methodsFor: 'testing - into/outOf World' stamp: 'ar 8/10/2003 18:30'!\\\\ntestIntoWorldTransferToNewGuy\\\\n\\\\t| m1 m2 |\\\\n\\\\t\\\\\\\"Create the guys\\\\\\\"\\\\n\\\\tm1 := TestInWorldMorph new.\\\\n\\\\tm2 := TestInWorldMorph new.\\\\n\\\\tself assert: (m1 intoWorldCount = 0).\\\\n\\\\tself assert: (m1 outOfWorldCount = 0).\\\\n\\\\tself assert: (m2 intoWorldCount = 0).\\\\n\\\\tself assert: (m2 outOfWorldCount = 0).\\\\n\\\\n\\\\tmorph addMorphFront: m1.\\\\n\\\\tm1 addMorphFront:  m2.\\\\n\\\\tself assert: (m1 intoWorldCount = 0).\\\\n\\\\tself assert: (m1 outOfWorldCount = 0).\\\\n\\\\tself assert: (m2 intoWorldCount = 0).\\\\n\\\\tself assert: (m2 outOfWorldCount = 0).\\\\n\\\\n\\\\tmorph openInWorld.\\\\n\\\\tself assert: (m1 intoWorldCount = 1).\\\\n\\\\tself assert: (m1 outOfWorldCount = 0).\\\\n\\\\tself assert: (m2 intoWorldCount = 1).\\\\n\\\\tself assert: (m2 outOfWorldCount = 0).\\\\n\\\\n\\\\tmorph addMorphFront: m2.\\\\n\\\\tself assert: (m1 intoWorldCount = 1).\\\\n\\\\tself assert: (m1 outOfWorldCount = 0).\\\\n\\\\tself assert: (m2 intoWorldCount = 1).\\\\n\\\\tself assert: (m2 outOfWorldCount = 0).\\\\n\\\\n\\\\tmorph addMorphFront: m1.\\\\n\\\\tself assert: (m1 intoWorldCount = 1).\\\\n\\\\tself assert: (m1 outOfWorldCount = 0).\\\\n\\\\tself assert: (m2 intoWorldCount = 1).\\\\n\\\\tself assert: (m2 outOfWorldCount = 0).\\\\n\\\\n\\\\tm2 addMorphFront: m1.\\\\n\\\\tself assert: (m1 intoWorldCount = 1).\\\\n\\\\tself assert: (m1 outOfWorldCount = 0).\\\\n\\\\tself assert: (m2 intoWorldCount = 1).\\\\n\\\\tself assert: (m2 outOfWorldCount = 0).\\\\n\\\\n\\\\tmorph delete.\\\\n\\\\tself assert: (m1 intoWorldCount = 1).\\\\n\\\\tself assert: (m1 outOfWorldCount = 1).\\\\n\\\\tself assert: (m2 intoWorldCount = 1).\\\\n\\\\tself assert: (m2 outOfWorldCount = 1).\\\\n! !\\\\nSketchMorph subclass: #MorphThumbnail\\\\n\\\\tinstanceVariableNames: 'morphRepresented'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-Books'!\\\\n!MorphThumbnail commentStamp: '<historical>' prior: 0!\\\\nA morph whose appearance is a thumbnail of some other morph.!\\\\n\\\\n\\\\n!MorphThumbnail methodsFor: 'as yet unclassified' stamp: 'sw 11/13/1998 09:53'!\\\\ncomputeThumbnail\\\\n\\\\t\\\\\\\"Assumption on entry:\\\\n       The receiver's width represents the maximum width allowable.\\\\n       The receiver's height represents the exact height desired.\\\\\\\"\\\\n\\\\n\\\\t| f scaleX scaleY |\\\\n\\\\tf _ morphRepresented imageForm.\\\\n\\\\tmorphRepresented fullReleaseCachedState.\\\\n\\\\tscaleY _ self height / f height.  \\\\\\\"keep height invariant\\\\\\\"\\\\n\\\\tscaleX _ ((morphRepresented width * scaleY) <= self width)\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[scaleY]  \\\\\\\"the usual case; same scale factor, to preserve aspect ratio\\\\\\\"\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self width / f width].\\\\n\\\\tself form: (f magnify: f boundingBox by: (scaleX @ scaleY) smoothing: 2).\\\\n\\\\tself extent: originalForm extent! !\\\\n\\\\n!MorphThumbnail methodsFor: 'as yet unclassified' stamp: 'sw 7/6/1998 22:08'!\\\\ngrabOriginal\\\\n\\\\tself primaryHand attachMorph: morphRepresented! !\\\\n\\\\n!MorphThumbnail methodsFor: 'as yet unclassified' stamp: 'ar 10/7/2000 15:38'!\\\\nmorphRepresented: aMorph\\\\n\\\\n\\\\tmorphRepresented _ aMorph.\\\\n\\\\tself computeThumbnail.\\\\n! !\\\\n\\\\n!MorphThumbnail methodsFor: 'as yet unclassified' stamp: 'md 10/22/2003 15:24'!\\\\nrevealOriginal\\\\n\\\\t((owner isKindOf: PasteUpMorph) and: [owner alwaysShowThumbnail]) \\\\n\\\\t\\\\tifTrue: [^Beeper beep].\\\\n\\\\tmorphRepresented owner isNil \\\\n\\\\t\\\\tifTrue: [^owner replaceSubmorph: self by: morphRepresented].\\\\n\\\\tBeeper beep! !\\\\n\\\\n!MorphThumbnail methodsFor: 'as yet unclassified' stamp: 'sw 8/10/1998 07:05'!\\\\nsmaller\\\\n\\\\tself form: (self form copy: (0@0 extent: self form extent // 2))! !\\\\n\\\\n\\\\n!MorphThumbnail methodsFor: 'copying' stamp: 'tk 1/8/1999 09:39'!\\\\nveryDeepFixupWith: deepCopier\\\\n\\\\t\\\\\\\"If target and arguments fields were weakly copied, fix them here.  If they were in the tree being copied, fix them up, otherwise point to the originals!!!!\\\\\\\"\\\\n\\\\nsuper veryDeepFixupWith: deepCopier.\\\\nmorphRepresented _ deepCopier references at: morphRepresented \\\\n\\\\t\\\\tifAbsent: [morphRepresented].! !\\\\n\\\\n!MorphThumbnail methodsFor: 'copying' stamp: 'tk 1/8/1999 09:39'!\\\\nveryDeepInner: deepCopier\\\\n\\\\t\\\\\\\"Copy all of my instance variables.  Some need to be not copied at all, but shared.  \\\\tWarning!!!!  Every instance variable defined in this class must be handled.  We must also implement veryDeepFixupWith:.  See DeepCopier class comment.\\\\\\\"\\\\n\\\\nsuper veryDeepInner: deepCopier.\\\\nmorphRepresented _ morphRepresented.\\\\t\\\\t\\\\\\\"Weakly copied\\\\\\\"! !\\\\n\\\\n\\\\n!MorphThumbnail methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:28'!\\\\ndefaultColor\\\\n\\\\t\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color lightGray! !\\\\n\\\\n!MorphThumbnail methodsFor: 'initialization' stamp: 'dgd 2/14/2003 21:51'!\\\\ninitialize\\\\n\\\\t\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\t| f |\\\\n\\\\tsuper initialize.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\n\\\\tf _ Form extent: 60 @ 80 depth: Display depth.\\\\n\\\\tf fill: f boundingBox fillColor: color.\\\\n\\\\tself form: f! !\\\\n\\\\n\\\\n!MorphThumbnail methodsFor: 'menus' stamp: 'dgd 8/30/2003 21:53'!\\\\naddCustomMenuItems: aCustomMenu hand: aHandMorph\\\\n\\\\tsuper addCustomMenuItems: aCustomMenu hand: aHandMorph.\\\\n\\\\taCustomMenu add: 'reveal original morph' translated action: #revealOriginal.\\\\n\\\\taCustomMenu add: 'grab original morph' translated action: #grabOriginal.\\\\n! !\\\\n\\\\n\\\\n!MorphThumbnail methodsFor: 'naming' stamp: 'bf 3/31/1999 12:24'!\\\\ninnocuousName\\\\n\\\\t^ morphRepresented isNil\\\\n\\\\t\\\\tifTrue: [super innocuousName]\\\\n\\\\t\\\\tifFalse: [morphRepresented innocuousName]! !\\\\n\\\\n\\\\n!MorphThumbnail methodsFor: 'parts bin' stamp: 'dgd 2/16/2003 21:37'!\\\\nisPartsDonor\\\\n\\\\t\\\\\\\"answer whether the receiver is PartsDonor\\\\\\\"\\\\n\\\\t^ self partRepresented isPartsDonor! !\\\\n\\\\n!MorphThumbnail methodsFor: 'parts bin' stamp: 'dgd 2/16/2003 21:40'!\\\\nisPartsDonor: aBoolean\\\\n\\\\t\\\\\\\"change the receiver's isPartDonor property\\\\\\\"\\\\n\\\\tself partRepresented isPartsDonor: aBoolean! !\\\\n\\\\n!MorphThumbnail methodsFor: 'parts bin' stamp: 'ar 10/6/2000 22:46'!\\\\npartRepresented\\\\n\\\\t^self morphRepresented! !\\\\n\\\\n\\\\n!MorphThumbnail methodsFor: 'thumbnail' stamp: 'jm 11/17/97 17:30'!\\\\nmorphRepresented\\\\n\\\\n\\\\t^ morphRepresented\\\\n! !\\\\n\\\\n!MorphThumbnail methodsFor: 'thumbnail' stamp: 'bf 3/31/1999 07:54'!\\\\nrepresentativeNoTallerThan: maxHeight norWiderThan: maxWidth thumbnailHeight: thumbnailHeight\\\\n\\\\n\\\\t\\\\\\\"Return a morph representing the receiver but which is no taller than aHeight.  If the receiver is already small enough, just return it, else return a MorphThumbnail companioned to the receiver, enforcing the maxWidth\\\\\\\"\\\\n\\\\n\\\\t(self height <= maxHeight and: [self width <= maxWidth]) ifTrue: [^ self].\\\\n\\\\n\\\\t^ MorphThumbnail new\\\\n\\\\t\\\\textent: maxWidth @ (thumbnailHeight min: self height);\\\\n\\\\t\\\\tmorphRepresented: morphRepresented! !\\\\nListItemWrapper subclass: #MorphWithSubmorphsWrapper\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Explorer'!\\\\n!MorphWithSubmorphsWrapper commentStamp: 'ls 3/1/2004 17:32' prior: 0!\\\\nDisplay a morph in a SimpleHierarchicalListMorph, and arrange to recursively display the morph's submorphs.  The \\\\\\\"item\\\\\\\" that is wrapped is the morph to display.!\\\\n\\\\n\\\\n!MorphWithSubmorphsWrapper methodsFor: 'hierarchy' stamp: 'ls 3/1/2004 17:34'!\\\\ncontents\\\\n\\\\t^item submorphs collect: [ :m |\\\\n\\\\t\\\\tself class with: m ]! !\\\\nController subclass: #MorphWorldController\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-ST80'!\\\\n!MorphWorldController commentStamp: '<historical>' prior: 0!\\\\nI am a controller for SceneViews. I support gestures for scrolling, click-selection, and area selection of scene glyphs. (See the class comment in GestureController for more details about gestures.) I also support construction operations such as inserting new glyphs and merging glyphs to make them share a common point.\\\\n\\\\nThe mapping of gestures to actions is as follows (see GestureController comment for more about gestures):\\\\n\\\\n  Click:\\\\n\\\\tclick on glyph\\\\t\\\\t\\\\t\\\\tselect glyph\\\\n\\\\tshift-click on glyph\\\\t\\\\t\\\\ttoggle selection of that glyph\\\\n\\\\tclick on background\\\\t\\\\t\\\\tclear selection\\\\n  Double click:\\\\n\\\\tdouble-click on glyph\\\\t\\\\t\\\\tinspect glyph\\\\n\\\\tdouble-click on background\\\\t\\\\tselect all\\\\n  Hold/Drag/Sweep:\\\\n\\\\thold (no movement)\\\\t\\\\t\\\\tyellow-button menu\\\\n\\\\tdrag (up/left movement)\\\\t\\\\tscrolling hand\\\\n\\\\tsweep (down/right movement)\\\\tselect glyphs in region\\\\n\\\\tshift-sweep\\\\t\\\\t\\\\t\\\\t\\\\ttoggle selection of glyphs in region\\\\n!\\\\n\\\\n\\\\n!MorphWorldController methodsFor: 'basic control sequence' stamp: 'di 11/26/1999 10:00'!\\\\ncontrolInitialize\\\\n\\\\t\\\\\\\"This window is becoming active.\\\\\\\"\\\\n\\\\n\\\\ttrue ifTrue: [model becomeTheActiveWorldWith: nil].\\\\n\\\\n\\\\tmodel canvas ifNil: [  \\\\\\\"i.e., only on first entry\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"In case of, eg, inspect during balloon help...\\\\\\\"\\\\n\\\\t\\\\tmodel submorphsDo: [:m |  \\\\\\\"delete any existing balloons\\\\\\\"\\\\n\\\\t\\\\t\\\\t(m isKindOf: BalloonMorph) ifTrue: [m delete]].\\\\n\\\\n\\\\t\\\\tmodel handsDo: [:h | h initForEvents].\\\\n\\\\t\\\\tview displayView].  \\\\\\\"initializes the WorldMorph's canvas\\\\\\\"\\\\n! !\\\\n\\\\n!MorphWorldController methodsFor: 'basic control sequence' stamp: 'di 11/16/2001 22:43'!\\\\ncontrolLoop \\\\n\\\\t\\\\\\\"Overridden to keep control active when the hand goes out of the view\\\\\\\"\\\\n\\\\n\\\\t| db |\\\\n\\\\t[self viewHasCursor  \\\\\\\"working in the window\\\\\\\"\\\\n\\\\t\\\\tor: [Sensor noButtonPressed  \\\\\\\"wandering with no button pressed\\\\\\\"\\\\n\\\\t\\\\tor: [model primaryHand submorphs size > 0  \\\\\\\"dragging something outside\\\\\\\"]]]\\\\n\\\\t\\\\twhileTrue:   \\\\\\\"... in other words anything but clicking outside\\\\\\\"\\\\n\\\\t\\\\t\\\\t[self controlActivity.\\\\n\\\\n\\\\t\\\\t\\\\t\\\\\\\"Check for reframing since we hold control here\\\\\\\"\\\\n\\\\t\\\\t\\\\tdb _ view superView displayBox.\\\\n\\\\t\\\\t\\\\tview superView controller checkForReframe.\\\\n\\\\t\\\\t\\\\tdb = view superView displayBox ifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[self controlInitialize \\\\\\\"reframe world if bounds changed\\\\\\\"]].\\\\n! !\\\\n\\\\n!MorphWorldController methodsFor: 'basic control sequence' stamp: 'di 11/16/2001 13:58'!\\\\ncontrolTerminate \\\\n\\\\t\\\\\\\"This window is becoming inactive; restore the normal cursor.\\\\\\\"\\\\n\\\\n\\\\tCursor normal show.\\\\n\\\\tActiveWorld _ ActiveHand _ ActiveEvent _ nil! !\\\\n\\\\n\\\\n!MorphWorldController methodsFor: 'control defaults' stamp: 'jm 2/20/98 13:37'!\\\\ncontrolActivity\\\\n\\\\t\\\\\\\"Do one step of the Morphic interaction loop. Called repeatedly while window is active.\\\\\\\"\\\\n\\\\n\\\\tmodel doOneCycle.\\\\n! !\\\\n\\\\n!MorphWorldController methodsFor: 'control defaults' stamp: 'jm 6/17/97 10:29'!\\\\nisControlActive\\\\n\\\\n\\\\t^ sensor redButtonPressed or: [self viewHasCursor]! !\\\\nView subclass: #MorphWorldView\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: 'FullColorWhenInactive'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-ST80'!\\\\n!MorphWorldView commentStamp: '<historical>' prior: 0!\\\\nI am a view used to display a Scene. I may be scrolled by adjusting my offset. My default controller is SceneController.\\\\n\\\\nSceneViews encapsulate the notion of a changing foreground and a fixed background during interactive updates. During an interaction (such as dragging), some of the glyphs will not change location or appearance. These are part of the \\\\\\\"background\\\\\\\". All glyphs that may change (the \\\\\\\"foreground\\\\\\\" glyphs) are painted against this unchanging backdrop during the interaction.\\\\n\\\\nInstance Variables:\\\\n\\\\toffset\\\\t\\\\t\\\\t\\\\tthe current offset of this view (used for scrolling)\\\\n\\\\tenclosingRect \\\\t\\\\ta rectangle large enough to contain all the objects in the scene, plus a small border (this is a cache that must be recomputed when glyphs are moved, added, or removed from the scene)\\\\n\\\\tbackgroundForm\\\\t\\\\ta <Form> containing the fixed background\\\\n\\\\tvisibleForeground\\\\t\\\\tthe glyphs that are changing but not selected during an interaction\\\\n\\\\tselectedForeground\\\\tthe selected glyphs that are changing during an interaction!\\\\n\\\\n\\\\n!MorphWorldView methodsFor: 'as yet unclassified' stamp: 'md 2/24/2006 21:24'!\\\\nupdateSubWindowExtent\\\\n\\\\t\\\\\\\"If this MorphWorldView represents a single Morphic SystemWindow, then update that window to match the size of the WorldView.\\\\\\\"\\\\n\\\\n\\\\t| numMorphs subWindow |\\\\n\\\\tnumMorphs := model submorphs size.\\\\n\\\\t\\\\\\\"(Allow for the existence of an extra NewHandleMorph (for resizing).)\\\\\\\"\\\\n\\\\t(numMorphs = 0 or: [numMorphs > 2]) ifTrue: [^self].\\\\n\\\\tsubWindow := model submorphs detect: [:ea | ea respondsTo: #label]\\\\n\\\\t\\\\t\\\\t\\\\tifNone: [^self].\\\\n\\\\tsuperView label = subWindow label ifFalse: [^self].\\\\n\\\\tsubWindow position: model position + (0 @ -16).\\\\t\\\\\\\"adjust for WiW changes\\\\\\\"\\\\n\\\\tsubWindow extent: model extent - (0 @ -16).\\\\n\\\\tsubWindow isActive ifFalse: [subWindow activate]! !\\\\n\\\\n\\\\n!MorphWorldView methodsFor: 'controller access'!\\\\ndefaultControllerClass\\\\n\\\\n\\\\t^ MorphWorldController! !\\\\n\\\\n\\\\n!MorphWorldView methodsFor: 'deEmphasizing' stamp: 'RAA 5/24/2000 10:34'!\\\\ndeEmphasizeView \\\\n\\\\t\\\\\\\"This window is becoming inactive.\\\\\\\"\\\\n\\\\n\\\\tCursor normal show.    \\\\\\\"restore the normal cursor\\\\\\\"\\\\n\\\\tmodel deEmphasizeViewMVC: self topView cacheBitsAsTwoTone.\\\\n! !\\\\n\\\\n\\\\n!MorphWorldView methodsFor: 'displaying' stamp: 'dew 11/8/1999 02:01'!\\\\ndisplayView\\\\n\\\\t\\\\\\\"This method is called by the system when the top view is framed or moved.\\\\\\\"\\\\n\\\\t| topView |\\\\n\\\\tmodel viewBox: self insetDisplayBox.\\\\n\\\\tself updateSubWindowExtent.\\\\n\\\\ttopView _ self topView.\\\\n\\\\t(topView == ScheduledControllers scheduledControllers first view\\\\n\\\\t\\\\tor: [topView cacheBitsAsTwoTone not])\\\\n\\\\t\\\\tifTrue: [model displayWorldSafely]\\\\n\\\\t\\\\tifFalse: [model displayWorldAsTwoTone].  \\\\\\\"just restoring the screen\\\\\\\"! !\\\\n\\\\n\\\\n!MorphWorldView methodsFor: 'updating' stamp: 'sw 9/26/97 20:56'!\\\\nupdate: symbol\\\\n\\\\n\\\\t^ symbol == #newColor\\\\n\\\\t\\\\tifTrue: [self topView backgroundColor: model color dominantColor; uncacheBits; display]\\\\n\\\\t\\\\tifFalse: [super update: symbol].\\\\n! !\\\\n\\\\n\\\\n!MorphWorldView methodsFor: 'private' stamp: 'dew 11/8/1999 02:00'!\\\\ncomputeInsetDisplayBox\\\\n\\\\t\\\\\\\"This overrides the same method in View.  (It avoids using displayTransform: because it can return inaccurate results, causing a MorphWorldView's inset display box to creep inward when resized.)\\\\\\\"\\\\n\\\\n\\\\t^superView insetDisplayBox insetBy: borderWidth! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMorphWorldView class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MorphWorldView class methodsFor: 'instance creation' stamp: 'nk 7/30/2004 21:52'!\\\\nconvertToMVCWiWPasteUpMorph\\\\n\\\\t\\\\\\\"\\\\nMorphWorldView convertToMVCWiWPasteUpMorph\\\\n\\\\\\\"\\\\n\\\\n\\\\t| current w newModel topView |\\\\n\\\\tSmalltalk isMorphic ifTrue: [^self inform: 'do this in MVC'].\\\\n\\\\tcurrent := self allInstances \\\\n\\\\t\\\\t\\\\t\\\\tselect: [:each | each model class == PasteUpMorph].\\\\n\\\\tcurrent do: \\\\n\\\\t\\\\t\\\\t[:oldWorldView | \\\\n\\\\t\\\\t\\\\tw := MVCWiWPasteUpMorph newWorldForProject: nil.\\\\n\\\\t\\\\t\\\\tw\\\\n\\\\t\\\\t\\\\t\\\\tcolor: oldWorldView model color;\\\\n\\\\t\\\\t\\\\t\\\\taddAllMorphs: oldWorldView model submorphs.\\\\n\\\\t\\\\t\\\\tnewModel := CautiousModel new initialExtent: 300 @ 300.\\\\n\\\\t\\\\t\\\\ttopView := self fullColorWhenInactive \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [ColorSystemView new]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [StandardSystemView new].\\\\n\\\\t\\\\t\\\\ttopView\\\\n\\\\t\\\\t\\\\t\\\\tmodel: newModel;\\\\n\\\\t\\\\t\\\\t\\\\tlabel: oldWorldView topView label;\\\\n\\\\t\\\\t\\\\t\\\\tborderWidth: 1;\\\\n\\\\t\\\\t\\\\t\\\\taddSubView: (self new model: w);\\\\n\\\\t\\\\t\\\\t\\\\tbackgroundColor: w color.\\\\n\\\\t\\\\t\\\\ttopView controller openNoTerminate.\\\\n\\\\t\\\\t\\\\ttopView reframeTo: (oldWorldView topView expandedFrame \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\texpandBy: (0 @ 0 extent: 0 @ topView labelHeight)).\\\\n\\\\t\\\\t\\\\toldWorldView topView controller closeAndUnscheduleNoTerminate].\\\\n\\\\tScheduledControllers restore.\\\\n\\\\tProcessor terminateActive! !\\\\n\\\\n!MorphWorldView class methodsFor: 'instance creation'!\\\\nfullColorWhenInactive\\\\n\\\\n\\\\tFullColorWhenInactive ifNil: [FullColorWhenInactive _ true].\\\\n\\\\t^ FullColorWhenInactive\\\\n! !\\\\n\\\\n!MorphWorldView class methodsFor: 'instance creation' stamp: 'di 2/26/98 09:17'!\\\\nfullColorWhenInactive: fullColor\\\\n\\\\t\\\\\\\"MorphWorldView fullColorWhenInactive: true\\\\\\\"\\\\n\\\\t\\\\\\\"If FullColorWhenInactive is true then WorldMorphViews will created inside StandardSystemViews that cache their contents in full-color when the window is inactive. If it is false, only a half-tone gray approximation of the colors will be cached to save space.\\\\\\\"\\\\n\\\\n\\\\tFullColorWhenInactive _ fullColor.\\\\n\\\\n\\\\t\\\\\\\"Retroactively convert all extant windows\\\\\\\"\\\\n\\\\t((fullColor ifTrue: [StandardSystemView] ifFalse: [ColorSystemView])\\\\n\\\\t\\\\tallInstances select:\\\\n\\\\t\\\\t\\\\t[:v | v subViews notNil and: [v subViews isEmpty not and: [v firstSubView isKindOf: MorphWorldView]]])\\\\n\\\\t\\\\tdo: [:v | v uncacheBits.\\\\n\\\\t\\\\t\\\\tv controller toggleTwoTone]! !\\\\n\\\\n!MorphWorldView class methodsFor: 'instance creation'!\\\\nopenOn: aMorphWorld\\\\n\\\\t\\\\\\\"Open a view on the given WorldMorph.\\\\\\\"\\\\n\\\\n\\\\tself openOn: aMorphWorld label: 'A Morphic World'.! !\\\\n\\\\n!MorphWorldView class methodsFor: 'instance creation' stamp: 'sw 10/2/97 23:17'!\\\\nopenOn: aWorldMorph label: aString\\\\n\\\\t\\\\\\\"Open a view with the given label on the given WorldMorph.\\\\\\\"\\\\n\\\\t^ self openOn: aWorldMorph label: aString model: (CautiousModel new initialExtent: aWorldMorph initialExtent)! !\\\\n\\\\n!MorphWorldView class methodsFor: 'instance creation' stamp: 'sw 9/21/1998 17:54'!\\\\nopenOn: aWorldMorph label: aString cautionOnClose: aBoolean\\\\n\\\\t\\\\\\\"Open a view with the given label on the given WorldMorph.\\\\\\\"\\\\n\\\\t| aModel |\\\\n\\\\taModel _ aBoolean\\\\n\\\\t\\\\tifTrue:\\\\t\\\\t[CautiousModel new]\\\\n\\\\t\\\\tifFalse:\\\\t\\\\t[WorldViewModel new].\\\\n\\\\t^ self openOn: aWorldMorph label: aString model: (aModel initialExtent: aWorldMorph initialExtent)! !\\\\n\\\\n!MorphWorldView class methodsFor: 'instance creation' stamp: 'jm 1/31/98 20:24'!\\\\nopenOn: aWorldMorph label: aString extent: aPoint\\\\n\\\\t\\\\\\\"Open a view with the given label and extent on the given WorldMorph.\\\\\\\"\\\\n\\\\n\\\\t^ self openOn: aWorldMorph\\\\n\\\\t\\\\tlabel: aString\\\\n\\\\t\\\\tmodel: (CautiousModel new initialExtent: aPoint)\\\\n! !\\\\n\\\\n!MorphWorldView class methodsFor: 'instance creation' stamp: 'nk 7/30/2004 22:37'!\\\\nopenOn: aWorldMorph label: aString model: aModel \\\\n\\\\t\\\\\\\"Open a view with the given label on the given WorldMorph.\\\\\\\"\\\\n\\\\n\\\\t| topView |\\\\n\\\\ttopView := self fullColorWhenInactive \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [topView := ColorSystemView new]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [topView := StandardSystemView new].\\\\n\\\\ttopView\\\\n\\\\t\\\\tmodel: aModel;\\\\n\\\\t\\\\tlabel: aString;\\\\n\\\\t\\\\tborderWidth: 1;\\\\n\\\\t\\\\taddSubView: (self new model: aWorldMorph);\\\\n\\\\t\\\\tbackgroundColor: aWorldMorph color.\\\\n\\\\t\\\\\\\"minimumSize: aWorldMorph extent + (2@2); \\\\\\\"\\\\t\\\\\\\"add border width\\\\\\\"\\\\n\\\\ttopView controller open! !\\\\n\\\\n!MorphWorldView class methodsFor: 'instance creation' stamp: 'di 11/26/1999 11:46'!\\\\nopenWorld\\\\n\\\\n\\\\t| w |\\\\n\\\\t(w _ MVCWiWPasteUpMorph newWorldForProject: nil).\\\\n\\\\tw bounds: (0@0 extent: 400@300).\\\\n\\\\tself openOn: w\\\\n\\\\t\\\\tlabel: 'A Morphic World'\\\\n\\\\t\\\\textent: w fullBounds extent + 2.\\\\n! !\\\\n\\\\n!MorphWorldView class methodsFor: 'instance creation' stamp: 'sma 6/12/2000 14:18'!\\\\nopenWorldWith: aMorph labelled: labelString\\\\n\\\\n\\\\t| w |\\\\n\\\\t(w _ MVCWiWPasteUpMorph newWorldForProject: nil) addMorph: aMorph.\\\\n\\\\tw extent: aMorph fullBounds extent.\\\\n\\\\tw startSteppingSubmorphsOf: aMorph.\\\\n\\\\tself openOn: w\\\\n\\\\t\\\\tlabel: labelString\\\\n\\\\t\\\\textent: w fullBounds extent + 2.\\\\n! !\\\\nMessageSend subclass: #MorphicAlarm\\\\n\\\\tinstanceVariableNames: 'scheduledTime numArgs'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Events'!\\\\n\\\\n!MorphicAlarm methodsFor: 'accessing' stamp: 'ar 9/11/2000 16:44'!\\\\nscheduledTime\\\\n\\\\t\\\\\\\"Return the time (in milliseconds) that the receiver is scheduled to be executed\\\\\\\"\\\\n\\\\t^scheduledTime! !\\\\n\\\\n!MorphicAlarm methodsFor: 'accessing' stamp: 'ar 9/11/2000 16:45'!\\\\nscheduledTime: msecs\\\\n\\\\t\\\\\\\"Set the time (in milliseconds) that the receiver is scheduled to be executed\\\\\\\"\\\\n\\\\tscheduledTime _ msecs! !\\\\n\\\\n\\\\n!MorphicAlarm methodsFor: 'evaluating' stamp: 'ar 10/22/2000 17:36'!\\\\nvalue: anArgument\\\\n\\\\t| nArgs |\\\\n\\\\tnumArgs ifNil:[numArgs _ selector numArgs].\\\\n\\\\tnArgs _ arguments ifNil:[0] ifNotNil:[arguments size].\\\\n\\\\tnArgs = numArgs ifTrue:[\\\\n\\\\t\\\\t\\\\\\\"Ignore extra argument\\\\\\\"\\\\n\\\\t\\\\t^self value].\\\\n\\\\t^arguments isNil\\\\n\\\\t\\\\tifTrue: [receiver perform: selector with: anArgument]\\\\n\\\\t\\\\tifFalse: [receiver perform: selector withArguments: (arguments copyWith: anArgument)]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMorphicAlarm class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MorphicAlarm class methodsFor: 'instance creation' stamp: 'ar 9/11/2000 16:44'!\\\\nscheduledAt: scheduledTime receiver: aTarget selector: aSelector arguments: argArray\\\\n\\\\t^(self receiver: aTarget selector: aSelector arguments: argArray)\\\\n\\\\t\\\\tscheduledTime: scheduledTime.! !\\\\nObject subclass: #MorphicEvent\\\\n\\\\tinstanceVariableNames: 'timeStamp source'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Events'!\\\\n!MorphicEvent commentStamp: '<historical>' prior: 0!\\\\nThis class represents the base for all events.\\\\n\\\\nInstance variables:\\\\n\\\\tstamp\\\\t<Integer>\\\\tThe millisecond clock time stamp (based on Time millisecondClock)\\\\n\\\\tsource\\\\t<Hand | nil>\\\\tIf non-nil the hand that generated the event.!\\\\n\\\\n\\\\n!MorphicEvent methodsFor: 'accessing' stamp: 'ar 10/10/2000 21:28'!\\\\ncursorPoint\\\\n\\\\t\\\\\\\"Backward compatibility. Use #position instead\\\\\\\"\\\\n\\\\t^ self position! !\\\\n\\\\n!MorphicEvent methodsFor: 'accessing' stamp: 'ar 9/13/2000 16:48'!\\\\nhand\\\\n\\\\t\\\\\\\"Return the source that generated the event\\\\\\\"\\\\n\\\\t^source! !\\\\n\\\\n!MorphicEvent methodsFor: 'accessing' stamp: 'wiz 12/8/2004 23:13'!\\\\nposition\\\\n\\\\t\\\\\\\"Since cursorPoint is defined and refers to position it should be defined\\\\n\\\\there as well\\\\\\\"\\\\n\\\\t^ self subclassResponsibility! !\\\\n\\\\n!MorphicEvent methodsFor: 'accessing' stamp: 'ar 9/13/2000 15:29'!\\\\ntimeStamp\\\\n\\\\t\\\\\\\"Return the millisecond clock value at which the event was generated\\\\\\\"\\\\n\\\\t^timeStamp ifNil:[timeStamp _ Time millisecondClockValue]! !\\\\n\\\\n!MorphicEvent methodsFor: 'accessing' stamp: 'ar 9/13/2000 15:34'!\\\\ntype\\\\n\\\\t\\\\\\\"Return a symbol indicating the type this event.\\\\\\\"\\\\n\\\\t^self subclassResponsibility! !\\\\n\\\\n!MorphicEvent methodsFor: 'accessing' stamp: 'ar 10/10/2000 01:19'!\\\\nwasHandled\\\\n\\\\t\\\\\\\"Return true if this event was handled. May be ignored for some types of events.\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n!MorphicEvent methodsFor: 'accessing' stamp: 'ar 10/10/2000 01:20'!\\\\nwasHandled: aBool\\\\n\\\\t\\\\\\\"Determine if this event was handled. May be ignored for some types of events.\\\\\\\"! !\\\\n\\\\n\\\\n!MorphicEvent methodsFor: 'comparing' stamp: 'ar 9/13/2000 15:36'!\\\\n= anEvent\\\\n\\\\tanEvent isMorphicEvent ifFalse:[^false].\\\\n\\\\t^self type = anEvent type! !\\\\n\\\\n!MorphicEvent methodsFor: 'comparing' stamp: 'ar 9/13/2000 15:36'!\\\\nhash\\\\n\\\\t^self type hash! !\\\\n\\\\n\\\\n!MorphicEvent methodsFor: 'dispatching' stamp: 'ar 9/15/2000 21:12'!\\\\nsentTo: anObject\\\\n\\\\t\\\\\\\"Dispatch the receiver into anObject\\\\\\\"\\\\n\\\\t^anObject handleUnknownEvent: self! !\\\\n\\\\n\\\\n!MorphicEvent methodsFor: 'initialize' stamp: 'ar 10/10/2000 01:18'!\\\\ncopyHandlerState: anEvent\\\\n\\\\t\\\\\\\"Copy the handler state from anEvent. Used for quickly transferring handler information between transformed events.\\\\\\\"\\\\n! !\\\\n\\\\n!MorphicEvent methodsFor: 'initialize' stamp: 'ar 10/10/2000 01:18'!\\\\nresetHandlerFields\\\\n\\\\t\\\\\\\"Reset anything that is used to cross-communicate between two eventual handlers during event dispatch\\\\\\\"! !\\\\n\\\\n!MorphicEvent methodsFor: 'initialize' stamp: 'ar 10/24/2000 16:21'!\\\\ntype: eventType readFrom: aStream\\\\n\\\\t\\\\\\\"Read a MorphicEvent from the given stream.\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!MorphicEvent methodsFor: 'object fileIn' stamp: 'RAA 12/20/2000 16:05'!\\\\nconvertOctober2000: varDict using: smartRefStrm\\\\n\\\\t\\\\\\\"ar 10/25/2000: This method is used to convert OLD MorphicEvents into new ones.\\\\\\\"\\\\n\\\\t\\\\\\\"These are going away #('type' 'cursorPoint' 'buttons' 'keyValue' 'sourceHand').  Possibly store their info in another variable?\\\\\\\"\\\\n\\\\t| type cursorPoint buttons keyValue sourceHand |\\\\n\\\\ttype _ varDict at: 'type'.\\\\n\\\\tcursorPoint _ varDict at: 'cursorPoint'.\\\\n\\\\tbuttons _ varDict at: 'buttons'.\\\\n\\\\tkeyValue _ varDict at: 'keyValue'.\\\\n\\\\tsourceHand _ varDict at: 'sourceHand'.\\\\n\\\\ttype == #mouseMove ifTrue:[\\\\n\\\\t\\\\t^MouseMoveEvent new\\\\n\\\\t\\\\t\\\\tsetType: #mouseMove \\\\n\\\\t\\\\t\\\\tstartPoint: cursorPoint\\\\n\\\\t\\\\t\\\\tendPoint: cursorPoint\\\\n\\\\t\\\\t\\\\ttrail: #() \\\\n\\\\t\\\\t\\\\tbuttons: buttons \\\\n\\\\t\\\\t\\\\thand: sourceHand \\\\n\\\\t\\\\t\\\\tstamp: nil].\\\\n\\\\t(type == #mouseDown) | (type == #mouseUp) ifTrue:[\\\\n\\\\t\\\\t\\\\t^MouseButtonEvent new\\\\n\\\\t\\\\t\\\\t\\\\tsetType: type\\\\n\\\\t\\\\t\\\\t\\\\tposition: cursorPoint\\\\n\\\\t\\\\t\\\\t\\\\twhich: 0\\\\n\\\\t\\\\t\\\\t\\\\tbuttons: buttons\\\\n\\\\t\\\\t\\\\t\\\\thand: sourceHand\\\\n\\\\t\\\\t\\\\t\\\\tstamp: nil].\\\\n\\\\t(type == #keystroke) | (type == #keyDown) | (type == #keyUp) ifTrue:[\\\\n\\\\t\\\\t^KeyboardEvent new\\\\n\\\\t\\\\t\\\\tsetType: type\\\\n\\\\t\\\\t\\\\tbuttons: buttons\\\\n\\\\t\\\\t\\\\tposition: cursorPoint\\\\n\\\\t\\\\t\\\\tkeyValue: keyValue\\\\n\\\\t\\\\t\\\\thand: sourceHand\\\\n\\\\t\\\\t\\\\tstamp: nil].\\\\n\\\\t\\\\\\\"All others will be handled there\\\\\\\"\\\\n\\\\t^MorphicUnknownEvent new! !\\\\n\\\\n\\\\n!MorphicEvent methodsFor: 'objects from disk' stamp: 'RAA 12/21/2000 11:35'!\\\\nconvertToCurrentVersion: varDict refStream: smartRefStrm\\\\n\\\\t\\\\n\\\\t| answer |\\\\n\\\\n\\\\t\\\\\\\"ar 10/25/2000: This method is used to convert OLD MorphicEvents into new ones.\\\\\\\"\\\\n\\\\tvarDict at: 'cursorPoint' ifPresent: [ :x | \\\\n\\\\t\\\\tanswer _ self convertOctober2000: varDict using: smartRefStrm.\\\\n\\\\t\\\\tvarDict removeKey: 'cursorPoint'.\\\\t\\\\\\\"avoid doing this again\\\\\\\"\\\\n\\\\t\\\\t^answer\\\\n\\\\t].\\\\n\\\\t^super convertToCurrentVersion: varDict refStream: smartRefStrm.\\\\n\\\\n\\\\n! !\\\\n\\\\n\\\\n!MorphicEvent methodsFor: 'testing' stamp: 'ar 9/22/2000 10:36'!\\\\nisDraggingEvent\\\\n\\\\t^false! !\\\\n\\\\n!MorphicEvent methodsFor: 'testing' stamp: 'ar 9/13/2000 19:17'!\\\\nisDropEvent\\\\n\\\\t^false! !\\\\n\\\\n!MorphicEvent methodsFor: 'testing' stamp: 'ar 9/13/2000 19:19'!\\\\nisKeyboard\\\\n\\\\t^false! !\\\\n\\\\n!MorphicEvent methodsFor: 'testing' stamp: 'ar 10/10/2000 21:27'!\\\\nisKeystroke\\\\n\\\\t^false! !\\\\n\\\\n!MorphicEvent methodsFor: 'testing' stamp: 'ar 9/13/2000 15:37'!\\\\nisMorphicEvent\\\\n\\\\t^true! !\\\\n\\\\n!MorphicEvent methodsFor: 'testing' stamp: 'ar 9/13/2000 19:19'!\\\\nisMouse\\\\n\\\\t^false! !\\\\n\\\\n!MorphicEvent methodsFor: 'testing' stamp: 'ar 9/14/2000 18:21'!\\\\nisMouseOver\\\\n\\\\t^self type == #mouseOver! !\\\\n\\\\n\\\\n!MorphicEvent methodsFor: 'transforming' stamp: 'ar 9/13/2000 15:47'!\\\\ntransformedBy: aMorphicTransform\\\\n\\\\t\\\\\\\"Return the receiver transformed by the given transform into a local coordinate system.\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!MorphicEvent methodsFor: 'private' stamp: 'ar 10/25/2000 21:26'!\\\\nsetHand: aHand\\\\n\\\\tsource _ aHand! !\\\\n\\\\n!MorphicEvent methodsFor: 'private' stamp: 'ar 10/25/2000 20:53'!\\\\nsetTimeStamp: stamp\\\\n\\\\ttimeStamp _ stamp.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMorphicEvent class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MorphicEvent class methodsFor: 'instance creation' stamp: 'ar 10/26/2000 00:44'!\\\\nconvertObsolete: anEvent\\\\n\\\\t\\\\\\\"ar 10/25/2000: This method is used to convert OLD MorphicEvents into new ones.\\\\\\\"\\\\n\\\\t| type cursorPoint buttons keyValue sourceHand |\\\\n\\\\ttype _ anEvent type.\\\\n\\\\tcursorPoint _ anEvent cursorPoint.\\\\n\\\\tbuttons _ anEvent buttons.\\\\n\\\\tkeyValue _ anEvent keyValue.\\\\n\\\\tsourceHand _ anEvent hand.\\\\n\\\\ttype == #mouseMove ifTrue:[\\\\n\\\\t\\\\t^MouseMoveEvent new\\\\n\\\\t\\\\t\\\\tsetType: #mouseMove \\\\n\\\\t\\\\t\\\\tstartPoint: cursorPoint\\\\n\\\\t\\\\t\\\\tendPoint: cursorPoint\\\\n\\\\t\\\\t\\\\ttrail: #() \\\\n\\\\t\\\\t\\\\tbuttons: buttons \\\\n\\\\t\\\\t\\\\thand: sourceHand \\\\n\\\\t\\\\t\\\\tstamp: nil].\\\\n\\\\t(type == #mouseDown) | (type == #mouseUp) ifTrue:[\\\\n\\\\t\\\\t\\\\t^MouseButtonEvent new\\\\n\\\\t\\\\t\\\\t\\\\tsetType: type\\\\n\\\\t\\\\t\\\\t\\\\tposition: cursorPoint\\\\n\\\\t\\\\t\\\\t\\\\twhich: 0\\\\n\\\\t\\\\t\\\\t\\\\tbuttons: buttons\\\\n\\\\t\\\\t\\\\t\\\\thand: sourceHand\\\\n\\\\t\\\\t\\\\t\\\\tstamp: nil].\\\\n\\\\t(type == #keystroke) | (type == #keyDown) | (type == #keyUp) ifTrue:[\\\\n\\\\t\\\\t^KeyboardEvent new\\\\n\\\\t\\\\t\\\\tsetType: type\\\\n\\\\t\\\\t\\\\tbuttons: buttons\\\\n\\\\t\\\\t\\\\tposition: cursorPoint\\\\n\\\\t\\\\t\\\\tkeyValue: keyValue\\\\n\\\\t\\\\t\\\\thand: sourceHand\\\\n\\\\t\\\\t\\\\tstamp: nil].\\\\n\\\\t^nil! !\\\\n\\\\n!MorphicEvent class methodsFor: 'instance creation' stamp: 'ar 10/26/2000 00:49'!\\\\nreadFrom: aStream\\\\n\\\\t\\\\\\\"Read a MorphicEvent from the given stream.\\\\\\\"\\\\n\\\\t| typeString c |\\\\n\\\\ttypeString _ String streamContents:\\\\n\\\\t\\\\t[:s |   [(c _ aStream next) isLetter] whileTrue: [s nextPut: c]].\\\\n\\\\ttypeString = 'mouseMove' ifTrue:[^MouseMoveEvent type: #mouseMove readFrom: aStream].\\\\n\\\\ttypeString = 'mouseDown' ifTrue:[^MouseButtonEvent type: #mouseDown readFrom: aStream].\\\\n\\\\ttypeString = 'mouseUp' ifTrue:[^MouseButtonEvent type: #mouseUp readFrom: aStream].\\\\n\\\\n\\\\ttypeString = 'keystroke' ifTrue:[^KeyboardEvent type: #keystroke readFrom: aStream].\\\\n\\\\ttypeString = 'keyDown' ifTrue:[^KeyboardEvent type: #keyDown readFrom: aStream].\\\\n\\\\ttypeString = 'keyUp' ifTrue:[^KeyboardEvent type: #keyUp readFrom: aStream].\\\\n\\\\n\\\\ttypeString = 'mouseOver' ifTrue:[^MouseEvent type: #mouseOver readFrom: aStream].\\\\n\\\\ttypeString = 'mouseEnter' ifTrue:[^MouseEvent type: #mouseEnter readFrom: aStream].\\\\n\\\\ttypeString = 'mouseLeave' ifTrue:[^MouseEvent type: #mouseLeave readFrom: aStream].\\\\n\\\\n\\\\ttypeString = 'unknown' ifTrue:[^MorphicUnknownEvent type: #unknown readFrom: aStream].\\\\n\\\\n\\\\t^nil\\\\n! !\\\\n\\\\n!MorphicEvent class methodsFor: 'instance creation' stamp: 'ar 10/25/2000 21:58'!\\\\nreadFromObsolete: aStream\\\\n\\\\t\\\\\\\"Read one of those old and now obsolete events from the stream\\\\\\\"\\\\n\\\\t| type x y buttons keyValue typeString c |\\\\n\\\\ttypeString _ String streamContents:\\\\n\\\\t\\\\t[:s |   [(c _ aStream next) isLetter] whileTrue: [s nextPut: c]].\\\\n\\\\ttypeString = 'mouseMove'\\\\n\\\\t\\\\tifTrue: [type _ #mouseMove  \\\\\\\"fast treatment of common case\\\\\\\"]\\\\n\\\\t\\\\tifFalse: [type _ typeString asSymbol].\\\\n\\\\n\\\\tx _ Integer readFrom: aStream.\\\\n\\\\taStream skip: 1.\\\\n\\\\ty _ Integer readFrom: aStream.\\\\n\\\\taStream skip: 1.\\\\n\\\\n\\\\tbuttons _ Integer readFrom: aStream.\\\\n\\\\taStream skip: 1.\\\\n\\\\n\\\\tkeyValue _ Integer readFrom: aStream.\\\\n\\\\n\\\\ttypeString = 'mouseMove' ifTrue:[\\\\n\\\\t\\\\t^MouseMoveEvent new\\\\n\\\\t\\\\t\\\\tsetType: #mouseMove \\\\n\\\\t\\\\t\\\\tstartPoint: x@y \\\\n\\\\t\\\\t\\\\tendPoint: x@y \\\\n\\\\t\\\\t\\\\ttrail: #() \\\\n\\\\t\\\\t\\\\tbuttons: buttons \\\\n\\\\t\\\\t\\\\thand: nil \\\\n\\\\t\\\\t\\\\tstamp: nil].\\\\n\\\\t(typeString = 'mouseDown') | (typeString = 'mouseUp') ifTrue:[\\\\n\\\\t\\\\t\\\\t^MouseButtonEvent new\\\\n\\\\t\\\\t\\\\t\\\\tsetType: type\\\\n\\\\t\\\\t\\\\t\\\\tposition: x@y\\\\n\\\\t\\\\t\\\\t\\\\twhich: 0\\\\n\\\\t\\\\t\\\\t\\\\tbuttons: buttons\\\\n\\\\t\\\\t\\\\t\\\\thand: nil\\\\n\\\\t\\\\t\\\\t\\\\tstamp: nil].\\\\n\\\\t(typeString = 'keystroke') | (typeString = 'keyDown') | (typeString = 'keyUp') ifTrue:[\\\\n\\\\t\\\\t^KeyboardEvent new\\\\n\\\\t\\\\t\\\\tsetType: type\\\\n\\\\t\\\\t\\\\tbuttons: buttons\\\\n\\\\t\\\\t\\\\tposition: x@y\\\\n\\\\t\\\\t\\\\tkeyValue: keyValue\\\\n\\\\t\\\\t\\\\thand: nil\\\\n\\\\t\\\\t\\\\tstamp: nil].\\\\n\\\\n\\\\t^nil! !\\\\n\\\\n!MorphicEvent class methodsFor: 'instance creation' stamp: 'ar 10/24/2000 16:32'!\\\\ntype: eventType readFrom: aStream\\\\n\\\\t^self new type: eventType readFrom: aStream! !\\\\n\\\\n\\\\n!MorphicEvent class methodsFor: '*nebraska-*nebraska-Morphic-Remote' stamp: 'ar 10/25/2000 23:32'!\\\\nfromStringArray: array\\\\n\\\\t\\\\\\\"decode an event that was encoded with encodedAsStringArray\\\\\\\"\\\\n\\\\t| type |\\\\n\\\\ttype := (array at: 1).\\\\n\\\\t(type = 'mouseMove')\\\\n\\\\t\\\\tifTrue:[^MouseMoveEvent new decodeFromStringArray: array].\\\\n\\\\t(type = 'mouseDown' or:[type = 'mouseUp']) \\\\n\\\\t\\\\tifTrue:[^MouseButtonEvent new decodeFromStringArray: array].\\\\n\\\\t(type = 'keystroke' or:[type = 'keyDown' or:[type = 'keyUp']]) \\\\n\\\\t\\\\tifTrue:[^KeyboardEvent new decodeFromStringArray: array].\\\\n\\\\t^nil! !\\\\nObject subclass: #MorphicEventDecoder\\\\n\\\\tinstanceVariableNames: 'connection'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Nebraska-Morphic-Remote'!\\\\n!MorphicEventDecoder commentStamp: '<historical>' prior: 0!\\\\ndecode messages sent via a MorphicEventEncoder.!\\\\n\\\\n\\\\n!MorphicEventDecoder methodsFor: 'handling messages' stamp: 'RAA 11/8/2000 15:15'!\\\\napply: aStringArray to: aHand\\\\n\\\\t\\\\\\\"decode aStringArray, and apply the encoded command to aHand\\\\\\\"\\\\n\\\\n\\\\taStringArray first = 'event' ifTrue: [\\\\n\\\\t\\\\t^self applyEventMessage: aStringArray to: aHand\\\\n\\\\t].\\\\n\\\\taStringArray first = 'viewExtent' ifTrue: [\\\\n\\\\t\\\\t^self applyViewExtentMessage: aStringArray to: aHand\\\\n\\\\t].\\\\n\\\\taStringArray first = 'beginBuffering' ifTrue: [\\\\n\\\\t\\\\t^aHand convertRemoteClientToBuffered\\\\n\\\\t].\\\\n\\\\n\\\\t^self error: 'unknown message type: ', aStringArray first! !\\\\n\\\\n!MorphicEventDecoder methodsFor: 'handling messages' stamp: 'ar 10/26/2000 01:55'!\\\\napplyEventMessage: aStringArray to: aHand\\\\n\\\\t| event |\\\\n\\\\tevent := MorphicEvent fromStringArray: (aStringArray copyFrom: 2 to: aStringArray size).\\\\n\\\\tevent ifNotNil:[aHand queueEvent: event].! !\\\\n\\\\n!MorphicEventDecoder methodsFor: 'handling messages' stamp: 'ls 3/25/2000 16:56'!\\\\napplyMessagesTo: aHand\\\\n\\\\t| msg |\\\\n\\\\t\\\\\\\"apply all queued events to the given hand\\\\\\\"\\\\n\\\\t\\\\\\\"currently, there is no way to extract the rawmessages.  This is simply because I didn't feel like implementing individual classes for each message -lex\\\\\\\"\\\\n\\\\t[ msg := connection nextOrNil.  msg notNil ] whileTrue: [\\\\n\\\\t\\\\tself apply: msg to: aHand ].\\\\n! !\\\\n\\\\n!MorphicEventDecoder methodsFor: 'handling messages' stamp: 'ls 4/11/2000 19:00'!\\\\napplyViewExtentMessage: aStringArray to: aHand\\\\n\\\\t| newViewExtent |\\\\n\\\\tnewViewExtent := CanvasDecoder decodePoint: aStringArray second.\\\\n\\\\n\\\\taHand setViewExtent: newViewExtent! !\\\\n\\\\n!MorphicEventDecoder methodsFor: 'handling messages' stamp: 'ls 3/24/2000 22:54'!\\\\nprocessIO\\\\n\\\\tconnection processIO! !\\\\n\\\\n\\\\n!MorphicEventDecoder methodsFor: 'initialization' stamp: 'ls 3/24/2000 21:42'!\\\\nconnection: aConnection\\\\n\\\\tconnection := aConnection! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMorphicEventDecoder class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MorphicEventDecoder class methodsFor: 'instance creation' stamp: 'ls 3/24/2000 21:43'!\\\\non: aStringArray\\\\n\\\\t^self basicNew connection: aStringArray! !\\\\nObject subclass: #MorphicEventDispatcher\\\\n\\\\tinstanceVariableNames: 'lastType lastDispatch'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Events'!\\\\n!MorphicEventDispatcher commentStamp: '<historical>' prior: 0!\\\\nThe class represents a strategy for dispatching events to some immediate child of a morph. It is used by morphs to delegate the somewhat complex action of dispatching events accurately. !\\\\n\\\\n\\\\n!MorphicEventDispatcher methodsFor: 'dispatching' stamp: 'ar 10/10/2000 01:20'!\\\\ndispatchDefault: anEvent with: aMorph\\\\n\\\\t\\\\\\\"Dispatch the given event. The event will be passed to the front-most visible submorph that contains the position wrt. to the event.\\\\\\\"\\\\n\\\\t| localEvt index child morphs inside |\\\\n\\\\t\\\\\\\"See if we're fully outside aMorphs bounds\\\\\\\"\\\\n\\\\t(aMorph fullBounds containsPoint: anEvent position) ifFalse:[^#rejected]. \\\\\\\"outside\\\\\\\"\\\\n\\\\t\\\\\\\"Traverse children\\\\\\\"\\\\n\\\\tindex _ 1.\\\\n\\\\tmorphs _ aMorph submorphs.\\\\n\\\\tinside _ false.\\\\n\\\\t[index <= morphs size] whileTrue:[\\\\n\\\\t\\\\tchild _ morphs at: index.\\\\n\\\\t\\\\tlocalEvt _ anEvent transformedBy: (child transformedFrom: aMorph).\\\\n\\\\t\\\\t(child processEvent: localEvt using: self) == #rejected ifFalse:[\\\\n\\\\t\\\\t\\\\t\\\\\\\"Not rejected. The event was in some submorph of the receiver\\\\\\\"\\\\n\\\\t\\\\t\\\\tinside _ true.\\\\n\\\\t\\\\t\\\\tlocalEvt wasHandled ifTrue:[anEvent copyHandlerState: localEvt].\\\\n\\\\t\\\\t\\\\tindex _ morphs size. \\\\\\\"break\\\\\\\"\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tindex _ index + 1.\\\\n\\\\t].\\\\n\\\\n\\\\t\\\\\\\"Check for being inside the receiver\\\\\\\"\\\\n\\\\tinside ifFalse:[inside _ aMorph containsPoint: anEvent position event: anEvent].\\\\n\\\\tinside ifTrue:[^aMorph handleEvent: anEvent].\\\\n\\\\t^#rejected\\\\n! !\\\\n\\\\n!MorphicEventDispatcher methodsFor: 'dispatching' stamp: 'ar 10/10/2000 21:13'!\\\\ndispatchDropEvent: anEvent with: aMorph\\\\n\\\\t\\\\\\\"Find the appropriate receiver for the event and let it handle it. The dispatch is similar to the default dispatch with one difference: Morphs are given the chance to reject an entire drop operation. If the operation is rejected, no drop will be executed.\\\\\\\"\\\\n\\\\t| inside index morphs child localEvt |\\\\n\\\\t\\\\\\\"Try to get out quickly\\\\\\\"\\\\n\\\\t(aMorph fullBounds containsPoint: anEvent cursorPoint)\\\\n\\\\t\\\\tifFalse:[^#rejected].\\\\n\\\\t\\\\\\\"Give aMorph a chance to repel the dropping morph\\\\\\\"\\\\n\\\\taMorph rejectDropEvent: anEvent.\\\\n\\\\tanEvent wasHandled ifTrue:[^self].\\\\n\\\\n\\\\t\\\\\\\"Go looking if any of our submorphs wants it\\\\\\\"\\\\n\\\\tindex _ 1.\\\\n\\\\tinside _ false.\\\\n\\\\tmorphs _ aMorph submorphs.\\\\n\\\\t[index <= morphs size] whileTrue:[\\\\n\\\\t\\\\tchild _ morphs at: index.\\\\n\\\\t\\\\tlocalEvt _ anEvent transformedBy: (child transformedFrom: aMorph).\\\\n\\\\t\\\\t(child processEvent: localEvt using: self) == #rejected ifFalse:[\\\\n\\\\t\\\\t\\\\tlocalEvt wasHandled ifTrue:[^anEvent wasHandled: true]. \\\\\\\"done\\\\\\\"\\\\n\\\\t\\\\t\\\\tinside _ true.\\\\n\\\\t\\\\t\\\\tindex _ morphs size]. \\\\\\\"break\\\\\\\"\\\\n\\\\t\\\\tindex _ index + 1.\\\\n\\\\t].\\\\n\\\\n\\\\tinside ifFalse:[inside _ aMorph containsPoint: anEvent cursorPoint event: anEvent].\\\\n\\\\tinside ifTrue:[^aMorph handleEvent: anEvent].\\\\n\\\\t^#rejected! !\\\\n\\\\n!MorphicEventDispatcher methodsFor: 'dispatching' stamp: 'ar 1/10/2001 21:43'!\\\\ndispatchEvent: anEvent with: aMorph\\\\n\\\\t\\\\\\\"Dispatch the given event for a morph that has chosen the receiver to dispatch its events. The method implements a shortcut for repeated dispatches of events using the same dispatcher.\\\\\\\"\\\\n\\\\tanEvent type == lastType ifTrue:[^self perform: lastDispatch with: anEvent with: aMorph].\\\\n\\\\t\\\\\\\"Otherwise classify\\\\\\\"\\\\n\\\\tlastType _ anEvent type.\\\\n\\\\tanEvent isMouse ifTrue:[\\\\n\\\\t\\\\tanEvent isMouseDown ifTrue:[\\\\n\\\\t\\\\t\\\\tlastDispatch _ #dispatchMouseDown:with:.\\\\n\\\\t\\\\t\\\\t^self dispatchMouseDown: anEvent with: aMorph]].\\\\n\\\\tanEvent type == #dropEvent ifTrue:[\\\\n\\\\t\\\\tlastDispatch _ #dispatchDropEvent:with:.\\\\n\\\\t\\\\t^self dispatchDropEvent: anEvent with: aMorph].\\\\n\\\\tlastDispatch _ #dispatchDefault:with:.\\\\n\\\\t^self dispatchDefault: anEvent with: aMorph! !\\\\n\\\\n!MorphicEventDispatcher methodsFor: 'dispatching' stamp: 'ar 10/10/2000 21:14'!\\\\ndispatchMouseDown: anEvent with: aMorph\\\\n\\\\t\\\\\\\"Find the appropriate receiver for the event and let it handle it. Default rules:\\\\n\\\\t* The top-most chain of visible, unlocked morphs containing the event position will get a chance to handle the event.\\\\n\\\\t* When travelling down the hierarchy a prospective handler for the event is installed. This prospective handler can be used by submorphs wishing to handle the mouse down for negotiating who the receiver is.\\\\n\\\\t* When travelling up, the prospective handler is always executed. The handler needs to check if the event was handled before as well as checking if somebody else's handler has been installed.\\\\n\\\\t* If another handler has been installed but the event was not handled it means that somebody up in the hierarchy wants to handle the event.\\\\n\\\\\\\"\\\\n\\\\t| globalPt localEvt index child morphs handler inside lastHandler |\\\\n\\\\t\\\\\\\"Try to get out quickly\\\\\\\"\\\\n\\\\tglobalPt _ anEvent cursorPoint.\\\\n\\\\t(aMorph fullBounds containsPoint: globalPt) ifFalse:[^#rejected].\\\\n\\\\n\\\\t\\\\\\\"Install the prospective handler for the receiver\\\\\\\"\\\\n\\\\tlastHandler _ anEvent handler. \\\\\\\"in case the mouse wasn't even in the receiver\\\\\\\"\\\\n\\\\thandler _ aMorph handlerForMouseDown: anEvent.\\\\n\\\\thandler ifNotNil:[anEvent handler: handler].\\\\n\\\\n\\\\t\\\\\\\"Now give our submorphs a chance to handle the event\\\\\\\"\\\\n\\\\tindex _ 1.\\\\n\\\\tmorphs _ aMorph submorphs.\\\\n\\\\t[index <= morphs size] whileTrue:[\\\\n\\\\t\\\\tchild _ morphs at: index.\\\\n\\\\t\\\\tlocalEvt _ anEvent transformedBy: (child transformedFrom: aMorph).\\\\n\\\\t\\\\t(child processEvent: localEvt using: self) == #rejected ifFalse:[\\\\n\\\\t\\\\t\\\\t\\\\\\\"Some child did contain the point so we're part of the top-most chain.\\\\\\\"\\\\n\\\\t\\\\t\\\\tinside _ false.\\\\n\\\\t\\\\t\\\\tlocalEvt wasHandled ifTrue:[anEvent copyHandlerState: localEvt].\\\\n\\\\t\\\\t\\\\tindex _ morphs size].\\\\n\\\\t\\\\tindex _ index + 1.\\\\n\\\\t].\\\\n\\\\n\\\\t(inside == false or:[aMorph containsPoint: anEvent cursorPoint event: anEvent]) ifTrue:[\\\\n\\\\t\\\\t\\\\\\\"Receiver is in the top-most unlocked, visible chain.\\\\\\\"\\\\n\\\\t\\\\thandler ifNotNil:[handler handleEvent: anEvent].\\\\n\\\\t\\\\t\\\\\\\"Note: Re-installing the handler is not really necessary but good style.\\\\\\\"\\\\n\\\\t\\\\tanEvent handler: lastHandler.\\\\n\\\\t\\\\t^self\\\\n\\\\t].\\\\n\\\\t\\\\\\\"Mouse was not on receiver nor any of its children\\\\\\\"\\\\n\\\\tanEvent handler: lastHandler.\\\\n\\\\t^#rejected! !\\\\nObject subclass: #MorphicEventEncoder\\\\n\\\\tinstanceVariableNames: 'connection lastEventSent'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Nebraska-Morphic-Remote'!\\\\n!MorphicEventEncoder commentStamp: '<historical>' prior: 0!\\\\nA filter which translates MorphEvent's into StringArray's.!\\\\n\\\\n\\\\n!MorphicEventEncoder methodsFor: 'initialization' stamp: 'ls 3/24/2000 21:38'!\\\\nconnection: aConnection\\\\n\\\\tconnection := aConnection! !\\\\n\\\\n\\\\n!MorphicEventEncoder methodsFor: 'network I/O' stamp: 'ls 3/24/2000 21:42'!\\\\nflush\\\\n\\\\tconnection flush! !\\\\n\\\\n!MorphicEventEncoder methodsFor: 'network I/O' stamp: 'ls 3/24/2000 21:38'!\\\\nprocessIO\\\\n\\\\tconnection processIO! !\\\\n\\\\n!MorphicEventEncoder methodsFor: 'network I/O' stamp: 'RAA 12/13/2000 08:19'!\\\\nrequestBufferedConnection\\\\n\\\\t\\\\\\\"request the opposite side to send complete screen updates rather than discrete drawing commands\\\\\\\"\\\\n\\\\t\\\\n\\\\tconnection nextPut: { 'beginBuffering' }\\\\n! !\\\\n\\\\n!MorphicEventEncoder methodsFor: 'network I/O' stamp: 'ls 3/26/2000 01:08'!\\\\nsendEvent: anEvent\\\\n\\\\t(anEvent isMouseMove and: [ anEvent = lastEventSent ]) ifTrue: [\\\\n\\\\t\\\\t\\\\\\\"save on network traffic--don't send duplicate mouse moves\\\\\\\"\\\\n\\\\t\\\\t^self ].\\\\n\\\\tlastEventSent := anEvent.\\\\n\\\\tconnection nextPut: #('event'), anEvent encodedAsStringArray! !\\\\n\\\\n!MorphicEventEncoder methodsFor: 'network I/O' stamp: 'ls 4/11/2000 18:59'!\\\\nsendViewExtent: newExtent\\\\n\\\\t\\\\\\\"inform the opposite side that our view extent has changed\\\\\\\"\\\\n\\\\t\\\\n\\\\tconnection nextPut: { 'viewExtent'. CanvasEncoder encodePoint: newExtent }\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMorphicEventEncoder class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MorphicEventEncoder class methodsFor: 'instance creation' stamp: 'ls 3/24/2000 21:43'!\\\\non: aStringArray\\\\n\\\\t^self basicNew connection: aStringArray! !\\\\nBorderedMorph subclass: #MorphicModel\\\\n\\\\tinstanceVariableNames: 'model slotName open'\\\\n\\\\tclassVariableNames: 'TimeOfError'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Kernel'!\\\\n!MorphicModel commentStamp: '<historical>' prior: 0!\\\\nMorphicModels are used to represent structures with state and behavior as well as graphical structure.  A morphicModel is usually the root of a morphic tree depicting its appearance.  The tree is constructed concretely by adding its consituent morphs to a world.\\\\n\\\\nWhen a part is named in a world, it is given a new slot in the model.  When a part is sensitized, it is named, and a set of mouse-driven methods is also generated in the model.  These may be edited to induce particular behavior.  When a variable is added through the morphic world, it is given a slot in the model, along with a set of access methods.\\\\n\\\\nIn addition for public variables (and this is the default for now), methods are generated and called in any outer model in which this model gets embedded, thus propagating variable changes outward.!\\\\n\\\\n\\\\n!MorphicModel methodsFor: 'access'!\\\\nmodel \\\\n\\\\t^ model! !\\\\n\\\\n!MorphicModel methodsFor: 'access'!\\\\nslotName\\\\n\\\\t^ slotName! !\\\\n\\\\n!MorphicModel methodsFor: 'access' stamp: '6/7/97 10:40 di'!\\\\nwantsSlot\\\\n\\\\t\\\\\\\"Override this default for models that want to be installed in theri model\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!MorphicModel methodsFor: 'accessing' stamp: 'sw 10/23/1999 22:36'!\\\\nmodelOrNil\\\\n\\\\t^ model! !\\\\n\\\\n\\\\n!MorphicModel methodsFor: 'caching' stamp: 'sw 3/6/2001 11:22'!\\\\nreleaseCachedState\\\\n\\\\t\\\\\\\"Release cached state of the receiver\\\\\\\"\\\\n\\\\n\\\\t(model ~~ self and: [model respondsTo: #releaseCachedState]) ifTrue:\\\\n\\\\t\\\\t[model releaseCachedState].\\\\n\\\\tsuper releaseCachedState! !\\\\n\\\\n\\\\n!MorphicModel methodsFor: 'classification' stamp: 'ar 10/5/2000 16:40'!\\\\nisMorphicModel\\\\n\\\\t^true! !\\\\n\\\\n\\\\n!MorphicModel methodsFor: 'compilation'!\\\\naddPartNameLike: className withValue: aMorph\\\\n\\\\t| otherNames i default partName stem |\\\\n\\\\tstem _ className first asLowercase asString , className allButFirst.\\\\n\\\\totherNames _ self class allInstVarNames.\\\\n\\\\ti _ 1.\\\\n\\\\t[otherNames includes: (default _ stem, i printString)]\\\\n\\\\t\\\\twhileTrue: [i _ i + 1].\\\\n\\\\tpartName _ FillInTheBlank\\\\n\\\\t\\\\trequest: 'Please give this part a name'\\\\n\\\\t\\\\tinitialAnswer: default.\\\\n\\\\t(otherNames includes: partName)\\\\n\\\\t\\\\tifTrue: [self inform: 'Sorry, that name is already used'. ^ nil].\\\\n\\\\tself class addInstVarName: partName.\\\\n\\\\tself instVarAt: self class instSize put: aMorph.  \\\\\\\"Assumes added as last field\\\\\\\"\\\\n\\\\t^ partName! !\\\\n\\\\n!MorphicModel methodsFor: 'compilation' stamp: 'tk 4/18/97'!\\\\ncompileAccessForSlot: aSlotName\\\\n\\\\t\\\\\\\"Write the method to get at this inst var.  \\\\\\\"\\\\n\\\\t\\\\\\\"Instead call the right thing to make this happen?\\\\\\\"\\\\n\\\\n\\\\t| s  |\\\\n\\\\ts _ WriteStream on: (String new: 2000).\\\\n\\\\ts nextPutAll: aSlotName; cr; tab; nextPutAll: '^', aSlotName.\\\\n\\\\tself class\\\\n\\\\t\\\\tcompile: s contents\\\\n\\\\t\\\\tclassified: 'public access'\\\\n\\\\t\\\\tnotifying: nil.\\\\n! !\\\\n\\\\n!MorphicModel methodsFor: 'compilation'!\\\\ncompilePropagationMethods\\\\n\\\\t| varName |\\\\n\\\\t(self class organization listAtCategoryNamed: 'private - propagation' asSymbol)\\\\n\\\\t\\\\tdo: [:sel | varName _ sel allButLast.\\\\n\\\\t\\\\t\\\\tmodel class compilePropagationForVarName: varName slotName: slotName]! !\\\\n\\\\n!MorphicModel methodsFor: 'compilation'!\\\\nnameFor: aMorph\\\\n\\\\t\\\\\\\"Return the name of the slot containing the given morph or nil if that morph has not been named.\\\\\\\"\\\\n\\\\n\\\\t| allNames start |\\\\n\\\\tallNames _ self class allInstVarNames.\\\\n\\\\tstart _ MorphicModel allInstVarNames size + 1.\\\\n\\\\tstart to: allNames size do: [:i |\\\\n\\\\t\\\\t(self instVarAt: i) == aMorph ifTrue: [^ allNames at: i]].\\\\n\\\\t^ nil\\\\n! !\\\\n\\\\n!MorphicModel methodsFor: 'compilation'!\\\\npropagate: value as: partStoreSelector\\\\n\\\\tmodel ifNil: [^ self].\\\\n\\\\\\\"\\\\n\\\\tLater we can cache this for more speed as follows...\\\\n\\\\t(partName == cachedPartName and: [slotName == cachedSlotName])\\\\n\\\\t\\\\tifFalse: [cachedPartName _ partName.\\\\n\\\\t\\\\t\\\\t\\\\tcachedSlotName _ slotName.\\\\n\\\\t\\\\t\\\\t\\\\tcachedStoreSelector _ (slotName , partStoreSelector) asSymbol].\\\\n\\\\tmodel perform: cachedStoreSelector with: value].\\\\n\\\\\\\"\\\\n\\\\tmodel perform: (self slotSelectorFor: partStoreSelector) with: value! !\\\\n\\\\n!MorphicModel methodsFor: 'compilation' stamp: 'tk 10/31/97 12:33'!\\\\nremoveAll\\\\n\\\\t\\\\\\\"Clear out all script methods and subpart instance variables in me.  Start over.\\\\\\\"\\\\n\\\\t\\\\\\\"self removeAll\\\\\\\"\\\\n\\\\t\\\\\\\"MorphicModel2 removeAll\\\\\\\"\\\\n\\\\nself class == MorphicModel ifTrue: [^ self].\\\\t\\\\\\\"Must be a subclass!!\\\\\\\"\\\\nself class removeCategory: 'scripts'.\\\\nself class instVarNames do: [:nn | self class removeInstVarName: nn].! !\\\\n\\\\n!MorphicModel methodsFor: 'compilation'!\\\\nslotSelectorFor: selectorBody\\\\n\\\\t| selector |\\\\n\\\\tmodel ifNil: [^ nil].\\\\n\\\\t\\\\\\\"Make up selector from slotname if any\\\\\\\"\\\\n\\\\tselector _ (slotName ifNil: [selectorBody]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifNotNil: [slotName , selectorBody]) asSymbol.\\\\n\\\\t(model canUnderstand: selector) ifFalse:\\\\n\\\\t\\\\t[self halt: 'Compiling a null response for ' , model class name , '>>' , selector].\\\\n\\\\t^ selector! !\\\\n\\\\n!MorphicModel methodsFor: 'compilation'!\\\\nuse: cachedSelector orMakeModelSelectorFor: selectorBody in: selectorBlock\\\\n\\\\t| selector |\\\\n\\\\tmodel ifNil: [^ nil].\\\\n\\\\tcachedSelector ifNil:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"Make up selector from slotname if any\\\\\\\"\\\\n\\\\t\\\\t\\\\tselector _ (slotName ifNil: [selectorBody]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifNotNil: [slotName , selectorBody]) asSymbol.\\\\n\\\\t\\\\t\\\\t(model class canUnderstand: selector) ifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[(self confirm: 'Shall I compile a null response for'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t, Character cr asString\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t, model class name , '>>' , selector)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [self halt].\\\\n\\\\t\\\\t\\\\t\\\\tmodel class compile: (String streamContents:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:s | selector keywords doWithIndex:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:k :i | s nextPutAll: k , ' arg' , i printString].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ts cr; nextPutAll: '\\\\\\\"Automatically generated null response.\\\\\\\"'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ts cr; nextPutAll: '\\\\\\\"Add code below for appropriate behavior...\\\\\\\"'.])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tclassified: 'input events'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnotifying: nil]]\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t[selector _ cachedSelector].\\\\n\\\\t^ selectorBlock value: selector! !\\\\n\\\\n\\\\n!MorphicModel methodsFor: 'debug and other' stamp: '6/7/97 10:43 di'!\\\\ninstallModelIn: aWorld\\\\n\\\\n\\\\tself wantsSlot ifFalse: [^ self].  \\\\\\\"No real need to install\\\\\\\"\\\\n\\\\tslotName _ aWorld model addPartNameLike: self class name withValue: self.\\\\n\\\\tslotName ifNil: [^ self].  \\\\\\\"user chose bad slot name\\\\\\\"\\\\n\\\\tself model: aWorld model slotName: slotName.\\\\n\\\\tself compilePropagationMethods.\\\\n\\\\taWorld model compileAccessForSlot: slotName.\\\\n! !\\\\n\\\\n\\\\n!MorphicModel methodsFor: 'drag and drop' stamp: 'di 6/22/97 23:17'!\\\\nallowSubmorphExtraction\\\\n\\\\t^ self isOpen\\\\n! !\\\\n\\\\n!MorphicModel methodsFor: 'drag and drop' stamp: 'di 6/22/97 23:16'!\\\\nisOpen\\\\n\\\\t\\\\\\\"Support drag/drop and other edits.\\\\\\\"\\\\n\\\\t^ open! !\\\\n\\\\n\\\\n!MorphicModel methodsFor: 'geometry'!\\\\nnewBounds: newBounds\\\\n\\\\tself bounds: newBounds! !\\\\n\\\\n!MorphicModel methodsFor: 'geometry'!\\\\nrecomputeBounds\\\\n\\\\n\\\\t| bnds |\\\\n\\\\tbnds _ submorphs first bounds.\\\\n\\\\tbounds _ bnds origin corner: bnds corner. \\\\\\\"copy it!!\\\\\\\"\\\\n\\\\tfullBounds _ nil.\\\\n\\\\tbounds _ self fullBounds.\\\\n! !\\\\n\\\\n\\\\n!MorphicModel methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:35'!\\\\ndefaultBorderColor\\\\n\\\\t\\\\\\\"answer the default border color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color yellow! !\\\\n\\\\n!MorphicModel methodsFor: 'initialization' stamp: 'dgd 3/7/2003 15:07'!\\\\ndefaultBounds\\\\n\\\\\\\"answer the default bounds for the receiver\\\\\\\"\\\\n\\\\t^ 0 @ 0 corner: 200 @ 100! !\\\\n\\\\n!MorphicModel methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:28'!\\\\ndefaultColor\\\\n\\\\t\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color transparent! !\\\\n\\\\n!MorphicModel methodsFor: 'initialization' stamp: 'tk 4/15/97'!\\\\nduplicate: newGuy from: oldGuy\\\\n\\\\t\\\\\\\"oldGuy has just been duplicated and will stay in this world.  Make sure all the MorphicModel requirements are carried out for the copy.  Ask user to rename it.  \\\\\\\"\\\\n\\\\n\\\\tnewGuy installModelIn: oldGuy world.\\\\n\\\\tnewGuy copySlotMethodsFrom: oldGuy slotName.! !\\\\n\\\\n!MorphicModel methodsFor: 'initialization' stamp: 'dgd 2/14/2003 20:47'!\\\\ninitialize\\\\n\\\\t\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\\\\"\\\\\\\"\\\\n\\\\topen _ false! !\\\\n\\\\n!MorphicModel methodsFor: 'initialization' stamp: 'jm\\\\n 8/20/1998 09:08'!\\\\nmodel: anObject\\\\n\\\\t\\\\\\\"Set my model and make me me a dependent of the given object.\\\\\\\"\\\\n\\\\n\\\\tmodel ifNotNil: [model removeDependent: self].\\\\n\\\\tanObject ifNotNil: [anObject addDependent: self].\\\\n\\\\tmodel _ anObject.\\\\n! !\\\\n\\\\n!MorphicModel methodsFor: 'initialization' stamp: 'di 6/21/97 13:25'!\\\\nmodel: thang slotName: nameOfThisPart\\\\n\\\\tmodel _ thang.\\\\n\\\\tslotName _ nameOfThisPart.\\\\n\\\\topen _ false.! !\\\\n\\\\n\\\\n!MorphicModel methodsFor: 'menu' stamp: 'dgd 8/30/2003 21:53'!\\\\naddCustomMenuItems: aCustomMenu hand: aHandMorph\\\\n\\\\n\\\\tsuper addCustomMenuItems: aCustomMenu hand: aHandMorph.\\\\n\\\\tmodel ifNotNil: [model addModelMenuItemsTo: aCustomMenu forMorph: self hand: aHandMorph].\\\\n\\\\tself isOpen ifTrue: [aCustomMenu add: 'close editing' translated action: #closeToEdits]\\\\n\\\\t\\\\t\\\\tifFalse: [aCustomMenu add: 'open editing' translated action: #openToEdits].\\\\n! !\\\\n\\\\n!MorphicModel methodsFor: 'menu' stamp: 'di 6/20/97 15:36'!\\\\ncloseToEdits\\\\n\\\\t\\\\\\\"Disable this morph's ability to add and remove morphs via drag-n-drop.\\\\\\\"\\\\n\\\\n\\\\topen _ false\\\\n! !\\\\n\\\\n!MorphicModel methodsFor: 'menu' stamp: 'di 6/20/97 15:36'!\\\\nopenToEdits\\\\n\\\\t\\\\\\\"Enable this morph's ability to add and remove morphs via drag-n-drop.\\\\\\\"\\\\n\\\\n\\\\topen _ true\\\\n! !\\\\n\\\\n\\\\n!MorphicModel methodsFor: 'naming' stamp: 'dgd 2/21/2003 23:00'!\\\\nchoosePartName\\\\n\\\\t\\\\\\\"When I am renamed, get a slot, make default methods, move any existing methods.  ** Does not clean up old inst var name or methods**  \\\\\\\"\\\\n\\\\n\\\\t| old |\\\\n\\\\told := slotName.\\\\n\\\\tsuper choosePartName.\\\\n\\\\tslotName ifNil: [^self].\\\\t\\\\\\\"user chose bad slot name\\\\\\\"\\\\n\\\\tself model: self world model slotName: slotName.\\\\n\\\\told isNil\\\\n\\\\t\\\\tifTrue: [self compilePropagationMethods]\\\\n\\\\t\\\\tifFalse: [self copySlotMethodsFrom: old]\\\\n\\\\t\\\\\\\"old ones not erased!!\\\\\\\"! !\\\\n\\\\n\\\\n!MorphicModel methodsFor: 'printing'!\\\\ninitString\\\\n\\\\n\\\\t^ String streamContents:\\\\n\\\\t\\\\t[:s | s nextPutAll: self class name;\\\\n\\\\t\\\\t\\\\tnextPutAll: ' newBounds: (';\\\\n\\\\t\\\\t\\\\tprint: bounds;\\\\n\\\\t\\\\t\\\\tnextPutAll: ') model: self slotName: ';\\\\n\\\\t\\\\t\\\\tprint: slotName]! !\\\\n\\\\n\\\\n!MorphicModel methodsFor: 'submorphs-accessing' stamp: 'dgd 2/22/2003 18:51'!\\\\nallKnownNames\\\\n\\\\t\\\\\\\"Return a list of all known names based on the scope of the receiver.  If the receiver is a member of a uniclass, incorporate the original 1997 logic that queries the known names of the values of all the instance variables.\\\\\\\"\\\\n\\\\n\\\\t| superNames |\\\\n\\\\tsuperNames := super allKnownNames.\\\\t\\\\\\\"gather them from submorph tree\\\\\\\"\\\\n\\\\t^self belongsToUniClass \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[superNames , (self instanceVariableValues \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tselect: [:e | e notNil and: [e knownName notNil]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tthenCollect: [:e | e knownName])]\\\\n\\\\t\\\\tifFalse: [superNames]! !\\\\n\\\\n\\\\n!MorphicModel methodsFor: 'submorphs-add/remove' stamp: 'gm 2/22/2003 12:51'!\\\\ndelete\\\\n\\\\t(model isMorphicModel) ifFalse: [^super delete].\\\\n\\\\tslotName ifNotNil: \\\\n\\\\t\\\\t\\\\t[(PopUpMenu confirm: 'Shall I remove the slot ' , slotName \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t, '\\\\nalong with all associated methods?') \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[(model class selectors select: [:s | s beginsWith: slotName]) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:s | model class removeSelector: s].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(model class instVarNames includes: slotName) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [model class removeInstVarName: slotName]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[(PopUpMenu \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tconfirm: '...but should I at least dismiss this morph?\\\\n[choose no to leave everything unchanged]') \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [^self]]].\\\\n\\\\tsuper delete! !\\\\n\\\\n\\\\n!MorphicModel methodsFor: '*MorphicExtras-compilation'!\\\\ncompileInitMethods\\\\n\\\\t| s nodeDict varNames |\\\\n\\\\tnodeDict _ IdentityDictionary new.\\\\n\\\\ts _ WriteStream on: (String new: 2000).\\\\n\\\\tvarNames _ self class allInstVarNames.\\\\n\\\\ts nextPutAll: 'initMorph'.\\\\n\\\\t3 to: self class instSize do:\\\\n\\\\t\\\\t[:i | (self instVarAt: i) isMorph ifTrue:\\\\n\\\\t\\\\t\\\\t[s cr; tab; nextPutAll: (varNames at: i) , ' _ '.\\\\n\\\\t\\\\t\\\\ts nextPutAll: (self instVarAt: i) initString; nextPutAll: '.'.\\\\n\\\\t\\\\t\\\\tnodeDict at: (self instVarAt: i) put: (varNames at: i)]].\\\\n\\\\tsubmorphs do: \\\\n\\\\t\\\\t[:m | s cr; tab; nextPutAll: 'self addMorph: '.\\\\n\\\\t\\\\tm printConstructorOn: s indent: 1 nodeDict: nodeDict.\\\\n\\\\t\\\\ts nextPutAll: '.'].\\\\n\\\\tself class\\\\n\\\\t\\\\tcompile: s contents\\\\n\\\\t\\\\tclassified: 'initialization'\\\\n\\\\t\\\\tnotifying: nil.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMorphicModel class\\\\n\\\\tinstanceVariableNames: 'prototype'!\\\\n\\\\n!MorphicModel class methodsFor: 'compilation' stamp: 'tk 3/10/98 18:03'!\\\\ncategoryForSubclasses\\\\n\\\\t^ 'Morphic-Models'! !\\\\n\\\\n!MorphicModel class methodsFor: 'compilation' stamp: 'sw 5/23/2001 13:51'!\\\\nchooseNewName\\\\n\\\\t\\\\\\\"Choose a new name for the receiver, persisting until an acceptable name is provided or until the existing name is resubmitted\\\\\\\"\\\\n\\\\n\\\\t| oldName newName |\\\\n\\\\toldName _ self name.\\\\n\\\\t\\\\t[newName _ (FillInTheBlank request: 'Please give this Model a name'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tinitialAnswer: oldName) asSymbol.\\\\n\\\\t\\\\tnewName = oldName ifTrue: [^ self].\\\\n\\\\t\\\\tSmalltalk includesKey: newName]\\\\n\\\\t\\\\twhileTrue:\\\\n\\\\t\\\\t[self inform: 'Sorry, that name is already in use.'].\\\\n\\\\tself rename: newName.! !\\\\n\\\\n!MorphicModel class methodsFor: 'compilation'!\\\\ncompileAccessorsFor: varName\\\\n\\\\tself compile: (\\\\n'&var\\\\n\\\\t\\\\\\\"Return the value of &var\\\\\\\"\\\\n\\\\t^ &var'\\\\n\\\\t\\\\t\\\\tcopyReplaceAll: '&var' with: varName)\\\\n\\\\t\\\\tclassified: 'public access' notifying: nil.\\\\n\\\\tself compile: (\\\\n'&varPut: newValue\\\\n\\\\t\\\\\\\"Assign newValue to &var.\\\\n\\\\tAdd code below to update related graphics appropriately...\\\\\\\"\\\\n\\\\n\\\\t&var _ newValue.'\\\\n\\\\t\\\\t\\\\tcopyReplaceAll: '&var' with: varName)\\\\n\\\\t\\\\tclassified: 'public access' notifying: nil.\\\\n\\\\tself compile: (\\\\n'&var: newValue\\\\n\\\\t\\\\\\\"Assigns newValue to &var and updates owner\\\\\\\"\\\\n\\\\t&var _ newValue.\\\\n\\\\tself propagate: &var as: ''&var:'''\\\\n\\\\t\\\\t\\\\tcopyReplaceAll: '&var' with: varName)\\\\n\\\\t\\\\tclassified: 'private - propagation' notifying: nil.\\\\n! !\\\\n\\\\n!MorphicModel class methodsFor: 'compilation'!\\\\ncompilePropagationForVarName: varName slotName: slotName\\\\n\\\\tself compile: ((\\\\n'&slot&var: newValue\\\\n\\\\t\\\\\\\"The value of &var in &slot has changed to newValue.\\\\n\\\\tThis value can be read elsewhere in code with\\\\n\\\\t\\\\t&slot &var\\\\n\\\\tand it can be stored into with\\\\n\\\\t\\\\t&slot &varPut: someValue\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Add code for appropriate response here...\\\\\\\"'\\\\n\\\\t\\\\t\\\\tcopyReplaceAll: '&var' with: varName)\\\\n\\\\t\\\\t\\\\tcopyReplaceAll: '&slot' with: slotName)\\\\n\\\\t\\\\tclassified: 'input events' notifying: nil.\\\\n! !\\\\n\\\\n\\\\n!MorphicModel class methodsFor: 'compiling' stamp: 'sw 5/13/1998 14:33'!\\\\nacceptsLoggingOfCompilation\\\\n\\\\t\\\\\\\"Dont log sources for my automatically-generated subclasses.  Can easily switch this back when it comes to deal with Versions, etc.\\\\\\\"\\\\n\\\\n\\\\t^ self == MorphicModel or: [(name last isDigit) not]! !\\\\n\\\\n!MorphicModel class methodsFor: 'compiling' stamp: 'sw 8/4/97 17:16'!\\\\nwantsChangeSetLogging\\\\n\\\\t\\\\\\\"Log changes for MorphicModel itself and for things like PlayWithMe2, but not for automatically-created subclasses like MorphicModel1, MorphicModel2, etc.\\\\\\\"\\\\n\\\\n\\\\t^ self == MorphicModel or:\\\\n\\\\t\\\\t[(self class name beginsWith: 'Morphic') not]! !\\\\n\\\\n\\\\n!MorphicModel class methodsFor: 'housekeeping' stamp: 'jm 7/30/97 16:40'!\\\\nremoveUninstantiatedModels\\\\n\\\\t\\\\\\\"With the user's permission, remove the classes of any models that have neither instances nor subclasses.\\\\\\\"\\\\n\\\\t\\\\\\\"MorphicModel removeUninstantiatedModels\\\\\\\"\\\\n\\\\n\\\\t| candidatesForRemoval ok |\\\\n\\\\tSmalltalk garbageCollect.\\\\n\\\\tcandidatesForRemoval _\\\\n\\\\t\\\\tMorphicModel subclasses select: [:c |\\\\n\\\\t\\\\t\\\\t(c instanceCount = 0) and: [c subclasses size = 0]].\\\\n\\\\tcandidatesForRemoval do: [:c |\\\\n\\\\t\\\\tok _ self confirm: 'Are you certain that you\\\\nwant to delete the class ', c name, '?'.\\\\n\\\\t\\\\tok ifTrue: [c removeFromSystem]].\\\\n! !\\\\n\\\\n\\\\n!MorphicModel class methodsFor: 'instance creation' stamp: 'tk 8/13/1998 12:58'!\\\\nnew\\\\n\\\\t\\\\\\\"Return a copy of the prototype, if there is one.\\\\n\\\\tOtherwise create a new instance normally.\\\\\\\"\\\\n\\\\n\\\\tself hasPrototype ifTrue: [^ prototype veryDeepCopy].\\\\n\\\\t^ super new\\\\n! !\\\\n\\\\n!MorphicModel class methodsFor: 'instance creation' stamp: 'di 6/22/97 09:27'!\\\\nnewBounds: bounds model: thang slotName: nameOfThisPart\\\\n\\\\t^ (super new model: thang slotName: nameOfThisPart)\\\\n\\\\t\\\\tnewBounds: bounds! !\\\\n\\\\n\\\\n!MorphicModel class methodsFor: 'new-morph participation' stamp: 'di 2/21/98 11:01'!\\\\nincludeInNewMorphMenu\\\\n\\\\t\\\\\\\"Only include Models that are appropriate\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!MorphicModel class methodsFor: 'prototype access'!\\\\nprototype\\\\n\\\\t\\\\\\\"Return the prototype for this morph.\\\\\\\"\\\\n\\\\n\\\\t^ prototype\\\\n! !\\\\n\\\\n!MorphicModel class methodsFor: 'prototype access' stamp: 'gm 2/22/2003 19:13'!\\\\nprototype: aMorph\\\\n\\\\t\\\\\\\"Store a copy of the given morph as a prototype to be copied to make new instances.\\\\\\\"\\\\n\\\\n\\\\taMorph ifNil: [prototype _ nil. ^ self].\\\\n\\\\n\\\\tprototype _ aMorph veryDeepCopy.\\\\n\\\\t(prototype isMorphicModel) ifTrue: \\\\n\\\\t\\\\t[prototype model: nil slotName: nil].\\\\n! !\\\\n\\\\n\\\\n!MorphicModel class methodsFor: 'queries'!\\\\nhasPrototype\\\\n\\\\t\\\\\\\"Return true if there is a prototype for this morph.\\\\\\\"\\\\n\\\\n\\\\t^ prototype ~~ nil\\\\n! !\\\\n\\\\n\\\\n!MorphicModel class methodsFor: 'subclass creation'!\\\\nnewSubclass\\\\n\\\\t| i className |\\\\n\\\\ti _ 1.\\\\n\\\\t[className _ (self name , i printString) asSymbol.\\\\n\\\\t Smalltalk includesKey: className]\\\\n\\\\t\\\\twhileTrue: [i _ i + 1].\\\\n\\\\n\\\\t^ self subclass: className\\\\n\\\\t\\\\tinstanceVariableNames: ''\\\\n\\\\t\\\\tclassVariableNames: ''\\\\n\\\\t\\\\tpoolDictionaries: ''\\\\n\\\\t\\\\tcategory: 'Morphic-Models'! !\\\\n\\\\n\\\\n!MorphicModel class methodsFor: 'testing' stamp: 'tk 3/15/98 20:13'!\\\\nofficialClass\\\\n\\\\t\\\\\\\"We want to make a new instance of the receiver, which is a subclass of MorphicModel.  Answer who to make a new subclass of.  Also used to tell if a given class is a UniClass, existing only for its single instance.\\\\\\\"\\\\n\\\\n\\\\t^ self name last isDigit ifTrue: [MorphicModel] ifFalse: [self]\\\\n\\\\t\\\\t\\\\\\\"MorphicModel7 can not have subclasses, but Slider and SystemWindow may\\\\\\\"! !\\\\n\\\\n\\\\n!MorphicModel class methodsFor: '*eToys-queries' stamp: 'sw 2/27/2002 14:58'!\\\\nbaseUniclass\\\\n\\\\t\\\\\\\"Answer the uniclass that new instances should be instances of.  This protocol is primarily intended for the Player lineage, but can get sent to a MorphicModel subclass when the project-loading mechanism is scrambling to fix up projects that have naming conflicts with the project being loaded.\\\\\\\"\\\\n\\\\n\\\\t| curr |\\\\n\\\\tcurr _ self.\\\\n\\\\t[curr theNonMetaClass superclass name endsWithDigit]\\\\n\\\\t\\\\twhileTrue:\\\\n\\\\t\\\\t\\\\t[curr _ curr superclass].\\\\n\\\\t^ curr\\\\n\\\\n\\\\\\\"PlayWithMe1 baseUniclass\\\\\\\"! !\\\\nAppRegistry subclass: #MorphicTextEditor\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Applications'!\\\\nToolBuilder subclass: #MorphicToolBuilder\\\\n\\\\tinstanceVariableNames: 'widgets panes parentMenu'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'ToolBuilder-Morphic'!\\\\n!MorphicToolBuilder commentStamp: 'ar 2/11/2005 15:02' prior: 0!\\\\nThe Morphic tool builder.!\\\\n\\\\n\\\\n!MorphicToolBuilder methodsFor: 'opening' stamp: 'ar 6/5/2005 12:40'!\\\\nclose: aWidget\\\\n\\\\t\\\\\\\"Close a previously opened widget\\\\\\\"\\\\n\\\\taWidget delete! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'opening' stamp: 'ar 2/28/2006 17:39'!\\\\nopen: anObject\\\\n\\\\t\\\\\\\"Build and open the object. Answer the widget opened.\\\\\\\"\\\\n\\\\t| morph |\\\\n\\\\tmorph := self build: anObject.\\\\n\\\\t(morph isKindOf: MenuMorph)\\\\n\\\\t\\\\tifTrue:[morph popUpInWorld: World].\\\\n\\\\t(morph isKindOf: SystemWindow)\\\\n\\\\t\\\\tifTrue:[morph openInWorldExtent: morph extent]\\\\n\\\\t\\\\tifFalse:[morph openInWorld].\\\\n\\\\t^morph! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'opening' stamp: 'ar 6/5/2005 12:40'!\\\\nopen: anObject label: aString\\\\n\\\\t\\\\\\\"Build an open the object, labeling it appropriately.  Answer the widget opened.\\\\\\\"\\\\n\\\\t| window |\\\\n\\\\twindow := self open: anObject.\\\\n\\\\twindow setLabel: aString.\\\\n\\\\t^window! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'opening' stamp: 'ar 6/5/2005 12:41'!\\\\nrunModal: aWidget\\\\n\\\\t\\\\\\\"Run the (previously opened) widget modally, e.g., \\\\n\\\\tdo not return control to the sender before the user has responded.\\\\\\\"\\\\n\\\\t[aWidget world notNil] whileTrue: [\\\\n\\\\t\\\\taWidget outermostWorldMorph doOneCycle.\\\\n\\\\t].\\\\n! !\\\\n\\\\n\\\\n!MorphicToolBuilder methodsFor: 'pluggable widgets' stamp: 'ar 2/12/2005 14:22'!\\\\nbuildPluggableActionButton: aSpec\\\\n\\\\t| button |\\\\n\\\\tbutton := self buildPluggableButton: aSpec.\\\\n\\\\tbutton beActionButton.\\\\n\\\\t^button! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'pluggable widgets' stamp: 'ar 7/14/2005 22:27'!\\\\nbuildPluggableButton: aSpec\\\\n\\\\t| widget label state action enabled |\\\\n\\\\tlabel := aSpec label.\\\\n\\\\tstate := aSpec state.\\\\n\\\\taction := aSpec action.\\\\n\\\\twidget := PluggableButtonMorphPlus on: aSpec model\\\\n\\\\t\\\\t\\\\t\\\\tgetState: (state isSymbol ifTrue:[state])\\\\n\\\\t\\\\t\\\\t\\\\taction: nil\\\\n\\\\t\\\\t\\\\t\\\\tlabel: (label isSymbol ifTrue:[label]).\\\\n\\\\tself register: widget id: aSpec name.\\\\n\\\\tenabled := aSpec enabled.\\\\n\\\\tenabled isSymbol\\\\n\\\\t\\\\tifTrue:[widget getEnabledSelector: enabled]\\\\n\\\\t\\\\tifFalse:[widget enabled:enabled].\\\\n\\\\twidget action: action.\\\\n\\\\twidget getColorSelector: aSpec color.\\\\n\\\\twidget offColor: Color transparent.\\\\n\\\\taSpec help ifNotNil:[widget setBalloonText: aSpec help].\\\\n\\\\t(label isSymbol or:[label == nil]) ifFalse:[widget label: label].\\\\n\\\\tself setFrame: aSpec frame in: widget.\\\\n\\\\tparent ifNotNil:[self add: widget to: parent].\\\\n\\\\t^widget! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'pluggable widgets' stamp: 'md 8/15/2005 17:55'!\\\\nbuildPluggableInputField: aSpec\\\\n\\\\t| widget |\\\\n\\\\twidget := self buildPluggableText: aSpec.\\\\n\\\\twidget acceptOnCR: true.\\\\n\\\\twidget hideScrollBarsIndefinitely.\\\\n\\\\t^widget! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'pluggable widgets' stamp: 'ar 7/15/2005 12:07'!\\\\nbuildPluggableList: aSpec\\\\n\\\\t| widget listClass getIndex setIndex |\\\\n\\\\taSpec getSelected ifNil:[\\\\n\\\\t\\\\tlistClass := PluggableListMorphPlus.\\\\n\\\\t\\\\tgetIndex := aSpec getIndex.\\\\n\\\\t\\\\tsetIndex := aSpec setIndex.\\\\n\\\\t] ifNotNil:[\\\\n\\\\t\\\\tlistClass := PluggableListMorphByItemPlus.\\\\n\\\\t\\\\tgetIndex := aSpec getSelected.\\\\n\\\\t\\\\tsetIndex := aSpec setSelected.\\\\n\\\\t].\\\\n\\\\twidget := listClass on: aSpec model\\\\n\\\\t\\\\t\\\\t\\\\tlist: aSpec list\\\\n\\\\t\\\\t\\\\t\\\\tselected: getIndex\\\\n\\\\t\\\\t\\\\t\\\\tchangeSelected: setIndex\\\\n\\\\t\\\\t\\\\t\\\\tmenu: aSpec menu\\\\n\\\\t\\\\t\\\\t\\\\tkeystroke: aSpec keyPress.\\\\n\\\\tself register: widget id: aSpec name.\\\\n\\\\twidget dragItemSelector: aSpec dragItem.\\\\n\\\\twidget dropItemSelector: aSpec dropItem.\\\\n\\\\twidget wantsDropSelector: aSpec dropAccept.\\\\n\\\\twidget autoDeselect: aSpec autoDeselect.\\\\n\\\\tself setFrame: aSpec frame in: widget.\\\\n\\\\tparent ifNotNil:[self add: widget to: parent].\\\\n\\\\tpanes ifNotNil:[\\\\n\\\\t\\\\taSpec list ifNotNil:[panes add: aSpec list].\\\\n\\\\t].\\\\n\\\\t^widget! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'pluggable widgets' stamp: 'ar 7/14/2005 22:27'!\\\\nbuildPluggableMultiSelectionList: aSpec\\\\n\\\\t| widget listClass |\\\\n\\\\taSpec getSelected ifNotNil:[^self error:'There is no PluggableListMorphOfManyByItem'].\\\\n\\\\tlistClass := PluggableListMorphOfMany.\\\\n\\\\twidget := listClass on: aSpec model\\\\n\\\\t\\\\tlist: aSpec list\\\\n\\\\t\\\\tprimarySelection: aSpec getIndex\\\\n\\\\t\\\\tchangePrimarySelection: aSpec setIndex\\\\n\\\\t\\\\tlistSelection: aSpec getSelectionList\\\\n\\\\t\\\\tchangeListSelection: aSpec setSelectionList\\\\n\\\\t\\\\tmenu: aSpec menu.\\\\n\\\\tself register: widget id: aSpec name.\\\\n\\\\twidget keystrokeActionSelector: aSpec keyPress.\\\\n\\\\tself setFrame: aSpec frame in: widget.\\\\n\\\\tparent ifNotNil:[self add: widget to: parent].\\\\n\\\\tpanes ifNotNil:[\\\\n\\\\t\\\\taSpec list ifNotNil:[panes add: aSpec list].\\\\n\\\\t].\\\\n\\\\t^widget! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'pluggable widgets' stamp: 'ar 7/14/2005 22:28'!\\\\nbuildPluggablePanel: aSpec\\\\n\\\\t| widget children |\\\\n\\\\twidget := PluggablePanelMorph new.\\\\n\\\\tself register: widget id: aSpec name.\\\\n\\\\twidget model: aSpec model.\\\\n\\\\twidget color: Color transparent.\\\\n\\\\twidget clipSubmorphs: true.\\\\n\\\\tchildren := aSpec children.\\\\n\\\\tchildren isSymbol ifTrue:[\\\\n\\\\t\\\\twidget getChildrenSelector: children.\\\\n\\\\t\\\\twidget update: children.\\\\n\\\\t\\\\tchildren := #().\\\\n\\\\t].\\\\n\\\\tself buildAll: children in: widget.\\\\n\\\\tself setFrame: aSpec frame in: widget.\\\\n\\\\tparent ifNotNil:[self add: widget to: parent].\\\\n\\\\tself setLayout: aSpec layout in: widget.\\\\n\\\\t^widget! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'pluggable widgets' stamp: 'ar 7/14/2005 22:28'!\\\\nbuildPluggableText: aSpec\\\\n\\\\t| widget |\\\\n\\\\twidget := PluggableTextMorphPlus on: aSpec model\\\\n\\\\t\\\\t\\\\t\\\\ttext: aSpec getText \\\\n\\\\t\\\\t\\\\t\\\\taccept: aSpec setText\\\\n\\\\t\\\\t\\\\t\\\\treadSelection: aSpec selection \\\\n\\\\t\\\\t\\\\t\\\\tmenu: aSpec menu.\\\\n\\\\tself register: widget id: aSpec name.\\\\n\\\\twidget getColorSelector: aSpec color.\\\\n\\\\tself setFrame: aSpec frame in: widget.\\\\n\\\\tparent ifNotNil:[self add: widget to: parent].\\\\n\\\\tpanes ifNotNil:[\\\\n\\\\t\\\\taSpec getText ifNotNil:[panes add: aSpec getText].\\\\n\\\\t].\\\\n\\\\t^widget! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'pluggable widgets' stamp: 'ar 7/15/2005 12:10'!\\\\nbuildPluggableTree: aSpec\\\\n\\\\t| widget |\\\\n\\\\twidget := PluggableTreeMorph new.\\\\n\\\\tself register: widget id: aSpec name.\\\\n\\\\twidget model: aSpec model.\\\\n\\\\twidget getSelectedPathSelector: aSpec getSelectedPath.\\\\n\\\\twidget setSelectedSelector: aSpec setSelected.\\\\n\\\\twidget getChildrenSelector: aSpec getChildren.\\\\n\\\\twidget hasChildrenSelector: aSpec hasChildren.\\\\n\\\\twidget getLabelSelector: aSpec label.\\\\n\\\\twidget getIconSelector: aSpec icon.\\\\n\\\\twidget getHelpSelector: aSpec help.\\\\n\\\\twidget getMenuSelector: aSpec menu.\\\\n\\\\twidget keystrokeActionSelector: aSpec keyPress.\\\\n\\\\twidget getRootsSelector: aSpec roots.\\\\n\\\\twidget autoDeselect: aSpec autoDeselect.\\\\n\\\\twidget dropItemSelector: aSpec dropItem.\\\\n\\\\twidget wantsDropSelector: aSpec dropAccept.\\\\n\\\\tself setFrame: aSpec frame in: widget.\\\\n\\\\tparent ifNotNil:[self add: widget to: parent].\\\\n\\\\tpanes ifNotNil:[\\\\n\\\\t\\\\taSpec roots ifNotNil:[panes add: aSpec roots].\\\\n\\\\t].\\\\n\\\\t^widget! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'pluggable widgets' stamp: 'ar 9/17/2005 21:07'!\\\\nbuildPluggableWindow: aSpec\\\\n\\\\t| widget children label |\\\\n\\\\taSpec layout == #proportional ifFalse:[\\\\n\\\\t\\\\t\\\\\\\"This needs to be implemented - probably by adding a single pane and then the rest\\\\\\\"\\\\n\\\\t\\\\t^self error: 'Not implemented'.\\\\n\\\\t].\\\\n\\\\twidget := PluggableSystemWindow new.\\\\n\\\\tself register: widget id: aSpec name.\\\\n\\\\twidget model: aSpec model.\\\\n\\\\t(label := aSpec label) ifNotNil:[\\\\n\\\\t\\\\tlabel isSymbol \\\\n\\\\t\\\\t\\\\tifTrue:[widget getLabelSelector: label]\\\\n\\\\t\\\\t\\\\tifFalse:[widget setLabel: label]].\\\\n\\\\tchildren := aSpec children.\\\\n\\\\tchildren isSymbol ifTrue:[\\\\n\\\\t\\\\twidget getChildrenSelector: children.\\\\n\\\\t\\\\twidget update: children.\\\\n\\\\t\\\\tchildren := #().\\\\n\\\\t].\\\\n\\\\twidget closeWindowSelector: aSpec closeAction.\\\\n\\\\tpanes := OrderedCollection new.\\\\n\\\\tself buildAll: children in: widget.\\\\n\\\\taSpec extent ifNotNil:[widget extent: aSpec extent].\\\\n\\\\twidget setUpdatablePanesFrom: panes.\\\\n\\\\t^widget! !\\\\n\\\\n\\\\n!MorphicToolBuilder methodsFor: 'private' stamp: 'ar 7/17/2005 00:00'!\\\\nadd: aMorph to: aParent\\\\n\\\\taParent addMorphBack: aMorph.\\\\n\\\\taParent isSystemWindow ifTrue:[\\\\n\\\\t\\\\taParent addPaneMorph: aMorph.\\\\n\\\\t].! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'private' stamp: 'stephaneducasse 2/3/2006 22:35'!\\\\nasFrame: aRectangle\\\\n\\\\t| frame |\\\\n\\\\taRectangle ifNil:[^nil].\\\\n\\\\tframe := LayoutFrame new.\\\\n\\\\tframe \\\\n\\\\t\\\\tleftFraction: aRectangle left; \\\\n\\\\t\\\\trightFraction: aRectangle right; \\\\n\\\\t\\\\ttopFraction: aRectangle top; \\\\n\\\\t\\\\tbottomFraction: aRectangle bottom.\\\\n\\\\t^frame! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'private' stamp: 'ar 7/14/2005 22:28'!\\\\nregister: widget id: id\\\\n\\\\tid ifNil:[^self].\\\\n\\\\twidgets ifNil:[widgets := Dictionary new].\\\\n\\\\twidgets at: id put: widget.! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'private' stamp: 'ar 2/12/2005 19:20'!\\\\nsetFrame: aRectangle in: widget\\\\n\\\\t| frame |\\\\n\\\\taRectangle ifNil:[^nil].\\\\n\\\\tframe := self asFrame: aRectangle.\\\\n\\\\twidget layoutFrame: frame.\\\\n\\\\twidget hResizing: #spaceFill; vResizing: #spaceFill.\\\\n\\\\t(parent isSystemWindow) ifTrue:[\\\\n\\\\t\\\\twidget borderWidth: 2; borderColor: #inset.\\\\n\\\\t].! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'private' stamp: 'ar 2/10/2005 22:28'!\\\\nsetLayout: layout in: widget\\\\n\\\\tlayout == #proportional ifTrue:[\\\\n\\\\t\\\\twidget layoutPolicy: ProportionalLayout new.\\\\n\\\\t\\\\t^self].\\\\n\\\\tlayout == #horizontal ifTrue:[\\\\n\\\\t\\\\twidget layoutPolicy: TableLayout new.\\\\n\\\\t\\\\twidget listDirection: #leftToRight.\\\\n\\\\t\\\\twidget submorphsDo:[:m| m hResizing: #spaceFill; vResizing: #spaceFill].\\\\n\\\\t\\\\t\\\\\\\"and then some...\\\\\\\"\\\\n\\\\t\\\\t^self].\\\\n\\\\tlayout == #vertical ifTrue:[\\\\n\\\\t\\\\twidget layoutPolicy: TableLayout new.\\\\n\\\\t\\\\twidget listDirection: #topToBottom.\\\\n\\\\t\\\\twidget submorphsDo:[:m| m hResizing: #spaceFill; vResizing: #spaceFill].\\\\n\\\\t\\\\t\\\\\\\"and then some...\\\\\\\"\\\\n\\\\t\\\\t^self].\\\\n\\\\t^self error: 'Unknown layout: ', layout.! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'private' stamp: 'ar 7/14/2005 22:30'!\\\\nwidgetAt: id ifAbsent: aBlock\\\\n\\\\twidgets ifNil:[^aBlock value].\\\\n\\\\t^widgets at: id ifAbsent: aBlock! !\\\\n\\\\n\\\\n!MorphicToolBuilder methodsFor: 'building' stamp: 'ar 2/28/2006 17:30'!\\\\nbuildPluggableMenu: menuSpec \\\\n\\\\t| prior menu |\\\\n\\\\tprior := parentMenu.\\\\n\\\\tparentMenu := menu := MenuMorph new.\\\\n\\\\tmenuSpec label ifNotNil:[parentMenu addTitle: menuSpec label].\\\\n\\\\tmenuSpec items do:[:each| each buildWith: self].\\\\n\\\\tparentMenu := prior.\\\\n\\\\t^menu! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'building' stamp: 'ar 2/28/2006 17:37'!\\\\nbuildPluggableMenuItem: itemSpec\\\\n\\\\t| item action label menu |\\\\n\\\\titem _ MenuItemMorph new.\\\\n\\\\tlabel := itemSpec label.\\\\n\\\\titemSpec checked ifTrue:[label := '<on>', label] ifFalse:[label := '<off>', label].\\\\n\\\\titem contents: label.\\\\n\\\\titem isEnabled: itemSpec enabled.\\\\n\\\\t(action := itemSpec action) ifNotNil:[\\\\n\\\\t\\\\titem \\\\n\\\\t\\\\t\\\\ttarget: action receiver;\\\\n\\\\t\\\\t\\\\tselector: action selector;\\\\n\\\\t\\\\t\\\\targuments: action arguments.\\\\n\\\\t].\\\\n\\\\t(menu := itemSpec subMenu) ifNotNil:[\\\\n\\\\t\\\\titem subMenu: (menu buildWith: self).\\\\n\\\\t].\\\\n\\\\tparentMenu ifNotNil:[parentMenu addMorphBack: item].\\\\n\\\\t^item! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMorphicToolBuilder class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MorphicToolBuilder class methodsFor: 'accessing' stamp: 'ar 2/11/2005 15:24'!\\\\nisActiveBuilder\\\\n\\\\t\\\\\\\"Answer whether I am the currently active builder\\\\\\\"\\\\n\\\\t^Smalltalk isMorphic! !\\\\nToolBuilderTests subclass: #MorphicToolBuilderTests\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'ToolBuilder-Morphic'!\\\\n!MorphicToolBuilderTests commentStamp: 'ar 2/11/2005 15:02' prior: 0!\\\\nTests for the Morphic tool builder.!\\\\n\\\\n\\\\n!MorphicToolBuilderTests methodsFor: 'support' stamp: 'ar 2/11/2005 19:26'!\\\\nacceptWidgetText\\\\n\\\\twidget hasUnacceptedEdits: true.\\\\n\\\\twidget accept.! !\\\\n\\\\n!MorphicToolBuilderTests methodsFor: 'support' stamp: 'ar 6/21/2005 10:35'!\\\\nbuttonWidgetEnabled\\\\n\\\\t\\\\\\\"Answer whether the current widget (a button) is currently enabled\\\\\\\"\\\\n\\\\t^widget enabled! !\\\\n\\\\n!MorphicToolBuilderTests methodsFor: 'support' stamp: 'ar 2/11/2005 19:22'!\\\\nchangeListWidget\\\\n\\\\twidget changeModelSelection: widget getCurrentSelectionIndex + 1.! !\\\\n\\\\n!MorphicToolBuilderTests methodsFor: 'support' stamp: 'ar 2/11/2005 19:15'!\\\\nfireButtonWidget\\\\n\\\\twidget performAction.! !\\\\n\\\\n!MorphicToolBuilderTests methodsFor: 'support' stamp: 'cwp 6/9/2005 00:11'!\\\\nfireMenuItemWidget\\\\n\\\\t(widget itemWithWording: 'Menu Item')\\\\n\\\\t\\\\tifNotNilDo: [:item | item doButtonAction]! !\\\\n\\\\n!MorphicToolBuilderTests methodsFor: 'support' stamp: 'ar 2/11/2005 14:46'!\\\\nsetUp\\\\n\\\\tsuper setUp.\\\\n\\\\tbuilder := MorphicToolBuilder new.! !\\\\n\\\\n!MorphicToolBuilderTests methodsFor: 'support' stamp: 'ar 2/11/2005 21:43'!\\\\nwidgetColor\\\\n\\\\t\\\\\\\"Answer color from widget\\\\\\\"\\\\n\\\\t^widget color! !\\\\n\\\\n\\\\n!MorphicToolBuilderTests methodsFor: 'tests-window' stamp: 'ar 2/13/2005 13:52'!\\\\ntestWindowDynamicLabel\\\\n\\\\tself makeWindow.\\\\n\\\\tself assert: (widget label = 'TestLabel').! !\\\\n\\\\n!MorphicToolBuilderTests methodsFor: 'tests-window' stamp: 'ar 2/13/2005 13:52'!\\\\ntestWindowStaticLabel\\\\n\\\\t| spec |\\\\n\\\\tspec := builder pluggableWindowSpec new.\\\\n\\\\tspec model: self.\\\\n\\\\tspec children: #().\\\\n\\\\tspec label: 'TestLabel'.\\\\n\\\\twidget := builder build: spec.\\\\n\\\\tself assert: (widget label = 'TestLabel').! !\\\\nDisplayTransform subclass: #MorphicTransform\\\\n\\\\tinstanceVariableNames: 'offset angle scale'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Graphics-Transformations'!\\\\n!MorphicTransform commentStamp: '<historical>' prior: 0!\\\\nThis class implements simple translation, scaling and rotation for points, as well as inverse transformations.  These transformations are used in TransformMorphs (clipping scrollers) and TransformationMorphs (general flex-morph wrappers) to map, eg, global mouse coords into local coords, and to invert, eg, local damage rectangles into global damage rectangles.!\\\\n\\\\n\\\\n!MorphicTransform methodsFor: 'accessing'!\\\\nangle\\\\n\\\\t^ angle! !\\\\n\\\\n!MorphicTransform methodsFor: 'accessing' stamp: 'ar 11/9/1998 14:33'!\\\\ninverseTransformation\\\\n\\\\t\\\\\\\"Return the inverse transformation of the receiver\\\\\\\"\\\\n\\\\t^MorphicTransform\\\\n\\\\t\\\\toffset: (self transform: 0@0) - (self transform: offset)\\\\n\\\\t\\\\tangle: angle negated\\\\n\\\\t\\\\tscale: scale reciprocal! !\\\\n\\\\n!MorphicTransform methodsFor: 'accessing'!\\\\noffset\\\\n\\\\t^ offset\\\\n! !\\\\n\\\\n!MorphicTransform methodsFor: 'accessing'!\\\\nscale\\\\n\\\\t^ scale! !\\\\n\\\\n!MorphicTransform methodsFor: 'accessing'!\\\\nwithAngle: a\\\\n\\\\t\\\\\\\"Return a copy of me with a different Angle\\\\\\\"\\\\n\\\\t^ self copy setAngle: a! !\\\\n\\\\n!MorphicTransform methodsFor: 'accessing'!\\\\nwithOffset: a\\\\n\\\\t\\\\\\\"Return a copy of me with a different Offset\\\\\\\"\\\\n\\\\t^ self copy setOffset: a! !\\\\n\\\\n!MorphicTransform methodsFor: 'accessing'!\\\\nwithScale: a\\\\n\\\\t\\\\\\\"Return a copy of me with a different Scale\\\\\\\"\\\\n\\\\t^ self copy setScale: a! !\\\\n\\\\n\\\\n!MorphicTransform methodsFor: 'composing' stamp: 'nk 3/9/2001 13:55'!\\\\ncomposedWithLocal: aTransform\\\\n\\\\taTransform isIdentity ifTrue:[^self].\\\\n\\\\tself isIdentity ifTrue:[^aTransform].\\\\n\\\\taTransform isMorphicTransform ifFalse:[^super composedWithLocal: aTransform].\\\\n\\\\tself isPureTranslation ifTrue:[\\\\n\\\\t\\\\t^aTransform withOffset: aTransform offset + self offset].\\\\n\\\\taTransform isPureTranslation ifTrue:[\\\\n\\\\t\\\\t^self withOffset: (self localPointToGlobal: aTransform offset negated) negated].\\\\n\\\\t^super composedWithLocal: aTransform.! !\\\\n\\\\n\\\\n!MorphicTransform methodsFor: 'converting' stamp: 'ar 11/2/1998 20:14'!\\\\nasMatrixTransform2x3\\\\n\\\\t^((MatrixTransform2x3 withRotation: angle radiansToDegrees negated) composedWithLocal:\\\\n\\\\t\\\\t(MatrixTransform2x3 withScale: scale))\\\\n\\\\t\\\\t\\\\toffset: offset negated! !\\\\n\\\\n!MorphicTransform methodsFor: 'converting' stamp: 'di 10/26/1999 17:03'!\\\\nasMorphicTransform\\\\n\\\\n\\\\t^ self! !\\\\n\\\\n\\\\n!MorphicTransform methodsFor: 'initialize' stamp: 'ar 11/2/1998 20:58'!\\\\nsetIdentiy\\\\n\\\\tscale _ 1.0.\\\\n\\\\toffset _ 0@0.\\\\n\\\\tangle _ 0.0.! !\\\\n\\\\n\\\\n!MorphicTransform methodsFor: 'printing' stamp: 'ar 5/19/1999 18:21'!\\\\nprintOn: aStream\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream nextPut:$(;\\\\n\\\\t\\\\tnextPutAll:'angle = '; print: angle;\\\\n\\\\t\\\\tnextPutAll:'; scale = '; print: scale;\\\\n\\\\t\\\\tnextPutAll:'; offset = '; print: offset;\\\\n\\\\t\\\\tnextPut:$).! !\\\\n\\\\n\\\\n!MorphicTransform methodsFor: 'testing' stamp: 'ar 11/2/1998 20:57'!\\\\nisIdentity\\\\n\\\\t\\\\\\\"Return true if the receiver is the identity transform; that is, if applying to a point returns the point itself.\\\\\\\"\\\\n\\\\n\\\\t^ self isPureTranslation and: [offset = (0@0)]\\\\n! !\\\\n\\\\n!MorphicTransform methodsFor: 'testing' stamp: 'ar 11/2/1998 19:51'!\\\\nisMorphicTransform\\\\n\\\\t^true! !\\\\n\\\\n!MorphicTransform methodsFor: 'testing' stamp: 'ar 11/2/1998 20:57'!\\\\nisPureTranslation\\\\n\\\\t\\\\\\\"Return true if the receiver specifies no rotation or scaling.\\\\\\\"\\\\n\\\\n\\\\t^ angle = 0.0 and: [scale = 1.0]\\\\n! !\\\\n\\\\n\\\\n!MorphicTransform methodsFor: 'transformations' stamp: 'di 3/4/98 19:10'!\\\\ncomposedWith: aTransform\\\\n\\\\t\\\\\\\"Return a new transform that has the effect of transforming points first by the receiver and then by the argument.\\\\\\\"\\\\n\\\\n\\\\tself isIdentity ifTrue: [^ aTransform].\\\\n\\\\taTransform isIdentity ifTrue: [^ self].\\\\n\\\\t^ CompositeTransform new globalTransform: self\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tlocalTransform: aTransform! !\\\\n\\\\n!MorphicTransform methodsFor: 'transformations' stamp: 'di 10/28/1999 09:10'!\\\\ninvert: aPoint\\\\n\\\\t\\\\\\\"Transform the given point from local to global coordinates.\\\\\\\"\\\\n\\\\t| p3 p2 |\\\\n\\\\tself isPureTranslation ifTrue: [^ aPoint - offset].\\\\n\\\\tp3 _  aPoint * scale.\\\\n\\\\tp2 _ ((p3 x * angle cos) + (p3 y * angle sin))\\\\n\\\\t\\\\t@ ((p3 y * angle cos) - (p3 x * angle sin)).\\\\n\\\\t^ (p2 - offset)\\\\n! !\\\\n\\\\n!MorphicTransform methodsFor: 'transformations' stamp: 'di 10/3/1998 00:18'!\\\\ninvertBoundsRect: aRectangle\\\\n\\\\t\\\\\\\"Return a rectangle whose coordinates have been transformed\\\\n\\\\tfrom local back to global coordinates.  NOTE: if the transformation\\\\n\\\\tis not just a translation, then it will compute the bounding box\\\\n\\\\tin global coordinates.\\\\\\\"\\\\n\\\\t| outerRect |\\\\n\\\\tself isPureTranslation\\\\n\\\\tifTrue:\\\\n\\\\t\\\\t[^ (self invert: aRectangle topLeft)\\\\n\\\\t\\\\t\\\\tcorner: (self invert: aRectangle bottomRight)]\\\\n\\\\tifFalse:\\\\n\\\\t\\\\t[outerRect _ Rectangle encompassing:\\\\n\\\\t\\\\t\\\\t(aRectangle innerCorners collect: [:p | self invert: p]).\\\\n\\\\t\\\\t\\\\\\\"Following asymmetry due to likely subsequent truncation\\\\\\\"\\\\n\\\\t\\\\t^ outerRect topLeft - (1@1) corner: outerRect bottomRight + (2@2)]! !\\\\n\\\\n!MorphicTransform methodsFor: 'transformations' stamp: 'di 10/2/1998 08:54'!\\\\ninvertRect: aRectangle\\\\n\\\\n\\\\tself error: 'method name changed to emphasize enclosing bounds'.\\\\n\\\\t^ self invertBoundsRect: aRectangle! !\\\\n\\\\n!MorphicTransform methodsFor: 'transformations' stamp: 'di 10/28/1999 09:05'!\\\\ntransform: aPoint\\\\n\\\\t\\\\\\\"Transform the given point from global to local coordinates.\\\\\\\"\\\\n\\\\t| p2 p3 |\\\\n\\\\tself isPureTranslation ifTrue: [^ aPoint + offset].\\\\n\\\\tp2 _ aPoint + offset.\\\\n\\\\tp3 _ (((p2 x * angle cos) - (p2 y * angle sin))\\\\n\\\\t\\\\t@ ((p2 y * angle cos) + (p2 x * angle sin)))\\\\n\\\\t\\\\t\\\\t/ scale.\\\\n\\\\t^ p3! !\\\\n\\\\n!MorphicTransform methodsFor: 'transformations' stamp: 'di 10/3/1998 00:18'!\\\\ntransformBoundsRect: aRectangle\\\\n\\\\t\\\\\\\"Return a rectangle whose coordinates have been transformed\\\\n\\\\tfrom global to local coordinates.  NOTE: if the transformation\\\\n\\\\tis not just a translation, then it will compute the bounding box\\\\n\\\\tin global coordinates.\\\\\\\"\\\\n\\\\t| outerRect |\\\\n\\\\tself isPureTranslation\\\\n\\\\tifTrue:\\\\n\\\\t\\\\t[^ (self transform: aRectangle topLeft)\\\\n\\\\t\\\\t\\\\tcorner: (self transform: aRectangle bottomRight)]\\\\n\\\\tifFalse:\\\\n\\\\t\\\\t[outerRect _ Rectangle encompassing:\\\\n\\\\t\\\\t\\\\t(aRectangle innerCorners collect: [:p | self transform: p]).\\\\n\\\\t\\\\t\\\\\\\"Following asymmetry due to likely subsequent truncation\\\\\\\"\\\\n\\\\t\\\\t^ outerRect topLeft - (1@1) corner: outerRect bottomRight + (2@2)]! !\\\\n\\\\n\\\\n!MorphicTransform methodsFor: 'transforming points' stamp: 'ar 11/2/1998 16:13'!\\\\nglobalPointToLocal: aPoint\\\\n\\\\t\\\\\\\"Transform aPoint from global coordinates into local coordinates\\\\\\\"\\\\n\\\\t^self transform: aPoint! !\\\\n\\\\n!MorphicTransform methodsFor: 'transforming points' stamp: 'ar 11/2/1998 16:32'!\\\\nlocalPointToGlobal: aPoint\\\\n\\\\t\\\\\\\"Transform aPoint from global coordinates into local coordinates\\\\\\\"\\\\n\\\\t^self invert: aPoint! !\\\\n\\\\n\\\\n!MorphicTransform methodsFor: '*nebraska-*nebraska-Morphic-Remote' stamp: 'ls 10/9/1999 19:06'!\\\\nencodeForRemoteCanvas\\\\n\\\\t\\\\\\\"encode this transform into a string for use by a RemoteCanvas\\\\\\\"\\\\n\\\\t^String streamContents: [ :str |\\\\n\\\\t\\\\tstr nextPutAll: 'Morphic,';\\\\n\\\\t\\\\t\\\\tprint: offset x truncated;\\\\n\\\\t\\\\t\\\\tnextPut: $,;\\\\n\\\\t\\\\t\\\\tprint: offset y truncated;\\\\n\\\\t\\\\t\\\\tnextPut: $,;\\\\n\\\\t\\\\t\\\\tprint: scale;\\\\n\\\\t\\\\t\\\\tnextPut: $,;\\\\n\\\\t\\\\t\\\\tprint: angle\\\\n\\\\t]! !\\\\n\\\\n\\\\n!MorphicTransform methodsFor: 'private'!\\\\nsetAngle: aFloat\\\\n\\\\n\\\\tangle _ aFloat.\\\\n! !\\\\n\\\\n!MorphicTransform methodsFor: 'private'!\\\\nsetOffset: aPoint\\\\n\\\\n\\\\toffset _ aPoint.\\\\n! !\\\\n\\\\n!MorphicTransform methodsFor: 'private'!\\\\nsetOffset: aPoint angle: a scale: s\\\\n\\\\n\\\\toffset _ aPoint.\\\\n\\\\tangle _ a.\\\\n\\\\tscale _ s! !\\\\n\\\\n!MorphicTransform methodsFor: 'private'!\\\\nsetScale: aFloat\\\\n\\\\n\\\\tscale _ aFloat.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMorphicTransform class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MorphicTransform class methodsFor: 'instance creation'!\\\\nidentity\\\\n\\\\n\\\\t^ self offset: 0@0 angle: 0.0 scale: 1.0! !\\\\n\\\\n!MorphicTransform class methodsFor: 'instance creation'!\\\\nnew\\\\n\\\\n\\\\t^ self offset: 0@0\\\\n! !\\\\n\\\\n!MorphicTransform class methodsFor: 'instance creation'!\\\\noffset: aPoint\\\\n\\\\n\\\\t^ self offset: aPoint angle: 0.0 scale: 1.0! !\\\\n\\\\n!MorphicTransform class methodsFor: 'instance creation'!\\\\noffset: aPoint angle: a scale: s\\\\n\\\\n\\\\t^ self basicNew setOffset: aPoint angle: a scale: s! !\\\\n\\\\n\\\\n!MorphicTransform class methodsFor: '*nebraska-instance creation' stamp: 'sd 11/20/2005 21:25'!\\\\nfromRemoteCanvasEncoding: encoded\\\\n\\\\t\\\\\\\"DisplayTransform fromRemoteCanvasEncoding:  'Morphic,-88,-128,1.345165663873898,0.1352584843149221'\\\\\\\"\\\\n\\\\t| type offsetXEnc offsetYEnc scaleEnc angleEnc offsetX offsetY angle scale rs |\\\\n\\\\n\\\\t\\\\\\\"separate the numbers\\\\\\\"\\\\n\\\\trs := ReadStream on: encoded.\\\\n\\\\ttype := rs upTo: $,.\\\\n\\\\toffsetXEnc := rs upTo: $,.\\\\n\\\\toffsetYEnc := rs upTo: $,.\\\\n\\\\tscaleEnc := rs upTo: $,.\\\\n\\\\tangleEnc := rs upToEnd.\\\\n\\\\n\\\\t\\\\\\\"decode the numbers\\\\\\\"\\\\n\\\\toffsetX := Integer readFromString: offsetXEnc.\\\\n\\\\toffsetY := Integer readFromString: offsetYEnc.\\\\n\\\\n\\\\tscale := Number readFromString: scaleEnc.\\\\n\\\\tangle := Number readFromString: angleEnc.\\\\n\\\\n\\\\t\\\\\\\"create an instance\\\\\\\"\\\\n\\\\t^self offset: offsetX@offsetY angle: angle scale: scale! !\\\\nUIManager subclass: #MorphicUIManager\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'ToolBuilder-Morphic'!\\\\n!MorphicUIManager commentStamp: 'ar 2/11/2005 21:52' prior: 0!\\\\nThe Morphic ui manager.!\\\\n\\\\n\\\\n!MorphicUIManager methodsFor: 'ui requests' stamp: 'ar 7/16/2005 19:37'!\\\\nchooseDirectory: label from: dir\\\\n\\\\t\\\\\\\"Let the user choose a directory\\\\\\\"\\\\n\\\\t^FileList2 modalFolderSelector: dir! !\\\\n\\\\n!MorphicUIManager methodsFor: 'ui requests' stamp: 'ar 7/17/2005 00:28'!\\\\nchooseFileMatching: patterns label: aString\\\\n\\\\t\\\\\\\"Let the user choose a file matching the given patterns\\\\\\\"\\\\n\\\\t| result |\\\\n\\\\tresult := FileList2 modalFileSelectorForSuffixes: patterns.\\\\n\\\\t^result ifNotNil:[result fullName]! !\\\\n\\\\n!MorphicUIManager methodsFor: 'ui requests' stamp: 'ar 12/27/2004 10:47'!\\\\nchooseFrom: aList lines: linesArray title: aString\\\\n\\\\t\\\\\\\"Choose an item from the given list. Answer the index of the selected item.\\\\\\\"\\\\n\\\\t| menu |\\\\n\\\\tmenu := PopUpMenu labelArray: aList lines: linesArray.\\\\n\\\\t^aString isEmpty ifTrue:[menu startUp] ifFalse:[menu startUpWithCaption: aString]! !\\\\n\\\\n!MorphicUIManager methodsFor: 'ui requests' stamp: 'ar 7/15/2005 23:44'!\\\\nchooseFrom: labelList values: valueList lines: linesArray title: aString\\\\n\\\\t\\\\\\\"Choose an item from the given list. Answer the selected item.\\\\\\\"\\\\n\\\\t| menu |\\\\n\\\\tmenu := SelectionMenu labels: labelList lines: linesArray selections: valueList.\\\\n\\\\t^aString isEmpty ifTrue:[menu startUp] ifFalse:[menu startUpWithCaption: aString]! !\\\\n\\\\n!MorphicUIManager methodsFor: 'ui requests' stamp: 'ar 12/27/2004 08:45'!\\\\nconfirm: queryString\\\\n\\\\t\\\\\\\"Put up a yes/no menu with caption queryString. Answer true if the \\\\n\\\\tresponse is yes, false if no. This is a modal question--the user must \\\\n\\\\trespond yes or no.\\\\\\\"\\\\n\\\\t^PopUpMenu confirm: queryString! !\\\\n\\\\n!MorphicUIManager methodsFor: 'ui requests' stamp: 'ar 12/27/2004 09:49'!\\\\nconfirm: aString orCancel: cancelBlock\\\\n\\\\t\\\\\\\"Put up a yes/no/cancel menu with caption aString. Answer true if  \\\\n\\\\tthe response is yes, false if no. If cancel is chosen, evaluate  \\\\n\\\\tcancelBlock. This is a modal question--the user must respond yes or no.\\\\\\\"\\\\n\\\\t^PopUpMenu confirm: aString orCancel: cancelBlock! !\\\\n\\\\n!MorphicUIManager methodsFor: 'ui requests' stamp: 'ar 2/28/2005 17:13'!\\\\ndisplayProgress: titleString at: aPoint from: minVal to: maxVal during: workBlock\\\\n\\\\t\\\\\\\"Display titleString as a caption over a progress bar while workBlock is evaluated.\\\\\\\"\\\\n\\\\t^ProgressInitiationException \\\\n\\\\t\\\\tdisplay: titleString\\\\n\\\\t\\\\tat: aPoint \\\\n\\\\t\\\\tfrom: minVal \\\\n\\\\t\\\\tto: maxVal \\\\n\\\\t\\\\tduring: workBlock! !\\\\n\\\\n!MorphicUIManager methodsFor: 'ui requests' stamp: 'ar 7/17/2005 00:27'!\\\\nedit: aText label: labelString accept: anAction\\\\n\\\\t\\\\\\\"Open an editor on the given string/text\\\\\\\"\\\\n\\\\t| window holder text |\\\\n\\\\tholder := StringHolder new.\\\\n\\\\tholder contents: aText.\\\\n\\\\ttext := PluggableTextMorphPlus \\\\n\\\\t\\\\ton: holder \\\\n\\\\t\\\\ttext: #contents \\\\n\\\\t\\\\taccept: #acceptContents: \\\\n\\\\t\\\\treadSelection: nil \\\\n\\\\t\\\\tmenu: nil.\\\\n\\\\ttext acceptAction: anAction.\\\\n\\\\twindow := SystemWindow new.\\\\n\\\\tlabelString ifNotNil:[window setLabel: labelString].\\\\n\\\\twindow addMorph: text frame: (0@0 extent: 1@1).\\\\n\\\\twindow paneColor: Color gray.\\\\n\\\\twindow openInWorld.\\\\n! !\\\\n\\\\n!MorphicUIManager methodsFor: 'ui requests' stamp: 'ar 2/28/2005 17:07'!\\\\ninformUserDuring: aBlock\\\\n\\\\t\\\\\\\"Display a message above (or below if insufficient room) the cursor \\\\n\\\\tduring execution of the given block.\\\\n\\\\t\\\\tUIManager default informUserDuring:[:bar|\\\\n\\\\t\\\\t\\\\t#(one two three) do:[:info|\\\\n\\\\t\\\\t\\\\t\\\\tbar value: info.\\\\n\\\\t\\\\t\\\\t\\\\t(Delay forSeconds: 1) wait]]\\\\\\\"\\\\n\\\\t(MVCMenuMorph from: (SelectionMenu labels: '') title: '\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t')\\\\n\\\\t\\\\tinformUserAt: Sensor cursorPoint during: aBlock.! !\\\\n\\\\n!MorphicUIManager methodsFor: 'ui requests' stamp: 'ar 12/27/2004 08:46'!\\\\ninform: aString\\\\n\\\\t\\\\\\\"Display a message for the user to read and then dismiss\\\\\\\"\\\\n\\\\t^PopUpMenu inform: aString! !\\\\n\\\\n!MorphicUIManager methodsFor: 'ui requests' stamp: 'ar 2/28/2005 17:05'!\\\\nmultiLineRequest: queryString centerAt: aPoint initialAnswer: defaultAnswer answerHeight: answerHeight\\\\n\\\\t\\\\\\\"Create a multi-line instance of me whose question is queryString with\\\\n\\\\tthe given initial answer. Invoke it centered at the given point, and\\\\n\\\\tanswer the string the user accepts.  Answer nil if the user cancels.  An\\\\n\\\\tempty string returned means that the ussr cleared the editing area and\\\\n\\\\tthen hit 'accept'.  Because multiple lines are invited, we ask that the user\\\\n\\\\tuse the ENTER key, or (in morphic anyway) hit the 'accept' button, to \\\\n\\\\tsubmit; that way, the return key can be typed to move to the next line.\\\\\\\"\\\\n\\\\t^FillInTheBlank multiLineRequest: queryString centerAt: aPoint initialAnswer: defaultAnswer answerHeight: answerHeight! !\\\\n\\\\n!MorphicUIManager methodsFor: 'ui requests' stamp: 'ar 12/27/2004 08:47'!\\\\nrequestPassword: queryString\\\\n\\\\t\\\\\\\"Create an instance of me whose question is queryString. Invoke it centered\\\\n\\\\tat the cursor, and answer the string the user accepts. Answer the empty \\\\n\\\\tstring if the user cancels.\\\\\\\"\\\\n\\\\t^FillInTheBlank requestPassword: queryString! !\\\\n\\\\n!MorphicUIManager methodsFor: 'ui requests' stamp: 'ar 12/27/2004 08:46'!\\\\nrequest: queryString initialAnswer: defaultAnswer \\\\n\\\\t\\\\\\\"Create an instance of me whose question is queryString with the given \\\\n\\\\tinitial answer. Invoke it centered at the given point, and answer the \\\\n\\\\tstring the user accepts. Answer the empty string if the user cancels.\\\\\\\"\\\\n\\\\t^FillInTheBlank request: queryString initialAnswer: defaultAnswer ! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMorphicUIManager class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MorphicUIManager class methodsFor: 'accessing' stamp: 'ar 2/11/2005 15:41'!\\\\nisActiveManager\\\\n\\\\t\\\\\\\"Answer whether I should act as the active ui manager\\\\\\\"\\\\n\\\\t^Smalltalk isMorphic! !\\\\nMorphicEvent subclass: #MorphicUnknownEvent\\\\n\\\\tinstanceVariableNames: 'type argument'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: 'EventSensorConstants'\\\\n\\\\tcategory: 'Morphic-Events'!\\\\n\\\\n!MorphicUnknownEvent methodsFor: 'accessing' stamp: 'ar 10/25/2000 20:04'!\\\\nargument\\\\n\\\\t^argument! !\\\\n\\\\n!MorphicUnknownEvent methodsFor: 'accessing' stamp: 'ar 10/25/2000 20:04'!\\\\nargument: arg\\\\n\\\\targument _ arg! !\\\\n\\\\n!MorphicUnknownEvent methodsFor: 'accessing' stamp: 'ar 10/25/2000 19:55'!\\\\nposition\\\\n\\\\t^0@0! !\\\\n\\\\n!MorphicUnknownEvent methodsFor: 'accessing' stamp: 'ar 10/25/2000 19:55'!\\\\ntype\\\\n\\\\t^type! !\\\\n\\\\n\\\\n!MorphicUnknownEvent methodsFor: 'initialize' stamp: 'ar 10/26/2000 01:20'!\\\\ntype: eventType readFrom: aStream\\\\n\\\\t| typeAndArg |\\\\n\\\\ttimeStamp _ Integer readFrom: aStream.\\\\n\\\\taStream skip: 1.\\\\n\\\\ttypeAndArg _ Object readFrom: aStream.\\\\n\\\\ttype _ typeAndArg first.\\\\n\\\\targument _ typeAndArg last.! !\\\\n\\\\n\\\\n!MorphicUnknownEvent methodsFor: 'objects from disk' stamp: 'RAA 12/20/2000 17:48'!\\\\nconvertToCurrentVersion: varDict refStream: smartRefStrm\\\\n\\\\t\\\\n\\\\ttype ifNil: [type _ #startSound].\\\\n\\\\tsource ifNil: [source _ varDict at: 'sourceHand'].\\\\n\\\\targument ifNil: [argument _ varDict at: 'sound' ifAbsent: [nil]].\\\\t\\\\\\\"???\\\\\\\"\\\\n\\\\t^super convertToCurrentVersion: varDict refStream: smartRefStrm.\\\\n\\\\n! !\\\\n\\\\n\\\\n!MorphicUnknownEvent methodsFor: 'printing' stamp: 'ar 10/26/2000 01:19'!\\\\nstoreOn: aStream\\\\n\\\\taStream nextPutAll: 'unknown'.\\\\n\\\\taStream space.\\\\n\\\\tself timeStamp storeOn: aStream.\\\\n\\\\taStream space.\\\\n\\\\t{type. argument} storeOn: aStream.! !\\\\n\\\\n\\\\n!MorphicUnknownEvent methodsFor: 'private' stamp: 'ar 10/25/2000 19:59'!\\\\nsetType: evtType argument: arg\\\\n\\\\ttype _ evtType.\\\\n\\\\targument _ arg.! !\\\\n\\\\n!MorphicUnknownEvent methodsFor: 'private' stamp: 'ar 10/25/2000 19:58'!\\\\nsetType: evtType argument: arg hand: evtHand stamp: stamp\\\\n\\\\ttype _ evtType.\\\\n\\\\targument _ arg.\\\\n\\\\tsource _ evtHand.\\\\n\\\\ttimeStamp _ stamp.! !\\\\nMorph subclass: #MouseActionIndicatorMorph\\\\n\\\\tinstanceVariableNames: 'siblings'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-Widgets'!\\\\n!MouseActionIndicatorMorph commentStamp: '<historical>' prior: 0!\\\\nI am used to highlight morphs which have a special mouseup action!\\\\n\\\\n\\\\n!MouseActionIndicatorMorph methodsFor: 'as yet unclassified' stamp: 'RAA 7/12/2000 10:49'!\\\\ndeleteWithSiblings\\\\n\\\\n\\\\tsiblings do: [ :each | each delete]\\\\n! !\\\\n\\\\n!MouseActionIndicatorMorph methodsFor: 'as yet unclassified' stamp: 'RAA 7/12/2000 10:49'!\\\\nsiblings: aCollection\\\\n\\\\n\\\\tsiblings _ aCollection.\\\\n! !\\\\n\\\\n\\\\n!MouseActionIndicatorMorph methodsFor: 'event handling' stamp: 'RAA 7/12/2000 10:48'!\\\\nhandlesMouseOver: evt\\\\n\\\\n\\\\t^true! !\\\\n\\\\n!MouseActionIndicatorMorph methodsFor: 'event handling' stamp: 'RAA 7/17/2000 09:52'!\\\\nhandlesMouseOverDragging: evt\\\\n\\\\n\\\\t^true! !\\\\n\\\\n!MouseActionIndicatorMorph methodsFor: 'event handling' stamp: 'RAA 7/12/2000 10:50'!\\\\nmouseEnter: evt\\\\n\\\\n\\\\tself deleteWithSiblings\\\\n! !\\\\n\\\\n!MouseActionIndicatorMorph methodsFor: 'event handling' stamp: 'RAA 7/17/2000 09:52'!\\\\nmouseEnterDragging: evt\\\\n\\\\n\\\\tself deleteWithSiblings\\\\n! !\\\\n\\\\n\\\\n!MouseActionIndicatorMorph methodsFor: 'initialization' stamp: 'RAA 7/12/2000 10:48'!\\\\ninitialize\\\\n\\\\n\\\\tsuper initialize.\\\\n\\\\tsiblings _ #().! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMouseActionIndicatorMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MouseActionIndicatorMorph class methodsFor: 'as yet unclassified' stamp: 'RAA 7/12/2000 11:08'!\\\\nworld: aWorld inner: innerRectangle outer: outerRectangle color: aColor\\\\n\\\\n\\\\t| allRects allMorphs |\\\\n\\\\n\\\\tallRects _ outerRectangle areasOutside: innerRectangle.\\\\n\\\\tallMorphs _ allRects collect: [ :each |\\\\n\\\\t\\\\tself new bounds: each; color: aColor\\\\n\\\\t].\\\\n\\\\tallMorphs do: [ :each |\\\\n\\\\t\\\\teach siblings: allMorphs; openInWorld: aWorld\\\\n\\\\t].\\\\n\\\\t^allMorphs\\\\n\\\\n\\\\n! !\\\\nMouseEvent subclass: #MouseButtonEvent\\\\n\\\\tinstanceVariableNames: 'whichButton'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Events'!\\\\n\\\\n!MouseButtonEvent methodsFor: 'accessing' stamp: 'ar 9/15/2000 19:58'!\\\\nblueButtonChanged\\\\n\\\\t\\\\\\\"Answer true if the blue mouse button has changed. This is the third mouse button or cmd+click on the Mac.\\\\\\\"\\\\n\\\\n\\\\t^ whichButton anyMask: 1! !\\\\n\\\\n!MouseButtonEvent methodsFor: 'accessing' stamp: 'ar 9/15/2000 19:58'!\\\\nredButtonChanged\\\\n\\\\t\\\\\\\"Answer true if the red mouse button has changed. This is the first mouse button.\\\\\\\"\\\\n\\\\n\\\\t^ whichButton anyMask: 4! !\\\\n\\\\n!MouseButtonEvent methodsFor: 'accessing' stamp: 'nk 3/11/2004 17:44'!\\\\nwhichButton\\\\n\\\\t^whichButton! !\\\\n\\\\n!MouseButtonEvent methodsFor: 'accessing' stamp: 'ar 9/15/2000 19:59'!\\\\nyellowButtonChanged\\\\n\\\\t\\\\\\\"Answer true if the yellow mouse button has changed. This is the second mouse button or option+click on the Mac.\\\\\\\"\\\\n\\\\n\\\\t^ whichButton anyMask: 2! !\\\\n\\\\n\\\\n!MouseButtonEvent methodsFor: 'dispatching' stamp: 'ar 9/16/2000 13:05'!\\\\nsentTo: anObject\\\\n\\\\t\\\\\\\"Dispatch the receiver into anObject\\\\\\\"\\\\n\\\\ttype == #mouseDown ifTrue:[^anObject handleMouseDown: self].\\\\n\\\\ttype == #mouseUp ifTrue:[^anObject handleMouseUp: self].\\\\n\\\\t^super sentTo: anObject! !\\\\n\\\\n\\\\n!MouseButtonEvent methodsFor: 'initialize' stamp: 'ar 10/24/2000 16:29'!\\\\ntype: eventType readFrom: aStream\\\\n\\\\tsuper type: eventType readFrom: aStream.\\\\n\\\\taStream skip: 1.\\\\n\\\\twhichButton _ Integer readFrom: aStream.! !\\\\n\\\\n\\\\n!MouseButtonEvent methodsFor: 'printing' stamp: 'ar 10/24/2000 16:29'!\\\\nstoreOn: aStream\\\\n\\\\tsuper storeOn: aStream.\\\\n\\\\taStream space.\\\\n\\\\twhichButton storeOn: aStream.! !\\\\n\\\\n\\\\n!MouseButtonEvent methodsFor: '*nebraska-*nebraska-Morphic-Remote' stamp: 'dgd 2/22/2003 19:00'!\\\\ndecodeFromStringArray: array \\\\n\\\\t\\\\\\\"decode the receiver from an array of strings\\\\\\\"\\\\n\\\\n\\\\ttype := array first asSymbol.\\\\n\\\\tposition := CanvasDecoder decodePoint: (array second).\\\\n\\\\tbuttons := CanvasDecoder decodeInteger: (array third).\\\\n\\\\twhichButton := CanvasDecoder decodeInteger: (array fourth)! !\\\\n\\\\n!MouseButtonEvent methodsFor: '*nebraska-*nebraska-Morphic-Remote' stamp: 'ar 10/25/2000 23:24'!\\\\nencodedAsStringArray\\\\n\\\\t\\\\\\\"encode the receiver into an array of strings, such that it can be retrieved via the fromStringArray: class method\\\\\\\"\\\\n\\\\t^{\\\\n\\\\t\\\\ttype.\\\\n\\\\t\\\\tCanvasEncoder encodePoint: position.\\\\n\\\\t\\\\tCanvasEncoder encodeInteger: buttons.\\\\n\\\\t\\\\tCanvasEncoder encodeInteger: whichButton.\\\\n\\\\t}! !\\\\n\\\\n\\\\n!MouseButtonEvent methodsFor: 'private' stamp: 'ar 10/5/2000 23:55'!\\\\nsetType: evtType position: evtPos which: button buttons: evtButtons hand: evtHand stamp: stamp\\\\n\\\\ttype _ evtType.\\\\n\\\\tposition _ evtPos.\\\\n\\\\tbuttons _ evtButtons.\\\\n\\\\tsource _ evtHand.\\\\n\\\\twasHandled _ false.\\\\n\\\\twhichButton _ button.\\\\n\\\\ttimeStamp _ stamp.! !\\\\nObject subclass: #MouseClickState\\\\n\\\\tinstanceVariableNames: 'clickClient clickState firstClickDown firstClickUp firstClickTime clickSelector dblClickSelector dblClickTime dblClickTimeoutSelector dragSelector dragThreshold'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Kernel'!\\\\n!MouseClickState commentStamp: '<historical>' prior: 0!\\\\nMouseClickState is a simple class managing the distinction between clicks, double clicks, and drag operations. It has been factored out of HandMorph due to the many instVars.\\\\n\\\\nInstance variables:\\\\n\\\\tclickClient \\\\t<Morph>\\\\t\\\\tThe client wishing to receive #click:, #dblClick:, or #drag messages\\\\n\\\\tclickState \\\\t<Symbol>\\\\tThe internal state of handling the last event (#firstClickDown, #firstClickUp, #firstClickTimedOut)\\\\n\\\\tfirstClickDown \\\\t<MorphicEvent>\\\\tThe #mouseDown event after which the client wished to receive #click: or similar messages\\\\n\\\\tfirstClickUp \\\\t<MorphicEvent>\\\\tThe first mouse up event which came in before the double click time out was exceeded (it is sent if there is a timout after the first mouse up event occured)\\\\n\\\\tfirstClickTime \\\\t<Integer>\\\\tThe millisecond clock value of the first event\\\\n\\\\tclickSelector \\\\t<Symbol>\\\\tThe selector to use for sending #click: messages\\\\n\\\\tdblClickSelector \\\\t<Symbol>\\\\tThe selector to use for sending #doubleClick: messages\\\\n\\\\tdblClickTime \\\\t<Integer>\\\\tTimout in milliseconds for a double click operation\\\\n\\\\tdragSelector \\\\t<Symbol>\\\\tThe selector to use for sending #drag: messages\\\\n\\\\tdragThreshold \\\\t<Integer>\\\\tThreshold used for determining if a #drag: message is sent (pixels!!)\\\\n!\\\\n\\\\n\\\\n!MouseClickState methodsFor: 'as yet unclassified' stamp: 'nk 7/26/2004 09:13'!\\\\nprintOn: aStream\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream nextPut: $[; print: clickState; nextPut: $]\\\\n! !\\\\n\\\\n\\\\n!MouseClickState methodsFor: 'event handling' stamp: 'jcg 9/21/2001 11:23'!\\\\nclick\\\\n\\\\n\\\\tclickSelector ifNotNil: [clickClient perform: clickSelector with: firstClickDown]! !\\\\n\\\\n!MouseClickState methodsFor: 'event handling' stamp: 'jcg 9/21/2001 11:24'!\\\\ndoubleClick\\\\n\\\\n\\\\tdblClickSelector ifNotNil: [clickClient perform: dblClickSelector with: firstClickDown]! !\\\\n\\\\n!MouseClickState methodsFor: 'event handling' stamp: 'jcg 9/21/2001 13:09'!\\\\ndoubleClickTimeout\\\\n\\\\n\\\\tdblClickTimeoutSelector ifNotNil: [\\\\n\\\\t\\\\tclickClient perform: dblClickTimeoutSelector with: firstClickDown]! !\\\\n\\\\n!MouseClickState methodsFor: 'event handling' stamp: 'jcg 9/21/2001 11:27'!\\\\ndrag: event\\\\n\\\\n\\\\tdragSelector ifNotNil: [clickClient perform: dragSelector with: event]! !\\\\n\\\\n!MouseClickState methodsFor: 'event handling' stamp: 'nk 7/26/2004 10:21'!\\\\nhandleEvent: evt from: aHand\\\\n\\\\t\\\\\\\"Process the given mouse event to detect a click, double-click, or drag.\\\\n\\\\tReturn true if the event should be processed by the sender, false if it shouldn't.\\\\n\\\\tNOTE: This method heavily relies on getting *all* mouse button events.\\\\\\\"\\\\n\\\\t| localEvt timedOut isDrag |\\\\n\\\\ttimedOut _ (evt timeStamp - firstClickTime) > dblClickTime.\\\\n\\\\tlocalEvt _ evt transformedBy: (clickClient transformedFrom: aHand owner).\\\\n\\\\tisDrag _ (localEvt position - firstClickDown position) r > dragThreshold.\\\\n\\\\tclickState == #firstClickDown ifTrue: [\\\\n\\\\t\\\\t\\\\\\\"Careful here - if we had a slow cycle we may have a timedOut mouseUp event\\\\\\\"\\\\n\\\\t\\\\t(timedOut and:[localEvt isMouseUp not]) ifTrue:[\\\\n\\\\t\\\\t\\\\t\\\\\\\"timeout before #mouseUp -> keep waiting for drag if requested\\\\\\\"\\\\n\\\\t\\\\t\\\\tclickState _ #firstClickTimedOut.\\\\n\\\\t\\\\t\\\\tdragSelector ifNil:[\\\\n\\\\t\\\\t\\\\t\\\\taHand resetClickState.\\\\n\\\\t\\\\t\\\\t\\\\tself doubleClickTimeout; click \\\\\\\"***\\\\\\\"].\\\\n\\\\t\\\\t\\\\t^true].\\\\n\\\\t\\\\tlocalEvt isMouseUp ifTrue:[\\\\n\\\\n\\\\t\\\\t\\\\t(timedOut or:[dblClickSelector isNil]) ifTrue:[\\\\n\\\\t\\\\t\\\\t\\\\tself click.\\\\n\\\\t\\\\t\\\\t\\\\taHand resetClickState.\\\\n\\\\t\\\\t\\\\t\\\\t^true].\\\\n\\\\t\\\\t\\\\t\\\\\\\"Otherwise transfer to #firstClickUp\\\\\\\"\\\\n\\\\t\\\\t\\\\tfirstClickUp _ evt copy.\\\\n\\\\t\\\\t\\\\tclickState _ #firstClickUp.\\\\n\\\\t\\\\t\\\\t\\\\\\\"If timedOut or the client's not interested in dbl clicks get outta here\\\\\\\"\\\\n\\\\t\\\\t\\\\tself click.\\\\n\\\\t\\\\t\\\\taHand handleEvent: firstClickUp.\\\\n\\\\t\\\\t\\\\t^false].\\\\n\\\\t\\\\tisDrag ifTrue:[\\\\\\\"drag start\\\\\\\"\\\\n\\\\t\\\\t\\\\tself doubleClickTimeout. \\\\\\\"***\\\\\\\"\\\\n\\\\t\\\\t\\\\taHand resetClickState.\\\\n\\\\t\\\\t\\\\tdragSelector \\\\\\\"If no drag selector send #click instead\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tifNil: [self click]\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil: [self drag: firstClickDown].\\\\n\\\\t\\\\t\\\\t^true].\\\\n\\\\t\\\\t^false].\\\\n\\\\n\\\\tclickState == #firstClickTimedOut ifTrue:[\\\\n\\\\t\\\\tlocalEvt isMouseUp ifTrue:[\\\\\\\"neither drag nor double click\\\\\\\"\\\\n\\\\t\\\\t\\\\taHand resetClickState.\\\\n\\\\t\\\\t\\\\tself doubleClickTimeout; click. \\\\\\\"***\\\\\\\"\\\\n\\\\t\\\\t\\\\t^true].\\\\n\\\\t\\\\tisDrag ifTrue:[\\\\\\\"drag start\\\\\\\"\\\\n\\\\t\\\\t\\\\taHand resetClickState.\\\\n\\\\t\\\\t\\\\tself doubleClickTimeout; drag: firstClickDown. \\\\\\\"***\\\\\\\"\\\\n\\\\t\\\\t\\\\t^true].\\\\n\\\\t\\\\t^false].\\\\n\\\\n\\\\tclickState = #firstClickUp ifTrue:[\\\\n\\\\t\\\\t(timedOut) ifTrue:[\\\\n\\\\t\\\\t\\\\t\\\\\\\"timed out after mouseUp - signal timeout and pass the event\\\\\\\"\\\\n\\\\t\\\\t\\\\taHand resetClickState.\\\\n\\\\t\\\\t\\\\tself doubleClickTimeout. \\\\\\\"***\\\\\\\"\\\\n\\\\t\\\\t\\\\t^true].\\\\n\\\\t\\\\tlocalEvt isMouseDown ifTrue:[\\\\\\\"double click\\\\\\\"\\\\n\\\\t\\\\t\\\\tclickState _ #secondClickDown.\\\\n\\\\t\\\\t\\\\t^false]].\\\\n\\\\n\\\\tclickState == #secondClickDown ifTrue: [\\\\n\\\\t\\\\ttimedOut ifTrue:[\\\\n\\\\t\\\\t\\\\t\\\\\\\"timed out after second mouseDown - pass event after signaling timeout\\\\\\\"\\\\n\\\\t\\\\t\\\\taHand resetClickState.\\\\n\\\\t\\\\t\\\\tself doubleClickTimeout. \\\\\\\"***\\\\\\\"\\\\n\\\\t\\\\t\\\\t^true].\\\\n\\\\t\\\\tisDrag ifTrue: [\\\\\\\"drag start\\\\\\\"\\\\n\\\\t\\\\t\\\\tself doubleClickTimeout. \\\\\\\"***\\\\\\\"\\\\n\\\\t\\\\t\\\\taHand resetClickState.\\\\n\\\\t\\\\t\\\\tdragSelector \\\\\\\"If no drag selector send #click instead\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tifNil: [self click]\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil: [self drag: firstClickDown].\\\\n\\\\t\\\\t\\\\t^true].\\\\n\\\\t\\\\tlocalEvt isMouseUp ifTrue: [\\\\\\\"double click\\\\\\\"\\\\n\\\\t\\\\t\\\\taHand resetClickState.\\\\n\\\\t\\\\t\\\\tself doubleClick.\\\\n\\\\t\\\\t\\\\t^false]\\\\n\\\\t].\\\\n\\\\n\\\\t^true\\\\n! !\\\\n\\\\n\\\\n!MouseClickState methodsFor: 'initialize' stamp: 'jcg 9/21/2001 13:08'!\\\\nclient: aMorph click: aClickSelector dblClick: aDblClickSelector dblClickTime: timeOut dblClickTimeout: aDblClickTimeoutSelector drag: aDragSelector threshold: aNumber event: firstClickEvent\\\\n\\\\tclickClient _ aMorph.\\\\n\\\\tclickSelector _ aClickSelector.\\\\n\\\\tdblClickSelector _ aDblClickSelector.\\\\n\\\\tdblClickTime _ timeOut.\\\\n\\\\tdblClickTimeoutSelector _ aDblClickTimeoutSelector.\\\\n\\\\tdragSelector _ aDragSelector.\\\\n\\\\tdragThreshold _ aNumber.\\\\n\\\\tfirstClickDown _ firstClickEvent.\\\\n\\\\tfirstClickTime _ firstClickEvent timeStamp.\\\\n\\\\tclickState _ #firstClickDown.! !\\\\nUserInputEvent subclass: #MouseEvent\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Events'!\\\\n\\\\n!MouseEvent methodsFor: 'accessing' stamp: 'ar 9/15/2000 22:51'!\\\\ncursorPoint\\\\n\\\\t\\\\\\\"Answer the location of the cursor's hotspot when this event occured.\\\\\\\"\\\\n\\\\n\\\\t^ position! !\\\\n\\\\n\\\\n!MouseEvent methodsFor: 'button state' stamp: 'NS 5/19/2003 15:17'!\\\\nanyButtonPressed\\\\n\\\\t\\\\\\\"Answer true if any mouse button is being pressed.\\\\\\\"\\\\n\\\\n\\\\t^ buttons anyMask: self class anyButton! !\\\\n\\\\n!MouseEvent methodsFor: 'button state' stamp: 'NS 5/19/2003 15:17'!\\\\nblueButtonPressed\\\\n\\\\t\\\\\\\"Answer true if the blue mouse button is being pressed. This is the third mouse button or cmd+click on the Mac.\\\\\\\"\\\\n\\\\n\\\\t^ buttons anyMask: self class blueButton! !\\\\n\\\\n!MouseEvent methodsFor: 'button state' stamp: 'NS 5/19/2003 15:17'!\\\\nredButtonPressed\\\\n\\\\t\\\\\\\"Answer true if the red mouse button is being pressed. This is the first mouse button.\\\\\\\"\\\\n\\\\n\\\\t^ buttons anyMask: self class redButton! !\\\\n\\\\n!MouseEvent methodsFor: 'button state' stamp: 'ar 9/15/2000 22:51'!\\\\ntargetPoint\\\\n\\\\t\\\\\\\"Answer the location of the cursor's hotspot, adjusted by the offset\\\\n\\\\tof the last mouseDown relative to the recipient morph.\\\\\\\"\\\\n\\\\n\\\\t^ position - source targetOffset! !\\\\n\\\\n!MouseEvent methodsFor: 'button state' stamp: 'NS 5/19/2003 15:17'!\\\\nyellowButtonPressed\\\\n\\\\t\\\\\\\"Answer true if the yellow mouse button is being pressed. This is the second mouse button or option+click on the Mac.\\\\\\\"\\\\n\\\\n\\\\t^ buttons anyMask: self class yellowButton! !\\\\n\\\\n\\\\n!MouseEvent methodsFor: 'comparing' stamp: 'ar 9/15/2000 22:50'!\\\\n= aMorphicEvent\\\\n\\\\tsuper = aMorphicEvent ifFalse:[^false].\\\\n\\\\tposition = aMorphicEvent position ifFalse: [^ false].\\\\n\\\\tbuttons = aMorphicEvent buttons ifFalse: [^ false].\\\\n\\\\t^ true\\\\n! !\\\\n\\\\n!MouseEvent methodsFor: 'comparing' stamp: 'ar 9/15/2000 22:47'!\\\\nhash\\\\n\\\\t^ position hash + buttons hash! !\\\\n\\\\n\\\\n!MouseEvent methodsFor: 'converting' stamp: 'ar 10/10/2000 21:17'!\\\\nasMouseEnter\\\\n\\\\t^self clone setType: #mouseEnter! !\\\\n\\\\n!MouseEvent methodsFor: 'converting' stamp: 'ar 10/10/2000 21:17'!\\\\nasMouseLeave\\\\n\\\\t^self clone setType: #mouseLeave! !\\\\n\\\\n!MouseEvent methodsFor: 'converting' stamp: 'ar 10/6/2000 18:59'!\\\\nasMouseMove\\\\n\\\\t\\\\\\\"Convert the receiver into a mouse move\\\\\\\"\\\\n\\\\t^MouseMoveEvent new setType: #mouseMove startPoint: position endPoint: position trail: {position. position} buttons: buttons hand: source stamp: Time millisecondClockValue.! !\\\\n\\\\n!MouseEvent methodsFor: 'converting' stamp: 'ar 9/25/2000 14:29'!\\\\nasMouseOver\\\\n\\\\t\\\\\\\"Convert the receiver into a mouse over event\\\\\\\"\\\\n\\\\t^MouseEvent new setType: #mouseOver position: position buttons: buttons hand: source! !\\\\n\\\\n\\\\n!MouseEvent methodsFor: 'dispatching' stamp: 'ar 10/10/2000 21:15'!\\\\nsentTo: anObject\\\\n\\\\t\\\\\\\"Dispatch the receiver into anObject\\\\\\\"\\\\n\\\\ttype == #mouseOver ifTrue:[^anObject handleMouseOver: self].\\\\n\\\\ttype == #mouseEnter ifTrue:[^anObject handleMouseEnter: self].\\\\n\\\\ttype == #mouseLeave ifTrue:[^anObject handleMouseLeave: self].\\\\n\\\\t^super sentTo: anObject.! !\\\\n\\\\n\\\\n!MouseEvent methodsFor: 'initialize' stamp: 'ar 10/25/2000 22:08'!\\\\ntype: eventType readFrom: aStream\\\\n\\\\t| x y |\\\\n\\\\ttype _ eventType.\\\\n\\\\ttimeStamp _ Integer readFrom: aStream.\\\\n\\\\taStream skip: 1.\\\\n\\\\tx _ Integer readFrom: aStream.\\\\n\\\\taStream skip: 1.\\\\n\\\\ty _ Integer readFrom: aStream.\\\\n\\\\taStream skip: 1.\\\\n\\\\tbuttons _ Integer readFrom: aStream.\\\\n\\\\tposition _ x@y.\\\\n! !\\\\n\\\\n\\\\n!MouseEvent methodsFor: 'printing' stamp: 'ar 10/7/2000 22:01'!\\\\nprintOn: aStream\\\\n\\\\n\\\\taStream nextPut: $[.\\\\n\\\\taStream nextPutAll: self cursorPoint printString; space.\\\\n\\\\taStream nextPutAll: type; space.\\\\n\\\\taStream nextPutAll: self modifierString.\\\\n\\\\taStream nextPutAll: self buttonString.\\\\n\\\\taStream nextPutAll: timeStamp printString.\\\\n\\\\taStream nextPut: $].! !\\\\n\\\\n!MouseEvent methodsFor: 'printing' stamp: 'ar 10/25/2000 22:09'!\\\\nstoreOn: aStream\\\\n\\\\n\\\\taStream nextPutAll: type.\\\\n\\\\taStream space.\\\\n\\\\tself timeStamp storeOn: aStream.\\\\n\\\\taStream space.\\\\n\\\\tposition x storeOn: aStream.\\\\n\\\\taStream space.\\\\n\\\\tposition y storeOn: aStream.\\\\n\\\\taStream space.\\\\n\\\\tbuttons storeOn: aStream.! !\\\\n\\\\n\\\\n!MouseEvent methodsFor: 'testing' stamp: 'ar 10/5/2000 19:43'!\\\\nisDraggingEvent\\\\n\\\\tsource ifNil:[^false].\\\\n\\\\tsource hasSubmorphs ifTrue:[^true].\\\\n\\\\tself anyButtonPressed ifTrue:[^true].\\\\n\\\\t^false! !\\\\n\\\\n!MouseEvent methodsFor: 'testing' stamp: 'ar 9/13/2000 15:30'!\\\\nisMouse\\\\n\\\\t^true! !\\\\n\\\\n!MouseEvent methodsFor: 'testing' stamp: 'ar 9/13/2000 15:32'!\\\\nisMouseDown\\\\n\\\\t^self type == #mouseDown! !\\\\n\\\\n!MouseEvent methodsFor: 'testing' stamp: 'ar 9/13/2000 15:32'!\\\\nisMouseEnter\\\\n\\\\t^self type == #mouseEnter! !\\\\n\\\\n!MouseEvent methodsFor: 'testing' stamp: 'ar 9/13/2000 15:32'!\\\\nisMouseLeave\\\\n\\\\t^self type == #mouseLeave! !\\\\n\\\\n!MouseEvent methodsFor: 'testing' stamp: 'ar 9/13/2000 15:32'!\\\\nisMouseMove\\\\n\\\\t^self type == #mouseMove! !\\\\n\\\\n!MouseEvent methodsFor: 'testing' stamp: 'ar 9/13/2000 15:32'!\\\\nisMouseUp\\\\n\\\\t^self type == #mouseUp! !\\\\n\\\\n!MouseEvent methodsFor: 'testing' stamp: 'ar 9/13/2000 19:29'!\\\\nisMove\\\\n\\\\t^false! !\\\\n\\\\n\\\\n!MouseEvent methodsFor: 'private' stamp: 'ar 10/10/2000 21:15'!\\\\nsetType: aSymbol\\\\n\\\\t\\\\\\\"For quick conversion between event types\\\\\\\"\\\\n\\\\ttype _ aSymbol.! !\\\\n\\\\n!MouseEvent methodsFor: 'private' stamp: 'ar 9/15/2000 22:53'!\\\\nsetType: evtType position: evtPos buttons: evtButtons hand: evtHand\\\\n\\\\ttype _ evtType.\\\\n\\\\tposition _ evtPos.\\\\n\\\\tbuttons _ evtButtons.\\\\n\\\\tsource _ evtHand.\\\\n\\\\twasHandled _ false.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMouseEvent class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MouseEvent class methodsFor: 'constants' stamp: 'NS 5/19/2003 15:16'!\\\\nanyButton\\\\n\\\\t^ 7! !\\\\n\\\\n!MouseEvent class methodsFor: 'constants' stamp: 'NS 5/19/2003 15:16'!\\\\nblueButton\\\\n\\\\t^ 1! !\\\\n\\\\n!MouseEvent class methodsFor: 'constants' stamp: 'NS 5/19/2003 15:16'!\\\\nredButton\\\\n\\\\t^ 4! !\\\\n\\\\n!MouseEvent class methodsFor: 'constants' stamp: 'NS 5/19/2003 15:16'!\\\\nyellowButton\\\\n\\\\t^ 2! !\\\\nController subclass: #MouseMenuController\\\\n\\\\tinstanceVariableNames: 'redButtonMenu redButtonMessages'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'ST80-Kernel-Remnants'!\\\\n!MouseMenuController commentStamp: '<historical>' prior: 0!\\\\nI am a Controller that modifies the scheduling of user activities so that the three mouse buttons can be used to make selections or display menus. The menu items are unary messages to the value of sending my instance the message menuMessageReceiver.!\\\\n\\\\n\\\\n!MouseMenuController methodsFor: 'control defaults' stamp: 'sma 3/11/2000 15:28'!\\\\ncontrolActivity\\\\n\\\\t\\\\\\\"Refer to the comment in Controller|controlActivity.\\\\\\\"\\\\n\\\\t| cursorPoint |\\\\n\\\\tcursorPoint _ sensor cursorPoint.\\\\n\\\\tsuper controlActivity.\\\\n\\\\t(cursorPoint = sensor cursorPoint and: [self viewHasCursor])\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[sensor redButtonPressed ifTrue: [^ self redButtonActivity].\\\\n\\\\t\\\\t\\\\tsensor yellowButtonPressed ifTrue: [^ self yellowButtonActivity].\\\\n\\\\t\\\\t\\\\tsensor blueButtonPressed ifTrue: [^ self blueButtonActivity]]! !\\\\n\\\\n!MouseMenuController methodsFor: 'control defaults' stamp: 'sma 3/11/2000 11:24'!\\\\nisControlActive \\\\n\\\\t\\\\\\\"In contrast to class Controller, only blue button but not yellow button\\\\n\\\\tevents will end the receiver's control loop.\\\\\\\"\\\\n\\\\n\\\\t^ self viewHasCursor and: [sensor blueButtonPressed not]! !\\\\n\\\\n\\\\n!MouseMenuController methodsFor: 'initialize-release' stamp: 'sma 3/11/2000 15:54'!\\\\nrelease\\\\n\\\\tsuper release.\\\\n\\\\tredButtonMenu release! !\\\\n\\\\n!MouseMenuController methodsFor: 'initialize-release' stamp: 'sma 3/11/2000 15:54'!\\\\nreset\\\\n\\\\t\\\\\\\"Eliminate references to all mouse button menus.\\\\\\\"\\\\n\\\\n\\\\tredButtonMenu _ nil.\\\\n\\\\tredButtonMessages _ nil! !\\\\n\\\\n\\\\n!MouseMenuController methodsFor: 'menu messages' stamp: 'sma 3/11/2000 15:01'!\\\\nblueButtonActivity\\\\n\\\\t\\\\\\\"This normally opens the window menu. It is a no-op here\\\\n\\\\tas only the StandardSystemController deals with that kind\\\\n\\\\tof menus.\\\\\\\"! !\\\\n\\\\n!MouseMenuController methodsFor: 'menu messages'!\\\\nperformMenuMessage: aSelector\\\\n\\\\t\\\\\\\"Perform a menu command by sending self the message aSelector.\\\\n\\\\t Default does nothing special.\\\\\\\"\\\\n\\\\n\\\\t^self perform: aSelector! !\\\\n\\\\n!MouseMenuController methodsFor: 'menu messages' stamp: 'sma 3/11/2000 14:56'!\\\\nredButtonActivity\\\\n\\\\t\\\\\\\"Determine which item in the red button pop-up menu is selected. If one \\\\n\\\\tis selected, then send the corresponding message to the object designated \\\\n\\\\tas the menu message receiver.\\\\\\\"\\\\n\\\\n\\\\t| index |\\\\n\\\\tredButtonMenu ~~ nil\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[index _ redButtonMenu startUp.\\\\n\\\\t\\\\t\\\\tindex ~= 0 \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self perform: (redButtonMessages at: index)]]\\\\n\\\\t\\\\tifFalse: [super controlActivity]! !\\\\n\\\\n!MouseMenuController methodsFor: 'menu messages' stamp: 'sma 3/11/2000 14:59'!\\\\nyellowButtonActivity\\\\n\\\\t\\\\\\\"This normally opens a popup menu. Determine the selected\\\\n\\\\titem and, if one is selected, then send the corresponding message\\\\n\\\\tto either the model or the receiver.\\\\\\\"\\\\n\\\\n\\\\t^ self pluggableYellowButtonActivity: sensor leftShiftDown! !\\\\n\\\\n\\\\n!MouseMenuController methodsFor: 'menu setup'!\\\\nredButtonMenu: aSystemMenu redButtonMessages: anArray \\\\n\\\\t\\\\\\\"Initialize the pop-up menu that should appear when the user presses the \\\\n\\\\tred mouse button to be aSystemMenu. The corresponding messages that \\\\n\\\\tshould be sent are listed in the array, anArray.\\\\\\\"\\\\n\\\\n\\\\tredButtonMenu release.\\\\n\\\\tredButtonMenu _ aSystemMenu.\\\\n\\\\tredButtonMessages _ anArray! !\\\\n\\\\n\\\\n!MouseMenuController methodsFor: 'pluggable menus' stamp: 'sma 3/11/2000 12:36'!\\\\ngetPluggableYellowButtonMenu: shiftKeyState\\\\n\\\\t^ view getMenu: shiftKeyState! !\\\\n\\\\n!MouseMenuController methodsFor: 'pluggable menus' stamp: 'sw 2/17/2002 04:35'!\\\\npluggableYellowButtonActivity: shiftKeyState\\\\n\\\\t\\\\\\\"Invoke the model's popup menu.\\\\\\\"\\\\n\\\\n\\\\t| menu |\\\\n\\\\t(menu _ self getPluggableYellowButtonMenu: shiftKeyState)\\\\n\\\\t\\\\tifNil:\\\\n\\\\t\\\\t\\\\t[sensor waitNoButton]\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t[self terminateAndInitializeAround:\\\\n\\\\t\\\\t\\\\t\\\\t[menu invokeOn: model orSendTo: self]]! !\\\\n\\\\n!MouseMenuController methodsFor: 'pluggable menus' stamp: 'sw 3/22/2001 12:03'!\\\\nshiftedTextPaneMenuRequest\\\\n\\\\t\\\\\\\"The user chose the more... branch from the text-pane menu.\\\\\\\"\\\\n\\\\n\\\\t^ self pluggableYellowButtonActivity: true! !\\\\n\\\\n!MouseMenuController methodsFor: 'pluggable menus' stamp: 'sma 3/11/2000 12:37'!\\\\nshiftedYellowButtonActivity\\\\n\\\\t\\\\\\\"Invoke the model's special popup menu.\\\\\\\"\\\\n\\\\n\\\\t^ self pluggableYellowButtonActivity: true! !\\\\n\\\\n!MouseMenuController methodsFor: 'pluggable menus' stamp: 'sma 3/11/2000 12:37'!\\\\nunshiftedYellowButtonActivity\\\\n\\\\t\\\\\\\"Invoke the model's normal popup menu.\\\\\\\"\\\\n\\\\n\\\\t^ self pluggableYellowButtonActivity: false! !\\\\nMouseEvent subclass: #MouseMoveEvent\\\\n\\\\tinstanceVariableNames: 'startPoint trail'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Events'!\\\\n\\\\n!MouseMoveEvent methodsFor: 'accessing' stamp: 'ar 9/15/2000 22:51'!\\\\nendPoint\\\\n\\\\t\\\\\\\"Return the point where the movement ended.\\\\\\\"\\\\n\\\\t^position! !\\\\n\\\\n!MouseMoveEvent methodsFor: 'accessing' stamp: 'ar 9/13/2000 16:25'!\\\\nstartPoint\\\\n\\\\t\\\\\\\"Return the point where the movement started.\\\\\\\"\\\\n\\\\t^startPoint! !\\\\n\\\\n!MouseMoveEvent methodsFor: 'accessing' stamp: 'ar 10/24/2000 16:33'!\\\\ntrail\\\\n\\\\t\\\\\\\"Return any immediate points that have been assembled along the move\\\\\\\"\\\\n\\\\t^trail ifNil:[#()]! !\\\\n\\\\n\\\\n!MouseMoveEvent methodsFor: 'comparing' stamp: 'ar 9/15/2000 22:49'!\\\\n= aMorphicEvent\\\\n\\\\tsuper = aMorphicEvent ifFalse:[^false].\\\\n\\\\tposition = aMorphicEvent position ifFalse: [^ false].\\\\n\\\\tstartPoint = aMorphicEvent startPoint ifFalse: [^ false].\\\\n\\\\tbuttons = aMorphicEvent buttons ifFalse: [^ false].\\\\n\\\\t^ true\\\\n! !\\\\n\\\\n!MouseMoveEvent methodsFor: 'comparing' stamp: 'ar 9/15/2000 22:49'!\\\\nhash\\\\n\\\\t^ position hash + startPoint hash + buttons hash! !\\\\n\\\\n\\\\n!MouseMoveEvent methodsFor: 'dispatching' stamp: 'ar 10/10/2000 21:15'!\\\\nsentTo: anObject\\\\n\\\\t\\\\\\\"Dispatch the receiver into anObject\\\\\\\"\\\\n\\\\ttype == #mouseMove ifTrue:[^anObject handleMouseMove: self].\\\\n\\\\t^super sentTo: anObject.\\\\n! !\\\\n\\\\n\\\\n!MouseMoveEvent methodsFor: 'initialize' stamp: 'ar 10/24/2000 16:31'!\\\\ntype: eventType readFrom: aStream\\\\n\\\\t| x y |\\\\n\\\\tsuper type: eventType readFrom: aStream.\\\\n\\\\taStream skip: 1.\\\\n\\\\tx _ Integer readFrom: aStream.\\\\n\\\\taStream skip: 1.\\\\n\\\\ty _ Integer readFrom: aStream.\\\\n\\\\tstartPoint _ x@y.! !\\\\n\\\\n\\\\n!MouseMoveEvent methodsFor: 'printing' stamp: 'ar 10/7/2000 22:00'!\\\\nprintOn: aStream\\\\n\\\\n\\\\taStream nextPut: $[.\\\\n\\\\taStream nextPutAll: self startPoint printString; space.\\\\n\\\\taStream nextPutAll: self endPoint printString; space.\\\\n\\\\taStream nextPutAll: self type; space.\\\\n\\\\taStream nextPutAll: self modifierString.\\\\n\\\\taStream nextPutAll: self buttonString.\\\\n\\\\taStream nextPutAll: timeStamp printString.\\\\n\\\\taStream nextPut: $].! !\\\\n\\\\n!MouseMoveEvent methodsFor: 'printing' stamp: 'ar 10/24/2000 16:30'!\\\\nstoreOn: aStream\\\\n\\\\tsuper storeOn: aStream.\\\\n\\\\taStream space.\\\\n\\\\tself startPoint x storeOn: aStream.\\\\n\\\\taStream space.\\\\n\\\\tself startPoint y storeOn: aStream.\\\\n\\\\taStream space.\\\\n\\\\t\\\\\\\"trail storeOn: aStream.\\\\\\\"! !\\\\n\\\\n\\\\n!MouseMoveEvent methodsFor: 'testing' stamp: 'ar 9/13/2000 19:29'!\\\\nisMove\\\\n\\\\t^true! !\\\\n\\\\n\\\\n!MouseMoveEvent methodsFor: 'transforming' stamp: 'ar 9/15/2000 22:52'!\\\\ntransformBy: aMorphicTransform\\\\n\\\\t\\\\\\\"Transform the receiver into a local coordinate system.\\\\\\\"\\\\n\\\\tposition _  aMorphicTransform globalPointToLocal: position.\\\\n\\\\tstartPoint _  aMorphicTransform globalPointToLocal: startPoint.! !\\\\n\\\\n!MouseMoveEvent methodsFor: 'transforming' stamp: 'ar 9/15/2000 22:52'!\\\\ntranslateBy: delta\\\\n\\\\t\\\\\\\"add delta to cursorPoint, and return the new event\\\\\\\"\\\\n\\\\tposition _ position + delta.\\\\n\\\\tstartPoint _ startPoint + delta.! !\\\\n\\\\n\\\\n!MouseMoveEvent methodsFor: '*nebraska-*nebraska-Morphic-Remote' stamp: 'dgd 2/22/2003 19:01'!\\\\ndecodeFromStringArray: array \\\\n\\\\t\\\\\\\"decode the receiver from an array of strings\\\\\\\"\\\\n\\\\n\\\\ttype := array first asSymbol.\\\\n\\\\tposition := CanvasDecoder decodePoint: (array second).\\\\n\\\\tbuttons := CanvasDecoder decodeInteger: (array third).\\\\n\\\\tstartPoint := CanvasDecoder decodePoint: (array fourth)! !\\\\n\\\\n!MouseMoveEvent methodsFor: '*nebraska-*nebraska-Morphic-Remote' stamp: 'ar 10/25/2000 23:25'!\\\\nencodedAsStringArray\\\\n\\\\t\\\\\\\"encode the receiver into an array of strings, such that it can be retrieved via the fromStringArray: class method\\\\\\\"\\\\n\\\\t^{\\\\n\\\\t\\\\ttype.\\\\n\\\\t\\\\tCanvasEncoder encodePoint: position.\\\\n\\\\t\\\\tCanvasEncoder encodeInteger: buttons.\\\\n\\\\t\\\\tCanvasEncoder encodePoint: startPoint.\\\\n\\\\t}! !\\\\n\\\\n\\\\n!MouseMoveEvent methodsFor: 'private' stamp: 'ar 10/5/2000 23:55'!\\\\nsetType: evtType startPoint: evtStart endPoint: evtEnd trail: evtTrail buttons: evtButtons hand: evtHand stamp: stamp\\\\n\\\\ttype _ evtType.\\\\n\\\\tstartPoint _ evtStart.\\\\n\\\\tposition _ evtEnd.\\\\n\\\\ttrail _ evtTrail.\\\\n\\\\tbuttons _ evtButtons.\\\\n\\\\tsource _ evtHand.\\\\n\\\\twasHandled _ false.\\\\n\\\\ttimeStamp _ stamp.! !\\\\nObject subclass: #MouseOverHandler\\\\n\\\\tinstanceVariableNames: 'mouseOverMorphs enteredMorphs overMorphs leftMorphs'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Events'!\\\\n\\\\n!MouseOverHandler methodsFor: 'event handling' stamp: 'ar 9/28/2000 18:52'!\\\\nnoticeMouseOver: aMorph event: anEvent\\\\n\\\\t\\\\\\\"Remember that the mouse is currently over some morph\\\\\\\"\\\\n\\\\t(leftMorphs includes: aMorph) \\\\n\\\\t\\\\tifTrue:[leftMorphs remove: aMorph]\\\\n\\\\t\\\\tifFalse:[enteredMorphs nextPut: aMorph].\\\\n\\\\toverMorphs nextPut: aMorph.\\\\n! !\\\\n\\\\n!MouseOverHandler methodsFor: 'event handling' stamp: 'dgd 2/21/2003 23:00'!\\\\nprocessMouseOver: anEvent \\\\n\\\\t\\\\\\\"Re-establish the z-order for all morphs wrt the given event\\\\\\\"\\\\n\\\\n\\\\t| hand localEvt focus evt |\\\\n\\\\thand := anEvent hand.\\\\n\\\\tleftMorphs := mouseOverMorphs asIdentitySet.\\\\n\\\\t\\\\\\\"Assume some coherence for the number of objects in over list\\\\\\\"\\\\n\\\\toverMorphs := WriteStream on: (Array new: leftMorphs size).\\\\n\\\\tenteredMorphs := WriteStream on: #().\\\\n\\\\t\\\\\\\"Now go looking for eventual mouse overs\\\\\\\"\\\\n\\\\thand handleEvent: anEvent asMouseOver.\\\\n\\\\t\\\\\\\"Get out early if there's no change\\\\\\\"\\\\n\\\\t(leftMorphs isEmpty and: [enteredMorphs position = 0]) \\\\n\\\\t\\\\tifTrue: [^leftMorphs := enteredMorphs := overMorphs := nil].\\\\n\\\\tfocus := hand mouseFocus.\\\\n\\\\t\\\\\\\"Send #mouseLeave as appropriate\\\\\\\"\\\\n\\\\tevt := anEvent asMouseLeave.\\\\n\\\\t\\\\\\\"Keep the order of the left morphs by recreating it from the mouseOverMorphs\\\\\\\"\\\\n\\\\tleftMorphs size > 1 \\\\n\\\\t\\\\tifTrue: [leftMorphs := mouseOverMorphs select: [:m | leftMorphs includes: m]].\\\\n\\\\tleftMorphs do: \\\\n\\\\t\\\\t\\\\t[:m | \\\\n\\\\t\\\\t\\\\t(m == focus or: [m hasOwner: focus]) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[localEvt := evt transformedBy: (m transformedFrom: hand).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tm handleEvent: localEvt]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [overMorphs nextPut: m]].\\\\n\\\\t\\\\\\\"Send #mouseEnter as appropriate\\\\\\\"\\\\n\\\\tevt := anEvent asMouseEnter.\\\\n\\\\tenteredMorphs ifNil: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"inform: was called in handleEvent:\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t^leftMorphs := enteredMorphs := overMorphs := nil].\\\\n\\\\tenteredMorphs := enteredMorphs contents.\\\\n\\\\tenteredMorphs reverseDo: \\\\n\\\\t\\\\t\\\\t[:m | \\\\n\\\\t\\\\t\\\\t(m == focus or: [m hasOwner: focus]) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[localEvt := evt transformedBy: (m transformedFrom: hand).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tm handleEvent: localEvt]].\\\\n\\\\t\\\\\\\"And remember the over list\\\\\\\"\\\\n\\\\toverMorphs ifNil: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"inform: was called in handleEvent:\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t^leftMorphs := enteredMorphs := overMorphs := nil].\\\\n\\\\tmouseOverMorphs := overMorphs contents.\\\\n\\\\tleftMorphs := enteredMorphs := overMorphs := nil! !\\\\n\\\\n\\\\n!MouseOverHandler methodsFor: 'initialize-release' stamp: 'ar 9/28/2000 17:08'!\\\\ninitialize\\\\n\\\\tmouseOverMorphs _ #().! !\\\\nMovieClipStartMorph subclass: #MovieClipEndMorph\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Movies-Player'!\\\\n!MovieClipEndMorph commentStamp: '<historical>' prior: 0!\\\\nThe idea is that soon we will show the soundtrack extending between the start cue and the end morph.!\\\\n\\\\n\\\\n!MovieClipEndMorph methodsFor: 'as yet unclassified' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nmovieFileName: movieFileName image: aForm player: aMoviePlayer frameNumber: n\\\\n\\\\n\\\\tmovieClipFileName := movieFileName.\\\\n\\\\tself image: aForm frameNumber: n.\\\\n\\\\tmoviePlayerMorph := movieClipPlayer := aMoviePlayer.\\\\n\\\\tscoreEvent := AmbientEvent new morph: self.\\\\n! !\\\\n\\\\n\\\\n!MovieClipEndMorph methodsFor: 'drawing' stamp: 'di 10/23/2000 10:42'!\\\\nthumbnailHeight\\\\n\\\\n\\\\t^ 30! !\\\\n\\\\n\\\\n!MovieClipEndMorph methodsFor: 'piano rolls' stamp: 'di 10/26/2000 00:25'!\\\\naddMorphsTo: morphList pianoRoll: pianoRoll eventTime: t betweenTime: leftTime and: rightTime\\\\n\\\\n\\\\t\\\\\\\"Ignored -- all display is done by the starting morph -- see superclass\\\\\\\"! !\\\\n\\\\n!MovieClipEndMorph methodsFor: 'piano rolls' stamp: 'di 10/11/2000 23:06'!\\\\nencounteredAtTime: ticks inScorePlayer: scorePlayer atIndex: index inEventTrack: track secsPerTick: secsPerTick\\\\n\\\\n\\\\tmovieClipPlayer ifNotNil:\\\\n\\\\t\\\\t[\\\\\\\"If being shown as a clip, then tell the clipPlayer to stop showing this clip\\\\\\\"\\\\n\\\\t\\\\tmovieClipPlayer stopRunning]! !\\\\n\\\\n!MovieClipEndMorph methodsFor: 'piano rolls' stamp: 'di 10/22/2000 12:43'!\\\\npauseFrom: scorePlayer\\\\n\\\\n\\\\t\\\\\\\"Ignored\\\\\\\"! !\\\\n\\\\n!MovieClipEndMorph methodsFor: 'piano rolls' stamp: 'di 10/22/2000 12:43'!\\\\nresetFrom: scorePlayer\\\\n\\\\n\\\\t\\\\\\\"Ignored\\\\\\\"! !\\\\n\\\\n!MovieClipEndMorph methodsFor: 'piano rolls' stamp: 'di 10/22/2000 12:43'!\\\\nresumeFrom: scorePlayer\\\\n\\\\n\\\\t\\\\\\\"Ignored\\\\\\\"! !\\\\nMovieFrameSyncMorph subclass: #MovieClipStartMorph\\\\n\\\\tinstanceVariableNames: 'movieClipPlayer movieClipFileName soundTrackFileName soundTrackPlayerReady soundTrackMorph soundTrackTimeScale scoreEvent endMorph clipColor colorMorph'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Movies-Player'!\\\\n!MovieClipStartMorph commentStamp: '<historical>' prior: 0!\\\\nThis class and its subclasses act to syncronize movie players with the progress of a MIDI score and further background can be found in the comment for MoviePlayerMorph.\\\\n\\\\nMovieClipStartMorphs are used where you have a movie clip player plex.  You can create such a plex by opening a midi score, spawning a piano roll (by the button of that name), and then choosing 'add movie clip player' from the piano roll menu.  Much simpler, you can open a MoviePlayerMorph as a new morph, and then choose 'make a new movie' from its menu.  This plex then serves as a central editable score for composing movie clips.\\\\n\\\\nTo add a new movie clip to the score, open a movie from the fileList (or as a new morph followed by 'open a movie').  Play or otherwise position the clip to the desired starting position, and then tear off a thumbnail and drop it into the score at the desired time.  The starting thumbnail (MovieClipStartMorph) will appear in the score, tied to an endMorph by a colored stripe.  The ending time will be chosen based on the total length of the clip, a default starting clip length (200 frames), and possible interference with other clips that follow it.\\\\n\\\\nTo reposition a clip, you can pick up its clipStart with halo black handle, and drop it elsewhere.  The rest of the clip will follow as best it can.  To delete a clip, delete its clipStart.  To change the duration of a clip, play the composition up to some point in that clip, and pause it.  Then use the  controls on the central movie player to move forward or backward to the desired ending frame, and choose 'end clip here' from the player menu.!\\\\n\\\\n\\\\n!MovieClipStartMorph methodsFor: 'access' stamp: 'di 10/19/2000 14:27'!\\\\nendMorph\\\\n\\\\n\\\\t^ endMorph! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'access' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nframeNumber: newFrame\\\\n\\\\n\\\\tframeNumber := newFrame! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'access' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nmovieClipPlayer: aMoviePlayerMorph\\\\n\\\\t\\\\\\\"For now, these morphs work both as a sync point in a long movie, and\\\\n\\\\tas a cue point for a short clip in a longer score.\\\\n\\\\tTo a cue point, this method provides a reference to the clip player.\\\\\\\"\\\\n\\\\n\\\\tmovieClipPlayer := aMoviePlayerMorph! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'access' stamp: 'di 10/25/2000 22:02'!\\\\nrelatedPlayer\\\\n \\\\n\\\\t^ movieClipPlayer! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'access' stamp: 'di 10/19/2000 12:24'!\\\\nscoreEvent\\\\n\\\\t^ scoreEvent! !\\\\n\\\\n\\\\n!MovieClipStartMorph methodsFor: 'drawing' stamp: 'di 10/23/2000 10:46'!\\\\ncolorMargin\\\\n\\\\t\\\\\\\"How far the clip span color highlight extends outside the starting clip\\\\\\\"\\\\n\\\\n\\\\t^ 5! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'drawing' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\ncolorMorph\\\\n\\\\tcolorMorph ifNotNil: [^ colorMorph].\\\\n\\\\n\\\\t\\\\\\\"Make up a morph to highlight the span of this clip.\\\\\\\"\\\\n\\\\tColorIndex := (ColorIndex ifNil: [0]) + 2 \\\\\\\\\\\\\\\\ 8 + 1.\\\\n\\\\t^ colorMorph := Morph newBounds: (0@0 extent: 9@9) color: ((Color wheel: 8) at: ColorIndex)\\\\n! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'drawing' stamp: 'di 10/23/2000 10:23'!\\\\nsoundTrackHeight\\\\n\\\\n\\\\t^ 40! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'drawing' stamp: 'di 10/23/2000 10:58'!\\\\nsoundTrackOnBottom  \\\\\\\"a local preference during test\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'drawing' stamp: 'di 10/23/2000 12:32'!\\\\nthumbnailHeight\\\\n\\\\n\\\\t^ 60! !\\\\n\\\\n\\\\n!MovieClipStartMorph methodsFor: 'dropping/grabbing' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\njustDroppedInto: newOwner event: evt\\\\n\\\\t| pianoRoll syncMorph |\\\\n\\\\t\\\\\\\"When dropping this morph into a pianoRoll, add a corresponding\\\\n\\\\tevent to the score so that it will always appear when played,\\\\n\\\\tin addition to possibly triggering other actions\\\\\\\"\\\\n\\\\n\\\\t(newOwner isKindOf: PianoRollScoreMorph)\\\\n\\\\tifTrue:\\\\n\\\\t\\\\t[pianoRoll := newOwner.\\\\n\\\\t\\\\tpianoRoll movieClipPlayer ifNil:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"This PianoRoll is not a clip player -- replace me by a SyncMorph\\\\\\\"\\\\n\\\\t\\\\t\\\\tsyncMorph := MovieFrameSyncMorph new\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\timage: image\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tplayer: moviePlayerMorph\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tframeNumber: frameNumber.\\\\n\\\\t\\\\t\\\\tpianoRoll replaceSubmorph: self by: syncMorph.\\\\n\\\\t\\\\t\\\\t\\\\\\\"rewrite to use justDroppedInto:...\\\\\\\"\\\\n\\\\t\\\\t\\\\tpianoRoll score removeAmbientEventWithMorph: self;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\taddAmbientEvent: (scoreEvent\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmorph: syncMorph;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttime: (pianoRoll timeForX: self left)).\\\\n\\\\t\\\\t\\\\t^ self].\\\\n\\\\n\\\\t\\\\tself movieClipPlayer: pianoRoll movieClipPlayer.\\\\n\\\\t\\\\tself setTimeInScore: pianoRoll score\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnear: (pianoRoll timeForX: self left).\\\\n\\\\t\\\\tself endTime > newOwner scorePlayer durationInTicks ifTrue:\\\\n\\\\t\\\\t\\\\t[newOwner scorePlayer updateDuration]]\\\\n\\\\tifFalse:\\\\n\\\\t\\\\t[\\\\\\\"Dropped it somewhere else -- delete related morphs\\\\\\\"\\\\n\\\\t\\\\tendMorph ifNotNil: [endMorph delete].\\\\n\\\\t\\\\tsoundTrackMorph ifNotNil: [soundTrackMorph delete]].\\\\n\\\\n\\\\tsuper justDroppedInto: newOwner event: evt\\\\n! !\\\\n\\\\n\\\\n!MovieClipStartMorph methodsFor: 'events' stamp: 'di 10/22/2000 20:24'!\\\\nendTime\\\\n\\\\n\\\\t^ endMorph scoreEvent time! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'events' stamp: 'di 10/22/2000 20:27'!\\\\nframeAtTick: time\\\\n\\\\t\\\\\\\"Return the frame number corresponding to the given tick time\\\\\\\"\\\\n\\\\n\\\\t^ frameNumber +\\\\n\\\\t\\\\t((time - self startTime) asFloat\\\\n\\\\t\\\\t\\\\t/ (self endTime - self startTime)\\\\n\\\\t\\\\t\\\\t* (endMorph frameNumber - frameNumber)) asInteger! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'events' stamp: 'di 10/22/2000 20:24'!\\\\nstartTime\\\\n\\\\n\\\\t^ scoreEvent time! !\\\\n\\\\n\\\\n!MovieClipStartMorph methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nimage: aForm frameNumber: n\\\\n\\\\n\\\\tself image: (aForm magnifyBy: self thumbnailHeight asFloat / aForm height).\\\\n\\\\tframeNumber := n.! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nmovieFileName: movieFileName soundTrackFileName: soundFileName\\\\n\\\\t\\\\t\\\\timage: aForm player: aMoviePlayer frameNumber: n\\\\n\\\\tmovieClipFileName := movieFileName.\\\\n\\\\tsoundTrackFileName := soundFileName.\\\\n\\\\tself image: aForm frameNumber: n.\\\\n\\\\tmoviePlayerMorph := aMoviePlayer.\\\\n\\\\tsoundTrackPlayerReady := moviePlayerMorph scorePlayer copy.\\\\n\\\\tscoreEvent := AmbientEvent new morph: self.\\\\n! !\\\\n\\\\n\\\\n!MovieClipStartMorph methodsFor: 'piano rolls' stamp: 'dgd 2/22/2003 14:09'!\\\\naddMorphsTo: morphList pianoRoll: pianoRoll eventTime: t betweenTime: leftTime and: rightTime \\\\n\\\\t\\\\\\\"This code handles both the start and end morphs.\\\\\\\"\\\\n\\\\n\\\\t| startX endX h delta |\\\\n\\\\tself startTime > rightTime \\\\n\\\\t\\\\tifTrue: [^self\\\\t\\\\\\\"Start time has not come into view.\\\\\\\"].\\\\n\\\\tself endTime < leftTime ifTrue: [^self\\\\t\\\\\\\"End time has passed out of view.\\\\\\\"].\\\\n\\\\tstartX := pianoRoll xForTime: self startTime.\\\\n\\\\tendX := pianoRoll xForTime: self endTime.\\\\n\\\\th := self colorMargin.\\\\t\\\\\\\"Height of highlight bar over thumbnails.\\\\\\\"\\\\n\\\\tmorphList add: (self align: self bottomLeft\\\\n\\\\t\\\\t\\\\t\\\\twith: startX @ (pianoRoll bottom - pianoRoll borderWidth - h)).\\\\n\\\\tmorphList \\\\n\\\\t\\\\tadd: (endMorph align: endMorph bounds rightCenter with: endX @ self center y).\\\\n\\\\tmorphList add: (self colorMorph \\\\n\\\\t\\\\t\\\\t\\\\tbounds: (self topLeft - (0 @ h) corner: endMorph right @ (self bottom + h))).\\\\n\\\\t(soundTrackMorph isNil and: [moviePlayerMorph scorePlayer isNil]) \\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"Wants a sound track\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t(soundTrackMorph isNil or: [pianoRoll timeScale ~= soundTrackTimeScale]) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"Needs a new sound track\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself buildSoundTrackMorphFor: pianoRoll].\\\\n\\\\t\\\\t\\\\tmorphList add: (soundTrackMorph align: soundTrackMorph bottomLeft\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twith: colorMorph topLeft).\\\\n\\\\t\\\\t\\\\tself soundTrackOnBottom \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[soundTrackMorph align: soundTrackMorph bottomLeft with: self bottomLeft.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdelta := 0 @ self soundTrackHeight.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself position: self position - delta.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tendMorph position: endMorph position - delta.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcolorMorph position: colorMorph position - delta]]! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'piano rolls' stamp: 'di 10/26/2000 00:09'!\\\\nencounteredAtTime: ticks inScorePlayer: scorePlayer atIndex: index inEventTrack: track secsPerTick: secsPerTick\\\\n\\\\n\\\\t\\\\\\\"If being shown as a clip, then tell the clipPlayer to start showing this clip\\\\\\\"\\\\n\\\\tmovieClipPlayer setCueMorph: self.\\\\n\\\\tmovieClipPlayer openFileNamed: movieClipFileName\\\\n\\\\t\\\\t\\\\twithScorePlayer: soundTrackPlayerReady copy\\\\n\\\\t\\\\t\\\\tandPlayFrom: frameNumber.\\\\n! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'piano rolls' stamp: 'dgd 2/22/2003 14:09'!\\\\nresetFrom: scorePlayer \\\\n\\\\t(movieClipPlayer cueMorph isNil \\\\n\\\\t\\\\tor: [self startTime < movieClipPlayer cueMorph startTime]) \\\\n\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t[movieClipPlayer\\\\n\\\\t\\\\t\\\\t\\\\t\\\\topenFileNamed: movieClipFileName\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twithScorePlayer: soundTrackPlayerReady copy\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tandPlayFrom: frameNumber;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsetCueMorph: self;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstep;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpauseFrom: scorePlayer]! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'piano rolls' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nresumeFrom: scorePlayer\\\\n\\\\n\\\\t| time |\\\\n\\\\t\\\\\\\"New movie clip style of use.\\\\\\\"\\\\n\\\\ttime := scorePlayer ticksSinceStart.\\\\n\\\\ttime < self startTime ifTrue: [^ self].  \\\\\\\"It's not my time yet\\\\\\\"\\\\n\\\\ttime > self endTime ifTrue: [^ self].  \\\\\\\"It's past my time\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"The player is starting in the midst of this clip.\\\\\\\"\\\\n\\\\tmovieClipPlayer openFileNamed: movieClipFileName\\\\n\\\\t\\\\t\\\\t\\\\twithScorePlayer: soundTrackPlayerReady copy\\\\n\\\\t\\\\t\\\\t\\\\tandPlayFrom: (self frameAtTick: time);\\\\n\\\\t\\\\tsetCueMorph: self.\\\\n! !\\\\n\\\\n\\\\n!MovieClipStartMorph methodsFor: 'submorphs-add/remove' stamp: 'di 10/23/2000 10:24'!\\\\ndelete\\\\n\\\\t(owner isKindOf: PianoRollScoreMorph) ifTrue:\\\\n\\\\t\\\\t[owner score removeAmbientEventWithMorph: self.\\\\n\\\\t\\\\tendMorph ifNotNil: [owner score removeAmbientEventWithMorph: endMorph]].\\\\n\\\\tendMorph ifNotNil: [endMorph delete].\\\\n\\\\tsoundTrackMorph ifNotNil: [soundTrackMorph delete].\\\\n\\\\tcolorMorph ifNotNil: [colorMorph delete].\\\\n\\\\tsuper delete.\\\\n! !\\\\n\\\\n\\\\n!MovieClipStartMorph methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nbuildSoundTrackMorphFor: pianoRoll\\\\n\\\\t| stopTime soundTrackForm startTime samplesPerTick samplesPerMs |\\\\n\\\\tsoundTrackTimeScale := pianoRoll timeScale.  \\\\\\\"pixels per tick\\\\\\\"\\\\n\\\\tsamplesPerTick := moviePlayerMorph scorePlayer originalSamplingRate   \\\\\\\"Samples per sec\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t* pianoRoll scorePlayer secsPerTick.  \\\\\\\"secs per tick\\\\\\\"\\\\n\\\\tsamplesPerMs := moviePlayerMorph scorePlayer originalSamplingRate / 1000.0.\\\\n\\\\tstartTime := frameNumber * moviePlayerMorph msPerFrame.  \\\\\\\"ms\\\\\\\"\\\\n\\\\tstopTime := endMorph frameNumber * moviePlayerMorph msPerFrame.\\\\n\\\\tsoundTrackForm := moviePlayerMorph scorePlayer\\\\n\\\\t\\\\tvolumeForm: self soundTrackHeight\\\\n\\\\t\\\\tfrom: (startTime * samplesPerMs) rounded\\\\n\\\\t\\\\tto: (stopTime * samplesPerMs) rounded\\\\n\\\\t\\\\tnSamplesPerPixel: samplesPerTick / soundTrackTimeScale.\\\\n\\\\t^ soundTrackMorph := ImageMorph new image: soundTrackForm! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'private' stamp: 'di 10/29/2000 08:02'!\\\\nsetEndFrameNumber: frame\\\\n\\\\n\\\\tself setEndFrameNumber: frame tickTime: nil! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nsetEndFrameNumber: frameOrNil tickTime: timeOrNil\\\\n\\\\t\\\\\\\"May be called with either time or frame being nil,\\\\n\\\\tin which case the other will br computed.\\\\\\\"\\\\n\\\\n\\\\t| pianoRoll frame time |\\\\n\\\\tpianoRoll := movieClipPlayer pianoRoll.\\\\n\\\\tframe := frameOrNil ifNil:\\\\n\\\\t\\\\t[frameNumber + \\\\n\\\\t\\\\t\\\\t((timeOrNil - self startTime)\\\\n\\\\t\\\\t\\\\t* (pianoRoll scorePlayer secsPerTick*1000.0)\\\\n\\\\t\\\\t\\\\t/ moviePlayerMorph msPerFrame) asInteger - 1].\\\\n\\\\ttime := timeOrNil ifNil:\\\\n\\\\t\\\\t[self startTime +   \\\\\\\"in ticks\\\\\\\"\\\\n\\\\t\\\\t\\\\t(pianoRoll scorePlayer ticksForMSecs:\\\\n\\\\t\\\\t\\\\t(frameOrNil - frameNumber) * moviePlayerMorph msPerFrame)].\\\\n\\\\tendMorph ifNil:\\\\n\\\\t\\\\t[endMorph := MovieClipEndMorph new\\\\n\\\\t\\\\t\\\\tmovieFileName: movieClipFileName\\\\n\\\\t\\\\t\\\\timage: (moviePlayerMorph pageFormForFrame: frame)\\\\n\\\\t\\\\t\\\\tplayer: movieClipPlayer\\\\n\\\\t\\\\t\\\\tframeNumber: frame]\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t[endMorph image: (moviePlayerMorph pageFormForFrame: frame)\\\\n\\\\t\\\\t\\\\tframeNumber: frame].\\\\n\\\\n\\\\tendMorph scoreEvent time: time.\\\\n\\\\tpianoRoll score removeAmbientEventWithMorph: endMorph;\\\\n\\\\t\\\\taddAmbientEvent: endMorph scoreEvent.\\\\n\\\\tsoundTrackMorph := nil.  \\\\\\\"Force it to be recomputed.\\\\\\\"\\\\n\\\\tpianoRoll rebuildFromScore\\\\n! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nsetTimeInScore: score near: dropTime\\\\n\\\\t\\\\\\\"Find a time to place this clip that does not overlap other clips.\\\\n\\\\tSo, if I start in the middle of another clip, move me to the end of it,\\\\n\\\\tand if I start very soon after another clip, put me right at the end.\\\\n\\\\tThen, if my end goes beyond the start of another clip, shorten me\\\\n\\\\tso I end right before that clip.\\\\\\\"\\\\n\\\\n\\\\t| startTime endTime delta endFrame |\\\\n\\\\tstartTime := dropTime.\\\\n\\\\tendMorph ifNil: [endFrame := moviePlayerMorph frameCount]\\\\n\\\\t\\\\t\\\\tifNotNil: [endFrame := endMorph frameNumber].\\\\n\\\\tendTime := startTime   \\\\\\\"in ticks\\\\\\\"\\\\n\\\\t\\\\t+ (movieClipPlayer pianoRoll scorePlayer ticksForMSecs:\\\\n\\\\t\\\\t\\\\t(endFrame - frameNumber)\\\\n\\\\t\\\\t\\\\t* moviePlayerMorph msPerFrame).\\\\n\\\\tscore eventMorphsDo:\\\\n\\\\t\\\\t[:m | (m ~~ self and: [m isMemberOf: self class]) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[((startTime between: m startTime and: m endTime)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tor: [startTime between: m endTime and: m endTime+50])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"If I start in the middle of another clip, or a little\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tpast its end, move me exactly to the end of it\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdelta := (m endTime + 1) - startTime.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartTime := startTime + delta.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tendTime := endTime + delta].\\\\n\\\\t\\\\t\\\\t\\\\t(endTime between: m startTime and: m endTime)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"If my end goes overlaps another clip, shorten me so I fit.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tendTime := m startTime - 1].\\\\n\\\\t\\\\t\\\\t\\\\t]].\\\\n\\\\tscoreEvent time: startTime.\\\\n\\\\tscore removeAmbientEventWithMorph: self;\\\\n\\\\t\\\\t\\\\taddAmbientEvent: scoreEvent.\\\\n\\\\tself setEndFrameNumber: endFrame tickTime: endTime.\\\\n! !\\\\nImageMorph subclass: #MovieFrameSyncMorph\\\\n\\\\tinstanceVariableNames: 'moviePlayerMorph frameNumber'\\\\n\\\\tclassVariableNames: 'ColorIndex'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Movies-Player'!\\\\n!MovieFrameSyncMorph commentStamp: '<historical>' prior: 0!\\\\nThis class and its subclasses act to syncronize movie players with the progress of a MIDI score and further background can be found in the comment for MoviePlayerMorph.\\\\n\\\\nThere are two main forms of synchroniztion.\\\\n\\\\nMovieFrameSyncMorphs are used where you have a MIDI score open with a piano roll, and a separate MoviePlayer Morph.  A MovieFrameSyncMorph can be torn off from the MoviePlayer with a shift-drag gesture or menu command, and can then be dropped into a MIDI score.  They are used to start a movie player at a given place in the score, and then to stretch or compress the movie frame rate so that certain frames are synchronized with the corresponding points in the score.\\\\n\\\\nMovieClipStartMorphs (q.v.) and MovieClipEndMorphs are used for the other kind of synchronization, namely where you wish to assemble a number of movie clips in a sequence.!\\\\n\\\\n\\\\n!MovieFrameSyncMorph methodsFor: 'access' stamp: 'di 8/6/1998 14:13'!\\\\nframeNumber\\\\n\\\\t^ frameNumber! !\\\\n\\\\n!MovieFrameSyncMorph methodsFor: 'access' stamp: 'di 10/11/2000 21:39'!\\\\nmoviePlayerMorph\\\\n \\\\n\\\\t^ moviePlayerMorph! !\\\\n\\\\n!MovieFrameSyncMorph methodsFor: 'access' stamp: 'di 10/25/2000 22:02'!\\\\nrelatedPlayer\\\\n \\\\n\\\\t^ moviePlayerMorph! !\\\\n\\\\n\\\\n!MovieFrameSyncMorph methodsFor: 'dropping/grabbing' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\njustDroppedInto: newOwner event: evt \\\\n\\\\t| pianoRoll |\\\\n\\\\t\\\\\\\"When dropping this morph into a pianoRoll, add a corresponding\\\\n\\\\tevent to the score so that it will always appear when played,\\\\n\\\\tin addition to possibly triggering other actions\\\\\\\"\\\\n\\\\n\\\\t(self isMemberOf: MovieFrameSyncMorph) ifFalse:\\\\n\\\\t\\\\t[^ super justDroppedInto: newOwner event: evt].\\\\n\\\\n\\\\t(newOwner isKindOf: PianoRollScoreMorph)\\\\n\\\\tifTrue:\\\\n\\\\t\\\\t[\\\\\\\"Legacy code for existing sync morphs\\\\\\\"\\\\n\\\\t\\\\tpianoRoll := newOwner.\\\\n\\\\t\\\\tpianoRoll score\\\\n\\\\t\\\\t\\\\tremoveAmbientEventWithMorph: self;\\\\n\\\\t\\\\t\\\\taddAmbientEvent: (AmbientEvent new\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmorph: self;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttime: (pianoRoll timeForX: self left))].\\\\n\\\\n\\\\tsuper justDroppedInto: newOwner event: evt\\\\n! !\\\\n\\\\n\\\\n!MovieFrameSyncMorph methodsFor: 'events' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nnextSyncEventAfter: index inTrack: track\\\\n\\\\t| evt |\\\\n\\\\tindex to: track size do:\\\\n\\\\t\\\\t[:i | evt := track at: i.\\\\n\\\\t\\\\t((evt morph isMemberOf: self class)\\\\n\\\\t\\\\t\\\\tand: [evt morph moviePlayerMorph == moviePlayerMorph])\\\\n\\\\t\\\\t\\\\tifTrue: [^ evt]].\\\\n\\\\t^ nil! !\\\\n\\\\n\\\\n!MovieFrameSyncMorph methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nimage: aForm player: aMoviePlayer frameNumber: n\\\\n\\\\tself image: aForm.\\\\n\\\\tmoviePlayerMorph := aMoviePlayer.\\\\n\\\\tframeNumber := n! !\\\\n\\\\n\\\\n!MovieFrameSyncMorph methodsFor: 'piano rolls' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\naddMorphsTo: morphList pianoRoll: pianoRoll eventTime: t betweenTime: leftTime and: rightTime\\\\n\\\\n\\\\t| leftX |\\\\n\\\\tt > rightTime ifTrue: [^ self  \\\\\\\"Start time has not come into view.\\\\\\\"].  \\\\n\\\\tleftX := pianoRoll xForTime: t.\\\\n\\\\t(leftX + self width) < pianoRoll left ifTrue: [^ self  \\\\\\\"End time has passed out of view.\\\\\\\"].\\\\n\\\\tmorphList add: \\\\n\\\\t\\\\t(self align: self bottomLeft\\\\n\\\\t\\\\t\\\\twith: leftX @ (pianoRoll bottom - pianoRoll borderWidth)).\\\\n! !\\\\n\\\\n!MovieFrameSyncMorph methodsFor: 'piano rolls' stamp: 'dgd 2/21/2003 22:58'!\\\\nencounteredAtTime: ticks inScorePlayer: scorePlayer atIndex: index inEventTrack: track secsPerTick: secsPerTick \\\\n\\\\t\\\\\\\"Set frame number and milliseconds since start in case of drift\\\\\\\"\\\\n\\\\n\\\\t| next |\\\\n\\\\tmoviePlayerMorph frameNumber: frameNumber\\\\n\\\\t\\\\tmsSinceStart: scorePlayer millisecondsSinceStart.\\\\n\\\\n\\\\t\\\\\\\"If there is a later sync point, set the appropriate frame rate until then.\\\\\\\"\\\\n\\\\t(next := self nextSyncEventAfter: index inTrack: track) isNil \\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[moviePlayerMorph msPerFrame: (next time - ticks) * secsPerTick * 1000.0 \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t/ (next morph frameNumber - self frameNumber)]! !\\\\n\\\\n!MovieFrameSyncMorph methodsFor: 'piano rolls' stamp: 'RAA 12/11/2000 22:58'!\\\\njustDroppedIntoPianoRoll: pianoRoll event: evt\\\\n\\\\n\\\\t\\\\\\\"since these morphs handle their own dropping, ignore\\\\\\\"! !\\\\n\\\\n!MovieFrameSyncMorph methodsFor: 'piano rolls' stamp: 'di 10/25/2000 22:03'!\\\\npauseFrom: scorePlayer\\\\n\\\\n\\\\tself relatedPlayer pauseFrom: scorePlayer! !\\\\n\\\\n!MovieFrameSyncMorph methodsFor: 'piano rolls' stamp: 'di 10/25/2000 22:02'!\\\\nresetFrom: scorePlayer\\\\n\\\\n\\\\tself relatedPlayer resetFrom: scorePlayer! !\\\\n\\\\n!MovieFrameSyncMorph methodsFor: 'piano rolls' stamp: 'di 10/25/2000 22:03'!\\\\nresumeFrom: scorePlayer\\\\n\\\\n\\\\tself relatedPlayer resumeFrom: scorePlayer! !\\\\nMorph subclass: #MovieMorph\\\\n\\\\tinstanceVariableNames: 'playMode msecsPerFrame rotationDegrees scalePoint frameList currentFrameIndex dwellCount'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Basic'!\\\\n\\\\n!MovieMorph methodsFor: 'accessing'!\\\\nform\\\\n\\\\n\\\\t^ self currentFrame form\\\\n! !\\\\n\\\\n!MovieMorph methodsFor: 'accessing' stamp: 'jm 7/24/97 15:05'!\\\\nscalePoint\\\\n\\\\n\\\\t^ scalePoint\\\\n! !\\\\n\\\\n!MovieMorph methodsFor: 'accessing' stamp: 'jm 7/24/97 15:05'!\\\\nscalePoint: newScalePoint\\\\n\\\\n\\\\t| frame |\\\\n\\\\tnewScalePoint ~= scalePoint ifTrue: [\\\\n\\\\t\\\\tself changed.\\\\n\\\\t\\\\tscalePoint _ newScalePoint.\\\\n\\\\t\\\\tframe _ self currentFrame.\\\\n\\\\t\\\\tframe ifNotNil: [frame scalePoint: newScalePoint].\\\\n\\\\t\\\\tself layoutChanged.\\\\n\\\\t\\\\tself changed].\\\\n! !\\\\n\\\\n\\\\n!MovieMorph methodsFor: 'drawing' stamp: 'dgd 2/22/2003 18:47'!\\\\ndrawOn: aCanvas \\\\n\\\\t| frame |\\\\n\\\\tframe := self currentFrame.\\\\n\\\\tframe notNil \\\\n\\\\t\\\\tifTrue: [^frame drawOn: aCanvas]\\\\n\\\\t\\\\tifFalse: [^super drawOn: aCanvas]! !\\\\n\\\\n\\\\n!MovieMorph methodsFor: 'geometry testing' stamp: 'dgd 2/22/2003 18:48'!\\\\ncontainsPoint: p \\\\n\\\\t| frame |\\\\n\\\\tframe := self currentFrame.\\\\n\\\\t^ (frame notNil and: [playMode = #stop]) \\\\n\\\\t\\\\tifTrue: [frame containsPoint: p]\\\\n\\\\t\\\\tifFalse: [super containsPoint: p]! !\\\\n\\\\n\\\\n!MovieMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:28'!\\\\ndefaultColor\\\\n\\\\t\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color\\\\n\\\\t\\\\tr: 1\\\\n\\\\t\\\\tg: 0\\\\n\\\\t\\\\tb: 1! !\\\\n\\\\n!MovieMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 21:47'!\\\\ninitialize\\\\n\\\\t\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\n\\\\tplayMode _ #stop.\\\\n\\\\t\\\\\\\"#stop, #playOnce, or #loop\\\\\\\"\\\\n\\\\tmsecsPerFrame _ 200.\\\\n\\\\trotationDegrees _ 0.\\\\n\\\\tscalePoint _ 1.0 @ 1.0.\\\\n\\\\tframeList _ EmptyArray.\\\\n\\\\tcurrentFrameIndex _ 1.\\\\n\\\\tdwellCount _ 0! !\\\\n\\\\n\\\\n!MovieMorph methodsFor: 'menu' stamp: 'nk 6/12/2004 09:59'!\\\\naddCustomMenuItems: aCustomMenu hand: aHandMorph\\\\n\\\\n\\\\t| movies subMenu |\\\\n\\\\tsuper addCustomMenuItems: aCustomMenu hand: aHandMorph.\\\\n\\\\taCustomMenu addLine.\\\\n\\\\tsubMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\tframeList size > 1 ifTrue: [\\\\n\\\\t\\\\tsubMenu add: 'repaint' translated action: #editDrawing.\\\\n\\\\t\\\\tsubMenu add: 'set rotation center' translated action: #setRotationCenter.\\\\n\\\\t\\\\tsubMenu add: 'play once' translated action: #playOnce.\\\\n\\\\t\\\\tsubMenu add: 'play loop' translated action: #playLoop.\\\\n\\\\t\\\\tsubMenu add: 'stop playing' translated action: #stopPlaying.\\\\n\\\\t\\\\tcurrentFrameIndex > 1 ifTrue: [\\\\n\\\\t\\\\t\\\\tsubMenu add: 'previous frame' translated action: #previousFrame].\\\\n\\\\t\\\\tcurrentFrameIndex < frameList size ifTrue: [\\\\n\\\\t\\\\t\\\\tsubMenu add: 'next frame' translated action: #nextFrame]].\\\\n\\\\tsubMenu add: 'extract this frame' translated action: #extractFrame:.\\\\n\\\\tmovies _\\\\n\\\\t\\\\t(self world rootMorphsAt: aHandMorph targetOffset)\\\\n\\\\t\\\\t\\\\tselect: [:m | (m isKindOf: MovieMorph) or:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[m isSketchMorph]].\\\\n\\\\t(movies size > 1) ifTrue:\\\\n\\\\t\\\\t[subMenu add: 'insert into movie' translated action: #insertIntoMovie:].\\\\n\\\\taCustomMenu add: 'movie...' translated subMenu: subMenu\\\\n! !\\\\n\\\\n!MovieMorph methodsFor: 'menu'!\\\\nadvanceFrame\\\\n\\\\n\\\\tcurrentFrameIndex < frameList size\\\\n\\\\t\\\\tifTrue: [self setFrame: currentFrameIndex + 1]\\\\n\\\\t\\\\tifFalse: [self setFrame: 1].\\\\n! !\\\\n\\\\n!MovieMorph methodsFor: 'menu' stamp: 'dgd 2/22/2003 18:47'!\\\\neditDrawing\\\\n\\\\t| frame |\\\\n\\\\tframe := self currentFrame.\\\\n\\\\tframe notNil \\\\n\\\\t\\\\tifTrue: [frame editDrawingIn: self pasteUpMorph forBackground: false]! !\\\\n\\\\n!MovieMorph methodsFor: 'menu'!\\\\nextractFrame: evt\\\\n\\\\n\\\\t| f |\\\\n\\\\tf _ self currentFrame.\\\\n\\\\tf ifNil: [^ self].\\\\n\\\\tframeList _ frameList copyWithout: f.\\\\n\\\\tframeList isEmpty\\\\n\\\\t\\\\tifTrue: [self position: f position]\\\\n\\\\t\\\\tifFalse: [self setFrame: currentFrameIndex].\\\\n\\\\tevt hand attachMorph: f.\\\\n! !\\\\n\\\\n!MovieMorph methodsFor: 'menu' stamp: 'nk 6/12/2004 09:59'!\\\\ninsertIntoMovie: evt\\\\n\\\\n\\\\t| movies aTarget |\\\\n\\\\tmovies _\\\\n\\\\t\\\\t(self world rootMorphsAt: evt hand targetOffset)\\\\n\\\\t\\\\t\\\\tselect: [:m | ((m isKindOf: MovieMorph) or:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t [m isSketchMorph]) and: [m ~= self]].\\\\n\\\\tmovies isEmpty ifTrue: [^ self].\\\\n\\\\taTarget _ movies first.\\\\n\\\\t(aTarget isSketchMorph) ifTrue:\\\\n\\\\t\\\\t[aTarget _ aTarget replaceSelfWithMovie].\\\\n\\\\tmovies first insertFrames: frameList.\\\\n\\\\tself delete.\\\\n! !\\\\n\\\\n!MovieMorph methodsFor: 'menu'!\\\\nnextFrame\\\\n\\\\n\\\\tcurrentFrameIndex < frameList size\\\\n\\\\t\\\\tifTrue: [self setFrame: currentFrameIndex + 1].\\\\n! !\\\\n\\\\n!MovieMorph methodsFor: 'menu'!\\\\nplayLoop\\\\n\\\\n\\\\tplayMode _ #loop.\\\\n! !\\\\n\\\\n!MovieMorph methodsFor: 'menu'!\\\\nplayOnce\\\\n\\\\n\\\\tself setFrame: 1.\\\\n\\\\tplayMode _ #playOnce.\\\\n! !\\\\n\\\\n!MovieMorph methodsFor: 'menu'!\\\\npreviousFrame\\\\n\\\\n\\\\tcurrentFrameIndex > 1\\\\n\\\\t\\\\tifTrue: [self setFrame: currentFrameIndex - 1].\\\\n! !\\\\n\\\\n!MovieMorph methodsFor: 'menu'!\\\\nstopPlaying\\\\n\\\\n\\\\tplayMode _ #stop.\\\\n\\\\tself setFrame: 1.\\\\n! !\\\\n\\\\n\\\\n!MovieMorph methodsFor: 'rotate scale and flex'!\\\\nrotationDegrees\\\\n\\\\n\\\\t^ rotationDegrees\\\\n! !\\\\n\\\\n\\\\n!MovieMorph methodsFor: 'stepping and presenter'!\\\\nstep\\\\n\\\\n\\\\tplayMode = #stop ifTrue: [^ self].\\\\n\\\\n\\\\tdwellCount > 0 ifTrue: [\\\\n\\\\t\\\\tdwellCount _ dwellCount - 1.\\\\n\\\\t\\\\t^ self].\\\\n\\\\n\\\\tcurrentFrameIndex < frameList size\\\\n\\\\t\\\\tifTrue: [^ self setFrame: currentFrameIndex + 1].\\\\n\\\\n\\\\tplayMode = #loop\\\\n\\\\t\\\\tifTrue: [self setFrame: 1]\\\\n\\\\t\\\\tifFalse: [playMode _ #stop].\\\\n! !\\\\n\\\\n\\\\n!MovieMorph methodsFor: 'testing'!\\\\nstepTime\\\\n\\\\n\\\\t^ msecsPerFrame\\\\n! !\\\\n\\\\n\\\\n!MovieMorph methodsFor: 'private' stamp: 'jdl 3/28/2003 08:03'!\\\\ncurrentFrame\\\\n\\\\tframeList isEmpty ifTrue: [^nil].\\\\n     currentFrameIndex := currentFrameIndex min: (frameList size).\\\\n     currentFrameIndex := currentFrameIndex max: 1.\\\\n\\\\t^frameList at: currentFrameIndex! !\\\\n\\\\n!MovieMorph methodsFor: 'private'!\\\\ninsertFrames: newFrames\\\\n\\\\t\\\\\\\"Insert the given collection of frames into this movie just after the currentrame.\\\\\\\"\\\\n\\\\n\\\\tframeList isEmpty ifTrue: [\\\\n\\\\t\\\\tframeList _ newFrames asArray copy.\\\\n\\\\t\\\\tself setFrame: 1.\\\\n\\\\t\\\\t^ self].\\\\n\\\\n\\\\tframeList _\\\\n\\\\t\\\\tframeList\\\\n\\\\t\\\\t\\\\tcopyReplaceFrom: currentFrameIndex + 1  \\\\\\\"insert before\\\\\\\"\\\\n\\\\t\\\\t\\\\tto: currentFrameIndex\\\\n\\\\t\\\\t\\\\twith: newFrames.\\\\n! !\\\\n\\\\n!MovieMorph methodsFor: 'private' stamp: 'jdl 3/28/2003 08:08'!\\\\nsetFrame: newFrameIndex \\\\n\\\\t| oldFrame p newFrame |\\\\n\\\\toldFrame := self currentFrame.\\\\n\\\\toldFrame ifNil: [^self].\\\\n\\\\tself changed.\\\\n\\\\tp := oldFrame referencePosition.\\\\n\\\\tcurrentFrameIndex := newFrameIndex.\\\\n     currentFrameIndex :=  currentFrameIndex min: (frameList size). \\\\n\\\\tcurrentFrameIndex := currentFrameIndex max: 1.\\\\n\\\\tnewFrame := frameList at: currentFrameIndex.\\\\n\\\\tnewFrame referencePosition: p.\\\\n\\\\toldFrame delete.\\\\n\\\\tself addMorph: newFrame.\\\\n\\\\tdwellCount := newFrame framesToDwell.\\\\n\\\\tself layoutChanged.\\\\n\\\\tself changed! !\\\\nBookMorph subclass: #MoviePlayerMorph\\\\n\\\\tinstanceVariableNames: 'movieFileName movieFile frameSize frameDepth frameNumber frameCount playDirection msSinceStart msAtStart msAtLastSync frameAtLastSync msPerFrame frameBufferIfScaled soundTrackFileName scorePlayer soundTrackForm soundTrackMorph pianoRoll cueMorph'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Movies-Player'!\\\\n!MoviePlayerMorph commentStamp: '<historical>' prior: 0!\\\\nMoviePlayerMorph plays images from a file using async io.  The file format is simple but non-standard (see below).\\\\n\\\\nThe heart of the play logic is in the step method.  Note that play is driven by a simulated time since start.  For a movie with a sound score, this is the millisecondsSinceStart of the score player, whereas a movie by itself gets this from the millisecondClock minus msAtStart.\\\\n\\\\nMovie players are designed to be used in three ways\\\\n\\\\t1.  Select a movie in the file list, 'open as movie', and play it.\\\\n\\\\t2.  As in (1), but drop thumbnails for various frames into a\\\\n\\\\t\\\\tMIDI piano roll to synchronize video with music.\\\\n\\\\t3.  Open a MoviePlayerMorph as a 'new morph', and choose\\\\n\\\\t\\\\t'make a new movie' from the menu.\\\\n\\\\nIn (1) and (2), a shift-drag is used to 'tear off' a thumbnail reference morph to the currently visible frame of this clips.  The thumbnail can then be dropped in a MIDI score player to either syncronize that frame with what point in the music, or to cause that clip to being playing in the shared player of a SqueakMovie plex.\\\\n\\\\nWhen making a new movie, an empty score and piano roll are linked to the movie player, as a SqueakMovie plex. You can then open another movie as a clip, and drop a thumbnail morph into the score to start that clip playing at that frame in the shared player.  If you pause while playing that clip, you can manually play the clip forward and backward in the current clip.  if you stop at a given frame, you can choose 'end clip here' from the shared player menu to shorten or lengthen the clip.\\\\n\\\\nClips can be moved by picking up the starting thumbnail (use halo black handle), and dropping them elsewhere.  If you try to place one clip in the middle of another, it will slide to the end.  If you position one clip close to the end of another, it will sidle up to make them contiguous.\\\\n\\\\nIf you wish a soundtrack to be included with a clip, make sure it has been opened in the source clip player before tearing off the starting thumbnail.\\\\n\\\\nAbout the .movie file format...\\\\nThe following code was used to convert 27 files into a movie.  They were named\\\\n\\\\t'BalloonDrop10fps003.bmp' through 'BalloonDrop10fps081.bmp'\\\\nincrementing by 003.  Each was known to be a 320x240 image in 32-bit BMP format.\\\\nNote the 27 in the 5th line is the number of frames, = (3 to: 81 by: 3) size.\\\\n\\\\n\\\\t| ps zps f32 out ff |\\\\n\\\\tout _ FileStream newFileNamed: 'BalloonDrop10fps.movie'.\\\\n\\\\tout binary.\\\\n\\\\tff _ Form extent: 320@240 depth: 16.\\\\n\\\\t#(22 320 240 16 27 100000) , (7 to: 32)\\\\n\\\\t\\\\tdo: [:i | out nextInt32Put: i].\\\\n\\\\t\\\\t\\\\n\\\\t3 to: 81 by: 3 do:\\\\n\\\\t\\\\t[:i | ps _ i printString. zps _ ps padded: #left to: 3 with: $0.\\\\n\\\\t\\\\tf32 _ Form fromFileNamed:\\\\n\\\\t\\\\t\\\\t'BalloonDrop10fps' , zps , '.bmp'.\\\\n\\\\t\\\\tf32 displayOn: ff at: 0@0.  \\\\\\\"Convert down to 16 bits\\\\\\\"\\\\n\\\\t\\\\tff display; writeOnMovie: out].\\\\n\\\\tout close.\\\\n!\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'access' stamp: 'di 10/26/2000 00:18'!\\\\ncueMorph\\\\n\\\\t^ cueMorph! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'access' stamp: 'di 10/4/2000 17:19'!\\\\nfileName\\\\n\\\\t^ movieFileName! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'access' stamp: 'di 10/22/2000 10:54'!\\\\nframeCount\\\\n\\\\n\\\\t^ frameCount! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'access' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nframeNumber: n\\\\n\\\\n\\\\tframeNumber := n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'access' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nframeNumber: n msSinceStart: ms\\\\n\\\\t\\\\\\\"Set the current frame number, and save the scorePlayer's simulated time for synchronization.\\\\\\\"\\\\n\\\\n\\\\tframeAtLastSync := n.\\\\n\\\\tmsAtLastSync := ms.\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'access' stamp: 'di 10/19/2000 16:31'!\\\\nmsPerFrame\\\\n\\\\t^ msPerFrame! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'access' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nmsPerFrame: n\\\\n\\\\t\\\\\\\"Set a new frame rate, base on, eg, score synchronization info.\\\\\\\"\\\\n\\\\n\\\\tmsPerFrame := n.\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'access' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\npageFormForFrame: frameNo\\\\n\\\\n\\\\t| f form oldFrame |\\\\noldFrame := frameNumber.\\\\nself goToPage: frameNo.\\\\nform := currentPage image deepCopy.\\\\nself goToPage: oldFrame.\\\\ntrue ifTrue: [^ form].\\\\n\\\\n\\\\tf := FileStream readOnlyFileNamed: movieFileName.\\\\n\\\\tform := Form extent: frameSize depth: frameDepth.\\\\n\\\\n\\\\t\\\\\\\"For some weird reason, the next line does not work...\\\\\\\"\\\\n\\\\tf position: (self filePosForFrameNo: frameNo).\\\\n\\\\t\\\\\\\"... but this line was found empirically to work instead.\\\\\\\"\\\\n\\\\tf position: (128 + ((frameNo-1)*(form bits size*4+4)) + 4).\\\\n\\\\n\\\\tf nextInto: form bits.\\\\n\\\\tf close.\\\\n\\\\t^ form! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'access' stamp: 'di 10/15/2000 19:15'!\\\\nrelativePosition\\\\n\\\\n\\\\t^ frameNumber asFloat / frameCount! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'access' stamp: 'di 10/11/2000 12:13'!\\\\nscorePlayer\\\\n\\\\n\\\\t^ scorePlayer! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'access' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nscorePlayer: aScorePlayer\\\\n\\\\n\\\\tscorePlayer := aScorePlayer! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'access' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nsetCueMorph: aMorph\\\\n\\\\tcueMorph := aMorph\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'access' stamp: 'di 10/13/2000 11:51'!\\\\nsoundTrackFileName\\\\n\\\\t^ soundTrackFileName! !\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'controls and layout' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nshowHideSoundTrack\\\\n\\\\n\\\\tsoundTrackForm ifNotNil:\\\\n\\\\t\\\\t[soundTrackMorph delete.\\\\n\\\\t\\\\t^ soundTrackForm := soundTrackMorph := nil].\\\\n\\\\n\\\\tsoundTrackForm := scorePlayer volumeForm: 20 from: 1 to: scorePlayer samples size nSamplesPerPixel: 250.\\\\n\\\\tsoundTrackMorph := ImageMorph new image: (Form extent: 140 @ soundTrackForm height).\\\\n\\\\tsoundTrackMorph addMorph:\\\\n\\\\t\\\\t(Morph newBounds: (soundTrackMorph bounds topCenter extent: 1@soundTrackMorph height)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcolor: Color red).\\\\n\\\\tself addMorph: soundTrackMorph after: currentPage.\\\\n\\\\tself layoutChanged.\\\\n\\\\tself stepSoundTrack.\\\\n! !\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'copying' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nduplicate\\\\n\\\\t| dup |\\\\n\\\\tplayDirection ~= 0 ifTrue: [self stopPlay].\\\\n\\\\tdup := super duplicate.\\\\n\\\\tdup scorePlayer: scorePlayer copy.  \\\\\\\"Share sound track if any.\\\\\\\"\\\\n\\\\t^ dup duplicateMore startStepping! !\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'event handling' stamp: 'di 10/16/2000 13:27'!\\\\nhandlesMouseDown: evt\\\\n\\\\t\\\\\\\"We use shift drag to 'tear off' a thumbnail\\\\\\\"\\\\n\\\\n\\\\tevt shiftPressed ifTrue: [^ true].\\\\n\\\\t^ super handlesMouseDown: evt! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'event handling' stamp: 'di 10/16/2000 13:32'!\\\\nmouseDown: evt\\\\n\\\\t\\\\\\\"We use shift drag to 'tear off' a thumbnail\\\\\\\"\\\\n\\\\n\\\\tevt shiftPressed ifTrue: [^ self makeThumbnailInHand: evt hand].\\\\n\\\\t^ super mouseDown: evt\\\\n\\\\t\\\\t! !\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'geometry' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nextent: newExtent\\\\n\\\\n\\\\t| tlMargin brMargin pageExtent scale fullSizeImage |\\\\n\\\\tfullSizeImage := frameBufferIfScaled ifNil: [currentPage image].\\\\n\\\\tframeCount ifNil: [^ self].  \\\\\\\"Not yet open\\\\\\\"\\\\n\\\\ttlMargin := currentPage topLeft - self topLeft.\\\\n\\\\tbrMargin := self bottomRight - currentPage bottomRight.\\\\n\\\\tpageExtent := newExtent - brMargin - tlMargin.\\\\n\\\\tscale := pageExtent x asFloat / frameSize x min: pageExtent y asFloat / frameSize y.\\\\n\\\\t(scale := scale max: 0.25) > 0.9 ifTrue: [scale := 1.0].\\\\n\\\\n\\\\tpageExtent := (frameSize * scale) rounded.\\\\n\\\\tpageExtent = frameSize\\\\n\\\\t\\\\tifTrue: [currentPage image: fullSizeImage.\\\\n\\\\t\\\\t\\\\t\\\\tframeBufferIfScaled := nil]\\\\n\\\\t\\\\tifFalse: [currentPage image: (Form extent: pageExtent depth: frameDepth).\\\\n\\\\t\\\\t\\\\t\\\\tframeBufferIfScaled := fullSizeImage.\\\\n\\\\t\\\\t\\\\t\\\\t(WarpBlt current toForm: currentPage image) sourceForm: fullSizeImage;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcombinationRule: 3;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcopyQuad: fullSizeImage boundingBox innerCorners\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttoRect: currentPage image boundingBox].\\\\n\\\\t^ self layoutChanged\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'geometry' stamp: 'dgd 2/22/2003 19:01'!\\\\nposition: newPos \\\\n\\\\tsuper position: newPos.\\\\n\\\\t(currentPage notNil and: [currentPage left odd]) \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"crude word alignment for depth = 16\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\tsuper position: newPos + (1 @ 0)]! !\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:38'!\\\\ndefaultBorderWidth\\\\n\\\\t\\\\\\\"answer the default border width for the receiver\\\\\\\"\\\\n\\\\t^ 2! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:29'!\\\\ndefaultColor\\\\n\\\\t\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color veryLightGray! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nduplicateMore\\\\n\\\\t\\\\\\\"Duplicate dies not replicate Forms, but MoviePlayers need this.\\\\\\\"\\\\n\\\\n\\\\tframeBufferIfScaled := frameBufferIfScaled deepCopy.\\\\n\\\\tcurrentPage image: currentPage image deepCopy.\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'initialization' stamp: 'di 10/8/2000 21:43'!\\\\nopenFileNamed: fName \\\\n\\\\tself pvtOpenFileNamed: fName.\\\\n\\\\tself goToPage: 1! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nopenFileNamed: fName withScorePlayer: playerReady andPlayFrom: frameNo\\\\n\\\\t\\\\\\\"Note: The plan is that the score player (a SampledSound) is already spaced\\\\n\\\\tforward to this frame number so it does not need to be reset as would normally\\\\n\\\\thappen in startRunning.\\\\\\\"\\\\n\\\\n\\\\tself pvtOpenFileNamed: fName.\\\\n\\\\tscorePlayer := playerReady.\\\\n\\\\tframeNumber := frameNo.\\\\n\\\\tframeAtLastSync := frameNo.\\\\n\\\\tmsAtLastSync := frameAtLastSync * msPerFrame.\\\\n\\\\tself playForward.! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nsetInitialState\\\\n\\\\tsuper setInitialState.\\\\n\\\\\\\"\\\\\\\"\\\\n\\\\tself layoutInset: 3.\\\\n\\\\tpageSize := frameSize := 200 @ 200.\\\\n\\\\tframeDepth := 8.\\\\n\\\\tself disableDragNDrop! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'initialization' stamp: 'dgd 2/22/2003 13:22'!\\\\nstopSoundTrackIfAny\\\\n\\\\tscorePlayer isNil ifTrue: [^self].\\\\n\\\\t(scorePlayer isKindOf: SampledSound) \\\\n\\\\t\\\\tifTrue: [scorePlayer endGracefully]\\\\n\\\\t\\\\tifFalse: [scorePlayer := nil]! !\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'menu' stamp: 'dgd 2/22/2003 13:21'!\\\\naddSoundTrack\\\\n\\\\t| fileName |\\\\n\\\\tfileName := Utilities chooseFileWithSuffixFromList: #('.aif' '.wav')\\\\n\\\\t\\\\t\\\\t\\\\twithCaption: 'Choose a sound track file'.\\\\n\\\\tfileName isNil ifTrue: [^self].\\\\n\\\\tsoundTrackFileName := fileName.\\\\n\\\\tself tryToShareScoreFor: soundTrackFileName.\\\\n\\\\tscorePlayer ifNil: \\\\n\\\\t\\\\t\\\\t[('*aif' match: fileName) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [scorePlayer := SampledSound fromAIFFfileNamed: fileName].\\\\n\\\\t\\\\t\\\\t('*wav' match: fileName) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [scorePlayer := SampledSound fromWaveFileNamed: fileName]].\\\\n\\\\tsoundTrackForm ifNotNil: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"Compute new soundTrack if we're showing it.\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\t\\\\tshowHideSoundTrack;\\\\n\\\\t\\\\t\\\\t\\\\tshowHideSoundTrack]! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'menu' stamp: 'di 10/19/2000 17:07'!\\\\nendClipHere\\\\n\\\\t\\\\\\\"Change set the termination time for this clip via the endMorph\\\\\\\"\\\\n\\\\n\\\\tcueMorph ifNil: [^ self].\\\\n\\\\tcueMorph setEndFrameNumber: frameNumber\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'menu' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\ninvokeBookMenu\\\\n\\\\t\\\\\\\"Invoke the book's control panel menu.\\\\\\\"\\\\n\\\\t| aMenu |\\\\n\\\\taMenu := MVCMenuMorph new defaultTarget: self.\\\\n\\\\taMenu add:\\\\t'make a new movie' translated action: #makeAMovie.\\\\n\\\\taMenu add:\\\\t'open movie file' translated action: #openMovieFile.\\\\n\\\\taMenu add:\\\\t'add sound track' translated action: #addSoundTrack.\\\\n\\\\taMenu addLine.\\\\n\\\\tscorePlayer ifNotNil:\\\\n\\\\t\\\\t[soundTrackForm isNil\\\\n\\\\t\\\\t\\\\tifTrue: [aMenu add:\\\\t'show sound track' translated action: #showHideSoundTrack]\\\\n\\\\t\\\\t\\\\tifFalse: [aMenu add:\\\\t'hide sound track' translated action: #showHideSoundTrack]].\\\\n\\\\taMenu add:\\\\t'make thumbnail' translated action: #thumbnailForThisPage.\\\\n\\\\tcueMorph ifNotNil:\\\\n\\\\t\\\\t[\\\\\\\"Should check if piano roll and score already have a start event\\\\n\\\\t\\\\tprior to this time.\\\\\\\"\\\\n\\\\t\\\\taMenu add:\\\\t'end clip here' translated action: #endClipHere].\\\\n\\\\n\\\\taMenu popUpEvent: self world activeHand lastEvent in: self world\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'menu' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nmakeAMovie\\\\n\\\\t| scoreController score |\\\\n\\\\tframeSize := 640@480.  frameDepth := 16.  self makeMyPage; changed.\\\\n\\\\n\\\\t(score := MIDIScore new initialize) \\\\\\\"addAmbientEvent: (AmbientEvent new time: 200*60)\\\\\\\".\\\\n\\\\tscoreController := ScorePlayerMorph new\\\\n\\\\t\\\\t\\\\tonScorePlayer: (ScorePlayer onScore: score) title: 'sMovie'.\\\\n\\\\tpianoRoll := PianoRollScoreMorph new on: scoreController scorePlayer.\\\\n\\\\tself pianoRoll: pianoRoll.  \\\\\\\"back link\\\\\\\"\\\\n\\\\tpianoRoll enableDragNDrop;\\\\n\\\\t\\\\tuseRoundedCorners;\\\\n\\\\t\\\\tmovieClipPlayer: self;\\\\n\\\\t\\\\tborderWidth: 2;\\\\n\\\\t\\\\textent: self width @ 120;\\\\n\\\\t\\\\talign: pianoRoll topLeft with: self bottomLeft - (0@2);\\\\n\\\\t\\\\topenInWorld.\\\\n\\\\tscoreController extent: self width @ scoreController height;\\\\n\\\\t\\\\talign: scoreController topLeft with: pianoRoll bottomLeft - (0@2);\\\\n\\\\t\\\\topenInWorld.\\\\n\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'menu' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nopenMovieFile\\\\n\\\\t| fileName |\\\\n\\\\tfileName := Utilities chooseFileWithSuffixFromList: #('.movie')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\twithCaption: 'Choose a movie file to open'.\\\\n\\\\tfileName ifNotNil:\\\\n\\\\t\\\\t[self openFileNamed: fileName.\\\\n\\\\t\\\\tself showMoreControls]! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'menu' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nscanBySlider\\\\n\\\\t| scrollSlider handle |\\\\n\\\\tscrollSlider := SimpleSliderMorph new extent: 150@10;\\\\n\\\\t\\\\tcolor: color; sliderColor: Color gray;\\\\n\\\\t\\\\ttarget: self; actionSelector: #goToRelativePosition:;\\\\n\\\\t\\\\tadjustToValue: self relativePosition.\\\\n\\\\t(handle := scrollSlider firstSubmorph) on: #mouseUp send: #delete to: scrollSlider.\\\\n\\\\tscrollSlider align: handle center with: self activeHand position.\\\\n\\\\tself world addMorph: scrollSlider.\\\\n\\\\tself activeHand targetOffset: (handle width // 2) @ 0.\\\\n\\\\tself activeHand newMouseFocus: handle! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'menu' stamp: 'di 10/16/2000 13:31'!\\\\nthumbnailForThisPage\\\\n\\\\t\\\\\\\"Overridden to make a MovieFrameSyncMorph\\\\\\\"\\\\n\\\\n\\\\t^ self makeThumbnailInHand: self activeHand\\\\n! !\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'menu commands' stamp: 'di 7/6/1998 19:32'!\\\\nfirstPage\\\\n\\\\tplayDirection = 0 ifFalse: [^ self]. \\\\\\\"No-op during play\\\\\\\"\\\\n\\\\tself goToPage: 1\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'menu commands' stamp: 'di 7/6/1998 14:05'!\\\\ninsertPage\\\\n\\\\t^ self makeMyPage! !\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'movie clip player' stamp: 'di 10/19/2000 22:02'!\\\\npianoRoll\\\\n\\\\t^ pianoRoll! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'movie clip player' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\npianoRoll: aPianoRollScoreMorph\\\\n\\\\t\\\\\\\"Provides access also to the score and scorePlayer\\\\\\\"\\\\n\\\\n\\\\tpianoRoll := aPianoRollScoreMorph\\\\n! !\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'navigation' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\ngoToPage: i\\\\n\\\\tcurrentPage ifNil: [self makeMyPage].\\\\n\\\\tframeNumber := i.\\\\n\\\\tplayDirection := 0.\\\\n\\\\tself startRunning; step.  \\\\\\\"will stop after first step\\\\\\\"\\\\n\\\\tsoundTrackMorph ifNotNilDo: [:m | m image fillWhite].\\\\n\\\\tself stepSoundTrack.\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'navigation' stamp: 'di 7/6/1998 19:29'!\\\\nlastPage\\\\n\\\\tplayDirection = 0 ifFalse: [^ self]. \\\\\\\"No-op during play\\\\\\\"\\\\n\\\\tself goToPage: frameCount\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'navigation' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nnextPage\\\\n\\\\tplayDirection = 0 ifFalse: [^ self]. \\\\\\\"No-op during play\\\\\\\"\\\\n\\\\tself goToPage: (frameNumber := frameNumber + 1 min: frameCount).\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'navigation' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\npreviousPage\\\\n\\\\tplayDirection = 0 ifFalse: [^ self]. \\\\\\\"No-op during play\\\\\\\"\\\\n\\\\tself goToPage: (frameNumber := frameNumber - 1 max: 1).\\\\n! !\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'page controls' stamp: 'di 10/16/2000 13:20'!\\\\nfullControlSpecs\\\\n\\\\t^ #(\\\\t\\\\n\\\\t\\\\t\\\\t( '\\\\U00b7'\\\\t\\\\tinvokeBookMenu 'Invoke menu')\\\\n\\\\t\\\\t\\\\t( '<--'\\\\t\\\\tfirstPage\\\\t\\\\t'Go to first page')\\\\n\\\\t\\\\t\\\\t( '<<'\\\\t\\\\tplayReverse\\\\t\\\\t'Play backward')\\\\n\\\\t\\\\t\\\\t( '<-' \\\\t\\\\tpreviousPage\\\\t'Back one frame')\\\\n\\\\t\\\\t\\\\t( '| |' \\\\t\\\\tstopPlay\\\\t\\\\t'Stop playback')\\\\n\\\\t\\\\t\\\\t( '->'\\\\t\\\\tnextPage\\\\t\\\\t'Forward one frame')\\\\n\\\\t\\\\t\\\\t( '>>'\\\\t\\\\tplayForward\\\\t'Play forward')\\\\n\\\\t\\\\t\\\\t( '-->'\\\\t\\\\tlastPage\\\\t\\\\t\\\\t'Go to final page')\\\\n\\\\t\\\\t\\\\t( '<->'\\\\t\\\\tscanBySlider\\\\t'Scan by slider'  'menu')\\\\n\\\\t\\\\t\\\\\\\"Note extra spec 'menu' causes mousedown activation -- see makePageControlsFrom:\\\\\\\"\\\\n\\\\t)! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'page controls' stamp: 'di 10/24/2000 16:55'!\\\\nshowPageControls\\\\n\\\\tself showPageControls: self fullControlSpecs.\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'page controls' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nshowPageControls: controlSpecs \\\\n\\\\t| pageControls |\\\\n\\\\tself hidePageControls.\\\\n\\\\n\\\\tpageControls := self makePageControlsFrom: controlSpecs.\\\\n\\\\tpageControls borderWidth: 0; layoutInset: 0; extent: pageControls width@14.\\\\n\\\\tpageControls  setProperty: #pageControl toValue: true.\\\\n\\\\tpageControls setNameTo: 'Page Controls'.\\\\n\\\\tpageControls eventHandler: (EventHandler new on: #mouseDown send: #move to: self).\\\\n\\\\tself addMorphBack: pageControls beSticky! !\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'piano rolls' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\npauseFrom: player\\\\n\\\\n\\\\tplayDirection := 0.\\\\n\\\\tself step.! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'piano rolls' stamp: 'di 10/25/2000 22:06'!\\\\nresetFrom: player\\\\n\\\\tself pauseFrom: player.\\\\n\\\\tself firstPage! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'piano rolls' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nresumeFrom: player\\\\n\\\\tplayDirection ~= 0 ifTrue: [^ self].  \\\\\\\"Already running\\\\\\\"\\\\n\\\\tplayDirection := 1.\\\\n\\\\tpianoRoll ifNil:\\\\n\\\\t\\\\t[\\\\\\\"Sync movie to score player if not a clip player\\\\\\\"\\\\n\\\\t\\\\tscorePlayer := player].\\\\n\\\\tself startRunning! !\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'player control' stamp: 'di 10/16/2000 11:02'!\\\\ngoToRelativePosition: newPos\\\\n\\\\n\\\\tmovieFile ifNotNil: [^ self].\\\\n\\\\tself goToPage: ((newPos*frameCount) asInteger min: frameCount max: 1).\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'player control' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nplayForward\\\\n\\\\t(playDirection ~= 0 or: [frameNumber >= frameCount]) ifTrue:\\\\n\\\\t\\\\t[^ self]. \\\\\\\"No-op during play or at end\\\\\\\"\\\\n\\\\tplayDirection := 1.\\\\n\\\\tself startRunning! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'player control' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nplayReverse\\\\n\\\\t(playDirection ~= 0 or: [frameNumber <= 1]) ifTrue:\\\\n\\\\t\\\\t[^ self]. \\\\\\\"No-op during play or at end\\\\\\\"\\\\n\\\\tplayDirection := -1.\\\\n\\\\tself startRunning! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'player control' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nstopPlay\\\\n\\\\n\\\\tplayDirection := 0.\\\\n\\\\tself step! !\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'rounding' stamp: 'di 10/22/2000 23:41'!\\\\nwantsRoundedCorners\\\\n\\\\t^ Preferences roundedWindowCorners or: [super wantsRoundedCorners]! !\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'stepping' stamp: 'di 9/5/2000 23:09'!\\\\nfileByteCountPerFrame\\\\n\\\\t\\\\n\\\\t^ (frameBufferIfScaled ifNil: [currentPage image]) bits size * 4\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'stepping' stamp: 'di 5/27/1999 22:40'!\\\\nfilePosForFrameNo: frameNo\\\\n\\\\t\\\\n\\\\t^ 128 + ((frameNo-1)*(4+self fileByteCountPerFrame)) + 4\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'stepping' stamp: 'dgd 2/22/2003 13:22'!\\\\nstartRunning\\\\n\\\\t| ms |\\\\n\\\\t(frameBufferIfScaled ifNil: [currentPage image]) unhibernate.\\\\n\\\\tmovieFile := AsyncFile new \\\\n\\\\t\\\\t\\\\t\\\\topen: (FileDirectory default fullNameFor: movieFileName)\\\\n\\\\t\\\\t\\\\t\\\\tforWrite: false.\\\\n\\\\tmovieFile \\\\n\\\\t\\\\tprimReadStart: movieFile fileHandle\\\\n\\\\t\\\\tfPosition: (self filePosForFrameNo: frameNumber)\\\\n\\\\t\\\\tcount: self fileByteCountPerFrame.\\\\n\\\\tscorePlayer isNil \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[ms := Time millisecondClockValue.\\\\n\\\\t\\\\t\\\\tmsAtStart := ms - ((frameNumber - 1) * msPerFrame).\\\\n\\\\t\\\\t\\\\tmsAtLastSync := ms - msAtStart]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[(playDirection > 0 and: [scorePlayer isKindOf: SampledSound]) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[scorePlayer\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\treset;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tplaySilentlyUntil: (frameNumber - 1) * msPerFrame / 1000.0;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinitialVolume: 1.0.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[scorePlayer resumePlaying.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmsAtLastSync := scorePlayer millisecondsSinceStart] \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforkAt: Processor userInterruptPriority].\\\\n\\\\t\\\\t\\\\tmsAtLastSync := scorePlayer millisecondsSinceStart].\\\\n\\\\tframeAtLastSync := frameNumber! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'stepping' stamp: 'dgd 2/22/2003 13:22'!\\\\nstep\\\\n\\\\t\\\\\\\"NOTE:  The movie player has two modes of play, depending on whether scorePlayer is nil or not.  If scorePlayer is nil, then play runs according to the millisecond clock.  If scorePlayer is not nil, then the scorePlayer is consulted for synchronization.  If the movie is running ahead, then some calls on step will skip their  action until the right time.  If the movie is running behind, then the frame may advance by more than one to maintain synchronization.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"ALSO: This player operates with overlapped disk i/o.  This means that while one frame is being displayed, the next frame in sequence is being read into a disk buffer.  The value of frameNumber corresponds to the frame currently visible.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"This code may not work right for playing backwards right now.\\\\n\\\\tSingle-step and backwards (dir <= 0) should just run open-loop.\\\\\\\"\\\\n\\\\n\\\\t| byteCount simTime ms nextFrameNumber |\\\\n\\\\tmovieFile isNil ifTrue: [^self].\\\\n\\\\tscorePlayer isNil \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[(ms := Time millisecondClockValue) < msAtStart \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"clock rollover\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmsAtStart := ms - (frameNumber * msPerFrame)].\\\\n\\\\t\\\\t\\\\tsimTime := ms - msAtStart]\\\\n\\\\t\\\\tifFalse: [simTime := scorePlayer millisecondsSinceStart].\\\\n\\\\tplayDirection > 0 \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[nextFrameNumber := frameAtLastSync \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t+ ((simTime - msAtLastSync) // msPerFrame).\\\\n\\\\t\\\\t\\\\tnextFrameNumber = frameNumber \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[((scorePlayer isKindOf: AbstractSound) and: [scorePlayer isPlaying not]) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [^self stopRunning].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^self]]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[nextFrameNumber := playDirection < 0 \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [frameNumber - 1]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [frameNumber]].\\\\n\\\\tbyteCount := self fileByteCountPerFrame.\\\\n\\\\tself stepSoundTrack.\\\\n\\\\tmovieFile waitForCompletion.\\\\n\\\\tmovieFile \\\\n\\\\t\\\\tprimReadResult: movieFile fileHandle\\\\n\\\\t\\\\tintoBuffer: (frameBufferIfScaled ifNil: [currentPage image]) bits\\\\n\\\\t\\\\tat: 1\\\\n\\\\t\\\\tcount: byteCount // 4.\\\\n\\\\tframeBufferIfScaled ifNotNil: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"If this player has been shrunk, then we have to warp to the current page.\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t(WarpBlt current toForm: currentPage image)\\\\n\\\\t\\\\t\\\\t\\\\tsourceForm: frameBufferIfScaled;\\\\n\\\\t\\\\t\\\\t\\\\tcombinationRule: 3;\\\\n\\\\t\\\\t\\\\t\\\\tcellSize: (playDirection = 0 \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"Use smoothing if just stepping\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t2]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [1]);\\\\n\\\\t\\\\t\\\\t\\\\tcopyQuad: frameBufferIfScaled boundingBox innerCorners\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttoRect: currentPage image boundingBox].\\\\n\\\\tcurrentPage changed.\\\\n\\\\tframeNumber := nextFrameNumber.\\\\n\\\\t(playDirection = 0 or: \\\\n\\\\t\\\\t\\\\t[(playDirection > 0 and: [frameNumber >= frameCount]) \\\\n\\\\t\\\\t\\\\t\\\\tor: [playDirection < 0 and: [frameNumber <= 1]]]) \\\\n\\\\t\\\\tifTrue: [^self stopRunning].\\\\n\\\\n\\\\t\\\\\\\"Start the read operation for the next frame...\\\\\\\"\\\\n\\\\tmovieFile \\\\n\\\\t\\\\tprimReadStart: movieFile fileHandle\\\\n\\\\t\\\\tfPosition: (self filePosForFrameNo: frameNumber)\\\\n\\\\t\\\\tcount: byteCount! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'stepping' stamp: 'aoy 2/15/2003 21:45'!\\\\nstepSoundTrack\\\\n\\\\t| x image timeInMillisecs |\\\\n\\\\tscorePlayer ifNil: [^self].\\\\n\\\\tsoundTrackForm ifNil: [^self].\\\\n\\\\ttimeInMillisecs := playDirection = 0 \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"Stepping forward or back\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t (frameNumber - 1) * msPerFrame]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"Driven by sound track\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t scorePlayer millisecondsSinceStart].\\\\n\\\\tx := timeInMillisecs / 1000.0 * scorePlayer originalSamplingRate // 250.\\\\n\\\\timage := soundTrackMorph image.\\\\n\\\\timage \\\\n\\\\t\\\\tcopy: (image boundingBox translateBy: (x - (image width // 2)) @ 0)\\\\n\\\\t\\\\tfrom: soundTrackForm\\\\n\\\\t\\\\tto: 0 @ 0\\\\n\\\\t\\\\trule: Form over.\\\\n\\\\tsoundTrackMorph changed! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'stepping' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nstopRunning\\\\n\\\\t\\\\\\\"Must only be called with no outstanding file read requests...\\\\\\\"\\\\n\\\\tmovieFile ifNotNil: [movieFile close.  movieFile := nil].\\\\n\\\\tplayDirection := 0.\\\\n\\\\tself stopSoundTrackIfAny\\\\n! !\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'testing' stamp: 'di 8/8/1998 11:57'!\\\\nstepTime\\\\n\\\\t^ 0  \\\\\\\"step as fast as possible\\\\\\\"! !\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nmakeMyPage\\\\n\\\\n\\\\tcurrentPage ifNotNil:\\\\n\\\\t\\\\t[(currentPage isMemberOf: ImageMorph)\\\\n\\\\t\\\\t\\\\tifTrue: [\\\\\\\"currentPage is already an ImageMorph.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(currentPage image extent = frameSize\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tand: [currentPage image depth = frameDepth])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [^ self  \\\\\\\"page is already properly dimensioned.\\\\\\\"].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ currentPage image: (Form extent: frameSize depth: frameDepth)]\\\\n\\\\t\\\\t\\\\tifFalse: [currentPage releaseCachedState; delete]].\\\\n\\\\tcurrentPage := ImageMorph new image: (Form extent: frameSize depth: frameDepth).\\\\n\\\\tcurrentPage lock.\\\\n\\\\tpages := OrderedCollection with: currentPage.\\\\n\\\\tself addMorphFront: currentPage! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'private' stamp: 'di 10/25/2000 23:01'!\\\\nmakeThumbnailInHand: aHand\\\\n\\\\n\\\\tscorePlayer ifNotNil:\\\\n\\\\t\\\\t[\\\\\\\"Position the soundTrack for this frameNumber\\\\\\\"\\\\n\\\\t\\\\tscorePlayer reset; playSilentlyUntil: frameNumber - 1 * msPerFrame / 1000.0].\\\\n\\\\n\\\\taHand attachMorph:\\\\n\\\\t\\\\t(MovieClipStartMorph new\\\\n\\\\t\\\\t\\\\tmovieFileName: movieFileName\\\\n\\\\t\\\\t\\\\tsoundTrackFileName: soundTrackFileName\\\\n\\\\t\\\\t\\\\timage: currentPage image\\\\n\\\\t\\\\t\\\\tplayer: self\\\\n\\\\t\\\\t\\\\tframeNumber: frameNumber)\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\npvtOpenFileNamed: fName\\\\n\\\\t\\\\\\\"Private - open on the movie file iof the given name\\\\\\\"\\\\n\\\\n\\\\t| f w h d n m |\\\\n\\\\tself stopRunning.\\\\n\\\\tfName = movieFileName ifTrue: [^ self].  \\\\\\\"No reopen necessary on same file\\\\\\\"\\\\n\\\\n\\\\tmovieFileName := fName.\\\\n\\\\t\\\\\\\"Read movie file parameters from 128-byte header...\\\\n\\\\t\\\\t(records follow as {N=int32, N words}*)\\\\\\\"\\\\n\\\\tf := (FileStream oldFileNamed: movieFileName) binary.\\\\n\\\\t\\\\tf nextInt32.\\\\n\\\\t\\\\tw := f nextInt32.\\\\n\\\\t\\\\th := f nextInt32.\\\\n\\\\t\\\\td := f nextInt32.\\\\n\\\\t\\\\tn := f nextInt32.\\\\n\\\\t\\\\tm := f nextInt32.\\\\n\\\\t\\\\tf close.\\\\n\\\\tpageSize := frameSize := w@h.\\\\n\\\\tframeDepth := d.\\\\n\\\\tframeCount := n.\\\\n\\\\tframeNumber := 1.\\\\n\\\\tplayDirection := 0.\\\\n\\\\tmsAtLastSync := 0.\\\\n\\\\tmsPerFrame := m/1000.0.\\\\n\\\\tself makeMyPage.\\\\n\\\\t(SmalltalkImage current platformName = 'Mac OS') ifTrue:[\\\\n\\\\t\\\\t(SmalltalkImage current extraVMMemory < self fileByteCountPerFrame) ifTrue:\\\\n\\\\t\\\\t\\\\t[^ self inform:\\\\n'Playing movies in Squeak requires that extra memory be allocated\\\\nfor asynchronous file IO.  This particular movie requires a buffer of\\\\n' ,\\\\n(self fileByteCountPerFrame printString) , ' bytes, but you only have ' , (SmalltalkImage current extraVMMemory printString) , ' allocated.\\\\nYou can evaluate ''SmalltalkImage current extraVMMemory'' to check your allocation,\\\\nand ''SmalltalkImage current extraVMMemory: 485000'' or the like to increase your allocation.\\\\nNote that raising your allocation in this way only marks your image as\\\\nneeding this much, so you must then save, quit, and start over again\\\\nbefore you can run this movie.  Good luck.']].\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\ntryToShareScoreFor: fileName\\\\n\\\\n\\\\tscorePlayer := nil.\\\\n\\\\tself class allInstancesDo:\\\\n\\\\t\\\\t[:mp | mp == self ifFalse:\\\\n\\\\t\\\\t\\\\t[mp soundTrackFileName = fileName ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[\\\\\\\"Found this score already open in another player\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t-- return a copy that shares the same sound buffer.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tmp scorePlayer ifNotNil: [^ scorePlayer := mp scorePlayer copy reset]]]]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMoviePlayerMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MoviePlayerMorph class methodsFor: 'class initialization' stamp: 'hg 8/3/2000 16:59'!\\\\ninitialize\\\\n\\\\n\\\\tFileList registerFileReader: self! !\\\\n\\\\n\\\\n!MoviePlayerMorph class methodsFor: 'fileIn/Out' stamp: 'sd 2/6/2002 21:36'!\\\\nfileReaderServicesForFile: fullName suffix: suffix\\\\n\\\\n\\\\t^(suffix = 'movie') | (suffix = '*')\\\\n\\\\t\\\\tifTrue: [ self services]\\\\n\\\\t\\\\tifFalse: [#()]! !\\\\n\\\\n!MoviePlayerMorph class methodsFor: 'fileIn/Out' stamp: 'hg 8/3/2000 17:01'!\\\\nopenAsMovie: fullFileName\\\\n\\\\t\\\\\\\"Open a MoviePlayerMorph on the given file (must be in .movie format).\\\\\\\"\\\\n \\\\n\\\\t(self new openFileNamed: fullFileName) openInWorld! !\\\\n\\\\n!MoviePlayerMorph class methodsFor: 'fileIn/Out' stamp: 'sw 2/17/2002 01:23'!\\\\nserviceOpenAsMovie\\\\n\\\\t\\\\\\\"Answer a service for opening a file as a movie\\\\\\\"\\\\n\\\\n\\\\t^ SimpleServiceEntry \\\\n\\\\t\\\\tprovider: self \\\\n\\\\t\\\\tlabel: 'open as movie'\\\\n\\\\t\\\\tselector: #openAsMovie:\\\\n\\\\t\\\\tdescription: 'open file as movie'\\\\n\\\\t\\\\tbuttonLabel: 'open'! !\\\\n\\\\n!MoviePlayerMorph class methodsFor: 'fileIn/Out' stamp: 'sw 9/7/2004 18:21'!\\\\nservices\\\\n\\\\t\\\\\\\"Formerly: answer a service for opening as a movie.  Nowadays... no services\\\\\\\"\\\\n\\\\n\\\\t^ #().\\\\n\\\\\\\"\\\\n\\\\t^ Array with: self serviceOpenAsMovie\\\\\\\"\\\\n\\\\n\\\\t! !\\\\n\\\\n\\\\n!MoviePlayerMorph class methodsFor: 'initialize-release' stamp: 'SD 11/15/2001 22:22'!\\\\nunload\\\\n\\\\n\\\\tFileList unregisterFileReader: self ! !\\\\nEllipseMorph subclass: #MovingEyeMorph\\\\n\\\\tinstanceVariableNames: 'inner iris'\\\\n\\\\tclassVariableNames: 'IrisSize'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-Demo'!\\\\n\\\\n!MovingEyeMorph methodsFor: 'as yet unclassified' stamp: 'yo 2/15/2001 15:24'!\\\\nirisPos: cp\\\\n\\\\n\\\\t| a b theta x y |\\\\n\\\\ttheta _ (cp - self center) theta.\\\\n\\\\ta _ inner width // 2.\\\\n\\\\tb _ inner height // 2.\\\\n\\\\tx _ a * (theta cos).\\\\n\\\\ty _ b * (theta sin).\\\\n\\\\tiris position: ((x@y) asIntegerPoint) + self center - (iris extent // 2).! !\\\\n\\\\n\\\\n!MovingEyeMorph methodsFor: 'geometry' stamp: 'yo 2/15/2001 15:59'!\\\\nextent: aPoint\\\\n\\\\n\\\\tsuper extent: aPoint.\\\\n\\\\tinner extent: (self extent * ((1.0@1.0)-IrisSize)) asIntegerPoint.\\\\n\\\\tiris extent: (self extent * IrisSize) asIntegerPoint.\\\\n\\\\tinner position: (self center - (inner extent // 2)) asIntegerPoint.\\\\n! !\\\\n\\\\n\\\\n!MovingEyeMorph methodsFor: 'initialization' stamp: 'dgd 3/7/2003 14:42'!\\\\ndefaultColor\\\\n\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color black! !\\\\n\\\\n!MovingEyeMorph methodsFor: 'initialization' stamp: 'dgd 3/7/2003 14:42'!\\\\ninitialize\\\\n\\\\t\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tinner _ EllipseMorph new.\\\\n\\\\tinner color: self color.\\\\n\\\\tinner extent: (self extent * (1.0 @ 1.0 - IrisSize)) asIntegerPoint.\\\\n\\\\tinner borderColor: self color.\\\\n\\\\tinner borderWidth: 0.\\\\n\\\\\\\"\\\\\\\"\\\\n\\\\tiris _ EllipseMorph new.\\\\n\\\\tiris color: Color white.\\\\n\\\\tiris extent: (self extent * IrisSize) asIntegerPoint.\\\\n\\\\\\\"\\\\\\\"\\\\n\\\\tself addMorphCentered: inner.\\\\n\\\\tinner addMorphCentered: iris.\\\\n\\\\\\\"\\\\\\\"\\\\n\\\\tself extent: 26 @ 33! !\\\\n\\\\n\\\\n!MovingEyeMorph methodsFor: 'stepping and presenter' stamp: 'di 2/18/2001 00:10'!\\\\nstep\\\\n\\\\t| cp |\\\\n\\\\tcp _ self globalPointToLocal: World primaryHand position.\\\\n\\\\t(inner containsPoint: cp)\\\\n\\\\t\\\\tifTrue: [iris position: (cp - (iris extent // 2))]\\\\n\\\\t\\\\tifFalse: [self irisPos: cp].\\\\n\\\\tself changed \\\\\\\"cover up gribblies if embedded in Flash\\\\\\\"! !\\\\n\\\\n\\\\n!MovingEyeMorph methodsFor: 'testing' stamp: 'yo 2/15/2001 15:38'!\\\\nstepTime\\\\n\\\\n\\\\t^ 100.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMovingEyeMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MovingEyeMorph class methodsFor: 'class initialization' stamp: 'yo 2/15/2001 16:04'!\\\\ninitialize\\\\n\\\\\\\"\\\\n\\\\tMovingEyeMorph initialize\\\\n\\\\\\\"\\\\n\\\\tIrisSize _ (0.42@0.50).! !\\\\n\\\\n\\\\n!MovingEyeMorph class methodsFor: 'parts bin' stamp: 'sw 8/2/2001 12:51'!\\\\ndescriptionForPartsBin\\\\n\\\\t^ self partName:\\\\t'MovingEye'\\\\n\\\\t\\\\tcategories:\\\\t\\\\t#('Demo')\\\\n\\\\t\\\\tdocumentation:\\\\t'An eye which follows the cursor'! !\\\\nSoundCodec subclass: #MuLawCodec\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: 'DecodingTable'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Sound-Synthesis'!\\\\n!MuLawCodec commentStamp: '<historical>' prior: 0!\\\\nI represent a mu-law (u-law) codec. I compress sound data by a factor of 2:1 by encoding the most significant 12 bits of each 16-bit sample as a signed, exponentially encoded byte. The idea is to use more resolution for smaller lower sample values. This encoding was developed for the North American phone system and a variant of it, a-law, is a European phone standard. It is a popular sound encoding on Unix platforms (.au files).\\\\n!\\\\n\\\\n\\\\n!MuLawCodec methodsFor: 'external access' stamp: 'di 2/8/1999 22:28'!\\\\nuLawDecodeSample: byte\\\\n\\\\t\\\\\\\"Decode a 16-bit signed sample from 8 bits using uLaw decoding\\\\\\\"\\\\n\\\\n\\\\t^ DecodingTable at: byte + 1! !\\\\n\\\\n!MuLawCodec methodsFor: 'external access' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nuLawEncodeSample: sample\\\\n\\\\t\\\\\\\"Encode a 16-bit signed sample into 8 bits using uLaw encoding\\\\\\\"\\\\n\\\\n\\\\t| s |\\\\n\\\\ts := sample // 8.  \\\\\\\"drop 3 least significant bits\\\\\\\"\\\\n\\\\ts < 0 ifTrue: [^ (self uLawEncode12Bits: 0-s) + 16r80]\\\\n\\\\t\\\\tifFalse: [^ (self uLawEncode12Bits: s)].\\\\n! !\\\\n\\\\n\\\\n!MuLawCodec methodsFor: 'subclass responsibility' stamp: 'jm 2/2/1999 09:15'!\\\\nbytesPerEncodedFrame\\\\n\\\\t\\\\\\\"Answer the number of bytes required to hold one frame of compressed sound data. Answer zero if this codec produces encoded frames of variable size.\\\\\\\"\\\\n\\\\n\\\\t^ 1\\\\n! !\\\\n\\\\n!MuLawCodec methodsFor: 'subclass responsibility' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ndecodeFrames: frameCount from: srcByteArray at: srcIndex into: dstSoundBuffer at: dstIndex\\\\n\\\\t\\\\\\\"Decode the given number of monophonic frames starting at the given index in the given ByteArray of compressed sound data and storing the decoded samples into the given SoundBuffer starting at the given destination index. Answer a pair containing the number of bytes of compressed data consumed and the number of decompressed samples produced.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: Assume that the sender has ensured that the given number of frames will not exhaust either the source or destination buffers.\\\\\\\"\\\\n\\\\n\\\\t| dst |\\\\n\\\\tdst := dstIndex.\\\\n\\\\tsrcIndex to: srcIndex + frameCount - 1 do: [:src |\\\\n\\\\t\\\\tdstSoundBuffer at: dst put: (DecodingTable at: (srcByteArray at: src) + 1).\\\\n\\\\t\\\\tdst := dst + 1].\\\\n\\\\t^ Array with: frameCount with: frameCount\\\\n! !\\\\n\\\\n!MuLawCodec methodsFor: 'subclass responsibility' stamp: 'di 2/8/1999 22:25'!\\\\nencodeFrames: frameCount from: srcSoundBuffer at: srcIndex into: dstByteArray at: dstIndex\\\\n\\\\t\\\\\\\"Encode the given number of frames starting at the given index in the given monophonic SoundBuffer and storing the encoded sound data into the given ByteArray starting at the given destination index. Encode only as many complete frames as will fit into the destination. Answer a pair containing the number of samples consumed and the number of bytes of compressed data produced.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: Assume that the sender has ensured that the given number of frames will not exhaust either the source or destination buffers.\\\\\\\"\\\\n\\\\n\\\\tsrcIndex to: srcIndex + frameCount - 1 do: [:i |\\\\n\\\\t\\\\tdstByteArray at: i put: (self uLawEncodeSample: (srcSoundBuffer at: i))].\\\\n\\\\t^ Array with: frameCount with: frameCount\\\\n! !\\\\n\\\\n!MuLawCodec methodsFor: 'subclass responsibility' stamp: 'jm 2/2/1999 09:11'!\\\\nsamplesPerFrame\\\\n\\\\t\\\\\\\"Answer the number of sound samples per compression frame.\\\\\\\"\\\\n\\\\n\\\\t^ 1\\\\n! !\\\\n\\\\n\\\\n!MuLawCodec methodsFor: 'private' stamp: 'di 2/9/1999 13:25'!\\\\nuLawEncode12Bits: s\\\\n\\\\t\\\\\\\"Encode a 12-bit unsigned sample (0-4095) into 7 bits using uLaw encoding.\\\\n\\\\tThis gets called by a method that scales 16-bit signed integers down to a\\\\n\\\\t\\\\t12-bit magnitude, and then ORs in 16r80 if they were negative.\\\\n\\\\tDetail: May get called with s >= 4096, and this works fine.\\\\\\\"\\\\n\\\\n\\\\ts < 496 ifTrue: [\\\\n\\\\t\\\\ts < 112 ifTrue: [\\\\n\\\\t\\\\t\\\\ts < 48 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\ts < 16\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [^ 16r70 bitOr: (15 - s)]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [^ 16r60 bitOr: (15 - ((s - 16) bitShift: -1))]].\\\\n\\\\t\\\\t\\\\t^ 16r50 bitOr: (15 - ((s - 48) bitShift: -2))].\\\\n\\\\t\\\\ts < 240\\\\n\\\\t\\\\t\\\\tifTrue: [^ 16r40 bitOr: (15 - ((s - 112) bitShift: -3))]\\\\n\\\\t\\\\t\\\\tifFalse: [^ 16r30 bitOr: (15 - ((s - 240) bitShift: -4))]].\\\\n\\\\n\\\\ts < 2032 ifTrue: [\\\\n\\\\t\\\\ts < 1008\\\\n\\\\t\\\\t\\\\tifTrue: [^ 16r20 bitOr: (15 - ((s - 496) bitShift: -5))]\\\\n\\\\t\\\\t\\\\tifFalse: [^ 16r10 bitOr: (15 - ((s - 1008) bitShift: -6))]].\\\\n\\\\n\\\\ts < 4080\\\\n\\\\t\\\\tifTrue: [^ 15 - ((s - 2032) bitShift: -7)]\\\\n\\\\t\\\\tifFalse: [^ 0].\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMuLawCodec class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MuLawCodec class methodsFor: 'class initialization' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Build the 256 entry table to be used to decode 8-bit uLaw-encoded samples.\\\\\\\"\\\\n\\\\t\\\\\\\"MuLawCodec initialize\\\\\\\"\\\\n\\\\n\\\\t| encoded codec lastEncodedPos lastEncodedNeg |\\\\n\\\\tDecodingTable := Array new: 256.\\\\n\\\\tcodec := self new.\\\\n\\\\tlastEncodedPos := nil.\\\\n\\\\tlastEncodedNeg := nil.\\\\n\\\\t4095 to: 0 by: -1 do: [:s |\\\\n\\\\t\\\\tencoded := codec uLawEncode12Bits: s.\\\\n\\\\t\\\\tlastEncodedPos = encoded\\\\n\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tDecodingTable at: (encoded + 1) put: (s bitShift: 3).\\\\n\\\\t\\\\t\\\\t\\\\tlastEncodedPos := encoded].\\\\n\\\\t\\\\tencoded := encoded bitOr: 16r80.\\\\n\\\\t\\\\tlastEncodedNeg = encoded\\\\n\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tDecodingTable at: (encoded + 1) put: (s bitShift: 3) negated.\\\\n\\\\t\\\\t\\\\t\\\\tlastEncodedNeg := encoded]].\\\\n! !\\\\nReadWriteStream subclass: #MultiByteBinaryOrTextStream\\\\n\\\\tinstanceVariableNames: 'isBinary converter'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Multilingual-TextConversion'!\\\\n!MultiByteBinaryOrTextStream commentStamp: '<historical>' prior: 0!\\\\nIt is similar to MultiByteFileStream, but works on in memory stream.!\\\\n\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'accessing' stamp: 'yo 11/11/2002 13:16'!\\\\nascii\\\\n\\\\tisBinary _ false\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'accessing' stamp: 'yo 11/11/2002 13:16'!\\\\nbinary\\\\n\\\\tisBinary _ true\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'accessing' stamp: 'nk 8/2/2004 17:02'!\\\\nconverter\\\\n\\\\n\\\\tconverter ifNil: [converter _ self class defaultConverter].\\\\n\\\\t^ converter\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'accessing' stamp: 'yo 8/7/2003 09:12'!\\\\nconverter: aConverter\\\\n\\\\n\\\\tconverter _ aConverter.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'accessing' stamp: 'yo 11/11/2002 13:25'!\\\\nisBinary\\\\n\\\\t^ isBinary! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'accessing' stamp: 'yo 11/11/2002 16:33'!\\\\ntext\\\\n\\\\tisBinary _ false\\\\n! !\\\\n\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'as yet unclassified' stamp: 'yo 3/1/2005 06:10'!\\\\nfileInObjectAndCodeForProject\\\\n\\\\t\\\\\\\"This file may contain:\\\\n1) a fileIn of code  \\\\n2) just an object in SmartReferenceStream format \\\\n3) both code and an object.\\\\n\\\\tFile it in and return the object.  Note that self must be a FileStream or RWBinaryOrTextStream.  Maybe ReadWriteStream incorporate RWBinaryOrTextStream?\\\\\\\"\\\\n\\\\t| refStream object |\\\\n\\\\tself text.\\\\n\\\\tself peek asciiValue = 4\\\\n\\\\t\\\\tifTrue: [  \\\\\\\"pure object file\\\\\\\"\\\\n\\\\t\\\\t\\\\tself binary.\\\\n\\\\t\\\\t\\\\trefStream _ SmartRefStream on: self.\\\\n\\\\t\\\\t\\\\tobject _ refStream nextAndClose]\\\\n\\\\t\\\\tifFalse: [  \\\\\\\"objects mixed with a fileIn\\\\\\\"\\\\n\\\\t\\\\t\\\\tself fileInProject.  \\\\\\\"reads code and objects, then closes the file\\\\\\\"\\\\n\\\\t\\\\t\\\\tself binary.\\\\n\\\\t\\\\t\\\\tobject _ SmartRefStream scannedObject].\\\\t\\\\\\\"set by side effect of one of the chunks\\\\\\\"\\\\n\\\\tSmartRefStream scannedObject: nil.  \\\\\\\"clear scannedObject\\\\\\\"\\\\n\\\\t^ object! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'as yet unclassified' stamp: 'yo 3/1/2005 06:46'!\\\\nfileInProject\\\\n\\\\n\\\\tself setConverterForCodeForProject.\\\\n\\\\tsuper fileIn.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'as yet unclassified' stamp: 'yo 3/1/2005 06:46'!\\\\nsetConverterForCodeForProject\\\\n\\\\n\\\\tself converter: UTF8TextConverter new.\\\\n! !\\\\n\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'converting' stamp: 'yo 11/11/2002 13:16'!\\\\nasBinaryOrTextStream\\\\n\\\\n\\\\t^ self\\\\n! !\\\\n\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'fileIn/Out' stamp: 'yo 8/17/2004 10:02'!\\\\nfileIn\\\\n\\\\n\\\\tself setConverterForCode.\\\\n\\\\tsuper fileIn.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'fileIn/Out' stamp: 'yo 11/11/2002 16:31'!\\\\nfileInObjectAndCode\\\\n\\\\t\\\\\\\"This file may contain:\\\\n1) a fileIn of code  \\\\n2) just an object in SmartReferenceStream format \\\\n3) both code and an object.\\\\n\\\\tFile it in and return the object.  Note that self must be a FileStream or RWBinaryOrTextStream.  Maybe ReadWriteStream incorporate RWBinaryOrTextStream?\\\\\\\"\\\\n\\\\t| refStream object |\\\\n\\\\tself text.\\\\n\\\\tself peek asciiValue = 4\\\\n\\\\t\\\\tifTrue: [  \\\\\\\"pure object file\\\\\\\"\\\\n\\\\t\\\\t\\\\tself binary.\\\\n\\\\t\\\\t\\\\trefStream _ SmartRefStream on: self.\\\\n\\\\t\\\\t\\\\tobject _ refStream nextAndClose]\\\\n\\\\t\\\\tifFalse: [  \\\\\\\"objects mixed with a fileIn\\\\\\\"\\\\n\\\\t\\\\t\\\\tself fileIn.  \\\\\\\"reads code and objects, then closes the file\\\\\\\"\\\\n\\\\t\\\\t\\\\tself binary.\\\\n\\\\t\\\\t\\\\tobject _ SmartRefStream scannedObject].\\\\t\\\\\\\"set by side effect of one of the chunks\\\\\\\"\\\\n\\\\tSmartRefStream scannedObject: nil.  \\\\\\\"clear scannedObject\\\\\\\"\\\\n\\\\t^ object! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'fileIn/Out' stamp: 'tak 1/12/2005 13:47'!\\\\nfileOutClass: extraClass andObject: theObject \\\\n\\\\tUTF8TextConverter writeBOMOn: self.\\\\n\\\\t^ super fileOutClass: extraClass andObject: theObject! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'fileIn/Out' stamp: 'yo 8/18/2004 09:36'!\\\\nsetConverterForCode\\\\n\\\\n\\\\t| current |\\\\n\\\\tcurrent _ converter saveStateOf: self.\\\\n\\\\tself position: 0.\\\\n\\\\tself binary.\\\\n\\\\t((self next: 3) = (ByteArray with: 16rEF with: 16rBB with: 16rBF)) ifTrue: [\\\\n\\\\t\\\\tself converter: UTF8TextConverter new\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tself converter: MacRomanTextConverter new.\\\\n\\\\t].\\\\n\\\\tconverter restoreStateOf: self with: current.\\\\n\\\\tself text.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'fileIn/Out' stamp: 'yo 7/7/2004 09:43'!\\\\nsetEncoderForSourceCodeNamed: streamName\\\\n\\\\n\\\\t| l |\\\\n\\\\tl _ streamName asLowercase.\\\\n\\\\\\\"\\\\t((l endsWith: FileStream multiCs) or: [\\\\n\\\\t\\\\t(l endsWith: FileStream multiSt) or: [\\\\n\\\\t\\\\t\\\\t(l endsWith: (FileStream multiSt, '.gz')) or: [\\\\n\\\\t\\\\t\\\\t\\\\t(l endsWith: (FileStream multiCs, '.gz'))]]]) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself converter: UTF8TextConverter new.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ self.\\\\n\\\\t].\\\\n\\\\\\\"\\\\n\\\\t((l endsWith: FileStream cs) or: [\\\\n\\\\t\\\\t(l endsWith: FileStream st) or: [\\\\n\\\\t\\\\t\\\\t(l endsWith: (FileStream st, '.gz')) or: [\\\\n\\\\t\\\\t\\\\t\\\\t(l endsWith: (FileStream cs, '.gz'))]]]) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself converter: MacRomanTextConverter new.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ self.\\\\n\\\\t].\\\\n\\\\n\\\\tself converter: UTF8TextConverter new.\\\\n! !\\\\n\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'properties-setting' stamp: 'yo 11/14/2002 13:49'!\\\\nsetFileTypeToObject\\\\n\\\\t\\\\\\\"do nothing.  We don't have a file type\\\\\\\"! !\\\\n\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'public' stamp: 'yo 7/30/2004 06:59'!\\\\ncontents\\\\n\\\\n\\\\t| ret state |\\\\n\\\\tstate _ converter saveStateOf: self.\\\\n\\\\tret _ self upToEnd.\\\\n\\\\tconverter restoreStateOf: self with: state.\\\\n\\\\t^ ret.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'public' stamp: 'yo 11/11/2002 16:39'!\\\\nnext\\\\n\\\\n\\\\t| n |\\\\n\\\\tn _ self converter nextFromStream: self.\\\\n\\\\tn ifNil: [^ nil].\\\\n\\\\tisBinary and: [n isCharacter ifTrue: [^ n asciiValue]].\\\\n\\\\t^ n.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'public' stamp: 'ar 4/12/2005 17:34'!\\\\nnext: anInteger \\\\n\\\\n\\\\t| multiString |\\\\n\\\\t\\\\\\\"self halt.\\\\\\\"\\\\n\\\\tself isBinary ifTrue: [^ (super next: anInteger) asByteArray].\\\\n\\\\tmultiString _ WideString new: anInteger.\\\\n\\\\t1 to: anInteger do: [:index |\\\\n\\\\t\\\\t| character |\\\\n\\\\t\\\\t(character _ self next) ifNotNil: [\\\\n\\\\t\\\\t\\\\tmultiString at: index put: character\\\\n\\\\t\\\\t] ifNil: [\\\\n\\\\t\\\\t\\\\tmultiString _ multiString copyFrom: 1 to: index - 1.\\\\n\\\\t\\\\t\\\\t^ multiString\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\t^ multiString.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'public' stamp: 'yo 12/25/2003 16:05'!\\\\nnextDelimited: terminator\\\\n\\\\n\\\\t| out ch pos |\\\\n\\\\tout _ WriteStream on: (String new: 1000).\\\\n\\\\tself atEnd ifTrue: [^ ''].\\\\n\\\\tpos _ self position.\\\\n\\\\tself next = terminator ifFalse: [\\\\n\\\\t\\\\t\\\\\\\"absorb initial terminator\\\\\\\"\\\\n\\\\t\\\\tself position: pos.\\\\n\\\\t].\\\\n\\\\t[(ch _ self next) == nil] whileFalse: [\\\\n\\\\t\\\\t(ch = terminator) ifTrue: [\\\\n\\\\t\\\\t\\\\tself peek = terminator ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tself next.  \\\\\\\"skip doubled terminator\\\\\\\"\\\\n\\\\t\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t^ out contents  \\\\\\\"terminator is not doubled; we're done!!\\\\\\\"\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tout nextPut: ch.\\\\n\\\\t].\\\\n\\\\t^ out contents.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'public' stamp: 'yo 11/11/2002 13:24'!\\\\nnextMatchAll: aColl\\\\n\\\\n    | save |\\\\n    save _ converter saveStateOf: self.\\\\n    aColl do: [:each |\\\\n       (self next) = each ifFalse: [\\\\n            converter restoreStateOf: self with: save.\\\\n            ^ false.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n    ^ true.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'public' stamp: 'yo 11/14/2002 13:54'!\\\\nnextPut: aCharacter\\\\n\\\\n\\\\taCharacter isInteger ifTrue: [^ super nextPut: aCharacter asCharacter].\\\\n\\\\t^ self converter nextPut: aCharacter toStream: self\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'public' stamp: 'yo 11/11/2002 13:24'!\\\\nnextPutAll: aCollection\\\\n\\\\n\\\\tself isBinary ifTrue: [\\\\n\\\\t\\\\t^ super nextPutAll: aCollection.\\\\n\\\\t].\\\\n\\\\taCollection do: [:e | self nextPut: e].\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'public' stamp: 'yo 11/14/2002 13:54'!\\\\npadToEndWith: aChar\\\\n\\\\t\\\\\\\"We don't have pages, so we are at the end, and don't need to pad.\\\\\\\"! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'public' stamp: 'yo 12/25/2003 16:04'!\\\\npeek\\\\n\\\\t\\\\\\\"Answer what would be returned if the message next were sent to the receiver. If the receiver is at the end, answer nil.  \\\\\\\"\\\\n\\\\n\\\\t| next pos |\\\\n\\\\tself atEnd ifTrue: [^ nil].\\\\n\\\\tpos _ self position.\\\\n\\\\tnext _ self next.\\\\n\\\\tself position: pos.\\\\n\\\\t^ next.\\\\n\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'public' stamp: 'yo 11/11/2002 13:25'!\\\\npeekFor: item \\\\n\\\\n\\\\t| next state |\\\\n\\\\t\\\\\\\"self atEnd ifTrue: [^ false]. -- SFStream will give nil\\\\\\\"\\\\n\\\\tstate _ converter saveStateOf: self.\\\\n\\\\t(next _ self next) == nil ifTrue: [^ false].\\\\n\\\\titem = next ifTrue: [^ true].\\\\n\\\\tconverter restoreStateOf: self with: state.\\\\n\\\\t^ false.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'public' stamp: 'nk 7/29/2004 12:02'!\\\\nreset\\\\n\\\\n\\\\tsuper reset.\\\\n\\\\tisBinary ifNil: [isBinary _ false].\\\\n\\\\tcollection class == ByteArray ifTrue: [\\\\\\\"Store as String and convert as needed.\\\\\\\"\\\\n\\\\t\\\\tcollection _ collection asString.\\\\n\\\\t\\\\tisBinary _ true].\\\\n\\\\n\\\\tself converter. \\\\\\\"ensure that we have a converter.\\\\\\\"! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'public' stamp: 'yo 11/11/2002 16:17'!\\\\nskipSeparators\\\\n\\\\n\\\\t[self atEnd] whileFalse: [\\\\n\\\\t\\\\tself basicNext isSeparator ifFalse: [\\\\n\\\\t\\\\t\\\\t^ self position: self position - 1]]\\\\n\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'public' stamp: 'yo 12/25/2003 16:04'!\\\\nskipSeparatorsAndPeekNext\\\\n\\\\n\\\\t\\\\\\\"A special function to make nextChunk fast\\\\\\\"\\\\n\\\\t| peek pos |\\\\n\\\\t[self atEnd] whileFalse: [\\\\n\\\\t\\\\tpos _ self position.\\\\n\\\\t\\\\t(peek _ self next) isSeparator ifFalse: [\\\\n\\\\t\\\\t\\\\tself position: pos.\\\\n\\\\t\\\\t\\\\t^ peek.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'public' stamp: 'yo 11/11/2002 13:24'!\\\\nupTo: delim \\\\n\\\\n\\\\t| out ch |\\\\n\\\\tout _ WriteStream on: (String new: 1000).\\\\n\\\\tself atEnd ifTrue: [^ ''].\\\\n\\\\t[(ch _ self next) isNil] whileFalse: [\\\\n\\\\t\\\\t(ch = delim) ifTrue: [\\\\n\\\\t\\\\t\\\\t^ out contents  \\\\\\\"terminator is not doubled; we're done!!\\\\\\\"\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tout nextPut: ch.\\\\n\\\\t].\\\\n\\\\t^ out contents.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'public' stamp: 'yo 11/11/2002 16:17'!\\\\nupToEnd\\\\n\\\\n\\\\t| newStream element newCollection |\\\\n\\\\tnewCollection _ self isBinary\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [ByteArray new: 100]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [String new: 100].\\\\n\\\\tnewStream _ WriteStream on: newCollection.\\\\n\\\\t[(element _ self next) notNil]\\\\n\\\\t\\\\twhileTrue: [newStream nextPut: element].\\\\n\\\\t^ newStream contents\\\\n! !\\\\n\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'private' stamp: 'nk 8/2/2004 17:01'!\\\\nguessConverter\\\\n\\\\t^ (self originalContents includesSubString: (ByteArray withAll: {27. 36}) asString)\\\\n\\\\t\\\\tifTrue: [CompoundTextConverter new]\\\\n\\\\t\\\\tifFalse: [self class defaultConverter ]! !\\\\n\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'private basic' stamp: 'yo 11/11/2002 16:01'!\\\\nbasicNext\\\\n\\\\n\\\\t^ super next \\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'private basic' stamp: 'md 10/20/2004 15:32'!\\\\nbasicNext: anInteger\\\\n\\\\n\\\\t^ super next: anInteger.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'private basic' stamp: 'yo 11/11/2002 13:21'!\\\\nbasicNext: n into: aString\\\\n\\\\n\\\\t^ super next: n into: aString.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'private basic' stamp: 'yo 11/11/2002 13:21'!\\\\nbasicNextInto: aString\\\\n\\\\n\\\\t^ super nextInto: aString.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'private basic' stamp: 'yo 11/11/2002 13:21'!\\\\nbasicNextPut: char\\\\n\\\\n\\\\t^ super nextPut: char.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'private basic' stamp: 'yo 11/11/2002 13:21'!\\\\nbasicNextPutAll: aString\\\\n\\\\n\\\\t^ super nextPutAll: aString.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'private basic' stamp: 'yo 11/11/2002 13:21'!\\\\nbasicPeek\\\\n\\\\n\\\\t^ super peek\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'private basic' stamp: 'yo 11/11/2002 13:21'!\\\\nbasicPosition\\\\n\\\\n\\\\t^ super position.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'private basic' stamp: 'yo 11/11/2002 13:21'!\\\\nbasicPosition: pos\\\\n\\\\n\\\\t^ super position: pos.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMultiByteBinaryOrTextStream class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MultiByteBinaryOrTextStream class methodsFor: 'defaults' stamp: 'yo 2/25/2005 20:04'!\\\\ndefaultConverter\\\\n\\\\t^ Latin1TextConverter new.\\\\n! !\\\\n\\\\n\\\\n!MultiByteBinaryOrTextStream class methodsFor: 'instance creation' stamp: 'ykoubo 9/28/2003 19:59'!\\\\non: aCollection encoding: encodingName \\\\n\\\\t| aTextConverter |\\\\n\\\\tencodingName isNil\\\\n\\\\t\\\\tifTrue: [aTextConverter _ TextConverter default]\\\\n\\\\t\\\\tifFalse: [aTextConverter _ TextConverter newForEncoding: encodingName].\\\\n\\\\t^ (self on: aCollection)\\\\n\\\\t\\\\tconverter: aTextConverter! !\\\\n\\\\n!MultiByteBinaryOrTextStream class methodsFor: 'instance creation' stamp: 'yo 11/23/2003 20:32'!\\\\nwith: aCollection encoding: encodingName \\\\n\\\\t| aTextConverter |\\\\n\\\\tencodingName isNil\\\\n\\\\t\\\\tifTrue: [aTextConverter _ TextConverter default]\\\\n\\\\t\\\\tifFalse: [aTextConverter _ TextConverter newForEncoding: encodingName].\\\\n\\\\t^ (self with: aCollection)\\\\n\\\\t\\\\tconverter: aTextConverter! !\\\\nStandardFileStream subclass: #MultiByteFileStream\\\\n\\\\tinstanceVariableNames: 'converter lineEndConvention wantsLineEndConversion'\\\\n\\\\tclassVariableNames: 'Cr CrLf Lf LineEndDefault LineEndStrings LookAheadCount'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Multilingual-TextConversion'!\\\\n!MultiByteFileStream commentStamp: '<historical>' prior: 0!\\\\nThe central class to access the external file.  The interface of this object is similar to good old StandardFileStream, but internally it asks the converter, which is a sub-instance of TextConverter, and do the text conversion.\\\\n\\\\n  It also combined the good old CrLfFileStream.  CrLfFileStream class>>new now returns an instance of MultiByteFileStream.\\\\n\\\\n  There are several pitfalls:\\\\n\\\\n  * You always have to be careful about the binary/text distinction.  In #text mode, it usually interpret the bytes.\\\\n  * A few file pointer operations treat the file as uninterpreted byte no matter what.  This means that if you use 'fileStream skip: -1', 'fileStream position: x', etc. in #text mode, the file position can be in the middle of multi byte character.  If you want to implement some function similar to #peek for example, call the saveStateOf: and restoreStateOf: methods to be able to get back to the original state.\\\\n  * #lineEndConvention: and #wantsLineEndConversion: (and #binary) can cause some puzzling situation because the inst var lineEndConvention and wantsLineEndConversion are mutated.  If you have any suggestions to clean up the protocol, please let me know.!\\\\n\\\\n\\\\n!MultiByteFileStream methodsFor: 'accessing' stamp: 'yo 2/21/2004 02:57'!\\\\nascii\\\\n\\\\n\\\\tsuper ascii.\\\\n\\\\tself detectLineEndConvention.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'accessing' stamp: 'yo 2/21/2004 02:57'!\\\\nbinary\\\\n\\\\n\\\\tsuper binary.\\\\n\\\\tlineEndConvention _ nil.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'accessing' stamp: 'yo 8/18/2003 15:11'!\\\\nconverter\\\\n\\\\n\\\\tconverter ifNil: [converter _ TextConverter defaultSystemConverter].\\\\n\\\\t^ converter\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'accessing' stamp: 'yo 8/28/2002 11:09'!\\\\nconverter: aConverter\\\\n\\\\n\\\\tconverter _ aConverter.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'accessing' stamp: 'yo 8/6/2003 11:56'!\\\\nfileInEncodingName: aString\\\\n\\\\n\\\\tself converter: (TextConverter newForEncoding: aString).\\\\n\\\\tsuper fileIn.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'accessing' stamp: 'nk 9/5/2004 12:57'!\\\\nlineEndConvention\\\\n\\\\n\\\\t^lineEndConvention! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'accessing' stamp: 'yo 2/21/2004 02:59'!\\\\nlineEndConvention: aSymbol\\\\n\\\\n\\\\tlineEndConvention _ aSymbol.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'accessing' stamp: 'yo 2/21/2004 04:24'!\\\\nwantsLineEndConversion: aBoolean\\\\n\\\\n\\\\twantsLineEndConversion _ aBoolean.\\\\n\\\\tself detectLineEndConvention.! !\\\\n\\\\n\\\\n!MultiByteFileStream methodsFor: 'crlf private' stamp: 'yo 2/24/2004 13:38'!\\\\nbareNext\\\\n\\\\n\\\\t ^ self converter nextFromStream: self.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'crlf private' stamp: 'yo 2/21/2004 02:56'!\\\\nconvertStringFromCr: aString \\\\n\\\\t| inStream outStream |\\\\n\\\\tlineEndConvention ifNil: [^ aString].\\\\n\\\\tlineEndConvention == #cr ifTrue: [^ aString].\\\\n\\\\tlineEndConvention == #lf ifTrue: [^ aString copy replaceAll: Cr with: Lf].\\\\n\\\\t\\\\\\\"lineEndConvention == #crlf\\\\\\\"\\\\n\\\\tinStream _ ReadStream on: aString.\\\\n\\\\toutStream _ WriteStream on: (String new: aString size).\\\\n\\\\t[inStream atEnd]\\\\n\\\\t\\\\twhileFalse: \\\\n\\\\t\\\\t\\\\t[outStream nextPutAll: (inStream upTo: Cr).\\\\n\\\\t\\\\t\\\\t(inStream atEnd not or: [aString last = Cr])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [outStream nextPutAll: CrLf]].\\\\n\\\\t^ outStream contents! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'crlf private' stamp: 'yo 2/21/2004 02:56'!\\\\nconvertStringToCr: aString \\\\n\\\\t| inStream outStream |\\\\n\\\\tlineEndConvention ifNil: [^ aString].\\\\n\\\\tlineEndConvention == #cr ifTrue: [^ aString].\\\\n\\\\tlineEndConvention == #lf ifTrue: [^ aString copy replaceAll: Lf with: Cr].\\\\n\\\\t\\\\\\\"lineEndConvention == #crlf\\\\\\\"\\\\n\\\\tinStream _ ReadStream on: aString.\\\\n\\\\toutStream _ WriteStream on: (String new: aString size).\\\\n\\\\t[inStream atEnd]\\\\n\\\\t\\\\twhileFalse: \\\\n\\\\t\\\\t\\\\t[outStream nextPutAll: (inStream upTo: Cr).\\\\n\\\\t\\\\t\\\\t(inStream atEnd not or: [aString last = Cr])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[outStream nextPut: Cr.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tinStream peek = Lf ifTrue: [inStream next]]].\\\\n\\\\t^ outStream contents! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'crlf private' stamp: 'nk 9/5/2004 12:50'!\\\\ndetectLineEndConvention\\\\n\\\\t\\\\\\\"Detect the line end convention used in this stream. The result may be either #cr, #lf or #crlf.\\\\\\\"\\\\n\\\\t| char numRead state |\\\\n\\\\tself isBinary ifTrue: [^ self error: 'Line end conventions are not used on binary streams'].\\\\n\\\\tself wantsLineEndConversion ifFalse: [^ lineEndConvention _ nil.].\\\\n\\\\tself closed ifTrue: [^ lineEndConvention _ LineEndDefault.].\\\\n\\\\n\\\\t\\\\\\\"Default if nothing else found\\\\\\\"\\\\n\\\\tnumRead _ 0.\\\\n\\\\tstate _ converter saveStateOf: self.\\\\n\\\\tlineEndConvention _ nil.\\\\n\\\\t[super atEnd not and: [numRead < LookAheadCount]]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[char _ self next.\\\\n\\\\t\\\\t\\\\tchar = Lf\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[converter restoreStateOf: self with: state.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ lineEndConvention _ #lf].\\\\n\\\\t\\\\t\\\\tchar = Cr\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self peek = Lf\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [lineEndConvention _ #crlf]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [lineEndConvention _ #cr].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tconverter restoreStateOf: self with: state.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ lineEndConvention].\\\\n\\\\t\\\\t\\\\tnumRead _ numRead + 1].\\\\n\\\\tconverter restoreStateOf: self with: state.\\\\n\\\\t^ lineEndConvention _ LineEndDefault.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'crlf private' stamp: 'nk 9/5/2004 12:51'!\\\\ndoConversion\\\\n\\\\n\\\\t^self wantsLineEndConversion and: [ lineEndConvention notNil ]! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'crlf private' stamp: 'yo 2/24/2004 13:44'!\\\\nnext: n innerFor: aString\\\\n\\\\n\\\\t| peekChar state |\\\\n\\\\t\\\\\\\"if we just read a CR, and the next character is an LF, then skip the LF\\\\\\\"\\\\n\\\\taString size = 0 ifTrue: [^ aString].\\\\n\\\\t(aString last = Character cr) ifTrue: [\\\\n\\\\t\\\\tstate _ converter saveStateOf: self.\\\\n\\\\t\\\\tpeekChar _ self bareNext.\\\\t\\\\t\\\\\\\"super peek doesn't work because it relies on #next\\\\\\\"\\\\n\\\\t\\\\t(peekChar notNil and: [peekChar ~= Character lf]) ifTrue: [\\\\n\\\\t\\\\t\\\\tconverter restoreStateOf: self with: state.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n \\\\n\\\\t^ aString withSqueakLineEndings.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'crlf private' stamp: 'yo 2/21/2004 03:51'!\\\\nwantsLineEndConversion\\\\n\\\\n\\\\t^ wantsLineEndConversion ifNil: [false].\\\\n! !\\\\n\\\\n\\\\n!MultiByteFileStream methodsFor: 'fileIn/Out' stamp: 'yo 8/17/2004 10:03'!\\\\nfileIn\\\\n\\\\n\\\\tself setConverterForCode.\\\\n\\\\tsuper fileIn.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'fileIn/Out' stamp: 'ar 7/29/2005 22:33'!\\\\nfileInObjectAndCodeForProject\\\\n\\\\t\\\\\\\"This file may contain:\\\\n1) a fileIn of code  \\\\n2) just an object in SmartReferenceStream format \\\\n3) both code and an object.\\\\n\\\\tFile it in and return the object.  Note that self must be a FileStream or RWBinaryOrTextStream.  Maybe ReadWriteStream incorporate RWBinaryOrTextStream?\\\\\\\"\\\\n\\\\t| refStream object |\\\\n\\\\tself text.\\\\n\\\\tself peek asciiValue = 4\\\\n\\\\t\\\\tifTrue: [  \\\\\\\"pure object file\\\\\\\"\\\\n\\\\t\\\\t\\\\tself binary.\\\\n\\\\t\\\\t\\\\trefStream _ SmartRefStream on: self.\\\\n\\\\t\\\\t\\\\tobject _ refStream nextAndClose]\\\\n\\\\t\\\\tifFalse: [  \\\\\\\"objects mixed with a fileIn\\\\\\\"\\\\n\\\\t\\\\t\\\\tself fileInProject.  \\\\\\\"reads code and objects, then closes the file\\\\\\\"\\\\n\\\\t\\\\t\\\\tself binary.\\\\n\\\\t\\\\t\\\\tobject _ SmartRefStream scannedObject].\\\\t\\\\\\\"set by side effect of one of the chunks\\\\\\\"\\\\n\\\\tSmartRefStream scannedObject: nil.  \\\\\\\"clear scannedObject\\\\\\\"\\\\n\\\\t^ object! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'fileIn/Out' stamp: 'ar 7/29/2005 22:33'!\\\\nfileInProject\\\\n\\\\n\\\\tself setConverterForCodeForProject.\\\\n\\\\tsuper fileIn.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'fileIn/Out' stamp: 'tak 1/12/2005 14:48'!\\\\nfileOutClass: extraClass andObject: theObject \\\\n\\\\tself binary.\\\\n\\\\tUTF8TextConverter writeBOMOn: self.\\\\n\\\\tself text.\\\\n\\\\t^ super fileOutClass: extraClass andObject: theObject! !\\\\n\\\\n\\\\n!MultiByteFileStream methodsFor: 'open/close' stamp: 'md 7/20/2006 11:05'!\\\\nopen: fileName forWrite: writeMode \\\\n\\\\t| result |\\\\n\\\\tresult := super open: fileName forWrite: writeMode.\\\\n\\\\tresult ifNotNil: [\\\\n\\\\t\\\\t\\\\tconverter ifNil: [converter := UTF8TextConverter new].\\\\n\\\\t\\\\t\\\\tself detectLineEndConvention].\\\\n\\\\t^result! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'open/close' stamp: 'yo 8/13/2003 13:51'!\\\\nreset\\\\n\\\\n\\\\tsuper reset.\\\\n\\\\tconverter ifNil: [\\\\n\\\\t\\\\tconverter _ UTF8TextConverter new.\\\\n\\\\t].\\\\n! !\\\\n\\\\n\\\\n!MultiByteFileStream methodsFor: 'public' stamp: 'yo 2/24/2004 13:49'!\\\\nnext\\\\n\\\\n\\\\t| char secondChar state |\\\\n\\\\tchar _ self converter nextFromStream: self.\\\\n\\\\tself doConversion ifTrue: [\\\\n\\\\t\\\\tchar == Cr ifTrue: [\\\\n\\\\t\\\\t\\\\tstate _ converter saveStateOf: self.\\\\n\\\\t\\\\t\\\\tsecondChar _ self bareNext.\\\\n\\\\t\\\\t\\\\tsecondChar ifNotNil: [secondChar == Lf ifFalse: [converter restoreStateOf: self with: state]].\\\\n\\\\t\\\\t^Cr].\\\\n\\\\t\\\\tchar == Lf ifTrue: [^Cr].\\\\n\\\\t].\\\\n\\\\t^ char.\\\\n\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'public' stamp: 'yo 7/31/2004 18:03'!\\\\nnext: anInteger \\\\n\\\\n\\\\t| multiString |\\\\n\\\\tself isBinary ifTrue: [^ super next: anInteger].\\\\n\\\\tmultiString _ String new: anInteger.\\\\n\\\\t1 to: anInteger do: [:index |\\\\n\\\\t\\\\t| character |\\\\n\\\\t\\\\t(character _ self next) ifNotNil: [\\\\n\\\\t\\\\t\\\\tmultiString at: index put: character\\\\n\\\\t\\\\t] ifNil: [\\\\n\\\\t\\\\t\\\\tmultiString _ multiString copyFrom: 1 to: index - 1.\\\\n\\\\t\\\\t\\\\tself doConversion ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t^ multiString\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\t^ self next: anInteger innerFor: multiString.\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\tself doConversion ifFalse: [\\\\n\\\\t\\\\t^ multiString\\\\n\\\\t].\\\\n\\\\n\\\\tmultiString _ self next: anInteger innerFor: multiString.\\\\n\\\\t(multiString size = anInteger or: [self atEnd]) ifTrue: [ ^ multiString].\\\\n\\\\t^ multiString, (self next: anInteger - multiString size).\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'public' stamp: 'yo 2/21/2004 03:26'!\\\\nnextDelimited: terminator\\\\n\\\\n\\\\t| out ch save |\\\\n\\\\tout _ WriteStream on: (String new: 1000).\\\\n\\\\tself atEnd ifTrue: [^ ''].\\\\n\\\\tsave _ converter saveStateOf: self.\\\\n\\\\n\\\\tself next = terminator ifFalse: [\\\\n\\\\t\\\\t\\\\\\\"absorb initial terminator\\\\\\\"\\\\n\\\\t\\\\tconverter restoreStateOf: self with: save.\\\\n\\\\t].\\\\n\\\\t[(ch _ self next) == nil] whileFalse: [\\\\n\\\\t\\\\t(ch = terminator) ifTrue: [\\\\n\\\\t\\\\t\\\\tself peek = terminator ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tself next.  \\\\\\\"skip doubled terminator\\\\\\\"\\\\n\\\\t\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t^ out contents  \\\\\\\"terminator is not doubled; we're done!!\\\\\\\"\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tout nextPut: ch.\\\\n\\\\t].\\\\n\\\\t^ out contents.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'public' stamp: 'yo 8/28/2002 11:13'!\\\\nnextMatchAll: aColl\\\\n\\\\n    | save |\\\\n    save _ converter saveStateOf: self.\\\\n    aColl do: [:each |\\\\n       (self next) = each ifFalse: [\\\\n            converter restoreStateOf: self with: save.\\\\n            ^ false.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n    ^ true.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'public' stamp: 'yo 2/21/2004 03:42'!\\\\nnextPut: aCharacter\\\\n\\\\n\\\\taCharacter isInteger ifTrue: [^ super nextPut: aCharacter].\\\\n\\\\tself doConversion ifTrue: [\\\\n\\\\t\\\\taCharacter = Cr ifTrue: [\\\\n\\\\t\\\\t\\\\t(LineEndStrings at: lineEndConvention) do: [:e | converter nextPut: e toStream: self].\\\\n\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\tconverter nextPut: aCharacter toStream: self\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\t^ aCharacter\\\\n\\\\t].\\\\n\\\\t^ self converter nextPut: aCharacter toStream: self\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'public' stamp: 'yo 5/23/2003 09:40'!\\\\nnextPutAll: aCollection\\\\n\\\\n\\\\t(self isBinary or: [aCollection class == ByteArray]) ifTrue: [\\\\n\\\\t\\\\t^ super nextPutAll: aCollection.\\\\n\\\\t].\\\\n\\\\taCollection do: [:e | self nextPut: e].\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'public' stamp: 'yo 2/21/2004 04:00'!\\\\npeek\\\\n\\\\t\\\\\\\"Answer what would be returned if the message next were sent to the receiver. If the receiver is at the end, answer nil.  \\\\\\\"\\\\n\\\\n\\\\t| next save |\\\\n\\\\tself atEnd ifTrue: [^ nil].\\\\n\\\\tsave _ converter saveStateOf: self.\\\\n\\\\tnext _ self next.\\\\n\\\\tconverter restoreStateOf: self with: save.\\\\n\\\\t^ next.\\\\n\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'public' stamp: 'yo 8/28/2002 11:15'!\\\\npeekFor: item \\\\n\\\\n\\\\t| next state |\\\\n\\\\t\\\\\\\"self atEnd ifTrue: [^ false]. -- SFStream will give nil\\\\\\\"\\\\n\\\\tstate _ converter saveStateOf: self.\\\\n\\\\t(next _ self next) == nil ifTrue: [^ false].\\\\n\\\\titem = next ifTrue: [^ true].\\\\n\\\\tconverter restoreStateOf: self with: state.\\\\n\\\\t^ false.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'public' stamp: 'yo 2/24/2004 13:35'!\\\\nskipSeparators\\\\n\\\\n\\\\t| state |\\\\n\\\\t[self atEnd] whileFalse: [\\\\n\\\\t\\\\tstate _ converter saveStateOf: self.\\\\n\\\\t\\\\tself next isSeparator ifFalse: [\\\\n\\\\t\\\\t\\\\t^ converter restoreStateOf: self with: state]]\\\\n\\\\n\\\\n\\\\\\\"\\\\t[self atEnd] whileFalse: [\\\\n\\\\t\\\\tself next isSeparator ifFalse: [\\\\n\\\\t\\\\t\\\\t^ self position: self position - converter currentCharSize.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\\\\"\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'public' stamp: 'yo 2/21/2004 04:01'!\\\\nskipSeparatorsAndPeekNext\\\\n\\\\n\\\\t\\\\\\\"A special function to make nextChunk fast\\\\\\\"\\\\n\\\\t| peek save |\\\\n\\\\t[self atEnd] whileFalse: [\\\\n\\\\t\\\\tsave _ converter saveStateOf: self.\\\\n\\\\t\\\\t(peek _ self next) isSeparator ifFalse: [\\\\n\\\\t\\\\t\\\\tconverter restoreStateOf: self with: save.\\\\n\\\\t\\\\t\\\\t^ peek.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'public' stamp: 'yo 8/28/2002 11:17'!\\\\nupTo: delim \\\\n\\\\n\\\\t| out ch |\\\\n\\\\tout _ WriteStream on: (String new: 1000).\\\\n\\\\tself atEnd ifTrue: [^ ''].\\\\n\\\\t[(ch _ self next) isNil] whileFalse: [\\\\n\\\\t\\\\t(ch = delim) ifTrue: [\\\\n\\\\t\\\\t\\\\t^ out contents  \\\\\\\"terminator is not doubled; we're done!!\\\\\\\"\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tout nextPut: ch.\\\\n\\\\t].\\\\n\\\\t^ out contents.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'public' stamp: 'yo 8/30/2002 16:39'!\\\\nupToEnd\\\\n\\\\n\\\\t| newStream element |\\\\n\\\\tcollection _ self isBinary\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [ByteArray new: 100]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [String new: 100].\\\\n\\\\tnewStream _ WriteStream on: collection.\\\\n\\\\t[(element _ self next) notNil]\\\\n\\\\t\\\\twhileTrue: [newStream nextPut: element].\\\\n\\\\t^ newStream contents\\\\n! !\\\\n\\\\n\\\\n!MultiByteFileStream methodsFor: 'remnant' stamp: 'yo 8/28/2002 11:06'!\\\\naccepts: aSymbol\\\\n\\\\n \\\\t^ converter accepts: aSymbol.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'remnant' stamp: 'yo 8/28/2002 11:09'!\\\\nfilterFor: aFileStream\\\\n\\\\n\\\\t| rw |\\\\n\\\\tname _ aFileStream name.\\\\n\\\\trw _ aFileStream isReadOnly not.\\\\n\\\\taFileStream close.\\\\n\\\\tself open: name forWrite: rw.\\\\n\\\\t^self.\\\\n! !\\\\n\\\\n\\\\n!MultiByteFileStream methodsFor: 'private' stamp: 'mir 8/25/2004 17:27'!\\\\nsetConverterForCode\\\\n\\\\n\\\\t| current |\\\\n\\\\t(SourceFiles at: 2)\\\\n\\\\t\\\\tifNotNil: [self fullName = (SourceFiles at: 2) fullName ifTrue: [^ self]].\\\\n\\\\tcurrent _ self converter saveStateOf: self.\\\\n\\\\tself position: 0.\\\\n\\\\tself binary.\\\\n\\\\t((self next: 3) = (ByteArray with: 16rEF with: 16rBB with: 16rBF)) ifTrue: [\\\\n\\\\t\\\\tself converter: UTF8TextConverter new\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tself converter: MacRomanTextConverter new.\\\\n\\\\t].\\\\n\\\\tconverter restoreStateOf: self with: current.\\\\n\\\\tself text.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'private' stamp: 'ar 7/29/2005 22:33'!\\\\nsetConverterForCodeForProject\\\\n\\\\n\\\\tself converter: UTF8TextConverter new.\\\\n! !\\\\n\\\\n\\\\n!MultiByteFileStream methodsFor: 'private basic' stamp: 'md 10/17/2004 16:09'!\\\\nbasicNext: anInteger\\\\n\\\\n\\\\t^ super next: anInteger.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'private basic' stamp: 'yo 8/28/2002 11:07'!\\\\nbasicNext: n into: aString\\\\n\\\\n\\\\t^ super next: n into: aString.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'private basic' stamp: 'yo 8/28/2002 11:07'!\\\\nbasicNextInto: aString\\\\n\\\\n\\\\t^ super nextInto: aString.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'private basic' stamp: 'yo 8/28/2002 11:07'!\\\\nbasicNextPut: char\\\\n\\\\n\\\\t^ super nextPut: char.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'private basic' stamp: 'yo 8/28/2002 11:07'!\\\\nbasicNextPutAll: aString\\\\n\\\\n\\\\t^ super nextPutAll: aString.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'private basic' stamp: 'yo 8/28/2002 11:07'!\\\\nbasicPeek\\\\n\\\\n\\\\t^ super peek\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'private basic' stamp: 'yo 8/28/2002 11:08'!\\\\nbasicPosition\\\\n\\\\n\\\\t^ super position.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'private basic' stamp: 'yo 8/28/2002 11:08'!\\\\nbasicPosition: pos\\\\n\\\\n\\\\t^ super position: pos.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'private basic' stamp: 'yo 8/28/2002 11:08'!\\\\nbasicReadInto: byteArray startingAt: startIndex count: count\\\\n\\\\n\\\\t^ super readInto: byteArray startingAt: startIndex count: count.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'private basic' stamp: 'yo 8/28/2002 11:08'!\\\\nbasicSetToEnd\\\\n\\\\n\\\\t^ super setToEnd.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'private basic' stamp: 'yo 8/28/2002 11:08'!\\\\nbasicSkip: n\\\\n\\\\n\\\\t^ super skip: n.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'private basic' stamp: 'yo 8/28/2002 11:08'!\\\\nbasicUpTo: delim\\\\n\\\\n\\\\t^ super upTo: delim.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'private basic' stamp: 'yo 8/28/2002 11:09'!\\\\nbasicVerbatim: aString\\\\n\\\\n\\\\t^ super verbatim: aString.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMultiByteFileStream class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MultiByteFileStream class methodsFor: 'class initialization' stamp: 'yo 2/21/2004 02:45'!\\\\ndefaultToCR\\\\n\\\\n\\\\t\\\\\\\"MultiByteFileStream defaultToCR\\\\\\\"\\\\n\\\\tLineEndDefault := #cr.\\\\n! !\\\\n\\\\n!MultiByteFileStream class methodsFor: 'class initialization' stamp: 'yo 2/21/2004 02:45'!\\\\ndefaultToCRLF\\\\n\\\\n\\\\t\\\\\\\"MultiByteFileStream defaultToCRLF\\\\\\\"\\\\n\\\\tLineEndDefault := #crlf.! !\\\\n\\\\n!MultiByteFileStream class methodsFor: 'class initialization' stamp: 'yo 2/21/2004 02:46'!\\\\ndefaultToLF\\\\n\\\\n\\\\t\\\\\\\"MultiByteFileStream defaultToLF\\\\\\\"\\\\n\\\\tLineEndDefault := #lf.\\\\n! !\\\\n\\\\n!MultiByteFileStream class methodsFor: 'class initialization' stamp: 'yo 2/21/2004 02:44'!\\\\nguessDefaultLineEndConvention\\\\n\\\\n\\\\t\\\\\\\"Lets try to guess the line end convention from what we know about the path name delimiter from FileDirectory.\\\\\\\"\\\\n\\\\tFileDirectory pathNameDelimiter = $: ifTrue:[^self defaultToCR].\\\\n\\\\tFileDirectory pathNameDelimiter = $/ ifTrue:[^self defaultToLF].\\\\n\\\\tFileDirectory pathNameDelimiter = $\\\\\\\\ ifTrue:[^self defaultToCRLF].\\\\n\\\\t\\\\\\\"in case we don't know\\\\\\\"\\\\n\\\\t^self defaultToCR.\\\\n! !\\\\n\\\\n!MultiByteFileStream class methodsFor: 'class initialization' stamp: 'yo 2/21/2004 02:44'!\\\\ninitialize\\\\n\\\\n\\\\t\\\\\\\"MultiByteFileStream initialize\\\\\\\"\\\\n\\\\tCr := Character cr.\\\\n\\\\tLf := Character lf.\\\\n\\\\tCrLf := String with: Cr with: Lf.\\\\n\\\\tLineEndStrings := Dictionary new.\\\\n\\\\tLineEndStrings at: #cr put: (String with: Character cr).\\\\n\\\\tLineEndStrings at: #lf put: (String with: Character lf).\\\\n\\\\tLineEndStrings at: #crlf put: (String with: Character cr with: Character lf).\\\\n\\\\tLookAheadCount := 2048.\\\\n\\\\tSmalltalk addToStartUpList: self.\\\\n\\\\tself startUp.\\\\n! !\\\\n\\\\n!MultiByteFileStream class methodsFor: 'class initialization' stamp: 'yo 2/21/2004 02:44'!\\\\nstartUp\\\\n\\\\n\\\\tself guessDefaultLineEndConvention.\\\\n! !\\\\n\\\\n\\\\n!MultiByteFileStream class methodsFor: 'instance creation' stamp: 'yo 8/28/2002 11:43'!\\\\nnewFrom: aFileStream\\\\n\\\\n\\\\t| rw n |\\\\n\\\\tn _ aFileStream name.\\\\n\\\\trw _ aFileStream isReadOnly not.\\\\n\\\\taFileStream close.\\\\n\\\\t^self new open: n forWrite: rw.\\\\n! !\\\\nPluggableCanvas subclass: #MultiCanvas\\\\n\\\\tinstanceVariableNames: 'canvases extent depth'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Support'!\\\\n!MultiCanvas commentStamp: '<historical>' prior: 0!\\\\nA canvas which forwards drawing commands to sub-canvases.!\\\\n\\\\n\\\\n!MultiCanvas methodsFor: 'accessing' stamp: 'ls 3/20/2000 20:48'!\\\\naddCanvas: aCanvas\\\\n\\\\tcanvases add: aCanvas! !\\\\n\\\\n!MultiCanvas methodsFor: 'accessing' stamp: 'RAA 11/7/2000 17:46'!\\\\nclipRect\\\\n\\\\t\\\\n\\\\t^super clipRect ifNil: [\\\\n\\\\t\\\\t0@0 extent: 5000@5000\\\\n\\\\t].! !\\\\n\\\\n!MultiCanvas methodsFor: 'accessing' stamp: 'RAA 8/14/2000 10:27'!\\\\ncontentsOfArea: aRectangle into: aForm\\\\n\\\\n\\\\tself apply: [ :c |\\\\n\\\\t\\\\t(c isKindOf: FormCanvas) ifTrue: [\\\\n\\\\t\\\\t\\\\tc contentsOfArea: aRectangle into: aForm.\\\\n\\\\t\\\\t\\\\t^aForm\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\tself apply: [ :c |\\\\n\\\\t\\\\tc contentsOfArea: aRectangle into: aForm.\\\\n\\\\t\\\\t^aForm.\\\\n\\\\t].\\\\n\\\\t^aForm! !\\\\n\\\\n!MultiCanvas methodsFor: 'accessing' stamp: 'ls 4/8/2000 22:35'!\\\\ndepth\\\\n\\\\t^depth! !\\\\n\\\\n!MultiCanvas methodsFor: 'accessing' stamp: 'ls 4/8/2000 22:35'!\\\\nextent\\\\n\\\\t^extent! !\\\\n\\\\n!MultiCanvas methodsFor: 'accessing' stamp: 'ls 3/20/2000 20:48'!\\\\nremoveCanvas: aCanvas\\\\n\\\\tcanvases remove: aCanvas ifAbsent: []! !\\\\n\\\\n\\\\n!MultiCanvas methodsFor: 'initialization' stamp: 'RAA 8/1/2000 13:50'!\\\\nallocateForm: extentPoint\\\\n\\\\t\\\\\\\"Allocate a new form which is similar to the receiver and can be used for accelerated blts\\\\\\\"\\\\n\\\\t^Form extent: extentPoint depth: self depth! !\\\\n\\\\n!MultiCanvas methodsFor: 'initialization' stamp: 'ls 4/8/2000 22:35'!\\\\ndepth: newDepth\\\\n\\\\t\\\\\\\"set the extent to be used with this canvas\\\\\\\"\\\\n\\\\tdepth := newDepth.! !\\\\n\\\\n!MultiCanvas methodsFor: 'initialization' stamp: 'ls 4/8/2000 22:34'!\\\\nextent: newExtent\\\\n\\\\t\\\\\\\"set the extent to be used with this canvas\\\\\\\"\\\\n\\\\textent := newExtent.! !\\\\n\\\\n!MultiCanvas methodsFor: 'initialization' stamp: 'ls 4/8/2000 22:34'!\\\\ninitialize\\\\n\\\\tcanvases := Set new.\\\\n\\\\textent := 600@400.\\\\n\\\\tdepth := 32. ! !\\\\n\\\\n\\\\n!MultiCanvas methodsFor: 'private' stamp: 'RAA 11/6/2000 14:17'!\\\\napply: aCommand\\\\n\\\\n\\\\tself flag: #roundedRudeness.\\\\t\\\\n\\\\t\\\\\\\"This rudeness is to help get rounded corners to work right on RemoteCanvases. Since the RemoteCanvas has no other way to read its bits, we are grabbing them from Display for now. To support this, we need to see that the Display is written before any RemoteCanvases\\\\\\\"\\\\n\\\\n\\\\tcanvases do: [ :canvas | \\\\n\\\\t\\\\t(canvas isKindOf: FormCanvas) ifTrue: [aCommand value: canvas]\\\\n\\\\t].\\\\n\\\\tcanvases do: [ :canvas | \\\\n\\\\t\\\\t(canvas isKindOf: FormCanvas) ifFalse: [aCommand value: canvas]\\\\n\\\\t].\\\\n! !\\\\nMultiCharacterScanner subclass: #MultiCanvasCharacterScanner\\\\n\\\\tinstanceVariableNames: 'canvas fillBlt foregroundColor runX lineY'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Multilingual-Scanning'!\\\\n\\\\n!MultiCanvasCharacterScanner methodsFor: 'accessing' stamp: 'yo 12/18/2002 13:55'!\\\\ncanvas: aCanvas\\\\n\\\\t\\\\\\\"set the canvas to draw on\\\\\\\"\\\\n\\\\tcanvas ifNotNil: [ self inform: 'initializing twice!!' ].\\\\n\\\\tcanvas _ aCanvas! !\\\\n\\\\n\\\\n!MultiCanvasCharacterScanner methodsFor: 'scanning' stamp: 'yo 12/18/2002 13:55'!\\\\ndisplayLine: textLine  offset: offset  leftInRun: leftInRun\\\\n\\\\t|  nowLeftInRun done startLoc startIndex stopCondition |\\\\n\\\\t\\\\\\\"largely copied from DisplayScanner's routine\\\\\\\"\\\\n\\\\n\\\\tline _ textLine.\\\\n\\\\tforegroundColor ifNil: [ foregroundColor _ Color black ].\\\\n\\\\tleftMargin _ (line leftMarginForAlignment: alignment) + offset x.\\\\n\\\\n\\\\trightMargin _ line rightMargin + offset x.\\\\n\\\\tlineY _ line top + offset y.\\\\n\\\\tlastIndex _ textLine first.\\\\n\\\\tleftInRun <= 0\\\\n\\\\t\\\\tifTrue: [self setStopConditions.  \\\\\\\"also sets the font\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tnowLeftInRun _ text runLengthFor: lastIndex]\\\\n\\\\t\\\\tifFalse: [nowLeftInRun _ leftInRun].\\\\n\\\\trunX _ destX _ leftMargin.\\\\n\\\\n\\\\trunStopIndex _ lastIndex + (nowLeftInRun - 1) min: line last.\\\\n\\\\tspaceCount _ 0.\\\\n\\\\tdone _ false.\\\\n\\\\n\\\\t[done] whileFalse: [\\\\n\\\\t\\\\t\\\\\\\"remember where this portion of the line starts\\\\\\\"\\\\n\\\\t\\\\tstartLoc _ destX@destY.\\\\n\\\\t\\\\tstartIndex _ lastIndex.\\\\n\\\\n\\\\t\\\\t\\\\\\\"find the end of this portion of the line\\\\\\\"\\\\n\\\\t\\\\tstopCondition _ self scanCharactersFrom: lastIndex to: runStopIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tin: text string rightX: rightMargin stopConditions: stopConditions\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tkern: kern \\\\\\\"displaying: false\\\\\\\".\\\\n\\\\n\\\\t\\\\t\\\\\\\"display that portion of the line\\\\\\\"\\\\n\\\\t\\\\tcanvas drawString: text string\\\\n\\\\t\\\\t\\\\tfrom: startIndex to: lastIndex\\\\n\\\\t\\\\t\\\\tat: startLoc\\\\n\\\\t\\\\t\\\\tfont: font\\\\n\\\\t\\\\t\\\\tcolor: foregroundColor.\\\\n\\\\n\\\\t\\\\t\\\\\\\"handle the stop condition\\\\\\\"\\\\n\\\\t\\\\tdone _ self perform: stopCondition\\\\n\\\\t].\\\\n\\\\n\\\\t^runStopIndex - lastIndex! !\\\\n\\\\n\\\\n!MultiCanvasCharacterScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:55'!\\\\ncr\\\\n\\\\t\\\\\\\"When a carriage return is encountered, simply increment the pointer \\\\n\\\\tinto the paragraph.\\\\\\\"\\\\n\\\\n\\\\tlastIndex_ lastIndex + 1.\\\\n\\\\t^false! !\\\\n\\\\n!MultiCanvasCharacterScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:55'!\\\\ncrossedX\\\\n\\\\t\\\\\\\"This condition will sometimes be reached 'legally' during display, when, \\\\n\\\\tfor instance the space that caused the line to wrap actually extends over \\\\n\\\\tthe right boundary. This character is allowed to display, even though it \\\\n\\\\tis technically outside or straddling the clipping ectangle since it is in \\\\n\\\\tthe normal case not visible and is in any case appropriately clipped by \\\\n\\\\tthe scanner.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"self fillLeading.\\\\\\\"\\\\n\\\\t^ true ! !\\\\n\\\\n!MultiCanvasCharacterScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:55'!\\\\nendOfRun\\\\n\\\\t\\\\\\\"The end of a run in the display case either means that there is actually \\\\n\\\\ta change in the style (run code) to be associated with the string or the \\\\n\\\\tend of this line has been reached.\\\\\\\"\\\\n\\\\t| runLength |\\\\n\\\\n\\\\tlastIndex = line last ifTrue: [^true].\\\\n\\\\trunX _ destX.\\\\n\\\\trunLength _ text runLengthFor: (lastIndex _ lastIndex + 1).\\\\n\\\\trunStopIndex _ lastIndex + (runLength - 1) min: line last.\\\\n\\\\tself setStopConditions.\\\\n\\\\t^ false! !\\\\n\\\\n!MultiCanvasCharacterScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:55'!\\\\npaddedSpace\\\\n\\\\t\\\\\\\"Each space is a stop condition when the alignment is right justified. \\\\n\\\\tPadding must be added to the base width of the space according to \\\\n\\\\twhich space in the line this space is and according to the amount of \\\\n\\\\tspace that remained at the end of the line when it was composed.\\\\\\\"\\\\n\\\\n\\\\tdestX _ destX + spaceWidth + (line justifiedPadFor: spaceCount).\\\\n\\\\n\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\t^ false! !\\\\n\\\\n!MultiCanvasCharacterScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:55'!\\\\nsetStopConditions\\\\n\\\\t\\\\\\\"Set the font and the stop conditions for the current run.\\\\\\\"\\\\n\\\\t\\\\n\\\\tself setFont.\\\\n\\\\tself setConditionArray: (textStyle alignment = Justified ifTrue: [#paddedSpace]).\\\\n! !\\\\n\\\\n!MultiCanvasCharacterScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:55'!\\\\ntab\\\\n\\\\n\\\\tdestX _ (alignment == Justified and: [self leadingTab not])\\\\n\\\\t\\\\tifTrue:\\\\t\\\\t\\\\\\\"imbedded tabs in justified text are weird\\\\\\\"\\\\n\\\\t\\\\t\\\\t[destX + (textStyle tabWidth - (line justifiedTabDeltaFor: spaceCount)) max: destX]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[textStyle nextTabXFrom: destX\\\\n\\\\t\\\\t\\\\t\\\\tleftMargin: leftMargin\\\\n\\\\t\\\\t\\\\t\\\\trightMargin: rightMargin].\\\\n\\\\n\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!MultiCanvasCharacterScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:55'!\\\\ndoesDisplaying\\\\n\\\\t^false   \\\\\\\"it doesn't do displaying using copyBits\\\\\\\"! !\\\\n\\\\n!MultiCanvasCharacterScanner methodsFor: 'private' stamp: 'yo 1/6/2005 23:00'!\\\\nsetFont\\\\n\\\\tforegroundColor ifNil: [foregroundColor _ Color black].\\\\n\\\\tsuper setFont.\\\\n\\\\tbaselineY _ lineY + line baseline.\\\\n\\\\tdestY _ baselineY - font ascent.! !\\\\n\\\\n!MultiCanvasCharacterScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:55'!\\\\ntextColor: color\\\\n\\\\tforegroundColor _ color! !\\\\nMultiCharacterScanner subclass: #MultiCharacterBlockScanner\\\\n\\\\tinstanceVariableNames: 'characterPoint characterIndex lastCharacter lastCharacterExtent lastSpaceOrTabExtent nextLeftMargin specialWidth'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Multilingual-Scanning'!\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'scanning' stamp: 'yo 12/18/2002 13:56'!\\\\ncharacterBlockAtPoint: aPoint in: aParagraph\\\\n\\\\t\\\\\\\"Answer a CharacterBlock for character in aParagraph at point aPoint. It \\\\n\\\\tis assumed that aPoint has been transformed into coordinates appropriate \\\\n\\\\tto the text's destination form rectangle and the composition rectangle.\\\\\\\"\\\\n\\\\n\\\\tself initializeFromParagraph: aParagraph clippedBy: aParagraph clippingRectangle.\\\\n\\\\tcharacterPoint _ aPoint.\\\\n\\\\t^self buildCharacterBlockIn: aParagraph! !\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'scanning' stamp: 'nk 11/22/2004 14:36'!\\\\ncharacterBlockAtPoint: aPoint index: index in: textLine\\\\n\\\\t\\\\\\\"This method is the Morphic characterBlock finder.  It combines\\\\n\\\\tMVC's characterBlockAtPoint:, -ForIndex:, and buildCharcterBlock:in:\\\\\\\"\\\\n\\\\t| runLength lineStop done stopCondition |\\\\n\\\\tline := textLine.\\\\n\\\\trightMargin := line rightMargin.\\\\n\\\\tlastIndex := line first.\\\\n\\\\tself setStopConditions.\\\\t\\\\t\\\\\\\"also sets font\\\\\\\"\\\\n\\\\tcharacterIndex := index.  \\\\\\\" == nil means scanning for point\\\\\\\"\\\\n\\\\tcharacterPoint := aPoint.\\\\n\\\\t(characterPoint isNil or: [characterPoint y > line bottom])\\\\n\\\\t\\\\tifTrue: [characterPoint := line bottomRight].\\\\n\\\\t(text isEmpty or: [(characterPoint y < line top or: [characterPoint x < line left])\\\\n\\\\t\\\\t\\\\t\\\\tor: [characterIndex notNil and: [characterIndex < line first]]])\\\\n\\\\t\\\\tifTrue:\\\\t[^ (CharacterBlock new stringIndex: line first text: text\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttopLeft: line leftMargin@line top extent: 0 @ textStyle lineGrid)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttextLine: line].\\\\n\\\\tdestX := leftMargin := line leftMarginForAlignment: alignment.\\\\n\\\\tdestY := line top.\\\\n\\\\trunLength := text runLengthFor: line first.\\\\n\\\\tcharacterIndex\\\\n\\\\t\\\\tifNotNil:\\\\t[lineStop := characterIndex  \\\\\\\"scanning for index\\\\\\\"]\\\\n\\\\t\\\\tifNil:\\\\t[lineStop := line last  \\\\\\\"scanning for point\\\\\\\"].\\\\n\\\\trunStopIndex := lastIndex + (runLength - 1) min: lineStop.\\\\n\\\\tlastCharacterExtent := 0 @ line lineHeight.\\\\n\\\\tspaceCount := 0.\\\\n\\\\n\\\\tdone  := false.\\\\n\\\\t[done] whileFalse:\\\\n\\\\t\\\\t[stopCondition := self scanCharactersFrom: lastIndex to: runStopIndex\\\\n\\\\t\\\\t\\\\tin: text string rightX: characterPoint x\\\\n\\\\t\\\\t\\\\tstopConditions: stopConditions kern: kern.\\\\n\\\\t\\\\t\\\\\\\"see setStopConditions for stopping conditions for character block \\\\toperations.\\\\\\\"\\\\n\\\\t\\\\tself lastCharacterExtentSetX: (specialWidth\\\\n\\\\t\\\\t\\\\tifNil: [font widthOf: (text at: lastIndex)]\\\\n\\\\t\\\\t\\\\tifNotNil: [specialWidth]).\\\\n\\\\t\\\\t(self perform: stopCondition) ifTrue:\\\\n\\\\t\\\\t\\\\t[characterIndex\\\\n\\\\t\\\\t\\\\t\\\\tifNil: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Result for characterBlockAtPoint: \\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(stopCondition ~~ #cr and: [ lastIndex == line last\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tand: [ aPoint x > ((characterPoint x) + (lastCharacterExtent x / 2)) ]])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [ \\\\\\\"Correct for right half of last character in line\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^ (CharacterBlock new stringIndex: lastIndex + 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttext: text\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttopLeft: characterPoint + (lastCharacterExtent x @ 0) + (font descentKern @ 0)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\textent:  0 @ lastCharacterExtent y)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttextLine: line ].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^ (CharacterBlock new stringIndex: lastIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttext: text topLeft: characterPoint + (font descentKern @ 0)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\textent: lastCharacterExtent - (font baseKern @ 0))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttextLine: line]\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil: [\\\\\\\"Result for characterBlockForIndex: \\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^ (CharacterBlock new stringIndex: characterIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttext: text topLeft: characterPoint + ((font descentKern) - kern @ 0)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\textent: lastCharacterExtent)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttextLine: line]]]! !\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'scanning' stamp: 'yo 12/18/2002 13:56'!\\\\ncharacterBlockForIndex: targetIndex in: aParagraph \\\\n\\\\t\\\\\\\"Answer a CharacterBlock for character in aParagraph at targetIndex. The \\\\n\\\\tcoordinates in the CharacterBlock will be appropriate to the intersection \\\\n\\\\tof the destination form rectangle and the composition rectangle.\\\\\\\"\\\\n\\\\n\\\\tself \\\\n\\\\t\\\\tinitializeFromParagraph: aParagraph \\\\n\\\\t\\\\tclippedBy: aParagraph clippingRectangle.\\\\n\\\\tcharacterIndex _ targetIndex.\\\\n\\\\tcharacterPoint _ \\\\n\\\\t\\\\taParagraph rightMarginForDisplay @ \\\\n\\\\t\\\\t\\\\t(aParagraph topAtLineIndex: \\\\n\\\\t\\\\t\\\\t\\\\t(aParagraph lineIndexOfCharacterIndex: characterIndex)).\\\\n\\\\t^self buildCharacterBlockIn: aParagraph! !\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'scanning' stamp: 'yo 12/18/2002 13:56'!\\\\nindentationLevel: anInteger\\\\n\\\\tsuper indentationLevel: anInteger.\\\\n\\\\tnextLeftMargin _ leftMargin.\\\\n\\\\tindentationLevel timesRepeat: [\\\\n\\\\t\\\\tnextLeftMargin _ textStyle nextTabXFrom: nextLeftMargin\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tleftMargin: leftMargin\\\\n\\\\t\\\\t\\\\t\\\\t\\\\trightMargin: rightMargin]! !\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'scanning' stamp: 'yo 12/18/2002 13:56'!\\\\nplaceEmbeddedObject: anchoredMorph\\\\n\\\\t\\\\\\\"Workaround: The following should really use #textAnchorType\\\\\\\"\\\\n\\\\tanchoredMorph relativeTextAnchorPosition ifNotNil:[^true].\\\\n\\\\t(super placeEmbeddedObject: anchoredMorph) ifFalse: [^ false].\\\\n\\\\tspecialWidth _ anchoredMorph width.\\\\n\\\\t^ true! !\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'scanning' stamp: 'yo 8/6/2003 05:55'!\\\\nscanMultiCharactersCombiningFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: kernDelta\\\\n\\\\n\\\\t| encoding f nextDestX maxAscii startEncoding char charValue |\\\\n\\\\tlastIndex _ startIndex.\\\\n\\\\tlastIndex > stopIndex ifTrue: [lastIndex _ stopIndex. ^ stops at: EndOfRun].\\\\n\\\\tstartEncoding _ (sourceString at: startIndex) leadingChar.\\\\n\\\\tfont ifNil: [font _ (TextConstants at: #DefaultMultiStyle) fontArray at: 1].\\\\n\\\\t((font isMemberOf: StrikeFontSet) or: [font isKindOf: TTCFontSet]) ifTrue: [\\\\n\\\\t\\\\t[f _ font fontArray at: startEncoding + 1]\\\\n\\\\t\\\\t\\\\ton: Exception do: [:ex | f _ font fontArray at: 1].\\\\n\\\\t\\\\tf ifNil: [ f _ font fontArray at: 1].\\\\n\\\\t\\\\tmaxAscii _ f maxAscii.\\\\n\\\\t\\\\tspaceWidth _ f widthOf: Space.\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tmaxAscii _ font maxAscii.\\\\n\\\\t].\\\\n\\\\n\\\\t[lastIndex <= stopIndex] whileTrue: [\\\\n\\\\t\\\\tencoding _ (sourceString at: lastIndex) leadingChar.\\\\n\\\\t\\\\tencoding ~= startEncoding ifTrue: [lastIndex _ lastIndex - 1. ^ stops at: EndOfRun].\\\\n\\\\t\\\\tchar _ (sourceString at: lastIndex).\\\\n\\\\t\\\\tcharValue _ char charCode.\\\\n\\\\t\\\\tcharValue > maxAscii ifTrue: [charValue _ maxAscii].\\\\n\\\\t\\\\t(encoding = 0 and: [(stopConditions at: charValue + 1) ~~ nil]) ifTrue: [\\\\n\\\\t\\\\t\\\\t^ stops at: charValue + 1\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tnextDestX _ destX + (self widthOf: char inFont: font).\\\\n\\\\t\\\\tnextDestX > rightX ifTrue: [^ stops at: CrossedX].\\\\n\\\\t\\\\tdestX _ nextDestX + kernDelta.\\\\n\\\\t\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\t].\\\\n\\\\tlastIndex _ stopIndex.\\\\n\\\\t^ stops at: EndOfRun! !\\\\n\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'stop conditions' stamp: 'yo 1/6/2005 22:55'!\\\\ncr \\\\n\\\\t\\\\\\\"Answer a CharacterBlock that specifies the current location of the mouse \\\\n\\\\trelative to a carriage return stop condition that has just been \\\\n\\\\tencountered. The ParagraphEditor convention is to denote selections by \\\\n\\\\tCharacterBlocks, sometimes including the carriage return (cursor is at \\\\n\\\\tthe end) and sometimes not (cursor is in the middle of the text).\\\\\\\"\\\\n\\\\n\\\\t((characterIndex ~= nil\\\\n\\\\t\\\\tand: [characterIndex > text size])\\\\n\\\\t\\\\t\\\\tor: [(line last = text size)\\\\n\\\\t\\\\t\\\\t\\\\tand: [(destY + line lineHeight) < characterPoint y]])\\\\n\\\\t\\\\tifTrue:\\\\t[\\\\\\\"When off end of string, give data for next character\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tdestY _ destY +  line lineHeight.\\\\n\\\\t\\\\t\\\\t\\\\tbaselineY _ line lineHeight.\\\\n\\\\t\\\\t\\\\t\\\\tlastCharacter _ nil.\\\\n\\\\t\\\\t\\\\t\\\\tcharacterPoint _ (nextLeftMargin ifNil: [leftMargin]) @ destY.\\\\n\\\\t\\\\t\\\\t\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\t\\\\t\\\\t\\\\tself lastCharacterExtentSetX: 0.\\\\n\\\\t\\\\t\\\\t\\\\t^ true].\\\\n\\\\t\\\\tlastCharacter _ CR.\\\\n\\\\t\\\\tcharacterPoint _ destX @ destY.\\\\n\\\\t\\\\tself lastCharacterExtentSetX: rightMargin - destX.\\\\n\\\\t\\\\t^true! !\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:56'!\\\\ncrossedX\\\\n\\\\t\\\\\\\"Text display has wrapping. The scanner just found a character past the x \\\\n\\\\tlocation of the cursor. We know that the cursor is pointing at a character \\\\n\\\\tor before one.\\\\\\\"\\\\n\\\\n\\\\t| leadingTab currentX |\\\\n\\\\tcharacterIndex == nil ifFalse: [\\\\n\\\\t\\\\t\\\\\\\"If the last character of the last line is a space,\\\\n\\\\t\\\\tand it crosses the right margin, then locating\\\\n\\\\t\\\\tthe character block after it is impossible without this hack.\\\\\\\"\\\\n\\\\t\\\\tcharacterIndex > text size ifTrue: [\\\\n\\\\t\\\\t\\\\tlastIndex _ characterIndex.\\\\n\\\\t\\\\t\\\\tcharacterPoint _ (nextLeftMargin ifNil: [leftMargin]) @ (destY + line lineHeight).\\\\n\\\\t\\\\t\\\\t^true]].\\\\n\\\\tcharacterPoint x <= (destX + (lastCharacterExtent x // 2))\\\\n\\\\t\\\\tifTrue:\\\\t[lastCharacter _ (text at: lastIndex).\\\\n\\\\t\\\\t\\\\t\\\\tcharacterPoint _ destX @ destY.\\\\n\\\\t\\\\t\\\\t\\\\t^true].\\\\n\\\\tlastIndex >= line last \\\\n\\\\t\\\\tifTrue:\\\\t[lastCharacter _ (text at: line last).\\\\n\\\\t\\\\t\\\\t\\\\tcharacterPoint _ destX @ destY.\\\\n\\\\t\\\\t\\\\t\\\\t^true].\\\\n\\\\n\\\\t\\\\\\\"Pointing past middle of a character, return the next character.\\\\\\\"\\\\n\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\tlastCharacter _ text at: lastIndex.\\\\n\\\\tcurrentX _ destX + lastCharacterExtent x + kern.\\\\n\\\\tself lastCharacterExtentSetX: (font widthOf: lastCharacter).\\\\n\\\\tcharacterPoint _ currentX @ destY.\\\\n\\\\tlastCharacter = Space ifFalse: [^ true].\\\\n\\\\n\\\\t\\\\\\\"Yukky if next character is space or tab.\\\\\\\"\\\\n\\\\talignment = Justified ifTrue:\\\\n\\\\t\\\\t[self lastCharacterExtentSetX:\\\\n\\\\t\\\\t\\\\t(lastCharacterExtent x + \\\\t(line justifiedPadFor: (spaceCount + 1))).\\\\n\\\\t\\\\t^ true].\\\\n\\\\n\\\\ttrue ifTrue: [^ true].\\\\n\\\\t\\\\\\\"NOTE:  I find no value to the following code, and so have defeated it - DI\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"See tabForDisplay for illumination on the following awfulness.\\\\\\\"\\\\n\\\\tleadingTab _ true.\\\\n\\\\tline first to: lastIndex - 1 do:\\\\n\\\\t\\\\t[:index | (text at: index) ~= Tab ifTrue: [leadingTab _ false]].\\\\n\\\\t(alignment ~= Justified or: [leadingTab])\\\\n\\\\t\\\\tifTrue:\\\\t[self lastCharacterExtentSetX: (textStyle nextTabXFrom: currentX\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tleftMargin: leftMargin rightMargin: rightMargin) -\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcurrentX]\\\\n\\\\t\\\\tifFalse:\\\\t[self lastCharacterExtentSetX:  (((currentX + (textStyle tabWidth -\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(line justifiedTabDeltaFor: spaceCount))) -\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcurrentX) max: 0)].\\\\n\\\\t^ true! !\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:56'!\\\\nendOfRun\\\\n\\\\t\\\\\\\"Before arriving at the cursor location, the selection has encountered an \\\\n\\\\tend of run. Answer false if the selection continues, true otherwise. Set \\\\n\\\\tup indexes for building the appropriate CharacterBlock.\\\\\\\"\\\\n\\\\n\\\\t| runLength lineStop |\\\\n\\\\t(((characterIndex ~~ nil and:\\\\n\\\\t\\\\t[runStopIndex < characterIndex and: [runStopIndex < text size]])\\\\n\\\\t\\\\t\\\\tor:\\\\t[characterIndex == nil and: [lastIndex < line last]]) or: [\\\\n\\\\t\\\\t\\\\t\\\\t((lastIndex < line last)\\\\n\\\\t\\\\t\\\\t\\\\tand: [((text at: lastIndex) leadingChar ~= (text at: lastIndex+1) leadingChar)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [lastIndex ~= characterIndex]])])\\\\n\\\\t\\\\tifTrue:\\\\t[\\\\\\\"We're really at the end of a real run.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\trunLength _ (text runLengthFor: (lastIndex _ lastIndex + 1)).\\\\n\\\\t\\\\t\\\\t\\\\tcharacterIndex ~~ nil\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue:\\\\t[lineStop _ characterIndex\\\\t\\\\\\\"scanning for index\\\\\\\"]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse:\\\\t[lineStop _ line last\\\\t\\\\t\\\\t\\\\\\\"scanning for point\\\\\\\"].\\\\n\\\\t\\\\t\\\\t\\\\t(runStopIndex _ lastIndex + (runLength - 1)) > lineStop\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\t[runStopIndex _ lineStop].\\\\n\\\\t\\\\t\\\\t\\\\tself setStopConditions.\\\\n\\\\t\\\\t\\\\t\\\\t^false].\\\\n\\\\n\\\\tlastCharacter _ text at: lastIndex.\\\\n\\\\tcharacterPoint _ destX @ destY.\\\\n\\\\t((lastCharacter = Space and: [alignment = Justified])\\\\n\\\\t\\\\tor: [lastCharacter = Tab and: [lastSpaceOrTabExtent notNil]])\\\\n\\\\t\\\\tifTrue: [lastCharacterExtent _ lastSpaceOrTabExtent].\\\\n\\\\tcharacterIndex ~~ nil\\\\n\\\\t\\\\tifTrue:\\\\t[\\\\\\\"If scanning for an index and we've stopped on that index,\\\\n\\\\t\\\\t\\\\t\\\\tthen we back destX off by the width of the character stopped on\\\\n\\\\t\\\\t\\\\t\\\\t(it will be pointing at the right side of the character) and return\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\trunStopIndex = characterIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue:\\\\t[self characterPointSetX: destX - lastCharacterExtent x.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^true].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"Otherwise the requested index was greater than the length of the\\\\n\\\\t\\\\t\\\\t\\\\tstring.  Return string size + 1 as index, indicate further that off the\\\\n\\\\t\\\\t\\\\t\\\\tstring by setting character to nil and the extent to 0.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tlastIndex _  lastIndex + 1.\\\\n\\\\t\\\\t\\\\t\\\\tlastCharacter _ nil.\\\\n\\\\t\\\\t\\\\t\\\\tself lastCharacterExtentSetX: 0.\\\\n\\\\t\\\\t\\\\t\\\\t^true].\\\\n\\\\n\\\\t\\\\\\\"Scanning for a point and either off the end of the line or off the end of the string.\\\\\\\"\\\\n\\\\trunStopIndex = text size\\\\n\\\\t\\\\tifTrue:\\\\t[\\\\\\\"off end of string\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tlastIndex _  lastIndex + 1.\\\\n\\\\t\\\\t\\\\t\\\\tlastCharacter _ nil.\\\\n\\\\t\\\\t\\\\t\\\\tself lastCharacterExtentSetX: 0.\\\\n\\\\t\\\\t\\\\t\\\\t^true].\\\\n\\\\t\\\\\\\"just off end of line without crossing x\\\\\\\"\\\\n\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\t^true! !\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:56'!\\\\npaddedSpace\\\\n\\\\t\\\\\\\"When the line is justified, the spaces will not be the same as the font's \\\\n\\\\tspace character. A padding of extra space must be considered in trying \\\\n\\\\tto find which character the cursor is pointing at. Answer whether the \\\\n\\\\tscanning has crossed the cursor.\\\\\\\"\\\\n\\\\n\\\\t| pad |\\\\n\\\\tpad _ 0.\\\\n\\\\tspaceCount _ spaceCount + 1.\\\\n\\\\tpad _ line justifiedPadFor: spaceCount.\\\\n\\\\tlastSpaceOrTabExtent _ lastCharacterExtent copy.\\\\n\\\\tself lastSpaceOrTabExtentSetX:  spaceWidth + pad.\\\\n\\\\t(destX + lastSpaceOrTabExtent x)  >= characterPoint x\\\\n\\\\t\\\\tifTrue: [lastCharacterExtent _ lastSpaceOrTabExtent copy.\\\\n\\\\t\\\\t\\\\t\\\\t^self crossedX].\\\\n\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\tdestX _ destX + lastSpaceOrTabExtent x.\\\\n\\\\t^ false\\\\n! !\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:56'!\\\\nsetFont\\\\n\\\\tspecialWidth _ nil.\\\\n\\\\tsuper setFont! !\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'stop conditions' stamp: 'ar 10/18/2004 14:31'!\\\\nsetStopConditions\\\\n\\\\t\\\\\\\"Set the font and the stop conditions for the current run.\\\\\\\"\\\\n\\\\t\\\\n\\\\tself setFont.\\\\n\\\\tself setConditionArray: (alignment = Justified ifTrue: [#paddedSpace]).\\\\n! !\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:56'!\\\\ntab\\\\n\\\\t| currentX |\\\\n\\\\tcurrentX _ (alignment == Justified and: [self leadingTab not])\\\\n\\\\t\\\\tifTrue:\\\\t\\\\t\\\\\\\"imbedded tabs in justified text are weird\\\\\\\"\\\\n\\\\t\\\\t\\\\t[destX + (textStyle tabWidth - (line justifiedTabDeltaFor: spaceCount)) max: destX]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[textStyle\\\\n\\\\t\\\\t\\\\t\\\\tnextTabXFrom: destX\\\\n\\\\t\\\\t\\\\t\\\\tleftMargin: leftMargin\\\\n\\\\t\\\\t\\\\t\\\\trightMargin: rightMargin].\\\\n\\\\tlastSpaceOrTabExtent _ lastCharacterExtent copy.\\\\n\\\\tself lastSpaceOrTabExtentSetX: (currentX - destX max: 0).\\\\n\\\\tcurrentX >= characterPoint x\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[lastCharacterExtent _ lastSpaceOrTabExtent copy.\\\\n\\\\t\\\\t\\\\t^ self crossedX].\\\\n\\\\tdestX _ currentX.\\\\n\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\t^false! !\\\\n\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:56'!\\\\nbuildCharacterBlockIn: para\\\\n\\\\t| lineIndex runLength lineStop done stopCondition |\\\\n\\\\t\\\\\\\"handle nullText\\\\\\\"\\\\n\\\\t(para numberOfLines = 0 or: [text size = 0])\\\\n\\\\t\\\\tifTrue:\\\\t[^ CharacterBlock new stringIndex: 1  \\\\\\\"like being off end of string\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttext: para text\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttopLeft: (para leftMarginForDisplayForLine: 1 alignment: (alignment ifNil:[textStyle alignment]))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t@ para compositionRectangle top\\\\n\\\\t\\\\t\\\\t\\\\t\\\\textent: 0 @ textStyle lineGrid].\\\\n\\\\t\\\\\\\"find the line\\\\\\\"\\\\n\\\\tlineIndex _ para lineIndexOfTop: characterPoint y.\\\\n\\\\tdestY _ para topAtLineIndex: lineIndex.\\\\n\\\\tline _ para lines at: lineIndex.\\\\n\\\\trightMargin _ para rightMarginForDisplay.\\\\n\\\\n\\\\t(lineIndex = para numberOfLines and:\\\\n\\\\t\\\\t[(destY + line lineHeight) < characterPoint y])\\\\n\\\\t\\\\t\\\\tifTrue:\\\\t[\\\\\\\"if beyond lastLine, force search to last character\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself characterPointSetX: rightMargin]\\\\n\\\\t\\\\t\\\\tifFalse:\\\\t[characterPoint y < (para compositionRectangle) top\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"force search to first line\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcharacterPoint _ (para compositionRectangle) topLeft].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcharacterPoint x > rightMargin\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue:\\\\t[self characterPointSetX: rightMargin]].\\\\n\\\\tdestX _ (leftMargin _ para leftMarginForDisplayForLine: lineIndex alignment: (alignment ifNil:[textStyle alignment])).\\\\n\\\\tnextLeftMargin_ para leftMarginForDisplayForLine: lineIndex+1 alignment: (alignment ifNil:[textStyle alignment]).\\\\n\\\\tlastIndex _ line first.\\\\n\\\\n\\\\tself setStopConditions.\\\\t\\\\t\\\\\\\"also sets font\\\\\\\"\\\\n\\\\trunLength _ (text runLengthFor: line first).\\\\n\\\\tcharacterIndex == nil\\\\n\\\\t\\\\tifTrue:\\\\t[lineStop _ line last  \\\\\\\"characterBlockAtPoint\\\\\\\"]\\\\n\\\\t\\\\tifFalse:\\\\t[lineStop _ characterIndex  \\\\\\\"characterBlockForIndex\\\\\\\"].\\\\n\\\\t(runStopIndex _ lastIndex + (runLength - 1)) > lineStop\\\\n\\\\t\\\\tifTrue:\\\\t[runStopIndex _ lineStop].\\\\n\\\\tlastCharacterExtent _ 0 @ line lineHeight.\\\\n\\\\tspaceCount _ 0. done  _ false.\\\\n\\\\tself handleIndentation.\\\\n\\\\n\\\\t[done]\\\\n\\\\twhileFalse:\\\\n\\\\t[stopCondition _ self scanCharactersFrom: lastIndex to: runStopIndex\\\\n\\\\t\\\\t\\\\tin: text string rightX: characterPoint x\\\\n\\\\t\\\\t\\\\tstopConditions: stopConditions kern: kern.\\\\n\\\\n\\\\t\\\\\\\"see setStopConditions for stopping conditions for character block \\\\toperations.\\\\\\\"\\\\n\\\\tself lastCharacterExtentSetX: (font widthOf: (text at: lastIndex)).\\\\n\\\\t(self perform: stopCondition) ifTrue:\\\\n\\\\t\\\\t[characterIndex == nil\\\\n\\\\t\\\\t\\\\tifTrue: [\\\\\\\"characterBlockAtPoint\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ CharacterBlock new stringIndex: lastIndex text: text\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttopLeft: characterPoint + (font descentKern @ 0)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\textent: lastCharacterExtent]\\\\n\\\\t\\\\t\\\\tifFalse: [\\\\\\\"characterBlockForIndex\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ CharacterBlock new stringIndex: lastIndex text: text\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttopLeft: characterPoint + ((font descentKern) - kern @ 0)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\textent: lastCharacterExtent]]]! !\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:56'!\\\\ncharacterPointSetX: xVal\\\\n\\\\tcharacterPoint _ xVal @ characterPoint y! !\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:56'!\\\\nlastCharacterExtentSetX: xVal\\\\n\\\\tlastCharacterExtent _ xVal @ lastCharacterExtent y! !\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:56'!\\\\nlastSpaceOrTabExtentSetX: xVal\\\\n\\\\tlastSpaceOrTabExtent _ xVal @ lastSpaceOrTabExtent y! !\\\\nObject subclass: #MultiCharacterScanner\\\\n\\\\tinstanceVariableNames: 'destX lastIndex xTable destY stopConditions text textStyle alignment leftMargin rightMargin font line runStopIndex spaceCount spaceWidth emphasisCode kern indentationLevel wantsColumnBreaks presentation presentationLine numOfComposition baselineY firstDestX'\\\\n\\\\tclassVariableNames: 'DefaultStopConditions NilCondition PaddedSpaceCondition SpaceCondition'\\\\n\\\\tpoolDictionaries: 'TextConstants'\\\\n\\\\tcategory: 'Multilingual-Scanning'!\\\\n\\\\n!MultiCharacterScanner methodsFor: 'initialize' stamp: 'yo 12/18/2002 13:53'!\\\\ninitialize\\\\n\\\\tdestX _ destY _ leftMargin _ 0.! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'initialize' stamp: 'yo 12/18/2002 13:53'!\\\\ninitializeStringMeasurer\\\\n\\\\tstopConditions _ Array new: 258.\\\\n\\\\tstopConditions at: CrossedX put: #crossedX.\\\\n\\\\tstopConditions at: EndOfRun put: #endOfRun.\\\\n! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'initialize' stamp: 'yo 12/18/2002 13:53'!\\\\nwantsColumnBreaks: aBoolean\\\\n\\\\n\\\\twantsColumnBreaks _ aBoolean! !\\\\n\\\\n\\\\n!MultiCharacterScanner methodsFor: 'multilingual scanning' stamp: 'yo 1/3/2003 12:09'!\\\\naddCharToPresentation: char\\\\n\\\\n! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'multilingual scanning' stamp: 'yo 12/20/2002 16:15'!\\\\nregisterBreakableIndex\\\\n\\\\n\\\\t\\\\\\\"Record left x and character index of the line-wrappable point. \\\\n\\\\tThe default implementation here does nothing.\\\\\\\"\\\\n\\\\n\\\\t^ false.\\\\n! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'multilingual scanning' stamp: 'yo 1/23/2003 14:25'!\\\\nremoveLastCharFromPresentation\\\\n! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'multilingual scanning' stamp: 'yo 1/1/2003 10:43'!\\\\nwidthOf: char inFont: aFont\\\\n\\\\n\\\\t(char isMemberOf: CombinedChar) ifTrue: [\\\\n\\\\t\\\\t^ aFont widthOf: char base.\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\t^ aFont widthOf: char.\\\\n\\\\t].\\\\n\\\\n\\\\n! !\\\\n\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanner methods' stamp: 'yo 12/18/2002 13:53'!\\\\nbasicScanCharactersFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: kernDelta\\\\n\\\\t\\\\\\\"Primitive. This is the inner loop of text display--but see \\\\n\\\\tscanCharactersFrom: to:rightX: which would get the string, \\\\n\\\\tstopConditions and displaying from the instance. March through source \\\\n\\\\tString from startIndex to stopIndex. If any character is flagged with a \\\\n\\\\tnon-nil entry in stops, then return the corresponding value. Determine \\\\n\\\\twidth of each character from xTable, indexed by map. \\\\n\\\\tIf dextX would exceed rightX, then return stops at: 258. \\\\n\\\\tAdvance destX by the width of the character. If stopIndex has been\\\\n\\\\treached, then return stops at: 257. Optional. \\\\n\\\\tSee Object documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\t| ascii nextDestX char |\\\\n\\\\t<primitive: 103>\\\\n\\\\tlastIndex _ startIndex.\\\\n\\\\t[lastIndex <= stopIndex]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[char _ (sourceString at: lastIndex).\\\\n\\\\t\\\\t\\\\tascii _ char asciiValue + 1.\\\\n\\\\t\\\\t\\\\t(stops at: ascii) == nil ifFalse: [^stops at: ascii].\\\\n\\\\t\\\\t\\\\t\\\\\\\"Note: The following is querying the font about the width\\\\n\\\\t\\\\t\\\\tsince the primitive may have failed due to a non-trivial\\\\n\\\\t\\\\t\\\\tmapping of characters to glyphs or a non-existing xTable.\\\\\\\"\\\\n\\\\t\\\\t\\\\tnextDestX _ destX + (font widthOf: char).\\\\n\\\\t\\\\t\\\\tnextDestX > rightX ifTrue: [^stops at: CrossedX].\\\\n\\\\t\\\\t\\\\tdestX _ nextDestX + kernDelta.\\\\n\\\\t\\\\t\\\\tlastIndex _ lastIndex + 1].\\\\n\\\\tlastIndex _ stopIndex.\\\\n\\\\t^stops at: EndOfRun! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanner methods' stamp: 'yo 12/30/2002 22:59'!\\\\ncombinableChar: char for: prevEntity\\\\n\\\\n! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanner methods' stamp: 'yo 12/20/2002 11:46'!\\\\nisBreakableAt: index in: sourceString in: encodingClass\\\\n\\\\n\\\\t^ encodingClass isBreakableAt: index in: sourceString.\\\\n! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanner methods' stamp: 'yo 3/16/2005 19:03'!\\\\nscanJapaneseCharactersFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: kernDelta\\\\n\\\\n\\\\t| ascii encoding f nextDestX maxAscii startEncoding |\\\\n\\\\tlastIndex _ startIndex.\\\\n\\\\tlastIndex > stopIndex ifTrue: [lastIndex _ stopIndex. ^ stops at: EndOfRun].\\\\n\\\\tstartEncoding _ (sourceString at: startIndex) leadingChar.\\\\n\\\\tfont ifNil: [font _ (TextConstants at: #DefaultMultiStyle) fontArray at: 1].\\\\n\\\\t((font isMemberOf: StrikeFontSet) or: [font isKindOf: TTCFontSet]) ifTrue: [\\\\n\\\\t\\\\t[f _ font fontArray at: startEncoding + 1]\\\\n\\\\t\\\\t\\\\ton: Exception do: [:ex | f _ font fontArray at: 1].\\\\n\\\\t\\\\tf ifNil: [ f _ font fontArray at: 1].\\\\n\\\\t\\\\tmaxAscii _ f maxAscii.\\\\n\\\\t\\\\t\\\\\\\"xTable _ f xTable.\\\\n\\\\t\\\\tmaxAscii _ xTable size - 2.\\\\\\\"\\\\n\\\\t\\\\tspaceWidth _ f widthOf: Space.\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\t(font isMemberOf: HostFont) ifTrue: [\\\\n\\\\t\\\\t\\\\tf _ font.\\\\n\\\\t\\\\t\\\\tmaxAscii _ f maxAscii.\\\\n\\\\t\\\\t\\\\tspaceWidth _ f widthOf: Space.\\\\n\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\tmaxAscii _ font maxAscii.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\t[lastIndex <= stopIndex] whileTrue: [\\\\n\\\\t\\\\t\\\\\\\"self halt.\\\\\\\"\\\\n\\\\t\\\\tencoding _ (sourceString at: lastIndex) leadingChar.\\\\n\\\\t\\\\tencoding ~= startEncoding ifTrue: [lastIndex _ lastIndex - 1. ^ stops at: EndOfRun].\\\\n\\\\t\\\\tascii _ (sourceString at: lastIndex) charCode.\\\\n\\\\t\\\\tascii > maxAscii ifTrue: [ascii _ maxAscii].\\\\n\\\\t\\\\t(encoding = 0 and: [(stopConditions at: ascii + 1) ~~ nil]) ifTrue: [^ stops at: ascii + 1].\\\\n\\\\t\\\\t(self isBreakableAt: lastIndex in: sourceString in: (EncodedCharSet charsetAt: encoding)) ifTrue: [\\\\n\\\\t\\\\t\\\\tself registerBreakableIndex.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tnextDestX _ destX + (font widthOf: (sourceString at: lastIndex)).\\\\n\\\\t\\\\tnextDestX > rightX ifTrue: [firstDestX ~= destX ifTrue: [^ stops at: CrossedX]].\\\\n\\\\t\\\\tdestX _ nextDestX + kernDelta.\\\\n\\\\t\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\t].\\\\n\\\\tlastIndex _ stopIndex.\\\\n\\\\t^ stops at: EndOfRun! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanner methods' stamp: 'yo 3/16/2005 19:09'!\\\\nscanMultiCharactersCombiningFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: kernDelta\\\\n\\\\n\\\\t| charCode encoding f maxAscii startEncoding combining combined combiningIndex c |\\\\n\\\\tlastIndex _ startIndex.\\\\n\\\\tlastIndex > stopIndex ifTrue: [lastIndex _ stopIndex. ^ stops at: EndOfRun].\\\\n\\\\tstartEncoding _ (sourceString at: startIndex) leadingChar.\\\\n\\\\tfont ifNil: [font _ (TextConstants at: #DefaultMultiStyle) fontArray at: 1].\\\\n\\\\t((font isMemberOf: StrikeFontSet) or: [font isKindOf: TTCFontSet]) ifTrue: [\\\\n\\\\t\\\\t[f _ font fontArray at: startEncoding + 1]\\\\n\\\\t\\\\t\\\\ton: Exception do: [:ex | f _ font fontArray at: 1].\\\\n\\\\t\\\\tf ifNil: [ f _ font fontArray at: 1].\\\\n\\\\t\\\\tmaxAscii _ f maxAscii.\\\\n\\\\t\\\\tspaceWidth _ font widthOf: Space.\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tmaxAscii _ font maxAscii.\\\\n\\\\t\\\\tspaceWidth _ font widthOf: Space.\\\\n\\\\t].\\\\n\\\\n\\\\tcombining _ nil.\\\\n\\\\t[lastIndex <= stopIndex] whileTrue: [\\\\n\\\\t\\\\tcharCode _ (sourceString at: lastIndex) charCode.\\\\n\\\\t\\\\tc _ (sourceString at: lastIndex).\\\\n\\\\t\\\\tcombining ifNil: [\\\\n\\\\t\\\\t\\\\tcombining _ CombinedChar new.\\\\n\\\\t\\\\t\\\\tcombining add: c.\\\\n\\\\t\\\\t\\\\tcombiningIndex _ lastIndex.\\\\n\\\\t\\\\t\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\t\\\\t] ifNotNil: [\\\\n\\\\t\\\\t\\\\t(combining add: c) ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tself addCharToPresentation: (combined _ combining combined).\\\\n\\\\t\\\\t\\\\t\\\\tcombining _ CombinedChar new.\\\\n\\\\t\\\\t\\\\t\\\\tcombining add: c.\\\\n\\\\t\\\\t\\\\t\\\\tcharCode _ combined charCode.\\\\n\\\\t\\\\t\\\\t\\\\tencoding _ combined leadingChar.\\\\n\\\\t\\\\t\\\\t\\\\tencoding ~= startEncoding ifTrue: [lastIndex _ lastIndex - 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(encoding = 0 and: [(stopConditions at: charCode + 1) ~~ nil]) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^ stops at: charCode + 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t ^ stops at: EndOfRun\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\t\\\\tcharCode > maxAscii ifTrue: [charCode _ maxAscii].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t(encoding = 0 and: [(stopConditions at: charCode + 1) ~~ nil]) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcombining ifNotNil: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself addCharToPresentation: (combining combined).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ stops at: charCode + 1\\\\n\\\\t\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\t\\\\t(self isBreakableAt: lastIndex in: sourceString in: Latin1Environment) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself registerBreakableIndex.\\\\n\\\\t\\\\t\\\\t\\\\t].\\\\t\\\\t\\\\n\\\\t\\\\t\\\\t\\\\tdestX > rightX ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdestX ~= firstDestX ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tlastIndex _ combiningIndex.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself removeLastCharFromPresentation.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^ stops at: CrossedX]].\\\\n\\\\t\\\\t\\\\t\\\\tcombiningIndex _ lastIndex.\\\\n\\\\t\\\\t\\\\t\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\t\\\\t\\\\t] ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\t\\\\t\\\\t\\\\tnumOfComposition _ numOfComposition + 1.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\tlastIndex _ stopIndex.\\\\n\\\\tcombining ifNotNil: [\\\\n\\\\t\\\\tcombined _ combining combined.\\\\n\\\\t\\\\tself addCharToPresentation: combined.\\\\n\\\\t\\\\t\\\\\\\"assuming that there is always enough space for at least one character\\\\\\\".\\\\n\\\\t\\\\tdestX _ destX + (self widthOf: combined inFont: font).\\\\n\\\\t].\\\\n\\\\t^ stops at: EndOfRun! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanner methods' stamp: 'yo 3/16/2005 19:08'!\\\\nscanMultiCharactersFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: kernDelta\\\\n\\\\n\\\\t| ascii encoding f nextDestX maxAscii startEncoding |\\\\n\\\\tlastIndex _ startIndex.\\\\n\\\\tlastIndex > stopIndex ifTrue: [lastIndex _ stopIndex. ^ stops at: EndOfRun].\\\\n\\\\tstartEncoding _ (sourceString at: startIndex) leadingChar.\\\\n\\\\tfont ifNil: [font _ (TextConstants at: #DefaultMultiStyle) fontArray at: 1].\\\\n\\\\t((font isMemberOf: StrikeFontSet) or: [font isKindOf: TTCFontSet]) ifTrue: [\\\\n\\\\t\\\\t[f _ font fontArray at: startEncoding + 1]\\\\n\\\\t\\\\t\\\\ton: Exception do: [:ex | f _ font fontArray at: 1].\\\\n\\\\t\\\\tf ifNil: [ f _ font fontArray at: 1].\\\\n\\\\t\\\\tmaxAscii _ f maxAscii.\\\\n\\\\t\\\\tspaceWidth _ f widthOf: Space.\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tmaxAscii _ font maxAscii.\\\\n\\\\t].\\\\n\\\\n\\\\t[lastIndex <= stopIndex] whileTrue: [\\\\n\\\\t\\\\tencoding _ (sourceString at: lastIndex) leadingChar.\\\\n\\\\t\\\\tencoding ~= startEncoding ifTrue: [lastIndex _ lastIndex - 1. ^ stops at: EndOfRun].\\\\n\\\\t\\\\tascii _ (sourceString at: lastIndex) charCode.\\\\n\\\\t\\\\tascii > maxAscii ifTrue: [ascii _ maxAscii].\\\\n\\\\t\\\\t(encoding = 0 and: [ascii < stopConditions size and: [(stopConditions at: ascii + 1) ~~ nil]]) ifTrue: [^ stops at: ascii + 1].\\\\n\\\\t\\\\t(self isBreakableAt: lastIndex in: sourceString in: Latin1Environment) ifTrue: [\\\\n\\\\t\\\\t\\\\tself registerBreakableIndex.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tnextDestX _ destX + (font widthOf: (sourceString at: lastIndex)).\\\\n\\\\t\\\\tnextDestX > rightX ifTrue: [destX ~= firstDestX ifTrue: [^ stops at: CrossedX]].\\\\n\\\\t\\\\tdestX _ nextDestX + kernDelta.\\\\n\\\\t\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\t].\\\\n\\\\tlastIndex _ stopIndex.\\\\n\\\\t^ stops at: EndOfRun! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanner methods' stamp: 'yo 3/16/2005 19:08'!\\\\nscanMultiCharactersR2LFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: kernDelta\\\\n\\\\n\\\\t\\\\\\\"Note that 'rightX' really means 'endX' in R2L context.  Ie.  rightX is usually smaller than destX.\\\\\\\"\\\\n\\\\t| ascii encoding f nextDestX maxAscii startEncoding |\\\\n\\\\tlastIndex _ startIndex.\\\\n\\\\tlastIndex > stopIndex ifTrue: [lastIndex _ stopIndex. ^ stops at: EndOfRun].\\\\n\\\\tstartEncoding _ (sourceString at: startIndex) leadingChar.\\\\n\\\\tfont ifNil: [font _ (TextConstants at: #DefaultMultiStyle) fontArray at: 1].\\\\n\\\\t((font isMemberOf: StrikeFontSet) or: [font isKindOf: TTCFontSet]) ifTrue: [\\\\n\\\\t\\\\t[f _ font fontArray at: startEncoding + 1]\\\\n\\\\t\\\\t\\\\ton: Exception do: [:ex | f _ font fontArray at: 1].\\\\n\\\\t\\\\tf ifNil: [ f _ font fontArray at: 1].\\\\n\\\\t\\\\tmaxAscii _ f maxAscii.\\\\n\\\\t\\\\tspaceWidth _ f widthOf: Space.\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tmaxAscii _ font maxAscii.\\\\n\\\\t].\\\\n\\\\n\\\\t[lastIndex <= stopIndex] whileTrue: [\\\\n\\\\t\\\\tencoding _ (sourceString at: lastIndex) leadingChar.\\\\n\\\\t\\\\tencoding ~= startEncoding ifTrue: [lastIndex _ lastIndex - 1. ^ stops at: EndOfRun].\\\\n\\\\t\\\\tascii _ (sourceString at: lastIndex) charCode.\\\\n\\\\t\\\\tascii > maxAscii ifTrue: [ascii _ maxAscii].\\\\n\\\\t\\\\t(encoding = 0 and: [(stopConditions at: ascii + 1) ~~ nil]) ifTrue: [^ stops at: ascii + 1].\\\\n\\\\t\\\\t(self isBreakableAt: lastIndex in: sourceString in: Latin1Environment) ifTrue: [\\\\n\\\\t\\\\t\\\\tself registerBreakableIndex.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tnextDestX _ destX - (font widthOf: (sourceString at: lastIndex)).\\\\n\\\\t\\\\tnextDestX < rightX ifTrue: [^ stops at: CrossedX].\\\\n\\\\t\\\\tdestX _ nextDestX - kernDelta.\\\\n\\\\t\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\t].\\\\n\\\\tlastIndex _ stopIndex.\\\\n\\\\t^ stops at: EndOfRun! !\\\\n\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanning' stamp: 'yo 12/18/2002 13:53'!\\\\ncolumnBreak\\\\n\\\\n\\\\t^true! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanning' stamp: 'yo 12/18/2002 13:53'!\\\\nembeddedObject\\\\n\\\\t| savedIndex |\\\\n\\\\tsavedIndex _ lastIndex.\\\\n\\\\ttext attributesAt: lastIndex do:[:attr| \\\\n\\\\t\\\\tattr anchoredMorph ifNotNil:[\\\\n\\\\t\\\\t\\\\t\\\\\\\"Following may look strange but logic gets reversed.\\\\n\\\\t\\\\t\\\\tIf the morph fits on this line we're not done (return false for true) \\\\n\\\\t\\\\t\\\\tand if the morph won't fit we're done (return true for false)\\\\\\\"\\\\n\\\\t\\\\t\\\\t(self placeEmbeddedObject: attr anchoredMorph) ifFalse:[^true]]].\\\\n\\\\tlastIndex _ savedIndex + 1. \\\\\\\"for multiple(!!) embedded morphs\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanning' stamp: 'yo 12/18/2002 13:53'!\\\\nhandleIndentation\\\\n\\\\tself indentationLevel timesRepeat: [\\\\n\\\\t\\\\tself plainTab]! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanning' stamp: 'yo 12/18/2002 13:53'!\\\\nindentationLevel\\\\n\\\\t\\\\\\\"return the number of tabs that are currently being placed at the beginning of each line\\\\\\\"\\\\n\\\\t^indentationLevel ifNil:[0]! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanning' stamp: 'yo 12/18/2002 13:53'!\\\\nindentationLevel: anInteger\\\\n\\\\t\\\\\\\"set the number of tabs to put at the beginning of each line\\\\\\\"\\\\n\\\\tindentationLevel _ anInteger! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanning' stamp: 'yo 12/18/2002 13:53'!\\\\nleadingTab\\\\n\\\\t\\\\\\\"return true if only tabs lie to the left\\\\\\\"\\\\n\\\\tline first to: lastIndex do:\\\\n\\\\t\\\\t[:i | (text at: i) == Tab ifFalse: [^ false]].\\\\n\\\\t^ true! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanning' stamp: 'yo 1/18/2005 08:08'!\\\\nmeasureString: aString inFont: aFont from: startIndex to: stopIndex\\\\n\\\\t\\\\\\\"WARNING: In order to use this method the receiver has to be set up using #initializeStringMeasurer\\\\\\\"\\\\n\\\\tdestX _ destY _ lastIndex _ 0.\\\\n\\\\tbaselineY _ aFont ascent.\\\\n\\\\txTable _ aFont xTable.\\\\n\\\\tfont := aFont.  \\\\\\\" added Dec 03, 2004 \\\\\\\"\\\\n\\\\\\\"\\\\tmap _ aFont characterToGlyphMap.\\\\\\\"\\\\n\\\\tself scanCharactersFrom: startIndex to: stopIndex in: aString rightX: 999999 stopConditions: stopConditions kern: 0.\\\\n\\\\t^destX! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanning' stamp: 'yo 12/18/2002 13:53'!\\\\nplaceEmbeddedObject: anchoredMorph\\\\n\\\\t\\\\\\\"Place the anchoredMorph or return false if it cannot be placed.\\\\n\\\\tIn any event, advance destX by its width.\\\\\\\"\\\\n\\\\t| w |\\\\n\\\\t\\\\\\\"Workaround: The following should really use #textAnchorType\\\\\\\"\\\\n\\\\tanchoredMorph relativeTextAnchorPosition ifNotNil:[^true].\\\\n\\\\tdestX _ destX + (w _ anchoredMorph width).\\\\n\\\\t(destX > rightMargin and: [(leftMargin + w) <= rightMargin])\\\\n\\\\t\\\\tifTrue: [\\\\\\\"Won't fit, but would on next line\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t^ false].\\\\n\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\tself setFont.  \\\\\\\"Force recalculation of emphasis for next run\\\\\\\"\\\\n\\\\t^ true! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanning' stamp: 'yo 12/18/2002 13:53'!\\\\nplainTab\\\\n\\\\t\\\\\\\"This is the basic method of adjusting destX for a tab.\\\\\\\"\\\\n\\\\tdestX _ (alignment == Justified and: [self leadingTab not])\\\\n\\\\t\\\\tifTrue:\\\\t\\\\t\\\\\\\"embedded tabs in justified text are weird\\\\\\\"\\\\n\\\\t\\\\t\\\\t[destX + (textStyle tabWidth - (line justifiedTabDeltaFor: spaceCount)) max: destX]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[textStyle nextTabXFrom: destX\\\\n\\\\t\\\\t\\\\t\\\\tleftMargin: leftMargin\\\\n\\\\t\\\\t\\\\t\\\\trightMargin: rightMargin]! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanning' stamp: 'ar 4/12/2005 19:53'!\\\\nscanCharactersFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: kernDelta\\\\n\\\\n\\\\t| startEncoding selector |\\\\n\\\\t(sourceString isByteString) ifTrue: [^ self basicScanCharactersFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: kernDelta.].\\\\n\\\\n\\\\t(sourceString isWideString) ifTrue: [\\\\n\\\\t\\\\tstartIndex > stopIndex ifTrue: [lastIndex _ stopIndex. ^ stops at: EndOfRun].\\\\n\\\\t\\\\tstartEncoding _  (sourceString at: startIndex) leadingChar.\\\\n\\\\t\\\\tselector _ (EncodedCharSet charsetAt: startEncoding) scanSelector.\\\\n\\\\t\\\\t^ self perform: selector withArguments: (Array with: startIndex with: stopIndex with: sourceString with: rightX with: stopConditions with: kernDelta).\\\\n\\\\t].\\\\n\\\\t\\\\n\\\\t^ stops at: EndOfRun\\\\n! !\\\\n\\\\n\\\\n!MultiCharacterScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:53'!\\\\naddEmphasis: code\\\\n\\\\t\\\\\\\"Set the bold-ital-under-strike emphasis.\\\\\\\"\\\\n\\\\temphasisCode _ emphasisCode bitOr: code! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:53'!\\\\naddKern: kernDelta\\\\n\\\\t\\\\\\\"Set the current kern amount.\\\\\\\"\\\\n\\\\tkern _ kern + kernDelta! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:53'!\\\\ninitializeFromParagraph: aParagraph clippedBy: clippingRectangle\\\\n\\\\n\\\\ttext _ aParagraph text.\\\\n\\\\ttextStyle _ aParagraph textStyle. \\\\n! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:53'!\\\\nsetActualFont: aFont\\\\n\\\\t\\\\\\\"Set the basal font to an isolated font reference.\\\\\\\"\\\\n\\\\n\\\\tfont _ aFont! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:53'!\\\\nsetAlignment: style\\\\n\\\\talignment _ style.\\\\n\\\\t! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'private' stamp: 'yo 12/19/2002 02:05'!\\\\nsetConditionArray: aSymbol\\\\n\\\\n\\\\taSymbol == #paddedSpace ifTrue: [^stopConditions _ PaddedSpaceCondition \\\\\\\"copy\\\\\\\"].\\\\n\\\\t\\\\\\\"aSymbol == #space ifTrue: [^stopConditions _ SpaceCondition copy].\\\\\\\"\\\\n\\\\taSymbol == nil ifTrue: [^stopConditions _ NilCondition \\\\\\\"copy\\\\\\\"].\\\\n\\\\tself error: 'undefined stopcondition for space character'.\\\\n! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'private' stamp: 'tak 12/19/2004 15:45'!\\\\nsetFont\\\\n\\\\t| priorFont |\\\\n\\\\t\\\\\\\"Set the font and other emphasis.\\\\\\\"\\\\n\\\\tpriorFont _ font.\\\\n\\\\ttext == nil ifFalse:[\\\\n\\\\t\\\\temphasisCode _ 0.\\\\n\\\\t\\\\tkern _ 0.\\\\n\\\\t\\\\tindentationLevel _ 0.\\\\n\\\\t\\\\talignment _ textStyle alignment.\\\\n\\\\t\\\\tfont _ nil.\\\\n\\\\t\\\\t(text attributesAt: lastIndex forStyle: textStyle)\\\\n\\\\t\\\\t\\\\tdo: [:att | att emphasizeScanner: self]].\\\\n\\\\tfont == nil ifTrue:\\\\n\\\\t\\\\t[self setFont: textStyle defaultFontIndex].\\\\n\\\\tfont _ font emphasized: emphasisCode.\\\\n\\\\tpriorFont ifNotNil: [destX _ destX + priorFont descentKern].\\\\n\\\\tdestX _ destX - font descentKern.\\\\n\\\\t\\\\\\\"NOTE: next statement should be removed when clipping works\\\\\\\"\\\\n\\\\tleftMargin ifNotNil: [destX _ destX max: leftMargin].\\\\n\\\\tkern _ kern - font baseKern.\\\\n\\\\n\\\\t\\\\\\\"Install various parameters from the font.\\\\\\\"\\\\n\\\\tspaceWidth _ font widthOf: Space.\\\\n\\\\txTable _ font xTable.\\\\n\\\\\\\"\\\\tmap _ font characterToGlyphMap.\\\\\\\"\\\\n\\\\tstopConditions _ DefaultStopConditions.! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:53'!\\\\nsetFont: fontNumber\\\\n\\\\t\\\\\\\"Set the font by number from the textStyle.\\\\\\\"\\\\n\\\\n\\\\tself setActualFont: (textStyle fontAt: fontNumber)! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:53'!\\\\ntext: t textStyle: ts\\\\n\\\\ttext _ t.\\\\n\\\\ttextStyle _ ts! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:53'!\\\\ntextColor: ignored\\\\n\\\\t\\\\\\\"Overridden in DisplayScanner\\\\\\\"! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMultiCharacterScanner class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MultiCharacterScanner class methodsFor: 'class initialization' stamp: 'yo 12/18/2002 14:09'!\\\\ninitialize\\\\n\\\\\\\"\\\\n\\\\tMultiCharacterScanner initialize\\\\n\\\\\\\"\\\\n\\\\t| a |\\\\n\\\\ta _ Array new: 258.\\\\n\\\\ta at: 1 + 1 put: #embeddedObject.\\\\n\\\\ta at: Tab asciiValue + 1 put: #tab.\\\\n\\\\ta at: CR asciiValue + 1 put: #cr.\\\\n\\\\ta at: EndOfRun put: #endOfRun.\\\\n\\\\ta at: CrossedX put: #crossedX.\\\\n\\\\tNilCondition _ a copy.\\\\n\\\\tDefaultStopConditions _ a copy.\\\\n\\\\n\\\\tPaddedSpaceCondition _ a copy.\\\\n\\\\tPaddedSpaceCondition at: Space asciiValue + 1 put: #paddedSpace.\\\\n\\\\t\\\\n\\\\tSpaceCondition _ a copy.\\\\n\\\\tSpaceCondition at: Space asciiValue + 1 put: #space.\\\\n! !\\\\nMultiCharacterScanner subclass: #MultiCompositionScanner\\\\n\\\\tinstanceVariableNames: 'spaceX lineHeight baseline breakableIndex lineHeightAtBreak baselineAtBreak breakAtSpace lastWidth'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Multilingual-Scanning'!\\\\n\\\\n!MultiCompositionScanner methodsFor: 'accessing' stamp: 'yo 1/3/2003 02:33'!\\\\npresentation\\\\n\\\\n\\\\t^ presentation.\\\\n! !\\\\n\\\\n!MultiCompositionScanner methodsFor: 'accessing' stamp: 'yo 1/3/2003 02:33'!\\\\npresentationLine\\\\n\\\\n\\\\t^ presentationLine.\\\\n! !\\\\n\\\\n!MultiCompositionScanner methodsFor: 'accessing' stamp: 'yo 12/18/2002 14:56'!\\\\nrightX\\\\n\\\\t\\\\\\\"Meaningful only when a line has just been composed -- refers to the \\\\n\\\\tline most recently composed. This is a subtrefuge to allow for easy \\\\n\\\\tresizing of a composition rectangle to the width of the maximum line. \\\\n\\\\tUseful only when there is only one line in the form or when each line \\\\n\\\\tis terminated by a carriage return. Handy for sizing menus and lists.\\\\\\\"\\\\n\\\\n\\\\tbreakAtSpace ifTrue: [^ spaceX].\\\\n\\\\n\\\\t^ destX.\\\\n! !\\\\n\\\\n\\\\n!MultiCompositionScanner methodsFor: 'intialize-release' stamp: 'yo 12/18/2002 13:57'!\\\\nforParagraph: aParagraph\\\\n\\\\t\\\\\\\"Initialize the receiver for scanning the given paragraph.\\\\\\\"\\\\n\\\\n\\\\tself\\\\n\\\\t\\\\tinitializeFromParagraph: aParagraph\\\\n\\\\t\\\\tclippedBy: aParagraph clippingRectangle.\\\\n! !\\\\n\\\\n\\\\n!MultiCompositionScanner methodsFor: 'multilingual scanning' stamp: 'yo 2/10/2004 23:00'!\\\\naddCharToPresentation: char\\\\n\\\\n\\\\tpresentation nextPut: char.\\\\n\\\\tlastWidth _ self widthOf: char inFont: font.\\\\n\\\\tdestX _ destX + lastWidth.\\\\n! !\\\\n\\\\n!MultiCompositionScanner methodsFor: 'multilingual scanning' stamp: 'yo 1/16/2003 17:38'!\\\\ngetPresentation\\\\n\\\\n\\\\t^ presentation contents.\\\\n\\\\n! !\\\\n\\\\n!MultiCompositionScanner methodsFor: 'multilingual scanning' stamp: 'yo 1/16/2003 17:28'!\\\\ngetPresentationLine\\\\n\\\\n\\\\t^ presentationLine.\\\\n! !\\\\n\\\\n!MultiCompositionScanner methodsFor: 'multilingual scanning' stamp: 'yo 12/20/2002 11:51'!\\\\nisBreakableAt: index in: sourceString in: encodingClass\\\\n\\\\n\\\\t^ encodingClass isBreakableAt: index in: sourceString.\\\\n! !\\\\n\\\\n!MultiCompositionScanner methodsFor: 'multilingual scanning' stamp: 'yo 12/20/2002 16:28'!\\\\nregisterBreakableIndex\\\\n\\\\n\\\\t\\\\\\\"Record left x and character index of the line-wrappable point. \\\\n\\\\tUsed for wrap-around. Answer whether the character has crossed the \\\\n\\\\tright edge of the composition rectangle of the paragraph.\\\\\\\"\\\\n\\\\n\\\\t(text at: lastIndex) = Character space ifTrue: [\\\\n\\\\t\\\\tbreakAtSpace _ true.\\\\n\\\\t\\\\tspaceX _ destX.\\\\n\\\\t\\\\tspaceCount _ spaceCount + 1.\\\\n\\\\t\\\\tlineHeightAtBreak _ lineHeight.\\\\n\\\\t\\\\tbaselineAtBreak _ baseline.\\\\n\\\\t\\\\tbreakableIndex _ lastIndex.\\\\n\\\\t\\\\tdestX > rightMargin ifTrue: \\\\t[^self crossedX].\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tbreakAtSpace _ false.\\\\n\\\\t\\\\tlineHeightAtBreak _ lineHeight.\\\\n\\\\t\\\\tbaselineAtBreak _ baseline.\\\\n\\\\t\\\\tbreakableIndex _ lastIndex - 1.\\\\n\\\\t].\\\\n\\\\t^ false.\\\\n! !\\\\n\\\\n!MultiCompositionScanner methodsFor: 'multilingual scanning' stamp: 'yo 2/10/2004 22:59'!\\\\nremoveLastCharFromPresentation\\\\n\\\\n\\\\tpresentation ifNotNil: [\\\\n\\\\t\\\\tpresentation position: presentation position - 1.\\\\n\\\\t].\\\\n\\\\tdestX _ destX - lastWidth.\\\\n! !\\\\n\\\\n\\\\n!MultiCompositionScanner methodsFor: 'scanning' stamp: 'ar 4/12/2005 17:34'!\\\\ncomposeFrom: startIndex inRectangle: lineRectangle\\\\n\\\\tfirstLine: firstLine leftSide: leftSide rightSide: rightSide\\\\n\\\\t\\\\\\\"Answer an instance of TextLineInterval that represents the next line in the paragraph.\\\\\\\"\\\\n\\\\t| runLength done stopCondition |\\\\n\\\\t\\\\\\\"Set up margins\\\\\\\"\\\\n\\\\tleftMargin _ lineRectangle left.\\\\n\\\\tleftSide ifTrue: [leftMargin _ leftMargin +\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(firstLine ifTrue: [textStyle firstIndent]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [textStyle restIndent])].\\\\n\\\\tdestX _ spaceX _ leftMargin.\\\\n\\\\tfirstDestX _ destX.\\\\n\\\\trightMargin _ lineRectangle right.\\\\n\\\\trightSide ifTrue: [rightMargin _ rightMargin - textStyle rightIndent].\\\\n\\\\tlastIndex _ startIndex.\\\\t\\\\\\\"scanning sets last index\\\\\\\"\\\\n\\\\tdestY _ lineRectangle top.\\\\n\\\\tlineHeight _ baseline _ 0.  \\\\\\\"Will be increased by setFont\\\\\\\"\\\\n\\\\tself setStopConditions.\\\\t\\\\\\\"also sets font\\\\\\\"\\\\n\\\\trunLength _ text runLengthFor: startIndex.\\\\n\\\\trunStopIndex _ (lastIndex _ startIndex) + (runLength - 1).\\\\n\\\\tline _ (TextLine start: lastIndex stop: 0 internalSpaces: 0 paddingWidth: 0)\\\\n\\\\t\\\\t\\\\t\\\\trectangle: lineRectangle.\\\\n\\\\tpresentationLine _ (TextLine start: lastIndex stop: 0 internalSpaces: 0 paddingWidth: 0)\\\\n\\\\t\\\\t\\\\t\\\\trectangle: lineRectangle.\\\\n\\\\tnumOfComposition _ 0.\\\\n\\\\tspaceCount _ 0.\\\\n\\\\tself handleIndentation.\\\\n\\\\tleftMargin _ destX.\\\\n\\\\tline leftMargin: leftMargin.\\\\n\\\\tpresentationLine leftMargin: leftMargin.\\\\n\\\\n\\\\tpresentation _ TextStream on: (Text fromString: (WideString new: text size)).\\\\n\\\\n\\\\tdone _ false.\\\\n\\\\t[done]\\\\n\\\\t\\\\twhileFalse: \\\\n\\\\t\\\\t\\\\t[stopCondition _ self scanCharactersFrom: lastIndex to: runStopIndex\\\\n\\\\t\\\\t\\\\t\\\\tin: text string rightX: rightMargin stopConditions: stopConditions\\\\n\\\\t\\\\t\\\\t\\\\tkern: kern.\\\\n\\\\t\\\\t\\\\t\\\\\\\"See setStopConditions for stopping conditions for composing.\\\\\\\"\\\\n\\\\t\\\\t\\\\t(self perform: stopCondition)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [presentationLine lineHeight: lineHeight + textStyle leading\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbaseline: baseline + textStyle leading.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^ line lineHeight: lineHeight + textStyle leading\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbaseline: baseline + textStyle leading]]! !\\\\n\\\\n!MultiCompositionScanner methodsFor: 'scanning' stamp: 'ar 4/12/2005 17:34'!\\\\ncomposeLine: lineIndex fromCharacterIndex: startIndex inParagraph: aParagraph \\\\n\\\\t\\\\\\\"Answer an instance of TextLineInterval that represents the next line in the paragraph.\\\\\\\"\\\\n\\\\t| runLength done stopCondition |\\\\n\\\\tdestX _ spaceX _ leftMargin _ aParagraph leftMarginForCompositionForLine: lineIndex.\\\\n\\\\tdestY _ 0.\\\\n\\\\trightMargin _ aParagraph rightMarginForComposition.\\\\n\\\\tleftMargin >= rightMargin ifTrue: [self error: 'No room between margins to compose'].\\\\n\\\\tlastIndex _ startIndex.\\\\t\\\\\\\"scanning sets last index\\\\\\\"\\\\n\\\\tlineHeight _ textStyle lineGrid.  \\\\\\\"may be increased by setFont:...\\\\\\\"\\\\n\\\\tbaseline _ textStyle baseline.\\\\n\\\\tbaselineY _ destY + baseline.\\\\n\\\\tself setStopConditions.\\\\t\\\\\\\"also sets font\\\\\\\"\\\\n\\\\tself handleIndentation.\\\\n\\\\trunLength _ text runLengthFor: startIndex.\\\\n\\\\trunStopIndex _ (lastIndex _ startIndex) + (runLength - 1).\\\\n\\\\tline _ TextLineInterval\\\\n\\\\t\\\\tstart: lastIndex\\\\n\\\\t\\\\tstop: 0\\\\n\\\\t\\\\tinternalSpaces: 0\\\\n\\\\t\\\\tpaddingWidth: 0.\\\\n\\\\tpresentationLine _ TextLineInterval\\\\n\\\\t\\\\tstart: lastIndex\\\\n\\\\t\\\\tstop: 0\\\\n\\\\t\\\\tinternalSpaces: 0\\\\n\\\\t\\\\tpaddingWidth: 0.\\\\n\\\\tnumOfComposition _ 0.\\\\n\\\\tpresentation _ TextStream on: (Text fromString: (WideString new: text size)).\\\\n\\\\tspaceCount _ 0.\\\\n\\\\tdone _ false.\\\\n\\\\t[done]\\\\n\\\\t\\\\twhileFalse: \\\\n\\\\t\\\\t\\\\t[stopCondition _ self scanCharactersFrom: lastIndex to: runStopIndex\\\\n\\\\t\\\\t\\\\t\\\\tin: text string rightX: rightMargin stopConditions: stopConditions\\\\n\\\\t\\\\t\\\\t\\\\tkern: kern.\\\\n\\\\t\\\\t\\\\t\\\\\\\"See setStopConditions for stopping conditions for composing.\\\\\\\"\\\\n\\\\t\\\\t\\\\t(self perform: stopCondition)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [presentationLine lineHeight: lineHeight + textStyle leading\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbaseline: baseline + textStyle leading.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^line lineHeight: lineHeight + textStyle leading\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbaseline: baseline + textStyle leading]]! !\\\\n\\\\n!MultiCompositionScanner methodsFor: 'scanning' stamp: 'yo 1/3/2003 11:54'!\\\\ncrossedX\\\\n\\\\t\\\\\\\"There is a word that has fallen across the right edge of the composition \\\\n\\\\trectangle. This signals the need for wrapping which is done to the last \\\\n\\\\tspace that was encountered, as recorded by the space stop condition.\\\\\\\"\\\\n\\\\n\\\\t(breakAtSpace) ifTrue: [\\\\n\\\\t\\\\tspaceCount >= 1 ifTrue:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"The common case. First back off to the space at which we wrap.\\\\\\\"\\\\n\\\\t\\\\t\\\\tline stop: breakableIndex.\\\\n\\\\t\\\\t\\\\tpresentationLine stop: breakableIndex - numOfComposition.\\\\n\\\\t\\\\t\\\\tlineHeight _ lineHeightAtBreak.\\\\n\\\\t\\\\t\\\\tbaseline _ baselineAtBreak.\\\\n\\\\t\\\\t\\\\tspaceCount _ spaceCount - 1.\\\\n\\\\t\\\\t\\\\tbreakableIndex _ breakableIndex - 1.\\\\n\\\\n\\\\t\\\\t\\\\t\\\\\\\"Check to see if any spaces preceding the one at which we wrap.\\\\n\\\\t\\\\t\\\\t\\\\tDouble space after punctuation, most likely.\\\\\\\"\\\\n\\\\t\\\\t\\\\t[(spaceCount > 1 and: [(text at: breakableIndex) = Space])]\\\\n\\\\t\\\\t\\\\t\\\\twhileTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[spaceCount _ spaceCount - 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Account for backing over a run which might\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tchange width of space.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tfont _ text fontAt: breakableIndex withStyle: textStyle.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbreakableIndex _ breakableIndex - 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tspaceX _ spaceX - (font widthOf: Space)].\\\\n\\\\t\\\\t\\\\tline paddingWidth: rightMargin - spaceX.\\\\n\\\\t\\\\t\\\\tpresentationLine paddingWidth: rightMargin - spaceX.\\\\n\\\\t\\\\t\\\\tpresentationLine internalSpaces: spaceCount.\\\\n\\\\t\\\\t\\\\tline internalSpaces: spaceCount]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"Neither internal nor trailing spaces -- almost never happens.\\\\\\\"\\\\n\\\\t\\\\t\\\\tlastIndex _ lastIndex - 1.\\\\n\\\\t\\\\t\\\\t[destX <= rightMargin]\\\\n\\\\t\\\\t\\\\t\\\\twhileFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[destX _ destX - (font widthOf: (text at: lastIndex)).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tlastIndex _ lastIndex - 1].\\\\n\\\\t\\\\t\\\\tspaceX _ destX.\\\\n\\\\t\\\\t\\\\tline paddingWidth: rightMargin - destX.\\\\n\\\\t\\\\t\\\\tpresentationLine paddingWidth: rightMargin - destX.\\\\n\\\\t\\\\t\\\\tpresentationLine stop: (lastIndex max: line first).\\\\n\\\\t\\\\t\\\\tline stop: (lastIndex max: line first)].\\\\n\\\\t\\\\t^true\\\\n\\\\t].\\\\n\\\\n\\\\t(breakableIndex isNil or: [breakableIndex < line first]) ifTrue: [\\\\n\\\\t\\\\t\\\\\\\"Any breakable point in this line.  Just wrap last character.\\\\\\\"\\\\n\\\\t\\\\tbreakableIndex _ lastIndex - 1.\\\\n\\\\t\\\\tlineHeightAtBreak _ lineHeight.\\\\n\\\\t\\\\tbaselineAtBreak _ baseline.\\\\n\\\\t].\\\\n\\\\n\\\\t\\\\\\\"It wasn't a space, but anyway this is where we break the line.\\\\\\\"\\\\n\\\\tline stop: breakableIndex.\\\\n\\\\tpresentationLine stop: breakableIndex.\\\\n\\\\tlineHeight _ lineHeightAtBreak.\\\\n\\\\tbaseline _ baselineAtBreak.\\\\n\\\\t^ true.\\\\n! !\\\\n\\\\n!MultiCompositionScanner methodsFor: 'scanning' stamp: 'tak 12/22/2004 00:59'!\\\\nsetActualFont: aFont\\\\n\\\\t\\\\\\\"Keep track of max height and ascent for auto lineheight\\\\\\\"\\\\n\\\\t| descent |\\\\n\\\\tsuper setActualFont: aFont.\\\\n\\\\t\\\\\\\"'   ', lastIndex printString, '   ' displayAt: (lastIndex * 15)@0.\\\\\\\"\\\\n\\\\tlineHeight == nil\\\\n\\\\t\\\\tifTrue: [descent _ font descent.\\\\n\\\\t\\\\t\\\\t\\\\tbaseline _ font ascent.\\\\n\\\\t\\\\t\\\\t\\\\tlineHeight _ baseline + descent]\\\\n\\\\t\\\\tifFalse: [descent _ lineHeight - baseline max: font descent.\\\\n\\\\t\\\\t\\\\t\\\\tbaseline _ baseline max: font ascent.\\\\n\\\\t\\\\t\\\\t\\\\tlineHeight _ lineHeight max: baseline + descent]! !\\\\n\\\\n\\\\n!MultiCompositionScanner methodsFor: 'stop conditions' stamp: 'yo 1/3/2003 11:56'!\\\\ncolumnBreak\\\\n\\\\n\\\\t\\\\\\\"Answer true. Set up values for the text line interval currently being \\\\n\\\\tcomposed.\\\\\\\"\\\\n\\\\n\\\\tline stop: lastIndex.\\\\n\\\\tpresentationLine stop: lastIndex - numOfComposition.\\\\n\\\\tspaceX _ destX.\\\\n\\\\tline paddingWidth: rightMargin - spaceX.\\\\n\\\\tpresentationLine paddingWidth: rightMargin - spaceX.\\\\n\\\\t^true! !\\\\n\\\\n!MultiCompositionScanner methodsFor: 'stop conditions' stamp: 'yo 1/3/2003 11:56'!\\\\ncr\\\\n\\\\t\\\\\\\"Answer true. Set up values for the text line interval currently being \\\\n\\\\tcomposed.\\\\\\\"\\\\n\\\\n\\\\tline stop: lastIndex.\\\\n\\\\tpresentationLine stop: lastIndex - numOfComposition.\\\\n\\\\tspaceX _ destX.\\\\n\\\\tline paddingWidth: rightMargin - spaceX.\\\\n\\\\tpresentationLine paddingWidth: rightMargin - spaceX.\\\\n\\\\t^true! !\\\\n\\\\n!MultiCompositionScanner methodsFor: 'stop conditions' stamp: 'yo 2/10/2004 23:03'!\\\\nendOfRun\\\\n\\\\t\\\\\\\"Answer true if scanning has reached the end of the paragraph. \\\\n\\\\tOtherwise step conditions (mostly install potential new font) and answer \\\\n\\\\tfalse.\\\\\\\"\\\\n\\\\n\\\\t| runLength |\\\\n\\\\tlastIndex = text size\\\\n\\\\tifTrue:\\\\t[line stop: lastIndex.\\\\n\\\\t\\\\t\\\\tpresentationLine stop: lastIndex - numOfComposition.\\\\n\\\\t\\\\t\\\\tspaceX _ destX.\\\\n\\\\t\\\\t\\\\tline paddingWidth: rightMargin - destX.\\\\n\\\\t\\\\t\\\\tpresentationLine paddingWidth: rightMargin - destX.\\\\n\\\\t\\\\t\\\\t^true]\\\\n\\\\tifFalse:\\\\t[\\\\n\\\\t\\\\t\\\\t\\\\\\\"(text at: lastIndex) charCode = 32 ifTrue: [destX _ destX + spaceWidth].\\\\\\\"\\\\n\\\\t\\\\t\\\\trunLength _ (text runLengthFor: (lastIndex _ lastIndex + 1)).\\\\n\\\\t\\\\t\\\\trunStopIndex _ lastIndex + (runLength - 1).\\\\n\\\\t\\\\t\\\\tself setStopConditions.\\\\n\\\\t\\\\t\\\\t^false]\\\\n! !\\\\n\\\\n!MultiCompositionScanner methodsFor: 'stop conditions' stamp: 'yo 1/3/2003 11:56'!\\\\nplaceEmbeddedObject: anchoredMorph\\\\n\\\\t| descent |\\\\n\\\\t\\\\\\\"Workaround: The following should really use #textAnchorType\\\\\\\"\\\\n\\\\tanchoredMorph relativeTextAnchorPosition ifNotNil:[^true].\\\\n\\\\t(super placeEmbeddedObject: anchoredMorph) ifFalse: [\\\\\\\"It doesn't fit\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"But if it's the first character then leave it here\\\\\\\"\\\\n\\\\t\\\\tlastIndex < line first ifFalse:[\\\\n\\\\t\\\\t\\\\tline stop: lastIndex-1.\\\\n\\\\t\\\\t\\\\t^ false]].\\\\n\\\\tdescent _ lineHeight - baseline.\\\\n\\\\tlineHeight _ lineHeight max: anchoredMorph height.\\\\n\\\\tbaseline _ lineHeight - descent.\\\\n\\\\tline stop: lastIndex.\\\\n\\\\tpresentationLine stop: lastIndex - numOfComposition.\\\\n\\\\t^ true! !\\\\n\\\\n!MultiCompositionScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 21:47'!\\\\nsetFont\\\\n\\\\tsuper setFont.\\\\n\\\\tbreakAtSpace _ false.\\\\n\\\\twantsColumnBreaks == true ifTrue: [\\\\n\\\\t\\\\tstopConditions _ stopConditions copy.\\\\n\\\\t\\\\tstopConditions at: TextComposer characterForColumnBreak asciiValue + 1 put: #columnBreak.\\\\n\\\\t].\\\\n! !\\\\n\\\\n!MultiCompositionScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:57'!\\\\nsetStopConditions\\\\n\\\\t\\\\\\\"Set the font and the stop conditions for the current run.\\\\\\\"\\\\n\\\\t\\\\n\\\\tself setFont! !\\\\n\\\\n!MultiCompositionScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:57'!\\\\ntab\\\\n\\\\t\\\\\\\"Advance destination x according to tab settings in the paragraph's \\\\n\\\\ttextStyle. Answer whether the character has crossed the right edge of \\\\n\\\\tthe composition rectangle of the paragraph.\\\\\\\"\\\\n\\\\n\\\\tdestX _ textStyle\\\\n\\\\t\\\\t\\\\t\\\\tnextTabXFrom: destX leftMargin: leftMargin rightMargin: rightMargin.\\\\n\\\\tdestX > rightMargin ifTrue:\\\\t[^self crossedX].\\\\n\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\t^false\\\\n! !\\\\nMultiCharacterScanner subclass: #MultiDisplayScanner\\\\n\\\\tinstanceVariableNames: 'bitBlt lineY runX foregroundColor backgroundColor fillBlt lineHeight paragraph paragraphColor morphicOffset ignoreColorChanges'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Multilingual-Scanning'!\\\\n\\\\n!MultiDisplayScanner methodsFor: 'MVC-compatibility' stamp: 'yo 1/7/2005 12:15'!\\\\ndisplayLines: linesInterval in: aParagraph clippedBy: visibleRectangle\\\\n\\\\t\\\\\\\"The central display routine. The call on the primitive \\\\n\\\\t(scanCharactersFrom:to:in:rightX:) will be interrupted according to an \\\\n\\\\tarray of stop conditions passed to the scanner at which time the code to \\\\n\\\\thandle the stop condition is run and the call on the primitive continued \\\\n\\\\tuntil a stop condition returns true (which means the line has \\\\n\\\\tterminated).\\\\\\\"\\\\n\\\\t| runLength done stopCondition leftInRun startIndex string lastPos |\\\\n\\\\t\\\\\\\"leftInRun is the # of characters left to scan in the current run;\\\\n\\\\t\\\\twhen 0, it is time to call 'self setStopConditions'\\\\\\\"\\\\n\\\\tmorphicOffset _ 0@0.\\\\n\\\\tleftInRun _ 0.\\\\n\\\\tself initializeFromParagraph: aParagraph clippedBy: visibleRectangle.\\\\n\\\\tignoreColorChanges _ false.\\\\n\\\\tparagraph _ aParagraph.\\\\n\\\\tforegroundColor _ paragraphColor _ aParagraph foregroundColor.\\\\n\\\\tbackgroundColor _ aParagraph backgroundColor.\\\\n\\\\taParagraph backgroundColor isTransparent\\\\n\\\\t\\\\tifTrue: [fillBlt _ nil]\\\\n\\\\t\\\\tifFalse: [fillBlt _ bitBlt copy.  \\\\\\\"Blt to fill spaces, tabs, margins\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tfillBlt sourceForm: nil; sourceOrigin: 0@0.\\\\n\\\\t\\\\t\\\\t\\\\tfillBlt fillColor: aParagraph backgroundColor].\\\\n\\\\trightMargin _ aParagraph rightMarginForDisplay.\\\\n\\\\tlineY _ aParagraph topAtLineIndex: linesInterval first.\\\\n\\\\tbitBlt destForm deferUpdatesIn: visibleRectangle while: [\\\\n\\\\t\\\\tlinesInterval do: \\\\n\\\\t\\\\t\\\\t[:lineIndex | \\\\n\\\\t\\\\t\\\\tleftMargin _ aParagraph leftMarginForDisplayForLine: lineIndex alignment: (alignment ifNil:[textStyle alignment]).\\\\n\\\\t\\\\t\\\\tdestX _ (runX _ leftMargin).\\\\n\\\\t\\\\t\\\\tline _ aParagraph lines at: lineIndex.\\\\n\\\\t\\\\t\\\\tlineHeight _ line lineHeight.\\\\n\\\\t\\\\t\\\\tfillBlt == nil ifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[fillBlt destX: visibleRectangle left destY: lineY\\\\n\\\\t\\\\t\\\\t\\\\t\\\\twidth: visibleRectangle width height: lineHeight; copyBits].\\\\n\\\\t\\\\t\\\\tlastIndex _ line first.\\\\n\\\\t\\\\t\\\\tleftInRun <= 0\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self setStopConditions.  \\\\\\\"also sets the font\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tleftInRun _ text runLengthFor: line first].\\\\n\\\\t\\\\t\\\\tbaselineY _ lineY + line baseline.\\\\n\\\\t\\\\t\\\\tdestY _ baselineY - font ascent.  \\\\\\\"Should have happened in setFont\\\\\\\"\\\\n\\\\t\\\\t\\\\trunLength _ leftInRun.\\\\n\\\\t\\\\t\\\\trunStopIndex _ lastIndex + (runLength - 1) min: line last.\\\\n\\\\t\\\\t\\\\tleftInRun _ leftInRun - (runStopIndex - lastIndex + 1).\\\\n\\\\t\\\\t\\\\tspaceCount _ 0.\\\\n\\\\t\\\\t\\\\tdone _ false.\\\\n\\\\t\\\\t\\\\tstring _ text string.\\\\n\\\\t\\\\t\\\\tself handleIndentation.\\\\n\\\\t\\\\t\\\\t[done] whileFalse:[\\\\n\\\\t\\\\t\\\\t\\\\tstartIndex _ lastIndex.\\\\n\\\\t\\\\t\\\\t\\\\tlastPos _ destX@destY.\\\\n\\\\t\\\\t\\\\t\\\\tstopCondition _ self scanCharactersFrom: lastIndex to: runStopIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tin: string rightX: rightMargin stopConditions: stopConditions\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tkern: kern.\\\\n\\\\t\\\\t\\\\t\\\\tlastIndex >= startIndex ifTrue:[\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tfont displayString: string on: bitBlt \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfrom: startIndex to: lastIndex at: lastPos kern: kern baselineY: baselineY].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"see setStopConditions for stopping conditions for displaying.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tdone _ self perform: stopCondition].\\\\n\\\\t\\\\t\\\\tfillBlt == nil ifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[fillBlt destX: destX destY: lineY width: visibleRectangle right-destX height: lineHeight; copyBits].\\\\n\\\\t\\\\t\\\\tlineY _ lineY + lineHeight]]! !\\\\n\\\\n!MultiDisplayScanner methodsFor: 'MVC-compatibility' stamp: 'yo 3/14/2005 06:48'!\\\\ninitializeFromParagraph: aParagraph clippedBy: clippingRectangle\\\\n\\\\n\\\\tsuper initializeFromParagraph: aParagraph clippedBy: clippingRectangle.\\\\n\\\\tbitBlt _ BitBlt asGrafPort toForm: aParagraph destinationForm.\\\\n\\\\tbitBlt sourceX: 0; width: 0.\\\\t\\\\\\\"Init BitBlt so that the first call to a primitive will not fail\\\\\\\"\\\\n\\\\tbitBlt combinationRule: Form paint.\\\\n\\\\tbitBlt colorMap:\\\\n\\\\t\\\\t(Bitmap with: 0      \\\\\\\"Assumes 1-bit deep fonts\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\twith: (bitBlt destForm pixelValueFor: aParagraph foregroundColor)).\\\\n\\\\tbitBlt clipRect: clippingRectangle.\\\\n! !\\\\n\\\\n\\\\n!MultiDisplayScanner methodsFor: 'multilingual scanning' stamp: 'yo 12/20/2002 11:52'!\\\\nisBreakableAt: index in: sourceString in: encodingClass\\\\n\\\\n\\\\t^ false.\\\\n! !\\\\n\\\\n!MultiDisplayScanner methodsFor: 'multilingual scanning' stamp: 'yo 8/6/2003 05:57'!\\\\nscanMultiCharactersCombiningFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: kernDelta\\\\n\\\\n\\\\t| encoding f nextDestX maxAscii startEncoding char charValue |\\\\n\\\\tlastIndex _ startIndex.\\\\n\\\\tlastIndex > stopIndex ifTrue: [lastIndex _ stopIndex. ^ stops at: EndOfRun].\\\\n\\\\tstartEncoding _ (sourceString at: startIndex) leadingChar.\\\\n\\\\tfont ifNil: [font _ (TextConstants at: #DefaultMultiStyle) fontArray at: 1].\\\\n\\\\t((font isMemberOf: StrikeFontSet) or: [font isKindOf: TTCFontSet]) ifTrue: [\\\\n\\\\t\\\\t[f _ font fontArray at: startEncoding + 1]\\\\n\\\\t\\\\t\\\\ton: Exception do: [:ex | f _ font fontArray at: 1].\\\\n\\\\t\\\\tf ifNil: [ f _ font fontArray at: 1].\\\\n\\\\t\\\\tmaxAscii _ f maxAscii.\\\\n\\\\t\\\\tspaceWidth _ f widthOf: Space.\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tmaxAscii _ font maxAscii.\\\\n\\\\t].\\\\n\\\\n\\\\t[lastIndex <= stopIndex] whileTrue: [\\\\n\\\\t\\\\tencoding _ (sourceString at: lastIndex) leadingChar.\\\\n\\\\t\\\\tencoding ~= startEncoding ifTrue: [lastIndex _ lastIndex - 1. ^ stops at: EndOfRun].\\\\n\\\\t\\\\tchar _ (sourceString at: lastIndex).\\\\n\\\\t\\\\tcharValue _ char charCode.\\\\n\\\\t\\\\tcharValue > maxAscii ifTrue: [charValue _ maxAscii].\\\\n\\\\t\\\\t(encoding = 0 and: [(stopConditions at: charValue + 1) ~~ nil]) ifTrue: [\\\\n\\\\t\\\\t\\\\t^ stops at: charValue + 1\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tnextDestX _ destX + (self widthOf: char inFont: font).\\\\n\\\\t\\\\tnextDestX > rightX ifTrue: [^ stops at: CrossedX].\\\\n\\\\t\\\\tdestX _ nextDestX + kernDelta.\\\\n\\\\t\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\t].\\\\n\\\\tlastIndex _ stopIndex.\\\\n\\\\t^ stops at: EndOfRun! !\\\\n\\\\n\\\\n!MultiDisplayScanner methodsFor: 'scanning' stamp: 'yo 1/7/2005 12:15'!\\\\ndisplayLine: textLine offset: offset leftInRun: leftInRun\\\\n\\\\t\\\\\\\"The call on the primitive (scanCharactersFrom:to:in:rightX:) will be interrupted according to an array of stop conditions passed to the scanner at which time the code to handle the stop condition is run and the call on the primitive continued until a stop condition returns true (which means the line has terminated).  leftInRun is the # of characters left to scan in the current run; when 0, it is time to call setStopConditions.\\\\\\\"\\\\n\\\\t| done stopCondition nowLeftInRun startIndex string lastPos |\\\\n\\\\tline _ textLine.\\\\n\\\\tmorphicOffset _ offset.\\\\n\\\\tlineY _ line top + offset y.\\\\n\\\\tlineHeight _ line lineHeight.\\\\n\\\\trightMargin _ line rightMargin + offset x.\\\\n\\\\tlastIndex _ line first.\\\\n\\\\tleftInRun <= 0 ifTrue: [self setStopConditions].\\\\n\\\\tleftMargin _ (line leftMarginForAlignment: alignment) + offset x.\\\\n\\\\tdestX _ runX _ leftMargin.\\\\n\\\\tfillBlt == nil ifFalse:\\\\n\\\\t\\\\t[\\\\\\\"Not right\\\\\\\"\\\\n\\\\t\\\\tfillBlt destX: line left destY: lineY\\\\n\\\\t\\\\t\\\\twidth: line width left height: lineHeight; copyBits].\\\\n\\\\tlastIndex _ line first.\\\\n\\\\tleftInRun <= 0\\\\n\\\\t\\\\tifTrue: [nowLeftInRun _ text runLengthFor: lastIndex]\\\\n\\\\t\\\\tifFalse: [nowLeftInRun _ leftInRun].\\\\n\\\\tbaselineY _ lineY + line baseline.\\\\n\\\\tdestY _ baselineY - font ascent.\\\\n\\\\trunStopIndex _ lastIndex + (nowLeftInRun - 1) min: line last.\\\\n\\\\tspaceCount _ 0.\\\\n\\\\tdone _ false.\\\\n\\\\tstring _ text string.\\\\n\\\\t[done] whileFalse:[\\\\n\\\\t\\\\tstartIndex _ lastIndex.\\\\n\\\\t\\\\tlastPos _ destX@destY.\\\\n\\\\t\\\\tstopCondition _ self scanCharactersFrom: lastIndex to: runStopIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tin: string rightX: rightMargin stopConditions: stopConditions\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tkern: kern.\\\\n\\\\t\\\\tlastIndex >= startIndex ifTrue:[\\\\n\\\\t\\\\t\\\\tfont displayString: string on: bitBlt \\\\n\\\\t\\\\t\\\\t\\\\tfrom: startIndex to: lastIndex at: lastPos kern: kern baselineY: baselineY].\\\\n\\\\t\\\\t\\\\\\\"see setStopConditions for stopping conditions for displaying.\\\\\\\"\\\\n\\\\t\\\\tdone _ self perform: stopCondition.\\\\n\\\\t\\\\t\\\\\\\"lastIndex > runStopIndex ifTrue: [done _ true].\\\\\\\"\\\\n\\\\t].\\\\n\\\\t^ runStopIndex - lastIndex   \\\\\\\"Number of characters remaining in the current run\\\\\\\"! !\\\\n\\\\n!MultiDisplayScanner methodsFor: 'scanning' stamp: 'lr 1/21/2006 16:01'!\\\\nplaceEmbeddedObject: anchoredMorph\\\\n\\\\tanchoredMorph relativeTextAnchorPosition ifNotNil:[\\\\n\\\\t\\\\tanchoredMorph position: \\\\n\\\\t\\\\t\\\\tanchoredMorph relativeTextAnchorPosition +\\\\n\\\\t\\\\t\\\\t(anchoredMorph owner textBounds origin x @ 0)\\\\n\\\\t\\\\t\\\\t- (0@morphicOffset y) + (0@lineY).\\\\n\\\\t\\\\t^true\\\\n\\\\t].\\\\n\\\\t(super placeEmbeddedObject: anchoredMorph) ifFalse: [^ false].\\\\n\\\\tanchoredMorph isMorph ifTrue: [\\\\n\\\\t\\\\tanchoredMorph position: ((destX - anchoredMorph width)@lineY) - morphicOffset\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tdestY _ lineY.\\\\n\\\\t\\\\tbaselineY _ lineY + anchoredMorph height..\\\\n\\\\t\\\\trunX _ destX.\\\\n\\\\t\\\\tanchoredMorph \\\\n\\\\t\\\\t\\\\tdisplayOn: bitBlt destForm \\\\n\\\\t\\\\t\\\\tat: destX - anchoredMorph width @ destY\\\\n\\\\t\\\\t\\\\tclippingBox: bitBlt clipRect\\\\n\\\\t\\\\t\\\\trule: Form blend\\\\n\\\\t\\\\t\\\\tfillColor: Color white \\\\n\\\\t].\\\\n\\\\t^ true! !\\\\n\\\\n\\\\n!MultiDisplayScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:58'!\\\\ncr\\\\n\\\\t\\\\\\\"When a carriage return is encountered, simply increment the pointer \\\\n\\\\tinto the paragraph.\\\\\\\"\\\\n\\\\n\\\\tlastIndex_ lastIndex + 1.\\\\n\\\\t^false! !\\\\n\\\\n!MultiDisplayScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:58'!\\\\ncrossedX\\\\n\\\\t\\\\\\\"This condition will sometimes be reached 'legally' during display, when, \\\\n\\\\tfor instance the space that caused the line to wrap actually extends over \\\\n\\\\tthe right boundary. This character is allowed to display, even though it \\\\n\\\\tis technically outside or straddling the clipping ectangle since it is in \\\\n\\\\tthe normal case not visible and is in any case appropriately clipped by \\\\n\\\\tthe scanner.\\\\\\\"\\\\n\\\\n\\\\t^ true ! !\\\\n\\\\n!MultiDisplayScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:58'!\\\\nendOfRun\\\\n\\\\t\\\\\\\"The end of a run in the display case either means that there is actually \\\\n\\\\ta change in the style (run code) to be associated with the string or the \\\\n\\\\tend of this line has been reached.\\\\\\\"\\\\n\\\\t| runLength |\\\\n\\\\tlastIndex = line last ifTrue: [^true].\\\\n\\\\trunX _ destX.\\\\n\\\\trunLength _ text runLengthFor: (lastIndex _ lastIndex + 1).\\\\n\\\\trunStopIndex _ lastIndex + (runLength - 1) min: line last.\\\\n\\\\tself setStopConditions.\\\\n\\\\t^ false! !\\\\n\\\\n!MultiDisplayScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:58'!\\\\npaddedSpace\\\\n\\\\t\\\\\\\"Each space is a stop condition when the alignment is right justified. \\\\n\\\\tPadding must be added to the base width of the space according to \\\\n\\\\twhich space in the line this space is and according to the amount of \\\\n\\\\tspace that remained at the end of the line when it was composed.\\\\\\\"\\\\n\\\\n\\\\tspaceCount _ spaceCount + 1.\\\\n\\\\tdestX _ destX + spaceWidth + (line justifiedPadFor: spaceCount).\\\\n\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\t^ false! !\\\\n\\\\n!MultiDisplayScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:58'!\\\\nplainTab\\\\n\\\\t| oldX |\\\\n\\\\toldX _ destX.\\\\n\\\\tsuper plainTab.\\\\n\\\\tfillBlt == nil ifFalse:\\\\n\\\\t\\\\t[fillBlt destX: oldX destY: destY width: destX - oldX height: font height; copyBits]! !\\\\n\\\\n!MultiDisplayScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:58'!\\\\nsetStopConditions\\\\n\\\\t\\\\\\\"Set the font and the stop conditions for the current run.\\\\\\\"\\\\n\\\\t\\\\n\\\\tself setFont.\\\\n\\\\tself setConditionArray: (alignment = Justified ifTrue: [#paddedSpace]).\\\\n\\\\n\\\\\\\"\\\\n\\\\talignment = Justified ifTrue: [\\\\n\\\\t\\\\tstopConditions == DefaultStopConditions \\\\n\\\\t\\\\t\\\\tifTrue:[stopConditions _ stopConditions copy].\\\\n\\\\t\\\\tstopConditions at: Space asciiValue + 1 put: #paddedSpace]\\\\n\\\\\\\"! !\\\\n\\\\n!MultiDisplayScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:58'!\\\\ntab\\\\n\\\\tself plainTab.\\\\n\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!MultiDisplayScanner methodsFor: 'private' stamp: 'yo 1/23/2003 14:40'!\\\\npresentationText: t\\\\n\\\\n\\\\ttext _ t.\\\\n! !\\\\n\\\\n!MultiDisplayScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:58'!\\\\nsetDestForm: df\\\\n\\\\tbitBlt setDestForm: df.! !\\\\n\\\\n!MultiDisplayScanner methodsFor: 'private' stamp: 'yo 1/6/2005 23:06'!\\\\nsetFont \\\\n\\\\tforegroundColor _ paragraphColor.\\\\n\\\\tsuper setFont.  \\\\\\\"Sets font and emphasis bits, and maybe foregroundColor\\\\\\\"\\\\n\\\\tfont installOn: bitBlt foregroundColor: foregroundColor backgroundColor: Color transparent.\\\\n\\\\ttext ifNotNil:[\\\\n\\\\t\\\\tbaselineY _ lineY + line baseline.\\\\n\\\\t\\\\tdestY _ baselineY - font ascent].\\\\n! !\\\\n\\\\n!MultiDisplayScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:58'!\\\\nsetPort: aBitBlt\\\\n\\\\t\\\\\\\"Install the BitBlt to use\\\\\\\"\\\\n\\\\tbitBlt _ aBitBlt.\\\\n\\\\tbitBlt sourceX: 0; width: 0.\\\\t\\\\\\\"Init BitBlt so that the first call to a primitive will not fail\\\\\\\"\\\\n\\\\tbitBlt sourceForm: nil. \\\\\\\"Make sure font installation won't be confused\\\\\\\"\\\\n! !\\\\n\\\\n!MultiDisplayScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:58'!\\\\ntext: t textStyle: ts foreground: foreColor background: backColor fillBlt: blt ignoreColorChanges: shadowMode\\\\n\\\\ttext _ t.\\\\n\\\\ttextStyle _ ts. \\\\n\\\\tforegroundColor _ paragraphColor _ foreColor.\\\\n\\\\t(backgroundColor _ backColor) isTransparent ifFalse:\\\\n\\\\t\\\\t[fillBlt _ blt.\\\\n\\\\t\\\\tfillBlt fillColor: backgroundColor].\\\\n\\\\tignoreColorChanges _ shadowMode! !\\\\n\\\\n!MultiDisplayScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:58'!\\\\ntextColor: textColor\\\\n\\\\tignoreColorChanges ifTrue: [^ self].\\\\n\\\\tforegroundColor _ textColor! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMultiDisplayScanner class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MultiDisplayScanner class methodsFor: 'queries' stamp: 'yo 12/18/2002 13:58'!\\\\ndefaultFont\\\\n\\\\t^ TextStyle defaultFont! !\\\\nNewParagraph subclass: #MultiNewParagraph\\\\n\\\\tinstanceVariableNames: 'presentationText presentationLines'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: 'TextConstants'\\\\n\\\\tcategory: 'Multilingual-Scanning'!\\\\n\\\\n!MultiNewParagraph methodsFor: 'as yet unclassified' stamp: 'yo 1/23/2003 16:09'!\\\\ndisplayOn: aCanvas using: displayScanner at: somePosition\\\\n\\\\t\\\\\\\"Send all visible lines to the displayScanner for display\\\\\\\"\\\\n\\\\n\\\\t| visibleRectangle offset leftInRun line |\\\\n\\\\tvisibleRectangle _ aCanvas clipRect.\\\\n\\\\toffset _ somePosition - positionWhenComposed.\\\\n\\\\tleftInRun _ 0.\\\\n\\\\t(self lineIndexForPoint: visibleRectangle topLeft)\\\\n\\\\t\\\\tto: (self lineIndexForPoint: visibleRectangle bottomRight)\\\\n\\\\t\\\\tdo: [:i | line _ lines at: i.\\\\n\\\\t\\\\t\\\\tself displaySelectionInLine: line on: aCanvas.\\\\n\\\\t\\\\t\\\\tline first <= line last ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[leftInRun _ displayScanner displayLine: line\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\toffset: offset leftInRun: leftInRun]].\\\\n! !\\\\n\\\\n!MultiNewParagraph methodsFor: 'as yet unclassified' stamp: 'yo 1/23/2003 22:33'!\\\\ndisplayOnTest: aCanvas using: displayScanner at: somePosition\\\\n\\\\t\\\\\\\"Send all visible lines to the displayScanner for display\\\\\\\"\\\\n\\\\n\\\\t| visibleRectangle offset leftInRun line |\\\\n\\\\t(presentationText isNil or: [presentationLines isNil]) ifTrue: [\\\\n\\\\t\\\\t^ self displayOn: aCanvas using: displayScanner at: somePosition.\\\\n\\\\t].\\\\n\\\\tvisibleRectangle _ aCanvas clipRect.\\\\n\\\\toffset _ somePosition - positionWhenComposed.\\\\n\\\\tleftInRun _ 0.\\\\n\\\\t(self lineIndexForPoint: visibleRectangle topLeft)\\\\n\\\\t\\\\tto: (self lineIndexForPoint: visibleRectangle bottomRight)\\\\n\\\\t\\\\tdo: [:i | line _ presentationLines at: i.\\\\n\\\\t\\\\t\\\\tself displaySelectionInLine: line on: aCanvas.\\\\n\\\\t\\\\t\\\\tline first <= line last ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[leftInRun _ displayScanner displayLine: line\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\toffset: offset leftInRun: leftInRun]].\\\\n! !\\\\n\\\\n!MultiNewParagraph methodsFor: 'as yet unclassified' stamp: 'yo 1/23/2003 12:53'!\\\\nmultiComposeLinesFrom: start to: stop delta: delta into: lineColl priorLines: priorLines\\\\n\\\\tatY: startingY\\\\n\\\\t\\\\\\\"While the section from start to stop has changed, composition may ripple all the way to the end of the text.  However in a rectangular container, if we ever find a line beginning with the same character as before (ie corresponding to delta in the old lines), then we can just copy the old lines from there to the end of the container, with adjusted indices and y-values\\\\\\\"\\\\n\\\\n\\\\t| newResult composer presentationInfo |\\\\n\\\\n\\\\tcomposer _ MultiTextComposer new.\\\\n\\\\tpresentationLines _ nil.\\\\n\\\\tpresentationText _ nil.\\\\n\\\\tnewResult _ composer\\\\n\\\\t\\\\tmultiComposeLinesFrom: start \\\\n\\\\t\\\\tto: stop \\\\n\\\\t\\\\tdelta: delta \\\\n\\\\t\\\\tinto: lineColl \\\\n\\\\t\\\\tpriorLines: priorLines\\\\n\\\\t\\\\tatY: startingY\\\\n\\\\t\\\\ttextStyle: textStyle \\\\n\\\\t\\\\ttext: text \\\\n\\\\t\\\\tcontainer: container\\\\n\\\\t\\\\twantsColumnBreaks: wantsColumnBreaks == true.\\\\n\\\\tlines _ newResult first asArray.\\\\n\\\\tmaxRightX _ newResult second.\\\\n\\\\tpresentationInfo _ composer getPresentationInfo.\\\\n\\\\tpresentationLines _ presentationInfo first asArray.\\\\n\\\\tpresentationText _ presentationInfo second.\\\\n\\\\t\\\\\\\"maxRightX printString displayAt: 0@0.\\\\\\\"\\\\n\\\\t^maxRightX\\\\n! !\\\\n\\\\n!MultiNewParagraph methodsFor: 'as yet unclassified' stamp: 'yo 1/23/2003 17:31'!\\\\npresentationLines\\\\n\\\\n\\\\t^ presentationLines.\\\\n! !\\\\n\\\\n!MultiNewParagraph methodsFor: 'as yet unclassified' stamp: 'yo 1/23/2003 17:31'!\\\\npresentationText\\\\n\\\\n\\\\t^ presentationText.\\\\n! !\\\\nFormCanvas subclass: #MultiResolutionCanvas\\\\n\\\\tinstanceVariableNames: 'deferredMorphs'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-Support'!\\\\n\\\\n!MultiResolutionCanvas methodsFor: 'as yet unclassified' stamp: 'RAA 12/4/2000 12:00'!\\\\ndeferredMorphs\\\\n\\\\n\\\\t^deferredMorphs! !\\\\n\\\\n!MultiResolutionCanvas methodsFor: 'as yet unclassified' stamp: 'RAA 12/4/2000 11:58'!\\\\ndeferredMorphs: aCollection\\\\n\\\\n\\\\tdeferredMorphs _ aCollection! !\\\\n\\\\n!MultiResolutionCanvas methodsFor: 'as yet unclassified' stamp: 'RAA 12/17/2000 13:25'!\\\\ninitializeFrom: aFormCanvas\\\\n\\\\n\\\\torigin _ aFormCanvas origin.\\\\n\\\\tclipRect _ aFormCanvas privateClipRect.\\\\n\\\\tform _ aFormCanvas form.\\\\n\\\\tport _ aFormCanvas privatePort.\\\\n\\\\tshadowColor _ aFormCanvas shadowColor.\\\\n! !\\\\n\\\\n\\\\n!MultiResolutionCanvas methodsFor: 'drawing-general' stamp: 'RAA 12/4/2000 12:00'!\\\\nfullDraw: aMorph\\\\n\\\\n\\\\taMorph canDrawAtHigherResolution ifTrue: [\\\\n\\\\t\\\\tdeferredMorphs ifNil: [deferredMorphs _ OrderedCollection new].\\\\n\\\\t\\\\tdeferredMorphs add: aMorph.\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tsuper fullDraw: aMorph\\\\n\\\\t].! !\\\\nTTCFont subclass: #MultiTTCFont\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Multilingual-Display'!\\\\n\\\\n!MultiTTCFont methodsFor: 'as yet unclassified' stamp: 'yo 12/10/2002 18:08'!\\\\naccess: char at: index\\\\n\\\\n\\\\t| wcache entry |\\\\n\\\\twcache _ self cache.\\\\n\\\\tentry _ wcache at: index.\\\\n\\\\twcache replaceFrom: index to: wcache size - 1 with: wcache startingAt: index + 1.\\\\n\\\\twcache at: wcache size put: entry.\\\\n! !\\\\n\\\\n!MultiTTCFont methodsFor: 'as yet unclassified' stamp: 'yo 12/10/2002 18:09'!\\\\nat: char put: form\\\\n\\\\n\\\\t| wcache |\\\\n\\\\twcache _ self cache.\\\\n\\\\twcache replaceFrom: 1 to: wcache size - 1 with: wcache startingAt: 2.\\\\n\\\\twcache at: wcache size\\\\n\\\\t\\\\tput: (Array with: char asciiValue with: foregroundColor with: form).\\\\n! !\\\\n\\\\n!MultiTTCFont methodsFor: 'as yet unclassified' stamp: 'yo 12/10/2002 18:27'!\\\\nflushCache\\\\n\\\\n\\\\tcache at: 1 put: ((1 to: 128) collect: [:i | Array with: -1 with: nil with: nil]).\\\\n! !\\\\n\\\\n!MultiTTCFont methodsFor: 'as yet unclassified' stamp: 'yo 12/10/2002 21:04'!\\\\nformOf: char\\\\n\\\\n\\\\t| newForm |\\\\n\\\\tself hasCached: char ifTrue: [:form :index |\\\\n\\\\t\\\\tself access: char at: index.\\\\n\\\\t\\\\t^ form.\\\\n\\\\t].\\\\n\\\\n\\\\tnewForm _ self computeForm: char.\\\\n\\\\tself at: char put: newForm.\\\\n\\\\t^ newForm.\\\\n! !\\\\n\\\\n!MultiTTCFont methodsFor: 'as yet unclassified' stamp: 'yo 1/7/2005 11:09'!\\\\nglyphInfoOf: char into: glyphInfoArray\\\\n\\\\n\\\\t| newForm |\\\\n\\\\tself hasCached: char ifTrue: [:form :index |\\\\n\\\\t\\\\tself access: char at: index.\\\\n\\\\t\\\\tglyphInfoArray at: 1 put: form;\\\\n\\\\t\\\\t\\\\tat: 2 put: 0;\\\\n\\\\t\\\\t\\\\tat: 3 put: form width;\\\\n\\\\t\\\\t\\\\tat: 4 put: (self ascentOf: char);\\\\n\\\\t\\\\t\\\\tat: 5 put: self.\\\\n\\\\t\\\\t^ glyphInfoArray.\\\\n\\\\t].\\\\n\\\\n\\\\tnewForm _ self computeForm: char.\\\\n\\\\tself at: char put: newForm.\\\\n\\\\n\\\\tglyphInfoArray at: 1 put: newForm;\\\\n\\\\t\\\\tat: 2 put: 0;\\\\n\\\\t\\\\tat: 3 put: newForm width;\\\\n\\\\t\\\\tat: 4 put: (self ascentOf: char);\\\\n\\\\t\\\\tat: 5 put: self.\\\\n\\\\t^ glyphInfoArray.\\\\n! !\\\\n\\\\n!MultiTTCFont methodsFor: 'as yet unclassified' stamp: 'yo 12/10/2002 18:39'!\\\\nhasCached: char ifTrue: twoArgBlock\\\\n\\\\n\\\\t| value elem |\\\\n\\\\tvalue _ char asciiValue.\\\\n\\\\n\\\\tself cache size to: 1 by: -1 do: [:i |\\\\n\\\\t\\\\telem _ self cache at: i.\\\\n\\\\t\\\\t(elem first = value and: [elem second = foregroundColor]) ifTrue: [\\\\n\\\\t\\\\t\\\\t^ twoArgBlock value: elem third value: i.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\t^ false.\\\\n! !\\\\n\\\\n!MultiTTCFont methodsFor: 'as yet unclassified' stamp: 'yo 12/29/2003 15:01'!\\\\nisTTCFont\\\\n\\\\t^true! !\\\\n\\\\n!MultiTTCFont methodsFor: 'as yet unclassified' stamp: 'yo 12/10/2002 18:30'!\\\\nwidthOf: char\\\\n\\\\n\\\\t\\\\\\\"This method cannot use #formOf: because formOf: discriminates the color and causes unnecessary bitmap creation.\\\\\\\"\\\\n\\\\n\\\\t| newForm |\\\\n\\\\tself hasCached: char ifTrue: [:form :index |\\\\n\\\\t\\\\tself access: char at: index.\\\\n\\\\t\\\\t^ form width.\\\\n\\\\t].\\\\n\\\\n\\\\tnewForm _ self computeForm: char.\\\\n\\\\tself at: char put: newForm.\\\\n\\\\t^ newForm width.\\\\n\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMultiTTCFont class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MultiTTCFont class methodsFor: 'as yet unclassified' stamp: 'yo 12/10/2002 18:34'!\\\\ncacheAllNil\\\\n\\\\\\\"\\\\n\\\\tself cacheAllNil\\\\n\\\\\\\"\\\\n\\\\tself allInstances do: [:inst |\\\\n\\\\t\\\\tinst cache do: [:e |\\\\n\\\\t\\\\t\\\\te third ifNotNil: [^ false].\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\n\\\\t^ true.\\\\n! !\\\\nTextComposer subclass: #MultiTextComposer\\\\n\\\\tinstanceVariableNames: 'presentation presentationLines'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: 'TextConstants'\\\\n\\\\tcategory: 'Multilingual-Scanning'!\\\\n\\\\n!MultiTextComposer methodsFor: 'as yet unclassified' stamp: 'yo 1/23/2003 12:53'!\\\\ncomposeEachRectangleIn: rectangles\\\\n\\\\n\\\\t| myLine lastChar |\\\\n\\\\n\\\\t1 to: rectangles size do: [:i | \\\\n\\\\t\\\\tcurrCharIndex <= theText size ifFalse: [^false].\\\\n\\\\t\\\\tmyLine _ scanner \\\\n\\\\t\\\\t\\\\tcomposeFrom: currCharIndex \\\\n\\\\t\\\\t\\\\tinRectangle: (rectangles at: i)\\\\t\\\\t\\\\t\\\\t\\\\n\\\\t\\\\t\\\\tfirstLine: isFirstLine \\\\n\\\\t\\\\t\\\\tleftSide: i=1 \\\\n\\\\t\\\\t\\\\trightSide: i=rectangles size.\\\\n\\\\t\\\\tlines addLast: myLine.\\\\n\\\\t\\\\tpresentationLines addLast: scanner getPresentationLine.\\\\n\\\\t\\\\tpresentation ifNil: [presentation _ scanner getPresentation]\\\\n\\\\t\\\\t\\\\tifNotNil: [presentation _ presentation, scanner getPresentation].\\\\n\\\\t\\\\tactualHeight _ actualHeight max: myLine lineHeight.  \\\\\\\"includes font changes\\\\\\\"\\\\n\\\\t\\\\tcurrCharIndex _ myLine last + 1.\\\\n\\\\t\\\\tlastChar _ theText at: myLine last.\\\\n\\\\t\\\\tlastChar = Character cr ifTrue: [^#cr].\\\\n\\\\t\\\\twantsColumnBreaks ifTrue: [\\\\n\\\\t\\\\t\\\\tlastChar = TextComposer characterForColumnBreak ifTrue: [^#columnBreak].\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\t^false! !\\\\n\\\\n!MultiTextComposer methodsFor: 'as yet unclassified' stamp: 'yo 1/23/2003 12:53'!\\\\ngetPresentationInfo\\\\n\\\\n\\\\t^ Array with: presentationLines with: presentation.\\\\n! !\\\\n\\\\n!MultiTextComposer methodsFor: 'as yet unclassified' stamp: 'yo 1/16/2003 17:30'!\\\\nmultiComposeLinesFrom: argStart to: argStop delta: argDelta into: argLinesCollection priorLines: argPriorLines atY: argStartY textStyle: argTextStyle text: argText container: argContainer wantsColumnBreaks: argWantsColumnBreaks\\\\n\\\\n\\\\twantsColumnBreaks _ argWantsColumnBreaks.\\\\n\\\\tlines _ argLinesCollection.\\\\n\\\\tpresentationLines _ argLinesCollection copy.\\\\n\\\\ttheTextStyle _ argTextStyle.\\\\n\\\\ttheText _ argText.\\\\n\\\\ttheContainer _ argContainer.\\\\n\\\\tdeltaCharIndex _ argDelta.\\\\n\\\\tcurrCharIndex _ startCharIndex _ argStart.\\\\n\\\\tstopCharIndex _ argStop.\\\\n\\\\tprevLines _ argPriorLines.\\\\n\\\\tcurrentY _ argStartY.\\\\n\\\\tdefaultLineHeight _ theTextStyle lineGrid.\\\\n\\\\tmaxRightX _ theContainer left.\\\\n\\\\tpossibleSlide _ stopCharIndex < theText size and: [theContainer isMemberOf: Rectangle].\\\\n\\\\tnowSliding _ false.\\\\n\\\\tprevIndex _ 1.\\\\n\\\\tscanner _ MultiCompositionScanner new text: theText textStyle: theTextStyle.\\\\n\\\\tscanner wantsColumnBreaks: wantsColumnBreaks.\\\\n\\\\tisFirstLine _ true.\\\\n\\\\tself composeAllLines.\\\\n\\\\tisFirstLine ifTrue: [\\\\\\\"No space in container or empty text\\\\\\\"\\\\n\\\\t\\\\tself \\\\n\\\\t\\\\t\\\\taddNullLineWithIndex: startCharIndex\\\\n\\\\t\\\\t\\\\tandRectangle: (theContainer topLeft extent: 0@defaultLineHeight)\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tself fixupLastLineIfCR\\\\n\\\\t].\\\\n\\\\t^{lines asArray. maxRightX}\\\\n\\\\n! !\\\\nLazyListMorph subclass: #MulticolumnLazyListMorph\\\\n\\\\tinstanceVariableNames: 'columnWidths'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Widgets'!\\\\n!MulticolumnLazyListMorph commentStamp: '<historical>' prior: 0!\\\\nA variant of LazyListMorph that can display multi-column lists.!\\\\n\\\\n\\\\n!MulticolumnLazyListMorph methodsFor: 'as yet unclassified' stamp: 'ls 5/17/2001 21:23'!\\\\ngetListItem: index\\\\n\\\\t^listSource getListRow: index! !\\\\n\\\\n!MulticolumnLazyListMorph methodsFor: 'as yet unclassified' stamp: 'ls 5/18/2001 16:43'!\\\\nlistChanged\\\\n\\\\tcolumnWidths := nil.\\\\n\\\\tsuper listChanged! !\\\\n\\\\n\\\\n!MulticolumnLazyListMorph methodsFor: 'drawing' stamp: 'nk 1/10/2004 16:19'!\\\\ndisplay: items atRow: row on: canvas \\\\n\\\\t\\\\\\\"display the specified item, which is on the specified row; for Multicolumn \\\\n\\\\tlists, items will be a list of strings\\\\\\\"\\\\n\\\\t| drawBounds |\\\\n\\\\tdrawBounds := self drawBoundsForRow: row.\\\\n\\\\tdrawBounds := drawBounds intersect: self bounds.\\\\n\\\\titems\\\\n\\\\t\\\\twith: (1 to: items size)\\\\n\\\\t\\\\tdo: [:item :index | \\\\n\\\\t\\\\t\\\\t\\\\\\\"move the bounds to the right at each step\\\\\\\"\\\\n\\\\t\\\\t\\\\tindex > 1\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [drawBounds := drawBounds left: drawBounds left + 6\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t+ (columnWidths at: index - 1)].\\\\n\\\\t\\\\t\\\\titem isText\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [canvas\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdrawString: item\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tin: drawBounds\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfont: (font\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\temphasized: (item emphasisAt: 1))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcolor: (self colorForRow: row)]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [canvas\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdrawString: item\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tin: drawBounds\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfont: font\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcolor: (self colorForRow: row)]]! !\\\\n\\\\n!MulticolumnLazyListMorph methodsFor: 'drawing' stamp: 'ls 5/17/2001 21:58'!\\\\ndrawOn: aCanvas\\\\n        self getListSize = 0 ifTrue:[ ^self ].\\\\n\\\\n        self setColumnWidthsFor: aCanvas.\\\\n\\\\n        super drawOn: aCanvas! !\\\\n\\\\n!MulticolumnLazyListMorph methodsFor: 'drawing' stamp: 'sps 3/23/2004 15:51'!\\\\nsetColumnWidthsFor: aCanvas\\\\n        | row topRow bottomRow |\\\\n        \\\\\\\"set columnWidths for drawing on the specified canvas\\\\\\\"\\\\n\\\\t\\\\tcolumnWidths ifNil: [\\\\n\\\\t\\\\tcolumnWidths := (self item: 1) collect: [ :ignored | 0 ]. ].\\\\n\\\\ttopRow := (self topVisibleRowForCanvas: aCanvas) max: 1.\\\\n\\\\tbottomRow :=  (self bottomVisibleRowForCanvas: aCanvas) max: 1.\\\\n\\\\ttopRow > bottomRow ifTrue: [ ^ self ].\\\\n\\\\ttopRow to: bottomRow do: [ :rowIndex |\\\\n                row := self item: rowIndex.\\\\n                columnWidths := columnWidths with: row collect: [ :currentWidth :item |\\\\n\\\\t\\\\t\\\\t\\\\t| widthOfItem |\\\\n\\\\t\\\\t\\\\t\\\\twidthOfItem := (font widthOfStringOrText: item).\\\\n\\\\t\\\\t\\\\t\\\\twidthOfItem > currentWidth\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [ self changed.  widthOfItem ]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [ currentWidth ] ] ]! !\\\\n\\\\n\\\\n!MulticolumnLazyListMorph methodsFor: 'scroll range' stamp: 'sps 4/2/2004 12:16'!\\\\nhUnadjustedScrollRange\\\\n\\\\\\\"multi column list morphs don't use hScrollbars\\\\\\\"\\\\n\\\\n\\\\t^0\\\\n\\\\n! !\\\\n\\\\n!MulticolumnLazyListMorph methodsFor: 'scroll range' stamp: 'ls 4/17/2004 12:21'!\\\\nwidthToDisplayItem: item\\\\n\\\\t| widths |\\\\n\\\\twidths := item collect: [ :each | super widthToDisplayItem: each ].\\\\n\\\\t^widths sum + (10 * (widths size - 1))   \\\\\\\"add in space between the columns\\\\\\\"\\\\n! !\\\\nSketchMorph subclass: #MultiuserTinyPaint\\\\n\\\\tinstanceVariableNames: 'drawState'\\\\n\\\\tclassVariableNames: 'LastMouseIndex PenColorIndex PenIndex PenSizeIndex'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-AdditionalWidgets'!\\\\n!MultiuserTinyPaint commentStamp: '<historical>' prior: 0!\\\\nA very simple paint program that handles multiple users (hands).\\\\nEach user has their own brush size and color.\\\\n!\\\\n\\\\n\\\\n!MultiuserTinyPaint methodsFor: 'event handling' stamp: 'jm 11/4/97 07:15'!\\\\nhandlesMouseDown: evt\\\\n\\\\n\\\\t^ true\\\\n! !\\\\n\\\\n!MultiuserTinyPaint methodsFor: 'event handling' stamp: 'jm 11/4/97 07:15'!\\\\nmouseDown: evt\\\\n\\\\n\\\\t| state |\\\\n\\\\t(drawState includesKey: evt hand) ifFalse: [self createDrawStateFor: evt hand].\\\\n\\\\tstate _ drawState at: evt hand.\\\\n\\\\tstate at: LastMouseIndex put: evt cursorPoint.\\\\n! !\\\\n\\\\n!MultiuserTinyPaint methodsFor: 'event handling' stamp: 'jm 11/4/97 07:15'!\\\\nmouseMove: evt\\\\n\\\\n\\\\t| state lastP p pen |\\\\n\\\\tstate _ drawState at: evt hand ifAbsent: [^ self].\\\\n\\\\tlastP _ state at: LastMouseIndex.\\\\n\\\\tp _ evt cursorPoint.\\\\n\\\\tp = lastP ifTrue: [^ self].\\\\n\\\\n\\\\tpen _ state at: PenIndex.\\\\n\\\\tpen drawFrom: lastP - bounds origin to: p - bounds origin.\\\\n\\\\tself invalidRect: (\\\\n\\\\t\\\\t((lastP min: p) - pen sourceForm extent) corner:\\\\n\\\\t\\\\t((lastP max: p) + pen sourceForm extent)).\\\\n\\\\tstate at: LastMouseIndex put: p.\\\\n! !\\\\n\\\\n\\\\n!MultiuserTinyPaint methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:29'!\\\\ndefaultColor\\\\n\\\\t\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color veryVeryLightGray! !\\\\n\\\\n!MultiuserTinyPaint methodsFor: 'initialization' stamp: 'dgd 2/14/2003 21:52'!\\\\ninitialize\\\\n\\\\t\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\n\\\\tdrawState _ IdentityDictionary new.\\\\n\\\\tself clear! !\\\\n\\\\n\\\\n!MultiuserTinyPaint methodsFor: 'menu' stamp: 'dgd 8/30/2003 21:55'!\\\\naddCustomMenuItems: aCustomMenu hand: aHandMorph\\\\n\\\\n\\\\tsuper addCustomMenuItems: aCustomMenu hand: aHandMorph.\\\\n\\\\taCustomMenu add: 'clear' translated action: #clear.\\\\n\\\\taCustomMenu add: 'pen color' translated action: #setPenColor:.\\\\n\\\\taCustomMenu add: 'pen size' translated action: #setPenSize:.\\\\n\\\\\\\"\\\\taCustomMenu add: 'fill' translated action: #fill:.\\\\\\\"\\\\n! !\\\\n\\\\n!MultiuserTinyPaint methodsFor: 'menu' stamp: 'jm 11/4/97 07:15'!\\\\nbrushColor: aColor hand: hand\\\\n\\\\n\\\\t| state |\\\\n\\\\t(drawState includesKey: hand) ifFalse: [self createDrawStateFor: hand].\\\\n\\\\tstate _ drawState at: hand.\\\\n\\\\t(state at: PenIndex) color: aColor.\\\\n\\\\tstate at: PenColorIndex put: aColor.\\\\n! !\\\\n\\\\n!MultiuserTinyPaint methodsFor: 'menu' stamp: 'jm 11/4/97 07:15'!\\\\nclear\\\\n\\\\n\\\\t| newPen |\\\\n\\\\tself form: ((Form extent: 400@300 depth: 8) fillColor: color).\\\\n\\\\tdrawState do: [:state |\\\\n\\\\t\\\\tnewPen _ Pen newOnForm: originalForm.\\\\n\\\\t\\\\tnewPen roundNib: (state at: PenSizeIndex).\\\\n\\\\t\\\\tnewPen color: (state at: PenColorIndex).\\\\n\\\\t\\\\tstate at: PenIndex put: newPen].\\\\n! !\\\\n\\\\n!MultiuserTinyPaint methodsFor: 'menu' stamp: 'bf 1/5/2000 19:12'!\\\\nfill: evt\\\\n\\\\n\\\\t| state fillPt |\\\\n\\\\t(drawState includesKey: evt hand) ifFalse: [self createDrawStateFor: evt hand].\\\\n\\\\tstate _ drawState at: evt hand.\\\\n\\\\n\\\\tCursor blank show.\\\\n\\\\tCursor crossHair showWhile:\\\\n\\\\t\\\\t[fillPt _ Sensor waitButton - self position].\\\\n\\\\toriginalForm shapeFill: (state at: PenColorIndex) interiorPoint: fillPt.\\\\n\\\\tself changed.\\\\n! !\\\\n\\\\n!MultiuserTinyPaint methodsFor: 'menu' stamp: 'jm 9/26/97 14:47'!\\\\npenSize: anInteger hand: hand\\\\n\\\\n\\\\t| state |\\\\n\\\\t(drawState includesKey: hand) ifFalse: [self createDrawStateFor: hand].\\\\n\\\\tstate _ drawState at: hand.\\\\n\\\\tstate at: PenSizeIndex put: anInteger.\\\\n\\\\t(state at: PenIndex) roundNib: anInteger.\\\\n! !\\\\n\\\\n!MultiuserTinyPaint methodsFor: 'menu' stamp: 'ar 10/5/2000 18:52'!\\\\nsetPenColor: evt\\\\n\\\\t| state |\\\\n\\\\t(drawState includesKey: evt hand) ifFalse: [self createDrawStateFor: evt hand].\\\\n\\\\tstate _ drawState at: evt hand.\\\\n\\\\tself changeColorTarget: self selector: #brushColor:hand: originalColor: (state at: PenColorIndex) hand: evt hand! !\\\\n\\\\n!MultiuserTinyPaint methodsFor: 'menu' stamp: 'RAA 6/12/2000 09:07'!\\\\nsetPenSize: evt\\\\n\\\\n\\\\t| menu sizes |\\\\n\\\\tmenu _ MenuMorph new.\\\\n\\\\tsizes _ (0 to: 5), (6 to: 12 by: 2), (15 to: 40 by: 5).\\\\n\\\\tsizes do: [:w |\\\\n\\\\t\\\\tmenu add: w printString\\\\n\\\\t\\\\t\\\\ttarget: self\\\\n\\\\t\\\\t\\\\tselector: #penSize:hand:\\\\n\\\\t\\\\t\\\\targumentList: (Array with: w with: evt hand)].\\\\n\\\\n\\\\tmenu popUpEvent: evt in: self world! !\\\\n\\\\n\\\\n!MultiuserTinyPaint methodsFor: 'private' stamp: 'jm 11/4/97 07:15'!\\\\ncreateDrawStateFor: aHand\\\\n\\\\n\\\\t| pen state |\\\\n\\\\tpen _ Pen newOnForm: originalForm.\\\\n\\\\tstate _ Array new: 4.\\\\n\\\\tstate at: PenIndex put: pen.\\\\n\\\\tstate at: PenSizeIndex put: 3.\\\\n\\\\tstate at: PenColorIndex put: Color red.\\\\n\\\\tstate at: LastMouseIndex put: nil.\\\\n\\\\tdrawState at: aHand put: state.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMultiuserTinyPaint class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MultiuserTinyPaint class methodsFor: 'class initialization' stamp: 'jm 11/4/97 07:15'!\\\\ninitialize\\\\n\\\\t\\\\\\\"MultiuserTinyPaint initialize\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"indices into the state array for a given hand\\\\\\\"\\\\n\\\\tPenIndex _ 1.\\\\n\\\\tPenSizeIndex _ 2.\\\\n\\\\tPenColorIndex _ 3.\\\\n\\\\tLastMouseIndex _ 4.\\\\n! !\\\\nObject subclass: #Mutex\\\\n\\\\tinstanceVariableNames: 'semaphore owner'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Kernel-Processes'!\\\\n!Mutex commentStamp: '<historical>' prior: 0!\\\\nA Mutex is a light-weight MUTual EXclusion object being used when two or more processes need to access a shared resource concurrently. A Mutex grants ownership to a single process and will suspend any other process trying to aquire the mutex while in use. Waiting processes are granted access to the mutex in the order the access was requested.\\\\n\\\\nInstance variables:\\\\n\\\\tsemaphore\\\\t<Semaphore>\\\\t\\\\tThe (primitive) semaphore used for synchronization.\\\\n\\\\towner\\\\t\\\\t<Process>\\\\t\\\\tThe process owning the mutex.!\\\\n\\\\n\\\\n!Mutex methodsFor: 'initialize' stamp: 'das 11/3/2005 22:53'!\\\\ninitialize\\\\n\\\\tsemaphore := Semaphore forMutualExclusion.! !\\\\n\\\\n\\\\n!Mutex methodsFor: 'mutual exclusion' stamp: 'das 11/3/2005 22:53'!\\\\ncritical: aBlock\\\\n\\\\t\\\\\\\"Evaluate aBlock protected by the receiver.\\\\\\\"\\\\n\\\\t| activeProcess |\\\\n\\\\tactiveProcess := Processor activeProcess.\\\\n\\\\tactiveProcess == owner ifTrue:[^aBlock value].\\\\n\\\\t^semaphore critical:[\\\\n\\\\t\\\\towner := activeProcess.\\\\n\\\\t\\\\taBlock ensure:[owner := nil]].! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMutex class\\\\n\\\\tinstanceVariableNames: ''!\\\\nObject subclass: #MutexSet\\\\n\\\\tinstanceVariableNames: 'array'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Kernel-Processes'!\\\\n!MutexSet commentStamp: '<historical>' prior: 0!\\\\nA MutexSet helps with aquiring a set of mutexes.!\\\\n\\\\n\\\\n!MutexSet methodsFor: 'initialize' stamp: 'das 11/3/2005 22:54'!\\\\nwithAll: mutexList\\\\n\\\\tarray := mutexList.! !\\\\n\\\\n\\\\n!MutexSet methodsFor: 'mutual exclusion' stamp: 'das 11/3/2005 22:54'!\\\\ncritical: aBlock\\\\n\\\\t\\\\\\\"Evaluate aBlock aquiring all mutexes\\\\\\\"\\\\n\\\\t^self pvtCritical: aBlock startingAt: 1! !\\\\n\\\\n\\\\n!MutexSet methodsFor: 'private' stamp: 'das 11/3/2005 22:54'!\\\\npvtCritical: aBlock startingAt: index\\\\n\\\\t| mutex |\\\\n\\\\tindex > array size ifTrue:[^aBlock value].\\\\n\\\\tmutex := array at: index.\\\\n\\\\t^mutex critical:[self pvtCritical: aBlock startingAt: index+1].! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMutexSet class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MutexSet class methodsFor: 'instance creation' stamp: 'das 11/3/2005 22:54'!\\\\nwithAll: mutexList\\\\n\\\\t^self new withAll: mutexList! !\\\\nAppRegistry subclass: #MvcTextEditor\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Applications'!\\\\n!MvcTextEditor commentStamp: 'tween 8/27/2004 12:24' prior: 0!\\\\nA subclass of AppRegistry which allows the user, or Browser add-ons, to control which class is used when creating the code editing view in mvc Browsers!\\\\n\\\\nError subclass: #MyResumableTestError\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Exceptions-Tests'!\\\\n\\\\n!MyResumableTestError methodsFor: 'exceptionDescription' stamp: 'tfei 6/13/1999 00:46'!\\\\nisResumable\\\\n\\\\n\\\\t^true! !\\\\nError subclass: #MyTestError\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Exceptions-Tests'!\\\\nNotification subclass: #MyTestNotification\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Exceptions-Tests'!\\\\nNetworkError subclass: #NameLookupFailure\\\\n\\\\tinstanceVariableNames: 'hostName'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Network-Kernel'!\\\\n!NameLookupFailure commentStamp: 'mir 5/12/2003 18:16' prior: 0!\\\\nSignals that a name lookup operation failed.\\\\n\\\\n\\\\thostName\\\\thostName for which the name loopup failed\\\\n!\\\\n\\\\n\\\\n!NameLookupFailure methodsFor: 'accessing' stamp: 'rbb 2/18/2005 14:27'!\\\\ndefaultAction\\\\n\\\\t\\\\\\\"Backward compatibility\\\\\\\"\\\\n\\\\t| response |\\\\n\\\\tresponse _ (UIManager default  chooseFrom: #( 'Retry' 'Give Up')\\\\n\\\\t\\\\t\\\\ttitle: self messageText).\\\\n\\\\t^ response = 2\\\\n\\\\t\\\\tifFalse: [self retry]! !\\\\n\\\\n!NameLookupFailure methodsFor: 'accessing' stamp: 'len 12/14/2002 11:57'!\\\\nhostName\\\\n\\\\t^ hostName! !\\\\n\\\\n!NameLookupFailure methodsFor: 'accessing' stamp: 'len 12/14/2002 11:57'!\\\\nhostName: aString\\\\n\\\\thostName _ aString! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nNameLookupFailure class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!NameLookupFailure class methodsFor: 'instance creation' stamp: 'len 12/14/2002 11:57'!\\\\nhostName: aString\\\\n\\\\t^ self new hostName: aString! !\\\\nObject subclass: #NameOfSubclass\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Tests-Bugs'!\\\\nUpdatingStringMorph subclass: #NameStringInHalo\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Widgets'!\\\\n!NameStringInHalo commentStamp: 'kfr 10/27/2003 16:29' prior: 0!\\\\nShows the name of the morph in the halo. !\\\\n\\\\n\\\\n!NameStringInHalo methodsFor: 'accessing' stamp: 'sw 9/17/1999 13:17'!\\\\ninterimContents: aString\\\\n\\\\tself contents: aString.\\\\n\\\\tself placeContents! !\\\\n\\\\n\\\\n!NameStringInHalo methodsFor: 'as yet unclassified' stamp: 'di 11/25/1999 23:40'!\\\\nplaceContents\\\\n\\\\t| namePosition |\\\\n\\\\t(owner notNil and: [owner isInWorld]) ifTrue:\\\\n\\\\t\\\\t[namePosition _ owner basicBox bottomCenter -\\\\n\\\\t\\\\t\\\\t((self width // 2) @ (owner handleSize negated // 2 - 1)).\\\\n\\\\t\\\\tnamePosition _ namePosition min: self world viewBox bottomRight - self extent y + 2.\\\\n\\\\t\\\\tself bounds: (namePosition extent: self extent)]! !\\\\n\\\\n\\\\n!NameStringInHalo methodsFor: 'drawing' stamp: 'sw 9/7/1999 21:27'!\\\\ndrawOn: aCanvas\\\\n\\\\taCanvas fillRectangle: self bounds color: Color white.\\\\n\\\\tsuper drawOn: aCanvas.! !\\\\n\\\\n\\\\n!NameStringInHalo methodsFor: 'editing' stamp: 'sw 9/17/1999 13:41'!\\\\ncancelEdits\\\\n\\\\tself interimContents: target externalName.\\\\n\\\\tsuper cancelEdits! !\\\\nObject subclass: #NaturalLanguageFormTranslator\\\\n\\\\tinstanceVariableNames: 'id generics'\\\\n\\\\tclassVariableNames: 'CachedTranslations'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Localization'!\\\\n\\\\n!NaturalLanguageFormTranslator methodsFor: 'accessing' stamp: 'yo 1/13/2005 11:15'!\\\\ngenerics\\\\n\\\\t^generics ifNil: [generics := Dictionary new]! !\\\\n\\\\n!NaturalLanguageFormTranslator methodsFor: 'accessing' stamp: 'yo 1/13/2005 11:27'!\\\\nlocaleID\\\\n\\\\t^id! !\\\\n\\\\n!NaturalLanguageFormTranslator methodsFor: 'accessing' stamp: 'yo 1/13/2005 11:26'!\\\\nlocaleID: anID\\\\n\\\\tid := anID! !\\\\n\\\\n!NaturalLanguageFormTranslator methodsFor: 'accessing' stamp: 'yo 1/13/2005 11:17'!\\\\nname: formName form: translatedForm \\\\n\\\\tself generics at: formName put: translatedForm.\\\\n! !\\\\n\\\\n\\\\n!NaturalLanguageFormTranslator methodsFor: 'i/o' stamp: 'yo 1/13/2005 14:02'!\\\\nsaveFormsOn: aStream\\\\n\\\\n\\\\t| rr |\\\\n\\\\trr _ ReferenceStream on: aStream.\\\\n\\\\trr nextPut: {id isoString. generics}.\\\\n\\\\trr close.\\\\n! !\\\\n\\\\n\\\\n!NaturalLanguageFormTranslator methodsFor: 'utilities' stamp: 'yo 1/13/2005 11:35'!\\\\ntranslate: aString\\\\n\\\\n\\\\t^ (self generics\\\\n\\\\t\\\\tat: aString ifAbsent: [nil]) deepCopy.\\\\n\\\\n\\\\t\\\\\\\"Do you like to write 'form ifNotNil: [form deepCopy]'?\\\\\\\"\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nNaturalLanguageFormTranslator class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!NaturalLanguageFormTranslator class methodsFor: 'accessing' stamp: 'yo 1/13/2005 11:13'!\\\\ncachedTranslations\\\\n\\\\t\\\\\\\"CachedTranslations := nil\\\\\\\" \\\\n\\\\t^CachedTranslations ifNil: [CachedTranslations := Dictionary new]! !\\\\n\\\\n!NaturalLanguageFormTranslator class methodsFor: 'accessing' stamp: 'yo 1/13/2005 11:13'!\\\\nisoLanguage: isoLanguage\\\\n\\\\t\\\\\\\"Return the generic language translator as there is no information about the country code\\\\\\\"\\\\n\\\\n\\\\t^self isoLanguage: isoLanguage isoCountry: nil! !\\\\n\\\\n!NaturalLanguageFormTranslator class methodsFor: 'accessing' stamp: 'yo 1/13/2005 11:13'!\\\\nisoLanguage: isoLanguage isoCountry: isoCountry\\\\n\\\\t^self localeID: (LocaleID  isoLanguage: isoLanguage isoCountry: isoCountry)! !\\\\n\\\\n!NaturalLanguageFormTranslator class methodsFor: 'accessing' stamp: 'yo 1/13/2005 11:13'!\\\\nlocaleID: localeID \\\\n\\\\t^ self cachedTranslations\\\\n\\\\t\\\\tat: localeID\\\\n\\\\t\\\\tifAbsentPut: [self new localeID: localeID]! !\\\\n\\\\n\\\\n!NaturalLanguageFormTranslator class methodsFor: 'i/o' stamp: 'yo 1/13/2005 14:02'!\\\\nloadFormsFrom: aStream\\\\n\\\\n\\\\t| rr pair inst |\\\\n\\\\trr _ ReferenceStream on: aStream.\\\\n\\\\tpair _ rr next.\\\\n\\\\tinst _ self localeID: (LocaleID isoString: pair first).\\\\n\\\\tpair second associationsDo: [:assoc |\\\\n\\\\t\\\\tinst name: assoc key form: assoc value.\\\\n\\\\t].\\\\n\\\\t^ inst.\\\\n! !\\\\nObject subclass: #NaturalLanguageTranslator\\\\n\\\\tinstanceVariableNames: 'id generics contexts'\\\\n\\\\tclassVariableNames: 'AllKnownPhrases CachedTranslations'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Localization'!\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'accessing' stamp: 'dgd 8/13/2004 21:12'!\\\\ndisplayLanguage\\\\n\\\\t^ id displayLanguage! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'accessing' stamp: 'dgd 10/7/2004 20:50'!\\\\ndisplayName\\\\n\\\\t^ id displayName! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'accessing' stamp: 'mir 7/15/2004 14:41'!\\\\nisoCountry\\\\n\\\\t^self localeID isoCountry! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'accessing' stamp: 'mir 7/15/2004 14:42'!\\\\nisoLanguage\\\\n\\\\t^self localeID isoLanguage! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'accessing' stamp: 'mir 7/15/2004 14:42'!\\\\nlocaleID\\\\n\\\\t^id! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'accessing' stamp: 'mir 7/21/2004 17:00'!\\\\ntranslations\\\\n\\\\t^self generics! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'accessing' stamp: 'mir 7/21/2004 17:03'!\\\\nuntranslated\\\\n\\\\t| translations |\\\\n\\\\ttranslations := self translations.\\\\n\\\\t^self class allKnownPhrases reject: [:each | translations includesKey: each]! !\\\\n\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'fileIn/fileOut' stamp: 'tak 11/16/2004 11:04'!\\\\nfileOutHeader\\\\n\\\\t^ '''Translation dictionary'''! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'fileIn/fileOut' stamp: 'tak 11/28/2004 14:50'!\\\\nfileOutHeaderOn: aStream \\\\n\\\\taStream nextChunkPut: self fileOutHeader;\\\\n\\\\t\\\\t cr.\\\\n\\\\taStream timeStamp; cr.\\\\n\\\\taStream nextPut: $!!.\\\\n\\\\taStream nextChunkPut: '(' , self class name , ' localeID: ' , id storeString , ')'.\\\\n\\\\taStream cr! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'fileIn/fileOut' stamp: 'yo 11/29/2005 11:19'!\\\\nfileOutOn: aStream \\\\n\\\\t\\\\\\\"self current fileOutOn: Transcript. Transcript endEntry\\\\\\\"\\\\n\\\\tself fileOutHeaderOn: aStream.\\\\n\\\\tself fileOutOn: aStream keys: nil! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'fileIn/fileOut' stamp: 'yo 11/29/2005 11:19'!\\\\nfileOutOn: aStream keys: keys \\\\n\\\\t\\\\\\\"self current fileOutOn: Transcript. Transcript endEntry\\\\\\\"\\\\n\\\\t(keys\\\\n\\\\t\\\\tifNil: [generics keys asSortedCollection])\\\\n\\\\t\\\\tdo: [:key | self\\\\n\\\\t\\\\t\\\\t\\\\tnextChunkPut: (generics associationAt: key)\\\\n\\\\t\\\\t\\\\t\\\\ton: aStream].\\\\n\\\\tkeys\\\\n\\\\t\\\\tifNil: [self untranslated\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:each | self nextChunkPut: each -> '' on: aStream]].\\\\n\\\\taStream nextPut: $!!;\\\\n\\\\t\\\\t cr! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'fileIn/fileOut' stamp: 'tak 11/16/2004 09:26'!\\\\nnextChunkPut: anObject on: aStream \\\\n\\\\t| i remainder terminator |\\\\n\\\\tterminator := $!!.\\\\n\\\\tremainder := anObject storeString.\\\\n\\\\t[(i := remainder indexOf: terminator) = 0]\\\\n\\\\t\\\\twhileFalse: [aStream\\\\n\\\\t\\\\t\\\\t\\\\tnextPutAll: (remainder copyFrom: 1 to: i).\\\\n\\\\t\\\\t\\\\taStream nextPut: terminator.\\\\n\\\\t\\\\t\\\\t\\\\\\\"double imbedded terminators\\\\\\\"\\\\n\\\\t\\\\t\\\\tremainder := remainder copyFrom: i + 1 to: remainder size].\\\\n\\\\taStream nextPutAll: remainder.\\\\n\\\\taStream nextPut: terminator; cr.! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'fileIn/fileOut' stamp: 'tak 12/15/2004 16:07'!\\\\nscanFrom: aStream \\\\n\\\\t\\\\\\\"Read a definition of dictionary.  \\\\n\\\\tMake sure current locale corresponds my locale id\\\\\\\"\\\\n\\\\t| aString newTranslations assoc currentPlatform |\\\\n\\\\tnewTranslations := Dictionary new.\\\\n\\\\tcurrentPlatform := Locale currentPlatform.\\\\n\\\\t[Locale\\\\n\\\\t\\\\tcurrentPlatform: (Locale localeID: id).\\\\n\\\\t[aString := aStream nextChunk withSqueakLineEndings.\\\\n\\\\taString size > 0]\\\\n\\\\t\\\\twhileTrue: [assoc := Compiler evaluate: aString.\\\\n\\\\t\\\\t\\\\tassoc value = ''\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self class registerPhrase: assoc key]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [newTranslations add: assoc]]]\\\\n\\\\t\\\\tensure: [Locale currentPlatform: currentPlatform].\\\\n\\\\tself mergeTranslations: newTranslations! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'fileIn/fileOut' stamp: 'yo 2/25/2005 09:37'!\\\\nwriteAsMimeString\\\\n\\\\n\\\\t| fileName fileStream tmpStream s2 gzs |\\\\n\\\\ttmpStream _ MultiByteBinaryOrTextStream on: ''.\\\\n\\\\ttmpStream converter: UTF8TextConverter new.\\\\n\\\\tself fileOutOn: tmpStream.\\\\n\\\\ts2 _ RWBinaryOrTextStream on: ''.\\\\n\\\\tgzs := GZipWriteStream on: s2.\\\\n\\\\ttmpStream reset.\\\\n\\\\tgzs nextPutAll: (tmpStream binary contentsOfEntireFile asString) contents.\\\\n\\\\tgzs close.\\\\n\\\\ts2 reset.\\\\n\\\\n\\\\tfileName _ id isoString, '.translation.gz.mime'.\\\\n\\\\tfileStream _ FileStream newFileNamed: fileName.\\\\n\\\\tfileStream nextPutAll: (Base64MimeConverter mimeEncode: s2) contents.\\\\n\\\\tfileStream close.\\\\n! !\\\\n\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'initialize-release' stamp: 'mir 7/15/2004 14:41'!\\\\nlocaleID: anID\\\\n\\\\tid := anID! !\\\\n\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'printing' stamp: 'nk 8/29/2004 10:51'!\\\\nprintOn: aStream\\\\n\\\\taStream nextPutAll: self class name; nextPut: $(; print: self localeID; nextPut: $)! !\\\\n\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'translation' stamp: 'mir 7/21/2004 18:02'!\\\\ncheckPhrase: phrase translation: translation! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'translation' stamp: 'yo 7/30/2004 13:03'!\\\\nphrase: phraseString translation: translationString \\\\n\\\\tself generics at: phraseString put: translationString asString.\\\\n\\\\tself changed: #translations.\\\\n\\\\tself changed: #untranslated.! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'translation' stamp: 'yo 8/2/2004 12:27'!\\\\nrawPhrase: phraseString translation: translationString \\\\n\\\\tself generics at: phraseString put: translationString asString.\\\\n! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'translation' stamp: 'yo 1/14/2005 16:25'!\\\\nrawRemoveUntranslated: untranslated\\\\n\\\\n\\\\tself class allKnownPhrases removeKey: untranslated ifAbsent: [].\\\\n\\\\tself changed: #untranslated.! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'translation' stamp: 'yo 8/1/2004 01:07'!\\\\nremoveTranslationFor: phraseString\\\\n\\\\tself generics removeKey: phraseString ifAbsent: [].\\\\n\\\\tself changed: #translations.\\\\n\\\\tself changed: #untranslated.! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'translation' stamp: 'yo 1/14/2005 16:25'!\\\\nremoveUntranslated: untranslated\\\\n\\\\n\\\\tself class allKnownPhrases removeKey: untranslated ifAbsent: [].\\\\n! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'translation' stamp: 'em 3/23/2005 12:08'!\\\\ntranslate: aString\\\\n\\\\t^self generics\\\\n\\\\t\\\\tat: aString\\\\n\\\\t\\\\tifAbsent: [self class registeredPhraseFor: aString. \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself changed: #untranslated. \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself localeID hasParent\\\\n\\\\t\\\\t\\\\tifTrue: [(self class localeID: self localeID parent) translate: aString]\\\\n\\\\t\\\\t\\\\tifFalse: [aString]]! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'translation' stamp: 'mir 6/30/2004 20:22'!\\\\ntranslate: aString in: aContext! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'translation' stamp: 'mir 7/15/2004 14:58'!\\\\ntranslationFor: aString\\\\n\\\\t^self translate: aString! !\\\\n\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'user interface' stamp: 'dgd 8/13/2004 21:54'!\\\\ndefaultBackgroundColor\\\\n\\\\t\\\\\\\"answer the receiver's defaultBackgroundColor for views\\\\\\\"\\\\n\\\\t^ Color cyan! !\\\\n\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'private' stamp: 'mir 6/30/2004 20:23'!\\\\ngenerics\\\\n\\\\t^generics ifNil: [generics := Dictionary new]! !\\\\n\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'private store-retrieve' stamp: 'yo 7/30/2004 13:00'!\\\\nloadFromFileNamed: fileNameString \\\\n\\\\t\\\\\\\"Load translations from an external file\\\\\\\"\\\\n\\\\n\\\\t| stream |\\\\n\\\\t[stream := FileStream readOnlyFileNamed: fileNameString.\\\\n\\\\tself loadFromStream: stream]\\\\n\\\\t\\\\tensure: [stream close].\\\\n\\\\tself changed: #translations.\\\\n\\\\tself changed: #untranslated.\\\\n! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'private store-retrieve' stamp: 'tak 11/16/2004 12:37'!\\\\nloadFromRefStream: stream \\\\n\\\\t\\\\\\\"Load translations from an external file\\\\\\\"\\\\n\\\\t| loadedArray refStream |\\\\n\\\\trefStream := ReferenceStream on: stream.\\\\n\\\\t[loadedArray := refStream next]\\\\n\\\\t\\\\tensure: [refStream close].\\\\n\\\\tself processExternalObject: loadedArray ! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'private store-retrieve' stamp: 'em 3/30/2005 14:32'!\\\\nloadFromStream: stream \\\\n\\\\t\\\\\\\"Load translations from an external file\\\\\\\"\\\\n\\\\t| header isFileIn |\\\\n\\\\theader := '''Translation dictionary'''.\\\\n\\\\tisFileIn := (stream next: header size)\\\\n\\\\t\\\\t\\\\t\\\\t= header.\\\\n\\\\tstream reset.\\\\n\\\\tisFileIn\\\\n\\\\t\\\\tifTrue: [stream fileInAnnouncing: 'Loading ' translated, stream localName]\\\\n\\\\t\\\\tifFalse: [self loadFromRefStream: stream]! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'private store-retrieve' stamp: 'yo 8/2/2004 12:27'!\\\\nmergeTranslations: newTranslations\\\\n\\\\t\\\\\\\"Merge a new set of translations into the exiting table.\\\\n\\\\tOverwrites existing entries.\\\\\\\"\\\\n\\\\n\\\\tnewTranslations keysAndValuesDo: [:key :value |\\\\n\\\\t\\\\tself rawPhrase: (self class registeredPhraseFor: key) translation: value].\\\\n\\\\tself changed: #translations.\\\\n\\\\tself changed: #untranslated.! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'private store-retrieve' stamp: 'mir 7/15/2004 20:04'!\\\\nprocessExternalObject: anArray \\\\n\\\\t\\\\\\\"pivate - process the external object\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"new format -> {translations. untranslated}\\\\\\\"\\\\n\\\\n\\\\tanArray second do: [:each | self class registerPhrase: each].\\\\n\\\\n\\\\tself mergeTranslations: anArray first! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'private store-retrieve' stamp: 'yo 2/17/2005 15:45'!\\\\nsaveToFileNamed: fileNameString \\\\n\\\\t\\\\\\\"save the receiver's translations to a file named fileNameString\\\\\\\"\\\\n\\\\t| stream |\\\\n\\\\t\\\\\\\"Set true if you need to save as binary\\\\\\\"\\\\n\\\\tfalse\\\\n\\\\t\\\\tifTrue: [stream := ReferenceStream fileNamed: fileNameString.\\\\n\\\\t\\\\t\\\\tstream nextPut: {self translations. self untranslated}.\\\\n\\\\t\\\\t\\\\tstream close.\\\\n\\\\t\\\\t\\\\t^ self].\\\\n\\\\tstream := FileStream fileNamed: fileNameString.\\\\n\\\\t[self fileOutOn: stream]\\\\n\\\\t\\\\tensure: [stream close]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nNaturalLanguageTranslator class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'accessing' stamp: 'dgd 8/24/2004 20:20'!\\\\navailableLanguageLocaleIDs\\\\n\\\\t\\\\\\\"Return the locale ids for the currently available languages.  \\\\n\\\\tMeaning those which either internally or externally have  \\\\n\\\\ttranslations available.\\\\\\\"\\\\n\\\\t\\\\\\\"NaturalLanguageTranslator availableLanguageLocaleIDs\\\\\\\"\\\\n\\\\t^ CachedTranslations values collect:[:each | each localeID]! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'accessing' stamp: 'dgd 8/24/2004 19:39'!\\\\ncurrent\\\\n\\\\t^ LocaleID current translator\\\\n\\\\n! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'accessing' stamp: 'nk 8/29/2004 14:23'!\\\\ndefault\\\\n\\\\t^self localeID: (LocaleID default)\\\\n! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'accessing' stamp: 'mir 7/15/2004 14:36'!\\\\nisoLanguage: isoLanguage\\\\n\\\\t\\\\\\\"Return the generic language translator as there is no information about the country code\\\\\\\"\\\\n\\\\n\\\\t^self isoLanguage: isoLanguage isoCountry: nil! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'accessing' stamp: 'mir 7/15/2004 14:36'!\\\\nisoLanguage: isoLanguage isoCountry: isoCountry\\\\n\\\\t^self localeID: (LocaleID  isoLanguage: isoLanguage isoCountry: isoCountry)! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'accessing' stamp: 'dgd 8/24/2004 19:18'!\\\\nlocaleID: localeID \\\\n\\\\t^ self cachedTranslations\\\\n\\\\t\\\\tat: localeID\\\\n\\\\t\\\\tifAbsentPut: [self new localeID: localeID]! !\\\\n\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'class initialization' stamp: 'mir 8/11/2004 13:38'!\\\\ninitialize\\\\n\\\\t\\\\\\\"NaturalLanguageTranslator initialize\\\\\\\"\\\\n\\\\n\\\\tFileList registerFileReader: self.\\\\n\\\\tSmalltalk addToStartUpList: NaturalLanguageTranslator after: FileDirectory.\\\\n! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'class initialization' stamp: 'mir 7/15/2004 19:48'!\\\\nresetCaches\\\\n\\\\t\\\\\\\"NaturalLanguageTranslator resetCaches\\\\\\\"\\\\n\\\\n\\\\tCachedTranslations := nil.\\\\n! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'class initialization' stamp: 'mir 8/31/2005 23:37'!\\\\nstartUp: resuming \\\\n\\\\t| defaultID |\\\\n\\\\tresuming\\\\n\\\\t\\\\tifFalse: [^ self].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tdefaultID := LocaleID current.\\\\n\\\\tself cachedTranslations\\\\n\\\\t\\\\tat: defaultID\\\\n\\\\t\\\\tifAbsent: [self localeID: defaultID].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tself loadAvailableExternalLocales! !\\\\n\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'file-services' stamp: 'mir 8/11/2004 10:52'!\\\\nfileReaderServicesForFile: fullName suffix: suffix \\\\n\\\\t\\\\\\\"Answer the file services associated with given file\\\\\\\"\\\\n\\\\t^ (suffix = self translationSuffix) | (suffix = '*')\\\\n\\\\t\\\\tifTrue: [{self serviceMergeLanguageTranslations}]\\\\n\\\\t\\\\tifFalse: [#()]! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'file-services' stamp: 'tak 3/14/2005 15:51'!\\\\nloadForLocaleIsoString: localeString fromGzippedMimeLiteral: mimeString \\\\n\\\\t\\\\\\\"merge the translation from the mime literal.\\\\\\\"\\\\n\\\\t| stream localeID translator gs rbStream s currentPlatform |\\\\n\\\\ts := Base64MimeConverter mimeDecodeToBytes: mimeString readStream.\\\\n\\\\ts reset.\\\\n\\\\tgs := GZipReadStream on: s.\\\\n\\\\trbStream := MultiByteBinaryOrTextStream with: gs contents asString.\\\\n\\\\trbStream converter: UTF8TextConverter new.\\\\n\\\\trbStream reset.\\\\n\\\\tlocaleID := LocaleID isoString: localeString.\\\\n\\\\tcurrentPlatform := Locale currentPlatform.\\\\n\\\\t[Locale\\\\n\\\\t\\\\tcurrentPlatform: (Locale localeID: localeID).\\\\n\\\\tstream := ReadStream on: rbStream contents]\\\\n\\\\t\\\\tensure: [Locale currentPlatform: currentPlatform].\\\\n\\\\ttranslator := self localeID: localeID.\\\\n\\\\ttranslator loadFromStream: stream.\\\\n\\\\tLanguageEnvironment resetKnownEnvironments! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'file-services' stamp: 'yo 2/24/2005 21:04'!\\\\nmergeTranslationFileNamed: fileFullNameString \\\\n\\\\t\\\\\\\"merge the translation in the file named fileFullNameString\\\\\\\"\\\\n\\\\n\\\\t| stream localeID translator |\\\\n\\\\tstream := FileStream readOnlyFileNamed: fileFullNameString.\\\\n\\\\t[localeID := LocaleID isoString: stream localName sansPeriodSuffix.\\\\n\\\\ttranslator := self localeID: localeID.\\\\n\\\\ttranslator loadFromStream: stream]\\\\n\\\\t\\\\tensure: [stream close].\\\\n\\\\tLanguageEnvironment resetKnownEnvironments.\\\\n\\\\n! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'file-services' stamp: 'mir 7/21/2004 13:45'!\\\\nserviceMergeLanguageTranslations\\\\n\\\\t\\\\\\\"Answer a service for merging of translation files\\\\\\\"\\\\n\\\\t^ SimpleServiceEntry\\\\n\\\\t\\\\tprovider: self\\\\n\\\\t\\\\tlabel: 'merge the translation file'\\\\n\\\\t\\\\tselector: #mergeTranslationFileNamed:\\\\n\\\\t\\\\tdescription: 'merge the translation file into the language named like the file'\\\\n\\\\t\\\\tbuttonLabel: 'merge'! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'file-services' stamp: 'mir 7/21/2004 13:45'!\\\\nservices\\\\n\\\\t\\\\\\\"Answer potential file services associated with this class\\\\\\\"\\\\n\\\\t^ {self serviceMergeLanguageTranslations}! !\\\\n\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'private' stamp: 'mir 7/15/2004 19:58'!\\\\nallKnownPhrases\\\\n\\\\t^AllKnownPhrases ifNil: [AllKnownPhrases := Dictionary new: 2051]! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'private' stamp: 'mir 7/13/2004 00:06'!\\\\ncachedTranslations\\\\n\\\\t\\\\\\\"CachedTranslations := nil\\\\\\\" \\\\n\\\\t^CachedTranslations ifNil: [CachedTranslations := Dictionary new]! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'private' stamp: 'mir 8/31/2005 16:55'!\\\\ncleanUpCache\\\\n\\\\t\\\\\\\"NaturalLanguageTranslator cleanUpCache\\\\\\\"\\\\n\\\\n\\\\tself cachedTranslations keys do: [:key |\\\\n\\\\t\\\\tkey isoLanguage size > 2 ifTrue: [self cachedTranslations removeKey: key]]! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'private' stamp: 'mir 7/15/2004 20:02'!\\\\nregisterPhrase: phrase\\\\n\\\\t\\\\\\\"Using a Dictionary so we can lookup existing string instead of creating needless copies when loading a translation.\\\\\\\"\\\\n\\\\tself allKnownPhrases at: phrase put: phrase! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'private' stamp: 'mir 7/21/2004 14:18'!\\\\nregisteredPhraseFor: phrase\\\\n\\\\t\\\\\\\"Using a Dictionary so we can lookup existing string instead of creating needless copies when loading a translation.\\\\\\\"\\\\n\\\\t^self allKnownPhrases at: phrase ifAbsentPut: [phrase]! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'private' stamp: 'mir 8/11/2004 10:52'!\\\\ntranslationSuffix\\\\n\\\\t^'translation'! !\\\\n\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'private loading' stamp: 'nk 8/21/2004 13:03'!\\\\ndirectoryForLanguage: isoLanguage country: isoCountry create: createDir\\\\n\\\\t\\\\\\\"Try to locate the <prefs>/locale/<language>{/<country>} folder.\\\\n\\\\tIf createDir is set, create the path down to country or language, depending on wether it's specified..\\\\n\\\\tReturn the directory for country or language depending on specification.\\\\n\\\\tIf neither exists, nil\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"NaturalLanguageTranslator directoryForLanguage: 'es' country: nil create: true\\\\\\\"\\\\n\\\\t\\\\\\\"NaturalLanguageTranslator directoryForLanguage: 'de' country: 'DE' create: true\\\\\\\"\\\\n\\\\t\\\\\\\"NaturalLanguageTranslator directoryForLanguage: 'en' country: 'US' create: false\\\\\\\"\\\\n\\\\t\\\\\\\"NaturalLanguageTranslator directoryForLanguage: 'en' country: nil create: true\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"If this fails, there is nothing we can do about it here\\\\\\\"\\\\n\\\\t| localeDir  countryDir languageDir |\\\\n\\\\tlocaleDir := self localeDirCreate: createDir.\\\\n\\\\tlocaleDir ifNil: [^nil].\\\\n\\\\n\\\\tisoCountry ifNil: [\\\\n\\\\t\\\\tlanguageDir := localeDir directoryNamed: isoLanguage.\\\\n\\\\t\\\\tcreateDir\\\\n\\\\t\\\\t\\\\tifTrue: [languageDir assureExistence].\\\\n\\\\t\\\\t^languageDir exists\\\\n\\\\t\\\\t\\\\tifTrue: [languageDir]\\\\n\\\\t\\\\t\\\\tifFalse: [nil]].\\\\n\\\\n\\\\tcountryDir := languageDir directoryNamed: isoCountry.\\\\n\\\\tcreateDir\\\\n\\\\t\\\\tifTrue: [countryDir assureExistence].\\\\n\\\\n\\\\t^countryDir exists\\\\n\\\\t\\\\tifTrue: [countryDir]\\\\n\\\\t\\\\tifFalse: [nil]! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'private loading' stamp: 'mir 8/11/2004 10:44'!\\\\ndirectoryForLocaleID: localeID create: createDir\\\\n\\\\t\\\\\\\"Try to locate the <prefs>/locale/<language>{/<country>} folder.\\\\n\\\\tIf createDir is set, create the path down to country or language, depending on locale.\\\\n\\\\tReturn the directory for country or language depending on locale.\\\\n\\\\tIf neither exists, nil\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"NaturalLanguageTranslator directoryForLanguage: 'de' country: nil readOnly: true\\\\\\\"\\\\n\\\\t\\\\\\\"NaturalLanguageTranslator directoryForLanguage: 'de' country: 'DE' readOnly: true\\\\\\\"\\\\n\\\\t\\\\\\\"NaturalLanguageTranslator directoryForLanguage: 'en' country: 'US' readOnly: false\\\\\\\"\\\\n\\\\t\\\\\\\"NaturalLanguageTranslator directoryForLanguage: 'en' country: nil readOnly: true\\\\\\\"\\\\n\\\\n\\\\t^self directoryForLanguage: localeID isoLanguage country: localeID isoCountry create: createDir! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'private loading' stamp: 'mir 8/25/2004 11:57'!\\\\nloadAvailableExternalLocales\\\\n\\\\t\\\\\\\"private - register locales IDs based on the content of the <prefs>/locale/ directory\\\\\\\"\\\\n\\\\t| localeDir |\\\\n\\\\tlocaleDir := self localeDirCreate: false.\\\\n\\\\tlocaleDir ifNil: [^ #()].\\\\n\\\\n\\\\tlocaleDir directoryNames\\\\n\\\\t\\\\tdo: [:langDirName | \\\\n\\\\t\\\\t\\\\t| langDir | \\\\n\\\\t\\\\t\\\\tlangDir := localeDir directoryNamed: langDirName.\\\\n\\\\n\\\\t\\\\t\\\\t(langDir fileNamesMatching: '*.' , self translationSuffix)\\\\n\\\\t\\\\t\\\\t\\\\tifNotEmpty: [self loadTranslatorForIsoLanguage: langDirName isoCountry: nil].\\\\n\\\\n\\\\t\\\\t\\\\tlangDir directoryNames\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:countryDirName | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t| countryDir | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcountryDir := langDirName directoryNamed: countryDirName.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(countryDir fileNamesMatching: '*.' , self translationSuffix)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifNotEmpty: [self loadTranslatorForIsoLanguage: langDirName isoCountry: countryDirName]\\\\n\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t].\\\\n! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'private loading' stamp: 'nk 8/21/2004 13:00'!\\\\nloadExternalTranslationsFor: translator\\\\n\\\\t\\\\\\\"Try to load translations from external external files.\\\\n\\\\tThe files are located in the <prefs>/locale/<language>{/<country>} folder.\\\\n\\\\tThere can be more than one file for each location, so applications can install their own partial translation tables. All files in the specific folder are loaded.\\\\\\\"\\\\n\\\\n\\\\t| translationDir |\\\\n\\\\ttranslationDir := self directoryForLocaleID: translator localeID create: false.\\\\n\\\\ttranslationDir ifNil: [ ^nil ]. \\\\n\\\\t(translationDir fileNamesMatching: '*.' , self translationSuffix)\\\\n\\\\t\\\\tdo: [:fileName | translator loadFromFileNamed: (translationDir fullNameFor: fileName)]! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'private loading' stamp: 'mir 8/25/2004 11:59'!\\\\nloadTranslatorForIsoLanguage: isoLanguage isoCountry: isoCountry \\\\n\\\\t\\\\\\\"private - load the translations from <prefs>/locale/ directory  \\\\n\\\\tthe procedure is to assure the existence of a translator for the  \\\\n\\\\tgiven language/country and then load the external translations for this translator\\\\\\\"\\\\n\\\\n\\\\t| translator |\\\\n\\\\ttranslator := self localeID: (LocaleID isoLanguage: isoLanguage isoCountry: isoCountry).\\\\n\\\\n\\\\tself loadExternalTranslationsFor: translator! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'private loading' stamp: 'mir 8/25/2004 12:03'!\\\\nlocaleDirCreate: createDir\\\\n\\\\t\\\\\\\"Try to locate the <prefs>/locale/ folder.\\\\n\\\\tIf createDir is set, try to create the path.\\\\n\\\\tIf it doesn't exist, return nil\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"If this fails, there is nothing we can do about it here\\\\\\\"\\\\n\\\\t| prefDir  localeDir |\\\\n\\\\t(createDir not\\\\n\\\\t\\\\t\\\\tand: [ExternalSettings preferenceDirectory isNil])\\\\n\\\\t\\\\tifTrue: [^ nil].\\\\n\\\\n\\\\tprefDir := ExternalSettings assuredPreferenceDirectory.\\\\n\\\\tprefDir exists\\\\n\\\\t\\\\tifFalse: [^nil].\\\\n\\\\n\\\\n\\\\tlocaleDir := prefDir directoryNamed: 'locale'.\\\\n\\\\tcreateDir\\\\n\\\\t\\\\tifTrue: [localeDir assureExistence].\\\\n\\\\t^localeDir exists\\\\n\\\\t\\\\tifTrue: [localeDir]\\\\n\\\\t\\\\tifFalse: [nil]! !\\\\nObject subclass: #NebraskaClient\\\\n\\\\tinstanceVariableNames: 'connection encoder hand canvas'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Nebraska-Morphic-Remote'!\\\\n!NebraskaClient commentStamp: '<historical>' prior: 0!\\\\nA client that has connected to a Nebraska server, seen from the server's point of view.!\\\\n\\\\n\\\\n!NebraskaClient methodsFor: 'as yet unclassified' stamp: 'RAA 7/31/2000 23:59'!\\\\nbacklog\\\\n\\\\n\\\\t^connection backlog! !\\\\n\\\\n!NebraskaClient methodsFor: 'as yet unclassified' stamp: 'RAA 12/13/2000 08:30'!\\\\ncurrentStatusString\\\\n\\\\n\\\\t(connection isNil or: [connection isConnected not]) ifTrue: [^'nada'].\\\\n\\\\t^(NetNameResolver stringFromAddress: connection remoteAddress),\\\\n\\\\t\\\\t' - ',\\\\n\\\\t\\\\t(self backlog // 1024) printString,'k'! !\\\\n\\\\n\\\\n!NebraskaClient methodsFor: 'attributes' stamp: 'ls 3/25/2000 22:27'!\\\\ncanvas\\\\n\\\\t\\\\\\\"return the hand this canvas that should be drawn on for this client\\\\\\\"\\\\n\\\\t^canvas! !\\\\n\\\\n!NebraskaClient methodsFor: 'attributes' stamp: 'ls 3/25/2000 22:27'!\\\\nhand\\\\n\\\\t\\\\\\\"return the hand this client is controlling\\\\\\\"\\\\n\\\\t^hand! !\\\\n\\\\n\\\\n!NebraskaClient methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:25'!\\\\nconvertToBuffered\\\\n\\\\n\\\\tcanvas purgeOutputQueue.\\\\n\\\\tcanvas := canvas asBufferedCanvas.! !\\\\n\\\\n!NebraskaClient methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:25'!\\\\ndestroy\\\\n\\\\thand ifNotNil:[hand world ifNotNil:[hand world removeHand: hand]].\\\\n\\\\tconnection ifNotNil:[connection destroy].\\\\n\\\\tencoder := canvas := hand := connection := nil.! !\\\\n\\\\n!NebraskaClient methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:25'!\\\\ninitialize: aConnection\\\\n\\\\n\\\\t| remoteAddress userPicture |\\\\n\\\\n\\\\tconnection := aConnection.\\\\n\\\\thand := RemoteControlledHandMorph on: (MorphicEventDecoder on: aConnection).\\\\n\\\\thand nebraskaClient: self.\\\\n\\\\tremoteAddress := connection remoteAddress.\\\\n\\\\tremoteAddress ifNotNil: [remoteAddress := NetNameResolver stringFromAddress: remoteAddress].\\\\n\\\\tuserPicture := EToySenderMorph pictureForIPAddress: remoteAddress.\\\\n\\\\thand\\\\n\\\\t\\\\tuserInitials: ((EToySenderMorph nameForIPAddress: remoteAddress) ifNil: ['???'])\\\\n\\\\t\\\\tandPicture: (userPicture ifNotNil: [userPicture scaledToSize: 16@20]).\\\\n\\\\tencoder := CanvasEncoder on: aConnection.\\\\n\\\\tcanvas := RemoteCanvas\\\\n\\\\t\\\\tconnection: encoder\\\\n\\\\t\\\\tclipRect: NebraskaServer extremelyBigRectangle\\\\n\\\\t\\\\ttransform: MorphicTransform identity! !\\\\n\\\\n\\\\n!NebraskaClient methodsFor: 'network' stamp: 'ls 4/9/2000 14:43'!\\\\nextent: newExtent  depth: newDepth\\\\n\\\\tencoder extent: newExtent  depth: newDepth! !\\\\n\\\\n!NebraskaClient methodsFor: 'network' stamp: 'ls 3/25/2000 22:25'!\\\\nisConnected\\\\n\\\\t^connection isConnected! !\\\\n\\\\n!NebraskaClient methodsFor: 'network' stamp: 'ls 3/25/2000 22:25'!\\\\nprocessIO\\\\n\\\\tconnection processIO.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nNebraskaClient class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!NebraskaClient class methodsFor: 'instance creation' stamp: 'ls 3/25/2000 22:28'!\\\\nonConnection: aStringSocket\\\\n\\\\t^self new initialize: aStringSocket! !\\\\nObject subclass: #NebraskaDebug\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: 'DEBUG Details'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Nebraska-Morphic-Remote'!\\\\n!NebraskaDebug commentStamp: '<historical>' prior: 0!\\\\nBufferedCanvas enabled: false.\\\\nBufferedCanvas enabled: true.\\\\n\\\\nNebraskaDebug beginStats\\\\nNebraskaDebug showStats\\\\nNebraskaDebug stopAndShowAll\\\\nNebraskaDebug killStats\\\\nStringSocket showRatesSeen\\\\nStringSocket clearRatesSeen\\\\nNebraskaDebug showAndClearStats: #allStats\\\\nNebraskaDebug showAndClearStats: #queuedbufferSizes\\\\n\\\\n\\\\nCanvasEncoder beginStats\\\\nCanvasEncoder showStats\\\\nCanvasEncoder killStats\\\\nNebraskaDebug showStats: #peerBytesSent\\\\nNebraskaDebug showStats: #soundReductionTime\\\\nNebraskaDebug showStats: #FormEncodeTimes\\\\nNebraskaDebug showStats: #SendReceiveStats\\\\nNebraskaDebug showStats: #sendDeltas\\\\nNebraskaDebug showStats: #bigImage\\\\nNebraskaDebug showStats: #sketch\\\\nNebraskaDebug showStats: #addToOutBuf:\\\\n----\\\\nbuffered off, painting 125kb/s, dragging 400kb/s\\\\nbuffered on, painting 100kb/s, dragging 170kb/s!\\\\n]style[(62 142 14 78 17 3 73 415)f1cblue;,f1cblack;,f1,f1cblack;,f1cred;,f1cblack;,f1cblue;,f1cblack;!\\\\n\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nNebraskaDebug class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!NebraskaDebug class methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:26'!\\\\nat: queueName add: anArray\\\\n\\\\n\\\\t| now |\\\\n\\\\n\\\\tDEBUG ifNil: [\\\\n\\\\t\\\\tqueueName == #sketchZZZ ifFalse: [^self].\\\\n\\\\t\\\\t\\\\\\\"Details := OrderedCollection new.\\\\\\\"\\\\n\\\\t\\\\tself beginStats.\\\\n\\\\t].\\\\n\\\\t(Details notNil and: [Details size < 20]) ifTrue: [\\\\n\\\\t\\\\tDetails add: thisContext longStack\\\\n\\\\t].\\\\n\\\\tnow := Time millisecondClockValue.\\\\n\\\\tDEBUG add: {now},anArray,{queueName}.\\\\n! !\\\\n\\\\n!NebraskaDebug class methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:26'!\\\\nbeginStats\\\\n\\\\n\\\\tDEBUG := OrderedCollection new! !\\\\n\\\\n!NebraskaDebug class methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:26'!\\\\nkillStats\\\\n\\\\n\\\\tDEBUG := nil.\\\\n! !\\\\n\\\\n!NebraskaDebug class methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:26'!\\\\nshowAndClearStats: queueName\\\\n\\\\n\\\\tDEBUG ifNil: [^Beeper beep].\\\\n\\\\tself \\\\n\\\\t\\\\tshowStats: queueName \\\\n\\\\t\\\\tfrom: DEBUG.\\\\n\\\\tDEBUG := nil.! !\\\\n\\\\n!NebraskaDebug class methodsFor: 'as yet unclassified' stamp: 'nb 6/17/2003 12:25'!\\\\nshowStats\\\\n\\\\n\\\\tDEBUG ifNil: [^Beeper beep].\\\\n\\\\tDEBUG explore.! !\\\\n\\\\n!NebraskaDebug class methodsFor: 'as yet unclassified' stamp: 'nb 6/17/2003 12:25'!\\\\nshowStats: queueName\\\\n\\\\n\\\\tDEBUG ifNil: [^Beeper beep].\\\\n\\\\tself \\\\n\\\\t\\\\tshowStats: queueName \\\\n\\\\t\\\\tfrom: DEBUG.\\\\n! !\\\\n\\\\n!NebraskaDebug class methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:26'!\\\\nshowStats: queueName from: aCollection\\\\n\\\\n\\\\t| xx answer prevTime currTime |\\\\n\\\\n\\\\tprevTime := nil.\\\\n\\\\tanswer := String streamContents: [ :s | \\\\n\\\\t\\\\ts nextPutAll: (aCollection last first - aCollection first first) asStringWithCommas,' ms';cr;cr.\\\\n\\\\t\\\\taCollection withIndexDo: [ :each :index | \\\\n\\\\t\\\\t\\\\t(queueName == #allStats or: [queueName == each last]) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tcurrTime := each first.\\\\n\\\\t\\\\t\\\\t\\\\txx := currTime printString.\\\\n\\\\t\\\\t\\\\t\\\\tprevTime ifNil: [prevTime := currTime].\\\\n\\\\t\\\\t\\\\t\\\\ts nextPutAll: index printString,'.  ',\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(xx allButLast: 3),'.',(xx last: 3),' ',(currTime - prevTime) printString,' '.\\\\n\\\\t\\\\t\\\\t\\\\ts nextPutAll: each allButFirst printString; cr.\\\\n\\\\t\\\\t\\\\t\\\\tprevTime := currTime.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\tStringHolder new \\\\n\\\\t\\\\tcontents: answer;\\\\n\\\\t\\\\topenLabel: queueName! !\\\\n\\\\n!NebraskaDebug class methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:26'!\\\\nstopAndShowAll\\\\n\\\\n\\\\t| prev |\\\\n\\\\nself halt.\\\\t\\\\\\\"not updated to new format\\\\\\\"\\\\n\\\\n\\\\tprev := DEBUG.\\\\n\\\\tDEBUG := nil.\\\\n\\\\tprev ifNil: [^Beeper beep].\\\\n\\\\tprev keysAndValuesDo: [ :k :v |\\\\n\\\\t\\\\tself showStats: k from: v\\\\n\\\\t].! !\\\\nProjectNavigationMorph subclass: #NebraskaNavigationMorph\\\\n\\\\tinstanceVariableNames: 'nebraskaBorder nebraskaTerminal'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Nebraska-Morphic-Remote'!\\\\n\\\\n!NebraskaNavigationMorph methodsFor: 'as yet unclassified' stamp: 'RAA 12/13/2000 08:49'!\\\\naddButtons\\\\n\\\\n\\\\tself addARow: {\\\\n\\\\t\\\\tself inAColumn: {self buttonScale}.\\\\n\\\\t\\\\tself inAColumn: {self buttonQuit}.\\\\n\\\\t\\\\tself inAColumn: {self buttonBuffered}.\\\\n\\\\t}.\\\\n! !\\\\n\\\\n!NebraskaNavigationMorph methodsFor: 'as yet unclassified' stamp: 'RAA 12/13/2000 08:26'!\\\\nbufferNebraska\\\\n\\\\n\\\\tnebraskaTerminal requestBufferedConnection\\\\n! !\\\\n\\\\n!NebraskaNavigationMorph methodsFor: 'as yet unclassified' stamp: 'RAA 12/13/2000 08:23'!\\\\nbuttonBuffered\\\\n\\\\n\\\\t^self makeButton: 'B' balloonText: 'Request buffered Nebraska session' for: #bufferNebraska\\\\n! !\\\\n\\\\n!NebraskaNavigationMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/8/2000 11:34'!\\\\nbuttonScale\\\\n\\\\n\\\\t^self makeButton: '1x1' balloonText: 'Switch between 1x1 and scaled view' for: #toggleFullView\\\\n! !\\\\n\\\\n!NebraskaNavigationMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/8/2000 11:47'!\\\\ncurrentNavigatorVersion\\\\n\\\\n\\\\t^1\\\\t\\\\t\\\\\\\"not particularly relevant here\\\\\\\"! !\\\\n\\\\n!NebraskaNavigationMorph methodsFor: 'as yet unclassified' stamp: 'yo 11/4/2002 21:06'!\\\\nfontForButtons\\\\n\\\\n\\\\t^ TextStyle defaultFont.\\\\n\\\\t\\\\\\\"^Preferences standardButtonFont\\\\\\\"! !\\\\n\\\\n!NebraskaNavigationMorph methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:25'!\\\\nnebraskaBorder: aNebraskaBorder\\\\n\\\\n\\\\tnebraskaBorder := aNebraskaBorder! !\\\\n\\\\n!NebraskaNavigationMorph methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:25'!\\\\nnebraskaTerminal: aNebraskaTerminal\\\\n\\\\n\\\\tnebraskaTerminal := aNebraskaTerminal! !\\\\n\\\\n!NebraskaNavigationMorph methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:25'!\\\\npositionVertically\\\\n\\\\n\\\\t| w |\\\\n\\\\tw := self world ifNil: [^self].\\\\n\\\\tself top < w top ifTrue: [self top: w top].\\\\n\\\\tself bottom > w bottom ifTrue: [self bottom: w bottom].! !\\\\n\\\\n!NebraskaNavigationMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/8/2000 11:47'!\\\\nquitNebraska\\\\n\\\\n\\\\tnebraskaBorder ifNotNil: [nebraskaBorder delete].\\\\n\\\\tself delete.! !\\\\n\\\\n!NebraskaNavigationMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/8/2000 11:48'!\\\\ntoggleFullView\\\\n\\\\n\\\\tnebraskaBorder ifNotNil: [nebraskaBorder toggleFullView]! !\\\\n\\\\n\\\\n!NebraskaNavigationMorph methodsFor: 'dropping/grabbing' stamp: 'RAA 11/8/2000 11:42'!\\\\nwantsToBeDroppedInto: aMorph\\\\n\\\\n\\\\t\\\\\\\"avoid difficulties in placement\\\\\\\"\\\\n\\\\t^(aMorph isKindOf: NetworkTerminalMorph) not! !\\\\n\\\\n\\\\n!NebraskaNavigationMorph methodsFor: 'initialization' stamp: 'dgd 2/16/2003 14:11'!\\\\ndefaultColor\\\\n\\\\t\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color yellow ! !\\\\n\\\\n\\\\n!NebraskaNavigationMorph methodsFor: 'stepping and presenter' stamp: 'RAA 11/8/2000 11:37'!\\\\nstep\\\\n\\\\n\\\\tsuper step.\\\\n\\\\t(nebraskaBorder isNil or: [nebraskaBorder world isNil]) ifTrue: [self delete].! !\\\\n\\\\n\\\\n!NebraskaNavigationMorph methodsFor: 'the buttons' stamp: 'RAA 11/8/2000 11:36'!\\\\nbuttonQuit\\\\n\\\\n\\\\t^self makeButton: 'Quit' balloonText: 'Quit this Nebraska session' for: #quitNebraska\\\\n! !\\\\nModel subclass: #NebraskaServer\\\\n\\\\tinstanceVariableNames: 'worldDepth world clients listenQueue'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Nebraska-Morphic-Remote'!\\\\n!NebraskaServer commentStamp: '<historical>' prior: 0!\\\\nA Nebraska server has a private world and some collection of clients.  It associates a RemoteControlledHand for each client.  Redraw events in the world are broadcasted to all connected clients.  A Nebraska server can listen on a TCP/IP port and accept new clients. Current version has been modified so that the server serves the world in which it was launched. Other variations are certainly possible.\\\\n\\\\nTo start a server, execute the following code:\\\\n\\\\tNebraskaServerMorph serveWorld: World\\\\n\\\\nTo start a client, run the following in another image:\\\\n\\\\tNetworkTerminalMorph openAndConnectTo: 'servername'\\\\n\\\\nFill in your server's hostname for 'servername'. At this point, everything should be working!!\\\\n\\\\nBefore starting a server, you can tweak these:\\\\nBufferedCanvas enabled: false.\\\\nBufferedCanvas enabled: true.\\\\n\\\\nAt any time you can do these:\\\\nNebraskaDebug beginStats\\\\nNebraskaDebug showStats\\\\nNebraskaDebug showStats: #delays\\\\nNebraskaDebug showStats: #bigImage\\\\nNebraskaDebug showStats: #FormEncodeTimes\\\\nNebraskaDebug killStats\\\\n\\\\nNOTE: if you want to have a local view of the server, you shouldn't use the TCP connections. The problem is that the server will occasionally do a #flush, and it won't work due to single threading. The better solution is to use a LoopBackStringSocket instead of a regular StringSocket, but there is no handy method for that right now....\\\\n\\\\n\\\\n!\\\\n]style[(266 136 49 39 56 53 96 46 1 62 29 525)f1,f1cred;,f1,f1cblue;,f1,f1cblue;,f1,f1cblue;,f1,f1cred;,f1cblue;,f1!\\\\n\\\\n\\\\n!NebraskaServer methodsFor: 'accessing' stamp: 'ar 10/26/2000 14:23'!\\\\nclients\\\\n\\\\t^clients ifNil:[#()].! !\\\\n\\\\n\\\\n!NebraskaServer methodsFor: 'attributes' stamp: 'ls 4/11/2000 19:48'!\\\\nextent: newExtent  depth: newDepth\\\\n\\\\t\\\\\\\"modify the extent and/or depth of the shared world\\\\\\\"\\\\n\\\\tclients do: [ :client |\\\\n\\\\t\\\\tclient extent: newExtent depth: newDepth ].\\\\n\\\\tworld extent: newExtent.\\\\n\\\\n\\\\tworldDepth := newDepth.! !\\\\n\\\\n!NebraskaServer methodsFor: 'attributes' stamp: 'ls 4/11/2000 18:41'!\\\\nnumClients\\\\n\\\\t\\\\\\\"return the number of connected clients\\\\\\\"\\\\n\\\\t^clients size! !\\\\n\\\\n!NebraskaServer methodsFor: 'attributes' stamp: 'ls 3/25/2000 23:13'!\\\\nsharedWorld\\\\n\\\\t^world! !\\\\n\\\\n\\\\n!NebraskaServer methodsFor: 'initialization' stamp: 'ar 10/26/2000 14:02'!\\\\ndestroy\\\\n\\\\tself stopListening.\\\\n\\\\tclients do:[:each| each destroy].\\\\n\\\\tself breakDependents.! !\\\\n\\\\n!NebraskaServer methodsFor: 'initialization' stamp: 'ar 10/26/2000 14:20'!\\\\ninitialize\\\\n\\\\tclients := IdentitySet new.\\\\n\\\\tself extent: 800@600 depth: 16.! !\\\\n\\\\n!NebraskaServer methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:25'!\\\\ninitializeForWorld: aWorld\\\\n\\\\n\\\\tworld := aWorld.\\\\n\\\\tclients := IdentitySet new.\\\\n\\\\tself extent: world extent depth: Display depth.\\\\n\\\\taWorld remoteServer: self.! !\\\\n\\\\n\\\\n!NebraskaServer methodsFor: 'menus' stamp: 'RAA 7/31/2000 22:28'!\\\\nstep\\\\n\\\\n\\\\tself processIO.\\\\n\\\\n\\\\t\\\\\\\"savedWorld := Processor activeProcess world.\\\\n\\\\tProcessor activeProcess setWorld: world.\\\\\\\"\\\\n\\\\n\\\\tself flag: #bob.\\\\t\\\\t\\\\\\\"in this version, world is THE WORLD, so it steps itself\\\\\\\"\\\\n\\\\t\\\\\\\"world doOneCycle.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Processor activeProcess setWorld: savedWorld.\\\\\\\"\\\\n\\\\n\\\\tclients do: [ :each | each canvas apply: [ :ignore | ]].\\\\t\\\\\\\"for modes that need a little push\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!NebraskaServer methodsFor: 'networking' stamp: 'ls 3/25/2000 22:35'!\\\\nacceptNewConnections\\\\n\\\\t| connection |\\\\n\\\\tlistenQueue ifNil: [ ^self ].\\\\n\\\\t[ clients size > 20 ifTrue: [ \\\\\\\"too many connections!!\\\\\\\" ^self ].\\\\n\\\\t  connection := listenQueue getConnectionOrNil.  \\\\n\\\\t  connection isNil ] \\\\n\\\\twhileFalse: [\\\\n\\\\t  self addClientFromConnection: (StringSocket on: connection) ].! !\\\\n\\\\n!NebraskaServer methodsFor: 'networking' stamp: 'sd 11/20/2005 21:25'!\\\\nacceptNullConnection\\\\n\\\\n\\\\t| twins |\\\\n\\\\n\\\\ttwins := LoopbackStringSocket newPair.\\\\n\\\\tself addClientFromConnection: twins first.\\\\n\\\\t(NullTerminalMorph new connection: twins second) openInWorld.\\\\n! !\\\\n\\\\n!NebraskaServer methodsFor: 'networking' stamp: 'sd 11/20/2005 21:25'!\\\\nacceptPhonyConnection\\\\n\\\\n\\\\t| twins |\\\\n\\\\n\\\\ttwins := LoopbackStringSocket newPair.\\\\n\\\\tself addClientFromConnection: twins first.\\\\n\\\\t(NetworkTerminalMorph new connection: twins second) inspect \\\\\\\"openInWorld\\\\\\\".\\\\n! !\\\\n\\\\n!NebraskaServer methodsFor: 'networking' stamp: 'RAA 7/20/2000 10:03'!\\\\naddClientFromConnection: connection\\\\n\\\\t| client |\\\\n\\\\n\\\\tclient := NebraskaClient onConnection: connection.\\\\n\\\\tclients add: client.\\\\n\\\\tclient extent: world extent  depth: worldDepth.\\\\n\\\\tworld addRemoteClient: client.\\\\n\\\\tself changed: #numClients.! !\\\\n\\\\n!NebraskaServer methodsFor: 'networking' stamp: 'RAA 8/1/2000 00:01'!\\\\nbacklog\\\\n\\\\n\\\\t^clients inject: 0 into: [ :max :each | max max: each backlog]! !\\\\n\\\\n!NebraskaServer methodsFor: 'networking' stamp: 'ls 3/25/2000 22:36'!\\\\nprocessIO\\\\n\\\\tself pruneDeadConnections.\\\\n\\\\tself acceptNewConnections.! !\\\\n\\\\n!NebraskaServer methodsFor: 'networking' stamp: 'ar 10/26/2000 14:20'!\\\\npruneDeadConnections\\\\n\\\\t| deadConnections |\\\\n\\\\tdeadConnections := clients select: [ :client | client isConnected not ].\\\\n\\\\tdeadConnections do: [ :client |\\\\n\\\\t\\\\tworld removeRemoteClient: client].\\\\n\\\\n\\\\tdeadConnections isEmpty ifTrue:[ ^self ].\\\\n\\\\n\\\\tclients removeAll: deadConnections.\\\\n\\\\tself changed: #numClients.! !\\\\n\\\\n!NebraskaServer methodsFor: 'networking' stamp: 'ls 3/25/2000 22:31'!\\\\nstartListeningOnPort: portNumber\\\\n\\\\tSocket initializeNetwork.\\\\n\\\\tself stopListening.\\\\n\\\\tlistenQueue := ConnectionQueue portNumber: portNumber  queueLength: 5.! !\\\\n\\\\n!NebraskaServer methodsFor: 'networking' stamp: 'ls 3/25/2000 22:32'!\\\\nstopListening\\\\n\\\\tlistenQueue ifNil: [ ^self ].\\\\n\\\\tlistenQueue destroy.\\\\n\\\\tlistenQueue := nil.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nNebraskaServer class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!NebraskaServer class methodsFor: 'as yet unclassified' stamp: 'RAA 7/24/2000 12:06'!\\\\ndefaultPort\\\\n\\\\n\\\\t^9091! !\\\\n\\\\n!NebraskaServer class methodsFor: 'as yet unclassified' stamp: 'RAA 11/8/2000 14:59'!\\\\nextremelyBigRectangle\\\\n\\\\n\\\\t^(0@0 extent: 5000@5000)! !\\\\n\\\\n\\\\n!NebraskaServer class methodsFor: 'instance creation' stamp: 'mu 11/28/2003 19:38'!\\\\nnewForWorld: aWorld\\\\n\\\\n\\\\t^self basicNew initializeForWorld: aWorld! !\\\\n\\\\n!NebraskaServer class methodsFor: 'instance creation' stamp: 'ar 10/26/2000 14:00'!\\\\nserveWorld: aWorld\\\\n\\\\n\\\\t^self serveWorld: aWorld onPort: self defaultPort! !\\\\n\\\\n!NebraskaServer class methodsFor: 'instance creation' stamp: 'sd 11/20/2005 21:26'!\\\\nserveWorld: aWorld onPort: aPortNumber\\\\n\\\\n\\\\t| server |\\\\n\\\\n\\\\tUtilities authorName.\\\\t\\\\\\\"since we will need it later\\\\\\\"\\\\n\\\\n\\\\tserver := self newForWorld: aWorld.\\\\n\\\\tserver startListeningOnPort: aPortNumber.\\\\n\\\\t^server\\\\n\\\\t\\\\\\\"server acceptNullConnection\\\\\\\"\\\\t\\\\t\\\\\\\"server acceptPhonyConnection.\\\\\\\"\\\\n! !\\\\nAlignmentMorphBob1 subclass: #NebraskaServerMorph\\\\n\\\\tinstanceVariableNames: 'server slowCounter previousBacklog lastFullUpdateTime currentStatusString fullDisplay previousClients currentBacklogString'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Nebraska-Morphic-Remote'!\\\\n!NebraskaServerMorph commentStamp: '<historical>' prior: 0!\\\\nA cheezy morph that simply steps a Nebraska server instance over and over.!\\\\n\\\\n\\\\n!NebraskaServerMorph methodsFor: 'accessing' stamp: 'RAA 5/31/2001 15:03'!\\\\ncurrentBacklogString\\\\n\\\\n\\\\t^currentBacklogString! !\\\\n\\\\n!NebraskaServerMorph methodsFor: 'accessing' stamp: 'RAA 11/8/2000 16:07'!\\\\ncurrentStatusString\\\\n\\\\n\\\\t^currentStatusString! !\\\\n\\\\n!NebraskaServerMorph methodsFor: 'accessing' stamp: 'ar 10/26/2000 14:05'!\\\\nserver\\\\n\\\\t^self world remoteServer! !\\\\n\\\\n\\\\n!NebraskaServerMorph methodsFor: 'drawing' stamp: 'sd 11/20/2005 21:25'!\\\\nupdateCurrentStatusString\\\\n\\\\n\\\\tself server ifNil:[\\\\n\\\\t\\\\tcurrentStatusString := '<Nebraska not active>' translated.\\\\n\\\\t\\\\tcurrentBacklogString := ''.\\\\n\\\\t] ifNotNil:[\\\\n\\\\t\\\\tcurrentStatusString := \\\\n\\\\t\\\\t\\\\t' Nebraska: ' translated, \\\\n\\\\t\\\\t\\\\tself server numClients printString, \\\\n\\\\t\\\\t\\\\t' clients' translated.\\\\n\\\\t\\\\tcurrentBacklogString := 'backlog: ' translated,\\\\n\\\\t\\\\t\\\\t\\\\t((previousBacklog := self server backlog) // 1024) printString,'k'\\\\n\\\\t].\\\\n! !\\\\n\\\\n\\\\n!NebraskaServerMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:29'!\\\\ndefaultColor\\\\n\\\\t\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color white! !\\\\n\\\\n!NebraskaServerMorph methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:25'!\\\\ninitialize\\\\n\\\\t\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tfullDisplay := false.\\\\n\\\\t\\\\n\\\\tlastFullUpdateTime := 0.\\\\n\\\\tself listDirection: #topToBottom;\\\\n\\\\t\\\\t hResizing: #shrinkWrap;\\\\n\\\\t\\\\t vResizing: #shrinkWrap! !\\\\n\\\\n!NebraskaServerMorph methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:25'!\\\\nrebuild\\\\n\\\\n\\\\t| myServer toggle closeBox font |\\\\n\\\\n\\\\tfont := StrikeFont familyName: #Palatino size: 14.\\\\n\\\\tself removeAllMorphs.\\\\n\\\\tself setColorsAndBorder.\\\\n\\\\tself updateCurrentStatusString.\\\\n\\\\ttoggle := SimpleHierarchicalListMorph new perform: (\\\\n\\\\t\\\\tfullDisplay ifTrue: [#expandedForm] ifFalse: [#notExpandedForm]\\\\n\\\\t).\\\\n\\\\tcloseBox := SimpleButtonMorph new borderWidth: 0;\\\\n\\\\t\\\\t\\\\tlabel: 'X' font: Preferences standardButtonFont; color: Color transparent;\\\\n\\\\t\\\\t\\\\tactionSelector: #delete; target: self; extent: 14@14;\\\\n\\\\t\\\\t\\\\tsetBalloonText: 'End Nebrasks session'.\\\\n\\\\n\\\\tself addARow: {\\\\n\\\\t\\\\tself inAColumn: {closeBox}.\\\\n\\\\t\\\\tself inAColumn: {\\\\n\\\\t\\\\t\\\\tUpdatingStringMorph new\\\\n\\\\t\\\\t\\\\t\\\\tuseStringFormat;\\\\n\\\\t\\\\t\\\\t\\\\ttarget:  self;\\\\n\\\\t\\\\t\\\\t\\\\tfont: font;\\\\n\\\\t\\\\t\\\\t\\\\tgetSelector: #currentStatusString;\\\\n\\\\t\\\\t\\\\t\\\\tcontents: self currentStatusString;\\\\n\\\\t\\\\t\\\\t\\\\tstepTime: 2000;\\\\n\\\\t\\\\t\\\\t\\\\tlock.\\\\n\\\\t\\\\t}.\\\\n\\\\t\\\\tself inAColumn: {\\\\n\\\\t\\\\t\\\\ttoggle asMorph\\\\n\\\\t\\\\t\\\\t\\\\ton: #mouseUp send: #toggleFull to: self;\\\\n\\\\t\\\\t\\\\t\\\\tsetBalloonText: 'Show more or less of Nebraska Status'\\\\n\\\\t\\\\t}.\\\\n\\\\t}.\\\\n\\\\tmyServer := self server.\\\\n\\\\t(myServer isNil or: [fullDisplay not]) ifTrue: [\\\\n\\\\t\\\\t^World startSteppingSubmorphsOf: self\\\\n\\\\t].\\\\n\\\\t\\\\\\\"--- the expanded display ---\\\\\\\"\\\\n\\\\tself addARow: {\\\\n\\\\t\\\\tself inAColumn: {\\\\n\\\\t\\\\t\\\\tUpdatingStringMorph new\\\\n\\\\t\\\\t\\\\t\\\\tuseStringFormat;\\\\n\\\\t\\\\t\\\\t\\\\ttarget:  self;\\\\n\\\\t\\\\t\\\\t\\\\tfont: font;\\\\n\\\\t\\\\t\\\\t\\\\tgetSelector: #currentBacklogString;\\\\n\\\\t\\\\t\\\\t\\\\tcontents: self currentBacklogString;\\\\n\\\\t\\\\t\\\\t\\\\tstepTime: 2000;\\\\n\\\\t\\\\t\\\\t\\\\tlock.\\\\n\\\\t\\\\t}.\\\\n\\\\t}.\\\\n\\\\n\\\\tself addARow: {\\\\n\\\\t\\\\tself inAColumn: {\\\\n\\\\t\\\\t\\\\t(StringMorph contents: '--clients--' translated) lock; font: font.\\\\n\\\\t\\\\t}.\\\\n\\\\t}.\\\\n\\\\n\\\\tmyServer clients do: [ :each |\\\\n\\\\t\\\\tself addARow: {\\\\n\\\\t\\\\t\\\\tUpdatingStringMorph new\\\\n\\\\t\\\\t\\\\t\\\\tuseStringFormat;\\\\n\\\\t\\\\t\\\\t\\\\ttarget: each;\\\\n\\\\t\\\\t\\\\t\\\\tfont: font;\\\\n\\\\t\\\\t\\\\t\\\\tgetSelector: #currentStatusString;\\\\n\\\\t\\\\t\\\\t\\\\tcontents: each currentStatusString;\\\\n\\\\t\\\\t\\\\t\\\\tstepTime: 2000;\\\\n\\\\t\\\\t\\\\t\\\\tlock.\\\\n\\\\t\\\\t}\\\\n\\\\t].\\\\n\\\\tWorld startSteppingSubmorphsOf: self.! !\\\\n\\\\n!NebraskaServerMorph methodsFor: 'initialization' stamp: 'aoy 2/15/2003 21:35'!\\\\nsetColorsAndBorder\\\\n\\\\t| worldColor c |\\\\n\\\\tc := ((Preferences menuColorFromWorld and: [Display depth > 4]) \\\\n\\\\t\\\\t\\\\t\\\\tand: [(worldColor := self currentWorld color) isColor]) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[worldColor luminance > 0.7 \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [worldColor mixed: 0.8 with: Color black]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [worldColor mixed: 0.4 with: Color white]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [Preferences menuColor]. \\\\n\\\\tself color: c.\\\\n\\\\tself borderColor: #raised.\\\\n\\\\tself borderWidth: Preferences menuBorderWidth.\\\\n\\\\tself useRoundedCorners! !\\\\n\\\\n!NebraskaServerMorph methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:25'!\\\\ntoggleFull\\\\n\\\\n\\\\tfullDisplay := fullDisplay not.\\\\n\\\\tself rebuild.\\\\n! !\\\\n\\\\n\\\\n!NebraskaServerMorph methodsFor: 'stepping and presenter' stamp: 'sd 11/20/2005 21:25'!\\\\nstep\\\\n\\\\n\\\\t| now |\\\\n\\\\n\\\\tself server ifNil: [ ^self ].\\\\n\\\\tself server step.\\\\n\\\\tnow := Time millisecondClockValue.\\\\n\\\\t(now - lastFullUpdateTime) abs > 5000 ifTrue: [\\\\n\\\\t\\\\tlastFullUpdateTime := now.\\\\n\\\\t\\\\t(previousBacklog = self server backlog and: [self server clients = previousClients]) ifFalse: [\\\\n\\\\t\\\\t\\\\tpreviousClients := self server clients copy.\\\\n\\\\t\\\\t\\\\tself rebuild\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n! !\\\\n\\\\n\\\\n!NebraskaServerMorph methodsFor: 'submorphs-add/remove' stamp: 'ar 10/26/2000 14:07'!\\\\ndelete\\\\n\\\\tself server ifNotNil:[\\\\n\\\\t\\\\t(self confirm:'Shutdown the server?') \\\\n\\\\t\\\\t\\\\tifTrue:[self world remoteServer: nil]].\\\\n\\\\tsuper delete.! !\\\\n\\\\n\\\\n!NebraskaServerMorph methodsFor: 'testing' stamp: 'RAA 11/8/2000 15:57'!\\\\nstepTime\\\\n\\\\n\\\\t^10! !\\\\n\\\\n\\\\n!NebraskaServerMorph methodsFor: 'updating' stamp: 'RAA 11/8/2000 16:03'!\\\\nupdate: aSymbol\\\\n\\\\n\\\\tself rebuild.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nNebraskaServerMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!NebraskaServerMorph class methodsFor: 'as yet unclassified' stamp: 'RAA 8/15/2000 14:49'!\\\\nkillOldServers\\\\n\\\\n\\\\tNebraskaServerMorph allInstances do: [ :each |\\\\n\\\\t\\\\teach delete.\\\\n\\\\t].\\\\n\\\\tNebraskaServer allInstances do: [ :each |\\\\n\\\\t\\\\teach stopListening.\\\\n\\\\t\\\\tDependentsFields removeKey: each ifAbsent: [].\\\\n\\\\t].\\\\n! !\\\\n\\\\n!NebraskaServerMorph class methodsFor: 'as yet unclassified' stamp: 'yo 12/17/2005 23:06'!\\\\nserveWorld\\\\n\\\\n\\\\t^ self serveWorld: ActiveWorld.\\\\n! !\\\\n\\\\n!NebraskaServerMorph class methodsFor: 'as yet unclassified' stamp: 'yo 12/17/2005 23:07'!\\\\nserveWorldButton\\\\n\\\\n\\\\t| button |\\\\n\\\\tbutton _ ScriptableButton new.\\\\n\\\\tbutton target: NebraskaServerMorph.\\\\n\\\\tbutton actionSelector: #serveWorld.\\\\n\\\\tbutton arguments: #().\\\\n\\\\tbutton label: 'Share'.\\\\n\\\\tbutton color: Color yellow.\\\\n\\\\t^ button.\\\\n! !\\\\n\\\\n!NebraskaServerMorph class methodsFor: 'as yet unclassified' stamp: 'wiz 1/9/2005 15:12'!\\\\nserveWorld: aWorld\\\\n\\\\t\\\\\\\"Check to make sure things won't crash. See Mantis #0000519\\\\\\\"\\\\n\\\\taWorld isSafeToServe ifTrue:[\\\\n\\\\t\\\\t^self serveWorld: aWorld onPort: NebraskaServer defaultPort]\\\\n\\\\t! !\\\\n\\\\n!NebraskaServerMorph class methodsFor: 'as yet unclassified' stamp: 'ar 10/26/2000 14:05'!\\\\nserveWorld: aWorld onPort: aPortNumber\\\\n\\\\n\\\\t| server |\\\\n\\\\tserver := NebraskaServer serveWorld: aWorld onPort: aPortNumber.\\\\n\\\\t(self new) openInWorld: aWorld.\\\\n\\\\n\\\\t\\\\\\\"server acceptNullConnection\\\\\\\"\\\\t\\\\t\\\\\\\"server acceptPhonyConnection.\\\\\\\"\\\\n! !\\\\n\\\\n!NebraskaServerMorph class methodsFor: 'as yet unclassified' stamp: 'yo 12/17/2005 23:08'!\\\\nsupplementaryPartsDescriptions\\\\n\\\\t^ {DescriptionForPartsBin\\\\n\\\\t\\\\tformalName: 'NebraskaServer'\\\\n\\\\t\\\\tcategoryList: #('Collaborative')\\\\n\\\\t\\\\tdocumentation: 'A button to start the Nebraska desktop sharing server' translated\\\\n\\\\t\\\\tglobalReceiverSymbol: #NebraskaServerMorph\\\\n\\\\t\\\\tnativitySelector: #serveWorldButton\\\\n\\\\t}! !\\\\nObject subclass: #NetNameResolver\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: 'DefaultHostName HaveNetwork ResolverBusy ResolverError ResolverMutex ResolverReady ResolverSemaphore ResolverUninitialized'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Network-Kernel'!\\\\n!NetNameResolver commentStamp: '<historical>' prior: 0!\\\\nThis class implements TCP/IP style network name lookup and translation facilities.\\\\n\\\\nAttempt to keep track of whether there is a network available.\\\\nHaveNetwork\\\\ttrue if last attempt to contact the network was successful.\\\\nLastContact\\\\t\\\\tTime of that contact (totalSeconds).\\\\nhaveNetwork\\\\treturns true, false, or #expired.  True means there was contact in the last 30 minutes.  False means contact failed or was false last time we asked.  Get out of false state by making contact with a server in some way (FileList or updates).!\\\\n\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nNetNameResolver class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!NetNameResolver class methodsFor: 'address string utils' stamp: 'jm 9/15/97 06:19'!\\\\naddressFromString: addressString\\\\n\\\\t\\\\\\\"Return the internet address represented by the given string. The string should contain four positive decimal integers delimited by periods, commas, or spaces, where each integer represents one address byte. Return nil if the string is not a host address in an acceptable format.\\\\\\\"\\\\n\\\\t\\\\\\\"NetNameResolver addressFromString: '1.2.3.4'\\\\\\\"\\\\n\\\\t\\\\\\\"NetNameResolver addressFromString: '1,2,3,4'\\\\\\\"\\\\n\\\\t\\\\\\\"NetNameResolver addressFromString: '1 2 3 4'\\\\\\\"\\\\n\\\\n\\\\t| newAddr s byte delimiter |\\\\n\\\\tnewAddr _ ByteArray new: 4.\\\\n\\\\ts _ ReadStream on: addressString.\\\\n\\\\ts skipSeparators.\\\\n\\\\t1 to: 4 do: [:i |\\\\n\\\\t\\\\tbyte _ self readDecimalByteFrom: s.\\\\n\\\\t\\\\tbyte = nil ifTrue: [^ nil].\\\\n\\\\t\\\\tnewAddr at: i put: byte.\\\\n\\\\t\\\\ti < 4 ifTrue: [\\\\n\\\\t\\\\t\\\\tdelimiter _ s next.\\\\n\\\\t\\\\t\\\\t((delimiter = $.) or: [(delimiter = $,) or: [delimiter = $ ]])\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [^ nil]]].\\\\n\\\\t^ newAddr\\\\n! !\\\\n\\\\n!NetNameResolver class methodsFor: 'address string utils' stamp: 'jm 9/15/97 16:52'!\\\\nstringFromAddress: addr\\\\n\\\\t\\\\\\\"Return a string representing the given host address as four decimal bytes delimited with decimal points.\\\\\\\"\\\\n\\\\t\\\\\\\"NetNameResolver stringFromAddress: NetNameResolver localHostAddress\\\\\\\"\\\\n\\\\n\\\\t| s |\\\\n\\\\ts _ WriteStream on: ''.\\\\n\\\\t1 to: 3 do: [ :i | (addr at: i) printOn: s. s nextPut: $.].\\\\n\\\\t(addr at: 4) printOn: s.\\\\n\\\\t^ s contents\\\\n! !\\\\n\\\\n\\\\n!NetNameResolver class methodsFor: 'class initialization' stamp: 'jm 9/17/97 16:18'!\\\\ninitialize\\\\n\\\\t\\\\\\\"NetNameResolver initialize\\\\\\\"\\\\n\\\\t\\\\\\\"Note: On the Mac, the name resolver is asynchronous (i.e., Squeak can do other things while it is working), but can only handle one request at a time. On other platforms, such as Unix, the resolver is synchronous; a call to, say, the name lookup primitive will block all Squeak processes until it returns.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Resolver Status Values\\\\\\\"\\\\n\\\\tResolverUninitialized _ 0.\\\\t\\\\\\\"network is not initialized\\\\\\\"\\\\n\\\\tResolverReady _ 1.\\\\t\\\\t\\\\t\\\\\\\"resolver idle, last request succeeded\\\\\\\"\\\\n\\\\tResolverBusy _ 2.\\\\t\\\\t\\\\t\\\\\\\"lookup in progress\\\\\\\"\\\\n\\\\tResolverError _ 3.\\\\t\\\\t\\\\t\\\\\\\"resolver idle, last request failed\\\\\\\"\\\\n\\\\n\\\\tDefaultHostName _ ''.\\\\n! !\\\\n\\\\n\\\\n!NetNameResolver class methodsFor: 'lookups' stamp: 'ls 9/5/1998 01:14'!\\\\naddressForName: aString\\\\n\\\\t^self addressForName: aString timeout: 60! !\\\\n\\\\n!NetNameResolver class methodsFor: 'lookups' stamp: 'mu 9/7/2003 22:53'!\\\\naddressForName: hostName timeout: secs\\\\n\\\\t\\\\\\\"Look up the given host name and return its address. Return nil if the address is not found in the given number of seconds.\\\\\\\"\\\\n\\\\t\\\\\\\"NetNameResolver addressForName: 'create.ucsb.edu' timeout: 30\\\\\\\"\\\\n\\\\t\\\\\\\"NetNameResolver addressForName: '100000jobs.de' timeout: 30\\\\\\\"\\\\n\\\\t\\\\\\\"NetNameResolver addressForName: '1.7.6.4' timeout: 30\\\\\\\"\\\\n\\\\t\\\\\\\"NetNameResolver addressForName: '' timeout: 30 (This seems to return nil?)\\\\\\\"\\\\n\\\\n\\\\t| deadline result |\\\\n\\\\tself initializeNetwork.\\\\n\\\\t\\\\\\\"check if this is a valid numeric host address (e.g. 1.2.3.4)\\\\\\\"\\\\n\\\\tresult _ self addressFromString: hostName.\\\\n\\\\tresult isNil ifFalse: [^result].\\\\n\\\\n\\\\t\\\\\\\"Look up a host name, including ones that start with a digit (e.g. 100000jobs.de or squeak.org)\\\\\\\"\\\\n\\\\tdeadline _ Time millisecondClockValue + (secs * 1000).\\\\n\\\\t\\\\\\\"Protect the execution of this block, as the ResolverSemaphore is used for both parts of the transaction.\\\\\\\"\\\\n\\\\tself resolverMutex\\\\n\\\\t\\\\tcritical: [\\\\n\\\\t\\\\t\\\\t(self waitForResolverReadyUntil: deadline)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself primStartLookupOfName: hostName.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(self waitForCompletionUntil: deadline)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [result _ self primNameLookupResult]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [(NameLookupFailure hostName: hostName) signal: 'Could not resolve the server named: ', hostName]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [(NameLookupFailure hostName: hostName) signal: 'Could not resolve the server named: ', hostName]].\\\\n\\\\t^result! !\\\\n\\\\n!NetNameResolver class methodsFor: 'lookups' stamp: 'jm 9/15/97 16:52'!\\\\nlocalAddressString\\\\n\\\\t\\\\\\\"Return a string representing the local host address as four decimal bytes delimited with decimal points.\\\\\\\"\\\\n\\\\t\\\\\\\"NetNameResolver localAddressString\\\\\\\"\\\\n\\\\n\\\\t^ NetNameResolver stringFromAddress: NetNameResolver localHostAddress\\\\n! !\\\\n\\\\n!NetNameResolver class methodsFor: 'lookups' stamp: 'mir 2/22/2002 15:50'!\\\\nlocalHostAddress\\\\n\\\\t\\\\\\\"Return the local address of this host.\\\\\\\"\\\\n\\\\t\\\\\\\"NetNameResolver localHostAddress\\\\\\\"\\\\n\\\\n\\\\tself initializeNetwork.\\\\n\\\\t^ self primLocalAddress\\\\n! !\\\\n\\\\n!NetNameResolver class methodsFor: 'lookups' stamp: 'mir 2/22/2002 15:12'!\\\\nlocalHostName\\\\n\\\\t\\\\\\\"Return the local name of this host.\\\\\\\"\\\\n\\\\t\\\\\\\"NetNameResolver localHostName\\\\\\\"\\\\n\\\\n\\\\t| hostName |\\\\n\\\\thostName _ NetNameResolver\\\\n\\\\t\\\\tnameForAddress: self localHostAddress\\\\n\\\\t\\\\ttimeout: 5.\\\\n\\\\t^hostName\\\\n\\\\t\\\\tifNil: [self localAddressString]\\\\n\\\\t\\\\tifNotNil: [hostName]! !\\\\n\\\\n!NetNameResolver class methodsFor: 'lookups' stamp: 'nk 6/27/2003 10:51'!\\\\nnameForAddress: hostAddress timeout: secs\\\\n\\\\t\\\\\\\"Look up the given host address and return its name. Return nil if the lookup fails or is not completed in the given number of seconds. Depends on the given host address being known to the gateway, which may not be the case for dynamically allocated addresses.\\\\\\\"\\\\n\\\\t\\\\\\\"NetNameResolver\\\\n\\\\t\\\\tnameForAddress: (NetNameResolver addressFromString: '128.111.92.2')\\\\n\\\\t\\\\ttimeout: 30\\\\\\\"\\\\n\\\\n\\\\t| deadline result |\\\\n\\\\tself initializeNetwork.\\\\n\\\\tdeadline _ Time millisecondClockValue + (secs * 1000).\\\\n\\\\t\\\\\\\"Protect the execution of this block, as the ResolverSemaphore is used for both parts of the transaction.\\\\\\\"\\\\n\\\\tself resolverMutex\\\\n\\\\t\\\\tcritical: [\\\\n\\\\t\\\\t\\\\tresult _ (self waitForResolverReadyUntil: deadline)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself primStartLookupOfAddress: hostAddress.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(self waitForCompletionUntil: deadline)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self primAddressLookupResult]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [nil]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [nil]].\\\\n\\\\t^result\\\\n! !\\\\n\\\\n!NetNameResolver class methodsFor: 'lookups' stamp: 'jm 9/17/97 16:26'!\\\\npromptUserForHostAddress\\\\n\\\\t\\\\\\\"Ask the user for a host name and return its address.\\\\\\\"\\\\n\\\\t\\\\\\\"NetNameResolver promptUserForHostAddress\\\\\\\"\\\\n\\\\n\\\\t^ NetNameResolver promptUserForHostAddressDefault: ''\\\\n! !\\\\n\\\\n!NetNameResolver class methodsFor: 'lookups' stamp: 'rbb 3/1/2005 11:01'!\\\\npromptUserForHostAddressDefault: defaultName\\\\n\\\\t\\\\\\\"Ask the user for a host name and return its address. If the default name is the empty string, use the last host name as the default.\\\\\\\"\\\\n\\\\t\\\\\\\"NetNameResolver promptUserForHostAddressDefault: ''\\\\\\\"\\\\n\\\\n\\\\t| default hostName serverAddr |\\\\n\\\\tdefaultName isEmpty\\\\n\\\\t\\\\tifTrue: [default := DefaultHostName]\\\\n\\\\t\\\\tifFalse: [default := defaultName].\\\\n\\\\thostName := UIManager default\\\\n\\\\t\\\\trequest: 'Host name or address?'\\\\n\\\\t\\\\tinitialAnswer: default.\\\\n\\\\thostName isEmpty ifTrue: [^ 0].\\\\n\\\\tserverAddr := NetNameResolver addressForName: hostName timeout: 15.\\\\n\\\\thostName size > 0 ifTrue: [DefaultHostName := hostName].\\\\n\\\\t^ serverAddr! !\\\\n\\\\n!NetNameResolver class methodsFor: 'lookups' stamp: 'JMM 5/3/2000 11:25'!\\\\nresolverError\\\\n\\\\t^self primNameResolverError\\\\n! !\\\\n\\\\n!NetNameResolver class methodsFor: 'lookups' stamp: 'JMM 5/3/2000 11:25'!\\\\nresolverStatus\\\\n\\\\t^self primNameResolverStatus\\\\n! !\\\\n\\\\n\\\\n!NetNameResolver class methodsFor: 'network initialization' stamp: 'mir 2/22/2002 15:03'!\\\\ninitializeNetwork\\\\n\\\\t\\\\\\\"Initialize the network drivers and record the semaphore to be used by the resolver. Do nothing if the network is already initialized. Evaluate the given block if network initialization fails.\\\\\\\"\\\\n\\\\t\\\\\\\"NetNameResolver initializeNetwork\\\\\\\"\\\\n\\\\n\\\\t| semaIndex |\\\\n\\\\tself resolverStatus = ResolverUninitialized\\\\n\\\\t\\\\tifFalse: [^HaveNetwork _ true].  \\\\\\\"network is already initialized\\\\\\\"\\\\n\\\\n\\\\tHaveNetwork _ false.\\\\t\\\\\\\"in case abort\\\\\\\"\\\\n\\\\tResolverSemaphore _ Semaphore new.\\\\n\\\\tsemaIndex _ Smalltalk registerExternalObject: ResolverSemaphore.\\\\n\\\\n\\\\t\\\\\\\"result is nil if network initialization failed, self if it succeeds\\\\\\\"\\\\n\\\\t(self primInitializeNetwork: semaIndex)\\\\n\\\\t\\\\tifNil: [NoNetworkError signal: 'failed network initialization']\\\\n\\\\t\\\\tifNotNil: [HaveNetwork _ true].\\\\n! !\\\\n\\\\n!NetNameResolver class methodsFor: 'network initialization' stamp: 'ar 2/2/2001 15:09'!\\\\nprimInitializeNetwork: resolverSemaIndex\\\\n\\\\t\\\\\\\"Initialize the network drivers on platforms that need it, such as the Macintosh, and return nil if network initialization failed or the reciever if it succeeds. Since mobile computers may not always be connected to a network, this method should NOT be called automatically at startup time; rather, it should be called when first starting a networking application. It is a noop if the network driver has already been initialized. If non-zero, resolverSemaIndex is the index of a VM semaphore to be associated with the network name resolver. This semaphore will be signalled when the resolver status changes, such as when a name lookup query is completed.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: some platforms (e.g., Mac) only allow only one name lookup query at a time, so a manager process should be used to serialize resolver lookup requests.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveInitializeNetwork' module: 'SocketPlugin'>\\\\n\\\\t^ nil  \\\\\\\"return nil if primitive fails\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!NetNameResolver class methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimAbortLookup\\\\n\\\\t\\\\\\\"Abort the current lookup operation, freeing the name resolver for the next query.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveResolverAbortLookup' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!NetNameResolver class methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimAddressLookupResult\\\\n\\\\t\\\\\\\"Return the host name found by the last host address lookup. Returns nil if the last lookup was unsuccessful.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveResolverAddressLookupResult' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!NetNameResolver class methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimLocalAddress\\\\n\\\\t\\\\\\\"Return the local address of this host.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveResolverLocalAddress' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!NetNameResolver class methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimNameLookupResult\\\\n\\\\t\\\\\\\"Return the host address found by the last host name lookup. Returns nil if the last lookup was unsuccessful.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveResolverNameLookupResult' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!NetNameResolver class methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimNameResolverError\\\\n\\\\t\\\\\\\"Return an integer reflecting the error status of the last network name resolver request. Zero means no error.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveResolverError' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!NetNameResolver class methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimNameResolverStatus\\\\n\\\\t\\\\\\\"Return an integer reflecting the status of the network name resolver. For a list of possible values, see the comment in the 'initialize' method of this class.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveResolverStatus' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!NetNameResolver class methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimStartLookupOfAddress: hostAddr\\\\n\\\\t\\\\\\\"Look up the given host address in the Domain Name Server to find its name. This call is asynchronous. To get the results, wait for it to complete or time out and then use primAddressLookupResult.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveResolverStartAddressLookup' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!NetNameResolver class methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimStartLookupOfName: hostName\\\\n\\\\t\\\\\\\"Look up the given host name in the Domain Name Server to find its address. This call is asynchronous. To get the results, wait for it to complete or time out and then use primNameLookupResult.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveResolverStartNameLookup' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n\\\\n!NetNameResolver class methodsFor: 'private' stamp: 'JMM 5/3/2000 13:57'!\\\\nreadDecimalByteFrom: aStream\\\\n\\\\t\\\\\\\"Read a positive, decimal integer from the given stream. Stop when a non-digit or end-of-stream is encountered. Return nil if stream is not positioned at a decimal digit or if the integer value read exceeds 255.\\\\nJMM - 000503 fixed didn't work correctly\\\\\\\"\\\\n\\\\n\\\\t| digitSeen value digit |\\\\n\\\\tdigitSeen _ false.\\\\n\\\\tvalue _ 0.\\\\n\\\\t[aStream atEnd] whileFalse: \\\\n\\\\t\\\\t[digit _ aStream next digitValue.\\\\n\\\\t\\\\t(digit < 0 or: [digit > 9]) ifTrue: [\\\\n\\\\t\\\\t\\\\taStream skip: -1.\\\\n\\\\t\\\\t\\\\t(digitSeen not or: [value > 255]) ifTrue: [^ nil].\\\\n\\\\t\\\\t\\\\t^ value].\\\\n\\\\t\\\\tdigitSeen _ true.\\\\n\\\\t\\\\tvalue _ (value * 10) + digit].\\\\n\\\\t(digitSeen not or: [value > 255]) ifTrue: [^ nil].\\\\n\\\\t^ value\\\\n! !\\\\n\\\\n!NetNameResolver class methodsFor: 'private' stamp: 'mir 6/18/2001 21:05'!\\\\nresolverMutex\\\\n\\\\tResolverMutex ifNil: [ResolverMutex _ Semaphore forMutualExclusion].\\\\n\\\\t^ResolverMutex! !\\\\n\\\\n!NetNameResolver class methodsFor: 'private' stamp: 'JMM 5/3/2000 11:35'!\\\\nwaitForCompletionUntil: deadline\\\\n\\\\t\\\\\\\"Wait up to the given number of seconds for the resolver to be ready to accept a new request. Return true if the resolver is ready, false if the network is not initialized or the resolver does not become free within the given time period.\\\\\\\"\\\\n\\\\n\\\\t| status |\\\\n\\\\tstatus _ self resolverStatus.\\\\n\\\\t[(status = ResolverBusy) and:\\\\n\\\\t [Time millisecondClockValue < deadline]]\\\\n\\\\t\\\\twhileTrue: [\\\\n\\\\t\\\\t\\\\t\\\\\\\"wait for resolver to be available\\\\\\\"\\\\n\\\\t\\\\t\\\\tResolverSemaphore waitTimeoutMSecs: (deadline - Time millisecondClockValue).\\\\n\\\\t\\\\t\\\\tstatus _ self resolverStatus].\\\\n\\\\n\\\\tstatus = ResolverReady\\\\n\\\\t\\\\tifTrue: [^ true]\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\tstatus = ResolverBusy ifTrue: [self primAbortLookup].\\\\n\\\\t\\\\t\\\\t^ false].\\\\n! !\\\\n\\\\n!NetNameResolver class methodsFor: 'private' stamp: 'JMM 5/3/2000 11:36'!\\\\nwaitForResolverReadyUntil: deadline\\\\n\\\\t\\\\\\\"Wait up to the given number of seconds for the resolver to be ready to accept a new request. Return true if the resolver is not busy, false if the network is not initialized or the resolver does not become free within the given time period.\\\\\\\"\\\\n\\\\n\\\\t| status |\\\\n\\\\tstatus _ self resolverStatus.\\\\n\\\\tstatus = ResolverUninitialized ifTrue: [^ false].\\\\n\\\\n\\\\t[(status = ResolverBusy) and:\\\\n\\\\t [Time millisecondClockValue < deadline]]\\\\n\\\\t\\\\twhileTrue: [\\\\n\\\\t\\\\t\\\\t\\\\\\\"wait for resolver to be available\\\\\\\"\\\\n\\\\t\\\\t\\\\tResolverSemaphore waitTimeoutMSecs: (deadline - Time millisecondClockValue).\\\\n\\\\t\\\\t\\\\tstatus _ self resolverStatus].\\\\n\\\\n\\\\t^ status ~= ResolverBusy\\\\n! !\\\\nError subclass: #NetworkError\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Network-Kernel'!\\\\n!NetworkError commentStamp: 'mir 5/12/2003 18:12' prior: 0!\\\\nAbstract super class for all network related exceptions.!\\\\n\\\\nEmbeddedWorldBorderMorph subclass: #NetworkTerminalBorderMorph\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Nebraska-Morphic-Remote'!\\\\n\\\\n!NetworkTerminalBorderMorph methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:25'!\\\\ntoggleFullView\\\\n\\\\t\\\\\\\"Toggle the full view for network terminal\\\\\\\"\\\\n\\\\t| fullExtent priorExtent |\\\\n\\\\tfullExtent := self worldIEnclose extent + (2 * self borderWidth).\\\\n\\\\tpriorExtent := self valueOfProperty: #priorExtent.\\\\n\\\\tpriorExtent ifNil:[\\\\n\\\\t\\\\tself setProperty: #priorExtent toValue: self extent.\\\\n\\\\t\\\\tself extent: fullExtent.\\\\n\\\\t\\\\tself position: self position + self borderWidth asPoint negated.\\\\n\\\\t] ifNotNil:[\\\\n\\\\t\\\\tself removeProperty: #priorExtent.\\\\n\\\\t\\\\tself extent: priorExtent.\\\\n\\\\t\\\\tself position: (self position max: 0@0).\\\\n\\\\t].! !\\\\n\\\\n\\\\n!NetworkTerminalBorderMorph methodsFor: 'boxes' stamp: 'RAA 8/15/2000 12:21'!\\\\nboxesAndColorsAndSelectors\\\\n\\\\n\\\\t^#()! !\\\\n\\\\n\\\\n!NetworkTerminalBorderMorph methodsFor: 'initialization' stamp: 'RAA 12/14/2000 14:12'!\\\\ninitialize\\\\n\\\\n\\\\tsuper initialize.\\\\n\\\\tself setBalloonText: nil.\\\\t\\\\t\\\\\\\"'I am a view on another Squeak'.\\\\\\\"\\\\n\\\\tself layoutInset: 0.\\\\n! !\\\\nMorph subclass: #NetworkTerminalMorph\\\\n\\\\tinstanceVariableNames: 'connection decoder eventEncoder backgroundForm enteringHand'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Nebraska-Morphic-Remote'!\\\\n!NetworkTerminalMorph commentStamp: '<historical>' prior: 0!\\\\nA morph used to communicate with a remote image.  It sends all mouse/keyboard events to the remote side, and it displays canvas commands that are sent back.!\\\\n\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'as yet unclassified' stamp: 'RAA 8/29/2000 12:13'!\\\\naddScalingMenuItems: menu hand: aHandMorph\\\\n\\\\n\\\\t\\\\\\\"for comaptibility when in scaled frame\\\\\\\"! !\\\\n\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'drawing' stamp: 'RAA 7/25/2000 13:00'!\\\\nareasRemainingToFill: aRectangle\\\\n\\\\t\\\\\\\"I assume that we are opaque\\\\\\\"\\\\n\\\\n\\\\t^ aRectangle areasOutside: self bounds! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'drawing' stamp: 'RAA 7/24/2000 11:43'!\\\\ndrawOn: aCanvas\\\\n\\\\n\\\\tbackgroundForm ifNotNil: [\\\\n\\\\t\\\\taCanvas clipBy: bounds during: [ :c |\\\\n\\\\t\\\\t\\\\tc drawImage: backgroundForm at: bounds topLeft\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'drawing' stamp: 'sd 11/20/2005 21:25'!\\\\nforceToFront: aRegion\\\\n\\\\t| highQuality |\\\\n\\\\t\\\\\\\"force the given region from the drawing form onto the background form\\\\\\\"\\\\n\\\\n\\\\thighQuality := false.\\\\t\\\\t\\\\\\\"highQuality is slower\\\\\\\"\\\\n\\\\n\\\\tself updateBackgroundForm.\\\\n\\\\tbackgroundForm\\\\n\\\\t\\\\tcopy: aRegion\\\\n\\\\t\\\\tfrom: aRegion topLeft\\\\n\\\\t\\\\tin: decoder drawingForm\\\\n\\\\t\\\\trule: Form over.\\\\n\\\\tself invalidRect: (\\\\n\\\\t\\\\thighQuality ifTrue: [\\\\n\\\\t\\\\t\\\\tbounds\\\\n\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\t(aRegion expandBy: 4) translateBy: bounds topLeft\\\\t\\\\\\\"try to remove gribblys\\\\\\\"\\\\n\\\\t\\\\t]\\\\n\\\\t)\\\\n! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'drawing' stamp: 'sd 11/20/2005 21:26'!\\\\nupdateBackgroundForm\\\\n\\\\t\\\\\\\"make sure that our background form matches what the server has most recently requested\\\\\\\"\\\\n\\\\n\\\\t| drawingForm |\\\\n\\\\n\\\\tdrawingForm := decoder drawingForm.\\\\n\\\\t(drawingForm extent = backgroundForm extent and: [\\\\n\\\\t\\\\tdrawingForm depth = backgroundForm depth ]) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\\\\"they match just fine\\\\\\\"\\\\n\\\\t\\\\t\\\\t^self ].\\\\n\\\\n\\\\tbackgroundForm := drawingForm deepCopy.\\\\t\\\\t\\\\\\\"need copy to capture the moment\\\\\\\"\\\\n\\\\tself extent: backgroundForm extent.! !\\\\n\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'dropping/grabbing' stamp: 'RAA 11/5/2000 13:26'!\\\\nwantsDroppedMorph: aMorph event: evt\\\\n\\\\n\\\\t^true.! !\\\\n\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'event handling' stamp: 'RAA 11/5/2000 13:23'!\\\\ncommResult: anArrayOfAssociations\\\\n\\\\n\\\\t\\\\\\\"ignore for now\\\\\\\"! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'event handling' stamp: 'ar 10/26/2000 15:25'!\\\\nhandlesMouseOver: evt\\\\n\\\\t^true! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'event handling' stamp: 'ar 10/26/2000 15:24'!\\\\nmouseEnter: evt\\\\n\\\\tevt hand newKeyboardFocus: self.\\\\n\\\\tevt hand needsToBeDrawn ifTrue:[Cursor blank show].! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'event handling' stamp: 'ar 10/26/2000 15:25'!\\\\nmouseLeave: evt\\\\n\\\\n\\\\tevt hand needsToBeDrawn ifTrue:[Cursor normal show].! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'event handling' stamp: 'RAA 8/15/2000 11:34'!\\\\nsendEvent: evt\\\\n\\\\n\\\\tself sendEventAsIs: (evt translatedBy: bounds topLeft negated).! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'event handling' stamp: 'RAA 8/15/2000 11:33'!\\\\nsendEventAsIs: evt\\\\n\\\\n\\\\teventEncoder ifNil: [ ^self ].\\\\n\\\\teventEncoder sendEvent: evt.! !\\\\n\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'events-processing' stamp: 'ar 10/24/2000 18:02'!\\\\nhandleKeyDown: anEvent\\\\n\\\\tanEvent wasHandled ifTrue:[^self].\\\\n\\\\t(self handlesKeyboard: anEvent) ifFalse:[^self].\\\\n\\\\tanEvent wasHandled: true.\\\\n\\\\tself sendEventAsIs: anEvent.! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'events-processing' stamp: 'ar 10/24/2000 18:02'!\\\\nhandleKeyUp: anEvent\\\\n\\\\tanEvent wasHandled ifTrue:[^self].\\\\n\\\\t(self handlesKeyboard: anEvent) ifFalse:[^self].\\\\n\\\\tanEvent wasHandled: true.\\\\n\\\\tself sendEventAsIs: anEvent.! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'events-processing' stamp: 'ar 10/24/2000 18:11'!\\\\nhandleKeystroke: anEvent\\\\n\\\\tanEvent wasHandled ifTrue:[^self].\\\\n\\\\tanEvent wasHandled: true.\\\\n\\\\tself sendEventAsIs: anEvent.! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'events-processing' stamp: 'ar 10/24/2000 18:03'!\\\\nhandleMouseDown: anEvent\\\\n\\\\tanEvent wasHandled ifTrue:[^self].\\\\n\\\\tanEvent hand removePendingBalloonFor: self.\\\\n\\\\tanEvent hand removePendingHaloFor: self.\\\\n\\\\tanEvent wasHandled: true.\\\\n\\\\tanEvent hand newMouseFocus: self event: anEvent.\\\\n\\\\tanEvent hand removeHaloFromClick: anEvent on: self.\\\\n\\\\tself sendEventAsIs: anEvent.! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'events-processing' stamp: 'ar 10/24/2000 18:04'!\\\\nhandleMouseMove: anEvent\\\\n\\\\tanEvent wasHandled ifTrue:[^self]. \\\\\\\"not interested\\\\\\\"\\\\n\\\\t(anEvent hand hasSubmorphs) ifTrue:[^self].\\\\n\\\\t(anEvent anyButtonPressed and:[anEvent hand mouseFocus ~~ self]) ifTrue:[^self].\\\\n\\\\tanEvent wasHandled: true.\\\\n\\\\tself sendEventAsIs: anEvent.! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'events-processing' stamp: 'ar 10/24/2000 18:03'!\\\\nhandleMouseUp: anEvent\\\\n\\\\tanEvent wasHandled ifTrue:[^self]. \\\\\\\"not interested\\\\\\\"\\\\n\\\\tanEvent hand mouseFocus == self ifFalse:[^self]. \\\\\\\"Not interested in other parties\\\\\\\"\\\\n\\\\tanEvent hand releaseMouseFocus: self.\\\\n\\\\tanEvent wasHandled: true.\\\\n\\\\tself sendEventAsIs: anEvent.! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'events-processing' stamp: 'ar 10/24/2000 18:06'!\\\\nhandlerForMouseDown: anEvent\\\\n\\\\t^self! !\\\\n\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'geometry' stamp: 'RAA 7/24/2000 11:35'!\\\\nextent: newExtent\\\\n\\\\n\\\\tsuper extent: newExtent.\\\\n\\\\teventEncoder sendViewExtent: self extent! !\\\\n\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'initialization' stamp: 'RAA 8/15/2000 12:06'!\\\\nconnection: aConnection\\\\n\\\\n\\\\tconnection := aConnection.\\\\n\\\\tdecoder := CanvasDecoder connection: aConnection.\\\\n\\\\teventEncoder := MorphicEventEncoder on: aConnection.! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:26'!\\\\ninitialize\\\\n\\\\tsuper initialize.\\\\n\\\\tbackgroundForm := (\\\\n\\\\t\\\\t(StringMorph contents: '......' font: (TextStyle default fontOfSize: 24))\\\\n\\\\t\\\\t\\\\tcolor: Color white\\\\n\\\\t) imageForm.\\\\n\\\\tbounds := backgroundForm boundingBox.\\\\n! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'initialization' stamp: 'RAA 8/15/2000 10:45'!\\\\nopenInStyle: aSymbol\\\\n\\\\n\\\\taSymbol == #naked ifTrue: [\\\\n\\\\t\\\\tself openInWorld.\\\\n\\\\t].\\\\n\\\\taSymbol == #scaled ifTrue: [\\\\n\\\\t\\\\tself openScaled.\\\\n\\\\t].\\\\n\\\\taSymbol == #bordered ifTrue: [\\\\n\\\\t\\\\tAlignmentMorph newColumn\\\\n\\\\t\\\\t\\\\thResizing: \\\\t#shrinkWrap;\\\\n\\\\t\\\\t\\\\tvResizing: \\\\t#shrinkWrap;\\\\n\\\\t\\\\t\\\\tborderWidth: 8;\\\\n\\\\t\\\\t\\\\tborderColor: Color blue;\\\\n\\\\t\\\\t\\\\taddMorph: self;\\\\n\\\\t\\\\t\\\\topenInWorld.\\\\n\\\\t].\\\\n\\\\n\\\\t[\\\\n\\\\t\\\\t[self world isNil] whileFalse: [(Delay forSeconds: 2) wait].\\\\n\\\\t\\\\tself disconnect.\\\\n\\\\t] fork.\\\\n\\\\n! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:26'!\\\\nopenScaled\\\\n\\\\n\\\\t| window tm |\\\\n\\\\twindow := NetworkTerminalBorderMorph new\\\\n\\\\t\\\\tminWidth: 100;\\\\n\\\\t\\\\tminHeight: 100;\\\\n\\\\t\\\\tborderWidth: 8;\\\\n\\\\t\\\\tborderColor: Color orange;\\\\n\\\\t\\\\tbounds: (0@0 extent: Display extent * 3 // 4).\\\\n\\\\ttm := BOBTransformationMorph new.\\\\n\\\\ttm useRegularWarpBlt: true.\\\\t\\\\t\\\\\\\"try to reduce memory used\\\\\\\"\\\\n\\\\twindow addMorphBack: tm.\\\\n\\\\ttm addMorph: self.\\\\n\\\\twindow openInWorld.\\\\n\\\\tNebraskaNavigationMorph new \\\\n\\\\t\\\\tnebraskaBorder: window;\\\\n\\\\t\\\\tnebraskaTerminal: self;\\\\n\\\\t\\\\topenInWorld.! !\\\\n\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'layout' stamp: 'sd 11/20/2005 21:25'!\\\\nacceptDroppingMorph: morphToDrop event: evt\\\\n\\\\n\\\\t| myCopy outData null |\\\\n\\\\n\\\\t(morphToDrop isKindOf: NewHandleMorph) ifTrue: [\\\\t\\\\t\\\\t\\\\\\\"don't send these\\\\\\\"\\\\n\\\\t\\\\t^morphToDrop rejectDropMorphEvent: evt.\\\\n\\\\t].\\\\n\\\\tself eToyRejectDropMorph: morphToDrop event: evt.\\\\t\\\\t\\\\\\\"we don't really want it\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"7 mar 2001 - remove #veryDeepCopy\\\\\\\"\\\\n\\\\tmyCopy := morphToDrop.\\\\t\\\\\\\"gradient fills require doing this second\\\\\\\"\\\\n\\\\tmyCopy setProperty: #positionInOriginatingWorld toValue: morphToDrop position.\\\\n\\\\n\\\\toutData := myCopy eToyStreamedRepresentationNotifying: nil.\\\\n\\\\tnull := String with: 0 asCharacter.\\\\n\\\\tEToyPeerToPeer new \\\\n\\\\t\\\\tsendSomeData: {\\\\n\\\\t\\\\t\\\\tEToyIncomingMessage typeMorph,null. \\\\n\\\\t\\\\t\\\\tPreferences defaultAuthorName,null.\\\\n\\\\t\\\\t\\\\toutData\\\\n\\\\t\\\\t}\\\\n\\\\t\\\\tto: (NetNameResolver stringFromAddress: connection remoteAddress)\\\\n\\\\t\\\\tfor: self.\\\\n! !\\\\n\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'shutting down' stamp: 'ls 4/11/2000 18:36'!\\\\ndisconnect\\\\n\\\\tconnection ifNotNil: [ connection destroy ].\\\\n\\\\teventEncoder := connection := decoder := nil.! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'shutting down' stamp: 'RAA 12/13/2000 08:21'!\\\\nrequestBufferedConnection\\\\n\\\\n\\\\teventEncoder ifNotNil: [eventEncoder requestBufferedConnection].\\\\n! !\\\\n\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'stepping and presenter' stamp: 'ar 10/25/2000 23:19'!\\\\nstep\\\\n\\\\n\\\\tdecoder ifNil: [ ^self ].\\\\n\\\\tdecoder processIOOnForce: [ :rectangle | self forceToFront: rectangle ].! !\\\\n\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'testing' stamp: 'ls 3/25/2000 16:58'!\\\\nstepTime\\\\n\\\\t^10! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nNetworkTerminalMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!NetworkTerminalMorph class methodsFor: 'instance creation' stamp: 'RAA 8/4/2000 15:13'!\\\\nconnectTo: serverHost\\\\n\\\\n\\\\t^self connectTo: serverHost port: NebraskaServer defaultPort\\\\n\\\\n! !\\\\n\\\\n!NetworkTerminalMorph class methodsFor: 'instance creation' stamp: 'sd 11/20/2005 21:26'!\\\\nconnectTo: serverHost port: serverPort\\\\n\\\\n\\\\t| stringSock |\\\\n\\\\n\\\\tstringSock := self socketConnectedTo: serverHost port: serverPort.\\\\n\\\\t^self new connection: stringSock\\\\n! !\\\\n\\\\n!NetworkTerminalMorph class methodsFor: 'instance creation' stamp: 'RAA 7/24/2000 12:08'!\\\\nopenAndConnectTo: serverHost\\\\n\\\\n\\\\t^self openAndConnectTo: serverHost port: NebraskaServer defaultPort\\\\n\\\\n! !\\\\n\\\\n!NetworkTerminalMorph class methodsFor: 'instance creation' stamp: 'sd 11/20/2005 21:26'!\\\\nopenAndConnectTo: serverHost port: serverPort\\\\n\\\\n\\\\t| stringSock me |\\\\n\\\\n\\\\tstringSock := self socketConnectedTo: serverHost port: serverPort.\\\\n\\\\tme := self new connection: stringSock.\\\\n\\\\t^me openInStyle: #naked\\\\n! !\\\\n\\\\n!NetworkTerminalMorph class methodsFor: 'instance creation' stamp: 'sd 11/20/2005 21:26'!\\\\nsocketConnectedTo: serverHost  port: serverPort\\\\n\\\\n\\\\t| sock |\\\\n\\\\n\\\\tSocket initializeNetwork.\\\\n\\\\tsock := Socket new.\\\\n\\\\t[sock connectTo: (NetNameResolver addressForName: serverHost) port: serverPort]\\\\n\\\\t\\\\ton: ConnectionTimedOut\\\\n\\\\t\\\\tdo: [:ex | self error: 'could not connect to server' ].\\\\n\\\\t^StringSocket on: sock\\\\n\\\\n! !\\\\nHandleMorph subclass: #NewHandleMorph\\\\n\\\\tinstanceVariableNames: 'hand offset waitingForClickInside'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Widgets'!\\\\n\\\\n!NewHandleMorph methodsFor: 'all' stamp: 'di 5/18/1998 15:27'!\\\\nfollowHand: aHand forEachPointDo: block1 lastPointDo: block2\\\\n\\\\thand _ aHand.\\\\n\\\\tpointBlock _ block1.\\\\n\\\\tlastPointBlock _ block2.\\\\n\\\\tself position: hand lastEvent cursorPoint - (self extent // 2)! !\\\\n\\\\n!NewHandleMorph methodsFor: 'all' stamp: 'ar 8/16/2001 15:48'!\\\\nfollowHand: aHand forEachPointDo: block1 lastPointDo: block2 withCursor: aCursor\\\\n\\\\thand _ aHand.\\\\n\\\\thand showTemporaryCursor: aCursor \\\\\\\"hotSpotOffset: aCursor offset negated\\\\\\\".\\\\n\\\\tborderWidth _ 0.\\\\n\\\\tcolor _ Color transparent.\\\\n\\\\tpointBlock _ block1.\\\\n\\\\tlastPointBlock _ block2.\\\\n\\\\tself position: hand lastEvent cursorPoint - (self extent // 2)! !\\\\n\\\\n!NewHandleMorph methodsFor: 'all' stamp: 'RAA 4/19/2001 11:36'!\\\\nsensorMode\\\\n\\\\n\\\\t\\\\\\\"If our client is still addressing the Sensor directly, we need to do so as well\\\\\\\"\\\\n\\\\t^self valueOfProperty: #sensorMode ifAbsent: [false].\\\\n! !\\\\n\\\\n!NewHandleMorph methodsFor: 'all' stamp: 'RAA 4/19/2001 11:36'!\\\\nsensorMode: aBoolean\\\\n\\\\n\\\\t\\\\\\\"If our client is still addressing the Sensor directly, we need to do so as well\\\\\\\"\\\\n\\\\tself setProperty: #sensorMode toValue: aBoolean.\\\\n! !\\\\n\\\\n\\\\n!NewHandleMorph methodsFor: 'dropping/grabbing' stamp: 'di 4/30/1999 14:06'!\\\\njustDroppedInto: aMorph event: anEvent\\\\n\\\\t\\\\\\\"No dropping behavior because stepping will delete me.\\\\n\\\\tMoreover it needs to be done that way to evaluate lastPointBlock\\\\\\\"\\\\n! !\\\\n\\\\n!NewHandleMorph methodsFor: 'dropping/grabbing' stamp: 'ar 10/5/2000 18:16'!\\\\nundoGrabCommand\\\\n\\\\t^nil! !\\\\n\\\\n\\\\n!NewHandleMorph methodsFor: 'initialization' stamp: 'dgd 3/7/2003 14:29'!\\\\ninitialize\\\\n\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\n\\\\tsuper initialize.\\\\n\\\\\\\"\\\\\\\"\\\\n\\\\twaitingForClickInside _ true.\\\\n\\\\tPreferences noviceMode\\\\n\\\\t\\\\tifTrue: [self setBalloonText: 'stretch']! !\\\\n\\\\n\\\\n!NewHandleMorph methodsFor: 'stepping and presenter' stamp: 'RAA 4/19/2001 11:37'!\\\\nstep\\\\n\\\\t| eventSource |\\\\n\\\\n\\\\teventSource _ self sensorMode ifTrue: [\\\\n\\\\t\\\\tSensor\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\thand lastEvent\\\\n\\\\t].\\\\n\\\\teventSource anyButtonPressed\\\\n\\\\t\\\\tifTrue: [waitingForClickInside _ false.\\\\n\\\\t\\\\t\\\\t\\\\tself position: eventSource cursorPoint - (self extent // 2).\\\\n\\\\t\\\\t\\\\t\\\\tpointBlock value: self center]\\\\n\\\\t\\\\tifFalse: [waitingForClickInside\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [(self containsPoint: eventSource cursorPoint)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\\\\"mouse wandered out before clicked\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^ self delete]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [lastPointBlock value: self center.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^ self delete]]! !\\\\n\\\\n\\\\n!NewHandleMorph methodsFor: 'submorphs-add/remove' stamp: 'ar 8/16/2001 15:38'!\\\\ndelete\\\\n\\\\thand ifNotNil:[\\\\n\\\\t\\\\thand showTemporaryCursor: nil.\\\\n\\\\t].\\\\n\\\\tsuper delete.! !\\\\n\\\\n\\\\n!NewHandleMorph methodsFor: 'WiW support' stamp: 'RAA 1/10/2001 10:15'!\\\\nmorphicLayerNumber\\\\n\\\\n\\\\t^1\\\\t\\\\t\\\\\\\"handles are very front-like - e.g. the spawn reframe logic actually asks if the first submorph of the world is one of us before deciding to create one\\\\\\\"! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nNewHandleMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!NewHandleMorph class methodsFor: 'new-morph participation' stamp: 'di 5/3/1998 10:08'!\\\\nincludeInNewMorphMenu\\\\n\\\\t^ false! !\\\\nObject subclass: #NewParagraph\\\\n\\\\tinstanceVariableNames: 'text textStyle firstCharacterIndex container lines positionWhenComposed offsetToEnd maxRightX selectionStart selectionStop wantsColumnBreaks focused'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Text Support'!\\\\n!NewParagraph commentStamp: '<historical>' prior: 0!\\\\nA Paragraph represents text that has been laid out, or composed, in some container.\\\\n\\\\ttext \\\\t\\\\tA Text with encoded per-character emphasis.\\\\n\\\\ttextStyle\\\\tA TextStyle with font set, line height and horizontal alignment.\\\\n\\\\tfirstCharacterIndex    The starting index in text for this paragraph, allowing\\\\n\\\\t\\\\t\\\\t\\\\tcomposition of a long text into a number of containers.\\\\n\\\\tcontainer\\\\tA Rectangle or TextContainer that determines where text can go.\\\\n\\\\tlines\\\\t\\\\tAn Array of TextLines comprising the final layout of the text\\\\n\\\\t\\\\t\\\\t\\\\tafter it has been composed within its container.\\\\n\\\\tpositionWhenComposed   As its name implies.  Allows display at new locations\\\\n\\\\t\\\\t\\\\t\\\\twithout the need to recompose the text.\\\\nLines are ordered vertically.  However, for a given y, there may be several lines in left to right order.  Lines must never be empty, even if text is empty.\\\\n\\\\nNotes on yet another hack - 5 Feb 2001\\\\n\\\\nWe really need to clean up #composeLinesFrom:to:delta:into:priorLines:atY:!!!!!!\\\\n\\\\nI added one more habdful of code to correct:\\\\n\\\\nThis is an annoying bug that's been around for a couple of years, but I finally figured out how to duplicate the problem, so I figured I'd just report it now.  (It doesn't necessarily have to be fixed for 3.0 if it looks messy, but if it's a simple fix, it would be worth it.)\\\\n\\\\nIn Morphic, if you have the following text in a workspace:\\\\n\\\\nThis is line 1\\\\nThis is line 2\\\\n\\\\n**and** you have a return character after line 2, you will normally be able to click the mouse two times below line 2 in order to select all the text.  If you edit line 2 (e.g. so that it reads \\\\\\\"line number 2\\\\\\\"), you can still select all the text by clicking below the second line.  However, if you edit line 1, you will not be able to select all the text from the bottom in the same way.  Things get messed up such that the last return character seems to be gone.  In this state, if you position the cursor immediately after the 2, and press the right arrow, the cursor jumps to the beginning of line 2... oof. (report by Doug Way)\\\\n\\\\nWhile I don't have a very deep understanding of the above mentioned method, I was able to determine that text ending in a CR worked better in the editor when the last entry in <lines> had a start of text size + 1 and a stop of text size. I have accordingly added code near the end to ensure this. It seems to have fixed the problem, but we do need to clean this baby up some day. - Bob\\\\n!\\\\n]style[(830 38 127 1000 388)f1,f2cblue;,f1,f1cred;,f1!\\\\n\\\\n\\\\n!NewParagraph methodsFor: 'access' stamp: 'di 11/16/97 09:02'!\\\\nadjustedFirstCharacterIndex\\\\n\\\\t\\\\\\\"Return the index in the text where this paragraph WOULD begin if nothing had changed, except the size of the text -- ie if there have only been an insertion of deletion in the preceding morphs\\\\\\\"\\\\n\\\\toffsetToEnd ifNil: [^ -1].\\\\n\\\\t^ text size - offsetToEnd! !\\\\n\\\\n!NewParagraph methodsFor: 'access' stamp: 'di 10/24/97 17:38'!\\\\nextent\\\\n\\\\t^ container width @ (lines last bottom - lines first top)! !\\\\n\\\\n!NewParagraph methodsFor: 'access' stamp: 'di 11/8/97 15:41'!\\\\nfirstCharacterIndex\\\\n\\\\t^ firstCharacterIndex! !\\\\n\\\\n!NewParagraph methodsFor: 'access' stamp: 'rr 3/22/2004 12:42'!\\\\nfocused\\\\n\\\\tfocused ifNil: [focused := false].\\\\n\\\\t^ focused! !\\\\n\\\\n!NewParagraph methodsFor: 'access' stamp: 'rr 3/22/2004 12:41'!\\\\nfocused: aBoolean\\\\n\\\\tfocused := aBoolean! !\\\\n\\\\n!NewParagraph methodsFor: 'access' stamp: 'di 10/23/97 21:01'!\\\\nlastCharacterIndex\\\\n\\\\t^ lines last last! !\\\\n\\\\n!NewParagraph methodsFor: 'access' stamp: 'sbw 10/13/1999 22:31'!\\\\nnumberOfLines\\\\n\\\\n\\\\t^lines size! !\\\\n\\\\n!NewParagraph methodsFor: 'access' stamp: 'sw 1/13/98 21:31'!\\\\nstring\\\\n\\\\t^ text string! !\\\\n\\\\n!NewParagraph methodsFor: 'access' stamp: 'di 10/21/97 14:39'!\\\\ntext\\\\n\\\\t^ text! !\\\\n\\\\n!NewParagraph methodsFor: 'access' stamp: 'jm 11/19/97 20:27'!\\\\ntextOwner: ignored  \\\\\\\"See TextOnCurve\\\\\\\"! !\\\\n\\\\n!NewParagraph methodsFor: 'access' stamp: 'di 10/21/97 14:39'!\\\\ntextStyle\\\\n\\\\t^ textStyle! !\\\\n\\\\n!NewParagraph methodsFor: 'access' stamp: 'di 10/23/97 19:33'!\\\\ntextStyle: aTextStyle \\\\n\\\\t\\\\\\\"Set the style by which the receiver should display its text.\\\\\\\"\\\\n\\\\ttextStyle _ aTextStyle! !\\\\n\\\\n!NewParagraph methodsFor: 'access' stamp: 'RAA 5/6/2001 15:04'!\\\\nwantsColumnBreaks\\\\n\\\\n\\\\t^wantsColumnBreaks! !\\\\n\\\\n!NewParagraph methodsFor: 'access' stamp: 'RAA 5/6/2001 15:03'!\\\\nwantsColumnBreaks: aBoolean\\\\n\\\\n\\\\twantsColumnBreaks _ aBoolean! !\\\\n\\\\n\\\\n!NewParagraph methodsFor: 'alignment' stamp: 'di 10/25/97 19:26'!\\\\ncentered \\\\n\\\\ttextStyle centered! !\\\\n\\\\n!NewParagraph methodsFor: 'alignment' stamp: 'di 10/25/97 19:26'!\\\\njustified \\\\n\\\\ttextStyle justified! !\\\\n\\\\n!NewParagraph methodsFor: 'alignment' stamp: 'di 10/25/97 19:26'!\\\\nleftFlush \\\\n\\\\ttextStyle leftFlush! !\\\\n\\\\n!NewParagraph methodsFor: 'alignment' stamp: 'di 10/25/97 19:26'!\\\\nrightFlush \\\\n\\\\ttextStyle rightFlush! !\\\\n\\\\n\\\\n!NewParagraph methodsFor: 'composition' stamp: 'jm 2/25/2003 16:20'!\\\\nOLDcomposeLinesFrom: start to: stop delta: delta into: lineColl priorLines: priorLines atY: startingY \\\\n\\\\t\\\\\\\"While the section from start to stop has changed, composition may ripple all the way to the end of the text.  However in a rectangular container, if we ever find a line beginning with the same character as before (ie corresponding to delta in the old lines), then we can just copy the old lines from there to the end of the container, with adjusted indices and y-values\\\\\\\"\\\\n\\\\n\\\\t| charIndex lineY lineHeight scanner line row firstLine lineHeightGuess saveCharIndex hitCR maybeSlide sliding bottom priorIndex priorLine |\\\\n\\\\tcharIndex := start.\\\\n\\\\tlines := lineColl.\\\\n\\\\tlineY := startingY.\\\\n\\\\tlineHeightGuess := textStyle lineGrid.\\\\n\\\\tmaxRightX := container left.\\\\n\\\\tmaybeSlide := stop < text size and: [container isMemberOf: Rectangle].\\\\n\\\\tsliding := false.\\\\n\\\\tpriorIndex := 1.\\\\n\\\\tbottom := container bottom.\\\\n\\\\tscanner := CompositionScanner new text: text textStyle: textStyle.\\\\n\\\\tfirstLine := true.\\\\n\\\\t[charIndex <= text size and: [lineY + lineHeightGuess <= bottom]] \\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[sliding \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"Having detected the end of rippling recoposition, we are only sliding old lines\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpriorIndex < priorLines size \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"Adjust and re-use previously composed line\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tpriorIndex := priorIndex + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tpriorLine := (priorLines at: priorIndex) slideIndexBy: delta\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tandMoveTopTo: lineY.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tlineColl addLast: priorLine.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tlineY := priorLine bottom.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcharIndex := priorLine last + 1]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"There are no more priorLines to slide.\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsliding := maybeSlide := false]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[lineHeight := lineHeightGuess.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsaveCharIndex := charIndex.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\thitCR := false.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\trow := container rectanglesAt: lineY height: lineHeight.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t1 to: row size\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:i | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(charIndex <= text size and: [hitCR not]) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[line := scanner \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcomposeFrom: charIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinRectangle: (row at: i)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfirstLine: firstLine\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tleftSide: i = 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trightSide: i = row size.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tlines addLast: line.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(text at: line last) = Character cr ifTrue: [hitCR := true].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tlineHeight := lineHeight max: line lineHeight.\\\\t\\\\\\\"includes font changes\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcharIndex := line last + 1]].\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tlineY := lineY + lineHeight.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\trow notEmpty \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[lineY > bottom \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"Oops -- the line is really too high to fit -- back out\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcharIndex := saveCharIndex.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trow do: [:r | lines removeLast]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"It's OK -- the line still fits.\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmaxRightX := maxRightX max: scanner rightX.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t1 to: row size - 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:i | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Adjust heights across row if necess\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(lines at: lines size - row size + i) lineHeight: lines last lineHeight\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbaseline: lines last baseline].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcharIndex > text size \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"end of text\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\thitCR \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"If text ends with CR, add a null line at the end\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tlineY + lineHeightGuess <= container bottom \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[row := container rectanglesAt: lineY height: lineHeightGuess.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trow notEmpty \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[line := (TextLine \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstart: charIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstop: charIndex - 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinternalSpaces: 0\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tpaddingWidth: 0)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trectangle: row first;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tlineHeight: lineHeightGuess baseline: textStyle baseline.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tlines addLast: line]]].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tlines := lines asArray.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^maxRightX].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfirstLine := false]].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(maybeSlide and: [charIndex > stop]) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"Check whether we are now in sync with previously composed lines\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[priorIndex < priorLines size \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tand: [(priorLines at: priorIndex) first < (charIndex - delta)]] \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twhileTrue: [priorIndex := priorIndex + 1].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(priorLines at: priorIndex) first = (charIndex - delta) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"Yes -- next line will have same start as prior line.\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tpriorIndex := priorIndex - 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmaybeSlide := false.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsliding := true]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[priorIndex = priorLines size \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"Weve reached the end of priorLines,\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tso no use to keep looking for lines to slide.\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmaybeSlide := false]]]]].\\\\n\\\\tfirstLine \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"No space in container or empty text\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\tline := (TextLine \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstart: start\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstop: start - 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinternalSpaces: 0\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tpaddingWidth: 0)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trectangle: (container topLeft extent: 0 @ lineHeightGuess);\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tlineHeight: lineHeightGuess baseline: textStyle baseline.\\\\n\\\\t\\\\t\\\\tlines := Array with: line]\\\\n\\\\t\\\\tifFalse: [self fixLastWithHeight: lineHeightGuess].\\\\n\\\\t\\\\\\\"end of container\\\\\\\"\\\\n\\\\tlines := lines asArray.\\\\n\\\\t^maxRightX! !\\\\n\\\\n!NewParagraph methodsFor: 'composition' stamp: 'di 11/8/97 15:31'!\\\\ncompose: t style: ts from: startingIndex in: textContainer\\\\n\\\\ttext _ t.\\\\n\\\\ttextStyle _ ts.\\\\n\\\\tfirstCharacterIndex _ startingIndex.\\\\n\\\\toffsetToEnd _ text size - firstCharacterIndex.\\\\n\\\\tcontainer _ textContainer.\\\\n\\\\tself composeAll! !\\\\n\\\\n!NewParagraph methodsFor: 'composition' stamp: 'yo 12/20/2002 16:18'!\\\\ncomposeAll\\\\n\\\\ttext string isOctetString ifTrue: [\\\\n\\\\t\\\\t^ self composeLinesFrom: firstCharacterIndex to: text size delta: 0\\\\n\\\\t\\\\t\\\\tinto: OrderedCollection new priorLines: Array new atY: container top.\\\\n\\\\t].\\\\n\\\\n\\\\t^ self multiComposeLinesFrom: firstCharacterIndex to: text size delta: 0\\\\n\\\\t\\\\tinto: OrderedCollection new priorLines: Array new atY: container top.\\\\n! !\\\\n\\\\n!NewParagraph methodsFor: 'composition' stamp: 'di 11/15/97 09:21'!\\\\ncomposeAllStartingAt: characterIndex\\\\n\\\\tfirstCharacterIndex _ characterIndex.\\\\n\\\\toffsetToEnd _ text size - firstCharacterIndex.\\\\n\\\\tself composeAll! !\\\\n\\\\n!NewParagraph methodsFor: 'composition' stamp: 'RAA 5/7/2001 10:58'!\\\\ncomposeLinesFrom: start to: stop delta: delta into: lineColl priorLines: priorLines\\\\n\\\\tatY: startingY\\\\n\\\\t\\\\\\\"While the section from start to stop has changed, composition may ripple all the way to the end of the text.  However in a rectangular container, if we ever find a line beginning with the same character as before (ie corresponding to delta in the old lines), then we can just copy the old lines from there to the end of the container, with adjusted indices and y-values\\\\\\\"\\\\n\\\\n\\\\t| newResult |\\\\n\\\\n\\\\tnewResult _ TextComposer new\\\\n\\\\t\\\\tcomposeLinesFrom: start \\\\n\\\\t\\\\tto: stop \\\\n\\\\t\\\\tdelta: delta \\\\n\\\\t\\\\tinto: lineColl \\\\n\\\\t\\\\tpriorLines: priorLines\\\\n\\\\t\\\\tatY: startingY\\\\n\\\\t\\\\ttextStyle: textStyle \\\\n\\\\t\\\\ttext: text \\\\n\\\\t\\\\tcontainer: container\\\\n\\\\t\\\\twantsColumnBreaks: wantsColumnBreaks == true.\\\\n\\\\tlines _ newResult first asArray.\\\\n\\\\tmaxRightX _ newResult second.\\\\n\\\\t^maxRightX\\\\n! !\\\\n\\\\n!NewParagraph methodsFor: 'composition' stamp: 'di 10/22/97 11:13'!\\\\ncompositionRectangle\\\\n\\\\t^ container! !\\\\n\\\\n!NewParagraph methodsFor: 'composition' stamp: 'RAA 2/25/2001 15:02'!\\\\nfixLastWithHeight: lineHeightGuess\\\\n\\\\\\\"This awful bit is to ensure that if we have scanned all the text and the last character is a CR that there is a null line at the end of lines. Sometimes this was not happening which caused anomalous selections when selecting all the text. This is implemented as a post-composition fixup because I coul;dn't figure out where to put it in the main logic.\\\\\\\"\\\\n\\\\n\\\\t| oldLastLine newRectangle line |\\\\n\\\\n\\\\t(text size > 1 and: [text last = Character cr]) ifFalse: [^self].\\\\n\\\\n\\\\toldLastLine _ lines last.\\\\n\\\\toldLastLine last - oldLastLine first >= 0 ifFalse: [^self].\\\\n\\\\toldLastLine last = text size ifFalse: [^self].\\\\n\\\\n\\\\tnewRectangle _ oldLastLine left @ oldLastLine bottom \\\\n\\\\t\\\\t\\\\t\\\\textent: 0@(oldLastLine bottom - oldLastLine top).\\\\n\\\\t\\\\\\\"Even though we may be below the bottom of the container,\\\\n\\\\tit is still necessary to compose the last line for consistency...\\\\\\\"\\\\n\\\\n\\\\tline _ TextLine start: text size+1 stop: text size internalSpaces: 0 paddingWidth: 0.\\\\n\\\\tline rectangle: newRectangle.\\\\n\\\\tline lineHeight: lineHeightGuess baseline: textStyle baseline.\\\\n\\\\tlines _ lines, (Array with: line).\\\\n! !\\\\n\\\\n!NewParagraph methodsFor: 'composition' stamp: 'yo 1/3/2003 12:17'!\\\\nmultiComposeLinesFrom: start to: stop delta: delta into: lineColl priorLines: priorLines\\\\n\\\\tatY: startingY\\\\n\\\\t\\\\\\\"While the section from start to stop has changed, composition may ripple all the way to the end of the text.  However in a rectangular container, if we ever find a line beginning with the same character as before (ie corresponding to delta in the old lines), then we can just copy the old lines from there to the end of the container, with adjusted indices and y-values\\\\\\\"\\\\n\\\\n\\\\t| newResult |\\\\n\\\\n\\\\tnewResult _ MultiTextComposer new\\\\n\\\\t\\\\tmultiComposeLinesFrom: start \\\\n\\\\t\\\\tto: stop \\\\n\\\\t\\\\tdelta: delta \\\\n\\\\t\\\\tinto: lineColl \\\\n\\\\t\\\\tpriorLines: priorLines\\\\n\\\\t\\\\tatY: startingY\\\\n\\\\t\\\\ttextStyle: textStyle \\\\n\\\\t\\\\ttext: text \\\\n\\\\t\\\\tcontainer: container\\\\n\\\\t\\\\twantsColumnBreaks: wantsColumnBreaks == true.\\\\n\\\\tlines _ newResult first asArray.\\\\n\\\\tmaxRightX _ newResult second.\\\\n\\\\t\\\\\\\"maxRightX printString displayAt: 0@0.\\\\\\\"\\\\n\\\\t^maxRightX\\\\n! !\\\\n\\\\n!NewParagraph methodsFor: 'composition' stamp: 'yo 12/20/2002 16:18'!\\\\nrecomposeFrom: start to: stop delta: delta\\\\n\\\\t\\\\\\\"Recompose this paragraph.  The altered portion is between start and stop.\\\\n\\\\tRecomposition may continue to the end of the text, due to a ripple effect.\\\\n\\\\tDelta is the amount by which the current text is longer than it was\\\\n\\\\twhen its current lines were composed.\\\\\\\"\\\\n\\\\t| startLine newLines |\\\\n\\\\t\\\\\\\"Have to recompose line above in case a word-break was affected.\\\\\\\"\\\\n\\\\tstartLine _ (self lineIndexForCharacter: start) - 1 max: 1.\\\\n\\\\t[startLine > 1 and: [(lines at: startLine-1) top = (lines at: startLine) top]]\\\\n\\\\t\\\\twhileTrue: [startLine _ startLine - 1].  \\\\\\\"Find leftmost of line pieces\\\\\\\"\\\\n\\\\tnewLines _ OrderedCollection new: lines size + 1.\\\\n\\\\t1 to: startLine-1 do: [:i | newLines addLast: (lines at: i)].\\\\n\\\\ttext string isOctetString ifTrue: [\\\\n\\\\t\\\\t^ self composeLinesFrom: (lines at: startLine) first to: stop delta: delta\\\\n\\\\t\\\\t\\\\tinto: newLines priorLines: lines\\\\n\\\\t\\\\t\\\\tatY: (lines at: startLine) top.\\\\n\\\\t].\\\\n\\\\tself multiComposeLinesFrom: (lines at: startLine) first to: stop delta: delta\\\\n\\\\t\\\\tinto: newLines priorLines: lines\\\\n\\\\t\\\\tatY: (lines at: startLine) top.\\\\n! !\\\\n\\\\n!NewParagraph methodsFor: 'composition' stamp: 'RAA 5/6/2001 15:09'!\\\\ntestNewComposeAll\\\\n\\\\t| newResult |\\\\n\\\\tself \\\\n\\\\t\\\\tOLDcomposeLinesFrom: firstCharacterIndex \\\\n\\\\t\\\\tto: text size \\\\n\\\\t\\\\tdelta: 0\\\\n\\\\t\\\\tinto: OrderedCollection new \\\\n\\\\t\\\\tpriorLines: Array new \\\\n\\\\t\\\\tatY: container top.\\\\n\\\\tnewResult _ TextComposer new\\\\n\\\\t\\\\tcomposeLinesFrom: firstCharacterIndex \\\\n\\\\t\\\\tto: text size \\\\n\\\\t\\\\tdelta: 0\\\\n\\\\t\\\\tinto: OrderedCollection new \\\\n\\\\t\\\\tpriorLines: Array new \\\\n\\\\t\\\\tatY: container top\\\\n\\\\t\\\\ttextStyle: textStyle \\\\n\\\\t\\\\ttext: text \\\\n\\\\t\\\\tcontainer: container\\\\n\\\\t\\\\twantsColumnBreaks: false.\\\\n\\\\tnewResult first with: lines do: [ :e1 :e2 |\\\\n\\\\t\\\\te1 longPrintString = e2 longPrintString ifFalse: [self halt].\\\\n\\\\t].\\\\n\\\\tnewResult second = maxRightX ifFalse: [self halt].\\\\n\\\\t^{newResult. {lines. maxRightX}}\\\\n! !\\\\n\\\\n!NewParagraph methodsFor: 'composition' stamp: 'yo 12/17/2002 14:48'!\\\\ntestNewComposeAll2\\\\n\\\\t| newResult |\\\\n\\\\tnewResult _ TextComposer new\\\\n\\\\t\\\\tcomposeLinesFrom: firstCharacterIndex \\\\n\\\\t\\\\tto: text size \\\\n\\\\t\\\\tdelta: 0\\\\n\\\\t\\\\tinto: OrderedCollection new \\\\n\\\\t\\\\tpriorLines: Array new \\\\n\\\\t\\\\tatY: container top\\\\n\\\\t\\\\ttextStyle: textStyle \\\\n\\\\t\\\\ttext: text \\\\n\\\\t\\\\tcontainer: container\\\\n\\\\t\\\\twantsColumnBreaks: false.\\\\n\\\\t^{newResult. {lines. maxRightX}}\\\\n! !\\\\n\\\\n!NewParagraph methodsFor: 'composition' stamp: 'yo 12/18/2002 15:00'!\\\\ntestNewComposeAll3\\\\n\\\\t| newResult |\\\\n\\\\tnewResult _ TextComposer new\\\\n\\\\t\\\\tmultiComposeLinesFrom: firstCharacterIndex \\\\n\\\\t\\\\tto: text size \\\\n\\\\t\\\\tdelta: 0\\\\n\\\\t\\\\tinto: OrderedCollection new \\\\n\\\\t\\\\tpriorLines: Array new \\\\n\\\\t\\\\tatY: container top\\\\n\\\\t\\\\ttextStyle: textStyle \\\\n\\\\t\\\\ttext: text \\\\n\\\\t\\\\tcontainer: (0@0 extent: 31@60)\\\\n\\\\t\\\\twantsColumnBreaks: false.\\\\n\\\\t^{newResult. {lines. maxRightX}}\\\\n! !\\\\n\\\\n\\\\n!NewParagraph methodsFor: 'copying' stamp: 'di 5/21/1998 21:45'!\\\\ndeepCopy\\\\n\\\\t\\\\\\\"Don't want to copy the container (etc) or fonts in the TextStyle.\\\\\\\"\\\\n\\\\t| new |\\\\n\\\\tnew _ self copy.\\\\n\\\\tnew textStyle: textStyle copy\\\\n\\\\t\\\\tlines: lines copy\\\\n\\\\t\\\\ttext: text deepCopy.\\\\n\\\\t^ new! !\\\\n\\\\n\\\\n!NewParagraph methodsFor: 'display' stamp: 'di 8/13/2000 12:27'!\\\\nasParagraphForPostscript\\\\n\\\\n\\\\t^ self! !\\\\n\\\\n!NewParagraph methodsFor: 'display' stamp: 'lr 7/12/2006 09:27'!\\\\ncaretWidth\\\\n\\\\t^ Preferences caretWidth! !\\\\n\\\\n!NewParagraph methodsFor: 'display' stamp: 'nk 8/31/2004 11:10'!\\\\ndisplaySelectionInLine: line on: aCanvas \\\\n\\\\t| leftX rightX w caretColor |\\\\n\\\\tselectionStart ifNil: [^self].\\\\t\\\\\\\"No selection\\\\\\\"\\\\n\\\\taCanvas isShadowDrawing ifTrue: [ ^self ].\\\\t\\\\\\\"don't draw selection with shadow\\\\\\\"\\\\n\\\\tselectionStart = selectionStop \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"Only show caret on line where clicked\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\tselectionStart textLine ~= line ifTrue: [^self]]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"Test entire selection before or after here\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t(selectionStop stringIndex < line first \\\\n\\\\t\\\\t\\\\t\\\\tor: [selectionStart stringIndex > (line last + 1)]) ifTrue: [^self].\\\\t\\\\\\\"No selection on this line\\\\\\\"\\\\n\\\\t\\\\t\\\\t(selectionStop stringIndex = line first \\\\n\\\\t\\\\t\\\\t\\\\tand: [selectionStop textLine ~= line]) ifTrue: [^self].\\\\t\\\\\\\"Selection ends on line above\\\\\\\"\\\\n\\\\t\\\\t\\\\t(selectionStart stringIndex = (line last + 1) \\\\n\\\\t\\\\t\\\\t\\\\tand: [selectionStop textLine ~= line]) ifTrue: [^self]].\\\\t\\\\\\\"Selection begins on line below\\\\\\\"\\\\n\\\\tleftX := (selectionStart stringIndex < line first \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [line ]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [selectionStart ])left.\\\\n\\\\trightX := (selectionStop stringIndex > (line last + 1) or: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[selectionStop stringIndex = (line last + 1) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tand: [selectionStop textLine ~= line]]) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [line right]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [selectionStop left].\\\\n\\\\tselectionStart = selectionStop \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[rightX := rightX + 1.\\\\n\\\\t\\\\t\\\\tw := self caretWidth.\\\\n\\\\t\\\\t\\\\tcaretColor := self insertionPointColor.\\\\n\\\\t\\\\t\\\\t1 to: w\\\\n\\\\t\\\\t\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:i | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Draw caret triangles at top and bottom\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\taCanvas fillRectangle: ((leftX - w + i - 1) @ (line top + i - 1) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\textent: ((w - i) * 2 + 3) @ 1)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcolor: caretColor.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\taCanvas fillRectangle: ((leftX - w + i - 1) @ (line bottom - i) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\textent: ((w - i) * 2 + 3) @ 1)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcolor: caretColor].\\\\n\\\\t\\\\t\\\\taCanvas fillRectangle: (leftX @ line top corner: rightX @ line bottom)\\\\n\\\\t\\\\t\\\\t\\\\tcolor: caretColor]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[aCanvas fillRectangle: (leftX @ line top corner: rightX @ line bottom)\\\\n\\\\t\\\\t\\\\t\\\\tcolor: self selectionColor]! !\\\\n\\\\n!NewParagraph methodsFor: 'display' stamp: 'rr 3/22/2004 19:56'!\\\\ninsertionPointColor\\\\n\\\\tself focused ifFalse: [^ Color transparent].\\\\n\\\\t^ Display depth <= 2\\\\n\\\\t\\\\tifTrue: [Color black]\\\\n\\\\t\\\\tifFalse: [Preferences insertionPointColor]! !\\\\n\\\\n!NewParagraph methodsFor: 'display' stamp: 'rr 3/23/2004 19:52'!\\\\nselectionColor\\\\n\\\\t| color |\\\\n\\\\tDisplay depth = 1 ifTrue: [^ Color veryLightGray].\\\\n\\\\tDisplay depth = 2 ifTrue: [^ Color gray].\\\\n\\\\tcolor := Preferences textHighlightColor.\\\\n\\\\tself focused ifFalse: [color := color alphaMixed: 0.2 with: Color veryVeryLightGray].\\\\n\\\\t^ color! !\\\\n\\\\n\\\\n!NewParagraph methodsFor: 'editing' stamp: 'mk 5/28/2005 11:15'!\\\\nclickAt: clickPoint for: model controller: editor\\\\n\\\\t\\\\\\\"Give sensitive text a chance to fire.  Display flash: (100@100 extent: 100@100).\\\\\\\"\\\\n\\\\t| startBlock action target range boxes box |\\\\n\\\\taction _ false.\\\\n\\\\tstartBlock _ self characterBlockAtPoint: clickPoint.\\\\n\\\\t(text attributesAt: startBlock stringIndex forStyle: textStyle) \\\\n\\\\t\\\\tdo: [:att | att mayActOnClick ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[(target _ model) ifNil: [target _ editor morph].\\\\n\\\\t\\\\t\\\\t\\\\trange _ text rangeOf: att startingAt: startBlock stringIndex.\\\\n\\\\t\\\\t\\\\t\\\\tboxes _ self selectionRectsFrom: (self characterBlockForIndex: range first) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tto: (self characterBlockForIndex: range last+1).\\\\n\\\\t\\\\t\\\\t\\\\tbox _ boxes detect: [:each | each containsPoint: clickPoint] ifNone: [nil].\\\\n\\\\t\\\\t\\\\t\\\\tbox ifNotNil:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[ box _ (editor transformFrom: nil) invertBoundsRect: box.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\teditor morph allOwnersDo: [ :m | box _ box intersect: (m boundsInWorld) ].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tUtilities awaitMouseUpIn: box\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trepeating: []\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifSucceed: [(att actOnClickFor: target in: self at: clickPoint editor: editor) ifTrue: [action _ true]].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tCursor currentCursor == Cursor webLink ifTrue:[Cursor normal show].\\\\n\\\\t\\\\t\\\\t\\\\t]]].\\\\n\\\\t^ action! !\\\\n\\\\n!NewParagraph methodsFor: 'editing' stamp: 'di 4/28/1999 10:14'!\\\\nreplaceFrom: start to: stop with: aText displaying: displayBoolean \\\\n\\\\t\\\\\\\"Edit the text, and then recompose the lines.\\\\\\\" \\\\n\\\\ttext replaceFrom: start to: stop with: aText.\\\\n\\\\tself recomposeFrom: start to: start + aText size - 1 delta: aText size - (stop-start+1)! !\\\\n\\\\n\\\\n!NewParagraph methodsFor: 'fonts-display' stamp: 'nk 3/20/2004 11:13'!\\\\ndisplayOn: aCanvas using: displayScanner at: somePosition\\\\n\\\\t\\\\\\\"Send all visible lines to the displayScanner for display\\\\\\\"\\\\n\\\\t| visibleRectangle offset leftInRun line |\\\\n\\\\tvisibleRectangle _ aCanvas clipRect.\\\\n\\\\toffset _ (somePosition - positionWhenComposed) truncated.\\\\n\\\\tleftInRun _ 0.\\\\n\\\\t(self lineIndexForPoint: visibleRectangle topLeft)\\\\n\\\\t\\\\tto: (self lineIndexForPoint: visibleRectangle bottomRight)\\\\n\\\\t\\\\tdo: [:i | line _ lines at: i.\\\\n\\\\t\\\\t\\\\tself displaySelectionInLine: line on: aCanvas.\\\\n\\\\t\\\\t\\\\tline first <= line last ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[leftInRun _ displayScanner displayLine: line\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\toffset: offset leftInRun: leftInRun]].\\\\n! !\\\\n\\\\n\\\\n!NewParagraph methodsFor: 'initialize-release' stamp: 'tak 12/21/2004 13:29'!\\\\ninitialize\\\\n\\\\tself positionWhenComposed: 0 @ 0! !\\\\n\\\\n\\\\n!NewParagraph methodsFor: 'selection' stamp: 'ar 4/12/2005 19:53'!\\\\ncharacterBlockAtPoint: aPoint \\\\n\\\\t\\\\\\\"Answer a CharacterBlock for the character in the text at aPoint.\\\\\\\"\\\\n\\\\t| line |\\\\n\\\\tline _ lines at: (self lineIndexForPoint: aPoint).\\\\n\\\\t^ ((text string isWideString) ifTrue: [\\\\n\\\\t\\\\tMultiCharacterBlockScanner new text: text textStyle: textStyle\\\\n\\\\t] ifFalse: [CharacterBlockScanner new text: text textStyle: textStyle])\\\\n\\\\t\\\\tcharacterBlockAtPoint: aPoint index: nil\\\\n\\\\t\\\\tin: line! !\\\\n\\\\n!NewParagraph methodsFor: 'selection' stamp: 'ar 4/12/2005 19:53'!\\\\ncharacterBlockForIndex: index \\\\n\\\\t\\\\\\\"Answer a CharacterBlock for the character in text at index.\\\\\\\"\\\\n\\\\t| line |\\\\n\\\\tline _ lines at: (self lineIndexForCharacter: index).\\\\n\\\\t^ ((text string isWideString) ifTrue: [\\\\n\\\\t\\\\tMultiCharacterBlockScanner new text: text textStyle: textStyle\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tCharacterBlockScanner new text: text textStyle: textStyle\\\\n\\\\t])\\\\n\\\\t\\\\tcharacterBlockAtPoint: nil index: ((index max: line first) min: text size+1)\\\\n\\\\t\\\\tin: line! !\\\\n\\\\n!NewParagraph methodsFor: 'selection' stamp: 'jm 11/19/97 22:56'!\\\\ncontainsPoint: aPoint\\\\n\\\\t^ (lines at: (self lineIndexForPoint: aPoint)) rectangle\\\\n\\\\t\\\\tcontainsPoint: aPoint! !\\\\n\\\\n!NewParagraph methodsFor: 'selection' stamp: 'di 10/5/1998 12:59'!\\\\ndefaultCharacterBlock\\\\n\\\\t^ (CharacterBlock new stringIndex: firstCharacterIndex text: text\\\\n\\\\t\\\\t\\\\ttopLeft: lines first topLeft extent: 0 @ 0)\\\\n\\\\t\\\\ttextLine: lines first! !\\\\n\\\\n!NewParagraph methodsFor: 'selection' stamp: 'di 11/30/97 12:10'!\\\\nselectionRects\\\\n\\\\t\\\\\\\"Return an array of rectangles representing the selection region.\\\\\\\"\\\\n\\\\tselectionStart ifNil: [^ Array new].\\\\n\\\\t^ self selectionRectsFrom: selectionStart to: selectionStop! !\\\\n\\\\n!NewParagraph methodsFor: 'selection' stamp: 'ls 11/2/2001 23:10'!\\\\nselectionRectsFrom: characterBlock1 to: characterBlock2 \\\\n\\\\t\\\\\\\"Return an array of rectangles representing the area between the two character blocks given as arguments.\\\\\\\"\\\\n\\\\t| line1 line2 rects cb1 cb2 w |\\\\n\\\\tcharacterBlock1 <= characterBlock2\\\\n\\\\t\\\\tifTrue: [cb1 _ characterBlock1.  cb2 _ characterBlock2]\\\\n\\\\t\\\\tifFalse: [cb2 _ characterBlock1.  cb1 _ characterBlock2].\\\\n\\\\tcb1 = cb2 ifTrue:\\\\n\\\\t\\\\t[w _ self caretWidth.\\\\n\\\\t\\\\t^ Array with: (cb1 topLeft - (w@0) corner: cb1 bottomLeft + ((w+1)@0))].\\\\n\\\\tline1 _ self lineIndexForCharacter: cb1 stringIndex.\\\\n\\\\tline2 _ self lineIndexForCharacter: cb2 stringIndex.\\\\n\\\\tline1 = line2 ifTrue:\\\\n\\\\t\\\\t[^ Array with: (cb1 topLeft corner: cb2 bottomRight)].\\\\n\\\\trects _ OrderedCollection new.\\\\n\\\\trects addLast: (cb1 topLeft corner: (lines at: line1) bottomRight).\\\\n\\\\tline1+1 to: line2-1 do: [ :i |\\\\n\\\\t\\\\t| line |\\\\n\\\\t\\\\tline := lines at: i.\\\\n\\\\t\\\\t(line left = rects last left and: [ line right = rects last right ])\\\\n\\\\t\\\\t\\\\tifTrue: [ \\\\\\\"new line has same margins as old one -- merge them, so that the caller gets as few rectangles as possible\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t| lastRect |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tlastRect := rects removeLast.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\trects add: (lastRect bottom: line bottom) ]\\\\n\\\\t\\\\t\\\\tifFalse: [ \\\\\\\"differing margins; cannot merge\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\trects add: line rectangle ] ].\\\\n\\\\n\\\\trects addLast: ((lines at: line2) topLeft corner: cb2 bottomLeft).\\\\n\\\\t^ rects! !\\\\n\\\\n!NewParagraph methodsFor: 'selection' stamp: 'di 12/2/97 19:57'!\\\\nselectionStart: startBlock selectionStop: stopBlock\\\\n\\\\tselectionStart _ startBlock.\\\\n\\\\tselectionStop _ stopBlock.! !\\\\n\\\\n\\\\n!NewParagraph methodsFor: 'private' stamp: 'di 11/8/97 15:47'!\\\\nadjustLineIndicesBy: delta\\\\n\\\\tfirstCharacterIndex _ firstCharacterIndex + delta.\\\\n\\\\tlines do: [:line | line slide: delta].\\\\n! !\\\\n\\\\n!NewParagraph methodsFor: 'private' stamp: 'di 10/26/97 15:57'!\\\\nadjustRightX\\\\n\\\\t| shrink |\\\\n\\\\tshrink _ container right - maxRightX.\\\\n\\\\tlines do: [:line | line paddingWidth: (line paddingWidth - shrink)].\\\\n\\\\tcontainer _ container withRight: maxRightX! !\\\\n\\\\n!NewParagraph methodsFor: 'private' stamp: 'di 4/14/98 13:17'!\\\\nfastFindFirstLineSuchThat: lineBlock\\\\n\\\\t\\\\\\\"Perform a binary search of the lines array and return the index\\\\n\\\\tof the first element for which lineBlock evaluates as true.\\\\n\\\\tThis assumes the condition is one that goes from false to true for\\\\n\\\\tincreasing line numbers (as, eg, yval > somey or start char > somex).\\\\n\\\\tIf lineBlock is not true for any element, return size+1.\\\\\\\"\\\\n\\\\t| index low high |\\\\n\\\\tlow _ 1.\\\\n\\\\thigh _ lines size.\\\\n\\\\t[index _ high + low // 2.\\\\n\\\\tlow > high]\\\\n\\\\t\\\\twhileFalse: \\\\n\\\\t\\\\t\\\\t[(lineBlock value: (lines at: index))\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [high _ index - 1]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [low _ index + 1]].\\\\n\\\\t^ low! !\\\\n\\\\n!NewParagraph methodsFor: 'private' stamp: 'RAA 8/30/1998 15:30'!\\\\nindentationOfLineIndex: lineIndex ifBlank: aBlock\\\\n\\\\t\\\\\\\"Answer the number of leading tabs in the line at lineIndex.  If there are\\\\n\\\\t no visible characters, pass the number of tabs to aBlock and return its value.\\\\n\\\\t If the line is word-wrap overflow, back up a line and recur.\\\\\\\"\\\\n\\\\n\\\\t| arrayIndex first last cr |\\\\n\\\\tcr _ Character cr.\\\\n\\\\tarrayIndex _ lineIndex.\\\\n\\\\t[first _ (lines at: arrayIndex) first.\\\\n\\\\t first > 1 and: [(text string at: first - 1) ~~ cr]] whileTrue: \\\\\\\"word wrap\\\\\\\"\\\\n\\\\t\\\\t[arrayIndex _ arrayIndex - 1].\\\\n\\\\tlast _ (lines at: arrayIndex) last.\\\\n\\\\t\\\\n\\\\t^(text string copyFrom: first to: last) indentationIfBlank: aBlock.\\\\n! !\\\\n\\\\n!NewParagraph methodsFor: 'private' stamp: 'di 4/14/98 13:11'!\\\\nlineIndexForCharacter: index\\\\n\\\\t\\\\\\\"Answer the index of the line in which to select the character at index.\\\\\\\"\\\\n\\\\t^ (self fastFindFirstLineSuchThat: [:line | line first > index]) - 1 max: 1! !\\\\n\\\\n!NewParagraph methodsFor: 'private' stamp: 'di 4/14/98 13:13'!\\\\nlineIndexForPoint: aPoint\\\\n\\\\t\\\\\\\"Answer the index of the line in which to select the character nearest to aPoint.\\\\\\\"\\\\n\\\\t| i py |\\\\n\\\\tpy _ aPoint y truncated.\\\\n\\\\n\\\\t\\\\\\\"Find the first line at this y-value\\\\\\\"\\\\n\\\\ti _ (self fastFindFirstLineSuchThat: [:line | line bottom > py]) min: lines size.\\\\n\\\\n\\\\t\\\\\\\"Now find the first line at this x-value\\\\\\\"\\\\n\\\\t[i < lines size and: [(lines at: i+1) top = (lines at: i) top\\\\n\\\\t\\\\t\\\\t\\\\tand: [aPoint x >= (lines at: i+1) left]]]\\\\n\\\\t\\\\twhileTrue: [i _ i + 1].\\\\n\\\\t^ i! !\\\\n\\\\n!NewParagraph methodsFor: 'private' stamp: 'RAA 8/30/1998 15:04'!\\\\nlineIndexOfCharacterIndex: characterIndex \\\\n\\\\t\\\\\\\"Answer the line index for a given characterIndex.\\\\\\\"\\\\n\\\\t\\\\\\\"apparently the selector changed with NewParagraph\\\\\\\"\\\\n\\\\n\\\\t^self lineIndexForCharacter: characterIndex \\\\n! !\\\\n\\\\n!NewParagraph methodsFor: 'private' stamp: 'di 10/24/97 17:40'!\\\\nlines\\\\n\\\\t^ lines! !\\\\n\\\\n!NewParagraph methodsFor: 'private' stamp: 'edc 6/18/2004 09:10'!\\\\nmoveBy: delta\\\\n\\\\tlines do: [:line | line moveBy: delta].\\\\n\\\\tpositionWhenComposed ifNotNil:[\\\\n\\\\tpositionWhenComposed _ positionWhenComposed + delta].\\\\n\\\\tcontainer _ container translateBy: delta! !\\\\n\\\\n!NewParagraph methodsFor: 'private' stamp: 'di 10/21/97 21:36'!\\\\npositionWhenComposed: pos\\\\n\\\\tpositionWhenComposed _ pos! !\\\\n\\\\n!NewParagraph methodsFor: 'private' stamp: 'di 5/21/1998 21:47'!\\\\ntextStyle: ts lines: l text: t\\\\n\\\\t\\\\\\\"Private -- just a service for deepCopy\\\\\\\"\\\\n\\\\ttextStyle _ ts.\\\\n\\\\tlines _ l.\\\\n\\\\ttext _ t.! !\\\\nSystemWindow subclass: #NewWorldWindow\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-AdditionalWorlds'!\\\\n\\\\n!NewWorldWindow methodsFor: 'color' stamp: 'nb 6/17/2003 12:25'!\\\\nsetWindowColor: incomingColor\\\\n\\\\t| existingColor aColor |\\\\n\\\\n\\\\tincomingColor ifNil: [^ self].  \\\\\\\"it happens\\\\\\\"\\\\n\\\\taColor _ incomingColor asNontranslucentColor.\\\\n\\\\t(aColor = ColorPickerMorph perniciousBorderColor \\\\n\\\\t\\\\tor: [aColor = Color black]) ifTrue: [^ self].\\\\n\\\\texistingColor _ self paneColorToUse.\\\\n\\\\texistingColor ifNil: [^ Beeper beep].\\\\n\\\\tself setStripeColorsFrom: aColor\\\\n\\\\t\\\\t\\\\n! !\\\\n\\\\n\\\\n!NewWorldWindow methodsFor: 'initialization' stamp: 'ar 5/11/2001 23:48'!\\\\nopenInWorld: aWorld\\\\n\\\\t| xxx |\\\\n\\\\t\\\\\\\"This msg and its callees result in the window being activeOnlyOnTop\\\\\\\"\\\\n\\\\n\\\\txxx _ RealEstateAgent initialFrameFor: self world: aWorld.\\\\n\\\\n\\\\t\\\\\\\"Bob say: 'opening in ',xxx printString,' out of ',aWorld bounds printString.\\\\n\\\\t6 timesRepeat: [Display flash: xxx andWait: 300].\\\\\\\"\\\\n\\\\n\\\\tself bounds: xxx.\\\\n\\\\t^self openAsIsIn: aWorld.! !\\\\n\\\\n\\\\n!NewWorldWindow methodsFor: 'label' stamp: 'sw 5/19/2001 10:44'!\\\\nsetStripeColorsFrom: paneColor\\\\n\\\\t\\\\\\\"Since our world may be *any* color, try to avoid really dark colors so title will show\\\\\\\"\\\\n\\\\n\\\\t| revisedColor |\\\\n\\\\tstripes ifNil: [^ self].\\\\n\\\\trevisedColor _ paneColor atLeastAsLuminentAs: 0.1 .\\\\n\\\\tself isActive ifTrue:\\\\n\\\\t\\\\t[stripes second \\\\n\\\\t\\\\t\\\\tcolor: revisedColor; \\\\n\\\\t\\\\t\\\\tborderColor: stripes second color darker.\\\\n\\\\t\\\\tstripes first \\\\n\\\\t\\\\t\\\\tcolor: stripes second borderColor darker;\\\\n\\\\t\\\\t\\\\tborderColor: stripes first color darker.\\\\n\\\\t\\\\t^ self].\\\\n\\\\t\\\\\\\"This could be much faster\\\\\\\"\\\\n\\\\tstripes second \\\\n\\\\t\\\\tcolor: revisedColor; \\\\n\\\\t\\\\tborderColor: revisedColor.\\\\n\\\\tstripes first \\\\n\\\\t\\\\tcolor: revisedColor; \\\\n\\\\t\\\\tborderColor: revisedColor! !\\\\n\\\\n\\\\n!NewWorldWindow methodsFor: 'panes' stamp: 'ar 11/9/2000 01:31'!\\\\naddMorph: aMorph frame: relFrame\\\\n\\\\t| cc |\\\\n\\\\tcc _ aMorph color.\\\\n\\\\tsuper addMorph: aMorph frame: relFrame.\\\\n\\\\taMorph color: cc.! !\\\\n\\\\n!NewWorldWindow methodsFor: 'panes' stamp: 'RAA 6/1/2000 18:21'!\\\\nupdatePaneColors\\\\n\\\\t\\\\\\\"Useful when changing from monochrome to color display\\\\\\\"\\\\n\\\\n\\\\tself setStripeColorsFrom: self paneColorToUse.\\\\n\\\\n\\\\t\\\\\\\"paneMorphs do: [:p | p color: self paneColorToUse].\\\\\\\"\\\\t\\\\\\\"since pane is a world, skip this\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!NewWorldWindow methodsFor: 'stepping' stamp: 'RAA 6/1/2000 18:30'!\\\\namendSteppingStatus! !\\\\n\\\\n\\\\n!NewWorldWindow methodsFor: 'testing' stamp: 'RAA 6/1/2000 18:33'!\\\\nwantsSteps\\\\n\\\\t\\\\n\\\\t^true! !\\\\nController subclass: #NoController\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'ST80-Framework'!\\\\n!NoController commentStamp: '<historical>' prior: 0!\\\\nI represent a controller that never wants control. I am the controller for views that are non-interactive.!\\\\n\\\\n\\\\n!NoController methodsFor: 'basic control sequence'!\\\\nstartUp\\\\n\\\\t\\\\\\\"I do nothing.\\\\\\\"\\\\n\\\\n\\\\t^self! !\\\\n\\\\n\\\\n!NoController methodsFor: 'control defaults'!\\\\nisControlActive \\\\n\\\\t\\\\\\\"Refer to the comment in Controller|isControlActive.\\\\\\\"\\\\n\\\\n\\\\t^false! !\\\\n\\\\n!NoController methodsFor: 'control defaults'!\\\\nisControlWanted \\\\n\\\\t\\\\\\\"Refer to the comment in Controller|isControlWanted.\\\\\\\"\\\\n\\\\n\\\\t^false! !\\\\nClipboardInterpreter subclass: #NoConversionClipboardInterpreter\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Multilingual-TextConversion'!\\\\n\\\\n!NoConversionClipboardInterpreter methodsFor: 'as yet unclassified' stamp: 'yo 8/11/2003 19:03'!\\\\nfromSystemClipboard: aString\\\\n\\\\n\\\\t^ aString.\\\\n! !\\\\n\\\\n!NoConversionClipboardInterpreter methodsFor: 'as yet unclassified' stamp: 'yo 8/11/2003 21:06'!\\\\ntoSystemClipboard: aString\\\\n\\\\n\\\\t| result |\\\\n\\\\taString isOctetString ifTrue: [^ aString asOctetString].\\\\n\\\\n\\\\tresult _ WriteStream on: (String new: aString size).\\\\n\\\\taString do: [:each | each value < 256 ifTrue: [result nextPut: each]].\\\\n\\\\t^ result contents.\\\\n! !\\\\nKeyboardInputInterpreter subclass: #NoInputInterpreter\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Multilingual-TextConversion'!\\\\n\\\\n!NoInputInterpreter methodsFor: 'as yet unclassified' stamp: 'yo 7/25/2003 14:59'!\\\\nnextCharFrom: sensor firstEvt: evtBuf\\\\n\\\\n\\\\n\\\\n\\\\t| keyValue |\\\\n\\\\n\\\\tkeyValue := evtBuf third.\\\\n\\\\n\\\\t^ keyValue asCharacter.\\\\n\\\\n! !\\\\nNetworkError subclass: #NoNetworkError\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Network-Kernel'!\\\\n!NoNetworkError commentStamp: 'mir 5/12/2003 18:17' prior: 0!\\\\nSignals that no network was found. This could happen, e.g., on dial-up connection when no connection was established when Squeak tried to access it.\\\\n\\\\n!\\\\n\\\\nError subclass: #NonBooleanReceiver\\\\n\\\\tinstanceVariableNames: 'object'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Exceptions-Kernel'!\\\\n\\\\n!NonBooleanReceiver methodsFor: 'accessing' stamp: 'hmm 7/29/2001 21:30'!\\\\nobject\\\\n\\\\t^object! !\\\\n\\\\n!NonBooleanReceiver methodsFor: 'accessing' stamp: 'hmm 7/29/2001 21:30'!\\\\nobject: anObject\\\\n\\\\tobject _ anObject! !\\\\n\\\\n\\\\n!NonBooleanReceiver methodsFor: 'signaledException' stamp: 'hmm 7/29/2001 21:37'!\\\\nisResumable\\\\n\\\\n\\\\t^true! !\\\\nAbstractScoreEvent subclass: #NoteEvent\\\\n\\\\tinstanceVariableNames: 'duration midiKey velocity channel'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Sound-Scores'!\\\\n!NoteEvent commentStamp: '<historical>' prior: 0!\\\\nRepresents a note on or off event in a MIDI score.\\\\n!\\\\n\\\\n\\\\n!NoteEvent methodsFor: 'accessing' stamp: 'jm 12/30/97 22:02'!\\\\nchannel\\\\n\\\\n\\\\t^ channel\\\\n! !\\\\n\\\\n!NoteEvent methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nchannel: midiChannel\\\\n\\\\n\\\\tchannel := midiChannel.\\\\n! !\\\\n\\\\n!NoteEvent methodsFor: 'accessing' stamp: 'jm 12/18/97 19:10'!\\\\nduration\\\\n\\\\n\\\\t^ duration\\\\n! !\\\\n\\\\n!NoteEvent methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nduration: aNumber\\\\n\\\\n\\\\tduration := aNumber.\\\\n! !\\\\n\\\\n!NoteEvent methodsFor: 'accessing' stamp: 'jm 8/27/1998 16:38'!\\\\nendTime\\\\n\\\\n\\\\t^ time + duration\\\\n! !\\\\n\\\\n!NoteEvent methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nkey: midiKeyNum velocity: midiVelocity channel: midiChannel\\\\n\\\\n\\\\tmidiKey := midiKeyNum.\\\\n\\\\tvelocity := midiVelocity.\\\\n\\\\tchannel := midiChannel.\\\\n! !\\\\n\\\\n!NoteEvent methodsFor: 'accessing' stamp: 'jm 12/18/97 20:58'!\\\\nmidiKey\\\\n\\\\n\\\\t^ midiKey\\\\n! !\\\\n\\\\n!NoteEvent methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nmidiKey: midiKeyNum\\\\n\\\\n\\\\tmidiKey := midiKeyNum.\\\\n! !\\\\n\\\\n!NoteEvent methodsFor: 'accessing' stamp: 'jm 8/3/1998 17:06'!\\\\npitch\\\\n\\\\t\\\\\\\"Convert my MIDI key number to a pitch and return it.\\\\\\\"\\\\n\\\\n\\\\t^ AbstractSound pitchForMIDIKey: midiKey\\\\n! !\\\\n\\\\n!NoteEvent methodsFor: 'accessing' stamp: 'jm 12/30/97 09:32'!\\\\nvelocity\\\\n\\\\n\\\\t^ velocity\\\\n! !\\\\n\\\\n!NoteEvent methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nvelocity: midiVelocity\\\\n\\\\n\\\\tvelocity := midiVelocity.\\\\n! !\\\\n\\\\n\\\\n!NoteEvent methodsFor: 'classification' stamp: 'jm 12/31/97 11:48'!\\\\nisNoteEvent\\\\n\\\\n\\\\t^ true\\\\n! !\\\\n\\\\n\\\\n!NoteEvent methodsFor: 'midi' stamp: 'jm 9/10/1998 15:58'!\\\\nendNoteOnMidiPort: aMidiPort\\\\n\\\\t\\\\\\\"Output a noteOff event to the given MIDI port. (Actually, output a noteOff event with zero velocity. This does the same thing, but allows running status to be used when sending a mixture of note on and off commands.)\\\\\\\"\\\\n\\\\n\\\\taMidiPort\\\\n\\\\t\\\\tmidiCmd: 16r90\\\\n\\\\t\\\\tchannel: channel\\\\n\\\\t\\\\tbyte: midiKey\\\\n\\\\t\\\\tbyte: 0.\\\\n! !\\\\n\\\\n!NoteEvent methodsFor: 'midi' stamp: 'jm 9/10/1998 15:56'!\\\\nstartNoteOnMidiPort: aMidiPort\\\\n\\\\t\\\\\\\"Output a noteOn event to the given MIDI port.\\\\\\\"\\\\n\\\\n\\\\taMidiPort\\\\n\\\\t\\\\tmidiCmd: 16r90\\\\n\\\\t\\\\tchannel: channel\\\\n\\\\t\\\\tbyte: midiKey\\\\n\\\\t\\\\tbyte: velocity.\\\\n! !\\\\n\\\\n\\\\n!NoteEvent methodsFor: 'printing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nkeyName\\\\n\\\\t\\\\\\\"Return a note name for my pitch.\\\\\\\"\\\\n\\\\n\\\\t| pitchName octave |\\\\n\\\\tpitchName := #(c cs d ef e f fs g af a bf b) at: (midiKey \\\\\\\\\\\\\\\\ 12) + 1.\\\\n\\\\toctave := (#(-1 0 1 2 3 4 5 6 7 8 9) at: (midiKey // 12) + 1) printString.\\\\n\\\\t^ pitchName, octave\\\\n! !\\\\n\\\\n!NoteEvent methodsFor: 'printing' stamp: 'jm 1/3/98 08:59'!\\\\nprintOn: aStream\\\\n\\\\n\\\\taStream nextPut: $(.\\\\n\\\\ttime printOn: aStream.\\\\n\\\\taStream nextPutAll: ': '.\\\\n\\\\taStream nextPutAll: self keyName.\\\\n\\\\taStream space.\\\\n\\\\tduration printOn: aStream.\\\\n\\\\taStream nextPut: $).\\\\n! !\\\\nException subclass: #Notification\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Exceptions-Kernel'!\\\\n!Notification commentStamp: '<historical>' prior: 0!\\\\nA Notification is an indication that something interesting has occurred.  If it is not handled, it will pass by without effect.!\\\\n\\\\n\\\\n!Notification methodsFor: 'exceptionDescription' stamp: 'pnm 8/16/2000 15:04'!\\\\ndefaultAction\\\\n\\\\t\\\\\\\"No action is taken. The value nil is returned as the value of the message that signaled the exception.\\\\\\\"\\\\n\\\\n\\\\t^nil! !\\\\n\\\\n!Notification methodsFor: 'exceptionDescription' stamp: 'tfei 6/4/1999 18:17'!\\\\nisResumable\\\\n\\\\t\\\\\\\"Answer true. Notification exceptions by default are specified to be resumable.\\\\\\\"\\\\n\\\\n\\\\t^true! !\\\\nPluggableCanvas subclass: #NullCanvas\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Support'!\\\\n!NullCanvas commentStamp: '<historical>' prior: 0!\\\\nA canvas which ignores all drawing commands.!\\\\n\\\\n\\\\n!NullCanvas methodsFor: 'accessing' stamp: 'ls 3/20/2000 21:11'!\\\\nclipRect\\\\n\\\\t^1@1 extent: 99@99! !\\\\n\\\\n!NullCanvas methodsFor: 'accessing' stamp: 'ls 3/20/2000 21:11'!\\\\nextent\\\\n\\\\t^100@100! !\\\\n\\\\n!NullCanvas methodsFor: 'accessing' stamp: 'ls 3/20/2000 21:12'!\\\\nform\\\\n\\\\t^Form extent: self extent! !\\\\n\\\\n!NullCanvas methodsFor: 'accessing' stamp: 'ls 3/20/2000 21:13'!\\\\norigin\\\\n\\\\t^0@0! !\\\\n\\\\n\\\\n!NullCanvas methodsFor: 'copying' stamp: 'ls 3/20/2000 21:26'!\\\\ncopyClipRect: clipRect\\\\n\\\\t\\\\\\\"who cares what the clipping rectangle is?\\\\\\\"\\\\n\\\\t^self! !\\\\n\\\\n\\\\n!NullCanvas methodsFor: 'drawing-support' stamp: 'ls 3/27/2000 21:41'!\\\\nclipBy: region during: aBlock\\\\n\\\\t\\\\\\\"do this in order that timing runs work better\\\\\\\"\\\\n\\\\taBlock value: self! !\\\\n\\\\n!NullCanvas methodsFor: 'drawing-support' stamp: 'ls 3/27/2000 21:39'!\\\\ntransformBy: aDisplayTransform clippingTo: aClipRect during: aBlock smoothing: cellSize\\\\n\\\\t\\\\\\\"do this in order that timing runs work better\\\\\\\"\\\\n\\\\taBlock value: self! !\\\\n\\\\n!NullCanvas methodsFor: 'drawing-support' stamp: 'ls 3/27/2000 21:40'!\\\\ntranslateBy: delta during: aBlock\\\\n\\\\t\\\\\\\"do this in order that timing runs work better\\\\\\\"\\\\n\\\\taBlock value: self! !\\\\nObject subclass: #NullEncoder\\\\n\\\\tinstanceVariableNames: 'target filterSelector'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Support'!\\\\n\\\\n!NullEncoder methodsFor: 'accessing' stamp: 'RAA 9/17/2000 11:53'!\\\\nclose\\\\n\\\\n\\\\t^target close.\\\\n! !\\\\n\\\\n!NullEncoder methodsFor: 'accessing' stamp: 'MPW 1/1/1901 00:56'!\\\\ncontents\\\\n\\\\t^target contents.\\\\n! !\\\\n\\\\n!NullEncoder methodsFor: 'accessing' stamp: 'MPW 1/1/1901 00:16'!\\\\ntarget\\\\n\\\\t^target.! !\\\\n\\\\n\\\\n!NullEncoder methodsFor: 'initialization' stamp: 'MPW 1/1/1901 00:04'!\\\\ninitWithTarget:aTarget\\\\n\\\\ttarget _ aTarget.\\\\n\\\\tfilterSelector _ self class filterSelector.\\\\n\\\\t^self.\\\\n! !\\\\n\\\\n\\\\n!NullEncoder methodsFor: 'processing' stamp: 'MPW 1/1/1901 01:19'!\\\\nprocess:anObject\\\\n\\\\tself write:anObject.\\\\n\\\\t^self contents.! !\\\\n\\\\n\\\\n!NullEncoder methodsFor: 'writing' stamp: 'MPW 1/1/1901 01:17'!\\\\nforward:anObject\\\\n\\\\tanObject ~= nil ifTrue:[target write:anObject].\\\\n! !\\\\n\\\\n!NullEncoder methodsFor: 'writing' stamp: 'mpw 8/13/1999 10:54'!\\\\nwrite:anObject\\\\n\\\\tfilterSelector  ifNil:[filterSelector_self class filterSelector].\\\\n\\\\tanObject ifNotNil: [anObject perform:filterSelector with:self].\\\\n! !\\\\n\\\\n!NullEncoder methodsFor: 'writing' stamp: 'MPW 1/1/1901 01:16'!\\\\nwriteObject:anObject\\\\n\\\\t^self forward:anObject.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nNullEncoder class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!NullEncoder class methodsFor: 'configuring' stamp: 'MPW 1/1/1901 00:02'!\\\\ndefaultTarget\\\\n\\\\t^OrderedCollection new.\\\\n! !\\\\n\\\\n!NullEncoder class methodsFor: 'configuring' stamp: 'MPW 1/1/1901 00:02'!\\\\nfilterSelector\\\\n\\\\t^#writeOnFilterStream:\\\\n! !\\\\n\\\\n\\\\n!NullEncoder class methodsFor: 'creation' stamp: 'MPW 1/1/1901 00:55'!\\\\nstream\\\\n\\\\t^self streamOn:self defaultTarget. \\\\n! !\\\\n\\\\n!NullEncoder class methodsFor: 'creation' stamp: 'MPW 1/1/1901 00:05'!\\\\nstream:newTarget\\\\n\\\\t^self new initWithTarget:newTarget.\\\\n! !\\\\n\\\\n!NullEncoder class methodsFor: 'creation' stamp: 'MPW 1/1/1901 01:15'!\\\\nstreamOn:newTargetCollection\\\\n\\\\t^self new initWithTarget:newTargetCollection.\\\\n! !\\\\n\\\\n!NullEncoder class methodsFor: 'creation' stamp: 'MPW 1/1/1901 02:20'!\\\\nstreamOnFile:fileName\\\\n\\\\t^self new initWithTarget:(FileStream newFileNamed: fileName).\\\\n! !\\\\n\\\\n\\\\n!NullEncoder class methodsFor: 'processing' stamp: 'MPW 1/1/1901 01:20'!\\\\nprocess:anObject\\\\n\\\\t^self stream process:anObject.\\\\n\\\\n! !\\\\nNetworkTerminalMorph subclass: #NullTerminalMorph\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Nebraska-Morphic-Remote'!\\\\n\\\\n!NullTerminalMorph methodsFor: 'drawing' stamp: 'RAA 7/22/2000 07:20'!\\\\ndrawOn: aCanvas\\\\n\\\\n\\\\taCanvas fillRectangle: self bounds fillStyle: Color orange.\\\\n\\\\taCanvas frameRectangle: self bounds color: Color black! !\\\\n\\\\n!NullTerminalMorph methodsFor: 'drawing' stamp: 'RAA 7/22/2000 07:22'!\\\\nforceToFront: aRegion\\\\n\\\\t\\\\\\\"force the given region from the drawing form onto the background form\\\\\\\"\\\\n\\\\tself updateBackgroundForm.\\\\n\\\\n! !\\\\n\\\\n\\\\n!NullTerminalMorph methodsFor: 'geometry' stamp: 'sd 11/20/2005 21:26'!\\\\nextent: newExtent\\\\n\\\\n\\\\t| aPoint |\\\\n\\\\taPoint := 50@50.\\\\n\\\\tbounds extent = aPoint ifFalse: [\\\\n\\\\t\\\\tself changed.\\\\n\\\\t\\\\tbounds := bounds topLeft extent: aPoint.\\\\n\\\\t\\\\tself layoutChanged.\\\\n\\\\t\\\\tself changed\\\\n\\\\t].\\\\n\\\\teventEncoder sendViewExtent: newExtent! !\\\\nMagnitude subclass: #Number\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Kernel-Numbers'!\\\\n!Number commentStamp: '<historical>' prior: 0!\\\\nClass Number holds the most general methods for dealing with numbers. Subclasses Float, Fraction, and Integer, and their subclasses, provide concrete representations of a numeric quantity.\\\\n\\\\nAll of Number's subclasses participate in a simple type coercion mechanism that supports mixed-mode arithmetic and comparisons.  It works as follows:  If\\\\n\\\\tself<typeA> op: arg<typeB>\\\\nfails because of incompatible types, then it is retried in the following guise:\\\\n\\\\t(arg adaptTypeA: self) op: arg adaptToTypeA.\\\\nThis gives the arg of typeB an opportunity to resolve the incompatibility, knowing exactly what two types are involved.  If self is more general, then arg will be converted, and viceVersa.  This mechanism is extensible to any new number classes that one might wish to add to Squeak.  The only requirement is that every subclass of Number must support a pair of conversion methods specific to each of the other subclasses of Number.!\\\\n\\\\n\\\\n!Number methodsFor: 'arithmetic'!\\\\n* aNumber \\\\n\\\\t\\\\\\\"Answer the result of multiplying the receiver by aNumber.\\\\\\\"\\\\n\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n!Number methodsFor: 'arithmetic'!\\\\n+ aNumber \\\\n\\\\t\\\\\\\"Answer the sum of the receiver and aNumber.\\\\\\\"\\\\n\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n!Number methodsFor: 'arithmetic'!\\\\n- aNumber \\\\n\\\\t\\\\\\\"Answer the difference between the receiver and aNumber.\\\\\\\"\\\\n\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n!Number methodsFor: 'arithmetic'!\\\\n/ aNumber \\\\n\\\\t\\\\\\\"Answer the result of dividing the receiver by aNumber.\\\\\\\"\\\\n\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n!Number methodsFor: 'arithmetic'!\\\\n// aNumber \\\\n\\\\t\\\\\\\"Integer quotient defined by division with truncation toward negative \\\\n\\\\tinfinity. 9//4 = 2, -9//4 = -3. -0.9//0.4 = -3. \\\\\\\\\\\\\\\\ answers the remainder \\\\n\\\\tfrom this division.\\\\\\\"\\\\n\\\\n\\\\t^(self / aNumber) floor! !\\\\n\\\\n!Number methodsFor: 'arithmetic'!\\\\n\\\\\\\\\\\\\\\\ aNumber \\\\n\\\\t\\\\\\\"modulo. Remainder defined in terms of //. Answer a Number with the \\\\n\\\\tsame sign as aNumber. e.g. 9\\\\\\\\\\\\\\\\4 = 1, -9\\\\\\\\\\\\\\\\4 = 3, 9\\\\\\\\\\\\\\\\-4 = -3, 0.9\\\\\\\\\\\\\\\\0.4 = 0.1.\\\\\\\"\\\\n\\\\n\\\\t^self - (self // aNumber * aNumber)! !\\\\n\\\\n!Number methodsFor: 'arithmetic'!\\\\nabs\\\\n\\\\t\\\\\\\"Answer a Number that is the absolute value (positive magnitude) of the \\\\n\\\\treceiver.\\\\\\\"\\\\n\\\\n\\\\tself < 0\\\\n\\\\t\\\\tifTrue: [^self negated]\\\\n\\\\t\\\\tifFalse: [^self]! !\\\\n\\\\n!Number methodsFor: 'arithmetic' stamp: 'mk 10/27/2003 21:00'!\\\\narg\\\\n\\\\t\\\\\\\"Answer the argument of the receiver (see Complex | arg).\\\\\\\"\\\\n\\\\t\\\\n\\\\tself isZero ifTrue: [self error: 'Zero (0 + 0 i) does not have an argument.'].\\\\n\\\\t0 < self\\\\n\\\\t\\\\tifTrue: [^ 0]\\\\n\\\\t\\\\tifFalse: [^ Float pi]! !\\\\n\\\\n!Number methodsFor: 'arithmetic'!\\\\nnegated\\\\n\\\\t\\\\\\\"Answer a Number that is the negation of the receiver.\\\\\\\"\\\\n\\\\n\\\\t^0 - self! !\\\\n\\\\n!Number methodsFor: 'arithmetic'!\\\\nquo: aNumber \\\\n\\\\t\\\\\\\"Integer quotient defined by division with truncation toward zero. -9 quo: \\\\n\\\\t4 = -2, -0.9 quo: 0.4 = -2. rem: answers the remainder from this division.\\\\\\\"\\\\n\\\\n\\\\t^(self / aNumber) truncated! !\\\\n\\\\n!Number methodsFor: 'arithmetic' stamp: 'RAH 4/25/2000 19:49'!\\\\nreciprocal\\\\n\\\\t\\\\\\\"Answer 1 divided by the receiver. Create an error notification if the \\\\n\\\\treceiver is 0.\\\\\\\"\\\\n\\\\t#Numeric.\\\\n\\\\t\\\\\\\"Changed 200/01/19 For ANSI <number> support.\\\\\\\"\\\\n\\\\tself = 0 ifTrue: [^ (ZeroDivide dividend: self) signal\\\\\\\"<- Chg\\\\\\\"].\\\\n\\\\t^ 1 / self! !\\\\n\\\\n!Number methodsFor: 'arithmetic'!\\\\nrem: aNumber \\\\n\\\\t\\\\\\\"Remainder defined in terms of quo:. Answer a Number with the same \\\\n\\\\tsign as self. e.g. 9 rem: 4 = 1, -9 rem: 4 = -1. 0.9 rem: 0.4 = 0.1.\\\\\\\"\\\\n\\\\n\\\\t^self - ((self quo: aNumber) * aNumber)! !\\\\n\\\\n\\\\n!Number methodsFor: 'comparing' stamp: 'tk 4/16/1999 18:26'!\\\\ncloseTo: num\\\\n\\\\t\\\\\\\"are these two numbers close?\\\\\\\"\\\\n\\\\n\\\\t| ans |\\\\n\\\\tnum isFloat ifTrue: [^ num closeTo: self asFloat].\\\\n\\\\t[ans _ self = num] ifError: [:aString :aReceiver | ^ false].\\\\n\\\\t^ ans! !\\\\n\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'avi 9/6/2005 22:07'!\\\\nprintShowingDecimalPlaces: placesDesired\\\\n\\\\t\\\\\\\"Print the receiver showing precisely the given number of places desired .  If the placesDesired provided is positive, a decimal point and that many digits after the decimal point will always be shown.  If the placesDesired is zero, a whole number will be shown, without a decimal point.  This method could probably be greatly optimized -- improvements welcomed.\\\\\\\"\\\\n\\\\n\\\\t| precision rounded integerString fractionString |\\\\n\\\\tplacesDesired <= 0 ifTrue: [^ self rounded printString].\\\\n\\\\tprecision _ Utilities floatPrecisionForDecimalPlaces: placesDesired.\\\\n\\\\trounded _ self roundTo: precision.\\\\n\\\\tintegerString _ rounded integerPart asInteger asString.\\\\n\\\\tfractionString _ (rounded fractionPart abs / precision) asInteger asString.\\\\n\\\\t^ String streamContents:\\\\n\\\\t\\\\t[:s |\\\\n\\\\t\\\\ts nextPutAll: integerString.\\\\n\\\\t\\\\ts nextPut: $..\\\\n\\\\t\\\\t(placesDesired - fractionString size) timesRepeat: [s nextPut: $0].\\\\n\\\\t\\\\ts nextPutAll: fractionString]\\\\n\\\\\\\"\\\\n23 printShowingDecimalPlaces: 2\\\\n23.5698 printShowingDecimalPlaces: 2\\\\n-234.567 printShowingDecimalPlaces: 5\\\\n23.4567 printShowingDecimalPlaces: 0\\\\n100000000 printShowingDecimalPlaces: 1\\\\n\\\\\\\"! !\\\\n\\\\n!Number methodsFor: 'converting'!\\\\n@ y \\\\n\\\\t\\\\\\\"Primitive. Answer a Point whose x value is the receiver and whose y \\\\n\\\\tvalue is the argument. Optional. No Lookup. See Object documentation \\\\n\\\\twhatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 18>\\\\n\\\\t^Point x: self y: y! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'di 11/6/1998 13:43'!\\\\nadaptToCollection: rcvr andSend: selector\\\\n\\\\t\\\\\\\"If I am involved in arithmetic with a Collection, return a Collection of\\\\n\\\\tthe results of each element combined with me in that expression.\\\\\\\"\\\\n\\\\n\\\\t^ rcvr collect: [:element | element perform: selector with: self]! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'di 11/6/1998 13:21'!\\\\nadaptToFloat: rcvr andSend: selector \\\\n\\\\t\\\\\\\"If I am involved in arithmetic with a Float, convert me to a Float.\\\\\\\"\\\\n\\\\t^ rcvr perform: selector with: self asFloat! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'di 11/6/1998 13:44'!\\\\nadaptToFraction: rcvr andSend: selector\\\\n\\\\t\\\\\\\"If I am involved in arithmetic with a Fraction, convert us and evaluate exprBlock.\\\\\\\"\\\\n\\\\t^ self subclassResponsibility! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'di 11/6/1998 13:44'!\\\\nadaptToInteger: rcvr andSend: selector\\\\n\\\\t\\\\\\\"If I am involved in arithmetic with a Integer, convert us and evaluate exprBlock.\\\\\\\"\\\\n\\\\t^ self subclassResponsibility! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'di 11/6/1998 13:44'!\\\\nadaptToPoint: rcvr andSend: selector\\\\n\\\\t\\\\\\\"If I am involved in arithmetic with a Point, convert me to a Point.\\\\\\\"\\\\n\\\\t^ rcvr perform: selector with: self@self! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'RAH 4/25/2000 19:49'!\\\\nadaptToScaledDecimal: receiverScaledDecimal andSend: arithmeticOpSelector \\\\n\\\\t\\\\\\\"Do any required conversion and then the arithmetic. \\\\n\\\\treceiverScaledDecimal arithmeticOpSelector self.\\\\\\\"\\\\n\\\\t#Numeric.\\\\n\\\\t\\\\\\\"add 200/01/19 For ScaledDecimal support.\\\\\\\"\\\\n\\\\t^ self subclassResponsibility! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'di 11/6/1998 13:45'!\\\\nadaptToString: rcvr andSend: selector\\\\n\\\\t\\\\\\\"If I am involved in arithmetic with a String, convert it to a Number.\\\\\\\"\\\\n\\\\t^ rcvr asNumber perform: selector with: self! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'ar 5/20/2001 01:40'!\\\\nasB3DVector3\\\\n\\\\t^self@self@self! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'brp 5/13/2003 10:13'!\\\\nasDuration\\\\n\\\\n\\\\n\\\\n\\\\t^ Duration nanoSeconds: self asInteger\\\\n\\\\n! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'RAH 4/25/2000 19:49'!\\\\nasFloatD\\\\n\\\\t\\\\\\\"Answer a d precision floating-point number approximating the receiver.\\\\\\\"\\\\n\\\\t#Numeric.\\\\n\\\\t\\\\\\\"add 200/01/19 For ANSI <number> protocol.\\\\\\\"\\\\n\\\\t^ self asFloat! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'RAH 4/25/2000 19:49'!\\\\nasFloatE\\\\n\\\\t\\\\\\\"Answer a floating-point number approximating the receiver.\\\\\\\"\\\\n\\\\t#Numeric.\\\\n\\\\t\\\\\\\"add 200/01/19 For ANSI <number> protocol.\\\\\\\"\\\\n\\\\t^ self asFloat! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'RAH 4/25/2000 19:49'!\\\\nasFloatQ\\\\n\\\\t\\\\\\\"Answer a floating-point number approximating the receiver.\\\\\\\"\\\\n\\\\t#Numeric.\\\\n\\\\t\\\\\\\"add 200/01/19 For ANSI <number> protocol.\\\\\\\"\\\\n\\\\t^ self asFloat! !\\\\n\\\\n!Number methodsFor: 'converting'!\\\\nasInteger\\\\n\\\\t\\\\\\\"Answer an Integer nearest the receiver toward zero.\\\\\\\"\\\\n\\\\n\\\\t^self truncated! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'sw 2/16/1999 18:15'!\\\\nasNumber\\\\n\\\\t^ self! !\\\\n\\\\n!Number methodsFor: 'converting'!\\\\nasPoint\\\\n\\\\t\\\\\\\"Answer a Point with the receiver as both coordinates; often used to \\\\n\\\\tsupply the same value in two dimensions, as with symmetrical gridding \\\\n\\\\tor scaling.\\\\\\\"\\\\n\\\\n\\\\t^self @ self! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'dtl 9/25/2004 11:47'!\\\\nasScaledDecimal\\\\n\\\\t\\\\\\\"Answer a scaled decimal number approximating the receiver.\\\\\\\"\\\\n\\\\t#Numeric.\\\\n\\\\n\\\\t^ self asScaledDecimal: 8\\\\n! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'RAH 4/25/2000 19:49'!\\\\nasScaledDecimal: scale \\\\n\\\\t\\\\\\\"Answer a scaled decimal number, with a fractional precision of scale, \\\\n\\\\tapproximating the receiver.\\\\\\\"\\\\n\\\\t#Numeric.\\\\n\\\\t\\\\\\\"add 200/01/19 For number protocol.\\\\\\\"\\\\n\\\\t^ ScaledDecimal newFromNumber: self scale: scale! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'sw 9/8/97 16:30'!\\\\nasSmallAngleDegrees\\\\n\\\\t\\\\\\\"Return the receiver normalized to lie within the range (-180, 180)\\\\\\\"\\\\n\\\\n\\\\t| pos |\\\\n\\\\tpos _ self \\\\\\\\\\\\\\\\ 360.\\\\n\\\\tpos > 180 ifTrue: [pos _ pos - 360].\\\\n\\\\t^ pos\\\\n\\\\n\\\\\\\"#(-500 -300 -150 -5 0 5 150 300 500 1200) collect: [:n | n asSmallAngleDegrees]\\\\\\\"! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'sw 10/7/1999 12:24'!\\\\nasSmallPositiveDegrees\\\\n\\\\t\\\\\\\"Return the receiver normalized to lie within the range (0, 360)\\\\\\\"\\\\n\\\\n\\\\t| result |\\\\n\\\\tresult _ self.\\\\n\\\\t[result < 0] whileTrue: [result _ result + 360].\\\\n\\\\t^ result \\\\\\\\\\\\\\\\ 360\\\\n\\\\n\\\\\\\"#(-500 -300 -150 -5 0 5 150 300 500 1200) collect: [:n | n asSmallPositiveDegrees]\\\\\\\"! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'brp 1/9/2004 06:12'!\\\\nday\\\\n\\\\n\\\\n\\\\n\\\\t^ self sign days! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'brp 5/16/2003 07:56'!\\\\ndays\\\\n\\\\n\\\\n\\\\n\\\\t^ Duration days: self! !\\\\n\\\\n!Number methodsFor: 'converting'!\\\\ndegreesToRadians\\\\n\\\\t\\\\\\\"The receiver is assumed to represent degrees. Answer the conversion to \\\\n\\\\tradians.\\\\\\\"\\\\n\\\\n\\\\t^self asFloat degreesToRadians! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'brp 1/9/2004 06:28'!\\\\nhour\\\\n\\\\n\\\\n\\\\n\\\\t^ self sign hours\\\\n\\\\n! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'brp 5/16/2003 07:56'!\\\\nhours\\\\n\\\\n\\\\n\\\\n\\\\t^ Duration hours: self! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'mk 10/27/2003 18:17'!\\\\ni\\\\n\\\\t^ Complex real: 0 imaginary: self! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'brp 1/9/2004 06:26'!\\\\nmilliSecond\\\\n\\\\n\\\\n\\\\n\\\\t^ self sign milliSeconds\\\\n\\\\n! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'brp 9/25/2003 13:16'!\\\\nmilliSeconds\\\\n\\\\n\\\\n\\\\n\\\\t^ Duration milliSeconds: self\\\\n\\\\n! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'brp 1/9/2004 06:16'!\\\\nminute\\\\n\\\\n\\\\n\\\\n\\\\t^ self sign minutes\\\\n\\\\n! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'brp 5/16/2003 07:56'!\\\\nminutes\\\\n\\\\n\\\\n\\\\n\\\\t^ Duration minutes: self! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'brp 1/9/2004 06:27'!\\\\nnanoSecond\\\\n\\\\n\\\\n\\\\n\\\\t^ self sign nanoSeconds\\\\n\\\\n! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'brp 5/16/2003 08:52'!\\\\nnanoSeconds\\\\n\\\\n\\\\n\\\\n\\\\t^ Duration nanoSeconds: self.! !\\\\n\\\\n!Number methodsFor: 'converting'!\\\\nradiansToDegrees\\\\n\\\\t\\\\\\\"The receiver is assumed to represent radians. Answer the conversion to \\\\n\\\\tdegrees.\\\\\\\"\\\\n\\\\n\\\\t^self asFloat radiansToDegrees! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'brp 1/9/2004 06:17'!\\\\nsecond\\\\n\\\\n\\\\n\\\\n\\\\t^ self sign seconds\\\\n\\\\n! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'brp 5/16/2003 07:57'!\\\\nseconds\\\\n\\\\n\\\\n\\\\n\\\\t^ Duration seconds: self! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'brp 5/21/2003 08:20'!\\\\nsign: aNumber\\\\n\\\\n\\\\t\\\\\\\"Return a Number with the same sign as aNumber\\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\t^ aNumber positive ifTrue: [self abs] ifFalse: [self abs negated].! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'brp 1/9/2004 06:19'!\\\\nweek\\\\n\\\\n\\\\n\\\\n\\\\t^ self sign weeks\\\\n\\\\n! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'brp 5/16/2003 07:57'!\\\\nweeks\\\\n\\\\n\\\\n\\\\n\\\\t^ Duration weeks: self! !\\\\n\\\\n\\\\n!Number methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 00:07'!\\\\nbyteEncode:aStream\\\\n\\\\t^aStream writeNumber:self.\\\\n! !\\\\n\\\\n\\\\n!Number methodsFor: 'intervals'!\\\\nto: stop\\\\n\\\\t\\\\\\\"Answer an Interval from the receiver up to the argument, stop, \\\\n\\\\tincrementing by 1.\\\\\\\"\\\\n\\\\n\\\\t^Interval from: self to: stop by: 1! !\\\\n\\\\n!Number methodsFor: 'intervals'!\\\\nto: stop by: step\\\\n\\\\t\\\\\\\"Answer an Interval from the receiver up to the argument, stop, \\\\n\\\\tincrementing by step.\\\\\\\"\\\\n\\\\n\\\\t^Interval from: self to: stop by: step! !\\\\n\\\\n!Number methodsFor: 'intervals' stamp: 'tao 1/30/1999 08:58'!\\\\nto: stop by: step do: aBlock \\\\n\\\\t\\\\\\\"Normally compiled in-line, and therefore not overridable.\\\\n\\\\tEvaluate aBlock for each element of the interval (self to: stop by: \\\\nstep).\\\\\\\"\\\\n\\\\t| nextValue |\\\\n\\\\tnextValue _ self.\\\\n\\\\tstep = 0 ifTrue: [self error: 'step must be non-zero'].\\\\n\\\\tstep < 0\\\\n\\\\t\\\\tifTrue: [[stop <= nextValue]\\\\n\\\\t\\\\t\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[aBlock value: nextValue.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnextValue _ nextValue + step]]\\\\n\\\\t\\\\tifFalse: [[stop >= nextValue]\\\\n\\\\t\\\\t\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[aBlock value: nextValue.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnextValue _ nextValue + step]]! !\\\\n\\\\n!Number methodsFor: 'intervals'!\\\\nto: stop do: aBlock \\\\n\\\\t\\\\\\\"Normally compiled in-line, and therefore not overridable.\\\\n\\\\tEvaluate aBlock for each element of the interval (self to: stop by: 1).\\\\\\\"\\\\n\\\\t| nextValue |\\\\n\\\\tnextValue _ self.\\\\n\\\\t[nextValue <= stop]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[aBlock value: nextValue.\\\\n\\\\t\\\\t\\\\tnextValue _ nextValue + 1]! !\\\\n\\\\n\\\\n!Number methodsFor: 'mathematical functions'!\\\\narcCos \\\\n\\\\t\\\\\\\"The receiver is the cosine of an angle. Answer the angle measured in \\\\n\\\\tradians.\\\\\\\"\\\\n\\\\n\\\\t^self asFloat arcCos! !\\\\n\\\\n!Number methodsFor: 'mathematical functions'!\\\\narcSin\\\\n\\\\t\\\\\\\"The receiver is the sine of an angle. Answer the angle measured in \\\\n\\\\tradians.\\\\\\\"\\\\n\\\\n\\\\t^self asFloat arcSin! !\\\\n\\\\n!Number methodsFor: 'mathematical functions'!\\\\narcTan\\\\n\\\\t\\\\\\\"The receiver is the tangent of an angle. Answer the angle measured in \\\\n\\\\tradians.\\\\\\\"\\\\n\\\\n\\\\t^self asFloat arcTan! !\\\\n\\\\n!Number methodsFor: 'mathematical functions' stamp: 'jsp 2/24/1999 15:20'!\\\\narcTan: denominator\\\\n\\\\t\\\\\\\"The receiver is the tangent of an angle. Answer the angle measured in \\\\n\\\\tradians.\\\\\\\"\\\\n\\\\n\\\\t^(self asFloat) arcTan: denominator.! !\\\\n\\\\n!Number methodsFor: 'mathematical functions'!\\\\ncos\\\\n\\\\t\\\\\\\"The receiver represents an angle measured in radians. Answer its cosine.\\\\\\\"\\\\n\\\\n\\\\t^self asFloat cos! !\\\\n\\\\n!Number methodsFor: 'mathematical functions' stamp: 'sd 3/5/2004 10:04'!\\\\ndegreeCos\\\\n\\\\t\\\\\\\"Answer the cosine of the receiver taken as an angle in degrees.\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ (90 + self) degreeSin! !\\\\n\\\\n!Number methodsFor: 'mathematical functions' stamp: 'sd 3/5/2004 10:04'!\\\\ndegreeSin\\\\n\\\\t\\\\\\\"Answer the sine of the receiver taken as an angle in degrees.\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ self asFloat degreesToRadians sin! !\\\\n\\\\n!Number methodsFor: 'mathematical functions'!\\\\nexp\\\\n\\\\t\\\\\\\"Answer the exponential of the receiver as a floating point number.\\\\\\\"\\\\n\\\\n\\\\t^self asFloat exp! !\\\\n\\\\n!Number methodsFor: 'mathematical functions' stamp: 'jm 3/27/98 06:16'!\\\\nfloorLog: radix\\\\n\\\\t\\\\\\\"Answer the floor of the log base radix of the receiver.\\\\\\\"\\\\n\\\\n\\\\t^ self asFloat floorLog: radix\\\\n! !\\\\n\\\\n!Number methodsFor: 'mathematical functions' stamp: 'ar 8/31/2000 20:05'!\\\\ninterpolateTo: aNumber at: param\\\\n\\\\t^self + (aNumber - self * param)! !\\\\n\\\\n!Number methodsFor: 'mathematical functions'!\\\\nln\\\\n\\\\t\\\\\\\"Answer the natural log of the receiver.\\\\\\\"\\\\n\\\\n\\\\t^self asFloat ln! !\\\\n\\\\n!Number methodsFor: 'mathematical functions' stamp: 'di 9/8/1998 17:10'!\\\\nlog\\\\n\\\\t\\\\\\\"Answer the base-10 log of the receiver.\\\\\\\"\\\\n\\\\n\\\\t^self asFloat log! !\\\\n\\\\n!Number methodsFor: 'mathematical functions'!\\\\nlog: aNumber \\\\n\\\\t\\\\\\\"Answer the log base aNumber of the receiver.\\\\\\\"\\\\n\\\\n\\\\t^self ln / aNumber ln! !\\\\n\\\\n!Number methodsFor: 'mathematical functions' stamp: 'RJ 3/15/1999 19:35'!\\\\nraisedTo: aNumber \\\\n\\\\t\\\\\\\"Answer the receiver raised to aNumber.\\\\\\\"\\\\n\\\\n\\\\taNumber isInteger ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"Do the special case of integer power\\\\\\\"\\\\n\\\\t\\\\t^ self raisedToInteger: aNumber].\\\\n\\\\tself < 0 ifTrue:\\\\n\\\\t\\\\t[ self error: self printString, ' raised to a non-integer power' ].\\\\n\\\\taNumber = 0 ifTrue: [^ 1].\\\\t\\\\t\\\\\\\"Special case of exponent=0\\\\\\\"\\\\n\\\\t(self = 0) | (aNumber = 1) ifTrue:\\\\n\\\\t\\\\t[^ self].\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Special case of exponent=1\\\\\\\"\\\\n\\\\t^ (aNumber * self ln) exp\\\\t\\\\t\\\\\\\"Otherwise use logarithms\\\\\\\"! !\\\\n\\\\n!Number methodsFor: 'mathematical functions' stamp: 'RAH 4/25/2000 19:49'!\\\\nraisedToInteger: operand \\\\n\\\\t\\\\\\\"Answer the receiver raised to the power operand, an Integer.\\\\\\\"\\\\n\\\\t| count result |\\\\n\\\\t#Numeric.\\\\n\\\\t\\\\\\\"Changed 200/01/19 For ANSI <number> support.\\\\\\\"\\\\n\\\\toperand isInteger ifFalse: [^ ArithmeticError signal: 'parameter is not an Integer'\\\\\\\"<- Chg\\\\\\\"].\\\\n\\\\toperand = 0 ifTrue: [^ self class one].\\\\n\\\\toperand = 1 ifTrue: [^ self].\\\\n\\\\toperand < 0 ifTrue: [^ (self raisedToInteger: operand negated) reciprocal].\\\\n\\\\tcount := 1.\\\\n\\\\t[(count := count + count) < operand] whileTrue.\\\\n\\\\tresult := self class one.\\\\n\\\\t[count > 0]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[result := result * result.\\\\n\\\\t\\\\t\\\\t(operand bitAnd: count)\\\\n\\\\t\\\\t\\\\t\\\\t= 0 ifFalse: [result := result * self].\\\\n\\\\t\\\\t\\\\tcount := count bitShift: -1].\\\\n\\\\t^ result! !\\\\n\\\\n!Number methodsFor: 'mathematical functions'!\\\\nsin\\\\n\\\\t\\\\\\\"The receiver represents an angle measured in radians. Answer its sine.\\\\\\\"\\\\n\\\\n\\\\t^self asFloat sin! !\\\\n\\\\n!Number methodsFor: 'mathematical functions'!\\\\nsqrt\\\\n\\\\t\\\\\\\"Answer the square root of the receiver.\\\\\\\"\\\\n\\\\n\\\\t^self asFloat sqrt! !\\\\n\\\\n!Number methodsFor: 'mathematical functions'!\\\\nsquared\\\\n\\\\t\\\\\\\"Answer the receiver multipled by itself.\\\\\\\"\\\\n\\\\n\\\\t^self * self! !\\\\n\\\\n!Number methodsFor: 'mathematical functions'!\\\\ntan\\\\n\\\\t\\\\\\\"The receiver represents an angle measured in radians. Answer its \\\\n\\\\ttangent.\\\\\\\"\\\\n\\\\n\\\\t^self asFloat tan! !\\\\n\\\\n\\\\n!Number methodsFor: 'printing'!\\\\ndefaultLabelForInspector\\\\n\\\\t\\\\\\\"Answer the default label to be used for an Inspector window on the receiver.\\\\\\\"\\\\n\\\\n\\\\t^ super defaultLabelForInspector, ': ', self printString! !\\\\n\\\\n!Number methodsFor: 'printing' stamp: 'sw 6/29/1999 21:10'!\\\\nisOrAreStringWith: aNoun\\\\n\\\\t| result |\\\\n\\\\tresult _ self = 1\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[' is one ']\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self = 0\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[' are no ']\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[' are ', self printString, ' ']].\\\\n\\\\tresult _ result, aNoun.\\\\n\\\\tself = 1 ifFalse: [result _ result, 's'].\\\\n\\\\t^ result\\\\n\\\\n\\\\\\\"#(0 1 2 98.6) do:\\\\n\\\\t[:num | Transcript cr; show: 'There', (num isOrAreStringWith: 'way'), ' to skin a cat']\\\\\\\"! !\\\\n\\\\n!Number methodsFor: 'printing' stamp: 'laza 3/29/2004 12:53'!\\\\nprintOn: aStream\\\\n\\\\tself printOn: aStream base: 10! !\\\\n\\\\n!Number methodsFor: 'printing' stamp: 'laza 3/29/2004 12:55'!\\\\nprintOn: aStream base: base\\\\n\\\\t^self subclassResponsibility! !\\\\n\\\\n!Number methodsFor: 'printing' stamp: 'laza 3/30/2004 10:50'!\\\\nprintString\\\\n\\\\t^self printStringBase: 10! !\\\\n\\\\n!Number methodsFor: 'printing'!\\\\nprintStringBase: base\\\\n\\\\t^ String streamContents:\\\\n\\\\t\\\\t[:strm | self printOn: strm base: base]! !\\\\n\\\\n!Number methodsFor: 'printing' stamp: 'laza 3/29/2004 12:50'!\\\\nstoreOn: aStream \\\\n\\\\tself printOn: aStream! !\\\\n\\\\n!Number methodsFor: 'printing' stamp: 'laza 3/29/2004 12:59'!\\\\nstoreOn: aStream base: base\\\\n\\\\tself printOn: aStream base: base! !\\\\n\\\\n!Number methodsFor: 'printing'!\\\\nstoreStringBase: base\\\\n\\\\t^ String streamContents: [:strm | self storeOn: strm base: base]! !\\\\n\\\\n!Number methodsFor: 'printing' stamp: 'sw 7/1/1998 12:33'!\\\\nstringForReadout\\\\n\\\\t^ self rounded printString! !\\\\n\\\\n\\\\n!Number methodsFor: 'testing' stamp: 'sw 9/27/2001 17:26'!\\\\nbasicType\\\\n\\\\t\\\\\\\"Answer a symbol representing the inherent type of the receiver\\\\\\\"\\\\n\\\\n\\\\t^ #Number! !\\\\n\\\\n!Number methodsFor: 'testing'!\\\\neven\\\\n\\\\t\\\\\\\"Answer whether the receiver is an even number.\\\\\\\"\\\\n\\\\n\\\\t^self \\\\\\\\\\\\\\\\ 2 = 0! !\\\\n\\\\n!Number methodsFor: 'testing' stamp: 'sw 12/30/1998 13:21'!\\\\nisDivisibleBy: aNumber\\\\n\\\\taNumber = 0 ifTrue: [^ false].\\\\n\\\\taNumber isInteger ifFalse: [^ false].\\\\n\\\\t^ (self \\\\\\\\\\\\\\\\ aNumber) = 0! !\\\\n\\\\n!Number methodsFor: 'testing' stamp: 'tao 10/10/97 16:36'!\\\\nisInf\\\\n\\\\t^ false! !\\\\n\\\\n!Number methodsFor: 'testing' stamp: 'tao 4/19/98 23:33'!\\\\nisInfinite\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Number methodsFor: 'testing' stamp: 'tao 10/10/97 16:36'!\\\\nisNaN\\\\n\\\\t^ false! !\\\\n\\\\n!Number methodsFor: 'testing'!\\\\nisNumber\\\\n\\\\t^ true! !\\\\n\\\\n!Number methodsFor: 'testing'!\\\\nisZero\\\\n\\\\t^self = 0! !\\\\n\\\\n!Number methodsFor: 'testing' stamp: 'di 4/23/1998 11:18'!\\\\nnegative\\\\n\\\\t\\\\\\\"Answer whether the receiver is mathematically negative.\\\\\\\"\\\\n\\\\n\\\\t^ self < 0! !\\\\n\\\\n!Number methodsFor: 'testing'!\\\\nodd\\\\n\\\\t\\\\\\\"Answer whether the receiver is an odd number.\\\\\\\"\\\\n\\\\n\\\\t^self even == false! !\\\\n\\\\n!Number methodsFor: 'testing' stamp: 'di 4/23/1998 11:17'!\\\\npositive\\\\n\\\\t\\\\\\\"Answer whether the receiver is positive or equal to 0. (ST-80 protocol).\\\\n\\\\tSee also strictlyPositive\\\\\\\"\\\\n\\\\n\\\\t^ self >= 0! !\\\\n\\\\n!Number methodsFor: 'testing'!\\\\nsign\\\\n\\\\t\\\\\\\"Answer 1 if the receiver is greater than 0, -1 if less than 0, else 0.\\\\\\\"\\\\n\\\\n\\\\tself > 0 ifTrue: [^1].\\\\n\\\\tself < 0 ifTrue: [^-1].\\\\n\\\\t^0! !\\\\n\\\\n!Number methodsFor: 'testing' stamp: 'di 4/23/1998 11:02'!\\\\nstrictlyPositive\\\\n\\\\t\\\\\\\"Answer whether the receiver is mathematically positive.\\\\\\\"\\\\n\\\\n\\\\t^ self > 0! !\\\\n\\\\n\\\\n!Number methodsFor: 'truncation and round off'!\\\\nceiling\\\\n\\\\t\\\\\\\"Answer the integer nearest the receiver toward positive infinity.\\\\\\\"\\\\n\\\\n\\\\tself <= 0.0\\\\n\\\\t\\\\tifTrue: [^self truncated]\\\\n\\\\t\\\\tifFalse: [^self negated floor negated]! !\\\\n\\\\n!Number methodsFor: 'truncation and round off' stamp: 'di 2/19/98 21:58'!\\\\ndetentBy: detent atMultiplesOf: grid snap: snap\\\\n\\\\t\\\\\\\"Map all values that are within detent/2 of any multiple of grid to that multiple.  Otherwise, if snap is true, return self, meaning that the values in the dead zone will never be returned.  If snap is false, then expand the range between dead zones so that it covers the range between multiples of the grid, and scale the value by that factor.\\\\\\\"\\\\n\\\\t| r1 r2 |\\\\n\\\\tr1 _ self roundTo: grid.  \\\\\\\"Nearest multiple of grid\\\\\\\"\\\\n\\\\t(self roundTo: detent) = r1 ifTrue: [^ r1].  \\\\\\\"Snap to that multiple...\\\\\\\"\\\\n\\\\tsnap ifTrue: [^ self].  \\\\\\\"...or return self\\\\\\\"\\\\n\\\\n\\\\tr2 _ self < r1  \\\\\\\"Nearest end of dead zone\\\\\\\"\\\\n\\\\t\\\\tifTrue: [r1 - (detent asFloat/2)]\\\\n\\\\t\\\\tifFalse: [r1 + (detent asFloat/2)].\\\\n\\\\t\\\\\\\"Scale values between dead zones to fill range between multiples\\\\\\\"\\\\n\\\\t^ r1 + ((self - r2) * grid asFloat / (grid - detent))\\\\n\\\\\\\"\\\\n\\\\t(170 to: 190 by: 2) collect: [:a | a detentBy: 10 atMultiplesOf: 90 snap: true] \\\\t(170 to: 190 by: 2) collect: [:a | a detentBy: 10 atMultiplesOf: 90 snap: false]\\\\n\\\\t(3.9 to: 4.1 by: 0.02) collect: [:a | a detentBy: 0.1 atMultiplesOf: 1.0 snap: true] \\\\t(-3.9 to: -4.1 by: -0.02) collect: [:a | a detentBy: 0.1 atMultiplesOf: 1.0 snap: false]\\\\n\\\\\\\"! !\\\\n\\\\n!Number methodsFor: 'truncation and round off'!\\\\nfloor\\\\n\\\\t\\\\\\\"Answer the integer nearest the receiver toward negative infinity.\\\\\\\"\\\\n\\\\n\\\\t| truncation |\\\\n\\\\ttruncation _ self truncated.\\\\n\\\\tself >= 0 ifTrue: [^truncation].\\\\n\\\\tself = truncation\\\\n\\\\t\\\\tifTrue: [^truncation]\\\\n\\\\t\\\\tifFalse: [^truncation - 1]! !\\\\n\\\\n!Number methodsFor: 'truncation and round off' stamp: 'RAH 4/25/2000 19:49'!\\\\nfractionPart\\\\n\\\\t\\\\\\\"Answer the fractional part of the receiver.\\\\\\\"\\\\n\\\\t#Numeric.\\\\n\\\\t\\\\\\\"2000/03/04  Harmon R. Added ANSI <number> protocol\\\\\\\"\\\\n\\\\t^ self - self truncated! !\\\\n\\\\n!Number methodsFor: 'truncation and round off' stamp: 'RAH 4/25/2000 19:49'!\\\\nintegerPart\\\\n\\\\t\\\\\\\"Answer the integer part of the receiver.\\\\\\\"\\\\n\\\\t#Numeric.\\\\n\\\\t\\\\\\\"2000/03/04  Harmon R. Added ANSI <number> protocol\\\\\\\"\\\\n\\\\t^ self truncated! !\\\\n\\\\n!Number methodsFor: 'truncation and round off'!\\\\nreduce\\\\n    \\\\\\\"If self is close to an integer, return that integer\\\\\\\"\\\\n    ^ self! !\\\\n\\\\n!Number methodsFor: 'truncation and round off' stamp: 'di 10/4/1999 08:08'!\\\\nroundTo: quantum \\\\n\\\\t\\\\\\\"Answer the nearest number that is a multiple of quantum.\\\\\\\"\\\\n\\\\n\\\\t^(self / quantum) rounded * quantum! !\\\\n\\\\n!Number methodsFor: 'truncation and round off'!\\\\nroundUpTo: aNumber \\\\n\\\\t\\\\\\\"Answer the next multiple of aNumber toward infinity that is nearest the \\\\n\\\\treceiver.\\\\\\\"\\\\n\\\\n\\\\t^(self/aNumber) ceiling * aNumber! !\\\\n\\\\n!Number methodsFor: 'truncation and round off'!\\\\nrounded\\\\n\\\\t\\\\\\\"Answer the integer nearest the receiver.\\\\\\\"\\\\n\\\\n\\\\t^(self + (self sign / 2)) truncated! !\\\\n\\\\n!Number methodsFor: 'truncation and round off'!\\\\ntruncateTo: aNumber \\\\n\\\\t\\\\\\\"Answer the next multiple of aNumber toward zero that is nearest the \\\\n\\\\treceiver.\\\\\\\"\\\\n\\\\n\\\\t^(self quo: aNumber)\\\\n\\\\t\\\\t* aNumber! !\\\\n\\\\n!Number methodsFor: 'truncation and round off'!\\\\ntruncated\\\\n\\\\t\\\\\\\"Answer an integer nearest the receiver toward zero.\\\\\\\"\\\\n\\\\n\\\\t^self quo: 1! !\\\\n\\\\n\\\\n!Number methodsFor: '*eToys-printing' stamp: 'sw 10/31/97 13:54'!\\\\nnewTileMorphRepresentative\\\\n\\\\t^ TileMorph new addArrows; setLiteral: self; addSuffixIfCan\\\\n! !\\\\n\\\\n\\\\n!Number methodsFor: '*eToys-vocabulary' stamp: 'sw 8/3/2001 13:43'!\\\\nvocabularyDemanded\\\\n\\\\t\\\\\\\"Answer the vocabulary normally preferred by this object\\\\\\\"\\\\n\\\\n\\\\t^ Vocabulary numberVocabulary! !\\\\n\\\\n\\\\n!Number methodsFor: '*Morphic-NewCurve-testing' stamp: 'jmv 2/21/2006 13:15'!\\\\nisNonZero\\\\n\\\\t\\\\\\\"Return true for numbers not zero and false for all other\\\\n\\\\tobjects \\\\\\\"\\\\n\\\\t^ self isZero not! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nNumber class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!Number class methodsFor: 'instance creation' stamp: 'nice 5/1/2006 21:46'!\\\\nreadExactlyFrom: stringOrStream \\\\n\\\\t\\\\\\\"Answer a number as described on aStream. The number may\\\\n\\\\tinclude a leading radix specification, as in 16rFADE\\\\\\\"\\\\n\\\\t\\\\n\\\\t^(SqNumberParser on: stringOrStream) nextNumber! !\\\\n\\\\n!Number class methodsFor: 'instance creation' stamp: 'yo 8/28/2002 22:40'!\\\\nreadFrom: stringOrStream \\\\n\\\\t\\\\\\\"Answer a number as described on aStream.  The number may\\\\n\\\\tinclude a leading radix specification, as in 16rFADE\\\\\\\"\\\\n\\\\t| value base aStream sign |\\\\n\\\\taStream _ (stringOrStream isString)\\\\n\\\\t\\\\tifTrue: [ReadStream on: stringOrStream]\\\\n\\\\t\\\\tifFalse: [stringOrStream].\\\\n\\\\t(aStream nextMatchAll: 'NaN') ifTrue: [^ Float nan].\\\\n\\\\tsign _ (aStream peekFor: $-) ifTrue: [-1] ifFalse: [1].\\\\n\\\\t(aStream nextMatchAll: 'Infinity') ifTrue: [^ Float infinity * sign].\\\\n\\\\tbase _ 10.\\\\n\\\\tvalue _ Integer readFrom: aStream base: base.\\\\n\\\\t(aStream peekFor: $r)\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"<base>r<integer>\\\\\\\"\\\\n\\\\t\\\\t\\\\t(base _ value) < 2 ifTrue: [^self error: 'Invalid radix'].\\\\n\\\\t\\\\t\\\\t(aStream peekFor: $-) ifTrue: [sign _ sign negated].\\\\n\\\\t\\\\t\\\\tvalue _ Integer readFrom: aStream base: base].\\\\n\\\\t^ self readRemainderOf: value from: aStream base: base withSign: sign.! !\\\\n\\\\n!Number class methodsFor: 'instance creation' stamp: 'yo 8/28/2002 22:41'!\\\\nreadFrom: stringOrStream base: base\\\\n\\\\t\\\\\\\"Answer a number as described on aStream in the given number base.\\\\\\\"\\\\n\\\\n\\\\t| aStream sign |\\\\n\\\\taStream _ (stringOrStream isString)\\\\n\\\\t\\\\tifTrue: [ReadStream on: stringOrStream]\\\\n\\\\t\\\\tifFalse: [stringOrStream].\\\\n\\\\t(aStream nextMatchAll: 'NaN') ifTrue: [^ Float nan].\\\\n\\\\tsign _ (aStream peekFor: $-) ifTrue: [-1] ifFalse: [1].\\\\n\\\\t(aStream nextMatchAll: 'Infinity') ifTrue: [^ Float infinity * sign].\\\\n\\\\t^ self readRemainderOf: (Integer readFrom: aStream base: base)\\\\n\\\\t\\\\t\\\\tfrom: aStream base: base withSign: sign! !\\\\n\\\\n\\\\n!Number class methodsFor: 'private' stamp: 'dtl 7/3/2006 17:41'!\\\\nreadExponent: baseValue base: base from: aStream\\\\n\\\\t\\\\\\\"Complete creation of a number, reading exponent from aStream. Answer the\\\\n\\\\tnumber, or nil if parsing fails.\\\\n\\\\t<number>(e|d|q)<exponent>>\\\\\\\"\\\\n\\\\n\\\\t| sign exp value |\\\\n\\\\t('edq' includes: aStream next) ifFalse: [^ nil].\\\\n\\\\tsign := ((aStream peek) == $-)\\\\n\\\\t\\\\tifTrue: [aStream next. -1]\\\\n\\\\t\\\\tifFalse: [1].\\\\n\\\\t(aStream atEnd or: [(aStream peek digitValue between: 0 and: 9) not])\\\\n\\\\t\\\\tifTrue: [^ nil]. \\\\\\\"Avoid throwing an error\\\\\\\"\\\\n\\\\texp := (Integer readFrom: aStream base: 10) * sign.\\\\n\\\\tvalue := baseValue * (base raisedTo: exp).\\\\n\\\\t^ value\\\\n! !\\\\n\\\\n!Number class methodsFor: 'private' stamp: 'dtl 7/4/2006 08:32'!\\\\nreadRemainderOf: integerPart from: aStream base: base withSign: sign \\\\n\\\\t\\\\\\\"Read optional fractional part and exponent or decimal scale, and return the final result\\\\\\\"\\\\n\\\\t\\\\\\\"Changed 200/01/19 For ANSI Numeric Literals support.\\\\\\\"\\\\n\\\\t\\\\\\\"Number readFrom: '3r-22.2'\\\\\\\"\\\\n\\\\n\\\\t| value fractionDigits fracpos fractionPart fraction pos v foundDecimal |\\\\n\\\\t#Numeric.\\\\n\\\\tvalue := integerPart.\\\\n\\\\tfractionDigits := 0.\\\\n\\\\tfoundDecimal := false.\\\\n\\\\t(aStream peekFor: $.)\\\\n\\\\t\\\\tifTrue: [\\\\\\\"<integer>.<fraction>\\\\\\\"\\\\n\\\\t\\\\t\\\\tfoundDecimal := true.\\\\n\\\\t\\\\t\\\\t(aStream atEnd not\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [aStream peek digitValue between: 0 and: base - 1])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [fracpos := aStream position.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tfractionPart := Integer readFrom: aStream base: base.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tfraction := fractionPart asFloat\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t/ (base raisedTo: aStream position - fracpos).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tfractionDigits := aStream position - fracpos.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tvalue := value asFloat + fraction]].\\\\n\\\\n\\\\tpos := aStream position.\\\\n\\\\t(v := self readScaledDecimal: integerPart\\\\n\\\\t\\\\t\\\\tfractionPart: fractionPart\\\\n\\\\t\\\\t\\\\tdigits: fractionDigits\\\\n\\\\t\\\\t\\\\tbase: base\\\\n\\\\t\\\\t\\\\tsign: sign\\\\n\\\\t\\\\t\\\\tfrom: aStream)\\\\n\\\\t\\\\tifNil: [aStream position: pos]\\\\n\\\\t\\\\tifNotNil: [^ v \\\\\\\"<number>s<scale>>\\\\\\\"].\\\\n\\\\n\\\\tpos := aStream position.\\\\n\\\\t(v := self readExponent: value base: base from: aStream)\\\\n\\\\t\\\\tifNil: [aStream position: pos.\\\\n\\\\t\\\\t\\\\t(foundDecimal and: [fractionDigits = 0])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"oops - just <integer>.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taStream skip: -1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"un-gobble the period\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^ value * sign]]\\\\n\\\\t\\\\tifNotNil: [value := v \\\\\\\"<number>(e|d|q)<exponent>>\\\\\\\"].\\\\n\\\\n\\\\t(value isFloat\\\\n\\\\t\\\\t\\\\tand: [value = 0.0\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [sign = -1]])\\\\n\\\\t\\\\tifTrue: [^ Float negativeZero]\\\\n\\\\t\\\\tifFalse: [^ value * sign]! !\\\\n\\\\n!Number class methodsFor: 'private' stamp: 'md 7/15/2006 18:00'!\\\\nreadScaledDecimal: integerPart fractionPart: fractionPart digits: fractionDigits base: base sign: sign from: aStream \\\\n\\\\t\\\\\\\"Complete creation of a ScaledDecimal, reading scale from aStream. Answer\\\\n\\\\ta ScaledDecimal, or nil if parsing fails.\\\\n\\\\t<number>s[<scale>]\\\\\\\"\\\\n\\\\n\\\\t| scale decimalMultiplier decimalFraction |\\\\n\\\\taStream atEnd ifTrue: [^ nil].\\\\n\\\\t(aStream next == $s) ifFalse: [^ nil].\\\\n\\\\t\\\\\\\"<number>s<scale>\\\\\\\"\\\\n\\\\t(aStream atEnd not and: [aStream peek digitValue between: 0 and: 9])\\\\n\\\\t\\\\tifTrue: [scale := Integer readFrom: aStream]\\\\n\\\\t\\\\tifFalse: [^ nil].\\\\n\\\\tscale isNil\\\\n\\\\t\\\\tifTrue: [\\\\\\\"<number>s\\\\\\\"\\\\n\\\\t\\\\t\\\\tfractionDigits = 0\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"<integer>s\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tscale := 0]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\\\\"<integer>.<fraction>s\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tscale := fractionDigits]].\\\\n\\\\tfractionPart isNil\\\\n\\\\t\\\\tifTrue: [^ ScaledDecimal newFromNumber: integerPart * sign scale: scale]\\\\n\\\\t\\\\tifFalse: [decimalMultiplier := base raisedTo: fractionDigits.\\\\n\\\\t\\\\t\\\\tdecimalFraction := integerPart * decimalMultiplier + fractionPart * sign / decimalMultiplier.\\\\n\\\\t\\\\t\\\\t^ ScaledDecimal newFromNumber: decimalFraction scale: scale]! !\\\\nTestCase subclass: #NumberParsingTest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'KernelTests-Numbers'!\\\\n!NumberParsingTest commentStamp: 'dtl 11/24/2004 15:35' prior: 0!\\\\nTests to verify parsing of numbers from streams and strings.\\\\n\\\\nNote: ScaledDecimalTest contains related tests for parsing ScaledDecimal.!\\\\n\\\\n\\\\n!NumberParsingTest methodsFor: 'tests - Float' stamp: 'dtl 11/24/2004 14:29'!\\\\ntestFloatFromStreamAsNumber\\\\n\\\\t\\\\\\\"This covers parsing in Number>>readFrom:\\\\\\\"\\\\n\\\\n\\\\t| rs aFloat |\\\\n\\\\trs _ '10r-12.3456' readStream.\\\\n\\\\taFloat _ Number readFrom: rs.\\\\n\\\\tself assert: -12.3456 = aFloat.\\\\n\\\\tself assert: rs atEnd.\\\\n\\\\n\\\\trs _ '10r-12.3456e2' readStream.\\\\n\\\\taFloat _ Number readFrom: rs.\\\\n\\\\tself assert: -1234.56 = aFloat.\\\\n\\\\tself assert: rs atEnd.\\\\n\\\\n\\\\trs _ '10r-12.3456e2e2' readStream.\\\\n\\\\taFloat _ Number readFrom: rs.\\\\n\\\\tself assert: -1234.56 = aFloat.\\\\n\\\\tself assert: rs upToEnd = 'e2'.\\\\n\\\\n\\\\trs _ '10r-12.3456d2' readStream.\\\\n\\\\taFloat _ Number readFrom: rs.\\\\n\\\\tself assert: -1234.56 = aFloat.\\\\n\\\\tself assert: rs atEnd.\\\\n\\\\n\\\\trs _ '10r-12.3456q2' readStream.\\\\n\\\\taFloat _ Number readFrom: rs.\\\\n\\\\tself assert: -1234.56 = aFloat.\\\\n\\\\tself assert: rs atEnd.\\\\n\\\\n\\\\trs _ '-12.3456q2' readStream.\\\\n\\\\taFloat _ Number readFrom: rs.\\\\n\\\\tself assert: -1234.56 = aFloat.\\\\n\\\\tself assert: rs atEnd.\\\\n\\\\n\\\\trs _ '12.3456q2' readStream.\\\\n\\\\taFloat _ Number readFrom: rs.\\\\n\\\\tself assert: 1234.56 = aFloat.\\\\n\\\\tself assert: rs atEnd.\\\\n\\\\n\\\\trs _ '12.3456z2' readStream.\\\\n\\\\taFloat _ Number readFrom: rs.\\\\n\\\\tself assert: 12.3456 = aFloat.\\\\n\\\\tself assert: rs upToEnd = 'z2'.\\\\n! !\\\\n\\\\n!NumberParsingTest methodsFor: 'tests - Float' stamp: 'nice 4/28/2006 01:20'!\\\\ntestFloatFromStreamWithExponent\\\\n\\\\t\\\\\\\"This covers parsing in Number>>readFrom:\\\\\\\"\\\\n\\\\n\\\\t| rs aFloat |\\\\n\\\\trs _ '1.0e-14' readStream.\\\\n\\\\taFloat _ Number readFrom: rs.\\\\n\\\\tself assert: 1.0e-14 = aFloat.\\\\n\\\\tself assert: rs atEnd.\\\\n\\\\n\\\\trs _ '1.0e-14 1' readStream.\\\\n\\\\taFloat _ Number readFrom: rs.\\\\n\\\\tself assert: 1.0e-14 = aFloat.\\\\n\\\\tself assert: rs upToEnd = ' 1'.\\\\n\\\\n\\\\trs _ '1.0e-14eee' readStream.\\\\n\\\\taFloat _ Number readFrom: rs.\\\\n\\\\tself assert: 1.0e-14 = aFloat.\\\\n\\\\tself assert: rs upToEnd = 'eee'.\\\\n\\\\n\\\\trs _ '1.0e14e10' readStream.\\\\n\\\\taFloat _ Number readFrom: rs.\\\\n\\\\tself assert: 1.0e14 = aFloat.\\\\n\\\\tself assert: rs upToEnd = 'e10'.\\\\n\\\\n\\\\trs _ '1.0e+14e' readStream. \\\\\\\"Plus sign is not parseable\\\\\\\"\\\\n\\\\taFloat _ Number readFrom: rs.\\\\n\\\\tself assert: 1.0 = aFloat.\\\\n\\\\tself assert: rs upToEnd = 'e+14e'.\\\\n\\\\n\\\\trs _ '1.0e' readStream.\\\\n\\\\taFloat _ Number readFrom: rs.\\\\n\\\\tself assert: 1.0 = aFloat.\\\\n\\\\tself assert: rs upToEnd = 'e'.! !\\\\n\\\\n!NumberParsingTest methodsFor: 'tests - Float' stamp: 'dtl 11/24/2004 14:07'!\\\\ntestFloatFromStringAsNumber\\\\n\\\\t\\\\\\\"This covers parsing in Number>>readFrom:\\\\\\\"\\\\n\\\\n\\\\t| aFloat |\\\\n\\\\taFloat _ '10r-12.3456' asNumber.\\\\n\\\\tself assert: -12.3456 = aFloat.\\\\n\\\\taFloat _ '10r-12.3456e2' asNumber.\\\\n\\\\tself assert: -1234.56 = aFloat.\\\\n\\\\taFloat _ '10r-12.3456d2' asNumber.\\\\n\\\\tself assert: -1234.56 = aFloat.\\\\n\\\\taFloat _ '10r-12.3456q2' asNumber.\\\\n\\\\tself assert: -1234.56 = aFloat.\\\\n\\\\taFloat _ '-12.3456q2' asNumber.\\\\n\\\\tself assert: -1234.56 = aFloat.\\\\n\\\\taFloat _ '12.3456q2' asNumber.\\\\n\\\\tself assert: 1234.56 = aFloat.\\\\n! !\\\\n\\\\n!NumberParsingTest methodsFor: 'tests - Float' stamp: 'dtl 11/24/2004 14:12'!\\\\ntestFloatFromStringWithExponent\\\\n\\\\t\\\\\\\"This covers parsing in Number>>readFrom:\\\\\\\"\\\\n\\\\n\\\\t| aFloat |\\\\n\\\\taFloat _ '1.0e-14' asNumber.\\\\n\\\\tself assert: 1.0e-14 = aFloat.\\\\n\\\\taFloat _ '1.0e-14 1' asNumber.\\\\n\\\\tself assert: 1.0e-14 = aFloat.\\\\n\\\\taFloat _ '1.0e-14e' asNumber.\\\\n\\\\tself assert: 1.0e-14 = aFloat.\\\\n\\\\taFloat _ '1.0e14e' asNumber.\\\\n\\\\tself assert: 1.0e14 = aFloat.\\\\n\\\\taFloat _ '1.0e+14e' asNumber. \\\\\\\"Plus sign is not parseable\\\\\\\"\\\\n\\\\tself assert: 1.0 = aFloat.\\\\n! !\\\\n\\\\n!NumberParsingTest methodsFor: 'tests - Float' stamp: 'nice 4/28/2006 01:39'!\\\\ntestFloatReadError\\\\n\\\\t\\\\\\\"This covers parsing in Number>>readFrom:\\\\\\\"\\\\n\\\\n\\\\t| rs num |\\\\n\\\\trs := '1e' readStream.\\\\n\\\\tnum := Number readFrom: rs.\\\\n\\\\tself assert: 1 = num.\\\\n\\\\tself assert: rs upToEnd = 'e'.\\\\n\\\\t\\\\n\\\\trs := '1s' readStream.\\\\n\\\\tnum := Number readFrom: rs.\\\\n\\\\tself assert: 1 = num.\\\\n\\\\tself assert: rs upToEnd = 's'.\\\\n\\\\n\\\\trs := '1.' readStream.\\\\n\\\\tnum := Number readFrom: rs.\\\\n\\\\tself assert: 1 = num.\\\\n\\\\tself assert: num isInteger.\\\\n\\\\tself assert: rs upToEnd = '.'.\\\\n\\\\t\\\\n\\\\trs := '' readStream.\\\\n\\\\tself should: [Number readFrom: rs] raise: Error.\\\\n\\\\t\\\\n\\\\trs := 'foo' readStream.\\\\n\\\\tself should: [Number readFrom: rs] raise: Error.\\\\n\\\\n\\\\trs := 'radix' readStream.\\\\n\\\\tself should: [Number readFrom: rs] raise: Error.\\\\n\\\\t\\\\n\\\\trs := '.e0' readStream.\\\\n\\\\tself should: [Number readFrom: rs] raise: Error.\\\\n\\\\t\\\\n\\\\trs := '-.e0' readStream.\\\\n\\\\tself should: [Number readFrom: rs] raise: Error.\\\\n\\\\t\\\\n\\\\trs := '--1' readStream.\\\\n\\\\tself should: [Number readFrom: rs] raise: Error.! !\\\\n\\\\n!NumberParsingTest methodsFor: 'tests - Float' stamp: 'dtl 11/24/2004 18:16'!\\\\ntestFloatReadWithRadix\\\\n\\\\t\\\\\\\"This covers parsing in Number>>readFrom:\\\\n\\\\tNote: In most Smalltalk dialects, the radix notation is not used for numbers\\\\n\\\\twith exponents. In Squeak, a string with radix and exponent can be parsed,\\\\n\\\\tand the exponent is always treated as base 10 (not the base indicated in the\\\\n\\\\tradix prefix). I am not sure if this is a feature, a bug, or both, but the\\\\n\\\\tSqueak behavior is documented in this test. -dtl\\\\\\\"\\\\n\\\\n\\\\t| aNumber rs |\\\\n\\\\taNumber _ '2r1.0101e9' asNumber.\\\\n\\\\tself assert: 672.0 = aNumber.\\\\n\\\\tself assert: (Number readFrom: '2r1.0101e9') = (1.3125 * (2 raisedTo: 9)).\\\\n\\\\trs _ ReadStream on: '2r1.0101e9e9'.\\\\n\\\\tself assert: (Number readFrom: rs) = 672.0.\\\\n\\\\tself assert: rs upToEnd = 'e9'\\\\n! !\\\\n\\\\n\\\\n!NumberParsingTest methodsFor: 'tests - Integer' stamp: 'dtl 11/24/2004 14:05'!\\\\ntestIntegerFromString\\\\n\\\\t\\\\\\\"This covers parsing in Number>>readFrom:\\\\n\\\\tTrailing decimal points should be ignored.\\\\\\\"\\\\n\\\\n\\\\tself assert: ('123' asNumber == 123).\\\\n\\\\tself assert: ('-123' asNumber == -123).\\\\n\\\\tself assert: ('123.' asNumber == 123).\\\\n\\\\tself assert: ('-123.' asNumber == -123).\\\\n\\\\tself assert: ('123This is not to be read' asNumber == 123).\\\\n\\\\tself assert: ('123s could be confused with a ScaledDecimal' asNumber == 123).\\\\n\\\\tself assert: ('123e could be confused with a Float' asNumber == 123).\\\\n! !\\\\n\\\\n!NumberParsingTest methodsFor: 'tests - Integer' stamp: 'tween 7/8/2006 12:31'!\\\\ntestIntegerReadFrom\\\\n\\\\t\\\\\\\"Ensure remaining characters in a stream are not lost when parsing an integer.\\\\\\\"\\\\n\\\\n\\\\t| rs i s |\\\\n\\\\trs _ ReadStream on: '123s could be confused with a ScaledDecimal'.\\\\n\\\\ti _ Number readFrom: rs.\\\\n\\\\tself assert: i == 123.\\\\n\\\\ts _ rs upToEnd.\\\\n\\\\tself assert: 's could be confused with a ScaledDecimal' = s.\\\\n\\\\trs _ ReadStream on: '123.s could be confused with a ScaledDecimal'.\\\\n\\\\ti _ Number readFrom: rs.\\\\n\\\\tself assert: i == 123.\\\\n\\\\ts _ rs upToEnd.\\\\n\\\\tself assert: '.s could be confused with a ScaledDecimal' = s.\\\\n\\\\trs _ ReadStream on: '123sA has unary message sA'.\\\\n\\\\ti _ Number readFrom: rs.\\\\n\\\\tself assert: i == 123.\\\\n\\\\ts _ rs upToEnd.\\\\n\\\\tself assert: 'sA has unary message sA' = s.\\\\t\\\\n\\\\trs _ ReadStream on: '123sB has unary message sB'.\\\\n\\\\ti _ Number readFrom: rs.\\\\n\\\\tself assert: i == 123.\\\\n\\\\ts _ rs upToEnd.\\\\n\\\\tself assert: 'sB has unary message sB' = s.\\\\n! !\\\\n\\\\n!NumberParsingTest methodsFor: 'tests - Integer' stamp: 'dtl 11/24/2004 18:18'!\\\\ntestIntegerReadWithRadix\\\\n\\\\t\\\\\\\"This covers parsing in Number>>readFrom:\\\\n\\\\tNote: In most Smalltalk dialects, the radix notation is not used for numbers\\\\n\\\\twith exponents. In Squeak, a string with radix and exponent can be parsed,\\\\n\\\\tand the exponent is always treated as base 10 (not the base indicated in the\\\\n\\\\tradix prefix). I am not sure if this is a feature, a bug, or both, but the\\\\n\\\\tSqueak behavior is documented in this test. -dtl\\\\\\\"\\\\n\\\\n\\\\t| aNumber rs |\\\\n\\\\taNumber _ '2r1e26' asNumber.\\\\n\\\\tself assert: 67108864 = aNumber.\\\\n\\\\tself assert: (Number readFrom: '2r1e26') = (2 raisedTo: 26).\\\\n\\\\trs _ '2r1e26eee' readStream.\\\\n\\\\tself assert: (Number readFrom: rs) = 67108864.\\\\n\\\\tself assert: rs upToEnd = 'eee'\\\\n! !\\\\nClassTestCase subclass: #NumberTest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'KernelTests-Numbers'!\\\\n\\\\n!NumberTest methodsFor: 'tests' stamp: 'fbs 3/8/2006 11:24'!\\\\ntestPrintShowingDecimalPlaces\\\\n\\\\n\\\\tself assert: (111.2 printShowingDecimalPlaces: 2) = '111.20'.\\\\n\\\\tself assert: (111.2 printShowingDecimalPlaces: 0) = '111'.\\\\n\\\\tself assert: (111 printShowingDecimalPlaces: 0) = '111'.\\\\n\\\\tself assert: (111111111111111 printShowingDecimalPlaces: 2) = '111111111111111.00'.\\\\n\\\\tself assert: (10 printShowingDecimalPlaces: 20) ='10.00000000000000000000'.\\\\n! !\\\\n\\\\n!NumberTest methodsFor: 'tests' stamp: 'sd 6/5/2005 08:56'!\\\\ntestReadFrom\\\\n\\\\t\\\\n\\\\tself assert: 1.0e-14\\\\t= (Number readFrom: '1.0e-14').\\\\n\\\\tself assert: 2r1e26\\\\t= (Number readFrom: '2r1e26').! !\\\\nDataType subclass: #NumberType\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Protocols-Type Vocabularies'!\\\\n!NumberType commentStamp: 'sw 10/3/2002 02:18' prior: 0!\\\\nNumberType is a data type representing a numeric value.!\\\\n\\\\n\\\\n!NumberType methodsFor: 'initial value' stamp: 'sw 9/27/2001 17:29'!\\\\ninitialValueForASlotFor: aPlayer\\\\n\\\\t\\\\\\\"Answer the value to give initially to a newly created slot of the given type in the given player\\\\\\\"\\\\n\\\\n\\\\t^ (1 to: 9) atRandom! !\\\\n\\\\n\\\\n!NumberType methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:39'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Initialize the receiver (automatically called when instances are created via 'new')\\\\\\\"\\\\n\\\\n\\\\t| aMethodCategory aMethodInterface |\\\\n\\\\tsuper initialize.\\\\n\\\\t\\\\\\\"Vocabulary replaceNumberVocabulary\\\\\\\"\\\\n\\\\t\\\\\\\"Vocabulary addVocabulary: Vocabulary newNumberVocabulary\\\\\\\"\\\\n\\\\n\\\\tself vocabularyName: #Number.\\\\n\\\\tself documentation: 'Numbers are things that can do arithmetic, have their magnitudes compared, etc.'.\\\\n\\\\n#((comparing\\\\t\\\\t\\\\t\\\\t'Determining which of two numbers is larger'\\\\n\\\\t\\\\t(= < > <= >= ~= ~~))\\\\n(arithmetic \\\\t\\\\t\\\\t\\\\t'Basic numeric operation'\\\\n\\\\t\\\\t(* + - / // \\\\\\\\\\\\\\\\ abs negated quo: rem:))\\\\n(testing \\\\t\\\\t\\\\t\\\\t\\\\t'Testing a number'\\\\n\\\\t\\\\t(even isDivisibleBy: negative odd positive sign))\\\\n(#'mathematical functions'\\\\t'Trigonometric and exponential functions'\\\\n\\\\t\\\\t(cos exp ln log log: raisedTo: sin sqrt squared tan raisedToInteger:))\\\\n(converting \\\\t\\\\t\\\\t\\\\t'Converting a number to another form'\\\\n\\\\t\\\\t(@ asInteger asPoint degreesToRadians radiansToDegrees asSmallAngleDegrees asSmallPositiveDegrees))\\\\n(#'truncation and round off' 'Making a real number (with a decimal point) into an integer'\\\\n\\\\t\\\\t(ceiling floor roundTo: roundUpTo: rounded truncateTo: truncated))\\\\n) do:\\\\n\\\\n\\\\t\\\\t[:item | \\\\n\\\\t\\\\t\\\\taMethodCategory := ElementCategory new categoryName: item first.\\\\n\\\\t\\\\t\\\\taMethodCategory documentation: item second.\\\\n\\\\t\\\\t\\\\titem third do:\\\\n\\\\t\\\\t\\\\t\\\\t[:aSelector | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\taMethodInterface := MethodInterface new conjuredUpFor: aSelector class: (Number whichClassIncludesSelector: aSelector).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\taMethodInterface argumentVariables do:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:var | var variableType: #Number].\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(#(* + - / // \\\\\\\\\\\\\\\\ abs negated quo: rem:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcos exp ln log log: raisedTo: sin sqrt squared tan raisedToInteger:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tasInteger degreesToRadians radiansToDegrees asSmallAngleDegrees asSmallPositiveDegrees)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tincludes: aSelector) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[aMethodInterface resultType: #Number].\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(#( @  asPoint ) includes: aSelector) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[aMethodInterface resultType: #Point].\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(#(= < > <= >= ~= ~~ even isDivisibleBy: negative odd positive) includes: aSelector) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[aMethodInterface resultType: #Boolean].\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\taMethodInterface setNotToRefresh.  \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself atKey: aSelector putMethodInterface: aMethodInterface.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\taMethodCategory elementAt: aSelector put: aMethodInterface].\\\\n\\\\t\\\\t\\\\tself addCategory: aMethodCategory].\\\\n\\\\n\\\\\\\"\\\\n(('truncation and round off' ceiling detentBy:atMultiplesOf:snap: floor roundTo: roundUpTo: rounded truncateTo: truncated)\\\\n('testing' basicType even isDivisibleBy: isInf isInfinite isNaN isNumber isZero negative odd positive sign strictlyPositive)\\\\n('converting' @ adaptToCollection:andSend: adaptToFloat:andSend: adaptToFraction:andSend: adaptToInteger:andSend: adaptToPoint:andSend: adaptToString:andSend: asInteger asNumber asPoint asSmallAngleDegrees asSmallPositiveDegrees degreesToRadians radiansToDegrees)\\\\n('intervals' to: to:by: to:by:do: to:do:)\\\\n('printing' defaultLabelForInspector isOrAreStringWith: newTileMorphRepresentative printOn: printStringBase: storeOn: storeOn:base: storeStringBase: stringForReadout)\\\\n('comparing' closeTo:)\\\\n('filter streaming' byteEncode:)\\\\n('as yet unclassified' reduce)\\\\\\\"\\\\n\\\\n\\\\n\\\\n! !\\\\n\\\\n\\\\n!NumberType methodsFor: '*eToys-color' stamp: 'sw 9/27/2001 17:21'!\\\\ntypeColor\\\\n\\\\t\\\\\\\"Answer the color for tiles to be associated with objects of this type\\\\\\\"\\\\n\\\\n\\\\t^ self subduedColorFromTriplet: #(0.8 0.4 0.2)! !\\\\n\\\\n\\\\n!NumberType methodsFor: '*eToys-tiles' stamp: 'dgd 9/6/2003 20:30'!\\\\naddExtraItemsToMenu: aMenu forSlotSymbol: slotSym\\\\n\\\\t\\\\\\\"If the receiver has extra menu items to add to the slot menu, here is its chance to do it.  The defaultTarget of the menu is the player concerned.\\\\\\\"\\\\n\\\\n\\\\taMenu add: 'decimal places...' translated selector: #setPrecisionFor: argument: slotSym.\\\\n\\\\taMenu balloonTextForLastItem: 'Lets you choose how many decimal places should be shown in readouts for this variable' translated! !\\\\n\\\\n!NumberType methodsFor: '*eToys-tiles' stamp: 'sw 9/15/2002 16:50'!\\\\naddUserSlotItemsTo: aMenu slotSymbol: slotSym\\\\n\\\\t\\\\\\\"Optionally add items to the menu that pertain to a user-defined slot of the given symbol\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"aMenu add: 'decimal places...' selector: #setPrecisionFor: argument: slotSym\\\\n\\\\tNB: This item is now generically added for system as well as user slots, so the addition is now done in NubmerType.addExtraItemsToMenu:forSlotSymbol:\\\\\\\"! !\\\\n\\\\n!NumberType methodsFor: '*eToys-tiles' stamp: 'sw 9/27/2001 02:53'!\\\\ncomparatorForSampleBoolean\\\\n\\\\t\\\\\\\"Answer the comparator to use in tile coercions involving the receiver; normally, the equality comparator is used but NumberType overrides\\\\\\\"\\\\n\\\\n\\\\t^ #<! !\\\\n\\\\n!NumberType methodsFor: '*eToys-tiles' stamp: 'sw 9/27/2001 17:30'!\\\\ndefaultArgumentTile\\\\n\\\\t\\\\\\\"Answer a tile to represent the type\\\\\\\"\\\\n\\\\n\\\\t^ 5 newTileMorphRepresentative typeColor: self typeColor! !\\\\n\\\\n!NumberType methodsFor: '*eToys-tiles' stamp: 'sw 9/27/2001 17:37'!\\\\nnewReadoutTile\\\\n\\\\t\\\\\\\"Answer a tile that can serve as a readout for data of this type\\\\\\\"\\\\n\\\\n\\\\t^ NumericReadoutTile new typeColor: Color lightGray lighter! !\\\\n\\\\n!NumberType methodsFor: '*eToys-tiles' stamp: 'sw 9/26/2001 03:11'!\\\\nwantsAssignmentTileVariants\\\\n\\\\t\\\\\\\"Answer whether an assignment tile for a variable of this type should show variants to increase-by, decrease-by, multiply-by.\\\\\\\"\\\\n\\\\n\\\\t^ true! !\\\\n\\\\n!NumberType methodsFor: '*eToys-tiles' stamp: 'sw 9/26/2001 03:18'!\\\\nwantsSuffixArrow\\\\n\\\\t\\\\\\\"Answer whether a tile showing data of this type would like to have a suffix arrow\\\\\\\"\\\\n\\\\n\\\\t^ true! !\\\\nTileMorph subclass: #NumericReadoutTile\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'EToys-Scripting Tiles'!\\\\n\\\\n!NumericReadoutTile methodsFor: 'accessing' stamp: 'ar 9/15/2000 23:27'!\\\\nabandonLabelFocus\\\\n\\\\t| aLabel |\\\\n\\\\t\\\\\\\"If the receiver's label has editing focus, abandon it\\\\\\\"\\\\n\\\\tself flag: #arNote. \\\\\\\"Probably unnecessary\\\\\\\"\\\\n\\\\t(aLabel _ self labelMorph) ifNotNil:\\\\n\\\\t\\\\t[aLabel hasFocus ifTrue:\\\\n\\\\t\\\\t\\\\t[aLabel contents: aLabel readFromTarget.\\\\n\\\\t\\\\t\\\\taLabel handsWithMeForKeyboardFocus do:\\\\n\\\\t\\\\t\\\\t\\\\t[:aHand | aHand releaseKeyboardFocus]]]! !\\\\n\\\\n!NumericReadoutTile methodsFor: 'accessing' stamp: 'tak 12/6/2004 01:53'!\\\\nliteralFromContents\\\\n\\\\t| label |\\\\n\\\\tlabel _ self labelMorph\\\\n\\\\t\\\\t\\\\t\\\\tifNil: [^ super literal].\\\\n\\\\tlabel step.\\\\n\\\\t^ literal _ label valueFromContents! !\\\\n\\\\n!NumericReadoutTile methodsFor: 'accessing' stamp: 'tak 4/6/2005 14:10'!\\\\nliteral: anObject \\\\n\\\\tliteral := anObject.\\\\n\\\\tself updateLiteralLabel.\\\\n\\\\tself labelMorph\\\\n\\\\t\\\\tifNotNilDo: [:label | label informTarget]! !\\\\n\\\\n\\\\n!NumericReadoutTile methodsFor: 'literal' stamp: 'sw 9/15/1999 15:14'!\\\\nsetLiteralTo: anObject width: w\\\\n\\\\t\\\\\\\"like literal:width: but does not inform the target\\\\\\\"\\\\n\\\\tliteral _ anObject.\\\\n\\\\tself updateLiteralLabel.\\\\n\\\\tsubmorphs last setWidth: w.\\\\n\\\\tself updateLiteralLabel! !\\\\n\\\\n\\\\n!NumericReadoutTile methodsFor: 'misc' stamp: 'sw 9/17/1999 08:01'!\\\\nbasicWidth\\\\n\\\\t^ 26! !\\\\n\\\\n!NumericReadoutTile methodsFor: 'misc' stamp: 'sw 9/17/1999 08:18'!\\\\nminimumWidth\\\\n\\\\t^ 40! !\\\\n\\\\n\\\\n!NumericReadoutTile methodsFor: 'mouse' stamp: 'ar 10/25/2000 18:07'!\\\\nhandlesMouseMove: evt\\\\n\\\\t^true! !\\\\n\\\\n\\\\n!NumericReadoutTile methodsFor: 'parts bin' stamp: 'sw 11/15/2001 20:22'!\\\\ninitializeToStandAlone\\\\n\\\\t\\\\\\\"Enclose my prototype in a SyntaxMorph.  For the ObjectTool\\\\\\\"\\\\n\\\\n\\\\t| aWatcher aTile aLine aColor ms slotMsg |\\\\n\\\\n\\\\tsuper initializeToStandAlone.\\\\n\\\\taColor _ Color r: 0.387 g: 0.581 b: 1.0.\\\\n\\\\taTile _ self typeColor: aColor.\\\\n\\\\taWatcher _ UpdatingStringMorph new.\\\\n\\\\taWatcher growable: true;\\\\n\\\\t\\\\tgetSelector: nil;\\\\n\\\\t\\\\tputSelector: nil;\\\\n\\\\t\\\\tsetToAllowTextEdit.\\\\n\\\\taWatcher target: nil.\\\\n\\\\taTile addMorphBack: aWatcher.\\\\n\\\\taTile addArrows.\\\\n\\\\taTile setLiteralTo: 5 width: 30.\\\\n\\\\n\\\\tms _ MessageSend receiver: nil selector: #aNumber arguments: #().\\\\n\\\\tslotMsg _ ms asTilesIn: Player globalNames: false.\\\\n\\\\t\\\\t\\\\\\\"For CardPlayers, use 'aPlayer'.  For others, name it, and use its name.\\\\\\\"\\\\n\\\\tms _ MessageSend receiver: 3 selector: #= asSymbol arguments: #(5).\\\\n\\\\taLine _ ms asTilesIn: Player globalNames: false.\\\\n\\\\taLine firstSubmorph delete.\\\\t\\\\t\\\\\\\"A little over-complicated?  Yes?\\\\\\\"\\\\n\\\\taLine addMorphFront: (slotMsg submorphs second) firstSubmorph.\\\\n\\\\taLine addMorphFront: (Morph new transparentSpacerOfSize: 3@3).\\\\n\\\\taLine lastSubmorph delete.\\\\n\\\\taLine lastSubmorph delete.\\\\n\\\\taLine color: aColor.\\\\n\\\\taLine addMorphBack: (Morph new transparentSpacerOfSize: 3@3).\\\\n\\\\taLine addMorphBack: aTile.\\\\n\\\\taLine cellPositioning: #leftCenter.\\\\n\\\\taWatcher step; fitContents.\\\\n\\\\t^ aLine markAsPartsDonor.! !\\\\n\\\\n\\\\n!NumericReadoutTile methodsFor: 'testing' stamp: 'tk 11/1/2001 12:41'!\\\\nbasicType\\\\n\\\\t\\\\\\\"Answer a symbol representing the inherent type I hold\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Number String Boolean player collection sound color etc\\\\\\\"\\\\n\\\\t^ #Number! !\\\\n\\\\n\\\\n!NumericReadoutTile methodsFor: 'event handling' stamp: 'tak 8/2/2005 23:36'!\\\\nmouseStillDown: evt \\\\n\\\\t(self labelMorph notNil\\\\n\\\\t\\\\t\\\\tand: [self labelMorph containsPoint: evt cursorPoint])\\\\n\\\\t\\\\tifTrue: [^ self labelMorph mouseDown: evt].\\\\n\\\\t^ super mouseStillDown: evt! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nNumericReadoutTile class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!NumericReadoutTile class methodsFor: 'instance creation' stamp: 'tk 12/14/2001 19:32'!\\\\nborderedPrototype\\\\n\\\\t\\\\\\\"Just number and up/down arrows\\\\\\\"\\\\n\\\\n\\\\t| aWatcher aTile |\\\\n\\\\n\\\\taTile _ self new typeColor: (Color r: 0.387 g: 0.581 b: 1.0).\\\\n\\\\taWatcher _ UpdatingStringMorph new.\\\\n\\\\taWatcher growable: true; setNameTo: 'value'.\\\\n\\\\taTile addMorphBack: aWatcher.\\\\n\\\\taTile addArrows; setNameTo: 'Number (mid)'.\\\\n\\\\taTile setLiteralTo: 5 width: 30.\\\\n\\\\taWatcher step; fitContents; setToAllowTextEdit.\\\\n\\\\t^ aTile extent: 30@24; markAsPartsDonor! !\\\\n\\\\n!NumericReadoutTile class methodsFor: 'instance creation' stamp: 'tk 12/14/2001 19:29'!\\\\nsimplePrototype\\\\n\\\\t\\\\\\\"Bare number readout.  Will keep up to data with a number once it has target, getterSelector, setterSelector.\\\\\\\"\\\\n\\\\n\\\\t^ (UpdatingStringMorph new) contents: '5'; growable: true; setToAllowTextEdit; \\\\n\\\\t\\\\tstep; fitContents; setNameTo: 'Number (bare)'; markAsPartsDonor! !\\\\n\\\\n!NumericReadoutTile class methodsFor: 'instance creation' stamp: 'nk 8/23/2004 18:11'!\\\\nsupplementaryPartsDescriptions\\\\n\\\\t\\\\\\\"Answer additional items for the parts bin\\\\\\\"\\\\n\\\\n\\\\tPreferences universalTiles ifFalse: [^ #()].\\\\n\\\\n\\\\t^ {DescriptionForPartsBin\\\\n\\\\t\\\\tformalName: 'Number (fancy)'\\\\n\\\\t\\\\tcategoryList: #('Basic')\\\\n\\\\t\\\\tdocumentation: 'A number readout for a Stack.  Shows current value.  Click and type the value.  Shift-click on title to edit.'\\\\n\\\\t\\\\tglobalReceiverSymbol: #NumericReadoutTile\\\\n\\\\t\\\\tnativitySelector: #authoringPrototype.\\\\n\\\\n\\\\t   DescriptionForPartsBin\\\\n\\\\t\\\\tformalName: 'Number (bare)'\\\\n\\\\t\\\\tcategoryList: #('Basic')\\\\n\\\\t\\\\tdocumentation: 'A number readout for a Stack.  Shows current value.  Click and type the value.'\\\\n\\\\t\\\\tglobalReceiverSymbol: #NumericReadoutTile\\\\n\\\\t\\\\tnativitySelector: #simplePrototype.\\\\n\\\\n\\\\t   DescriptionForPartsBin\\\\n\\\\t\\\\tformalName: 'Number (mid)'\\\\n\\\\t\\\\tcategoryList: #('Basic')\\\\n\\\\t\\\\tdocumentation: 'A number readout for a Stack.  Shows current value.  Click and type the value.'\\\\n\\\\t\\\\tglobalReceiverSymbol: #NumericReadoutTile\\\\n\\\\t\\\\tnativitySelector: #borderedPrototype}! !\\\\n\\\\n\\\\n!NumericReadoutTile class methodsFor: 'scripting' stamp: 'tk 12/14/2001 19:30'!\\\\nauthoringPrototype\\\\n\\\\t\\\\\\\"Enclose my prototype in a SyntaxMorph.\\\\\\\"\\\\n\\\\n\\\\t| aWatcher aTile aLine aColor ms slotMsg |\\\\n\\\\n\\\\taColor _ Color r: 0.387 g: 0.581 b: 1.0.\\\\n\\\\taTile _ self new typeColor: aColor.\\\\n\\\\taWatcher _ UpdatingStringMorph new.\\\\n\\\\taWatcher growable: true;\\\\n\\\\t\\\\tsetToAllowTextEdit;\\\\n\\\\t\\\\tgetSelector: nil;\\\\n\\\\t\\\\tputSelector: nil.\\\\n\\\\taWatcher target: nil.\\\\n\\\\taTile addMorphBack: aWatcher.\\\\n\\\\taTile addArrows.\\\\n\\\\taTile setLiteralTo: 5 width: 30.\\\\n\\\\n\\\\t\\\\\\\"This is the long way around to do this...\\\\\\\"\\\\n\\\\tms _ MessageSend receiver: nil selector: #aNumber arguments: #().\\\\n\\\\tslotMsg _ ms asTilesIn: Player globalNames: false.\\\\n\\\\t\\\\t\\\\\\\"For CardPlayers, use 'aPlayer'.  For others, name it, and use its name.\\\\\\\"\\\\n\\\\tms _ MessageSend receiver: 3 selector: #= asSymbol arguments: #(5).\\\\n\\\\taLine _ ms asTilesIn: Player globalNames: false.\\\\n\\\\taLine firstSubmorph delete.\\\\t\\\\n\\\\taLine addMorphFront: (slotMsg submorphs second) firstSubmorph.\\\\n\\\\taLine firstSubmorph setNameTo: 'label'.\\\\n\\\\taLine addMorphFront: (Morph new transparentSpacerOfSize: 3@3).\\\\n\\\\taLine lastSubmorph delete.\\\\n\\\\taLine lastSubmorph delete.\\\\n\\\\taLine color: aColor; setNameTo: 'Number (fancy)'.\\\\n\\\\taLine addMorphBack: (Morph new transparentSpacerOfSize: 3@3).\\\\n\\\\taLine addMorphBack: aTile.\\\\n\\\\taLine readOut setNameTo: 'value'.\\\\n\\\\taLine cellPositioning: #leftCenter.\\\\n\\\\taWatcher step; fitContents.\\\\n\\\\t^ aLine markAsPartsDonor.! !\\\\nOBAnnouncement subclass: #OBAboutToChange\\\\n\\\\tinstanceVariableNames: 'veto'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Announcements'!\\\\n\\\\n!OBAboutToChange methodsFor: 'vetos' stamp: 'cwp 4/17/2006 22:18'!\\\\nisVetoed\\\\n\\\\t^ veto notNil! !\\\\n\\\\n!OBAboutToChange methodsFor: 'vetos' stamp: 'cwp 4/17/2006 19:45'!\\\\nveto\\\\n\\\\tveto _ true! !\\\\nMessageSend subclass: #OBAction\\\\n\\\\tinstanceVariableNames: 'announcer dispatcher label buttonLabel keystroke icon'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Services'!\\\\n!OBAction commentStamp: 'cwp 3/4/2004 20:52' prior: 0!\\\\nActions represent commands for manipulating the graph domain. They can be made available through menus or buttons in the browser. They carry information on how they should be presented to the user, and are responsible for handling exceptions generated when they are triggered. Actions are created by Actors.\\\\n\\\\niVars: \\\\n\\\\nlabel \\\\t\\\\ta string which describes the action for the user.\\\\nmonitor  \\\\twhen the action is triggered, any notifications raised \\\\n\\\\t\\\\t\\\\twill be passed to this object for processing!\\\\n\\\\n\\\\n!OBAction methodsFor: 'accessing' stamp: 'cwp 6/4/2006 00:25'!\\\\nannouncer\\\\n\\\\t^ announcer! !\\\\n\\\\n!OBAction methodsFor: 'accessing' stamp: 'cwp 6/4/2006 00:25'!\\\\nannouncer: anAnnouncer\\\\n\\\\tannouncer _ anAnnouncer! !\\\\n\\\\n!OBAction methodsFor: 'accessing' stamp: 'cwp 3/10/2004 23:35'!\\\\nbuttonLabel\\\\n\\\\t^ buttonLabel! !\\\\n\\\\n!OBAction methodsFor: 'accessing' stamp: 'cwp 3/10/2004 23:35'!\\\\nbuttonLabel: aString\\\\n\\\\tbuttonLabel _ aString\\\\n\\\\t! !\\\\n\\\\n!OBAction methodsFor: 'accessing' stamp: 'hpt 5/17/2004 16:42'!\\\\nicon\\\\n\\\\t^icon! !\\\\n\\\\n!OBAction methodsFor: 'accessing' stamp: 'hpt 5/17/2004 16:42'!\\\\nicon: anIcon\\\\n\\\\ticon _ anIcon! !\\\\n\\\\n!OBAction methodsFor: 'accessing' stamp: 'hpt 5/17/2004 14:16'!\\\\nkeystroke\\\\n\\\\t^keystroke! !\\\\n\\\\n!OBAction methodsFor: 'accessing' stamp: 'hpt 5/17/2004 14:16'!\\\\nkeystroke: aChar\\\\n\\\\tkeystroke _ aChar! !\\\\n\\\\n!OBAction methodsFor: 'accessing' stamp: 'cwp 1/7/2004 09:11'!\\\\nlabel\\\\n\\\\t^ label! !\\\\n\\\\n!OBAction methodsFor: 'accessing' stamp: 'cwp 1/7/2004 09:12'!\\\\nlabel: aString\\\\n\\\\tlabel _ aString! !\\\\n\\\\n!OBAction methodsFor: 'accessing' stamp: 'cwp 3/10/2004 23:40'!\\\\nwantsButton\\\\n\\\\t^ buttonLabel notNil! !\\\\n\\\\n\\\\n!OBAction methodsFor: 'evaluating' stamp: 'cwp 1/7/2004 18:22'!\\\\nperform: aSelector orSendTo: anObject\\\\n\\\\t^ self perform: aSelector! !\\\\n\\\\n!OBAction methodsFor: 'evaluating' stamp: 'cwp 6/4/2006 00:58'!\\\\ntrigger\\\\n\\\\t[self value]\\\\n\\\\t\\\\ton: OBAnnouncerRequest\\\\n\\\\t\\\\tdo: [:notification | notification resume: announcer].! !\\\\n\\\\n\\\\n!OBAction methodsFor: 'morphic' stamp: 'hpt 5/17/2004 17:00'!\\\\naddItemToMenu: aMenu\\\\n\\\\taMenu\\\\n\\\\t\\\\tadd: self labelWithKeystroke\\\\n\\\\t\\\\ttarget: self \\\\n\\\\t\\\\tselector: #trigger.\\\\n\\\\tPreferences menuWithIcons & self icon notNil\\\\n\\\\t\\\\tifTrue: [aMenu lastItem icon: self icon].\\\\n\\\\taMenu addBlankIconsIfNecessary: MenuIcons blankIcon.! !\\\\n\\\\n!OBAction methodsFor: 'morphic' stamp: 'cwp 7/8/2006 12:55'!\\\\nbuttonLabelMorph\\\\n\\\\t^ StringMorph \\\\n\\\\t\\\\tcontents: self buttonLabel \\\\n\\\\t\\\\tfont: Preferences standardButtonFont! !\\\\n\\\\n!OBAction methodsFor: 'morphic' stamp: 'cwp 7/8/2006 12:54'!\\\\nbuttonMorph\\\\n\\\\t^ (PluggableButtonMorph\\\\n\\\\t\\\\ton: self\\\\n\\\\t\\\\tgetState: nil\\\\n\\\\t\\\\taction: #trigger\\\\n\\\\t\\\\tlabel: #buttonLabelMorph)\\\\t\\\\n\\\\t\\\\t\\\\tonColor: Color lightGray lighter offColor: Color lightGray twiceLighter;\\\\n\\\\t\\\\t\\\\tborderWidth: 2;\\\\n\\\\t\\\\t\\\\tborderRaised;\\\\n\\\\t\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\t\\\\tvResizing: #spaceFill;\\\\n\\\\t\\\\t\\\\tsetBalloonText: label! !\\\\n\\\\n!OBAction methodsFor: 'morphic' stamp: 'hpt 5/17/2004 14:17'!\\\\nlabelWithKeystroke\\\\n\\\\t^keystroke\\\\n\\\\t\\\\tifNil: [label]\\\\n\\\\t\\\\tifNotNil: [label, ' (', keystroke asString, ')']! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBAction class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBAction class methodsFor: 'instance creation' stamp: 'cwp 3/10/2004 23:36'!\\\\nlabel: aString buttonLabel: aString2 receiver: anObject selector: aSelector arguments: anArray\\\\n\\\\t^ (self receiver: anObject selector: aSelector arguments: anArray) \\\\n\\\\t\\\\tlabel: aString;\\\\n\\\\t\\\\tbuttonLabel: aString2! !\\\\n\\\\n!OBAction class methodsFor: 'instance creation' stamp: 'cwp 12/5/2004 18:49'!\\\\nlabel: aString buttonLabel: aString2 receiver: anObject selector: aSelector \\\\narguments: anArray keystroke: aChar icon: anIcon\\\\n\\\\t^ (self receiver: anObject selector: aSelector arguments: anArray) \\\\n\\\\t\\\\tlabel: aString;\\\\n\\\\t\\\\tbuttonLabel: aString2;\\\\n\\\\t\\\\tkeystroke: aChar;\\\\n\\\\t\\\\ticon: anIcon! !\\\\n\\\\n!OBAction class methodsFor: 'instance creation' stamp: 'cwp 1/7/2004 09:20'!\\\\nlabel: aString receiver: anObject selector: aSelector arguments: anArray\\\\n\\\\t^ (self receiver: anObject selector: aSelector arguments: anArray) label: aString! !\\\\n\\\\n!OBAction class methodsFor: 'instance creation' stamp: 'hpt 5/17/2004 16:50'!\\\\nlabel: aString receiver: anObject selector: aSelector arguments: anArray icon: anIcon\\\\n\\\\t^ (self receiver: anObject selector: aSelector arguments: anArray) \\\\n\\\\t\\\\tlabel: aString;\\\\n\\\\t\\\\ticon: anIcon! !\\\\n\\\\n!OBAction class methodsFor: 'instance creation' stamp: 'hpt 5/17/2004 14:16'!\\\\nlabel: aString receiver: anObject selector: aSelector arguments: anArray keystroke: aChar\\\\n\\\\t^ (self receiver: anObject selector: aSelector arguments: anArray) \\\\n\\\\t\\\\tlabel: aString;\\\\n\\\\t\\\\tkeystroke: aChar! !\\\\n\\\\n!OBAction class methodsFor: 'instance creation' stamp: 'hpt 5/17/2004 16:50'!\\\\nlabel: aString receiver: anObject selector: aSelector arguments: anArray keystroke: aChar icon: anIcon\\\\n\\\\t^ (self receiver: anObject selector: aSelector arguments: anArray) \\\\n\\\\t\\\\tlabel: aString;\\\\n\\\\t\\\\tkeystroke: aChar;\\\\n\\\\t\\\\ticon: anIcon! !\\\\nObject subclass: #OBActor\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Services'!\\\\n!OBActor commentStamp: 'cwp 1/7/2005 23:14' prior: 0!\\\\nActors provide the basic units of domain-related functionality. They are attached to metanodes, and supply the Actions used to build context menus and buttons in the browser. Actors can be proxies for functionality supplied by other classes, as in OBFileRegistryActor, or they may supply the funtionality them selves. \\\\n\\\\nOBActor is an abstract class which defines the protocol Actors must implement. Actors need not be subclasses of OBActor, however.!\\\\n\\\\n\\\\n!OBActor methodsFor: 'accessing' stamp: 'cwp 9/16/2004 23:25'!\\\\nactionWithLabel: aString selector: aSymbol \\\\n\\\\tself shouldBeImplemented! !\\\\n\\\\n\\\\n!OBActor methodsFor: 'public' stamp: 'cwp 2/4/2004 15:25'!\\\\nactionsForNode: aNode\\\\n\\\\t^#()! !\\\\n\\\\n!OBActor methodsFor: 'public' stamp: 'cwp 2/5/2004 20:12'!\\\\nactionsForParent: aNode\\\\n\\\\t^#()! !\\\\n\\\\n\\\\n!OBActor methodsFor: 'icons' stamp: 'cwp 7/10/2006 22:30'!\\\\ndeleteIcon\\\\n\\\\t^ MenuIcons tryIcons: #(deleteIcon smallDeleteIcon)! !\\\\n\\\\n!OBActor methodsFor: 'icons' stamp: 'cwp 7/10/2006 22:31'!\\\\nfindIcon\\\\n\\\\t^ MenuIcons tryIcons: #(findIcon smallFindIcon)! !\\\\n\\\\n!OBActor methodsFor: 'icons' stamp: 'cwp 7/10/2006 22:31'!\\\\nnewIcon\\\\n\\\\t^ MenuIcons tryIcons: #(newIcon smallNewIcon)! !\\\\nOBMethodCategoryNode subclass: #OBAllMethodCategoryNode\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBAllMethodCategoryNode commentStamp: 'cwp 1/8/2005 12:31' prior: 0!\\\\nOBAllMethodCategory implements the synthetic '-- all --' category, which contains all the methods in a class.!\\\\n\\\\n\\\\n!OBAllMethodCategoryNode methodsFor: 'accessing'!\\\\ncategory\\\\n\\\\t^ 'as yet unclassified'! !\\\\n\\\\n!OBAllMethodCategoryNode methodsFor: 'accessing'!\\\\nmethodReferences\\\\n\\\\t^ self theClass selectors asSortedArray \\\\n\\\\t\\\\tcollect: [:ea | MethodReference new setStandardClass: self theClass methodSymbol: ea]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBAllMethodCategoryNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBAllMethodCategoryNode class methodsFor: 'as yet unclassified'!\\\\non: className\\\\n\\\\t^ self on: '-- all --' inClass: className! !\\\\nObject subclass: #OBAnnouncement\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Announcements'!\\\\nObject subclass: #OBAnnouncer\\\\n\\\\tinstanceVariableNames: 'subscriptions'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Announcements'!\\\\n\\\\n!OBAnnouncer methodsFor: 'subscription' stamp: 'cwp 6/5/2006 00:39'!\\\\nannounce: anObject\\\\n\\\\n\\\\t| ann |\\\\n\\\\tann _ anObject asAnnouncement.\\\\n\\\\tsubscriptions keysAndValuesDo:\\\\n\\\\t\\\\t[:class :action |\\\\n\\\\t\\\\t(ann isKindOf: class) ifTrue: [action valueWithArguments: {ann}]].\\\\n\\\\t^ ann! !\\\\n\\\\n!OBAnnouncer methodsFor: 'subscription' stamp: 'cwp 6/3/2006 21:21'!\\\\nobserve: aClass do: aValuable \\\\n\\\\t| actions |\\\\n\\\\tactions _ subscriptions at: aClass ifAbsent: [ActionSequence new].\\\\n\\\\tsubscriptions at: aClass put: (actions copyWith: aValuable).! !\\\\n\\\\n!OBAnnouncer methodsFor: 'subscription' stamp: 'cwp 6/3/2006 23:31'!\\\\nobserve: aClass send: aSelector to: anObject\\\\n\\\\tself\\\\n\\\\t\\\\tobserve: aClass\\\\n\\\\t\\\\tdo: (MessageSend receiver: anObject selector: aSelector)! !\\\\n\\\\n!OBAnnouncer methodsFor: 'subscription' stamp: 'cwp 6/10/2006 00:40'!\\\\nunsubscribe: anObject\\\\n\\\\tsubscriptions keysAndValuesDo:\\\\n\\\\t\\\\t[:class :actions |\\\\n\\\\t\\\\tsubscriptions at: class put: (actions reject: [:ea | ea receiver == anObject])].\\\\n\\\\tsubscriptions keysAndValuesRemove: [:key :value | value isEmpty]! !\\\\n\\\\n\\\\n!OBAnnouncer methodsFor: 'initialize-release' stamp: 'cwp 4/17/2006 11:51'!\\\\ninitialize\\\\n\\\\tsubscriptions _ IdentityDictionary new.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBAnnouncer class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBAnnouncer class methodsFor: 'instance creation' stamp: 'cwp 6/4/2006 00:55'!\\\\ncurrent\\\\n\\\\t^ OBAnnouncerRequest signal! !\\\\n\\\\n!OBAnnouncer class methodsFor: 'instance creation' stamp: 'cwp 4/17/2006 11:50'!\\\\nnew\\\\n\\\\t^ self basicNew initialize! !\\\\nNotification subclass: #OBAnnouncerRequest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Notifications'!\\\\nOBInteractionRequest subclass: #OBBrowseRequest\\\\n\\\\tinstanceVariableNames: 'browser'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Notifications'!\\\\n!OBBrowseRequest commentStamp: 'cwp 12/7/2004 00:10' prior: 0!\\\\nThis notification is raised whenever a browser needs to be opened. The default action is to open a SystemWindow in Morphic, but it can be caught in situations where that's not appropriate. The OB test suite uses this extensively. !\\\\n\\\\n\\\\n!OBBrowseRequest methodsFor: 'accessing' stamp: 'cwp 10/17/2004 18:45'!\\\\nbrowser\\\\n\\\\t^ browser! !\\\\n\\\\n!OBBrowseRequest methodsFor: 'accessing' stamp: 'cwp 10/17/2004 18:45'!\\\\nbrowser: aBrowser\\\\n\\\\tbrowser _ aBrowser! !\\\\n\\\\n!OBBrowseRequest methodsFor: 'accessing' stamp: 'cwp 10/17/2004 21:27'!\\\\ndefaultAction\\\\n\\\\t^ browser openInMorphic! !\\\\n\\\\n\\\\n!OBBrowseRequest methodsFor: 'testing' stamp: 'cwp 10/17/2004 19:32'!\\\\nisBrowseRequest\\\\n\\\\t^ true! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBBrowseRequest class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBBrowseRequest class methodsFor: 'as yet unclassified' stamp: 'cwp 10/17/2004 18:45'!\\\\nsignal: aBrowser\\\\n\\\\t^ (self new browser: aBrowser) signal! !\\\\nObject subclass: #OBBrowser\\\\n\\\\tinstanceVariableNames: 'panels announcer'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Kernel'!\\\\n!OBBrowser commentStamp: 'cwp 1/7/2005 23:17' prior: 0!\\\\nOBBrowser is the core of OmniBrower. It's the root object for each browser and the model for the SystemWindows which display them. Its main responsibily is managing panels, particularly passing update messages between them.\\\\n\\\\nOn the class side, OBBrowser provides some default settings for creating and opening browsers. Subclasses can override these settings to acheive customized behavior.\\\\n\\\\niVars:\\\\n\\\\npanels\\\\t- A collection of objects which manage submorphs of the browser's SystemWindow.\\\\n\\\\ncVars:\\\\n\\\\nMetaGraphs - A dictionary matching names to metagraphs!\\\\n\\\\n\\\\n!OBBrowser methodsFor: 'accessing' stamp: 'cwp 6/4/2006 00:36'!\\\\naddPanel: aPanel\\\\n\\\\tpanels add: aPanel.\\\\n\\\\taPanel browser: self.\\\\n! !\\\\n\\\\n!OBBrowser methodsFor: 'accessing' stamp: 'cwp 4/17/2006 15:42'!\\\\nannouncer\\\\n\\\\t^ announcer! !\\\\n\\\\n!OBBrowser methodsFor: 'accessing' stamp: 'cwp 11/20/2004 21:00'!\\\\ncurrentNode\\\\n\\\\t^self navigationPanel currentNode! !\\\\n\\\\n!OBBrowser methodsFor: 'accessing' stamp: 'cwp 11/20/2004 21:00'!\\\\ncurrentOrRootNode\\\\n\\\\t^self navigationPanel currentOrRootNode! !\\\\n\\\\n!OBBrowser methodsFor: 'accessing' stamp: 'cwp 8/31/2004 13:04'!\\\\ndefaultLabel\\\\n\\\\t^ self class titleForRoot: self root! !\\\\n\\\\n!OBBrowser methodsFor: 'accessing' stamp: 'cwp 12/5/2004 16:25'!\\\\nnavigationPanel\\\\n\\\\t^ panels \\\\n\\\\t\\\\tdetect: [:ea | ea isNavigation] \\\\n\\\\t\\\\tifNone: [self error: 'No navigation panel configured']! !\\\\n\\\\n!OBBrowser methodsFor: 'accessing' stamp: 'cwp 9/17/2004 00:53'!\\\\npanels\\\\n\\\\t^ panels! !\\\\n\\\\n!OBBrowser methodsFor: 'accessing' stamp: 'cwp 6/28/2006 00:44'!\\\\nrequestor\\\\n\\\\t^ OBRequestor for: self! !\\\\n\\\\n!OBBrowser methodsFor: 'accessing' stamp: 'dvf 9/5/2005 17:30'!\\\\nselectionPath\\\\n\\\\t^self navigationPanel selectionPath! !\\\\n\\\\n\\\\n!OBBrowser methodsFor: 'callbacks' stamp: 'cwp 11/20/2004 21:05'!\\\\nlabelString\\\\n\\\\t| label |\\\\n\\\\tlabel := self navigationPanel labelString.\\\\n\\\\t^label \\\\n\\\\t\\\\tifNil: [self defaultLabel]\\\\n\\\\t\\\\tifNotNil: [self defaultLabel , ': ' , label]! !\\\\n\\\\n!OBBrowser methodsFor: 'callbacks' stamp: 'cwp 4/17/2006 19:52'!\\\\nokToChange\\\\n\\\\t^ (self announcer announce: OBAboutToChange) isVetoed not! !\\\\n\\\\n\\\\n!OBBrowser methodsFor: 'initializing' stamp: 'cwp 6/4/2006 14:09'!\\\\ninitialize\\\\n\\\\tpanels _ OrderedCollection new.\\\\n\\\\tannouncer _ OBAnnouncer new.\\\\n\\\\tself subscribe! !\\\\n\\\\n!OBBrowser methodsFor: 'initializing' stamp: 'cwp 12/5/2004 16:24'!\\\\nsetMetaNode: aMetaNode node: aNode \\\\n\\\\tself navigationPanel setMetaNode: aMetaNode node: aNode! !\\\\n\\\\n\\\\n!OBBrowser methodsFor: 'morphic' stamp: 'cwp 11/27/2004 22:21'!\\\\ndefaultBackgroundColor\\\\n\\\\t^ Color gray veryMuchLighter! !\\\\n\\\\n!OBBrowser methodsFor: 'morphic' stamp: 'cwp 12/5/2004 14:23'!\\\\nmorph\\\\n\\\\t| window |\\\\n\\\\twindow := SystemWindow labelled: self defaultLabel.\\\\n\\\\twindow model: self.\\\\n\\\\tpanels isEmpty ifFalse: [self morphicPanelLayout addMorphsTo: window].\\\\n\\\\t^window! !\\\\n\\\\n!OBBrowser methodsFor: 'morphic' stamp: 'cwp 11/21/2004 00:31'!\\\\nmorphicPanelLayout\\\\n\\\\t^ OBMorphicPanelLayout for: panels! !\\\\n\\\\n!OBBrowser methodsFor: 'morphic' stamp: 'cwp 11/21/2004 00:30'!\\\\nopenInMorphic\\\\n\\\\t^ self morph openInWorld! !\\\\n\\\\n\\\\n!OBBrowser methodsFor: 'navigating' stamp: 'cwp 11/20/2004 21:00'!\\\\njumpToRoot\\\\n\\\\t^self navigationPanel jumpToRoot! !\\\\n\\\\n!OBBrowser methodsFor: 'navigating' stamp: 'cwp 11/20/2004 21:00'!\\\\njumpTo: aNode \\\\n\\\\tself navigationPanel jumpTo: aNode! !\\\\n\\\\n!OBBrowser methodsFor: 'navigating' stamp: 'cwp 9/17/2005 17:48'!\\\\nroot\\\\n\\\\t^self navigationPanel root! !\\\\n\\\\n\\\\n!OBBrowser methodsFor: 'opening' stamp: 'cwp 10/17/2004 21:31'!\\\\nopen\\\\n\\\\t^ OBBrowseRequest signal: self! !\\\\n\\\\n\\\\n!OBBrowser methodsFor: 'updating' stamp: 'cwp 6/9/2006 23:29'!\\\\ndontTranscribe\\\\n\\\\tself announcer unsubscribe: self.\\\\n\\\\tself subscribe.! !\\\\n\\\\n!OBBrowser methodsFor: 'updating' stamp: 'cwp 4/24/2006 15:10'!\\\\nrelabel: ann\\\\n\\\\tself changed: #relabel.\\\\n! !\\\\n\\\\n!OBBrowser methodsFor: 'updating' stamp: 'cwp 6/4/2006 18:50'!\\\\nsignalRefresh\\\\n\\\\tself announcer announce: OBRefreshRequired! !\\\\n\\\\n!OBBrowser methodsFor: 'updating' stamp: 'cwp 6/6/2006 00:25'!\\\\nsubscribe\\\\n\\\\tself announcer \\\\n\\\\t\\\\tobserve: OBSelectionChanged send: #relabel: to: self! !\\\\n\\\\n!OBBrowser methodsFor: 'updating' stamp: 'cwp 6/6/2006 00:26'!\\\\ntranscribe\\\\n\\\\tself announcer observe: OBAnnouncement do: [:ann | Transcript cr; show: ann].! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBBrowser class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBBrowser class methodsFor: 'auto opening' stamp: 'cwp 12/6/2004 23:22'!\\\\nopen\\\\n\\\\t^ self new open! !\\\\n\\\\n!OBBrowser class methodsFor: 'auto opening' stamp: 'cwp 12/5/2004 17:03'!\\\\nopenRoot: rootNode selection: selectedNode\\\\n\\\\t^ (self root: rootNode selection: selectedNode) open! !\\\\n\\\\n\\\\n!OBBrowser class methodsFor: 'configuration' stamp: 'avi 9/17/2005 01:10'!\\\\ndefaultMetaNode\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n!OBBrowser class methodsFor: 'configuration' stamp: 'cwp 12/6/2004 23:20'!\\\\ndefaultRootNode\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n!OBBrowser class methodsFor: 'configuration' stamp: 'cwp 8/31/2004 11:10'!\\\\ndefinitionPanel\\\\n\\\\t^ OBDefinitionPanel new! !\\\\n\\\\n!OBBrowser class methodsFor: 'configuration' stamp: 'cwp 8/31/2004 11:01'!\\\\nmaxPanes\\\\n\\\\t^ self paneCount! !\\\\n\\\\n!OBBrowser class methodsFor: 'configuration' stamp: 'cwp 8/31/2004 11:00'!\\\\nminPanes\\\\n\\\\t^ self paneCount! !\\\\n\\\\n!OBBrowser class methodsFor: 'configuration' stamp: 'cwp 12/5/2004 16:55'!\\\\nnavigationPanel\\\\n\\\\t^ OBColumnPanel minPanes: self minPanes maxPanes: self maxPanes! !\\\\n\\\\n!OBBrowser class methodsFor: 'configuration' stamp: 'cwp 11/26/2004 22:27'!\\\\noptionalButtonPanel\\\\n\\\\t| labels panel |\\\\n\\\\tlabels _ self optionalButtons.\\\\n\\\\t(Preferences optionalButtons and: [labels isEmpty not]) ifTrue: \\\\n\\\\t\\\\t[panel _ OBFixedButtonPanel new.\\\\n\\\\t\\\\tlabels do: [:ea | panel addButtonWithLabel: ea]].\\\\n\\\\t^ panel! !\\\\n\\\\n!OBBrowser class methodsFor: 'configuration' stamp: 'cwp 8/31/2004 11:07'!\\\\noptionalButtons\\\\n\\\\t^ #()! !\\\\n\\\\n!OBBrowser class methodsFor: 'configuration' stamp: 'cwp 8/31/2004 11:01'!\\\\npaneCount\\\\n\\\\t^ 4! !\\\\n\\\\n!OBBrowser class methodsFor: 'configuration' stamp: 'cwp 12/5/2004 15:06'!\\\\npanels\\\\n\\\\t^ {self navigationPanel. self optionalButtonPanel. self definitionPanel} \\\\n\\\\t\\\\treject: [:ea | ea isNil]! !\\\\n\\\\n!OBBrowser class methodsFor: 'configuration' stamp: 'cwp 8/31/2004 11:32'!\\\\ntitle\\\\n\\\\t^ 'OmniBrowser'! !\\\\n\\\\n!OBBrowser class methodsFor: 'configuration' stamp: 'cwp 8/31/2004 13:02'!\\\\ntitleForRoot: aNode\\\\n\\\\t^ self title! !\\\\n\\\\n\\\\n!OBBrowser class methodsFor: 'instance creation' stamp: 'cwp 12/5/2004 18:12'!\\\\nmetaNode: metaNode node: rootNode \\\\n\\\\t^ self metaNode: metaNode root: rootNode selection: nil panels: self panels! !\\\\n\\\\n!OBBrowser class methodsFor: 'instance creation' stamp: 'avi 9/17/2005 01:16'!\\\\nmetaNode: metaNode root: rootNode selection: selectedNode\\\\n\\\\t^ self metaNode: metaNode root: rootNode selection: selectedNode panels: self panels! !\\\\n\\\\n!OBBrowser class methodsFor: 'instance creation' stamp: 'cwp 12/6/2004 21:59'!\\\\nmetaNode: metaNode root: rootNode selection: selectedNode panels: panels\\\\n\\\\t| browser |\\\\n\\\\tbrowser _ self basicNew initialize.\\\\n\\\\tpanels do: [:ea | browser addPanel: ea].\\\\n\\\\tbrowser setMetaNode: metaNode node: rootNode.\\\\n\\\\tselectedNode ifNotNil: [browser jumpTo: selectedNode].\\\\n\\\\t^ browser! !\\\\n\\\\n!OBBrowser class methodsFor: 'instance creation' stamp: 'avi 9/16/2005 23:25'!\\\\nnew\\\\n\\\\t^ self \\\\n\\\\t\\\\tmetaNode: self defaultMetaNode\\\\n\\\\t\\\\troot: self defaultRootNode\\\\n\\\\t\\\\tselection: nil\\\\n\\\\t\\\\tpanels: self panels! !\\\\n\\\\n!OBBrowser class methodsFor: 'instance creation' stamp: 'cwp 12/5/2004 15:26'!\\\\nroot: aNode \\\\n\\\\t^ self root: aNode selection: nil! !\\\\n\\\\n!OBBrowser class methodsFor: 'instance creation' stamp: 'avi 9/16/2005 23:25'!\\\\nroot: rootNode selection: selectedNode\\\\n\\\\t^ self metaNode: self defaultMetaNode root: rootNode selection: selectedNode panels: self panels! !\\\\n\\\\n!OBBrowser class methodsFor: 'instance creation' stamp: 'cwp 12/6/2004 22:04'!\\\\nselection: selectedNode\\\\n\\\\t^ self root: self defaultRootNode selection: selectedNode! !\\\\n\\\\nObject subclass: #OBButtonModel\\\\n\\\\tinstanceVariableNames: 'bar label'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Morphic'!\\\\n!OBButtonModel commentStamp: 'cwp 3/5/2004 12:15' prior: 0!\\\\nAn OBButtonModel serves as a model for PluggableButtonMorphs used OBRadioButtonBar. OBRadioButtonBar cannot be a direct model for its PBMs, since it can contain a variable number of buttons.\\\\n\\\\niVars:\\\\n\\\\nbar\\\\t\\\\t- the OBRadioButton bar to which this button belongs\\\\nlabel\\\\t- the label of the button!\\\\n\\\\n\\\\n!OBButtonModel methodsFor: 'accessing' stamp: 'cwp 2/24/2004 18:29'!\\\\nbar: aRadioButtonBar\\\\n\\\\tbar _ aRadioButtonBar! !\\\\n\\\\n!OBButtonModel methodsFor: 'accessing' stamp: 'cwp 3/2/2004 21:46'!\\\\nlabel\\\\n\\\\t^ label! !\\\\n\\\\n!OBButtonModel methodsFor: 'accessing' stamp: 'cwp 2/24/2004 18:29'!\\\\nlabel: aString\\\\n\\\\tlabel _ aString! !\\\\n\\\\n!OBButtonModel methodsFor: 'accessing' stamp: 'cwp 11/27/2004 00:50'!\\\\nselectionChanged\\\\n\\\\tself changed: #isSelected.\\\\n\\\\tself changed: #labelMorph! !\\\\n\\\\n\\\\n!OBButtonModel methodsFor: 'callbacks' stamp: 'cwp 2/24/2004 18:42'!\\\\nisSelected\\\\n\\\\t^ bar isSelected: self! !\\\\n\\\\n!OBButtonModel methodsFor: 'callbacks' stamp: 'cwp 2/28/2006 10:45'!\\\\nlabelMorph\\\\n\\\\t^ (StringMorph \\\\n\\\\t\\\\tcontents: self label \\\\n\\\\t\\\\tfont: TextStyle defaultFont)\\\\n\\\\t\\\\t\\\\tcolor: (self isEnabled ifTrue: [Color black] ifFalse: [Color gray]);\\\\n\\\\t\\\\t\\\\tyourself! !\\\\n\\\\n!OBButtonModel methodsFor: 'callbacks' stamp: 'cwp 2/24/2004 19:30'!\\\\npush\\\\n\\\\tbar push: self.! !\\\\n\\\\n\\\\n!OBButtonModel methodsFor: 'morphs' stamp: 'lr 3/23/2006 18:08'!\\\\nmorph\\\\n\\\\t| morph |\\\\n\\\\tmorph := PluggableButtonMorph\\\\n\\\\t\\\\ton: self\\\\n\\\\t\\\\tgetState: #isSelected\\\\n\\\\t\\\\taction: #push\\\\n\\\\t\\\\tlabel: #labelMorph.\\\\n\\\\tmorph \\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tvResizing: #spaceFill.\\\\n\\\\t^ morph! !\\\\n\\\\n\\\\n!OBButtonModel methodsFor: 'testing' stamp: 'cwp 11/27/2004 19:09'!\\\\nisEnabled\\\\n\\\\t^ bar isEnabled: self! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBButtonModel class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBButtonModel class methodsFor: 'as yet unclassified' stamp: 'cwp 8/29/2004 13:31'!\\\\noffColor\\\\n\\\\t^ Color lightGray twiceLighter! !\\\\n\\\\n!OBButtonModel class methodsFor: 'as yet unclassified' stamp: 'cwp 8/29/2004 13:30'!\\\\nonColor\\\\n\\\\t^ Color lightGray lighter! !\\\\n\\\\n!OBButtonModel class methodsFor: 'as yet unclassified' stamp: 'cwp 2/24/2004 18:35'!\\\\nwithLabel: aString inBar: aRadioButtonBar\\\\n\\\\t^ self new label: aString; bar: aRadioButtonBar! !\\\\nOBActor subclass: #OBCategoryActor\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Services'!\\\\n!OBCategoryActor commentStamp: 'cwp 1/7/2005 23:43' prior: 0!\\\\nOBCategory actor implements a number of actions useful for manipulating both class and method categories.!\\\\n\\\\n\\\\n!OBCategoryActor methodsFor: 'public' stamp: 'cwp 7/10/2006 21:33'!\\\\nactionsForNode: aNode\\\\n\\\\t^ Array\\\\n\\\\t\\\\twith: (OBAction\\\\n\\\\t\\\\t\\\\t\\\\tlabel: 'remove'\\\\n\\\\t\\\\t\\\\t\\\\treceiver: self\\\\n\\\\t\\\\t\\\\t\\\\tselector: #remove:\\\\n\\\\t\\\\t\\\\t\\\\targuments: {aNode}\\\\n\\\\t\\\\t\\\\t\\\\tkeystroke: $x\\\\n\\\\t\\\\t\\\\t\\\\ticon: self deleteIcon)\\\\n\\\\t\\\\twith: (OBAction\\\\n\\\\t\\\\t\\\\t\\\\tlabel: 'rename...'\\\\n\\\\t\\\\t\\\\t\\\\treceiver: self\\\\n\\\\t\\\\t\\\\t\\\\tselector: #rename:\\\\n\\\\t\\\\t\\\\t\\\\targuments: {aNode})! !\\\\n\\\\n!OBCategoryActor methodsFor: 'public' stamp: 'cwp 1/9/2005 11:30'!\\\\nactionsForParent: aNode\\\\n\\\\t| actions |\\\\n\\\\tactions _ self stdActionsForParent: aNode.\\\\n\\\\taNode organization \\\\n\\\\t\\\\t\\\\tisClassOrganizer ifTrue: [actions _ actions copyWith: (self categorizeActionFor: aNode)].\\\\n\\\\t^ actions! !\\\\n\\\\n\\\\n!OBCategoryActor methodsFor: 'actions' stamp: 'cwp 9/18/2005 19:20'!\\\\nalphabetizeCategoriesIn: aNode \\\\n\\\\taNode organization sortCategories.\\\\n\\\\taNode signalChildrenChanged! !\\\\n\\\\n!OBCategoryActor methodsFor: 'actions' stamp: 'cwp 9/18/2004 22:53'!\\\\ncategorizeIn: aClassOrganizer \\\\n\\\\t\\\\\\\"Categorize methods by looking in parent classes for a method category.\\\\\\\"\\\\n\\\\t| organizers |\\\\n\\\\torganizers := aClassOrganizer subject withAllSuperclasses collect: [:ea | ea organization].\\\\n\\\\t(aClassOrganizer listAtCategoryNamed: ClassOrganizer default) do: [:sel | | found |\\\\n\\\\t\\\\tfound := (organizers collect: [ :org | org categoryOfElement: sel])\\\\n\\\\t\\\\t\\\\tdetect: [:ea | ea ~= ClassOrganizer default and: [ ea ~= nil]]\\\\n\\\\t\\\\t\\\\tifNone: [].\\\\n\\\\t\\\\tfound ifNotNil: [aClassOrganizer classify: sel under: found]]! !\\\\n\\\\n!OBCategoryActor methodsFor: 'actions' stamp: 'cwp 9/20/2005 08:40'!\\\\ncreateIn: aNode\\\\n\\\\t| catName organization |\\\\n\\\\torganization := aNode organization.\\\\n\\\\tcatName := OBTextRequest \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tprompt: 'Please type new category name' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttemplate: (self categoryTemplateFor: organization).\\\\n\\\\tcatName ifNotNil:\\\\t[organization addCategory: catName.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(aNode categoryNodeNamed: catName) signalSelection].! !\\\\n\\\\n!OBCategoryActor methodsFor: 'actions' stamp: 'cwp 9/18/2004 21:55'!\\\\nremoveEmptyCategoriesIn: anOrganizer \\\\n\\\\tanOrganizer removeEmptyCategories! !\\\\n\\\\n!OBCategoryActor methodsFor: 'actions' stamp: 'cwp 9/19/2004 00:11'!\\\\nremove: aNode\\\\n\\\\t| list choice |\\\\n\\\\tlist := aNode container organization listAtCategoryNamed: aNode name.\\\\n\\\\tlist isEmpty ifTrue: [^ aNode remove].\\\\n\\\\tchoice := OBConfirmationRequest prompt: 'Are you sure you want to\\\\nremove this category \\\\nand all its elements?' confirm: 'Remove'.\\\\n\\\\tchoice ifTrue: [^ aNode remove]! !\\\\n\\\\n!OBCategoryActor methodsFor: 'actions' stamp: 'cwp 9/18/2005 18:51'!\\\\nrename: aNode\\\\n\\\\t| category |\\\\n\\\\tcategory := OBTextRequest\\\\n\\\\t\\\\t\\\\t\\\\tprompt: 'Please type new category name' \\\\n\\\\t\\\\t\\\\t\\\\ttemplate: aNode name.\\\\n\\\\tcategory ifNotNil:\\\\t\\\\n\\\\t\\\\t[aNode container organization renameCategory: aNode name toBe: category.\\\\n\\\\t\\\\taNode signalChanged]! !\\\\n\\\\n!OBCategoryActor methodsFor: 'actions' stamp: 'cwp 6/4/2006 18:56'!\\\\nreorganizeCategoriesIn: anOrganizer\\\\n\\\\t| definition |\\\\n\\\\tdefinition _ OBOrganizationDefinition on: anOrganizer.\\\\n\\\\tdefinition signalChange.! !\\\\n\\\\n\\\\n!OBCategoryActor methodsFor: 'private' stamp: 'cwp 9/18/2004 23:52'!\\\\ncategorizeActionFor: aNode\\\\n\\\\t^ OBAction\\\\n\\\\t\\\\tlabel: 'categorize automatically'\\\\n\\\\t\\\\treceiver: self\\\\n\\\\t\\\\tselector: #categorizeIn:\\\\n\\\\t\\\\targuments: (Array with: aNode organization)! !\\\\n\\\\n!OBCategoryActor methodsFor: 'private' stamp: 'cwp 6/25/2006 17:36'!\\\\ncategoryTemplateFor: anOrganization\\\\n\\\\t^ anOrganization isClassOrganizer\\\\n\\\\t\\\\tifTrue: ['category name']\\\\n\\\\t\\\\tifFalse: ['Category-Name']! !\\\\n\\\\n!OBCategoryActor methodsFor: 'private' stamp: 'cwp 7/10/2006 21:49'!\\\\nstdActionsForParent: aNode\\\\n\\\\t^ Array\\\\n\\\\t\\\\twith: (OBAction \\\\n\\\\t\\\\t\\\\t\\\\tlabel: 'create category...'\\\\n\\\\t\\\\t\\\\t\\\\treceiver: self\\\\n\\\\t\\\\t\\\\t\\\\tselector: #createIn:\\\\n\\\\t\\\\t\\\\t\\\\targuments: (Array with: aNode)\\\\n\\\\t\\\\t\\\\t\\\\ticon: self newIcon)\\\\n\\\\t\\\\twith: (OBAction\\\\n\\\\t\\\\t\\\\t\\\\tlabel: 'alphabetize categories'\\\\n\\\\t\\\\t\\\\t\\\\treceiver: self\\\\n\\\\t\\\\t\\\\t\\\\tselector: #alphabetizeCategoriesIn:\\\\n\\\\t\\\\t\\\\t\\\\targuments: (Array with: aNode))\\\\n\\\\t\\\\twith: (OBAction\\\\n\\\\t\\\\t\\\\t\\\\tlabel: 'remove empty categories'\\\\n\\\\t\\\\t\\\\t\\\\treceiver: self\\\\n\\\\t\\\\t\\\\t\\\\tselector: #removeEmptyCategoriesIn:\\\\n\\\\t\\\\t\\\\t\\\\targuments: (Array with: aNode organization))\\\\n\\\\t\\\\twith: (OBAction\\\\n\\\\t\\\\t\\\\t\\\\tlabel: 'reorganize categories'\\\\n\\\\t\\\\t\\\\t\\\\treceiver: self\\\\n\\\\t\\\\t\\\\t\\\\tselector: #reorganizeCategoriesIn:\\\\n\\\\t\\\\t\\\\t\\\\targuments: (Array with: aNode organization))\\\\n! !\\\\nObject subclass: #OBCategoryServant\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Services'!\\\\n\\\\n!OBCategoryServant methodsFor: 'private' stamp: 'cwp 6/25/2006 17:32'!\\\\ncategoryTemplateFor: anOrganization\\\\n\\\\t^ anOrganization isClassOrganizer\\\\n\\\\t\\\\tifTrue: ['category name']\\\\n\\\\t\\\\tifFalse: ['Category-Name']! !\\\\n\\\\n\\\\n!OBCategoryServant methodsFor: 'actions' stamp: 'cwp 6/29/2006 00:13'!\\\\ncreateCategory: aRequestor\\\\n\\\\t| catName organization node |\\\\n\\\\tnode _ aRequestor requestCurrentNode.\\\\n\\\\torganization _ node organization.\\\\n\\\\tcatName _ OBTextRequest \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tprompt: 'Please type new category name' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttemplate: (self categoryTemplateFor: organization).\\\\n\\\\tcatName ifNotNil:\\\\t[organization addCategory: catName.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taRequestor select: (node categoryNodeNamed: catName)].! !\\\\n\\\\n\\\\n!OBCategoryServant methodsFor: 'accessing' stamp: 'cwp 6/25/2006 17:25'!\\\\nservices\\\\n\\\\t| selectors |\\\\n\\\\tselectors _ self class organization listAtCategoryNamed: 'services'.\\\\n\\\\t^ selectors collect: [:ea | self perform: ea].\\\\n\\\\t! !\\\\n\\\\n\\\\n!OBCategoryServant methodsFor: 'services' stamp: 'cwp 6/30/2006 00:51'!\\\\nsvcCreateCategory\\\\n\\\\t^ (OBService action: (MessageSend receiver: self selector: #createCategory:))\\\\n\\\\t\\\\tcondition: [:req | req requestNode hasOrganization];\\\\n\\\\t\\\\tlabel: 'create category...'! !\\\\nOBAnnouncement subclass: #OBChildrenChanged\\\\n\\\\tinstanceVariableNames: 'node'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Announcements'!\\\\n\\\\n!OBChildrenChanged methodsFor: 'as yet unclassified' stamp: 'cwp 6/5/2006 00:49'!\\\\nnode\\\\n\\\\t^ node! !\\\\n\\\\n!OBChildrenChanged methodsFor: 'as yet unclassified' stamp: 'cwp 6/5/2006 00:49'!\\\\nnode: aNode\\\\n\\\\tnode _ aNode! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBChildrenChanged class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBChildrenChanged class methodsFor: 'as yet unclassified' stamp: 'cwp 6/5/2006 00:49'!\\\\nnode: aNode\\\\n\\\\t^ self new node: aNode! !\\\\nOBInteractionRequest subclass: #OBChoiceRequest\\\\n\\\\tinstanceVariableNames: 'prompt labels values lines'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Notifications'!\\\\n!OBChoiceRequest commentStamp: 'cwp 3/5/2004 12:26' prior: 0!\\\\nThis notification is used to ask the user for to choose from a list of alternatives. Its defaultAction is to open a PopUpMenu. Test cases an intercept the notification and respond programmatically.\\\\n\\\\nprompt\\\\t- A string describing the choice the user is asked to make.\\\\nlabels\\\\t- A list of strings describing the alternatives.\\\\nvalues\\\\t- When the user chooses an alternative, the corresponding item from this list is returned!\\\\n\\\\n\\\\n!OBChoiceRequest methodsFor: 'initializing' stamp: 'cwp 7/9/2006 00:05'!\\\\nsetPrompt: aString labels: labelArray values: valueArray lines: lineArray\\\\n\\\\tprompt _ aString.\\\\n\\\\tlabels _ labelArray.\\\\n\\\\tvalues _ valueArray.\\\\n\\\\tlines _ lineArray.! !\\\\n\\\\n\\\\n!OBChoiceRequest methodsFor: 'signaling' stamp: 'cwp 7/9/2006 00:09'!\\\\ndefaultAction\\\\n\\\\t^ values \\\\n\\\\t\\\\tat: ((PopUpMenu labelArray: labels lines: lines) startUpWithCaption: prompt)\\\\n\\\\t\\\\tifAbsent: [nil]! !\\\\n\\\\n\\\\n!OBChoiceRequest methodsFor: 'accessing' stamp: 'cwp 7/8/2006 23:45'!\\\\nlabels\\\\n\\\\t^ labels! !\\\\n\\\\n!OBChoiceRequest methodsFor: 'accessing' stamp: 'cwp 7/9/2006 00:11'!\\\\nlines\\\\n\\\\t^ lines! !\\\\n\\\\n!OBChoiceRequest methodsFor: 'accessing' stamp: 'cwp 7/8/2006 23:45'!\\\\nprompt\\\\n\\\\t^ prompt! !\\\\n\\\\n!OBChoiceRequest methodsFor: 'accessing' stamp: 'cwp 7/8/2006 23:45'!\\\\nvalues\\\\n\\\\t^ values! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBChoiceRequest class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBChoiceRequest class methodsFor: 'signalling' stamp: 'cwp 7/9/2006 00:07'!\\\\nlabels: anArray\\\\n\\\\t^ self\\\\n\\\\t\\\\tprompt: nil\\\\n\\\\t\\\\tlabels: anArray\\\\n\\\\t\\\\tvalues: anArray\\\\n\\\\t\\\\tlines: #()! !\\\\n\\\\n!OBChoiceRequest class methodsFor: 'signalling' stamp: 'cwp 7/9/2006 00:08'!\\\\nlabels: labelArray lines: lineArray\\\\n\\\\t^ self\\\\n\\\\t\\\\tprompt: nil\\\\n\\\\t\\\\tlabels: labelArray\\\\n\\\\t\\\\tvalues: labelArray\\\\n\\\\t\\\\tlines: lineArray! !\\\\n\\\\n!OBChoiceRequest class methodsFor: 'signalling' stamp: 'cwp 7/9/2006 00:06'!\\\\nprompt: aString labels: labelArray values: valueArray\\\\n\\\\t^ self\\\\n\\\\t\\\\tprompt: aString\\\\n\\\\t\\\\tlabels: labelArray\\\\n\\\\t\\\\t values: valueArray\\\\n\\\\t\\\\tlines: #()! !\\\\n\\\\n!OBChoiceRequest class methodsFor: 'signalling' stamp: 'cwp 7/9/2006 00:05'!\\\\nprompt: aString labels: labelArray values: valueArray lines: lineArray\\\\n\\\\t^ (self new \\\\n\\\\t\\\\tsetPrompt: aString \\\\n\\\\t\\\\tlabels: labelArray \\\\n\\\\t\\\\tvalues: valueArray \\\\n\\\\t\\\\tlines: lineArray) \\\\n\\\\t\\\\t\\\\tsignal! !\\\\nOBActor subclass: #OBClassActor\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Services'!\\\\n!OBClassActor commentStamp: 'cwp 1/7/2005 23:44' prior: 0!\\\\nOBClassActor provides basic actions for manipulating classes.!\\\\n\\\\n\\\\n!OBClassActor methodsFor: 'querying' stamp: 'cwp 7/10/2006 22:35'!\\\\nactionsForNode: aClassNode\\\\n\\\\t^ {OBAction\\\\n\\\\t\\\\t\\\\tlabel: 'remove' \\\\n\\\\t\\\\t\\\\treceiver: self\\\\n\\\\t\\\\t\\\\tselector: #remove:\\\\n\\\\t\\\\t\\\\targuments: {aClassNode}\\\\n\\\\t\\\\t\\\\tkeystroke: $x \\\\n\\\\t\\\\t\\\\ticon: self deleteIcon.\\\\n\\\\t\\\\tOBAction\\\\n\\\\t\\\\t\\\\tlabel: 'rename...' \\\\n\\\\t\\\\t\\\\treceiver: self\\\\n\\\\t\\\\t\\\\tselector: #rename:\\\\n\\\\t\\\\t\\\\targuments: {aClassNode}.\\\\n\\\\t\\\\tOBAction\\\\n\\\\t\\\\t\\\\tlabel: 'copy...' \\\\n\\\\t\\\\t\\\\treceiver: self\\\\n\\\\t\\\\t\\\\tselector: #copy:\\\\n\\\\t\\\\t\\\\targuments: {aClassNode}.\\\\n\\\\t\\\\tOBAction\\\\n\\\\t\\\\t\\\\tlabel: 'subclass template'\\\\n\\\\t\\\\t\\\\treceiver: self\\\\n\\\\t\\\\t\\\\tselector: #subclassTemplate:\\\\n\\\\t\\\\t\\\\targuments: {aClassNode}.\\\\n\\\\t\\\\tOBAction\\\\n\\\\t\\\\t\\\\tlabel: 'browse references'\\\\n\\\\t\\\\t\\\\treceiver: self\\\\n\\\\t\\\\t\\\\tselector: #browseReferences:\\\\n\\\\t\\\\t\\\\targuments: {aClassNode}\\\\n\\\\t}! !\\\\n\\\\n\\\\n!OBClassActor methodsFor: 'private' stamp: 'lr 3/28/2006 12:05'!\\\\nbrowseObsoleteRefs: aClassNode as: oldName \\\\n\\\\t| binding |\\\\n\\\\tbinding := aClassNode theNonMetaClass environment \\\\n\\\\t\\\\t\\\\t\\\\tassociationAt: aClassNode theNonMetaClass name.\\\\n\\\\t(SystemNavigation default allCallsOn: binding) isEmpty \\\\n\\\\t\\\\tifFalse: [OBReferencesBrowser\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbrowseRoot: aClassNode\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttitle: 'Obsolete references to']! !\\\\n\\\\n!OBClassActor methodsFor: 'private' stamp: 'cwp 7/8/2006 13:59'!\\\\ncopyClass: oldClass as: newName\\\\n\\\\t| oldDefinition newDefinition newClass |\\\\n\\\\t(oldClass environment hasClassNamed: newName)\\\\n\\\\t\\\\tifTrue: [^self error: newName, ' already exists'].\\\\n\\\\toldDefinition := oldClass definition.\\\\n\\\\tnewDefinition := oldDefinition \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcopyReplaceAll: '#' , oldClass name asString \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twith: '#' , newName asString.\\\\n\\\\tCursor wait \\\\n\\\\t\\\\tshowWhile: [newClass := Compiler evaluate: newDefinition logged: true.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnewClass copyAllCategoriesFrom: oldClass.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnewClass class copyAllCategoriesFrom: oldClass class].\\\\n\\\\t^ newClass! !\\\\n\\\\n\\\\n!OBClassActor methodsFor: 'actions' stamp: 'lr 3/28/2006 12:10'!\\\\nbrowseReferences: aClassNode \\\\n\\\\tOBReferencesBrowser browseRoot: aClassNode theNonMetaClass asNode! !\\\\n\\\\n!OBClassActor methodsFor: 'actions' stamp: 'dvf 8/31/2005 13:11'!\\\\ncopy: aClassNode\\\\n\\\\t| newName newClass |\\\\n\\\\tnewName := OBTextRequest\\\\n\\\\t\\\\t\\\\tprompt: 'Please type new class name'\\\\n\\\\t\\\\t\\\\ttemplate: aClassNode theNonMetaClassName asString.\\\\n\\\\tnewName ifNotNil:\\\\t[newClass := self\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcopyClass: aClassNode theNonMetaClass \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tas: newName asSymbol.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(newClass asNode) signalSelection].! !\\\\n\\\\n!OBClassActor methodsFor: 'actions' stamp: 'lr 3/28/2006 12:04'!\\\\nremove: aClassNode\\\\n\\\\t(OBConfirmationRequest\\\\n\\\\t\\\\tprompt: 'Are you certain that you \\\\nwant to REMOVE the class ', aClassNode theNonMetaClassName, ' from the system?'\\\\n\\\\t\\\\tconfirm: 'Remove')\\\\n\\\\t\\\\t\\\\tifTrue: [aClassNode theNonMetaClass removeFromSystem.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\taClassNode signalDeletion]! !\\\\n\\\\n!OBClassActor methodsFor: 'actions' stamp: 'lr 3/28/2006 12:05'!\\\\nrename: aClassNode\\\\n\\\\t| newName |\\\\n\\\\tnewName := OBTextRequest\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tprompt: 'Please type new class name' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttemplate: aClassNode theNonMetaClassName asString.\\\\n\\\\tnewName ifNotNil:\\\\t[ | oldName |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\toldName := aClassNode theNonMetaClass name.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taClassNode theNonMetaClass environment \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trenameClassNamed: oldName\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tas: newName asSymbol.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself browseObsoleteRefs: aClassNode as: oldName].\\\\n\\\\t! !\\\\n\\\\n!OBClassActor methodsFor: 'actions' stamp: 'cwp 6/4/2006 18:53'!\\\\nsubclassTemplate: aClassNode \\\\n\\\\t| class definition |\\\\n\\\\tclass _ aClassNode theNonMetaClass.\\\\n\\\\tdefinition _ (OBClassDefinition \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tenvironment: class environment \\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttemplate: (Class \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttemplateForSubclassOf: class \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcategory: class category)).\\\\n\\\\tdefinition signalChange.! !\\\\nOBCodeNode subclass: #OBClassAwareNode\\\\n\\\\tinstanceVariableNames: 'theClass superior'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBClassAwareNode commentStamp: 'cwp 1/8/2005 11:23' prior: 0!\\\\nOBClassAware node models program elements that are part of a class. It provides methods for manipulating the class, as well as methods relating to sorting according to class hierarchy.\\\\n\\\\niVars\\\\n\\\\ntheClass \\\\t- the class that this node is part of\\\\nsuperior \\\\t- during hierarchical sorting this refers to the nearest superclass\\\\n\\\\t\\\\t\\\\t  that belongs to the group being sorted!\\\\n\\\\n\\\\n!OBClassAwareNode methodsFor: 'superiors' stamp: 'cwp 12/11/2004 22:04'!\\\\nadoptSuperior: other \\\\n\\\\t| descent |\\\\n\\\\tdescent := self theClass allSuperclasses reversed.\\\\n\\\\t(descent indexOf: other theClass) > (descent indexOf: self superiorClass) \\\\n\\\\t\\\\tifTrue: [superior := other]! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'superiors' stamp: 'cwp 12/11/2004 22:04'!\\\\nsortsBefore: aClassNode\\\\n\\\\t| own other |\\\\n\\\\town := self withSuperiors.\\\\n\\\\tother := aClassNode withSuperiors.\\\\n\\\\t1 \\\\tto: (own size min: other size)\\\\n\\\\t\\\\tdo: [:i | (own at: i) == (other at: i) ifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t[^ (own at: i) theClassName <= (other at: i) theClassName]].\\\\n\\\\t^ other includes: self\\\\n\\\\t! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'superiors' stamp: 'cwp 12/11/2004 22:03'!\\\\nsuperior\\\\n\\\\t^ superior! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'superiors' stamp: 'cwp 12/11/2004 22:03'!\\\\nsuperiorClass\\\\n\\\\t^superior ifNotNil: [superior theClass]! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'superiors' stamp: 'cwp 12/11/2004 22:03'!\\\\nsuperiors\\\\n\\\\t| result |\\\\n\\\\tresult := OrderedCollection new.\\\\n\\\\tself superiorsDo: [:ea | result add: ea].\\\\n\\\\t^ result asArray reversed! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'superiors' stamp: 'cwp 12/11/2004 22:03'!\\\\nsuperiorsDo: aBlock\\\\n\\\\t| cursor |\\\\n\\\\tcursor := superior.\\\\n\\\\t[cursor isNil] whileFalse:\\\\n\\\\t\\\\t[aBlock value: cursor.\\\\n\\\\t\\\\tcursor := cursor superior]! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'superiors' stamp: 'dvf 8/16/2005 17:23'!\\\\nsuperior: other \\\\n\\\\tsuperior := other! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'superiors' stamp: 'cwp 12/11/2004 22:03'!\\\\nwithSuperiors\\\\n\\\\t| result |\\\\n\\\\tresult := OrderedCollection new.\\\\n\\\\tresult add: self.\\\\n\\\\tself superiorsDo: [:ea | result add: ea].\\\\n\\\\t^ result asArray reversed! !\\\\n\\\\n\\\\n!OBClassAwareNode methodsFor: 'actions' stamp: 'lr 3/6/2006 19:24'!\\\\nbrowse\\\\n\\\\tOBSystemBrowser openOnClass: self theNonMetaClass! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'actions' stamp: 'lr 3/6/2006 19:22'!\\\\nbrowseHierarchically\\\\n\\\\tOBHierarchyBrowser openOnClass: self theNonMetaClass! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'actions' stamp: 'cwp 12/15/2004 23:10'!\\\\nbrowseHierarchyAction\\\\n\\\\t^ self \\\\n\\\\t\\\\taction: #browseHierarchically \\\\n\\\\t\\\\tbuttonLabel: 'hierarchy' \\\\n\\\\t\\\\tmenuLabel: 'browse hierarchy'.\\\\n! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'actions' stamp: 'avi 9/17/2005 01:34'!\\\\nchaseVars\\\\n\\\\tOBVariablesBrowser browseRoot: self classNode! !\\\\n\\\\n\\\\n!OBClassAwareNode methodsFor: 'nodes' stamp: 'dvf 8/31/2005 13:11'!\\\\nclassNode\\\\n\\\\t^self theClass asNode! !\\\\n\\\\n\\\\n!OBClassAwareNode methodsFor: 'displaying' stamp: 'dvf 8/17/2005 14:59'!\\\\nindent\\\\n\\\\t| size indent |\\\\n\\\\tsize := 0.\\\\n\\\\tself superiorsDo: [:ea | size := size + 1].\\\\n\\\\tindent := Text new: size * 2.\\\\n\\\\tindent atAllPut: $ .\\\\n\\\\t^ indent! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'displaying' stamp: 'cwp 1/7/2005 22:21'!\\\\nindentedName\\\\n\\\\t^ self indent, self name! !\\\\n\\\\n\\\\n!OBClassAwareNode methodsFor: 'ancestry' stamp: 'cwp 12/5/2004 12:56'!\\\\nisDescendantOfClassCat: aClassCategoryNode\\\\n\\\\n\\\\t\\\\\\\"optimized version: sending #category to the class is slow\\\\\\\"\\\\n\\\\t^ (self theNonMetaClass environment organization \\\\n\\\\t\\\\tlistAtCategoryNamed: aClassCategoryNode name)\\\\n\\\\t\\\\t\\\\tincludes: self theNonMetaClassName\\\\n\\\\n! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'ancestry'!\\\\nisDescendantOfClass: aClassNode\\\\n\\\\t^ self theClassName = aClassNode theClassName! !\\\\n\\\\n\\\\n!OBClassAwareNode methodsFor: 'accessing'!\\\\ntheClass\\\\n\\\\t^ theClass! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'accessing'!\\\\ntheClassName\\\\n\\\\t^ self theClass name! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'accessing'!\\\\ntheClass: aClass\\\\n\\\\ttheClass := aClass! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'accessing'!\\\\ntheMetaClass\\\\n\\\\t^ self theClass theMetaClass! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'accessing'!\\\\ntheNonMetaClass\\\\n\\\\t^ self theClass theNonMetaClass! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'accessing'!\\\\ntheNonMetaClassName\\\\n\\\\t^ self theNonMetaClass name! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBClassAwareNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBClassAwareNode class methodsFor: 'sorting' stamp: 'cwp 12/12/2004 22:13'!\\\\nsortHierarchically: nodes\\\\n\\\\tnodes do: [:a | nodes do: [:b | a adoptSuperior: b]].\\\\n\\\\tnodes sort: [:a : b | a sortsBefore: b].\\\\n\\\\t^ nodes! !\\\\nOBCodeNode subclass: #OBClassCategoryNode\\\\n\\\\tinstanceVariableNames: 'environment name'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBClassCategoryNode commentStamp: 'cwp 1/8/2005 12:58' prior: 0!\\\\nOBClassCategory represents a system category in the image's SystemOrganization.!\\\\n\\\\n\\\\n!OBClassCategoryNode methodsFor: 'actions' stamp: 'cwp 12/15/2004 22:40'!\\\\nactions\\\\n\\\\t^ {\\\\n\\\\t\\\\tself action: #fileOut withLabel: 'file out'.\\\\n\\\\t\\\\tself browseAction.\\\\n\\\\t}\\\\n! !\\\\n\\\\n!OBClassCategoryNode methodsFor: 'actions' stamp: 'cwp 12/15/2004 21:44'!\\\\nbrowse\\\\n\\\\tOBSystemBrowser openOnEnvironment: environment category: name! !\\\\n\\\\n!OBClassCategoryNode methodsFor: 'actions'!\\\\nfileOut\\\\n\\\\tenvironment organization fileOutCategory: name.! !\\\\n\\\\n!OBClassCategoryNode methodsFor: 'actions'!\\\\nprintOut\\\\n\\\\tenvironment organization fileOutCategory: name asHtml: true! !\\\\n\\\\n!OBClassCategoryNode methodsFor: 'actions' stamp: 'cwp 9/19/2004 00:11'!\\\\nremove\\\\n\\\\tenvironment organization removeSystemCategory: name.\\\\n\\\\tself signalDeletion! !\\\\n\\\\n\\\\n!OBClassCategoryNode methodsFor: 'ancestry'!\\\\nancestrySelector\\\\n\\\\t^ #isDescendantOfClassCat:! !\\\\n\\\\n!OBClassCategoryNode methodsFor: 'ancestry'!\\\\nisDescendantOfClassCat: other\\\\n\\\\t^ other name = name! !\\\\n\\\\n\\\\n!OBClassCategoryNode methodsFor: 'navigating' stamp: 'dvf 8/15/2005 17:31'!\\\\nclasses\\\\n\\\\t^ self classNames collect: [:ea | (environment at: ea) asNode]! !\\\\n\\\\n!OBClassCategoryNode methodsFor: 'navigating' stamp: 'cwp 12/12/2004 22:12'!\\\\nclassesHierarchically\\\\n\\\\t^ OBClassAwareNode sortHierarchically: self classes! !\\\\n\\\\n!OBClassCategoryNode methodsFor: 'navigating' stamp: 'dvf 8/17/2005 17:25'!\\\\ncomments\\\\n\\\\t^ self classNames collect: [:ea | (environment at: ea) asCommentNode ]! !\\\\n\\\\n!OBClassCategoryNode methodsFor: 'navigating' stamp: 'cwp 12/12/2004 22:19'!\\\\ncommentsHierarchically\\\\n\\\\t^ OBClassAwareNode sortHierarchically: self comments! !\\\\n\\\\n!OBClassCategoryNode methodsFor: 'navigating' stamp: 'dvf 8/15/2005 17:52'!\\\\nmetaclasses\\\\n\\\\t^self classNames collect: [:ea | (environment at: ea) asClassSideNode]! !\\\\n\\\\n!OBClassCategoryNode methodsFor: 'navigating' stamp: 'cwp 12/12/2004 22:19'!\\\\nmetaclassesHierarchically\\\\n\\\\t^ OBClassAwareNode sortHierarchically: self metaclasses! !\\\\n\\\\n\\\\n!OBClassCategoryNode methodsFor: 'private'!\\\\nclassNames\\\\n\\\\t^ environment organization listAtCategoryNamed: name! !\\\\n\\\\n\\\\n!OBClassCategoryNode methodsFor: 'accessing' stamp: 'cwp 9/22/2004 22:13'!\\\\ncontainer\\\\n\\\\t^ environment! !\\\\n\\\\n\\\\n!OBClassCategoryNode methodsFor: 'displaying'!\\\\ndefinition\\\\n\\\\t^ OBClassDefinition \\\\n\\\\t\\\\tenvironment: environment \\\\n\\\\t\\\\ttemplate: ((environment at: #Class) template: name)! !\\\\n\\\\n!OBClassCategoryNode methodsFor: 'displaying'!\\\\nname\\\\n\\\\t^ name! !\\\\n\\\\n!OBClassCategoryNode methodsFor: 'displaying'!\\\\ntext\\\\n\\\\t^ 'Object subclass: #NameOfSubclass\\\\n\\\\tinstanceVariableNames: ''''\\\\n\\\\tclassVariableNames: ''''\\\\n\\\\tpoolDictionaries: ''''\\\\n\\\\tcategory: ''', self name, ''''! !\\\\n\\\\n\\\\n!OBClassCategoryNode methodsFor: 'drag and drop'!\\\\ndropSelector\\\\n\\\\t^ #dropOnClassCategory:! !\\\\n\\\\n\\\\n!OBClassCategoryNode methodsFor: 'class creation'!\\\\nisRedefinedBy: definition\\\\n\\\\t\\\\\\\"No class is selected, so the definition can't be a redefinition.\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!OBClassCategoryNode methodsFor: 'initializing'!\\\\nsetName: aString\\\\n\\\\tself setName: aString environment: self class environment! !\\\\n\\\\n!OBClassCategoryNode methodsFor: 'initializing'!\\\\nsetName: aString environment: anEnvironment\\\\n\\\\tname := aString asSymbol.\\\\n\\\\tenvironment := anEnvironment! !\\\\n\\\\n\\\\n!OBClassCategoryNode methodsFor: 'testing' stamp: 'cwp 6/30/2006 00:42'!\\\\nhasOrganization\\\\n\\\\t^ true! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBClassCategoryNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBClassCategoryNode class methodsFor: 'actions'!\\\\nactionsForParent: aNode\\\\n\\\\t^ Array with: (OBAction\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tlabel: 'find class...'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\treceiver: self\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tselector: #findClassIn:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\targuments: (Array with: aNode environment)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tkeystroke: $f)\\\\n! !\\\\n\\\\n!OBClassCategoryNode class methodsFor: 'actions' stamp: 'dvf 8/31/2005 11:33'!\\\\nfindClassIn: anEnvironment\\\\n\\\\t| pattern class |\\\\n\\\\tpattern := OBTextRequest \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tprompt: 'Please type the name or fragment to look for' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttemplate: ''.\\\\n\\\\tpattern ifNil: [^self].\\\\n\\\\tclass := self findClassIn: anEnvironment pattern: pattern.\\\\n\\\\tclass ifNotNil: [(class asNode) signalSelection].! !\\\\n\\\\n!OBClassCategoryNode class methodsFor: 'actions' stamp: 'cwp 7/14/2006 14:37'!\\\\nfindClassIn: anEnvironment pattern: pattern\\\\n\\\\t| classNames className toMatch potentialClassNames |\\\\n\\\\ttoMatch := (pattern copyWithout: $.) asLowercase.\\\\n\\\\tpotentialClassNames := (anEnvironment classNames , anEnvironment traitNames) asArray.\\\\n\\\\tclassNames := (pattern endsWith: '.')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [potentialClassNames\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tselect: [:nm | nm asLowercase = toMatch]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [potentialClassNames\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tselect: [:n | n includesSubstring: toMatch caseSensitive: false]].\\\\n\\\\tclassNames size = 0 ifTrue: [^ nil].\\\\n\\\\tclassNames size = 1 ifTrue: [^ anEnvironment at: classNames first asSymbol].\\\\n\\\\tclassName := self userSelectionOf: classNames for: toMatch.\\\\n\\\\t^ className ifNotNil: [anEnvironment at: className asSymbol]\\\\n! !\\\\n\\\\n!OBClassCategoryNode class methodsFor: 'actions' stamp: 'cwp 7/9/2006 00:10'!\\\\nuserSelectionOf: classNames for: toMatch \\\\n\\\\t| exactMatch labels lines |\\\\n\\\\texactMatch := classNames detect: [:ea | ea asLowercase = toMatch] ifNone: [nil].\\\\n\\\\texactMatch \\\\n\\\\t\\\\tifNil: [labels _ classNames. lines _ #()]\\\\n\\\\t\\\\tifNotNil: [labels _ classNames copyWithFirst: exactMatch. lines _ #(1)].\\\\n\\\\t^ OBChoiceRequest labels: labels lines: lines.! !\\\\n\\\\n\\\\n!OBClassCategoryNode class methodsFor: 'instance creation'!\\\\non: aString\\\\n\\\\t^ self new setName: aString! !\\\\n\\\\n!OBClassCategoryNode class methodsFor: 'instance creation'!\\\\non: aString inEnvironment: anEnvironment\\\\n\\\\t^ self new setName: aString environment: anEnvironment! !\\\\nOBClassAwareNode subclass: #OBClassCommentNode\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBClassCommentNode commentStamp: 'cwp 1/8/2005 11:24' prior: 0!\\\\nOBClassCommentNode represents the comment attached to a particular class. !\\\\n\\\\n\\\\n!OBClassCommentNode methodsFor: 'actions' stamp: 'cwp 12/15/2004 23:03'!\\\\nactions\\\\n\\\\t^ {\\\\n\\\\t\\\\tself browseAction.\\\\n\\\\t\\\\tself browseHierarchyAction.\\\\n\\\\t\\\\tself action: #chaseVars buttonLabel: 'variables' menuLabel: 'chase variables'\\\\n\\\\t}! !\\\\n\\\\n\\\\n!OBClassCommentNode methodsFor: 'public' stamp: 'cwp 12/13/2004 00:51'!\\\\nname\\\\n\\\\t^ self theClass name! !\\\\n\\\\n\\\\n!OBClassCommentNode methodsFor: 'initializing'!\\\\nsetClass: aClass\\\\n\\\\tself theClass: aClass! !\\\\n\\\\n\\\\n!OBClassCommentNode methodsFor: 'definition'!\\\\ntext\\\\n\\\\t^ self theClass comment! !\\\\n\\\\n!OBClassCommentNode methodsFor: 'definition'!\\\\ntext: aText\\\\n\\\\tself theClass comment: aText stamp: Utilities changeStamp.\\\\n\\\\t^ true! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBClassCommentNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBClassCommentNode class methodsFor: 'as yet unclassified'!\\\\non: classRef\\\\n\\\\t^ self new setClass: classRef! !\\\\nOBDefinition subclass: #OBClassDefinition\\\\n\\\\tinstanceVariableNames: 'environment template'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Definitions'!\\\\n!OBClassDefinition commentStamp: 'cwp 1/8/2005 13:13' prior: 0!\\\\nOBClassDefinition presents a textual interface for examining, modifying and creating classes. Given a class, it knows how to display the definition expression that reflects it's current state, and knows how to create or modify a class given a definition expression.\\\\n\\\\nOBClassDefinition implements a number of safety checks when defining or redefining classes, to ensure that existing classes are not accidentally overwritten.!\\\\n\\\\n\\\\n!OBClassDefinition methodsFor: 'callbacks'!\\\\naccept: aText notifying: aController\\\\n\\\\t^ self defineClass: aText notifying: aController! !\\\\n\\\\n!OBClassDefinition methodsFor: 'callbacks'!\\\\nselection\\\\n\\\\t^ 1 to: 0! !\\\\n\\\\n!OBClassDefinition methodsFor: 'callbacks'!\\\\ntext\\\\n\\\\t^ template! !\\\\n\\\\n\\\\n!OBClassDefinition methodsFor: 'confirmation'!\\\\nconfirmDefinition: definition\\\\n\\\\t\\\\\\\"Check to make sure the user isn't accidentally over-writing an existing class.\\\\\\\"\\\\n\\\\t\\\\n\\\\t(((self isRedefinition: definition) not) and: [self definedClassExists: definition])\\\\n\\\\t\\\\tifTrue: [^ self confirmRedefinition: definition]\\\\n\\\\t\\\\tifFalse: [^ true]! !\\\\n\\\\n!OBClassDefinition methodsFor: 'confirmation'!\\\\nconfirmRedefinition: definition\\\\n\\\\t| newName prompt |\\\\n\\\\tnewName := self nameOfClassDefinedBy: definition.\\\\n\\\\tprompt := (newName, ' is an existing class in this system.\\\\nRedefining it might cause serious problems.\\\\nIs this really what you want to do?') asText.\\\\n\\\\t^ OBConfirmationRequest\\\\n\\\\t\\\\tprompt: prompt\\\\n\\\\t\\\\tconfirm: 'Redefine'! !\\\\n\\\\n!OBClassDefinition methodsFor: 'confirmation'!\\\\ndefinedClassExists: definition\\\\n\\\\t^ environment hasClassNamed: (self nameOfClassDefinedBy: definition)! !\\\\n\\\\n!OBClassDefinition methodsFor: 'confirmation'!\\\\nisRedefinition: aDefinition\\\\n\\\\t^ (self nameOfClassDefinedBy: aDefinition) = (self nameOfClassDefinedBy: template)! !\\\\n\\\\n!OBClassDefinition methodsFor: 'confirmation'!\\\\nnameOfClassDefinedBy: definition\\\\n\\\\t^ (Scanner new scanTokens: definition) third! !\\\\n\\\\n!OBClassDefinition methodsFor: 'confirmation' stamp: 'cwp 10/18/2004 00:13'!\\\\nselectedClass\\\\n\\\\t^ environment at: (self nameOfClassDefinedBy: template) ifAbsent: [nil]! !\\\\n\\\\n\\\\n!OBClassDefinition methodsFor: 'class definition'!\\\\ndefineClass: definition notifying: aController\\\\n\\\\t| evaluator newClass |\\\\n\\\\t(self confirmDefinition: definition) ifFalse: [^ false].\\\\n\\\\tevaluator := self evaluatorForDefinition: definition.\\\\n\\\\tnewClass := evaluator\\\\n\\\\t\\\\t\\\\t\\\\tevaluate: definition\\\\n\\\\t\\\\t\\\\t\\\\tnotifying: aController\\\\n\\\\t\\\\t\\\\t\\\\tlogged: true.\\\\n\\\\tnewClass ifNil: [^ false].\\\\n\\\\tself signalSelectionOf: newClass.\\\\n\\\\t^ true\\\\n! !\\\\n\\\\n!OBClassDefinition methodsFor: 'class definition'!\\\\nevaluatorForDefinition: definition\\\\n\\\\t| tokens |\\\\n\\\\ttokens := Scanner new scanTokens: definition.\\\\n\\\\t^ (environment at: tokens first ifAbsent: [nil]) subclassDefinerClass! !\\\\n\\\\n!OBClassDefinition methodsFor: 'class definition' stamp: 'cwp 10/23/2005 14:42'!\\\\nsignalSelectionOf: aClass\\\\n\\\\taClass asNode demandSelection! !\\\\n\\\\n\\\\n!OBClassDefinition methodsFor: 'initializing'!\\\\nsetEnvironment: anEnvironment template: aText\\\\n\\\\tenvironment := anEnvironment.\\\\n\\\\ttemplate := aText.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBClassDefinition class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBClassDefinition class methodsFor: 'instance creation'!\\\\nenvironment: anEnvironment template: aString \\\\n\\\\t^ self new setEnvironment: anEnvironment template: aString! !\\\\nOBClassAwareNode subclass: #OBClassNode\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBClassNode commentStamp: 'cwp 1/8/2005 11:27' prior: 0!\\\\nOBClassNode wraps a class for display in various types of code browsers. It provides many navigation methods for the different types of browsers where classes may appear.!\\\\n\\\\n\\\\n!OBClassNode methodsFor: 'actions' stamp: 'cwp 7/10/2006 22:33'!\\\\nactions\\\\n\\\\t^ {\\\\n\\\\t\\\\tself action: #findMethod \\\\n\\\\t\\\\t\\\\twithLabel: 'find method...' \\\\n\\\\t\\\\t\\\\twithKeystroke: $f \\\\n\\\\t\\\\t\\\\twithIcon: (MenuIcons tryIcons: #(findIcon smallFindIcon)).\\\\n\\\\t\\\\tself action: #fileOut withLabel: 'file out'.\\\\n\\\\t\\\\tself browseAction.\\\\n\\\\t\\\\tself browseHierarchyAction.\\\\n\\\\t\\\\tself action: #chaseVars buttonLabel: 'variables' menuLabel: 'chase variables'.\\\\n\\\\t\\\\tself action: #inspectInstances withLabel: 'inspect instances'.\\\\n\\\\t\\\\tself action: #inspectSubInstances withLabel: 'inspect subinstances'\\\\n\\\\t}! !\\\\n\\\\n!OBClassNode methodsFor: 'actions' stamp: 'cwp 10/26/2004 00:49'!\\\\nfileOut\\\\n\\\\tself theNonMetaClass fileOut! !\\\\n\\\\n!OBClassNode methodsFor: 'actions'!\\\\nfindMethod\\\\n\\\\t| selectors selection |\\\\n\\\\tselectors := self theClass selectors asSortedArray.\\\\n\\\\tselectors isEmpty ifTrue: [^nil].\\\\n\\\\tselection := OBChoiceRequest labels: selectors.\\\\n\\\\tselection ifNotNil: [(OBMethodNode \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ton: selection\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinClass: self theClass) signalSelection].! !\\\\n\\\\n!OBClassNode methodsFor: 'actions'!\\\\ninspectInstances\\\\n\\\\tself theNonMetaClass inspectAllInstances! !\\\\n\\\\n!OBClassNode methodsFor: 'actions'!\\\\ninspectSubInstances\\\\n\\\\tself theNonMetaClass inspectSubInstances! !\\\\n\\\\n\\\\n!OBClassNode methodsFor: 'navigating' stamp: 'cwp 1/7/2005 23:05'!\\\\nallCategory\\\\n\\\\t^ Array with: (OBAllMethodCategoryNode on: self theClass)! !\\\\n\\\\n!OBClassNode methodsFor: 'navigating' stamp: 'cwp 1/7/2005 23:06'!\\\\ncategories\\\\n\\\\t^ self theClass organization categories\\\\n\\\\t\\\\tcollect: [:cat | OBMethodCategoryNode on: cat inClass: self theClass]\\\\n\\\\t\\\\t\\\\t! !\\\\n\\\\n!OBClassNode methodsFor: 'navigating' stamp: 'cwp 12/12/2004 23:31'!\\\\nclassHierarchy\\\\n\\\\t^ self nodeHierarchyWithClass: OBClassNode! !\\\\n\\\\n!OBClassNode methodsFor: 'navigating'!\\\\nclassVariables\\\\n\\\\t^ self theClass allClassVarNames asArray sort\\\\n\\\\t\\\\tcollect: [:ea | OBClassVariableNode on: ea inClass: self theClass]! !\\\\n\\\\n!OBClassNode methodsFor: 'navigating' stamp: 'cwp 12/12/2004 23:31'!\\\\ncommentHierarchy\\\\n\\\\t^ self nodeHierarchyWithClass: OBClassCommentNode! !\\\\n\\\\n!OBClassNode methodsFor: 'navigating'!\\\\ninstanceVariables\\\\n\\\\t^ self theClass allInstVarNames asArray sort\\\\n\\\\t\\\\tcollect: [:ea | OBInstanceVariableNode on: ea inClass: self theClass]! !\\\\n\\\\n!OBClassNode methodsFor: 'navigating' stamp: 'cwp 12/12/2004 23:30'!\\\\nmetaclassHierarchy\\\\n\\\\t^ self nodeHierarchyWithClass: OBMetaclassNode! !\\\\n\\\\n!OBClassNode methodsFor: 'navigating' stamp: 'cwp 12/12/2004 23:30'!\\\\nnodeHierarchyWithClass: aClass\\\\n\\\\t^ OBClassAwareNode sortHierarchically: \\\\n\\\\t\\\\t(self surroundingHierarchy collect: [:ea | aClass on: ea])! !\\\\n\\\\n!OBClassNode methodsFor: 'navigating' stamp: 'cwp 12/8/2004 23:45'!\\\\nusers\\\\n\\\\t^ (SystemNavigation default allCallsOn: (theClass environment associationAt: theClass name))\\\\n\\\\t\\\\tcollect: [:ref | OBClassRefNode on: self name inMethod: ref]! !\\\\n\\\\n\\\\n!OBClassNode methodsFor: 'ancestry'!\\\\nancestrySelector\\\\n\\\\t^ #isDescendantOfClass:! !\\\\n\\\\n\\\\n!OBClassNode methodsFor: 'nodes' stamp: 'cwp 9/20/2005 08:42'!\\\\ncategoryNodeNamed: aString \\\\n\\\\t^ OBMethodCategoryNode on: aString inClass: theClass! !\\\\n\\\\n!OBClassNode methodsFor: 'nodes'!\\\\nclassCategoryNode\\\\n\\\\t^ OBClassCategoryNode \\\\n\\\\t\\\\ton: self theNonMetaClass category\\\\n\\\\t\\\\tinEnvironment: self theClass environment! !\\\\n\\\\n\\\\n!OBClassNode methodsFor: 'accessing'!\\\\ndefinition\\\\n\\\\t^ OBClassDefinition \\\\n\\\\t\\\\tenvironment: self theClass environment \\\\n\\\\t\\\\ttemplate: self theClass definition! !\\\\n\\\\n!OBClassNode methodsFor: 'accessing'!\\\\norganization\\\\n\\\\t^ self theClass organization! !\\\\n\\\\n!OBClassNode methodsFor: 'accessing' stamp: 'cwp 12/12/2004 23:27'!\\\\nsurroundingHierarchy\\\\n\\\\t ^ (self theClass withAllSuperclasses union: self theClass allSubclasses)\\\\n\\\\t\\\\tasArray! !\\\\n\\\\n!OBClassNode methodsFor: 'accessing' stamp: 'cwp 12/12/2004 22:45'!\\\\n= other\\\\n\\\\tself species = other species ifFalse: [^ false].\\\\n\\\\t^ self theClass = other theClass! !\\\\n\\\\n\\\\n!OBClassNode methodsFor: 'drag and drop' stamp: 'lr 3/28/2006 18:29'!\\\\ndropOnClassCategory: aNode\\\\n\\\\tself theNonMetaClass category: aNode name.\\\\n\\\\tself signalSelection.\\\\n\\\\t^ true! !\\\\n\\\\n!OBClassNode methodsFor: 'drag and drop' stamp: 'lr 4/6/2006 11:31'!\\\\ndropSelector\\\\n\\\\t^ #dropOnClass:! !\\\\n\\\\n\\\\n!OBClassNode methodsFor: 'displaying' stamp: 'cwp 12/13/2004 00:51'!\\\\nname\\\\n\\\\t^ self theClass name! !\\\\n\\\\n!OBClassNode methodsFor: 'displaying'!\\\\ntitle\\\\n\\\\t^ self name! !\\\\n\\\\n\\\\n!OBClassNode methodsFor: 'printing' stamp: 'cwp 12/10/2004 23:53'!\\\\nprintOn: aStream\\\\n\\\\taStream\\\\n\\\\t\\\\tprint: self class;\\\\n\\\\t\\\\tnextPut: $<;\\\\n\\\\t\\\\tprint: self theClass;\\\\n\\\\t\\\\tnextPut: $>! !\\\\n\\\\n\\\\n!OBClassNode methodsFor: 'initializing'!\\\\nsetClass: aClass\\\\n\\\\tself theClass: aClass! !\\\\n\\\\n\\\\n!OBClassNode methodsFor: 'testing' stamp: 'cwp 6/30/2006 00:57'!\\\\nhasOrganization\\\\n\\\\t^ true! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBClassNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBClassNode class methodsFor: 'instance creation' stamp: 'cwp 11/30/2004 21:06'!\\\\non: aClass \\\\n\\\\t^ self new setClass: aClass ! !\\\\nOBMethodNode subclass: #OBClassRefNode\\\\n\\\\tinstanceVariableNames: 'className'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBClassRefNode commentStamp: 'cwp 1/8/2005 12:38' prior: 0!\\\\nEach instance of OBClassRefNode refers to a reference to a particular class from the source code of a method. It's used in the OBListBrowser created by the 'browse references' class action.!\\\\n\\\\n\\\\n!OBClassRefNode methodsFor: 'accessing' stamp: 'cwp 12/8/2004 22:14'!\\\\nname\\\\n\\\\t^ className! !\\\\n\\\\n!OBClassRefNode methodsFor: 'accessing' stamp: 'cwp 12/1/2004 01:16'!\\\\nselection\\\\n\\\\t| start parser |\\\\n\\\\t(parser _ Compiler parserClass new) parseSelector: self source.\\\\n\\\\tstart := parser endOfLastToken.\\\\n\\\\tstart := (self source asString findString: className startingAt: start).\\\\n\\\\t^ start to: start + className size - 1! !\\\\n\\\\n\\\\n!OBClassRefNode methodsFor: 'initialize-release' stamp: 'cwp 12/1/2004 01:10'!\\\\nsetClassName: theName reference: aMethodRef\\\\n\\\\tself setReference: aMethodRef.\\\\n\\\\tclassName := theName.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBClassRefNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBClassRefNode class methodsFor: 'as yet unclassified' stamp: 'cwp 12/1/2004 00:50'!\\\\non: aClassName inMethod: aMethodRef\\\\n\\\\t^ self new setClassName: aClassName reference: aMethodRef! !\\\\nObject subclass: #OBClassReference\\\\n\\\\tinstanceVariableNames: 'name isMeta'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Utilities'!\\\\n!OBClassReference commentStamp: 'cwp 1/8/2005 13:15' prior: 0!\\\\nOBClassReference provides a way to refer to classes that may or may not be loaded into the image. It refers to the class indirectly, via name, rather than with a direct pointer to the class object. It also provides a number of convenience methods, which makes it more convenient than using the class name directly.!\\\\n\\\\n\\\\n!OBClassReference methodsFor: 'accessing'!\\\\nbeMeta\\\\n\\\\tisMeta := true! !\\\\n\\\\n!OBClassReference methodsFor: 'accessing'!\\\\nbeNonMeta\\\\n\\\\tisMeta := false! !\\\\n\\\\n!OBClassReference methodsFor: 'accessing'!\\\\nname\\\\n\\\\t^ isMeta\\\\n\\\\t\\\\tifTrue: [name, ' class']\\\\n\\\\t\\\\tifFalse: [name]! !\\\\n\\\\n!OBClassReference methodsFor: 'accessing'!\\\\ntheClass\\\\n\\\\t| theClass |\\\\n\\\\ttheClass := self theNonMetaClass ifNil: [^ nil].\\\\n\\\\t^ isMeta\\\\n\\\\t\\\\tifFalse: [theClass]\\\\n\\\\t\\\\tifTrue: [theClass class]! !\\\\n\\\\n!OBClassReference methodsFor: 'accessing'!\\\\ntheNonMetaClass\\\\n\\\\t^ Smalltalk at: name ifAbsent: [].! !\\\\n\\\\n!OBClassReference methodsFor: 'accessing'!\\\\ntheNonMetaName\\\\n\\\\t^ name! !\\\\n\\\\n!OBClassReference methodsFor: 'accessing'!\\\\ntheNonMetaName: aSymbol\\\\n\\\\tname := aSymbol! !\\\\n\\\\n\\\\n!OBClassReference methodsFor: 'comparing'!\\\\nhash\\\\n\\\\t^ isMeta\\\\n\\\\t\\\\tifTrue: [name hash bitInvert]\\\\n\\\\t\\\\tifFalse: [name hash]! !\\\\n\\\\n!OBClassReference methodsFor: 'comparing'!\\\\n<= other\\\\n\\\\t^ self name <= other name! !\\\\n\\\\n!OBClassReference methodsFor: 'comparing'!\\\\n= other\\\\n\\\\t^ (other isKindOf: self class) \\\\n\\\\t\\\\tand: [name = other theNonMetaName] \\\\n\\\\t\\\\tand: [isMeta = other isMeta]! !\\\\n\\\\n\\\\n!OBClassReference methodsFor: 'testing'!\\\\nisMeta\\\\n\\\\t^ isMeta! !\\\\n\\\\n\\\\n!OBClassReference methodsFor: 'printing'!\\\\nprintOn: aStream\\\\n\\\\taStream nextPutAll: 'OBClassReference'.\\\\n\\\\taStream nextPut: $<.\\\\n\\\\taStream nextPutAll: name.\\\\n\\\\tisMeta ifTrue: [aStream nextPutAll: ' class'].\\\\n\\\\taStream nextPut: $>.! !\\\\n\\\\n\\\\n!OBClassReference methodsFor: 'converting'!\\\\nreferenceToMethod: aSelector\\\\n\\\\t| ref |\\\\n\\\\tref := MethodReference new.\\\\n\\\\tref setClassSymbol: name classIsMeta: isMeta  methodSymbol: aSelector stringVersion: ''.\\\\n\\\\t^ ref! !\\\\n\\\\n\\\\n!OBClassReference methodsFor: 'initializing'!\\\\nsetName: aSymbol\\\\n\\\\tname := (aSymbol copyUpTo: $ ) asSymbol.\\\\n\\\\tisMeta := aSymbol endsWith: ' class'.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBClassReference class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBClassReference class methodsFor: 'instance creation'!\\\\nmetaNamed: aSymbol\\\\n\\\\t^ (self named: aSymbol) beMeta! !\\\\n\\\\n!OBClassReference class methodsFor: 'instance creation'!\\\\nnamed: aSymbol\\\\n\\\\t^ self new setName: aSymbol! !\\\\n\\\\n!OBClassReference class methodsFor: 'instance creation'!\\\\nto: aClass\\\\n\\\\t^ self named: aClass name! !\\\\nOBVariableNode subclass: #OBClassVariableNode\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBClassVariableNode commentStamp: 'cwp 1/8/2005 12:51' prior: 0!\\\\nOBClassVariable provides a method for finding methods which refer to a shared variable, ie, by searching for an association in the literal frame rather than for bytecodes refering to an instance variable.!\\\\n\\\\n\\\\n!OBClassVariableNode methodsFor: 'navigating' stamp: 'cwp 12/8/2004 23:47'!\\\\naccessors\\\\n\\\\t| literal |\\\\n\\\\tliteral := (self theClass withAllSuperclasses \\\\n\\\\t\\\\t\\\\t\\\\tgather: [:ea | ea classPool associations])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdetect: [:ea | ea key = name].\\\\n\\\\t^ ((self systemNavigation allCallsOn: literal) asArray sort)\\\\n\\\\t\\\\tcollect: [:ref | OBMethodNode on: ref]! !\\\\nOBBrowser subclass: #OBCodeBrowser\\\\n\\\\tinstanceVariableNames: 'hasChanges'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Browsers'!\\\\n!OBCodeBrowser commentStamp: 'cwp 1/7/2005 23:45' prior: 0!\\\\nOBCodeBrowser is a superclass for all browsers which active code in the image. It provides methods for registering with the SystemChangeNotifier and updating it's display when it receives notification of system changes.!\\\\n\\\\n\\\\n!OBCodeBrowser methodsFor: 'morphic' stamp: 'cwp 1/8/2005 21:55'!\\\\naddModelItemsToWindowMenu: aMenu\\\\n\\\\tSmalltalk \\\\n\\\\t\\\\tat: #SystemBrowser \\\\n\\\\t\\\\tifPresent: [:class | class \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taddRegistryMenuItemsTo: aMenu \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinAccountOf: OBSystemBrowserAdaptor new].! !\\\\n\\\\n!OBCodeBrowser methodsFor: 'morphic'!\\\\ninitialExtent\\\\n\\\\thasChanges := false.\\\\n\\\\tself register.\\\\n\\\\t^ super initialExtent! !\\\\n\\\\n!OBCodeBrowser methodsFor: 'morphic' stamp: 'cwp 6/4/2006 18:51'!\\\\nstepAt: milliseconds in: aSystemWindow\\\\n\\\\thasChanges ifTrue: [self signalRefresh].\\\\n\\\\tself clearChanges! !\\\\n\\\\n!OBCodeBrowser methodsFor: 'morphic'!\\\\nwantsStepsIn: aSystemWindow\\\\n\\\\t^ true! !\\\\n\\\\n!OBCodeBrowser methodsFor: 'morphic'!\\\\nwindowIsClosing\\\\n\\\\tself unregister! !\\\\n\\\\n\\\\n!OBCodeBrowser methodsFor: 'updating' stamp: 'cwp 1/7/2005 23:47'!\\\\nclearChanges\\\\n\\\\thasChanges := false! !\\\\n\\\\n!OBCodeBrowser methodsFor: 'updating'!\\\\nevent: anEvent\\\\n\\\\thasChanges := true! !\\\\n\\\\n!OBCodeBrowser methodsFor: 'updating' stamp: 'cwp 3/1/2006 19:48'!\\\\nregister\\\\n\\\\tSystemChangeNotifier uniqueInstance notify: self ofAllSystemChangesUsing: #event:! !\\\\n\\\\n!OBCodeBrowser methodsFor: 'updating' stamp: 'cwp 3/1/2006 19:48'!\\\\nunregister\\\\n\\\\tSystemChangeNotifier uniqueInstance noMoreNotificationsFor: self! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBCodeBrowser class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBCodeBrowser class methodsFor: 'configuration' stamp: 'lr 3/28/2006 12:00'!\\\\naddTo: root class: classSel comment: commentSel metaclass: metaclassSel \\\\n\\\\t| class metaclass comment methodCategory method allMethodCategory |\\\\n\\\\tclass := OBMetaNode named: 'Class'.\\\\n\\\\tcomment := OBMetaNode named: 'ClassComment'.\\\\n\\\\tmetaclass := OBMetaNode named: 'Metaclass'.\\\\n\\\\tallMethodCategory := OBMetaNode named: 'AllMethodCategory'.\\\\n\\\\tmethodCategory := OBMetaNode named: 'MethodCategory'.\\\\n\\\\tmethod := OBMetaNode named: 'Method'.\\\\n\\\\troot\\\\n\\\\t\\\\tchildAt: classSel\\\\n\\\\t\\\\t\\\\tlabeled: 'instance'\\\\n\\\\t\\\\t\\\\tput: class;\\\\n\\\\t\\\\tchildAt: commentSel\\\\n\\\\t\\\\t\\\\tlabeled: '?'\\\\n\\\\t\\\\t\\\\tput: comment;\\\\n\\\\t\\\\tchildAt: metaclassSel\\\\n\\\\t\\\\t\\\\tlabeled: 'class'\\\\n\\\\t\\\\t\\\\tput: metaclass;\\\\n\\\\t\\\\taddActor: (OBNodeActor onNodeClass: OBClassCategoryNode);\\\\n\\\\t\\\\taddActor: OBCategoryActor new;\\\\n\\\\t\\\\tfilterClass: OBModalFilter.\\\\n\\\\tclass\\\\n\\\\t\\\\tdisplaySelector: #indentedName;\\\\n\\\\t\\\\tchildAt: #allCategory put: allMethodCategory;\\\\n\\\\t\\\\tchildAt: #categories put: methodCategory;\\\\n\\\\t\\\\taddActor: OBNodeActor new;\\\\n\\\\t\\\\taddActor: OBClassActor new.\\\\n\\\\tcomment \\\\n\\\\t\\\\tdisplaySelector: #indentedName;\\\\n\\\\t\\\\taddActor: OBNodeActor new.\\\\n\\\\tmetaclass\\\\n\\\\t\\\\tdisplaySelector: #indentedName;\\\\n\\\\t\\\\tchildAt: #allCategory put: allMethodCategory;\\\\n\\\\t\\\\tchildAt: #categories put: methodCategory;\\\\n\\\\t\\\\taddActor: OBNodeActor new;\\\\n\\\\t\\\\taddActor: OBClassActor new.\\\\n\\\\tallMethodCategory\\\\n\\\\t\\\\tchildAt: #methods put: method;\\\\n\\\\t\\\\taddActor: (OBNodeActor onNodeClass: OBMethodCategoryNode).\\\\n\\\\tmethodCategory\\\\n\\\\t\\\\tchildAt: #methods put: method;\\\\n\\\\t\\\\taddActor: OBCategoryActor new;\\\\n\\\\t\\\\taddActor: (OBNodeActor onNodeClass: OBMethodCategoryNode).\\\\n\\\\tmethod addActor: OBNodeActor new.\\\\n\\\\t^ root! !\\\\n\\\\n!OBCodeBrowser class methodsFor: 'configuration' stamp: 'cwp 12/15/2004 22:52'!\\\\noptionalButtons\\\\n\\\\t^ #('browse' 'variables' 'hierarchy' 'inheritance' 'senders' 'implementors' 'versions')! !\\\\nOBNode subclass: #OBCodeNode\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBCodeNode commentStamp: 'cwp 1/8/2005 11:12' prior: 0!\\\\nOBCodeNode is an abstract superclass for node classes that represent program elements active in the image. Though it provides little functionality, it exists for structural purposes.!\\\\n\\\\n\\\\n!OBCodeNode methodsFor: 'actions' stamp: 'cwp 7/14/2006 14:24'!\\\\nbrowseAction\\\\n\\\\t^ self \\\\n\\\\t\\\\taction: #browse\\\\n\\\\t\\\\twithMenuLabel: 'browse'\\\\n\\\\t\\\\twithButtonLabel: 'browse'\\\\n\\\\t\\\\twithKeystroke: $b\\\\n\\\\t\\\\twithIcon: (MenuIcons tryIcons: #(windowIcon smallWindowIcon)).\\\\n! !\\\\n\\\\n\\\\n!OBCodeNode methodsFor: 'testing' stamp: 'cwp 6/30/2006 00:37'!\\\\nhasOrganization\\\\n\\\\t^ false! !\\\\nOBNode subclass: #OBCollectionNode\\\\n\\\\tinstanceVariableNames: 'collection'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Nodes'!\\\\n!OBCollectionNode commentStamp: 'cwp 1/7/2005 23:31' prior: 0!\\\\nOBCollectionNode is a trivial wrapper for a collection of nodes. It is typically used as an artificial root node for metagraphs that have no natural root.!\\\\n\\\\n\\\\n!OBCollectionNode methodsFor: 'displaying' stamp: 'cwp 3/15/2004 23:19'!\\\\nname\\\\n\\\\t^ collection species name! !\\\\n\\\\n\\\\n!OBCollectionNode methodsFor: 'initalizing' stamp: 'cwp 3/15/2004 23:18'!\\\\nsetCollection: aCollection\\\\n\\\\tcollection _ aCollection! !\\\\n\\\\n\\\\n!OBCollectionNode methodsFor: 'navigating' stamp: 'cwp 3/15/2004 23:19'!\\\\nchildren\\\\n\\\\t^ collection! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBCollectionNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBCollectionNode class methodsFor: 'as yet unclassified' stamp: 'cwp 3/15/2004 23:17'!\\\\non: aCollection\\\\n\\\\t^ self new setCollection: aCollection! !\\\\nObject subclass: #OBColumn\\\\n\\\\tinstanceVariableNames: 'panel filter children selection'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Kernel'!\\\\n!OBColumn commentStamp: 'cwp 1/7/2005 23:19' prior: 0!\\\\nAn OBColumn manages a list of nodes, which it displays in a PluggableListMorph in the pane scroller at the top of the browser. All instances of OBColumn belong to an OBColumnPanel. It's main responsibility is keeping its list - and those of its neighbours - up to date. Each column has a MetaNode, which provides the list contents. It uses a filter to meditate between its self and the MetaNode.\\\\n\\\\niVars:\\\\n\\\\npanel\\\\t\\\\t- the panel which owns the column\\\\nfilter\\\\t\\\\t- the filter which manages the column's MetaNode.\\\\nparent\\\\t\\\\t- the node selected in the column to the left of this column\\\\nchildren \\\\t- the nodes which make up this column's list\\\\nselection \\\\t- the index of the node selected by the user!\\\\n\\\\n\\\\n!OBColumn methodsFor: 'accessing' stamp: 'cwp 4/17/2006 15:52'!\\\\nannouncer\\\\n\\\\t^ panel announcer! !\\\\n\\\\n!OBColumn methodsFor: 'accessing' stamp: 'cwp 11/16/2004 21:49'!\\\\nbasicNext\\\\n\\\\t^panel columnAfter: self! !\\\\n\\\\n!OBColumn methodsFor: 'accessing' stamp: 'cwp 11/17/2004 00:18'!\\\\nbrowser\\\\n\\\\t^ panel browser! !\\\\n\\\\n!OBColumn methodsFor: 'accessing' stamp: 'cwp 2/9/2004 20:58'!\\\\nfilter\\\\n\\\\t^ filter! !\\\\n\\\\n!OBColumn methodsFor: 'accessing' stamp: 'cwp 2/12/2004 18:47'!\\\\nfilter: aFilter\\\\n\\\\tfilter _ aFilter monitor: self.\\\\n\\\\tself changed: #filter.! !\\\\n\\\\n!OBColumn methodsFor: 'accessing' stamp: 'cwp 2/28/2006 08:27'!\\\\nisEmpty\\\\n\\\\t^ children isEmpty! !\\\\n\\\\n!OBColumn methodsFor: 'accessing' stamp: 'cwp 2/9/2004 20:59'!\\\\nmetaNode\\\\n\\\\t^ self filter metaNode! !\\\\n\\\\n!OBColumn methodsFor: 'accessing' stamp: 'cwp 2/12/2004 20:50'!\\\\nnext\\\\n\\\\t^ self basicNext\\\\n\\\\t\\\\tifNil: [(self hasSelection and: [self shouldBeLast not])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self createNext]]\\\\n\\\\t! !\\\\n\\\\n!OBColumn methodsFor: 'accessing' stamp: 'cwp 9/24/2005 22:45'!\\\\nparent\\\\n\\\\t^ panel parentNodeForColumn: self! !\\\\n\\\\n!OBColumn methodsFor: 'accessing' stamp: 'cwp 6/8/2006 01:32'!\\\\nparent: aNode\\\\n\\\\t\\\\n\\\\tself filter: aNode metaNode filter.\\\\n\\\\tself getChildren.\\\\n\\\\tself clearSelection.\\\\n\\\\tself changed: #list.\\\\n\\\\tpanel clearAfter: self! !\\\\n\\\\n!OBColumn methodsFor: 'accessing' stamp: 'cwp 6/28/2006 00:53'!\\\\nrequestor\\\\n\\\\t^ self browser requestor node: (self selectedNode ifNil: [self parent])! !\\\\n\\\\n\\\\n!OBColumn methodsFor: 'actions' stamp: 'cwp 9/24/2005 22:23'!\\\\nactionSetsForParentNode\\\\n\\\\t^ self filter children gather: [:child | child actionSetsForParent: self parent].\\\\t! !\\\\n\\\\n!OBColumn methodsFor: 'actions' stamp: 'cwp 9/14/2004 19:08'!\\\\nactionSetsForSelectedNode\\\\n\\\\t| node |\\\\n\\\\tnode _ self selectedNode ifNil: [^ #()].\\\\n\\\\t^ node metaNode actionSetsForNode: node\\\\t! !\\\\n\\\\n!OBColumn methodsFor: 'actions' stamp: 'hpt 5/17/2004 14:19'!\\\\nactionsForKeystroke: aChar\\\\n\\\\t^self actionsForParentNode, self actionsForSelectedNode\\\\n\\\\t\\\\tselect: [:anAction | anAction keystroke == aChar]! !\\\\n\\\\n!OBColumn methodsFor: 'actions' stamp: 'cwp 9/24/2005 22:23'!\\\\nactionsForParentNode\\\\n\\\\t^ self filter children gather: [:child | child actionsForParent: self parent].\\\\t! !\\\\n\\\\n!OBColumn methodsFor: 'actions' stamp: 'avi 3/6/2004 16:26'!\\\\nactionsForSelectedNode\\\\n\\\\t| node |\\\\n\\\\tnode _ self selectedNode ifNil: [^ #()].\\\\n\\\\t^ node metaNode actionsForNode: node\\\\t! !\\\\n\\\\n!OBColumn methodsFor: 'actions' stamp: 'cwp 6/25/2006 00:22'!\\\\naddActionsToMenu: aMenu\\\\n\\\\tself actionSetsForParentNode, self actionSetsForSelectedNode\\\\n\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t[:set \\\\n\\\\t\\\\t\\\\t|set do: \\\\n\\\\t\\\\t\\\\t\\\\t[:action | \\\\n\\\\t\\\\t\\\\t\\\\taction announcer: self announcer.\\\\n\\\\t\\\\t\\\\t\\\\taction addItemToMenu: aMenu]]\\\\n\\\\t\\\\tseparatedBy: [aMenu addLine]! !\\\\n\\\\n!OBColumn methodsFor: 'actions' stamp: 'cwp 6/28/2006 00:24'!\\\\naddServicesToMenu: aMenu\\\\n\\\\t| scan |\\\\n\\\\tscan _ self announcer announce: OBServiceScan.\\\\n\\\\taMenu \\\\n\\\\t\\\\taddServices: scan services\\\\n\\\\t\\\\tfor: self requestor\\\\n\\\\t\\\\textraLines: #().\\\\n\\\\t! !\\\\n\\\\n!OBColumn methodsFor: 'actions' stamp: 'cwp 6/25/2006 13:55'!\\\\nservicesForKeystroke: aChar\\\\n\\\\t| scan |\\\\n\\\\tscan _ self announcer announce: OBServiceScan.\\\\n\\\\t^ scan services select: [:ea | ea keystroke == aChar]! !\\\\n\\\\n\\\\n!OBColumn methodsFor: 'callbacks' stamp: 'cwp 6/28/2006 00:50'!\\\\nkeystroke: aChar from: aMorph\\\\n\\\\tself isEmpty ifTrue: [^ self].\\\\n\\\\t(self actionsForKeystroke: aChar)\\\\n\\\\t\\\\tdo: [:action | \\\\n\\\\t\\\\t\\\\taction announcer: self announcer.\\\\n\\\\t\\\\t\\\\taction trigger].\\\\n\\\\t(self servicesForKeystroke: aChar)\\\\n\\\\t\\\\tdo: [:service | service condExecuteFor: self requestor]! !\\\\n\\\\n!OBColumn methodsFor: 'callbacks' stamp: 'cwp 12/8/2004 21:21'!\\\\nlist\\\\n\\\\t^ children \\\\n\\\\t\\\\tifNil: [#()]\\\\n\\\\t\\\\tifNotNil: [children collect: [:ea | ea displayString]]! !\\\\n\\\\n!OBColumn methodsFor: 'callbacks' stamp: 'cwp 12/8/2004 21:22'!\\\\nlistAt: index\\\\n\\\\t^ (children at: index ifAbsent: [^ '']) displayString! !\\\\n\\\\n!OBColumn methodsFor: 'callbacks' stamp: 'cwp 2/29/2004 21:48'!\\\\nlistSize\\\\n\\\\t^ children\\\\n\\\\t\\\\tifNil: [0]\\\\n\\\\t\\\\tifNotNil: [children size]! !\\\\n\\\\n!OBColumn methodsFor: 'callbacks' stamp: 'cwp 6/25/2006 00:24'!\\\\nmenu: aMenu\\\\n\\\\tself isEmpty ifFalse:\\\\n\\\\t\\\\t[self addActionsToMenu: aMenu.\\\\n\\\\t\\\\tself addServicesToMenu: aMenu].\\\\n\\\\t^ aMenu! !\\\\n\\\\n!OBColumn methodsFor: 'callbacks' stamp: 'cwp 4/18/2006 00:25'!\\\\nokToChange\\\\n\\\\t^ (self announcer announce: OBAboutToChange) isVetoed not! !\\\\n\\\\n!OBColumn methodsFor: 'callbacks' stamp: 'cwp 11/5/2003 19:01'!\\\\nselection\\\\n\\\\t^ selection ifNil: [0]! !\\\\n\\\\n!OBColumn methodsFor: 'callbacks' stamp: 'cwp 6/5/2006 23:37'!\\\\nselection: anInteger\\\\n\\\\tselection _ anInteger.\\\\n\\\\tself signalSelectionChanged.\\\\n\\\\tself changed: #selection.\\\\n! !\\\\n\\\\n\\\\n!OBColumn methodsFor: 'drag and drop' stamp: 'cwp 6/4/2006 00:37'!\\\\nacceptDroppingMorph: transferMorph event: evt inMorph: listMorph\\\\n\\\\t^ [(self nodeForDroppedMorph: transferMorph event: evt inMorph: listMorph)\\\\n\\\\t\\\\tacceptDroppedNode: transferMorph passenger]\\\\n\\\\t\\\\t\\\\ton: OBAnnouncerRequest\\\\n\\\\t\\\\t\\\\tdo: [:notification | notification resume: self announcer]\\\\n! !\\\\n\\\\n!OBColumn methodsFor: 'drag and drop' stamp: 'avi 2/20/2004 13:45'!\\\\ndragEnabled\\\\n\\\\t^ true! !\\\\n\\\\n!OBColumn methodsFor: 'drag and drop' stamp: 'avi 2/20/2004 14:35'!\\\\ndragPassengerFor: item inMorph: listMorph\\\\n\\\\t^ self nodeForItem: item inMorph: listMorph! !\\\\n\\\\n!OBColumn methodsFor: 'drag and drop' stamp: 'avi 2/20/2004 14:37'!\\\\ndragTransferType\\\\n\\\\t^ #OmniBrowser! !\\\\n\\\\n!OBColumn methodsFor: 'drag and drop' stamp: 'avi 2/20/2004 14:36'!\\\\ndragTransferTypeForMorph: listMorph\\\\n\\\\t^ self dragTransferType! !\\\\n\\\\n!OBColumn methodsFor: 'drag and drop' stamp: 'avi 2/20/2004 14:30'!\\\\ndropEnabled\\\\n\\\\t^ true! !\\\\n\\\\n!OBColumn methodsFor: 'drag and drop' stamp: 'cwp 3/3/2004 02:23'!\\\\nnodeForDroppedMorph: transferMorph event: evt inMorph: pluggableListMorph\\\\n\\\\t| index item |\\\\n\\\\tindex _ pluggableListMorph rowAtLocation: evt position.\\\\n\\\\tindex = 0 ifTrue: [^ nil].\\\\n\\\\titem _ pluggableListMorph listMorph item: index.\\\\n\\\\t^ self nodeForItem: item inMorph: pluggableListMorph! !\\\\n\\\\n!OBColumn methodsFor: 'drag and drop' stamp: 'cwp 6/10/2006 21:59'!\\\\nnodeForItem: item inMorph: pluggableListMorph\\\\n\\\\t^ children \\\\n\\\\t\\\\tdetect: [:child | child displayString = item contents asString]\\\\n\\\\t\\\\tifNone: [item contents]! !\\\\n\\\\n!OBColumn methodsFor: 'drag and drop' stamp: 'cwp 2/25/2004 21:26'!\\\\nwantsDroppedMorph: transferMorph event: evt inMorph: listMorph\\\\n\\\\t| node |\\\\n\\\\t(transferMorph isKindOf: TransferMorph) ifFalse: [^ false].\\\\n\\\\ttransferMorph dragTransferType == self dragTransferType ifFalse: [^ false].\\\\n\\\\tnode _ self nodeForDroppedMorph: transferMorph event: evt inMorph: listMorph.\\\\n\\\\t^ node notNil and: [node wantsDroppedNode: transferMorph passenger]! !\\\\n\\\\n\\\\n!OBColumn methodsFor: 'initializing' stamp: 'cwp 6/3/2006 23:38'!\\\\nsetPanel: aPanel \\\\n\\\\tpanel := aPanel.\\\\n\\\\tself subscribe.\\\\n\\\\tchildren := #().\\\\n\\\\tself clearSelection! !\\\\n\\\\n!OBColumn methodsFor: 'initializing' stamp: 'cwp 6/3/2006 23:39'!\\\\nsetPanel: aPanel metaNode: aMetaNode node: aNode \\\\n\\\\tpanel := aPanel.\\\\n\\\\tself subscribe.\\\\n\\\\tfilter := aMetaNode filter monitor: self.\\\\n\\\\tchildren _ self filter nodesForParent: aNode.\\\\n\\\\tself clearSelection! !\\\\n\\\\n\\\\n!OBColumn methodsFor: 'morphic' stamp: 'cwp 12/14/2003 22:15'!\\\\nbuttonHeight\\\\n\\\\t^ 20! !\\\\n\\\\n!OBColumn methodsFor: 'morphic' stamp: 'cwp 2/9/2004 21:06'!\\\\ncolumnWithHeader\\\\n\\\\t| col bh |\\\\n\\\\tcol _ BorderedMorph new\\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tvResizing: #spaceFill;\\\\n\\\\t\\\\tclipSubmorphs: true;\\\\n\\\\t\\\\tcolor: Color transparent;\\\\n\\\\t\\\\tcellInset: 0;\\\\n\\\\t\\\\tborderWidth: 0;\\\\n\\\\t\\\\tlayoutPolicy: ProportionalLayout new.\\\\n\\\\t\\\\n\\\\tbh _ self buttonHeight negated.\\\\n\\\\tcol\\\\n\\\\t\\\\taddMorph: self listMorph\\\\n\\\\t\\\\tfullFrame: (LayoutFrame fractions: (0@0 corner: 1@1) offsets: (0@0 corner: 0@bh)).\\\\n\\\\tcol\\\\n\\\\t\\\\taddMorph: self filter buttonMorph\\\\n\\\\t\\\\tfullFrame: (LayoutFrame fractions: (0@1 corner: 1@1) offsets: (0@bh corner: 0@0)).\\\\n\\\\t\\\\t\\\\n\\\\n\\\\t^ col! !\\\\n\\\\n!OBColumn methodsFor: 'morphic' stamp: 'cwp 2/28/2006 08:37'!\\\\nlistMorph\\\\n\\\\t^ (PluggableListMorph\\\\n\\\\t\\\\ton: self\\\\n\\\\t\\\\tlist: #list\\\\n\\\\t\\\\tselected: #selection\\\\n\\\\t\\\\tchangeSelected: #selection:\\\\n\\\\t\\\\tmenu: #menu:\\\\n\\\\t\\\\tkeystroke: #keystroke:from:)\\\\n\\\\t\\\\t\\\\tgetListElementSelector: #listAt:;\\\\n\\\\t\\\\t\\\\tgetListSizeSelector: #listSize;\\\\n\\\\t\\\\t\\\\tdragEnabled: self dragEnabled;\\\\n\\\\t\\\\t\\\\tdropEnabled: self dropEnabled;\\\\n\\\\t\\\\t\\\\tborderWidth: 0;\\\\n\\\\t\\\\t\\\\tautoDeselect: false;\\\\n\\\\t\\\\t\\\\tadoptPaneColor: panel defaultBackgroundColor;\\\\n\\\\t\\\\t\\\\tyourself! !\\\\n\\\\n!OBColumn methodsFor: 'morphic' stamp: 'cwp 2/12/2004 19:17'!\\\\nmorph\\\\n\\\\t^ self isEmpty \\\\n\\\\t\\\\tifTrue: [self simplePane]\\\\n\\\\t\\\\tifFalse: [self filter wantsButton\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self paneWithHeader]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [self simplePane]]! !\\\\n\\\\n!OBColumn methodsFor: 'morphic' stamp: 'cwp 2/12/2004 18:11'!\\\\npaneWithHeader\\\\n\\\\t^ OBPane forColumn: self withFilter: self filter! !\\\\n\\\\n!OBColumn methodsFor: 'morphic' stamp: 'cwp 2/12/2004 18:10'!\\\\nsimplePane\\\\n\\\\t^ OBPane forColumn: self! !\\\\n\\\\n\\\\n!OBColumn methodsFor: 'nodes' stamp: 'cwp 9/24/2005 22:29'!\\\\ngetChildren\\\\n\\\\tchildren _ self filter nodesForParent: self parent.\\\\n\\\\t^ children! !\\\\n\\\\n!OBColumn methodsFor: 'nodes' stamp: 'cwp 3/3/2004 00:11'!\\\\nnextMetaNode\\\\n\\\\t^ self selectedNode metaNode! !\\\\n\\\\n!OBColumn methodsFor: 'nodes' stamp: 'cwp 9/26/2005 00:14'!\\\\nselectAncestorOf: aNode\\\\n\\\\t| ancestor |\\\\n\\\\tancestor _ self filter selectAncestorOf: aNode withParent: self parent.\\\\n\\\\tancestor ifNotNil:\\\\n\\\\t\\\\t[self \\\\n\\\\t\\\\t\\\\tgetChildren; \\\\n\\\\t\\\\t\\\\tchanged: #list;\\\\n\\\\t\\\\t\\\\tselect: ancestor.\\\\n\\\\t\\\\tpanel selected: self].\\\\n\\\\t^ ancestor! !\\\\n\\\\n\\\\n!OBColumn methodsFor: 'printing' stamp: 'avi 3/6/2004 16:23'!\\\\ndescriptor\\\\n\\\\tself isEmpty ifTrue: [^ 'empty'].\\\\n\\\\tself hasSelection ifTrue: [^ self selectedNode name].\\\\n\\\\t^ ''! !\\\\n\\\\n!OBColumn methodsFor: 'printing' stamp: 'cwp 2/11/2004 23:31'!\\\\nprintOn: aStream\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream nextPut: $(.\\\\n\\\\taStream nextPutAll: self descriptor.\\\\n\\\\taStream nextPut: $)! !\\\\n\\\\n\\\\n!OBColumn methodsFor: 'selecting' stamp: 'avi 3/6/2004 18:05'!\\\\nclearSelection\\\\n\\\\tselection _ 0! !\\\\n\\\\n!OBColumn methodsFor: 'selecting' stamp: 'cwp 2/2/2004 21:54'!\\\\nselectedNode\\\\n\\\\t^ children at: self selection ifAbsent: [].! !\\\\n\\\\n!OBColumn methodsFor: 'selecting' stamp: 'cwp 7/14/2006 12:50'!\\\\nselectSilently: aNode\\\\n\\\\t| match |\\\\n\\\\taNode ifNil: [selection := 0. ^ self].\\\\n\\\\tmatch := children \\\\n\\\\t\\\\t\\\\t\\\\tdetect: [:ea | ea correspondsWith: aNode] \\\\n\\\\t\\\\t\\\\t\\\\tifNone: [selection := 0. ^ self].\\\\n\\\\tselection _ children indexOf: match.! !\\\\n\\\\n!OBColumn methodsFor: 'selecting' stamp: 'cwp 12/8/2004 22:10'!\\\\nselect: aNode\\\\n\\\\tself selection: (children indexOf: (children detect: [:ea | ea = aNode] ifNone: []))! !\\\\n\\\\n\\\\n!OBColumn methodsFor: 'testing' stamp: 'avi 3/6/2004 23:07'!\\\\nhasSelection\\\\n\\\\t^ self selection > 0! !\\\\n\\\\n!OBColumn methodsFor: 'testing' stamp: 'cwp 12/20/2004 22:09'!\\\\nincludesNode: aNode\\\\n\\\\t^ children includes: aNode! !\\\\n\\\\n!OBColumn methodsFor: 'testing' stamp: 'avi 3/6/2004 16:27'!\\\\nshouldBeLast\\\\n\\\\t^ self hasSelection not or: [self nextMetaNode hasChildren not]! !\\\\n\\\\n!OBColumn methodsFor: 'testing' stamp: 'cwp 2/12/2004 20:18'!\\\\nwantsButton\\\\n\\\\t^ self filter notNil and: [self filter wantsButton]! !\\\\n\\\\n\\\\n!OBColumn methodsFor: 'updating' stamp: 'cwp 6/9/2006 22:35'!\\\\nchildrenChanged: announcement\\\\n\\\\t(self parent = announcement node) ifTrue:\\\\n\\\\t\\\\t[self refresh]! !\\\\n\\\\n!OBColumn methodsFor: 'updating' stamp: 'cwp 9/25/2005 23:56'!\\\\nclear\\\\n\\\\tfilter _ nil.\\\\n\\\\tchildren _ #().\\\\n\\\\tself clearSelection.\\\\n\\\\tself changed: #list.\\\\n\\\\tself changed: #selection.\\\\n\\\\tself changed: #filter.! !\\\\n\\\\n!OBColumn methodsFor: 'updating' stamp: 'cwp 9/24/2005 22:56'!\\\\ncreateNext\\\\n\\\\t| nextMetaNode created |\\\\n\\\\tnextMetaNode := self nextMetaNode.\\\\n\\\\tcreated := nextMetaNode columnInPanel: panel node: self selectedNode.\\\\n\\\\tpanel pushColumn: created.\\\\n\\\\t^created! !\\\\n\\\\n!OBColumn methodsFor: 'updating' stamp: 'cwp 6/9/2006 23:17'!\\\\nlistChanged\\\\n\\\\tself refreshAndSignal: true! !\\\\n\\\\n!OBColumn methodsFor: 'updating' stamp: 'cwp 6/9/2006 23:19'!\\\\nnodeChanged: ann\\\\n\\\\t(children includes: ann node) ifTrue: [self changed: #list]! !\\\\n\\\\n!OBColumn methodsFor: 'updating' stamp: 'cwp 6/4/2006 12:03'!\\\\nnodeDeleted: announcement \\\\n\\\\t\\\\\\\"This gets called if an action causes the currently selected node to be deleted.\\\\\\\"\\\\n\\\\n\\\\tself selectedNode = announcement node\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[self getChildren.\\\\n\\\\t\\\\t\\\\tself changed: #list.\\\\n\\\\t\\\\t\\\\tself selection: 0]! !\\\\n\\\\n!OBColumn methodsFor: 'updating' stamp: 'cwp 6/9/2006 23:08'!\\\\nrefresh\\\\n\\\\tself refreshAndSignal: false! !\\\\n\\\\n!OBColumn methodsFor: 'updating' stamp: 'cwp 6/9/2006 23:08'!\\\\nrefresh: ann\\\\n\\\\tself refreshAndSignal: false! !\\\\n\\\\n!OBColumn methodsFor: 'updating' stamp: 'cwp 6/9/2006 23:08'!\\\\nrefreshAndSignal: aBoolean\\\\n\\\\t| node oldChildren shouldSignal |\\\\n\\\\tshouldSignal _ aBoolean.\\\\n\\\\tself isEmpty ifTrue: [^self].\\\\n\\\\tnode := self selectedNode.\\\\n\\\\toldChildren := children.\\\\n\\\\tself getChildren.\\\\n\\\\tchildren = oldChildren ifFalse: \\\\n\\\\t\\\\t[self selectSilently: node.\\\\n\\\\t\\\\tself hasSelection ifFalse: \\\\n\\\\t\\\\t\\\\t[shouldSignal _ true]].\\\\n\\\\tshouldSignal ifTrue: [self signalSelectionChanged].\\\\n\\\\tself changed: #list! !\\\\n\\\\n!OBColumn methodsFor: 'updating' stamp: 'cwp 6/8/2006 00:27'!\\\\nselectionChanged: ann\\\\n\\\\t! !\\\\n\\\\n!OBColumn methodsFor: 'updating' stamp: 'cwp 6/5/2006 23:31'!\\\\nsignalSelectionChanged\\\\n\\\\tself announcer announce: (OBSelectionChanged column: self)! !\\\\n\\\\n!OBColumn methodsFor: 'updating' stamp: 'cwp 6/10/2006 00:18'!\\\\nsubscribe\\\\n\\\\tself announcer \\\\n\\\\t\\\\tobserve: OBRefreshRequired send: #refresh: to: self;\\\\n\\\\t\\\\tobserve: OBNodeChanged send: #nodeChanged: to: self;\\\\n\\\\t\\\\tobserve: OBNodeDeleted send: #nodeDeleted: to: self;\\\\n\\\\t\\\\tobserve: OBChildrenChanged send: #childrenChanged: to: self;\\\\n\\\\t\\\\tobserve: OBSelectionChanged send: #selectionChanged: to: self.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBColumn class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBColumn class methodsFor: 'instance creation' stamp: 'cwp 9/18/2005 13:26'!\\\\ninPanel: aBrowser\\\\n\\\\t^ self new setPanel: aBrowser! !\\\\n\\\\n!OBColumn class methodsFor: 'instance creation' stamp: 'cwp 9/18/2005 13:25'!\\\\ninPanel: aPanel metaNode: aMetaNode node: aNode\\\\n\\\\t^ self new\\\\n\\\\t\\\\t\\\\tsetPanel: aPanel\\\\n\\\\t\\\\t\\\\tmetaNode: aMetaNode\\\\n\\\\t\\\\t\\\\tnode: aNode! !\\\\nOBPanel subclass: #OBColumnPanel\\\\n\\\\tinstanceVariableNames: 'root columns minPanes maxPanes'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Panels'!\\\\n!OBColumnPanel commentStamp: 'cwp 12/6/2004 23:50' prior: 0!\\\\nOBColumnPanel handles navigation around the nodes of the object graph. It maintains a list of columns, which track the user's path through the node tree. As nodes are selected, additional columns are added to the list, which appear as panes on the right of the panel. \\\\n\\\\niVars:\\\\n\\\\ncolumns\\\\t- A collection of OBColumns, each of which manages a single pane in the scroller.\\\\nminPanes - The minimum number of panes that should ever be visible.\\\\nmaxPanes - The maximum number of panes that should ever be visible.\\\\n!\\\\n\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing' stamp: 'cwp 11/16/2004 21:46'!\\\\ncolumns\\\\n\\\\t^columns! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing' stamp: 'cwp 11/16/2004 21:46'!\\\\ncolumns: anObject\\\\n\\\\tcolumns := anObject! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing' stamp: 'cwp 11/16/2004 22:22'!\\\\ncurrentNode\\\\n\\\\t^ self currentColumn ifNotNilDo: [:column | column selectedNode]! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing' stamp: 'cwp 11/16/2004 22:23'!\\\\ncurrentOrRootNode\\\\n\\\\t^(self columns reversed detect: [:ea | ea hasSelection]\\\\n\\\\t\\\\tifNone: [^self columns first parent]) selectedNode! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing' stamp: 'cwp 6/5/2006 23:10'!\\\\nhasSelection\\\\n\\\\t^ false! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing' stamp: 'cwp 11/16/2004 23:51'!\\\\nlabelString\\\\n\\\\t| label |\\\\n\\\\tself columns reversed do: \\\\n\\\\t\\\\t[:ea | \\\\n\\\\t\\\\tlabel := ea selectedNode ifNotNilDo: [:node | node title].\\\\n\\\\t\\\\tlabel ifNotNil: [^ label]].\\\\n\\\\t^ nil\\\\n! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing' stamp: 'cwp 11/16/2004 23:29'!\\\\nmaxPanes\\\\n\\\\t^maxPanes! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing' stamp: 'cwp 11/16/2004 22:54'!\\\\nminPanes\\\\n\\\\t^ minPanes! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing' stamp: 'cwp 2/28/2006 09:59'!\\\\nparentNodeForColumn: aColumn\\\\n\\\\t^ [(columns before: aColumn) selectedNode]\\\\n\\\\t\\\\ton: Error\\\\n\\\\t\\\\tdo: [:err | ^ root]! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing' stamp: 'dvf 9/5/2005 18:08'!\\\\nselectionPath\\\\n\\\\t^(self columns \\\\n\\\\t\\\\tcollect: [:e | e parent] \\\\n\\\\t\\\\tthenSelect: [:e | e notNil]) allButFirst! !\\\\n\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing columns' stamp: 'cwp 9/25/2005 23:58'!\\\\nclearAfter: aColumn \\\\n\\\\t| start |\\\\n\\\\tstart _ (columns indexOf: aColumn) + 1.\\\\n\\\\tstart to: columns size do: [:i | (columns at: i) clear]! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing columns' stamp: 'cwp 2/28/2006 18:12'!\\\\ncolumnAfter: aColumn \\\\n\\\\t^ [self columns after: aColumn]\\\\n\\\\t\\\\ton: Error\\\\n\\\\t\\\\tdo: [:err | nil]\\\\n! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing columns' stamp: 'cwp 2/28/2006 19:07'!\\\\ncolumnBefore: aColumn \\\\n\\\\t^ self columnBefore: aColumn ifAbsent: [nil]\\\\n\\\\n! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing columns' stamp: 'cwp 2/28/2006 19:07'!\\\\ncolumnBefore: aColumn ifAbsent: aBlock\\\\n\\\\t^ [self columns before: aColumn]\\\\n\\\\t\\\\ton: Error\\\\n\\\\t\\\\tdo: [:err | aBlock value]\\\\n\\\\n\\\\n! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing columns' stamp: 'cwp 11/16/2004 22:22'!\\\\ncurrentColumn\\\\n\\\\t^self columns reversed detect: [:ea | ea hasSelection] ifNone: []! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing columns' stamp: 'cwp 11/16/2004 23:01'!\\\\nemptyColumn\\\\n\\\\t^ OBColumn inPanel: self! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing columns' stamp: 'cwp 6/4/2006 00:39'!\\\\npopColumn\\\\n\\\\tself announcer unsubscribe: self columns removeLast.\\\\n! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing columns' stamp: 'cwp 6/4/2006 00:40'!\\\\npushColumn: aColumn \\\\n\\\\tself columns addLast: aColumn.\\\\n\\\\tself changed: #panes.\\\\n! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing columns' stamp: 'cwp 6/8/2006 01:35'!\\\\nselected: aColumn \\\\n\\\\taColumn next ifNotNilDo: \\\\n\\\\t\\\\t[:next | \\\\n\\\\t\\\\tnext parent: aColumn selectedNode].! !\\\\n\\\\n\\\\n!OBColumnPanel methodsFor: 'callbacks' stamp: 'cwp 11/26/2004 21:55'!\\\\ndefaultBackgroundColor\\\\n\\\\t^ browser defaultBackgroundColor! !\\\\n\\\\n!OBColumnPanel methodsFor: 'callbacks' stamp: 'cwp 11/23/2004 00:52'!\\\\nokToReclaimPane\\\\n\\\\tcolumns size > minPanes ifFalse: [^ false].\\\\n\\\\t^ columns last isEmpty or: [(columns at: columns size - 1) shouldBeLast].\\\\n! !\\\\n\\\\n!OBColumnPanel methodsFor: 'callbacks' stamp: 'cwp 11/17/2004 22:48'!\\\\npanes\\\\n\\\\t^ columns collect: [:ea | ea morph]! !\\\\n\\\\n!OBColumnPanel methodsFor: 'callbacks' stamp: 'cwp 9/18/2005 11:49'!\\\\nreclaimPanes\\\\n\\\\t| old |\\\\n\\\\told := columns size.\\\\n\\\\t[self okToReclaimPane] whileTrue: [self popColumn].\\\\n\\\\t^ old - columns size! !\\\\n\\\\n!OBColumnPanel methodsFor: 'callbacks' stamp: 'cwp 11/18/2004 00:00'!\\\\nsizing\\\\n\\\\t^ (columns size max: minPanes) min: maxPanes! !\\\\n\\\\n\\\\n!OBColumnPanel methodsFor: 'constructing' stamp: 'cwp 11/17/2004 23:24'!\\\\nbuildScroller\\\\n\\\\t^ (OBPaneScroller withModel: self)\\\\n\\\\t\\\\tname: 'scroller';\\\\n\\\\t\\\\tyourself! !\\\\n\\\\n!OBColumnPanel methodsFor: 'constructing' stamp: 'cwp 11/20/2004 22:22'!\\\\nmorph\\\\n\\\\t^ (OBPaneScroller withModel: self)\\\\n\\\\t\\\\tname: 'scroller';\\\\n\\\\t\\\\tyourself! !\\\\n\\\\n!OBColumnPanel methodsFor: 'constructing' stamp: 'cwp 11/20/2004 22:26'!\\\\nmorphHeight\\\\n\\\\t^ 0! !\\\\n\\\\n\\\\n!OBColumnPanel methodsFor: 'initializing' stamp: 'cwp 9/24/2005 22:45'!\\\\nsetMetaNode: aMetaNode node: aNode \\\\n\\\\troot _ aNode.\\\\n\\\\troot metaNode: aMetaNode.\\\\n\\\\tself pushColumn: (aMetaNode columnInPanel: self node: root).\\\\n\\\\tminPanes - self columns size \\\\n\\\\t\\\\ttimesRepeat: [self pushColumn: self emptyColumn]! !\\\\n\\\\n!OBColumnPanel methodsFor: 'initializing' stamp: 'cwp 12/5/2004 16:54'!\\\\nsetMinPanes: min maxPanes: max\\\\n\\\\tcolumns _ OrderedCollection new.\\\\n\\\\tminPanes _ min.\\\\n\\\\tmaxPanes _ max! !\\\\n\\\\n\\\\n!OBColumnPanel methodsFor: 'navigating' stamp: 'cwp 6/9/2006 23:18'!\\\\nhopTo: aNode \\\\n\\\\t| column |\\\\n\\\\tcolumn := self columns last.\\\\n\\\\t[column refreshAndSignal: false; includesNode: aNode]\\\\n\\\\t\\\\twhileFalse: [column := self \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcolumnBefore: column \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifAbsent: [^ self jumpTo: aNode]].\\\\n\\\\tcolumn select: aNode! !\\\\n\\\\n!OBColumnPanel methodsFor: 'navigating' stamp: 'cwp 11/16/2004 23:34'!\\\\njumpToRoot\\\\n\\\\t^ self columns first selection: 0! !\\\\n\\\\n!OBColumnPanel methodsFor: 'navigating' stamp: 'cwp 6/10/2006 00:11'!\\\\njumpTo: aNode \\\\n\\\\t| column ancestor |\\\\n\\\\tcolumn := self columns first.\\\\n\\\\t\\\\n\\\\t[ancestor := column selectAncestorOf: aNode.\\\\n\\\\tancestor = aNode or: [ancestor isNil]] whileFalse:\\\\n\\\\t\\\\t[column := self columns after: column].\\\\n\\\\t\\\\n\\\\tself announcer announce: (OBSelectionChanged column: column)! !\\\\n\\\\n!OBColumnPanel methodsFor: 'navigating' stamp: 'cwp 9/24/2005 22:47'!\\\\nroot\\\\n\\\\t^ root! !\\\\n\\\\n\\\\n!OBColumnPanel methodsFor: 'testing' stamp: 'cwp 11/20/2004 21:10'!\\\\nisNavigation\\\\n\\\\t^ true! !\\\\n\\\\n\\\\n!OBColumnPanel methodsFor: 'updating' stamp: 'cwp 6/5/2006 23:52'!\\\\nnodeDeleted: ann\\\\n\\\\tann node = self root \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[self columns first clear.\\\\n\\\\t\\\\t\\\\tself announcer announce: (OBSelectionChanged column: self)]! !\\\\n\\\\n!OBColumnPanel methodsFor: 'updating' stamp: 'cwp 6/4/2006 01:03'!\\\\nselectNode: announcement\\\\n\\\\t^ self hopTo: announcement node! !\\\\n\\\\n!OBColumnPanel methodsFor: 'updating' stamp: 'cwp 6/5/2006 01:33'!\\\\nselectionChanged: ann\\\\n\\\\tann column hasSelection\\\\n\\\\t\\\\tifTrue: [self selected: ann column]\\\\n\\\\t\\\\tifFalse: [self clearAfter: ann column]\\\\n! !\\\\n\\\\n!OBColumnPanel methodsFor: 'updating' stamp: 'cwp 6/5/2006 01:32'!\\\\nsubscribe\\\\n\\\\tself announcer\\\\n\\\\t\\\\tobserve: OBSelectingNode send: #selectNode: to: self;\\\\n\\\\t\\\\tobserve: OBSelectionChanged send: #selectionChanged: to: self;\\\\n\\\\t\\\\tobserve: OBNodeCreated send: #selectNode: to: self;\\\\n\\\\t\\\\tobserve: OBNodeDeleted send: #nodeDeleted: to: self.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBColumnPanel class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBColumnPanel class methodsFor: 'instance creation' stamp: 'cwp 12/5/2004 16:56'!\\\\nminPanes: min maxPanes: max\\\\n\\\\t^ self basicNew setMinPanes: min maxPanes: max! !\\\\n\\\\n!OBColumnPanel class methodsFor: 'instance creation' stamp: 'cwp 12/5/2004 16:56'!\\\\nnew\\\\n\\\\t^ self minPanes: 1 maxPanes: 1! !\\\\nOBInteractionRequest subclass: #OBConfirmationRequest\\\\n\\\\tinstanceVariableNames: 'prompt confirm cancel'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Notifications'!\\\\n!OBConfirmationRequest commentStamp: 'cwp 3/5/2004 12:30' prior: 0!\\\\nThis notification is used to ask the user to confirm some kind potentially dangerous operation. Its default action is to open a PopUpMenu.\\\\n\\\\niVars:\\\\n\\\\nprompt\\\\t\\\\t- a string describing the situation the user is asked to confirm\\\\nconfirm\\\\t\\\\t- a string describing the action that will be taken if the user confirms\\\\ncancel\\\\t\\\\t- a string describing the action that will be taken if the user does not confirm!\\\\n\\\\n\\\\n!OBConfirmationRequest methodsFor: 'initalizing' stamp: 'cwp 2/28/2004 12:00'!\\\\nsetPrompt: promptString confirm: confirmString cancel: cancelString\\\\n\\\\tprompt _ promptString.\\\\n\\\\tconfirm _ confirmString.\\\\n\\\\tcancel _ cancelString! !\\\\n\\\\n\\\\n!OBConfirmationRequest methodsFor: 'responding' stamp: 'cwp 2/28/2004 12:11'!\\\\ncancel\\\\n\\\\tself resume: false! !\\\\n\\\\n!OBConfirmationRequest methodsFor: 'responding' stamp: 'cwp 2/28/2004 12:11'!\\\\nok\\\\n\\\\tself resume: true! !\\\\n\\\\n\\\\n!OBConfirmationRequest methodsFor: 'user interaction' stamp: 'cwp 6/4/2006 14:17'!\\\\ndefaultAction\\\\n\\\\t(prompt beginsWith: 'BogusD') ifTrue: [self halt].\\\\n\\\\t^ PopUpMenu confirm: prompt trueChoice: confirm falseChoice: cancel! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBConfirmationRequest class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBConfirmationRequest class methodsFor: 'as yet unclassified' stamp: 'cwp 2/28/2004 12:09'!\\\\nnewPrompt: prompt confirm: confirm cancel: cancel\\\\n\\\\t^ self new setPrompt: prompt confirm: confirm cancel: cancel! !\\\\n\\\\n!OBConfirmationRequest class methodsFor: 'as yet unclassified' stamp: 'cwp 2/28/2004 12:13'!\\\\nprompt: prompt\\\\n\\\\t^ self prompt: prompt confirm: 'Ok'! !\\\\n\\\\n!OBConfirmationRequest class methodsFor: 'as yet unclassified' stamp: 'cwp 2/28/2004 12:12'!\\\\nprompt: prompt confirm: confirm\\\\n\\\\t^ self prompt: prompt confirm: confirm cancel: 'Cancel'! !\\\\n\\\\n!OBConfirmationRequest class methodsFor: 'as yet unclassified' stamp: 'cwp 2/28/2004 12:02'!\\\\nprompt: prompt confirm: confirm cancel: cancel\\\\n\\\\t^ (self newPrompt: prompt confirm: confirm cancel: cancel) signal! !\\\\nObject subclass: #OBDefinition\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Utilities'!\\\\n!OBDefinition commentStamp: 'cwp 1/7/2005 23:38' prior: 0!\\\\nThe responsibility of a definition is to express a node's composition textually and respond to changes in the text by updating the node it represents. For example,a file browser might use a file definition to allow editing of a files contents.!\\\\n\\\\n\\\\n\\\\n!OBDefinition methodsFor: 'callbacks' stamp: 'cwp 3/22/2004 20:51'!\\\\naccept: aText notifying: aController\\\\n\\\\t^ self text: aText! !\\\\n\\\\n!OBDefinition methodsFor: 'callbacks' stamp: 'cwp 3/23/2004 00:08'!\\\\ndoItContext\\\\n\\\\t^ nil! !\\\\n\\\\n!OBDefinition methodsFor: 'callbacks' stamp: 'cwp 2/28/2005 23:23'!\\\\ndoItReceiver\\\\n\\\\t| class |\\\\n\\\\tclass _ self selectedClass.\\\\n\\\\t^ class\\\\n\\\\t\\\\tifNotNil: [class theNonMetaClass]\\\\n\\\\t\\\\tifNil: [FakeClassPool new]! !\\\\n\\\\n!OBDefinition methodsFor: 'callbacks' stamp: 'cwp 3/23/2004 22:16'!\\\\nselection\\\\n\\\\t^ 1 to: 0! !\\\\n\\\\n!OBDefinition methodsFor: 'callbacks' stamp: 'cwp 3/22/2004 20:52'!\\\\ntext\\\\n\\\\t^ ''! !\\\\n\\\\n!OBDefinition methodsFor: 'callbacks' stamp: 'cwp 3/23/2004 22:16'!\\\\ntextSelection\\\\n\\\\t^ self selection! !\\\\n\\\\n!OBDefinition methodsFor: 'callbacks' stamp: 'cwp 3/22/2004 20:52'!\\\\ntext: aText\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!OBDefinition methodsFor: 'updating' stamp: 'cwp 6/4/2006 18:53'!\\\\nsignalChange\\\\n\\\\tOBAnnouncer current announce: (OBDefinitionChanged definition: self)! !\\\\nOBAnnouncement subclass: #OBDefinitionChanged\\\\n\\\\tinstanceVariableNames: 'definition node'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Announcements'!\\\\n\\\\n!OBDefinitionChanged methodsFor: 'as yet unclassified' stamp: 'cwp 6/4/2006 11:25'!\\\\ndefinition\\\\n\\\\t^ definition! !\\\\n\\\\n!OBDefinitionChanged methodsFor: 'as yet unclassified' stamp: 'cwp 6/4/2006 11:26'!\\\\ndefinition: aDefinition\\\\n\\\\tdefinition _ aDefinition! !\\\\n\\\\n!OBDefinitionChanged methodsFor: 'as yet unclassified' stamp: 'cwp 6/5/2006 00:47'!\\\\nnode\\\\n\\\\t^ node! !\\\\n\\\\n!OBDefinitionChanged methodsFor: 'as yet unclassified' stamp: 'cwp 6/5/2006 00:47'!\\\\nnode: aNode\\\\n\\\\tnode _ aNode! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBDefinitionChanged class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBDefinitionChanged class methodsFor: 'as yet unclassified' stamp: 'cwp 6/4/2006 11:28'!\\\\ndefinition: aDefinition\\\\n\\\\t^ self new\\\\n\\\\t\\\\tdefinition: aDefinition;\\\\n\\\\t\\\\tyourself! !\\\\n\\\\n!OBDefinitionChanged class methodsFor: 'as yet unclassified' stamp: 'cwp 6/4/2006 11:27'!\\\\nnode: aNode definition: aDefinition\\\\n\\\\t^ self new\\\\n\\\\t\\\\tnode: aNode;\\\\n\\\\t\\\\tdefinition: aDefinition;\\\\n\\\\t\\\\tyourself! !\\\\nOBPanel subclass: #OBDefinitionPanel\\\\n\\\\tinstanceVariableNames: 'definition'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Panels'!\\\\n!OBDefinitionPanel commentStamp: 'cwp 1/7/2005 23:35' prior: 0!\\\\nOBDefinition serves as the model for the text pane of a typical browser. It's main responsibility is to act as a relay between a PluggableTextMorph and a Definition supplied by the currently selected node.\\\\n\\\\niVars:\\\\n\\\\nbrowser - The browser of which this panel is a part.\\\\n!\\\\n\\\\n\\\\n!OBDefinitionPanel methodsFor: 'accessing' stamp: 'cwp 9/17/2004 00:56'!\\\\ndefinition: aDefinition\\\\n\\\\tdefinition _ aDefinition.\\\\n\\\\tself changed: #text! !\\\\n\\\\n!OBDefinitionPanel methodsFor: 'accessing' stamp: 'cwp 3/22/2004 20:06'!\\\\ngetDefinition\\\\n\\\\t^ browser currentNode ifNotNilDo: [:node | node definition]! !\\\\n\\\\n!OBDefinitionPanel methodsFor: 'accessing' stamp: 'cwp 3/22/2004 20:41'!\\\\nwithDefinitionDo: workBlock ifNil: nilBlock\\\\n\\\\tdefinition ifNil: [ ^ nilBlock value].\\\\n\\\\t^ workBlock value: definition! !\\\\n\\\\n\\\\n!OBDefinitionPanel methodsFor: 'callbacks' stamp: 'cwp 6/4/2006 00:41'!\\\\naccept: aText notifying: aController\\\\n\\\\t^ self \\\\n\\\\t\\\\twithDefinitionDo: [:def | [def accept: aText notifying: aController]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ton: OBAnnouncerRequest\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:notification | notification resume: self announcer]]\\\\n\\\\t\\\\tifNil: [true]! !\\\\n\\\\n!OBDefinitionPanel methodsFor: 'callbacks' stamp: 'cwp 3/23/2004 00:23'!\\\\ndoItContext\\\\n\\\\t^ self \\\\n\\\\t\\\\twithDefinitionDo: [:def | (def respondsTo: #doItContext) ifTrue: [def doItContext]]\\\\n\\\\t\\\\tifNil: [nil]! !\\\\n\\\\n!OBDefinitionPanel methodsFor: 'callbacks' stamp: 'cwp 3/23/2004 00:23'!\\\\ndoItReceiver\\\\n\\\\t^ self \\\\n\\\\t\\\\twithDefinitionDo: [:def | (def respondsTo: #doItReceiver) ifTrue: [def doItReceiver]]\\\\n\\\\t\\\\tifNil: [nil]! !\\\\n\\\\n!OBDefinitionPanel methodsFor: 'callbacks' stamp: 'cwp 10/24/2004 09:16'!\\\\nmenu: aMenu shifted: aBoolean\\\\n\\\\t| items |\\\\n\\\\titems _  aBoolean \\\\n\\\\t\\\\tifTrue: [self shiftedYellowButtonMenu] \\\\n\\\\t\\\\tifFalse: [self yellowButtonMenu].\\\\n\\\\titems do: [:ea |\\\\n\\\\t\\\\t\\\\t  ea = #-\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [aMenu add: ea first action: ea second]\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [aMenu addLine]].\\\\n\\\\t^ aMenu ! !\\\\n\\\\n!OBDefinitionPanel methodsFor: 'callbacks' stamp: 'cwp 10/24/2004 09:27'!\\\\nperform: aSelector orSendTo: anObject\\\\n\\\\t| receiver |\\\\n\\\\treceiver  _ (self respondsTo: aSelector) ifTrue: [self] ifFalse: [anObject].\\\\n\\\\treceiver perform: aSelector! !\\\\n\\\\n!OBDefinitionPanel methodsFor: 'callbacks' stamp: 'cwp 3/23/2004 00:22'!\\\\nselectedClass\\\\n\\\\t^ self \\\\n\\\\t\\\\twithDefinitionDo: [:def | (def respondsTo: #selectedClass) ifTrue: [def selectedClass]] \\\\n\\\\t\\\\tifNil: [nil]! !\\\\n\\\\n!OBDefinitionPanel methodsFor: 'callbacks' stamp: 'cwp 3/22/2004 21:15'!\\\\nselection\\\\n\\\\t^ self withDefinitionDo: [:def | def textSelection] ifNil: [1 to: 0]! !\\\\n\\\\n!OBDefinitionPanel methodsFor: 'callbacks' stamp: 'cwp 3/22/2004 20:42'!\\\\ntext\\\\n\\\\t^ self withDefinitionDo: [:def | def text] ifNil: ['']! !\\\\n\\\\n\\\\n!OBDefinitionPanel methodsFor: 'constructing' stamp: 'cwp 10/30/2004 22:03'!\\\\nmorph\\\\n\\\\t^ (OBPluggableTextMorph\\\\n\\\\t\\\\ton: self\\\\n\\\\t\\\\ttext: #text\\\\n\\\\t\\\\taccept: #accept:notifying:\\\\n\\\\t\\\\treadSelection: #selection\\\\n\\\\t\\\\tmenu: #menu:shifted:)\\\\n\\\\t\\\\t\\\\tfont: Preferences standardCodeFont;\\\\n\\\\t\\\\t\\\\tyourself\\\\n\\\\t\\\\t\\\\t\\\\n\\\\t\\\\\\\"see CodeHolder>>buildMorphicCodePaneWith:\\\\\\\"! !\\\\n\\\\n!OBDefinitionPanel methodsFor: 'constructing' stamp: 'cwp 3/9/2004 21:35'!\\\\nmorphHeight\\\\n\\\\t^ 0! !\\\\n\\\\n!OBDefinitionPanel methodsFor: 'constructing' stamp: 'cwp 7/14/2006 01:17'!\\\\nshiftedYellowButtonMenu\\\\n\\\\t^ {\\\\n\\\\t\\\\t{'explain' translated.\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t#explain}.\\\\n\\\\t\\\\t#-.\\\\n\\\\t\\\\t{'selectors containing it (W)' translated.\\\\t\\\\t#methodNamesContainingIt}.\\\\n\\\\t\\\\t{'method strings with it (E)' translated.\\\\t\\\\t#methodStringsContainingit}.\\\\n\\\\t\\\\t{'method source with it' translated.\\\\t\\\\t\\\\t#methodSourceContainingIt}.\\\\n\\\\t\\\\t{'class names containing it' translated.\\\\t\\\\t#classNamesContainingIt}.\\\\n\\\\t\\\\t{'class comments with it' translated.\\\\t\\\\t\\\\t#classCommentsContainingIt}.\\\\n\\\\t\\\\t{'change sets with it' translated.\\\\t\\\\t\\\\t\\\\t#browseChangeSetsWithSelector}.\\\\n\\\\t\\\\t#-.\\\\n\\\\t\\\\t{'save contents to file...' translated.\\\\t\\\\t\\\\t#saveContentsInFile}.\\\\n\\\\t\\\\t#-.\\\\n\\\\t\\\\t{'more...' translated.\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t#yellowButtonActivity}.\\\\n\\\\t}\\\\n! !\\\\n\\\\n!OBDefinitionPanel methodsFor: 'constructing' stamp: 'cwp 10/24/2004 23:28'!\\\\nyellowButtonMenu\\\\n\\\\t^ {\\\\n\\\\t\\\\t{'find...(f)' translated.\\\\t\\\\t\\\\t\\\\t#find}.\\\\t\\\\t\\\\t     \\\\n\\\\t\\\\t{'find again (g)' translated.\\\\t\\\\t\\\\t#findAgain}.\\\\t\\\\t     \\\\n\\\\t\\\\t{'set search string (h)' translated.\\\\t#setSearchString}.\\\\n\\\\t\\\\t#-.\\\\t     \\\\n\\\\t\\\\t{'do again (j)' translated.\\\\t\\\\t\\\\t#again}.\\\\t\\\\t     \\\\n\\\\t\\\\t{'undo (z)' translated.\\\\t\\\\t\\\\t\\\\t#undo}.\\\\t\\\\t\\\\t     \\\\n\\\\t\\\\t#-.\\\\t     \\\\n\\\\t\\\\t{'copy (c)' translated.\\\\t\\\\t\\\\t\\\\t#copySelection}.\\\\t     \\\\n\\\\t\\\\t{'cut (x)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#cut}.\\\\t\\\\t\\\\t     \\\\n\\\\t\\\\t{'paste (v)' translated.\\\\t\\\\t\\\\t\\\\t#paste}.\\\\t\\\\t     \\\\n\\\\t\\\\t{'paste...' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#pasteRecent}.\\\\t\\\\t     \\\\n\\\\t\\\\t#-.\\\\t     \\\\n\\\\t\\\\t{'accept (s)' translated.\\\\t\\\\t\\\\t\\\\t#accept}.\\\\t\\\\t     \\\\n\\\\t\\\\t{'cancel (l)' translated.\\\\t\\\\t\\\\t\\\\t#cancel}.\\\\t\\\\t     \\\\n\\\\t\\\\t#-.\\\\t     \\\\n\\\\t\\\\t{'do it (d)' translated.\\\\t\\\\t\\\\t\\\\t#doIt}.\\\\t\\\\t\\\\t     \\\\n\\\\t\\\\t{'print it (p)' translated.\\\\t\\\\t\\\\t\\\\t#printIt}.\\\\t\\\\t     \\\\n\\\\t\\\\t{'inspect it (i)' translated.\\\\t\\\\t\\\\t#inspectIt}.\\\\t\\\\t     \\\\n\\\\t\\\\t{'explore it (I)' translated.\\\\t\\\\t\\\\t#exploreIt}.\\\\t\\\\t     \\\\n\\\\t\\\\t{'debug it' translated.\\\\t\\\\t\\\\t\\\\t#debugIt}.\\\\t\\\\t     \\\\n\\\\t\\\\t#-.\\\\t     \\\\n\\\\t\\\\t{'browse it (b)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#browseIt}.\\\\n\\\\t\\\\t{'senders of it (n)' translated.\\\\t\\\\t\\\\t\\\\t#sendersOfIt}.\\\\n\\\\t\\\\t{'implementors of it (m)' translated.\\\\t\\\\t\\\\t#implementorsOfIt}.\\\\n\\\\t\\\\t{'references to it (N)' translated.\\\\t\\\\t\\\\t\\\\t#referencesToIt}.\\\\n\\\\t\\\\t#-.\\\\n\\\\t\\\\t{'more...' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#shiftedTextPaneMenuRequest}.\\\\n\\\\t}\\\\n! !\\\\n\\\\n\\\\n\\\\n!OBDefinitionPanel methodsFor: 'updating' stamp: 'cwp 4/18/2006 21:31'!\\\\naboutToChange: ann\\\\n\\\\t| ok |\\\\n\\\\tself canDiscardEdits ifTrue: [^ true].\\\\n\\\\tok _ OBConfirmationRequest\\\\n\\\\t\\\\t\\\\tprompt: 'Changes have not been saved.\\\\nIs it OK to discard those changes?'\\\\n\\\\t\\\\t\\\\tconfirm: 'Discard changes'.\\\\n\\\\tok\\\\n\\\\t\\\\tifTrue: [self changed: #clearUserEdits]\\\\n\\\\t\\\\tifFalse: [ann veto]! !\\\\n\\\\n!OBDefinitionPanel methodsFor: 'updating' stamp: 'cwp 6/4/2006 11:31'!\\\\ndefinitionChanged: ann\\\\n\\\\tdefinition _ ann definition.\\\\n\\\\tself changed: #text! !\\\\n\\\\n!OBDefinitionPanel methodsFor: 'updating' stamp: 'cwp 6/3/2006 21:55'!\\\\nrefresh: announcement\\\\n\\\\t| oldDefinition |\\\\n\\\\tdefinition ifNil: [^ self].\\\\n\\\\toldDefinition _ definition.\\\\n\\\\tdefinition _ self getDefinition.\\\\n\\\\tdefinition text = oldDefinition text ifTrue: [^ self].\\\\n\\\\tself canDiscardEdits\\\\n\\\\t\\\\t\\\\tifTrue: [self changed: #text]\\\\n\\\\t\\\\t\\\\tifFalse: [self changed: #codeChangedElsewhere]! !\\\\n\\\\n!OBDefinitionPanel methodsFor: 'updating' stamp: 'cwp 4/24/2006 16:06'!\\\\nselectionChanged: ann\\\\n\\\\tself definition: self getDefinition! !\\\\n\\\\n!OBDefinitionPanel methodsFor: 'updating' stamp: 'cwp 6/4/2006 11:30'!\\\\nsubscribe\\\\n\\\\tself announcer \\\\n\\\\t\\\\tobserve: OBAboutToChange\\\\n\\\\t\\\\tsend: #aboutToChange:\\\\n\\\\t\\\\tto: self;\\\\n\\\\t\\\\t\\\\n\\\\t\\\\tobserve: OBSelectionChanged\\\\n\\\\t\\\\tsend: #selectionChanged:\\\\n\\\\t\\\\tto: self;\\\\n\\\\t\\\\t\\\\n\\\\t\\\\tobserve: OBRefreshRequired\\\\n\\\\t\\\\tsend: #refresh:\\\\n\\\\t\\\\tto: self;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\n\\\\t\\\\tobserve: OBDefinitionChanged\\\\n\\\\t\\\\tsend: #definitionChanged: \\\\n\\\\t\\\\tto: self.! !\\\\n\\\\n\\\\n!OBDefinitionPanel methodsFor: '*ob-standard-cmds' stamp: 'pmm 7/6/2006 20:49'!\\\\nbrowseIt: aSymbol\\\\n\\\\t| entry |\\\\n\\\\tentry := self selectedClass environment at: aSymbol ifAbsent: [nil].\\\\n\\\\tentry ifNil: [^ self implementorsOfIt: aSymbol].\\\\n\\\\t(entry isBehavior or: [entry isTrait ])\\\\n\\\\t\\\\tifFalse: [entry := entry class].\\\\n\\\\tOBSystemBrowser openOnClass: entry.\\\\n\\\\t^ true\\\\n\\\\t! !\\\\n\\\\n!OBDefinitionPanel methodsFor: '*ob-standard-cmds' stamp: 'avi 9/17/2005 01:36'!\\\\nimplementorsOfIt: aSelector \\\\n\\\\tOBImplementorsBrowser browseRoot: (OBSelectorNode on: aSelector).\\\\n\\\\t^true! !\\\\n\\\\n!OBDefinitionPanel methodsFor: '*ob-standard-cmds' stamp: 'avi 9/17/2005 01:36'!\\\\nreferencesToIt: aClassName \\\\n\\\\t| class |\\\\n\\\\tclass := self selectedClass environment at: aClassName ifAbsent: [^false].\\\\n\\\\tclass isBehavior ifFalse: [^false].\\\\n\\\\tOBReferencesBrowser browseRoot: (OBClassNode on: class).\\\\n\\\\t^true! !\\\\n\\\\n!OBDefinitionPanel methodsFor: '*ob-standard-cmds' stamp: 'avi 9/17/2005 01:36'!\\\\nsendersOfIt: aSelector \\\\n\\\\tOBSendersBrowser browseRoot: (OBSelectorNode on: aSelector).\\\\n\\\\t^true! !\\\\nNotification subclass: #OBDispatcherRequest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Notifications'!\\\\nOBCodeNode subclass: #OBEnvironmentNode\\\\n\\\\tinstanceVariableNames: 'environment'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBEnvironmentNode commentStamp: 'cwp 1/8/2005 13:01' prior: 0!\\\\nOBEnvironmentNode wraps an instance of SystemDictionary. In current Squeak images, there is only one such instance, but OB-Standard is coded so as to use rely on this assumption as little as possible. Thus OBEnvironmentNode typically serves as the root of the standard browser, and passes its environment on to other nodes in the tree.!\\\\n\\\\n\\\\n!OBEnvironmentNode methodsFor: 'navigating'!\\\\ncategories\\\\n\\\\t^ environment organization categories collect: [:cat | OBClassCategoryNode \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ton: cat\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinEnvironment: environment]! !\\\\n\\\\n!OBEnvironmentNode methodsFor: 'navigating' stamp: 'cwp 9/20/2005 08:43'!\\\\ncategoryNodeNamed: aString \\\\n\\\\t^ OBClassCategoryNode on: aString! !\\\\n\\\\n\\\\n!OBEnvironmentNode methodsFor: 'accessing'!\\\\nenvironment\\\\n\\\\t^ environment! !\\\\n\\\\n!OBEnvironmentNode methodsFor: 'accessing'!\\\\norganization\\\\n\\\\t^ self environment organization! !\\\\n\\\\n\\\\n!OBEnvironmentNode methodsFor: 'displaying'!\\\\nname \\\\n\\\\t^ 'Squeak'! !\\\\n\\\\n\\\\n!OBEnvironmentNode methodsFor: 'initializing'!\\\\nsetEnvironment: anEnvironment\\\\n\\\\tenvironment := anEnvironment! !\\\\n\\\\n\\\\n!OBEnvironmentNode methodsFor: 'testing' stamp: 'cwp 6/30/2006 00:54'!\\\\nhasOrganization\\\\n\\\\t^ true! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBEnvironmentNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBEnvironmentNode class methodsFor: 'as yet unclassified'!\\\\nforImage\\\\n\\\\t^ self on: Smalltalk! !\\\\n\\\\n!OBEnvironmentNode class methodsFor: 'as yet unclassified'!\\\\non: anEnvironment\\\\n\\\\t^ self new setEnvironment: anEnvironment! !\\\\nObject subclass: #OBFilter\\\\n\\\\tinstanceVariableNames: 'metaNode monitor'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Kernel'!\\\\n!OBFilter commentStamp: 'cwp 3/4/2004 21:53' prior: 0!\\\\nA browser's metagraph defines the way in which the user may traverse the graph of objects which make up the browser's domain. But it's not always desirable to have all the nodes made available by the metagraph to be visible in the browser. An filter provides a strategy for filtering out some of the nodes from the display. \\\\n\\\\nOBFilter provides a \\\\\\\"null\\\\\\\" filter - one that does no filtering at all - and serves as a superclass for other filters. !\\\\n\\\\n\\\\n!OBFilter methodsFor: 'accessing' stamp: 'cwp 2/11/2004 23:48'!\\\\nmetaNode\\\\n\\\\t^ metaNode! !\\\\n\\\\n!OBFilter methodsFor: 'accessing' stamp: 'cwp 2/9/2004 20:56'!\\\\nmonitor: aMonitor\\\\n\\\\tmonitor _ aMonitor! !\\\\n\\\\n\\\\n!OBFilter methodsFor: 'initalizing' stamp: 'cwp 2/9/2004 20:54'!\\\\nsetMetaNode: aMetaNode\\\\n\\\\tmetaNode _ aMetaNode! !\\\\n\\\\n\\\\n!OBFilter methodsFor: 'public' stamp: 'cwp 2/9/2004 20:50'!\\\\nchildren\\\\n\\\\t^ metaNode children! !\\\\n\\\\n!OBFilter methodsFor: 'public' stamp: 'cwp 2/9/2004 20:52'!\\\\nnodesForParent: aNode\\\\n\\\\t^ metaNode nodesForParent: aNode! !\\\\n\\\\n!OBFilter methodsFor: 'public' stamp: 'cwp 2/29/2004 14:34'!\\\\nselectAncestorOf: aNode withParent: parentNode\\\\n\\\\t^ (metaNode nodesForParent: parentNode)\\\\n\\\\t\\\\tdetect: [:child | child isAncestorOf: aNode] \\\\n\\\\t\\\\tifNone: [nil]! !\\\\n\\\\n\\\\n!OBFilter methodsFor: 'queries' stamp: 'cwp 2/9/2004 21:06'!\\\\nwantsButton\\\\n\\\\t^ false! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBFilter class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBFilter class methodsFor: 'as yet unclassified' stamp: 'cwp 2/9/2004 20:54'!\\\\nforMetaNode: aMetaNode\\\\n\\\\t^ self new setMetaNode: aMetaNode! !\\\\nOBPanel subclass: #OBFixedButtonPanel\\\\n\\\\tinstanceVariableNames: 'models actions'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Panels'!\\\\n!OBFixedButtonPanel commentStamp: 'cwp 1/7/2005 23:35' prior: 0!\\\\nOBFixedButtonPanel displays a horizontal row of buttons. In contrast to OBVarButtonPanel, the buttons do not change as nodes are selected in the navigation panel; instead they are enabled and disabled according to whether the actions they represent are applicable to the selected node.!\\\\n\\\\n\\\\n!OBFixedButtonPanel methodsFor: 'accessing' stamp: 'cwp 11/26/2004 22:53'!\\\\nbuttonModels\\\\n\\\\t^ models! !\\\\n\\\\n\\\\n!OBFixedButtonPanel methodsFor: 'callbacks' stamp: 'cwp 11/27/2004 19:20'!\\\\nisEnabled: aModel\\\\n\\\\t^ (actions at: aModel) notNil! !\\\\n\\\\n!OBFixedButtonPanel methodsFor: 'callbacks' stamp: 'cwp 11/27/2004 19:20'!\\\\nisSelected: aModel\\\\n\\\\t^ true! !\\\\n\\\\n!OBFixedButtonPanel methodsFor: 'callbacks' stamp: 'cwp 8/29/2004 11:28'!\\\\npush: aModel\\\\n\\\\t(actions at: aModel) ifNotNilDo: [:action | action trigger]! !\\\\n\\\\n!OBFixedButtonPanel methodsFor: 'callbacks' stamp: 'cwp 6/3/2006 22:15'!\\\\nselectionChanged: ann\\\\n\\\\t| node nodeActions |\\\\n\\\\tnode _ browser currentNode ifNil: [^ self].\\\\n\\\\tnodeActions _ (node metaNode actionsForNode: node) select: [:ea | ea wantsButton].\\\\n\\\\tactions keys do: \\\\n\\\\t\\\\t[:model | \\\\n\\\\t\\\\tactions at: model put: nil.\\\\n\\\\t\\\\tnodeActions do: \\\\n\\\\t\\\\t\\\\t[:action | model label = action buttonLabel ifTrue: [actions at: model put: action]]].\\\\n\\\\tactions keys do: [:ea | ea selectionChanged].! !\\\\n\\\\n!OBFixedButtonPanel methodsFor: 'callbacks' stamp: 'cwp 6/3/2006 22:14'!\\\\nsubscribe\\\\n\\\\tself announcer\\\\n\\\\t\\\\tobserve: OBSelectionChanged\\\\n\\\\t\\\\tsend: #selectionChanged:\\\\n\\\\t\\\\tto: self! !\\\\n\\\\n\\\\n!OBFixedButtonPanel methodsFor: 'constructing' stamp: 'lr 3/23/2006 18:14'!\\\\ncreateMorph\\\\n\\\\t^(RectangleMorph new)\\\\n\\\\t\\\\tlayoutPolicy: TableLayout new;\\\\n\\\\t\\\\tlistDirection: #leftToRight;\\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tvResizing: #spaceFill;\\\\n\\\\t\\\\tborderWidth: 0;\\\\n\\\\t\\\\twrapCentering: #center;\\\\n\\\\t\\\\tcellPositioning: #leftCenter;\\\\n\\\\t\\\\trubberBandCells: true;\\\\n\\\\t\\\\tlayoutInset: 2;\\\\n\\\\t\\\\tcellInset: 2;\\\\n\\\\t\\\\tyourself! !\\\\n\\\\n!OBFixedButtonPanel methodsFor: 'constructing' stamp: 'cwp 11/27/2004 21:24'!\\\\nmorph\\\\n\\\\t| morph |\\\\n\\\\tmorph := self createMorph.\\\\n\\\\tself buttonModels do: [:ea | morph addMorphBack: (self morphForModel: ea)].\\\\n\\\\t^morph! !\\\\n\\\\n!OBFixedButtonPanel methodsFor: 'constructing' stamp: 'cwp 11/27/2004 21:25'!\\\\nmorphForModel: aModel\\\\n\\\\t| morph paneColor |\\\\n\\\\tmorph _ aModel morph.\\\\n\\\\tpaneColor _ browser defaultBackgroundColor.\\\\n\\\\tmorph onColor: paneColor darker offColor: paneColor lighter.\\\\n\\\\t^ morph! !\\\\n\\\\n!OBFixedButtonPanel methodsFor: 'constructing' stamp: 'lr 3/23/2006 18:15'!\\\\nmorphHeight\\\\n\\\\t^ 30! !\\\\n\\\\n\\\\n!OBFixedButtonPanel methodsFor: 'initializing' stamp: 'cwp 11/26/2004 22:53'!\\\\ninitialize\\\\n\\\\tmodels _ OrderedCollection new.\\\\n\\\\tactions _ Dictionary new.! !\\\\n\\\\n\\\\n!OBFixedButtonPanel methodsFor: 'public' stamp: 'cwp 11/26/2004 22:52'!\\\\naddButtonWithLabel: label\\\\n\\\\t| model |\\\\n\\\\tmodel _ OBButtonModel withLabel: label inBar: self.\\\\n\\\\tmodels add: model.\\\\n\\\\tactions at: model put: nil! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBFixedButtonPanel class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBFixedButtonPanel class methodsFor: 'as yet unclassified' stamp: 'cwp 2/28/2006 10:41'!\\\\nnew\\\\n\\\\t^ self basicNew initialize! !\\\\nOBCodeBrowser subclass: #OBHierarchyBrowser\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Browsers'!\\\\n!OBHierarchyBrowser commentStamp: 'cwp 1/7/2005 23:50' prior: 0!\\\\nOBHierarchyBrowser provides a three-pane browers that displays a class within it's surrounding hierarchy - both superclasses and subclasses!\\\\n\\\\n\\\\n!OBHierarchyBrowser methodsFor: 'as yet unclassified' stamp: 'cwp 12/13/2004 00:40'!\\\\ndefaultBackgroundColor\\\\n\\\\t^ Color lightGreen! !\\\\n\\\\n!OBHierarchyBrowser methodsFor: 'as yet unclassified' stamp: 'cwp 12/13/2004 01:00'!\\\\ndefaultLabel\\\\n\\\\t^ self root name, ' Hierarchy'! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBHierarchyBrowser class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBHierarchyBrowser class methodsFor: 'configuration' stamp: 'avi 9/17/2005 01:06'!\\\\ndefaultMetaNode\\\\n\\\\t^ self \\\\n\\\\t\\\\taddTo: (OBMetaNode named: 'RootClass')\\\\n\\\\t\\\\tclass: #classHierarchy \\\\n\\\\t\\\\tcomment: #commentHierarchy \\\\n\\\\t\\\\tmetaclass: #metaclassHierarchy.\\\\n! !\\\\n\\\\n!OBHierarchyBrowser class methodsFor: 'configuration' stamp: 'cwp 12/13/2004 00:37'!\\\\npaneCount\\\\n\\\\t^ 3! !\\\\n\\\\n!OBHierarchyBrowser class methodsFor: 'configuration' stamp: 'cwp 12/13/2004 01:00'!\\\\ntitleForRoot: aNode\\\\n\\\\t^ aNode name, ' Hierarchy'! !\\\\n\\\\n\\\\n!OBHierarchyBrowser class methodsFor: 'instance creation' stamp: 'lr 3/6/2006 19:28'!\\\\nonClass: aClass \\\\n\\\\t^self root: aClass asNode selection: aClass asNode! !\\\\n\\\\n\\\\n!OBHierarchyBrowser class methodsFor: 'opening' stamp: 'cwp 12/15/2004 22:49'!\\\\nopenOnClass: aClass\\\\n\\\\t^ (self onClass: aClass) open! !\\\\nOBListBrowser subclass: #OBImplementorsBrowser\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Browsers'!\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBImplementorsBrowser class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBImplementorsBrowser class methodsFor: 'as yet unclassified' stamp: 'cwp 3/2/2006 15:35'!\\\\nchaseImplementorsNav: navSelector\\\\n\\\\t| message implementor |\\\\n\\\\tmessage := OBMetaNode named: 'Message'.\\\\n\\\\timplementor := OBMetaNode named: 'Implementor'.\\\\n\\\\timplementor\\\\n\\\\t\\\\tdisplaySelector: #indentedFullName;\\\\n\\\\t\\\\tchildAt: #messages put: message;\\\\n\\\\t\\\\taddActor: OBNodeActor new.\\\\n\\\\tmessage\\\\n\\\\t\\\\tchildAt: navSelector labeled: 'implementors' put: implementor;\\\\n\\\\t\\\\taddActor: OBNodeActor new.\\\\n\\\\t^ implementor! !\\\\n\\\\n!OBImplementorsBrowser class methodsFor: 'as yet unclassified' stamp: 'avi 9/17/2005 01:24'!\\\\ndefaultMetaNode\\\\n\\\\t^ self hierarchicalImplementors! !\\\\n\\\\n!OBImplementorsBrowser class methodsFor: 'as yet unclassified' stamp: 'avi 9/17/2005 01:24'!\\\\nhierarchicalImplementors\\\\n\\\\t^ self implementorsNav: #implementorsHierarchically! !\\\\n\\\\n!OBImplementorsBrowser class methodsFor: 'as yet unclassified' stamp: 'avi 9/17/2005 01:24'!\\\\nimplementorsNav: navSelector\\\\n\\\\t| selector implementors |\\\\n\\\\tselector := OBMetaNode named: 'Selector'.\\\\n\\\\timplementors := OBMetaNode named: 'Implementors'.\\\\n\\\\t\\\\n\\\\tselector \\\\n\\\\t\\\\tchildAt: navSelector labeled: 'list' put: implementors;\\\\n\\\\t\\\\tchildAt: navSelector labeled: 'chase' put: (self chaseImplementorsNav: navSelector);\\\\n\\\\t\\\\tfilterClass: OBModalFilter.\\\\n\\\\timplementors \\\\n\\\\t\\\\tdisplaySelector: #indentedFullName;\\\\n\\\\t\\\\taddActor: OBNodeActor new.\\\\n\\\\n\\\\t^ selector! !\\\\n\\\\n!OBImplementorsBrowser class methodsFor: 'as yet unclassified' stamp: 'avi 9/17/2005 01:36'!\\\\ntitle\\\\n\\\\t^ 'Implementors of'! !\\\\nOBActor subclass: #OBImplementorsViewActor\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Services'!\\\\n\\\\n!OBImplementorsViewActor methodsFor: 'as yet unclassified' stamp: 'cwp 7/14/2006 14:28'!\\\\nactionsForParent: aNode\\\\n\\\\t^{OBAction\\\\n\\\\t\\\\t\\\\tlabel: 'add implementor' \\\\n\\\\t\\\\t\\\\treceiver: self\\\\n\\\\t\\\\t\\\\tselector: #addImplementor:\\\\n\\\\t\\\\t\\\\targuments: {aNode}\\\\n\\\\t\\\\t\\\\tkeystroke: $a\\\\n\\\\t\\\\t\\\\ticon: self newIcon}! !\\\\n\\\\n!OBImplementorsViewActor methodsFor: 'as yet unclassified' stamp: 'dvf 9/12/2005 16:34'!\\\\naddImplementor: aNode \\\\n\\\\t| class sel |\\\\n\\\\tsel := aNode selector.\\\\n\\\\tclass := self getClassForNewImplementationOf: sel.\\\\n\\\\tclass ifNil: [^self].\\\\n\\\\t(class selectors includes: sel) \\\\n\\\\t\\\\tifTrue: [^self inform: class name , ' already implements #' , sel].\\\\n\\\\tclass compile: aNode selector , '\\\\n\\\\tself shouldBeImplemented'.\\\\n\\\\t(OBMethodNode on: sel inClass: class) signalSelection! !\\\\n\\\\n!OBImplementorsViewActor methodsFor: 'as yet unclassified' stamp: 'dvf 9/12/2005 16:14'!\\\\ngetClassForNewImplementationOf: sel \\\\n\\\\t| className |\\\\n\\\\tclassName := (OBTextRequest \\\\n\\\\t\\\\t\\\\t\\\\tprompt: 'Please type class name in which to implement ' , sel\\\\n\\\\t\\\\t\\\\t\\\\ttemplate: '') ifNil: [''].\\\\n\\\\t^(Smalltalk classNamed: className withBlanksTrimmed) ifNil: \\\\n\\\\t\\\\t\\\\t[self inform: 'Class ' , className , ' not found'.\\\\n\\\\t\\\\t\\\\tnil]! !\\\\nOBCodeBrowser subclass: #OBInheritanceBrowser\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Browsers'!\\\\n!OBInheritanceBrowser commentStamp: 'cwp 1/7/2005 23:51' prior: 0!\\\\nOBInheritanceBrowser shows the inheritance hierarchy of a method, both superclass implementations which it overrides, and subclass implementations which override it.!\\\\n\\\\n\\\\n!OBInheritanceBrowser methodsFor: 'morphic' stamp: 'avi 11/29/2004 21:52'!\\\\ndefaultBackgroundColor\\\\n\\\\t^ Color lightGreen! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBInheritanceBrowser class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBInheritanceBrowser class methodsFor: 'configuration' stamp: 'avi 9/17/2005 01:08'!\\\\ndefaultMetaNode\\\\n\\\\t| method root |\\\\n\\\\tmethod := OBMetaNode named: 'Method'.\\\\n\\\\troot := OBMetaNode named: 'Root'.\\\\n\\\\troot\\\\n\\\\t\\\\tchildAt: #children put: method.\\\\n\\\\tmethod\\\\n\\\\t\\\\tdisplaySelector: #fullName;\\\\n\\\\t\\\\tchildAt: #overrides put: method;\\\\n\\\\t\\\\taddActor: OBNodeActor new.\\\\n\\\\t^ root! !\\\\n\\\\n!OBInheritanceBrowser class methodsFor: 'configuration'!\\\\ntitle\\\\n\\\\t^ 'Inheritance'! !\\\\n\\\\n!OBInheritanceBrowser class methodsFor: 'configuration' stamp: 'cwp 11/25/2004 22:05'!\\\\ntitleForRoot: aCollectionNode\\\\n\\\\t^ 'Inheritance of ', aCollectionNode children first selector printString! !\\\\nOBVariableNode subclass: #OBInstanceVariableNode\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBInstanceVariableNode commentStamp: 'cwp 1/8/2005 12:50' prior: 0!\\\\nOBClassVariable provides a method for finding methods which refer to an instance, ie, by searching for instance variable access bytecodes rather than for an association in the literal frame.!\\\\n\\\\n\\\\n!OBInstanceVariableNode methodsFor: 'navigating' stamp: 'cwp 12/8/2004 23:48'!\\\\naccessors\\\\n\\\\t| accessors |\\\\n\\\\taccessors := OrderedCollection new.\\\\n\\\\tself theClass withAllSubAndSuperclassesDo: [:class |\\\\n\\\\t\\\\t(class whichSelectorsAccess: name) asSortedCollection\\\\n\\\\t\\\\t\\\\tdo: [:ea | ea = #DoIt ifFalse: [accessors add: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(self referenceForMethod: ea ofClass: class name)]]].\\\\n\\\\t^ accessors asArray\\\\tcollect: [:ref | OBMethodNode on: ref]! !\\\\nNotification subclass: #OBInteractionRequest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Notifications'!\\\\n!OBInteractionRequest commentStamp: 'cwp 12/7/2004 00:13' prior: 0!\\\\nOBInteractionRequest is an abstract superclass for notifications that request some interaction with the user. It's useful for catching such notifications in an exception handler, while allowing other notifications to operate normally.!\\\\n\\\\n\\\\n!OBInteractionRequest methodsFor: 'as yet unclassified' stamp: 'cwp 10/17/2004 19:31'!\\\\nisBrowseRequest\\\\n\\\\t^ false! !\\\\nOBCodeBrowser subclass: #OBListBrowser\\\\n\\\\tinstanceVariableNames: 'labelPrefix'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Browsers'!\\\\n!OBListBrowser commentStamp: 'cwp 1/7/2005 23:53' prior: 0!\\\\nOBListBrowsers are used to display simple lists of methods, such as senders or implementors.!\\\\n\\\\n\\\\n!OBListBrowser methodsFor: 'morphic' stamp: 'avi 11/29/2004 21:58'!\\\\ndefaultBackgroundColor\\\\n\\\\t^ Color lightBlue! !\\\\n\\\\n\\\\n!OBListBrowser methodsFor: 'accessing' stamp: 'cwp 11/25/2004 22:21'!\\\\ndefaultLabel\\\\n\\\\t^ self labelPrefix, ' ', self root name printString! !\\\\n\\\\n!OBListBrowser methodsFor: 'accessing' stamp: 'cwp 11/25/2004 22:18'!\\\\nlabelPrefix\\\\n\\\\t^ labelPrefix ifNil: [labelPrefix _ self root metaNode edges first label capitalized, ' of']! !\\\\n\\\\n!OBListBrowser methodsFor: 'accessing' stamp: 'cwp 10/17/2004 20:54'!\\\\nlabelPrefix: aString\\\\n\\\\tlabelPrefix _ aString! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBListBrowser class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBListBrowser class methodsFor: 'opening' stamp: 'avi 9/17/2005 01:34'!\\\\nbrowseRoot: aNode\\\\n\\\\tself browseRoot: aNode title: self title! !\\\\n\\\\n!OBListBrowser class methodsFor: 'opening' stamp: 'avi 9/17/2005 01:21'!\\\\nbrowseRoot: aNode title: aString \\\\n\\\\t(self metaNode: self defaultMetaNode root: aNode selection: nil)\\\\n\\\\t\\\\tlabelPrefix: aString;\\\\n\\\\t\\\\topen\\\\n\\\\t! !\\\\n\\\\n\\\\n!OBListBrowser class methodsFor: 'configuration' stamp: 'cwp 12/5/2004 17:54'!\\\\nmaxPanes\\\\n\\\\t^ 2! !\\\\n\\\\n!OBListBrowser class methodsFor: 'configuration' stamp: 'cwp 12/5/2004 17:54'!\\\\nminPanes\\\\n\\\\t^ 1! !\\\\nOBMethodNode subclass: #OBMessageNode\\\\n\\\\tinstanceVariableNames: 'message'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBMessageNode commentStamp: 'cwp 1/8/2005 12:40' prior: 0!\\\\nAn OBMessageNode refers to a message send in the source code of a method. They are typically used in the 'senders' browser.!\\\\n\\\\n\\\\n!OBMessageNode methodsFor: 'navigating'!\\\\nimplementors\\\\n\\\\t^ self implementorsOf: message! !\\\\n\\\\n!OBMessageNode methodsFor: 'navigating'!\\\\nsendersOfMessage\\\\n\\\\t^ self sendersOf: message! !\\\\n\\\\n\\\\n!OBMessageNode methodsFor: 'displaying' stamp: 'cwp 12/8/2004 21:26'!\\\\nname\\\\n\\\\t^ message! !\\\\n\\\\n\\\\n!OBMessageNode methodsFor: 'accessing'!\\\\nselection\\\\n\\\\t| methodNode assoc |\\\\n\\\\tmethodNode := Parser new \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tparse: self source\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tclass: self theClass.\\\\n\\\\tassoc := (methodNode encoder rawSourceRanges) \\\\n\\\\t\\\\t\\\\tassociations detect: [:ea | ea key isMessage: message receiver: nil arguments: nil]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifNone: [nil -> (1 to: 0)].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Some messages are generated by the compiler.\\\\\\\"\\\\n\\\\t^ assoc value! !\\\\n\\\\n\\\\n!OBMessageNode methodsFor: 'initializing'!\\\\nsetMessage: aSelector selector: aSelector2 class: aClass\\\\n\\\\tmessage := aSelector.\\\\n\\\\tselector := aSelector2.\\\\n\\\\tself theClass: aClass! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBMessageNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBMessageNode class methodsFor: 'instance creation'!\\\\nfromMethodNode: aMethodNode\\\\n\\\\t^ self new \\\\n\\\\t\\\\tsetMessage: aMethodNode selector\\\\n\\\\t\\\\tselector: aMethodNode selector\\\\n\\\\t\\\\tclass: aMethodNode theClass! !\\\\n\\\\n!OBMessageNode class methodsFor: 'instance creation'!\\\\non: aSelector inMethodNode: aNode\\\\n\\\\t^ self \\\\n\\\\t\\\\ton: aSelector \\\\n\\\\t\\\\tinMethod: aNode selector \\\\n\\\\t\\\\tinClass: aNode theClass! !\\\\n\\\\n!OBMessageNode class methodsFor: 'instance creation' stamp: 'cwp 12/8/2004 23:46'!\\\\non: aSelector inMethodReference: ref\\\\n\\\\t^ self \\\\n\\\\t\\\\ton: aSelector \\\\n\\\\t\\\\tinMethod: ref methodSymbol\\\\n\\\\t\\\\tinClass: ref actualClass! !\\\\n\\\\n!OBMessageNode class methodsFor: 'instance creation'!\\\\non: aSelector inMethod: aSelector2 inClass: classRef\\\\n\\\\t^ self new setMessage: aSelector selector: aSelector2 class: classRef! !\\\\nObject subclass: #OBMetaEdge\\\\n\\\\tinstanceVariableNames: 'label selector metaNode'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Kernel'!\\\\n!OBMetaEdge commentStamp: 'cwp 1/7/2005 23:20' prior: 0!\\\\nAn OBMetaEdge is an edge in the browser's metagraph. It represents a message sent to a node to obtain further nodes. It is refered to by the \\\\\\\"parent\\\\\\\" metanode, and refers to the \\\\\\\"child\\\\\\\" metanode.\\\\n\\\\niVars:\\\\n\\\\nlabel \\\\t\\\\t-  a string describing the metaNode, for filters which allow the user \\\\n\\\\t\\\\t\\\\t   to choose which edges to follow\\\\nselector\\\\t- when a node is selected by the user, this message will be \\\\n\\\\t\\\\t\\\\t  sent to it to obtain its children\\\\nmetaNode \\\\t- a MetaNode corresponding to the nodes answered by the above message\\\\n\\\\t\\\\t!\\\\n\\\\n\\\\n!OBMetaEdge methodsFor: 'accessing' stamp: 'cwp 2/7/2004 22:40'!\\\\nlabel\\\\n\\\\t^ label! !\\\\n\\\\n!OBMetaEdge methodsFor: 'accessing' stamp: 'cwp 2/7/2004 22:40'!\\\\nmetaNode\\\\n\\\\t^ metaNode! !\\\\n\\\\n!OBMetaEdge methodsFor: 'accessing' stamp: 'cwp 3/3/2004 00:12'!\\\\nnodesForParent: aNode\\\\n\\\\t^ (aNode perform: selector) do: [:ea | ea metaNode: metaNode]\\\\n! !\\\\n\\\\n!OBMetaEdge methodsFor: 'accessing' stamp: 'cwp 2/7/2004 22:40'!\\\\nselector\\\\n\\\\t^ selector! !\\\\n\\\\n\\\\n!OBMetaEdge methodsFor: 'initializing' stamp: 'cwp 2/7/2004 22:36'!\\\\nsetLabel: aString selector: aSelector metaNode: aMetaNode\\\\n\\\\tlabel _ aString.\\\\n\\\\tselector _ aSelector.\\\\n\\\\tmetaNode _ aMetaNode! !\\\\n\\\\n\\\\n!OBMetaEdge methodsFor: 'printing' stamp: 'dvf 8/16/2005 10:03'!\\\\nprintOn: aStream\\\\n\\\\taStream nextPutAll: selector printString, '->'. \\\\n\\\\tmetaNode shortPrintOn: aStream.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBMetaEdge class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBMetaEdge class methodsFor: 'as yet unclassified' stamp: 'cwp 2/7/2004 22:35'!\\\\nlabel: aString selector: aSelector metaNode: aMetaNode\\\\n\\\\t^ self new setLabel: aString selector: aSelector metaNode: aMetaNode! !\\\\n\\\\n!OBMetaEdge class methodsFor: 'as yet unclassified' stamp: 'cwp 2/9/2004 22:32'!\\\\nselector: aSelector metaNode: aMetaNode\\\\n\\\\t^ self new setLabel: aSelector asString selector: aSelector metaNode: aMetaNode! !\\\\nObject subclass: #OBMetaNode\\\\n\\\\tinstanceVariableNames: 'name filterClass columnClass edges actors displaySelector'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Kernel'!\\\\n!OBMetaNode commentStamp: 'cwp 1/7/2005 23:23' prior: 0!\\\\nA MetaNode represents a hypothetical node in the browser's domain graph.\\\\n\\\\niVars:\\\\n\\\\nfilterClass\\\\t\\\\t\\\\t- the class used to filter this hypothetical node's children\\\\ncolumnClass\\\\t\\\\t- the class of column used to display this node's children\\\\nedges\\\\t\\\\t\\\\t\\\\t- messages that could be sent to the node to obtain children\\\\nactors\\\\t\\\\t\\\\t\\\\t- providers of functionality for manipulating the node\\\\ndisplaySelector\\\\t\\\\t- the message used to retreive a nodes display name!\\\\n\\\\n\\\\n!OBMetaNode methodsFor: 'accessing' stamp: 'cwp 12/8/2004 21:41'!\\\\ndisplaySelector\\\\n\\\\t^ displaySelector ifNil: [displaySelector _ #name]! !\\\\n\\\\n!OBMetaNode methodsFor: 'accessing' stamp: 'cwp 12/8/2004 21:42'!\\\\ndisplaySelector: aSelector\\\\n\\\\tdisplaySelector _ aSelector! !\\\\n\\\\n!OBMetaNode methodsFor: 'accessing' stamp: 'cwp 3/6/2004 21:54'!\\\\nname\\\\n\\\\t^ name ifNil: ['MetaNode']! !\\\\n\\\\n!OBMetaNode methodsFor: 'accessing' stamp: 'cwp 3/6/2004 21:05'!\\\\nname: aString\\\\n\\\\tname _ aString! !\\\\n\\\\n\\\\n!OBMetaNode methodsFor: 'actors' stamp: 'cwp 9/14/2004 18:59'!\\\\nactionSetsForNode: aNode\\\\n\\\\t^ actors collect: [:actor | actor actionsForNode: aNode]! !\\\\n\\\\n!OBMetaNode methodsFor: 'actors' stamp: 'cwp 9/14/2004 19:01'!\\\\nactionSetsForParent: aNode\\\\n\\\\t^ actors collect: [:actor | actor actionsForParent: aNode]! !\\\\n\\\\n!OBMetaNode methodsFor: 'actors' stamp: 'cwp 9/14/2004 19:00'!\\\\nactionsForNode: aNode\\\\n\\\\t^ (self actionSetsForNode: aNode) gather: [:ea | ea]! !\\\\n\\\\n!OBMetaNode methodsFor: 'actors' stamp: 'cwp 9/14/2004 19:02'!\\\\nactionsForParent: aNode\\\\n\\\\t^ (self actionSetsForParent: aNode) gather: [:ea | ea]! !\\\\n\\\\n!OBMetaNode methodsFor: 'actors' stamp: 'cwp 3/3/2004 22:48'!\\\\naddActor: anActor\\\\n\\\\tactors add: anActor.! !\\\\n\\\\n\\\\n!OBMetaNode methodsFor: 'children' stamp: 'cwp 2/9/2004 20:28'!\\\\nchildAt: aSelector labeled: aString put: aMetaNode\\\\n\\\\tedges add: (OBMetaEdge label: aString selector: aSelector metaNode: aMetaNode)! !\\\\n\\\\n!OBMetaNode methodsFor: 'children' stamp: 'cwp 2/7/2004 22:35'!\\\\nchildAt: aSelector put: aMetaNode\\\\n\\\\tedges add: (OBMetaEdge selector: aSelector metaNode: aMetaNode)! !\\\\n\\\\n!OBMetaNode methodsFor: 'children' stamp: 'cwp 2/7/2004 22:44'!\\\\nchildren\\\\n\\\\t^ edges collect: [:edge | edge metaNode]! !\\\\n\\\\n!OBMetaNode methodsFor: 'children' stamp: 'cwp 2/7/2004 22:38'!\\\\nhasChildren\\\\n\\\\t^ edges isEmpty not! !\\\\n\\\\n\\\\n!OBMetaNode methodsFor: 'columns' stamp: 'avi 3/4/2004 03:11'!\\\\ncolumnClass: aClass\\\\n\\\\tcolumnClass _ aClass! !\\\\n\\\\n!OBMetaNode methodsFor: 'columns' stamp: 'cwp 11/16/2004 22:03'!\\\\ncolumnInPanel: aBrowser node: aNode\\\\n\\\\tcolumnClass ifNil: [columnClass _ OBColumn].\\\\n\\\\t^ columnClass\\\\n\\\\t\\\\tinPanel: aBrowser\\\\n\\\\t\\\\tmetaNode: self\\\\n\\\\t\\\\tnode: aNode! !\\\\n\\\\n\\\\n!OBMetaNode methodsFor: 'filtering' stamp: 'cwp 2/9/2004 21:26'!\\\\nfilter\\\\n\\\\tfilterClass ifNil: [filterClass _ OBFilter].\\\\n\\\\t^ filterClass forMetaNode: self! !\\\\n\\\\n!OBMetaNode methodsFor: 'filtering' stamp: 'cwp 2/9/2004 21:02'!\\\\nfilterClass: aClass\\\\n\\\\tfilterClass _ aClass! !\\\\n\\\\n!OBMetaNode methodsFor: 'filtering' stamp: 'cwp 2/9/2004 21:00'!\\\\nmetaNode\\\\n\\\\t^ self! !\\\\n\\\\n\\\\n!OBMetaNode methodsFor: 'initializing' stamp: 'cwp 12/8/2004 20:06'!\\\\ninitialize\\\\n\\\\tedges _ OrderedCollection new.\\\\n\\\\tactors _ OrderedCollection new.! !\\\\n\\\\n\\\\n!OBMetaNode methodsFor: 'metagraph' stamp: 'cwp 2/9/2004 21:12'!\\\\nedges\\\\n\\\\t^ edges! !\\\\n\\\\n\\\\n!OBMetaNode methodsFor: 'nodes' stamp: 'cwp 3/3/2004 00:22'!\\\\nnodesForParent: aNode\\\\n\\\\t^ edges gather: [:edge | edge nodesForParent: aNode]! !\\\\n\\\\n\\\\n!OBMetaNode methodsFor: 'printing' stamp: 'dvf 8/16/2005 10:01'!\\\\nprintOn: aStream\\\\n\\\\taStream nextPutAll: self name;cr.\\\\n\\\\tedges do: [:e | e printOn: aStream. aStream cr].! !\\\\n\\\\n!OBMetaNode methodsFor: 'printing' stamp: 'dvf 8/16/2005 10:01'!\\\\nshortPrintOn: aStream\\\\n\\\\taStream nextPutAll: self name.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBMetaNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBMetaNode class methodsFor: 'instance creation' stamp: 'cwp 3/6/2004 21:06'!\\\\nnamed: aString\\\\n\\\\t^ self new name: aString! !\\\\n\\\\n!OBMetaNode class methodsFor: 'instance creation' stamp: 'cwp 3/3/2004 23:08'!\\\\nnew\\\\n\\\\t^ self basicNew initialize! !\\\\nOBClassNode subclass: #OBMetaclassNode\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBMetaclassNode commentStamp: 'cwp 1/8/2005 11:29' prior: 0!\\\\nOBMetaclassNode is essentially the same as an OBClassNode, but overrides a few methods to work properly with metaclasses.!\\\\n\\\\n\\\\n!OBMetaclassNode methodsFor: 'actions' stamp: 'cwp 12/15/2004 21:57'!\\\\nbrowse\\\\n\\\\t^ OBSystemBrowser openOnClass: self theNonMetaClass ! !\\\\n\\\\n\\\\n!OBMetaclassNode methodsFor: 'displaying' stamp: 'cwp 12/13/2004 00:56'!\\\\nname \\\\n\\\\t^ self nonMetaName! !\\\\n\\\\n!OBMetaclassNode methodsFor: 'displaying'!\\\\nnonMetaName\\\\n\\\\t^ self theNonMetaClass name! !\\\\n\\\\n\\\\n!OBMetaclassNode methodsFor: 'initializing'!\\\\nsetClass: aClass\\\\n\\\\tsuper setClass: aClass theMetaClass\\\\n\\\\t\\\\t! !\\\\nOBClassAwareNode subclass: #OBMethodCategoryNode\\\\n\\\\tinstanceVariableNames: 'name'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBMethodCategoryNode commentStamp: 'cwp 1/8/2005 12:29' prior: 0!\\\\nOBMethodCategory represents a category within a ClassOrganization. Instead of an organization definition, OBMethodCategory presents a MethodDefinition with the class' default method template.!\\\\n\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'actions' stamp: 'cwp 12/15/2004 23:04'!\\\\nactions\\\\n\\\\t^ {\\\\n\\\\t\\\\tself action: #fileOut withLabel: 'file out'.\\\\n\\\\t\\\\tself browseAction.\\\\n\\\\t\\\\tself browseHierarchyAction.\\\\n\\\\t\\\\tself action: #chaseVars buttonLabel: 'variables' menuLabel: 'chase variables'\\\\n\\\\t}\\\\n! !\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'actions' stamp: 'cwp 12/15/2004 21:50'!\\\\nbrowse\\\\n\\\\tOBSystemBrowser openOnClass: self theClass category: name! !\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'actions'!\\\\nfileOut\\\\n\\\\tself theClass fileOutCategory: name! !\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'actions' stamp: 'cwp 9/19/2004 00:11'!\\\\nremove\\\\n\\\\tself theClass removeCategory: name.\\\\n\\\\tself signalDeletion! !\\\\n\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'ancestry'!\\\\nancestrySelector\\\\n\\\\t^ #isDescendantOfMethodCat:! !\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'ancestry'!\\\\nisDescendantOfMethodCat: other\\\\n\\\\t^ (other theClassName = self theClassName) and: [other name = name]! !\\\\n\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'accessing'!\\\\ncategory\\\\n\\\\t^ name! !\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'accessing'!\\\\ncontainer\\\\n\\\\t^ self theClass! !\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'accessing' stamp: 'cwp 9/14/2005 09:06'!\\\\nmethodReferences\\\\n\\\\t^ (self theClass organization listAtCategoryNamed: name)\\\\n\\\\t\\\\tcollect: [:ea | MethodReference new\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsetClassSymbol: self theNonMetaClassName\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tclassIsMeta: self theClass isMeta\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmethodSymbol: ea\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstringVersion: '']\\\\n! !\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'accessing' stamp: 'dvf 8/16/2005 17:47'!\\\\nprintOn: aStream\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream nextPut: $<.\\\\n\\\\tself name printOn: aStream.\\\\n\\\\taStream nextPut: $>.! !\\\\n\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'public'!\\\\ndefinition\\\\n\\\\t^ OBMethodDefinition inCategory: self category inClass: self theClass! !\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'public'!\\\\nname\\\\n\\\\t^ name! !\\\\n\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'drag and drop' stamp: 'lr 4/6/2006 11:46'!\\\\ndropOnClass: aNode\\\\n\\\\tself methods do: [ :each | each dropOnClass: aNode ].\\\\n\\\\taNode signalChildrenChanged.\\\\n\\\\t^ true! !\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'drag and drop'!\\\\ndropSelector\\\\n\\\\t^ #dropOnMethodCategory:! !\\\\n\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'comparing' stamp: 'cwp 12/20/2004 00:53'!\\\\nhash\\\\n\\\\t^ self name hash! !\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'comparing' stamp: 'cwp 12/20/2004 00:50'!\\\\n= other\\\\n\\\\tself species = other species ifFalse: [^ false].\\\\t\\\\n\\\\tself theClass = other theClass ifFalse: [^ false].\\\\n\\\\t^ self name = other name! !\\\\n\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'navigating' stamp: 'dvf 8/19/2005 17:16'!\\\\nmethods\\\\n\\\\t^ self methodReferences collect: [:ref | ref asNode]! !\\\\n\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'initializing'!\\\\nsetName: aString class: aClass\\\\n\\\\tname := aString.\\\\n\\\\tself theClass: aClass! !\\\\n\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'testing' stamp: 'cwp 6/30/2006 00:48'!\\\\nhasOrganization\\\\n\\\\t^ true! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBMethodCategoryNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBMethodCategoryNode class methodsFor: 'actions' stamp: 'cwp 9/18/2004 22:58'!\\\\nactionsForParent: aNode\\\\n\\\\t^ #()! !\\\\n\\\\n\\\\n!OBMethodCategoryNode class methodsFor: 'instance creation'!\\\\non: aString inClass: aClassReference\\\\n\\\\t^ self new setName: aString class: aClassReference! !\\\\nOBDefinition subclass: #OBMethodDefinition\\\\n\\\\tinstanceVariableNames: 'theClass category source selection callback'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Definitions'!\\\\n!OBMethodDefinition commentStamp: 'cwp 1/8/2005 13:20' prior: 0!\\\\nOBMethodDefinition knows how to present method source in the browser's text pane and compile a new CompiledMethod when the source changes. It implements several safety checks to ensure that methods are not accidentally overwritten.!\\\\n\\\\n\\\\n!OBMethodDefinition methodsFor: 'callbacks' stamp: 'cwp 9/18/2005 14:53'!\\\\naccept: aText notifying: aController\\\\n\\\\t| newSelector |\\\\n\\\\tnewSelector := self compileMethod: aText notifying: aController.\\\\n\\\\tnewSelector ifNil: [^ false].\\\\n\\\\t(self nodeFor: newSelector) demandSelection.\\\\n\\\\t^ true! !\\\\n\\\\n!OBMethodDefinition methodsFor: 'callbacks' stamp: 'cwp 10/17/2004 23:16'!\\\\nredefineSource: aText selector: newSelector\\\\n\\\\tnewSelector = self selector \\\\n\\\\t\\\\tifTrue: [source := aText]\\\\n\\\\t\\\\tifFalse: [(self methodNodeFor: newSelector) signalSelection].\\\\n! !\\\\n\\\\n!OBMethodDefinition methodsFor: 'callbacks'!\\\\nselectedClass\\\\n\\\\t^ self theClass! !\\\\n\\\\n!OBMethodDefinition methodsFor: 'callbacks'!\\\\nselection\\\\n\\\\t^ selection ifNil: [1 to: (source ifNil: [self text size] ifNotNil: [0])]! !\\\\n\\\\n!OBMethodDefinition methodsFor: 'callbacks' stamp: 'cwp 11/29/2004 21:21'!\\\\ntext\\\\n\\\\t^ source \\\\n\\\\t\\\\tifNotNil: [source asText makeSelectorBold]\\\\n\\\\t\\\\tifNil: [self theClass sourceCodeTemplate]! !\\\\n\\\\n\\\\n!OBMethodDefinition methodsFor: 'accessing' stamp: 'cwp 10/17/2004 23:36'!\\\\ncallback: aBlockContext \\\\n\\\\tcallback _ aBlockContext! !\\\\n\\\\n!OBMethodDefinition methodsFor: 'accessing'!\\\\ncategory\\\\n\\\\t^ category ifNil: [category := self theClass whichCategoryIncludesSelector: self selector]! !\\\\n\\\\n!OBMethodDefinition methodsFor: 'accessing'!\\\\nselector\\\\n\\\\t^ source ifNotNil: [Parser new parseSelector: source]! !\\\\n\\\\n!OBMethodDefinition methodsFor: 'accessing'!\\\\ntheClass\\\\n\\\\t^ theClass! !\\\\n\\\\n\\\\n!OBMethodDefinition methodsFor: 'compiling'!\\\\ncompileMethod: aText notifying: aController\\\\n\\\\t^ (self confirmMethod: aText)\\\\n\\\\t\\\\tifTrue: [self theClass \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcompile: aText \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tclassified: self category \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnotifying: aController]\\\\n\\\\t\\\\tifFalse: [nil]! !\\\\n\\\\n!OBMethodDefinition methodsFor: 'compiling' stamp: 'cwp 10/17/2004 23:33'!\\\\nnodeFor: aSelector\\\\n\\\\t^ callback value: aSelector! !\\\\n\\\\n\\\\n!OBMethodDefinition methodsFor: 'confirming' stamp: 'cwp 10/17/2004 22:42'!\\\\nconfirmMethod: aText\\\\n\\\\t| sel |\\\\n\\\\tsel _ Parser new parseSelector: aText.\\\\n\\\\t^ (self theClass isMeta \\\\n\\\\t\\\\t\\\\tand: [(self selectorAlreadyDefined: sel) not] \\\\n\\\\t\\\\t\\\\tand: [Metaclass isScarySelector: sel])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self confirmScarySelector: sel]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [^ true]! !\\\\n\\\\n!OBMethodDefinition methodsFor: 'confirming'!\\\\nconfirmScarySelector: aSelector\\\\n\\\\t| prompt |\\\\n\\\\tprompt := aSelector, ' is used in the existing class system.\\\\nOverriding it could cause serious problems.\\\\nIs this really what you want to do?'.\\\\n\\\\n\\\\t^ OBConfirmationRequest\\\\n\\\\t\\\\tprompt: prompt\\\\n\\\\t\\\\tconfirm: 'Override'! !\\\\n\\\\n!OBMethodDefinition methodsFor: 'confirming'!\\\\nselectorAlreadyDefined: aSelector\\\\n\\\\t^ self theClass selectors includes: aSelector! !\\\\n\\\\n\\\\n!OBMethodDefinition methodsFor: 'initializing' stamp: 'cwp 10/17/2004 23:33'!\\\\nsetClass: aClass category: aString source: aText selection: anInterval\\\\n\\\\ttheClass := aClass.\\\\n\\\\tcategory := aString.\\\\n\\\\tsource := aText.\\\\n\\\\tselection := anInterval.\\\\n\\\\tcallback := [:sel | OBMethodNode on: sel inClass: theClass]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBMethodDefinition class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBMethodDefinition class methodsFor: 'instance creation' stamp: 'cwp 10/17/2004 23:07'!\\\\ninCategory: aString inClass: aClass\\\\n\\\\t^ self \\\\n\\\\t\\\\tselection: nil\\\\n\\\\t\\\\tsource: nil\\\\n\\\\t\\\\tinCategory: aString\\\\n\\\\t\\\\tinClass: aClass! !\\\\n\\\\n!OBMethodDefinition class methodsFor: 'instance creation' stamp: 'cwp 10/17/2004 23:07'!\\\\nselection: anInterval source: aText inCategory: aCategory inClass: aClass\\\\n\\\\t^ self new\\\\n\\\\t\\\\tsetClass: aClass\\\\n\\\\t\\\\tcategory: aCategory\\\\n\\\\t\\\\tsource: aText\\\\n\\\\t\\\\tselection: anInterval! !\\\\n\\\\n!OBMethodDefinition class methodsFor: 'instance creation' stamp: 'cwp 10/17/2004 23:07'!\\\\nselection: anInterval source: aText inClass: aClass\\\\n\\\\t^ self \\\\n\\\\t\\\\tselection: anInterval\\\\n\\\\t\\\\tsource: aText\\\\n\\\\t\\\\tinCategory: nil\\\\n\\\\t\\\\tinClass: aClass\\\\t! !\\\\n\\\\n!OBMethodDefinition class methodsFor: 'instance creation' stamp: 'cwp 10/17/2004 23:03'!\\\\nsource: aText inClass: aClass\\\\n\\\\t^ self \\\\n\\\\t\\\\tselection: nil\\\\n\\\\t\\\\tsource: aText\\\\n\\\\t\\\\tinCategory: nil\\\\n\\\\t\\\\tinClass: aClass! !\\\\nOBClassAwareNode subclass: #OBMethodNode\\\\n\\\\tinstanceVariableNames: 'selector'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBMethodNode commentStamp: 'cwp 1/8/2005 12:37' prior: 0!\\\\nOBMethodNode wraps a method in a particular class. It supplies an OBMethodDefinition for displaying and editing the source code of the method, and various actions for manipulating the method. It has two roles: first it appears in the right most pane of a standard system browser. Second, it often serves as the root node for an OBListBrowser, and has navigation methods for senders, implementors etc.\\\\n\\\\nOBMethodNode also serves as the superclass for nodes that represent *parts* of a method, such as sends of a particular message, references to a class, accesses to a instance variable, etc.!\\\\n\\\\n\\\\n!OBMethodNode methodsFor: 'actions' stamp: 'cwp 7/12/2006 15:36'!\\\\nactions\\\\n\\\\t^{ \\\\n\\\\t\\\\tself action: #fileOut withLabel: 'file out'.\\\\n\\\\t\\\\tself browseAction.\\\\n\\\\t\\\\tself browseHierarchyAction.\\\\n\\\\t\\\\tself \\\\n\\\\t\\\\t\\\\taction: #browseSenders\\\\n\\\\t\\\\t\\\\twithMenuLabel: 'senders'\\\\n\\\\t\\\\t\\\\twithButtonLabel: 'senders'\\\\n\\\\t\\\\t\\\\twithKeystroke: $n\\\\n\\\\t\\\\t\\\\twithIcon: (MenuIcons tryIcons: #(findIcon smallFindIcon)).\\\\n\\\\t\\\\tself \\\\n\\\\t\\\\t\\\\taction: #browseImplementors\\\\n\\\\t\\\\t\\\\twithMenuLabel: 'implementors'\\\\n\\\\t\\\\t\\\\twithButtonLabel: 'implementors'\\\\n\\\\t\\\\t\\\\twithKeystroke: $m\\\\n\\\\t\\\\t\\\\twithIcon: (MenuIcons tryIcons: #(findIcon smallFindIcon)).\\\\n\\\\t\\\\tself \\\\n\\\\t\\\\t\\\\taction: #browseVersions\\\\n\\\\t\\\\t\\\\tbuttonLabel: 'versions'\\\\n\\\\t\\\\t\\\\tmenuLabel: 'versions'.\\\\n\\\\t\\\\tself \\\\n\\\\t\\\\t\\\\taction: #browseInheritance\\\\n\\\\t\\\\t\\\\tbuttonLabel: 'inheritance'\\\\n\\\\t\\\\t\\\\tmenuLabel: 'inheritance'.\\\\n\\\\t\\\\tself \\\\n\\\\t\\\\t\\\\taction: #chaseVars\\\\n\\\\t\\\\t\\\\tbuttonLabel: 'variables'\\\\n\\\\t\\\\t\\\\tmenuLabel: 'chase variables'.\\\\n\\\\t\\\\tself \\\\n\\\\t\\\\t\\\\taction: #remove\\\\n\\\\t\\\\t\\\\twithLabel: 'remove'\\\\n\\\\t\\\\t\\\\twithKeystroke: $x\\\\n\\\\t\\\\t\\\\twithIcon: (MenuIcons tryIcons: #(deleteIcon smallDeleteIcon)).\\\\n\\\\t\\\\tself moveToPackageAction\\\\n\\\\t}\\\\n! !\\\\n\\\\n!OBMethodNode methodsFor: 'actions' stamp: 'cwp 12/5/2004 18:35'!\\\\nbrowse\\\\n\\\\tOBSystemBrowser openOnClass: self theClass selector: selector! !\\\\n\\\\n!OBMethodNode methodsFor: 'actions' stamp: 'avi 9/17/2005 01:29'!\\\\nbrowseClass: aClass\\\\n\\\\taClass browseRoot: self copy! !\\\\n\\\\n!OBMethodNode methodsFor: 'actions' stamp: 'avi 9/17/2005 01:28'!\\\\nbrowseImplementors\\\\n\\\\tself browseClass: OBImplementorsBrowser! !\\\\n\\\\n!OBMethodNode methodsFor: 'actions' stamp: 'cwp 12/5/2004 18:03'!\\\\nbrowseInheritance\\\\n\\\\tOBInheritanceBrowser openRoot: self inheritanceRoot selection: self! !\\\\n\\\\n!OBMethodNode methodsFor: 'actions' stamp: 'avi 9/17/2005 01:28'!\\\\nbrowseSenders\\\\n\\\\tself browseClass: OBSendersBrowser! !\\\\n\\\\n!OBMethodNode methodsFor: 'actions' stamp: 'cwp 12/5/2004 15:42'!\\\\nbrowseVersions\\\\n\\\\tOBVersionBrowser openOn: self copy! !\\\\n\\\\n!OBMethodNode methodsFor: 'actions'!\\\\nfileOut\\\\n\\\\tself theClass fileOutMethod: selector! !\\\\n\\\\n!OBMethodNode methodsFor: 'actions' stamp: 'cwp 7/11/2006 02:43'!\\\\nmoveToPackage\\\\n\\\\t| packagesNames selection packages |\\\\n\\\\tpackages := PackageOrganizer default packages \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tasSortedCollection: [:a :b | a packageName <= b packageName].\\\\n\\\\tpackagesNames := packages collect: [:ea | ea packageName].\\\\n\\\\tselection := OBChoiceRequest prompt: nil labels: packagesNames values: packages.\\\\n\\\\tselection ifNotNil: [selection addMethod: self reference].! !\\\\n\\\\n!OBMethodNode methodsFor: 'actions' stamp: 'cwp 7/12/2006 15:37'!\\\\nmoveToPackageAction\\\\n\\\\t^ self \\\\n\\\\t\\\\taction: #moveToPackage\\\\n\\\\t\\\\twithMenuLabel: 'move to package...'\\\\n\\\\t\\\\twithButtonLabel: 'move method'\\\\n\\\\t\\\\twithKeystroke: $p\\\\n\\\\t\\\\twithIcon: (MenuIcons tryIcons: #(windowIcon smallWindowIcon)).\\\\n! !\\\\n\\\\n!OBMethodNode methodsFor: 'actions' stamp: 'cwp 10/18/2004 00:30'!\\\\nremove\\\\n\\\\t| senders choice |\\\\n\\\\tsenders _ SystemNavigation default allCallsOn: self selector.\\\\n\\\\tsenders isEmpty ifTrue: [^ self doRemove].\\\\n\\\\tchoice _ OBChoiceRequest\\\\n\\\\t\\\\t\\\\t\\\\tprompt: 'This message has ', senders size asString, ' senders.'\\\\n\\\\t\\\\t\\\\t\\\\tlabels: #('Remove it' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Remove, then browse senders' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Don''t remove, but show me those senders' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Forget it -- do nothing -- sorry I asked')\\\\n\\\\t\\\\t\\\\t\\\\tvalues: #(doRemove removeAndBrowse simpleBrowseSenders nil).\\\\n\\\\tchoice ifNotNil: [^ self perform: choice]\\\\n! !\\\\n\\\\n!OBMethodNode methodsFor: 'actions'!\\\\nselectMessage\\\\n\\\\t| messages sel |\\\\n\\\\tmessages := self messageSelectors copyWithFirst: selector.\\\\n\\\\tsel := (OBChoiceRequest labels: messages).\\\\n\\\\t^ sel ifNotNil: [OBMessageNode on: sel inMethodNode: self]! !\\\\n\\\\n!OBMethodNode methodsFor: 'actions' stamp: 'cwp 12/1/2004 00:36'!\\\\nsource\\\\n\\\\t^ (self theClass sourceCodeAt: self selector ifAbsent: [^ '']) \\\\n\\\\t\\\\tasText makeSelectorBold! !\\\\n\\\\n\\\\n!OBMethodNode methodsFor: 'private'!\\\\naddOverridersOf: aSelector inClass: aClass to: aCollection\\\\n\\\\taClass subclasses do: \\\\n\\\\t\\\\t[:ea | (ea includesSelector: aSelector)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [aCollection add: ea]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [self addOverridersOf: aSelector inClass: ea to: aCollection]]! !\\\\n\\\\n!OBMethodNode methodsFor: 'private' stamp: 'cwp 10/18/2004 00:29'!\\\\ndoRemove\\\\n\\\\tself theClass removeSelector: self selector.\\\\n\\\\tself signalDeletion! !\\\\n\\\\n!OBMethodNode methodsFor: 'private' stamp: 'cwp 12/8/2004 23:48'!\\\\nimplementorsOf: aSelector\\\\n\\\\t^ (SystemNavigation default allImplementorsOf: aSelector) asSortedArray\\\\n\\\\t\\\\t\\\\tcollect: [:ref | OBMethodNode on: ref]! !\\\\n\\\\n!OBMethodNode methodsFor: 'private' stamp: 'cwp 12/8/2004 23:49'!\\\\ninheritanceRoot\\\\n\\\\t| rootClass |\\\\n\\\\trootClass := (self theClass withAllSuperclasses asArray\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tselect: [:ea | ea includesSelector: self selector]) last.\\\\n\\\\t^ OBCollectionNode on: {OBMethodNode \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ton: self selector \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinClass: rootClass}! !\\\\n\\\\n!OBMethodNode methodsFor: 'private'!\\\\nmessageSelectors\\\\n\\\\t^ ((self theClass compiledMethodAt: self selector ifAbsent: [^ #()]) messages) asSortedArray! !\\\\n\\\\n!OBMethodNode methodsFor: 'private'!\\\\nremoveAndBrowse\\\\n\\\\tself simpleBrowseSenders.\\\\n\\\\tself theClass removeSelector: self selector.\\\\n\\\\tself signalDeletion! !\\\\n\\\\n!OBMethodNode methodsFor: 'private'!\\\\nsendersOf: aSelector\\\\n\\\\t^ (SystemNavigation default allCallsOn: aSelector) asSortedArray\\\\n\\\\t\\\\t\\\\tcollect: [:ref | OBMessageNode on: aSelector inMethodReference: ref]! !\\\\n\\\\n!OBMethodNode methodsFor: 'private' stamp: 'avi 9/17/2005 01:29'!\\\\nsimpleBrowseSenders\\\\n\\\\tOBSendersBrowser browseRoot: self! !\\\\n\\\\n!OBMethodNode methodsFor: 'private'!\\\\nsourcePointer\\\\n\\\\t^ (self theClass compiledMethodAt: self selector) sourcePointer! !\\\\n\\\\n\\\\n!OBMethodNode methodsFor: 'ancestry'!\\\\nancestrySelector\\\\n\\\\t^ #isDescendantOfMethod: ! !\\\\n\\\\n!OBMethodNode methodsFor: 'ancestry' stamp: 'cwp 12/2/2004 23:28'!\\\\nisDescendantOfMethodCat: aMethodCatNode\\\\n\\\\t^ (self theClass organization categoryOfElement: self selector) = aMethodCatNode name! !\\\\n\\\\n!OBMethodNode methodsFor: 'ancestry' stamp: 'cwp 10/17/2004 23:55'!\\\\nisDescendantOfMethodVersion: anOBMethodVersionNode \\\\n\\\\t^ false! !\\\\n\\\\n!OBMethodNode methodsFor: 'ancestry' stamp: 'cwp 11/28/2004 10:37'!\\\\nisDescendantOfMethod: other\\\\n\\\\t^ other selector = selector\\\\n\\\\t\\\\tand: [self theClass withAllSuperclasses includes: other theClass].\\\\n\\\\t! !\\\\n\\\\n\\\\n!OBMethodNode methodsFor: 'accessing' stamp: 'cwp 12/1/2004 00:36'!\\\\ndefinition\\\\n\\\\t^ OBMethodDefinition\\\\n\\\\t\\\\tselection: self selection\\\\n\\\\t\\\\tsource: self source\\\\n\\\\t\\\\tinClass: self theClass! !\\\\n\\\\n!OBMethodNode methodsFor: 'accessing'!\\\\nreference\\\\n\\\\t^ self referenceForMethod: selector ofClass: self theClassName! !\\\\n\\\\n!OBMethodNode methodsFor: 'accessing' stamp: 'cwp 12/1/2004 00:37'!\\\\nselection\\\\n\\\\t^ 1 to: 0! !\\\\n\\\\n!OBMethodNode methodsFor: 'accessing'!\\\\nselector\\\\n\\\\t^ selector! !\\\\n\\\\n!OBMethodNode methodsFor: 'accessing'!\\\\nsourceFiles\\\\n\\\\t^ OBSourceFilesRequest signal! !\\\\n\\\\n\\\\n!OBMethodNode methodsFor: 'drag and drop' stamp: 'lr 4/18/2006 08:55'!\\\\ndropOnClass: aNode\\\\n\\\\taNode theClass \\\\n\\\\t\\\\tcompile: self source\\\\n\\\\t\\\\tclassified: (self theClass organization \\\\n\\\\t\\\\t\\\\tcategoryOfElement: self selector).\\\\n\\\\tInputSensor default shiftPressed\\\\n\\\\t\\\\tifFalse: [ self theClass removeSelector: self selector ].\\\\n\\\\taNode signalChildrenChanged.\\\\n\\\\t^ true! !\\\\n\\\\n!OBMethodNode methodsFor: 'drag and drop' stamp: 'cwp 9/18/2005 19:01'!\\\\ndropOnMethodCategory: aNode\\\\n\\\\n\\\\t\\\\\\\"We don't support dropping on another class yet.\\\\\\\"\\\\n\\\\taNode theClass = self theClass ifFalse: [^ false].\\\\n\\\\t\\\\n\\\\tself theClass organization classify: self selector under: aNode name.\\\\n\\\\taNode signalChildrenChanged.\\\\n\\\\t\\\\n\\\\t^ true! !\\\\n\\\\n\\\\n!OBMethodNode methodsFor: 'displaying' stamp: 'lr 3/29/2006 12:08'!\\\\ndisplayString\\\\n\\\\t^ (self theClass respondsTo: #includesLocalSelector:) \\\\n\\\\t\\\\tifFalse: [ super displayString ]\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t(self theClass includesLocalSelector: selector)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [ super displayString  ]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsuper displayString asText \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taddAttribute: TextEmphasis italic ] ]! !\\\\n\\\\n!OBMethodNode methodsFor: 'displaying' stamp: 'cwp 12/8/2004 21:08'!\\\\nfullName\\\\n\\\\t^ self theClassName, '>>', selector! !\\\\n\\\\n!OBMethodNode methodsFor: 'displaying' stamp: 'cwp 12/20/2004 23:13'!\\\\nindentedFullName\\\\n\\\\t^ self indent, self fullName! !\\\\n\\\\n!OBMethodNode methodsFor: 'displaying' stamp: 'cwp 12/8/2004 21:08'!\\\\nname\\\\n\\\\t^ selector! !\\\\n\\\\n\\\\n!OBMethodNode methodsFor: 'comparing' stamp: 'cwp 12/8/2004 22:07'!\\\\nhash\\\\n\\\\t^ theClass hash bitXor: selector hash! !\\\\n\\\\n!OBMethodNode methodsFor: 'comparing' stamp: 'cwp 12/8/2004 22:07'!\\\\n= other\\\\n\\\\t^ (self species = other species)\\\\n\\\\t\\\\tand: [self theClass = other theClass] \\\\n\\\\t\\\\tand: [self selector = other selector]! !\\\\n\\\\n\\\\n!OBMethodNode methodsFor: 'navigating' stamp: 'cwp 1/2/2005 23:12'!\\\\nimplementors\\\\n\\\\t^ self implementorsOf: selector! !\\\\n\\\\n!OBMethodNode methodsFor: 'navigating' stamp: 'cwp 1/7/2005 22:35'!\\\\nimplementorsHierarchically\\\\n\\\\t^ OBClassAwareNode sortHierarchically: self implementors! !\\\\n\\\\n!OBMethodNode methodsFor: 'navigating'!\\\\nmessages\\\\n\\\\t^ (((self theClass\\\\n\\\\t\\\\t\\\\t\\\\tcompiledMethodAt: self selector \\\\n\\\\t\\\\t\\\\t\\\\tifAbsent: [^ #()]) messages) asSortedArray)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcollect: [:sel | OBMessageNode \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ton: sel \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinMethod: selector \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinClass: self theClass]! !\\\\n\\\\n!OBMethodNode methodsFor: 'navigating' stamp: 'cwp 12/8/2004 23:49'!\\\\noverrides\\\\n\\\\t| classes |\\\\n\\\\tclasses := OrderedCollection new.\\\\n\\\\tself addOverridersOf: self selector inClass: self theClass to: classes.\\\\n\\\\t^ classes collect: [:ea | OBMethodNode on: selector inClass: ea] ! !\\\\n\\\\n!OBMethodNode methodsFor: 'navigating'!\\\\nselectorAndMessages\\\\n\\\\t^ self messages copyWithFirst: self messageNode! !\\\\n\\\\n!OBMethodNode methodsFor: 'navigating'!\\\\nsenders\\\\n\\\\t^ self sendersOf: selector! !\\\\n\\\\n!OBMethodNode methodsFor: 'navigating'!\\\\nversions\\\\n\\\\t^ (OBMethodVersion scan: self sourceFiles from: self sourcePointer)\\\\n\\\\t\\\\tcollect: [:ea | OBMethodVersionNode on: ea]! !\\\\n\\\\n\\\\n!OBMethodNode methodsFor: 'nodes'!\\\\nmessageNode\\\\n\\\\t^ OBMessageNode fromMethodNode: self! !\\\\n\\\\n\\\\n!OBMethodNode methodsFor: 'printing' stamp: 'cwp 12/8/2004 21:59'!\\\\nprintOn: aStream\\\\n\\\\taStream\\\\n\\\\t\\\\tnextPutAll: self class name;\\\\n\\\\t\\\\tnextPut: $<;\\\\n\\\\t\\\\tnextPutAll: self theClass name;\\\\n\\\\t\\\\tnextPut: $#;\\\\n\\\\t\\\\tnextPutAll: self selector;\\\\n\\\\t\\\\tnextPut: $>! !\\\\n\\\\n\\\\n!OBMethodNode methodsFor: 'initializing'!\\\\nsetReference: aMethodReference\\\\n\\\\tself \\\\n\\\\t\\\\tsetSelector: aMethodReference methodSymbol\\\\n\\\\t\\\\tclass: (aMethodReference actualClass)! !\\\\n\\\\n!OBMethodNode methodsFor: 'initializing'!\\\\nsetSelector: aSelector class: aClass\\\\n\\\\tselector := aSelector.\\\\n\\\\tself theClass: aClass\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBMethodNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBMethodNode class methodsFor: 'instance creation'!\\\\non: aMethodReference\\\\n\\\\t^ self new setReference: aMethodReference! !\\\\n\\\\n!OBMethodNode class methodsFor: 'instance creation'!\\\\non: aSelector inClass: aClassReference\\\\n\\\\t^ self new setSelector: aSelector class: aClassReference! !\\\\nObject subclass: #OBMethodVersion\\\\n\\\\tinstanceVariableNames: 'sources pointer classRef className category stamp prior selector'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Utilities'!\\\\n!OBMethodVersion commentStamp: 'cwp 1/8/2005 13:25' prior: 0!\\\\nOBMethodVerison represents a version of a method found in the .sources or .changes files. It provides methods for parsing the method definition referenced by a source pointer, and for filing in the source to replace the current version of the method.!\\\\n\\\\n\\\\n!OBMethodVersion methodsFor: 'accessing'!\\\\ncategory\\\\n\\\\t^ category! !\\\\n\\\\n!OBMethodVersion methodsFor: 'accessing'!\\\\nclassSymbol\\\\n\\\\t^ classRef name! !\\\\n\\\\n!OBMethodVersion methodsFor: 'accessing' stamp: 'cwp 10/17/2004 23:51'!\\\\nlatest\\\\n\\\\t^ self class \\\\n\\\\t\\\\t\\\\tfromSources: sources \\\\n\\\\t\\\\t\\\\tandPointer: (classRef theClass compiledMethodAt: selector) sourcePointer! !\\\\n\\\\n!OBMethodVersion methodsFor: 'accessing' stamp: 'cwp 10/17/2004 23:42'!\\\\npointer\\\\n\\\\t^ pointer! !\\\\n\\\\n!OBMethodVersion methodsFor: 'accessing'!\\\\nselector\\\\n\\\\t^ selector ifNil: [self setSelector]! !\\\\n\\\\n!OBMethodVersion methodsFor: 'accessing'!\\\\nsource\\\\n\\\\t| file |\\\\n\\\\tfile := sources at: (sources fileIndexFromSourcePointer: pointer).\\\\n\\\\tfile position: (sources filePositionFromSourcePointer: pointer).\\\\n\\\\t^ file nextChunk asText makeSelectorBold! !\\\\n\\\\n!OBMethodVersion methodsFor: 'accessing'!\\\\nstamp\\\\n\\\\t^ stamp! !\\\\n\\\\n!OBMethodVersion methodsFor: 'accessing'!\\\\ntheClass\\\\n\\\\t^ classRef theClass! !\\\\n\\\\n!OBMethodVersion methodsFor: 'accessing'!\\\\ntheClassName\\\\n\\\\t^ classRef name! !\\\\n\\\\n\\\\n!OBMethodVersion methodsFor: 'compiling'!\\\\nfileIn\\\\n\\\\t(self theClass) ifNotNilDo: [:class | class\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t \\\\t\\\\t\\\\t\\\\tcompile: self source \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tclassified: self category \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twithStamp: self stamp \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnotifying: nil]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t! !\\\\n\\\\n\\\\n!OBMethodVersion methodsFor: 'comparing' stamp: 'cwp 10/17/2004 23:45'!\\\\nhash\\\\n\\\\t^ pointer hash! !\\\\n\\\\n!OBMethodVersion methodsFor: 'comparing' stamp: 'cwp 10/17/2004 23:45'!\\\\n= other\\\\n\\\\t^ self species = other species and: [self pointer = other pointer]! !\\\\n\\\\n\\\\n!OBMethodVersion methodsFor: 'initializing' stamp: 'cwp 11/6/2004 23:14'!\\\\nparseChunk: aString\\\\n\\\\t| tokens |\\\\n\\\\ttokens := Scanner new scanTokens: aString.\\\\n\\\\tclassRef := OBClassReference named: tokens first.\\\\n\\\\ttokens second = #class\\\\n\\\\t\\\\tifTrue: [classRef beMeta.\\\\n\\\\t\\\\t\\\\t\\\\tcategory := tokens fourth.\\\\n\\\\t\\\\t\\\\t\\\\tstamp := tokens sixth]\\\\n\\\\t\\\\tifFalse: [category := tokens third.\\\\n\\\\t\\\\t\\\\t\\\\ttokens size > 3 ifTrue: [stamp := tokens fifth]].\\\\n\\\\ttokens size > 6 ifTrue: [prior := tokens last].! !\\\\n\\\\n!OBMethodVersion methodsFor: 'initializing'!\\\\nparseSource\\\\n\\\\t| file position chunk |\\\\n\\\\tfile := sources at: (sources fileIndexFromSourcePointer: pointer).\\\\n\\\\tposition := sources filePositionFromSourcePointer: pointer.\\\\n\\\\tposition > file size ifTrue: [self error: 'Invalid source pointer'].\\\\n\\\\t\\\\n\\\\tfile position: (0 max: position-150).  \\\\t\\\\\\\"Skip back to before the preamble\\\\\\\"\\\\n\\\\t\\\\t[file position < (position-1)]  \\\\t\\\\\\\"then pick it up from the front\\\\\\\"\\\\n\\\\t\\\\t\\\\twhileTrue: [chunk := file nextChunk].\\\\n\\\\t\\\\n\\\\tself parseChunk: chunk.! !\\\\n\\\\n!OBMethodVersion methodsFor: 'initializing'!\\\\nprevious\\\\n\\\\t^ prior ifNotNil: [self class fromSources: sources andPointer: prior]! !\\\\n\\\\n!OBMethodVersion methodsFor: 'initializing'!\\\\nsetSelector\\\\n\\\\t| file |\\\\n\\\\tfile := sources at: (sources fileIndexFromSourcePointer: pointer).\\\\n\\\\tfile position: (sources filePositionFromSourcePointer: pointer).\\\\n\\\\t^ selector := Parser new parseSelector: file nextChunk.! !\\\\n\\\\n!OBMethodVersion methodsFor: 'initializing'!\\\\nsetSources: aSourceFileArray pointer: aSourcePointer\\\\n\\\\tsources := aSourceFileArray.\\\\n\\\\tpointer := aSourcePointer.\\\\n\\\\tself parseSource.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBMethodVersion class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBMethodVersion class methodsFor: 'instance creation'!\\\\nfromSources: sources andPointer: pointer\\\\n\\\\t^ self new setSources: sources pointer: pointer! !\\\\n\\\\n\\\\n!OBMethodVersion class methodsFor: 'scanning'!\\\\nscan: sources from: pointer \\\\n\\\\t| versions current |\\\\n\\\\t\\\\n\\\\tversions := OrderedCollection new.\\\\n\\\\tcurrent := OBMethodVersion fromSources: sources andPointer: pointer.\\\\n\\\\t[current notNil]\\\\n\\\\t\\\\twhileTrue: [versions add: current.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcurrent := current previous].\\\\n\\\\t^ versions! !\\\\n\\\\n!OBMethodVersion class methodsFor: 'scanning'!\\\\nversionsOfMethod: methodReference \\\\n\\\\t| class selector |\\\\n\\\\tclass := methodReference actualClass.\\\\n\\\\tselector := methodReference methodSymbol.\\\\n\\\\t^ self scan: SourceFiles from: (class compiledMethodAt: selector) sourcePointer! !\\\\nOBClassAwareNode subclass: #OBMethodVersionNode\\\\n\\\\tinstanceVariableNames: 'version'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBMethodVersionNode commentStamp: 'cwp 1/8/2005 12:41' prior: 0!\\\\nOBMethodVersions refer to OBMethodVersions, and are used by the VersionBrowser.!\\\\n\\\\n\\\\n!OBMethodVersionNode methodsFor: 'actions' stamp: 'cwp 12/15/2004 22:38'!\\\\nactions\\\\n\\\\t^ {\\\\n\\\\t\\\\tself browseAction.\\\\n\\\\t  \\\\tself action: #revert buttonLabel: 'revert' menuLabel: 'revert to selected version'\\\\n\\\\t}! !\\\\n\\\\n!OBMethodVersionNode methodsFor: 'actions' stamp: 'cwp 12/15/2004 21:51'!\\\\nbrowse\\\\n\\\\tOBSystemBrowser openOnClass: self theClass selector: version selector! !\\\\n\\\\n!OBMethodVersionNode methodsFor: 'actions'!\\\\nrevert\\\\n\\\\tversion fileIn! !\\\\n\\\\n\\\\n!OBMethodVersionNode methodsFor: 'ancestry' stamp: 'cwp 10/17/2004 23:41'!\\\\nancestrySelector\\\\n\\\\t^ #isDescendantOfMethodVersion:! !\\\\n\\\\n!OBMethodVersionNode methodsFor: 'ancestry' stamp: 'cwp 10/17/2004 23:43'!\\\\nisDescendantOfMethodVersion: aNode\\\\n\\\\t^ (version = aNode version)! !\\\\n\\\\n\\\\n!OBMethodVersionNode methodsFor: 'accessing' stamp: 'cwp 10/17/2004 23:57'!\\\\ncategory\\\\n\\\\t^ self theClass organization categoryOfElement: version selector! !\\\\n\\\\n!OBMethodVersionNode methodsFor: 'accessing'!\\\\nreference\\\\n\\\\t^ self referenceForMethod: version selector ofClass: self theClassName.! !\\\\n\\\\n!OBMethodVersionNode methodsFor: 'accessing' stamp: 'cwp 10/17/2004 23:44'!\\\\nversion\\\\n\\\\t^ version! !\\\\n\\\\n\\\\n!OBMethodVersionNode methodsFor: 'compiling' stamp: 'cwp 10/17/2004 23:53'!\\\\ndefinition\\\\n\\\\t^ (OBMethodDefinition source: version source inClass: self theClass)\\\\n\\\\t\\\\tcallback: [:sel | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tversion selector = sel\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self class on: version latest]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [OBMethodNode on: sel inClass: self theClass]]! !\\\\n\\\\n\\\\n!OBMethodVersionNode methodsFor: 'displaying' stamp: 'cwp 11/27/2004 21:38'!\\\\nname\\\\n\\\\t| stamp |\\\\n\\\\tstamp := version stamp ifNil: ['<timestamp missing>'].\\\\n\\\\t^ version theClassName, '>>', version selector, ' ', stamp! !\\\\n\\\\n\\\\n!OBMethodVersionNode methodsFor: 'initializing'!\\\\nsetVersion: aMethodVersion\\\\n\\\\tversion := aMethodVersion.\\\\n\\\\tself theClass: version theClass! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBMethodVersionNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBMethodVersionNode class methodsFor: 'instance creation'!\\\\non: aMethodVersion \\\\n\\\\t^ self new setVersion: aMethodVersion! !\\\\nOBFilter subclass: #OBModalFilter\\\\n\\\\tinstanceVariableNames: 'selection'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Utilities'!\\\\n!OBModalFilter commentStamp: 'cwp 1/7/2005 23:39' prior: 0!\\\\nOBModalFilter is used to implement the 'instance/?/class' buttons in a standard class browser. In functional terms it filters the nodes of a column according to the edge of the metagraph that they correspond to. OBModalFilter displays an OBRadioButtonBar in its column's pane, with one button per edge. Only nodes from the currently selected edge are allowed in the column.\\\\n\\\\niVars:\\\\n\\\\nselection\\\\t- the currently selected edge!\\\\n\\\\n\\\\n!OBModalFilter methodsFor: 'callbacks' stamp: 'cwp 2/25/2004 00:28'!\\\\nlist\\\\n\\\\t^ metaNode edges collect: [:edge | edge label]! !\\\\n\\\\n!OBModalFilter methodsFor: 'callbacks' stamp: 'cwp 2/9/2004 21:10'!\\\\nselection\\\\n\\\\t^ selection ifNil: [selection _ 1]! !\\\\n\\\\n!OBModalFilter methodsFor: 'callbacks' stamp: 'cwp 6/6/2006 00:20'!\\\\nselection: anInteger\\\\n\\\\tselection _ anInteger.\\\\n\\\\tself changed: #selection.\\\\n\\\\tmonitor listChanged.\\\\n! !\\\\n\\\\n\\\\n!OBModalFilter methodsFor: 'morphs' stamp: 'cwp 11/27/2004 18:01'!\\\\nbuttonMorph\\\\n\\\\t^ OBRadioButtonBar\\\\n\\\\t\\\\ton: self\\\\n\\\\t\\\\tlist: #list\\\\n\\\\t\\\\tselected: #selection\\\\n\\\\t\\\\tchangeSelected: #selection:! !\\\\n\\\\n\\\\n!OBModalFilter methodsFor: 'public' stamp: 'cwp 3/3/2004 00:23'!\\\\nnodesForParent: aNode\\\\n\\\\t^ self selectedEdge nodesForParent: aNode! !\\\\n\\\\n!OBModalFilter methodsFor: 'public' stamp: 'cwp 2/29/2004 14:35'!\\\\nselectAncestorOf: aNode withParent: parentNode\\\\n\\\\t| ancestor |\\\\n\\\\t1 \\\\tto: metaNode edges size \\\\n\\\\t  \\\\tdo: [:i | selection _ i.\\\\n\\\\t\\\\t\\\\tancestor _ (self nodesForParent: parentNode)\\\\n\\\\t\\\\t\\\\t\\\\tdetect: [:child | child isAncestorOf: aNode] \\\\n\\\\t\\\\t\\\\t\\\\tifNone: [nil].\\\\n\\\\t\\\\t\\\\tancestor ifNotNil: [self changed: #selection. ^ ancestor]].\\\\n\\\\t^ nil! !\\\\n\\\\n\\\\n!OBModalFilter methodsFor: 'queries' stamp: 'cwp 2/9/2004 21:08'!\\\\nwantsButton\\\\n\\\\t^ true! !\\\\n\\\\n\\\\n!OBModalFilter methodsFor: 'selection' stamp: 'cwp 2/9/2004 21:11'!\\\\nincrementSelection\\\\n\\\\tselection _ selection + 1.\\\\n\\\\t(selection > metaNode edges size) ifTrue: [selection _ 1].! !\\\\n\\\\n!OBModalFilter methodsFor: 'selection' stamp: 'cwp 2/9/2004 21:11'!\\\\nselectedEdge\\\\n\\\\t^ metaNode edges at: self selection ! !\\\\nObject subclass: #OBMorphicPanelLayout\\\\n\\\\tinstanceVariableNames: 'panels'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Morphic'!\\\\n!OBMorphicPanelLayout commentStamp: 'cwp 1/7/2005 23:42' prior: 0!\\\\nOBMorphicPanelLayout implements a somewhat hairy algorithm for layoung out panels in a morphic SystemWindow. It is the default layout strategy used by OBBrowser. Subclasses of OBBrowser may use other layout strategies to customize their appearance.!\\\\n\\\\n\\\\n!OBMorphicPanelLayout methodsFor: 'initializing' stamp: 'cwp 11/21/2004 00:23'!\\\\nsetPanels: aCollection \\\\n\\\\tpanels := aCollection! !\\\\n\\\\n\\\\n!OBMorphicPanelLayout methodsFor: 'public' stamp: 'cwp 11/21/2004 00:26'!\\\\naddMorphsTo: aMorph\\\\n\\\\tself addNavMorphTo: aMorph.\\\\n\\\\t(panels size > 1) ifTrue: [self addOtherMorphsTo: aMorph].\\\\n\\\\t! !\\\\n\\\\n\\\\n!OBMorphicPanelLayout methodsFor: 'private' stamp: 'cwp 11/21/2004 00:25'!\\\\naddNavMorphTo: aMorph\\\\n\\\\taMorph \\\\n\\\\t\\\\taddMorph: self navigationPanel buildScroller\\\\n\\\\t\\\\tfullFrame: (LayoutFrame fractions: (0 @ 0 extent: 1 @ self columnProportion)).\\\\n! !\\\\n\\\\n!OBMorphicPanelLayout methodsFor: 'private' stamp: 'cwp 11/21/2004 00:37'!\\\\naddOtherMorphsTo: aMorph\\\\n\\\\t| heights variableCount fraction offset vExtent h nonNavPanels |\\\\n\\\\tnonNavPanels := panels reject: [:ea | ea isNavigation].\\\\n\\\\tnonNavPanels isEmpty ifTrue: [^ self].\\\\n\\\\theights _ nonNavPanels collect: [:ea | ea morphHeight].\\\\n\\\\tvariableCount _ heights \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinject: 0 \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinto: [:count :ea | ea = 0 ifTrue: [count + 1] ifFalse: [count]].\\\\n\\\\tfraction _ self columnProportion.\\\\n\\\\toffset _ 0.\\\\n\\\\tvExtent _  1- fraction / variableCount.\\\\n\\\\tnonNavPanels with: heights do:  [:panel :height | \\\\n\\\\t\\\\th _ height = 0 ifTrue: [vExtent] ifFalse: [0].\\\\n\\\\t\\\\taMorph \\\\n\\\\t\\\\t\\\\taddMorph: panel morph\\\\n\\\\t\\\\t\\\\tfullFrame: (LayoutFrame\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfractions: (0@fraction extent: 1@h)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\toffsets: (0@offset corner: 0@height)).\\\\n\\\\t\\\\theight = 0 \\\\n\\\\t\\\\t\\\\tifTrue: \\\\t[offset _ 0.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tfraction _ fraction + vExtent]\\\\n\\\\t\\\\t\\\\tifFalse: \\\\t[offset _ offset + height]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\n\\\\t\\\\t\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t! !\\\\n\\\\n!OBMorphicPanelLayout methodsFor: 'private' stamp: 'cwp 11/21/2004 00:26'!\\\\ncolumnProportion\\\\n\\\\t^ panels size = 1\\\\n\\\\t\\\\tifTrue: [1]\\\\n\\\\t\\\\tifFalse: [0.4]! !\\\\n\\\\n!OBMorphicPanelLayout methodsFor: 'private' stamp: 'cwp 11/21/2004 00:28'!\\\\nnavigationPanel\\\\n\\\\t^ panels detect: [:ea | ea isNavigation]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBMorphicPanelLayout class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBMorphicPanelLayout class methodsFor: 'intance creation' stamp: 'cwp 11/20/2004 23:32'!\\\\nfor: aCollection\\\\n\\\\t^ self new setPanels: aCollection! !\\\\nObject subclass: #OBNode\\\\n\\\\tinstanceVariableNames: 'metaNode'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Kernel'!\\\\n!OBNode commentStamp: 'cwp 3/4/2004 22:20' prior: 0!\\\\nA node is a wrapper for an object in the browser's domain graph. OBNode is an abstract superclass for concrete nodes which might appear in the browser.\\\\n\\\\niVars:\\\\n\\\\nmetaNode - the MetaNode which produced this node!\\\\n\\\\n\\\\n!OBNode methodsFor: 'accessing' stamp: 'cwp 3/3/2004 23:24'!\\\\nmetaNode\\\\n\\\\t^ metaNode! !\\\\n\\\\n!OBNode methodsFor: 'accessing' stamp: 'cwp 3/3/2004 23:24'!\\\\nmetaNode: aMetaNode\\\\n\\\\tmetaNode _ aMetaNode! !\\\\n\\\\n\\\\n!OBNode methodsFor: 'ancestry' stamp: 'cwp 3/3/2004 00:44'!\\\\nancestrySelector\\\\n\\\\t^ #isDescendantOf: ! !\\\\n\\\\n!OBNode methodsFor: 'ancestry' stamp: 'cwp 3/3/2004 01:47'!\\\\nisAncestorOf: aNode\\\\n\\\\t^ aNode perform: self ancestrySelector with: self! !\\\\n\\\\n!OBNode methodsFor: 'ancestry' stamp: 'cwp 3/3/2004 00:44'!\\\\nisDescendantOf: aNode\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!OBNode methodsFor: 'comparing' stamp: 'cwp 7/14/2006 12:37'!\\\\ncorrespondsWith: aNode\\\\n\\\\t^ self displayString = aNode displayString! !\\\\n\\\\n!OBNode methodsFor: 'comparing' stamp: 'cwp 1/31/2004 14:57'!\\\\nhash\\\\n\\\\t^ self name hash! !\\\\n\\\\n!OBNode methodsFor: 'comparing' stamp: 'cwp 1/31/2004 14:57'!\\\\n= other\\\\n\\\\t^ self class = other class and: [self name = other name]! !\\\\n\\\\n\\\\n!OBNode methodsFor: 'displaying' stamp: 'cwp 12/8/2004 21:36'!\\\\ndisplayString\\\\n\\\\t^ self perform: metaNode displaySelector! !\\\\n\\\\n!OBNode methodsFor: 'displaying' stamp: 'cwp 8/28/2004 00:14'!\\\\ntitle\\\\n\\\\t^ nil! !\\\\n\\\\n\\\\n!OBNode methodsFor: 'drag and drop' stamp: 'cwp 3/2/2004 21:28'!\\\\nacceptDroppedNode: aNode\\\\n \\\\t^ aNode perform: self dropSelector with: self\\\\n! !\\\\n\\\\n!OBNode methodsFor: 'drag and drop' stamp: 'avi 2/20/2004 14:00'!\\\\nasDraggableMorph\\\\n\\\\t^(StringMorph contents: self name)\\\\n\\\\t\\\\tcolor: Color white;\\\\n\\\\t\\\\tyourself! !\\\\n\\\\n!OBNode methodsFor: 'drag and drop' stamp: 'cwp 3/2/2004 21:29'!\\\\ndropSelector\\\\n\\\\t\\\\\\\"Override in subclasses\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ #dropOnNode: ! !\\\\n\\\\n!OBNode methodsFor: 'drag and drop' stamp: 'cwp 3/2/2004 21:28'!\\\\nwantsDroppedNode: aNode\\\\n\\\\t^ aNode respondsTo: self dropSelector! !\\\\n\\\\n\\\\n\\\\n!OBNode methodsFor: 'public' stamp: 'cwp 2/29/2004 13:49'!\\\\naccept: aText notifying: aController\\\\n\\\\t^ self text: aText! !\\\\n\\\\n!OBNode methodsFor: 'public' stamp: 'cwp 1/7/2004 09:25'!\\\\nactions\\\\n\\\\t^ #()! !\\\\n\\\\n!OBNode methodsFor: 'public' stamp: 'cwp 3/22/2004 20:48'!\\\\ndefinition\\\\n\\\\t^ self! !\\\\n\\\\n!OBNode methodsFor: 'public' stamp: 'dvf 8/17/2005 13:57'!\\\\ndisplayName\\\\n\\\\t\\\\\\\"expected to return a decorated text (rather than string) version of name\\\\\\\"\\\\n\\\\t^self name asText! !\\\\n\\\\n!OBNode methodsFor: 'public' stamp: 'cwp 12/10/2003 22:27'!\\\\nname\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n!OBNode methodsFor: 'public' stamp: 'cwp 12/7/2003 19:27'!\\\\ntext\\\\n\\\\t^ ''! !\\\\n\\\\n!OBNode methodsFor: 'public' stamp: 'cwp 2/29/2004 18:30'!\\\\ntextSelection\\\\n\\\\t^ 1 to: 0! !\\\\n\\\\n!OBNode methodsFor: 'public' stamp: 'cwp 3/14/2004 14:09'!\\\\ntext: aText\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!OBNode methodsFor: 'utility' stamp: 'cwp 3/10/2004 00:29'!\\\\naction: aSelector buttonLabel: buttonString menuLabel: menuString\\\\n\\\\t^ OBAction\\\\n\\\\t\\\\tlabel: menuString\\\\n\\\\t\\\\tbuttonLabel: buttonString\\\\n\\\\t\\\\treceiver: self\\\\n\\\\t\\\\tselector: aSelector\\\\n\\\\t\\\\targuments: #()! !\\\\n\\\\n!OBNode methodsFor: 'utility' stamp: 'cwp 2/3/2004 22:29'!\\\\naction: aSelector withLabel: aString\\\\n\\\\t^ OBAction\\\\n\\\\t\\\\tlabel: aString\\\\n\\\\t\\\\treceiver: self\\\\n\\\\t\\\\tselector: aSelector\\\\n\\\\t\\\\targuments: #()! !\\\\n\\\\n!OBNode methodsFor: 'utility' stamp: 'hpt 5/17/2004 16:51'!\\\\naction: aSelector withLabel: aString withIcon: anIcon\\\\n\\\\t^ OBAction\\\\n\\\\t\\\\tlabel: aString\\\\n\\\\t\\\\treceiver: self\\\\n\\\\t\\\\tselector: aSelector\\\\n\\\\t\\\\targuments: #()\\\\n\\\\t\\\\ticon: anIcon! !\\\\n\\\\n!OBNode methodsFor: 'utility' stamp: 'hpt 5/17/2004 14:28'!\\\\naction: aSelector withLabel: aString withKeystroke: aChar\\\\n\\\\t^ OBAction\\\\n\\\\t\\\\tlabel: aString\\\\n\\\\t\\\\treceiver: self\\\\n\\\\t\\\\tselector: aSelector\\\\n\\\\t\\\\targuments: #()\\\\n\\\\t\\\\tkeystroke: aChar! !\\\\n\\\\n!OBNode methodsFor: 'utility' stamp: 'hpt 5/17/2004 16:51'!\\\\naction: aSelector withLabel: aString withKeystroke: aChar withIcon: anIcon\\\\n\\\\t^ OBAction\\\\n\\\\t\\\\tlabel: aString\\\\n\\\\t\\\\treceiver: self\\\\n\\\\t\\\\tselector: aSelector\\\\n\\\\t\\\\targuments: #()\\\\n\\\\t\\\\tkeystroke: aChar\\\\n\\\\t\\\\ticon: anIcon! !\\\\n\\\\n!OBNode methodsFor: 'utility' stamp: 'cwp 12/5/2004 20:11'!\\\\naction: aSelector withMenuLabel: aString withButtonLabel: aString2 withKeystroke: aChar withIcon: anIcon \\\\n\\\\t^OBAction \\\\n\\\\t\\\\tlabel: aString\\\\n\\\\t\\\\tbuttonLabel: aString2\\\\n\\\\t\\\\treceiver: self\\\\n\\\\t\\\\tselector: aSelector\\\\n\\\\t\\\\targuments: #()\\\\n\\\\t\\\\tkeystroke: aChar\\\\n\\\\t\\\\ticon: anIcon! !\\\\n\\\\n!OBNode methodsFor: 'utility' stamp: 'cwp 2/7/2004 21:29'!\\\\nreferenceForMethod: selector ofClass: className\\\\n\\\\t| classIsMeta symbol |\\\\n\\\\tclassIsMeta _ className endsWith: ' class'.\\\\n\\\\tsymbol _ classIsMeta ifTrue: [(className allButLast: 6) asSymbol] ifFalse: [className].\\\\n\\\\t^ MethodReference new \\\\n\\\\t\\\\tsetClassSymbol: symbol\\\\n\\\\t\\\\tclassIsMeta: classIsMeta\\\\n\\\\t\\\\tmethodSymbol: selector\\\\n\\\\t\\\\tstringVersion: symbol, '>>', selector! !\\\\n\\\\n\\\\n!OBNode methodsFor: 'updating' stamp: 'cwp 6/4/2006 12:18'!\\\\nannounce: anObject\\\\n\\\\t^ OBAnnouncer current ifNotNilDo: [:announcer | announcer announce: anObject]! !\\\\n\\\\n!OBNode methodsFor: 'updating' stamp: 'cwp 6/4/2006 01:06'!\\\\ndemandSelection\\\\n\\\\t^ OBAnnouncer current announce: (OBNodeCreated node: self)! !\\\\n\\\\n!OBNode methodsFor: 'updating' stamp: 'cwp 6/4/2006 12:15'!\\\\nsignalChanged\\\\n\\\\tself announce: (OBNodeChanged node: self)! !\\\\n\\\\n!OBNode methodsFor: 'updating' stamp: 'cwp 6/4/2006 12:15'!\\\\nsignalChildrenChanged\\\\n\\\\tself announce: (OBChildrenChanged node: self)! !\\\\n\\\\n!OBNode methodsFor: 'updating' stamp: 'cwp 6/4/2006 12:15'!\\\\nsignalDeletion\\\\n\\\\tself announce: (OBNodeDeleted node: self)\\\\n! !\\\\n\\\\n!OBNode methodsFor: 'updating' stamp: 'cwp 6/4/2006 13:59'!\\\\nsignalSelection\\\\n\\\\t(self announce: OBAboutToChange)\\\\n\\\\t\\\\tisVetoed ifFalse: [self announce: (OBSelectingNode node: self)]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBNode class methodsFor: 'as yet unclassified' stamp: 'cwp 2/5/2004 20:25'!\\\\nactionsForParent: aNode\\\\n\\\\t^ #()! !\\\\n\\\\n!OBNode class methodsFor: 'as yet unclassified' stamp: 'cwp 12/18/2003 22:11'!\\\\nfromAssociation: anAssociationNode\\\\n\\\\t^ self on: anAssociationNode value! !\\\\nOBActor subclass: #OBNodeActor\\\\n\\\\tinstanceVariableNames: 'nodeClass'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Actors'!\\\\n!OBNodeActor commentStamp: 'cwp 3/5/2004 12:23' prior: 0!\\\\nFor simplicity, many actions are implemented by the nodes themselves. When the contextual menu for a node is displayed, this Actor gathers those actions and makes them available in to the user.\\\\n\\\\nIf a node class is specified, the OBNodeActor will also make available any class side actions provided by the node class. This is convenient for the user, since it makes it possible to invoke an action without first selecting a node. Many 'create' actions are implemented in this way.\\\\n\\\\niVars:\\\\n\\\\nnodeClass - if not nil, this class's class-side actions will be available to the user as well.!\\\\n\\\\n\\\\n!OBNodeActor methodsFor: 'public' stamp: 'cwp 1/23/2004 23:24'!\\\\nactionsForNode: aNode\\\\n\\\\t^ aNode actions! !\\\\n\\\\n!OBNodeActor methodsFor: 'public' stamp: 'cwp 3/3/2004 22:46'!\\\\nactionsForParent: aNode\\\\n\\\\t^ nodeClass \\\\n\\\\t\\\\tifNotNil: [nodeClass actionsForParent: aNode]\\\\n\\\\t\\\\tifNil: [#()]! !\\\\n\\\\n!OBNodeActor methodsFor: 'public' stamp: 'cwp 3/3/2004 22:42'!\\\\nnodeClass: aClass\\\\n\\\\tnodeClass _ aClass! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBNodeActor class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBNodeActor class methodsFor: 'as yet unclassified' stamp: 'cwp 3/3/2004 22:51'!\\\\nonNodeClass: aClass\\\\n\\\\t^ self new nodeClass: aClass! !\\\\nOBAnnouncement subclass: #OBNodeChanged\\\\n\\\\tinstanceVariableNames: 'node'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Announcements'!\\\\n\\\\n!OBNodeChanged methodsFor: 'as yet unclassified' stamp: 'cwp 6/4/2006 11:17'!\\\\nnode\\\\n\\\\t^ node! !\\\\n\\\\n!OBNodeChanged methodsFor: 'as yet unclassified' stamp: 'cwp 6/4/2006 11:17'!\\\\nnode: aNode\\\\n\\\\tnode _ aNode! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBNodeChanged class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBNodeChanged class methodsFor: 'as yet unclassified' stamp: 'cwp 6/4/2006 11:17'!\\\\nnode: aNode\\\\n\\\\t^ self new node: aNode! !\\\\nOBAnnouncement subclass: #OBNodeCreated\\\\n\\\\tinstanceVariableNames: 'node'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Announcements'!\\\\n\\\\n!OBNodeCreated methodsFor: 'as yet unclassified' stamp: 'cwp 6/4/2006 00:53'!\\\\nnode\\\\n\\\\t^ node! !\\\\n\\\\n!OBNodeCreated methodsFor: 'as yet unclassified' stamp: 'cwp 6/4/2006 00:53'!\\\\nnode: aNode\\\\n\\\\tnode _ aNode! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBNodeCreated class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBNodeCreated class methodsFor: 'as yet unclassified' stamp: 'cwp 6/4/2006 01:09'!\\\\nnode: aNode\\\\n\\\\t^ self new node: aNode! !\\\\nOBAnnouncement subclass: #OBNodeDeleted\\\\n\\\\tinstanceVariableNames: 'node'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Announcements'!\\\\n\\\\n!OBNodeDeleted methodsFor: 'as yet unclassified' stamp: 'cwp 6/4/2006 11:56'!\\\\nnode\\\\n\\\\t^ node! !\\\\n\\\\n!OBNodeDeleted methodsFor: 'as yet unclassified' stamp: 'cwp 6/4/2006 11:56'!\\\\nnode: aNode\\\\n\\\\tnode _ aNode! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBNodeDeleted class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBNodeDeleted class methodsFor: 'as yet unclassified' stamp: 'cwp 6/4/2006 11:56'!\\\\nnode: aNode\\\\n\\\\t^ self new node: aNode! !\\\\nOBDefinition subclass: #OBOrganizationDefinition\\\\n\\\\tinstanceVariableNames: 'organizer'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Definitions'!\\\\n!OBOrganizationDefinition commentStamp: 'cwp 1/8/2005 13:31' prior: 0!\\\\nOBOrganizationDefinition knows how to display and edit the organization of classes or methods by a Categorizer.!\\\\n\\\\n\\\\n!OBOrganizationDefinition methodsFor: 'as yet unclassified' stamp: 'cwp 9/22/2004 21:21'!\\\\norganizer: anOrganizer\\\\n\\\\torganizer _ anOrganizer! !\\\\n\\\\n!OBOrganizationDefinition methodsFor: 'as yet unclassified' stamp: 'cwp 9/22/2004 21:18'!\\\\ntext\\\\n\\\\t^ organizer asString! !\\\\n\\\\n!OBOrganizationDefinition methodsFor: 'as yet unclassified' stamp: 'cwp 1/9/2005 11:45'!\\\\ntext: aText\\\\n\\\\torganizer changeFromString: aText asString.\\\\n\\\\t^ true! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBOrganizationDefinition class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBOrganizationDefinition class methodsFor: 'as yet unclassified' stamp: 'cwp 9/22/2004 21:20'!\\\\non: anOrganizer\\\\n\\\\t^ self new organizer: anOrganizer! !\\\\nRectangleMorph subclass: #OBPane\\\\n\\\\tinstanceVariableNames: 'model list button'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Morphic'!\\\\n!OBPane commentStamp: 'cwp 1/7/2005 23:24' prior: 0!\\\\nAn OBPane is the visual representation of a column in a browser. It contains a morph to display nodes (typically a PluggableListMorph) and (optionally) a morph for communicating with the column's filter. It's main responsibility is to lay out its submorphs as the filter controls are added and removed.\\\\n\\\\niVars:\\\\n\\\\nmodel\\\\t- the OBColumn that controls the node list displayed in this pane\\\\nlist\\\\t\\\\t- the morph which displays the node list, usually a PluggableListMorph\\\\nbutton\\\\t- the morph which controls the column's filter, usually an OBRadioButtonBar.!\\\\n\\\\n\\\\n!OBPane methodsFor: 'constructing' stamp: 'cwp 11/2/2004 00:57'!\\\\nbuttonHeight\\\\n\\\\t^ self hasButton\\\\n\\\\t\\\\tifTrue: [button height]\\\\n\\\\t\\\\tifFalse: [self defaultButtonHeight]\\\\n! !\\\\n\\\\n!OBPane methodsFor: 'constructing' stamp: 'cwp 11/2/2004 01:10'!\\\\ndefaultButtonHeight\\\\n\\\\t^ 23! !\\\\n\\\\n!OBPane methodsFor: 'constructing' stamp: 'cwp 11/27/2004 21:19'!\\\\nnoteNewOwner: aMorph\\\\n\\\\tself containingWindow ifNotNilDo: [:window | self adoptPaneColor: window paneColor]! !\\\\n\\\\n\\\\n!OBPane methodsFor: 'geometry' stamp: 'cwp 2/12/2004 18:32'!\\\\nbounds: aRectangle\\\\n\\\\tsuper bounds: aRectangle.\\\\n\\\\tself adjustList.\\\\n\\\\tself adjustButton.! !\\\\n\\\\n\\\\n!OBPane methodsFor: 'initialization' stamp: 'cwp 2/12/2004 18:26'!\\\\ninitGeometry\\\\n\\\\tself\\\\t\\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tvResizing: #spaceFill;\\\\n\\\\t\\\\tclipSubmorphs: true;\\\\n\\\\t\\\\tcolor: Color transparent;\\\\n\\\\t\\\\tcellInset: 0;\\\\n\\\\t\\\\tborderWidth: 0;\\\\n\\\\t\\\\tlayoutPolicy: ProportionalLayout new.\\\\n\\\\t\\\\t\\\\n\\\\tself addMorph: list.\\\\n\\\\tlist bounds: self innerBounds.\\\\n\\\\t\\\\t! !\\\\n\\\\n!OBPane methodsFor: 'initialization' stamp: 'cwp 2/12/2004 18:44'!\\\\nmodel: anObject\\\\n\\\\t\\\\\\\"Set my model and make me me a dependent of the given object.\\\\\\\"\\\\n\\\\n\\\\tmodel ifNotNil: [model removeDependent: self].\\\\n\\\\tanObject ifNotNil: [anObject addDependent: self].\\\\n\\\\tmodel _ anObject.\\\\n! !\\\\n\\\\n!OBPane methodsFor: 'initialization' stamp: 'cwp 2/12/2004 19:17'!\\\\nsetColumn: aColumn filter: aFilter\\\\n\\\\tself model: aColumn.\\\\n\\\\tlist _ aColumn listMorph.\\\\n\\\\tself initGeometry.\\\\n\\\\taFilter ifNotNil: [self addButton: aFilter buttonMorph].! !\\\\n\\\\n\\\\n!OBPane methodsFor: 'testing' stamp: 'cwp 2/12/2004 18:35'!\\\\nhasButton\\\\n\\\\t^ button notNil! !\\\\n\\\\n\\\\n!OBPane methodsFor: 'updating' stamp: 'cwp 11/2/2004 00:53'!\\\\naddButton: aButton\\\\n\\\\tself hasButton ifTrue: [self removeMorph: button].\\\\n\\\\tbutton _ aButton.\\\\n\\\\tbutton height: self defaultButtonHeight.\\\\n\\\\tself \\\\n\\\\t\\\\taddMorph: button;\\\\n\\\\t\\\\tadjustList;\\\\n\\\\t\\\\tadjustButton! !\\\\n\\\\n!OBPane methodsFor: 'updating' stamp: 'cwp 11/2/2004 00:50'!\\\\nadjustButton\\\\n\\\\t| inner |\\\\n\\\\tself hasButton ifTrue: \\\\n\\\\t\\\\t[inner _ self innerBounds.\\\\n\\\\t\\\\tbutton bounds: (inner withTop: inner bottom - self buttonHeight)]! !\\\\n\\\\n!OBPane methodsFor: 'updating' stamp: 'cwp 2/12/2004 18:35'!\\\\nadjustList\\\\n\\\\tself hasButton\\\\n\\\\t\\\\t\\\\tifFalse: [list bounds: self innerBounds]\\\\n\\\\t\\\\t\\\\tifTrue: [list bounds: (self innerBounds withHeight: (self height - self buttonHeight))]! !\\\\n\\\\n!OBPane methodsFor: 'updating' stamp: 'cwp 2/12/2004 20:29'!\\\\nremoveButton\\\\n\\\\tself hasButton \\\\n\\\\t\\\\tifTrue: [self removeMorph: button.\\\\n\\\\t\\\\t\\\\t\\\\tbutton _ nil.\\\\n\\\\t\\\\t\\\\t\\\\tself adjustList]! !\\\\n\\\\n!OBPane methodsFor: 'updating' stamp: 'cwp 2/12/2004 20:23'!\\\\nupdate: aSelector\\\\n\\\\taSelector = #filter ifFalse: [^ self].\\\\n\\\\t(model wantsButton)\\\\n\\\\t\\\\t\\\\tifTrue: [self addButton: model filter buttonMorph]\\\\n\\\\t\\\\t\\\\tifFalse: [self removeButton]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBPane class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBPane class methodsFor: 'instance creation' stamp: 'cwp 2/12/2004 18:11'!\\\\nforColumn: aColumn\\\\n\\\\t^ self forColumn: aColumn withFilter: nil! !\\\\n\\\\n!OBPane class methodsFor: 'instance creation' stamp: 'cwp 2/12/2004 18:12'!\\\\nforColumn: aColumn withFilter: aFilter\\\\n\\\\t^ self new setColumn: aColumn filter: aFilter! !\\\\nRectangleMorph subclass: #OBPaneScroller\\\\n\\\\tinstanceVariableNames: 'model sizing panes transform scrollBar'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Morphic'!\\\\n!OBPaneScroller commentStamp: 'cwp 3/5/2004 12:13' prior: 0!\\\\nInstances of OBPaneScroller contain the panes which represent columns in a browser. Their primary responsibilities are laying out panes to fit the space available and scrolling them horizontally when there isn't sufficient space. \\\\n\\\\niVars:\\\\n\\\\nsizing\\\\t\\\\t- The number of panes which should exactly fit the available space.\\\\n\\\\t\\\\t   \\\\t   During layout, the  width of the panes is determined accordingly.\\\\ntransform\\\\t- A TransformMorph used for scrolling\\\\nscrollBar\\\\t- An OBHorizontalScrollBar used for scrolling!\\\\n\\\\n\\\\n!OBPaneScroller methodsFor: 'accessing' stamp: 'cwp 11/17/2004 22:03'!\\\\nmodel\\\\n\\\\t^model! !\\\\n\\\\n!OBPaneScroller methodsFor: 'accessing' stamp: 'cwp 11/17/2004 22:11'!\\\\nmodel: anObject\\\\n\\\\tmodel ifNotNil: [model removeDependent: self].\\\\n\\\\tanObject ifNotNil: [anObject addDependent: self].\\\\n\\\\tmodel := anObject! !\\\\n\\\\n!OBPaneScroller methodsFor: 'accessing' stamp: 'cwp 11/17/2004 23:09'!\\\\npanes\\\\n\\\\t^ panes ifNil: [self updatePanes. panes]! !\\\\n\\\\n!OBPaneScroller methodsFor: 'accessing' stamp: 'cwp 11/22/2004 23:19'!\\\\nsizing\\\\n\\\\t^ sizing ifNil: [self updateSizing]! !\\\\n\\\\n\\\\n!OBPaneScroller methodsFor: 'defaults' stamp: 'cwp 8/24/2003 15:13'!\\\\nseparatorWidth\\\\n\\\\t^ 4! !\\\\n\\\\n\\\\n!OBPaneScroller methodsFor: 'initialization' stamp: 'cwp 11/23/2004 01:28'!\\\\ninitialize\\\\n\\\\tsuper initialize.\\\\n\\\\tself \\\\n\\\\t\\\\tcolor: Color red;\\\\n\\\\t\\\\tborderWidth: 0;\\\\n\\\\t\\\\tvResizing: #spaceFill;\\\\n\\\\t\\\\thResizing: #spaceFill.\\\\n\\\\tself \\\\n\\\\t\\\\tinitializeTransform;\\\\n\\\\t\\\\tinitializeScrollbar.\\\\n\\\\tself startStepping.! !\\\\n\\\\n!OBPaneScroller methodsFor: 'initialization' stamp: 'cwp 2/8/2004 11:01'!\\\\ninitializeScrollbar\\\\n\\\\tscrollBar _ OBScrollBar new model: self slotName: 'scrollBar'.\\\\n\\\\tscrollBar \\\\n\\\\t\\\\tborderWidth: 0;\\\\n\\\\t\\\\tborderColor: #inset;\\\\n\\\\t\\\\theight: self scrollBarHeight.\\\\n\\\\tself resizeScrollBar.\\\\n! !\\\\n\\\\n!OBPaneScroller methodsFor: 'initialization' stamp: 'cwp 2/8/2004 10:52'!\\\\ninitializeTransform\\\\n\\\\ttransform _ TransformMorph new.\\\\n\\\\ttransform\\\\n\\\\t\\\\tcolor: Color transparent;\\\\n\\\\t\\\\tborderWidth: 0;\\\\n\\\\t\\\\tvResizing: #spaceFill;\\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tdisableTableLayout;\\\\n\\\\t\\\\tbounds: super innerBounds.\\\\n\\\\tself addMorphBack: transform.\\\\n! !\\\\n\\\\n\\\\n!OBPaneScroller methodsFor: 'layout' stamp: 'cwp 2/8/2004 11:10'!\\\\nadjustPaneHeight\\\\n\\\\t\\\\\\\"This gets called after the scrollbar has been shown or hidden, to move the bottom\\\\n\\\\tof the panes to the right place.\\\\\\\"\\\\n\\\\t\\\\n\\\\ttransform bounds: self innerBounds.\\\\n\\\\ttransform submorphsDo: [:m | m bounds: (m bounds withHeight: self paneHeight)]\\\\n\\\\t\\\\t! !\\\\n\\\\n!OBPaneScroller methodsFor: 'layout' stamp: 'cwp 11/21/2004 23:45'!\\\\nbounds: aRectangle\\\\n\\\\tsuper bounds: aRectangle.\\\\n\\\\tself layoutWidgets.\\\\n\\\\tself layoutPanes.\\\\n\\\\tself setScrollDeltas.\\\\n! !\\\\n\\\\n!OBPaneScroller methodsFor: 'layout' stamp: 'cwp 2/26/2004 23:14'!\\\\ncomputeMorphWidths\\\\n\\\\t| paneWidths widths |\\\\n\\\\tpaneWidths _ self paneWidthsToFit: self totalPaneWidth.\\\\n\\\\twidths _ OrderedCollection new.\\\\n\\\\tpaneWidths do: [:w | widths add: w] separatedBy: [widths add: self separatorWidth].\\\\n\\\\t^ widths asArray\\\\n! !\\\\n\\\\n!OBPaneScroller methodsFor: 'layout' stamp: 'cwp 2/8/2004 11:06'!\\\\ndoLayout\\\\n\\\\tself layoutWidgets.\\\\n\\\\tself layoutPanes.\\\\n\\\\tself hideOrShowScrollBar.\\\\n\\\\tself setScrollDeltas.\\\\n\\\\tself scrollToRight.! !\\\\n\\\\n!OBPaneScroller methodsFor: 'layout' stamp: 'cwp 2/8/2004 10:54'!\\\\ninnerBounds\\\\n\\\\t| rect |\\\\n\\\\trect _ super innerBounds.\\\\n\\\\t^ self scrollBarIsVisible\\\\n\\\\t\\\\tifTrue: [rect withHeight: rect height - self scrollBarHeight - 1]\\\\n\\\\t\\\\tifFalse: [rect]! !\\\\n\\\\n!OBPaneScroller methodsFor: 'layout' stamp: 'cwp 2/8/2004 01:22'!\\\\nlayoutPanes\\\\n\\\\t| widths rect |\\\\n\\\\twidths _ self computeMorphWidths.\\\\n\\\\trect _ 0@0 extent: (0 @ self paneHeight).\\\\n\\\\ttransform submorphs \\\\n\\\\t\\\\t\\\\t\\\\t\\\\twith: widths \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:m :w | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trect _ rect withWidth: w.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tm bounds: rect.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trect _ rect translateBy: (w@0)]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\n! !\\\\n\\\\n!OBPaneScroller methodsFor: 'layout' stamp: 'cwp 8/25/2003 22:13'!\\\\nlayoutWidgets\\\\n\\\\t| inner outer |\\\\n\\\\touter _ super innerBounds.\\\\n\\\\tinner _ self innerBounds.\\\\n\\\\ttransform bounds: inner.\\\\n\\\\tscrollBar bounds: ((inner left @ inner bottom + 1)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: outer bottomRight)! !\\\\n\\\\n!OBPaneScroller methodsFor: 'layout' stamp: 'cwp 11/17/2004 23:09'!\\\\npaneCount\\\\n\\\\t^ self panes size! !\\\\n\\\\n!OBPaneScroller methodsFor: 'layout' stamp: 'cwp 12/6/2003 17:08'!\\\\npaneHeight\\\\n\\\\t^ transform bounds height! !\\\\n\\\\n!OBPaneScroller methodsFor: 'layout' stamp: 'cwp 2/26/2004 23:14'!\\\\npaneWidthsToFit: limit\\\\n\\\\t| padded |\\\\n\\\\tpadded _ Array new: self paneCount.\\\\n\\\\tpadded atAllPut: (limit / self sizing) floor.\\\\n\\\\t(1 to: limit - padded sum) do: [:i | padded at: i put: (padded at: i) + 1].\\\\n\\\\t^ padded\\\\n\\\\t\\\\n\\\\t! !\\\\n\\\\n!OBPaneScroller methodsFor: 'layout' stamp: 'cwp 2/8/2004 11:03'!\\\\nresizeScrollBar\\\\n\\\\t| inner outer |\\\\n\\\\touter _ super innerBounds.\\\\n\\\\tinner _ outer withHeight: outer height - self scrollBarHeight - 1.\\\\n\\\\tscrollBar bounds: ((inner left @ inner bottom + 1)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: outer bottomRight)! !\\\\n\\\\n!OBPaneScroller methodsFor: 'layout' stamp: 'cwp 8/24/2003 14:29'!\\\\nscrollBarHeight\\\\n\\\\t^ 12! !\\\\n\\\\n!OBPaneScroller methodsFor: 'layout' stamp: 'cwp 2/25/2004 20:23'!\\\\ntotalPaneWidth\\\\n\\\\t^ self innerBounds width - ((self sizing - 1) * self separatorWidth)! !\\\\n\\\\n\\\\n!OBPaneScroller methodsFor: 'panes' stamp: 'cwp 12/6/2003 17:06'!\\\\nclearPanes\\\\n\\\\ttransform removeAllMorphs! !\\\\n\\\\n!OBPaneScroller methodsFor: 'panes' stamp: 'cwp 11/23/2004 01:22'!\\\\npopPanes: count\\\\n\\\\tcount * 2 timesRepeat: [transform removeMorph: transform lastSubmorph].\\\\n\\\\tpanes removeLast: count! !\\\\n\\\\n!OBPaneScroller methodsFor: 'panes' stamp: 'cwp 11/17/2004 22:46'!\\\\npushPane: aMorph\\\\n\\\\taMorph \\\\n\\\\t\\\\tborderWidth: 0;\\\\n\\\\t\\\\thResizing: #rigid;\\\\n\\\\t\\\\tvResizing: #rigid;\\\\n\\\\t\\\\tlayoutInset: 0.\\\\n\\\\ttransform hasSubmorphs ifTrue: [transform addMorphBack: self separator].\\\\n\\\\ttransform addMorphBack: aMorph.\\\\n! !\\\\n\\\\n!OBPaneScroller methodsFor: 'panes' stamp: 'cwp 11/27/2004 01:03'!\\\\nseparator\\\\n\\\\t^ BorderedSubpaneDividerMorph vertical \\\\n\\\\t\\\\tborderWidth: self separatorWidth / 2;\\\\n\\\\t\\\\tcolor: model defaultBackgroundColor duller;\\\\n\\\\t\\\\tborderRaised.! !\\\\n\\\\n\\\\n!OBPaneScroller methodsFor: 'scrolling' stamp: 'cwp 2/8/2004 10:44'!\\\\nhideOrShowScrollBar\\\\n\\\\tself isScrollable ifTrue: [self showScrollBar] ifFalse: [self hideScrollBar]! !\\\\n\\\\n!OBPaneScroller methodsFor: 'scrolling' stamp: 'cwp 2/8/2004 11:10'!\\\\nhideScrollBar\\\\n\\\\tself removeMorph: scrollBar.\\\\n\\\\tself adjustPaneHeight.! !\\\\n\\\\n!OBPaneScroller methodsFor: 'scrolling' stamp: 'cwp 2/8/2004 10:42'!\\\\nisScrollable\\\\n\\\\t^ self leftoverScrollRange > 0! !\\\\n\\\\n!OBPaneScroller methodsFor: 'scrolling' stamp: 'cwp 8/25/2003 21:04'!\\\\nleftoverScrollRange\\\\n\\\\t^ (self totalScrollRange - self innerBounds width roundTo: self scrollDeltaWidth) max: 0\\\\n! !\\\\n\\\\n!OBPaneScroller methodsFor: 'scrolling' stamp: 'cwp 2/8/2004 10:56'!\\\\nscrollBarIsVisible\\\\n\\\\t^ submorphs includes: scrollBar! !\\\\n\\\\n!OBPaneScroller methodsFor: 'scrolling' stamp: 'cwp 8/23/2003 16:21'!\\\\nscrollDeltaWidth\\\\n\\\\t^ 1! !\\\\n\\\\n!OBPaneScroller methodsFor: 'scrolling' stamp: 'cwp 12/8/2003 21:42'!\\\\nscrollToRight\\\\n\\\\t^ scrollBar setValue: 1.! !\\\\n\\\\n!OBPaneScroller methodsFor: 'scrolling' stamp: 'cwp 8/25/2003 21:14'!\\\\nsetScrollDeltas\\\\n\\\\t| range interval value |\\\\n\\\\ttransform hasSubmorphs ifFalse: [scrollBar interval: 1.0. ^ self].\\\\n\\\\trange _ self leftoverScrollRange.\\\\n\\\\trange = 0 ifTrue: [^ scrollBar interval: 1.0; setValue: 0].\\\\n\\\\tinterval _ ((self innerBounds width) / self totalScrollRange) asFloat.\\\\n\\\\tvalue _ (transform offset x / range min: 1.0) asFloat.\\\\n\\\\tscrollBar interval: interval.\\\\n\\\\tscrollBar setValue: value.! !\\\\n\\\\n!OBPaneScroller methodsFor: 'scrolling' stamp: 'cwp 2/8/2004 11:11'!\\\\nshowScrollBar\\\\n\\\\tself scrollBarIsVisible ifTrue: [^ self].\\\\n\\\\tself resizeScrollBar.\\\\n\\\\tself addMorphFront: scrollBar.\\\\n\\\\tself adjustPaneHeight.\\\\n\\\\t! !\\\\n\\\\n!OBPaneScroller methodsFor: 'scrolling' stamp: 'cwp 8/25/2003 19:27'!\\\\ntotalScrollRange\\\\n\\\\t| submorphBounds |\\\\n\\\\tsubmorphBounds := transform localSubmorphBounds ifNil: [^ 0].\\\\n\\\\t^ submorphBounds width\\\\n! !\\\\n\\\\n\\\\n!OBPaneScroller methodsFor: 'stepping' stamp: 'cwp 11/21/2004 15:38'!\\\\nstep\\\\n\\\\tself reclaimPanes! !\\\\n\\\\n!OBPaneScroller methodsFor: 'stepping' stamp: 'cwp 11/24/2004 22:29'!\\\\nstepTime\\\\n\\\\t^ 250! !\\\\n\\\\n\\\\n!OBPaneScroller methodsFor: 'updating' stamp: 'cwp 11/23/2004 01:23'!\\\\nreclaimPanes\\\\n\\\\t| reclaimed |\\\\n\\\\treclaimed := model reclaimPanes.\\\\n\\\\treclaimed isZero\\\\tifFalse: \\\\n\\\\t\\\\t[self \\\\n\\\\t\\\\t \\\\tpopPanes: reclaimed;\\\\n\\\\t\\\\t\\\\tbasicUpdateSizing;\\\\n\\\\t\\\\t\\\\tlayoutPanes;\\\\n\\\\t\\\\t\\\\thideOrShowScrollBar;\\\\n\\\\t\\\\t\\\\tsetScrollDeltas]! !\\\\n\\\\n!OBPaneScroller methodsFor: 'updating' stamp: 'cwp 11/21/2004 13:51'!\\\\nscrollBarValue: value\\\\n\\\\ttransform hasSubmorphs ifFalse: [^ self].\\\\n\\\\ttransform offset: (self leftoverScrollRange * value) rounded @ 0.! !\\\\n\\\\n!OBPaneScroller methodsFor: 'updating' stamp: 'cwp 11/23/2004 01:34'!\\\\nupdatePanes\\\\n\\\\t| count |\\\\n\\\\tmodel ifNil: [panes := Array new. ^ self].\\\\n\\\\tcount := panes ifNotNil: [panes size] ifNil: [0].\\\\n\\\\tself basicUpdatePanes.\\\\n\\\\tself basicUpdateSizing.\\\\t\\\\n\\\\tself layoutPanes.\\\\n\\\\tpanes size = count\\\\n\\\\t\\\\tifFalse: [self hideOrShowScrollBar.\\\\n\\\\t\\\\t\\\\t\\\\tself setScrollDeltas].\\\\n\\\\tpanes size > count ifTrue: [self scrollToRight].\\\\n\\\\t^ panes! !\\\\n\\\\n!OBPaneScroller methodsFor: 'updating' stamp: 'cwp 11/23/2004 01:14'!\\\\nupdateSizing\\\\n\\\\t| old |\\\\n\\\\told := sizing.\\\\n\\\\tself basicUpdateSizing.\\\\n\\\\tsizing = old ifFalse: [self layoutPanes].\\\\n\\\\t^sizing! !\\\\n\\\\n!OBPaneScroller methodsFor: 'updating' stamp: 'cwp 11/17/2004 22:40'!\\\\nupdate: aSymbol\\\\n\\\\taSymbol = #sizing ifTrue: [^ self updateSizing].\\\\n\\\\taSymbol = #panes ifTrue: [^ self updatePanes].! !\\\\n\\\\n\\\\n!OBPaneScroller methodsFor: 'private' stamp: 'cwp 11/23/2004 01:31'!\\\\nbasicUpdatePanes\\\\n\\\\tpanes := model ifNotNil: [model panes] ifNil: [Array new].\\\\t\\\\t\\\\n\\\\tself clearPanes.\\\\n\\\\tpanes do: [:ea | self pushPane: ea].\\\\n! !\\\\n\\\\n!OBPaneScroller methodsFor: 'private' stamp: 'cwp 11/23/2004 01:14'!\\\\nbasicUpdateSizing\\\\n\\\\tmodel ifNil: [sizing := 1] ifNotNil: [sizing := model sizing]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBPaneScroller class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBPaneScroller class methodsFor: 'as yet unclassified' stamp: 'cwp 11/17/2004 22:01'!\\\\nwithModel: aModel\\\\n\\\\t^ self new model: aModel! !\\\\nObject subclass: #OBPanel\\\\n\\\\tinstanceVariableNames: 'browser'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Kernel'!\\\\n!OBPanel commentStamp: 'cwp 1/7/2005 23:23' prior: 0!\\\\nA panel is an object that manages part of the browser's window. It provides a protocol for receiving notifications when the current domain node changes, and reacts to these changes.!\\\\n\\\\n\\\\n!OBPanel methodsFor: 'accessing' stamp: 'cwp 4/17/2006 15:52'!\\\\nannouncer\\\\n\\\\t^ browser announcer! !\\\\n\\\\n!OBPanel methodsFor: 'accessing' stamp: 'cwp 11/16/2004 21:58'!\\\\nbrowser\\\\n\\\\t^ browser! !\\\\n\\\\n!OBPanel methodsFor: 'accessing' stamp: 'cwp 4/17/2006 22:17'!\\\\nbrowser: aBrowser\\\\n\\\\tbrowser _ aBrowser.\\\\n\\\\tself subscribe! !\\\\n\\\\n\\\\n!OBPanel methodsFor: 'testing' stamp: 'cwp 11/20/2004 21:09'!\\\\nisNavigation\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!OBPanel methodsFor: 'updating' stamp: 'cwp 4/17/2006 19:36'!\\\\nsubscribe! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBPanel class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBPanel class methodsFor: 'instance creation' stamp: 'cwp 8/31/2004 10:46'!\\\\ninBrowser: aBrowser\\\\n\\\\t^ self new browser: aBrowser! !\\\\nPluggableTextMorph subclass: #OBPluggableTextMorph\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Morphic'!\\\\n!OBPluggableTextMorph commentStamp: 'cwp 12/7/2004 00:04' prior: 0!\\\\nThis is a trivial subclass of PluggableTextMorph. It overrides initialization methods to use an OBTextMorph rather than a regular TextMorph!\\\\n\\\\n\\\\n!OBPluggableTextMorph methodsFor: 'event handling' stamp: 'cwp 10/30/2004 23:07'!\\\\nkeyStroke: evt\\\\n\\\\t^ textMorph keyStroke: evt! !\\\\n\\\\n\\\\n!OBPluggableTextMorph methodsFor: 'model access' stamp: 'cwp 10/30/2004 22:57'!\\\\nsetText: aText\\\\n\\\\tscrollBar setValue: 0.0.\\\\n\\\\ttextMorph\\\\n\\\\t\\\\tifNil: [textMorph _ OBTextMorph new\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcontents: aText wrappedTo: self innerBounds width-6.\\\\n\\\\t\\\\t\\\\t\\\\ttextMorph setEditView: self.\\\\n\\\\t\\\\t\\\\t\\\\tscroller addMorph: textMorph]\\\\n\\\\t\\\\tifNotNil: [textMorph newContents: aText].\\\\n\\\\tself hasUnacceptedEdits: false.\\\\n\\\\tself setScrollDeltas.! !\\\\nRectangleMorph subclass: #OBRadioButtonBar\\\\n\\\\tinstanceVariableNames: 'model buttons selection getListSelector getSelectionSelector setSelectionSelector'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Morphic'!\\\\n!OBRadioButtonBar commentStamp: 'cwp 1/7/2005 23:27' prior: 0!\\\\nAn OBRadioButtonBar is similar to a PluggableListMorph except that it displays a row of buttons rather than a vertical list. Clicking on a button selects it.\\\\n\\\\nmodel\\\\t\\\\t\\\\t\\\\t- the model for this button bar\\\\nbuttons\\\\t\\\\t\\\\t- a collection of OBButtonModels, which are derived from the model's list\\\\nselection\\\\t\\\\t\\\\t- the index of the currently selected button\\\\ngetListSelector\\\\t \\\\t- the message for getting the list of labels for the buttons\\\\ngetSelectionSelector\\\\t- the message for getting the index of the currently selected item\\\\nsetSelectionSelector\\\\t- the message for informing the model that a button has been clicked!\\\\n\\\\n\\\\n!OBRadioButtonBar methodsFor: 'accessing' stamp: 'cwp 11/27/2004 02:09'!\\\\nlist\\\\n\\\\tbuttons ifNil: \\\\n\\\\t\\\\t\\\\t[| labels |\\\\n\\\\t\\\\t\\\\tlabels := model perform: getListSelector.\\\\n\\\\t\\\\t\\\\tbuttons := Array new: labels size.\\\\n\\\\t\\\\t\\\\tlabels withIndexDo: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:label :index | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbuttons at: index put: (OBButtonModel withLabel: label inBar: self)].\\\\n\\\\t\\\\t\\\\tselection := self getSelectionIndex.\\\\n\\\\t\\\\t\\\\tself].\\\\n\\\\t^buttons collect: [:b | b label]! !\\\\n\\\\n\\\\n!OBRadioButtonBar methodsFor: 'callbacks' stamp: 'cwp 11/27/2004 19:18'!\\\\nisEnabled: aButton\\\\n\\\\t^ true! !\\\\n\\\\n!OBRadioButtonBar methodsFor: 'callbacks' stamp: 'cwp 2/24/2004 18:54'!\\\\nisSelected: aButton\\\\n\\\\t^ (buttons at: selection ifAbsent: [^ false]) == aButton! !\\\\n\\\\n!OBRadioButtonBar methodsFor: 'callbacks' stamp: 'cwp 2/24/2004 18:47'!\\\\npush: aButton\\\\n\\\\t| index |\\\\n\\\\tindex _ buttons indexOf: aButton.\\\\n\\\\tmodel perform: setSelectionSelector with: index.! !\\\\n\\\\n\\\\n!OBRadioButtonBar methodsFor: 'constructing' stamp: 'cwp 11/27/2004 20:58'!\\\\nadoptPaneColor: aColor\\\\n\\\\tself submorphs do: [:ea | ea onColor: aColor darker offColor: aColor lighter]! !\\\\n\\\\n!OBRadioButtonBar methodsFor: 'constructing' stamp: 'cwp 11/27/2004 21:02'!\\\\nnoteNewOwner: aMorph\\\\n\\\\t| window |\\\\n\\\\twindow := aMorph containingWindow.\\\\n\\\\twindow ifNotNil: [self adoptPaneColor: window paneColor]! !\\\\n\\\\n\\\\n!OBRadioButtonBar methodsFor: 'initialize-release' stamp: 'lr 3/23/2006 18:10'!\\\\ninitGeometry\\\\n\\\\tself\\\\n\\\\t\\\\tlayoutPolicy: TableLayout new;\\\\n\\\\t\\\\tlistDirection: #leftToRight;\\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tvResizing: #spaceFill;\\\\n\\\\t\\\\trubberBandCells: true;\\\\n\\\\t\\\\tcolor: Color transparent;\\\\n\\\\t\\\\tborderWidth: 0;\\\\n\\\\t\\\\tlayoutInset: 2;\\\\n\\\\t\\\\tcellInset: 2\\\\n! !\\\\n\\\\n!OBRadioButtonBar methodsFor: 'initialize-release' stamp: 'cwp 2/22/2004 16:51'!\\\\nmodel: aModel\\\\n\\\\tmodel ifNotNil: [model removeDependent: self].\\\\n\\\\tmodel _ aModel.\\\\n\\\\tmodel addDependent: self.! !\\\\n\\\\n!OBRadioButtonBar methodsFor: 'initialize-release' stamp: 'cwp 2/25/2004 00:36'!\\\\non: aModel list: listSelector selected: selectionGetter changeSelected: selectionSetter \\\\n\\\\tself model: aModel.\\\\n\\\\tselection _ 0.\\\\n\\\\tgetListSelector _ listSelector.\\\\n\\\\tgetSelectionSelector _ selectionGetter.\\\\n\\\\tsetSelectionSelector _ selectionSetter.\\\\n\\\\tself initGeometry.\\\\n\\\\tself updateList.! !\\\\n\\\\n\\\\n!OBRadioButtonBar methodsFor: 'updating' stamp: 'cwp 2/24/2004 18:53'!\\\\ngetSelectionIndex\\\\n\\\\t^ model perform: getSelectionSelector! !\\\\n\\\\n!OBRadioButtonBar methodsFor: 'updating' stamp: 'cwp 11/27/2004 17:58'!\\\\nupdateButtons\\\\n\\\\t| labels |\\\\n\\\\tlabels := model perform: getListSelector.\\\\n\\\\tbuttons := Array new: labels size.\\\\n\\\\tlabels withIndexDo: \\\\n\\\\t\\\\t\\\\t[:label :index | \\\\n\\\\t\\\\t\\\\tbuttons at: index put: (OBButtonModel withLabel: label inBar: self)].\\\\n\\\\tselection := self getSelectionIndex! !\\\\n\\\\n!OBRadioButtonBar methodsFor: 'updating' stamp: 'cwp 11/27/2004 17:58'!\\\\nupdateList\\\\n\\\\tself \\\\n\\\\t\\\\tupdateButtons; \\\\n\\\\t\\\\tupdateMorphs! !\\\\n\\\\n!OBRadioButtonBar methodsFor: 'updating' stamp: 'cwp 11/2/2004 01:09'!\\\\nupdateMorphs\\\\n\\\\tself removeAllMorphs.\\\\n\\\\tbuttons do: [:button | self addMorphBack: button morph].\\\\n\\\\tself bounds: (self bounds withHeight: submorphs first height)! !\\\\n\\\\n!OBRadioButtonBar methodsFor: 'updating' stamp: 'cwp 2/24/2004 19:39'!\\\\nupdateSelection\\\\n\\\\t| oldSelection |\\\\n\\\\toldSelection _ selection.\\\\n\\\\tselection _ self getSelectionIndex.\\\\n\\\\tself withButtonAt: oldSelection do: [:button | button selectionChanged].\\\\n\\\\tself withSelectedButtonDo: [:button | button selectionChanged]! !\\\\n\\\\n!OBRadioButtonBar methodsFor: 'updating' stamp: 'cwp 2/25/2004 00:35'!\\\\nupdate: aSymbol\\\\n\\\\taSymbol = getListSelector ifTrue: [self updateList. ^ self].\\\\n\\\\taSymbol = getSelectionSelector ifTrue: [self updateSelection]! !\\\\n\\\\n!OBRadioButtonBar methodsFor: 'updating' stamp: 'cwp 2/24/2004 19:38'!\\\\nwithButtonAt: index do: aBlock\\\\n\\\\t^ (buttons at: index ifAbsent: [nil]) ifNotNilDo: aBlock! !\\\\n\\\\n!OBRadioButtonBar methodsFor: 'updating' stamp: 'cwp 2/24/2004 19:38'!\\\\nwithSelectedButtonDo: aBlock\\\\n\\\\t^ self withButtonAt: selection do: aBlock! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBRadioButtonBar class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBRadioButtonBar class methodsFor: 'as yet unclassified' stamp: 'cwp 2/22/2004 16:44'!\\\\non: aModel list: listSelector selected: selectionSelector changeSelected: changedSelector \\\\n\\\\t^ self new\\\\n\\\\t\\\\t\\\\ton: aModel\\\\n\\\\t\\\\t\\\\tlist: listSelector\\\\n\\\\t\\\\t\\\\tselected: selectionSelector\\\\n\\\\t\\\\t\\\\tchangeSelected: changedSelector! !\\\\nOBListBrowser subclass: #OBReferencesBrowser\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Browsers'!\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBReferencesBrowser class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBReferencesBrowser class methodsFor: 'as yet unclassified' stamp: 'avi 9/17/2005 01:22'!\\\\ndefaultMetaNode\\\\n\\\\t| class method |\\\\n\\\\tclass := OBMetaNode named: 'Class'.\\\\n\\\\tmethod := OBMetaNode named: 'References'.\\\\n\\\\t\\\\n\\\\tclass\\\\n\\\\t\\\\tchildAt: #users put: method;\\\\n\\\\t\\\\taddActor: OBNodeActor new.\\\\n\\\\tmethod\\\\n\\\\t\\\\tdisplaySelector: #fullName;\\\\n\\\\t\\\\taddActor: OBNodeActor new.\\\\n\\\\t\\\\t\\\\n\\\\t^ class! !\\\\n\\\\n!OBReferencesBrowser class methodsFor: 'as yet unclassified' stamp: 'avi 9/17/2005 01:34'!\\\\ntitle\\\\n\\\\t^ 'References to'! !\\\\nOBAnnouncement subclass: #OBRefreshRequired\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Announcements'!\\\\nObject subclass: #OBRequestor\\\\n\\\\tinstanceVariableNames: 'node browser'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Services'!\\\\n\\\\n!OBRequestor methodsFor: 'as yet unclassified' stamp: 'cwp 6/29/2006 00:12'!\\\\nannounce: anObject\\\\n\\\\t^ browser announcer announce: anObject! !\\\\n\\\\n!OBRequestor methodsFor: 'as yet unclassified' stamp: 'cwp 6/28/2006 00:41'!\\\\nbrowser: aBrowser\\\\n\\\\tbrowser _ aBrowser! !\\\\n\\\\n!OBRequestor methodsFor: 'as yet unclassified' stamp: 'cwp 6/28/2006 00:43'!\\\\ndoesNotUnderstand: aMessage\\\\n\\\\t^ aMessage sendTo: browser! !\\\\n\\\\n!OBRequestor methodsFor: 'as yet unclassified' stamp: 'cwp 6/28/2006 00:43'!\\\\nnode: aNode\\\\n\\\\tnode _ aNode! !\\\\n\\\\n!OBRequestor methodsFor: 'as yet unclassified' stamp: 'cwp 6/28/2006 00:38'!\\\\nrequestNode\\\\n\\\\t^ node! !\\\\n\\\\n!OBRequestor methodsFor: 'as yet unclassified' stamp: 'cwp 6/29/2006 00:12'!\\\\nselect: aNode\\\\n\\\\t(self announce: OBAboutToChange)\\\\n\\\\t\\\\tisVetoed ifFalse: [self announce: (OBSelectingNode node: aNode)]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBRequestor class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBRequestor class methodsFor: 'as yet unclassified' stamp: 'cwp 6/28/2006 00:40'!\\\\nfor: aBrowser\\\\n\\\\t^ self new browser: aBrowser! !\\\\nSlider subclass: #OBScrollBar\\\\n\\\\tinstanceVariableNames: 'upButton downButton pagingArea scrollDelta pageDelta interval menuSelector timeOfMouseDown timeOfLastScroll nextPageDirection currentScrollDelay'\\\\n\\\\tclassVariableNames: 'CachedImages UpArrow UpArrow8Bit'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Morphic'!\\\\n!OBScrollBar commentStamp: 'cwp 3/5/2004 12:01' prior: 0!\\\\nThis class is a relic. It was originally created to work around bugs in ScrollBar which prevented it from working correctly in horizontal orientation. At some point the bugs should be fixed, and ScrollBar should be used instead.!\\\\n\\\\n\\\\n!OBScrollBar methodsFor: 'access' stamp: 'cwp 11/23/2003 18:06'!\\\\ninterval: d\\\\n\\\\t\\\\\\\"Supply an optional floating fraction so slider can expand to indicate range\\\\\\\"\\\\n\\\\tinterval _ d min: 1.0.\\\\n\\\\tself expandSlider.\\\\n\\\\tself computeSlider.! !\\\\n\\\\n!OBScrollBar methodsFor: 'access' stamp: 'cwp 11/23/2003 18:06'!\\\\npagingArea\\\\n\\\\t^pagingArea! !\\\\n\\\\n!OBScrollBar methodsFor: 'access' stamp: 'md 2/24/2006 21:25'!\\\\nroundedScrollbarLook\\\\n\\\\t\\\\\\\"Rounded look currently only shows up in flop-out mode\\\\\\\"\\\\n\\\\t^false and: [self class alwaysShowFlatScrollbarForAlternativeLook not]\\\\n! !\\\\n\\\\n!OBScrollBar methodsFor: 'access' stamp: 'cwp 11/23/2003 18:06'!\\\\nscrollDelta\\\\n\\\\t^ scrollDelta! !\\\\n\\\\n!OBScrollBar methodsFor: 'access' stamp: 'cwp 11/23/2003 18:06'!\\\\nscrollDelta: d1 pageDelta: d2\\\\n\\\\t\\\\\\\"Supply optional increments for better scrolling of, eg, text\\\\\\\"\\\\n\\\\tscrollDelta _ d1.\\\\n\\\\tpageDelta _ d2.! !\\\\n\\\\n!OBScrollBar methodsFor: 'access' stamp: 'md 2/24/2006 16:26'!\\\\nsliderColor: aColor\\\\n\\\\t\\\\\\\"Change the color of the scrollbar to go with aColor.\\\\\\\"\\\\n\\\\t| buttonColor |\\\\n\\\\tsuper sliderColor: aColor.\\\\n\\\\tbuttonColor _ self thumbColor.\\\\n\\\\tupButton color: buttonColor.\\\\n\\\\tdownButton color: buttonColor.\\\\n\\\\tslider color: buttonColor.\\\\n\\\\tself roundedScrollbarLook\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[self color: Color transparent.\\\\n\\\\t\\\\t\\\\t\\\\tpagingArea color: aColor muchLighter.\\\\n\\\\t\\\\t\\\\t\\\\tself borderStyle style == #simple \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue:[self borderColor: aColor darker darker]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse:[self borderStyle baseColor: aColor]]\\\\n\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[pagingArea color: (aColor alphaMixed: 0.3 with: Color white).\\\\n\\\\t\\\\t\\\\t\\\\tself borderWidth: 0]\\\\n! !\\\\n\\\\n!OBScrollBar methodsFor: 'access' stamp: 'cwp 11/23/2003 18:06'!\\\\nsliderShadowColor\\\\n\\\\t^ self roundedScrollbarLook\\\\n\\\\t\\\\tifTrue: [self sliderColor darker]\\\\n\\\\t\\\\tifFalse: [super sliderShadowColor]\\\\n! !\\\\n\\\\n!OBScrollBar methodsFor: 'access' stamp: 'md 2/24/2006 16:27'!\\\\nthumbColor\\\\n\\\\t\\\\\\\"Problem: Part of the ScrollBar/Slider code uses 'slider' to mean the entire scrollbar/slider widget, and part of it uses 'slider' to mean only the draggable 'thumb'.  This should be cleaned up so that 'thumb' is used instead of 'slider' where appropriate.  For now, the meaning of thumbColor is clear, at least.\\\\\\\"\\\\n\\\\n\\\\t^self sliderColor alphaMixed: 0.7 with: (Color gray: 0.95).! !\\\\n\\\\n\\\\n!OBScrollBar methodsFor: 'accessing' stamp: 'md 2/24/2006 16:12'!\\\\nadoptPaneColor: aColor\\\\n\\\\t\\\\\\\"Adopt the given pane color\\\\\\\"\\\\n\\\\taColor ifNil:[^self].\\\\n\\\\tself sliderColor: aColor.! !\\\\n\\\\n!OBScrollBar methodsFor: 'accessing' stamp: 'cwp 11/23/2003 18:06'!\\\\ncachedImageAt: aKey ifAbsentPut: aBlock\\\\n\\\\n\\\\tCachedImages ifNil: [CachedImages _ Dictionary new].\\\\n\\\\t^CachedImages at: aKey ifAbsentPut: aBlock! !\\\\n\\\\n\\\\n!OBScrollBar methodsFor: 'geometry' stamp: 'cwp 11/23/2003 18:06'!\\\\nbuttonExtent\\\\n\\\\t^ bounds isWide\\\\n\\\\t\\\\tifTrue: [11 @ self innerBounds height]\\\\n\\\\t\\\\tifFalse: [self innerBounds width @ 11]! !\\\\n\\\\n!OBScrollBar methodsFor: 'geometry' stamp: 'cwp 11/23/2003 18:06'!\\\\nexpandSlider\\\\n\\\\t\\\\\\\"Compute the new size of the slider (use the old sliderThickness as a minimum).\\\\\\\"\\\\n\\\\t| r |\\\\n\\\\tr _ self totalSliderArea.\\\\n\\\\tslider extent: (bounds isWide\\\\n\\\\t\\\\tifTrue: [((r width * interval) asInteger max: self sliderThickness) @ slider height]\\\\n\\\\t\\\\tifFalse: [slider width @ ((r height * interval) asInteger max: self sliderThickness)])! !\\\\n\\\\n!OBScrollBar methodsFor: 'geometry' stamp: 'cwp 11/23/2003 18:06'!\\\\nextent: p\\\\n        p x > p y\\\\n                ifTrue: [super extent: (p max: 42@8)]\\\\n                ifFalse: [super extent: (p max: 8@42)]! !\\\\n\\\\n!OBScrollBar methodsFor: 'geometry' stamp: 'cwp 11/23/2003 18:06'!\\\\nsliderExtent\\\\n\\\\t\\\\\\\"The sliderExtent is now stored in the slider itself, not hardcoded as it is in the superclass.\\\\\\\"\\\\n\\\\t^slider extent! !\\\\n\\\\n!OBScrollBar methodsFor: 'geometry' stamp: 'cwp 11/23/2003 18:07'!\\\\nsliderThickness\\\\n\\\\t^ self roundedScrollbarLook ifTrue:[15] ifFalse:[super sliderThickness]! !\\\\n\\\\n!OBScrollBar methodsFor: 'geometry' stamp: 'cwp 11/23/2003 18:07'!\\\\ntotalSliderArea\\\\n\\\\t| upperBoundsButton |\\\\n\\\\tupperBoundsButton _ upButton.\\\\n\\\\tupButton bottom > upperBoundsButton bottom\\\\n\\\\t\\\\tifTrue: [upperBoundsButton _ upButton].\\\\n\\\\t^ bounds isWide\\\\n\\\\t\\\\tifTrue: [upperBoundsButton bounds topRight corner: downButton bounds bottomLeft]\\\\n\\\\t\\\\tifFalse: [upperBoundsButton bounds bottomLeft corner: downButton bounds topRight].\\\\n! !\\\\n\\\\n\\\\n!OBScrollBar methodsFor: 'initialization' stamp: 'cwp 11/23/2003 18:07'!\\\\ninitialize\\\\n\\\\tsuper initialize.\\\\n\\\\tscrollDelta _ 0.02.\\\\n\\\\tpageDelta _ 0.2.\\\\n\\\\tself roundedScrollbarLook ifTrue:[\\\\n\\\\t\\\\tself borderStyle: ((BorderStyle complexFramed width: 2) \\\\\\\"baseColor: Color gray\\\\\\\")].! !\\\\n\\\\n\\\\n!OBScrollBar methodsFor: 'initialize' stamp: 'cwp 11/23/2003 18:06'!\\\\ninitializeDownButton\\\\n\\\\tdownButton := RectangleMorph\\\\n\\\\t\\\\tnewBounds: (self innerBounds bottomRight - self buttonExtent extent: self buttonExtent)\\\\n\\\\t\\\\tcolor: self thumbColor.\\\\n\\\\tdownButton on: #mouseDown send: #scrollDownInit to: self.\\\\n\\\\tdownButton on: #mouseUp send: #finishedScrolling to: self.\\\\n\\\\tdownButton addMorphCentered: (ImageMorph new image: \\\\n\\\\t\\\\t(self \\\\n\\\\t\\\\t\\\\tcachedImageAt: (bounds isWide ifTrue: ['right'] ifFalse: ['down']) \\\\n\\\\t\\\\t\\\\tifAbsentPut: [\\\\n\\\\t\\\\t\\\\t\\\\tself upArrow8Bit\\\\n\\\\t\\\\t\\\\t\\\\t\\\\trotateBy: (bounds isWide ifTrue: [#right] ifFalse: [#pi])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcenterAt: 0@0\\\\n\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t)\\\\n\\\\t).\\\\n\\\\tself roundedScrollbarLook ifTrue:[\\\\n\\\\t\\\\tdownButton color: Color veryLightGray.\\\\n\\\\t\\\\tdownButton borderStyle: (BorderStyle complexRaised width: 3).\\\\n\\\\t] ifFalse:[\\\\n\\\\t\\\\tdownButton setBorderWidth: 1 borderColor: #raised.\\\\n\\\\t].\\\\n\\\\tself addMorph: downButton.\\\\n! !\\\\n\\\\n!OBScrollBar methodsFor: 'initialize' stamp: 'cwp 11/23/2003 18:06'!\\\\ninitializeEmbedded: aBool\\\\n\\\\t\\\\\\\"aBool == true => inboard scrollbar\\\\n\\\\taBool == false => flop-out scrollbar\\\\\\\"\\\\n\\\\tself roundedScrollbarLook ifFalse:[^self].\\\\n\\\\taBool ifTrue:[\\\\n\\\\t\\\\tself borderStyle: (BorderStyle inset width: 2).\\\\n\\\\t\\\\tself cornerStyle: #square.\\\\n\\\\t] ifFalse:[\\\\n\\\\t\\\\tself borderStyle: (BorderStyle width: 1 color: Color black).\\\\n\\\\t\\\\tself cornerStyle: #rounded.\\\\n\\\\t].\\\\n\\\\tself removeAllMorphs.\\\\n\\\\tself initializeSlider.! !\\\\n\\\\n!OBScrollBar methodsFor: 'initialize' stamp: 'cwp 11/23/2003 18:06'!\\\\ninitializePagingArea\\\\n\\\\tpagingArea := RectangleMorph newBounds: self totalSliderArea\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcolor: (Color r: 0.6 g: 0.6 b: 0.8).\\\\n\\\\tpagingArea borderWidth: 0.\\\\n\\\\tpagingArea on: #mouseDown send: #scrollPageInit: to: self.\\\\n\\\\tpagingArea on: #mouseUp send: #finishedScrolling to: self.\\\\n\\\\tself addMorph: pagingArea.\\\\n\\\\tself roundedScrollbarLook \\\\n\\\\t\\\\tifTrue:[pagingArea color: (Color gray: 0.9)].! !\\\\n\\\\n!OBScrollBar methodsFor: 'initialize' stamp: 'cwp 11/23/2003 18:06'!\\\\ninitializeSlider\\\\n\\\\tself roundedScrollbarLook ifTrue:[\\\\n\\\\t\\\\tself \\\\n\\\\t\\\\t\\\\tinitializeUpButton;\\\\n\\\\t\\\\t\\\\tinitializeDownButton;\\\\n\\\\t\\\\t\\\\tinitializePagingArea.\\\\n\\\\t] ifFalse:[\\\\n\\\\t\\\\tself initializeUpButton; \\\\n\\\\t\\\\t\\\\tinitializeDownButton; \\\\n\\\\t\\\\t\\\\tinitializePagingArea.\\\\n\\\\t].\\\\n\\\\tsuper initializeSlider.\\\\n\\\\tself roundedScrollbarLook ifTrue:[\\\\n\\\\t\\\\tslider cornerStyle: #rounded.\\\\n\\\\t\\\\tslider borderStyle: (BorderStyle complexRaised width: 3).\\\\n\\\\t\\\\tsliderShadow cornerStyle: #rounded.\\\\n\\\\t].\\\\n\\\\tself sliderColor: self sliderColor.! !\\\\n\\\\n!OBScrollBar methodsFor: 'initialize' stamp: 'cwp 11/23/2003 18:06'!\\\\ninitializeUpButton\\\\n\\\\tupButton := self roundedScrollbarLook \\\\n\\\\t\\\\t\\\\t\\\\tifTrue:  \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[RectangleMorph \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnewBounds: (self innerBounds topLeft extent: self buttonExtent)]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[RectangleMorph \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnewBounds: ((self innerBounds topLeft) extent: self buttonExtent)].\\\\n\\\\tupButton color: self thumbColor.\\\\n\\\\tupButton \\\\n\\\\t\\\\ton: #mouseDown\\\\n\\\\t\\\\tsend: #scrollUpInit\\\\n\\\\t\\\\tto: self.\\\\n\\\\tupButton \\\\n\\\\t\\\\ton: #mouseUp\\\\n\\\\t\\\\tsend: #finishedScrolling\\\\n\\\\t\\\\tto: self.\\\\n\\\\tupButton \\\\n\\\\t\\\\taddMorphCentered: (ImageMorph new image: (self \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcachedImageAt: (bounds isWide ifTrue: ['left'] ifFalse: ['up'])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifAbsentPut: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[bounds isWide \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self upArrow8Bit rotateBy: #left centerAt: 0 @ 0]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [self upArrow8Bit]])).\\\\n\\\\tself roundedScrollbarLook \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[upButton color: Color veryLightGray.\\\\n\\\\t\\\\t\\\\tupButton borderStyle: (BorderStyle complexRaised width: 3)]\\\\n\\\\t\\\\tifFalse: [upButton setBorderWidth: 1 borderColor: #raised].\\\\n\\\\tself addMorph: upButton! !\\\\n\\\\n!OBScrollBar methodsFor: 'initialize' stamp: 'cwp 11/23/2003 18:06'!\\\\nupArrow8Bit\\\\n\\\\n\\\\t\\\\\\\"convert to 8-bit and convert white to transparent to avoid gratuitous conversion every time we put one in an ImageMorph\\\\\\\"\\\\n\\\\n\\\\t^UpArrow8Bit ifNil: [\\\\n\\\\t\\\\tUpArrow8Bit _ (ColorForm mappingWhiteToTransparentFrom: UpArrow) asFormOfDepth: 8\\\\n\\\\t]! !\\\\n\\\\n\\\\n!OBScrollBar methodsFor: 'model access' stamp: 'cwp 11/23/2003 18:06'!\\\\nsetValue: newValue\\\\n\\\\t\\\\\\\"Using roundTo: instead of truncateTo: ensures that scrollUp will scroll the same distance as scrollDown.\\\\\\\"\\\\n\\\\t^ super setValue: (newValue roundTo: scrollDelta)! !\\\\n\\\\n\\\\n!OBScrollBar methodsFor: 'other events' stamp: 'cwp 11/23/2003 18:06'!\\\\nmenuButtonMouseDown: event\\\\n\\\\tevent hand showTemporaryCursor: nil.\\\\n\\\\tself use: menuSelector orMakeModelSelectorFor: 'MenuButtonPressed:'\\\\n\\\\t\\\\tin: [:sel | menuSelector _ sel.  model perform: sel with: event]! !\\\\n\\\\n!OBScrollBar methodsFor: 'other events' stamp: 'cwp 11/23/2003 18:06'!\\\\nmouseDownInSlider: event\\\\n\\\\tinterval = 1.0 ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"make the entire scrollable area visible if a full scrollbar is clicked on\\\\\\\"\\\\n\\\\t\\\\tself setValue: 0.\\\\n\\\\t\\\\tself model hideOrShowScrollBar].\\\\n\\\\tsuper mouseDownInSlider: event! !\\\\n\\\\n\\\\n!OBScrollBar methodsFor: 'scroll timing' stamp: 'cwp 11/23/2003 18:07'!\\\\nresetTimer\\\\n\\\\ttimeOfMouseDown _ Time millisecondClockValue.\\\\n\\\\ttimeOfLastScroll _ timeOfMouseDown - 1000 max: 0.\\\\n\\\\tnextPageDirection _ nil.\\\\n\\\\tcurrentScrollDelay _ nil! !\\\\n\\\\n!OBScrollBar methodsFor: 'scroll timing' stamp: 'cwp 11/23/2003 18:07'!\\\\nwaitForDelay1: delay1 delay2: delay2 \\\\n\\\\t\\\\\\\"Return true if an appropriate delay has passed since the last scroll operation.\\\\n\\\\tThe delay decreases exponentially from delay1 to delay2.\\\\\\\"\\\\n\\\\n\\\\t| now scrollDelay |\\\\n\\\\ttimeOfLastScroll isNil ifTrue: [self resetTimer].\\\\t\\\\\\\"Only needed for old instances\\\\\\\"\\\\n\\\\tnow := Time millisecondClockValue.\\\\n\\\\t(scrollDelay := currentScrollDelay) isNil \\\\n\\\\t\\\\tifTrue: [scrollDelay := delay1\\\\t\\\\\\\"initial delay\\\\\\\"].\\\\n\\\\tcurrentScrollDelay := scrollDelay * 9 // 10 max: delay2.\\\\t\\\\\\\"decrease the delay\\\\\\\"\\\\n\\\\ttimeOfLastScroll := now.\\\\n\\\\t^true! !\\\\n\\\\n\\\\n!OBScrollBar methodsFor: 'scrolling' stamp: 'cwp 11/23/2003 18:06'!\\\\ndoScrollByPage\\\\n\\\\t\\\\\\\"Scroll automatically while mouse is down\\\\\\\"\\\\n\\\\t(self waitForDelay1: 300 delay2: 100) ifFalse: [^ self].\\\\n\\\\tnextPageDirection\\\\n\\\\t\\\\tifTrue: [self setValue: (value + pageDelta min: 1.0)]\\\\n\\\\t\\\\tifFalse: [self setValue: (value - pageDelta max: 0.0)]\\\\n! !\\\\n\\\\n!OBScrollBar methodsFor: 'scrolling' stamp: 'cwp 11/23/2003 18:06'!\\\\ndoScrollDown\\\\n\\\\t\\\\\\\"Scroll automatically while mouse is down\\\\\\\"\\\\n\\\\t(self waitForDelay1: 200 delay2: 40) ifFalse: [^ self].\\\\n\\\\tself setValue: (value + scrollDelta + 0.000001 min: 1.0)! !\\\\n\\\\n!OBScrollBar methodsFor: 'scrolling' stamp: 'cwp 11/23/2003 18:06'!\\\\ndoScrollUp\\\\n\\\\t\\\\\\\"Scroll automatically while mouse is down\\\\\\\"\\\\n\\\\t(self waitForDelay1: 200 delay2: 40) ifFalse: [^ self].\\\\n\\\\tself setValue: (value - scrollDelta - 0.000001 max: 0.0)! !\\\\n\\\\n!OBScrollBar methodsFor: 'scrolling' stamp: 'cwp 11/23/2003 18:06'!\\\\nfinishedScrolling\\\\n\\\\tself stopStepping.\\\\n\\\\tself scrollBarAction: nil.\\\\n\\\\tself roundedScrollbarLook ifTrue:[\\\\n\\\\t\\\\tupButton borderStyle: (BorderStyle complexRaised width: upButton borderWidth).\\\\n\\\\t\\\\tdownButton borderStyle: (BorderStyle complexRaised width: downButton borderWidth).\\\\n\\\\t] ifFalse:[\\\\n\\\\t\\\\tdownButton borderRaised.\\\\n\\\\t\\\\tupButton borderRaised.\\\\n\\\\t].\\\\n\\\\n! !\\\\n\\\\n!OBScrollBar methodsFor: 'scrolling' stamp: 'cwp 11/23/2003 18:06'!\\\\nscrollBarAction\\\\n\\\\t^self valueOfProperty: #scrollBarAction! !\\\\n\\\\n!OBScrollBar methodsFor: 'scrolling' stamp: 'cwp 11/23/2003 18:06'!\\\\nscrollBarAction: aSymbol\\\\n\\\\tself setProperty: #scrollBarAction toValue: aSymbol! !\\\\n\\\\n!OBScrollBar methodsFor: 'scrolling' stamp: 'cwp 11/23/2003 18:06'!\\\\nscrollDown\\\\n\\\\tself flag: #obsolete.\\\\n\\\\tdownButton eventHandler: nil.\\\\n\\\\tdownButton on: #mouseDown send: #scrollDownInit to: self.\\\\n\\\\tdownButton on: #mouseUp send: #finishedScrolling to: self.\\\\n\\\\t^self scrollDownInit! !\\\\n\\\\n!OBScrollBar methodsFor: 'scrolling' stamp: 'cwp 11/23/2003 18:06'!\\\\nscrollDownInit\\\\n\\\\tdownButton borderInset.\\\\n\\\\tself resetTimer.\\\\n\\\\tself scrollBarAction: #doScrollDown.\\\\n\\\\tself startStepping.! !\\\\n\\\\n!OBScrollBar methodsFor: 'scrolling' stamp: 'cwp 11/23/2003 18:06'!\\\\nscrollDown: count\\\\n\\\\tself setValue: (value + (scrollDelta * count) + 0.000001 min: 1.0)! !\\\\n\\\\n!OBScrollBar methodsFor: 'scrolling' stamp: 'cwp 11/23/2003 18:06'!\\\\nscrollPageInit: evt\\\\n\\\\tself resetTimer.\\\\n\\\\tself setNextDirectionFromEvent: evt.\\\\n\\\\tself scrollBarAction: #doScrollByPage.\\\\n\\\\tself startStepping.! !\\\\n\\\\n!OBScrollBar methodsFor: 'scrolling' stamp: 'cwp 11/23/2003 18:06'!\\\\nscrollUp\\\\n\\\\tself flag: #obsolete.\\\\n\\\\tupButton eventHandler: nil.\\\\n\\\\tupButton on: #mouseDown send: #scrollUpInit to: self.\\\\n\\\\tupButton on: #mouseUp send: #finishedScrolling to: self.\\\\n\\\\t^self scrollUpInit! !\\\\n\\\\n!OBScrollBar methodsFor: 'scrolling' stamp: 'cwp 11/23/2003 18:06'!\\\\nscrollUpInit\\\\n\\\\tupButton borderInset.\\\\n\\\\tself resetTimer.\\\\n\\\\tself scrollBarAction: #doScrollUp.\\\\n\\\\tself startStepping.! !\\\\n\\\\n!OBScrollBar methodsFor: 'scrolling' stamp: 'cwp 11/23/2003 18:06'!\\\\nscrollUp: count\\\\n\\\\tself setValue: (value - (scrollDelta * count) - 0.000001 max: 0.0)! !\\\\n\\\\n!OBScrollBar methodsFor: 'scrolling' stamp: 'cwp 11/23/2003 18:06'!\\\\nsetNextDirectionFromEvent: event\\\\n\\\\n\\\\tnextPageDirection _ bounds isWide ifTrue: [\\\\n\\\\t\\\\tevent cursorPoint x >= slider center x\\\\n\\\\t]\\\\n\\\\tifFalse: [\\\\n\\\\t\\\\tevent cursorPoint y >= slider center y\\\\n\\\\t]\\\\n\\\\n! !\\\\n\\\\n\\\\n!OBScrollBar methodsFor: 'stepping and presenter' stamp: 'cwp 11/23/2003 18:07'!\\\\nstep\\\\n\\\\t| action |\\\\n\\\\taction _ self scrollBarAction.\\\\n\\\\taction ifNotNil:[self perform: action].! !\\\\n\\\\n\\\\n!OBScrollBar methodsFor: 'testing' stamp: 'cwp 11/23/2003 18:06'!\\\\nstepTime\\\\n\\\\t^ currentScrollDelay ifNil: [300]! !\\\\n\\\\n!OBScrollBar methodsFor: 'testing' stamp: 'cwp 11/23/2003 18:06'!\\\\nwantsSteps\\\\n\\\\t^self scrollBarAction notNil! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBScrollBar class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBScrollBar class methodsFor: 'as yet unclassified' stamp: 'cwp 11/23/2003 18:07'!\\\\nalwaysShowFlatScrollbarForAlternativeLook\\\\n\\\\t\\\\\\\"Set this value to true, if you want to see the flat scrollbar look in flop-out mode as well as inboard.  Otherwise the flop-out scrollbar will be rounded and inboard will be flat.\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!OBScrollBar class methodsFor: 'class initialization' stamp: 'cwp 11/23/2003 18:07'!\\\\ninitialize \\\\\\\"ScrollBar initialize\\\\\\\"\\\\n\\\\n\\\\tUpArrow _ Form\\\\n\\\\t\\\\textent: 6@3\\\\n\\\\t\\\\tfromArray: #(2r11e28 2r1111e27 2r111111e26)\\\\n\\\\t\\\\toffset: 0@0.! !\\\\nOBAnnouncement subclass: #OBSelectingNode\\\\n\\\\tinstanceVariableNames: 'node'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Announcements'!\\\\n\\\\n!OBSelectingNode methodsFor: 'as yet unclassified' stamp: 'cwp 6/4/2006 13:58'!\\\\nnode\\\\n\\\\t^ node! !\\\\n\\\\n!OBSelectingNode methodsFor: 'as yet unclassified' stamp: 'cwp 6/4/2006 13:58'!\\\\nnode: aNode\\\\n\\\\tnode _ aNode! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBSelectingNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBSelectingNode class methodsFor: 'as yet unclassified' stamp: 'cwp 6/4/2006 13:58'!\\\\nnode: aNode\\\\n\\\\t^ self new node: aNode! !\\\\nOBAnnouncement subclass: #OBSelectionChanged\\\\n\\\\tinstanceVariableNames: 'node column'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Announcements'!\\\\n\\\\n!OBSelectionChanged methodsFor: 'accessing' stamp: 'cwp 4/19/2006 00:53'!\\\\ncolumn\\\\n\\\\t^ column! !\\\\n\\\\n!OBSelectionChanged methodsFor: 'accessing' stamp: 'cwp 4/19/2006 00:52'!\\\\ncolumn: aColumn\\\\n\\\\tcolumn _ aColumn! !\\\\n\\\\n!OBSelectionChanged methodsFor: 'accessing' stamp: 'cwp 6/4/2006 12:19'!\\\\nnode\\\\n\\\\t^ column \\\\n\\\\t\\\\tifNil: [node]\\\\n\\\\t\\\\tifNotNil: [column selectedNode]! !\\\\n\\\\n!OBSelectionChanged methodsFor: 'accessing' stamp: 'cwp 6/4/2006 12:20'!\\\\nnode: aNode\\\\n\\\\tnode _ aNode! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBSelectionChanged class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBSelectionChanged class methodsFor: 'instance creation' stamp: 'cwp 4/19/2006 00:51'!\\\\ncolumn: aColumn \\\\n\\\\t^ self new column: aColumn! !\\\\n\\\\n\\\\n!OBSelectionChanged class methodsFor: 'as yet unclassified' stamp: 'cwp 4/19/2006 00:31'!\\\\nnode: aNode\\\\n\\\\t^ self new node: aNode! !\\\\nOBCodeNode subclass: #OBSelectorNode\\\\n\\\\tinstanceVariableNames: 'selector'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBSelectorNode commentStamp: 'cwp 1/8/2005 13:03' prior: 0!\\\\nOBSelectorNode wraps an instance of Symbol. It typically serves as the root of a senders or implementors OBListBrowser, and is used when cmd-n or cmd-m is invoke from the definition panel, and so no OBMethodNode is available.!\\\\n\\\\n\\\\n!OBSelectorNode methodsFor: 'navigating' stamp: 'cwp 12/8/2004 23:48'!\\\\nimplementors\\\\n\\\\t^ (SystemNavigation default allImplementorsOf: self selector) asSortedArray\\\\n\\\\t\\\\t\\\\tcollect: [:ref | OBMethodNode on: ref]! !\\\\n\\\\n!OBSelectorNode methodsFor: 'navigating' stamp: 'cwp 1/7/2005 22:35'!\\\\nimplementorsHierarchically\\\\n\\\\t^ OBClassAwareNode sortHierarchically: self implementors! !\\\\n\\\\n!OBSelectorNode methodsFor: 'navigating' stamp: 'cwp 10/31/2004 01:12'!\\\\nname\\\\n\\\\t^ selector printString! !\\\\n\\\\n!OBSelectorNode methodsFor: 'navigating' stamp: 'cwp 10/31/2004 01:12'!\\\\nselectorAndMessages\\\\n\\\\t^ Array with: self! !\\\\n\\\\n!OBSelectorNode methodsFor: 'navigating' stamp: 'cwp 11/1/2004 02:22'!\\\\nsenders\\\\n\\\\t^ (SystemNavigation default allCallsOn: self selector) asSortedArray\\\\n\\\\t\\\\t\\\\tcollect: [:ref | OBMessageNode on: self selector inMethodReference: ref]! !\\\\n\\\\n!OBSelectorNode methodsFor: 'navigating' stamp: 'cwp 10/31/2004 01:48'!\\\\nsendersOfMessage\\\\n\\\\t^ (SystemNavigation default allCallsOn: self selector) asSortedArray\\\\n\\\\t\\\\t\\\\tcollect: [:ref | OBMessageNode on: self selector inMethodReference: ref]! !\\\\n\\\\n\\\\n!OBSelectorNode methodsFor: 'accessing' stamp: 'cwp 10/31/2004 01:11'!\\\\nselector\\\\n\\\\t^ selector! !\\\\n\\\\n!OBSelectorNode methodsFor: 'accessing' stamp: 'cwp 10/31/2004 01:10'!\\\\nselector: aSelector\\\\n\\\\tselector := aSelector! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBSelectorNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBSelectorNode class methodsFor: 'instance creation' stamp: 'cwp 10/31/2004 01:11'!\\\\non: aSelector\\\\n\\\\t^ self new selector: aSelector! !\\\\nOBListBrowser subclass: #OBSendersBrowser\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Browsers'!\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBSendersBrowser class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBSendersBrowser class methodsFor: 'as yet unclassified' stamp: 'cwp 3/2/2006 15:31'!\\\\ndefaultMetaNode\\\\n\\\\t| selector list chase |\\\\n\\\\tlist := OBMetaNode named: 'Senders'.\\\\n\\\\tlist \\\\n\\\\t\\\\tdisplaySelector: #fullName;\\\\n\\\\t\\\\taddActor: OBNodeActor new.\\\\n\\\\n\\\\tchase := OBMetaNode named: 'Send'.\\\\n\\\\tchase\\\\n\\\\t\\\\tdisplaySelector: #fullName;\\\\n\\\\t\\\\tchildAt: #senders put: chase;\\\\n\\\\t\\\\taddActor: OBNodeActor new.\\\\n\\\\n\\\\tselector := OBMetaNode named: 'Selector'.\\\\t\\\\n\\\\tselector \\\\n\\\\t\\\\tchildAt: #senders labeled: 'list' put: list;\\\\n\\\\t\\\\tchildAt: #senders labeled: 'chase' put: chase;\\\\n\\\\t\\\\tfilterClass: OBModalFilter.\\\\n\\\\n\\\\t^ selector! !\\\\n\\\\n!OBSendersBrowser class methodsFor: 'as yet unclassified' stamp: 'avi 9/17/2005 01:36'!\\\\ntitle\\\\n\\\\t^ 'Senders of'! !\\\\nObject subclass: #OBService\\\\n\\\\tinstanceVariableNames: 'action condition announcer label keystroke icon buttonLabel'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Services'!\\\\n\\\\n!OBService methodsFor: 'accessing' stamp: 'cwp 6/18/2006 18:53'!\\\\naction\\\\n\\\\t^ action! !\\\\n\\\\n!OBService methodsFor: 'accessing' stamp: 'cwp 6/18/2006 18:53'!\\\\naction: aValuable\\\\n\\\\taction _ aValuable! !\\\\n\\\\n!OBService methodsFor: 'accessing' stamp: 'cwp 6/24/2006 15:34'!\\\\nannouncer\\\\n\\\\t^ announcer! !\\\\n\\\\n!OBService methodsFor: 'accessing' stamp: 'cwp 6/24/2006 15:33'!\\\\nannouncer: anAnnouncer\\\\n\\\\tannouncer _ anAnnouncer! !\\\\n\\\\n!OBService methodsFor: 'accessing' stamp: 'cwp 6/24/2006 19:38'!\\\\nbuttonLabel\\\\n\\\\t^ buttonLabel! !\\\\n\\\\n!OBService methodsFor: 'accessing' stamp: 'cwp 6/24/2006 19:39'!\\\\nbuttonLabel: aString\\\\n\\\\tbuttonLabel _ aString! !\\\\n\\\\n!OBService methodsFor: 'accessing' stamp: 'cwp 6/24/2006 15:40'!\\\\ncondition\\\\n\\\\t^ condition! !\\\\n\\\\n!OBService methodsFor: 'accessing' stamp: 'cwp 6/24/2006 15:40'!\\\\ncondition: aValuable\\\\n\\\\tcondition _ aValuable! !\\\\n\\\\n!OBService methodsFor: 'accessing' stamp: 'cwp 6/25/2006 00:41'!\\\\ndescription\\\\n\\\\t^ 'description'! !\\\\n\\\\n!OBService methodsFor: 'accessing' stamp: 'cwp 6/24/2006 19:24'!\\\\nicon\\\\n\\\\t^ icon! !\\\\n\\\\n!OBService methodsFor: 'accessing' stamp: 'cwp 6/24/2006 19:24'!\\\\nicon: anIcon\\\\n\\\\ticon _ anIcon! !\\\\n\\\\n!OBService methodsFor: 'accessing' stamp: 'cwp 6/24/2006 19:04'!\\\\nkeystroke\\\\n\\\\t^ keystroke! !\\\\n\\\\n!OBService methodsFor: 'accessing' stamp: 'cwp 6/24/2006 19:04'!\\\\nkeystroke: aCharacter\\\\n\\\\tkeystroke _ aCharacter! !\\\\n\\\\n!OBService methodsFor: 'accessing' stamp: 'cwp 6/24/2006 19:04'!\\\\nlabel\\\\n\\\\t^ label! !\\\\n\\\\n!OBService methodsFor: 'accessing' stamp: 'cwp 6/24/2006 18:58'!\\\\nlabel: aString\\\\n\\\\tlabel _ aString! !\\\\n\\\\n\\\\n!OBService methodsFor: 'morphic' stamp: 'cwp 6/24/2006 18:46'!\\\\naddServiceFor: aRequestor toMenu: aMenu\\\\n\\\\taMenu\\\\n\\\\t\\\\tadd: self labelWithKeystroke\\\\n\\\\t\\\\ttarget: self \\\\n\\\\t\\\\tselector: #executeFor:\\\\n\\\\t\\\\targument: aRequestor.\\\\n\\\\taMenu lastItem isEnabled: self isEnabled.\\\\n\\\\tPreferences menuWithIcons & self icon notNil\\\\n\\\\t\\\\tifTrue: [aMenu lastItem icon: self icon].\\\\n\\\\taMenu addBlankIconsIfNecessary: MenuIcons blankIcon.! !\\\\n\\\\n!OBService methodsFor: 'morphic' stamp: 'cwp 6/24/2006 19:41'!\\\\nbuttonLabelMorph\\\\n\\\\t^ StringMorph \\\\n\\\\t\\\\tcontents: self buttonLabel \\\\n\\\\t\\\\tfont: Preferences standardButtonFont! !\\\\n\\\\n!OBService methodsFor: 'morphic' stamp: 'cwp 6/24/2006 19:41'!\\\\nbuttonMorph\\\\n\\\\t^ (PluggableButtonMorph\\\\n\\\\t\\\\ton: self\\\\n\\\\t\\\\tgetState: nil\\\\n\\\\t\\\\taction: #trigger\\\\n\\\\t\\\\tlabel: #buttonLabelMorph)\\\\t\\\\n\\\\t\\\\t\\\\tonColor: Color lightGray lighter offColor: Color lightGray twiceLighter;\\\\n\\\\t\\\\t\\\\tborderWidth: 2;\\\\n\\\\t\\\\t\\\\tborderRaised;\\\\n\\\\t\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\t\\\\tvResizing: #spaceFill;\\\\n\\\\t\\\\t\\\\tsetBalloonText: label! !\\\\n\\\\n!OBService methodsFor: 'morphic' stamp: 'cwp 6/24/2006 19:05'!\\\\nlabelWithKeystroke\\\\n\\\\t^keystroke\\\\n\\\\t\\\\tifNil: [label]\\\\n\\\\t\\\\tifNotNil: [label, ' (', keystroke asString, ')']! !\\\\n\\\\n\\\\n!OBService methodsFor: 'execute' stamp: 'cwp 6/29/2006 01:12'!\\\\ncondExecuteFor: aRequestor\\\\n\\\\t^ (self isEnabledFor: aRequestor)\\\\n\\\\t\\\\t ifTrue: [self executeFor: aRequestor]! !\\\\n\\\\n!OBService methodsFor: 'execute' stamp: 'cwp 6/24/2006 18:15'!\\\\nexecute\\\\n\\\\t^ self executeFor: nil! !\\\\n\\\\n!OBService methodsFor: 'execute' stamp: 'cwp 6/24/2006 18:13'!\\\\nexecuteFor: aRequestor\\\\n\\\\taction valueWithPossibleArgs: {aRequestor}! !\\\\n\\\\n!OBService methodsFor: 'execute' stamp: 'cwp 6/24/2006 15:42'!\\\\ntrigger\\\\n\\\\t^ self isEnabled ifTrue: [self execute]! !\\\\n\\\\n\\\\n!OBService methodsFor: 'initialize-release' stamp: 'cwp 6/24/2006 19:05'!\\\\ninitialize\\\\n\\\\taction _ [].\\\\n\\\\tcondition _ [true].\\\\n\\\\tlabel _ 'a service'.! !\\\\n\\\\n\\\\n!OBService methodsFor: 'testing' stamp: 'cwp 6/29/2006 01:11'!\\\\nisEnabled\\\\n\\\\t^ self isEnabledFor: nil! !\\\\n\\\\n!OBService methodsFor: 'testing' stamp: 'cwp 6/29/2006 01:07'!\\\\nisEnabledFor: aRequestor\\\\n\\\\t^ condition valueWithPossibleArgs: {aRequestor}! !\\\\n\\\\n!OBService methodsFor: 'testing' stamp: 'cwp 6/25/2006 00:43'!\\\\nuseLineAfter\\\\n\\\\t^ false! !\\\\n\\\\n!OBService methodsFor: 'testing' stamp: 'cwp 6/24/2006 19:46'!\\\\nwantsButton\\\\n\\\\t^ self buttonLabel notNil! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBService class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBService class methodsFor: 'as yet unclassified' stamp: 'cwp 6/18/2006 18:53'!\\\\naction: aValuable\\\\n\\\\t^ self new action: aValuable! !\\\\n\\\\n!OBService class methodsFor: 'as yet unclassified' stamp: 'cwp 6/24/2006 15:40'!\\\\naction: aValuable condition: cValuable\\\\n\\\\t^ self new \\\\n\\\\t\\\\taction: aValuable;\\\\n\\\\t\\\\tcondition: cValuable;\\\\n\\\\t\\\\tyourself! !\\\\n\\\\n!OBService class methodsFor: 'as yet unclassified' stamp: 'cwp 6/24/2006 15:43'!\\\\nnew\\\\n\\\\t^ self basicNew initialize! !\\\\nOBAnnouncement subclass: #OBServiceScan\\\\n\\\\tinstanceVariableNames: 'services'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Announcements'!\\\\n\\\\n!OBServiceScan methodsFor: 'as yet unclassified' stamp: 'cwp 6/25/2006 00:31'!\\\\naddService: aService\\\\n\\\\tservices add: aService! !\\\\n\\\\n!OBServiceScan methodsFor: 'as yet unclassified' stamp: 'cwp 6/25/2006 00:31'!\\\\ninitialize\\\\n\\\\tservices _ OrderedCollection new! !\\\\n\\\\n!OBServiceScan methodsFor: 'as yet unclassified' stamp: 'cwp 6/25/2006 00:30'!\\\\nservices\\\\n\\\\t^ services! !\\\\nNotification subclass: #OBSourceFilesRequest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Utilities'!\\\\n!OBSourceFilesRequest commentStamp: 'cwp 1/8/2005 13:09' prior: 0!\\\\nOBSourceFilesRequest is used to work around the fact that Squeak's source files are stored in a global array called SourceFiles. When testing OBMethodVersion and OBVersionBrowser, we don't want to use the real source files, as they are too unpredictable. Instead the test cases supply a source file array with known contents.\\\\n\\\\nTherefore, OBMethodVersion never refers directly to the SourceFiles global. Instead it raises an OBSourceFiles request. If this occurs during a test, the test catches the notification and resumes using the test source files. Otherwise, the default action resumes using the global source file array.!\\\\n\\\\n\\\\n!OBSourceFilesRequest methodsFor: 'exceptionDescription'!\\\\ndefaultAction\\\\n\\\\t^ SourceFiles! !\\\\n\\\\n!OBSourceFilesRequest methodsFor: 'exceptionDescription' stamp: 'cwp 11/27/2004 22:49'!\\\\nisBrowseRequest\\\\n\\\\t^ false! !\\\\nOBCodeBrowser subclass: #OBSystemBrowser\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Browsers'!\\\\n!OBSystemBrowser commentStamp: 'cwp 1/7/2005 23:56' prior: 0!\\\\nThis is the basic system browser that is the work-horse of Smalltalk development tools. It presents four panes showing class categories, classes, method categories and methods.!\\\\n\\\\n\\\\n!OBSystemBrowser methodsFor: 'morphic' stamp: 'avi 11/29/2004 21:52'!\\\\ndefaultBackgroundColor\\\\n\\\\t^ Color lightGreen\\\\n\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBSystemBrowser class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBSystemBrowser class methodsFor: 'configuration' stamp: 'avi 9/17/2005 01:13'!\\\\nalphabeticalMetaNode\\\\n\\\\t^ self\\\\n\\\\t\\\\timageClass: #classes\\\\n\\\\t\\\\tcomment: #comments\\\\n\\\\t\\\\tmetaclass: #metaclasses\\\\n! !\\\\n\\\\n!OBSystemBrowser class methodsFor: 'configuration' stamp: 'avi 9/17/2005 01:54'!\\\\ndefaultMetaNode\\\\n\\\\t^self hierarchicalMetaNode! !\\\\n\\\\n!OBSystemBrowser class methodsFor: 'configuration' stamp: 'cwp 12/6/2004 22:02'!\\\\ndefaultRootNode\\\\n\\\\t^ OBEnvironmentNode forImage! !\\\\n\\\\n!OBSystemBrowser class methodsFor: 'configuration' stamp: 'avi 9/17/2005 01:54'!\\\\nhierarchicalMetaNode\\\\n\\\\t^self \\\\n\\\\t\\\\timageClass: #classesHierarchically\\\\n\\\\t\\\\tcomment: #commentsHierarchically\\\\n\\\\t\\\\tmetaclass: #metaclassesHierarchically! !\\\\n\\\\n!OBSystemBrowser class methodsFor: 'configuration' stamp: 'avi 9/17/2005 01:09'!\\\\nimageClass: classSel comment: commentSel metaclass: metaclassSel \\\\n\\\\t| env classCategory |\\\\n\\\\tenv := OBMetaNode named: 'Environment'.\\\\n\\\\tclassCategory := OBMetaNode named: 'ClassCategory'.\\\\n\\\\tenv childAt: #categories put: classCategory.\\\\n\\\\tself addTo: classCategory class: classSel comment: commentSel metaclass: metaclassSel.\\\\n\\\\t^env! !\\\\n\\\\n!OBSystemBrowser class methodsFor: 'configuration'!\\\\ntitle\\\\n\\\\t^ 'System Browser'! !\\\\n\\\\n\\\\n!OBSystemBrowser class methodsFor: 'initializing'!\\\\ninitialize\\\\n\\\\tself registerInOpenMenu! !\\\\n\\\\n!OBSystemBrowser class methodsFor: 'initializing'!\\\\nregisterInOpenMenu\\\\n\\\\tTheWorldMenu registerOpenCommand: {'Image Browser'. {self. #open}}.\\\\n! !\\\\n\\\\n\\\\n!OBSystemBrowser class methodsFor: 'instance creation' stamp: 'dvf 8/31/2005 13:17'!\\\\nonClass: aClass \\\\n\\\\t^self selection: aClass asNode! !\\\\n\\\\n!OBSystemBrowser class methodsFor: 'instance creation' stamp: 'cwp 12/15/2004 21:42'!\\\\nonClass: aClass category: aSymbol\\\\n\\\\t^ self selection: (OBMethodCategoryNode on: aSymbol inClass: aClass)! !\\\\n\\\\n!OBSystemBrowser class methodsFor: 'instance creation' stamp: 'cwp 12/5/2004 17:38'!\\\\nonClass: aClass selector: aSelector\\\\n\\\\t^ self selection: (OBMethodNode on: aSelector inClass: aClass)! !\\\\n\\\\n!OBSystemBrowser class methodsFor: 'instance creation' stamp: 'cwp 12/15/2004 21:45'!\\\\nonEnvironment: anEnvironment category: aSymbol\\\\n\\\\t^ self selection: (OBClassCategoryNode \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ton: aSymbol \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinEnvironment: anEnvironment)! !\\\\n\\\\n\\\\n!OBSystemBrowser class methodsFor: 'opening' stamp: 'cwp 12/5/2004 18:32'!\\\\nopenOnClass: aClass\\\\n\\\\t^ (self onClass: aClass) open! !\\\\n\\\\n!OBSystemBrowser class methodsFor: 'opening' stamp: 'cwp 12/15/2004 21:47'!\\\\nopenOnClass: aClass category: aSymbol\\\\n\\\\t^ (self onClass: aClass category: aSymbol) open! !\\\\n\\\\n!OBSystemBrowser class methodsFor: 'opening' stamp: 'cwp 12/5/2004 17:38'!\\\\nopenOnClass: aClass selector: aSelector\\\\n\\\\t^ (self onClass: aClass selector: aSelector) open! !\\\\n\\\\n!OBSystemBrowser class methodsFor: 'opening' stamp: 'cwp 12/15/2004 21:54'!\\\\nopenOnEnvironment: anEnvironment category: aSymbol\\\\n\\\\t^ (self onEnvironment: anEnvironment category: aSymbol) open! !\\\\nObject subclass: #OBSystemBrowserAdaptor\\\\n\\\\tinstanceVariableNames: 'class selector'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Utilities'!\\\\n!OBSystemBrowserAdaptor commentStamp: 'cwp 1/8/2005 13:35' prior: 0!\\\\nOBSystemBrowserAdaptor implements the protocol expected by the SystemBrowser app registry, and thus allows OmniBrowser to be chosen as the default system browser. \\\\n\\\\nCaveat: because the required protocol is a little ...odd.... it can't be implemented well by OBSystemBrowser directly. OBSystemBrowserAdaptor does this reasonably well, but it has no way to provide a more natural name than its class name to the app registry menu.!\\\\n\\\\n\\\\n!OBSystemBrowserAdaptor methodsFor: 'registry protocol' stamp: 'cwp 12/5/2004 21:50'!\\\\nlabelString\\\\n\\\\t^ 'System Browser'! !\\\\n\\\\n!OBSystemBrowserAdaptor methodsFor: 'registry protocol' stamp: 'cwp 12/5/2004 21:49'!\\\\nopenEditString: anUndefinedObject \\\\n\\\\t^ self! !\\\\n\\\\n!OBSystemBrowserAdaptor methodsFor: 'registry protocol' stamp: 'cwp 12/5/2004 21:49'!\\\\nsetClass: aClass selector: aSelector \\\\n\\\\tclass _ aClass.\\\\n\\\\tselector _ aSelector! !\\\\n\\\\n\\\\n!OBSystemBrowserAdaptor methodsFor: 'accessing' stamp: 'cwp 12/5/2004 21:55'!\\\\nselector\\\\n\\\\t^ selector! !\\\\n\\\\n!OBSystemBrowserAdaptor methodsFor: 'accessing' stamp: 'cwp 12/5/2004 21:55'!\\\\ntargetClass\\\\n\\\\t^ class! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBSystemBrowserAdaptor class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBSystemBrowserAdaptor class methodsFor: 'initializing' stamp: 'cwp 12/5/2004 22:01'!\\\\ninitialize\\\\n\\\\tself register! !\\\\n\\\\n!OBSystemBrowserAdaptor class methodsFor: 'initializing' stamp: 'cwp 1/8/2005 21:52'!\\\\nregister\\\\n\\\\tSmalltalk at: #SystemBrowser ifPresent: [:class | class register: self]! !\\\\n\\\\n!OBSystemBrowserAdaptor class methodsFor: 'initializing' stamp: 'cwp 1/8/2005 21:53'!\\\\nunregister\\\\n\\\\tSmalltalk at: #SystemBrowser ifPresent: [:class | class unregister: self]! !\\\\n\\\\n\\\\n!OBSystemBrowserAdaptor class methodsFor: 'registry protocol' stamp: 'lr 4/20/2006 08:48'!\\\\nfullOnClass: aClass selector: aSelector\\\\n\\\\t^ OBSystemBrowser \\\\n\\\\t\\\\topenOnClass: aClass\\\\n\\\\t\\\\tselector: aSelector! !\\\\n\\\\n!OBSystemBrowserAdaptor class methodsFor: 'registry protocol' stamp: 'lr 3/28/2006 09:10'!\\\\nopen\\\\n\\\\tOBSystemBrowser open! !\\\\n\\\\n!OBSystemBrowserAdaptor class methodsFor: 'registry protocol' stamp: 'cwp 12/5/2004 21:59'!\\\\nopenBrowser\\\\n\\\\tOBSystemBrowser open! !\\\\n\\\\n!OBSystemBrowserAdaptor class methodsFor: 'registry protocol' stamp: 'cwp 12/5/2004 21:56'!\\\\nopenBrowserView: adaptor label: ignored \\\\n\\\\t^ OBSystemBrowser \\\\n\\\\t\\\\topenOnClass: adaptor targetClass \\\\n\\\\t\\\\tselector: adaptor selector! !\\\\nTextMorphForEditView subclass: #OBTextMorph\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Morphic'!\\\\n!OBTextMorph commentStamp: 'cwp 12/7/2004 00:07' prior: 0!\\\\nThis is a trivial subclass of TextMorph. It overrides editor creation to use OBTextMorphEditor rather than a regular TextMorphEditor.!\\\\n\\\\n\\\\n!OBTextMorph methodsFor: 'private' stamp: 'cwp 10/30/2004 23:06'!\\\\ninstallEditorToReplace: priorEditor\\\\n\\\\t\\\\\\\"Install an editor for my paragraph.  This constitutes 'hasFocus'.\\\\n\\\\tIf priorEditor is not nil, then initialize the new editor from its state.\\\\n\\\\tWe may want to rework this so it actually uses the prior editor.\\\\\\\"\\\\n\\\\n\\\\t| stateArray |\\\\n\\\\tpriorEditor ifNotNil: [stateArray _ priorEditor stateArray].\\\\n\\\\teditor _ OBTextMorphEditor new morph: self.\\\\n\\\\teditor changeParagraph: self paragraph.\\\\n\\\\tpriorEditor ifNotNil: [editor stateArrayPut: stateArray].\\\\n\\\\tself selectionChanged.\\\\n\\\\t^ editor! !\\\\nTextMorphEditor subclass: #OBTextMorphEditor\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Morphic'!\\\\n!OBTextMorphEditor commentStamp: 'cwp 1/7/2005 23:27' prior: 0!\\\\nOBTextMorphEditor overrides the TextMorphEditors handling of command keys, passing them along to its model for processing, rather than hard-coding their implementations.!\\\\n\\\\n\\\\n!OBTextMorphEditor methodsFor: 'actions' stamp: 'cwp 10/31/2004 01:52'!\\\\nbrowseIt\\\\n\\\\t| symbol |\\\\n\\\\tself lineSelectAndEmptyCheck: [^ self].\\\\n\\\\t(symbol _ self selectedSymbol) isNil ifTrue: [^ view flash].\\\\n\\\\n\\\\tself send: #browseIt: toModelWith: {symbol} orDo: [super browseIt]! !\\\\n\\\\n!OBTextMorphEditor methodsFor: 'actions' stamp: 'cwp 10/31/2004 00:40'!\\\\nimplementorsOfIt\\\\n\\\\t\\\\\\\"Open a senders browser on the selected selector\\\\\\\"\\\\n\\\\n\\\\t| selector |\\\\n\\\\tself lineSelectAndEmptyCheck: [^ self].\\\\n\\\\t(selector _ self selectedSelector) == nil ifTrue: [^ view flash].\\\\n\\\\tself send: #implementorsOfIt: toModelWith: {selector} orDo: [super sendersOfIt]! !\\\\n\\\\n!OBTextMorphEditor methodsFor: 'actions' stamp: 'cwp 10/31/2004 01:10'!\\\\nreferencesToIt\\\\n\\\\n\\\\t| selector |\\\\n\\\\tself lineSelectAndEmptyCheck: [^ self].\\\\n\\\\t(selector _ self selectedSelector) == nil ifTrue: [^ view flash].\\\\n\\\\tself send: #referencesToIt: toModelWith: {selector} orDo: [super referencesToIt]! !\\\\n\\\\n!OBTextMorphEditor methodsFor: 'actions' stamp: 'cwp 10/31/2004 00:26'!\\\\nsendersOfIt\\\\n\\\\t\\\\\\\"Open a senders browser on the selected selector\\\\\\\"\\\\n\\\\n\\\\t| selector |\\\\n\\\\tself lineSelectAndEmptyCheck: [^ self].\\\\n\\\\t(selector _ self selectedSelector) == nil ifTrue: [^ view flash].\\\\n\\\\tself send: #sendersOfIt: toModelWith: {selector} orDo: [super sendersOfIt]! !\\\\n\\\\n\\\\n!OBTextMorphEditor methodsFor: 'model access' stamp: 'cwp 10/31/2004 00:24'!\\\\nsend: aSelector toModelWith: args orDo: aBlock\\\\n\\\\tself terminateAndInitializeAround:\\\\n\\\\t\\\\t[(model respondsTo: aSelector)\\\\n\\\\t\\\\t\\\\tifTrue: [(model perform: aSelector withArguments: args)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [view flash]]\\\\n\\\\t\\\\t\\\\tifFalse: aBlock]! !\\\\nOBInteractionRequest subclass: #OBTextRequest\\\\n\\\\tinstanceVariableNames: 'prompt template'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Notifications'!\\\\n!OBTextRequest commentStamp: 'cwp 3/5/2004 12:35' prior: 0!\\\\nThis notification is used to ask the user to supply a short piece of text. Its defaultAction is to open a FillInTheBlank.\\\\n\\\\niVars:\\\\n\\\\nprompt\\\\t\\\\t- a string describing the text the user is asked to supply\\\\ntemplate\\\\t- a default reply !\\\\n\\\\n\\\\n!OBTextRequest methodsFor: 'accessing' stamp: 'cwp 2/2/2004 21:24'!\\\\nprompt\\\\n\\\\t^ prompt! !\\\\n\\\\n!OBTextRequest methodsFor: 'accessing' stamp: 'cwp 2/2/2004 21:23'!\\\\nprompt: aString\\\\n\\\\tprompt _ aString! !\\\\n\\\\n!OBTextRequest methodsFor: 'accessing' stamp: 'cwp 2/2/2004 21:00'!\\\\ntemplate\\\\n\\\\t^ template! !\\\\n\\\\n!OBTextRequest methodsFor: 'accessing' stamp: 'cwp 2/2/2004 20:59'!\\\\ntemplate: aString\\\\n\\\\ttemplate _ aString! !\\\\n\\\\n\\\\n!OBTextRequest methodsFor: 'user interaction' stamp: 'cwp 2/2/2004 21:27'!\\\\ndefaultAction\\\\n\\\\tself resume: self requestText! !\\\\n\\\\n!OBTextRequest methodsFor: 'user interaction' stamp: 'cwp 2/2/2004 21:27'!\\\\nrequestText\\\\n\\\\t^ FillInTheBlankMorph \\\\n\\\\t\\\\trequest: prompt\\\\n\\\\t\\\\tinitialAnswer: template\\\\n\\\\t\\\\tcenterAt: Sensor cursorPoint\\\\n\\\\t\\\\tinWorld: World\\\\n\\\\t\\\\tonCancelReturn: nil\\\\n\\\\t\\\\tacceptOnCR: true! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBTextRequest class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBTextRequest class methodsFor: 'as yet unclassified' stamp: 'cwp 2/2/2004 21:30'!\\\\nprompt: aString\\\\n\\\\t^ self new prompt: aString; template: ''! !\\\\n\\\\n!OBTextRequest class methodsFor: 'as yet unclassified' stamp: 'cwp 2/5/2004 20:31'!\\\\nprompt: promptString template: templateString\\\\n\\\\t^ (self new prompt: promptString; template: templateString) signal! !\\\\nOBPanel subclass: #OBVarButtonPanel\\\\n\\\\tinstanceVariableNames: 'morph'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Panels'!\\\\n!OBVarButtonPanel commentStamp: 'cwp 12/7/2004 00:21' prior: 0!\\\\nOBVarButtonPanel displays a horizontal row of buttons. In contrast to OBFixedButtonPanel, the buttons on display are updated to reflect the actions appropriate to the currently selected node.!\\\\n\\\\n\\\\n!OBVarButtonPanel methodsFor: 'constructing' stamp: 'cwp 11/27/2004 18:16'!\\\\nmorph\\\\n\\\\t^ morph _ (RectangleMorph new)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tlayoutPolicy: TableLayout new;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tlistDirection: #leftToRight;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tvResizing: #spaceFill;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tborderWidth: 0;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\twrapCentering: #center;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcellPositioning: #leftCenter;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\trubberBandCells: true;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tyourself! !\\\\n\\\\n!OBVarButtonPanel methodsFor: 'constructing' stamp: 'cwp 11/26/2004 22:41'!\\\\nmorphHeight\\\\n\\\\t^ 25! !\\\\n\\\\n\\\\n!OBVarButtonPanel methodsFor: 'updating' stamp: 'cwp 7/8/2006 12:54'!\\\\nselectionChanged: ann\\\\n\\\\t| node actions |\\\\n\\\\tmorph removeAllMorphs.\\\\n\\\\tnode _ browser currentNode ifNil: [^ self].\\\\n\\\\tactions _ (node metaNode actionsForNode: node) select: [:ea | ea wantsButton].\\\\n\\\\tactions do: [:ea | morph addMorphBack: ea buttonMorph]! !\\\\n\\\\n!OBVarButtonPanel methodsFor: 'updating' stamp: 'cwp 6/3/2006 22:30'!\\\\nsubscribe\\\\n\\\\tself announcer\\\\n\\\\t\\\\tobserve: OBSelectionChanged\\\\n\\\\t\\\\tsend: #selectionChanged:\\\\n\\\\t\\\\tto: self! !\\\\nOBClassAwareNode subclass: #OBVariableNode\\\\n\\\\tinstanceVariableNames: 'name'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBVariableNode commentStamp: 'cwp 1/8/2005 12:46' prior: 0!\\\\nOBVariableNode is an abstract superclass for the two types of variables a class can contain - class variables and instance variables. The only difference between the two subclasses is how they search for methods that refer to them.!\\\\n\\\\n\\\\n!OBVariableNode methodsFor: 'actions' stamp: 'cwp 12/15/2004 22:38'!\\\\nactions\\\\n\\\\t^ {self browseAction}! !\\\\n\\\\n\\\\n!OBVariableNode methodsFor: 'displaying'!\\\\nname\\\\n\\\\t^ name! !\\\\n\\\\n\\\\n!OBVariableNode methodsFor: 'initializing'!\\\\nsetName: aString class: aClass\\\\n\\\\tname := aString.\\\\n\\\\tself theClass: aClass! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBVariableNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBVariableNode class methodsFor: 'instance creation'!\\\\non: instVarName inClass: aClassReference \\\\n\\\\t^ self new setName: instVarName class: aClassReference! !\\\\nOBListBrowser subclass: #OBVariablesBrowser\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Browsers'!\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBVariablesBrowser class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBVariablesBrowser class methodsFor: 'as yet unclassified' stamp: 'avi 9/17/2005 01:22'!\\\\ndefaultMetaNode\\\\n\\\\t| class method message var |\\\\n\\\\tclass := OBMetaNode named: 'Class'.\\\\n\\\\tvar := OBMetaNode named: 'Variable'.\\\\n\\\\tmethod := OBMetaNode named: 'Method'.\\\\n\\\\tmessage := OBMetaNode named: 'Message'.\\\\n\\\\tclass\\\\n\\\\t\\\\taddActor: OBNodeActor new;\\\\n\\\\t\\\\tchildAt: #instanceVariables labeled: 'instance' put: var;\\\\n\\\\t\\\\tchildAt: #classVariables labeled: 'class' put: var;\\\\n\\\\t\\\\tfilterClass: OBModalFilter.\\\\n\\\\tvar\\\\n\\\\t\\\\tchildAt: #accessors put: method;\\\\n\\\\t\\\\taddActor: OBNodeActor new;\\\\n\\\\t\\\\tfilterClass: OBModalFilter.\\\\n\\\\tmethod\\\\n\\\\t\\\\tdisplaySelector: #fullName;\\\\n\\\\t\\\\taddActor: OBNodeActor new;\\\\n\\\\t\\\\tchildAt: #senders put: message;\\\\n\\\\t\\\\tfilterClass: OBModalFilter.\\\\n\\\\tmessage\\\\n\\\\t\\\\tdisplaySelector: #fullName;\\\\n\\\\t\\\\taddActor: OBNodeActor new;\\\\n\\\\t\\\\tchildAt: #senders put: message;\\\\n\\\\t\\\\tfilterClass: OBModalFilter.\\\\n\\\\t\\\\n\\\\t^ class! !\\\\n\\\\n!OBVariablesBrowser class methodsFor: 'as yet unclassified' stamp: 'avi 9/17/2005 01:35'!\\\\ntitle\\\\n\\\\t^ 'Variables of'! !\\\\nOBCodeBrowser subclass: #OBVersionBrowser\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Browsers'!\\\\n!OBVersionBrowser commentStamp: 'cwp 1/7/2005 23:58' prior: 0!\\\\nOBVersionBrowser displays a list of OBMethodVersions, which represent versions of a method present in the source or changes files. !\\\\n\\\\n\\\\n!OBVersionBrowser methodsFor: 'morphic' stamp: 'avi 11/29/2004 21:52'!\\\\ndefaultBackgroundColor\\\\n\\\\t^ Color lightMagenta! !\\\\n\\\\n\\\\n!OBVersionBrowser methodsFor: 'accessing' stamp: 'cwp 11/27/2004 22:28'!\\\\ndefaultLabel\\\\n\\\\t^ 'Versions of ', self root name printString! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBVersionBrowser class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBVersionBrowser class methodsFor: 'configuration' stamp: 'avi 9/17/2005 01:09'!\\\\ndefaultMetaNode\\\\n\\\\t| version |\\\\n\\\\tversion := OBMetaNode named: 'Version'.\\\\n\\\\tversion addActor: OBNodeActor new.\\\\n\\\\t^ (OBMetaNode named: 'Method') \\\\n\\\\t\\\\tchildAt: #versions put: version.! !\\\\n\\\\n!OBVersionBrowser class methodsFor: 'configuration' stamp: 'cwp 11/27/2004 22:32'!\\\\nmaxPanes\\\\n\\\\t^ 1! !\\\\n\\\\n!OBVersionBrowser class methodsFor: 'configuration' stamp: 'cwp 11/27/2004 22:32'!\\\\nminPanes\\\\n\\\\t^ 1! !\\\\n\\\\n!OBVersionBrowser class methodsFor: 'configuration' stamp: 'cwp 11/27/2004 22:34'!\\\\noptionalButtons\\\\n\\\\t^ #('browse' 'revert')! !\\\\n\\\\n\\\\n!OBVersionBrowser class methodsFor: 'opening' stamp: 'cwp 12/5/2004 15:42'!\\\\nopenOn: aMethodVersionNode\\\\n\\\\t^ (self root: aMethodVersionNode) open! !\\\\nProtoObject subclass: #Object\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: 'DependentsFields'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Kernel-Objects'!\\\\n!Object commentStamp: '<historical>' prior: 0!\\\\nObject is the root class for almost all of the other classes in the class hierarchy. The exceptions are ProtoObject (the superclass of Object) and its subclasses.\\\\n\\\\nClass Object provides default behavior common to all normal objects, such as access, copying, comparison, error handling, message sending, and reflection. Also utility messages that all objects should respond to are defined here.\\\\n\\\\nObject has no instance variables, nor should any be added. This is due to several classes of objects that inherit from Object that have special implementations (SmallInteger and UndefinedObject for example) or the VM knows about and depends on the structure and layout of certain standard classes.\\\\n\\\\nClass Variables:\\\\n\\\\tDependentsFields\\\\t\\\\tan IdentityDictionary\\\\n\\\\t\\\\tProvides a virtual 'dependents' field so that any object may have one\\\\n\\\\t\\\\tor more dependent views, synchronized by the changed:/update: protocol.\\\\n\\\\t\\\\tNote that class Model has a real slot for its dependents, and overrides\\\\n\\\\t\\\\tthe associated protocol with more efficient implementations.\\\\n\\\\tEventsFields\\\\t\\\\t\\\\tan IdentityDictionary that maps each object to its dependents.\\\\n\\\\t\\\\tRegisters a message send (consisting of a selector and a receiver object)\\\\n\\\\t\\\\twhich should be performed when anEventSymbol is triggered by the receiver.\\\\n\\\\t\\\\tPart of a new event notification framework which could eventually replace\\\\n\\\\t\\\\tthe existing changed/update mechanism.  It is intended to be compatible\\\\n\\\\t\\\\twith Dolphin Smalltalk and VSE as much as possible.\\\\n\\\\nBecause Object is the root of the inheritance tree, methods are often defined in Object to give all objects special behaviors needed by certain subsystems or applications, or to respond to certain general test messages such as isMorph.!\\\\n\\\\n\\\\n!Object methodsFor: 'accessing' stamp: 'sw 4/30/1998 12:18'!\\\\naddInstanceVarNamed: aName withValue: aValue\\\\n\\\\t\\\\\\\"Add an instance variable named aName and give it value aValue\\\\\\\"\\\\n\\\\tself class addInstVarName: aName asString.\\\\n\\\\tself instVarAt: self class instSize put: aValue! !\\\\n\\\\n!Object methodsFor: 'accessing' stamp: 'yo 6/29/2004 11:39'!\\\\nat: index \\\\n\\\\t\\\\\\\"Primitive. Assumes receiver is indexable. Answer the value of an \\\\n\\\\tindexable element in the receiver. Fail if the argument index is not an \\\\n\\\\tInteger or is out of bounds. Essential. See Object documentation \\\\n\\\\twhatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 60>\\\\n\\\\tindex isInteger ifTrue:\\\\n\\\\t\\\\t[self class isVariable\\\\n\\\\t\\\\t\\\\tifTrue: [self errorSubscriptBounds: index]\\\\n\\\\t\\\\t\\\\tifFalse: [self errorNotIndexable]].\\\\n\\\\tindex isNumber\\\\n\\\\t\\\\tifTrue: [^self at: index asInteger]\\\\n\\\\t\\\\tifFalse: [self errorNonIntegerIndex]! !\\\\n\\\\n!Object methodsFor: 'accessing'!\\\\nat: index modify: aBlock\\\\n\\\\t\\\\\\\"Replace the element of the collection with itself transformed by the block\\\\\\\"\\\\n\\\\t^ self at: index put: (aBlock value: (self at: index))! !\\\\n\\\\n!Object methodsFor: 'accessing' stamp: 'yo 6/29/2004 13:08'!\\\\nat: index put: value \\\\n\\\\t\\\\\\\"Primitive. Assumes receiver is indexable. Store the argument value in \\\\n\\\\tthe indexable element of the receiver indicated by index. Fail if the \\\\n\\\\tindex is not an Integer or is out of bounds. Or fail if the value is not of \\\\n\\\\tthe right type for this kind of collection. Answer the value that was \\\\n\\\\tstored. Essential. See Object documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 61>\\\\n\\\\tindex isInteger ifTrue:\\\\n\\\\t\\\\t[self class isVariable\\\\n\\\\t\\\\t\\\\tifTrue: [(index >= 1 and: [index <= self size])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self errorImproperStore]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [self errorSubscriptBounds: index]]\\\\n\\\\t\\\\t\\\\tifFalse: [self errorNotIndexable]].\\\\n\\\\tindex isNumber\\\\n\\\\t\\\\tifTrue: [^self at: index asInteger put: value]\\\\n\\\\t\\\\tifFalse: [self errorNonIntegerIndex]! !\\\\n\\\\n!Object methodsFor: 'accessing' stamp: 'yo 9/20/2004 10:22'!\\\\nbasicAddInstanceVarNamed: aName withValue: aValue\\\\n\\\\t\\\\\\\"Add an instance variable named aName and give it value aValue\\\\\\\"\\\\n\\\\tself class addInstVarName: aName asString.\\\\n\\\\tself instVarAt: self class instSize put: aValue! !\\\\n\\\\n!Object methodsFor: 'accessing'!\\\\nbasicAt: index \\\\n\\\\t\\\\\\\"Primitive. Assumes receiver is indexable. Answer the value of an \\\\n\\\\tindexable element in the receiver. Fail if the argument index is not an \\\\n\\\\tInteger or is out of bounds. Essential. Do not override in a subclass. See \\\\n\\\\tObject documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 60>\\\\n\\\\tindex isInteger ifTrue: [self errorSubscriptBounds: index].\\\\n\\\\tindex isNumber\\\\n\\\\t\\\\tifTrue: [^self basicAt: index asInteger]\\\\n\\\\t\\\\tifFalse: [self errorNonIntegerIndex]! !\\\\n\\\\n!Object methodsFor: 'accessing'!\\\\nbasicAt: index put: value \\\\n\\\\t\\\\\\\"Primitive. Assumes receiver is indexable. Store the second argument \\\\n\\\\tvalue in the indexable element of the receiver indicated by index. Fail \\\\n\\\\tif the index is not an Integer or is out of bounds. Or fail if the value is \\\\n\\\\tnot of the right type for this kind of collection. Answer the value that \\\\n\\\\twas stored. Essential. Do not override in a subclass. See Object \\\\n\\\\tdocumentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 61>\\\\n\\\\tindex isInteger\\\\n\\\\t\\\\tifTrue: [(index >= 1 and: [index <= self size])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self errorImproperStore]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [self errorSubscriptBounds: index]].\\\\n\\\\tindex isNumber\\\\n\\\\t\\\\tifTrue: [^self basicAt: index asInteger put: value]\\\\n\\\\t\\\\tifFalse: [self errorNonIntegerIndex]! !\\\\n\\\\n!Object methodsFor: 'accessing'!\\\\nbasicSize\\\\n\\\\t\\\\\\\"Primitive. Answer the number of indexable variables in the receiver. \\\\n\\\\tThis value is the same as the largest legal subscript. Essential. Do not \\\\n\\\\toverride in any subclass. See Object documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 62>\\\\n\\\\t\\\\\\\"The number of indexable fields of fixed-length objects is 0\\\\\\\"\\\\n\\\\t^0\\\\t! !\\\\n\\\\n!Object methodsFor: 'accessing'!\\\\nbindWithTemp: aBlock\\\\n\\\\t^ aBlock value: self value: nil! !\\\\n\\\\n!Object methodsFor: 'accessing' stamp: 'md 10/7/2004 15:43'!\\\\nifNil: nilBlock ifNotNilDo: aBlock \\\\n\\\\t\\\\\\\"Evaluate aBlock with the receiver as its argument.\\\\\\\"\\\\n\\\\n\\\\t^ aBlock value: self\\\\n! !\\\\n\\\\n!Object methodsFor: 'accessing' stamp: 'di 11/8/2000 21:04'!\\\\nifNotNilDo: aBlock\\\\n\\\\t\\\\\\\"Evaluate the given block with the receiver as its argument.\\\\\\\"\\\\n\\\\n\\\\t^ aBlock value: self\\\\n! !\\\\n\\\\n!Object methodsFor: 'accessing' stamp: 'md 10/7/2004 15:43'!\\\\nifNotNilDo: aBlock ifNil: nilBlock\\\\n\\\\t\\\\\\\"Evaluate aBlock with the receiver as its argument.\\\\\\\"\\\\n\\\\n\\\\t^ aBlock value: self\\\\n! !\\\\n\\\\n!Object methodsFor: 'accessing' stamp: 'ajh 1/21/2003 12:59'!\\\\nin: aBlock\\\\n\\\\t\\\\\\\"Evaluate the given block with the receiver as its argument.\\\\\\\"\\\\n\\\\n\\\\t^ aBlock value: self\\\\n! !\\\\n\\\\n!Object methodsFor: 'accessing' stamp: 'sw 10/17/2000 11:15'!\\\\npresenter\\\\n\\\\t\\\\\\\"Answer the presenter object associated with the receiver.  For morphs, there is in effect a clear containment hierarchy of presenters (accessed via their association with PasteUpMorphs); for arbitrary objects the hook is simply via the current world, at least at present.\\\\\\\"\\\\n\\\\n\\\\t^ self currentWorld presenter! !\\\\n\\\\n!Object methodsFor: 'accessing'!\\\\nreadFromString: aString\\\\n\\\\t\\\\\\\"Create an object based on the contents of aString.\\\\\\\"\\\\n\\\\n\\\\t^self readFrom: (ReadStream on: aString)! !\\\\n\\\\n!Object methodsFor: 'accessing' stamp: 'di 3/29/1999 13:10'!\\\\nsize\\\\n\\\\t\\\\\\\"Primitive. Answer the number of indexable variables in the receiver. \\\\n\\\\tThis value is the same as the largest legal subscript. Essential. See Object \\\\n\\\\tdocumentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 62>\\\\n\\\\tself class isVariable ifFalse: [self errorNotIndexable].\\\\n\\\\t^ 0! !\\\\n\\\\n!Object methodsFor: 'accessing' stamp: 'md 5/16/2006 12:34'!\\\\nyourself\\\\n\\\\t\\\\\\\"Answer self.\\\\\\\"\\\\n\\\\t^self! !\\\\n\\\\n\\\\n!Object methodsFor: 'associating' stamp: 'md 7/22/2005 16:03'!\\\\n-> anObject\\\\n\\\\t\\\\\\\"Answer an Association between self and anObject\\\\\\\"\\\\n\\\\n\\\\t^Association basicNew key: self value: anObject! !\\\\n\\\\n\\\\n\\\\n!Object methodsFor: 'binding'!\\\\nbindingOf: aString\\\\n\\\\t^nil! !\\\\n\\\\n\\\\n!Object methodsFor: 'casing'!\\\\ncaseOf: aBlockAssociationCollection\\\\n\\\\t\\\\\\\"The elements of aBlockAssociationCollection are associations between blocks.\\\\n\\\\t Answer the evaluated value of the first association in aBlockAssociationCollection\\\\n\\\\t whose evaluated key equals the receiver.  If no match is found, report an error.\\\\\\\"\\\\n\\\\n\\\\t^ self caseOf: aBlockAssociationCollection otherwise: [self caseError]\\\\n\\\\n\\\\\\\"| z | z _ {[#a]->[1+1]. ['b' asSymbol]->[2+2]. [#c]->[3+3]}. #b caseOf: z\\\\\\\"\\\\n\\\\\\\"| z | z _ {[#a]->[1+1]. ['d' asSymbol]->[2+2]. [#c]->[3+3]}. #b caseOf: z\\\\\\\"\\\\n\\\\\\\"The following are compiled in-line:\\\\\\\"\\\\n\\\\\\\"#b caseOf: {[#a]->[1+1]. ['b' asSymbol]->[2+2]. [#c]->[3+3]}\\\\\\\"\\\\n\\\\\\\"#b caseOf: {[#a]->[1+1]. ['d' asSymbol]->[2+2]. [#c]->[3+3]}\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'casing'!\\\\ncaseOf: aBlockAssociationCollection otherwise: aBlock\\\\n\\\\t\\\\\\\"The elements of aBlockAssociationCollection are associations between blocks.\\\\n\\\\t Answer the evaluated value of the first association in aBlockAssociationCollection\\\\n\\\\t whose evaluated key equals the receiver.  If no match is found, answer the result\\\\n\\\\t of evaluating aBlock.\\\\\\\"\\\\n\\\\n\\\\taBlockAssociationCollection associationsDo:\\\\n\\\\t\\\\t[:assoc | (assoc key value = self) ifTrue: [^assoc value value]].\\\\n\\\\t^ aBlock value\\\\n\\\\n\\\\\\\"| z | z _ {[#a]->[1+1]. ['b' asSymbol]->[2+2]. [#c]->[3+3]}. #b caseOf: z otherwise: [0]\\\\\\\"\\\\n\\\\\\\"| z | z _ {[#a]->[1+1]. ['d' asSymbol]->[2+2]. [#c]->[3+3]}. #b caseOf: z otherwise: [0]\\\\\\\"\\\\n\\\\\\\"The following are compiled in-line:\\\\\\\"\\\\n\\\\\\\"#b caseOf: {[#a]->[1+1]. ['b' asSymbol]->[2+2]. [#c]->[3+3]} otherwise: [0]\\\\\\\"\\\\n\\\\\\\"#b caseOf: {[#a]->[1+1]. ['d' asSymbol]->[2+2]. [#c]->[3+3]} otherwise: [0]\\\\\\\"! !\\\\n\\\\n\\\\n!Object methodsFor: 'class membership'!\\\\nclass\\\\n\\\\t\\\\\\\"Primitive. Answer the object which is the receiver's class. Essential. See \\\\n\\\\tObject documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 111>\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!Object methodsFor: 'class membership' stamp: 'sw 9/27/2001 15:51'!\\\\ninheritsFromAnyIn: aList\\\\n\\\\t\\\\\\\"Answer whether the receiver inherits from any class represented by any element in the list.  The elements of the list can be classes, class name symbols, or strings representing possible class names.  This allows speculative membership tests to be made even when some of the classes may not be known to the current image, and even when their names are not interned symbols.\\\\\\\"\\\\n\\\\n\\\\t| aClass |\\\\n\\\\taList do:\\\\n\\\\t\\\\t[:elem | Symbol hasInterned: elem asString ifTrue: \\\\n\\\\t\\\\t\\\\t[:elemSymbol | (((aClass _ Smalltalk at: elemSymbol ifAbsent: [nil]) isKindOf: Class)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tand: [self isKindOf: aClass])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[^ true]]].\\\\n\\\\t^ false\\\\n\\\\n\\\\n\\\\\\\"\\\\n{3.  true. 'olive'} do:\\\\n\\\\t[:token |\\\\n\\\\t\\\\t {{#Number. #Boolean}. {Number.  Boolean }.  {'Number'. 'Boolean'}} do:\\\\n\\\\t\\\\t\\\\t[:list |\\\\n\\\\t\\\\t\\\\t\\\\tTranscript cr; show: token asString, ' list element provided as a ', list first class name, ' - ', (token inheritsFromAnyIn: list) asString]]\\\\n\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'class membership'!\\\\nisKindOf: aClass \\\\n\\\\t\\\\\\\"Answer whether the class, aClass, is a superclass or class of the receiver.\\\\\\\"\\\\n\\\\n\\\\tself class == aClass\\\\n\\\\t\\\\tifTrue: [^true]\\\\n\\\\t\\\\tifFalse: [^self class inheritsFrom: aClass]! !\\\\n\\\\n!Object methodsFor: 'class membership' stamp: 'sw 2/16/98 02:08'!\\\\nisKindOf: aClass orOf: anotherClass\\\\n\\\\t\\\\\\\"Answer whether either of the classes, aClass or anotherClass,, is a superclass or class of the receiver.  A convenience; could be somewhat optimized\\\\\\\"\\\\n\\\\t^ (self isKindOf: aClass) or: [self isKindOf: anotherClass]! !\\\\n\\\\n!Object methodsFor: 'class membership'!\\\\nisMemberOf: aClass \\\\n\\\\t\\\\\\\"Answer whether the receiver is an instance of the class, aClass.\\\\\\\"\\\\n\\\\n\\\\t^self class == aClass! !\\\\n\\\\n!Object methodsFor: 'class membership'!\\\\nrespondsTo: aSymbol \\\\n\\\\t\\\\\\\"Answer whether the method dictionary of the receiver's class contains \\\\n\\\\taSymbol as a message selector.\\\\\\\"\\\\n\\\\n\\\\t^self class canUnderstand: aSymbol! !\\\\n\\\\n!Object methodsFor: 'class membership' stamp: 'tk 10/21/1998 12:38'!\\\\nxxxClass\\\\n\\\\t\\\\\\\"For subclasses of nil, such as ObjectOut\\\\\\\"\\\\n\\\\t^ self class! !\\\\n\\\\n\\\\n!Object methodsFor: 'comparing' stamp: 'tk 4/16/1999 18:26'!\\\\ncloseTo: anObject\\\\n\\\\t\\\\\\\"Answer whether the receiver and the argument represent the same\\\\n\\\\tobject. If = is redefined in any subclass, consider also redefining the\\\\n\\\\tmessage hash.\\\\\\\"\\\\n\\\\n\\\\t| ans |\\\\n\\\\t[ans _ self = anObject] ifError: [:aString :aReceiver | ^ false].\\\\n\\\\t^ ans! !\\\\n\\\\n!Object methodsFor: 'comparing'!\\\\nhash\\\\n\\\\t\\\\\\\"Answer a SmallInteger whose value is related to the receiver's identity.\\\\n\\\\tMay be overridden, and should be overridden in any classes that define = \\\\\\\"\\\\n\\\\n\\\\t^ self identityHash! !\\\\n\\\\n!Object methodsFor: 'comparing' stamp: 'pm 9/23/97 09:36'!\\\\nhashMappedBy: map\\\\n\\\\t\\\\\\\"Answer what my hash would be if oops changed according to map.\\\\\\\"\\\\n\\\\n\\\\t^map newHashFor: self! !\\\\n\\\\n!Object methodsFor: 'comparing' stamp: 'di 9/27/97 20:23'!\\\\nidentityHashMappedBy: map\\\\n\\\\t\\\\\\\"Answer what my hash would be if oops changed according to map.\\\\\\\"\\\\n\\\\n\\\\t^map newHashFor: self! !\\\\n\\\\n!Object methodsFor: 'comparing' stamp: 'sw 8/20/1998 12:34'!\\\\nidentityHashPrintString\\\\n\\\\t\\\\\\\"'fred' identityHashPrintString\\\\\\\"\\\\n\\\\n\\\\t^ '(', self identityHash printString, ')'! !\\\\n\\\\n!Object methodsFor: 'comparing' stamp: 'ajh 2/2/2002 15:02'!\\\\nliteralEqual: other\\\\n\\\\n\\\\t^ self class == other class and: [self = other]! !\\\\n\\\\n!Object methodsFor: 'comparing'!\\\\n= anObject \\\\n\\\\t\\\\\\\"Answer whether the receiver and the argument represent the same \\\\n\\\\tobject. If = is redefined in any subclass, consider also redefining the \\\\n\\\\tmessage hash.\\\\\\\"\\\\n\\\\n\\\\t^self == anObject! !\\\\n\\\\n!Object methodsFor: 'comparing'!\\\\n~= anObject \\\\n\\\\t\\\\\\\"Answer whether the receiver and the argument do not represent the \\\\n\\\\tsame object.\\\\\\\"\\\\n\\\\n\\\\t^self = anObject == false! !\\\\n\\\\n\\\\n!Object methodsFor: 'converting' stamp: 'di 11/9/1998 12:15'!\\\\nadaptToFloat: rcvr andSend: selector\\\\n\\\\t\\\\\\\"If no method has been provided for adapting an object to a Float,\\\\n\\\\tthen it may be adequate to simply adapt it to a number.\\\\\\\"\\\\n\\\\t^ self adaptToNumber: rcvr andSend: selector! !\\\\n\\\\n!Object methodsFor: 'converting' stamp: 'di 11/9/1998 12:14'!\\\\nadaptToFraction: rcvr andSend: selector\\\\n\\\\t\\\\\\\"If no method has been provided for adapting an object to a Fraction,\\\\n\\\\tthen it may be adequate to simply adapt it to a number.\\\\\\\"\\\\n\\\\t^ self adaptToNumber: rcvr andSend: selector! !\\\\n\\\\n!Object methodsFor: 'converting' stamp: 'di 11/9/1998 12:15'!\\\\nadaptToInteger: rcvr andSend: selector\\\\n\\\\t\\\\\\\"If no method has been provided for adapting an object to a Integer,\\\\n\\\\tthen it may be adequate to simply adapt it to a number.\\\\\\\"\\\\n\\\\t^ self adaptToNumber: rcvr andSend: selector! !\\\\n\\\\n!Object methodsFor: 'converting' stamp: 'rw 4/27/2002 07:48'!\\\\nasActionSequence\\\\n\\\\n\\\\t^WeakActionSequence with: self! !\\\\n\\\\n!Object methodsFor: 'converting' stamp: 'rw 7/20/2003 16:03'!\\\\nasActionSequenceTrappingErrors\\\\n\\\\n\\\\t^WeakActionSequenceTrappingErrors with: self! !\\\\n\\\\n!Object methodsFor: 'converting' stamp: 'svp 5/16/2000 18:14'!\\\\nasDraggableMorph\\\\n\\\\t^(StringMorph contents: self printString)\\\\n\\\\t\\\\tcolor: Color white;\\\\n\\\\t\\\\tyourself! !\\\\n\\\\n!Object methodsFor: 'converting' stamp: 'sma 5/12/2000 17:39'!\\\\nasOrderedCollection\\\\n\\\\t\\\\\\\"Answer an OrderedCollection with the receiver as its only element.\\\\\\\"\\\\n\\\\n\\\\t^ OrderedCollection with: self! !\\\\n\\\\n!Object methodsFor: 'converting'!\\\\nasString\\\\n\\\\t\\\\\\\"Answer a string that represents the receiver.\\\\\\\"\\\\n\\\\n\\\\t^ self printString ! !\\\\n\\\\n!Object methodsFor: 'converting' stamp: 'ajh 3/11/2003 10:27'!\\\\nasStringOrText\\\\n\\\\t\\\\\\\"Answer a string that represents the receiver.\\\\\\\"\\\\n\\\\n\\\\t^ self printString ! !\\\\n\\\\n!Object methodsFor: 'converting'!\\\\nas: aSimilarClass\\\\n\\\\t\\\\\\\"Create an object of class aSimilarClass that has similar contents to the receiver.\\\\\\\"\\\\n\\\\n\\\\t^ aSimilarClass newFrom: self! !\\\\n\\\\n!Object methodsFor: 'converting' stamp: 'RAA 8/2/1999 12:41'!\\\\ncomplexContents\\\\n\\\\n\\\\t^self! !\\\\n\\\\n!Object methodsFor: 'converting' stamp: 'ajh 7/6/2003 20:37'!\\\\nmustBeBoolean\\\\n\\\\t\\\\\\\"Catches attempts to test truth of non-Booleans.  This message is sent from the VM.  The sending context is rewound to just before the jump causing this exception.\\\\\\\"\\\\n\\\\n\\\\t^ self mustBeBooleanIn: thisContext sender! !\\\\n\\\\n!Object methodsFor: 'converting' stamp: 'ajh 7/6/2003 20:40'!\\\\nmustBeBooleanIn: context\\\\n\\\\t\\\\\\\"context is the where the non-boolean error occurred. Rewind context to before jump then raise error.\\\\\\\"\\\\n\\\\n\\\\t| proceedValue |\\\\n\\\\tcontext skipBackBeforeJump.\\\\n\\\\tproceedValue _ NonBooleanReceiver new\\\\n\\\\t\\\\tobject: self;\\\\n\\\\t\\\\tsignal: 'proceed for truth.'.\\\\n\\\\t^ proceedValue ~~ false! !\\\\n\\\\n!Object methodsFor: 'converting' stamp: 'sw 3/26/2001 12:12'!\\\\nprintDirectlyToDisplay\\\\n\\\\t\\\\\\\"For debugging: write the receiver's printString directly to the display at (0, 100); senders of this are detected by the check-for-slips mechanism.\\\\\\\"\\\\n\\\\n\\\\tself asString displayAt: 0@100\\\\n\\\\n\\\\\\\"StringMorph someInstance printDirectlyToDisplay\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'converting' stamp: 'RAA 3/31/1999 12:13'!\\\\nwithoutListWrapper\\\\n\\\\n\\\\t^self! !\\\\n\\\\n\\\\n!Object methodsFor: 'copying'!\\\\nclone\\\\n\\\\n\\\\t<primitive: 148>\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!Object methodsFor: 'copying' stamp: 'ajh 8/18/2001 21:25'!\\\\ncopy\\\\n\\\\t\\\\\\\"Answer another instance just like the receiver. Subclasses typically override postCopy; they typically do not override shallowCopy.\\\\\\\"\\\\n\\\\n\\\\t^self shallowCopy postCopy! !\\\\n\\\\n!Object methodsFor: 'copying' stamp: 'tk 8/20/1998 16:01'!\\\\ncopyAddedStateFrom: anotherObject\\\\n\\\\t\\\\\\\"Copy over the values of instance variables added by the receiver's class from anotherObject to the receiver.  These will be remapped in mapUniClasses, if needed.\\\\\\\"\\\\n\\\\n\\\\tself class superclass instSize + 1 to: self class instSize do:\\\\n\\\\t\\\\t[:index | self instVarAt: index put: (anotherObject instVarAt: index)]! !\\\\n\\\\n!Object methodsFor: 'copying' stamp: 'tpr 2/14/2004 21:53'!\\\\ncopyFrom: anotherObject\\\\n\\\\t\\\\\\\"Copy to myself all instance variables I have in common with anotherObject.  This is dangerous because it ignores an object's control over its own inst vars.  \\\\\\\"\\\\n\\\\n\\\\t| mine his |\\\\n\\\\t<primitive: 168>\\\\n\\\\tmine _ self class allInstVarNames.\\\\n\\\\this _ anotherObject class allInstVarNames.\\\\n\\\\t1 to: (mine size min: his size) do: [:ind |\\\\n\\\\t\\\\t(mine at: ind) = (his at: ind) ifTrue: [\\\\n\\\\t\\\\t\\\\tself instVarAt: ind put: (anotherObject instVarAt: ind)]].\\\\n\\\\tself class isVariable & anotherObject class isVariable ifTrue: [\\\\n\\\\t\\\\t1 to: (self basicSize min: anotherObject basicSize) do: [:ind |\\\\n\\\\t\\\\t\\\\tself basicAt: ind put: (anotherObject basicAt: ind)]].! !\\\\n\\\\n!Object methodsFor: 'copying' stamp: 'ajh 5/23/2002 00:38'!\\\\ncopySameFrom: otherObject\\\\n\\\\t\\\\\\\"Copy to myself all instance variables named the same in otherObject.\\\\n\\\\tThis ignores otherObject's control over its own inst vars.\\\\\\\"\\\\n\\\\n\\\\t| myInstVars otherInstVars match |\\\\n\\\\tmyInstVars _ self class allInstVarNames.\\\\n\\\\totherInstVars _ otherObject class allInstVarNames.\\\\n\\\\tmyInstVars doWithIndex: [:each :index |\\\\n\\\\t\\\\t(match _ otherInstVars indexOf: each) > 0 ifTrue:\\\\n\\\\t\\\\t\\\\t[self instVarAt: index put: (otherObject instVarAt: match)]].\\\\n\\\\t1 to: (self basicSize min: otherObject basicSize) do: [:i |\\\\n\\\\t\\\\tself basicAt: i put: (otherObject basicAt: i)].\\\\n! !\\\\n\\\\n!Object methodsFor: 'copying' stamp: 'tk 4/20/1999 14:44'!\\\\ncopyTwoLevel\\\\n\\\\t\\\\\\\"one more level than a shallowCopy\\\\\\\"\\\\n\\\\n\\\\t| newObject class index |\\\\n\\\\tclass _ self class.\\\\n\\\\tnewObject _ self clone.\\\\n\\\\tnewObject == self ifTrue: [^ self].\\\\n\\\\tclass isVariable\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[index _ self basicSize.\\\\n\\\\t\\\\t\\\\t[index > 0]\\\\n\\\\t\\\\t\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[newObject basicAt: index put: (self basicAt: index) shallowCopy.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tindex _ index - 1]].\\\\n\\\\tindex _ class instSize.\\\\n\\\\t[index > 0]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[newObject instVarAt: index put: (self instVarAt: index) shallowCopy.\\\\n\\\\t\\\\t\\\\tindex _ index - 1].\\\\n\\\\t^newObject! !\\\\n\\\\n!Object methodsFor: 'copying'!\\\\ndeepCopy\\\\n\\\\t\\\\\\\"Answer a copy of the receiver with its own copy of each instance \\\\n\\\\tvariable.\\\\\\\"\\\\n\\\\n\\\\t| newObject class index |\\\\n\\\\tclass _ self class.\\\\n\\\\t(class == Object) ifTrue: [^self].\\\\n\\\\tclass isVariable\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[index _ self basicSize.\\\\n\\\\t\\\\t\\\\tnewObject _ class basicNew: index.\\\\n\\\\t\\\\t\\\\t[index > 0]\\\\n\\\\t\\\\t\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[newObject basicAt: index put: (self basicAt: index) deepCopy.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tindex _ index - 1]]\\\\n\\\\t\\\\tifFalse: [newObject _ class basicNew].\\\\n\\\\tindex _ class instSize.\\\\n\\\\t[index > 0]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[newObject instVarAt: index put: (self instVarAt: index) deepCopy.\\\\n\\\\t\\\\t\\\\tindex _ index - 1].\\\\n\\\\t^newObject! !\\\\n\\\\n!Object methodsFor: 'copying' stamp: 'hg 11/23/1999 13:43'!\\\\ninitialDeepCopierSize\\\\n\\\\t\\\\\\\"default value is 4096; other classes may override this, esp. for smaller (=faster) sizes\\\\\\\"\\\\n\\\\n\\\\t^4096! !\\\\n\\\\n!Object methodsFor: 'copying' stamp: 'ajh 1/27/2003 18:45'!\\\\npostCopy\\\\n\\\\t\\\\\\\"self is a shallow copy, subclasses should copy fields as necessary to complete the full copy\\\\\\\"\\\\n\\\\n\\\\t^ self! !\\\\n\\\\n!Object methodsFor: 'copying' stamp: 'jm 11/14/97 11:08'!\\\\nshallowCopy\\\\n\\\\t\\\\\\\"Answer a copy of the receiver which shares the receiver's instance variables.\\\\\\\"\\\\n\\\\t| class newObject index |\\\\n\\\\t<primitive: 148>\\\\n\\\\tclass _ self class.\\\\n\\\\tclass isVariable\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[index _ self basicSize.\\\\n\\\\t\\\\t\\\\tnewObject _ class basicNew: index.\\\\n\\\\t\\\\t\\\\t[index > 0]\\\\n\\\\t\\\\t\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[newObject basicAt: index put: (self basicAt: index).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tindex _ index - 1]]\\\\n\\\\t\\\\tifFalse: [newObject _ class basicNew].\\\\n\\\\tindex _ class instSize.\\\\n\\\\t[index > 0]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[newObject instVarAt: index put: (self instVarAt: index).\\\\n\\\\t\\\\t\\\\tindex _ index - 1].\\\\n\\\\t^ newObject! !\\\\n\\\\n!Object methodsFor: 'copying' stamp: 'tk 3/11/2003 13:58'!\\\\nveryDeepCopy\\\\n\\\\t\\\\\\\"Do a complete tree copy using a dictionary.  An object in the tree twice is only copied once.  All references to the object in the copy of the tree will point to the new copy.\\\\\\\"\\\\n\\\\n\\\\t| copier new |\\\\n\\\\tcopier _ DeepCopier new initialize: self initialDeepCopierSize.\\\\n\\\\tnew _ self veryDeepCopyWith: copier.\\\\n\\\\tcopier mapUniClasses.\\\\n\\\\tcopier references associationsDo: [:assoc | \\\\n\\\\t\\\\tassoc value veryDeepFixupWith: copier].\\\\n\\\\tcopier fixDependents.\\\\n\\\\t^ new! !\\\\n\\\\n!Object methodsFor: 'copying' stamp: 'tk 3/11/2003 13:58'!\\\\nveryDeepCopySibling\\\\n\\\\t\\\\\\\"Do a complete tree copy using a dictionary.  Substitute a clone of oldPlayer for the root.  Normally, a Player or non systemDefined object would have a new class.  We do not want one this time.  An object in the tree twice, is only copied once.  All references to the object in the copy of the tree will point to the new copy.\\\\\\\"\\\\n\\\\n\\\\t| copier new |\\\\n\\\\tcopier _ DeepCopier new initialize: self initialDeepCopierSize.\\\\n\\\\tcopier newUniClasses: false.\\\\n\\\\tnew _ self veryDeepCopyWith: copier.\\\\n\\\\tcopier mapUniClasses.\\\\n\\\\tcopier references associationsDo: [:assoc | \\\\n\\\\t\\\\tassoc value veryDeepFixupWith: copier].\\\\n\\\\tcopier fixDependents.\\\\n\\\\t^ new! !\\\\n\\\\n!Object methodsFor: 'copying' stamp: 'tk 5/13/2003 19:39'!\\\\nveryDeepCopyUsing: copier\\\\n\\\\t\\\\\\\"Do a complete tree copy using a dictionary.  An object in the tree twice is only copied once.  All references to the object in the copy of the tree will point to the new copy.\\\\n\\\\tSame as veryDeepCopy except copier (with dictionary) is supplied.\\\\n\\\\t** do not delete this method, even if it has no callers **\\\\\\\"\\\\n\\\\n\\\\t| new refs newDep newModel |\\\\n\\\\tnew _ self veryDeepCopyWith: copier.\\\\n\\\\tcopier mapUniClasses.\\\\n\\\\tcopier references associationsDo: [:assoc | \\\\n\\\\t\\\\tassoc value veryDeepFixupWith: copier].\\\\n\\\\t\\\\\\\"Fix dependents\\\\\\\"\\\\n\\\\trefs _ copier references.\\\\n\\\\tDependentsFields associationsDo: [:pair |\\\\n\\\\t\\\\tpair value do: [:dep | \\\\n\\\\t\\\\t\\\\t(newDep _ refs at: dep ifAbsent: [nil]) ifNotNil: [\\\\n\\\\t\\\\t\\\\t\\\\tnewModel _ refs at: pair key ifAbsent: [pair key].\\\\n\\\\t\\\\t\\\\t\\\\tnewModel addDependent: newDep]]].\\\\n\\\\t^ new! !\\\\n\\\\n!Object methodsFor: 'copying' stamp: 'tk 3/11/2003 14:12'!\\\\nveryDeepCopyWith: deepCopier\\\\n\\\\t\\\\\\\"Copy me and the entire tree of objects I point to.  An object in the tree twice is copied once, and both references point to him.  deepCopier holds a dictionary of objects we have seen.  Some classes refuse to be copied.  Some classes are picky about which fields get deep copied.\\\\\\\"\\\\n\\\\t| class index sub subAss new uc sup has mine |\\\\n\\\\tdeepCopier references at: self ifPresent: [:newer | ^ newer]. \\\\t\\\\\\\"already did him\\\\\\\"\\\\n\\\\tclass _ self class.\\\\n\\\\tclass isMeta ifTrue: [^ self].\\\\t\\\\t\\\\\\\"a class\\\\\\\"\\\\n\\\\tnew _ self clone.\\\\n\\\\t(class isSystemDefined not and: [deepCopier newUniClasses \\\\\\\"allowed\\\\\\\"]) ifTrue: [\\\\n\\\\t\\\\tuc _ deepCopier uniClasses at: class ifAbsent: [nil].\\\\n\\\\t\\\\tuc ifNil: [\\\\n\\\\t\\\\t\\\\tdeepCopier uniClasses at: class put: (uc _ self copyUniClassWith: deepCopier).\\\\n\\\\t\\\\t\\\\tdeepCopier references at: class put: uc].\\\\t\\\\\\\"remember\\\\\\\"\\\\n\\\\t\\\\tnew _ uc new.\\\\n\\\\t\\\\tnew copyFrom: self].\\\\t\\\\\\\"copy inst vars in case any are weak\\\\\\\"\\\\n\\\\tdeepCopier references at: self put: new.\\\\t\\\\\\\"remember\\\\\\\"\\\\n\\\\t(class isVariable and: [class isPointers]) ifTrue: \\\\n\\\\t\\\\t[index _ self basicSize.\\\\n\\\\t\\\\t[index > 0] whileTrue: \\\\n\\\\t\\\\t\\\\t[sub _ self basicAt: index.\\\\n\\\\t\\\\t\\\\t(subAss _ deepCopier references associationAt: sub ifAbsent: [nil])\\\\n\\\\t\\\\t\\\\t\\\\tifNil: [new basicAt: index put: (sub veryDeepCopyWith: deepCopier)]\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil: [new basicAt: index put: subAss value].\\\\n\\\\t\\\\t\\\\tindex _ index - 1]].\\\\n\\\\t\\\\\\\"Ask each superclass if it wants to share (weak copy) any inst vars\\\\\\\"\\\\n\\\\tnew veryDeepInner: deepCopier.\\\\t\\\\t\\\\\\\"does super a lot\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"other superclasses want all inst vars deep copied\\\\\\\"\\\\n\\\\tsup _ class.  index _ class instSize.\\\\n\\\\t[has _ sup compiledMethodAt: #veryDeepInner: ifAbsent: [nil].\\\\n\\\\thas _ has ifNil: [class isSystemDefined not \\\\\\\"is a uniClass\\\\\\\"] ifNotNil: [true].\\\\n\\\\tmine _ sup instVarNames.\\\\n\\\\thas ifTrue: [index _ index - mine size]\\\\t\\\\\\\"skip inst vars\\\\\\\"\\\\n\\\\t\\\\tifFalse: [1 to: mine size do: [:xx |\\\\n\\\\t\\\\t\\\\t\\\\tsub _ self instVarAt: index.\\\\n\\\\t\\\\t\\\\t\\\\t(subAss _ deepCopier references associationAt: sub ifAbsent: [nil])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"use association, not value, so nil is an exceptional value\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifNil: [new instVarAt: index put: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(sub veryDeepCopyWith: deepCopier)]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifNotNil: [new instVarAt: index put: subAss value].\\\\n\\\\t\\\\t\\\\t\\\\tindex _ index - 1]].\\\\n\\\\t(sup _ sup superclass) == nil] whileFalse.\\\\n\\\\tnew rehash.\\\\t\\\\\\\"force Sets and Dictionaries to rehash\\\\\\\"\\\\n\\\\t^ new\\\\n! !\\\\n\\\\n!Object methodsFor: 'copying' stamp: 'tk 1/6/1999 17:39'!\\\\nveryDeepFixupWith: deepCopier\\\\n\\\\t\\\\\\\"I have no fields and no superclass.  Catch the super call.\\\\\\\"\\\\n! !\\\\n\\\\n!Object methodsFor: 'copying' stamp: 'tk 9/4/2001 10:30'!\\\\nveryDeepInner: deepCopier\\\\n\\\\t\\\\\\\"No special treatment for inst vars of my superclasses.  Override when some need to be weakly copied.  Object>>veryDeepCopyWith: will veryDeepCopy any inst var whose class does not actually define veryDeepInner:\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!Object methodsFor: 'creation' stamp: 'nk 2/26/2004 13:33'!\\\\nasMorph\\\\n\\\\t\\\\\\\"Open a morph, as best one can, on the receiver\\\\\\\"\\\\n\\\\n\\\\t^ self asStringMorph\\\\n\\\\n\\\\t\\\\\\\"\\\\n234 asMorph\\\\n(ScriptingSystem formAtKey: #TinyMenu) asMorph\\\\n'fred' asMorph\\\\n\\\\\\\"\\\\n\\\\n! !\\\\n\\\\n!Object methodsFor: 'creation' stamp: 'nk 2/26/2004 13:35'!\\\\nasStringMorph\\\\n\\\\t\\\\\\\"Open a StringMorph, as best one can, on the receiver\\\\\\\"\\\\n\\\\n\\\\t^ self asStringOrText asStringMorph\\\\n! !\\\\n\\\\n!Object methodsFor: 'creation' stamp: 'nk 2/26/2004 13:35'!\\\\nasTextMorph\\\\n\\\\t\\\\\\\"Open a TextMorph, as best one can, on the receiver\\\\\\\"\\\\n\\\\n\\\\t^ TextMorph new contentsAsIs: self asStringOrText\\\\n! !\\\\n\\\\n!Object methodsFor: 'creation' stamp: 'sw 1/29/2002 21:45'!\\\\nopenAsMorph\\\\n\\\\t\\\\\\\"Open a morph, as best one can, on the receiver\\\\\\\"\\\\n\\\\n\\\\t^ self asMorph openInHand\\\\n\\\\n\\\\\\\"\\\\n234 openAsMorph\\\\n(ScriptingSystem formAtKey: #TinyMenu) openAsMorph\\\\n'fred' openAsMorph\\\\n\\\\\\\"! !\\\\n\\\\n\\\\n!Object methodsFor: 'debugging' stamp: 'md 11/24/2004 11:45'!\\\\nhaltIf: condition\\\\n\\\\t\\\\\\\"This is the typical message to use for inserting breakpoints during \\\\n\\\\tdebugging.  Param can be a block or expression, halt if true.\\\\n\\\\tIf the Block has one arg, the receiver is bound to that.\\\\n \\\\tIf the condition is a selector, we look up in the callchain. Halt if\\\\n      any method's selector equals selector.\\\\\\\"\\\\n\\\\t| cntxt |\\\\n\\\\n\\\\tcondition isSymbol ifTrue:[\\\\n\\\\t\\\\t\\\\\\\"only halt if a method with selector symbol is in callchain\\\\\\\"\\\\n\\\\t\\\\tcntxt := thisContext.\\\\n\\\\t\\\\t[cntxt sender isNil] whileFalse: [\\\\n\\\\t\\\\t\\\\tcntxt := cntxt sender. \\\\n\\\\t\\\\t\\\\t(cntxt selector = condition) ifTrue: [Halt signal].\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t^self.\\\\n\\\\t].\\\\n\\\\t(condition isBlock \\\\n\\\\t\\\\t\\\\tifTrue: [condition valueWithPossibleArgument: self] \\\\n\\\\t\\\\t\\\\tifFalse: [condition] \\\\n\\\\t) ifTrue: [\\\\n\\\\t\\\\tHalt signal\\\\n\\\\t].! !\\\\n\\\\n!Object methodsFor: 'debugging'!\\\\nneedsWork! !\\\\n\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 6/2/2004 08:26'!\\\\ncheckHaltCountExpired\\\\n\\\\t| counter |\\\\n\\\\tcounter _ Smalltalk at: #HaltCount ifAbsent: [0].\\\\n\\\\t^counter = 0! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 5/19/2004 19:04'!\\\\nclearHaltOnce\\\\n\\\\t\\\\\\\"Turn on the halt once flag.\\\\\\\"\\\\n\\\\tSmalltalk at: #HaltOnce put: false! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 6/2/2004 08:30'!\\\\ndecrementAndCheckHaltCount\\\\n\\\\tself decrementHaltCount.\\\\n\\\\t^self checkHaltCountExpired! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 6/2/2004 08:28'!\\\\ndecrementHaltCount\\\\n\\\\t| counter |\\\\n\\\\tcounter := Smalltalk\\\\n\\\\t\\\\t\\\\t\\\\tat: #HaltCount\\\\n\\\\t\\\\t\\\\t\\\\tifAbsent: [0].\\\\n\\\\tcounter > 0 ifTrue: [\\\\n\\\\t\\\\tcounter _ counter - 1.\\\\n\\\\t\\\\tself setHaltCountTo: counter]! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 6/2/2004 08:42'!\\\\ndoExpiredHaltCount\\\\n\\\\tself clearHaltOnce.\\\\n\\\\tself removeHaltCount.\\\\n\\\\tself halt! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 6/2/2004 08:44'!\\\\ndoExpiredHaltCount: aString\\\\n\\\\tself clearHaltOnce.\\\\n\\\\tself removeHaltCount.\\\\n\\\\tself halt: aString! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 6/2/2004 08:45'!\\\\ndoExpiredInspectCount\\\\n\\\\tself clearHaltOnce.\\\\n\\\\tself removeHaltCount.\\\\n\\\\tself inspect! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 6/2/2004 08:43'!\\\\nhaltOnCount: int \\\\n\\\\tself haltOnceEnabled\\\\n\\\\t\\\\tifTrue: [self hasHaltCount\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self decrementAndCheckHaltCount\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self doExpiredHaltCount]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [int = 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self doExpiredHaltCount]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [self setHaltCountTo: int - 1]]]! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 5/19/2004 19:05'!\\\\nhaltOnce\\\\n\\\\t\\\\\\\"Halt unless we have already done it once.\\\\\\\"\\\\n\\\\tself haltOnceEnabled\\\\n\\\\t\\\\tifTrue: [self clearHaltOnce.\\\\n\\\\t\\\\t\\\\t^ self halt]! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 5/19/2004 19:04'!\\\\nhaltOnceEnabled\\\\n\\\\t^ Smalltalk\\\\n\\\\t\\\\tat: #HaltOnce\\\\n\\\\t\\\\tifAbsent: [false]! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 5/19/2004 19:05'!\\\\nhaltOnce: aString \\\\n\\\\t\\\\\\\"Halt unless we have already done it once.\\\\\\\"\\\\n\\\\tself haltOnceEnabled\\\\n\\\\t\\\\tifTrue: [self clearHaltOnce.\\\\n\\\\t\\\\t\\\\t^ self halt: aString]! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 6/2/2004 08:45'!\\\\nhalt: aString onCount: int \\\\n\\\\tself haltOnceEnabled\\\\n\\\\t\\\\tifTrue: [self hasHaltCount\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self decrementAndCheckHaltCount\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self doExpiredHaltCount: aString]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [int = 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self doExpiredHaltCount: aString]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [self setHaltCountTo: int - 1]]]! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 6/2/2004 08:36'!\\\\nhasHaltCount\\\\n\\\\t^Smalltalk\\\\n\\\\t\\\\t\\\\t\\\\tincludesKey: #HaltCount! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 6/2/2004 08:46'!\\\\ninspectOnCount: int \\\\n\\\\tself haltOnceEnabled\\\\n\\\\t\\\\tifTrue: [self hasHaltCount\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self decrementAndCheckHaltCount\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self doExpiredInspectCount]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [int = 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self doExpiredInspectCount]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [self setHaltCountTo: int - 1]]]! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 5/19/2004 19:05'!\\\\ninspectOnce\\\\n\\\\t\\\\\\\"Inspect unless we have already done it once.\\\\\\\"\\\\n\\\\tself haltOnceEnabled\\\\n\\\\t\\\\tifTrue: [self clearHaltOnce.\\\\n\\\\t\\\\t\\\\t^ self inspect]! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 6/2/2004 13:20'!\\\\ninspectUntilCount: int \\\\n\\\\tself haltOnceEnabled\\\\n\\\\t\\\\tifTrue: [self hasHaltCount\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self decrementAndCheckHaltCount\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self doExpiredInspectCount]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [self inspect]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [int = 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self doExpiredInspectCount]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [self setHaltCountTo: int - 1]]]! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 6/2/2004 08:49'!\\\\nremoveHaltCount\\\\n\\\\t(Smalltalk includesKey: #HaltCount) ifTrue: [\\\\n\\\\t\\\\tSmalltalk removeKey: #HaltCount]! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 6/2/2004 08:25'!\\\\nsetHaltCountTo: int\\\\n\\\\tSmalltalk at: #HaltCount put: int! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 5/19/2004 19:04'!\\\\nsetHaltOnce\\\\n\\\\t\\\\\\\"Turn on the halt once flag.\\\\\\\"\\\\n\\\\tSmalltalk at: #HaltOnce put: true! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 5/19/2004 19:04'!\\\\ntoggleHaltOnce\\\\n\\\\tself haltOnceEnabled\\\\n\\\\t\\\\tifTrue: [self clearHaltOnce]\\\\n\\\\t\\\\tifFalse: [self setHaltOnce]! !\\\\n\\\\n\\\\n!Object methodsFor: 'dependents access' stamp: 'ar 2/11/2001 01:55'!\\\\naddDependent: anObject\\\\n\\\\t\\\\\\\"Make the given object one of the receiver's dependents.\\\\\\\"\\\\n\\\\n\\\\t| dependents |\\\\n\\\\tdependents _ self dependents.\\\\n\\\\t(dependents includes: anObject) ifFalse:\\\\n\\\\t\\\\t[self myDependents: (dependents copyWithDependent: anObject)].\\\\n\\\\t^ anObject! !\\\\n\\\\n!Object methodsFor: 'dependents access' stamp: 'sma 2/29/2000 19:53'!\\\\nbreakDependents\\\\n\\\\t\\\\\\\"Remove all of the receiver's dependents.\\\\\\\"\\\\n\\\\n\\\\tself myDependents: nil! !\\\\n\\\\n!Object methodsFor: 'dependents access' stamp: 'sma 2/29/2000 19:26'!\\\\ncanDiscardEdits\\\\n\\\\t\\\\\\\"Answer true if none of the views on this model has unaccepted edits that matter.\\\\\\\"\\\\n\\\\n\\\\tself dependents\\\\n\\\\t\\\\tdo: [:each | each canDiscardEdits ifFalse: [^ false]]\\\\n\\\\t\\\\twithout: self.\\\\n\\\\t^ true! !\\\\n\\\\n!Object methodsFor: 'dependents access' stamp: 'sma 2/29/2000 19:58'!\\\\ndependents\\\\n\\\\t\\\\\\\"Answer a collection of objects that are 'dependent' on the receiver;\\\\n\\\\t that is, all objects that should be notified if the receiver changes.\\\\\\\"\\\\n\\\\n\\\\t^ self myDependents ifNil: [#()]! !\\\\n\\\\n!Object methodsFor: 'dependents access'!\\\\nevaluate: actionBlock wheneverChangeIn: aspectBlock\\\\n\\\\t| viewerThenObject objectThenViewer |\\\\n\\\\tobjectThenViewer _ self.\\\\n\\\\tviewerThenObject _ ObjectViewer on: objectThenViewer.\\\\n\\\\tobjectThenViewer become: viewerThenObject.\\\\n\\\\t\\\\\\\"--- Then ---\\\\\\\"\\\\n\\\\tobjectThenViewer xxxViewedObject: viewerThenObject\\\\n\\\\t\\\\t\\\\tevaluate: actionBlock\\\\n\\\\t\\\\t\\\\twheneverChangeIn: aspectBlock! !\\\\n\\\\n!Object methodsFor: 'dependents access' stamp: 'sma 2/29/2000 19:59'!\\\\nhasUnacceptedEdits\\\\n\\\\t\\\\\\\"Answer true if any of the views on this object has unaccepted edits.\\\\\\\"\\\\n\\\\n\\\\tself dependents\\\\n\\\\t\\\\tdo: [:each | each hasUnacceptedEdits ifTrue: [^ true]]\\\\n\\\\t\\\\twithout: self.\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'dependents access' stamp: 'sma 2/29/2000 19:55'!\\\\nmyDependents\\\\n\\\\t\\\\\\\"Private. Answer a list of all the receiver's dependents.\\\\\\\"\\\\n\\\\n\\\\t^ DependentsFields at: self ifAbsent: []! !\\\\n\\\\n!Object methodsFor: 'dependents access' stamp: 'sma 2/29/2000 19:52'!\\\\nmyDependents: aCollectionOrNil\\\\n\\\\t\\\\\\\"Private. Set (or remove) the receiver's dependents list.\\\\\\\"\\\\n\\\\n\\\\taCollectionOrNil\\\\n\\\\t\\\\tifNil: [DependentsFields removeKey: self ifAbsent: []]\\\\n\\\\t\\\\tifNotNil: [DependentsFields at: self put: aCollectionOrNil]! !\\\\n\\\\n!Object methodsFor: 'dependents access' stamp: 'reThink 2/18/2001 17:06'!\\\\nrelease\\\\n\\\\t\\\\\\\"Remove references to objects that may refer to the receiver. This message \\\\n\\\\tshould be overridden by subclasses with any cycles, in which case the \\\\n\\\\tsubclass should also include the expression super release.\\\\\\\"\\\\n\\\\n\\\\tself releaseActionMap! !\\\\n\\\\n!Object methodsFor: 'dependents access' stamp: 'sma 2/29/2000 20:23'!\\\\nremoveDependent: anObject\\\\n\\\\t\\\\\\\"Remove the given object as one of the receiver's dependents.\\\\\\\"\\\\n\\\\n\\\\t| dependents |\\\\n\\\\tdependents _ self dependents reject: [:each | each == anObject].\\\\n\\\\tself myDependents: (dependents isEmpty ifFalse: [dependents]).\\\\n\\\\t^ anObject! !\\\\n\\\\n\\\\n!Object methodsFor: 'drag and drop' stamp: 'bh 9/16/2001 18:10'!\\\\nacceptDroppingMorph: transferMorph event: evt inMorph: dstListMorph \\\\n\\\\t\\\\n\\\\t^false.! !\\\\n\\\\n!Object methodsFor: 'drag and drop' stamp: 'mir 5/16/2000 11:35'!\\\\ndragAnimationFor: item transferMorph: transferMorph \\\\n\\\\t\\\\\\\"Default do nothing\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'drag and drop' stamp: 'panda 4/28/2000 16:20'!\\\\ndragPassengerFor: item inMorph: dragSource \\\\n\\\\t^item! !\\\\n\\\\n!Object methodsFor: 'drag and drop' stamp: 'panda 4/28/2000 16:11'!\\\\ndragTransferType\\\\n\\\\t^nil! !\\\\n\\\\n!Object methodsFor: 'drag and drop' stamp: 'panda 4/28/2000 16:05'!\\\\ndragTransferTypeForMorph: dragSource \\\\n\\\\t^nil! !\\\\n\\\\n!Object methodsFor: 'drag and drop' stamp: 'mir 5/8/2000 17:19'!\\\\nwantsDroppedMorph: aMorph event: anEvent inMorph: destinationLM \\\\n\\\\t^false! !\\\\n\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'sma 5/6/2000 19:35'!\\\\nassert: aBlock\\\\n\\\\t\\\\\\\"Throw an assertion error if aBlock does not evaluates to true.\\\\\\\"\\\\n\\\\n\\\\taBlock value ifFalse: [AssertionFailure signal: 'Assertion failed']! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'nk 1/15/2004 10:54'!\\\\nassert: aBlock descriptionBlock: descriptionBlock\\\\n\\\\t\\\\\\\"Throw an assertion error if aBlock does not evaluate to true.\\\\\\\"\\\\n\\\\n\\\\taBlock value ifFalse: [AssertionFailure signal: descriptionBlock value asString ]! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'nk 10/25/2003 16:47'!\\\\nassert: aBlock description: aString\\\\n\\\\t\\\\\\\"Throw an assertion error if aBlock does not evaluates to true.\\\\\\\"\\\\n\\\\n\\\\taBlock value ifFalse: [AssertionFailure signal: aString ]! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'md 10/13/2004 15:59'!\\\\nbackwardCompatibilityOnly: anExplanationString\\\\n\\\\t\\\\\\\"Warn that the sending method has been deprecated. Methods that are tagt with #backwardCompatibility:\\\\n\\\\t are kept for compatibility.\\\\\\\"\\\\n\\\\n\\\\tPreferences showDeprecationWarnings ifTrue:\\\\n\\\\t\\\\t[Deprecation signal: thisContext sender printString, ' has been deprecated (but will be kept for compatibility). ', anExplanationString]! !\\\\n\\\\n!Object methodsFor: 'error handling'!\\\\ncaseError\\\\n\\\\t\\\\\\\"Report an error from an in-line or explicit case statement.\\\\\\\"\\\\n\\\\n\\\\tself error: 'Case not found, and no otherwise clause'! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'rbb 3/1/2005 09:26'!\\\\nconfirm: queryString\\\\n\\\\t\\\\\\\"Put up a yes/no menu with caption queryString. Answer true if the \\\\n\\\\tresponse is yes, false if no. This is a modal question--the user must \\\\n\\\\trespond yes or no.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"nil confirm: 'Are you hungry?'\\\\\\\"\\\\n\\\\n\\\\t^ UIManager default confirm: queryString! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'rbb 3/1/2005 09:27'!\\\\nconfirm: aString orCancel: cancelBlock\\\\n\\\\t\\\\\\\"Put up a yes/no/cancel menu with caption aString. Answer true if  \\\\n\\\\tthe response is yes, false if no. If cancel is chosen, evaluate  \\\\n\\\\tcancelBlock. This is a modal question--the user must respond yes or no.\\\\\\\"\\\\n\\\\n\\\\t^ UIManager default confirm: aString orCancel: cancelBlock! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'dew 10/6/2003 18:20'!\\\\ndeprecated: anExplanationString\\\\n\\\\t\\\\\\\"Warn that the sending method has been deprecated.\\\\\\\"\\\\n\\\\n\\\\tPreferences showDeprecationWarnings ifTrue:\\\\n\\\\t\\\\t[Deprecation signal: thisContext sender printString, ' has been deprecated. ', anExplanationString]! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'dew 10/7/2003 00:26'!\\\\ndeprecated: anExplanationString block: aBlock \\\\n\\\\t \\\\\\\"Warn that the sender has been deprecated.  Answer the value of aBlock on resumption.  (Note that #deprecated: is usually the preferred method.)\\\\\\\"\\\\n\\\\n\\\\tPreferences showDeprecationWarnings ifTrue:\\\\n\\\\t\\\\t[Deprecation\\\\n\\\\t\\\\t\\\\tsignal: thisContext sender printString, ' has been deprecated. ', anExplanationString].\\\\n\\\\t^ aBlock value.\\\\n! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'md 2/22/2006 21:21'!\\\\ndoesNotUnderstand: aMessage \\\\n\\\\t \\\\\\\"Handle the fact that there was an attempt to send the given message to the receiver but the receiver does not understand this message (typically sent from the machine when a message is sent to the receiver and no method is defined for that selector).\\\\\\\"\\\\n\\\\t\\\\\\\"Testing: (3 activeProcess)\\\\\\\"\\\\n\\\\n\\\\tMessageNotUnderstood new \\\\n\\\\t\\\\tmessage: aMessage;\\\\n\\\\t\\\\treceiver: self;\\\\n\\\\t\\\\tsignal.\\\\n\\\\t^ aMessage sentTo: self.\\\\n! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'TRee 11/4/2003 16:47'!\\\\ndpsTrace: reportObject  \\\\n\\\\tTranscript myDependents isNil ifTrue: [^self].\\\\n\\\\tself dpsTrace: reportObject levels: 1 withContext: thisContext\\\\n\\\\t\\\\t\\\\n\\\\\\\" nil dpsTrace: 'sludder'. \\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'TRee 11/4/2003 16:49'!\\\\ndpsTrace: reportObject levels: anInt\\\\n\\\\tself dpsTrace: reportObject levels: anInt withContext: thisContext\\\\n\\\\n\\\\\\\"(1 to: 3) do: [:int | nil dpsTrace: int levels: 5.]\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'TRee 11/4/2003 17:02'!\\\\ndpsTrace: reportObject levels: anInt withContext: currentContext\\\\n\\\\t| reportString context displayCount |\\\\n\\\\treportString := (reportObject respondsTo: #asString) \\\\n\\\\t\\\\t\\\\tifTrue: [reportObject asString] ifFalse: [reportObject printString].\\\\n\\\\t(Smalltalk at: #Decompiler ifAbsent: [nil]) \\\\n\\\\tifNil: \\\\n\\\\t\\\\t[Transcript cr; show: reportString]\\\\n\\\\tifNotNil:\\\\n\\\\t\\\\t[context := currentContext.\\\\n\\\\t\\\\tdisplayCount := anInt > 1.\\\\n\\\\t\\\\t1 to: anInt do:\\\\n\\\\t\\\\t\\\\t[:count |\\\\n\\\\t\\\\t\\\\tTranscript cr.\\\\n\\\\t\\\\t\\\\tdisplayCount\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [Transcript show: count printString, ': '].\\\\n\\\\t\\\\t\\\\t\\\\n\\\\t\\\\t\\\\treportString notNil\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[Transcript show: context home class name \\\\n\\\\t\\\\t\\\\t, '/' , context sender selector,  ' (' , reportString , ')'.\\\\n\\\\t\\\\t\\\\t\\\\tcontext := context sender.\\\\n\\\\t\\\\t\\\\t\\\\treportString := nil]\\\\n\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[(context notNil and: [(context := context sender) notNil])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [Transcript show: context receiver class name , '/' , context selector]]].\\\\n\\\\t\\\\t\\\\\\\"Transcript cr\\\\\\\"].! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'md 8/2/2005 22:17'!\\\\nerror\\\\n\\\\t\\\\\\\"Throw a generic Error exception.\\\\\\\"\\\\n\\\\n\\\\t^self error: 'Error!!'.! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'tfei 4/12/1999 12:55'!\\\\nerror: aString \\\\n\\\\t\\\\\\\"Throw a generic Error exception.\\\\\\\"\\\\n\\\\n\\\\t^Error new signal: aString! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'al 9/16/2005 14:12'!\\\\nexplicitRequirement\\\\n\\\\tself error: 'Explicitly required method'! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'al 2/13/2006 22:20'!\\\\nhalt\\\\n\\\\t\\\\\\\"This is the typical message to use for inserting breakpoints during \\\\n\\\\tdebugging. It behaves like halt:, but does not call on halt: in order to \\\\n\\\\tavoid putting this message on the stack. Halt is especially useful when \\\\n\\\\tthe breakpoint message is an arbitrary one.\\\\\\\"\\\\n\\\\n\\\\tHalt signal! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'tfei 4/12/1999 12:59'!\\\\nhalt: aString \\\\n\\\\t\\\\\\\"This is the typical message to use for inserting breakpoints during \\\\n\\\\tdebugging. It creates and schedules a Notifier with the argument, \\\\n\\\\taString, as the label.\\\\\\\"\\\\n\\\\t\\\\n\\\\tHalt new signal: aString! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'md 1/20/2006 16:24'!\\\\nhandles: exception\\\\n\\\\t\\\\\\\"This method exists in case a non exception class is the first arg in an on:do: (for instance using a exception class that is not loaded). We prefer this to raising an error during error handling itself. Also, semantically it makes sense that the exception handler is not active if its exception class is not loaded\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'ar 9/27/2005 20:24'!\\\\nnotifyWithLabel: aString \\\\n\\\\t\\\\\\\"Create and schedule a Notifier with aString as the window label as well as the contents of the window, in  order to request confirmation before a process can proceed.\\\\\\\"\\\\n\\\\n\\\\tToolSet\\\\n\\\\t\\\\tdebugContext: thisContext\\\\n\\\\t\\\\tlabel: aString\\\\n\\\\t\\\\tcontents: aString\\\\n\\\\n\\\\t\\\\\\\"nil notifyWithLabel: 'let us see if this works'\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'hg 10/2/2001 20:49'!\\\\nnotify: aString \\\\n\\\\t\\\\\\\"Create and schedule a Notifier with the argument as the message in \\\\n\\\\torder to request confirmation before a process can proceed.\\\\\\\"\\\\n\\\\n\\\\tWarning signal: aString\\\\n\\\\n\\\\t\\\\\\\"nil notify: 'confirmation message'\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'error handling'!\\\\nnotify: aString at: location\\\\n\\\\t\\\\\\\"Create and schedule a Notifier with the argument as the message in \\\\n\\\\torder to request confirmation before a process can proceed. Subclasses can\\\\n\\\\toverride this and insert an error message at location within aString.\\\\\\\"\\\\n\\\\n\\\\tself notify: aString\\\\n\\\\n\\\\t\\\\\\\"nil notify: 'confirmation message' at: 12\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'error handling'!\\\\nprimitiveFailed\\\\n\\\\t\\\\\\\"Announce that a primitive has failed and there is no appropriate \\\\n\\\\tSmalltalk code to run.\\\\\\\"\\\\n\\\\n\\\\tself error: 'a primitive has failed'! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'al 9/16/2005 14:12'!\\\\nrequirement\\\\n\\\\tself error: 'Implicitly required method'! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'AFi 2/8/2003 22:52'!\\\\nshouldBeImplemented\\\\n\\\\t\\\\\\\"Announce that this message should be implemented\\\\\\\"\\\\n\\\\n\\\\tself error: 'This message should be implemented'! !\\\\n\\\\n!Object methodsFor: 'error handling'!\\\\nshouldNotImplement\\\\n\\\\t\\\\\\\"Announce that, although the receiver inherits this message, it should \\\\n\\\\tnot implement it.\\\\\\\"\\\\n\\\\n\\\\tself error: 'This message is not appropriate for this object'! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'md 2/17/2006 12:02'!\\\\nsubclassResponsibility\\\\n\\\\t\\\\\\\"This message sets up a framework for the behavior of the class' subclasses.\\\\n\\\\tAnnounce that the subclass should have implemented this message.\\\\\\\"\\\\n\\\\n\\\\tself error: 'My subclass should have overridden ', thisContext sender selector printString! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'al 12/16/2003 16:16'!\\\\ntraitConflict\\\\n\\\\tself error: 'A class or trait does not properly resolve a conflict between multiple traits it uses.'! !\\\\n\\\\n\\\\n!Object methodsFor: 'evaluating' stamp: 'reThink 3/12/2001 18:14'!\\\\nvalue\\\\n\\\\n\\\\t^self! !\\\\n\\\\n!Object methodsFor: 'evaluating' stamp: 'reThink 2/18/2001 15:23'!\\\\nvalueWithArguments: aSequenceOfArguments\\\\n\\\\n\\\\t^self! !\\\\n\\\\n\\\\n!Object methodsFor: 'events-accessing' stamp: 'nk 12/20/2002 17:48'!\\\\nactionForEvent: anEventSelector\\\\n    \\\\\\\"Answer the action to be evaluated when <anEventSelector> has been triggered.\\\\\\\"\\\\n\\\\n\\\\t| actions |\\\\n\\\\tactions := self actionMap\\\\n\\\\t\\\\tat: anEventSelector asSymbol\\\\n\\\\t\\\\tifAbsent: [nil].\\\\n\\\\tactions ifNil: [^nil].\\\\n\\\\t^ actions asMinimalRepresentation! !\\\\n\\\\n!Object methodsFor: 'events-accessing' stamp: 'nk 12/20/2002 17:48'!\\\\nactionForEvent: anEventSelector\\\\nifAbsent: anExceptionBlock\\\\n    \\\\\\\"Answer the action to be evaluated when <anEventSelector> has been triggered.\\\\\\\"\\\\n\\\\n\\\\t| actions |\\\\n\\\\tactions := self actionMap\\\\n\\\\t\\\\tat: anEventSelector asSymbol\\\\n\\\\t\\\\tifAbsent: [nil].\\\\n\\\\tactions ifNil: [^anExceptionBlock value].\\\\n\\\\t^ actions asMinimalRepresentation! !\\\\n\\\\n!Object methodsFor: 'events-accessing' stamp: 'reThink 2/18/2001 14:43'!\\\\nactionMap\\\\n\\\\n\\\\t^EventManager actionMapFor: self! !\\\\n\\\\n!Object methodsFor: 'events-accessing' stamp: 'rw 4/27/2002 08:35'!\\\\nactionSequenceForEvent: anEventSelector\\\\n\\\\n    ^(self actionMap\\\\n        at: anEventSelector asSymbol\\\\n        ifAbsent: [^WeakActionSequence new])\\\\n            asActionSequence! !\\\\n\\\\n!Object methodsFor: 'events-accessing' stamp: 'SqR 6/28/2001 13:19'!\\\\nactionsDo: aBlock\\\\n\\\\n\\\\tself actionMap do: aBlock! !\\\\n\\\\n!Object methodsFor: 'events-accessing' stamp: 'rw 2/10/2002 13:05'!\\\\ncreateActionMap\\\\n\\\\n\\\\t^IdentityDictionary new! !\\\\n\\\\n!Object methodsFor: 'events-accessing' stamp: 'SqR 2/19/2001 14:04'!\\\\nhasActionForEvent: anEventSelector\\\\n    \\\\\\\"Answer true if there is an action associated with anEventSelector\\\\\\\"\\\\n\\\\n    ^(self actionForEvent: anEventSelector) notNil! !\\\\n\\\\n!Object methodsFor: 'events-accessing' stamp: 'reThink 2/18/2001 15:29'!\\\\nsetActionSequence: actionSequence\\\\nforEvent: anEventSelector\\\\n\\\\n    | action |\\\\n    action := actionSequence asMinimalRepresentation.\\\\n    action == nil\\\\n        ifTrue:\\\\n            [self removeActionsForEvent: anEventSelector]\\\\n        ifFalse:\\\\n            [self updateableActionMap\\\\n                at: anEventSelector asSymbol\\\\n                put: action]! !\\\\n\\\\n!Object methodsFor: 'events-accessing' stamp: 'reThink 2/25/2001 08:50'!\\\\nupdateableActionMap\\\\n\\\\n\\\\t^EventManager updateableActionMapFor: self! !\\\\n\\\\n\\\\n!Object methodsFor: 'events-registering' stamp: 'reThink 2/18/2001 15:04'!\\\\nwhen: anEventSelector evaluate: anAction \\\\n\\\\n\\\\t| actions |\\\\n\\\\tactions := self actionSequenceForEvent: anEventSelector.\\\\n\\\\t(actions includes: anAction)\\\\n\\\\t\\\\tifTrue: [^ self].\\\\n\\\\tself \\\\n\\\\t\\\\tsetActionSequence: (actions copyWith: anAction)\\\\n\\\\t\\\\tforEvent: anEventSelector! !\\\\n\\\\n!Object methodsFor: 'events-registering' stamp: 'rww 12/30/2002 10:37'!\\\\nwhen: anEventSelector\\\\nsend: aMessageSelector\\\\nto: anObject\\\\n \\\\n    self\\\\n        when: anEventSelector\\\\n        evaluate: (WeakMessageSend\\\\n            receiver: anObject\\\\n            selector: aMessageSelector)! !\\\\n\\\\n!Object methodsFor: 'events-registering' stamp: 'rww 12/30/2002 10:37'!\\\\nwhen: anEventSelector\\\\nsend: aMessageSelector\\\\nto: anObject\\\\nwithArguments: anArgArray\\\\n \\\\n    self\\\\n        when: anEventSelector\\\\n        evaluate: (WeakMessageSend\\\\n            receiver: anObject\\\\n            selector: aMessageSelector\\\\n\\\\t\\\\targuments: anArgArray)! !\\\\n\\\\n!Object methodsFor: 'events-registering' stamp: 'rww 12/30/2002 10:37'!\\\\nwhen: anEventSelector\\\\nsend: aMessageSelector\\\\nto: anObject\\\\nwith: anArg\\\\n \\\\n    self\\\\n        when: anEventSelector\\\\n        evaluate: (WeakMessageSend\\\\n            receiver: anObject\\\\n            selector: aMessageSelector\\\\n\\\\t\\\\targuments: (Array with: anArg))! !\\\\n\\\\n\\\\n!Object methodsFor: 'events-removing' stamp: 'reThink 2/18/2001 15:33'!\\\\nreleaseActionMap\\\\n\\\\n\\\\tEventManager releaseActionMapFor: self! !\\\\n\\\\n!Object methodsFor: 'events-removing' stamp: 'reThink 2/18/2001 15:33'!\\\\nremoveActionsForEvent: anEventSelector\\\\n\\\\n    | map |\\\\n    map := self actionMap.\\\\n    map removeKey: anEventSelector asSymbol ifAbsent: [].\\\\n    map isEmpty\\\\n        ifTrue: [self releaseActionMap]! !\\\\n\\\\n!Object methodsFor: 'events-removing' stamp: 'nk 8/25/2003 21:46'!\\\\nremoveActionsSatisfying: aBlock\\\\n\\\\n\\\\tself actionMap keys do:\\\\n\\\\t\\\\t[:eachEventSelector |\\\\n\\\\t\\\\t\\\\tself\\\\n   \\\\t\\\\t\\\\t\\\\tremoveActionsSatisfying: aBlock\\\\n\\\\t\\\\t\\\\t\\\\tforEvent: eachEventSelector\\\\n\\\\t\\\\t]! !\\\\n\\\\n!Object methodsFor: 'events-removing' stamp: 'reThink 2/18/2001 15:31'!\\\\nremoveActionsSatisfying: aOneArgBlock \\\\nforEvent: anEventSelector\\\\n\\\\n    self\\\\n        setActionSequence:\\\\n            ((self actionSequenceForEvent: anEventSelector)\\\\n                reject: [:anAction | aOneArgBlock value: anAction])\\\\n        forEvent: anEventSelector! !\\\\n\\\\n!Object methodsFor: 'events-removing' stamp: 'rw 7/29/2003 17:18'!\\\\nremoveActionsWithReceiver: anObject\\\\n\\\\n\\\\tself actionMap copy keysDo:\\\\n\\\\t\\\\t[:eachEventSelector |\\\\n\\\\t\\\\t\\\\tself\\\\n   \\\\t\\\\t\\\\t\\\\tremoveActionsSatisfying: [:anAction | anAction receiver == anObject]\\\\n\\\\t\\\\t\\\\t\\\\tforEvent: eachEventSelector\\\\n\\\\t\\\\t]! !\\\\n\\\\n!Object methodsFor: 'events-removing' stamp: 'reThink 2/18/2001 15:36'!\\\\nremoveActionsWithReceiver: anObject\\\\nforEvent: anEventSelector\\\\n\\\\n    self\\\\n        removeActionsSatisfying:\\\\n            [:anAction |\\\\n            anAction receiver == anObject]\\\\n        forEvent: anEventSelector! !\\\\n\\\\n!Object methodsFor: 'events-removing' stamp: 'reThink 2/18/2001 15:31'!\\\\nremoveAction: anAction\\\\nforEvent: anEventSelector\\\\n\\\\n    self\\\\n        removeActionsSatisfying: [:action | action = anAction]\\\\n        forEvent: anEventSelector! !\\\\n\\\\n\\\\n!Object methodsFor: 'events-triggering' stamp: 'reThink 2/18/2001 15:22'!\\\\ntriggerEvent: anEventSelector\\\\n\\\\t\\\\\\\"Evaluate all actions registered for <anEventSelector>. Return the value of the last registered action.\\\\\\\"\\\\n\\\\n    ^(self actionForEvent: anEventSelector) value! !\\\\n\\\\n!Object methodsFor: 'events-triggering' stamp: 'reThink 2/18/2001 17:09'!\\\\ntriggerEvent: anEventSelector\\\\nifNotHandled: anExceptionBlock\\\\n\\\\t\\\\\\\"Evaluate all actions registered for <anEventSelector>. Return the value of the last registered action.\\\\\\\"\\\\n\\\\n    ^(self \\\\n\\\\t\\\\tactionForEvent: anEventSelector\\\\n\\\\t\\\\tifAbsent: [^anExceptionBlock value]) value\\\\n! !\\\\n\\\\n!Object methodsFor: 'events-triggering' stamp: 'reThink 2/18/2001 15:21'!\\\\ntriggerEvent: anEventSelector\\\\nwithArguments: anArgumentList\\\\n\\\\n    ^(self actionForEvent: anEventSelector)\\\\n        valueWithArguments: anArgumentList! !\\\\n\\\\n!Object methodsFor: 'events-triggering' stamp: 'reThink 2/18/2001 15:21'!\\\\ntriggerEvent: anEventSelector\\\\nwithArguments: anArgumentList\\\\nifNotHandled: anExceptionBlock\\\\n\\\\n    ^(self \\\\n\\\\t\\\\tactionForEvent: anEventSelector\\\\n\\\\t\\\\tifAbsent: [^anExceptionBlock value])\\\\n        valueWithArguments: anArgumentList! !\\\\n\\\\n!Object methodsFor: 'events-triggering' stamp: 'reThink 2/18/2001 14:59'!\\\\ntriggerEvent: anEventSelector\\\\nwith: anObject\\\\n\\\\n    ^self \\\\n\\\\t\\\\ttriggerEvent: anEventSelector\\\\n\\\\t\\\\twithArguments: (Array with: anObject)! !\\\\n\\\\n!Object methodsFor: 'events-triggering' stamp: 'reThink 2/18/2001 14:59'!\\\\ntriggerEvent: anEventSelector\\\\nwith: anObject\\\\nifNotHandled: anExceptionBlock\\\\n\\\\n    ^self \\\\n\\\\t\\\\ttriggerEvent: anEventSelector\\\\n\\\\t\\\\twithArguments: (Array with: anObject)\\\\n\\\\t\\\\tifNotHandled: anExceptionBlock! !\\\\n\\\\n\\\\n!Object methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 00:42'!\\\\nbyteEncode:aStream\\\\n\\\\tself flattenOnStream:aStream.\\\\n! !\\\\n\\\\n!Object methodsFor: 'filter streaming'!\\\\ndrawOnCanvas:aStream\\\\n\\\\tself flattenOnStream:aStream.\\\\n! !\\\\n\\\\n!Object methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 01:31'!\\\\nelementSeparator\\\\n\\\\t^nil.! !\\\\n\\\\n!Object methodsFor: 'filter streaming'!\\\\nencodePostscriptOn:aStream\\\\n\\\\tself byteEncode:aStream.\\\\n! !\\\\n\\\\n!Object methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 00:07'!\\\\nflattenOnStream:aStream\\\\n\\\\tself writeOnFilterStream:aStream.\\\\n! !\\\\n\\\\n!Object methodsFor: 'filter streaming' stamp: 'mpw 6/22/1930 22:56'!\\\\nfullDrawPostscriptOn:aStream\\\\n\\\\t^aStream fullDraw:self.\\\\n! !\\\\n\\\\n!Object methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 01:51'!\\\\nprintOnStream:aStream\\\\n\\\\tself byteEncode:aStream.\\\\n! !\\\\n\\\\n!Object methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 00:49'!\\\\nputOn:aStream\\\\n\\\\t^aStream nextPut:self.\\\\n! !\\\\n\\\\n!Object methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 01:53'!\\\\nstoreOnStream:aStream\\\\n\\\\tself printOnStream:aStream.\\\\n! !\\\\n\\\\n!Object methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 00:06'!\\\\nwriteOnFilterStream:aStream\\\\n\\\\taStream writeObject:self.\\\\n! !\\\\n\\\\n\\\\n!Object methodsFor: 'finalization' stamp: 'ar 3/21/98 16:26'!\\\\nactAsExecutor\\\\n\\\\t\\\\\\\"Prepare the receiver to act as executor for any resources associated with it\\\\\\\"\\\\n\\\\tself breakDependents! !\\\\n\\\\n!Object methodsFor: 'finalization' stamp: 'ar 3/20/98 22:19'!\\\\nexecutor\\\\n\\\\t\\\\\\\"Return an object which can act as executor for finalization of the receiver\\\\\\\"\\\\n\\\\t^self shallowCopy actAsExecutor! !\\\\n\\\\n!Object methodsFor: 'finalization' stamp: 'ar 5/19/2003 20:10'!\\\\nfinalizationRegistry\\\\n\\\\t\\\\\\\"Answer the finalization registry associated with the receiver.\\\\\\\"\\\\n\\\\t^WeakRegistry default! !\\\\n\\\\n!Object methodsFor: 'finalization' stamp: 'ar 3/21/98 16:27'!\\\\nfinalize\\\\n\\\\t\\\\\\\"Finalize the resource associated with the receiver. This message should only be sent during the finalization process. There is NO garantuee that the resource associated with the receiver hasn't been free'd before so take care that you don't run into trouble - this all may happen with interrupt priority.\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'finalization' stamp: 'ar 3/21/98 18:38'!\\\\nretryWithGC: execBlock until: testBlock\\\\n\\\\t\\\\\\\"Retry execBlock as long as testBlock returns false. Do an incremental GC after the first try, a full GC after the second try.\\\\\\\"\\\\n\\\\t| blockValue |\\\\n\\\\tblockValue := execBlock value.\\\\n\\\\t(testBlock value: blockValue) ifTrue:[^blockValue].\\\\n\\\\tSmalltalk garbageCollectMost.\\\\n\\\\tblockValue := execBlock value.\\\\n\\\\t(testBlock value: blockValue) ifTrue:[^blockValue].\\\\n\\\\tSmalltalk garbageCollect.\\\\n\\\\t^execBlock value.! !\\\\n\\\\n!Object methodsFor: 'finalization' stamp: 'ar 5/19/2003 20:14'!\\\\ntoFinalizeSend: aSelector to: aFinalizer with: aResourceHandle\\\\n\\\\t\\\\\\\"When I am finalized (e.g., garbage collected) close the associated resource handle by sending aSelector to the appropriate finalizer (the guy who knows how to get rid of the resource).\\\\n\\\\tWARNING: Neither the finalizer nor the resource handle are allowed to reference me. If they do, then I will NEVER be garbage collected. Since this cannot be validated here, it is up to the client to make sure this invariant is not broken.\\\\\\\"\\\\n\\\\tself == aFinalizer ifTrue:[self error: 'I cannot finalize myself'].\\\\n\\\\tself == aResourceHandle ifTrue:[self error: 'I cannot finalize myself'].\\\\n\\\\t^self finalizationRegistry add: self executor:\\\\n\\\\t\\\\t(ObjectFinalizer new\\\\n\\\\t\\\\t\\\\treceiver: aFinalizer\\\\n\\\\t\\\\t\\\\tselector: aSelector\\\\n\\\\t\\\\t\\\\targument: aResourceHandle)! !\\\\n\\\\n\\\\n!Object methodsFor: 'flagging' stamp: 'sw 8/4/97 16:49'!\\\\nisThisEverCalled\\\\n\\\\t^ self isThisEverCalled: thisContext sender printString! !\\\\n\\\\n!Object methodsFor: 'flagging'!\\\\nisThisEverCalled: msg\\\\n\\\\t\\\\\\\"Send this message, with some useful printable argument, from methods or branches of methods which you believe are never reached.  2/5/96 sw\\\\\\\"\\\\n\\\\n\\\\tself halt: 'This is indeed called: ', msg printString! !\\\\n\\\\n!Object methodsFor: 'flagging' stamp: 'jm 3/18/98 17:23'!\\\\nlogEntry\\\\n\\\\n\\\\tTranscript show: 'Entered ', thisContext sender printString; cr.\\\\n! !\\\\n\\\\n!Object methodsFor: 'flagging' stamp: 'jm 3/18/98 17:23'!\\\\nlogExecution\\\\n\\\\n\\\\tTranscript show: 'Executing ', thisContext sender printString; cr.\\\\n! !\\\\n\\\\n!Object methodsFor: 'flagging' stamp: 'jm 3/18/98 17:22'!\\\\nlogExit\\\\n\\\\n\\\\tTranscript show:  'Exited ', thisContext sender printString; cr.\\\\n! !\\\\n\\\\n\\\\n!Object methodsFor: 'graph model' stamp: 'dgd 9/18/2004 15:07'!\\\\naddModelYellowButtonMenuItemsTo: aCustomMenu forMorph: aMorph hand: aHandMorph \\\\n\\\\t\\\\\\\"The receiver serves as the model for aMorph; a menu is being constructed for the morph, and here the receiver is able to add its own items\\\\\\\"\\\\n\\\\tPreferences cmdGesturesEnabled ifTrue: [ \\\\\\\"build mode\\\\\\\"\\\\n\\\\t\\\\taCustomMenu add: 'inspect model' translated target: self action: #inspect.\\\\n\\\\t].\\\\n\\\\n\\\\t^aCustomMenu\\\\n! !\\\\n\\\\n!Object methodsFor: 'graph model' stamp: 'nk 1/23/2004 14:35'!\\\\nhasModelYellowButtonMenuItems\\\\n\\\\t^Preferences cmdGesturesEnabled! !\\\\n\\\\n\\\\n!Object methodsFor: 'locales' stamp: 'tak 8/4/2005 14:55'!\\\\nlocaleChanged\\\\n\\\\tself shouldBeImplemented! !\\\\n\\\\n\\\\n!Object methodsFor: 'macpal' stamp: 'sw 5/7/1998 23:00'!\\\\ncodeStrippedOut: messageString\\\\n\\\\t\\\\\\\"When a method is stripped out for external release, it is replaced by a method that calls this\\\\\\\"\\\\n\\\\n\\\\tself halt: 'Code stripped out -- ', messageString, '-- do not proceed.'! !\\\\n\\\\n!Object methodsFor: 'macpal' stamp: 'sw 1/28/1999 17:31'!\\\\ncontentsChanged\\\\n\\\\tself changed: #contents! !\\\\n\\\\n!Object methodsFor: 'macpal' stamp: 'ar 3/18/2001 00:03'!\\\\ncurrentEvent\\\\n\\\\t\\\\\\\"Answer the current Morphic event.  This method never returns nil.\\\\\\\"\\\\n\\\\t^ActiveEvent ifNil:[self currentHand lastEvent]! !\\\\n\\\\n!Object methodsFor: 'macpal' stamp: 'nk 9/1/2004 10:41'!\\\\ncurrentHand\\\\n\\\\t\\\\\\\"Return a usable HandMorph -- the one associated with the object's current environment.  This method will always return a hand, even if it has to conjure one up as a last resort.  If a particular hand is actually handling events at the moment (such as a remote hand or a ghost hand), it will be returned.\\\\\\\"\\\\n\\\\n\\\\t^ActiveHand ifNil: [ self currentWorld primaryHand ]! !\\\\n\\\\n!Object methodsFor: 'macpal' stamp: 'sw 5/17/2001 12:08'!\\\\ncurrentVocabulary\\\\n\\\\t\\\\\\\"Answer the currently-prevailing default vocabulary.\\\\\\\"\\\\n\\\\n\\\\t^ Smalltalk isMorphic ifTrue:\\\\n\\\\t\\\\t\\\\t[ActiveWorld currentVocabulary]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[Vocabulary fullVocabulary]! !\\\\n\\\\n!Object methodsFor: 'macpal' stamp: 'ar 3/18/2001 00:08'!\\\\ncurrentWorld\\\\n\\\\t\\\\\\\"Answer a morphic world that is the current UI focus.\\\\n\\\\t\\\\tIf in an embedded world, it's that world.\\\\n\\\\t\\\\tIf in a morphic project, it's that project's world.  \\\\n\\\\t\\\\tIf in an mvc project, it is the topmost morphic-mvc-window's worldMorph. \\\\n\\\\t\\\\tIf in an mvc project that has no morphic-mvc-windows, then it's just some existing worldmorph instance.\\\\n\\\\t\\\\tIf in an mvc project in a Squeak that has NO WorldMorph instances, one is created.\\\\n\\\\n\\\\tThis method will never return nil, it will always return its best effort at returning a relevant world morph, but if need be -- if there are no worlds anywhere, it will create a new one.\\\\\\\"\\\\n\\\\n\\\\t| aView aSubview |\\\\n\\\\tActiveWorld ifNotNil:[^ActiveWorld].\\\\n\\\\tWorld ifNotNil:[^World].\\\\n\\\\taView _ ScheduledControllers controllerSatisfying:\\\\n\\\\t\\\\t[:ctrl | (aSubview _ ctrl view firstSubView) notNil and:\\\\n\\\\t\\\\t\\\\t[aSubview model isMorph and: [aSubview model isWorldMorph]]].\\\\n\\\\t^aView\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t[aSubview model]\\\\n\\\\t\\\\tifNil:\\\\n\\\\t\\\\t\\\\t[MVCWiWPasteUpMorph newWorldForProject: nil].! !\\\\n\\\\n!Object methodsFor: 'macpal' stamp: 'jm 5/6/1998 22:35'!\\\\nflash\\\\n\\\\t\\\\\\\"Do nothing.\\\\\\\"\\\\n! !\\\\n\\\\n!Object methodsFor: 'macpal' stamp: 'sw 6/16/1998 15:07'!\\\\ninstanceVariableValues\\\\n\\\\t\\\\\\\"Answer a collection whose elements are the values of those instance variables of the receiver which were added by the receiver's class\\\\\\\"\\\\n\\\\t| c |\\\\n\\\\tc _ OrderedCollection new.\\\\n\\\\tself class superclass instSize + 1 to: self class instSize do:\\\\n\\\\t\\\\t[:i | c add: (self instVarAt: i)].\\\\n\\\\t^ c! !\\\\n\\\\n!Object methodsFor: 'macpal' stamp: 'sw 3/20/2001 13:29'!\\\\nisUniversalTiles\\\\n\\\\t\\\\\\\"Return true if I (my world) uses universal tiles.  This message can be called in places where the current World is not known, such as when writing out a project.  For more information about the project-writing subtlety addressed by this protocol, kindly contact Ted Kaehler.\\\\\\\"\\\\n\\\\n\\\\t^ Preferences universalTiles! !\\\\n\\\\n!Object methodsFor: 'macpal' stamp: 'sw 10/24/2000 07:04'!\\\\nobjectRepresented\\\\n\\\\t\\\\\\\"most objects represent themselves; this provides a hook for aliases to grab on to\\\\\\\"\\\\n\\\\n\\\\t^ self! !\\\\n\\\\n!Object methodsFor: 'macpal' stamp: 'sw 5/22/2001 18:31'!\\\\nrefusesToAcceptCode\\\\n\\\\t\\\\\\\"Answer whether the receiver is a code-bearing instrument which at the moment refuses to allow its contents to be submitted\\\\\\\"\\\\n\\\\n\\\\t^ false\\\\n\\\\t! !\\\\n\\\\n!Object methodsFor: 'macpal' stamp: 'jm 2/24/1999 12:40'!\\\\nscriptPerformer\\\\n\\\\n\\\\t^ self\\\\n! !\\\\n\\\\n!Object methodsFor: 'macpal' stamp: 'sw 3/20/2001 13:40'!\\\\nslotInfo\\\\n\\\\t\\\\\\\"Answer a list of slot-information objects.  Initally only provides useful info for players\\\\\\\"\\\\n\\\\n\\\\t^ Dictionary new! !\\\\n\\\\n\\\\n!Object methodsFor: 'message handling' stamp: 'md 1/20/2006 16:28'!\\\\nexecuteMethod: compiledMethod\\\\n\\\\t\\\\\\\"Execute compiledMethod against the receiver with no args\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"<primitive: 189>\\\\\\\" \\\\\\\"uncomment once prim 189 is in VM\\\\\\\"\\\\n\\\\t^ self withArgs: #() executeMethod: compiledMethod! !\\\\n\\\\n!Object methodsFor: 'message handling' stamp: 'di 3/26/1999 07:52'!\\\\nperform: aSymbol \\\\n\\\\t\\\\\\\"Send the unary selector, aSymbol, to the receiver.\\\\n\\\\tFail if the number of arguments expected by the selector is not zero.\\\\n\\\\tPrimitive. Optional. See Object documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 83>\\\\n\\\\t^ self perform: aSymbol withArguments: (Array new: 0)! !\\\\n\\\\n!Object methodsFor: 'message handling' stamp: 'sw 10/30/1998 18:27'!\\\\nperform: selector orSendTo: otherTarget\\\\n\\\\t\\\\\\\"If I wish to intercept and handle selector myself, do it; else send it to otherTarget\\\\\\\"\\\\n\\\\t^ otherTarget perform: selector! !\\\\n\\\\n!Object methodsFor: 'message handling' stamp: 'di 3/26/1999 07:55'!\\\\nperform: selector withArguments: argArray \\\\n\\\\t\\\\\\\"Send the selector, aSymbol, to the receiver with arguments in argArray.\\\\n\\\\tFail if the number of arguments expected by the selector \\\\n\\\\tdoes not match the size of argArray.\\\\n\\\\tPrimitive. Optional. See Object documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 84>\\\\n\\\\t^ self perform: selector withArguments: argArray inSuperclass: self class! !\\\\n\\\\n!Object methodsFor: 'message handling' stamp: 'ar 4/25/2005 13:35'!\\\\nperform: selector withArguments: argArray inSuperclass: lookupClass\\\\n\\\\t\\\\\\\"NOTE:  This is just like perform:withArguments:, except that\\\\n\\\\tthe message lookup process begins, not with the receivers's class,\\\\n\\\\tbut with the supplied superclass instead.  It will fail if lookupClass\\\\n\\\\tcannot be found among the receiver's superclasses.\\\\n\\\\tPrimitive. Essential. See Object documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 100>\\\\n\\\\t(selector isSymbol)\\\\n\\\\t\\\\tifFalse: [^ self error: 'selector argument must be a Symbol'].\\\\n\\\\t(selector numArgs = argArray size)\\\\n\\\\t\\\\tifFalse: [^ self error: 'incorrect number of arguments'].\\\\n\\\\t(self class == lookupClass or: [self class inheritsFrom: lookupClass])\\\\n\\\\t\\\\tifFalse: [^ self error: 'lookupClass is not in my inheritance chain'].\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!Object methodsFor: 'message handling' stamp: 'nk 4/11/2002 14:13'!\\\\nperform: selector withEnoughArguments: anArray\\\\n\\\\t\\\\\\\"Send the selector, aSymbol, to the receiver with arguments in argArray.\\\\n\\\\tOnly use enough arguments for the arity of the selector; supply nils for missing ones.\\\\\\\"\\\\n\\\\t| numArgs args |\\\\n\\\\tnumArgs _ selector numArgs.\\\\n\\\\tanArray size == numArgs\\\\n\\\\t\\\\tifTrue: [ ^self perform: selector withArguments: anArray asArray ].\\\\n\\\\n\\\\targs _ Array new: numArgs.\\\\n\\\\targs replaceFrom: 1\\\\n\\\\t\\\\tto: (anArray size min: args size)\\\\n\\\\t\\\\twith: anArray\\\\n\\\\t\\\\tstartingAt: 1.\\\\n\\\\n\\\\t^ self perform: selector withArguments: args! !\\\\n\\\\n!Object methodsFor: 'message handling' stamp: 'di 3/26/1999 07:52'!\\\\nperform: aSymbol with: anObject \\\\n\\\\t\\\\\\\"Send the selector, aSymbol, to the receiver with anObject as its argument.\\\\n\\\\tFail if the number of arguments expected by the selector is not one.\\\\n\\\\tPrimitive. Optional. See Object documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 83>\\\\n\\\\t^ self perform: aSymbol withArguments: (Array with: anObject)! !\\\\n\\\\n!Object methodsFor: 'message handling' stamp: 'di 3/26/1999 07:52'!\\\\nperform: aSymbol with: firstObject with: secondObject \\\\n\\\\t\\\\\\\"Send the selector, aSymbol, to the receiver with the given arguments.\\\\n\\\\tFail if the number of arguments expected by the selector is not two.\\\\n\\\\tPrimitive. Optional. See Object documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 83>\\\\n\\\\t^ self perform: aSymbol withArguments: (Array with: firstObject with: secondObject)! !\\\\n\\\\n!Object methodsFor: 'message handling' stamp: 'di 3/26/1999 07:51'!\\\\nperform: aSymbol with: firstObject with: secondObject with: thirdObject \\\\n\\\\t\\\\\\\"Send the selector, aSymbol, to the receiver with the given arguments.\\\\n\\\\tFail if the number of arguments expected by the selector is not three.\\\\n\\\\tPrimitive. Optional. See Object documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 83>\\\\n\\\\t^ self perform: aSymbol\\\\n\\\\t\\\\twithArguments: (Array with: firstObject with: secondObject with: thirdObject)! !\\\\n\\\\n!Object methodsFor: 'message handling' stamp: 'NS 1/28/2004 11:19'!\\\\nwithArgs: argArray executeMethod: compiledMethod\\\\n\\\\t\\\\\\\"Execute compiledMethod against the receiver and args in argArray\\\\\\\"\\\\n\\\\n\\\\t| selector |\\\\n\\\\t<primitive: 188>\\\\n\\\\tselector _ Symbol new.\\\\n\\\\tself class addSelectorSilently: selector withMethod: compiledMethod.\\\\n\\\\t^ [self perform: selector withArguments: argArray]\\\\n\\\\t\\\\tensure: [self class basicRemoveSelector: selector]! !\\\\n\\\\n!Object methodsFor: 'message handling' stamp: 'md 1/20/2006 16:28'!\\\\nwith: arg1 executeMethod: compiledMethod\\\\n\\\\t\\\\\\\"Execute compiledMethod against the receiver and arg1\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"<primitive: 189>\\\\\\\" \\\\\\\"uncomment once prim 189 is in VM\\\\\\\"\\\\n\\\\t^ self withArgs: {arg1} executeMethod: compiledMethod! !\\\\n\\\\n!Object methodsFor: 'message handling' stamp: 'md 1/20/2006 16:28'!\\\\nwith: arg1 with: arg2 executeMethod: compiledMethod\\\\n\\\\t\\\\\\\"Execute compiledMethod against the receiver and arg1 & arg2\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"<primitive: 189>\\\\\\\" \\\\\\\"uncomment once prim 189 is in VM\\\\\\\"\\\\n\\\\t^ self withArgs: {arg1. arg2} executeMethod: compiledMethod! !\\\\n\\\\n!Object methodsFor: 'message handling' stamp: 'md 1/20/2006 16:28'!\\\\nwith: arg1 with: arg2 with: arg3 executeMethod: compiledMethod\\\\n\\\\t\\\\\\\"Execute compiledMethod against the receiver and arg1, arg2, & arg3\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"<primitive: 189>\\\\\\\" \\\\\\\"uncomment once prim 189 is in VM\\\\\\\"\\\\n\\\\t^ self withArgs: {arg1. arg2. arg3} executeMethod: compiledMethod! !\\\\n\\\\n!Object methodsFor: 'message handling' stamp: 'md 1/20/2006 16:28'!\\\\nwith: arg1 with: arg2 with: arg3 with: arg4 executeMethod: compiledMethod\\\\n\\\\t\\\\\\\"Execute compiledMethod against the receiver and arg1, arg2, arg3, & arg4\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"<primitive: 189>\\\\\\\" \\\\\\\"uncomment once prim 189 is in VM\\\\\\\"\\\\n\\\\t^ self withArgs: {arg1. arg2. arg3. arg4} executeMethod: compiledMethod! !\\\\n\\\\n\\\\n!Object methodsFor: 'objects from disk' stamp: 'tk 4/8/1999 12:46'!\\\\ncomeFullyUpOnReload: smartRefStream\\\\n\\\\t\\\\\\\"Normally this read-in object is exactly what we want to store. 7/26/96 tk\\\\\\\"\\\\n\\\\n\\\\t^ self! !\\\\n\\\\n!Object methodsFor: 'objects from disk' stamp: 'RAA 12/20/2000 16:51'!\\\\nconvertToCurrentVersion: varDict refStream: smartRefStrm\\\\n\\\\n\\\\t\\\\\\\"subclasses should implement if they wish to convert old instances to modern ones\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'objects from disk' stamp: 'tk 11/29/2004 15:04'!\\\\nfixUponLoad: aProject seg: anImageSegment\\\\n\\\\n\\\\t\\\\\\\"change the object due to conventions that have changed on\\\\n\\\\nthe project level.  (sent to all objects in the incoming project).\\\\n\\\\nSpecific classes should reimplement this.\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'objects from disk' stamp: 'RAA 1/10/2001 14:02'!\\\\nindexIfCompact\\\\n\\\\n\\\\t^0\\\\t\\\\t\\\\\\\"helps avoid a #respondsTo: in publishing\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'objects from disk' stamp: 'tk 2/24/1999 11:08'!\\\\nobjectForDataStream: refStrm\\\\n    \\\\\\\"Return an object to store on an external data stream.\\\\\\\"\\\\n\\\\n    ^ self! !\\\\n\\\\n!Object methodsFor: 'objects from disk' stamp: 'tk 4/8/1999 12:05'!\\\\nreadDataFrom: aDataStream size: varsOnDisk\\\\n\\\\t\\\\\\\"Fill in the fields of self based on the contents of aDataStream.  Return self.\\\\n\\\\t Read in the instance-variables written by Object>>storeDataOn:.\\\\n\\\\t NOTE: This method must send beginReference: before reading any objects from aDataStream that might reference it.\\\\n\\\\t Allow aDataStream to have fewer inst vars.  See SmartRefStream.\\\\\\\"\\\\n\\\\t| cntInstVars cntIndexedVars |\\\\n\\\\n\\\\tcntInstVars _ self class instSize.\\\\n\\\\tself class isVariable\\\\n\\\\t\\\\tifTrue: [cntIndexedVars _ varsOnDisk - cntInstVars.\\\\n\\\\t\\\\t\\\\t\\\\tcntIndexedVars < 0 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself error: 'Class has changed too much.  Define a convertxxx method']]\\\\n\\\\t\\\\tifFalse: [cntIndexedVars _ 0.\\\\n\\\\t\\\\t\\\\t\\\\tcntInstVars _ varsOnDisk]. \\\\t\\\\\\\"OK if fewer than now\\\\\\\"\\\\n\\\\n\\\\taDataStream beginReference: self.\\\\n\\\\t1 to: cntInstVars do:\\\\n\\\\t\\\\t[:i | self instVarAt: i put: aDataStream next].\\\\n\\\\t1 to: cntIndexedVars do:\\\\n\\\\t\\\\t[:i | self basicAt: i put: aDataStream next].\\\\n\\\\t\\\\\\\"Total number read MUST be equal to varsOnDisk!!\\\\\\\"\\\\n\\\\t^ self\\\\t\\\\\\\"If we ever return something other than self, fix calls \\\\n\\\\t\\\\t\\\\ton (super readDataFrom: aDataStream size: anInteger)\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'objects from disk' stamp: 'CdG 10/17/2005 20:32'!\\\\nsaveOnFile\\\\n\\\\t\\\\\\\"Ask the user for a filename and save myself on a SmartReferenceStream file.  Writes out the version and class structure.  The file is fileIn-able.  Does not file out the class of the object.  tk 6/26/97 13:48\\\\\\\"\\\\n\\\\n\\\\t| aFileName fileStream |\\\\n\\\\taFileName := self class name asFileName.\\\\t\\\\\\\"do better?\\\\\\\"\\\\n\\\\taFileName := UIManager default \\\\n\\\\t\\\\t\\\\t\\\\trequest: 'File name?' translated initialAnswer: aFileName.\\\\n\\\\taFileName size == 0 ifTrue: [^ Beeper beep].\\\\n\\\\n\\\\tfileStream := FileStream newFileNamed: aFileName asFileName.\\\\n\\\\tfileStream fileOutClass: nil andObject: self.! !\\\\n\\\\n!Object methodsFor: 'objects from disk' stamp: 'tk 8/9/2001 15:40'!\\\\nstoreDataOn: aDataStream\\\\n\\\\t\\\\\\\"Store myself on a DataStream.  Answer self.  This is a low-level DataStream/ReferenceStream method. See also objectToStoreOnDataStream.  NOTE: This method must send 'aDataStream beginInstance:size:' and then (nextPut:/nextPutWeak:) its subobjects.  readDataFrom:size: reads back what we write here.\\\\\\\"\\\\n\\\\t| cntInstVars cntIndexedVars |\\\\n\\\\n\\\\tcntInstVars _ self class instSize.\\\\n\\\\tcntIndexedVars _ self basicSize.\\\\n\\\\taDataStream\\\\n\\\\t\\\\tbeginInstance: self class\\\\n\\\\t\\\\tsize: cntInstVars + cntIndexedVars.\\\\n\\\\t1 to: cntInstVars do:\\\\n\\\\t\\\\t[:i | aDataStream nextPut: (self instVarAt: i)].\\\\n\\\\n\\\\t\\\\\\\"Write fields of a variable length object.  When writing to a dummy \\\\n\\\\t\\\\tstream, don't bother to write the bytes\\\\\\\"\\\\n\\\\t((aDataStream byteStream class == DummyStream) and: [self class isBits]) ifFalse: [\\\\n\\\\t\\\\t1 to: cntIndexedVars do:\\\\n\\\\t\\\\t\\\\t[:i | aDataStream nextPut: (self basicAt: i)]].\\\\n! !\\\\n\\\\n\\\\n!Object methodsFor: 'parts bin' stamp: 'sw 10/24/2001 16:34'!\\\\ndescriptionForPartsBin\\\\n\\\\t\\\\\\\"If the receiver is a member of a class that would like to be represented in a parts bin, answer the name by which it should be known, and a documentation string to be provided, for example, as balloon help.  When the 'nativitySelector' is sent to the 'globalReceiver', it is expected that some kind of Morph will result.  The parameters used in the implementation below are for documentation purposes only!!\\\\\\\"\\\\n\\\\n\\\\t^ DescriptionForPartsBin\\\\n\\\\t\\\\tformalName: 'PutFormalNameHere'\\\\n\\\\t\\\\tcategoryList: #(PutACategoryHere MaybePutAnotherCategoryHere)\\\\n\\\\t\\\\tdocumentation: 'Put the balloon help here'\\\\n\\\\t\\\\tglobalReceiverSymbol: #PutAGlobalHere\\\\n\\\\t\\\\tnativitySelector: #PutASelectorHere! !\\\\n\\\\n\\\\n!Object methodsFor: 'printing' stamp: 'di 6/20/97 08:57'!\\\\nfullPrintString\\\\n\\\\t\\\\\\\"Answer a String whose characters are a description of the receiver.\\\\\\\"\\\\n\\\\n\\\\t^ String streamContents: [:s | self printOn: s]! !\\\\n\\\\n!Object methodsFor: 'printing'!\\\\nisLiteral\\\\n\\\\t\\\\\\\"Answer whether the receiver has a literal text form recognized by the \\\\n\\\\tcompiler.\\\\\\\"\\\\n\\\\n\\\\t^false! !\\\\n\\\\n!Object methodsFor: 'printing' stamp: 'sma 6/1/2000 09:28'!\\\\nlongPrintOn: aStream\\\\n\\\\t\\\\\\\"Append to the argument, aStream, the names and values of all \\\\n\\\\tof the receiver's instance variables.\\\\\\\"\\\\n\\\\n\\\\tself class allInstVarNames doWithIndex:\\\\n\\\\t\\\\t[:title :index |\\\\n\\\\t\\\\taStream nextPutAll: title;\\\\n\\\\t\\\\t nextPut: $:;\\\\n\\\\t\\\\t space;\\\\n\\\\t\\\\t tab;\\\\n\\\\t\\\\t print: (self instVarAt: index);\\\\n\\\\t\\\\t cr]! !\\\\n\\\\n!Object methodsFor: 'printing' stamp: 'tk 10/19/2001 11:18'!\\\\nlongPrintOn: aStream limitedTo: sizeLimit indent: indent\\\\n\\\\t\\\\\\\"Append to the argument, aStream, the names and values of all of the receiver's instance variables.  Limit is the length limit for each inst var.\\\\\\\"\\\\n\\\\n\\\\tself class allInstVarNames doWithIndex:\\\\n\\\\t\\\\t[:title :index |\\\\n\\\\t\\\\tindent timesRepeat: [aStream tab].\\\\n\\\\t\\\\taStream nextPutAll: title;\\\\n\\\\t\\\\t nextPut: $:;\\\\n\\\\t\\\\t space;\\\\n\\\\t\\\\t tab;\\\\n\\\\t\\\\t nextPutAll: \\\\n\\\\t\\\\t\\\\t((self instVarAt: index) printStringLimitedTo: (sizeLimit -3 -title size max: 1));\\\\n\\\\t\\\\t cr]! !\\\\n\\\\n!Object methodsFor: 'printing' stamp: 'tk 10/16/2001 19:41'!\\\\nlongPrintString\\\\n\\\\t\\\\\\\"Answer a String whose characters are a description of the receiver.\\\\\\\"\\\\n\\\\t\\\\n\\\\t| str |\\\\n\\\\tstr _ String streamContents: [:aStream | self longPrintOn: aStream].\\\\n\\\\t\\\\\\\"Objects without inst vars should return something\\\\\\\"\\\\n\\\\t^ str isEmpty ifTrue: [self printString, String cr] ifFalse: [str]! !\\\\n\\\\n!Object methodsFor: 'printing' stamp: 'BG 11/7/2004 13:39'!\\\\nlongPrintStringLimitedTo: aLimitValue\\\\n\\\\t\\\\\\\"Answer a String whose characters are a description of the receiver.\\\\\\\"\\\\n\\\\t\\\\n\\\\t| str |\\\\n\\\\tstr _ String streamContents: [:aStream | self longPrintOn: aStream limitedTo: aLimitValue indent: 0].\\\\n\\\\t\\\\\\\"Objects without inst vars should return something\\\\\\\"\\\\n\\\\t^ str isEmpty ifTrue: [self printString, String cr] ifFalse: [str]! !\\\\n\\\\n!Object methodsFor: 'printing' stamp: 'sw 3/7/2001 13:14'!\\\\nnominallyUnsent: aSelectorSymbol\\\\n\\\\t\\\\\\\"From within the body of a method which is not formally sent within the system, but which you intend to have remain in the system (for potential manual invocation, or for documentation, or perhaps because it's sent by commented-out-code that you anticipate uncommenting out someday, send this message, with the selector itself as the argument.\\\\n\\\\nThis will serve two purposes:\\\\n\\\\n\\\\t(1)  The method will not be returned by searches for unsent selectors (because it, in a manner of speaking, sends itself).\\\\n\\\\t(2)\\\\tYou can locate all such methods by browsing senders of #nominallyUnsent:\\\\\\\"\\\\n\\\\n\\\\tfalse ifTrue: [self flag: #nominallyUnsent:]    \\\\\\\"So that this method itself will appear to be sent\\\\\\\"\\\\n! !\\\\n\\\\n!Object methodsFor: 'printing' stamp: 'sma 6/1/2000 09:31'!\\\\nprintOn: aStream\\\\n\\\\t\\\\\\\"Append to the argument, aStream, a sequence of characters that  \\\\n\\\\tidentifies the receiver.\\\\\\\"\\\\n\\\\n\\\\t| title |\\\\n\\\\ttitle _ self class name.\\\\n\\\\taStream\\\\n\\\\t\\\\tnextPutAll: (title first isVowel ifTrue: ['an '] ifFalse: ['a ']);\\\\n\\\\t\\\\tnextPutAll: title! !\\\\n\\\\n!Object methodsFor: 'printing' stamp: 'sma 6/1/2000 09:22'!\\\\nprintString\\\\n\\\\t\\\\\\\"Answer a String whose characters are a description of the receiver. \\\\n\\\\tIf you want to print without a character limit, use fullPrintString.\\\\\\\"\\\\n\\\\n\\\\t^ self printStringLimitedTo: 50000! !\\\\n\\\\n!Object methodsFor: 'printing' stamp: 'tk 5/7/1999 16:20'!\\\\nprintStringLimitedTo: limit\\\\n\\\\t\\\\\\\"Answer a String whose characters are a description of the receiver.\\\\n\\\\tIf you want to print without a character limit, use fullPrintString.\\\\\\\"\\\\n\\\\t| limitedString |\\\\n\\\\tlimitedString _ String streamContents: [:s | self printOn: s] limitedTo: limit.\\\\n\\\\tlimitedString size < limit ifTrue: [^ limitedString].\\\\n\\\\t^ limitedString , '...etc...'! !\\\\n\\\\n!Object methodsFor: 'printing' stamp: 'MPW 1/1/1901 00:30'!\\\\npropertyList\\\\n\\\\t\\\\\\\"Answer a String whose characters are a property-list description of the receiver.\\\\\\\"\\\\n\\\\n\\\\t^ PropertyListEncoder process:self.\\\\n! !\\\\n\\\\n!Object methodsFor: 'printing' stamp: 'sw 10/17/2000 11:16'!\\\\nreportableSize\\\\n\\\\t\\\\\\\"Answer a string that reports the size of the receiver -- useful for showing in a list view, for example\\\\\\\"\\\\n\\\\n\\\\t^ (self basicSize + self class instSize) printString! !\\\\n\\\\n!Object methodsFor: 'printing'!\\\\nstoreOn: aStream \\\\n\\\\t\\\\\\\"Append to the argument aStream a sequence of characters that is an \\\\n\\\\texpression whose evaluation creates an object similar to the receiver.\\\\\\\"\\\\n\\\\n\\\\taStream nextPut: $(.\\\\n\\\\tself class isVariable\\\\n\\\\t\\\\tifTrue: [aStream nextPutAll: '(', self class name, ' basicNew: ';\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstore: self basicSize;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnextPutAll: ') ']\\\\n\\\\t\\\\tifFalse: [aStream nextPutAll: self class name, ' basicNew'].\\\\n\\\\t1 to: self class instSize do:\\\\n\\\\t\\\\t[:i |\\\\n\\\\t\\\\taStream nextPutAll: ' instVarAt: ';\\\\n\\\\t\\\\t\\\\tstore: i;\\\\n\\\\t\\\\t\\\\tnextPutAll: ' put: ';\\\\n\\\\t\\\\t\\\\tstore: (self instVarAt: i);\\\\n\\\\t\\\\t\\\\tnextPut: $;].\\\\n\\\\t1 to: self basicSize do:\\\\n\\\\t\\\\t[:i |\\\\n\\\\t\\\\taStream nextPutAll: ' basicAt: ';\\\\n\\\\t\\\\t\\\\tstore: i;\\\\n\\\\t\\\\t\\\\tnextPutAll: ' put: ';\\\\n\\\\t\\\\t\\\\tstore: (self basicAt: i);\\\\n\\\\t\\\\t\\\\tnextPut: $;].\\\\n\\\\taStream nextPutAll: ' yourself)'\\\\n! !\\\\n\\\\n!Object methodsFor: 'printing' stamp: 'di 6/20/97 09:12'!\\\\nstoreString\\\\n\\\\t\\\\\\\"Answer a String representation of the receiver from which the receiver \\\\n\\\\tcan be reconstructed.\\\\\\\"\\\\n\\\\n\\\\t^ String streamContents: [:s | self storeOn: s]! !\\\\n\\\\n!Object methodsFor: 'printing' stamp: 'sw 5/2/1998 13:55'!\\\\nstringForReadout\\\\n\\\\t^ self stringRepresentation! !\\\\n\\\\n!Object methodsFor: 'printing'!\\\\nstringRepresentation\\\\n\\\\t\\\\\\\"Answer a string that represents the receiver.  For most objects this is simply its printString, but for strings themselves, it's themselves.  6/12/96 sw\\\\\\\"\\\\n\\\\n\\\\t^ self printString ! !\\\\n\\\\n\\\\n!Object methodsFor: 'scripting' stamp: 'ar 3/17/2001 20:11'!\\\\nadaptedToWorld: aWorld\\\\n\\\\t\\\\\\\"If I refer to a world or a hand, return the corresponding items in the new world.\\\\\\\"\\\\n\\\\t^self! !\\\\n\\\\n!Object methodsFor: 'scripting' stamp: 'sw 3/10/2000 13:57'!\\\\ndefaultFloatPrecisionFor: aGetSelector\\\\n\\\\t\\\\\\\"Answer a number indicating the default float precision to be used in a numeric readout for which the receiver is the model.\\\\\\\"\\\\n\\\\n\\\\t^ 1! !\\\\n\\\\n!Object methodsFor: 'scripting' stamp: 'RAA 3/9/2001 17:08'!\\\\nevaluateUnloggedForSelf: aCodeString\\\\n\\\\n\\\\t^Compiler evaluate:\\\\n\\\\t\\\\taCodeString\\\\n\\\\t\\\\tfor: self\\\\n\\\\t\\\\tlogged: false! !\\\\n\\\\n!Object methodsFor: 'scripting' stamp: 'yo 12/25/2003 16:43'!\\\\nmethodInterfacesForCategory: aCategorySymbol inVocabulary: aVocabulary limitClass: aLimitClass\\\\n\\\\t\\\\\\\"Return a list of methodInterfaces for the receiver in the given category, given a vocabulary.  aCategorySymbol is the inherent category symbol, not necessarily the wording as expressed in the vocabulary.\\\\\\\"\\\\n\\\\n\\\\t| categorySymbol |\\\\n\\\\tcategorySymbol _ aCategorySymbol asSymbol.\\\\n\\\\n\\\\t(categorySymbol == ScriptingSystem nameForInstanceVariablesCategory) ifTrue: [\\\\n\\\\t\\\\t\\\\\\\"user-defined instance variables\\\\\\\"\\\\n\\\\t\\\\t^ self methodInterfacesForInstanceVariablesCategoryIn: aVocabulary].\\\\n\\\\t(categorySymbol == ScriptingSystem nameForScriptsCategory) ifTrue: [\\\\n\\\\t\\\\t\\\\\\\"user-defined scripts\\\\\\\"\\\\n\\\\t\\\\t^ self methodInterfacesForScriptsCategoryIn: aVocabulary].\\\\n\\\\t\\\\\\\"all others\\\\\\\"\\\\n\\\\t^ self usableMethodInterfacesIn: (aVocabulary methodInterfacesInCategory: categorySymbol\\\\n\\\\t\\\\tforInstance: self\\\\n\\\\t\\\\tofClass: self class\\\\n\\\\t\\\\tlimitClass: aLimitClass)\\\\n! !\\\\n\\\\n!Object methodsFor: 'scripting' stamp: 'sw 8/3/2001 13:54'!\\\\nmethodInterfacesForInstanceVariablesCategoryIn: aVocabulary\\\\n\\\\t\\\\\\\"Return a collection of methodInterfaces for the instance-variables category.  The vocabulary parameter, at present anyway, is not used.  And for non-players, the method is at present vacuous in any case\\\\\\\"\\\\n\\\\n\\\\t^  OrderedCollection new! !\\\\n\\\\n!Object methodsFor: 'scripting' stamp: 'sw 8/3/2001 13:53'!\\\\nmethodInterfacesForScriptsCategoryIn: aVocabulary\\\\n\\\\t\\\\\\\"Answer a list of method interfaces for the category #scripts, as seen in a viewer or other tool.  The vocabulary argument is not presently used.  Also, at present, only Players really do anyting interesting here.\\\\\\\"\\\\n\\\\n\\\\t^ OrderedCollection new! !\\\\n\\\\n!Object methodsFor: 'scripting' stamp: 'RAA 2/16/2001 19:37'!\\\\nselfWrittenAsIll\\\\n\\\\n\\\\t^self! !\\\\n\\\\n!Object methodsFor: 'scripting' stamp: 'RAA 2/16/2001 19:38'!\\\\nselfWrittenAsIm\\\\n\\\\n\\\\t^self! !\\\\n\\\\n!Object methodsFor: 'scripting' stamp: 'RAA 2/16/2001 19:37'!\\\\nselfWrittenAsMe\\\\n\\\\n\\\\t^self! !\\\\n\\\\n!Object methodsFor: 'scripting' stamp: 'RAA 2/16/2001 19:37'!\\\\nselfWrittenAsMy\\\\n\\\\n\\\\t^self! !\\\\n\\\\n!Object methodsFor: 'scripting' stamp: 'RAA 2/16/2001 19:38'!\\\\nselfWrittenAsThis\\\\n\\\\n\\\\t^self! !\\\\n\\\\n\\\\n!Object methodsFor: 'self evaluating' stamp: 'sd 7/31/2005 21:47'!\\\\nisSelfEvaluating\\\\n\\\\t^ self isLiteral! !\\\\n\\\\n\\\\n!Object methodsFor: 'system primitives'!\\\\nasOop\\\\n\\\\t\\\\\\\"Primitive. Answer a SmallInteger whose value is half of the receiver's \\\\n\\\\tobject pointer (interpreting object pointers as 16-bit signed quantities). \\\\n\\\\tFail if the receiver is a SmallInteger. Essential. See Object documentation \\\\n\\\\twhatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 75>\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!Object methodsFor: 'system primitives' stamp: 'di 1/9/1999 15:19'!\\\\nbecomeForward: otherObject \\\\n\\\\t\\\\\\\"Primitive. All variables in the entire system that used to point\\\\n\\\\tto the receiver now point to the argument.\\\\n\\\\tFails if either argument is a SmallInteger.\\\\\\\"\\\\n\\\\n\\\\t(Array with: self)\\\\n\\\\t\\\\telementsForwardIdentityTo:\\\\n\\\\t\\\\t\\\\t(Array with: otherObject)! !\\\\n\\\\n!Object methodsFor: 'system primitives' stamp: 'zz 3/3/2004 23:53'!\\\\nbecomeForward: otherObject copyHash: copyHash\\\\n\\\\t\\\\\\\"Primitive. All variables in the entire system that used to point to the receiver now point to the argument.\\\\n\\\\tIf copyHash is true, the argument's identity hash bits will be set to those of the receiver.\\\\n\\\\tFails if either argument is a SmallInteger.\\\\\\\"\\\\n\\\\n\\\\t(Array with: self)\\\\n\\\\t\\\\telementsForwardIdentityTo:\\\\n\\\\t\\\\t\\\\t(Array with: otherObject)\\\\n\\\\t\\\\t\\\\t\\\\tcopyHash: copyHash! !\\\\n\\\\n!Object methodsFor: 'system primitives' stamp: 'sw 10/16/2000 10:59'!\\\\nclassName\\\\n\\\\t\\\\\\\"Answer a string characterizing the receiver's class, for use in list views for example\\\\\\\"\\\\n\\\\n\\\\t^ self class name asString! !\\\\n\\\\n!Object methodsFor: 'system primitives' stamp: 'sw 10/16/2000 11:04'!\\\\ncreationStamp\\\\n\\\\t\\\\\\\"Answer a string which reports the creation particulars of the receiver.  Intended perhaps for list views, but this is presently a feature not easily accessible\\\\\\\"\\\\n\\\\n\\\\t^ '<no creation stamp>'! !\\\\n\\\\n!Object methodsFor: 'system primitives'!\\\\ninstVarAt: index \\\\n\\\\t\\\\\\\"Primitive. Answer a fixed variable in an object. The numbering of the \\\\n\\\\tvariables corresponds to the named instance variables. Fail if the index \\\\n\\\\tis not an Integer or is not the index of a fixed variable. Essential. See \\\\n\\\\tObject documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 73>\\\\n\\\\t\\\\\\\"Access beyond fixed variables.\\\\\\\"\\\\n\\\\t^self basicAt: index - self class instSize\\\\t\\\\t! !\\\\n\\\\n!Object methodsFor: 'system primitives'!\\\\ninstVarAt: anInteger put: anObject \\\\n\\\\t\\\\\\\"Primitive. Store a value into a fixed variable in the receiver. The \\\\n\\\\tnumbering of the variables corresponds to the named instance variables. \\\\n\\\\tFail if the index is not an Integer or is not the index of a fixed variable. \\\\n\\\\tAnswer the value stored as the result. Using this message violates the \\\\n\\\\tprinciple that each object has sovereign control over the storing of \\\\n\\\\tvalues into its instance variables. Essential. See Object documentation \\\\n\\\\twhatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 74>\\\\n\\\\t\\\\\\\"Access beyond fixed fields\\\\\\\"\\\\n\\\\t^self basicAt: anInteger - self class instSize put: anObject! !\\\\n\\\\n!Object methodsFor: 'system primitives' stamp: 'sw 10/16/2000 11:09'!\\\\ninstVarNamed: aString\\\\n\\\\t\\\\\\\"Return the value of the instance variable in me with that name.  Slow and unclean, but very useful. \\\\\\\"\\\\n\\\\n\\\\t^ self instVarAt: (self class allInstVarNames indexOf: aString asString)\\\\n\\\\n\\\\n! !\\\\n\\\\n!Object methodsFor: 'system primitives' stamp: 'sw 10/16/2000 11:10'!\\\\ninstVarNamed: aString put: aValue\\\\n\\\\t\\\\\\\"Store into the value of the instance variable in me of that name.  Slow and unclean, but very useful. \\\\\\\"\\\\n\\\\n\\\\t^ self instVarAt: (self class allInstVarNames indexOf: aString asString) put: aValue\\\\n! !\\\\n\\\\n!Object methodsFor: 'system primitives' stamp: 'sw 10/17/2000 11:12'!\\\\noopString\\\\n\\\\t\\\\\\\"Answer a string that represents the oop of the receiver\\\\\\\"\\\\n\\\\n\\\\t^ self asOop printString! !\\\\n\\\\n!Object methodsFor: 'system primitives' stamp: 'ar 3/2/2001 01:34'!\\\\nprimitiveChangeClassTo: anObject\\\\n\\\\t\\\\\\\"Primitive. Change the class of the receiver into the class of the argument given that the format of the receiver matches the format of the argument's class. Fail if receiver or argument are SmallIntegers, or the receiver is an instance of a compact class and the argument isn't, or when the argument's class is compact and the receiver isn't, or when the format of the receiver is different from the format of the argument's class, or when the arguments class is fixed and the receiver's size differs from the size that an instance of the argument's class should have.\\\\n\\\\tNote: The primitive will fail in most cases that you think might work. This is mostly because of a) the difference between compact and non-compact classes, and b) because of differences in the format. As an example, '(Array new: 3) primitiveChangeClassTo: Morph basicNew' would fail for three of the reasons mentioned above. Array is compact, Morph is not (failure #1). Array is variable and Morph is fixed (different format - failure #2). Morph is a fixed-field-only object and the array is too short (failure #3).\\\\n\\\\tThe facility is really provided for certain, very specific applications (mostly related to classes changing shape) and not for casual use.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 115>\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!Object methodsFor: 'system primitives' stamp: 'di 3/27/1999 12:21'!\\\\nrootStubInImageSegment: imageSegment\\\\n\\\\n\\\\t^ ImageSegmentRootStub new\\\\n\\\\t\\\\txxSuperclass: nil\\\\n\\\\t\\\\tformat: nil\\\\n\\\\t\\\\tsegment: imageSegment! !\\\\n\\\\n!Object methodsFor: 'system primitives'!\\\\nsomeObject\\\\n\\\\t\\\\\\\"Primitive. Answer the first object in the enumeration of all\\\\n\\\\t objects.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 138>\\\\n\\\\tself primitiveFailed.! !\\\\n\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 9/26/2001 11:58'!\\\\nbasicType\\\\n\\\\t\\\\\\\"Answer a symbol representing the inherent type of the receiver\\\\\\\"\\\\n\\\\n\\\\t^ #Object! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 5/3/2001 16:19'!\\\\nbeViewed\\\\n\\\\t\\\\\\\"Open up a viewer on the receiver.  The Presenter is invited to decide just how to present this viewer\\\\\\\"\\\\n\\\\n\\\\tself uniqueNameForReference.  \\\\\\\"So the viewer will have something nice to refer to\\\\\\\"\\\\n\\\\tself presenter viewObject: self! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 10/16/2000 11:01'!\\\\ncostumes\\\\n\\\\t\\\\\\\"Answer a list of costumes associated with the receiver.  The appearance of this method in class Object serves only as a backstop, probably only transitionally\\\\\\\"\\\\n\\\\n\\\\t^ nil! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 1/12/98 18:09'!\\\\nhaltIfNil! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'md 1/20/2006 17:09'!\\\\nhasLiteralSuchThat: testBlock\\\\n\\\\t\\\\\\\"This is the end of the imbedded structure path so return false.\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'md 1/20/2006 17:10'!\\\\nhasLiteralThorough: literal\\\\n\\\\t\\\\\\\"Answer true if literal is identical to any literal in this array, even if imbedded in further structures.  This is the end of the imbedded structure path so return false.\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 1/30/2001 22:24'!\\\\nhaveFullProtocolBrowsed\\\\n\\\\t\\\\\\\"Open up a Lexicon on the receiver\\\\\\\"\\\\n\\\\n\\\\t^ self haveFullProtocolBrowsedShowingSelector: nil\\\\n\\\\n\\\\t\\\\\\\"(2@3) haveFullProtocolBrowsed\\\\\\\"\\\\n! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'ar 9/27/2005 21:04'!\\\\nhaveFullProtocolBrowsedShowingSelector: aSelector\\\\n\\\\t\\\\\\\"Open up a Lexicon on the receiver, having it open up showing aSelector, which may be nil\\\\\\\"\\\\n\\\\n\\\\t| aBrowser |\\\\n\\\\taBrowser := (Smalltalk at: #InstanceBrowser ifAbsent:[^nil]) new useVocabulary: Vocabulary fullVocabulary.\\\\n\\\\taBrowser openOnObject: self inWorld: ActiveWorld showingSelector: aSelector\\\\n\\\\n\\\\t\\\\\\\"(2@3) haveFullProtocolBrowsed\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'md 7/30/2005 21:21'!\\\\nisArray\\\\n\\\\t^false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'ar 7/9/1999 18:18'!\\\\nisBehavior\\\\n\\\\t\\\\\\\"Return true if the receiver is a behavior.\\\\n\\\\tNote: Do not override in any class except behavior.\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'ajh 1/21/2003 13:15'!\\\\nisBlock\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'md 11/21/2003 12:14'!\\\\nisBlockClosure\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'yo 8/28/2002 13:41'!\\\\nisCharacter\\\\n\\\\n\\\\t^ false.\\\\n! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'ar 8/17/1999 19:43'!\\\\nisCollection\\\\n\\\\t\\\\\\\"Return true if the receiver is some sort of Collection and responds to basic collection messages such as #size and #do:\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n!Object methodsFor: 'testing'!\\\\nisColor\\\\n\\\\t\\\\\\\"Answer true if receiver is a Color. False by default.\\\\\\\"\\\\n\\\\n\\\\t^ false\\\\n! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'nk 4/17/2004 19:43'!\\\\nisColorForm\\\\n\\\\t^false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'md 11/21/2003 12:14'!\\\\nisCompiledMethod\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'mk 10/27/2003 17:33'!\\\\nisComplex\\\\n\\\\t\\\\\\\"Answer true if receiver is a Complex number. False by default.\\\\\\\"\\\\n\\\\n\\\\t^ false\\\\n! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'md 8/11/2005 16:45'!\\\\nisDictionary\\\\n\\\\t^false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'di 11/9/1998 09:38'!\\\\nisFloat\\\\n\\\\t\\\\\\\"Overridden to return true in Float, natch\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'ar 10/30/2000 23:22'!\\\\nisForm\\\\n\\\\t^false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'len 1/13/98 21:18'!\\\\nisFraction\\\\n\\\\t\\\\\\\"Answer true if the receiver is a Fraction.\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'rhi 8/14/2003 08:51'!\\\\nisHeap\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing'!\\\\nisInteger\\\\n\\\\t\\\\\\\"Overridden to return true in Integer.\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'rhi 8/12/2003 09:52'!\\\\nisInterval\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'nk 4/25/2002 08:04'!\\\\nisMessageSend\\\\n\\\\t^false\\\\n! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'md 2/19/2006 11:24'!\\\\nisMethodProperties\\\\n\\\\t^false! !\\\\n\\\\n!Object methodsFor: 'testing'!\\\\nisMorph\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'ar 9/13/2000 15:37'!\\\\nisMorphicEvent\\\\n\\\\t^false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'gm 2/22/2003 12:56'!\\\\nisMorphicModel\\\\n\\\\t\\\\\\\"Return true if the receiver is a morphic model\\\\\\\"\\\\n\\\\t^false\\\\n! !\\\\n\\\\n!Object methodsFor: 'testing'!\\\\nisNumber\\\\n\\\\t\\\\\\\"Overridden to return true in Number, natch\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'di 11/6/1998 08:04'!\\\\nisPoint\\\\n\\\\t\\\\\\\"Overridden to return true in Point.\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'ikp 9/26/97 14:45'!\\\\nisPseudoContext\\\\n\\\\t^false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'md 10/2/2005 21:52'!\\\\nisRectangle\\\\n\\\\t^false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'nk 6/14/2004 16:49'!\\\\nisSketchMorph\\\\n\\\\t^false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'ar 12/23/1999 15:43'!\\\\nisStream\\\\n\\\\t\\\\\\\"Return true if the receiver responds to the stream protocol\\\\\\\"\\\\n\\\\t^false\\\\n! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sma 6/15/2000 15:48'!\\\\nisString\\\\n\\\\t\\\\\\\"Overridden to return true in String, natch\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'md 4/30/2003 15:30'!\\\\nisSymbol\\\\n\\\\t^ false ! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'jam 3/9/2003 15:10'!\\\\nisSystemWindow\\\\n\\\\\\\"answer whatever the receiver is a SystemWindow\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing'!\\\\nisText\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'pmm 7/6/2006 20:46'!\\\\nisTrait\\\\n\\\\t\\\\\\\"Return true if the receiver is a trait.\\\\n\\\\tNote: Do not override in any class except TraitBehavior.\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'tk 10/21/97 12:45'!\\\\nisTransparent\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'ar 8/14/2001 23:19'!\\\\nisVariableBinding\\\\n\\\\t\\\\\\\"Return true if I represent a literal variable binding\\\\\\\"\\\\n\\\\t^false\\\\n\\\\t! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'ls 7/14/1998 21:45'!\\\\nisWebBrowser\\\\n\\\\t\\\\\\\"whether this object is a web browser.  See class: Scamper\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 10/27/2000 06:58'!\\\\nknownName\\\\n\\\\t\\\\\\\"If a formal name has been handed out for this object, answer it, else nil\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ Preferences capitalizedReferences\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[References keyAtValue: self ifAbsent: [nil]]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[nil]! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 9/27/96'!\\\\nname\\\\n\\\\t\\\\\\\"Answer a name for the receiver.  This is used generically in the title of certain inspectors, such as the referred-to inspector, and specificially by various subsystems.  By default, we let the object just print itself out..  \\\\\\\"\\\\n\\\\n\\\\t^ self printString! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 11/19/2001 13:28'!\\\\nnameForViewer\\\\n\\\\t\\\\\\\"Answer a name to be shown in a Viewer that is viewing the receiver\\\\\\\"\\\\n\\\\n\\\\t| aName |\\\\n\\\\t(aName _ self uniqueNameForReferenceOrNil) ifNotNil: [^ aName].\\\\n\\\\t(aName _ self knownName) ifNotNil: [^ aName].\\\\n\\\\n\\\\t^ [(self asString copyWithout: Character cr) truncateTo:  27] ifError:\\\\n\\\\t\\\\t[:msg :rcvr | ^ self class name printString]! !\\\\n\\\\n!Object methodsFor: 'testing'!\\\\nnotNil\\\\n\\\\t\\\\\\\"Coerces nil to false and everything else to true.\\\\\\\"\\\\n\\\\n\\\\t^true! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'tk 9/6/2001 19:15'!\\\\nopenInstanceBrowserWithTiles\\\\n\\\\t\\\\\\\"Open up an instance browser on me with tiles as the code type, and with the search level as desired.\\\\\\\"\\\\n\\\\n\\\\t| aBrowser |\\\\n\\\\taBrowser _ InstanceBrowser new.\\\\n\\\\taBrowser useVocabulary: Vocabulary fullVocabulary.\\\\n\\\\taBrowser limitClass: self class.\\\\n\\\\taBrowser contentsSymbol: #tiles.\\\\t\\\\t\\\\\\\"preset it to make extra buttons (tile menus)\\\\\\\"\\\\n\\\\taBrowser openOnObject: self inWorld: ActiveWorld showingSelector: nil.\\\\n\\\\taBrowser contentsSymbol: #source.\\\\n\\\\taBrowser toggleShowingTiles.\\\\n\\\\n\\\\t\\\\\\\"\\\\n(2@3) openInstanceBrowserWithTiles.\\\\nWatchMorph new openInstanceBrowserWithTiles\\\\n\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'tk 7/28/2005 04:50'!\\\\nrenameInternal: newName \\\\n\\\\t\\\\\\\"Change the internal name (because of a conflict) but leave the external name unchanged.  Change Player class name, but do not change the names that appear in tiles.  Any object that might be pointed to in the References dictionary might get this message sent to it upon reload\\\\\\\"\\\\n\\\\n\\\\t^ nil\\\\t\\\\\\\"caller will renameTo:.  new name may be different\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 2/27/2002 14:55'!\\\\nrenameTo: newName\\\\n\\\\t\\\\\\\"If the receiver has an inherent idea about its own name, it should take action here.  Any object that might be pointed to in the References dictionary might get this message sent to it upon reload\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 1/18/2001 13:43'!\\\\nshowDiffs\\\\n\\\\t\\\\\\\"Answer whether the receiver, serving as the model of a text-bearing entity, is 'showing differences' -- if it is, the editor may wish to show special feedback\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 10/20/1999 14:52'!\\\\nstepAt: millisecondClockValue in: aWindow\\\\n\\\\n\\\\t^ self stepIn: aWindow! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 10/19/1999 08:16'!\\\\nstepIn: aWindow\\\\n\\\\n\\\\t^ self step! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 10/19/1999 08:21'!\\\\nstepTime\\\\n\\\\t\\\\n\\\\t^ 1000 \\\\\\\"milliseconds -- default backstop for objects serving as models of system windows\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 10/19/1999 08:22'!\\\\nstepTimeIn: aSystemWindow\\\\n\\\\t\\\\n\\\\t^ 1000 \\\\\\\"milliseconds -- default backstop for objects serving as models of system windows\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 5/3/2001 18:22'!\\\\nvocabularyDemanded\\\\n\\\\t\\\\\\\"Answer a vocabulary that the receiver insists be used when it is looked at in a Viewer.  This allows specific classes to insist on specific custom vocabularies\\\\\\\"\\\\n\\\\n\\\\t^ nil! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 11/13/2001 07:26'!\\\\nwantsDiffFeedback\\\\n\\\\t\\\\\\\"Answer whether the receiver, serving as the model of a text-bearing entity, would like for 'diffs' green pane-border feedback to be shown\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'di 1/8/1999 15:04'!\\\\nwantsSteps\\\\n\\\\t\\\\\\\"Overridden by morphic classes whose instances want to be stepped,\\\\n\\\\tor by model classes who want their morphic views to be stepped.\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 10/19/1999 08:26'!\\\\nwantsStepsIn: aSystemWindow\\\\n\\\\t\\\\n\\\\t^ self wantsSteps! !\\\\n\\\\n\\\\n!Object methodsFor: 'translation support'!\\\\ninline: inlineFlag\\\\n\\\\t\\\\\\\"For translation only; noop when running in Smalltalk.\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'translation support'!\\\\nvar: varSymbol declareC: declString\\\\n\\\\t\\\\\\\"For translation only; noop when running in Smalltalk.\\\\\\\"! !\\\\n\\\\n\\\\n!Object methodsFor: 'undo' stamp: 'di 9/11/2000 20:32'!\\\\ncapturedState\\\\n\\\\t\\\\\\\"May be overridden in subclasses.\\\\\\\"\\\\n\\\\n\\\\t^ self shallowCopy\\\\n! !\\\\n\\\\n!Object methodsFor: 'undo' stamp: 'di 9/11/2000 20:29'!\\\\ncommandHistory\\\\n\\\\t\\\\\\\"Return the command history for the receiver\\\\\\\"\\\\n\\\\t| w |\\\\n\\\\t(w _ self currentWorld) ifNotNil: [^ w commandHistory].\\\\n\\\\t^ CommandHistory new. \\\\\\\"won't really record anything but prevent breaking things\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'undo' stamp: 'di 12/12/2000 15:01'!\\\\npurgeAllCommands\\\\n\\\\t\\\\\\\"Purge all commands for this object\\\\\\\"\\\\n\\\\tPreferences useUndo ifFalse: [^ self]. \\\\\\\"get out quickly\\\\\\\"\\\\n\\\\tself commandHistory purgeAllCommandsSuchThat: [:cmd | cmd undoTarget == self].\\\\n! !\\\\n\\\\n!Object methodsFor: 'undo' stamp: 'di 9/12/2000 08:15'!\\\\nredoFromCapturedState: st \\\\n\\\\t\\\\\\\"May be overridden in subclasses.  See also capturedState\\\\\\\"\\\\n\\\\n\\\\tself undoFromCapturedState: st  \\\\\\\"Simple cases are symmetric\\\\\\\"\\\\n! !\\\\n\\\\n!Object methodsFor: 'undo' stamp: 'sw 11/16/2000 14:42'!\\\\nrefineRedoTarget: target selector: aSymbol arguments: arguments in: refineBlock \\\\n\\\\t\\\\\\\"Any object can override this method to refine its redo specification\\\\\\\"\\\\n\\\\n\\\\t^ refineBlock\\\\n\\\\t\\\\tvalue: target\\\\n\\\\t\\\\tvalue: aSymbol\\\\n\\\\t\\\\tvalue: arguments! !\\\\n\\\\n!Object methodsFor: 'undo' stamp: 'sw 11/16/2000 14:42'!\\\\nrefineUndoTarget: target selector: aSymbol arguments: arguments in: refineBlock \\\\n\\\\t\\\\\\\"Any object can override this method to refine its undo specification\\\\\\\"\\\\n\\\\n\\\\t^ refineBlock\\\\n\\\\t\\\\tvalue: target\\\\n\\\\t\\\\tvalue: aSymbol\\\\n\\\\t\\\\tvalue: arguments! !\\\\n\\\\n!Object methodsFor: 'undo' stamp: 'di 9/11/2000 20:30'!\\\\nrememberCommand: aCommand\\\\n\\\\t\\\\\\\"Remember the given command for undo\\\\\\\"\\\\n\\\\tPreferences useUndo ifFalse: [^ self]. \\\\\\\"get out quickly\\\\\\\"\\\\n\\\\t^ self commandHistory rememberCommand: aCommand! !\\\\n\\\\n!Object methodsFor: 'undo' stamp: 'di 9/11/2000 20:30'!\\\\nrememberUndoableAction: actionBlock named: caption\\\\n\\\\t| cmd result |\\\\n\\\\tcmd _ Command new cmdWording: caption.\\\\n\\\\tcmd undoTarget: self selector: #undoFromCapturedState: argument: self capturedState.\\\\n\\\\tresult _ actionBlock value.\\\\n\\\\tcmd redoTarget: self selector: #redoFromCapturedState: argument: self capturedState.\\\\n\\\\tself rememberCommand: cmd.\\\\n\\\\t^ result! !\\\\n\\\\n!Object methodsFor: 'undo' stamp: 'di 9/11/2000 20:32'!\\\\nundoFromCapturedState: st \\\\n\\\\t\\\\\\\"May be overridden in subclasses.  See also capturedState\\\\\\\"\\\\n\\\\n\\\\tself copyFrom: st\\\\n! !\\\\n\\\\n\\\\n!Object methodsFor: 'updating'!\\\\nchanged\\\\n\\\\t\\\\\\\"Receiver changed in a general way; inform all the dependents by \\\\n\\\\tsending each dependent an update: message.\\\\\\\"\\\\n\\\\n\\\\tself changed: self! !\\\\n\\\\n!Object methodsFor: 'updating'!\\\\nchanged: aParameter \\\\n\\\\t\\\\\\\"Receiver changed. The change is denoted by the argument aParameter. \\\\n\\\\tUsually the argument is a Symbol that is part of the dependent's change \\\\n\\\\tprotocol. Inform all of the dependents.\\\\\\\"\\\\n\\\\n\\\\tself dependents do: [:aDependent | aDependent update: aParameter]! !\\\\n\\\\n!Object methodsFor: 'updating' stamp: 'nk 2/17/2004 11:12'!\\\\nchanged: anAspect with: anObject\\\\n\\\\t\\\\\\\"Receiver changed. The change is denoted by the argument anAspect. \\\\n\\\\tUsually the argument is a Symbol that is part of the dependent's change \\\\n\\\\tprotocol. Inform all of the dependents. Also pass anObject for additional information.\\\\\\\"\\\\n\\\\n\\\\tself dependents do: [:aDependent | aDependent update: anAspect with: anObject]! !\\\\n\\\\n!Object methodsFor: 'updating' stamp: 'sw 10/12/1999 18:15'!\\\\nhandledListVerification\\\\n\\\\t\\\\\\\"When a self-updating PluggableListMorph lazily checks to see the state of affairs, it first gives its model an opportunity to handle the list verification itself (this is appropriate for some models, such as VersionsBrowser); if a list's model has indeed handled things itself, it returns true here\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'updating' stamp: 'sw 10/31/1999 00:15'!\\\\nnoteSelectionIndex: anInteger for: aSymbol\\\\n\\\\t\\\\\\\"backstop\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'updating'!\\\\nokToChange\\\\n\\\\t\\\\\\\"Allows a controller to ask this of any model\\\\\\\"\\\\n\\\\t^ true! !\\\\n\\\\n!Object methodsFor: 'updating' stamp: 'sw 10/19/1999 14:39'!\\\\nupdateListsAndCodeIn: aWindow\\\\n\\\\tself canDiscardEdits ifFalse: [^ self].\\\\n\\\\taWindow updatablePanes do: [:aPane | aPane verifyContents]! !\\\\n\\\\n!Object methodsFor: 'updating' stamp: 'sma 2/29/2000 20:05'!\\\\nupdate: aParameter \\\\n\\\\t\\\\\\\"Receive a change notice from an object of whom the receiver is a \\\\n\\\\tdependent. The default behavior is to do nothing; a subclass might want \\\\n\\\\tto change itself in some way.\\\\\\\"\\\\n\\\\n\\\\t^ self! !\\\\n\\\\n!Object methodsFor: 'updating' stamp: 'nk 2/17/2004 11:13'!\\\\nupdate: anAspect with: anObject\\\\n\\\\t\\\\\\\"Receive a change notice from an object of whom the receiver is a \\\\n\\\\tdependent. The default behavior is to call update:,\\\\n\\\\twhich by default does nothing; a subclass might want \\\\n\\\\tto change itself in some way.\\\\\\\"\\\\n\\\\n\\\\t^ self update: anAspect! !\\\\n\\\\n!Object methodsFor: 'updating' stamp: 'jm 8/20/1998 18:26'!\\\\nwindowIsClosing\\\\n\\\\t\\\\\\\"This message is used to inform a models that its window is closing. Most models do nothing, but some, such as the Debugger, must do some cleanup. Note that this mechanism must be used with care by models that support multiple views, since one view may be closed while others left open.\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'sw 10/4/1999 08:13'!\\\\naddModelItemsToWindowMenu: aMenu\\\\n\\\\t\\\\\\\"aMenu is being constructed to be presented to the user in response to the user's pressing on the menu widget in the title bar of a morphic window.  Here, the model is given the opportunity to add any model-specific items to the menu, whose default target is the SystemWindow itself.\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'sw 10/5/1998 14:39'!\\\\naddModelMenuItemsTo: aCustomMenu forMorph: aMorph hand: aHandMorph \\\\n\\\\t\\\\\\\"The receiver serves as the model for aMorph; a menu is being constructed for the morph, and here the receiver is able to add its own items\\\\\\\"\\\\n! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'sma 11/12/2000 11:43'!\\\\nasExplorerString\\\\n\\\\t^ self printString! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'sw 7/13/1999 15:53'!\\\\ndefaultBackgroundColor\\\\n\\\\t\\\\\\\"Answer the color to be used as the base window color for a window whose model is an object of the receiver's class\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ Preferences windowColorFor: self class name! !\\\\n\\\\n!Object methodsFor: 'user interface'!\\\\ndefaultLabelForInspector\\\\n\\\\t\\\\\\\"Answer the default label to be used for an Inspector window on the receiver.\\\\\\\"\\\\n\\\\n\\\\t^ self class name! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'RAA 7/10/2000 08:11'!\\\\neToyStreamedRepresentationNotifying: aWidget\\\\n\\\\n\\\\t| outData |\\\\n\\\\t[ outData _ SmartRefStream streamedRepresentationOf: self ] \\\\n\\\\t\\\\ton: ProgressInitiationException\\\\n\\\\t\\\\tdo: [ :ex | \\\\n\\\\t\\\\t\\\\tex sendNotificationsTo: [ :min :max :curr |\\\\n\\\\t\\\\t\\\\t\\\\taWidget ifNotNil: [aWidget flashIndicator: #working].\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t].\\\\n\\\\t^outData\\\\n! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'ar 9/27/2005 20:29'!\\\\nexplore\\\\n\\\\t^ToolSet explore: self! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'sw 8/15/97 17:25'!\\\\nfullScreenSize\\\\n\\\\t\\\\\\\"Answer the size to which a window displaying the receiver should be set\\\\\\\"\\\\n\\\\t| adj |\\\\n\\\\tadj _ (3 * Preferences scrollBarWidth) @ 0.\\\\n\\\\t^ Rectangle origin: adj extent: (DisplayScreen actualScreenSize - adj)! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'RAA 6/21/1999 11:27'!\\\\nhasContentsInExplorer\\\\n\\\\n\\\\t^self basicSize > 0 or: [self class allInstVarNames isEmpty not]\\\\n! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'rbb 3/1/2005 09:28'!\\\\ninform: aString\\\\n\\\\t\\\\\\\"Display a message for the user to read and then dismiss. 6/9/96 sw\\\\\\\"\\\\n\\\\n\\\\taString isEmptyOrNil ifFalse: [UIManager default inform: aString]! !\\\\n\\\\n!Object methodsFor: 'user interface'!\\\\ninitialExtent\\\\n\\\\t\\\\\\\"Answer the desired extent for the receiver when a view on it is first opened on the screen. \\\\n\\\\t5/22/96 sw: in the absence of any override, obtain from RealEstateAgent\\\\\\\"\\\\n\\\\n\\\\t^ RealEstateAgent standardWindowExtent! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'ar 9/27/2005 20:30'!\\\\ninspectWithLabel: aLabel\\\\n\\\\t\\\\\\\"Create and schedule an Inspector in which the user can examine the receiver's variables.\\\\\\\"\\\\n\\\\t^ToolSet inspect: self label: aLabel! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'sw 6/12/2001 11:09'!\\\\nlaunchPartVia: aSelector\\\\n\\\\t\\\\\\\"Obtain a morph by sending aSelector to self, and attach it to the morphic hand.  This provides a general protocol for parts bins\\\\\\\"\\\\n\\\\n\\\\t| aMorph |\\\\n\\\\taMorph _ self perform: aSelector.\\\\n\\\\taMorph setProperty: #beFullyVisibleAfterDrop toValue: true.\\\\n\\\\taMorph openInHand! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'sw 6/17/2004 01:47'!\\\\nlaunchPartVia: aSelector label: aString\\\\n\\\\t\\\\\\\"Obtain a morph by sending aSelector to self, and attach it to the morphic hand.  This provides a general protocol for parts bins\\\\\\\"\\\\n\\\\n\\\\t| aMorph |\\\\n\\\\taMorph _ self perform: aSelector.\\\\n\\\\taMorph setNameTo: (ActiveWorld unusedMorphNameLike: aString).\\\\n\\\\taMorph setProperty: #beFullyVisibleAfterDrop toValue: true.\\\\n\\\\taMorph openInHand! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'sw 10/16/2000 11:11'!\\\\nlaunchTileToRefer\\\\n\\\\t\\\\\\\"Create a tile to reference the receiver, and attach it to the hand\\\\\\\"\\\\n\\\\n\\\\tself currentHand attachMorph: self tileToRefer! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'di 5/11/1999 22:26'!\\\\nmodelSleep\\\\n\\\\t\\\\\\\"A window with me as model is being exited or collapsed or closed.\\\\n\\\\tDefault response is no-op\\\\\\\" ! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'di 5/11/1999 22:01'!\\\\nmodelWakeUp\\\\n\\\\t\\\\\\\"A window with me as model is being entered or expanded.  Default response is no-op\\\\\\\" ! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'sw 10/16/1999 22:45'!\\\\nmodelWakeUpIn: aWindow\\\\n\\\\t\\\\\\\"A window with me as model is being entered or expanded.  Default response is no-op\\\\\\\" \\\\n\\\\tself modelWakeUp! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'sw 3/8/1999 15:27'!\\\\nmouseUpBalk: evt\\\\n\\\\t\\\\\\\"A button I own got a mouseDown, but the user moved out before letting up.  Certain kinds of objects (so-called 'radio buttons', for example, and other structures that must always have some selection, e.g. PaintBoxMorph) wish to take special action in this case; this default does nothing.\\\\\\\"\\\\n! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'sw 8/22/97 13:14'!\\\\nnewTileMorphRepresentative\\\\n\\\\t^ TileMorph new setLiteral: self! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'jcg 11/1/2001 13:13'!\\\\nnotYetImplemented\\\\n\\\\tself inform: 'Not yet implemented (', thisContext sender printString, ')'! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'di 6/10/1998 15:06'!\\\\nwindowActiveOnFirstClick\\\\n\\\\t\\\\\\\"Return true if my window should be active on first click.\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'di 6/10/1998 15:06'!\\\\nwindowReqNewLabel: labelString\\\\n\\\\t\\\\\\\"My window's title has been edited.\\\\n\\\\tReturn true if this is OK, and override for further behavior.\\\\\\\"\\\\n\\\\n\\\\t^ true! !\\\\n\\\\n\\\\n!Object methodsFor: 'world hacking' stamp: 'ar 3/17/2001 23:45'!\\\\ncouldOpenInMorphic\\\\n\\\\n        \\\\\\\"is there an obvious morphic world in which to open a new morph?\\\\\\\"\\\\n\\\\n        ^World notNil or: [ActiveWorld notNil]! !\\\\n\\\\n\\\\n!Object methodsFor: '*39Deprecated' stamp: 'gk 2/24/2004 08:49'!\\\\nbeep\\\\n\\\\t\\\\\\\"Deprecated.\\\\\\\"\\\\n\\\\t\\\\n\\\\tself deprecated: 'Use Beeper class>>beep instead.'.\\\\n\\\\tBeeper beep! !\\\\n\\\\n!Object methodsFor: '*39Deprecated' stamp: 'gk 2/24/2004 08:50'!\\\\nbeepPrimitive\\\\n\\\\t\\\\\\\"Deprecated. Beep in the absence of sound support.\\\\\\\"\\\\n\\\\t\\\\n\\\\tself deprecated: 'Use Beeper class>>beep or Beeper class>>beepPrimitive instead.'.\\\\n\\\\tBeeper beepPrimitive! !\\\\n\\\\n!Object methodsFor: '*39Deprecated' stamp: 'md 12/12/2003 17:02'!\\\\nbeep: soundName\\\\n\\\\t\\\\\\\"Make the given sound, unless the making of sound is disabled in Preferences.\\\\\\\"\\\\n\\\\n\\\\tself deprecated: 'Use SampledSound>>playSoundNamed: instead.'.\\\\n\\\\tPreferences soundsEnabled\\\\n\\\\t\\\\tifTrue: [self playSoundNamed: soundName]\\\\n! !\\\\n\\\\n!Object methodsFor: '*39Deprecated' stamp: 'sd 11/19/2004 16:57'!\\\\ncontentsGetz: x\\\\n\\\\tself deprecated: 'there is no method named contents in object and in addition only one sender in a method not called'. \\\\n\\\\tself contents: x! !\\\\n\\\\n!Object methodsFor: '*39Deprecated' stamp: 'sd 11/13/2003 21:10'!\\\\ndeprecatedExplanation: aString\\\\n     \\\\\\\"This method is OBSOLETE.  Use #deprecated: instead.\\\\\\\"\\\\n\\\\tself deprecated: 'Use Object>>deprecated: instead of deprecatedExplanation:.'.\\\\n\\\\n\\\\tPreferences showDeprecationWarnings ifTrue:\\\\n\\\\t\\\\t[Deprecation signal: ('{1} has been deprecated. {2}' translated format: {thisContext sender printString. aString})]! !\\\\n\\\\n!Object methodsFor: '*39Deprecated' stamp: 'sd 11/13/2003 21:11'!\\\\ndeprecated: aBlock explanation: aString \\\\n\\\\t \\\\\\\"This method is OBSOLETE.  Use #deprecated:block: instead.\\\\\\\"\\\\n\\\\tself deprecated: 'Use Object>>deprecated:block: instead of deprecated:explanation:.'.\\\\n\\\\n\\\\tPreferences showDeprecationWarnings ifTrue:\\\\n\\\\t\\\\t[Deprecation\\\\n\\\\t\\\\t\\\\tsignal: ('{1} has been deprecated. {2}' translated format: {thisContext sender printString. aString})].\\\\n\\\\t^ aBlock value.\\\\n! !\\\\n\\\\n!Object methodsFor: '*39Deprecated' stamp: 'md 12/12/2003 16:25'!\\\\ndoIfNotNil: aBlock\\\\n\\\\tself deprecated: 'use ifNotNilDo:'.\\\\n\\\\t^ self ifNotNilDo: aBlock\\\\n! !\\\\n\\\\n!Object methodsFor: '*39Deprecated' stamp: 'md 11/27/2004 12:20'!\\\\nifKindOf: aClass thenDo: aBlock\\\\n\\\\tself deprecated: 'Deprecated. Just use #isKindOf:'.\\\\n\\\\t^ (self isKindOf: aClass) ifTrue: [aBlock value: self]! !\\\\n\\\\n!Object methodsFor: '*39Deprecated' stamp: 'gk 2/23/2004 20:51'!\\\\nplaySoundNamed: soundName\\\\n\\\\t\\\\\\\"Deprecated.\\\\n\\\\tPlay the sound with the given name.\\\\\\\"\\\\n\\\\n\\\\tself deprecated: 'Use \\\\\\\"SoundService default playSoundNamed: aName\\\\\\\" instead.'.\\\\n\\\\tSoundService default playSoundNamed: soundName! !\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n!Object methodsFor: '*monticello' stamp: 'dvf 8/10/2004 23:25'!\\\\nisConflict\\\\n\\\\t^false! !\\\\n\\\\n\\\\n!Object methodsFor: '*services-base' stamp: 'rr 3/21/2006 11:54'!\\\\nrequestor\\\\n\\\\t\\\\\\\"returns the focused window's requestor\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"SystemWindow focusedWindow ifNotNilDo: [:w | ^ w requestor].\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"triggers an infinite loop\\\\\\\"\\\\n\\\\n\\\\t^ Requestor default! !\\\\n\\\\n\\\\n!Object methodsFor: '*system-support' stamp: 'dvf 8/23/2003 12:27'!\\\\nsystemNavigation\\\\n\\\\n\\\\t^ SystemNavigation default! !\\\\n\\\\n\\\\n!Object methodsFor: '*Tools-Explorer' stamp: 'stephaneducasse 9/17/2005 21:52'!\\\\nexploreAndYourself\\\\n\\\\t\\\\\\\"i.e. explore; yourself. Thisway i can peek w/o typing all the parentheses\\\\\\\"\\\\n\\\\tself explore. \\\\n     ^self! !\\\\n\\\\n!Object methodsFor: '*Tools-Explorer' stamp: 'stephaneducasse 9/17/2005 21:48'!\\\\nexploreWithLabel: label\\\\n\\\\n\\\\t^ ObjectExplorer new openExplorerFor: self withLabel:\\\\nlabel! !\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n!Object methodsFor: '*tools-browser' stamp: 'mu 3/6/2004 15:13'!\\\\nbrowse\\\\n\\\\tself systemNavigation browseClass: self class! !\\\\n\\\\n!Object methodsFor: '*tools-browser' stamp: 'mu 3/11/2004 16:00'!\\\\nbrowseHierarchy\\\\n\\\\tself systemNavigation browseHierarchy: self class! !\\\\n\\\\n\\\\n!Object methodsFor: 'private'!\\\\nerrorImproperStore\\\\n\\\\t\\\\\\\"Create an error notification that an improper store was attempted.\\\\\\\"\\\\n\\\\n\\\\tself error: 'Improper store into indexable object'! !\\\\n\\\\n!Object methodsFor: 'private'!\\\\nerrorNonIntegerIndex\\\\n\\\\t\\\\\\\"Create an error notification that an improper object was used as an index.\\\\\\\"\\\\n\\\\n\\\\tself error: 'only integers should be used as indices'! !\\\\n\\\\n!Object methodsFor: 'private' stamp: 'yo 6/29/2004 11:37'!\\\\nerrorNotIndexable\\\\n\\\\t\\\\\\\"Create an error notification that the receiver is not indexable.\\\\\\\"\\\\n\\\\n\\\\tself error: ('Instances of {1} are not indexable' translated format: {self class name})! !\\\\n\\\\n!Object methodsFor: 'private'!\\\\nerrorSubscriptBounds: index \\\\n\\\\t\\\\\\\"Create an error notification that an improper integer was used as an index.\\\\\\\"\\\\n\\\\n\\\\tself error: 'subscript is out of bounds: ' , index printString! !\\\\n\\\\n!Object methodsFor: 'private' stamp: 'ar 2/6/2004 14:47'!\\\\nprimitiveError: aString \\\\n\\\\t\\\\\\\"This method is called when the error handling results in a recursion in \\\\n\\\\tcalling on error: or halt or halt:.\\\\\\\"\\\\n\\\\n\\\\t| context |\\\\n\\\\t(String\\\\n\\\\t\\\\tstreamContents: \\\\n\\\\t\\\\t\\\\t[:s |\\\\n\\\\t\\\\t\\\\ts nextPutAll: '***System error handling failed***'.\\\\n\\\\t\\\\t\\\\ts cr; nextPutAll: aString.\\\\n\\\\t\\\\t\\\\tcontext _ thisContext sender sender.\\\\n\\\\t\\\\t\\\\t20 timesRepeat: [context == nil ifFalse: [s cr; print: (context _ context sender)]].\\\\n\\\\t\\\\t\\\\ts cr; nextPutAll: '-------------------------------'.\\\\n\\\\t\\\\t\\\\ts cr; nextPutAll: 'Type CR to enter an emergency evaluator.'.\\\\n\\\\t\\\\t\\\\ts cr; nextPutAll: 'Type any other character to restart.'])\\\\n\\\\t\\\\tdisplayAt: 0 @ 0.\\\\n\\\\t[Sensor keyboardPressed] whileFalse.\\\\n\\\\tSensor keyboard = Character cr ifTrue: [Transcripter emergencyEvaluator].\\\\n\\\\tSmalltalk isMorphic\\\\n\\\\t\\\\tifTrue: [World install \\\\\\\"init hands and redisplay\\\\\\\"]\\\\n\\\\t\\\\tifFalse: [ScheduledControllers searchForActiveController]! !\\\\n\\\\n!Object methodsFor: 'private'!\\\\nspecies\\\\n\\\\t\\\\\\\"Answer the preferred class for reconstructing the receiver.  For example, \\\\n\\\\tcollections create new collections whenever enumeration messages such as \\\\n\\\\tcollect: or select: are invoked.  The new kind of collection is determined by \\\\n\\\\tthe species of the original collection.  Species and class are not always the \\\\n\\\\tsame.  For example, the species of Interval is Array.\\\\\\\"\\\\n\\\\n\\\\t^self class! !\\\\n\\\\n!Object methodsFor: 'private'!\\\\nstoreAt: offset inTempFrame: aContext\\\\n\\\\t\\\\\\\"This message had to get sent to an expression already on the stack\\\\n\\\\tas a Block argument being accessed by the debugger.\\\\n\\\\tJust re-route it to the temp frame.\\\\\\\"\\\\n\\\\t^ aContext tempAt: offset put: self! !\\\\n\\\\n\\\\n!Object methodsFor: '*Morphic-NewCurve-testing''' stamp: 'wiz 12/31/2005 21:31'!\\\\nisNonZero\\\\n\\\\\\\"Overriden in Number. This returns the backstop answer for non-numbers\\\\\\\"\\\\n^false.! !\\\\n\\\\n\\\\n!Object methodsFor: 'events' stamp: 'nk 8/27/2003 16:23'!\\\\nactionsWithReceiver: anObject forEvent: anEventSelector\\\\n\\\\n\\\\t^(self actionSequenceForEvent: anEventSelector)\\\\n                select: [:anAction | anAction receiver == anObject ]! !\\\\n\\\\n!Object methodsFor: 'events' stamp: 'nk 8/27/2003 17:45'!\\\\nrenameActionsWithReceiver: anObject forEvent: anEventSelector toEvent: newEvent\\\\n\\\\n\\\\t| oldActions newActions |\\\\n\\\\toldActions _ Set new.\\\\n\\\\tnewActions _ Set new.\\\\n\\\\t(self actionSequenceForEvent: anEventSelector) do: [ :action |\\\\n\\\\t\\\\taction receiver == anObject\\\\n\\\\t\\\\t\\\\tifTrue: [ oldActions add: anObject ]\\\\n\\\\t\\\\t\\\\tifFalse: [ newActions add: anObject ]].\\\\n\\\\tself setActionSequence: (ActionSequence withAll: newActions) forEvent: anEventSelector.\\\\n\\\\toldActions do: [ :act | self when: newEvent evaluate: act ].! !\\\\n\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 10/16/2000 10:35'!\\\\nassureUniClass\\\\n\\\\t\\\\\\\"If the receiver is not yet an instance of a uniclass, create a uniclass for it and make the receiver become an instance of that class.\\\\\\\"\\\\n\\\\n\\\\t| anInstance |\\\\n\\\\tself belongsToUniClass ifTrue: [^ self].\\\\n\\\\tanInstance _ self class instanceOfUniqueClass.\\\\n\\\\tself become: (self as: anInstance class).\\\\n\\\\t^ anInstance! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 10/16/2000 10:41'!\\\\nbelongsToUniClass\\\\n\\\\t\\\\\\\"Answer whether the receiver belongs to a uniclass.  For the moment (this is not entirely satisfactory) this is precisely equated with the classname ending in a digit\\\\\\\"\\\\n\\\\n\\\\t^ self class name endsWithDigit! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 12/11/2000 15:37'!\\\\nbrowseOwnClassSubProtocol\\\\n\\\\t\\\\\\\"Open up a ProtocolBrowser on the subprotocol of the receiver\\\\\\\"\\\\n\\\\n\\\\tProtocolBrowser openSubProtocolForClass: self class\\\\n! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 8/4/2001 00:51'!\\\\ncategoriesForViewer: aViewer\\\\n\\\\t\\\\\\\"Answer a list of categories to offer in the given viewer\\\\\\\"\\\\n\\\\n\\\\t^ aViewer currentVocabulary categoryListForInstance: self ofClass: self class limitClass: aViewer limitClass! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 8/3/2001 22:08'!\\\\ncategoriesForVocabulary: aVocabulary limitClass: aLimitClass\\\\n\\\\t\\\\\\\"Answer a list of categories of methods for the receiver when using the given vocabulary, given that one considers only methods that are implemented not further away than aLimitClass\\\\\\\"\\\\n\\\\n\\\\t^ aVocabulary categoryListForInstance: self ofClass: self class limitClass: aLimitClass! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 10/25/2000 07:20'!\\\\nchooseNewNameForReference\\\\n\\\\t\\\\\\\"Offer an opportunity for the receiver, presumed already to be known in the References registry, to be renamed\\\\\\\"\\\\n\\\\n\\\\t|  nameSym current newName |\\\\n\\\\tcurrent _ References keyAtValue: self ifAbsent: [^ self error: 'not found in References'].\\\\n\\\\n\\\\tnewName _ FillInTheBlank request: 'Please enter new name' initialAnswer: current.\\\\n\\\\t\\\\\\\"Want to user some better way of determining the validity of the chosen identifier, and also want to give more precise diagnostic if the string the user types in is not acceptable.  Work to be done here.\\\\\\\"\\\\n\\\\n\\\\tnewName isEmpty ifTrue: [^ nil].\\\\n\\\\t((Scanner isLiteralSymbol: newName) and: [(newName includes: $:) not])\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[nameSym _ newName capitalized asSymbol.\\\\n\\\\t\\\\t\\\\t(((References includesKey:  nameSym) not and:\\\\n\\\\t\\\\t\\\\t\\\\t[(Smalltalk includesKey: nameSym) not]) and:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[(ScriptingSystem allKnownClassVariableNames includes: nameSym) not])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[(References associationAt: current) key: nameSym.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tReferences rehash.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^ nameSym]].\\\\n\\\\tself inform: 'Sorry, that name is not available.'.\\\\n\\\\t^ nil! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 8/3/2001 21:22'!\\\\ndefaultLimitClassForVocabulary: aVocabulary\\\\n\\\\t\\\\\\\"Answer the class to use, by default, as the limit class on a protocol browser or viewer opened up on the receiver, within the purview of the Vocabulary provided\\\\\\\"\\\\n\\\\n\\\\t^ (aVocabulary isKindOf: FullVocabulary)\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t [self class superclass == Object\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self class]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self class superclass]]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[ProtoObject]! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 2/14/2000 14:24'!\\\\ndefaultNameStemForInstances\\\\n\\\\t\\\\\\\"Answer a basis for names of default instances of the receiver.  The default is to let the class specify, but certain instances will want to override.  (PasteUpMorphs serving as Worlds come to mind\\\\\\\"\\\\n\\\\n\\\\t^ self class defaultNameStemForInstances! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 5/22/2001 16:53'!\\\\nelementTypeFor: aStringOrSymbol vocabulary: aVocabulary\\\\n\\\\t\\\\\\\"Answer a symbol characterizing what kind of element aStringOrSymbol represents.  Realistically, at present, this always just returns #systemScript; a prototyped but not-incorporated architecture supported use of a leading colon to characterize an inst var of a system class, and for the moment we still see its remnant here.\\\\\\\"\\\\n\\\\n\\\\tself flag: #deferred.  \\\\\\\"a loose end in the non-player case\\\\\\\"\\\\n\\\\t^ #systemScript! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 5/4/2001 07:04'!\\\\nexternalName\\\\n\\\\t\\\\\\\"Answer an external name by which the receiver is known.  Generic implementation here is a transitional backstop. probably\\\\\\\"\\\\n\\\\n\\\\t^ self nameForViewer! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 5/4/2001 07:06'!\\\\ngraphicForViewerTab\\\\n\\\\t\\\\\\\"When a Viewer is open on the receiver, its tab needs some graphic to show to the user.  Answer a form or a morph to serve that purpose.  A generic image is used for arbitrary objects, but note my reimplementors\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ ScriptingSystem formAtKey: 'Image'! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 5/4/2001 07:08'!\\\\nhasUserDefinedSlots\\\\n\\\\t\\\\\\\"Answer whether the receiver has any user-defined slots, in the omniuser sense of the term.  This is needed to allow Viewers to look at any object, not just at Players.\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 8/22/2002 14:07'!\\\\ninfoFor: anElement inViewer: aViewer\\\\n\\\\t\\\\\\\"The user made a gesture asking for info/menu relating to me.  Some of the messages dispatched here are not yet available in this image\\\\\\\"\\\\n\\\\n\\\\t| aMenu elementType |\\\\n\\\\telementType _ self elementTypeFor: anElement vocabulary: aViewer currentVocabulary.\\\\n\\\\t((elementType = #systemSlot) | (elementType == #userSlot))\\\\n\\\\t\\\\tifTrue:\\\\t[^ self slotInfoButtonHitFor: anElement inViewer: aViewer].\\\\n\\\\tself flag: #deferred.  \\\\\\\"Use a traditional MenuMorph, and reinstate the pacify thing\\\\\\\"\\\\n\\\\taMenu _ MenuMorph new defaultTarget: aViewer.\\\\n\\\\t#(\\\\t('implementors'\\\\t\\\\t\\\\tbrowseImplementorsOf:)\\\\n\\\\t\\\\t('senders'\\\\t\\\\t\\\\t\\\\tbrowseSendersOf:)\\\\n\\\\t\\\\t('versions'\\\\t\\\\t\\\\t\\\\tbrowseVersionsOf:)\\\\n\\\\t\\\\t-\\\\n\\\\t\\\\t('browse full'\\\\t\\\\t\\\\tbrowseMethodFull:)\\\\n\\\\t\\\\t('inheritance'\\\\t\\\\t\\\\tbrowseMethodInheritance:)\\\\n\\\\t\\\\t-\\\\n\\\\t\\\\t('about this method'\\\\t\\\\taboutMethod:)) do:\\\\n\\\\n\\\\t\\\\t\\\\t[:pair |\\\\n\\\\t\\\\t\\\\t\\\\tpair = '-'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[aMenu addLine]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[aMenu add: pair first target: aViewer selector: pair second argument: anElement]].\\\\n\\\\taMenu addLine.\\\\n\\\\taMenu defaultTarget: self.\\\\n\\\\t#(\\\\t('destroy script'\\\\t\\\\tremoveScript:)\\\\n\\\\t\\\\t('rename script'\\\\t\\\\trenameScript:)\\\\n\\\\t\\\\t('pacify script'\\\\t\\\\tpacifyScript:)) do:\\\\n\\\\t\\\\t\\\\t[:pair |\\\\n\\\\t\\\\t\\\\t\\\\taMenu add: pair first target: self selector: pair second argument: anElement].\\\\n\\\\n\\\\taMenu addLine.\\\\n\\\\taMenu  add: 'show categories....' target: aViewer selector: #showCategoriesFor: argument: anElement.\\\\n\\\\taMenu items size == 0 ifTrue:  \\\\\\\"won't happen at the moment a/c the above\\\\\\\"\\\\n\\\\t\\\\t[aMenu add: 'ok' action: nil].  \\\\\\\"in case it was a slot -- weird, transitional\\\\\\\"\\\\n\\\\n\\\\taMenu addTitle: anElement asString, ' (', elementType, ')'.\\\\n\\\\n\\\\taMenu popUpInWorld: self currentWorld.\\\\n ! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 9/26/2001 11:58'!\\\\ninitialTypeForSlotNamed: aName\\\\n\\\\t\\\\\\\"Answer the initial type to be ascribed to the given instance variable\\\\\\\"\\\\n\\\\n\\\\t^ #Object! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'ar 5/26/2001 16:13'!\\\\nisPlayerLike\\\\n\\\\t\\\\\\\"Return true if the receiver is a player-like object\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'nk 9/11/2004 16:53'!\\\\nmethodInterfacesInPresentationOrderFrom: interfaceList forCategory: aCategory \\\\n\\\\t\\\\\\\"Answer the interface list sorted in desired presentation order, using a \\\\n\\\\tstatic master-ordering list, q.v. The category parameter allows an \\\\n\\\\tescape in case one wants to apply different order strategies in different \\\\n\\\\tcategories, but for now a single master-priority-ordering is used -- see \\\\n\\\\tthe comment in method EToyVocabulary.masterOrderingOfPhraseSymbols\\\\\\\"\\\\n\\\\n\\\\t| masterOrder ordered unordered index |\\\\n\\\\tmasterOrder := Vocabulary eToyVocabulary masterOrderingOfPhraseSymbols.\\\\n\\\\tordered := SortedCollection sortBlock: [:a :b | a key < b key].\\\\n\\\\tunordered := SortedCollection sortBlock: [:a :b | a wording < b wording].\\\\n\\\\n\\\\tinterfaceList do: [:interface | \\\\n\\\\t\\\\tindex := masterOrder indexOf: interface elementSymbol.\\\\n\\\\t\\\\tindex isZero\\\\n\\\\t\\\\t\\\\tifTrue: [unordered add: interface]\\\\n\\\\t\\\\t\\\\tifFalse: [ordered add: index -> interface]].\\\\n\\\\n\\\\t^ Array\\\\n\\\\t\\\\tstreamContents: [:stream | \\\\n\\\\t\\\\t\\\\tordered do: [:assoc | stream nextPut: assoc value].\\\\n\\\\t\\\\t\\\\tstream nextPutAll: unordered]! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 10/24/2000 11:36'!\\\\nnewScriptorAround: aPhraseTileMorph\\\\n\\\\t\\\\\\\"Sprout a scriptor around aPhraseTileMorph, thus making a new script.  This is where generalized scriptors will be threaded in\\\\\\\"\\\\n\\\\n\\\\t^ nil! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 10/25/2000 17:42'!\\\\nofferViewerMenuForEvt: anEvent morph: aMorph\\\\n\\\\t\\\\\\\"Offer the viewer's primary menu to the user.  aMorph is some morph within the viewer itself, the one within which a mousedown triggered the need for this menu, and it is used only to retrieve the Viewer itself\\\\\\\"\\\\n\\\\n\\\\tself offerViewerMenuFor: (aMorph ownerThatIsA: StandardViewer) event: anEvent! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 8/11/2002 02:03'!\\\\nofferViewerMenuFor: aViewer event: evt\\\\n\\\\t\\\\\\\"Offer the primary Viewer menu to the user.  Copied up from Player code, but most of the functions suggested here don't work for non-Player objects, many aren't even defined, some relate to exploratory sw work not yet reflected in the current corpus.  We are early in the life cycle of this method...\\\\\\\"\\\\n\\\\n\\\\t| aMenu |\\\\n\\\\taMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\taMenu addStayUpItem.\\\\n\\\\taMenu title: '**CAUTION -- UNDER CONSTRUCTION!!**\\\\nMany things may not work!!\\\\n', self nameForViewer.\\\\n\\\\t(aViewer affordsUniclass and: [self belongsToUniClass not]) ifTrue:\\\\n\\\\t\\\\t[aMenu add: 'give me a Uniclass' action: #assureUniClass.\\\\n\\\\t\\\\taMenu addLine].\\\\n\\\\taMenu add: 'choose vocabulary...' target: aViewer action: #chooseVocabulary.\\\\n\\\\taMenu add: 'choose limit class...' target: aViewer action: #chooseLimitClass.\\\\n\\\\taMenu add: 'add search pane' target: aViewer action: #addSearchPane.\\\\n\\\\taMenu balloonTextForLastItem: 'Specify which class should be the most generic one to have its methods shown in this Viewer'.\\\\n\\\\taMenu addLine.\\\\n\\\\n\\\\tself belongsToUniClass ifTrue:\\\\n\\\\t\\\\t[aMenu add: 'add a new instance variable' target: self selector: #addInstanceVariableIn: argument: aViewer.\\\\n\\\\t\\\\taMenu add: 'add a new script' target: aViewer selector: #newPermanentScriptIn: argument: aViewer.\\\\n\\\\t\\\\taMenu addLine.\\\\n\\\\t\\\\taMenu add: 'make my class be first-class' target: self selector: #makeFirstClassClassIn: argument: aViewer.\\\\n\\\\t\\\\taMenu add: 'move my changes up to my superclass' target: self action: #promoteChangesToSuperclass.\\\\n\\\\t\\\\taMenu addLine].\\\\n\\\\n\\\\taMenu add: 'tear off a tile' target: self selector: #launchTileToRefer.\\\\n\\\\taMenu addLine.\\\\n\\\\n\\\\taMenu add: 'inspect me' target: self selector: #inspect.\\\\n\\\\taMenu add: 'inspect my class' target: self class action: #inspect.\\\\n\\\\taMenu addLine.\\\\n\\\\n\\\\taMenu add: 'browse vocabulary' action: #haveFullProtocolBrowsed.\\\\n\\\\taMenu add: 'inspect this Viewer' target: aViewer action: #inspect.\\\\n\\\\n\\\\taMenu popUpEvent: evt in: aViewer currentWorld\\\\n\\\\n\\\\\\\"\\\\n\\\\taMenu add: 'references to me' target: aViewer action: #browseReferencesToObject.\\\\n\\\\taMenu add: 'toggle scratch pane' target: aViewer selector: #toggleScratchPane.\\\\n\\\\taMenu add: 'make a nascent script for me' target: aViewer selector: #makeNascentScript.\\\\n\\\\taMenu add: 'rename me' target: aViewer selector: #chooseNewNameForReference.\\\\n\\\\taMenu add: 'browse full' action: #browseOwnClassFull.\\\\n\\\\taMenu add: 'browse hierarchy' action: #browseOwnClassHierarchy.\\\\n\\\\taMenu add: 'set user level...' target: aViewer action: #setUserLevel.\\\\n\\\\taMenu add: 'browse sub-protocol' action: #browseOwnClassSubProtocol.\\\\n\\\\taMenu addLine.\\\\n\\\\n\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 1/22/2001 15:20'!\\\\nrenameScript: oldSelector\\\\n\\\\t\\\\\\\"prompt the user for a new selector and apply it.  Presently only works for players\\\\\\\"\\\\n\\\\n\\\\tself notYetImplemented! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 8/10/2004 11:53'!\\\\ntilePhrasesForCategory: aCategorySymbol inViewer: aViewer\\\\n\\\\t\\\\\\\"Return a collection of phrases for the category.\\\\\\\"\\\\n\\\\n\\\\t| interfaces |\\\\n\\\\tinterfaces _ self methodInterfacesForCategory: aCategorySymbol inVocabulary: aViewer currentVocabulary limitClass: aViewer limitClass.\\\\n\\\\tinterfaces _ self methodInterfacesInPresentationOrderFrom: interfaces forCategory: aCategorySymbol.\\\\n\\\\t^ self tilePhrasesForMethodInterfaces: interfaces inViewer: aViewer! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 8/10/2004 11:53'!\\\\ntilePhrasesForMethodInterfaces: methodInterfaceList inViewer: aViewer\\\\n\\\\t\\\\\\\"Return a collection of ViewerLine objects corresponding to the method-interface list provided.   The resulting list will be in the same order as the incoming list, but may be smaller if the viewer's vocbulary suppresses some of the methods, or if, in classic tiles mode, the selector requires more arguments than can be handled.\\\\\\\"\\\\n\\\\n\\\\t| toSuppress interfaces resultType itsSelector |\\\\n\\\\ttoSuppress _ aViewer currentVocabulary phraseSymbolsToSuppress.\\\\n\\\\tinterfaces _ methodInterfaceList reject: [:int | toSuppress includes: int selector].\\\\n\\\\tPreferences universalTiles ifFalse:  \\\\\\\"Classic tiles have their limitations...\\\\\\\"\\\\n\\\\t\\\\t[interfaces _ interfaces select:\\\\n\\\\t\\\\t\\\\t[:int |\\\\n\\\\t\\\\t\\\\t\\\\titsSelector _ int selector.\\\\n\\\\t\\\\t\\\\t\\\\titsSelector numArgs < 2 or:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"The lone two-arg loophole in classic tiles\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[#(color:sees:) includes: itsSelector]]].\\\\n\\\\n\\\\t^ interfaces collect:\\\\n\\\\t\\\\t[:aMethodInterface |\\\\n\\\\t\\\\t\\\\t((resultType _ aMethodInterface resultType) notNil and: [resultType ~~ #unknown]) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[aViewer phraseForVariableFrom: aMethodInterface]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[aViewer phraseForCommandFrom: aMethodInterface]]! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 8/10/2004 12:23'!\\\\ntilePhrasesForSelectorList: aList inViewer: aViewer\\\\n\\\\t\\\\\\\"Particular to the search facility in viewers.  Answer a list, in appropriate order, of ViewerLine objects to put into the viewer.\\\\\\\"\\\\n\\\\n\\\\t| interfaces aVocab |\\\\n\\\\taVocab _ aViewer currentVocabulary.\\\\n\\\\tinterfaces _ self\\\\n\\\\t\\\\tmethodInterfacesInPresentationOrderFrom:\\\\n\\\\t\\\\t\\\\t(aList collect: [:aSel | aVocab methodInterfaceForSelector: aSel class: self class])\\\\n\\\\t\\\\tforCategory: #search.\\\\n\\\\t^ self tilePhrasesForMethodInterfaces: interfaces inViewer: aViewer! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 5/4/2001 04:51'!\\\\ntileToRefer\\\\n\\\\t\\\\\\\"Answer a reference tile that comprises an alias to me\\\\\\\"\\\\n\\\\n\\\\t^ TileMorph new setToReferTo: self! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sd 3/30/2005 22:04'!\\\\nuniqueInstanceVariableNameLike: aString excluding: takenNames\\\\n\\\\t\\\\\\\"Answer a nice instance-variable name to be added to the receiver which resembles aString, making sure it does not coincide with any element in takenNames\\\\\\\"\\\\n\\\\n\\\\t| okBase uniqueName usedNames |\\\\n\\\\tusedNames _ self class allInstVarNamesEverywhere.\\\\n\\\\tusedNames removeAllFoundIn: self class instVarNames.\\\\n\\\\tusedNames addAll: takenNames.\\\\n\\\\tokBase _ Scanner wellFormedInstanceVariableNameFrom: aString.\\\\n\\\\n\\\\tuniqueName _ Utilities keyLike: okBase satisfying: \\\\n\\\\t\\\\t[:aKey | (usedNames includes: aKey) not].\\\\n\\\\n\\\\t^ uniqueName! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 11/21/2001 15:16'!\\\\nuniqueNameForReference\\\\n\\\\t\\\\\\\"Answer a nice name by which the receiver can be referred to by other objects.  At present this uses a global References dictionary to hold the database of references, but in due course this will need to acquire some locality\\\\\\\"\\\\n\\\\n\\\\t| aName nameSym stem knownClassVars |\\\\n\\\\t(aName _ self uniqueNameForReferenceOrNil) ifNotNil: [^ aName].\\\\n\\\\t(stem _ self knownName) ifNil:\\\\n\\\\t\\\\t[stem _ self defaultNameStemForInstances asString].\\\\n\\\\tstem _ stem select: [:ch | ch isLetter or: [ch isDigit]].\\\\n\\\\tstem size == 0 ifTrue: [stem _ 'A'].\\\\n\\\\tstem first isLetter ifFalse:\\\\n\\\\t\\\\t[stem _ 'A', stem].\\\\n\\\\tstem _ stem capitalized.\\\\n\\\\tknownClassVars _ ScriptingSystem allKnownClassVariableNames.\\\\n\\\\taName _ Utilities keyLike:  stem satisfying:\\\\n\\\\t\\\\t[:jinaLake |\\\\n\\\\t\\\\t\\\\tnameSym _ jinaLake asSymbol.\\\\n\\\\t\\\\t\\\\t ((References includesKey:  nameSym) not and:\\\\n\\\\t\\\\t\\\\t\\\\t[(Smalltalk includesKey: nameSym) not]) and:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[(knownClassVars includes: nameSym) not]].\\\\n\\\\n\\\\tReferences at: (aName _ aName asSymbol) put: self.\\\\n\\\\t^ aName! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'md 1/17/2006 17:58'!\\\\nuniqueNameForReferenceFrom: proposedName\\\\n\\\\t\\\\\\\"Answer a satisfactory symbol, similar to the proposedName but obeying the rules, to represent the receiver\\\\\\\"\\\\n\\\\n\\\\t| aName nameSym stem okay |\\\\n\\\\tproposedName = self uniqueNameForReferenceOrNil \\\\n\\\\t\\\\tifTrue: [^ proposedName].  \\\\\\\"No change\\\\\\\"\\\\n\\\\n\\\\tstem _ proposedName select: [:ch | ch isLetter or: [ch isDigit]].\\\\n\\\\tstem size == 0 ifTrue: [stem _ 'A'].\\\\n\\\\tstem first isLetter ifFalse:\\\\n\\\\t\\\\t[stem _ 'A', stem].\\\\n\\\\tstem _ stem capitalized.\\\\n\\\\taName _ Utilities keyLike: stem satisfying:\\\\n\\\\t\\\\t[:jinaLake |\\\\n\\\\t\\\\t\\\\tnameSym _ jinaLake asSymbol.\\\\n\\\\t\\\\t\\\\tokay _ true.\\\\n\\\\t\\\\t\\\\t(self class bindingOf: nameSym) ifNotNil: [okay _ false \\\\\\\"don't use it\\\\\\\"].\\\\n\\\\t\\\\t\\\\tokay].\\\\n\\\\t^ aName asSymbol! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 3/15/2004 23:01'!\\\\nuniqueNameForReferenceOrNil\\\\n\\\\t\\\\\\\"If the receiver has a unique name for reference, return it here, else return nil\\\\\\\"\\\\n\\\\n\\\\t^ References keyAtValue: self ifAbsent: [nil]! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'ar 5/16/2001 01:40'!\\\\nupdateThresholdForGraphicInViewerTab\\\\n\\\\t\\\\\\\"When a Viewer is open on the receiver, its tab needs some graphic to show to the user. Computing this graphic can take quite some time so we want to make the update frequency depending on how long it takes to compute the thumbnail. The threshold returned by this method defines that the viewer will update at most every 'threshold * timeItTakesToDraw' milliseconds. Thus, if the time for computing the receiver's thumbnail is 200 msecs and the the threshold is 10, the viewer will update at most every two seconds.\\\\\\\"\\\\n\\\\t^20 \\\\\\\"seems to be a pretty good general choice\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 3/9/2001 13:48'!\\\\nusableMethodInterfacesIn: aListOfMethodInterfaces\\\\n\\\\t\\\\\\\"Filter aList, returning a subset list of apt phrases\\\\\\\"\\\\n\\\\n\\\\t^ aListOfMethodInterfaces\\\\n! !\\\\n\\\\n\\\\n!Object methodsFor: 'inspecting' stamp: 'ar 9/27/2005 18:31'!\\\\nbasicInspect\\\\n\\\\t\\\\\\\"Create and schedule an Inspector in which the user can examine the \\\\n\\\\treceiver's variables. This method should not be overriden.\\\\\\\"\\\\n\\\\t^ToolSet basicInspect: self! !\\\\n\\\\n!Object methodsFor: 'inspecting' stamp: 'md 1/18/2006 19:09'!\\\\ninspect\\\\n\\\\t\\\\\\\"Create and schedule an Inspector in which the user can examine the receiver's variables.\\\\\\\"\\\\n\\\\tToolSet inspect: self! !\\\\n\\\\n!Object methodsFor: 'inspecting' stamp: 'apb 7/14/2004 12:19'!\\\\ninspectorClass\\\\n\\\\t\\\\\\\"Answer the class of the inspector to be used on the receiver.  Called by inspect; \\\\n\\\\tuse basicInspect to get a normal (less useful) type of inspector.\\\\\\\"\\\\n\\\\n\\\\t^ Inspector! !\\\\n\\\\n\\\\n!Object methodsFor: 'thumbnail' stamp: 'dgd 9/25/2004 23:17'!\\\\niconOrThumbnailOfSize: aNumberOrPoint \\\\n\\\\t\\\\\\\"Answer an appropiate form to represent the receiver\\\\\\\"\\\\n\\\\t^ nil! !\\\\n\\\\n\\\\n!Object methodsFor: 'scripts-kernel' stamp: 'nk 10/14/2004 10:55'!\\\\nuniversalTilesForGetterOf: aMethodInterface\\\\n\\\\t\\\\\\\"Return universal tiles for a getter on the given method interface.\\\\\\\"\\\\n\\\\n\\\\t| ms argTile argArray itsSelector |\\\\n\\\\titsSelector _ aMethodInterface selector.\\\\n\\\\targArray _ #().\\\\n\\\\n\\\\t\\\\\\\"Four gratuituous special cases...\\\\\\\"\\\\n\\\\n\\\\t(itsSelector == #color:sees:) ifTrue:\\\\n\\\\t\\\\t[argTile _ ScriptingSystem tileForArgType: #Color.\\\\n\\\\t\\\\targArray _ Array with: argTile colorSwatch color with: argTile colorSwatch color copy].\\\\n\\\\n\\\\titsSelector == #seesColor: ifTrue:\\\\n\\\\t\\\\t[argTile _ ScriptingSystem tileForArgType: #Color.\\\\n\\\\t\\\\targArray _  Array with: argTile colorSwatch color].\\\\n\\\\n\\\\t(#(touchesA: overlaps: overlapsAny:) includes: itsSelector) ifTrue:\\\\n\\\\t\\\\t[argTile _ ScriptingSystem tileForArgType: #Player.\\\\n\\\\t\\\\targArray _ Array with: argTile actualObject].\\\\n\\\\n\\\\tms _ MessageSend receiver: self selector: itsSelector arguments: argArray.\\\\n\\\\t^ ms asTilesIn: self class globalNames: (self class officialClass ~~ CardPlayer)\\\\n\\\\t\\\\t\\\\t\\\\\\\"For CardPlayers, use 'self'.  For others, name it, and use its name.\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'scripts-kernel' stamp: 'tk 9/28/2001 13:30'!\\\\nuniversalTilesForInterface: aMethodInterface\\\\n\\\\t\\\\\\\"Return universal tiles for the given method interface.  Record who self is.\\\\\\\"\\\\n\\\\n\\\\t| ms argTile itsSelector aType argList |\\\\n\\\\titsSelector _ aMethodInterface selector.\\\\n\\\\targList _ OrderedCollection new.\\\\n\\\\taMethodInterface argumentVariables doWithIndex:\\\\n\\\\t\\\\t[:anArgumentVariable :anIndex | \\\\n\\\\t\\\\t\\\\targTile _ ScriptingSystem tileForArgType: (aType _ aMethodInterface typeForArgumentNumber: anIndex).\\\\n\\\\t\\\\t\\\\targList add: (aType == #Player \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [argTile actualObject]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [argTile literal]).\\\\t\\\\\\\"default value for each type\\\\\\\"].\\\\n\\\\n\\\\tms _ MessageSend receiver: self selector: itsSelector arguments: argList asArray.\\\\n\\\\t^ ms asTilesIn: self class globalNames: (self class officialClass ~~ CardPlayer)\\\\n\\\\t\\\\t\\\\t\\\\\\\"For CardPlayers, use 'self'.  For others, name it, and use its name.\\\\\\\"! !\\\\n\\\\n\\\\n!Object methodsFor: 'breakpoint' stamp: 'bkv 7/1/2003 12:33'!\\\\nbreak\\\\n\\\\t\\\\\\\"This is a simple message to use for inserting breakpoints during debugging.\\\\n\\\\tThe debugger is opened by sending a signal. This gives a chance to restore\\\\n\\\\tinvariants related to multiple processes.\\\\\\\"\\\\n\\\\n\\\\tBreakPoint signal.\\\\n\\\\n\\\\t\\\\\\\"nil break.\\\\\\\"! !\\\\n\\\\n\\\\n\\\\n!Object methodsFor: '*omnibrowser-converting' stamp: 'cwp 4/17/2006 12:16'!\\\\nasAnnouncement\\\\n\\\\t^ self! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nObject class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!Object class methodsFor: 'class initialization' stamp: 'ar 2/11/2001 02:00'!\\\\nflushDependents\\\\n\\\\tDependentsFields keysAndValuesDo:[:key :dep|\\\\n\\\\t\\\\tkey ifNotNil:[key removeDependent: nil].\\\\n\\\\t].\\\\n\\\\tDependentsFields finalizeValues.! !\\\\n\\\\n!Object class methodsFor: 'class initialization' stamp: 'rw 2/10/2002 13:09'!\\\\nflushEvents\\\\n\\\\t\\\\\\\"Object flushEvents\\\\\\\"\\\\n\\\\n\\\\tEventManager flushEvents. ! !\\\\n\\\\n!Object class methodsFor: 'class initialization' stamp: 'rww 10/2/2001 07:35'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Object initialize\\\\\\\"\\\\n\\\\tDependentsFields ifNil:[self initializeDependentsFields].! !\\\\n\\\\n!Object class methodsFor: 'class initialization' stamp: 'ar 2/11/2001 01:41'!\\\\ninitializeDependentsFields\\\\n\\\\t\\\\\\\"Object initialize\\\\\\\"\\\\n\\\\tDependentsFields _ WeakIdentityKeyDictionary new.\\\\n! !\\\\n\\\\n!Object class methodsFor: 'class initialization' stamp: 'ar 2/11/2001 01:45'!\\\\nreInitializeDependentsFields\\\\n\\\\t\\\\\\\"Object reInitializeDependentsFields\\\\\\\"\\\\n\\\\t| oldFields |\\\\n\\\\toldFields _ DependentsFields.\\\\n\\\\tDependentsFields _ WeakIdentityKeyDictionary new.\\\\n\\\\toldFields keysAndValuesDo:[:obj :deps|\\\\n\\\\t\\\\tdeps do:[:d| obj addDependent: d]].\\\\n! !\\\\n\\\\n\\\\n!Object class methodsFor: 'documentation'!\\\\nhowToModifyPrimitives\\\\n\\\\t\\\\\\\"You are allowed to write methods which specify primitives, but please use \\\\n\\\\tcaution.  If you make a subclass of a class which contains a primitive method, \\\\n\\\\tthe subclass inherits the primitive.  The message which is implemented \\\\n\\\\tprimitively may be overridden in the subclass (E.g., see at:put: in String's \\\\n\\\\tsubclass Symbol).  The primitive behavior can be invoked using super (see \\\\n\\\\tSymbol string:). \\\\n\\\\t \\\\n\\\\tA class which attempts to mimic the behavior of another class without being \\\\n\\\\tits subclass may or may not be able to use the primitives of the original class.  \\\\n\\\\tIn general, if the instance variables read or written by a primitive have the \\\\n\\\\tsame meanings and are in the same fields in both classes, the primitive will \\\\n\\\\twork.  \\\\n\\\\n\\\\tFor certain frequently used 'special selectors', the compiler emits a \\\\n\\\\tsend-special-selector bytecode instead of a send-message bytecode.  \\\\n\\\\tSpecial selectors were created because they offer two advantages.  Code \\\\n\\\\twhich sends special selectors compiles into fewer bytes than normal.  For \\\\n\\\\tsome pairs of receiver classes and special selectors, the interpreter jumps \\\\n\\\\tdirectly to a primitive routine without looking up the method in the class.  \\\\n\\\\tThis is much faster than a normal message lookup. \\\\n\\\\t \\\\n\\\\tA selector which is a special selector solely in order to save space has a \\\\n\\\\tnormal behavior.  Methods whose selectors are special in order to \\\\n\\\\tgain speed contain the comment, 'No Lookup'.  When the interpreter \\\\n\\\\tencounters a send-special-selector bytecode, it checks the class of the \\\\n\\\\treceiver and the selector.  If the class-selector pair is a no-lookup pair, \\\\n\\\\tthen the interpreter swiftly jumps to the routine which implements the \\\\n\\\\tcorresponding primitive.  (A special selector whose receiver is not of the \\\\n\\\\tright class to make a no-lookup pair, is looked up normally).  The pairs are \\\\n\\\\tlisted below.  No-lookup methods contain a primitive number specification, \\\\n\\\\t<primitive: xx>, which is redundant.  Since the method is not normally looked \\\\n\\\\tup, deleting the primitive number specification cannot prevent this \\\\n\\\\tprimitive from running.  If a no-lookup primitive fails, the method is looked \\\\n\\\\tup normally, and the expressions in it are executed. \\\\n\\\\t \\\\n\\\\tNo Lookup pairs of (class, selector) \\\\n\\\\t \\\\n\\\\tSmallInteger with any of\\\\t\\\\t+ - * /  \\\\\\\\\\\\\\\\  bitOr: bitShift: bitAnd:  // \\\\n\\\\tSmallInteger with any of\\\\t\\\\t=  ~=  >  <  >=  <= \\\\n\\\\tAny class with\\\\t\\\\t\\\\t\\\\t\\\\t== \\\\n\\\\tAny class with \\\\t\\\\t\\\\t\\\\t\\\\t@ \\\\n\\\\tPoint with either of\\\\t\\\\t\\\\t\\\\tx y \\\\n\\\\tContextPart with\\\\t\\\\t\\\\t\\\\t\\\\tblockCopy: \\\\n\\\\tBlockContext with either of \\\\t\\\\tvalue value:\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\tself error: 'comment only'! !\\\\n\\\\n!Object class methodsFor: 'documentation'!\\\\nwhatIsAPrimitive\\\\n\\\\t\\\\\\\"Some messages in the system are responded to primitively. A primitive   \\\\n\\\\tresponse is performed directly by the interpreter rather than by evaluating   \\\\n\\\\texpressions in a method. The methods for these messages indicate the   \\\\n\\\\tpresence of a primitive response by including <primitive: xx> before the   \\\\n\\\\tfirst expression in the method.   \\\\n\\\\t  \\\\n\\\\tPrimitives exist for several reasons. Certain basic or 'primitive' \\\\n\\\\toperations cannot be performed in any other way. Smalltalk without \\\\n\\\\tprimitives can move values from one variable to another, but cannot add two \\\\n\\\\tSmallIntegers together. Many methods for arithmetic and comparison \\\\n\\\\tbetween numbers are primitives. Some primitives allow Smalltalk to \\\\n\\\\tcommunicate with I/O devices such as the disk, the display, and the keyboard. \\\\n\\\\tSome primitives exist only to make the system run faster; each does the same \\\\n\\\\tthing as a certain Smalltalk method, and its implementation as a primitive is \\\\n\\\\toptional.  \\\\n\\\\t  \\\\n\\\\tWhen the Smalltalk interpreter begins to execute a method which specifies a \\\\n\\\\tprimitive response, it tries to perform the primitive action and to return a \\\\n\\\\tresult. If the routine in the interpreter for this primitive is successful, \\\\n\\\\tit will return a value and the expressions in the method will not be evaluated. \\\\n\\\\tIf the primitive routine is not successful, the primitive 'fails', and the \\\\n\\\\tSmalltalk expressions in the method are executed instead. These \\\\n\\\\texpressions are evaluated as though the primitive routine had not been \\\\n\\\\tcalled.  \\\\n\\\\t  \\\\n\\\\tThe Smalltalk code that is evaluated when a primitive fails usually \\\\n\\\\tanticipates why that primitive might fail. If the primitive is optional, the \\\\n\\\\texpressions in the method do exactly what the primitive would have done (See \\\\n\\\\tNumber @). If the primitive only works on certain classes of arguments, the \\\\n\\\\tSmalltalk code tries to coerce the argument or appeals to a superclass to find \\\\n\\\\ta more general way of doing the operation (see SmallInteger +). If the \\\\n\\\\tprimitive is never supposed to fail, the expressions signal an error (see \\\\n\\\\tSmallInteger asFloat).  \\\\n\\\\t  \\\\n\\\\tEach method that specifies a primitive has a comment in it. If the primitive is \\\\n\\\\toptional, the comment will say 'Optional'. An optional primitive that is not \\\\n\\\\timplemented always fails, and the Smalltalk expressions do the work \\\\n\\\\tinstead.  \\\\n\\\\t \\\\n\\\\tIf a primitive is not optional, the comment will say, 'Essential'. Some \\\\n\\\\tmethods will have the comment, 'No Lookup'. See Object \\\\n\\\\thowToModifyPrimitives for an explanation of special selectors which are \\\\n\\\\tnot looked up.  \\\\n\\\\t  \\\\n\\\\tFor the primitives for +, -, *, and bitShift: in SmallInteger, and truncated \\\\n\\\\tin Float, the primitive constructs and returns a 16-bit \\\\n\\\\tLargePositiveInteger when the result warrants it. Returning 16-bit \\\\n\\\\tLargePositiveIntegers from these primitives instead of failing is \\\\n\\\\toptional in the same sense that the LargePositiveInteger arithmetic \\\\n\\\\tprimitives are optional. The comments in the SmallInteger primitives say, \\\\n\\\\t'Fails if result is not a SmallInteger', even though the implementor has the \\\\n\\\\toption to construct a LargePositiveInteger. For further information on \\\\n\\\\tprimitives, see the 'Primitive Methods' part of the chapter on the formal \\\\n\\\\tspecification of the interpreter in the Smalltalk book.\\\\\\\"\\\\n\\\\n\\\\tself error: 'comment only'! !\\\\n\\\\n\\\\n!Object class methodsFor: 'file list services' stamp: 'nk 6/12/2004 11:41'!\\\\nfileReaderServicesForDirectory: aFileDirectory\\\\n\\\\t\\\\\\\"Backstop\\\\\\\"\\\\n\\\\t^#()! !\\\\n\\\\n!Object class methodsFor: 'file list services' stamp: 'nk 6/12/2004 11:30'!\\\\nfileReaderServicesForFile: fullName suffix: suffix\\\\n\\\\t\\\\\\\"Backstop\\\\\\\"\\\\n\\\\t^#()! !\\\\n\\\\n!Object class methodsFor: 'file list services' stamp: 'md 2/15/2006 17:20'!\\\\nservices\\\\n\\\\t\\\\\\\"Backstop\\\\\\\"\\\\n\\\\t^#()! !\\\\n\\\\n\\\\n!Object class methodsFor: 'instance creation' stamp: 'sw 1/23/2003 09:45'!\\\\ncategoryForUniclasses\\\\n\\\\n\\\\t\\\\\\\"Answer the default system category into which to place unique-class instances\\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\t^ 'UserObjects'! !\\\\n\\\\n!Object class methodsFor: 'instance creation' stamp: 'sw 7/28/97 15:56'!\\\\nchooseUniqueClassName\\\\n\\\\t| i className |\\\\n\\\\ti _ 1.\\\\n\\\\t[className _ (self name , i printString) asSymbol.\\\\n\\\\t Smalltalk includesKey: className]\\\\n\\\\t\\\\twhileTrue: [i _ i + 1].\\\\n\\\\t^ className! !\\\\n\\\\n!Object class methodsFor: 'instance creation' stamp: 'tk 8/22/1998 08:22'!\\\\ninitialInstance\\\\n\\\\t\\\\\\\"Answer the first instance of the receiver, generate an error if there is one already\\\\\\\"\\\\n\\\\t\\\\\\\"self instanceCount > 0 ifTrue: [self error: 'instance(s) already exist.'].\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"Debugging test that is very slow\\\\\\\"\\\\n\\\\t^ self new! !\\\\n\\\\n!Object class methodsFor: 'instance creation' stamp: 'sw 5/5/2000 09:30'!\\\\ninitializedInstance\\\\n\\\\t^ self new! !\\\\n\\\\n!Object class methodsFor: 'instance creation' stamp: 'sw 10/16/2000 10:58'!\\\\ninstanceOfUniqueClass\\\\n\\\\t\\\\\\\"Answer an instance of a unique subclass of the receiver\\\\\\\"\\\\n\\\\n\\\\t^ self instanceOfUniqueClassWithInstVarString: '' andClassInstVarString: ''! !\\\\n\\\\n!Object class methodsFor: 'instance creation' stamp: 'tk 8/22/1998 08:27'!\\\\ninstanceOfUniqueClassWithInstVarString: instVarString andClassInstVarString: classInstVarString\\\\n\\\\t\\\\\\\"Create a unique class for the receiver, and answer an instance of it\\\\\\\"\\\\n\\\\n\\\\t^ (self newUniqueClassInstVars: instVarString \\\\n\\\\t\\\\tclassInstVars: classInstVarString) initialInstance! !\\\\n\\\\n!Object class methodsFor: 'instance creation' stamp: 'sw 10/23/1999 22:51'!\\\\nisUniClass\\\\n\\\\t^ false! !\\\\n\\\\n!Object class methodsFor: 'instance creation' stamp: 'ajh 5/23/2002 00:35'!\\\\nnewFrom: aSimilarObject\\\\n\\\\t\\\\\\\"Create an object that has similar contents to aSimilarObject.\\\\n\\\\tIf the classes have any instance varaibles with the same names, copy them across.\\\\n\\\\tIf this is bad for a class, override this method.\\\\\\\"\\\\n\\\\n\\\\t^ (self isVariable\\\\n\\\\t\\\\tifTrue: [self basicNew: aSimilarObject basicSize]\\\\n\\\\t\\\\tifFalse: [self basicNew]\\\\n\\\\t  ) copySameFrom: aSimilarObject! !\\\\n\\\\n!Object class methodsFor: 'instance creation' stamp: 'tk 6/29/1998 12:11'!\\\\nnewUniqueClassInstVars: instVarString classInstVars: classInstVarString\\\\n\\\\t\\\\\\\"Create a unique class for the receiver\\\\\\\"\\\\n\\\\n\\\\t| aName aClass |\\\\n\\\\tself isSystemDefined ifFalse:\\\\n\\\\t\\\\t[^ superclass newUniqueClassInstVars: instVarString classInstVars: classInstVarString].\\\\n\\\\taName _ self chooseUniqueClassName.\\\\n\\\\taClass _ self subclass: aName instanceVariableNames: instVarString \\\\n\\\\t\\\\tclassVariableNames: '' poolDictionaries: '' category: self categoryForUniclasses.\\\\n\\\\tclassInstVarString size > 0 ifTrue:\\\\n\\\\t\\\\t[aClass class instanceVariableNames: classInstVarString].\\\\n\\\\t^ aClass! !\\\\n\\\\n!Object class methodsFor: 'instance creation' stamp: 'sw 7/28/97 15:56'!\\\\nnewUserInstance\\\\n\\\\t\\\\\\\"Answer an instance of an appropriate class to serve as a user object in the containment hierarchy\\\\\\\"\\\\n\\\\n\\\\t^ self instanceOfUniqueClass! !\\\\n\\\\n!Object class methodsFor: 'instance creation' stamp: 'nk 8/30/2004 07:57'!\\\\nreadCarefullyFrom: textStringOrStream\\\\n\\\\t\\\\\\\"Create an object based on the contents of textStringOrStream.  Return an error instead of putting up a SyntaxError window.\\\\\\\"\\\\n\\\\n\\\\t| object |\\\\n\\\\t(Compiler couldEvaluate: textStringOrStream)\\\\n\\\\t\\\\tifFalse: [^ self error: 'expected String, Stream, or Text'].\\\\n\\\\tobject _ Compiler evaluate: textStringOrStream for: nil \\\\n\\\\t\\\\t\\\\t\\\\tnotifying: #error: \\\\\\\"signal we want errors\\\\\\\" logged: false.\\\\n\\\\t(object isKindOf: self) ifFalse: [self error: self name, ' expected'].\\\\n\\\\t^object! !\\\\n\\\\n!Object class methodsFor: 'instance creation' stamp: 'nk 8/30/2004 07:57'!\\\\nreadFrom: textStringOrStream\\\\n\\\\t\\\\\\\"Create an object based on the contents of textStringOrStream.\\\\\\\"\\\\n\\\\n\\\\t| object |\\\\n\\\\t(Compiler couldEvaluate: textStringOrStream)\\\\n\\\\t\\\\tifFalse: [^ self error: 'expected String, Stream, or Text'].\\\\n\\\\tobject _ Compiler evaluate: textStringOrStream.\\\\n\\\\t(object isKindOf: self) ifFalse: [self error: self name, ' expected'].\\\\n\\\\t^object! !\\\\n\\\\n\\\\n!Object class methodsFor: 'objects from disk' stamp: 'tk 1/8/97'!\\\\ncreateFrom: aSmartRefStream size: varsOnDisk version: instVarList\\\\n\\\\t\\\\\\\"Create an instance of me so objects on the disk can be read in.  Tricky part is computing the size if variable.  Inst vars will be filled in later.  \\\\\\\"\\\\n\\\\n\\\\t^ self isVariable\\\\n\\\\t\\\\tifFalse: [self basicNew]\\\\n\\\\t\\\\tifTrue: [\\\\\\\"instVarList is names of old class's inst vars plus a version number\\\\\\\" \\\\n\\\\t\\\\t\\\\t\\\\tself basicNew: (varsOnDisk - (instVarList size - 1))]\\\\n! !\\\\n\\\\n\\\\n!Object class methodsFor: 'window color' stamp: 'nk 6/10/2004 08:10'!\\\\nwindowColorSpecification\\\\n\\\\t\\\\\\\"Answer a WindowColorSpec object that declares my preference.\\\\n\\\\tThis is a backstop for classes that don't otherwise define a preference.\\\\\\\"\\\\n\\\\n\\\\t^ WindowColorSpec classSymbol: self name\\\\n\\\\t\\\\twording: 'Default' brightColor: #white\\\\n\\\\t\\\\tpastelColor: #white\\\\n\\\\t\\\\thelpMessage: 'Other windows without color preferences.'! !\\\\n\\\\n\\\\n!Object class methodsFor: 'private' stamp: 'mir 8/22/2001 15:20'!\\\\nreleaseExternalSettings\\\\n\\\\t\\\\\\\"Do nothing as a default\\\\\\\"! !\\\\nAbstractHierarchicalList subclass: #ObjectExplorer\\\\n\\\\tinstanceVariableNames: 'rootObject inspector monitorList'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Tools-Explorer'!\\\\n!ObjectExplorer commentStamp: '<historical>' prior: 0!\\\\nObjectExplorer provides a hierarchical alternative to #inspect. Simply evaluate an expression like:\\\\n\\\\nWorld explore\\\\n\\\\nand enjoy.!\\\\n]style[(101 13 12)f1,f3cblue;,f1!\\\\n\\\\n\\\\n!ObjectExplorer methodsFor: 'accessing' stamp: 'RAA 9/23/1999 13:11'!\\\\ncontentsSelection\\\\n\\\\t\\\\\\\"Return the interval of text in the code pane to select when I set the pane's contents\\\\\\\"\\\\n\\\\n\\\\t^ 1 to: 0  \\\\\\\"null selection\\\\\\\"! !\\\\n\\\\n!ObjectExplorer methodsFor: 'accessing' stamp: 'RAA 9/23/1999 13:15'!\\\\ndoItContext\\\\n\\\\t\\\\\\\"Answer the context in which a text selection can be evaluated.\\\\\\\"\\\\n\\\\n\\\\t^nil! !\\\\n\\\\n!ObjectExplorer methodsFor: 'accessing' stamp: 'RAA 9/23/1999 13:19'!\\\\ndoItReceiver\\\\n\\\\t\\\\\\\"Answer the object that should be informed of the result of evaluating a\\\\n\\\\ttext selection.\\\\\\\"\\\\n\\\\n\\\\tcurrentSelection ifNil: [^rootObject].\\\\n\\\\t^currentSelection withoutListWrapper\\\\n! !\\\\n\\\\n!ObjectExplorer methodsFor: 'accessing' stamp: 'sd 11/20/2005 21:27'!\\\\nexplorerFor: anObject\\\\n\\\\t| window listMorph |\\\\n\\\\trootObject := anObject.\\\\n\\\\twindow := (SystemWindow labelled: self label) model: self.\\\\n\\\\twindow addMorph: (listMorph := SimpleHierarchicalListMorph \\\\n\\\\t\\\\t\\\\ton: self\\\\n\\\\t\\\\t\\\\tlist: #getList\\\\n\\\\t\\\\t\\\\tselected: #getCurrentSelection\\\\n\\\\t\\\\t\\\\tchangeSelected: #noteNewSelection:\\\\n\\\\t\\\\t\\\\tmenu: #genericMenu:\\\\n\\\\t\\\\t\\\\tkeystroke: #explorerKey:from:)\\\\n\\\\t\\\\tframe: (0@0 corner: 1@0.8).\\\\n\\\\twindow addMorph: ((PluggableTextMorph on: self text: #trash accept: #trash:\\\\n\\\\t\\\\t\\\\t\\\\treadSelection: #contentsSelection menu: #codePaneMenu:shifted:)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\taskBeforeDiscardingEdits: false)\\\\n\\\\t\\\\tframe: (0@0.8 corner: 1@1).\\\\n\\\\tlistMorph\\\\n\\\\t\\\\tautoDeselect: false.\\\\n     ^ window! !\\\\n\\\\n!ObjectExplorer methodsFor: 'accessing' stamp: 'nk 7/24/2003 09:16'!\\\\ngetList\\\\n\\\\n\\\\t^Array with: (ObjectExplorerWrapper with: rootObject name: 'root' model: self parent: nil)\\\\n! !\\\\n\\\\n!ObjectExplorer methodsFor: 'accessing' stamp: 'hg 9/7/2001 12:12'!\\\\nlabel\\\\n\\\\n\\\\t^ rootObject printStringLimitedTo: 32! !\\\\n\\\\n!ObjectExplorer methodsFor: 'accessing' stamp: 'nk 7/24/2003 09:43'!\\\\nobject\\\\n\\\\t^currentSelection ifNotNilDo: [ :cs | cs withoutListWrapper ]! !\\\\n\\\\n!ObjectExplorer methodsFor: 'accessing' stamp: 'nk 7/24/2003 10:02'!\\\\nparentObject\\\\n\\\\tcurrentSelection ifNil: [ ^nil ].\\\\n\\\\tcurrentSelection parent ifNil: [ ^rootObject ].\\\\n\\\\t^currentSelection parent withoutListWrapper! !\\\\n\\\\n!ObjectExplorer methodsFor: 'accessing' stamp: 'nk 7/24/2003 09:47'!\\\\nselector\\\\n\\\\t^currentSelection ifNotNilDo: [ :cs | cs selector ]! !\\\\n\\\\n\\\\n!ObjectExplorer methodsFor: 'error handling' stamp: 'nk 7/24/2003 09:29'!\\\\ndoesNotUnderstand: aMessage\\\\n\\\\tinspector ifNotNil: [ (inspector respondsTo: aMessage selector) ifTrue: [ ^inspector perform: aMessage selector withArguments: aMessage arguments ]].\\\\n\\\\t^super doesNotUnderstand: aMessage! !\\\\n\\\\n\\\\n!ObjectExplorer methodsFor: 'menus' stamp: 'sd 11/20/2005 21:27'!\\\\nchasePointers\\\\n\\\\t\\\\\\\"Open a PointerFinder on the selected item\\\\\\\"\\\\n\\\\t| path sel savedRoot saved |\\\\n\\\\tpath := OrderedCollection new.\\\\n\\\\tsel := currentSelection.\\\\n\\\\t[ sel isNil ] whileFalse: [ path addFirst: sel asString. sel := sel parent ].\\\\n\\\\tpath addFirst: #openPath.\\\\n\\\\tpath := path asArray.\\\\n\\\\tsavedRoot := rootObject.\\\\n\\\\tsaved := self object.\\\\n\\\\t[ rootObject := nil.\\\\n\\\\tself changed: #getList.\\\\n\\\\t(Smalltalk includesKey: #PointerFinder)\\\\n\\\\t\\\\tifTrue: [PointerFinder on: saved]\\\\n\\\\t\\\\tifFalse: [self objectReferencesToSelection ]]\\\\n\\\\t\\\\tensure: [ rootObject := savedRoot.\\\\n\\\\t\\\\t\\\\tself changed: #getList.\\\\n\\\\t\\\\t\\\\tself changed: path.\\\\n\\\\t\\\\t]! !\\\\n\\\\n!ObjectExplorer methodsFor: 'menus' stamp: 'RAA 9/23/1999 13:22'!\\\\ncodePaneMenu: aMenu shifted: shifted\\\\n\\\\t\\\\\\\"Note that unless we override perform:orSendTo:, PluggableTextController will respond to all menu items\\\\\\\"\\\\n\\\\t^ StringHolder basicNew codePaneMenu: aMenu shifted: shifted\\\\n! !\\\\n\\\\n!ObjectExplorer methodsFor: 'menus' stamp: 'sd 11/20/2005 21:27'!\\\\ndefsOfSelection\\\\n\\\\t\\\\\\\"Open a browser on all defining references to the selected instance variable, if that's what's currently selected.\\\\\\\"\\\\n\\\\t| aClass sel |\\\\n\\\\n\\\\t(aClass := self parentObject class) isVariable ifTrue: [^ self changed: #flash].\\\\n\\\\tsel := self selector.\\\\n\\\\tself systemNavigation  browseAllStoresInto: sel from: aClass! !\\\\n\\\\n!ObjectExplorer methodsFor: 'menus' stamp: 'sd 11/20/2005 21:27'!\\\\nexplorerKey: aChar from: view\\\\n\\\\n\\\\t\\\\\\\"Similar to #genericMenu:...\\\\\\\"\\\\n\\\\t| insideObject parentObject |\\\\n\\\\tcurrentSelection ifNotNil: [\\\\n\\\\t\\\\tinsideObject := self object.\\\\n\\\\t\\\\tparentObject := self parentObject.\\\\n\\\\t\\\\tinspector ifNil: [inspector := Inspector new].\\\\n\\\\t\\\\tinspector\\\\n\\\\t\\\\t\\\\tinspect: parentObject;\\\\n\\\\t\\\\t\\\\tobject: insideObject.\\\\n\\\\n\\\\t\\\\taChar == $i ifTrue: [^ self inspectSelection].\\\\n\\\\t\\\\taChar == $I ifTrue: [^ self exploreSelection].\\\\n\\\\n\\\\t\\\\taChar == $b ifTrue:\\\\t[^ inspector browseMethodFull].\\\\n\\\\t\\\\taChar == $h ifTrue:\\\\t[^ inspector classHierarchy].\\\\n\\\\t\\\\taChar == $c ifTrue: [^ inspector copyName].\\\\n\\\\t\\\\taChar == $p ifTrue: [^ inspector browseFullProtocol].\\\\n\\\\t\\\\taChar == $N ifTrue: [^ inspector browseClassRefs].\\\\n\\\\t\\\\taChar == $t ifTrue: [^ inspector tearOffTile].\\\\n\\\\t\\\\taChar == $v ifTrue: [^ inspector viewerForValue]].\\\\n\\\\n\\\\t^ self arrowKey: aChar from: view! !\\\\n\\\\n!ObjectExplorer methodsFor: 'menus' stamp: 'nk 7/24/2003 10:26'!\\\\nexploreSelection\\\\n\\\\t\\\\\\\"Open an ObjectExplorer on the current selection\\\\\\\"\\\\n\\\\tself object explore! !\\\\n\\\\n!ObjectExplorer methodsFor: 'menus' stamp: 'sd 11/20/2005 21:27'!\\\\ngenericMenu: aMenu \\\\n\\\\t\\\\\\\"Borrow a menu from my inspector\\\\\\\"\\\\n\\\\t| insideObject menu parentObject |\\\\n\\\\tcurrentSelection\\\\n\\\\t\\\\tifNil: [menu := aMenu.\\\\n\\\\t\\\\t\\\\tmenu\\\\n\\\\t\\\\t\\\\t\\\\tadd: '*nothing selected*'\\\\n\\\\t\\\\t\\\\t\\\\ttarget: self\\\\n\\\\t\\\\t\\\\t\\\\tselector: #yourself]\\\\n\\\\t\\\\tifNotNil: [insideObject := self object.\\\\n\\\\t\\\\t\\\\tparentObject := self parentObject.\\\\n\\\\t\\\\t\\\\tinspector\\\\n\\\\t\\\\t\\\\t\\\\tifNil: [inspector := Inspector new].\\\\n\\\\t\\\\t\\\\tinspector inspect: parentObject;\\\\n\\\\t\\\\t\\\\t\\\\t object: insideObject.\\\\n\\\\t\\\\t\\\\taMenu defaultTarget: inspector.\\\\n\\\\t\\\\t\\\\tinspector fieldListMenu: aMenu.\\\\n\\\\t\\\\t\\\\taMenu items\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:i | (#(#inspectSelection #exploreSelection #referencesToSelection #defsOfSelection #objectReferencesToSelection #chasePointers ) includes: i selector)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [i target: self]].\\\\n\\\\t\\\\t\\\\taMenu addLine;\\\\n\\\\t\\\\t\\\\t\\\\tadd: 'monitor changes'\\\\n\\\\t\\\\t\\\\t\\\\ttarget: self\\\\n\\\\t\\\\t\\\\t\\\\tselector: #monitor:\\\\n\\\\t\\\\t\\\\t\\\\targument: currentSelection].\\\\n\\\\tmonitorList isEmptyOrNil\\\\n\\\\t\\\\tifFalse: [aMenu addLine;\\\\n\\\\t\\\\t\\\\t\\\\tadd: 'stop monitoring all'\\\\n\\\\t\\\\t\\\\t\\\\ttarget: self\\\\n\\\\t\\\\t\\\\t\\\\tselector: #stopMonitoring].\\\\n\\\\t^ aMenu! !\\\\n\\\\n!ObjectExplorer methodsFor: 'menus' stamp: 'nk 7/24/2003 10:26'!\\\\ninspectSelection\\\\n\\\\t\\\\\\\"Open an Inspector on the current selection\\\\\\\"\\\\n\\\\tself object inspect! !\\\\n\\\\n!ObjectExplorer methodsFor: 'menus' stamp: 'nk 7/24/2003 10:00'!\\\\nobjectReferencesToSelection\\\\n\\\\t\\\\\\\"Open a browser on all references to the selected instance variable, if that's what currently selected. \\\\\\\"\\\\n\\\\tself systemNavigation\\\\n\\\\t\\\\tbrowseAllObjectReferencesTo: self object\\\\n\\\\t\\\\texcept: (Array with: self parentObject with: currentSelection with: inspector)\\\\n\\\\t\\\\tifNone: [:obj | self changed: #flash].\\\\n! !\\\\n\\\\n!ObjectExplorer methodsFor: 'menus' stamp: 'sd 11/20/2005 21:27'!\\\\nreferencesToSelection\\\\n\\\\t\\\\\\\"Open a browser on all references to the selected instance variable, if that's what's currently selected.\\\\\\\"\\\\n\\\\t| aClass sel |\\\\n\\\\n\\\\t(aClass := self parentObject class) isVariable ifTrue: [^ self changed: #flash].\\\\n\\\\tsel := self selector.\\\\n\\\\tself systemNavigation browseAllAccessesTo: sel from: aClass! !\\\\n\\\\n!ObjectExplorer methodsFor: 'menus' stamp: 'RAA 9/23/1999 13:19'!\\\\nselectedClass\\\\n\\\\t\\\\\\\"Answer the class of the receiver's current selection\\\\\\\"\\\\n\\\\n\\\\t^self doItReceiver class\\\\n! !\\\\n\\\\n!ObjectExplorer methodsFor: 'menus' stamp: 'RAA 9/23/1999 13:10'!\\\\ntrash\\\\n\\\\t\\\\\\\"What goes in the bottom pane\\\\\\\"\\\\n\\\\t^ ''! !\\\\n\\\\n!ObjectExplorer methodsFor: 'menus' stamp: 'RAA 9/23/1999 13:10'!\\\\ntrash: newText\\\\n\\\\t\\\\\\\"Don't save it\\\\\\\"\\\\n\\\\t^ true! !\\\\n\\\\n\\\\n!ObjectExplorer methodsFor: 'monitoring' stamp: 'sd 11/20/2005 21:27'!\\\\nmonitorList\\\\n\\\\t^monitorList ifNil: [ monitorList := WeakIdentityKeyDictionary new ].! !\\\\n\\\\n!ObjectExplorer methodsFor: 'monitoring' stamp: 'nk 7/31/2004 15:02'!\\\\nmonitor: anObjectExplorerWrapper\\\\n\\\\t\\\\\\\"Start stepping and watching the given wrapper for changes.\\\\\\\"\\\\n\\\\tanObjectExplorerWrapper ifNil: [ ^self ].\\\\n\\\\tself world ifNil: [ ^self ].\\\\n\\\\tself monitorList at: anObjectExplorerWrapper put: anObjectExplorerWrapper asString.\\\\n\\\\tself world startStepping: self at: Time millisecondClockValue selector: #step arguments: #() stepTime: 200.! !\\\\n\\\\n!ObjectExplorer methodsFor: 'monitoring' stamp: 'nk 7/31/2004 15:01'!\\\\nrelease\\\\n\\\\tself world ifNotNil: [ self world stopStepping: self selector: #step ].\\\\n\\\\tsuper release.! !\\\\n\\\\n!ObjectExplorer methodsFor: 'monitoring' stamp: 'nk 7/12/2003 17:55'!\\\\nshouldGetStepsFrom: aWorld\\\\n\\\\t^self monitorList notEmpty! !\\\\n\\\\n!ObjectExplorer methodsFor: 'monitoring' stamp: 'sd 11/20/2005 21:27'!\\\\nstep\\\\n\\\\t\\\\\\\"If there's anything in my monitor list, see if the strings have changed.\\\\\\\"\\\\n\\\\t| string changes |\\\\n\\\\tchanges := false.\\\\n\\\\tself monitorList keysAndValuesDo: [ :k :v |\\\\n\\\\t\\\\tk ifNotNil: [\\\\n\\\\t\\\\t\\\\tk refresh.\\\\n\\\\t\\\\t\\\\t(string := k asString) ~= v ifTrue: [ self monitorList at: k put: string. changes := true ].\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\tchanges ifTrue: [ | sel |\\\\n\\\\t\\\\tsel := currentSelection.\\\\n\\\\t\\\\tself changed: #getList.\\\\n\\\\t\\\\tself noteNewSelection: sel.\\\\n\\\\t].\\\\n\\\\tself monitorList isEmpty ifTrue: [ ActiveWorld stopStepping: self selector: #step ].! !\\\\n\\\\n!ObjectExplorer methodsFor: 'monitoring' stamp: 'sd 11/20/2005 21:27'!\\\\nstopMonitoring\\\\n\\\\tmonitorList := nil.\\\\n\\\\tself world stopStepping: self selector: #step! !\\\\n\\\\n!ObjectExplorer methodsFor: 'monitoring' stamp: 'nk 7/31/2004 15:01'!\\\\nworld\\\\n\\\\t^ActiveWorld! !\\\\n\\\\n\\\\n!ObjectExplorer methodsFor: 'user interface' stamp: 'stephaneducasse 9/17/2005 21:50'!\\\\nexplorerFor: anObject withLabel: label \\\\n\\\\t| window listMorph |\\\\n\\\\trootObject := anObject.\\\\n\\\\twindow := (SystemWindow labelled: label) \\\\n\\\\t\\\\t\\\\t\\\\tmodel: self.\\\\n\\\\twindow\\\\n\\\\t\\\\taddMorph: (listMorph := SimpleHierarchicalListMorph\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ton: self\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tlist: #getList\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tselected: #getCurrentSelection\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tchangeSelected: #noteNewSelection:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmenu: #genericMenu:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tkeystroke: nil)\\\\n\\\\t\\\\tframe: (0 @ 0 corner: 1 @ 0.8).\\\\n\\\\twindow\\\\n\\\\t\\\\taddMorph: ((PluggableTextMorph\\\\n\\\\t\\\\t\\\\t\\\\ton: self\\\\n\\\\t\\\\t\\\\t\\\\ttext: #trash\\\\n\\\\t\\\\t\\\\t\\\\taccept: #trash:\\\\n\\\\t\\\\t\\\\t\\\\treadSelection: #contentsSelection\\\\n\\\\t\\\\t\\\\t\\\\tmenu: #codePaneMenu:shifted:)\\\\n\\\\t\\\\t\\\\t\\\\taskBeforeDiscardingEdits: false)\\\\n\\\\t\\\\tframe: (0 @ 0.8 corner: 1 @ 1).\\\\n\\\\tlistMorph autoDeselect: false.\\\\n\\\\t^ window! !\\\\n\\\\n!ObjectExplorer methodsFor: 'user interface' stamp: 'RAA 6/2/2000 16:23'!\\\\ninitialExtent\\\\n\\\\n\\\\t^300@500! !\\\\n\\\\n!ObjectExplorer methodsFor: 'user interface' stamp: 'ar 9/27/2005 20:31'!\\\\nopenBrowser: aClass\\\\n\\\\n\\\\tToolSet browse: aClass selector: nil! !\\\\n\\\\n!ObjectExplorer methodsFor: 'user interface' stamp: 'RAA 6/2/2000 16:24'!\\\\nopenExplorerFor: anObject\\\\n\\\\\\\"\\\\nObjectExplorer new openExplorerFor: Smalltalk\\\\n\\\\\\\"\\\\n\\\\n    (self explorerFor: anObject) openInWorld.\\\\n    ^ self\\\\n! !\\\\n\\\\n!ObjectExplorer methodsFor: 'user interface' stamp: 'stephaneducasse 9/17/2005 21:51'!\\\\nopenExplorerFor: anObject withLabel: label \\\\n     \\\\\\\"ObjectExplorer new openExplorerFor: Smalltalk withLabel: 'Smalltalk'\\\\\\\"\\\\n\\\\n\\\\t(self explorerFor: anObject withLabel: label)\\\\nopenInWorld! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nObjectExplorer class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!ObjectExplorer class methodsFor: 'as yet unclassified' stamp: 'RAA 6/21/1999 15:55'!\\\\nabout\\\\n\\\\n\\\\tStringHolder new textContents: self comment; openLabel: 'about ',self asString! !\\\\nListItemWrapper subclass: #ObjectExplorerWrapper\\\\n\\\\tinstanceVariableNames: 'itemName parent'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Explorer'!\\\\n!ObjectExplorerWrapper commentStamp: '<historical>' prior: 0!\\\\nContributed by Bob Arning as part of the ObjectExplorer package.\\\\n!\\\\n\\\\n\\\\n!ObjectExplorerWrapper methodsFor: 'as yet unclassified' stamp: 'RAA 6/21/1999 15:48'!\\\\ncanBeDragged\\\\n\\\\n\\\\t^false! !\\\\n\\\\n!ObjectExplorerWrapper methodsFor: 'as yet unclassified' stamp: 'nk 7/24/2003 09:14'!\\\\nparent\\\\n\\\\t^parent! !\\\\n\\\\n!ObjectExplorerWrapper methodsFor: 'as yet unclassified' stamp: 'nk 7/24/2003 09:14'!\\\\nparent: anObject\\\\n\\\\tparent _ anObject! !\\\\n\\\\n!ObjectExplorerWrapper methodsFor: 'as yet unclassified' stamp: 'nk 7/24/2003 09:49'!\\\\nselector\\\\n\\\\tparent ifNil: [ ^nil ].\\\\n\\\\t^(parent withoutListWrapper class allInstVarNames includes: itemName) ifTrue: [ itemName asSymbol ]! !\\\\n\\\\n!ObjectExplorerWrapper methodsFor: 'as yet unclassified' stamp: 'RAA 6/21/1999 10:49'!\\\\nsetItem: anObject name: aString model: aModel\\\\n\\\\n\\\\titem _ anObject.\\\\n\\\\tmodel _ aModel.\\\\n\\\\titemName _ aString.! !\\\\n\\\\n!ObjectExplorerWrapper methodsFor: 'as yet unclassified' stamp: 'nk 7/24/2003 09:14'!\\\\nsetItem: anObject name: aString model: aModel parent: itemParent\\\\n\\\\tparent _ itemParent.\\\\n\\\\tself setItem: anObject name: aString model: aModel! !\\\\n\\\\n\\\\n!ObjectExplorerWrapper methodsFor: 'converting' stamp: 'edt 5/26/2003 12:36'!\\\\nasString\\\\n\\\\t| explorerString string |\\\\n\\\\texplorerString _ \\\\n\\\\t\\\\t[item asExplorerString]\\\\n\\\\t\\\\t\\\\ton: Error \\\\n\\\\t\\\\t\\\\tdo: ['<error: ', item class name, ' in asExplorerString: evaluate \\\\\\\"' , itemName , ' asExplorerString\\\\\\\" to debug>'].\\\\n\\\\tstring _ (itemName ifNotNil: [itemName , ': '] ifNil: ['']) , explorerString.\\\\n\\\\t(string includes: Character cr)\\\\n\\\\t\\\\tifTrue: [^ string withSeparatorsCompacted].\\\\n\\\\t^ string! !\\\\n\\\\n!ObjectExplorerWrapper methodsFor: 'converting' stamp: 'nk 7/24/2003 10:16'!\\\\nitemName\\\\n\\\\t^itemName! !\\\\n\\\\n\\\\n!ObjectExplorerWrapper methodsFor: 'monitoring' stamp: 'nk 7/12/2003 18:28'!\\\\nrefresh\\\\n\\\\t\\\\\\\"hack to refresh item given an object and a string that is either an index or an instance variable name.\\\\\\\"\\\\n\\\\t[ | index |\\\\n\\\\t\\\\t(model class allInstVarNames includes: itemName)\\\\n\\\\t\\\\t\\\\tifTrue: [ item _ model instVarNamed: itemName ]\\\\n\\\\t\\\\t\\\\tifFalse: [ index _ itemName asNumber.\\\\n\\\\t\\\\t\\\\t\\\\t(index between: 1 and: model basicSize) ifTrue: [ item _ model basicAt: index]]\\\\n\\\\t] on: Error do: [ :ex | item _ nil ]! !\\\\n\\\\n\\\\n!ObjectExplorerWrapper methodsFor: 'accessing' stamp: 'nk 7/24/2003 09:17'!\\\\ncontents\\\\n\\\\n\\\\t(item respondsTo: #explorerContents) ifTrue: [^item explorerContents].\\\\n\\\\t\\\\\\\"For all others, show named vars first, then indexed vars\\\\\\\"\\\\n\\\\t^(item class allInstVarNames asOrderedCollection withIndexCollect: [:each :index |\\\\n\\\\t\\\\tself class\\\\n\\\\t\\\\t\\\\twith: (item instVarAt: index)\\\\n\\\\t\\\\t\\\\tname: each\\\\n\\\\t\\\\t\\\\tmodel: item\\\\n\\\\t\\\\t\\\\tparent: self]) ,\\\\n\\\\t((1 to: item basicSize) collect: [:index |\\\\n\\\\t\\\\tself class\\\\n\\\\t\\\\t\\\\twith: (item basicAt: index)\\\\n\\\\t\\\\t\\\\tname: index printString\\\\n\\\\t\\\\t\\\\tmodel: item\\\\n\\\\t\\\\t\\\\tparent: self])! !\\\\n\\\\n!ObjectExplorerWrapper methodsFor: 'accessing' stamp: 'RAA 6/21/1999 11:27'!\\\\nhasContents\\\\n\\\\n\\\\t^item hasContentsInExplorer\\\\n\\\\t\\\\n! !\\\\n\\\\n!ObjectExplorerWrapper methodsFor: 'accessing' stamp: 'dgd 9/26/2004 18:34'!\\\\nicon\\\\n\\\\t\\\\\\\"Answer a form to be used as icon\\\\\\\"\\\\n\\\\t^ Preferences visualExplorer\\\\n\\\\t\\\\tifTrue: [item iconOrThumbnailOfSize: 16]\\\\n\\\\t\\\\tifFalse: [nil]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nObjectExplorerWrapper class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!ObjectExplorerWrapper class methodsFor: 'as yet unclassified' stamp: 'RAA 6/21/1999 10:50'!\\\\nwith: anObject name: aString model: aModel\\\\n\\\\n\\\\t^self new \\\\n\\\\t\\\\tsetItem: anObject name: aString model: aModel! !\\\\n\\\\n!ObjectExplorerWrapper class methodsFor: 'as yet unclassified' stamp: 'nk 7/24/2003 09:16'!\\\\nwith: anObject name: aString model: aModel parent: aParent\\\\n\\\\n\\\\t^self new \\\\n\\\\t\\\\tsetItem: anObject name: aString model: aModel parent: aParent\\\\n! !\\\\nObject subclass: #ObjectFinalizer\\\\n\\\\tinstanceVariableNames: 'receiver selector arguments'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Finalization'!\\\\n\\\\n!ObjectFinalizer methodsFor: 'finalization' stamp: 'ar 5/19/2003 20:13'!\\\\nfinalize\\\\n\\\\t\\\\\\\"Finalize the resource associated with the receiver. This message should only be sent during the finalization process. There is NO garantuee that the resource associated with the receiver hasn't been free'd before so take care that you don't run into trouble - this all may happen with interrupt priority.\\\\\\\"\\\\n\\\\t[receiver perform: selector withArguments: arguments] \\\\n\\\\t\\\\ton: Error do:[:ex| ex return].\\\\n! !\\\\n\\\\n\\\\n!ObjectFinalizer methodsFor: 'initialize' stamp: 'ar 5/19/2003 20:12'!\\\\nreceiver: aReceiver selector: aSelector argument: anObject\\\\n\\\\treceiver := aReceiver.\\\\n\\\\tselector := aSelector.\\\\n\\\\targuments := Array with: anObject! !\\\\nTestCase subclass: #ObjectFinalizerTests\\\\n\\\\tinstanceVariableNames: 'log'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Finalization'!\\\\n\\\\n!ObjectFinalizerTests methodsFor: 'finalization handling' stamp: 'apb 9/14/2005 08:33'!\\\\nfinalize: anObject\\\\n\\\\tlog addLast: anObject asString, ' ', 'finalized'.! !\\\\n\\\\n\\\\n!ObjectFinalizerTests methodsFor: 'running' stamp: 'apb 9/14/2005 08:39'!\\\\nsetUp\\\\n\\\\tsuper setUp.\\\\n\\\\tlog := OrderedCollection new.! !\\\\n\\\\n\\\\n!ObjectFinalizerTests methodsFor: 'tests' stamp: 'stephaneducasse 10/28/2005 21:15'!\\\\ntestFinalization\\\\n\\\\t\\\\\\\"self run: #testFinalization\\\\\\\"\\\\n\\\\t\\\\n\\\\t| repetitions |\\\\n\\\\trepetitions := 100.\\\\n\\\\t1 to: repetitions\\\\n\\\\t\\\\tdo: [:i | \\\\n\\\\t\\\\t\\\\tlog addLast: 'o' , i asString , ' created'.\\\\n\\\\t\\\\t\\\\tObject new\\\\n\\\\t\\\\t\\\\t\\\\ttoFinalizeSend: #finalize:\\\\n\\\\t\\\\t\\\\t\\\\tto: self\\\\n\\\\t\\\\t\\\\t\\\\twith: 'o' , i asString].\\\\n\\\\tSmalltalk garbageCollect.\\\\n\\\\tself finalizationRegistry finalizeValues.\\\\n\\\\t1 to: repetitions\\\\n\\\\t\\\\tdo: [:i | \\\\n\\\\t\\\\t\\\\tself assert: (log includes: 'o' , i asString , ' created').\\\\n\\\\t\\\\t\\\\tself assert: (log includes: 'o' , i asString , ' finalized')]! !\\\\n\\\\n!ObjectFinalizerTests methodsFor: 'tests' stamp: 'stephaneducasse 10/28/2005 21:15'!\\\\ntestFinalizationOfEquals\\\\n\\\\t\\\\\\\"self run: #testFinalizationOfEquals\\\\\\\"\\\\n\\\\t\\\\n\\\\t| bag o |\\\\n\\\\tbag := IdentityBag new.\\\\n\\\\t1 to: 5 do: [:n | o := n asString copy. bag add: n. o toFinalizeSend: #remove: to: bag with: n].\\\\n\\\\t1 to: 5 do: [:n | o := n asString copy. bag add: n. o toFinalizeSend: #remove: to: bag with: n].\\\\n\\\\tSmalltalk garbageCollect.\\\\n\\\\t1 to: 5 do: [:n | self deny: (bag includes: n)]\\\\n! !\\\\nProtoObject subclass: #ObjectOut\\\\n\\\\tinstanceVariableNames: 'url page recursionFlag'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Kernel-Objects'!\\\\n!ObjectOut commentStamp: '<historical>' prior: 0!\\\\nI am a stand-in for an object that is out on the disk.  The object that is out on the disk is the head of a tree of objects that are out.  See SqueakPage.\\\\n\\\\nWhen any message is sent to me, I don't understand it, and bring in my true object.  I become myself with the objects and resend the message.  \\\\n\\\\nI may not represent the object nil.  \\\\nThe file is represented as a url, and that url may point at any file on the net.  \\\\n\\\\npage is a SqueakPage.\\\\nIf the cache already has an object, widely in use, that claims to be the object for my url, what do I do?  I can't become him, since others believe that he is the true object.  Run through memory and replace refs to me with refs to him.  Be careful not to trigger a fault.  Become me to a string, then find pointers and replace?\\\\n\\\\n[[[They don't want to end up holding an ObjectOut.  (would oscillate back and forth)  This is a problem.  A user could bring in two trees that both refer to a 3rd url.  (check with cache before installing any new ObjectOut) Two trees could be written to the same url.\\\\nOr, I remain an ObjectOut, and keep getting notUnderstood, and keep returning the other guy.\\\\nOr I smash the cache, and install MY page and object.  Other guy is a copy -- still in, but with no place in the cache.  When we both write to the same url, there will be trouble.]  No -- search and replace.]]]\\\\n!\\\\n\\\\n\\\\n!ObjectOut methodsFor: 'access' stamp: 'tk 1/15/1999 11:43'!\\\\nurl: aString\\\\n\\\\n\\\\turl _ aString! !\\\\n\\\\n!ObjectOut methodsFor: 'access' stamp: 'tk 12/18/1998 21:29'!\\\\nxxxReset\\\\n\\\\t\\\\\\\"mark as never brought in\\\\\\\"\\\\n\\\\trecursionFlag _ nil! !\\\\n\\\\n\\\\n!ObjectOut methodsFor: 'basics' stamp: 'tk 10/30/1998 15:11'!\\\\nisInMemory\\\\n\\\\t\\\\\\\"We are a place holder for an object that is out.\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n!ObjectOut methodsFor: 'basics' stamp: 'tk 10/21/1998 12:28'!\\\\nxxxClass\\\\n\\\\t\\\\\\\"Primitive. Answer the object which is the receiver's class. Essential. See \\\\n\\\\tObject documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 111>\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!ObjectOut methodsFor: 'basics' stamp: 'tk 10/22/1998 15:31'!\\\\nxxxClone\\\\n\\\\n\\\\t<primitive: 148>\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!ObjectOut methodsFor: 'basics' stamp: 'tk 10/22/1998 15:19'!\\\\nxxxInstVarAt: index \\\\n\\\\t\\\\\\\"Primitive. Answer a fixed variable in an object. The numbering of the \\\\n\\\\tvariables corresponds to the named instance variables. Fail if the index \\\\n\\\\tis not an Integer or is not the index of a fixed variable. Essential. See \\\\n\\\\tObject documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 73>\\\\n\\\\tself primitiveFailed ! !\\\\n\\\\n!ObjectOut methodsFor: 'basics' stamp: 'tk 10/22/1998 14:39'!\\\\nxxxInstVarAt: anInteger put: anObject \\\\n\\\\t\\\\\\\"Primitive. Store a value into a fixed variable in the receiver. The \\\\n\\\\tnumbering of the variables corresponds to the named instance variables. \\\\n\\\\tFail if the index is not an Integer or is not the index of a fixed variable. \\\\n\\\\tAnswer the value stored as the result. Using this message violates the \\\\n\\\\tprinciple that each object has sovereign control over the storing of \\\\n\\\\tvalues into its instance variables. Essential. See Object documentation \\\\n\\\\twhatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 74>\\\\n\\\\tself primitiveFailed ! !\\\\n\\\\n\\\\n!ObjectOut methodsFor: 'fetch from disk' stamp: 'rbb 2/18/2005 14:55'!\\\\ndoesNotUnderstand: aMessage \\\\n\\\\t\\\\\\\"Bring in the object, install, then resend aMessage\\\\\\\"\\\\n\\\\t| realObject oldFlag response |\\\\n\\\\toldFlag _ recursionFlag.\\\\n\\\\trecursionFlag _ true.\\\\n\\\\t\\\\\\\"fetch the object\\\\\\\"\\\\n\\\\trealObject _ self xxxFetch.\\\\t\\\\t\\\\\\\"watch out for the become!!\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\\\\"Now we ARE the realObject\\\\\\\"\\\\n\\\\toldFlag == true ifTrue: [\\\\n\\\\t\\\\tresponse _ (UIManager default chooseFrom: #('proceed normally' 'debug')\\\\n\\\\t\\\\t\\\\ttitle: 'Object being fetched for a second time.\\\\nShould not happen, and needs to be fixed later.').\\\\n\\\\t\\\\tresponse = 2 ifTrue: [self halt]].\\\\t\\\\\\\"We are already the new object\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Can't be a super message, since this is the first message sent to this object\\\\\\\"\\\\n\\\\t^ realObject perform: aMessage selector withArguments: aMessage arguments! !\\\\n\\\\n!ObjectOut methodsFor: 'fetch from disk' stamp: 'tk 11/16/1998 09:57'!\\\\nxxxFetch\\\\n\\\\t\\\\\\\"Bring in my object and replace all references to me with references to him.  First try looking up my url in the pageCache.  Then try the page (and install it, under its url).  Then start from scratch with the url.\\\\\\\"\\\\n\\\\n\\\\t| truePage object existing |\\\\n\\\\texisting _ SqueakPageCache pageCache at: url ifAbsent: [nil].\\\\n\\\\texisting ifNotNil: [existing isContentsInMemory\\\\n\\\\t\\\\tifTrue: [page _ truePage _ existing]].\\\\t\\\\\\\"This url already has an object in this image\\\\\\\"\\\\n\\\\ttruePage ifNil: [\\\\n\\\\t\\\\ttruePage _ SqueakPageCache atURL: url oldPage: page].\\\\n\\\\tobject _ truePage isContentsInMemory \\\\n\\\\t\\\\tifTrue: [truePage contentsMorph]\\\\n\\\\t\\\\tifFalse: [truePage fetchInformIfError].\\\\t\\\\\\\"contents, not the page\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\\\\"Later, collect pointers to object and fix them up.  Not scan memory\\\\\\\"\\\\n\\\\tobject ifNil: [^ 'Object could not be fetched.'].\\\\n\\\\t\\\\\\\"recursionFlag _ false.\\\\\\\"  \\\\t\\\\\\\"while I still have a pointer to myself\\\\\\\"\\\\n\\\\ttruePage contentsMorph: object.\\\\n\\\\tpage _ truePage.\\\\n\\\\tself xxxFixup.\\\\n\\\\t^ object\\\\t\\\\\\\"the final object!!\\\\\\\"\\\\n ! !\\\\n\\\\n!ObjectOut methodsFor: 'fetch from disk' stamp: 'ar 9/27/2005 18:03'!\\\\nxxxFixup\\\\n\\\\t\\\\\\\"There is already an object in memory for my url.  All pointers to me need to be pointers to him.  Can't use become, because other pointers to him must stay valid.\\\\\\\"\\\\n\\\\n\\\\t| real temp list |\\\\n\\\\treal := page contentsMorph.\\\\n\\\\treal == self ifTrue: [page error: 'should be converted by now'].\\\\n\\\\ttemp := self.\\\\n\\\\tlist := (Utilities pointersTo: temp) asOrderedCollection.\\\\n\\\\tlist add: thisContext.  list add: thisContext sender.\\\\n\\\\tlist do: [:holder |\\\\n\\\\t\\\\t1 to: holder class instSize do:\\\\n\\\\t\\\\t\\\\t[:i | (holder instVarAt: i) == temp ifTrue: [holder instVarAt: i put: real]].\\\\n\\\\t\\\\t1 to: holder basicSize do:\\\\n\\\\t\\\\t\\\\t[:i | (holder basicAt: i) == temp ifTrue: [holder basicAt: i put: real]].\\\\n\\\\t\\\\t].\\\\n\\\\t^ real! !\\\\n\\\\n!ObjectOut methodsFor: 'fetch from disk' stamp: 'tk 10/21/1998 13:01'!\\\\nxxxSetUrl: aString page: aSqkPage\\\\n\\\\n\\\\turl _ aString.\\\\n\\\\tpage _ aSqkPage.! !\\\\n\\\\n\\\\n!ObjectOut methodsFor: 'object storage' stamp: 'tk 2/17/2000 22:21'!\\\\ncomeFullyUpOnReload: smartRefStream\\\\n\\\\t\\\\\\\"Normally this read-in object is exactly what we want to store.  Try to dock first.  If it is here already, use that one.\\\\\\\"\\\\n\\\\n\\\\t| sp |\\\\n\\\\t\\\\\\\"Transcript show: 'has ref to: ', url; cr.\\\\\\\"\\\\n\\\\t(sp _ SqueakPageCache pageCache at: page ifAbsent: [nil]) ifNotNil: [\\\\n\\\\t\\\\tsp isContentsInMemory ifTrue: [^ sp contentsMorph]].\\\\n\\\\t^ self! !\\\\n\\\\n!ObjectOut methodsFor: 'object storage' stamp: 'tk 2/24/1999 11:14'!\\\\nobjectForDataStream: refStrm\\\\n    \\\\\\\"Return an object to store on a data stream (externalize myself).\\\\\\\"\\\\n\\\\n    ^ self! !\\\\n\\\\n!ObjectOut methodsFor: 'object storage' stamp: 'tk 10/22/1998 14:37'!\\\\nreadDataFrom: aDataStream size: varsOnDisk\\\\n\\\\t\\\\\\\"Make self be an object based on the contents of aDataStream, which was generated by the object's storeDataOn: method. Return self.\\\\\\\"\\\\n\\\\t| cntInstVars |\\\\n\\\\tcntInstVars _ self xxxClass instSize.\\\\n\\\\tself xxxClass isVariable\\\\n\\\\t\\\\tifTrue: [self xxxClass error: 'needs updating']\\\\t\\\\\\\"assume no variable subclasses\\\\\\\"\\\\n\\\\t\\\\tifFalse: [cntInstVars _ varsOnDisk].\\\\n\\\\n\\\\taDataStream beginReference: self.\\\\n\\\\t1 to: cntInstVars do:\\\\n\\\\t\\\\t[:i | self xxxInstVarAt: i put: aDataStream next].\\\\n\\\\\\\"\\\\t1 to: cntIndexedVars do:\\\\n\\\\t\\\\t[:i | self basicAt: i put: aDataStream next].\\\\n\\\\\\\"\\\\n\\\\t^ self! !\\\\n\\\\n!ObjectOut methodsFor: 'object storage' stamp: 'tk 10/22/1998 15:18'!\\\\nstoreDataOn: aDataStream\\\\n\\\\t\\\\\\\"Store myself on a DataStream. See also objectToStoreOnDataStream.\\\\n\\\\tmust send 'aDataStream beginInstance:size:'\\\\\\\"\\\\n\\\\t| cntInstVars |\\\\n\\\\n\\\\tcntInstVars _ self class instSize.\\\\n\\\\t\\\\\\\"cntIndexedVars _ self basicSize.\\\\\\\"\\\\n\\\\taDataStream\\\\n\\\\t\\\\tbeginInstance: self xxxClass\\\\n\\\\t\\\\tsize: cntInstVars \\\\\\\"+ cntIndexedVars\\\\\\\".\\\\n\\\\t1 to: cntInstVars do:\\\\n\\\\t\\\\t[:i | aDataStream nextPut: (self xxxInstVarAt: i)].\\\\n\\\\\\\"\\\\t1 to: cntIndexedVars do:\\\\n\\\\t\\\\t[:i | aDataStream nextPut: (self basicAt: i)]\\\\n\\\\\\\"! !\\\\n\\\\n!ObjectOut methodsFor: 'object storage' stamp: 'tk 10/22/1998 15:29'!\\\\nveryDeepCopyWith: deepCopier\\\\n\\\\t\\\\\\\"Copy me and the entire tree of objects I point to.  An object in the tree twice is copied once, and both references point to him.  deepCopier holds a dictionary of objects we have seen.  Some classes refuse to be copied.  Some classes are picky about which fields get deep copied.\\\\\\\"\\\\n\\\\t| class index sub subAss new absent |\\\\n\\\\tnew _ deepCopier references at: self ifAbsent: [absent _ true].\\\\n\\\\tabsent ifNil: [^ new].\\\\t\\\\\\\"already done\\\\\\\"\\\\n\\\\tclass _ self xxxClass.\\\\n\\\\tclass isMeta ifTrue: [^ self].\\\\t\\\\t\\\\\\\"a class\\\\\\\"\\\\n\\\\tnew _ self xxxClone.\\\\n\\\\t\\\\\\\"not a uniClass\\\\\\\"\\\\n\\\\tdeepCopier references at: self put: new.\\\\t\\\\\\\"remember\\\\\\\"\\\\n\\\\t\\\\\\\"class is not variable\\\\\\\"\\\\n\\\\tindex _ class instSize.\\\\n\\\\t[index > 0] whileTrue: \\\\n\\\\t\\\\t[sub _ self xxxInstVarAt: index.\\\\n\\\\t\\\\t(subAss _ deepCopier references associationAt: sub ifAbsent: [nil])\\\\n\\\\t\\\\t\\\\tifNil: [new xxxInstVarAt: index put: (sub veryDeepCopyWith: deepCopier)]\\\\n\\\\t\\\\t\\\\tifNotNil: [new xxxInstVarAt: index put: subAss value].\\\\n\\\\t\\\\tindex _ index - 1].\\\\n\\\\tnew rehash.\\\\t\\\\\\\"force Sets and Dictionaries to rehash\\\\\\\"\\\\n\\\\t^ new\\\\n! !\\\\n\\\\n\\\\n!ObjectOut methodsFor: '*MorphicExtras-access' stamp: 'tk 12/4/1998 13:01'!\\\\nsqkPage\\\\n\\\\t^ page! !\\\\n\\\\n!ObjectOut methodsFor: '*MorphicExtras-access' stamp: 'tk 12/4/1998 13:01'!\\\\nurl\\\\n\\\\t^ url! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nObjectOut class\\\\n\\\\tinstanceVariableNames: ''!\\\\nGenericPropertiesMorph subclass: #ObjectPropertiesMorph\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'EToys-Experimental'!\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 3/8/2001 18:04'!\\\\nadjustTargetBorderWidth: aFractionalPoint\\\\n\\\\n\\\\t| n |\\\\n\\\\n\\\\tmyTarget borderWidth: (n _ (aFractionalPoint x * 10) rounded max: 0).\\\\n\\\\tself showSliderFeedback: n.! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 3/8/2001 18:02'!\\\\nadjustTargetGradientDirection: aFractionalPoint\\\\n\\\\n\\\\t| fs p |\\\\n\\\\n\\\\t(fs _ myTarget fillStyle) isGradientFill ifFalse: [^self].\\\\n\\\\tfs direction: (p _ (aFractionalPoint * myTarget extent) rounded).\\\\n\\\\tself showSliderFeedback: p.\\\\n\\\\tmyTarget changed.\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 3/8/2001 18:05'!\\\\nadjustTargetGradientOrigin: aFractionalPoint\\\\n\\\\n\\\\t| fs p |\\\\n\\\\n\\\\t(fs _ myTarget fillStyle) isGradientFill ifFalse: [^self].\\\\n\\\\tfs origin: (p _ myTarget topLeft + (aFractionalPoint * myTarget extent) rounded).\\\\n\\\\tself showSliderFeedback: p.\\\\n\\\\tmyTarget changed.\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 3/8/2001 18:03'!\\\\nadjustTargetShadowOffset: aFractionalPoint\\\\n\\\\n\\\\t| n |\\\\n\\\\n\\\\tmyTarget changed; layoutChanged.\\\\n\\\\tmyTarget shadowOffset: (n _ (aFractionalPoint * 4) rounded).\\\\n\\\\tself showSliderFeedback: n.\\\\n\\\\tmyTarget changed; layoutChanged.\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 3/8/2001 18:03'!\\\\ndoEnables\\\\n\\\\n\\\\t| itsName fs |\\\\n\\\\n\\\\tfs _ myTarget fillStyle.\\\\n\\\\tself allMorphsDo: [ :each |\\\\n\\\\t\\\\titsName _ each knownName.\\\\n\\\\t\\\\titsName == #pickerForColor ifTrue: [\\\\n\\\\t\\\\t\\\\tself enable: each when: fs isSolidFill | fs isGradientFill\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\titsName == #pickerForBorderColor ifTrue: [\\\\n\\\\t\\\\t\\\\tself enable: each when: (myTarget respondsTo: #borderColor:)\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\titsName == #pickerForShadowColor ifTrue: [\\\\n\\\\t\\\\t\\\\tself enable: each when: myTarget hasDropShadow\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\titsName == #pickerFor2ndGradientColor ifTrue: [\\\\n\\\\t\\\\t\\\\tself enable: each when: fs isGradientFill\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 3/8/2001 18:03'!\\\\nmakeTargetGradientFill\\\\n\\\\n\\\\tmyTarget useGradientFill! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 3/8/2001 18:02'!\\\\nmakeTargetSolidFill\\\\n\\\\n\\\\tmyTarget useSolidFill! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 3/8/2001 18:04'!\\\\nnumberOneColor\\\\n\\\\n\\\\tmyTarget fillStyle isGradientFill ifFalse: [^myTarget color].\\\\n\\\\t^myTarget fillStyle colorRamp first value\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'gm 2/16/2003 20:36'!\\\\nnumberOneColor: aColor \\\\n\\\\tmyTarget fillStyle isGradientFill \\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[^(myTarget isSystemWindow) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [myTarget setWindowColor: aColor]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [myTarget fillStyle: aColor]].\\\\n\\\\tmyTarget fillStyle \\\\n\\\\t\\\\tfirstColor: aColor\\\\n\\\\t\\\\tforMorph: myTarget\\\\n\\\\t\\\\thand: nil! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'dgd 10/8/2003 19:35'!\\\\nrebuild\\\\n\\\\n\\\\tself removeAllMorphs.\\\\n\\\\tself addARow: {\\\\n\\\\t\\\\tself lockedString: ('Properties for {1}' translated format: {myTarget name}).\\\\n\\\\t}.\\\\n\\\\tself addARow: {\\\\n\\\\t\\\\tself inAColumn: {\\\\n\\\\t\\\\t\\\\tself paneForCornerRoundingToggle.\\\\n\\\\t\\\\t\\\\tself paneForStickinessToggle.\\\\n\\\\t\\\\t\\\\tself paneForLockedToggle.\\\\n\\\\t\\\\t}.\\\\n\\\\t}.\\\\n\\\\n\\\\tself addARow: {\\\\n\\\\t\\\\tself paneForMainColorPicker.\\\\n\\\\t\\\\tself paneFor2ndGradientColorPicker.\\\\n\\\\t}.\\\\n\\\\tself addARow: {\\\\n\\\\t\\\\tself paneForBorderColorPicker.\\\\n\\\\t\\\\tself paneForShadowColorPicker.\\\\n\\\\t}.\\\\n\\\\n\\\\tself addARow: {\\\\n\\\\t\\\\tself \\\\n\\\\t\\\\t\\\\tbuttonNamed: 'Accept' translated action: #doAccept color: color lighter \\\\n\\\\t\\\\t\\\\thelp: 'keep changes made and close panel' translated.\\\\n\\\\t\\\\tself \\\\n\\\\t\\\\t\\\\tbuttonNamed: 'Cancel' translated action: #doCancel color: color lighter \\\\n\\\\t\\\\t\\\\thelp: 'cancel changes made and close panel' translated.\\\\n\\\\t}, self rebuildOptionalButtons.\\\\n\\\\n\\\\tthingsToRevert _ Dictionary new.\\\\n\\\\t\\\\\\\"thingsToRevert at: #fillStyle: put: myTarget fillStyle.\\\\\\\"\\\\n\\\\tmyTarget isSystemWindow ifTrue: [\\\\n\\\\t\\\\tthingsToRevert at: #setWindowColor: put: myTarget paneColorToUse\\\\n\\\\t].\\\\n\\\\tthingsToRevert at: #hasDropShadow: put: myTarget hasDropShadow.\\\\n\\\\tthingsToRevert at: #shadowColor: put: myTarget shadowColor.\\\\n\\\\t(myTarget respondsTo: #borderColor:) ifTrue: [\\\\n\\\\t\\\\tthingsToRevert at: #borderColor: put: myTarget borderColor.\\\\n\\\\t].\\\\n\\\\n\\\\tthingsToRevert at: #borderWidth: put: myTarget borderWidth.\\\\n\\\\tthingsToRevert at: #cornerStyle: put: myTarget cornerStyle.\\\\n\\\\tthingsToRevert at: #sticky: put: myTarget isSticky.\\\\n\\\\tthingsToRevert at: #lock: put: myTarget isLocked.\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'wiz 9/21/2005 22:42'!\\\\nrebuildOptionalButtons\\\\n\\\\n\\\\t| answer |\\\\n\\\\n\\\\tanswer _ #() .\\\\n\\\\t\\\\n\\\\tmyTarget isTextMorph ifTrue: [\\\\n\\\\t\\\\tanswer _ answer, {\\\\n\\\\t\\\\t\\\\tself \\\\n\\\\t\\\\t\\\\t\\\\tbuttonNamed: 'Text' translated action: #doTextProperties color: color lighter \\\\n\\\\t\\\\t\\\\t\\\\thelp: 'open a text properties panel for the morph' translated.\\\\n\\\\t\\\\t}.\\\\n\\\\t].\\\\n\\\\t^answer! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'ar 8/25/2001 18:30'!\\\\ntargetBorderColor\\\\n\\\\t^myTarget borderStyle baseColor! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'ar 11/26/2001 15:29'!\\\\ntargetBorderColor: aColor\\\\n\\\\t\\\\\\\"Need to replace the borderStyle or BorderedMorph will not 'feel' the change\\\\\\\"\\\\n\\\\tmyTarget borderStyle: (myTarget borderStyle copy baseColor: aColor).! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 3/8/2001 18:04'!\\\\ntargetHasGradientFill\\\\n\\\\n\\\\t^myTarget fillStyle isGradientFill! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 3/8/2001 18:01'!\\\\ntargetHasSolidFill\\\\n\\\\n\\\\t^myTarget fillStyle isSolidFill! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 3/8/2001 18:03'!\\\\ntargetRadial\\\\n\\\\n\\\\tmyTarget fillStyle isGradientFill ifFalse: [^false].\\\\n\\\\t^myTarget fillStyle radial! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 3/8/2001 18:03'!\\\\ntgt2ndGradientColor\\\\n\\\\n\\\\tmyTarget fillStyle isGradientFill ifFalse: [^Color black].\\\\n\\\\t^myTarget fillStyle colorRamp last value! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 3/8/2001 18:03'!\\\\ntgt2ndGradientColor: aColor\\\\n\\\\n\\\\tmyTarget fillStyle lastColor: aColor forMorph: myTarget hand: nil\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 2/20/2001 17:45'!\\\\ntoggleTargetGradientFill\\\\n\\\\n\\\\tself targetHasGradientFill ifTrue: [\\\\n\\\\t\\\\tself makeTargetSolidFill\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tself makeTargetGradientFill\\\\n\\\\t].\\\\n\\\\tself doEnables! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 3/8/2001 18:02'!\\\\ntoggleTargetRadial\\\\n\\\\n\\\\t| fs |\\\\n\\\\n\\\\t(fs _ myTarget fillStyle) isGradientFill ifFalse: [^self].\\\\n\\\\tfs radial: fs radial not.\\\\n\\\\tmyTarget changed.\\\\n\\\\tself doEnables.! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 2/20/2001 17:48'!\\\\ntoggleTargetSolidFill\\\\n\\\\n\\\\tself targetHasSolidFill ifTrue: [\\\\n\\\\t\\\\tself makeTargetGradientFill\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tself makeTargetSolidFill\\\\n\\\\t].\\\\n\\\\tself doEnables! !\\\\n\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'initialization' stamp: 'dgd 3/7/2003 14:44'!\\\\ndefaultBorderColor\\\\n\\\\\\\"answer the default border color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ self defaultColor darker! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'initialization' stamp: 'dgd 3/7/2003 14:44'!\\\\ndefaultColor\\\\n\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color\\\\n\\\\t\\\\tr: 0.548\\\\n\\\\t\\\\tg: 0.839\\\\n\\\\t\\\\tb: 0.452! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'initialization' stamp: 'dgd 3/7/2003 14:44'!\\\\ninitialize\\\\n\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\\\\"\\\\\\\"\\\\n\\\\tmyTarget\\\\n\\\\t\\\\tifNil: [myTarget _ RectangleMorph new openInWorld].\\\\n\\\\tself rebuild! !\\\\n\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'sd 11/13/2003 21:03'!\\\\nborderPrototype: aBorderStyle help: helpString\\\\n\\\\t| selector proto |\\\\n\\\\tselector _ BorderedMorph new.\\\\n\\\\tselector borderWidth: 0.\\\\n\\\\tselector color: Color transparent.\\\\n\\\\tproto _ Morph new extent: 16@16.\\\\n\\\\tproto color:  Color transparent.\\\\n\\\\tproto borderStyle: aBorderStyle.\\\\n\\\\tselector extent: proto extent + 4.\\\\n\\\\tselector addMorphCentered: proto.\\\\n\\\\t(myTarget canDrawBorder: aBorderStyle) ifTrue:[\\\\n\\\\t\\\\tselector setBalloonText: helpString.\\\\n\\\\t\\\\tselector on: #mouseDown send: #toggleBorderStyle:with:from: to: self withValue: proto.\\\\n\\\\t\\\\t(myTarget borderStyle species == aBorderStyle species and:[\\\\n\\\\t\\\\t\\\\tmyTarget borderStyle style == aBorderStyle style]) ifTrue:[selector borderWidth: 1].\\\\n\\\\t] ifFalse:[\\\\n\\\\t\\\\tselector setBalloonText: 'This border style cannot be used here' translated.\\\\n\\\\t\\\\tselector on: #mouseDown send: #beep to: Beeper.\\\\n\\\\t\\\\tselector addMorphCentered: ((Morph new) color: (Color black alpha: 0.5); extent: selector extent).\\\\n\\\\t].\\\\n\\\\t^selector! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'dgd 8/31/2003 21:21'!\\\\npaneFor2ndGradientColorPicker\\\\n\\\\n\\\\t^self \\\\n\\\\t\\\\tinAColumn: {\\\\n\\\\t\\\\t\\\\t(self inAColumn: {\\\\n\\\\t\\\\t\\\\t\\\\tself colorPickerFor: self getter: #tgt2ndGradientColor setter: #tgt2ndGradientColor:.\\\\n\\\\t\\\\t\\\\t\\\\tself lockedString: '2nd gradient color' translated.\\\\n\\\\t\\\\t\\\\t\\\\tself paneForRadialGradientToggle hResizing: #shrinkWrap.\\\\n\\\\t\\\\t\\\\t\\\\t(\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself inARow: {self paneForGradientOrigin. self paneForGradientDirection}\\\\n\\\\t\\\\t\\\\t\\\\t) hResizing: #shrinkWrap.\\\\n\\\\t\\\\t\\\\t}\\\\n\\\\t\\\\t\\\\tnamed: #pickerFor2ndGradientColor) layoutInset: 0.\\\\n\\\\t\\\\t\\\\tself paneForGradientFillToggle hResizing: #shrinkWrap \\\\n\\\\t\\\\t}\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'dgd 8/31/2003 21:23'!\\\\npaneForBorderColorPicker\\\\n\\\\n\\\\t^self \\\\n\\\\t\\\\tinAColumn: {\\\\n\\\\t\\\\t\\\\tself \\\\n\\\\t\\\\t\\\\t\\\\tcolorPickerFor: self\\\\n\\\\t\\\\t\\\\t\\\\tgetter: #targetBorderColor\\\\n\\\\t\\\\t\\\\t\\\\tsetter: #targetBorderColor:.\\\\n\\\\t\\\\t\\\\tself lockedString: 'Border Color' translated.\\\\n\\\\t\\\\t\\\\t(self paneForBorderStyle) hResizing: #shrinkWrap; layoutInset: 5.\\\\n\\\\t\\\\t\\\\tself lockedString: 'Border style' translated.\\\\n\\\\t\\\\t\\\\tself paneForBorderWidth.\\\\n\\\\t\\\\t} \\\\n\\\\t\\\\tnamed: #pickerForBorderColor.\\\\n\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'dgd 8/31/2003 21:25'!\\\\npaneForBorderStyle\\\\n\\\\n\\\\t^self inARow: {\\\\n\\\\t\\\\tself borderPrototype: (BorderStyle width: 4 color: Color black)\\\\n\\\\t\\\\t\\\\thelp:'Click to select a simple colored border' translated.\\\\n\\\\t\\\\tself borderPrototype: (BorderStyle raised width: 4)\\\\n\\\\t\\\\t\\\\thelp:'Click to select a simple raised border' translated.\\\\n\\\\t\\\\tself borderPrototype: (BorderStyle inset width: 4)\\\\n\\\\t\\\\t\\\\thelp:'Click to select a simple inset border' translated.\\\\n\\\\t\\\\tself borderPrototype: (BorderStyle complexFramed width: 4)\\\\n\\\\t\\\\t\\\\thelp:'Click to select a complex framed border' translated.\\\\n\\\\t\\\\tself borderPrototype: (BorderStyle complexRaised width: 4)\\\\n\\\\t\\\\t\\\\thelp:'Click to select a complex raised border' translated.\\\\n\\\\t\\\\tself borderPrototype: (BorderStyle complexInset width: 4)\\\\n\\\\t\\\\t\\\\thelp:'Click to select a complex inset border' translated.\\\\n\\\\t\\\\tself borderPrototype: (BorderStyle complexAltFramed width: 4)\\\\n\\\\t\\\\t\\\\thelp:'Click to select a complex framed border' translated.\\\\n\\\\t\\\\tself borderPrototype: (BorderStyle complexAltRaised width: 4)\\\\n\\\\t\\\\t\\\\thelp:'Click to select a complex raised border' translated.\\\\n\\\\t\\\\tself borderPrototype: (BorderStyle complexAltInset width: 4)\\\\n\\\\t\\\\t\\\\thelp:'Click to select a complex inset border' translated.\\\\n\\\\t}\\\\n\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'dgd 8/31/2003 21:29'!\\\\npaneForBorderWidth\\\\n\\\\n\\\\t^(self inARow: {\\\\n\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\tbuildFakeSlider: 'Border width' translated\\\\n\\\\t\\\\t\\\\tselector: #adjustTargetBorderWidth:\\\\n\\\\t\\\\t\\\\thelp: 'Drag in here to change the border width' translated\\\\n\\\\t}) hResizing: #shrinkWrap\\\\n\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'dgd 8/31/2003 21:18'!\\\\npaneForCornerRoundingToggle\\\\n\\\\n\\\\t^self inARow: {\\\\n\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\tdirectToggleButtonFor: myTarget \\\\n\\\\t\\\\t\\\\tgetter: #wantsRoundedCorners setter: #toggleCornerRounding\\\\n\\\\t\\\\t\\\\thelp: 'Turn rounded corners on or off' translated.\\\\n\\\\t\\\\tself lockedString: ' Rounded corners' translated.\\\\n\\\\t}\\\\n\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'dgd 8/31/2003 21:40'!\\\\npaneForDropShadowToggle\\\\n\\\\n\\\\t^self inARow: {\\\\n\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\tdirectToggleButtonFor: myTarget \\\\n\\\\t\\\\t\\\\tgetter: #hasDropShadow setter: #toggleDropShadow\\\\n\\\\t\\\\t\\\\thelp: 'Turn drop shadows on or off' translated.\\\\n\\\\t\\\\tself lockedString: ' Drop shadow color' translated.\\\\n\\\\t}\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'dgd 8/31/2003 21:22'!\\\\npaneForGradientDirection\\\\n\\\\n\\\\t^(self inARow: {\\\\n\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\tbuildFakeSlider: 'Direction' translated\\\\n\\\\t\\\\t\\\\tselector: #adjustTargetGradientDirection:\\\\n\\\\t\\\\t\\\\thelp: 'Drag in here to change the direction of the gradient' translated\\\\n\\\\t}) hResizing: #shrinkWrap\\\\n\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'dgd 8/31/2003 21:22'!\\\\npaneForGradientFillToggle\\\\n\\\\n\\\\t^self inARow: {\\\\n\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\tdirectToggleButtonFor: self \\\\n\\\\t\\\\t\\\\tgetter: #targetHasGradientFill\\\\n\\\\t\\\\t\\\\tsetter: #toggleTargetGradientFill\\\\n\\\\t\\\\t\\\\thelp: 'Turn gradient fill on or off' translated.\\\\n\\\\t\\\\tself lockedString: ' Gradient fill' translated.\\\\n\\\\t}\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'dgd 8/31/2003 21:21'!\\\\npaneForGradientOrigin\\\\n\\\\n\\\\t^(self inARow: {\\\\n\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\tbuildFakeSlider: 'Origin' translated\\\\n\\\\t\\\\t\\\\tselector: #adjustTargetGradientOrigin:\\\\n\\\\t\\\\t\\\\thelp: 'Drag in here to change the origin of the gradient' translated\\\\n\\\\t}) hResizing: #shrinkWrap\\\\n\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'dgd 8/31/2003 21:19'!\\\\npaneForLockedToggle\\\\n\\\\n\\\\t^self inARow: {\\\\n\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\tdirectToggleButtonFor: myTarget \\\\n\\\\t\\\\t\\\\tgetter: #isLocked setter: #toggleLocked\\\\n\\\\t\\\\t\\\\thelp: 'Turn lock on or off' translated.\\\\n\\\\t\\\\tself lockedString: ' Lock' translated.\\\\n\\\\t}\\\\n\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'dgd 8/31/2003 21:20'!\\\\npaneForMainColorPicker\\\\n\\\\n\\\\t^self \\\\n\\\\t\\\\tinAColumn: {\\\\n\\\\t\\\\t\\\\tself \\\\n\\\\t\\\\t\\\\t\\\\tcolorPickerFor: self \\\\n\\\\t\\\\t\\\\t\\\\tgetter: #numberOneColor \\\\n\\\\t\\\\t\\\\t\\\\tsetter: #numberOneColor:.\\\\n\\\\t\\\\t\\\\tself lockedString: 'Color' translated.\\\\n\\\\t\\\\t\\\\t(self paneForSolidFillToggle)  hResizing: #shrinkWrap.\\\\n\\\\t\\\\t} \\\\n\\\\t\\\\tnamed: #pickerForColor.\\\\n\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'dgd 8/31/2003 21:21'!\\\\npaneForRadialGradientToggle\\\\n\\\\n\\\\t^self inARow: {\\\\n\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\tdirectToggleButtonFor: self \\\\n\\\\t\\\\t\\\\tgetter: #targetRadial setter: #toggleTargetRadial\\\\n\\\\t\\\\t\\\\thelp: 'Turn radial gradient on or off' translated.\\\\n\\\\t\\\\tself lockedString: ' Radial gradient' translated.\\\\n\\\\t}\\\\n\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'RAA 3/8/2001 18:03'!\\\\npaneForShadowColorPicker\\\\n\\\\n\\\\t^self \\\\n\\\\t\\\\tinAColumn: {\\\\n\\\\t\\\\t\\\\t(self inAColumn: {\\\\n\\\\t\\\\t\\\\t\\\\tself colorPickerFor: myTarget getter: #shadowColor setter: #shadowColor:.\\\\n\\\\t\\\\t\\\\t\\\\tself paneForShadowOffset.\\\\n\\\\t\\\\t\\\\t}\\\\n\\\\t\\\\t\\\\tnamed: #pickerForShadowColor) layoutInset: 0.\\\\n\\\\t\\\\t\\\\tself paneForDropShadowToggle hResizing: #shrinkWrap.\\\\n\\\\t\\\\t}\\\\n\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'dgd 8/31/2003 21:36'!\\\\npaneForShadowOffset\\\\n\\\\n\\\\t^(self inARow: {\\\\n\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\tbuildFakeSlider: 'Offset' translated\\\\n\\\\t\\\\t\\\\tselector: #adjustTargetShadowOffset:\\\\n\\\\t\\\\t\\\\thelp: 'Drag in here to change the offset of the shadow' translated\\\\n\\\\t}) hResizing: #shrinkWrap\\\\n\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'dgd 8/31/2003 21:20'!\\\\npaneForSolidFillToggle\\\\n\\\\n\\\\t^self inARow: {\\\\n\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\tdirectToggleButtonFor: self \\\\n\\\\t\\\\t\\\\tgetter: #targetHasSolidFill\\\\n\\\\t\\\\t\\\\tsetter: #toggleTargetSolidFill\\\\n\\\\t\\\\t\\\\thelp: 'Turn solid fill on or off' translated.\\\\n\\\\t\\\\tself lockedString: ' Solid fill' translated.\\\\n\\\\t}\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'dgd 8/31/2003 21:18'!\\\\npaneForStickinessToggle\\\\n\\\\n\\\\t^self inARow: {\\\\n\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\tdirectToggleButtonFor: myTarget \\\\n\\\\t\\\\t\\\\tgetter: #isSticky setter: #toggleStickiness\\\\n\\\\t\\\\t\\\\thelp: 'Turn stickiness on or off' translated.\\\\n\\\\t\\\\tself lockedString: ' Sticky' translated.\\\\n\\\\t}\\\\n\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'ar 8/25/2001 18:35'!\\\\ntoggleBorderStyle: provider with: arg1 from: arg2\\\\n\\\\t| oldStyle newStyle |\\\\n\\\\toldStyle _ myTarget borderStyle.\\\\n\\\\tnewStyle _ provider borderStyle copy.\\\\n\\\\toldStyle width = 0 \\\\n\\\\t\\\\tifTrue:[newStyle width: 2]\\\\n\\\\t\\\\tifFalse:[newStyle width: oldStyle width].\\\\n\\\\tnewStyle baseColor: oldStyle baseColor.\\\\n\\\\tmyTarget borderStyle: newStyle.\\\\n\\\\tprovider owner owner submorphsDo:[:m| m borderWidth: 0].\\\\n\\\\tprovider owner borderWidth: 1.! !\\\\nAlignmentMorph subclass: #ObjectRepresentativeMorph\\\\n\\\\tinstanceVariableNames: 'objectRepresented'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'EToys-Scripting'!\\\\n\\\\n!ObjectRepresentativeMorph methodsFor: 'as yet unclassified' stamp: 'ar 11/1/2000 15:55'!\\\\nobjectRepresented: anObject\\\\n\\\\t\\\\\\\"Set the receiver's representee.  This clears out any preexisting state in the receiver\\\\\\\"\\\\n\\\\n\\\\tobjectRepresented _ anObject.\\\\n\\\\tself removeAllMorphs.\\\\n\\\\tself hResizing: #shrinkWrap.  \\\\n\\\\tself vResizing: #shrinkWrap.\\\\n\\\\tself addMorphBack: (StringMorph new contents: anObject name asString).\\\\n\\\\tself setNameTo: anObject name\\\\n\\\\t! !\\\\n\\\\n!ObjectRepresentativeMorph methodsFor: 'as yet unclassified' stamp: 'ar 11/1/2000 15:55'!\\\\nobjectRepresented: anObject labelString: aLabel\\\\n\\\\t\\\\\\\"Set the receiver's representee as indicated, and use the given label to tag it\\\\\\\"\\\\n\\\\n\\\\tobjectRepresented _ anObject.\\\\n\\\\tself removeAllMorphs.\\\\n\\\\tself hResizing: #shrinkWrap.  \\\\n\\\\tself vResizing: #shrinkWrap.\\\\n\\\\tself addMorphBack: (StringMorph new contents: aLabel asString).\\\\n\\\\tself setNameTo: aLabel asString\\\\n\\\\t! !\\\\n\\\\n\\\\n!ObjectRepresentativeMorph methodsFor: 'macpal' stamp: 'sw 10/17/2000 11:42'!\\\\nobjectRepresented\\\\n\\\\t\\\\\\\"Answer the object represented by the receiver\\\\\\\"\\\\n\\\\n\\\\t^ objectRepresented! !\\\\n\\\\n\\\\n!ObjectRepresentativeMorph methodsFor: 'naming' stamp: 'sw 10/31/2000 09:22'!\\\\nnameOfObjectRepresented\\\\n\\\\t\\\\\\\"Answer the external name of the object represented\\\\\\\"\\\\n\\\\n\\\\t^ objectRepresented externalName! !\\\\n\\\\n\\\\n!ObjectRepresentativeMorph methodsFor: 'scripting' stamp: 'sw 10/17/2000 11:35'!\\\\ncategoriesForViewer\\\\n\\\\t\\\\\\\"Answer a list of symbols representing the categories to offer in the viewer, in order\\\\\\\"\\\\n\\\\n\\\\t^ objectRepresented class organization categories\\\\n! !\\\\nObject subclass: #ObjectScanner\\\\n\\\\tinstanceVariableNames: 'pvt3SmartRefStrm'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Object Storage'!\\\\n!ObjectScanner commentStamp: '<historical>' prior: 0!\\\\nAn instance of this class is the compiler's context for filing in a SmartRefStream containing instance-specific classes.  When the old name of a new object's class conflicts with an existing class name, install a class var in me.  It has the old name but points at the new class.  The compiler uses it when compiling the code in the fileIn.  Fill the SmartRefStream's renamed class dictionary.\\\\n\\\\nAn object fileout:\\\\n!!ObjectScanner new initialize!!      \\\\\\\"allow me to take control with scanFrom:\\\\\\\"\\\\n\\\\nPlayer subclass: Player23 instanceVariableNames: 'foo' classVariableNames: '' \\\\n\\\\tpoolDictionaries: nil category: 'Instance Specific'!!\\\\n\\\\t\\\\\\\"I prescan this and (self rename: #Player23 toBe: #Player30)\\\\\\\"\\\\n\\\\n!!Player23 methodsFor: 'all' stamp: 'tk 3/9/98 18:58'!!\\\\t\\\\\\\"actually sent to Player30\\\\\\\"\\\\nfoo\\\\n\\\\t^ foo!! !!\\\\n\\\\n!!self smartRefStream!!<binary representation of the objects>!!\\\\n\\\\n\\\\n!\\\\n\\\\n\\\\n!ObjectScanner methodsFor: 'accessing' stamp: 'tk 3/15/98 19:33'!\\\\nsmartRefStream\\\\n\\\\n\\\\t^ pvt3SmartRefStrm! !\\\\n\\\\n\\\\n!ObjectScanner methodsFor: 'initialize-release' stamp: 'tk 3/15/98 20:17'!\\\\nclear\\\\n\\\\t\\\\\\\"remove all old class vars.  They were UniClasses being remapped to aviod a name conflict.\\\\\\\"\\\\n\\\\n\\\\tself class classPool keys do: [:key |\\\\n\\\\t\\\\tself class classPool removeKey: key].\\\\t\\\\\\\"brute force\\\\\\\"! !\\\\n\\\\n!ObjectScanner methodsFor: 'initialize-release' stamp: 'tk 8/15/1998 15:26'!\\\\ninitialize\\\\n\\\\t\\\\\\\"remove all old class vars that are not instance-specific classes being renamed\\\\\\\"\\\\n\\\\n\\\\tself clear.\\\\n\\\\t\\\\\\\"Most importantly, return self, so a fileIn will let ObjectScanner seize control.  So UniClasses can be remapped.  See the transfer of control where ReadWriteStream fileIn calls scanFrom:\\\\\\\"! !\\\\n\\\\n\\\\n!ObjectScanner methodsFor: 'scanning' stamp: 'yo 11/11/2002 10:27'!\\\\nlookAhead: aChunk\\\\n\\\\t\\\\\\\"See if this chunk is a class Definition, and if the new class name already exists and is instance-specific.  Modify the chunk, and record the rename in the SmartRefStream and in me.\\\\\\\"\\\\n\\\\n\\\\t| pieces sup oldName existing newName newDefn |\\\\n\\\\taChunk size < 90 ifTrue: [^ aChunk].\\\\t\\\\t\\\\\\\"class defn is big!!\\\\\\\"\\\\n\\\\t(aChunk at: 1) == $!! ifTrue: [^ aChunk].\\\\t\\\\\\\"method def, fast exit\\\\\\\"\\\\n\\\\tpieces _ (aChunk copyFrom: 1 to: (300 min: aChunk size)) findTokens: ' #\\\\t\\\\\\\\' withCRs.\\\\n\\\\tpieces size < 3 ifTrue: [^ aChunk].\\\\t\\\\\\\"really bigger, but just took front\\\\\\\"\\\\n\\\\t(pieces at: 2) = 'subclass:' ifFalse: [^ aChunk].\\\\n\\\\tsup _ Smalltalk at: (pieces at: 1) asSymbol ifAbsent: [^ aChunk].\\\\n\\\\tsup class class == Metaclass ifFalse: [^ aChunk].\\\\n\\\\t((oldName _ pieces at: 3) at: 1) canBeGlobalVarInitial ifFalse: [^ aChunk].\\\\n\\\\toldName _ oldName asSymbol.\\\\n\\\\t(Smalltalk includesKey: oldName) ifFalse: [^ aChunk].\\\\t\\\\\\\"no conflict\\\\\\\"\\\\n\\\\texisting _ Smalltalk at: oldName.\\\\n\\\\t(existing isKindOf: Class) ifFalse: [^ aChunk].\\\\t\\\\\\\"Write over non-class global\\\\\\\"\\\\n\\\\texisting isSystemDefined ifTrue: [^ aChunk].\\\\t\\\\\\\"Go ahead and redefine it!!\\\\\\\"\\\\n\\\\t\\\\\\\"Is a UniClass\\\\\\\"\\\\n\\\\tnewName _ sup chooseUniqueClassName.\\\\n\\\\tnewDefn _ aChunk copyReplaceAll: oldName with: newName.\\\\n\\\\tCompiler evaluate: newDefn for: self logged: true.\\\\t\\\\\\\"Create the new class\\\\\\\"\\\\n\\\\tself rename: oldName toBe: newName.\\\\n\\\\t^ newName asString\\\\t\\\\t\\\\\\\"to be evaluated\\\\\\\"\\\\n! !\\\\n\\\\n!ObjectScanner methodsFor: 'scanning' stamp: 'tk 3/15/98 20:22'!\\\\nscanFrom: aByteStream\\\\n\\\\t\\\\\\\"Sieze control of the fileIn.  Put myself in as the context.  If any UniClasses (for just one instance) are defined, they will do it through me, and I will look for conflicting class names.  If so, install the old name as a class var of me, so the compile will work.  Tell my SmartRefStream about renaming the class.\\\\\\\"\\\\n\\\\n\\\\t| valWithOddName47 scannerNamed53 chunkNamed117 |\\\\n\\\\tpvt3SmartRefStrm _ SmartRefStream on: aByteStream.\\\\n\\\\taByteStream ascii.\\\\n\\\\t[aByteStream atEnd] whileFalse:\\\\n\\\\t\\\\t[aByteStream skipSeparators.\\\\n\\\\t\\\\tvalWithOddName47 _ (aByteStream peekFor: $!!)\\\\n\\\\t\\\\t\\\\tifTrue: [chunkNamed117 _ aByteStream nextChunk.\\\\t\\\\\\\"debug\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tscannerNamed53 _ Compiler evaluate: chunkNamed117\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfor: self logged: false.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tscannerNamed53 class == self class \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"I already am the scanner for this file\\\\\\\"]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [scannerNamed53 scanFrom: aByteStream]]\\\\n\\\\t\\\\t\\\\tifFalse: [chunkNamed117 _ aByteStream nextChunk.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tchunkNamed117 _ self lookAhead: chunkNamed117.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tCompiler evaluate: chunkNamed117 for: self logged: true].\\\\n\\\\t\\\\taByteStream skipStyleChunk].\\\\n\\\\t^ valWithOddName47! !\\\\n\\\\n\\\\n!ObjectScanner methodsFor: 'utilities' stamp: 'tk 3/15/98 20:21'!\\\\nrename: existingName toBe: newName\\\\n\\\\t\\\\\\\"See if there is a conflict between what the fileIn wants to call the new UniClass (Player23) and what already exists for another unique instance.  If conflict, make a class variable to intercept the existingName and direct it to class newName.\\\\\\\"\\\\n\\\\n\\\\texistingName = newName ifFalse: [\\\\n\\\\t\\\\tself class ensureClassPool.\\\\t\\\\\\\"create the dictionary\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"can't use addClassVarName: because it checks for conflicts with Smalltalk\\\\\\\"\\\\n\\\\t\\\\t(self class classPool includesKey: existingName) ifFalse: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"Pick up any refs in Undeclared\\\\\\\"\\\\n\\\\t\\\\t\\\\tself class classPool declare: existingName from: Undeclared].\\\\n\\\\t\\\\tself class classPool at: existingName put: (Smalltalk at: newName).\\\\n\\\\t\\\\tpvt3SmartRefStrm renamed at: existingName put: newName]! !\\\\nStream subclass: #ObjectSocket\\\\n\\\\tinstanceVariableNames: 'socket outBuf outBufIndex outBufSize inBuf inBufIndex inBufLastIndex outObjects inObjects'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Nebraska-Network-ObjectSocket'!\\\\n!ObjectSocket commentStamp: 'ls 2/10/2005 21:27' prior: 0!\\\\nThis is a socket which exchanges medium-level packets instead of low-level bytes.  This class is abstract; see the subclasses for particular kinds of medium-level packets which can be used.!\\\\n\\\\n\\\\n!ObjectSocket methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:26'!\\\\ndestroy\\\\n\\\\tsocket destroy.\\\\n\\\\tsocket := nil.! !\\\\n\\\\n!ObjectSocket methodsFor: 'as yet unclassified' stamp: 'RAA 7/20/2000 15:10'!\\\\nisConnected\\\\n\\\\n\\\\t^socket notNil and: [socket isConnected]! !\\\\n\\\\n!ObjectSocket methodsFor: 'as yet unclassified' stamp: 'ls 1/8/1999 16:14'!\\\\nprocessIO\\\\n\\\\t\\\\\\\"do some as much network IO as possible\\\\\\\"\\\\n\\\\n\\\\tself processOutput.\\\\n\\\\tself processInput.! !\\\\n\\\\n!ObjectSocket methodsFor: 'as yet unclassified' stamp: 'RAA 8/4/2000 15:38'!\\\\nremoteAddress\\\\n\\\\n\\\\tself isConnected ifFalse: [^nil].\\\\n\\\\t^socket remoteAddress! !\\\\n\\\\n\\\\n!ObjectSocket methodsFor: 'encoding/decoding' stamp: 'sd 11/20/2005 21:26'!\\\\naddToInBuf: aString\\\\n\\\\n\\\\t| newAlloc |\\\\n\\\\tnewAlloc := aString size * 2 max: 8000.\\\\n\\\\tinBuf ifNil: [\\\\n\\\\t\\\\tinBuf := String new: newAlloc.\\\\n\\\\t\\\\tinBufIndex := 1.\\\\n\\\\t\\\\tinBufLastIndex := 0.\\\\n\\\\t].\\\\n\\\\taString size > (inBuf size - inBufLastIndex) ifTrue: [\\\\n\\\\t\\\\tinBuf := inBuf , (String new: newAlloc)\\\\n\\\\t].\\\\n\\\\tinBuf \\\\n\\\\t\\\\treplaceFrom: inBufLastIndex + 1 \\\\n\\\\t\\\\tto: inBufLastIndex + aString size\\\\n\\\\t\\\\twith: aString \\\\n\\\\t\\\\tstartingAt: 1.\\\\n\\\\tinBufLastIndex := inBufLastIndex + aString size.\\\\n! !\\\\n\\\\n!ObjectSocket methodsFor: 'encoding/decoding' stamp: 'sd 11/20/2005 21:26'!\\\\nprocessOutput\\\\n\\\\t\\\\\\\"loop sending data as long as there is data to send, and the socket is ready to receive more data\\\\\\\"\\\\n\\\\t[ socket sendDone and: [ outBuf notNil or: [ outObjects isEmpty not ] ] ] whileTrue: [\\\\n\\\\t\\\\t| amountSent |\\\\n\\\\n\\\\t\\\\toutBuf isNil ifTrue: [\\\\n\\\\t\\\\t\\\\t| nextSize |\\\\n\\\\t\\\\t\\\\t\\\\\\\"no data in the current buffer; make a new buffer and encode some more\\\\\\\"\\\\n\\\\t\\\\t\\\\toutBuf := String new: ((self spaceToEncode: outObjects first) max: 8000).\\\\n\\\\t\\\\t\\\\toutBufIndex := 1.\\\\n\\\\t\\\\t\\\\toutBufSize := 0.\\\\n\\\\n\\\\t\\\\t\\\\t[\\\\toutObjects isEmpty not and: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnextSize := self spaceToEncode: outObjects first.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnextSize <= (outBuf size - outBufSize + 1) ]\\\\n\\\\t\\\\t\\\\t] whileTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tself encodeObject: outObjects first into: outBuf startingAt: outBufSize+1.\\\\n\\\\t\\\\t\\\\t\\\\toutBufSize := outBufSize + nextSize.\\\\n\\\\t\\\\t\\\\t\\\\toutObjects removeFirst ] ].\\\\n\\\\n\\\\t\\\\t\\\\\\\"at this point, the buffer definitely has data in it to send.  Send some\\\\\\\"\\\\n\\\\t\\\\tamountSent := socket sendSomeData: outBuf startIndex: outBufIndex count: (outBufSize - outBufIndex + 1).\\\\n\\\\t\\\\toutBufIndex := outBufIndex + amountSent.\\\\n\\\\t\\\\toutBufIndex > outBufSize ifTrue: [ outBuf := nil ]  ].\\\\n\\\\n! !\\\\n\\\\n!ObjectSocket methodsFor: 'encoding/decoding' stamp: 'sd 11/20/2005 21:26'!\\\\nshrinkInBuf\\\\n\\\\n\\\\tinBuf ifNil: [^self].\\\\n\\\\tinBufLastIndex < inBufIndex ifTrue: [\\\\n\\\\t\\\\tinBufLastIndex := 0.\\\\n\\\\t\\\\tinBufIndex := 1.\\\\n\\\\t\\\\tinBuf size > 20000 ifTrue: [inBuf := nil].\\\\t\\\\\\\"if really big, kill it\\\\\\\"\\\\n\\\\t\\\\t^self\\\\n\\\\t].\\\\n\\\\tinBuf := inBuf copyFrom: inBufIndex to: inBufLastIndex.\\\\n\\\\tinBufLastIndex := inBuf size.\\\\n\\\\tinBufIndex := 1.\\\\n\\\\n! !\\\\n\\\\n\\\\n!ObjectSocket methodsFor: 'stream protocol' stamp: 'ls 4/25/2000 18:48'!\\\\nnext\\\\n\\\\t^inObjects removeFirst\\\\t! !\\\\n\\\\n!ObjectSocket methodsFor: 'stream protocol' stamp: 'ls 4/25/2000 18:48'!\\\\nnextOrNil\\\\n\\\\tinObjects isEmpty\\\\n\\\\t\\\\tifTrue: [ ^nil ]\\\\n\\\\t\\\\tifFalse: [ ^inObjects removeFirst ]! !\\\\n\\\\n!ObjectSocket methodsFor: 'stream protocol' stamp: 'ls 4/25/2000 18:48'!\\\\nnextPut: anObject\\\\n\\\\toutObjects addLast: anObject! !\\\\n\\\\n\\\\n!ObjectSocket methodsFor: 'private-initialization' stamp: 'sd 11/20/2005 21:26'!\\\\ninitialize: aSocket\\\\n\\\\tsocket := aSocket.\\\\n\\\\tinBuf := String new: 1000.\\\\n\\\\tinBufIndex := 1.\\\\n\\\\tinBufLastIndex := 0.\\\\n\\\\n\\\\toutBuf := nil.\\\\n\\\\n\\\\tinObjects := OrderedCollection new.\\\\n\\\\toutObjects := OrderedCollection new.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nObjectSocket class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!ObjectSocket class methodsFor: 'as yet unclassified' stamp: 'RAA 7/20/2000 15:47'!\\\\non: aSocket\\\\n\\\\n\\\\t^self basicNew initialize: aSocket! !\\\\nClassTestCase subclass: #ObjectTest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'KernelTests-Objects'!\\\\n\\\\n!ObjectTest methodsFor: 'tests' stamp: 'md 11/26/2004 16:37'!\\\\ntestBecome\\\\n\\\\t\\\\\\\"self debug: #testBecome\\\\\\\"\\\\n\\\\t\\\\\\\"this test should that all the variables pointing to an object are pointing now to another one, and all\\\\n      object pointing to the other are pointing to the object\\\\\\\"\\\\n\\\\n\\\\t| pt1 pt2 pt3 |\\\\n\\\\tpt1 := 0@0.\\\\n\\\\tpt2 := pt1.\\\\n\\\\tpt3 := 100@100.\\\\n\\\\n\\\\tpt1 become: pt3.\\\\n\\\\tself assert: pt2 = (100@100).\\\\n\\\\tself assert: pt3 = (0@0).\\\\n\\\\tself assert: pt1 = (100@100).! !\\\\n\\\\n!ObjectTest methodsFor: 'tests' stamp: 'md 11/26/2004 16:36'!\\\\ntestBecomeForward\\\\n\\\\t\\\\\\\"self debug: #testBecomeForward\\\\\\\"\\\\n\\\\t\\\\\\\"this test should that all the variables pointing to an object are pointing now to another one.\\\\n\\\\tNot that this inverse is not true. This kind of become is called oneWayBecome in VW\\\\\\\"\\\\n\\\\n\\\\t| pt1 pt2 pt3 |\\\\n\\\\tpt1 := 0@0.\\\\n\\\\tpt2 := pt1.\\\\n\\\\tpt3 := 100@100.\\\\n\\\\tpt1 becomeForward: pt3.\\\\n\\\\tself assert: pt2 = (100@100).\\\\n\\\\tself assert: pt3 == pt2.\\\\n\\\\tself assert: pt1 = (100@100)! !\\\\n\\\\n\\\\n!ObjectTest methodsFor: 'tests - debugging' stamp: 'sd 6/5/2005 09:05'!\\\\ntestAssert\\\\n\\\\n\\\\tself shouldnt: [Object assert: [true]] raise: Error.\\\\n\\\\tself shouldnt: [Object assert: true] raise: Error.\\\\n\\\\tself should: [Object assert: [false]] raise: AssertionFailure.\\\\n\\\\tself should: [Object assert: false] raise: AssertionFailure.! !\\\\n\\\\n!ObjectTest methodsFor: 'tests - debugging' stamp: 'sd 6/5/2005 09:05'!\\\\ntestHaltIf\\\\n\\\\n\\\\tself should: [self haltIf: true] raise: Halt.\\\\n\\\\tself shouldnt: [self haltIf: false] raise: Halt.\\\\n\\\\n\\\\tself should: [self haltIf: [true]] raise: Halt.\\\\n\\\\tself shouldnt: [self haltIf: [false]] raise: Halt.\\\\n\\\\n\\\\tself should: [self haltIf: #testHaltIf.] raise: Halt.\\\\n\\\\tself shouldnt: [self haltIf: #teadfasdfltIf.] raise: Halt.\\\\n\\\\n\\\\tself should: [self a] raise: Halt.\\\\n\\\\tself shouldnt: [self a1] raise: Halt.\\\\n\\\\n\\\\tself should: [self haltIf: [:o | o class = self class]] raise: Halt.\\\\n\\\\tself shouldnt: [self haltIf: [:o | o class ~= self class]] raise: Halt.\\\\n! !\\\\n\\\\n\\\\n!ObjectTest methodsFor: 'private' stamp: 'md 10/15/2004 13:45'!\\\\na\\\\n\\\\tself b.! !\\\\n\\\\n!ObjectTest methodsFor: 'private' stamp: 'md 10/15/2004 13:46'!\\\\na1\\\\n\\\\tself b1.! !\\\\n\\\\n!ObjectTest methodsFor: 'private' stamp: 'md 10/15/2004 13:45'!\\\\nb\\\\n\\\\tself haltIf: #testHaltIf.! !\\\\n\\\\n!ObjectTest methodsFor: 'private' stamp: 'md 10/15/2004 13:46'!\\\\nb1\\\\n\\\\tself haltIf: #testasdasdfHaltIf.! !\\\\nProtoObject subclass: #ObjectTracer\\\\n\\\\tinstanceVariableNames: 'tracedObject recursionFlag'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Kernel-Objects'.\\\\nObjectTracer superclass: nil!\\\\n!ObjectTracer commentStamp: '<historical>' prior: 0!\\\\nAn ObjectTracer can be wrapped around another object, and then give you a chance to inspect it whenever it receives messages from the outside.  For instance...\\\\n\\\\t(ObjectTracer on: Display) flash: (50@50 extent: 50@50)\\\\nwill give control to a debugger just before the message flash is sent.\\\\nObviously this facility can be embellished in many useful ways.\\\\nSee also the even more perverse subclass, ObjectViewer, and its example.\\\\n!\\\\n\\\\n\\\\n!ObjectTracer methodsFor: 'very few messages' stamp: 'ar 9/27/2005 20:24'!\\\\ndoesNotUnderstand: aMessage \\\\n\\\\t\\\\\\\"All external messages (those not caused by the re-send) get trapped here\\\\\\\"\\\\n\\\\t\\\\\\\"Present a dubugger before proceeding to re-send the message\\\\\\\"\\\\n\\\\n\\\\tToolSet debugContext: thisContext\\\\n\\\\t\\\\t\\\\t\\\\tlabel: 'About to perform: ', aMessage selector\\\\n\\\\t\\\\t\\\\t\\\\tcontents: nil.\\\\n\\\\t^ aMessage sentTo: tracedObject.\\\\n! !\\\\n\\\\n!ObjectTracer methodsFor: 'very few messages'!\\\\nxxxUnTrace\\\\n\\\\n\\\\ttracedObject become: self! !\\\\n\\\\n!ObjectTracer methodsFor: 'very few messages'!\\\\nxxxViewedObject\\\\n\\\\t\\\\\\\"This message name must not clash with any other (natch).\\\\\\\"\\\\n\\\\t^ tracedObject! !\\\\n\\\\n!ObjectTracer methodsFor: 'very few messages'!\\\\nxxxViewedObject: anObject\\\\n\\\\t\\\\\\\"This message name must not clash with any other (natch).\\\\\\\"\\\\n\\\\ttracedObject _ anObject! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nObjectTracer class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!ObjectTracer class methodsFor: 'instance creation'!\\\\non: anObject\\\\n\\\\t^ self new xxxViewedObject: anObject! !\\\\nObjectTracer subclass: #ObjectViewer\\\\n\\\\tinstanceVariableNames: 'valueBlock lastValue changeBlock'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Kernel-Objects'!\\\\n!ObjectViewer commentStamp: '<historical>' prior: 0!\\\\nObjectViewers offers the same kind of interception of messages (via doesnotUnderstand:) as ObjectTracers, but instead of just being wrappers, they actually replace the object being viewed.  This makes them a lot more dangerous to use, but one can do amazing things.  For instance, the example below actually intercepts the InputSensor object, and prints the mouse coordinates asynchronously, every time they change:\\\\n\\\\tSensor evaluate: [Sensor cursorPoint printString displayAt: 0@0]\\\\n\\\\t\\\\twheneverChangeIn: [Sensor cursorPoint].\\\\nTo exit from this example, execute:\\\\n\\\\tSensor xxxUnTrace\\\\n!\\\\n\\\\n\\\\n!ObjectViewer methodsFor: 'very few messages'!\\\\ndoesNotUnderstand: aMessage \\\\n\\\\t\\\\\\\"Check for change after sending aMessage\\\\\\\"\\\\n\\\\t| returnValue newValue |\\\\n\\\\trecursionFlag ifTrue: [^ aMessage sentTo: tracedObject].\\\\n\\\\trecursionFlag _ true.\\\\n\\\\treturnValue _ aMessage sentTo: tracedObject.\\\\n\\\\tnewValue _ valueBlock value.\\\\n\\\\tnewValue = lastValue ifFalse:\\\\n\\\\t\\\\t[changeBlock value.\\\\n\\\\t\\\\tlastValue _ newValue].\\\\n\\\\trecursionFlag _ false.\\\\n\\\\t^ returnValue! !\\\\n\\\\n!ObjectViewer methodsFor: 'very few messages'!\\\\nxxxViewedObject: viewedObject evaluate: block1 wheneverChangeIn: block2\\\\n\\\\t\\\\\\\"This message name must not clash with any other (natch).\\\\\\\"\\\\n\\\\ttracedObject _ viewedObject.\\\\n\\\\tvalueBlock _ block2.\\\\n\\\\tchangeBlock _ block1.\\\\n\\\\trecursionFlag _ false! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nObjectViewer class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!ObjectViewer class methodsFor: 'instance creation'!\\\\non: viewedObject evaluate: block1 wheneverChangeIn: block2\\\\n\\\\t^ self new xxxViewedObject: viewedObject evaluate: block1 wheneverChangeIn: block2! !\\\\nObject subclass: #ObjectWithDocumentation\\\\n\\\\tinstanceVariableNames: 'authoringStamp properties elementSymbol naturalLanguageTranslations'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Protocols-Kernel'!\\\\n!ObjectWithDocumentation commentStamp: '<historical>' prior: 0!\\\\nObjectWithDocumentation - an abstract superclass for objects that allows maintenance of an authoring stamp, a body of documentation, and a properties dictionary.\\\\nThe Properties implementation has not happened yet -- it would closely mirror the implemenation of properties in the MorphExtension, for example.!\\\\n\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'accessing' stamp: 'mir 7/12/2004 21:21'!\\\\ndocumentation\\\\n\\\\t\\\\\\\"Answer the receiver's documentation\\\\\\\"\\\\n\\\\n\\\\t^self helpMessage! !\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'accessing' stamp: 'mir 7/12/2004 19:33'!\\\\ndocumentation: somethingUsefulHopefully\\\\n\\\\t\\\\\\\"Set the receiver's documentation, in the current langauge\\\\\\\"\\\\n\\\\n\\\\tself helpMessage: somethingUsefulHopefully! !\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'accessing' stamp: 'sw 8/18/2004 20:23'!\\\\nhelpMessage\\\\n\\\\t\\\\\\\"Check if there is a getterSetterHelpMessage. \\\\n\\\\tOtherwise try the normal help message or return nil.\\\\\\\"\\\\n\\\\n\\\\t^ self getterSetterHelpMessage\\\\n\\\\t\\\\tifNil: [(self propertyAt: #helpMessage ifAbsent:\\\\n\\\\t\\\\t\\\\t[self legacyHelpMessage ifNil: [^ nil]]) translated]! !\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'accessing' stamp: 'mir 7/12/2004 19:32'!\\\\nhelpMessage: somethingUsefulHopefully\\\\n\\\\t\\\\\\\"Set the receiver's documentation, in the current langauge\\\\\\\"\\\\n\\\\n\\\\tself propertyAt: #helpMessage put: somethingUsefulHopefully! !\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:39'!\\\\nlegacyHelpMessage\\\\n\\\\t\\\\\\\"If I have a help message stashed in my legacy naturalTranslations slot, answer its translated rendition, else answer nil.  If I *do* come across a legacy help message, transfer it to my properties dictionary.\\\\\\\"\\\\n\\\\n\\\\t| untranslated |\\\\n\\\\tnaturalLanguageTranslations isEmptyOrNil  \\\\\\\"only in legacy (pre-3.8) projects\\\\\\\"\\\\n\\\\t\\\\tifTrue: [^ nil].\\\\n\\\\tuntranslated := naturalLanguageTranslations first helpMessage ifNil: [^ nil].\\\\n\\\\tself propertyAt: #helpMessage put: untranslated.\\\\n\\\\tnaturalLanguageTranslations removeFirst.\\\\n\\\\tnaturalLanguageTranslations isEmpty ifTrue: [naturalLanguageTranslations := nil].\\\\n\\\\t^ untranslated translated! !\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'accessing' stamp: 'mir 7/12/2004 23:57'!\\\\nuntranslatedHelpMessage\\\\n\\\\t\\\\\\\"Check if there is a getterSetterHelpMessage. \\\\n\\\\tOtherwise try the normal help message or return nil.\\\\\\\"\\\\n\\\\n\\\\t^(self propertyAt: #getterSetterHelpMessage ifAbsent: [nil])\\\\n\\\\t\\\\tifNil: [(self propertyAt: #helpMessage ifAbsent: [nil])]! !\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'accessing' stamp: 'mir 7/12/2004 23:56'!\\\\nuntranslatedWording\\\\n\\\\t\\\\\\\"Answer the receiver's wording\\\\\\\"\\\\n\\\\n\\\\t^self propertyAt: #wording ifAbsent: [nil]! !\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'accessing' stamp: 'mir 7/12/2004 21:34'!\\\\nwording\\\\n\\\\t\\\\\\\"Answer the receiver's wording\\\\\\\"\\\\n\\\\n\\\\t| wording |\\\\n\\\\t(wording := self propertyAt: #wording ifAbsent: [nil])\\\\n\\\\t\\\\tifNotNil: [^wording translated].\\\\n\\\\n\\\\tself initWordingAndDocumentation.\\\\n\\\\t^self propertyAt: #wording ifAbsent: ['']! !\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'accessing' stamp: 'mir 7/12/2004 21:39'!\\\\nwording: aString\\\\n\\\\t\\\\\\\"Set the receiver's wording, in the current langauge\\\\\\\"\\\\n\\\\n\\\\tself propertyAt: #wording put: aString! !\\\\n\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'documentation' stamp: 'rbb 3/1/2005 11:02'!\\\\neditDescription\\\\n\\\\t\\\\\\\"Allow the user to see and edit the documentation for this object\\\\\\\"\\\\n\\\\t| reply helpMessage |\\\\n\\\\thelpMessage := self documentation isNil\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [String new]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self documentation].\\\\n\\\\treply := UIManager default\\\\n\\\\t\\\\t\\\\t\\\\tmultiLineRequest: 'Kindly edit the description' translated\\\\n\\\\t\\\\t\\\\t\\\\tcenterAt: Sensor cursorPoint\\\\n\\\\t\\\\t\\\\t\\\\tinitialAnswer: helpMessage\\\\n\\\\t\\\\t\\\\t\\\\tanswerHeight: 200.\\\\n\\\\treply isEmptyOrNil\\\\n\\\\t\\\\tifFalse: [self documentation: reply]! !\\\\n\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:39'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Initialize the receiver (automatically called when instances are created via 'new')\\\\\\\"\\\\n\\\\n\\\\tauthoringStamp := Utilities changeStampPerSe\\\\n! !\\\\n\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'migration' stamp: 'mir 7/12/2004 23:45'!\\\\nmigrateWordAndHelpMessage\\\\n\\\\t\\\\\\\"Migrate the English wording and help message to the new structure\\\\\\\"\\\\n\\\\n\\\\t| englishElement |\\\\n\\\\tself initWordingAndDocumentation.\\\\n\\\\t(self properties includes: #wording)\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\tenglishElement := self naturalLanguageTranslations\\\\n\\\\t\\\\t\\\\t\\\\tdetect: [:each | each language == #English] ifNone: [^nil].\\\\n\\\\t\\\\t\\\\tself wording: englishElement wording.\\\\n\\\\t\\\\t\\\\tself helpMessage: englishElement helpMessage]! !\\\\n\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'miscellaneous' stamp: 'sw 9/12/2001 23:03'!\\\\nelementSymbol\\\\n\\\\t\\\\\\\"Answer the receiver's element symbol\\\\\\\"\\\\n\\\\n\\\\t^ elementSymbol! !\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'miscellaneous' stamp: 'mir 7/12/2004 23:20'!\\\\nnaturalLanguageTranslations\\\\n\\\\t^naturalLanguageTranslations ifNil: [OrderedCollection new]! !\\\\n\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'private' stamp: 'mir 7/12/2004 21:28'!\\\\ngetterSetterHelpMessage\\\\n\\\\t\\\\\\\"Returns a helpMessage that has been computed previously and needs to be translated and then formatted with the elementSymbol.\\\\n\\\\t'get value of {1}' translated format: {elSym}\\\\\\\"\\\\n\\\\n\\\\t^(self propertyAt: #getterSetterHelpMessage ifAbsent: [^nil])\\\\n\\\\t\\\\ttranslated format: {self elementSymbol}! !\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'private' stamp: 'mir 7/12/2004 21:29'!\\\\ngetterSetterHelpMessage: aString\\\\n\\\\t\\\\\\\"Sets a helpMessage that needs to be translated and then formatted with the elementSymbol.\\\\n\\\\t'get value of {1}' translated format: {elSym}\\\\\\\"\\\\n\\\\n\\\\tself propertyAt: #getterSetterHelpMessage put: aString! !\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'private' stamp: 'mir 7/12/2004 21:31'!\\\\ninitWordingAndDocumentation\\\\n\\\\t\\\\\\\"Initialize wording and documentation (helpMessage) for getters and setters\\\\\\\"\\\\n\\\\n\\\\t| elSym |\\\\n\\\\telSym := self elementSymbol.\\\\n\\\\telSym\\\\n\\\\t\\\\tifNil: [^self].\\\\n\\\\n\\\\t((elSym beginsWith: 'get')\\\\n\\\\t\\\\tand: [elSym size > 3])\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\tself wording: (elSym allButFirst: 3) withFirstCharacterDownshifted.\\\\n\\\\t\\\\t\\\\tself getterSetterHelpMessage: 'get value of {1}']\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t((elSym beginsWith: 'set')\\\\n\\\\t\\\\t\\\\t\\\\tand: [elSym size > 4])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself wording: (elSym allButFirst: 3) withFirstCharacterDownshifted.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself getterSetterHelpMessage: 'set value of {1}']]! !\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'private' stamp: 'mir 7/12/2004 19:30'!\\\\nproperties\\\\n\\\\t^properties ifNil: [properties := Dictionary new]! !\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'private' stamp: 'mir 7/12/2004 19:30'!\\\\npropertyAt: key\\\\n\\\\t^self propertyAt: key ifAbsent: [nil]! !\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'private' stamp: 'mir 7/12/2004 19:29'!\\\\npropertyAt: key ifAbsent: aBlock\\\\n\\\\t^properties\\\\n\\\\t\\\\tifNil: aBlock\\\\n\\\\t\\\\tifNotNil: [properties at: key ifAbsent: aBlock]! !\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'private' stamp: 'mir 7/12/2004 19:29'!\\\\npropertyAt: key put: aValue\\\\n\\\\tself properties at: key put: aValue! !\\\\nAbstractObjectsAsMethod subclass: #ObjectsAsMethodsExample\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Tests-ObjectsAsMethods'!\\\\n\\\\n!ObjectsAsMethodsExample methodsFor: 'as yet unclassified' stamp: 'ar 5/17/2003 20:16'!\\\\nadd: a with: b\\\\n\\\\t^a + b! !\\\\n\\\\n!ObjectsAsMethodsExample methodsFor: 'as yet unclassified' stamp: 'ar 5/17/2003 20:16'!\\\\nanswer42\\\\n\\\\t^42! !\\\\n\\\\n!ObjectsAsMethodsExample methodsFor: 'as yet unclassified' stamp: 'md 3/1/2006 19:37'!\\\\nrun: oldSelector with: arguments in: aReceiver\\\\n\\\\t^self perform: oldSelector withArguments: arguments! !\\\\nAlignmentMorph subclass: #ObjectsTool\\\\n\\\\tinstanceVariableNames: 'searchString modeSymbol'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-PartsBin'!\\\\n!ObjectsTool commentStamp: '<historical>' prior: 0!\\\\nI am a Master Parts Bin that allows the user to drag out a new Morph from a voluminous iconic list.\\\\n\\\\nChoose \\\\\\\"objects\\\\\\\" from the world menu, or type Alt-o (Cmd-o on the Mac).\\\\n\\\\nTo add a new kinds of Morphs:\\\\nIn the class of the Morph, implement the message:\\\\n\\\\ndescriptionForPartsBin\\\\n\\\\t^ self partName:\\\\t'Rectangle'\\\\n\\\\t\\\\tcategories:\\\\t\\\\t#('Graphics' ' Basic 1 ')\\\\n\\\\t\\\\tdocumentation:\\\\t'A rectangular shape, with border and fill style'\\\\n\\\\nThe partName is the title that will show in the lower pane of the Object Tool.\\\\nWhen is categories mode, an object can be seen in more than one category.  The list above tells which ones.\\\\nDocumentation is what will show in the balloon help for each object thumbnail.\\\\nThe message #initializeToStandAlone creates the actual instance.\\\\n\\\\nTo make a second variant object prototype coming from the same class, implement #supplementaryPartsDescriptions.  In it, you get to specify the nativitySelector.  It is sent to the class to get the variant objects.  Often it is #authoringPrototype.  (A class may supply supplementaryPartsDescriptions without implementing descriptionForPartsBin.  This gives you better control.)\\\\n\\\\n!\\\\n\\\\n\\\\n!ObjectsTool methodsFor: 'alphabetic' stamp: 'dgd 4/4/2006 16:43'!\\\\nalphabeticTabs\\\\n\\\\t\\\\\\\"Answer a list of buttons which, when hit, will trigger the choice of a morphic category\\\\\\\"\\\\n\\\\n\\\\t| buttonList aButton tabLabels |\\\\n\\\\n\\\\tself flag: #todo. \\\\\\\"includes non-english characters\\\\\\\"\\\\n\\\\ttabLabels _ (($a to: $z) collect: [:ch | ch asString]) asOrderedCollection.\\\\n\\\\n\\\\tbuttonList _ tabLabels collect:\\\\n\\\\t\\\\t[:catName |\\\\n\\\\t\\\\t\\\\taButton _ SimpleButtonMorph new label: catName.\\\\n\\\\t\\\\t\\\\taButton actWhen: #buttonDown.\\\\n\\\\t\\\\t\\\\taButton target: self; actionSelector: #showAlphabeticCategory:fromButton:; arguments: {catName. aButton}].\\\\n\\\\t^ buttonList\\\\n\\\\n\\\\\\\"ObjectsTool new tabsForMorphicCategories\\\\\\\"! !\\\\n\\\\n!ObjectsTool methodsFor: 'alphabetic' stamp: 'nk 9/3/2004 13:47'!\\\\ninstallQuads: quads fromButton: aButton\\\\n\\\\t\\\\\\\"Install items in the bottom pane that correspond to the given set of quads, as triggered from the given button\\\\\\\"\\\\n\\\\n\\\\t| aPartsBin sortedQuads oldResizing |\\\\n\\\\taPartsBin _ self partsBin.\\\\n\\\\toldResizing := aPartsBin vResizing.\\\\n\\\\taPartsBin removeAllMorphs.\\\\n\\\\tsortedQuads _ (PartsBin translatedQuads: quads)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tasSortedCollection: [:a :b | a third < b third].\\\\n\\\\taPartsBin listDirection: #leftToRight quadList: sortedQuads.\\\\n\\\\taButton ifNotNil: [self tabsPane highlightOnlySubmorph: aButton].\\\\n\\\\taPartsBin vResizing: oldResizing.\\\\n\\\\taPartsBin layoutChanged; fullBounds.\\\\n\\\\tself isFlap ifFalse: [ self minimizePartsBinSize ].! !\\\\n\\\\n!ObjectsTool methodsFor: 'alphabetic' stamp: 'nk 9/3/2004 12:13'!\\\\nshowAlphabeticTabs\\\\n\\\\t\\\\\\\"Switch to the mode of showing alphabetic tabs\\\\\\\"\\\\n\\\\n\\\\tmodeSymbol == #alphabetic ifTrue: [ ^self ].\\\\n\\\\tself partsBin removeAllMorphs.\\\\n\\\\tself initializeWithTabs: self alphabeticTabs.\\\\n\\\\tself modeSymbol: #alphabetic.\\\\n\\\\tself tabsPane submorphs first doButtonAction! !\\\\n\\\\n\\\\n!ObjectsTool methodsFor: 'categories' stamp: 'nk 9/3/2004 13:43'!\\\\nshowCategories\\\\n\\\\t\\\\\\\"Set the receiver up so that it shows tabs for each of the standard categories\\\\\\\"\\\\n\\\\n\\\\tmodeSymbol == #categories ifTrue: [ ^self ].\\\\n\\\\n\\\\tself partsBin removeAllMorphs.\\\\n\\\\tself initializeWithTabs: self tabsForCategories.\\\\n\\\\tself modeSymbol: #categories.\\\\n\\\\tself tabsPane submorphs first doButtonAction.\\\\n! !\\\\n\\\\n!ObjectsTool methodsFor: 'categories' stamp: 'nk 9/3/2004 13:51'!\\\\nshowCategory: aCategoryName fromButton: aButton \\\\n\\\\t\\\\\\\"Project items from the given category into my lower pane\\\\\\\"\\\\n\\\\t| quads |\\\\n\\\\tself partsBin removeAllMorphs.\\\\n\\\\tCursor wait\\\\n\\\\t\\\\tshowWhile: [quads := OrderedCollection new.\\\\n\\\\t\\\\t\\\\tMorph withAllSubclasses\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:aClass | aClass theNonMetaClass\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taddPartsDescriptorQuadsTo: quads\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tif: [:aDescription | aDescription translatedCategories includes: aCategoryName]].\\\\n\\\\t\\\\t\\\\tquads := quads\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tasSortedCollection: [:q1 :q2 | q1 third <= q2 third].\\\\n\\\\t\\\\t\\\\tself installQuads: quads fromButton: aButton]! !\\\\n\\\\n!ObjectsTool methodsFor: 'categories' stamp: 'nk 8/23/2004 18:18'!\\\\ntabsForCategories\\\\n\\\\t\\\\\\\"Answer a list of buttons which, when hit, will trigger the choice of a category\\\\\\\"\\\\n\\\\n\\\\t| buttonList aButton classes categoryList basic |\\\\n\\\\tclasses _ Morph withAllSubclasses.\\\\n\\\\tcategoryList _ Set new.\\\\n\\\\tclasses do: [:aClass |\\\\n\\\\t\\\\t(aClass class includesSelector: #descriptionForPartsBin) ifTrue:\\\\n\\\\t\\\\t\\\\t[categoryList addAll: aClass descriptionForPartsBin translatedCategories].\\\\n\\\\t\\\\t(aClass class includesSelector: #supplementaryPartsDescriptions) ifTrue:\\\\n\\\\t\\\\t\\\\t[aClass supplementaryPartsDescriptions do:\\\\n\\\\t\\\\t\\\\t\\\\t[:aDescription | categoryList addAll: aDescription translatedCategories]]].\\\\n\\\\n\\\\tcategoryList _ OrderedCollection withAll: (categoryList asSortedArray).\\\\n\\\\t\\\\n\\\\tbasic := categoryList remove: ' Basic' translated ifAbsent: [ ].\\\\n\\\\tbasic ifNotNil: [ categoryList addFirst: basic ].\\\\n\\\\n\\\\tbasic := categoryList remove: 'Basic' translated ifAbsent: [ ].\\\\n\\\\tbasic ifNotNil: [ categoryList addFirst: basic ].\\\\n\\\\n\\\\tbuttonList _ categoryList collect:\\\\n\\\\t\\\\t[:catName |\\\\n\\\\t\\\\t\\\\taButton _ SimpleButtonMorph new label: catName.\\\\n\\\\t\\\\t\\\\taButton actWhen: #buttonDown.\\\\n\\\\t\\\\t\\\\taButton target: self; actionSelector: #showCategory:fromButton:; arguments: {catName. aButton}].\\\\n\\\\t^ buttonList\\\\n\\\\n\\\\\\\"ObjectsTool new tabsForCategories\\\\\\\"! !\\\\n\\\\n\\\\n!ObjectsTool methodsFor: 'initialization' stamp: 'nk 9/3/2004 13:46'!\\\\ninitializeForFlap\\\\n\\\\t\\\\\\\"Initialize the receiver to operate in a flap at the top of the screen.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"\\\\n\\\\tFlaps newObjectsFlap openInWorld\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t| buttonPane aBin aColor heights tabsPane |\\\\n\\\\tself basicInitialize.\\\\n\\\\n\\\\tself layoutInset: 0;\\\\n\\\\t\\\\tlayoutPolicy: ProportionalLayout new;\\\\n\\\\t\\\\thResizing: #shrinkWrap;\\\\n\\\\t\\\\tvResizing: #rigid;\\\\n\\\\t\\\\tborderWidth: 2; borderColor: Color darkGray;\\\\n\\\\t\\\\textent: (self minimumWidth @ self minimumHeight).\\\\n\\\\n\\\\t\\\\\\\"mode buttons\\\\\\\"\\\\n\\\\tbuttonPane := self paneForTabs: self modeTabs.\\\\n\\\\tbuttonPane\\\\n\\\\t\\\\tvResizing: #shrinkWrap;\\\\n\\\\t\\\\tsetNameTo: 'ButtonPane';\\\\n\\\\t\\\\tcolor: (aColor := buttonPane color) darker;\\\\n\\\\t\\\\tlayoutInset: 6;\\\\n\\\\t\\\\twrapDirection: nil;\\\\n\\\\t\\\\twidth: self width;\\\\n\\\\t\\\\tlayoutChanged; fullBounds.\\\\n\\\\n\\\\t\\\\\\\"Place holder for a tabs or text pane\\\\\\\"\\\\n\\\\ttabsPane := Morph new\\\\n\\\\t\\\\tsetNameTo: 'TabPane';\\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tyourself.\\\\n\\\\n\\\\theights := { buttonPane height. 40 }.\\\\n\\\\n\\\\tbuttonPane vResizing: #spaceFill.\\\\n\\\\tself\\\\n\\\\t\\\\taddMorph: buttonPane\\\\n\\\\t\\\\tfullFrame: (LayoutFrame\\\\n\\\\t\\\\t\\\\t\\\\tfractions: (0 @ 0 corner: 1 @ 0)\\\\n\\\\t\\\\t\\\\t\\\\toffsets: (0 @ 0 corner: 0 @ heights first)).\\\\n\\\\n\\\\tself\\\\n\\\\t\\\\taddMorph: tabsPane\\\\n\\\\t\\\\tfullFrame: (LayoutFrame\\\\n\\\\t\\\\t\\\\t\\\\tfractions: (0 @ 0 corner: 1 @ 0)\\\\n\\\\t\\\\t\\\\t\\\\toffsets: (0 @ heights first corner: 0 @ (heights first + heights second))).\\\\n\\\\n\\\\taBin := (PartsBin newPartsBinWithOrientation: #leftToRight from: #())\\\\n\\\\t\\\\tlistDirection: #leftToRight;\\\\n\\\\t\\\\twrapDirection: #topToBottom;\\\\n\\\\t\\\\tcolor: aColor lighter lighter;\\\\n\\\\t\\\\tsetNameTo: 'Parts';\\\\n\\\\t\\\\tdropEnabled: false;\\\\n\\\\t\\\\tvResizing: #spaceFill;\\\\n\\\\t\\\\tyourself.\\\\n\\\\n\\\\tself\\\\n\\\\t\\\\taddMorph: aBin\\\\n\\\\t\\\\tfullFrame: (LayoutFrame\\\\n\\\\t\\\\t\\\\t\\\\tfractions: (0 @ 0 corner: 1 @ 1)\\\\n\\\\t\\\\t\\\\t\\\\toffsets: (0 @ (heights first + heights second) corner: 0 @ 0)).\\\\n\\\\n\\\\taBin color: (Color orange muchLighter);\\\\n\\\\t\\\\tsetNameTo: 'Objects' translated.\\\\n\\\\n\\\\tself color: (Color orange muchLighter);\\\\n\\\\t\\\\tsetNameTo: 'Objects' translated.\\\\n! !\\\\n\\\\n!ObjectsTool methodsFor: 'initialization' stamp: 'dgd 4/4/2006 16:47'!\\\\ninitializeToStandAlone\\\\n\\\\t\\\\\\\"Initialize the receiver so that it can live as a stand-alone morph\\\\\\\"\\\\n\\\\t| buttonPane aBin aColor heights tabsPane |\\\\n\\\\tself basicInitialize.\\\\n\\\\n\\\\tself layoutInset: 0;\\\\n\\\\t\\\\tlayoutPolicy: ProportionalLayout new;\\\\n\\\\t\\\\tuseRoundedCorners;\\\\n\\\\t\\\\thResizing: #rigid;\\\\n\\\\t\\\\tvResizing: #rigid;\\\\n\\\\t\\\\textent: (self minimumWidth @ self minimumHeight).\\\\n\\\\n\\\\t\\\\\\\"mode buttons\\\\\\\"\\\\n\\\\tbuttonPane := self paneForTabs: self modeTabs.\\\\n\\\\tbuttonPane color: ColorTheme current dialogColor.\\\\n\\\\tbuttonPane\\\\n\\\\t\\\\tvResizing: #shrinkWrap;\\\\n\\\\t\\\\tsetNameTo: 'ButtonPane';\\\\n\\\\t\\\\taddMorphFront: self dismissButton;\\\\n\\\\t\\\\taddMorphBack: self helpButton;\\\\n\\\\t\\\\tcolor: (aColor := buttonPane color) darker;\\\\n\\\\t\\\\tlayoutInset: 5;\\\\n\\\\t\\\\twrapDirection: nil;\\\\n\\\\t\\\\twidth: self width;\\\\n\\\\t\\\\tlayoutChanged; fullBounds.\\\\n\\\\n\\\\t\\\\\\\"Place holder for a tabs or text pane\\\\\\\"\\\\n\\\\ttabsPane := Morph new.\\\\n\\\\ttabsPane\\\\n\\\\t\\\\tcolor: ColorTheme current dialogColor;\\\\n\\\\t\\\\tsetNameTo: 'TabPane';\\\\n\\\\t\\\\thResizing: #spaceFill.\\\\n\\\\n\\\\theights := { buttonPane height. 40 }.\\\\n\\\\n\\\\tbuttonPane vResizing: #spaceFill.\\\\n\\\\tself\\\\n\\\\t\\\\taddMorph: buttonPane\\\\n\\\\t\\\\tfullFrame: (LayoutFrame\\\\n\\\\t\\\\t\\\\t\\\\tfractions: (0 @ 0 corner: 1 @ 0)\\\\n\\\\t\\\\t\\\\t\\\\toffsets: (0 @ 0 corner: 0 @ heights first)).\\\\n\\\\n\\\\tself\\\\n\\\\t\\\\taddMorph: tabsPane\\\\n\\\\t\\\\tfullFrame: (LayoutFrame\\\\n\\\\t\\\\t\\\\t\\\\tfractions: (0 @ 0 corner: 1 @ 0)\\\\n\\\\t\\\\t\\\\t\\\\toffsets: (0 @ heights first corner: 0 @ (heights first + heights second))).\\\\n\\\\n\\\\taBin := (PartsBin newPartsBinWithOrientation: #leftToRight from: #())\\\\n\\\\t\\\\tlistDirection: #leftToRight;\\\\n\\\\t\\\\twrapDirection: #topToBottom;\\\\n\\\\t\\\\tcolor: aColor lighter lighter;\\\\n\\\\t\\\\tsetNameTo: 'Parts';\\\\n\\\\t\\\\tdropEnabled: false;\\\\n\\\\t\\\\tvResizing: #spaceFill;\\\\n\\\\t\\\\tyourself.\\\\n\\\\n\\\\tself\\\\n\\\\t\\\\taddMorph: aBin\\\\n\\\\t\\\\tfullFrame: (LayoutFrame\\\\n\\\\t\\\\t\\\\t\\\\tfractions: (0 @ 0 corner: 1 @ 1)\\\\n\\\\t\\\\t\\\\t\\\\toffsets: (0 @ (heights first + heights second) corner: 0 @ 0)).\\\\n\\\\n\\\\tself\\\\n\\\\t\\\\tborderWidth: ColorTheme current dialogBorderWidth;\\\\n\\\\t\\\\tborderColor: ColorTheme current dialogBorderColor;\\\\n\\\\t\\\\tcolor: ColorTheme current dialogColor;\\\\n\\\\t\\\\tsetNameTo: 'Objects' translated;\\\\n\\\\t\\\\tshowCategories.\\\\n! !\\\\n\\\\n!ObjectsTool methodsFor: 'initialization' stamp: 'dgd 4/4/2006 16:45'!\\\\ntweakAppearanceAfterModeShift\\\\n\\\\t\\\\\\\"After the receiver has been put into a given mode, make an initial selection of category, if appropriate, and highlight the mode button.\\\\\\\"\\\\n\\\\n\\\\tself buttonPane submorphs do:\\\\n\\\\t\\\\t[:aButton | \\\\n\\\\t\\\\t\\\\t| aColor |\\\\n\\\\t\\\\t\\\\t\\\\\\\"aButton borderWidth: 1.\\\\\\\"\\\\n\\\\t\\\\t\\\\taColor := (aButton valueOfProperty: #modeSymbol) = modeSymbol\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [Color red]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [Color black].\\\\n\\\\n\\\\t\\\\t\\\\taButton firstSubmorph color: aColor.\\\\n\\\\t\\\\t\\\\taButton borderColor: aColor.\\\\n\\\\t\\\\t].! !\\\\n\\\\n\\\\n!ObjectsTool methodsFor: 'layout' stamp: 'nk 9/3/2004 12:35'!\\\\nextent: anExtent\\\\n\\\\t\\\\\\\"The user has dragged the grow box such that the receiver's extent would be anExtent.  Do what's needed\\\\\\\"\\\\n\\\\tself extent = anExtent ifTrue: [ ^self ].\\\\n\\\\tsuper extent: anExtent.\\\\n\\\\tself fixLayoutFrames.! !\\\\n\\\\n!ObjectsTool methodsFor: 'layout' stamp: 'nk 9/3/2004 13:44'!\\\\nfixLayoutFrames\\\\n\\\\t\\\\\\\"Adjust the boundary between the tabs or search pane and the parts bin, giving preference to the tabs.\\\\\\\"\\\\n\\\\n\\\\t| oldY newY tp tpHeight |\\\\n\\\\toldY := ((tp := self tabsPane\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifNil: [self searchPane])\\\\n\\\\t\\\\t\\\\t\\\\tifNil: [^ self]) layoutFrame bottomOffset.\\\\n\\\\ttpHeight := tp hasSubmorphs\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [(tp submorphBounds outsetBy: tp layoutInset) height]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [tp height].\\\\n\\\\tnewY := (self buttonPane\\\\n\\\\t\\\\t\\\\t\\\\tifNil: [^ self]) height + tpHeight.\\\\n\\\\toldY = newY\\\\n\\\\t\\\\tifTrue: [^ self].\\\\n\\\\ttp layoutFrame bottomOffset: newY.\\\\n\\\\t(self partsBin\\\\n\\\\t\\\\tifNil: [^ self]) layoutFrame topOffset: newY.\\\\n\\\\tsubmorphs\\\\n\\\\t\\\\tdo: [:m | m layoutChanged ]! !\\\\n\\\\n!ObjectsTool methodsFor: 'layout' stamp: 'nk 9/3/2004 13:47'!\\\\nminimizePartsBinSize\\\\n\\\\tself layoutChanged; fullBounds.\\\\n\\\\tself fixLayoutFrames.\\\\n\\\\tself setExtentFromHalo: (self minimumWidth @ self minimumHeight) ! !\\\\n\\\\n!ObjectsTool methodsFor: 'layout' stamp: 'nk 9/3/2004 10:35'!\\\\nminimumBottom\\\\n\\\\t| iconsBottom partsBin |\\\\n\\\\tpartsBin := self partsBin ifNil: [ ^self bottom ].\\\\n\\\\ticonsBottom := partsBin submorphs isEmpty\\\\n\\\\t\\\\tifTrue: [ partsBin top + 60 ]\\\\n\\\\t\\\\tifFalse: [ partsBin submorphBounds bottom + partsBin layoutInset ].\\\\n\\\\n\\\\t^iconsBottom + self layoutInset + self borderWidth! !\\\\n\\\\n!ObjectsTool methodsFor: 'layout' stamp: 'nk 9/3/2004 11:53'!\\\\nminimumHeight\\\\n\\\\t^(self minimumBottom - self top) max: 280! !\\\\n\\\\n!ObjectsTool methodsFor: 'layout' stamp: 'nk 9/3/2004 12:06'!\\\\nminimumWidth\\\\n\\\\t\\\\\\\"Answer a width that assures that the alphabet fits in two rows\\\\\\\"\\\\n\\\\n\\\\t^ 300! !\\\\n\\\\n!ObjectsTool methodsFor: 'layout' stamp: 'nk 9/3/2004 12:40'!\\\\nposition: aPoint\\\\n\\\\t\\\\\\\"The user has dragged the grow box such that the receiver's extent would be anExtent.  Do what's needed\\\\\\\"\\\\n\\\\tself position = aPoint ifTrue: [ ^self ].\\\\n\\\\tsuper position: aPoint.\\\\n\\\\tself fixLayoutFrames.! !\\\\n\\\\n!ObjectsTool methodsFor: 'layout' stamp: 'nk 9/3/2004 12:44'!\\\\nsetExtentFromHalo: anExtent\\\\n\\\\t\\\\\\\"The user has dragged the grow box such that the receiver's extent would be anExtent.  Do what's needed\\\\\\\"\\\\n\\\\tsuper setExtentFromHalo: ((anExtent x max: self minimumWidth) @ (anExtent y max: self minimumHeight)).\\\\n! !\\\\n\\\\n\\\\n!ObjectsTool methodsFor: 'major modes' stamp: 'sw 8/12/2001 16:30'!\\\\nmodeSymbol\\\\n\\\\t\\\\\\\"Answer the modeSymbol\\\\\\\"\\\\n\\\\n\\\\t^ modeSymbol! !\\\\n\\\\n!ObjectsTool methodsFor: 'major modes' stamp: 'nk 9/3/2004 13:32'!\\\\nmodeSymbol: aSymbol\\\\n\\\\t\\\\\\\"Set the receiver's modeSymbol as indicated\\\\\\\"\\\\n\\\\n\\\\tmodeSymbol _ aSymbol.\\\\n\\\\tself tweakAppearanceAfterModeShift.\\\\n! !\\\\n\\\\n!ObjectsTool methodsFor: 'major modes' stamp: 'dgd 4/4/2006 16:47'!\\\\nmodeTabs\\\\n\\\\t\\\\\\\"Answer a list of buttons which, when hit, will trigger the choice of mode of the receiver\\\\\\\"\\\\n\\\\n\\\\t| buttonList aButton tupleList |\\\\n\\\\ttupleList _  #(\\\\n\\\\t\\\\t('alphabetic'\\\\t\\\\talphabetic\\\\tshowAlphabeticTabs\\\\t'A separate tab for each letter of the alphabet')\\\\n\\\\t\\\\t('find'\\\\t\\\\t\\\\t\\\\tsearch\\\\t\\\\t\\\\tshowSearchPane\\\\t\\\\t\\\\t'Provides a type-in pane allowing you to match')\\\\n\\\\t\\\\t('categories'\\\\t\\\\tcategories\\\\tshowCategories\\\\t\\\\t\\\\t'Grouped by category')\\\\n\\\\n\\\\t\\\\t\\\\\\\"('standard'\\\\t\\\\tstandard\\\\t\\\\tshowStandardPane\\\\t\\\\t'Standard Squeak tools supplies for building')\\\\\\\"\\\\n\\\\t).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\n\\\\tbuttonList _ tupleList collect:\\\\n\\\\t\\\\t[:tuple |\\\\n\\\\t\\\\t\\\\taButton _ SimpleButtonMorph new label: tuple first translated.\\\\n\\\\t\\\\t\\\\taButton actWhen: #buttonUp.\\\\n\\\\t\\\\t\\\\taButton setProperty: #modeSymbol toValue: tuple second.\\\\n\\\\t\\\\t\\\\taButton target: self; actionSelector: tuple third.\\\\n\\\\t\\\\t\\\\taButton setBalloonText: tuple fourth translated.\\\\n\\\\t\\\\t\\\\taButton borderWidth: 0.\\\\n\\\\t\\\\t\\\\taButton].\\\\n\\\\t^ buttonList\\\\n\\\\n\\\\\\\"ObjectsTool new modeTabs\\\\\\\"! !\\\\n\\\\n\\\\n!ObjectsTool methodsFor: 'menu' stamp: 'dgd 8/30/2003 16:22'!\\\\naddCustomMenuItems: aMenu hand: aHand\\\\n\\\\t\\\\\\\"Add items to the given halo-menu, given a hand\\\\\\\"\\\\n\\\\n\\\\tsuper addCustomMenuItems: aMenu hand: aHand.\\\\n\\\\taMenu addLine.\\\\n\\\\taMenu add: 'alphabetic' translated target: self selector: #showAlphabeticTabs.\\\\n\\\\taMenu add: 'find' translated target: self selector: #showSearchPane.\\\\n\\\\taMenu add: 'categories' translated target: self selector: #showCategories.\\\\n\\\\taMenu addLine.\\\\n\\\\taMenu add: 'reset thumbnails' translated target: self selector: #resetThumbnails.! !\\\\n\\\\n!ObjectsTool methodsFor: 'menu' stamp: 'nk 9/7/2003 07:42'!\\\\nresetThumbnails\\\\n\\\\t\\\\\\\"Reset the thumbnail cache\\\\\\\"\\\\n\\\\n\\\\tPartsBin clearThumbnailCache.\\\\n\\\\tmodeSymbol == #categories ifTrue: [self showCategories] ifFalse: [self showAlphabeticTabs]! !\\\\n\\\\n\\\\n!ObjectsTool methodsFor: 'search' stamp: 'nk 9/3/2004 11:20'!\\\\nnewSearchPane\\\\n\\\\t\\\\\\\"Answer a type-in pane for searches\\\\\\\"\\\\n\\\\n\\\\t| aTextMorph |\\\\n\\\\taTextMorph _ TextMorph new\\\\n\\\\t\\\\tsetProperty: #defaultContents toValue: ('' asText allBold addAttribute: (TextFontChange font3));\\\\n\\\\t\\\\tsetTextStyle: (TextStyle fontArray: { Preferences standardEToysFont });\\\\n\\\\t\\\\tsetDefaultContentsIfNil;\\\\n\\\\t\\\\ton: #keyStroke send: #searchPaneCharacter: to: self;\\\\n\\\\t\\\\tsetNameTo: 'SearchPane';\\\\n\\\\t\\\\tsetBalloonText: 'Type here and all entries that match will be shown.' translated;\\\\n\\\\t\\\\tvResizing: #shrinkWrap;\\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tmargins: 4@6;\\\\n\\\\t\\\\tbackgroundColor: Color white.\\\\n\\\\t^ aTextMorph! !\\\\n\\\\n!ObjectsTool methodsFor: 'search' stamp: 'sw 6/30/2001 14:26'!\\\\nsearchPaneCharacter: evt\\\\n\\\\t\\\\\\\"A character represented by the event handed in was typed in the search pane by the user\\\\\\\"\\\\n\\\\n\\\\t^ self showMorphsMatchingSearchString\\\\n\\\\n\\\\\\\"\\\\t| char |  *** The variant below only does a new search if RETURN or ENTER is hit ***\\\\n\\\\tchar _ evt keyCharacter.\\\\n\\\\t(char == Character enter or: [char == Character cr]) ifTrue:\\\\n\\\\t\\\\t[self showMorphsMatchingSearchString]\\\\\\\"! !\\\\n\\\\n!ObjectsTool methodsFor: 'search' stamp: 'nk 9/3/2004 10:39'!\\\\nsetSearchStringFromSearchPane\\\\n\\\\t\\\\\\\"Set the search string by obtaining its contents from the search pane, and doing a certain amount of munging\\\\\\\"\\\\n\\\\n\\\\tsearchString _ self searchPane text string asLowercase withBlanksTrimmed.\\\\n\\\\tsearchString _ searchString copyWithoutAll: {Character enter. Character cr}! !\\\\n\\\\n!ObjectsTool methodsFor: 'search' stamp: 'nk 9/3/2004 13:51'!\\\\nshowMorphsMatchingSearchString\\\\n\\\\t\\\\\\\"Put items matching the search string into my lower pane\\\\\\\"\\\\n\\\\t| quads |\\\\n\\\\tself setSearchStringFromSearchPane.\\\\n\\\\tself partsBin removeAllMorphs.\\\\n\\\\tCursor wait\\\\n\\\\t\\\\tshowWhile: [quads := OrderedCollection new.\\\\n\\\\t\\\\t\\\\tMorph withAllSubclasses\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:aClass | aClass\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taddPartsDescriptorQuadsTo: quads\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tif: [:info | info formalName translated includesSubstring: searchString caseSensitive: false]].\\\\n\\\\t\\\\t\\\\tself installQuads: quads fromButton: nil]! !\\\\n\\\\n!ObjectsTool methodsFor: 'search' stamp: 'nk 9/3/2004 12:13'!\\\\nshowSearchPane\\\\n\\\\t\\\\\\\"Set the receiver up so that it shows the search pane\\\\\\\"\\\\n\\\\n\\\\t| tabsPane aPane frame |\\\\n\\\\tmodeSymbol == #search ifTrue: [ ^self ].\\\\n\\\\n\\\\tself partsBin removeAllMorphs.\\\\n\\\\n\\\\ttabsPane := self tabsPane.\\\\n\\\\taPane _ self newSearchPane.\\\\n\\\\taPane layoutChanged; fullBounds.\\\\n\\\\n\\\\taPane layoutFrame: (frame := tabsPane layoutFrame copy).\\\\n\\\\tframe bottomOffset: (frame topOffset + aPane height).\\\\n\\\\tself replaceSubmorph: tabsPane by: aPane.\\\\n\\\\tself partsBin layoutFrame topOffset: frame bottomOffset.\\\\n\\\\n\\\\tself modeSymbol: #search.\\\\n\\\\tself showMorphsMatchingSearchString.\\\\n\\\\tActiveHand newKeyboardFocus: aPane! !\\\\n\\\\n\\\\n!ObjectsTool methodsFor: 'submorph access' stamp: 'nk 9/3/2004 08:06'!\\\\nbuttonPane\\\\n\\\\t\\\\\\\"Answer the receiver's button pane, nil if none\\\\\\\"\\\\n\\\\n\\\\t^ self submorphNamed: 'ButtonPane' ifNone: [].! !\\\\n\\\\n!ObjectsTool methodsFor: 'submorph access' stamp: 'nk 9/3/2004 08:09'!\\\\npartsBin\\\\n\\\\t^self findDeeplyA: PartsBin.! !\\\\n\\\\n!ObjectsTool methodsFor: 'submorph access' stamp: 'nk 9/3/2004 10:40'!\\\\nsearchPane\\\\n\\\\t\\\\\\\"Answer the receiver's search pane, nil if none\\\\\\\"\\\\n\\\\n\\\\t^ self submorphNamed: 'SearchPane' ifNone: [].! !\\\\n\\\\n!ObjectsTool methodsFor: 'submorph access' stamp: 'nk 9/3/2004 13:51'!\\\\nshowAlphabeticCategory: aString fromButton: aButton \\\\n\\\\t\\\\\\\"Blast items beginning with a given letter into my lower pane\\\\\\\"\\\\n\\\\t| eligibleClasses quads uc |\\\\n\\\\tself partsBin removeAllMorphs.\\\\n\\\\tuc := aString asUppercase asCharacter.\\\\n\\\\tCursor wait\\\\n\\\\t\\\\tshowWhile: [eligibleClasses := Morph withAllSubclasses.\\\\n\\\\t\\\\t\\\\tquads := OrderedCollection new.\\\\n\\\\t\\\\t\\\\teligibleClasses\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:aClass | aClass theNonMetaClass\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taddPartsDescriptorQuadsTo: quads\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tif: [:info | info formalName translated asUppercase first = uc]].\\\\n\\\\t\\\\t\\\\tself installQuads: quads fromButton: aButton]! !\\\\n\\\\n!ObjectsTool methodsFor: 'submorph access' stamp: 'nk 9/3/2004 08:06'!\\\\ntabsPane\\\\n\\\\t\\\\\\\"Answer the receiver's tabs pane, nil if none\\\\\\\"\\\\n\\\\n\\\\t^ self submorphNamed: 'TabPane' ifNone: [].! !\\\\n\\\\n\\\\n!ObjectsTool methodsFor: 'tabs' stamp: 'nk 9/3/2004 13:47'!\\\\ninitializeWithTabs: tabList\\\\n\\\\t\\\\\\\"Initialize the receiver to have the given tabs\\\\\\\"\\\\n\\\\t| oldPane newPane |\\\\n\\\\toldPane := self tabsPane ifNil: [ self searchPane ].\\\\n\\\\tnewPane := (self paneForTabs: tabList)\\\\n\\\\t\\\\tsetNameTo: 'TabPane';\\\\n\\\\t\\\\tyourself.\\\\n\\\\tnewPane layoutFrame: oldPane layoutFrame.\\\\n\\\\tself replaceSubmorph: oldPane by: newPane.\\\\n\\\\tnewPane layoutChanged; fullBounds.\\\\n\\\\tself fixLayoutFrames.\\\\n\\\\n! !\\\\n\\\\n!ObjectsTool methodsFor: 'tabs' stamp: 'dgd 4/4/2006 16:44'!\\\\npaneForTabs: tabList \\\\n\\\\t\\\\\\\"Answer a pane bearing tabs for the given list\\\\\\\"\\\\n\\\\t| aPane |\\\\n\\\\ttabList do: [:t |\\\\n\\\\t\\\\t\\\\tt color: Color transparent.\\\\n\\\\t\\\\t\\\\tt borderWidth: 1;\\\\n\\\\t\\\\t\\\\t\\\\tborderColor: Color black].\\\\n\\\\n\\\\taPane := AlignmentMorph newRow\\\\n\\\\t\\\\t\\\\t\\\\tcolor: ColorTheme current dialogColor;\\\\n\\\\t\\\\t\\\\t\\\\tlistDirection: #leftToRight;\\\\n\\\\t\\\\t\\\\t\\\\twrapDirection: #topToBottom;\\\\n\\\\t\\\\t\\\\t\\\\tvResizing: #spaceFill;\\\\n\\\\t\\\\t\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\t\\\\t\\\\tcellInset: 6;\\\\n\\\\t\\\\t\\\\t\\\\tlayoutInset: 4;\\\\n\\\\t\\\\t\\\\t\\\\tlistCentering: #center;\\\\n\\\\t\\\\t\\\\t\\\\tlistSpacing: #equal;\\\\n\\\\t\\\\t\\\\t\\\\taddAllMorphs: tabList;\\\\n\\\\t\\\\t\\\\t\\\\tyourself.\\\\n\\\\n\\\\taPane width: self layoutBounds width.\\\\n\\\\n\\\\t^ aPane! !\\\\n\\\\n!ObjectsTool methodsFor: 'tabs' stamp: 'dgd 8/30/2003 16:09'!\\\\npresentHelp\\\\n\\\\t\\\\\\\"Sent when a Help button is hit; provide the user with some form of help for the tool at hand\\\\\\\"\\\\n\\\\n'The Objects tool allows you to browse through, and obtain copies of, many kinds of objects.  \\\\n\\\\nYou can obtain an Objects tool by choosing \\\\\\\"Objects\\\\\\\" from the world menu, or by the shortcut of typing alt-o (cmd-o) any time the cursor is over the desktop.\\\\n\\\\nThere are three ways to use Objects, corresponding to the three tabs seen at the top:\\\\n\\\\nalphabetic - gives you separate tabs for a, b, c, etc.  Click any tab, and you will see the icons of all the objects whose names begin with that letter\\\\n\\\\nsearch - gives you a type-in pane for a search string.  Type any letters there, and icons of all the objects whose names match what you have typed will appear in the bottom pane.\\\\n\\\\ncategories - provides tabs representing categories of related items.  Click on any tab to see the icons of all the objects in the category.\\\\n\\\\nWhen the cursor lingers over the icon of any object, you will get balloon help for the item.\\\\n\\\\nWhen you drag an icon from Objects, it will result in a new copy of it in your hand; the new object will be deposited wherever you next click.' translated\\\\n\\\\n\\\\topenInWorkspaceWithTitle: 'About Objects' translated! !\\\\n\\\\n\\\\n!ObjectsTool methodsFor: 'thumbnail' stamp: 'dgd 9/22/2004 19:28'!\\\\nicon\\\\n\\\\t\\\\\\\"Answer a form with an icon to represent the receiver\\\\\\\"\\\\n\\\\t^ MenuIcons objectCatalogIcon! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nObjectsTool class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!ObjectsTool class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 10:45'!\\\\ninitialize\\\\n\\\\n\\\\tself registerInFlapsRegistry.\\\\t! !\\\\n\\\\n!ObjectsTool class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 10:47'!\\\\nregisterInFlapsRegistry\\\\n\\\\t\\\\\\\"Register the receiver in the system's flaps registry\\\\\\\"\\\\n\\\\tself environment\\\\n\\\\t\\\\tat: #Flaps\\\\n\\\\t\\\\tifPresent: [:cl | cl registerQuad: #(ObjectsTool\\\\t\\\\t\\\\tnewStandAlone\\\\t\\\\t\\\\t\\\\t'Object Catalog'\\\\t\\\\t'A tool that lets you browse the catalog of objects')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'PlugIn Supplies'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcl registerQuad: #(ObjectsTool\\\\t\\\\tnewStandAlone\\\\t\\\\t\\\\t\\\\t'Object Catalog'\\\\t\\\\t'A tool that lets you browse the catalog of objects')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'Widgets'.]! !\\\\n\\\\n!ObjectsTool class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 12:37'!\\\\nunload\\\\n\\\\t\\\\\\\"Unload the receiver from global registries\\\\\\\"\\\\n\\\\n\\\\tself environment at: #Flaps ifPresent: [:cl |\\\\n\\\\tcl unregisterQuadsWithReceiver: self] ! !\\\\n\\\\n\\\\n!ObjectsTool class methodsFor: 'parts bin' stamp: 'sw 8/11/2001 20:16'!\\\\ndescriptionForPartsBin\\\\n\\\\t^ self partName:\\\\t'Objects'\\\\n\\\\t\\\\tcategories:\\\\t\\\\t#('Useful')\\\\n\\\\t\\\\tdocumentation:\\\\t'A place to obtain many kinds of objects'! !\\\\nOldSocket subclass: #OldSimpleClientSocket\\\\n\\\\tinstanceVariableNames: 'buffer bufferPos'\\\\n\\\\tclassVariableNames: 'CR CrLf LF'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Network-Kernel'!\\\\n!OldSimpleClientSocket commentStamp: '<historical>' prior: 0!\\\\nThis class supports client for simple network protocols based on sending textual commands and responses. Examples of such protocols include POP3 (mail retrieval), SMTP (mail posting), HTTP (web browsing), and NTTP (network news). Some simple examples are presented as class methods, but a full-service client of some service should be implemented as a subclass.\\\\n\\\\nThe basic services provided by this class are:\\\\n\\\\tsendCommand:\\\\t\\\\t\\\\t-- sends a command line terminate with <CR><LF>\\\\n\\\\tgetResponse\\\\t\\\\t\\\\t\\\\t-- gets a single-line response to a command\\\\n\\\\tgetMultilineResponse\\\\t-- gets a multiple line response terminated by a period\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t-- on a line by itself\\\\n\\\\nThere are variants of the getResponse commands that display lines on the screen as they are being received. Linefeeds are stripped out of all responses.\\\\n\\\\nThe 'get' commands above make use of an internal buffer.  So intermixing these two commands and regular Socket recieve commands can cause problems.!\\\\n\\\\n\\\\n!OldSimpleClientSocket methodsFor: 'as yet unclassified' stamp: 'di 4/13/1999 14:43'!\\\\ndisplayString: aString\\\\n\\\\t\\\\\\\"Display the given string on the Display. Used for testing.\\\\\\\"\\\\n\\\\n\\\\t| s |\\\\n\\\\taString isEmpty ifTrue: [^ self].\\\\n\\\\taString size > 60\\\\n\\\\t\\\\tifTrue: [s _ aString copyFrom: 1 to: 60]  \\\\\\\"limit to 60 characters\\\\\\\"\\\\n\\\\t\\\\tifFalse: [s _ aString].\\\\n\\\\n\\\\ts displayOn: Display.\\\\n! !\\\\n\\\\n!OldSimpleClientSocket methodsFor: 'as yet unclassified' stamp: 'jm 9/15/97 15:43'!\\\\ngetMultilineResponse\\\\n\\\\t\\\\\\\"Get a multiple line response to the last command, filtering out LF characters. A multiple line response ends with a line containing only a single period (.) character.\\\\\\\"\\\\n\\\\n\\\\t^ self getMultilineResponseShowing: false.\\\\n! !\\\\n\\\\n!OldSimpleClientSocket methodsFor: 'as yet unclassified' stamp: 'ls 9/11/1998 03:34'!\\\\ngetMultilineResponseShowing: showFlag\\\\n\\\\t\\\\\\\"Get a multiple line response to the last command. A multiple line response ends with a line containing only a single period (.) character. Linefeed characters are filtered out. If showFlag is true, each line is shown in the upper-left corner of the Display as it is received.\\\\\\\"\\\\n\\\\n\\\\t| response done chunk |\\\\n\\\\tresponse _ WriteStream on: ''.\\\\n\\\\tdone _ false.\\\\n\\\\t[done] whileFalse: [\\\\n\\\\t\\\\tshowFlag\\\\n\\\\t\\\\t\\\\tifTrue: [chunk _ self getResponseShowing: true]\\\\n\\\\t\\\\t\\\\tifFalse: [chunk _ self getResponse].\\\\n\\\\t\\\\t(chunk beginsWith: '.')\\\\n\\\\t\\\\t\\\\tifTrue: [ response nextPutAll: (chunk copyFrom: 2 to: chunk size) ]\\\\n\\\\t\\\\t\\\\tifFalse: [ response nextPutAll: chunk ].\\\\n\\\\t\\\\tdone _ (chunk = ('.', String cr)) ].\\\\n\\\\n\\\\t^ response contents\\\\n! !\\\\n\\\\n!OldSimpleClientSocket methodsFor: 'as yet unclassified' stamp: 'ls 9/11/1998 02:10'!\\\\ngetResponse\\\\n\\\\t\\\\\\\"Get a one-line response from the server.  The final LF is removed from the line, but the CR is left, so that the line is in Squeak's text format\\\\\\\"\\\\n\\\\n\\\\t^ self getResponseShowing: false\\\\n! !\\\\n\\\\n!OldSimpleClientSocket methodsFor: 'as yet unclassified' stamp: 'ls 9/11/1998 03:27'!\\\\ngetResponseShowing: showFlag\\\\n\\\\n\\\\t| line idx |\\\\n\\\\tline _ WriteStream on: String new.\\\\n\\\\n\\\\tbuffer ifNil: [\\\\n\\\\t\\\\tbuffer _ String new.\\\\n\\\\t\\\\tbufferPos _ 0 ].\\\\n\\\\n\\\\t[\\\\n\\\\t\\\\t\\\\\\\"look for a LF in the buffer\\\\\\\"\\\\n\\\\t\\\\tidx _ buffer indexOf: Character lf startingAt: bufferPos+1 ifAbsent: [ 0 ].\\\\n\\\\t\\\\tidx > 0 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\\\\"found it!! we have a line\\\\\\\"\\\\n\\\\t\\\\t\\\\tline nextPutAll: (buffer copyFrom: bufferPos+1 to: idx-1).\\\\n\\\\t\\\\t\\\\tbufferPos _ idx.\\\\n\\\\t\\\\t\\\\t^line contents ].\\\\n\\\\t\\\\t\\\\n\\\\t\\\\t\\\\\\\"didn't find it.  add the whole buffer to the line, and retrieve some more data\\\\\\\"\\\\n\\\\t\\\\tline nextPutAll: (buffer copyFrom: bufferPos+1 to: buffer size).\\\\n\\\\t\\\\tbufferPos _ 0.\\\\n\\\\t\\\\tbuffer _ String new.\\\\n\\\\t\\\\tself waitForDataQueryingUserEvery: 30.\\\\n\\\\t\\\\tbuffer _ self getData.\\\\n\\\\n\\\\t\\\\ttrue\\\\n\\\\t] whileTrue.! !\\\\n\\\\n!OldSimpleClientSocket methodsFor: 'as yet unclassified' stamp: 'jm 9/17/97 16:00'!\\\\nsendCommand: commandString\\\\n\\\\t\\\\\\\"Send the given command as a single line followed by a <CR><LF> terminator.\\\\\\\"\\\\n\\\\n\\\\tself sendData: commandString, CrLf.\\\\n! !\\\\n\\\\n!OldSimpleClientSocket methodsFor: 'as yet unclassified' stamp: 'jm 9/16/1998 14:37'!\\\\nwaitForDataQueryingUserEvery: seconds\\\\n\\\\t\\\\\\\"Wait for data to arrive, asking the user periodically if they wish to keep waiting. If they don't wish to keep waiting, destroy the socket and raise an error.\\\\\\\"\\\\n\\\\n\\\\t| gotData |\\\\n\\\\tgotData _ false.\\\\n\\\\t[gotData]\\\\n\\\\t\\\\twhileFalse: [\\\\n\\\\t\\\\t\\\\tgotData _ self waitForDataUntil: (Socket deadlineSecs: seconds).\\\\n\\\\t\\\\t\\\\tgotData ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tself isConnected ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself destroy.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself error: 'server closed connection'].\\\\n\\\\t\\\\t\\\\t\\\\t(self confirm: 'server not responding; keep trying?')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself destroy.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself error: 'no response from server']]].\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOldSimpleClientSocket class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'class initialization' stamp: 'jm 9/15/97 11:42'!\\\\ninitialize\\\\n\\\\t\\\\\\\"SimpleClientSocket initialize\\\\\\\"\\\\n\\\\n\\\\tCR _ Character cr.\\\\n\\\\tLF _ Character linefeed.\\\\n\\\\n\\\\t\\\\\\\"string for command line termination:\\\\\\\"\\\\n\\\\tCrLf _ String with: CR with: LF.\\\\n! !\\\\n\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'net news example' stamp: 'mir 5/13/2003 10:45'!\\\\nnntpTest\\\\n\\\\t\\\\\\\"SimpleClientSocket nntpTest\\\\\\\"\\\\n\\\\n\\\\t| addr s headers msgs header allNewsGroups |\\\\n\\\\taddr _ NetNameResolver promptUserForHostAddress.\\\\n\\\\ts _ OldSimpleClientSocket new.\\\\n\\\\tTranscript show: '---------- Connecting ----------'; cr.\\\\n\\\\ts connectTo: addr port: 119.  \\\\\\\"119 is the NNTP port number\\\\\\\"\\\\n\\\\ts waitForConnectionUntil: self standardDeadline.\\\\n\\\\tTranscript show: s getResponse.\\\\n\\\\ts sendCommand: 'group comp.lang.smalltalk'.\\\\n\\\\tTranscript show: s getResponse.\\\\n\\\\n\\\\t\\\\\\\"get all the message headers for the current newsgroup\\\\\\\"\\\\n\\\\ts sendCommand: 'xover 1-1000000'.\\\\n\\\\theaders _ s getMultilineResponseShowing: true.\\\\n\\\\n\\\\t\\\\\\\"print the headers of the first 10 messages of comp.lang.smalltalk\\\\\\\"\\\\n\\\\ts sendCommand: 'listgroup comp.lang.smalltalk'.\\\\n\\\\tmsgs _ self parseIntegerList: s getMultilineResponse.\\\\n\\\\tmsgs ifNotNil: [\\\\n\\\\t\\\\t1 to: 5 do: [:i |\\\\n\\\\t\\\\t\\\\ts sendCommand: 'head ', (msgs at: i) printString.\\\\n\\\\t\\\\t\\\\theader _ s getMultilineResponse.\\\\n\\\\t\\\\t\\\\tTranscript show: (self extractDateFromAndSubjectFromHeader: header); cr]].\\\\n\\\\n\\\\t\\\\\\\"get a full list of usenet newsgroups\\\\\\\"\\\\n\\\\ts sendCommand: 'newgroups 010101 000000'.\\\\n\\\\tallNewsGroups _ s getMultilineResponse.\\\\n\\\\tTranscript show: allNewsGroups size printString, ' bytes in full newsgroup list'; cr.\\\\n\\\\n\\\\tTranscript show: 'Sending quit...'; cr.\\\\n\\\\ts sendCommand: 'QUIT'.\\\\n\\\\tTranscript show: s getResponse.\\\\n\\\\ts closeAndDestroy.\\\\n\\\\tTranscript show: '---------- Connection Closed ----------'; cr; endEntry.\\\\n\\\\n\\\\t(headers ~~ nil and:\\\\n\\\\t [self confirm: 'show article headers from comp.lang.smalltalk?'])\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t(StringHolder new contents: (self parseHeaderList: headers))\\\\n\\\\t\\\\t\\\\t\\\\topenLabel: 'Newsgroup Headers'].\\\\n\\\\n\\\\t(allNewsGroups ~~ nil and:\\\\n\\\\t [self confirm: 'show list of all newsgroups available on your server?'])\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t(StringHolder new contents: allNewsGroups)\\\\n\\\\t\\\\t\\\\t\\\\topenLabel: 'All Usenet Newsgroups'].\\\\n! !\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'net news example' stamp: 'jm 9/15/97 13:25'!\\\\nparseHeaderList: aString\\\\n\\\\t\\\\\\\"Parse a list of newsgroup headers.\\\\\\\"\\\\n\\\\n\\\\t| results s lineStart |\\\\n\\\\tresults _ WriteStream on: (String new: aString size).\\\\n\\\\ts _ ReadStream on: aString.\\\\n\\\\t[s atEnd]\\\\n\\\\t\\\\twhileFalse: [\\\\n\\\\t\\\\t\\\\tlineStart _ s position + 1.\\\\n\\\\t\\\\t\\\\t3 timesRepeat: [s skipTo: Character tab].  \\\\\\\"find fourth tab\\\\\\\"\\\\n\\\\t\\\\t\\\\tlineStart to: s position - 1 do: [:i | results nextPut: (aString at: i)].\\\\n\\\\t\\\\t\\\\tresults cr.\\\\n\\\\t\\\\t\\\\ts skipTo: Character cr].\\\\n\\\\t^ results contents\\\\n! !\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'net news example' stamp: 'jm 9/15/97 13:26'!\\\\nparseIntegerList: aString\\\\n\\\\t\\\\\\\"Parse a list of integers, each on a line by itself.\\\\\\\"\\\\n\\\\n\\\\t| s out |\\\\n\\\\ts _ ReadStream on: aString.\\\\n\\\\ts skipTo: Character cr.  \\\\\\\"skip the first line\\\\\\\"\\\\n\\\\tout _ OrderedCollection new.\\\\n\\\\t[s atEnd]\\\\n\\\\t\\\\twhileFalse: [\\\\n\\\\t\\\\t\\\\tout addLast: (Integer readFrom: s).\\\\n\\\\t\\\\t\\\\ts skipTo: Character cr].\\\\n\\\\t^ out asArray\\\\n! !\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'net news example' stamp: 'jm 9/15/97 13:26'!\\\\nparseNTTPMsgList: aString\\\\n\\\\t\\\\\\\"Parse a list of integers, each on a line by itself.\\\\\\\"\\\\n\\\\n\\\\t| s out |\\\\n\\\\ts _ ReadStream on: aString.\\\\n\\\\ts skipTo: Character cr.  \\\\\\\"skip the first line\\\\\\\"\\\\n\\\\tout _ OrderedCollection new.\\\\n\\\\t[s atEnd]\\\\n\\\\t\\\\twhileFalse: [\\\\n\\\\t\\\\t\\\\tout addLast: (Integer readFrom: s).\\\\n\\\\t\\\\t\\\\ts skipTo: Character cr].\\\\n\\\\t^ out asArray\\\\n! !\\\\n\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'other examples' stamp: 'mir 5/13/2003 10:45'!\\\\nfinger: userName\\\\n\\\\t\\\\\\\"OldSimpleClientSocket finger: 'stp'\\\\\\\"\\\\n\\\\n\\\\t| addr s |\\\\n\\\\taddr _ NetNameResolver promptUserForHostAddress.\\\\n\\\\ts _ OldSimpleClientSocket new.\\\\n\\\\tTranscript show: '---------- Connecting ----------'; cr.\\\\n\\\\ts connectTo: addr port: 79.  \\\\\\\"finger port number\\\\\\\"\\\\n\\\\ts waitForConnectionUntil: self standardDeadline.\\\\n\\\\ts sendCommand: userName.\\\\n\\\\tTranscript show: s getResponse.\\\\n\\\\ts closeAndDestroy.\\\\n\\\\tTranscript show: '---------- Connection Closed ----------'; cr; endEntry.\\\\n! !\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'other examples' stamp: 'mir 5/13/2003 10:45'!\\\\nhttpTestHost: hostName port: port url: url\\\\n\\\\t\\\\\\\"This test fetches a URL from the given host and port.\\\\\\\"\\\\n\\\\t\\\\\\\"SimpleClientSocket httpTestHost: 'www.disney.com' port: 80 url: '/'\\\\\\\"\\\\n\\\\t\\\\\\\"Tests URL fetch through a local HTTP proxie server:\\\\n\\\\t\\\\t(SimpleClientSocket\\\\n\\\\t\\\\t\\\\thttpTestHost: '127.0.0.1'\\\\n\\\\t\\\\t\\\\tport: 8080\\\\n\\\\t\\\\t\\\\turl: 'HTTP://www.exploratorium.edu/index.html')\\\\\\\"\\\\n\\\\n\\\\t| hostAddr s result buf bytes totalBytes t |\\\\n\\\\tTranscript cr; show: 'starting http test'; cr.\\\\n\\\\tSocket initializeNetwork.\\\\n\\\\thostAddr _ NetNameResolver addressForName: hostName timeout: 10.\\\\n\\\\thostAddr = nil ifTrue: [^ self inform: 'Could not find an address for ', hostName].\\\\n\\\\n\\\\ts _ OldSimpleClientSocket new.\\\\n\\\\tTranscript show: '---------- Connecting ----------'; cr.\\\\n\\\\ts connectTo: hostAddr port: port.\\\\n\\\\ts waitForConnectionUntil: \\\\\\\"self standardDeadline\\\\\\\" (Socket deadlineSecs: 10).\\\\n\\\\t(s isConnected) ifFalse: [\\\\n\\\\t\\\\ts destroy.\\\\n\\\\t\\\\t^ self inform: 'could not connect'].\\\\n\\\\tTranscript show: 'connection open; waiting for data'; cr.\\\\n\\\\n\\\\ts sendCommand: 'GET ', url, ' HTTP/1.0'.\\\\n\\\\ts sendCommand: 'User-Agent: Squeak 1.19'.\\\\n\\\\ts sendCommand: 'ACCEPT: text/html'.\\\\t\\\\\\\"always accept plain text\\\\\\\"\\\\n\\\\ts sendCommand: 'ACCEPT: application/octet-stream'.  \\\\\\\"also accept binary data\\\\\\\"\\\\n\\\\ts sendCommand: ''.  \\\\\\\"blank line\\\\\\\"\\\\n\\\\n\\\\tresult _ WriteStream on: (String new: 10000).\\\\n\\\\tbuf _ String new: 10000.\\\\n\\\\ttotalBytes _ 0.\\\\n\\\\tt _ Time millisecondsToRun: [\\\\n\\\\t\\\\t[s isConnected] whileTrue: [\\\\n\\\\t\\\\t\\\\ts waitForDataUntil: (Socket deadlineSecs: 5).\\\\n\\\\t\\\\t\\\\tbytes _ s receiveDataInto: buf.\\\\n\\\\t\\\\t\\\\t1 to: bytes do: [:i | result nextPut: (buf at: i)].\\\\n\\\\t\\\\t\\\\ttotalBytes _ totalBytes + bytes.\\\\n\\\\t\\\\t\\\\tTranscript show: totalBytes printString, ' bytes received'; cr]].\\\\n\\\\n\\\\ts destroy.\\\\n\\\\tTranscript show: '---------- Connection Closed ----------'; cr; endEntry.\\\\n\\\\tTranscript show: 'http test done; ', totalBytes printString, ' bytes read in '.\\\\n\\\\tTranscript show: ((t / 1000.0) roundTo: 0.01) printString, ' seconds'; cr.\\\\n\\\\tTranscript show: ((totalBytes asFloat / t) roundTo: 0.01) printString, ' kBytes/sec'; cr.\\\\n\\\\tTranscript endEntry.\\\\n\\\\t(StringHolder new contents: (result contents))\\\\n\\\\t\\\\topenLabel: 'HTTP Test Result: URL Contents'.\\\\n! !\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'other examples' stamp: 'mir 5/13/2003 10:45'!\\\\ntimeTest\\\\n\\\\t\\\\\\\"SimpleClientSocket timeTest\\\\\\\"\\\\n\\\\n\\\\t| addr s |\\\\n\\\\taddr _ NetNameResolver promptUserForHostAddress.\\\\n\\\\ts _ OldSimpleClientSocket new.\\\\n\\\\tTranscript show: '---------- Connecting ----------'; cr.\\\\n\\\\ts connectTo: addr port: 13.  \\\\\\\"time port number\\\\\\\"\\\\n\\\\ts waitForConnectionUntil: self standardDeadline.\\\\n\\\\tTranscript show: s getResponse.\\\\n\\\\ts closeAndDestroy.\\\\n\\\\tTranscript show: '---------- Connection Closed ----------'; cr; endEntry.\\\\n! !\\\\n\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'POP mail example' stamp: 'jm 9/15/97 14:47'!\\\\nextractDateFromAndSubjectFromHeader: headerString\\\\n\\\\n\\\\t| date from subject s lineBuf c line i |\\\\n\\\\tdate _ from _ subject _ ''.\\\\n\\\\ts _ ReadStream on: headerString.\\\\n\\\\tlineBuf _ WriteStream on: ''.\\\\n\\\\t[s atEnd] whileFalse: [\\\\n\\\\t\\\\tc _ s next.\\\\n\\\\t\\\\tc = CR\\\\n\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tline _ lineBuf contents.\\\\n\\\\t\\\\t\\\\t\\\\t(line beginsWith: 'Date: ')\\\\tifTrue: [date _ line copyFrom: 7 to: line size].\\\\n\\\\t\\\\t\\\\t\\\\t(line beginsWith: 'From: ')\\\\tifTrue: [from _ line copyFrom: 7 to: line size].\\\\n\\\\t\\\\t\\\\t\\\\t(line beginsWith: 'Subject: ')\\\\tifTrue: [subject _ line copyFrom: 10 to: line size].\\\\n\\\\t\\\\t\\\\t\\\\tlineBuf _ WriteStream on: '']\\\\n\\\\t\\\\t\\\\tifFalse: [lineBuf nextPut: c]].\\\\n\\\\n\\\\ti _ date indexOf: $' ifAbsent: [0].\\\\n\\\\tdate _ date copyFrom: i + 1 to: date size.\\\\n\\\\t^ (self simpleDateString: date), ', ', from, ':\\\\n  ', subject\\\\n! !\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'POP mail example' stamp: 'rbb 3/1/2005 11:02'!\\\\npopTest\\\\n\\\\t\\\\\\\"SimpleClientSocket popTest\\\\\\\"\\\\n\\\\n\\\\t| addr userName userPassword s msgs header |\\\\n\\\\taddr := NetNameResolver promptUserForHostAddress.\\\\n\\\\tuserName := UIManager default\\\\n\\\\t\\\\trequest: 'What is your email name?'\\\\n\\\\t\\\\tinitialAnswer: 'johnm'.\\\\n\\\\tuserPassword := UIManager default\\\\n\\\\t\\\\trequest: 'What is your email password?'.\\\\n\\\\n\\\\ts := OldSimpleClientSocket new.\\\\n\\\\tTranscript show: '---------- Connecting ----------'; cr.\\\\n\\\\ts connectTo: addr port: 110.  \\\\\\\"110 is the POP3 port number\\\\\\\"\\\\n\\\\ts waitForConnectionUntil: self standardDeadline.\\\\n\\\\tTranscript show: s getResponse.\\\\n\\\\ts sendCommand: 'USER ', userName.\\\\n\\\\tTranscript show: s getResponse.\\\\n\\\\ts sendCommand: 'PASS ', userPassword.\\\\n\\\\tTranscript show: s getResponse.\\\\n\\\\ts sendCommand: 'LIST'.\\\\n\\\\n\\\\t\\\\\\\"the following should be tweaked to handle an empy mailbox:\\\\\\\"\\\\n\\\\tmsgs := self parseIntegerList: s getMultilineResponse.\\\\n\\\\n\\\\t1 to: (msgs size min: 5) do: [ :i |\\\\n\\\\t\\\\ts sendCommand: 'TOP ', (msgs at: i) printString, ' 0'.\\\\n\\\\t\\\\theader := s getMultilineResponse.\\\\n\\\\t\\\\tTranscript show: (self extractDateFromAndSubjectFromHeader: header); cr].\\\\n\\\\n\\\\tmsgs size > 0 ifTrue: [\\\\n\\\\t\\\\t\\\\\\\"get the first message\\\\\\\"\\\\n\\\\t\\\\ts sendCommand: 'RETR 1'.\\\\n\\\\t\\\\tTranscript show: s getMultilineResponse].\\\\n\\\\n\\\\tTranscript show: 'closing connection'; cr.\\\\n\\\\ts sendCommand: 'QUIT'.\\\\n\\\\ts closeAndDestroy.\\\\n\\\\tTranscript show: '---------- Connection Closed ----------'; cr; endEntry.\\\\n! !\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'POP mail example' stamp: 'tk 4/10/1998 06:47'!\\\\nsimpleDateString: dateString\\\\n\\\\n\\\\t| s |\\\\n\\\\ts _ ReadStream on: dateString.\\\\n\\\\ts skipTo: $,.  \\\\\\\"scan thru first comma\\\\\\\"\\\\n\\\\ts atEnd ifTrue: [s reset].  \\\\\\\"no comma found; reset s\\\\\\\"\\\\n\\\\ts skipSeparators.\\\\n\\\\t^ (Date readFrom: s) mmddyyyy\\\\n! !\\\\n\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'queries' stamp: 'jm 2/26/98 09:50'!\\\\ncrLf\\\\n\\\\n\\\\t^ CrLf\\\\n! !\\\\n\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'remote cursor example' stamp: 'mir 5/13/2003 10:45'!\\\\nforkingRemoteCursorSender\\\\n\\\\t\\\\\\\"This is the client side of a test that sends samples of the local input sensor state to the server, which may be running on a local or remote host. This method opens the connection, then forks a process to send the cursor data. Data is sent continuously until the user clicks in a 20x20 pixel square at the top-left corner of the display. The server should be started first. Note the server's address, since this method will prompt you for it.\\\\\\\"\\\\n\\\\t\\\\\\\"SimpleClientSocket forkingRemoteCursorSender\\\\\\\"\\\\n\\\\n\\\\t| sock addr stopRect |\\\\n\\\\tTranscript show: 'starting remote cursor sender'; cr.\\\\n\\\\tTranscript show: 'initializing network'; cr.\\\\n\\\\tSocket initializeNetwork.\\\\n\\\\taddr _ NetNameResolver promptUserForHostAddress.\\\\n\\\\tTranscript show: 'opening connection'; cr.\\\\n\\\\tsock _ OldSimpleClientSocket new.\\\\n\\\\tsock connectTo: addr port: 54323.\\\\n\\\\tsock waitForConnectionUntil: self standardDeadline.\\\\n\\\\t(sock isConnected) ifFalse: [self error: 'sock not connected'].\\\\n\\\\tTranscript show: 'connection established'; cr.\\\\n\\\\n\\\\tstopRect _ 0@0 corner: 20@20.  \\\\\\\"click in this rectangle to stop sending\\\\\\\"\\\\n\\\\tDisplay reverse: stopRect.\\\\n\\\\t[\\\\\\\"the sending process\\\\\\\"\\\\n\\\\t\\\\t[(stopRect containsPoint: Sensor cursorPoint) and:\\\\n\\\\t\\\\t [Sensor anyButtonPressed]]\\\\n\\\\t\\\\t\\\\twhileFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tsock sendCommand: self sensorStateString.\\\\n\\\\t\\\\t\\\\t\\\\t(Delay forMilliseconds: 20) wait].\\\\n\\\\n\\\\t\\\\tsock waitForSendDoneUntil: self standardDeadline.\\\\n\\\\t\\\\tsock destroy.\\\\n\\\\t\\\\tTranscript show: 'remote cursor sender done'; cr.\\\\n\\\\t\\\\tDisplay reverse: stopRect.\\\\n\\\\t] fork.\\\\n! !\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'remote cursor example' stamp: 'jm 9/15/97 14:49'!\\\\nparseSensorStateString: aString\\\\n\\\\t\\\\\\\"Parse the given sensor stat string and return an array whose first element is the cursor point and whose second is the cursor button state.\\\\\\\"\\\\n\\\\t\\\\\\\"SimpleClientSocket parseSensorStateString: SimpleClientSocket sensorStateString\\\\\\\"\\\\n\\\\n\\\\t| s buttons x y |\\\\n\\\\ts _ ReadStream on: aString.\\\\n\\\\tx _ Integer readFrom: s.\\\\n\\\\ts skipSeparators.\\\\n\\\\ty _ Integer readFrom: s.\\\\n\\\\ts skipSeparators.\\\\n\\\\tbuttons _ Integer readFrom: s.\\\\n\\\\t^ Array with: x@y with: buttons\\\\n! !\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'remote cursor example' stamp: 'mir 5/13/2003 10:45'!\\\\nremoteCursorReceiver\\\\n\\\\t\\\\\\\"Wait for a connection, then display data sent by the client until the client closes the stream. This server process is usually started first (optionally in a forked process), then the sender process is started (optionally on another machine). Note this machine's address, which is printed in the transcript, since the sender process will ask for it.\\\\\\\"\\\\n\\\\t\\\\\\\"[SimpleClientSocket remoteCursorReceiver] fork\\\\\\\"\\\\n\\\\n\\\\t| sock response |\\\\n\\\\tTranscript show: 'starting remote cursor receiver'; cr.\\\\n\\\\tTranscript show: 'initializing network'; cr.\\\\n\\\\tSocket initializeNetwork.\\\\n\\\\tTranscript show: 'my address is ', NetNameResolver localAddressString; cr.\\\\n\\\\tTranscript show: 'opening connection'; cr.\\\\n\\\\tsock _ OldSimpleClientSocket new.\\\\n\\\\tsock listenOn: 54323.\\\\n\\\\tsock waitForConnectionUntil: (Socket deadlineSecs: 60).\\\\n\\\\tsock isConnected\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t sock destroy.\\\\n\\\\t\\\\t\\\\tTranscript show: 'remote cursor receiver did not receive a connection in 60 seconds; aborting.'.\\\\n\\\\t\\\\t\\\\t^ self].\\\\n\\\\tTranscript show: 'connection established'; cr.\\\\n\\\\n\\\\t[sock isConnected]\\\\n\\\\t\\\\twhileTrue: [\\\\n\\\\t\\\\t\\\\tsock dataAvailable\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tresponse _ sock getResponse.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tresponse displayOn: Display at: 10@10]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"if no data available, let other processes run for a while\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(Delay forMilliseconds: 20) wait]].\\\\n\\\\n\\\\tsock destroy.\\\\n\\\\tTranscript show: 'remote cursor receiver done'; cr.\\\\n! !\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'remote cursor example' stamp: 'mir 5/13/2003 10:45'!\\\\nremoteCursorTest\\\\n\\\\t\\\\\\\"This version of the remote cursor test runs both the client and the server code in the same loop.\\\\\\\"\\\\n\\\\t\\\\\\\"SimpleClientSocket remoteCursorTest\\\\\\\"\\\\n\\\\n\\\\t| sock1 sock2 samplesToSend samplesSent done t |\\\\n\\\\tTranscript show: 'starting remote cursor test'; cr.\\\\n\\\\tTranscript show: 'initializing network'; cr.\\\\n\\\\tSocket initializeNetwork.\\\\n\\\\tTranscript show: 'opening connection'; cr.\\\\n\\\\tsock1 _ OldSimpleClientSocket new.\\\\n\\\\tsock2 _ OldSimpleClientSocket new.\\\\n\\\\tsock1 listenOn: 54321.\\\\n\\\\tsock2 connectTo: (NetNameResolver localHostAddress) port: 54321.\\\\n\\\\tsock1 waitForConnectionUntil: self standardDeadline.\\\\n\\\\tsock2 waitForConnectionUntil: self standardDeadline.\\\\n\\\\t(sock1 isConnected) ifFalse: [self error: 'sock1 not connected'].\\\\n\\\\t(sock2 isConnected) ifFalse: [self error: 'sock2 not connected'].\\\\n\\\\tTranscript show: 'connection established'; cr.\\\\n\\\\n\\\\tsamplesToSend _ 100.\\\\n\\\\tt _ Time millisecondsToRun: [\\\\n\\\\t\\\\tsamplesSent _ 0.\\\\n\\\\t\\\\tdone _ false.\\\\n\\\\t\\\\t[done]\\\\n\\\\t\\\\t\\\\twhileFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t(sock1 sendDone and: [samplesSent < samplesToSend]) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsock1 sendCommand: self sensorStateString.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsamplesSent _ samplesSent + 1].\\\\n\\\\t\\\\t\\\\t\\\\tsock2 dataAvailable ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsock2 getResponse displayOn: Display at: 10@10].\\\\n\\\\t\\\\t\\\\t\\\\tdone _ samplesSent = samplesToSend]].\\\\n\\\\tsock1 destroy.\\\\n\\\\tsock2 destroy.\\\\n\\\\tTranscript show: 'remote cursor test done'; cr.\\\\n\\\\tTranscript show:\\\\n\\\\t\\\\tsamplesSent printString, ' samples sent in ',\\\\n\\\\t\\\\tt printString, ' milliseconds'; cr.\\\\n\\\\tTranscript show: ((samplesSent * 1000) // t) printString, ' samples/sec'; cr.\\\\n! !\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'remote cursor example' stamp: 'jm 9/15/97 13:11'!\\\\nsensorStateString\\\\n\\\\t\\\\\\\"SimpleClientSocket sensorStateString\\\\\\\"\\\\n\\\\n\\\\t| pt buttons s |\\\\n\\\\tpt _ Sensor cursorPoint.\\\\n\\\\tbuttons _ Sensor primMouseButtons.\\\\n\\\\ts _ WriteStream on: (String new: 100).\\\\n\\\\ts nextPutAll: pt x printString.\\\\n\\\\ts space.\\\\n\\\\ts nextPutAll: pt y printString.\\\\n\\\\ts space.\\\\n\\\\ts nextPutAll: buttons printString.\\\\n\\\\t^ s contents\\\\n! !\\\\nObject subclass: #OldSocket\\\\n\\\\tinstanceVariableNames: 'semaphore socketHandle readSemaphore writeSemaphore primitiveOnlySupportsOneSemaphore'\\\\n\\\\tclassVariableNames: 'Connected DeadServer InvalidSocket OtherEndClosed Registry RegistryThreshold TCPSocketType ThisEndClosed UDPSocketType Unconnected WaitingForConnection'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Network-Kernel'!\\\\n!OldSocket commentStamp: '<historical>' prior: 0!\\\\nA Socket represents a network connection point. Current sockets are designed to support the TCP/IP and UDP protocols\\\\n\\\\nSubclasses of socket provide support for network protocols such as POP, NNTP, HTTP, and FTP. Sockets also allow you to implement your own custom services and may be used to support Remote Procedure Call or Remote Method Invocation some day.\\\\n\\\\nJMM June 2nd 2000 Macintosh UDP support was added if you run open transport.\\\\n!\\\\n]style[(196 4 6 3 228)f1,f1LHTTPSocket Comment;,f1,f1LFTPSocket Comment;,f1!\\\\n\\\\n\\\\n!OldSocket methodsFor: 'accessing' stamp: 'ar 4/30/1999 04:25'!\\\\naddress\\\\n\\\\t\\\\\\\"Shortcut\\\\\\\"\\\\n\\\\t^self localAddress! !\\\\n\\\\n!OldSocket methodsFor: 'accessing' stamp: 'nk 2/24/2005 14:37'!\\\\nlocalAddress\\\\n\\\\tself waitForConnectionUntil: self class standardDeadline.\\\\n\\\\tself isConnected ifFalse: [^ByteArray new: 4].\\\\n\\\\t^self primSocketLocalAddress: socketHandle! !\\\\n\\\\n!OldSocket methodsFor: 'accessing' stamp: 'nk 2/24/2005 14:37'!\\\\nlocalPort\\\\n\\\\tself waitForConnectionUntil: self class standardDeadline.\\\\n\\\\tself isConnected ifFalse: [^0].\\\\n\\\\t^self primSocketLocalPort: socketHandle! !\\\\n\\\\n!OldSocket methodsFor: 'accessing' stamp: 'jm 3/13/98 12:11'!\\\\npeerName\\\\n\\\\t\\\\\\\"Return the name of the host I'm connected to, or nil if its name isn't known to the domain name server or the request times out.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: Slow. Calls the domain name server, taking up to 20 seconds to time out. Even when sucessful, delays of up to 13 seconds have been observed during periods of high network load.\\\\\\\" \\\\n\\\\n\\\\t^ NetNameResolver\\\\n\\\\t\\\\tnameForAddress: self remoteAddress\\\\n\\\\t\\\\ttimeout: 20\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'accessing' stamp: 'ar 4/30/1999 04:25'!\\\\nport\\\\n\\\\t\\\\\\\"Shortcut\\\\\\\"\\\\n\\\\t^self localPort! !\\\\n\\\\n!OldSocket methodsFor: 'accessing' stamp: 'JMM 6/5/2000 10:12'!\\\\nprimitiveOnlySupportsOneSemaphore\\\\n\\\\t^primitiveOnlySupportsOneSemaphore! !\\\\n\\\\n!OldSocket methodsFor: 'accessing' stamp: 'JMM 5/22/2000 22:49'!\\\\nreadSemaphore\\\\n\\\\tprimitiveOnlySupportsOneSemaphore ifTrue: [^semaphore].\\\\n\\\\t^readSemaphore! !\\\\n\\\\n!OldSocket methodsFor: 'accessing' stamp: 'jm 9/17/97 14:34'!\\\\nremoteAddress\\\\n\\\\n\\\\t^ self primSocketRemoteAddress: socketHandle\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'accessing' stamp: 'jm 9/17/97 14:34'!\\\\nremotePort\\\\n\\\\n\\\\t^ self primSocketRemotePort: socketHandle\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'accessing' stamp: 'JMM 5/9/2000 15:32'!\\\\nsemaphore\\\\n\\\\t^semaphore! !\\\\n\\\\n!OldSocket methodsFor: 'accessing' stamp: 'ar 7/16/1999 17:22'!\\\\nsocketHandle\\\\n\\\\t^socketHandle! !\\\\n\\\\n!OldSocket methodsFor: 'accessing' stamp: 'JMM 5/22/2000 22:49'!\\\\nwriteSemaphore\\\\n\\\\tprimitiveOnlySupportsOneSemaphore ifTrue: [^semaphore].\\\\n\\\\t^writeSemaphore! !\\\\n\\\\n\\\\n!OldSocket methodsFor: 'connection open/close' stamp: 'nk 2/24/2005 14:37'!\\\\naccept\\\\n\\\\t\\\\\\\"Accept a connection from the receiver socket.\\\\n\\\\tReturn a new socket that is connected to the client\\\\\\\"\\\\n\\\\n\\\\t^self class acceptFrom: self! !\\\\n\\\\n!OldSocket methodsFor: 'connection open/close' stamp: 'jm 9/11/97 20:29'!\\\\nclose\\\\n\\\\t\\\\\\\"Close this connection gracefully. For TCP, this sends a close request, but the stream remains open until the other side also closes it.\\\\\\\"\\\\n\\\\n\\\\tself primSocketCloseConnection: socketHandle.  \\\\\\\"close this end\\\\\\\"\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'connection open/close' stamp: 'jm 11/4/97 07:15'!\\\\ncloseAndDestroy\\\\n\\\\t\\\\\\\"First, try to close this connection gracefully. If the close attempt fails or times out, abort the connection. In either case, destroy the socket. Do nothing if the socket has already been destroyed (i.e., if its socketHandle is nil).\\\\\\\"\\\\n\\\\n\\\\tself closeAndDestroy: 20.\\\\n\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'connection open/close' stamp: 'nk 2/24/2005 14:37'!\\\\ncloseAndDestroy: timeoutSeconds \\\\n\\\\t\\\\\\\"First, try to close this connection gracefully. If the close attempt fails or times out, abort the connection. In either case, destroy the socket. Do nothing if the socket has already been destroyed (i.e., if its socketHandle is nil).\\\\\\\"\\\\n\\\\n\\\\tsocketHandle = nil \\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[self isConnected \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self close.\\\\t\\\\\\\"close this end\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(self waitForDisconnectionUntil: (self class deadlineSecs: timeoutSeconds)) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"if the other end doesn't close soon, just abort the connection\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself primSocketAbortConnection: socketHandle]].\\\\n\\\\t\\\\t\\\\tself destroy]! !\\\\n\\\\n!OldSocket methodsFor: 'connection open/close'!\\\\nconnectTo: hostAddress port: port\\\\n\\\\t\\\\\\\"Initiate a connection to the given port at the given host address. This operation will return immediately; follow it with waitForConnectionUntil: to wait until the connection is established.\\\\\\\"\\\\n\\\\n\\\\t| status |\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\t(status == Unconnected)\\\\n\\\\t\\\\tifFalse: [self error: 'Socket status must Unconnected before opening a new connection'].\\\\n\\\\n\\\\tself primSocket: socketHandle connectTo: hostAddress port: port.\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'connection open/close' stamp: 'jm 3/10/98 11:56'!\\\\ndisconnect\\\\n\\\\t\\\\\\\"Break this connection, no matter what state it is in. Data that has been sent but not received will be lost.\\\\\\\"\\\\n\\\\n\\\\tself primSocketAbortConnection: socketHandle.\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'connection open/close'!\\\\nlistenOn: port\\\\n\\\\t\\\\\\\"Listen for a connection on the given port. This operation will return immediately; follow it with waitForConnectionUntil: to wait until a connection is established.\\\\\\\"\\\\n\\\\n\\\\t| status |\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\t(status == Unconnected)\\\\n\\\\t\\\\tifFalse: [self error: 'Socket status must Unconnected before listening for a new connection'].\\\\n\\\\n\\\\tself primSocket: socketHandle listenOn: port.\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'connection open/close' stamp: 'ar 7/16/1999 18:26'!\\\\nlistenOn: portNumber backlogSize: backlog\\\\n\\\\t\\\\\\\"Listen for a connection on the given port.\\\\n\\\\tIf this method succeeds, #accept may be used to establish a new connection\\\\\\\"\\\\n\\\\t| status |\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\t(status == Unconnected)\\\\n\\\\t\\\\tifFalse: [self error: 'Socket status must Unconnected before listening for a new connection'].\\\\n\\\\tself primSocket: socketHandle listenOn: portNumber backlogSize: backlog.\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'connection open/close' stamp: 'ikp 9/1/2003 20:47'!\\\\nlistenOn: portNumber backlogSize: backlog interface: ifAddr\\\\n\\\\t\\\\\\\"Listen for a connection on the given port.\\\\n\\\\tIf this method succeeds, #accept may be used to establish a new connection\\\\\\\"\\\\n\\\\t| status |\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\t(status == Unconnected)\\\\n\\\\t\\\\tifFalse: [self error: 'Socket status must Unconnected before listening for a new connection'].\\\\n\\\\tself primSocket: socketHandle listenOn: portNumber backlogSize: backlog interface: ifAddr.\\\\n! !\\\\n\\\\n\\\\n!OldSocket methodsFor: 'datagrams' stamp: 'JMM 6/7/2000 14:58'!\\\\nreceiveDataInto: aStringOrByteArray fromHost: hostAddress port: portNumber\\\\n\\\\t| datagram |\\\\n\\\\t\\\\\\\"Receive a UDP packet from the given hostAddress/portNumber, storing the data in the given buffer, and return the number of bytes received. Note the given buffer may be only partially filled by the received data.\\\\\\\"\\\\n\\\\n\\\\tprimitiveOnlySupportsOneSemaphore ifTrue:\\\\n\\\\t\\\\t[self setPeer: hostAddress port: portNumber.\\\\n\\\\t\\\\t^self receiveDataInto: aStringOrByteArray].\\\\n\\\\t[true] whileTrue: \\\\n\\\\t\\\\t[datagram _ self receiveUDPDataInto: aStringOrByteArray.\\\\n\\\\t\\\\t((datagram at: 2) = hostAddress and: [(datagram at: 3) = portNumber]) \\\\n\\\\t\\\\t\\\\tifTrue: [^datagram at: 1]\\\\n\\\\t\\\\t\\\\tifFalse: [^0]]! !\\\\n\\\\n!OldSocket methodsFor: 'datagrams' stamp: 'JMM 6/3/2000 21:54'!\\\\nreceiveUDPDataInto: aStringOrByteArray\\\\n\\\\t\\\\\\\"Receive UDP data into the given buffer and return the number of bytes received. Note the given buffer may be only partially filled by the received data. What is returned is an array, the first element is the bytes read, the second the sending bytearray address, the third the senders port, the fourth, true if more of the datagram awaits reading\\\\\\\"\\\\n\\\\n\\\\t^ self primSocket: socketHandle\\\\n\\\\t\\\\treceiveUDPDataInto: aStringOrByteArray\\\\n\\\\t\\\\tstartingAt: 1\\\\n\\\\t\\\\tcount: aStringOrByteArray size\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'datagrams' stamp: 'JMM 5/25/2000 00:05'!\\\\nsendData: aStringOrByteArray toHost: hostAddress port: portNumber\\\\n\\\\t\\\\\\\"Send a UDP packet containing the given data to the specified host/port.\\\\\\\"\\\\n\\\\n\\\\tprimitiveOnlySupportsOneSemaphore ifTrue:\\\\n\\\\t\\\\t[self setPeer: hostAddress port: portNumber.\\\\n\\\\t\\\\t^self sendData: aStringOrByteArray].\\\\n\\\\t^self sendUDPData: aStringOrByteArray toHost: hostAddress port: portNumber! !\\\\n\\\\n!OldSocket methodsFor: 'datagrams' stamp: 'nk 2/24/2005 14:37'!\\\\nsendUDPData: aStringOrByteArray toHost: hostAddress port: portNumber \\\\n\\\\t\\\\\\\"Send a UDP packet containing the given data to the specified host/port.\\\\\\\"\\\\n\\\\n\\\\t| bytesToSend bytesSent count |\\\\n\\\\tbytesToSend := aStringOrByteArray size.\\\\n\\\\tbytesSent := 0.\\\\n\\\\t[bytesSent < bytesToSend] whileTrue: \\\\n\\\\t\\\\t\\\\t[(self waitForSendDoneUntil: (self class deadlineSecs: 20)) \\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self error: 'send data timeout; data not sent'].\\\\n\\\\t\\\\t\\\\tcount := self \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tprimSocket: socketHandle\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsendUDPData: aStringOrByteArray\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttoHost: hostAddress\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tport: portNumber\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartIndex: bytesSent + 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcount: bytesToSend - bytesSent.\\\\n\\\\t\\\\t\\\\tbytesSent := bytesSent + count].\\\\n\\\\t^bytesSent! !\\\\n\\\\n!OldSocket methodsFor: 'datagrams' stamp: 'ar 4/30/1999 04:29'!\\\\nsetPeer: hostAddress port: port\\\\n\\\\t\\\\\\\"Set the default send/recv address.\\\\\\\"\\\\n\\\\n\\\\tself primSocket: socketHandle connectTo: hostAddress port: port.\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'datagrams' stamp: 'ar 4/30/1999 04:29'!\\\\nsetPort: port\\\\n\\\\t\\\\\\\"Associate a local port number with a UDP socket.  Not applicable to TCP sockets.\\\\\\\"\\\\n\\\\n\\\\tself primSocket: socketHandle setPort: port.\\\\n! !\\\\n\\\\n\\\\n!OldSocket methodsFor: 'finalization' stamp: 'JMM 5/22/2000 22:52'!\\\\nfinalize\\\\n\\\\tself primSocketDestroyGently: socketHandle.\\\\n\\\\tSmalltalk unregisterExternalObject: semaphore.\\\\n\\\\tSmalltalk unregisterExternalObject: readSemaphore.\\\\n\\\\tSmalltalk unregisterExternalObject: writeSemaphore.\\\\n! !\\\\n\\\\n\\\\n!OldSocket methodsFor: 'initialize-destroy' stamp: 'JMM 5/22/2000 22:47'!\\\\nacceptFrom: aSocket\\\\n\\\\t\\\\\\\"Initialize a new socket handle from an accept call\\\\\\\"\\\\n\\\\t| semaIndex readSemaIndex writeSemaIndex |\\\\n\\\\n\\\\tprimitiveOnlySupportsOneSemaphore _ false.\\\\n\\\\tsemaphore _ Semaphore new.\\\\n\\\\treadSemaphore _ Semaphore new.\\\\n\\\\twriteSemaphore _ Semaphore new.\\\\n\\\\tsemaIndex _ Smalltalk registerExternalObject: semaphore.\\\\n\\\\treadSemaIndex _ Smalltalk registerExternalObject: readSemaphore.\\\\n\\\\twriteSemaIndex _ Smalltalk registerExternalObject: writeSemaphore.\\\\n\\\\tsocketHandle _ self primAcceptFrom: aSocket socketHandle\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\treceiveBufferSize: 8000\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsendBufSize: 8000\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsemaIndex: semaIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\treadSemaIndex: readSemaIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twriteSemaIndex: writeSemaIndex.\\\\n\\\\tsocketHandle = nil ifTrue: [  \\\\\\\"socket creation failed\\\\\\\"\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: semaphore.\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: readSemaphore.\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: writeSemaphore.\\\\n\\\\t\\\\treadSemaphore _ writeSemaphore _ semaphore _ nil\\\\n\\\\t] ifFalse:[self register].\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'initialize-destroy' stamp: 'JMM 5/22/2000 22:54'!\\\\ndestroy\\\\n\\\\t\\\\\\\"Destroy this socket. Its connection, if any, is aborted and its resources are freed. Do nothing if the socket has already been destroyed (i.e., if its socketHandle is nil).\\\\\\\"\\\\n\\\\n\\\\tsocketHandle = nil ifFalse: \\\\n\\\\t\\\\t[self isValid ifTrue: [self primSocketDestroy: socketHandle].\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: semaphore.\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: readSemaphore.\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: writeSemaphore.\\\\n\\\\t\\\\tsocketHandle _ nil.\\\\n\\\\t\\\\treadSemaphore _ writeSemaphore _ semaphore _ nil.\\\\n\\\\t\\\\tself unregister].\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'initialize-destroy' stamp: 'JMM 5/22/2000 23:04'!\\\\ninitialize: socketType\\\\n\\\\t\\\\\\\"Initialize a new socket handle. If socket creation fails, socketHandle will be set to nil.\\\\\\\"\\\\n\\\\t| semaIndex readSemaIndex writeSemaIndex |\\\\n\\\\n\\\\tprimitiveOnlySupportsOneSemaphore _ false.\\\\n\\\\tsemaphore _ Semaphore new.\\\\n\\\\treadSemaphore _ Semaphore new.\\\\n\\\\twriteSemaphore _ Semaphore new.\\\\n\\\\tsemaIndex _ Smalltalk registerExternalObject: semaphore.\\\\n\\\\treadSemaIndex _ Smalltalk registerExternalObject: readSemaphore.\\\\n\\\\twriteSemaIndex _ Smalltalk registerExternalObject: writeSemaphore.\\\\n\\\\tsocketHandle _\\\\n\\\\t\\\\tself primSocketCreateNetwork: 0\\\\n\\\\t\\\\t\\\\ttype: socketType\\\\n\\\\t\\\\t\\\\treceiveBufferSize: 8000\\\\n\\\\t\\\\t\\\\tsendBufSize: 8000\\\\n\\\\t\\\\t\\\\tsemaIndex: semaIndex\\\\n\\\\t\\\\t\\\\treadSemaIndex: readSemaIndex\\\\n\\\\t\\\\t\\\\twriteSemaIndex: writeSemaIndex.\\\\n\\\\n\\\\tsocketHandle = nil ifTrue: [  \\\\\\\"socket creation failed\\\\\\\"\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: semaphore.\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: readSemaphore.\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: writeSemaphore.\\\\n\\\\t\\\\treadSemaphore _ writeSemaphore _ semaphore _ nil\\\\n\\\\t] ifFalse:[self register].\\\\n! !\\\\n\\\\n\\\\n!OldSocket methodsFor: 'other' stamp: 'JMM 6/3/2000 19:39'!\\\\ngetOption: aName \\\\n\\\\t\\\\\\\"Get options on this socket, see Unix man pages for values for \\\\n\\\\tsockets, IP, TCP, UDP. IE SO_KEEPALIVE\\\\n\\\\treturns an array, element one is an status number (0 ok, -1 read only option)\\\\n\\\\telement two is the resulting of the requested option\\\\\\\"\\\\n\\\\n\\\\t(socketHandle == nil or: [self isValid not])\\\\n\\\\t\\\\tifTrue: [self error: 'Socket status must valid before getting an option'].\\\\n\\\\t^self primSocket: socketHandle getOption: aName\\\\n\\\\n\\\\\\\"| foo options |\\\\nSocket initializeNetwork.\\\\nfoo _ Socket newTCP.\\\\nfoo connectTo: (NetNameResolver addressFromString: '192.168.1.1') port: 80.\\\\nfoo waitForConnectionUntil: (Socket standardDeadline).\\\\n\\\\noptions _ {\\\\n'SO_DEBUG'. 'SO_REUSEADDR'. 'SO_REUSEPORT'. 'SO_DONTROUTE'.\\\\n'SO_BROADCAST'. 'SO_SNDBUF'. 'SO_RCVBUF'. 'SO_KEEPALIVE'.\\\\n'SO_OOBINLINE'. 'SO_PRIORITY'. 'SO_LINGER'. 'SO_RCVLOWAT'.\\\\n'SO_SNDLOWAT'. 'IP_TTL'. 'IP_HDRINCL'. 'IP_RCVOPTS'.\\\\n'IP_RCVDSTADDR'. 'IP_MULTICAST_IF'. 'IP_MULTICAST_TTL'.\\\\n'IP_MULTICAST_LOOP'. 'UDP_CHECKSUM'. 'TCP_MAXSEG'.\\\\n'TCP_NODELAY'. 'TCP_ABORT_THRESHOLD'. 'TCP_CONN_NOTIFY_THRESHOLD'. \\\\n'TCP_CONN_ABORT_THRESHOLD'. 'TCP_NOTIFY_THRESHOLD'.\\\\n'TCP_URGENT_PTR_TYPE'}.\\\\n\\\\n1 to: options size do: [:i | | fum |\\\\n\\\\tfum _foo getOption: (options at: i).\\\\n\\\\tTranscript show: (options at: i),fum printString;cr].\\\\n\\\\nfoo _ Socket newUDP.\\\\nfoo setPeer: (NetNameResolver addressFromString: '192.168.1.9') port: 7.\\\\nfoo waitForConnectionUntil: (Socket standardDeadline).\\\\n\\\\n1 to: options size do: [:i | | fum |\\\\n\\\\tfum _foo getOption: (options at: i).\\\\n\\\\tTranscript show: (options at: i),fum printString;cr].\\\\n\\\\\\\"! !\\\\n\\\\n!OldSocket methodsFor: 'other' stamp: 'nk 2/24/2005 14:37'!\\\\ngetResponseNoLF\\\\n\\\\t\\\\\\\"Get the response to the last command.\\\\\\\"\\\\n\\\\n\\\\t| buf response bytesRead c lf |\\\\n\\\\t(self waitForDataUntil: (self class deadlineSecs: 20)) \\\\n\\\\t\\\\tifFalse: [self error: 'getResponse timeout'].\\\\n\\\\tlf := Character lf.\\\\n\\\\tbuf := String new: 1000.\\\\n\\\\tresponse := WriteStream on: ''.\\\\n\\\\t[self dataAvailable] whileTrue: \\\\n\\\\t\\\\t\\\\t[bytesRead := self \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tprimSocket: socketHandle\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\treceiveDataInto: buf\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcount: buf size.\\\\n\\\\t\\\\t\\\\t1 to: bytesRead\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:i | (c := buf at: i) ~= lf ifTrue: [response nextPut: c]]].\\\\n\\\\t^response contents! !\\\\n\\\\n!OldSocket methodsFor: 'other' stamp: 'JMM 6/3/2000 19:39'!\\\\nsetOption: aName value: aValue \\\\n\\\\t| value |\\\\n\\\\t\\\\\\\"setup options on this socket, see Unix man pages for values for \\\\n\\\\tsockets, IP, TCP, UDP. IE SO_KEEPALIVE\\\\n\\\\treturns an array, element one is the error number\\\\n\\\\telement two is the resulting of the negotiated value.\\\\n\\\\tSee getOption for list of keys\\\\\\\"\\\\n\\\\n\\\\t(socketHandle == nil or: [self isValid not])\\\\n\\\\t\\\\tifTrue: [self error: 'Socket status must valid before setting an option'].\\\\n\\\\tvalue _ aValue asString.\\\\n\\\\taValue == true ifTrue: [value _ '1'].\\\\n\\\\taValue == false ifTrue: [value _ '0'].\\\\n\\\\t^ self primSocket: socketHandle setOption: aName value: value! !\\\\n\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimAcceptFrom: aHandle receiveBufferSize: rcvBufSize sendBufSize: sndBufSize semaIndex: semaIndex\\\\n\\\\t\\\\\\\"Create and return a new socket handle based on accepting the connection from the given listening socket\\\\\\\"\\\\n\\\\t<primitive: 'primitiveSocketAccept' module: 'SocketPlugin'>\\\\n\\\\t^self primitiveFailed! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'JMM 5/22/2000 22:55'!\\\\nprimAcceptFrom: aHandle receiveBufferSize: rcvBufSize sendBufSize: sndBufSize semaIndex: semaIndex readSemaIndex: aReadSema writeSemaIndex: aWriteSema\\\\n\\\\t\\\\\\\"Create and return a new socket handle based on accepting the connection from the given listening socket\\\\\\\"\\\\n\\\\t<primitive: 'primitiveSocketAccept3Semaphores' module: 'SocketPlugin'>\\\\n\\\\tprimitiveOnlySupportsOneSemaphore _ true.\\\\n\\\\t^self primAcceptFrom: aHandle receiveBufferSize: rcvBufSize sendBufSize: sndBufSize semaIndex: semaIndex ! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocket: socketID connectTo: hostAddress port: port\\\\n\\\\t\\\\\\\"Attempt to establish a connection to the given port of the given host. This is an asynchronous call; query the socket status to discover if and when the connection is actually completed.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketConnectToPort' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'JMM 5/25/2000 21:48'!\\\\nprimSocket: socketID getOption: aString \\\\n\\\\t\\\\\\\"Get some option information on this socket. Refer to the UNIX \\\\n\\\\tman pages for valid SO, TCP, IP, UDP options. In case of doubt\\\\n\\\\trefer to the source code.\\\\n\\\\tTCP_NODELAY, SO_KEEPALIVE are valid options for example\\\\n\\\\treturns an array containing the error code and the option value\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketGetOptions' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocket: socketID listenOn: port\\\\n\\\\t\\\\\\\"Listen for a connection on the given port. This is an asynchronous call; query the socket status to discover if and when the connection is actually completed.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketListenWithOrWithoutBacklog' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocket: aHandle listenOn: portNumber backlogSize: backlog\\\\n\\\\t\\\\\\\"Primitive. Set up the socket to listen on the given port.\\\\n\\\\tWill be used in conjunction with #accept only.\\\\\\\"\\\\n\\\\t<primitive: 'primitiveSocketListenWithOrWithoutBacklog' module: 'SocketPlugin'>\\\\n\\\\tself destroy. \\\\\\\"Accept not supported so clean up\\\\\\\"! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ikp 9/1/2003 20:55'!\\\\nprimSocket: aHandle listenOn: portNumber backlogSize: backlog interface: ifAddr\\\\n\\\\t\\\\\\\"Primitive. Set up the socket to listen on the given port.\\\\n\\\\tWill be used in conjunction with #accept only.\\\\\\\"\\\\n\\\\t<primitive: 'primitiveSocketListenOnPortBacklogInterface' module: 'SocketPlugin'>\\\\n\\\\tself destroy. \\\\\\\"Accept not supported so clean up\\\\\\\"! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocket: socketID receiveDataInto: aStringOrByteArray startingAt: startIndex count: count\\\\n\\\\t\\\\\\\"Receive data from the given socket into the given array starting at the given index. Return the number of bytes read or zero if no data is available.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketReceiveDataBufCount' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'JMM 5/24/2000 17:19'!\\\\nprimSocket: socketID receiveUDPDataInto: aStringOrByteArray startingAt: startIndex count: count\\\\n\\\\t\\\\\\\"Receive data from the given socket into the given array starting at the given index. \\\\n\\\\tReturn an Array containing the amount read, the host address byte array, the host port, and the more flag\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketReceiveUDPDataBufCount' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocket: socketID sendData: aStringOrByteArray startIndex: startIndex count: count\\\\n\\\\t\\\\\\\"Send data to the remote host through the given socket starting with the given byte index of the given byte array. The data sent is 'pushed' immediately. Return the number of bytes of data actually sent; any remaining data should be re-submitted for sending after the current send operation has completed.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: In general, it many take several sendData calls to transmit a large data array since the data is sent in send-buffer-sized chunks. The size of the send buffer is determined when the socket is created.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketSendDataBufCount' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'JMM 5/25/2000 00:08'!\\\\nprimSocket: socketID sendUDPData: aStringOrByteArray toHost: hostAddress  port: portNumber startIndex: startIndex count: count\\\\n\\\\t\\\\\\\"Send data to the remote host through the given socket starting with the given byte index of the given byte array. The data sent is 'pushed' immediately. Return the number of bytes of data actually sent; any remaining data should be re-submitted for sending after the current send operation has completed.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: In general, it many take several sendData calls to transmit a large data array since the data is sent in send-buffer-sized chunks. The size of the send buffer is determined when the socket is created.\\\\\\\"\\\\n\\\\n\\\\t<primitive:  'primitiveSocketSendUDPDataBufCount' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 7/18/2000 11:42'!\\\\nprimSocket: socketID setOption: aString value: aStringValue\\\\n\\\\t\\\\\\\"Set some option information on this socket. Refer to the UNIX \\\\n\\\\tman pages for valid SO, TCP, IP, UDP options. In case of doubt\\\\n\\\\trefer to the source code.\\\\n\\\\tTCP_NODELAY, SO_KEEPALIVE are valid options for example\\\\n\\\\treturns an array containing the error code and the negotiated value\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketSetOptions' module: 'SocketPlugin'>\\\\n\\\\t^nil! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocket: socketID setPort: port\\\\n\\\\t\\\\\\\"Set the local port associated with a UDP socket.\\\\n\\\\tNote: this primitive is overloaded.  The primitive will not fail on a TCP socket, but\\\\n\\\\tthe effects will not be what was desired.  Best solution would be to split Socket into\\\\n\\\\ttwo subclasses, TCPSocket and UDPSocket.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketListenWithOrWithoutBacklog' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketAbortConnection: socketID\\\\n\\\\t\\\\\\\"Terminate the connection on the given port immediately without going through the normal close sequence. This is an asynchronous call; query the socket status to discover if and when the connection is actually terminated.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketAbortConnection' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketCloseConnection: socketID\\\\n\\\\t\\\\\\\"Close the connection on the given port. The remote end is informed that this end has closed and will do no further sends. This is an asynchronous call; query the socket status to discover if and when the connection is actually closed.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketCloseConnection' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketConnectionStatus: socketID\\\\n\\\\t\\\\\\\"Return an integer reflecting the connection status of this socket. For a list of possible values, see the comment in the 'initialize' method of this class. If the primitive fails, return a status indicating that the socket handle is no longer valid, perhaps because the Squeak image was saved and restored since the socket was created. (Sockets do not survive snapshots.)\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketConnectionStatus' module: 'SocketPlugin'>\\\\n\\\\t^ InvalidSocket\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketCreateNetwork: netType type: socketType receiveBufferSize: rcvBufSize sendBufSize: sendBufSize semaIndex: semaIndex\\\\n\\\\t\\\\\\\"Return a new socket handle for a socket of the given type and buffer sizes. Return nil if socket creation fails.\\\\n\\\\tThe netType parameter is platform dependent and can be used to encode both the protocol type (IP, Xerox XNS, etc.) and/or the physical network interface to use if this host is connected to multiple networks. A zero netType means to use IP protocols and the primary (or only) network interface.\\\\n\\\\tThe socketType parameter specifies:\\\\n\\\\t\\\\t0\\\\treliable stream socket (TCP if the protocol is IP)\\\\n\\\\t\\\\t1\\\\tunreliable datagram socket (UDP if the protocol is IP)\\\\n\\\\tThe buffer size parameters allow performance to be tuned to the application. For example, a larger receive buffer should be used when the application expects to be receiving large amounts of data, especially from a host that is far away. These values are considered requests only; the underlying implementation will ensure that the buffer sizes actually used are within allowable bounds. Note that memory may be limited, so an application that keeps many sockets open should use smaller buffer sizes. Note the macintosh implementation ignores this buffer size. Also see setOption to get/set socket buffer sizes which allows you to set/get the current buffer sizes for reading and writing.\\\\n \\\\tIf semaIndex is > 0, it is taken to be the index of a Semaphore in the external objects array to be associated with this socket. This semaphore will be signalled when the socket status changes, such as when data arrives or a send completes. All processes waiting on the semaphore will be awoken for each such event; each process must then query the socket state to figure out if the conditions they are waiting for have been met. For example, a process waiting to send some data can see if the last send has completed.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketCreate' module: 'SocketPlugin'>\\\\n\\\\t^ nil  \\\\\\\"socket creation failed\\\\\\\"\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'JMM 5/22/2000 22:48'!\\\\nprimSocketCreateNetwork: netType type: socketType receiveBufferSize: rcvBufSize sendBufSize: sendBufSize semaIndex: semaIndex readSemaIndex: aReadSema writeSemaIndex: aWriteSema\\\\n\\\\t\\\\\\\"See comment in primSocketCreateNetwork: with one semaIndex. However you should know that some implementations\\\\n\\\\tignore the buffer size and this interface supports three semaphores,  one for open/close/listen and the other two for\\\\n\\\\treading and writing\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketCreate3Semaphores' module: 'SocketPlugin'>\\\\n\\\\tprimitiveOnlySupportsOneSemaphore _ true.\\\\n\\\\t^ self primSocketCreateNetwork: netType\\\\n\\\\t\\\\t\\\\ttype: socketType\\\\n\\\\t\\\\t\\\\treceiveBufferSize: rcvBufSize\\\\n\\\\t\\\\t\\\\tsendBufSize: sendBufSize\\\\n\\\\t\\\\t\\\\tsemaIndex: semaIndex! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketDestroy: socketID\\\\n\\\\t\\\\\\\"Release the resources associated with this socket. If a connection is open, it is aborted.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketDestroy' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketDestroyGently: socketID\\\\n\\\\t\\\\\\\"Release the resources associated with this socket. If a connection is open, it is aborted.\\\\n\\\\tDo not fail if the receiver is already closed.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketDestroy' module: 'SocketPlugin'>\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketError: socketID\\\\n\\\\t\\\\\\\"Return an integer encoding the most recent error on this socket. Zero means no error.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketError' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketLocalAddress: socketID\\\\n\\\\t\\\\\\\"Return the local host address for this socket.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketLocalAddress' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketLocalPort: socketID\\\\n\\\\t\\\\\\\"Return the local port for this socket, or zero if no port has yet been assigned.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketLocalPort' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketReceiveDataAvailable: socketID\\\\n\\\\t\\\\\\\"Return true if data may be available for reading from the current socket.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketReceiveDataAvailable' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketRemoteAddress: socketID\\\\n\\\\t\\\\\\\"Return the remote host address for this socket, or zero if no connection has been made.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketRemoteAddress' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketRemotePort: socketID\\\\n\\\\t\\\\\\\"Return the remote port for this socket, or zero if no connection has been made.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketRemotePort' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketSendDone: socketID\\\\n\\\\t\\\\\\\"Return true if there is no send in progress on the current socket.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketSendDone' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n\\\\n!OldSocket methodsFor: 'printing' stamp: 'jm 11/23/1998 11:57'!\\\\nprintOn: aStream\\\\n\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream nextPutAll: '[', self statusString, ']'.\\\\n! !\\\\n\\\\n\\\\n!OldSocket methodsFor: 'queries' stamp: 'jm 2/25/1999 13:52'!\\\\ndataAvailable\\\\n\\\\t\\\\\\\"Return true if this socket has unread received data.\\\\\\\"\\\\n\\\\n\\\\tsocketHandle == nil ifTrue: [^ false].\\\\n\\\\t^ self primSocketReceiveDataAvailable: socketHandle\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'queries' stamp: 'jm 2/25/1999 13:52'!\\\\nisConnected\\\\n\\\\t\\\\\\\"Return true if this socket is connected.\\\\\\\"\\\\n\\\\n\\\\tsocketHandle == nil ifTrue: [^ false].\\\\n\\\\t^ (self primSocketConnectionStatus: socketHandle) == Connected\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'queries' stamp: 'JMM 5/5/2000 12:15'!\\\\nisOtherEndClosed\\\\n\\\\t\\\\\\\"Return true if this socket had the other end closed.\\\\\\\"\\\\n\\\\n\\\\tsocketHandle == nil ifTrue: [^ false].\\\\n\\\\t^ (self primSocketConnectionStatus: socketHandle) == OtherEndClosed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'queries' stamp: 'JMM 5/5/2000 12:17'!\\\\nisThisEndClosed\\\\n\\\\t\\\\\\\"Return true if this socket had the this end closed.\\\\\\\"\\\\n\\\\n\\\\tsocketHandle == nil ifTrue: [^ false].\\\\n\\\\t^ (self primSocketConnectionStatus: socketHandle) == ThisEndClosed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'queries' stamp: 'jm 2/25/1999 13:54'!\\\\nisUnconnected\\\\n\\\\t\\\\\\\"Return true if this socket's state is Unconnected.\\\\\\\"\\\\n\\\\n\\\\tsocketHandle == nil ifTrue: [^ false].\\\\n\\\\t^ (self primSocketConnectionStatus: socketHandle) == Unconnected\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'queries' stamp: 'jm 2/25/1999 13:54'!\\\\nisUnconnectedOrInvalid\\\\n\\\\t\\\\\\\"Return true if this socket is completely disconnected or is invalid.\\\\\\\"\\\\n\\\\n\\\\t| status |\\\\n\\\\tsocketHandle == nil ifTrue: [^ true].\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\t^ (status = Unconnected) | (status = InvalidSocket)\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'queries' stamp: 'jm 2/25/1999 13:51'!\\\\nisValid\\\\n\\\\t\\\\\\\"Return true if this socket contains a valid, non-nil socket handle.\\\\\\\"\\\\n\\\\n\\\\t| status |\\\\n\\\\tsocketHandle == nil ifTrue: [^ false].\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\t^ status ~= InvalidSocket\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'queries' stamp: 'jm 2/25/1999 13:54'!\\\\nisWaitingForConnection\\\\n\\\\t\\\\\\\"Return true if this socket is waiting for a connection.\\\\\\\"\\\\n\\\\n\\\\tsocketHandle == nil ifTrue: [^ false].\\\\n\\\\t^ (self primSocketConnectionStatus: socketHandle) == WaitingForConnection\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'queries' stamp: 'jm 2/25/1999 13:54'!\\\\nsendDone\\\\n\\\\t\\\\\\\"Return true if the most recent send operation on this socket has completed.\\\\\\\"\\\\n\\\\n\\\\tsocketHandle == nil ifTrue: [^ false].\\\\n\\\\t^ self primSocketSendDone: socketHandle\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'queries' stamp: 'JMM 5/8/2000 23:24'!\\\\nsocketError\\\\n\\\\t^self primSocketError: socketHandle! !\\\\n\\\\n!OldSocket methodsFor: 'queries' stamp: 'jm 2/25/1999 13:56'!\\\\nstatusString\\\\n\\\\t\\\\\\\"Return a string describing the status of this socket.\\\\\\\"\\\\n\\\\n\\\\t| status |\\\\n\\\\tsocketHandle == nil ifTrue: [^ 'destroyed'].\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\tstatus = InvalidSocket ifTrue: [^ 'invalidSocketHandle'].\\\\n\\\\tstatus = Unconnected ifTrue: [^ 'unconnected'].\\\\n\\\\tstatus = WaitingForConnection ifTrue: [^ 'waitingForConnection'].\\\\n\\\\tstatus = Connected ifTrue: [^ 'connected'].\\\\n\\\\tstatus = OtherEndClosed ifTrue: [^ 'otherEndClosedButNotThisEnd'].\\\\n\\\\tstatus = ThisEndClosed ifTrue: [^ 'thisEndClosedButNotOtherEnd'].\\\\n\\\\t^ 'unknown socket status'\\\\n! !\\\\n\\\\n\\\\n!OldSocket methodsFor: 'registry' stamp: 'ar 3/21/98 17:40'!\\\\nregister\\\\n\\\\t^self class register: self! !\\\\n\\\\n!OldSocket methodsFor: 'registry' stamp: 'ar 3/21/98 17:41'!\\\\nunregister\\\\n\\\\t^self class unregister: self! !\\\\n\\\\n\\\\n!OldSocket methodsFor: 'sending-receiving' stamp: 'jm 9/15/97 12:22'!\\\\ndiscardReceivedData\\\\n\\\\t\\\\\\\"Discard any data received up until now, and return the number of bytes discarded.\\\\\\\"\\\\n\\\\n\\\\t| buf totalBytesDiscarded |\\\\n\\\\tbuf _ String new: 10000.\\\\n\\\\ttotalBytesDiscarded _ 0.\\\\n\\\\t[self isConnected and: [self dataAvailable]] whileTrue: [\\\\n\\\\t\\\\ttotalBytesDiscarded _\\\\n\\\\t\\\\t\\\\ttotalBytesDiscarded + (self receiveDataInto: buf)].\\\\n\\\\t^ totalBytesDiscarded\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'sending-receiving' stamp: 'nk 2/24/2005 14:37'!\\\\ngetData\\\\n\\\\t\\\\\\\"Get some data\\\\\\\"\\\\n\\\\n\\\\t| buf bytesRead |\\\\n\\\\t(self waitForDataUntil: self class standardDeadline) \\\\n\\\\t\\\\tifFalse: [self error: 'getData timeout'].\\\\n\\\\tbuf := String new: 4000.\\\\n\\\\tbytesRead := self \\\\n\\\\t\\\\t\\\\t\\\\tprimSocket: socketHandle\\\\n\\\\t\\\\t\\\\t\\\\treceiveDataInto: buf\\\\n\\\\t\\\\t\\\\t\\\\tstartingAt: 1\\\\n\\\\t\\\\t\\\\t\\\\tcount: buf size.\\\\n\\\\t^buf copyFrom: 1 to: bytesRead! !\\\\n\\\\n!OldSocket methodsFor: 'sending-receiving' stamp: 'nk 2/24/2005 14:37'!\\\\nreadInto: aStringOrByteArray startingAt: aNumber \\\\n\\\\t\\\\\\\"Read data into the given buffer starting at the given index and return the number of bytes received. Note the given buffer may be only partially filled by the received data.\\\\\\\"\\\\n\\\\n\\\\t(self waitForDataUntil: self class standardDeadline) \\\\n\\\\t\\\\tifFalse: [self error: 'receive timeout'].\\\\n\\\\t^self \\\\n\\\\t\\\\tprimSocket: socketHandle\\\\n\\\\t\\\\treceiveDataInto: aStringOrByteArray\\\\n\\\\t\\\\tstartingAt: aNumber\\\\n\\\\t\\\\tcount: aStringOrByteArray size - aNumber + 1! !\\\\n\\\\n!OldSocket methodsFor: 'sending-receiving' stamp: 'jm 9/15/97 12:21'!\\\\nreceiveDataInto: aStringOrByteArray\\\\n\\\\t\\\\\\\"Receive data into the given buffer and return the number of bytes received. Note the given buffer may be only partially filled by the received data.\\\\\\\"\\\\n\\\\n\\\\t^ self primSocket: socketHandle\\\\n\\\\t\\\\treceiveDataInto: aStringOrByteArray\\\\n\\\\t\\\\tstartingAt: 1\\\\n\\\\t\\\\tcount: aStringOrByteArray size\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'sending-receiving' stamp: 'tak 3/16/2005 16:51'!\\\\nsendData: aStringOrByteArray\\\\n\\\\t\\\\\\\"Send all of the data in the given array, even if it requires multiple calls to send it all. Return the number of bytes sent.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"An experimental version use on slow lines: Longer timeout and smaller writes to try to avoid spurious timeouts.\\\\\\\"\\\\n\\\\n\\\\t| bytesSent bytesToSend count |\\\\n\\\\tbytesToSend _ aStringOrByteArray size.\\\\n\\\\tbytesSent _ 0.\\\\n\\\\t[bytesSent < bytesToSend] whileTrue: [\\\\n\\\\t\\\\t(self waitForSendDoneUntil: (Socket deadlineSecs: 60))\\\\n\\\\t\\\\t\\\\tifFalse: [ConnectionTimedOut signal: 'send data timeout; data not sent'].\\\\n\\\\t\\\\tcount _ self primSocket: socketHandle\\\\n\\\\t\\\\t\\\\tsendData: aStringOrByteArray\\\\n\\\\t\\\\t\\\\tstartIndex: bytesSent + 1\\\\n\\\\t\\\\t\\\\tcount: (bytesToSend - bytesSent min: 5000).\\\\n\\\\t\\\\tbytesSent _ bytesSent + count].\\\\n\\\\n\\\\t^ bytesSent\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'sending-receiving' stamp: 'ar 7/20/1999 17:23'!\\\\nsendData: buffer count: n\\\\n\\\\t\\\\\\\"Send the amount of data from the given buffer\\\\\\\"\\\\n\\\\t| sent |\\\\n\\\\tsent _ 0.\\\\n\\\\t[sent < n] whileTrue:[\\\\n\\\\t\\\\tsent _ sent + (self sendSomeData: buffer startIndex: sent+1 count: (n-sent))].! !\\\\n\\\\n!OldSocket methodsFor: 'sending-receiving' stamp: 'ls 1/5/1999 15:05'!\\\\nsendSomeData: aStringOrByteArray\\\\n\\\\t\\\\\\\"Send as much of the given data as possible and answer the number of bytes actually sent.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: This operation may have to be repeated multiple times to send a large amount of data.\\\\\\\"\\\\n\\\\n\\\\t^ self\\\\n\\\\t\\\\tsendSomeData: aStringOrByteArray\\\\n\\\\t\\\\tstartIndex: 1\\\\n\\\\t\\\\tcount: aStringOrByteArray size! !\\\\n\\\\n!OldSocket methodsFor: 'sending-receiving' stamp: 'ls 3/3/1999 18:59'!\\\\nsendSomeData: aStringOrByteArray startIndex: startIndex\\\\n\\\\t\\\\\\\"Send as much of the given data as possible starting at the given index. Answer the number of bytes actually sent.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: This operation may have to be repeated multiple times to send a large amount of data.\\\\\\\"\\\\n\\\\n\\\\t^ self\\\\n\\\\t\\\\tsendSomeData: aStringOrByteArray\\\\n\\\\t\\\\tstartIndex: startIndex\\\\n\\\\t\\\\tcount: (aStringOrByteArray size - startIndex + 1)! !\\\\n\\\\n!OldSocket methodsFor: 'sending-receiving' stamp: 'nk 2/24/2005 14:37'!\\\\nsendSomeData: aStringOrByteArray startIndex: startIndex count: count \\\\n\\\\t\\\\\\\"Send up to count bytes of the given data starting at the given index. Answer the number of bytes actually sent.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Note: This operation may have to be repeated multiple times to send a large amount of data.\\\\\\\"\\\\n\\\\n\\\\t| bytesSent |\\\\n\\\\t(self waitForSendDoneUntil: (self class deadlineSecs: 20)) \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[bytesSent := self \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tprimSocket: socketHandle\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsendData: aStringOrByteArray\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartIndex: startIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcount: count]\\\\n\\\\t\\\\tifFalse: [self error: 'send data timeout; data not sent'].\\\\n\\\\t^bytesSent! !\\\\n\\\\n\\\\n!OldSocket methodsFor: 'waiting' stamp: 'ar 7/20/1999 17:21'!\\\\nwaitForAcceptUntil: deadLine\\\\n\\\\t\\\\\\\"Wait and accept an incoming connection\\\\\\\"\\\\n\\\\tself waitForConnectionUntil: deadLine.\\\\n\\\\t^self isConnected\\\\n\\\\t\\\\tifTrue:[self accept]\\\\n\\\\t\\\\tifFalse:[nil]! !\\\\n\\\\n!OldSocket methodsFor: 'waiting' stamp: 'jm 3/2/98 18:15'!\\\\nwaitForConnectionUntil: deadline\\\\n\\\\t\\\\\\\"Wait up until the given deadline for a connection to be established. Return true if it is established by the deadline, false if not.\\\\\\\"\\\\n\\\\n\\\\t| status |\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\t[(status = WaitingForConnection) and: [Time millisecondClockValue < deadline]]\\\\n\\\\t\\\\twhileTrue: [\\\\n\\\\t\\\\t\\\\tsemaphore waitTimeoutMSecs: (deadline - Time millisecondClockValue).\\\\n\\\\t\\\\t\\\\tstatus _ self primSocketConnectionStatus: socketHandle].\\\\n\\\\n\\\\t^ status = Connected\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'waiting' stamp: 'JMM 5/22/2000 22:04'!\\\\nwaitForDataUntil: deadline\\\\n\\\\t\\\\\\\"Wait up until the given deadline for data to arrive. Return true if data arrives by the deadline, false if not.\\\\\\\"\\\\n\\\\n\\\\t| dataArrived |\\\\n\\\\t[self isConnected & \\\\n\\\\t (dataArrived _ self primSocketReceiveDataAvailable: socketHandle) not\\\\n\\\\t\\\\t\\\\t\\\\\\\"Connection end and final data can happen fast, so test in this order\\\\\\\"\\\\n\\\\t\\\\tand: [Time millisecondClockValue < deadline]] whileTrue: [\\\\n\\\\t\\\\t\\\\tself readSemaphore waitTimeoutMSecs: (deadline - Time millisecondClockValue)].\\\\n\\\\n\\\\t^ dataArrived\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'waiting' stamp: 'JMM 5/17/2000 14:52'!\\\\nwaitForDisconnectionUntil: deadline\\\\n\\\\t\\\\\\\"Wait up until the given deadline for the the connection to be broken. Return true if it is broken by the deadline, false if not.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: The client should know the the connect is really going to be closed (e.g., because he has called 'close' to send a close request to the other end) before calling this method.\\\\nJMM 00/5/17 note that other end can close which will terminate wait\\\\\\\"\\\\n\\\\n\\\\t| extraBytes status |\\\\n\\\\textraBytes _ 0.\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\t[((status = Connected) or: [(status = ThisEndClosed)]) and:\\\\n\\\\t [Time millisecondClockValue < deadline]] whileTrue: [\\\\n\\\\t\\\\tself dataAvailable\\\\n\\\\t\\\\t\\\\tifTrue: [extraBytes _ extraBytes + self discardReceivedData].\\\\n\\\\t\\\\tsemaphore waitTimeoutMSecs: (deadline - Time millisecondClockValue).\\\\n\\\\t\\\\tstatus _ self primSocketConnectionStatus: socketHandle].\\\\n\\\\n\\\\textraBytes > 0\\\\n\\\\t\\\\tifTrue: [self inform: 'Discarded ', extraBytes printString, ' bytes while closing connection.'].\\\\n\\\\n\\\\t^ status ~= Connected\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'waiting' stamp: 'JMM 5/22/2000 22:05'!\\\\nwaitForSendDoneUntil: deadline\\\\n\\\\t\\\\\\\"Wait up until the given deadline for the current send operation to complete. Return true if it completes by the deadline, false if not.\\\\\\\"\\\\n\\\\n\\\\t| sendDone |\\\\n\\\\t[self isConnected & (sendDone _ self primSocketSendDone: socketHandle) not\\\\n\\\\t\\\\t\\\\t\\\\\\\"Connection end and final data can happen fast, so test in this order\\\\\\\"\\\\n\\\\t\\\\tand: [Time millisecondClockValue < deadline]] whileTrue: [\\\\n\\\\t\\\\t\\\\tself writeSemaphore waitTimeoutMSecs: (deadline - Time millisecondClockValue)].\\\\n\\\\n\\\\t^ sendDone! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOldSocket class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OldSocket class methodsFor: 'class initialization' stamp: 'ar 12/12/2001 19:12'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Socket initialize\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Socket Types\\\\\\\"\\\\n\\\\tTCPSocketType _ 0.\\\\n\\\\tUDPSocketType _ 1.\\\\n\\\\n\\\\t\\\\\\\"Socket Status Values\\\\\\\"\\\\n\\\\tInvalidSocket _ -1.\\\\n\\\\tUnconnected _ 0.\\\\n\\\\tWaitingForConnection _ 1.\\\\n\\\\tConnected _ 2.\\\\n\\\\tOtherEndClosed _ 3.\\\\n\\\\tThisEndClosed _ 4.\\\\n\\\\n\\\\tRegistryThreshold _ 100. \\\\\\\"# of sockets\\\\\\\"! !\\\\n\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'nk 2/24/2005 14:38'!\\\\nclientServerTestUDP\\\\n\\\\t\\\\\\\"Socket clientServerTestUDP\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Performa 6400/200, Linux-PPC 2.1.24:\\\\n\\\\t\\\\tclient/server UDP test done; time = 2820\\\\n\\\\t\\\\t2500 packets, 10000000 bytes sent (3546 kBytes/sec)\\\\n\\\\t\\\\t2500 packets, 10000000 bytes received (3546 kBytes/sec)\\\\n\\\\t\\\\t4000 bytes/packet, 886 packets/sec, 0 packets dropped\\\\\\\"\\\\n\\\\n\\\\t| sock1 sock2 bytesToSend sendBuf receiveBuf done bytesSent bytesReceived packetsSent packetsReceived t |\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'starting client/server UDP test';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetworkIfFail: [^Transcript show: 'failed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'creating endpoints';\\\\n\\\\t\\\\tcr.\\\\n\\\\tsock1 := self newUDP.\\\\t\\\\\\\"the sender\\\\\\\"\\\\n\\\\tsock2 := self newUDP.\\\\t\\\\\\\"the recipient\\\\\\\"\\\\n\\\\tsock2 setPort: 54321.\\\\n\\\\tsock1 setPeer: NetNameResolver localHostAddress port: sock2 port.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'endpoints created';\\\\n\\\\t\\\\tcr.\\\\n\\\\tbytesToSend := 10000000.\\\\n\\\\tsendBuf := String new: 4000 withAll: $x.\\\\n\\\\treceiveBuf := String new: 50000.\\\\n\\\\tdone := false.\\\\n\\\\tbytesSent := bytesReceived := packetsSent := packetsReceived := 0.\\\\n\\\\tt := Time millisecondsToRun: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[[done] whileFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[(sock1 sendDone and: [bytesSent < bytesToSend]) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[packetsSent := packetsSent + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbytesSent := bytesSent + (sock1 sendData: sendBuf)].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsock2 dataAvailable \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[packetsReceived := packetsReceived + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbytesReceived := bytesReceived + (sock2 receiveDataInto: receiveBuf)].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdone := bytesSent >= bytesToSend].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsock1 waitForSendDoneUntil: self standardDeadline.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbytesReceived := bytesReceived + sock2 discardReceivedData].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'closing endpoints';\\\\n\\\\t\\\\tcr.\\\\n\\\\tsock1 close.\\\\n\\\\tsock2 close.\\\\n\\\\tsock1 destroy.\\\\n\\\\tsock2 destroy.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'client/server UDP test done; time = ' , t printString;\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: packetsSent printString , ' packets, ' , bytesSent printString \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, ' bytes sent (' , (bytesSent * 1000 // t) printString \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, ' Bytes/sec)';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: packetsReceived printString , ' packets, ' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, bytesReceived printString , ' bytes received (' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, (bytesReceived * 1000 // t) printString , ' Bytes/sec)';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: (bytesSent // packetsSent) printString , ' bytes/packet, ' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, (packetsReceived * 1000 // t) printString , ' packets/sec, ' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, (packetsSent - packetsReceived) printString , ' packets dropped';\\\\n\\\\t\\\\tcr! !\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'nk 2/24/2005 14:38'!\\\\nclientServerTestUDP2\\\\n\\\\t\\\\\\\"Socket clientServerTestUDP2\\\\\\\"\\\\n\\\\n\\\\t| sock1 sock2 bytesToSend sendBuf receiveBuf done bytesSent bytesReceived packetsSent packetsReceived t datagramInfo |\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'starting client/server UDP test';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetworkIfFail: [^Transcript show: 'failed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'creating endpoints';\\\\n\\\\t\\\\tcr.\\\\n\\\\tsock1 := self newUDP.\\\\t\\\\\\\"the sender\\\\\\\"\\\\n\\\\tsock2 := self newUDP.\\\\t\\\\\\\"the recipient\\\\\\\"\\\\n\\\\tsock2 setPort: 54321.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'endpoints created';\\\\n\\\\t\\\\tcr.\\\\n\\\\tbytesToSend := 100000000.\\\\n\\\\tsendBuf := String new: 4000 withAll: $x.\\\\n\\\\treceiveBuf := String new: 2000.\\\\n\\\\tdone := false.\\\\n\\\\tbytesSent := bytesReceived := packetsSent := packetsReceived := 0.\\\\n\\\\tt := Time millisecondsToRun: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[[done] whileFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[(sock1 sendDone and: [bytesSent < bytesToSend]) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[packetsSent := packetsSent + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbytesSent := bytesSent + (sock1 \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsendData: sendBuf\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttoHost: NetNameResolver localHostAddress\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tport: sock2 port)].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsock2 dataAvailable \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[packetsReceived := packetsReceived + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdatagramInfo := sock2 receiveUDPDataInto: receiveBuf.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbytesReceived := bytesReceived + (datagramInfo at: 1)].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdone := bytesSent >= bytesToSend].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsock1 waitForSendDoneUntil: self standardDeadline.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbytesReceived := bytesReceived + sock2 discardReceivedData].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'closing endpoints';\\\\n\\\\t\\\\tcr.\\\\n\\\\tsock1 close.\\\\n\\\\tsock2 close.\\\\n\\\\tsock1 destroy.\\\\n\\\\tsock2 destroy.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'client/server UDP test done; time = ' , t printString;\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: packetsSent printString , ' packets, ' , bytesSent printString \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, ' bytes sent (' , (bytesSent * 1000 // t) printString \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, ' Bytes/sec)';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: packetsReceived printString , ' packets, ' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, bytesReceived printString , ' bytes received (' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, (bytesReceived * 1000 // t) printString , ' Bytes/sec)';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: (bytesSent // packetsSent) printString , ' bytes/packet, ' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, (packetsReceived * 1000 // t) printString , ' packets/sec, ' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, (packetsSent - packetsReceived) printString , ' packets dropped';\\\\n\\\\t\\\\tcr! !\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'rbb 3/1/2005 11:02'!\\\\nremoteTestClientTCP\\\\n\\\\t\\\\\\\"FIRST start up another image, and execute: Socket remoteTestServerTCP.\\\\n\\\\tTHEN come back to this image and execute:\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Socket remoteTestClientTCP\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Performa 6400/200, Linux-PPC 2.1.24, both images on same CPU:\\\\n\\\\t\\\\tremoteClient TCP test done; time = 5680\\\\n\\\\t\\\\t250 packets, 1000000 bytes sent (176 kBytes/sec)\\\\n\\\\t\\\\t60 packets, 1000000 bytes received (176 kBytes/sec)\\\\\\\"\\\\n\\\\n\\\\t| socket bytesToSend sendBuf receiveBuf done bytesSent bytesReceived packetsSent packetsReceived t serverName |\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'starting client/server TCP test';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetworkIfFail: [^Transcript show: 'failed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tsocket := self newTCP.\\\\n\\\\tserverName := UIManager default request: 'What is your remote Test Server?'\\\\n\\\\t\\\\t\\\\t\\\\tinitialAnswer: ''.\\\\n\\\\tsocket connectTo: (NetNameResolver addressFromString: serverName)\\\\n\\\\t\\\\tport: 54321.\\\\n\\\\tsocket waitForConnectionUntil: self standardDeadline.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'client endpoint created';\\\\n\\\\t\\\\tcr.\\\\n\\\\tbytesToSend := 1000000.\\\\n\\\\tsendBuf := String new: 4000 withAll: $x.\\\\n\\\\treceiveBuf := String new: 50000.\\\\n\\\\tdone := false.\\\\n\\\\tbytesSent := bytesReceived := packetsSent := packetsReceived := 0.\\\\n\\\\tt := Time millisecondsToRun: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[[done] whileFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[(socket sendDone and: [bytesSent < bytesToSend]) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[packetsSent := packetsSent + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbytesSent := bytesSent + (socket sendData: sendBuf)].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsocket dataAvailable \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[packetsReceived := packetsReceived + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbytesReceived := bytesReceived + (socket receiveDataInto: receiveBuf)].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdone := bytesSent >= bytesToSend].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[bytesReceived < bytesToSend] whileTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[socket dataAvailable \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[packetsReceived := packetsReceived + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbytesReceived := bytesReceived + (socket receiveDataInto: receiveBuf)]]].\\\\n\\\\tsocket closeAndDestroy.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'remoteClient TCP test done; time = ' , t printString;\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: packetsSent printString , ' packets, ' , bytesSent printString \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, ' bytes sent (' , (bytesSent * 1000 // t) printString \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, ' bytes/sec)';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: packetsReceived printString , ' packets, ' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, bytesReceived printString , ' bytes received (' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, (bytesReceived * 1000 // t) printString , ' bytes/sec)';\\\\n\\\\t\\\\tcr! !\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'rbb 3/1/2005 11:02'!\\\\nremoteTestClientTCPOpenClose1000\\\\n\\\\t\\\\\\\"Socket remoteTestClientTCPOpenClose1000\\\\\\\"\\\\n\\\\n\\\\t| number t1 socket serverName |\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'starting client/server TCP test';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetworkIfFail: [^Transcript show: 'failed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tnumber := 1000.\\\\n\\\\tserverName := UIManager default request: 'What is your remote Test Server?'\\\\n\\\\t\\\\t\\\\t\\\\tinitialAnswer: ''.\\\\n\\\\tt1 := Time millisecondsToRun: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[number timesRepeat: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[socket := self newTCP.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsocket connectTo: (NetNameResolver addressFromString: serverName)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tport: 54321.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsocket waitForConnectionUntil: self standardDeadline.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsocket closeAndDestroy]].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tcr;\\\\n\\\\t\\\\tshow: 'connects/close per second ' , (number / t1 * 1000.0) printString;\\\\n\\\\t\\\\tcr! !\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'rbb 3/1/2005 11:03'!\\\\nremoteTestClientTCPOpenClosePutGet\\\\n\\\\t\\\\\\\"Socket remoteTestClientTCPOpenClosePutGet\\\\\\\"\\\\n\\\\n\\\\t| checkLength number bytesExpected sendBuf receiveBuf t1 socket bytesReceived serverName |\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'starting client/server TCP test';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetworkIfFail: [^Transcript show: 'failed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tserverName := UIManager default request: 'What is your remote Test Server?'\\\\n\\\\t\\\\t\\\\t\\\\tinitialAnswer: ''.\\\\n\\\\tnumber := 1000.\\\\n\\\\tbytesExpected := 20000.\\\\n\\\\tsendBuf := String new: 80 withAll: $x.\\\\n\\\\treceiveBuf := String new: 50000.\\\\n\\\\tt1 := Time millisecondsToRun: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[number timesRepeat: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[socket := self newTCP.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsocket connectTo: (NetNameResolver addressFromString: serverName)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tport: 54321.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsocket waitForConnectionUntil: self standardDeadline.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsocket sendData: sendBuf.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsocket waitForSendDoneUntil: (self deadlineSecs: 5).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsocket waitForDataUntil: (self deadlineSecs: 5).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbytesReceived := 0.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[bytesReceived < bytesExpected] whileTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[checkLength := socket receiveDataInto: receiveBuf.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbytesReceived := bytesReceived + checkLength].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsocket closeAndDestroy]].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tcr;\\\\n\\\\t\\\\tshow: 'connects/get/put/close per second ' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, (number / t1 * 1000.0) printString;\\\\n\\\\t\\\\tcr! !\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'rbb 3/1/2005 11:03'!\\\\nremoteTestClientUDP\\\\n\\\\t\\\\\\\"FIRST start up another image, and execute: Socket remoteTestServerUDP.\\\\n\\\\tTHEN come back to this image and execute:\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Socket remoteTestClientUDP\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Performa 6400/200, Linux-PPC 2.1.24:\\\\n\\\\t\\\\tremoteClient UDP test done; time = 4580\\\\n\\\\t\\\\t2500 packets, 10000000 bytes sent (2183 kBytes/sec)\\\\n\\\\t\\\\t180 packets, 720000 bytes received (157 kBytes/sec)\\\\n\\\\t\\\\t4000 bytes/packet, 39 packets/sec, 2320 packets dropped\\\\\\\"\\\\n\\\\n\\\\t| socket bytesToSend sendBuf receiveBuf done bytesSent bytesReceived packetsSent packetsReceived t serverName |\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'starting client/server UDP test';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetworkIfFail: [^Transcript show: 'failed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tserverName := UIManager default request: 'What is your remote Test Server?'\\\\n\\\\t\\\\t\\\\t\\\\tinitialAnswer: ''.\\\\n\\\\tsocket := self newUDP.\\\\n\\\\tsocket setPeer: (NetNameResolver addressFromString: serverName) port: 54321.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'client endpoint created';\\\\n\\\\t\\\\tcr.\\\\n\\\\tbytesToSend := 10000000.\\\\n\\\\tsendBuf := String new: 4000 withAll: $x.\\\\n\\\\treceiveBuf := String new: 4000.\\\\n\\\\tdone := false.\\\\n\\\\tbytesSent := bytesReceived := packetsSent := packetsReceived := 0.\\\\n\\\\tt := Time millisecondsToRun: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[[done] whileFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[(socket sendDone and: [bytesSent < bytesToSend]) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[packetsSent := packetsSent + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbytesSent := bytesSent + (socket sendData: sendBuf)].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsocket dataAvailable \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[packetsReceived := packetsReceived + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbytesReceived := bytesReceived + (socket receiveDataInto: receiveBuf)].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdone := bytesSent >= bytesToSend].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[socket waitForDataUntil: (self deadlineSecs: 1).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsocket dataAvailable] \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[packetsReceived := packetsReceived + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbytesReceived := bytesReceived + (socket receiveDataInto: receiveBuf)]].\\\\n\\\\tsocket closeAndDestroy.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'remoteClient UDP test done; time = ' , t printString;\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: packetsSent printString , ' packets, ' , bytesSent printString \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, ' bytes sent (' , (bytesSent * 1000 // t) printString \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, ' bytes/sec)';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: packetsReceived printString , ' packets, ' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, bytesReceived printString , ' bytes received (' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, (bytesReceived * 1000 // t) printString , ' bytes/sec)';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: (bytesSent // packetsSent) printString , ' bytes/packet, ' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, (packetsReceived * 1000 // t) printString , ' packets/sec, ' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, (packetsSent - packetsReceived) printString , ' packets dropped';\\\\n\\\\t\\\\tcr! !\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'nk 2/24/2005 14:38'!\\\\nremoteTestServerTCP\\\\n\\\\t\\\\\\\"See remoteTestClientTCP for instructions on running this method.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"OldSocket remoteTestServerTCP\\\\\\\"\\\\n\\\\n\\\\t| socket client buffer n |\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetwork.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tsocket := OldSocket newTCP.\\\\n\\\\tsocket \\\\n\\\\t\\\\tlistenOn: 54321\\\\n\\\\t\\\\tbacklogSize: 5\\\\n\\\\t\\\\tinterface: (NetNameResolver addressFromString: '127.0.0.1').\\\\t\\\\\\\"or: 0.0.0.0\\\\\\\"\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'server endpoint created -- run client test in other image';\\\\n\\\\t\\\\tcr.\\\\n\\\\tbuffer := String new: 4000.\\\\n\\\\tsocket waitForConnectionUntil: self standardDeadline.\\\\n\\\\tclient := socket accept.\\\\n\\\\t[client isConnected] whileTrue: \\\\n\\\\t\\\\t\\\\t[client dataAvailable \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[n := client receiveDataInto: buffer.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tclient sendData: buffer count: n]].\\\\n\\\\tclient closeAndDestroy.\\\\n\\\\tsocket closeAndDestroy.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tcr;\\\\n\\\\t\\\\tshow: 'server endpoint destroyed';\\\\n\\\\t\\\\tcr.\\\\n\\\\t^socket! !\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'nk 2/24/2005 14:38'!\\\\nremoteTestServerTCPOpenClose1000\\\\n\\\\t\\\\\\\"The version of #remoteTestServerTCPOpenClose1000 using the BSD style accept() mechanism.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Socket remoteTestServerTCPOpenClose1000\\\\\\\"\\\\n\\\\n\\\\t| socket server |\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetworkIfFail: [^Transcript show: 'failed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tserver := self newTCP.\\\\n\\\\tserver listenOn: 54321 backlogSize: 20.\\\\n\\\\tserver isValid ifFalse: [self error: 'Accept() is not supported'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'server endpoint created -- run client test in other image';\\\\n\\\\t\\\\tcr.\\\\n\\\\t1000 timesRepeat: \\\\n\\\\t\\\\t\\\\t[socket := server waitForAcceptUntil: (self deadlineSecs: 300).\\\\n\\\\t\\\\t\\\\tsocket closeAndDestroy].\\\\n\\\\tserver closeAndDestroy.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tcr;\\\\n\\\\t\\\\tshow: 'server endpoint destroyed';\\\\n\\\\t\\\\tcr! !\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'nk 2/24/2005 14:38'!\\\\nremoteTestServerTCPOpenClosePutGet\\\\n\\\\t\\\\\\\"The version of #remoteTestServerTCPOpenClosePutGet using the BSD style accept() mechanism.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Socket remoteTestServerTCPOpenClosePutGet\\\\\\\"\\\\n\\\\n\\\\t| socket server bytesIWantToSend bytesExpected receiveBuf sendBuf checkLength |\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetworkIfFail: [^Transcript show: 'failed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tserver := self newTCP.\\\\n\\\\tserver listenOn: 54321 backlogSize: 20.\\\\n\\\\tserver isValid ifFalse: [self error: 'Accept() is not supported'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'server endpoint created -- run client test in other image';\\\\n\\\\t\\\\tcr.\\\\n\\\\tbytesIWantToSend := 20000.\\\\n\\\\tbytesExpected := 80.\\\\n\\\\treceiveBuf := String new: 40000.\\\\n\\\\tsendBuf := String new: bytesIWantToSend withAll: $x.\\\\n\\\\t1000 timesRepeat: \\\\n\\\\t\\\\t\\\\t[socket := server waitForAcceptUntil: (self deadlineSecs: 300).\\\\n\\\\t\\\\t\\\\tsocket waitForDataUntil: (self deadlineSecs: 5).\\\\n\\\\t\\\\t\\\\tcheckLength := socket receiveDataInto: receiveBuf.\\\\n\\\\t\\\\t\\\\tcheckLength ~= bytesExpected ifTrue: [self halt].\\\\n\\\\t\\\\t\\\\tsocket sendData: sendBuf.\\\\n\\\\t\\\\t\\\\tsocket waitForSendDoneUntil: (self deadlineSecs: 5).\\\\n\\\\t\\\\t\\\\tsocket closeAndDestroy].\\\\n\\\\tserver closeAndDestroy.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tcr;\\\\n\\\\t\\\\tshow: 'server endpoint destroyed';\\\\n\\\\t\\\\tcr! !\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'nk 2/24/2005 14:38'!\\\\nremoteTestServerTCPUsingAccept\\\\n\\\\t\\\\\\\"The version of #remoteTestServer using the BSD style accept() mechanism.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Socket remoteTestServerTCPUsingAccept\\\\\\\"\\\\n\\\\n\\\\t| socket buffer n server |\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetworkIfFail: [^Transcript show: 'failed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tserver := self newTCP.\\\\n\\\\tserver listenOn: 54321 backlogSize: 4.\\\\n\\\\tserver isValid ifFalse: [self error: 'Accept() is not supported'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'server endpoint created -- run client test in other image';\\\\n\\\\t\\\\tcr.\\\\n\\\\tbuffer := String new: 40000.\\\\n\\\\t10 timesRepeat: \\\\n\\\\t\\\\t\\\\t[socket := server waitForAcceptUntil: (self deadlineSecs: 300).\\\\n\\\\t\\\\t\\\\t[socket isConnected] whileTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[socket dataAvailable \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[n := socket receiveDataInto: buffer.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsocket sendData: buffer count: n]]].\\\\n\\\\tsocket closeAndDestroy.\\\\n\\\\tserver closeAndDestroy.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tcr;\\\\n\\\\t\\\\tshow: 'server endpoint destroyed';\\\\n\\\\t\\\\tcr! !\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'nk 2/24/2005 14:38'!\\\\nremoteTestServerUDP\\\\n\\\\t\\\\\\\"See remoteTestClientUDP for instructions on running this method.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Socket remoteTestServerUDP\\\\\\\"\\\\n\\\\n\\\\t| socket buffer n |\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetworkIfFail: [^Transcript show: 'failed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tsocket := self newUDP.\\\\n\\\\tsocket setPort: 54321.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'server endpoint created -- run client test in other image';\\\\n\\\\t\\\\tcr.\\\\n\\\\tbuffer := String new: 4000.\\\\n\\\\t[true] whileTrue: \\\\n\\\\t\\\\t\\\\t[socket dataAvailable \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[n := socket receiveDataInto: buffer.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsocket sendData: buffer count: n]]! !\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'nk 2/24/2005 14:38'!\\\\nremoteTestServerUDP2\\\\n\\\\t\\\\\\\"See remoteTestClientUDP for instructions on running this method.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Socket remoteTestServerUDP2\\\\\\\"\\\\n\\\\n\\\\t| socket buffer datagramInfo |\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetworkIfFail: [^Transcript show: 'failed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tsocket := self newUDP.\\\\n\\\\tsocket setPort: 54321.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'server endpoint created -- run client test in other image';\\\\n\\\\t\\\\tcr.\\\\n\\\\tbuffer := String new: 65000.\\\\n\\\\t[true] whileTrue: \\\\n\\\\t\\\\t\\\\t[socket dataAvailable \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[datagramInfo := socket receiveUDPDataInto: buffer.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tTranscript\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tshow: datagramInfo printString;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcr.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsocket sendData: buffer count: (datagramInfo at: 1)]]! !\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'nk 2/24/2005 14:38'!\\\\nremoteTestSinkTCP\\\\n\\\\t\\\\\\\"See sendTest for instructions on running this method.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Socket remoteTestSinkTCP\\\\\\\"\\\\n\\\\n\\\\t| socket buffer n |\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetworkIfFail: [^Transcript show: 'failed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tsocket := self newTCP.\\\\n\\\\tsocket listenOn: 9.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'server endpoint created -- run client test in other image';\\\\n\\\\t\\\\tcr.\\\\n\\\\tbuffer := String new: 64000.\\\\n\\\\tsocket waitForConnectionUntil: self standardDeadline.\\\\n\\\\t[socket isConnected] whileTrue: \\\\n\\\\t\\\\t\\\\t[socket dataAvailable ifTrue: [n := socket receiveDataInto: buffer]].\\\\n\\\\tsocket closeAndDestroy.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tcr;\\\\n\\\\t\\\\tshow: 'sink endpoint destroyed';\\\\n\\\\t\\\\tcr! !\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'rbb 3/1/2005 11:03'!\\\\ntimeTest\\\\n\\\\t\\\\\\\"OldSocket timeTest\\\\\\\"\\\\n\\\\n\\\\t| serverName serverAddr s |\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetworkIfFail: [^Transcript show: 'failed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tserverName := UIManager default request: 'What is your time server?'\\\\n\\\\t\\\\t\\\\t\\\\tinitialAnswer: 'localhost'.\\\\n\\\\tserverName isEmpty \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[^Transcript\\\\n\\\\t\\\\t\\\\t\\\\tshow: 'never mind';\\\\n\\\\t\\\\t\\\\t\\\\tcr].\\\\n\\\\tserverAddr := NetNameResolver addressForName: serverName timeout: 10.\\\\n\\\\tserverAddr = nil \\\\n\\\\t\\\\tifTrue: [self error: 'Could not find the address for ' , serverName].\\\\n\\\\ts := self new.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: '---------- Connecting ----------';\\\\n\\\\t\\\\tcr.\\\\n\\\\ts connectTo: serverAddr port: 13.\\\\t\\\\\\\"13 is the 'daytime' port number\\\\\\\"\\\\n\\\\ts waitForConnectionUntil: (self deadlineSecs: 1).\\\\n\\\\tTranscript show: 'the time server reports: ' , s getResponseNoLF.\\\\n\\\\ts closeAndDestroy.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: '---------- Connection Closed ----------';\\\\n\\\\t\\\\tcr! !\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'rbb 3/1/2005 11:03'!\\\\ntimeTestUDP\\\\n\\\\t\\\\\\\"Socket timeTestUDP\\\\\\\"\\\\n\\\\n\\\\t| serverName serverAddr s |\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetworkIfFail: [^Transcript show: 'failed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tserverName := UIManager default request: 'What is your time server?'\\\\n\\\\t\\\\t\\\\t\\\\tinitialAnswer: 'localhost'.\\\\n\\\\tserverName isEmpty \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[^Transcript\\\\n\\\\t\\\\t\\\\t\\\\tshow: 'never mind';\\\\n\\\\t\\\\t\\\\t\\\\tcr].\\\\n\\\\tserverAddr := NetNameResolver addressForName: serverName timeout: 10.\\\\n\\\\tserverAddr = nil \\\\n\\\\t\\\\tifTrue: [self error: 'Could not find the address for ' , serverName].\\\\n\\\\ts := self newUDP.\\\\t\\\\\\\"a 'random' port number will be allocated by the system\\\\\\\"\\\\n\\\\t\\\\\\\"Send a packet to the daytime port and it will reply with the current date.\\\\\\\"\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: '---------- Sending datagram from port ' , s port printString \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, ' ----------';\\\\n\\\\t\\\\tcr.\\\\n\\\\ts \\\\n\\\\t\\\\tsendData: '!!'\\\\n\\\\t\\\\ttoHost: serverAddr\\\\n\\\\t\\\\tport: 13.\\\\t\\\\\\\"13 is the daytime service\\\\\\\"\\\\n\\\\tTranscript show: 'the time server reports: ' , s getResponseNoLF.\\\\n\\\\ts closeAndDestroy.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: '---------- Socket closed ----------';\\\\n\\\\t\\\\tcr! !\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'rbb 3/1/2005 11:03'!\\\\ntimeTestUDP2\\\\n\\\\t\\\\\\\"Socket timeTestUDP2\\\\\\\"\\\\n\\\\n\\\\t| serverName serverAddr s |\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetworkIfFail: [^Transcript show: 'failed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tserverName := UIManager default request: 'What is your time server?'\\\\n\\\\t\\\\t\\\\t\\\\tinitialAnswer: 'localhost'.\\\\n\\\\tserverName isEmpty \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[^Transcript\\\\n\\\\t\\\\t\\\\t\\\\tshow: 'never mind';\\\\n\\\\t\\\\t\\\\t\\\\tcr].\\\\n\\\\tserverAddr := NetNameResolver addressForName: serverName timeout: 10.\\\\n\\\\tserverAddr = nil \\\\n\\\\t\\\\tifTrue: [self error: 'Could not find the address for ' , serverName].\\\\n\\\\ts := self newUDP.\\\\n\\\\t\\\\\\\"The following associates a port with the UDP socket, but does NOT create a connectable endpoint\\\\\\\"\\\\n\\\\ts setPort: 54321.\\\\n\\\\t\\\\\\\"Send a packet to the daytime port and it will reply with the current date.\\\\\\\"\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: '---------- Sending datagram from port ' , s port printString \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, ' ----------';\\\\n\\\\t\\\\tcr.\\\\n\\\\ts \\\\n\\\\t\\\\tsendData: '!!'\\\\n\\\\t\\\\ttoHost: serverAddr\\\\n\\\\t\\\\tport: 13.\\\\n\\\\tTranscript show: 'the time server reports: ' , s getResponseNoLF.\\\\n\\\\ts closeAndDestroy.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: '---------- Socket closed ----------';\\\\n\\\\t\\\\tcr! !\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'rbb 3/1/2005 11:03'!\\\\ntimeTestUDP3\\\\n\\\\t\\\\\\\"Socket timeTestUDP3\\\\\\\"\\\\n\\\\n\\\\t| serverName serverAddr s |\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetworkIfFail: [^Transcript show: 'failed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tserverName := UIManager default request: 'What is your time server?'\\\\n\\\\t\\\\t\\\\t\\\\tinitialAnswer: 'localhost'.\\\\n\\\\tserverName isEmpty \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[^Transcript\\\\n\\\\t\\\\t\\\\t\\\\tshow: 'never mind';\\\\n\\\\t\\\\t\\\\t\\\\tcr].\\\\n\\\\tserverAddr := NetNameResolver addressForName: serverName timeout: 10.\\\\n\\\\tserverAddr = nil \\\\n\\\\t\\\\tifTrue: [self error: 'Could not find the address for ' , serverName].\\\\n\\\\ts := self newUDP.\\\\n\\\\t\\\\\\\"The following associates a port with the UDP socket, but does NOT create a connectable endpoint\\\\\\\"\\\\n\\\\ts setPort: self wildcardPort.\\\\t\\\\\\\"explicitly request a default port number\\\\\\\"\\\\n\\\\t\\\\\\\"Send a packet to the daytime port and it will reply with the current date.\\\\\\\"\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: '---------- Sending datagram from port ' , s port printString \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, ' ----------';\\\\n\\\\t\\\\tcr.\\\\n\\\\ts \\\\n\\\\t\\\\tsendData: '!!'\\\\n\\\\t\\\\ttoHost: serverAddr\\\\n\\\\t\\\\tport: 13.\\\\n\\\\tTranscript show: 'the time server reports: ' , s getResponseNoLF.\\\\n\\\\ts closeAndDestroy.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: '---------- Socket closed ----------';\\\\n\\\\t\\\\tcr! !\\\\n\\\\n\\\\n!OldSocket class methodsFor: 'instance creation' stamp: 'ls 9/24/1999 09:45'!\\\\nacceptFrom: aSocket\\\\n\\\\t^[ super new acceptFrom: aSocket ]\\\\n\\\\t\\\\trepeatWithGCIf: [ :sock | sock isValid not ]! !\\\\n\\\\n!OldSocket class methodsFor: 'instance creation' stamp: 'ar 4/30/1999 04:15'!\\\\ncreateIfFail: failBlock\\\\n\\\\t\\\\\\\"Attempt to create a new socket. If successful, return the new socket. Otherwise, return the result of evaluating the given block. Socket creation can fail if the network isn't available or if there are not sufficient resources available to create another socket.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: The default creates a TCP socket\\\\\\\"\\\\n\\\\t^self tcpCreateIfFail: failBlock! !\\\\n\\\\n!OldSocket class methodsFor: 'instance creation' stamp: 'ar 4/30/1999 04:13'!\\\\nnew\\\\n\\\\t\\\\\\\"Return a new, unconnected Socket. Note that since socket creation may fail, it is safer to use the method createIfFail: to handle such failures gracefully; this method is primarily for backward compatibility and may be disallowed in a future release.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: The default creates a TCP socket - this is also backward compatibility.\\\\\\\"\\\\n\\\\t^self newTCP! !\\\\n\\\\n!OldSocket class methodsFor: 'instance creation' stamp: 'ls 9/24/1999 10:19'!\\\\nnewTCP\\\\n\\\\t\\\\\\\"Create a socket and initialise it for TCP\\\\\\\"\\\\n\\\\t^[ super new initialize: TCPSocketType ]\\\\n\\\\t\\\\trepeatWithGCIf: [ :socket | socket isValid not ]! !\\\\n\\\\n!OldSocket class methodsFor: 'instance creation' stamp: 'ls 9/24/1999 09:44'!\\\\nnewUDP\\\\n\\\\t\\\\\\\"Create a socket and initialise it for UDP\\\\\\\"\\\\n\\\\t^[ super new initialize: UDPSocketType ]\\\\n\\\\t\\\\trepeatWithGCIf: [ :socket | socket isValid not ]! !\\\\n\\\\n!OldSocket class methodsFor: 'instance creation' stamp: 'ar 4/30/1999 04:14'!\\\\ntcpCreateIfFail: failBlock\\\\n\\\\t\\\\\\\"Attempt to create a new socket. If successful, return the new socket. Otherwise, return the result of evaluating the given block. Socket creation can fail if the network isn't available or if there are not sufficient resources available to create another socket.\\\\\\\"\\\\n\\\\n\\\\t| sock |\\\\n\\\\tsock _ super new initialize: TCPSocketType.\\\\n\\\\tsock isValid ifFalse: [^ failBlock value].\\\\n\\\\t^ sock\\\\n! !\\\\n\\\\n!OldSocket class methodsFor: 'instance creation' stamp: 'ar 4/30/1999 04:14'!\\\\nudpCreateIfFail: failBlock\\\\n\\\\t\\\\\\\"Attempt to create a new socket. If successful, return the new socket. Otherwise, return the result of evaluating the given block. Socket creation can fail if the network isn't available or if there are not sufficient resources available to create another socket.\\\\\\\"\\\\n\\\\n\\\\t| sock |\\\\n\\\\tsock _ super new initialize: UDPSocketType.\\\\n\\\\tsock isValid ifFalse: [^ failBlock value].\\\\n\\\\t^ sock\\\\n! !\\\\n\\\\n\\\\n!OldSocket class methodsFor: 'network initialization' stamp: 'nk 2/24/2005 14:38'!\\\\nensureNetworkConnected\\\\n\\\\t\\\\\\\"Try to ensure that an intermittent network connection, such as a dialup or ISDN line, is actually connected. This is necessary to make sure a server is visible in order to accept an incoming connection.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Socket ensureNetworkConnected\\\\\\\"\\\\n\\\\n\\\\tself initializeNetwork.\\\\n\\\\tUtilities informUser: 'Contacting domain name server...'\\\\n\\\\t\\\\tduring: \\\\n\\\\t\\\\t\\\\t[NetNameResolver addressForName: 'bogusNameToForceDNSToBeConsulted.org'\\\\n\\\\t\\\\t\\\\t\\\\ttimeout: 30]! !\\\\n\\\\n!OldSocket class methodsFor: 'network initialization' stamp: 'mir 11/14/2002 19:36'!\\\\ninitializeNetwork\\\\n\\\\t\\\\\\\"Initialize the network drivers and the NetNameResolver. Do nothing if the network is already initialized.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: The network must be re-initialized every time Squeak starts up, so applications that persist across snapshots should be prepared to re-initialize the network as needed. Such applications should call 'Socket initializeNetwork' before every network transaction. \\\\\\\"\\\\n\\\\n\\\\tNetNameResolver initializeNetwork! !\\\\n\\\\n!OldSocket class methodsFor: 'network initialization' stamp: 'mir 11/14/2002 19:36'!\\\\ninitializeNetworkIfFail: failBlock\\\\n\\\\t\\\\\\\"Initialize the network drivers. Do nothing if the network is already initialized. Evaluate the given block if network initialization fails, perhaps because this computer isn't currently connected to a network.\\\\\\\"\\\\n\\\\n\\\\tNetNameResolver initializeNetwork! !\\\\n\\\\n\\\\n!OldSocket class methodsFor: 'registry' stamp: 'ar 10/7/1998 14:40'!\\\\nregister: anObject\\\\n\\\\tWeakArray isFinalizationSupported ifFalse:[^anObject].\\\\n\\\\tself registry add: anObject! !\\\\n\\\\n!OldSocket class methodsFor: 'registry' stamp: 'ar 10/7/1998 14:40'!\\\\nregistry\\\\n\\\\tWeakArray isFinalizationSupported ifFalse:[^nil].\\\\n\\\\t^Registry isNil\\\\n\\\\t\\\\tifTrue:[Registry := WeakRegistry new]\\\\n\\\\t\\\\tifFalse:[Registry].! !\\\\n\\\\n!OldSocket class methodsFor: 'registry' stamp: 'ar 12/12/2001 19:12'!\\\\nregistryThreshold\\\\n\\\\t\\\\\\\"Return the registry threshold above which socket creation may fail due to too many already open sockets. If the threshold is reached, a full GC will be issued if the creation of a socket fails.\\\\\\\"\\\\n\\\\t^RegistryThreshold! !\\\\n\\\\n!OldSocket class methodsFor: 'registry' stamp: 'ar 12/12/2001 19:12'!\\\\nregistryThreshold: aNumber\\\\n\\\\t\\\\\\\"Return the registry threshold above which socket creation may fail due to too many already open sockets. If the threshold is reached, a full GC will be issued if the creation of a socket fails.\\\\\\\"\\\\n\\\\tRegistryThreshold _ aNumber! !\\\\n\\\\n!OldSocket class methodsFor: 'registry' stamp: 'ar 10/7/1998 15:22'!\\\\nunregister: anObject\\\\n\\\\tWeakArray isFinalizationSupported ifFalse:[^anObject].\\\\n\\\\tself registry remove: anObject ifAbsent:[]! !\\\\n\\\\n\\\\n\\\\n!OldSocket class methodsFor: 'utilities' stamp: 'tk 4/9/98 15:54'!\\\\ndeadServer\\\\n\\\\n\\\\t^ DeadServer! !\\\\n\\\\n!OldSocket class methodsFor: 'utilities' stamp: 'tk 4/9/98 15:56'!\\\\ndeadServer: aStringOrNil\\\\n\\\\t\\\\\\\"Keep the machine name of the most recently encoutered non-responding machine.  Next time the user can move it to the last in a list of servers to try.\\\\\\\"\\\\n\\\\n\\\\tDeadServer _ aStringOrNil! !\\\\n\\\\n!OldSocket class methodsFor: 'utilities' stamp: 'jm 9/15/97 06:56'!\\\\ndeadlineSecs: secs\\\\n\\\\t\\\\\\\"Return a deadline time the given number of seconds from now.\\\\\\\"\\\\n\\\\n\\\\t^ Time millisecondClockValue + (secs * 1000)\\\\n! !\\\\n\\\\n!OldSocket class methodsFor: 'utilities' stamp: 'jm 1/14/1999 12:13'!\\\\nnameForWellKnownTCPPort: portNum\\\\n\\\\t\\\\\\\"Answer the name for the given well-known TCP port number. Answer a string containing the port number if it isn't well-known.\\\\\\\"\\\\n\\\\n\\\\t| portList entry |\\\\n\\\\tportList _ #(\\\\n\\\\t\\\\t(7 'echo') (9 'discard') (13 'time') (19 'characterGenerator')\\\\n\\\\t\\\\t(21 'ftp') (23 'telnet') (25 'smtp')\\\\n\\\\t\\\\t(80 'http') (110 'pop3') (119 'nntp')).\\\\n\\\\tentry _ portList detect: [:pair | pair first = portNum] ifNone: [^ 'port-', portNum printString].\\\\n\\\\t^ entry last\\\\n! !\\\\n\\\\n!OldSocket class methodsFor: 'utilities' stamp: 'nk 2/24/2005 14:38'!\\\\nping: hostName \\\\n\\\\t\\\\\\\"Ping the given host. Useful for checking network connectivity. The host must be running a TCP echo server.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Socket ping: 'squeak.cs.uiuc.edu'\\\\\\\"\\\\n\\\\n\\\\t| tcpPort sock serverAddr startTime echoTime |\\\\n\\\\ttcpPort := 7.\\\\t\\\\\\\"7 = echo port, 13 = time port, 19 = character generator port\\\\\\\"\\\\n\\\\tself initializeNetwork.\\\\n\\\\tserverAddr := NetNameResolver addressForName: hostName timeout: 10.\\\\n\\\\tserverAddr = nil \\\\n\\\\t\\\\tifTrue: [^self inform: 'Could not find an address for ' , hostName].\\\\n\\\\tsock := self new.\\\\n\\\\tsock connectTo: serverAddr port: tcpPort.\\\\n\\\\t\\\\n\\\\t[sock waitForConnectionUntil: (self deadlineSecs: 10).\\\\n\\\\tsock isConnected] \\\\n\\\\t\\\\t\\\\twhileFalse: \\\\n\\\\t\\\\t\\\\t\\\\t[(self confirm: 'Continue to wait for connection to ' , hostName , '?') \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[sock destroy.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^self]].\\\\n\\\\tsock sendData: 'echo!!'.\\\\n\\\\tstartTime := Time millisecondClockValue.\\\\n\\\\t\\\\n\\\\t[sock waitForDataUntil: (self deadlineSecs: 15).\\\\n\\\\tsock dataAvailable] \\\\n\\\\t\\\\t\\\\twhileFalse: \\\\n\\\\t\\\\t\\\\t\\\\t[(self confirm: 'Packet sent but no echo yet; keep waiting?') \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[sock destroy.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^self]].\\\\n\\\\techoTime := Time millisecondClockValue - startTime.\\\\n\\\\tsock destroy.\\\\n\\\\tself inform: hostName , ' responded in ' , echoTime printString \\\\n\\\\t\\\\t\\\\t\\\\t, ' milliseconds'! !\\\\n\\\\n!OldSocket class methodsFor: 'utilities' stamp: 'nk 2/24/2005 14:38'!\\\\npingPorts: portList on: hostName timeOutSecs: timeOutSecs \\\\n\\\\t\\\\\\\"Attempt to connect to each of the given sockets on the given host. Wait at most timeOutSecs for the connections to be established. Answer an array of strings indicating the available ports.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Socket pingPorts: #(7 13 19 21 23 25 80 110 119) on: 'squeak.cs.uiuc.edu' timeOutSecs: 15\\\\\\\"\\\\n\\\\n\\\\t| serverAddr sockets sock deadline done unconnectedCount connectedCount waitingCount result |\\\\n\\\\tself initializeNetwork.\\\\n\\\\tserverAddr := NetNameResolver addressForName: hostName timeout: 10.\\\\n\\\\tserverAddr = nil \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[self inform: 'Could not find an address for ' , hostName.\\\\n\\\\t\\\\t\\\\t^#()].\\\\n\\\\tsockets := portList collect: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:portNum | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsock := self new.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsock connectTo: serverAddr port: portNum].\\\\n\\\\tdeadline := self deadlineSecs: timeOutSecs.\\\\n\\\\tdone := false.\\\\n\\\\t[done] whileFalse: \\\\n\\\\t\\\\t\\\\t[unconnectedCount := 0.\\\\n\\\\t\\\\t\\\\tconnectedCount := 0.\\\\n\\\\t\\\\t\\\\twaitingCount := 0.\\\\n\\\\t\\\\t\\\\tsockets do: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:s | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\ts isUnconnectedOrInvalid \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [unconnectedCount := unconnectedCount + 1]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[s isConnected ifTrue: [connectedCount := connectedCount + 1].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ts isWaitingForConnection ifTrue: [waitingCount := waitingCount + 1]]].\\\\n\\\\t\\\\t\\\\twaitingCount = 0 ifTrue: [done := true].\\\\n\\\\t\\\\t\\\\tconnectedCount = sockets size ifTrue: [done := true].\\\\n\\\\t\\\\t\\\\tTime millisecondClockValue > deadline ifTrue: [done := true]].\\\\n\\\\tresult := (sockets select: [:s | s isConnected]) \\\\n\\\\t\\\\t\\\\t\\\\tcollect: [:s | self nameForWellKnownTCPPort: s remotePort].\\\\n\\\\tsockets do: [:s | s destroy].\\\\n\\\\t^result! !\\\\n\\\\n!OldSocket class methodsFor: 'utilities' stamp: 'nk 2/24/2005 14:38'!\\\\npingPortsOn: hostName \\\\n\\\\t\\\\\\\"Attempt to connect to a set of well-known sockets on the given host, and answer the names of the available ports.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Socket pingPortsOn: 'www.disney.com'\\\\\\\"\\\\n\\\\n\\\\t^self \\\\n\\\\t\\\\tpingPorts: #(7 13 19 21 23 25 80 110 119)\\\\n\\\\t\\\\ton: hostName\\\\n\\\\t\\\\ttimeOutSecs: 20! !\\\\n\\\\n!OldSocket class methodsFor: 'utilities' stamp: 'jm 9/15/97 06:56'!\\\\nstandardDeadline\\\\n\\\\t\\\\\\\"Return a default deadline time some seconds into the future.\\\\\\\"\\\\n\\\\n\\\\t^ self deadlineSecs: 45\\\\n! !\\\\n\\\\n!OldSocket class methodsFor: 'utilities' stamp: 'ar 4/30/1999 04:21'!\\\\nwildcardAddress\\\\n\\\\t\\\\\\\"Answer a don't-care address for use with UDP sockets.\\\\\\\"\\\\n\\\\n\\\\t^ByteArray new: 4\\\\t\\\\t\\\\\\\"0.0.0.0\\\\\\\"! !\\\\n\\\\n!OldSocket class methodsFor: 'utilities' stamp: 'ar 4/30/1999 04:21'!\\\\nwildcardPort\\\\n\\\\t\\\\\\\"Answer a don't-care port for use with UDP sockets.  (The system will allocate an\\\\n\\\\tunused port number to the socket.)\\\\\\\"\\\\n\\\\n\\\\t^0! !\\\\nSwitch subclass: #OneOnSwitch\\\\n\\\\tinstanceVariableNames: 'connection'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'ST80-Menus'!\\\\n!OneOnSwitch commentStamp: '<historical>' prior: 0!\\\\nI am a kind of Switch that can be connected to some related object, typically to a collection of my instances. When my instance is created, its connection is set to a particular object. When the object changes because an Switch it refers to is turned on, an update message is broadcasted. All the connected OneOnSwitches, except the changed one, turn off. This allows OneOnSwitches to maintain the constraint that at most one of them will be on at any time. OneOnSwitches can thus be made to act like \\\\\\\"car radio\\\\\\\" switches.!\\\\n\\\\n\\\\n!OneOnSwitch methodsFor: 'connection'!\\\\nconnection\\\\n\\\\t\\\\\\\"Answer the object that connects the receiver to other Switches.\\\\\\\"\\\\n\\\\n\\\\t^connection! !\\\\n\\\\n!OneOnSwitch methodsFor: 'connection'!\\\\nconnection: anObject \\\\n\\\\t\\\\\\\"Set anObject to be the connection among two or more Switches. Make the \\\\n\\\\treceiver a dependent of the argument, anObject.\\\\\\\"\\\\n\\\\n\\\\tconnection _ anObject.\\\\n\\\\tconnection addDependent: self! !\\\\n\\\\n!OneOnSwitch methodsFor: 'connection'!\\\\nisConnectionSet\\\\n\\\\t\\\\\\\"Answer whether the receiver is connected to an object that coordinates \\\\n\\\\tupdates among switches.\\\\\\\"\\\\n\\\\n\\\\tconnection == nil\\\\n\\\\t\\\\tifTrue: [^false]\\\\n\\\\t\\\\tifFalse: [^true]! !\\\\n\\\\n!OneOnSwitch methodsFor: 'connection'!\\\\nnotifyConnection\\\\n\\\\t\\\\\\\"Send the receiver's connection (if it exists) the message 'changed: self' in \\\\n\\\\torder for the connection to broadcast the change to other objects \\\\n\\\\tconnected by the connection.\\\\\\\"\\\\n\\\\t\\\\n\\\\tself isConnectionSet ifTrue: [self connection changed: self]! !\\\\n\\\\n\\\\n!OneOnSwitch methodsFor: 'initialize-release'!\\\\nrelease\\\\n\\\\n\\\\tsuper release.\\\\n\\\\tself isConnectionSet ifTrue: [connection removeDependent: self]! !\\\\n\\\\n\\\\n!OneOnSwitch methodsFor: 'state'!\\\\nturnOn\\\\n\\\\t\\\\\\\"Does nothing if it is already on. If it is not, it is set to 'on', its\\\\n\\\\tdependents are \\\\tnotified of the change, its connection is notified, and\\\\n\\\\tits action is executed.\\\\\\\"\\\\n\\\\n\\\\tself isOff\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[on _ true.\\\\n\\\\t\\\\t\\\\tself changed.\\\\n\\\\t\\\\t\\\\tself notifyConnection.\\\\n\\\\t\\\\t\\\\tself doAction: onAction]! !\\\\n\\\\n\\\\n!OneOnSwitch methodsFor: 'updating'!\\\\nupdate: aOneOnSwitch \\\\n\\\\t\\\\\\\"Does nothing if aOneOnSwitch is identical to this object. If it is not, this \\\\n\\\\tobject is turned off. This message is sent by the connection (an Object)\\\\n\\\\twhen some related OneOnSwitch (possibly this one) has changed. This\\\\n\\\\tallows a group of related OneOnSwitches to maintain the constraint that\\\\n\\\\tat most one will be on at any time.\\\\\\\"\\\\n\\\\n\\\\tself ~~ aOneOnSwitch ifTrue: [self turnOff]! !\\\\nURI subclass: #OpaqueURI\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Network-URI'!\\\\n\\\\n!OpaqueURI methodsFor: 'testing' stamp: 'mir 2/20/2002 16:55'!\\\\nisOpaque\\\\n\\\\t^true! !\\\\nSmallLandColorTheme subclass: #OrangeSmallLandColorTheme\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Support'!\\\\n\\\\n!OrangeSmallLandColorTheme methodsFor: 'initialization' stamp: 'dgd 3/12/2006 13:25'!\\\\nbaseColors\\\\n\\\\\\\"\\\\nOrangeSmallLandColorTheme apply.\\\\n\\\\\\\"\\\\n\\\\t^ Array\\\\n\\\\t\\\\twith: (Color fromArray: #(0.8 0.4 0.0 ))\\\\n\\\\t\\\\twith: (Color fromArray: #(1.0 0.8 0.0 ))\\\\n\\\\t\\\\twith: (Color fromArray: #(1.0 1.0 0.8 ))! !\\\\nSequenceableCollection subclass: #OrderedCollection\\\\n\\\\tinstanceVariableNames: 'array firstIndex lastIndex'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Collections-Sequenceable'!\\\\n!OrderedCollection commentStamp: '<historical>' prior: 0!\\\\nI represent a collection of objects ordered by the collector.!\\\\n\\\\n\\\\n!OrderedCollection methodsFor: 'accessing'!\\\\nat: anInteger \\\\n\\\\t\\\\\\\"Answer my element at index anInteger. at: is used by a knowledgeable\\\\n\\\\tclient to access an existing element\\\\\\\"\\\\n\\\\n\\\\t(anInteger < 1 or: [anInteger + firstIndex - 1 > lastIndex])\\\\n\\\\t\\\\tifTrue: [self errorNoSuchElement]\\\\n\\\\t\\\\tifFalse: [^ array at: anInteger + firstIndex - 1]! !\\\\n\\\\n!OrderedCollection methodsFor: 'accessing'!\\\\nat: anInteger put: anObject \\\\n\\\\t\\\\\\\"Put anObject at element index anInteger. at:put: cannot be used to\\\\n\\\\tappend, front or back, to an ordered collection; it is used by a\\\\n\\\\tknowledgeable client to replace an element.\\\\\\\"\\\\n\\\\n\\\\t| index |\\\\n\\\\tindex _ anInteger asInteger.\\\\n\\\\t(index < 1 or: [index + firstIndex - 1 > lastIndex])\\\\n\\\\t\\\\tifTrue: [self errorNoSuchElement]\\\\n\\\\t\\\\tifFalse: [^array at: index + firstIndex - 1 put: anObject]! !\\\\n\\\\n!OrderedCollection methodsFor: 'accessing' stamp: 'sma 5/12/2000 11:42'!\\\\ncapacity\\\\n\\\\t\\\\\\\"Answer the current capacity of the receiver.\\\\\\\"\\\\n\\\\n\\\\t^ array size! !\\\\n\\\\n!OrderedCollection methodsFor: 'accessing' stamp: 'sma 5/12/2000 11:39'!\\\\nsize\\\\n\\\\t\\\\\\\"Answer how many elements the receiver contains.\\\\\\\"\\\\n\\\\n\\\\t^ lastIndex - firstIndex + 1! !\\\\n\\\\n\\\\n!OrderedCollection methodsFor: 'adding'!\\\\nadd: newObject\\\\n\\\\n\\\\t^self addLast: newObject! !\\\\n\\\\n!OrderedCollection methodsFor: 'adding'!\\\\nadd: newObject after: oldObject \\\\n\\\\t\\\\\\\"Add the argument, newObject, as an element of the receiver. Put it in \\\\n\\\\tthe sequence just succeeding oldObject. Answer newObject.\\\\\\\"\\\\n\\\\t\\\\n\\\\t| index |\\\\n\\\\tindex _ self find: oldObject.\\\\n\\\\tself insert: newObject before: index + 1.\\\\n\\\\t^newObject! !\\\\n\\\\n!OrderedCollection methodsFor: 'adding' stamp: 'di 3/15/1999 14:01'!\\\\nadd: newObject afterIndex: index \\\\n\\\\t\\\\\\\"Add the argument, newObject, as an element of the receiver. Put it in \\\\n\\\\tthe sequence just after index. Answer newObject.\\\\\\\"\\\\n\\\\n\\\\tself insert: newObject before: firstIndex + index.\\\\n\\\\t^ newObject! !\\\\n\\\\n!OrderedCollection methodsFor: 'adding'!\\\\nadd: newObject before: oldObject \\\\n\\\\t\\\\\\\"Add the argument, newObject, as an element of the receiver. Put it in \\\\n\\\\tthe sequence just preceding oldObject. Answer newObject.\\\\\\\"\\\\n\\\\t\\\\n\\\\t| index |\\\\n\\\\tindex _ self find: oldObject.\\\\n\\\\tself insert: newObject before: index.\\\\n\\\\t^newObject! !\\\\n\\\\n!OrderedCollection methodsFor: 'adding' stamp: 'BG 1/9/2004 12:30'!\\\\nadd: newObject beforeIndex: index \\\\n \\\\\\\"Add the argument, newObject, as an element of the receiver. Put it in \\\\n the sequence just before index. Answer newObject.\\\\\\\"\\\\n\\\\n self add: newObject afterIndex: index - 1.\\\\n ^ newObject! !\\\\n\\\\n!OrderedCollection methodsFor: 'adding' stamp: 'sma 5/12/2000 11:26'!\\\\naddAll: aCollection \\\\n\\\\t\\\\\\\"Add each element of aCollection at my end. Answer\\\\taCollection.\\\\\\\"\\\\n\\\\n\\\\t^ self addAllLast: aCollection! !\\\\n\\\\n!OrderedCollection methodsFor: 'adding'!\\\\naddAllFirst: anOrderedCollection \\\\n\\\\t\\\\\\\"Add each element of anOrderedCollection at the beginning of the \\\\n\\\\treceiver. Answer anOrderedCollection.\\\\\\\"\\\\n\\\\n\\\\tanOrderedCollection reverseDo: [:each | self addFirst: each].\\\\n\\\\t^anOrderedCollection! !\\\\n\\\\n!OrderedCollection methodsFor: 'adding' stamp: 'sw 3/1/2001 11:03'!\\\\naddAllFirstUnlessAlreadyPresent: anOrderedCollection \\\\n\\\\t\\\\\\\"Add each element of anOrderedCollection at the beginning of the receiver, preserving the order, but do not add any items that are already in the receiver.  Answer anOrderedCollection.\\\\\\\"\\\\n\\\\n\\\\tanOrderedCollection reverseDo:\\\\n\\\\t\\\\t[:each | (self includes: each) ifFalse: [self addFirst: each]].\\\\n\\\\t^ anOrderedCollection! !\\\\n\\\\n!OrderedCollection methodsFor: 'adding'!\\\\naddAllLast: anOrderedCollection \\\\n\\\\t\\\\\\\"Add each element of anOrderedCollection at the end of the receiver. \\\\n\\\\tAnswer anOrderedCollection.\\\\\\\"\\\\n\\\\n\\\\tanOrderedCollection do: [:each | self addLast: each].\\\\n\\\\t^anOrderedCollection! !\\\\n\\\\n!OrderedCollection methodsFor: 'adding'!\\\\naddFirst: newObject \\\\n\\\\t\\\\\\\"Add newObject to the beginning of the receiver. Answer newObject.\\\\\\\"\\\\n\\\\n\\\\tfirstIndex = 1 ifTrue: [self makeRoomAtFirst].\\\\n\\\\tfirstIndex _ firstIndex - 1.\\\\n\\\\tarray at: firstIndex put: newObject.\\\\n\\\\t^ newObject! !\\\\n\\\\n!OrderedCollection methodsFor: 'adding'!\\\\naddLast: newObject \\\\n\\\\t\\\\\\\"Add newObject to the end of the receiver. Answer newObject.\\\\\\\"\\\\n\\\\n\\\\tlastIndex = array size ifTrue: [self makeRoomAtLast].\\\\n\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\tarray at: lastIndex put: newObject.\\\\n\\\\t^ newObject! !\\\\n\\\\n!OrderedCollection methodsFor: 'adding' stamp: 'ajh 5/22/2003 12:03'!\\\\nat: index ifAbsentPut: block\\\\n\\\\t\\\\\\\"Return value at index, however, if value does not exist (nil or out of bounds) then add block's value at index (growing self if necessary)\\\\\\\"\\\\n\\\\n\\\\t| v |\\\\n\\\\tindex <= self size ifTrue: [\\\\n\\\\t\\\\t^ (v _ self at: index)\\\\n\\\\t\\\\t\\\\tifNotNil: [v]\\\\n\\\\t\\\\t\\\\tifNil: [self at: index put: block value]\\\\n\\\\t].\\\\n\\\\t[self size < index] whileTrue: [self add: nil].\\\\n\\\\t^ self at: index put: block value! !\\\\n\\\\n!OrderedCollection methodsFor: 'adding'!\\\\ngrow\\\\n\\\\t\\\\\\\"Become larger. Typically, a subclass has to override this if the subclass\\\\n\\\\tadds instance variables.\\\\\\\"\\\\n\\\\t| newArray |\\\\n\\\\tnewArray _ Array new: self size + self growSize.\\\\n\\\\tnewArray replaceFrom: 1 to: array size with: array startingAt: 1.\\\\n\\\\tarray _ newArray! !\\\\n\\\\n!OrderedCollection methodsFor: 'adding'!\\\\ngrowSize\\\\n\\\\t^ array size max: 2! !\\\\n\\\\n\\\\n!OrderedCollection methodsFor: 'copying'!\\\\ncopyEmpty\\\\n\\\\t\\\\\\\"Answer a copy of the receiver that contains no elements.\\\\\\\"\\\\n\\\\n\\\\t^self species new! !\\\\n\\\\n!OrderedCollection methodsFor: 'copying' stamp: 'di 12/12/2000 10:15'!\\\\ncopyFrom: startIndex to: endIndex \\\\n\\\\t\\\\\\\"Answer a copy of the receiver that contains elements from position\\\\n\\\\tstartIndex to endIndex.\\\\\\\"\\\\n\\\\n\\\\t| targetCollection |\\\\n\\\\tendIndex < startIndex ifTrue: [^self species new: 0].\\\\n\\\\ttargetCollection _ self species new: endIndex + 1 - startIndex.\\\\n\\\\tstartIndex to: endIndex do: [:index | targetCollection addLast: (self at: index)].\\\\n\\\\t^ targetCollection! !\\\\n\\\\n!OrderedCollection methodsFor: 'copying'!\\\\ncopyReplaceFrom: start to: stop with: replacementCollection \\\\n\\\\t\\\\\\\"Answer a copy of the receiver with replacementCollection's elements in\\\\n\\\\tplace of the receiver's start'th to stop'th elements. This does not expect\\\\n\\\\ta 1-1 map from replacementCollection to the start to stop elements, so it\\\\n\\\\twill do an insert or append.\\\\\\\"\\\\n\\\\n\\\\t| newOrderedCollection delta startIndex stopIndex |\\\\n\\\\t\\\\\\\"if start is less than 1, ignore stop and assume this is inserting at the front. \\\\n\\\\tif start greater than self size, ignore stop and assume this is appending. \\\\n\\\\totherwise, it is replacing part of me and start and stop have to be within my \\\\n\\\\tbounds. \\\\\\\"\\\\n\\\\tdelta _ 0.\\\\n\\\\tstartIndex _ start.\\\\n\\\\tstopIndex _ stop.\\\\n\\\\tstart < 1\\\\n\\\\t\\\\tifTrue: [startIndex _ stopIndex _ 0]\\\\n\\\\t\\\\tifFalse: [startIndex > self size\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [startIndex _ stopIndex _ self size + 1]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[(stopIndex < (startIndex - 1) or: [stopIndex > self size])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self errorOutOfBounds].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdelta _ stopIndex - startIndex + 1]].\\\\n\\\\tnewOrderedCollection _ \\\\n\\\\t\\\\tself species new: self size + replacementCollection size - delta.\\\\n\\\\t1 to: startIndex - 1 do: [:index | newOrderedCollection add: (self at: index)].\\\\n\\\\t1 to: replacementCollection size do: \\\\n\\\\t\\\\t[:index | newOrderedCollection add: (replacementCollection at: index)].\\\\n\\\\tstopIndex + 1 to: self size do: [:index | newOrderedCollection add: (self at: index)].\\\\n\\\\t^newOrderedCollection! !\\\\n\\\\n!OrderedCollection methodsFor: 'copying'!\\\\ncopyWith: newElement \\\\n\\\\t\\\\\\\"Answer a copy of the receiver that is 1 bigger than the receiver and \\\\n\\\\tincludes the argument, newElement, at the end.\\\\\\\"\\\\n\\\\n\\\\t| newCollection |\\\\n\\\\tnewCollection _ self copy.\\\\n\\\\tnewCollection add: newElement.\\\\n\\\\t^newCollection! !\\\\n\\\\n!OrderedCollection methodsFor: 'copying' stamp: 'sw 1/26/96'!\\\\nreversed\\\\n\\\\t\\\\\\\"Answer a copy of the receiver with element order reversed.  \\\\\\\"\\\\n\\\\t| newCol |\\\\n\\\\tnewCol _ self species new.\\\\n\\\\tself reverseDo:\\\\n\\\\t\\\\t[:elem | newCol addLast: elem].\\\\n\\\\t^ newCol\\\\n\\\\n\\\\\\\"#(2 3 4 'fred') reversed\\\\\\\"! !\\\\n\\\\n\\\\n!OrderedCollection methodsFor: 'enumerating' stamp: 'sma 2/5/2000 15:22'!\\\\ncollect: aBlock \\\\n\\\\t\\\\\\\"Evaluate aBlock with each of my elements as the argument. Collect the \\\\n\\\\tresulting values into a collection that is like me. Answer the new \\\\n\\\\tcollection. Override superclass in order to use addLast:, not at:put:.\\\\\\\"\\\\n\\\\n\\\\t| newCollection |\\\\n\\\\tnewCollection _ self species new: self size.\\\\n\\\\tfirstIndex to: lastIndex do:\\\\n\\\\t\\\\t[:index |\\\\n\\\\t\\\\tnewCollection addLast: (aBlock value: (array at: index))].\\\\n\\\\t^ newCollection! !\\\\n\\\\n!OrderedCollection methodsFor: 'enumerating' stamp: 'bf 5/18/2000 17:34'!\\\\ncollect: aBlock from: fromIndex to: toIndex\\\\n\\\\t\\\\\\\"Override superclass in order to use addLast:, not at:put:.\\\\\\\"\\\\n\\\\t| result |\\\\n\\\\t(fromIndex < 1 or:[toIndex + firstIndex - 1 > lastIndex])\\\\n\\\\t\\\\tifTrue: [^self errorNoSuchElement].\\\\n\\\\tresult _ self species new: toIndex - fromIndex + 1.\\\\n\\\\tfirstIndex + fromIndex - 1 to: firstIndex + toIndex - 1 do:\\\\n\\\\t\\\\t[:index | result addLast: (aBlock value: (array at: index))].\\\\n\\\\t^ result\\\\n! !\\\\n\\\\n!OrderedCollection methodsFor: 'enumerating'!\\\\ndo: aBlock \\\\n\\\\t\\\\\\\"Override the superclass for performance reasons.\\\\\\\"\\\\n\\\\t| index |\\\\n\\\\tindex _ firstIndex.\\\\n\\\\t[index <= lastIndex]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[aBlock value: (array at: index).\\\\n\\\\t\\\\t\\\\tindex _ index + 1]! !\\\\n\\\\n!OrderedCollection methodsFor: 'enumerating'!\\\\nreverseDo: aBlock \\\\n\\\\t\\\\\\\"Override the superclass for performance reasons.\\\\\\\"\\\\n\\\\t| index |\\\\n\\\\tindex _ lastIndex.\\\\n\\\\t[index >= firstIndex]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[aBlock value: (array at: index).\\\\n\\\\t\\\\t\\\\tindex _ index - 1]! !\\\\n\\\\n!OrderedCollection methodsFor: 'enumerating' stamp: 'sma 2/5/2000 15:13'!\\\\nselect: aBlock \\\\n\\\\t\\\\\\\"Evaluate aBlock with each of my elements as the argument. Collect into\\\\n\\\\ta new collection like the receiver, only those elements for which aBlock\\\\n\\\\tevaluates to true.\\\\\\\"\\\\n\\\\n\\\\t| newCollection element |\\\\n\\\\tnewCollection _ self copyEmpty.\\\\n\\\\tfirstIndex to: lastIndex do:\\\\n\\\\t\\\\t[:index |\\\\n\\\\t\\\\t(aBlock value: (element _ array at: index))\\\\n\\\\t\\\\t\\\\tifTrue: [newCollection addLast: element]].\\\\n\\\\t^ newCollection! !\\\\n\\\\n!OrderedCollection methodsFor: 'enumerating' stamp: 'di 8/31/1999 13:13'!\\\\nwith: otherCollection collect: twoArgBlock \\\\n\\\\t\\\\\\\"Collect and return the result of evaluating twoArgBlock with \\\\n\\\\tcorresponding elements from this collection and otherCollection.\\\\\\\"\\\\n\\\\t| result |\\\\n\\\\totherCollection size = self size ifFalse: [self error: 'otherCollection must be the same size'].\\\\n\\\\tresult _ self species new: self size.\\\\n\\\\t1 to: self size do:\\\\n\\\\t\\\\t[:index | result addLast: (twoArgBlock value: (self at: index)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tvalue: (otherCollection at: index))].\\\\n\\\\t^ result! !\\\\n\\\\n!OrderedCollection methodsFor: 'enumerating' stamp: 'bf 5/16/2000 16:30'!\\\\nwithIndexCollect: elementAndIndexBlock \\\\n\\\\t\\\\\\\"Just like with:collect: except that the iteration index supplies the second argument to the block. Override superclass in order to use addLast:, not at:put:.\\\\\\\"\\\\n\\\\n\\\\t| newCollection |\\\\n\\\\tnewCollection _ self species new: self size.\\\\n\\\\tfirstIndex to: lastIndex do:\\\\n\\\\t\\\\t[:index |\\\\n\\\\t\\\\tnewCollection addLast: (elementAndIndexBlock\\\\n\\\\t\\\\t\\\\tvalue: (array at: index)\\\\n\\\\t\\\\t\\\\tvalue: index - firstIndex + 1)].\\\\n\\\\t^ newCollection! !\\\\n\\\\n\\\\n!OrderedCollection methodsFor: 'removing'!\\\\nremove: oldObject ifAbsent: absentBlock\\\\n\\\\n\\\\t| index |\\\\n\\\\tindex _ firstIndex.\\\\n\\\\t[index <= lastIndex]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[oldObject = (array at: index)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self removeIndex: index.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ oldObject]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [index _ index + 1]].\\\\n\\\\t^ absentBlock value! !\\\\n\\\\n!OrderedCollection methodsFor: 'removing' stamp: 'raok 4/27/2001 15:35'!\\\\nremoveAllSuchThat: aBlock \\\\n\\\\t\\\\\\\"Remove each element of the receiver for which aBlock evaluates to true.\\\\n\\\\tThe method in Collection is O(N^2), this is O(N).\\\\\\\"\\\\n\\\\n\\\\t| n |\\\\n\\\\tn _ firstIndex.\\\\n\\\\tfirstIndex to: lastIndex do: [:index |\\\\n\\\\t    (aBlock value: (array at: index)) ifFalse: [\\\\n\\\\t\\\\t\\\\tarray at: n put: (array at: index).\\\\n\\\\t\\\\t\\\\tn _ n + 1]].\\\\n\\\\tn to: lastIndex do: [:index | array at: index put: nil].\\\\n\\\\tlastIndex _ n - 1! !\\\\n\\\\n!OrderedCollection methodsFor: 'removing' stamp: 'ar 5/22/2000 12:19'!\\\\nremoveAt: index\\\\n\\\\t| removed |\\\\n\\\\tremoved _ self at: index.\\\\n\\\\tself removeIndex: index + firstIndex - 1.\\\\n\\\\t^removed! !\\\\n\\\\n!OrderedCollection methodsFor: 'removing'!\\\\nremoveFirst\\\\n\\\\t\\\\\\\"Remove the first element of the receiver and answer it. If the receiver is \\\\n\\\\tempty, create an error notification.\\\\\\\"\\\\n\\\\t| firstObject |\\\\n\\\\tself emptyCheck.\\\\n\\\\tfirstObject _ array at: firstIndex.\\\\n\\\\tarray at: firstIndex put: nil.\\\\n\\\\tfirstIndex _ firstIndex + 1.\\\\n\\\\t^ firstObject! !\\\\n\\\\n!OrderedCollection methodsFor: 'removing' stamp: 'ajh 6/22/2003 14:37'!\\\\nremoveFirst: n\\\\n\\\\t\\\\\\\"Remove first n object into an array\\\\\\\"\\\\n\\\\n\\\\t| list |\\\\n\\\\tlist _ Array new: n.\\\\n\\\\t1 to: n do: [:i |\\\\n\\\\t\\\\tlist at: i put: self removeFirst].\\\\n\\\\t^ list! !\\\\n\\\\n!OrderedCollection methodsFor: 'removing'!\\\\nremoveLast\\\\n\\\\t\\\\\\\"Remove the last element of the receiver and answer it. If the receiver is \\\\n\\\\tempty, create an error notification.\\\\\\\"\\\\n\\\\t| lastObject |\\\\n\\\\tself emptyCheck.\\\\n\\\\tlastObject _ array at: lastIndex.\\\\n\\\\tarray at: lastIndex put: nil.\\\\n\\\\tlastIndex _ lastIndex - 1.\\\\n\\\\t^ lastObject! !\\\\n\\\\n!OrderedCollection methodsFor: 'removing' stamp: 'ajh 6/22/2003 14:36'!\\\\nremoveLast: n\\\\n\\\\t\\\\\\\"Remove last n object into an array with last in last position\\\\\\\"\\\\n\\\\n\\\\t| list |\\\\n\\\\tlist _ Array new: n.\\\\n\\\\tn to: 1 by: -1 do: [:i |\\\\n\\\\t\\\\tlist at: i put: self removeLast].\\\\n\\\\t^ list! !\\\\n\\\\n\\\\n!OrderedCollection methodsFor: 'testing' stamp: 'bf 8/20/1999 15:08'!\\\\nhasContentsInExplorer\\\\n\\\\n\\\\t^self isEmpty not! !\\\\n\\\\n\\\\n!OrderedCollection methodsFor: '*Tools-Inspector' stamp: 'ar 9/27/2005 18:33'!\\\\ninspectorClass \\\\n\\\\t\\\\\\\"Answer the class of the inspector to be used on the receiver.  Called by inspect; \\\\n\\\\tuse basicInspect to get a normal (less useful) type of inspector.\\\\\\\"\\\\n\\\\n\\\\t^OrderedCollectionInspector! !\\\\n\\\\n\\\\n!OrderedCollection methodsFor: 'private'!\\\\ncollector  \\\\\\\"Private\\\\\\\"\\\\n\\\\t^ array! !\\\\n\\\\n!OrderedCollection methodsFor: 'private'!\\\\nerrorConditionNotSatisfied\\\\n\\\\n\\\\tself error: 'no element satisfies condition'! !\\\\n\\\\n!OrderedCollection methodsFor: 'private'!\\\\nerrorNoSuchElement\\\\n\\\\n\\\\tself error: 'attempt to index non-existent element in an ordered collection'! !\\\\n\\\\n!OrderedCollection methodsFor: 'private' stamp: 'BG 1/9/2004 12:26'!\\\\nfind: oldObject\\\\n  \\\\\\\"  This method answers an index in the range firstIndex .. lastIndex, which is meant for internal use only.\\\\n     Never use this method in your code, the methods for public use are:\\\\n        #indexOf:\\\\n        #indexOf:ifAbsent: \\\\\\\"\\\\n\\\\n\\\\t| index |\\\\n\\\\tindex _ firstIndex.\\\\n\\\\t[index <= lastIndex]\\\\n\\\\t\\\\twhileTrue:\\\\n\\\\t\\\\t\\\\t[(array at: index) = oldObject ifTrue: [^ index].\\\\n\\\\t\\\\t\\\\tindex _ index + 1].\\\\n\\\\tself errorNotFound: oldObject! !\\\\n\\\\n!OrderedCollection methodsFor: 'private' stamp: 'BG 1/9/2004 12:29'!\\\\ninsert: anObject before: spot\\\\n\\\\n  \\\\\\\"  spot is an index in the range firstIndex .. lastIndex, such an index is not known from outside the collection. \\\\n     Never use this method in your code, it is meant for private use by OrderedCollection only.\\\\n     The methods for use are:\\\\n        #add:before:   to insert an object before another object\\\\n        #add:beforeIndex:   to insert an object before a given position. \\\\\\\"\\\\n\\\\t| \\\\\\\"index\\\\\\\" delta spotIndex|\\\\n\\\\tspotIndex _ spot.\\\\n\\\\tdelta _ spotIndex - firstIndex.\\\\n\\\\tfirstIndex = 1\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[self makeRoomAtFirst.\\\\n\\\\t\\\\t\\\\tspotIndex _ firstIndex + delta].\\\\n\\\\tfirstIndex _ firstIndex - 1.\\\\n\\\\tarray\\\\n\\\\t\\\\treplaceFrom: firstIndex\\\\n\\\\t\\\\tto: spotIndex - 2\\\\n\\\\t\\\\twith: array\\\\n\\\\t\\\\tstartingAt: firstIndex + 1.\\\\n\\\\tarray at: spotIndex - 1 put: anObject.\\\\n\\\\\\\"\\\\tindex _ firstIndex _ firstIndex - 1.\\\\n\\\\t[index < (spotIndex - 1)]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[array at: index put: (array at: index + 1).\\\\n\\\\t\\\\t\\\\tindex _ index + 1].\\\\n\\\\tarray at: index put: anObject.\\\\\\\"\\\\n\\\\t^ anObject! !\\\\n\\\\n!OrderedCollection methodsFor: 'private'!\\\\nmakeRoomAtFirst\\\\n\\\\t| delta index |\\\\n\\\\tdelta _ array size - self size.\\\\n\\\\tdelta = 0 ifTrue: \\\\n\\\\t\\\\t\\\\t[self grow.\\\\n\\\\t\\\\t\\\\tdelta _ array size - self size].\\\\n\\\\tlastIndex = array size ifTrue: [^ self]. \\\\\\\"just in case we got lucky\\\\\\\"\\\\n\\\\tindex _ array size.\\\\n\\\\t[index > delta]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[array at: index put: (array at: index - delta + firstIndex - 1).\\\\n\\\\t\\\\t\\\\tarray at: index - delta + firstIndex - 1 put: nil.\\\\n\\\\t\\\\t\\\\tindex _ index - 1].\\\\n\\\\tfirstIndex _ delta + 1.\\\\n\\\\tlastIndex _ array size! !\\\\n\\\\n!OrderedCollection methodsFor: 'private'!\\\\nmakeRoomAtLast\\\\n\\\\t| newLast delta |\\\\n\\\\tnewLast _ self size.\\\\n\\\\tarray size - self size = 0 ifTrue: [self grow].\\\\n\\\\t(delta _ firstIndex - 1) = 0 ifTrue: [^ self].\\\\n\\\\t\\\\\\\"we might be here under false premises or grow did the job for us\\\\\\\"\\\\n\\\\t1 to: newLast do:\\\\n\\\\t\\\\t[:index |\\\\n\\\\t\\\\tarray at: index put: (array at: index + delta).\\\\n\\\\t\\\\tarray at: index + delta put: nil].\\\\n\\\\tfirstIndex _ 1.\\\\n\\\\tlastIndex _ newLast! !\\\\n\\\\n!OrderedCollection methodsFor: 'private' stamp: 'BG 1/9/2004 12:28'!\\\\nremoveIndex: removedIndex\\\\n  \\\\\\\"  removedIndex is an index in the range firstIndex .. lastIndex, such an index is not known from outside the collection.\\\\n    Never use this method in your code, it is meant for private use by OrderedCollection only.\\\\n     The method for public use is:\\\\n        #removeAt: \\\\\\\"\\\\n\\\\n\\\\tarray \\\\n\\\\t\\\\treplaceFrom: removedIndex \\\\n\\\\t\\\\tto: lastIndex - 1 \\\\n\\\\t\\\\twith: array \\\\n\\\\t\\\\tstartingAt: removedIndex+1.\\\\n\\\\tarray at: lastIndex put: nil.\\\\n\\\\tlastIndex _ lastIndex - 1.! !\\\\n\\\\n!OrderedCollection methodsFor: 'private' stamp: 'di 11/14/97 12:54'!\\\\nreset\\\\n\\\\tfirstIndex _ array size // 3 max: 1.\\\\n\\\\tlastIndex _ firstIndex - 1! !\\\\n\\\\n!OrderedCollection methodsFor: 'private' stamp: 'ar 4/16/1999 07:59'!\\\\nresetTo: index\\\\n\\\\tfirstIndex _ index.\\\\n\\\\tlastIndex _ firstIndex - 1! !\\\\n\\\\n!OrderedCollection methodsFor: 'private' stamp: 'di 11/14/97 12:54'!\\\\nsetCollection: anArray\\\\n\\\\tarray _ anArray.\\\\n\\\\tself reset! !\\\\n\\\\n!OrderedCollection methodsFor: 'private' stamp: 'apb 10/15/2000 18:10'!\\\\nsetContents: anArray\\\\n\\\\tarray _ anArray.\\\\n\\\\tfirstIndex _ 1.\\\\n\\\\tlastIndex _ array size.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOrderedCollection class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OrderedCollection class methodsFor: 'instance creation' stamp: 'sma 5/12/2000 17:41'!\\\\nnew\\\\n\\\\t^ self new: 10! !\\\\n\\\\n!OrderedCollection class methodsFor: 'instance creation' stamp: 'md 7/5/2005 15:16'!\\\\nnew: anInteger \\\\n\\\\t^ super basicNew setCollection: (Array new: anInteger)! !\\\\n\\\\n!OrderedCollection class methodsFor: 'instance creation'!\\\\nnewFrom: aCollection \\\\n\\\\t\\\\\\\"Answer an instance of me containing the same elements as aCollection.\\\\\\\"\\\\n\\\\n\\\\t| newCollection |\\\\n\\\\tnewCollection _ self new: aCollection size.\\\\n\\\\tnewCollection addAll: aCollection.\\\\n\\\\t^newCollection\\\\n\\\\n\\\\\\\"\\\\tOrderedCollection newFrom: {1. 2. 3}\\\\n\\\\t{1. 2. 3} as: OrderedCollection\\\\n\\\\t{4. 2. 7} as: SortedCollection\\\\n\\\\\\\"! !\\\\n\\\\n!OrderedCollection class methodsFor: 'instance creation' stamp: 'apb 10/15/2000 22:02'!\\\\nofSize: n\\\\n\\\\t\\\\\\\"Create a new collection of size n with nil as its elements.\\\\n\\\\tThis method exists because OrderedCollection new: n creates an\\\\n\\\\tempty collection,  not one of size n.\\\\\\\"\\\\n\\\\t| collection |\\\\n\\\\tcollection _ self new: n.\\\\n\\\\tcollection setContents: (collection collector).\\\\n\\\\t^ collection\\\\n! !\\\\nInspector subclass: #OrderedCollectionInspector\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Tools-Inspector'!\\\\n\\\\n!OrderedCollectionInspector methodsFor: 'as yet unclassified' stamp: 'dew 9/19/2001 03:27'!\\\\nfieldList\\\\n\\\\tobject ifNil: [ ^ OrderedCollection new].\\\\n\\\\t^ self baseFieldList ,\\\\n\\\\t\\\\t(object size <= (self i1 + self i2)\\\\n\\\\t\\\\t\\\\tifTrue: [(1 to: object size)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcollect: [:i | i printString]]\\\\n\\\\t\\\\t\\\\tifFalse: [(1 to: self i1) , (object size-(self i2-1) to: object size)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcollect: [:i | i printString]])\\\\n\\\\\\\"\\\\nOrderedCollection new inspect\\\\n(OrderedCollection newFrom: #(3 5 7 123)) inspect\\\\n(OrderedCollection newFrom: (1 to: 1000)) inspect\\\\n\\\\\\\"! !\\\\n\\\\n!OrderedCollectionInspector methodsFor: 'as yet unclassified' stamp: 'sw 9/16/97 22:38'!\\\\nreplaceSelectionValue: anObject \\\\n\\\\t\\\\\\\"The receiver has a list of variables of its inspected object. One of these \\\\n\\\\tis selected. The value of the selected variable is set to the value, anObject.\\\\\\\"\\\\n\\\\n\\\\t(selectionIndex - 2) <= object class instSize\\\\n\\\\t\\\\tifTrue: [^ super replaceSelectionValue: anObject].\\\\n\\\\tobject at: self selectedObjectIndex put: anObject! !\\\\n\\\\n!OrderedCollectionInspector methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:27'!\\\\nselectedObjectIndex\\\\n\\\\t\\\\\\\"Answer the index of the inspectee's collection that the current selection refers to.\\\\\\\"\\\\n\\\\n\\\\t| basicIndex |\\\\n\\\\tbasicIndex := selectionIndex - 2 - object class instSize.\\\\n\\\\t^ (object size <= (self i1 + self i2)  or: [basicIndex <= self i1])\\\\n\\\\t\\\\tifTrue: [basicIndex]\\\\n\\\\t\\\\tifFalse: [object size - (self i1 + self i2) + basicIndex]! !\\\\n\\\\n!OrderedCollectionInspector methodsFor: 'as yet unclassified' stamp: 'sw 9/16/97 22:39'!\\\\nselection\\\\n\\\\t\\\\\\\"The receiver has a list of variables of its inspected object.\\\\n\\\\tOne of these is selected. Answer the value of the selected variable.\\\\\\\"\\\\n\\\\n\\\\t(selectionIndex - 2) <= object class instSize\\\\n\\\\t\\\\tifTrue: [^ super selection].\\\\n\\\\t^ object at: self selectedObjectIndex! !\\\\nClassTestCase subclass: #OrderedCollectionTest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'CollectionsTests-Sequenceable'!\\\\n!OrderedCollectionTest commentStamp: 'BG 1/10/2004 22:07' prior: 0!\\\\nThese test cases demonstrate addition of items into an OrderedCollection as well as item removal.\\\\n\\\\nSome of the assertions are quite complicated and use a lot of collection protocol. Such methods do not test one single method, but protocol in general.!\\\\n\\\\n\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAdding' stamp: 'zz 12/7/2005 19:00'!\\\\ntestAdd\\\\n\\\\t| l |\\\\n\\\\tl := #(1 2 3 4) asOrderedCollection.\\\\n\\\\tl add: 88.\\\\n\\\\tself assert: (l =  #(1 2 3 4 88) asOrderedCollection).\\\\n\\\\tl add: 99.\\\\n\\\\tself assert: (l =  #(1 2 3 4 88 99) asOrderedCollection). \\\\n\\\\n! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAdding' stamp: 'zz 12/7/2005 18:52'!\\\\ntestAddAfter\\\\n\\\\n\\\\t| l |\\\\n\\\\tl := #(1 2 3 4) asOrderedCollection.\\\\n\\\\tl add: 88 after: 1.\\\\n\\\\tself assert: (l =  #(1 88 2 3 4) asOrderedCollection).\\\\n\\\\tl add: 99 after: 2.\\\\n\\\\tself assert: (l =  #(1 88 2 99 3 4) asOrderedCollection). \\\\n\\\\n! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAdding' stamp: 'zz 12/7/2005 18:56'!\\\\ntestAddAfterIndex\\\\n\\\\n\\\\t| l |\\\\n\\\\tl := #(1 2 3 4) asOrderedCollection.\\\\n\\\\tl add: 88 afterIndex: 1.\\\\n\\\\tself assert: (l =  #(1 88 2 3 4) asOrderedCollection).\\\\n\\\\tl add: 99 afterIndex: 2.\\\\n\\\\tself assert: (l =  #(1 88 99 2 3 4) asOrderedCollection). \\\\n\\\\n! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAdding' stamp: 'sd 3/21/2006 22:36'!\\\\ntestAddAll\\\\n\\\\t\\\\\\\"Allows one to add each element of an orderedCollection at the end of another\\\\n\\\\torderedCollection \\\\\\\"\\\\n\\\\t\\\\\\\"self run:#testAddAll\\\\\\\" \\\\n\\\\t\\\\n\\\\t| c1 c2 |\\\\n\\\\tc1 := #(1 2 3 4 ) asOrderedCollection.\\\\n\\\\tc2 := #(5 6 7 8 9 ) asOrderedCollection.\\\\n\\\\tc1 addAll: c2.\\\\n\\\\tself assert: c1 = #(1 2 3 4 5 6 7 8 9) asOrderedCollection! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAdding' stamp: 'sd 3/21/2006 22:36'!\\\\ntestAddAllFirst\\\\n\\\\t\\\\\\\"Allows one to add each element of an orderedCollection at the beginning of another\\\\n\\\\torderedCollection \\\\\\\"\\\\n\\\\t\\\\\\\"self run:#testAddAllFirst\\\\\\\" \\\\n\\\\t\\\\n\\\\t| c1 c2 |\\\\n\\\\tc1 := #(1 2 3 4 ) asOrderedCollection.\\\\n\\\\tc2 := #(5 6 7 8 9 ) asOrderedCollection.\\\\n\\\\tc2 addAllFirst: c1.\\\\n\\\\tself assert: c2 = #(1 2 3 4 5 6 7 8 9) asOrderedCollection! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAdding' stamp: 'sd 3/21/2006 22:36'!\\\\ntestAddAllFirstUnlessAlreadyPresent\\\\n\\\\t\\\\\\\"Allows one to add each element of an orderedCollection at the beginning of\\\\n\\\\tanother orderedCollection preserving the order but no duplicate element\\\\\\\"\\\\n\\\\t\\\\\\\"self run:#testAddAllFirstUnlessAlreadyPresent\\\\\\\" \\\\n\\\\t\\\\n\\\\t| c1 c2 c3 |\\\\n\\\\tc1 := #(1 2 3 4 ) asOrderedCollection.\\\\n\\\\tc2 := #(5 6 7 8 9 ) asOrderedCollection.\\\\n\\\\tc3 := #(0 1 ) asOrderedCollection.\\\\n\\\\tc2 addAllFirstUnlessAlreadyPresent: c1.\\\\n\\\\tself assert: c2 = #(1 2 3 4 5 6 7 8 9 ) asOrderedCollection.\\\\n\\\\tc1 addAllFirstUnlessAlreadyPresent: c3.\\\\n\\\\tself deny: c1 = #(0 1 1 2 3 4 ) asOrderedCollection.\\\\n\\\\tself assert: c1 = #(0 1 2 3 4 ) asOrderedCollection.\\\\n\\\\t! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAdding' stamp: 'sd 3/21/2006 22:36'!\\\\ntestAddAllLast\\\\n\\\\t\\\\\\\"Allows one to add each element of an orderedCollection at the beginning of another\\\\n\\\\torderedCollection \\\\\\\"\\\\n\\\\t\\\\\\\"self run:#testAddAllLast\\\\\\\" \\\\n\\\\t\\\\n\\\\t| c1 c2 |\\\\n\\\\tc1 := #(1 2 3 4 ) asOrderedCollection.\\\\n\\\\tc2 := #(5 6 7 8 9 ) asOrderedCollection.\\\\n\\\\tc1 addAllLast: c2.\\\\n\\\\tself assert: c1 = #(1 2 3 4 5 6 7 8 9) asOrderedCollection! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAdding' stamp: 'zz 12/7/2005 18:57'!\\\\ntestAddBefore\\\\n\\\\n\\\\t| l |\\\\n\\\\tl := #(1 2 3 4) asOrderedCollection.\\\\n\\\\tl add: 88 before: 1.\\\\n\\\\tself assert: (l =  #(88 1 2 3 4) asOrderedCollection).\\\\n\\\\tl add: 99 before: 2.\\\\n\\\\tself assert: (l =  #(88 1 99 2 3 4) asOrderedCollection). \\\\n\\\\n! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAdding' stamp: 'zz 12/7/2005 13:42'!\\\\ntestAddBeforeAndRemove\\\\n\\\\n\\\\t| l initialCollection |\\\\n\\\\tl := #(1 2 3 4) asOrderedCollection.\\\\n\\\\tinitialCollection := l shallowCopy.\\\\n\\\\tl add: 88 before: 1.\\\\n\\\\tself assert: (l =  #(88 1 2 3 4) asOrderedCollection).\\\\n\\\\tl add: 99 before: 2.\\\\n\\\\tself assert: (l =  #(88 1 99 2 3 4) asOrderedCollection). \\\\n\\\\tl remove: 99.\\\\n\\\\tl remove: 88.\\\\n\\\\tself assert: l = initialCollection.\\\\n\\\\n! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAdding' stamp: 'zz 12/7/2005 18:57'!\\\\ntestAddBeforeIndex\\\\n\\\\n\\\\t| l |\\\\n\\\\tl := #(1 2 3 4) asOrderedCollection.\\\\n\\\\tl add: 88 beforeIndex: 1.\\\\n\\\\tself assert: (l =  #(88 1 2 3 4) asOrderedCollection).\\\\n\\\\tl add: 99 beforeIndex: 2.\\\\n\\\\tself assert: (l =  #(88 99 1 2 3 4) asOrderedCollection). \\\\n\\\\n! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAdding' stamp: 'zz 12/7/2005 13:43'!\\\\ntestAddDuplicateItem1\\\\n\\\\t| collection |\\\\n\\\\tcollection := #('Jim' 'Mary' 'John' 'Andrew' ) asOrderedCollection.\\\\n\\\\tcollection add: 'John' before: 'John'.\\\\n\\\\tself\\\\n\\\\t\\\\tassert: ((collection asBag occurrencesOf: 'John')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t= 2\\\\n\\\\t\\\\t\\\\t\\\\tand: [(collection at: (collection indexOf: 'John')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t+ 1)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t= (collection\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tat: (collection indexOf: 'John'))])! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAdding' stamp: 'zz 12/7/2005 18:58'!\\\\ntestAddFirst\\\\n\\\\t| l |\\\\n\\\\tl := #(1 2 3 4) asOrderedCollection.\\\\n\\\\tl addFirst: 88.\\\\n\\\\tself assert: (l =  #(88 1 2 3 4) asOrderedCollection).\\\\n\\\\tl addFirst: 99.\\\\n\\\\tself assert: (l =  #(99 88 1 2 3 4) asOrderedCollection). \\\\n\\\\n! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAdding' stamp: 'sd 6/5/2005 09:21'!\\\\ntestAddItem1\\\\n\\\\n   | collection size |\\\\n   collection := #('Jim' 'Mary' 'John' 'Andrew' ) asOrderedCollection.\\\\n   size := collection size.\\\\n   collection add: 'James' before: 'Jim'.\\\\n   collection add: 'Margaret' before: 'Andrew'.\\\\n   self assert: size + 2 = collection size.\\\\n! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAdding' stamp: 'zz 12/7/2005 19:07'!\\\\ntestAddItem2\\\\n\\\\t| collection |\\\\n\\\\tcollection := #('Jim' 'Mary' 'John' 'Andrew' ) asOrderedCollection.\\\\n\\\\tcollection add: 'James' before: 'Jim'.\\\\n\\\\tcollection add: 'Margaret' before: 'Andrew'.\\\\n\\\\tself assert: (collection indexOf: 'James')\\\\n\\\\t\\\\t\\\\t+ 1\\\\n\\\\t\\\\t\\\\t= (collection indexOf: 'Jim').\\\\n\\\\tself assert: (collection indexOf: 'Margaret')\\\\n\\\\t\\\\t\\\\t+ 1\\\\n\\\\t\\\\t\\\\t= (collection indexOf: 'Andrew')! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAdding' stamp: 'zz 12/7/2005 18:59'!\\\\ntestAddLast\\\\n\\\\t| l |\\\\n\\\\tl := #(1 2 3 4) asOrderedCollection.\\\\n\\\\tl addLast: 88.\\\\n\\\\tself assert: (l =  #(1 2 3 4 88) asOrderedCollection).\\\\n\\\\tl addLast: 99.\\\\n\\\\tself assert: (l =  #(1 2 3 4 88 99) asOrderedCollection). \\\\n\\\\n! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAdding' stamp: 'sd 3/21/2006 22:37'!\\\\ntestAtIfAbsentPut\\\\n\\\\t\\\\\\\"Allows one to add an element at an index if no element exist at this index\\\\\\\"\\\\n\\\\t\\\\\\\"self run:#testAtIfAbsentPut\\\\\\\" \\\\n\\\\t\\\\n\\\\t| c |\\\\n\\\\tc := #(1 2 3 4 ) asOrderedCollection.\\\\n\\\\tself\\\\n\\\\t\\\\tshouldnt: [c at: 2 ifAbsentPut: [5]]\\\\n\\\\t\\\\traise: Error.\\\\n\\\\tself assert: c = #(1 2 3 4 ) asOrderedCollection.\\\\n\\\\tc at: 5 ifAbsentPut: [5].\\\\n\\\\tself assert: c = #(1 2 3 4 5 ) asOrderedCollection.\\\\n\\\\tc at: 7 ifAbsentPut: [7].\\\\n\\\\tself assert: c = #(1 2 3 4 5 nil 7 ) asOrderedCollection! !\\\\n\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAccessing' stamp: 'zz 12/7/2005 18:50'!\\\\ntestAt\\\\n\\\\t| collection |\\\\n\\\\tcollection := #('Jim' 'Mary' 'John' 'Andrew' ) asOrderedCollection.\\\\n\\\\tself assert: (collection at:1) = 'Jim'.\\\\n\\\\tself assert: (collection at:2) = 'Mary'! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAccessing' stamp: 'sd 3/21/2006 22:38'!\\\\ntestAtPut\\\\n\\\\t\\\\\\\"Allows one to replace an element but not at an off range index\\\\\\\"\\\\n\\\\t\\\\\\\"self run:#testAtPut\\\\\\\"\\\\n\\\\t| c |\\\\n\\\\tc := #(1 2 3 4 ) asOrderedCollection.\\\\n\\\\tc at: 2 put: 5.\\\\n\\\\tself assert: c = #(1 5 3 4 ) asOrderedCollection.\\\\n\\\\tself\\\\n\\\\t\\\\tshould: [c at: 5 put: 8]\\\\n\\\\t\\\\traise: Error.\\\\n\\\\tself deny: c = #(1 5 3 4 8 ) asOrderedCollection! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAccessing' stamp: 'sd 3/21/2006 22:39'!\\\\ntestCapacity\\\\n\\\\t\\\\\\\"Allows one to check the current capacity of an Ordered collection\\\\\\\"\\\\n\\\\t\\\\\\\"self run:#testCapacity\\\\\\\"\\\\n\\\\t\\\\n\\\\t| c1 c2 c3 |\\\\n\\\\tc1 := #(1 2 ) asOrderedCollection.\\\\n\\\\tself assert: (c1 capacity =  2).\\\\n\\\\tc2 := OrderedCollection new: 10.\\\\n\\\\tc2 add: 3.\\\\n\\\\tself assert: (c2 capacity = 10).\\\\t\\\\n\\\\tc3 := OrderedCollection new.\\\\n\\\\tself deny: (c3 capacity =  0).\\\\n\\\\t! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAccessing' stamp: 'sd 3/21/2006 22:38'!\\\\ntestSize\\\\n\\\\t\\\\\\\"Allows one to check the size of an Ordered collection\\\\\\\"\\\\n\\\\t\\\\\\\"self run:#testSize\\\\\\\"\\\\n\\\\t\\\\n\\\\t| c1 c2 |\\\\n\\\\tc1 := #(1 2 ) asOrderedCollection.\\\\n\\\\tself assert: (c1 size =  2).\\\\n\\\\t\\\\n\\\\tc2 := OrderedCollection new.\\\\n\\\\tself assert: (c2 size = 0)\\\\n\\\\t! !\\\\n\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsEnumerating' stamp: 'sd 3/21/2006 22:41'!\\\\ntestCollect\\\\n\\\\t\\\\\\\"Allows one to collect some element of a collection into another collection\\\\\\\"\\\\n\\\\t\\\\\\\"self run: #testCollect\\\\\\\"\\\\n\\\\t \\\\n\\\\t| c1 c2 res |\\\\n\\\\tc1 := #(-1 2 -3 4) asOrderedCollection.\\\\n\\\\tc2 := #(1 2 3 4) asOrderedCollection.\\\\n\\\\tres := c1 collect: [:each | each abs].\\\\n\\\\tself assert: (c2 = res).! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsEnumerating' stamp: 'cm 3/8/2006 09:09'!\\\\ntestCollectFromTo\\\\n\\\\t\\\\\\\"Allows one to collect some element of a collection into another collection between a first index and an end index for the collect\\\\\\\"\\\\n\\\\t\\\\\\\"self run: #testCollectFromTo\\\\\\\"\\\\n\\\\t\\\\n\\\\t| c1 res |\\\\n\\\\tc1 := #(-1 2 -3 4 -5 6 -7 8) asOrderedCollection.\\\\n\\\\tres := c1 collect: [:each | each abs] from: 1 to: 3.\\\\n\\\\tself assert: (res = #(1 2 3) asOrderedCollection).\\\\n\\\\tself should: [c1 collect: [:each | each abs] from: 10 to: 13] raise: Error.\\\\n\\\\tself should: [c1 collect: [:each | each abs] from: 5 to: 2] raise: Error.! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsEnumerating' stamp: 'zz 12/7/2005 19:06'!\\\\ntestIndexOf\\\\n\\\\t| collection indices |\\\\n\\\\tcollection := #('Jim' 'Mary' 'John' 'Andrew' ) asOrderedCollection.\\\\n\\\\tindices := collection\\\\n\\\\t\\\\t\\\\t\\\\tcollect: [:item | collection indexOf: item].\\\\n\\\\tself assert: (1 to: 4) asOrderedCollection = indices! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsEnumerating' stamp: 'sd 6/5/2005 09:21'!\\\\ntestIndexOfWithDuplicates\\\\n\\\\n   | collection indices bagOfIndices |\\\\n   collection := #('Jim' 'Mary' 'John' 'Andrew' 'Mary' 'John' 'Jim' 'Micheal') asOrderedCollection.\\\\n   indices := collection collect: [:item | collection indexOf: item].\\\\n   self assert: indices asSet size = collection asSet size.\\\\n   bagOfIndices := indices asBag.\\\\n   self assert: (indices asSet \\\\n                    allSatisfy: [:index | (bagOfIndices occurrencesOf: index)\\\\n\\\\t                                       = (collection occurrencesOf: (collection at: index))]).\\\\n\\\\n  \\\\\\\"  indexOf:  returns the index of the first occurrence of an item.\\\\n     For an item with n occurrences, the index of its first occurrence\\\\n     is found  n  times. \\\\\\\"! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsEnumerating' stamp: 'cm 3/8/2006 10:02'!\\\\ntestWithCollect\\\\n\\\\t\\\\\\\"Allows one to collect some element of two collections into another collection with element corresponding to the condition in the blocks\\\\\\\"\\\\n\\\\t\\\\\\\"self run: #testWithCollect\\\\\\\"\\\\n\\\\t\\\\n\\\\t| c1 c2 res |\\\\n\\\\tc1 := #(-1 2 -3 4 -5 6 -7 8) asOrderedCollection.\\\\n\\\\tc2 := #(-9 10 -11 12 -13 14 -15 16) asOrderedCollection.\\\\n\\\\tres := c1 with: c2 collect: [:each1 :each2 | each1 < each2\\\\n\\\\t\\\\tifTrue: [each1]\\\\n\\\\t\\\\tifFalse: [each2]].\\\\n\\\\tself assert: (res = #(-9 2 -11 4 -13 6 -15 8) asOrderedCollection).\\\\n\\\\t! !\\\\n\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsCopying' stamp: 'sd 3/21/2006 22:40'!\\\\ntestCopyEmpty\\\\n\\\\t\\\\\\\"Allows one to create a copy of the receiver that contains no elements\\\\\\\"\\\\n\\\\t\\\\\\\"self run:#testCopyEmpty\\\\\\\"\\\\n\\\\t\\\\n\\\\t| c1 c2 |\\\\n\\\\tc1 := #(1 2 3 4 ) asOrderedCollection.\\\\n\\\\tc2 := c1 copyEmpty.\\\\n\\\\tself assert: (c2 size = 0).! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsCopying' stamp: 'sd 3/21/2006 22:41'!\\\\ntestCopyFromTo\\\\n\\\\t\\\\\\\"Allows one to create a copy of the receiver that contains elements from position start to end\\\\\\\"\\\\n\\\\t\\\\\\\"self run: #testCopyFromTo\\\\\\\"\\\\n\\\\t\\\\n\\\\t| c1 c2 c3 | \\\\n\\\\tc1 := #(1 2 3 4) asOrderedCollection.\\\\n\\\\tc2 := (c1 copyFrom: 1 to: 2).\\\\n\\\\tself assert: c2 = #(1 2) asOrderedCollection.\\\\n\\\\tself should: [c1 copyFrom: 10 to: 20] raise: Error.\\\\n\\\\t\\\\n\\\\tc3 := c1 copyFrom: 4 to: 2.\\\\n\\\\tself assert: c3 isEmpty.\\\\n\\\\t\\\\n\\\\tself should: [c1 copyFrom: 4 to: 5 ] raise: Error.\\\\n\\\\t\\\\n\\\\t\\\\n\\\\t\\\\n! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsCopying' stamp: 'sd 3/21/2006 22:41'!\\\\ntestCopyReplaceFromToWith\\\\n\\\\t\\\\\\\"Allows one to create a copy from the receiver which elements between start and end of the \\\\treceiver being replace by \\\\telement of the collection after with:\\\\\\\"\\\\n\\\\t\\\\\\\"self run:#testCopyReplaceFromToWith\\\\\\\"\\\\n\\\\n\\\\t| c1 c2 c3 c4 |\\\\n\\\\tc1 := #(1 2 3 4) asOrderedCollection.\\\\n\\\\tc2 := #(5 6 7 8 9) asOrderedCollection.\\\\n\\\\tc3 := (c2 copyReplaceFrom: 1 to: 2 with: c1).\\\\n\\\\tself assert: c3 = #(1 2 3 4 7 8 9) asOrderedCollection.\\\\n\\\\tself should: [c2 copyReplaceFrom: 3 to: 1 with: c1] raise: Error.\\\\n\\\\t\\\\n\\\\tc4 := (c2 copyReplaceFrom: 10 to: 25 with: c1).\\\\n\\\\tself assert: c4 = #(5 6 7 8 9 1 2 3 4) asOrderedCollection.\\\\n\\\\t\\\\n\\\\t! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsCopying' stamp: 'sd 3/21/2006 22:41'!\\\\ntestCopyWith\\\\n\\\\t\\\\\\\"Allows one to create a copy of the receiver that contains the new element at the end\\\\\\\"\\\\n\\\\t\\\\\\\"self run: #testCopyWith\\\\\\\"\\\\n\\\\t\\\\n\\\\t| c1 | \\\\n\\\\tc1 := #(1 2 3 4) asOrderedCollection.\\\\n\\\\tc1 := c1 copyWith: 6.\\\\n\\\\tself assert: c1 = #(1 2 3 4 6) asOrderedCollection.\\\\n\\\\t\\\\n\\\\t\\\\n\\\\n\\\\t\\\\n\\\\t\\\\n\\\\t\\\\n! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsCopying' stamp: 'zz 12/7/2005 13:47'!\\\\ntestReversed\\\\n\\\\t| collection1 collection2 |\\\\n\\\\tcollection1 := #('Jim' 'Mary' 'John' 'Andrew' ) asOrderedCollection.\\\\n\\\\tcollection2 := collection1 reversed.\\\\n\\\\tself assert: collection2 first = 'Andrew'.\\\\n\\\\tself assert: collection2 last = 'Jim'! !\\\\n\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsRemoving' stamp: 'zz 12/7/2005 19:05'!\\\\ntestRemoveAllSuchThat\\\\n\\\\t| collection |\\\\n\\\\tcollection := (1 to: 10) asOrderedCollection.\\\\n\\\\tcollection\\\\n\\\\t\\\\tremoveAllSuchThat: [:e | e even].\\\\n\\\\tself assert: collection = (1 to: 10 by: 2) asOrderedCollection! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsRemoving' stamp: 'sd 3/21/2006 22:39'!\\\\ntestRemoveAt\\\\n\\\\t\\\\\\\"Allows one to remove an element from a collection at an index\\\\\\\"\\\\n\\\\t\\\\\\\"self run:#testRemoveAt\\\\\\\" \\\\n\\\\t\\\\n\\\\t| c1 |\\\\n\\\\tc1 := #(2 3 4 6) asOrderedCollection.\\\\n\\\\tc1 removeAt: 2.\\\\n\\\\tself assert: (c1 = #(2 4 6) asOrderedCollection).\\\\n\\\\tself should: [c1 removeAt: 10] raise: Error.\\\\n\\\\tself should: [c1 removeAt: -1] raise: Error.\\\\n\\\\t! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsRemoving' stamp: 'sd 3/21/2006 22:39'!\\\\ntestRemoveFirst\\\\n\\\\t\\\\\\\"Allows one to remove n element of a collection at the first\\\\\\\"\\\\n\\\\t\\\\\\\"self run:#testRemoveFirst\\\\\\\" \\\\n\\\\t\\\\n\\\\t| c1 |\\\\n\\\\tc1 := #(2 3 4 6) asOrderedCollection.\\\\n\\\\tc1 removeFirst: 1.\\\\n\\\\tself assert: (c1 = #(3 4 6) asOrderedCollection).\\\\n\\\\tc1 removeFirst: 2.\\\\n\\\\tself assert: (c1 = #(6) asOrderedCollection).\\\\n\\\\tself should: [c1 removeFirst: 10] raise: Error.\\\\n\\\\t\\\\n\\\\t! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsRemoving' stamp: 'sd 3/21/2006 22:39'!\\\\ntestRemoveIfAbsent\\\\n\\\\t\\\\\\\"Allows one to remove an element from a collection and to copy it in another collection.\\\\\\\"\\\\n\\\\t\\\\\\\"If the element isn't in the first collection, the second collection copy the element after ifAbsent\\\\\\\"\\\\n\\\\t\\\\\\\"self run:#testRemoveIfAbsent\\\\\\\"\\\\n\\\\t\\\\n\\\\t| c1 c2 |\\\\n\\\\tc1 := #(1 2 3 4) asOrderedCollection.\\\\n\\\\tc2 := OrderedCollection new.\\\\n\\\\t\\\\n\\\\tc2 add: (c1 remove: 2 ifAbsent: [6]).\\\\n\\\\tself assert: (c1 = #(1 3 4) asOrderedCollection).\\\\n\\\\tself assert: (c2 = #(2) asOrderedCollection).\\\\n\\\\t\\\\n\\\\tc2 add: (c1 remove: 18 ifAbsent: [6]).\\\\n\\\\tself assert: (c1 = #(1 3 4) asOrderedCollection).\\\\n\\\\tself assert: (c2 = #(2 6) asOrderedCollection).! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsRemoving' stamp: 'sd 3/21/2006 22:39'!\\\\ntestRemoveLast\\\\n\\\\t\\\\\\\"Allows one to remove n element of a collection at the end\\\\\\\"\\\\n\\\\t\\\\\\\"self run:#testRemoveLast\\\\\\\" \\\\n\\\\t\\\\n\\\\t| c1 |\\\\n\\\\tc1 := #(2 3 4 6) asOrderedCollection.\\\\n\\\\tc1 removeLast: 1.\\\\n\\\\tself assert: (c1 = #(2 3 4) asOrderedCollection).\\\\n\\\\tc1 removeLast: 2.\\\\n\\\\tself assert: (c1 = #(2) asOrderedCollection).\\\\n\\\\tself should: [c1 removeLast: 10] raise: Error.! !\\\\nFillStyle subclass: #OrientedFillStyle\\\\n\\\\tinstanceVariableNames: 'origin direction normal'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Balloon-Fills'!\\\\n!OrientedFillStyle commentStamp: '<historical>' prior: 0!\\\\nOrientedFill is an abstract superclass for fills which can be aligned appropriately.\\\\n\\\\nInstance variables:\\\\n\\\\torigin\\\\t<Point>\\\\tThe point at which to align the fill.\\\\n\\\\tdirection <Point>\\\\tThe direction in which the fill is defined\\\\n\\\\tnormal\\\\t<Point>\\\\tTypically, just the direction rotated by 90 degrees.!\\\\n\\\\n\\\\n!OrientedFillStyle methodsFor: 'accessing' stamp: 'ar 8/25/2001 17:03'!\\\\ndirection\\\\n\\\\t^direction ifNil:[direction := normal y @ normal x negated]! !\\\\n\\\\n!OrientedFillStyle methodsFor: 'accessing' stamp: 'ar 11/11/1998 22:37'!\\\\ndirection: aPoint\\\\n\\\\tdirection := aPoint! !\\\\n\\\\n!OrientedFillStyle methodsFor: 'accessing' stamp: 'ar 11/14/1998 23:31'!\\\\nnormal\\\\n\\\\t^normal ifNil:[normal := direction y negated @ direction x]! !\\\\n\\\\n!OrientedFillStyle methodsFor: 'accessing' stamp: 'ar 11/11/1998 22:37'!\\\\nnormal: aPoint\\\\n\\\\tnormal := aPoint! !\\\\n\\\\n!OrientedFillStyle methodsFor: 'accessing' stamp: 'ar 11/11/1998 22:38'!\\\\norigin\\\\n\\\\t^origin! !\\\\n\\\\n!OrientedFillStyle methodsFor: 'accessing' stamp: 'ar 11/11/1998 22:38'!\\\\norigin: aPoint\\\\n\\\\torigin := aPoint.! !\\\\n\\\\n\\\\n!OrientedFillStyle methodsFor: 'testing' stamp: 'ar 6/18/1999 07:57'!\\\\nisOrientedFill\\\\n\\\\t\\\\\\\"Return true if the receiver keeps an orientation (e.g., origin, direction, and normal)\\\\\\\"\\\\n\\\\t^true! !\\\\n\\\\n\\\\n!OrientedFillStyle methodsFor: '*Morphic-Balloon' stamp: 'dgd 10/17/2003 22:35'!\\\\naddFillStyleMenuItems: aMenu hand: aHand from: aMorph\\\\n\\\\t\\\\\\\"Add the items for changing the current fill style of the receiver\\\\\\\"\\\\n\\\\taMenu add: 'change origin' translated target: self selector: #changeOriginIn:event: argument: aMorph.\\\\n\\\\taMenu add: 'change orientation' translated target: self selector: #changeOrientationIn:event: argument: aMorph.! !\\\\n\\\\n!OrientedFillStyle methodsFor: '*Morphic-Balloon' stamp: 'ar 6/18/1999 07:41'!\\\\nchangeOrientationIn: aMorph event: evt\\\\n\\\\t\\\\\\\"Interactively change the origin of the receiver\\\\\\\"\\\\n\\\\t| handle |\\\\n\\\\thandle _ HandleMorph new forEachPointDo:[:pt|\\\\n\\\\t\\\\tself direction: pt - self origin.\\\\n\\\\t\\\\tself normal: nil.\\\\n\\\\t\\\\taMorph changed].\\\\n\\\\tevt hand attachMorph: handle.\\\\n\\\\thandle startStepping.! !\\\\n\\\\n!OrientedFillStyle methodsFor: '*Morphic-Balloon' stamp: 'ar 6/18/1999 07:28'!\\\\nchangeOriginIn: aMorph event: evt\\\\n\\\\t\\\\\\\"Interactively change the origin of the receiver\\\\\\\"\\\\n\\\\t| handle |\\\\n\\\\thandle _ HandleMorph new forEachPointDo:[:pt|\\\\n\\\\t\\\\tself origin: pt.\\\\n\\\\t\\\\taMorph changed].\\\\n\\\\tevt hand attachMorph: handle.\\\\n\\\\thandle startStepping.! !\\\\nNotification subclass: #OutOfScopeNotification\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Exceptions-Kernel'!\\\\n\\\\n!OutOfScopeNotification methodsFor: 'as yet unclassified' stamp: 'RAA 2/5/2001 10:41'!\\\\ndefaultAction\\\\n\\\\n\\\\tself resume: false! !\\\\nPBPreferenceView subclass: #PBBooleanPreferenceView\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'PreferenceBrowser'!\\\\n!PBBooleanPreferenceView commentStamp: '<historical>' prior: 0!\\\\nI am responsible for building the visual representation of a preference that accepts true and false values. This view is aimed to be used inside a PreferenceBrowser panel.!\\\\n\\\\n\\\\n!PBBooleanPreferenceView methodsFor: 'user interface' stamp: 'hpt 9/26/2004 00:23'!\\\\nenabledButton\\\\n\\\\t| aButton aLabel |\\\\n\\\\taButton := UpdatingThreePhaseButtonMorph checkBox\\\\n\\\\t\\\\ttarget: self preference;\\\\n\\\\t\\\\tactionSelector: #togglePreferenceValue;\\\\n\\\\t\\\\tgetSelector: #preferenceValue;\\\\n\\\\t\\\\tyourself.\\\\n\\\\taLabel := (StringMorph contents: 'enabled' translated\\\\n\\\\t\\\\t\\\\t\\\\tfont: (StrikeFont familyName: TextStyle defaultFont familyName\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsize: TextStyle defaultFont pointSize - 1)).\\\\n\\\\t^self horizontalPanel\\\\n\\\\t\\\\taddMorphBack: aButton;\\\\n\\\\t\\\\taddMorphBack: aLabel;\\\\n\\\\t\\\\tyourself.! !\\\\n\\\\n!PBBooleanPreferenceView methodsFor: 'user interface' stamp: 'hpt 9/26/2004 00:27'!\\\\nlocalToProjectButton\\\\n\\\\t| aButton aLabel |\\\\n\\\\taButton := UpdatingThreePhaseButtonMorph checkBox\\\\n\\\\t\\\\ttarget: self preference;\\\\n\\\\t\\\\tactionSelector: #toggleProjectLocalness;\\\\n\\\\t\\\\tgetSelector: #localToProject;\\\\n\\\\t\\\\tyourself.\\\\n\\\\taLabel := (StringMorph contents: 'local' translated\\\\n\\\\t\\\\t\\\\t\\\\tfont: (StrikeFont familyName: TextStyle defaultFont familyName\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsize: TextStyle defaultFont pointSize - 1)).\\\\t\\\\t\\\\n\\\\t^self horizontalPanel\\\\n\\\\t\\\\taddMorphBack: aButton;\\\\n\\\\t\\\\taddMorphBack: aLabel;\\\\n\\\\t\\\\tyourself.! !\\\\n\\\\n!PBBooleanPreferenceView methodsFor: 'user interface' stamp: 'hpt 9/26/2004 00:25'!\\\\nrepresentativeButtonWithColor: aColor inPanel: aPreferencesPanel\\\\n\\\\t^self horizontalPanel\\\\n\\\\t\\\\tlayoutInset: 2;\\\\n\\\\t\\\\tcellInset: 7;\\\\n\\\\t\\\\tcolor: aColor;\\\\n\\\\t\\\\taddMorphBack: (StringMorph contents: self preference name);\\\\n\\\\t\\\\taddMorphBack: self horizontalFiller; \\\\n\\\\t\\\\taddMorphBack: self enabledButton;\\\\n\\\\t\\\\taddMorphBack: self localToProjectButton;\\\\n\\\\t\\\\tyourself.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPBBooleanPreferenceView class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PBBooleanPreferenceView class methodsFor: 'class initialization' stamp: 'hpt 9/26/2004 15:47'!\\\\ninitialize\\\\n\\\\tPreferenceViewRegistry ofBooleanPreferences register: self.\\\\n! !\\\\n\\\\n!PBBooleanPreferenceView class methodsFor: 'class initialization' stamp: 'hpt 9/26/2004 15:47'!\\\\nunload\\\\n\\\\tPreferenceViewRegistry ofBooleanPreferences unregister: self.! !\\\\nPBPreferenceView subclass: #PBColorPreferenceView\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'PreferenceBrowser'!\\\\n\\\\n!PBColorPreferenceView methodsFor: 'user interface' stamp: 'hpt 12/6/2004 21:24'!\\\\ncolorSwatch\\\\n\\\\t^UpdatingRectangleMorph new\\\\n\\\\t\\\\ttarget: self preference;\\\\n\\\\t\\\\tgetSelector: #preferenceValue;\\\\n\\\\t\\\\tputSelector: #preferenceValue:;\\\\n\\\\t\\\\textent: 22@22;\\\\n\\\\t\\\\tsetBalloonText: 'click here to change the color' translated;\\\\n\\\\t\\\\tyourself.! !\\\\n\\\\n!PBColorPreferenceView methodsFor: 'user interface' stamp: 'hpt 12/6/2004 21:12'!\\\\nrepresentativeButtonWithColor: aColor inPanel: aPreferenceBrowser\\\\n\\\\t^self horizontalPanel\\\\n\\\\t\\\\tlayoutInset: 2;\\\\n\\\\t\\\\tcolor: aColor;\\\\n\\\\t\\\\tcellInset: 20;\\\\n\\\\t\\\\tcellPositioning: #center;\\\\n\\\\t\\\\taddMorphBack: (StringMorph contents: self preference name);\\\\n\\\\t\\\\taddMorphBack: self horizontalFiller;\\\\n\\\\t\\\\taddMorphBack: self colorSwatch;\\\\n\\\\t\\\\tyourself! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPBColorPreferenceView class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PBColorPreferenceView class methodsFor: 'class initialization' stamp: 'hpt 12/6/2004 20:49'!\\\\ninitialize\\\\n\\\\tPreferenceViewRegistry ofColorPreferences register: self.! !\\\\n\\\\n!PBColorPreferenceView class methodsFor: 'class initialization' stamp: 'hpt 12/6/2004 20:49'!\\\\nunload\\\\n\\\\tPreferenceViewRegistry ofColorPreferences unregister: self.! !\\\\nPBPreferenceView subclass: #PBHaloThemePreferenceView\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'PreferenceBrowser'!\\\\n!PBHaloThemePreferenceView commentStamp: '<historical>' prior: 0!\\\\nI am responsible for building the button for the Halo Theme preference!\\\\n\\\\n\\\\n!PBHaloThemePreferenceView methodsFor: 'initialization' stamp: 'hpt 12/8/2004 18:12'!\\\\ninitialize\\\\n\\\\tself addActionTitled: 'edit custom halos' \\\\n\\\\t\\\\ttarget: Preferences \\\\n\\\\t\\\\tselector:  #editCustomHalos \\\\n\\\\t\\\\targuments: {} \\\\n\\\\t\\\\tballoonText: 'Click here to edit the method that defines the custom halos' translated.! !\\\\n\\\\n\\\\n!PBHaloThemePreferenceView methodsFor: 'user interface' stamp: 'hpt 12/8/2004 18:18'!\\\\nhaloThemeRadioButtons\\\\n\\\\t\\\\\\\"Answer a column of butons representing the choices of halo theme\\\\\\\"\\\\n\\\\n\\\\t| buttonColumn aRow aRadioButton aLabel |\\\\n\\\\tbuttonColumn := self verticalPanel.\\\\n\\\\t#(\\\\t(iconicHaloSpecifications iconic iconicHalosInForce\\\\t'circular halos with icons inside')\\\\n\\\\t\\\\t(classicHaloSpecs\\\\tclassic\\\\tclassicHalosInForce\\\\t\\\\t'plain circular halos')\\\\n\\\\t\\\\t(simpleFullHaloSpecifications\\\\t\\\\tsimple\\\\tsimpleHalosInForce\\\\t'fewer, larger halos')\\\\n\\\\t\\\\t(customHaloSpecs\\\\tcustom\\\\tcustomHalosInForce\\\\t\\\\t'customizable halos')) do:\\\\n\\\\n\\\\t\\\\t[:quad |\\\\n\\\\t\\\\t\\\\taRadioButton := UpdatingThreePhaseButtonMorph radioButton\\\\n\\\\t\\\\t\\\\t\\\\ttarget: Preferences;\\\\n\\\\t\\\\t\\\\t\\\\tsetBalloonText: quad fourth;\\\\n\\\\t\\\\t\\\\t\\\\tactionSelector: #installHaloTheme:;\\\\n\\\\t\\\\t\\\\t\\\\tgetSelector: quad third;\\\\n\\\\t\\\\t\\\\t\\\\targuments: (Array with: quad first);\\\\n\\\\t\\\\t\\\\t\\\\tyourself.\\\\n\\\\t\\\\t\\\\taLabel := (StringMorph contents: quad second asString)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsetBalloonText: quad fourth;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tyourself.\\\\n\\\\t\\\\t\\\\taRow := self horizontalPanel\\\\n\\\\t\\\\t\\\\t\\\\tcellInset: 4;\\\\n\\\\t\\\\t\\\\t\\\\taddMorphBack: aRadioButton;\\\\n\\\\t\\\\t\\\\t\\\\taddMorphBack: aLabel.\\\\n\\\\t\\\\t\\\\tbuttonColumn addMorphBack: aRow].\\\\n\\\\t^ buttonColumn\\\\n\\\\n\\\\t\\\\\\\"(Preferences preferenceAt: #haloTheme) view tearOffButton\\\\\\\"! !\\\\n\\\\n!PBHaloThemePreferenceView methodsFor: 'user interface' stamp: 'hpt 9/26/2004 00:45'!\\\\nrepresentativeButtonWithColor: aColor inPanel: aPreferencesPanel\\\\n\\\\t| innerPanel |\\\\n\\\\tinnerPanel := self horizontalPanel\\\\n\\\\t\\\\taddMorphBack: (self blankSpaceOf: 10@0);\\\\n\\\\t\\\\taddMorphBack: self haloThemeRadioButtons;\\\\n\\\\t\\\\tyourself.\\\\n\\\\t^self verticalPanel\\\\n\\\\t\\\\tcolor: aColor;\\\\n\\\\t\\\\tlayoutInset: 2;\\\\n\\\\t\\\\taddMorphBack: (StringMorph contents: self preference name);\\\\n\\\\t\\\\taddMorphBack: innerPanel.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPBHaloThemePreferenceView class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PBHaloThemePreferenceView class methodsFor: 'class initialization' stamp: 'hpt 9/26/2004 15:48'!\\\\ninitialize\\\\n\\\\tPreferenceViewRegistry ofHaloThemePreferences register: self.! !\\\\n\\\\n!PBHaloThemePreferenceView class methodsFor: 'class initialization' stamp: 'hpt 9/26/2004 15:48'!\\\\nunload\\\\n\\\\tPreferenceViewRegistry ofHaloThemePreferences unregister: self.! !\\\\nPBPreferenceView subclass: #PBNumericPreferenceView\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'PreferenceBrowser'!\\\\n\\\\n!PBNumericPreferenceView methodsFor: 'user interface' stamp: 'hpt 12/9/2004 22:23'!\\\\npreferenceValue\\\\n\\\\t^self preference preferenceValue asString! !\\\\n\\\\n!PBNumericPreferenceView methodsFor: 'user interface' stamp: 'hpt 12/10/2004 22:53'!\\\\npreferenceValue: aTextOrString\\\\n\\\\t(aTextOrString notEmpty and: [aTextOrString asString isAllDigits])\\\\n\\\\t\\\\tifFalse: [^false].\\\\n\\\\tself preference preferenceValue: aTextOrString asNumber.\\\\n\\\\t^true.! !\\\\n\\\\n!PBNumericPreferenceView methodsFor: 'user interface' stamp: 'hpt 12/9/2004 22:19'!\\\\nrepresentativeButtonWithColor: aColor inPanel: aPreferenceBrowser\\\\n\\\\t^self horizontalPanel\\\\n\\\\t\\\\tlayoutInset: 2;\\\\n\\\\t\\\\tcolor: aColor;\\\\n\\\\t\\\\tcellInset: 20;\\\\n\\\\t\\\\tcellPositioning: #center;\\\\n\\\\t\\\\taddMorphBack: (StringMorph contents: self preference name);\\\\n\\\\t\\\\taddMorphBack: self textField;\\\\n\\\\t\\\\tyourself.! !\\\\n\\\\n!PBNumericPreferenceView methodsFor: 'user interface' stamp: 'hpt 12/9/2004 22:19'!\\\\ntextField\\\\n\\\\t^(PluggableTextMorph\\\\n\\\\t\\\\ton: self\\\\n\\\\t\\\\ttext: #preferenceValue\\\\n\\\\t\\\\taccept: #preferenceValue:)\\\\n\\\\t\\\\t\\\\thideVScrollBarIndefinitely: true;\\\\n\\\\t\\\\t\\\\tborderColor: #inset;\\\\n\\\\t\\\\t\\\\tacceptOnCR: true;\\\\n\\\\t\\\\t\\\\tcolor: Color gray veryMuchLighter;\\\\n\\\\t\\\\t\\\\tvResizing: #rigid;\\\\n\\\\t\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\t\\\\theight: TextStyle defaultFont height + 6;\\\\n\\\\t\\\\t\\\\tyourself.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPBNumericPreferenceView class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PBNumericPreferenceView class methodsFor: 'class initialization' stamp: 'hpt 12/9/2004 22:21'!\\\\ninitialize\\\\n\\\\tPreferenceViewRegistry ofNumericPreferences register: self.! !\\\\n\\\\n!PBNumericPreferenceView class methodsFor: 'class initialization' stamp: 'hpt 12/9/2004 22:21'!\\\\nunload\\\\n\\\\tPreferenceViewRegistry ofNumericPreferences unregister: self.! !\\\\nMorph subclass: #PBPreferenceButtonMorph\\\\n\\\\tinstanceVariableNames: 'moreButton model preference preferenceMorphicView preferenceView'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'PreferenceBrowser'!\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'accessing' stamp: 'hpt 12/8/2004 15:34'!\\\\nmodel\\\\n\\\\t^model! !\\\\n\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'extra controls' stamp: 'hpt 12/8/2004 18:15'!\\\\nactionButtons\\\\n\\\\t^self preferenceView actions collect: [:aTuple |\\\\n\\\\t\\\\tself basicButton\\\\n\\\\t\\\\t\\\\t\\\\tlabel: aTuple first;\\\\n\\\\t\\\\t\\\\t\\\\ttarget: aTuple second;\\\\n\\\\t\\\\t\\\\t\\\\tactionSelector: aTuple third;\\\\n\\\\t\\\\t\\\\t\\\\targuments: aTuple fourth;\\\\n\\\\t\\\\t\\\\t\\\\tsetBalloonText: aTuple fifth ]! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'extra controls' stamp: 'hpt 8/24/2005 20:33'!\\\\naddExtraControls\\\\n\\\\t| m |\\\\n\\\\tm := self horizontalPanel\\\\n\\\\t\\\\tcellInset: 3;\\\\n\\\\t\\\\taddAllMorphs: self actionButtons;\\\\n\\\\t\\\\taddMorphBack: self horizontalFiller;\\\\n\\\\t\\\\taddMorphBack: self moreButton;\\\\n\\\\t\\\\tyourself.\\\\n\\\\tself \\\\n\\\\t\\\\taddMorphBack: (self blankSpaceOf: 2@2);\\\\n\\\\t\\\\taddMorphBack: self preferenceHelpTextMorph;\\\\n\\\\t\\\\tfullBounds; \\\\\\\"to force a layout compute needed by the textMorphs's autoFit\\\\\\\"\\\\n\\\\t\\\\taddMorphBack: m\\\\n! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'extra controls' stamp: 'hpt 12/8/2004 17:16'!\\\\nadvancedOptionsSelected\\\\n\\\\tself preferenceView offerPreferenceNameMenu: self model! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'extra controls' stamp: 'hpt 12/8/2004 18:17'!\\\\nmoreButton\\\\n\\\\t^moreButton ifNil: \\\\n\\\\t\\\\t[moreButton := self basicButton \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tlabel: 'more' translated; \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsetBalloonText: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Click here for advanced options'translated;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tactionSelector: #advancedOptionsSelected]! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'extra controls' stamp: 'stephaneducasse 2/4/2006 20:39'!\\\\npreferenceHelpTextMorph\\\\n\\\\t| text tm |\\\\n\\\\ttext := self preferenceHelpText.\\\\n\\\\ttm := TextMorph new\\\\n\\\\t\\\\tcontents: text;\\\\n\\\\t\\\\twrapOnOff;\\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tvResizing: #shrinkWrap;\\\\n\\\\t\\\\tlock: true;\\\\n\\\\t\\\\tvisible: text notEmpty;\\\\n\\\\t\\\\tyourself. \\\\\\\"we don't want an empty textmorph showing\\\\\\\"\\\\n\\\\ttm isAutoFit\\\\n\\\\t\\\\tifFalse: [tm autoFitOnOff].\\\\n\\\\t^tm.! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'extra controls' stamp: 'hpt 12/8/2004 16:40'!\\\\nremoveExtraControls\\\\n\\\\tself submorphs copyWithoutFirst do: [:ea | ea delete]! !\\\\n\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'highlighting' stamp: 'hpt 12/8/2004 15:55'!\\\\nhighlightOff\\\\n\\\\tself beTransparent.\\\\n\\\\tself label color: Color black.\\\\n\\\\tself removeExtraControls.! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'highlighting' stamp: 'hpt 12/8/2004 17:25'!\\\\nhighlightOn\\\\n\\\\tself color: (Color gray alpha: 0.1).\\\\n\\\\tself label color: Color red.\\\\n\\\\tself addExtraControls.! !\\\\n\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'initialization' stamp: 'hpt 12/8/2004 15:38'!\\\\ninitializeLayout\\\\n\\\\tself layoutPolicy: TableLayout new;\\\\n\\\\t\\\\tbeTransparent;\\\\n\\\\t\\\\tlayoutInset: 0;\\\\n\\\\t\\\\tcellInset: 0;\\\\n\\\\t\\\\tlistCentering: #topLeft;\\\\n\\\\t\\\\tcellPositioning: #topLeft;\\\\n\\\\t\\\\tlistDirection: #topToBottom;\\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tvResizing: #shrinkWrap.\\\\t\\\\t! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'initialization' stamp: 'hpt 12/8/2004 15:38'!\\\\ninitializeWithPreference: aPreference model: aModel\\\\n\\\\tpreference := aPreference.\\\\n\\\\tmodel := aModel.\\\\n\\\\tself initializeLayout.\\\\n\\\\tself addMorphBack: self preferenceMorphicView.\\\\n\\\\tself highlightOff.! !\\\\n\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'preference accessing' stamp: 'hpt 12/8/2004 15:42'!\\\\nlabel\\\\n\\\\t^self preferenceMorphicView firstSubmorph! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'preference accessing' stamp: 'hpt 12/8/2004 15:13'!\\\\npreference\\\\n\\\\t^preference! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'preference accessing' stamp: 'hpt 12/8/2004 15:56'!\\\\npreferenceHelp\\\\n\\\\t| help name |\\\\n\\\\thelp := self preference helpString withBlanksTrimmed.\\\\n\\\\tname := self preference name.\\\\n\\\\t(self caseInsensitiveBeginsWith: name  in: help)\\\\n\\\\t\\\\tifTrue: [help := help allButFirst: name size].\\\\n\\\\t(help notEmpty and: [help first = $:])\\\\n\\\\t\\\\tifTrue: [help := help allButFirst].\\\\n\\\\t^help withBlanksTrimmed.\\\\n! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'preference accessing' stamp: 'hpt 12/8/2004 15:25'!\\\\npreferenceHelpText\\\\n\\\\t^self preferenceHelp asText\\\\n\\\\t\\\\taddAttribute: TextEmphasis italic;\\\\n\\\\t\\\\tyourself.! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'preference accessing' stamp: 'hpt 12/8/2004 15:48'!\\\\npreferenceMorphicView\\\\n\\\\t^preferenceMorphicView\\\\n\\\\t\\\\tifNil: \\\\n\\\\t\\\\t\\\\t[preferenceMorphicView := self preferenceView\\\\n\\\\t\\\\t\\\\t\\\\trepresentativeButtonWithColor: Color transparent inPanel: self model.\\\\n\\\\t\\\\t\\\\tpreferenceMorphicView hResizing: #spaceFill.\\\\n\\\\t\\\\t\\\\t^preferenceMorphicView]! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'preference accessing' stamp: 'stephaneducasse 2/4/2006 20:39'!\\\\npreferenceView\\\\n\\\\t^preferenceView\\\\n\\\\t\\\\tifNil: [preferenceView := self preference viewForPanel: self model.]! !\\\\n\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'utility methods' stamp: 'hpt 12/8/2004 17:06'!\\\\nbasicButton\\\\n\\\\t| button |\\\\n\\\\tbutton := SimpleButtonMorph new.\\\\n\\\\tbutton\\\\n\\\\t\\\\tborderWidth: 1;\\\\n\\\\t\\\\tborderColor: self paneColor;\\\\n\\\\t\\\\ton: #mouseEnter send: #value to: [button borderWidth: 2];\\\\n\\\\t\\\\ton: #mouseLeave send: #value to: [button borderWidth: 1];\\\\n\\\\t\\\\tvResizing: #rigid;\\\\n\\\\t\\\\theight: (TextStyle defaultFont height + 4);\\\\n\\\\t\\\\tuseSquareCorners;\\\\n\\\\t\\\\tclipSubmorphs: true;\\\\n\\\\t\\\\tcolor: self paneColor muchLighter;\\\\n\\\\t\\\\ttarget: self.\\\\n\\\\t^button! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'utility methods' stamp: 'hpt 12/8/2004 15:59'!\\\\nbasicPanel\\\\n\\\\t^BorderedMorph new\\\\n\\\\t\\\\tbeTransparent;\\\\n\\\\t\\\\textent: 0@0;\\\\n\\\\t\\\\tborderWidth: 0;\\\\n\\\\t\\\\tlayoutInset: 0;\\\\n\\\\t\\\\tcellInset: 0;\\\\n\\\\t\\\\tlayoutPolicy: TableLayout new;\\\\n\\\\t\\\\tlistCentering: #topLeft;\\\\n\\\\t\\\\tcellPositioning: #center;\\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tvResizing: #shrinkWrap;\\\\n\\\\t\\\\tyourself! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'utility methods' stamp: 'hpt 12/8/2004 15:29'!\\\\nblankSpaceOf: aPoint\\\\n\\\\t^Morph new \\\\n\\\\t\\\\tbeTransparent;\\\\n\\\\t\\\\textent: aPoint; \\\\n\\\\t\\\\tyourself! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'utility methods' stamp: 'hpt 12/8/2004 15:43'!\\\\ncaseInsensitiveBeginsWith: prefix in: string\\\\n\\\\t^(string findString: prefix startingAt: 1 caseSensitive: false) = 1! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'utility methods' stamp: 'hpt 12/8/2004 16:42'!\\\\nhorizontalFiller\\\\n\\\\t^self horizontalPanel\\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tyourself.! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'utility methods' stamp: 'hpt 12/8/2004 16:42'!\\\\nhorizontalPanel\\\\n\\\\t^self basicPanel\\\\n\\\\t\\\\tcellPositioning: #center;\\\\n\\\\t\\\\tlistDirection: #leftToRight;\\\\n\\\\t\\\\tyourself.! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'utility methods' stamp: 'stephaneducasse 2/4/2006 20:39'!\\\\npaneColor\\\\n\\\\t| browser |\\\\n\\\\tbrowser := (self ownerChain \\\\n\\\\t\\\\tdetect: [:ea | ea isKindOf: PreferenceBrowserMorph] \\\\n\\\\t\\\\tifNone: [^Color black]) .\\\\n\\\\t^browser paneColor! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'utility methods' stamp: 'hpt 12/8/2004 15:27'!\\\\nverticalPanel\\\\n\\\\t^self basicPanel\\\\n\\\\t\\\\tcellPositioning: #topLeft;\\\\n\\\\t\\\\tlistDirection: #topToBottom;\\\\n\\\\t\\\\tyourself.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPBPreferenceButtonMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PBPreferenceButtonMorph class methodsFor: 'instance creation' stamp: 'hpt 12/8/2004 15:20'!\\\\npreference: aPreference\\\\n\\\\t^self preference: aPreference model: nil! !\\\\n\\\\n!PBPreferenceButtonMorph class methodsFor: 'instance creation' stamp: 'hpt 12/8/2004 15:19'!\\\\npreference: aPreference model: aModel\\\\n\\\\t^self new\\\\n\\\\t\\\\tinitializeWithPreference: aPreference model: aModel;\\\\n\\\\t\\\\tyourself.! !\\\\nPreferenceView subclass: #PBPreferenceView\\\\n\\\\tinstanceVariableNames: 'actions'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'PreferenceBrowser'!\\\\n!PBPreferenceView commentStamp: '<historical>' prior: 0!\\\\nI am just a refactor of all the common method of the PreferenceBrowser preference views!\\\\n\\\\n\\\\n!PBPreferenceView methodsFor: 'actions' stamp: 'stephaneducasse 2/4/2006 20:39'!\\\\nactions\\\\n\\\\t^actions ifNil: [actions := OrderedCollection new.]! !\\\\n\\\\n!PBPreferenceView methodsFor: 'actions' stamp: 'hpt 12/8/2004 18:13'!\\\\naddActionTitled: aTitle target: aTarget selector: aSelector arguments: aCollection balloonText: aText\\\\n\\\\tself actions add: { aTitle. aTarget. aSelector. aCollection. aText }! !\\\\n\\\\n\\\\n!PBPreferenceView methodsFor: 'user interface' stamp: 'hpt 9/26/2004 11:42'!\\\\nbasicPanel\\\\n\\\\t^BorderedMorph new\\\\n\\\\t\\\\tbeTransparent;\\\\n\\\\t\\\\textent: 0@0;\\\\n\\\\t\\\\tborderWidth: 0;\\\\n\\\\t\\\\tlayoutInset: 0;\\\\n\\\\t\\\\tcellInset: 2;\\\\n\\\\t\\\\tlayoutPolicy: TableLayout new;\\\\n\\\\t\\\\tlistCentering: #topLeft;\\\\n\\\\t\\\\tcellPositioning: #center;\\\\n\\\\t\\\\thResizing: #shrinkWrap;\\\\n\\\\t\\\\tvResizing: #shrinkWrap;\\\\n\\\\t\\\\tyourself! !\\\\n\\\\n!PBPreferenceView methodsFor: 'user interface' stamp: 'hpt 9/26/2004 00:15'!\\\\nblankSpaceOf: aPoint\\\\n\\\\t^Morph new \\\\n\\\\t\\\\tbeTransparent;\\\\n\\\\t\\\\textent: aPoint; \\\\n\\\\t\\\\tyourself! !\\\\n\\\\n!PBPreferenceView methodsFor: 'user interface' stamp: 'hpt 9/26/2004 00:13'!\\\\nhorizontalFiller\\\\n\\\\t^self horizontalPanel\\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tyourself.! !\\\\n\\\\n!PBPreferenceView methodsFor: 'user interface' stamp: 'hpt 9/26/2004 11:43'!\\\\nhorizontalPanel\\\\n\\\\t^self basicPanel\\\\n\\\\t\\\\tcellPositioning: #center;\\\\n\\\\t\\\\tlistDirection: #leftToRight;\\\\n\\\\t\\\\tyourself.! !\\\\n\\\\n!PBPreferenceView methodsFor: 'user interface' stamp: 'hpt 9/26/2004 00:48'!\\\\nofferPreferenceNameMenu: aPreferenceBrowser\\\\n\\\\t\\\\\\\"the user clicked on a preference name -- put up a menu\\\\\\\"\\\\n\\\\n\\\\t| aMenu |\\\\t\\\\t\\\\t\\\\n\\\\taMenu := MenuMorph new \\\\n\\\\t\\\\tdefaultTarget: self preference;\\\\n\\\\t\\\\taddTitle: self preference name.\\\\n\\\\n\\\\t(Preferences okayToChangeProjectLocalnessOf: self preference name) ifTrue:\\\\n\\\\t\\\\t[aMenu addUpdating: #isProjectLocalString target: self preference action: #toggleProjectLocalness.\\\\n\\\\t\\\\taMenu balloonTextForLastItem: 'Some preferences are best applied uniformly to all projects, and others are best set by each individual project.  If this item is checked, then this preference will be printed in bold and will have a separate value for each project'].\\\\n\\\\n\\\\taMenu add: 'browse senders' translated target: self systemNavigation selector: #browseAllCallsOn: argument: self preference name.\\\\n\\\\taMenu balloonTextForLastItem: 'This will open a method-list browser on all methods that the send the preference \\\\\\\"', self preference name, '\\\\\\\".'. \\\\n\\\\taMenu add: 'show category...' target: aPreferenceBrowser selector: #findCategoryFromPreference: argument: self preference name.\\\\n\\\\taMenu balloonTextForLastItem: 'Allows you to find out which category, or categories, this preference belongs to.'.\\\\n\\\\n\\\\tSmalltalk isMorphic ifTrue:\\\\n\\\\t\\\\t[aMenu add: 'hand me a button for this preference' target: self selector: #tearOffButton.\\\\n\\\\t\\\\taMenu balloonTextForLastItem: 'Will give you a button that governs this preference, which you may deposit wherever you wish'].\\\\n\\\\n\\\\taMenu add: 'copy this name to clipboard' target: self preference selector: #copyName.\\\\n\\\\taMenu balloonTextForLastItem: 'Copy the name of the preference to the text clipboard, so that you can paste into code somewhere'.\\\\n\\\\n\\\\taMenu popUpInWorld! !\\\\n\\\\n!PBPreferenceView methodsFor: 'user interface' stamp: 'hpt 9/26/2004 11:43'!\\\\nverticalPanel\\\\n\\\\t^self basicPanel\\\\n\\\\t\\\\tcellPositioning: #topLeft;\\\\n\\\\t\\\\tlistDirection: #topToBottom;\\\\n\\\\t\\\\tyourself.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPBPreferenceView class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PBPreferenceView class methodsFor: 'view registry' stamp: 'hpt 9/26/2004 16:09'!\\\\nhandlesPanel: aPreferencePanel\\\\n\\\\t^aPreferencePanel isKindOf: PreferenceBrowser! !\\\\nPBPreferenceView subclass: #PBTextPreferenceView\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'PreferenceBrowser'!\\\\n\\\\n!PBTextPreferenceView methodsFor: 'user interface' stamp: 'hpt 12/10/2004 22:46'!\\\\npreferenceValue\\\\n\\\\t^self preference preferenceValue ifNil: ['']! !\\\\n\\\\n!PBTextPreferenceView methodsFor: 'user interface' stamp: 'hpt 9/26/2004 11:38'!\\\\npreferenceValue: aTextOrString\\\\n\\\\tself preference preferenceValue: aTextOrString asString.\\\\n\\\\t^true.! !\\\\n\\\\n!PBTextPreferenceView methodsFor: 'user interface' stamp: 'hpt 9/26/2004 11:41'!\\\\nrepresentativeButtonWithColor: aColor inPanel: aPreferenceBrowser\\\\n\\\\t^self horizontalPanel\\\\n\\\\t\\\\tlayoutInset: 2;\\\\n\\\\t\\\\tcolor: aColor;\\\\n\\\\t\\\\tcellInset: 20;\\\\n\\\\t\\\\tcellPositioning: #center;\\\\n\\\\t\\\\taddMorphBack: (StringMorph contents: self preference name);\\\\n\\\\t\\\\taddMorphBack: self textField;\\\\n\\\\t\\\\tyourself.! !\\\\n\\\\n!PBTextPreferenceView methodsFor: 'user interface' stamp: 'hpt 9/26/2004 11:41'!\\\\ntextField\\\\n\\\\t^(PluggableTextMorph\\\\n\\\\t\\\\ton: self\\\\n\\\\t\\\\ttext: #preferenceValue\\\\n\\\\t\\\\taccept: #preferenceValue:)\\\\n\\\\t\\\\t\\\\thideVScrollBarIndefinitely: true;\\\\n\\\\t\\\\t\\\\tborderColor: #inset;\\\\n\\\\t\\\\t\\\\tacceptOnCR: true;\\\\n\\\\t\\\\t\\\\tcolor: Color gray veryMuchLighter;\\\\n\\\\t\\\\t\\\\tvResizing: #rigid;\\\\n\\\\t\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\t\\\\theight: TextStyle defaultFont height + 6;\\\\n\\\\t\\\\t\\\\tyourself.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPBTextPreferenceView class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PBTextPreferenceView class methodsFor: 'class initialization' stamp: 'hpt 9/26/2004 17:01'!\\\\ninitialize\\\\n\\\\tPreferenceViewRegistry ofTextPreferences register: self.! !\\\\n\\\\n!PBTextPreferenceView class methodsFor: 'class initialization' stamp: 'hpt 9/26/2004 17:01'!\\\\nunload\\\\n\\\\tPreferenceViewRegistry ofTextPreferences unregister: self.! !\\\\nPBColorPreferenceView subclass: #PBWindowColorPreferenceView\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'PreferenceBrowser'!\\\\n\\\\n!PBWindowColorPreferenceView methodsFor: 'initialization' stamp: 'hpt 12/8/2004 18:38'!\\\\ninitialize\\\\n\\\\tsuper initialize.\\\\n\\\\tself addActionTitled: 'Bright' target: Preferences selector: #installBrightWindowColors arguments: {} balloonText: 'Use standard bright colors for all windows' translated.\\\\n\\\\tself addActionTitled: 'Pastel' target: Preferences selector: #installPastelWindowColors arguments: {} balloonText: 'Use standard pastel colors for all windows' translated.\\\\t\\\\n\\\\tself addActionTitled: 'White' target: Preferences selector: #installUniformWindowColors arguments: {} balloonText: 'Use white backgrounds for all standard windows' translated.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPBWindowColorPreferenceView class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PBWindowColorPreferenceView class methodsFor: 'class initialization' stamp: 'hpt 12/8/2004 18:40'!\\\\ninitialize\\\\n\\\\tself viewRegistry register: self.! !\\\\n\\\\n!PBWindowColorPreferenceView class methodsFor: 'class initialization' stamp: 'hpt 12/8/2004 18:40'!\\\\nunload\\\\n\\\\tself viewRegistry unregister: self.! !\\\\n\\\\n!PBWindowColorPreferenceView class methodsFor: 'class initialization' stamp: 'hpt 12/8/2004 18:40'!\\\\nviewRegistry\\\\n\\\\t^(PreferenceViewRegistry registryOf: #windowColorPreferences)\\\\n\\\\t\\\\tviewOrder: 6;\\\\n\\\\t\\\\tyourself.! !\\\\nPrimCallControllerAbstract subclass: #PCCByCompilation\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Tests-PrimCallController'!\\\\n!PCCByCompilation commentStamp: 'sr 6/16/2004 09:00' prior: 0!\\\\nThis class is for switching external prim calls (primitiveExternalCall) on and off.\\\\n\\\\nIt is best suited for permanently switching plugin calls off while preserving the possibility to switch them on later. For plugin testing purposes you probably should use PCCByLiterals for temporarily switch on/off them instead.\\\\n\\\\nIt works on a source code basis by compilation:\\\\n\\\\tDisabling works by putting an enabled prim call into a special comment followed by a recompile to transform it into a disabled one.\\\\n\\\\tEnabling works by pulling the disabled prim call out of the special comment followed by a recompile to transform it into an enabled one.\\\\n\\\\nAs a consequence, enabling of prims only works with method sources containing the mentioned special comment, which normally has been generated by this tool for disabling the corresponding prim.\\\\n\\\\nPlease look into superclass PrimCallControllerAbstract for more info and the user interface.\\\\n\\\\nStructure:\\\\n No instVars here: look into superclass.\\\\n\\\\nImplementation note:\\\\nTo harden it for sunit testing purposes some special accessing of the source code has been necessary: to avoid accessing different processes a sources file at once, followed by generating garbage, the process priority of actions leading to these accesses has been increased (sunit tests run in the background). A better solution would be to introduce a source file locking mechanism.!\\\\n]style[(107 11 138 13 5 11 62 14 3 9 124 8 245 9 36 9 26 28 26 93 20 384)f2FAccuny#12,f2FAccuny#12i,f2FAccuny#12,f2LPCCByLiterals Comment;,f2FAccuny#12,f2FAccuny#12i,f2FAccuny#12,f2FAccuny#12b,f2FAccuny#12,f2FAccuny#12i,f2FAccuny#12,f2FAccuny#12i,f2FAccuny#12,f2,f2FAccuny#12,f3FAccuny#12,f2FAccuny#12,f2,f2LPrimCallControllerAbstract Comment;,f2,FAccuny#15uf2,f2!\\\\n\\\\n\\\\n!PCCByCompilation methodsFor: 'string constants' stamp: 'sr 6/7/2004 03:30'!\\\\ncomment\\\\n\\\\t^ '{prim disabled by ', self className, '} '! !\\\\n\\\\n!PCCByCompilation methodsFor: 'string constants' stamp: 'sr 6/7/2004 03:31'!\\\\ndisabledPrimStartString\\\\n\\\\t^ '\\\\\\\"', self comment, self enabledPrimStartString! !\\\\n\\\\n!PCCByCompilation methodsFor: 'string constants' stamp: 'sr 6/7/2004 03:31'!\\\\ndisabledPrimStopChar\\\\n\\\\t\\\\\\\"end of disabling comment\\\\\\\"\\\\n\\\\t^ $\\\\\\\"! !\\\\n\\\\n!PCCByCompilation methodsFor: 'string constants' stamp: 'sr 6/7/2004 03:31'!\\\\nenabledPrimStartString\\\\n\\\\t^ '<primitive:'! !\\\\n\\\\n!PCCByCompilation methodsFor: 'string constants' stamp: 'sr 6/7/2004 03:31'!\\\\nenabledPrimStopChar\\\\n\\\\t^ $>! !\\\\n\\\\n\\\\n!PCCByCompilation methodsFor: 'ui querying' stamp: 'sr 6/11/2004 06:33'!\\\\nextractCallModuleNames: aMethodRef \\\\n\\\\t^ (self existsCompiledCallIn: aMethodRef)\\\\n\\\\t\\\\tifTrue: [self extractCallModuleNamesFromLiterals: aMethodRef]\\\\n\\\\t\\\\tifFalse: [| src | \\\\n\\\\t\\\\t\\\\t\\\\\\\"try source\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\\\\"higher priority to avoid source file accessing errors\\\\\\\"\\\\n\\\\t\\\\t\\\\t[src := aMethodRef sourceString]\\\\n\\\\t\\\\t\\\\t\\\\tvalueAt: self higherPriority.\\\\n\\\\t\\\\t\\\\tself extractCallNamesFromPrimString: ((self extractDisabledPrimStringFrom: src)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifNil: [\\\\\\\"no disabled prim string found\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^ nil]) first]! !\\\\n\\\\n!PCCByCompilation methodsFor: 'ui querying' stamp: 'sr 6/14/2004 21:38'!\\\\nmethodsWithCall\\\\n\\\\t\\\\\\\"Expensive!! For just querying the system unaffected by an instance of \\\\n\\\\tthis class use PCCByLiterals instead.\\\\\\\"\\\\n\\\\t^ self methodsWithCompiledCall , self methodsWithDisabledCall! !\\\\n\\\\n!PCCByCompilation methodsFor: 'ui querying' stamp: 'md 8/27/2005 17:17'!\\\\nmethodsWithDisabledCall\\\\n\\\\t\\\\\\\"Answer a SortedCollection of all the methods that contain, in source  \\\\n\\\\tcode, the substring indicating a disabled prim.\\\\\\\"\\\\n\\\\t\\\\\\\"The alternative implementation  \\\\n\\\\t\\\\t^ SystemNavigation new allMethodsWithSourceString: self disabledPrimStartString\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmatchCase: true  \\\\n\\\\talso searches in class comments.\\\\\\\"\\\\n\\\\t| list classCount string |\\\\n\\\\tstring := self disabledPrimStartString.\\\\n\\\\tlist := Set new.\\\\n\\\\t'Searching all method source code...'\\\\n\\\\t\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\tfrom: 0\\\\n\\\\t\\\\tto: Smalltalk classNames size * 2 \\\\\\\"classes with their metaclasses\\\\\\\"\\\\n\\\\t\\\\tduring: [:bar |\\\\n\\\\t\\\\t\\\\tclassCount := 0.\\\\n\\\\t\\\\t\\\\tSystemNavigation default\\\\n\\\\t\\\\t\\\\t\\\\tallBehaviorsDo: [:class | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbar value: (classCount := classCount + 1).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tclass\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tselectorsDo: [:sel | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t| src | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"higher priority to avoid source file accessing  \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\terrors\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[src := class sourceCodeAt: sel]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tvalueAt: self higherPriority.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(src\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfindString: string\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcaseSensitive: true) > 0\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [sel isDoIt ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tlist add: (MethodReference new setStandardClass: class methodSymbol: sel)]]]]].\\\\n\\\\t^ list asSortedCollection! !\\\\n\\\\n\\\\n!PCCByCompilation methodsFor: 'ui testing' stamp: 'sr 6/11/2004 07:26'!\\\\nexistsCallIn: aMethodRef \\\\n\\\\t\\\\\\\"Here existsCompiledCallIn: (see also comment there) is sufficient to \\\\n\\\\tquery for enabled and failed, but not for disabled prim calls: so check \\\\n\\\\tfor disabled ones in sources, too.\\\\\\\"\\\\n\\\\t^ (self existsCompiledCallIn: aMethodRef)\\\\n\\\\t\\\\tor: [self existsDisabledCallIn: aMethodRef]! !\\\\n\\\\n!PCCByCompilation methodsFor: 'ui testing' stamp: 'sr 6/11/2004 07:07'!\\\\nexistsDisabledCallIn: aMethodRef \\\\n\\\\t| src |\\\\n\\\\t^ (self existsCompiledCallIn: aMethodRef) not\\\\n\\\\t\\\\tand: [\\\\\\\"higher priority to avoid source file accessing errors\\\\\\\"\\\\n\\\\t\\\\t\\\\t[src := aMethodRef sourceString]\\\\n\\\\t\\\\t\\\\t\\\\tvalueAt: self higherPriority.\\\\n\\\\t\\\\t\\\\tself methodSourceContainsDisabledCall: src]! !\\\\n\\\\n\\\\n!PCCByCompilation methodsFor: 'private' stamp: 'sr 6/7/2004 03:26'!\\\\ndisabled2EnabledPrimMethodString: aSourceString \\\\n\\\\t| start stop primString extract |\\\\n\\\\textract := self extractDisabledPrimStringFrom: aSourceString.\\\\n\\\\tprimString := extract at: 1.\\\\n\\\\tstart := extract at: 2.\\\\n\\\\tstop := start + primString size - 1.\\\\n\\\\t^ aSourceString\\\\n\\\\t\\\\tcopyReplaceFrom: start\\\\n\\\\t\\\\tto: stop\\\\n\\\\t\\\\twith: (self disabled2EnabledPrimString: primString)! !\\\\n\\\\n!PCCByCompilation methodsFor: 'private' stamp: 'sr 6/7/2004 03:26'!\\\\ndisabled2EnabledPrimString: aDisabledPrimString\\\\n\\\\t\\\\\\\"remove comment quotes and comment after first comment quote\\\\\\\"\\\\n\\\\t| enabledPrimString |\\\\n\\\\tenabledPrimString := aDisabledPrimString copyFrom: self comment size + 2 to: aDisabledPrimString size - 1.\\\\n\\\\t^ enabledPrimString! !\\\\n\\\\n!PCCByCompilation methodsFor: 'private' stamp: 'sr 6/7/2004 03:28'!\\\\nenabled2DisabledPrimMethodString: aSourceString \\\\n\\\\t| start stop primString extract |\\\\n\\\\textract := self extractEnabledPrimStringFrom: aSourceString.\\\\n\\\\tprimString := extract at: 1.\\\\n\\\\tstart := extract at: 2.\\\\n\\\\tstop := start + primString size - 1.\\\\n\\\\t^ aSourceString\\\\n\\\\t\\\\tcopyReplaceFrom: start\\\\n\\\\t\\\\tto: stop\\\\n\\\\t\\\\twith: (self enabled2DisabledPrimString: primString)! !\\\\n\\\\n!PCCByCompilation methodsFor: 'private' stamp: 'sr 6/7/2004 03:28'!\\\\nenabled2DisabledPrimString: anEnabledPrimString \\\\n\\\\t| disabledPrimString |\\\\n\\\\tdisabledPrimString := '\\\\\\\"' , self comment , anEnabledPrimString , '\\\\\\\"'.\\\\n\\\\t^ disabledPrimString! !\\\\n\\\\n!PCCByCompilation methodsFor: 'private' stamp: 'stephaneducasse 2/3/2006 22:39'!\\\\nextractCallNamesFromPrimString: aString\\\\n\\\\t\\\\\\\"method works for both enabled and disabled prim strings\\\\\\\"\\\\n\\\\t\\\\\\\"<primitive: 'doSomething' module:'ModuleFoo'\\\\\\\"\\\\n\\\\t| tokens |\\\\n\\\\ttokens := aString findTokens: ''''.\\\\n\\\\t^ (tokens at: 2) -> (tokens at: 4 ifAbsent: [nil])! !\\\\n\\\\n!PCCByCompilation methodsFor: 'private' stamp: 'sr 6/11/2004 07:10'!\\\\nextractDisabledPrimStringFrom: aSourceString \\\\n\\\\t| startString start stop |\\\\n\\\\tstartString := self disabledPrimStartString.\\\\n\\\\tstart := aSourceString findString: startString.\\\\n\\\\tstart = 0\\\\n\\\\t\\\\tifTrue: [^ nil].\\\\n\\\\tstop := aSourceString indexOf: self disabledPrimStopChar startingAt: start + startString size.\\\\n\\\\tstop = 0\\\\n\\\\t\\\\tifTrue: [^ nil].\\\\n\\\\t^ {aSourceString copyFrom: start to: stop. start}! !\\\\n\\\\n!PCCByCompilation methodsFor: 'private' stamp: 'sr 6/7/2004 03:29'!\\\\nextractEnabledPrimStringFrom: aSourceString \\\\n\\\\t| startString start stop |\\\\n\\\\tstartString := self enabledPrimStartString.\\\\n\\\\tstart := aSourceString findString: startString.\\\\n\\\\tstart = 0\\\\n\\\\t\\\\tifTrue: [^ nil].\\\\n\\\\tstop := aSourceString indexOf: self enabledPrimStopChar startingAt: start + startString size.\\\\n\\\\tstop = 0\\\\n\\\\t\\\\tifTrue: [^ nil].\\\\n\\\\t^ {aSourceString copyFrom: start to: stop. start}! !\\\\n\\\\n!PCCByCompilation methodsFor: 'private' stamp: 'sr 6/7/2004 03:29'!\\\\nhigherPriority\\\\n\\\\t\\\\\\\"this priority seems to be necessary to avoid source file accessing errors\\\\\\\"\\\\n\\\\t^ Processor userSchedulingPriority + 1! !\\\\n\\\\n!PCCByCompilation methodsFor: 'private' stamp: 'sr 6/11/2004 07:06'!\\\\nmethodSourceContainsDisabledCall: methodSource \\\\n\\\\t^ (methodSource findString: self disabledPrimStartString)\\\\n\\\\t\\\\t~= 0! !\\\\n\\\\n\\\\n!PCCByCompilation methodsFor: 'private user interface' stamp: 'sr 6/14/2004 01:37'!\\\\nprivateDisableCallIn: aMethodRef \\\\n\\\\t\\\\\\\"Disables enabled or failed external prim call by recompiling method \\\\n\\\\twith prim call commented out, will be called by superclass.\\\\\\\"\\\\n\\\\t| src newMethodSource |\\\\n\\\\t\\\\\\\"higher priority to avoid source file accessing errors\\\\\\\"\\\\n\\\\t[src := aMethodRef sourceString]\\\\n\\\\t\\\\tvalueAt: self higherPriority.\\\\n\\\\tnewMethodSource := self enabled2DisabledPrimMethodString: src.\\\\n\\\\t\\\\\\\"higher priority to avoid source file accessing errors\\\\\\\"\\\\n\\\\t[aMethodRef actualClass\\\\n\\\\t\\\\tcompile: newMethodSource\\\\n\\\\t\\\\tclassified: (aMethodRef actualClass whichCategoryIncludesSelector: aMethodRef methodSymbol)\\\\n\\\\t\\\\tnotifying: nil]\\\\n\\\\t\\\\tvalueAt: self higherPriority! !\\\\n\\\\n!PCCByCompilation methodsFor: 'private user interface' stamp: 'sr 6/14/2004 02:10'!\\\\nprivateEnableCallIn: aMethodRef \\\\n\\\\t\\\\\\\"Enables disabled external prim call by recompiling method with prim  \\\\n\\\\tcall taken from disabling comment, will be called by superclass.\\\\\\\"\\\\n\\\\t| src newMethodSource |\\\\n\\\\t\\\\\\\"higher priority to avoid source file accessing errors\\\\\\\"\\\\n\\\\t[src := aMethodRef sourceString]\\\\n\\\\t\\\\tvalueAt: self higherPriority.\\\\n\\\\tnewMethodSource := self disabled2EnabledPrimMethodString: src.\\\\n\\\\t\\\\\\\"higher priority to avoid source file accessing errors\\\\\\\"\\\\n\\\\t[aMethodRef actualClass\\\\n\\\\t\\\\tcompile: newMethodSource\\\\n\\\\t\\\\tclassified: (aMethodRef actualClass whichCategoryIncludesSelector: aMethodRef methodSymbol)\\\\n\\\\t\\\\tnotifying: nil]\\\\n\\\\t\\\\tvalueAt: self higherPriority! !\\\\nPrimCallControllerAbstractTest subclass: #PCCByCompilationTest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Tests-PrimCallController'!\\\\n!PCCByCompilationTest commentStamp: 'sr 6/14/2004 22:05' prior: 0!\\\\nPCCByCompilation tests.\\\\n\\\\nTests are in the superclass and inherited from there.!\\\\n\\\\n\\\\n!PCCByCompilationTest methodsFor: 'constants' stamp: 'sr 6/11/2004 05:22'!\\\\nclassToBeTested\\\\n\\\\t^ PCCByCompilation! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'constants' stamp: 'sr 6/7/2004 10:36'!\\\\ndisabledCallSelectors\\\\n\\\\t^ #(#cDisabledRealExternalCall #cDisabledRealExternalCallNaked #cDisabledRealExternalCallOrPrimitiveFailed #cDisabledExternalCallWithoutModule )! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'constants' stamp: 'sr 6/7/2004 10:34'!\\\\nenabledCallSelectors\\\\n\\\\t^ #(#cRealExternalCall #cRealExternalCallNaked #cRealExternalCallOrPrimitiveFailed #cExternalCallWithoutModule )! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'constants' stamp: 'sr 6/7/2004 08:44'!\\\\nexampleModuleName\\\\n\\\\t^ 'CPCCT'! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'constants' stamp: 'sr 6/15/2004 02:42'!\\\\nfailModuleName\\\\n\\\\t^ 'CFailModule'! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'constants' stamp: 'sr 6/14/2004 00:14'!\\\\nfailedCallSelector\\\\n\\\\t^ #cFailedCall! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'constants' stamp: 'sr 6/7/2004 08:40'!\\\\nmethodSelectorsToExampleModule\\\\n\\\\t^ #(#cExternalCall1 #cExternalCall2 )! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'constants' stamp: 'sr 6/7/2004 08:47'!\\\\nmoduleNameNotWithSingularCallName\\\\n\\\\t^ 'CNotOne'! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'constants' stamp: 'sr 6/7/2004 08:47'!\\\\nmoduleNameWithSingularCallName\\\\n\\\\t^ 'COne'! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'constants' stamp: 'sr 6/7/2004 09:52'!\\\\nnoExternalCallSelector\\\\n\\\\t^ #cNoExternalCall! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'constants' stamp: 'sr 6/7/2004 10:28'!\\\\nrealExternalCallOrPrimitiveFailedSelector\\\\n\\\\t^ #cRealExternalCallOrPrimitiveFailed! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'constants' stamp: 'sr 6/7/2004 10:54'!\\\\nsingularCallName\\\\n\\\\t\\\\\\\"occurrs exactly once as prim call name in >>cSingularExternalCall\\\\\\\"\\\\n\\\\t^ 'cSingularExternalCall'! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'constants' stamp: 'sr 6/14/2004 23:33'!\\\\nsingularCallSelector\\\\n\\\\t^ #cSingularExternalCall! !\\\\n\\\\n\\\\n!PCCByCompilationTest methodsFor: 'example module' stamp: 'md 9/6/2005 19:39'!\\\\ncExternalCall1\\\\n\\\\t<primitive: 'prim1' module: 'CPCCT'>\\\\n! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'example module' stamp: 'md 9/6/2005 19:39'!\\\\ncExternalCall2\\\\n\\\\t\\\\t<primitive:'prim2'module:'CPCCT'>\\\\n\\\\t\\\\tself primitiveFailed! !\\\\n\\\\n\\\\n!PCCByCompilationTest methodsFor: 'test methods' stamp: 'sr 6/11/2004 05:36'!\\\\ncDisabledExternalCallWithoutModule\\\\n\\\\t\\\\\\\"{prim disabled by PCCByCompilation} <primitive: 'primGetModuleName'>\\\\\\\"\\\\n\\\\t^ 'Hello World!!'! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'test methods' stamp: 'sr 6/13/2004 23:54'!\\\\ncDisabledRealExternalCall\\\\n\\\\t\\\\\\\"{prim disabled by PCCByCompilation} <primitive: 'primGetModuleName' module:'LargeIntegers'>\\\\\\\"\\\\n\\\\t^ 'Hello World!!'! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'test methods' stamp: 'sr 6/13/2004 23:54'!\\\\ncDisabledRealExternalCallNaked\\\\n\\\\t\\\\\\\"{prim disabled by PCCByCompilation} <primitive: 'primGetModuleName' module:'LargeIntegers'>\\\\\\\"! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'test methods' stamp: 'sr 6/13/2004 23:54'!\\\\ncDisabledRealExternalCallOrPrimitiveFailed\\\\n\\\\t\\\\\\\"{prim disabled by PCCByCompilation} <primitive: 'primGetModuleName' module:'LargeIntegers'>\\\\\\\"\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'test methods' stamp: 'sr 6/7/2004 09:48'!\\\\ncExternalCallWithoutModule\\\\n\\\\t<primitive: 'primGetModuleName'>\\\\n\\\\t^ 'Hello World!!'! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'test methods' stamp: 'md 9/6/2005 19:39'!\\\\ncFailedCall\\\\n\\\\t<primitive: 'primGetModuleName' module:'CFailModule'>\\\\n\\\\t^ 'failed call'! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'test methods' stamp: 'sr 6/7/2004 09:48'!\\\\ncNoExternalCall\\\\n\\\\t^ 'Hello World!!'! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'test methods' stamp: 'sr 6/13/2004 21:14'!\\\\ncRealExternalCall\\\\n\\\\t<primitive: 'primGetModuleName' module:'LargeIntegers'>\\\\n\\\\t^ 'Hello World!!'! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'test methods' stamp: 'sr 6/13/2004 21:14'!\\\\ncRealExternalCallNaked\\\\n\\\\t<primitive: 'primGetModuleName' module:'LargeIntegers'>! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'test methods' stamp: 'md 9/6/2005 19:39'!\\\\ncRealExternalCallOrPrimitiveFailed\\\\n\\\\t<primitive: 'primGetModuleName' module:'LargeIntegers'>\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'test methods' stamp: 'sr 6/15/2004 04:35'!\\\\ncSingularExternalCall\\\\n\\\\t<primitive: 'cSingularExternalCall' module:'COne'>\\\\n\\\\t^ 'Hello World!!'! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPCCByCompilationTest class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PCCByCompilationTest class methodsFor: 'Testing' stamp: 'sr 6/7/2004 12:01'!\\\\nisAbstract\\\\n\\\\t^ false! !\\\\nPrimCallControllerAbstract subclass: #PCCByLiterals\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Tests-PrimCallController'!\\\\n!PCCByLiterals commentStamp: 'sr 6/16/2004 09:14' prior: 0!\\\\nThis class is for switching external prim calls (primitiveExternalCall) on and off.\\\\n\\\\nIt is best suited for plugin testing purposes with temporarily switching plugin calls off and on. For permanently switching plugin calls off while preserving the possibility to switch them on later, you should use PCCByCompilation instead.\\\\n\\\\nIt works by manipulating literals in the CompiledMethods:\\\\n\\\\tDisabling works by changing the function index in the first literal of the CompiledMethod to a negative value (-2). This leads to a fast fail (value -2 is used for disabling to make a difference to the standard failed value of -1).\\\\n\\\\tEnabling works by changing the function index in the first literal of the CompiledMethod to 0, followed by flushing the method cache. This enforces a fresh lookup.\\\\n\\\\nPlease look into superclass PrimCallControllerAbstract for more info and the user interface.\\\\n\\\\nStructure:\\\\n No instVars here: look into superclass.!\\\\n]style[(136 11 40 11 101 16 10 1 9 2 14 8 26 9 224 8 157 28 26 91)f2FAccuny#12,f2FAccuny#12i,f2FAccuny#12,f2FAccuny#12i,f2FAccuny#12,f2LPCCByCompilation Comment;,f2FAccuny#12,f2,f2FAccuny#12,f2FAccuny#12b,f2FAccuny#12,f2FAccuny#12b,f2FAccuny#12,f2FAccuny#12i,f2FAccuny#12,f2FAccuny#12i,f2FAccuny#12,f2,f2LPrimCallControllerAbstract Comment;,f2!\\\\n\\\\n\\\\n!PCCByLiterals methodsFor: 'ui querying' stamp: 'sr 6/11/2004 07:04'!\\\\nextractCallModuleNames: aMethodRef \\\\n\\\\t^ (self existsCallIn: aMethodRef)\\\\n\\\\t\\\\tifTrue: [self extractCallModuleNamesFromLiterals: aMethodRef]! !\\\\n\\\\n!PCCByLiterals methodsFor: 'ui querying' stamp: 'sr 6/11/2004 07:05'!\\\\nmethodsWithCall\\\\n\\\\t^ self methodsWithCompiledCall! !\\\\n\\\\n!PCCByLiterals methodsFor: 'ui querying' stamp: 'sr 6/14/2004 21:24'!\\\\nmethodsWithDisabledCall\\\\n\\\\t^ self methodsWithCompiledCall\\\\n\\\\t\\\\tselect: [:mRef | (mRef compiledMethod literals first at: 4)\\\\n\\\\t\\\\t\\\\t\\\\t= -2]! !\\\\n\\\\n\\\\n!PCCByLiterals methodsFor: 'ui testing' stamp: 'sr 6/11/2004 07:04'!\\\\nexistsCallIn: aMethodRef \\\\n\\\\t\\\\\\\"Here >>existsCompiledCallIn: (see also comment there) is sufficient to \\\\n\\\\tquery for all enabled, failed and disabled prim calls; for the by \\\\n\\\\tcompiler version it is not sufficient for disabled ones.\\\\\\\"\\\\n\\\\t^ self existsCompiledCallIn: aMethodRef! !\\\\n\\\\n!PCCByLiterals methodsFor: 'ui testing' stamp: 'sr 6/11/2004 07:30'!\\\\nexistsDisabledCallIn: aMethodRef \\\\n\\\\t^ (self existsCompiledCallIn: aMethodRef)\\\\n\\\\t\\\\tand: [(aMethodRef compiledMethod literals first at: 4)\\\\n\\\\t\\\\t\\\\t\\\\t= -2]! !\\\\n\\\\n\\\\n!PCCByLiterals methodsFor: 'private user interface' stamp: 'sr 6/14/2004 01:35'!\\\\nprivateDisableCallIn: aMethodRef \\\\n\\\\t\\\\\\\"Disables enabled or failed external prim call by filling function ref \\\\n\\\\tliteral with special fail value, will be called by superclass.\\\\\\\"\\\\n\\\\taMethodRef compiledMethod literals first at: 4 put: -2! !\\\\n\\\\n!PCCByLiterals methodsFor: 'private user interface' stamp: 'sr 6/14/2004 02:07'!\\\\nprivateEnableCallIn: aMethodRef\\\\n\\\\t\\\\\\\"Enables disabled external prim call.\\\\\\\"\\\\n\\\\tself privateEnableViaLiteralIn: aMethodRef! !\\\\nPrimCallControllerAbstractTest subclass: #PCCByLiteralsTest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Tests-PrimCallController'!\\\\n!PCCByLiteralsTest commentStamp: 'sr 6/14/2004 22:05' prior: 0!\\\\nPCCByLiterals tests.\\\\n\\\\nTests are in the superclass and inherited from there.!\\\\n\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'constants' stamp: 'sr 6/11/2004 05:23'!\\\\nclassToBeTested\\\\n\\\\t^ PCCByLiterals! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'constants' stamp: 'sr 6/7/2004 10:37'!\\\\ndisabledCallSelectors\\\\n\\\\t^ #(#lDisabledRealExternalCall #lDisabledRealExternalCallNaked #lDisabledRealExternalCallOrPrimitiveFailed #lDisabledExternalCallWithoutModule )! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'constants' stamp: 'sr 6/7/2004 10:34'!\\\\nenabledCallSelectors\\\\n\\\\t^ #(#lRealExternalCall #lRealExternalCallNaked #lRealExternalCallOrPrimitiveFailed #lExternalCallWithoutModule )! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'constants' stamp: 'sr 6/7/2004 08:45'!\\\\nexampleModuleName\\\\n\\\\t^ 'LPCCT'! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'constants' stamp: 'sr 6/15/2004 02:42'!\\\\nfailModuleName\\\\n\\\\t^ 'LFailModule'! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'constants' stamp: 'sr 6/14/2004 00:12'!\\\\nfailedCallSelector\\\\n\\\\t^ #lFailedCall! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'constants' stamp: 'sr 6/7/2004 08:41'!\\\\nmethodSelectorsToExampleModule\\\\n\\\\t^ #(#lExternalCall1 #lExternalCall2 )! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'constants' stamp: 'sr 6/7/2004 08:47'!\\\\nmoduleNameNotWithSingularCallName\\\\n\\\\t^ 'LNotOne'! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'constants' stamp: 'sr 6/7/2004 08:47'!\\\\nmoduleNameWithSingularCallName\\\\n\\\\t^ 'LOne'! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'constants' stamp: 'sr 6/7/2004 10:16'!\\\\nnoExternalCallSelector\\\\n\\\\t^ #lNoExternalCall! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'constants' stamp: 'sr 6/7/2004 10:29'!\\\\nrealExternalCallOrPrimitiveFailedSelector\\\\n\\\\t^ #lRealExternalCallOrPrimitiveFailed! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'constants' stamp: 'sr 6/7/2004 10:54'!\\\\nsingularCallName\\\\n\\\\t\\\\\\\"occurrs exactly once as prim call name in >>lSingularExternalCall\\\\\\\"\\\\n\\\\t^ 'lSingularExternalCall'! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'constants' stamp: 'sr 6/14/2004 23:32'!\\\\nsingularCallSelector\\\\n\\\\t^ #lSingularExternalCall! !\\\\n\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'example module' stamp: 'sr 6/7/2004 08:39'!\\\\nlExternalCall1\\\\n\\\\t<primitive: 'prim1' module: 'LPCCT'>\\\\n! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'example module' stamp: 'sr 6/7/2004 08:39'!\\\\nlExternalCall2\\\\n\\\\t\\\\t<primitive:'prim2'module:'LPCCT'>\\\\n\\\\t\\\\tself primitiveFailed! !\\\\n\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'test methods' stamp: 'sr 6/7/2004 08:51'!\\\\nlDisabledExternalCallWithoutModule\\\\n\\\\t<primitive: 'primGetModuleName'>\\\\n\\\\t^ 'Hello World!!'! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'test methods' stamp: 'sr 6/13/2004 21:14'!\\\\nlDisabledRealExternalCall\\\\n\\\\t<primitive: 'primGetModuleName' module:'LargeIntegers'>\\\\n\\\\t^ 'Hello World!!'! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'test methods' stamp: 'sr 6/13/2004 21:14'!\\\\nlDisabledRealExternalCallNaked\\\\n\\\\t<primitive: 'primGetModuleName' module:'LargeIntegers'>! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'test methods' stamp: 'sr 6/13/2004 21:14'!\\\\nlDisabledRealExternalCallOrPrimitiveFailed\\\\n\\\\t<primitive: 'primGetModuleName' module:'LargeIntegers'> \\\\\\\"primitiveExternalCall\\\\\\\" \\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'test methods' stamp: 'sr 6/7/2004 09:59'!\\\\nlExternalCallWithoutModule\\\\n\\\\t<primitive: 'primGetModuleName'> \\\\\\\"primitiveExternalCall\\\\\\\" \\\\n\\\\t^ 'Hello World!!'! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'test methods' stamp: 'sr 6/15/2004 02:41'!\\\\nlFailedCall\\\\n\\\\t<primitive: 'primGetModuleName' module:'LFailModule'>\\\\n\\\\t^ 'failed call'! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'test methods' stamp: 'sr 6/7/2004 09:57'!\\\\nlNoExternalCall\\\\n\\\\t^ 'Hello World!!'! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'test methods' stamp: 'sr 6/13/2004 21:14'!\\\\nlRealExternalCall\\\\n\\\\t<primitive: 'primGetModuleName' module:'LargeIntegers'>\\\\n\\\\t^ 'Hello World!!'! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'test methods' stamp: 'sr 6/13/2004 21:14'!\\\\nlRealExternalCallNaked\\\\n\\\\t<primitive: 'primGetModuleName' module:'LargeIntegers'>! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'test methods' stamp: 'sr 6/13/2004 21:14'!\\\\nlRealExternalCallOrPrimitiveFailed\\\\n\\\\t<primitive: 'primGetModuleName' module:'LargeIntegers'>\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'test methods' stamp: 'sr 6/7/2004 10:52'!\\\\nlSingularExternalCall\\\\n\\\\t<primitive: 'lSingularExternalCall' module:'LOne'>\\\\n\\\\t^ 'Hello World!!'! !\\\\n\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'tests' stamp: 'sr 6/7/2004 11:30'!\\\\nsetUp\\\\n\\\\tsuper setUp.\\\\n\\\\t\\\\\\\"disable external calls\\\\\\\"\\\\n\\\\t(self class selectors\\\\n\\\\t\\\\tselect: [:sel | sel beginsWith: 'lDisabled'])\\\\n\\\\t\\\\tdo: [:sel | (self class >> sel) literals first at: 4 put: -2]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPCCByLiteralsTest class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PCCByLiteralsTest class methodsFor: 'Testing' stamp: 'sr 6/7/2004 12:01'!\\\\nisAbstract\\\\n\\\\t^ false! !\\\\nImageReadWriter subclass: #PCXReadWriter\\\\n\\\\tinstanceVariableNames: 'version encoding colorPlanes isGrayScale width height bitsPerPixel colorPalette rowByteSize'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Graphics-Files'!\\\\n\\\\n!PCXReadWriter methodsFor: 'accessing' stamp: 'tao 10/6/97 10:11'!\\\\nnextImage\\\\n\\\\t\\\\\\\"Read in the next PCX image from the stream.\\\\\\\"\\\\n\\\\n\\\\t| bytes form |\\\\n\\\\tself readHeader.\\\\n\\\\tbytes _ self readBody.\\\\n\\\\tcolorPalette _ self readPalette.\\\\n\\\\tself close.\\\\n\\\\tform _ ColorForm extent: width@height depth: bitsPerPixel.\\\\n\\\\t(Form new hackBits: bytes) displayOn: (Form new hackBits: form bits).\\\\n\\\\tform colors: colorPalette.\\\\n\\\\t^ form\\\\n! !\\\\n\\\\n\\\\n!PCXReadWriter methodsFor: 'private-decoding' stamp: 'tao 10/6/97 08:38'!\\\\nnextWord\\\\n\\\\t^self next + (self next bitShift: 8)! !\\\\n\\\\n!PCXReadWriter methodsFor: 'private-decoding' stamp: 'tao 10/6/97 10:07'!\\\\nreadBody\\\\n\\\\n\\\\t| array scanLine rowBytes position byte count pad |\\\\n\\\\tpad _ #(0 3 2 1) at: (width \\\\\\\\\\\\\\\\ 4 + 1).\\\\n\\\\tarray _ ByteArray new: ((width + pad) * height * bitsPerPixel) // 8.\\\\n\\\\tscanLine _ ByteArray new: rowByteSize.\\\\n\\\\tposition _ 1.\\\\n\\\\t1 to: height do:\\\\n\\\\t\\\\t[:line |\\\\n\\\\t\\\\trowBytes _ 0.\\\\n\\\\t\\\\t[rowBytes < rowByteSize] whileTrue:\\\\n\\\\t\\\\t\\\\t[byte _ self next.\\\\n\\\\t\\\\t\\\\tbyte < 16rC0\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[rowBytes _ rowBytes + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tscanLine at: rowBytes put: byte]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[count _ byte - 16rC0.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbyte _ self next.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t1 to: count do: [:i | scanLine at: rowBytes + i put: byte].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\trowBytes _ rowBytes + count]].\\\\n\\\\t\\\\tarray\\\\n\\\\t\\\\t\\\\treplaceFrom: position\\\\n\\\\t\\\\t\\\\tto: position + width - 1\\\\n\\\\t\\\\t\\\\twith: scanLine\\\\n\\\\t\\\\t\\\\tstartingAt: 1.\\\\n\\\\t\\\\tposition _ position + width + pad].\\\\n\\\\t^ array\\\\n! !\\\\n\\\\n!PCXReadWriter methodsFor: 'private-decoding' stamp: 'md 11/14/2003 16:51'!\\\\nreadHeader\\\\n\\\\n\\\\t| xMin xMax yMin yMax |\\\\n\\\\tself next.\\\\t\\\\\\\"skip over manufacturer field\\\\\\\"\\\\n\\\\tversion _ self next.\\\\n\\\\tencoding _ self next.\\\\n\\\\tbitsPerPixel _ self next.\\\\n\\\\txMin _ self nextWord.\\\\n\\\\tyMin _ self nextWord.\\\\n\\\\txMax _ self nextWord.\\\\n\\\\tyMax _ self nextWord.\\\\n\\\\twidth _ xMax - xMin + 1.\\\\n\\\\theight _ yMax - yMin + 1.\\\\n\\\\tself next: 4. \\\\\\\"skip over device resolution\\\\\\\"\\\\n\\\\tself next: 49. \\\\\\\"skip over EGA color palette\\\\\\\"\\\\n\\\\tcolorPlanes _ self next.\\\\n\\\\trowByteSize _ self nextWord.\\\\n\\\\tisGrayScale _ (self next: 2) = 2.\\\\n\\\\tself next: 58. \\\\\\\"skip over filler\\\\\\\"\\\\n\\\\n\\\\n\\\\n! !\\\\n\\\\n!PCXReadWriter methodsFor: 'private-decoding' stamp: 'tao 10/6/97 08:29'!\\\\nreadPalette\\\\n\\\\n\\\\t| r g b array |\\\\n\\\\tself next = 12 ifFalse: [self error: 'no Color Palette!!'].\\\\n\\\\tarray _ Array new: (1 bitShift: bitsPerPixel).\\\\n\\\\t1 to: array size do:\\\\n\\\\t\\\\t[:i |\\\\n\\\\t\\\\tr _ self next.  g _ self next.  b _ self next.\\\\n\\\\t\\\\tarray at: i put: (Color r: r g: g b: b range: 255)].\\\\n\\\\t^ array.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPCXReadWriter class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PCXReadWriter class methodsFor: 'image reading/writing' stamp: 'nk 7/16/2003 17:57'!\\\\ntypicalFileExtensions\\\\n\\\\t\\\\\\\"Answer a collection of file extensions (lowercase) which files that I can read might commonly have\\\\\\\"\\\\n\\\\t^#('pcx')! !\\\\nObject subclass: #PHOReader\\\\n\\\\tinstanceVariableNames: 'stream phonemes events pitches time'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Speech-Support'!\\\\n!PHOReader commentStamp: '<historical>' prior: 0!\\\\nMy instances read PHO files with lines of the form 'phoneme duration time0 pitch0 time1 pitch1 ...'. Time is in milliseconds, and pitch is in hertz. Files on this format are used as inputs for the MBROLA synthesizer, and there are lots of them available on the web. Here's an example:\\\\n\\\\n_  120 0 105\\\\nm  60 33 105\\\\nE  70 42 102\\\\nr  50 20 108\\\\nI  50 20 125 100 142\\\\nk  100\\\\nr  50 80 137\\\\nI  50 80 121\\\\ns  70\\\\nm  50\\\\n@  90 33 111 88 108\\\\ns  90\\\\n!\\\\n\\\\n\\\\n!PHOReader methodsFor: 'accessing' stamp: 'stephaneducasse 2/3/2006 22:22'!\\\\naddPitches\\\\n\\\\t| offset |\\\\n\\\\toffset := 0.0.\\\\n\\\\tevents do: [ :each |\\\\n\\\\t\\\\teach pitchPoints: (self pitchesBetween: offset and: offset + each duration).\\\\n\\\\t\\\\toffset := offset + each duration].! !\\\\n\\\\n!PHOReader methodsFor: 'accessing' stamp: 'len 8/29/1999 02:16'!\\\\nevents\\\\n\\\\t^ CompositeEvent new addAll: events; yourself! !\\\\n\\\\n!PHOReader methodsFor: 'accessing' stamp: 'stephaneducasse 2/3/2006 22:22'!\\\\nnextEvent\\\\n\\\\t| line phonemeName phoneme duration answer ptime pitch |\\\\n\\\\tline := ReadStream on: stream nextLine.\\\\n\\\\tphonemeName := line upTo: Character space.\\\\n\\\\tphoneme := phonemes at: phonemeName.\\\\n\\\\t[line peek isSeparator] whileTrue: [line next].\\\\n\\\\tduration := (line upTo: Character space) asNumber / 1000.0.\\\\n\\\\tanswer := PhoneticEvent new phoneme: phoneme; duration: duration; loudness: 1.0.\\\\n\\\\t[line atEnd]\\\\n\\\\t\\\\twhileFalse: [ptime := (line upTo: Character space) asNumber * duration / 100.0.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpitch := (line upTo: Character space) asNumber asFloat.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpitches add: time + ptime @ pitch].\\\\n\\\\ttime := time + duration.\\\\n\\\\t^ answer! !\\\\n\\\\n!PHOReader methodsFor: 'accessing' stamp: 'stephaneducasse 2/3/2006 22:22'!\\\\npitchAt: t\\\\n\\\\t\\\\\\\"Answer the pitch of the receiver at a given time. (Do linear interpolation.)\\\\\\\"\\\\n\\\\t| xVal count x1 x2 y1 y2 |\\\\n\\\\txVal := pitches first x.\\\\n\\\\tcount := 1.\\\\n\\\\t[xVal < t]\\\\n\\\\t\\\\twhileTrue: [count := count + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcount > pitches size ifTrue: [^ pitches last y].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\txVal := (pitches at: count) x].\\\\n\\\\txVal = t ifTrue: [^ (pitches at: count) y].\\\\n\\\\tcount = 1 ifTrue: [^ pitches first y].\\\\n\\\\tx1 := (pitches at: count - 1) x.\\\\n\\\\tx2 := (pitches at: count) x.\\\\n\\\\ty1 := (pitches at: count - 1) y.\\\\n\\\\ty2 := (pitches at: count) y.\\\\n\\\\t^ (t - x1) / (x2 - x1) * (y2 - y1) + y1! !\\\\n\\\\n!PHOReader methodsFor: 'accessing' stamp: 'stephaneducasse 2/3/2006 22:22'!\\\\npitchesBetween: t1 and: t2\\\\n\\\\t| step |\\\\n\\\\tstep := (t2 - t1 / 0.035) asInteger + 1. \\\\\\\"step small enough\\\\\\\"\\\\n\\\\t^ (t1 to: t2 by: t2 - t1 / step) collect: [ :each | each - t1 @ (self pitchAt: each)]! !\\\\n\\\\n!PHOReader methodsFor: 'accessing' stamp: 'len 6/17/1999 01:45'!\\\\nplotPitch\\\\n\\\\tUtilities plot: ((0 to: time by: 0.050) collect: [ :each | self pitchAt: each])! !\\\\n\\\\n!PHOReader methodsFor: 'accessing' stamp: 'len 6/15/1999 00:40'!\\\\nread\\\\n\\\\tstream reset.\\\\n\\\\t[stream atEnd] whileFalse: [events add: self nextEvent].\\\\n\\\\tself addPitches! !\\\\n\\\\n!PHOReader methodsFor: 'accessing' stamp: 'stephaneducasse 2/3/2006 22:22'!\\\\nstream: aStream\\\\n\\\\tstream := aStream! !\\\\n\\\\n\\\\n!PHOReader methodsFor: 'initialization' stamp: 'stephaneducasse 2/3/2006 22:22'!\\\\ninitialize\\\\n\\\\tevents := OrderedCollection new.\\\\n\\\\tpitches := OrderedCollection new.\\\\n\\\\ttime := 0.0.\\\\n\\\\tphonemes := PhonemeSet sampaToArpabet! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPHOReader class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PHOReader class methodsFor: 'examples' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\naliceExample\\\\n\\\\t| events |\\\\n\\\\tevents := self eventsFromString: self aliceExampleString.\\\\n\\\\tevents do: [ :each | each pitchBy: 0.63489].\\\\n\\\\t^ events! !\\\\n\\\\n!PHOReader class methodsFor: 'examples' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\naliceExampleFemale\\\\n\\\\t| events |\\\\n\\\\tevents := self eventsFromString: self aliceExampleString.\\\\n\\\\tevents do: [ :each | each pitchBy: 1.3].\\\\n\\\\t^ events! !\\\\n\\\\n!PHOReader class methodsFor: 'examples' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\naliceExampleMale\\\\n\\\\t| events |\\\\n\\\\tevents := self eventsFromString: self aliceExampleString.\\\\n\\\\tevents do: [ :each | each pitchBy: 0.63489].\\\\n\\\\t^ events! !\\\\n\\\\n!PHOReader class methodsFor: 'examples' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\naliceShortExample\\\\n\\\\t| events |\\\\n\\\\tevents := self eventsFromString: self aliceShortExampleString.\\\\n\\\\tevents do: [ :each | each pitchBy: 1.3].\\\\n\\\\t^ events! !\\\\n\\\\n!PHOReader class methodsFor: 'examples' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\naliceShortExampleMale\\\\n\\\\t| events |\\\\n\\\\tevents := self eventsFromString: self aliceShortExampleString.\\\\n\\\\tevents do: [ :each | each pitchBy: 0.4].\\\\n\\\\t^ events! !\\\\n\\\\n!PHOReader class methodsFor: 'examples' stamp: 'len 7/27/1999 01:47'!\\\\nmbrolaExample\\\\n\\\\t^ self eventsFromString:\\\\n'_ 50\\\\nE 40 0 102\\\\nm 50\\\\nb 50\\\\nr 30\\\\n@U 80 5 119 35 126 70 140\\\\nl 50\\\\n@ 50 50 173\\\\nw 100 75 133\\\\nV 30 85 114\\\\nz 60 75 101\\\\nd 60\\\\n@ 40\\\\nv 40 85 105\\\\nE 60 75 121\\\\nl 50 70 121\\\\n@ 60 60 150\\\\np 50\\\\nd 70\\\\nb 70 0 90\\\\nAI 130 85 101\\\\nT 70\\\\nj 50 0 180\\\\nE 120 0 185 95 131\\\\nr 40\\\\ni 90 85 135\\\\nd 80 60 134\\\\n@ 50 0 119 50 114\\\\nt 70\\\\nw 70 10 117 65 127 85 115\\\\nA 180 0 102 55 91 95 85\\\\n_ 100\\\\n_ 100\\\\nI 80 18 111\\\\nt 80\\\\ns 50\\\\n@ 30\\\\ns 70\\\\np 80\\\\ni 80 25 171 85 200\\\\ntS 110\\\\ns 70\\\\nI 30 35 112\\\\nn 40\\\\nT 80\\\\n@ 40 85 108\\\\ns 80\\\\nAI 130 80 115\\\\nz 70 90 125\\\\nr= 120 75 111\\\\nb 80\\\\nEI 80 95 133\\\\nz 70\\\\nd 50\\\\nA 40\\\\nn 30\\\\nD 60\\\\n@ 30 65 121\\\\nk 90\\\\nA 30\\\\nn 30 100 140\\\\nk 80\\\\n{ 70 5 170\\\\nt 70\\\\n@ 40 50 186\\\\nn 40 75 163\\\\nEI 100 90 173\\\\nS 130\\\\n@ 40\\\\nn 30 65 153\\\\nV 40\\\\nv 70 0 148\\\\nd 60\\\\nAI 130 5 112 80 109\\\\nf 110\\\\n@U 160 87 88\\\\nn 70\\\\nz 210 88 82\\\\n_ 80\\\\n_ 100\\\\nI 40 0 140\\\\nt 50\\\\nt 100\\\\nEI 60 50 221\\\\nk 70\\\\ns 80\\\\n@ 30 0 190\\\\nl 50\\\\nI 30 65 180\\\\ns 110\\\\nt 70\\\\nV 50 20 171\\\\nv 50\\\\nf 90\\\\n@U 140 25 157\\\\nn 30\\\\ni 60 66 160\\\\nm 50 60 130\\\\nz 80\\\\n@ 40 62 78\\\\nz 80\\\\nI 70 78 134\\\\nn 50 70 163\\\\np 120\\\\nU 90 15 119 75 98\\\\nt 90\\\\n_ 140\\\\n_ 100\\\\nt 60 0 111\\\\nu 50 80 119\\\\ng 70\\\\nE 50 90 145\\\\nD 50\\\\nr= 50 40 139 90 163\\\\nw 90\\\\nI 30 15 114\\\\nD 50\\\\n_ 40\\\\np 50\\\\nr 30 0 102\\\\n@ 30 65 110\\\\ns 120\\\\nA 50 90 148\\\\nd 80\\\\nI 50 50 178\\\\nk 80\\\\nI 50 66 167\\\\nn 60\\\\nf 50\\\\nr= 50 90 125\\\\nm 50\\\\nEI 140 95 96\\\\nS 140\\\\n@ 80 35 168\\\\nn 100 95 142\\\\n_ 190\\\\n{ 90 0 133\\\\nn 30\\\\nd 30\\\\np 80\\\\nr 40\\\\n@ 40 0 97 65 103\\\\nd 70\\\\nj 20\\\\nu 60 65 150\\\\ns 90\\\\nI 30 50 210\\\\nz 50\\\\ns 140\\\\np 70\\\\ni 130 0 138 95 98\\\\ntS 160\\\\n{ 70 0 127\\\\nt 50\\\\nD 50\\\\n@ 30 15 93\\\\ns 140\\\\n{ 30 35 127\\\\nm 50\\\\np 70\\\\nl 50\\\\nI 30 35 184\\\\nN 70\\\\nf 70\\\\nr 60\\\\ni 90 30 125\\\\nk 40\\\\nw 30\\\\n@ 30 15 185\\\\nn 30\\\\ns 100\\\\ni 50 20 148 70 142\\\\nV 30 5 148\\\\nv 40\\\\nD 80\\\\n@ 40 25 106\\\\nd 80\\\\nAI 150 95 115\\\\nf 90\\\\n@U 130 95 114\\\\nn 70\\\\nd 80\\\\nEI 80 80 137\\\\n4 50\\\\n@ 30\\\\nb 100\\\\nEI 120 95 78\\\\ns 210\\\\n_ 80'! !\\\\n\\\\n!PHOReader class methodsFor: 'examples' stamp: 'len 7/27/1999 01:48'!\\\\npushExample\\\\n\\\\t^ self eventsFromString:\\\\n'_  60 0 137\\\\np  50 100 137\\\\nu  110 90 137\\\\nS  100 10 121\\\\nD  90\\\\n@  70 57 114 100 102\\\\ns  70\\\\nt  50\\\\nA 100 57 121 64 121\\\\nr 40\\\\nt  50\\\\nb  110\\\\nV  140 21 117 57 100 92 100\\\\n_ 3\\\\nn  130 25 102 50 105\\\\nt  60\\\\nu  70 28 129 71 111\\\\nb  70\\\\ni  70 50 102\\\\ng  20 10 100 80 102\\\\ni  130 25 117 66 114\\\\nn  260 3 111 23 105 42 97 61 93 73 93\\\\n_  140 92 93 100 100'! !\\\\n\\\\n!PHOReader class methodsFor: 'examples' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\npushExampleFemale\\\\n\\\\t| events |\\\\n\\\\tevents := self pushExample.\\\\n\\\\tevents do: [ :each | each pitchBy: 1.93489].\\\\n\\\\t^ events! !\\\\n\\\\n!PHOReader class methodsFor: 'examples' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\npushShortExample\\\\n\\\\t^ self eventsFromString:\\\\n'i  70 50 102\\\\ng  20 10 100 80 102\\\\ni  130 25 117 66 114\\\\nn  260 3 111 23 105 42 97 61 93 73 93'.\\\\n\\\\\\\"\\\\n':= 3\\\\nn  130 25 102 50 105\\\\nt  60\\\\nu  70 28 129 71 111\\\\nb  70\\\\ni  70 50 102\\\\ng  20 10 100 80 102\\\\ni  130 25 117 66 114\\\\nn  260 3 111 23 105 42 97 61 93 73 93\\\\n:=  140 92 93 100 100'\\\\\\\"! !\\\\n\\\\n!PHOReader class methodsFor: 'examples' stamp: 'len 7/27/1999 01:48'!\\\\nxmasExample\\\\n\\\\t^ self eventsFromString:\\\\n'_  120 0 105\\\\nm  60 33 105\\\\nE  70 42 102\\\\nr  50 20 108\\\\nI  50 20 125 100 142\\\\nk  100\\\\nr  50 80 137\\\\nI  50 80 121\\\\ns  70\\\\nm  50\\\\n@  90 33 111 88 108\\\\ns  90\\\\n{  70\\\\nn  100 50 105 100 97\\\\nd  50 80 93\\\\nh  50 20 93\\\\n{  50 20 102 60 114\\\\np  50\\\\ni  50 100 125\\\\nn  60 83 121\\\\nu 100\\\\nj  130 7 121 23 121 100 108\\\\nr=  250 41 102 83 97\\\\n_  210 95 86 100 100'\\\\n! !\\\\n\\\\n!PHOReader class methodsFor: 'examples' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\nxmasKidExample\\\\n\\\\t| events |\\\\n\\\\tevents := self xmasExample.\\\\n\\\\tevents do: [ :each | each pitchBy: 1.6].\\\\n\\\\t^ events! !\\\\n\\\\n\\\\n!PHOReader class methodsFor: 'examples-private' stamp: 'len 7/27/1999 01:45'!\\\\naliceExampleString\\\\n\\\\t^ '_ 48 0 222\\\\n{ 80 40 222 90 235\\\\nl 72 44 250 66 250\\\\nI 80\\\\ns 88\\\\nw 40 80 235\\\\n@ 40 80 210\\\\nz 64 12 210 50 181 75 181\\\\nb 72 33 173 88 181\\\\nI 56 71 181\\\\ng 56 28 153 100 166\\\\nI 64 62 160\\\\nn 40 60 160\\\\nI 88 27 166\\\\nN 40 100 166\\\\nt 80 20 160\\\\nU 40 40 181 80 166\\\\ng 48 100 166\\\\nE 104 38 153 76 137\\\\nt 56\\\\nv 48\\\\nE 72 11 166 66 153\\\\nr 88 18 160 63 166\\\\ni 112.8 14 166 49 173 77 173\\\\nt 104.8 98 137\\\\nAI 178.4 21 148 70 148 92 137\\\\nr= 108 25 137 62 133 98 129\\\\nd 49\\\\n@ 59.2 6 137 73 133\\\\nv 46\\\\ns 89\\\\nI 40 40 173\\\\nt 40 40 166\\\\nI 64 62 166\\\\nN 72 22 160 77 153\\\\nb 40 40 142 100 153\\\\nAI 136 29 142\\\\nh 80 30 142 100 148\\\\nr= 64 62 153 100 153\\\\ns 125\\\\nI 64 37 210 100 190\\\\ns 72 11 190\\\\nt 72\\\\nr= 104 30 160 69 142\\\\nO 72\\\\nn 40 40 142\\\\nD 40 40 153\\\\n@ 40 40 160\\\\nb 40 40 153 100 160\\\\n{ 216 18 166 51 166 70 153 88 137 100 133\\\\nn 40\\\\nk 56\\\\n_ 144 94 129 100 100\\\\n_ 100 0 137\\\\n{ 40\\\\nn 88 9 137 36 137 72 142\\\\nt 40 40 137 60 133\\\\n@ 48 16 148 100 148\\\\nh 40 100 142\\\\n{ 48 83 148\\\\nv 48 16 142\\\\nI 56 14 148 85 137\\\\nN 56 71 137\\\\nn 64 37 137 100 142\\\\nO 96 41 137 83 153 100 153\\\\nT 64\\\\nI 56 42 166\\\\nN 64 12 160 75 153\\\\nt 80 30 142\\\\n@ 56 28 166 100 148\\\\nd 56 71 137\\\\nu 160 15 160 45 160 70 153 95 142\\\\nw 136 23 137 58 137 88 148\\\\nA 112 21 153 57 160 92 173\\\\nn 64 50 166 62 153\\\\ns 56\\\\nO 48 50 153\\\\nr 40 40 142 100 133\\\\nt 130\\\\nw 56 57 166\\\\nAI 168 9 173 33 166 57 153 80 148 100 148\\\\ns 88\\\\n_ 300\\\\nS 92\\\\ni 48 50 235\\\\nh 40 40 235 100 250\\\\n@ 40 60 210 100 210\\\\nd 40\\\\np 40\\\\ni 150\\\\nk 56\\\\nd 56\\\\nI 72 44 222 100 210\\\\nn 40 80 210\\\\nt 56\\\\n@ 48 83 181\\\\nD 40 39 173 99 173\\\\n@ 39.2 100 160\\\\nb 104 30 153 100 153\\\\nU 112 35 153 85 153 100 153\\\\nk 72\\\\nh 56\\\\nr= 48 50 200\\\\ns 136 5 181\\\\nI 64 25 166 87 142\\\\ns 56 14 137\\\\nt 56\\\\nr= 56 28 173 100 173\\\\nw 56 71 166\\\\n@ 56 42 181\\\\nz 48 16 181 50 173\\\\nr 120 73 181\\\\ni 104 7 190 69 190 100 181\\\\nd 40\\\\nI 112 7 166 50 137 85 129\\\\nN 80 30 114 50 111\\\\n_ 56 83 111 100 100\\\\n_ 140 0 153\\\\nb 40 60 153 100 153\\\\nU 64 75 148\\\\n4 40 80 148 100 142\\\\nI 40\\\\nt 40 40 148\\\\nh 40 40 142\\\\n{ 48 33 137\\\\nd 136 5 133 11 129 88 148\\\\nn 48 66 148\\\\n@U 144 16 160 44 173 72 190 100 210\\\\np 80\\\\nI 96 75 190 100 181\\\\nk 56\\\\ntS 96\\\\nr= 104 30 190 69 181\\\\nz 72 11 181 33 173\\\\nO 40 60 173\\\\nr 64 37 160 100 153\\\\nk 72 11 153\\\\nO 152 63 190 89 200\\\\nn 40 60 181\\\\nv 40 60 166\\\\nr= 40 60 160\\\\ns 104 15 142\\\\nEI 120 20 190 53 190 86 210\\\\nS 104 7 210\\\\n@ 56 28 181 100 160\\\\nn 64 62 153 100 137\\\\nz 40\\\\nI 56 14 148 85 133\\\\nn 40 100 133\\\\nI 96 41 129 83 125\\\\nt 80\\\\n_ 64 85 125 100 100\\\\n_ 140 0 222\\\\n{ 56 14 222 28 220 42 235 85 235 100 220\\\\nn 96 33 222 75 235 100 235\\\\nw 48 33 222 66 250\\\\nO 90\\\\n4 48 50 222 66 252\\\\nI 48 33 250\\\\nz 64 12 235 62 210\\\\nD 56\\\\n@ 56 71 190\\\\nj 104 23 166 61 166 100 181\\\\nu 112 35 190 42 210 71 210 100 210\\\\ns 150\\\\n@ 56 42 200\\\\nv 40 20 160 60 148\\\\n@ 64 25 153 87 142\\\\nb 136 23 133 47 137\\\\nU 96 8 160 50 173 91 181 100 181\\\\nk 56\\\\n_ 56\\\\nT 56\\\\nO 119.2 20 166 53 142 80 137\\\\n4 40 20 133\\\\n{ 136 5 137 35 129 64 125\\\\nl 48 16 125 100 133\\\\nI 80 50 153 100 181\\\\ns 120\\\\n_ 40\\\\n_ 40\\\\nw 88 9 166 54 142\\\\nI 40 40 142\\\\nD 40 40 137\\\\naU 62.4 38 137 63 133\\\\nt 80\\\\np 55\\\\nI 72 16 210 38 210\\\\nk 40\\\\ntS 75.2 99 173\\\\nr= 136 29 160 64 160 76 166\\\\nz 48\\\\nO 44 90 185\\\\nr 60 6 198 46 200 72 190\\\\nk 40\\\\nO 81.6 12 148 61 133\\\\nn 40 20 133\\\\nv 48 33 133\\\\nr= 56 28 181 100 181\\\\ns 120 6 173\\\\nEI 136 11 222 41 210 94 210\\\\nS 120\\\\n@ 128 12 190 43 148 75 137\\\\nn 64 12 129 50 125\\\\n_ 80 88 125 100 100'! !\\\\n\\\\n!PHOReader class methodsFor: 'examples-private' stamp: 'len 7/27/1999 01:46'!\\\\naliceShortExampleString\\\\n\\\\t^ '_ 48 0 222\\\\n{ 80 40 222 90 235\\\\nl 72 44 250 66 250\\\\nI 80\\\\ns 88\\\\nw 40 80 235\\\\n@ 40 80 210\\\\nz 64 12 210 50 181 75 181\\\\nb 72 33 173 88 181\\\\nI 56 71 181\\\\ng 56 28 153 100 166\\\\nI 64 62 160\\\\nn 40 60 160\\\\nI 88 27 166\\\\nN 40 100 166\\\\nt 80 20 160\\\\nU 40 40 181 80 166\\\\ng 48 100 166\\\\nE 104 38 153 76 137\\\\nt 56\\\\nv 48\\\\nE 72 11 166 66 153\\\\nr 88 18 160 63 166\\\\ni 112.8 14 166 49 173 77 173\\\\nt 104.8 98 137\\\\nAI 178.4 21 148 70 148 92 137\\\\nr= 108 25 137 62 133 98 129\\\\nd 49\\\\n@ 59.2 6 137 73 133\\\\nv 46\\\\ns 89\\\\nI 40 40 173\\\\nt 40 40 166\\\\nI 64 62 166\\\\nN 72 22 160 77 153\\\\nb 40 40 142 100 153\\\\nAI 136 29 142\\\\nh 80 30 142 100 148\\\\n@ 60 50 150\\\\nr= 64 62 153 100 153\\\\ns 125\\\\nI 64 37 210 100 190\\\\ns 72 11 190\\\\nt 72\\\\nr= 104 30 160 69 142\\\\nO 72\\\\nn 40 40 142\\\\nD 40 40 153\\\\n@ 40 40 160\\\\nb 40 40 153 100 160\\\\n{ 216 18 166 51 166 70 153 88 137 100 133\\\\nn 40\\\\nk 56\\\\n_ 144 94 129 100 100'! !\\\\n\\\\n\\\\n!PHOReader class methodsFor: 'instance creation' stamp: 'len 6/15/1999 00:48'!\\\\neventsFromStream: aStream\\\\n\\\\t^ self new stream: aStream; read; events! !\\\\n\\\\n!PHOReader class methodsFor: 'instance creation' stamp: 'len 6/15/1999 00:49'!\\\\neventsFromString: aString\\\\n\\\\t^ self eventsFromStream: (ReadStream on: aString)! !\\\\n\\\\n!PHOReader class methodsFor: 'instance creation' stamp: 'len 6/17/1999 01:47'!\\\\nplotPitchFromStream: aStream\\\\n\\\\t^ self new stream: aStream; read; plotPitch! !\\\\n\\\\n!PHOReader class methodsFor: 'instance creation' stamp: 'len 6/17/1999 01:47'!\\\\nplotPitchFromString: aString\\\\n\\\\t^ self plotPitchFromStream: (ReadStream on: aString)! !\\\\nImageReadWriter subclass: #PNGReadWriter\\\\n\\\\tinstanceVariableNames: 'chunk form width height depth backColor bitsPerChannel colorType interlaceMethod bitsPerPixel bytesPerScanline thisScanline prevScanline rowSize globalDataChunk unknownChunks palette transparentPixelValue filtersSeen swizzleMap cachedDecoderMap bigEndian'\\\\n\\\\tclassVariableNames: 'BPP BlockHeight BlockWidth Debugging StandardColors StandardSwizzleMaps'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Graphics-Files'!\\\\n!PNGReadWriter commentStamp: '<historical>' prior: 0!\\\\nI am a subclass of ImageReadWriter that decodes Portable Network Graphics\\\\n(PNG) images.\\\\n\\\\nSubmitted by Duane Maxwell!\\\\n\\\\n\\\\n!PNGReadWriter methodsFor: 'accessing' stamp: 'RAA 11/7/2000 09:20'!\\\\ndebugging\\\\n\\\\n\\\\t^Debugging == true! !\\\\n\\\\n!PNGReadWriter methodsFor: 'accessing' stamp: 'nk 7/30/2004 17:51'!\\\\nnextImage\\\\n\\\\tbigEndian := SmalltalkImage current isBigEndian.\\\\n\\\\tfiltersSeen := Bag new.\\\\n\\\\tglobalDataChunk := nil.\\\\n\\\\ttransparentPixelValue := nil.\\\\n\\\\tunknownChunks := Set new.\\\\n\\\\tstream reset.\\\\n\\\\tstream binary.\\\\n\\\\tstream skip: 8.\\\\n\\\\t[stream atEnd] whileFalse: [self processNextChunk].\\\\n\\\\t\\\\\\\"Set up our form\\\\\\\"\\\\n\\\\tpalette ifNotNil: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"Dump the palette if it's the same as our standard palette\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\tpalette = (StandardColors copyFrom: 1 to: palette size) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [palette := nil]].\\\\n\\\\t(depth <= 8 and: [palette notNil]) \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[form := ColorForm extent: width @ height depth: depth.\\\\n\\\\t\\\\t\\\\tform colors: palette]\\\\n\\\\t\\\\tifFalse: [form := Form extent: width @ height depth: depth].\\\\n\\\\tbackColor ifNotNil: [form fillColor: backColor].\\\\n\\\\tchunk := globalDataChunk ifNil: [self error: 'image data is missing'].\\\\n\\\\tchunk ifNotNil: [self processIDATChunk].\\\\n\\\\tunknownChunks isEmpty \\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"Transcript show: ' ',unknownChunks asSortedCollection asArray printString.\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\tself debugging \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[Transcript\\\\n\\\\t\\\\t\\\\t\\\\tcr;\\\\n\\\\t\\\\t\\\\t\\\\tshow: 'form = ' , form printString.\\\\n\\\\t\\\\t\\\\tTranscript\\\\n\\\\t\\\\t\\\\t\\\\tcr;\\\\n\\\\t\\\\t\\\\t\\\\tshow: 'colorType = ' , colorType printString.\\\\n\\\\t\\\\t\\\\tTranscript\\\\n\\\\t\\\\t\\\\t\\\\tcr;\\\\n\\\\t\\\\t\\\\t\\\\tshow: 'interlaceMethod = ' , interlaceMethod printString.\\\\n\\\\t\\\\t\\\\tTranscript\\\\n\\\\t\\\\t\\\\t\\\\tcr;\\\\n\\\\t\\\\t\\\\t\\\\tshow: 'filters = ' , filtersSeen sortedCounts asArray printString].\\\\n\\\\t^form! !\\\\n\\\\n!PNGReadWriter methodsFor: 'accessing' stamp: 'DSM 3/24/2000 01:12'!\\\\nunderstandsImageFormat\\\\n\\\\t#(137 80 78 71 13 10 26 10) do: [ :byte |\\\\n\\\\t\\\\tstream next = byte ifFalse: [^ false]].\\\\n\\\\t^ true\\\\n! !\\\\n\\\\n\\\\n!PNGReadWriter methodsFor: 'chunks' stamp: 'ar 2/10/2004 23:55'!\\\\nprocessBackgroundChunk\\\\n\\\\n\\\\t| val red green blue max |\\\\n\\\\n\\\\t\\\\\\\"Transcript show: '  BACKGROUND: ',chunk printString.\\\\\\\"\\\\n\\\\tcolorType = 3 ifTrue: [\\\\n\\\\t\\\\tbackColor := palette at: chunk first + 1.\\\\n\\\\t\\\\t^self\\\\n\\\\t].\\\\n\\\\tmax _ (2 raisedTo: bitsPerChannel) - 1.\\\\n\\\\t(colorType = 0 or: [colorType = 4]) ifTrue: [\\\\n\\\\t\\\\tval _ chunk unsignedShortAt: 1 bigEndian: true.\\\\n\\\\t\\\\tbackColor := Color gray: val / max.\\\\n\\\\t\\\\t^self\\\\n\\\\t].\\\\n\\\\t(colorType = 2 or: [colorType = 6]) ifTrue: [\\\\n\\\\t\\\\tred _ chunk unsignedShortAt: 1 bigEndian: true.\\\\n\\\\t\\\\tgreen _ chunk unsignedShortAt: 3 bigEndian: true.\\\\n\\\\t\\\\tblue _ chunk unsignedShortAt: 5 bigEndian: true.\\\\n\\\\t\\\\tbackColor := Color r: red/max g: green/max b: blue/max.\\\\n\\\\t\\\\t^self\\\\n\\\\t].\\\\n\\\\\\\"self halt.\\\\\\\"\\\\n\\\\n\\\\\\\"====\\\\nThe bKGD chunk specifies a default background color to present the image against. Note that viewers are not bound to honor this chunk; a viewer can choose to use a different background. \\\\n\\\\nFor color type 3 (indexed color), the bKGD chunk contains: \\\\n\\\\n\\\\n   Palette index:  1 byte\\\\n\\\\nThe value is the palette index of the color to be used as background. \\\\n\\\\nFor color types 0 and 4 (grayscale, with or without alpha), bKGD contains: \\\\n\\\\n\\\\n   Gray:  2 bytes, range 0 .. (2^bitdepth)-1\\\\n\\\\n(For consistency, 2 bytes are used regardless of the image bit depth.) The value is the gray level to be used as background. \\\\n\\\\nFor color types 2 and 6 (truecolor, with or without alpha), bKGD contains: \\\\n\\\\n\\\\n   Red:   2 bytes, range 0 .. (2^bitdepth)-1\\\\n   Green: 2 bytes, range 0 .. (2^bitdepth)-1\\\\n   Blue:  2 bytes, range 0 .. (2^bitdepth)-1\\\\n\\\\n(For consistency, 2 bytes per sample are used regardless of the image bit depth.) This is the RGB color to be used as background. \\\\n\\\\nWhen present, the bKGD chunk must precede the first IDAT chunk, and must follow the PLTE chunk, if any. \\\\n===\\\\\\\"\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'chunks' stamp: 'RAA 11/4/2000 17:00'!\\\\nprocessIDATChunk\\\\n\\\\n\\\\tinterlaceMethod = 0\\\\n\\\\t\\\\tifTrue: [ self processNonInterlaced ]\\\\n\\\\t\\\\tifFalse: [ self processInterlaced ]\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'chunks' stamp: 'ar 2/10/2004 23:55'!\\\\nprocessIHDRChunk\\\\n\\\\twidth _ chunk longAt: 1 bigEndian: true.\\\\n\\\\theight _ chunk longAt: 5 bigEndian: true.\\\\n\\\\tbitsPerChannel _ chunk at: 9.\\\\n\\\\tcolorType _ chunk at: 10.\\\\n\\\\t\\\\\\\"compression _ chunk at: 11.\\\\\\\" \\\\\\\"TODO - validate compression\\\\\\\"\\\\n\\\\t\\\\\\\"filterMethod _ chunk at: 12.\\\\\\\" \\\\\\\"TODO - validate filterMethod\\\\\\\"\\\\n\\\\tinterlaceMethod _ chunk at: 13. \\\\\\\"TODO - validate interlace method\\\\\\\"\\\\n\\\\t(#(2 4 6) includes: colorType)\\\\n\\\\t\\\\tifTrue: [depth _ 32].\\\\n\\\\t(#(0 3) includes: colorType) ifTrue: [\\\\n\\\\t\\\\tdepth _ bitsPerChannel min: 8.\\\\n\\\\t\\\\tcolorType = 0 ifTrue: [ \\\\\\\"grayscale\\\\\\\"\\\\n\\\\t\\\\t\\\\tpalette := self grayColorsFor: depth.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\tbitsPerPixel _ (BPP at: colorType+1) at: bitsPerChannel highBit.\\\\n\\\\tbytesPerScanline _ width * bitsPerPixel + 7 // 8.\\\\n\\\\trowSize _ width * depth + 31 >> 5.\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'chunks' stamp: 'ar 2/29/2004 04:19'!\\\\nprocessInterlaced\\\\n\\\\t| z filter bytesPerPass startingCol colIncrement rowIncrement startingRow cx sc temp |\\\\n\\\\tstartingCol _ #(0 4 0 2 0 1 0 ).\\\\n\\\\tcolIncrement _ #(8 8 4 4 2 2 1 ).\\\\n\\\\trowIncrement _ #(8 8 8 4 4 2 2 ).\\\\n\\\\tstartingRow _ #(0 0 4 0 2 0 1 ).\\\\n\\\\tz _ ZLibReadStream on: chunk from: 1 to: chunk size.\\\\n\\\\t1 to: 7 do: [:pass |\\\\n\\\\t\\\\t(self doPass: pass)\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[cx _ colIncrement at: pass.\\\\n\\\\t\\\\t\\\\t\\\\tsc _ startingCol at: pass.\\\\n\\\\t\\\\t\\\\t\\\\tbytesPerPass _ width - sc + cx - 1 // cx * bitsPerPixel + 7 // 8.\\\\n\\\\t\\\\t\\\\t\\\\tprevScanline _ ByteArray new: bytesPerPass.\\\\n\\\\t\\\\t\\\\t\\\\tthisScanline _ ByteArray new: bytesPerScanline.\\\\n\\\\t\\\\t\\\\t\\\\t(startingRow at: pass)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tto: height - 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tby: (rowIncrement at: pass)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:y |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfilter _ z next.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfiltersSeen add: filter.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(filter isNil or: [(filter between: 0 and: 4) not])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [^ self].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tthisScanline _ z next: bytesPerPass into: thisScanline startingAt: 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself filterScanline: filter count: bytesPerPass.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself copyPixels: y at: sc by: cx.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttemp := prevScanline.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tprevScanline := thisScanline.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tthisScanline := temp.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\tz atEnd ifFalse:[self error:'Unexpected data'].! !\\\\n\\\\n!PNGReadWriter methodsFor: 'chunks' stamp: 'ar 2/11/2004 12:14'!\\\\nprocessNextChunk\\\\n\\\\n\\\\t| length chunkType crc chunkCrc |\\\\n\\\\n\\\\tlength _ self nextLong.\\\\n\\\\n\\\\tchunkType _ (self next: 4) asString.\\\\n\\\\tchunk _ self next: length.\\\\n\\\\tchunkCrc := self nextLong bitXor: 16rFFFFFFFF.\\\\n\\\\tcrc := self updateCrc: 16rFFFFFFFF from: 1 to: 4 in: chunkType.\\\\n\\\\tcrc := self updateCrc: crc from: 1 to: length in: chunk.\\\\n\\\\tcrc = chunkCrc ifFalse:[\\\\n\\\\t\\\\tself error: 'PNGReadWriter crc error in chunk ', chunkType.\\\\n\\\\t].\\\\n\\\\n\\\\tchunkType = 'IEND' ifTrue: [^self\\\\t\\\\\\\"*should* be the last chunk\\\\\\\"].\\\\n\\\\tchunkType = 'sBIT' ifTrue: [^self processSBITChunk \\\\\\\"could indicate unusual sample depth in original\\\\\\\"].\\\\n\\\\tchunkType = 'gAMA' ifTrue: [^self \\\\t\\\\\\\"indicates gamma correction value\\\\\\\"].\\\\n\\\\tchunkType = 'bKGD' ifTrue: [^self processBackgroundChunk].\\\\n\\\\tchunkType = 'pHYs' ifTrue: [^self processPhysicalPixelChunk].\\\\n\\\\tchunkType = 'tRNS' ifTrue: [^self processTransparencyChunk].\\\\n\\\\n\\\\tchunkType = 'IHDR' ifTrue: [^self processIHDRChunk].\\\\n\\\\tchunkType = 'PLTE' ifTrue: [^self processPLTEChunk].\\\\n\\\\tchunkType = 'IDAT' ifTrue: [\\\\n\\\\t\\\\t\\\\\\\"---since the compressed data can span multiple\\\\n\\\\t\\\\tchunks, stitch them all together first. later,\\\\n\\\\t\\\\tif memory is an issue, we need to figure out how\\\\n\\\\t\\\\tto do this on the fly---\\\\\\\"\\\\n\\\\t\\\\tglobalDataChunk _ globalDataChunk ifNil: [chunk] ifNotNil:\\\\n\\\\t\\\\t\\\\t[globalDataChunk,chunk].\\\\n\\\\t\\\\t^self\\\\n\\\\t].\\\\n\\\\tunknownChunks add: chunkType.\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'chunks' stamp: 'ar 2/29/2004 04:19'!\\\\nprocessNonInterlaced\\\\n\\\\t| z filter temp copyMethod debug |\\\\n\\\\tdebug := self debugging.\\\\n\\\\tcopyMethod _ #(copyPixelsGray: nil copyPixelsRGB: copyPixelsIndexed:\\\\n\\\\t\\\\t  copyPixelsGrayAlpha: nil copyPixelsRGBA:) at: colorType+1.\\\\n\\\\tdebug ifTrue: [ Transcript cr; nextPutAll: 'NI chunk size='; print: chunk size ].\\\\n\\\\tz _ ZLibReadStream on: chunk from: 1 to: chunk size.\\\\n\\\\tprevScanline _ ByteArray new: bytesPerScanline.\\\\n\\\\tthisScanline := ByteArray new: bytesPerScanline.\\\\n\\\\t0 to: height-1 do: [ :y |\\\\n\\\\t\\\\tfilter _ (z next: 1) first.\\\\n\\\\t\\\\tdebug ifTrue:[filtersSeen add: filter].\\\\n\\\\t\\\\tthisScanline _ z next: bytesPerScanline into: thisScanline startingAt: 1.\\\\n\\\\t\\\\t(debug and: [ thisScanline size < bytesPerScanline ]) ifTrue: [ Transcript nextPutAll: ('wanted {1} but only got {2}' format: { bytesPerScanline. thisScanline size }); cr ].\\\\n\\\\t\\\\tfilter = 0 ifFalse:[self filterScanline: filter count: bytesPerScanline].\\\\n\\\\t\\\\tself perform: copyMethod with: y.\\\\n\\\\t\\\\ttemp := prevScanline.\\\\n\\\\t\\\\tprevScanline := thisScanline.\\\\n\\\\t\\\\tthisScanline := temp.\\\\n\\\\t\\\\t].\\\\n\\\\tz atEnd ifFalse:[self error:'Unexpected data'].\\\\n\\\\tdebug ifTrue: [Transcript  nextPutAll: ' compressed size='; print: z position  ].\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'chunks' stamp: 'ar 2/11/2004 01:02'!\\\\nprocessPLTEChunk\\\\n\\\\n\\\\t| colorCount i |\\\\n\\\\n\\\\tcolorCount _ chunk size // 3. \\\\\\\"TODO - validate colorCount against depth\\\\\\\"\\\\n\\\\tpalette _ Array new: colorCount.\\\\n\\\\t0 to: colorCount-1 do: [ :index |\\\\n\\\\t\\\\ti _ index * 3 + 1.\\\\n\\\\t\\\\tpalette at: index+1 put:\\\\n\\\\t\\\\t\\\\t(Color r: (chunk at: i)/255.0 g: (chunk at: i+1)/255.0 b: (chunk at: i+2)/255.0)\\\\n\\\\t\\\\t].! !\\\\n\\\\n!PNGReadWriter methodsFor: 'chunks' stamp: 'RAA 11/5/2000 11:24'!\\\\nprocessPhysicalPixelChunk\\\\n\\\\n\\\\t\\\\\\\"Transcript show: '  PHYSICAL: ',chunk printString.\\\\\\\"\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'chunks' stamp: 'ar 12/12/2003 18:33'!\\\\nprocessSBITChunk\\\\n\\\\t| rBits gBits bBits aBits |\\\\n\\\\tcolorType = 6 ifFalse:[^self].\\\\n\\\\trBits := chunk at: 1.\\\\n\\\\tgBits := chunk at: 2.\\\\n\\\\tbBits := chunk at: 3.\\\\n\\\\taBits := chunk at: 4.\\\\n\\\\t(rBits = 5 and:[gBits = 5 and:[bBits = 5 and:[aBits = 1]]]) ifTrue:[\\\\n\\\\t\\\\tdepth := 16.\\\\n\\\\t].! !\\\\n\\\\n!PNGReadWriter methodsFor: 'chunks' stamp: 'RAA 11/4/2000 16:22'!\\\\nprocessTransparencyChunk\\\\n\\\\n\\\\t| red green blue |\\\\n\\\\n\\\\t\\\\\\\"Transcript show: '  TRANSPARENCY ',chunk printString.\\\\\\\"\\\\n\\\\tcolorType = 0 ifTrue: [\\\\n\\\\t\\\\ttransparentPixelValue _ chunk unsignedShortAt: 1 bigEndian: true.\\\\n\\\\t\\\\t^self\\\\n\\\\t].\\\\n\\\\tcolorType = 2 ifTrue: [\\\\n\\\\t\\\\tred _ chunk at: 2.\\\\n\\\\t\\\\tgreen _ chunk at: 2.\\\\n\\\\t\\\\tblue _ chunk at: 2.\\\\n\\\\t\\\\ttransparentPixelValue _ 16rFF00 + red << 8 + green << 8 + blue.\\\\n\\\\t\\\\t^self\\\\n\\\\t].\\\\n\\\\tcolorType = 3 ifTrue: [\\\\n\\\\t\\\\tchunk withIndexDo: [ :alpha :index |\\\\n\\\\t\\\\t\\\\tpalette at: index put: ((palette at: index) alpha: alpha/255)\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\t^self\\\\n\\\\t].\\\\n! !\\\\n\\\\n\\\\n!PNGReadWriter methodsFor: 'filtering' stamp: 'RAA 11/7/2000 09:43'!\\\\nfilterAverage: count\\\\n\\\\t\\\\\\\"Use the average of the pixel to the left and the pixel above as a predictor\\\\\\\"\\\\n\\\\n\\\\t| delta |\\\\n\\\\tdelta _ bitsPerPixel // 8 max: 1.\\\\n\\\\t1 to: delta do: [:i |\\\\n\\\\t\\\\tthisScanline at: i put: ((thisScanline at: i) + ((prevScanline at: i) // 2) bitAnd: 255)].\\\\n\\\\tdelta + 1 to: count do: [:i |\\\\n\\\\t\\\\tthisScanline at: i put:\\\\n\\\\t\\\\t\\\\t((thisScanline at: i)\\\\n\\\\t\\\\t\\\\t+ ((prevScanline at: i)\\\\n\\\\t\\\\t\\\\t+ (thisScanline at: i - delta) // 2) bitAnd: 255)]! !\\\\n\\\\n!PNGReadWriter methodsFor: 'filtering' stamp: 'DSM 3/25/2000 17:54'!\\\\nfilterHorizontal: count\\\\n\\\\t\\\\\\\"Use the pixel to the left as a predictor\\\\\\\"\\\\n\\\\n\\\\t| delta |\\\\n\\\\tdelta _ bitsPerPixel // 8 max: 1.\\\\n\\\\tdelta+1 to: count do: [ :i |\\\\n\\\\t\\\\tthisScanline at: i put: (((thisScanline at: i) +\\\\n(thisScanline at: i-delta)) bitAnd: 255) ]\\\\n\\\\n\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'filtering' stamp: 'DSM 3/25/2000 17:55'!\\\\nfilterNone: count\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'filtering' stamp: 'RAA 11/7/2000 09:45'!\\\\nfilterPaeth: count\\\\n\\\\t\\\\\\\"Select one of (the pixel to the left, the pixel above and the pixel to above left) to\\\\n\\\\tpredict the value of this pixel\\\\\\\"\\\\n\\\\n\\\\t| delta |\\\\n\\\\tdelta _ bitsPerPixel // 8 max: 1.\\\\n\\\\t1 to: delta do: [ :i |\\\\n\\\\t\\\\tthisScanline at: i put:\\\\n\\\\t\\\\t\\\\t(((thisScanline at: i) + (prevScanline at: i)) bitAnd: 255)].\\\\n\\\\tdelta+1 to: count do: [ :i |\\\\n\\\\t\\\\tthisScanline\\\\n\\\\t\\\\t\\\\tat: i\\\\n\\\\t\\\\t\\\\tput: (((thisScanline at: i) + (self\\\\n\\\\t\\\\t\\\\t\\\\tpaethPredictLeft: (thisScanline at: i-delta)\\\\n\\\\t\\\\t\\\\t\\\\tabove: (prevScanline at: i)\\\\n\\\\t\\\\t\\\\t\\\\taboveLeft: (prevScanline at: i-delta)))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbitAnd: 255)]\\\\n\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'filtering' stamp: 'eat 9/11/2000 20:08'!\\\\nfilterScanline: filterType count: count\\\\n\\\\n\\\\tself\\\\n\\\\t\\\\tperform: (\\\\n\\\\t\\\\t\\\\t#(filterNone: filterHorizontal: filterVertical: filterAverage: filterPaeth:)\\\\n\\\\t\\\\t\\\\t\\\\tat: filterType+1)\\\\n\\\\t\\\\twith: count.\\\\n\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'filtering' stamp: 'DSM 3/25/2000 17:54'!\\\\nfilterVertical: count\\\\n\\\\t\\\\\\\"Use the pixel above as a predictor\\\\\\\"\\\\n\\\\n\\\\t1 to: count do: [ :i |\\\\n\\\\t\\\\tthisScanline at: i put: (((thisScanline at: i) +\\\\n(prevScanline at: i)) bitAnd: 255) ]\\\\n\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'filtering' stamp: 'eat 9/11/2000 20:05'!\\\\npaethPredictLeft: a above: b aboveLeft: c\\\\n\\\\t\\\\\\\"Predicts the value of a pixel based on nearby pixels, based on\\\\nPaeth (GG II, 1991)\\\\\\\"\\\\n\\\\n\\\\t| pa pb pc |\\\\n\\\\tpa _ b > c ifTrue: [b - c] ifFalse: [c - b].\\\\n\\\\tpb _ a > c ifTrue: [a - c] ifFalse: [c - a].\\\\n\\\\tpc _ a + b - c - c.\\\\n\\\\tpc < 0 ifTrue: [\\\\n\\\\t\\\\tpc := pc * -1].\\\\n\\\\t((pa <= pb) and: [pa <= pc]) ifTrue: [^ a].\\\\n\\\\t(pb <= pc) ifTrue: [^ b].\\\\n\\\\t^ c\\\\n! !\\\\n\\\\n\\\\n!PNGReadWriter methodsFor: 'miscellaneous' stamp: 'DSM 4/27/2000 13:09'!\\\\ndoPass: pass\\\\n\\\\t\\\\\\\"Certain interlace passes are skipped with certain small image\\\\ndimensions\\\\\\\"\\\\n\\\\n\\\\tpass = 1 ifTrue: [ ^ true ].\\\\n\\\\t((width = 1) and: [height = 1]) ifTrue: [ ^ false ].\\\\n\\\\tpass = 2 ifTrue: [ ^ width >= 5 ].\\\\n\\\\tpass = 3 ifTrue: [ ^ height >= 5 ].\\\\n\\\\tpass = 4 ifTrue: [ ^ (width >=3 ) or: [height >= 5] ].\\\\n\\\\tpass = 5 ifTrue: [ ^ height >=3 ].\\\\n\\\\tpass = 6 ifTrue: [ ^ width >=2 ].\\\\n\\\\tpass = 7 ifTrue: [ ^ height >=2 ].\\\\n\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'miscellaneous' stamp: 'ar 2/11/2004 01:27'!\\\\ngrayColorsFor: d\\\\n\\\\t\\\\\\\"return a color table for a gray image\\\\\\\"\\\\n\\\\n\\\\tpalette _ Array new: 1<<d.\\\\n\\\\td = 1 ifTrue: [\\\\n\\\\t\\\\tpalette at: 1 put: Color black.\\\\n\\\\t\\\\tpalette at: 2 put: Color white.\\\\n\\\\t\\\\t^ palette,{Color transparent}\\\\n\\\\t\\\\t].\\\\n\\\\td = 2 ifTrue: [\\\\n\\\\t\\\\tpalette at: 1 put: Color black.\\\\n\\\\t\\\\tpalette at: 2 put: (Color gray: 85.0 / 255.0).\\\\n\\\\t\\\\tpalette at: 3 put: (Color gray: 170.0 / 255.0).\\\\n\\\\t\\\\tpalette at: 4 put: Color white.\\\\n\\\\t\\\\t^ palette,{Color transparent}.\\\\n\\\\t\\\\t].\\\\n\\\\td = 4 ifTrue: [\\\\n\\\\t\\\\t0 to: 15 do: [ :g |\\\\n\\\\t\\\\t\\\\tpalette at: g+1 put: (Color gray: (g/15) asFloat) ].\\\\n\\\\t\\\\t^ palette,{Color transparent}\\\\n\\\\t\\\\t].\\\\n\\\\td = 8 ifTrue: [\\\\n\\\\t\\\\t0 to: 255 do: [ :g |\\\\n\\\\t\\\\t\\\\tpalette at: g+1 put: (Color gray: (g/255) asFloat) ].\\\\n\\\\t\\\\t^ palette\\\\t\\\\t\\\\\\\"??transparent??\\\\\\\"\\\\n\\\\t\\\\t].\\\\n! !\\\\n\\\\n\\\\n!PNGReadWriter methodsFor: 'pixel copies' stamp: 'DSM 3/26/2000 21:32'!\\\\ncopyPixels: y\\\\n\\\\t\\\\\\\"Handle non-interlaced pixels of supported colorTypes\\\\\\\"\\\\n\\\\n\\\\t| s |\\\\n\\\\ts _ #(copyPixelsGray: nil copyPixelsRGB: copyPixelsIndexed:\\\\n\\\\t\\\\t  copyPixelsGrayAlpha: nil copyPixelsRGBA:) at: colorType+1.\\\\n\\\\tself perform: s asSymbol with: y\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'pixel copies' stamp: 'RAA 11/4/2000 16:08'!\\\\ncopyPixels: y at: startX by: incX\\\\n\\\\t\\\\\\\"Handle interlaced pixels of supported colorTypes\\\\\\\"\\\\n\\\\n\\\\t| s |\\\\n\\\\ts _ #(copyPixelsGray:at:by: nil copyPixelsRGB:at:by: copyPixelsIndexed:at:by:\\\\n\\\\t\\\\t  copyPixelsGrayAlpha:at:by: nil copyPixelsRGBA:at:by:) at: colorType+1.\\\\n\\\\tself perform: s asSymbol with: y with: startX with: incX\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'pixel copies' stamp: 'RAA 11/4/2000 16:12'!\\\\ncopyPixelsGray: y \\\\n\\\\t\\\\\\\"Handle non-interlaced grayscale color mode (colorType = 0)\\\\\\\"\\\\n\\\\t| blitter pixPerByte mask shifts pixelNumber rawByte pixel transparentIndex |\\\\n\\\\tblitter _ BitBlt current bitPokerToForm: form.\\\\n\\\\ttransparentIndex _ form colors size.\\\\n\\\\tbitsPerChannel = 16\\\\n\\\\t\\\\tifTrue: [0\\\\n\\\\t\\\\t\\\\t\\\\tto: width - 1\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:x | blitter pixelAt: x @ y put: 255\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t- (thisScanline at: x << 1 + 1)].\\\\n\\\\t\\\\t\\\\t^ self]\\\\n\\\\t\\\\tifFalse: [bitsPerChannel = 8\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tto: width\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:x | blitter\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tpixelAt: x - 1 @ y\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tput: (thisScanline at: x)].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ self].\\\\n\\\\t\\\\t\\\\tbitsPerChannel = 1\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [pixPerByte _ 8.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmask _ 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tshifts _ #(7 6 5 4 3 2 1 0 )].\\\\n\\\\t\\\\t\\\\tbitsPerChannel = 2\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [pixPerByte _ 4.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmask _ 3.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tshifts _ #(6 4 2 0 )].\\\\n\\\\t\\\\t\\\\tbitsPerChannel = 4\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [pixPerByte _ 2.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmask _ 15.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tshifts _ #(4 0 )].\\\\n\\\\t\\\\t\\\\tpixelNumber _ 0.\\\\n\\\\t\\\\t\\\\t0 to: width - 1 do: [:x | \\\\n\\\\t\\\\t\\\\t\\\\trawByte _ thisScanline at: pixelNumber // pixPerByte + 1.\\\\n\\\\t\\\\t\\\\t\\\\tpixel _ rawByte\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t>> (shifts at: pixelNumber \\\\\\\\\\\\\\\\ pixPerByte + 1) bitAnd: mask.\\\\n\\\\t\\\\t\\\\t\\\\tpixel = transparentPixelValue ifTrue: [pixel _ transparentIndex].\\\\n\\\\t\\\\t\\\\t\\\\tblitter pixelAt: x @ y put: pixel.\\\\n\\\\t\\\\t\\\\t\\\\tpixelNumber _ pixelNumber + 1\\\\n\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t]! !\\\\n\\\\n!PNGReadWriter methodsFor: 'pixel copies' stamp: 'RAA 11/4/2000 16:09'!\\\\ncopyPixelsGray: y at: startX by: incX\\\\n\\\\t\\\\\\\"Handle interlaced grayscale color mode (colorType = 0)\\\\\\\"\\\\n\\\\n\\\\t| b offset bits w pixel mask blitter pixelNumber pixPerByte rawByte\\\\nshifts |\\\\n\\\\tbitsPerChannel = 16\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\tb _ BitBlt current bitPokerToForm: form.\\\\n\\\\t\\\\t\\\\tstartX to: width-1 by: incX do: [ :x |\\\\n\\\\t\\\\t\\\\t\\\\tb pixelAt: x@y put: 255 - (thisScanline at: (x//incX<<1)+1).\\\\n\\\\t\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\t^ self\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\toffset _ y*rowSize+1.\\\\n\\\\tbits _ form bits.\\\\n\\\\tbitsPerChannel = 8 ifTrue: [\\\\n\\\\t\\\\tstartX to: width-1 by: incX do: [ :x |\\\\n\\\\t\\\\t\\\\tw _ offset + (x>>2).\\\\n\\\\t\\\\t\\\\tb _ 3- (x \\\\\\\\\\\\\\\\ 4) * 8.\\\\n\\\\t\\\\t\\\\tpixel _ (thisScanline at: x // incX + 1)<<b.\\\\n\\\\t\\\\t\\\\tmask _ (255<<b) bitInvert32.\\\\n\\\\t\\\\t\\\\tbits at: w put: (((bits at: w) bitAnd: mask) bitOr: pixel)\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\t^ self\\\\n\\\\t].\\\\n\\\\tbitsPerChannel = 1 ifTrue: [\\\\n\\\\t\\\\tpixPerByte _ 8.\\\\n\\\\t\\\\tmask _ 1.\\\\n\\\\t\\\\tshifts _ #(7 6 5 4 3 2 1 0).\\\\n\\\\t].\\\\n\\\\tbitsPerChannel = 2 ifTrue: [\\\\n\\\\t\\\\tpixPerByte _ 4.\\\\n\\\\t\\\\tmask _ 3.\\\\n\\\\t\\\\tshifts _ #(6 4 2 0).\\\\n\\\\t].\\\\n\\\\tbitsPerChannel = 4 ifTrue: [\\\\n\\\\t\\\\tpixPerByte _ 2.\\\\n\\\\t\\\\tmask _ 15.\\\\n\\\\t\\\\tshifts _ #(4 0).\\\\n\\\\t].\\\\n\\\\n\\\\tblitter _ BitBlt current bitPokerToForm: form.\\\\n\\\\tpixelNumber _ 0.\\\\n\\\\tstartX to: width-1 by: incX do: [ :x |\\\\n\\\\t\\\\trawByte _ thisScanline at: (pixelNumber // pixPerByte) + 1.\\\\n\\\\t\\\\tpixel _ (rawByte >> (shifts at: (pixelNumber \\\\\\\\\\\\\\\\ pixPerByte) + 1)) bitAnd: mask.\\\\n\\\\t\\\\tblitter pixelAt: (x@y) put: pixel.\\\\n\\\\t\\\\tpixelNumber _ pixelNumber + 1.\\\\n\\\\t].\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'pixel copies' stamp: 'RAA 11/4/2000 16:09'!\\\\ncopyPixelsGrayAlpha: y\\\\n\\\\t\\\\\\\"Handle non-interlaced grayscale with alpha color mode (colorType = 4)\\\\\\\"\\\\n\\\\n\\\\t| i pixel gray b |\\\\n\\\\tb _ BitBlt current bitPokerToForm: form.\\\\n\\\\tbitsPerChannel = 8\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t0 to: width-1 do: [ :x |\\\\n\\\\t\\\\t\\\\t\\\\ti _ (x << 1) + 1.\\\\n\\\\t\\\\t\\\\t\\\\tgray _ thisScanline at: i.\\\\n\\\\t\\\\t\\\\t\\\\tpixel _ ((thisScanline at: i+1)<<24) + (gray<<16) + (gray<<8) + gray.\\\\n\\\\t\\\\t\\\\t\\\\tb pixelAt: x@y put: pixel.\\\\n\\\\t\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t0 to: width-1 do: [ :x |\\\\n\\\\t\\\\t\\\\t\\\\ti _ (x << 2) + 1.\\\\n\\\\t\\\\t\\\\t\\\\tgray _ thisScanline at: i.\\\\n\\\\t\\\\t\\\\t\\\\tpixel _ ((thisScanline at: i+2)<<24) + (gray<<16) + (gray<<8) + gray.\\\\n\\\\t\\\\t\\\\t\\\\tb pixelAt: x@y put: pixel.\\\\n\\\\t\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t\\\\t]\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'pixel copies' stamp: 'RAA 11/4/2000 16:09'!\\\\ncopyPixelsGrayAlpha: y at: startX by: incX\\\\n\\\\t\\\\\\\"Handle interlaced grayscale with alpha color mode (colorType = 4)\\\\\\\"\\\\n\\\\n\\\\t| i pixel gray b |\\\\n\\\\tb _ BitBlt current bitPokerToForm: form.\\\\n\\\\tbitsPerChannel = 8\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\tstartX to: width-1 by: incX do: [ :x |\\\\n\\\\t\\\\t\\\\t\\\\ti _ (x // incX << 1) + 1.\\\\n\\\\t\\\\t\\\\t\\\\tgray _ thisScanline at: i.\\\\n\\\\t\\\\t\\\\t\\\\tpixel _ ((thisScanline at: i+1)<<24) + (gray<<16) + (gray<<8) + gray.\\\\n\\\\t\\\\t\\\\t\\\\tb pixelAt: x@y put: pixel.\\\\n\\\\t\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\tstartX to: width-1 by: incX do: [ :x |\\\\n\\\\t\\\\t\\\\t\\\\ti _ (x // incX << 2) + 1.\\\\n\\\\t\\\\t\\\\t\\\\tgray _ thisScanline at: i.\\\\n\\\\t\\\\t\\\\t\\\\tpixel _ ((thisScanline at: i+2)<<24) + (gray<<16) + (gray<<8) + gray.\\\\n\\\\t\\\\t\\\\t\\\\tb pixelAt: x@y put: pixel.\\\\n\\\\t\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t\\\\t]\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'pixel copies' stamp: 'ar 1/1/1970 21:00'!\\\\ncopyPixelsIndexed: y\\\\n\\\\t\\\\\\\"Handle non-interlaced indexed color mode (colorType = 3)\\\\\\\"\\\\n\\\\t| hack hackBlt swizzleHack swizzleBlt scanline hackDepth |\\\\n\\\\tscanline := ByteArray new: bytesPerScanline + 3 // 4 * 4.\\\\n\\\\tscanline replaceFrom: 1 to: thisScanline size with: thisScanline startingAt: 1.\\\\n\\\\thackDepth := bigEndian ifTrue:[form depth] ifFalse:[form depth negated].\\\\n\\\\thack := Form extent: width@1 depth: hackDepth bits: scanline.\\\\n\\\\thackBlt := BitBlt toForm: form.\\\\n\\\\thackBlt sourceForm: hack.\\\\n\\\\thackBlt combinationRule: Form over.\\\\n\\\\thackBlt destOrigin: 0@y.\\\\n\\\\thackBlt width: width; height: 1.\\\\n\\\\n\\\\t(form depth < 8 and:[bigEndian not]) ifTrue:[\\\\n\\\\t\\\\tswizzleHack := Form new hackBits: scanline.\\\\n\\\\t\\\\tswizzleBlt := BitBlt toForm: swizzleHack.\\\\n\\\\t\\\\tswizzleBlt sourceForm: swizzleHack.\\\\n\\\\t\\\\tswizzleBlt combinationRule: Form over.\\\\n\\\\t\\\\tswizzleBlt colorMap: (StandardSwizzleMaps at: form depth).\\\\n\\\\t\\\\tswizzleBlt copyBits.\\\\n\\\\t].\\\\n\\\\n\\\\thackBlt copyBits.! !\\\\n\\\\n!PNGReadWriter methodsFor: 'pixel copies' stamp: 'RAA 11/4/2000 16:23'!\\\\ncopyPixelsIndexed: y at: startX by: incX\\\\n\\\\t\\\\\\\"Handle interlaced indexed color mode (colorType = 3)\\\\\\\"\\\\n\\\\n\\\\t| offset b bits w pixel mask pixPerByte shifts blitter pixelNumber rawByte |\\\\n\\\\toffset _ y*rowSize+1.\\\\n\\\\tbits _ form bits.\\\\n\\\\tbitsPerChannel = 8\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\tstartX to: width-1 by: incX do: [ :x |\\\\n\\\\t\\\\t\\\\t\\\\tw _ offset + (x>>2).\\\\n\\\\t\\\\t\\\\t\\\\tb _ 3 - (x \\\\\\\\\\\\\\\\ 4) * 8.\\\\n\\\\t\\\\t\\\\t\\\\tpixel _ (thisScanline at: x // incX + 1)<<b.\\\\n\\\\t\\\\t\\\\t\\\\tmask _ (255<<b) bitInvert32.\\\\n\\\\t\\\\t\\\\t\\\\tbits at: w put: (((bits at: w) bitAnd: mask) bitOr: pixel)].\\\\n\\\\t\\\\t\\\\t^ self ].\\\\n\\\\tbitsPerChannel = 1 ifTrue: [\\\\n\\\\t\\\\tpixPerByte _ 8.\\\\n\\\\t\\\\tmask _ 1.\\\\n\\\\t\\\\tshifts _ #(7 6 5 4 3 2 1 0).\\\\n\\\\t].\\\\n\\\\tbitsPerChannel = 2 ifTrue: [\\\\n\\\\t\\\\tpixPerByte _ 4.\\\\n\\\\t\\\\tmask _ 3.\\\\n\\\\t\\\\tshifts _ #(6 4 2 0).\\\\n\\\\t].\\\\n\\\\tbitsPerChannel = 4 ifTrue: [\\\\n\\\\t\\\\tpixPerByte _ 2.\\\\n\\\\t\\\\tmask _ 15.\\\\n\\\\t\\\\tshifts _ #(4 0).\\\\n\\\\t].\\\\n\\\\n\\\\tblitter _ BitBlt current bitPokerToForm: form.\\\\n\\\\tpixelNumber _ 0.\\\\n\\\\tstartX to: width-1 by: incX do: [ :x |\\\\n\\\\t\\\\trawByte _ thisScanline at: (pixelNumber // pixPerByte) + 1.\\\\n\\\\t\\\\tpixel _ (rawByte >> (shifts at: (pixelNumber \\\\\\\\\\\\\\\\ pixPerByte) + 1)) bitAnd: mask.\\\\n\\\\t\\\\tblitter pixelAt: (x@y) put: pixel.\\\\n\\\\t\\\\tpixelNumber _ pixelNumber + 1.\\\\n\\\\t].\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'pixel copies' stamp: 'RAA 11/7/2000 09:30'!\\\\ncopyPixelsRGB: y\\\\n\\\\t\\\\\\\"Handle non-interlaced RGB color mode (colorType = 2)\\\\\\\"\\\\n\\\\n\\\\t| i pixel tempForm tempBits |\\\\n\\\\n\\\\ttempForm _ Form extent: width@1 depth: 32.\\\\n\\\\ttempBits _ tempForm bits.\\\\n\\\\tpixel := LargePositiveInteger new: 4.\\\\n\\\\tpixel at: 4 put: 16rFF.\\\\n\\\\tbitsPerChannel = 8 ifTrue: [\\\\n\\\\t\\\\ti := 1.\\\\n\\\\t\\\\t1 to: width do: [ :x |\\\\n\\\\t\\\\t\\\\tpixel\\\\n\\\\t\\\\t\\\\t\\\\tat: 3 put: (thisScanline at: i);\\\\n\\\\t\\\\t\\\\t\\\\tat: 2 put: (thisScanline at: i+1);\\\\n\\\\t\\\\t\\\\t\\\\tat: 1 put: (thisScanline at: i+2).\\\\n\\\\t\\\\t\\\\ttempBits at: x put: pixel.\\\\n\\\\t\\\\t\\\\ti _ i + 3.\\\\n\\\\t\\\\t]\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\ti := 1.\\\\n\\\\t\\\\t1 to: width do: [ :x |\\\\n\\\\t\\\\t\\\\tpixel\\\\n\\\\t\\\\t\\\\t\\\\tat: 3 put: (thisScanline at: i);\\\\n\\\\t\\\\t\\\\t\\\\tat: 2 put: (thisScanline at: i+2);\\\\n\\\\t\\\\t\\\\t\\\\tat: 1 put: (thisScanline at: i+4).\\\\n\\\\t\\\\t\\\\ttempBits at: x put: pixel.\\\\n\\\\t\\\\t\\\\ti _ i + 6.\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\ttransparentPixelValue ifNotNil: [\\\\n\\\\t\\\\t1 to: width do: [ :x |\\\\n\\\\t\\\\t\\\\t(tempBits at: x) = transparentPixelValue ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\ttempBits at: x put: 0.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\ttempForm displayOn: form at: 0@y rule: Form paint.\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'pixel copies' stamp: 'nk 7/27/2004 17:18'!\\\\ncopyPixelsRGB: y at: startX by: incX\\\\n\\\\t\\\\\\\"Handle interlaced RGB color mode (colorType = 2)\\\\\\\"\\\\n\\\\n\\\\t| i pixel tempForm tempBits xx loopsToDo |\\\\n\\\\n\\\\ttempForm _ Form extent: width@1 depth: 32.\\\\n\\\\ttempBits _ tempForm bits.\\\\n\\\\tpixel := LargePositiveInteger new: 4.\\\\n\\\\tpixel at: 4 put: 16rFF.\\\\n\\\\tloopsToDo _ width - startX + incX - 1 // incX.\\\\n\\\\tbitsPerChannel = 8 ifTrue: [\\\\n\\\\t\\\\ti _ (startX // incX * 3) + 1.\\\\n\\\\t\\\\txx _ startX+1.\\\\n\\\\t\\\\t1 to: loopsToDo do: [ :j |\\\\n\\\\t\\\\t\\\\tpixel\\\\n\\\\t\\\\t\\\\t\\\\tat: 3 put: (thisScanline at: i);\\\\n\\\\t\\\\t\\\\t\\\\tat: 2 put: (thisScanline at: i+1);\\\\n\\\\t\\\\t\\\\t\\\\tat: 1 put: (thisScanline at: i+2).\\\\n\\\\t\\\\t\\\\ttempBits at: xx put: pixel.\\\\n\\\\t\\\\t\\\\ti _ i + 3.\\\\n\\\\t\\\\t\\\\txx _ xx + incX.\\\\n\\\\t\\\\t]\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\ti _ (startX // incX * 6) + 1.\\\\n\\\\t\\\\txx _ startX+1.\\\\n\\\\t\\\\t1 to: loopsToDo do: [ :j |\\\\n\\\\t\\\\t\\\\tpixel\\\\n\\\\t\\\\t\\\\t\\\\tat: 3 put: (thisScanline at: i);\\\\n\\\\t\\\\t\\\\t\\\\tat: 2 put: (thisScanline at: i+2);\\\\n\\\\t\\\\t\\\\t\\\\tat: 1 put: (thisScanline at: i+4).\\\\n\\\\t\\\\t\\\\ttempBits at: xx put: pixel.\\\\n\\\\t\\\\t\\\\ti _ i + 6.\\\\n\\\\t\\\\t\\\\txx _ xx + incX.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\ttransparentPixelValue ifNotNil: [\\\\n\\\\t\\\\tstartX to: width-1 by: incX do: [ :x |\\\\n\\\\t\\\\t\\\\t(tempBits at: x+1) = transparentPixelValue ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\ttempBits at: x+1 put: 0.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\ttempForm displayOn: form at: 0@y rule: Form paint.\\\\n\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'pixel copies' stamp: 'ar 2/18/2004 23:58'!\\\\ncopyPixelsRGBA: y\\\\n\\\\t\\\\\\\"Handle non-interlaced RGBA color modes (colorType = 6)\\\\\\\"\\\\n\\\\n\\\\t| i pixel tempForm tempBits ff |\\\\n\\\\tbitsPerChannel = 8 ifTrue: [\\\\n\\\\t\\\\tff := Form extent: width@1 depth: 32 bits: thisScanline.\\\\n\\\\t\\\\tcachedDecoderMap \\\\n\\\\t\\\\t\\\\tifNil:[cachedDecoderMap := self rgbaDecoderMapForDepth: depth].\\\\n\\\\t\\\\t(BitBlt toForm: form)\\\\n\\\\t\\\\t\\\\tsourceForm: ff;\\\\n\\\\t\\\\t\\\\tdestOrigin: 0@y;\\\\n\\\\t\\\\t\\\\tcombinationRule: Form over;\\\\n\\\\t\\\\t\\\\tcolorMap: cachedDecoderMap;\\\\n\\\\t\\\\t\\\\tcopyBits.\\\\n\\\\t\\\\t^self.\\\\n\\\\t].\\\\n\\\\ttempForm _ Form extent: width@1 depth: 32.\\\\n\\\\ttempBits _ tempForm bits.\\\\n\\\\tpixel := LargePositiveInteger new: 4.\\\\n\\\\ti := -7.\\\\n\\\\t0 to: width-1 do: [ :x |\\\\n\\\\t\\\\t\\\\ti := i + 8.\\\\n\\\\t\\\\t\\\\tpixel at: 4 put: (thisScanline at: i+6);\\\\n\\\\t\\\\t\\\\t\\\\tat: 3 put: (thisScanline at: i);\\\\n\\\\t\\\\t\\\\t\\\\tat: 2 put: (thisScanline at: i+2);\\\\n\\\\t\\\\t\\\\t\\\\tat: 1 put: (thisScanline at: i+4).\\\\n\\\\t\\\\t\\\\ttempBits at: x+1 put: pixel.\\\\n\\\\t].\\\\n\\\\ttempForm displayOn: form at: 0@y rule: Form over.\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'pixel copies' stamp: 'nk 7/27/2004 17:57'!\\\\ncopyPixelsRGBA: y at: startX by: incX\\\\n\\\\t\\\\\\\"Handle interlaced RGBA color modes (colorType = 6)\\\\\\\"\\\\n\\\\n\\\\t| i pixel tempForm tempBits |\\\\n\\\\n\\\\ttempForm _ Form extent: width@1 depth: 32.\\\\n\\\\ttempBits _ tempForm bits.\\\\n\\\\tpixel := LargePositiveInteger new: 4.\\\\n\\\\tbitsPerChannel = 8 ifTrue: [\\\\n\\\\t\\\\ti _ (startX // incX << 2) + 1.\\\\n\\\\t\\\\tstartX to: width-1 by: incX do: [ :x |\\\\n\\\\t\\\\t\\\\tpixel at: 4 put: (thisScanline at: i+3);\\\\n\\\\t\\\\t\\\\t\\\\tat: 3 put: (thisScanline at: i);\\\\n\\\\t\\\\t\\\\t\\\\tat: 2 put: (thisScanline at: i+1);\\\\n\\\\t\\\\t\\\\t\\\\tat: 1 put: (thisScanline at: i+2).\\\\n\\\\t\\\\t\\\\ttempBits at: x+1 put: pixel.\\\\n\\\\t\\\\t\\\\ti _ i + 4.\\\\n\\\\t\\\\t]\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\ti _ (startX // incX << 3) +1.\\\\n\\\\t\\\\tstartX to: width-1 by: incX do: [ :x |\\\\n\\\\t\\\\t\\\\tpixel at: 4 put: (thisScanline at: i+6);\\\\n\\\\t\\\\t\\\\t\\\\tat: 3 put: (thisScanline at: i);\\\\n\\\\t\\\\t\\\\t\\\\tat: 2 put: (thisScanline at: i+2);\\\\n\\\\t\\\\t\\\\t\\\\tat: 1 put: (thisScanline at: i+4).\\\\n\\\\t\\\\t\\\\ttempBits at: x+1 put: pixel.\\\\n\\\\t\\\\t\\\\ti _ i + 8.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\ttempForm displayOn: form at: 0@y rule: Form paintAlpha.\\\\n\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'pixel copies' stamp: 'ar 2/19/2004 00:10'!\\\\nrgbaDecoderMapForDepth: decoderDepth\\\\n\\\\tbigEndian ifTrue:[\\\\n\\\\t\\\\tdepth = 16 ifTrue:[\\\\n\\\\t\\\\t\\\\t\\\\\\\"Big endian, 32 -> 16 color mapping.\\\\\\\"\\\\n\\\\t\\\\t\\\\t^ColorMap\\\\n\\\\t\\\\t\\\\t\\\\tshifts: #(-17 -14 -11 0)\\\\n\\\\t\\\\t\\\\t\\\\tmasks: #(16rF8000000 16rF80000 16rF800 16r00)\\\\n\\\\t\\\\t] ifFalse:[\\\\n\\\\t\\\\t\\\\t\\\\\\\"Big endian, 32 -> 32 color mapping\\\\\\\"\\\\n\\\\t\\\\t\\\\t^ColorMap \\\\n\\\\t\\\\t\\\\t\\\\tshifts: #(-8 -8 -8 24) \\\\n\\\\t\\\\t\\\\t\\\\tmasks: #(16rFF000000 16rFF0000 16rFF00 16rFF).\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\tdepth = 16 ifTrue:[\\\\n\\\\t\\\\t\\\\\\\"Little endian, 32 -> 16 color mapping.\\\\\\\"\\\\n\\\\t\\\\t^ColorMap\\\\n\\\\t\\\\t\\\\tshifts: #(7 -6 -19 0)\\\\n\\\\t\\\\t\\\\tmasks: #(16rF8 16rF800 16rF80000 0)\\\\n\\\\t] ifFalse:[\\\\n\\\\t\\\\t\\\\\\\"Little endian, 32 -> 32 color mapping\\\\\\\"\\\\n\\\\t\\\\t^ColorMap \\\\n\\\\t\\\\t\\\\tshifts: #(-16 0 16 0) \\\\n\\\\t\\\\t\\\\tmasks: #(16rFF0000 16rFF00 16rFF 16rFF000000).\\\\n\\\\t].! !\\\\n\\\\n\\\\n!PNGReadWriter methodsFor: 'writing' stamp: 'ar 12/12/2003 16:37'!\\\\nnextPutImage: aForm\\\\n\\\\t\\\\\\\"Write out the given form. We're keeping it simple here, no interlacing, no filters.\\\\\\\"\\\\n\\\\t^self nextPutImage: aForm interlace: 0 filter: 0. \\\\\\\"no filtering\\\\\\\"! !\\\\n\\\\n!PNGReadWriter methodsFor: 'writing' stamp: 'nk 7/30/2004 17:51'!\\\\nnextPutImage: aForm interlace: aMethod filter: aFilterType \\\\n\\\\t\\\\\\\"Note: For now we keep it simple - interlace and filtering are simply ignored\\\\\\\"\\\\n\\\\n\\\\t| crcStream |\\\\n\\\\tbigEndian := SmalltalkImage current isBigEndian.\\\\n\\\\tform := aForm.\\\\n\\\\twidth := aForm width.\\\\n\\\\theight := aForm height.\\\\n\\\\taForm depth <= 8 \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[bitsPerChannel := aForm depth.\\\\n\\\\t\\\\t\\\\tcolorType := 3.\\\\n\\\\t\\\\t\\\\tbytesPerScanline := (width * aForm depth + 7) // 8]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[bitsPerChannel := 8.\\\\n\\\\t\\\\t\\\\tcolorType := 6.\\\\n\\\\t\\\\t\\\\tbytesPerScanline := width * 4].\\\\n\\\\tself writeFileSignature.\\\\n\\\\tcrcStream := WriteStream on: (ByteArray new: 1000).\\\\n\\\\tcrcStream resetToStart.\\\\n\\\\tself writeIHDRChunkOn: crcStream.\\\\n\\\\tself writeChunk: crcStream.\\\\n\\\\tform depth <= 8 \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[crcStream resetToStart.\\\\n\\\\t\\\\t\\\\tself writePLTEChunkOn: crcStream.\\\\n\\\\t\\\\t\\\\tself writeChunk: crcStream.\\\\n\\\\t\\\\t\\\\tform isColorForm \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[crcStream resetToStart.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself writeTRNSChunkOn: crcStream.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself writeChunk: crcStream]].\\\\n\\\\tform depth = 16 \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[crcStream resetToStart.\\\\n\\\\t\\\\t\\\\tself writeSBITChunkOn: crcStream.\\\\n\\\\t\\\\t\\\\tself writeChunk: crcStream].\\\\n\\\\tcrcStream resetToStart.\\\\n\\\\tself writeIDATChunkOn: crcStream.\\\\n\\\\tself writeChunk: crcStream.\\\\n\\\\tcrcStream resetToStart.\\\\n\\\\tself writeIENDChunkOn: crcStream.\\\\n\\\\tself writeChunk: crcStream! !\\\\n\\\\n!PNGReadWriter methodsFor: 'writing' stamp: 'nk 2/17/2004 16:51'!\\\\nupdateCrc: oldCrc from: start to: stop in: aCollection\\\\n\\\\t^ZipWriteStream updateCrc: oldCrc from: start to: stop in: aCollection! !\\\\n\\\\n!PNGReadWriter methodsFor: 'writing' stamp: 'BG 3/16/2005 08:26'!\\\\nwriteChunk: crcStream\\\\n\\\\t| bytes length crc debug |\\\\n\\\\tdebug _ self debugging.\\\\n\\\\tbytes := crcStream originalContents.\\\\n\\\\tlength := crcStream position.\\\\n\\\\tcrc := self updateCrc: 16rFFFFFFFF from: 1 to: length in: bytes.\\\\n\\\\tcrc := crc bitXor: 16rFFFFFFFF.\\\\n\\\\tdebug ifTrue: [ Transcript cr;\\\\n\\\\t\\\\tprint: stream position; space;\\\\n\\\\t\\\\tnextPutAll: (bytes copyFrom: 1 to: 4) asString;\\\\n\\\\t\\\\tnextPutAll: ' len='; print: length;\\\\n\\\\t\\\\tnextPutAll: ' crc=0x'; nextPutAll: crc printStringHex  ].\\\\n\\\\tstream nextNumber: 4 put: length-4. \\\\\\\"exclude chunk name\\\\\\\"\\\\n\\\\tstream next: length putAll: bytes startingAt: 1.\\\\n\\\\tstream nextNumber: 4 put: crc.\\\\n\\\\tdebug ifTrue: [ Transcript nextPutAll: ' afterPos='; print: stream position ].\\\\n\\\\tcrcStream resetToStart.! !\\\\n\\\\n!PNGReadWriter methodsFor: 'writing' stamp: 'ar 12/12/2003 16:40'!\\\\nwriteFileSignature\\\\n\\\\tstream nextPutAll: #(16r89 16r50 16r4E  16r47 16r0D 16r0A 16r1A 16r0A) asByteArray! !\\\\n\\\\n!PNGReadWriter methodsFor: 'writing' stamp: 'nk 2/17/2004 14:57'!\\\\nwriteIDATChunkOn: aStream\\\\n\\\\t\\\\\\\"Write the IDAT chunk\\\\\\\"\\\\n\\\\t| z |\\\\n\\\\taStream nextPutAll: 'IDAT' asByteArray.\\\\n\\\\tz _ ZLibWriteStream on: aStream.\\\\n\\\\tform depth <= 8 \\\\n\\\\t\\\\tifTrue:[self writeType3DataOn: z]\\\\n\\\\t\\\\tifFalse:[ self writeType6DataOn: z].\\\\n\\\\tself debugging ifTrue: [\\\\n\\\\t\\\\tTranscript cr;\\\\n\\\\t\\\\t\\\\tnextPutAll: 'compressed size=';\\\\n\\\\t\\\\t\\\\tprint: aStream position;\\\\n\\\\t\\\\t\\\\tnextPutAll: ' uncompressed size=';\\\\n\\\\t\\\\t\\\\tprint: z position  ]\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'writing' stamp: 'ar 12/12/2003 17:08'!\\\\nwriteIENDChunkOn: aStream\\\\n\\\\t\\\\\\\"Write the IEND chunk\\\\\\\"\\\\n\\\\taStream nextPutAll: 'IEND' asByteArray.! !\\\\n\\\\n!PNGReadWriter methodsFor: 'writing' stamp: 'ar 12/12/2003 17:21'!\\\\nwriteIHDRChunkOn: aStream\\\\n\\\\t\\\\\\\"Write the IHDR chunk\\\\\\\"\\\\n\\\\taStream nextPutAll: 'IHDR' asByteArray.\\\\n\\\\taStream nextInt32Put: width.\\\\n\\\\taStream nextInt32Put: height.\\\\n\\\\taStream nextNumber: 1 put: bitsPerChannel.\\\\n\\\\taStream nextNumber: 1 put: colorType.\\\\n\\\\taStream nextNumber: 1 put: 0. \\\\\\\"compression\\\\\\\"\\\\n\\\\taStream nextNumber: 1 put: 0. \\\\\\\"filter method\\\\\\\"\\\\n\\\\taStream nextNumber: 1 put: 0. \\\\\\\"interlace method\\\\\\\"\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'writing' stamp: 'nk 4/17/2004 19:44'!\\\\nwritePLTEChunkOn: aStream\\\\n\\\\t\\\\\\\"Write the PLTE chunk\\\\\\\"\\\\n\\\\t| r g b colors |\\\\n\\\\taStream nextPutAll: 'PLTE' asByteArray.\\\\n\\\\t(form isColorForm) \\\\n\\\\t\\\\tifTrue:[colors := form colors]\\\\n\\\\t\\\\tifFalse:[colors := Color indexedColors copyFrom: 1 to: (1 bitShift: form depth)].\\\\n\\\\tcolors do:[:aColor|\\\\n\\\\t\\\\tr := (aColor red * 255) truncated.\\\\n\\\\t\\\\tg := (aColor green * 255) truncated.\\\\n\\\\t\\\\tb := (aColor blue * 255) truncated.\\\\n\\\\t\\\\taStream nextPut: r; nextPut: g; nextPut: b.\\\\n\\\\t].! !\\\\n\\\\n!PNGReadWriter methodsFor: 'writing' stamp: 'ar 12/12/2003 18:29'!\\\\nwriteSBITChunkOn: aStream\\\\n\\\\t\\\\\\\"Write the IDAT chunk\\\\\\\"\\\\n\\\\taStream nextPutAll: 'sBIT' asByteArray.\\\\n\\\\tform depth = 16 ifFalse:[self error: 'Unimplemented feature'].\\\\n\\\\taStream nextPut: 5.\\\\n\\\\taStream nextPut: 5.\\\\n\\\\taStream nextPut: 5.\\\\n\\\\taStream nextPut: 1.! !\\\\n\\\\n!PNGReadWriter methodsFor: 'writing' stamp: 'ar 12/12/2003 17:34'!\\\\nwriteTRNSChunkOn: aStream\\\\n\\\\t\\\\\\\"Write out tRNS chunk\\\\\\\"\\\\n\\\\taStream nextPutAll: 'tRNS' asByteArray.\\\\n\\\\tform colors do:[:aColor|\\\\n\\\\t\\\\taStream nextPut: (aColor alpha * 255) truncated.\\\\n\\\\t].! !\\\\n\\\\n!PNGReadWriter methodsFor: 'writing' stamp: 'ar 1/1/1970 20:58'!\\\\nwriteType3DataOn: zStream\\\\n\\\\t\\\\\\\"Write color indexed data.\\\\\\\"\\\\n\\\\t| scanline hack hackBlt swizzleBlt swizzleHack hackDepth |\\\\n\\\\tscanline := ByteArray new: bytesPerScanline + 3 // 4 * 4.\\\\n\\\\thackDepth := bigEndian ifTrue:[form depth] ifFalse:[form depth negated].\\\\n\\\\thack := Form extent: width@1 depth: hackDepth bits: scanline.\\\\n\\\\thackBlt := BitBlt toForm: hack.\\\\n\\\\thackBlt sourceForm: form.\\\\n\\\\thackBlt combinationRule: Form over.\\\\n\\\\thackBlt destOrigin: 0@0.\\\\n\\\\thackBlt width: width; height: 1.\\\\n\\\\t(form depth < 8 and:[bigEndian not]) ifTrue:[\\\\n\\\\t\\\\tswizzleHack := Form new hackBits: scanline.\\\\n\\\\t\\\\tswizzleBlt := BitBlt toForm: swizzleHack.\\\\n\\\\t\\\\tswizzleBlt sourceForm: swizzleHack.\\\\n\\\\t\\\\tswizzleBlt combinationRule: Form over.\\\\n\\\\t\\\\tswizzleBlt colorMap: (StandardSwizzleMaps at: form depth).\\\\n\\\\t].\\\\n\\\\t0 to: height-1 do:[:i|\\\\n\\\\t\\\\thackBlt sourceOrigin: 0@i; copyBits.\\\\n\\\\t\\\\tswizzleBlt ifNotNil:[swizzleBlt copyBits].\\\\n\\\\t\\\\tzStream nextPut: 0. \\\\\\\"filterType\\\\\\\"\\\\n\\\\t\\\\tzStream next: bytesPerScanline putAll: scanline startingAt: 1.\\\\n\\\\t].\\\\n\\\\tzStream close.! !\\\\n\\\\n!PNGReadWriter methodsFor: 'writing' stamp: 'ar 2/19/2004 00:10'!\\\\nwriteType6DataOn: zStream\\\\n\\\\t\\\\\\\"Write RGBA data.\\\\\\\"\\\\n\\\\t| scanline hack hackBlt cm miscBlt |\\\\n\\\\tscanline := ByteArray new: bytesPerScanline.\\\\n\\\\thack := Form extent: width@1 depth: 32 bits: scanline.\\\\n\\\\tform depth = 16 ifTrue:[\\\\n\\\\t\\\\t\\\\\\\"Expand 16 -> 32\\\\\\\"\\\\n\\\\t\\\\tmiscBlt := BitBlt toForm: hack.\\\\n\\\\t\\\\tmiscBlt sourceForm: form.\\\\n\\\\t\\\\tmiscBlt combinationRule: Form over.\\\\n\\\\t\\\\tmiscBlt destOrigin: 0@0.\\\\n\\\\t\\\\tmiscBlt width: width; height: 1.\\\\n\\\\t].\\\\n\\\\thackBlt := BitBlt toForm: hack.\\\\n\\\\thackBlt sourceForm: (miscBlt ifNil:[form] ifNotNil:[hack]).\\\\n\\\\thackBlt combinationRule: Form over.\\\\n\\\\thackBlt destOrigin: 0@0.\\\\n\\\\thackBlt width: width; height: 1.\\\\n\\\\tbigEndian ifTrue:[\\\\n\\\\t\\\\tcm := ColorMap \\\\n\\\\t\\\\t\\\\tshifts: #(8 8 8 -24) \\\\n\\\\t\\\\t\\\\tmasks: #(16rFF0000 16rFF00 16rFF 16rFF000000).\\\\n\\\\t] ifFalse:[\\\\n\\\\t\\\\tcm := ColorMap \\\\n\\\\t\\\\t\\\\tshifts: #(-16 0 16 0) \\\\n\\\\t\\\\t\\\\tmasks: #(16rFF0000 16rFF00 16rFF 16rFF000000).\\\\n\\\\t].\\\\n\\\\thackBlt colorMap: cm.\\\\n\\\\t0 to: height-1 do:[:i|\\\\n\\\\t\\\\tmiscBlt ifNil:[\\\\n\\\\t\\\\t\\\\thackBlt sourceOrigin: 0@i; copyBits.\\\\n\\\\t\\\\t] ifNotNil:[\\\\n\\\\t\\\\t\\\\tmiscBlt sourceOrigin: 0@i; copyBits.\\\\n\\\\t\\\\t\\\\thack fixAlpha.\\\\n\\\\t\\\\t\\\\thackBlt copyBits.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tzStream nextPut: 0. \\\\\\\"filterType\\\\\\\"\\\\n\\\\t\\\\tzStream nextPutAll: scanline.\\\\n\\\\t].\\\\n\\\\tzStream close.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPNGReadWriter class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PNGReadWriter class methodsFor: 'as yet unclassified' stamp: 'ar 2/11/2004 00:54'!\\\\ncomputeSwizzleMapForDepth: depth\\\\n\\\\t\\\\\\\"Answer a map that maps pixels in a word to their opposite location. Used for 'middle-endian' forms where the byte-order is different from the bit order (good joke, eh?).\\\\\\\"\\\\n\\\\t| map swizzled |\\\\n\\\\tmap := Bitmap new: 256.\\\\n\\\\tdepth = 4 ifTrue:[\\\\n\\\\t\\\\t0 to: 255 do:[:pix|\\\\n\\\\t\\\\t\\\\tswizzled := 0.\\\\n\\\\t\\\\t\\\\tswizzled := swizzled bitOr: (((pix bitShift: 0) bitAnd: 15) bitShift: 4).\\\\n\\\\t\\\\t\\\\tswizzled := swizzled bitOr: (((pix bitShift: -4) bitAnd: 15) bitShift: 0).\\\\n\\\\t\\\\t\\\\tmap at: pix+1 put: swizzled.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\t^ColorMap colors: map\\\\n\\\\t].\\\\n\\\\n\\\\tdepth = 2 ifTrue:[\\\\n\\\\t\\\\t0 to: 255 do:[:pix|\\\\n\\\\t\\\\t\\\\tswizzled := 0.\\\\n\\\\t\\\\t\\\\tswizzled := swizzled bitOr: (((pix bitShift: 0) bitAnd: 3) bitShift: 6).\\\\n\\\\t\\\\t\\\\tswizzled := swizzled bitOr: (((pix bitShift: -2) bitAnd: 3) bitShift: 4).\\\\n\\\\t\\\\t\\\\tswizzled := swizzled bitOr: (((pix bitShift: -4) bitAnd: 3) bitShift: 2).\\\\n\\\\t\\\\t\\\\tswizzled := swizzled bitOr: (((pix bitShift: -6) bitAnd: 3) bitShift: 0).\\\\n\\\\t\\\\t\\\\tmap at: pix+1 put: swizzled.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\t^ColorMap colors: map\\\\n\\\\t].\\\\n\\\\n\\\\tdepth = 1 ifTrue:[\\\\n\\\\t\\\\t0 to: 255 do:[:pix|\\\\n\\\\t\\\\t\\\\tswizzled := 0.\\\\n\\\\t\\\\t\\\\tswizzled := swizzled bitOr: (((pix bitShift: 0) bitAnd: 1) bitShift: 7).\\\\n\\\\t\\\\t\\\\tswizzled := swizzled bitOr: (((pix bitShift: -1) bitAnd: 1) bitShift: 6).\\\\n\\\\t\\\\t\\\\tswizzled := swizzled bitOr: (((pix bitShift: -2) bitAnd: 1) bitShift: 5).\\\\n\\\\t\\\\t\\\\tswizzled := swizzled bitOr: (((pix bitShift: -3) bitAnd: 1) bitShift: 4).\\\\n\\\\t\\\\t\\\\tswizzled := swizzled bitOr: (((pix bitShift: -4) bitAnd: 1) bitShift: 3).\\\\n\\\\t\\\\t\\\\tswizzled := swizzled bitOr: (((pix bitShift: -5) bitAnd: 1) bitShift: 2).\\\\n\\\\t\\\\t\\\\tswizzled := swizzled bitOr: (((pix bitShift: -6) bitAnd: 1) bitShift: 1).\\\\n\\\\t\\\\t\\\\tswizzled := swizzled bitOr: (((pix bitShift: -7) bitAnd: 1) bitShift: 0).\\\\n\\\\t\\\\t\\\\tmap at: pix+1 put: swizzled.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\t^ColorMap colors: map\\\\n\\\\t].\\\\n\\\\tself error: 'Unrecognized depth'! !\\\\n\\\\n!PNGReadWriter class methodsFor: 'as yet unclassified' stamp: 'RAA 11/7/2000 09:22'!\\\\ncreateAFormFrom: data\\\\n\\\\n\\\\t| error f |\\\\n\\\\n\\\\terror _ ''.\\\\n\\\\tf _ [\\\\n\\\\t\\\\tself formFromStream: (RWBinaryOrTextStream with: data)\\\\n\\\\t] ifError: [ :a :b |\\\\n\\\\t\\\\terror _ a printString,'  ',b printString.\\\\n\\\\t\\\\t(StringMorph contents: error) color: Color red; imageForm\\\\n\\\\t].\\\\n\\\\t^{f. error}! !\\\\n\\\\n!PNGReadWriter class methodsFor: 'as yet unclassified' stamp: 'RAA 11/7/2000 09:20'!\\\\ndebugging: aBoolean\\\\n\\\\n\\\\tDebugging _ aBoolean! !\\\\n\\\\n!PNGReadWriter class methodsFor: 'as yet unclassified' stamp: 'ar 2/11/2004 00:55'!\\\\ninitialize\\\\n\\\\t\\\\\\\"\\\\n\\\\tPNGReadWriter initialize\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\tBPP _ {\\\\t#(1 2 4 8 16).\\\\n\\\\t\\\\t\\\\t#(0 0 0 0 0).\\\\n\\\\t\\\\t\\\\t#(0 0 0 24 48).\\\\n\\\\t\\\\t\\\\t#(1 2 4 8 0).\\\\n\\\\t\\\\t\\\\t#(0 0 0 16 32).\\\\n\\\\t\\\\t\\\\t#(0 0 0 0 0).\\\\n\\\\t\\\\t\\\\t#(0 0 0 32 64).\\\\n\\\\t\\\\t\\\\t#(0 0 0 0 0) }.\\\\n\\\\n\\\\tBlockHeight _ #(8 8 4 4 2 2 1).\\\\n\\\\tBlockWidth _ #(8 4 4 2 2 1 1).\\\\n\\\\n\\\\tStandardColors := Color indexedColors collect:[:aColor|\\\\n\\\\t\\\\tColor \\\\n\\\\t\\\\t\\\\tr: (aColor red * 255) truncated / 255\\\\n\\\\t\\\\t\\\\tg: (aColor green * 255) truncated / 255\\\\n\\\\t\\\\t\\\\tb: (aColor blue * 255) truncated / 255.\\\\n\\\\t].\\\\n\\\\n\\\\tStandardSwizzleMaps := Array new: 4.\\\\n\\\\t#(1 2 4) do:[:i| StandardSwizzleMaps at: i put: (self computeSwizzleMapForDepth: i)].! !\\\\n\\\\n!PNGReadWriter class methodsFor: 'as yet unclassified' stamp: 'RAA 11/7/2000 09:15'!\\\\ninsertMorph: aMorph named: aString into: aBook\\\\n\\\\n\\\\t| newPage |\\\\n\\\\n\\\\taBook ifNil: [^self].\\\\n\\\\tnewPage _ aBook insertPageLabel: aString morphs: {aMorph}.\\\\n\\\\tnewPage color: Color lightYellow.\\\\n\\\\tnewPage extent: (\\\\n\\\\t\\\\tnewPage submorphs inject: 10@10 into: [ :ex :m |\\\\n\\\\t\\\\t\\\\tm left: 10.\\\\n\\\\t\\\\t\\\\tex max: m width @ m bottom\\\\n\\\\t\\\\t]\\\\n\\\\t) + (20@20).\\\\n! !\\\\n\\\\n!PNGReadWriter class methodsFor: 'as yet unclassified' stamp: 'RAA 12/10/2000 10:11'!\\\\ntest1\\\\n\\\\\\\"PNGReadWriter test1\\\\\\\"\\\\n\\\\t| data t error d0 d1 f fileInfo book result d2 |\\\\n\\\\n\\\\tDebugging _ true.\\\\n\\\\t1 = 1 ifTrue: [\\\\n\\\\t\\\\tbook _ BookMorph new.\\\\n\\\\t\\\\tbook setProperty: #transitionSpec toValue: {'silence'. #none. #none}.\\\\n\\\\t].\\\\n\\\\td0 _ FileDirectory default.\\\\n\\\\td1 _ d0 directoryNamed: 'PngSuite Folder'.\\\\n\\\\td2 _ d0 directoryNamed: 'BIG PNG'.\\\\n\\\\t{d0. d1. d2}.\\\\t\\\\t\\\\\\\"keep compiler quiet\\\\\\\"\\\\n\\\\\\\"==\\\\ncitrus_none_sub.png\\\\ncitrus_adm7_adap.png\\\\ncitrus_adm7_aver.png\\\\ncitrus_adm7_non.png\\\\ncitrus_adm7_paeth.png\\\\npngs-img-ie5mac.png\\\\n==\\\\\\\"\\\\n\\\\tfileInfo _ {\\\\n\\\\t\\\\td2. {'citrus_adm7_adap.png'}.\\\\n\\\\t\\\\t\\\\\\\"d1. d1 fileNames.\\\\\\\"\\\\n\\\\t}.\\\\n\\\\tfileInfo pairsDo: [ :dir :fileNames |\\\\n\\\\t\\\\tfileNames do: [ :each |\\\\n\\\\t\\\\t\\\\tTranscript cr; show: each.\\\\n\\\\t\\\\t\\\\tdata _ (dir fileNamed: each) contentsOfEntireFile.\\\\n\\\\t\\\\t\\\\terror _ ''.\\\\n\\\\t\\\\t\\\\tMessageTally spyOn: [\\\\n\\\\t\\\\t\\\\t\\\\tt _ [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tresult _ self createAFormFrom: data.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tf_ result first.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\terror _ result second.\\\\n\\\\t\\\\t\\\\t\\\\t] timeToRun.].\\\\n\\\\t\\\\t\\\\tself insertMorph: f asMorph named: each into: book.\\\\n\\\\t\\\\t\\\\tTranscript show: each,'  ',data size printString,' = ',t printString,' ms',error; cr.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\tbook ifNotNil: [book openInWorld].\\\\n\\\\tDebugging _ false.! !\\\\n\\\\n\\\\n!PNGReadWriter class methodsFor: 'image reading/writing' stamp: 'nk 7/16/2003 17:57'!\\\\ntypicalFileExtensions\\\\n\\\\t\\\\\\\"Answer a collection of file extensions (lowercase) which files that I can read might commonly have\\\\\\\"\\\\n\\\\t^#('png')! !\\\\nTestCase subclass: #PNGReadWriterTest\\\\n\\\\tinstanceVariableNames: 'fileName'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'GraphicsTests-Files'!\\\\n\\\\n!PNGReadWriterTest methodsFor: 'helpers' stamp: 'ar 2/11/2004 00:42'!\\\\ndrawStuffOn: aForm\\\\n\\\\t\\\\\\\"Draw stuff on aForm. Avoid any symmetry.\\\\\\\"\\\\n\\\\t| canvas |\\\\n\\\\tcanvas := FormCanvas on: aForm.\\\\n\\\\tcanvas frameAndFillRectangle: (1@1 corner: aForm extent - 15) fillColor: Color red borderWidth: 3 borderColor: Color green.\\\\n\\\\tcanvas fillOval: (aForm boundingBox topRight - (15@-5) extent: 20@20) color: Color blue borderWidth: 1 borderColor: Color white.\\\\n\\\\t^aForm\\\\n\\\\t\\\\\\\"(PNGReadWriterTest new drawStuffOn: (Form extent: 32@32 depth: 16)) display\\\\\\\"! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'helpers' stamp: 'ar 2/11/2004 00:42'!\\\\ndrawTransparentStuffOn: aForm\\\\n\\\\t\\\\\\\"Draw stuff on aForm. Avoid any symmetry.\\\\\\\"\\\\n\\\\t| canvas |\\\\n\\\\tcanvas := FormCanvas on: aForm.\\\\n\\\\tcanvas frameAndFillRectangle: (1@1 corner: aForm extent - 15) fillColor: (Color red alpha: 0.25) borderWidth: 3 borderColor: (Color green alpha: 0.5).\\\\n\\\\tcanvas fillOval: (aForm boundingBox topRight - (15@-5) extent: 20@20) color: (Color white alpha: 0.75) borderWidth: 1 borderColor: Color blue.\\\\n\\\\t^aForm\\\\n\\\\t\\\\\\\"(PNGReadWriterTest new drawStuffOn: (Form extent: 32@32 depth: 16)) display\\\\\\\"! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'helpers' stamp: 'nk 4/17/2004 19:45'!\\\\nencodeAndDecode: original\\\\n\\\\t\\\\\\\"Make sure that the given form is encoded and decoded correctly\\\\\\\"\\\\n\\\\t| stream bytes decoded maxErr |\\\\n\\\\t\\\\\\\"encode\\\\\\\"\\\\n\\\\tstream := ByteArray new writeStream.\\\\n\\\\t(PNGReadWriter on: stream) nextPutImage: original; close.\\\\n\\\\tbytes := stream contents.\\\\n\\\\n\\\\tself writeEncoded: bytes.\\\\n\\\\n\\\\t\\\\\\\"decode\\\\\\\"\\\\n\\\\tstream := self readEncoded: bytes.\\\\n\\\\tdecoded := (PNGReadWriter new on: stream) nextImage.\\\\n\\\\tdecoded display.\\\\n\\\\n\\\\t\\\\\\\"compare\\\\\\\"\\\\n\\\\tself assert: original width = decoded width.\\\\n\\\\tself assert: original height = decoded height.\\\\n\\\\tself assert: original depth = decoded depth.\\\\n\\\\tself assert: original bits = decoded bits.\\\\n\\\\tself assert: original class == decoded class.\\\\n\\\\t(original isColorForm) ifTrue:[\\\\n\\\\t\\\\toriginal colors with: decoded colors do:[:c1 :c2|\\\\n\\\\t\\\\t\\\\t\\\\\\\"we must round here due to encoding errors\\\\\\\"\\\\n\\\\t\\\\t\\\\tmaxErr := 1. \\\\\\\"max. error for 8bit rgb component\\\\\\\"\\\\n\\\\t\\\\t\\\\tself assert: ((c1 red * 255) truncated - (c2 red * 255) truncated) abs <= maxErr.\\\\n\\\\t\\\\t\\\\tself assert: ((c1 green * 255) truncated - (c2 green * 255) truncated) abs <= maxErr.\\\\n\\\\t\\\\t\\\\tself assert: ((c1 blue * 255) truncated - (c2 blue * 255) truncated) abs <= maxErr.\\\\n\\\\t\\\\t\\\\tself assert: ((c1 alpha * 255) truncated - (c2 alpha * 255) truncated) abs <= maxErr.\\\\n\\\\t\\\\t].\\\\n\\\\t].! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'helpers' stamp: 'ar 2/12/2004 22:49'!\\\\nencodeAndDecodeAlpha: original\\\\n\\\\tfileName := 'testAlpha', original depth printString,'.png'.\\\\n\\\\tself encodeAndDecode: original.! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'helpers' stamp: 'ar 2/18/2004 23:49'!\\\\nencodeAndDecodeColor: aColor depth: aDepth\\\\n\\\\t| aForm |\\\\n\\\\tfileName := 'testColor', aColor name, aDepth printString,'.png'.\\\\n\\\\taForm := Form extent: 32@32 depth: aDepth.\\\\n\\\\taForm fillColor: aColor.\\\\n\\\\tself encodeAndDecode: aForm.\\\\n! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'helpers' stamp: 'nk 2/17/2004 11:02'!\\\\nencodeAndDecodeDisplay: depth\\\\n\\\\t| form |\\\\n\\\\tfileName := 'testDisplay', depth printString,'.png'.\\\\n\\\\tform := Form extent: (Display extent min: 560@560) depth: depth.\\\\n\\\\tSmalltalk isMorphic \\\\n\\\\t\\\\tifTrue:[World fullDrawOn: form getCanvas]\\\\n\\\\t\\\\tifFalse:[Display displayOn: form].\\\\n\\\\tself encodeAndDecode: form.! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'helpers' stamp: 'ar 2/12/2004 22:50'!\\\\nencodeAndDecodeForm: original\\\\n\\\\tfileName := 'testForm', original depth printString,'.png'.\\\\n\\\\tself encodeAndDecode: original.! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'helpers' stamp: 'nk 4/17/2004 19:45'!\\\\nencodeAndDecodeReverse: original\\\\n\\\\t\\\\\\\"Make sure that the given form is encoded and decoded correctly\\\\\\\"\\\\n\\\\t| stream bytes decoded maxErr reversed |\\\\n\\\\tfileName := 'testReverse', original depth printString,'.png'.\\\\n\\\\tself assert: original class == Form. \\\\\\\"won't work with ColorForm\\\\\\\"\\\\n\\\\t\\\\\\\"Switch pixel order\\\\\\\"\\\\n\\\\treversed := Form extent: original extent depth: original depth negated.\\\\n\\\\toriginal displayOn: reversed.\\\\n\\\\tself assert: original width = reversed width.\\\\n\\\\tself assert: original height = reversed height.\\\\n\\\\tself assert: original depth = reversed depth.\\\\n\\\\tself deny: original nativeDepth = reversed nativeDepth.\\\\n\\\\toriginal depth = 32\\\\n\\\\t\\\\tifTrue:[self assert: original bits = reversed bits]\\\\n\\\\t\\\\tifFalse:[self deny: original bits = reversed bits].\\\\n\\\\n\\\\t\\\\\\\"encode\\\\\\\"\\\\n\\\\tstream := ByteArray new writeStream.\\\\n\\\\t(PNGReadWriter on: stream) nextPutImage: reversed; close.\\\\n\\\\tbytes := stream contents.\\\\n\\\\tself writeEncoded: bytes.\\\\n\\\\n\\\\t\\\\\\\"decode\\\\\\\"\\\\n\\\\tstream := bytes readStream.\\\\n\\\\tdecoded := (PNGReadWriter new on: stream) nextImage.\\\\n\\\\tdecoded display.\\\\n\\\\n\\\\t\\\\\\\"compare\\\\\\\"\\\\n\\\\tself assert: original width = decoded width.\\\\n\\\\tself assert: original height = decoded height.\\\\n\\\\tself assert: original depth = decoded depth.\\\\n\\\\tself assert: original bits = decoded bits.\\\\n\\\\tself assert: original class == decoded class.\\\\n\\\\t(original isColorForm) ifTrue:[\\\\n\\\\t\\\\toriginal colors with: decoded colors do:[:c1 :c2|\\\\n\\\\t\\\\t\\\\t\\\\\\\"we must round here due to encoding errors\\\\\\\"\\\\n\\\\t\\\\t\\\\tmaxErr := 1. \\\\\\\"max. error for 8bit rgb component\\\\\\\"\\\\n\\\\t\\\\t\\\\tself assert: ((c1 red * 255) truncated - (c2 red * 255) truncated) abs <= maxErr.\\\\n\\\\t\\\\t\\\\tself assert: ((c1 green * 255) truncated - (c2 green * 255) truncated) abs <= maxErr.\\\\n\\\\t\\\\t\\\\tself assert: ((c1 blue * 255) truncated - (c2 blue * 255) truncated) abs <= maxErr.\\\\n\\\\t\\\\t\\\\tself assert: ((c1 alpha * 255) truncated - (c2 alpha * 255) truncated) abs <= maxErr.\\\\n\\\\t\\\\t].\\\\n\\\\t].! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'helpers' stamp: 'nk 2/17/2004 18:18'!\\\\nencodeAndDecodeStream: file\\\\n\\\\t| aForm |\\\\n\\\\tfile reset.\\\\n\\\\t(PNGReadWriter new on: file) understandsImageFormat ifFalse:[^self error: 'don''t understand format!!' ].\\\\n\\\\tfile reset.\\\\n\\\\taForm := (PNGReadWriter new on: file) nextImage.\\\\n\\\\taForm ifNil:[^self error: 'nil form' ].\\\\n\\\\taForm display.\\\\n\\\\tself encodeAndDecode: aForm.\\\\n! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'helpers' stamp: 'ar 2/12/2004 22:36'!\\\\nencodeAndDecodeWithColors: aColorForm\\\\n\\\\t\\\\\\\"Screw around with aColorForm colors\\\\\\\"\\\\n\\\\t| colors nColors indexedColors max myRandom |\\\\n\\\\tfileName := 'testColors', aColorForm depth printString,'.png'.\\\\n\\\\tindexedColors := Color indexedColors.\\\\n\\\\tnColors := 1 bitShift: aColorForm depth.\\\\n\\\\tcolors := WriteStream on: Array new.\\\\n\\\\n\\\\t\\\\\\\"Make first half translucent\\\\\\\"\\\\n\\\\tmax := nColors // 2.\\\\n\\\\t1 to: max do:[:i|\\\\n\\\\t\\\\tcolors nextPut: ((indexedColors at: i) alpha: i / max asFloat).\\\\n\\\\t].\\\\n\\\\n\\\\t\\\\\\\"Make random choices for second half\\\\\\\"\\\\n\\\\tmyRandom := Random seed: 42315.\\\\n\\\\tmax to: nColors do:[:i|\\\\n\\\\t\\\\tcolors nextPut: (indexedColors atRandom: myRandom).\\\\n\\\\t].\\\\n! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'helpers' stamp: 'ar 2/29/2004 03:55'!\\\\nencodeAndDecodeWithError: aStream\\\\n\\\\tself should:[self encodeAndDecodeStream: aStream] raise: Error! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'helpers' stamp: 'nk 2/17/2004 11:10'!\\\\nreadEncoded: bytes\\\\n\\\\t\\\\\\\"Answer a ReadStream on the file named by fileName, if possible; else a ReadStream on bytes\\\\\\\"\\\\n\\\\n\\\\tfileName ifNil:[^ bytes readStream ].\\\\n\\\\t^(FileStream oldFileOrNoneNamed: fileName) ifNil: [ \\\\n\\\\t\\\\tTranscript nextPutAll: 'can''t open ', fileName; cr.\\\\n\\\\t\\\\tbytes readStream ].\\\\n! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'helpers' stamp: 'ar 2/12/2004 22:45'!\\\\nsetUp\\\\n\\\\tfileName := nil.! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'helpers' stamp: 'nk 2/17/2004 11:29'!\\\\ntearDown\\\\n\\\\tWorld changed.! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'helpers' stamp: 'ar 2/12/2004 22:51'!\\\\nwriteEncoded: bytes\\\\n\\\\t| file |\\\\n\\\\tfileName ifNil:[^self].\\\\n\\\\tfalse ifTrue:[^self].\\\\n\\\\tfile := FileStream forceNewFileNamed: fileName.\\\\n\\\\t[file nextPutAll: bytes] ensure:[file close].! !\\\\n\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/12/2004 22:50'!\\\\ntest16Bit\\\\n\\\\tself encodeAndDecodeForm: (self drawStuffOn: (Form extent: 33@33 depth: 16))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/11/2004 00:39'!\\\\ntest16BitDisplay\\\\n\\\\tself encodeAndDecodeDisplay: 16! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/11/2004 01:57'!\\\\ntest16BitReversed\\\\n\\\\tself encodeAndDecodeReverse: (self drawStuffOn: (Form extent: 33@33 depth: 16))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/12/2004 22:50'!\\\\ntest1Bit\\\\n\\\\tself encodeAndDecodeForm: (self drawStuffOn: (Form extent: 33@33 depth: 1))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/11/2004 00:43'!\\\\ntest1BitColors\\\\n\\\\tself encodeAndDecodeWithColors: (self drawStuffOn: (Form extent: 33@33 depth: 1))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/11/2004 00:39'!\\\\ntest1BitDisplay\\\\n\\\\tself encodeAndDecodeDisplay: 1! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/11/2004 01:56'!\\\\ntest1BitReversed\\\\n\\\\tself encodeAndDecodeReverse: (self drawStuffOn: (Form extent: 33@33 depth: 1))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/12/2004 22:50'!\\\\ntest2Bit\\\\n\\\\tself encodeAndDecodeForm: (self drawStuffOn: (Form extent: 33@33 depth: 2))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/11/2004 00:43'!\\\\ntest2BitColors\\\\n\\\\tself encodeAndDecodeWithColors: (self drawStuffOn: (Form extent: 33@33 depth: 2))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/11/2004 00:39'!\\\\ntest2BitDisplay\\\\n\\\\tself encodeAndDecodeDisplay: 2! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/11/2004 01:56'!\\\\ntest2BitReversed\\\\n\\\\tself encodeAndDecodeReverse: (self drawStuffOn: (Form extent: 33@33 depth: 2))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/12/2004 22:50'!\\\\ntest32Bit\\\\n\\\\tself encodeAndDecodeForm: (self drawStuffOn: (Form extent: 33@33 depth: 32))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/11/2004 00:39'!\\\\ntest32BitDisplay\\\\n\\\\tself encodeAndDecodeDisplay: 32! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/11/2004 01:57'!\\\\ntest32BitReversed\\\\n\\\\tself encodeAndDecodeReverse: (self drawStuffOn: (Form extent: 33@33 depth: 32))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/12/2004 22:50'!\\\\ntest4Bit\\\\n\\\\tself encodeAndDecodeForm: (self drawStuffOn: (Form extent: 33@33 depth: 4))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/11/2004 00:44'!\\\\ntest4BitColors\\\\n\\\\tself encodeAndDecodeWithColors: (self drawStuffOn: (Form extent: 33@33 depth: 4))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/11/2004 00:39'!\\\\ntest4BitDisplay\\\\n\\\\tself encodeAndDecodeDisplay: 4! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/11/2004 01:56'!\\\\ntest4BitReversed\\\\n\\\\tself encodeAndDecodeReverse: (self drawStuffOn: (Form extent: 33@33 depth: 4))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/12/2004 22:50'!\\\\ntest8Bit\\\\n\\\\tself encodeAndDecodeForm: (self drawStuffOn: (Form extent: 33@33 depth: 8))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/11/2004 00:44'!\\\\ntest8BitColors\\\\n\\\\tself encodeAndDecodeWithColors: (self drawStuffOn: (Form extent: 33@33 depth: 8))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/11/2004 00:39'!\\\\ntest8BitDisplay\\\\n\\\\tself encodeAndDecodeDisplay: 8! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/11/2004 01:57'!\\\\ntest8BitReversed\\\\n\\\\tself encodeAndDecodeReverse: (self drawStuffOn: (Form extent: 33@33 depth: 8))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/12/2004 22:49'!\\\\ntestAlphaCoding\\\\n\\\\tself encodeAndDecodeAlpha: (self drawTransparentStuffOn: (Form extent: 33@33 depth: 32))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/29/2004 03:55'!\\\\ntestPngSuite\\\\n\\\\t\\\\\\\"Requires the suite from \\\\n\\\\t\\\\tftp://swrinde.nde.swri.edu/pub/png/images/suite/PngSuite.zip\\\\n\\\\tto be present as PngSuite.zip\\\\\\\"\\\\n\\\\t| file zip entries |\\\\n\\\\t[file := FileStream readOnlyFileNamed: 'PngSuite.zip'] on: Error do:[:ex| ex return].\\\\n\\\\tfile ifNil:[^self].\\\\n\\\\t[zip := ZipArchive new readFrom: file.\\\\n\\\\tentries := zip members select:[:mbr| mbr fileName asLowercase endsWith: '.png'].\\\\n\\\\tentries do:[:mbr| \\\\n\\\\t\\\\t(mbr fileName asLowercase first = $x)\\\\n\\\\t\\\\t\\\\tifTrue: [self encodeAndDecodeWithError: mbr contentStream ]\\\\n\\\\t\\\\t\\\\tifFalse: [self encodeAndDecodeStream: mbr contentStream ] ].\\\\n\\\\t] ensure:[file close].! !\\\\n\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - colors' stamp: 'ar 2/18/2004 23:50'!\\\\ntestBlack16\\\\n\\\\tself encodeAndDecodeColor: Color blue depth: 16! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - colors' stamp: 'ar 2/18/2004 23:50'!\\\\ntestBlack32\\\\n\\\\tself encodeAndDecodeColor: Color blue depth: 32! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - colors' stamp: 'ar 2/18/2004 23:50'!\\\\ntestBlack8\\\\n\\\\tself encodeAndDecodeColor: Color blue depth: 8! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - colors' stamp: 'ar 2/18/2004 23:50'!\\\\ntestBlue16\\\\n\\\\tself encodeAndDecodeColor: Color blue depth: 16! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - colors' stamp: 'ar 2/18/2004 23:50'!\\\\ntestBlue32\\\\n\\\\tself encodeAndDecodeColor: Color blue depth: 32! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - colors' stamp: 'ar 2/18/2004 23:50'!\\\\ntestBlue8\\\\n\\\\tself encodeAndDecodeColor: Color blue depth: 8! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - colors' stamp: 'ar 2/18/2004 23:50'!\\\\ntestGreen16\\\\n\\\\tself encodeAndDecodeColor: Color green depth: 16! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - colors' stamp: 'ar 2/18/2004 23:50'!\\\\ntestGreen32\\\\n\\\\tself encodeAndDecodeColor: Color green depth: 32! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - colors' stamp: 'ar 2/18/2004 23:49'!\\\\ntestGreen8\\\\n\\\\tself encodeAndDecodeColor: Color green depth: 8! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - colors' stamp: 'ar 2/18/2004 23:49'!\\\\ntestRed16\\\\n\\\\tself encodeAndDecodeColor: Color red depth: 16! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - colors' stamp: 'ar 2/18/2004 23:48'!\\\\ntestRed32\\\\n\\\\tself encodeAndDecodeColor: Color red depth: 32! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - colors' stamp: 'ar 2/18/2004 23:49'!\\\\ntestRed8\\\\n\\\\tself encodeAndDecodeColor: Color red depth: 8! !\\\\n\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - decoding' stamp: 'ar 2/19/2004 00:25'!\\\\ncoloredFiles16\\\\n\\\\t\\\\\\\"Created by\\\\n\\\\t\\\\t{Color red. Color green. Color blue. Color black} collect:[:fillC|\\\\n\\\\t\\\\t\\\\t| ff bytes |\\\\n\\\\t\\\\t\\\\tff := Form extent: 32@32 depth: 16.\\\\n\\\\t\\\\t\\\\tff fillColor: fillC.\\\\n\\\\t\\\\t\\\\tbytes := WriteStream on: ByteArray new.\\\\n\\\\t\\\\t\\\\tPNGReadWriter putForm: ff onStream: bytes.\\\\n\\\\t\\\\t\\\\tfillC ->\\\\n\\\\t\\\\t\\\\t\\\\t(Base64MimeConverter mimeEncode: (bytes contents readStream)) contents\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\\\\"\\\\n\\\\t^{Color red-> \\\\n'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQFBQUBSsjp7wAAADZJ\\\\nREFUeF7lziEBAAAMAjD6J8b9MRAT80uT65Af8AN+wA/4AT/gB/yAH/ADfsAP+AE/4AfmgQdc\\\\nz9xqBS2pdAAAAABJRU5ErkJggg=='.\\\\n\\\\tColor green->\\\\n'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQFBQUBSsjp7wAAADVJ\\\\nREFUeF7lziEBAAAMAjD6J77jMRAT80sunfIDfsAP+AE/4Af8gB/wA37AD/gBP+AH/MA68HyT\\\\n3Gqf2I6NAAAAAElFTkSuQmCC'.\\\\n\\\\t\\\\tColor blue->\\\\n'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQFBQUBSsjp7wAAADVJ\\\\nREFUeF7lziEBAAAMAjD6J77jMRAT80ty3fIDfsAP+AE/4Af8gB/wA37AD/gBP+AH/MA48JxX\\\\n3GpYhihrAAAAAElFTkSuQmCC'.\\\\n\\\\tColor black->\\\\n'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQFBQUBSsjp7wAAADVJ\\\\nREFUeF7lziEBAAAMAjDk+xfmMRAT80ty3fIDfsAP+AE/4Af8gB/wA37AD/gBP+AH/MA48LbT\\\\nHD3MKH3GAAAAAElFTkSuQmCC'\\\\n}! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - decoding' stamp: 'ar 2/19/2004 00:24'!\\\\ncoloredFiles32\\\\n\\\\t\\\\\\\"Created by\\\\n\\\\t\\\\t{Color red. Color green. Color blue. Color black} collect:[:fillC|\\\\n\\\\t\\\\t\\\\t| ff bytes |\\\\n\\\\t\\\\t\\\\tff := Form extent: 32@32 depth: 32.\\\\n\\\\t\\\\t\\\\tff fillColor: fillC.\\\\n\\\\t\\\\t\\\\tbytes := WriteStream on: ByteArray new.\\\\n\\\\t\\\\t\\\\tPNGReadWriter putForm: ff onStream: bytes.\\\\n\\\\t\\\\t\\\\tfillC ->\\\\n\\\\t\\\\t\\\\t\\\\t(Base64MimeConverter mimeEncode: (bytes contents readStream)) contents\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\\\\"\\\\n\\\\t^{\\\\n\\\\t\\\\tColor red -> 'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAANUlEQVR4XuXOIQEAAAwEoe9f\\\\n+hZjAoFnbfVo+QE/4Af8gB/wA37AD/gBP+AH/IAf8AN+4DlwVA34ajP6EEoAAAAASUVORK5C\\\\nYII='.\\\\n\\\\t\\\\tColor green -> 'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAM0lEQVR4XuXOMQ0AAAACIPuX\\\\n1hgejAIkPfMDfsAP+AE/4Af8gB/wA37AD/gBP+AH/MA7MFfR+Grvv2BdAAAAAElFTkSuQmCC'.\\\\n\\\\n\\\\tColor blue->\\\\n'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAANElEQVR4XuXOIQEAAAACIP+f\\\\n1hkGAp0k7Zcf8AN+wA/4AT/gB/yAH/ADfsAP+AE/4AfOgQFblfhqnnPWHAAAAABJRU5ErkJg\\\\ngg=='.\\\\n\\\\t\\\\tColor black -> 'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAANUlEQVR4XuXOMQEAAAwCINc/\\\\ntIvhwcFPkuuWH/ADfsAP+AE/4Af8gB/wA37AD/gBP+AHxoEH95UAPU59TTMAAAAASUVORK5C\\\\nYII='\\\\n}! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - decoding' stamp: 'ar 2/19/2004 00:19'!\\\\ncoloredFiles8\\\\n\\\\t\\\\\\\"Created by\\\\n\\\\t\\\\t{Color red. Color green. Color blue. Color black} collect:[:fillC|\\\\n\\\\t\\\\t\\\\t| ff bytes |\\\\n\\\\t\\\\t\\\\tff := Form extent: 32@32 depth: 8.\\\\n\\\\t\\\\t\\\\tff fillColor: fillC.\\\\n\\\\t\\\\t\\\\tbytes := WriteStream on: ByteArray new.\\\\n\\\\t\\\\t\\\\tPNGReadWriter putForm: ff onStream: bytes.\\\\n\\\\t\\\\t\\\\tfillC ->\\\\n\\\\t\\\\t\\\\t\\\\t(Base64MimeConverter mimeEncode: (bytes contents readStream)) contents\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\\\\"\\\\n\\\\t^{Color red->\\\\n'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAADAFBMVEX///8AAAD///9/f3//\\\\nAAAA/wAAAP8A/////wD/AP8fHx8/Pz9fX1+fn5+/v7/f398HBwcPDw8XFxcnJycvLy83NzdH\\\\nR0dPT09XV1dnZ2dvb293d3eHh4ePj4+Xl5enp6evr6+3t7fHx8fPz8/X19fn5+fv7+/39/cA\\\\nAAAAMgAAZQAAmAAAywAA/wAAADIAMjIAZTIAmDIAyzIA/zIAAGUAMmUAZWUAmGUAy2UA/2UA\\\\nAJgAMpgAZZgAmJgAy5gA/5gAAMsAMssAZcsAmMsAy8sA/8sAAP8AMv8AZf8AmP8Ay/8A//8y\\\\nAAAyMgAyZQAymAAyywAy/wAyADIyMjIyZTIymDIyyzIy/zIyAGUyMmUyZWUymGUyy2Uy/2Uy\\\\nAJgyMpgyZZgymJgyy5gy/5gyAMsyMssyZcsymMsyy8sy/8syAP8yMv8yZf8ymP8yy/8y//9l\\\\nAABlMgBlZQBlmABlywBl/wBlADJlMjJlZTJlmDJlyzJl/zJlAGVlMmVlZWVlmGVly2Vl/2Vl\\\\nAJhlMphlZZhlmJhly5hl/5hlAMtlMstlZctlmMtly8tl/8tlAP9lMv9lZf9lmP9ly/9l//+Y\\\\nAACYMgCYZQCYmACYywCY/wCYADKYMjKYZTKYmDKYyzKY/zKYAGWYMmWYZWWYmGWYy2WY/2WY\\\\nAJiYMpiYZZiYmJiYy5iY/5iYAMuYMsuYZcuYmMuYy8uY/8uYAP+YMv+YZf+YmP+Yy/+Y///L\\\\nAADLMgDLZQDLmADLywDL/wDLADLLMjLLZTLLmDLLyzLL/zLLAGXLMmXLZWXLmGXLy2XL/2XL\\\\nAJjLMpjLZZjLmJjLy5jL/5jLAMvLMsvLZcvLmMvLy8vL/8vLAP/LMv/LZf/LmP/Ly//L////\\\\nAAD/MgD/ZQD/mAD/ywD//wD/ADL/MjL/ZTL/mDL/yzL//zL/AGX/MmX/ZWX/mGX/y2X//2X/\\\\nAJj/Mpj/ZZj/mJj/y5j//5j/AMv/Msv/Zcv/mMv/y8v//8v/AP//Mv//Zf//mP//y/////9E\\\\nCiHUAAAAGklEQVR4XmO4cwc/YLgz8hWMfAUjX8EIVQAAbnlwLukXXkcAAAAASUVORK5CYII='.\\\\n\\\\n\\\\tColor green->\\\\n'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAADAFBMVEX///8AAAD///9/f3//\\\\nAAAA/wAAAP8A/////wD/AP8fHx8/Pz9fX1+fn5+/v7/f398HBwcPDw8XFxcnJycvLy83NzdH\\\\nR0dPT09XV1dnZ2dvb293d3eHh4ePj4+Xl5enp6evr6+3t7fHx8fPz8/X19fn5+fv7+/39/cA\\\\nAAAAMgAAZQAAmAAAywAA/wAAADIAMjIAZTIAmDIAyzIA/zIAAGUAMmUAZWUAmGUAy2UA/2UA\\\\nAJgAMpgAZZgAmJgAy5gA/5gAAMsAMssAZcsAmMsAy8sA/8sAAP8AMv8AZf8AmP8Ay/8A//8y\\\\nAAAyMgAyZQAymAAyywAy/wAyADIyMjIyZTIymDIyyzIy/zIyAGUyMmUyZWUymGUyy2Uy/2Uy\\\\nAJgyMpgyZZgymJgyy5gy/5gyAMsyMssyZcsymMsyy8sy/8syAP8yMv8yZf8ymP8yy/8y//9l\\\\nAABlMgBlZQBlmABlywBl/wBlADJlMjJlZTJlmDJlyzJl/zJlAGVlMmVlZWVlmGVly2Vl/2Vl\\\\nAJhlMphlZZhlmJhly5hl/5hlAMtlMstlZctlmMtly8tl/8tlAP9lMv9lZf9lmP9ly/9l//+Y\\\\nAACYMgCYZQCYmACYywCY/wCYADKYMjKYZTKYmDKYyzKY/zKYAGWYMmWYZWWYmGWYy2WY/2WY\\\\nAJiYMpiYZZiYmJiYy5iY/5iYAMuYMsuYZcuYmMuYy8uY/8uYAP+YMv+YZf+YmP+Yy/+Y///L\\\\nAADLMgDLZQDLmADLywDL/wDLADLLMjLLZTLLmDLLyzLL/zLLAGXLMmXLZWXLmGXLy2XL/2XL\\\\nAJjLMpjLZZjLmJjLy5jL/5jLAMvLMsvLZcvLmMvLy8vL/8vLAP/LMv/LZf/LmP/Ly//L////\\\\nAAD/MgD/ZQD/mAD/ywD//wD/ADL/MjL/ZTL/mDL/yzL//zL/AGX/MmX/ZWX/mGX/y2X//2X/\\\\nAJj/Mpj/ZZj/mJj/y5j//5j/AMv/Msv/Zcv/mMv/y8v//8v/AP//Mv//Zf//mP//y/////9E\\\\nCiHUAAAAGUlEQVR4XmPQ1cUPGHRHvoKRr2DkKxihCgBZ3bQBCq5u/AAAAABJRU5ErkJggg=='.\\\\n\\\\n\\\\tColor blue->\\\\n'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAADAFBMVEX///8AAAD///9/f3//\\\\nAAAA/wAAAP8A/////wD/AP8fHx8/Pz9fX1+fn5+/v7/f398HBwcPDw8XFxcnJycvLy83NzdH\\\\nR0dPT09XV1dnZ2dvb293d3eHh4ePj4+Xl5enp6evr6+3t7fHx8fPz8/X19fn5+fv7+/39/cA\\\\nAAAAMgAAZQAAmAAAywAA/wAAADIAMjIAZTIAmDIAyzIA/zIAAGUAMmUAZWUAmGUAy2UA/2UA\\\\nAJgAMpgAZZgAmJgAy5gA/5gAAMsAMssAZcsAmMsAy8sA/8sAAP8AMv8AZf8AmP8Ay/8A//8y\\\\nAAAyMgAyZQAymAAyywAy/wAyADIyMjIyZTIymDIyyzIy/zIyAGUyMmUyZWUymGUyy2Uy/2Uy\\\\nAJgyMpgyZZgymJgyy5gy/5gyAMsyMssyZcsymMsyy8sy/8syAP8yMv8yZf8ymP8yy/8y//9l\\\\nAABlMgBlZQBlmABlywBl/wBlADJlMjJlZTJlmDJlyzJl/zJlAGVlMmVlZWVlmGVly2Vl/2Vl\\\\nAJhlMphlZZhlmJhly5hl/5hlAMtlMstlZctlmMtly8tl/8tlAP9lMv9lZf9lmP9ly/9l//+Y\\\\nAACYMgCYZQCYmACYywCY/wCYADKYMjKYZTKYmDKYyzKY/zKYAGWYMmWYZWWYmGWYy2WY/2WY\\\\nAJiYMpiYZZiYmJiYy5iY/5iYAMuYMsuYZcuYmMuYy8uY/8uYAP+YMv+YZf+YmP+Yy/+Y///L\\\\nAADLMgDLZQDLmADLywDL/wDLADLLMjLLZTLLmDLLyzLL/zLLAGXLMmXLZWXLmGXLy2XL/2XL\\\\nAJjLMpjLZZjLmJjLy5jL/5jLAMvLMsvLZcvLmMvLy8vL/8vLAP/LMv/LZf/LmP/Ly//L////\\\\nAAD/MgD/ZQD/mAD/ywD//wD/ADL/MjL/ZTL/mDL/yzL//zL/AGX/MmX/ZWX/mGX/y2X//2X/\\\\nAJj/Mpj/ZZj/mJj/y5j//5j/AMv/Msv/Zcv/mMv/y8v//8v/AP//Mv//Zf//mP//y/////9E\\\\nCiHUAAAAGUlEQVR4XmNwc8MPGNxGvoKRr2DkKxihCgCl7xgQRbPxcwAAAABJRU5ErkJggg=='.\\\\n\\\\n\\\\tColor black->\\\\n'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAADAFBMVEX///8AAAD///9/f3//\\\\nAAAA/wAAAP8A/////wD/AP8fHx8/Pz9fX1+fn5+/v7/f398HBwcPDw8XFxcnJycvLy83NzdH\\\\nR0dPT09XV1dnZ2dvb293d3eHh4ePj4+Xl5enp6evr6+3t7fHx8fPz8/X19fn5+fv7+/39/cA\\\\nAAAAMgAAZQAAmAAAywAA/wAAADIAMjIAZTIAmDIAyzIA/zIAAGUAMmUAZWUAmGUAy2UA/2UA\\\\nAJgAMpgAZZgAmJgAy5gA/5gAAMsAMssAZcsAmMsAy8sA/8sAAP8AMv8AZf8AmP8Ay/8A//8y\\\\nAAAyMgAyZQAymAAyywAy/wAyADIyMjIyZTIymDIyyzIy/zIyAGUyMmUyZWUymGUyy2Uy/2Uy\\\\nAJgyMpgyZZgymJgyy5gy/5gyAMsyMssyZcsymMsyy8sy/8syAP8yMv8yZf8ymP8yy/8y//9l\\\\nAABlMgBlZQBlmABlywBl/wBlADJlMjJlZTJlmDJlyzJl/zJlAGVlMmVlZWVlmGVly2Vl/2Vl\\\\nAJhlMphlZZhlmJhly5hl/5hlAMtlMstlZctlmMtly8tl/8tlAP9lMv9lZf9lmP9ly/9l//+Y\\\\nAACYMgCYZQCYmACYywCY/wCYADKYMjKYZTKYmDKYyzKY/zKYAGWYMmWYZWWYmGWYy2WY/2WY\\\\nAJiYMpiYZZiYmJiYy5iY/5iYAMuYMsuYZcuYmMuYy8uY/8uYAP+YMv+YZf+YmP+Yy/+Y///L\\\\nAADLMgDLZQDLmADLywDL/wDLADLLMjLLZTLLmDLLyzLL/zLLAGXLMmXLZWXLmGXLy2XL/2XL\\\\nAJjLMpjLZZjLmJjLy5jL/5jLAMvLMsvLZcvLmMvLy8vL/8vLAP/LMv/LZf/LmP/Ly//L////\\\\nAAD/MgD/ZQD/mAD/ywD//wD/ADL/MjL/ZTL/mDL/yzL//zL/AGX/MmX/ZWX/mGX/y2X//2X/\\\\nAJj/Mpj/ZZj/mJj/y5j//5j/AMv/Msv/Zcv/mMv/y8v//8v/AP//Mv//Zf//mP//y/////9E\\\\nCiHUAAAAGUlEQVR4XmNgZMQPGBhHvoKRr2DkKxihCgBEmAQBphO0cAAAAABJRU5ErkJggg=='\\\\n}! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - decoding' stamp: 'ar 2/19/2004 00:25'!\\\\ndecodeColors: colorsAndFiles depth: requiredDepth\\\\n\\\\t| color bytes form |\\\\n\\\\tcolorsAndFiles do:[:assoc|\\\\n\\\\t\\\\tcolor := assoc key.\\\\n\\\\t\\\\tbytes := Base64MimeConverter mimeDecodeToBytes: assoc value readStream.\\\\n\\\\t\\\\tform := PNGReadWriter formFromStream: bytes.\\\\n\\\\t\\\\tself assert: form depth = requiredDepth.\\\\n\\\\t\\\\tself assert: (form pixelValueAt: 1@1) = (color pixelValueForDepth: requiredDepth).\\\\n\\\\t].! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - decoding' stamp: 'ar 2/19/2004 00:30'!\\\\nencodeColors: colorsAndFiles depth: requiredDepth\\\\n\\\\t| color original ff encoded |\\\\n\\\\tcolorsAndFiles do:[:assoc|\\\\n\\\\t\\\\tcolor := assoc key.\\\\n\\\\t\\\\toriginal := Base64MimeConverter mimeDecodeToBytes: assoc value readStream.\\\\n\\\\t\\\\tff := Form extent: 32@32 depth: requiredDepth.\\\\n\\\\t\\\\tff fillColor: color.\\\\n\\\\t\\\\tencoded := WriteStream on: ByteArray new.\\\\n\\\\t\\\\tPNGReadWriter putForm: ff onStream: encoded.\\\\n\\\\t\\\\tself assert: (encoded contents = original contents).\\\\n\\\\t].! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - decoding' stamp: 'ar 2/19/2004 00:20'!\\\\ntestPngDecodingColors16\\\\n\\\\tself decodeColors: self coloredFiles16 depth: 16.! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - decoding' stamp: 'ar 2/19/2004 00:20'!\\\\ntestPngDecodingColors32\\\\n\\\\tself decodeColors: self coloredFiles32 depth: 32.! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - decoding' stamp: 'ar 2/19/2004 00:20'!\\\\ntestPngDecodingColors8\\\\n\\\\tself decodeColors: self coloredFiles8 depth: 8.! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - decoding' stamp: 'ar 2/19/2004 00:28'!\\\\ntestPngEncodingColors16\\\\n\\\\tself encodeColors: self coloredFiles16 depth: 16.! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - decoding' stamp: 'ar 2/19/2004 00:28'!\\\\ntestPngEncodingColors32\\\\n\\\\tself encodeColors: self coloredFiles32 depth: 32.! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - decoding' stamp: 'ar 2/19/2004 00:28'!\\\\ntestPngEncodingColors8\\\\n\\\\tself encodeColors: self coloredFiles8 depth: 8.! !\\\\nImageReadWriter subclass: #PNMReadWriter\\\\n\\\\tinstanceVariableNames: 'first type origin cols rows depth maxValue tupleType pragma'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Graphics-Files'!\\\\n!PNMReadWriter commentStamp: 'jdr 10/20/2003 17:08' prior: 0!\\\\nI am a subclass of ImageReadWriter that decodes portable anymap file formats\\\\n(pbm, pgm, ppm and  pam) images.\\\\n\\\\nI accept the #origin pragma for SE files as described in:\\\\nAlgoritms For Image Processing And Computer Vision. J. R. Parker\\\\n\\\\nDon't work with 2 bytes samples (16 bit grays, > 32 bits color, etc...), \\\\npam files preliminary support.\\\\n\\\\nf _ ImageReadWriter formFromFileNamed: 'Tools:Squeak3.4:Carmen.ppm'.\\\\nf morphEdit\\\\n\\\\nSubmitted by Javier Diaz Reinoso, Oct/2003!\\\\n]style[(361 18 2 26 3 11 1 43)f1,cblack;f1,f1b,f1,f1b,f1,f1b,f1!\\\\n\\\\n\\\\n!PNMReadWriter methodsFor: 'accessing' stamp: 'jdr 10/16/2003 14:52'!\\\\norigin\\\\n\\\\t^origin! !\\\\n\\\\n!PNMReadWriter methodsFor: 'accessing' stamp: 'jdr 10/15/2003 15:35'!\\\\npragma: s\\\\n\\\\tpragma _ s! !\\\\n\\\\n!PNMReadWriter methodsFor: 'accessing' stamp: 'jdr 10/10/2003 18:04'!\\\\nstream: s\\\\n\\\\tstream _ s! !\\\\n\\\\n!PNMReadWriter methodsFor: 'accessing' stamp: 'jdr 10/16/2003 14:53'!\\\\ntupleType\\\\n\\\\t^tupleType! !\\\\n\\\\n\\\\n!PNMReadWriter methodsFor: 'reading' stamp: 'jdr 10/16/2003 17:19'!\\\\ncleanLine\\\\n\\\\t\\\\\\\"upTo LF or CR, tab as space\\\\\\\"\\\\n\\\\n\\\\t| line loop b |\\\\n\\\\tline _ WriteStream with: ''.\\\\n\\\\tloop _ true.\\\\n\\\\t[loop] whileTrue: [\\\\n\\\\t\\\\tb _ stream next.\\\\n\\\\t\\\\tb ifNil:[\\\\n\\\\t\\\\t\\\\tloop _ false\\\\t\\\\t\\\\\\\"EOS\\\\\\\"\\\\n\\\\t\\\\t]\\\\n\\\\t\\\\tifNotNil: [\\\\n\\\\t\\\\t\\\\t(b = (Character cr) or:[b = Character lf]) ifTrue:[\\\\n\\\\t\\\\t\\\\t\\\\tloop _ false.\\\\n\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t\\\\tifFalse:[\\\\n\\\\t\\\\t\\\\t\\\\tb = (Character tab) ifTrue:[b _ Character space].\\\\n\\\\t\\\\t\\\\t\\\\tline nextPut: b.\\\\n\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\t^line contents! !\\\\n\\\\n!PNMReadWriter methodsFor: 'reading' stamp: 'jdr 10/15/2003 12:20'!\\\\ngetTokenPbm: aCollection\\\\n\\\\t\\\\\\\"get a number, return rest of collection\\\\\\\"\\\\n\\\\t| line tokens token |\\\\n\\\\ttokens _ aCollection.\\\\n\\\\ttokens size = 0 ifTrue:[\\\\n\\\\t\\\\t[\\\\n\\\\t\\\\t\\\\tline _ self pbmGetLine.\\\\n\\\\t\\\\t\\\\tline ifNil:[^{nil . nil}].\\\\n\\\\t\\\\t\\\\ttokens _ line findTokens: ' '.\\\\n\\\\t\\\\t\\\\ttokens size = 0\\\\n\\\\t\\\\t] whileTrue:[].\\\\n\\\\t].\\\\n\\\\t\\\\\\\"Transcript cr; show: tokens asString.\\\\\\\"\\\\n\\\\ttoken _ tokens removeFirst.\\\\n\\\\t^{token asInteger . tokens}\\\\n! !\\\\n\\\\n!PNMReadWriter methodsFor: 'reading' stamp: 'jdr 10/16/2003 16:39'!\\\\nnextImage\\\\n\\\\t\\\\\\\"read one image\\\\\\\"\\\\n\\\\t| data p |\\\\n\\\\tfirst ifNil:[\\\\n\\\\t\\\\tfirst _ false.\\\\n\\\\t\\\\tdata _ stream contentsOfEntireFile.\\\\n\\\\t\\\\tstream _ (RWBinaryOrTextStream with: data) reset.\\\\n\\\\t]\\\\n\\\\tifNotNil:[\\\\n\\\\t\\\\ttype < 4 ifTrue:[\\\\n\\\\t\\\\t\\\\tself error:'Plain PBM, PGM or PPM have only one image'\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\tstream ascii.\\\\n\\\\tp _ stream next.\\\\n\\\\ttype _ (stream next) asInteger - 48.\\\\n\\\\t(p = $P and:[type > 0 and:[type < 8]]) ifFalse:[\\\\n\\\\t\\\\tself error:'Not a PNM file'\\\\n\\\\t].\\\\n\\\\ttype = 7 ifTrue:[\\\\n\\\\t\\\\tself readHeaderPAM\\\\n\\\\t]\\\\n\\\\tifFalse: [\\\\n\\\\t\\\\tself readHeader\\\\n\\\\t].\\\\n\\\\ttype caseOf: {\\\\n\\\\t\\\\t[1] \\\\t->\\\\t[^self readPlainBW].\\\\n\\\\t\\\\t[2] \\\\t->\\\\t[^self readPlainGray].\\\\n\\\\t\\\\t[3] \\\\t->\\\\t[^self readPlainRGB].\\\\n\\\\t\\\\t[4] \\\\t->\\\\t[^self readBWreverse: false].\\\\n\\\\t\\\\t[5] \\\\t->\\\\t[^self readGray].\\\\n\\\\t\\\\t[6] \\\\t->\\\\t[^self readRGB].\\\\n\\\\t\\\\t[7] \\\\t->\\\\t[\\\\t\\\\\\\"PAM\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(tupleType asUppercase) caseOf: {\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t['BLACKANDWHITE'] \\\\t\\\\t-> [^self readBWreverse: true].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t['GRAYSCALE'] \\\\t\\\\t\\\\t-> [^self readGray].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t['RGB'] \\\\t\\\\t\\\\t\\\\t\\\\t-> [^self readRGB].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t['RGB_ALPHA'] \\\\t\\\\t\\\\t-> [^self error:'Not implemented'].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t['GRAYSCALE_ALPHA'] \\\\t-> [^self error:'Not implemented'].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t} otherwise: [^self readData].\\\\n\\\\t\\\\t\\\\t\\\\t]\\\\n\\\\t}! !\\\\n\\\\n!PNMReadWriter methodsFor: 'reading' stamp: 'jdr 10/10/2003 15:09'!\\\\npbmGetLine\\\\n\\\\t\\\\\\\"Get the next non-comment line from the PBM stream\\\\n\\\\tLook for 'pragmas' - commands hidden in the comments\\\\\\\"\\\\n\\\\t\\\\n \\\\t| line |\\\\n\\\\t[\\\\n\\\\t\\\\tline _ self cleanLine.\\\\n\\\\t\\\\tline ifNil: [^nil].\\\\n\\\\t\\\\t(line size > 0 and:[(line at: 1) = $#]) ifTrue:[\\\\n\\\\t\\\\t\\\\tself pbmParam: line.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\t(line size = 0) or:[(line at: 1) = $#]\\\\n\\\\t]\\\\n \\\\twhileTrue: [].\\\\n\\\\t^line! !\\\\n\\\\n!PNMReadWriter methodsFor: 'reading' stamp: 'jdr 10/10/2003 15:11'!\\\\npbmParam: line\\\\n\\\\t\\\\\\\"Look for a parameter hidden in a comment\\\\\\\"\\\\n\\\\t| key tokens |\\\\n\\\\ttokens _ line findTokens: ' '.\\\\n\\\\tkey _ (tokens at: 1) asLowercase.\\\\n\\\\t(key = '#origin' and:[tokens size = 3]) ifTrue:[\\\\t\\\\\\\"ORIGIN key word\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"This is for SE files as described in:\\\\n\\\\t\\\\tAlgoritms For Image Processing And Computer Vision. J. R. Parker\\\\\\\"\\\\n\\\\t\\\\torigin _ ((tokens at: 2) asInteger) @ ((tokens at: 3) asInteger)\\\\n\\\\t].\\\\n! !\\\\n\\\\n!PNMReadWriter methodsFor: 'reading' stamp: 'jdr 7/18/2005 17:02'!\\\\nr: r g: g b: b for: aDepth\\\\n\\\\t\\\\\\\"integer value according depth\\\\\\\"\\\\n\\\\t| val |\\\\n\\\\taDepth = 16 ifTrue: [\\\\n\\\\t\\\\tval := (1 << 15) + (r << 10) + (g << 5) + b.\\\\n\\\\t]\\\\n\\\\tifFalse:[\\\\n\\\\t\\\\tval := (16rFF << 24) + (r << 16) + (g << 8) + b.\\\\n\\\\t].\\\\n\\\\t^val\\\\n! !\\\\n\\\\n!PNMReadWriter methodsFor: 'reading' stamp: 'jdr 10/16/2003 15:49'!\\\\nreadBWreverse: flagXor\\\\n\\\\t\\\\\\\"B&W for PAM\\\\\\\"\\\\n\\\\t| val form bytesRow nBytes |\\\\n\\\\tstream binary.\\\\n\\\\tform _ Form extent: cols@rows depth: 1.\\\\n\\\\tnBytes _ (cols/8) ceiling.\\\\n\\\\tbytesRow _ (cols/32) ceiling * 4.\\\\n\\\\t0 to: rows-1 do: [:y | | i |\\\\n\\\\t\\\\ti _ 1 + (bytesRow*y).\\\\n\\\\t\\\\t0 to: nBytes-1 do: [:x |\\\\n\\\\t\\\\t\\\\tval _ stream next.\\\\n\\\\t\\\\t\\\\tflagXor ifTrue:[val _ val bitXor: 16rFF].\\\\n\\\\t\\\\t\\\\tform bits byteAt: i put: val.\\\\n\\\\t\\\\t\\\\ti _ i+1.\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\t^form\\\\n! !\\\\n\\\\n!PNMReadWriter methodsFor: 'reading' stamp: 'md 10/20/2004 15:45'!\\\\nreadData\\\\n\\\\t\\\\\\\"generic data\\\\\\\"\\\\n\\\\t| data nBits nBytes val sample |\\\\n\\\\tstream binary.\\\\n\\\\tdata _ OrderedCollection new.\\\\n\\\\tnBits _ maxValue floorLog:2.\\\\n\\\\tnBytes _ (nBits+1) >> 3.\\\\n\\\\t(nBits+1 rem: 8) > 0 ifTrue:[nBytes _ nBytes+1].\\\\n\\\\n\\\\t0 to: rows-1 do: [:y |\\\\n\\\\t\\\\t0 to: cols-1 do: [:x |\\\\n\\\\t\\\\t\\\\tval _ 0.\\\\n\\\\t\\\\t\\\\t1 to: nBytes do: [:n |\\\\n\\\\t\\\\t\\\\t\\\\tsample _ stream next.\\\\n\\\\t\\\\t\\\\t\\\\tval _ val << 8 + sample.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\tdata add: val.\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\t^data\\\\n\\\\n! !\\\\n\\\\n!PNMReadWriter methodsFor: 'reading' stamp: 'jdr 10/16/2003 15:44'!\\\\nreadGray\\\\n\\\\t\\\\\\\"gray form\\\\\\\"\\\\n\\\\t| val form poker |\\\\n\\\\tmaxValue > 255 ifTrue:[self error:'Gray value > 8 bits not supported in Squeak'].\\\\n\\\\tstream binary.\\\\n\\\\tform _ Form extent: cols@rows depth: depth.\\\\n\\\\tpoker _ BitBlt current bitPokerToForm: form.\\\\n\\\\t0 to: rows-1 do: [:y |\\\\n\\\\t\\\\t0 to: cols-1 do: [:x |\\\\n\\\\t\\\\t\\\\tval _ stream next.\\\\n\\\\t\\\\t\\\\tpoker pixelAt: x@y put: val.\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\t^form\\\\n! !\\\\n\\\\n!PNMReadWriter methodsFor: 'reading' stamp: 'jdr 10/15/2003 15:44'!\\\\nreadHeader\\\\n\\\\t\\\\\\\"read header for pbm, pgm or ppm\\\\\\\"\\\\n\\\\t| tokens aux d c  |\\\\n\\\\ttokens _ OrderedCollection new.\\\\n\\\\taux _ self getTokenPbm: tokens.\\\\n\\\\tcols _ aux at: 1. tokens _ aux at: 2.\\\\n\\\\taux _ self getTokenPbm: tokens.\\\\n\\\\trows _ aux at: 1. tokens _ aux at: 2.\\\\n\\\\n\\\\t(type = 1 or:[type = 4]) ifTrue:[\\\\n\\\\t\\\\tmaxValue _ 1\\\\n\\\\t]\\\\n\\\\tifFalse: [\\\\n\\\\t\\\\taux _ self getTokenPbm: tokens.\\\\n\\\\t\\\\tmaxValue _ aux at: 1. tokens _ aux at: 2.\\\\n\\\\t].\\\\n\\\\td _ {1 . 2 . 4 . \\\\t8 . \\\\t\\\\t16 . 32}.\\\\n\\\\tc _ {2 . 4 . 16 . 256 . 32768 . 16777216}. \\\\n\\\\t(type = 3 or:[type = 6]) ifTrue: [\\\\n\\\\t\\\\tmaxValue >= 65536 ifTrue:[\\\\n\\\\t\\\\t\\\\tself error:'Pixmap > 48 bits not supported in PPM'\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tmaxValue >= 256 ifTrue:[\\\\n\\\\t\\\\t\\\\tself error:'Pixmap > 32 bits are not supported in Squeak'\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tmaxValue < 32 ifTrue:[depth _ 16] ifFalse:[depth _ 32].\\\\n\\\\t]\\\\n\\\\tifFalse: [\\\\n\\\\t\\\\tdepth _ nil.\\\\n\\\\t\\\\t1 to: c size do:[:i| ((c at: i) > maxValue and:[depth = nil]) ifTrue:[depth_d at: i]].\\\\n\\\\t].\\\\n\\\\tTranscript cr; show: 'PBM file class ', type asString, ' size ', cols asString, ' x ', \\\\n\\\\t\\\\trows asString, ' maxValue =', maxValue asString, ' depth=', depth asString.\\\\n! !\\\\n\\\\n!PNMReadWriter methodsFor: 'reading' stamp: 'jdr 10/15/2003 12:35'!\\\\nreadHeaderPAM\\\\n\\\\t\\\\\\\"read pam header, not tested\\\\\\\"\\\\n\\\\t| loop line tokens key val |\\\\n\\\\ttupleType _ ''.\\\\n\\\\tloop _ true.\\\\n\\\\tloop whileTrue:[\\\\n\\\\t\\\\tline _ self pbmGetLine.\\\\n\\\\t\\\\ttokens _ line findTokens: ' '.\\\\n\\\\t\\\\ttokens size = 2 ifTrue:[\\\\n\\\\t\\\\t\\\\tkey _ tokens at: 1 asUppercase.\\\\n\\\\t\\\\t\\\\tval _ tokens at: 2.\\\\n\\\\t\\\\t\\\\tkey caseOf: {\\\\n\\\\t\\\\t\\\\t\\\\t['WIDTH'] \\\\t\\\\t-> [cols _ val asInteger].\\\\n\\\\t\\\\t\\\\t\\\\t['HEIGHT'] \\\\t\\\\t-> [rows _ val asInteger].\\\\n\\\\t\\\\t\\\\t\\\\t['DEPTH'] \\\\t\\\\t-> [depth _ val asInteger].\\\\n\\\\t\\\\t\\\\t\\\\t['MAXVAL']\\\\t\\\\t-> [maxValue _ val asInteger].\\\\n\\\\t\\\\t\\\\t\\\\t['TUPLETYPE']\\\\t-> [tupleType _ tupleType, ' ', val].\\\\n\\\\t\\\\t\\\\t\\\\t['ENDHDR']\\\\t\\\\t-> [loop _ false].\\\\n\\\\t\\\\t\\\\t}\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\tTranscript cr; show: 'PAM file class ', type asString, ' size ', cols asString, ' x ', \\\\n\\\\t\\\\trows asString, ' maxValue =', maxValue asString, ' depth=', depth asString.\\\\n! !\\\\n\\\\n!PNMReadWriter methodsFor: 'reading' stamp: 'jdr 10/16/2003 16:03'!\\\\nreadPlainBW\\\\n\\\\t\\\\\\\"plain BW\\\\\\\"\\\\n\\\\t| val form poker |\\\\n\\\\tform _ Form extent: cols@rows depth: depth.\\\\n\\\\tpoker _ BitBlt current bitPokerToForm: form.\\\\n\\\\t0 to: rows-1 do: [:y |\\\\n\\\\t\\\\t0 to: cols-1 do: [:x |\\\\n\\\\t\\\\t\\\\t[val _ stream next. (val = $0 or:[val = $1])] whileFalse:[\\\\n\\\\t\\\\t\\\\t\\\\tval ifNil:[self error:'End of file reading PBM'].\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\tpoker pixelAt: x@y put: (val asInteger).\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\t^form\\\\n! !\\\\n\\\\n!PNMReadWriter methodsFor: 'reading' stamp: 'jdr 10/16/2003 15:44'!\\\\nreadPlainGray\\\\n\\\\t\\\\\\\"plain gray\\\\\\\"\\\\n\\\\t| val form poker aux tokens |\\\\n\\\\tform _ Form extent: cols@rows depth: depth.\\\\n\\\\tpoker _ BitBlt current bitPokerToForm: form.\\\\n\\\\ttokens _ OrderedCollection new.\\\\n\\\\t0 to: rows-1 do: [:y |\\\\n\\\\t\\\\t0 to: cols-1 do: [:x |\\\\n\\\\t\\\\t\\\\taux _ self getTokenPbm: tokens.\\\\n\\\\t\\\\t\\\\tval _ aux at: 1. tokens _ aux at: 2.\\\\n\\\\t\\\\t\\\\tpoker pixelAt: x@y put: val.\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\t^form\\\\n! !\\\\n\\\\n!PNMReadWriter methodsFor: 'reading' stamp: 'jdr 10/15/2003 12:49'!\\\\nreadPlainRGB\\\\n\\\\t\\\\\\\"RGB form, use 32 bits\\\\\\\"\\\\n\\\\t| val form poker tokens aux |\\\\n\\\\tmaxValue > 255 ifTrue:[self error:'RGB value > 32 bits not supported in Squeak'].\\\\n\\\\tform _ Form extent: cols@rows depth: 32.\\\\n\\\\tpoker _ BitBlt current bitPokerToForm: form.\\\\n\\\\ttokens _ OrderedCollection new.\\\\n\\\\t0 to: rows-1 do: [:y |\\\\n\\\\t\\\\t0 to: cols-1 do: [:x | | r g b|\\\\n\\\\t\\\\t\\\\taux _ self getTokenPbm: tokens. r _ aux at: 1. tokens _ aux at: 2.\\\\n\\\\t\\\\t\\\\taux _ self getTokenPbm: tokens. g _ aux at: 1. tokens _ aux at: 2.\\\\n\\\\t\\\\t\\\\taux _ self getTokenPbm: tokens. b _ aux at: 1. tokens _ aux at: 2.\\\\n\\\\t\\\\t\\\\tval _ self r: r g: g b: b for: depth.\\\\n\\\\t\\\\t\\\\tpoker pixelAt: x@y put: val.\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\t^form\\\\n! !\\\\n\\\\n!PNMReadWriter methodsFor: 'reading' stamp: 'jdr 7/18/2005 16:58'!\\\\nreadRGB\\\\n\\\\t\\\\\\\"RGB form, use 16/32 bits\\\\\\\"\\\\n\\\\t| val form poker sample shift |\\\\n\\\\tmaxValue > 255 ifTrue:[self error:'RGB value > 32 bits not supported in Squeak'].\\\\n\\\\tstream binary.\\\\n\\\\tform := Form extent: cols@rows depth: depth.\\\\n\\\\tpoker := BitBlt current bitPokerToForm: form.\\\\n\\\\tdepth = 32 ifTrue:[shift := 8] ifFalse:[shift := 5].\\\\n\\\\t0 to: rows-1 do: [:y |\\\\n\\\\t\\\\t0 to: cols-1 do: [:x |\\\\n\\\\t\\\\t\\\\tval := 16rFF.\\\\t\\\\\\\"no transparency\\\\\\\"\\\\n\\\\t\\\\t\\\\t1 to: 3 do: [:i |\\\\n\\\\t\\\\t\\\\t\\\\tsample := stream next.\\\\n\\\\t\\\\t\\\\t\\\\tval := val << shift + sample.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\tpoker pixelAt: x@y put: val.\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\t^form\\\\n! !\\\\n\\\\n\\\\n!PNMReadWriter methodsFor: 'testing' stamp: 'jdr 10/11/2003 14:52'!\\\\nunderstandsImageFormat\\\\n\\\\t\\\\\\\"P1 to P7\\\\\\\"\\\\n\\\\t| p  |\\\\n\\\\tp _ stream next asCharacter.\\\\n\\\\ttype _ stream next - 48.\\\\n\\\\t^(p = $P and:[type > 0 and:[type < 8]])\\\\n\\\\t! !\\\\n\\\\n\\\\n!PNMReadWriter methodsFor: 'writing' stamp: 'jdr 10/16/2003 16:08'!\\\\nnextPutBW: aForm reverse: flagXor\\\\n\\\\t| myType val nBytes bytesRow |\\\\n\\\\tcols _ aForm width.\\\\n\\\\trows _ aForm height.\\\\n\\\\tdepth _ aForm depth.\\\\n\\\\t\\\\\\\"stream position: 0.\\\\\\\"\\\\n\\\\taForm depth = 1 ifTrue:[myType _ $4] ifFalse:[myType _ $5].\\\\n\\\\tself writeHeader: myType.\\\\n\\\\tstream binary.\\\\n\\\\tnBytes _ (cols/8) ceiling.\\\\n\\\\tbytesRow _ (cols/32) ceiling * 4.\\\\n\\\\t0 to: rows-1 do: [:y | | i |\\\\n\\\\t\\\\ti _ 1 + (bytesRow*y).\\\\n\\\\t\\\\t0 to: nBytes-1 do: [:x |\\\\n\\\\t\\\\t\\\\tval _ aForm bits byteAt: i.\\\\n\\\\t\\\\t\\\\tflagXor ifTrue:[val _ val bitXor: 16rFF].\\\\n\\\\t\\\\t\\\\tstream nextPut: val.\\\\n\\\\t\\\\t\\\\ti _ i+1.\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n! !\\\\n\\\\n!PNMReadWriter methodsFor: 'writing' stamp: 'jdr 10/16/2003 16:08'!\\\\nnextPutGray: aForm\\\\n\\\\t| myType peeker val |\\\\n\\\\tcols _ aForm width.\\\\n\\\\trows _ aForm height.\\\\n\\\\tdepth _ aForm depth.\\\\n\\\\t\\\\\\\"stream position: 0.\\\\\\\"\\\\n\\\\taForm depth = 1 ifTrue:[myType _ $4] ifFalse:[myType _ $5].\\\\n\\\\tself writeHeader: myType.\\\\n\\\\tpeeker _ BitBlt current bitPeekerFromForm: aForm.\\\\n\\\\t0 to: rows-1 do: [:y |\\\\n\\\\t\\\\t0 to: cols-1 do: [:x |\\\\n\\\\t\\\\t\\\\tval _ peeker pixelAt: x@y.\\\\n\\\\t\\\\t\\\\tstream nextPut: val.\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n! !\\\\n\\\\n!PNMReadWriter methodsFor: 'writing' stamp: 'jdr 10/16/2003 14:22'!\\\\nnextPutImage: aForm\\\\n\\\\taForm unhibernate.\\\\n\\\\taForm depth\\\\t caseOf: {\\\\n\\\\t\\\\t[1] \\\\t\\\\t-> [self nextPutBW: aForm reverse: false].\\\\n\\\\t\\\\t[16] \\\\t-> [self nextPutRGB: aForm].\\\\n\\\\t\\\\t[32] \\\\t-> [self nextPutRGB: aForm].\\\\n\\\\t} otherwise: [\\\\n\\\\t\\\\t(aForm respondsTo: #colors) ifTrue:[\\\\n\\\\t\\\\t\\\\taForm colors ifNil: [\\\\n\\\\t\\\\t\\\\t\\\\tself nextPutGray: aForm\\\\n\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t\\\\tifNotNil: [\\\\n\\\\t\\\\t\\\\t\\\\tself nextPutRGB: aForm\\\\n\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t]\\\\n\\\\t\\\\tifFalse:[\\\\n\\\\t\\\\t\\\\tself nextPutGray: aForm\\\\n\\\\t\\\\t]\\\\n\\\\t]! !\\\\n\\\\n!PNMReadWriter methodsFor: 'writing' stamp: 'jdr 10/16/2003 16:08'!\\\\nnextPutRGB: aForm\\\\n\\\\t| myType peeker f shift mask |\\\\n\\\\tcols _ aForm width.\\\\n\\\\trows _ aForm height.\\\\n\\\\tdepth _ aForm depth.\\\\n\\\\tf _ aForm.\\\\n\\\\tdepth < 16 ifTrue:[\\\\n\\\\t\\\\tf _ aForm asFormOfDepth: 32.\\\\n\\\\t\\\\tdepth _ 32.\\\\n\\\\t].\\\\n\\\\tmyType _ $6.\\\\n\\\\t\\\\\\\"stream position: 0.\\\\\\\"\\\\n\\\\tself writeHeader: myType.\\\\n\\\\tdepth = 32 ifTrue:[shift _ 8. mask _ 16rFF] ifFalse:[shift _ 5. mask _ 16r1F].\\\\n\\\\tpeeker _ BitBlt current bitPeekerFromForm: f.\\\\n\\\\t0 to: rows-1 do: [:y |\\\\n\\\\t\\\\t0 to: cols-1 do: [:x | | p r g b |\\\\n\\\\t\\\\t\\\\tp _ peeker pixelAt: x@y.\\\\n\\\\t\\\\t\\\\tb _ p bitAnd: mask. p _ p >> shift.\\\\n\\\\t\\\\t\\\\tg _ p bitAnd: mask. p _ p >> shift.\\\\n\\\\t\\\\t\\\\tr _ p bitAnd: mask.\\\\n\\\\t\\\\t\\\\tstream nextPut: r.\\\\n\\\\t\\\\t\\\\tstream nextPut: g.\\\\n\\\\t\\\\t\\\\tstream nextPut: b.\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n! !\\\\n\\\\n!PNMReadWriter methodsFor: 'writing' stamp: 'jdr 10/15/2003 15:48'!\\\\nwriteHeader: myType\\\\n\\\\t\\\\\\\"this is ascii\\\\\\\"\\\\n\\\\tstream nextPut: ($P asciiValue).\\\\n\\\\tstream nextPut: (myType asciiValue).\\\\n\\\\tstream nextPut: 10.\\\\t\\\\t\\\\\\\"nl\\\\\\\"\\\\n\\\\tpragma ifNotNil:[\\\\n\\\\t\\\\tstream nextPutAll: (pragma asByteArray).\\\\n\\\\t].\\\\n\\\\tstream nextPutAll: (cols printString) asByteArray.\\\\n\\\\tstream nextPut: 32.\\\\t\\\\t\\\\\\\" \\\\\\\"\\\\n\\\\tstream nextPutAll: (rows printString) asByteArray.\\\\n\\\\tstream nextPut: 10.\\\\t\\\\t\\\\\\\"nl\\\\\\\"\\\\n\\\\tdepth > 1 ifTrue: [| d c maxV |\\\\n\\\\t\\\\td _ {1 . 2 . 4  . 8   . 16 . 32}.\\\\n\\\\t\\\\tc _ {1 . 3 . 15 . 255 . 31 . 255}. \\\\n\\\\t\\\\tmaxV _ nil.\\\\n\\\\t\\\\t1 to: d size do:[:i| ((d at: i) = depth and:[maxV = nil]) ifTrue:[maxV _ c at: i]].\\\\n\\\\t\\\\tstream nextPutAll: (maxV printString) asByteArray.\\\\n\\\\t\\\\tstream nextPut: 10.\\\\t\\\\t\\\\\\\"nl\\\\\\\"\\\\n\\\\t]\\\\n\\\\t! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPNMReadWriter class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PNMReadWriter class methodsFor: 'image reading/writing' stamp: 'jdr 7/18/2005 16:25'!\\\\ntypicalFileExtensions\\\\n\\\\t\\\\\\\"Answer a collection of file extensions (lowercase) which files that I can read might commonly have\\\\\\\"\\\\n\\\\t^#('pbm' 'pnm' 'ppm' 'pam')! !\\\\n\\\\n\\\\n!PNMReadWriter class methodsFor: 'testing' stamp: 'jdr 10/11/2003 14:49'!\\\\ntestFromSEFile: filename\\\\n\\\\t\\\\\\\"read SE file, check origin\\\\n\\\\t\\\\tPNMReadWriter testFromSEFile: 'Tools:Squeak3.4:eliseSE.pbm'.\\\\n\\\\t\\\\\\\"\\\\n\\\\t| prw f |\\\\n\\\\tprw _ self new.\\\\n\\\\tprw stream: (FileStream readOnlyFileNamed: filename).\\\\n\\\\tf _ prw nextImage.\\\\n\\\\tf morphEdit.\\\\n\\\\tprw inspect! !\\\\n\\\\n!PNMReadWriter class methodsFor: 'testing' stamp: 'jdr 10/16/2003 17:22'!\\\\ntestFromString\\\\n\\\\t\\\\\\\"read SE file from string\\\\n\\\\t\\\\tPNMReadWriter testFromString\\\\n\\\\t\\\\\\\"\\\\n\\\\t| prw f s |\\\\n\\\\tprw _ self new.\\\\n\\\\ts _ \\\\n'P1\\\\n#origin 1 0\\\\n3 1\\\\n1\\\\t01'.\\\\n\\\\tprw stream: (ReadStream on: s from: 1 to: (s size)).\\\\n\\\\tf _ prw nextImage.\\\\n\\\\tf morphEdit.\\\\n\\\\tTranscript cr;show:'Origin=', prw origin asString; cr.! !\\\\n\\\\n!PNMReadWriter class methodsFor: 'testing' stamp: 'jdr 7/18/2005 17:03'!\\\\ntestMultiFile: filename\\\\n\\\\t\\\\\\\"write two files from user, then read\\\\n\\\\t\\\\tPNMReadWriter testMultiFile: 'Tools:Squeak3.6:outMulti.pbm'.\\\\n\\\\t\\\\\\\"\\\\n\\\\t| prw f |\\\\n\\\\tprw := self new.\\\\n\\\\tprw stream: ((FileStream newFileNamed: filename) binary).\\\\n\\\\tprw pragma: '#Squeak test', String lf.\\\\n\\\\tf := Form fromUser. prw nextPutImage: f. \\\\n\\\\tf := Form fromUser.prw nextPutImage: f.\\\\t\\\\n\\\\tprw close.\\\\n\\\\tprw stream: (StandardFileStream readOnlyFileNamed: filename).\\\\n\\\\tf := prw nextImage. (SketchMorph withForm: f) openInWorld.\\\\n\\\\tf := prw nextImage. (SketchMorph withForm: f) openInWorld.\\\\n! !\\\\n\\\\n!PNMReadWriter class methodsFor: 'testing' stamp: 'jdr 10/15/2003 15:43'!\\\\ntestToSEFile: filename\\\\n\\\\t\\\\\\\"write SE file with origin\\\\n\\\\t\\\\tPNMReadWriter testToSEFile: 'Tools:Squeak3.4:outSE.pbm'.\\\\n\\\\t\\\\\\\"\\\\n\\\\t| prw f |\\\\n\\\\tprw _ self new.\\\\n\\\\tprw stream: ((FileStream newFileNamed: filename) binary).\\\\n\\\\tprw pragma: '#origin 10 10', String lf.\\\\n\\\\tf _ Form fromUser.\\\\n\\\\tprw nextPutImage: f! !\\\\nProtocolClient subclass: #POP3Client\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Network-Protocols'!\\\\n!POP3Client commentStamp: 'mir 5/12/2003 17:57' prior: 0!\\\\nThis class implements POP3 (Post Office Protocol 3) as specified in RFC 1939.  (see http://www.ietf.org/rfc.html)\\\\n\\\\nYou can use it to download email from the mail server to your personal mail program.\\\\n\\\\nTo see an example of it's use, see POPSocket class>>example.!\\\\n\\\\n\\\\n!POP3Client methodsFor: 'public protocol' stamp: 'mir 3/7/2002 14:58'!\\\\napopLoginUser: userName password: password\\\\n\\\\n\\\\tself loginUser: userName password: password loginMethod: #APOP! !\\\\n\\\\n!POP3Client methodsFor: 'public protocol' stamp: 'mir 3/7/2002 14:35'!\\\\ndeleteMessage: num\\\\n\\\\t\\\\\\\"delete the numbered message\\\\\\\"\\\\n\\\\n\\\\tself ensureConnection.\\\\n\\\\tself sendCommand: 'DELE ', num printString.\\\\n\\\\tself checkResponse.\\\\n\\\\tself logProgress: self lastResponse! !\\\\n\\\\n!POP3Client methodsFor: 'public protocol' stamp: 'mir 3/7/2002 14:57'!\\\\nloginUser: userName password: password\\\\n\\\\n\\\\tself loginUser: userName password: password loginMethod: #clearText! !\\\\n\\\\n!POP3Client methodsFor: 'public protocol' stamp: 'mir 3/8/2002 11:40'!\\\\nloginUser: userName password: password loginMethod: aLoginMethod\\\\n\\\\n\\\\tself user: userName.\\\\n\\\\tself password: password.\\\\n\\\\tself loginMethod: aLoginMethod.\\\\n\\\\tself login! !\\\\n\\\\n!POP3Client methodsFor: 'public protocol' stamp: 'mir 4/7/2003 17:17'!\\\\nmessageCount\\\\n\\\\t\\\\\\\"Query the server and answer the number of messages that are in the user's mailbox.\\\\\\\"\\\\n\\\\n\\\\t| answerString numMessages |\\\\n\\\\tself ensureConnection.\\\\n\\\\tself sendCommand: 'STAT'.\\\\n\\\\tself checkResponse.\\\\n\\\\tself logProgress: self lastResponse.\\\\n\\\\n\\\\t[answerString _ (self lastResponse findTokens: Character separators) second.\\\\n\\\\tnumMessages _ answerString asNumber asInteger]\\\\n\\\\t\\\\ton: Error\\\\n\\\\t\\\\tdo: [:ex | (ProtocolClientError protocolInstance: self) signal: 'Invalid STAT response.'].\\\\n\\\\t^numMessages! !\\\\n\\\\n!POP3Client methodsFor: 'public protocol' stamp: 'len 12/14/2002 17:50'!\\\\nquit\\\\n\\\\t\\\\\\\"QUIT <CRLF>\\\\\\\"\\\\n\\\\n\\\\tself sendCommand: 'QUIT'.\\\\n\\\\tself checkResponse.! !\\\\n\\\\n!POP3Client methodsFor: 'public protocol' stamp: 'mir 3/7/2002 14:35'!\\\\nretrieveMessage: number\\\\n\\\\t\\\\\\\"retrieve the numbered message\\\\\\\"\\\\n\\\\n\\\\tself ensureConnection.\\\\n\\\\tself sendCommand: 'RETR ', number printString.\\\\n\\\\tself checkResponse.\\\\n\\\\tself logProgress: self lastResponse.\\\\n\\\\n\\\\t^self getMultilineResponse! !\\\\n\\\\n\\\\n!POP3Client methodsFor: 'private' stamp: 'mir 11/11/2002 16:20'!\\\\nloginMethod\\\\n\\\\t^self connectionInfo at: #loginMethod ifAbsent: [nil]! !\\\\n\\\\n!POP3Client methodsFor: 'private' stamp: 'mir 3/8/2002 11:41'!\\\\nloginMethod: aSymbol\\\\n\\\\t^self connectionInfo at: #loginMethod put: aSymbol! !\\\\n\\\\n\\\\n!POP3Client methodsFor: 'private protocol' stamp: 'BG 3/16/2005 08:27'!\\\\napopLogin\\\\n\\\\n\\\\t\\\\\\\"Attempt to authenticate ourselves to the server without sending the password as cleartext.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"For secure authentication, we look for a timestamp in the initial response string we get from the server, and then try the APOP command as specified in RFC 1939.  If the initial response from the server is\\\\n\\\\t+OK POP3 server ready <1896.697170952@dbc.mtview.ca.us>\\\\nwe extract the timestamp\\\\n\\\\t<1896.697170952@dbc.mtview.ca.us>\\\\nthen form a string of the form\\\\n\\\\t<1896.697170952@dbc.mtview.ca.us>USERPASSWORD\\\\nand then send only the MD5 hash of that to the server.  Thus the password never hits the wire\\\\\\\"\\\\n\\\\n\\\\t| timestamp hash |\\\\n\\\\n\\\\t[\\\\n\\\\t\\\\\\\"Look for a timestamp in the response we received from the server\\\\\\\"\\\\n\\\\ttimestamp _ self lastResponse findTokens: '<>' includes: '@'.\\\\n\\\\ttimestamp\\\\n\\\\t\\\\tifNil: [(POP3LoginError protocolInstance: self) signal: 'APOP not supported.'].\\\\n\\\\n\\\\t(Smalltalk includesKey: #MD5)\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\thash _ ((Smalltalk at: #MD5) hashMessage: ('<', timestamp, '>', self password)) storeStringHex asLowercase.\\\\n\\\\t\\\\t\\\\t\\\\\\\"trim starting 16r and zero pad it to 32 characters if needed\\\\\\\"\\\\n\\\\t\\\\t\\\\thash _ hash  padded: #left to: 32 with: $0]\\\\n\\\\t\\\\tifFalse: [(POP3LoginError protocolInstance: self) signal: 'APOP (MD5) not supported.'].\\\\n\\\\n\\\\tself sendCommand: 'APOP ', self user, ' ', hash.\\\\n\\\\tself checkResponse.\\\\n\\\\tself logProgress: self lastResponse]\\\\n\\\\t\\\\ton: ProtocolClientError\\\\n\\\\t\\\\tdo: [:ex |\\\\n\\\\t\\\\t\\\\tself close.\\\\n\\\\t\\\\t\\\\t(LoginFailedException protocolInstance: self) signal: 'Login failed.']! !\\\\n\\\\n!POP3Client methodsFor: 'private protocol' stamp: 'mir 4/7/2003 17:38'!\\\\nclearTextLogin\\\\n\\\\n\\\\t[self sendCommand: 'USER ', self user.\\\\n\\\\tself checkResponse.\\\\n\\\\tself logProgress: self lastResponse.\\\\n\\\\n\\\\tself sendCommand: 'PASS ', self password.\\\\n\\\\tself checkResponse.\\\\n\\\\tself logProgress: self lastResponse]\\\\n\\\\t\\\\ton: TelnetProtocolError\\\\n\\\\t\\\\tdo: [:ex |\\\\n\\\\t\\\\t\\\\t\\\\\\\"Neither authentication worked.  Indicate an error and close up\\\\\\\"\\\\n\\\\t\\\\t\\\\tself close.\\\\n\\\\t\\\\t\\\\tex resignalAs: ((LoginFailedException protocolInstance: self) signal: 'Login failed.')]! !\\\\n\\\\n!POP3Client methodsFor: 'private protocol' stamp: 'mir 11/14/2002 17:40'!\\\\ngetMultilineResponse\\\\n\\\\t\\\\\\\"Get a multiple line response to the last command, filtering out LF characters. A multiple line response ends with a line containing only a single period (.) character.\\\\\\\"\\\\n\\\\n\\\\t| response done chunk |\\\\n\\\\tresponse _ WriteStream on: ''.\\\\n\\\\tdone _ false.\\\\n\\\\t[done] whileFalse: [\\\\n\\\\t\\\\tchunk _ self stream nextLine.\\\\n\\\\t\\\\t(chunk beginsWith: '.')\\\\n\\\\t\\\\t\\\\tifTrue: [response nextPutAll: (chunk copyFrom: 2 to: chunk size); cr ]\\\\n\\\\t\\\\t\\\\tifFalse: [response nextPutAll: chunk; cr ].\\\\n\\\\t\\\\tdone _ (chunk = '.') ].\\\\n\\\\n\\\\t^ response contents\\\\n! !\\\\n\\\\n!POP3Client methodsFor: 'private protocol' stamp: 'mir 4/7/2003 17:39'!\\\\nlogin\\\\n\\\\tself loginMethod\\\\n\\\\t\\\\tifNil: [^self].\\\\n\\\\tself loginMethod == #clearText\\\\n\\\\t\\\\tifTrue: [^self clearTextLogin].\\\\n\\\\tself loginMethod == #APOP\\\\n\\\\t\\\\tifTrue: [^self apopLogin].\\\\n\\\\t(POP3LoginError protocolInstance: self) signal: 'Unsupported login procedure.'! !\\\\n\\\\n\\\\n!POP3Client methodsFor: 'private testing' stamp: 'mir 3/7/2002 13:43'!\\\\nresponseIsError\\\\n\\\\t^self lastResponse beginsWith: '-'! !\\\\n\\\\n!POP3Client methodsFor: 'private testing' stamp: 'mir 11/11/2002 15:44'!\\\\nresponseIsWarning\\\\n\\\\t^self lastResponse beginsWith: '-'! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPOP3Client class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!POP3Client class methodsFor: 'accessing' stamp: 'mir 3/7/2002 12:51'!\\\\ndefaultPortNumber\\\\n\\\\t^110! !\\\\n\\\\n!POP3Client class methodsFor: 'accessing' stamp: 'mir 3/7/2002 12:52'!\\\\nlogFlag\\\\n\\\\t^#pop! !\\\\n\\\\n\\\\n!POP3Client class methodsFor: 'example' stamp: 'rbb 3/1/2005 11:05'!\\\\nexample\\\\n\\\\t\\\\\\\"POP3Client example\\\\\\\"\\\\n\\\\t\\\\\\\"download a user's messages into an OrderedCollection and inspect the OrderedCollection\\\\\\\"\\\\n\\\\n\\\\t| ps messages userName password |\\\\n\\\\tuserName := (UIManager default request: 'POP username').\\\\n\\\\tpassword := (UIManager default request: 'POP password').\\\\n\\\\tps := POP3Client openOnHostNamed: (UIManager default request: 'POP server').\\\\n\\\\t[\\\\n\\\\tps loginUser: userName password: password.\\\\n\\\\tps logProgressToTranscript.\\\\n\\\\n\\\\tmessages := OrderedCollection new.\\\\n\\\\t1 to: ps messageCount do: [ :messageNr |\\\\n\\\\t\\\\tmessages add: (ps retrieveMessage: messageNr) ]]\\\\n\\\\t\\\\tensure: [ps close].\\\\n\\\\n\\\\tmessages inspect.! !\\\\nProtocolClientError subclass: #POP3LoginError\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Network-Protocols'!\\\\n!POP3LoginError commentStamp: 'mir 5/12/2003 17:58' prior: 0!\\\\nException for signaling POP3 login failures.!\\\\n\\\\nObject subclass: #PRServerDirectory\\\\n\\\\tinstanceVariableNames: 'server directories'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Network-RemoteDirectory'!\\\\n!PRServerDirectory commentStamp: 'md 1/26/2004 12:40' prior: 0!\\\\nAdd support to publish or download projects from Small-Land Project\\\\nRepository (SLPR).\\\\n\\\\nThe SLPR has virtual folders where the projects appears.  The SLPR can\\\\nbe acceded from the FileList or from the web interface at\\\\nhttp://repository.small-land.org:8080\\\\n\\\\nBasically it's a type of superswiki (but better ;)).\\\\n\\\\nThe features in SMPR not present in SuperSwiki are:\\\\n\\\\n- Both the web interface and the squeak-side interface are full\\\\ntranslatable.   The server has translations for English and Spanish just\\\\nnow, but it's almost trivial to include other translations... Stef?\\\\nMarcus? ;)\\\\n\\\\n- The projects are categorized in \\\\\\\"virtual\\\\\\\" folder.  These folders (By\\\\nCategory, By Author, By Language, Alphabetical, etc) give us good\\\\nsearching behaviour just using the FileList and mouse clicks.\\\\n\\\\n- The web interface (also full translatable) has a search a la google.\\\\n\\\\n- All the urls to query the web interface are \\\\\\\"clean enough\\\\\\\" so google\\\\ncan make a good job indexing our content in .pr files.\\\\n\\\\n\\\\nIt's planned to add \\\\\\\"editing\\\\\\\" features to the web interface to\\\\nre-categorize, remove, etc projects.\\\\n\\\\n\\\\nEnjoy it,\\\\n\\\\n-- \\\\nDiego Gomez Deck\\\\nhttp://www.small-land.org!\\\\n\\\\n\\\\n!PRServerDirectory methodsFor: 'accessing' stamp: 'dgd 12/22/2003 07:35'!\\\\ndirectories\\\\n\\\\t\\\\\\\"answer the receiver's directories\\\\\\\"\\\\n\\\\t^ directories! !\\\\n\\\\n!PRServerDirectory methodsFor: 'accessing' stamp: 'dgd 12/22/2003 20:44'!\\\\ndirectory\\\\n\\\\t\\\\\\\"answer the receiver's directory\\\\\\\"\\\\n\\\\t| result |\\\\n\\\\tresult := String new writeStream.\\\\n\\\\tself directories\\\\n\\\\t\\\\tdo: [:each | result nextPutAll: each]\\\\n\\\\t\\\\tseparatedBy: [result nextPutAll: self slash].\\\\n\\\\t^ result contents! !\\\\n\\\\n!PRServerDirectory methodsFor: 'accessing' stamp: 'dgd 12/22/2003 21:01'!\\\\ndirectoryWrapperClass\\\\n\\\\t\\\\\\\"answer the class to be used as a wrapper in FileList2\\\\\\\"\\\\n\\\\t^ FileDirectoryWrapper! !\\\\n\\\\n!PRServerDirectory methodsFor: 'accessing' stamp: 'dgd 12/22/2003 20:44'!\\\\ndownloadUrl\\\\n\\\\t\\\\\\\"The url under which files will be accessible.\\\\\\\"\\\\n\\\\t^ (self urlFromServer: self server directories: {'programmatic'})\\\\n\\\\t\\\\t, self slash! !\\\\n\\\\n!PRServerDirectory methodsFor: 'accessing' stamp: 'dgd 12/27/2003 11:06'!\\\\nmoniker\\\\n\\\\t\\\\\\\"a plain language name for this directory\\\\\\\"\\\\n\\\\t^ self server! !\\\\n\\\\n!PRServerDirectory methodsFor: 'accessing' stamp: 'dgd 12/22/2003 20:53'!\\\\nrealUrl\\\\n\\\\t\\\\\\\"a fully expanded version of the url we represent.\\\\\\\"\\\\n\\\\t^self urlFromServer: self server directories: self directories! !\\\\n\\\\n!PRServerDirectory methodsFor: 'accessing' stamp: 'dgd 12/22/2003 07:40'!\\\\nserver\\\\n\\\\t\\\\\\\"answer the receiver's server\\\\\\\"\\\\n\\\\t^ server! !\\\\n\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/22/2003 20:25'!\\\\ncreateDirectory: localName \\\\n\\\\t\\\\\\\"Create a new sub directory within the current one\\\\\\\"\\\\n\\\\t^ self inform: 'operation not supported' translated! !\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/22/2003 20:24'!\\\\ndeleteFileNamed: localFileName \\\\n\\\\t\\\\\\\"Delete the file with the given name in this directory.\\\\\\\"\\\\n\\\\t^ self inform: 'operation not supported' translated! !\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/22/2003 20:45'!\\\\ndirectoryNamed: aString \\\\n\\\\t\\\\\\\"Return the subdirectory of this directory with the given name.\\\\\\\"\\\\n\\\\t^ self class server: self server directory: self directory , self slash, aString! !\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/22/2003 21:30'!\\\\ndirectoryNames\\\\n\\\\t\\\\\\\"Return a collection of names for the subdirectories of this \\\\n\\\\tdirectory. \\\\\\\"\\\\n\\\\t^ self entries\\\\n\\\\t\\\\tselect: [:entry | entry isDirectory]\\\\n\\\\t\\\\tthenCollect: [:entry | entry name]! !\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/22/2003 20:40'!\\\\nentries\\\\n\\\\t\\\\\\\"Return a collection of directory entries for the files and \\\\n\\\\tdirectories in this directory.\\\\\\\"\\\\n\\\\t| lines |\\\\n\\\\tlines := self getLines.\\\\n\\\\t^ lines isNil\\\\n\\\\t\\\\tifTrue: [#()] ifFalse:[\\\\n\\\\t\\\\n\\\\tself parseLines: lines]! !\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/22/2003 21:30'!\\\\nfileNames\\\\n\\\\t\\\\\\\"Return a collection of names for the files (but not directories) in this directory.\\\\\\\"\\\\n\\\\t^ self entries\\\\n\\\\t\\\\tselect: [:entry | entry isDirectory not]\\\\n\\\\t\\\\tthenCollect: [:entry | entry name]! !\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/22/2003 20:30'!\\\\nfullNameFor: aString \\\\n\\\\\\\"Return a corrected, fully-qualified name for the given file name.\\\\\\\"\\\\n\\\\t^ self urlFromServer: self server directories: self directories , {aString}! !\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/27/2003 12:36'!\\\\ngetOnly: numberOfBytes from: fileNameOnServer \\\\n\\\\t\\\\\\\"Just capture the first numberOfBytes of the file.  \\\\n\\\\t \\\\n\\\\tGoes faster for long files. Return the contents, not a stream.\\\\\\\"\\\\n\\\\t| fileName |\\\\n\\\\tself flag: #todo.\\\\n\\\\t\\\\\\\"use LRUCache\\\\\\\"\\\\n\\\\tfileName := fileNameOnServer\\\\n\\\\t\\\\t\\\\t\\\\tallButFirst: (fileNameOnServer lastIndexOf: self pathNameDelimiter).\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t^ self getOnly: numberOfBytes ofProjectContents: fileName! !\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/22/2003 20:33'!\\\\noldFileNamed: aName \\\\\\\"Open the existing file with the given name in this directory.\\\\\\\"\\\\n\\\\t^ self oldFileOrNoneNamed: aName! !\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/27/2003 11:35'!\\\\noldFileOrNoneNamed: fullName \\\\n\\\\t\\\\\\\"If the file exists, answer a read-only FileStream on it. If it  \\\\n\\\\tdoesn't, answer nil.\\\\\\\"\\\\n\\\\t| fileName contents |\\\\n\\\\tfileName := fullName\\\\n\\\\t\\\\t\\\\t\\\\tallButFirst: (fullName lastIndexOf: self pathNameDelimiter).\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tcontents := self getFullProjectContents: fileName.\\\\n\\\\tcontents isNil\\\\n\\\\t\\\\tifTrue: [^ nil].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t^ (SwikiPseudoFileStream with: contents) directory: self;\\\\n\\\\t\\\\t localName: fileName;\\\\n\\\\t\\\\t reset;\\\\n\\\\t\\\\t yourself! !\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/22/2003 07:58'!\\\\non: fullName \\\\n\\\\t\\\\\\\"Answer another ServerDirectory on the partial path name.  \\\\n\\\\tfullName is directory path, and does include the name of the  \\\\n\\\\tserver.\\\\\\\"\\\\n\\\\t^ self class fullPath: fullName!\\\\n]style[(4 8 3 133 4 4 17 8)f3b,f3cblue;b,f3,f3c146044000,f3,f3cmagenta;,f3,f3cblue;i! !\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/22/2003 20:39'!\\\\npathName\\\\\\\"Path name as used in reading the file. \\\\\\\"\\\\n\\\\t^ self urlFromServer: self server directories: self directories! !\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/22/2003 08:08'!\\\\npathParts\\\\n\\\\t\\\\\\\"Return the path from the root of the file system to this  \\\\n\\\\tdirectory as an array of directory names. On a remote server.\\\\\\\"\\\\n\\\\t^ (OrderedCollection with: self server) addAll: self directories;\\\\n\\\\t\\\\t yourself! !\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/22/2003 20:34'!\\\\nreadOnlyFileNamed: aName \\\\n\\\\\\\"Open the existing file with the given name in this directory for read-only access.\\\\\\\"\\\\n\\\\t^ self oldFileNamed: aName! !\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/22/2003 20:26'!\\\\nrename: fullName toBe: newName \\\\n\\\\t\\\\\\\"Rename a remote file. fullName is just be a fileName, or can \\\\n\\\\tbe directory path that includes name of the server. newName \\\\n\\\\tis just a fileName\\\\\\\"\\\\n\\\\t^ self inform: 'operation not supported' translated! !\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/22/2003 20:37'!\\\\nsleep\\\\\\\"Leave the FileList window. Do nothing. \\\\\\\"\\\\n\\\\t^ self! !\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/22/2003 20:32'!\\\\nwakeUp\\\\\\\"Entering a FileList window. Do nothing.\\\\\\\"\\\\n\\\\t^ self! !\\\\n\\\\n\\\\n!PRServerDirectory methodsFor: 'initialization' stamp: 'dgd 12/22/2003 20:46'!\\\\ninitializeServer: serverString directories: directoriesCollection \\\\n\\\\t\\\\\\\"initialize the receiver's server and directories\\\\\\\"\\\\n\\\\tserver := serverString withBlanksTrimmed.\\\\n\\\\tserver last = self pathNameDelimiter\\\\n\\\\t\\\\tifTrue: [server := server allButLast withBlanksTrimmed].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tdirectories := directoriesCollection! !\\\\n\\\\n\\\\n!PRServerDirectory methodsFor: 'path access' stamp: 'dgd 12/22/2003 20:41'!\\\\npathNameDelimiter\\\\\\\"Return the delimiter character for this kind of directory.\\\\\\\"\\\\n\\\\t^ $/! !\\\\n\\\\n!PRServerDirectory methodsFor: 'path access' stamp: 'dgd 12/22/2003 20:44'!\\\\nslash\\\\n\\\\\\\"answer the recevier 'slash'\\\\\\\"\\\\n\\\\t^ self pathNameDelimiter asString! !\\\\n\\\\n\\\\n!PRServerDirectory methodsFor: 'squeaklets' stamp: 'dgd 3/8/2006 17:38'!\\\\nwriteProject: aProject inFileNamed: fileNameString fromDirectory: localDirectory \\\\n\\\\t\\\\\\\"write aProject (a file version can be found in the file named  \\\\n\\\\tfileNameString in localDirectory)\\\\\\\"\\\\n\\\\t| url arguments answer string |\\\\n\\\\turl := self urlFromServer: self server directories: {'programmatic'. 'uploadproject'}.\\\\n\\\\targuments := self\\\\n\\\\t\\\\t\\\\t\\\\tgetPostArgsFromProject: aProject\\\\n\\\\t\\\\t\\\\t\\\\tfileNamed: fileNameString\\\\n\\\\t\\\\t\\\\t\\\\tfromDirectory: localDirectory.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tCursor read\\\\n\\\\t\\\\tshowWhile: [\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\tanswer := HTTPClient httpPostDocument: url args: arguments.\\\\n\\\\t\\\\t\\\\t\\\\\\\"answer := HTTPSocket httpGetDocument: url args: arguments.\\\\\\\"\\\\n\\\\t\\\\t\\\\tstring := answer contents.\\\\n\\\\t\\\\t\\\\t(string beginsWith: '--OK--')\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [^ true]].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tself\\\\n\\\\t\\\\tinform: ('Server responded: {1}' translated format: {string}).\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!PRServerDirectory methodsFor: 'testing' stamp: 'dgd 12/22/2003 20:39'!\\\\nacceptsUploads\\\\n\\\\t\\\\\\\"answer whatever the receiver accepts uploads\\\\\\\"\\\\n\\\\t^ true! !\\\\n\\\\n!PRServerDirectory methodsFor: 'testing' stamp: 'dgd 12/22/2003 00:42'!\\\\nisProjectSwiki\\\\n\\\\t\\\\\\\"answer whatever the receiver is a project swiki\\\\\\\"\\\\n\\\\t^ true! !\\\\n\\\\n!PRServerDirectory methodsFor: 'testing' stamp: 'dgd 12/27/2003 11:04'!\\\\nisRemoteDirectory\\\\n\\\\t\\\\\\\"answer whatever the receiver is a remote directory\\\\\\\"\\\\n\\\\t^ true! !\\\\n\\\\n!PRServerDirectory methodsFor: 'testing' stamp: 'dgd 12/21/2003 23:31'!\\\\nisSearchable\\\\n\\\\t\\\\\\\"answer whatever the receiver is searchable\\\\\\\"\\\\n\\\\t^ true! !\\\\n\\\\n!PRServerDirectory methodsFor: 'testing' stamp: 'dgd 8/17/2004 22:14'!\\\\nqueryProjectsAndShow: thingsToSearchForCollection \\\\n\\\\t\\\\\\\"query the server for all the projects that match  \\\\n\\\\tthingsToSearchForCollection\\\\\\\"\\\\n\\\\t| url arguments answer string |\\\\n\\\\turl := self urlFromServer: self server directories: {'programmatic'. 'queryprojects'}.\\\\n\\\\targuments := self getPostArgsFromThingsToSearchFor: thingsToSearchForCollection.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tCursor read\\\\n\\\\t\\\\tshowWhile: [\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\\\\"answer := HTTPClient httpPostDocument: url args:  \\\\n\\\\t\\\\t\\\\targs.\\\\\\\"\\\\n\\\\t\\\\t\\\\tanswer := HTTPSocket httpGetDocument: url args: arguments.\\\\n\\\\t\\\\t\\\\tstring := answer contents.\\\\n\\\\t\\\\t\\\\t(string beginsWith: '--OK--')\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [^ true]].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tself\\\\n\\\\t\\\\tinform: ('Server responded: {1}' translated format: {string}).\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!PRServerDirectory methodsFor: 'private' stamp: 'dgd 12/27/2003 11:34'!\\\\ngetFullProjectContents: aString \\\\n\\\\t\\\\\\\"private - get the project content from the server\\\\\\\"\\\\n\\\\t^ self getOnly: nil ofProjectContents: aString! !\\\\n\\\\n!PRServerDirectory methodsFor: 'private' stamp: 'dgd 8/17/2004 22:23'!\\\\ngetLines\\\\n\\\\t\\\\\\\"private - answer a collection of lines with the server response\\\\\\\"\\\\n\\\\t| url answer string lines |\\\\n\\\\turl := self urlFromServer: self server directories: {'programmatic'} , self directories.\\\\n\\\\turl := url , self slash.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tCursor read\\\\n\\\\t\\\\tshowWhile: [\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\tanswer := HTTPClient httpGetDocument: url.\\\\n\\\\t\\\\t\\\\tstring := answer contents.\\\\n\\\\t\\\\t\\\\t(string beginsWith: '--OK--')\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [^ nil]].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tlines := OrderedCollection new.\\\\n\\\\t(string allButFirst: 6)\\\\n\\\\t\\\\tlinesDo: [:line | lines add: line squeakToIso].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t^ lines! !\\\\n\\\\n!PRServerDirectory methodsFor: 'private' stamp: 'dgd 12/27/2003 12:37'!\\\\ngetOnly: numberOfBytes ofProjectContents: aString \\\\n\\\\t\\\\\\\"private - get numberOfBytes of the project contents\\\\\\\"\\\\n\\\\t| url answer contents args |\\\\n\\\\tself flag: #todo.\\\\n\\\\t\\\\\\\"use an LRUCache\\\\\\\"\\\\n\\\\turl := self urlFromServer: self server directories: {'programmatic'. aString}.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\targs := numberOfBytes isNil\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: ['numberOfBytes=' , numberOfBytes asString].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tCursor read\\\\n\\\\t\\\\tshowWhile: [\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\tanswer := HTTPSocket httpGetDocument: url args: args.\\\\n\\\\t\\\\t\\\\tcontents := answer contents].\\\\\\\"\\\\\\\"\\\\n\\\\t(contents beginsWith: '--OK--')\\\\n\\\\t\\\\tifFalse: [^ nil].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t^ contents allButFirst: 6! !\\\\n\\\\n!PRServerDirectory methodsFor: 'private' stamp: 'dgd 4/3/2006 13:27'!\\\\ngetPostArgsFromProject: aProject fileNamed: fileNameString fromDirectory: localDirectory \\\\n\\\\t| args thumbnail uploader |\\\\n\\\\targs := Dictionary new.\\\\n\\\\n\\\\t\\\\\\\"args at: 'contents' put: {(localDirectory oldFileNamed: fileNameString) contentsOfEntireFile}.\\\\\\\"\\\\n\\\\targs at: 'contents' put: {(StandardFileStream\\\\n\\\\t\\\\t\\\\treadOnlyFileNamed: (localDirectory fullNameFor: fileNameString)) contentsOfEntireFile}.\\\\n\\\\n\\\\targs at: 'name' put: {aProject name isoToSqueak}.\\\\n\\\\targs at: 'version' put: {(Project parseProjectFileName: fileNameString) second asString}.\\\\n\\\\targs at: 'language' put: {aProject naturalLanguage asString}.\\\\n\\\\n\\\\tuploader := Utilities authorNamePerSe.\\\\n\\\\tuploader isEmptyOrNil\\\\n\\\\t\\\\tifTrue: [uploader := Utilities authorInitialsPerSe].\\\\n\\\\tuploader isEmptyOrNil\\\\n\\\\t\\\\tifFalse: [args at: 'uploader' put: {uploader}].\\\\n\\\\n\\\\tself putSmalltalkInfoInto: args.\\\\n\\\\n\\\\tthumbnail := self getProjectThumbnail: aProject.\\\\n\\\\tthumbnail isNil\\\\n\\\\t\\\\tifFalse: [args at: 'thumbnailcontents' put: {thumbnail}].\\\\n\\\\n\\\\tself putProjectDetailsFrom: aProject to: args.\\\\n\\\\n\\\\t^ args! !\\\\n\\\\n!PRServerDirectory methodsFor: 'private' stamp: 'dgd 8/17/2004 22:14'!\\\\ngetPostArgsFromThingsToSearchFor: thingsToSearchForCollection \\\\n\\\\t| args |\\\\n\\\\targs := Dictionary new.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tthingsToSearchForCollection\\\\n\\\\t\\\\tdo: [:each | \\\\n\\\\t\\\\t\\\\t| pos | \\\\n\\\\t\\\\t\\\\tpos := each indexOf: $:.\\\\n\\\\t\\\\t\\\\tpos isZero\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [| key value | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tkey := (each first: pos - 1) withBlanksTrimmed.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tvalue := (each allButFirst: pos) withBlanksTrimmed.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(value beginsWith: '*')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [value := value allButFirst].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(value endsWith: '*')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [value := value allButLast].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\targs at: key put: {value}]].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t^ args! !\\\\n\\\\n!PRServerDirectory methodsFor: 'private' stamp: 'dgd 12/24/2003 11:33'!\\\\ngetProjectThumbnail: aProject \\\\n\\\\t\\\\\\\"private - answer a stream with the aProject's thumbnail or nil if none\\\\\\\"\\\\n\\\\t| form stream |\\\\n\\\\tform := aProject thumbnail.\\\\n\\\\tform isNil\\\\n\\\\t\\\\tifTrue: [^ nil].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tform unhibernate.\\\\n\\\\tform := form colorReduced.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tself flag: #todo.\\\\n\\\\t\\\\\\\"use a better image format than GIF\\\\\\\"\\\\n\\\\tstream := RWBinaryOrTextStream on: String new.\\\\n\\\\tGIFReadWriter putForm: form onStream: stream.\\\\n\\\\tstream reset.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t^ stream contents asString! !\\\\n\\\\n!PRServerDirectory methodsFor: 'private' stamp: 'dgd 12/22/2003 20:34'!\\\\nparseLine: aString \\\\n\\\\\\\"private - parse a line from a server response\\\\\\\"\\\\n\\\\t| tokens |\\\\n\\\\ttokens := aString findTokens: '|'.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t^ tokens first = 'D'\\\\n\\\\t\\\\tifTrue: [\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\tDirectoryEntry\\\\n\\\\t\\\\t\\\\t\\\\tname: tokens second\\\\n\\\\t\\\\t\\\\t\\\\tcreationTime: 0\\\\n\\\\t\\\\t\\\\t\\\\tmodificationTime: 0\\\\n\\\\t\\\\t\\\\t\\\\tisDirectory: true\\\\n\\\\t\\\\t\\\\t\\\\tfileSize: 0]\\\\n\\\\t\\\\tifFalse: [\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\tDirectoryEntry\\\\n\\\\t\\\\t\\\\t\\\\tname: tokens second\\\\n\\\\t\\\\t\\\\t\\\\tcreationTime: tokens third asInteger\\\\n\\\\t\\\\t\\\\t\\\\tmodificationTime: tokens fourth asInteger\\\\n\\\\t\\\\t\\\\t\\\\tisDirectory: false\\\\n\\\\t\\\\t\\\\t\\\\tfileSize: tokens fifth asInteger]! !\\\\n\\\\n!PRServerDirectory methodsFor: 'private' stamp: 'dgd 12/22/2003 20:38'!\\\\nparseLines: aCollection \\\\n\\\\\\\"private - parse aCollection of lines from a server response\\\\\\\"\\\\n\\\\t^ aCollection\\\\n\\\\t\\\\tcollect: [:each | self parseLine: each]! !\\\\n\\\\n!PRServerDirectory methodsFor: 'private' stamp: 'dgd 9/7/2004 12:16'!\\\\nputProjectDetailsFrom: aProject to: args \\\\n\\\\t| projectDetails |\\\\n\\\\tprojectDetails := aProject world\\\\n\\\\t\\\\t\\\\t\\\\tvalueOfProperty: #ProjectDetails\\\\n\\\\t\\\\t\\\\t\\\\tifAbsent: [^ self].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tself flag: #todo.\\\\n\\\\t\\\\\\\"projectname ?\\\\\\\"\\\\n\\\\tprojectDetails\\\\n\\\\t\\\\tat: 'projectdescription'\\\\n\\\\t\\\\tifPresent: [:value | args at: 'description' put: {value isoToSqueak}].\\\\n\\\\tprojectDetails\\\\n\\\\t\\\\tat: 'projectauthor'\\\\n\\\\t\\\\tifPresent: [:value | args at: 'author' put: {value isoToSqueak}].\\\\n\\\\tprojectDetails\\\\n\\\\t\\\\tat: 'projectcategory'\\\\n\\\\t\\\\tifPresent: [:value | args at: 'category' put: {value isoToSqueak}].\\\\n\\\\tprojectDetails\\\\n\\\\t\\\\tat: 'projectsubcategory'\\\\n\\\\t\\\\tifPresent: [:value | args at: 'subcategory' put: {value isoToSqueak}].\\\\n\\\\tprojectDetails\\\\n\\\\t\\\\tat: 'projectkeywords'\\\\n\\\\t\\\\tifPresent: [:value | args at: 'keywords' put: {value isoToSqueak}]! !\\\\n\\\\n!PRServerDirectory methodsFor: 'private' stamp: 'dgd 9/7/2004 12:13'!\\\\nputSmalltalkInfoInto: args \\\\n\\\\t\\\\\\\"private - fills args with information from Smalltalk\\\\\\\"\\\\n\\\\tself flag: #todo.\\\\n\\\\t\\\\\\\" \\\\n\\\\tlastest small-land changeset / small-land version  \\\\n\\\\t\\\\\\\"\\\\n\\\\t#(#datedVersion #osVersion #platformName #platformSubtype #vmPath #vmVersion #imageName #changesName #sourcesName #listBuiltinModules #listLoadedModules #getVMParameters )\\\\n\\\\t\\\\tdo: [:each | \\\\n\\\\t\\\\t\\\\t| value | \\\\n\\\\t\\\\t\\\\tvalue := SmalltalkImage current perform: each.\\\\n\\\\t\\\\t\\\\targs at: 'extra-' , each asString put: {value asString isoToSqueak}]! !\\\\n\\\\n!PRServerDirectory methodsFor: 'private' stamp: 'dgd 12/22/2003 20:47'!\\\\nurlFromServer: serverString directories: aCollection \\\\n\\\\t\\\\\\\"private - builds an url for server/directories\\\\\\\"\\\\n\\\\t| result |\\\\n\\\\tresult := String new writeStream.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t{serverString} , aCollection\\\\n\\\\t\\\\tdo: [:each | \\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\tresult\\\\n\\\\t\\\\t\\\\t\\\\tnextPutAll: (each copyReplaceAll: ' ' with: '+')]\\\\n\\\\t\\\\tseparatedBy: [result nextPutAll: self slash].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t^ result contents! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPRServerDirectory class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PRServerDirectory class methodsFor: 'instance creation' stamp: 'dgd 12/22/2003 20:43'!\\\\nfullPath: fullNameString\\\\n\\\\t\\\\\\\"answer an instance of the receiver on fullName\\\\\\\"\\\\n\\\\t| pathParts |\\\\n\\\\tpathParts := self pathParts: fullNameString.\\\\n\\\\t^ self server: pathParts first directories: pathParts allButFirst! !\\\\n\\\\n!PRServerDirectory class methodsFor: 'instance creation' stamp: 'dgd 12/22/2003 20:43'!\\\\npathParts: fullName \\\\n\\\\t\\\\\\\"private - parse fullName in server and directory\\\\\\\"\\\\n\\\\t| url slashPos server directory |\\\\n\\\\turl := fullName.\\\\n\\\\t(url beginsWith: 'http://')\\\\n\\\\t\\\\tifTrue: [url := url allButFirst: 7].\\\\n\\\\turl last = $/\\\\n\\\\t\\\\tifTrue: [url := url allButLast].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tslashPos := url indexOf: $/.\\\\n\\\\tslashPos isZero\\\\n\\\\t\\\\tifTrue: [^ {'http://' , url}].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tserver := url first: slashPos - 1.\\\\n\\\\tdirectory := url allButFirst: slashPos.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t^ {'http://' , server. directory}! !\\\\n\\\\n!PRServerDirectory class methodsFor: 'instance creation' stamp: 'dgd 12/22/2003 07:57'!\\\\nserver: serverString \\\\n\\\\t\\\\\\\"answer a new instance of the receiver on server aString\\\\\\\"\\\\n\\\\t^ self server: serverString directories: #()! !\\\\n\\\\n!PRServerDirectory class methodsFor: 'instance creation' stamp: 'dgd 12/22/2003 07:56'!\\\\nserver: serverString directories: aCollection \\\\n\\\\t\\\\\\\"answer a new instance of the receiver on server aString\\\\\\\"\\\\n\\\\t^ self new initializeServer: serverString directories: aCollection! !\\\\n\\\\n!PRServerDirectory class methodsFor: 'instance creation' stamp: 'dgd 12/22/2003 07:58'!\\\\nserver: serverString directory: directoryString \\\\n\\\\t\\\\\\\"answer a new instance of the receiver on server aString\\\\\\\"\\\\n\\\\t^ self new\\\\n\\\\t\\\\tinitializeServer: serverString\\\\n\\\\t\\\\tdirectories: (directoryString findTokens: '/')!\\\\n]style[(8 12 12 15 3 57 4 4 25 12 17 15 13 3 1)f3b,f3cblue;b,f3b,f3cblue;b,f3,f3c146044000,f3,f3cmagenta;,f3,f3cblue;i,f3,f3cblue;i,f3,f3c255146000b,f3! !\\\\nObject subclass: #PackageInfo\\\\n\\\\tinstanceVariableNames: 'packageName methodCategoryPrefix'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'PackageInfo-Base'!\\\\n!PackageInfo commentStamp: '<historical>' prior: 0!\\\\nSubclass this class to create new Packages.!\\\\n\\\\n\\\\n!PackageInfo methodsFor: 'comparing' stamp: 'avi 10/11/2003 14:20'!\\\\nhash\\\\n\\\\t^ packageName hash! !\\\\n\\\\n!PackageInfo methodsFor: 'comparing' stamp: 'avi 10/11/2003 00:09'!\\\\n= other\\\\n\\\\t^ other species = self species and: [other packageName = self packageName]! !\\\\n\\\\n\\\\n!PackageInfo methodsFor: 'dependencies' stamp: 'ab 11/18/2002 01:16'!\\\\nexternalCallers\\\\n\\\\t^ self \\\\n\\\\t\\\\texternalRefsSelect: [:literal | literal isKindOf: Symbol] \\\\n\\\\t\\\\tthenCollect: [:l | l].! !\\\\n\\\\n!PackageInfo methodsFor: 'dependencies' stamp: 'stephaneducasse 2/4/2006 20:40'!\\\\nexternalClasses\\\\n\\\\t| myClasses |\\\\n\\\\tmyClasses := self classesAndMetaClasses.\\\\n\\\\t^ Array streamContents:\\\\n\\\\t\\\\t[:s |\\\\n\\\\t\\\\tProtoObject withAllSubclassesDo:\\\\n\\\\t\\\\t\\\\t[:class |\\\\n\\\\t\\\\t\\\\t(myClasses includes: class) ifFalse: [s nextPut: class]]]! !\\\\n\\\\n!PackageInfo methodsFor: 'dependencies' stamp: 'stephaneducasse 2/4/2006 20:40'!\\\\nexternalRefsSelect: selBlock thenCollect: colBlock\\\\n\\\\t| pkgMethods dependents refs extMethods otherClasses otherMethods classNames |\\\\n\\\\n\\\\tclassNames := self classes collect: [:c | c name].\\\\n\\\\textMethods := self extensionMethods collect: [:mr | mr methodSymbol].\\\\n\\\\totherClasses := self externalClasses difference: self externalSubclasses.\\\\n\\\\totherMethods :=  otherClasses gather: [:c | c selectors].\\\\n\\\\tpkgMethods := self methods asSet collect: [:mr | mr methodSymbol].\\\\n\\\\tpkgMethods removeAllFoundIn: otherMethods.\\\\n\\\\n\\\\tdependents := Set new.\\\\n\\\\totherClasses do: [:c |\\\\n\\\\t\\\\tc selectorsAndMethodsDo:\\\\n\\\\t\\\\t\\\\t[:sel :compiled |\\\\n\\\\t\\\\t\\\\t(extMethods includes: sel) ifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t[refs := compiled literals select: selBlock thenCollect: colBlock.\\\\n\\\\t\\\\t\\\\t\\\\trefs do: [:ea |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t((classNames includes: ea) or: [pkgMethods includes: ea])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [dependents add: (self referenceForMethod: sel ofClass: c) -> ea]]]]].\\\\n\\\\t^ dependents! !\\\\n\\\\n!PackageInfo methodsFor: 'dependencies' stamp: 'stephaneducasse 2/4/2006 20:40'!\\\\nexternalSubclasses\\\\n\\\\t| pkgClasses subClasses |\\\\n\\\\tpkgClasses := self classes.\\\\n\\\\tsubClasses := Set new.\\\\n\\\\tpkgClasses do: [:c | subClasses addAll: (c allSubclasses)].\\\\n\\\\t^ subClasses difference: pkgClasses\\\\n! !\\\\n\\\\n!PackageInfo methodsFor: 'dependencies' stamp: 'ab 11/18/2002 01:15'!\\\\nexternalUsers\\\\n\\\\t^ self \\\\n\\\\t\\\\texternalRefsSelect: [:literal | literal isVariableBinding] \\\\n\\\\t\\\\tthenCollect: [:l | l key]! !\\\\n\\\\n\\\\n!PackageInfo methodsFor: 'listing' stamp: 'ac 5/14/2003 16:23'!\\\\nclasses\\\\n\\\\t^(self systemCategories gather:\\\\n\\\\t\\\\t[:cat |\\\\n\\\\t\\\\t(SystemOrganization listAtCategoryNamed: cat)\\\\n\\\\t\\\\t\\\\tcollect: [:className | Smalltalk at: className]])\\\\n\\\\t\\\\t\\\\t\\\\tsortBy: [:a :b | a className <= b className]! !\\\\n\\\\n!PackageInfo methodsFor: 'listing' stamp: 'al 12/14/2005 18:06'!\\\\nclassesAndMetaClasses\\\\n\\\\t| baseClasses |\\\\n\\\\tbaseClasses := self classes.\\\\n\\\\t^baseClasses , (baseClasses collect: [:c | c classSide])! !\\\\n\\\\n!PackageInfo methodsFor: 'listing' stamp: 'ab 11/13/2002 01:23'!\\\\ncoreMethods\\\\n\\\\t^ self classesAndMetaClasses gather: [:class | self coreMethodsForClass: class]! !\\\\n\\\\n!PackageInfo methodsFor: 'listing' stamp: 'al 3/1/2006 21:51'!\\\\nextensionClasses\\\\n\\\\t^ self externalBehaviors reject: [:classOrTrait | (self extensionCategoriesForClass: classOrTrait) isEmpty]! !\\\\n\\\\n!PackageInfo methodsFor: 'listing' stamp: 'al 3/1/2006 21:51'!\\\\nextensionMethods\\\\n\\\\t^ self externalBehaviors gather: [:classOrTrait | self extensionMethodsForClass: classOrTrait]! !\\\\n\\\\n!PackageInfo methodsFor: 'listing' stamp: 'stephaneducasse 2/4/2006 20:40'!\\\\nforeignClasses\\\\n\\\\t| s |\\\\n\\\\ts := IdentitySet new.\\\\n\\\\tself foreignSystemCategories\\\\n\\\\t\\\\tdo: [:c | (SystemOrganization listAtCategoryNamed: c)\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:cl | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t| cls | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcls := Smalltalk at: cl. \\\\n\\\\t\\\\t\\\\t\\\\t\\\\ts add: cls;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t  add: cls class]].\\\\n\\\\t^ s! !\\\\n\\\\n!PackageInfo methodsFor: 'listing' stamp: 'ab 12/3/2002 14:34'!\\\\nforeignSystemCategories\\\\n\\\\t^ SystemOrganization categories\\\\n\\\\t\\\\treject: [:cat | self includesSystemCategory: cat] ! !\\\\n\\\\n!PackageInfo methodsFor: 'listing' stamp: 'al 10/9/2005 20:00'!\\\\nmethods\\\\n\\\\t^ (self extensionMethods, self coreMethods) select: [:method |\\\\n\\\\t\\\\tmethod isValid\\\\n\\\\t\\\\t\\\\tand: [method isLocalSelector]\\\\n\\\\t\\\\t\\\\tand: [method methodSymbol isDoIt not]]! !\\\\n\\\\n!PackageInfo methodsFor: 'listing' stamp: 'avi 11/10/2003 15:35'!\\\\noverrideMethods\\\\n\\\\t^ self extensionMethods select: [:ea | self isOvverideMethod: ea]! !\\\\n\\\\n!PackageInfo methodsFor: 'listing' stamp: 'ab 11/14/2002 18:39'!\\\\nselectors\\\\n\\\\t^ self methods collect: [:ea | ea methodSymbol]! !\\\\n\\\\n!PackageInfo methodsFor: 'listing' stamp: 'ab 11/11/2002 21:51'!\\\\nsystemCategories\\\\n\\\\t^ SystemOrganization categories select: [:cat | self includesSystemCategory: cat]! !\\\\n\\\\n\\\\n!PackageInfo methodsFor: 'modifying' stamp: 'stephaneducasse 2/4/2006 20:40'!\\\\naddCoreMethod: aMethodReference\\\\n\\\\t| category |\\\\n\\\\tcategory := self baseCategoryOfMethod: aMethodReference.\\\\n\\\\taMethodReference actualClass organization\\\\n\\\\t\\\\tclassify: aMethodReference methodSymbol\\\\n\\\\t\\\\tunder: category\\\\n\\\\t\\\\tsuppressIfDefault: false! !\\\\n\\\\n!PackageInfo methodsFor: 'modifying' stamp: 'stephaneducasse 2/4/2006 20:40'!\\\\naddExtensionMethod: aMethodReference\\\\n\\\\t| category |\\\\n\\\\tcategory := self baseCategoryOfMethod: aMethodReference.\\\\n\\\\taMethodReference actualClass organization\\\\n\\\\t\\\\tclassify: aMethodReference methodSymbol\\\\n\\\\t\\\\tunder: self methodCategoryPrefix, '-', category! !\\\\n\\\\n!PackageInfo methodsFor: 'modifying' stamp: 'avi 10/11/2003 15:16'!\\\\naddMethod: aMethodReference\\\\n\\\\t(self includesClass: aMethodReference class)\\\\n\\\\t\\\\tifTrue: [self addCoreMethod: aMethodReference]\\\\n\\\\t\\\\tifFalse: [self addExtensionMethod: aMethodReference]! !\\\\n\\\\n!PackageInfo methodsFor: 'modifying' stamp: 'stephaneducasse 2/4/2006 20:40'!\\\\nbaseCategoryOfMethod: aMethodReference\\\\n\\\\t| oldCat oldPrefix tokens | \\\\n\\\\toldCat := aMethodReference category.\\\\n\\\\t({ 'as yet unclassified'. 'all' } includes: oldCat) ifTrue: [ oldCat := '' ].\\\\n\\\\ttokens := oldCat findTokens: '*-' keep: '*'.\\\\n\\\\n\\\\t\\\\\\\"Strip off any old prefixes\\\\\\\"\\\\n\\\\t((tokens at: 1 ifAbsent: [ '' ]) = '*') ifTrue: [\\\\n\\\\t\\\\t[ ((tokens at: 1 ifAbsent: [ '' ]) = '*') ]\\\\n\\\\t\\\\t\\\\twhileTrue: [ tokens removeFirst ].\\\\n\\\\t\\\\toldPrefix := tokens removeFirst asLowercase.\\\\n\\\\t\\\\t[ (tokens at: 1 ifAbsent: [ '' ]) asLowercase = oldPrefix ]\\\\n\\\\t\\\\t\\\\twhileTrue: [ tokens removeFirst ].\\\\n\\\\t].\\\\n\\\\n\\\\ttokens isEmpty ifTrue: [^ 'as yet unclassified'].\\\\n\\\\t^ String streamContents:\\\\n\\\\t\\\\t[ :s |\\\\n\\\\t\\\\ttokens\\\\n\\\\t\\\\t\\\\tdo: [ :tok | s nextPutAll: tok ]\\\\n\\\\t\\\\t\\\\tseparatedBy: [ s nextPut: $- ]]! !\\\\n\\\\n!PackageInfo methodsFor: 'modifying' stamp: 'al 3/1/2006 21:42'!\\\\nexternalBehaviors\\\\n\\\\t^self externalClasses , self externalTraits! !\\\\n\\\\n!PackageInfo methodsFor: 'modifying' stamp: 'al 3/1/2006 22:08'!\\\\nexternalTraits\\\\n\\\\t| behaviors |\\\\n\\\\t\\\\n\\\\t^ Array streamContents: [:s |\\\\n\\\\t\\\\tbehaviors := self classesAndMetaClasses.\\\\n\\\\t\\\\tSmalltalk allTraits do: [:trait |\\\\n\\\\t\\\\t\\\\t(behaviors includes: trait) ifFalse: [s nextPut: trait].\\\\n\\\\t\\\\t\\\\t(behaviors includes: trait classSide) ifFalse: [s nextPut: trait classSide]]].\\\\t\\\\t\\\\t! !\\\\n\\\\n!PackageInfo methodsFor: 'modifying' stamp: 'avi 10/11/2003 15:14'!\\\\nremoveMethod: aMethodReference! !\\\\n\\\\n\\\\n!PackageInfo methodsFor: 'naming' stamp: 'stephaneducasse 2/4/2006 20:40'!\\\\ncategoryName\\\\n\\\\t|category|\\\\n\\\\tcategory := self class category.\\\\n\\\\t^ (category endsWith: '-Info')\\\\n\\\\t\\\\tifTrue: [category copyUpToLast: $-]\\\\n\\\\t\\\\tifFalse: [category]! !\\\\n\\\\n!PackageInfo methodsFor: 'naming' stamp: 'ab 10/16/2002 21:22'!\\\\nexternalName\\\\n\\\\t^ self packageName! !\\\\n\\\\n!PackageInfo methodsFor: 'naming' stamp: 'stephaneducasse 2/4/2006 20:40'!\\\\nmethodCategoryPrefix\\\\n\\\\t^ methodCategoryPrefix ifNil: [methodCategoryPrefix := '*', self packageName asLowercase]! !\\\\n\\\\n!PackageInfo methodsFor: 'naming' stamp: 'stephaneducasse 2/4/2006 20:40'!\\\\npackageName\\\\n\\\\t^ packageName ifNil: [packageName := self categoryName]! !\\\\n\\\\n!PackageInfo methodsFor: 'naming' stamp: 'stephaneducasse 2/4/2006 20:40'!\\\\npackageName: aString\\\\n\\\\tpackageName := aString! !\\\\n\\\\n!PackageInfo methodsFor: 'naming' stamp: 'ab 10/28/2002 10:38'!\\\\nsystemCategoryPrefix\\\\n\\\\t^ self packageName! !\\\\n\\\\n\\\\n!PackageInfo methodsFor: 'registering' stamp: 'avi 11/12/2003 23:12'!\\\\nregister\\\\n\\\\tPackageOrganizer default registerPackage: self! !\\\\n\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'avi 3/9/2004 15:53'!\\\\ncategory: categoryName matches: prefix\\\\n\\\\t^ categoryName notNil and: [categoryName = prefix or: [categoryName beginsWith: prefix, '-']]! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'ab 11/13/2002 01:18'!\\\\ncoreCategoriesForClass: aClass\\\\n\\\\t^ aClass organization categories select: [:cat | (self isForeignClassExtension: cat) not]! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'ab 11/13/2002 01:22'!\\\\ncoreMethodsForClass: aClass\\\\n\\\\t^ (aClass selectors difference:\\\\n\\\\t\\\\t((self foreignExtensionMethodsForClass: aClass) collect: [:r | r methodSymbol]))\\\\n\\\\t\\\\t\\\\tasArray collect: [:sel | self referenceForMethod: sel ofClass: aClass]! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'ab 11/13/2002 01:20'!\\\\nextensionCategoriesForClass: aClass\\\\n\\\\t^ aClass organization categories select: [:cat | self isYourClassExtension: cat]! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'avi 4/6/2004 15:16'!\\\\nextensionMethodsForClass: aClass\\\\n\\\\t^ (self extensionCategoriesForClass: aClass)\\\\n\\\\t\\\\tgather: [:cat | ((aClass organization listAtCategoryNamed: cat) ifNil: [#()])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcollect: [:sel | self referenceForMethod: sel ofClass: aClass]]! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'dvf 10/18/2002 23:22'!\\\\nextensionMethodsFromClasses: classes\\\\n\\\\t^classes\\\\n\\\\t\\\\tgather: [:class | self extensionMethodsForClass: class]! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'ab 11/13/2002 01:22'!\\\\nforeignExtensionCategoriesForClass: aClass\\\\n\\\\t^ aClass organization categories select: [:cat | self isForeignClassExtension: cat]! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'ab 11/13/2002 01:23'!\\\\nforeignExtensionMethodsForClass: aClass\\\\n\\\\t^ (self foreignExtensionCategoriesForClass: aClass)\\\\n\\\\t\\\\tgather: [:cat | (aClass organization listAtCategoryNamed: cat)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t  collect: [:sel | self referenceForMethod: sel ofClass: aClass]]! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'dvf 7/23/2003 14:08'!\\\\nincludesClassNamed: aClassName\\\\n\\\\t^ self includesSystemCategory: ((SystemOrganization categoryOfElement: aClassName) ifNil: [^false])! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'ab 11/13/2002 01:23'!\\\\nincludesClass: aClass\\\\n\\\\t^ self includesSystemCategory: aClass theNonMetaClass category! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'dvf 7/23/2003 14:06'!\\\\nincludesMethodCategory: categoryName ofClassNamed: aClass\\\\n\\\\t^ (self isYourClassExtension: categoryName)\\\\n\\\\t\\\\tor: [(self includesClassNamed: aClass)\\\\n\\\\t\\\\t\\\\t\\\\tand: [(self isForeignClassExtension: categoryName) not]]! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'dvf 9/17/2002 00:18'!\\\\nincludesMethodCategory: categoryName ofClass: aClass\\\\n\\\\t^ (self isYourClassExtension: categoryName)\\\\n\\\\t\\\\tor: [(self includesClass: aClass)\\\\n\\\\t\\\\t\\\\t\\\\tand: [(self isForeignClassExtension: categoryName) not]]! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'ab 11/14/2002 18:06'!\\\\nincludesMethodReference: aMethodRef\\\\n\\\\t^ self includesMethod: aMethodRef methodSymbol ofClass: aMethodRef actualClass! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'ab 12/5/2002 00:16'!\\\\nincludesMethod: aSymbol ofClass: aClass\\\\n\\\\taClass ifNil: [^ false].\\\\n\\\\t^ self\\\\n\\\\t\\\\tincludesMethodCategory: ((aClass organization categoryOfElement: aSymbol)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifNil: [' '])\\\\n\\\\t\\\\tofClass: aClass! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'ab 11/13/2002 01:23'!\\\\nincludesSystemCategory: categoryName\\\\n\\\\t^ self category: categoryName matches: self systemCategoryPrefix! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'ab 11/13/2002 01:23'!\\\\nisForeignClassExtension: categoryName\\\\n\\\\t^ categoryName first = $* and: [(self isYourClassExtension: categoryName) not]! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'avi 11/10/2003 15:42'!\\\\nisOverrideMethod: aMethodReference\\\\n\\\\t^ aMethodReference category endsWith: '-override'! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'avi 3/10/2004 12:37'!\\\\nisYourClassExtension: categoryName\\\\n\\\\t^ categoryName notNil and: [self category: categoryName asLowercase matches: self methodCategoryPrefix]! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'dvf 10/18/2002 23:22'!\\\\noutsideClasses\\\\n\\\\t^ProtoObject withAllSubclasses difference: self classesAndMetaClasses! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'ab 11/13/2002 01:25'!\\\\nreferenceForMethod: aSymbol ofClass: aClass\\\\n\\\\t^ MethodReference new setStandardClass: aClass methodSymbol: aSymbol! !\\\\n\\\\n\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPackageInfo class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PackageInfo class methodsFor: 'class initialization' stamp: 'avi 2/18/2004 00:46'!\\\\ninitialize\\\\n\\\\tself allSubclassesDo: [:ea | ea new register]! !\\\\n\\\\n\\\\n!PackageInfo class methodsFor: 'compatibility' stamp: 'avi 3/9/2004 16:28'!\\\\ndefault\\\\n\\\\t^ self allPackages detect: [:ea | ea class = self] ifNone: [self new register]! !\\\\n\\\\n\\\\n!PackageInfo class methodsFor: 'packages access' stamp: 'nk 3/9/2004 10:49'!\\\\nallPackages\\\\n\\\\t^PackageOrganizer default packages! !\\\\n\\\\n!PackageInfo class methodsFor: 'packages access' stamp: 'avi 11/12/2003 23:00'!\\\\nnamed: aString\\\\n\\\\t^ PackageOrganizer default packageNamed: aString ifAbsent: [(self new packageName: aString) register]! !\\\\n\\\\n!PackageInfo class methodsFor: 'packages access' stamp: 'avi 11/11/2003 17:19'!\\\\nregisterPackageName: aString\\\\n\\\\t^ PackageOrganizer default registerPackageNamed: aString! !\\\\nObject subclass: #PackageOrganizer\\\\n\\\\tinstanceVariableNames: 'packages'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'PackageInfo-Base'!\\\\n\\\\n!PackageOrganizer methodsFor: 'accessing' stamp: 'avi 11/12/2003 23:01'!\\\\npackageNames\\\\n\\\\t^ packages keys! !\\\\n\\\\n!PackageOrganizer methodsFor: 'accessing' stamp: 'avi 11/12/2003 23:01'!\\\\npackages\\\\n\\\\t^ packages values! !\\\\n\\\\n\\\\n!PackageOrganizer methodsFor: 'initializing' stamp: 'stephaneducasse 2/4/2006 20:40'!\\\\ninitialize\\\\n\\\\tpackages := Dictionary new! !\\\\n\\\\n\\\\n!PackageOrganizer methodsFor: 'registering' stamp: 'avi 11/12/2003 23:01'!\\\\nregisterPackage: aPackageInfo\\\\n\\\\tpackages at: aPackageInfo packageName put: aPackageInfo.\\\\n\\\\tself changed: #packages; changed: #packageNames.\\\\n! !\\\\n\\\\n!PackageOrganizer methodsFor: 'registering' stamp: 'avi 11/12/2003 21:08'!\\\\nregisterPackageNamed: aString\\\\n\\\\t^ self registerPackage: (PackageInfo named: aString)! !\\\\n\\\\n!PackageOrganizer methodsFor: 'registering' stamp: 'avi 11/12/2003 23:08'!\\\\nunregisterPackage: aPackageInfo\\\\n\\\\tpackages removeKey: aPackageInfo packageName ifAbsent: [].\\\\t\\\\n\\\\tself changed: #packages; changed: #packageNames.\\\\n! !\\\\n\\\\n!PackageOrganizer methodsFor: 'registering' stamp: 'avi 11/12/2003 21:10'!\\\\nunregisterPackageNamed: aString\\\\n\\\\tself unregisterPackage: (self packageNamed: aString ifAbsent: [^ self])! !\\\\n\\\\n\\\\n!PackageOrganizer methodsFor: 'searching' stamp: 'avi 10/11/2003 14:21'!\\\\nnoPackageFound\\\\n\\\\tself error: 'No package found'! !\\\\n\\\\n!PackageOrganizer methodsFor: 'searching' stamp: 'avi 11/12/2003 23:08'!\\\\npackageNamed: aString ifAbsent: errorBlock\\\\n\\\\t^ packages at: aString ifAbsent: errorBlock! !\\\\n\\\\n!PackageOrganizer methodsFor: 'searching' stamp: 'avi 10/11/2003 14:21'!\\\\npackageOfClass: aClass\\\\n\\\\t^ self packageOfClass: aClass ifNone: [self noPackageFound]! !\\\\n\\\\n!PackageOrganizer methodsFor: 'searching' stamp: 'avi 10/11/2003 14:22'!\\\\npackageOfClass: aClass ifNone: errorBlock\\\\n\\\\t^ self packages detect: [:ea | ea includesClass: aClass] ifNone: errorBlock! !\\\\n\\\\n!PackageOrganizer methodsFor: 'searching' stamp: 'avi 10/11/2003 14:21'!\\\\npackageOfMethod: aMethodReference\\\\n\\\\t^ self packageOfMethod: aMethodReference ifNone: [self noPackageFound]! !\\\\n\\\\n!PackageOrganizer methodsFor: 'searching' stamp: 'avi 10/11/2003 14:22'!\\\\npackageOfMethod: aMethodReference ifNone: errorBlock\\\\n\\\\t^ self packages detect: [:ea | ea includesMethodReference: aMethodReference] ifNone: errorBlock! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPackageOrganizer class\\\\n\\\\tinstanceVariableNames: 'default'!\\\\n\\\\n!PackageOrganizer class methodsFor: 'as yet unclassified' stamp: 'stephaneducasse 2/4/2006 20:40'!\\\\ndefault\\\\n\\\\t^ default ifNil: [default := self new]! !\\\\n\\\\n!PackageOrganizer class methodsFor: 'as yet unclassified' stamp: 'avi 10/13/2003 15:25'!\\\\nnew\\\\n\\\\t^ self basicNew initialize! !\\\\nBrowser subclass: #PackagePaneBrowser\\\\n\\\\tinstanceVariableNames: 'package packageListIndex packageList'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Tools-Browser'!\\\\n!PackagePaneBrowser commentStamp: '<historical>' prior: 0!\\\\nA package browser represents a hierarchical query path through an organization of class and method information.   It parses class categories into a two-level hierarchy on the first '-' character, giving \\\\\\\"packages\\\\\\\" (e.g.,  Magnitude, Collections, Graphics, etc.), and \\\\\\\"categories\\\\\\\" (e.g., Magnitude-General and Magnitude-Number).\\\\n\\\\nInstance Variables:\\\\n\\\\tpackage  <Symbol> the \\\\\\\"category header,\\\\\\\" e.g., #Magnitudes or #Collections\\\\n\\\\tpackageListIndex <Integer> The index in the package list\\\\n\\\\tpackageList  <OrderedCollection of String> the list of package names\\\\n!\\\\n\\\\n\\\\n!PackagePaneBrowser methodsFor: 'class list' stamp: 'JF 7/30/2003 12:26'!\\\\nclassList\\\\n\\\\t\\\\\\\"Answer an array of the class names of the selected category. Answer an \\\\n\\\\tempty array if no selection exists.\\\\\\\"\\\\n\\\\n\\\\t^ self hasSystemCategorySelected \\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self packageClasses]\\\\n\\\\t\\\\tifTrue: [systemOrganizer listAtCategoryNumber:\\\\n\\\\t\\\\t\\\\t(systemOrganizer categories indexOf: self selectedSystemCategoryName asSymbol)]! !\\\\n\\\\n!PackagePaneBrowser methodsFor: 'class list' stamp: 'JF 7/30/2003 12:36'!\\\\npackageClasses\\\\n\\\\t^ self categoryExistsForPackage\\\\n\\\\t\\\\tifFalse: [Array new]\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[systemOrganizer listAtCategoryNumber:\\\\n\\\\t\\\\t\\\\t\\\\t(systemOrganizer categories indexOf: self package asSymbol)]! !\\\\n\\\\n!PackagePaneBrowser methodsFor: 'class list' stamp: 'md 3/3/2006 11:04'!\\\\nselectedClass\\\\n\\\\t\\\\\\\"Answer the class that is currently selected. Answer nil if no selection \\\\n\\\\texists.\\\\\\\"\\\\n\\\\n\\\\t| name envt |\\\\n\\\\t(name := self selectedClassName) ifNil: [^ nil].\\\\n\\\\t\\\\\\\"(envt := self selectedEnvironment) ifNil: [^ nil].\\\\\\\"\\\\n\\\\tenvt:= Smalltalk.\\\\n\\\\t^ envt at: name! !\\\\n\\\\n\\\\n!PackagePaneBrowser methodsFor: 'dragNDrop' stamp: 'sd 11/20/2005 21:27'!\\\\nchangeCategoryForClass: class srcSystemCategory: srcSystemCategorySel atListMorph: dstListMorph internal: internal copy: copyFlag \\\\n\\\\t\\\\\\\"only move semantic\\\\\\\"\\\\n\\\\t| newClassCategory success |\\\\n\\\\tself flag: #stringSymbolProblem.\\\\n\\\\tsuccess := copyFlag not ifFalse: [^ false].\\\\n\\\\tnewClassCategory := self dstCategoryDstListMorph: dstListMorph internal: internal.\\\\n\\\\t(success := newClassCategory notNil & (newClassCategory ~= class category))\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[class category: newClassCategory.\\\\n\\\\t\\\\t\\\\tself changed: #classList.\\\\n\\\\t\\\\t\\\\tinternal ifFalse: [self selectClass: class]].\\\\n\\\\t^ success! !\\\\n\\\\n\\\\n!PackagePaneBrowser methodsFor: 'dragNDrop util' stamp: 'sd 11/20/2005 21:27'!\\\\ndstCategoryDstListMorph: dstListMorph internal: internal \\\\n\\\\t| dropItem |\\\\n\\\\t^ internal & (dstListMorph getListSelector == #systemCategoryList)\\\\n\\\\t\\\\tifTrue: [(dropItem := dstListMorph potentialDropItem) ifNotNil: [(self package , '-' , dropItem) asSymbol]]\\\\n\\\\t\\\\tifFalse: [self selectedSystemCategoryName]! !\\\\n\\\\n\\\\n!PackagePaneBrowser methodsFor: 'initialize-release' stamp: 'sw 1/13/2000 16:45'!\\\\ndefaultBrowserTitle\\\\n\\\\t^ 'Package Browser'! !\\\\n\\\\n!PackagePaneBrowser methodsFor: 'initialize-release' stamp: 'sd 11/20/2005 21:27'!\\\\nopenAsMorphEditing: editString \\\\n\\\\t\\\\\\\"Create a pluggable version of all the views for a Browser, including \\\\n\\\\tviews and controllers.\\\\\\\"\\\\n\\\\t\\\\\\\"PackagePaneBrowser openBrowser\\\\\\\"\\\\n\\\\n\\\\t| listHeight window |\\\\n\\\\tlistHeight := 0.4.\\\\n\\\\t(window := SystemWindow labelled: 'later') model: self.\\\\n\\\\twindow\\\\n\\\\t\\\\taddMorph: (PluggableListMorph\\\\n\\\\t\\\\t\\\\t\\\\ton: self\\\\n\\\\t\\\\t\\\\t\\\\tlist: #packageList\\\\n\\\\t\\\\t\\\\t\\\\tselected: #packageListIndex\\\\n\\\\t\\\\t\\\\t\\\\tchangeSelected: #packageListIndex:\\\\n\\\\t\\\\t\\\\t\\\\tmenu: #packageMenu:\\\\n\\\\t\\\\t\\\\t\\\\tkeystroke: #packageListKey:from:)\\\\n\\\\t\\\\tframe: (0 @ 0 extent: 0.15 @ listHeight).\\\\n\\\\twindow\\\\n\\\\t\\\\taddMorph: self buildMorphicSystemCatList\\\\n\\\\t\\\\tframe: (0.15 @ 0 extent: 0.2 @ listHeight).\\\\n\\\\tself\\\\n\\\\t\\\\taddClassAndSwitchesTo: window\\\\n\\\\t\\\\tat: (0.35 @ 0 extent: 0.25 @ listHeight)\\\\n\\\\t\\\\tplus: 0.\\\\n\\\\twindow\\\\n\\\\t\\\\taddMorph: self buildMorphicMessageCatList\\\\n\\\\t\\\\tframe: (0.6 @ 0 extent: 0.15 @ listHeight).\\\\n\\\\twindow\\\\n\\\\t\\\\taddMorph: self buildMorphicMessageList\\\\n\\\\t\\\\tframe: (0.75 @ 0 extent: 0.25 @ listHeight).\\\\n\\\\tself\\\\n\\\\t\\\\taddLowerPanesTo: window\\\\n\\\\t\\\\tat: (0 @ listHeight corner: 1 @ 1)\\\\n\\\\t\\\\twith: editString.\\\\n\\\\twindow setUpdatablePanesFrom: #(#packageList #systemCategoryList #classList #messageCategoryList #messageList ).\\\\n\\\\t^ window! !\\\\n\\\\n!PackagePaneBrowser methodsFor: 'initialize-release' stamp: 'stp 10/06/1998 22:02'!\\\\nsystemOrganizer: aSystemOrganizer \\\\n\\\\t\\\\\\\"Initialize the receiver as a perspective on the system organizer, \\\\n\\\\taSystemOrganizer. Typically there is only one--the system variable \\\\n\\\\tSystemOrganization.\\\\\\\"\\\\n\\\\n\\\\tsuper systemOrganizer: aSystemOrganizer .\\\\n\\\\tpackageListIndex := 0! !\\\\n\\\\n\\\\n!PackagePaneBrowser methodsFor: 'package list' stamp: 'JF 7/30/2003 12:35'!\\\\ncategoryExistsForPackage\\\\n\\\\t^ self hasPackageSelected\\\\n\\\\t\\\\tand: [(systemOrganizer categories indexOf: self package asSymbol) ~= 0]\\\\n! !\\\\n\\\\n!PackagePaneBrowser methodsFor: 'package list' stamp: 'JF 7/30/2003 12:24'!\\\\nhasPackageSelected\\\\n\\\\n\\\\t^ packageListIndex ~= 0! !\\\\n\\\\n!PackagePaneBrowser methodsFor: 'package list' stamp: 'sd 11/20/2005 21:27'!\\\\nopenEditString: aString\\\\n\\\\t\\\\\\\"Create a pluggable version of all the views for a Browser, including views and controllers.\\\\\\\"\\\\n\\\\t\\\\\\\"PackageBrowser openBrowser\\\\\\\"\\\\n\\\\n\\\\t| packageListView systemCategoryListView classListView messageCategoryListView\\\\n\\\\t  messageListView browserCodeView topView switchView annotationPane underPane y optionalButtonsView |\\\\n\\\\n\\\\tself couldOpenInMorphic ifTrue: [^ self openAsMorphEditing: aString].\\\\n\\\\n\\\\ttopView := StandardSystemView new model: self.\\\\n\\\\ttopView borderWidth: 1.  \\\\\\\"label and minSize taken care of by caller\\\\\\\"\\\\n\\\\n\\\\tpackageListView := PluggableListView on: self\\\\n\\\\t\\\\tlist: #packageList\\\\n\\\\t\\\\tselected: #packageListIndex\\\\n\\\\t\\\\tchangeSelected: #packageListIndex:\\\\n\\\\t\\\\tmenu: #packageMenu:.\\\\n\\\\tpackageListView window: (0 @ 0 extent: 20 @ 70).\\\\n\\\\ttopView addSubView: packageListView.\\\\n\\\\n\\\\tsystemCategoryListView := PluggableListView on: self\\\\n\\\\t\\\\tlist: #systemCategoryList\\\\n\\\\t\\\\tselected: #systemCategoryListIndex\\\\n\\\\t\\\\tchangeSelected: #systemCategoryListIndex:\\\\n\\\\t\\\\tmenu: #systemCategoryMenu:.\\\\n\\\\tsystemCategoryListView window: (20 @ 0 extent: 30 @ 70).\\\\n\\\\ttopView addSubView: systemCategoryListView.\\\\n\\\\n\\\\tclassListView := PluggableListView on: self\\\\n\\\\t\\\\tlist: #classList\\\\n\\\\t\\\\tselected: #classListIndex\\\\n\\\\t\\\\tchangeSelected: #classListIndex:\\\\n\\\\t\\\\tmenu: #classListMenu:shifted:.\\\\n\\\\tclassListView window: (0 @ 0 extent: 50 @ 62).\\\\n\\\\ttopView addSubView: classListView toRightOf: systemCategoryListView.\\\\n\\\\n\\\\tswitchView := self buildInstanceClassSwitchView.\\\\n\\\\tswitchView borderWidth: 1.\\\\n\\\\ttopView addSubView: switchView below: classListView.\\\\n\\\\n\\\\tmessageCategoryListView := PluggableListView on: self\\\\n\\\\t\\\\tlist: #messageCategoryList\\\\n\\\\t\\\\tselected: #messageCategoryListIndex\\\\n\\\\t\\\\tchangeSelected: #messageCategoryListIndex:\\\\n\\\\t\\\\tmenu: #messageCategoryMenu:.\\\\n\\\\tmessageCategoryListView window: (0 @ 0 extent: 50 @ 70).\\\\n\\\\ttopView addSubView: messageCategoryListView toRightOf: classListView.\\\\n\\\\n\\\\tmessageListView := PluggableListView on: self\\\\n\\\\t\\\\tlist: #messageList\\\\n\\\\t\\\\tselected: #messageListIndex\\\\n\\\\t\\\\tchangeSelected: #messageListIndex:\\\\n\\\\t\\\\tmenu: #messageListMenu:shifted:\\\\n\\\\t\\\\tkeystroke: #messageListKey:from:.\\\\n\\\\tmessageListView window: (0 @ 0 extent: 50 @ 70).\\\\n\\\\ttopView addSubView: messageListView toRightOf: messageCategoryListView.\\\\n\\\\n\\\\tself wantsAnnotationPane\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[annotationPane := PluggableTextView on: self\\\\n\\\\t\\\\t\\\\t\\\\ttext: #annotation accept: nil\\\\n\\\\t\\\\t\\\\t\\\\treadSelection: nil menu: nil.\\\\n\\\\t\\\\t\\\\tannotationPane window: (0@0 extent: 200@self optionalAnnotationHeight).\\\\n\\\\t\\\\t\\\\ttopView addSubView: annotationPane below: packageListView.\\\\n\\\\t\\\\t\\\\tunderPane := annotationPane.\\\\n\\\\t\\\\t\\\\ty := 110 - self optionalAnnotationHeight]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[underPane := packageListView.\\\\n\\\\t\\\\t\\\\ty := 110].\\\\n\\\\n\\\\tself wantsOptionalButtons ifTrue:\\\\n\\\\t\\\\t[optionalButtonsView := self buildOptionalButtonsView.\\\\n\\\\t\\\\toptionalButtonsView borderWidth: 1.\\\\n\\\\t\\\\ttopView addSubView: optionalButtonsView below: underPane.\\\\n\\\\t\\\\tunderPane := optionalButtonsView.\\\\n\\\\t\\\\ty := y - self optionalButtonHeight].\\\\n\\\\n\\\\tbrowserCodeView := MvcTextEditor default on: self \\\\n\\\\t\\\\t\\\\ttext: #contents accept: #contents:notifying:\\\\n\\\\t\\\\t\\\\treadSelection: #contentsSelection menu: #codePaneMenu:shifted:.\\\\n\\\\tbrowserCodeView window: (0@0 extent: 200@y).\\\\n\\\\ttopView addSubView: browserCodeView below: underPane.\\\\n\\\\taString ifNotNil: [browserCodeView editString: aString.\\\\n\\\\t\\\\t\\\\tbrowserCodeView hasUnacceptedEdits: true].\\\\n\\\\t^ topView! !\\\\n\\\\n!PackagePaneBrowser methodsFor: 'package list' stamp: 'JF 7/30/2003 12:25'!\\\\npackage\\\\n\\\\t\\\\\\\"Answer the receiver's 'package'.\\\\\\\"\\\\n\\\\n\\\\t^ self hasPackageSelected\\\\n\\\\t\\\\tifFalse: [nil]\\\\n\\\\t\\\\tifTrue: [self packageList at: packageListIndex]\\\\n! !\\\\n\\\\n!PackagePaneBrowser methodsFor: 'package list' stamp: 'stp 10/05/1998 20:36'!\\\\npackageList\\\\n\\\\t\\\\\\\"Answer a list of the packages in the current system organization.\\\\\\\"\\\\n\\\\n\\\\t| str cats stream |\\\\n\\\\tstr := Set new: 100.\\\\n\\\\tstream := WriteStream on: (Array new: 100).\\\\n\\\\tsystemOrganizer categories do:\\\\n\\\\t\\\\t[ :categ | \\\\n\\\\t\\\\tcats := categ asString copyUpTo: $-.\\\\n\\\\t\\\\t(str includes: cats) ifFalse: \\\\n\\\\t\\\\t\\\\t[str add: cats.\\\\n\\\\t\\\\t\\\\tstream nextPut: cats]].\\\\n\\\\t^stream contents! !\\\\n\\\\n!PackagePaneBrowser methodsFor: 'package list' stamp: 'stp 10/05/1998 19:48'!\\\\npackageListIndex\\\\n\\\\t\\\\\\\"Answer the index of the current package selection.\\\\\\\"\\\\n\\\\n\\\\t^packageListIndex! !\\\\n\\\\n!PackagePaneBrowser methodsFor: 'package list' stamp: 'stp 12/01/1998 02:46'!\\\\npackageListIndex: anInteger \\\\n\\\\t\\\\\\\"Set anInteger to be the index of the current package selection.\\\\\\\"\\\\n\\\\n\\\\tpackageListIndex := anInteger.\\\\n\\\\tanInteger = 0\\\\n\\\\t\\\\tifFalse: [package := self packageList at: packageListIndex].\\\\n\\\\tmessageCategoryListIndex := 0.\\\\n\\\\tsystemCategoryListIndex := 0.\\\\n\\\\tmessageListIndex := 0.\\\\n\\\\tclassListIndex := 0.\\\\n\\\\tself setClassOrganizer.\\\\n\\\\tself changed: #packageSelectionChanged.\\\\n\\\\tself changed: #packageListIndex.\\\\t\\\\\\\"update my selection\\\\\\\"\\\\n\\\\tself changed: #systemCategoryList.\\\\t\\\\\\\"update the category list\\\\\\\"\\\\n\\\\tself systemCategoryListIndex: 0.\\\\t\\\\\\\"update category list selection\\\\\\\"\\\\n! !\\\\n\\\\n!PackagePaneBrowser methodsFor: 'package list' stamp: 'stp 10/06/1998 19:59'!\\\\npackageMenu: aMenu\\\\n\\\\t\\\\\\\"Answer a Menu of operations on class packages to be \\\\n\\\\tdisplayed when the operate menu button is pressed.\\\\\\\"\\\\n\\\\n\\\\t^aMenu\\\\n\\\\t\\\\t\\\\tlabels: 'find class...\\\\\\\\recent classes...\\\\\\\\reorganize\\\\\\\\update' withCRs\\\\n\\\\t\\\\t\\\\tlines: #(2)\\\\n\\\\t\\\\t\\\\tselections: #(#findClass #recent #editSystemCategories #updatePackages)! !\\\\n\\\\n!PackagePaneBrowser methodsFor: 'package list' stamp: 'nk 2/14/2004 15:09'!\\\\nupdatePackages\\\\n\\\\t\\\\\\\"Update the contents of the package list.\\\\\\\"\\\\n\\\\n\\\\tself editSelection: #none.\\\\n\\\\tself changed: #packageList.\\\\n\\\\tself changed: #package.\\\\n\\\\tself packageListIndex: 0 ! !\\\\n\\\\n\\\\n!PackagePaneBrowser methodsFor: 'system category list' stamp: 'JF 7/30/2003 12:23'!\\\\nhasSystemCategorySelected\\\\n\\\\t^ systemCategoryListIndex ~= 0! !\\\\n\\\\n!PackagePaneBrowser methodsFor: 'system category list' stamp: 'stp 01/13/2000 12:59'!\\\\nselectCategoryForClass: theClass\\\\n\\\\t\\\\\\\"Set the package and category lists to display the given class.\\\\\\\"\\\\n\\\\n\\\\t| cat |\\\\n\\\\tcat := theClass category.\\\\n\\\\tself packageListIndex: (self packageList indexOf: (cat copyUpTo: $-)).\\\\t\\\\n\\\\tself systemCategoryListIndex: (self systemCategoryList indexOf: \\\\n\\\\t\\\\t\\\\t(cat copyFrom: ((cat indexOf: $- ifAbsent: [0]) + 1) to: cat size)).! !\\\\n\\\\n!PackagePaneBrowser methodsFor: 'system category list' stamp: 'di 12/20/1999 20:16'!\\\\nselectedSystemCategoryName\\\\n\\\\t\\\\\\\"Answer the name of the selected system category or nil.\\\\\\\"\\\\n\\\\n\\\\tsystemCategoryListIndex = 0\\\\n\\\\t\\\\tifTrue: [^nil].\\\\n\\\\tpackageListIndex = 0\\\\n\\\\t\\\\tifTrue: [^ self systemCategoryList at: systemCategoryListIndex].\\\\n\\\\t^ self package , '-' , (self systemCategoryList at: systemCategoryListIndex)! !\\\\n\\\\n!PackagePaneBrowser methodsFor: 'system category list' stamp: 'di 12/16/1999 16:14'!\\\\nsystemCategoryList\\\\n\\\\t\\\\\\\"Answer the sequenceable collection containing the class categories that \\\\n\\\\tthe receiver accesses.\\\\\\\"\\\\n\\\\n\\\\t| prefix |\\\\n\\\\tpackageListIndex = 0 ifTrue: [^ systemOrganizer categories].\\\\n\\\\tprefix := self package, '-'.\\\\n\\\\t^ Array streamContents:\\\\n\\\\t\\\\t[:strm |\\\\n\\\\t\\\\tsystemOrganizer categories do: \\\\n\\\\t\\\\t\\\\t[ :cat | (cat beginsWith: prefix) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[strm nextPut: (cat copyFrom: prefix size + 1 to: cat size)]]]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPackagePaneBrowser class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PackagePaneBrowser class methodsFor: 'class initialization' stamp: 'hpt 8/5/2004 20:12'!\\\\nregisterInAppRegistry\\\\n\\\\t\\\\\\\"Register the receiver in the SystemBrowser AppRegistry\\\\\\\"\\\\n\\\\tSystemBrowser register: self.! !\\\\n\\\\n\\\\n!PackagePaneBrowser class methodsFor: 'instance creation' stamp: 'sd 11/20/2005 21:28'!\\\\nprototypicalToolWindow\\\\n\\\\t\\\\\\\"Answer an example of myself seen in a tool window, for the benefit of parts-launching tools\\\\\\\"\\\\n\\\\n\\\\t| aWindow |\\\\n\\\\taWindow := self new openAsMorphEditing: nil.\\\\n\\\\taWindow setLabel: 'Package Browser'.\\\\n\\\\taWindow applyModelExtent.\\\\n\\\\t^ aWindow\\\\n! !\\\\n\\\\n\\\\n!PackagePaneBrowser class methodsFor: 'window color' stamp: 'sw 2/26/2002 14:39'!\\\\nwindowColorSpecification\\\\n\\\\t\\\\\\\"Answer a WindowColorSpec object that declares my preference\\\\\\\"\\\\n\\\\n\\\\t^ WindowColorSpec classSymbol: self name wording: 'Package Browser' brightColor: #(1.0 1.0 0.6)\\\\t pastelColor: #(0.976 0.976 0.835) helpMessage: 'A system browser with an extra pane at top-left for module.'! !\\\\n\\\\n\\\\n!PackagePaneBrowser class methodsFor: '*MorphicExtras-class initialization' stamp: 'hpt 8/5/2004 20:12'!\\\\ninitialize\\\\n\\\\n\\\\tself registerInFlapsRegistry;\\\\n\\\\t\\\\tregisterInAppRegistry.! !\\\\n\\\\n!PackagePaneBrowser class methodsFor: '*MorphicExtras-class initialization' stamp: 'asm 4/10/2003 13:15'!\\\\nregisterInFlapsRegistry\\\\n\\\\t\\\\\\\"Register the receiver in the system's flaps registry\\\\\\\"\\\\n\\\\tself environment\\\\n\\\\t\\\\tat: #Flaps\\\\n\\\\t\\\\tifPresent: [:cl | cl registerQuad: #(PackagePaneBrowser\\\\tprototypicalToolWindow\\\\t\\\\t'Packages'\\\\t\\\\t\\\\t'Package Browser:  like a System Browser, except that if has extra level of categorization in the top-left pane, such that class-categories are further organized into groups called \\\\\\\"packages\\\\\\\"') \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'Tools']! !\\\\n\\\\n!PackagePaneBrowser class methodsFor: '*MorphicExtras-class initialization' stamp: 'hpt 8/5/2004 20:12'!\\\\nunload\\\\n\\\\t\\\\\\\"Unload the receiver from global registries\\\\\\\"\\\\n\\\\n\\\\tself environment at: #Flaps ifPresent: [:cl |\\\\n\\\\tcl unregisterQuadsWithReceiver: self].\\\\n\\\\tSystemBrowser unregister: self.! !\\\\nObject subclass: #PackageServices\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: 'ServiceClasses'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'PackageInfo-Base'!\\\\n\\\\n!PackageServices methodsFor: 'as yet unclassified' stamp: 'avi 10/11/2003 14:06'!\\\\nseeClassSide! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPackageServices class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PackageServices class methodsFor: 'as yet unclassified' stamp: 'avi 10/11/2003 13:01'!\\\\nallServices\\\\n\\\\t^ ServiceClasses gather: [:ea | ea services]! !\\\\n\\\\n!PackageServices class methodsFor: 'as yet unclassified' stamp: 'stephaneducasse 2/4/2006 20:40'!\\\\ninitialize\\\\n\\\\tServiceClasses := Set new! !\\\\n\\\\n!PackageServices class methodsFor: 'as yet unclassified' stamp: 'avi 10/11/2003 12:59'!\\\\nregister: aClass\\\\n\\\\tServiceClasses add: aClass! !\\\\n\\\\n!PackageServices class methodsFor: 'as yet unclassified' stamp: 'avi 10/11/2003 12:59'!\\\\nunregister: aClass\\\\n\\\\tServiceClasses remove: aClass! !\\\\nImageMorph subclass: #PaintBoxColorPicker\\\\n\\\\tinstanceVariableNames: 'currentColor locOfCurrent'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-Support'!\\\\n!PaintBoxColorPicker commentStamp: 'JMM 9/13/2004 07:37' prior: 0!\\\\nA pop-up, 32-bit color palette used as part of a PaintBoxMorph.\\\\n!\\\\n\\\\n\\\\n!PaintBoxColorPicker methodsFor: 'accessing' stamp: 'jm 4/29/1998 20:07'!\\\\ncurrentColor\\\\n\\\\n\\\\t^ currentColor\\\\n! !\\\\n\\\\n!PaintBoxColorPicker methodsFor: 'accessing' stamp: 'jm 4/29/1998 20:18'!\\\\ncurrentColor: aColor\\\\n\\\\t\\\\\\\"Force me to select the given color.\\\\\\\"\\\\n\\\\n\\\\tcurrentColor _ aColor.\\\\n\\\\tlocOfCurrent _ nil.  \\\\\\\"remove the marker\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!PaintBoxColorPicker methodsFor: 'drawing' stamp: 'jm 4/29/1998 20:00'!\\\\ndrawOn: aCanvas\\\\n\\\\t\\\\\\\"Image plus circles for currently selected color.\\\\\\\"\\\\n\\\\n\\\\t| c |\\\\n\\\\tsuper drawOn: aCanvas.\\\\n\\\\tlocOfCurrent ifNotNil: [\\\\n\\\\t\\\\tc _ self ringColor.\\\\n\\\\t\\\\taCanvas\\\\n\\\\t\\\\t\\\\tfillOval: (Rectangle center: locOfCurrent + self topLeft extent: 9@9)\\\\n\\\\t\\\\t\\\\tcolor: Color transparent\\\\n\\\\t\\\\t\\\\tborderWidth: 1\\\\n\\\\t\\\\t\\\\tborderColor: c].\\\\n! !\\\\n\\\\n!PaintBoxColorPicker methodsFor: 'drawing' stamp: 'jm 4/29/1998 20:00'!\\\\nringColor\\\\n\\\\t\\\\\\\"Choose a color that contrasts with my current color. If that color isn't redish, return red. Otherwise, return green\\\\\\\"\\\\n\\\\n\\\\tcurrentColor isTransparent ifTrue: [^ Color red].\\\\n\\\\tcurrentColor red < 0.5 ifTrue: [^ Color red].\\\\n\\\\tcurrentColor red > (currentColor green + (currentColor blue * 0.5))\\\\n\\\\t\\\\tifTrue: [^ Color green]\\\\n\\\\t\\\\tifFalse: [^ Color red].\\\\n! !\\\\n\\\\n\\\\n!PaintBoxColorPicker methodsFor: 'event handling' stamp: 'ar 10/5/2000 16:01'!\\\\nendColorSelection: evt\\\\n\\\\t\\\\\\\"Update current color and report it to paint box.\\\\\\\"\\\\n\\\\n\\\\tself selectColor: evt.\\\\n\\\\t\\\\\\\"restore mouseLeave handling\\\\\\\"\\\\n\\\\tself on: #mouseLeave send: #delete to: self.\\\\n! !\\\\n\\\\n!PaintBoxColorPicker methodsFor: 'event handling' stamp: 'ar 10/25/2000 17:49'!\\\\ninitMouseHandlers\\\\n\\\\n\\\\tself on: #mouseDown send: #startColorSelection: to: self.\\\\n\\\\tself on: #mouseMove send: #selectColor: to: self.\\\\n\\\\tself on: #mouseUp send: #endColorSelection: to: self.\\\\n\\\\tself on: #mouseLeave send: #delete to: self.\\\\n! !\\\\n\\\\n!PaintBoxColorPicker methodsFor: 'event handling' stamp: 'JMM 9/13/2004 09:08'!\\\\nselectColor: evt \\\\n\\\\t\\\\\\\"Update the receiver from the given event. Constrain locOfCurrent's center to lie within the color selection area. If it is partially in the transparent area, snap it entirely into it vertically.\\\\\\\"\\\\n\\\\n\\\\t| r |\\\\n\\\\n\\\\tlocOfCurrent := evt cursorPoint - self topLeft.\\\\n\\\\tr := Rectangle center: locOfCurrent extent: 9 @ 9.\\\\n\\\\tlocOfCurrent := locOfCurrent \\\\n\\\\t\\\\t\\\\t\\\\t+ (r amountToTranslateWithin: (8 @ 11 corner: (self image width-6) @ (self image height-6))).\\\\n\\\\tlocOfCurrent x > (self image width-(12+7))  ifTrue: [locOfCurrent := (self image width - 12) @ locOfCurrent y].\\\\t\\\\\\\"snap into grayscale\\\\\\\"\\\\n\\\\tcurrentColor := locOfCurrent y < 19\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:  \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[locOfCurrent := locOfCurrent x @ 11.\\\\t\\\\\\\"snap into transparent\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tColor transparent]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [image colorAt: locOfCurrent].\\\\n\\\\t(owner isKindOf: PaintBoxMorph) \\\\n\\\\t\\\\tifTrue: [owner takeColorEvt: evt from: self].\\\\n\\\\tself changed! !\\\\n\\\\n!PaintBoxColorPicker methodsFor: 'event handling' stamp: 'jm 4/29/1998 21:21'!\\\\nstartColorSelection: evt\\\\n\\\\t\\\\\\\"Start color selection. Make me stay up as long as the mouse is down.\\\\\\\"\\\\n\\\\n\\\\tself on: #mouseLeave send: nil to: nil.\\\\n\\\\tself selectColor: evt.\\\\n! !\\\\n\\\\n\\\\n!PaintBoxColorPicker methodsFor: 'initialization' stamp: 'RAA 8/15/2000 14:57'!\\\\nbeStatic\\\\n\\\\n\\\\t\\\\\\\"an aid for Nebraska: make the color chart a static image to reduce traffic\\\\\\\"\\\\n\\\\timage isStatic ifFalse: [\\\\n\\\\t\\\\timage _ image as: StaticForm\\\\n\\\\t].! !\\\\n\\\\n!PaintBoxColorPicker methodsFor: 'initialization' stamp: 'jm 4/29/1998 21:24'!\\\\ninitialize\\\\n\\\\n\\\\tsuper initialize.\\\\n\\\\tcurrentColor _ Color black.\\\\n\\\\tlocOfCurrent _ nil.\\\\n\\\\tself initMouseHandlers.\\\\n! !\\\\nImageMorph subclass: #PaintBoxMorph\\\\n\\\\tinstanceVariableNames: 'action tool currentCursor thumbnail currentColor currentBrush colorMemory colorPatch stampHolder rotationTabForm scaleTabForm colorMemoryThin brushes focusMorph weakDependents recentColors'\\\\n\\\\tclassVariableNames: 'AllOffImage AllOnImage AllPressedImage ColorChart OriginalBounds Prototype RecentColors'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-Support'!\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'laza 3/24/2000 17:58'!\\\\naction\\\\n\\\\t^ action\\\\t! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'RAA 8/16/2000 13:35'!\\\\nactionCursor\\\\n\\\\t\\\\\\\"Return the cursor to use with this painting action/tool. Offset of the form must be set.\\\\\\\"\\\\n\\\\n\\\\t^self\\\\n\\\\t\\\\tcursorFor: action\\\\n\\\\t\\\\toldCursor: currentCursor\\\\n\\\\t\\\\tcurrentNib: self getNib\\\\n\\\\t\\\\tcolor: currentColor\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'dgd 2/22/2003 19:03'!\\\\nbrush: brushButton action: aSelector nib: aMask evt: evt \\\\n\\\\t\\\\\\\"Set the current tool and action for the paintBox.  \\\\\\\"\\\\n\\\\n\\\\tcurrentBrush \\\\n\\\\t\\\\tifNotNil: [currentBrush == brushButton ifFalse: [currentBrush state: #off]].\\\\n\\\\tcurrentBrush := brushButton.\\\\t\\\\\\\"A ThreePhaseButtonMorph\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"currentBrush state: #on.\\\\talready done\\\\\\\"\\\\n\\\\t\\\\\\\"aSelector is like brush3:.  Don't save it.  Can always say (currentBrush arguments at: 2)\\\\n\\\\taMask is the brush shape.  Don't save it.  Can always say (currentBrush arguments at: 3)\\\\\\\"\\\\n\\\\tself notifyWeakDependentsWith: { \\\\n\\\\t\\\\t\\\\t\\\\t#currentNib.\\\\n\\\\t\\\\t\\\\t\\\\tevt.\\\\n\\\\t\\\\t\\\\t\\\\tcurrentBrush arguments third}.\\\\n\\\\tself brushable ifFalse: [self setAction: #paint: evt: evt]\\\\t\\\\\\\"User now thinking of painting\\\\\\\"! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'tk 10/19/97 11:12'!\\\\nbrushable\\\\n\\\\t\\\\\\\"Return true if the current tool uses a brush.\\\\\\\"\\\\n\\\\t^ (#(\\\\\\\"non-brushable\\\\\\\" eyedropper: fill: pickup: stamp:) indexOf: action) = 0! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'RAA 8/16/2000 01:34'!\\\\nclear: clearButton with: clearSelector evt: evt\\\\n\\\\n\\\\t| ss |\\\\n\\\\t(ss _ self focusMorph) \\\\n\\\\t\\\\tifNotNil: [ss clearPainting: self]\\\\n\\\\t\\\\tifNil: [self notCurrentlyPainting].\\\\n\\\\tclearButton state: #off.! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'tk 7/15/97 13:35'!\\\\ncolorable\\\\n\\\\t\\\\\\\"Return true if the current tool uses a color.\\\\\\\"\\\\n\\\\t^ (#(\\\\\\\"These use no color\\\\\\\" erase: eyedropper: \\\\\\\"fill: does\\\\\\\" pickup: stamp:) indexOf: action) = 0! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'RAA 8/17/2000 17:06'!\\\\ncurrentColor: aColor evt: evt\\\\n\\\\t\\\\\\\"Accept a color from the outside.  (my colorMemoryMorph must call takeColorEvt: evt from: colorPicker instead)\\\\\\\"\\\\n\\\\n\\\\tcurrentColor _ aColor.\\\\n\\\\tcolorMemory currentColor: aColor.\\\\n\\\\tself notifyWeakDependentsWith: {#currentColor. evt. currentColor}.\\\\n\\\\tself showColor.\\\\n\\\\tself colorable ifFalse: [self setAction: #paint: evt: evt].\\\\t\\\\\\\"User now thinking of painting\\\\\\\"! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'RAA 8/16/2000 13:37'!\\\\ncursorFor: anAction oldCursor: oldCursor currentNib: aNibForm color: aColor \\\\n\\\\t\\\\\\\"Return the cursor to use with this painting action/tool. Offset of the \\\\n\\\\tform must be set.\\\\\\\"\\\\n\\\\n\\\\t| ff width co larger c box |\\\\n\\\\n\\\\tanAction == #paint:\\\\n\\\\t\\\\tifTrue: [\\\\\\\"Make a cursor from the brush and the color\\\\\\\"\\\\n\\\\t\\\\t\\\\twidth _ aNibForm width.\\\\n\\\\t\\\\t\\\\tc _ self ringColorFor: aColor.\\\\n\\\\t\\\\t\\\\tco _ oldCursor offset - (width // 4 @ 34 - (width // 6)) min: 0 @ 0.\\\\n\\\\t\\\\t\\\\tlarger _ width negated + 10 @ 0 extent: oldCursor extent + (width @ width).\\\\n\\\\t\\\\t\\\\tff _ oldCursor copy: larger.\\\\n\\\\t\\\\t\\\\tff colors at: 1 put: Color transparent.\\\\n\\\\t\\\\t\\\\tff colors at: 2 put: Color transparent.\\\\n\\\\t\\\\t\\\\tff offset: co - (width @ width // 2).\\\\n\\\\t\\\\t\\\\tff getCanvas\\\\n\\\\t\\\\t\\\\t\\\\tfillOval: (Rectangle center: ff offset negated extent: width @ width)\\\\n\\\\t\\\\t\\\\t\\\\tcolor: Color transparent\\\\n\\\\t\\\\t\\\\t\\\\tborderWidth: 1\\\\n\\\\t\\\\t\\\\t\\\\tborderColor: c.\\\\n\\\\t\\\\t\\\\t^ ff].\\\\n\\\\tanAction == #erase:\\\\n\\\\t\\\\tifTrue: [\\\\\\\"Make a cursor from the cursor and the color\\\\\\\"\\\\n\\\\t\\\\t\\\\twidth _ aNibForm width.\\\\n\\\\t\\\\t\\\\tco _ oldCursor offset + (width // 2 @ 4) min: 0 @ 0.\\\\n\\\\t\\\\t\\\\tlarger _ 0 @ 0 extent: oldCursor extent + (width @ width).\\\\n\\\\t\\\\t\\\\tff _ oldCursor copy: larger.\\\\n\\\\t\\\\t\\\\tff offset: co - (width @ width // 2).\\\\n\\\\t\\\\t\\\\tff\\\\n\\\\t\\\\t\\\\t\\\\tfill: (box _ co negated extent: width @ width)\\\\n\\\\t\\\\t\\\\t\\\\tfillColor: (Color r: 0.5 g: 0.5 b: 1.0).\\\\n\\\\t\\\\t\\\\tff\\\\n\\\\t\\\\t\\\\t\\\\tfill: (box insetBy: 1 @ 1)\\\\n\\\\t\\\\t\\\\t\\\\tfillColor: Color transparent.\\\\n\\\\t\\\\t\\\\t^ ff].\\\\n\\\\t^ oldCursor! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'dgd 2/22/2003 19:03'!\\\\ndeleteCurrentStamp: evt \\\\n\\\\t\\\\\\\"The trash is telling us to delete the currently selected stamp\\\\\\\"\\\\n\\\\n\\\\t(tool arguments second) == #stamp: \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[stampHolder remove: tool.\\\\n\\\\t\\\\t\\\\tself setAction: #paint: evt: evt]\\\\t\\\\\\\"no use stamping with a blank stamp\\\\\\\"! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'JMM 9/13/2004 09:47'!\\\\neyedropper: aButton action: aSelector cursor: aCursor evt: evt \\\\n\\\\t\\\\\\\"Take total control and pick up a color!!!!\\\\\\\"\\\\n\\\\n\\\\t| pt feedbackColor delay |\\\\n\\\\tdelay _ Delay forMilliseconds: 10.\\\\n\\\\taButton state: #on.\\\\n\\\\ttool ifNotNil: [tool state: #off].\\\\n\\\\tcurrentCursor := aCursor.\\\\n\\\\tevt hand showTemporaryCursor: currentCursor\\\\n\\\\t\\\\thotSpotOffset: 6 negated @ 4 negated.\\\\n\\\\t\\\\\\\"<<<< the form was changed a bit??\\\\\\\"\\\\n\\\\tfeedbackColor := Display colorAt: Sensor cursorPoint.\\\\n\\\\tcolorMemory align: colorMemory bounds topRight\\\\n\\\\t\\\\twith: colorMemoryThin bounds topRight.\\\\n\\\\tself addMorphFront: colorMemory.\\\\n\\\\n\\\\t\\\\\\\"Full color picker\\\\\\\"\\\\n\\\\t[Sensor anyButtonPressed] whileFalse: \\\\n\\\\t\\\\t\\\\t[pt := Sensor cursorPoint.\\\\n\\\\t\\\\t\\\\t\\\\\\\"deal with the fact that 32 bit displays may have garbage in the \\\\n\\\\t\\\\t\\\\talpha bits\\\\\\\"\\\\n\\\\t\\\\t\\\\tfeedbackColor := Display depth = 32 \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[Color colorFromPixelValue: ((Display pixelValueAt: pt) bitOr: 4278190080)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdepth: 32]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [Display colorAt: pt].\\\\n\\\\t\\\\t\\\\t\\\\\\\"the hand needs to be drawn\\\\\\\"\\\\n\\\\t\\\\t\\\\tevt hand position: pt.\\\\n\\\\t\\\\t\\\\tcurrentColor ~= feedbackColor ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tcurrentColor _ feedbackColor.\\\\n\\\\t\\\\t\\\\t\\\\tself showColor ].\\\\n\\\\t\\\\t\\\\tself world displayWorldSafely.\\\\n\\\\t\\\\t\\\\tdelay wait].\\\\n\\\\n\\\\t\\\\\\\"Now wait for the button to be released.\\\\\\\"\\\\n\\\\t[Sensor anyButtonPressed] whileTrue:\\\\n\\\\t\\\\t[ pt := Sensor cursorPoint.\\\\n\\\\t\\\\t\\\\\\\"the hand needs to be drawn\\\\\\\"\\\\n\\\\t\\\\tevt hand position: pt.\\\\n\\\\t\\\\tself world displayWorldSafely.\\\\n\\\\t\\\\tdelay wait].\\\\n\\\\n\\\\tevt hand showTemporaryCursor: nil hotSpotOffset: 0 @ 0.\\\\n\\\\tself currentColor: feedbackColor evt: evt.\\\\n\\\\tcolorMemory delete.\\\\n\\\\ttool ifNotNil: \\\\n\\\\t\\\\t\\\\t[tool state: #on.\\\\n\\\\t\\\\t\\\\tcurrentCursor := tool arguments third].\\\\n\\\\taButton state: #off\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'tk 7/1/97 12:52'!\\\\ngetColor\\\\n\\\\t^ currentColor! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'dgd 2/22/2003 19:03'!\\\\ngetNib\\\\n\\\\t^currentBrush arguments third! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'tk 7/1/97 13:02'!\\\\ngetSpecial\\\\n\\\\t^ action\\\\t\\\\t\\\\\\\"a selector like #paint:\\\\\\\"! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'dgd 2/21/2003 23:17'!\\\\ngrabFromScreen: evt \\\\n\\\\t\\\\\\\"Allow the user to grab a picture from the screen OUTSIDE THE PAINTING AREA and install it in a blank stamp.  To get a stamp in the painting area, click on the stamp tool in a blank stamp.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"scroll to blank stamp\\\\\\\"\\\\n\\\\n\\\\t| stampButton form |\\\\n\\\\tstampButton := stampHolder stampButtons first.\\\\n\\\\t[(stampHolder stampFormFor: stampButton) isNil] \\\\n\\\\t\\\\twhileFalse: [stampHolder scroll: 1].\\\\n\\\\tform := Form fromUser.\\\\n\\\\ttool state: #off.\\\\n\\\\ttool := stampHolder otherButtonFor: stampButton.\\\\n\\\\tstampHolder stampForm: form for: tool.\\\\t\\\\\\\"install it\\\\\\\"\\\\n\\\\tstampButton state: #on.\\\\n\\\\tstampButton doButtonAction: evt.\\\\n\\\\tevt hand showTemporaryCursor: (focusMorph getCursorFor: evt)! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'sw 8/29/2000 15:31'!\\\\nindicateColorUnderMouse\\\\n\\\\t\\\\\\\"Track the mouse with the special eyedropper cursor, and accept whatever color is under the mouse as the currently-chosen color; reflect that choice in the feedback box, and return that color.\\\\\\\"\\\\n\\\\n\\\\t| pt feedbackColor |\\\\n\\\\tpt _ Sensor cursorPoint.\\\\n\\\\t\\\\\\\"deal with the fact that 32 bit displays may have garbage in the alpha bits\\\\\\\"\\\\n\\\\tfeedbackColor _ Display depth = 32\\\\n\\\\t\\\\tifTrue: [ Color colorFromPixelValue: ((Display pixelValueAt: pt) bitOr: 16rFF000000) depth: 32] \\\\t\\\\tifFalse: [Display colorAt: pt].\\\\n\\\\n\\\\tself activeHand position: pt.\\\\n\\\\tself world displayWorldSafely.\\\\n\\\\tDisplay fill: colorPatch bounds fillColor: feedbackColor.\\\\n\\\\t^ feedbackColor\\\\t! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'RAA 8/16/2000 01:48'!\\\\nkeep: keepButton with: keepSelector evt: evt\\\\n\\\\t\\\\\\\"Showing of the corrent palette (viewer or noPalette) is done by the block submitted to the SketchMorphEditor, see (EToyHand makeNewDrawing) and (SketchMorph editDrawingInWorld:forBackground:).\\\\\\\"\\\\n\\\\t| ss |\\\\n\\\\towner ifNil: [^ self].\\\\n\\\\tkeepButton ifNotNil: [keepButton state: #off].\\\\n\\\\t(ss _ self focusMorph) \\\\n\\\\t\\\\tifNotNil: [ss savePainting: self evt: evt]\\\\n\\\\t\\\\tifNil:\\\\n\\\\t\\\\t[keepSelector == #silent ifTrue: [^ self].\\\\n\\\\t\\\\tself notCurrentlyPainting].! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'sw 5/3/1998 18:22'!\\\\nnotCurrentlyPainting\\\\n\\\\tself inform: 'You are not currently painting'! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'dgd 2/22/2003 19:04'!\\\\npickup: actionButton action: aSelector cursor: aCursor evt: evt \\\\n\\\\t\\\\\\\"Special version for pickup: and stamp:, because of these tests\\\\\\\"\\\\n\\\\n\\\\t| ss picker old map stamper |\\\\n\\\\tself \\\\n\\\\t\\\\ttool: actionButton\\\\n\\\\t\\\\taction: aSelector\\\\n\\\\t\\\\tcursor: aCursor\\\\n\\\\t\\\\tevt: evt.\\\\n\\\\taSelector == #stamp: \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[(stampHolder pickupButtons includes: actionButton) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[stamper := stampHolder otherButtonFor: actionButton.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^self \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tpickup: stamper\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taction: #stamp:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcursor: (stamper arguments third)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tevt: evt].\\\\n\\\\t\\\\t\\\\t(stampHolder stampFormFor: actionButton) ifNil: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"If not stamp there, go to pickup mode\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpicker := stampHolder otherButtonFor: actionButton.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpicker state: #on.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^self \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tpickup: picker\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taction: #pickup:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcursor: (picker arguments third)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tevt: evt]\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[old := stampHolder stampFormFor: actionButton.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcurrentCursor := ColorForm extent: old extent depth: 8.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\told displayOn: currentCursor.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmap := Color indexedColors copy.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmap at: 1 put: Color transparent.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcurrentCursor colors: map.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcurrentCursor offset: currentCursor extent // -2.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Emphisize the stamp button\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tactionButton owner borderColor: (Color \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tr: 0.65\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tg: 0.599\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tb: 0.8)\\\\t\\\\\\\"layoutMorph\\\\\\\"\\\\t\\\\\\\"color: (Color r: 1.0 g: 0.645 b: 0.419);\\\\\\\"]].\\\\n\\\\taSelector == #pickup: \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[ss := self focusMorph.\\\\n\\\\t\\\\t\\\\tss ifNotNil: [currentCursor := aCursor]\\\\n\\\\t\\\\t\\\\t\\\\tifNil: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self notCurrentlyPainting.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself setAction: #paint: evt: evt]]! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'tk 7/2/97 22:13'!\\\\npickupForm: stampForm\\\\n\\\\t\\\\\\\"Install the new picture in this stamp\\\\\\\"\\\\n\\\\n\\\\t| stampButton |\\\\n\\\\tstampHolder stampForm: stampForm for: tool.\\\\n\\\\tstampButton _ action == #pickup: \\\\n\\\\t\\\\tifTrue: [stampHolder otherButtonFor: tool]\\\\n\\\\t\\\\tifFalse: [tool].\\\\t\\\\\\\"was a nil stampForm\\\\\\\"\\\\n\\\\tstampButton state: #on.\\\\n\\\\tstampButton doButtonAction.! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'RAA 8/17/2000 14:59'!\\\\npickupForm: stampForm evt: evt\\\\n\\\\t\\\\\\\"Install the new picture in this stamp\\\\\\\"\\\\n\\\\n\\\\t| stampButton |\\\\n\\\\tstampHolder stampForm: stampForm for: tool.\\\\n\\\\tstampButton _ action == #pickup: \\\\n\\\\t\\\\tifTrue: [stampHolder otherButtonFor: tool]\\\\n\\\\t\\\\tifFalse: [tool].\\\\t\\\\\\\"was a nil stampForm\\\\\\\"\\\\n\\\\tstampButton state: #on.\\\\n\\\\tstampButton doButtonAction: evt.! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'RAA 8/16/2000 13:40'!\\\\nplainCursor\\\\n\\\\t\\\\\\\"Return the cursor to use with this painting action/tool. Offset of the form must be set.\\\\\\\"\\\\n\\\\n\\\\t^currentCursor\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'ar 10/10/2000 16:38'!\\\\nplainCursor: aCursor event: anEvent\\\\n\\\\t\\\\\\\"Set the cursor to use with this painting action/tool. Offset of the form must be set.\\\\\\\"\\\\n\\\\n\\\\tcurrentCursor _ aCursor.\\\\n\\\\tanEvent hand showTemporaryCursor: aCursor.\\\\n\\\\tself notifyWeakDependentsWith: {#currentCursor. anEvent. currentCursor}.! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'RAA 8/16/2000 13:30'!\\\\nringColor\\\\n\\\\t\\\\\\\"Choose a color that contrasts with my current color. If that color isn't redish, return red. Otherwise, return green\\\\\\\"\\\\n\\\\n\\\\t^self ringColorFor: currentColor\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'RAA 8/16/2000 13:29'!\\\\nringColorFor: aColor\\\\n\\\\t\\\\\\\"Choose a color that contrasts with my current color. If that color isn't redish, return red. Otherwise, return green\\\\\\\"\\\\n\\\\n\\\\taColor isTransparent ifTrue: [^ Color red].\\\\n\\\\taColor red < 0.5 ifTrue: [^ Color red].\\\\n\\\\taColor red > (aColor green + (aColor blue * 0.5))\\\\n\\\\t\\\\tifTrue: [^ Color green]\\\\n\\\\t\\\\tifFalse: [^ Color red].\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'RAA 8/16/2000 01:44'!\\\\nscrollStamps: actionButton action: aSelector evt: evt\\\\n\\\\t\\\\\\\"Move the stamps over\\\\\\\"\\\\n\\\\n\\\\taSelector == #prevStamp:\\\\n\\\\t\\\\tifTrue: [stampHolder scroll: -1]\\\\n\\\\t\\\\tifFalse: [stampHolder scroll: 1].\\\\n\\\\tactionButton state: #off.\\\\n\\\\taction == #stamp: ifTrue: [\\\\\\\"reselect the stamp and compute the cursor\\\\\\\"\\\\n\\\\t\\\\tself stampForm \\\\n\\\\t\\\\t\\\\tifNil: [self setAction: #paint: evt: evt]\\\\n\\\\t\\\\t\\\\tifNotNil: [tool doButtonAction: evt]].\\\\n\\\\t\\\\t! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'tk 8/22/2000 11:57'!\\\\nsetAction: aSelector evt: evt\\\\n\\\\t\\\\\\\"Find this button and turn it on.  Does not work for stamps or pickups\\\\\\\"\\\\n\\\\n\\\\t| button |\\\\n\\\\tbutton _ self submorphNamed: aSelector.\\\\n \\\\n\\\\tbutton ifNotNil: [\\\\n\\\\t\\\\tbutton state: #on.\\\\n\\\\t\\\\tbutton doButtonAction: evt].\\\\t\\\\\\\"select it!!\\\\\\\"! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'dgd 2/22/2003 19:04'!\\\\nshowColor\\\\n\\\\t\\\\\\\"Display the current color in all brushes, both on and off.\\\\\\\"\\\\n\\\\n\\\\t| offIndex onIndex center |\\\\n\\\\tcurrentColor ifNil: [^self].\\\\n\\\\t\\\\\\\"colorPatch color: currentColor.\\\\tMay delete later\\\\\\\"\\\\n\\\\t(brushes isNil or: [brushes first owner ~~ self]) \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[brushes := OrderedCollection new.\\\\n\\\\t\\\\t\\\\t#(#brush1: #brush2: #brush3: #brush4: #brush5: #brush6:) \\\\n\\\\t\\\\t\\\\t\\\\tdo: [:sel | brushes addLast: (self submorphNamed: sel)]].\\\\n\\\\tcenter := (brushes sixth) offImage extent // 2.\\\\n\\\\toffIndex := (brushes sixth) offImage pixelValueAt: center.\\\\n\\\\tonIndex := (brushes sixth) onImage pixelValueAt: center.\\\\n\\\\tbrushes do: \\\\n\\\\t\\\\t\\\\t[:bb | \\\\n\\\\t\\\\t\\\\tbb offImage colors at: offIndex + 1 put: currentColor.\\\\n\\\\t\\\\t\\\\tbb offImage clearColormapCache.\\\\n\\\\t\\\\t\\\\tbb onImage colors at: onIndex + 1 put: currentColor.\\\\n\\\\t\\\\t\\\\tbb onImage clearColormapCache.\\\\n\\\\t\\\\t\\\\tbb invalidRect: bb bounds].\\\\n\\\\tself invalidRect: (brushes first topLeft rect: brushes last bottomRight)! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'ar 12/19/2000 19:16'!\\\\nshowColorPalette: evt\\\\n\\\\n\\\\t| w box |\\\\n\\\\tself comeToFront.\\\\n\\\\tcolorMemory align: colorMemory bounds topRight \\\\n\\\\t\\\\t\\\\twith: colorMemoryThin bounds topRight.\\\\n\\\\t\\\\\\\"make sure color memory fits or else align with left\\\\\\\"\\\\n\\\\tw _ self world.\\\\n\\\\tbox _ self bounds: colorMemory fullBounds in: w.\\\\n\\\\tbox left < 0 ifTrue:[\\\\n\\\\t\\\\tcolorMemory align: colorMemory bounds topLeft\\\\n\\\\t\\\\t\\\\twith: colorMemoryThin bounds topLeft].\\\\n\\\\tself addMorphFront: colorMemory.! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'tk 8/22/2000 11:58'!\\\\nstampCursorBeCursorFor: anAction\\\\n\\\\t\\\\\\\"User just chose a stamp.  Take that stamp picture and make it be the cursor for the tool named.\\\\\\\"\\\\n\\\\t\\\\\\\"self stampCursorBeCursorFor: #star:.\\\\n\\\\tcurrentCursor offset: -9@-3.\\\\t\\\\t\\\\tHas side effect on the saved cursor.\\\\\\\"\\\\n\\\\n\\\\t(self submorphNamed: anAction) arguments at: 3 put: currentCursor.\\\\n\\\\t\\\\t\\\\\\\"Already converted to 8 bits and in the right form\\\\\\\"! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'di 5/6/1998 21:08'!\\\\nstampDeEmphasize\\\\n\\\\t\\\\\\\"Turn off an emphasized stamp.  Was turned on in pickup:action:cursor:\\\\\\\"\\\\n\\\\n\\\\ttool owner class == AlignmentMorph ifTrue: [\\\\n\\\\t\\\\ttool \\\\\\\"actionButton\\\\\\\" owner \\\\\\\"layoutMorph\\\\\\\" color: Color transparent; \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tborderColor: Color transparent].! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'tk 7/2/97 14:02'!\\\\nstampForm\\\\n\\\\t\\\\\\\"Return the selected stamp\\\\\\\"\\\\n\\\\n\\\\t^ stampHolder stampFormFor: tool.\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'tk 7/17/97 11:47'!\\\\nstampHolder\\\\n\\\\n\\\\t^ stampHolder! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'tk 7/17/97 11:48'!\\\\nstampHolder: newOne\\\\n\\\\n\\\\tstampHolder _ newOne! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'ar 9/23/2000 20:00'!\\\\ntakeColor: aColor event: evt\\\\n\\\\t\\\\\\\"Accept the given color programmatically\\\\\\\"\\\\n\\\\tcurrentColor _ aColor.\\\\n\\\\tself notifyWeakDependentsWith: {#currentColor. evt. currentColor}.\\\\n\\\\tself showColor.\\\\n\\\\tself colorable ifFalse: [self setAction: #paint: evt: evt].\\\\t\\\\\\\"User now thinking of painting\\\\\\\"! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'ar 9/23/2000 20:39'!\\\\ntakeColorEvt: evt from: colorPicker\\\\n\\\\t\\\\\\\"Accept a new color from the colorMemory.  Programs use currentColor: instead.  Do not do this before the picker has a chance to set its own color!!\\\\\\\"\\\\n\\\\t^self takeColor: colorPicker currentColor event: evt! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'tk 8/21/2000 16:06'!\\\\ntoggleShapes\\\\n\\\\t| tab sh stamps |\\\\n\\\\t\\\\\\\"The sub panel that has the shape tools on it.  Rect, line...\\\\\\\"\\\\n\\\\tstamps _ self submorphNamed: 'stamps'.\\\\n\\\\ttab _ self submorphNamed: 'shapeTab'.\\\\n\\\\t(sh _ self submorphNamed: 'shapes') visible\\\\n\\\\t\\\\tifTrue: [sh hide.  tab top: stamps bottom-1]\\\\n\\\\t\\\\tifFalse: [sh comeToFront.  sh top: stamps bottom-9.  \\\\n\\\\t\\\\t\\\\t\\\\tsh show.  tab top: sh bottom - tab height + 10].\\\\n\\\\tself layoutChanged.\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'tk 8/21/2000 15:57'!\\\\ntoggleStamps\\\\n\\\\t| tab otherTab st shapes |\\\\n\\\\t\\\\\\\"The sub panel that has the stamps in it.  For saving and moving parts of an image.\\\\\\\"\\\\n\\\\tshapes _ self submorphNamed: 'shapes'.\\\\n\\\\totherTab _ self submorphNamed: 'shapeTab'.\\\\n\\\\ttab _ self submorphNamed: 'stampTab'.\\\\n\\\\t(st _ self submorphNamed: 'stamps') visible\\\\n\\\\t\\\\tifTrue: [st hide.  st bottom: self bottom.  tab top: self bottom-1.\\\\n\\\\t\\\\t\\\\t\\\\tshapes top: self bottom-9.\\\\n\\\\t\\\\t\\\\t\\\\totherTab top: (shapes visible ifTrue: [shapes bottom - otherTab height + 10] \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [self bottom-1])]\\\\n\\\\t\\\\tifFalse: [st top: self bottom-10.  st show.  tab top: st bottom-0.\\\\n\\\\t\\\\t\\\\t\\\\tshapes top: st bottom-9.\\\\n\\\\t\\\\t\\\\t\\\\totherTab top: (shapes visible ifTrue: [shapes bottom - otherTab height + 10] \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [st bottom-0])].\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'tk 7/1/97 12:09'!\\\\ntool\\\\n\\\\t^ tool! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'RAA 8/16/2000 12:38'!\\\\ntool: actionButton action: aSelector cursor: aCursor evt: evt\\\\n\\\\t\\\\\\\"Set the current tool and action for the paintBox.  \\\\\\\"\\\\n\\\\n\\\\ttool ifNotNil: [\\\\n\\\\t\\\\ttool == actionButton ifFalse: [\\\\n\\\\t\\\\t\\\\ttool state: #off.\\\\n\\\\t\\\\t\\\\taction == #stamp: ifTrue: [self stampDeEmphasize]]].\\\\n\\\\ttool _ actionButton.\\\\t\\\\t\\\\\\\"A ThreePhaseButtonMorph\\\\\\\"\\\\n\\\\t\\\\\\\"tool state: #on.\\\\talready done\\\\\\\"\\\\n\\\\taction _ aSelector.\\\\t\\\\t\\\\\\\"paint:\\\\\\\"\\\\n\\\\tcurrentCursor _ aCursor.\\\\n\\\\tself notifyWeakDependentsWith: {#action. evt. action}.\\\\n\\\\tself notifyWeakDependentsWith: {#currentCursor. evt. currentCursor}.\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'RAA 8/16/2000 01:45'!\\\\ntoss: cancelButton with: cancelSelector evt: evt\\\\n\\\\t\\\\\\\"Reject the painting.  Showing noPalette is done by the block submitted to the SketchEditorMorph\\\\\\\"\\\\n\\\\n\\\\t| focus |\\\\n\\\\towner ifNil: [\\\\\\\"it happens\\\\\\\"  ^ self].\\\\n\\\\t(focus _ self focusMorph) \\\\n\\\\t\\\\tifNotNil: [focus cancelPainting: self evt: evt]\\\\n\\\\t\\\\tifNil:\\\\n\\\\t\\\\t\\\\t[self delete].\\\\n\\\\tcancelButton state: #off.\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'RAA 8/16/2000 11:15'!\\\\nundo: undoButton with: undoSelector evt: evt\\\\n\\\\t| ss |\\\\n\\\\t(ss _ self focusMorph) \\\\n\\\\t\\\\tifNotNil: [ss undoPainting: self evt: evt]\\\\n\\\\t\\\\tifNil: [self notCurrentlyPainting].\\\\n\\\\tundoButton state: #off.! !\\\\n\\\\n\\\\n!PaintBoxMorph methodsFor: 'copying' stamp: 'di 10/14/97 10:13'!\\\\nupdateReferencesUsing: aDictionary\\\\n\\\\t\\\\\\\"Fix up stampHolder which is a ScrollingToolHolder, which is not a Morph\\\\\\\"\\\\n\\\\n\\\\tsuper updateReferencesUsing: aDictionary.\\\\n\\\\tstampHolder updateReferencesUsing: aDictionary.\\\\n\\\\tcolorMemory updateReferencesUsing: aDictionary.! !\\\\n\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'RAA 8/15/2000 16:47'!\\\\naddWeakDependent: anObject\\\\n\\\\n\\\\tweakDependents ifNil: [^weakDependents _ WeakArray with: anObject].\\\\n\\\\tweakDependents _ weakDependents,{anObject} reject: [ :each | each isNil].! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'RAA 8/15/2000 14:59'!\\\\nbeStatic\\\\n\\\\n\\\\tcolorMemory ifNotNil: [colorMemory beStatic].! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'sw 5/23/2001 13:53'!\\\\ncreateButtons\\\\n\\\\t\\\\\\\"Create buttons one at a time and let the user place them over the background.  Later can move them again by turning on AuthorModeOwner in ThreePhaseButtonMorph.\\\\n\\\\tself createButtons.\\\\t\\\\\\\"\\\\n\\\\n\\\\t| rect button nib |\\\\n\\\\t#(erase: eyedropper: fill: paint: rect: ellipse: polygon: line: star: pickup: \\\\\\\"pickup: pickup: pickup:\\\\\\\" stamp: \\\\\\\"stamp: stamp: stamp:\\\\\\\" undo: keep: toss: prevStamp: nextStamp:) do: [:sel |\\\\n\\\\t\\\\t(self submorphNamed: sel) ifNil:\\\\n\\\\t\\\\t\\\\t[self inform: 'Rectangle for ',sel.\\\\n\\\\t\\\\t\\\\trect _ Rectangle fromUser.\\\\n\\\\t\\\\t\\\\tbutton _ ThreePhaseButtonMorph new.\\\\n\\\\t\\\\t\\\\tbutton onImage: nil; bounds: rect.\\\\n\\\\t\\\\t\\\\tself addMorph: button.\\\\n\\\\t\\\\t\\\\tbutton actionSelector: #tool:action:cursor:evt:; arguments: (Array with: button with: sel with: nil).\\\\n\\\\t\\\\t\\\\tbutton actWhen: #buttonUp; target: self]].\\\\n\\\\t#(brush1: brush2: brush3: brush4: brush5: brush6: ) doWithIndex: [:sel :ind |\\\\n\\\\t\\\\t(self submorphNamed: sel) ifNil:\\\\n\\\\t\\\\t\\\\t[self inform: 'Rectangle for ',sel.\\\\n\\\\t\\\\t\\\\trect _ Rectangle fromUser.\\\\n\\\\t\\\\t\\\\tbutton _ ThreePhaseButtonMorph new.\\\\n\\\\t\\\\t\\\\tbutton onImage: nil; bounds: rect.\\\\n\\\\t\\\\t\\\\tself addMorph: button.\\\\n\\\\t\\\\t\\\\tnib _ Form dotOfSize: (#(1 2 3 6 11 26) at: ind).\\\\n\\\\t\\\\t\\\\tbutton actionSelector: #brush:action:nib:evt:; \\\\n\\\\t\\\\t\\\\t\\\\t\\\\targuments: (Array with: button with: sel with: nib).\\\\n\\\\t\\\\t\\\\tbutton actWhen: #buttonUp; target: self]].\\\\n\\\\t\\\\\\\"stamp:  Stamps are held in a ScrollingToolHolder.  Pickups and stamps and brushes are id-ed by the button == with item from a list.\\\\\\\"\\\\n\\\\n\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'dgd 2/22/2003 19:39'!\\\\nfixupButtons\\\\n\\\\t| changes answer newSelector |\\\\n\\\\tchanges := Dictionary new.\\\\n\\\\tchanges\\\\n\\\\t\\\\tat: #brush:action:nib: put: #brush:action:nib:evt:;\\\\n\\\\t\\\\tat: #tool:action:cursor: put: #tool:action:cursor:evt:;\\\\n\\\\t\\\\tat: #pickup:action:cursor: put: #pickup:action:cursor:evt:;\\\\n\\\\t\\\\tat: #keep:with: put: #keep:with:evt:;\\\\n\\\\t\\\\tat: #undo:with: put: #undo:with:evt:;\\\\n\\\\t\\\\tat: #scrollStamps:action: put: #scrollStamps:action:evt:;\\\\n\\\\t\\\\tat: #toss:with: put: #toss:with:evt:;\\\\n\\\\t\\\\tat: #eyedropper:action:cursor: put: #eyedropper:action:cursor:evt:;\\\\n\\\\t\\\\tat: #clear:with: put: #clear:with:evt:.\\\\n\\\\tanswer := WriteStream on: String new.\\\\n\\\\tself allMorphsDo: \\\\n\\\\t\\\\t\\\\t[:each | \\\\n\\\\t\\\\t\\\\t(each isKindOf: ThreePhaseButtonMorph) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[answer nextPutAll: each actionSelector.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(changes includesKey: each actionSelector) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[each actionSelector: (newSelector := changes at: each actionSelector).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tanswer nextPutAll: ' <-- ' , newSelector].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tanswer cr]].\\\\n\\\\t^answer contents\\\\n\\\\t\\\\\\\"StringHolder new\\\\n\\\\t\\\\tcontents: answer contents;\\\\n\\\\t\\\\topenLabel: 'button fixups'\\\\\\\"! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'dgd 2/22/2003 19:03'!\\\\ninit3\\\\n\\\\t\\\\\\\"Just a record of how we loaded in the latest paintbox button images\\\\\\\"\\\\n\\\\n\\\\t| bb rect lay pic16Bit aa blt on thin |\\\\n\\\\tself loadoffImage: 'etoy_default.gif'.\\\\n\\\\tself allMorphsDo: \\\\n\\\\t\\\\t\\\\t[:button | \\\\n\\\\t\\\\t\\\\t(button isKindOf: ThreePhaseButtonMorph) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [button offImage: nil]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [button position: button position + (100 @ 0)]].\\\\n\\\\t(bb := self submorphNamed: #keep:) position: bb position + (100 @ 0).\\\\n\\\\t(bb := self submorphNamed: #toss:) position: bb position + (100 @ 0).\\\\n\\\\t(bb := self submorphNamed: #undo:) position: bb position + (100 @ 0).\\\\n\\\\t\\\\\\\"Transparent is (Color r: 1.0 g: 0 b: 1.0)\\\\\\\"\\\\n\\\\tself moveButtons.\\\\n\\\\tself loadOnImage: 'etoy_in.gif'.\\\\n\\\\tAllOnImage := nil.\\\\n\\\\t'save space'.\\\\n\\\\tself loadPressedImage: 'etoy_in.gif'.\\\\n\\\\tAllPressedImage := nil.\\\\n\\\\t'save space'.\\\\n\\\\tself loadCursors.\\\\n\\\\n\\\\t\\\\\\\"position the stamp buttons\\\\\\\"\\\\n\\\\tstampHolder stampButtons owner last delete.\\\\n\\\\tstampHolder pickupButtons last delete.\\\\n\\\\tstampHolder stampButtons: (stampHolder stampButtons copyFrom: 1 to: 3).\\\\n\\\\tstampHolder pickupButtons: (stampHolder pickupButtons copyFrom: 1 to: 3).\\\\n\\\\t\\\\\\\"| rect |\\\\\\\"\\\\n\\\\tstampHolder pickupButtons do: \\\\n\\\\t\\\\t\\\\t[:button | \\\\n\\\\t\\\\t\\\\t\\\\\\\"PopUpMenu notify: 'Rectangle for ',sel.\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\trect := Rectangle fromUser.\\\\n\\\\t\\\\t\\\\tbutton bounds: rect\\\\t\\\\\\\"image is nil\\\\\\\"].\\\\n\\\\t\\\\\\\"| rect lay |\\\\\\\"\\\\n\\\\tstampHolder clear.\\\\n\\\\tstampHolder stampButtons do: \\\\n\\\\t\\\\t\\\\t[:button | \\\\n\\\\t\\\\t\\\\tbutton\\\\n\\\\t\\\\t\\\\t\\\\toffImage: nil;\\\\n\\\\t\\\\t\\\\t\\\\tpressedImage: nil.\\\\n\\\\t\\\\t\\\\tlay := button owner.\\\\n\\\\t\\\\t\\\\t\\\\\\\"PopUpMenu notify: 'Rectangle for ',sel.\\\\\\\"\\\\n\\\\t\\\\t\\\\trect := Rectangle fromUser.\\\\n\\\\t\\\\t\\\\tbutton image: (Form fromDisplay: (rect insetBy: 2)).\\\\n\\\\t\\\\t\\\\tlay borderWidth: 2.\\\\n\\\\t\\\\t\\\\tlay bounds: rect\\\\t\\\\\\\"image is nil\\\\\\\"].\\\\n\\\\t\\\\\\\"| pic16Bit blt aa on |\\\\\\\"\\\\n\\\\tpic16Bit := GIFReadWriter formFromFileNamed: 'etoy_in.gif'.\\\\t\\\\\\\"really 8\\\\\\\"\\\\n\\\\taa := Form extent: OriginalBounds extent depth: 8.\\\\n\\\\tblt := BitBlt current toForm: aa.\\\\n\\\\tblt\\\\n\\\\t\\\\tsourceForm: pic16Bit;\\\\n\\\\t\\\\tcombinationRule: Form over;\\\\n\\\\t\\\\tsourceRect: OriginalBounds;\\\\n\\\\t\\\\tdestOrigin: 0 @ 0;\\\\n\\\\t\\\\tcopyBits.\\\\n\\\\t\\\\\\\"Collect all the images for the buttons in the on state\\\\\\\"\\\\n\\\\tstampHolder pickupButtons do: \\\\n\\\\t\\\\t\\\\t[:button | \\\\n\\\\t\\\\t\\\\ton := ColorForm extent: button extent depth: 8.\\\\n\\\\t\\\\t\\\\ton colors: pic16Bit colors.\\\\n\\\\t\\\\t\\\\ton \\\\n\\\\t\\\\t\\\\t\\\\tcopy: (0 @ 0 extent: button extent)\\\\n\\\\t\\\\t\\\\t\\\\tfrom: button topLeft - self topLeft\\\\n\\\\t\\\\t\\\\t\\\\tin: aa\\\\n\\\\t\\\\t\\\\t\\\\trule: Form over.\\\\n\\\\t\\\\t\\\\tbutton\\\\n\\\\t\\\\t\\\\t\\\\timage: on;\\\\n\\\\t\\\\t\\\\t\\\\tpressedImage: on;\\\\n\\\\t\\\\t\\\\t\\\\toffImage: nil].\\\\n\\\\tself invalidRect: bounds.\\\\n\\\\t((self submorphNamed: #erase:) arguments third) offset: 12 @ 35.\\\\n\\\\t((self submorphNamed: #eyedropper:) arguments third) offset: 0 @ 0.\\\\n\\\\t((self submorphNamed: #fill:) arguments third) offset: 10 @ 44.\\\\n\\\\t((self submorphNamed: #paint:) arguments third) offset: 3 @ 3.\\\\t\\\\\\\"unused\\\\\\\"\\\\n\\\\t((self submorphNamed: #rect:) arguments third) offset: 6 @ 17.\\\\n\\\\t((self submorphNamed: #ellipse:) arguments third) offset: 5 @ 4.\\\\n\\\\t((self submorphNamed: #polygon:) arguments third) offset: 5 @ 4.\\\\n\\\\t((self submorphNamed: #line:) arguments third) offset: 5 @ 17.\\\\n\\\\t((self submorphNamed: #star:) arguments third) offset: 2 @ 5.\\\\n\\\\tthumbnail delete.\\\\n\\\\tthumbnail := nil.\\\\n\\\\t(submorphs select: [:e | e class == RectangleMorph]) first \\\\n\\\\t\\\\tbounds: Rectangle fromUser.\\\\n\\\\t((submorphs select: [:e | e class == RectangleMorph]) first)\\\\n\\\\t\\\\tborderWidth: 1;\\\\n\\\\t\\\\tborderColor: Color black.\\\\n\\\\t\\\\\\\"| thin |\\\\\\\"\\\\n\\\\tsubmorphs do: [:ss | ss class == ImageMorph ifTrue: [thin := ss\\\\t\\\\\\\"first\\\\\\\"]].\\\\n\\\\tcolorMemoryThin := thin! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'tk 8/22/2000 11:56'!\\\\ninit4\\\\n\\\\t\\\\\\\"Just a record of how Ted loaded in the paintbox button images, Feb 98\\\\\\\"\\\\n| bb im pp newImage pic24Bit picNewBit blt |\\\\n\\\\n\\\\\\\"self loadoffImage: 'roundedPalette3.bmp'.\\\\\\\"\\\\npic24Bit _ GIFReadWriter formFromServerFile: 'updates/137roundedPalette3.bmp'.\\\\npicNewBit _ Form extent: pic24Bit extent depth: 16.\\\\npic24Bit displayOn: picNewBit.\\\\nOriginalBounds _ picNewBit boundingBox.\\\\nAllOffImage _ Form extent: OriginalBounds extent depth: 16.\\\\nblt _ BitBlt current toForm: AllOffImage.\\\\nblt sourceForm: picNewBit; combinationRule: Form over;\\\\n\\\\t\\\\tsourceRect: OriginalBounds; destOrigin: 0@0; copyBits.\\\\n\\\\nAllOffImage mapColor: Color transparent to: Color black.\\\\nself image: AllOffImage.\\\\nself invalidRect: bounds.\\\\n\\\\nself submorphsDo: [:button | button position: button position + (10@10)].\\\\n(im _ submorphs at: 28) class == ImageMorph ifTrue: [\\\\n\\\\tim position: im position + (2@0)].\\\\t\\\\\\\"color picker\\\\\\\"\\\\n\\\\\\\"exercise it once\\\\\\\"\\\\n\\\\n(bb _ self submorphNamed: #keep:) position: bb position + (0@25).\\\\n(bb _ self submorphNamed: #toss:) position: bb position + (0@25).\\\\n(bb _ self submorphNamed: #undo:) position: bb position + (0@-25).\\\\n(bb _ self submorphNamed: #clear:) position: bb position + (0@-25).\\\\n(bb _ self submorphNamed: #undo:) position: bb position + (0@-69).\\\\n(bb _ self submorphNamed: #clear:) position: bb position + (0@-69).\\\\nself submorphsDo: [:button | \\\\n\\\\tbutton class == AlignmentMorph ifTrue: [\\\\n\\\\t\\\\tbutton position: button position + (0@25)].\\\\n\\\\t(button printString includesSubString: 'stamp:') ifTrue: [\\\\n\\\\t\\\\tbutton position: button position + (0@25)]].\\\\n(bb _ self submorphNamed: #prevStamp:) position: bb position + (0@25).\\\\n(bb _ self submorphNamed: #nextStamp:) position: bb position + (0@25).\\\\n\\\\nbb _ self submorphNamed: #keep:.\\\\nnewImage _ bb pressedImage copy: (0@4 corner: (bb pressedImage boundingBox extent)).\\\\nbb onImage: newImage.  bb pressedImage: newImage.  bb extent: newImage extent.\\\\nbb position: bb position + (4@1).\\\\n\\\\npp _ (bb _ self submorphNamed: #toss:) pressedImage.\\\\nnewImage _ pp copy: (0@4 corner: (bb pressedImage extent - (3@0))).\\\\nbb onImage: newImage.  bb pressedImage: newImage.  \\\\nbb extent: newImage extent.\\\\nbb position: bb position + (3@1).\\\\n\\\\npp _ (bb _ self submorphNamed: #undo:) pressedImage.\\\\nnewImage _ pp copy: (0@0 corner: (bb pressedImage extent - (3@5))).\\\\nbb onImage: newImage.  bb pressedImage: newImage.  \\\\nbb extent: newImage extent.\\\\nbb position: bb position + (3@-1).\\\\n\\\\npp _ (bb _ self submorphNamed: #clear:) pressedImage.\\\\nnewImage _ pp copy: (0@0 corner: (bb pressedImage extent - (0@5))).\\\\nbb onImage: newImage.  bb pressedImage: newImage.  \\\\nbb extent: newImage extent.\\\\nbb position: bb position + (3@-1).\\\\n\\\\npic24Bit _ GIFReadWriter formFromServerFile: 'updates/137pencil.bmp'.\\\\npicNewBit _ Form extent: pic24Bit extent depth: 16.\\\\npic24Bit displayOn: picNewBit.\\\\nnewImage _ picNewBit as8BitColorForm.\\\\nnewImage transparentColor: (Color r: 0 g: 0 b: 0).\\\\n(bb _ self submorphNamed: #erase:) pressedImage: newImage; onImage: newImage;\\\\n\\\\textent: newImage extent.\\\\n\\\\nbb position: bb position + (-11@-1).\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'tk 7/28/2000 23:26'!\\\\ninitialize\\\\n\\\\tsuper initialize.\\\\n\\\\tcolorMemory ifNotNil: [colorMemory on: #mouseDown send: #takeColorEvt:from: to: self].! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'jm 6/18/1999 18:58'!\\\\nloadColorChooser\\\\n\\\\t\\\\\\\"Load Forms for ColorMemoryMorph.\\\\\\\"\\\\n\\\\n\\\\t| doc closedForm openForm |\\\\n\\\\tdoc _ Utilities objectStrmFromUpdates: 'colorPalClosed.obj'.\\\\n\\\\tclosedForm _ doc fileInObjectAndCode mapColor: Color transparent to: Color black.\\\\n\\\\tdoc _ Utilities objectStrmFromUpdates: 'colorPalOpen.obj'.\\\\n\\\\topenForm _ doc fileInObjectAndCode mapColor: Color transparent to: Color black.\\\\n\\\\n\\\\tcolorMemoryThin image: closedForm.\\\\n\\\\tcolorMemoryThin position: self position + (0@140).\\\\n\\\\n\\\\tcolorMemory delete.\\\\t\\\\\\\"delete old one\\\\\\\"\\\\n\\\\tcolorMemory _ PaintBoxColorPicker new image: openForm.\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'sw 5/23/2001 13:54'!\\\\nloadCursors\\\\n\\\\t\\\\\\\"Display the form containing the cursors.  Transparent is (Color r: 1.0 g: 0 b: 1.0).  Grab the forms one at a time, and they are stored away.\\\\n\\\\tself loadCursors.\\\\t\\\\\\\"\\\\n\\\\n\\\\t| button transp cursor map |\\\\n\\\\ttransp _ Color r: 1.0 g: 0 b: 1.0.\\\\n\\\\tmap _ Color indexedColors copy.\\\\t\\\\\\\"just in case\\\\\\\"\\\\n\\\\t1 to: 256 do: [:ind | (map at: ind) = transp ifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t[map at: ind put: Color transparent]].\\\\n\\\\n\\\\t#(erase: eyedropper: fill: paint: rect: ellipse: polygon: line: star: ) do: [:sel |\\\\n\\\\t\\\\tself inform: 'Rectangle for ',sel.\\\\n\\\\t\\\\tcursor _ ColorForm fromUser.\\\\n\\\\t\\\\tcursor colors: map.\\\\t\\\\\\\"share it\\\\\\\"\\\\n\\\\t\\\\tbutton _ self submorphNamed: sel.\\\\n\\\\t\\\\tbutton arguments at: 3 put: cursor].\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'yo 1/13/2005 12:20'!\\\\nloadJapanesePaintBoxBitmaps\\\\n\\\\\\\"\\\\n\\\\tPaintBoxMorph new loadJapanesePaintBoxBitmaps.\\\\n\\\\\\\"\\\\n\\\\n\\\\t| formTranslator form bb |\\\\n\\\\tself position: 0@0.\\\\n\\\\tformTranslator _ NaturalLanguageFormTranslator localeID: (LocaleID isoString: 'ja').\\\\n\\\\tform _ Form fromFileNamed: 'offPaletteJapanese(children).form'.\\\\n\\\\n\\\\t#('keep:' 'undo:' 'clear:' 'toss:') with: #('KEEP' 'UNDO' 'CLEAR' 'TOSS') do: [:extName :label |\\\\n\\\\t\\\\tbb _ (self submorphs detect: [:e | e externalName = extName]) bounds.\\\\n\\\\t\\\\tformTranslator name: label, '-off' form: (form copy: bb)\\\\n\\\\t].\\\\n\\\\n\\\\n\\\\tform _ Form fromFileNamed: 'pressedPaletteJapanese(children).form'.\\\\n\\\\t#('keep:' 'undo:' 'clear:' 'toss:') with: #('KEEP' 'UNDO' 'CLEAR' 'TOSS') do: [:extName :label |\\\\n\\\\t\\\\tbb _ (self submorphs detect: [:e | e externalName = extName]) bounds.\\\\n\\\\t\\\\tformTranslator name: label, '-pressed' form: (form copy: bb)\\\\n\\\\t].\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'yo 11/4/2002 21:20'!\\\\nloadOffForm: pic16Bit \\\\n\\\\t\\\\\\\"Prototype loadOffForm: (Smalltalk imageImports at: #offPaletteJapanese)\\\\\\\"\\\\n\\\\n\\\\t| blt |\\\\n\\\\tOriginalBounds _ pic16Bit boundingBox.\\\\n\\\\tAllOffImage _ Form extent: OriginalBounds extent depth: 16.\\\\n\\\\tblt _ BitBlt current toForm: AllOffImage.\\\\n\\\\tblt sourceForm: pic16Bit;\\\\n\\\\t\\\\t combinationRule: Form over;\\\\n\\\\t\\\\t sourceRect: OriginalBounds;\\\\n\\\\t\\\\t destOrigin: 0 @ 0;\\\\n\\\\t\\\\t copyBits.\\\\n\\\\tAllOffImage mapColor: Color blue to: Color transparent.\\\\n\\\\tself image: AllOffImage.\\\\n\\\\tAllOffImage _ nil.\\\\n\\\\tself invalidRect: bounds\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'ar 5/28/2000 12:10'!\\\\nloadOnImage: fileName\\\\n\\\\t\\\\\\\"Read in and convert the image for the paintBox with the buttons\\\\non.  A .bmp 24-bit image.  For each button, cut that chunk out and save it.\\\\\\\"\\\\n\\\\t\\\\\\\"\\\\tself loadOnImage: 'NoSh_on.bmp'.\\\\n\\\\t\\\\tAllOnImage _ nil.\\\\t'save space'.\\\\t\\\\\\\"\\\\n\\\\n\\\\t| pic16Bit blt aa on type |\\\\n\\\\ttype _ 'gif'.  \\\\\\\"   gif or bmp  \\\\\\\"\\\\ntype = 'gif' ifTrue: [\\\\n\\\\tpic16Bit \\\\\\\"really 8\\\\\\\" _ GIFReadWriter formFromFileNamed: fileName.\\\\n\\\\tpic16Bit display.\\\\n\\\\taa _ AllOnImage _ Form extent: OriginalBounds extent depth: 8.\\\\n\\\\tblt _ BitBlt current toForm: aa.\\\\n\\\\tblt sourceForm: pic16Bit; combinationRule: Form over;\\\\n\\\\t\\\\tsourceRect: OriginalBounds; destOrigin: 0@0; copyBits.\\\\n\\\\t].\\\\ntype = 'bmp' ifTrue: [\\\\n\\\\tpic16Bit _ (Form fromBMPFileNamed: fileName) asFormOfDepth: 16.\\\\n\\\\tpic16Bit display.\\\\n\\\\taa _ AllOnImage _ Form extent: OriginalBounds extent depth: 16.\\\\n\\\\tblt _ BitBlt current toForm: aa.\\\\n\\\\tblt sourceForm: pic16Bit; combinationRule: Form over;\\\\n\\\\t\\\\tsourceRect: OriginalBounds; destOrigin: 0@0; copyBits.\\\\n\\\\taa mapColor: Color transparent to: Color black.\\\\n\\\\t].\\\\n\\\\t\\\\\\\"Collect all the images for the buttons in the on state\\\\\\\"\\\\n\\\\tself allMorphsDo: [:button |\\\\n\\\\t\\\\t(button isKindOf: ThreePhaseButtonMorph) ifTrue: [\\\\n\\\\t\\\\t\\\\ttype = 'gif' ifTrue: [on _ ColorForm extent: button extent depth: 8.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t on colors: pic16Bit colors]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [on _ Form extent: button extent depth: 16].\\\\n\\\\t\\\\t\\\\ton copy: (0@0 extent: button extent)\\\\n\\\\t\\\\t\\\\t\\\\tfrom: (button topLeft - self topLeft) in: aa rule: Form over.\\\\n\\\\t\\\\t\\\\tbutton onImage: on]].\\\\n\\\\tself invalidRect: bounds.\\\\n\\\\n\\\\t! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'yo 11/4/2002 21:20'!\\\\nloadPressedForm: pic16Bit \\\\n\\\\t\\\\\\\"Prototype loadPressedForm: (Smalltalk imageImports at: #pressedPaletteJapanese)\\\\\\\"\\\\n\\\\n\\\\t| blt on |\\\\n\\\\tAllPressedImage _ AllPressedImage _ Form extent: OriginalBounds extent depth: 16.\\\\n\\\\tblt _ BitBlt current toForm: AllPressedImage.\\\\n\\\\tblt sourceForm: pic16Bit;\\\\n\\\\t\\\\t combinationRule: Form over;\\\\n\\\\t\\\\t sourceRect: OriginalBounds;\\\\n\\\\t\\\\t destOrigin: 0 @ 0;\\\\n\\\\t\\\\t copyBits.\\\\n\\\\tAllPressedImage mapColor: Color black to: Color transparent.\\\\n\\\\tself\\\\n\\\\t\\\\tallMorphsDo: [:button | (button isKindOf: ThreePhaseButtonMorph)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [on _ Form extent: button extent depth: 16.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ton\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcopy: (0 @ 0 extent: button extent)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfrom: button topLeft - self topLeft\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tin: AllPressedImage\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trule: Form over.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbutton pressedImage: on]].\\\\n\\\\tAllPressedImage _ nil.\\\\n\\\\tself invalidRect: bounds\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'ar 5/28/2000 12:10'!\\\\nloadPressedImage: fileName\\\\n\\\\t\\\\\\\"Read in and convert the image for the paintBox with the buttons\\\\non.  A .bmp 24-bit image.  For each button, cut that chunk out and save it.\\\\\\\"\\\\n\\\\t\\\\\\\"\\\\tself loadPressedImage: 'NoSh_on.bmp'.\\\\n\\\\t\\\\tAllPressedImage _ nil.\\\\t'save space'.\\\\t\\\\\\\"\\\\n\\\\n\\\\t| pic16Bit blt aa on type |\\\\n\\\\ttype _ 'gif'.  \\\\\\\"   gif or bmp  \\\\\\\"\\\\ntype = 'gif' ifTrue: [\\\\n\\\\tpic16Bit \\\\\\\"really 8\\\\\\\" _ GIFReadWriter formFromFileNamed: fileName.\\\\n\\\\tpic16Bit display.\\\\n\\\\taa _ AllPressedImage _ Form extent: OriginalBounds extent depth: 8.\\\\n\\\\tblt _ BitBlt current toForm: aa.\\\\n\\\\tblt sourceForm: pic16Bit; combinationRule: Form over;\\\\n\\\\t\\\\tsourceRect: OriginalBounds; destOrigin: 0@0; copyBits.\\\\n\\\\t].\\\\ntype = 'bmp' ifTrue: [\\\\n\\\\tpic16Bit _ (Form fromBMPFileNamed: fileName) asFormOfDepth: 16.\\\\n\\\\tpic16Bit display.\\\\n\\\\taa _ AllPressedImage _ Form extent: OriginalBounds extent depth: 16.\\\\n\\\\tblt _ BitBlt current toForm: aa.\\\\n\\\\tblt sourceForm: pic16Bit; combinationRule: Form over;\\\\n\\\\t\\\\tsourceRect: OriginalBounds; destOrigin: 0@0; copyBits.\\\\n\\\\taa mapColor: Color transparent to: Color black.\\\\n\\\\t].\\\\n\\\\t\\\\\\\"Collect all the images for the buttons in the on state\\\\\\\"\\\\n\\\\tself allMorphsDo: [:button |\\\\n\\\\t\\\\t(button isKindOf: ThreePhaseButtonMorph) ifTrue: [\\\\n\\\\t\\\\t\\\\ttype = 'gif' ifTrue: [on _ ColorForm extent: button extent depth: 8.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t on colors: pic16Bit colors]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [on _ Form extent: button extent depth: 16].\\\\n\\\\t\\\\t\\\\ton copy: (0@0 extent: button extent)\\\\n\\\\t\\\\t\\\\t\\\\tfrom: (button topLeft - self topLeft) in: aa rule: Form over.\\\\n\\\\t\\\\t\\\\tbutton pressedImage: on]].\\\\n\\\\tself invalidRect: bounds.\\\\n\\\\n\\\\t! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'md 11/14/2003 16:52'!\\\\nloadoffImage: fileName\\\\n\\\\t\\\\\\\"Read in and convert the background image for the paintBox.  All\\\\nbuttons off.  A .bmp 24-bit image.\\\\\\\"\\\\n\\\\t\\\\\\\"\\\\tPrototype loadoffImage: 'roundedPalette3.bmp'\\\\t\\\\\\\"\\\\n\\\\n\\\\t| pic16Bit blt type getBounds |\\\\n\\\\ttype _ 'bmp'.  \\\\\\\" gif or bmp  \\\\\\\"\\\\n\\\\tgetBounds _ 'fromPic'.\\\\t\\\\\\\"fromUser = draw out rect of paintbox on image\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"fromOB = just read in new bits, keep same size and place as last time.\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"fromPic = picture is just the PaintBox, use its bounds\\\\\\\"\\\\ntype = 'gif' ifTrue: [\\\\n\\\\tpic16Bit \\\\\\\"really 8\\\\\\\" _ GIFReadWriter formFromFileNamed: fileName.\\\\n\\\\tgetBounds = 'fromUser' ifTrue: [\\\\\\\"Just first time, collect the bounds\\\\\\\"\\\\n\\\\t\\\\t\\\\tpic16Bit display.\\\\n\\\\t\\\\t\\\\tOriginalBounds _ Rectangle fromUser].\\\\n\\\\tgetBounds = 'fromPic' ifTrue: [OriginalBounds _ pic16Bit boundingBox].\\\\n\\\\t].\\\\n\\\\t\\\\t\\\\\\\"Use OriginalBounds as it was last time\\\\\\\"\\\\ntype = 'bmp' ifTrue: [\\\\n\\\\tpic16Bit _ (Form fromBMPFileNamed: fileName) asFormOfDepth: 16.\\\\n\\\\tgetBounds = 'fromUser' ifTrue: [\\\\\\\"Just first time, collect the bounds\\\\\\\"\\\\n\\\\t\\\\t\\\\tpic16Bit display.\\\\n\\\\t\\\\t\\\\tOriginalBounds _ Rectangle fromUser].\\\\n\\\\t\\\\t\\\\\\\"Use OriginalBounds as it was last time\\\\\\\"\\\\n\\\\t(getBounds = 'fromPic') ifTrue: [OriginalBounds _ pic16Bit boundingBox].\\\\n\\\\tAllOffImage _ Form extent: OriginalBounds extent depth: 16.\\\\n\\\\t].\\\\n\\\\ntype = 'gif' ifTrue: [\\\\n\\\\tAllOffImage _ ColorForm extent: OriginalBounds extent depth: 8.\\\\n\\\\tAllOffImage colors: pic16Bit colors].\\\\n\\\\n\\\\tblt _ BitBlt current toForm: AllOffImage.\\\\n\\\\tblt sourceForm: pic16Bit; combinationRule: Form over;\\\\n\\\\t\\\\tsourceRect: OriginalBounds; destOrigin: 0@0; copyBits.\\\\n\\\\ntype = 'bmp' ifTrue: [AllOffImage mapColor: Color transparent to: Color black].\\\\n\\\\tself image: AllOffImage.\\\\n\\\\tself invalidRect: bounds.\\\\n\\\\n\\\\t! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'sw 5/23/2001 13:54'!\\\\nmoveButtons\\\\n\\\\t\\\\\\\"Move buttons one at a time and let the user place them over the background.  Later can move them again by turning on AuthorModeOwner in ThreePhaseButtonMorph.\\\\n\\\\tself createButtons.\\\\t\\\\\\\"\\\\n\\\\n\\\\t| rect button |\\\\n\\\\t#(erase: eyedropper: fill: paint: rect: ellipse: polygon: line: star: \\\\\\\"pickup: pickup: pickup: pickup:\\\\\\\" \\\\\\\"stamp: stamp: stamp: stamp:\\\\\\\" undo: keep: toss: prevStamp: nextStamp:) do: [:sel |\\\\n\\\\t\\\\t\\\\tself inform: 'Rectangle for ',sel.\\\\n\\\\t\\\\t\\\\trect _ Rectangle fromUser.\\\\n\\\\t\\\\t\\\\tbutton _ self submorphNamed: sel.\\\\n\\\\t\\\\t\\\\tbutton bounds: rect.\\\\t\\\\\\\"image is nil\\\\\\\"].\\\\n\\\\t#(brush1: brush2: brush3: brush4: brush5: brush6: ) doWithIndex: [:sel :ind |\\\\n\\\\t\\\\t\\\\tself inform: 'Rectangle for ',sel.\\\\n\\\\t\\\\t\\\\trect _ Rectangle fromUser.\\\\n\\\\t\\\\t\\\\tbutton _ self submorphNamed: sel.\\\\n\\\\t\\\\t\\\\tbutton bounds: rect.\\\\t\\\\\\\"image is nil\\\\\\\"].\\\\n\\\\t\\\\\\\"stamp:  Stamps are held in a ScrollingToolHolder.  Pickups and stamps and brushes are id-ed by the button == with item from a list.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"\\\\n\\\\t\\\\\\\"\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'tk 8/22/97 15:57'!\\\\nnoVeneer\\\\n\\\\t\\\\\\\"For a palette with a background (off) image, clear that image.\\\\nBut first, for each button, cut that chunk out and save it in the offImage\\\\npart.\\\\\\\"\\\\n\\\\t\\\\\\\"\\\\tself noVeneer.\\\\n\\\\t\\\\tAllOffImage _ nil.\\\\t'save space.  irreversible'.\\\\t\\\\\\\"\\\\n\\\\n\\\\t| aa on |\\\\n\\\\tAllOffImage ifNil: [AllOffImage _ image].\\\\n\\\\taa _ AllOffImage.\\\\n\\\\t\\\\\\\"Collect all the images for the buttons in the on state\\\\\\\"\\\\n\\\\tself allMorphsDo: [:button |\\\\n\\\\t\\\\t(button isKindOf: ThreePhaseButtonMorph) ifTrue: [\\\\n\\\\t\\\\t\\\\ton _ Form extent: button extent depth: 16.\\\\n\\\\t\\\\t\\\\ton copy: (0@0 extent: button extent)\\\\n\\\\t\\\\t\\\\t\\\\tfrom: (button topLeft - self topLeft) in:\\\\naa rule: Form over.\\\\n\\\\t\\\\t\\\\tbutton offImage: on]].\\\\n\\\\tself image: (Form extent: AllOffImage extent depth: 1).\\\\n\\\\tself invalidRect: bounds.\\\\n\\\\n\\\\n\\\\t! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'RAA 8/16/2000 11:12'!\\\\nnotifyWeakDependentsWith: arguments\\\\n\\\\n\\\\tweakDependents ifNil: [^self].\\\\n\\\\tweakDependents do: [ :each |\\\\n\\\\t\\\\teach ifNotNil: [\\\\n\\\\t\\\\t\\\\teach paintBoxChanged: arguments.\\\\n\\\\t\\\\t\\\\teach paintBoxChanged: {#changed. arguments second. true}.\\\\n\\\\t\\\\t].\\\\n\\\\t].! !\\\\n\\\\n\\\\n!PaintBoxMorph methodsFor: 'other' stamp: 'dgd 8/30/2003 21:55'!\\\\naddCustomMenuItems: aCustomMenu hand: aHandMorph\\\\n\\\\n\\\\t\\\\\\\"super addCustomMenuItems: aCustomMenu hand: aHandMorph.\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"don't want the ones from ImageMorph\\\\\\\"\\\\n\\\\taCustomMenu add: 'grab stamp from screen' translated action: #grabFromScreen:.\\\\n\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'other' stamp: 'yo 1/13/2005 14:08'!\\\\naddGraphicLabels\\\\n\\\\t\\\\\\\"translate button labels\\\\\\\"\\\\n\\\\n\\\\t| formTranslator ext pos newForm |\\\\n\\\\tformTranslator _ NaturalLanguageFormTranslator localeID: (Locale current localeID).\\\\n\\\\n\\\\t#('KEEP' 'UNDO' 'CLEAR' 'TOSS') do: [:label |\\\\n\\\\t\\\\t(formTranslator translate: label, '-off') ifNil: [^ false].\\\\n\\\\t\\\\t(formTranslator translate: label, '-pressed') ifNil: [^ false].\\\\n\\\\t].\\\\n\\\\t\\\\n\\\\t#('keep:' 'undo:' 'clear:' 'toss:') with: #('KEEP' 'UNDO' 'CLEAR' 'TOSS') do: [:extName :label |\\\\n\\\\t\\\\t| button |\\\\n\\\\t\\\\tbutton _ submorphs detect: [:m | m externalName = extName] ifNone: [nil].\\\\n\\\\t\\\\tbutton ifNotNil: [\\\\n\\\\t\\\\t\\\\tbutton removeAllMorphs.\\\\n\\\\t\\\\t\\\\text _ button extent.\\\\n\\\\t\\\\t\\\\tpos _ button position.\\\\n\\\\t\\\\t\\\\t(newForm _ formTranslator translate: label, '-off') ifNotNil: [\\\\n\\\\t\\\\t\\\\t\\\\tbutton offImage: newForm.\\\\n\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\t(newForm _ formTranslator translate: label, '-pressed') ifNotNil: [\\\\n\\\\t\\\\t\\\\t\\\\tbutton pressedImage: newForm.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\tbutton extent: ext.\\\\n\\\\t\\\\t\\\\tbutton position: pos.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\n\\\\t^ true.\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'other' stamp: 'yo 1/13/2005 14:08'!\\\\naddLabels\\\\n\\\\n\\\\tPreferences useFormsInPaintBox ifFalse: [\\\\n\\\\t\\\\tself addTextualLabels.\\\\n\\\\t] ifTrue: [\\\\n\\\\t\\\\tself addGraphicLabels ifFalse: [self addTextualLabels].\\\\n\\\\t].\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'other' stamp: 'yo 1/13/2005 11:06'!\\\\naddTextualLabels\\\\n\\\\t\\\\\\\"translate button labels\\\\\\\"\\\\n\\\\n\\\\t#('keep:' 'undo:' 'clear:' 'toss:') with: #('KEEP' 'UNDO' 'CLEAR' 'TOSS') do: [:extName :label |\\\\n\\\\t\\\\t| button |\\\\n\\\\t\\\\tbutton _ submorphs detect: [:m | m externalName = extName] ifNone: [nil].\\\\n\\\\t\\\\tbutton ifNotNil: [\\\\n\\\\t\\\\t\\\\tbutton removeAllMorphs.\\\\n\\\\t\\\\t\\\\tbutton addMorph: (TextMorph new \\\\n\\\\t\\\\t\\\\t\\\\tcontentsWrapped: (Text string: label translated\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tattributes: {\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tTextAlignment centered. \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tTextEmphasis bold.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tTextFontReference toFont:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(Preferences standardPaintBoxButtonFont)});\\\\n\\\\t\\\\t\\\\t\\\\tbounds: (button bounds translateBy: 0@3);\\\\n\\\\t\\\\t\\\\t\\\\tlock)]]! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'other' stamp: 'tk 10/31/97 13:38'!\\\\ncolorMemory\\\\n\\\\n\\\\t^ colorMemory! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'other' stamp: 'di 10/14/97 10:15'!\\\\ncolorMemory: aMorph\\\\n\\\\n\\\\tcolorMemory _ aMorph! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'other' stamp: 'tk 10/31/97 13:35'!\\\\ncolorPatch\\\\n\\\\t^ colorPatch! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'other' stamp: 'ar 3/23/2000 14:18'!\\\\nfocusMorph\\\\n\\\\t\\\\\\\"Note: For backward compatibility we search the world for a SketchEditorMorph if the current focus morph is nil\\\\\\\"\\\\n\\\\t^focusMorph ifNil:[focusMorph _ self world findA: SketchEditorMorph]! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'other' stamp: 'ar 3/23/2000 14:20'!\\\\nfocusMorph: newFocus\\\\n\\\\t\\\\\\\"Set the new focus morph\\\\\\\"\\\\n\\\\tfocusMorph ifNotNil:[focusMorph paletteDetached: self]. \\\\\\\"In case the morph is interested\\\\\\\"\\\\n\\\\tfocusMorph _ newFocus.\\\\n\\\\tfocusMorph ifNotNil:[focusMorph paletteAttached: self]. \\\\\\\"In case the morph is interested\\\\\\\"! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'other' stamp: 'tk 8/22/2000 11:57'!\\\\nmaxBounds\\\\n\\\\t| rr |\\\\n\\\\t\\\\\\\"fullBounds if all flop-out parts of the paintBox were showing.\\\\\\\"\\\\n\\\\n\\\\trr _ bounds merge: colorMemory bounds.\\\\n\\\\trr _ rr merge: (self submorphNamed: 'stamps') bounds.\\\\n\\\\trr _ rr origin corner: rr corner + (0@ (self submorphNamed: 'shapes') height \\\\n\\\\t\\\\t\\\\t\\\\t+ 10 \\\\\\\"what is showing of (self submorphNamed: #toggleShapes) height\\\\\\\").\\\\n\\\\t^ rr! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'other' stamp: 'tk 8/22/2000 23:48'!\\\\noffsetFromMaxBounds\\\\n\\\\t\\\\\\\"location of normal PaintBox within maxBounds.\\\\\\\"\\\\n\\\\n\\\\t^ self left - colorMemory left @ 0! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'other' stamp: 'tk 7/17/97 16:26'!\\\\nrotationTabForm\\\\n\\\\t^ rotationTabForm! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'other' stamp: 'tk 7/17/97 16:26'!\\\\nscaleTabForm\\\\n\\\\t^ scaleTabForm! !\\\\n\\\\n\\\\n!PaintBoxMorph methodsFor: 'recent colors' stamp: 'ar 7/8/2006 20:33'!\\\\nfixUpColorPicker\\\\n\\\\t| chart picker |\\\\n\\\\tchart _ ColorChart ifNil:[Cursor wait showWhile:[ColorChart _ (ColorPickerMorph colorPaletteForDepth: 16 extent: 120@89)]].\\\\n\\\\tchart getCanvas frameRectangle: chart boundingBox color: Color black.\\\\n\\\\tpicker _ Form extent: (chart extent + (14@12)) depth: 16.\\\\n\\\\tpicker fillWhite.\\\\n\\\\t\\\\\\\"top\\\\\\\"\\\\n\\\\tpicker copy: (0@0 extent: picker width@6)\\\\n\\\\t\\\\t\\\\tfrom: (colorMemory image width - picker width)@0 \\\\n\\\\t\\\\t\\\\tin: colorMemory image rule: Form over.\\\\n\\\\t\\\\\\\"bottom\\\\\\\"\\\\n\\\\tpicker copy: (0@ (picker height-6) extent: picker width@6) \\\\n\\\\t\\\\t\\\\tfrom: (colorMemory image width - picker width)@(colorMemory image height - 7)\\\\n\\\\t\\\\t\\\\tin: colorMemory image rule: Form over.\\\\n\\\\t\\\\\\\"left\\\\\\\"\\\\n\\\\tpicker copy: (0@6 corner: 8@(picker height - 6))\\\\n\\\\t\\\\t\\\\tfrom: (colorMemory image boundingBox topLeft + (0@6)) \\\\n\\\\t\\\\t\\\\tin: colorMemory image rule: Form over.\\\\n\\\\t\\\\\\\"right\\\\\\\"\\\\n\\\\tpicker copy: (picker width-6@6 corner: picker width@(picker height - 6))\\\\n\\\\t\\\\t\\\\tfrom: (colorMemory image boundingBox topRight - (6@-6)) \\\\n\\\\t\\\\t\\\\tin: colorMemory image rule: Form over.\\\\n\\\\tchart displayOn: picker at: 8@6.\\\\n\\\\tpicker getCanvas frameRectangle: picker boundingBox color: Color black.\\\\n\\\\tcolorMemory image: picker.\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'recent colors' stamp: 'dgd 2/21/2003 23:17'!\\\\nfixUpRecentColors\\\\n\\\\t| inner outer border box form newImage canvas morph |\\\\n\\\\tself fixUpColorPicker.\\\\n\\\\trecentColors := WriteStream on: Array new.\\\\n\\\\tform := image.\\\\n\\\\tnewImage := Form extent: form extent + (0 @ 41) depth: form depth.\\\\n\\\\tform displayOn: newImage.\\\\n\\\\tnewImage \\\\n\\\\t\\\\tcopy: (0 @ (form height - 10) \\\\n\\\\t\\\\t\\\\t\\\\textent: form width @ (newImage height - form height + 10))\\\\n\\\\t\\\\tfrom: 0 @ (form height - (newImage height - form height + 10))\\\\n\\\\t\\\\tin: form\\\\n\\\\t\\\\trule: Form over.\\\\n\\\\tcanvas := newImage getCanvas.\\\\n\\\\tcanvas \\\\n\\\\t\\\\tline: 12 @ (form height - 10)\\\\n\\\\t\\\\tto: 92 @ (form height - 10)\\\\n\\\\t\\\\twidth: 1\\\\n\\\\t\\\\tcolor: Color black.\\\\n\\\\tcanvas := canvas copyOffset: 12 @ (form height - 9).\\\\n\\\\tinner := Color \\\\n\\\\t\\\\t\\\\t\\\\tr: 0.677\\\\n\\\\t\\\\t\\\\t\\\\tg: 0.71\\\\n\\\\t\\\\t\\\\t\\\\tb: 0.968.\\\\n\\\\touter := inner darker darker.\\\\n\\\\tborder := Color \\\\n\\\\t\\\\t\\\\t\\\\tr: 0.194\\\\n\\\\t\\\\t\\\\t\\\\tg: 0.258\\\\n\\\\t\\\\t\\\\t\\\\tb: 0.194.\\\\n\\\\t0 to: 1\\\\n\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t[:y | \\\\n\\\\t\\\\t\\\\t0 to: 3\\\\n\\\\t\\\\t\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:x | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbox := (x * 20) @ (y * 20) extent: 20 @ 20.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmorph := BorderedMorph new \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbounds: ((box insetBy: 1) translateBy: canvas origin + bounds origin).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmorph\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tborderWidth: 1;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tborderColor: border.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmorph color: Color white.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmorph \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ton: #mouseDown\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsend: #mouseDownRecent:with:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tto: self.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmorph \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ton: #mouseMove\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsend: #mouseStillDownRecent:with:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tto: self.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmorph \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ton: #mouseUp\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsend: #mouseUpRecent:with:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tto: self.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself addMorphFront: morph.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\trecentColors nextPut: morph.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcanvas fillRectangle: box color: Color white.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcanvas frameRectangle: (box insetBy: 1) color: border.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcanvas frameRectangle: box color: inner.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbox := box insetBy: 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcanvas \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tline: box topRight\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tto: box bottomRight\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twidth: 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcolor: outer.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcanvas \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tline: box bottomLeft\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tto: box bottomRight\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twidth: 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcolor: outer]].\\\\n\\\\trecentColors := recentColors contents.\\\\n\\\\t(RecentColors isNil or: [RecentColors size ~= recentColors size]) \\\\n\\\\t\\\\tifTrue: [RecentColors := recentColors collect: [:each | each color]]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[RecentColors \\\\n\\\\t\\\\t\\\\t\\\\tkeysAndValuesDo: [:idx :aColor | (recentColors at: idx) color: aColor]].\\\\n\\\\tself image: newImage.\\\\n\\\\tself toggleStamps.\\\\n\\\\tself toggleStamps! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'recent colors' stamp: 'ar 9/23/2000 19:54'!\\\\nmouseDownRecent: evt with: aMorph\\\\n\\\\taMorph borderColor: Color white.\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'recent colors' stamp: 'ar 9/23/2000 20:01'!\\\\nmouseStillDownRecent: evt with: aMorph\\\\n\\\\t(aMorph containsPoint: evt cursorPoint)\\\\n\\\\t\\\\tifTrue:[aMorph borderColor: Color white]\\\\n\\\\t\\\\tifFalse:[aMorph borderColor: (Color r: 0.194 g: 0.258 b: 0.194)]\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'recent colors' stamp: 'ar 9/23/2000 19:59'!\\\\nmouseUpRecent: evt with: aMorph\\\\n\\\\taMorph borderColor: (Color r: 0.194 g: 0.258 b: 0.194).\\\\n\\\\t(aMorph containsPoint: evt cursorPoint) ifTrue:[\\\\n\\\\t\\\\tself takeColor: aMorph color event: evt.\\\\n\\\\t].! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'recent colors' stamp: 'dgd 2/21/2003 23:17'!\\\\nrecentColor: aColor \\\\n\\\\t\\\\\\\"Remember the color as one of our recent colors\\\\\\\"\\\\n\\\\n\\\\t(recentColors anySatisfy: [:any | any color = aColor]) ifTrue: [^self].\\\\t\\\\\\\"already remembered\\\\\\\"\\\\n\\\\trecentColors size to: 2\\\\n\\\\t\\\\tby: -1\\\\n\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t[:i | \\\\n\\\\t\\\\t\\\\t(recentColors at: i) color: (recentColors at: i - 1) color.\\\\n\\\\t\\\\t\\\\tRecentColors at: i put: (RecentColors at: i - 1)].\\\\n\\\\t(recentColors first) color: aColor.\\\\n\\\\tRecentColors at: 1 put: aColor! !\\\\n\\\\n\\\\n!PaintBoxMorph methodsFor: 'user interface' stamp: 'tk 7/2/97 08:10'!\\\\nmouseUpBalk: evt\\\\n\\\\t\\\\\\\"A button I own got a mouseDown, but the user moved out before letting up.  Prevent this for the current tool.  Some tool must stay selected.\\\\\\\"\\\\n\\\\n\\\\ttool state: #on.\\\\t\\\\\\\"keep current one, even if user balked on it\\\\\\\"\\\\n\\\\tcurrentBrush ifNotNil: [currentBrush state: #on].! !\\\\n\\\\n\\\\n!PaintBoxMorph methodsFor: '*eToys-e-toy support' stamp: 'sw 6/30/1999 20:33'!\\\\nisCandidateForAutomaticViewing\\\\n\\\\t^ false! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPaintBoxMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PaintBoxMorph class methodsFor: 'as yet unclassified' stamp: 'tk 8/21/2000 12:52'!\\\\nfixUpPrototype\\\\n\\\\t\\\\\\\"PaintBoxMorph fixUpPrototype\\\\\\\"\\\\nself error: 'who uses this?'.\\\\n\\\\tPrototype eventHandler: nil! !\\\\n\\\\n!PaintBoxMorph class methodsFor: 'as yet unclassified' stamp: 'ar 7/8/2006 20:33'!\\\\ninitializeColorChart\\\\n\\\\t\\\\\\\"PaintBoxMorph initializeColorChart\\\\\\\"\\\\n\\\\tColorChart _ (ColorPickerMorph colorPaletteForDepth: 32 extent: (360+10)@(180+10))! !\\\\n\\\\n!PaintBoxMorph class methodsFor: 'as yet unclassified' stamp: 'tk 10/12/97 11:01'!\\\\nprototype\\\\n\\\\t\\\\\\\"Later we will be a subclass of Model, and it will have a general version of this\\\\\\\"\\\\n\\\\t^ Prototype! !\\\\n\\\\n\\\\n!PaintBoxMorph class methodsFor: 'class initialization' stamp: 'tk 8/21/2000 12:58'!\\\\ninitialize\\\\n\\\\t\\\\\\\"PaintBoxMorph initialize\\\\\\\"\\\\n\\\\n\\\\tPrototype eventHandler: nil.\\\\n\\\\tPrototype focusMorph: nil.\\\\n\\\\tPrototype stampHolder clear.  \\\\\\\"clear stamps\\\\\\\"\\\\n\\\\tPrototype delete.  \\\\\\\"break link to world, if any\\\\\\\"\\\\n\\\\n\\\\tAllOnImage _ AllOffImage _ AllPressedImage _ nil.\\\\n\\\\tOriginalBounds _ nil.\\\\n\\\\n! !\\\\n\\\\n\\\\n!PaintBoxMorph class methodsFor: 'instance creation' stamp: 'bf 10/11/2004 13:37'!\\\\nnew\\\\n\\\\n\\\\t| pb button dualUse formCanvas rect |\\\\n\\\\tpb _ Prototype veryDeepCopy.\\\\n\\\\t\\\\t\\\\\\\"Assume that the PaintBox does not contain any scripted Players!!\\\\\\\"\\\\n\\\\tpb stampHolder normalize.\\\\t\\\\\\\"Get the stamps to show\\\\\\\"\\\\n\\\\t\\\\\\\"Get my own copies of the brushes so I can modify them\\\\\\\"\\\\n\\\\t#(brush1: brush2: brush3: brush4: brush5: brush6:) do: [:sel |\\\\n\\\\t\\\\tbutton _ pb submorphNamed: sel.\\\\n\\\\t\\\\tbutton offImage: button offImage deepCopy.\\\\n\\\\t\\\\tdualUse _ button onImage == button pressedImage.\\\\t\\\\\\\"sometimes shared\\\\\\\"\\\\n\\\\t\\\\tbutton onImage: button onImage deepCopy.\\\\n\\\\t\\\\tdualUse\\\\n\\\\t\\\\t\\\\tifTrue: [button pressedImage: button onImage]\\\\n\\\\t\\\\t\\\\tifFalse: [button pressedImage: button pressedImage deepCopy].\\\\n\\\\t\\\\t\\\\\\\"force color maps for later mapping\\\\\\\"\\\\n\\\\t\\\\tbutton offImage.\\\\n\\\\t\\\\tbutton onImage.\\\\n\\\\t\\\\tbutton pressedImage.\\\\n\\\\t\\\\tformCanvas _ button onImage getCanvas.\\\\n\\\\t\\\\tformCanvas _ formCanvas\\\\n\\\\t\\\\t\\\\tcopyOrigin: 0@0\\\\n\\\\t\\\\t\\\\tclipRect: (rect _ 0@0 extent: button onImage extent).\\\\n\\\\t\\\\t(#(brush1: brush3:) includes: sel) ifTrue: [\\\\n\\\\t\\\\t\\\\trect _ rect origin corner: rect corner - (2@2)].\\\\n\\\\t\\\\t(#brush2: == sel) ifTrue: [\\\\n\\\\t\\\\t\\\\trect _ rect origin corner: rect corner - (2@4)].\\\\n\\\\t\\\\tformCanvas frameAndFillRectangle: rect fillColor: Color transparent\\\\n\\\\t\\\\t\\\\tborderWidth: 2 borderColor: (Color r: 0.599 g: 0.8 b: 1.0).\\\\n\\\\t\\\\t].\\\\n\\\\tpb showColor.\\\\n\\\\tpb fixUpRecentColors.\\\\n\\\\tpb addLabels.\\\\n\\\\t^ pb! !\\\\n\\\\n\\\\n!PaintBoxMorph class methodsFor: 'notification' stamp: 'ar 7/8/2006 20:33'!\\\\nlocaleChanged\\\\n\\\\t| caption |\\\\n\\\\tcaption := ColorPickerMorph noColorCaption.\\\\n\\\\tcaption displayOn: ColorChart at: ColorChart boundingBox topCenter - (caption width // 2 @ 0)! !\\\\nImageMorph subclass: #PaintInvokingMorph\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-Widgets'!\\\\n!PaintInvokingMorph commentStamp: '<historical>' prior: 0!\\\\nWhen this is dropped inside some appropriate place, then painting is invoked for that place.!\\\\n\\\\n\\\\n!PaintInvokingMorph methodsFor: 'dropping/grabbing' stamp: 'dgd 4/3/2006 14:19'!\\\\njustDroppedInto: aPasteUpMorph event: anEvent\\\\n\\\\t\\\\\\\"This message is sent to a dropped morph after it has been dropped on--and been accepted by--a drop-sensitive morph\\\\\\\"\\\\n\\\\taPasteUpMorph isPartsBin ifFalse:[\\\\n\\\\t\\\\tself removeHalo.\\\\n\\\\t\\\\tself delete.\\\\n\\\\t\\\\t^aPasteUpMorph makeNewDrawing: anEvent].\\\\n\\\\t^super justDroppedInto: aPasteUpMorph event: anEvent! !\\\\n\\\\n!PaintInvokingMorph methodsFor: 'dropping/grabbing' stamp: 'ar 3/3/2001 20:40'!\\\\nwantsToBeDroppedInto: aMorph\\\\n\\\\t\\\\\\\"Only into PasteUps that are not part bins\\\\\\\"\\\\n\\\\t^aMorph isPlayfieldLike! !\\\\n\\\\n\\\\n!PaintInvokingMorph methodsFor: 'initialization' stamp: 'sw 7/16/1998 00:02'!\\\\ninitialize\\\\n\\\\tsuper initialize.\\\\n\\\\tself image: (ScriptingSystem formAtKey: 'Painting')! !\\\\n\\\\n\\\\n!PaintInvokingMorph methodsFor: 'parts bin' stamp: 'sw 8/12/2001 17:19'!\\\\ninitializeToStandAlone\\\\n\\\\tsuper initializeToStandAlone.\\\\n\\\\tself image: (ScriptingSystem formAtKey: 'Painting')! !\\\\n\\\\n\\\\n!PaintInvokingMorph methodsFor: '*eToys-e-toy support' stamp: 'sw 6/30/1999 20:31'!\\\\nisCandidateForAutomaticViewing\\\\n\\\\t^ self isPartsDonor not! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPaintInvokingMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PaintInvokingMorph class methodsFor: 'class initialization' stamp: 'asm 4/10/2003 13:16'!\\\\ninitialize\\\\n\\\\n\\\\tself registerInFlapsRegistry.! !\\\\n\\\\n!PaintInvokingMorph class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 10:09'!\\\\nregisterInFlapsRegistry\\\\n\\\\t\\\\\\\"Register the receiver in the system's flaps registry\\\\\\\"\\\\n\\\\tself environment\\\\n\\\\t\\\\tat: #Flaps\\\\n\\\\t\\\\tifPresent: [:cl | cl registerQuad: #(PaintInvokingMorph\\\\tnew\\\\t'Paint'\\\\t'Drop this into an area to start making a fresh painting there')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'PlugIn Supplies'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcl registerQuad: #(PaintInvokingMorph\\\\tnew\\\\t'Paint'\\\\t'Drop this into an area to start making a fresh painting there')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'Widgets'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcl registerQuad: #(PaintInvokingMorph\\\\tnew\\\\t'Paint'\\\\t'Drop this into an area to start making a fresh painting there')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'Scripting']! !\\\\n\\\\n!PaintInvokingMorph class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 12:38'!\\\\nunload\\\\n\\\\t\\\\\\\"Unload the receiver from global registries\\\\\\\"\\\\n\\\\n\\\\tself environment at: #Flaps ifPresent: [:cl |\\\\n\\\\tcl unregisterQuadsWithReceiver: self] ! !\\\\n\\\\n\\\\n!PaintInvokingMorph class methodsFor: 'parts bin' stamp: 'nk 8/23/2004 18:11'!\\\\ndescriptionForPartsBin\\\\n\\\\t^ self partName:\\\\t'Paint'\\\\n\\\\t\\\\tcategories:\\\\t\\\\t#('Basic' 'Graphics')\\\\n\\\\t\\\\tdocumentation:\\\\t'Drop this icon to start painting a new object.'! !\\\\n\\\\n\\\\n!PaintInvokingMorph class methodsFor: 'scripting' stamp: 'sw 5/6/2000 02:28'!\\\\nauthoringPrototype\\\\n\\\\t^ self new image: (ScriptingSystem formAtKey: 'Painting'); markAsPartsDonor; setBalloonText: 'drop this into any playfield or book page to make a new painting there'; yourself! !\\\\nCompositeStub subclass: #PanelStub\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'ToolBuilder-SUnit'!\\\\nDisplayText subclass: #Paragraph\\\\n\\\\tinstanceVariableNames: 'clippingRectangle compositionRectangle destinationForm rule mask marginTabsLevel lines lastLine'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: 'TextConstants'\\\\n\\\\tcategory: 'ST80-Support'!\\\\n!Paragraph commentStamp: '<historical>' prior: 0!\\\\nI represent displayable text that has been decoraged with margin alignment, line leading, and tab settings.!\\\\n\\\\n\\\\n!Paragraph methodsFor: 'accessing'!\\\\nbackgroundColor\\\\n\\\\tbackColor == nil ifTrue: [^ Color white].\\\\n\\\\t^ backColor! !\\\\n\\\\n!Paragraph methodsFor: 'accessing'!\\\\nclippingRectangle \\\\n\\\\t\\\\\\\"Answer the rectangle, defined in absolute coordinates, whose \\\\n\\\\tintersection with the destinationForm is the area in which the characters \\\\n\\\\tare constrained to display.\\\\\\\"\\\\n\\\\n\\\\t^clippingRectangle! !\\\\n\\\\n!Paragraph methodsFor: 'accessing' stamp: 'di 10/5/97 15:33'!\\\\nclippingRectangle: clipRect \\\\n\\\\tclippingRectangle _ clipRect! !\\\\n\\\\n!Paragraph methodsFor: 'accessing'!\\\\ncompositionRectangle\\\\n\\\\t\\\\\\\"Answer the rectangle whose width is the dimension, modified by \\\\n\\\\tindents and tabsLevels, against which line wraparound is measured. The \\\\n\\\\theight of the compositionRectangle is reset each time recomposition is \\\\n\\\\trequired.\\\\\\\"\\\\n\\\\n\\\\t^compositionRectangle! !\\\\n\\\\n!Paragraph methodsFor: 'accessing'!\\\\ncompositionRectangle: compRectangle \\\\n\\\\t\\\\\\\"Set the rectangle whose width is the dimension, modified by indents and \\\\n\\\\ttabsLevels, against which line wraparound is measured.\\\\\\\"\\\\n\\\\n\\\\tcompositionRectangle _ compRectangle.\\\\n\\\\tself composeAll! !\\\\n\\\\n!Paragraph methodsFor: 'accessing'!\\\\ndestinationForm \\\\n\\\\t \\\\\\\"Answer the Form into which the characters are scanned.\\\\\\\"\\\\n\\\\n\\\\t^destinationForm! !\\\\n\\\\n!Paragraph methodsFor: 'accessing'!\\\\nfillColor \\\\n\\\\t\\\\\\\"Answer the Form with which each character is combined by the scanner \\\\n\\\\tbefore applying the rule for display.\\\\\\\"\\\\n\\\\n\\\\t^mask! !\\\\n\\\\n!Paragraph methodsFor: 'accessing'!\\\\nfillColor: maskForm \\\\n\\\\t\\\\\\\"Set the argument, maskForm, to be the form with which each character \\\\n\\\\tis combined by the scanner before applying the rule for display.\\\\\\\"\\\\n\\\\n\\\\tmask _ maskForm! !\\\\n\\\\n!Paragraph methodsFor: 'accessing'!\\\\nheight \\\\n\\\\t\\\\\\\"Answer the height of the composition rectangle.\\\\\\\"\\\\n\\\\n\\\\t^compositionRectangle height! !\\\\n\\\\n!Paragraph methodsFor: 'accessing'!\\\\nindentationOfLineIndex: lineIndex ifBlank: aBlock\\\\n\\\\t\\\\\\\"Answer the number of leading tabs in the line at lineIndex.  If there are\\\\n\\\\t no visible characters, pass the number of tabs to aBlock and return its value.\\\\n\\\\t If the line is word-wrap overflow, back up a line and recur.\\\\\\\"\\\\n\\\\n\\\\t| arrayIndex first last reader leadingTabs lastSeparator cr tab ch |\\\\n\\\\tcr _ Character cr.\\\\n\\\\ttab _ Character tab.\\\\n\\\\tarrayIndex _ lineIndex.\\\\n\\\\t[first _ (lines at: arrayIndex) first.\\\\n\\\\t first > 1 and: [(text string at: first - 1) ~~ cr]] whileTrue: \\\\\\\"word wrap\\\\\\\"\\\\n\\\\t\\\\t[arrayIndex _ arrayIndex - 1].\\\\n\\\\tlast _ (lines at: lastLine) last.\\\\n\\\\treader _ ReadStream on: text string from: first to: last.\\\\n\\\\tleadingTabs _ 0.\\\\n\\\\t[reader atEnd not and: [(ch _ reader next) == tab]]\\\\n\\\\t\\\\twhileTrue: [leadingTabs _ leadingTabs + 1].\\\\n\\\\tlastSeparator _ first - 1 + leadingTabs.\\\\n\\\\t[reader atEnd not and: [ch isSeparator and: [ch ~~ cr]]]\\\\n\\\\t\\\\twhileTrue: [lastSeparator _ lastSeparator + 1. ch _ reader next].\\\\n\\\\tlastSeparator = last | (ch == cr)\\\\n\\\\t\\\\tifTrue: [^aBlock value: leadingTabs].\\\\n\\\\t^leadingTabs! !\\\\n\\\\n!Paragraph methodsFor: 'accessing'!\\\\nmask \\\\n\\\\t\\\\\\\"Answer the Form with which each character is combined by the scanner \\\\n\\\\tbefore applying the rule for display.\\\\\\\"\\\\n\\\\n\\\\t^mask! !\\\\n\\\\n!Paragraph methodsFor: 'accessing'!\\\\nnumberOfLines \\\\n\\\\t\\\\\\\"Answer the number of lines of text in the receiver.\\\\\\\"\\\\n\\\\n\\\\t^lastLine! !\\\\n\\\\n!Paragraph methodsFor: 'accessing' stamp: 'ar 5/18/2000 18:34'!\\\\nreplaceFrom: start to: stop with: aText displaying: displayBoolean\\\\n\\\\t\\\\\\\"Replace the receiver's text starting at position start, stopping at stop, by \\\\n\\\\tthe characters in aText. It is expected that most requirements for \\\\n\\\\tmodifications to the receiver will call this code. Certainly all cut's or \\\\n\\\\tpaste's.\\\\\\\" \\\\n\\\\n\\\\t| compositionScanner obsoleteLines obsoleteLastLine firstLineIndex lastLineIndex\\\\n\\\\tstartLine stopLine replacementRange visibleRectangle startIndex newLine done\\\\n\\\\tnewStop obsoleteY newY moveRectangle |\\\\n\\\\n\\\\ttext replaceFrom: start to: stop with: aText.\\\\t\\\\t\\\\\\\"Update the text.\\\\\\\"\\\\n\\\\tlastLine = 0 ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"if lines have never been set up, measure them and display\\\\n\\\\t\\\\tall the lines falling in the visibleRectangle\\\\\\\"\\\\n\\\\t\\\\tself composeAll.\\\\n\\\\t\\\\tdisplayBoolean ifTrue: [^ self displayLines: (1 to: lastLine)]].\\\\n\\\\n\\\\t\\\\\\\"save -- things get pretty mashed as we go along\\\\\\\"\\\\n\\\\tobsoleteLines _ lines copy.\\\\n\\\\tobsoleteLastLine _ lastLine.\\\\n\\\\n\\\\t\\\\\\\"find the starting and stopping lines\\\\\\\"\\\\n\\\\tfirstLineIndex _ startLine _ self lineIndexOfCharacterIndex: start.\\\\n\\\\tstopLine _ self lineIndexOfCharacterIndex: stop.\\\\n\\\\n\\\\t\\\\\\\"how many characters being inserted or deleted\\\\n\\\\t\\\\t-- negative if aText size is < characterInterval size.\\\\\\\"\\\\n\\\\treplacementRange _ aText size - (stop - start + 1).\\\\n\\\\t\\\\\\\"Give ourselves plenty of elbow room.\\\\\\\"\\\\n\\\\tcompositionRectangle _ compositionRectangle withHeight: (textStyle lineGrid * 9999).\\\\n\\\\t\\\\\\\"build a boundingBox of the actual screen space in question -- we'll need it later\\\\\\\"\\\\n\\\\tvisibleRectangle _ (clippingRectangle intersect: compositionRectangle)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: destinationForm boundingBox.\\\\n\\\\tcompositionScanner _ CompositionScanner new forParagraph: self.\\\\t\\\\t\\\\\\\"Initialize a scanner.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"If the starting line is not also the first line, then measuring must commence from line preceding the one in which characterInterval start appears.  For example, deleting a line with only a carriage return may move characters following the deleted portion of text into the line preceding the deleted line.\\\\\\\"\\\\n\\\\tstartIndex _ (lines at: firstLineIndex) first.\\\\n\\\\tstartLine > 1\\\\n\\\\t\\\\tifTrue: \\\\t[newLine _ compositionScanner composeLine: startLine - 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfromCharacterIndex: (lines at: startLine - 1) first\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinParagraph: self.\\\\n\\\\t\\\\t\\\\t\\\\t(lines at: startLine - 1) = newLine\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse:\\\\t[\\\\\\\"start in line preceding the one with the starting character\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartLine _ startLine - 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself lineAt: startLine put: newLine.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartIndex _ newLine last + 1]].\\\\n\\\\tstartIndex > text size ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"nil lines after a deletion -- remeasure last line below\\\\\\\"\\\\n\\\\t\\\\tself trimLinesTo: (firstLineIndex - 1 max: 0).\\\\n\\\\t\\\\ttext size = 0 ifTrue:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"entire text deleted -- clear visibleRectangle and return.\\\\\\\"\\\\n\\\\t\\\\t\\\\tdisplayBoolean ifTrue: [destinationForm fill: visibleRectangle rule: rule fillColor: self backgroundColor].\\\\n\\\\t\\\\t\\\\tself updateCompositionHeight.\\\\n\\\\t\\\\t\\\\t^self]].\\\\n\\\\n\\\\t\\\\\\\"Now we really get to it.\\\\\\\"\\\\n\\\\tdone _ false.\\\\n\\\\tlastLineIndex _ stopLine.\\\\n\\\\t[done or: [startIndex > text size]]\\\\n\\\\t\\\\twhileFalse: \\\\n\\\\t\\\\t[self lineAt: firstLineIndex put:\\\\n\\\\t\\\\t\\\\t(newLine _ compositionScanner composeLine: firstLineIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfromCharacterIndex: startIndex inParagraph: self).\\\\n\\\\t\\\\t[(lastLineIndex > obsoleteLastLine\\\\n\\\\t\\\\t\\\\tor: [\\\\\\\"no more old lines to compare with?\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tnewLine last <\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(newStop _ (obsoleteLines at: lastLineIndex) last + replacementRange)])\\\\n\\\\t\\\\t\\\\t  \\\\tor: [done]]\\\\n\\\\t\\\\t\\\\twhileFalse: \\\\n\\\\t\\\\t\\\\t[newStop = newLine last\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\t[\\\\\\\"got the match\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"get source and dest y's for moving the unchanged lines\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tobsoleteY _ self topAtLineIndex: lastLineIndex + 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tusing: obsoleteLines and: obsoleteLastLine.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnewY _ self topAtLineIndex: firstLineIndex + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstopLine _ firstLineIndex.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdone _ true.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Fill in the new line vector with the old unchanged lines.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tUpdate their starting and stopping indices on the way.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t((lastLineIndex _ lastLineIndex + 1) to: obsoleteLastLine) do:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:upDatedIndex | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself lineAt: (firstLineIndex _ firstLineIndex + 1) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tput: ((obsoleteLines at: upDatedIndex)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t  \\\\t\\\\tslide: replacementRange)].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"trim off obsolete lines, if any\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself trimLinesTo: firstLineIndex]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\t[lastLineIndex _ lastLineIndex + 1]].\\\\n\\\\t\\\\tstartIndex _ newLine last + 1.\\\\n\\\\t\\\\tfirstLineIndex _ firstLineIndex + 1].\\\\n\\\\n\\\\t\\\\\\\"Now the lines are up to date -- Whew!!.  What remains is to move\\\\n\\\\tthe 'unchanged' lines and display those which have changed.\\\\\\\"\\\\n\\\\tdisplayBoolean   \\\\\\\"Not much to do if not displaying\\\\\\\"\\\\n\\\\t\\\\tifFalse: [^ self updateCompositionHeight].\\\\n\\\\tstartIndex > text size ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"If at the end of previous lines simply display lines from the line in\\\\n\\\\t\\\\twhich the first character of the replacement occured through the\\\\n\\\\t\\\\tend of the paragraph.\\\\\\\"\\\\n\\\\t\\\\tself updateCompositionHeight.\\\\n\\\\t\\\\tself displayLines:\\\\n\\\\t\\\\t\\\\t(startLine to: (stopLine _ firstLineIndex min: lastLine)).\\\\n\\\\t\\\\tdestinationForm  \\\\\\\"Clear out area at the bottom\\\\\\\"\\\\n\\\\t\\\\t\\\\tfill: ((visibleRectangle left @ (self topAtLineIndex: lastLine + 1)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\textent: visibleRectangle extent)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle)\\\\n\\\\t\\\\t\\\\trule: rule fillColor: self backgroundColor]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t[newY ~= obsoleteY ifTrue:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"Otherwise first move the unchanged lines within\\\\n\\\\t\\\\t\\\\tthe visibleRectangle with a good old bitblt.\\\\\\\"\\\\n\\\\t\\\\t\\\\tmoveRectangle _\\\\n\\\\t\\\\t\\\\t\\\\tvisibleRectangle left @ (obsoleteY max: visibleRectangle top)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcorner: visibleRectangle corner.\\\\n\\\\t\\\\t\\\\tdestinationForm copyBits: moveRectangle from: destinationForm\\\\n\\\\t\\\\t\\\\t\\\\tat: moveRectangle origin + (0 @ (newY-obsoleteY))\\\\n\\\\t\\\\t\\\\t\\\\tclippingBox: visibleRectangle\\\\n\\\\t\\\\t\\\\t\\\\trule: Form over fillColor: nil].\\\\n\\\\n\\\\t\\\\t\\\\\\\"Then display the altered lines.\\\\\\\"\\\\n\\\\t\\\\tself displayLines: (startLine to: stopLine).\\\\n\\\\n\\\\t\\\\tnewY < obsoleteY\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[(self topAtLineIndex: obsoleteLastLine+1 using: obsoleteLines and: obsoleteLastLine) > visibleRectangle bottom\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[\\\\\\\"A deletion may have 'pulled' previously undisplayed lines\\\\n\\\\t\\\\t\\\\t\\\\tinto the visibleRectangle.  If so, display them.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tself displayLines:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t((self lineIndexOfTop: visibleRectangle bottom - (obsoleteY - newY))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tto: (self lineIndexOfTop: visibleRectangle bottom))].\\\\n\\\\t\\\\t\\\\t\\\\\\\"Clear out obsolete material at the bottom of the visibleRectangle.\\\\\\\"\\\\n\\\\t\\\\t\\\\tdestinationForm\\\\n\\\\t\\\\t\\\\t\\\\tfill: ((visibleRectangle left @ ((self bottomAtLineIndex: lastLine) + 1)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\textent: visibleRectangle extent)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle)  \\\\\\\"How about just corner: ??\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\trule: rule fillColor: self backgroundColor].\\\\n\\\\n\\\\t\\\\t(newY > obsoleteY and: [obsoleteY < visibleRectangle top])\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[\\\\\\\"An insertion may have 'pushed' previously undisplayed lines\\\\n\\\\t\\\\t\\\\t\\\\tinto the visibleRectangle.  If so, display them.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tself displayLines:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t((self lineIndexOfTop: visibleRectangle top)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tto: (self lineIndexOfTop: visibleRectangle top + (newY-obsoleteY)))].\\\\n\\\\n\\\\t\\\\tself updateCompositionHeight]! !\\\\n\\\\n!Paragraph methodsFor: 'accessing'!\\\\nrule \\\\n\\\\t\\\\\\\"Answer the rule according to which character display behaves. For \\\\n\\\\texample, rule may equal over, under, reverse.\\\\\\\"\\\\n\\\\n\\\\t^rule! !\\\\n\\\\n!Paragraph methodsFor: 'accessing'!\\\\nrule: ruleInteger \\\\n\\\\t\\\\\\\"Set the rule according to which character display behaves.\\\\\\\"\\\\n\\\\n\\\\trule _ ruleInteger! !\\\\n\\\\n!Paragraph methodsFor: 'accessing' stamp: 'sw 10/29/1999 18:11'!\\\\nstringAtLineNumber: aNumber\\\\n\\\\t(aNumber > lastLine or: [aNumber < 1]) ifTrue: [^ nil].\\\\n\\\\t^ (text string copyFrom: (lines at: aNumber) first to: (lines at: aNumber) last) copyWithout: Character cr! !\\\\n\\\\n!Paragraph methodsFor: 'accessing'!\\\\ntext: aText \\\\n\\\\t\\\\\\\"Set the argument, aText, to be the text for the receiver.\\\\\\\"\\\\n\\\\n\\\\ttext _ aText.\\\\n\\\\tself composeAll! !\\\\n\\\\n\\\\n!Paragraph methodsFor: 'alignment'!\\\\ncentered \\\\n\\\\t\\\\\\\"Set the alignment for the style with which the receiver displays its text \\\\n\\\\tso that text is centered in the composition rectangle.\\\\\\\"\\\\n\\\\n\\\\ttextStyle alignment: Centered! !\\\\n\\\\n!Paragraph methodsFor: 'alignment'!\\\\njustified \\\\n\\\\t\\\\\\\"Set the alignment for the style with which the receiver displays its text \\\\n\\\\tso that the characters in each of text end on an even border in the \\\\n\\\\tcomposition rectangle.\\\\\\\"\\\\n\\\\n\\\\ttextStyle alignment: Justified! !\\\\n\\\\n!Paragraph methodsFor: 'alignment'!\\\\nleftFlush \\\\n\\\\t\\\\\\\"Set the alignment for the style with which the receiver displays its text \\\\n\\\\tso that the characters in each of text begin on an even border in the \\\\n\\\\tcomposition rectangle. This is also known as ragged-right.\\\\\\\"\\\\n\\\\n\\\\ttextStyle alignment: LeftFlush! !\\\\n\\\\n!Paragraph methodsFor: 'alignment'!\\\\nrightFlush \\\\n\\\\t\\\\\\\"Set the alignment for the style with which the receiver displays its text \\\\n\\\\tso that the characters in each of text end on an even border in the \\\\n\\\\tcomposition rectangle but the beginning of each line does not. This is \\\\n\\\\talso known as ragged-left.\\\\\\\"\\\\n\\\\n\\\\ttextStyle alignment: RightFlush! !\\\\n\\\\n!Paragraph methodsFor: 'alignment'!\\\\ntoggleAlignment \\\\n\\\\t\\\\\\\"Set the alignment for the style with which the receiver displays its text \\\\n\\\\tso that it moves from centered to justified to leftFlush to rightFlush and \\\\n\\\\tback to centered again.\\\\\\\"\\\\n\\\\n\\\\ttextStyle alignment: textStyle alignment + 1! !\\\\n\\\\n\\\\n!Paragraph methodsFor: 'character location' stamp: 'ar 5/18/2000 18:33'!\\\\ncharacterBlockAtPoint: aPoint \\\\n\\\\t\\\\\\\"Answer a CharacterBlock for characters in the text at point aPoint. It is \\\\n\\\\tassumed that aPoint has been transformed into coordinates appropriate to \\\\n\\\\tthe receiver's destinationForm rectangle and the compositionRectangle.\\\\\\\"\\\\n\\\\n\\\\t^CharacterBlockScanner new characterBlockAtPoint: aPoint in: self! !\\\\n\\\\n!Paragraph methodsFor: 'character location' stamp: 'ar 5/18/2000 18:33'!\\\\ncharacterBlockForIndex: targetIndex \\\\n\\\\t\\\\\\\"Answer a CharacterBlock for character in the text at targetIndex. The \\\\n\\\\tcoordinates in the CharacterBlock will be appropriate to the intersection \\\\n\\\\tof the destinationForm rectangle and the compositionRectangle.\\\\\\\"\\\\n\\\\n\\\\t^CharacterBlockScanner new characterBlockForIndex: targetIndex in: self! !\\\\n\\\\n!Paragraph methodsFor: 'character location' stamp: 'di 10/5/1998 12:59'!\\\\ndefaultCharacterBlock\\\\n\\\\t^ CharacterBlock new stringIndex: 1 text: text\\\\n\\\\t\\\\t\\\\ttopLeft: compositionRectangle topLeft extent: 0 @ 0! !\\\\n\\\\n\\\\n!Paragraph methodsFor: 'composition' stamp: 'yo 1/23/2003 22:47'!\\\\ncomposeAll\\\\n\\\\t\\\\\\\"Compose a collection of characters into a collection of lines.\\\\\\\"\\\\n\\\\n\\\\t| startIndex stopIndex lineIndex maximumRightX compositionScanner |\\\\n\\\\tlines _ Array new: 32.\\\\n\\\\tlastLine _ 0.\\\\n\\\\tmaximumRightX _ 0.\\\\n\\\\ttext size = 0\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[compositionRectangle _ compositionRectangle withHeight: 0.\\\\n\\\\t\\\\t\\\\t^maximumRightX].\\\\n\\\\tstartIndex _ lineIndex _ 1.\\\\n\\\\tstopIndex _ text size.\\\\n\\\\tcompositionScanner _ MultiCompositionScanner new forParagraph: self.\\\\n\\\\t[startIndex > stopIndex] whileFalse: \\\\n\\\\t\\\\t[self lineAt: lineIndex \\\\n\\\\t\\\\t\\\\t\\\\tput: (compositionScanner composeLine: lineIndex \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfromCharacterIndex: startIndex \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinParagraph: self).\\\\n\\\\t\\\\t maximumRightX _ compositionScanner rightX max: maximumRightX.\\\\n\\\\t\\\\t startIndex _ (lines at: lineIndex) last + 1.\\\\n\\\\t\\\\t lineIndex _ lineIndex + 1].\\\\n\\\\tself updateCompositionHeight.\\\\n\\\\tself trimLinesTo: lineIndex - 1.\\\\n\\\\t^ maximumRightX! !\\\\n\\\\n!Paragraph methodsFor: 'composition'!\\\\nwrappingBox: compositionRect clippingBox: clippingRect \\\\n\\\\t\\\\\\\"Set the composition rectangle for the receiver so that the lines wrap \\\\n\\\\twithin the rectangle, compositionRect, and the display of the text is \\\\n\\\\tclipped by the rectangle, clippingRect.\\\\\\\"\\\\n\\\\n\\\\tself compositionRectangle: compositionRect copy\\\\n\\\\t\\\\t\\\\t\\\\ttext: text\\\\n\\\\t\\\\t\\\\t\\\\tstyle: textStyle\\\\n\\\\t\\\\t\\\\t\\\\toffset: offset.\\\\n\\\\tclippingRectangle _ clippingRect copy! !\\\\n\\\\n\\\\n!Paragraph methodsFor: 'converting' stamp: 'yo 6/23/2003 19:05'!\\\\nasForm\\\\n\\\\t\\\\\\\"Answer a Form made up of the bits that represent the receiver's displayable text.\\\\\\\"\\\\n\\\\t| theForm oldBackColor oldForeColor |\\\\n\\\\ttextStyle isTTCStyle ifTrue: [\\\\n\\\\t\\\\ttheForm _  (Form extent: compositionRectangle extent depth: 32)\\\\n\\\\t\\\\toffset: offset.\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\ttheForm _ (ColorForm extent: compositionRectangle extent)\\\\n\\\\t\\\\t\\\\toffset: offset;\\\\n\\\\t\\\\t\\\\tcolors: (Array\\\\n\\\\t\\\\t\\\\t\\\\twith: (backColor == nil ifTrue: [Color transparent] ifFalse: [backColor])\\\\n\\\\t\\\\t\\\\t\\\\twith: (foreColor == nil ifTrue: [Color black] ifFalse: [foreColor])).\\\\n\\\\t].\\\\n\\\\toldBackColor _ backColor.\\\\n\\\\toldForeColor _ foreColor.\\\\n\\\\tbackColor _ Color white.\\\\n\\\\tforeColor _ Color black.\\\\n\\\\tself displayOn: theForm\\\\n\\\\t\\\\tat: 0@0\\\\n\\\\t\\\\tclippingBox: theForm boundingBox\\\\n\\\\t\\\\trule: Form over\\\\n\\\\t\\\\tfillColor: nil.\\\\n\\\\tbackColor _ oldBackColor.\\\\n\\\\tforeColor _ oldForeColor.\\\\n\\\\t^ theForm\\\\n\\\\n\\\\\\\"Example:\\\\n| p |\\\\np _ 'Abc' asParagraph.\\\\np foregroundColor: Color red backgroundColor: Color black.\\\\np asForm displayOn: Display at: 30@30 rule: Form over\\\\\\\"\\\\n! !\\\\n\\\\n!Paragraph methodsFor: 'converting'!\\\\nasString\\\\n\\\\t\\\\\\\"Answer the string of characters of the receiver's text.\\\\\\\"\\\\n\\\\n\\\\t^text string! !\\\\n\\\\n!Paragraph methodsFor: 'converting'!\\\\nasText\\\\n\\\\t\\\\\\\"Answer the receiver's text.\\\\\\\"\\\\n\\\\n\\\\t^text! !\\\\n\\\\n\\\\n!Paragraph methodsFor: 'display box access'!\\\\nboundingBox\\\\n\\\\n\\\\t^offset extent: compositionRectangle extent! !\\\\n\\\\n!Paragraph methodsFor: 'display box access'!\\\\ncomputeBoundingBox\\\\n\\\\n\\\\t^offset extent: compositionRectangle extent! !\\\\n\\\\n\\\\n!Paragraph methodsFor: 'displaying'!\\\\ndisplayOn: aDisplayMedium\\\\n\\\\t\\\\\\\"Because Paragraphs cache so much information, computation is avoided\\\\n\\\\tand displayAt: 0@0 is not appropriate here.\\\\\\\"\\\\n\\\\n\\\\tself displayOn: aDisplayMedium\\\\n\\\\t\\\\tat: compositionRectangle topLeft\\\\n\\\\t\\\\tclippingBox: clippingRectangle\\\\n\\\\t\\\\trule: rule\\\\n\\\\t\\\\tfillColor: mask! !\\\\n\\\\n!Paragraph methodsFor: 'displaying'!\\\\ndisplayOn: aDisplayMedium at: aPoint\\\\n\\\\t\\\\\\\"Use internal clippingRect; destination cliping is done during actual display.\\\\\\\"\\\\n\\\\n\\\\tself displayOn: aDisplayMedium at: aPoint\\\\n\\\\t\\\\tclippingBox: (clippingRectangle translateBy: aPoint - compositionRectangle topLeft)\\\\n\\\\t\\\\trule: rule fillColor: mask! !\\\\n\\\\n!Paragraph methodsFor: 'displaying'!\\\\ndisplayOn: aDisplayMedium at: aDisplayPoint clippingBox: clipRectangle rule: ruleInteger fillColor: aForm\\\\n\\\\t\\\\\\\"Default display message when aDisplayPoint is in absolute screen\\\\n\\\\tcoordinates.\\\\\\\"\\\\n\\\\n\\\\trule _ ruleInteger.\\\\n\\\\tmask _ aForm.\\\\n\\\\tclippingRectangle _ clipRectangle.\\\\n\\\\tcompositionRectangle _ aDisplayPoint extent: compositionRectangle extent.\\\\n\\\\t(lastLine == nil or: [lastLine < 1]) ifTrue: [self composeAll].\\\\n\\\\tself displayOn: aDisplayMedium lines: (1 to: lastLine)! !\\\\n\\\\n!Paragraph methodsFor: 'displaying'!\\\\ndisplayOn: aDisplayMedium transformation: displayTransformation clippingBox: clipRectangle align: alignmentPoint with: relativePoint rule: ruleInteger fillColor: aForm \\\\n\\\\n\\\\tself\\\\t\\\\t\\\\t\\\\t\\\\\\\"Assumes offset has been set!!!!!!!!!!\\\\\\\"\\\\n\\\\t  displayOn: aDisplayMedium\\\\n\\\\t  at: (offset \\\\n\\\\t\\\\t\\\\t+ (displayTransformation applyTo: relativePoint) \\\\n\\\\t\\\\t\\\\t- alignmentPoint) rounded\\\\n\\\\t  clippingBox: clipRectangle\\\\n\\\\t  rule: ruleInteger\\\\n\\\\t  fillColor: aForm.\\\\n\\\\t! !\\\\n\\\\n\\\\n!Paragraph methodsFor: 'indicating'!\\\\nflash \\\\n\\\\t\\\\\\\"Complement twice the visible area in which the receiver displays.\\\\\\\"\\\\n\\\\n\\\\tDisplay flash: clippingRectangle! !\\\\n\\\\n!Paragraph methodsFor: 'indicating'!\\\\noutline \\\\n\\\\t\\\\\\\"Display a border around the visible area in which the receiver presents \\\\n\\\\tits text.\\\\\\\"\\\\n\\\\n\\\\tclippingRectangle bottom <= compositionRectangle bottom\\\\n\\\\t  ifTrue: [Display \\\\n\\\\t\\\\t\\\\t\\\\tborder: (clippingRectangle intersect: compositionRectangle) \\\\n\\\\t\\\\t\\\\t\\\\twidth: 2]\\\\n\\\\t  ifFalse: [Display \\\\n\\\\t\\\\t\\\\t\\\\tborder: (clippingRectangle intersect: destinationForm boundingBox)\\\\n\\\\t\\\\t\\\\t\\\\twidth: 2].\\\\n\\\\t! !\\\\n\\\\n\\\\n!Paragraph methodsFor: 'scrolling'!\\\\nscrollBy: heightToMove \\\\n\\\\t^ self scrollBy: heightToMove withSelectionFrom: nil to: nil! !\\\\n\\\\n!Paragraph methodsFor: 'scrolling' stamp: 'hmm 9/16/2000 21:30'!\\\\nscrollBy: heightToMove withSelectionFrom: startBlock to: stopBlock \\\\n\\\\t\\\\\\\"Translate the composition rectangle up (dy<0) by heightToMove.\\\\n\\\\tRepainting text as necessary, and selection if blocks not nil.\\\\n\\\\tReturn true unless scrolling limits have been reached.\\\\\\\"\\\\n\\\\t| max min amount |\\\\n\\\\tmax _ 0 max: \\\\\\\"cant scroll up more than dist to (top of) bottom line\\\\\\\"\\\\n\\\\t\\\\tcompositionRectangle bottom - textStyle lineGrid - clippingRectangle top.\\\\n\\\\tmin _ 0 min: \\\\\\\"cant scroll down more than top is above clipRect\\\\\\\"\\\\n\\\\t\\\\tcompositionRectangle top - clippingRectangle top.\\\\n\\\\tamount _ ((heightToMove truncateTo: textStyle lineGrid) min: max) max: min.\\\\n\\\\tamount ~= 0\\\\n\\\\t\\\\tifTrue: [destinationForm deferUpdatesIn: clippingRectangle while: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself scrollUncheckedBy: amount\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twithSelectionFrom: startBlock to: stopBlock].\\\\n\\\\t\\\\t\\\\t\\\\t^ true]\\\\n\\\\t\\\\tifFalse: [^ false]! !\\\\n\\\\n!Paragraph methodsFor: 'scrolling'!\\\\nscrollDelta\\\\n\\\\t\\\\\\\"By comparing this before and after, you know if scrolling happened\\\\\\\"\\\\n\\\\t^ clippingRectangle top - compositionRectangle top! !\\\\n\\\\n!Paragraph methodsFor: 'scrolling'!\\\\nscrollUncheckedBy: heightToMove withSelectionFrom: startBlock to: stopBlock \\\\n\\\\t\\\\\\\"Scroll by the given amount.  Copy bits where possible, display the rest.\\\\n\\\\tIf selection blocks are not nil, then select the newly visible text as well.\\\\\\\"\\\\n\\\\t| savedClippingRectangle delta |\\\\n\\\\tdelta _ 0 @ (0 - heightToMove).\\\\n\\\\tcompositionRectangle _ compositionRectangle translateBy: delta.\\\\n\\\\tstartBlock == nil ifFalse:\\\\n\\\\t\\\\t[startBlock moveBy: delta.\\\\n\\\\t\\\\tstopBlock moveBy: delta].\\\\n\\\\tsavedClippingRectangle _ clippingRectangle.\\\\n\\\\tclippingRectangle _ clippingRectangle intersect: Display boundingBox.\\\\n\\\\theightToMove abs >= clippingRectangle height\\\\n\\\\t  ifTrue: \\\\n\\\\t\\\\t[\\\\\\\"Entire visible region must be repainted\\\\\\\"\\\\n\\\\t\\\\tself displayLines: (1 to: lastLine) affectedRectangle: clippingRectangle]\\\\n\\\\t  ifFalse:\\\\n\\\\t\\\\t[\\\\\\\"Copy bits where possible / display the rest\\\\\\\"\\\\n\\\\t\\\\tdestinationForm\\\\n\\\\t\\\\t\\\\tcopyBits: clippingRectangle from: destinationForm\\\\n\\\\t\\\\t\\\\tat: clippingRectangle topLeft + delta\\\\n\\\\t\\\\t\\\\tclippingBox: clippingRectangle\\\\n\\\\t\\\\t\\\\trule: Form over fillColor: nil.\\\\n\\\\t\\\\t\\\\\\\"Set clippingRectangle to 'vacated' area for lines 'pulled' into view.\\\\\\\"\\\\n\\\\t\\\\tclippingRectangle _ heightToMove < 0\\\\n\\\\t\\\\t\\\\tifTrue:  \\\\\\\"On the top\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t[clippingRectangle topLeft corner: clippingRectangle topRight + delta]\\\\n\\\\t\\\\t\\\\tifFalse:  \\\\\\\"At the bottom\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t[clippingRectangle bottomLeft + delta corner: clippingRectangle bottomRight].\\\\n\\\\t\\\\tself displayLines: (1 to: lastLine)   \\\\\\\"Refresh vacated region\\\\\\\"\\\\n\\\\t\\\\t\\\\taffectedRectangle: clippingRectangle].\\\\n\\\\tstartBlock == nil ifFalse:\\\\n\\\\t\\\\t[self reverseFrom: startBlock to: stopBlock].\\\\n\\\\t\\\\\\\"And restore the clippingRectangle to its original value. \\\\\\\"\\\\n\\\\tclippingRectangle _ savedClippingRectangle! !\\\\n\\\\n\\\\n!Paragraph methodsFor: 'selecting' stamp: 'ar 5/28/2000 12:10'!\\\\ncaretFormForDepth: depth\\\\n\\\\t\\\\\\\"Return a caret form for the given depth.\\\\\\\"\\\\n\\\\t\\\\\\\"(Paragraph new caretFormForDepth: Display depth) displayOn: Display at: 0@0 rule: Form reverse\\\\\\\"\\\\n\\\\n\\\\t| box f bb map |\\\\n\\\\tbox _ CaretForm boundingBox.\\\\n\\\\tf _ Form extent: box extent depth: depth.\\\\n\\\\tmap _ (Color cachedColormapFrom: CaretForm depth to: depth) copy.\\\\n\\\\tmap at: 1 put: (Color transparent pixelValueForDepth: depth).\\\\n\\\\tmap at: 2 put: (Color quickHighLight: depth) first.  \\\\\\\"pixel value for reversing\\\\\\\"\\\\n\\\\tbb _ BitBlt current toForm: f.\\\\n\\\\tbb\\\\n\\\\t\\\\tsourceForm: CaretForm;\\\\n\\\\t\\\\tsourceRect: box;\\\\n\\\\t\\\\tdestOrigin: 0@0;\\\\n\\\\t\\\\tcolorMap: map;\\\\n \\\\t\\\\tcombinationRule: Form over;\\\\n\\\\t\\\\tcopyBits.\\\\n\\\\t^ f! !\\\\n\\\\n!Paragraph methodsFor: 'selecting' stamp: 'dvf 10/1/2003 13:28'!\\\\nclickAt: clickPoint for: model controller: aController\\\\n\\\\t\\\\\\\"Give sensitive text a chance to fire.  Display flash: (100@100 extent: 100@100).\\\\\\\"\\\\n\\\\t| startBlock action range box boxes |\\\\n\\\\taction _ false.\\\\n\\\\tstartBlock _ self characterBlockAtPoint: clickPoint.\\\\n\\\\t(text attributesAt: startBlock stringIndex forStyle: textStyle) \\\\n\\\\t\\\\tdo: [:att | att mayActOnClick ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[range _ text rangeOf: att startingAt: startBlock stringIndex.\\\\n\\\\t\\\\t\\\\t\\\\tboxes _ self selectionRectsFrom: (self characterBlockForIndex: range first) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tto: (self characterBlockForIndex: range last+1).\\\\n\\\\t\\\\t\\\\t\\\\tbox _ boxes detect: [:each | each containsPoint: clickPoint]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifNone: [^ action].\\\\n\\\\t\\\\t\\\\t\\\\tUtilities awaitMouseUpIn: box repeating: []\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifSucceed: [aController terminateAndInitializeAround:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[(att actOnClickFor: model in: self at: clickPoint editor: aController) ifTrue: [action _ true]]]]].\\\\n\\\\t^ action! !\\\\n\\\\n!Paragraph methodsFor: 'selecting'!\\\\nextendSelectionAt: beginBlock endBlock: endBlock \\\\n\\\\t\\\\\\\"Answer with an Array of two CharacterBlocks that represent the text \\\\n\\\\tselection that the user makes.\\\\\\\"\\\\n\\\\t\\\\n\\\\t(self characterBlockAtPoint: Sensor cursorPoint) <= beginBlock\\\\n\\\\t\\\\tifTrue: [^self mouseMovedFrom: beginBlock \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpivotBlock: endBlock\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tshowingCaret: (beginBlock = endBlock)]\\\\n\\\\t\\\\tifFalse: [^self mouseMovedFrom: endBlock \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpivotBlock: beginBlock\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tshowingCaret: (beginBlock = endBlock)]\\\\n! !\\\\n\\\\n!Paragraph methodsFor: 'selecting' stamp: 'th 9/19/2002 17:27'!\\\\nextendSelectionMark: markBlock pointBlock: pointBlock \\\\n\\\\t\\\\\\\"Answer with an Array of two CharacterBlocks that represent the text \\\\n\\\\tselection that the user makes.\\\\\\\"\\\\n\\\\ttrue \\\\n\\\\t\\\\tifTrue:[^self mouseMovedFrom: pointBlock\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpivotBlock: markBlock\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tshowingCaret:(pointBlock = markBlock)]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t[\\\\t| beginBlock endBlock |\\\\n\\\\t\\\\t\\\\tbeginBlock _ markBlock min: pointBlock.\\\\n\\\\t\\\\t\\\\tendBlock _ markBlock max: endBlock.\\\\n\\\\t\\\\n\\\\t\\\\t\\\\t(self characterBlockAtPoint: Sensor cursorPoint) <= beginBlock\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [^self mouseMovedFrom: beginBlock \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tpivotBlock: endBlock\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tshowingCaret: (beginBlock = endBlock)]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [^self mouseMovedFrom: endBlock \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tpivotBlock: beginBlock\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tshowingCaret: (beginBlock = endBlock)]\\\\n\\\\t\\\\t]\\\\n! !\\\\n\\\\n!Paragraph methodsFor: 'selecting' stamp: 'jm 7/1/1999 12:31'!\\\\nhiliteRect: rect\\\\n\\\\n\\\\t| highlightColor |\\\\n\\\\thighlightColor _ Color quickHighLight: destinationForm depth.\\\\n\\\\trect ifNotNil: [\\\\n\\\\t\\\\tdestinationForm\\\\n\\\\t\\\\t\\\\tfill: rect\\\\n\\\\t\\\\t\\\\trule: Form reverse\\\\n\\\\t\\\\t\\\\tfillColor: highlightColor.\\\\n\\\\t\\\\t\\\\\\\"destinationForm\\\\n\\\\t\\\\t\\\\tfill: (rect translateBy: 1@1)\\\\n\\\\t\\\\t\\\\trule: Form reverse\\\\n\\\\t\\\\t\\\\tfillColor: highlightColor\\\\\\\" ].\\\\n! !\\\\n\\\\n!Paragraph methodsFor: 'selecting' stamp: 'jm 7/8/97 12:25'!\\\\nmouseMovedFrom: beginBlock pivotBlock: pivotBlock showingCaret: caretOn \\\\n\\\\t| startBlock stopBlock showingCaret |\\\\n\\\\tstopBlock _ startBlock _ beginBlock.\\\\n\\\\tshowingCaret _ caretOn.\\\\n\\\\t[Sensor redButtonPressed]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[stopBlock _ self characterBlockAtPoint: Sensor cursorPoint.\\\\n\\\\t\\\\t\\\\tstopBlock = startBlock\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[showingCaret\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[showingCaret _ false.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself reverseFrom: pivotBlock to: pivotBlock].\\\\n\\\\t\\\\t\\\\t((startBlock >= pivotBlock and: [stopBlock >= pivotBlock])\\\\n\\\\t\\\\t\\\\t\\\\tor: [startBlock <= pivotBlock and: [stopBlock <= pivotBlock]])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self reverseFrom: startBlock to: stopBlock.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstartBlock _ stopBlock]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self reverseFrom: startBlock to: pivotBlock.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself reverseFrom: pivotBlock to: stopBlock.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstartBlock _ stopBlock].\\\\n\\\\t\\\\t\\\\t(clippingRectangle containsRect: stopBlock) ifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[stopBlock top < clippingRectangle top\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self scrollBy: stopBlock top - clippingRectangle top\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twithSelectionFrom: pivotBlock to: stopBlock]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self scrollBy: stopBlock bottom + textStyle lineGrid - clippingRectangle bottom\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twithSelectionFrom: pivotBlock to: stopBlock]]]].\\\\n\\\\tpivotBlock = stopBlock ifTrue:\\\\n\\\\t\\\\t[showingCaret ifFalse:  \\\\\\\"restore caret\\\\\\\"\\\\n\\\\t\\\\t\\\\t[self reverseFrom: pivotBlock to: pivotBlock]].\\\\n\\\\t^ Array with: pivotBlock with: stopBlock! !\\\\n\\\\n!Paragraph methodsFor: 'selecting'!\\\\nmouseSelect\\\\n\\\\t\\\\\\\"Answer with an Array of two CharacterBlocks that represent the text \\\\n\\\\tselection that the user makes.  Return quickly if the button is noticed up\\\\n\\\\tto make double-click more responsive.\\\\\\\"\\\\n\\\\n\\\\t| pivotBlock startBlock stopBlock origPoint stillDown |\\\\n\\\\tstillDown _ Sensor redButtonPressed.\\\\n\\\\tpivotBlock _ startBlock _ stopBlock _\\\\n\\\\t\\\\tself characterBlockAtPoint: (origPoint _ Sensor cursorPoint).\\\\n\\\\tstillDown _ stillDown and: [Sensor redButtonPressed].\\\\n\\\\tself reverseFrom: startBlock to: startBlock.\\\\n\\\\t[stillDown and: [Sensor cursorPoint = origPoint]] whileTrue:\\\\n\\\\t\\\\t[stillDown _ Sensor redButtonPressed].\\\\n\\\\t(stillDown and: [clippingRectangle containsPoint: Sensor cursorPoint])\\\\n\\\\t\\\\tifFalse: [^Array with: pivotBlock with: stopBlock].\\\\n\\\\t^ self mouseMovedFrom: startBlock \\\\n\\\\t\\\\tpivotBlock: pivotBlock\\\\n\\\\t\\\\tshowingCaret: true! !\\\\n\\\\n!Paragraph methodsFor: 'selecting'!\\\\nmouseSelect: clickPoint \\\\n\\\\t\\\\\\\"Track text selection and answer with an Array of two CharacterBlocks.\\\\\\\"\\\\n\\\\t| startBlock |\\\\n\\\\tstartBlock _ self characterBlockAtPoint: clickPoint.\\\\n\\\\tself reverseFrom: startBlock to: startBlock.\\\\n\\\\t^ self mouseMovedFrom: startBlock \\\\n\\\\t\\\\tpivotBlock: startBlock\\\\n\\\\t\\\\tshowingCaret: true! !\\\\n\\\\n!Paragraph methodsFor: 'selecting'!\\\\nreverseFrom: characterBlock1 to: characterBlock2 \\\\n\\\\t\\\\\\\"Reverse area between the two character blocks given as arguments.\\\\\\\"\\\\n\\\\t| visibleRectangle initialRectangle interiorRectangle finalRectangle lineNo baseline caret |\\\\n\\\\tcharacterBlock1 = characterBlock2 ifTrue:\\\\n\\\\t\\\\t[lineNo _ self lineIndexOfCharacterIndex: characterBlock1 stringIndex.\\\\n\\\\t\\\\tbaseline _ lineNo = 0 ifTrue: [textStyle baseline]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [(lines at: lineNo) baseline].\\\\n\\\\t\\\\tcaret _ self caretFormForDepth: Display depth.\\\\n\\\\t\\\\t^ caret  \\\\\\\"Use a caret to indicate null selection\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tdisplayOn: destinationForm\\\\n\\\\t\\\\t\\\\t\\\\tat: characterBlock1 topLeft + (-3 @ baseline)\\\\n\\\\t\\\\t\\\\t\\\\tclippingBox: clippingRectangle\\\\n\\\\t\\\\t\\\\t\\\\trule: (false \\\\\\\"Display depth>8\\\\\\\" ifTrue: [9 \\\\\\\"not-reverse\\\\\\\"]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [Form reverse])\\\\n\\\\t\\\\t\\\\t\\\\tfillColor: nil].\\\\n\\\\tvisibleRectangle _ \\\\n\\\\t\\\\t(clippingRectangle intersect: compositionRectangle)\\\\n\\\\t\\\\t\\\\t\\\\\\\"intersect: destinationForm boundingBox\\\\\\\" \\\\\\\"not necessary\\\\\\\".\\\\n\\\\tcharacterBlock1 top = characterBlock2 top\\\\n\\\\t\\\\tifTrue: [characterBlock1 left < characterBlock2 left\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[initialRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(characterBlock1 topLeft corner: characterBlock2 bottomLeft)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[initialRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(characterBlock2 topLeft corner: characterBlock1 bottomLeft)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle]]\\\\n\\\\t\\\\tifFalse: [characterBlock1 top < characterBlock2 top\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[initialRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(characterBlock1 topLeft \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: visibleRectangle right @ characterBlock1 bottom)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcharacterBlock1 bottom = characterBlock2 top\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[finalRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(visibleRectangle left @ characterBlock2 top \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: characterBlock2 bottomLeft)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[interiorRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(visibleRectangle left @ characterBlock1 bottom\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: visibleRectangle right \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t@ characterBlock2 top)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfinalRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(visibleRectangle left @ characterBlock2 top \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: characterBlock2 bottomLeft)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[initialRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(visibleRectangle left @ characterBlock1 top \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: characterBlock1 bottomLeft)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcharacterBlock1 top = characterBlock2 bottom\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[finalRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(characterBlock2 topLeft \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: visibleRectangle right \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t@ characterBlock2 bottom)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[interiorRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(visibleRectangle left @ characterBlock2 bottom \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: visibleRectangle right @ characterBlock1 top)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfinalRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(characterBlock2 topLeft \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: visibleRectangle right \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t@ characterBlock2 bottom)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle]]].\\\\n\\\\tself hiliteRect: initialRectangle.\\\\n\\\\tself hiliteRect: interiorRectangle.\\\\n\\\\tself hiliteRect: finalRectangle.! !\\\\n\\\\n!Paragraph methodsFor: 'selecting' stamp: 'di 12/1/97 04:43'!\\\\nselectionRectsFrom: characterBlock1 to: characterBlock2 \\\\n\\\\t\\\\\\\"Return an array of rectangles representing the area between the two character blocks given as arguments.\\\\\\\"\\\\n\\\\t| visibleRectangle initialRectangle interiorRectangle finalRectangle lineNo baseline |\\\\n\\\\tcharacterBlock1 = characterBlock2 ifTrue:\\\\n\\\\t\\\\t[lineNo _ self lineIndexOfCharacterIndex: characterBlock1 stringIndex.\\\\n\\\\t\\\\tbaseline _ lineNo = 0 ifTrue: [textStyle baseline]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [(lines at: lineNo) baseline].\\\\n\\\\t\\\\t^ Array with: (characterBlock1 topLeft extent: 1 @ baseline)].\\\\n\\\\tvisibleRectangle _ clippingRectangle intersect: compositionRectangle.\\\\n\\\\tcharacterBlock1 top = characterBlock2 top\\\\n\\\\t\\\\tifTrue: [characterBlock1 left < characterBlock2 left\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[initialRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(characterBlock1 topLeft corner: characterBlock2 bottomLeft)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[initialRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(characterBlock2 topLeft corner: characterBlock1 bottomLeft)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle]]\\\\n\\\\t\\\\tifFalse: [characterBlock1 top < characterBlock2 top\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[initialRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(characterBlock1 topLeft \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: visibleRectangle right @ characterBlock1 bottom)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcharacterBlock1 bottom = characterBlock2 top\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[finalRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(visibleRectangle left @ characterBlock2 top \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: characterBlock2 bottomLeft)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[interiorRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(visibleRectangle left @ characterBlock1 bottom\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: visibleRectangle right \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t@ characterBlock2 top)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfinalRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(visibleRectangle left @ characterBlock2 top \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: characterBlock2 bottomLeft)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[initialRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(visibleRectangle left @ characterBlock1 top \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: characterBlock1 bottomLeft)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcharacterBlock1 top = characterBlock2 bottom\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[finalRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(characterBlock2 topLeft \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: visibleRectangle right \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t@ characterBlock2 bottom)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[interiorRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(visibleRectangle left @ characterBlock2 bottom \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: visibleRectangle right @ characterBlock1 top)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfinalRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(characterBlock2 topLeft \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: visibleRectangle right \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t@ characterBlock2 bottom)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle]]].\\\\n\\\\t^ (Array with: initialRectangle with: interiorRectangle with: finalRectangle)\\\\n\\\\t\\\\t\\\\tselect: [:rect | rect notNil]! !\\\\n\\\\n\\\\n!Paragraph methodsFor: 'utilities'!\\\\nclearVisibleRectangle \\\\n\\\\t\\\\\\\"Display the area in which the receiver presents its text so that the area \\\\n\\\\tis all one tone--in this case, all white.\\\\\\\"\\\\n\\\\n\\\\tdestinationForm\\\\n\\\\t  fill: clippingRectangle\\\\n\\\\t  rule: rule\\\\n\\\\t  fillColor: self backgroundColor! !\\\\n\\\\n!Paragraph methodsFor: 'utilities'!\\\\ndeepCopy\\\\n\\\\t\\\\\\\"Don't want to copy the destForm (Display) or fonts in the TextStyle.  9/13/96 tk\\\\\\\"\\\\n\\\\n\\\\t| new |\\\\n\\\\tnew _ self copy.\\\\n\\\\tnew textStyle: textStyle copy.\\\\n\\\\tnew destinationForm: destinationForm.\\\\n\\\\tnew lines: lines copy.\\\\n\\\\tnew text: text deepCopy.\\\\n\\\\t^ new! !\\\\n\\\\n!Paragraph methodsFor: 'utilities'!\\\\ndestinationForm: destForm\\\\n\\\\tdestinationForm _ destForm! !\\\\n\\\\n!Paragraph methodsFor: 'utilities'!\\\\nfit\\\\n\\\\t\\\\\\\"Make the bounding rectangle of the receiver contain all the text without \\\\n\\\\tchanging the width of the receiver's composition rectangle.\\\\\\\"\\\\n\\\\n\\\\t[(self lineIndexOfTop: clippingRectangle top) = 1]\\\\n\\\\t\\\\twhileFalse: [self scrollBy: (0-1)*textStyle lineGrid].\\\\n\\\\tself updateCompositionHeight.\\\\n\\\\tclippingRectangle _ clippingRectangle withBottom: compositionRectangle bottom! !\\\\n\\\\n!Paragraph methodsFor: 'utilities'!\\\\nlines: lineArray\\\\n\\\\tlines _ lineArray! !\\\\n\\\\n!Paragraph methodsFor: 'utilities'!\\\\nvisibleRectangle \\\\n\\\\t\\\\\\\"May be less than the clippingRectangle if text ends part way down.\\\\n\\\\tAlso some fearful history includes Display intersection;\\\\n\\\\tit shouldn't be necessary\\\\\\\"\\\\n\\\\n\\\\t^ (clippingRectangle intersect: compositionRectangle)\\\\n\\\\t\\\\tintersect: destinationForm boundingBox! !\\\\n\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\nbottomAtLineIndex: lineIndex \\\\n\\\\t\\\\\\\"Answer the bottom y of given line.\\\\\\\"\\\\n\\\\t| y |\\\\n\\\\ty _ compositionRectangle top.\\\\n\\\\tlastLine = 0 ifTrue: [^ y + textStyle lineGrid].\\\\n\\\\t1 to: (lineIndex min: lastLine) do:\\\\n\\\\t\\\\t[:i | y _ y + (lines at: i) lineHeight].\\\\n\\\\t^ y\\\\n! !\\\\n\\\\n!Paragraph methodsFor: 'private' stamp: 'tk 9/30/96'!\\\\ncompositionRectangle: compositionRect text: aText style: aTextStyle offset: aPoint\\\\n\\\\n\\\\tcompositionRectangle _ compositionRect copy.\\\\n\\\\ttext _ aText.\\\\n\\\\ttextStyle _ aTextStyle.\\\\n\\\\trule _ DefaultRule.\\\\n\\\\tmask _ nil.\\\\t\\\\t\\\\\\\"was DefaultMask \\\\\\\"\\\\n\\\\tmarginTabsLevel _ 0.\\\\n\\\\tdestinationForm _ Display.\\\\n\\\\toffset _ aPoint.\\\\n\\\\t^self composeAll! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\ncompositionRectangleDelta\\\\n\\\\t\\\\\\\"A handy number -- mostly for scrolling.\\\\\\\"\\\\n\\\\n\\\\t^compositionRectangle top - clippingRectangle top! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\ndisplayLines: linesInterval \\\\n\\\\t^ self displayLines: linesInterval\\\\n\\\\t\\\\taffectedRectangle: self visibleRectangle! !\\\\n\\\\n!Paragraph methodsFor: 'private' stamp: 'yo 1/23/2003 22:48'!\\\\ndisplayLines: linesInterval affectedRectangle: affectedRectangle\\\\n\\\\t\\\\\\\"This is the first level workhorse in the display portion of the TextForm routines.\\\\n\\\\tIt checks to see which lines in the interval are actually visible, has the\\\\n\\\\tCharacterScanner display only those, clears out the areas in which display will\\\\n\\\\toccur, and clears any space remaining in the visibleRectangle following the space\\\\n\\\\toccupied by lastLine.\\\\\\\"\\\\n\\\\n\\\\t| lineGrid topY firstLineIndex lastLineIndex lastLineIndexBottom |\\\\n\\\\n\\\\t\\\\\\\"Save some time by only displaying visible lines\\\\\\\"\\\\n\\\\tfirstLineIndex _ self lineIndexOfTop: affectedRectangle top.\\\\n\\\\tfirstLineIndex < linesInterval first ifTrue: [firstLineIndex _ linesInterval first].\\\\n\\\\tlastLineIndex _ self lineIndexOfTop: affectedRectangle bottom - 1.\\\\n\\\\tlastLineIndex > linesInterval last ifTrue:\\\\n\\\\t\\\\t\\\\t[linesInterval last > lastLine\\\\n\\\\t\\\\t \\\\t\\\\tifTrue: [lastLineIndex _ lastLine]\\\\n\\\\t\\\\t  \\\\t\\\\tifFalse: [lastLineIndex _ linesInterval last]].\\\\n\\\\tlastLineIndexBottom _ (self bottomAtLineIndex: lastLineIndex).\\\\n\\\\t((Rectangle \\\\n\\\\t\\\\torigin: affectedRectangle left @ (topY _ self topAtLineIndex: firstLineIndex) \\\\n\\\\t\\\\tcorner: affectedRectangle right @ lastLineIndexBottom)\\\\n\\\\t  intersects: affectedRectangle)\\\\n\\\\t\\\\tifTrue: [ \\\\\\\" . . . (skip to clear-below if no lines displayed)\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tMultiDisplayScanner new\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdisplayLines: (firstLineIndex to: lastLineIndex)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tin: self clippedBy: affectedRectangle].\\\\n\\\\tlastLineIndex = lastLine ifTrue: \\\\n\\\\t\\\\t [destinationForm  \\\\\\\"Clear out white space below last line\\\\\\\"\\\\n\\\\t\\\\t \\\\tfill: (affectedRectangle left @ (lastLineIndexBottom max: affectedRectangle top)\\\\n\\\\t\\\\t\\\\t\\\\tcorner: affectedRectangle bottomRight)\\\\n\\\\t\\\\t \\\\trule: rule fillColor: self backgroundColor]! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\ndisplayOn: aDisplayMedium lines: lineInterval\\\\n\\\\n\\\\t| saveDestinationForm |\\\\n\\\\tsaveDestinationForm _ destinationForm.\\\\n\\\\tdestinationForm _ aDisplayMedium.\\\\n\\\\tself displayLines: lineInterval.\\\\n\\\\tdestinationForm _ saveDestinationForm! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\nleftMarginForCompositionForLine: lineIndex \\\\n\\\\t\\\\\\\"Build the left margin for composition of a line. Depends upon\\\\n\\\\tmarginTabsLevel and the indent.\\\\\\\"\\\\n\\\\n\\\\t| indent |\\\\n\\\\tlineIndex = 1\\\\n\\\\t\\\\tifTrue: [indent _ textStyle firstIndent]\\\\n\\\\t\\\\tifFalse: [indent _ textStyle restIndent].\\\\n\\\\t^indent + (textStyle leftMarginTabAt: marginTabsLevel)! !\\\\n\\\\n!Paragraph methodsFor: 'private' stamp: 'ar 12/15/2001 23:29'!\\\\nleftMarginForDisplayForLine: lineIndex alignment: alignment\\\\n\\\\t\\\\\\\"Build the left margin for display of a line. Depends upon\\\\n\\\\tleftMarginForComposition, compositionRectangle left and the alignment.\\\\\\\"\\\\n\\\\n\\\\t| pad |\\\\n\\\\t(alignment = LeftFlush or: [alignment = Justified])\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[^compositionRectangle left \\\\n\\\\t\\\\t\\\\t\\\\t+ (self leftMarginForCompositionForLine: lineIndex)].\\\\n\\\\t\\\\\\\"When called from character location code and entire string has been cut,\\\\n\\\\tthere are no valid lines, hence following nil check.\\\\\\\"\\\\n\\\\t(lineIndex <= lines size and: [(lines at: lineIndex) notNil])\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[pad _ (lines at: lineIndex) paddingWidth]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[pad _ \\\\n\\\\t\\\\t\\\\t\\\\tcompositionRectangle width - textStyle firstIndent - textStyle rightIndent].\\\\n\\\\talignment = Centered \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[^compositionRectangle left \\\\n\\\\t\\\\t\\\\t\\\\t+ (self leftMarginForCompositionForLine: lineIndex) + (pad // 2)].\\\\n\\\\talignment = RightFlush \\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[^compositionRectangle left \\\\n\\\\t\\\\t\\\\t\\\\t+ (self leftMarginForCompositionForLine: lineIndex) + pad].\\\\n\\\\tself error: ['no such alignment']! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\nlineAt: indexInteger put: aTextLineInterval \\\\n\\\\t\\\\\\\"Store a line, track last, and grow lines if necessary.\\\\\\\"\\\\n\\\\tindexInteger > lastLine ifTrue: [lastLine _ indexInteger].\\\\n\\\\tlastLine > lines size ifTrue: [lines _ lines , (Array new: lines size)].\\\\n\\\\t^lines at: indexInteger put: aTextLineInterval! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\nlineIndexOfCharacterIndex: characterIndex \\\\n\\\\t\\\\\\\"Answer the line index for a given characterIndex.\\\\\\\"\\\\n\\\\n\\\\t1 to: lastLine do: \\\\n\\\\t\\\\t[:lineIndex | \\\\n\\\\t\\\\t(lines at: lineIndex) last >= characterIndex ifTrue: [^lineIndex]].\\\\n\\\\t^lastLine! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\nlineIndexOfTop: top \\\\n\\\\t\\\\\\\"Answer the line index at a given top y.\\\\\\\"\\\\n\\\\t| y line |\\\\n\\\\tlastLine = 0 ifTrue: [^ 1].\\\\n\\\\ty _ compositionRectangle top.\\\\n\\\\t1 to: lastLine do:\\\\n\\\\t\\\\t[:i | line _ lines at: i.\\\\n\\\\t\\\\t(y _ y + line lineHeight) > top ifTrue: [^ i]].\\\\n\\\\t^ lastLine\\\\n! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\nlines\\\\n\\\\n\\\\t^lines! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\nmoveBy: delta\\\\n\\\\tcompositionRectangle _ compositionRectangle translateBy: delta.\\\\n\\\\tclippingRectangle _ clippingRectangle translateBy: delta.\\\\n! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\nrightMarginForComposition\\\\n\\\\t\\\\\\\"Build the right margin for a line. Depends upon compositionRectangle\\\\n\\\\twidth, marginTabsLevel, and right indent.\\\\\\\"\\\\n\\\\n\\\\t^compositionRectangle width \\\\n\\\\t\\\\t- (textStyle rightMarginTabAt: marginTabsLevel) \\\\n\\\\t\\\\t- textStyle rightIndent! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\nrightMarginForDisplay \\\\n\\\\t\\\\\\\"Build the right margin for a line. Depends upon compositionRectangle\\\\n\\\\trightSide, marginTabsLevel, and right indent.\\\\\\\"\\\\n\\\\n\\\\t^compositionRectangle right - \\\\n\\\\t\\\\ttextStyle rightIndent - (textStyle rightMarginTabAt: marginTabsLevel)! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\nsetWithText: aText style: aTextStyle \\\\n\\\\t\\\\\\\"Set text and adjust bounding rectangles to fit.\\\\\\\"\\\\n\\\\n\\\\t| shrink compositionWidth unbounded |\\\\n\\\\tunbounded _ Rectangle origin: 0 @ 0 extent: 9999@9999.\\\\n\\\\tcompositionWidth _ self\\\\n\\\\t\\\\tsetWithText: aText style: aTextStyle compositionRectangle: unbounded clippingRectangle: unbounded.\\\\n\\\\tcompositionRectangle _ compositionRectangle withWidth: compositionWidth.\\\\n\\\\tclippingRectangle _ compositionRectangle copy.\\\\n\\\\tshrink _ unbounded width - compositionWidth.\\\\n\\\\t\\\\\\\"Shrink padding widths accordingly\\\\\\\"\\\\n\\\\t1 to: lastLine do:\\\\n\\\\t\\\\t[:i | (lines at: i) paddingWidth: (lines at: i) paddingWidth - shrink]! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\nsetWithText: aText style: aTextStyle compositionRectangle: compRect clippingRectangle: clipRect \\\\n\\\\t\\\\\\\"Set text and using supplied parameters. Answer max composition width.\\\\\\\"\\\\n\\\\n\\\\tclippingRectangle _ clipRect copy.\\\\n\\\\t^self\\\\n\\\\t\\\\tcompositionRectangle: compRect\\\\n\\\\t\\\\ttext: aText\\\\n\\\\t\\\\tstyle: aTextStyle\\\\n\\\\t\\\\toffset: 0 @ 0! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\nsetWithText: aText style: aTextStyle compositionRectangle: compRect clippingRectangle: clipRect foreColor: cf backColor: cb\\\\n\\\\t\\\\\\\"Set text and using supplied parameters. Answer max composition width.\\\\\\\"\\\\n\\\\n\\\\tclippingRectangle _ clipRect copy.\\\\n\\\\tself foregroundColor: cf backgroundColor: cb.\\\\n\\\\t^ self\\\\n\\\\t\\\\tcompositionRectangle: compRect\\\\n\\\\t\\\\ttext: aText\\\\n\\\\t\\\\tstyle: aTextStyle\\\\n\\\\t\\\\toffset: 0 @ 0! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\ntopAtLineIndex: lineIndex \\\\n\\\\t\\\\\\\"Answer the top y of given line.\\\\\\\"\\\\n\\\\t| y |\\\\n\\\\ty _ compositionRectangle top.\\\\n\\\\tlastLine = 0 ifTrue: [lineIndex > 0 ifTrue: [^ y + textStyle lineGrid]. ^ y].\\\\n\\\\t1 to: (lineIndex-1 min: lastLine) do:\\\\n\\\\t\\\\t[:i | y _ y + (lines at: i) lineHeight].\\\\n\\\\t^ y\\\\n! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\ntopAtLineIndex: lineIndex using: otherLines and: otherLastLine\\\\n\\\\t\\\\\\\"Answer the top y of given line.\\\\\\\"\\\\n\\\\t| y |\\\\n\\\\ty _ compositionRectangle top.\\\\n\\\\totherLastLine = 0 ifTrue: [^ y].\\\\n\\\\t1 to: (lineIndex-1 min: otherLastLine) do:\\\\n\\\\t\\\\t[:i | y _ y + (otherLines at: i) lineHeight].\\\\n\\\\t^ y\\\\n! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\ntrimLinesTo: lastLineInteger\\\\n\\\\n\\\\t(lastLineInteger + 1 to: lastLine) do: [:i | lines at: i put: nil].\\\\n\\\\t(lastLine _ lastLineInteger) < (lines size // 2) \\\\n\\\\t\\\\tifTrue: [lines _ lines copyFrom: 1 to: lines size - (lines size // 2)]! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\nupdateCompositionHeight\\\\n\\\\t\\\\\\\"Mainly used to insure that intersections with compositionRectangle work.\\\\\\\" \\\\n\\\\n\\\\tcompositionRectangle _ compositionRectangle withHeight:\\\\n\\\\t\\\\t(self bottomAtLineIndex: lastLine) - compositionRectangle top.\\\\n\\\\t(text size ~= 0 and: [(text at: text size) = CR])\\\\n\\\\t\\\\tifTrue: [compositionRectangle _ compositionRectangle withHeight:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcompositionRectangle height + (lines at: lastLine) lineHeight]! !\\\\n\\\\n!Paragraph methodsFor: 'private' stamp: 'di 8/30/97 11:14'!\\\\nwithClippingRectangle: clipRect do: aBlock\\\\n\\\\t| saveClip |\\\\n\\\\tsaveClip _ clippingRectangle.\\\\n\\\\tclippingRectangle _ clipRect.\\\\n\\\\t\\\\taBlock value.\\\\n\\\\tclippingRectangle _ saveClip! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nParagraph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!Paragraph class methodsFor: 'examples' stamp: 'tk 9/30/96'!\\\\nexample\\\\n\\\\t\\\\\\\"This simple example illustrates how to display a few lines of text on the screen at the current cursor point.  \\\\n\\\\tFixed. \\\\\\\"\\\\n\\\\n\\\\t| para point |\\\\n\\\\tpoint _ Sensor waitButton.\\\\n\\\\tpara _ 'This is the first line of characters\\\\nand this is the second line.' asParagraph.\\\\n\\\\tpara displayOn: Display at: point.\\\\n\\\\n\\\\t\\\\\\\"Paragraph example\\\\\\\"! !\\\\n\\\\n\\\\n!Paragraph class methodsFor: 'instance creation'!\\\\nnew\\\\n\\\\t\\\\\\\"Do not allow an uninitialized view. Create with text that has no\\\\n\\\\tcharacters.\\\\\\\"\\\\n\\\\n\\\\t^self withText: '' asText! !\\\\n\\\\n!Paragraph class methodsFor: 'instance creation'!\\\\nwithText: aText \\\\n\\\\t\\\\\\\"Answer an instance of me with text set to aText and style set to the \\\\n\\\\tsystem's default text style.\\\\\\\"\\\\n\\\\n\\\\t^self withText: aText style: DefaultTextStyle copy! !\\\\n\\\\n!Paragraph class methodsFor: 'instance creation'!\\\\nwithText: aText style: aTextStyle \\\\n\\\\t\\\\\\\"Answer an instance of me with text set to aText and style set to \\\\n\\\\taTextStyle.\\\\\\\"\\\\n\\\\n\\\\t^super new setWithText: aText style: aTextStyle! !\\\\n\\\\n!Paragraph class methodsFor: 'instance creation'!\\\\nwithText: aText style: aTextStyle compositionRectangle: compRect clippingRectangle: clipRect foreColor: c1 backColor: c2\\\\n\\\\t\\\\\\\"Answer an instance of me with text set to aText and style set to \\\\n\\\\taTextStyle, composition rectangle is compRect and the clipping rectangle \\\\n\\\\tis clipRect.\\\\\\\"\\\\n\\\\t| para |\\\\n\\\\tpara _ super new.\\\\n\\\\tpara setWithText: aText\\\\n\\\\t\\\\tstyle: aTextStyle\\\\n\\\\t\\\\tcompositionRectangle: compRect\\\\n\\\\t\\\\tclippingRectangle: clipRect\\\\n\\\\t\\\\tforeColor: c1 backColor: c2.\\\\n\\\\t^para! !\\\\nScrollController subclass: #ParagraphEditor\\\\n\\\\tinstanceVariableNames: 'paragraph startBlock stopBlock beginTypeInBlock emphasisHere initialText selectionShowing otherInterval lastParentLocation'\\\\n\\\\tclassVariableNames: 'ChangeText CmdActions FindText Keyboard ShiftCmdActions UndoInterval UndoMessage UndoParagraph UndoSelection Undone'\\\\n\\\\tpoolDictionaries: 'TextConstants'\\\\n\\\\tcategory: 'Kernel-ST80 Remnants'!\\\\n!ParagraphEditor commentStamp: '<historical>' prior: 0!\\\\nI am a Controller for editing a Paragraph. I am a kind of ScrollController, so that more text can be created for the Paragraph than can be viewed on the screen. Editing messages are sent by issuing commands from a yellow button menu or from keys on the keyboard. My instances keep control as long as the cursor is within the view when the red or yellow mouse button is pressed; they give up control if the blue button is pressed.!\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing' stamp: 'tk 4/21/1998 09:55'!\\\\ninitialText\\\\n\\\\t^ initialText! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing'!\\\\nreplace: oldInterval with: newText and: selectingBlock \\\\n\\\\t\\\\\\\"Replace the text in oldInterval with newText and execute selectingBlock to establish the new selection.  Create an undoAndReselect:redoAndReselect: undoer to allow perfect undoing.\\\\\\\"\\\\n\\\\n\\\\t| undoInterval |\\\\n\\\\tundoInterval _ self selectionInterval.\\\\n\\\\tundoInterval = oldInterval ifFalse: [self selectInterval: oldInterval].\\\\n\\\\tUndoSelection _ self selection.\\\\n\\\\tself zapSelectionWith: newText.\\\\n\\\\tselectingBlock value.\\\\n\\\\totherInterval _ self selectionInterval.\\\\n\\\\tself undoer: #undoAndReselect:redoAndReselect: with: undoInterval with: otherInterval! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing'!\\\\nreplaceSelectionWith: aText\\\\n\\\\t\\\\\\\"Remember the selection text in UndoSelection.\\\\n\\\\t Deselect, and replace the selection text by aText.\\\\n\\\\t Remember the resulting selectionInterval in UndoInterval and PriorInterval.\\\\n\\\\t Set up undo to use UndoReplace.\\\\\\\"\\\\n\\\\n\\\\tbeginTypeInBlock ~~ nil ifTrue: [^self zapSelectionWith: aText]. \\\\\\\"called from old code\\\\\\\"\\\\n\\\\tUndoSelection _ self selection.\\\\n\\\\tself zapSelectionWith: aText.\\\\n\\\\tself undoer: #undoReplace! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing'!\\\\nsetSearch: aString\\\\n\\\\t\\\\\\\"Set the FindText and ChangeText to seek aString; except if already seeking aString, leave ChangeText alone so again will repeat last replacement.\\\\\\\"\\\\n\\\\n\\\\tFindText string = aString\\\\n\\\\t\\\\tifFalse: [FindText _ ChangeText _ aString asText]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing'!\\\\ntext\\\\n\\\\t\\\\\\\"Answer the text of the paragraph being edited.\\\\\\\"\\\\n\\\\n\\\\t^paragraph text! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing' stamp: 'jm 3/18/98 20:38'!\\\\nuserHasEdited\\\\n\\\\t\\\\\\\"Note that the user has edited my text. Here it is just a noop so that the Character Recognizer won't fail when used with a vanilla ParagrahEditor.\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/19/2002 18:22'!\\\\nhasCaret\\\\n\\\\t^self markBlock = self pointBlock! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/19/2002 18:22'!\\\\nhasSelection\\\\n\\\\t^self hasCaret not! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/17/2002 16:13'!\\\\nmark\\\\n\\\\t^ self markBlock stringIndex! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 10/21/2003 15:49'!\\\\nmarkBlock\\\\n\\\\t^ stopBlock! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 10/21/2003 15:49'!\\\\nmarkBlock: aCharacterBlock\\\\n\\\\tstopBlock _ aCharacterBlock.\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/18/2002 12:31'!\\\\nmarkIndex\\\\n\\\\t^ self markBlock stringIndex! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 10/21/2003 15:49'!\\\\npointBlock\\\\n\\\\t^ startBlock! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 10/21/2003 15:49'!\\\\npointBlock: aCharacterBlock\\\\n\\\\tstartBlock _ aCharacterBlock.\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/18/2002 12:31'!\\\\npointIndex\\\\n\\\\t^ self pointBlock stringIndex! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'yo 7/31/2004 16:27'!\\\\nselection\\\\n\\\\t\\\\\\\"Answer the text in the paragraph that is currently selected.\\\\\\\"\\\\n\\\\n\\\\t| t |\\\\n\\\\tt _ paragraph text copyFrom: self startIndex to: self stopIndex - 1.\\\\n\\\\tt string isOctetString ifTrue: [t asOctetStringText].\\\\n\\\\t^ t.\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/19/2002 18:10'!\\\\nselectionAsStream\\\\n\\\\t\\\\\\\"Answer a ReadStream on the text in the paragraph that is currently \\\\n\\\\tselected.\\\\\\\"\\\\n\\\\n\\\\t^ReadWriteStream\\\\n\\\\t\\\\ton: paragraph string\\\\n\\\\t\\\\tfrom: self startIndex\\\\n\\\\t\\\\tto: self stopIndex - 1! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/18/2002 16:18'!\\\\nselectionInterval\\\\n\\\\t\\\\\\\"Answer the interval that is currently selected.\\\\\\\"\\\\n\\\\n\\\\t^self startIndex to: self stopIndex - 1 ! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/17/2002 13:02'!\\\\nsetMark: anIndex\\\\n\\\\tself markBlock: (paragraph characterBlockForIndex: anIndex)\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/17/2002 13:02'!\\\\nsetPoint: anIndex\\\\n\\\\tself pointBlock: (paragraph characterBlockForIndex: anIndex)\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/17/2002 16:10'!\\\\nstartBlock\\\\n\\\\t^ self pointBlock min: self markBlock! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/17/2002 13:10'!\\\\nstartBlock: aCharacterBlock\\\\n\\\\tself markBlock: aCharacterBlock! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/18/2002 14:27'!\\\\nstartIndex\\\\n\\\\t^ self startBlock stringIndex! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/17/2002 16:14'!\\\\nstopBlock\\\\n\\\\t^ self pointBlock max: self markBlock! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/17/2002 13:10'!\\\\nstopBlock: aCharacterBlock\\\\n\\\\tself pointBlock: aCharacterBlock! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/18/2002 14:27'!\\\\nstopIndex\\\\n\\\\t^ self stopBlock stringIndex! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/17/2002 16:23'!\\\\nunselect\\\\n\\\\tself markBlock: self pointBlock copy.! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/19/2002 18:12'!\\\\nzapSelectionWith: aText\\\\n\\\\t\\\\\\\"Deselect, and replace the selection text by aText.\\\\n\\\\t Remember the resulting selectionInterval in UndoInterval and otherInterval.\\\\n\\\\t Do not set up for undo.\\\\\\\"\\\\n\\\\n\\\\t| start stop |\\\\n\\\\tself deselect.\\\\n\\\\tstart _ self startIndex.\\\\n\\\\tstop _ self stopIndex.\\\\n\\\\t(aText isEmpty and: [stop > start]) ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"If deleting, then set emphasisHere from 1st character of the deletion\\\\\\\"\\\\n\\\\t\\\\temphasisHere _ (paragraph text attributesAt: start forStyle: paragraph textStyle)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tselect: [:att | att mayBeExtended]].\\\\n\\\\t(start = stop and: [aText size = 0]) ifFalse:\\\\n\\\\t\\\\t[paragraph\\\\n\\\\t\\\\t\\\\treplaceFrom: start\\\\n\\\\t\\\\t\\\\tto: stop - 1\\\\n\\\\t\\\\t\\\\twith: aText\\\\n\\\\t\\\\t\\\\tdisplaying: true.\\\\n\\\\t\\\\tself computeIntervalFrom: start to: start + aText size - 1.\\\\n\\\\t\\\\tUndoInterval _ otherInterval _ self selectionInterval]! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'as yet unclassified' stamp: 'dvf 7/28/2003 14:54'!\\\\nactivateTextActions\\\\n\\\\t(paragraph text attributesAt: startBlock stringIndex) \\\\n\\\\t\\\\tdo: [:att | att actOnClickFor: model in: paragraph]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'as yet unclassified' stamp: 'BG 6/1/2003 09:43'!\\\\nofferMenuFromEsc: aStream\\\\n   sensor keyboard. \\\\\\\" consume the character \\\\\\\"\\\\n   self yellowButtonActivity.\\\\n  ^true \\\\\\\"tell the caller that the character was processed \\\\\\\"! !\\\\n\\\\n!ParagraphEditor methodsFor: 'as yet unclassified' stamp: 'sbw 10/13/1999 22:40'!\\\\ntotalTextHeight\\\\n\\\\n\\\\t^paragraph boundingBox height! !\\\\n\\\\n!ParagraphEditor methodsFor: 'as yet unclassified' stamp: 'sbw 10/13/1999 22:33'!\\\\nvisibleHeight\\\\n\\\\n\\\\t^paragraph clippingRectangle height! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'controlling'!\\\\ncontrolInitialize\\\\n\\\\n\\\\tsuper controlInitialize.\\\\n\\\\tself recomputeInterval.\\\\n\\\\tself initializeSelection.\\\\n\\\\tbeginTypeInBlock _ nil! !\\\\n\\\\n!ParagraphEditor methodsFor: 'controlling'!\\\\ncontrolTerminate\\\\n\\\\n\\\\tself closeTypeIn.  \\\\\\\"Must call to establish UndoInterval\\\\\\\"\\\\n\\\\tsuper controlTerminate.\\\\n\\\\tself deselect! !\\\\n\\\\n!ParagraphEditor methodsFor: 'controlling' stamp: 'sma 3/11/2000 15:17'!\\\\nnormalActivity\\\\n\\\\tself processKeyboard.\\\\n\\\\tself processMouseButtons! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'current selection'!\\\\ndeselect\\\\n\\\\t\\\\\\\"If the text selection is visible on the screen, reverse its highlight.\\\\\\\"\\\\n\\\\n\\\\tselectionShowing ifTrue: [self reverseSelection]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'current selection'!\\\\ninitializeSelection\\\\n\\\\t\\\\\\\"Do the initial activity when starting up the receiver. For example, in the \\\\n\\\\tParagraphEditor highlight the current selection.\\\\\\\"\\\\n\\\\n\\\\tself select! !\\\\n\\\\n!ParagraphEditor methodsFor: 'current selection' stamp: 'th 9/20/2002 11:41'!\\\\nrecomputeInterval\\\\n\\\\t\\\\\\\"The same characters are selected but their coordinates may have changed.\\\\\\\"\\\\n\\\\n\\\\tself computeIntervalFrom: self mark to: self pointIndex - 1! !\\\\n\\\\n!ParagraphEditor methodsFor: 'current selection'!\\\\nrecomputeSelection\\\\n\\\\t\\\\\\\"Redetermine the selection according to the start and stop block indices; \\\\n\\\\tdo not highlight.\\\\\\\"\\\\n\\\\n\\\\tself deselect; recomputeInterval! !\\\\n\\\\n!ParagraphEditor methodsFor: 'current selection' stamp: 'BG 12/12/2003 12:50'!\\\\nreverseSelection\\\\n\\\\t\\\\\\\"Reverse the valence of the current selection highlighting.\\\\\\\"\\\\n\\\\tselectionShowing _ selectionShowing not.\\\\n\\\\tparagraph reverseFrom: self pointBlock to: self markBlock! !\\\\n\\\\n!ParagraphEditor methodsFor: 'current selection'!\\\\nselect\\\\n\\\\t\\\\\\\"If the text selection is visible on the screen, highlight it.\\\\\\\"\\\\n\\\\n\\\\tselectionShowing ifFalse: [self reverseSelection]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'current selection' stamp: 'th 9/19/2002 18:47'!\\\\nselectAndScroll\\\\n\\\\t\\\\\\\"Scroll until the selection is in the view and then highlight it.\\\\\\\"\\\\n\\\\t| lineHeight deltaY clippingRectangle endBlock |\\\\n\\\\tself select.\\\\n\\\\tendBlock _ self stopBlock.\\\\n\\\\tlineHeight _ paragraph textStyle lineGrid.\\\\n\\\\tclippingRectangle _ paragraph clippingRectangle.\\\\n\\\\tdeltaY _ endBlock top - clippingRectangle top.\\\\n\\\\tdeltaY >= 0 \\\\n\\\\t\\\\tifTrue: [deltaY _ endBlock bottom - clippingRectangle bottom max: 0].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"check if stopIndex below bottom of clippingRectangle\\\\\\\"\\\\n\\\\tdeltaY ~= 0 \\\\n\\\\t\\\\tifTrue: [self scrollBy: (deltaY abs + lineHeight - 1 truncateTo: lineHeight)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t* deltaY sign]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'current selection' stamp: 'th 9/19/2002 18:48'!\\\\nselectAndScrollToTop\\\\n\\\\t\\\\\\\"Scroll until the selection is in the view and then highlight it.\\\\\\\"\\\\n\\\\t| lineHeight deltaY clippingRectangle |\\\\n\\\\tself select.\\\\n\\\\tlineHeight _ paragraph textStyle lineGrid.\\\\n\\\\tclippingRectangle _ paragraph clippingRectangle.\\\\n\\\\tdeltaY _ self stopBlock top - clippingRectangle top.\\\\n\\\\tdeltaY ~= 0 \\\\n\\\\t\\\\tifTrue: [self scrollBy: (deltaY abs + lineHeight - 1 truncateTo: lineHeight)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t* deltaY sign]! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'displaying'!\\\\ndisplay\\\\n\\\\t\\\\\\\"Redisplay the paragraph.\\\\\\\"\\\\n\\\\n\\\\t| selectionState |\\\\n\\\\tselectionState _ selectionShowing.\\\\n\\\\tself deselect.\\\\n\\\\tparagraph foregroundColor: view foregroundColor\\\\n\\\\t\\\\t\\\\tbackgroundColor: view backgroundColor;\\\\n\\\\t\\\\t\\\\tdisplayOn: Display.\\\\n\\\\tselectionState ifTrue: [self select]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'displaying'!\\\\nflash\\\\n\\\\t\\\\\\\"Causes the view of the paragraph to complement twice in succession.\\\\\\\"\\\\n\\\\n\\\\tparagraph flash! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'do-its' stamp: 'md 2/13/2006 14:36'!\\\\ncompileSelectionFor: anObject in: evalContext\\\\n\\\\n\\\\t| methodNode method |\\\\n\\\\tmethodNode _ [Compiler new\\\\n\\\\t\\\\tcompileNoPattern: self selectionAsStream\\\\n\\\\t\\\\tin: anObject class\\\\n\\\\t\\\\tcontext: evalContext\\\\n\\\\t\\\\tnotifying: self\\\\n\\\\t\\\\tifFail: [^nil]]\\\\n\\\\t\\\\t\\\\ton: OutOfScopeNotification\\\\n\\\\t\\\\t\\\\tdo: [:ex | ex resume: true].\\\\n\\\\tmethod _ methodNode generate.\\\\n\\\\t^method copyWithTempNames: methodNode tempNames! !\\\\n\\\\n!ParagraphEditor methodsFor: 'do-its' stamp: 'di 5/10/1998 21:38'!\\\\ndoIt\\\\n\\\\t\\\\\\\"Set the context to include pool vars of the model.  Then evaluate.\\\\\\\"\\\\n\\\\t^ self evaluateSelection.\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'do-its' stamp: 'gk 3/3/2004 17:15'!\\\\nevaluateSelection\\\\n\\\\t\\\\\\\"Treat the current selection as an expression; evaluate it and return the result\\\\\\\"\\\\n\\\\t| result rcvr ctxt |\\\\n\\\\tself lineSelectAndEmptyCheck: [^ ''].\\\\n\\\\n\\\\t(model respondsTo: #doItReceiver) \\\\n\\\\t\\\\tifTrue: [FakeClassPool adopt: model selectedClass.  \\\\\\\"Include model pool vars if any\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\trcvr _ model doItReceiver.\\\\n\\\\t\\\\t\\\\t\\\\tctxt _ model doItContext]\\\\n\\\\t\\\\tifFalse: [rcvr _ ctxt _ nil].\\\\n\\\\tresult _ [\\\\n\\\\t\\\\trcvr class evaluatorClass new \\\\n\\\\t\\\\t\\\\tevaluate: self selectionAsStream\\\\n\\\\t\\\\t\\\\tin: ctxt\\\\n\\\\t\\\\t\\\\tto: rcvr\\\\n\\\\t\\\\t\\\\tnotifying: self\\\\n\\\\t\\\\t\\\\tifFail: [FakeClassPool adopt: nil. ^ #failedDoit]\\\\n\\\\t\\\\t\\\\tlogged: true.\\\\n\\\\t] \\\\n\\\\t\\\\ton: OutOfScopeNotification \\\\n\\\\t\\\\tdo: [ :ex | ex resume: true].\\\\n\\\\tFakeClassPool adopt: nil.\\\\n\\\\t^ result! !\\\\n\\\\n!ParagraphEditor methodsFor: 'do-its' stamp: 'acg 12/7/1999 07:53'!\\\\nexploreIt\\\\n\\\\t| result |\\\\n\\\\tresult _ self evaluateSelection.\\\\n\\\\t((result isKindOf: FakeClassPool) or: [result == #failedDoit])\\\\n\\\\t\\\\t\\\\tifTrue: [view flash]\\\\n\\\\t\\\\t\\\\tifFalse: [result explore].\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'do-its' stamp: 'di 9/7/1999 11:25'!\\\\ninspectIt\\\\n\\\\t\\\\\\\"1/13/96 sw: minor fixup\\\\\\\"\\\\n\\\\t| result |\\\\n\\\\tresult _ self evaluateSelection.\\\\n\\\\t((result isKindOf: FakeClassPool) or: [result == #failedDoit])\\\\n\\\\t\\\\t\\\\tifTrue: [view flash]\\\\n\\\\t\\\\t\\\\tifFalse: [result inspect].\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'do-its' stamp: 'sd 4/16/2003 11:41'!\\\\nobjectsReferencingIt\\\\n\\\\t\\\\\\\"Open a list inspector on all objects that reference the object that results when the current selection is evaluated.  \\\\\\\"\\\\n\\\\t| result |\\\\n\\\\tself terminateAndInitializeAround: [\\\\n\\\\tresult _ self evaluateSelection.\\\\n\\\\t((result isKindOf: FakeClassPool) or: [result == #failedDoit])\\\\n\\\\t\\\\tifTrue: [view flash]\\\\n\\\\t\\\\tifFalse: [self systemNavigation\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbrowseAllObjectReferencesTo: result\\\\n\\\\t\\\\t\\\\t\\\\t\\\\texcept: #()\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifNone: [:obj | view topView flash]].\\\\n\\\\t]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'do-its' stamp: 'di 5/10/1998 21:52'!\\\\nprintIt\\\\n\\\\t\\\\\\\"Treat the current text selection as an expression; evaluate it. Insert the \\\\n\\\\tdescription of the result of evaluation after the selection and then make \\\\n\\\\tthis description the new text selection.\\\\\\\"\\\\n\\\\t| result |\\\\n\\\\tresult _ self evaluateSelection.\\\\n\\\\t((result isKindOf: FakeClassPool) or: [result == #failedDoit])\\\\n\\\\t\\\\t\\\\tifTrue: [view flash]\\\\n\\\\t\\\\t\\\\tifFalse: [self afterSelectionInsertAndSelect: result printString]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'do-its' stamp: 'ab 3/23/2005 16:49'!\\\\ntallyIt\\\\n\\\\n\\\\t^ self tallySelection! !\\\\n\\\\n!ParagraphEditor methodsFor: 'do-its' stamp: 'ab 3/23/2005 16:49'!\\\\ntallySelection\\\\n\\\\t\\\\\\\"Treat the current selection as an expression; evaluate it and return the time took for this evaluation\\\\\\\"\\\\n\\\\t| result rcvr ctxt cm v valueAsString |\\\\n\\\\tself lineSelectAndEmptyCheck: [^ -1].\\\\n\\\\n\\\\t(model respondsTo: #doItReceiver) \\\\n\\\\t\\\\tifTrue: [FakeClassPool adopt: model selectedClass.  \\\\\\\"Include model pool vars if any\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\trcvr _ model doItReceiver.\\\\n\\\\t\\\\t\\\\t\\\\tctxt _ model doItContext]\\\\n\\\\t\\\\tifFalse: [rcvr _ ctxt _ nil].\\\\n\\\\tresult _ [\\\\n\\\\t\\\\tcm := rcvr class evaluatorClass new \\\\n\\\\t\\\\t\\\\tcompiledMethodFor: self selectionAsStream\\\\n\\\\t\\\\t\\\\tin: ctxt\\\\n\\\\t\\\\t\\\\tto: rcvr\\\\n\\\\t\\\\t\\\\tnotifying: self\\\\n\\\\t\\\\t\\\\tifFail: [FakeClassPool adopt: nil. ^ #failedDoit]\\\\n\\\\t\\\\t\\\\tlogged: false.\\\\n\\\\t\\\\tTime millisecondsToRun: \\\\n\\\\t\\\\t\\\\t[v := cm valueWithReceiver: rcvr arguments: (Array with: ctxt)].\\\\n\\\\t] \\\\n\\\\t\\\\ton: OutOfScopeNotification \\\\n\\\\t\\\\tdo: [ :ex | ex resume: true].\\\\n\\\\tFakeClassPool adopt: nil.\\\\n\\\\n\\\\t\\\\\\\"We do not want to have large result displayed\\\\\\\"\\\\n\\\\tvalueAsString := v printString.\\\\n\\\\t(valueAsString size > 30) ifTrue: [valueAsString := (valueAsString copyFrom: 1 to: 30), '...'].\\\\n\\\\tPopUpMenu \\\\n\\\\t\\\\tinform: 'Time to compile and execute: ', result printString, 'ms res: ', valueAsString.\\\\n! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys'!\\\\nalign: characterStream \\\\n\\\\t\\\\\\\"Triggered by Cmd-u;  cycle through alignment alternatives.  8/11/96 sw\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself align.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'hpt 8/5/2004 20:21'!\\\\nbrowseIt: characterStream \\\\n\\\\t\\\\\\\"Triggered by Cmd-B; browse the thing represented by the current selection, if plausible.  1/18/96 sw\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself browseIt.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys'!\\\\nbrowseItHere: characterStream \\\\n\\\\t\\\\\\\"Triggered by Cmd-shift-B; browse the thing represented by the current selection, if plausible, in the receiver's own window.  3/1/96 sw\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself browseItHere.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'di 9/7/1999 08:40'!\\\\ncancel: characterStream \\\\n\\\\t\\\\\\\"Cancel unsubmitted changes.  Flushes typeahead.  1/12/96 sw\\\\n\\\\t 1/22/96 sw: put in control terminate/init\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\n\\\\tself terminateAndInitializeAround: [self cancel].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'dgd 4/4/2006 15:46'!\\\\nchangeEmphasis: characterStream \\\\n\\\\t\\\\\\\"Change the emphasis of the current selection or prepare to\\\\n\\\\taccept characters with the change in emphasis. Emphasis\\\\n\\\\tchange amounts to a font change. Keeps typeahead.\\\\\\\"\\\\n\\\\t\\\\n\\\\t| keyCode attribute oldAttributes index thisSel colors extras |\\\\n\\\\n\\\\t\\\\\\\"control 0..9 -> 0..9\\\\\\\"\\\\n\\\\tkeyCode := ('0123456789-=' indexOf: sensor keyboard ifAbsent: [1]) - 1.\\\\n\\\\n\\\\toldAttributes := paragraph text attributesAt: self pointIndex forStyle: paragraph textStyle.\\\\n\\\\tthisSel := self selection.\\\\n\\\\n\\\\t\\\\\\\"Decipher keyCodes for Command 0-9...\\\\\\\"\\\\n\\\\t(keyCode between: 1 and: 5) ifTrue: [\\\\n\\\\t\\\\tattribute := TextFontChange fontNumber: keyCode\\\\n\\\\t].\\\\n\\\\n\\\\tkeyCode = 6 ifTrue: [\\\\n\\\\t\\\\t| labels lines | \\\\n\\\\t\\\\tcolors := #(#black #magenta #red #yellow #green #blue #cyan #white ).\\\\n\\\\t\\\\textras := (self class name = #TextMorphEditor and: [(self morph isKindOf: TextMorphForEditView) not])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"not a system window\\\\\\\" #()]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [#('Link to comment of class' 'Link to definition of class' 'Link to hierarchy of class' 'Link to method' )].\\\\n\\\\n\\\\t\\\\tPreferences noviceMode ifTrue: [\\\\n\\\\t\\\\t\\\\tlabels := colors , #('choose color...' ).\\\\n\\\\t\\\\t\\\\tlines := #()\\\\n\\\\t\\\\t]\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\tlabels := colors , #('choose color...' 'Do it' 'Print it' ) , extras , #('be a web URL link' 'Edit hidden info' 'Copy hidden info' ).\\\\n\\\\t\\\\t\\\\tlines := Array with: colors size + 1\\\\n\\\\t\\\\t].\\\\n\\\\n\\\\t\\\\t\\\\\\\"index _ (PopUpMenu labelArray: labels lines: lines) startUp. \\\\\\\"\\\\n\\\\t\\\\tindex := UIManager default chooseFrom: labels lines: lines.\\\\n\\\\t\\\\tindex = 0\\\\n\\\\t\\\\t\\\\tifTrue: [ ^ true].\\\\n\\\\t\\\\t\\\\t\\\\n\\\\t\\\\tindex <= colors size ifTrue: [\\\\n\\\\t\\\\t\\\\tattribute := TextColor color: (Color perform: (colors at: index))\\\\n\\\\t\\\\t]\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\tindex := index - colors size - 1. \\\\\\\"Re-number!!!!!!\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\tindex = 0 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tattribute := self chooseColor\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\n\\\\t\\\\t\\\\tindex = 1 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tattribute := TextDoIt new.\\\\n\\\\t\\\\t\\\\t\\\\tthisSel := attribute analyze: self selection asString\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\n\\\\t\\\\t\\\\tindex = 2 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tattribute := TextPrintIt new.\\\\n\\\\t\\\\t\\\\t\\\\tthisSel := attribute analyze: self selection asString\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\n\\\\t\\\\t\\\\textras size = 0 & (index > 2) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tindex := index + 4 \\\\\\\"skip those\\\\\\\"\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\n\\\\t\\\\t\\\\tindex = 3 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tattribute := TextLink new.\\\\n\\\\t\\\\t\\\\t\\\\tthisSel := attribute analyze: self selection asString with: 'Comment'\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\n\\\\t\\\\t\\\\tindex = 4 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tattribute := TextLink new.\\\\n\\\\t\\\\t\\\\t\\\\tthisSel := attribute analyze: self selection asString with: 'Definition'\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\n\\\\t\\\\t\\\\tindex = 5 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tattribute := TextLink new.\\\\n\\\\t\\\\t\\\\t\\\\tthisSel := attribute analyze: self selection asString with: 'Hierarchy'\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\n\\\\t\\\\t\\\\tindex = 6 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tattribute := TextLink new.\\\\n\\\\t\\\\t\\\\t\\\\tthisSel := attribute analyze: self selection asString\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\n\\\\t\\\\t\\\\tindex = 7 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tattribute := TextURL new.\\\\n\\\\t\\\\t\\\\t\\\\tthisSel := attribute analyze: self selection asString\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\n\\\\t\\\\t\\\\tindex = 8 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"Edit hidden info\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tthisSel := self hiddenInfo. \\\\\\\"includes selection\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tattribute := TextEmphasis normal\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\n\\\\t\\\\t\\\\tindex = 9 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"Copy hidden info\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tself copyHiddenInfo.\\\\n\\\\t\\\\t\\\\t\\\\t^ true\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\n\\\\t\\\\t\\\\t\\\\\\\"no other action\\\\\\\"\\\\n\\\\t\\\\t\\\\tthisSel\\\\n\\\\t\\\\t\\\\t\\\\tifNil: [ ^ true ]\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\n\\\\t(keyCode between: 7 and: 11) ifTrue: [\\\\n\\\\t\\\\tsensor leftShiftDown ifTrue: [\\\\n\\\\t\\\\t\\\\tkeyCode = 10 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tattribute := TextKern kern: -1\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\tkeyCode = 11 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tattribute := TextKern kern: 1\\\\n\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t]\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\tattribute := TextEmphasis perform: (#(#bold #italic #narrow #underlined #struckOut ) at: keyCode - 6).\\\\n\\\\t\\\\t\\\\toldAttributes\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:att | (att dominates: attribute) ifTrue: [attribute turnOff]]\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\n\\\\tkeyCode = 0\\\\n\\\\t\\\\tifTrue: [attribute := TextEmphasis normal].\\\\n\\\\n\\\\tbeginTypeInBlock ~~ nil ifTrue: [\\\\n\\\\t\\\\t\\\\\\\"only change emphasisHere while typing\\\\\\\"\\\\n\\\\t\\\\tself insertTypeAhead: characterStream.\\\\n\\\\t\\\\temphasisHere := Text addAttribute: attribute toArray: oldAttributes.\\\\n\\\\t\\\\t^ true\\\\n\\\\t].\\\\n\\\\n\\\\tself\\\\n\\\\t\\\\treplaceSelectionWith: (thisSel asText addAttribute: attribute).\\\\n\\\\t\\\\t\\\\n\\\\t^ true\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'di 5/28/1998 11:58'!\\\\nchangeLfToCr: characterStream \\\\n\\\\t\\\\\\\"Replace all LFs by CRs.\\\\n\\\\tTriggered by Cmd-U -- useful when getting code from FTP sites\\\\\\\"\\\\n\\\\t| cr lf |\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush the triggering cmd-key character\\\\\\\"\\\\n\\\\tcr _ Character cr.  lf _ Character linefeed.\\\\n\\\\tself replaceSelectionWith: (Text fromString:\\\\n\\\\t\\\\t\\\\t(self selection string collect: [:c | c = lf ifTrue: [cr] ifFalse: [c]])).\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'tk 5/7/2001 09:11'!\\\\nchooseColor\\\\n\\\\t\\\\\\\"Make a new Text Color Attribute, let the user pick a color, and return the attribute.  This is the non-Morphic version.\\\\\\\"\\\\n\\\\n\\\\t^ TextColor color: (Color fromUser)! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'di 9/7/1999 08:31'!\\\\ncompareToClipboard: characterStream \\\\n\\\\t\\\\\\\"Compare the receiver to the text on the clipboard.  Flushes typeahead.  5/1/96 sw\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\n\\\\tself terminateAndInitializeAround: [self compareToClipboard].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'tk 5/7/2001 08:47'!\\\\ncopyHiddenInfo\\\\n\\\\t\\\\\\\"In TextLinks, TextDoits, TextColor, and TextURLs, there is hidden\\\\ninfo.  Copy that to the clipboard.  You can paste it and see what it is.\\\\nUsually enclosed in <>.\\\\\\\"\\\\n\\\\n\\\\t^ self clipboardTextPut: self hiddenInfo asText! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys'!\\\\ncopySelection: characterStream \\\\n\\\\t\\\\\\\"Copy the current text selection.  Flushes typeahead.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself copySelection.\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys'!\\\\ncut: characterStream \\\\n\\\\t\\\\\\\"Cut out the current text selection.  Flushes typeahead.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself cut.\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'di 9/7/1999 08:23'!\\\\ndoIt: characterStream \\\\n\\\\t\\\\\\\"Called when user hits cmd-d.  Select the current line, if relevant, then evaluate and execute.  2/1/96 sw.\\\\n\\\\t2/29/96 sw: don't call selectLine; it's done by doIt now\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\n\\\\tself terminateAndInitializeAround: [self doIt].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'th 9/20/2002 11:41'!\\\\nduplicate: characterStream\\\\n\\\\t\\\\\\\"Paste the current selection over the prior selection, if it is non-overlapping and\\\\n\\\\t legal.  Flushes typeahead.  Undoer & Redoer: undoAndReselect.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\n\\\\tself closeTypeIn.\\\\n\\\\t(self hasSelection and: [self isDisjointFrom: otherInterval])\\\\n\\\\t\\\\tifTrue: \\\\\\\"Something to duplicate\\\\\\\"\\\\n\\\\t\\\\t\\\\t[self replace: otherInterval with: self selection and:\\\\n\\\\t\\\\t\\\\t\\\\t[self selectAt: self pointIndex]]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[view flash].\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'th 9/19/2002 18:01'!\\\\nenclose: characterStream\\\\n\\\\t\\\\\\\"Insert or remove bracket characters around the current selection.\\\\n\\\\t Flushes typeahead.\\\\\\\"\\\\n\\\\n\\\\t| char left right startIndex stopIndex oldSelection which text |\\\\n\\\\tchar _ sensor keyboard.\\\\n\\\\tself closeTypeIn.\\\\n\\\\tstartIndex _ self startIndex.\\\\n\\\\tstopIndex _ self stopIndex.\\\\n\\\\toldSelection _ self selection.\\\\n\\\\twhich _ '([<{\\\\\\\"''' indexOf: char ifAbsent: [ ^true ].\\\\n\\\\tleft _ '([<{\\\\\\\"''' at: which.\\\\n\\\\tright _ ')]>}\\\\\\\"''' at: which.\\\\n\\\\ttext _ paragraph text.\\\\n\\\\t((startIndex > 1 and: [stopIndex <= text size])\\\\n\\\\t\\\\tand:\\\\n\\\\t\\\\t[(text at: startIndex-1) = left and: [(text at: stopIndex) = right]])\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"already enclosed; strip off brackets\\\\\\\"\\\\n\\\\t\\\\t\\\\tself selectFrom: startIndex-1 to: stopIndex.\\\\n\\\\t\\\\t\\\\tself replaceSelectionWith: oldSelection]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"not enclosed; enclose by matching brackets\\\\\\\"\\\\n\\\\t\\\\t\\\\tself replaceSelectionWith:\\\\n\\\\t\\\\t\\\\t\\\\t(Text string: (String with: left), oldSelection string ,(String with: right)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\temphasis: emphasisHere).\\\\n\\\\t\\\\t\\\\tself selectFrom: startIndex+1 to: stopIndex].\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys'!\\\\nexchange: characterStream\\\\n\\\\t\\\\\\\"Exchange the current and prior selections.  Keeps typeahead.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t \\\\\\\"Flush character\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself exchange.\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'acg 12/7/1999 07:56'!\\\\nexploreIt: characterStream \\\\n\\\\t\\\\\\\"Explore the selection -- invoked via cmd-shift-I.  If there is no current selection, use the current line.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself terminateAndInitializeAround: [self exploreIt].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'sw 4/24/2001 12:28'!\\\\nfileItIn: characterStream \\\\n\\\\t\\\\\\\"File in the selection; invoked via a keyboard shortcut, -- for now, cmd-shift-G.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself terminateAndInitializeAround: [self fileItIn].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'th 9/18/2002 16:31'!\\\\nhiddenInfo\\\\n\\\\t\\\\\\\"In TextLinks, TextDoits, TextColor, and TextURLs, there is hidden info.  Return the entire string that was used by Cmd-6 to create this text attribute.  Usually enclosed in < >.\\\\\\\"\\\\n\\\\n\\\\t| attrList |\\\\n\\\\tattrList _ paragraph text attributesAt: (self pointIndex +\\\\nself markIndex)//2 forStyle: paragraph textStyle.\\\\n\\\\tattrList do: [:attr |\\\\n\\\\t\\\\t(attr isKindOf: TextAction) ifTrue:\\\\n\\\\t\\\\t\\\\t[^ self selection asString, '<', attr info, '>']].\\\\n\\\\t\\\\\\\"If none of the above\\\\\\\"\\\\n\\\\tattrList do: [:attr |\\\\n\\\\t\\\\tattr class == TextColor ifTrue:\\\\n\\\\t\\\\t\\\\t[^ self selection asString, '<', attr color printString, '>']].\\\\n\\\\t^ self selection asString, '[No hidden info]'! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys'!\\\\nimplementorsOfIt: characterStream \\\\n\\\\t\\\\\\\"Triggered by Cmd-m; browse implementors of the selector represented by the current selection, if plausible. 2/1/96 sw\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself implementorsOfIt.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'pk 9/10/2005 22:53'!\\\\ninOutdent: characterStream delta: delta\\\\n\\\\t\\\\\\\"Add/remove a tab at the front of every line occupied by the selection. Flushes typeahead.  Derived from work by Larry Tesler back in December 1985.  Now triggered by Cmd-L and Cmd-R.  2/29/96 sw\\\\\\\"\\\\n\\\\n\\\\t| cr realStart realStop lines startLine stopLine start stop adjustStart indentation size numLines inStream newString outStream |\\\\n\\\\t\\\\n\\\\tsensor keyboard.  \\\\\\\"Flush typeahead\\\\\\\"\\\\n\\\\tcr := Character cr.\\\\n\\\\n\\\\t\\\\\\\"Operate on entire lines, but remember the real selection for re-highlighting later\\\\\\\"\\\\n\\\\trealStart := self startIndex.\\\\n\\\\trealStop := self stopIndex - 1.\\\\n\\\\n\\\\t\\\\\\\"Special case a caret on a line of its own, including weird case at end of paragraph\\\\\\\"\\\\n\\\\t(realStart > realStop and:\\\\n\\\\t\\\\t\\\\t\\\\t[realStart < 2 or: [(paragraph string at: realStart - 1) == cr]])\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[delta < 0\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[view flash]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self replaceSelectionWith: Character tab asSymbol asText.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself selectAt: realStart + 1].\\\\n\\\\t\\\\t\\\\t^ true].\\\\n\\\\n\\\\tlines := paragraph lines.\\\\n\\\\tstartLine := paragraph lineIndexOfCharacterIndex: realStart.\\\\n\\\\tstopLine := paragraph lineIndexOfCharacterIndex: (realStart max: realStop).\\\\n\\\\tstart := (lines at: startLine) first.\\\\n\\\\tstop := (lines at: stopLine) last.\\\\n\\\\t\\\\n\\\\t\\\\\\\"Pin the start of highlighting unless the selection starts a line\\\\\\\"\\\\n\\\\tadjustStart := realStart > start.\\\\n\\\\n\\\\t\\\\\\\"Find the indentation of the least-indented non-blank line; never outdent more\\\\\\\"\\\\n\\\\tindentation := (startLine to: stopLine) inject: 1000 into:\\\\n\\\\t\\\\t[:m :l |\\\\n\\\\t\\\\tm := m min: (paragraph indentationOfLineIndex: l ifBlank: [:tabs | 1000])].\\\\t\\\\t\\\\t\\\\n\\\\n\\\\tsize :=  stop + 1 - start.\\\\n\\\\tnumLines := stopLine + 1 - startLine.\\\\n\\\\tinStream := ReadStream on: paragraph string from: start to: stop.\\\\n\\\\n\\\\tnewString := WideString new: size + ((numLines * delta) max: 0).\\\\n\\\\toutStream := ReadWriteStream on: newString.\\\\n\\\\n\\\\t\\\\\\\"This subroutine does the actual work\\\\\\\"\\\\n\\\\tself indent: delta fromStream: inStream toStream: outStream.\\\\n\\\\n\\\\t\\\\\\\"Adjust the range that will be highlighted later\\\\\\\"\\\\n\\\\tadjustStart ifTrue: [realStart := (realStart + delta) max: start].\\\\n\\\\trealStop := realStop + outStream position - size.\\\\n\\\\n\\\\t\\\\\\\"Prepare for another iteration\\\\\\\"\\\\n\\\\tindentation := indentation + delta.\\\\n\\\\tsize := outStream position.\\\\n\\\\tinStream := outStream setFrom: 1 to: size.\\\\n\\\\n\\\\toutStream == nil\\\\n\\\\t\\\\tifTrue: \\\\t\\\\\\\"tried to outdent but some line(s) were already left flush\\\\\\\"\\\\n\\\\t\\\\t\\\\t[view flash]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self selectInvisiblyFrom: start to: stop.\\\\n\\\\t\\\\t\\\\tsize = newString size ifFalse: [newString _ outStream contents].\\\\n\\\\t\\\\t\\\\tself replaceSelectionWith: newString asText].\\\\n\\\\tself selectFrom: realStart to: realStop. \\\\t\\\\\\\"highlight only the original range\\\\\\\"\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys'!\\\\nindent: characterStream\\\\n\\\\t\\\\\\\"Add a tab at the front of every line occupied by the selection. Flushes typeahead.  Invoked from keyboard via cmd-shift-R.  2/29/96 sw\\\\\\\"\\\\n\\\\n\\\\t^ self inOutdent: characterStream delta: 1! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'di 9/7/1999 08:25'!\\\\ninspectIt: characterStream \\\\n\\\\t\\\\\\\"Inspect the selection -- invoked via cmd-i.  If there is no current selection, use the current line.  1/17/96 sw\\\\n\\\\t 2/29/96 sw: don't call selectLine; it's done by inspectIt now\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself terminateAndInitializeAround: [self inspectIt].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'md 1/18/2006 23:42'!\\\\nmakeCapitalized: characterStream \\\\n\\\\t\\\\\\\"Force the current selection to be capitalized. Triggered by Cmd-Z.\\\\\\\"\\\\n\\\\t| prev |\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"Flush the triggering cmd-key character\\\\\\\"\\\\n\\\\tprev _ $-.  \\\\\\\"not a letter\\\\\\\"\\\\n\\\\tself replaceSelectionWith: (Text fromString:\\\\n\\\\t\\\\t\\\\t(self selection string collect:\\\\n\\\\t\\\\t\\\\t\\\\t[:c | prev _ prev isLetter ifTrue: [c asLowercase] ifFalse: [c asUppercase]])).\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'di 5/28/1998 12:00'!\\\\nmakeLowercase: characterStream \\\\n\\\\t\\\\\\\"Force the current selection to lowercase.  Triggered by Cmd-X.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush the triggering cmd-key character\\\\\\\"\\\\n\\\\tself replaceSelectionWith: (Text fromString: (self selection string asLowercase)).\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'th 9/18/2002 16:21'!\\\\nmakeProjectLink: characterStream \\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\n\\\\t| attribute oldAttributes thisSel |\\\\n\\\\t\\\\n\\\\tsensor keyboard.\\\\n\\\\toldAttributes _ paragraph text attributesAt: self pointIndex forStyle: paragraph textStyle.\\\\n\\\\tthisSel _ self selection.\\\\n\\\\n\\\\tattribute _ TextSqkProjectLink new. \\\\n\\\\tthisSel _ attribute analyze: self selection asString.\\\\n\\\\n\\\\tthisSel ifNil: [^ true].\\\\n\\\\tbeginTypeInBlock ~~ nil\\\\n\\\\t\\\\tifTrue:  \\\\\\\"only change emphasisHere while typing\\\\\\\"\\\\n\\\\t\\\\t\\\\t[self insertTypeAhead: characterStream.\\\\n\\\\t\\\\t\\\\temphasisHere _ Text addAttribute: attribute toArray: oldAttributes.\\\\n\\\\t\\\\t\\\\t^ true].\\\\n\\\\tself replaceSelectionWith: (thisSel asText addAttribute: attribute).\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'ls 11/10/2002 12:11'!\\\\nmakeUppercase: characterStream \\\\n\\\\t\\\\\\\"Force the current selection to uppercase.  Triggered by Cmd-Y.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush the triggering cmd-key character\\\\\\\"\\\\n\\\\tself replaceSelectionWith: (Text fromString: (self selection string asUppercase)).\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'sw 8/1/97 15:18'!\\\\nmethodNamesContainingIt: characterStream \\\\n\\\\t\\\\\\\"Browse methods whose selectors containing the selection in their names\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself methodNamesContainingIt.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'sw 9/9/97 16:44'!\\\\nmethodStringsContainingIt: characterStream \\\\n\\\\t\\\\\\\"Invoked from cmd-E -- open a browser on all methods holding string constants containing it.  Flushes typeahead. \\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\n\\\\tself methodStringsContainingit.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys'!\\\\nnoop: characterStream \\\\n\\\\t\\\\\\\"Unimplemented keyboard command; just ignore it.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t  \\\\\\\"flush character\\\\\\\"\\\\n\\\\t^ true\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'sw 1/19/2000 11:14'!\\\\nofferFontMenu\\\\n\\\\t\\\\\\\"Present a menu of available fonts, and if one is chosen, apply it to the current selection.  \\\\n\\\\tUse only names of Fonts of this paragraph  \\\\\\\"\\\\n\\\\n\\\\t| aList reply |\\\\n\\\\taList _ paragraph textStyle fontNamesWithPointSizes.\\\\n\\\\treply _ (SelectionMenu labelList: aList selections: aList) startUp.\\\\n\\\\treply ~~ nil ifTrue:\\\\n\\\\t\\\\t[self replaceSelectionWith:\\\\n\\\\t\\\\t\\\\t(Text string: self selection asString \\\\n\\\\t\\\\t\\\\t\\\\tattribute: (TextFontChange fontNumber: (aList indexOf: reply)))] ! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys'!\\\\nofferFontMenu: characterStream \\\\n\\\\t\\\\\\\"The user typed the command key that requests a font change; Offer the font menu.  5/27/96 sw\\\\n\\\\t Keeps typeahead.  (?? should flush?)\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself offerFontMenu.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys'!\\\\noutdent: characterStream\\\\n\\\\t\\\\\\\"Remove a tab from the front of every line occupied by the selection. Flushes typeahead.  Invoked from keyboard via cmd-shift-L.  2/29/96 sw\\\\\\\"\\\\n\\\\n\\\\t^ self inOutdent: characterStream delta: -1! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys'!\\\\npaste: characterStream \\\\n\\\\t\\\\\\\"Replace the current text selection by the text in the shared buffer.\\\\n\\\\t Keeps typeahead.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself paste.\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'th 9/19/2002 18:48'!\\\\npasteInitials: characterStream \\\\n\\\\t\\\\\\\"Replace the current text selection by an authorship name/date stamp; invoked by cmd-shift-v, easy way to put an authorship stamp in the comments of an editor.\\\\n\\\\t Keeps typeahead.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself replace: self selectionInterval with: (Text fromString: Utilities changeStamp) and: [self selectAt: self stopIndex].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'di 9/7/1999 08:25'!\\\\nprintIt: characterStream \\\\n\\\\t\\\\\\\"Print the results of evaluting the selection -- invoked via cmd-p.  If there is no current selection, use the current line.  1/17/96 sw\\\\n\\\\t 2/29/96 sw: don't call selectLine now, since it's called by doIt\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself terminateAndInitializeAround: [self printIt].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys'!\\\\nreferencesToIt: characterStream \\\\n\\\\t\\\\\\\"Triggered by Cmd-N; browse references to the current selection\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself referencesToIt.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'di 9/7/1999 08:43'!\\\\nsave: characterStream\\\\n\\\\t\\\\\\\"Submit the current text.  Equivalent to 'accept' 1/18/96 sw\\\\n\\\\t Keeps typeahead.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself terminateAndInitializeAround: [self accept].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys'!\\\\nsendersOfIt: characterStream \\\\n\\\\t\\\\\\\"Triggered by Cmd-n; browse implementors of the selector represented by the current selection, if plausible. 2/1/96 sw\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself sendersOfIt.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'yo 5/27/2004 13:56'!\\\\nsetEmphasis: emphasisSymbol\\\\n\\\\t\\\\\\\"Change the emphasis of the current selection.\\\\\\\"\\\\n\\\\n\\\\t| oldAttributes attribute |\\\\n\\\\toldAttributes _ paragraph text attributesAt: self selectionInterval first forStyle: paragraph textStyle.\\\\n\\\\n\\\\tattribute _ TextEmphasis perform: emphasisSymbol.\\\\n\\\\t(emphasisSymbol == #normal) \\\\n\\\\t\\\\tifFalse:\\\\t[oldAttributes do:\\\\t\\\\n\\\\t\\\\t\\\\t[:att | (att dominates: attribute) ifTrue: [attribute turnOff]]].\\\\n\\\\tself replaceSelectionWith: (self selection addAttribute: attribute)! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'th 9/18/2002 16:20'!\\\\nshiftEnclose: characterStream\\\\n\\\\t\\\\\\\"Insert or remove bracket characters around the current selection.\\\\n\\\\t Flushes typeahead.\\\\\\\"\\\\n\\\\n\\\\t| char left right startIndex stopIndex oldSelection which text |\\\\n\\\\tchar _ sensor keyboard.\\\\n\\\\tchar = $9 ifTrue: [ char _ $( ].\\\\n\\\\tchar = $, ifTrue: [ char _ $< ].\\\\n\\\\tchar = $[ ifTrue: [ char _ ${ ].\\\\n\\\\tchar = $' ifTrue: [ char _ $\\\\\\\" ].\\\\n\\\\tchar asciiValue = 27 ifTrue: [ char _ ${ ].\\\\t\\\\\\\"ctrl-[\\\\\\\"\\\\n\\\\n\\\\tself closeTypeIn.\\\\n\\\\tstartIndex _ self startIndex.\\\\n\\\\tstopIndex _ self stopIndex.\\\\n\\\\toldSelection _ self selection.\\\\n\\\\twhich _ '([<{\\\\\\\"''' indexOf: char ifAbsent: [1].\\\\n\\\\tleft _ '([<{\\\\\\\"''' at: which.\\\\n\\\\tright _ ')]>}\\\\\\\"''' at: which.\\\\n\\\\ttext _ paragraph text.\\\\n\\\\t((startIndex > 1 and: [stopIndex <= text size])\\\\n\\\\t\\\\tand:\\\\n\\\\t\\\\t[(text at: startIndex-1) = left and: [(text at: stopIndex) = right]])\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"already enclosed; strip off brackets\\\\\\\"\\\\n\\\\t\\\\t\\\\tself selectFrom: startIndex-1 to: stopIndex.\\\\n\\\\t\\\\t\\\\tself replaceSelectionWith: oldSelection]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"not enclosed; enclose by matching brackets\\\\\\\"\\\\n\\\\t\\\\t\\\\tself replaceSelectionWith:\\\\n\\\\t\\\\t\\\\t\\\\t(Text string: (String with: left), oldSelection string ,(String with: right)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\temphasis: emphasisHere).\\\\n\\\\t\\\\t\\\\tself selectFrom: startIndex+1 to: stopIndex].\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'di 9/7/1999 08:43'!\\\\nspawnIt: characterStream\\\\n\\\\t\\\\\\\"Triggered by Cmd-o; spawn a new code window, if it makes sense.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\n\\\\tself terminateAndInitializeAround: [self spawn].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'th 9/19/2002 18:00'!\\\\nswapChars: characterStream \\\\n\\\\t\\\\\\\"Triggered byCmd-Y;.  Swap two characters, either those straddling the insertion point, or the two that comprise the selection.  Suggested by Ted Kaehler.  \\\\\\\"\\\\n\\\\n\\\\t| currentSelection aString chars |\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush the triggering cmd-key character\\\\\\\"\\\\n\\\\t(chars _ self selection) size == 0\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[currentSelection _ self pointIndex.\\\\n\\\\t\\\\t\\\\tself selectMark: currentSelection - 1 point: currentSelection]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[chars size == 2\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[view flash.  ^ true]\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[currentSelection _ self pointIndex - 1]].\\\\n\\\\taString _ self selection string.\\\\n\\\\tself replaceSelectionWith: (Text string: aString reversed emphasis: emphasisHere).\\\\n\\\\tself selectAt: currentSelection + 1.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'sw 11/2/1998 15:50'!\\\\ntempCommand: characterStream \\\\n\\\\t\\\\\\\"Experimental.  Triggered by Cmd-t; put trial cmd-key commands here to see how they work, before hanging them on their own cmd accelerators.\\\\\\\"\\\\n\\\\tSensor keyboard.\\\\n\\\\tself experimentalCommand.\\\\n\\\\t^ true\\\\n\\\\n\\\\t\\\\\\\"sensor keyboard.\\\\n\\\\tself spawnWorkspace.\\\\n\\\\t^ true\\\\\\\"! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys'!\\\\nundo: characterStream \\\\n\\\\t\\\\\\\"Undo the last edit.  Keeps typeahead, so undo twice is a full redo.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard. \\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself undo.\\\\n\\\\t^true! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'explain' stamp: 'nk 6/26/2003 22:02'!\\\\nexplainAnySel: symbol \\\\n\\\\t\\\\\\\"Is this any message selector?\\\\\\\"\\\\n\\\\n\\\\t| list reply |\\\\n\\\\tlist _ self systemNavigation allClassesImplementing: symbol.\\\\n\\\\tlist size = 0 ifTrue: [^nil].\\\\n\\\\tlist size < 12\\\\n\\\\t\\\\tifTrue: [reply _ ' is a message selector which is defined in these classes ' , list printString]\\\\n\\\\t\\\\tifFalse: [reply _ ' is a message selector which is defined in many classes'].\\\\n\\\\t^'\\\\\\\"' , symbol , reply , '.\\\\\\\"' , '\\\\\\\\' withCRs, 'SystemNavigation new browseAllImplementorsOf: #' , symbol! !\\\\n\\\\n!ParagraphEditor methodsFor: 'explain' stamp: 'di 1/30/2002 21:09'!\\\\nexplainChar: string\\\\n\\\\t\\\\\\\"Does string start with a special character?\\\\\\\"\\\\n\\\\n\\\\t| char |\\\\n\\\\tchar _ string at: 1.\\\\n\\\\tchar = $. ifTrue: [^'\\\\\\\"Period marks the end of a Smalltalk statement.  A period in the middle of a number means a decimal point.  (The number is an instance of class Float).\\\\\\\"'].\\\\n\\\\tchar = $' ifTrue: [^'\\\\\\\"The characters between two single quotes are made into an instance of class String\\\\\\\"'].\\\\n\\\\tchar = $\\\\\\\" ifTrue: [^'\\\\\\\"Double quotes enclose a comment.  Smalltalk ignores everything between double quotes.\\\\\\\"'].\\\\n\\\\tchar = $# ifTrue: [^'\\\\\\\"The characters following a hash mark are made into an instance of class Symbol.  If parenthesis follow a hash mark, an instance of class Array is made.  It contains literal constants.\\\\\\\"'].\\\\n\\\\t(char = $( or: [char = $)]) ifTrue: [^'\\\\\\\"Expressions enclosed in parenthesis are evaluated first\\\\\\\"'].\\\\n\\\\t(char = $[ or: [char = $]]) ifTrue: [^'\\\\\\\"The code inside square brackets is an unevaluated block of code.  It becomes an instance of BlockContext and is usually passed as an argument.\\\\\\\"'].\\\\n\\\\t(char = ${ or: [char = $}]) ifTrue: [^ '\\\\\\\"A sequence of expressions separated by periods, when enclosed in curly braces, are evaluated to yield the elements of a new Array\\\\\\\"'].\\\\n\\\\t(char = $< or: [char = $>]) ifTrue: [^'\\\\\\\"<primitive: xx> means that this method is usually preformed directly by the virtual machine.  If this method is primitive, its Smalltalk code is executed only when the primitive fails.\\\\\\\"'].\\\\n\\\\tchar = $^ ifTrue: [^'\\\\\\\"Uparrow means return from this method.  The value returned is the expression following the ^\\\\\\\"'].\\\\n\\\\tchar = $| ifTrue: [^'\\\\\\\"Vertical bars enclose the names of the temporary variables used in this method.  In a block, the vertical bar separates the argument names from the rest of the code.\\\\\\\"'].\\\\n\\\\tchar = $_ ifTrue: [^'\\\\\\\"Left arrow means assignment.  The value of the expression after the left arrow is stored into the variable before it.\\\\\\\"'].\\\\n\\\\tchar = $; ifTrue: [^'\\\\\\\"Semicolon means cascading.  The message after the semicolon is sent to the same object which received the message before the semicolon.\\\\\\\"'].\\\\n\\\\tchar = $: ifTrue: [^'\\\\\\\"A colon at the end of a keyword means that an argument is expected to follow.  Methods which take more than one argument have selectors with more than one keyword.  (One keyword, ending with a colon, appears before each argument).', '\\\\\\\\\\\\\\\\' withCRs, 'A colon before a variable name just inside a block means that the block takes an agrument.  (When the block is evaluated, the argument will be assigned to the variable whose name appears after the colon).\\\\\\\"'].\\\\n\\\\tchar = $$ ifTrue: [^'\\\\\\\"The single character following a dollar sign is made into an instance of class Character\\\\\\\"'].\\\\n\\\\tchar = $- ifTrue: [^'\\\\\\\"A minus sign in front of a number means a negative number.\\\\\\\"'].\\\\n\\\\tchar = $e ifTrue: [^'\\\\\\\"An e in the middle of a number means that the exponent follows.\\\\\\\"'].\\\\n\\\\tchar = $r ifTrue: [^'\\\\\\\"An r in the middle of a bunch of digits is an instance of Integer expressed in a certain radix.  The digits before the r denote the base and the digits after it express a number in that base.\\\\\\\"'].\\\\n\\\\tchar = Character space ifTrue: [^'\\\\\\\"the space Character\\\\\\\"'].\\\\n\\\\tchar = Character tab ifTrue: [^'\\\\\\\"the tab Character\\\\\\\"'].\\\\n\\\\tchar = Character cr ifTrue: [^'\\\\\\\"the carriage return Character\\\\\\\"'].\\\\n\\\\t^nil! !\\\\n\\\\n!ParagraphEditor methodsFor: 'explain' stamp: 'nk 6/10/2004 07:02'!\\\\nexplainClass: symbol \\\\n\\\\t\\\\\\\"Is symbol a class variable or a pool variable?\\\\\\\"\\\\n\\\\t| class reply classes |\\\\n\\\\t(model respondsTo: #selectedClassOrMetaClass)\\\\n\\\\t\\\\tifFalse: [^ nil].\\\\n\\\\t(class _ model selectedClassOrMetaClass) ifNil: [^ nil].\\\\n\\\\t\\\\\\\"no class is selected\\\\\\\"\\\\n\\\\t(class isKindOf: Metaclass)\\\\n\\\\t\\\\tifTrue: [class _ class soleInstance].\\\\n\\\\tclasses _ (Array with: class)\\\\n\\\\t\\\\t\\\\t\\\\t, class allSuperclasses.\\\\n\\\\t\\\\\\\"class variables\\\\\\\"\\\\n\\\\treply _ classes detect: [:each | (each classVarNames detect: [:name | symbol = name]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifNone: [])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t~~ nil]\\\\n\\\\t\\\\t\\\\t\\\\tifNone: [].\\\\n\\\\treply == nil ifFalse: [^ '\\\\\\\"is a class variable, defined in class ' , reply printString , '\\\\\\\"\\\\\\\\' withCRs , 'SystemNavigation new browseAllCallsOn: (' , reply printString , ' classPool associationAt: #' , symbol , ').'].\\\\n\\\\t\\\\\\\"pool variables\\\\\\\"\\\\n\\\\tclasses do: [:each | (each sharedPools\\\\n\\\\t\\\\t\\\\tdetect: [:pool | (pool includesKey: symbol)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[reply _ pool.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttrue]]\\\\n\\\\t\\\\t\\\\tifNone: [])\\\\n\\\\t\\\\t\\\\t~~ nil].\\\\n\\\\treply\\\\n\\\\t\\\\tifNil: [(Undeclared includesKey: symbol)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [^ '\\\\\\\"is an undeclared variable.' , '\\\\\\\"\\\\\\\\' withCRs , 'SystemNavigation new browseAllCallsOn: (Undeclared associationAt: #' , symbol , ').']]\\\\n\\\\t\\\\tifNotNil: \\\\n\\\\t\\\\t\\\\t[classes _ WriteStream on: Array new.\\\\n\\\\t\\\\t\\\\tself systemNavigation\\\\n\\\\t\\\\t\\\\t\\\\tallBehaviorsDo: [:each | (each sharedPools\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdetect: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:pool | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tpool == reply]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifNone: [])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t~~ nil ifTrue: [classes nextPut: each]].\\\\n\\\\t\\\\t\\\\t\\\\\\\"Perhaps not print whole list of classes if too long. (unlikely)\\\\\\\"\\\\n\\\\t\\\\t\\\\t^ '\\\\\\\"is a pool variable from the pool ' , (Smalltalk keyAtIdentityValue: reply) asString , ', which is used by the following classes ' , classes contents printString , '\\\\\\\"\\\\\\\\' withCRs , 'SystemNavigation new browseAllCallsOn: (' , (Smalltalk keyAtIdentityValue: reply) asString , ' bindingOf: #' , symbol , ').'].\\\\n\\\\t^ nil! !\\\\n\\\\n!ParagraphEditor methodsFor: 'explain' stamp: 'sw 5/3/1998 14:32'!\\\\nexplainCtxt: symbol \\\\n\\\\t\\\\\\\"Is symbol a context variable?\\\\\\\"\\\\n\\\\n\\\\t| reply classes text cls |\\\\n\\\\tsymbol = #nil ifTrue: [reply _ '\\\\\\\"is a constant.  It is the only instance of class UndefinedObject.  nil is the initial value of all variables.\\\\\\\"'].\\\\n\\\\tsymbol = #true ifTrue: [reply _ '\\\\\\\"is a constant.  It is the only instance of class True and is the receiver of many control messages.\\\\\\\"'].\\\\n\\\\tsymbol = #false ifTrue: [reply _ '\\\\\\\"is a constant.  It is the only instance of class False and is the receiver of many control messages.\\\\\\\"'].\\\\n\\\\tsymbol = #thisContext ifTrue: [reply _ '\\\\\\\"is a context variable.  Its value is always the MethodContext which is executing this method.\\\\\\\"'].\\\\n\\\\t(model respondsTo: #selectedClassOrMetaClass) ifTrue: [\\\\n\\\\t\\\\tcls _ model selectedClassOrMetaClass].\\\\n\\\\tcls ifNil: [^ reply].\\\\t  \\\\\\\"no class known\\\\\\\"\\\\n\\\\tsymbol = #self ifTrue: \\\\n\\\\t\\\\t\\\\t[classes _ cls withAllSubclasses.\\\\n\\\\t\\\\t\\\\tclasses size > 12\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [text _ cls printString , ' or a subclass']\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[classes _ classes printString.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttext _ 'one of these classes' , (classes copyFrom: 4 to: classes size)].\\\\n\\\\t\\\\t\\\\treply _ '\\\\\\\"is the receiver of this message; an instance of ' , text , '\\\\\\\"'].\\\\n\\\\tsymbol = #super ifTrue: [reply _ '\\\\\\\"is just like self.  Messages to super are looked up in the superclass (' , cls superclass printString , ')\\\\\\\"'].\\\\n\\\\t^reply! !\\\\n\\\\n!ParagraphEditor methodsFor: 'explain' stamp: 'tpr 5/29/2003 20:07'!\\\\nexplainGlobal: symbol \\\\n\\\\t\\\\\\\"Is symbol a global variable?\\\\\\\"\\\\n\\\\t| reply classes |\\\\n\\\\treply _ Smalltalk at: symbol ifAbsent: [^nil].\\\\n\\\\t(reply class == Dictionary or:[reply isKindOf: SharedPool class])\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[classes _ Set new.\\\\n\\\\t\\\\t\\\\tself systemNavigation allBehaviorsDo: [:each | (each sharedPools detect: [:pool | pool == reply]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifNone: [])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t~~ nil ifTrue: [classes add: each]].\\\\n\\\\t\\\\t\\\\tclasses _ classes printString.\\\\n\\\\t\\\\t\\\\t^'\\\\\\\"is a global variable.  It is a pool which is used by the following classes ' , (classes allButFirst: 5) , '\\\\\\\"'].\\\\n\\\\t(reply isKindOf: Behavior)\\\\n\\\\t\\\\tifTrue: [^'\\\\\\\"is a global variable.  ' , symbol , ' is a class in category ', reply category,\\\\n\\\\t\\\\t\\\\t'.\\\\\\\"', '\\\\\\\\' withCRs, 'Browser newOnClass: ' , symbol , '.'].\\\\n\\\\tsymbol == #Smalltalk ifTrue: [^'\\\\\\\"is a global.  Smalltalk is the only instance of SystemDictionary and holds all global variables.\\\\\\\"'].\\\\n\\\\t^'\\\\\\\"is a global variable.  ' , symbol , ' is ' , reply printString , '\\\\\\\"'! !\\\\n\\\\n!ParagraphEditor methodsFor: 'explain' stamp: 'tpr 5/12/2004 16:22'!\\\\nexplainInst: string \\\\n\\\\t\\\\\\\"Is string an instance variable of this class?\\\\\\\"\\\\n\\\\t| classes cls |\\\\n\\\\n\\\\t(model respondsTo: #selectedClassOrMetaClass) ifTrue: [\\\\n\\\\t\\\\tcls _ model selectedClassOrMetaClass].\\\\n\\\\tcls ifNil: [^ nil].\\\\t  \\\\\\\"no class known\\\\\\\"\\\\n\\\\tclasses _ (Array with: cls)\\\\n\\\\t\\\\t\\\\t\\\\t, cls allSuperclasses.\\\\n\\\\tclasses _ classes detect: [:each | (each instVarNames\\\\n\\\\t\\\\t\\\\tdetect: [:name | name = string] ifNone: [])\\\\n\\\\t\\\\t\\\\t~~ nil] ifNone: [^nil].\\\\n\\\\tclasses _ classes printString.\\\\n\\\\t^ '\\\\\\\"is an instance variable of the receiver; defined in class ' , classes , \\\\n\\\\t\\\\t'\\\\\\\"\\\\\\\\' withCRs , classes , ' systemNavigation browseAllAccessesTo: ''' , string , ''' from: ', classes, '.'! !\\\\n\\\\n!ParagraphEditor methodsFor: 'explain' stamp: 'nb 5/6/2003 16:54'!\\\\nexplainMySel: symbol \\\\n\\\\t\\\\\\\"Is symbol the selector of this method?  Is it sent by this method?  If \\\\n\\\\tnot, then expalin will call (explainPartSel:) to see if it is a fragment of a \\\\n\\\\tselector sent here.  If not, explain will call (explainAnySel:) to catch any \\\\n\\\\tselector. \\\\\\\"\\\\n\\\\n\\\\t| lits classes msg |\\\\n\\\\t(model respondsTo: #selectedMessageName) ifFalse: [^ nil].\\\\n\\\\t(msg _ model selectedMessageName) ifNil: [^nil].\\\\t\\\\\\\"not in a message\\\\\\\"\\\\n\\\\tclasses _ self systemNavigation allClassesImplementing: symbol.\\\\n\\\\tclasses size > 12\\\\n\\\\t\\\\tifTrue: [classes _ 'many classes']\\\\n\\\\t\\\\tifFalse: [classes _ 'these classes ' , classes printString].\\\\n\\\\tmsg = symbol\\\\n\\\\t\\\\tifTrue: [^ '\\\\\\\"' , symbol , ' is the selector of this very method!!  It is defined in ',\\\\n\\\\t\\\\t\\\\tclasses , '.  To see the other definitions, go to the message list pane, get the menu from the top of the scroll bar, and select ''implementors of...''.\\\\\\\"']\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[lits _ (model selectedClassOrMetaClass compiledMethodAt:\\\\n\\\\t\\\\t\\\\t\\\\tmsg) messages.\\\\n\\\\t\\\\t\\\\t(lits detect: [:each | each == symbol]\\\\n\\\\t\\\\t\\\\t\\\\tifNone: [])\\\\n\\\\t\\\\t\\\\t\\\\t== nil ifTrue: [^nil].\\\\n\\\\t\\\\t\\\\t^ '\\\\\\\"' , symbol , ' is a message selector which is defined in ', classes , '.  To see the definitions, go to the message list pane, get the menu from the top of the scroll bar, and select ''implementors of...''.\\\\\\\"'].! !\\\\n\\\\n!ParagraphEditor methodsFor: 'explain' stamp: 'apb 1/5/2000 16:56'!\\\\nexplainNumber: string \\\\n\\\\t\\\\\\\"Is string a Number?\\\\\\\"\\\\n\\\\n\\\\t| strm c |\\\\n\\\\t(c _ string at: 1) isDigit ifFalse: [(c = $- and: [string size > 1 and: [(string at: 2) isDigit]])\\\\n\\\\t\\\\t\\\\tifFalse: [^nil]].\\\\n\\\\tstrm _ ReadStream on: string.\\\\n\\\\tc _ Number readFrom: strm.\\\\n\\\\tstrm atEnd ifFalse: [^nil].\\\\n\\\\tc printString = string\\\\n\\\\t\\\\tifTrue: [^'\\\\\\\"' , string , ' is a ' , c class name , '\\\\\\\"']\\\\n\\\\t\\\\tifFalse: [^'\\\\\\\"' , string , ' (= ' , c printString , ') is a ' , c class name , '\\\\\\\"']! !\\\\n\\\\n!ParagraphEditor methodsFor: 'explain' stamp: 'nb 5/6/2003 16:54'!\\\\nexplainPartSel: string \\\\n\\\\t\\\\\\\"Is this a fragment of a multiple-argument selector sent in this method?\\\\\\\"\\\\n\\\\t| lits whole reply classes s msg |\\\\n\\\\n\\\\t(model respondsTo: #selectedMessageName) ifFalse: [^ nil].\\\\n\\\\t(msg _ model selectedMessageName) ifNil: [^ nil].  \\\\\\\"not in a message\\\\\\\"\\\\n\\\\tstring last == $: ifFalse: [^ nil].\\\\n\\\\t\\\\\\\"Name of this method\\\\\\\"\\\\n\\\\tlits _ Array with: msg.\\\\n\\\\t(whole _ lits detect: [:each | (each keywords detect: [:frag | frag = string]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifNone: []) ~~ nil]\\\\n\\\\t\\\\t\\\\t\\\\tifNone: []) ~~ nil\\\\n\\\\t\\\\tifTrue: [reply _ ', which is the selector of this very method!!'.\\\\n\\\\t\\\\t\\\\ts _ '.  To see the other definitions, go to the message list pane, get the menu from the top of the scroll bar, and select ''implementors of...''.\\\\\\\"']\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"Selectors called from this method\\\\\\\"\\\\n\\\\t\\\\t\\\\tlits _ (model selectedClassOrMetaClass compiledMethodAt:\\\\n\\\\t\\\\t\\\\t\\\\tmsg) messages.\\\\n\\\\t\\\\t\\\\t(whole _ lits detect: [:each | (each keywords detect: [:frag | frag = string]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifNone: []) ~~ nil]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifNone: []) ~~ nil\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [string = 'primitive:'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [^self explainChar: '<']\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [^nil]].\\\\n\\\\t\\\\t\\\\treply _ '.'.\\\\n\\\\t\\\\t\\\\ts _ '.  To see the definitions, go to the message list pane, get the menu from the top of the scroll bar, and select ''implementors of...''.\\\\\\\"'].\\\\n\\\\tclasses _ self systemNavigation allClassesImplementing: whole.\\\\n\\\\tclasses size > 12\\\\n\\\\t\\\\tifTrue: [classes _ 'many classes']\\\\n\\\\t\\\\tifFalse: [classes _ 'these classes ' , classes printString].\\\\n\\\\t^ '\\\\\\\"' , string , ' is one part of the message selector ' , whole, reply , '  It is defined in ' , classes , s! !\\\\n\\\\n!ParagraphEditor methodsFor: 'explain'!\\\\nexplainScan: string \\\\n\\\\t\\\\\\\"Remove beginning and trailing space, tab, cr.\\\\n\\\\t 1/15/96 sw: copied intact from BrowserCodeController\\\\\\\"\\\\n\\\\n\\\\t| c beg end |\\\\n\\\\tbeg _ 1.\\\\n\\\\tend _ string size.\\\\n\\\\t\\\\n\\\\t[beg = end ifTrue: [^string copyFrom: 1 to: 1].\\\\n\\\\t\\\\\\\"if all blank, tell about the first\\\\\\\"\\\\n\\\\tc _ string at: beg.\\\\n\\\\tc = Character space or: [c = Character tab or: [c = Character cr]]]\\\\n\\\\t\\\\twhileTrue: [beg _ beg + 1].\\\\n\\\\t\\\\n\\\\t[c _ string at: end.\\\\n\\\\tc = Character space or: [c = Character tab or: [c = Character cr]]]\\\\n\\\\t\\\\twhileTrue: [end _ end - 1].\\\\n\\\\t^string copyFrom: beg to: end\\\\t\\\\\\\"Return purely visible characters\\\\\\\"! !\\\\n\\\\n!ParagraphEditor methodsFor: 'explain' stamp: 'tk 4/1/98 14:19'!\\\\nexplainTemp: string \\\\n\\\\t\\\\\\\"Is string the name of a temporary variable (or block argument variable)?\\\\\\\"\\\\n\\\\n\\\\t| selectedClass tempNames i reply methodNode method msg |\\\\n\\\\t(model respondsTo: #selectedMessageName) ifFalse: [^ nil].\\\\n\\\\t(msg _ model selectedMessageName) ifNil: [^nil].\\\\t\\\\\\\"not in a message\\\\\\\"\\\\n\\\\tselectedClass _ model selectedClassOrMetaClass.\\\\n\\\\ttempNames _ selectedClass parserClass new \\\\n\\\\t\\\\t\\\\tparseArgsAndTemps: model selectedMessage notifying: nil.\\\\n\\\\tmethod _ selectedClass compiledMethodAt: msg.\\\\n\\\\t(i _ tempNames findFirst: [:each | each = string]) = 0 ifTrue: [\\\\n\\\\t\\\\t(method numTemps > tempNames size)\\\\n\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t[\\\\\\\"It must be an undeclared block argument temporary\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tmethodNode _ selectedClass compilerClass new\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tparse: model selectedMessage\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tin: selectedClass\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnotifying: nil.\\\\n\\\\t\\\\t\\\\t\\\\ttempNames _ methodNode tempNames]\\\\n\\\\t\\\\t\\\\tifFalse: [^nil]].\\\\n\\\\t(i _ tempNames findFirst: [:each | each = string]) > 0 ifTrue: [i > method numArgs\\\\n\\\\t\\\\t\\\\tifTrue: [reply _ '\\\\\\\"is a temporary variable in this method\\\\\\\"']\\\\n\\\\t\\\\t\\\\tifFalse: [reply _ '\\\\\\\"is an argument to this method\\\\\\\"']].\\\\n\\\\t^reply! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'initialize-release'!\\\\nchangeParagraph: aParagraph \\\\n\\\\t\\\\\\\"Install aParagraph as the one to be edited by the receiver.\\\\\\\"\\\\n\\\\n\\\\tUndoParagraph == paragraph ifTrue: [UndoParagraph _ nil].\\\\n\\\\tparagraph _ aParagraph.\\\\n\\\\tself resetState! !\\\\n\\\\n!ParagraphEditor methodsFor: 'initialize-release' stamp: 'th 10/21/2003 15:49'!\\\\nresetState \\\\n\\\\t\\\\\\\"Establish the initial conditions for editing the paragraph: place caret \\\\n\\\\tbefore first character, set the emphasis to that of the first character,\\\\n\\\\tand save the paragraph for purposes of canceling.\\\\\\\"\\\\n\\\\n\\\\tstopBlock _ paragraph defaultCharacterBlock.\\\\n\\\\tself pointBlock: stopBlock copy.\\\\n\\\\tbeginTypeInBlock _ nil.\\\\n\\\\tUndoInterval _ otherInterval _ 1 to: 0.\\\\n\\\\tself setEmphasisHere.\\\\n\\\\tselectionShowing _ false.\\\\n\\\\tinitialText _ paragraph text copy! !\\\\n\\\\n!ParagraphEditor methodsFor: 'initialize-release' stamp: 'di 5/15/2000 13:51'!\\\\nstateArray\\\\n\\\\t^ {ChangeText.\\\\n\\\\t\\\\tFindText.\\\\n\\\\t\\\\tUndoInterval.\\\\n\\\\t\\\\tUndoMessage.\\\\n\\\\t\\\\tUndoParagraph.\\\\n\\\\t\\\\tUndoSelection.\\\\n\\\\t\\\\tUndone.\\\\n\\\\t\\\\tself selectionInterval.\\\\n\\\\t\\\\tself startOfTyping.\\\\n\\\\t\\\\temphasisHere}! !\\\\n\\\\n!ParagraphEditor methodsFor: 'initialize-release' stamp: 'di 10/5/1998 17:03'!\\\\nstateArrayPut: stateArray\\\\n\\\\t| sel |\\\\n\\\\tChangeText _ stateArray at: 1.\\\\n\\\\tFindText _ stateArray at: 2.\\\\n\\\\tUndoInterval _ stateArray at: 3.\\\\n\\\\tUndoMessage _ stateArray at: 4.\\\\n\\\\tUndoParagraph _ stateArray at: 5.\\\\n\\\\tUndoSelection _ stateArray at: 6.\\\\n\\\\tUndone _ stateArray at: 7.\\\\n\\\\tsel _ stateArray at: 8.\\\\n\\\\tself selectFrom: sel first to: sel last.\\\\n\\\\tbeginTypeInBlock _ stateArray at: 9.\\\\n\\\\temphasisHere _ stateArray at: 10.! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'jm 5/3/1998 19:19'!\\\\naccept\\\\n\\\\t\\\\\\\"Save the current text of the text being edited as the current acceptable version for purposes of canceling.\\\\\\\"\\\\n\\\\n\\\\tinitialText _ paragraph text copy.\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages'!\\\\nagain\\\\n\\\\t\\\\\\\"Text substitution. If the left shift key is down, the substitution is made \\\\n\\\\tthroughout the entire Paragraph. Otherwise, only the next possible \\\\n\\\\tsubstitution is made.\\\\n\\\\tUndoer & Redoer: #undoAgain:andReselect:typedKey:.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"If last command was also 'again', use same keys as before\\\\\\\"\\\\n\\\\tself againOrSame: (UndoMessage sends: #undoAgain:andReselect:typedKey:)! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages'!\\\\nalign\\\\n\\\\t\\\\\\\"Align text according to the next greater alignment value--cycling among \\\\n\\\\tleft flush, right flush, center, justified.  No effect on the undoability of the pre\\\\n\\\\tpreceding command.\\\\\\\"\\\\n\\\\n\\\\tparagraph toggleAlignment.\\\\n\\\\tparagraph displayOn: Display.\\\\n\\\\tself recomputeInterval! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'md 8/2/2005 20:53'!\\\\nbrowseClassFromIt\\\\n\\\\t\\\\\\\"Launch a browser for the class indicated by the current selection. \\\\n\\\\tIf multiple classes matching the selection exist, let the user choose among them.\\\\\\\"\\\\n\\\\t| aBrow aClass |\\\\n\\\\tself\\\\n\\\\t\\\\tlineSelectAndEmptyCheck: [^ self].\\\\n\\\\taClass := Utilities\\\\n\\\\t\\\\t\\\\t\\\\tclassFromPattern: (self selection string copyWithout: Character cr)\\\\n\\\\t\\\\t\\\\t\\\\twithCaption: 'choose a class to browse...'.\\\\n\\\\taClass\\\\n\\\\t\\\\tifNil: [^ view flash].\\\\n\\\\tself\\\\n\\\\t\\\\tterminateAndInitializeAround: \\\\n\\\\t\\\\t\\\\t[aBrow := SystemBrowser default new.\\\\n\\\\t\\\\t\\\\taBrow setClass: aClass selector: nil.\\\\n\\\\t\\\\t\\\\taBrow class\\\\n\\\\t\\\\t\\\\t\\\\topenBrowserView: (aBrow openEditString: nil) label: 'System Browser'].! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'pmm 7/6/2006 20:50'!\\\\nbrowseIt\\\\n\\\\t\\\\\\\"Launch a browser for the current selection, if appropriate\\\\\\\"\\\\n\\\\n\\\\t| aSymbol anEntry |\\\\n\\\\tself flag: #yoCharCases.\\\\n\\\\n\\\\tPreferences alternativeBrowseIt ifTrue: [^ self browseClassFromIt].\\\\n\\\\n\\\\tself lineSelectAndEmptyCheck: [^ self].\\\\n\\\\t(aSymbol _ self selectedSymbol) isNil ifTrue: [^ view flash].\\\\n\\\\n\\\\tself terminateAndInitializeAround:\\\\n\\\\t\\\\t[aSymbol first isUppercase\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[anEntry _ (Smalltalk\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tat: aSymbol\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifAbsent:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[ self systemNavigation browseAllImplementorsOf: aSymbol.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^ nil]).\\\\n\\\\t\\\\t\\\\t\\\\tanEntry isNil ifTrue: [^ view flash].\\\\n\\\\t\\\\t\\\\t\\\\t(anEntry isBehavior or: [ anEntry isTrait ])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [ anEntry := anEntry class ].\\\\n\\\\t\\\\t\\\\t\\\\tToolSet browse: anEntry selector: nil.\\\\n\\\\t\\\\t] ifFalse:[ self systemNavigation browseAllImplementorsOf: aSymbol]]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'sw 1/15/98 12:57'!\\\\ncancel \\\\n\\\\t\\\\\\\"Restore the text of the paragraph to be the text saved since initialization \\\\n\\\\tor the last accept.  Undoer & Redoer: undoAndReselect:redoAndReselect:.\\\\n\\\\tThis used to call controlTerminate and controlInitialize but this seemed illogical.\\\\n\\\\tSure enough, nobody overrode them who had cancel in the menu, and if\\\\n\\\\tanybody really cared they could override cancel.\\\\\\\"\\\\n\\\\n\\\\tUndoSelection _ paragraph text.\\\\n\\\\tself undoer: #undoAndReselect:redoAndReselect: with: self selectionInterval with: (1 to: 0).\\\\n\\\\tview ifNotNil: [view clearInside].\\\\n\\\\tself changeParagraph: (paragraph text: initialText).\\\\n\\\\tUndoParagraph _ paragraph.\\\\n\\\\totherInterval _ UndoInterval _ 1 to: initialText size. \\\\\\\"so undo will replace all\\\\\\\"\\\\n\\\\tparagraph displayOn: Display.\\\\n\\\\tself selectAt: 1.\\\\n\\\\tself scrollToTop\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'yo 2/17/2005 17:53'!\\\\nchangeAlignment\\\\n\\\\t| aList reply  |\\\\n\\\\taList _ #(leftFlush centered justified rightFlush).\\\\n\\\\treply _ (SelectionMenu labelList: (aList collect: [:t | t translated]) selections: aList) startUp.\\\\n\\\\treply ifNil:[^self].\\\\n\\\\tself setAlignment: reply.\\\\n\\\\tparagraph composeAll.\\\\n\\\\tself recomputeSelection.\\\\n\\\\tself mvcRedisplay.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'yo 3/14/2005 13:03'!\\\\nchangeEmphasis\\\\n\\\\t| aList reply  |\\\\n\\\\taList _ #(normal bold italic narrow underlined struckOut).\\\\n\\\\treply _ (SelectionMenu labelList: (aList collect: [:t | t translated]) selections: aList) startUp.\\\\n\\\\treply ~~ nil ifTrue:\\\\n\\\\t\\\\t[self setEmphasis: reply.\\\\n\\\\t\\\\tparagraph composeAll.\\\\n\\\\t\\\\tself recomputeSelection.\\\\n\\\\t\\\\tself mvcRedisplay].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'fc 2/19/2004 22:09'!\\\\nchangeEmphasisOrAlignment\\\\n\\\\t| aList reply  |\\\\n\\\\taList _ #(normal bold italic narrow underlined struckOut leftFlush centered rightFlush justified).\\\\n\\\\treply _ (SelectionMenu labelList: aList lines: #(6) selections: aList) startUp.\\\\n\\\\treply ~~ nil ifTrue:\\\\n\\\\t\\\\t[(#(leftFlush centered rightFlush justified) includes: reply)\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[paragraph perform: reply.\\\\n\\\\t\\\\t\\\\t\\\\tself recomputeInterval]\\\\n\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[self setEmphasis: reply.\\\\n\\\\t\\\\t\\\\t\\\\tparagraph composeAll.\\\\n\\\\t\\\\t\\\\t\\\\tself recomputeSelection.\\\\n\\\\t\\\\t\\\\t\\\\tself mvcRedisplay]].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'md 10/22/2003 15:27'!\\\\nchangeStyle\\\\n\\\\t\\\\\\\"Let user change styles for the current text pane  \\\\n\\\\t Moved from experimentalCommand to its own method  \\\\\\\"\\\\n\\\\n\\\\t| aList reply style |\\\\n\\\\taList _ StrikeFont actualFamilyNames.\\\\n\\\\taList addFirst: 'DefaultTextStyle'.\\\\n\\\\treply _ (SelectionMenu labelList: aList lines: #(1) selections: aList) startUp.\\\\n\\\\treply ifNotNil:\\\\n\\\\t\\\\t[(style _ TextStyle named: reply) ifNil: [Beeper beep. ^ true].\\\\n\\\\t\\\\tparagraph textStyle: style copy.\\\\n\\\\t\\\\tparagraph composeAll.\\\\n\\\\t\\\\tself recomputeSelection.\\\\n\\\\t\\\\tself mvcRedisplay].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'RAA 3/15/2001 12:10'!\\\\nchangeStyleTo: aNewStyle\\\\n\\\\n\\\\tparagraph textStyle: aNewStyle.\\\\n\\\\tparagraph composeAll.\\\\n\\\\tself recomputeSelection.\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'sw 9/27/1999 11:54'!\\\\nchooseAlignment\\\\n\\\\tself changeAlignment! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'sd 4/15/2003 22:40'!\\\\nclassCommentsContainingIt\\\\n\\\\t\\\\\\\"Open a browser class comments which contain the current selection somewhere in them.\\\\\\\"\\\\n\\\\n\\\\tself lineSelectAndEmptyCheck: [^ self].\\\\n\\\\tself terminateAndInitializeAround: [\\\\n\\\\t\\\\tself systemNavigation browseClassCommentsWithString: self selection string]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'dvf 8/23/2003 11:51'!\\\\nclassNamesContainingIt\\\\n\\\\t\\\\\\\"Open a browser on classes whose names contain the selected string\\\\\\\"\\\\n\\\\n\\\\tself lineSelectAndEmptyCheck: [^self].\\\\n\\\\tself systemNavigation \\\\n\\\\t\\\\tbrowseClassesWithNamesContaining: self selection string\\\\n\\\\t\\\\tcaseSensitive: Sensor leftShiftDown! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'ar 1/15/2001 18:37'!\\\\nclipboardText\\\\n\\\\n\\\\t^ Clipboard clipboardText! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'ar 1/15/2001 18:38'!\\\\nclipboardText: text\\\\n\\\\n\\\\t^ Clipboard clipboardText: text! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'ar 1/15/2001 18:38'!\\\\nclipboardTextPut: text\\\\n\\\\n\\\\t^ Clipboard clipboardText: text! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'di 11/23/1998 15:21'!\\\\ncompareToClipboard\\\\n\\\\t\\\\\\\"Check to see if whether the receiver's text is the same as the text currently on the clipboard, and inform the user.\\\\\\\"\\\\n\\\\t| s1 s2 |\\\\n\\\\ts1 _ self clipboardText string.\\\\n\\\\ts2 _ paragraph text string.\\\\n\\\\ts1 = s2 ifTrue: [^ self inform: 'Exact match'].\\\\n\\\\n\\\\t(StringHolder new textContents:\\\\n\\\\t\\\\t(TextDiffBuilder buildDisplayPatchFrom: s1 to: s2))\\\\n\\\\t\\\\topenLabel: 'Comparison to Clipboard Text'! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'sw 8/1/97 15:09'!\\\\ncopySelection\\\\n\\\\t\\\\\\\"Copy the current selection and store it in the paste buffer, unless a caret.  Undoer & Redoer: undoCutCopy\\\\\\\"\\\\n\\\\n\\\\tself lineSelectAndEmptyCheck: [^ self].\\\\n\\\\n\\\\t\\\\\\\"Simulate 'substitute: self selection' without locking the controller\\\\\\\"\\\\n\\\\tUndoSelection _ self selection.\\\\n\\\\tself undoer: #undoCutCopy: with: self clipboardText.\\\\n\\\\tUndoInterval _ self selectionInterval.\\\\n\\\\tself clipboardTextPut: UndoSelection! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'sw 8/1/97 16:33'!\\\\ncut\\\\n\\\\t\\\\\\\"Cut out the current selection and redisplay the paragraph if necessary.  Undoer & Redoer: undoCutCopy:\\\\\\\"\\\\n\\\\n\\\\tself lineSelectAndEmptyCheck: [^ self].\\\\n\\\\n\\\\tself replaceSelectionWith: self nullText. \\\\n\\\\tself undoer: #undoCutCopy: with: self clipboardText.\\\\n\\\\tself clipboardTextPut: UndoSelection! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages'!\\\\nexchange\\\\n\\\\t\\\\\\\"See comment in exchangeWith:\\\\\\\"\\\\n\\\\n\\\\tself exchangeWith: otherInterval! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'sma 5/28/2000 09:34'!\\\\nexperimentalCommand\\\\n\\\\t\\\\\\\"Use for experimental command-key implementation.  Using this, \\\\n\\\\tyou can try things out without forever needing to reinitialize the \\\\n\\\\tParagraphEditor.\\\\\\\"\\\\n\\\\n\\\\tself prettyPrint.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'ls 10/10/1999\\\\n11:36'!\\\\nexplain\\\\n\\\\t\\\\\\\"Try to shed some light on what kind of entity the current selection\\\\nis. \\\\n\\\\tThe selection must be a single token or construct. Insert the answer\\\\nafter \\\\n\\\\tthe selection. Send private messages whose names begin with 'explain' \\\\n\\\\tthat return a string if they recognize the selection, else nil.\\\\\\\"\\\\n\\\\n\\\\t| string tiVars cgVars selectors delimitors numbers sorry reply symbol\\\\n|\\\\nCursor execute showWhile: \\\\n\\\\t\\\\t\\\\t[sorry _ '\\\\\\\"Sorry, I can''t explain that.  Please select a single\\\\ntoken, construct, or special character.'.\\\\n\\\\t\\\\t\\\\tsorry _ sorry , (view canDiscardEdits\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: ['  Also, please cancel or accept.\\\\\\\"']\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: ['\\\\\\\"']).\\\\n\\\\t\\\\t\\\\t(string _ self selection asString) isEmpty\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [reply _ '']\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [string _ self explainScan: string.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Remove space, tab, cr\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Temps and Instance vars need only test strings that are all\\\\nletters\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(string detect: [:char | (char isLetter or: [char isDigit]) not]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifNone: []) ifNil: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[tiVars _ self explainTemp: string.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttiVars == nil ifTrue: [tiVars _ self explainInst: string]].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(tiVars == nil and: [model respondsTo: #explainSpecial:])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [tiVars _ model explainSpecial: string].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttiVars == nil\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [tiVars _ '']\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [tiVars _ tiVars , '\\\\\\\\' withCRs].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Context, Class, Pool, and Global vars, and Selectors need \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tonly test symbols\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(Symbol hasInterned: string ifTrue: [:s | symbol _ s])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [cgVars _ self explainCtxt: symbol.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcgVars == nil\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [cgVars _ self explainClass: symbol.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcgVars == nil ifTrue: [cgVars _ self explainGlobal: symbol]].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"See if it is a Selector (sent here or not)\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tselectors _ self explainMySel: symbol.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tselectors == nil\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[selectors _ self explainPartSel: string.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tselectors == nil ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tselectors _ self explainAnySel: symbol]]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [selectors _ self explainPartSel: string].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcgVars == nil\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [cgVars _ '']\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [cgVars _ cgVars , '\\\\\\\\' withCRs].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tselectors == nil\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [selectors _ '']\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [selectors _ selectors , '\\\\\\\\' withCRs].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstring size = 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"single special characters\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdelimitors _ self explainChar: string]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\\\\"matched delimitors\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdelimitors _ self explainDelimitor: string].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnumbers _ self explainNumber: string.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnumbers == nil ifTrue: [numbers _ ''].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdelimitors == nil ifTrue: [delimitors _ ''].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\treply _ tiVars , cgVars , selectors , delimitors , numbers].\\\\n\\\\t\\\\t\\\\treply size = 0 ifTrue: [reply _ sorry].\\\\n\\\\t\\\\t\\\\tself afterSelectionInsertAndSelect: reply]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'di 9/7/1999 08:41'!\\\\nfileItIn\\\\n\\\\t\\\\\\\"Make a Stream on the text selection and fileIn it.\\\\n\\\\t 1/24/96 sw: moved here from FileController; this function can be useful from any text window that shows stuff in chunk format\\\\\\\"\\\\n\\\\n\\\\t| selection |\\\\n\\\\tselection _ self selection.\\\\n\\\\tself terminateAndInitializeAround:\\\\n\\\\t\\\\t[(ReadWriteStream on: selection string from: 1 to: selection size) fileIn].\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'CdG 10/17/2005 20:49'!\\\\nfind\\\\n\\\\t\\\\\\\"Prompt the user for a string to search for, and search the receiver from the current selection onward for it.  1/26/96 sw\\\\\\\"\\\\n\\\\n\\\\t| reply |\\\\n\\\\treply := UIManager default request: 'Find what? ' translated initialAnswer: ''.\\\\n\\\\treply size == 0 ifTrue: [^ self].\\\\n\\\\tself setSearch: reply.\\\\n\\\\tChangeText := FindText.  \\\\\\\"Implies no replacement to againOnce: method\\\\\\\"\\\\n\\\\tself againOrSame: true\\\\n\\\\t\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages'!\\\\nfindAgain\\\\n\\\\t\\\\\\\"Find the text-to-find again.  1/24/96 sw\\\\\\\"\\\\n\\\\n\\\\tself againOrSame: true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages'!\\\\nfit\\\\n\\\\t\\\\\\\"Make the bounding rectangle of the paragraph contain all the text while \\\\n\\\\t not changing the width of the view of the paragraph.  No effect on undoability\\\\n\\\\t of the preceding command.\\\\\\\"\\\\n\\\\n\\\\tparagraph clearVisibleRectangle.\\\\n\\\\tparagraph fit.\\\\n\\\\tparagraph displayOn: Display; outline.\\\\n\\\\tself recomputeInterval! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'sd 4/16/2003 09:42'!\\\\nimplementorsOfIt\\\\n\\\\t\\\\\\\"Open an implementors browser on the selected selector\\\\\\\"\\\\n\\\\n\\\\t| aSelector |\\\\n\\\\tself lineSelectAndEmptyCheck: [^ self].\\\\n\\\\t(aSelector _ self selectedSelector) == nil ifTrue: [^ view flash].\\\\n\\\\tself terminateAndInitializeAround: [ self systemNavigation browseAllImplementorsOf: aSelector]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'th 9/19/2002 18:12'!\\\\nlineSelectAndEmptyCheck: returnBlock\\\\n\\\\t\\\\\\\"If the current selection is an insertion point, expand it to be the entire current line; if after that's done the selection is still empty, then evaluate the returnBlock, which will typically consist of '[^ self]' in the caller -- check senders of this method to understand this.\\\\\\\"\\\\n\\\\n\\\\tself selectLine.  \\\\\\\"if current selection is an insertion point, then first select the entire line in which occurs before proceeding\\\\\\\"\\\\n\\\\tself hasSelection ifFalse: [self flash.  ^ returnBlock value]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'dgd 11/25/2004 18:03'!\\\\nmakeProjectLink\\\\n\\\\t\\\\n\\\\t| attribute thisSel |\\\\n\\\\t\\\\n\\\\tthisSel := self selection.\\\\n\\\\n\\\\tattribute := TextSqkProjectLink new. \\\\n\\\\tthisSel := attribute analyze: self selection asString.\\\\n\\\\n\\\\tthisSel ifNil: [^ true].\\\\n\\\\tself replaceSelectionWith: (thisSel asText addAttribute: attribute).\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'sd 4/16/2003 19:31'!\\\\nmethodNamesContainingIt\\\\n\\\\t\\\\\\\"Open a browser on methods names containing the selected string\\\\\\\"\\\\n\\\\n\\\\tself lineSelectAndEmptyCheck: [^ self].\\\\n\\\\tCursor wait showWhile:\\\\n\\\\t\\\\t[self terminateAndInitializeAround: [self systemNavigation browseMethodsWhoseNamesContain: self selection string withBlanksTrimmed]].\\\\n\\\\tCursor normal show! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'md 9/6/2005 18:45'!\\\\nmethodSourceContainingIt\\\\n\\\\t\\\\\\\"Open a browser on methods which contain the current selection in their source (case-sensitive full-text search of source). Slow!!\\\\\\\"\\\\n\\\\n\\\\tself lineSelectAndEmptyCheck: [^ self].\\\\n\\\\tself systemNavigation browseMethodsWithSourceString: self selection string! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'sd 4/16/2003 19:28'!\\\\nmethodStringsContainingit\\\\n\\\\t\\\\\\\"Open a browser on methods which contain the current selection as part of a string constant.\\\\\\\"\\\\n\\\\n\\\\tself lineSelectAndEmptyCheck: [^ self].\\\\n\\\\tself terminateAndInitializeAround: [self systemNavigation browseMethodsWithString: self selection string]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'di 10/2/97 11:34'!\\\\nmvcRedisplay\\\\n\\\\t\\\\\\\"Overridable by subclasses that do their own display\\\\\\\"\\\\n\\\\tDisplay fill: paragraph clippingRectangle \\\\n\\\\t\\\\t\\\\tfillColor: view backgroundColor.\\\\t\\\\\\\"very brute force\\\\\\\"\\\\n\\\\tself display! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'th 9/20/2002 11:21'!\\\\npaste\\\\n\\\\t\\\\\\\"Paste the text from the shared buffer over the current selection and \\\\n\\\\tredisplay if necessary.  Undoer & Redoer: undoAndReselect.\\\\\\\"\\\\n\\\\n\\\\tself replace: self selectionInterval with: self clipboardText and:\\\\n\\\\t\\\\t[self selectAt: self pointIndex]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'ar 1/15/2001 18:36'!\\\\npasteRecent\\\\n\\\\t\\\\\\\"Paste an item chose from RecentClippings.\\\\\\\"\\\\n\\\\n\\\\t| clipping |\\\\n\\\\t(clipping _ Clipboard chooseRecentClipping) ifNil: [^ self].\\\\n\\\\tClipboard clipboardText: clipping.\\\\n\\\\t^ self paste! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages'!\\\\nperformMenuMessage: aSelector\\\\n\\\\t\\\\\\\"If a menu command is invoked, typeIn must be closed first, the selection\\\\n\\\\t must be unhighlighted before and rehighlighted after, and the marker\\\\n\\\\t must be updated.\\\\\\\"\\\\n\\\\n\\\\tself closeTypeIn.\\\\n\\\\tself deselect.\\\\n\\\\tsuper performMenuMessage: aSelector.\\\\n\\\\tself selectAndScroll.\\\\n\\\\tself updateMarker! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'rbb 2/16/2005 16:49'!\\\\npresentSpecialMenu\\\\n\\\\t\\\\\\\"Present a list of expressions, and if the user chooses one, evaluate it in the context of the receiver, a ParagraphEditor.  Primarily for debugging, this provides a convenient way to talk to the various views, controllers, and models associated with any text pane\\\\\\\"\\\\n\\\\n\\\\t| reply items |\\\\n\\\\tself terminateAndInitializeAround:\\\\n\\\\t\\\\t[reply _ (UIManager default chooseFrom: (items _ self specialMenuItems) lines: #()).\\\\n\\\\t\\\\treply = 0 ifTrue: [^ self].\\\\n\\\\t\\\\tCompiler new evaluate: (items at: reply) in: [] to: self]\\\\n\\\\t! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'sma 5/28/2000 09:40'!\\\\nprettyPrint\\\\n\\\\tself prettyPrint: false! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'md 7/13/2006 16:00'!\\\\nprettyPrint: decorated\\\\n\\\\t\\\\\\\"Reformat the contents of the receiver's view (a Browser).\\\\\\\"\\\\n\\\\n\\\\t| selectedClass newText |\\\\n\\\\tmodel selectedMessageCategoryName ifNil: [^ view flash].\\\\n\\\\tselectedClass _ model selectedClassOrMetaClass.\\\\n\\\\tnewText _ selectedClass prettyPrinterClass\\\\n\\\\t\\\\tformat: self text\\\\n\\\\t\\\\tin: selectedClass\\\\n\\\\t\\\\tnotifying: self\\\\n\\\\t\\\\tdecorated: decorated.\\\\n\\\\tnewText ifNotNil:\\\\n\\\\t\\\\t[self deselect; selectInvisiblyFrom: 1 to: paragraph text size.\\\\n\\\\t\\\\tself replaceSelectionWith: (newText asText makeSelectorBoldIn: selectedClass).\\\\n\\\\t\\\\tself selectAt: 1]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'sma 5/28/2000 09:40'!\\\\nprettyPrintWithColor\\\\n\\\\tself prettyPrint: true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'dew 3/7/2000 21:06'!\\\\nprinterSetup\\\\n\\\\t\\\\n\\\\tTextPrinter defaultTextPrinter inspect\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'sd 4/16/2003 11:47'!\\\\nreferencesToIt\\\\n\\\\t\\\\\\\"Open a references browser on the selected symbol\\\\\\\"\\\\n\\\\n\\\\t| aSymbol |\\\\n\\\\tself selectLine.\\\\n\\\\t((aSymbol _ self selectedSymbol) == nil or:\\\\n\\\\t\\\\t[(Smalltalk includesKey: aSymbol) not])\\\\n\\\\t\\\\t\\\\tifTrue: [^ view flash].\\\\n\\\\n\\\\tself terminateAndInitializeAround: [self systemNavigation browseAllCallsOn: (Smalltalk associationAt: self selectedSymbol)]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'CdG 10/17/2005 20:47'!\\\\nsaveContentsInFile\\\\n\\\\t\\\\\\\"Save the receiver's contents string to a file, prompting the user for a file-name.  Suggest a reasonable file-name.\\\\\\\"\\\\n\\\\n\\\\t| fileName stringToSave parentWindow labelToUse suggestedName lastIndex |\\\\n\\\\tstringToSave := paragraph text string.\\\\n\\\\tstringToSave size == 0 ifTrue: [^ self inform: 'nothing to save.'].\\\\n\\\\tparentWindow := self model dependents\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdetect: [:dep | dep isKindOf: SystemWindow orOf: StandardSystemView]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifNone: [nil].\\\\n\\\\tlabelToUse := parentWindow\\\\n\\\\t\\\\tifNil: \\\\t\\\\t['Untitled']\\\\n\\\\t\\\\tifNotNil: \\\\t[parentWindow label].\\\\n\\\\tsuggestedName := nil.\\\\n\\\\t#(('Decompressed contents of: '\\\\t\\\\t'.gz')) do:  \\\\\\\"can add more here...\\\\\\\"\\\\n\\\\t\\\\t[:leaderTrailer |\\\\n\\\\t\\\\t\\\\t(labelToUse beginsWith: leaderTrailer first) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[suggestedName := labelToUse copyFrom: leaderTrailer first size + 1 to: labelToUse size.\\\\n\\\\t\\\\t\\\\t\\\\t(labelToUse endsWith: leaderTrailer last)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[suggestedName := suggestedName copyFrom: 1 to: suggestedName size - leaderTrailer last size]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[lastIndex := suggestedName lastIndexOf: $. ifAbsent: [0].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(lastIndex = 0 or: [lastIndex = 1]) ifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[suggestedName := suggestedName copyFrom: 1 to: lastIndex - 1]]]].\\\\n\\\\n\\\\tsuggestedName ifNil:\\\\n\\\\t\\\\t[suggestedName := labelToUse, '.text'].\\\\n\\\\t\\\\t\\\\t\\\\n\\\\tfileName := UIManager default request: 'File name?' translated\\\\n\\\\t\\\\t\\\\tinitialAnswer: suggestedName.\\\\n\\\\tfileName isEmptyOrNil ifFalse:\\\\n\\\\t\\\\t[(FileStream newFileNamed: fileName) nextPutAll: stringToSave; close]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'bf 10/13/1999 09:09'!\\\\nselectedSelector\\\\n\\\\t\\\\\\\"Try to make a selector out of the current text selection\\\\\\\"\\\\n\\\\t^self selection string findSelector! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'yo 7/5/2004 16:38'!\\\\nselectedSymbol\\\\n\\\\t\\\\\\\"Return the currently selected symbol, or nil if none.  Spaces, tabs and returns are ignored\\\\\\\"\\\\n\\\\n\\\\t| aString |\\\\n\\\\tself hasCaret ifTrue: [^ nil].\\\\n\\\\taString _ self selection string.\\\\n\\\\taString isOctetString ifTrue: [aString _ aString asOctetString].\\\\n\\\\taString _ aString copyWithoutAll:\\\\n\\\\t\\\\t{Character space.  Character cr.  Character tab}.\\\\n\\\\taString size == 0 ifTrue: [^ nil].\\\\n\\\\tSymbol hasInterned: aString  ifTrue: [:sym | ^ sym].\\\\n\\\\n\\\\t^ nil! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'di 2/23/2001 09:26'!\\\\nselectionAsTiles\\\\n\\\\t\\\\\\\"Try to make new universal tiles from the selected text\\\\\\\"\\\\n\\\\t| selection tiles |\\\\n\\\\n\\\\tselection _ self selection.\\\\n\\\\tself terminateAndInitializeAround:\\\\n\\\\t\\\\t[self currentHand attachMorph: (tiles _ Player tilesFrom: selection).\\\\n\\\\t\\\\tPreferences tileTranslucentDrag\\\\n\\\\t\\\\t\\\\tifTrue: [tiles lookTranslucent]\\\\n\\\\t\\\\t\\\\tifFalse: [tiles align: tiles topLeft \\\\n\\\\t\\\\t\\\\t \\\\t\\\\t\\\\twith: self currentHand position + tiles cursorBaseOffset]].! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'gm 2/16/2003 20:38'!\\\\nsendContentsToPrinter\\\\n\\\\t| textToPrint printer parentWindow |\\\\n\\\\ttextToPrint := paragraph text.\\\\n\\\\ttextToPrint size == 0 ifTrue: [^self inform: 'nothing to print.'].\\\\n\\\\tprinter := TextPrinter defaultTextPrinter.\\\\n\\\\tparentWindow := self model dependents \\\\n\\\\t\\\\t\\\\t\\\\tdetect: [:dep | dep isSystemWindow]\\\\n\\\\t\\\\t\\\\t\\\\tifNone: [nil].\\\\n\\\\tparentWindow isNil \\\\n\\\\t\\\\tifTrue: [printer documentTitle: 'Untitled']\\\\n\\\\t\\\\tifFalse: [printer documentTitle: parentWindow label].\\\\n\\\\tprinter printText: textToPrint! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'sd 4/16/2003 19:30'!\\\\nsendersOfIt\\\\n\\\\t\\\\\\\"Open a senders browser on the selected selector\\\\\\\"\\\\n\\\\n\\\\t| aSelector |\\\\n\\\\tself lineSelectAndEmptyCheck: [^ self].\\\\n\\\\t(aSelector _ self selectedSelector) == nil ifTrue: [^ view flash].\\\\n\\\\tself terminateAndInitializeAround: [self systemNavigation browseAllCallsOn: aSelector]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'th 9/18/2002 17:28'!\\\\nsetAlignment: aSymbol\\\\n\\\\t| attr interval |\\\\n\\\\tattr _ TextAlignment perform: aSymbol.\\\\n\\\\tinterval _ self encompassLine: self selectionInterval.\\\\n\\\\tparagraph replaceFrom: interval first to: interval last with:\\\\n\\\\t\\\\t((paragraph text copyFrom: interval first to: interval last) addAttribute: attr) displaying: true.\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'th 9/19/2002 18:27'!\\\\nsetSearchString\\\\n\\\\t\\\\\\\"Make the current selection, if any, be the current search string.\\\\\\\"\\\\n\\\\tself hasCaret ifTrue: [view flash. ^ self].\\\\n\\\\tself setSearch:  self selection string! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'dgd 8/28/2004 13:59'!\\\\nspawn\\\\n\\\\t\\\\\\\"Create and schedule a message browser for the code of the model's \\\\n\\\\tselected message. Retain any edits that have not yet been accepted.\\\\\\\"\\\\n\\\\t| code |\\\\n\\\\tcode _ paragraph text string.\\\\n\\\\tself cancel.\\\\n\\\\tmodel notNil ifTrue:[model spawn: code].\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'di 9/7/1999 08:44'!\\\\nspawnWorkspace\\\\n\\\\t| toUse |\\\\n\\\\tself selectLine.\\\\n\\\\ttoUse _ self selection asString.\\\\n\\\\ttoUse size > 0 ifFalse:\\\\n\\\\t\\\\t[toUse _ paragraph text string.\\\\n\\\\t\\\\ttoUse size > 0 ifFalse: [^ self flash]].\\\\n\\\\t\\\\\\\"NB: BrowserCodeController's version does a cancel here\\\\\\\"\\\\n\\\\tself terminateAndInitializeAround:\\\\n\\\\t\\\\t[Utilities openScratchWorkspaceLabeled: 'Untitled' contents: toUse]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'sw 4/29/96'!\\\\nspecialMenuItems\\\\n\\\\t\\\\\\\"Refer to comment under #presentSpecialMenu.  .\\\\n\\\\t : added objectsReferencingIt,\\\\\\\"\\\\n\\\\n\\\\t^ #(\\\\t'Transcript cr; show: ''testing'''\\\\n\\\\t\\\\t\\\\t'view superView model inspect'\\\\n\\\\t\\\\t\\\\t'view superView model browseObjClass'\\\\n\\\\t\\\\t\\\\t'view display'\\\\n\\\\t\\\\t\\\\t'self inspect'\\\\n\\\\t\\\\t\\\\t'view backgroundColor: Color fromUser'\\\\n\\\\t\\\\t\\\\t'view topView inspect'\\\\n\\\\t\\\\t\\\\t'self compareToClipboard'\\\\n\\\\t\\\\t\\\\t'view insideColor: Form white'\\\\n\\\\t\\\\t\\\\t'self objectsReferencingIt'\\\\n\\\\t\\\\t) ! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'SqR 11/14/2000 12:15'!\\\\nundo\\\\n\\\\t\\\\\\\"Reset the state of the paragraph prior to the previous edit.\\\\n\\\\t If another ParagraphEditor instance did that edit, UndoInterval is invalid;\\\\n\\\\t just recover the contents of the undo-buffer at the start of the paragraph.\\\\\\\"\\\\n\\\\n\\\\tsensor flushKeyboard. \\\\\\\"a way to flush stuck keys\\\\\\\"\\\\n\\\\tself closeTypeIn.\\\\n\\\\n\\\\tUndoParagraph == paragraph ifFalse: \\\\\\\"Can't undo another paragraph's edit\\\\\\\"\\\\n\\\\t\\\\t[UndoMessage _ Message selector: #undoReplace.\\\\n\\\\t\\\\tUndoInterval _ 1 to: 0.\\\\n\\\\t\\\\tUndone _ true].\\\\n\\\\tUndoInterval ~= self selectionInterval ifTrue: \\\\\\\"blink the actual target\\\\\\\"\\\\n\\\\t\\\\t[self selectInterval: UndoInterval; deselect].\\\\n\\\\n\\\\t\\\\\\\"Leave a signal of which phase is in progress\\\\\\\"\\\\n\\\\tUndoParagraph _ Undone ifTrue: [#redoing] ifFalse: [#undoing].\\\\n\\\\tUndoMessage sentTo: self.\\\\n\\\\tUndoParagraph _ paragraph! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection' stamp: 'th 9/18/2002 14:37'!\\\\nadjustSelection: directionBlock\\\\n\\\\t\\\\\\\"Helper function for Cursor movement. Always moves point thus allowing selections to shrink. \\\\\\\"\\\\n\\\\t\\\\\\\"See also expandSelection:\\\\\\\"\\\\n\\\\t\\\\\\\"Accepts a one argument Block that computes the new postion given an old one.\\\\\\\"\\\\n\\\\t| newPosition |\\\\n\\\\tnewPosition _ directionBlock value: self pointIndex.\\\\n\\\\tself selectMark: self markIndex point: newPosition.\\\\n\\\\t^true.! !\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection' stamp: 'th 10/28/2003 12:11'!\\\\nafterSelectionInsertAndSelect: aString\\\\n\\\\n\\\\tself insertAndSelect: aString at: self stopIndex ! !\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection' stamp: 'th 9/17/2002 16:11'!\\\\ncomputeIntervalFrom: start to: stop\\\\n\\\\t\\\\\\\"Select the designated characters, inclusive.  Make no visual changes.\\\\\\\"\\\\n\\\\n\\\\tself setMark: start.\\\\n\\\\tself setPoint: stop + 1.! !\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection' stamp: 'di 5/6/1998 15:21'!\\\\ncorrectFrom: start to: stop with: aString\\\\n\\\\t\\\\\\\"Make a correction in the model that the user has authorised from somewhere else in the system (such as from the compilier).  The user's selection is not changed, only corrected.\\\\\\\"\\\\n\\\\t| wasShowing userSelection delta loc |\\\\n\\\\taString = '#insert period' ifTrue:\\\\n\\\\t\\\\t[loc _ start.\\\\n\\\\t\\\\t[(loc _ loc-1)>0 and: [(paragraph text string at: loc) isSeparator]]\\\\n\\\\t\\\\t\\\\twhileTrue: [loc _ loc-1].\\\\n\\\\t\\\\t^ self correctFrom: loc+1 to: loc with: '.'].\\\\n\\\\t(wasShowing _ selectionShowing) ifTrue: [ self reverseSelection ].\\\\n\\\\tuserSelection _ self selectionInterval.\\\\n\\\\n\\\\tself selectInvisiblyFrom: start to: stop.\\\\n\\\\tself replaceSelectionWith: aString asText.\\\\n\\\\n\\\\tdelta _ aString size - (stop - start + 1).\\\\n\\\\tself selectInvisiblyFrom:\\\\n\\\\t\\\\tuserSelection first + (userSelection first > start ifFalse: [ 0 ] ifTrue: [ delta ])\\\\n\\\\t\\\\tto: userSelection last + (userSelection last > start ifFalse: [ 0 ] ifTrue: [ delta ]).\\\\n\\\\twasShowing ifTrue: [ self reverseSelection ].\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection' stamp: 'th 9/19/2002 17:21'!\\\\nencompassLine: anInterval\\\\n\\\\t\\\\\\\"Return an interval that encompasses the entire line\\\\\\\"\\\\n\\\\t| string left right |\\\\n\\\\tstring _ paragraph text string.\\\\n\\\\tleft _ (string lastIndexOf: Character cr startingAt: anInterval first - 1 ifAbsent:[0]) + 1.\\\\n\\\\tright _ (string indexOf: Character cr startingAt: anInterval last + 1 ifAbsent: [string size + 1]) - 1.\\\\n\\\\t^left to: right! !\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection' stamp: 'di 12/17/1998 09:41'!\\\\ninsertAndSelect: aString at: anInteger\\\\n\\\\n\\\\tself replace: (anInteger to: anInteger - 1)\\\\n\\\\t\\\\twith: (Text string: (' ' , aString)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tattributes: emphasisHere)\\\\n\\\\t\\\\tand: [self selectAndScroll]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection' stamp: 'di 5/6/1998 15:25'!\\\\nnextTokenFrom: start direction: dir\\\\n\\\\t\\\\\\\"simple token-finder for compiler automated corrections\\\\\\\"\\\\n\\\\t| loc str |\\\\n\\\\tloc _ start + dir.\\\\n\\\\tstr _ paragraph text string.\\\\n\\\\t[(loc between: 1 and: str size) and: [(str at: loc) isSeparator]]\\\\n\\\\t\\\\twhileTrue: [loc _ loc + dir].\\\\n\\\\t^ loc! !\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection' stamp: 'di 5/20/1998 08:31'!\\\\nnotify: aString at: anInteger in: aStream \\\\n\\\\t\\\\\\\"The compilation of text failed. The syntax error is noted as the argument, \\\\n\\\\taString. Insert it in the text at starting character position anInteger.\\\\\\\"\\\\n\\\\n\\\\tself insertAndSelect: aString at: (anInteger max: 1)! !\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection'!\\\\nselectAt: characterIndex \\\\n\\\\t\\\\\\\"Deselect, then place the caret before the character at characterIndex.\\\\n\\\\t Be sure it is in view.\\\\\\\"\\\\n\\\\n\\\\tself selectFrom: characterIndex to: characterIndex - 1! !\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection' stamp: 'th 9/18/2002 16:50'!\\\\nselectFrom: start to: stop\\\\n\\\\t\\\\\\\"Deselect, then select the specified characters inclusive.\\\\n\\\\t Be sure the selection is in view.\\\\\\\"\\\\n\\\\n\\\\t(start = self startIndex and: [stop + 1 = self stopIndex]) ifFalse:\\\\n\\\\t\\\\t[self deselect.\\\\n\\\\t\\\\tself selectInvisiblyFrom: start to: stop].\\\\n\\\\tself selectAndScroll! !\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection'!\\\\nselectInterval: anInterval\\\\n\\\\t\\\\\\\"Deselect, then select the specified characters inclusive.\\\\n\\\\t Be sure the selection is in view.\\\\\\\"\\\\n\\\\n\\\\tself selectFrom: anInterval first to: anInterval last! !\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection' stamp: 'di 5/9/1998 20:59'!\\\\nselectInvisiblyFrom: start to: stop\\\\n\\\\t\\\\\\\"Select the designated characters, inclusive.  Make no visual changes.\\\\\\\"\\\\n\\\\n\\\\t^ self computeIntervalFrom: start to: stop! !\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection' stamp: 'th 9/18/2002 14:17'!\\\\nselectInvisiblyMark: mark point: point\\\\n\\\\t\\\\\\\"Select the designated characters, inclusive.  Make no visual changes.\\\\\\\"\\\\n\\\\n\\\\t^ self computeIntervalFrom: mark to: point! !\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection' stamp: 'th 9/19/2002 17:17'!\\\\nselectLine\\\\n\\\\t\\\\\\\"Make the receiver's selection, if it currently consists of an insertion point only, encompass the current line.\\\\\\\"\\\\n\\\\tself hasSelection ifTrue:[^self].\\\\n\\\\tself selectInterval: (self encompassLine: self selectionInterval)! !\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection' stamp: 'th 9/18/2002 14:18'!\\\\nselectMark: mark point: point\\\\n\\\\t\\\\\\\"Deselect, then select the specified characters inclusive.\\\\n\\\\t Be sure the selection is in view.\\\\\\\"\\\\n\\\\n\\\\t(mark =  self markIndex and: [point + 1 = self pointIndex]) ifFalse:\\\\n\\\\t\\\\t[self deselect.\\\\n\\\\t\\\\tself selectInvisiblyMark: mark point: point].\\\\n\\\\tself selectAndScroll! !\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection' stamp: 'th 9/19/2002 18:49'!\\\\nselectPrecedingIdentifier\\\\n\\\\t\\\\\\\"Invisibly select the identifier that ends at the end of the selection, if any.\\\\\\\"\\\\n\\\\n\\\\t| string sep stop tok |\\\\n\\\\ttok _ false.\\\\n\\\\tstring _ paragraph text string.\\\\n\\\\tstop _ self stopIndex - 1.\\\\n\\\\t[stop > 0 and: [(string at: stop) isSeparator]] whileTrue: [stop _ stop - 1].\\\\n\\\\tsep _ stop.\\\\n\\\\t[sep > 0 and: [(string at: sep) tokenish]] whileTrue: [tok _ true. sep _ sep - 1].\\\\n\\\\ttok ifTrue: [self selectInvisiblyFrom: sep + 1 to: stop]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection' stamp: 'th 9/18/2002 16:51'!\\\\nselectWord\\\\n\\\\t\\\\\\\"Select delimited text or word--the result of double-clicking.\\\\\\\"\\\\n\\\\n\\\\t| openDelimiter closeDelimiter direction match level leftDelimiters rightDelimiters\\\\n\\\\tstring here hereChar start stop |\\\\n\\\\tstring _ paragraph text string.\\\\n\\\\there _ self pointIndex.\\\\n\\\\t(here between: 2 and: string size)\\\\n\\\\t\\\\tifFalse: [\\\\\\\"if at beginning or end, select entire string\\\\\\\"\\\\n\\\\t\\\\t\\\\t^self selectFrom: 1 to: string size].\\\\n\\\\tleftDelimiters _ '([{<''\\\\\\\"\\\\n'.\\\\n\\\\trightDelimiters _ ')]}>''\\\\\\\"\\\\n'.\\\\n\\\\topenDelimiter _ string at: here - 1.\\\\n\\\\tmatch _ leftDelimiters indexOf: openDelimiter.\\\\n\\\\tmatch > 0\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"delimiter is on left -- match to the right\\\\\\\"\\\\n\\\\t\\\\t\\\\tstart _ here.\\\\n\\\\t\\\\t\\\\tdirection _ 1.\\\\n\\\\t\\\\t\\\\there _ here - 1.\\\\n\\\\t\\\\t\\\\tcloseDelimiter _ rightDelimiters at: match]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[openDelimiter _ string at: here.\\\\n\\\\t\\\\t\\\\tmatch _ rightDelimiters indexOf: openDelimiter.\\\\n\\\\t\\\\t\\\\tmatch > 0\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"delimiter is on right -- match to the left\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstop _ here - 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdirection _ -1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcloseDelimiter _ leftDelimiters at: match]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\\\\"no delimiters -- select a token\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdirection _ -1]].\\\\n\\\\tlevel _ 1.\\\\n\\\\t[level > 0 and: [direction > 0\\\\n\\\\t\\\\t\\\\tifTrue: [here < string size]\\\\n\\\\t\\\\t\\\\tifFalse: [here > 1]]]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[hereChar _ string at: (here _ here + direction).\\\\n\\\\t\\\\t\\\\tmatch = 0\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"token scan goes left, then right\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\thereChar tokenish\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [here = 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[start _ 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"go right if hit string start\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdirection _ 1]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [direction < 0\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[start _ here + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"go right if hit non-token\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdirection _ 1]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [level _ 0]]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\\\\"bracket match just counts nesting level\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\thereChar = closeDelimiter\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [level _ level - 1\\\\\\\"leaving nest\\\\\\\"]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [hereChar = openDelimiter \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [level _ level + 1\\\\\\\"entering deeper nest\\\\\\\"]]]].\\\\n\\\\n\\\\tlevel > 0 ifTrue: [\\\\\\\"in case ran off string end\\\\\\\"\\\\there _ here + direction].\\\\n\\\\tdirection > 0\\\\n\\\\t\\\\tifTrue: [self selectFrom: start to: here - 1]\\\\n\\\\t\\\\tifFalse: [self selectFrom: here + 1 to: stop]! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 1/21/2000 18:51'!\\\\ncomment\\\\n\\\\t\\\\\\\"All key actions that are neither editing nor typing actions have to\\\\n\\\\tsend closeTypeIn at first. See comment in openTypeIn closeTypeIn\\\\\\\"! !\\\\n\\\\n!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 11/18/2002 17:08'!\\\\ncursorDown: characterStream \\\\n\\\\n\\\\t\\\\\\\"Private - Move cursor from position in current line to same position in\\\\n\\\\tnext line. If next line too short, put at end. If shift key down,\\\\n\\\\tselect.\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself \\\\n\\\\t\\\\tmoveCursor:[:position | self\\\\n\\\\t\\\\t\\\\t\\\\tsameColumn: position\\\\n\\\\t\\\\t\\\\t\\\\tnewLine:[:line | line + 1]\\\\n\\\\t\\\\t\\\\t\\\\tforward: true]\\\\n\\\\t\\\\tforward: true\\\\n\\\\t\\\\tspecialBlock:[:dummy | dummy].\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 10/28/2003 10:47'!\\\\ncursorEnd: characterStream \\\\n\\\\n\\\\t\\\\\\\"Private - Move cursor end of current line.\\\\\\\"\\\\n\\\\t| string |\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tstring _ paragraph text string.\\\\n\\\\tself\\\\n\\\\t\\\\tmoveCursor:\\\\n\\\\t\\\\t\\\\t[:position | Preferences wordStyleCursorMovement\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:[| targetLine |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttargetLine _ paragraph lines at:(paragraph lineIndexOfCharacterIndex: position).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttargetLine = paragraph lines last\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue:[targetLine last + 1]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse:[targetLine last]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:[\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstring\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tindexOf: Character cr\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: position\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifAbsent:[string size + 1]]]\\\\n\\\\t\\\\tforward: true\\\\n\\\\t\\\\tspecialBlock:[:dummy | string size + 1].\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 9/20/2002 12:14'!\\\\ncursorHome: characterStream \\\\n\\\\n\\\\t\\\\\\\"Private - Move cursor from position in current line to beginning of\\\\n\\\\tcurrent line. If control key is pressed put cursor at beginning of text\\\\\\\"\\\\n\\\\n\\\\t| string |\\\\n\\\\n\\\\tstring _ paragraph text string.\\\\n\\\\tself\\\\n\\\\t\\\\tmoveCursor: [ :position | Preferences wordStyleCursorMovement\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:[\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(paragraph lines at:(paragraph lineIndexOfCharacterIndex: position)) first]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:[\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(string\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tlastIndexOf: Character cr\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: position - 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifAbsent:[0]) + 1]]\\\\n\\\\t\\\\tforward: false\\\\n\\\\t\\\\tspecialBlock: [:dummy | 1].\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 9/19/2002 20:07'!\\\\ncursorLeft: characterStream \\\\n\\\\t\\\\\\\"Private - Move cursor left one character if nothing selected, otherwise \\\\n\\\\tmove cursor to beginning of selection. If the shift key is down, start \\\\n\\\\tselecting or extending current selection. Don't allow cursor past \\\\n\\\\tbeginning of text\\\\\\\"\\\\n\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself\\\\n\\\\t\\\\tmoveCursor:[:position | position - 1 max: 1]\\\\n\\\\t\\\\tforward: false\\\\n\\\\t\\\\tspecialBlock:[:position | self previousWord: position].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 11/18/2002 17:09'!\\\\ncursorPageDown: characterStream \\\\n\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself \\\\n\\\\t\\\\tmoveCursor: [:position |\\\\n\\\\t\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\t\\\\tsameColumn: position\\\\n\\\\t\\\\t\\\\t\\\\tnewLine:[:lineNo | lineNo + self pageHeight]\\\\n\\\\t\\\\t\\\\t\\\\tforward: true]\\\\n\\\\t\\\\tforward: true\\\\n\\\\t\\\\tspecialBlock:[:dummy | dummy].\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 11/18/2002 17:09'!\\\\ncursorPageUp: characterStream \\\\n\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself \\\\n\\\\t\\\\tmoveCursor: [:position |\\\\n\\\\t\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\t\\\\tsameColumn: position\\\\n\\\\t\\\\t\\\\t\\\\tnewLine:[:lineNo | lineNo - self pageHeight]\\\\n\\\\t\\\\t\\\\t\\\\tforward: false]\\\\n\\\\t\\\\tforward: false\\\\n\\\\t\\\\tspecialBlock:[:dummy | dummy].\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 9/19/2002 20:01'!\\\\ncursorRight: characterStream \\\\n\\\\t\\\\\\\"Private - Move cursor right one character if nothing selected, \\\\n\\\\totherwise move cursor to end of selection. If the shift key is down, \\\\n\\\\tstart selecting characters or extending already selected characters. \\\\n\\\\tDon't allow cursor past end of text\\\\\\\"\\\\n\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself\\\\n\\\\t\\\\tmoveCursor: [:position | position + 1]\\\\n\\\\t\\\\tforward: true\\\\n\\\\t\\\\tspecialBlock:[:position | self nextWord: position].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 11/18/2002 17:15'!\\\\ncursorUp: characterStream \\\\n\\\\n\\\\\\\"Private - Move cursor from position in current line to same position in\\\\nprior line. If prior line too short, put at end\\\\\\\"\\\\n\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself\\\\n\\\\t\\\\tmoveCursor: [:position | self\\\\n\\\\t\\\\t\\\\t\\\\tsameColumn: position\\\\n\\\\t\\\\t\\\\t\\\\tnewLine:[:line | line - 1]\\\\n\\\\t\\\\t\\\\t\\\\tforward: false]\\\\n\\\\t\\\\tforward: false\\\\n\\\\t\\\\tspecialBlock:[:dummy | dummy].\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'di 12/3/2001 21:49'!\\\\nescapeToDesktop: characterStream \\\\n\\\\t\\\\\\\"Pop up a morph to field keyboard input in the context of the desktop\\\\\\\"\\\\n\\\\n\\\\tSmalltalk isMorphic ifTrue: [ActiveWorld putUpWorldMenuFromEscapeKey].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'dvf 12/8/2001 00:46'!\\\\nraiseContextMenu: characterStream \\\\n\\\\t\\\\\\\"AFAIK, this is never called in morphic, because a subclass overrides it. Which is good, because a ParagraphEditor doesn't know about Morphic and thus duplicates the text-editing actions that really belong in the specific application, not the controller. So the context menu this would raise is likely to be out of date.\\\\\\\"\\\\n\\\\tself yellowButtonActivity.\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 1/21/2000 18:55'!\\\\nselectCurrentTypeIn: characterStream \\\\n\\\\t\\\\\\\"Select what would be replaced by an undo (e.g., the last typeIn).\\\\\\\"\\\\n\\\\n\\\\t| prior |\\\\n\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tprior _ otherInterval.\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself selectInterval: UndoInterval.\\\\n\\\\totherInterval _ prior.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'sma 12/15/1999 11:46'!\\\\nselectWord: characterStream\\\\n\\\\tsensor keyboard.\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself selectWord.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 1/21/2000 18:55'!\\\\nsetSearchString: characterStream\\\\n\\\\t\\\\\\\"Establish the current selection as the current search string.\\\\\\\"\\\\n\\\\n\\\\t| aString |\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tsensor keyboard.\\\\n\\\\tself lineSelectAndEmptyCheck: [^ true].\\\\n\\\\taString _  self selection string.\\\\n\\\\taString size == 0\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self flash]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self setSearch: aString].\\\\n\\\\t^ true! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'parenblinking' stamp: 'mir 8/3/2004 13:31'!\\\\nblinkParenAt: parenLocation \\\\n\\\\tself text\\\\n\\\\t\\\\taddAttribute: TextEmphasis bold\\\\n\\\\t\\\\tfrom: parenLocation\\\\n\\\\t\\\\tto: parenLocation.\\\\n\\\\tlastParentLocation _ parenLocation.! !\\\\n\\\\n!ParagraphEditor methodsFor: 'parenblinking' stamp: 'AB 1/7/2002 04:03'!\\\\nblinkPrevParen\\\\n\\\\t| openDelimiter closeDelimiter level string here hereChar |\\\\n\\\\tstring _ paragraph text string.\\\\n\\\\there _ startBlock stringIndex.\\\\n\\\\topenDelimiter _ sensor keyboardPeek.\\\\n\\\\tcloseDelimiter _ '([{' at: (')]}' indexOf: openDelimiter).\\\\n\\\\tlevel _ 1.\\\\n\\\\t[level > 0 and: [here > 2]]\\\\n\\\\t\\\\twhileTrue:\\\\n\\\\t\\\\t\\\\t[hereChar _ string at: (here _ here - 1).\\\\n\\\\t\\\\t\\\\thereChar = closeDelimiter\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[level _ level - 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tlevel = 0\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [^ self blinkParenAt: here]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[hereChar = openDelimiter\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [level _ level + 1]]].! !\\\\n\\\\n!ParagraphEditor methodsFor: 'parenblinking' stamp: 'mir 8/3/2004 13:31'!\\\\nclearParens\\\\n\\\\tlastParentLocation ifNotNil:\\\\n\\\\t\\\\t[self text string size >= lastParentLocation ifTrue: [\\\\n\\\\t\\\\t\\\\tself text\\\\n\\\\t\\\\t\\\\t\\\\tremoveAttribute: TextEmphasis bold\\\\n\\\\t\\\\t\\\\t\\\\tfrom: lastParentLocation\\\\n\\\\t\\\\t\\\\t\\\\tto: lastParentLocation]]\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'parenblinking' stamp: 'mikki 1/5/2005 14:10'!\\\\ndispatchOnCharacter: char with: typeAheadStream\\\\n\\\\t\\\\\\\"Carry out the action associated with this character, if any.\\\\n\\\\tType-ahead is passed so some routines can flush or use it.\\\\\\\"\\\\n\\\\n\\\\t| honorCommandKeys |\\\\n\\\\tself clearParens.\\\\n  \\\\n\\\\t\\\\\\\"mikki 1/3/2005 21:31 Preference for auto-indent on return added.\\\\\\\"\\\\n\\\\tchar asciiValue = 13 ifTrue: [\\\\n\\\\t\\\\t^Preferences autoIndent \\\\n\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tsensor controlKeyPressed\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self normalCharacter: typeAheadStream]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [self crWithIndent: typeAheadStream]]\\\\n\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tsensor controlKeyPressed\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self crWithIndent: typeAheadStream]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [self normalCharacter: typeAheadStream]]].\\\\n\\\\n\\\\t((honorCommandKeys _ Preferences cmdKeysInText) and: [char = Character enter])\\\\n\\\\t\\\\tifTrue: [^ self dispatchOnEnterWith: typeAheadStream].\\\\n\\\\t\\\\t\\\\n\\\\t\\\\\\\"Special keys overwrite crtl+key combinations - at least on Windows. To resolve this\\\\n\\\\tconflict, assume that keys other than cursor keys aren't used together with Crtl.\\\\\\\" \\\\n\\\\t((self class specialShiftCmdKeys includes: char asciiValue) and: [char asciiValue < 27])\\\\n\\\\t\\\\tifTrue: [^ sensor controlKeyPressed\\\\n\\\\t\\\\t\\\\tifTrue: [self perform: (ShiftCmdActions at: char asciiValue + 1) with: typeAheadStream]\\\\n\\\\t\\\\t\\\\tifFalse: [self perform: (CmdActions at: char asciiValue + 1) with: typeAheadStream]].\\\\n\\\\n\\\\t\\\\\\\"backspace, and escape keys (ascii 8 and 27) are command keys\\\\\\\"\\\\n\\\\t((honorCommandKeys and: [sensor commandKeyPressed]) or: [self class specialShiftCmdKeys includes: char asciiValue]) ifTrue:\\\\n\\\\t\\\\t[^ sensor leftShiftDown\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[self perform: (ShiftCmdActions at: char asciiValue + 1) with: typeAheadStream]\\\\n\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[self perform: (CmdActions at: char asciiValue + 1) with: typeAheadStream]].\\\\n\\\\n\\\\t\\\\\\\"the control key can be used to invoke shift-cmd shortcuts\\\\\\\"\\\\n\\\\t(honorCommandKeys and: [sensor controlKeyPressed])\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[^ self perform: (ShiftCmdActions at: char asciiValue + 1) with: typeAheadStream].\\\\n\\\\n\\\\t(')]}' includes: char)\\\\n\\\\t\\\\tifTrue: [self blinkPrevParen].\\\\n\\\\n\\\\t^ self perform: #normalCharacter: with: typeAheadStream! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'scrolling'!\\\\ncomputeMarkerRegion \\\\n\\\\t\\\\\\\"Refer to the comment in ScrollController|computeMarkerRegion.\\\\\\\"\\\\n\\\\n\\\\tparagraph compositionRectangle height = 0\\\\n\\\\t\\\\tifTrue:\\\\t[^0@0 extent: Preferences scrollBarWidth @ scrollBar inside height]\\\\n\\\\t\\\\tifFalse:\\\\t[^0@0 extent:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tPreferences scrollBarWidth \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t@ ((paragraph clippingRectangle height asFloat /\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself scrollRectangleHeight * scrollBar inside height) rounded\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmin: scrollBar inside height)]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'scrolling'!\\\\nmarkerDelta\\\\n\\\\n\\\\t^marker top - scrollBar top - ((paragraph clippingRectangle top -\\\\n\\\\t\\\\tparagraph compositionRectangle top) asFloat /\\\\n\\\\t\\\\t\\\\t(self scrollRectangleHeight max: 1) asFloat *\\\\n\\\\t\\\\t\\\\t\\\\tscrollBar height asFloat) rounded! !\\\\n\\\\n!ParagraphEditor methodsFor: 'scrolling'!\\\\nscrollAmount \\\\n\\\\t\\\\\\\"Refer to the comment in ScrollController|scrollAmount.\\\\\\\"\\\\n\\\\n\\\\t^sensor cursorPoint y - scrollBar top! !\\\\n\\\\n!ParagraphEditor methodsFor: 'scrolling'!\\\\nscrollBar\\\\n\\\\t^ scrollBar! !\\\\n\\\\n!ParagraphEditor methodsFor: 'scrolling' stamp: 'BG 12/12/2003 15:31'!\\\\nscrollBy: heightToMove\\\\n\\\\t\\\\\\\"Move the paragraph by heightToMove, and reset the text selection.\\\\\\\"\\\\n\\\\t^ paragraph scrollBy: heightToMove withSelectionFrom: self pointBlock to: self markBlock! !\\\\n\\\\n!ParagraphEditor methodsFor: 'scrolling'!\\\\nscrollRectangleHeight\\\\n\\\\n\\\\t^paragraph compositionRectangle height \\\\n\\\\t\\\\t+ paragraph lineGrid! !\\\\n\\\\n!ParagraphEditor methodsFor: 'scrolling'!\\\\nscrollToBottom\\\\n\\\\t\\\\\\\"Scroll so that the tail end of the text is visible in the view.  5/6/96 sw\\\\\\\"\\\\n\\\\n\\\\tself scrollView: (paragraph clippingRectangle bottom \\\\n\\\\t\\\\t- paragraph compositionRectangle bottom)! !\\\\n\\\\n!ParagraphEditor methodsFor: 'scrolling'!\\\\nscrollToTop\\\\n\\\\t\\\\\\\"Scroll so that the paragraph is at the top of the view.\\\\\\\"\\\\n\\\\n\\\\tself scrollView: (paragraph clippingRectangle top \\\\n\\\\t\\\\t- paragraph compositionRectangle top)! !\\\\n\\\\n!ParagraphEditor methodsFor: 'scrolling'!\\\\nscrollView: anInteger \\\\n\\\\t\\\\\\\"Paragraph scrolling uses opposite polarity\\\\\\\"\\\\n\\\\t^ self scrollBy: anInteger negated! !\\\\n\\\\n!ParagraphEditor methodsFor: 'scrolling'!\\\\nupdateMarker\\\\n\\\\t\\\\\\\"A variation of computeMarkerRegion--only redisplay the marker in the scrollbar if an actual change has occurred in the positioning of the paragraph.\\\\\\\"\\\\n\\\\tself moveMarkerTo: self computeMarkerRegion! !\\\\n\\\\n!ParagraphEditor methodsFor: 'scrolling'!\\\\nviewDelta \\\\n\\\\t\\\\\\\"Refer to the comment in ScrollController|viewDelta.\\\\\\\"\\\\n\\\\n\\\\t^paragraph clippingRectangle top \\\\n\\\\t\\\\t- paragraph compositionRectangle top \\\\n\\\\t\\\\t- ((marker top - scrollBar inside top) asFloat \\\\n\\\\t\\\\t\\\\t\\\\t/ scrollBar inside height asFloat * self scrollRectangleHeight asFloat)\\\\n\\\\t\\\\t\\\\troundTo: paragraph lineGrid! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'sensor access'!\\\\nprocessBlueButton\\\\n\\\\t\\\\\\\"The user pressed the blue button on the mouse. Determine what action \\\\n\\\\tto take.\\\\\\\"\\\\n\\\\n\\\\t^self! !\\\\n\\\\n!ParagraphEditor methodsFor: 'sensor access'!\\\\nprocessKeyboard\\\\n\\\\t\\\\\\\"Determine whether the user pressed the keyboard. If so, read the keys.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboardPressed ifTrue: [self readKeyboard]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'sensor access'!\\\\nprocessMouseButtons\\\\n\\\\t\\\\\\\"Determine whether the user pressed any mouse button. For each possible \\\\n\\\\tbutton, determine what actions to take.\\\\\\\"\\\\n\\\\n\\\\tsensor redButtonPressed ifTrue: [self processRedButton].\\\\n\\\\tsensor yellowButtonPressed ifTrue: [self processYellowButton].\\\\n\\\\tsensor blueButtonPressed ifTrue: [self processBlueButton]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'sensor access' stamp: 'th 9/19/2002 18:24'!\\\\nprocessRedButton\\\\n\\\\t\\\\\\\"The user pressed a red mouse button, meaning create a new text \\\\n\\\\tselection. Highlighting the selection is carried out by the paragraph \\\\n\\\\titself. Double clicking causes a selection of the area between the nearest \\\\n\\\\tenclosing delimitors.\\\\\\\"\\\\n\\\\n\\\\t|  selectionBlocks clickPoint oldDelta oldInterval previousMarkBlock previousPointBlock |\\\\n\\\\n\\\\tclickPoint _ sensor cursorPoint.\\\\n\\\\t(view containsPoint: clickPoint) ifFalse: [^ self].\\\\n\\\\t(paragraph clickAt: clickPoint for: model controller: self) ifTrue: [^ self].\\\\n\\\\toldInterval _ self selectionInterval.\\\\n\\\\tpreviousMarkBlock _ self markBlock.\\\\n\\\\tpreviousPointBlock _ self pointBlock.\\\\n\\\\toldDelta _ paragraph scrollDelta.\\\\n\\\\tsensor leftShiftDown\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self deselect.\\\\n\\\\t\\\\t\\\\tself closeTypeIn.\\\\n\\\\t\\\\t\\\\tselectionBlocks _ paragraph mouseSelect: clickPoint]\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[selectionBlocks _ paragraph extendSelectionMark: self markBlock pointBlock: self pointBlock.\\\\n\\\\t\\\\t\\\\tself closeTypeIn].\\\\n\\\\tselectionShowing _ true.\\\\n\\\\tself markBlock: (selectionBlocks at: 1).\\\\n\\\\tself pointBlock: (selectionBlocks at: 2).\\\\n\\\\t(self hasCaret\\\\n\\\\t\\\\tand: [previousMarkBlock = self markBlock and: [previousPointBlock = self pointBlock]])\\\\n\\\\t\\\\tifTrue: [self selectWord].\\\\n\\\\toldDelta ~= paragraph scrollDelta \\\\\\\"case of autoscroll\\\\\\\"\\\\n\\\\t\\\\t\\\\tifTrue: [self updateMarker].\\\\n\\\\tself setEmphasisHere.\\\\n\\\\t(self isDisjointFrom: oldInterval) ifTrue:\\\\n\\\\t\\\\t[otherInterval _ oldInterval]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'sensor access'!\\\\nprocessYellowButton\\\\n\\\\t\\\\\\\"User pressed the yellow button on the mouse. Determine what actions to \\\\n\\\\ttake.\\\\\\\"\\\\n\\\\n\\\\tself yellowButtonActivity! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'typing support' stamp: 'yo 3/16/2004 13:05'!\\\\nbackTo: startIndex\\\\n\\\\t\\\\\\\"During typing, backspace to startIndex.  Deleted characters fall into three\\\\n\\\\t clusters, from left to right in the text: (1) preexisting characters that were\\\\n\\\\t backed over; (2) newly typed characters that were backed over (excluding\\\\n\\\\t typeahead, which never even appears); (3) preexisting characters that\\\\n\\\\t were highlighted before typing began.  If typing has not yet been opened,\\\\n\\\\t open it and watch for the first and third cluster.  If typing has been opened,\\\\n\\\\t watch for the first and second cluster.  Save characters from the first and third\\\\n\\\\t cluster in UndoSelection.  Tally characters from the first cluster in UndoMessage's parameter.\\\\n\\\\t Delete all the clusters.  Do not alter Undoer or UndoInterval (except via\\\\n\\\\t openTypeIn).  The code is shorter than the comment.\\\\\\\"\\\\n\\\\n\\\\t| saveLimit newBackovers |\\\\n\\\\tsaveLimit _ beginTypeInBlock == nil\\\\n\\\\t\\\\tifTrue: [self openTypeIn. UndoSelection _ self nullText. self stopIndex]\\\\n\\\\t\\\\tifFalse: [self startOfTyping].\\\\n\\\\tself setMark: startIndex.\\\\n\\\\tstartIndex < saveLimit ifTrue:\\\\n\\\\t\\\\t[newBackovers _ self startOfTyping - startIndex.\\\\n\\\\t\\\\tbeginTypeInBlock _ self startIndex.\\\\n\\\\t\\\\tUndoSelection replaceFrom: 1 to: 0 with:\\\\n\\\\t\\\\t\\\\t(paragraph text copyFrom: startIndex to: saveLimit - 1).\\\\n\\\\t\\\\tUndoMessage argument: (UndoMessage argument ifNil: [1]) + newBackovers].\\\\n\\\\tself zapSelectionWith: self nullText.\\\\n\\\\tself unselect! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing support' stamp: 'th 9/19/2002 17:40'!\\\\ncloseTypeIn\\\\n\\\\t\\\\\\\"See comment in openTypeIn.  It is important to call closeTypeIn before executing\\\\n\\\\t any non-typing key, making a new selection, etc.  It is called automatically for\\\\n\\\\t menu commands.\\\\n\\\\t Typing commands can call 'closeTypeIn: aCharacterStream' instead of this to\\\\n\\\\t save typeahead.  Undoer & Redoer: undoAndReselect:redoAndReselect:.\\\\\\\"\\\\n\\\\n\\\\t| begin stop |\\\\n\\\\tbeginTypeInBlock == nil ifFalse:\\\\n\\\\t\\\\t[(UndoMessage sends: #noUndoer) ifTrue: \\\\\\\"should always be true, but just in case...\\\\\\\"\\\\n\\\\t\\\\t\\\\t[begin _ self startOfTyping.\\\\n\\\\t\\\\t\\\\tstop _ self stopIndex.\\\\n\\\\t\\\\t\\\\tself undoer: #undoAndReselect:redoAndReselect:\\\\n\\\\t\\\\t\\\\t\\\\twith: (begin + UndoMessage argument to: begin + UndoSelection size - 1)\\\\n\\\\t\\\\t\\\\t\\\\twith: (stop to: stop - 1).\\\\n\\\\t\\\\t\\\\tUndoInterval _ begin to: stop - 1].\\\\n\\\\t\\\\tbeginTypeInBlock _ nil]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing support'!\\\\ncloseTypeIn: characterStream\\\\n\\\\t\\\\\\\"Call instead of closeTypeIn when you want typeahead to be inserted before the\\\\n\\\\t control character is executed, e.g., from Ctrl-V.\\\\\\\"\\\\n\\\\n\\\\tself insertTypeAhead: characterStream.\\\\n\\\\tself closeTypeIn! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing support' stamp: 'di 9/7/1999 11:26'!\\\\ndispatchOnEnterWith: typeAheadStream\\\\n\\\\t\\\\\\\"Enter key hit.  Treat is as an 'accept', viz a synonym for cmd-s.  If cmd key is down, treat is as a synonym for print-it. \\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.  \\\\\\\"consume enter key\\\\\\\"\\\\n\\\\tself terminateAndInitializeAround: [\\\\n\\\\tsensor commandKeyPressed\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self printIt.]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[self closeTypeIn: typeAheadStream.\\\\n\\\\t\\\\t\\\\tself accept].\\\\n\\\\t].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing support' stamp: 'di 6/14/1998 13:08'!\\\\ndoneTyping\\\\n\\\\tbeginTypeInBlock _ nil! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing support' stamp: 'th 9/17/2002 16:23'!\\\\ninsertTypeAhead: typeAhead\\\\n\\\\ttypeAhead position = 0 ifFalse:\\\\n\\\\t\\\\t[self zapSelectionWith: (Text string: typeAhead contents emphasis: emphasisHere).\\\\n\\\\t\\\\ttypeAhead reset.\\\\n\\\\t\\\\tself unselect]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing support' stamp: 'th 9/18/2002 16:48'!\\\\nopenTypeIn\\\\n\\\\t\\\\\\\"Set up UndoSelection to null text (to be added to by readKeyboard and backTo:),\\\\n\\\\t beginTypeInBlock to keep track of the leftmost backspace, and UndoParameter to tally\\\\n\\\\t how many deleted characters were backspaced over rather than 'cut'.\\\\n\\\\t You can't undo typing until after closeTypeIn.\\\\\\\"\\\\n\\\\n\\\\tbeginTypeInBlock == nil ifTrue:\\\\n\\\\t\\\\t[UndoSelection _ self nullText.\\\\n\\\\t\\\\tself undoer: #noUndoer with: 0.\\\\n\\\\t\\\\tbeginTypeInBlock _ self startIndex]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing support' stamp: 'th 9/19/2002 18:26'!\\\\nreadKeyboard\\\\n\\\\t\\\\\\\"Key struck on the keyboard. Find out which one and, if special, carry \\\\n\\\\tout the associated special action. Otherwise, add the character to the \\\\n\\\\tstream of characters.  Undoer & Redoer: see closeTypeIn.\\\\\\\"\\\\n\\\\n\\\\t| typeAhead char |\\\\n\\\\ttypeAhead _ WriteStream on: (String new: 128).\\\\n\\\\t[sensor keyboardPressed] whileTrue: \\\\n\\\\t\\\\t[self deselect.\\\\n\\\\t\\\\t [sensor keyboardPressed] whileTrue: \\\\n\\\\t\\\\t\\\\t[char _ sensor keyboardPeek.\\\\n\\\\t\\\\t\\\\t(self dispatchOnCharacter: char with: typeAhead) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[self doneTyping.\\\\n\\\\t\\\\t\\\\t\\\\tself setEmphasisHere.\\\\n\\\\t\\\\t\\\\t\\\\t^self selectAndScroll; updateMarker].\\\\n\\\\t\\\\t\\\\tself openTypeIn].\\\\n\\\\t\\\\tself hasSelection ifTrue: \\\\\\\"save highlighted characters\\\\\\\"\\\\n\\\\t\\\\t\\\\t[UndoSelection _ self selection]. \\\\n\\\\t\\\\tself zapSelectionWith: \\\\n\\\\t\\\\t\\\\t(Text string: typeAhead contents emphasis: emphasisHere).\\\\n\\\\t\\\\ttypeAhead reset.\\\\n\\\\t\\\\tself unselect.\\\\n\\\\t\\\\tsensor keyboardPressed ifFalse: \\\\n\\\\t\\\\t\\\\t[self selectAndScroll.\\\\n\\\\t\\\\t\\\\tsensor keyboardPressed\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self updateMarker]]]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing support' stamp: 'th 9/18/2002 16:49'!\\\\nsetEmphasisHere\\\\n\\\\n\\\\temphasisHere _ (paragraph text attributesAt: (self pointIndex - 1 max: 1) forStyle: paragraph textStyle)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tselect: [:att | att mayBeExtended]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing support' stamp: 'th 9/17/2002 16:23'!\\\\nsimulatedKeystroke: char\\\\n\\\\t\\\\\\\"Accept char as if it were struck on the keyboard.  This version does not yet deal with command keys, and achieves update in the receiver's typically inactive window via the sledge-hammer of uncache-bits.\\\\\\\"\\\\n\\\\n\\\\tself deselect.\\\\n\\\\tself openTypeIn.\\\\n\\\\tself markBlock = self pointBlock ifFalse: [UndoSelection _ self selection].\\\\n\\\\tself zapSelectionWith:\\\\n\\\\t\\\\t(Text string: char asString emphasis: emphasisHere).\\\\n\\\\tself userHasEdited.\\\\n\\\\tself unselect.\\\\n\\\\tself selectAndScroll.\\\\n\\\\tself updateMarker.\\\\n\\\\tview ifNotNil:\\\\n\\\\t\\\\t[view topView uncacheBits\\\\n\\\\t\\\\t\\\\\\\"in mvc, this makes sure the recognized character shows up in the pane right now; in morphic, a different mechanism is used for the same effect -- see TextMorphEditor method #recognizeCharactersWhileMouseIn:\\\\\\\"]\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing support' stamp: 'di 10/6/1998 08:45'!\\\\nstartOfTyping\\\\n\\\\t\\\\\\\"Compatibility during change from characterBlock to integer\\\\\\\"\\\\n\\\\tbeginTypeInBlock == nil ifTrue: [^ nil].\\\\n\\\\tbeginTypeInBlock isNumber ifTrue: [^ beginTypeInBlock].\\\\n\\\\t\\\\\\\"Last line for compatibility during change from CharacterBlock to Integer.\\\\\\\"\\\\n\\\\t^ beginTypeInBlock stringIndex\\\\n\\\\t! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys' stamp: 'th 9/20/2002 11:22'!\\\\nargAdvance: characterStream\\\\n\\\\t\\\\\\\"Invoked by Ctrl-a.  Useful after Ctrl-q.\\\\n\\\\t Search forward from the end of the selection for a colon followed by\\\\n\\\\t\\\\ta space.  Place the caret after the space.  If none are found, place the\\\\n\\\\t\\\\tcaret at the end of the text.  Does not affect the undoability of the \\\\n\\\\t \\\\tprevious command.\\\\\\\"\\\\n\\\\n\\\\t| start |\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tstart _ paragraph text findString: ': ' startingAt: self stopIndex.\\\\n\\\\tstart = 0 ifTrue: [start _ paragraph text size + 1].\\\\n\\\\tself selectAt: start + 2.\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys' stamp: 'th 10/21/2003 15:46'!\\\\nbackWord: characterStream \\\\n\\\\t\\\\\\\"If the selection is not a caret, delete it and leave it in the backspace buffer.\\\\n\\\\t Else if there is typeahead, delete it.\\\\n\\\\t Else, delete the word before the caret.\\\\\\\"\\\\n\\\\n\\\\t| startIndex |\\\\n\\\\tsensor keyboard.\\\\n\\\\tcharacterStream isEmpty\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self hasCaret\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\\\\"a caret, delete at least one character\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[startIndex _ 1 max: self markIndex - 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[startIndex > 1 and:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[(paragraph text at: startIndex - 1) asCharacter tokenish]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twhileTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[startIndex _ startIndex - 1]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\\\\"a non-caret, just delete it\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[startIndex _ self markIndex].\\\\n\\\\t\\\\t\\\\tself backTo: startIndex]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[characterStream reset].\\\\n\\\\t^false! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys' stamp: 'th 9/19/2002 18:23'!\\\\nbackspace: characterStream \\\\n\\\\t\\\\\\\"Backspace over the last character.\\\\\\\"\\\\n\\\\n\\\\t| startIndex |\\\\n\\\\tsensor leftShiftDown ifTrue: [^ self backWord: characterStream].\\\\n\\\\tcharacterStream isEmpty\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[startIndex _ self markIndex +\\\\n\\\\t\\\\t\\\\t\\\\t(self hasCaret ifTrue: [0] ifFalse: [1]).\\\\n\\\\t\\\\t\\\\t[sensor keyboardPressed and:\\\\n\\\\t\\\\t\\\\t [sensor keyboardPeek asciiValue = 8]] whileTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"process multiple backspaces\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tsensor keyboard.\\\\n\\\\t\\\\t\\\\t\\\\tstartIndex _ 1 max: startIndex - 1.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\tself backTo: startIndex]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[sensor keyboard.\\\\n\\\\t\\\\t\\\\tcharacterStream skip: -1].\\\\n\\\\t^false! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys'!\\\\nchangeStyle: characterStream \\\\n\\\\t\\\\\\\"Put up the style-change menu\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself changeStyle.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys' stamp: 'th 9/20/2002 11:25'!\\\\ncrWithIndent: characterStream \\\\n\\\\t\\\\\\\"Replace the current text selection with CR followed by as many tabs\\\\n\\\\tas on the current line (+/- bracket count) -- initiated by Shift-Return.\\\\\\\"\\\\n\\\\t| char s i tabCount |\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\ts _ paragraph string.\\\\n\\\\ti _ self stopIndex.\\\\n\\\\ttabCount _ 0.\\\\n\\\\t[(i _ i-1) > 0 and: [(char _ s at: i) ~= Character cr]]\\\\n\\\\t\\\\twhileTrue:  \\\\\\\"Count tabs and brackets (but not a leading bracket)\\\\\\\"\\\\n\\\\t\\\\t[(char = Character tab and: [i < s size and: [(s at: i+1) ~= $[ ]]) ifTrue: [tabCount _ tabCount + 1].\\\\n\\\\t\\\\tchar = $[ ifTrue: [tabCount _ tabCount + 1].\\\\n\\\\t\\\\tchar = $] ifTrue: [tabCount _ tabCount - 1]].\\\\n\\\\tcharacterStream crtab: tabCount.  \\\\\\\"Now inject CR with tabCount tabs\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys' stamp: 'sw 4/30/2001 21:20'!\\\\ncursorTopHome: characterStream \\\\n\\\\t\\\\\\\"Put cursor at beginning of text -- invoked from cmd-H shortcut, useful for keyboards that have no home key.\\\\\\\"\\\\n\\\\t\\\\n\\\\tsensor keyboard.\\\\n\\\\tself selectAt: 1.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys'!\\\\ndisplayIfFalse: characterStream \\\\n\\\\t\\\\\\\"Replace the current text selection with the text 'ifFalse:'--initiated by \\\\n\\\\tctrl-f.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tcharacterStream nextPutAll: 'ifFalse:'.\\\\n\\\\t^false! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys'!\\\\ndisplayIfTrue: characterStream \\\\n\\\\t\\\\\\\"Replace the current text selection with the text 'ifTrue:'--initiated by \\\\n\\\\tctrl-t.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tcharacterStream nextPutAll: 'ifTrue:'.\\\\n\\\\t^false! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys'!\\\\ndoAgainMany: characterStream \\\\n\\\\t\\\\\\\"Do the previous thing again repeatedly. 1/26/96 sw\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself againOrSame: (UndoMessage sends: #undoAgain:andReselect:typedKey:) many: true.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys'!\\\\ndoAgainOnce: characterStream \\\\n\\\\t\\\\\\\"Do the previous thing again once. 1/26/96 sw\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself again.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys'!\\\\nfind: characterStream\\\\n\\\\t\\\\\\\"Prompt the user for what to find, then find it, searching from the current selection onward.  1/24/96 sw\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself find.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys'!\\\\nfindAgain: characterStream \\\\n\\\\t\\\\\\\"Find the desired text again.  1/24/96 sw\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself findAgain.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys' stamp: 'th 9/18/2002 11:39'!\\\\nforwardDelete: characterStream\\\\n\\\\t\\\\\\\"Delete forward over the next character.\\\\n\\\\t  Make Undo work on the whole type-in, not just the one char.\\\\n\\\\twod 11/3/1998: If there was a selection use #zapSelectionWith: rather than #backspace: which was 'one off' in deleting the selection. Handling of things like undo or typeIn area were not fully considered.\\\\\\\"\\\\n\\\\t| startIndex usel upara uinterval ind stopIndex |\\\\n\\\\tstartIndex _ self mark.\\\\n\\\\tstartIndex > paragraph text size ifTrue:\\\\n\\\\t\\\\t[sensor keyboard.\\\\n\\\\t\\\\t^ false].\\\\n\\\\tself hasSelection ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"there was a selection\\\\\\\"\\\\n\\\\t\\\\tsensor keyboard.\\\\n\\\\t\\\\tself zapSelectionWith: self nullText.\\\\n\\\\t\\\\t^ false].\\\\n\\\\t\\\\\\\"Null selection - do the delete forward\\\\\\\"\\\\n\\\\tbeginTypeInBlock == nil\\\\t\\\\\\\"no previous typing.  openTypeIn\\\\\\\"\\\\n\\\\t\\\\tifTrue: [self openTypeIn. UndoSelection _ self nullText].\\\\n\\\\tuinterval _ UndoInterval deepCopy.\\\\n\\\\tupara _ UndoParagraph deepCopy.\\\\n\\\\tstopIndex := startIndex.\\\\n\\\\t(sensor keyboard asciiValue = 127 and: [sensor leftShiftDown])\\\\n\\\\t\\\\tifTrue: [stopIndex := (self nextWord: stopIndex) - 1].\\\\n\\\\tself selectFrom: startIndex to: stopIndex.\\\\n\\\\tself replaceSelectionWith: self nullText.\\\\n\\\\tself selectFrom: startIndex to: startIndex-1.\\\\n\\\\tUndoParagraph _ upara.  UndoInterval _ uinterval.\\\\n\\\\tUndoMessage selector == #noUndoer ifTrue: [\\\\n\\\\t\\\\t(UndoSelection isText) ifTrue: [\\\\n\\\\t\\\\t\\\\tusel _ UndoSelection.\\\\n\\\\t\\\\t\\\\tind _ startIndex. \\\\\\\"UndoInterval startIndex\\\\\\\"\\\\n\\\\t\\\\t\\\\tusel replaceFrom: usel size + 1 to: usel size with:\\\\n\\\\t\\\\t\\\\t\\\\t(UndoParagraph text copyFrom: ind to: ind).\\\\n\\\\t\\\\t\\\\tUndoParagraph text replaceFrom: ind to: ind with:\\\\nself nullText]].\\\\n\\\\t^false! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys'!\\\\nnormalCharacter: characterStream \\\\n\\\\t\\\\\\\"A nonspecial character is to be added to the stream of characters.\\\\\\\"\\\\n\\\\n\\\\tcharacterStream nextPut: sensor keyboard.\\\\n\\\\t^false! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys' stamp: 'th 9/19/2002 18:25'!\\\\nquerySymbol: characterStream\\\\n\\\\t\\\\\\\"Invoked by Ctrl-q to query the Symbol table and display alternate symbols.\\\\n\\\\t See comment in completeSymbol:lastOffering: for details.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\t\\\\\\\"keep typeahead\\\\\\\"\\\\n\\\\tself hasCaret\\\\n\\\\t\\\\tifTrue: \\\\\\\"Ctrl-q typed when a caret\\\\\\\"\\\\n\\\\t\\\\t\\\\t[self perform: #completeSymbol:lastOffering: withArguments:\\\\n\\\\t\\\\t\\\\t\\\\t((UndoParagraph == paragraph and: [UndoMessage sends: #undoQuery:lastOffering:])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [UndoMessage arguments] \\\\\\\"repeated Ctrl-q\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [Array with: nil with: nil])] \\\\\\\"initial Ctrl-q\\\\\\\"\\\\n\\\\t\\\\tifFalse: \\\\\\\"Ctrl-q typed when statements were highlighted\\\\\\\"\\\\n\\\\t\\\\t\\\\t[view flash].\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys'!\\\\nsearch: characterStream\\\\n\\\\t\\\\\\\"Invoked by Ctrl-S.  Same as 'again', but always uses the existing FindText\\\\n\\\\t and ChangeText regardless of the last edit.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself againOrSame: true. \\\\\\\"true means use same keys\\\\\\\"\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys' stamp: 'sw 8/29/2000 14:58'!\\\\nselectAll\\\\n\\\\t\\\\\\\"Make the selection be all the characters of the receiver\\\\\\\"\\\\n\\\\n\\\\tself selectFrom: 1 to: paragraph text string size! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys'!\\\\nselectAll: characterStream \\\\n\\\\t\\\\\\\"select everything, invoked by cmd-a.  1/17/96 sw\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself selectFrom: 1 to: paragraph text string size.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys' stamp: 'th 9/19/2002 17:34'!\\\\nsimulatedBackspace\\\\n\\\\t\\\\\\\"Backspace over the last character, derived from hand-char recognition.  2/5/96 sw\\\\\\\"\\\\n\\\\n\\\\t| startIndex |\\\\n\\\\tstartIndex _ self markIndex + (self hasSelection ifTrue: [1] ifFalse: [0]).\\\\n\\\\n\\\\tstartIndex _ 1 max: startIndex - 1.\\\\n\\\\tself backTo: startIndex.\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'undo support'!\\\\nisDoing\\\\n\\\\t\\\\\\\"Call from a doer/undoer/redoer any time to see which it is.\\\\\\\"\\\\n\\\\n\\\\t^(self isUndoing | self isRedoing) not! !\\\\n\\\\n!ParagraphEditor methodsFor: 'undo support'!\\\\nisRedoing\\\\n\\\\t\\\\\\\"Call from a doer/undoer/redoer any time to see which it is.\\\\\\\"\\\\n\\\\n\\\\t^UndoParagraph == #redoing! !\\\\n\\\\n!ParagraphEditor methodsFor: 'undo support'!\\\\nisUndoing\\\\n\\\\t\\\\\\\"Call from a doer/undoer/redoer any time to see which it is.\\\\\\\"\\\\n\\\\n\\\\t^UndoParagraph == #undoing! !\\\\n\\\\n!ParagraphEditor methodsFor: 'undo support'!\\\\nnoUndoer\\\\n\\\\t\\\\\\\"The Undoer to use when the command can not be undone.  Checked for\\\\n\\\\t specially by readKeyboard.\\\\\\\"\\\\n\\\\n\\\\tUndoMessage _ Message selector: #noUndoer! !\\\\n\\\\n!ParagraphEditor methodsFor: 'undo support'!\\\\nundoMessage: aMessage forRedo: aBoolean\\\\n\\\\t\\\\\\\"Call this from an undoer/redoer to set up UndoMessage as the\\\\n\\\\t corresponding redoer/undoer.  Also set up UndoParagraph, as well\\\\n\\\\t as the state variable Undone.  It is assumed that UndoInterval has been\\\\n\\\\t established (generally by zapSelectionWith:) and that UndoSelection has been\\\\n\\\\t saved (generally by replaceSelectionWith: or replace:With:and:).\\\\\\\"\\\\n\\\\n\\\\tself isDoing ifTrue: [UndoParagraph _ paragraph].\\\\n\\\\tUndoMessage _ aMessage.\\\\n\\\\tUndone _ aBoolean! !\\\\n\\\\n!ParagraphEditor methodsFor: 'undo support'!\\\\nundoer: aSelector\\\\n\\\\t\\\\\\\"See comment in undoMessage:.  Use this version when aSelector has no arguments, and you are doing or redoing and want to prepare for undoing.\\\\\\\"\\\\n\\\\n\\\\tself undoMessage: (Message selector: aSelector) forRedo: false! !\\\\n\\\\n!ParagraphEditor methodsFor: 'undo support'!\\\\nundoer: aSelector with: arg1\\\\n\\\\t\\\\\\\"See comment in undoMessage:.  Use this version when aSelector has one argument, and you are doing or redoing and want to prepare for undoing.\\\\\\\"\\\\n\\\\n\\\\tself undoMessage: (Message selector: aSelector argument: arg1) forRedo: false! !\\\\n\\\\n!ParagraphEditor methodsFor: 'undo support'!\\\\nundoer: aSelector with: arg1 with: arg2\\\\n\\\\t\\\\\\\"See comment in undoMessage:.  Use this version when aSelector has two arguments, and you are doing or redoing and want to prepare for undoing.\\\\\\\"\\\\n\\\\n\\\\tself undoMessage: (Message selector: aSelector arguments: (Array with: arg1 with: arg2)) forRedo: false! !\\\\n\\\\n!ParagraphEditor methodsFor: 'undo support'!\\\\nundoer: aSelector with: arg1 with: arg2 with: arg3\\\\n\\\\t\\\\\\\"See comment in undoMessage:.  Use this version when aSelector has three arguments, and you are doing or redoing and want to prepare for undoing.\\\\\\\"\\\\n\\\\n\\\\tself undoMessage: (Message selector: aSelector arguments: (Array with: arg1 with: arg2 with: arg3)) forRedo: false! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'undoers'!\\\\nundoAgain: indices andReselect: home typedKey: wasTypedKey\\\\n\\\\t\\\\\\\"The last command was again.  Undo it. Redoer: itself.\\\\\\\"\\\\n\\\\n\\\\t| findSize substText index subject |\\\\n\\\\t(self isRedoing & wasTypedKey) ifTrue: \\\\\\\"redelete search key\\\\\\\"\\\\n\\\\t\\\\t[self selectInterval: home.\\\\n\\\\t\\\\tself zapSelectionWith: self nullText].\\\\n\\\\n\\\\tfindSize _ (self isRedoing ifTrue: [FindText] ifFalse: [ChangeText]) size.\\\\n\\\\tsubstText _ self isUndoing ifTrue: [FindText] ifFalse: [ChangeText].\\\\n\\\\t(self isUndoing ifTrue: [indices size to: 1 by: -1] ifFalse: [1 to: indices size]) do:\\\\n\\\\t\\\\t[:i |\\\\n\\\\t\\\\tindex _ indices at: i.\\\\n\\\\t\\\\t(subject _ index to: index + findSize - 1) = self selectionInterval ifFalse:\\\\n\\\\t\\\\t\\\\t[self selectInterval: subject].\\\\n\\\\t\\\\tFindText == ChangeText ifFalse: [self zapSelectionWith: substText]].\\\\n\\\\n\\\\tself isUndoing\\\\n\\\\t\\\\tifTrue:  \\\\\\\"restore selection to where it was when 'again' was invoked\\\\\\\"\\\\n\\\\t\\\\t\\\\t[wasTypedKey\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\\\\"search started by typing key at a caret; restore it\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self selectAt: home first.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself zapSelectionWith: FindText.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself selectAt: home last + 1]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self selectInterval: home]].\\\\n\\\\n\\\\tself undoMessage: UndoMessage forRedo: self isUndoing! !\\\\n\\\\n!ParagraphEditor methodsFor: 'undoers'!\\\\nundoAndReselect: undoHighlight redoAndReselect: redoHighlight\\\\n\\\\t\\\\\\\"Undo typing, cancel, paste, and other operations that are like replaces\\\\n\\\\t but the selection is not the whole restored text after undo, redo, or both.\\\\n\\\\t undoHighlight is selected after this phase and redoHighlight after the next phase.\\\\n\\\\tRedoer: itself.\\\\\\\"\\\\n\\\\n\\\\tself replace: self selectionInterval with: UndoSelection and:\\\\n\\\\t\\\\t[self selectInterval: undoHighlight].\\\\n\\\\tself undoMessage: (UndoMessage argument: redoHighlight) forRedo: self isUndoing\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'undoers'!\\\\nundoCutCopy: oldPasteBuffer\\\\n\\\\t\\\\\\\"Undo of a cut, copy, or any edit that changed CurrentSelection.  Be sure\\\\n\\\\t undo-copy does not lock the model.  Redoer: itself, so never isRedoing.\\\\\\\"\\\\n\\\\n\\\\t| recentCut |\\\\n\\\\trecentCut _ self clipboardText.\\\\t\\\\n\\\\tUndoSelection size = UndoInterval size\\\\n\\\\t\\\\tifFalse: [self replaceSelectionWith: UndoSelection].\\\\n\\\\tself clipboardTextPut: oldPasteBuffer.\\\\n\\\\tself undoer: #undoCutCopy: with: recentCut! !\\\\n\\\\n!ParagraphEditor methodsFor: 'undoers' stamp: 'th 9/19/2002 18:46'!\\\\nundoQuery: hintText lastOffering: selectorOrNil\\\\n\\\\t\\\\\\\"Undo ctrl-q.  selectorOrNil (if not nil) is the previously offered selector.\\\\n\\\\t hintText is the original hint.  Redoer: completeSymbol.\\\\\\\"\\\\n\\\\n\\\\tself zapSelectionWith: UndoSelection.\\\\n\\\\tself undoMessage: (Message selector: #completeSymbol:lastOffering: arguments: UndoMessage arguments) forRedo: true.\\\\n\\\\tself selectAt: self stopIndex! !\\\\n\\\\n!ParagraphEditor methodsFor: 'undoers'!\\\\nundoReplace\\\\n\\\\t\\\\\\\"Undo of any command that replaced a selection by other text that it left\\\\n\\\\t highlighted, and that is undone and redone by simple reversal of the\\\\n\\\\t operation.  This is the most common Undoer; call replaceSelectionWith:\\\\n\\\\t to get this setup.  Redoer: itself, so never isRedoing.\\\\\\\"\\\\n\\\\n\\\\tself replaceSelectionWith: UndoSelection! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nbrowseChangeSetsWithSelector\\\\n\\\\t\\\\\\\"Determine which, if any, change sets have at least one change for the selected selector, independent of class\\\\\\\"\\\\n\\\\n\\\\t| aSelector |\\\\n\\\\tself lineSelectAndEmptyCheck: [^ self].\\\\n\\\\t(aSelector := self selectedSelector) == nil ifTrue: [^ view flash].\\\\n\\\\tself terminateAndInitializeAround: [ChangeSorter browseChangeSetsWithSelector: aSelector]! !\\\\n\\\\n!ParagraphEditor methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nbrowseItHere\\\\n\\\\t\\\\\\\"Retarget the receiver's window to look at the selected class, if appropriate.  3/1/96 sw\\\\\\\"\\\\n\\\\t| aSymbol foundClass b |\\\\n\\\\t(((b := model) isKindOf: Browser) and: [b couldBrowseAnyClass])\\\\n\\\\t\\\\tifFalse: [^ view flash].\\\\n\\\\tmodel okToChange ifFalse: [^ view flash].\\\\n\\\\tself selectionInterval isEmpty ifTrue: [self selectWord].\\\\n\\\\t(aSymbol := self selectedSymbol) isNil ifTrue: [^ view flash].\\\\n\\\\n\\\\tself terminateAndInitializeAround:\\\\n\\\\t\\\\t[foundClass := (Smalltalk at: aSymbol ifAbsent: [nil]).\\\\n\\\\t\\\\t\\\\tfoundClass isNil ifTrue: [^ view flash].\\\\n\\\\t\\\\t\\\\t(foundClass isKindOf: Class)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[model systemCategoryListIndex: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(model systemCategoryList indexOf: foundClass category).\\\\n\\\\t\\\\tmodel classListIndex: (model classList indexOf: foundClass name)]]! !\\\\n\\\\n!ParagraphEditor methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\ndebugIt\\\\n\\\\n\\\\t| method receiver context |\\\\n\\\\t(model respondsTo: #doItReceiver) \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[FakeClassPool adopt: model selectedClass.\\\\n\\\\t\\\\t\\\\treceiver := model doItReceiver.\\\\n\\\\t\\\\t\\\\tcontext := model doItContext]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[receiver := context := nil].\\\\n\\\\tself lineSelectAndEmptyCheck: [^self].\\\\n\\\\tmethod := self compileSelectionFor: receiver in: context.\\\\n\\\\tmethod notNil ifTrue:\\\\n\\\\t\\\\t[self debug: method receiver: receiver in: context].\\\\n\\\\tFakeClassPool adopt: nil! !\\\\n\\\\n!ParagraphEditor methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\ndebug: aCompiledMethod receiver: anObject in: evalContext\\\\n\\\\n\\\\t| selector guineaPig debugger context |\\\\n\\\\tselector := evalContext isNil ifTrue: [#DoIt] ifFalse: [#DoItIn:].\\\\n\\\\tanObject class addSelectorSilently: selector withMethod: aCompiledMethod.\\\\n\\\\tguineaPig := evalContext isNil\\\\n\\\\t\\\\tifTrue: [[anObject DoIt] newProcess]\\\\n\\\\t\\\\tifFalse: [[anObject DoItIn: evalContext] newProcess].\\\\n\\\\tcontext := guineaPig suspendedContext.\\\\n\\\\tdebugger := Debugger new\\\\n\\\\t\\\\tprocess: guineaPig\\\\n\\\\t\\\\tcontroller: ((Smalltalk isMorphic not and: [ScheduledControllers inActiveControllerProcess])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [ScheduledControllers activeController]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [nil])\\\\n\\\\t\\\\tcontext: context\\\\n\\\\t\\\\tisolationHead: nil.\\\\n\\\\tdebugger openFullNoSuspendLabel: 'Debug it'.\\\\n\\\\t[debugger interruptedContext method == aCompiledMethod]\\\\n\\\\t\\\\twhileFalse: [debugger send].\\\\n\\\\tanObject class basicRemoveSelector: selector! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'private' stamp: 'th 9/19/2002 18:48'!\\\\nagainOnce: indices\\\\n\\\\t\\\\\\\"Find the next occurrence of FindText.  If none, answer false.\\\\n\\\\tAppend the start index of the occurrence to the stream indices, and, if\\\\n\\\\tChangeText is not the same object as FindText, replace the occurrence by it.\\\\n\\\\tNote that the search is case-sensitive for replacements, otherwise not.\\\\\\\"\\\\n\\\\n\\\\t| where |\\\\n\\\\twhere _ paragraph text findString: FindText startingAt: self stopIndex\\\\n\\\\t\\\\t\\\\t\\\\tcaseSensitive: ((ChangeText ~~ FindText) or: [Preferences caseSensitiveFinds]).\\\\n\\\\twhere = 0 ifTrue: [^ false].\\\\n\\\\tself deselect; selectInvisiblyFrom: where to: where + FindText size - 1.\\\\n\\\\tChangeText ~~ FindText ifTrue: [self zapSelectionWith: ChangeText].\\\\n\\\\tindices nextPut: where.\\\\n\\\\tself selectAndScroll.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'private'!\\\\nagainOrSame: useOldKeys\\\\n\\\\t\\\\\\\"Subroutine of search: and again.  If useOldKeys, use same FindText and ChangeText as before.\\\\n\\\\t 1/26/96 sw: real worked moved to againOrSame:many:\\\\\\\"\\\\n\\\\n\\\\t^ self againOrSame: useOldKeys many: sensor leftShiftDown! !\\\\n\\\\n!ParagraphEditor methodsFor: 'private' stamp: 'th 9/18/2002 16:53'!\\\\nagainOrSame: useOldKeys many: many\\\\n\\\\t\\\\\\\"Subroutine of search: and again.  If useOldKeys, use same FindText and ChangeText as before.  If many is true, do it repeatedly.  Created 1/26/96 sw by adding the many argument to #againOrSame.\\\\\\\"\\\\n\\\\n\\\\t|  home indices wasTypedKey |\\\\n\\\\n\\\\thome _ self selectionInterval.  \\\\\\\"what was selected when 'again' was invoked\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"If new keys are to be picked...\\\\\\\"\\\\n\\\\tuseOldKeys ifFalse: \\\\\\\"Choose as FindText...\\\\\\\"\\\\n\\\\t\\\\t[FindText _ UndoSelection.  \\\\\\\"... the last thing replaced.\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"If the last command was in another paragraph, ChangeText is set...\\\\\\\"\\\\n\\\\t\\\\tparagraph == UndoParagraph ifTrue: \\\\\\\"... else set it now as follows.\\\\\\\"\\\\n\\\\t\\\\t\\\\t[UndoInterval ~= home ifTrue: [self selectInterval: UndoInterval]. \\\\\\\"blink\\\\\\\"\\\\n\\\\t\\\\t\\\\tChangeText _ ((UndoMessage sends: #undoCutCopy:) and: [self hasSelection])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [FindText] \\\\\\\"== objects signal no model-locking by 'undo copy'\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self selection]]]. \\\\\\\"otherwise, change text is last-replaced text\\\\\\\"\\\\n\\\\n\\\\t(wasTypedKey _ FindText size = 0)\\\\n\\\\t\\\\tifTrue: \\\\\\\"just inserted at a caret\\\\\\\"\\\\n\\\\t\\\\t\\\\t[home _ self selectionInterval.\\\\n\\\\t\\\\t\\\\tself replaceSelectionWith: self nullText.  \\\\\\\"delete search key...\\\\\\\"\\\\n\\\\t\\\\t\\\\tFindText _ ChangeText] \\\\\\\"... and search for it, without replacing\\\\\\\"\\\\n\\\\t\\\\tifFalse: \\\\\\\"Show where the search will start\\\\\\\"\\\\n\\\\t\\\\t\\\\t[home last = self selectionInterval last ifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[self selectInterval: home]].\\\\n\\\\n\\\\t\\\\\\\"Find and Change, recording start indices in the array\\\\\\\"\\\\n\\\\tindices _ WriteStream on: (Array new: 20). \\\\\\\"an array to store change locs\\\\\\\"\\\\n\\\\t[(self againOnce: indices) & many] whileTrue. \\\\\\\"<-- this does the work\\\\\\\"\\\\n\\\\tindices isEmpty ifTrue:  \\\\\\\"none found\\\\\\\"\\\\n\\\\t\\\\t[self flash.\\\\n\\\\t\\\\twasTypedKey ifFalse: [^self]].\\\\n\\\\n\\\\t(many | wasTypedKey) ifFalse: \\\\\\\"after undo, select this replacement\\\\\\\"\\\\n\\\\t\\\\t[home _ self startIndex to:\\\\n\\\\t\\\\t\\\\tself startIndex + UndoSelection size - 1].\\\\n\\\\n\\\\tself undoer: #undoAgain:andReselect:typedKey: with: indices contents with: home with: wasTypedKey! !\\\\n\\\\n!ParagraphEditor methodsFor: 'private' stamp: 'th 9/19/2002 18:16'!\\\\ncompleteSymbol: hintText lastOffering: selectorOrNil\\\\n\\\\t\\\\\\\"Invoked by Ctrl-q when there is only a caret.\\\\n\\\\t\\\\tDo selector-completion, i.e., try to replace the preceding identifier by a\\\\n\\\\t\\\\tselector that begins with those characters & has as many keywords as possible.\\\\n\\\\t \\\\tLeave two spaces after each colon (only one after the last) as space for\\\\n\\\\t\\\\targuments.  Put the caret after the space after the first keyword.  If the\\\\n\\\\t\\\\tuser types Ctrl-q again immediately, choose a different selector.\\\\n\\\\t Undoer: #undoQuery:lastOffering:; Redoer: itself.\\\\n\\\\tIf redoing, just redisplay the last offering, selector[OrNil].\\\\\\\"\\\\n\\\\n\\\\t| firstTime input prior caret newStart sym kwds outStream |\\\\n\\\\tfirstTime _ self isRedoing\\\\n\\\\t\\\\tifTrue: [prior _ sym _ selectorOrNil. true]\\\\n\\\\t\\\\tifFalse: [hintText isNil].\\\\n\\\\tfirstTime\\\\n\\\\t\\\\tifTrue: \\\\\\\"Initial Ctrl-q (or redo)\\\\\\\"\\\\t\\\\t\\\\t\\\\t\\\\t\\\\n\\\\t\\\\t\\\\t[caret _ self startIndex.\\\\n\\\\t\\\\t\\\\tself selectPrecedingIdentifier.\\\\n\\\\t\\\\t\\\\tinput _ self selection]\\\\n\\\\t\\\\tifFalse: \\\\\\\"Repeated Ctrl-q\\\\\\\"\\\\n\\\\t\\\\t\\\\t[caret _ UndoInterval first + hintText size.\\\\n\\\\t\\\\t\\\\tself selectInvisiblyFrom: UndoInterval first to: UndoInterval last.\\\\n\\\\t\\\\t\\\\tinput _ hintText.\\\\n\\\\t\\\\t\\\\tprior _ selectorOrNil].\\\\n\\\\t(input size ~= 0 and: [sym ~~ nil or:\\\\n\\\\t\\\\t\\\\t[(sym _ Symbol thatStarts: input string skipping: prior) ~~ nil]])\\\\n\\\\t\\\\tifTrue: \\\\\\\"found something to offer\\\\\\\"\\\\n\\\\t\\\\t\\\\t[newStart _ self startIndex.\\\\n\\\\t\\\\t\\\\toutStream _ WriteStream on: (String new: 2 * sym size).\\\\n\\\\t\\\\t\\\\t1 to: (kwds _ sym keywords) size do:\\\\n\\\\t\\\\t\\\\t\\\\t[:i |\\\\n\\\\t\\\\t\\\\t\\\\toutStream nextPutAll: (kwds at: i).\\\\n\\\\t\\\\t\\\\t\\\\ti = 1 ifTrue: [caret _ newStart + outStream contents size + 1].\\\\n\\\\t\\\\t\\\\t\\\\toutStream nextPutAll:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(i < kwds size ifTrue: ['  '] ifFalse: [' '])].\\\\n\\\\t\\\\t\\\\tUndoSelection _ input.\\\\n\\\\t\\\\t\\\\tself deselect; zapSelectionWith: outStream contents asText.\\\\n\\\\t\\\\t\\\\tself undoer: #undoQuery:lastOffering: with: input with: sym]\\\\n\\\\t\\\\tifFalse: \\\\\\\"no more matches\\\\\\\"\\\\n\\\\t\\\\t\\\\t[firstTime ifFalse: \\\\\\\"restore original text & set up for a redo\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t[UndoSelection _ self selection.\\\\n\\\\t\\\\t\\\\t\\\\tself deselect; zapSelectionWith: input.\\\\n\\\\t\\\\t\\\\t\\\\tself undoer: #completeSymbol:lastOffering: with: input with: prior.\\\\n\\\\t\\\\t\\\\t\\\\tUndone _ true].\\\\n\\\\t\\\\t\\\\tview flash].\\\\n\\\\tself selectAt: caret! !\\\\n\\\\n!ParagraphEditor methodsFor: 'private' stamp: 'th 9/18/2002 16:49'!\\\\nexchangeWith: prior\\\\n\\\\t\\\\\\\"If the prior selection is non-overlapping and legal, exchange the text of\\\\n\\\\t it with the current selection and leave the currently selected text selected\\\\n\\\\t in the location of the prior selection (or leave a caret after a non-caret if it was\\\\n\\\\t exchanged with a caret).  If both selections are carets, flash & do nothing.\\\\n\\\\t Don't affect the paste buffer.  Undoer: itself; Redoer: Undoer.\\\\\\\"\\\\n\\\\n\\\\t| start stop before selection priorSelection delta altInterval |\\\\n\\\\tstart _ self startIndex.\\\\n\\\\tstop _ self stopIndex - 1.\\\\n\\\\t((prior first <= prior last) | (start <= stop) \\\\\\\"Something to exchange\\\\\\\" and:\\\\n\\\\t\\\\t\\\\t[self isDisjointFrom: prior])\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[before _ prior last < start.\\\\n\\\\t\\\\t\\\\tselection _ self selection.\\\\n\\\\t\\\\t\\\\tpriorSelection _ paragraph text copyFrom: prior first to: prior last.\\\\n\\\\n\\\\t\\\\t\\\\tdelta _ before ifTrue: [0] ifFalse: [priorSelection size - selection size].\\\\n\\\\t\\\\t\\\\tself zapSelectionWith: priorSelection.\\\\n\\\\t\\\\t\\\\tself selectFrom: prior first + delta to: prior last + delta.\\\\n\\\\n\\\\t\\\\t\\\\tdelta _ before ifTrue: [stop - prior last] ifFalse: [start - prior first].\\\\n\\\\t\\\\t\\\\tself zapSelectionWith: selection.\\\\n\\\\t\\\\t\\\\taltInterval _ prior first + delta to: prior last + delta.\\\\n\\\\t\\\\t\\\\tself undoer: #exchangeWith: with: altInterval.\\\\n\\\\t\\\\t\\\\t\\\\\\\"If one was a caret, make it otherInterval & leave the caret after the other\\\\\\\"\\\\n\\\\t\\\\t\\\\tprior first > prior last ifTrue: [self selectAt: UndoInterval last + 1].\\\\n\\\\t\\\\t\\\\totherInterval _ start > stop\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self selectAt: altInterval last + 1. UndoInterval]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [altInterval]]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[view flash]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'private' stamp: 'raok 11/15/2001 14:01'!\\\\nexplainDelimitor: string\\\\n\\\\t\\\\\\\"Is string enclosed in delimitors?\\\\\\\"\\\\n\\\\n\\\\t| str |\\\\n\\\\t(string at: 1) isLetter ifTrue: [^nil].  \\\\\\\"only special chars\\\\\\\"\\\\n\\\\t(string first = string last) ifTrue:\\\\n\\\\t\\\\t\\\\t[^ self explainChar: (String with: string first)]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[(string first = $( and: [string last = $)]) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[^ self explainChar: (String with: string first)].\\\\n\\\\t\\\\t\\\\t(string first = $[ and: [string last = $]]) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[^ self explainChar: (String with: string first)].\\\\n\\\\t\\\\t\\\\t(string first = ${ and: [string last = $}]) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[^ self explainChar: (String with: string first)].\\\\n\\\\t\\\\t\\\\t(string first = $< and: [string last = $>]) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[^ self explainChar: (String with: string first)].\\\\n\\\\t\\\\t\\\\t(string first = $# and: [string last = $)]) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[^'\\\\\\\"An instance of class Array.  The Numbers, Characters, or Symbols between the parenthesis are the elements of the Array.\\\\\\\"'].\\\\n\\\\t\\\\t\\\\tstring first = $# ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[^'\\\\\\\"An instance of class Symbol.\\\\\\\"'].\\\\n\\\\t\\\\t\\\\t(string first = $$ and: [string size = 2]) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[^'\\\\\\\"An instance of class Character.  This one is the character ', (String with: string last), '.\\\\\\\"'].\\\\n\\\\t\\\\t\\\\t(string first = $:) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[str _ string allButFirst.\\\\n\\\\t\\\\t\\\\t\\\\t(self explainTemp: str) ~~ nil ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[^'\\\\\\\"An argument to this block will be bound to the temporary variable ',\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstr, '.\\\\\\\"']]].\\\\n\\\\t^ nil! !\\\\n\\\\n!ParagraphEditor methodsFor: 'private' stamp: 'tk 7/14/2000 12:15'!\\\\ngetPluggableYellowButtonMenu: shiftKeyState\\\\n\\\\t| customMenu |\\\\n\\\\t^ ((view ~~ nil) and: [(customMenu _ view getMenu: shiftKeyState) notNil])\\\\n\\\\t\\\\tifTrue: [customMenu]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[shiftKeyState\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self class shiftedYellowButtonMenu]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self class yellowButtonMenu]]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'private'!\\\\nindent: delta fromStream: inStream toStream: outStream\\\\n\\\\t\\\\\\\"Append the contents of inStream to outStream, adding or deleting delta or -delta\\\\n\\\\t tabs at the beginning, and after every CR except a final CR.  Do not add tabs\\\\n\\\\t to totally empty lines, and be sure nothing but tabs are removed from lines.\\\\\\\"\\\\n\\\\n\\\\t| ch skip cr tab prev atEnd |\\\\n\\\\tcr _ Character cr.\\\\n\\\\ttab _ Character tab.\\\\n\\\\tdelta > 0\\\\n\\\\t\\\\tifTrue: \\\\\\\"shift right\\\\\\\"\\\\n\\\\t\\\\t\\\\t[prev _ cr.\\\\n\\\\t\\\\t\\\\t [ch _ (atEnd _ inStream atEnd) ifTrue: [cr] ifFalse: [inStream next].\\\\n\\\\t\\\\t\\\\t  (prev == cr and: [ch ~~ cr]) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[delta timesRepeat: [outStream nextPut: tab]].\\\\n\\\\t\\\\t\\\\t  atEnd]\\\\n\\\\t\\\\t\\\\t\\\\twhileFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[outStream nextPut: ch.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tprev _ ch]]\\\\n\\\\t\\\\tifFalse: \\\\\\\"shift left\\\\\\\"\\\\n\\\\t\\\\t\\\\t[skip _ delta. \\\\\\\"a negative number\\\\\\\"\\\\n\\\\t\\\\t\\\\t [inStream atEnd] whileFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[((ch _ inStream next) == tab and: [skip < 0]) ifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[outStream nextPut: ch].\\\\n\\\\t\\\\t\\\\t\\\\tskip _ ch == cr ifTrue: [delta] ifFalse: [skip + 1]]]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'private' stamp: 'cmm 4/9/2004 14:00'!\\\\nisDisjointFrom: anInterval\\\\n\\\\t\\\\\\\"Answer true if anInterval is a caret not touching or within the current\\\\n\\\\t interval, or if anInterval is a non-caret that does not overlap the current\\\\n\\\\t selection.\\\\\\\"\\\\n\\\\n\\\\t| fudge |\\\\n\\\\tfudge _ anInterval size = 0 ifTrue: [1] ifFalse: [0].\\\\n\\\\t^(anInterval last + fudge < self startIndex or:\\\\n\\\\t\\\\t\\\\t[anInterval first - fudge >= self stopIndex])\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'private' stamp: 'th 11/24/2002 17:13'!\\\\nlines\\\\n\\\\t\\\\\\\"Other than my member paragraph i compute lines based on logical\\\\n\\\\tline breaks, not optical (which may change due to line wrapping of the editor)\\\\\\\"\\\\n\\\\t| lines string index lineIndex stringSize |\\\\n\\\\tstring _ paragraph text string.\\\\n\\\\t\\\\\\\"Empty strings have no lines at all. Think of something.\\\\\\\"\\\\n\\\\tstring isEmpty ifTrue:[^{#(1 0 0)}].\\\\n\\\\tstringSize _ string size.\\\\n\\\\tlines _ OrderedCollection new: (string size // 15).\\\\n\\\\tindex _ 0.\\\\n\\\\tlineIndex _ 0.\\\\n\\\\tstring linesDo:[:line |\\\\n\\\\t\\\\tlines addLast: (Array\\\\n\\\\t\\\\t\\\\twith: (index _ index + 1)\\\\n\\\\t\\\\t\\\\twith: (lineIndex _ lineIndex + 1)\\\\n\\\\t\\\\t\\\\twith: (index _ index + line size min: stringSize))].\\\\n\\\\t\\\\\\\"Special workaround for last line empty.\\\\\\\"\\\\n\\\\tstring last == Character cr\\\\n\\\\t\\\\\\\"lines last last < stringSize\\\\\\\" ifTrue:[lines addLast:{stringSize +1. lineIndex+1. stringSize}].\\\\n\\\\t^lines! !\\\\n\\\\n!ParagraphEditor methodsFor: 'private' stamp: 'th 9/19/2002 19:57'!\\\\nmoveCursor: directionBlock forward: forward specialBlock: specialBlock\\\\n\\\\t\\\\\\\"Private - Move cursor.\\\\n\\\\tdirectionBlock is a one argument Block that computes the new Position from a given one.\\\\n\\\\tspecialBlock is a one argumentBlock that computes the new position from a given one under the alternate semantics.\\\\n\\\\tNote that directionBlock always is evaluated first.\\\\\\\"\\\\n\\\\t| shift indices newPosition |\\\\n\\\\tshift _ sensor leftShiftDown.\\\\n\\\\tindices _ self setIndices: shift forward: forward.\\\\n\\\\tnewPosition _ directionBlock value: (indices at: #moving).\\\\n\\\\t(sensor commandKeyPressed or:[sensor controlKeyPressed])\\\\n\\\\t\\\\tifTrue: [newPosition _ specialBlock value: newPosition].\\\\n\\\\tsensor keyboard.\\\\n\\\\tshift\\\\n\\\\t\\\\tifTrue: [self selectMark: (indices at: #fixed) point: newPosition - 1]\\\\n\\\\t\\\\tifFalse: [self selectAt: newPosition]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'private' stamp: 'sma 12/15/1999 11:32'!\\\\nnextWord: position\\\\n\\\\t| string index |\\\\n\\\\tstring _ paragraph text string.\\\\n\\\\tindex _ position.\\\\n\\\\t[(index between: 1 and: string size) and: [(string at: index) isAlphaNumeric]]\\\\n\\\\t\\\\twhileTrue: [index _ index + 1].\\\\n\\\\t[(index between: 1 and: string size) and: [(string at: index) isAlphaNumeric not]]\\\\n\\\\t\\\\twhileTrue: [index _ index + 1].\\\\n\\\\t^ index! !\\\\n\\\\n!ParagraphEditor methodsFor: 'private'!\\\\nnullText\\\\n\\\\n\\\\t^Text string: '' emphasis: emphasisHere! !\\\\n\\\\n!ParagraphEditor methodsFor: 'private' stamp: 'th 9/20/2002 11:09'!\\\\npageHeight\\\\n\\\\t| howManyLines visibleHeight totalHeight ratio |\\\\n\\\\thowManyLines _ paragraph numberOfLines.\\\\n\\\\tvisibleHeight _ self visibleHeight.\\\\n\\\\ttotalHeight _ self totalTextHeight.\\\\n\\\\tratio _ visibleHeight / totalHeight.\\\\n\\\\t^(ratio * howManyLines) rounded - 2! !\\\\n\\\\n!ParagraphEditor methodsFor: 'private' stamp: 'sma 12/15/1999 11:33'!\\\\npreviousWord: position\\\\n\\\\t| string index |\\\\n\\\\tstring _ paragraph text string.\\\\n\\\\tindex _ position.\\\\n\\\\t[(index between: 1 and: string size) and: [(string at: index) isAlphaNumeric not]]\\\\n\\\\t\\\\twhileTrue: [index _ index - 1].\\\\n\\\\t[(index between: 1 and: string size) and: [(string at: index) isAlphaNumeric]]\\\\n\\\\t\\\\twhileTrue: [index _ index - 1].\\\\n\\\\t^ index + 1! !\\\\n\\\\n!ParagraphEditor methodsFor: 'private' stamp: 'BG 4/29/2004 11:19'!\\\\nsameColumn: start newLine: lineBlock forward: isForward\\\\n\\\\t\\\\\\\"Private - Compute the index in my text\\\\n\\\\twith the line number derived from lineBlock,\\\\\\\"\\\\n\\\\t\\\\\\\" a one argument block accepting the old line number.\\\\n\\\\tThe position inside the line will be preserved as good as possible\\\\\\\"\\\\n\\\\t\\\\\\\"The boolean isForward is used in the border case to determine if\\\\n\\\\twe should move to the beginning or the end of the line.\\\\\\\"\\\\n\\\\t| wordStyle column currentLine offsetAtTargetLine targetEOL lines numberOfLines currentLineNumber targetLineNumber |\\\\n\\\\twordStyle _ Preferences wordStyleCursorMovement.\\\\n\\\\twordStyle\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\tlines _ paragraph lines.\\\\n\\\\t\\\\t\\\\tnumberOfLines := paragraph numberOfLines.\\\\n\\\\t\\\\t\\\\tcurrentLineNumber  _ paragraph lineIndexOfCharacterIndex: start.\\\\n\\\\t\\\\t\\\\tcurrentLine _ lines at: currentLineNumber]\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\tlines _ self lines.\\\\n\\\\t\\\\t\\\\tnumberOfLines := lines size.\\\\n\\\\t\\\\t\\\\tcurrentLine _ lines\\\\n\\\\t\\\\t\\\\t\\\\tdetect:[:lineInterval | lineInterval last >= start]\\\\n\\\\t\\\\t\\\\t\\\\tifNone:[lines last].\\\\n\\\\t\\\\t\\\\tcurrentLineNumber _ currentLine second].\\\\n\\\\tcolumn _ start - currentLine first.\\\\n\\\\ttargetLineNumber _ ((lineBlock value: currentLineNumber) max: 1) min: numberOfLines.\\\\n\\\\toffsetAtTargetLine _ (lines at: targetLineNumber) first.\\\\n\\\\ttargetEOL _ (lines at: targetLineNumber) last + (targetLineNumber == numberOfLines ifTrue:[1]ifFalse:[0]).\\\\n\\\\ttargetLineNumber == currentLineNumber\\\\n\\\\t\\\\\\\"No movement or movement failed. Move to beginning or end of line.\\\\\\\"\\\\n\\\\t\\\\tifTrue:[^isForward\\\\n\\\\t\\\\t\\\\tifTrue:[targetEOL]\\\\n\\\\t\\\\t\\\\tifFalse:[offsetAtTargetLine]].\\\\n\\\\t^offsetAtTargetLine + column min: targetEOL.! !\\\\n\\\\n!ParagraphEditor methodsFor: 'private' stamp: 'md 2/22/2006 21:17'!\\\\nsetIndices: shiftPressed forward: forward\\\\n\\\\t\\\\\\\"Little helper method that sets the moving and fixed indices according to some flags.\\\\\\\"\\\\n\\\\t| indices |\\\\n\\\\tindices _ Dictionary new.\\\\n\\\\tshiftPressed ifTrue: [\\\\n\\\\t\\\\t\\\\tindices at: #moving put: self pointIndex.\\\\n\\\\t\\\\t\\\\tindices at: #fixed put: self markIndex\\\\n\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\tforward\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:[\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tindices at: #moving put: self stopIndex.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tindices at: #fixed put: self startIndex.\\\\n\\\\t\\\\t\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tindices at: #moving put: self startIndex.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tindices at: #fixed put: self stopIndex.\\\\n\\\\t\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t].\\\\n\\\\t^indices! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nParagraphEditor class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!ParagraphEditor class methodsFor: 'class initialization' stamp: 'sw 5/27/2000 00:03'!\\\\nabandonChangeText\\\\n\\\\t\\\\\\\"Call this to get out of the maddening situation in which the system keeps aggressively trying to do a replacement that you no longer wish to make, every time you make choose a new method in a list.\\\\\\\"\\\\n\\\\tChangeText _ FindText\\\\n\\\\n\\\\t\\\\\\\"ParagraphEditor abandonChangeText\\\\\\\"\\\\n! !\\\\n\\\\n!ParagraphEditor class methodsFor: 'class initialization' stamp: 'dgd 10/1/2004 11:00'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Initialize the keyboard shortcut maps and the shared buffers \\\\n\\\\tfor copying text across views and managing again and undo. \\\\n\\\\tMarked this method changed to trigger reinit\\\\\\\"\\\\n\\\\t\\\\\\\"ParagraphEditor initialize\\\\\\\"\\\\n\\\\tUndoSelection := FindText := ChangeText := Text new.\\\\n\\\\tUndoMessage := Message selector: #halt.\\\\n\\\\tself initializeCmdKeyShortcuts.\\\\n\\\\tself initializeShiftCmdKeyShortcuts.! !\\\\n\\\\n!ParagraphEditor class methodsFor: 'class initialization' stamp: 'dgd 4/4/2006 16:07'!\\\\nshiftedYellowButtonMenu\\\\n\\\\t\\\\\\\"Answer the menu to be presented when the yellow button is pressed while the shift key is down\\\\\\\"\\\\n\\\\n\\\\t^ MenuMorph fromArray: {\\\\n\\\\t\\\\t{'explain' translated.\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t#explain}.\\\\n\\\\t\\\\t{'pretty print' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#prettyPrint}.\\\\n\\\\t\\\\t{'pretty print with color' translated.\\\\t\\\\t#prettyPrintWithColor}.\\\\n\\\\t\\\\t{'file it in (G)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#fileItIn}.\\\\n\\\\t\\\\t{'tiles from it' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#selectionAsTiles}.\\\\n\\\\t\\\\t{'spawn (o)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t#spawn}.\\\\n\\\\t\\\\t#-.\\\\n\\\\t\\\\t{'browse it (b)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#browseIt}.\\\\n\\\\t\\\\t{'senders of it (n)' translated.\\\\t\\\\t\\\\t\\\\t#sendersOfIt}.\\\\n\\\\t\\\\t{'implementors of it (m)' translated.\\\\t\\\\t#implementorsOfIt}.\\\\n\\\\t\\\\t{'references to it (N)' translated.\\\\t\\\\t\\\\t#referencesToIt}.\\\\n\\\\t\\\\t#-.\\\\n\\\\t\\\\t{'selectors containing it (W)' translated.\\\\t#methodNamesContainingIt}.\\\\n\\\\t\\\\t{'method strings with it (E)' translated.\\\\t#methodStringsContainingit}.\\\\n\\\\t\\\\t{'method source with it' translated.\\\\t\\\\t#methodSourceContainingIt}.\\\\n\\\\t\\\\t{'class names containing it' translated.\\\\t#classNamesContainingIt}.\\\\n\\\\t\\\\t{'class comments with it' translated.\\\\t\\\\t#classCommentsContainingIt}.\\\\n\\\\t\\\\t{'change sets with it' translated.\\\\t\\\\t\\\\t#browseChangeSetsWithSelector}.\\\\n\\\\t\\\\t#-.\\\\n\\\\t\\\\t{'save contents to file...' translated.\\\\t\\\\t#saveContentsInFile}.\\\\n\\\\t\\\\t{'send contents to printer' translated.\\\\t#sendContentsToPrinter}.\\\\n\\\\t\\\\t{'printer setup' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#printerSetup}.\\\\n\\\\t\\\\t#-.\\\\n\\\\t\\\\t{'special menu...' translated.\\\\t\\\\t\\\\t\\\\t#presentSpecialMenu}.\\\\n\\\\t\\\\t{'more...' translated.\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t#yellowButtonActivity}.\\\\n\\\\t}\\\\n! !\\\\n\\\\n!ParagraphEditor class methodsFor: 'class initialization' stamp: 'dgd 9/1/2005 12:35'!\\\\nyellowButtonExpertMenu\\\\n\\\\n\\\\t^ MenuMorph fromArray: {\\\\n\\\\t\\\\t\\\\t{'set font... (k)' translated.\\\\t\\\\t\\\\t\\\\t#offerFontMenu}.\\\\n\\\\t\\\\t\\\\t{'set style... (K)' translated.\\\\t\\\\t\\\\t\\\\t#changeStyle}.\\\\n\\\\t\\\\t\\\\t{'set alignment... (u)' translated.\\\\t\\\\t#chooseAlignment}.\\\\n\\\\t\\\\t\\\\t#-.\\\\n\\\\t\\\\t\\\\t{'make project link (P)' translated.\\\\t#makeProjectLink}.\\\\n\\\\t\\\\t\\\\t#-.\\\\n\\\\t\\\\t\\\\t{'find...(f)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#find}.\\\\n\\\\t\\\\t\\\\t{'find again (g)' translated.\\\\t\\\\t\\\\t\\\\t#findAgain}.\\\\n\\\\t\\\\t\\\\t{'set search string (h)' translated.\\\\t\\\\t#setSearchString}.\\\\n\\\\t\\\\t\\\\t#-.\\\\n\\\\t\\\\t\\\\t{'do again (j)' translated.\\\\t\\\\t\\\\t\\\\t#again}.\\\\n\\\\t\\\\t\\\\t{'undo (z)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#undo}.\\\\n\\\\t\\\\t\\\\t#-.\\\\n\\\\t\\\\t\\\\t{'copy (c)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#copySelection}.\\\\n\\\\t\\\\t\\\\t{'cut (x)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t#cut}.\\\\n\\\\t\\\\t\\\\t{'paste (v)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#paste}.\\\\n\\\\t\\\\t\\\\t{'paste...' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#pasteRecent}.\\\\n\\\\t\\\\t\\\\t#-.\\\\n\\\\t\\\\t\\\\t{'do it (d)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#doIt}.\\\\n\\\\t\\\\t\\\\t{'print it (p)' translated.\\\\t\\\\t\\\\t\\\\t#printIt}.\\\\n\\\\t\\\\t\\\\t{'inspect it (i)' translated.\\\\t\\\\t\\\\t\\\\t#inspectIt}.\\\\n\\\\t\\\\t\\\\t{'explore it (I)' translated.\\\\t\\\\t\\\\t\\\\t#exploreIt}.\\\\n\\\\t\\\\t\\\\t{'debug it' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#debugIt}.\\\\n\\\\t\\\\t\\\\t#-.\\\\n\\\\t\\\\t\\\\t{'accept (s)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#accept}.\\\\n\\\\t\\\\t\\\\t{'cancel (l)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#cancel}.\\\\n\\\\t\\\\t\\\\t#-.\\\\n\\\\t\\\\t\\\\t{'show bytecodes' translated.\\\\t\\\\t\\\\t#showBytecodes}.\\\\n\\\\t\\\\t\\\\t#-.\\\\n\\\\t\\\\t\\\\t{'copy html' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#copyHtml}.\\\\n\\\\t\\\\t\\\\t#-.\\\\n\\\\t\\\\t\\\\t{'more...' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#shiftedTextPaneMenuRequest}.\\\\n\\\\t\\\\t}.\\\\n! !\\\\n\\\\n!ParagraphEditor class methodsFor: 'class initialization' stamp: 'dgd 10/1/2004 10:59'!\\\\nyellowButtonMenu\\\\n\\\\n\\\\t^ Preferences noviceMode\\\\n\\\\t\\\\t\\\\tifTrue: [self yellowButtonNoviceMenu]\\\\n\\\\t\\\\t\\\\tifFalse: [self yellowButtonExpertMenu]\\\\n! !\\\\n\\\\n!ParagraphEditor class methodsFor: 'class initialization' stamp: 'dgd 11/25/2004 17:33'!\\\\nyellowButtonNoviceMenu\\\\n\\\\n\\\\t^ MenuMorph fromArray: {\\\\n\\\\t\\\\t\\\\t{'set font... (k)' translated.\\\\t\\\\t\\\\t\\\\t#offerFontMenu}.\\\\n\\\\t\\\\t\\\\t{'set style... (K)' translated.\\\\t\\\\t\\\\t\\\\t#changeStyle}.\\\\n\\\\t\\\\t\\\\t{'set alignment... (u)' translated.\\\\t\\\\t#chooseAlignment}.\\\\n\\\\t\\\\t\\\\t#-.\\\\n\\\\t\\\\t\\\\t{'make project link (P)' translated.\\\\t#makeProjectLink}.\\\\n\\\\t\\\\t\\\\t#-.\\\\n\\\\t\\\\t\\\\t{'find...(f)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#find}.\\\\n\\\\t\\\\t\\\\t{'find again (g)' translated.\\\\t\\\\t\\\\t\\\\t#findAgain}.\\\\n\\\\t\\\\t\\\\t{'set search string (h)' translated.\\\\t\\\\t#setSearchString}.\\\\n\\\\t\\\\t\\\\t#-.\\\\n\\\\t\\\\t\\\\t{'do again (j)' translated.\\\\t\\\\t\\\\t\\\\t#again}.\\\\n\\\\t\\\\t\\\\t{'undo (z)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#undo}.\\\\n\\\\t\\\\t\\\\t#-.\\\\n\\\\t\\\\t\\\\t{'copy (c)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#copySelection}.\\\\n\\\\t\\\\t\\\\t{'cut (x)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t#cut}.\\\\n\\\\t\\\\t\\\\t{'paste (v)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#paste}.\\\\n\\\\t\\\\t\\\\t{'paste...' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#pasteRecent}.\\\\n\\\\t\\\\t\\\\t#-.\\\\n\\\\t\\\\t\\\\t{'accept (s)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#accept}.\\\\n\\\\t\\\\t\\\\t{'cancel (l)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#cancel}.\\\\n\\\\t\\\\t}.\\\\n! !\\\\n\\\\n\\\\n!ParagraphEditor class methodsFor: 'instance creation' stamp: 'nk 9/3/2004 14:10'!\\\\nnew\\\\n\\\\t\\\\\\\"Answer a new instance of me with a null Paragraph to be edited.\\\\\\\"\\\\n\\\\n\\\\t| aParagraphEditor |\\\\n\\\\taParagraphEditor _ super new.\\\\n\\\\taParagraphEditor changeParagraph: '' asParagraph.\\\\n\\\\t^aParagraphEditor! !\\\\n\\\\n!ParagraphEditor class methodsFor: 'instance creation'!\\\\nnewParagraph: aParagraph \\\\n\\\\t\\\\\\\"Answer an instance of me with aParagraph as the text to be edited.\\\\\\\"\\\\n\\\\n\\\\t| aParagraphEditor |\\\\n\\\\taParagraphEditor _ super new.\\\\n\\\\taParagraphEditor initialize.\\\\n\\\\taParagraphEditor changeParagraph: aParagraph.\\\\n\\\\t^aParagraphEditor! !\\\\n\\\\n\\\\n!ParagraphEditor class methodsFor: 'keyboard shortcut tables' stamp: 'dgd 4/4/2006 16:04'!\\\\ninitializeCmdKeyShortcuts\\\\n\\\\t\\\\\\\"Initialize the (unshifted) command-key (or alt-key) shortcut table.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"NOTE: if you don't know what your keyboard generates, use Sensor kbdTest\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"ParagraphEditor initialize\\\\\\\"\\\\n\\\\n\\\\t| cmdMap |\\\\n\\\\n\\\\tcmdMap := Array new: 256 withAll: #noop:.\\\\t\\\\\\\"use temp in case of a crash\\\\\\\"\\\\n\\\\n\\\\tcmdMap at: 1 + 1 put: #cursorHome:.\\\\t\\\\t\\\\t\\\\\\\"home key\\\\\\\"\\\\n\\\\tcmdMap at: 4 + 1 put: #cursorEnd:.\\\\t\\\\t\\\\t\\\\t\\\\\\\"end key\\\\\\\"\\\\n\\\\tcmdMap at: 8 + 1 put: #backspace:.\\\\t\\\\t\\\\t\\\\t\\\\\\\"ctrl-H or delete key\\\\\\\"\\\\n\\\\tcmdMap at: 11 + 1 put: #cursorPageUp:.\\\\t\\\\t\\\\\\\"page up key\\\\\\\"\\\\n\\\\tcmdMap at: 12 + 1 put: #cursorPageDown:.\\\\t\\\\\\\"page down key\\\\\\\"\\\\n\\\\tcmdMap at: 13 + 1 put: #crWithIndent:.\\\\t\\\\t\\\\t\\\\\\\"cmd-Return\\\\\\\"\\\\n\\\\tcmdMap at: 27 + 1 put: #offerMenuFromEsc:.\\\\t\\\\\\\"escape key\\\\\\\"\\\\n\\\\tcmdMap at: 28 + 1 put: #cursorLeft:.\\\\t\\\\t\\\\t\\\\\\\"left arrow key\\\\\\\"\\\\n\\\\tcmdMap at: 29 + 1 put: #cursorRight:.\\\\t\\\\t\\\\t\\\\\\\"right arrow key\\\\\\\"\\\\n\\\\tcmdMap at: 30 + 1 put: #cursorUp:.\\\\t\\\\t\\\\t\\\\t\\\\\\\"up arrow key\\\\\\\"\\\\n\\\\tcmdMap at: 31 + 1 put: #cursorDown:.\\\\t\\\\t\\\\t\\\\\\\"down arrow key\\\\\\\"\\\\n\\\\tcmdMap at: 32 + 1 put: #selectWord:.\\\\t\\\\t\\\\t\\\\\\\"space bar key\\\\\\\"\\\\n\\\\tcmdMap at: 127 + 1 put: #forwardDelete:.\\\\t\\\\t\\\\\\\"del key\\\\\\\"\\\\n\\\\n\\\\t'0123456789-=' \\\\n\\\\t\\\\tdo: [:char | cmdMap at: char asciiValue + 1 put: #changeEmphasis:].\\\\n\\\\n\\\\t'([{''\\\\\\\"<' do: [:char | cmdMap at: char asciiValue + 1 put: #enclose:].\\\\n\\\\n\\\\tcmdMap at: $, asciiValue + 1 put: #shiftEnclose:.\\\\n\\\\n\\\\t\\\\\\\"triplet = {character. comment selector. novice appropiated}\\\\\\\"\\\\n\\\\t#(\\\\n\\\\t\\\\t($a\\\\t\\\\t#selectAll:\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($b\\\\t\\\\t#browseIt:\\\\t\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($c\\\\t\\\\t#copySelection:\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($d\\\\t\\\\t#doIt:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($e\\\\t\\\\t#exchange:\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($f\\\\t\\\\t#find:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($g\\\\t\\\\t#findAgain:\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($h\\\\t\\\\t#setSearchString:\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($i\\\\t\\\\t#inspectIt:\\\\t\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($j\\\\t\\\\t#doAgainOnce:\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($k\\\\t\\\\t#offerFontMenu:\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($l\\\\t\\\\t#cancel:\\\\t\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($m\\\\t#implementorsOfIt:\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($n\\\\t\\\\t#sendersOfIt:\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($o\\\\t\\\\t#spawnIt:\\\\t\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($p\\\\t\\\\t#printIt:\\\\t\\\\t\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($q\\\\t\\\\t#querySymbol:\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($s\\\\t\\\\t#save:\\\\t\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($t\\\\t\\\\t#tempCommand:\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($u\\\\t\\\\t#align:\\\\t\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($v\\\\t\\\\t#paste:\\\\t\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($w\\\\t#backWord:\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($x\\\\t\\\\t#cut:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($y\\\\t\\\\t#swapChars:\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($z\\\\t\\\\t#undo:\\\\t\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t)\\\\n\\\\t\\\\tselect:[:triplet | Preferences noviceMode not or:[triplet third]]\\\\n\\\\t\\\\tthenDo:[:triplet | cmdMap at: triplet first asciiValue + 1 put: triplet second].\\\\n\\\\n\\\\tCmdActions := cmdMap.\\\\n! !\\\\n\\\\n!ParagraphEditor class methodsFor: 'keyboard shortcut tables' stamp: 'dgd 10/4/2004 13:53'!\\\\ninitializeShiftCmdKeyShortcuts \\\\n\\\\t\\\\\\\"Initialize the shift-command-key (or control-key) shortcut table.\\\\\\\"\\\\n\\\\t\\\\\\\"NOTE: if you don't know what your keyboard generates, use Sensor kbdTest\\\\\\\"\\\\n\\\\t\\\\\\\"wod 11/3/1998: Fix setting of cmdMap for shifted keys to actually use the \\\\n\\\\tcapitalized versions of the letters.\\\\n\\\\tTPR 2/18/99: add the plain ascii values back in for those VMs that don't return the shifted values.\\\\\\\"\\\\n\\\\n\\\\t| cmdMap |\\\\n\\\\n\\\\t\\\\\\\"shift-command and control shortcuts\\\\\\\"\\\\n\\\\tcmdMap _ Array new: 256 withAll: #noop:.  \\\\\\\"use temp in case of a crash\\\\\\\"\\\\n\\\\n\\\\tcmdMap at: ( 1 + 1) put: #cursorHome:.\\\\t\\\\t\\\\t\\\\t\\\\\\\"home key\\\\\\\"\\\\n\\\\tcmdMap at: ( 4 + 1) put: #cursorEnd:.\\\\t\\\\t\\\\t\\\\t\\\\\\\"end key\\\\\\\"\\\\n\\\\tcmdMap at: ( 8 + 1) put: #forwardDelete:.\\\\t\\\\t\\\\t\\\\\\\"ctrl-H or delete key\\\\\\\"\\\\n\\\\tcmdMap at: (11 + 1) put: #cursorPageUp:.\\\\t\\\\t\\\\t\\\\\\\"page up key\\\\\\\"\\\\n\\\\tcmdMap at: (12 + 1) put: #cursorPageDown:.\\\\t\\\\t\\\\\\\"page down key\\\\\\\"\\\\n\\\\tcmdMap at: (13 + 1) put: #crWithIndent:.\\\\t\\\\t\\\\t\\\\\\\"ctrl-Return\\\\\\\"\\\\n\\\\tcmdMap at: (27 + 1) put: #offerMenuFromEsc:.\\\\t\\\\\\\"escape key\\\\\\\"\\\\n\\\\tcmdMap at: (28 + 1) put: #cursorLeft:.\\\\t\\\\t\\\\t\\\\t\\\\\\\"left arrow key\\\\\\\"\\\\n\\\\tcmdMap at: (29 + 1) put: #cursorRight:.\\\\t\\\\t\\\\t\\\\t\\\\\\\"right arrow key\\\\\\\"\\\\n\\\\tcmdMap at: (30 + 1) put: #cursorUp:.\\\\t\\\\t\\\\t\\\\t\\\\\\\"up arrow key\\\\\\\"\\\\n\\\\tcmdMap at: (31 + 1) put: #cursorDown:.\\\\t\\\\t\\\\t\\\\\\\"down arrow key\\\\\\\"\\\\n\\\\tcmdMap at: (32 + 1) put: #selectWord:.\\\\t\\\\t\\\\t\\\\t\\\\\\\"space bar key\\\\\\\"\\\\n\\\\tcmdMap at: (45 + 1) put: #changeEmphasis:.\\\\t\\\\t\\\\\\\"cmd-sh-minus\\\\\\\"\\\\n\\\\tcmdMap at: (61 + 1) put: #changeEmphasis:.\\\\t\\\\t\\\\\\\"cmd-sh-plus\\\\\\\"\\\\n\\\\tcmdMap at: (127 + 1) put: #forwardDelete:.\\\\t\\\\t\\\\\\\"del key\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Note: Command key overrides shift key, so, for example, cmd-shift-9 produces $9 not $(\\\\\\\"\\\\n\\\\t'9[,''' do: [ :char | cmdMap at: (char asciiValue + 1) put: #shiftEnclose: ].\\\\t\\\\\\\"({< and double-quote\\\\\\\"\\\\n\\\\t\\\\\\\"Note: Must use cmd-9 or ctrl-9 to get '()' since cmd-shift-9 is a Mac FKey command.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"NB: sw 12/9/2001 commented out the idiosyncratic line just below, which was grabbing shift-esc in the text editor and hence which argued with the wish to have shift-esc be a universal gesture for escaping the local context and calling up the desktop menu.\\\\\\\"  \\\\n\\\\t\\\\\\\"cmdMap at: (27 + 1) put: #shiftEnclose:.\\\\\\\" \\\\t\\\\\\\"ctrl-[\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"'\\\\\\\"\\\\\\\"''(' do: [ :char | cmdMap at: (char asciiValue + 1) put: #enclose:].\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"triplet = {character. comment selector. novice appropiated}\\\\\\\"\\\\n\\\\t#(\\\\n\\\\t\\\\t($a\\\\t\\\\targAdvance:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($b\\\\t\\\\tbrowseItHere:\\\\t\\\\t\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($c\\\\t\\\\tcompareToClipboard:\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($d\\\\t\\\\tduplicate:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($e\\\\t\\\\tmethodStringsContainingIt:\\\\tfalse)\\\\n\\\\t\\\\t($f\\\\t\\\\tdisplayIfFalse:\\\\t\\\\t\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($g\\\\t\\\\tfileItIn:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($h\\\\t\\\\tcursorTopHome:\\\\t\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($i\\\\t\\\\texploreIt:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($j\\\\t\\\\tdoAgainMany:\\\\t\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($k\\\\t\\\\tchangeStyle:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($l\\\\t\\\\toutdent:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($m\\\\tselectCurrentTypeIn:\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($n\\\\t\\\\treferencesToIt:\\\\t\\\\t\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($p\\\\t\\\\tmakeProjectLink:\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($r\\\\t\\\\tindent:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($s\\\\t\\\\tsearch:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($t\\\\t\\\\tdisplayIfTrue:\\\\t\\\\t\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($u\\\\t\\\\tchangeLfToCr:\\\\t\\\\t\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($v\\\\t\\\\tpasteInitials:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($w\\\\tmethodNamesContainingIt:\\\\tfalse)\\\\n\\\\t\\\\t($x\\\\t\\\\tmakeLowercase:\\\\t\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($y\\\\t\\\\tmakeUppercase:\\\\t\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($z\\\\t\\\\tmakeCapitalized:\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t)\\\\n\\\\t\\\\tselect:[:triplet | Preferences noviceMode not or:[triplet third]]\\\\n\\\\t\\\\tthenDo:[:triplet |\\\\n\\\\t\\\\t\\\\tcmdMap at: (triplet first asciiValue         + 1) put: triplet second.\\\\t\\\\t\\\\\\\"plain keys\\\\\\\"\\\\n\\\\t\\\\t\\\\tcmdMap at: (triplet first asciiValue - 32 + 1) put: triplet second.\\\\t\\\\t\\\\\\\"shifted keys\\\\\\\"\\\\n\\\\t\\\\t\\\\tcmdMap at: (triplet first asciiValue - 96 + 1) put: triplet second.\\\\t\\\\t\\\\\\\"ctrl keys\\\\\\\"\\\\n\\\\t\\\\t].\\\\n\\\\n\\\\tShiftCmdActions _ cmdMap! !\\\\n\\\\n!ParagraphEditor class methodsFor: 'keyboard shortcut tables' stamp: 'sps 7/24/2003 17:25'!\\\\nmultiRedoOverride\\\\n\\\\\\\"Call this to set meta-r to perform the multilevel redo (or tweak the code below to have it bound to some other key sequence).\\\\\\\"\\\\n\\\\n\\\\\\\"\\\\nParagraphEditor multiRedoOverride.\\\\n\\\\\\\"\\\\n\\\\tCmdActions at: $r asciiValue + 1 put: #multiRedo: \\\\n! !\\\\n\\\\n!ParagraphEditor class methodsFor: 'keyboard shortcut tables' stamp: 'sbw 10/8/1999 21:42'!\\\\nspecialShiftCmdKeys\\\\n\\\\n\\\\\\\"Private - return array of key codes that represent single keys acting\\\\nas if shift-command were also being pressed\\\\\\\"\\\\n\\\\n^#(\\\\n\\\\t1\\\\t\\\\\\\"home\\\\\\\"\\\\n\\\\t3\\\\t\\\\\\\"enter\\\\\\\"\\\\n\\\\t4\\\\t\\\\\\\"end\\\\\\\"\\\\n\\\\t8\\\\t\\\\\\\"backspace\\\\\\\"\\\\n\\\\t11\\\\t\\\\\\\"page up\\\\\\\"\\\\n\\\\t12\\\\t\\\\\\\"page down\\\\\\\"\\\\n\\\\t27\\\\t\\\\\\\"escape\\\\\\\"\\\\n\\\\t28\\\\t\\\\\\\"left arrow\\\\\\\"\\\\n\\\\t29\\\\t\\\\\\\"right arrow\\\\\\\"\\\\n\\\\t30\\\\t\\\\\\\"up arrow\\\\\\\"\\\\n\\\\t31\\\\t\\\\\\\"down arrow\\\\\\\"\\\\n\\\\t127\\\\t\\\\\\\"delete\\\\\\\"\\\\n\\\\t)! !\\\\nTileMorph subclass: #ParameterTile\\\\n\\\\tinstanceVariableNames: 'scriptEditor'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'EToys-Scripting Tiles'!\\\\n!ParameterTile commentStamp: '<historical>' prior: 0!\\\\nRepresents a parameter in a user-defined script in \\\\\\\"classic\\\\\\\" tile-scripting.  The type of a script's parameter is declared in the ScriptEditor for the script, and a parameter tile gets its type from the script.  But because the user can change the parameter type *after* having created parameter tiles, we can later have type mismatches.  Which however we at least deal with reasonably cleverly.!\\\\n\\\\n\\\\n!ParameterTile methodsFor: 'access' stamp: 'sw 3/15/2005 21:45'!\\\\nisBoolean \\\\n\\\\t\\\\\\\"Answer whether the receiver's type is inherently boolean\\\\\\\"\\\\n\\\\n\\\\t^ self scriptEditor typeForParameter == #Boolean! !\\\\n\\\\n!ParameterTile methodsFor: 'access' stamp: 'sw 3/15/2005 22:36'!\\\\nrowOfRightTypeFor: aLayoutMorph forActor: aPlayer\\\\n\\\\t\\\\\\\"Answer a phrase of the right type for the putative container\\\\\\\"\\\\n\\\\n\\\\t| aTemporaryViewer aPhrase |\\\\n\\\\taLayoutMorph demandsBoolean ifTrue:\\\\n\\\\t\\\\t[aTemporaryViewer _ CategoryViewer new invisiblySetPlayer: aPlayer.\\\\n\\\\t\\\\taPhrase _ aTemporaryViewer booleanPhraseFromPhrase: self.\\\\n\\\\t\\\\taPhrase justGrabbedFromViewer: false.\\\\n\\\\t\\\\t^ aPhrase].\\\\n\\\\t^ self! !\\\\n\\\\n!ParameterTile methodsFor: 'access' stamp: 'sw 1/18/2004 22:12'!\\\\nscriptEditor\\\\n\\\\t\\\\\\\"Answer the receiver's script editor.  The slightly strange code here is in order to contend with the unusual situation where a parameter tile obtained from one script editor is later dropped into a different script editor.  As long as the parameter tile is *in* a script editor, that containing scriptEditor is the one; if it is *not*, then we use the last known one\\\\\\\"\\\\n\\\\n\\\\t| aScriptEditor |\\\\n\\\\t^ (aScriptEditor _ self outermostMorphThat: [:m | m isKindOf: ScriptEditorMorph])\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t[scriptEditor _ aScriptEditor]\\\\n\\\\t\\\\tifNil:\\\\n\\\\t\\\\t\\\\t[scriptEditor]! !\\\\n\\\\n\\\\n!ParameterTile methodsFor: 'accessing' stamp: 'sw 7/18/2002 02:45'!\\\\nresultType\\\\n\\\\t\\\\\\\"Answer the result type of the receiver\\\\\\\"\\\\n\\\\n\\\\t^ self scriptEditor typeForParameter! !\\\\n\\\\n\\\\n!ParameterTile methodsFor: 'code generation' stamp: 'yo 12/20/2003 02:49'!\\\\nstoreCodeOn: aStream indent: tabCount\\\\n\\\\t\\\\\\\"Store code on the stream\\\\\\\"\\\\n \\\\n\\\\t| myTypeString |\\\\n\\\\tmyTypeString _ self resultType.\\\\n\\\\t(self scriptEditor hasParameter and: [self scriptEditor typeForParameter = myTypeString])\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[aStream nextPutAll: 'parameter']\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"This script no longer bears a parameter, yet there's an orphaned Parameter tile in it\\\\\\\"\\\\n\\\\t\\\\t\\\\taStream nextPutAll: '(self defaultValueOfType: #', myTypeString, ')']! !\\\\n\\\\n\\\\n!ParameterTile methodsFor: 'initialization' stamp: 'yo 3/14/2005 08:01'!\\\\nforScriptEditor: aScriptEditor\\\\n\\\\t\\\\\\\"Make the receiver be associated with the given script editor\\\\\\\"\\\\n\\\\n\\\\tscriptEditor _ aScriptEditor.\\\\n\\\\tself line1: aScriptEditor typeForParameter translated.! !\\\\n\\\\n!ParameterTile methodsFor: 'initialization' stamp: 'dgd 3/7/2003 15:45'!\\\\ninitialize\\\\n\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\\\\"\\\\\\\"\\\\n\\\\tself typeColor: Color red! !\\\\n\\\\n\\\\n!ParameterTile methodsFor: 'miscellaneous' stamp: 'sw 3/15/2005 21:55'!\\\\nassociatedPlayer\\\\n\\\\t\\\\\\\"Answer the player with which the receiver is associated\\\\\\\"\\\\n\\\\n\\\\t^ self scriptEditor playerScripted! !\\\\n\\\\n!ParameterTile methodsFor: 'miscellaneous' stamp: 'sw 3/15/2005 22:37'!\\\\nbooleanComparatorPhrase\\\\n\\\\t\\\\\\\"Answer a boolean-valued phrase derived from a retriever (e.g. 'car's heading'); this is in order to assure that tiles laid down in a TEST area will indeed produce a boolean result\\\\\\\"\\\\n\\\\n\\\\t| outerPhrase rel retrieverType |\\\\n\\\\tretrieverType _ self resultType.\\\\n\\\\n\\\\trel _ (Vocabulary vocabularyForType: retrieverType) comparatorForSampleBoolean.\\\\n\\\\touterPhrase _ PhraseTileMorph new setOperator: rel type: #Boolean rcvrType: retrieverType argType: retrieverType.\\\\n\\\\touterPhrase firstSubmorph addMorph: self.\\\\n\\\\touterPhrase submorphs last addMorph: (ScriptingSystem tileForArgType: retrieverType).\\\\n\\\\n\\\\touterPhrase submorphs second submorphs last setBalloonText: (ScriptingSystem helpStringForOperator: rel).    \\\\n\\\\t^ outerPhrase! !\\\\n\\\\n!ParameterTile methodsFor: 'miscellaneous' stamp: 'sw 3/15/2005 22:41'!\\\\ntileRows\\\\n\\\\t\\\\\\\"Answer a list of tile rows -- in this case exactly one row -- representing the receiver.\\\\\\\"\\\\n\\\\n\\\\t^ Array with: (Array with: self)! !\\\\n\\\\n\\\\n!ParameterTile methodsFor: 'type' stamp: 'sw 7/22/2002 17:48'!\\\\nassureTypeStillValid\\\\n\\\\t\\\\\\\"Consider the possibility that the parameter type of my surrounding method has changed and that hence I no longer represent a possible value for the parameter of the script.  If this condition obtains, then banish me in favor of a default literal tile of the correct type\\\\\\\"\\\\n\\\\n\\\\t(self ownerThatIsA: TilePadMorph) ifNotNilDo:\\\\n\\\\t\\\\t[:aPad | aPad type = self scriptEditor typeForParameter ifFalse:\\\\n\\\\t\\\\t\\\\t[aPad setToBearDefaultLiteral]]! !\\\\nObject subclass: #ParseNode\\\\n\\\\tinstanceVariableNames: 'comment pc'\\\\n\\\\tclassVariableNames: 'Bfp BtpLong CodeBases CodeLimits DblExtDoAll Dup EndMethod EndRemote Jmp JmpLimit JmpLong LdFalse LdInstLong LdInstType LdLitIndType LdLitType LdMinus1 LdNil LdSelf LdSuper LdTempType LdThisContext LdTrue LoadLong LongLongDoAll NodeFalse NodeNil NodeSelf NodeSuper NodeThisContext NodeTrue Pop Send SendLimit SendLong SendLong2 SendPlus SendType ShortStoP StdLiterals StdSelectors StdVariables Store StorePop'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Compiler-ParseNodes'!\\\\n!ParseNode commentStamp: '<historical>' prior: 0!\\\\nThis superclass of most compiler/decompiler classes declares common class variables, default messages, and the code emitters for jumps. Some of the class variables are initialized here; the rest are initialized in class VariableNode.!\\\\n\\\\n\\\\n!ParseNode methodsFor: 'code generation'!\\\\nemitBranchOn:\\\\ncondition dist: dist pop: stack on: strm\\\\n\\\\tstack pop: 1.\\\\n\\\\tdist = 0 ifTrue: [^ strm nextPut: Pop].\\\\n\\\\tcondition\\\\n\\\\t\\\\tifTrue: [self emitLong: dist code: BtpLong on: strm]\\\\n\\\\t\\\\tifFalse: [self emitShortOrLong: dist code: Bfp on: strm]! !\\\\n\\\\n!ParseNode methodsFor: 'code generation'!\\\\nemitForEffect: stack on: strm\\\\n\\\\n\\\\tself emitForValue: stack on: strm.\\\\n\\\\tstrm nextPut: Pop.\\\\n\\\\tstack pop: 1! !\\\\n\\\\n!ParseNode methodsFor: 'code generation'!\\\\nemitForReturn: stack on: strm\\\\n\\\\n\\\\tself emitForValue: stack on: strm.\\\\n\\\\tstrm nextPut: EndMethod! !\\\\n\\\\n!ParseNode methodsFor: 'code generation'!\\\\nemitJump: dist on: strm\\\\n\\\\n\\\\tdist = 0 ifFalse: [self emitShortOrLong: dist code: Jmp on: strm]! !\\\\n\\\\n!ParseNode methodsFor: 'code generation'!\\\\nemitLong: dist code: longCode on: aStream \\\\n\\\\t\\\\\\\"Force a two-byte jump.\\\\\\\"\\\\n\\\\t| code distance |\\\\n\\\\tcode _ longCode.\\\\n\\\\tdistance _ dist.\\\\n\\\\tdistance < 0\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[distance _ distance + 1024.\\\\n\\\\t\\\\t\\\\tcode _ code - 4]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[distance > 1023 ifTrue: [distance _ -1]].\\\\n\\\\tdistance < 0\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[self error: 'A block compiles more than 1K bytes of code']\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[aStream nextPut: distance // 256 + code.\\\\n\\\\t\\\\t\\\\taStream nextPut: distance \\\\\\\\\\\\\\\\ 256]! !\\\\n\\\\n!ParseNode methodsFor: 'code generation'!\\\\nemitShortOrLong: dist code: shortCode on: strm\\\\n\\\\t(1 <= dist and: [dist <= JmpLimit])\\\\n\\\\t\\\\tifTrue: [strm nextPut: shortCode + dist - 1]\\\\n\\\\t\\\\tifFalse: [self emitLong: dist code: shortCode + (JmpLong-Jmp) on: strm]! !\\\\n\\\\n!ParseNode methodsFor: 'code generation' stamp: 'nk 7/10/2004 10:04'!\\\\npc\\\\n\\\\t\\\\\\\"Used by encoder source mapping.\\\\\\\"\\\\n\\\\n\\\\t^pc ifNil: [ 0 ]\\\\n! !\\\\n\\\\n!ParseNode methodsFor: 'code generation'!\\\\nsizeBranchOn: condition dist: dist\\\\n\\\\tdist = 0 ifTrue: [^1].\\\\n\\\\t^ condition\\\\n\\\\t\\\\tifTrue: [2]  \\\\\\\"Branch on true is always 2 bytes\\\\\\\"\\\\n\\\\t\\\\tifFalse: [self sizeShortOrLong: dist]! !\\\\n\\\\n!ParseNode methodsFor: 'code generation'!\\\\nsizeForEffect: encoder\\\\n\\\\n\\\\t^(self sizeForValue: encoder) + 1! !\\\\n\\\\n!ParseNode methodsFor: 'code generation'!\\\\nsizeForReturn: encoder\\\\n\\\\n\\\\t^(self sizeForValue: encoder) + 1! !\\\\n\\\\n!ParseNode methodsFor: 'code generation'!\\\\nsizeJump: dist\\\\n\\\\n\\\\tdist = 0 ifTrue: [^0].\\\\n\\\\t^self sizeShortOrLong: dist! !\\\\n\\\\n!ParseNode methodsFor: 'code generation'!\\\\nsizeShortOrLong: dist\\\\n\\\\n\\\\t(1 <= dist and: [dist <= JmpLimit])\\\\n\\\\t\\\\tifTrue: [^1].\\\\n\\\\t^2! !\\\\n\\\\n\\\\n!ParseNode methodsFor: 'comment'!\\\\ncomment\\\\n\\\\n\\\\t^comment! !\\\\n\\\\n!ParseNode methodsFor: 'comment'!\\\\ncomment: newComment\\\\n\\\\n\\\\tcomment _ newComment! !\\\\n\\\\n\\\\n!ParseNode methodsFor: 'converting'!\\\\nasReturnNode\\\\n\\\\n\\\\t^ReturnNode new expr: self! !\\\\n\\\\n\\\\n!ParseNode methodsFor: 'encoding'!\\\\nencodeSelector: selector\\\\n\\\\n\\\\t^nil! !\\\\n\\\\n\\\\n!ParseNode methodsFor: 'printing' stamp: 'tk 10/16/2000 13:57'!\\\\nnodePrintOn: aStrm indent: nn\\\\n\\\\t| var aaStrm myLine |\\\\n\\\\t\\\\\\\"Show just the sub nodes and the code.\\\\\\\"\\\\n\\\\n\\\\t(aaStrm _ aStrm) ifNil: [aaStrm _ WriteStream on: (String new: 500)].\\\\n\\\\tnn timesRepeat: [aaStrm tab].\\\\n\\\\taaStrm nextPutAll: self class name; space.\\\\n\\\\tmyLine _ self printString copyWithout: Character cr.\\\\n\\\\tmyLine _ myLine copyFrom: 1 to: (myLine size min: 70).\\\\n\\\\taaStrm nextPutAll: myLine; cr.\\\\n\\\\t1 to: self class instSize do: [:ii | \\\\n\\\\t\\\\tvar _ self instVarAt: ii.\\\\n\\\\t\\\\t(var respondsTo: #asReturnNode) ifTrue: [var nodePrintOn: aaStrm indent: nn+1]].\\\\n\\\\t1 to: self class instSize do: [:ii | \\\\n\\\\t\\\\tvar _ self instVarAt: ii.\\\\n\\\\t\\\\t(var isKindOf: SequenceableCollection) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tvar do: [:aNode | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(aNode respondsTo: #asReturnNode) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taNode nodePrintOn: aaStrm indent: nn+1]]]].\\\\n\\\\t^ aaStrm\\\\n! !\\\\n\\\\n!ParseNode methodsFor: 'printing' stamp: 'ab 7/13/2004 13:46'!\\\\nprintCommentOn: aStream indent: indent \\\\n\\\\t| thisComment |\\\\n\\\\tself comment == nil ifTrue: [^ self].\\\\n\\\\taStream withStyleFor: #comment\\\\n\\\\t\\\\tdo: [1 to: self comment size do: \\\\n\\\\t\\\\t\\\\t\\\\t[:index | \\\\n\\\\t\\\\t\\\\t\\\\tindex > 1 ifTrue: [aStream crtab: indent].\\\\n\\\\t\\\\t\\\\t\\\\taStream nextPut: $\\\\\\\".\\\\n\\\\t\\\\t\\\\t\\\\tthisComment _ self comment at: index.\\\\n\\\\t\\\\t\\\\t\\\\tself printSingleComment: thisComment\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ton: aStream\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tindent: indent.\\\\n\\\\t\\\\t\\\\t\\\\taStream nextPut: $\\\\\\\"]].\\\\n\\\\tself comment: nil! !\\\\n\\\\n!ParseNode methodsFor: 'printing' stamp: 'md 8/15/2005 11:02'!\\\\nprintOn: aStream \\\\n\\\\t\\\\\\\"Refer to the comment in Object|printOn:.\\\\\\\"\\\\n\\\\n\\\\taStream nextPutAll: '{'.\\\\n\\\\taStream nextPutAll: ((ColoredCodeStream contents: [:strm | self printOn: strm indent: 0])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tasString).\\\\n\\\\taStream nextPutAll: '}'! !\\\\n\\\\n!ParseNode methodsFor: 'printing'!\\\\nprintOn: aStream indent: anInteger \\\\n\\\\t\\\\\\\"If control gets here, avoid recursion loop.\\\\\\\"\\\\n\\\\n\\\\tsuper printOn: aStream! !\\\\n\\\\n!ParseNode methodsFor: 'printing'!\\\\nprintOn: aStream indent: level precedence: p\\\\n\\\\n\\\\tself printOn: aStream indent: level! !\\\\n\\\\n!ParseNode methodsFor: 'printing' stamp: 'ms 8/1/2006 16:47'!\\\\nshortPrintOn: aStream \\\\n\\\\tself printOn: aStream indent: 0! !\\\\n\\\\n\\\\n!ParseNode methodsFor: 'testing'!\\\\nassignmentCheck: encoder at: location\\\\n\\\\t\\\\\\\"For messageNodes masquerading as variables for the debugger.\\\\n\\\\tFor now we let this through - ie we allow stores ev\\\\n\\\\tinto args.  Should check against numArgs, though.\\\\\\\"\\\\n\\\\t^ -1! !\\\\n\\\\n!ParseNode methodsFor: 'testing'!\\\\ncanBeSpecialArgument\\\\n\\\\t\\\\\\\"Can I be an argument of (e.g.) ifTrue:?\\\\\\\"\\\\n\\\\n\\\\t^false! !\\\\n\\\\n!ParseNode methodsFor: 'testing'!\\\\ncanCascade\\\\n\\\\n\\\\t^false! !\\\\n\\\\n!ParseNode methodsFor: 'testing'!\\\\nisArg\\\\n\\\\n\\\\t^false! !\\\\n\\\\n!ParseNode methodsFor: 'testing'!\\\\nisComplex\\\\n\\\\t\\\\\\\"Used for pretty printing to determine whether to start a new line\\\\\\\"\\\\n\\\\n\\\\t^false! !\\\\n\\\\n!ParseNode methodsFor: 'testing'!\\\\nisConstantNumber  \\\\\\\"Overridden in LiteralNode\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n!ParseNode methodsFor: 'testing' stamp: 'md 1/20/2006 16:22'!\\\\nisDoIt\\\\n\\\\t\\\\\\\"polymorphic with RBNodes; called by debugger\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!ParseNode methodsFor: 'testing' stamp: 'ls 1/29/2004 21:11'!\\\\nisJust: node\\\\n\\\\t^false! !\\\\n\\\\n!ParseNode methodsFor: 'testing' stamp: 'di 4/5/2000 11:14'!\\\\nisLiteral\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!ParseNode methodsFor: 'testing' stamp: 'md 7/27/2006 19:14'!\\\\nisMessage\\\\n\\\\t^false! !\\\\n\\\\n!ParseNode methodsFor: 'testing'!\\\\nisMessage: selSymbol receiver: rcvrPred arguments: argsPred\\\\n\\\\t\\\\\\\"See comment in MessageNode.\\\\\\\"\\\\n\\\\n\\\\t^false! !\\\\n\\\\n!ParseNode methodsFor: 'testing'!\\\\nisReturnSelf\\\\n\\\\n\\\\t^false! !\\\\n\\\\n!ParseNode methodsFor: 'testing'!\\\\nisReturningIf\\\\n\\\\n\\\\t^false! !\\\\n\\\\n!ParseNode methodsFor: 'testing' stamp: 'tk 8/2/1999 18:39'!\\\\nisSelfPseudoVariable\\\\t\\\\n\\\\t\\\\\\\"Overridden in VariableNode.\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n!ParseNode methodsFor: 'testing'!\\\\nisSpecialConstant\\\\n\\\\t^ false! !\\\\n\\\\n!ParseNode methodsFor: 'testing' stamp: 'di 10/12/1999 15:28'!\\\\nisTemp\\\\n\\\\t^ false! !\\\\n\\\\n!ParseNode methodsFor: 'testing'!\\\\nisUndefTemp\\\\n\\\\t^ false! !\\\\n\\\\n!ParseNode methodsFor: 'testing'!\\\\nisUnusedTemp\\\\n\\\\t^ false! !\\\\n\\\\n!ParseNode methodsFor: 'testing'!\\\\nisVariableReference\\\\n\\\\n\\\\t^false! !\\\\n\\\\n!ParseNode methodsFor: 'testing'!\\\\nnowHasDef  \\\\\\\"Ignored in all but VariableNode\\\\\\\"! !\\\\n\\\\n!ParseNode methodsFor: 'testing'!\\\\nnowHasRef  \\\\\\\"Ignored in all but VariableNode\\\\\\\"! !\\\\n\\\\n!ParseNode methodsFor: 'testing'!\\\\ntoDoIncrement: ignored\\\\n\\\\t\\\\\\\"Only meant for Messages or Assignments - else return nil\\\\\\\"\\\\n\\\\t^ nil! !\\\\n\\\\n\\\\n!ParseNode methodsFor: '*eToys-tiles' stamp: 'ab 7/13/2004 13:47'!\\\\naddCommentToMorph: aMorph\\\\n\\\\t| row |\\\\n\\\\t(self comment isNil or: [self comment isEmpty]) ifTrue: [^ self].\\\\n\\\\trow _ aMorph addTextRow:\\\\n\\\\t\\\\t(String streamContents: [:strm | self printCommentOn: strm indent: 1]).\\\\n\\\\trow firstSubmorph color: (SyntaxMorph translateColor: #comment).\\\\n\\\\trow parseNode: (self as: CommentNode).\\\\n! !\\\\n\\\\n!ParseNode methodsFor: '*eToys-tiles' stamp: 'RAA 8/24/1999 12:24'!\\\\nasMorphicSyntaxIn: parent\\\\n\\\\n\\\\t| morph |\\\\n\\\\t\\\\\\\"Default for missing implementations\\\\\\\"\\\\n\\\\n\\\\tmorph _ parent addColumn: #error on: self.\\\\n\\\\tmorph addTextRow: self class printString.\\\\n\\\\t^morph\\\\n\\\\t\\\\n\\\\n! !\\\\n\\\\n!ParseNode methodsFor: '*eToys-tiles' stamp: 'RAA 8/24/1999 13:06'!\\\\ncurrentValueIn: aContext\\\\n\\\\n\\\\t^nil! !\\\\n\\\\n!ParseNode methodsFor: '*eToys-tiles' stamp: 'RAA 8/24/1999 18:18'!\\\\nexplanation\\\\n\\\\n\\\\t^self class printString! !\\\\n\\\\n\\\\n!ParseNode methodsFor: 'private' stamp: 'ls 1/29/2004 21:17'!\\\\nifNilReceiver\\\\n\\\\t\\\\\\\"assuming this object is the receiver of an ifNil:, what object is being asked about?\\\\\\\"\\\\n\\\\t^self! !\\\\n\\\\n!ParseNode methodsFor: 'private' stamp: 'sma 5/28/2000 10:47'!\\\\nnextWordFrom: aStream setCharacter: aBlock\\\\n\\\\t| outStream char |\\\\n\\\\toutStream _ WriteStream on: (String new: 16).\\\\n\\\\t[(aStream peekFor: Character space) \\\\n\\\\t\\\\tor: [aStream peekFor: Character tab]] whileTrue.\\\\n\\\\t[aStream atEnd\\\\n\\\\t\\\\tor:\\\\n\\\\t\\\\t\\\\t[char _ aStream next.\\\\n\\\\t\\\\t\\\\tchar = Character cr or: [char = Character space]]]\\\\n\\\\t\\\\twhileFalse: [outStream nextPut: char].\\\\n\\\\taBlock value: char.\\\\n\\\\t^ outStream contents! !\\\\n\\\\n!ParseNode methodsFor: 'private' stamp: 'nk 7/11/2004 13:39'!\\\\nprintSingleComment: aString on: aStream indent: indent \\\\n\\\\t\\\\\\\"Print the comment string, assuming it has been indented indent tabs.\\\\n\\\\tBreak the string at word breaks, given the widths in the default\\\\n\\\\tfont, at 450 points.\\\\\\\"\\\\n\\\\n\\\\t| readStream word position lineBreak font wordWidth tabWidth spaceWidth lastChar |\\\\n\\\\treadStream _ ReadStream on: aString.\\\\n\\\\tfont _ TextStyle default defaultFont.\\\\n\\\\ttabWidth _ TextConstants at: #DefaultTab.\\\\n\\\\tspaceWidth _ font widthOf: Character space.\\\\n\\\\tposition _ indent * tabWidth.\\\\n\\\\tlineBreak _ 450.\\\\n\\\\t[readStream atEnd]\\\\n\\\\t\\\\twhileFalse: \\\\n\\\\t\\\\t\\\\t[word _ self nextWordFrom: readStream setCharacter: [:lc | lastChar _ lc].\\\\n\\\\t\\\\t\\\\twordWidth _ word inject: 0 into: [:width :char | width + (font widthOf: char)].\\\\n\\\\t\\\\t\\\\tposition _ position + wordWidth.\\\\n\\\\t\\\\t\\\\tposition > lineBreak\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[aStream skip: -1; crtab: indent.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tposition _ indent * tabWidth + wordWidth + spaceWidth.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tlastChar = Character cr\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [[readStream peekFor: Character tab] whileTrue].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tword isEmpty ifFalse: [aStream nextPutAll: word; space]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[aStream nextPutAll: word.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\treadStream atEnd\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[position _ position + spaceWidth.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taStream space].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tlastChar = Character cr\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[aStream skip: -1; crtab: indent.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tposition _ indent * tabWidth.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[readStream peekFor: Character tab] whileTrue]]]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nParseNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!ParseNode class methodsFor: 'class initialization' stamp: 'ajh 8/12/2002 11:10'!\\\\nblockReturnCode\\\\n\\\\n\\\\t^ EndRemote! !\\\\n\\\\n!ParseNode class methodsFor: 'class initialization'!\\\\ninitialize\\\\n\\\\t\\\\\\\"ParseNode initialize. VariableNode initialize\\\\\\\"\\\\n\\\\tLdInstType _ 1.\\\\n\\\\tLdTempType _ 2.\\\\n\\\\tLdLitType _ 3.\\\\n\\\\tLdLitIndType _ 4.\\\\n\\\\tSendType _ 5.\\\\n\\\\tCodeBases _ #(0 16 32 64 208 ).\\\\n\\\\tCodeLimits _ #(16 16 32 32 16 ).\\\\n\\\\tLdSelf _ 112.\\\\n\\\\tLdTrue _ 113.\\\\n\\\\tLdFalse _ 114.\\\\n\\\\tLdNil _ 115.\\\\n\\\\tLdMinus1 _ 116.\\\\n\\\\tLoadLong _ 128.\\\\n\\\\tStore _ 129.\\\\n\\\\tStorePop _ 130.\\\\n\\\\tShortStoP _ 96.\\\\n\\\\tSendLong _ 131.\\\\n\\\\tDblExtDoAll _ 132.\\\\n\\\\tSendLong2 _ 134.\\\\n\\\\tLdSuper _ 133.\\\\n\\\\tPop _ 135.\\\\n\\\\tDup _ 136.\\\\n\\\\tLdThisContext _ 137.\\\\n\\\\tEndMethod _ 124.\\\\n\\\\tEndRemote _ 125.\\\\n\\\\tJmp _ 144.\\\\n\\\\tBfp _ 152.\\\\n\\\\tJmpLimit _ 8.\\\\n\\\\tJmpLong _ 164.  \\\\\\\"code for jmp 0\\\\\\\"\\\\n\\\\tBtpLong _ 168.\\\\n\\\\tSendPlus _ 176.\\\\n\\\\tSend _ 208.\\\\n\\\\tSendLimit _ 16! !\\\\n\\\\n!ParseNode class methodsFor: 'class initialization' stamp: 'ajh 8/6/2002 12:04'!\\\\npopCode\\\\n\\\\n\\\\t^ Pop! !\\\\nObject subclass: #ParseStack\\\\n\\\\tinstanceVariableNames: 'position length'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Compiler-Support'!\\\\n!ParseStack commentStamp: '<historical>' prior: 0!\\\\nI keep track of the current and high position of the stack that will be needed by code being compiled.!\\\\n\\\\n\\\\n!ParseStack methodsFor: 'accessing'!\\\\npop: n\\\\n\\\\n\\\\t(position _ position - n) < 0 \\\\n\\\\t\\\\tifTrue: [self error: 'Parse stack underflow']! !\\\\n\\\\n!ParseStack methodsFor: 'accessing'!\\\\npush: n\\\\n\\\\n\\\\t(position _ position + n) > length \\\\n\\\\t\\\\tifTrue: [length _ position]! !\\\\n\\\\n!ParseStack methodsFor: 'accessing'!\\\\nsize\\\\n\\\\n\\\\t^length! !\\\\n\\\\n\\\\n!ParseStack methodsFor: 'initialize-release'!\\\\ninit\\\\n\\\\n\\\\tlength _ position _ 0! !\\\\n\\\\n\\\\n!ParseStack methodsFor: 'printing'!\\\\nprintOn: aStream\\\\n\\\\t\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream nextPutAll: ' at '; print: position; nextPutAll: ' of '; print: length! !\\\\n\\\\n\\\\n!ParseStack methodsFor: 'results'!\\\\nposition\\\\n\\\\n\\\\t^position! !\\\\nScanner subclass: #Parser\\\\n\\\\tinstanceVariableNames: 'here hereType hereMark hereEnd prevMark prevEnd encoder requestor parseNode failBlock requestorOffset tempsMark doitFlag properties category'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Compiler-Kernel'!\\\\n!Parser commentStamp: '<historical>' prior: 0!\\\\nI parse Smalltalk syntax and create a MethodNode that is the root of the parse tree. I look one token ahead.!\\\\n\\\\n\\\\n!Parser methodsFor: 'error correction' stamp: 'rbb 2/18/2005 11:01'!\\\\ncorrectSelector: proposedKeyword wordIntervals: spots exprInterval: expInt ifAbort: abortAction\\\\n\\\\t\\\\\\\"Correct the proposedKeyword to some selector symbol, correcting the original text if such action is indicated.  abortAction is invoked if the proposedKeyword couldn't be converted into a valid selector.  Spots is an ordered collection of intervals within the test stream of the for each of the keyword parts.\\\\\\\"\\\\n\\\\n\\\\t| alternatives aStream choice correctSelector userSelection lines firstLine |\\\\n\\\\t\\\\\\\"If we can't ask the user, assume that the keyword will be defined later\\\\\\\"\\\\n\\\\tself interactive ifFalse: [ ^ proposedKeyword asSymbol ].\\\\n\\\\n\\\\tuserSelection _ requestor selectionInterval.\\\\n\\\\trequestor selectFrom: spots first first to: spots last last.\\\\n\\\\trequestor select.\\\\n\\\\talternatives _ Symbol possibleSelectorsFor: proposedKeyword.\\\\n\\\\tself flag: #toBeFixed.\\\\n\\\\t\\\\\\\"alternatives addAll: (MultiSymbol possibleSelectorsFor: proposedKeyword).\\\\\\\"\\\\n\\\\n\\\\taStream _ WriteStream on: (String new: 200).\\\\n\\\\taStream nextPutAll: (proposedKeyword contractTo: 35); cr.\\\\n\\\\tfirstLine _ 1.\\\\n \\\\talternatives do:\\\\n\\\\t\\\\t[:sel | aStream nextPutAll: (sel contractTo: 35); nextPut: Character cr].\\\\n\\\\taStream nextPutAll: 'cancel'.\\\\n\\\\tlines _ Array with: firstLine with: (alternatives size + firstLine).\\\\n\\\\t\\\\n\\\\tchoice _ (UIManager default \\\\n\\\\t\\\\t\\\\tchooseFrom: (aStream contents substrings)\\\\n\\\\t\\\\t\\\\tlines: lines\\\\n\\\\t\\\\t\\\\ttitle: 'Unknown selector, please\\\\\\\\confirm, correct, or cancel' withCRs).\\\\n\\\\n\\\\t(choice = 0) | (choice > (lines at: 2))\\\\n\\\\t\\\\tifTrue: [ ^ abortAction value ].\\\\n\\\\n\\\\trequestor deselect.\\\\n\\\\trequestor selectInvisiblyFrom: userSelection first to: userSelection last.\\\\n\\\\n\\\\tchoice = 1 ifTrue: [ ^ proposedKeyword asSymbol ].\\\\n\\\\tcorrectSelector _ alternatives at: choice - 1.\\\\n\\\\tself substituteSelector: correctSelector keywords wordIntervals: spots.\\\\n\\\\t((proposedKeyword last ~= $:) and: [correctSelector last == $:]) ifTrue: [\\\\n\\\\t\\\\t^ abortAction value].\\\\n\\\\t^ correctSelector.\\\\n! !\\\\n\\\\n!Parser methodsFor: 'error correction' stamp: 'rbb 2/18/2005 09:01'!\\\\ncorrectVariable: proposedVariable interval: spot\\\\n\\\\t\\\\\\\"Correct the proposedVariable to a known variable, or declare it as a new\\\\n\\\\tvariable if such action is requested.  We support declaring lowercase\\\\n\\\\tvariables as temps or inst-vars, and uppercase variables as Globals or \\\\n\\\\tClassVars, depending on whether the context is nil (class=UndefinedObject).\\\\n\\\\tSpot is the interval within the test stream of the variable.\\\\n\\\\trr 3/4/2004 10:26 : adds the option to define a new class. \\\\\\\"\\\\n\\\\n\\\\t| tempIvar labels actions lines alternatives binding userSelection choice action |\\\\n\\\\n\\\\t\\\\\\\"Check if this is an i-var, that has been corrected already (ugly)\\\\\\\"\\\\n\\\\t(encoder classEncoding allInstVarNames includes: proposedVariable) ifTrue: [\\\\n\\\\t\\\\t^LiteralVariableNode new \\\\n\\\\t\\\\t\\\\tname: proposedVariable index: (encoder classEncoding allInstVarNames indexOf: proposedVariable) - 1 type: 1;\\\\n\\\\t\\\\t\\\\tyourself ].\\\\n\\\\n\\\\t\\\\\\\"If we can't ask the user for correction, make it undeclared\\\\\\\"\\\\n\\\\tself interactive \\\\n\\\\t\\\\tifFalse: [ ^encoder undeclared: proposedVariable ].\\\\n\\\\n\\\\t\\\\\\\"First check to see if the requestor knows anything about the variable\\\\\\\"\\\\n\\\\ttempIvar _ proposedVariable first canBeNonGlobalVarInitial.\\\\n\\\\t(tempIvar and: [ (binding _ requestor bindingOf: proposedVariable) notNil ])\\\\n\\\\t\\\\tifTrue: [ ^encoder global: binding name: proposedVariable ].\\\\n\\\\tuserSelection _ requestor selectionInterval.\\\\n\\\\trequestor selectFrom: spot first to: spot last.\\\\n\\\\trequestor select.\\\\n\\\\n\\\\t\\\\\\\"Build the menu with alternatives\\\\\\\"\\\\n\\\\tlabels _ OrderedCollection new. actions _ OrderedCollection new. lines _ OrderedCollection new.\\\\n\\\\talternatives _ encoder possibleVariablesFor: proposedVariable.\\\\n\\\\ttempIvar \\\\n\\\\t\\\\tifTrue: [ \\\\n\\\\t\\\\t\\\\tlabels add: 'declare temp'. \\\\n\\\\t\\\\t\\\\tactions add: [ self declareTempAndPaste: proposedVariable ].\\\\n\\\\t\\\\t\\\\tlabels add: 'declare instance'.\\\\n\\\\t\\\\t\\\\tactions add: [ self declareInstVar: proposedVariable ] ]\\\\n\\\\t\\\\tifFalse: [ \\\\n\\\\t\\\\t\\\\tlabels add: 'define new class'.\\\\n\\\\t\\\\t\\\\tactions add: [self defineClass: proposedVariable].\\\\n\\\\t\\\\t\\\\tlabels add: 'declare global'.\\\\n\\\\t\\\\t\\\\tactions add: [ self declareGlobal: proposedVariable ].\\\\n\\\\t\\\\t\\\\tencoder classEncoding == UndefinedObject ifFalse: [ \\\\n\\\\t\\\\t\\\\t\\\\tlabels add: 'declare class variable'.\\\\n\\\\t\\\\t\\\\t\\\\tactions add: [ self declareClassVar: proposedVariable ] ] ].\\\\n\\\\tlines add: labels size.\\\\n\\\\talternatives do: [ :each | \\\\n\\\\t\\\\tlabels add: each.\\\\n\\\\t\\\\tactions add: [ \\\\n\\\\t\\\\t\\\\tself substituteWord: each wordInterval: spot offset: 0.\\\\n\\\\t\\\\t\\\\tencoder encodeVariable: each ] fixTemps ].\\\\n\\\\tlines add: labels size.\\\\n\\\\tlabels add: 'cancel'.\\\\n\\\\n\\\\t\\\\\\\"Display the pop-up menu\\\\\\\"\\\\n\\\\tchoice _ (UIManager default chooseFrom: labels asArray lines: lines asArray\\\\n\\\\t\\\\ttitle:  'Unknown variable: ', proposedVariable, ' please correct, or cancel:').\\\\n\\\\taction _ actions at: choice ifAbsent: [ ^self fail ].\\\\n\\\\n\\\\t\\\\\\\"Execute the selected action\\\\\\\"\\\\n\\\\trequestor deselect.\\\\n\\\\trequestor selectInvisiblyFrom: userSelection first to: userSelection last.\\\\n\\\\t^action value! !\\\\n\\\\n!Parser methodsFor: 'error correction'!\\\\ndeclareClassVar: name\\\\n\\\\t| sym class |\\\\n\\\\tsym _ name asSymbol.\\\\n\\\\tclass _ encoder classEncoding.\\\\n\\\\tclass _ class theNonMetaClass.\\\\t\\\\t\\\\\\\"not the metaclass\\\\\\\"\\\\n\\\\tclass addClassVarName: name.\\\\n\\\\t^ encoder global: (class classPool associationAt: sym)\\\\n\\\\t\\\\t\\\\tname: sym! !\\\\n\\\\n!Parser methodsFor: 'error correction'!\\\\ndeclareGlobal: name\\\\n\\\\t| sym |\\\\n\\\\tsym _ name asSymbol.\\\\n\\\\tSmalltalk at: sym put: nil.\\\\n\\\\t^ encoder global: (Smalltalk associationAt: sym) name: sym! !\\\\n\\\\n!Parser methodsFor: 'error correction' stamp: 'rr 3/6/2004 16:07'!\\\\ndeclareInstVar: name\\\\n\\\\t\\\\\\\" rr 3/6/2004 16:06 : adds the line to correctly compute the index. uncommented the option in \\\\n\\\\tthe caller.\\\\\\\"\\\\n\\\\t| index |\\\\n\\\\tencoder classEncoding addInstVarName: name.\\\\n\\\\tindex _ encoder classEncoding instVarNames indexOf: name.\\\\n\\\\tencoder classEncoding allSuperclassesDo: [:cls | index := index + cls instVarNames size].\\\\n\\\\t^LiteralVariableNode new\\\\n\\\\t\\\\tname: name index: index - 1 type: 1;\\\\n\\\\t\\\\tyourself\\\\n\\\\t\\\\t! !\\\\n\\\\n!Parser methodsFor: 'error correction' stamp: 'RAA 6/5/2001 11:57'!\\\\ndeclareTempAndPaste: name\\\\n\\\\t| insertion delta theTextString characterBeforeMark |\\\\n\\\\n\\\\ttheTextString _ requestor text string.\\\\n\\\\tcharacterBeforeMark _ theTextString at: tempsMark-1 ifAbsent: [$ ].\\\\n\\\\t(theTextString at: tempsMark) = $| ifTrue: [\\\\n  \\\\t\\\\t\\\\\\\"Paste it before the second vertical bar\\\\\\\"\\\\n\\\\t\\\\tinsertion _ name, ' '.\\\\n\\\\t\\\\tcharacterBeforeMark isSeparator ifFalse: [\\\\finsertion _ ' ', insertion].\\\\n\\\\t\\\\tdelta _ 0.\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\\\\"No bars - insert some with CR, tab\\\\\\\"\\\\n\\\\t\\\\tinsertion _ '| ' , name , ' |',String cr.\\\\n\\\\t\\\\tdelta _ 2.\\\\t\\\\\\\"the bar and CR\\\\\\\"\\\\n\\\\t\\\\tcharacterBeforeMark = Character tab ifTrue: [\\\\n\\\\t\\\\t\\\\tinsertion _ insertion , String tab.\\\\n\\\\t\\\\t\\\\tdelta _ delta + 1.\\\\t\\\\\\\"the tab\\\\\\\"\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\ttempsMark _ tempsMark +\\\\n\\\\t\\\\t(self substituteWord: insertion\\\\n\\\\t\\\\t\\\\twordInterval: (tempsMark to: tempsMark-1)\\\\n\\\\t\\\\t\\\\toffset: 0) - delta.\\\\n\\\\t^ encoder bindAndJuggle: name! !\\\\n\\\\n!Parser methodsFor: 'error correction' stamp: 'DF 4/28/2006 14:31'!\\\\ndefineClass: className \\\\n\\\\t\\\\\\\"prompts the user to define a new class,  \\\\n\\\\tasks for it's category, and lets the users edit further  \\\\n\\\\tthe definition\\\\\\\"\\\\n\\\\t| sym cat def d2 |\\\\n\\\\tsym := className asSymbol.\\\\n\\\\tcat := UIManager default request: 'Enter class category : ' initialAnswer: self encoder classEncoding theNonMetaClass category.\\\\n\\\\tcat\\\\n\\\\t\\\\tifEmpty: [cat := 'Unknown'].\\\\n\\\\tdef := 'Object subclass: #' , sym , '\\\\n\\\\t\\\\tinstanceVariableNames: '''' \\\\n\\\\t\\\\tclassVariableNames: ''''\\\\n\\\\t\\\\tpoolDictionaries: ''''\\\\n\\\\t\\\\tcategory: ''' , cat , ''''.\\\\n\\\\td2 := UIManager default request: 'Edit class definition : ' initialAnswer: def.\\\\n\\\\td2\\\\n\\\\t\\\\tifEmpty: [d2 := def].\\\\n\\\\tCompiler evaluate: d2.\\\\n\\\\t^ encoder\\\\n\\\\t\\\\tglobal: (Smalltalk associationAt: sym)\\\\n\\\\t\\\\tname: sym! !\\\\n\\\\n!Parser methodsFor: 'error correction' stamp: 'rbb 2/18/2005 09:10'!\\\\nqueryUndefined\\\\n\\\\t| varStart varName | \\\\n\\\\tvarName _ parseNode key.\\\\n\\\\tvarStart _ self endOfLastToken + requestorOffset - varName size + 1.\\\\n\\\\trequestor selectFrom: varStart to: varStart + varName size - 1; select.\\\\n\\\\t((UIManager default \\\\n\\\\t\\\\tchooseFrom: #('yes' 'no') \\\\n\\\\t\\\\ttitle: ((varName , ' appears to be\\\\\\\\undefined at this point.Proceed anyway?') \\\\n\\\\t\\\\t\\\\t\\\\twithCRs asText makeBoldFrom: 1 to: varName size))\\\\n\\\\t\\\\t= 1) ifFalse: [^ self fail]! !\\\\n\\\\n!Parser methodsFor: 'error correction' stamp: 'rbb 2/18/2005 09:08'!\\\\nremoveUnusedTemps\\\\n\\\\t\\\\\\\"Scan for unused temp names, and prompt the user about the prospect of removing each one found\\\\\\\"\\\\n\\\\n\\\\t| str end start madeChanges | \\\\n\\\\tmadeChanges _ false.\\\\n\\\\tstr _ requestor text string.\\\\n\\\\t((tempsMark between: 1 and: str size)\\\\n\\\\t\\\\tand: [(str at: tempsMark) = $|]) ifFalse: [^ self].\\\\n\\\\tencoder unusedTempNames do:\\\\n\\\\t\\\\t[:temp |\\\\n\\\\t\\\\t((UIManager default \\\\n\\\\t\\\\t\\\\t\\\\tchooseFrom: #('yes' 'no') \\\\n\\\\t\\\\t\\\\t\\\\ttitle: ((temp , ' appears to be\\\\\\\\unused in this method.\\\\\\\\OK to remove it?') \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twithCRs asText makeBoldFrom: 1 to: temp size)) = 1)\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t[(encoder encodeVariable: temp) isUndefTemp\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[end _ tempsMark.\\\\n\\\\t\\\\t\\\\t[\\\\\\\"Beginning at right temp marker...\\\\\\\"\\\\n\\\\t\\\\t\\\\tstart _ end - temp size + 1.\\\\n\\\\t\\\\t\\\\tend < temp size or: [temp = (str copyFrom: start to: end)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [(str at: start-1) isAlphaNumeric not & (str at: end+1) isAlphaNumeric not]]]\\\\n\\\\t\\\\t\\\\twhileFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[\\\\\\\"Search left for the unused temp\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tend _ requestor nextTokenFrom: end direction: -1].\\\\n\\\\t\\\\t\\\\tend < temp size ifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[(str at: start-1) = $  ifTrue: [start _ start-1].\\\\n\\\\t\\\\t\\\\t\\\\trequestor correctFrom: start to: end with: ''.\\\\n\\\\t\\\\t\\\\t\\\\tstr _ str copyReplaceFrom: start to: end with: ''. \\\\n\\\\t\\\\t\\\\t\\\\tmadeChanges _ true.\\\\n\\\\t\\\\t\\\\t\\\\ttempsMark _ tempsMark - (end-start+1)]]\\\\n\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self inform:\\\\n'You''ll first have to remove the\\\\nstatement where it''s stored into']]].\\\\n\\\\tmadeChanges ifTrue: [ParserRemovedUnusedTemps signal]! !\\\\n\\\\n!Parser methodsFor: 'error correction'!\\\\nsubstituteSelector: selectorParts wordIntervals: spots\\\\n\\\\t\\\\\\\"Substitute the correctSelector into the (presuamed interactive) receiver.\\\\\\\"\\\\n\\\\t| offset |\\\\n\\\\toffset _ 0.\\\\n\\\\tselectorParts with: spots do:\\\\n\\\\t\\\\t[ :word :interval |\\\\n\\\\t\\\\toffset _ self substituteWord: word wordInterval: interval offset: offset ]\\\\n! !\\\\n\\\\n!Parser methodsFor: 'error correction'!\\\\nsubstituteWord: correctWord wordInterval: spot offset: o\\\\n\\\\t\\\\\\\"Substitute the correctSelector into the (presuamed interactive) receiver.\\\\\\\"\\\\n\\\\n\\\\trequestor correctFrom: (spot first + o)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tto: (spot last + o)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\twith: correctWord.\\\\n\\\\n\\\\trequestorOffset _ requestorOffset + correctWord size - spot size.\\\\n\\\\t^ o + correctWord size - spot size! !\\\\n\\\\n\\\\n!Parser methodsFor: 'error handling' stamp: 'hmm 7/18/2001 21:45'!\\\\nexpected: aString \\\\n\\\\t\\\\\\\"Notify a problem at token 'here'.\\\\\\\"\\\\n\\\\n\\\\ttokenType == #doIt ifTrue: [hereMark _ hereMark + 1].\\\\n\\\\thereType == #doIt ifTrue: [hereMark _ hereMark + 1].\\\\n\\\\t^ self notify: aString , ' expected' at: hereMark + requestorOffset! !\\\\n\\\\n!Parser methodsFor: 'error handling'!\\\\nfail\\\\n\\\\n\\\\t| exitBlock |\\\\n\\\\tencoder == nil\\\\n\\\\t\\\\tifFalse: [encoder release. encoder _ nil]. \\\\\\\"break cycle\\\\\\\"\\\\n\\\\texitBlock _ failBlock.\\\\n\\\\tfailBlock _ nil.\\\\n\\\\t^exitBlock value! !\\\\n\\\\n!Parser methodsFor: 'error handling' stamp: 'stephaneducassse 11/5/2005 16:39'!\\\\ninteractive\\\\n\\\\t\\\\\\\"this version of the method is necessary to load code from MC else the interactive mode is one. \\\\n\\\\tThis method is really bad since it links the compiler package with the Tools\\\\n\\\\tone. The solution would be to have a real SyntaxError exception belonging to the \\\\n\\\\tcompiler package and not a subclass of StringHolder - sd Nov 2005\\\\\\\"\\\\n\\\\t\\\\\\\"the code submitted by PlusTools is ideally the one that should be used\\\\n\\\\tinteractive\\\\n\\\\n\\\\t      ^requestor ~~ nil \\\\\\\"\\\\n\\\\t\\\\n\\\\t^ (requestor == nil or: [requestor isKindOf: SyntaxError]) not! !\\\\n\\\\n!Parser methodsFor: 'error handling'!\\\\nnotify: aString \\\\n\\\\t\\\\\\\"Notify problem at token before 'here'.\\\\\\\"\\\\n\\\\n\\\\t^self notify: aString at: prevMark + requestorOffset! !\\\\n\\\\n!Parser methodsFor: 'error handling' stamp: 'KLC 11/28/2005 18:01'!\\\\nnotify: string at: location\\\\n\\\\trequestor isNil\\\\n\\\\t\\\\tifTrue: [(encoder == self or: [encoder isNil]) ifTrue: [^ self fail  \\\\\\\"failure setting up syntax error\\\\\\\"].\\\\n\\\\t\\\\t\\\\t\\\\tSyntaxErrorNotification\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tinClass: encoder classEncoding\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcategory: encoder classEncoding category\\\\n\\\\t\\\\t\\\\t\\\\t\\\\twithCode: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(source contents\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcopyReplaceFrom: location\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tto: location - 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twith: string , ' ->')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdoitFlag: doitFlag]\\\\n\\\\t\\\\tifFalse: [requestor\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnotify: string , ' ->'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tat: location\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tin: source].\\\\n\\\\t^self fail! !\\\\n\\\\n!Parser methodsFor: 'error handling' stamp: 'di 2/9/1999 15:43'!\\\\noffEnd: aString \\\\n\\\\t\\\\\\\"Notify a problem beyond 'here' (in lookAhead token). Don't be offEnded!!\\\\\\\"\\\\n\\\\n\\\\trequestorOffset == nil\\\\n\\\\t\\\\tifTrue: [^ self notify: aString at: mark]\\\\n\\\\t\\\\tifFalse: [^ self notify: aString at: mark + requestorOffset]\\\\n! !\\\\n\\\\n\\\\n!Parser methodsFor: 'expression types'!\\\\nargumentName\\\\n\\\\n\\\\thereType == #word\\\\n\\\\t\\\\tifFalse: [^self expected: 'Argument name'].\\\\n\\\\t^self advance! !\\\\n\\\\n!Parser methodsFor: 'expression types' stamp: 'hmm 7/16/2001 18:47'!\\\\nassignment: varNode\\\\n\\\\t\\\\\\\" var '_' expression => AssignmentNode.\\\\\\\"\\\\n\\\\t| loc start |\\\\n\\\\t(loc _ varNode assignmentCheck: encoder at: prevMark + requestorOffset) >= 0\\\\n\\\\t\\\\tifTrue: [^self notify: 'Cannot store into' at: loc].\\\\n\\\\tstart _ self startOfNextToken.\\\\n\\\\tvarNode nowHasDef.\\\\n\\\\tself advance.\\\\n\\\\tself expression ifFalse: [^self expected: 'Expression'].\\\\n\\\\tparseNode _ AssignmentNode new\\\\n\\\\t\\\\t\\\\t\\\\tvariable: varNode\\\\n\\\\t\\\\t\\\\t\\\\tvalue: parseNode\\\\n\\\\t\\\\t\\\\t\\\\tfrom: encoder\\\\n\\\\t\\\\t\\\\t\\\\tsourceRange: (start to: self endOfLastToken).\\\\n\\\\t^true! !\\\\n\\\\n!Parser methodsFor: 'expression types' stamp: 'hmm 7/17/2001 21:03'!\\\\nblockExpression\\\\n\\\\t\\\\\\\"[ ({:var} |) (| {temps} |) (statements) ] => BlockNode.\\\\\\\"\\\\n\\\\n\\\\t| variableNodes temporaryBlockVariables start |\\\\n\\\\n\\\\tvariableNodes _ OrderedCollection new.\\\\n\\\\tstart _ prevMark + requestorOffset.\\\\n\\\\t\\\\\\\"Gather parameters.\\\\\\\"\\\\n\\\\t[self match: #colon] whileTrue: [variableNodes addLast: (encoder autoBind: self argumentName)].\\\\n\\\\t(variableNodes size > 0 & (hereType ~~ #rightBracket) and: [(self match: #verticalBar) not]) ifTrue: [^self expected: 'Vertical bar'].\\\\n\\\\n\\\\ttemporaryBlockVariables _ self temporaryBlockVariables.\\\\n\\\\tself statements: variableNodes innerBlock: true.\\\\n\\\\tparseNode temporaries: temporaryBlockVariables.\\\\n\\\\n\\\\t(self match: #rightBracket) ifFalse: [^self expected: 'Period or right bracket'].\\\\n\\\\n\\\\tencoder noteSourceRange: (self endOfLastToken to: self endOfLastToken) forNode: parseNode.\\\\n\\\\n\\\\t\\\\\\\"The scope of the parameters and temporary block variables is no longer active.\\\\\\\"\\\\n\\\\ttemporaryBlockVariables do: [:variable | variable scope: -1].\\\\n\\\\tvariableNodes do: [:variable | variable scope: -1]! !\\\\n\\\\n!Parser methodsFor: 'expression types' stamp: 'di 3/8/2000 09:36'!\\\\nbraceExpression\\\\n\\\\t\\\\\\\" { elements } => BraceNode.\\\\\\\"\\\\n\\\\n\\\\t| elements locations loc more |\\\\n\\\\telements _ OrderedCollection new.\\\\n\\\\tlocations _ OrderedCollection new.\\\\n\\\\tself advance.\\\\n\\\\tmore _ hereType ~~ #rightBrace.\\\\n\\\\t[more]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[loc _ hereMark + requestorOffset.\\\\n\\\\t\\\\t\\\\tself expression\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[elements addLast: parseNode.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tlocations addLast: loc]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[^self expected: 'Variable or expression'].\\\\n\\\\t\\\\t\\\\t(self match: #period)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [more _ hereType ~~ #rightBrace]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [more _ false]].\\\\n\\\\tparseNode _ BraceNode new elements: elements sourceLocations: locations.\\\\n\\\\t(self match: #rightBrace)\\\\n\\\\t\\\\tifFalse: [^self expected: 'Period or right brace'].\\\\n\\\\t^true! !\\\\n\\\\n!Parser methodsFor: 'expression types'!\\\\ncascade\\\\n\\\\t\\\\\\\" {; message} => CascadeNode.\\\\\\\"\\\\n\\\\n\\\\t| rcvr msgs |\\\\n\\\\tparseNode canCascade\\\\n\\\\t\\\\tifFalse: [^self expected: 'Cascading not'].\\\\n\\\\trcvr _ parseNode cascadeReceiver.\\\\n\\\\tmsgs _ OrderedCollection with: parseNode.\\\\n\\\\t[self match: #semicolon]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[parseNode _ rcvr.\\\\n\\\\t\\\\t\\\\t(self messagePart: 3 repeat: false)\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [^self expected: 'Cascade'].\\\\n\\\\t\\\\t\\\\tparseNode canCascade\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [^self expected: '<- No special messages'].\\\\n\\\\t\\\\t\\\\tparseNode cascadeReceiver.\\\\n\\\\t\\\\t\\\\tmsgs addLast: parseNode].\\\\n\\\\tparseNode _ CascadeNode new receiver: rcvr messages: msgs! !\\\\n\\\\n!Parser methodsFor: 'expression types' stamp: 'di 11/19/1999 07:43'!\\\\nexpression\\\\n\\\\n\\\\t(hereType == #word and: [tokenType == #leftArrow])\\\\n\\\\t\\\\tifTrue: [^ self assignment: self variable].\\\\n\\\\thereType == #leftBrace\\\\n\\\\t\\\\tifTrue: [self braceExpression]\\\\n\\\\t\\\\tifFalse: [self primaryExpression ifFalse: [^ false]].\\\\n\\\\t(self messagePart: 3 repeat: true)\\\\n\\\\t\\\\tifTrue: [hereType == #semicolon ifTrue: [self cascade]].\\\\n\\\\t^ true! !\\\\n\\\\n!Parser methodsFor: 'expression types' stamp: 'di 4/5/2000 08:27'!\\\\nkeylessMessagePartTest: level repeat: repeat\\\\n! !\\\\n\\\\n!Parser methodsFor: 'expression types' stamp: 'yo 8/30/2002 14:41'!\\\\nmessagePart: level repeat: repeat\\\\n\\\\n\\\\t| start receiver selector args precedence words keywordStart |\\\\n\\\\t[receiver _ parseNode.\\\\n\\\\t(hereType == #keyword and: [level >= 3])\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[start _ self startOfNextToken.\\\\n\\\\t\\\\t\\\\tselector _ WriteStream on: (String new: 32).\\\\n\\\\t\\\\t\\\\targs _ OrderedCollection new.\\\\n\\\\t\\\\t\\\\twords _ OrderedCollection new.\\\\n\\\\t\\\\t\\\\t[hereType == #keyword]\\\\n\\\\t\\\\t\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[keywordStart _ self startOfNextToken + requestorOffset.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tselector nextPutAll: self advance.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\twords addLast: (keywordStart to: self endOfLastToken + requestorOffset).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself primaryExpression ifFalse: [^self expected: 'Argument'].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself messagePart: 2 repeat: true.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\targs addLast: parseNode].\\\\n\\\\t\\\\t\\\\t(Symbol hasInterned: selector contents ifTrue: [ :sym | selector _ sym])\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [ selector _ self correctSelector: selector contents\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twordIntervals: words\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\texprInterval: (start to: self endOfLastToken)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifAbort: [ ^ self fail ] ].\\\\n\\\\t\\\\t\\\\tprecedence _ 3]\\\\n\\\\t\\\\tifFalse: [((hereType == #binary or: [hereType == #verticalBar])\\\\n\\\\t\\\\t\\\\t\\\\tand: [level >= 2])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[start _ self startOfNextToken.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tselector _ self advance asOctetString asSymbol.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself primaryExpression ifFalse: [^self expected: 'Argument'].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself messagePart: 1 repeat: true.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\targs _ Array with: parseNode.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tprecedence _ 2]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [hereType == #word\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[start _ self startOfNextToken.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tselector _ self advance.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\targs _ #().\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twords _ OrderedCollection with: (start  + requestorOffset to: self endOfLastToken + requestorOffset).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(Symbol hasInterned: selector ifTrue: [ :sym | selector _ sym])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [ selector _ self correctSelector: selector\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twordIntervals: words\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\texprInterval: (start to: self endOfLastToken)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifAbort: [ ^ self fail ] ].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tprecedence _ 1]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [^args notNil]]].\\\\n\\\\tparseNode _ MessageNode new\\\\n\\\\t\\\\t\\\\t\\\\treceiver: receiver\\\\n\\\\t\\\\t\\\\t\\\\tselector: selector\\\\n\\\\t\\\\t\\\\t\\\\targuments: args\\\\n\\\\t\\\\t\\\\t\\\\tprecedence: precedence\\\\n\\\\t\\\\t\\\\t\\\\tfrom: encoder\\\\n\\\\t\\\\t\\\\t\\\\tsourceRange: (start to: self endOfLastToken).\\\\n\\\\trepeat]\\\\n\\\\t\\\\twhileTrue: [].\\\\n\\\\t^true! !\\\\n\\\\n!Parser methodsFor: 'expression types' stamp: 'lr 7/3/2006 14:37'!\\\\nmethod: doit context: ctxt encoder: encoderToUse\\\\n\\\\t\\\\\\\" pattern [ | temporaries ] block => MethodNode.\\\\\\\"\\\\n\\\\n\\\\t| sap blk prim temps messageComment methodNode |\\\\n\\\\tencoder _ encoderToUse.\\\\n\\\\tsap _ self pattern: doit inContext: ctxt.\\\\n\\\\t\\\\\\\"sap={selector, arguments, precedence}\\\\\\\"\\\\n\\\\t(sap at: 2) do: [:argNode | argNode isArg: true].\\\\n\\\\tdoit ifFalse: [ self pragmaSequence ].\\\\n\\\\ttemps _ self temporariesIn: (sap at: 1)..\\\\n\\\\tmessageComment _ currentComment.\\\\n\\\\tcurrentComment _ nil.\\\\n\\\\tdoit ifFalse: [ self pragmaSequence ].\\\\n\\\\tprim := self pragmaPrimitives.\\\\n\\\\tself statements: #() innerBlock: doit.\\\\n\\\\tblk _ parseNode.\\\\n\\\\tdoit ifTrue: [blk returnLast]\\\\n\\\\t\\\\tifFalse: [blk returnSelfIfNoOther].\\\\n\\\\thereType == #doIt ifFalse: [^self expected: 'Nothing more'].\\\\n\\\\tself interactive ifTrue: [self removeUnusedTemps].\\\\n\\\\tmethodNode _ self newMethodNode comment: messageComment.\\\\n\\\\t^ methodNode\\\\n\\\\t\\\\tselector: (sap at: 1)\\\\n\\\\t\\\\targuments: (sap at: 2)\\\\n\\\\t\\\\tprecedence: (sap at: 3)\\\\n\\\\t\\\\ttemporaries: temps\\\\n\\\\t\\\\tblock: blk\\\\n\\\\t\\\\tencoder: encoder\\\\n\\\\t\\\\tprimitive: prim\\\\n\\\\t\\\\tproperties: properties! !\\\\n\\\\n!Parser methodsFor: 'expression types' stamp: 'di 5/30/2000 21:59'!\\\\nnewMethodNode\\\\n\\\\n\\\\t^ MethodNode new! !\\\\n\\\\n!Parser methodsFor: 'expression types' stamp: 'ar 1/2/2002 14:31'!\\\\npattern: fromDoit inContext: ctxt \\\\n\\\\t\\\\\\\" unarySelector | binarySelector arg | keyword arg {keyword arg} =>  \\\\n\\\\t{selector, arguments, precedence}.\\\\\\\"\\\\n\\\\t| args selector |\\\\n\\\\tdoitFlag _ fromDoit.\\\\n\\\\tfromDoit ifTrue:\\\\n\\\\t\\\\t\\\\t[ctxt == nil\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [^ {#DoIt. {}. 1}]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [^ {#DoItIn:. {encoder encodeVariable: 'homeContext'}. 3}]].\\\\n\\\\n\\\\thereType == #word ifTrue: [^ {self advance asSymbol. {}. 1}].\\\\n\\\\n\\\\t(hereType == #binary or: [hereType == #verticalBar])\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[selector _ self advance asSymbol.\\\\n\\\\t\\\\t\\\\targs _ Array with: (encoder bindArg: self argumentName).\\\\n\\\\t\\\\t\\\\t^ {selector. args. 2}].\\\\n\\\\n\\\\thereType == #keyword\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[selector _ WriteStream on: (String new: 32).\\\\n\\\\t\\\\t\\\\targs _ OrderedCollection new.\\\\n\\\\t\\\\t\\\\t[hereType == #keyword] whileTrue:[\\\\n\\\\t\\\\t\\\\t\\\\tselector nextPutAll: self advance.\\\\n\\\\t\\\\t\\\\t\\\\targs addLast: (encoder bindArg: self argumentName).\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\t^ {selector contents asSymbol. args. 3}].\\\\n\\\\n\\\\t^ self expected: 'Message pattern'! !\\\\n\\\\n!Parser methodsFor: 'expression types'!\\\\nprimaryExpression \\\\n\\\\thereType == #word \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[parseNode _ self variable.\\\\n\\\\t\\\\t\\\\t(parseNode isUndefTemp and: [self interactive])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self queryUndefined].\\\\n\\\\t\\\\t\\\\tparseNode nowHasRef.\\\\n\\\\t\\\\t\\\\t^ true].\\\\n\\\\thereType == #leftBracket\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[self advance.\\\\n\\\\t\\\\t\\\\tself blockExpression.\\\\n\\\\t\\\\t\\\\t^true].\\\\n\\\\thereType == #leftBrace\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[self braceExpression.\\\\n\\\\t\\\\t\\\\t^true].\\\\n\\\\thereType == #leftParenthesis\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[self advance.\\\\n\\\\t\\\\t\\\\tself expression ifFalse: [^self expected: 'expression'].\\\\n\\\\t\\\\t\\\\t(self match: #rightParenthesis)\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [^self expected: 'right parenthesis'].\\\\n\\\\t\\\\t\\\\t^true].\\\\n\\\\t(hereType == #string or: [hereType == #number or: [hereType == #literal]])\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[parseNode _ encoder encodeLiteral: self advance.\\\\n\\\\t\\\\t\\\\t^true].\\\\n\\\\t(here == #- and: [tokenType == #number])\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[self advance.\\\\n\\\\t\\\\t\\\\tparseNode _ encoder encodeLiteral: self advance negated.\\\\n\\\\t\\\\t\\\\t^true].\\\\n\\\\t^false! !\\\\n\\\\n!Parser methodsFor: 'expression types' stamp: 'di 6/7/2000 08:45'!\\\\nstatements: argNodes innerBlock: inner\\\\n\\\\n\\\\t| stmts returns start more blockComment |\\\\n\\\\tstmts _ OrderedCollection new.\\\\n\\\\t\\\\\\\"give initial comment to block, since others trail statements\\\\\\\"\\\\n\\\\tblockComment _ currentComment.\\\\n\\\\tcurrentComment _ nil.\\\\n\\\\treturns _ false.\\\\n\\\\tmore _ hereType ~~ #rightBracket.\\\\n\\\\t[more]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t[start _ self startOfNextToken.\\\\n\\\\t\\\\t(returns _ self matchReturn)\\\\n\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t[self expression\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [^self expected: 'Expression to return'].\\\\n\\\\t\\\\t\\\\t\\\\tself addComment.\\\\n\\\\t\\\\t\\\\t\\\\tstmts addLast: (parseNode isReturningIf\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [parseNode]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [ReturnNode new\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\texpr: parseNode\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tencoder: encoder\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsourceRange: (start to: self endOfLastToken)])]\\\\n\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t[self expression\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[self addComment.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstmts addLast: parseNode]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[self addComment.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstmts size = 0\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[stmts addLast: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(encoder encodeVariable:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(inner ifTrue: ['nil'] ifFalse: ['self']))]]].\\\\n\\\\t\\\\treturns \\\\n\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t[self match: #period.\\\\n\\\\t\\\\t\\\\t\\\\t(hereType == #rightBracket or: [hereType == #doIt])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [^self expected: 'End of block']].\\\\n\\\\t\\\\tmore _ returns not and: [self match: #period]].\\\\n\\\\tparseNode _ BlockNode new\\\\n\\\\t\\\\t\\\\t\\\\targuments: argNodes\\\\n\\\\t\\\\t\\\\t\\\\tstatements: stmts\\\\n\\\\t\\\\t\\\\t\\\\treturns: returns\\\\n\\\\t\\\\t\\\\t\\\\tfrom: encoder.\\\\n\\\\tparseNode comment: blockComment.\\\\n\\\\t^ true! !\\\\n\\\\n!Parser methodsFor: 'expression types' stamp: 'ar 1/4/2002 00:23'!\\\\ntemporaries\\\\n\\\\t\\\\\\\" [ '|' (variable)* '|' ]\\\\\\\"\\\\n\\\\t| vars theActualText |\\\\n\\\\t(self match: #verticalBar) ifFalse: \\\\n\\\\t\\\\t[\\\\\\\"no temps\\\\\\\"\\\\n\\\\t\\\\tdoitFlag ifTrue: [self interactive\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [tempsMark _ 1]\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [tempsMark _ requestor selectionInterval first].\\\\n\\\\t\\\\t\\\\t^ #()].\\\\n\\\\t\\\\ttempsMark _ (prevEnd ifNil: [0]) + 1.\\\\n\\\\t\\\\ttempsMark _ hereMark\\\\t\\\\\\\"formerly --> prevMark + prevToken\\\\\\\".\\\\n\\\\n\\\\t\\\\ttempsMark > 0 ifTrue:\\\\n\\\\t\\\\t\\\\t[theActualText _ source contents.\\\\n\\\\t\\\\t\\\\t[tempsMark < theActualText size and: [(theActualText at: tempsMark) isSeparator]]\\\\n\\\\t\\\\t\\\\t\\\\twhileTrue: [tempsMark _ tempsMark + 1]].\\\\n\\\\t\\\\t\\\\t^ #()].\\\\n\\\\tvars _ OrderedCollection new.\\\\n\\\\t[hereType == #word]\\\\n\\\\t\\\\twhileTrue: [vars addLast: (encoder bindTemp: self advance)].\\\\n\\\\t(self match: #verticalBar) ifTrue: \\\\n\\\\t\\\\t[tempsMark _ prevMark.\\\\n\\\\t\\\\t^ vars].\\\\n\\\\t^ self expected: 'Vertical bar'\\\\n! !\\\\n\\\\n!Parser methodsFor: 'expression types' stamp: 'mir 1/17/2004 12:27'!\\\\ntemporariesIn: methodSelector\\\\n\\\\t\\\\\\\" [ '|' (variable)* '|' ]\\\\\\\"\\\\n\\\\t| vars theActualText |\\\\n\\\\t(self match: #verticalBar) ifFalse: \\\\n\\\\t\\\\t[\\\\\\\"no temps\\\\\\\"\\\\n\\\\t\\\\tdoitFlag ifTrue: [requestor\\\\n\\\\t\\\\t\\\\t\\\\tifNil: [tempsMark _ 1]\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil: [tempsMark _ requestor selectionInterval first].\\\\n\\\\t\\\\t\\\\t^ #()].\\\\n\\\\t\\\\ttempsMark _ (prevEnd ifNil: [0]) + 1.\\\\n\\\\t\\\\ttempsMark _ hereMark\\\\t\\\\\\\"formerly --> prevMark + prevToken\\\\\\\".\\\\n\\\\n\\\\t\\\\ttempsMark > 0 ifTrue:\\\\n\\\\t\\\\t\\\\t[theActualText _ source contents.\\\\n\\\\t\\\\t\\\\t[tempsMark < theActualText size and: [(theActualText at: tempsMark) isSeparator]]\\\\n\\\\t\\\\t\\\\t\\\\twhileTrue: [tempsMark _ tempsMark + 1]].\\\\n\\\\t\\\\t\\\\t^ #()].\\\\n\\\\tvars _ OrderedCollection new.\\\\n\\\\t[hereType == #word]\\\\n\\\\t\\\\twhileTrue: [vars addLast: (encoder bindTemp: self advance in: methodSelector)].\\\\n\\\\t(self match: #verticalBar) ifTrue: \\\\n\\\\t\\\\t[tempsMark _ prevMark.\\\\n\\\\t\\\\t^ vars].\\\\n\\\\t^ self expected: 'Vertical bar'! !\\\\n\\\\n!Parser methodsFor: 'expression types' stamp: 'crl 2/26/1999 12:22'!\\\\ntemporaryBlockVariables\\\\n\\\\t\\\\\\\"Scan and answer temporary block variables.\\\\\\\"\\\\n\\\\n\\\\t| variables |\\\\n\\\\n\\\\t(self match: #verticalBar) ifFalse: [\\\\n\\\\t\\\\t\\\\\\\"There are't any temporary variables.\\\\\\\"\\\\n\\\\t\\\\t^#()].\\\\n\\\\n\\\\tvariables _ OrderedCollection new.\\\\n\\\\t[hereType == #word] whileTrue: [variables addLast: (encoder bindBlockTemp: self advance)].\\\\n\\\\t(self match: #verticalBar) ifTrue: [^variables].\\\\n\\\\t^self expected: 'Vertical bar'! !\\\\n\\\\n!Parser methodsFor: 'expression types' stamp: 'di 12/4/1999 21:04'!\\\\nvariable\\\\n\\\\n\\\\t| varName varStart varEnd |\\\\n\\\\tvarStart _ self startOfNextToken + requestorOffset.\\\\n\\\\tvarName _ self advance.\\\\n\\\\tvarEnd _ self endOfLastToken + requestorOffset.\\\\n\\\\t^ encoder encodeVariable: varName\\\\n\\\\t\\\\tsourceRange: (varStart to: varEnd)\\\\n\\\\t\\\\tifUnknown: [self correctVariable: varName interval: (varStart to: varEnd)]! !\\\\n\\\\n\\\\n!Parser methodsFor: 'pragmas' stamp: 'lr 2/6/2006 20:50'!\\\\naddPragma: aPragma\\\\n\\\\tself properties addPragma: aPragma.! !\\\\n\\\\n!Parser methodsFor: 'pragmas' stamp: 'lr 2/6/2006 21:02'!\\\\npragmaLiteral\\\\n\\\\t\\\\\\\"Read a pragma literal.\\\\\\\"\\\\n\\\\n\\\\t(hereType == #string or: [ hereType == #literal or: [ hereType == #number ] ])\\\\n\\\\t\\\\tifTrue: [ ^ self advance ].\\\\n\\\\t(here == $# and: [ tokenType == #word ])\\\\n\\\\t\\\\tifTrue: [ ^ self advance ].\\\\n\\\\t(here == #- and: [ tokenType == #number ])\\\\n\\\\t\\\\tifTrue: [ ^ (self advance; advance) negated ].\\\\n\\\\t(here = 'true' or: [ here = 'false' or: [ here = 'nil' or: [ Smalltalk hasClassNamed: here ] ] ])\\\\n\\\\t\\\\tifTrue: [ ^ Compiler evaluate: self advance ].\\\\n\\\\t^ self expected: 'Literal constant'.! !\\\\n\\\\n!Parser methodsFor: 'pragmas' stamp: 'lr 2/6/2006 20:23'!\\\\npragmaPrimitives\\\\n\\\\t| primitives |\\\\n\\\\tprimitives := self properties pragmas select: [ :each | \\\\n\\\\t\\\\t#( primitive: primitive:module: ) \\\\n\\\\t\\\\t\\\\tincludes: each keyword ].\\\\n\\\\tprimitives isEmpty \\\\n\\\\t\\\\tifTrue: [ ^ 0 ].\\\\n\\\\tprimitives size = 1 \\\\n\\\\t\\\\tifFalse: [ ^ self notify: 'Ambigous primitives' ].\\\\n\\\\t^ primitives first message sendTo: self.! !\\\\n\\\\n!Parser methodsFor: 'pragmas' stamp: 'lr 2/6/2006 20:23'!\\\\npragmaSequence\\\\n\\\\t\\\\\\\"Parse a sequence of method pragmas.\\\\\\\"\\\\n\\\\t\\\\n\\\\t[ true ] whileTrue: [\\\\n\\\\t\\\\t(self matchToken: #<)\\\\n\\\\t\\\\t\\\\tifFalse: [ ^ self ].\\\\n\\\\t\\\\tself pragmaStatement.\\\\n\\\\t\\\\t(self matchToken: \\\";\\n            r = \\\"{7689049, 2109470}\\\";\\n            s = 1;\\n        },\\n                {\\n            l = \\\"instance or #class> <selector name>), and with a string to be produced as part of the error msg if any of the methods affected is reached\\\\\\\"\\\\n\\\\n\\\\t| aClass sel keywords codeString |\\\\n\\\\ttripletList do:\\\\n\\\\t\\\\t[:triplet |  \\\\n\\\\t\\\\t\\\\t(aClass _ (Smalltalk at: triplet first ifAbsent: [nil])) notNil ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[triplet second == #class ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[aClass _ aClass class].\\\\n\\\\t\\\\t\\\\t\\\\tsel _ triplet third.\\\\n\\\\t\\\\t\\\\t\\\\tkeywords _ sel keywords.\\\\n\\\\t\\\\t\\\\t\\\\t(keywords size == 1 and: [keywords first asSymbol isKeyword not])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[codeString _ keywords first asString]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[codeString _ ''.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tkeywords withIndexDo:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:kwd :index |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcodeString _ codeString, ' ', (keywords at: index), ' ',\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'arg', index printString]].\\\\n\\\\t\\\\t\\\\t\\\\tcodeString _ codeString, '\\\\n\\\\tself codeStrippedOut: ', (messageString surroundedBySingleQuotes).\\\\n\\\\n\\\\t\\\\t\\\\t\\\\taClass compile: codeString classified: 'stripped']]! !\\\\n\\\\n\\\\n!SmalltalkImage methodsFor: 'vm parameters' stamp: 'sd 6/27/2003 23:27'!\\\\nextraVMMemory\\\\n\\\\t\\\\\\\"Answer the current setting of the 'extraVMMemory' VM parameter. See the comment in extraVMMemory: for details.\\\\\\\"\\\\n\\\\n\\\\t^ self vmParameterAt: 23\\\\n! !\\\\n\\\\n!SmalltalkImage methodsFor: 'vm parameters' stamp: 'sd 6/27/2003 23:27'!\\\\nextraVMMemory: extraBytesToReserve\\\\n\\\\t\\\\\\\"Request that the given amount of extra memory be reserved for use by the virtual machine to leave extra C heap space available for things like plugins, network and file buffers, and so on. This request is stored when the image is saved and honored when the image is next started up. Answer the previous value of this parameter.\\\\\\\"\\\\n\\\\n\\\\textraBytesToReserve < 0\\\\n\\\\t\\\\tifTrue: [self error: 'VM memory reservation must be non-negative'].\\\\n\\\\t^ self vmParameterAt: 23 put: extraBytesToReserve\\\\n! !\\\\n\\\\n!SmalltalkImage methodsFor: 'vm parameters' stamp: 'sd 6/27/2003 23:47'!\\\\ngetVMParameters\\\\t\\\\n\\\\t\\\\\\\"Answer an Array containing the current values of the VM's internal\\\\n\\\\tparameter/metric registers.  Each value is stored in the array at the\\\\n\\\\tindex corresponding to its VM register.  (See #vmParameterAt: and\\\\n\\\\t#vmParameterAt:put:.)\\\\\\\"\\\\n\\\\t\\\\\\\"SmalltalkImage current getVMParameters\\\\\\\"\\\\n\\\\t\\\\n\\\\t<primitive: 254>\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!SmalltalkImage methodsFor: 'vm parameters' stamp: 'tpr 4/27/2005 11:03'!\\\\nvmParameterAt: parameterIndex\\\\n\\\\t\\\\\\\"parameterIndex is a positive integer corresponding to one of the VM's internal\\\\n\\\\tparameter/metric registers.  Answer with the current value of that register.\\\\n\\\\tFail if parameterIndex has no corresponding register.\\\\n\\\\tVM parameters are numbered as follows:\\\\n\\\\t\\\\t1\\\\tend of old-space (0-based, read-only)\\\\n\\\\t\\\\t2\\\\tend of young-space (read-only)\\\\n\\\\t\\\\t3\\\\tend of memory (read-only)\\\\n\\\\t\\\\t4\\\\tallocationCount (read-only)\\\\n\\\\t\\\\t5\\\\tallocations between GCs (read-write)\\\\n\\\\t\\\\t6\\\\tsurvivor count tenuring threshold (read-write)\\\\n\\\\t\\\\t7\\\\tfull GCs since startup (read-only)\\\\n\\\\t\\\\t8\\\\ttotal milliseconds in full GCs since startup (read-only)\\\\n\\\\t\\\\t9\\\\tincremental GCs since startup (read-only)\\\\n\\\\t\\\\t10\\\\ttotal milliseconds in incremental GCs since startup (read-only)\\\\n\\\\t\\\\t11\\\\ttenures of surving objects since startup (read-only)\\\\n\\\\t\\\\t12-20 specific to the translating VM\\\\n\\\\t\\\\t21\\\\troot table size (read-only)\\\\n\\\\t\\\\t22\\\\troot table overflows since startup (read-only)\\\\n\\\\t\\\\t23\\\\tbytes of extra memory to reserve for VM buffers, plugins, etc.\\\\n\\\\n\\\\t\\\\t24\\\\tmemory threshold above which shrinking object memory (rw)\\\\n\\\\t\\\\t25\\\\tmemory headroom when growing object memory (rw)\\\\n\\\\t\\\\t26  interruptChecksEveryNms - force an ioProcessEvents every N milliseconds, in case the image  is not calling getNextEvent often (rw)\\\\n\\\\t\\\\t27\\\\tnumber of times mark loop iterated for current IGC/FGC (read-only) includes ALL marking\\\\n\\\\t\\\\t28\\\\tnumber of times sweep loop iterated  for current IGC/FGC (read-only)\\\\n\\\\t\\\\t29\\\\tnumber of times make forward loop iterated for current IGC/FGC (read-only)\\\\n\\\\t\\\\t30\\\\tnumber of times compact move loop iterated for current IGC/FGC (read-only)\\\\n\\\\t\\\\t31\\\\tnumber of grow memory requests (read-only)\\\\n\\\\t\\\\t32\\\\tnumber of shrink memory requests (read-only)\\\\n\\\\t\\\\t33\\\\tnumber of root table entries used for current IGC/FGC (read-only)\\\\n\\\\t\\\\t34\\\\tnumber of allocations done before current IGC/FGC (read-only)\\\\n\\\\t\\\\t35\\\\tnumber of survivor objects after current IGC/FGC (read-only)\\\\n\\\\t\\\\t36  millisecond clock when current IGC/FGC completed (read-only)\\\\n\\\\t\\\\t37  number of marked objects for Roots of the world, not including Root Table entries for current IGC/FGC (read-only)\\\\n\\\\t\\\\t38  milliseconds taken by current IGC  (read-only)\\\\n\\\\t\\\\t39  Number of finalization signals for Weak Objects pending when current IGC/FGC completed (read-only)\\\\n\\\\t\\\\t40  VM word size - 4 or 8 (read-only)\\\\\\\"\\\\n\\\\n\\\\t<primitive: 254>\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!SmalltalkImage methodsFor: 'vm parameters' stamp: 'sd 6/27/2003 23:27'!\\\\nvmParameterAt: parameterIndex put: newValue\\\\n\\\\t\\\\\\\"parameterIndex is a positive integer corresponding to one of the VM's internal\\\\n\\\\tparameter/metric registers.  Store newValue (a positive integer) into that\\\\n\\\\tregister and answer with the previous value that was stored there.\\\\n\\\\tFail if newValue is out of range, if parameterIndex has no corresponding\\\\n\\\\tregister, or if the corresponding register is read-only.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 254>\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n\\\\n!SmalltalkImage methodsFor: 'vm profiling' stamp: 'sd 9/24/2003 11:54'!\\\\nclearProfile\\\\n\\\\t\\\\\\\"Clear the profile database.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 250>\\\\n! !\\\\n\\\\n!SmalltalkImage methodsFor: 'vm profiling' stamp: 'sd 9/24/2003 11:54'!\\\\ndumpProfile\\\\n\\\\t\\\\\\\"Dump the profile database to a file.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 251>\\\\n! !\\\\n\\\\n!SmalltalkImage methodsFor: 'vm profiling' stamp: 'sd 9/24/2003 11:54'!\\\\nprofile: aBlock\\\\n\\\\t\\\\\\\"Make a virtual machine profile of the given block.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: Profiling support is provided so that VM implementors\\\\n\\\\t can better understand and improve the efficiency of the virtual\\\\n\\\\t machine. To use it, you must be running a version of the\\\\n\\\\t virtual machine compiled with profiling enabled (which\\\\n\\\\t makes it much slower than normal even when not profiling).\\\\n\\\\t You will also need the CodeWarrior profile reader application.\\\\\\\"\\\\n\\\\n\\\\tself stopProfiling.\\\\n\\\\tself clearProfile.\\\\n\\\\tself startProfiling.\\\\n\\\\taBlock value.\\\\n\\\\tself stopProfiling.\\\\n\\\\tself dumpProfile.! !\\\\n\\\\n!SmalltalkImage methodsFor: 'vm profiling' stamp: 'sd 9/24/2003 11:55'!\\\\nstartProfiling\\\\n\\\\t\\\\\\\"Start profiling the virtual machine.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 252>\\\\n! !\\\\n\\\\n!SmalltalkImage methodsFor: 'vm profiling' stamp: 'sd 9/24/2003 11:55'!\\\\nstopProfiling\\\\n\\\\t\\\\\\\"Stop profiling the virtual machine.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 253>\\\\n! !\\\\n\\\\n\\\\n!SmalltalkImage methodsFor: 'vm statistics' stamp: 'sd 7/2/2003 21:45'!\\\\ntextMarkerForShortReport\\\\n\\\\n\\\\t^  'Since last view\\\\t'! !\\\\n\\\\n!SmalltalkImage methodsFor: 'vm statistics' stamp: 'sd 9/30/2003 13:53'!\\\\nvmStatisticsReportString\\\\n\\\\t\\\\\\\"StringHolderView open: (StringHolder new contents:\\\\n\\\\t\\\\tSmalltalkImage current vmStatisticsReportString) label: 'VM Statistics'\\\\\\\"\\\\n\\\\n\\\\t| params oldSpaceEnd youngSpaceEnd memoryEnd fullGCs fullGCTime incrGCs incrGCTime tenureCount mcMisses mcHits icHits upTime sendCount tms tmSize upTime2 fullGCs2 fullGCTime2 incrGCs2 incrGCTime2 tenureCount2 str |\\\\n\\\\tparams _ self getVMParameters.\\\\n\\\\toldSpaceEnd\\\\t\\\\t\\\\t_ params at: 1.\\\\n\\\\tyoungSpaceEnd\\\\t\\\\t_ params at: 2.\\\\n\\\\tmemoryEnd\\\\t\\\\t\\\\t_ params at: 3.\\\\n\\\\tfullGCs\\\\t\\\\t\\\\t\\\\t_ params at: 7.\\\\n\\\\tfullGCTime\\\\t\\\\t\\\\t_ params at: 8.\\\\n\\\\tincrGCs\\\\t\\\\t\\\\t\\\\t_ params at: 9.\\\\n\\\\tincrGCTime\\\\t\\\\t\\\\t_ params at: 10.\\\\n\\\\ttenureCount\\\\t\\\\t\\\\t_ params at: 11.\\\\n\\\\tmcMisses\\\\t\\\\t\\\\t_ params at: 15.\\\\n\\\\tmcHits\\\\t\\\\t\\\\t\\\\t_ params at: 16.\\\\n\\\\ticHits\\\\t\\\\t\\\\t\\\\t_ params at: 17.\\\\n\\\\tupTime _ Time millisecondClockValue.\\\\n\\\\tsendCount _ mcMisses + mcHits + icHits.\\\\n\\\\ttms _ TranslatedMethod allSubInstances.\\\\n\\\\ttmSize _ tms inject: 0 into: [:sum :tm | sum + (tm size * 4)].\\\\n\\\\n\\\\tstr _ WriteStream on: (String new: 1000).\\\\n\\\\tstr\\\\tnextPutAll: 'uptime\\\\t\\\\t\\\\t';\\\\n\\\\t\\\\tprint: (upTime / 1000 / 60 // 60); nextPut: $h;\\\\n\\\\t\\\\tprint: (upTime / 1000 / 60 \\\\\\\\\\\\\\\\ 60) asInteger; nextPut: $m;\\\\n\\\\t\\\\tprint: (upTime / 1000 \\\\\\\\\\\\\\\\ 60) asInteger; nextPut: $s; cr.\\\\n\\\\n\\\\tstr\\\\tnextPutAll: 'memory\\\\t\\\\t\\\\t';\\\\n\\\\t\\\\tnextPutAll: memoryEnd asStringWithCommas; nextPutAll: ' bytes'; cr.\\\\n\\\\tstr\\\\tnextPutAll:\\\\t'\\\\told\\\\t\\\\t\\\\t';\\\\n\\\\t\\\\tnextPutAll: oldSpaceEnd asStringWithCommas; nextPutAll: ' bytes (';\\\\n\\\\t\\\\tprint: ((oldSpaceEnd / memoryEnd * 100) roundTo: 0.1); nextPutAll: '%)'; cr.\\\\n\\\\tstr\\\\tnextPutAll: '\\\\tyoung\\\\t\\\\t';\\\\n\\\\t\\\\tnextPutAll: (youngSpaceEnd - oldSpaceEnd) asStringWithCommas; nextPutAll: ' bytes (';\\\\n\\\\t\\\\tprint: ((youngSpaceEnd - oldSpaceEnd / memoryEnd * 100) roundTo: 0.1); nextPutAll: '%)'; cr.\\\\n\\\\tstr\\\\tnextPutAll: '\\\\tused\\\\t\\\\t';\\\\n\\\\t\\\\tnextPutAll: youngSpaceEnd asStringWithCommas; nextPutAll: ' bytes (';\\\\n\\\\t\\\\tprint: ((youngSpaceEnd / memoryEnd * 100) roundTo: 0.1); nextPutAll: '%)'; cr.\\\\n\\\\tstr\\\\tnextPutAll: '\\\\tfree\\\\t\\\\t';\\\\n\\\\t\\\\tnextPutAll: (memoryEnd - youngSpaceEnd) asStringWithCommas; nextPutAll: ' bytes (';\\\\n\\\\t\\\\tprint: ((memoryEnd - youngSpaceEnd / memoryEnd * 100) roundTo: 0.1); nextPutAll: '%)'; cr.\\\\n\\\\n\\\\tstr\\\\tnextPutAll: 'GCs\\\\t\\\\t\\\\t\\\\t';\\\\n\\\\t\\\\tnextPutAll: (fullGCs + incrGCs) asStringWithCommas.\\\\n\\\\tfullGCs + incrGCs > 0 ifTrue: [\\\\n\\\\t\\\\tstr\\\\n\\\\t\\\\t\\\\tnextPutAll: ' ('; \\\\n\\\\t\\\\t\\\\tprint: ((upTime / (fullGCs + incrGCs)) roundTo: 1); \\\\n\\\\t\\\\t\\\\tnextPutAll: 'ms between GCs)'\\\\n\\\\t].\\\\n\\\\tstr cr.\\\\n\\\\tstr\\\\tnextPutAll: '\\\\tfull\\\\t\\\\t\\\\t';\\\\n\\\\t\\\\tprint: fullGCs; nextPutAll: ' totalling '; nextPutAll: fullGCTime asStringWithCommas; nextPutAll: 'ms (';\\\\n\\\\t\\\\tprint: ((fullGCTime / upTime * 100) roundTo: 1.0);\\\\n\\\\t\\\\tnextPutAll: '% uptime)'.\\\\n\\\\tfullGCs = 0 ifFalse:\\\\n\\\\t\\\\t[str\\\\tnextPutAll: ', avg '; print: ((fullGCTime / fullGCs) roundTo: 1.0); nextPutAll: 'ms'].\\\\n\\\\tstr\\\\tcr.\\\\n\\\\tstr\\\\tnextPutAll: '\\\\tincr\\\\t\\\\t';\\\\n\\\\t\\\\tprint: incrGCs; nextPutAll: ' totalling '; nextPutAll: incrGCTime asStringWithCommas; nextPutAll: 'ms (';\\\\n\\\\t\\\\tprint: ((incrGCTime / upTime * 100) roundTo: 1.0);\\\\n\\\\t\\\\tnextPutAll: '% uptime), avg '; print: ((incrGCTime / incrGCs) roundTo: 1.0); nextPutAll: 'ms'; cr.\\\\n\\\\tstr\\\\tnextPutAll: '\\\\ttenures\\\\t\\\\t';\\\\n\\\\t\\\\tnextPutAll: tenureCount asStringWithCommas.\\\\n\\\\ttenureCount = 0 ifFalse:\\\\n\\\\t\\\\t[str nextPutAll: ' (avg '; print: (incrGCs / tenureCount) asInteger; nextPutAll: ' GCs/tenure)'].\\\\n\\\\tstr\\\\tcr.\\\\n\\\\nLastStats ifNil: [LastStats _ Array new: 6]\\\\nifNotNil: [\\\\n\\\\tupTime2 _ upTime - (LastStats at: 1).\\\\n\\\\tfullGCs2 _ fullGCs - (LastStats at: 2).\\\\n\\\\tfullGCTime2 _ fullGCTime - (LastStats at: 3).\\\\n\\\\tincrGCs2 _ incrGCs - (LastStats at: 4).\\\\n\\\\tincrGCTime2 _ incrGCTime - (LastStats at: 5).\\\\n\\\\ttenureCount2 _ tenureCount - (LastStats at: 6).\\\\n\\\\n\\\\tstr\\\\tnextPutAll: self textMarkerForShortReport ;\\\\n\\\\t\\\\tnextPutAll: (fullGCs2 + incrGCs2) asStringWithCommas.\\\\n\\\\tfullGCs2 + incrGCs2 > 0 ifTrue: [\\\\n\\\\t\\\\tstr\\\\n\\\\t\\\\t\\\\tnextPutAll: ' ('; \\\\n\\\\t\\\\t\\\\tprint: ((upTime2 / (fullGCs2 + incrGCs2)) roundTo: 1); \\\\n\\\\t\\\\t\\\\tnextPutAll: 'ms between GCs)'.\\\\n\\\\t].\\\\n\\\\tstr cr.\\\\n\\\\tstr\\\\tnextPutAll: '\\\\tuptime\\\\t\\\\t'; print: ((upTime2 / 1000.0) roundTo: 0.1); nextPutAll: 's'; cr.\\\\n\\\\tstr\\\\tnextPutAll: '\\\\tfull\\\\t\\\\t\\\\t';\\\\n\\\\t\\\\tprint: fullGCs2; nextPutAll: ' totalling '; nextPutAll: fullGCTime2 asStringWithCommas; nextPutAll: 'ms (';\\\\n\\\\t\\\\tprint: ((fullGCTime2 / upTime2 * 100) roundTo: 1.0);\\\\n\\\\t\\\\tnextPutAll: '% uptime)'.\\\\n\\\\tfullGCs2 = 0 ifFalse:\\\\n\\\\t\\\\t[str\\\\tnextPutAll: ', avg '; print: ((fullGCTime2 / fullGCs2) roundTo: 1.0); nextPutAll: 'ms'].\\\\n\\\\tstr\\\\tcr.\\\\n\\\\tstr\\\\tnextPutAll: '\\\\tincr\\\\t\\\\t';\\\\n\\\\t\\\\tprint: incrGCs2; nextPutAll: ' totalling '; nextPutAll: incrGCTime2 asStringWithCommas; nextPutAll: 'ms (';\\\\n\\\\t\\\\tprint: ((incrGCTime2 / upTime2 * 100) roundTo: 1.0);\\\\n\\\\t\\\\tnextPutAll: '% uptime), avg '.\\\\n\\\\tincrGCs2 > 0 ifTrue: [\\\\n\\\\t\\\\t str print: ((incrGCTime2 / incrGCs2) roundTo: 1.0); nextPutAll: 'ms'\\\\n\\\\t].\\\\n\\\\tstr cr.\\\\n\\\\tstr\\\\tnextPutAll: '\\\\ttenures\\\\t\\\\t';\\\\n\\\\t\\\\tnextPutAll: tenureCount2 asStringWithCommas.\\\\n\\\\ttenureCount2 = 0 ifFalse:\\\\n\\\\t\\\\t[str nextPutAll: ' (avg '; print: (incrGCs2 / tenureCount2) asInteger; nextPutAll: ' GCs/tenure)'].\\\\n\\\\tstr\\\\tcr.\\\\n].\\\\n\\\\tLastStats at: 1 put: upTime.\\\\n\\\\tLastStats at: 2 put: fullGCs.\\\\n\\\\tLastStats at: 3 put: fullGCTime.\\\\n\\\\tLastStats at: 4 put: incrGCs.\\\\n\\\\tLastStats at: 5 put: incrGCTime.\\\\n\\\\tLastStats at: 6 put: tenureCount.\\\\n\\\\n\\\\tsendCount > 0 ifTrue: [\\\\n\\\\t\\\\tstr\\\\tnextPutAll: 'sends\\\\t\\\\t\\\\t';\\\\n\\\\t\\\\t\\\\tnextPutAll: sendCount asStringWithCommas; cr.\\\\n\\\\t\\\\tstr\\\\tnextPutAll: '\\\\tfull\\\\t\\\\t\\\\t';\\\\n\\\\t\\\\t\\\\tnextPutAll: mcMisses asStringWithCommas;\\\\n\\\\t\\\\t\\\\tnextPutAll: ' ('; print: ((mcMisses / sendCount * 100) roundTo: 0.1); nextPutAll: '%)'; cr.\\\\n\\\\t\\\\tstr\\\\tnextPutAll: '\\\\tm-cache\\\\t';\\\\n\\\\t\\\\t\\\\tnextPutAll: mcHits asStringWithCommas;\\\\n\\\\t\\\\t\\\\tnextPutAll: ' ('; print: ((mcHits / sendCount * 100) roundTo: 0.1); nextPutAll: '%)'; cr.\\\\n\\\\t\\\\tstr\\\\tnextPutAll: '\\\\ti-cache\\\\t\\\\t';\\\\n\\\\t\\\\t\\\\tnextPutAll: icHits asStringWithCommas;\\\\n\\\\t\\\\t\\\\tnextPutAll: ' ('; print: ((icHits / sendCount * 100) roundTo: 0.1); nextPutAll: '%)'; cr].\\\\n\\\\n\\\\ticHits > 0 ifTrue: [\\\\n\\\\t\\\\tstr\\\\tnextPutAll: 'methods\\\\t\\\\t\\\\t';\\\\n\\\\t\\\\t\\\\tnextPutAll: tms size asStringWithCommas; nextPutAll: ' translated'; cr.\\\\n\\\\t\\\\tstr\\\\tnextPutAll: '\\\\tsize\\\\t\\\\t\\\\t';\\\\n\\\\t\\\\t\\\\tnextPutAll: tmSize asStringWithCommas; nextPutAll: ' bytes, avg ';\\\\n\\\\t\\\\t\\\\tprint: ((tmSize / tms size) roundTo: 0.1); nextPutAll: ' bytes/method'; cr.\\\\n\\\\t\\\\tstr\\\\tnextPutAll: '\\\\tmemory\\\\t\\\\t';\\\\n\\\\t\\\\t\\\\tprint: ((tmSize / youngSpaceEnd * 100) roundTo: 0.1); nextPutAll: '% of used, ';\\\\n\\\\t\\\\t\\\\tprint: ((tmSize / memoryEnd * 100) roundTo: 0.1); nextPutAll: '% of available'; cr].\\\\n\\\\n\\\\t^ str contents\\\\n! !\\\\n\\\\n!SmalltalkImage methodsFor: 'vm statistics' stamp: 'sd 9/30/2003 13:54'!\\\\nvmStatisticsShortString\\\\n\\\\t\\\\\\\"Convenience item for access to recent statistics only\\\\\\\"\\\\n\\\\t\\\\\\\"StringHolderView open: (StringHolder new contents: SmalltalkImage current vmStatisticsShortString)\\\\n\\\\t\\\\tlabel: 'VM Recent Statistics'\\\\\\\"\\\\n\\\\n\\\\t^ (ReadStream on: self vmStatisticsReportString) upToAll: 'Since'; upTo: Character cr; upToEnd\\\\n! !\\\\n\\\\n\\\\n!SmalltalkImage methodsFor: 'private source file' stamp: 'sd 9/24/2003 12:42'!\\\\nsourceFileVersionString: aString\\\\n\\\\n\\\\tSourceFileVersionString := aString! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSmalltalkImage class\\\\n\\\\tinstanceVariableNames: 'current'!\\\\n\\\\n!SmalltalkImage class methodsFor: 'class initialization' stamp: 'yo 2/18/2004 18:26'!\\\\ninitialize\\\\n\\\\\\\"\\\\n\\\\tself initialize\\\\n\\\\\\\"\\\\n\\\\tSmalltalk addToStartUpList: SmalltalkImage.\\\\n\\\\tSmalltalkImage startUp.\\\\n! !\\\\n\\\\n!SmalltalkImage class methodsFor: 'class initialization' stamp: 'yo 2/18/2004 18:25'!\\\\nstartUp\\\\n\\\\n\\\\tEndianCache _ nil.\\\\n! !\\\\n\\\\n\\\\n!SmalltalkImage class methodsFor: 'instance creation' stamp: 'sd 9/30/2003 14:28'!\\\\ncurrent\\\\n\\\\t\\\\\\\"Note that this could be implemented differently to avoid the test\\\\\\\"\\\\n\\\\n\\\\tcurrent isNil\\\\n\\\\t\\\\tifTrue: [current := self basicNew].\\\\n\\\\t^ current! !\\\\n\\\\n!SmalltalkImage class methodsFor: 'instance creation' stamp: 'sd 9/30/2003 13:39'!\\\\nnew\\\\n\\\\n\\\\tself error: 'Use current'.! !\\\\nReferenceStream subclass: #SmartRefStream\\\\n\\\\tinstanceVariableNames: 'structures steady reshaped renamed renamedConv superclasses progressBar objCount classInstVars'\\\\n\\\\tclassVariableNames: 'ScannedObject'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Object Storage'!\\\\n!SmartRefStream commentStamp: '<historical>' prior: 0!\\\\nOrdinary ReferenceStreams assume that the names and order of instance variables is exactly the same when an object file is written and read.  \\\\n\\\\tSmartRefStream allows object files to be read even after instance variables have changed or the entire class has been renamed.\\\\n\\\\nWhen an object file is written, no one knows how the classes will change in the future.  Therefore, all conversion must be done when the file is read.  The key is to store enough information in the file about the names of the instance variables of all outgoing classes.  \\\\n\\\\nSmartRefStream works best with only one tree of objects per file.  You can nextPut: more than once, but each object tree gets its own class structure description, which is big.  \\\\n\\\\nConversion of old objects is done by a method in each class called (convertToCurrentVersion: varDict refStream: smartRefStrm).  At fileOut time, ChangeSet>>checkForConversionMethods creates a prototype of this method (if Preference #conversionMethodsAtFileOut is true).  The programmer must edit this method to (1) test if the incoming object needs conversion, (2) put non-nil values into any new inst vars that need them, and (3) save the data of any inst vars that are being deleted. \\\\n\\\\nDetermining which old version is represented by the incoming object can be done in several ways: noticing that a current inst var is nil when it should have data, noticing that there is an older inst var name in the variable dictionary (varDict), checking kinds of objects in one or more inst vars, or retrieving the classVersion of the incoming object from the ref stream.  \\\\n\\\\nIf a class is renamed, a method goes into SmartRefStream telling the new name.  The conversion method of the new class must be prepared to accept instances of the old class also.  If no inst var names have changed, the conversion method does nothing.\\\\n\\\\nAn example:  \\\\n\\\\tSuppose we change the representation of class Rectangle from ('origin' 'corner') to ('origin' 'extent').  Suppose lots of Rectangle instances are already out on files (in .pr project files, especially).  \\\\n\\\\tThe programmer changes the class definition, modifies all the methods, and filesOut.  A series of dialogs appear, asking if instances Rectangle might be in an object file, if 'extent' needs to be non-nil (yes), and if the info in 'corner' needs to be preserved (yes).  This method appears:\\\\n\\\\nRectangle >> convertToCurrentVersion: varDict refStream: smartRefStrm\\\\n\\\\t\\\\\\\"These variables are automatically stored into the new instance: #('origin').\\\\n\\\\tTest for this particular conversion.  Get values using expressions like (varDict at: 'foo').\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"New variables: #('extent').  If a non-nil value is needed, please assign it.\\\\\\\"\\\\n\\\\t\\\\\\\"These are going away #('corner').  Possibly store their info in some other variable?\\\\\\\"\\\\n\\\\t\\\\\\\"Move your code above the ^ super...  Delete extra comments.\\\\\\\"\\\\n\\\\t^ super convertToCurrentVersion: varDict refStream: smartRefStrm\\\\n\\\\nThe programmer modifies it to be:\\\\n\\\\nRectangle >> convertToCurrentVersion: varDict refStream: smartRefStrm\\\\n\\\\n(varDict includesKey: 'extent') ifFalse: [\\\\\\\"old version!!\\\\\\\"\\\\n\\\\t\\\\\\\"Create the new extent, and preserve the info from the old corner\\\\\\\"\\\\n\\\\textent _ (varDict at: 'corner') - origin.\\\\n\\\\t].\\\\n^ super convertToCurrentVersion: varDict refStream: smartRefStrm\\\\n\\\\n\\\\tThis conversion method stays in the system and is ready to convert the old format of Rectangle whenever one is encountered in an object file.  Note that the subclasses of Rectangle, (B3DViewport, CharacterBlock, and Quadrangle) do not need conversion methods.  Their instances will be converted by the code in Rectangle.  \\\\n\\\\n\\\\tFiles written by SmartRefStream are in standard fileout format.  You can mix raw objects with code to be filed in.  The file starts out in the normal fileOut format.  Definitions of new classes on the front.\\\\n\\\\nstructures \\\\tDictionary of (#Rectangle -> #(<classVersionInteger> 'origin' 'corner')).  Inst \\\\n\\\\t\\\\t\\\\t\\\\tvar names are strings.\\\\nsteady \\\\t\\\\tSet of Classes who have the same structure now as on the incoming file.\\\\n\\\\t\\\\t\\\\t\\\\tIncludes classes with same inst vars except for new ones added on the end.\\\\nreshaped \\\\tDictionary of Classes who have a different structure now from the incoming file.  \\\\n\\\\t\\\\t\\\\t\\\\tIncludes those with same inst vars but new version number.\\\\n\\\\t\\\\t\\\\t\\\\t(old class name -> method selector to fill in data for version to version)\\\\nrenamed\\\\tDictionary of Classes who have a different name.  Make an instance of the new\\\\n\\\\t\\\\t\\\\tclass, and send it the conversion call.\\\\n\\\\t\\\\t\\\\t\\\\t(old class name symbol -> new class name).  \\\\nrenamedConv\\\\tDictionary of conversion selector for Classes who have a different name.\\\\n\\\\t\\\\t\\\\t\\\\t(old class name symbol -> conversion selector).  \\\\ntopCall\\\\t\\\\tTells if next or nextPut: are working on the top object in the tree.  \\\\n\\\\t\\\\t\\\\tnil if outside, the top object if deep inside.\\\\n\\\\nSee DataStream.typeIDFor: for where the tangle of objects is clipped, so the whole system will not be written on the file.\\\\n\\\\nNo object that is written on the file is ever a class.  All class definitions are filed in.  A class may be stored inside an ImageSegment that itself is stored in a SmartRefStream.\\\\n\\\\nUniClasses are classes for the instance specific behavior of just one instance.  Subclasses of Player are an example.  When a UniClass is read in, and a class of the same name already exists, the incoming one is renamed.  ObjectScanner converts the filed-in code.\\\\n\\\\nValues in instance variables of UniClasses are stored in the array that tells the class structure.  It is the fourth of the four top level objects.  #(version (class-structure) the-object ((#Player25 scripts slotInfo costumeDictionary) (#Player26 scripts slotInfo costumeDictionary))).\\\\n\\\\nThere is a separate subclass for doing veryDeepCopy (in memory).  Currently, any object for which objectToStoreOnDataStream return an object other than self, does this:  The new object (a DiskProxy) is traced.  When it comes time to go through the fields of the old object, they are not found as keys in references (DiskProxies are there instead).  So the old field value is left in the new object.  That is OK for StrikeFont, Class, MetaClass, DisplayScreen.  But the DiskProxies are evaluated, which takes a lot of time.\\\\n\\\\nSome metaclasses are put into the structures table.  This is for when a block has a receiver that is a class.  See checkFatalReshape:.\\\\n\\\\nImageSegments:\\\\n\\\\tA ReferenceStream is used to enumerate objects to put inside an ImageSegment.  If an instance of a UniClass is seen, the class is put in also.\\\\n\\\\tA SmartRefStream is used to store the ImageSegment.  Roots are nil, and the segment is a wordArray.  We are encoding the outPointers.  Structures contains all classes from both places.  Must filter out UniClasses for some things, and do include them for putting source code at end of file.  Do not write any class inst vars in file.\\\\n\\\\n--Ted Kaehler and Bob Arning.\\\\n!\\\\n\\\\n\\\\n!SmartRefStream methodsFor: 'accessing' stamp: 'tk 5/19/1999 15:47'!\\\\nstructures: anObject\\\\n\\\\tstructures _ anObject! !\\\\n\\\\n!SmartRefStream methodsFor: 'accessing' stamp: 'tk 5/19/1999 15:47'!\\\\nsuperclasses: anObject\\\\n\\\\tsuperclasses _ anObject! !\\\\n\\\\n\\\\n!SmartRefStream methodsFor: 'class changed shape' stamp: 'tk 1/7/97'!\\\\ncatalogValues: instVarList size: varsOnDisk\\\\n\\\\t\\\\\\\"Create a dictionary of (name -> value) for the inst vars of this reshaped object.  Indexed vars as (1 -> val) etc.  \\\\\\\"\\\\n\\\\n\\\\t| dict sz |\\\\n\\\\tdict _ Dictionary new.\\\\n\\\\t2 to: instVarList size do: [:ind |\\\\n\\\\t\\\\tdict at: (instVarList at: ind) put: self next].\\\\n\\\\tsz _ varsOnDisk - (instVarList size - 1).\\\\n\\\\t1 to: sz do: [:ii | \\\\n\\\\t\\\\tdict at: ii put: self next].\\\\n\\\\t\\\\\\\"Total number read MUST be equal to varsOnDisk!!\\\\\\\"\\\\n\\\\tsz > 0 ifTrue: [dict at: #SizeOfVariablePart put: sz].\\\\n\\\\t^ dict! !\\\\n\\\\n!SmartRefStream methodsFor: 'class changed shape' stamp: 'ar 9/27/2005 22:41'!\\\\nconversionMethodsFor: classList\\\\n\\\\t| oldStruct newStruct list |\\\\n\\\\t\\\\\\\"Each of these needs a conversion method.  Hard part is the comment in it.  Return a MessageSet.\\\\\\\"\\\\n\\\\n\\\\tlist _ OrderedCollection new.\\\\n\\\\tclassList do: [:cls |\\\\n\\\\t\\\\toldStruct _ structures at: cls name ifAbsent: [#()].\\\\n\\\\t\\\\tnewStruct _ (Array with: cls classVersion), (cls allInstVarNames).\\\\n\\\\t\\\\tself writeConversionMethodIn: cls fromInstVars: oldStruct to: newStruct \\\\n\\\\t\\\\t\\\\t\\\\trenamedFrom: nil.\\\\n\\\\t\\\\tlist add: cls name, ' convertToCurrentVersion:refStream:'.\\\\n\\\\t\\\\t].\\\\n\\\\n\\\\t^list.! !\\\\n\\\\n!SmartRefStream methodsFor: 'class changed shape' stamp: 'tk 5/26/97'!\\\\nstoreInstVarsIn: anObject from: dict\\\\n\\\\t\\\\\\\"For instance variables with the same names, store them in the new instance.  Values in variable-length part also.  This is NOT the normal inst var transfer!!  See Object.readDataFrom:size:.  This is for when inst var names have changed and some additional conversion is needed.  Here we handle the unchanged vars.  \\\\\\\"\\\\n\\\\n\\\\t(anObject class allInstVarNames) doWithIndex: [:varName :index |\\\\n\\\\t\\\\t(dict includesKey: varName) ifTrue: [\\\\n\\\\t\\\\t\\\\tanObject instVarAt: index put: (dict at: varName)]].\\\\n\\\\t\\\\\\\"variable part\\\\\\\"\\\\n\\\\t(dict includesKey: #SizeOfVariablePart) ifFalse: [^ anObject].\\\\n\\\\t1 to: (dict at: #SizeOfVariablePart) do: [:index | \\\\n\\\\t\\\\tanObject basicAt: index put: (dict at: index)].\\\\n\\\\t^ anObject! !\\\\n\\\\n!SmartRefStream methodsFor: 'class changed shape' stamp: 'tk 6/8/2001 09:57'!\\\\nwriteClassRename: newName was: oldName\\\\n\\\\t\\\\\\\"Write a method that tells which modern class to map instances to.\\\\\\\"\\\\n\\\\t| oldVer sel code |\\\\n\\\\n\\\\toldVer _ self versionSymbol: (structures at: oldName).\\\\n\\\\tsel _ oldName asString.\\\\n\\\\tsel at: 1 put: (sel at: 1) asLowercase.\\\\n\\\\tsel _ sel, oldVer.\\\\t\\\\\\\"i.e. #rectangleoc4\\\\\\\"\\\\n\\\\n\\\\tcode _ WriteStream on: (String new: 500).\\\\n\\\\tcode nextPutAll: sel; cr.\\\\n\\\\tcode cr; tab; nextPutAll: '^ ', newName.\\\\t\\\\\\\"Return new class\\\\\\\"\\\\n\\\\n\\\\tself class compile: code contents classified: 'conversion'.\\\\n\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'class changed shape' stamp: 'CdG 10/17/2005 21:01'!\\\\nwriteClassRenameMethod: sel was: oldName fromInstVars: oldList\\\\n\\\\t\\\\\\\"The class coming is unknown.  Ask the user for the existing class it maps to.  If got one, write a method, and restart the obj fileIn.  If none, write a dummy method and get the user to complete it later.  \\\\\\\"\\\\n\\\\n| tell choice  newName answ code |\\\\n\\\\n\\\\tself flag: #bobconv.\\\\t\\\\n\\\\n\\\\ntell := 'Reading an instance of ', oldName, '.\\\\nWhich modern class should it translate to?'.\\\\nansw := (UIManager default \\\\n\\\\t\\\\tchooseFrom: #('Let me type the name now' 'Let me think about it'\\\\n'Let me find a conversion file on the disk') \\\\n\\\\t\\\\ttitle: tell). \\\\n\\\\nansw = 1 ifTrue: [\\\\n\\\\ttell := 'Name of the modern class {1} should translate to:' translated format: {oldName}.\\\\n\\\\tchoice := UIManager default request: tell.\\\\t\\\\t\\\\\\\"class name\\\\\\\"\\\\n\\\\t(choice size = 0) \\\\n\\\\t\\\\tifTrue: [answ := 'conversion method needed']\\\\n\\\\t\\\\tifFalse: [newName := choice.\\\\n\\\\t\\\\t\\\\tansw := Smalltalk at: newName asSymbol \\\\n\\\\t\\\\t\\\\t\\\\tifAbsent: ['conversion method needed'].\\\\n\\\\t\\\\t\\\\tansw isString ifFalse: [renamed at: oldName asSymbol put: answ name]]].\\\\n(answ = 3) | (answ = 0) ifTrue: [self close.\\\\n\\\\t\\\\t^ 'conversion method needed'].\\\\nansw = 2 ifTrue: [answ := 'conversion method needed'].\\\\nansw = 'conversion method needed' ifTrue: [\\\\n\\\\t\\\\tself close.  \\\\n\\\\t\\\\tnewName := 'PutNewClassHere'].\\\\n\\\\ncode := WriteStream on: (String new: 500).\\\\ncode nextPutAll: sel; cr.\\\\ncode cr; tab; nextPutAll: '^ ', newName.\\\\t\\\\\\\"Return new class\\\\\\\"\\\\n\\\\nself class compile: code contents classified: 'conversion'.\\\\n\\\\nnewName = 'PutNewClassHere' ifTrue: [\\\\n\\\\tself inform: 'Please complete the following method and \\\\nthen read-in the object file again.'.\\\\n\\\\tSystemNavigation default browseAllImplementorsOf: sel asSymbol]. \\\\n\\\\n\\\\t\\\\\\\"The class version number only needs to change under one specific circumstance.  That is when the first letters of the instance variables have stayed the same, but their meaning has changed.  A conversion method is needed, but this system does not know it.  \\\\n\\\\tIf this is true for class Foo, define classVersion in Foo class.  \\\\n\\\\tBeware of previous object fileouts already written after the change in meaning, but before bumping the version number.  They have the old (wrong) version number, say 2.  If this is true, your method must be able to test the data and successfully read files that say version 2 but are really 3.\\\\\\\"\\\\n\\\\n\\\\t^ answ! !\\\\n\\\\n!SmartRefStream methodsFor: 'class changed shape' stamp: 'tk 6/7/2001 13:02'!\\\\nwriteConversionMethod: sel class: newClass was: oldName fromInstVars: oldList to: newList\\\\n\\\\t\\\\\\\"The method convertToCurrentVersion:refStream: was not found in newClass.  Write a default conversion method for the author to modify.\\\\\\\"\\\\n\\\\n\\\\t| code newOthers oldOthers copied |\\\\n\\\\n\\\\tcode _ WriteStream on: (String new: 500).\\\\n\\\\tcode nextPutAll: 'convertToCurrentVersion: varDict refStream: smartRefStrm'; cr; tab.\\\\n\\\\tnewOthers _ newList asOrderedCollection \\\\\\\"copy\\\\\\\".\\\\n\\\\toldOthers _ oldList asOrderedCollection \\\\\\\"copy\\\\\\\".\\\\n\\\\tcopied _ OrderedCollection new.\\\\n\\\\tnewList do: [:instVar |\\\\n\\\\t\\\\t(oldList includes: instVar) ifTrue: [\\\\n\\\\t\\\\t\\\\tinstVar isInteger ifFalse: [copied add: instVar].\\\\n\\\\t\\\\t\\\\tnewOthers remove: instVar.\\\\n\\\\t\\\\t\\\\toldOthers remove: instVar]].\\\\n\\\\tcode nextPutAll: '\\\\\\\"These variables are automatically stored into the new instance '.\\\\n\\\\tcode nextPutAll: copied asArray printString; nextPut: $. .\\\\n\\\\tcode cr; tab; nextPutAll: 'This method is for additional changes.'; \\\\n\\\\t\\\\tnextPutAll: ' Use statements like (foo _ varDict at: ''foo'').\\\\\\\"'; cr; cr; tab.\\\\n\\\\t(newOthers size = 0) & (oldOthers size = 0) ifTrue: [^ self].\\\\n\\\\t\\\\t\\\\\\\"Instance variables are the same.  Only the order changed.  No conversion needed.\\\\\\\"\\\\n\\\\t(newOthers size > 0) ifTrue: [code nextPutAll: '\\\\\\\"New variables: ', newOthers asArray printString, '  If a non-nil value is needed, please assign it.\\\\\\\"\\\\\\\\' withCRs].\\\\n\\\\t(oldOthers size > 0) ifTrue: [code nextPutAll: '\\\\t\\\\\\\"These are going away ', oldOthers asArray printString, '.  Possibly store their info in some other variable?\\\\\\\"'].\\\\n\\\\n\\\\tcode cr; tab.\\\\n\\\\tcode nextPutAll: '^ super convertToCurrentVersion: varDict refStream: smartRefStrm'.\\\\n\\\\tnewClass compile: code contents classified: 'object fileIn'.\\\\n\\\\n\\\\n\\\\t\\\\\\\"If you write a conversion method beware that the class may need a version number change.  This only happens when two conversion methods in the same class have the same selector name.  (A) The inst var lists of the new and old versions intials as some older set of new and old inst var lists.  or (B) Twice in a row, the class needs a conversion method, but the inst vars stay the same the whole time.  (For an internal format change.)\\\\n\\\\tIf either is the case, fileouts already written with the old (wrong) version number, say 2.  Your method must be able to read files that say version 2 but are really 3, until you expunge the erroneous version 2 files from the universe.\\\\\\\"\\\\n\\\\n ! !\\\\n\\\\n!SmartRefStream methodsFor: 'class changed shape' stamp: 'nk 7/29/2004 10:10'!\\\\nwriteConversionMethodIn: newClass fromInstVars: oldList to: newList renamedFrom: oldName\\\\n\\\\t\\\\\\\"The method convertToCurrentVersion:refStream: was not found in newClass.  Write a default conversion method for the author to modify.  If method exists, append new info into the end.\\\\\\\"\\\\n\\\\n\\\\t| code newOthers oldOthers copied newCode |\\\\n\\\\n\\\\tnewOthers _ newList asOrderedCollection \\\\\\\"copy\\\\\\\".\\\\n\\\\toldOthers _ oldList asOrderedCollection \\\\\\\"copy\\\\\\\".\\\\n\\\\tcopied _ OrderedCollection new.\\\\n\\\\tnewList do: [:instVar |\\\\n\\\\t\\\\t(oldList includes: instVar) ifTrue: [\\\\n\\\\t\\\\t\\\\tinstVar isInteger ifFalse: [copied add: instVar].\\\\n\\\\t\\\\t\\\\tnewOthers remove: instVar.\\\\n\\\\t\\\\t\\\\toldOthers remove: instVar]].\\\\n\\\\tcode _ WriteStream on: (String new: 500).\\\\n\\\\tcode cr; cr; tab; nextPutAll: '\\\\\\\"From ', SystemVersion current version, ' [', SmalltalkImage current lastUpdateString;\\\\n\\\\t\\\\t\\\\tnextPutAll: '] on ', Date today printString, '\\\\\\\"'; cr.\\\\n\\\\tcode tab; nextPutAll: '\\\\\\\"These variables are automatically stored into the new instance: '.\\\\n\\\\tcode nextPutAll: copied asArray printString; nextPut: $.; cr.\\\\n\\\\tcode tab; nextPutAll: 'Test for this particular conversion.'; \\\\n\\\\t\\\\tnextPutAll: '  Get values using expressions like (varDict at: ''foo'').\\\\\\\"'; cr; cr.\\\\n\\\\t(newOthers size = 0) & (oldOthers size = 0) & (oldName == nil) ifTrue: [^ self].\\\\n\\\\t\\\\t\\\\\\\"Instance variables are the same.  Only the order changed.  No conversion needed.\\\\\\\"\\\\n\\\\t(newOthers size > 0) ifTrue: [\\\\n\\\\t\\\\tcode tab; nextPutAll: '\\\\\\\"New variables: ', newOthers asArray printString, \\\\n\\\\t\\\\t\\\\t'.  If a non-nil value is needed, please assign it.\\\\\\\"'; cr].\\\\n\\\\t(oldOthers size > 0) ifTrue: [\\\\n\\\\t\\\\tcode tab; nextPutAll: '\\\\\\\"These are going away ', oldOthers asArray printString, \\\\n\\\\t\\\\t\\\\t'.  Possibly store their info in some other variable?\\\\\\\"'; cr].\\\\n\\\\toldName ifNotNil: [\\\\n\\\\t\\\\tcode tab; nextPutAll: '\\\\\\\"Test for instances of class ', oldName, '.'; cr.\\\\n\\\\t\\\\tcode tab; nextPutAll: 'Instance vars with the same name have been moved here.\\\\\\\"'; cr.\\\\n\\\\t\\\\t].\\\\n\\\\tcode tab; nextPutAll: '\\\\\\\"Move your code above the ^ super...  Delete extra comments.\\\\\\\"'; cr. \\\\n\\\\n\\\\t(newClass includesSelector: #convertToCurrentVersion:refStream:) \\\\n\\\\t\\\\tifTrue: [\\\\\\\"append to old methods\\\\\\\"\\\\n\\\\t\\\\t\\\\tnewCode _ (newClass sourceCodeAt: #convertToCurrentVersion:refStream:),\\\\n\\\\t\\\\t\\\\t\\\\tcode contents]\\\\n\\\\t\\\\tifFalse: [\\\\\\\"new method\\\\\\\"\\\\n\\\\t\\\\t\\\\tnewCode _ 'convertToCurrentVersion: varDict refStream: smartRefStrm',\\\\n\\\\t\\\\t\\\\t\\\\tcode contents, \\\\n\\\\t\\\\t\\\\t\\\\t'\\\\t^ super convertToCurrentVersion: varDict refStream: smartRefStrm'].\\\\n\\\\tnewClass compile: newCode classified: 'object fileIn'.\\\\n\\\\n\\\\n\\\\t\\\\\\\"If you write a conversion method beware that the class may need a version number change.  This only happens when two conversion methods in the same class have the same selector name.  (A) The inst var lists of the new and old versions intials as some older set of new and old inst var lists.  or (B) Twice in a row, the class needs a conversion method, but the inst vars stay the same the whole time.  (For an internal format change.)\\\\n\\\\tIf either is the case, fileouts already written with the old (wrong) version number, say 2.  Your method must be able to read files that say version 2 but are really 3, until you expunge the erroneous version 2 files from the universe.\\\\\\\"\\\\n\\\\n ! !\\\\n\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'ar 4/10/2005 15:44'!\\\\nabstractStringx0\\\\n\\\\n\\\\t^ String! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'ar 7/29/2005 18:41'!\\\\nalansTextPlusMorphbosfcebbmsopssrsggshtt0\\\\n\\\\n\\\\t^ TextPlusMorph! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'jm 5/21/1998 06:44'!\\\\nbookPageMorphbosfcepcbbfgcc0\\\\n\\\\t\\\\\\\"BookPageMorph->PasteUpMorph. For reading in old BookMorphs.\\\\\\\"\\\\n\\\\n\\\\t^ PasteUpMorph\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'di 5/22/1998 15:03'!\\\\nclippingMorphbosfcep0\\\\n\\\\t^ PasteUpMorph! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'jm 5/21/1998 06:44'!\\\\nclippingMorphbosfcepc0\\\\n\\\\t\\\\\\\"ClippingMorph->PasteUpMorph. For reading in old BookMorphs.\\\\\\\"\\\\n\\\\n\\\\t^ PasteUpMorph! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'tk 11/3/2000 18:47'!\\\\ndropShadowMorphbosfces0\\\\n\\\\n\\\\t^ Morph ! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'jm 11/13/97 10:32'!\\\\ngradientFillbosfcepbbfgcc0\\\\n\\\\t^ GradientFillMorph! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'di 5/21/1998 19:24'!\\\\nlayoutMorphbosfcepbbochvimol0\\\\n\\\\t^ AlignmentMorph! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'tk 5/12/1998 16:18'!\\\\nlayoutMorphbosfcepcbbochvimol0\\\\n\\\\t^ AlignmentMorph! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'ar 10/26/2000 01:55'!\\\\nmorphicEventtcbks0\\\\n\\\\t^ MorphicEvent! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'ar 10/26/2000 00:48'!\\\\nmorphicSoundEventtcbkss0\\\\n\\\\t^ MorphicUnknownEvent! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'ar 4/12/2005 17:38'!\\\\nmultiStringx0\\\\n\\\\n\\\\t^ WideString! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'ar 4/12/2005 17:38'!\\\\nmultiSymbolx0\\\\n\\\\n\\\\t^ WideSymbol! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'ar 7/8/2001 17:11'!\\\\nmyMorphbosfce0\\\\n\\\\n\\\\treshaped at: #MyMorph put: #convertbosfce0:bosfce0:.\\\\n\\\\t\\\\t\\\\\\\"Be sure to define that conversion method in class Morph\\\\\\\"\\\\n\\\\t^ Morph! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'RAA 10/26/2000 09:43'!\\\\nnewMorphicEventts0\\\\n\\\\n\\\\t^ MorphicEvent! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'mir 7/12/2002 18:03'!\\\\nscrollControllermvslrrsmsms0\\\\n\\\\n\\\\t^ MouseMenuController! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'tk 1/14/1999 13:16'!\\\\ntransparentColorrcc0\\\\n\\\\t^ TranslucentColor! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'di 8/16/2000 16:37'!\\\\nworldMorphbosfcebbfgccpmcpbttloiairfidcuwhavcdsll0\\\\n\\\\t^ 'PutNewClassHere'  \\\\\\\" <-- Replace this by a class name (no string quotes)\\\\\\\"! !\\\\n\\\\n\\\\n!SmartRefStream methodsFor: 'import image segment' stamp: 'tk\\\\n\\\\n11/26/2004 05:53'!\\\\napplyConversionMethodsTo: objectIn className: className varMap: varMap\\\\n\\\\n\\\\t\\\\\\\"Modify the object's instance vars to have the proper values\\\\n\\\\nfor its new shape.  Mostly, fill in defaut values of new inst vars.\\\\n\\\\nCan substitute an object of a different class.  (Beware: if\\\\n\\\\nsubstituted, varMap will not be correct when the new object is asked\\\\n\\\\nto convert.)\\\\\\\"\\\\n\\\\n\\\\t| anObject prevObject |\\\\n\\\\n\\\\n\\\\n\\\\tself flag: #bobconv.\\\\n\\\\n\\\\n\\\\n\\\\tanObject _ objectIn.\\\\n\\\\n\\\\t[\\\\n\\\\n\\\\t\\\\tprevObject _ anObject.\\\\n\\\\n\\\\t\\\\tanObject _ anObject convertToCurrentVersion: varMap\\\\n\\\\nrefStream: self.\\\\n\\\\n\\\\t\\\\tprevObject == anObject\\\\n\\\\n\\\\t] whileFalse.\\\\n\\\\n\\\\t^anObject\\\\n\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'import image segment' stamp: 'RAA 12/20/2000 11:08'!\\\\ncheckFatalReshape: setOfClasses\\\\n\\\\t| suspects oldInstVars newInstVars bad className |\\\\n\\\\t\\\\\\\"Inform the user if any of these classes were reshaped.  A block has a method from the old system whose receiver is of this class.  The method's inst var references might be wrong.  OK if inst vars were only added.\\\\\\\"\\\\n\\\\n\\\\tself flag: #bobconv.\\\\t\\\\n\\\\n\\\\tsetOfClasses isEmpty ifTrue: [^ self].\\\\n\\\\tsuspects _ OrderedCollection new.\\\\n\\\\tsetOfClasses do: [:aClass |\\\\n\\\\t\\\\tclassName _ renamed keyAtValue: aClass name ifAbsent: [aClass name].\\\\n\\\\t\\\\toldInstVars _ (structures at: className ifAbsent: [#(0)]) allButFirst.\\\\t\\\\t\\\\\\\"should be there\\\\\\\"\\\\n\\\\t\\\\tnewInstVars _ aClass allInstVarNames.\\\\n\\\\t\\\\toldInstVars size > newInstVars size ifTrue: [bad _ true].\\\\n\\\\t\\\\toldInstVars size = newInstVars size ifTrue: [\\\\n\\\\t\\\\t\\\\tbad _ oldInstVars ~= newInstVars].\\\\n\\\\t\\\\toldInstVars size < newInstVars size ifTrue: [\\\\n\\\\t\\\\t\\\\tbad _ oldInstVars ~= (newInstVars copyFrom: 1 to: oldInstVars size)].\\\\n\\\\t\\\\tbad ifTrue: [suspects add: aClass]].\\\\n\\\\n\\\\tsuspects isEmpty ifFalse: [\\\\n\\\\t\\\\tself inform: ('Imported foreign methods will run on instances of:\\\\\\\\',\\\\n\\\\t\\\\t\\\\tsuspects asArray printString, \\\\n\\\\t\\\\t\\\\t'\\\\\\\\whose shape has changed.  Errors may occur.') withCRs].! !\\\\n\\\\n!SmartRefStream methodsFor: 'import image segment' stamp: 'RAA 12/20/2000 11:06'!\\\\nconvert1: misShapenInst to: goodClass allVarMaps: allVarMaps\\\\n\\\\t\\\\\\\"Go through the normal instance conversion process and return a modern object.\\\\\\\"\\\\n\\\\n\\\\t| className oldInstVars anObject varMap |\\\\n\\\\n\\\\tself flag: #bobconv.\\\\t\\\\n\\\\n\\\\tgoodClass isVariable ifTrue: [\\\\n\\\\t\\\\tgoodClass error: 'shape change for variable class not implemented yet'\\\\n\\\\t].\\\\n\\\\t(misShapenInst class name beginsWith: 'Fake37') ifFalse: [self error: 'why mapping?'].\\\\n\\\\tclassName _ (misShapenInst class name allButFirst: 6) asSymbol.\\\\n\\\\toldInstVars _ structures at: className.\\\\n\\\\tanObject _ goodClass basicNew.\\\\n\\\\n\\\\tvarMap _ Dictionary new.\\\\t\\\\\\\"later, indexed vars as (1 -> val) etc.\\\\\\\"\\\\n\\\\t2 to: oldInstVars size do: [:ind |\\\\n\\\\t\\\\tvarMap at: (oldInstVars at: ind) put: (misShapenInst instVarAt: ind-1)].\\\\n\\\\tvarMap at: #ClassName put: className.\\\\t\\\\\\\"original\\\\\\\"\\\\n\\\\tvarMap at: #NewClassName put: goodClass name.\\\\t\\\\\\\"new\\\\\\\"\\\\n\\\\tself storeInstVarsIn: anObject from: varMap. \\\\t\\\\\\\"ones with the same names\\\\\\\"\\\\n\\\\tallVarMaps at: misShapenInst put: varMap.\\\\n\\\\t^ anObject\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'import image segment' stamp: 'RAA 12/20/2000 17:15'!\\\\nconvert2: partiallyCorrectInst allVarMaps: allVarMaps\\\\n\\\\t\\\\\\\"Go through the normal instance conversion process and return a modern object.\\\\\\\"\\\\n\\\\n\\\\t| className varMap |\\\\n\\\\n\\\\tself flag: #bobconv.\\\\t\\\\n\\\\n\\\\tvarMap _ allVarMaps at: partiallyCorrectInst.\\\\n\\\\tclassName _ varMap at: #ClassName.\\\\t\\\\\\\"original\\\\\\\"\\\\n\\\\t^self applyConversionMethodsTo: partiallyCorrectInst className: className varMap: varMap.\\\\n\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'import image segment' stamp: 'ar 4/12/2005 18:06'!\\\\nmapClass: newClass origName: originalName\\\\n\\\\t\\\\\\\"See if instances changed shape.  If so, make a fake class for the old shape and return it.  Remember the original class name.\\\\\\\"\\\\n\\\\n\\\\t| newName oldInstVars fakeClass |\\\\n\\\\tnewClass isMeta ifTrue: [^ newClass].\\\\n\\\\tnewName _ newClass name.\\\\n\\\\t(steady includes: newClass) & (newName == originalName) ifTrue: [^ newClass].\\\\n\\\\t\\\\t\\\\\\\"instances in the segment have the right shape\\\\\\\"\\\\n\\\\toldInstVars _ structures at: originalName ifAbsent: [\\\\n\\\\t\\\\t\\\\tself error: 'class is not in structures list'].\\\\t\\\\\\\"Missing in object file\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Allow mapping from old to new string names\\\\\\\"\\\\n\\\\t(newName == #ByteString and:[originalName == #String]) ifTrue:[^newClass].\\\\n\\\\t(newName == #WideString and:[originalName == #MultiString]) ifTrue:[^newClass].\\\\n\\\\t(newName == #WideSymbol and:[originalName == #MultiSymbol]) ifTrue:[^newClass].\\\\n\\\\n\\\\tfakeClass _ Object subclass: ('Fake37', originalName) asSymbol\\\\n\\\\t\\\\tinstanceVariableNames: oldInstVars allButFirst\\\\n\\\\t\\\\tclassVariableNames: ''\\\\n\\\\t\\\\tpoolDictionaries: ''\\\\n\\\\t\\\\tcategory: 'Obsolete'.\\\\n\\\\tChangeSet current removeClassChanges: fakeClass name.\\\\t\\\\\\\"reduce clutter\\\\\\\"\\\\n\\\\t^ fakeClass\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'import image segment' stamp: 'RAA 12/20/2000 11:09'!\\\\nreshapedClassesIn: outPointers\\\\n\\\\t\\\\\\\"Look for classes in the outPointer array that have changed shape.  Make a fake class for the old shape.  Return a dictionary mapping Fake classes to Real classes.  Substitute fake classes for real ones in outPointers.\\\\\\\"\\\\n\\\\n\\\\t| mapFakeClassesToReal fakeCls originalName |\\\\n\\\\n\\\\tself flag: #bobconv.\\\\t\\\\n\\\\n\\\\n\\\\tmapFakeClassesToReal _ IdentityDictionary new.\\\\n\\\\toutPointers withIndexDo: [:outp :ind | \\\\n\\\\t\\\\toutp isBehavior ifTrue: [\\\\n\\\\t\\\\t\\\\toriginalName _ renamedConv at: ind ifAbsent: [outp name].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"in DiskProxy>>comeFullyUpOnReload: we saved the name at the index\\\\\\\"\\\\n\\\\t\\\\t\\\\tfakeCls _ self mapClass: outp origName: originalName.\\\\n\\\\t\\\\t\\\\tfakeCls == outp ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tmapFakeClassesToReal at: fakeCls put: outp.\\\\n\\\\t\\\\t\\\\t\\\\toutPointers at: ind put: fakeCls]]].\\\\n\\\\t^ mapFakeClassesToReal! !\\\\n\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 3/15/98 20:28'!\\\\nappendClassDefns\\\\n\\\\t\\\\\\\"Make this a fileOut format file.  For each UniClass mentioned, prepend its source code to the file.  Class name conflicts during reading will be resolved then.  Assume instVarInfo: has already been done.\\\\\\\"\\\\n\\\\nbyteStream ascii.\\\\nbyteStream position = 0 ifTrue: [\\\\n\\\\tbyteStream setFileTypeToObject.\\\\n\\\\t\\\\t\\\\\\\"Type and Creator not to be text, so can attach correctly to an email msg\\\\\\\"\\\\n\\\\tbyteStream header; timeStamp].\\\\n\\\\nbyteStream cr; nextPutAll: '!!ObjectScanner new initialize!!'; cr; cr.\\\\nself uniClasesDo: [:class | class\\\\n\\\\t\\\\tclass sharedPools size > 0 ifTrue:  \\\\\\\"This never happens\\\\\\\"\\\\n\\\\t\\\\t\\\\t[class shouldFileOutPools\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [class fileOutSharedPoolsOn: self]].\\\\n\\\\t\\\\tclass fileOutOn: byteStream moveSource: false toFile: 0].\\\\t\\\\n\\\\t\\\\t\\\\\\\"UniClasses are filed out normally, no special format.\\\\\\\"\\\\n\\\\n\\\\tbyteStream trailer.\\\\t\\\\\\\"Does nothing for normal files.  \\\\n\\\\t\\\\tHTML streams will have trouble with object data\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Append the object's raw data\\\\\\\"\\\\n\\\\tbyteStream cr; cr; nextPutAll: '!!self smartRefStream!!'.\\\\n\\\\tbyteStream binary.\\\\t\\\\t\\\\\\\"get ready for objects\\\\\\\"\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 6/19/2000 21:22'!\\\\ncheckCrLf\\\\n\\\\t| save isCrLf cc prev loneLf |\\\\n\\\\t\\\\\\\"Watch for a file that has had all of its Cr's converted to CrLf's.  Some unpacking programs like Stuffit 5.0 do this by default!!\\\\\\\"\\\\n\\\\n\\\\tsave _ byteStream position.\\\\n\\\\tisCrLf _ false.  loneLf _ false.\\\\n\\\\tcc _ 0.\\\\n\\\\t350 timesRepeat: [\\\\n\\\\t\\\\tprev _ cc.\\\\n\\\\t\\\\t(cc _ byteStream next) = 16r0A \\\\\\\"Lf\\\\\\\" ifTrue: [\\\\n\\\\t\\\\t\\\\tprev = 16r0D \\\\\\\"Cr\\\\\\\" ifTrue: [isCrLf _ true] ifFalse: [loneLf _ true]].\\\\n\\\\t\\\\t].\\\\n\\\\tisCrLf & (loneLf not) ifTrue: [\\\\n\\\\t\\\\tself inform: 'Carriage Returns in this file were converted to CrLfs \\\\nby an evil unpacking utility.  Please set the preferences in \\\\nStuffIt Expander to \\\\\\\"do not convert file formats\\\\\\\"'].\\\\n\\\\tbyteStream position: save.\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'mir 9/12/2002 10:59'!\\\\ninitKnownRenames\\\\n\\\\trenamed\\\\n\\\\t\\\\tat: #FlasherMorph put: #Flasher;\\\\n\\\\t\\\\tyourself! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'ar 4/10/2005 19:27'!\\\\ninitShapeDicts\\\\n\\\\t\\\\\\\"Initialize me. \\\\\\\"\\\\n\\\\n\\\\tself flag: #bobconv.\\\\t\\\\n\\\\n\\\\t\\\\\\\"These must stay constant.  When structures read in, then things can change.\\\\\\\"\\\\n\\\\tsteady _ {Array. Dictionary. Association. ByteString. SmallInteger} asSet.\\\\n\\\\n\\\\trenamed ifNil: [\\\\n\\\\t\\\\trenamed _ Dictionary new.  \\\\\\\"(old class name symbol -> new class name)\\\\\\\"\\\\n\\\\t\\\\trenamedConv _ Dictionary new \\\\\\\"(oldClassNameSymbol -> conversionSelectorInNewClass)\\\\\\\"\\\\n\\\\t].\\\\n\\\\tself initKnownRenames! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 3/7/2001 18:17'!\\\\ninstVarInfo: anObject\\\\n\\\\t\\\\\\\"Return the object to write on the outgoing file that contains the structure of each class we are about to write out.  Must be an Array whose first element is 'class structure'.  Its second element is a Dictionary of pairs of the form #Rectangle -> #(<classVersion> 'origin' 'corner').  \\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Make a pass through the objects, not writing, but recording the classes.  Construct a database of their inst vars and any version info (classVersion).\\\\\\\"\\\\n\\\\n\\\\t| dummy refs cls newSupers |\\\\n\\\\tstructures _ Dictionary new.\\\\n\\\\tsuperclasses _ Dictionary new.\\\\n\\\\tdummy _ ReferenceStream on: (DummyStream on: nil).\\\\n\\\\t\\\\t\\\\\\\"Write to a fake Stream, not a file\\\\\\\"\\\\n\\\\t\\\\\\\"Collect all objects\\\\\\\"\\\\n\\\\tdummy rootObject: anObject.\\\\t\\\\\\\"inform him about the root\\\\\\\"\\\\n\\\\tdummy nextPut: anObject.\\\\n\\\\trefs _ dummy references.\\\\n\\\\tobjCount _ refs size.\\\\t\\\\t\\\\\\\"for progress bar\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"Note that Dictionary must not change its implementation!!  If it does, how do we read this reading information?\\\\\\\"\\\\n\\\\t(refs includesKey: #AnImageSegment) \\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\tself uniClassInstVarsRefs: dummy.\\\\t\\\\\\\"catalog the extra objects in UniClass inst vars\\\\\\\"\\\\n\\\\t\\\\t\\\\trefs keysDo: [:each | \\\\n\\\\t\\\\t\\\\t\\\\tcls _ each class.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"cls isObsolete ifTrue: [self error: 'Trying to write ', cls name].\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t(cls class ~~ Metaclass) & (cls isObsolete not) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstructures at: cls name put: false]]]\\\\n\\\\t\\\\tifTrue: [self recordImageSegment: refs].\\\\n\\\\t\\\\\\\"Save work by only computing inst vars once for each class\\\\\\\"\\\\n\\\\tnewSupers _ Set new.\\\\n\\\\tstructures at: #Point put: false.\\\\t\\\\\\\"writeRectangle: does not put out class pointer\\\\\\\"\\\\n\\\\tstructures at: #Rectangle put: false.\\\\n\\\\tstructures at: #LargePositiveInteger put: false.\\\\t\\\\\\\"used in slow case of WordArray\\\\\\\"\\\\n\\\\tstructures keysDo: [:nm | \\\\n\\\\t\\\\tcls _ (nm endsWith: ' class') \\\\n\\\\t\\\\t\\\\tifFalse: [Smalltalk at: nm]\\\\n\\\\t\\\\t\\\\tifTrue: [(Smalltalk at: nm substrings first asSymbol) class].\\\\n\\\\t\\\\tcls allSuperclasses do: [:aSuper |\\\\n\\\\t\\\\t\\\\tstructures at: aSuper name ifAbsent: [newSupers add: aSuper name]]].\\\\n\\\\t\\\\t\\\\t\\\\\\\"Don't modify structures during iteration\\\\\\\"\\\\n\\\\tnewSupers do: [:nm | structures at: nm put: 3].\\\\t\\\\\\\"Get all superclasses into list\\\\\\\"\\\\n\\\\tstructures keysDo: [:nm | \\\\\\\"Nothing added to classes during loop\\\\\\\"\\\\n\\\\t\\\\tcls _ (nm endsWith: ' class') \\\\n\\\\t\\\\t\\\\tifFalse: [Smalltalk at: nm]\\\\n\\\\t\\\\t\\\\tifTrue: [(Smalltalk at: nm substrings first asSymbol) class].\\\\n\\\\t\\\\tstructures at: nm put: \\\\n\\\\t\\\\t\\\\t((Array with: cls classVersion), (cls allInstVarNames)).\\\\n\\\\t\\\\tsuperclasses at: nm ifAbsent: [\\\\n\\\\t\\\\t\\\\t\\\\tsuperclasses at: nm put: cls superclass name]].\\\\n\\\\t(refs includesKey: #AnImageSegment) \\\\n\\\\t\\\\tifTrue: [classInstVars _ #()]\\\\n\\\\t\\\\tifFalse: [self saveClassInstVars].\\\\t\\\\\\\"of UniClassses\\\\\\\"\\\\n\\\\t^ (Array with: 'class structure' with: structures with: 'superclasses' with: superclasses)! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'ar 4/10/2005 18:52'!\\\\nmapClass: incoming\\\\n\\\\t\\\\\\\"See if the old class named nm exists.  If so, return it.  If not, map it to a new class, and save the mapping in renamed.  \\\\\\\"\\\\n\\\\n\\\\t| cls oldVer sel nm |\\\\n\\\\n\\\\tself flag: #bobconv.\\\\t\\\\n\\\\n\\\\n\\\\tnm _ renamed at: incoming ifAbsent: [incoming].\\\\t\\\\\\\"allow pre-mapping around collisions\\\\\\\"\\\\n\\\\t(nm endsWith: ' class') \\\\n\\\\t\\\\tifFalse: [cls _ Smalltalk at: nm ifAbsent: [nil].\\\\n\\\\t\\\\t\\\\tcls ifNotNil: [^ cls]]  \\\\t\\\\\\\"Known class.  It will know how to translate the instance.\\\\\\\"\\\\n\\\\t\\\\tifTrue: [cls _ Smalltalk at: nm substrings first asSymbol ifAbsent: [nil].\\\\n\\\\t\\\\t\\\\tcls ifNotNil: [^ cls class]]. \\\\t\\\\\\\"Known class.  It will know how to translate the instance.\\\\\\\"\\\\n\\\\toldVer _ self versionSymbol: (structures at: nm).\\\\n\\\\tsel _ nm asString.\\\\n\\\\tsel at: 1 put: (sel at: 1) asLowercase.\\\\n\\\\tsel _ sel, oldVer.\\\\t\\\\\\\"i.e. #rectangleoc4\\\\\\\"\\\\n\\\\tSymbol hasInterned: sel ifTrue: [:symb | \\\\n\\\\t\\\\t(self class canUnderstand: sel asSymbol) ifTrue: [\\\\n\\\\t\\\\t\\\\treshaped ifNil: [reshaped _ Dictionary new].\\\\n\\\\t\\\\t\\\\tcls _ self perform: sel asSymbol]].\\\\t\\\\\\\"This class will take responsibility\\\\\\\"\\\\n\\\\tcls ifNil: [cls _ self writeClassRenameMethod: sel was: nm\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tfromInstVars: (structures at: nm).\\\\n\\\\t\\\\t\\\\t   cls isString ifTrue: [cls _ nil]].\\\\n\\\\tcls ifNotNil: [renamed at: nm put: cls name].\\\\n\\\\t^ cls\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 5/26/1998 15:09'!\\\\nmoreObjects\\\\n\\\\t\\\\\\\"Return true if there appears to be another object following this one on the file.\\\\\\\"\\\\n\\\\n\\\\t| byte |\\\\n\\\\tbyteStream atEnd ifTrue: [^ false].\\\\t\\\\\\\"off end of file\\\\\\\"\\\\n\\\\t(byte _ byteStream peek) ifNil: [^ false].\\\\t\\\\\\\"off end of file\\\\\\\"\\\\n\\\\tbyte = 33 \\\\\\\"$!! asciiValue\\\\\\\" ifTrue: [^ false].\\\\n\\\\tbyte = 0 ifTrue: [^ false].\\\\n\\\\t^ byte <= RefTypes size\\\\t\\\\t\\\\\\\"between 1 and 16\\\\\\\"! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 6/19/2000 17:06'!\\\\nnext\\\\n\\\\t\\\\\\\"Really write three objects: (version, class structure, object). But only when called from the outside.  \\\\\\\"\\\\n\\\\n\\\\t| version ss object |\\\\n\\\\t^ topCall == nil \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[topCall _ #marked.\\\\n\\\\t\\\\t\\\\tversion _ super next.\\\\n\\\\t\\\\t\\\\tversion class == SmallInteger ifFalse: [^ version].\\\\t\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"version number, else just a regular object, not in our format, \\\\\\\"\\\\n\\\\t\\\\t\\\\tself checkCrLf.\\\\n\\\\t\\\\t\\\\tss _ super next.\\\\n\\\\t\\\\t\\\\tss class == Array ifFalse: [^ ss].  \\\\\\\"just a regular object\\\\\\\"\\\\n\\\\t\\\\t\\\\t(ss at: 1) = 'class structure' ifFalse: [^ ss].\\\\n\\\\t\\\\t\\\\tstructures _ ss at: 2.\\\\n\\\\t\\\\t\\\\tsuperclasses _ (ss size > 3 and: [(ss at: 3) = 'superclasses']) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [ss at: 4]\\\\t\\\\t\\\\\\\"class name -> superclass name\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [Dictionary new].\\\\n\\\\t\\\\t\\\\t(self verifyStructure = 'conversion method needed') ifTrue: [^ nil].\\\\n\\\\t\\\\t\\\\tobject _ super next.\\\\t\\\\\\\"all the action here\\\\\\\"\\\\n\\\\t\\\\t\\\\tself restoreClassInstVars.\\\\t\\\\t\\\\\\\"for UniClasses. version 4\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\ttopCall _ nil.\\\\t\\\\\\\"reset it\\\\\\\"\\\\n\\\\t\\\\t\\\\tobject]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[super next]\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 3/5/2002 09:52'!\\\\nnextAndClose\\\\n\\\\t\\\\\\\"Speedy way to grab one object.  Only use when we are inside an object binary file.  If used for the start of a SmartRefStream mixed code-and-object file, tell the user and then do the right thing.\\\\\\\"\\\\n\\\\n\\\\t| obj |\\\\n\\\\tbyteStream peek = ReferenceStream versionCode \\\\\\\"4\\\\\\\" ifFalse: [\\\\n\\\\t\\\\t\\\\\\\"OK it is a fileIn afterall...\\\\\\\"\\\\n\\\\t\\\\tself inform: 'Should be using fileInObjectAndCode'.\\\\n\\\\t\\\\tbyteStream ascii.\\\\n\\\\t\\\\tbyteStream fileIn.\\\\n\\\\t\\\\tobj _ SmartRefStream scannedObject.\\\\n\\\\t\\\\tSmartRefStream scannedObject: nil.\\\\n\\\\t\\\\t^ obj].\\\\n\\\\n\\\\tobj _ self next.\\\\n\\\\tself close.\\\\n\\\\t^ obj! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'md 2/24/2006 19:52'!\\\\nnextPut: anObject\\\\n\\\\t\\\\\\\"Really write three objects: (version, class structure, object).  But only when called from the outside.  If any instance-specific classes are present, prepend their source code.  byteStream will be in fileOut format.\\\\n\\\\tYou can see an analysis of which objects are written out by doing: \\\\n\\\\t(SmartRefStream statsOfSubObjects: anObject)\\\\n\\\\t(SmartRefStream tallyOfSubObjects: anObject)\\\\n\\\\t(SmartRefStream subObjects: anObject ofClass: aClass)\\\\\\\"\\\\n\\\\n| info |\\\\ntopCall == nil \\\\n\\\\tifTrue:\\\\n\\\\t\\\\t[topCall _ anObject.\\\\n\\\\t\\\\t'Please wait while objects are counted' \\\\n\\\\t\\\\t\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\t\\\\tfrom: 0 to: 10\\\\n\\\\t\\\\t\\\\tduring: [:bar | info _ self instVarInfo: anObject].\\\\n\\\\t\\\\tself appendClassDefns.\\\\t\\\\\\\"For instance-specific classes\\\\\\\"\\\\n\\\\t\\\\t'Writing an object file' displayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\t\\\\tfrom: 0 to: objCount*4\\\\t\\\\\\\"estimate\\\\\\\"\\\\n\\\\t\\\\t\\\\tduring: [:bar |\\\\n\\\\t\\\\t\\\\t\\\\tobjCount _ 0.\\\\n\\\\t\\\\t\\\\t\\\\tprogressBar _ bar.\\\\n\\\\t\\\\t\\\\t\\\\tself setStream: byteStream reading: false.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"set basePos, but keep any class renames\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tsuper nextPut: ReferenceStream versionCode.\\\\n\\\\t\\\\t\\\\t\\\\tsuper nextPut: info.\\\\n\\\\t\\\\t\\\\t\\\\tsuper nextPut: anObject.\\\\t\\\\t\\\\\\\"<- the real writing\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tclassInstVars size > 0 ifTrue: [super nextPut: classInstVars]].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Note: the terminator, $!!, is not doubled inside object data\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"references is an IDict of every object that got written\\\\\\\"\\\\n\\\\t\\\\tbyteStream ascii.\\\\n\\\\t\\\\tbyteStream nextPutAll: '!!'; cr; cr.\\\\n\\\\t\\\\tbyteStream padToEndWith: $ .\\\\t\\\\\\\"really want to truncate file, but can't\\\\\\\"\\\\n\\\\t\\\\ttopCall _ progressBar _ nil]\\\\t\\\\\\\"reset it\\\\\\\"\\\\n\\\\tifFalse:\\\\n\\\\t\\\\t[super nextPut: anObject.\\\\n\\\\t\\\\tprogressBar ifNotNil: [progressBar value: (objCount _ objCount + 1)]].\\\\n\\\\t\\\\t\\\\\\\"return the argument - added by kwl\\\\\\\"\\\\n\\\\t^ anObject\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 6/23/1998 11:00'!\\\\nnextPutObjOnly: anObject\\\\n\\\\t\\\\\\\"Really write three objects: (version, class structure, object).  But only when called from the outside.  Not in fileOut format.  No class definitions will be written for instance-specific classes.  Error if find one.  (Use nextPut: instead)\\\\\\\"\\\\n\\\\n\\\\t| info |\\\\n\\\\ttopCall == nil \\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[topCall _ anObject.\\\\n\\\\t\\\\t\\\\tsuper nextPut: ReferenceStream versionCode.\\\\n\\\\t\\\\t\\\\t'Please wait while objects are counted' displayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\t\\\\t\\\\tfrom: 0 to: 10\\\\n\\\\t\\\\t\\\\t\\\\tduring: [:bar |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tinfo _ self instVarInfo: anObject].\\\\n\\\\t\\\\t\\\\tself uniClasesDo: [:cls | cls error: 'Class defn not written out.  Proceed?'].\\\\n\\\\t\\\\t\\\\t'Writing an object file' displayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\t\\\\t\\\\tfrom: 0 to: objCount*4\\\\t\\\\\\\"estimate\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tduring: [:bar |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tobjCount _ 0.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tprogressBar _ bar.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsuper nextPut: info.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsuper nextPut: anObject.\\\\t\\\\\\\"<- the real writing\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Class inst vars not written here!!\\\\\\\"].\\\\n\\\\t\\\\t\\\\t\\\\\\\"references is an IDict of every object that got written\\\\n\\\\t\\\\t\\\\t(in case you want to take statistics)\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\\\\"Transcript cr; show: structures keys printString.\\\\\\\"\\\\t\\\\t\\\\\\\"debug\\\\\\\"\\\\n\\\\t\\\\t\\\\ttopCall _ progressBar _ nil]\\\\t\\\\\\\"reset it\\\\\\\"\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[super nextPut: anObject.\\\\n\\\\t\\\\t\\\\tprogressBar ifNotNil: [progressBar value: (objCount _ objCount + 1)]].! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 6/23/1998 11:13'!\\\\nnoHeader\\\\n\\\\t\\\\\\\"Signal that we've already dealt with the version and structure array, and are now reading objects.\\\\\\\"\\\\n\\\\n\\\\ttopCall _ #marked.\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 11/3/2000 17:59'!\\\\nreadInstance\\\\n\\\\t\\\\\\\"Read the contents of an arbitrary instance.\\\\n\\\\t ASSUMES: readDataFrom:size: sends me beginReference: after it\\\\n\\\\t   instantiates the new object but before reading nested objects.\\\\n\\\\t NOTE: We must restore the current reference position after\\\\n\\\\t   recursive calls to next.\\\\nThree cases for files from older versions of the system:\\\\n1) Class has not changed shape, read it straight.\\\\n2) Class has changed instance variables (or needs fixup).  Call a particular method to do it.\\\\n3) There is a new class instead.  Find it, call a particular method to read.\\\\n\\\\tAll classes used to construct the structures dictionary *itself* need to be in 'steady' and they must not change!!  See setStream:\\\\\\\"\\\\n\\\\t| instSize className refPosn |\\\\n\\\\n\\\\tinstSize _ (byteStream nextNumber: 4) - 1.\\\\n\\\\trefPosn _ self getCurrentReference.\\\\n\\\\tclassName _ self next asSymbol.\\\\n\\\\t^ self readInstanceSize: instSize clsname: className refPosn: refPosn\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'yo 1/21/2006 19:27'!\\\\nreadInstanceSize: instSize clsname: className refPosn: refPosn\\\\n\\\\t\\\\\\\"The common code to read the contents of an arbitrary instance.\\\\n\\\\t ASSUMES: readDataFrom:size: sends me beginReference: after it\\\\n\\\\t   instantiates the new object but before reading nested objects.\\\\n\\\\t NOTE: We must restore the current reference position after\\\\n\\\\t   recursive calls to next.\\\\nThree cases for files from older versions of the system:\\\\n1) Class has not changed shape, read it straight.\\\\n2) Class has changed instance variables (or needs fixup).  Call a particular method to do it.\\\\n3) There is a new class instead.  Find it, call a particular method to read.\\\\n\\\\tAll classes used to construct the structures dictionary *itself* need to be in 'steady' and they must not change!!  See setStream:\\\\\\\"\\\\n\\\\t| anObject newName newClass dict oldInstVars isMultiSymbol |\\\\n\\\\n\\\\tself flag: #bobconv.\\\\t\\\\n\\\\n\\\\tself setCurrentReference: refPosn.  \\\\\\\"remember pos before readDataFrom:size:\\\\\\\"\\\\n\\\\tnewName _ renamed at: className ifAbsent: [className].\\\\n\\\\tisMultiSymbol _ newName = #MultiSymbol or: [newName = #WideSymbol].\\\\n\\\\t\\\\\\\"isMultiSymbol ifTrue: [self halt].\\\\\\\"\\\\n\\\\tnewClass _ Smalltalk at: newName asSymbol.\\\\n\\\\t(steady includes: newClass) & (newName == className) ifTrue: [\\\\n\\\\t \\\\tanObject _ newClass isVariable \\\\\\\"Create it here\\\\\\\"\\\\n\\\\t\\\\t\\\\tifFalse: [newClass basicNew]\\\\n\\\\t\\\\t\\\\tifTrue: [newClass basicNew: instSize - (newClass instSize)].\\\\n\\\\n\\\\t\\\\tanObject _ anObject readDataFrom: self size: instSize.\\\\n\\\\t\\\\tself setCurrentReference: refPosn.  \\\\\\\"before returning to next\\\\\\\"\\\\n\\\\t\\\\tisMultiSymbol ifTrue: [^ Symbol intern: anObject asString].\\\\n\\\\t\\\\t^ anObject].\\\\n\\\\toldInstVars _ structures at: className ifAbsent: [\\\\n\\\\t\\\\t\\\\tself error: 'class is not in structures list'].\\\\t\\\\\\\"Missing in object file\\\\\\\"\\\\n\\\\tanObject _ newClass createFrom: self size: instSize version: oldInstVars.\\\\n\\\\t\\\\t\\\\\\\"only create the instance\\\\\\\"\\\\n\\\\tself beginReference: anObject.\\\\n\\\\tdict _ self catalogValues: oldInstVars size: instSize.\\\\n\\\\t\\\\t\\\\\\\"indexed vars as (1 -> val) etc.\\\\\\\"\\\\n\\\\tdict at: #ClassName put: className.\\\\t\\\\\\\"so conversion method can know it\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Give each superclass a chance to make its changes\\\\\\\"\\\\n\\\\tself storeInstVarsIn: anObject from: dict.\\\\t\\\\\\\"ones with the same names\\\\\\\"\\\\n\\\\n\\\\tanObject _ self applyConversionMethodsTo: anObject className: className varMap: dict.\\\\n\\\\n\\\\tself setCurrentReference: refPosn.  \\\\\\\"before returning to next\\\\\\\"\\\\n\\\\tisMultiSymbol ifTrue: [^ Symbol intern: anObject asString].\\\\n\\\\t^ anObject! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 11/3/2000 18:04'!\\\\nreadShortInst\\\\n\\\\t\\\\\\\"Instance has just one byte of size.  Class symbol is encoded in two bytes of file position.  See readInstance.\\\\\\\"\\\\n\\\\t| instSize className refPosn |\\\\n\\\\n\\\\tinstSize _ (byteStream next) - 1.\\\\t\\\\\\\"one byte of size\\\\\\\"\\\\n\\\\trefPosn _ self getCurrentReference.\\\\n\\\\tclassName _ self readShortRef.\\\\t\\\\\\\"class symbol in two bytes of file pos\\\\\\\"\\\\n\\\\t^ self readInstanceSize: instSize clsname: className refPosn: refPosn\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'ar 7/25/2005 21:30'!\\\\nreadWordLike\\\\n\\\\t| refPosn newClass anObject className |\\\\n\\\\t\\\\\\\"Can be used by any class that is bits and not bytes (WordArray, Bitmap, SoundBuffer, etc).\\\\\\\"\\\\n\\\\n\\\\trefPosn _ self getCurrentReference.\\\\n\\\\tclassName _ self next asSymbol.\\\\n\\\\tclassName _ renamed at: className ifAbsent: [className].\\\\n\\\\tnewClass _ Smalltalk at: className.\\\\n\\\\tanObject _ newClass newFromStream: byteStream.\\\\n\\\\t\\\\\\\"Size is number of long words.\\\\\\\"\\\\n\\\\tself setCurrentReference: refPosn.  \\\\\\\"before returning to next\\\\\\\"\\\\n\\\\t^ anObject\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 10/10/2000 13:36'!\\\\nrecordImageSegment: refs\\\\n\\\\t\\\\\\\"Besides the objects being written out, record the structure of instances inside the image segment we are writing out.\\\\\\\"\\\\n\\\\n\\\\t| cls list |\\\\n\\\\t\\\\\\\"Do not record Player class inst vars.  They are in the segement.\\\\\\\"\\\\n\\\\trefs keysDo: [:each | \\\\n\\\\t\\\\tcls _ each class.\\\\n\\\\t\\\\tcls isObsolete ifTrue: [self error: 'Trying to write ', cls name].\\\\n\\\\t\\\\tcls class == Metaclass \\\\n\\\\t\\\\t\\\\tifFalse: [structures at: cls name put: false.\\\\n\\\\t\\\\t\\\\t\\\\t(each isKindOf: ImageSegment) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\teach outPointers do: [:out |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(out isKindOf: Class) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstructures at: out theNonMetaClass name put: false].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tout class == DiskProxy ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tout simpleGlobalOrNil ifNotNil: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(out simpleGlobalOrNil isKindOf: Class) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstructures at: out simpleGlobalOrNil name put: false]]]].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"each arrayOfRoots do: [:rr | (rr isKindOf: Class) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstructures at: rr theNonMetaClass name put: false]].\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t \\\\t\\\\\\\"all classes in roots are local to seg\\\\\\\"]]].\\\\n\\\\tlist _ refs at: #BlockReceiverClasses ifAbsent: [^ self].\\\\n\\\\tlist do: [:meta | structures at: meta name put: false].\\\\n\\\\t\\\\t\\\\\\\"Just the metaclasses whose instances are block receivers.  Otherwise metaclasses are not allowed.\\\\\\\"! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'RAA 12/20/2000 11:08'!\\\\nrenamed\\\\n\\\\n\\\\tself flag: #bobconv.\\\\t\\\\n\\\\n\\\\n\\\\t^ renamed! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'RAA 12/20/2000 11:10'!\\\\nrenamedConv\\\\n\\\\tself flag: #bobconv.\\\\t\\\\n\\\\n\\\\n\\\\t^ renamedConv! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'RAA 12/22/2000 15:14'!\\\\nrestoreClassInstVars\\\\n\\\\t\\\\\\\"Install the values of the class instance variables of UniClasses\\\\n(i.e. scripts slotInfo).  classInstVars is ((#Player25 scripts slotInfo)\\\\n...).  Thank you Mark Wai for the bug fix.\\\\\\\"\\\\n\\\\n\\\\t| normal aName newName newCls trans rList start |\\\\n\\\\n\\\\tself flag: #bobconv.\\\\t\\\\n\\\\n\\\\n\\\\tself moreObjects ifFalse: [^ self]. \\\\t\\\\\\\"are no UniClasses with class inst vars\\\\\\\"\\\\n\\\\tclassInstVars _ super next.\\\\t\\\\\\\"Array of arrays\\\\\\\"\\\\n\\\\tnormal _ Object class instSize.\\\\t\\\\\\\"might give trouble if Player class superclass changes size\\\\\\\"\\\\n\\\\t(structures at: #Player ifAbsent: [#()]) = #(0 'dependents' 'costume') ifTrue:\\\\n\\\\t\\\\t[trans _ 1].\\\\t\\\\\\\"now (0 costume costumes).  Do the conversion of Player class\\\\n\\\\t\\\\t\\\\tinst vars in Update 509.\\\\\\\"\\\\n\\\\tclassInstVars do: [:list |\\\\n\\\\t\\\\taName _ (list at: 1) asSymbol.\\\\n\\\\t\\\\trList _ list.\\\\n\\\\t\\\\tnewName _ renamed at: aName ifAbsent: [aName].\\\\n\\\\t\\\\tnewCls _ Smalltalk at: newName\\\\n\\\\t\\\\t\\\\t\\\\tifAbsent: [self error: 'UniClass definition missing'].\\\\n\\\\t\\\\t(\\\\\\\"old conversion\\\\\\\" trans == 1 and: [newCls inheritsFrom: Player]) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\\\\"remove costumeDictionary from Player class inst vars\\\\\\\"\\\\n\\\\t\\\\t\\\\trList _ rList asOrderedCollection.\\\\n\\\\t\\\\t\\\\trList removeAt: 4].\\\\t\\\\\\\"costumeDictionary's value\\\\\\\"\\\\n\\\\t\\\\tstart _ list second = 'Update to read classPool' ifTrue: [4] ifFalse: [2].\\\\n\\\\t\\\\tnewCls class instSize = (normal + (rList size) - start + 1) ifFalse:\\\\n\\\\t\\\\t\\\\t[self error: 'UniClass superclass class has changed size'].\\\\n\\\\t\\\\t\\\\t\\\\\\\"Need to install a conversion method mechanism\\\\\\\"\\\\n\\\\t\\\\tstart = 4 ifTrue: [newCls instVarAt: normal - 1 \\\\\\\"classPool\\\\\\\" put: (list at: 3)].\\\\n\\\\t\\\\tstart to: rList size do: [:ii |\\\\n\\\\t\\\\t\\\\tnewCls instVarAt: normal + ii - start + 1 put: (rList at: ii)]].\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 3/6/2000 18:17'!\\\\nsaveClassInstVars\\\\n\\\\t\\\\\\\"Install the values of the instance variables of UniClasses.\\\\nclassInstVars is an array of arrays (#Player3 (Player3 class's inst var\\\\nscripts) (Player3 class's inst var slotInfo) ...) \\\\\\\"\\\\n\\\\n\\\\t| normal mySize list clsPoolIndex |\\\\n\\\\tclassInstVars _ OrderedCollection new: 100.\\\\n\\\\tnormal _ Object class instSize.\\\\n\\\\tclsPoolIndex _ Object class allInstVarNames indexOf: 'classPool'.\\\\n\\\\tself uniClasesDo: [:aUniClass |\\\\n\\\\t\\\\tlist _ OrderedCollection new.\\\\n\\\\t\\\\tmySize _ aUniClass class instSize.\\\\n\\\\t\\\\tmySize = normal ifFalse:\\\\n\\\\t\\\\t\\\\t[list add: aUniClass name.\\\\t\\\\\\\"a symbol\\\\\\\"\\\\n\\\\t\\\\t\\\\tlist add: 'Update to read classPool'.\\\\t\\\\\\\"new\\\\nconvention for saving the classPool\\\\\\\"\\\\n\\\\t\\\\t\\\\tlist add: (aUniClass instVarAt: clsPoolIndex)\\\\n\\\\\\\"classPool\\\\\\\".\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"write actual value of nil\\\\ninstead of Dictionary()\\\\\\\"\\\\n\\\\t\\\\t\\\\tnormal + 1 to: mySize do: [:ii |\\\\n\\\\t\\\\t\\\\t\\\\tlist addLast: (aUniClass instVarAt: ii)].\\\\n\\\\t\\\\t\\\\tclassInstVars add: list asArray]].\\\\n\\\\tclassInstVars _ classInstVars asArray.\\\\n\\\\t! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 8/18/1998 09:02'!\\\\nscanFrom: aByteStream\\\\n\\\\t\\\\\\\"During a code fileIn, we need to read in an object, and stash it in ScannedObject.  \\\\\\\"\\\\n\\\\n\\\\tself setStream: aByteStream reading: true.\\\\n\\\\tScannedObject _ self next.\\\\n\\\\tbyteStream ascii.\\\\n\\\\tbyteStream next == $!! ifFalse: [\\\\n\\\\t\\\\tbyteStream close.\\\\n\\\\t\\\\tself error: 'Object did not end correctly']. \\\\n\\\\t\\\\\\\"caller will close the byteStream\\\\\\\"\\\\n\\\\t\\\\\\\"HandMorph.readMorphFile will retrieve the ScannedObject\\\\\\\"! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'RAA 12/20/2000 16:57'!\\\\nsetStream: aStream\\\\n\\\\t\\\\\\\"Initialize me. \\\\\\\"\\\\n\\\\n\\\\tself flag: #bobconv.\\\\t\\\\n\\\\n\\\\tsuper setStream: aStream.\\\\n\\\\tself initShapeDicts.\\\\n\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'RAA 12/20/2000 16:57'!\\\\nsetStream: aStream reading: isReading\\\\n\\\\t\\\\\\\"Initialize me. \\\\\\\"\\\\n\\\\n\\\\tself flag: #bobconv.\\\\t\\\\n\\\\n\\\\tsuper setStream: aStream reading: isReading.\\\\n\\\\tisReading ifFalse: [^ false].\\\\n\\\\tself initShapeDicts.\\\\n\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write'!\\\\nstructures\\\\n\\\\t^ structures! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 9/28/97 11:17'!\\\\nsuperclasses\\\\n\\\\t^superclasses! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 3/6/2000 17:15'!\\\\nuniClasesDo: aBlock\\\\n\\\\t\\\\\\\"Examine structures and execute the block with each instance-specific class\\\\\\\"\\\\n\\\\n\\\\t| cls |\\\\n\\\\tstructures keysDo: [:clsName | \\\\n\\\\t\\\\t(clsName endsWith: ' class') ifFalse: [\\\\n\\\\t\\\\t\\\\t(cls _ Smalltalk at: clsName) isSystemDefined ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\taBlock value: cls]]]! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 1/18/2001 15:54'!\\\\nuniClassInstVarsRefs: dummy\\\\n\\\\t\\\\\\\"If some of the objects seen so far are instances UniClasses, check the UniClasses for extra class inst vars, and send them to the steam also.  The new objects get added to (dummy references), where they will be noticed by the caller.  They will wind up in the structures array and will be written on the disk by class.\\\\n\\\\tReturn all classes seen.\\\\\\\" \\\\n| uniClasses normal more aUniClass mySize allClasses |\\\\n\\\\n\\\\\\\"Note: Any classes used in the structure of classInstVars must be written out also!!\\\\\\\"\\\\nuniClasses _ Set new.\\\\nallClasses _ IdentitySet new.\\\\nnormal _ Object class instSize.\\\\nmore _ true.\\\\n[more] whileTrue: [\\\\n\\\\tmore _ false.\\\\n\\\\tdummy references keysDo: [:each | \\\\\\\"any faster way to do this?\\\\\\\"\\\\n\\\\t\\\\t(aUniClass _ each class) isSystemDefined ifFalse: [\\\\n\\\\t\\\\t\\\\t(uniClasses includes: aUniClass name) ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tmySize _ aUniClass class instSize.\\\\n\\\\t\\\\t\\\\t\\\\tnormal+1 to: mySize do: [:ii | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmore _ true.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdummy nextPut: (aUniClass instVarAt: ii)].\\\\n\\\\t\\\\t\\\\t\\\\tuniClasses add: aUniClass name]].\\\\n\\\\t\\\\teach class class isMeta ifFalse: [\\\\\\\"it is a class\\\\\\\" allClasses add: each]]].\\\\n\\\\\\\"References dictionary is modified as the loop proceeds, but we will catch any we missed on the next cycle.\\\\\\\"\\\\n\\\\n^ allClasses! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'ar 4/10/2005 18:52'!\\\\nverifyStructure\\\\n\\\\t\\\\\\\"Compare the incoming inst var name lists with the existing classes.  Prepare tables that will help to restructure those who need it (renamed, reshaped, steady).    If all superclasses are recorded in the file, only compare inst vars of this class, not of superclasses.  They will get their turn.  \\\\\\\"\\\\n\\\\n\\\\n\\\\t| newClass newList oldList converting |\\\\n\\\\n\\\\tself flag: #bobconv.\\\\t\\\\n\\\\n\\\\tconverting _ OrderedCollection new.\\\\n\\\\tstructures keysDo: [:nm \\\\\\\"an old className (symbol)\\\\\\\" |\\\\n\\\\t\\\\t\\\\\\\"For missing classes, there needs to be a method in SmartRefStream like \\\\n\\\\t\\\\t\\\\t#rectangleoc2 that returns the new class.\\\\\\\"\\\\n\\\\t\\\\tnewClass _ self mapClass: nm.\\\\t   \\\\\\\"does (renamed at: nm put: newClass name)\\\\\\\"\\\\n\\\\t\\\\tnewClass isString ifTrue: [^ newClass].  \\\\\\\"error, fileIn needed\\\\\\\"\\\\n\\\\t\\\\tnewList _ (Array with: newClass classVersion), (newClass allInstVarNames).\\\\n\\\\t\\\\toldList _ structures at: nm.\\\\n\\\\t\\\\tnewList = oldList \\\\n\\\\t\\\\t\\\\tifTrue: [steady add: newClass]  \\\\\\\"read it in as written\\\\\\\"\\\\n\\\\t\\\\t\\\\tifFalse: [converting add: newClass name]\\\\n\\\\t].\\\\n\\\\tfalse & converting isEmpty not ifTrue: [\\\\\\\"debug\\\\\\\" \\\\n\\\\t\\\\t\\\\tself inform: 'These classes are being converted from existing methods:\\\\\\\\' withCRs,\\\\n\\\\t\\\\t\\\\t\\\\tconverting asArray printString].\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 1/7/97'!\\\\nversionSymbol: instVarList\\\\n\\\\t\\\\\\\"Create the symbolic code (like a version number) for this class in some older version.  First initials of all the inst vars, followed by the class version number.  Returns a string, caller makes it into a compound selector.  \\\\\\\"\\\\n\\\\n\\\\t| str |\\\\n\\\\tstr _ instVarList size = 1 ifFalse: [''] ifTrue: ['x'].\\\\t\\\\t\\\\\\\"at least one letter\\\\\\\"\\\\n\\\\t2 to: instVarList size do: [:ind |\\\\n\\\\t\\\\tstr _ str, (instVarList at: ind) first asString].\\\\n\\\\tstr _ str, instVarList first printString.\\\\t\\\\\\\"the number\\\\\\\"\\\\n\\\\t^ str\\\\n\\\\n\\\\\\\" | list | list _ (Array with: Paragraph classVersion), (Paragraph alistInstVarNames).\\\\n(SmartRefStream  on: (DummyStream on: nil)) versionSymbol: list\\\\n\\\\\\\"! !\\\\n\\\\n\\\\n!SmartRefStream methodsFor: '*starSqueak-*starSqueak' stamp: 'RAA 5/16/2001 18:35'!\\\\nstarLogoAntColonybosfcedppplppppttwssdlgrstta0\\\\n\\\\n\\\\t^ StarSqueakAntColony! !\\\\n\\\\n!SmartRefStream methodsFor: '*starSqueak-*starSqueak' stamp: 'RAA 5/16/2001 18:31'!\\\\nstarLogoMorphbosfcedppplppppttwssdlgrstt0\\\\n\\\\n\\\\t^ StarSqueakMorph! !\\\\n\\\\n!SmartRefStream methodsFor: '*starSqueak-*starSqueak' stamp: 'RAA 5/16/2001 18:32'!\\\\nstarLogoTreesbosfcedppplppppttwssdlgrsttdt0\\\\n\\\\n\\\\t^ StarSqueakTrees! !\\\\n\\\\n!SmartRefStream methodsFor: '*starSqueak-*starSqueak' stamp: 'RAA 5/16/2001 18:32'!\\\\nstarLogoTurtlewwxywwhcpn0\\\\n\\\\n\\\\t^ StarSqueakTurtle! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSmartRefStream class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SmartRefStream class methodsFor: 'accessing' stamp: 'tk 5/20/97'!\\\\nscannedObject\\\\n\\\\t\\\\\\\"The most recently read in object.  Watch out for read-in that is interrupted and resumed.  May want to make this a dictionary?  \\\\\\\"\\\\n\\\\n\\\\t^ ScannedObject! !\\\\n\\\\n!SmartRefStream class methodsFor: 'accessing' stamp: 'tk 5/20/97'!\\\\nscannedObject: objOrNil\\\\n\\\\t\\\\\\\"Used to free up the last object stashed here.  \\\\\\\"\\\\n\\\\n\\\\tScannedObject _ objOrNil! !\\\\n\\\\n!SmartRefStream class methodsFor: 'accessing' stamp: 'tk 3/11/98 09:45'!\\\\nsubObjects: anObject ofClass: aClass\\\\n\\\\t\\\\\\\"Return a collection of all instances of aClass that would be written out with anObject.  Does not actually write on the disk.  Inspect the result and ask for 'references to this object'.\\\\\\\"\\\\n\\\\n\\\\t| dummy coll |\\\\n\\\\tdummy _ ReferenceStream on: (DummyStream on: nil).\\\\n\\\\t\\\\t\\\\\\\"Write to a fake Stream, not a file\\\\\\\"\\\\n\\\\t\\\\\\\"Collect all objects\\\\\\\"\\\\n\\\\tdummy rootObject: anObject.\\\\t\\\\\\\"inform him about the root\\\\\\\"\\\\n\\\\tdummy nextPut: anObject.\\\\n\\\\tcoll _ OrderedCollection new.\\\\n\\\\tdummy references keysDo: [:each |\\\\n\\\\t\\\\teach class == aClass ifTrue: [coll add: each]].\\\\n\\\\t^ coll! !\\\\n\\\\n\\\\n!SmartRefStream class methodsFor: 'initialize-release' stamp: 'dvf 8/23/2003 12:18'!\\\\ncleanUpCategories\\\\n\\\\t| list valid removed newList newVers |\\\\n\\\\t\\\\\\\"Look for all conversion methods that can't be used any longer.  Delete them.\\\\\\\"\\\\n\\\\t\\\\\\\" SmartRefStream cleanUpCategories \\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Two part selectors that begin with convert and end with a digit.\\\\\\\"\\\\n\\\\t\\\\\\\"convertasossfe0: varDict asossfeu0: smartRefStrm\\\\\\\"\\\\n\\\\tlist _ Symbol selectorsContaining: 'convert'.\\\\n\\\\tlist _ list select: [:symb | (symb beginsWith: 'convert') & (symb allButLast last isDigit)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [(symb numArgs = 2)]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [false]].\\\\n\\\\tvalid _ 0.  removed _ 0.\\\\n\\\\tlist do: [:symb |\\\\n\\\\t\\\\t(self systemNavigation allClassesImplementing: symb) do: [:newClass |\\\\n\\\\t\\\\t\\\\tnewList _ (Array with: newClass classVersion), (newClass allInstVarNames).\\\\n\\\\t\\\\t\\\\tnewVers _ self new versionSymbol: newList.\\\\n\\\\t\\\\t\\\\t(symb endsWith: (':',newVers,':')) \\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"method is useless because can't convert to current shape\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnewClass removeSelector: symb.\\\\t\\\\\\\"get rid of it\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tremoved _ removed + 1]\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [valid _ valid + 1]]].\\\\n\\\\tTranscript cr; show: 'Removed: '; print: removed; \\\\n\\\\t\\\\tshow: '\\\\t\\\\tKept: '; print: valid; show: ' '.! !\\\\n\\\\n\\\\n!SmartRefStream class methodsFor: 'i/o' stamp: 'RAA 7/9/2000 05:48'!\\\\nobjectFromStreamedRepresentation: someBytes\\\\n\\\\n\\\\t| file |\\\\n\\\\n\\\\tfile _ RWBinaryOrTextStream with: someBytes.\\\\n\\\\tfile reset.\\\\n\\\\t^file fileInObjectAndCode! !\\\\n\\\\n!SmartRefStream class methodsFor: 'i/o' stamp: 'tk 12/9/97 21:31'!\\\\nread: aByteStream withClasses: structureArray\\\\n\\\\t\\\\\\\"Read an object off the stream, but first check structureArray against the current system.\\\\\\\"\\\\n\\\\n\\\\t| me |\\\\n\\\\tme _ self on: aByteStream.\\\\n\\\\tme noHeader.\\\\n\\\\tme structures: (structureArray at: 2).\\\\n\\\\tme superclasses: (structureArray at: 4).\\\\n\\\\t(me verifyStructure = 'conversion method needed') ifTrue: [^ nil].\\\\n\\\\t^ super next\\\\n! !\\\\n\\\\n!SmartRefStream class methodsFor: 'i/o' stamp: 'tk 5/20/97'!\\\\nscanFrom: aByteStream\\\\n\\\\t\\\\\\\"During a code fileIn, we need to read in an object, and stash it in ScannedObject.  \\\\\\\"\\\\n\\\\n\\\\t| me |\\\\n\\\\tme _ self on: aByteStream.\\\\n\\\\tScannedObject _ me next.\\\\n\\\\taByteStream ascii.\\\\n\\\\taByteStream next == $!! ifFalse: [\\\\n\\\\t\\\\taByteStream close.\\\\n\\\\t\\\\tself error: 'Object did not end correctly']. \\\\n\\\\t\\\\\\\"caller will close the byteStream\\\\\\\"\\\\n\\\\t\\\\\\\"HandMorph.readMorphFile will retrieve the ScannedObject\\\\\\\"! !\\\\n\\\\n\\\\n!SmartRefStream class methodsFor: 'utilities' stamp: 'tk 5/4/1998 17:34'!\\\\nstatsOfSubObjects: anObject\\\\n\\\\t\\\\\\\"Open a window with statistics on what objects would be written out with anObject.  Does not actually write on the disk.  Stats in the form:\\\\n\\\\tScriptEditorMorph 51\\\\n\\\\t\\\\tSortedCollection (21->LayoutMorph 15->SimpleButtonMorph 9->Array 4->CompoundTileMorph 2->StringMorph )\\\\\\\"\\\\n\\\\n\\\\t| dummy printOut |\\\\n\\\\tdummy _ ReferenceStream on: (DummyStream on: nil).\\\\n\\\\t\\\\t\\\\\\\"Write to a fake Stream, not a file\\\\\\\"\\\\n\\\\t\\\\\\\"Collect all objects\\\\\\\"\\\\n\\\\tdummy rootObject: anObject.\\\\t\\\\\\\"inform him about the root\\\\\\\"\\\\n\\\\tdummy nextPut: anObject.\\\\n\\\\t\\\\\\\"(dummy references) is the raw data\\\\\\\"\\\\n\\\\tprintOut _ dummy statisticsOfRefs.\\\\n\\\\t(StringHolder new contents: printOut) \\\\n\\\\t\\\\topenLabel: 'ReferenceStream statistics'.! !\\\\n\\\\n!SmartRefStream class methodsFor: 'utilities' stamp: 'RAA 7/9/2000 05:35'!\\\\nstreamedRepresentationOf: anObject\\\\n\\\\n\\\\t| file |\\\\n\\\\tfile _ (RWBinaryOrTextStream on: (ByteArray new: 5000)).\\\\n\\\\tfile binary.\\\\n\\\\t(self on: file) nextPut: anObject.\\\\n\\\\tfile close.\\\\n\\\\t^file contents! !\\\\n\\\\n!SmartRefStream class methodsFor: 'utilities' stamp: 'tk 5/4/1998 17:34'!\\\\ntallyOfSubObjects: anObject\\\\n\\\\t\\\\\\\"Open a window with statistics on what objects would be written out with anObject.  Does not actually write on the disk.  Stats are simply the number of instances of each class:\\\\n\\\\t1450->Point   835->Rectangle   549->Array   300->String\\\\\\\"\\\\n\\\\n\\\\t| dummy bag |\\\\n\\\\tdummy _ ReferenceStream on: (DummyStream on: nil).\\\\n\\\\t\\\\t\\\\\\\"Write to a fake Stream, not a file\\\\\\\"\\\\n\\\\t\\\\\\\"Collect all objects\\\\\\\"\\\\n\\\\tdummy rootObject: anObject.\\\\t\\\\\\\"inform him about the root\\\\\\\"\\\\n\\\\tdummy nextPut: anObject.\\\\n\\\\tbag _ Bag new.\\\\n\\\\tdummy references keysDo: [:key | bag add: key class name].\\\\n\\\\t\\\\\\\"(bag sortedCounts) is the SortedCollection\\\\\\\"\\\\n\\\\t(StringHolder new contents: bag sortedCounts printString) \\\\n\\\\t\\\\topenLabel: 'ReferenceStream statistics'.! !\\\\nObject subclass: #Socket\\\\n\\\\tinstanceVariableNames: 'semaphore socketHandle readSemaphore writeSemaphore primitiveOnlySupportsOneSemaphore'\\\\n\\\\tclassVariableNames: 'Connected DeadServer InvalidSocket OtherEndClosed Registry RegistryThreshold TCPSocketType ThisEndClosed UDPSocketType Unconnected WaitingForConnection'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Network-Kernel'!\\\\n!Socket commentStamp: 'gk 12/13/2005 00:43' prior: 0!\\\\nA Socket represents a network connection point. Current sockets are designed to support the TCP/IP and UDP protocols. Sockets are the lowest level of networking object in Squeak and are not normally used directly. SocketStream is a higher level object wrapping a Socket in a stream like protocol.\\\\n\\\\nProtocolClient and subclasses are in turn wrappers around a SocketStream to provide support for specific network protocols such as POP, NNTP, HTTP, and FTP.!\\\\n\\\\n\\\\n!Socket methodsFor: 'accessing' stamp: 'ar 4/30/1999 04:25'!\\\\naddress\\\\n\\\\t\\\\\\\"Shortcut\\\\\\\"\\\\n\\\\t^self localAddress! !\\\\n\\\\n!Socket methodsFor: 'accessing' stamp: 'MU 11/26/2003 16:53'!\\\\nlocalAddress\\\\n\\\\tself isWaitingForConnection\\\\n\\\\t\\\\tifFalse: [[self waitForConnectionFor: Socket standardTimeout]\\\\n\\\\t\\\\t\\\\t\\\\ton: ConnectionTimedOut\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:ex | ^ ByteArray new: 4]].\\\\n\\\\t^ self primSocketLocalAddress: socketHandle! !\\\\n\\\\n!Socket methodsFor: 'accessing' stamp: 'MU 11/26/2003 16:53'!\\\\nlocalPort\\\\n\\\\tself isWaitingForConnection\\\\n\\\\t\\\\tifFalse: [[self waitForConnectionFor: Socket standardTimeout]\\\\n\\\\t\\\\t\\\\t\\\\ton: ConnectionTimedOut\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:ex | ^ 0]].\\\\n\\\\t^ self primSocketLocalPort: socketHandle! !\\\\n\\\\n!Socket methodsFor: 'accessing' stamp: 'jm 3/13/98 12:11'!\\\\npeerName\\\\n\\\\t\\\\\\\"Return the name of the host I'm connected to, or nil if its name isn't known to the domain name server or the request times out.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: Slow. Calls the domain name server, taking up to 20 seconds to time out. Even when sucessful, delays of up to 13 seconds have been observed during periods of high network load.\\\\\\\" \\\\n\\\\n\\\\t^ NetNameResolver\\\\n\\\\t\\\\tnameForAddress: self remoteAddress\\\\n\\\\t\\\\ttimeout: 20\\\\n! !\\\\n\\\\n!Socket methodsFor: 'accessing' stamp: 'ar 4/30/1999 04:25'!\\\\nport\\\\n\\\\t\\\\\\\"Shortcut\\\\\\\"\\\\n\\\\t^self localPort! !\\\\n\\\\n!Socket methodsFor: 'accessing' stamp: 'JMM 6/5/2000 10:12'!\\\\nprimitiveOnlySupportsOneSemaphore\\\\n\\\\t^primitiveOnlySupportsOneSemaphore! !\\\\n\\\\n!Socket methodsFor: 'accessing' stamp: 'JMM 5/22/2000 22:49'!\\\\nreadSemaphore\\\\n\\\\tprimitiveOnlySupportsOneSemaphore ifTrue: [^semaphore].\\\\n\\\\t^readSemaphore! !\\\\n\\\\n!Socket methodsFor: 'accessing' stamp: 'jm 9/17/97 14:34'!\\\\nremoteAddress\\\\n\\\\n\\\\t^ self primSocketRemoteAddress: socketHandle\\\\n! !\\\\n\\\\n!Socket methodsFor: 'accessing' stamp: 'jm 9/17/97 14:34'!\\\\nremotePort\\\\n\\\\n\\\\t^ self primSocketRemotePort: socketHandle\\\\n! !\\\\n\\\\n!Socket methodsFor: 'accessing' stamp: 'JMM 5/9/2000 15:32'!\\\\nsemaphore\\\\n\\\\t^semaphore! !\\\\n\\\\n!Socket methodsFor: 'accessing' stamp: 'ar 7/16/1999 17:22'!\\\\nsocketHandle\\\\n\\\\t^socketHandle! !\\\\n\\\\n!Socket methodsFor: 'accessing' stamp: 'JMM 5/22/2000 22:49'!\\\\nwriteSemaphore\\\\n\\\\tprimitiveOnlySupportsOneSemaphore ifTrue: [^semaphore].\\\\n\\\\t^writeSemaphore! !\\\\n\\\\n\\\\n!Socket methodsFor: 'connection open/close' stamp: 'bolot 7/16/1999 14:36'!\\\\naccept\\\\n\\\\t\\\\\\\"Accept a connection from the receiver socket.\\\\n\\\\tReturn a new socket that is connected to the client\\\\\\\"\\\\n\\\\t^Socket acceptFrom: self.! !\\\\n\\\\n!Socket methodsFor: 'connection open/close' stamp: 'jm 9/11/97 20:29'!\\\\nclose\\\\n\\\\t\\\\\\\"Close this connection gracefully. For TCP, this sends a close request, but the stream remains open until the other side also closes it.\\\\\\\"\\\\n\\\\n\\\\tself primSocketCloseConnection: socketHandle.  \\\\\\\"close this end\\\\\\\"\\\\n! !\\\\n\\\\n!Socket methodsFor: 'connection open/close' stamp: 'jm 11/4/97 07:15'!\\\\ncloseAndDestroy\\\\n\\\\t\\\\\\\"First, try to close this connection gracefully. If the close attempt fails or times out, abort the connection. In either case, destroy the socket. Do nothing if the socket has already been destroyed (i.e., if its socketHandle is nil).\\\\\\\"\\\\n\\\\n\\\\tself closeAndDestroy: 20.\\\\n\\\\n! !\\\\n\\\\n!Socket methodsFor: 'connection open/close' stamp: 'gk 12/13/2005 00:05'!\\\\ncloseAndDestroy: timeoutSeconds\\\\n\\\\t\\\\\\\"First, try to close this connection gracefully. If the close attempt fails or times out, abort the connection. In either case, destroy the socket. Do nothing if the socket has already been destroyed (i.e., if its socketHandle is nil).\\\\\\\"\\\\n\\\\n\\\\tsocketHandle = nil\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\tself isConnected ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tself close.  \\\\\\\"close this end\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t(self waitForDisconnectionFor: timeoutSeconds)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"The other end didn't close so we just abort the connection\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself primSocketAbortConnection: socketHandle]].\\\\n\\\\t\\\\t\\\\tself destroy].\\\\n! !\\\\n\\\\n!Socket methodsFor: 'connection open/close' stamp: 'mir 5/9/2003 18:13'!\\\\nconnectNonBlockingTo: hostAddress port: port\\\\n\\\\t\\\\\\\"Initiate a connection to the given port at the given host address. This operation will return immediately; follow it with waitForConnectionUntil: to wait until the connection is established.\\\\\\\"\\\\n\\\\n\\\\t| status |\\\\n\\\\tself initializeNetwork.\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\t(status == Unconnected)\\\\n\\\\t\\\\tifFalse: [InvalidSocketStatusException signal: 'Socket status must Unconnected before opening a new connection'].\\\\n\\\\n\\\\tself primSocket: socketHandle connectTo: hostAddress port: port.\\\\n! !\\\\n\\\\n!Socket methodsFor: 'connection open/close' stamp: 'mir 5/15/2003 18:29'!\\\\nconnectTo: hostAddress port: port\\\\n\\\\t\\\\\\\"Initiate a connection to the given port at the given host address.\\\\n\\\\tWaits until the connection is established or time outs.\\\\\\\"\\\\n\\\\n\\\\tself connectTo: hostAddress port: port waitForConnectionFor: Socket standardTimeout! !\\\\n\\\\n!Socket methodsFor: 'connection open/close' stamp: 'mu 8/14/2003 15:15'!\\\\nconnectTo: hostAddress port: port waitForConnectionFor: timeout \\\\n\\\\t\\\\\\\"Initiate a connection to the given port at the given host \\\\n\\\\taddress. Waits until the connection is established or time outs.\\\\\\\"\\\\n\\\\tself connectNonBlockingTo: hostAddress port: port.\\\\n\\\\tself\\\\n\\\\t\\\\twaitForConnectionFor: timeout\\\\n\\\\t\\\\tifTimedOut: [ConnectionTimedOut signal: 'Cannot connect to '\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, (NetNameResolver stringFromAddress: hostAddress) , ':' , port asString]! !\\\\n\\\\n!Socket methodsFor: 'connection open/close' stamp: 'mir 5/8/2003 16:03'!\\\\nconnectToHostNamed: hostName port: portNumber\\\\n\\\\t| serverIP |\\\\n\\\\tserverIP _ NetNameResolver addressForName: hostName timeout: 20.\\\\n\\\\t^self connectTo: serverIP port: portNumber\\\\n! !\\\\n\\\\n!Socket methodsFor: 'connection open/close' stamp: 'jm 3/10/98 11:56'!\\\\ndisconnect\\\\n\\\\t\\\\\\\"Break this connection, no matter what state it is in. Data that has been sent but not received will be lost.\\\\\\\"\\\\n\\\\n\\\\tself primSocketAbortConnection: socketHandle.\\\\n! !\\\\n\\\\n!Socket methodsFor: 'connection open/close' stamp: 'mir 2/22/2002 16:25'!\\\\nlistenOn: port\\\\n\\\\t\\\\\\\"Listen for a connection on the given port. This operation will return immediately; follow it with waitForConnectionUntil: to wait until a connection is established.\\\\\\\"\\\\n\\\\n\\\\t| status |\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\t(status == Unconnected)\\\\n\\\\t\\\\tifFalse: [InvalidSocketStatusException signal: 'Socket status must Unconnected before listening for a new connection'].\\\\n\\\\n\\\\tself primSocket: socketHandle listenOn: port.\\\\n! !\\\\n\\\\n!Socket methodsFor: 'connection open/close' stamp: 'mir 2/22/2002 16:25'!\\\\nlistenOn: portNumber backlogSize: backlog\\\\n\\\\t\\\\\\\"Listen for a connection on the given port.\\\\n\\\\tIf this method succeeds, #accept may be used to establish a new connection\\\\\\\"\\\\n\\\\t| status |\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\t(status == Unconnected)\\\\n\\\\t\\\\tifFalse: [InvalidSocketStatusException signal: 'Socket status must Unconnected before listening for a new connection'].\\\\n\\\\tself primSocket: socketHandle listenOn: portNumber backlogSize: backlog.\\\\n! !\\\\n\\\\n!Socket methodsFor: 'connection open/close' stamp: 'ikp 9/1/2003 20:32'!\\\\nlistenOn: portNumber backlogSize: backlog interface: ifAddr\\\\n\\\\t\\\\\\\"Listen for a connection on the given port.\\\\n\\\\tIf this method succeeds, #accept may be used to establish a new connection\\\\\\\"\\\\n\\\\t| status |\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\t(status == Unconnected)\\\\n\\\\t\\\\tifFalse: [InvalidSocketStatusException signal: 'Socket status must Unconnected before listening for a new connection'].\\\\n\\\\tself primSocket: socketHandle listenOn: portNumber backlogSize: backlog interface: ifAddr.\\\\n! !\\\\n\\\\n\\\\n!Socket methodsFor: 'datagrams' stamp: 'JMM 6/7/2000 14:58'!\\\\nreceiveDataInto: aStringOrByteArray fromHost: hostAddress port: portNumber\\\\n\\\\t| datagram |\\\\n\\\\t\\\\\\\"Receive a UDP packet from the given hostAddress/portNumber, storing the data in the given buffer, and return the number of bytes received. Note the given buffer may be only partially filled by the received data.\\\\\\\"\\\\n\\\\n\\\\tprimitiveOnlySupportsOneSemaphore ifTrue:\\\\n\\\\t\\\\t[self setPeer: hostAddress port: portNumber.\\\\n\\\\t\\\\t^self receiveDataInto: aStringOrByteArray].\\\\n\\\\t[true] whileTrue: \\\\n\\\\t\\\\t[datagram _ self receiveUDPDataInto: aStringOrByteArray.\\\\n\\\\t\\\\t((datagram at: 2) = hostAddress and: [(datagram at: 3) = portNumber]) \\\\n\\\\t\\\\t\\\\tifTrue: [^datagram at: 1]\\\\n\\\\t\\\\t\\\\tifFalse: [^0]]! !\\\\n\\\\n!Socket methodsFor: 'datagrams' stamp: 'JMM 6/3/2000 21:54'!\\\\nreceiveUDPDataInto: aStringOrByteArray\\\\n\\\\t\\\\\\\"Receive UDP data into the given buffer and return the number of bytes received. Note the given buffer may be only partially filled by the received data. What is returned is an array, the first element is the bytes read, the second the sending bytearray address, the third the senders port, the fourth, true if more of the datagram awaits reading\\\\\\\"\\\\n\\\\n\\\\t^ self primSocket: socketHandle\\\\n\\\\t\\\\treceiveUDPDataInto: aStringOrByteArray\\\\n\\\\t\\\\tstartingAt: 1\\\\n\\\\t\\\\tcount: aStringOrByteArray size\\\\n! !\\\\n\\\\n!Socket methodsFor: 'datagrams' stamp: 'JMM 5/25/2000 00:05'!\\\\nsendData: aStringOrByteArray toHost: hostAddress port: portNumber\\\\n\\\\t\\\\\\\"Send a UDP packet containing the given data to the specified host/port.\\\\\\\"\\\\n\\\\n\\\\tprimitiveOnlySupportsOneSemaphore ifTrue:\\\\n\\\\t\\\\t[self setPeer: hostAddress port: portNumber.\\\\n\\\\t\\\\t^self sendData: aStringOrByteArray].\\\\n\\\\t^self sendUDPData: aStringOrByteArray toHost: hostAddress port: portNumber! !\\\\n\\\\n!Socket methodsFor: 'datagrams' stamp: 'mir 5/15/2003 18:34'!\\\\nsendUDPData: aStringOrByteArray toHost: hostAddress port: portNumber\\\\n\\\\t\\\\\\\"Send a UDP packet containing the given data to the specified host/port.\\\\\\\"\\\\n\\\\t| bytesToSend bytesSent count |\\\\n\\\\n\\\\tbytesToSend _ aStringOrByteArray size.\\\\n\\\\tbytesSent _ 0.\\\\n\\\\t[bytesSent < bytesToSend] whileTrue: [\\\\n\\\\t\\\\t(self waitForSendDoneFor: 20)\\\\n\\\\t\\\\t\\\\tifFalse: [ConnectionTimedOut signal: 'send data timeout; data not sent'].\\\\n\\\\t\\\\tcount _ self primSocket: socketHandle\\\\n\\\\t\\\\t\\\\tsendUDPData: aStringOrByteArray\\\\n\\\\t\\\\t\\\\ttoHost: hostAddress\\\\n\\\\t\\\\t\\\\tport: portNumber\\\\n\\\\t\\\\t\\\\tstartIndex: bytesSent + 1\\\\n\\\\t\\\\t\\\\tcount: bytesToSend - bytesSent.\\\\n\\\\t\\\\tbytesSent _ bytesSent + count].\\\\n\\\\n\\\\t^ bytesSent\\\\n! !\\\\n\\\\n!Socket methodsFor: 'datagrams' stamp: 'ar 4/30/1999 04:29'!\\\\nsetPeer: hostAddress port: port\\\\n\\\\t\\\\\\\"Set the default send/recv address.\\\\\\\"\\\\n\\\\n\\\\tself primSocket: socketHandle connectTo: hostAddress port: port.\\\\n! !\\\\n\\\\n!Socket methodsFor: 'datagrams' stamp: 'ar 4/30/1999 04:29'!\\\\nsetPort: port\\\\n\\\\t\\\\\\\"Associate a local port number with a UDP socket.  Not applicable to TCP sockets.\\\\\\\"\\\\n\\\\n\\\\tself primSocket: socketHandle setPort: port.\\\\n! !\\\\n\\\\n\\\\n!Socket methodsFor: 'finalization' stamp: 'JMM 5/22/2000 22:52'!\\\\nfinalize\\\\n\\\\tself primSocketDestroyGently: socketHandle.\\\\n\\\\tSmalltalk unregisterExternalObject: semaphore.\\\\n\\\\tSmalltalk unregisterExternalObject: readSemaphore.\\\\n\\\\tSmalltalk unregisterExternalObject: writeSemaphore.\\\\n! !\\\\n\\\\n\\\\n!Socket methodsFor: 'initialize-destroy' stamp: 'JMM 5/22/2000 22:47'!\\\\nacceptFrom: aSocket\\\\n\\\\t\\\\\\\"Initialize a new socket handle from an accept call\\\\\\\"\\\\n\\\\t| semaIndex readSemaIndex writeSemaIndex |\\\\n\\\\n\\\\tprimitiveOnlySupportsOneSemaphore _ false.\\\\n\\\\tsemaphore _ Semaphore new.\\\\n\\\\treadSemaphore _ Semaphore new.\\\\n\\\\twriteSemaphore _ Semaphore new.\\\\n\\\\tsemaIndex _ Smalltalk registerExternalObject: semaphore.\\\\n\\\\treadSemaIndex _ Smalltalk registerExternalObject: readSemaphore.\\\\n\\\\twriteSemaIndex _ Smalltalk registerExternalObject: writeSemaphore.\\\\n\\\\tsocketHandle _ self primAcceptFrom: aSocket socketHandle\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\treceiveBufferSize: 8000\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsendBufSize: 8000\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsemaIndex: semaIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\treadSemaIndex: readSemaIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twriteSemaIndex: writeSemaIndex.\\\\n\\\\tsocketHandle = nil ifTrue: [  \\\\\\\"socket creation failed\\\\\\\"\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: semaphore.\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: readSemaphore.\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: writeSemaphore.\\\\n\\\\t\\\\treadSemaphore _ writeSemaphore _ semaphore _ nil\\\\n\\\\t] ifFalse:[self register].\\\\n! !\\\\n\\\\n!Socket methodsFor: 'initialize-destroy' stamp: 'JMM 5/22/2000 22:54'!\\\\ndestroy\\\\n\\\\t\\\\\\\"Destroy this socket. Its connection, if any, is aborted and its resources are freed. Do nothing if the socket has already been destroyed (i.e., if its socketHandle is nil).\\\\\\\"\\\\n\\\\n\\\\tsocketHandle = nil ifFalse: \\\\n\\\\t\\\\t[self isValid ifTrue: [self primSocketDestroy: socketHandle].\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: semaphore.\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: readSemaphore.\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: writeSemaphore.\\\\n\\\\t\\\\tsocketHandle _ nil.\\\\n\\\\t\\\\treadSemaphore _ writeSemaphore _ semaphore _ nil.\\\\n\\\\t\\\\tself unregister].\\\\n! !\\\\n\\\\n!Socket methodsFor: 'initialize-destroy' stamp: 'JMM 5/22/2000 23:04'!\\\\ninitialize: socketType\\\\n\\\\t\\\\\\\"Initialize a new socket handle. If socket creation fails, socketHandle will be set to nil.\\\\\\\"\\\\n\\\\t| semaIndex readSemaIndex writeSemaIndex |\\\\n\\\\n\\\\tprimitiveOnlySupportsOneSemaphore _ false.\\\\n\\\\tsemaphore _ Semaphore new.\\\\n\\\\treadSemaphore _ Semaphore new.\\\\n\\\\twriteSemaphore _ Semaphore new.\\\\n\\\\tsemaIndex _ Smalltalk registerExternalObject: semaphore.\\\\n\\\\treadSemaIndex _ Smalltalk registerExternalObject: readSemaphore.\\\\n\\\\twriteSemaIndex _ Smalltalk registerExternalObject: writeSemaphore.\\\\n\\\\tsocketHandle _\\\\n\\\\t\\\\tself primSocketCreateNetwork: 0\\\\n\\\\t\\\\t\\\\ttype: socketType\\\\n\\\\t\\\\t\\\\treceiveBufferSize: 8000\\\\n\\\\t\\\\t\\\\tsendBufSize: 8000\\\\n\\\\t\\\\t\\\\tsemaIndex: semaIndex\\\\n\\\\t\\\\t\\\\treadSemaIndex: readSemaIndex\\\\n\\\\t\\\\t\\\\twriteSemaIndex: writeSemaIndex.\\\\n\\\\n\\\\tsocketHandle = nil ifTrue: [  \\\\\\\"socket creation failed\\\\\\\"\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: semaphore.\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: readSemaphore.\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: writeSemaphore.\\\\n\\\\t\\\\treadSemaphore _ writeSemaphore _ semaphore _ nil\\\\n\\\\t] ifFalse:[self register].\\\\n! !\\\\n\\\\n!Socket methodsFor: 'initialize-destroy' stamp: 'mir 2/22/2002 15:48'!\\\\ninitializeNetwork\\\\n\\\\tself class initializeNetwork! !\\\\n\\\\n\\\\n!Socket methodsFor: 'other' stamp: 'mir 2/22/2002 16:25'!\\\\ngetOption: aName \\\\n\\\\t\\\\\\\"Get options on this socket, see Unix man pages for values for \\\\n\\\\tsockets, IP, TCP, UDP. IE SO_KEEPALIVE\\\\n\\\\treturns an array, element one is an status number (0 ok, -1 read only option)\\\\n\\\\telement two is the resulting of the requested option\\\\\\\"\\\\n\\\\n\\\\t(socketHandle == nil or: [self isValid not])\\\\n\\\\t\\\\tifTrue: [InvalidSocketStatusException signal: 'Socket status must valid before getting an option'].\\\\n\\\\t^self primSocket: socketHandle getOption: aName\\\\n\\\\n\\\\\\\"| foo options |\\\\nSocket initializeNetwork.\\\\nfoo _ Socket newTCP.\\\\nfoo connectTo: (NetNameResolver addressFromString: '192.168.1.1') port: 80.\\\\nfoo waitForConnectionUntil: (Socket standardDeadline).\\\\n\\\\noptions _ {\\\\n'SO_DEBUG'. 'SO_REUSEADDR'. 'SO_REUSEPORT'. 'SO_DONTROUTE'.\\\\n'SO_BROADCAST'. 'SO_SNDBUF'. 'SO_RCVBUF'. 'SO_KEEPALIVE'.\\\\n'SO_OOBINLINE'. 'SO_PRIORITY'. 'SO_LINGER'. 'SO_RCVLOWAT'.\\\\n'SO_SNDLOWAT'. 'IP_TTL'. 'IP_HDRINCL'. 'IP_RCVOPTS'.\\\\n'IP_RCVDSTADDR'. 'IP_MULTICAST_IF'. 'IP_MULTICAST_TTL'.\\\\n'IP_MULTICAST_LOOP'. 'UDP_CHECKSUM'. 'TCP_MAXSEG'.\\\\n'TCP_NODELAY'. 'TCP_ABORT_THRESHOLD'. 'TCP_CONN_NOTIFY_THRESHOLD'. \\\\n'TCP_CONN_ABORT_THRESHOLD'. 'TCP_NOTIFY_THRESHOLD'.\\\\n'TCP_URGENT_PTR_TYPE'}.\\\\n\\\\n1 to: options size do: [:i | | fum |\\\\n\\\\tfum _foo getOption: (options at: i).\\\\n\\\\tTranscript show: (options at: i),fum printString;cr].\\\\n\\\\nfoo _ Socket newUDP.\\\\nfoo setPeer: (NetNameResolver addressFromString: '192.168.1.9') port: 7.\\\\nfoo waitForConnectionUntil: (Socket standardDeadline).\\\\n\\\\n1 to: options size do: [:i | | fum |\\\\n\\\\tfum _foo getOption: (options at: i).\\\\n\\\\tTranscript show: (options at: i),fum printString;cr].\\\\n\\\\\\\"! !\\\\n\\\\n!Socket methodsFor: 'other' stamp: 'mir 2/22/2002 16:30'!\\\\nsetOption: aName value: aValue \\\\n\\\\t| value |\\\\n\\\\t\\\\\\\"setup options on this socket, see Unix man pages for values for \\\\n\\\\tsockets, IP, TCP, UDP. IE SO_KEEPALIVE\\\\n\\\\treturns an array, element one is the error number\\\\n\\\\telement two is the resulting of the negotiated value.\\\\n\\\\tSee getOption for list of keys\\\\\\\"\\\\n\\\\n\\\\t(socketHandle == nil or: [self isValid not])\\\\n\\\\t\\\\tifTrue: [InvalidSocketStatusException signal: 'Socket status must valid before setting an option'].\\\\n\\\\tvalue _ aValue asString.\\\\n\\\\taValue == true ifTrue: [value _ '1'].\\\\n\\\\taValue == false ifTrue: [value _ '0'].\\\\n\\\\t^ self primSocket: socketHandle setOption: aName value: value! !\\\\n\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimAcceptFrom: aHandle receiveBufferSize: rcvBufSize sendBufSize: sndBufSize semaIndex: semaIndex\\\\n\\\\t\\\\\\\"Create and return a new socket handle based on accepting the connection from the given listening socket\\\\\\\"\\\\n\\\\t<primitive: 'primitiveSocketAccept' module: 'SocketPlugin'>\\\\n\\\\t^self primitiveFailed! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'JMM 5/22/2000 22:55'!\\\\nprimAcceptFrom: aHandle receiveBufferSize: rcvBufSize sendBufSize: sndBufSize semaIndex: semaIndex readSemaIndex: aReadSema writeSemaIndex: aWriteSema\\\\n\\\\t\\\\\\\"Create and return a new socket handle based on accepting the connection from the given listening socket\\\\\\\"\\\\n\\\\t<primitive: 'primitiveSocketAccept3Semaphores' module: 'SocketPlugin'>\\\\n\\\\tprimitiveOnlySupportsOneSemaphore _ true.\\\\n\\\\t^self primAcceptFrom: aHandle receiveBufferSize: rcvBufSize sendBufSize: sndBufSize semaIndex: semaIndex ! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocket: socketID connectTo: hostAddress port: port\\\\n\\\\t\\\\\\\"Attempt to establish a connection to the given port of the given host. This is an asynchronous call; query the socket status to discover if and when the connection is actually completed.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketConnectToPort' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'JMM 5/25/2000 21:48'!\\\\nprimSocket: socketID getOption: aString \\\\n\\\\t\\\\\\\"Get some option information on this socket. Refer to the UNIX \\\\n\\\\tman pages for valid SO, TCP, IP, UDP options. In case of doubt\\\\n\\\\trefer to the source code.\\\\n\\\\tTCP_NODELAY, SO_KEEPALIVE are valid options for example\\\\n\\\\treturns an array containing the error code and the option value\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketGetOptions' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocket: socketID listenOn: port\\\\n\\\\t\\\\\\\"Listen for a connection on the given port. This is an asynchronous call; query the socket status to discover if and when the connection is actually completed.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketListenWithOrWithoutBacklog' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocket: aHandle listenOn: portNumber backlogSize: backlog\\\\n\\\\t\\\\\\\"Primitive. Set up the socket to listen on the given port.\\\\n\\\\tWill be used in conjunction with #accept only.\\\\\\\"\\\\n\\\\t<primitive: 'primitiveSocketListenWithOrWithoutBacklog' module: 'SocketPlugin'>\\\\n\\\\tself destroy. \\\\\\\"Accept not supported so clean up\\\\\\\"! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ikp 9/1/2003 20:33'!\\\\nprimSocket: aHandle listenOn: portNumber backlogSize: backlog interface: ifAddr\\\\n\\\\t\\\\\\\"Primitive. Set up the socket to listen on the given port.\\\\n\\\\tWill be used in conjunction with #accept only.\\\\\\\"\\\\n\\\\t<primitive: 'primitiveSocketListenOnPortBacklogInterface' module: 'SocketPlugin'>\\\\n\\\\tself destroy. \\\\\\\"Accept not supported so clean up\\\\\\\"! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocket: socketID receiveDataInto: aStringOrByteArray startingAt: startIndex count: count\\\\n\\\\t\\\\\\\"Receive data from the given socket into the given array starting at the given index. Return the number of bytes read or zero if no data is available.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketReceiveDataBufCount' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'JMM 5/24/2000 17:19'!\\\\nprimSocket: socketID receiveUDPDataInto: aStringOrByteArray startingAt: startIndex count: count\\\\n\\\\t\\\\\\\"Receive data from the given socket into the given array starting at the given index. \\\\n\\\\tReturn an Array containing the amount read, the host address byte array, the host port, and the more flag\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketReceiveUDPDataBufCount' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocket: socketID sendData: aStringOrByteArray startIndex: startIndex count: count\\\\n\\\\t\\\\\\\"Send data to the remote host through the given socket starting with the given byte index of the given byte array. The data sent is 'pushed' immediately. Return the number of bytes of data actually sent; any remaining data should be re-submitted for sending after the current send operation has completed.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: In general, it many take several sendData calls to transmit a large data array since the data is sent in send-buffer-sized chunks. The size of the send buffer is determined when the socket is created.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketSendDataBufCount' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'JMM 5/25/2000 00:08'!\\\\nprimSocket: socketID sendUDPData: aStringOrByteArray toHost: hostAddress  port: portNumber startIndex: startIndex count: count\\\\n\\\\t\\\\\\\"Send data to the remote host through the given socket starting with the given byte index of the given byte array. The data sent is 'pushed' immediately. Return the number of bytes of data actually sent; any remaining data should be re-submitted for sending after the current send operation has completed.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: In general, it many take several sendData calls to transmit a large data array since the data is sent in send-buffer-sized chunks. The size of the send buffer is determined when the socket is created.\\\\\\\"\\\\n\\\\n\\\\t<primitive:  'primitiveSocketSendUDPDataBufCount' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 7/18/2000 11:42'!\\\\nprimSocket: socketID setOption: aString value: aStringValue\\\\n\\\\t\\\\\\\"Set some option information on this socket. Refer to the UNIX \\\\n\\\\tman pages for valid SO, TCP, IP, UDP options. In case of doubt\\\\n\\\\trefer to the source code.\\\\n\\\\tTCP_NODELAY, SO_KEEPALIVE are valid options for example\\\\n\\\\treturns an array containing the error code and the negotiated value\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketSetOptions' module: 'SocketPlugin'>\\\\n\\\\t^nil! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocket: socketID setPort: port\\\\n\\\\t\\\\\\\"Set the local port associated with a UDP socket.\\\\n\\\\tNote: this primitive is overloaded.  The primitive will not fail on a TCP socket, but\\\\n\\\\tthe effects will not be what was desired.  Best solution would be to split Socket into\\\\n\\\\ttwo subclasses, TCPSocket and UDPSocket.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketListenWithOrWithoutBacklog' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketAbortConnection: socketID\\\\n\\\\t\\\\\\\"Terminate the connection on the given port immediately without going through the normal close sequence. This is an asynchronous call; query the socket status to discover if and when the connection is actually terminated.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketAbortConnection' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketCloseConnection: socketID\\\\n\\\\t\\\\\\\"Close the connection on the given port. The remote end is informed that this end has closed and will do no further sends. This is an asynchronous call; query the socket status to discover if and when the connection is actually closed.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketCloseConnection' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketConnectionStatus: socketID\\\\n\\\\t\\\\\\\"Return an integer reflecting the connection status of this socket. For a list of possible values, see the comment in the 'initialize' method of this class. If the primitive fails, return a status indicating that the socket handle is no longer valid, perhaps because the Squeak image was saved and restored since the socket was created. (Sockets do not survive snapshots.)\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketConnectionStatus' module: 'SocketPlugin'>\\\\n\\\\t^ InvalidSocket\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketCreateNetwork: netType type: socketType receiveBufferSize: rcvBufSize sendBufSize: sendBufSize semaIndex: semaIndex\\\\n\\\\t\\\\\\\"Return a new socket handle for a socket of the given type and buffer sizes. Return nil if socket creation fails.\\\\n\\\\tThe netType parameter is platform dependent and can be used to encode both the protocol type (IP, Xerox XNS, etc.) and/or the physical network interface to use if this host is connected to multiple networks. A zero netType means to use IP protocols and the primary (or only) network interface.\\\\n\\\\tThe socketType parameter specifies:\\\\n\\\\t\\\\t0\\\\treliable stream socket (TCP if the protocol is IP)\\\\n\\\\t\\\\t1\\\\tunreliable datagram socket (UDP if the protocol is IP)\\\\n\\\\tThe buffer size parameters allow performance to be tuned to the application. For example, a larger receive buffer should be used when the application expects to be receiving large amounts of data, especially from a host that is far away. These values are considered requests only; the underlying implementation will ensure that the buffer sizes actually used are within allowable bounds. Note that memory may be limited, so an application that keeps many sockets open should use smaller buffer sizes. Note the macintosh implementation ignores this buffer size. Also see setOption to get/set socket buffer sizes which allows you to set/get the current buffer sizes for reading and writing.\\\\n \\\\tIf semaIndex is > 0, it is taken to be the index of a Semaphore in the external objects array to be associated with this socket. This semaphore will be signalled when the socket status changes, such as when data arrives or a send completes. All processes waiting on the semaphore will be awoken for each such event; each process must then query the socket state to figure out if the conditions they are waiting for have been met. For example, a process waiting to send some data can see if the last send has completed.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketCreate' module: 'SocketPlugin'>\\\\n\\\\t^ nil  \\\\\\\"socket creation failed\\\\\\\"\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'JMM 5/22/2000 22:48'!\\\\nprimSocketCreateNetwork: netType type: socketType receiveBufferSize: rcvBufSize sendBufSize: sendBufSize semaIndex: semaIndex readSemaIndex: aReadSema writeSemaIndex: aWriteSema\\\\n\\\\t\\\\\\\"See comment in primSocketCreateNetwork: with one semaIndex. However you should know that some implementations\\\\n\\\\tignore the buffer size and this interface supports three semaphores,  one for open/close/listen and the other two for\\\\n\\\\treading and writing\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketCreate3Semaphores' module: 'SocketPlugin'>\\\\n\\\\tprimitiveOnlySupportsOneSemaphore _ true.\\\\n\\\\t^ self primSocketCreateNetwork: netType\\\\n\\\\t\\\\t\\\\ttype: socketType\\\\n\\\\t\\\\t\\\\treceiveBufferSize: rcvBufSize\\\\n\\\\t\\\\t\\\\tsendBufSize: sendBufSize\\\\n\\\\t\\\\t\\\\tsemaIndex: semaIndex! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketDestroy: socketID\\\\n\\\\t\\\\\\\"Release the resources associated with this socket. If a connection is open, it is aborted.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketDestroy' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketDestroyGently: socketID\\\\n\\\\t\\\\\\\"Release the resources associated with this socket. If a connection is open, it is aborted.\\\\n\\\\tDo not fail if the receiver is already closed.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketDestroy' module: 'SocketPlugin'>\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketError: socketID\\\\n\\\\t\\\\\\\"Return an integer encoding the most recent error on this socket. Zero means no error.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketError' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketLocalAddress: socketID\\\\n\\\\t\\\\\\\"Return the local host address for this socket.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketLocalAddress' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketLocalPort: socketID\\\\n\\\\t\\\\\\\"Return the local port for this socket, or zero if no port has yet been assigned.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketLocalPort' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketReceiveDataAvailable: socketID\\\\n\\\\t\\\\\\\"Return true if data may be available for reading from the current socket.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketReceiveDataAvailable' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketRemoteAddress: socketID\\\\n\\\\t\\\\\\\"Return the remote host address for this socket, or zero if no connection has been made.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketRemoteAddress' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketRemotePort: socketID\\\\n\\\\t\\\\\\\"Return the remote port for this socket, or zero if no connection has been made.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketRemotePort' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketSendDone: socketID\\\\n\\\\t\\\\\\\"Return true if there is no send in progress on the current socket.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketSendDone' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n\\\\n!Socket methodsFor: 'printing' stamp: 'jm 11/23/1998 11:57'!\\\\nprintOn: aStream\\\\n\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream nextPutAll: '[', self statusString, ']'.\\\\n! !\\\\n\\\\n\\\\n!Socket methodsFor: 'queries' stamp: 'jm 2/25/1999 13:52'!\\\\ndataAvailable\\\\n\\\\t\\\\\\\"Return true if this socket has unread received data.\\\\\\\"\\\\n\\\\n\\\\tsocketHandle == nil ifTrue: [^ false].\\\\n\\\\t^ self primSocketReceiveDataAvailable: socketHandle\\\\n! !\\\\n\\\\n!Socket methodsFor: 'queries' stamp: 'jm 2/25/1999 13:52'!\\\\nisConnected\\\\n\\\\t\\\\\\\"Return true if this socket is connected.\\\\\\\"\\\\n\\\\n\\\\tsocketHandle == nil ifTrue: [^ false].\\\\n\\\\t^ (self primSocketConnectionStatus: socketHandle) == Connected\\\\n! !\\\\n\\\\n!Socket methodsFor: 'queries' stamp: 'JMM 5/5/2000 12:15'!\\\\nisOtherEndClosed\\\\n\\\\t\\\\\\\"Return true if this socket had the other end closed.\\\\\\\"\\\\n\\\\n\\\\tsocketHandle == nil ifTrue: [^ false].\\\\n\\\\t^ (self primSocketConnectionStatus: socketHandle) == OtherEndClosed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'queries' stamp: 'JMM 5/5/2000 12:17'!\\\\nisThisEndClosed\\\\n\\\\t\\\\\\\"Return true if this socket had the this end closed.\\\\\\\"\\\\n\\\\n\\\\tsocketHandle == nil ifTrue: [^ false].\\\\n\\\\t^ (self primSocketConnectionStatus: socketHandle) == ThisEndClosed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'queries' stamp: 'jm 2/25/1999 13:54'!\\\\nisUnconnected\\\\n\\\\t\\\\\\\"Return true if this socket's state is Unconnected.\\\\\\\"\\\\n\\\\n\\\\tsocketHandle == nil ifTrue: [^ false].\\\\n\\\\t^ (self primSocketConnectionStatus: socketHandle) == Unconnected\\\\n! !\\\\n\\\\n!Socket methodsFor: 'queries' stamp: 'jm 2/25/1999 13:54'!\\\\nisUnconnectedOrInvalid\\\\n\\\\t\\\\\\\"Return true if this socket is completely disconnected or is invalid.\\\\\\\"\\\\n\\\\n\\\\t| status |\\\\n\\\\tsocketHandle == nil ifTrue: [^ true].\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\t^ (status = Unconnected) | (status = InvalidSocket)\\\\n! !\\\\n\\\\n!Socket methodsFor: 'queries' stamp: 'jm 2/25/1999 13:51'!\\\\nisValid\\\\n\\\\t\\\\\\\"Return true if this socket contains a valid, non-nil socket handle.\\\\\\\"\\\\n\\\\n\\\\t| status |\\\\n\\\\tsocketHandle == nil ifTrue: [^ false].\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\t^ status ~= InvalidSocket\\\\n! !\\\\n\\\\n!Socket methodsFor: 'queries' stamp: 'jm 2/25/1999 13:54'!\\\\nisWaitingForConnection\\\\n\\\\t\\\\\\\"Return true if this socket is waiting for a connection.\\\\\\\"\\\\n\\\\n\\\\tsocketHandle == nil ifTrue: [^ false].\\\\n\\\\t^ (self primSocketConnectionStatus: socketHandle) == WaitingForConnection\\\\n! !\\\\n\\\\n!Socket methodsFor: 'queries' stamp: 'jm 2/25/1999 13:54'!\\\\nsendDone\\\\n\\\\t\\\\\\\"Return true if the most recent send operation on this socket has completed.\\\\\\\"\\\\n\\\\n\\\\tsocketHandle == nil ifTrue: [^ false].\\\\n\\\\t^ self primSocketSendDone: socketHandle\\\\n! !\\\\n\\\\n!Socket methodsFor: 'queries' stamp: 'JMM 5/8/2000 23:24'!\\\\nsocketError\\\\n\\\\t^self primSocketError: socketHandle! !\\\\n\\\\n!Socket methodsFor: 'queries' stamp: 'jm 2/25/1999 13:56'!\\\\nstatusString\\\\n\\\\t\\\\\\\"Return a string describing the status of this socket.\\\\\\\"\\\\n\\\\n\\\\t| status |\\\\n\\\\tsocketHandle == nil ifTrue: [^ 'destroyed'].\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\tstatus = InvalidSocket ifTrue: [^ 'invalidSocketHandle'].\\\\n\\\\tstatus = Unconnected ifTrue: [^ 'unconnected'].\\\\n\\\\tstatus = WaitingForConnection ifTrue: [^ 'waitingForConnection'].\\\\n\\\\tstatus = Connected ifTrue: [^ 'connected'].\\\\n\\\\tstatus = OtherEndClosed ifTrue: [^ 'otherEndClosedButNotThisEnd'].\\\\n\\\\tstatus = ThisEndClosed ifTrue: [^ 'thisEndClosedButNotOtherEnd'].\\\\n\\\\t^ 'unknown socket status'\\\\n! !\\\\n\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'gk 12/14/2005 10:02'!\\\\ndiscardReceivedData\\\\n\\\\t\\\\\\\"Discard any data received up until now, and return the number of bytes discarded.\\\\\\\"\\\\n\\\\n\\\\t| buf totalBytesDiscarded |\\\\n\\\\tbuf _ String new: 10000.\\\\n\\\\ttotalBytesDiscarded _ 0.\\\\n\\\\t[self isConnected] whileTrue: [\\\\n\\\\t\\\\ttotalBytesDiscarded _\\\\n\\\\t\\\\t\\\\ttotalBytesDiscarded + (self receiveDataInto: buf)].\\\\n\\\\t^ totalBytesDiscarded\\\\n! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'mir 5/15/2003 13:52'!\\\\nreceiveAvailableData\\\\n\\\\t\\\\\\\"Receive all available data (if any). Do not wait.\\\\\\\"\\\\n \\\\n\\\\t| buffer bytesRead |\\\\n\\\\tbuffer _ String new: 2000.\\\\n\\\\tbytesRead _ self receiveAvailableDataInto: buffer.\\\\n\\\\t^buffer copyFrom: 1 to: bytesRead! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'yo 10/10/2005 18:47'!\\\\nreceiveAvailableDataIntoBuffer: buffer\\\\n\\\\t\\\\\\\"Receive all available data (if any). Do not wait.\\\\\\\"\\\\n \\\\n\\\\t| bytesRead |\\\\n\\\\tbytesRead _ self receiveAvailableDataInto: buffer.\\\\n\\\\t^buffer copyFrom: 1 to: bytesRead! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'mir 5/15/2003 13:52'!\\\\nreceiveAvailableDataInto: buffer\\\\n\\\\t\\\\\\\"Receive all available data into the given buffer and return the number of bytes received.\\\\n\\\\tNote the given buffer may be only partially filled by the received data.\\\\n\\\\tDo not wait for data.\\\\\\\"\\\\n\\\\n\\\\t^self receiveAvailableDataInto: buffer startingAt: 1! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'mu 8/9/2003 18:04'!\\\\nreceiveAvailableDataInto: buffer startingAt: startIndex\\\\n\\\\t\\\\\\\"Receive all available data into the given buffer and return the number of bytes received.\\\\n\\\\tNote the given buffer may be only partially filled by the received data.\\\\n\\\\tDo not wait for data.\\\\\\\"\\\\n\\\\n\\\\t| bufferPos bytesRead |\\\\n\\\\tbufferPos := startIndex.\\\\n\\\\t[self dataAvailable\\\\n\\\\t\\\\tand: [bufferPos-1 < buffer size]] \\\\n\\\\t\\\\twhileTrue: [\\\\n\\\\t\\\\t\\\\tbytesRead := self receiveSomeDataInto: buffer startingAt: bufferPos.\\\\n\\\\t\\\\t\\\\tbufferPos := bufferPos + bytesRead].\\\\n\\\\t^bufferPos - startIndex! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'mir 5/15/2003 16:05'!\\\\nreceiveData\\\\n\\\\t\\\\\\\"Receive data into the given buffer and return the number of bytes received. \\\\n\\\\tNote the given buffer may be only partially filled by the received data.\\\\n\\\\tWaits for data once.\\\\n\\\\tEither returns data or signals a time out or connection close.\\\\\\\"\\\\n\\\\n\\\\t| buffer bytesRead |\\\\n\\\\tbuffer _ String new: 2000.\\\\n\\\\tbytesRead _ self receiveDataInto: buffer.\\\\n\\\\t^buffer copyFrom: 1 to: bytesRead! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'mir 5/15/2003 16:05'!\\\\nreceiveDataInto: aStringOrByteArray\\\\n\\\\t\\\\\\\"Receive data into the given buffer and return the number of bytes received. \\\\n\\\\tNote the given buffer may be only partially filled by the received data.\\\\n\\\\tWaits for data once.\\\\n\\\\tEither returns data or signals a time out or connection close.\\\\\\\"\\\\n\\\\n\\\\t^self receiveDataInto: aStringOrByteArray startingAt: 1! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'svp 9/23/2003 00:12'!\\\\nreceiveDataInto: aStringOrByteArray startingAt: aNumber\\\\n\\\\t\\\\\\\"Receive data into the given buffer and return the number of bytes received. \\\\n\\\\tNote the given buffer may be only partially filled by the received data.\\\\n\\\\tWaits for data once.  The answer may be zero (indicating that no data was \\\\n\\\\tavailable before the socket closed).\\\\\\\"\\\\n\\\\n\\\\t| bytesRead closed |\\\\n\\\\tbytesRead := 0.\\\\n\\\\tclosed := false.\\\\n\\\\t[closed not and: [bytesRead == 0]]\\\\n\\\\t\\\\twhileTrue: [\\\\n\\\\t\\\\t\\\\tself waitForDataIfClosed: [closed := true].\\\\n\\\\t\\\\t\\\\tbytesRead := self primSocket: socketHandle\\\\n\\\\t\\\\t\\\\t\\\\treceiveDataInto: aStringOrByteArray\\\\n\\\\t\\\\t\\\\t\\\\tstartingAt: aNumber\\\\n\\\\t\\\\t\\\\t\\\\tcount: aStringOrByteArray size-aNumber+1].\\\\n\\\\t^bytesRead\\\\n! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'gk 2/9/2005 12:33'!\\\\nreceiveDataSignallingClosedInto: aStringOrByteArray startingAt: aNumber\\\\n\\\\t\\\\\\\"Receive data into the given buffer and return the number of bytes received. \\\\n\\\\tNote the given buffer may be only partially filled by the received data.\\\\n\\\\tWaits for data until something is read or the socket is closed, upon which\\\\n\\\\twe signal.\\\\\\\"\\\\n\\\\n\\\\t| bytesRead |\\\\n\\\\tbytesRead := 0.\\\\n\\\\t[bytesRead == 0]\\\\n\\\\t\\\\twhileTrue: [\\\\n\\\\t\\\\t\\\\tself waitForData.\\\\n\\\\t\\\\t\\\\tbytesRead := self primSocket: socketHandle\\\\n\\\\t\\\\t\\\\t\\\\treceiveDataInto: aStringOrByteArray\\\\n\\\\t\\\\t\\\\t\\\\tstartingAt: aNumber\\\\n\\\\t\\\\t\\\\t\\\\tcount: aStringOrByteArray size-aNumber+1].\\\\n\\\\t^bytesRead\\\\n! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'gk 2/9/2005 12:24'!\\\\nreceiveDataSignallingTimeout: timeout into: aStringOrByteArray startingAt: aNumber\\\\n\\\\t\\\\\\\"Receive data into the given buffer and return the number of bytes received. \\\\n\\\\tNote the given buffer may be only partially filled by the received data.\\\\n\\\\tWait for data once for the specified nr of seconds.  This method will\\\\n\\\\tthrow exceptions on timeout or the socket closing.\\\\\\\"\\\\n\\\\n\\\\tself waitForDataFor: timeout.\\\\n\\\\t^self primSocket: socketHandle\\\\n\\\\t\\\\treceiveDataInto: aStringOrByteArray\\\\n\\\\t\\\\tstartingAt: aNumber\\\\n\\\\t\\\\tcount: aStringOrByteArray size-aNumber+1\\\\n! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'svp 9/23/2003 00:03'!\\\\nreceiveDataTimeout: timeout\\\\n\\\\t\\\\\\\"Receive data into the given buffer and return the number of bytes received. \\\\n\\\\tNote the given buffer may be only partially filled by the received data.\\\\n\\\\tWaits for data once.\\\\\\\"\\\\n\\\\n\\\\t| buffer bytesRead |\\\\n\\\\tbuffer _ String new: 2000.\\\\n\\\\tbytesRead _ self receiveDataTimeout: timeout into: buffer.\\\\n\\\\t^buffer copyFrom: 1 to: bytesRead! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'svp 9/23/2003 00:01'!\\\\nreceiveDataTimeout: timeout into: aStringOrByteArray \\\\n\\\\t\\\\\\\"Receive data into the given buffer and return the number of bytes received. \\\\n\\\\tNote the given buffer may be only partially filled by the received data.\\\\n\\\\tWaits for data once.\\\\\\\"\\\\n\\\\n\\\\t^self receiveDataTimeout: timeout into: aStringOrByteArray startingAt: 1! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'svp 9/22/2003 23:58'!\\\\nreceiveDataTimeout: timeout into: aStringOrByteArray startingAt: aNumber\\\\n\\\\t\\\\\\\"Receive data into the given buffer and return the number of bytes received. \\\\n\\\\tNote the given buffer may be only partially filled by the received data.\\\\n\\\\tWait for data once for the specified nr of seconds.  The answer may be \\\\n\\\\tzero (indicating that there was no data available within the given timeout).\\\\\\\"\\\\n\\\\n\\\\tself waitForDataFor: timeout ifClosed: [] ifTimedOut: [].\\\\n\\\\t^self primSocket: socketHandle\\\\n\\\\t\\\\treceiveDataInto: aStringOrByteArray\\\\n\\\\t\\\\tstartingAt: aNumber\\\\n\\\\t\\\\tcount: aStringOrByteArray size-aNumber+1\\\\n! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'mir 5/15/2003 16:18'!\\\\nreceiveDataWithTimeout\\\\n\\\\t\\\\\\\"Receive data into the given buffer and return the number of bytes received. \\\\n\\\\tNote the given buffer may be only partially filled by the received data.\\\\n\\\\tWaits for data once.\\\\n\\\\tEither returns data or signals a time out or connection close.\\\\\\\"\\\\n\\\\n\\\\t| buffer bytesRead |\\\\n\\\\tbuffer _ String new: 2000.\\\\n\\\\tbytesRead _ self receiveDataWithTimeoutInto: buffer.\\\\n\\\\t^buffer copyFrom: 1 to: bytesRead! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'mir 5/15/2003 16:18'!\\\\nreceiveDataWithTimeoutInto: aStringOrByteArray\\\\n\\\\t\\\\\\\"Receive data into the given buffer and return the number of bytes received. \\\\n\\\\tNote the given buffer may be only partially filled by the received data.\\\\n\\\\tWaits for data once.\\\\n\\\\tEither returns data or signals a time out or connection close.\\\\\\\"\\\\n\\\\n\\\\t^self receiveDataWithTimeoutInto: aStringOrByteArray startingAt: 1! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'svp 9/23/2003 00:01'!\\\\nreceiveDataWithTimeoutInto: aStringOrByteArray startingAt: aNumber\\\\n\\\\t\\\\\\\"Receive data into the given buffer and return the number of bytes received. \\\\n\\\\tNote the given buffer may be only partially filled by the received data.\\\\n\\\\tWaits for data once.\\\\\\\"\\\\n\\\\n\\\\t^self receiveDataTimeout: Socket standardTimeout into: aStringOrByteArray startingAt: aNumber \\\\n! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'mir 5/15/2003 13:46'!\\\\nreceiveSomeData\\\\n\\\\t\\\\\\\"Receive currently available data (if any). Do not wait.\\\\\\\"\\\\n \\\\n\\\\t| buffer bytesRead |\\\\n\\\\tbuffer _ String new: 2000.\\\\n\\\\tbytesRead _ self receiveSomeDataInto: buffer.\\\\n\\\\t^buffer copyFrom: 1 to: bytesRead! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'mir 5/15/2003 13:46'!\\\\nreceiveSomeDataInto: aStringOrByteArray\\\\n\\\\t\\\\\\\"Receive data into the given buffer and return the number of bytes received. Note the given buffer may be only partially filled by the received data.\\\\\\\"\\\\n\\\\n\\\\t^self receiveSomeDataInto: aStringOrByteArray startingAt: 1! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'mir 5/15/2003 13:46'!\\\\nreceiveSomeDataInto: aStringOrByteArray startingAt: aNumber\\\\n\\\\t\\\\\\\"Receive data into the given buffer and return the number of bytes received. Note the given buffer may be only partially filled by the received data.\\\\\\\"\\\\n\\\\n\\\\t^ self primSocket: socketHandle\\\\n\\\\t\\\\treceiveDataInto: aStringOrByteArray\\\\n\\\\t\\\\tstartingAt: aNumber\\\\n\\\\t\\\\tcount: aStringOrByteArray size-aNumber+1\\\\n! !\\\\n\\\\n\\\\n!Socket methodsFor: 'registry' stamp: 'ar 3/21/98 17:40'!\\\\nregister\\\\n\\\\t^self class register: self! !\\\\n\\\\n!Socket methodsFor: 'registry' stamp: 'ar 3/21/98 17:41'!\\\\nunregister\\\\n\\\\t^self class unregister: self! !\\\\n\\\\n\\\\n!Socket methodsFor: 'sending' stamp: 'mir 5/15/2003 18:33'!\\\\nsendData: aStringOrByteArray\\\\n\\\\t\\\\\\\"Send all of the data in the given array, even if it requires multiple calls to send it all. Return the number of bytes sent.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"An experimental version use on slow lines: Longer timeout and smaller writes to try to avoid spurious timeouts.\\\\\\\"\\\\n\\\\n\\\\t| bytesSent bytesToSend count |\\\\n\\\\tbytesToSend _ aStringOrByteArray size.\\\\n\\\\tbytesSent _ 0.\\\\n\\\\t[bytesSent < bytesToSend] whileTrue: [\\\\n\\\\t\\\\t(self waitForSendDoneFor: 60)\\\\n\\\\t\\\\t\\\\tifFalse: [ConnectionTimedOut signal: 'send data timeout; data not sent'].\\\\n\\\\t\\\\tcount _ self primSocket: socketHandle\\\\n\\\\t\\\\t\\\\tsendData: aStringOrByteArray\\\\n\\\\t\\\\t\\\\tstartIndex: bytesSent + 1\\\\n\\\\t\\\\t\\\\tcount: (bytesToSend - bytesSent min: 5000).\\\\n\\\\t\\\\tbytesSent _ bytesSent + count].\\\\n\\\\n\\\\t^ bytesSent\\\\n! !\\\\n\\\\n!Socket methodsFor: 'sending' stamp: 'ar 7/20/1999 17:23'!\\\\nsendData: buffer count: n\\\\n\\\\t\\\\\\\"Send the amount of data from the given buffer\\\\\\\"\\\\n\\\\t| sent |\\\\n\\\\tsent _ 0.\\\\n\\\\t[sent < n] whileTrue:[\\\\n\\\\t\\\\tsent _ sent + (self sendSomeData: buffer startIndex: sent+1 count: (n-sent))].! !\\\\n\\\\n!Socket methodsFor: 'sending' stamp: 'ls 1/5/1999 15:05'!\\\\nsendSomeData: aStringOrByteArray\\\\n\\\\t\\\\\\\"Send as much of the given data as possible and answer the number of bytes actually sent.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: This operation may have to be repeated multiple times to send a large amount of data.\\\\\\\"\\\\n\\\\n\\\\t^ self\\\\n\\\\t\\\\tsendSomeData: aStringOrByteArray\\\\n\\\\t\\\\tstartIndex: 1\\\\n\\\\t\\\\tcount: aStringOrByteArray size! !\\\\n\\\\n!Socket methodsFor: 'sending' stamp: 'ls 3/3/1999 18:59'!\\\\nsendSomeData: aStringOrByteArray startIndex: startIndex\\\\n\\\\t\\\\\\\"Send as much of the given data as possible starting at the given index. Answer the number of bytes actually sent.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: This operation may have to be repeated multiple times to send a large amount of data.\\\\\\\"\\\\n\\\\n\\\\t^ self\\\\n\\\\t\\\\tsendSomeData: aStringOrByteArray\\\\n\\\\t\\\\tstartIndex: startIndex\\\\n\\\\t\\\\tcount: (aStringOrByteArray size - startIndex + 1)! !\\\\n\\\\n!Socket methodsFor: 'sending' stamp: 'mir 5/15/2003 18:34'!\\\\nsendSomeData: aStringOrByteArray startIndex: startIndex count: count\\\\n\\\\t\\\\\\\"Send up to count bytes of the given data starting at the given index. Answer the number of bytes actually sent.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: This operation may have to be repeated multiple times to send a large amount of data.\\\\\\\"\\\\n\\\\n\\\\t| bytesSent |\\\\n\\\\t(self waitForSendDoneFor: 20)\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\tbytesSent _ self primSocket: socketHandle\\\\n\\\\t\\\\t\\\\t\\\\tsendData: aStringOrByteArray\\\\n\\\\t\\\\t\\\\t\\\\tstartIndex: startIndex\\\\n\\\\t\\\\t\\\\t\\\\tcount: count]\\\\n\\\\t\\\\tifFalse: [ConnectionTimedOut signal: 'send data timeout; data not sent'].\\\\n\\\\t^ bytesSent\\\\n! !\\\\n\\\\n!Socket methodsFor: 'sending' stamp: 'mir 2/19/2002 18:33'!\\\\nsendStreamContents: stream\\\\n\\\\t\\\\\\\"Send the data in the stream. Close the stream.\\\\n\\\\tUsefull for directly sending contents of a file without reading into memory first.\\\\\\\"\\\\n\\\\n\\\\tself sendStreamContents: stream checkBlock: [true]! !\\\\n\\\\n!Socket methodsFor: 'sending' stamp: 'mir 2/19/2002 18:31'!\\\\nsendStreamContents: stream checkBlock: checkBlock\\\\n\\\\t\\\\\\\"Send the data in the stream. Close the stream after you are done. After each block of data evaluate checkBlock and abort if it returns false.\\\\n\\\\tUsefull for directly sending contents of a file without reading into memory first.\\\\\\\"\\\\n\\\\n\\\\t| chunkSize buffer |\\\\n\\\\tchunkSize _ 5000.\\\\n\\\\tbuffer _ ByteArray new: chunkSize.\\\\n\\\\tstream binary.\\\\n\\\\t[[stream atEnd and: [checkBlock value]]\\\\n\\\\t\\\\twhileFalse: [\\\\n\\\\t\\\\t\\\\tbuffer _ stream next: chunkSize into: buffer.\\\\n\\\\t\\\\t\\\\tself sendData: buffer]]\\\\n\\\\t\\\\tensure: [stream close]! !\\\\n\\\\n\\\\n!Socket methodsFor: 'waiting' stamp: 'mu 8/9/2003 15:17'!\\\\nwaitForAcceptFor: timeout\\\\n\\\\t\\\\\\\"Wait and accept an incoming connection. Return nil if it falis\\\\\\\"\\\\n\\\\t[self waitForConnectionFor: timeout] on: ConnectionTimedOut do: [:ex | ^nil].\\\\n\\\\t^self isConnected\\\\n\\\\t\\\\tifTrue:[self accept]\\\\n\\\\t\\\\t! !\\\\n\\\\n!Socket methodsFor: 'waiting' stamp: 'svp 7/27/2003 00:23'!\\\\nwaitForAcceptFor: timeout ifTimedOut: timeoutBlock\\\\n\\\\t\\\\\\\"Wait and accept an incoming connection\\\\\\\"\\\\n\\\\tself waitForConnectionFor: timeout ifTimedOut: [^timeoutBlock value].\\\\n\\\\t^self accept! !\\\\n\\\\n!Socket methodsFor: 'waiting' stamp: 'mu 8/19/2003 02:57'!\\\\nwaitForConnectionFor: timeout\\\\n\\\\t\\\\\\\"Wait up until the given deadline for a connection to be established. Return true if it is established by the deadline, false if not.\\\\\\\"\\\\n\\\\n\\\\t^self \\\\n\\\\t\\\\twaitForConnectionFor: timeout \\\\n\\\\t\\\\tifTimedOut: [ConnectionTimedOut signal: 'Failed to connect in ', timeout asString, ' seconds']\\\\n! !\\\\n\\\\n!Socket methodsFor: 'waiting' stamp: 'gk 12/15/2005 01:09'!\\\\nwaitForConnectionFor: timeout ifTimedOut: timeoutBlock\\\\n\\\\t\\\\\\\"Wait up until the given deadline for a connection to be established. Return true if it is established by the deadline, false if not.\\\\\\\"\\\\n\\\\n\\\\t| status deadline |\\\\n\\\\tdeadline := Socket deadlineSecs: timeout.\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\t[(status = WaitingForConnection) and: [Time millisecondClockValue < deadline]]\\\\n\\\\t\\\\twhileTrue: [\\\\n\\\\t\\\\t\\\\tsemaphore waitTimeoutMSecs: (deadline - Time millisecondClockValue).\\\\n\\\\t\\\\t\\\\tstatus _ self primSocketConnectionStatus: socketHandle].\\\\n\\\\n\\\\tstatus = Connected ifFalse: [^timeoutBlock value]\\\\n! !\\\\n\\\\n!Socket methodsFor: 'waiting' stamp: 'svp 9/23/2003 00:09'!\\\\nwaitForData\\\\n\\\\t\\\\\\\"Wait for data to arrive.  This method will block until\\\\n\\\\tdata is available or the socket is closed.  If the socket is closed\\\\n\\\\ta ConnectionClosed exception will be signaled.\\\\\\\"\\\\n\\\\n\\\\t^self waitForDataIfClosed:\\\\n\\\\t\\\\t[ConnectionClosed signal: 'Connection close while waiting for data.']! !\\\\n\\\\n!Socket methodsFor: 'waiting' stamp: 'svp 7/27/2003 00:18'!\\\\nwaitForDataFor: timeout\\\\n\\\\t\\\\\\\"Wait for the given nr of seconds for data to arrive.\\\\n\\\\tSignal a time out or connection close exception if either happens before data becomes available.\\\\\\\"\\\\n\\\\n\\\\t^self\\\\n\\\\t\\\\twaitForDataFor: timeout\\\\n\\\\t\\\\tifClosed: [ConnectionClosed signal: 'Connection closed while waiting for data.']\\\\n\\\\t\\\\tifTimedOut: [ConnectionTimedOut signal: 'Data receive timed out.']\\\\n! !\\\\n\\\\n!Socket methodsFor: 'waiting' stamp: 'svp 7/27/2003 00:16'!\\\\nwaitForDataFor: timeout ifClosed: closedBlock ifTimedOut: timedOutBlock\\\\n\\\\t\\\\\\\"Wait for the given nr of seconds for data to arrive.\\\\\\\"\\\\n\\\\n\\\\t| deadline |\\\\n\\\\tdeadline := Socket deadlineSecs: timeout.\\\\n\\\\n\\\\t[Time millisecondClockValue < deadline]\\\\n\\\\t\\\\twhileTrue: [\\\\n\\\\t\\\\t\\\\t(self primSocketReceiveDataAvailable: socketHandle)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [^self].\\\\n\\\\t\\\\t\\\\tself isConnected\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [^closedBlock value].\\\\n\\\\t\\\\t\\\\tself readSemaphore waitTimeoutMSecs: (deadline - Time millisecondClockValue)].\\\\n\\\\n\\\\t(self primSocketReceiveDataAvailable: socketHandle)\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\tself isConnected\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [^timedOutBlock value]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [^closedBlock value]]! !\\\\n\\\\n!Socket methodsFor: 'waiting' stamp: 'svp 9/23/2003 00:08'!\\\\nwaitForDataIfClosed: closedBlock\\\\n\\\\t\\\\\\\"Wait indefinitely for data to arrive.  This method will block until\\\\n\\\\tdata is available or the socket is closed.\\\\\\\"\\\\n\\\\n\\\\t[true]\\\\n\\\\t\\\\twhileTrue: [\\\\n\\\\t\\\\t\\\\t(self primSocketReceiveDataAvailable: socketHandle)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [^self].\\\\n\\\\t\\\\t\\\\tself isConnected\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [^closedBlock value].\\\\n\\\\t\\\\t\\\\tself readSemaphore wait].\\\\n! !\\\\n\\\\n!Socket methodsFor: 'waiting' stamp: 'gk 12/14/2005 09:59'!\\\\nwaitForDisconnectionFor: timeout\\\\n\\\\t\\\\\\\"Wait for the given nr of seconds for the connection to be broken.\\\\n\\\\tReturn true if it is broken by the deadline, false if not.\\\\n\\\\tThe client should know the connection is really going to be closed\\\\n\\\\t(e.g., because he has called 'close' to send a close request to the other end)\\\\n\\\\tbefore calling this method.\\\\\\\"\\\\n\\\\n\\\\t| status deadline |\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\tdeadline := Socket deadlineSecs: timeout.\\\\n\\\\t[((status == Connected) or: [(status == ThisEndClosed)]) and:\\\\n\\\\t [Time millisecondClockValue < deadline]] whileTrue: [\\\\n\\\\t\\\\tself discardReceivedData.\\\\n\\\\t\\\\tself readSemaphore waitTimeoutMSecs: (deadline - Time millisecondClockValue).\\\\n\\\\t\\\\tstatus _ self primSocketConnectionStatus: socketHandle].\\\\n\\\\n\\\\t^ status ~= Connected\\\\n! !\\\\n\\\\n!Socket methodsFor: 'waiting' stamp: 'mir 5/15/2003 18:33'!\\\\nwaitForSendDoneFor: timeout\\\\n\\\\t\\\\\\\"Wait up until the given deadline for the current send operation to complete. Return true if it completes by the deadline, false if not.\\\\\\\"\\\\n\\\\n\\\\t| sendDone deadline |\\\\n\\\\tdeadline := Socket deadlineSecs: timeout.\\\\n\\\\t[self isConnected & (sendDone _ self primSocketSendDone: socketHandle) not\\\\n\\\\t\\\\t\\\\t\\\\\\\"Connection end and final data can happen fast, so test in this order\\\\\\\"\\\\n\\\\t\\\\tand: [Time millisecondClockValue < deadline]] whileTrue: [\\\\n\\\\t\\\\t\\\\tself writeSemaphore waitTimeoutMSecs: (deadline - Time millisecondClockValue)].\\\\n\\\\n\\\\t^ sendDone! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSocket class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!Socket class methodsFor: 'class initialization' stamp: 'ar 12/12/2001 19:12'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Socket initialize\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Socket Types\\\\\\\"\\\\n\\\\tTCPSocketType _ 0.\\\\n\\\\tUDPSocketType _ 1.\\\\n\\\\n\\\\t\\\\\\\"Socket Status Values\\\\\\\"\\\\n\\\\tInvalidSocket _ -1.\\\\n\\\\tUnconnected _ 0.\\\\n\\\\tWaitingForConnection _ 1.\\\\n\\\\tConnected _ 2.\\\\n\\\\tOtherEndClosed _ 3.\\\\n\\\\tThisEndClosed _ 4.\\\\n\\\\n\\\\tRegistryThreshold _ 100. \\\\\\\"# of sockets\\\\\\\"! !\\\\n\\\\n\\\\n!Socket class methodsFor: 'instance creation' stamp: 'ls 9/24/1999 09:45'!\\\\nacceptFrom: aSocket\\\\n\\\\t^[ super new acceptFrom: aSocket ]\\\\n\\\\t\\\\trepeatWithGCIf: [ :sock | sock isValid not ]! !\\\\n\\\\n!Socket class methodsFor: 'instance creation' stamp: 'ar 4/30/1999 04:15'!\\\\ncreateIfFail: failBlock\\\\n\\\\t\\\\\\\"Attempt to create a new socket. If successful, return the new socket. Otherwise, return the result of evaluating the given block. Socket creation can fail if the network isn't available or if there are not sufficient resources available to create another socket.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: The default creates a TCP socket\\\\\\\"\\\\n\\\\t^self tcpCreateIfFail: failBlock! !\\\\n\\\\n!Socket class methodsFor: 'instance creation' stamp: 'ar 4/30/1999 04:13'!\\\\nnew\\\\n\\\\t\\\\\\\"Return a new, unconnected Socket. Note that since socket creation may fail, it is safer to use the method createIfFail: to handle such failures gracefully; this method is primarily for backward compatibility and may be disallowed in a future release.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: The default creates a TCP socket - this is also backward compatibility.\\\\\\\"\\\\n\\\\t^self newTCP! !\\\\n\\\\n!Socket class methodsFor: 'instance creation' stamp: 'mir 2/22/2002 15:48'!\\\\nnewTCP\\\\n\\\\t\\\\\\\"Create a socket and initialise it for TCP\\\\\\\"\\\\n\\\\tself initializeNetwork.\\\\n\\\\t^[ super new initialize: TCPSocketType ]\\\\n\\\\t\\\\trepeatWithGCIf: [ :socket | socket isValid not ]! !\\\\n\\\\n!Socket class methodsFor: 'instance creation' stamp: 'mir 2/22/2002 15:49'!\\\\nnewUDP\\\\n\\\\t\\\\\\\"Create a socket and initialise it for UDP\\\\\\\"\\\\n\\\\tself initializeNetwork.\\\\n\\\\t^[ super new initialize: UDPSocketType ]\\\\n\\\\t\\\\trepeatWithGCIf: [ :socket | socket isValid not ]! !\\\\n\\\\n!Socket class methodsFor: 'instance creation' stamp: 'mir 2/22/2002 15:49'!\\\\ntcpCreateIfFail: failBlock\\\\n\\\\t\\\\\\\"Attempt to create a new socket. If successful, return the new socket. Otherwise, return the result of evaluating the given block. Socket creation can fail if the network isn't available or if there are not sufficient resources available to create another socket.\\\\\\\"\\\\n\\\\n\\\\t| sock |\\\\n\\\\tself initializeNetwork.\\\\n\\\\tsock _ super new initialize: TCPSocketType.\\\\n\\\\tsock isValid ifFalse: [^ failBlock value].\\\\n\\\\t^ sock\\\\n! !\\\\n\\\\n!Socket class methodsFor: 'instance creation' stamp: 'mir 2/22/2002 15:49'!\\\\nudpCreateIfFail: failBlock\\\\n\\\\t\\\\\\\"Attempt to create a new socket. If successful, return the new socket. Otherwise, return the result of evaluating the given block. Socket creation can fail if the network isn't available or if there are not sufficient resources available to create another socket.\\\\\\\"\\\\n\\\\n\\\\t| sock |\\\\n\\\\tself initializeNetwork.\\\\n\\\\tsock _ super new initialize: UDPSocketType.\\\\n\\\\tsock isValid ifFalse: [^ failBlock value].\\\\n\\\\t^ sock\\\\n! !\\\\n\\\\n\\\\n!Socket class methodsFor: 'network initialization' stamp: 'mir 2/22/2002 15:01'!\\\\ninitializeNetwork\\\\n\\\\t\\\\\\\"Initialize the network drivers and the NetNameResolver. Do nothing if the network is already initialized.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: The network must be re-initialized every time Squeak starts up, so applications that persist across snapshots should be prepared to re-initialize the network as needed. Such applications should call 'Socket initializeNetwork' before every network transaction. \\\\\\\"\\\\n\\\\n\\\\tNetNameResolver initializeNetwork! !\\\\n\\\\n!Socket class methodsFor: 'network initialization' stamp: 'mir 2/22/2002 14:59'!\\\\nprimInitializeNetwork: resolverSemaIndex\\\\n\\\\t\\\\\\\"Initialize the network drivers on platforms that need it, such as the Macintosh, and return nil if network initialization failed or the reciever if it succeeds. Since mobile computers may not always be connected to a network, this method should NOT be called automatically at startup time; rather, it should be called when first starting a networking application. It is a noop if the network driver has already been initialized. If non-zero, resolverSemaIndex is the index of a VM semaphore to be associated with the network name resolver. This semaphore will be signalled when the resolver status changes, such as when a name lookup query is completed.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: some platforms (e.g., Mac) only allow only one name lookup query at a time, so a manager process should be used to serialize resolver lookup requests.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveInitializeNetwork' module: 'SocketPlugin'>\\\\n\\\\t^ nil  \\\\\\\"return nil if primitive fails\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!Socket class methodsFor: 'registry' stamp: 'ar 10/7/1998 14:40'!\\\\nregister: anObject\\\\n\\\\tWeakArray isFinalizationSupported ifFalse:[^anObject].\\\\n\\\\tself registry add: anObject! !\\\\n\\\\n!Socket class methodsFor: 'registry' stamp: 'ar 10/7/1998 14:40'!\\\\nregistry\\\\n\\\\tWeakArray isFinalizationSupported ifFalse:[^nil].\\\\n\\\\t^Registry isNil\\\\n\\\\t\\\\tifTrue:[Registry := WeakRegistry new]\\\\n\\\\t\\\\tifFalse:[Registry].! !\\\\n\\\\n!Socket class methodsFor: 'registry' stamp: 'ar 12/12/2001 19:12'!\\\\nregistryThreshold\\\\n\\\\t\\\\\\\"Return the registry threshold above which socket creation may fail due to too many already open sockets. If the threshold is reached, a full GC will be issued if the creation of a socket fails.\\\\\\\"\\\\n\\\\t^RegistryThreshold! !\\\\n\\\\n!Socket class methodsFor: 'registry' stamp: 'ar 12/12/2001 19:12'!\\\\nregistryThreshold: aNumber\\\\n\\\\t\\\\\\\"Return the registry threshold above which socket creation may fail due to too many already open sockets. If the threshold is reached, a full GC will be issued if the creation of a socket fails.\\\\\\\"\\\\n\\\\tRegistryThreshold _ aNumber! !\\\\n\\\\n!Socket class methodsFor: 'registry' stamp: 'ar 10/7/1998 15:22'!\\\\nunregister: anObject\\\\n\\\\tWeakArray isFinalizationSupported ifFalse:[^anObject].\\\\n\\\\tself registry remove: anObject ifAbsent:[]! !\\\\n\\\\n\\\\n!Socket class methodsFor: 'utilities' stamp: 'tk 4/9/98 15:54'!\\\\ndeadServer\\\\n\\\\n\\\\t^ DeadServer! !\\\\n\\\\n!Socket class methodsFor: 'utilities' stamp: 'tk 4/9/98 15:56'!\\\\ndeadServer: aStringOrNil\\\\n\\\\t\\\\\\\"Keep the machine name of the most recently encoutered non-responding machine.  Next time the user can move it to the last in a list of servers to try.\\\\\\\"\\\\n\\\\n\\\\tDeadServer _ aStringOrNil! !\\\\n\\\\n!Socket class methodsFor: 'utilities' stamp: 'mir 5/15/2003 18:28'!\\\\ndeadlineSecs: secs\\\\n\\\\t\\\\\\\"Return a deadline time the given number of seconds from now.\\\\\\\"\\\\n\\\\n\\\\t^ Time millisecondClockValue + (secs * 1000) truncated\\\\n! !\\\\n\\\\n!Socket class methodsFor: 'utilities' stamp: 'jm 1/14/1999 12:13'!\\\\nnameForWellKnownTCPPort: portNum\\\\n\\\\t\\\\\\\"Answer the name for the given well-known TCP port number. Answer a string containing the port number if it isn't well-known.\\\\\\\"\\\\n\\\\n\\\\t| portList entry |\\\\n\\\\tportList _ #(\\\\n\\\\t\\\\t(7 'echo') (9 'discard') (13 'time') (19 'characterGenerator')\\\\n\\\\t\\\\t(21 'ftp') (23 'telnet') (25 'smtp')\\\\n\\\\t\\\\t(80 'http') (110 'pop3') (119 'nntp')).\\\\n\\\\tentry _ portList detect: [:pair | pair first = portNum] ifNone: [^ 'port-', portNum printString].\\\\n\\\\t^ entry last\\\\n! !\\\\n\\\\n!Socket class methodsFor: 'utilities' stamp: 'mir 5/15/2003 18:30'!\\\\nping: hostName\\\\n\\\\t\\\\\\\"Ping the given host. Useful for checking network connectivity. The host must be running a TCP echo server.\\\\\\\"\\\\n\\\\t\\\\\\\"Socket ping: 'squeak.cs.uiuc.edu'\\\\\\\"\\\\n\\\\n\\\\t| tcpPort sock serverAddr startTime echoTime |\\\\n\\\\ttcpPort _ 7.  \\\\\\\"7 = echo port, 13 = time port, 19 = character generator port\\\\\\\"\\\\n\\\\n\\\\tserverAddr _ NetNameResolver addressForName: hostName timeout: 10.\\\\n\\\\tserverAddr = nil ifTrue: [\\\\n\\\\t\\\\t^ self inform: 'Could not find an address for ', hostName].\\\\n\\\\n\\\\tsock _ Socket new.\\\\n\\\\tsock connectNonBlockingTo: serverAddr port: tcpPort.\\\\n\\\\t[sock waitForConnectionFor: 10]\\\\n\\\\t\\\\ton: ConnectionTimedOut\\\\n\\\\t\\\\tdo: [:ex |\\\\n\\\\t\\\\t\\\\t(self confirm: 'Continue to wait for connection to ', hostName, '?')\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [ex retry]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsock destroy.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ self]].\\\\n\\\\n\\\\tsock sendData: 'echo!!'.\\\\n\\\\tstartTime _ Time millisecondClockValue.\\\\n\\\\t[sock waitForDataFor: 15]\\\\n\\\\t\\\\ton: ConnectionTimedOut\\\\n\\\\t\\\\tdo: [:ex | (self confirm: 'Packet sent but no echo yet; keep waiting?')\\\\n\\\\t\\\\t\\\\tifTrue: [ex retry]].\\\\n\\\\techoTime _ Time millisecondClockValue - startTime.\\\\n\\\\n\\\\tsock destroy.\\\\n\\\\tself inform: hostName, ' responded in ', echoTime printString, ' milliseconds'.\\\\n! !\\\\n\\\\n!Socket class methodsFor: 'utilities' stamp: 'mir 2/22/2002 15:49'!\\\\npingPorts: portList on: hostName timeOutSecs: timeOutSecs\\\\n\\\\t\\\\\\\"Attempt to connect to each of the given sockets on the given host. Wait at most timeOutSecs for the connections to be established. Answer an array of strings indicating the available ports.\\\\\\\"\\\\n\\\\t\\\\\\\"Socket pingPorts: #(7 13 19 21 23 25 80 110 119) on: 'squeak.cs.uiuc.edu' timeOutSecs: 15\\\\\\\"\\\\n\\\\n\\\\t| serverAddr sockets sock deadline done unconnectedCount connectedCount waitingCount result |\\\\n\\\\tserverAddr _ NetNameResolver addressForName: hostName timeout: 10.\\\\n\\\\tserverAddr = nil ifTrue: [\\\\n\\\\t\\\\tself inform: 'Could not find an address for ', hostName.\\\\n\\\\t\\\\t^ #()].\\\\n\\\\n\\\\tsockets _ portList collect: [:portNum |\\\\n\\\\t\\\\tsock _ Socket new.\\\\n\\\\t\\\\tsock connectTo: serverAddr port: portNum].\\\\n\\\\n\\\\tdeadline _ self deadlineSecs: timeOutSecs.\\\\n\\\\tdone _ false.\\\\n\\\\t[done] whileFalse: [\\\\n\\\\t\\\\tunconnectedCount _ 0.\\\\n\\\\t\\\\tconnectedCount _ 0.\\\\n\\\\t\\\\twaitingCount _ 0.\\\\n\\\\t\\\\tsockets do: [:s |\\\\n\\\\t\\\\t\\\\ts isUnconnectedOrInvalid\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [unconnectedCount _ unconnectedCount + 1]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ts isConnected ifTrue: [connectedCount _ connectedCount + 1].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ts isWaitingForConnection ifTrue: [waitingCount _ waitingCount + 1]]].\\\\n\\\\t\\\\twaitingCount = 0 ifTrue: [done _ true].\\\\n\\\\t\\\\tconnectedCount = sockets size ifTrue: [done _ true].\\\\n\\\\t\\\\tTime millisecondClockValue > deadline ifTrue: [done _ true]].\\\\n\\\\n\\\\tresult _ (sockets select: [:s | s isConnected])\\\\n\\\\t\\\\tcollect: [:s | self nameForWellKnownTCPPort: s remotePort].\\\\n\\\\tsockets do: [:s | s destroy].\\\\n\\\\t^ result\\\\n! !\\\\n\\\\n!Socket class methodsFor: 'utilities' stamp: 'jm 1/14/1999 17:25'!\\\\npingPortsOn: hostName\\\\n\\\\t\\\\\\\"Attempt to connect to a set of well-known sockets on the given host, and answer the names of the available ports.\\\\\\\"\\\\n\\\\t\\\\\\\"Socket pingPortsOn: 'www.disney.com'\\\\\\\"\\\\n\\\\n\\\\t^ Socket\\\\n\\\\t\\\\tpingPorts: #(7 13 19 21 23 25 80 110 119)\\\\n\\\\t\\\\ton: hostName\\\\n\\\\t\\\\ttimeOutSecs: 20\\\\n! !\\\\n\\\\n!Socket class methodsFor: 'utilities' stamp: 'mir 5/15/2003 16:17'!\\\\nstandardDeadline\\\\n\\\\t\\\\\\\"Return a default deadline time some seconds into the future.\\\\\\\"\\\\n\\\\n\\\\t^ self deadlineSecs: self standardTimeout\\\\n! !\\\\n\\\\n!Socket class methodsFor: 'utilities' stamp: 'mir 5/15/2003 16:16'!\\\\nstandardTimeout\\\\n\\\\n\\\\t^45\\\\n! !\\\\n\\\\n!Socket class methodsFor: 'utilities' stamp: 'ar 4/30/1999 04:21'!\\\\nwildcardAddress\\\\n\\\\t\\\\\\\"Answer a don't-care address for use with UDP sockets.\\\\\\\"\\\\n\\\\n\\\\t^ByteArray new: 4\\\\t\\\\t\\\\\\\"0.0.0.0\\\\\\\"! !\\\\n\\\\n!Socket class methodsFor: 'utilities' stamp: 'ar 4/30/1999 04:21'!\\\\nwildcardPort\\\\n\\\\t\\\\\\\"Answer a don't-care port for use with UDP sockets.  (The system will allocate an\\\\n\\\\tunused port number to the socket.)\\\\\\\"\\\\n\\\\n\\\\t^0! !\\\\n\\\\n\\\\n!Socket class methodsFor: 'tests' stamp: 'gk 12/15/2005 01:18'!\\\\nloopbackTest\\\\n\\\\t\\\\\\\"Send data from one socket to another on the local machine.\\\\n\\\\tTests most of the socket primitives.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"100 timesRepeat: [Socket loopbackTest]\\\\\\\"\\\\n\\\\n\\\\t| sock1 sock2 bytesToSend sendBuf receiveBuf done bytesSent bytesReceived t extraBytes packetsSent packetsRead |\\\\n\\\\tTranscript\\\\n\\\\t\\\\tcr;\\\\n\\\\t\\\\tshow: 'starting loopback test';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: '---------- Connecting ----------';\\\\n\\\\t\\\\tcr.\\\\n\\\\tself initializeNetwork.\\\\n\\\\tsock1 := self new.\\\\n\\\\tsock2 := self new.\\\\n\\\\tsock1 listenOn: 54321.\\\\n\\\\tsock2 connectTo: NetNameResolver localHostAddress port: 54321.\\\\n\\\\tsock1 waitForConnectionFor: self standardTimeout.\\\\n\\\\tsock2 waitForConnectionFor: self standardTimeout.\\\\n\\\\tsock1 isConnected ifFalse: [self error: 'sock1 not connected'].\\\\n\\\\tsock2 isConnected ifFalse: [self error: 'sock2 not connected'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'connection established';\\\\n\\\\t\\\\tcr.\\\\n\\\\tbytesToSend := 5000000.\\\\n\\\\tsendBuf := String new: 5000 withAll: $x.\\\\n\\\\treceiveBuf := String new: 50000.\\\\n\\\\tdone := false.\\\\n\\\\tpacketsSent := packetsRead := bytesSent := bytesReceived := 0.\\\\n\\\\tt := Time millisecondsToRun: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[[done] whileFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[(sock1 sendDone and: [bytesSent < bytesToSend]) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[packetsSent := packetsSent + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbytesSent := bytesSent + (sock1 sendSomeData: sendBuf)].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsock2 dataAvailable \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[packetsRead := packetsRead + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbytesReceived := bytesReceived + (sock2 receiveDataInto: receiveBuf)].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdone := bytesSent >= bytesToSend and: [bytesReceived = bytesSent]]].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'closing connection';\\\\n\\\\t\\\\tcr.\\\\n\\\\tsock1 waitForSendDoneFor: self standardTimeout.\\\\n\\\\tsock1 close.\\\\n\\\\tsock2 waitForDisconnectionFor: self standardTimeout.\\\\n\\\\textraBytes := sock2 discardReceivedData.\\\\n\\\\textraBytes > 0 \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[Transcript\\\\n\\\\t\\\\t\\\\t\\\\tshow: ' *** received ' , extraBytes size printString , ' extra bytes ***';\\\\n\\\\t\\\\t\\\\t\\\\tcr].\\\\n\\\\tsock2 close.\\\\n\\\\tsock1 waitForDisconnectionFor: self standardTimeout.\\\\n\\\\tsock1 isUnconnectedOrInvalid ifFalse: [self error: 'sock1 not closed'].\\\\n\\\\tsock2 isUnconnectedOrInvalid ifFalse: [self error: 'sock2 not closed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: '---------- Connection Closed ----------';\\\\n\\\\t\\\\tcr.\\\\n\\\\tsock1 destroy.\\\\n\\\\tsock2 destroy.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'loopback test done; time = ' , t printString;\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: (bytesToSend asFloat / t roundTo: 0.01) printString \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, '* 1000 bytes/sec';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript endEntry! !\\\\n\\\\n!Socket class methodsFor: 'tests' stamp: 'gk 12/15/2005 01:03'!\\\\nnewAcceptCheck\\\\n\\\\t\\\\\\\"Check if the platform has support for the BSD style accept().\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Socket newAcceptCheck\\\\\\\"\\\\n\\\\t\\\\n\\\\t| socket |\\\\n\\\\tself initializeNetwork.\\\\n\\\\tsocket _ self newTCP.\\\\n\\\\tsocket listenOn: 44444 backlogSize: 4.\\\\n\\\\tsocket isValid ifTrue: [\\\\n\\\\t\\\\tself inform: 'Everything looks OK for the BSD style accept()'\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tself inform: 'It appears that you DO NOT have support for the BSD style accept()'].\\\\n\\\\tsocket destroy! !\\\\n\\\\n!Socket class methodsFor: 'tests' stamp: 'gk 12/15/2005 01:10'!\\\\nsendTest\\\\n\\\\t\\\\\\\"Send data to the 'discard' socket of the given host.\\\\n\\\\tTests the speed of one-way data transfers across the\\\\n\\\\tnetwork to the given host. Note that most hosts\\\\n\\\\tdo not run a discard server.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Socket sendTest\\\\\\\"\\\\n\\\\n\\\\t| sock bytesToSend sendBuf bytesSent t serverName serverAddr |\\\\n\\\\tTranscript cr; show: 'starting send test'; cr.\\\\n\\\\tself initializeNetwork.\\\\n\\\\tserverName := UIManager default request: 'What is the destination server?' initialAnswer: 'create.ucsb.edu'.\\\\n\\\\tserverAddr := NetNameResolver addressForName: serverName timeout: 10.\\\\n\\\\tserverAddr = nil \\\\n\\\\t\\\\tifTrue: [^self inform: 'Could not find an address for ' , serverName].\\\\n\\\\tsock := self new.\\\\n\\\\tTranscript show: '---------- Connecting ----------';cr.\\\\n\\\\tsock connectTo: serverAddr port: 9.\\\\n\\\\tsock isConnected ifFalse: [\\\\n\\\\t\\\\tsock destroy.\\\\n\\\\t\\\\t^self inform: 'could not connect'].\\\\n\\\\tTranscript show: 'connection established; sending data'; cr.\\\\n\\\\tbytesToSend := 1000000.\\\\n\\\\tsendBuf := String new: 64 * 1024 withAll: $x.\\\\n\\\\tbytesSent := 0.\\\\n\\\\tt := Time millisecondsToRun: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[[bytesSent < bytesToSend] whileTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[sock sendDone \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [bytesSent := bytesSent + (sock sendSomeData: sendBuf)]]].\\\\n\\\\tsock waitForSendDoneFor: self standardTimeout.\\\\n\\\\tsock destroy.\\\\n\\\\tTranscript show: '---------- Connection Closed ----------'; cr;\\\\n\\\\t\\\\tshow: 'send test done; time = ' , t printString; cr;\\\\n\\\\t\\\\tshow: (bytesToSend asFloat / t roundTo: 0.01) printString, ' * 1000 bytes/sec';cr;endEntry! !\\\\nObject subclass: #SocketStream\\\\n\\\\tinstanceVariableNames: 'recentlyRead socket inBuffer outBuffer inNextToWrite outNextToWrite lastRead timeout autoFlush bufferSize binary shouldSignal'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Network-Kernel'!\\\\n!SocketStream commentStamp: 'md 7/14/2006 16:32' prior: 0!\\\\nSocketStream is a wrapper for class Socket making it easy to write networking code by giving the programmer a stream-like protocol. A Socket is a two way communication link with two logically separate channels - input and output. The Socket class is the lowest level in Squeak for network communication and using it directly can be difficult and bug prone.\\\\n\\\\nA SocketStream can be in binary or ascii mode, ascii is the default which means you are transmitting and receiving Strings. Most Internet protocols are in clear text ascii, like for example HTTP. Another setting is what timeout you want to use - default is the standardTimeout from Socket. More settings can be found in the method category 'configuration'.\\\\n\\\\nSimplest example of connecting, sending/receiving and closing:\\\\n\\\\n| stream result |\\\\nstream := SocketStream openConnectionToHostNamed: 'www.squeak.org' port: 80.\\\\n[[stream nextPutAll: 'GET / HTTP/1.0'; crlf; crlf; flush.\\\\nresult := stream upToEnd. \\\\\\\"Give us all data until the socket is closed.\\\\\\\"\\\\nTranscript show: result; cr.]\\\\n\\\\tensure: [stream close]]\\\\n\\\\t\\\\ton: ConnectionTimedOut\\\\n\\\\t\\\\tdo: [:ex | Transcript show: ex asString;cr. ex resume]\\\\n\\\\nThere are two important things to note above:\\\\n\\\\t- The methods in category \\\\\\\"stream in\\\\\\\" can signal two exceptions (unless turned off with #shouldSignal:):\\\\n\\\\t\\\\tConnectionClosed and ConnectionTimedOut\\\\n\\\\t- We close the stream using #ensure:, that is to make sure it isn't left opened.\\\\n\\\\t- We use #on:do: to catch any signal. In this case we do not need to catch ConnectionClosed since #upToEnd does that for us intrinsically.\\\\n\\\\n----------------\\\\nSocketStream (below called SS) is a reimplementation of 'Old'-SocketStream (below called OSS) - the class that originates from the original Comanche implementation but now is included in standard Squeak. SS has the same protocol as OSS and is meant to replace it. SS is faster, more flexible, is better documented and adds a few features:\\\\n\\\\n1. #shouldSignal:, which decides if SS should signal low level Socket exceptions (true) or if it should swallow them like original OSS did. Default is true. The only reason I added this is for backwards compatibility - not signalling causes problems - see bug 4 below.\\\\n\\\\n2. #nextAllInBuffer, #nextInBuffer:, #skip:, #receiveData:, #nextPutAllFlush: and #recentlyRead are new additions to the public protocol.\\\\n\\\\n\\\\nIt also fixes various bugs:\\\\n\\\\n1. #isDataAvailable could theoretically answer false, when there actually is some in the buffer in OSS. If #receiveDataIfAvailable reads the last byte then the following \\\\\\\"socket dataAvailable\\\\\\\" would answer false. So the last byte would be sitting in the inStream missed.\\\\n\\\\n2. #upToAll: in OSS has several problems, for example - #positionOfSubCollection:ifAbsent: which was introduced answers one position too low. This was compensated in upToAll:, but only in the pushBack: call, not the actual result being returned which was cut short 1 byte. Amusingly this makes KomHttpServer not use \\\\\\\"Keep-Alive\\\\\\\" since the last $e in 'Alive' was cut short. :)\\\\n\\\\n3. SS doesn't inherit from PositionableStream since that just breaks various inherited messages, like for example #skip:. OSS should IMHO be changed to inherit from Object - or of course, replaced in full with SS. :)\\\\n\\\\n4. Since SocketStream by default signals closes and timeouts the SocketStreamTest now passes. The reason for SocketStream to fail is that while it does timeout on a low level (#SocketStream>>receiveData doesn't hang forever) - the callers of #receiveData sometimes loop - like in #next:, and thus eliminates the timeout. SS warns about some methods (in their method comments) not honouring timeouts if shouldSignal is false, I really don't know what they should do in that case:\\\\n\\\\t#next:, #upTo:, #upToAll: and #upToEnd (and #receiveData:)\\\\n\\\\n\\\\nThe primary reason for the SS implementation is optimal performance. The main differences in implementation with the old OSS are:\\\\n\\\\n1. SS uses two buffers directly (inBuffer and outBuffer) with pointers marking start and stop within the buffer. OSS instead uses two regular streams, a ReadStream and a WriteStream. Using internal buffers makes it possible to avoid copying and reallocation in various ways, it also makes SS be able to have specialized growing/buffer moving behaviour.\\\\n\\\\n2. #upTo:, #upToAll: and #peekForAll: uses selectged String messages that in turn uses fast primitives for searching. OSS used other messages that fell back on byte per byte reading.\\\\n\\\\n3. #receiveData in OSS creates a temporary buffer stream for each call!! During a long read operation, like say #upToAll: (which for example is used when uploading files using HTTP POST forms), this is devastating - especially since the default size is only 2000 bytes - and leads to a very high number of low level read operations on the Socket, typically 100 times more calls than with OSS. The buffer in OSS is held in an instvar (not recreated for each call), is larger from the start and above all - grows dynamically by doubling. OSS can also avoid a grow/reallocation by doing a \\\\\\\"move down\\\\\\\" if data has been read from the SS as it comes in and through that making room in the lower part of the inBuffer. The net result is that upToAll: for large files is about 10 times faster.\\\\n\\\\n4. The implementation of upTo: and upToAll: tries to avoid doing unnecessary find operations in the buffer and is greedy by default, which means it favors reading more data - if available - before searching for the stop sequence. If we had #findString:startingAt:stoppingAt: this wouldn't have to be greedy and we wouldn't be needlessly scanning dead buffer area. VM hackers? Also, while you are at it - make it work for ByteArrays too. :)\\\\n\\\\n\\\\nSS can not be run unbuffered, since that seems unneeded. The option to autoFlush is still available, with it set to true SocketStream (just like OSS) will flush on its own on each nextPut:/nextPutAll:, otherwise flushing it will have to be done manually but is done on close.\\\\n\\\\nThe first performance tests shows that, as noted above, receiving large amounts of data using #upToAll: is greatly improved - factor of 10. Serving HTTP with small payloads seemed at first not be faster at all - but this is due to the high overhead of Socket connect/close and other things. Increasing payloads show a difference and especially with keep alive on - where the new SS roughly doubles the throughput!!!\\\\n\\\\n\\\\n!SocketStream methodsFor: 'configuration' stamp: 'gk 2/9/2005 22:37'!\\\\nascii\\\\n\\\\t\\\\\\\"Tell the SocketStream to send data\\\\n\\\\tas Strings instead of ByteArrays.\\\\n\\\\tThis is default.\\\\\\\"\\\\n\\\\n\\\\tbinary := false.\\\\n\\\\tself resetBuffers! !\\\\n\\\\n!SocketStream methodsFor: 'configuration' stamp: 'gk 2/9/2005 22:26'!\\\\nautoFlush\\\\n\\\\t\\\\\\\"If autoFlush is enabled data will be sent through\\\\n\\\\tthe socket (flushed) when the bufferSize is reached\\\\n\\\\tor the SocketStream is closed. Otherwise the user\\\\n\\\\twill have to send #flush manually.\\\\n\\\\tClose will always flush. Default is false.\\\\\\\"\\\\n\\\\n\\\\t^autoFlush! !\\\\n\\\\n!SocketStream methodsFor: 'configuration' stamp: 'gk 2/9/2005 22:27'!\\\\nautoFlush: aBoolean\\\\n\\\\t\\\\\\\"If autoFlush is enabled data will be sent through\\\\n\\\\tthe socket (flushed) when the bufferSize is reached\\\\n\\\\tor the SocketStream is closed. Otherwise the user\\\\n\\\\twill have to send #flush manually.\\\\n\\\\tClose will always flush. Default is false.\\\\\\\"\\\\n\\\\n\\\\tautoFlush := aBoolean! !\\\\n\\\\n!SocketStream methodsFor: 'configuration' stamp: 'gk 2/9/2005 22:37'!\\\\nbinary\\\\n\\\\t\\\\\\\"Tell the SocketStream to send data\\\\n\\\\tas ByteArrays instead of Strings.\\\\n\\\\tDefault is ascii.\\\\\\\"\\\\n\\\\n\\\\tbinary := true.\\\\n\\\\tself resetBuffers! !\\\\n\\\\n!SocketStream methodsFor: 'configuration' stamp: 'gk 2/9/2005 22:28'!\\\\nbufferSize\\\\n\\\\t\\\\\\\"Default buffer size is 4kb.\\\\n\\\\tincreased from earlier 2000 bytes.\\\\\\\"\\\\n\\\\t\\\\n\\\\t^bufferSize! !\\\\n\\\\n!SocketStream methodsFor: 'configuration' stamp: 'gk 2/9/2005 22:28'!\\\\nbufferSize: anInt\\\\n\\\\t\\\\\\\"Default buffer size is 4kb.\\\\n\\\\tincreased from earlier 2000 bytes.\\\\\\\"\\\\n\\\\n\\\\tbufferSize := anInt! !\\\\n\\\\n!SocketStream methodsFor: 'configuration' stamp: 'gk 2/10/2005 17:58'!\\\\ninBufferSize\\\\n\\\\t\\\\\\\"Answers the current size of data in the inBuffer.\\\\\\\"\\\\n\\\\n\\\\t^inNextToWrite - lastRead - 1! !\\\\n\\\\n!SocketStream methodsFor: 'configuration' stamp: 'gk 2/10/2005 17:59'!\\\\nnoTimeout\\\\n\\\\t\\\\\\\"Do not use timeout.\\\\\\\"\\\\n\\\\n\\\\ttimeout := 0! !\\\\n\\\\n!SocketStream methodsFor: 'configuration' stamp: 'gk 2/10/2005 17:59'!\\\\noutBufferSize\\\\n\\\\t\\\\\\\"Answers the current size of data in the outBuffer.\\\\\\\"\\\\n\\\\n\\\\t^outNextToWrite - 1! !\\\\n\\\\n!SocketStream methodsFor: 'configuration' stamp: 'gk 2/10/2005 18:00'!\\\\nshouldSignal\\\\n\\\\t\\\\\\\"If shouldSignal is enabled the Socket Exceptions\\\\n\\\\tConnectionClosed and ConnectionTimedOut\\\\n\\\\twill not be swallowed. Default is true.\\\\n\\\\tFor more info, see #shouldSignal:\\\\\\\"\\\\n\\\\n\\\\t^shouldSignal! !\\\\n\\\\n!SocketStream methodsFor: 'configuration' stamp: 'gk 2/10/2005 18:03'!\\\\nshouldSignal: aBoolean\\\\n\\\\t\\\\\\\"If shouldSignal is enabled the Socket Exceptions\\\\n\\\\tConnectionClosed and ConnectionTimedOut will not be swallowed.\\\\n\\\\tDefault is true. And please - don't set it to false - it is better to\\\\n\\\\tuse an exception handler (see below)  and several methods\\\\n\\\\tin this class will not honour timeouts (says so in their method comments).\\\\n\\\\tAlso, it is quite hard to understand what for example #upToEnd\\\\n\\\\tshould return to indicate a timeout.\\\\n\\\\t\\\\n\\\\tWrap your use of SocketStream with a handler like:\\\\n\\\\t\\\\n\\\\t[stuff _ mySocketStream next: 10]\\\\n\\\\t\\\\ton: ConnectionClosed, ConnectionTimedOut\\\\n\\\\t\\\\tdo: [:ex |\\\\n\\\\t\\\\t\\\\tTranscript show: 'Oops!! Did not get my ten bytes!!;cr]\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\tshouldSignal := aBoolean! !\\\\n\\\\n!SocketStream methodsFor: 'configuration' stamp: 'gk 2/3/2005 20:35'!\\\\nsocket\\\\n\\\\t^socket! !\\\\n\\\\n!SocketStream methodsFor: 'configuration' stamp: 'gk 2/3/2005 20:35'!\\\\nsocket: aSocket\\\\n\\\\tsocket _ aSocket! !\\\\n\\\\n!SocketStream methodsFor: 'configuration' stamp: 'gk 2/7/2005 08:41'!\\\\ntimeout\\\\n\\\\t\\\\\\\"Lazily initialized unless it has been set explicitly.\\\\\\\"\\\\n\\\\n\\\\ttimeout ifNil: [timeout := Socket standardTimeout].\\\\n\\\\t^timeout! !\\\\n\\\\n!SocketStream methodsFor: 'configuration' stamp: 'gk 2/3/2005 20:35'!\\\\ntimeout: seconds\\\\n\\\\ttimeout := seconds! !\\\\n\\\\n\\\\n!SocketStream methodsFor: 'control' stamp: 'gk 2/24/2005 11:55'!\\\\nclose\\\\n\\\\t\\\\\\\"Flush any data still not sent\\\\n\\\\tand take care of the socket.\\\\\\\"\\\\n\\\\n\\\\tself flush.\\\\n\\\\tsocket closeAndDestroy: 30! !\\\\n\\\\n!SocketStream methodsFor: 'control' stamp: 'gk 9/9/2005 09:33'!\\\\nflush\\\\n\\\\t\\\\\\\"If the other end is connected and we have something\\\\n\\\\tto send, then we send it and reset the outBuffer.\\\\\\\"\\\\n\\\\n\\\\t((outNextToWrite > 1) and: [socket isOtherEndClosed not])\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t[socket sendData: outBuffer count: outNextToWrite - 1]\\\\n\\\\t\\\\t\\\\t\\\\ton: ConnectionTimedOut\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:ex | shouldSignal ifFalse: [\\\\\\\"swallow\\\\\\\"]].\\\\n\\\\t\\\\t\\\\toutNextToWrite _ 1]! !\\\\n\\\\n!SocketStream methodsFor: 'control' stamp: 'gk 4/14/2005 09:49'!\\\\nreceiveData: nBytes\\\\n\\\\t\\\\\\\"Keep reading the socket until we have nBytes\\\\n\\\\tin the inBuffer or we reach the end. This method\\\\n\\\\tdoes not return data, but can be used to make sure\\\\n\\\\tdata has been read into the buffer from the Socket\\\\n\\\\tbefore actually reading it from the FastSocketStream.\\\\n\\\\tMainly used internally. We could also adjust the buffer\\\\n\\\\tto the expected amount of data and avoiding several\\\\n\\\\tincremental grow operations.\\\\n\\\\n\\\\tNOTE: This method doesn't honor timeouts if shouldSignal\\\\n\\\\tis false!! And frankly, I am not sure how to handle that\\\\n\\\\tcase or if I care - I think we should always signal.\\\\\\\"\\\\n\\\\n\\\\t[self atEnd not and: [nBytes > self inBufferSize]]\\\\n\\\\t\\\\twhileTrue: [self receiveData]! !\\\\n\\\\n!SocketStream methodsFor: 'control' stamp: 'gk 2/9/2005 23:08'!\\\\nrecentlyRead\\\\n\\\\t\\\\\\\"Return the number of bytes read\\\\n\\\\tduring the last socket operation.\\\\\\\"\\\\n\\\\t\\\\n\\\\t^recentlyRead! !\\\\n\\\\n\\\\n!SocketStream methodsFor: 'initialize-release' stamp: 'gk 2/25/2005 14:20'!\\\\ninitialize\\\\n\\\\tautoFlush _ true.\\\\n\\\\tshouldSignal _ true.\\\\n\\\\trecentlyRead _ 0.\\\\n\\\\tbufferSize _ 4096.\\\\n\\\\tself ascii! !\\\\n\\\\n\\\\n!SocketStream methodsFor: 'printing' stamp: 'gk 2/25/2005 14:19'!\\\\ndebug\\\\n\\\\t\\\\\\\"Display debug info.\\\\\\\"\\\\n\\\\n\\\\t| data |\\\\n\\\\tdata _ self inBufferSize.\\\\n\\\\t^String streamContents: [:s |\\\\n\\\\t\\\\ts\\\\n\\\\t\\\\t\\\\tnextPutAll: 'Buffer size: ', inBuffer size asString;cr;\\\\n\\\\t\\\\t\\\\tnextPutAll: 'InBuffer data size: ', data asString; cr;\\\\n\\\\t\\\\t\\\\tnextPutAll: 'In data (20):', (inBuffer copyFrom: lastRead + 1 to: lastRead + (data min: 20)); cr;\\\\n\\\\t\\\\t\\\\tnextPutAll: 'OutBuffer data size: ', (outNextToWrite - 1) asString; cr;\\\\n\\\\t\\\\t\\\\tnextPutAll: 'Out data (20):', (outBuffer copyFrom: 1 to: ((outNextToWrite - 1) min: 20)); cr]! !\\\\n\\\\n!SocketStream methodsFor: 'printing' stamp: 'md 7/14/2006 12:28'!\\\\nprint: anObject\\\\n\\\\tanObject printOn: self! !\\\\n\\\\n!SocketStream methodsFor: 'printing' stamp: 'gk 2/10/2005 11:44'!\\\\nprintOn: aStream\\\\n\\\\t\\\\\\\"Display buffer sizes.\\\\\\\"\\\\n\\\\n\\\\taStream nextPutAll: self class name.\\\\n\\\\tinBuffer ifNotNil: [\\\\n\\\\t\\\\taStream nextPutAll: '[inbuf:',\\\\n\\\\t\\\\t(inBuffer size / 1024) rounded asString, 'kb/outbuf:',\\\\n\\\\t\\\\t(outBuffer size / 1024) rounded asString, 'kb]']! !\\\\n\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 2/7/2005 13:33'!\\\\nnext\\\\n\\\\t\\\\\\\"Return next byte, if inBuffer is empty\\\\n\\\\twe recieve some more data and try again.\\\\\\\"\\\\n\\\\n\\\\tself atEnd ifTrue: [^nil].\\\\n\\\\tself isInBufferEmpty ifTrue:\\\\n\\\\t\\\\t[self receiveData.\\\\n\\\\t\\\\tself atEnd ifTrue: [^nil]].\\\\n\\\\tlastRead _ lastRead + 1.\\\\n\\\\t^inBuffer at: lastRead! !\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 2/7/2005 21:26'!\\\\nnextAllInBuffer\\\\n\\\\t\\\\\\\"Return all data currently in the inBuffer,\\\\\\\"\\\\n\\\\n\\\\t^self nextInBuffer: inNextToWrite - lastRead - 1! !\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 2/7/2005 12:51'!\\\\nnextInBuffer: anInteger\\\\n\\\\t\\\\\\\"Answer anInteger bytes of data at most,\\\\n\\\\tbut only from the inBuffer.\\\\\\\"\\\\n\\\\n\\\\t| start amount |\\\\n\\\\tamount _ anInteger min: (inNextToWrite - lastRead - 1).\\\\n\\\\tstart _ lastRead + 1.\\\\n\\\\tlastRead _ lastRead + amount.\\\\n\\\\t^inBuffer copyFrom: start to: lastRead! !\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 2/15/2005 14:17'!\\\\nnext: anInteger\\\\n\\\\t\\\\\\\"Answer anInteger bytes of data.\\\\n\\\\n\\\\tNOTE: This method doesn't honor timeouts if shouldSignal is false!!\\\\\\\"\\\\n\\\\n\\\\t| start |\\\\n\\\\tself receiveData: anInteger.\\\\n\\\\tstart _ lastRead + 1.\\\\n\\\\tlastRead _ (lastRead + anInteger) min: inNextToWrite - 1.\\\\n\\\\t^inBuffer copyFrom: start to: lastRead! !\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 2/7/2005 13:47'!\\\\nnextAvailable\\\\n\\\\t\\\\\\\"Answer all the data currently available,\\\\n\\\\tin buffer or in socket.\\\\\\\"\\\\n\\\\n\\\\tself isInBufferEmpty ifFalse: [^self nextAllInBuffer].\\\\n\\\\tself isDataAvailable ifTrue: [self receiveData].\\\\n\\\\t^self nextAllInBuffer! !\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 2/7/2005 13:02'!\\\\nnextAvailable: howMany\\\\n\\\\t\\\\\\\"Answer all the data currently available,\\\\n\\\\tin buffer or in socket - but limited to <howMany>.\\\\\\\"\\\\n\\\\n\\\\tself isInBufferEmpty ifFalse: [^self nextInBuffer: howMany].\\\\n\\\\tself isDataAvailable ifTrue: [self receiveData].\\\\n\\\\t^self nextInBuffer: howMany! !\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 2/3/2005 20:35'!\\\\nnextLine\\\\n\\\\t^self nextLineCrLf! !\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 2/24/2005 12:01'!\\\\nnextLineCrLf\\\\n\\\\t^self upToAll: String crlf! !\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 2/15/2005 14:16'!\\\\nnextLineLf\\\\n\\\\t| nextLine |\\\\n\\\\tnextLine := self upToAll: String lf.\\\\n\\\\t^nextLine! !\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 2/15/2005 14:09'!\\\\npeek\\\\n\\\\t\\\\\\\"Return next byte, if inBuffer is empty\\\\n\\\\twe recieve some more data and try again.\\\\n\\\\tDo not consume the byte.\\\\\\\"\\\\n\\\\n\\\\tself atEnd ifTrue: [^nil].\\\\n\\\\tself isInBufferEmpty ifTrue:\\\\n\\\\t\\\\t[self receiveData.\\\\n\\\\t\\\\tself atEnd ifTrue: [^nil]].\\\\n\\\\t^inBuffer at: lastRead! !\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 2/7/2005 14:04'!\\\\npeekFor: aCharacterOrByte\\\\n\\\\t\\\\\\\"Read and return next character or byte\\\\n\\\\tif it is equal to the argument.\\\\n\\\\tOtherwise return false.\\\\\\\"\\\\n\\\\n\\\\t| nextObject |\\\\n\\\\tself atEnd ifTrue: [^false].\\\\n\\\\tself isInBufferEmpty ifTrue: \\\\n\\\\t\\\\t[self receiveData.\\\\n\\\\t\\\\tself atEnd ifTrue: [^false]].\\\\n\\\\tnextObject _ inBuffer at: lastRead.\\\\n\\\\tnextObject = aCharacterOrByte ifTrue: [\\\\n\\\\t\\\\tlastRead _ lastRead + 1.\\\\n\\\\t\\\\t^true].\\\\n\\\\t^false\\\\n! !\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 2/15/2005 14:16'!\\\\npeekForAll: aString\\\\n\\\\t\\\\\\\"Answer whether or not the next string of characters in the receiver\\\\n\\\\tmatches aString. If a match is made, advance over that string in the receiver and\\\\n\\\\tanswer true. If no match, then leave the receiver alone and answer false.\\\\n\\\\tWe use findString:startingAt: to avoid copying.\\\\n\\\\n\\\\tNOTE: This method doesn't honor timeouts if shouldSignal is false!!\\\\\\\"\\\\n\\\\n\\\\t| sz start |\\\\n\\\\tsz _ aString size.\\\\n\\\\tself receiveData: sz.\\\\n\\\\t(inNextToWrite - lastRead - 1) < sz ifTrue: [^false].\\\\n\\\\tstart _ lastRead + 1.\\\\n\\\\t(inBuffer findString: aString startingAt: start) = start\\\\n\\\\t\\\\tifFalse: [^false].\\\\n\\\\tlastRead _ lastRead + sz.\\\\n\\\\t^true! !\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 2/15/2005 14:16'!\\\\npeek: anInteger\\\\n\\\\t\\\\\\\"Answer anInteger bytes of data.\\\\n\\\\tDo not consume data.\\\\n\\\\n\\\\tNOTE: This method doesn't honor timeouts if shouldSignal is false!!\\\\\\\"\\\\n\\\\n\\\\t| start |\\\\n\\\\tself receiveData: anInteger.\\\\n\\\\tstart _ lastRead + 1.\\\\n\\\\t^inBuffer copyFrom: start to: ((lastRead + anInteger) min: inNextToWrite - 1).! !\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 2/15/2005 14:15'!\\\\nskip: anInteger\\\\n\\\\t\\\\\\\"Skip a number of bytes.\\\\n\\\\tThis is faster than #next: since it does not\\\\n\\\\thave to copy and return a new String or ByteArray.\\\\n\\\\n\\\\tNOTE: This method doesn't honor timeouts if shouldSignal is false!!\\\\\\\"\\\\n\\\\n\\\\tself receiveData: anInteger.\\\\n\\\\tlastRead _ (lastRead + anInteger) min: inNextToWrite - 1! !\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 9/9/2005 02:57'!\\\\nupTo: aCharacterOrByte\\\\n\\\\t\\\\\\\"Return data up to, but not including given character or byte.\\\\n\\\\t\\\\n\\\\tNOTE: Does not honour timeouts if shouldSignal is false!!\\\\n\\\\t\\\\n\\\\tThis method looks a bit complicated, and this is mainly because there is no fast search method\\\\n\\\\tin String that takes a stoppingAt: argument. This means we need to ignore getting hits in the\\\\n\\\\tdead buffer area above inNextToWrite.\\\\n\\\\tAnother measure is that this implementation is greedy and will load data into the buffer\\\\n\\\\tuntil there is nothing more available, or it has loaded 100kb - and not until then we search the buffer.\\\\n\\\\n\\\\tA totally non greedy variant would search on every loop.\\\\\\\"\\\\n\\\\n\\\\t| index result lastRecentlyRead searchedSoFar |\\\\n\\\\tsearchedSoFar _ 0.\\\\n\\\\tlastRecentlyRead _ 0.\\\\n\\\\tindex _ 0.\\\\n\\\\t[self atEnd not and: [\\\\n\\\\t\\\\t((lastRecentlyRead = 0 and: [self isInBufferEmpty not]) or: [self inBufferSize > 100000]) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\\\\"Data begins at lastRead + 1, we add searchedSoFar as offset.\\\\\\\"\\\\n\\\\t\\\\t\\\\tindex _ inBuffer indexOf: aCharacterOrByte startingAt: lastRead + searchedSoFar + 1.\\\\n\\\\t\\\\t\\\\tsearchedSoFar _ self inBufferSize.\\\\n\\\\t\\\\t\\\\t(index > 0 and: [(index + 1) > inNextToWrite]) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"Oops, hit in dead buffer area.\\\\n\\\\t\\\\t\\\\t\\\\tThis is probably due to old data, so we ignore it.\\\\n\\\\t\\\\t\\\\t\\\\tNo point in cleaning the dead area to avoid hits - it will still search it.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tindex _ 0]].\\\\n\\\\t\\\\tindex = 0]]\\\\n\\\\t\\\\t\\\\t\\\\twhileTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\trecentlyRead = 0\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"blocking call for now, we don't want to poll\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself receiveData]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself receiveAvailableData].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tlastRecentlyRead _ recentlyRead].\\\\n\\\\tindex > 0\\\\n\\\\t\\\\tifTrue: [\\\\\\\"found it\\\\\\\"\\\\n\\\\t\\\\t\\\\tresult _ self nextInBuffer: index - lastRead - 1.\\\\n\\\\t\\\\t\\\\tself skip: 1.\\\\n\\\\t\\\\t\\\\t^ result]\\\\n\\\\t\\\\tifFalse: [\\\\\\\"atEnd\\\\\\\"\\\\n\\\\t\\\\t\\\\t^ self nextAllInBuffer]! !\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 9/9/2005 02:55'!\\\\nupToAll: aStringOrByteArray\\\\n\\\\t\\\\\\\"Answer a subcollection from the current access position to the occurrence (if any, but not\\\\n\\\\tinclusive) of aStringOrByteArray. If aCollection is not in the stream, answer the entire rest of\\\\n\\\\tthe stream.\\\\n\\\\t\\\\n\\\\tNOTE: Does not honour timeouts if shouldSignal is false!!\\\\n\\\\t\\\\n\\\\tThis method looks a bit complicated, and this is mainly because there is no fast search method\\\\n\\\\tin String that takes a stoppingAt: argument. This means we need to ignore getting hits in the\\\\n\\\\tdead buffer area above inNextToWrite.\\\\n\\\\tAnother measure is that this implementation is greedy and will load data into the buffer\\\\n\\\\tuntil there is nothing more available, or it has loaded 100kb - and not until then we search the buffer.\\\\n\\\\n\\\\tA totally non greedy variant would search on every loop.\\\\\\\"\\\\n\\\\n\\\\t| index sz result lastRecentlyRead searchedSoFar |\\\\n\\\\tsz _ aStringOrByteArray size.\\\\n\\\\tsearchedSoFar _ 0.\\\\n\\\\tlastRecentlyRead _ 0.\\\\n\\\\tindex _ 0.\\\\n\\\\t[self atEnd not and: [\\\\n\\\\t\\\\t((lastRecentlyRead = 0 and: [self isInBufferEmpty not]) or: [self inBufferSize > 100000]) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\\\\"Data begins at lastRead + 1, we add searchedSoFar as offset and backs up sz - 1\\\\n\\\\t\\\\t\\\\tso that we can catch any borderline hits.\\\\\\\"\\\\n\\\\t\\\\t\\\\tindex _ inBuffer indexOfSubCollection: aStringOrByteArray\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: lastRead + searchedSoFar - sz + 2.\\\\n\\\\t\\\\t\\\\tsearchedSoFar _ self inBufferSize.\\\\n\\\\t\\\\t\\\\t(index > 0 and: [(index + sz) > inNextToWrite]) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"Oops, hit partially or completely in dead buffer area.\\\\n\\\\t\\\\t\\\\t\\\\tThis is probably due to old data, so we ignore it.\\\\n\\\\t\\\\t\\\\t\\\\tNo point in cleaning the dead area to avoid hits - it will still search it.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tindex _ 0]].\\\\n\\\\t\\\\tindex = 0]]\\\\n\\\\t\\\\t\\\\t\\\\twhileTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\trecentlyRead = 0\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"blocking call for now, we don't want to poll\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself receiveData]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself receiveAvailableData].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tlastRecentlyRead _ recentlyRead].\\\\n\\\\tindex > 0\\\\n\\\\t\\\\tifTrue: [\\\\\\\"found it\\\\\\\"\\\\n\\\\t\\\\t\\\\tresult _ self nextInBuffer: index - lastRead - 1.\\\\n\\\\t\\\\t\\\\tself skip: sz.\\\\n\\\\t\\\\t\\\\t^ result]\\\\n\\\\t\\\\tifFalse: [\\\\\\\"atEnd\\\\\\\"\\\\n\\\\t\\\\t\\\\t^ self nextAllInBuffer]! !\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 2/15/2005 14:14'!\\\\nupToEnd\\\\n\\\\t\\\\\\\"Answer all data coming in on the socket until the socket\\\\n\\\\tis closed by the other end, or we get a timeout.\\\\n\\\\tThis means this method catches ConnectionClosed by itself.\\\\n\\\\t\\\\n\\\\tNOTE: Does not honour timeouts if shouldSignal is false!!\\\\\\\"\\\\n\\\\n\\\\t[[self atEnd] whileFalse: [self receiveData]]\\\\n\\\\t\\\\ton: ConnectionClosed\\\\n\\\\t\\\\tdo: [:ex | \\\\\\\"swallow it\\\\\\\"]. \\\\n\\\\t^self nextAllInBuffer! !\\\\n\\\\n\\\\n!SocketStream methodsFor: 'stream out' stamp: 'gk 2/3/2005 20:35'!\\\\ncr\\\\n\\\\tself nextPutAll: String cr! !\\\\n\\\\n!SocketStream methodsFor: 'stream out' stamp: 'gk 2/3/2005 20:35'!\\\\ncrlf\\\\n\\\\tself nextPutAll: String crlf! !\\\\n\\\\n!SocketStream methodsFor: 'stream out' stamp: 'gk 2/10/2005 11:14'!\\\\nnextPutAllFlush: aCollection\\\\n\\\\t\\\\\\\"Put a String or a ByteArray onto the stream.\\\\n\\\\tYou can use this if you have very large data - it avoids\\\\n\\\\tcopying into the buffer (and avoids buffer growing)\\\\n\\\\tand also flushes any other pending data first.\\\\\\\"\\\\n\\\\n\\\\t| toPut |\\\\n\\\\ttoPut _ binary ifTrue: [aCollection asByteArray] ifFalse: [aCollection asString].\\\\n\\\\tself flush. \\\\\\\"first flush pending stuff, then directly send\\\\\\\"\\\\n\\\\tsocket isOtherEndClosed ifFalse: [\\\\n\\\\t\\\\t[socket sendData: toPut count: toPut size]\\\\n\\\\t\\\\t\\\\ton: ConnectionTimedOut\\\\n\\\\t\\\\t\\\\tdo: [:ex | shouldSignal ifFalse: [\\\\\\\"swallow\\\\\\\"]]]! !\\\\n\\\\n!SocketStream methodsFor: 'stream out' stamp: 'md 2/24/2006 19:51'!\\\\nnextPut: char\\\\n\\\\t\\\\\\\"Put a single Character or byte onto the stream.\\\\\\\"\\\\n\\\\n\\\\t| toPut |\\\\n\\\\ttoPut _ binary ifTrue: [char asInteger] ifFalse: [char asCharacter].\\\\n\\\\tself adjustOutBuffer: 1.\\\\n\\\\toutBuffer at: outNextToWrite put: toPut.\\\\n\\\\toutNextToWrite _ outNextToWrite + 1.\\\\n\\\\tself checkFlush.\\\\n\\\\t\\\\\\\"return the argument - added by kwl\\\\\\\"\\\\n\\\\t^ char! !\\\\n\\\\n!SocketStream methodsFor: 'stream out' stamp: 'gk 2/7/2005 22:51'!\\\\nnextPutAll: aCollection\\\\n\\\\t\\\\\\\"Put a String or a ByteArray onto the stream.\\\\n\\\\tCurrently a large collection will allocate a large buffer.\\\\\\\"\\\\n\\\\n\\\\t| toPut |\\\\n\\\\ttoPut _ binary ifTrue: [aCollection asByteArray] ifFalse: [aCollection asString].\\\\n\\\\tself adjustOutBuffer: toPut size.\\\\n\\\\toutBuffer replaceFrom: outNextToWrite to: outNextToWrite + toPut size - 1 with: toPut startingAt: 1.\\\\n\\\\toutNextToWrite _ outNextToWrite + toPut size.\\\\n\\\\tself checkFlush! !\\\\n\\\\n!SocketStream methodsFor: 'stream out' stamp: 'gk 9/9/2005 09:32'!\\\\nsendCommand: aString\\\\n\\\\t\\\\\\\"Sends a String ending it with CR LF and then flush\\\\n\\\\tcausing it to block until sent.\\\\\\\"\\\\n\\\\n\\\\tself nextPutAll: aString, String crlf; flush! !\\\\n\\\\n!SocketStream methodsFor: 'stream out' stamp: 'gk 2/3/2005 20:35'!\\\\nspace\\\\n\\\\tself nextPut: Character space! !\\\\n\\\\n\\\\n!SocketStream methodsFor: 'testing' stamp: 'gk 2/25/2005 14:23'!\\\\natEnd\\\\n\\\\t\\\\\\\"There is nothing more to read when\\\\n\\\\tthere is no more data in our inBuffer, the socket\\\\n\\\\tis disconnected and there is none available on the socket.\\\\n\\\\tNote that we need to check isConnected before isDataAvailable,\\\\n\\\\totherwise data may sneak in in the meantime. But we check the\\\\n\\\\tbuffer first, because it is faster.\\\\\\\"\\\\n\\\\n\\\\tself isInBufferEmpty ifFalse: [^false].\\\\n\\\\t^self isConnected not\\\\n\\\\t\\\\tand: [self isDataAvailable not]! !\\\\n\\\\n!SocketStream methodsFor: 'testing' stamp: 'gk 2/3/2005 20:35'!\\\\nisBinary\\\\n\\\\t^binary! !\\\\n\\\\n!SocketStream methodsFor: 'testing' stamp: 'gk 2/7/2005 12:24'!\\\\nisConnected\\\\n\\\\t\\\\\\\"The stream is connected if the socket is.\\\\\\\"\\\\n\\\\n\\\\t^socket isConnected! !\\\\n\\\\n!SocketStream methodsFor: 'testing' stamp: 'gk 2/24/2005 12:23'!\\\\nisDataAvailable\\\\n\\\\t\\\\\\\"It the inbuffer is empty, we check the socket for data.\\\\n\\\\tIf it claims to have data available to read, we try to read\\\\n\\\\tsome once and recursively call this method again.\\\\n\\\\tIf something really was available it is now in the inBuffer.\\\\n\\\\tThis is because there has been spurious\\\\n\\\\tdataAvailable when there really is no data to get.\\\\\\\"\\\\n \\\\n\\\\tself isInBufferEmpty ifFalse: [^true].\\\\n\\\\t^socket dataAvailable\\\\n\\\\t\\\\tifFalse: [false]\\\\n\\\\t\\\\tifTrue: [self receiveDataIfAvailable; isDataAvailable]! !\\\\n\\\\n!SocketStream methodsFor: 'testing' stamp: 'gk 2/7/2005 13:02'!\\\\nisEmpty\\\\n\\\\t\\\\\\\"Test if there are more data to read.\\U0005\\\\\\\"\\\\n\\\\n\\\\t^self isInBufferEmpty and: [self isDataAvailable not]! !\\\\n\\\\n!SocketStream methodsFor: 'testing' stamp: 'gk 2/7/2005 13:02'!\\\\nisInBufferEmpty\\\\n\\\\t\\\\\\\"Any data in the buffer?\\\\\\\"\\\\n \\\\n\\\\t^lastRead + 1 = inNextToWrite! !\\\\n\\\\n!SocketStream methodsFor: 'testing' stamp: 'gk 2/7/2005 08:59'!\\\\nisOtherEndConnected\\\\n\\\\t^socket isOtherEndClosed not! !\\\\n\\\\n!SocketStream methodsFor: 'testing' stamp: 'gk 2/3/2005 20:35'!\\\\nshouldTimeout\\\\n\\\\t^self timeout > 0! !\\\\n\\\\n\\\\n!SocketStream methodsFor: 'private' stamp: 'gk 2/9/2005 22:44'!\\\\nadjustInBuffer: bytesRead\\\\n\\\\t\\\\\\\"Adjust markers and possibly grow inBuffer or move data down.\\\\n\\\\tCurrently grows through doubling when less than 1024 bytes are left.\\\\n\\\\tNever shrinks. Returns the position in the buffer where any new\\\\n\\\\tdata can be found.\\\\\\\"\\\\n\\\\n\\\\t| old |\\\\n\\\\tbytesRead = 0 ifTrue: [^inNextToWrite].\\\\n\\\\told _ inNextToWrite.\\\\n\\\\tinNextToWrite _ inNextToWrite + bytesRead.\\\\n\\\\t(inBuffer size - inNextToWrite) < 1024\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\\\\"Hit the roof, move data down (if enough has been read) or do we grow?\\\\\\\"\\\\n\\\\t\\\\t\\\\t(lastRead > 512)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [^old - self moveInBufferDown]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self growInBuffer]].\\\\n\\\\t^old! !\\\\n\\\\n!SocketStream methodsFor: 'private' stamp: 'gk 2/9/2005 22:42'!\\\\nadjustOutBuffer: bytesToWrite\\\\n\\\\t\\\\\\\"Possibly grow outBuffer to accommodate the new data.\\\\n\\\\tCurrently grows through doubling when less\\\\n\\\\tthan 1024 bytes are left. If bytesToWrite is even\\\\n\\\\tlarger we double that instead. Never shrinks.\\\\\\\"\\\\n\\\\n\\\\t(outBuffer size - outNextToWrite - bytesToWrite) < 1024 ifTrue: [\\\\n\\\\t\\\\toutBuffer _ (self streamBuffer: ((outBuffer size max: bytesToWrite) * 2))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\treplaceFrom: 1 to: outBuffer size with: outBuffer startingAt: 1]! !\\\\n\\\\n!SocketStream methodsFor: 'private' stamp: 'gk 2/7/2005 13:09'!\\\\ncheckFlush\\\\n\\\\t\\\\\\\"If autoFlush is true we flush if\\\\n\\\\twe have reached the bufferSize\\\\n\\\\tof data in the outBuffer.\\\\\\\"\\\\n\\\\n\\\\t(autoFlush and: [outNextToWrite > bufferSize])\\\\n\\\\t\\\\tifTrue: [self flush]! !\\\\n\\\\n!SocketStream methodsFor: 'private' stamp: 'gk 2/7/2005 23:05'!\\\\ngrowInBuffer\\\\n\\\\t\\\\\\\"Grows through doubling.\\\\\\\"\\\\n\\\\n\\\\tself resizeInBuffer: inBuffer size * 2! !\\\\n\\\\n!SocketStream methodsFor: 'private' stamp: 'gk 2/8/2005 22:15'!\\\\nmoveInBufferDown\\\\n\\\\t\\\\\\\"Move down contents of inBuffer to the start.\\\\n\\\\tReturn distance moved.\\\\\\\"\\\\n\\\\n\\\\t| sz distanceMoved |\\\\n\\\\tsz _ inNextToWrite - lastRead - 1.\\\\n\\\\tinBuffer replaceFrom: 1 to: sz with: inBuffer startingAt: lastRead + 1.\\\\n\\\\tdistanceMoved _ lastRead.\\\\n\\\\tlastRead _ 0.\\\\n\\\\tinNextToWrite _ sz + 1.\\\\n\\\\t^distanceMoved\\\\n! !\\\\n\\\\n!SocketStream methodsFor: 'private' stamp: 'gk 2/9/2005 22:36'!\\\\nresetBuffers\\\\n\\\\t\\\\\\\"Recreate the buffers with default start sizes.\\\\\\\"\\\\n\\\\n\\\\tinBuffer _ self streamBuffer: bufferSize.\\\\n\\\\tlastRead _ 0.\\\\n\\\\tinNextToWrite _ 1.\\\\n\\\\toutBuffer _ self streamBuffer: bufferSize.\\\\n\\\\toutNextToWrite _ 1! !\\\\n\\\\n!SocketStream methodsFor: 'private' stamp: 'gk 9/9/2005 02:29'!\\\\nresizeInBuffer: newSize\\\\n\\\\t\\\\\\\"Resize the inBuffer by recreating it.\\\\n\\\\tThis also has the effect of getting rid of\\\\n\\\\tdead data above inNextToWrite.\\\\n\\\\t<newSize> must >= inBuffer size!!\\\\\\\"\\\\n\\\\n\\\\tinBuffer _ (self streamBuffer: newSize)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\treplaceFrom: 1 to: inNextToWrite - 1 with: inBuffer startingAt: 1! !\\\\n\\\\n!SocketStream methodsFor: 'private' stamp: 'gk 2/9/2005 22:35'!\\\\nstreamBuffer: size\\\\n\\\\t\\\\\\\"Create a buffer of the correct class and given size.\\\\\\\"\\\\n\\\\n\\\\t^(self isBinary\\\\n\\\\t\\\\tifTrue: [ByteArray]\\\\n\\\\t\\\\tifFalse: [String]) new: size! !\\\\n\\\\n\\\\n!SocketStream methodsFor: 'private-socket' stamp: 'gk 2/25/2005 14:20'!\\\\nreceiveAvailableData\\\\n\\\\t\\\\\\\"Receive available data (as much as fits in the inBuffer)\\\\n\\\\tbut not waiting for more to arrive.\\\\n\\\\tReturn the position in the buffer where the\\\\n\\\\tnew data starts, regardless if anything\\\\n\\\\twas read, see #adjustInBuffer.\\\\\\\"\\\\n\\\\t\\\\n\\\\trecentlyRead _ socket receiveAvailableDataInto: inBuffer startingAt: inNextToWrite.\\\\n\\\\t^self adjustInBuffer: recentlyRead! !\\\\n\\\\n!SocketStream methodsFor: 'private-socket' stamp: 'gk 2/25/2005 14:20'!\\\\nreceiveData\\\\n\\\\t\\\\\\\"Receive data with timeout if it has been set.\\\\n\\\\tIf shouldSignal is false we use the Socket methods\\\\n\\\\tthat swallow those Exceptions, if it is true the\\\\n\\\\tcaller will have to handle those Exceptions.\\\\n\\\\tReturn the position in the buffer where the\\\\n\\\\tnew data starts, regardless if anything\\\\n\\\\twas read, see #adjustInBuffer.\\\\\\\"\\\\n\\\\t\\\\n\\\\trecentlyRead := shouldSignal ifTrue: [\\\\n\\\\t\\\\tself shouldTimeout ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tsocket receiveDataSignallingTimeout: timeout\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tinto: inBuffer startingAt: inNextToWrite]\\\\n\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tsocket receiveDataSignallingClosedInto: inBuffer\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: inNextToWrite]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\tself shouldTimeout ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\\\\"This case is tricky, if it times out and is swallowed\\\\n\\\\t\\\\t\\\\thow does other methods calling this method repeatedly\\\\n\\\\t\\\\t\\\\tget to know that? And what should they do?\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tsocket receiveDataTimeout: timeout\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tinto: inBuffer startingAt: inNextToWrite]\\\\n\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tsocket receiveDataInto: inBuffer\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: inNextToWrite]].\\\\n\\\\t^self adjustInBuffer: recentlyRead! !\\\\n\\\\n!SocketStream methodsFor: 'private-socket' stamp: 'gk 2/9/2005 22:53'!\\\\nreceiveDataIfAvailable\\\\n\\\\t\\\\\\\"Only used to check that there really is data to read\\\\n\\\\tfrom the socket after it signals dataAvailable.\\\\n\\\\tIt has been known to signal true and then still\\\\n\\\\tnot have anything to read. See also isDataAvailable.\\\\n\\\\tReturn the position in the buffer where the\\\\n\\\\tnew data starts, regardless if anything\\\\n\\\\twas read, see #adjustInBuffer.\\\\\\\"\\\\n\\\\n\\\\trecentlyRead _ socket receiveSomeDataInto: inBuffer startingAt: inNextToWrite.\\\\n\\\\t^self adjustInBuffer: recentlyRead! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSocketStream class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SocketStream class methodsFor: 'example' stamp: 'md 8/14/2005 18:25'!\\\\nfinger: userName\\\\n\\\\t\\\\\\\"SocketStream finger: 'stp'\\\\\\\"\\\\n\\\\n\\\\t| addr s |\\\\n\\\\taddr _ NetNameResolver promptUserForHostAddress.\\\\n\\\\ts _ SocketStream openConnectionToHost: addr port: 79.  \\\\\\\"finger port number\\\\\\\"\\\\n\\\\tTranscript show: '---------- Connecting ----------'; cr.\\\\n\\\\ts sendCommand: userName.\\\\n\\\\tTranscript show: s getLine.\\\\n\\\\ts close.\\\\n\\\\tTranscript show: '---------- Connection Closed ----------'; cr; endEntry.\\\\n! !\\\\n\\\\n\\\\n!SocketStream class methodsFor: 'instance creation' stamp: 'gk 2/3/2005 22:19'!\\\\non: socket\\\\n\\\\t\\\\\\\"Create a socket stream on a connected server socket.\\\\\\\"\\\\n\\\\n\\\\t^self basicNew initialize socket: socket! !\\\\n\\\\n!SocketStream class methodsFor: 'instance creation' stamp: 'gk 2/3/2005 20:35'!\\\\nopenConnectionToHost: hostIP port: portNumber\\\\n\\\\t| socket |\\\\n\\\\tsocket _ Socket new.\\\\n\\\\tsocket connectTo: hostIP port: portNumber.\\\\n\\\\t^self on: socket! !\\\\n\\\\n!SocketStream class methodsFor: 'instance creation' stamp: 'gk 2/3/2005 20:35'!\\\\nopenConnectionToHostNamed: hostName port: portNumber\\\\n\\\\t| hostIP |\\\\n\\\\thostIP _ NetNameResolver addressForName: hostName timeout: 20.\\\\n\\\\t^self openConnectionToHost: hostIP port: portNumber! !\\\\nSocket subclass: #SocksSocket\\\\n\\\\tinstanceVariableNames: 'vers method socksIP socksPort dstPort dstIP dstName'\\\\n\\\\tclassVariableNames: 'DefaultSocksVersion'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Network-Kernel'!\\\\n!SocksSocket commentStamp: '<historical>' prior: 0!\\\\nThis class implements the socks 4 and partially socks 5 connection protocol.\\\\nFor backward compatibility the socks protocol is disabled by default, so subclasses still work.\\\\nFor further documentation check out:\\\\n\\\\nSocks4: http://spiderman.socks.nec.com/protocol/socks4.protocol\\\\n\\\\nSocks5: http://spiderman.socks.nec.com/rfc/rfc1928.txt!\\\\n\\\\n\\\\n!SocksSocket methodsFor: 'connection open/close' stamp: 'mir 2/22/2002 15:49'!\\\\nconnectTo: hostAddress port: port\\\\n\\\\tself initializeNetwork.\\\\n\\\\tself shouldUseSocks\\\\n\\\\t\\\\tifFalse: [^super connectTo: hostAddress port: port].\\\\n\\\\tsuper connectTo: socksIP port: socksPort.\\\\n\\\\tself waitForConnectionUntil: Socket standardDeadline.\\\\n\\\\tdstIP _ hostAddress.\\\\n\\\\tdstPort _ port.\\\\n\\\\tvers == 4\\\\n\\\\t\\\\tifTrue: [self connectSocks4]\\\\n\\\\t\\\\tifFalse: [self connectSocks5]\\\\n\\\\t! !\\\\n\\\\n!SocksSocket methodsFor: 'connection open/close' stamp: 'mir 3/6/2000 15:17'!\\\\nconnectToHostNamed: hostName port: port\\\\n\\\\tsuper connectTo: socksIP port: socksPort.\\\\n\\\\tself waitForConnectionUntil: Socket standardDeadline.\\\\n\\\\tdstName _ hostName.\\\\n\\\\tdstPort _ port.\\\\n\\\\tvers == 4\\\\n\\\\t\\\\tifTrue: [self connectSocks4]\\\\n\\\\t\\\\tifFalse: [self connectSocks5]\\\\n\\\\t! !\\\\n\\\\n\\\\n!SocksSocket methodsFor: 'initialize' stamp: 'mir 9/26/2000 00:05'!\\\\nsocks4\\\\n\\\\tvers _ 4.\\\\n\\\\tmethod _ nil.\\\\n\\\\tsocksIP _ self class defaultSocksHostAddress.\\\\n\\\\tsocksPort _ self class defaultSocksPort! !\\\\n\\\\n!SocksSocket methodsFor: 'initialize' stamp: 'mir 9/26/2000 00:05'!\\\\nsocks5\\\\n\\\\tvers _ 5.\\\\n\\\\tmethod _ self class noAutorizationMethod.\\\\n\\\\tsocksIP _ self class defaultSocksHostAddress.\\\\n\\\\tsocksPort _ self class defaultSocksPort! !\\\\n\\\\n\\\\n!SocksSocket methodsFor: 'methods' stamp: 'mir 3/6/2000 13:24'!\\\\nnoAutorizationMethod\\\\n\\\\t^0! !\\\\n\\\\n\\\\n!SocksSocket methodsFor: 'socks4' stamp: 'mir 3/6/2000 15:07'!\\\\nconnectSocks4\\\\n\\\\tself\\\\n\\\\t\\\\tsendSocks4ConnectionRequestUserId: '';\\\\n\\\\t\\\\twaitForSocks4ConnectionReply.\\\\n! !\\\\n\\\\n!SocksSocket methodsFor: 'socks4' stamp: 'mir 2/22/2002 15:49'!\\\\nsendSocks4ConnectionRequestUserId: userId\\\\n\\\\t\\\\\\\"The client connects to the SOCKS server and sends a CONNECT request when\\\\nit wants to establish a connection to an application server. The client\\\\nincludes in the request packet the IP address and the port number of the\\\\ndestination host, and userid, in the following format.\\\\n\\\\n\\\\t+----+----+----+----+----+----+----+----+----+----+....+----+\\\\n\\\\t| VN | CD | DSTPORT |      DSTIP        | USERID       |NULL|\\\\n\\\\t+----+----+----+----+----+----+----+----+----+----+....+----+\\\\n\\\\t   1    1      2              4           variable       1\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t| requestString |\\\\n\\\\trequestString _ WriteStream on: ByteArray new.\\\\n\\\\tdstIP\\\\n\\\\t\\\\tifNil: [dstIP _ NetNameResolver addressForName: dstName].\\\\n\\\\trequestString\\\\n\\\\t\\\\tnextPut: 4;\\\\n\\\\t\\\\tnextPut: self connectCommandCode;\\\\n\\\\t\\\\tnextWordPut: dstPort;\\\\n\\\\t\\\\tnextPutAll: self dstIP;\\\\n\\\\t\\\\tnextPutAll: userId asByteArray;\\\\n\\\\t\\\\tnextPut: 0.\\\\n\\\\tself sendData: requestString contents! !\\\\n\\\\n!SocksSocket methodsFor: 'socks4' stamp: 'mir 3/6/2000 15:11'!\\\\nwaitForSocks4ConnectionReply\\\\n\\\\n\\\\t| response |\\\\n\\\\tresponse _ self waitForReply: 8 for: self defaultTimeOutDuration.\\\\n\\\\n\\\\t(response at: 2) = self requestGrantedCode\\\\n\\\\t\\\\tifFalse: [^self socksError: 'Connection failed: ' , (response at: 2) printString].! !\\\\n\\\\n\\\\n!SocksSocket methodsFor: 'socks5' stamp: 'mir 3/6/2000 17:42'!\\\\nconnectSocks5\\\\n\\\\tself\\\\n\\\\t\\\\tsocks5MethodSelection;\\\\n\\\\t\\\\tsendSocks5ConnectionRequest;\\\\n\\\\t\\\\tsocks5RequestReply\\\\n! !\\\\n\\\\n!SocksSocket methodsFor: 'socks5' stamp: 'mir 3/6/2000 17:29'!\\\\nhostIP6Code\\\\n\\\\t^4! !\\\\n\\\\n!SocksSocket methodsFor: 'socks5' stamp: 'mir 3/6/2000 15:20'!\\\\nhostIPCode\\\\n\\\\t^1! !\\\\n\\\\n!SocksSocket methodsFor: 'socks5' stamp: 'mir 3/6/2000 15:15'!\\\\nqualifiedHostNameCode\\\\n\\\\t^3! !\\\\n\\\\n!SocksSocket methodsFor: 'socks5' stamp: 'mir 3/6/2000 17:25'!\\\\nsendSocks5ConnectionRequest\\\\n\\\\t\\\\\\\"Once the method-dependent subnegotiation has completed, the client\\\\n   sends the request details.\\\\\\\"\\\\n\\\\n\\\\t| requestString |\\\\n\\\\trequestString _ WriteStream on: ByteArray new.\\\\n\\\\trequestString\\\\n\\\\t\\\\tnextPut: 5;\\\\n\\\\t\\\\tnextPut: self connectCommandCode;\\\\n\\\\t\\\\tnextPut: 0. \\\\\\\"Reserved slot\\\\\\\"\\\\n\\\\tdstName isNil\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\trequestString\\\\n\\\\t\\\\t\\\\t\\\\tnextPutAll: self hostIPCode;\\\\n\\\\t\\\\t\\\\t\\\\tnextPutAll: dstIP]\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\trequestString\\\\n\\\\t\\\\t\\\\t\\\\tnextPut: self qualifiedHostNameCode;\\\\n\\\\t\\\\t\\\\t\\\\tnextPut: dstName size;\\\\n\\\\t\\\\t\\\\t\\\\tnextPutAll: dstName asByteArray].\\\\n\\\\trequestString nextWordPut: dstPort.\\\\n\\\\tself sendData: requestString contents! !\\\\n\\\\n!SocksSocket methodsFor: 'socks5' stamp: 'mir 3/6/2000 17:35'!\\\\nskipQualifiedHostName\\\\n\\\\n\\\\t| startTime response bytesRead |\\\\n\\\\tstartTime _ Time millisecondClockValue.\\\\n\\\\tresponse _ ByteArray new: 1.\\\\n\\\\n\\\\t[(bytesRead _ self receiveDataInto: response) < 1\\\\n\\\\t\\\\tand: [(Time millisecondClockValue - startTime) < self defaultTimeOutDuration]] whileTrue.\\\\n\\\\n\\\\tbytesRead < 1\\\\n\\\\t\\\\tifTrue: [self socksError: 'Time out reading data'].\\\\n\\\\n\\\\tself waitForReply: (response at: 1) + 2 for: self defaultTimeOutDuration! !\\\\n\\\\n!SocksSocket methodsFor: 'socks5' stamp: 'mir 3/6/2000 15:16'!\\\\nsocks5MethodSelection\\\\n\\\\t\\\\\\\"The client connects to the server, and sends a version\\\\n   identifier/method selection message.\\\\n\\\\tThe server selects from one of the methods given in METHODS, and\\\\n   sends a METHOD selection message.\\\\\\\"\\\\n\\\\n\\\\t| requestString response |\\\\n\\\\trequestString _ WriteStream on: ByteArray new.\\\\n\\\\trequestString\\\\n\\\\t\\\\tnextPut: 5;\\\\n\\\\t\\\\tnextPut: 1;\\\\n\\\\t\\\\tnextPut: 0.\\\\n\\\\tself sendData: requestString contents.\\\\n\\\\n\\\\tresponse _ self waitForReply: 2 for: self defaultTimeOutDuration.\\\\n\\\\t(response at: 2) == 16rFF\\\\n\\\\t\\\\tifTrue: [self socksError: 'No acceptable methods.']\\\\n\\\\t\\\\tifFalse: [method _ response at: 2]! !\\\\n\\\\n!SocksSocket methodsFor: 'socks5' stamp: 'mir 3/6/2000 17:28'!\\\\nsocks5RequestReply\\\\n\\\\n\\\\t| response |\\\\n\\\\tresponse _ self waitForReply: 4 for: self defaultTimeOutDuration.\\\\n\\\\t\\\\\\\"Skip rest for now.\\\\\\\"\\\\n\\\\t(response at: 4) = self hostIPCode\\\\n\\\\t\\\\tifTrue: [self waitForReply: 6 for: self defaultTimeOutDuration].\\\\n\\\\t(response at: 4) = self qualifiedHostNameCode\\\\n\\\\t\\\\tifTrue: [self skipQualifiedHostName].\\\\n\\\\t(response at: 4) = self hostIP6Code\\\\n\\\\t\\\\tifTrue: [self waitForReply: 18 for: self defaultTimeOutDuration].\\\\n\\\\t(response at: 2) ~= 0\\\\n\\\\t\\\\tifTrue: [^self socksError: 'Connection failed: ', (response at: 2) printString].\\\\n! !\\\\n\\\\n\\\\n!SocksSocket methodsFor: 'private' stamp: 'mir 3/6/2000 13:34'!\\\\nconnectCommandCode\\\\n\\\\t^1! !\\\\n\\\\n!SocksSocket methodsFor: 'private' stamp: 'mir 3/6/2000 15:07'!\\\\ndefaultTimeOutDuration\\\\n\\\\t^20000! !\\\\n\\\\n!SocksSocket methodsFor: 'private' stamp: 'mir 3/6/2000 15:29'!\\\\ndstIP\\\\n\\\\t^dstIP! !\\\\n\\\\n!SocksSocket methodsFor: 'private' stamp: 'mir 2/22/2002 16:23'!\\\\ndstPort\\\\n\\\\t^dstPort! !\\\\n\\\\n!SocksSocket methodsFor: 'private' stamp: 'mir 3/6/2000 14:03'!\\\\nrequestGrantedCode\\\\n\\\\t^90! !\\\\n\\\\n!SocksSocket methodsFor: 'private' stamp: 'mir 9/26/2000 11:23'!\\\\nshouldUseSocks\\\\n\\\\t^vers notNil! !\\\\n\\\\n!SocksSocket methodsFor: 'private' stamp: 'mir 3/6/2000 15:11'!\\\\nsocksError: errorString\\\\n\\\\tself close; destroy.\\\\n\\\\tself error: errorString! !\\\\n\\\\n!SocksSocket methodsFor: 'private' stamp: 'len 12/14/2002 11:39'!\\\\nwaitForReply: replySize for: timeOutDuration\\\\n\\\\t| startTime response delay bytesRead |\\\\n\\\\tstartTime _ Time millisecondClockValue.\\\\n\\\\tresponse _ ByteArray new: replySize.\\\\n\\\\tbytesRead _ 0.\\\\n\\\\tdelay _ Delay forMilliseconds: 500.\\\\n\\\\t[bytesRead < replySize\\\\n\\\\t\\\\tand: [(Time millisecondClockValue - startTime) < timeOutDuration]] whileTrue: [\\\\n\\\\t\\\\tbytesRead _ bytesRead + (self receiveDataInto: response).\\\\n\\\\t\\\\tdelay wait.\\\\n\\\\t\\\\tTranscript show: '.'].\\\\n\\\\tbytesRead < replySize\\\\n\\\\t\\\\tifTrue: [self close; destroy.\\\\n\\\\t\\\\t\\\\t\\\\t^ (ConnectionRefused host: self dstIP port: self dstPort) signal].\\\\n\\\\t^response! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSocksSocket class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SocksSocket class methodsFor: 'accessing' stamp: 'nk 7/6/2003 07:30'!\\\\ndefaultSocksHostAddress\\\\n\\\\n\\\\t^NetNameResolver addressForName: HTTPSocket httpProxyServer! !\\\\n\\\\n!SocksSocket class methodsFor: 'accessing' stamp: 'nk 7/6/2003 07:30'!\\\\ndefaultSocksPort\\\\n\\\\t^HTTPSocket httpProxyPort! !\\\\n\\\\n!SocksSocket class methodsFor: 'accessing' stamp: 'mir 9/26/2000 00:06'!\\\\ndefaultSocksVersion\\\\n\\\\t\\\\\\\"nil means no socks\\\\\\\"\\\\n\\\\t^DefaultSocksVersion! !\\\\n\\\\n!SocksSocket class methodsFor: 'accessing' stamp: 'mir 9/26/2000 00:07'!\\\\ndefaultSocksVersion: anInteger\\\\n\\\\t\\\\\\\"nil means no socks\\\\\\\"\\\\n\\\\tDefaultSocksVersion _ anInteger! !\\\\nFillStyle subclass: #SolidFillStyle\\\\n\\\\tinstanceVariableNames: 'color pixelValue32'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Balloon-Fills'!\\\\n!SolidFillStyle commentStamp: '<historical>' prior: 0!\\\\nSolidFillStyle is a fill which represents a color for the BalloonEngine.\\\\n\\\\nInstance variables:\\\\n\\\\tcolor\\\\t<Color>\\\\tThe color to use.\\\\n\\\\tpixelValue32 <Integer>\\\\tThe cached pixel value to use.!\\\\n\\\\n\\\\n!SolidFillStyle methodsFor: 'accessing' stamp: 'ar 1/14/1999 15:24'!\\\\ncolor: aColor\\\\n\\\\tcolor := aColor.\\\\n\\\\tpixelValue32 := aColor scaledPixelValue32! !\\\\n\\\\n!SolidFillStyle methodsFor: 'accessing' stamp: 'ar 11/9/1998 03:29'!\\\\ndisplay\\\\n\\\\t^color display! !\\\\n\\\\n!SolidFillStyle methodsFor: 'accessing' stamp: 'ar 1/14/1999 15:25'!\\\\nscaledPixelValue32\\\\n\\\\t\\\\\\\"Return the alpha scaled pixel value for depth 32\\\\\\\"\\\\n\\\\t^pixelValue32! !\\\\n\\\\n\\\\n!SolidFillStyle methodsFor: 'converting' stamp: 'ar 11/9/1998 13:55'!\\\\nasColor\\\\n\\\\t^color! !\\\\n\\\\n\\\\n!SolidFillStyle methodsFor: 'printing' stamp: 'ar 11/17/1998 00:29'!\\\\nprintOn: aStream\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream nextPut:$(; print: color; nextPut:$).! !\\\\n\\\\n\\\\n!SolidFillStyle methodsFor: 'testing' stamp: 'ar 11/8/1998 18:34'!\\\\nisSolidFill\\\\n\\\\t^true! !\\\\n\\\\n!SolidFillStyle methodsFor: 'testing' stamp: 'ar 9/2/1999 14:30'!\\\\nisTranslucent\\\\n\\\\t^color isTranslucent! !\\\\n\\\\n!SolidFillStyle methodsFor: 'testing' stamp: 'ar 10/26/2000 19:25'!\\\\nisTransparent\\\\n\\\\t^color isTransparent! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSolidFillStyle class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SolidFillStyle class methodsFor: 'instance creation' stamp: 'ar 11/8/1998 18:31'!\\\\ncolor: aColor\\\\n\\\\t^self new color: aColor! !\\\\nImageMorph subclass: #Sonogram\\\\n\\\\tinstanceVariableNames: 'lastX scrollDelta columnForm minVal maxVal pixValMap'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Sound-Synthesis'!\\\\n!Sonogram commentStamp: '<historical>' prior: 0!\\\\nSonograms are imageMorphs that will repeatedly plot arrays of values as black on white columns moving to the right in time and scrolling left as necessary.!\\\\n\\\\n\\\\n!Sonogram methodsFor: 'all' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nextent: extent minVal: min maxVal: max scrollDelta: d\\\\n\\\\tminVal := min.\\\\n\\\\tmaxVal := max.\\\\n\\\\tscrollDelta := d.\\\\n\\\\tself extent: extent.\\\\n\\\\n\\\\\\\" try following with scrolldelta = 1, 20, 200\\\\n\\\\t| s data |\\\\n\\\\ts := Sonogram new extent: 200@50\\\\n\\\\t\\\\t\\\\t\\\\tminVal: 0.0 maxVal: 1.0 scrollDelta: 20.\\\\n\\\\tWorld addMorph: s.\\\\n\\\\tdata := (1 to: 133) collect: [:i | 0.0].\\\\n\\\\t1 to: 300 do:\\\\n\\\\t\\\\t[:i | data at: (i\\\\\\\\\\\\\\\\133)+1 put: 1.0.\\\\n\\\\t\\\\ts plotColumn: data.\\\\n\\\\t\\\\tdata at: (i\\\\\\\\\\\\\\\\133)+1 put: 0.0.\\\\n\\\\t\\\\tWorld doOneCycleNow].\\\\n\\\\ts delete\\\\t\\\\n\\\\\\\"! !\\\\n\\\\n!Sonogram methodsFor: 'all' stamp: 'jdl 3/28/2003 09:30'!\\\\nplotColumn: dataArray \\\\n\\\\t| chm1 i normVal r |\\\\n\\\\tcolumnForm unhibernate.\\\\n\\\\tchm1 := columnForm height - 1.\\\\n\\\\t0 to: chm1\\\\n\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t[:y | \\\\n\\\\t\\\\t\\\\ti := y * (dataArray size - 1) // chm1 + 1.\\\\n\\\\t\\\\t\\\\tnormVal := ((dataArray at: i) - minVal) / (maxVal - minVal).\\\\n\\\\t\\\\t\\\\tnormVal := normVal max: 0.0.\\\\n\\\\t\\\\t\\\\tnormVal := normVal min: 1.0.\\\\n\\\\t\\\\t\\\\tcolumnForm bits at: chm1 - y + 1\\\\n\\\\t\\\\t\\\\t\\\\tput: (pixValMap at: (normVal * 255.0) truncated + 1)].\\\\n\\\\t(lastX := lastX + 1) > (image width - 1) ifTrue: [self scroll].\\\\n\\\\timage \\\\n\\\\t\\\\tcopy: (r := lastX @ 0 extent: 1 @ image height)\\\\n\\\\t\\\\tfrom: (32 // image depth - 1) @ 0\\\\n\\\\t\\\\tin: columnForm\\\\n\\\\t\\\\trule: Form over.\\\\n\\\\t\\\\\\\"self changed.\\\\\\\"\\\\n\\\\tself invalidRect: (r translateBy: self position)! !\\\\n\\\\n!Sonogram methodsFor: 'all' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nscroll\\\\n\\\\timage copy: (scrollDelta@0 extent: (image width-scrollDelta)@image height)\\\\n\\\\t\\\\t\\\\tfrom: image to: 0@0 rule: Form over.\\\\n\\\\tlastX := lastX - scrollDelta.\\\\n\\\\tself changed! !\\\\n\\\\n\\\\n!Sonogram methodsFor: 'geometry' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nextent: newExtent\\\\n\\\\tsuper image: (Form extent: newExtent depth: Display depth).\\\\n\\\\tlastX := -1.\\\\n\\\\tcolumnForm := Form extent: (32//image depth)@(image height) depth: image depth.\\\\n\\\\tpixValMap := ((1 to: 256) collect:\\\\n\\\\t\\\\t\\\\t[:i | columnForm pixelValueFor: (Color gray: (256-i)/255.0)])\\\\n\\\\t\\\\tas: Bitmap.\\\\n! !\\\\nOrderedCollection subclass: #SortedCollection\\\\n\\\\tinstanceVariableNames: 'sortBlock'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Collections-Sequenceable'!\\\\n!SortedCollection commentStamp: '<historical>' prior: 0!\\\\nI represent a collection of objects ordered by some property of the objects themselves. The ordering is specified in a BlockContext.!\\\\n\\\\n\\\\n!SortedCollection methodsFor: 'accessing' stamp: 'sma 4/28/2000 17:47'!\\\\nat: anInteger put: anObject\\\\n\\\\tself shouldNotImplement! !\\\\n\\\\n!SortedCollection methodsFor: 'accessing' stamp: 'tk 3/28/1999 22:55'!\\\\nmedian\\\\n\\\\t\\\\\\\"Return the middle element, or as close as we can get.\\\\\\\"\\\\n\\\\n\\\\t^ self at: self size + 1 // 2! !\\\\n\\\\n!SortedCollection methodsFor: 'accessing'!\\\\nsortBlock\\\\n\\\\t\\\\\\\"Answer the blockContext which is the criterion for sorting elements of \\\\n\\\\tthe receiver.\\\\\\\"\\\\n\\\\n\\\\t^sortBlock! !\\\\n\\\\n!SortedCollection methodsFor: 'accessing' stamp: 'stp 12/05/1999 07:09'!\\\\nsortBlock: aBlock \\\\n\\\\t\\\\\\\"Make the argument, aBlock, be the criterion for ordering elements of the \\\\n\\\\treceiver.\\\\\\\"\\\\n\\\\n\\\\taBlock\\\\n\\\\t\\\\tifNotNil: [sortBlock := aBlock fixTemps]\\\\n\\\\t\\\\tifNil: [sortBlock := aBlock].\\\\n\\\\t\\\\\\\"The sortBlock must copy its home context, so as to avoid circularities!!\\\\\\\"\\\\n\\\\t\\\\\\\"Therefore sortBlocks with side effects may not work right\\\\\\\"\\\\n\\\\tself size > 0 ifTrue: [self reSort]! !\\\\n\\\\n\\\\n!SortedCollection methodsFor: 'adding' stamp: 'go 4/27/2000 13:19'!\\\\nadd: newObject\\\\n\\\\t^ super insert: newObject before: (self indexForInserting: newObject)! !\\\\n\\\\n!SortedCollection methodsFor: 'adding' stamp: 'sma 4/28/2000 18:35'!\\\\naddAll: aCollection\\\\n\\\\taCollection size > (self size // 3)\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[aCollection do: [:each | self addLast: each].\\\\n\\\\t\\\\t\\\\tself reSort]\\\\n\\\\t\\\\tifFalse: [aCollection do: [:each | self add: each]].\\\\n\\\\t^ aCollection! !\\\\n\\\\n!SortedCollection methodsFor: 'adding' stamp: 'go 4/26/2000 17:26'!\\\\naddFirst: newObject\\\\n\\\\tself shouldNotImplement! !\\\\n\\\\n!SortedCollection methodsFor: 'adding' stamp: 'MPH 10/23/2000 13:31'!\\\\ncopyEmpty\\\\n\\\\t\\\\\\\"Answer a copy of the receiver without any of the receiver's elements.\\\\\\\"\\\\n\\\\n\\\\t^self species sortBlock: sortBlock! !\\\\n\\\\n\\\\n!SortedCollection methodsFor: 'comparing'!\\\\n= aSortedCollection\\\\n\\\\t\\\\\\\"Answer true if my and aSortedCollection's species are the same,\\\\n\\\\tand if our blocks are the same, and if our elements are the same.\\\\\\\"\\\\n\\\\n\\\\tself species = aSortedCollection species ifFalse: [^ false].\\\\n\\\\tsortBlock = aSortedCollection sortBlock\\\\n\\\\t\\\\tifTrue: [^ super = aSortedCollection]\\\\n\\\\t\\\\tifFalse: [^ false]! !\\\\n\\\\n\\\\n!SortedCollection methodsFor: 'copying'!\\\\ncopy\\\\n\\\\n\\\\t| newCollection |\\\\n\\\\tnewCollection _ self species sortBlock: sortBlock.\\\\n\\\\tnewCollection addAll: self.\\\\n\\\\t^newCollection! !\\\\n\\\\n\\\\n!SortedCollection methodsFor: 'enumerating' stamp: 'sma 2/5/2000 15:22'!\\\\ncollect: aBlock \\\\n\\\\t\\\\\\\"Evaluate aBlock with each of my elements as the argument. Collect the \\\\n\\\\tresulting values into an OrderedCollection. Answer the new collection. \\\\n\\\\tOverride the superclass in order to produce an OrderedCollection instead\\\\n\\\\tof a SortedCollection.\\\\\\\"\\\\n\\\\n\\\\t| newCollection | \\\\n\\\\tnewCollection _ OrderedCollection new: self size.\\\\n\\\\tself do: [:each | newCollection addLast: (aBlock value: each)].\\\\n\\\\t^ newCollection! !\\\\n\\\\n\\\\n!SortedCollection methodsFor: 'topological sort' stamp: 'hg 1/2/2002 13:34'!\\\\nsortTopologically\\\\n\\\\t\\\\\\\"Plenty of room for increased efficiency in this one.\\\\\\\"\\\\n\\\\n\\\\t| remaining result pick |\\\\n\\\\tremaining _ self asOrderedCollection.\\\\n\\\\tresult _ OrderedCollection new.\\\\n\\\\t[remaining isEmpty] whileFalse: [\\\\n\\\\t\\\\tpick _ remaining select: [:item |\\\\n\\\\t\\\\t\\\\tremaining allSatisfy: [:anotherItem |\\\\n\\\\t\\\\t\\\\t\\\\titem == anotherItem or: [self should: item precede: anotherItem]]].\\\\n\\\\t\\\\tpick isEmpty ifTrue: [self error: 'bad topological ordering'].\\\\n\\\\t\\\\tresult addAll: pick.\\\\n\\\\t\\\\tremaining removeAll: pick].\\\\n\\\\t^self copySameFrom: result! !\\\\n\\\\n\\\\n!SortedCollection methodsFor: 'private' stamp: 'stp 04/23/1999 05:36'!\\\\nindexForInserting: newObject\\\\n\\\\n\\\\t| index low high |\\\\n\\\\tlow _ firstIndex.\\\\n\\\\thigh _ lastIndex.\\\\n\\\\tsortBlock isNil\\\\n\\\\t\\\\tifTrue: [[index _ high + low // 2.  low > high]\\\\n\\\\t\\\\t\\\\twhileFalse: \\\\n\\\\t\\\\t\\\\t\\\\t[((array at: index) <= newObject)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [low _ index + 1]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [high _ index - 1]]]\\\\n\\\\t\\\\tifFalse: [[index _ high + low // 2.  low > high]\\\\n\\\\t\\\\t\\\\twhileFalse: \\\\n\\\\t\\\\t\\\\t\\\\t[(sortBlock value: (array at: index) value: newObject)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [low _ index + 1]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [high _ index - 1]]].\\\\n\\\\t^low! !\\\\n\\\\n!SortedCollection methodsFor: 'private' stamp: 'go 4/26/2000 17:17'!\\\\ninsert: anObject before: spot\\\\n\\\\tself shouldNotImplement! !\\\\n\\\\n!SortedCollection methodsFor: 'private' stamp: 'sma 4/28/2000 17:46'!\\\\nreSort\\\\n\\\\tself sort: firstIndex to: lastIndex! !\\\\n\\\\n!SortedCollection methodsFor: 'private' stamp: 'hg 12/17/2001 19:30'!\\\\nshould: a precede: b\\\\n\\\\n\\\\t^sortBlock ifNil: [a <= b] ifNotNil: [sortBlock value: a value: b]\\\\n! !\\\\n\\\\n!SortedCollection methodsFor: 'private' stamp: 'hg 12/17/2001 20:22'!\\\\nsort: i to: j \\\\n\\\\t\\\\\\\"Sort elements i through j of self to be nondescending according to\\\\n\\\\tsortBlock.\\\\\\\"\\\\n\\\\n\\\\t| di dij dj tt ij k l n |\\\\n\\\\t\\\\\\\"The prefix d means the data at that index.\\\\\\\"\\\\n\\\\t(n _ j + 1  - i) <= 1 ifTrue: [^self].\\\\t\\\\\\\"Nothing to sort.\\\\\\\" \\\\n\\\\t \\\\\\\"Sort di,dj.\\\\\\\"\\\\n\\\\tdi _ array at: i.\\\\n\\\\tdj _ array at: j.\\\\n\\\\t(self should: di precede: dj)\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[array swap: i with: j.\\\\n\\\\t\\\\t\\\\t tt _ di.\\\\n\\\\t\\\\t\\\\t di _ dj.\\\\n\\\\t\\\\t\\\\t dj _ tt].\\\\n\\\\tn > 2\\\\n\\\\t\\\\tifTrue:  \\\\\\\"More than two elements.\\\\\\\"\\\\n\\\\t\\\\t\\\\t[ij _ (i + j) // 2.  \\\\\\\"ij is the midpoint of i and j.\\\\\\\"\\\\n\\\\t\\\\t\\\\t dij _ array at: ij.  \\\\\\\"Sort di,dij,dj.  Make dij be their median.\\\\\\\"\\\\n\\\\t\\\\t\\\\t (self should: di precede: dij)\\\\n\\\\t\\\\t\\\\t   ifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t[(self should: dij precede: dj)\\\\n\\\\t\\\\t\\\\t\\\\t  ifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[array swap: j with: ij.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t dij _ dj]]\\\\n\\\\t\\\\t\\\\t   ifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[array swap: i with: ij.\\\\n\\\\t\\\\t\\\\t\\\\t dij _ di].\\\\n\\\\t\\\\t\\\\tn > 3\\\\n\\\\t\\\\t\\\\t  ifTrue:  \\\\\\\"More than three elements.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t[\\\\\\\"Find k>i and l<j such that dk,dij,dl are in reverse order.\\\\n\\\\t\\\\t\\\\t\\\\tSwap k and l.  Repeat this procedure until k and l pass each other.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t k _ i.\\\\n\\\\t\\\\t\\\\t\\\\t l _ j.\\\\n\\\\t\\\\t\\\\t\\\\t [[l _ l - 1.  k <= l and: [self should: dij precede: (array at: l)]]\\\\n\\\\t\\\\t\\\\t\\\\t   whileTrue.  \\\\\\\"i.e. while dl succeeds dij\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t  [k _ k + 1.  k <= l and: [self should: (array at: k) precede: dij]]\\\\n\\\\t\\\\t\\\\t\\\\t   whileTrue.  \\\\\\\"i.e. while dij succeeds dk\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t  k <= l]\\\\n\\\\t\\\\t\\\\t\\\\t   whileTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[array swap: k with: l]. \\\\n\\\\t\\\\\\\"Now l<k (either 1 or 2 less), and di through dl are all less than or equal to dk\\\\n\\\\tthrough dj.  Sort those two segments.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tself sort: i to: l.\\\\n\\\\t\\\\t\\\\t\\\\tself sort: k to: j]]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSortedCollection class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SortedCollection class methodsFor: 'instance creation' stamp: 'stp 04/23/1999 05:34'!\\\\nnew: anInteger \\\\n\\\\t\\\\\\\"The default sorting function is a <= comparison on elements.\\\\\\\"\\\\n\\\\n\\\\t^(super new: anInteger) \\\\\\\"sortBlock: [:x :y | x <= y]\\\\\\\" \\\\t\\\\t\\\\\\\"nil sortBlock OK\\\\\\\"! !\\\\n\\\\n!SortedCollection class methodsFor: 'instance creation'!\\\\nsortBlock: aBlock \\\\n\\\\t\\\\\\\"Answer an instance of me such that its elements are sorted according to \\\\n\\\\tthe criterion specified in aBlock.\\\\\\\"\\\\n\\\\n\\\\t^(super new: 10) sortBlock: aBlock! !\\\\nTestCase subclass: #SortedCollectionTest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'CollectionsTests-Unordered'!\\\\n\\\\n!SortedCollectionTest methodsFor: 'basic' stamp: 'DM 3/16/2006 11:27'!\\\\ntestAdd\\\\n\\\\t\\\\\\\"self run: #testAdd\\\\\\\"\\\\n\\\\t\\\\\\\"self debug: #testAdd\\\\\\\"\\\\n\\\\t\\\\n\\\\t| collection |\\\\n\\\\tcollection := #(10 9 8 7 5 4 4 2) asSortedCollection.\\\\n\\\\tself assert: collection first = 2.\\\\n\\\\tself assert: collection last = 10.\\\\n\\\\tself assert: (collection size = 8).\\\\n\\\\tcollection add:1.\\\\n\\\\tself assert: (collection size = 9).\\\\n\\\\tcollection add: 6.\\\\n\\\\tself assert: ((collection at: 5) = 5).\\\\n\\\\tself assert: (collection size = 10).\\\\n\\\\tcollection add: 3.\\\\n\\\\t! !\\\\n\\\\n!SortedCollectionTest methodsFor: 'basic' stamp: 'DM 3/16/2006 11:30'!\\\\ntestAddAll\\\\n\\\\t\\\\\\\"self run: #testAddAll\\\\\\\"\\\\n\\\\t\\\\\\\"self debug: #testAddAll\\\\\\\"\\\\n\\\\t\\\\n\\\\t| sorted2 sorted|\\\\n\\\\tsorted2 := SortedCollection new.\\\\n\\\\tsorted2 add: 'brochet'; add:'truitelle'.\\\\n\\\\tsorted := SortedCollection new.\\\\n\\\\tsorted addAll: sorted2.\\\\n\\\\tself assert: (sorted hasEqualElements: sorted2).\\\\n\\\\t ! !\\\\n\\\\n!SortedCollectionTest methodsFor: 'basic' stamp: 'DM 3/16/2006 11:32'!\\\\ntestAddAll2\\\\n\\\\t\\\\\\\"self run: #testAddAll2\\\\\\\"\\\\n\\\\t\\\\\\\"self debug: #testAddAll2\\\\\\\"\\\\n\\\\t\\\\n\\\\t| sorted2 sorted|\\\\n\\\\tsorted2 := SortedCollection new.\\\\n\\\\tsorted2 add: 'brochet'; add:'truitelle'.\\\\n\\\\tsorted := SortedCollection new.\\\\n\\\\tsorted add: 'perche'.\\\\n\\\\tsorted addAll: sorted2.\\\\n\\\\tself assert: (sorted size = (sorted2 size + 1)).\\\\n\\\\tsorted2 do: \\\\n\\\\t\\\\t\\\\t[ :each | self assert: (sorted includes: each)]\\\\n\\\\t ! !\\\\n\\\\n!SortedCollectionTest methodsFor: 'basic' stamp: 'DM 3/16/2006 11:33'!\\\\ntestCollect\\\\n\\\\t\\\\\\\"self run: #testCollect\\\\\\\"\\\\n\\\\t\\\\n\\\\t|result aSortedCollection|\\\\n\\\\taSortedCollection := SortedCollection new.\\\\n\\\\tresult := OrderedCollection new.\\\\n\\\\tresult add:true ; add: true ; add: true ;add: false ; add: false.\\\\n\\\\taSortedCollection := (1 to: 5) asSortedCollection.\\\\n\\\\tself assert: (result = (aSortedCollection collect: [:each | each < 4])).\\\\n\\\\t! !\\\\n\\\\n!SortedCollectionTest methodsFor: 'basic' stamp: 'DM 3/16/2006 11:39'!\\\\ntestCopy\\\\n\\\\t\\\\\\\"self run: #testCopy\\\\\\\"\\\\n\\\\t\\\\\\\"self debug: #testCopy\\\\\\\"\\\\n\\\\t\\\\n\\\\t|aSortedCollection copySorted|\\\\n\\\\taSortedCollection := SortedCollection new.\\\\n\\\\taSortedCollection sortBlock: [:a :b | a < b].\\\\n\\\\taSortedCollection add: 'truite' ; add: 'brochet'.\\\\n\\\\tself assert: aSortedCollection first = 'brochet'.\\\\n\\\\t\\\\n\\\\tcopySorted := aSortedCollection copy.\\\\n\\\\t\\\\n\\\\tself assert: (copySorted  hasEqualElements: aSortedCollection).\\\\n\\\\tself assert: (copySorted  species = aSortedCollection species).\\\\n\\\\tself assert: (copySorted  sortBlock = aSortedCollection sortBlock).\\\\n\\\\tself assert: copySorted first = 'brochet'.! !\\\\n\\\\n!SortedCollectionTest methodsFor: 'basic' stamp: 'DM 3/16/2006 11:30'!\\\\ntestCreation\\\\n\\\\t\\\\\\\"self run: #testCreation\\\\\\\"\\\\n\\\\t\\\\\\\"self debug: #testCreation\\\\\\\"\\\\n\\\\t\\\\n\\\\t| collection |\\\\n\\\\tcollection := #(10 9 3 6 1 8 7 5 4 2) asSortedCollection.\\\\n\\\\tself assert: collection = (1 to: 10) asSortedCollection.\\\\n\\\\t! !\\\\n\\\\n!SortedCollectionTest methodsFor: 'basic' stamp: 'DM 3/16/2006 11:42'!\\\\ntestEquals\\\\n\\\\t\\\\\\\"self run: #testEquals\\\\\\\"\\\\n\\\\t\\\\\\\"self debug: #testEquals\\\\\\\"\\\\n\\\\t\\\\n\\\\t|aSortedCollection|\\\\n\\\\taSortedCollection := SortedCollection new.\\\\n\\\\taSortedCollection add:'truite' ; add: 'brochet'.\\\\n\\\\tself assert: aSortedCollection copy = aSortedCollection.! !\\\\n\\\\n!SortedCollectionTest methodsFor: 'basic' stamp: 'DM 3/16/2006 11:43'!\\\\ntestMedian\\\\n\\\\t\\\\\\\"self run: #testMedian\\\\\\\"\\\\n\\\\t\\\\\\\"self debug: #testMedian\\\\\\\"\\\\n\\\\t\\\\n\\\\t|aSortedCollection|\\\\n\\\\taSortedCollection := (1 to: 10) asSortedCollection.\\\\n\\\\tself assert: aSortedCollection median=5.\\\\n\\\\t\\\\n\\\\taSortedCollection := SortedCollection new.\\\\n\\\\taSortedCollection add:'truite' ; add:'porcinet' ; add:'carpe'.\\\\n\\\\tself assert: (aSortedCollection median = 'porcinet').\\\\n\\\\t! !\\\\n\\\\n!SortedCollectionTest methodsFor: 'basic' stamp: 'DM 3/16/2006 11:46'!\\\\ntestShouldPrecede\\\\n\\\\t\\\\\\\"self run: #testShouldPrecede\\\\\\\"\\\\n\\\\t\\\\n\\\\t|aSortedCollection|\\\\n\\\\taSortedCollection := SortedCollection new.\\\\n\\\\tself assert: (aSortedCollection should: 'za' precede: 'zb').\\\\n\\\\tself assert: (aSortedCollection isEmpty).\\\\n\\\\tself assert: (aSortedCollection should: 1 precede: 2).\\\\n\\\\t\\\\n\\\\taSortedCollection sortBlock: [:a :b | a > b].\\\\n\\\\taSortedCollection reSort.\\\\n\\\\tself assert: (aSortedCollection should: 'zb' precede: 'za').\\\\n\\\\tself assert: (aSortedCollection isEmpty).\\\\n\\\\tself assert: (aSortedCollection should: 2 precede: 1).\\\\n\\\\t\\\\t! !\\\\n\\\\n!SortedCollectionTest methodsFor: 'basic' stamp: 'DM 3/16/2006 11:38'!\\\\ntestSortBlock\\\\n\\\\t\\\\\\\"self run: #testSortBlock\\\\\\\"\\\\n\\\\t\\\\\\\"self debug: #testSortBlock\\\\\\\"\\\\n\\\\t\\\\n\\\\t|aSortedCollection|\\\\n\\\\taSortedCollection := SortedCollection new.\\\\n\\\\taSortedCollection sortBlock: [:a :b | a < b].\\\\n\\\\taSortedCollection add: 'truite' ; add: 'brochet' ; add: 'tortue'.\\\\n\\\\tself assert: aSortedCollection first = 'brochet'.\\\\n\\\\t\\\\n\\\\taSortedCollection := SortedCollection new.\\\\n\\\\taSortedCollection sortBlock: [:a :b | a >b].\\\\n\\\\taSortedCollection add: 'truite' ; add: 'brochet' ; add: 'tortue'.\\\\n\\\\tself assert: aSortedCollection first = 'truite'.\\\\n\\\\t\\\\n\\\\t\\\\n\\\\t! !\\\\nBorderedMorph subclass: #SorterTokenMorph\\\\n\\\\tinstanceVariableNames: 'morphRepresented'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-Palettes'!\\\\n\\\\n!SorterTokenMorph methodsFor: 'as yet unclassified' stamp: 'sw 12/1/1998 12:38'!\\\\nfitContents\\\\n\\\\tsubmorphs size == 1 ifTrue: [self bounds: (submorphs first bounds insetBy: (-1 @ -1))]! !\\\\n\\\\n!SorterTokenMorph methodsFor: 'as yet unclassified' stamp: 'dgd 2/21/2003 23:16'!\\\\nforMorph: aMorph \\\\n\\\\t| it |\\\\n\\\\tmorphRepresented := aMorph.\\\\n\\\\taMorph submorphs notEmpty \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[self addMorphBack: (it := aMorph submorphs first veryDeepCopy).\\\\n\\\\t\\\\t\\\\tit position: self position + (1 @ 1).\\\\n\\\\t\\\\t\\\\tit lock].\\\\n\\\\tself fitContents! !\\\\n\\\\n\\\\n!SorterTokenMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:35'!\\\\ndefaultBorderColor\\\\n\\\\t\\\\\\\"answer the default border color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color blue! !\\\\n\\\\n!SorterTokenMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:40'!\\\\ndefaultBorderWidth\\\\n\\\\t\\\\\\\"answer the default border width for the receiver\\\\\\\"\\\\n\\\\t^ 1! !\\\\n\\\\n!SorterTokenMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:31'!\\\\ndefaultColor\\\\n\\\\t\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color transparent! !\\\\n\\\\n\\\\n!SorterTokenMorph methodsFor: 'thumbnail' stamp: 'sw 12/1/1998 12:27'!\\\\nmorphRepresented\\\\n\\\\t^ morphRepresented! !\\\\nArrayedCollection variableWordSubclass: #SoundBuffer\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: 'SineTable'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Sound-Synthesis'!\\\\n!SoundBuffer commentStamp: '<historical>' prior: 0!\\\\nSoundBuffers store 16 bit unsigned quantities.  !\\\\n\\\\n\\\\n!SoundBuffer methodsFor: 'accessing' stamp: 'tk 3/13/2000 14:46'!\\\\nbytesPerElement\\\\n\\\\t\\\\\\\"Number of bytes in each item.  This multiplied by (self size)*8 gives the number of bits stored.\\\\\\\"\\\\n\\\\t^ 2! !\\\\n\\\\n!SoundBuffer methodsFor: 'accessing' stamp: 'jm 9/17/97 13:00'!\\\\nmonoSampleCount\\\\n\\\\t\\\\\\\"Return the number of monaural 16-bit samples that fit into this SoundBuffer.\\\\\\\"\\\\n\\\\n\\\\t^ super size * 2\\\\n! !\\\\n\\\\n!SoundBuffer methodsFor: 'accessing' stamp: 'jm 9/17/97 13:28'!\\\\nsize\\\\n\\\\t\\\\\\\"Return the number of 16-bit sound samples that fit in this sound buffer. To avoid confusion, it is better to get the size of SoundBuffer using monoSampleCount or stereoSampleCount.\\\\\\\"\\\\n\\\\n\\\\t^ self monoSampleCount\\\\n! !\\\\n\\\\n!SoundBuffer methodsFor: 'accessing' stamp: 'jm 9/17/97 13:01'!\\\\nstereoSampleCount\\\\n\\\\t\\\\\\\"Return the number of stereo slices that fit into this SoundBuffer. A stereo 'slice' consists of two 16-bit samples, one for each channel.\\\\\\\"\\\\n\\\\n\\\\t^ super size\\\\n! !\\\\n\\\\n\\\\n!SoundBuffer methodsFor: 'as yet unclassified' stamp: 'RAA 7/11/2000 11:31'!\\\\nwriteOnGZIPByteStream: aStream \\\\n\\\\t\\\\n\\\\taStream nextPutAllWordArray: self! !\\\\n\\\\n\\\\n!SoundBuffer methodsFor: 'objects from disk' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nrestoreEndianness\\\\n\\\\t\\\\\\\"This word object was just read in from a stream.  It was stored in Big Endian (Mac) format.  Swap each pair of bytes (16-bit word), if the current machine is Little Endian.\\\\n\\\\tWhy is this the right thing to do?  We are using memory as a byteStream.  High and low bytes are reversed in each 16-bit word, but the stream of words ascends through memory.  Different from a Bitmap.\\\\\\\"\\\\n\\\\n\\\\t| hack blt |\\\\n\\\\tSmalltalkImage current  isLittleEndian ifTrue: [\\\\n\\\\t\\\\t\\\\\\\"The implementation is a hack, but fast for large ranges\\\\\\\"\\\\n\\\\t\\\\thack := Form new hackBits: self.\\\\n\\\\t\\\\tblt := (BitBlt toForm: hack) sourceForm: hack.\\\\n\\\\t\\\\tblt combinationRule: Form reverse.  \\\\\\\"XOR\\\\\\\"\\\\n\\\\t\\\\tblt sourceY: 0; destY: 0; height: self size; width: 1.\\\\n\\\\t\\\\tblt sourceX: 0; destX: 1; copyBits.  \\\\\\\"Exchange bytes 0 and 1\\\\\\\"\\\\n\\\\t\\\\tblt sourceX: 1; destX: 0; copyBits.\\\\n\\\\t\\\\tblt sourceX: 0; destX: 1; copyBits.\\\\n\\\\t\\\\tblt sourceX: 2; destX: 3; copyBits.  \\\\\\\"Exchange bytes 2 and 3\\\\\\\"\\\\n\\\\t\\\\tblt sourceX: 3; destX: 2; copyBits.\\\\n\\\\t\\\\tblt sourceX: 2; destX: 3; copyBits].\\\\n\\\\n! !\\\\n\\\\n!SoundBuffer methodsFor: 'objects from disk' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nreverseEndianness\\\\n\\\\t\\\\\\\"Swap the bytes of each 16-bit word, using a fast BitBlt hack.\\\\\\\"\\\\n\\\\n\\\\t| hack blt |\\\\n\\\\thack := Form new hackBits: self.\\\\n\\\\tblt := (BitBlt toForm: hack) sourceForm: hack.\\\\n\\\\tblt combinationRule: Form reverse.  \\\\\\\"XOR\\\\\\\"\\\\n\\\\tblt sourceY: 0; destY: 0; height: self size; width: 1.\\\\n\\\\tblt sourceX: 0; destX: 1; copyBits.  \\\\\\\"Exchange bytes 0 and 1\\\\\\\"\\\\n\\\\tblt sourceX: 1; destX: 0; copyBits.\\\\n\\\\tblt sourceX: 0; destX: 1; copyBits.\\\\n\\\\tblt sourceX: 2; destX: 3; copyBits.  \\\\\\\"Exchange bytes 2 and 3\\\\\\\"\\\\n\\\\tblt sourceX: 3; destX: 2; copyBits.\\\\n\\\\tblt sourceX: 2; destX: 3; copyBits.\\\\n! !\\\\n\\\\n\\\\n!SoundBuffer methodsFor: 'primitives' stamp: 'jm 9/17/97 13:03'!\\\\nat: index\\\\n\\\\t\\\\\\\"Return the 16-bit integer value at the given index of the receiver.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 143>\\\\n\\\\tindex isInteger ifTrue: [self errorSubscriptBounds: index].\\\\n\\\\tindex isNumber ifTrue: [^ self at: index truncated].\\\\n\\\\tself errorNonIntegerIndex.\\\\n! !\\\\n\\\\n!SoundBuffer methodsFor: 'primitives' stamp: 'jm 9/17/97 13:03'!\\\\nat: index put: value\\\\n\\\\t\\\\\\\"Store the given 16-bit integer at the given index in the receiver.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 144>\\\\n\\\\tindex isInteger\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t(index >= 1 and: [index <= self size])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self errorImproperStore]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self errorSubscriptBounds: index]].\\\\n\\\\tindex isNumber ifTrue: [^ self at: index truncated put: value].\\\\n\\\\tself errorNonIntegerIndex.\\\\n! !\\\\n\\\\n!SoundBuffer methodsFor: 'primitives' stamp: 'jm 9/2/97 16:07'!\\\\nprimFill: aPositiveInteger\\\\n\\\\t\\\\\\\"Fill the receiver, an indexable bytes or words object, with the given positive integer. The range of possible fill values is [0..255] for byte arrays and [0..(2^32 - 1)] for word arrays.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: Since 16-bit word arrays are not built into the virtual machine, this primitive fills by 32-bit words.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 145>\\\\n\\\\tself errorImproperStore.\\\\n! !\\\\n\\\\n\\\\n!SoundBuffer methodsFor: 'utilities' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nasByteArray\\\\n\\\\t\\\\\\\"Answer a ByteArray containing my sample data serialized in most-significant byte first order.\\\\\\\"\\\\n\\\\n\\\\t| sampleCount bytes dst s |\\\\n\\\\tsampleCount := self monoSampleCount.\\\\n\\\\tbytes := ByteArray new: 2 * sampleCount.\\\\n\\\\tdst := 0.\\\\n\\\\t1 to: sampleCount do: [:src |\\\\n\\\\t\\\\ts := self at: src.\\\\n\\\\t\\\\tbytes at: (dst := dst + 1) put: ((s bitShift: -8) bitAnd: 255).\\\\n\\\\t\\\\tbytes at: (dst := dst + 1) put: (s bitAnd: 255)].\\\\n\\\\t^ bytes\\\\n\\\\n\\\\t! !\\\\n\\\\n!SoundBuffer methodsFor: 'utilities' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\naverageEvery: nSamples from: anotherBuffer upTo: inCount\\\\n\\\\n\\\\t| fromIndex sum |\\\\n\\\\n\\\\tfromIndex := 1.\\\\n\\\\t1 to: inCount // nSamples do: [ :i |\\\\n\\\\t\\\\tsum := 0.\\\\n\\\\t\\\\tnSamples timesRepeat: [\\\\n\\\\t\\\\t\\\\tsum := sum + (anotherBuffer at: fromIndex).\\\\n\\\\t\\\\t\\\\tfromIndex := fromIndex + 1.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tself at: i put: sum // nSamples.\\\\n\\\\t].\\\\n! !\\\\n\\\\n!SoundBuffer methodsFor: 'utilities' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ndownSampledLowPassFiltering: doFiltering\\\\n\\\\t\\\\\\\"Answer a new SoundBuffer half the size of the receiver consisting of every other sample. If doFiltering is true, a simple low-pass filter is applied to avoid aliasing of high frequencies. Assume that receiver is monophonic.\\\\\\\"\\\\n\\\\t\\\\\\\"Details: The simple low-pass filter in the current implementation could be improved, at some additional cost.\\\\\\\"\\\\n\\\\n\\\\t| n resultBuf j |\\\\n\\\\tn := self monoSampleCount.\\\\n\\\\tresultBuf := SoundBuffer newMonoSampleCount: n // 2.\\\\n\\\\tj := 0.\\\\n\\\\tdoFiltering\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t1 to: n by: 2 do: [:i |\\\\n\\\\t\\\\t\\\\t\\\\tresultBuf at: (j := j + 1) put:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(((self at: i) + (self at: i + 1)) bitShift: -1)]]\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t1 to: n by: 2 do: [:i |\\\\n\\\\t\\\\t\\\\t\\\\tresultBuf at: (j := j + 1) put: (self at: i)]].\\\\n\\\\n\\\\t^ resultBuf! !\\\\n\\\\n!SoundBuffer methodsFor: 'utilities' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nextractLeftChannel\\\\n\\\\t\\\\\\\"Answer a new SoundBuffer half the size of the receiver consisting of only the left channel of the receiver, which is assumed to contain stereo sound data.\\\\\\\"\\\\n\\\\n\\\\t| n resultBuf j |\\\\n\\\\tn := self monoSampleCount.\\\\n\\\\tresultBuf := SoundBuffer newMonoSampleCount: n // 2.\\\\n\\\\tj := 0.\\\\n\\\\t1 to: n by: 2 do: [:i | resultBuf at: (j := j + 1) put: (self at: i)].\\\\n\\\\t^ resultBuf! !\\\\n\\\\n!SoundBuffer methodsFor: 'utilities' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nextractRightChannel\\\\n\\\\t\\\\\\\"Answer a new SoundBuffer half the size of the receiver consisting of only the right channel of the receiver, which is assumed to contain stereo sound data.\\\\\\\"\\\\n\\\\n\\\\t| n resultBuf j |\\\\n\\\\tn := self monoSampleCount.\\\\n\\\\tresultBuf := SoundBuffer newMonoSampleCount: n // 2.\\\\n\\\\tj := 0.\\\\n\\\\t2 to: n by: 2 do: [:i | resultBuf at: (j := j + 1) put: (self at: i)].\\\\n\\\\t^ resultBuf! !\\\\n\\\\n!SoundBuffer methodsFor: 'utilities' stamp: 'jhm 10/15/97 15:13'!\\\\nindexOfFirstSampleOver: threshold\\\\n\\\\t\\\\\\\"Return the index of the first sample whose absolute value is over the given threshold value. Return an index one greater than my size if no sample is over the threshold.\\\\\\\"\\\\n\\\\n\\\\t1 to: self size do: [:i |\\\\n\\\\t\\\\t(self at: i) abs > threshold ifTrue: [^ i]].\\\\n\\\\t^ self size + 1! !\\\\n\\\\n!SoundBuffer methodsFor: 'utilities' stamp: 'jhm 10/15/97 15:13'!\\\\nindexOfLastSampleOver: threshold\\\\n\\\\t\\\\\\\"Return the index of the last sample whose absolute value is over the given threshold value. Return zero if no sample is over the threshold.\\\\\\\"\\\\n\\\\n\\\\tself size to: 1 by: -1 do: [:i |\\\\n\\\\t\\\\t(self at: i) abs > threshold ifTrue: [^ i]].\\\\n\\\\t^ 0\\\\n! !\\\\n\\\\n!SoundBuffer methodsFor: 'utilities' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nlowPassFiltered\\\\n\\\\t\\\\\\\"Answer a simple low-pass filtered copy of this buffer. Assume it is monophonic.\\\\\\\"\\\\n\\\\n\\\\t| sz out last this |\\\\n\\\\tsz := self monoSampleCount.\\\\n\\\\tout := self clone.\\\\n\\\\tlast := self at: 1.\\\\n\\\\t2 to: sz do: [:i |\\\\n\\\\t\\\\tthis := self at: i.\\\\n\\\\t\\\\tout at: i put: (this + last) // 2.\\\\n\\\\t\\\\tlast := this].\\\\n\\\\t^ out\\\\n! !\\\\n\\\\n!SoundBuffer methodsFor: 'utilities' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nmergeStereo\\\\n\\\\t\\\\\\\"Answer a new SoundBuffer half the size of the receiver that mixes the left and right stereo channels of the receiver, which is assumed to contain stereo sound data.\\\\\\\"\\\\n\\\\n\\\\t| n resultBuf j |\\\\n\\\\tn := self monoSampleCount.\\\\n\\\\tresultBuf := SoundBuffer newMonoSampleCount: n // 2.\\\\n\\\\tj := 0.\\\\n\\\\t1 to: n by: 2 do: [:i | resultBuf at: (j := j + 1) put: (((self at: i) + (self at: i + 1)) // 2)].\\\\n\\\\t^ resultBuf\\\\n! !\\\\n\\\\n!SoundBuffer methodsFor: 'utilities' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nnormalized: percentOfFullVolume\\\\n\\\\t\\\\\\\"Increase my amplitudes so that the highest peak is the given percent of full volume. For example 's normalized: 50' would normalize to half of full volume.\\\\\\\"\\\\n\\\\n\\\\t| peak s mult |\\\\n\\\\tpeak := 0.\\\\n\\\\t1 to: self size do: [:i |\\\\n\\\\t\\\\ts := (self at: i) abs.\\\\n\\\\t\\\\ts > peak ifTrue: [peak := s]].\\\\n\\\\tmult := (32767.0 * percentOfFullVolume) / (100.0 * peak).\\\\n\\\\t1 to: self size do: [:i | self at: i put: (mult * (self at: i)) asInteger].\\\\n! !\\\\n\\\\n!SoundBuffer methodsFor: 'utilities' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nsaveAsAIFFFileSamplingRate: rate on: aBinaryStream\\\\n\\\\t\\\\\\\"Store this mono sound buffer in AIFF file format with the given sampling rate on the given stream.\\\\\\\"\\\\n\\\\n\\\\t| sampleCount s swapBytes |\\\\n\\\\tsampleCount := self monoSampleCount.\\\\n\\\\taBinaryStream nextPutAll: 'FORM' asByteArray.\\\\n\\\\taBinaryStream nextInt32Put: (2 * sampleCount) + ((7 * 4) + 18).\\\\n\\\\taBinaryStream nextPutAll: 'AIFF' asByteArray.\\\\n\\\\taBinaryStream nextPutAll: 'COMM' asByteArray.\\\\n\\\\taBinaryStream nextInt32Put: 18.\\\\n\\\\taBinaryStream nextNumber: 2 put: 1.  \\\\\\\"channels\\\\\\\"\\\\n\\\\taBinaryStream nextInt32Put: sampleCount.\\\\n\\\\taBinaryStream nextNumber: 2 put: 16.  \\\\\\\"bits/sample\\\\\\\"\\\\n\\\\tself storeExtendedFloat: rate on: aBinaryStream.\\\\n\\\\taBinaryStream nextPutAll: 'SSND' asByteArray.\\\\n\\\\taBinaryStream nextInt32Put: (2 * sampleCount) + 8.\\\\n\\\\taBinaryStream nextInt32Put: 0.\\\\n\\\\taBinaryStream nextInt32Put: 0.\\\\n\\\\n\\\\t(aBinaryStream isKindOf: StandardFileStream) ifTrue: [\\\\n\\\\t\\\\t\\\\\\\"optimization: write sound buffer directly to file\\\\\\\"\\\\n\\\\t\\\\tswapBytes := SmalltalkImage current  isLittleEndian.\\\\n\\\\t\\\\tswapBytes ifTrue: [self reverseEndianness].  \\\\\\\"make big endian\\\\\\\"\\\\n\\\\t\\\\taBinaryStream next: (self size // 2) putAll: self startingAt: 1.  \\\\\\\"size in words\\\\\\\"\\\\n\\\\t\\\\tswapBytes ifTrue: [self reverseEndianness].  \\\\\\\"revert to little endian\\\\\\\"\\\\n\\\\t\\\\t^ self].\\\\n\\\\n\\\\t1 to: sampleCount do: [:i |\\\\n\\\\t\\\\ts := self at: i.\\\\n\\\\t\\\\taBinaryStream nextPut: ((s bitShift: -8) bitAnd: 16rFF).\\\\n\\\\t\\\\taBinaryStream nextPut: (s bitAnd: 16rFF)].\\\\n! !\\\\n\\\\n!SoundBuffer methodsFor: 'utilities' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nsplitStereo\\\\n\\\\t\\\\\\\"Answer an array of two SoundBuffers half the size of the receiver consisting of the left and right channels of the receiver (which is assumed to contain stereo sound data).\\\\\\\"\\\\n\\\\n\\\\t| n leftBuf rightBuf leftIndex rightIndex |\\\\n\\\\tn := self monoSampleCount.\\\\n\\\\tleftBuf := SoundBuffer newMonoSampleCount: n // 2.\\\\n\\\\trightBuf := SoundBuffer newMonoSampleCount: n // 2.\\\\n\\\\tleftIndex := rightIndex := 0.\\\\n\\\\t1 to: n by: 2 do: [:i |\\\\n\\\\t\\\\tleftBuf at: (leftIndex := leftIndex + 1) put: (self at: i).\\\\n\\\\t\\\\trightBuf at: (rightIndex := rightIndex + 1) put: (self at: i + 1)].\\\\n\\\\t^ Array with: leftBuf with: rightBuf\\\\n! !\\\\n\\\\n!SoundBuffer methodsFor: 'utilities' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nstoreExtendedFloat: aNumber on: aBinaryStream\\\\n\\\\t\\\\\\\"Store an Apple extended-precision 80-bit floating point number on the given stream.\\\\\\\"\\\\n\\\\t\\\\\\\"Details: I could not find the specification for this format, so constants were determined empirically based on assumption of 1-bit sign, 15-bit exponent, 64-bit mantissa. This format does not seem to have an implicit one before the mantissa as some float formats do.\\\\\\\"\\\\n\\\\n\\\\t| n isNeg exp mantissa |\\\\n\\\\tn := aNumber asFloat.\\\\n\\\\tisNeg := false.\\\\n\\\\tn < 0.0 ifTrue: [\\\\n\\\\t\\\\tn := 0.0 - n.\\\\n\\\\t\\\\tisNeg := true].\\\\n\\\\texp := (n log: 2.0) ceiling.\\\\n\\\\tmantissa := (n * (2 raisedTo: 64 - exp)) truncated.\\\\n\\\\texp := exp + 16r4000 - 2.  \\\\\\\"not sure why the -2 is needed...\\\\\\\"\\\\n\\\\tisNeg ifTrue: [exp := exp bitOr: 16r8000].  \\\\\\\"set sign bit\\\\\\\"\\\\n\\\\taBinaryStream nextPut: ((exp bitShift: -8) bitAnd: 16rFF).\\\\n\\\\taBinaryStream nextPut: (exp bitAnd: 16rFF).\\\\n\\\\t8 to: 1 by: -1 do: [:i | aBinaryStream nextPut: (mantissa digitAt: i)].! !\\\\n\\\\n!SoundBuffer methodsFor: 'utilities' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ntrimmedThreshold: threshold\\\\n\\\\n\\\\t| start end |\\\\n\\\\tstart := self indexOfFirstSampleOver: threshold.\\\\n\\\\tend :=  self indexOfLastSampleOver: threshold.\\\\n\\\\tstart > end ifTrue: [^ SoundBuffer new].\\\\n\\\\tstart := (start - 200) max: 1.\\\\n\\\\tend := (end + 200) min: self size.\\\\n\\\\t^ self copyFrom: start to: end\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSoundBuffer class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SoundBuffer class methodsFor: 'class initialization' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Build a sine wave table.\\\\\\\"\\\\n\\\\t\\\\\\\"SoundBuffer initialize\\\\\\\"\\\\n\\\\n\\\\t| tableSize radiansPerStep peak |\\\\n\\\\ttableSize := 4000.\\\\n\\\\tSineTable := self newMonoSampleCount: tableSize.\\\\n\\\\tradiansPerStep := (2.0 * Float pi) / tableSize asFloat.\\\\n\\\\tpeak := ((1 bitShift: 15) - 1) asFloat.  \\\\\\\"range is +/- (2^15 - 1)\\\\\\\"\\\\n\\\\t1 to: tableSize do: [:i |\\\\n\\\\t\\\\tSineTable at: i put: (peak * (radiansPerStep * (i - 1)) sin) rounded].\\\\n! !\\\\n\\\\n!SoundBuffer class methodsFor: 'class initialization' stamp: 'ads 7/31/2003 11:13'!\\\\nsineTable\\\\n\\\\t\\\\\\\"Answer a SoundBuffer containing one complete cycle of a sine wave.\\\\\\\"\\\\n\\\\n\\\\t^ SineTable\\\\n! !\\\\n\\\\n\\\\n!SoundBuffer class methodsFor: 'instance creation' stamp: 'RAA 12/30/2000 18:20'!\\\\naverageEvery: nSamples from: anotherBuffer upTo: inCount\\\\n\\\\n\\\\t^(self newMonoSampleCount: inCount // nSamples)\\\\n\\\\t\\\\taverageEvery: nSamples \\\\n\\\\t\\\\tfrom: anotherBuffer \\\\n\\\\t\\\\tupTo: inCount! !\\\\n\\\\n!SoundBuffer class methodsFor: 'instance creation' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nfromArray: anArray\\\\n\\\\t\\\\\\\"Return a new SoundBuffer whose contents are copied from the given Array or ByteArray.\\\\\\\"\\\\n\\\\n\\\\t| new |\\\\n\\\\tnew := SoundBuffer newMonoSampleCount: anArray size.\\\\n\\\\t1 to: anArray size do: [:i | new at: i put: (anArray at: i)].\\\\n\\\\t^ new\\\\n! !\\\\n\\\\n!SoundBuffer class methodsFor: 'instance creation' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nfromByteArray: aByteArray\\\\n\\\\t\\\\\\\"Convert the given ByteArray (stored with the most significant byte first) into 16-bit sample buffer.\\\\\\\"\\\\n\\\\n\\\\t| n buf src w |\\\\n\\\\tn := aByteArray size // 2.\\\\n\\\\tbuf := SoundBuffer newMonoSampleCount: n.\\\\n\\\\tsrc := 1.\\\\n\\\\t1 to: n do: [:i |\\\\n\\\\t\\\\tw := ((aByteArray at: src) bitShift: 8) + (aByteArray at: src + 1).\\\\n\\\\t\\\\tw > 32767 ifTrue: [w := w - 65536].\\\\n\\\\t\\\\tbuf at: i put: w.\\\\n\\\\t\\\\tsrc := src + 2].\\\\n\\\\t^ buf\\\\n! !\\\\n\\\\n!SoundBuffer class methodsFor: 'instance creation' stamp: 'jm 9/17/97 13:25'!\\\\nnew: anInteger\\\\n\\\\t\\\\\\\"See the comment in newMonoSampleCount:. To avoid confusion, it is best to create new instances using newMonoSampleCount: or newStereoSampleCount:.\\\\\\\"\\\\n\\\\n\\\\t^ self newMonoSampleCount: anInteger\\\\n! !\\\\n\\\\n!SoundBuffer class methodsFor: 'instance creation' stamp: 'jm 9/17/97 12:44'!\\\\nnewMonoSampleCount: anInteger\\\\n\\\\t\\\\\\\"Return a SoundBuffer large enough to hold the given number of monaural samples (i.e., 16-bit words).\\\\\\\"\\\\n\\\\t\\\\\\\"Details: The size is rounded up to an even number, since the underlying representation is in terms of 32-bit words.\\\\\\\"\\\\n\\\\n\\\\t^ self basicNew: (anInteger + 1) // 2\\\\n! !\\\\n\\\\n!SoundBuffer class methodsFor: 'instance creation' stamp: 'jm 9/17/97 12:52'!\\\\nnewStereoSampleCount: anInteger\\\\n\\\\t\\\\\\\"Return a SoundBuffer large enough to hold the given number of stereo slices. A stereo 'slice' consists of two 16-bit samples, one for each channel.\\\\\\\"\\\\n\\\\n\\\\t^ self basicNew: anInteger\\\\n! !\\\\n\\\\n\\\\n!SoundBuffer class methodsFor: 'objects from disk' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nstartUp\\\\n\\\\t\\\\\\\"Check if the word order has changed from the last save.\\\\\\\"\\\\n\\\\n\\\\t| la |\\\\n\\\\tla := ShortIntegerArray classPool at: #LastSaveOrder.\\\\n\\\\t((la at: 2) = 42 and: [(la at: 1) = 13]) \\\\n\\\\t\\\\tifTrue: [^self swapHalves]. \\\\\\\"Reverse the two 16-bit halves.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"Another reversal happened automatically which reversed the bytes.\\\\\\\"\\\\n! !\\\\n\\\\n!SoundBuffer class methodsFor: 'objects from disk' stamp: 'nk 2/22/2005 15:29'!\\\\nstartUpFrom: anImageSegment \\\\n\\\\t\\\\\\\"In this case, do we need to swap word halves when reading this segment?\\\\\\\"\\\\n\\\\n\\\\t^SmalltalkImage current endianness ~~ anImageSegment endianness \\\\n\\\\t\\\\tifTrue: [Message selector: #swapHalves\\\\t\\\\\\\"will be run on each instance\\\\\\\"]\\\\n\\\\t\\\\tifFalse: [nil]! !\\\\nObject subclass: #SoundCodec\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Sound-Synthesis'!\\\\n!SoundCodec commentStamp: '<historical>' prior: 0!\\\\nI am an abstract class that describes the protocol for sound codecs. Each codec (the name stems from \\\\\\\"COder/DECoder\\\\\\\") describes a particular algorithm for compressing and decompressing sound data. Most sound codecs are called 'lossy' because they lose information; the decompressed sound data is not exactly the same as the original data.\\\\n!\\\\n\\\\n\\\\n!SoundCodec methodsFor: 'compress/decompress' stamp: 'jm 2/2/1999 16:01'!\\\\ncompressAndDecompress: aSound\\\\n\\\\t\\\\\\\"Compress and decompress the given sound. Useful for testing.\\\\\\\"\\\\n\\\\t\\\\\\\"(MuLawCodec new compressAndDecompress: (SampledSound soundNamed: 'camera')) play\\\\\\\"\\\\n\\\\n\\\\t^ (self compressSound: aSound) asSound\\\\n! !\\\\n\\\\n!SoundCodec methodsFor: 'compress/decompress' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ncompressSound: aSound\\\\n\\\\t\\\\\\\"Compress the entirety of the given sound with this codec. Answer a CompressedSoundData.\\\\\\\"\\\\n\\\\n\\\\t| compressed channels |\\\\n\\\\tcompressed := CompressedSoundData new\\\\n\\\\t\\\\tcodecName: self class name;\\\\n\\\\t\\\\tsoundClassName: aSound class name.\\\\n\\\\t(aSound isKindOf: SampledSound) ifTrue: [\\\\n\\\\t\\\\tchannels := Array new: 1.\\\\n\\\\t\\\\tchannels at: 1 put: (self encodeSoundBuffer: aSound samples).\\\\n\\\\t\\\\tcompressed\\\\n\\\\t\\\\t\\\\tchannels: channels;\\\\n\\\\t\\\\t\\\\tsamplingRate: aSound originalSamplingRate;\\\\n\\\\t\\\\t\\\\tfirstSample: 1;\\\\n\\\\t\\\\t\\\\tloopEnd: aSound samples size;\\\\n\\\\t\\\\t\\\\tloopLength: 0.0;\\\\n\\\\t\\\\t\\\\tperceivedPitch: 100.0;\\\\n\\\\t\\\\t\\\\tgain: aSound loudness.\\\\n\\\\t\\\\t^ compressed].\\\\n\\\\t(aSound isKindOf: LoopedSampledSound) ifTrue: [\\\\n\\\\t\\\\taSound isStereo\\\\n\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tchannels := Array new: 2.\\\\n\\\\t\\\\t\\\\t\\\\tchannels at: 1 put: (self encodeSoundBuffer: aSound leftSamples).\\\\n\\\\t\\\\t\\\\t\\\\tchannels at: 2 put: (self encodeSoundBuffer: aSound rightSamples)]\\\\n\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tchannels := Array new: 1.\\\\n\\\\t\\\\t\\\\t\\\\tchannels at: 1 put: (self encodeSoundBuffer: aSound leftSamples)].\\\\n\\\\t\\\\tcompressed\\\\n\\\\t\\\\t\\\\tchannels: channels;\\\\n\\\\t\\\\t\\\\tsamplingRate: aSound originalSamplingRate;\\\\n\\\\t\\\\t\\\\tfirstSample: aSound firstSample;\\\\n\\\\t\\\\t\\\\tloopEnd: aSound loopEnd;\\\\n\\\\t\\\\t\\\\tloopLength: aSound loopLength;\\\\n\\\\t\\\\t\\\\tperceivedPitch: aSound perceivedPitch;\\\\n\\\\t\\\\t\\\\tgain: aSound gain.\\\\n\\\\t\\\\t^ compressed].\\\\n\\\\tself error: 'you can only compress sampled sounds'.\\\\n! !\\\\n\\\\n!SoundCodec methodsFor: 'compress/decompress' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ncompressSound: aSound atRate: desiredSampleRate\\\\n\\\\t\\\\\\\"Compress the entirety of the given sound with this codec. Answer a CompressedSoundData.\\\\\\\"\\\\n\\\\n\\\\t| compressed channels samples newRate ratio buffer |\\\\n\\\\n\\\\tcompressed := CompressedSoundData new\\\\n\\\\t\\\\tcodecName: self class name;\\\\n\\\\t\\\\tsoundClassName: aSound class name.\\\\n\\\\t(aSound isKindOf: SampledSound) ifTrue: [\\\\n\\\\t\\\\t(desiredSampleRate isNil or: \\\\n\\\\t\\\\t\\\\t\\\\t[(ratio := aSound originalSamplingRate // desiredSampleRate) <= 1]) ifTrue: [\\\\n\\\\t\\\\t\\\\tsamples := aSound samples.\\\\n\\\\t\\\\t\\\\tnewRate := aSound originalSamplingRate.\\\\n\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\tbuffer := aSound samples.\\\\n\\\\t\\\\t\\\\tsamples := SoundBuffer \\\\n\\\\t\\\\t\\\\t\\\\taverageEvery: ratio \\\\n\\\\t\\\\t\\\\t\\\\tfrom: buffer \\\\n\\\\t\\\\t\\\\t\\\\tupTo: buffer monoSampleCount.\\\\n\\\\t\\\\t\\\\tnewRate := aSound originalSamplingRate / ratio.\\\\n\\\\t\\\\t].\\\\n\\\\n\\\\t\\\\tchannels := Array new: 1.\\\\n\\\\t\\\\tchannels at: 1 put: (self encodeSoundBuffer: samples).\\\\n\\\\t\\\\tcompressed\\\\n\\\\t\\\\t\\\\tchannels: channels;\\\\n\\\\t\\\\t\\\\tsamplingRate: newRate;\\\\n\\\\t\\\\t\\\\tfirstSample: 1;\\\\n\\\\t\\\\t\\\\tloopEnd: samples size;\\\\n\\\\t\\\\t\\\\tloopLength: 0.0;\\\\n\\\\t\\\\t\\\\tperceivedPitch: 100.0;\\\\n\\\\t\\\\t\\\\tgain: aSound loudness.\\\\n\\\\t\\\\t^ compressed].\\\\n\\\\t(aSound isKindOf: LoopedSampledSound) ifTrue: [\\\\n\\\\t\\\\taSound isStereo\\\\n\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tchannels := Array new: 2.\\\\n\\\\t\\\\t\\\\t\\\\tchannels at: 1 put: (self encodeSoundBuffer: aSound leftSamples).\\\\n\\\\t\\\\t\\\\t\\\\tchannels at: 2 put: (self encodeSoundBuffer: aSound rightSamples)]\\\\n\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tchannels := Array new: 1.\\\\n\\\\t\\\\t\\\\t\\\\tchannels at: 1 put: (self encodeSoundBuffer: aSound leftSamples)].\\\\n\\\\t\\\\tcompressed\\\\n\\\\t\\\\t\\\\tchannels: channels;\\\\n\\\\t\\\\t\\\\tsamplingRate: aSound originalSamplingRate;\\\\n\\\\t\\\\t\\\\tfirstSample: aSound firstSample;\\\\n\\\\t\\\\t\\\\tloopEnd: aSound loopEnd;\\\\n\\\\t\\\\t\\\\tloopLength: aSound loopLength;\\\\n\\\\t\\\\t\\\\tperceivedPitch: aSound perceivedPitch;\\\\n\\\\t\\\\t\\\\tgain: aSound gain.\\\\n\\\\t\\\\t^ compressed].\\\\n\\\\tself error: 'you can only compress sampled sounds'.\\\\n! !\\\\n\\\\n!SoundCodec methodsFor: 'compress/decompress' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ndecompressSound: aCompressedSound\\\\n\\\\t\\\\\\\"Decompress the entirety of the given compressed sound with this codec and answer the resulting sound.\\\\\\\"\\\\n\\\\n\\\\t| channels sound |\\\\n\\\\tchannels := aCompressedSound channels\\\\n\\\\t\\\\tcollect: [:compressed | self decodeCompressedData: compressed].\\\\n\\\\t'SampledSound' = aCompressedSound soundClassName ifTrue: [\\\\n\\\\t\\\\tsound := SampledSound\\\\n\\\\t\\\\t\\\\tsamples: channels first\\\\n\\\\t\\\\t\\\\tsamplingRate: (aCompressedSound samplingRate).\\\\n\\\\t\\\\tsound loudness: aCompressedSound gain.\\\\n\\\\t\\\\t^ sound].\\\\n\\\\t'LoopedSampledSound' = aCompressedSound soundClassName ifTrue: [\\\\n\\\\t\\\\taCompressedSound loopLength = 0\\\\n\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tsound := LoopedSampledSound\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tunloopedSamples: channels first\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpitch: aCompressedSound perceivedPitch\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsamplingRate: aCompressedSound samplingRate]\\\\n\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tsound := LoopedSampledSound\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsamples: channels first\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tloopEnd: aCompressedSound loopEnd\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tloopLength: aCompressedSound loopLength\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpitch: aCompressedSound perceivedPitch\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsamplingRate: aCompressedSound samplingRate].\\\\n\\\\t\\\\tchannels size > 1 ifTrue: [sound rightSamples: channels last].\\\\n\\\\t\\\\tsound\\\\n\\\\t\\\\t\\\\tfirstSample: aCompressedSound firstSample;\\\\n\\\\t\\\\t\\\\tgain: aCompressedSound gain.\\\\n\\\\t\\\\tsound\\\\n\\\\t\\\\t\\\\tsetPitch: 100.0\\\\n\\\\t\\\\t\\\\tdur: (channels first size / aCompressedSound samplingRate)\\\\n\\\\t\\\\t\\\\tloudness: 1.0.\\\\n\\\\t\\\\t^ sound].\\\\n\\\\tself error: 'unknown sound class'.\\\\n! !\\\\n\\\\n\\\\n!SoundCodec methodsFor: 'subclass responsibilities' stamp: 'di 2/8/1999 14:23'!\\\\nbytesPerEncodedFrame\\\\n\\\\t\\\\\\\"Answer the number of bytes required to hold one frame of compressed sound data. Answer zero if this codec produces encoded frames of variable size.\\\\\\\"\\\\n\\\\n\\\\tself subclassResponsibility.\\\\n! !\\\\n\\\\n!SoundCodec methodsFor: 'subclass responsibilities' stamp: 'jm 2/2/1999 15:38'!\\\\ndecodeFrames: frameCount from: srcByteArray at: srcIndex into: dstSoundBuffer at: dstIndex\\\\n\\\\t\\\\\\\"Decode the given number of monophonic frames starting at the given index in the given ByteArray of compressed sound data and storing the decoded samples into the given SoundBuffer starting at the given destination index. Answer a pair containing the number of bytes of compressed data consumed and the number of decompressed samples produced.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: Assume that the sender has ensured that the given number of frames will not exhaust either the source or destination buffers.\\\\\\\"\\\\n\\\\n\\\\tself subclassResponsibility.\\\\n! !\\\\n\\\\n!SoundCodec methodsFor: 'subclass responsibilities' stamp: 'jm 2/2/1999 15:39'!\\\\nencodeFrames: frameCount from: srcSoundBuffer at: srcIndex into: dstByteArray at: dstIndex\\\\n\\\\t\\\\\\\"Encode the given number of frames starting at the given index in the given monophonic SoundBuffer and storing the encoded sound data into the given ByteArray starting at the given destination index. Encode only as many complete frames as will fit into the destination. Answer a pair containing the number of samples consumed and the number of bytes of compressed data produced.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: Assume that the sender has ensured that the given number of frames will not exhaust either the source or destination buffers.\\\\\\\"\\\\n\\\\n\\\\tself subclassResponsibility.\\\\n! !\\\\n\\\\n!SoundCodec methodsFor: 'subclass responsibilities' stamp: 'jm 2/4/1999 11:30'!\\\\nreset\\\\n\\\\t\\\\\\\"Reset my encoding and decoding state. Optional. This default implementation does nothing.\\\\\\\"\\\\n! !\\\\n\\\\n!SoundCodec methodsFor: 'subclass responsibilities' stamp: 'jm 2/2/1999 15:45'!\\\\nsamplesPerFrame\\\\n\\\\t\\\\\\\"Answer the number of sound samples per compression frame.\\\\\\\"\\\\n\\\\n\\\\tself subclassResponsibility.\\\\n! !\\\\n\\\\n\\\\n!SoundCodec methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ndecodeCompressedData: aByteArray\\\\n\\\\t\\\\\\\"Decode the entirety of the given encoded data buffer with this codec. Answer a monophonic SoundBuffer containing the uncompressed samples.\\\\\\\"\\\\n\\\\n\\\\t| frameCount result increments |\\\\n\\\\tframeCount := self frameCount: aByteArray.\\\\n\\\\tresult := SoundBuffer newMonoSampleCount: frameCount * self samplesPerFrame.\\\\n\\\\tself reset.\\\\n\\\\tincrements := self decodeFrames: frameCount from: aByteArray at: 1 into: result at: 1.\\\\n\\\\t((increments first = aByteArray size) and: [increments last = result size]) ifFalse: [\\\\n\\\\t\\\\tself error: 'implementation problem; increment sizes should match buffer sizes'].\\\\n\\\\t^ result\\\\n! !\\\\n\\\\n!SoundCodec methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nencodeSoundBuffer: aSoundBuffer\\\\n\\\\t\\\\\\\"Encode the entirety of the given monophonic SoundBuffer with this codec. Answer a ByteArray containing the compressed sound data.\\\\\\\"\\\\n\\\\n\\\\t| codeFrameSize frameSize fullFrameCount lastFrameSamples result increments finalFrame i lastIncs |\\\\n\\\\tframeSize := self samplesPerFrame.\\\\n\\\\tfullFrameCount := aSoundBuffer monoSampleCount // frameSize.\\\\n\\\\tlastFrameSamples := aSoundBuffer monoSampleCount - (fullFrameCount * frameSize).\\\\n\\\\tcodeFrameSize := self bytesPerEncodedFrame.\\\\n\\\\tcodeFrameSize = 0 ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"Allow room for 1 byte per sample for variable-length compression\\\\\\\"\\\\n\\\\t\\\\tcodeFrameSize := frameSize].\\\\n\\\\tlastFrameSamples > 0\\\\n\\\\t\\\\tifTrue: [result := ByteArray new: (fullFrameCount + 1) * codeFrameSize]\\\\n\\\\t\\\\tifFalse: [result := ByteArray new: fullFrameCount * codeFrameSize].\\\\n\\\\tself reset.\\\\n\\\\tincrements := self encodeFrames: fullFrameCount from: aSoundBuffer at: 1 into: result at: 1.\\\\n\\\\tlastFrameSamples > 0 ifTrue: [\\\\n\\\\t\\\\tfinalFrame := SoundBuffer newMonoSampleCount: frameSize.\\\\n\\\\t\\\\ti := fullFrameCount * frameSize.\\\\n\\\\t\\\\t1 to: lastFrameSamples do: [:j |\\\\n\\\\t\\\\t\\\\tfinalFrame at: j put: (aSoundBuffer at: (i := i + 1))].\\\\n\\\\t\\\\tlastIncs := self encodeFrames: 1 from: finalFrame at: 1 into: result at: 1 + increments second.\\\\n\\\\t\\\\tincrements := Array with: increments first + lastIncs first\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twith: increments second + lastIncs second].\\\\n\\\\tincrements second < result size\\\\n\\\\t\\\\tifTrue: [^ result copyFrom: 1 to: increments second]\\\\n\\\\t\\\\tifFalse: [^ result]\\\\n! !\\\\n\\\\n!SoundCodec methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nframeCount: aByteArray\\\\n\\\\t\\\\\\\"Compute the frame count for this byteArray.  This default computation will have to be overridden by codecs with variable frame sizes.\\\\\\\"\\\\n\\\\n\\\\t| codeFrameSize |\\\\n\\\\tcodeFrameSize := self bytesPerEncodedFrame.\\\\n\\\\t(aByteArray size \\\\\\\\\\\\\\\\ codeFrameSize) = 0 ifFalse:\\\\n\\\\t\\\\t[self error: 'encoded buffer is not an even multiple of the encoded frame size'].\\\\n\\\\t^ aByteArray size // codeFrameSize! !\\\\nAlignmentMorph subclass: #SoundDemoMorph\\\\n\\\\tinstanceVariableNames: 'soundColumn'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-SoundInterface'!\\\\n\\\\n!SoundDemoMorph methodsFor: 'as yet unclassified' stamp: 'tk 2/19/2001 17:49'!\\\\nmakeControls\\\\n\\\\n\\\\t| bb r cc |\\\\n\\\\tcc _ Color black.\\\\n\\\\tr _ AlignmentMorph newRow.\\\\n\\\\tr color: cc; borderWidth: 0; layoutInset: 0.\\\\n\\\\tr hResizing: #shrinkWrap; vResizing: #shrinkWrap; extent: 5@5.\\\\n\\\\tbb _ SimpleButtonMorph new target: self; borderColor: cc.\\\\n\\\\tr addMorphBack: (bb label: 'V1';\\\\t\\\\t\\\\tactionSelector: #playV1).\\\\n\\\\tbb _ SimpleButtonMorph new target: self; borderColor: cc.\\\\n\\\\tr addMorphBack: (bb label: 'V2';\\\\t\\\\t\\\\tactionSelector: #playV2).\\\\n\\\\tbb _ SimpleButtonMorph new target: self; borderColor: cc.\\\\n\\\\tr addMorphBack: (bb label: 'V3';\\\\t\\\\t\\\\tactionSelector: #playV3).\\\\n\\\\tbb _ SimpleButtonMorph new target: self; borderColor: cc.\\\\n\\\\tr addMorphBack: (bb label: 'All';\\\\t\\\\t\\\\tactionSelector: #playAll).\\\\n\\\\tbb _ SimpleButtonMorph new target: self; borderColor: cc.\\\\n\\\\tr addMorphBack: (bb label: 'Stop';\\\\t\\\\tactionSelector: #stopSound).\\\\n\\\\t^ r\\\\n! !\\\\n\\\\n!SoundDemoMorph methodsFor: 'as yet unclassified' stamp: 'dgd 2/22/2003 13:34'!\\\\nplayAll\\\\n\\\\t| snd |\\\\n\\\\tsoundColumn submorphs isEmpty\\\\n\\\\t\\\\tifTrue: [^ self].\\\\n\\\\tself setTimbreFromTile: soundColumn submorphs first.\\\\n\\\\tsnd _ SampledSound bachFugueVoice1On: SampledSound new.\\\\n\\\\tsoundColumn submorphs size >= 2\\\\n\\\\t\\\\tifTrue: [\\\\\\\"\\\\\\\"self setTimbreFromTile: soundColumn submorphs second.\\\\n\\\\t\\\\t\\\\tsnd _ snd\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t+ (AbstractSound bachFugueVoice2On: SampledSound new)].\\\\n\\\\tsoundColumn submorphs size >= 3\\\\n\\\\t\\\\tifTrue: [\\\\\\\"\\\\\\\"self setTimbreFromTile: soundColumn submorphs third.\\\\n\\\\t\\\\t\\\\tsnd _ snd\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t+ (AbstractSound bachFugueVoice3On: SampledSound new)].\\\\n\\\\tsnd play! !\\\\n\\\\n!SoundDemoMorph methodsFor: 'as yet unclassified' stamp: 'dgd 2/22/2003 13:35'!\\\\nplayV1\\\\n\\\\tsoundColumn submorphs isEmpty\\\\n\\\\t\\\\tifTrue: [^ self].\\\\n\\\\tself\\\\n\\\\t\\\\tsetTimbreFromTile: (soundColumn submorphs first).\\\\n\\\\t(SampledSound bachFugueVoice1On: SampledSound new) play! !\\\\n\\\\n!SoundDemoMorph methodsFor: 'as yet unclassified' stamp: 'dgd 2/22/2003 13:35'!\\\\nplayV2\\\\n\\\\tsoundColumn submorphs size < 2\\\\n\\\\t\\\\tifTrue: [^ self].\\\\n\\\\tself\\\\n\\\\t\\\\tsetTimbreFromTile: (soundColumn submorphs second).\\\\n\\\\t(SampledSound bachFugueVoice2On: SampledSound new) playSilentlyUntil: 4.8;\\\\n\\\\t\\\\t resumePlaying! !\\\\n\\\\n!SoundDemoMorph methodsFor: 'as yet unclassified' stamp: 'dgd 2/22/2003 13:35'!\\\\nplayV3\\\\n\\\\tsoundColumn submorphs size < 3\\\\n\\\\t\\\\tifTrue: [^ self].\\\\n\\\\tself\\\\n\\\\t\\\\tsetTimbreFromTile: (soundColumn submorphs third).\\\\n\\\\t(AbstractSound bachFugueVoice3On: SampledSound new) playSilentlyUntil: 14.4;\\\\n\\\\t\\\\t resumePlaying! !\\\\n\\\\n!SoundDemoMorph methodsFor: 'as yet unclassified' stamp: 'jm 11/14/97 11:09'!\\\\nsetTimbreFromTile: aSoundTile\\\\n\\\\n\\\\tSampledSound defaultSampleTable: aSoundTile sound samples.\\\\n\\\\tSampledSound nominalSamplePitch: 400.\\\\n! !\\\\n\\\\n!SoundDemoMorph methodsFor: 'as yet unclassified' stamp: 'jm 11/14/97 11:09'!\\\\nstopSound\\\\n\\\\n\\\\tSoundPlayer shutDown.\\\\n! !\\\\n\\\\n\\\\n!SoundDemoMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:40'!\\\\ndefaultBorderWidth\\\\n\\\\t\\\\\\\"answer the default border width for the receiver\\\\\\\"\\\\n\\\\t^ 2! !\\\\n\\\\n!SoundDemoMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:31'!\\\\ndefaultColor\\\\n\\\\t\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color lightGray! !\\\\n\\\\n!SoundDemoMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 21:04'!\\\\ninitialize\\\\n\\\\t\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tself listDirection: #topToBottom;\\\\n\\\\t\\\\t wrapCentering: #center;\\\\n\\\\t\\\\t cellPositioning: #topCenter;\\\\n\\\\t\\\\t hResizing: #spaceFill;\\\\n\\\\t\\\\t vResizing: #spaceFill;\\\\n\\\\t\\\\t layoutInset: 3;\\\\n\\\\t\\\\t addMorph: self makeControls;\\\\n\\\\tinitializeSoundColumn.\\\\n\\\\tself extent: 118 @ 150! !\\\\n\\\\n!SoundDemoMorph methodsFor: 'initialization' stamp: 'jam 3/9/2003 17:52'!\\\\ninitializeSoundColumn\\\\n\\\\\\\"initialize the receiver's soundColumn\\\\\\\"\\\\n\\\\tsoundColumn _ AlignmentMorph newColumn.\\\\n\\\\tsoundColumn enableDragNDrop.\\\\n\\\\tself addMorphBack: soundColumn! !\\\\nAbstractMediaEventMorph subclass: #SoundEventMorph\\\\n\\\\tinstanceVariableNames: 'sound'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-SoundInterface'!\\\\n\\\\n!SoundEventMorph methodsFor: 'as yet unclassified' stamp: 'RAA 12/7/2000 13:01'!\\\\nsound: aSound\\\\n\\\\n\\\\tsound _ aSound.\\\\n\\\\tself setBalloonText: 'a sound of duration ',(sound duration roundTo: 0.1) printString,' seconds'.! !\\\\n\\\\n\\\\n!SoundEventMorph methodsFor: 'caching' stamp: 'RAA 12/8/2000 09:52'!\\\\nreleaseCachedState\\\\n\\\\n\\\\tsuper releaseCachedState.\\\\n\\\\tsound _ sound compressWith: GSMCodec.\\\\n! !\\\\n\\\\n\\\\n!SoundEventMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:31'!\\\\ndefaultColor\\\\n\\\\t\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color lightGreen! !\\\\n\\\\n!SoundEventMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 21:39'!\\\\ninitialize\\\\n\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\\\\"\\\\\\\"\\\\n\\\\tself height: 10! !\\\\n\\\\n\\\\n!SoundEventMorph methodsFor: 'piano rolls' stamp: 'RAA 12/7/2000 12:36'!\\\\naddMorphsTo: morphList pianoRoll: pianoRoll eventTime: t betweenTime: leftTime and: rightTime\\\\n\\\\n\\\\t| startX lengthInTicks endX |\\\\n\\\\n\\\\tstartTimeInScore > rightTime ifTrue: [^ self].  \\\\n\\\\tlengthInTicks _ pianoRoll scorePlayer ticksForMSecs: sound duration * 1000.0.\\\\n\\\\tstartTimeInScore + lengthInTicks < leftTime ifTrue: [^ self].\\\\n\\\\tstartX _ pianoRoll xForTime: startTimeInScore.\\\\n\\\\tendX _ pianoRoll xForTime: startTimeInScore + lengthInTicks.\\\\n\\\\tmorphList add: \\\\n\\\\t\\\\t(self left: startX; width: endX - startX).\\\\n\\\\n! !\\\\n\\\\n!SoundEventMorph methodsFor: 'piano rolls' stamp: 'RAA 12/7/2000 12:29'!\\\\nencounteredAtTime: ticks inScorePlayer: scorePlayer atIndex: index inEventTrack: track secsPerTick: secsPerTick\\\\n\\\\n\\\\t\\\\\\\"hack... since we are called from within the SoundPlayer loop, the Semaphore will\\\\n\\\\tblock attempts to play directly from here\\\\\\\"\\\\n\\\\tWorldState addDeferredUIMessage: [sound play].! !\\\\n\\\\n!SoundEventMorph methodsFor: 'piano rolls' stamp: 'RAA 12/9/2000 18:48'!\\\\njustDroppedIntoPianoRoll: newOwner event: evt\\\\n\\\\t\\\\n\\\\t| startX lengthInTicks endX |\\\\n\\\\n\\\\tsuper justDroppedIntoPianoRoll: newOwner event: evt.\\\\n\\\\n\\\\tstartTimeInScore _ newOwner timeForX: self left.\\\\n\\\\tlengthInTicks _ newOwner scorePlayer ticksForMSecs: sound duration * 1000.0.\\\\n\\\\tendTimeInScore _ startTimeInScore + lengthInTicks.\\\\n\\\\n\\\\tendTimeInScore > newOwner scorePlayer durationInTicks ifTrue:\\\\n\\\\t\\\\t[newOwner scorePlayer updateDuration].\\\\n\\\\n\\\\tstartX _ newOwner xForTime: startTimeInScore.\\\\n\\\\tendX _ newOwner xForTime: endTimeInScore.\\\\n\\\\tself width: endX - startX.\\\\n\\\\n! !\\\\nSoundRecorder subclass: #SoundInputStream\\\\n\\\\tinstanceVariableNames: 'bufferSize mutex'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Sound-Synthesis'!\\\\n!SoundInputStream commentStamp: '<historical>' prior: 0!\\\\nThis subclass of SoundRecorder supports real-time processing of incoming sound data. The sound input process queues raw sound buffers, allowing them to be read and processed by the client as they become available. A semaphore is used to synchronize between the record process and the client process. Since sound data is buffered, the client process may lag behind the input process without losing data.\\\\n!\\\\n\\\\n\\\\n!SoundInputStream methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nbufferCount\\\\n\\\\t\\\\\\\"Answer the number of sound buffers that have been queued.\\\\\\\"\\\\n\\\\n\\\\t| n |\\\\n\\\\tmutex ifNil: [^ 0].  \\\\\\\"not recording\\\\\\\"\\\\n\\\\tmutex critical: [n := recordedBuffers size].\\\\n\\\\t^ n\\\\n! !\\\\n\\\\n!SoundInputStream methodsFor: 'accessing' stamp: 'jm 9/6/1999 10:36'!\\\\nbufferSize\\\\n\\\\n\\\\t^ bufferSize\\\\n! !\\\\n\\\\n!SoundInputStream methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nbufferSize: aNumber\\\\n\\\\t\\\\\\\"Set the sound buffer size. Buffers of this size will be queued for the client to process.\\\\\\\"\\\\n\\\\n\\\\tbufferSize := aNumber truncated.\\\\n! !\\\\n\\\\n!SoundInputStream methodsFor: 'accessing' stamp: 'jm 9/8/1999 15:23'!\\\\nisRecording\\\\n\\\\t\\\\\\\"Answer true if the sound input process is running.\\\\\\\"\\\\n\\\\n\\\\t^ recordProcess ~~ nil\\\\n! !\\\\n\\\\n!SoundInputStream methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nnextBufferOrNil\\\\n\\\\t\\\\\\\"Answer the next input buffer or nil if no buffer is available.\\\\\\\"\\\\n\\\\n\\\\t| result |\\\\n\\\\tmutex ifNil: [^ nil].  \\\\\\\"not recording\\\\\\\"\\\\n\\\\tmutex critical: [\\\\n\\\\t\\\\trecordedBuffers size > 0\\\\n\\\\t\\\\t\\\\tifTrue: [result := recordedBuffers removeFirst]\\\\n\\\\t\\\\t\\\\tifFalse: [result := nil]].\\\\n\\\\t^ result\\\\n! !\\\\n\\\\n\\\\n!SoundInputStream methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ninitialize\\\\n\\\\n\\\\tsuper initialize.\\\\n\\\\tbufferSize := 1024.\\\\n\\\\tmutex := nil.\\\\n! !\\\\n\\\\n\\\\n!SoundInputStream methodsFor: 'recording controls' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nstartRecording\\\\n\\\\t\\\\\\\"Start the sound input process.\\\\\\\"\\\\n\\\\n\\\\trecordProcess ifNotNil: [self stopRecording].\\\\n\\\\trecordedBuffers := OrderedCollection new: 100.\\\\n\\\\tmutex := Semaphore forMutualExclusion.\\\\n\\\\tsuper startRecording.\\\\n\\\\tpaused := false.\\\\n! !\\\\n\\\\n!SoundInputStream methodsFor: 'recording controls' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nstopRecording\\\\n\\\\t\\\\\\\"Turn off the sound input process and close the driver.\\\\\\\"\\\\n\\\\n\\\\tsuper stopRecording.\\\\n\\\\trecordedBuffers := nil.\\\\n\\\\tmutex := nil.\\\\n! !\\\\n\\\\n\\\\n!SoundInputStream methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nallocateBuffer\\\\n\\\\t\\\\\\\"Allocate a new buffer and reset nextIndex. This message is sent by the sound input process.\\\\\\\"\\\\n\\\\n\\\\tcurrentBuffer := SoundBuffer newMonoSampleCount: bufferSize.\\\\n\\\\tnextIndex := 1.\\\\n! !\\\\n\\\\n!SoundInputStream methodsFor: 'private' stamp: 'jm 9/8/1999 15:24'!\\\\nemitBuffer: buffer\\\\n\\\\t\\\\\\\"Queue a buffer for later processing. This message is sent by the sound input process.\\\\\\\"\\\\n\\\\n\\\\tmutex critical: [recordedBuffers addLast: buffer].\\\\n! !\\\\nRectangleMorph subclass: #SoundLoopMorph\\\\n\\\\tinstanceVariableNames: 'samplesUntilNextControl seqSound cursor controlIndex'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-SoundInterface'!\\\\n\\\\n!SoundLoopMorph methodsFor: 'as yet unclassified' stamp: 'jm 11/14/97 11:21'!\\\\naddCursorMorph\\\\n\\\\tself addMorph:\\\\n\\\\t\\\\t(cursor _ (RectangleMorph\\\\n\\\\t\\\\t\\\\t\\\\tnewBounds: (self innerBounds topLeft extent: 1@self innerBounds height)\\\\n\\\\t\\\\t\\\\t\\\\tcolor: Color red)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tborderWidth: 0)! !\\\\n\\\\n!SoundLoopMorph methodsFor: 'as yet unclassified' stamp: 'jm 11/14/97 11:11'!\\\\nallowSubmorphExtraction\\\\n\\\\n\\\\t^ true! !\\\\n\\\\n!SoundLoopMorph methodsFor: 'as yet unclassified' stamp: 'jm 1/5/98 17:31'!\\\\nbuildSound\\\\n\\\\t\\\\\\\"Build a compound sound for the next iteration of the loop.\\\\\\\"\\\\n\\\\n\\\\t| mixer soundMorphs startTime pan |\\\\n\\\\tmixer _ MixedSound new.\\\\n\\\\tmixer add: (RestSound dur: (self width - (2 * borderWidth)) / 128.0).\\\\n\\\\tsoundMorphs _ self submorphs select: [:m | m respondsTo: #sound].\\\\n\\\\tsoundMorphs do: [:m |\\\\n\\\\t\\\\tstartTime _ (m position x - (self left + borderWidth)) / 128.0.\\\\n\\\\t\\\\tpan _ (m position y - (self top + borderWidth)) asFloat / (self height - (2 * borderWidth) - m height).\\\\n\\\\t\\\\tmixer add: ((RestSound dur: startTime), m sound copy) pan: pan].\\\\n\\\\t^ mixer\\\\n! !\\\\n\\\\n!SoundLoopMorph methodsFor: 'as yet unclassified' stamp: 'jm 11/14/97 11:11'!\\\\nplay\\\\n\\\\t\\\\\\\"Play this sound to the sound ouput port in real time.\\\\\\\"\\\\n\\\\n\\\\tself reset.\\\\n\\\\tSoundPlayer playSound: self.\\\\n! !\\\\n\\\\n\\\\n!SoundLoopMorph methodsFor: 'dropping/grabbing' stamp: 'jm 11/14/97 11:11'!\\\\nwantsDroppedMorph: aMorph event: evt\\\\n\\\\n\\\\t^ aMorph respondsTo: #sound\\\\n! !\\\\n\\\\n\\\\n!SoundLoopMorph methodsFor: 'geometry' stamp: 'jm 11/14/97 11:21'!\\\\nextent: newExtent\\\\n\\\\tsuper extent: (newExtent truncateTo: 128@128) + (self borderWidth*2)! !\\\\n\\\\n\\\\n!SoundLoopMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:40'!\\\\ndefaultBorderWidth\\\\n\\\\t\\\\\\\"answer the default border width for the receiver\\\\\\\"\\\\n\\\\t^ 1! !\\\\n\\\\n!SoundLoopMorph methodsFor: 'initialization' stamp: 'dgd 3/7/2003 15:07'!\\\\ndefaultBounds\\\\n\\\\\\\"answer the default bounds for the receiver\\\\\\\"\\\\n\\\\t^ 0 @ 0 corner: 128 @ 128 + (self defaultBorderWidth * 2)! !\\\\n\\\\n!SoundLoopMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:31'!\\\\ndefaultColor\\\\n\\\\t\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color lightBlue! !\\\\n\\\\n!SoundLoopMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 20:50'!\\\\ninitialize\\\\n\\\\t\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\n\\\\tcontrolIndex _ 0.\\\\n\\\\tself addCursorMorph! !\\\\n\\\\n\\\\n!SoundLoopMorph methodsFor: 'playing' stamp: 'jm 11/14/97 11:21'!\\\\ncontrolRate\\\\n\\\\t\\\\\\\"Answer the number of control changes per second.\\\\\\\"\\\\n\\\\n\\\\t^ 32\\\\n! !\\\\n\\\\n!SoundLoopMorph methodsFor: 'playing' stamp: 'jm 11/14/97 11:21'!\\\\ndoControl\\\\n\\\\n\\\\tseqSound doControl.\\\\n\\\\tcontrolIndex _ controlIndex + 1.\\\\n\\\\tcontrolIndex >= (self controlRate * (self innerBounds width // 128))\\\\n\\\\t\\\\tifTrue: [controlIndex _ 0].\\\\n! !\\\\n\\\\n!SoundLoopMorph methodsFor: 'playing' stamp: 'jm 1/5/98 13:40'!\\\\nmixSampleCount: n into: aSoundBuffer startingAt: startIndex leftVol: leftVol rightVol: rightVol\\\\n\\\\t\\\\\\\"Repeatedly play my sounds.\\\\\\\"\\\\n\\\\n\\\\t| i count samplesNeeded |\\\\n\\\\ti _ startIndex.\\\\n\\\\tsamplesNeeded _ n.\\\\n\\\\t[samplesNeeded > 0] whileTrue: [\\\\n\\\\t\\\\tcount _ seqSound samplesRemaining min: samplesNeeded.\\\\n\\\\t\\\\tcount = 0 ifTrue: [\\\\n\\\\t\\\\t\\\\tself reset.\\\\n\\\\t\\\\t\\\\tcount _ seqSound samplesRemaining min: samplesNeeded.\\\\n\\\\t\\\\t\\\\tcount = 0 ifTrue: [^ self]].  \\\\\\\"zero length sound\\\\\\\"\\\\n\\\\t\\\\tseqSound mixSampleCount: count into: aSoundBuffer startingAt: i leftVol: leftVol rightVol: rightVol.\\\\n\\\\t\\\\ti _ i + count.\\\\n\\\\t\\\\tsamplesNeeded _ samplesNeeded - count].\\\\n! !\\\\n\\\\n!SoundLoopMorph methodsFor: 'playing' stamp: 'jm 1/26/98 22:05'!\\\\nplaySampleCount: n into: aSoundBuffer startingAt: startIndex\\\\n\\\\t\\\\\\\"Mixes the next count samples of this sound into the given buffer starting at the given index, updating the receiver's control parameters at periodic intervals.\\\\\\\"\\\\n\\\\n\\\\t| fullVol samplesBetweenControlUpdates pastEnd i remainingSamples count |\\\\n\\\\tfullVol _ AbstractSound scaleFactor.\\\\n\\\\tsamplesBetweenControlUpdates _ self samplingRate // self controlRate.\\\\n\\\\tpastEnd _ startIndex + n.  \\\\\\\"index just index of after last sample\\\\\\\"\\\\n\\\\ti _ startIndex.\\\\n\\\\t[i < pastEnd] whileTrue: [\\\\n\\\\t\\\\tremainingSamples _ self samplesRemaining.\\\\n\\\\t\\\\tremainingSamples <= 0 ifTrue: [^ self].\\\\n\\\\t\\\\tcount _ pastEnd - i.\\\\n\\\\t\\\\tsamplesUntilNextControl < count ifTrue: [count _ samplesUntilNextControl].\\\\n\\\\t\\\\tremainingSamples < count ifTrue: [count _ remainingSamples].\\\\n\\\\t\\\\tself mixSampleCount: count into: aSoundBuffer startingAt: i leftVol: fullVol rightVol: fullVol.\\\\n\\\\t\\\\tsamplesUntilNextControl _ samplesUntilNextControl - count.\\\\n\\\\t\\\\tsamplesUntilNextControl <= 0 ifTrue: [\\\\n\\\\t\\\\t\\\\tself doControl.\\\\n\\\\t\\\\t\\\\tsamplesUntilNextControl _ samplesBetweenControlUpdates].\\\\n\\\\t\\\\ti _ i + count].\\\\n! !\\\\n\\\\n!SoundLoopMorph methodsFor: 'playing' stamp: 'jm 11/14/97 11:21'!\\\\npositionCursor\\\\n\\\\t| x |\\\\n\\\\tx _ controlIndex * 128 // self controlRate.\\\\n\\\\tcursor position: self innerBounds topLeft + (x@0)\\\\n! !\\\\n\\\\n!SoundLoopMorph methodsFor: 'playing' stamp: 'jm 11/14/97 11:21'!\\\\nreset\\\\n\\\\t\\\\\\\"Reset my internal state for a replay.\\\\\\\"\\\\n\\\\n\\\\tseqSound _ self buildSound reset.\\\\n\\\\tsamplesUntilNextControl _ (self samplingRate // self controlRate).\\\\n\\\\tcontrolIndex _ 0.\\\\n\\\\tself positionCursor! !\\\\n\\\\n!SoundLoopMorph methodsFor: 'playing' stamp: 'jm 11/14/97 11:11'!\\\\nsamplesRemaining\\\\n\\\\n\\\\t^ 1000000\\\\n! !\\\\n\\\\n!SoundLoopMorph methodsFor: 'playing' stamp: 'jm 11/14/97 11:11'!\\\\nsamplingRate\\\\n\\\\t\\\\\\\"Answer the sampling rate in samples per second.\\\\\\\"\\\\n\\\\n\\\\t^ SoundPlayer samplingRate! !\\\\n\\\\n\\\\n!SoundLoopMorph methodsFor: 'stepping and presenter' stamp: 'jm 11/14/97 11:21'!\\\\nstep\\\\n\\\\tself positionCursor! !\\\\n\\\\n!SoundLoopMorph methodsFor: 'stepping and presenter' stamp: 'jm 11/14/97 11:11'!\\\\nstop\\\\n\\\\t\\\\\\\"Stop playing this sound.\\\\\\\"\\\\n\\\\n\\\\tSoundPlayer pauseSound: self.\\\\n! !\\\\n\\\\n\\\\n!SoundLoopMorph methodsFor: 'testing' stamp: 'jm 11/14/97 11:21'!\\\\nstepTime\\\\n\\\\n\\\\t^ 50\\\\n! !\\\\nImageMorph subclass: #SoundMorph\\\\n\\\\tinstanceVariableNames: 'sound'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-SoundInterface'!\\\\n!SoundMorph commentStamp: '<historical>' prior: 0!\\\\nNote: as of December 2000, this does not work. SoundMorph>>buildImage requires the sound to implement #volumeEnvelopeScaledTo: and as yet, no one does.!\\\\n\\\\n\\\\n!SoundMorph methodsFor: 'as yet unclassified' stamp: 'jm 11/14/97 11:21'!\\\\nbuildImage\\\\n\\\\t| scale env h imageColor |\\\\n\\\\towner ifNil: [scale _ 128@128]  \\\\\\\"Default is 128 pix/second, 128 pix fullscale\\\\\\\"\\\\n\\\\t\\\\tifNotNil: [scale _ owner soundScale].\\\\n\\\\tenv _ sound volumeEnvelopeScaledTo: scale.\\\\n\\\\tself image: (ColorForm extent: env size @ env max).\\\\n\\\\t1 to: image width do:\\\\n\\\\t\\\\t[:x | h _ env at: x.\\\\n\\\\t\\\\timage fillBlack: ((x-1)@(image height-h//2) extent: 1@h)].\\\\n\\\\timageColor _ #(black red orange green blue) atPin:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(sound pitch / 110.0) rounded highBit.\\\\n\\\\timage colors: (Array with: Color transparent with: (Color perform: imageColor)).\\\\n! !\\\\n\\\\n!SoundMorph methodsFor: 'as yet unclassified' stamp: 'jm 11/14/97 11:08'!\\\\nreset\\\\n\\\\tsound reset! !\\\\n\\\\n!SoundMorph methodsFor: 'as yet unclassified' stamp: 'jm 11/14/97 11:08'!\\\\nsound\\\\n\\\\t^ sound! !\\\\n\\\\n!SoundMorph methodsFor: 'as yet unclassified' stamp: 'jm 11/14/97 11:08'!\\\\nsound: aSound\\\\n\\\\tsound _ aSound copy.\\\\n\\\\tsound reset.\\\\n\\\\tself buildImage! !\\\\n\\\\n\\\\n!SoundMorph methodsFor: 'dropping/grabbing' stamp: 'ar 10/5/2000 20:05'!\\\\njustDroppedInto: aMorph event: anEvent\\\\n\\\\t| relPosition |\\\\n\\\\trelPosition _ self position - aMorph innerBounds topLeft.\\\\n\\\\trelPosition _ (relPosition x roundTo: 8) @ relPosition y.\\\\n\\\\tself position: aMorph innerBounds topLeft + relPosition.\\\\n\\\\tsound copy play.\\\\n\\\\t^super justDroppedInto: aMorph event: anEvent! !\\\\n\\\\n\\\\n!SoundMorph methodsFor: 'initialization' stamp: 'jm 12/17/97 22:43'!\\\\ninitialize\\\\n\\\\n\\\\tsuper initialize.\\\\n\\\\tself sound: (FMSound pitch: 880.0 dur: 0.2 loudness: 0.8).\\\\n! !\\\\nObject subclass: #SoundPlayer\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: 'ActiveSounds Buffer BufferIndex BufferMSecs LastBuffer PlayerProcess PlayerSemaphore ReadyForBuffer ReverbState SamplingRate SoundJustStarted SoundSupported Stereo UseReadySemaphore UseReverb'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Sound-Synthesis'!\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSoundPlayer class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SoundPlayer class methodsFor: 'accessing' stamp: 'jm 8/13/1998 15:00'!\\\\nbufferMSecs\\\\n\\\\n\\\\t^ BufferMSecs\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'accessing' stamp: 'jm 1/27/98 09:28'!\\\\nreverbState\\\\n\\\\n\\\\t^ ReverbState! !\\\\n\\\\n!SoundPlayer class methodsFor: 'accessing'!\\\\nsamplingRate\\\\n\\\\n\\\\t^ SamplingRate! !\\\\n\\\\n!SoundPlayer class methodsFor: 'accessing' stamp: 'JMM 11/6/2000 10:16'!\\\\nsetVolumeLeft: aLeftVolume volumeRight: aRightVolume\\\\n\\\\t\\\\\\\"Set sound pass in float 0.0-1.0 for left and right channel, with possible 2.0 or  higher to overdrive sound channel \\\\\\\"\\\\n\\\\tself primSoundSetVolumeLeft: aLeftVolume volumeRight: aRightVolume! !\\\\n\\\\n!SoundPlayer class methodsFor: 'accessing' stamp: 'JMM 11/6/2000 10:17'!\\\\nsoundVolume\\\\n\\\\t\\\\\\\"Return sound as array of doubles left then right channel, range is 0.0 to 1.0 but may be overdriven\\\\\\\"\\\\n\\\\t^self primSoundGetVolume! !\\\\n\\\\n!SoundPlayer class methodsFor: 'accessing'!\\\\nstereo\\\\n\\\\n\\\\t^ Stereo\\\\n! !\\\\n\\\\n\\\\n!SoundPlayer class methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ninitialize\\\\n\\\\t\\\\\\\"SoundPlayer initialize; shutDown; startUp\\\\\\\"\\\\n\\\\t\\\\\\\"Details: BufferMSecs represents a tradeoff between latency and quality. If BufferMSecs is too low, the sound will not play smoothly, especially during long-running primitives such as large BitBlts. If BufferMSecs is too high, there will be a long time lag between when a sound buffer is submitted to be played and when that sound is actually heard. BufferMSecs is typically in the range 50-200.\\\\\\\"\\\\n\\\\n\\\\tSamplingRate := 22050.\\\\n\\\\tBufferMSecs := 120.\\\\n\\\\tStereo := true.\\\\n\\\\tUseReverb ifNil: [UseReverb := true].\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'initialization' stamp: 'ar 1/24/2002 18:40'!\\\\nuseLastBuffer\\\\n\\\\t^LastBuffer notNil! !\\\\n\\\\n!SoundPlayer class methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nuseLastBuffer: aBool\\\\n\\\\tBuffer ifNil:[^self].\\\\n\\\\taBool \\\\n\\\\t\\\\tifTrue:[LastBuffer := SoundBuffer basicNew: Buffer basicSize]\\\\n\\\\t\\\\tifFalse:[LastBuffer := nil]\\\\t! !\\\\n\\\\n!SoundPlayer class methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nuseShortBuffer\\\\n\\\\t\\\\\\\"Experimental support for real-time MIDI input. This only works on platforms whose hardware allows very short buffer sizes. It has been tested on a Macintosh Powerbook G3.\\\\\\\"\\\\n\\\\t\\\\\\\"SoundPlayer useShortBuffer\\\\\\\"\\\\n\\\\n\\\\tself shutDown.\\\\n\\\\tBufferMSecs := 15.\\\\n\\\\tSoundPlayer\\\\n\\\\t\\\\tstartPlayerProcessBufferSize: (BufferMSecs * SamplingRate) // 1000\\\\n\\\\t\\\\trate: SamplingRate\\\\n\\\\t\\\\tstereo: Stereo.\\\\n! !\\\\n\\\\n\\\\n!SoundPlayer class methodsFor: 'player process' stamp: 'jm 1/29/98 18:56'!\\\\nisReverbOn\\\\n\\\\n\\\\t^ ReverbState ~~ nil\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'player process' stamp: 'ar 1/24/2002 18:41'!\\\\nlastPlayBuffer\\\\n\\\\t^LastBuffer! !\\\\n\\\\n!SoundPlayer class methodsFor: 'player process' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\noldStylePlayLoop\\\\n\\\\t\\\\\\\"This version of the play loop is used if the VM does not yet support sound primitives that signal a semaphore when a sound buffer becomes available.\\\\\\\"\\\\n\\\\n\\\\t| bytesPerSlice count |\\\\n\\\\tbytesPerSlice := Stereo ifTrue: [4] ifFalse: [2].\\\\n\\\\t[true] whileTrue: [\\\\n\\\\t\\\\t[(count := self primSoundAvailableBytes // bytesPerSlice) > 100]\\\\n\\\\t\\\\t\\\\twhileFalse: [(Delay forMilliseconds: 1) wait].\\\\n\\\\n\\\\t\\\\tcount := count min: Buffer stereoSampleCount.\\\\n\\\\t\\\\tPlayerSemaphore critical: [\\\\n\\\\t\\\\t\\\\tActiveSounds := ActiveSounds select: [:snd | snd samplesRemaining > 0].\\\\n\\\\t\\\\t\\\\tActiveSounds do: [:snd |\\\\n\\\\t\\\\t\\\\t\\\\tsnd ~~ SoundJustStarted ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsnd playSampleCount: count into: Buffer startingAt: 1]].\\\\n\\\\t\\\\t\\\\tReverbState == nil ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tReverbState applyReverbTo: Buffer startingAt: 1 count: count].\\\\n\\\\t\\\\t\\\\tself primSoundPlaySamples: count from: Buffer startingAt: 1.\\\\n\\\\t\\\\t\\\\tBuffer primFill: 0.\\\\n\\\\t\\\\t\\\\tSoundJustStarted := nil]].\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'player process' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nplayLoop\\\\n\\\\t\\\\\\\"The sound player process loop.\\\\\\\"\\\\n\\\\n\\\\t| bytesPerSlice count willStop mayStop |\\\\n\\\\tmayStop := Preferences soundStopWhenDone.\\\\n\\\\tbytesPerSlice := Stereo ifTrue: [4] ifFalse: [2].\\\\n\\\\t[true] whileTrue: [\\\\n\\\\t\\\\t[(count := self primSoundAvailableBytes // bytesPerSlice) > 100]\\\\n\\\\t\\\\t\\\\twhileFalse: [ReadyForBuffer wait].\\\\n\\\\n\\\\t\\\\tcount := count min: Buffer stereoSampleCount.\\\\n\\\\t\\\\tPlayerSemaphore critical: [\\\\n\\\\t\\\\t\\\\tActiveSounds := ActiveSounds select: [:snd | snd samplesRemaining > 0].\\\\n\\\\t\\\\t\\\\tActiveSounds do: [:snd |\\\\n\\\\t\\\\t\\\\t\\\\tsnd ~~ SoundJustStarted ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsnd playSampleCount: count into: Buffer startingAt: 1]].\\\\n\\\\t\\\\t\\\\tReverbState == nil ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tReverbState applyReverbTo: Buffer startingAt: 1 count: count].\\\\n\\\\t\\\\t\\\\tself primSoundPlaySamples: count from: Buffer startingAt: 1.\\\\n\\\\t\\\\t\\\\twillStop := mayStop and:[\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(ActiveSounds size = 0) and:[\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself isAllSilence: Buffer size: count]].\\\\n\\\\t\\\\t\\\\tLastBuffer ifNotNil:[\\\\n\\\\t\\\\t\\\\t\\\\tLastBuffer replaceFrom: 1 to: LastBuffer size with: Buffer startingAt: 1.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\twillStop\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:[self shutDown. PlayerProcess := nil]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:[Buffer primFill: 0].\\\\n\\\\t\\\\t\\\\tSoundJustStarted := nil].\\\\n\\\\t\\\\twillStop ifTrue:[^self].\\\\n\\\\t].\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'player process' stamp: 'nk 2/16/2001 13:26'!\\\\nplayerProcess\\\\n\\\\t^PlayerProcess! !\\\\n\\\\n!SoundPlayer class methodsFor: 'player process' stamp: 'ar 2/4/2001 18:01'!\\\\nstartPlayerProcessBufferSize: bufferSize rate: samplesPerSecond stereo: stereoFlag\\\\n\\\\t\\\\\\\"Start the sound player process. Terminate the old process, if any.\\\\\\\"\\\\n\\\\t\\\\\\\"SoundPlayer startPlayerProcessBufferSize: 1000 rate: 11025 stereo: false\\\\\\\"\\\\n\\\\t^self startPlayerProcessBufferSize: bufferSize \\\\n\\\\t\\\\t\\\\trate: samplesPerSecond \\\\n\\\\t\\\\t\\\\tstereo: stereoFlag \\\\n\\\\t\\\\t\\\\tsound: nil! !\\\\n\\\\n!SoundPlayer class methodsFor: 'player process' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nstartPlayerProcessBufferSize: bufferSize rate: samplesPerSecond stereo: stereoFlag sound: aSound\\\\n\\\\t\\\\\\\"Start the sound player process. Terminate the old process, if any.\\\\\\\"\\\\n\\\\t\\\\\\\"SoundPlayer startPlayerProcessBufferSize: 1000 rate: 11025 stereo: false\\\\\\\"\\\\n\\\\n\\\\tself stopPlayerProcess.\\\\n\\\\taSound\\\\n\\\\t\\\\tifNil:[ActiveSounds := OrderedCollection new]\\\\n\\\\t\\\\tifNotNil:[ActiveSounds := OrderedCollection with: aSound].\\\\n\\\\tBuffer := SoundBuffer newStereoSampleCount: (bufferSize // 4) * 4.\\\\n\\\\tLastBuffer ifNotNil:[LastBuffer := SoundBuffer basicNew: Buffer basicSize].\\\\n\\\\tPlayerSemaphore := Semaphore forMutualExclusion.\\\\n\\\\tSamplingRate := samplesPerSecond.\\\\n\\\\tStereo := stereoFlag.\\\\n\\\\tReadyForBuffer := Semaphore new.\\\\n\\\\tSoundSupported := true. \\\\\\\"Assume so\\\\\\\"\\\\n\\\\tUseReadySemaphore := true.  \\\\\\\"set to false if ready semaphore not supported by VM\\\\\\\"\\\\n\\\\tself primSoundStartBufferSize: Buffer stereoSampleCount\\\\n\\\\t\\\\trate: samplesPerSecond\\\\n\\\\t\\\\tstereo: Stereo\\\\n\\\\t\\\\tsemaIndex: (Smalltalk registerExternalObject: ReadyForBuffer).\\\\n\\\\t\\\\\\\"Check if sound start prim was successful\\\\\\\"\\\\n\\\\tSoundSupported ifFalse:[^self].\\\\n\\\\tUseReadySemaphore\\\\n\\\\t\\\\tifTrue: [PlayerProcess := [SoundPlayer playLoop] newProcess]\\\\n\\\\t\\\\tifFalse: [PlayerProcess := [SoundPlayer oldStylePlayLoop] newProcess].\\\\n\\\\tUseReverb ifTrue: [self startReverb].\\\\n\\\\n\\\\tPlayerProcess priority: Processor userInterruptPriority.\\\\n\\\\tPlayerProcess resume.! !\\\\n\\\\n!SoundPlayer class methodsFor: 'player process' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nstartReverb\\\\n\\\\t\\\\\\\"Start a delay-line style reverb with the given tap delays and gains. Tap delays are given in samples and should be prime integers; the following comment gives an expression that generates primes.\\\\\\\"\\\\n\\\\t\\\\\\\"Integer primesUpTo: 22050\\\\\\\"\\\\n\\\\n\\\\tUseReverb := true.\\\\n\\\\tReverbState := ReverbSound new\\\\n\\\\t\\\\ttapDelays: #(1601 7919) gains: #(0.12 0.07).\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'player process' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nstopPlayerProcess\\\\n\\\\t\\\\\\\"Stop the sound player process.\\\\\\\"\\\\n\\\\t\\\\\\\"SoundPlayer stopPlayerProcess\\\\\\\"\\\\n\\\\n\\\\t(PlayerProcess == nil or:[PlayerProcess == Processor activeProcess]) \\\\n\\\\t\\\\tifFalse:[PlayerProcess terminate].\\\\n\\\\tPlayerProcess := nil.\\\\n\\\\tself primSoundStop.\\\\n\\\\tActiveSounds := OrderedCollection new.\\\\n\\\\tBuffer := nil.\\\\n\\\\tPlayerSemaphore := Semaphore forMutualExclusion.\\\\n\\\\tReadyForBuffer ifNotNil:\\\\n\\\\t\\\\t[Smalltalk unregisterExternalObject: ReadyForBuffer].\\\\n\\\\tReadyForBuffer := nil.\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'player process' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nstopReverb\\\\n\\\\n\\\\tUseReverb := false.\\\\n\\\\tReverbState := nil.\\\\n! !\\\\n\\\\n\\\\n!SoundPlayer class methodsFor: 'playing' stamp: 'ar 2/1/2001 15:20'!\\\\ncanStartPlayer\\\\n\\\\t\\\\\\\"Some platforms do no support simultaneous record and play. If this is one of those platforms, return false if there is a running SoundRecorder.\\\\\\\"\\\\n\\\\n\\\\tPreferences canRecordWhilePlaying ifTrue: [^ true].\\\\n\\\\tSoundRecorder anyActive ifTrue:[^false].\\\\n\\\\t^ true\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'playing' stamp: 'di 8/5/1998 23:08'!\\\\nisPlaying: aSound\\\\n\\\\t^ ActiveSounds includes: aSound! !\\\\n\\\\n!SoundPlayer class methodsFor: 'playing' stamp: 'jm 8/23/97 20:38'!\\\\npauseSound: aSound\\\\n\\\\t\\\\\\\"Stop playing the given sound. Playing can be resumed from this point later.\\\\\\\"\\\\n\\\\n\\\\tPlayerSemaphore critical: [\\\\n\\\\t\\\\tActiveSounds remove: aSound ifAbsent: []].\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'playing' stamp: 'ar 2/19/2001 01:28'!\\\\nplaySound: aSound\\\\n\\\\t\\\\\\\"Reset and start playing the given sound from its beginning.\\\\\\\"\\\\n\\\\n\\\\taSound reset.\\\\n\\\\taSound samplesRemaining = 0 ifTrue:[^self].\\\\n\\\\tself resumePlaying: aSound.\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'playing' stamp: 'jm 9/8/1998 17:54'!\\\\nresumePlaying: aSound\\\\n\\\\t\\\\\\\"Start playing the given sound without resetting it; it will resume playing from where it last stopped.\\\\\\\"\\\\n\\\\t\\\\\\\"Implementation detail: On virtual machines that don't support the quickstart primitive, you may need to edit this method to pass false to resumePlaying:quickStart:.\\\\\\\"\\\\n\\\\n\\\\tself resumePlaying: aSound quickStart: true.\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'playing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nresumePlaying: aSound quickStart: quickStart\\\\n\\\\t\\\\\\\"Start playing the given sound without resetting it; it will resume playing from where it last stopped. If quickStart is true, then try to start playing the given sound immediately.\\\\\\\"\\\\n\\\\n\\\\t| doQuickStart |\\\\n\\\\tPreferences soundsEnabled ifFalse: [^ self].\\\\n\\\\tdoQuickStart := quickStart.\\\\n\\\\tPreferences soundQuickStart ifFalse: [doQuickStart := false].\\\\n\\\\tPlayerProcess == nil ifTrue: [\\\\n\\\\t\\\\tself canStartPlayer ifFalse: [^ self].\\\\n\\\\t\\\\t^self startUpWithSound: aSound].\\\\n\\\\n\\\\tPlayerSemaphore critical: [\\\\n\\\\t\\\\t(ActiveSounds includes: aSound)\\\\n\\\\t\\\\t\\\\tifTrue: [doQuickStart := false]\\\\n\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tdoQuickStart ifFalse: [ActiveSounds add: aSound]]].\\\\n\\\\n\\\\t\\\\\\\"quick-start the given sound, unless the sound player has just started\\\\\\\"\\\\n\\\\tdoQuickStart ifTrue: [self startPlayingImmediately: aSound].\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'playing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nstopPlayingAll\\\\n\\\\t\\\\\\\"Stop playing all sounds.\\\\\\\"\\\\n\\\\n\\\\tPlayerSemaphore critical: [\\\\n\\\\t\\\\tActiveSounds := ActiveSounds species new].\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'playing' stamp: 'jm 9/13/97 19:49'!\\\\nwaitUntilDonePlaying: aSound\\\\n\\\\t\\\\\\\"Wait until the given sound is no longer playing.\\\\\\\"\\\\n\\\\n\\\\t[PlayerSemaphore critical: [ActiveSounds includes: aSound]]\\\\n\\\\t\\\\twhileTrue: [(Delay forMilliseconds: 100) wait].\\\\n! !\\\\n\\\\n\\\\n!SoundPlayer class methodsFor: 'primitive test' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nboinkPitch: p dur: d loudness: l waveTable: waveTable pan: pan\\\\n\\\\t\\\\\\\"Play a decaying note on the given stream using the given wave table. Used for testing only.\\\\\\\"\\\\n\\\\n\\\\t| decay tableSize amplitude increment cycles i |\\\\n\\\\tdecay := 0.96.\\\\n\\\\ttableSize := waveTable size.\\\\n\\\\tamplitude := l asInteger min: 1000.\\\\n\\\\tincrement := ((p asFloat * tableSize asFloat) / SamplingRate asFloat) asInteger.\\\\n\\\\tincrement := (increment max: 1) min: (tableSize // 2).\\\\n\\\\tcycles := (d * SamplingRate asFloat) asInteger.\\\\n\\\\n\\\\ti := 1.\\\\n\\\\t1 to: cycles do: [:cycle |\\\\n\\\\t\\\\t(cycle \\\\\\\\\\\\\\\\ 100) = 0\\\\n\\\\t\\\\t\\\\tifTrue: [amplitude := (decay * amplitude asFloat) asInteger].\\\\n\\\\t\\\\ti := (((i - 1) + increment) \\\\\\\\\\\\\\\\ tableSize) + 1.\\\\n\\\\t\\\\tself playTestSample: (amplitude * (waveTable at: i)) // 1000 pan: pan].\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'primitive test' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nboinkScale\\\\n\\\\t\\\\\\\"Tests the sound output primitives by playing a scale.\\\\\\\"\\\\n\\\\t\\\\\\\"SoundPlayer boinkScale\\\\\\\"\\\\n\\\\n\\\\t| sineTable pan |\\\\n\\\\tself shutDown.\\\\n\\\\tSamplingRate := 11025.\\\\n\\\\tStereo := true.\\\\n\\\\tsineTable := self sineTable: 1000.\\\\n\\\\tBuffer := SoundBuffer newStereoSampleCount: 1000.\\\\n\\\\tBufferIndex := 1.\\\\n\\\\tself primSoundStartBufferSize: Buffer stereoSampleCount\\\\n\\\\t\\\\trate: SamplingRate\\\\n\\\\t\\\\tstereo: Stereo.\\\\n\\\\tpan := 0.\\\\n\\\\t#(261.626 293.665 329.628 349.229 391.996 440.001 493.884 523.252) do: [:p |\\\\n\\\\t\\\\tself boinkPitch: p dur: 0.3 loudness: 300 waveTable: sineTable pan: pan.\\\\n\\\\t\\\\tpan := pan + 125].\\\\n\\\\n\\\\tself boinkPitch: 261.626 dur: 1.0 loudness: 300 waveTable: sineTable pan: 500.\\\\n\\\\tself primSoundStop.\\\\n\\\\tself shutDown.\\\\n\\\\tSoundPlayer initialize.  \\\\\\\"reset sampling rate, buffer size, and stereo flag\\\\\\\"\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'primitive test' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nplayTestSample: s pan: pan\\\\n\\\\t\\\\\\\"Append the given sample in the range [-32767..32767] to the output buffer, playing the output buffer when it is full. Used for testing only.\\\\\\\"\\\\n\\\\n\\\\t| sample leftSample |\\\\n\\\\tBufferIndex >= Buffer size\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\\\\"current buffer is full; play it\\\\\\\"\\\\n\\\\t\\\\t\\\\t[self primSoundAvailableBytes > 0]\\\\n\\\\t\\\\t\\\\t\\\\twhileFalse. \\\\\\\"wait for space to be available\\\\\\\"\\\\n\\\\t\\\\t\\\\tself primSoundPlaySamples: Buffer stereoSampleCount from: Buffer startingAt: 1.\\\\n\\\\t\\\\t\\\\tBuffer primFill: 0.\\\\n\\\\t\\\\t\\\\tBufferIndex := 1].\\\\n\\\\n\\\\tsample := s.\\\\n\\\\tsample >  32767 ifTrue: [ sample :=  32767 ]. \\\\n\\\\tsample < -32767 ifTrue: [ sample := -32767 ].\\\\n\\\\n\\\\tStereo\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\tleftSample := (sample * pan) // 1000.\\\\n\\\\t\\\\t\\\\tBuffer at: BufferIndex\\\\t\\\\tput: sample - leftSample.\\\\n\\\\t\\\\t\\\\tBuffer at: BufferIndex + 1\\\\tput: leftSample]\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\tBuffer at: BufferIndex + 1 put: sample].\\\\n\\\\tBufferIndex := BufferIndex + 2.\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'primitive test' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nsineTable: size\\\\n\\\\t\\\\\\\"Compute a sine table of the given size. Used for testing only.\\\\\\\"\\\\n\\\\n\\\\t| radiansPerStep table |\\\\n\\\\ttable := Array new: size.\\\\n\\\\tradiansPerStep := (2.0 * Float pi) / table size asFloat.\\\\n\\\\t1 to: table size do: [:i |\\\\n\\\\t\\\\ttable at: i put:\\\\n\\\\t\\\\t\\\\t(32767.0 * (radiansPerStep * i) sin) asInteger].\\\\n\\\\n\\\\t^ table\\\\n! !\\\\n\\\\n\\\\n!SoundPlayer class methodsFor: 'snapshotting' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nshutDown\\\\n\\\\t\\\\\\\"Stop player process, for example before snapshotting.\\\\\\\"\\\\n\\\\n\\\\tself stopPlayerProcess.\\\\n\\\\tReverbState := nil.\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'snapshotting' stamp: 'jm 7/11/97 12:17'!\\\\nstartUp\\\\n\\\\t\\\\\\\"Start up the player process.\\\\\\\"\\\\n\\\\n\\\\tSoundPlayer initialize.\\\\n\\\\tSoundPlayer\\\\n\\\\t\\\\tstartPlayerProcessBufferSize: (BufferMSecs * SamplingRate) // 1000\\\\n\\\\t\\\\trate: SamplingRate\\\\n\\\\t\\\\tstereo: Stereo.\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'snapshotting' stamp: 'ar 2/4/2001 17:59'!\\\\nstartUpWithSound: aSound\\\\n\\\\t\\\\\\\"Start up the player process.\\\\\\\"\\\\n\\\\n\\\\tSoundPlayer initialize.\\\\n\\\\tSoundPlayer\\\\n\\\\t\\\\tstartPlayerProcessBufferSize: (BufferMSecs * SamplingRate) // 1000\\\\n\\\\t\\\\trate: SamplingRate\\\\n\\\\t\\\\tstereo: Stereo\\\\n\\\\t\\\\tsound: aSound.\\\\n! !\\\\n\\\\n\\\\n!SoundPlayer class methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nisAllSilence: buffer size: count\\\\n\\\\t\\\\\\\"return true if the buffer is all silence after reverb has ended\\\\\\\"\\\\n\\\\t| value |\\\\n\\\\tvalue := buffer at: 1.\\\\n\\\\t2 to: count do:[:i| (buffer at: i) = value ifFalse:[^false]].\\\\n\\\\t^true! !\\\\n\\\\n!SoundPlayer class methodsFor: 'private' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSoundAvailableBytes\\\\n\\\\t\\\\\\\"Return the number of bytes of available space in the sound output buffer.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: Squeak always uses buffers containing 4-bytes per sample (2 channels at 2 bytes per channel) regardless of the state of the Stereo flag.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSoundAvailableSpace' module: 'SoundPlugin'>\\\\n\\\\t^ self primitiveFailed\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'private' stamp: 'JMM 11/6/2000 10:17'!\\\\nprimSoundGetVolume\\\\n\\\\t\\\\\\\"Return sound as array of doubles left then right channel, range is 0.0 to 1.0 but may be overdriven\\\\\\\"\\\\n\\\\t<primitive: 'primitiveSoundGetVolume' module: 'SoundPlugin'>\\\\n\\\\t^Array with: 1.0 with: 1.0! !\\\\n\\\\n!SoundPlayer class methodsFor: 'private' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSoundInsertSamples: count from: aSoundBuffer samplesOfLeadTime: anInteger\\\\n\\\\t\\\\\\\"Mix the given number of sample frames from the given sound buffer into the queue of samples that has already been submitted to the sound driver. This primitive is used to start a sound playing with minimum latency, even if large sound output buffers are being used to ensure smooth sound output. Returns the number of samples consumed, or zero if the primitive is not implemented or fails.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSoundInsertSamples' module: 'SoundPlugin'>\\\\n\\\\t^ 0\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'private' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSoundPlaySamples: count from: aSampleBuffer startingAt: index\\\\n\\\\t\\\\\\\"Copy count bytes into the current sound output buffer from the given sample buffer starting at the given index.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSoundPlaySamples' module: 'SoundPlugin'>\\\\n\\\\t^ self primitiveFailed\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'private' stamp: 'JMM 11/6/2000 10:14'!\\\\nprimSoundSetVolumeLeft: aLeftVolume volumeRight: aRightVolume\\\\n\\\\t\\\\\\\"Set sound pass in float 0.0-1.0 for left and right channel, with possible 2.0 or  higher to overdrive sound channel \\\\\\\"\\\\n\\\\t<primitive: 'primitiveSoundSetLeftVolume' module: 'SoundPlugin'>\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nprimSoundStartBufferSize: bufferSize rate: samplesPerSecond stereo: stereoFlag\\\\n\\\\t\\\\\\\"Start double-buffered sound output with the given buffer size and sampling rate. This version has been superceded by primitive 171 (primSoundStartBufferSize:rate:stereo:semaIndex:).\\\\\\\"\\\\n\\\\t\\\\\\\"ar 12/5/1998 Turn off the sound if not supported\\\\\\\"\\\\n\\\\t<primitive: 'primitiveSoundStart' module: 'SoundPlugin'>\\\\n\\\\tSoundSupported := false.! !\\\\n\\\\n!SoundPlayer class methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nprimSoundStartBufferSize: bufferSize rate: samplesPerSecond stereo: stereoFlag semaIndex: anInteger\\\\n\\\\t\\\\\\\"Start double-buffered sound output with the given buffer size and sampling rate. If the given semaphore index is > 0, it is taken to be the index of a Semaphore in the external objects array to be signalled when the sound driver is ready to accept another buffer of samples.\\\\\\\"\\\\n\\\\t\\\\\\\"Details: If this primitive fails, this method tries to use the older version instead.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSoundStartWithSemaphore' module: 'SoundPlugin'>\\\\n\\\\tUseReadySemaphore := false.\\\\n\\\\tself primSoundStartBufferSize: bufferSize rate: samplesPerSecond stereo: stereoFlag.\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'private' stamp: 'tpr 2/2/2001 19:46'!\\\\nprimSoundStop\\\\n\\\\t\\\\\\\"Stop double-buffered sound output. Must not raise an error because it is used inside error handling and at system shutdown\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSoundStop' module: 'SoundPlugin'>! !\\\\n\\\\n!SoundPlayer class methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nstartPlayingImmediately: aSound\\\\n\\\\t\\\\\\\"Private!! Start playing the given sound as soon as possible by mixing it into the sound output buffers of the underlying sound driver.\\\\\\\"\\\\n\\\\n\\\\t| totalSamples buf n leftover src rest |\\\\n\\\\t\\\\\\\"first, fill a double-size buffer with samples\\\\\\\"\\\\n\\\\t\\\\\\\"Note: The code below assumes that totalSamples contains two\\\\n\\\\t buffers worth of samples, and the insertSamples primitive is\\\\n\\\\t expected to consume at least one buffer's worth of these\\\\n\\\\t samples. The remaining samples are guaranteed to fit into\\\\n\\\\t a single buffer.\\\\\\\"\\\\n\\\\ttotalSamples := Buffer stereoSampleCount * 2.  \\\\\\\"two buffer's worth\\\\\\\"\\\\n\\\\tbuf := SoundBuffer newStereoSampleCount: totalSamples.\\\\n\\\\taSound playSampleCount: totalSamples into: buf startingAt: 1.\\\\n\\\\tReverbState == nil ifFalse: [\\\\n\\\\t\\\\tReverbState applyReverbTo: buf startingAt: 1 count: totalSamples].\\\\n\\\\n\\\\tPlayerSemaphore critical: [\\\\n\\\\t\\\\t\\\\\\\"insert as many samples as possible into the sound driver's buffers\\\\\\\"\\\\n\\\\t\\\\tn := self primSoundInsertSamples: totalSamples\\\\n\\\\t\\\\t\\\\tfrom: buf\\\\n\\\\t\\\\t\\\\tsamplesOfLeadTime: 1024.\\\\n\\\\t\\\\tn > 0 ifTrue:[\\\\n\\\\t\\\\t\\\\tleftover := totalSamples - n.\\\\n\\\\n\\\\t\\\\t\\\\t\\\\\\\"copy the remainder of buf into Buffer\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\\\\"Note: the following loop iterates over 16-bit words, not two-word stereo slices\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\\\\"assert: 0 < leftover <= Buffer stereoSampleCount\\\\\\\"\\\\n\\\\t\\\\t\\\\tsrc := 2 * n.\\\\n\\\\t\\\\t\\\\t1 to: 2 * leftover do:\\\\n\\\\t\\\\t\\\\t\\\\t[:dst | Buffer at: dst put: (buf at: (src := src + 1))].\\\\n\\\\n\\\\t\\\\t\\\\t\\\\\\\"generate enough additional samples to finish filling Buffer\\\\\\\"\\\\n\\\\t\\\\t\\\\trest := Buffer stereoSampleCount - leftover.\\\\n\\\\t\\\\t\\\\taSound playSampleCount: rest into: Buffer startingAt: leftover + 1.\\\\n\\\\t\\\\t\\\\tReverbState == nil ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tReverbState applyReverbTo: Buffer startingAt: leftover + 1 count: rest].\\\\n\\\\n\\\\t\\\\t\\\\t\\\\\\\"record the fact that this sound has already been played into Buffer so that we don't process it again this time around\\\\\\\"\\\\n\\\\t\\\\t\\\\tSoundJustStarted := aSound.\\\\n\\\\t\\\\t] ifFalse:[\\\\n\\\\t\\\\t\\\\t\\\\\\\"quick start failed; reset the sound so we start over\\\\\\\"\\\\n\\\\t\\\\t\\\\taSound reset.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tActiveSounds add: aSound].\\\\n! !\\\\nStringReadoutTile subclass: #SoundReadoutTile\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'EToys-Scripting Tiles'!\\\\n!SoundReadoutTile commentStamp: 'sw 11/24/2003 15:25' prior: 0!\\\\nA tile comprising a readout for a sound-valued instance variable in a Viewer.  It sports up/down  arrows, and a click on the sound name results in a pop-up menu, offering the user the opportunity to choose a new one.!\\\\n\\\\n\\\\n!SoundReadoutTile methodsFor: 'arrows' stamp: 'sw 1/28/2005 00:57'!\\\\narrowAction: delta\\\\n\\\\t\\\\\\\"Do what is appropriate when an arrow on the tile is pressed; delta will be +1 or -1\\\\\\\"\\\\n\\\\n\\\\t| soundChoices index |\\\\n\\\\tsoundChoices _ self soundChoices.\\\\n\\\\tindex _ soundChoices indexOf: literal.\\\\n\\\\tself literal: (soundChoices atWrap: (index + delta)).\\\\n\\\\tself playSoundNamed: literal! !\\\\n\\\\n!SoundReadoutTile methodsFor: 'arrows' stamp: 'sw 11/24/2003 14:54'!\\\\nhandlerForMouseDown: anEvent\\\\n\\\\n\\\\t\\\\\\\"Return the (prospective) handler for a mouse down event. The handler is temporarily installed and can be used for morphs further down the hierarchy to negotiate whether the inner or the outer morph should finally handle the event\\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\t^ ((self findA: UpdatingStringMorph) bounds containsPoint: anEvent cursorPoint)\\\\n\\\\n\\\\t\\\\tifTrue:\\\\n\\\\n\\\\t\\\\t\\\\t[self]\\\\n\\\\n\\\\t\\\\tifFalse:\\\\n\\\\n\\\\t\\\\t\\\\t[super handlerForMouseDown: anEvent]! !\\\\n\\\\n!SoundReadoutTile methodsFor: 'arrows' stamp: 'sw 1/28/2005 00:56'!\\\\nmouseDown: evt\\\\n\\\\t\\\\\\\"Handle a mouse down event\\\\\\\"\\\\n\\\\n\\\\t| aPoint index isUp soundChoices adjustment |\\\\n\\\\tupArrow ifNotNil: [((isUp _ upArrow containsPoint: (aPoint _ evt cursorPoint)) or:  [downArrow containsPoint: aPoint])\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[soundChoices _ self soundChoices.\\\\n\\\\t\\\\t\\\\tindex _ soundChoices indexOf: literal ifAbsent: [1].\\\\n\\\\t\\\\t\\\\tindex > 0 ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[adjustment _ isUp ifTrue: [1] ifFalse: [-1].\\\\n\\\\t\\\\t\\\\t\\\\tself literal: (soundChoices atWrap: (index + adjustment))].\\\\n\\\\t\\\\t\\\\tself playSoundNamed: literal.\\\\n\\\\t\\\\t\\\\t^ self]].\\\\n\\\\tself soundNameFromUser ifNotNilDo:\\\\n\\\\t\\\\t[:aSoundName |\\\\n\\\\t\\\\t\\\\tself literal: aSoundName.\\\\n\\\\t\\\\t\\\\tself playSoundNamed: literal]! !\\\\n\\\\n!SoundReadoutTile methodsFor: 'arrows' stamp: 'yo 2/11/2005 16:12'!\\\\nsetLiteral: aLiteral\\\\n\\\\n\\\\tsuper  setLiteral: aLiteral.\\\\n\\\\n\\\\t(self findA: UpdatingStringMorph) useSymbolFormat; lock! !\\\\n\\\\n!SoundReadoutTile methodsFor: 'arrows' stamp: 'yo 2/11/2005 16:08'!\\\\nsoundNameFromUser\\\\n\\\\t\\\\\\\"Obtain a sound from the user.  Exclude the items designated as being discouraged, except that if the current selection is one of those, show it anyway\\\\\\\"\\\\n\\\\n\\\\t| choices |\\\\n\\\\tchoices _ self soundChoices.\\\\n\\\\t^ (SelectionMenu labels: (choices collect: [:t | t translated]) selections: self soundChoices) startUpWithCaption: 'Sounds' translated! !\\\\n\\\\n\\\\n!SoundReadoutTile methodsFor: 'literal' stamp: 'sw 1/28/2005 00:57'!\\\\nsetLiteralTo: anObject width: w\\\\n\\\\t\\\\\\\"Set the literal and width of the tile as indicated\\\\\\\"\\\\n\\\\n\\\\t| soundChoices index |\\\\n\\\\tsoundChoices _ self soundChoices.\\\\n\\\\tindex _ soundChoices indexOf: anObject.\\\\n\\\\tself setLiteral: (soundChoices atWrap: index)! !\\\\n\\\\n\\\\n!SoundReadoutTile methodsFor: 'private' stamp: 'yo 2/11/2005 16:13'!\\\\nupdateLiteralLabel\\\\n\\\\n\\\\t\\\\\\\"Update the wording emblazoned on the tile, if needed\\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\tsuper updateLiteralLabel.\\\\n\\\\n\\\\t(self findA: UpdatingStringMorph) useSymbolFormat; lock! !\\\\nObject subclass: #SoundRecorder\\\\n\\\\tinstanceVariableNames: 'stereo samplingRate recordLevel recordedBuffers recordedSound recordProcess bufferAvailableSema paused meteringBuffer meterLevel soundPlaying currentBuffer nextIndex codec desiredSampleRate'\\\\n\\\\tclassVariableNames: 'CanRecordWhilePlaying RecorderActive'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Sound-Synthesis'!\\\\n\\\\n!SoundRecorder methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ncodec: aSoundCodec\\\\n\\\\n\\\\tcodec := aSoundCodec! !\\\\n\\\\n!SoundRecorder methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ndesiredSampleRate: newRate\\\\n\\\\n\\\\t\\\\\\\"use of this method indicates a strong desire for the specified rate, even if\\\\n\\\\tthe OS/hardware are not cooperative\\\\\\\"\\\\n\\\\n\\\\tdesiredSampleRate := samplingRate := newRate  \\\\\\\"Best are 44100 22050 11025\\\\\\\"\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'accessing' stamp: 'jj 10/20/97 15:30'!\\\\nisActive\\\\n\\\\t\\\\\\\"Return true if I have a recordProcess running.\\\\\\\"\\\\n\\\\n\\\\t^ recordProcess ~~ nil\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'accessing' stamp: 'jm 9/2/97 16:16'!\\\\nisPaused\\\\n\\\\t\\\\\\\"Return true if recording is paused.\\\\\\\"\\\\n\\\\n\\\\t^ paused\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'accessing' stamp: 'jm 9/18/97 19:19'!\\\\nmeterLevel\\\\n\\\\t\\\\\\\"Return the meter level, an integer in the range [0..100] where zero is silence and 100 represents the maximum signal level possible without clipping.\\\\\\\"\\\\n\\\\n\\\\t^ (100 * meterLevel) // 32768\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'accessing' stamp: 'jm 7/4/1998 15:03'!\\\\nrecordLevel\\\\n\\\\n\\\\t^ recordLevel\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nrecordLevel: level\\\\n\\\\t\\\\\\\"Set the desired recording level to the given value in the range 0.0 to 1.0, where 0.0 is the lowest recording level and 1.0 is the maximum. Do nothing if the sound input hardware does not support changing the recording level.\\\\\\\"\\\\n\\\\t\\\\\\\"Details: On the Macintosh, the lowest possible record level attenuates the input signal, but does not silence it entirely.\\\\\\\" \\\\n\\\\n\\\\trecordLevel := (level asFloat min: 1.0) max: 0.0.\\\\n\\\\trecordProcess ifNotNil: [\\\\n\\\\t\\\\tself primSetRecordLevel: (1000.0 * recordLevel) asInteger].\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'accessing' stamp: 'jm 12/15/97 14:28'!\\\\nsamplingRate\\\\n\\\\n\\\\t^ samplingRate\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nsamplingRate: newRate\\\\n\\\\n\\\\tsamplingRate := newRate  \\\\\\\"Best are 44100 22050 11025\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!SoundRecorder methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ninitialize\\\\n\\\\t\\\\\\\"SoundRecorder new\\\\\\\"\\\\n\\\\n\\\\tstereo := false.\\\\n\\\\tsamplingRate := 11025.\\\\n\\\\trecordLevel := 0.5.\\\\n\\\\tself initializeRecordingState.\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ninitializeRecordingState\\\\n\\\\n\\\\trecordProcess := nil.\\\\n\\\\tbufferAvailableSema := nil.\\\\n\\\\tpaused := true.\\\\n\\\\tmeteringBuffer := nil.\\\\n\\\\tmeterLevel := 0.\\\\n\\\\tsoundPlaying := nil.\\\\n\\\\tcurrentBuffer := nil.\\\\n\\\\tnextIndex := 1.\\\\n! !\\\\n\\\\n\\\\n!SoundRecorder methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimGetActualRecordingSampleRate\\\\n\\\\t\\\\\\\"Return the actual sample rate being used for recording. This primitive fails unless sound recording is currently in progress.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSoundGetRecordingSampleRate' module: 'SoundPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimRecordSamplesInto: aWordArray startingAt: index\\\\n\\\\t\\\\\\\"Record a sequence of 16-bit sound samples into the given array starting at the given sample index. Return the number of samples recorded, which may be zero if no samples are currently available.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSoundRecordSamples' module: 'SoundPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSetRecordLevel: anInteger\\\\n\\\\t\\\\\\\"Set the desired recording level to the given value in the range 0-1000, where 0 is the lowest recording level and 1000 is the maximum. Do nothing if the sound input hardware does not support changing the recording level.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSoundSetRecordLevel' module: 'SoundPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimStartRecordingDesiredSampleRate: samplesPerSec stereo: stereoFlag semaIndex: anInteger\\\\n\\\\t\\\\\\\"Start sound recording with the given stereo setting. Use a sampling rate as close to the desired rate as the underlying platform will support. If the given semaphore index is > 0, it is taken to be the index of a Semaphore in the external objects array to be signalled every time a recording buffer is filled.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSoundStartRecording' module: 'SoundPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'primitives' stamp: 'tpr 2/15/2001 17:13'!\\\\nprimStopRecording\\\\n\\\\t\\\\\\\"Stop sound recording. Does nothing if recording is not currently in progress. Do not fail if plugin is not available\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSoundStopRecording' module: 'SoundPlugin'>! !\\\\n\\\\n\\\\n!SoundRecorder methodsFor: 'recording controls' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nclearRecordedSound\\\\n\\\\t\\\\\\\"Clear the sound recorded thus far. Go into pause mode if currently recording.\\\\\\\"\\\\n\\\\n\\\\tpaused := true.\\\\n\\\\trecordedSound := SequentialSound new.\\\\n\\\\tself allocateBuffer.\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'recording controls' stamp: 'sw 6/10/2003 12:34'!\\\\nhasRecordedSound\\\\n\\\\n\\\\t\\\\\\\"Answer whether the receiver currently has any recorded sound\\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\t^ self recordedSound notNil! !\\\\n\\\\n!SoundRecorder methodsFor: 'recording controls' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\npause\\\\n\\\\t\\\\\\\"Go into pause mode. The record level continues to be updated, but no sound is recorded.\\\\\\\"\\\\n\\\\n\\\\tpaused := true.\\\\n\\\\t((currentBuffer ~~ nil) and: [nextIndex > 1])\\\\n\\\\t\\\\tifTrue: [self emitPartialBuffer.\\\\n\\\\t\\\\t\\\\t\\\\tself allocateBuffer].\\\\n\\\\n\\\\tsoundPlaying ifNotNil: [\\\\n\\\\t\\\\tsoundPlaying pause.\\\\n\\\\t\\\\tsoundPlaying := nil].\\\\n\\\\t\\\\\\\"Note: there can be problems if canRecordWhilePlaying is true. Recorders which only pause will inhibit other recorders from recording. I chose to make #stopPlaying unconditional in a subclass. The same might be appropriate here at the expense of making recorders resumable\\\\\\\"\\\\n\\\\n\\\\tPreferences canRecordWhilePlaying ifFalse: [self stopRecording].\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'recording controls' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nplayback\\\\n\\\\t\\\\\\\"Playback the sound that has been recorded.\\\\\\\"\\\\n\\\\n\\\\tself pause.\\\\n\\\\tsoundPlaying := self recordedSound.\\\\n\\\\tsoundPlaying play.\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'recording controls' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nresumeRecording\\\\n\\\\t\\\\\\\"Continue recording from the point at which it was last paused.\\\\\\\"\\\\n\\\\n\\\\tself flag: #bob.\\\\n\\\\t\\\\\\\"Note: If canRecordWhilePlaying is true, then recordings may never get started (at least by this method). One possibility, used in a subclass, is to make the #startPlaying unconditional. Another would be to use #startPlaying instead of #resumePlaying in appropriate cases\\\\\\\"\\\\n\\\\n\\\\tPreferences canRecordWhilePlaying ifFalse: [self startRecording].\\\\n\\\\tpaused := false.\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'recording controls' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nstartRecording\\\\n\\\\t\\\\\\\"Turn of the sound input driver and start the recording process. Initially, recording is paused.\\\\\\\"\\\\n\\\\n\\\\t| semaIndex |\\\\n\\\\trecordLevel ifNil: [recordLevel := 0.5].  \\\\\\\"lazy initialization\\\\\\\"\\\\n\\\\tPreferences canRecordWhilePlaying ifFalse: [SoundPlayer shutDown].\\\\n\\\\trecordProcess ifNotNil: [self stopRecording].\\\\n\\\\tpaused := true.\\\\n\\\\tmeteringBuffer := SoundBuffer newMonoSampleCount: 1024.\\\\n\\\\tmeterLevel := 0.\\\\n\\\\tself allocateBuffer.\\\\n\\\\tbufferAvailableSema := Semaphore new.\\\\n\\\\tsemaIndex := Smalltalk registerExternalObject: bufferAvailableSema.\\\\n\\\\tself primStartRecordingDesiredSampleRate: samplingRate asInteger\\\\n\\\\t\\\\tstereo: stereo\\\\n\\\\t\\\\tsemaIndex: semaIndex.\\\\n\\\\tRecorderActive := true.\\\\n\\\\tsamplingRate := self primGetActualRecordingSampleRate.\\\\n\\\\tself primSetRecordLevel: (1000.0 * recordLevel) asInteger.\\\\n\\\\trecordProcess := [self recordLoop] newProcess.\\\\n\\\\trecordProcess priority: Processor userInterruptPriority.\\\\n\\\\trecordProcess resume.\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'recording controls' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nstopRecording\\\\n\\\\t\\\\\\\"Stop the recording process and turn of the sound input driver.\\\\\\\"\\\\n\\\\n\\\\trecordProcess ifNotNil: [recordProcess terminate].\\\\n\\\\trecordProcess := nil.\\\\n\\\\tself primStopRecording.\\\\n\\\\tRecorderActive := false.\\\\n\\\\tSmalltalk unregisterExternalObject: bufferAvailableSema.\\\\n\\\\t((currentBuffer ~~ nil) and: [nextIndex > 1])\\\\n\\\\t\\\\tifTrue: [self emitPartialBuffer].\\\\n\\\\tself initializeRecordingState.\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'recording controls' stamp: 'sw 3/3/2004 19:49'!\\\\nverifyExistenceOfRecordedSound\\\\n\\\\n\\\\t\\\\\\\"If the receiver has a recorded sound, answer true; if not, put up an informer and answer false\\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\t^ self recordedSound\\\\n\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\n\\\\t\\\\t\\\\t[true]\\\\n\\\\n\\\\t\\\\tifNil:\\\\n\\\\n\\\\t\\\\t\\\\t[self inform: 'please record a sound first' translated.\\\\n\\\\n\\\\t\\\\t\\\\tfalse]! !\\\\n\\\\n\\\\n!SoundRecorder methodsFor: 'results' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ncondensedSamples\\\\n\\\\t\\\\\\\"Return a single SoundBuffer that is the contatenation of all my recorded buffers.\\\\\\\"\\\\n\\\\n\\\\t| sz newBuf i |\\\\n\\\\trecordedBuffers := recordedSound sounds collect: [:snd | snd samples].\\\\n\\\\trecordedBuffers isEmpty ifTrue: [^ SoundBuffer new: 0].\\\\n\\\\trecordedBuffers size = 1 ifTrue: [^ recordedBuffers first copy].\\\\n\\\\tsz := recordedBuffers inject: 0 into: [:tot :buff | tot + buff size].\\\\n\\\\tnewBuf := SoundBuffer newMonoSampleCount: sz.\\\\n\\\\ti := 1.\\\\n\\\\trecordedBuffers do: [:b |\\\\n\\\\t\\\\t1 to: b size do: [:j |\\\\n\\\\t\\\\t\\\\tnewBuf at: i put: (b at: j).\\\\n\\\\t\\\\t\\\\ti := i + 1]].\\\\n\\\\trecordedBuffers := nil.\\\\n\\\\t^ newBuf\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'results' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ncondensedStereoSound\\\\n\\\\t\\\\\\\"Decompose my buffers into left and right channels and return a mixed sound consisting of the those two channels. This may be take a while, since the data must be copied into new buffers.\\\\\\\"\\\\n\\\\n\\\\t| sz leftBuf rightBuf leftI rightI left |\\\\n\\\\tsz := recordedBuffers inject: 0 into: [:tot :buff | tot + buff size].\\\\n\\\\tleftBuf := SoundBuffer newMonoSampleCount: (sz + 1) // 2.\\\\n\\\\trightBuf := SoundBuffer newMonoSampleCount: (sz + 1) // 2.\\\\n\\\\tleftI := rightI := 1.\\\\n\\\\tleft := true.\\\\n\\\\trecordedBuffers do: [:b |\\\\n\\\\t\\\\t1 to: b size do: [:j |\\\\n\\\\t\\\\t\\\\tleft\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [leftBuf at: leftI put: (b at: j). leftI := leftI + 1. left := false]\\\\n\\\\f\\\\t\\\\t\\\\t\\\\tifFalse: [rightBuf at: rightI put: (b at: j). rightI := rightI + 1. left := true]]].\\\\n\\\\t^ MixedSound new\\\\n\\\\t\\\\tadd: (SampledSound new setSamples: leftBuf samplingRate: samplingRate) pan: 0.0;\\\\n\\\\t\\\\tadd: (SampledSound new setSamples: rightBuf samplingRate: samplingRate) pan: 1.0\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'results' stamp: 'di 2/17/1999 11:07'!\\\\nrecordedSound\\\\n\\\\t\\\\\\\"Return the sound that was recorded.\\\\\\\"\\\\n\\\\n\\\\t^ recordedSound\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'results' stamp: 'di 2/17/1999 21:24'!\\\\nsoundSegments\\\\n\\\\n\\\\t^ self segmentsAbove: 1000 normalizedVolume: 80.0\\\\n! !\\\\n\\\\n\\\\n!SoundRecorder methodsFor: 'trimming' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ncopyFrom: startPlace to: endPlace normalize: nFactor dcOffset: dcOffset\\\\n\\\\t\\\\\\\"Return a new SoundBuffer containing the samples in the given range.\\\\\\\"\\\\n\\\\n\\\\t| startBufIndex startSampleIndex endBufIndex endSampleIndex\\\\n\\\\t count resultBuf j buf firstInBuf n |\\\\n\\\\tstartBufIndex := startPlace at: 1.\\\\n\\\\tstartSampleIndex := startPlace at: 2.\\\\n\\\\tendBufIndex := endPlace at: 1.\\\\n\\\\tendSampleIndex := endPlace at: 2.\\\\n\\\\n\\\\tstartBufIndex = endBufIndex\\\\n\\\\t\\\\tifTrue: [count := endSampleIndex + 1 - startSampleIndex]\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\tcount := ((recordedBuffers at: startBufIndex) size + 1 - startSampleIndex).  \\\\\\\"first buffer\\\\\\\"\\\\n\\\\t\\\\t\\\\tcount := count + endSampleIndex.  \\\\\\\"last buffer\\\\\\\"\\\\n\\\\t\\\\t\\\\tstartBufIndex + 1 to: endBufIndex - 1 do:\\\\n\\\\t\\\\t\\\\t\\\\t[:i | count := count + (recordedBuffers at: i) size]].  \\\\\\\"middle buffers\\\\\\\"\\\\n\\\\tresultBuf := SoundBuffer newMonoSampleCount: count.\\\\n\\\\n\\\\tj := 1.  \\\\\\\"next destination index in resultBuf\\\\\\\"\\\\n\\\\tstartBufIndex to: endBufIndex do: [:i |\\\\n\\\\t\\\\tbuf := recordedBuffers at: i.\\\\n\\\\t\\\\tfirstInBuf := 1.\\\\n\\\\t \\\\tn := buf size.\\\\n\\\\t\\\\ti = startBufIndex ifTrue: [\\\\n\\\\t\\\\t\\\\tn := (recordedBuffers at: startBufIndex) size + 1 - startSampleIndex.\\\\n\\\\t\\\\t\\\\tfirstInBuf := startSampleIndex].\\\\n\\\\t\\\\ti = endBufIndex ifTrue: [\\\\n\\\\t\\\\t\\\\ti = startBufIndex\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [n := endSampleIndex + 1 - startSampleIndex]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [n := endSampleIndex]].\\\\n\\\\t\\\\tself copyTo: resultBuf from: j to: (j + n - 1)\\\\n\\\\t\\\\t\\\\tfrom: buf startingAt: firstInBuf\\\\n\\\\t\\\\t\\\\tnormalize: nFactor dcOffset: dcOffset.\\\\n\\\\t\\\\tj := j + n].\\\\n\\\\t^ resultBuf\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'trimming' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ncopyTo: resultBuf from: startIndex to: endIndex from: buf startingAt: firstInBuf normalize: nFactor dcOffset: dcOffset\\\\n\\\\t\\\\\\\"Copy samples from buf to resultBuf removing the DC offset and normalizing their volume in the process.\\\\\\\"\\\\n\\\\n\\\\t| indexOffset |\\\\n\\\\tindexOffset := firstInBuf - startIndex.\\\\n\\\\tstartIndex to: endIndex do: [:i |\\\\n\\\\t\\\\tresultBuf at: i put: (((buf at: (i + indexOffset)) - dcOffset) * nFactor) // 1000].\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'trimming' stamp: 'di 2/16/1999 22:11'!\\\\nendPlace\\\\n\\\\n\\\\t^ Array with: recordedBuffers size with: recordedBuffers last size! !\\\\n\\\\n!SoundRecorder methodsFor: 'trimming' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nfirstSampleOverThreshold: threshold dcOffset: dcOffset startingAt: startPlace\\\\n\\\\t\\\\\\\"Beginning at startPlace, this routine will return the first place at which a sample exceeds the given threshold.\\\\\\\"\\\\n\\\\n\\\\t| buf s iStart jStart nThreshold |\\\\n\\\\tnThreshold := threshold negated.\\\\n\\\\tiStart := startPlace first.\\\\n\\\\tjStart := startPlace second.\\\\n\\\\tiStart to: recordedBuffers size do:\\\\n\\\\t\\\\t[:i | buf := recordedBuffers at: i.\\\\n\\\\t\\\\tjStart to: buf size do:\\\\n\\\\t\\\\t\\\\t[:j | s := (buf at: j) - dcOffset.\\\\n\\\\t\\\\t\\\\t(s < nThreshold or: [s > threshold]) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[\\\\\\\"found a sample over threshold\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t^ Array with: i with: j]].\\\\n\\\\t\\\\tjStart := 1].\\\\n\\\\t^ self endPlace! !\\\\n\\\\n!SoundRecorder methodsFor: 'trimming' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nnormalizeFactorFor: percentOfMaxVolume min: min max: max dcOffset: dcOffset\\\\n\\\\t\\\\\\\"Return a normalization factor for the range of sample values and DC offset. A normalization factor is a fixed-point number that will be divided by 1000 after multiplication with each sample value.\\\\\\\"\\\\n\\\\n\\\\t| peak factor |\\\\n\\\\tpeak := (max - dcOffset) max: (min - dcOffset) negated.\\\\n\\\\tpeak = 0 ifTrue: [^ 1000].\\\\n\\\\tfactor := (32767.0 * percentOfMaxVolume) / (100.0 * peak).\\\\n\\\\t^ (factor * 1000.0) asInteger\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'trimming' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nplace: startPlace plus: nSamples\\\\n\\\\t\\\\\\\"Return the place that is nSamples (may be negative) beyond thisPlace.\\\\\\\"\\\\n\\\\n\\\\t| i j remaining buf |\\\\n\\\\ti := startPlace first.\\\\n\\\\tj := startPlace second.\\\\n\\\\tnSamples >= 0\\\\n\\\\tifTrue: [remaining := nSamples.\\\\n\\\\t\\\\t\\\\t[buf := recordedBuffers at: i.\\\\n\\\\t\\\\t\\\\t(j + remaining) <= buf size ifTrue: [^ Array with: i with: j + remaining].\\\\n\\\\t\\\\t\\\\ti < recordedBuffers size]\\\\n\\\\t\\\\t\\\\t\\\\twhileTrue: [remaining := remaining - (buf size - j + 1).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ti := i+1.  j := 1].\\\\n\\\\t\\\\t\\\\t^ self endPlace]\\\\n\\\\tifFalse: [remaining := nSamples negated.\\\\n\\\\t\\\\t\\\\t[buf := recordedBuffers at: i.\\\\n\\\\t\\\\t\\\\t(j - remaining) >= 1 ifTrue: [^ Array with: i with: j - remaining].\\\\n\\\\t\\\\t\\\\ti > 1]\\\\n\\\\t\\\\t\\\\t\\\\twhileTrue: [remaining := remaining - j.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ti := i-1.  j := (recordedBuffers at: i) size].\\\\n\\\\t\\\\t\\\\t^ #(1 1)]! !\\\\n\\\\n!SoundRecorder methodsFor: 'trimming' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nscanForEndThreshold: threshold dcOffset: dcOffset minLull: lull startingAt: startPlace\\\\n\\\\t\\\\\\\"Beginning at startPlace, this routine will find the last sound that exceeds threshold, such that if you look lull samples later you will not find another sound over threshold within the following block of lull samples.\\\\n\\\\tReturn the place that is lull samples beyond to that last sound.\\\\n\\\\tIf no end of sound is found, return endPlace.\\\\\\\"\\\\n\\\\n\\\\t| buf s iStart jStart nThreshold n |\\\\n\\\\tnThreshold := threshold negated.\\\\n\\\\tiStart := startPlace first.\\\\n\\\\tjStart := startPlace second.\\\\n\\\\tn := 0.\\\\n\\\\tiStart to: recordedBuffers size do:\\\\n\\\\t\\\\t[:i | buf := recordedBuffers at: i.\\\\n\\\\t\\\\tjStart to: buf size do:\\\\n\\\\t\\\\t\\\\t[:j | s := (buf at: j) - dcOffset.\\\\n\\\\t\\\\t\\\\t(s < nThreshold or: [s > threshold])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"found a sample over threshold\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tn := 0]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\\\\"still not over threshold\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tn := n + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tn >= lull ifTrue: [^ Array with: i with: j]]].\\\\n\\\\t\\\\tjStart := 1].\\\\n\\\\t^ self endPlace! !\\\\n\\\\n!SoundRecorder methodsFor: 'trimming' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nscanForStartThreshold: threshold dcOffset: dcOffset minDur: duration startingAt: startPlace\\\\n\\\\t\\\\\\\"Beginning at startPlace, this routine will find the first sound that exceeds threshold, such that if you look duration samples later you will find another sound over threshold within the following block of duration samples.\\\\n\\\\tReturn the place that is duration samples prior to that first sound.\\\\n\\\\tIf no sound is found, return endPlace.\\\\\\\"\\\\n\\\\n\\\\t| soundPlace lookPlace nextSoundPlace thirdPlace |\\\\n\\\\tsoundPlace := self firstSampleOverThreshold: threshold dcOffset: dcOffset\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: startPlace.\\\\n\\\\t[soundPlace = self endPlace ifTrue: [^ soundPlace].\\\\n\\\\t\\\\\\\"Found a sound -- look duration later\\\\\\\"\\\\n\\\\tlookPlace := self place: soundPlace plus: duration.\\\\n\\\\tnextSoundPlace := self firstSampleOverThreshold: threshold dcOffset: dcOffset\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: lookPlace.\\\\n\\\\tthirdPlace := self place: lookPlace plus: duration.\\\\n\\\\tnextSoundPlace first < thirdPlace first\\\\n\\\\t\\\\tor: [nextSoundPlace first = thirdPlace first\\\\n\\\\t\\\\t\\\\tand: [nextSoundPlace second < thirdPlace second]]]\\\\n\\\\t\\\\twhileFalse: [soundPlace := nextSoundPlace].\\\\n\\\\n\\\\t\\\\\\\"Yes, there is sound in the next interval as well\\\\\\\"\\\\n\\\\t^ self place: soundPlace plus: 0-duration\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'trimming' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nsegmentsAbove: threshold normalizedVolume: percentOfMaxVolume\\\\n\\\\t\\\\\\\"Break the current recording up into a sequence of sound segments separated by silences.\\\\\\\"\\\\n\\\\n\\\\t| max min sum totalSamples bufSize s dcOffset firstPlace endPlace resultBuf nFactor lastPlace segments gapSize minDur minLull soundSize restSize |\\\\n\\\\tstereo ifTrue: [self error: 'stereo trimming is not yet supported'].\\\\n\\\\tpaused ifFalse: [self error: 'must stop recording before trimming'].\\\\n\\\\t(recordedSound == nil or: [recordedSound sounds isEmpty]) ifTrue:[^ self].\\\\n\\\\t\\\\\\\"Reconstruct buffers so old trimming code will work\\\\\\\"\\\\n\\\\trecordedBuffers := recordedSound sounds collect: [:snd | snd samples].\\\\n\\\\tsoundSize := restSize := 0.\\\\n\\\\n\\\\tmax := min := sum := totalSamples := 0.\\\\n\\\\trecordedBuffers do: [:buf |\\\\n\\\\t\\\\tbufSize := buf size.\\\\n\\\\t\\\\ttotalSamples := totalSamples + buf size.\\\\n\\\\t\\\\t1 to: bufSize do: [:i |\\\\n\\\\t\\\\t\\\\ts := buf at: i.\\\\n\\\\t\\\\t\\\\ts > max ifTrue: [max := s].\\\\n\\\\t\\\\t\\\\ts < min ifTrue: [min := s].\\\\n\\\\t\\\\t\\\\tsum := sum + s]].\\\\n\\\\tdcOffset := sum // totalSamples.\\\\n\\\\n\\\\tminDur := (samplingRate/20.0) asInteger.  \\\\\\\" 1/20 second \\\\\\\"\\\\n\\\\tminLull := (samplingRate/4.0) asInteger.  \\\\\\\" 1/2 second \\\\\\\"\\\\n\\\\tsegments := SequentialSound new.\\\\n\\\\tendPlace := self endPlace.\\\\n\\\\tlastPlace := #(1 1).\\\\n\\\\t[firstPlace := self scanForStartThreshold: threshold\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdcOffset: dcOffset\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tminDur: minDur\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: lastPlace.\\\\n\\\\tfirstPlace = endPlace]\\\\n\\\\t\\\\twhileFalse:\\\\n\\\\t\\\\t[firstPlace = lastPlace ifFalse:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"Add a silence equal to the gap size\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\\\\"Wasteful but simple way to get gap size...\\\\\\\"\\\\n\\\\t\\\\t\\\\tgapSize := (self copyFrom: lastPlace to: firstPlace\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnormalize: 1000 dcOffset: dcOffset) size - 2.\\\\n\\\\t\\\\t\\\\t\\\\\\\"... -2 makes up for overlap of one sample on either end\\\\\\\"\\\\n\\\\t\\\\t\\\\tsegments add: (RestSound dur: gapSize asFloat / samplingRate).\\\\n\\\\t\\\\t\\\\trestSize := restSize + gapSize.\\\\n\\\\\\\"Transcript cr; print: firstPlace; space; print: lastPlace; space; print: gapSize; space; show: 'gap'.\\\\\\\"\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\tlastPlace := self scanForEndThreshold: threshold\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdcOffset: dcOffset\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tminLull: minLull + minDur\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: firstPlace.\\\\n\\\\t\\\\t\\\\\\\"Allow room for lead time of next sound\\\\\\\"\\\\n\\\\t\\\\tlastPlace := self place: lastPlace plus: minDur negated.\\\\n\\\\t\\\\tnFactor := self normalizeFactorFor: percentOfMaxVolume\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmin: min max: max dcOffset: dcOffset.\\\\n\\\\t\\\\tresultBuf := self copyFrom: firstPlace to: lastPlace\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnormalize: nFactor dcOffset: dcOffset.\\\\n\\\\t\\\\tsoundSize := soundSize + resultBuf size.\\\\n\\\\\\\"Transcript cr; print: firstPlace; space; print: lastPlace; space; print: resultBuf size; space; show: 'sound'.\\\\\\\"\\\\n\\\\t\\\\tsegments add: (codec == nil\\\\n\\\\t\\\\t\\\\tifTrue: [SampledSound new setSamples: resultBuf samplingRate: samplingRate]\\\\n\\\\t\\\\t\\\\tifFalse: [codec compressSound: (SampledSound new setSamples: resultBuf samplingRate: samplingRate)])].\\\\n\\\\n\\\\t\\\\\\\"Final gap for consistency\\\\\\\"\\\\n\\\\tgapSize := (self copyFrom: lastPlace to: self endPlace\\\\n\\\\t\\\\t\\\\t\\\\tnormalize: 1000 dcOffset: dcOffset) size - 1.\\\\n\\\\tsegments add: (RestSound dur: gapSize asFloat / samplingRate).\\\\n\\\\trestSize := restSize + gapSize.\\\\n\\\\tself inform: ((soundSize+restSize/samplingRate) roundTo: 0.1) printString , ' secs reduced to ' , ((soundSize/samplingRate) roundTo: 0.1) printString.\\\\n\\\\trecordedBuffers := nil.\\\\n\\\\t^ segments! !\\\\n\\\\n!SoundRecorder methodsFor: 'trimming' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nsuppressSilence\\\\n\\\\n\\\\trecordedSound := self soundSegments! !\\\\n\\\\n!SoundRecorder methodsFor: 'trimming' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ntrim: threshold normalizedVolume: percentOfMaxVolume\\\\n\\\\t\\\\\\\"Remove the leading and trailing parts of this recording that are below the given threshold. Remove any DC offset and scale the recording so that its peaks are the given percent of the maximum volume.\\\\\\\"\\\\n\\\\n\\\\t| max min sum totalSamples bufSize s dcOffset startPlace endPlace resultBuf nFactor |\\\\n\\\\tstereo ifTrue: [self error: 'stereo trimming is not yet supported'].\\\\n\\\\tpaused ifFalse: [self error: 'must stop recording before trimming'].\\\\n\\\\trecordedBuffers := recordedSound sounds collect: [:snd | snd samples].\\\\n\\\\trecordedBuffers isEmpty ifTrue: [^ self].\\\\n\\\\n\\\\tmax := min := sum := totalSamples := 0.\\\\n\\\\trecordedBuffers do: [:buf |\\\\n\\\\t\\\\tbufSize := buf size.\\\\n\\\\t\\\\ttotalSamples := totalSamples + buf size.\\\\n\\\\t\\\\t1 to: bufSize do: [:i |\\\\n\\\\t\\\\t\\\\ts := buf at: i.\\\\n\\\\t\\\\t\\\\ts > max ifTrue: [max := s].\\\\n\\\\t\\\\t\\\\ts < min ifTrue: [min := s].\\\\n\\\\t\\\\t\\\\tsum := sum + s]].\\\\n\\\\tdcOffset := sum // totalSamples.\\\\n\\\\n\\\\t\\\\\\\"a place is an array of <buffer index><index of sample in buffer>\\\\\\\"\\\\n\\\\tstartPlace := self scanForStartThreshold: threshold\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdcOffset: dcOffset\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tminDur: (samplingRate/60.0) asInteger \\\\\\\"at least 1/60th of a second\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: #(1 1).\\\\n\\\\tstartPlace = self endPlace ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"no samples above threshold\\\\\\\"\\\\n\\\\t\\\\trecordedBuffers := nil.  ^ self].\\\\n\\\\n\\\\tendPlace := self scanForEndThreshold: threshold\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdcOffset: dcOffset\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tminLull: (samplingRate/5) asInteger\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: startPlace.\\\\n\\\\tnFactor := self normalizeFactorFor: percentOfMaxVolume min: min max: max dcOffset: dcOffset.\\\\n\\\\tresultBuf := self copyFrom: startPlace to: endPlace normalize: nFactor dcOffset: dcOffset.\\\\n\\\\trecordedSound := SampledSound new setSamples: resultBuf samplingRate: samplingRate.\\\\n\\\\trecordedBuffers := nil\\\\n! !\\\\n\\\\n\\\\n!SoundRecorder methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nallocateBuffer\\\\n\\\\t\\\\\\\"Allocate a new buffer and reset nextIndex.\\\\\\\"\\\\n\\\\n\\\\t| bufferTime |\\\\n\\\\tbufferTime := stereo  \\\\\\\"Buffer time = 1/2 second\\\\\\\"\\\\n\\\\t\\\\tifTrue: [self samplingRate asInteger]\\\\n\\\\t\\\\tifFalse: [self samplingRate asInteger // 2].\\\\n\\\\tcurrentBuffer := SoundBuffer newMonoSampleCount:\\\\n\\\\t\\\\t\\\\\\\"Multiple of samplesPerFrame that is approx. bufferTime long\\\\\\\"\\\\n\\\\t\\\\t(bufferTime truncateTo: self samplesPerFrame).\\\\n\\\\tnextIndex := 1.\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nemitBuffer: buffer\\\\n\\\\n\\\\t| sound ratio resultBuf |\\\\n\\\\n\\\\t\\\\\\\"since some sound recording devices cannot (or will not) record below a certain sample rate,\\\\n\\\\ttrim the samples down if the user really wanted fewer samples\\\\\\\"\\\\n\\\\n\\\\t(desiredSampleRate isNil or: [(ratio := samplingRate // desiredSampleRate) <= 1]) ifTrue: [\\\\n\\\\t\\\\tsound := SampledSound new setSamples: buffer samplingRate: samplingRate.\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tresultBuf := SoundBuffer \\\\n\\\\t\\\\t\\\\taverageEvery: ratio \\\\n\\\\t\\\\t\\\\tfrom: buffer \\\\n\\\\t\\\\t\\\\tupTo: buffer monoSampleCount.\\\\n\\\\t\\\\tsound := SampledSound new setSamples: resultBuf samplingRate: samplingRate / ratio.\\\\n\\\\t].\\\\n\\\\n\\\\trecordedSound add: (codec ifNil: [sound] ifNotNil: [codec compressSound: sound])! !\\\\n\\\\n!SoundRecorder methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nemitPartialBuffer\\\\n\\\\t| s |\\\\n\\\\ts := self samplesPerFrame.\\\\n\\\\tself emitBuffer: (currentBuffer copyFrom: 1 to: ((nextIndex-1) +( s-1) truncateTo: s))! !\\\\n\\\\n!SoundRecorder methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nmeterFrom: start count: count in: buffer\\\\n\\\\t\\\\\\\"Update the meter level with the maximum signal level in the given range of the given buffer.\\\\\\\"\\\\n\\\\n\\\\t| last max sample |\\\\n\\\\tcount = 0 ifTrue: [^ self].  \\\\\\\"no new samples\\\\\\\"\\\\n\\\\tlast := start + count - 1.\\\\n\\\\tmax := 0.\\\\n\\\\tstart to: last do: [:i |\\\\n\\\\t\\\\tsample := buffer at: i.\\\\n\\\\t\\\\tsample < 0 ifTrue: [sample := sample negated].\\\\n\\\\t\\\\tsample > max ifTrue: [max := sample]].\\\\n\\\\tmeterLevel := max.\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'private' stamp: 'dgd 4/4/2006 16:15'!\\\\nrecordLoop\\\\n\\\\t\\\\\\\"Record process loop that records samples.\\\\\\\"\\\\n\\\\n\\\\t| n sampleCount |\\\\n\\\\n\\\\tn := 0.\\\\n\\\\t[true] whileTrue: [\\\\n\\\\t\\\\tn = 0 ifTrue: [bufferAvailableSema wait].\\\\n\\\\t\\\\tpaused\\\\n\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tn := self primRecordSamplesInto: meteringBuffer startingAt: 1.\\\\n\\\\t\\\\t\\\\t\\\\tself meterFrom: 1 count: n in: meteringBuffer]\\\\n\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tn := self primRecordSamplesInto: currentBuffer startingAt: nextIndex.\\\\n\\\\t\\\\t\\\\t\\\\tself meterFrom: nextIndex count: n in: currentBuffer.\\\\n\\\\t\\\\t\\\\t\\\\tnextIndex := nextIndex + n.\\\\n\\\\t\\\\t\\\\t\\\\tstereo\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [sampleCount := currentBuffer stereoSampleCount]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [sampleCount := currentBuffer monoSampleCount].\\\\n\\\\t\\\\t\\\\t\\\\tnextIndex > sampleCount\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself emitBuffer: currentBuffer.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself allocateBuffer]].\\\\n\\\\n\\\\t\\\\t\\\\\\\"workaround for OSS emulation on top on ALSA (on Linux environments)\\\\\\\"\\\\n\\\\t\\\\t(Delay forMilliseconds: 20) wait.\\\\n\\\\t].\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'private' stamp: 'di 2/17/1999 10:39'!\\\\nsamplesPerFrame\\\\n\\\\t\\\\\\\"Can be overridden to quantize buffer size for, eg, fixed-frame codecs\\\\\\\"\\\\n\\\\n\\\\tcodec == nil\\\\n\\\\t\\\\tifTrue: [^ 1]\\\\n\\\\t\\\\tifFalse: [^ codec samplesPerFrame]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSoundRecorder class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SoundRecorder class methodsFor: 'accessing' stamp: 'ar 2/1/2001 15:20'!\\\\nanyActive\\\\n\\\\t\\\\\\\"Return true if any sound recorder is actively recording\\\\\\\"\\\\n\\\\t^RecorderActive == true! !\\\\n\\\\n!SoundRecorder class methodsFor: 'accessing' stamp: 'RAA 8/7/2000 19:23'!\\\\ncanRecordWhilePlaying\\\\n\\\\t\\\\\\\"Return true if this platform supports simultaneous sound recording and playback.\\\\\\\"\\\\n\\\\n\\\\t^Preferences canRecordWhilePlaying.\\\\t\\\\t\\\\\\\"now in preferences\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!SoundRecorder class methodsFor: 'class initialization' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ninitialize\\\\n\\\\t\\\\\\\"SoundRecorder initialize\\\\\\\"\\\\n\\\\t\\\\\\\"Details: Some computers cannot record and playback sound at the same time. If CanRecordWhilePlaying is false, then the SoundRecorder alternates between recording and playing. If it is true, sounds can be playing during recording.\\\\\\\"\\\\n\\\\n\\\\tCanRecordWhilePlaying := #ignoredNowInPreferences.\\\\n! !\\\\nRectangleMorph subclass: #SoundSequencerMorph\\\\n\\\\tinstanceVariableNames: 'controlPanel'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-SoundInterface'!\\\\n\\\\n!SoundSequencerMorph methodsFor: 'as yet unclassified' stamp: 'tk 2/19/2001 18:14'!\\\\nmakeControlPanel\\\\n\\\\t| bb cc |\\\\n\\\\tcc _ Color black.\\\\n\\\\tbb _ SimpleButtonMorph new target: self; borderColor: cc.\\\\n\\\\tcontrolPanel _ AlignmentMorph newRow.\\\\n\\\\tbb _ SimpleButtonMorph new target: self; borderColor: cc.\\\\n\\\\tcontrolPanel color: bb color; borderWidth: 0; layoutInset: 0.\\\\n\\\\tcontrolPanel hResizing: #shrinkWrap; vResizing: #shrinkWrap; extent: 5@5.\\\\n\\\\tbb _ SimpleButtonMorph new target: self; borderColor: cc.\\\\n\\\\tcontrolPanel addMorphBack: (bb label: 'reset';\\\\tactionSelector: #reset).\\\\n\\\\tbb _ SimpleButtonMorph new target: self; borderColor: cc.\\\\n\\\\tcontrolPanel addMorphBack: (bb label: 'stop';\\\\t\\\\tactionSelector: #stop).\\\\n\\\\tbb _ SimpleButtonMorph new target: self; borderColor: cc.\\\\n\\\\tcontrolPanel addMorphBack: (bb label: 'play';\\\\tactionSelector: #play).\\\\n! !\\\\n\\\\n!SoundSequencerMorph methodsFor: 'as yet unclassified' stamp: 'jm 11/14/97 11:08'!\\\\nplay\\\\n\\\\tself submorphsDo: [:m | m == controlPanel ifFalse: [m play]]! !\\\\n\\\\n!SoundSequencerMorph methodsFor: 'as yet unclassified' stamp: 'jm 11/14/97 11:08'!\\\\nreset\\\\n\\\\tself submorphsDo: [:m | m == controlPanel ifFalse: [m reset]]! !\\\\n\\\\n\\\\n!SoundSequencerMorph methodsFor: 'initialization' stamp: 'jm 11/14/97 11:21'!\\\\ninitialize\\\\n\\\\tsuper initialize.\\\\n\\\\tself extent: 550@350.\\\\n\\\\tself makeControlPanel.\\\\n\\\\tself addMorph: controlPanel.\\\\n\\\\tself addMorph: ((SoundLoopMorph newBounds: (10@40 extent: 128@128)) extent: 128@128).\\\\n\\\\tself addMorph: ((SoundLoopMorph newBounds: (10@200 extent: 512@128)) extent: 512@128).! !\\\\n\\\\n\\\\n!SoundSequencerMorph methodsFor: 'stepping and presenter' stamp: 'jm 11/14/97 11:21'!\\\\nstop\\\\n\\\\tself submorphsDo: [:m | m == controlPanel ifFalse: [m stop]].\\\\n\\\\tSoundPlayer shutDown! !\\\\nAppRegistry subclass: #SoundService\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Applications'!\\\\n!SoundService commentStamp: 'gk 2/24/2004 23:14' prior: 0!\\\\nThis is the AppRegistry class for the sound system.\\\\n\\\\nA sound system offers a small protocol for playing sounds and making beeps and works like a facade towards the rest of Squeak. A sound system is registered in this registry and can be accessed by \\\\\\\"SoundService default\\\\\\\". This way we decouple the sound system from the rest of Squeak and make it pluggable. It also is a perfect spot to check for the Preference class>>soundsEnabled.!\\\\n\\\\nTileMorph subclass: #SoundTile\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'EToys-Scripting Tiles'!\\\\n!SoundTile commentStamp: 'sw 1/28/2005 01:42' prior: 0!\\\\nA scripting tile representing a 'sound' constant.  Sounds are represented by their names, which are strings; the actual sounds live in SampleSound's SoundLibrary.!\\\\n\\\\n\\\\n!SoundTile methodsFor: 'access' stamp: 'gk 2/23/2004 21:08'!\\\\nsound\\\\n\\\\n\\\\t^ SoundService default soundNamed: literal\\\\n! !\\\\n\\\\n\\\\n!SoundTile methodsFor: 'accessing' stamp: 'sw 9/27/2001 17:28'!\\\\nresultType\\\\n\\\\t\\\\\\\"Answer the result type of the receiver\\\\\\\"\\\\n\\\\n\\\\t^ #Sound! !\\\\n\\\\n\\\\n!SoundTile methodsFor: 'event handling' stamp: 'sw 1/28/2005 01:49'!\\\\noptions\\\\n\\\\t\\\\\\\"Answer the options of the tile for an arrow\\\\\\\"\\\\n\\\\n\\\\t| soundChoices |\\\\n\\\\tsoundChoices _ self soundChoices.\\\\n\\\\t^ {soundChoices. soundChoices}! !\\\\n\\\\n!SoundTile methodsFor: 'event handling' stamp: 'tak 12/5/2004 02:09'!\\\\nvalue: anObject \\\\n\\\\tsuper value: anObject.\\\\n\\\\tself playSoundNamed: anObject! !\\\\n\\\\n!SoundTile methodsFor: 'event handling' stamp: 'sw 11/3/97 02:11'!\\\\nwantsKeyboardFocusFor: aSubmorph\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!SoundTile methodsFor: 'initialization' stamp: 'yo 7/22/2005 15:51'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Initialize the state of the receiver. Pick the croak sound\\\\n\\\\tif available, otherwise any sound.\\\\\\\"\\\\n\\\\t\\\\n\\\\t| soundChoices startingSoundName |\\\\n\\\\tsuper initialize.\\\\n\\\\tsoundChoices _ self soundChoices.\\\\n\\\\tstartingSoundName _ (soundChoices includes: 'croak')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: ['croak']\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [[soundChoices anyOne] ifError: ['silence']].\\\\n\\\\tself addArrows; setLiteral: startingSoundName.\\\\n\\\\tself labelMorph useSymbolFormat! !\\\\n\\\\n!SoundTile methodsFor: 'initialization' stamp: 'yo 4/6/2005 16:34'!\\\\nsetLiteral: anObject\\\\n\\\\n\\\\tsuper setLiteral: anObject.\\\\n\\\\tself labelMorph useSymbolFormat\\\\n! !\\\\n\\\\n\\\\n!SoundTile methodsFor: 'mouse handling' stamp: 'sw 11/24/2003 14:44'!\\\\nhandlerForMouseDown: anEvent\\\\n\\\\n\\\\t\\\\\\\"Return the (prospective) handler for a mouse down event. The handler is temporarily installed and can be used for morphs further down the hierarchy to negotiate whether the inner or the outer morph should finally handle the event\\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\t^ ((self findA: UpdatingStringMorph) bounds containsPoint: anEvent cursorPoint)\\\\n\\\\n\\\\t\\\\tifTrue:\\\\n\\\\n\\\\t\\\\t\\\\t[self]\\\\n\\\\n\\\\t\\\\tifFalse:\\\\n\\\\n\\\\t\\\\t\\\\t[super handlerForMouseDown: anEvent]! !\\\\nDataType subclass: #SoundType\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Protocols-Type Vocabularies'!\\\\n\\\\n!SoundType methodsFor: 'initial value' stamp: 'sw 9/27/2001 17:29'!\\\\ninitialValueForASlotFor: aPlayer\\\\n\\\\t\\\\\\\"Answer the value to give initially to a newly created slot of the given type in the given player\\\\\\\"\\\\n\\\\n\\\\t^ 'croak'! !\\\\n\\\\n\\\\n!SoundType methodsFor: 'initialization' stamp: 'sw 9/27/2001 17:24'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Initialize the receiver (automatically called when instances are created via 'new')\\\\\\\"\\\\n\\\\n\\\\tsuper initialize.\\\\n\\\\tself vocabularyName: #Sound! !\\\\n\\\\n\\\\n!SoundType methodsFor: '*eToys-color' stamp: 'sw 9/27/2001 17:21'!\\\\ntypeColor\\\\n\\\\t\\\\\\\"Answer the color for tiles to be associated with objects of this type\\\\\\\"\\\\n\\\\n\\\\t^ self subduedColorFromTriplet: #(1.0 0.06 0.84)\\\\t! !\\\\n\\\\n\\\\n!SoundType methodsFor: '*eToys-tiles' stamp: 'sw 9/27/2001 17:30'!\\\\ndefaultArgumentTile\\\\n\\\\t\\\\\\\"Answer a tile to represent the type\\\\\\\"\\\\n\\\\n\\\\t^ SoundTile new typeColor: self typeColor! !\\\\n\\\\n!SoundType methodsFor: '*eToys-tiles' stamp: 'sw 9/27/2001 17:37'!\\\\nnewReadoutTile\\\\n\\\\t\\\\\\\"Answer a tile that can serve as a readout for data of this type\\\\\\\"\\\\n\\\\n\\\\t^ SoundReadoutTile new typeColor: Color lightGray lighter! !\\\\n\\\\n!SoundType methodsFor: '*eToys-tiles' stamp: 'sw 9/27/2001 17:33'!\\\\nsetFormatForDisplayer: aDisplayer\\\\n\\\\t\\\\\\\"Set up the displayer to have the right format characteristics\\\\\\\"\\\\n\\\\n\\\\taDisplayer useStringFormat\\\\n\\\\t! !\\\\nSequenceableCollection subclass: #SourceFileArray\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Files-System'!\\\\n!SourceFileArray commentStamp: '<historical>' prior: 0!\\\\nThis class is an abstract superclass for source code access mechanisms. It defines the messages that need to be understood by those subclasses that store and retrieve source chunks on files, over the network or in databases.\\\\nThe first concrete subclass, StandardSourceFileArray, supports access to the traditional sources and changes files. Other subclasses might implement multiple source files for different applications, or access to a network source server.!\\\\n]style[(254 23 184)f1,f1LStandardSourceFileArray Comment;,f1!\\\\n\\\\n\\\\n!SourceFileArray methodsFor: 'accessing' stamp: 'hmm 4/26/2000 21:42'!\\\\nat: index\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n!SourceFileArray methodsFor: 'accessing' stamp: 'hmm 4/26/2000 21:43'!\\\\nat: index put: aFileStream\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n!SourceFileArray methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\ncollect: aBlock\\\\n\\\\t| copy |\\\\n\\\\tcopy := self species new: self size.\\\\n\\\\t1 to: self size do:[:i| copy at: i put: (aBlock value: (self at: i))].\\\\n\\\\t^copy! !\\\\n\\\\n!SourceFileArray methodsFor: 'accessing' stamp: 'hmm 4/26/2000 21:43'!\\\\nsize\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n\\\\n!SourceFileArray methodsFor: 'sourcePointer conversion' stamp: 'hmm 4/25/2000 22:00'!\\\\nfileIndexFromSourcePointer: anInteger\\\\n\\\\t\\\\\\\"Return the index of a source file corresponding to the given source pointer.\\\\\\\"\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n!SourceFileArray methodsFor: 'sourcePointer conversion' stamp: 'hmm 4/25/2000 22:00'!\\\\nfilePositionFromSourcePointer: anInteger\\\\n\\\\t\\\\\\\"Return the position within a source file for the given source pointer.\\\\\\\"\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n!SourceFileArray methodsFor: 'sourcePointer conversion' stamp: 'hmm 4/25/2000 22:01'!\\\\nsourcePointerFromFileIndex: index andPosition: position\\\\n\\\\t\\\\\\\"Return a sourcePointer encoding the given file index and position\\\\\\\"\\\\n\\\\tself subclassResponsibility! !\\\\nObject subclass: #SpaceTally\\\\n\\\\tinstanceVariableNames: 'results'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Tools'!\\\\n!SpaceTally commentStamp: 'sd 6/20/2003 22:31' prior: 0!\\\\nI'm responsible to help getting information about system space usage. The information I compute is represented by a spaceTallyItem\\\\n\\\\ntry something like: \\\\n\\\\n((SpaceTally new spaceTally: (Array with: TextMorph with: Point)) \\\\n\\\\tasSortedCollection: [:a :b | a spaceForInstances > b spaceForInstances]) \\\\n\\\\nSpaceTally new systemWideSpaceTally\\\\n\\\\n\\\\nThis class has been created from a part of SystemDictionary. It still deserves a nice\\\\nclean, such as using object instead of array having 4 slots.\\\\n\\\\nsd-20 June 2003!\\\\n\\\\n\\\\n!SpaceTally methodsFor: 'accessing' stamp: 'sd 6/20/2003 22:31'!\\\\nresults\\\\n\\\\n\\\\t^ results! !\\\\n\\\\n\\\\n!SpaceTally methodsFor: 'class analysis' stamp: 'efc 7/6/2004 00:30'!\\\\ncomputeSpaceUsage\\\\n\\\\n\\\\t| entry c instanceCount |\\\\n\\\\t1 to: results size do: [:i |\\\\n\\\\t\\\\tentry := results at: i.\\\\n\\\\t\\\\tc := self class environment at: entry analyzedClassName.\\\\n\\\\t\\\\tinstanceCount _ c instanceCount.\\\\n\\\\t\\\\tentry codeSize: c spaceUsed.\\\\n\\\\t\\\\tentry instanceCount: instanceCount.\\\\n\\\\t\\\\tentry spaceForInstances: (self spaceForInstancesOf: c withInstanceCount: instanceCount).\\\\n\\\\t\\\\tSmalltalk garbageCollectMost].\\\\n\\\\t\\\\n! !\\\\n\\\\n!SpaceTally methodsFor: 'class analysis' stamp: 'sd 6/20/2003 22:54'!\\\\npreAllocateResultsFor: classes\\\\n\\\\n\\\\tresults := OrderedCollection new: classes size.\\\\n\\\\tclasses do: [:cl | results add: (SpaceTallyItem analyzedClassName: cl name)].\\\\n\\\\tresults _ results asArray.\\\\n! !\\\\n\\\\n!SpaceTally methodsFor: 'class analysis' stamp: 'sd 6/20/2003 22:24'!\\\\nspaceTally: classes\\\\n\\\\t\\\\\\\"Answer a collection of SpaceTallyItems representing the memory space (in bytes) consumed \\\\tby the code and instances of each class in the system. Note that code sizes do not currently \\\\treport memory consumed by class variables. \\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"((SpaceTally new spaceTally: (Array with: TextMorph with: Point)) asSortedCollection: [:a :b | a spaceForInstances > b spaceForInstances]) asArray\\\\\\\"\\\\n\\\\n\\\\tself preAllocateResultsFor: classes.\\\\n\\\\tSmalltalk garbageCollect.\\\\n\\\\tself computeSpaceUsage.\\\\n\\\\t^ results\\\\n! !\\\\n\\\\n!SpaceTally methodsFor: 'class analysis' stamp: 'efc 7/6/2004 00:25'!\\\\nsystemWideSpaceTally\\\\n\\\\t\\\\\\\"Answer a collection of SpaceTallyItems representing the memory space (in bytes) consumed \\\\tby the code and instances of each class in the system. Note that code sizes do not currently \\\\treport memory consumed by class variables. \\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"(SpaceTally new systemWideSpaceTally asSortedCollection: [:a :b | a spaceForInstances > b spaceForInstances]) asArray\\\\\\\"\\\\n\\\\n\\\\t^self spaceTally: Smalltalk allClasses.\\\\n\\\\n! !\\\\n\\\\n\\\\n!SpaceTally methodsFor: 'fileOut' stamp: 'sd 6/20/2003 22:39'!\\\\ncompareTallyIn: beforeFileName to: afterFileName\\\\n\\\\t\\\\\\\"SpaceTally new compareTallyIn: 'tally' to: 'tally2'\\\\\\\"\\\\n\\\\n\\\\t| answer s beforeDict a afterDict allKeys before after diff |\\\\n\\\\tbeforeDict _ Dictionary new.\\\\n\\\\ts _ FileDirectory default fileNamed: beforeFileName.\\\\n\\\\t[s atEnd] whileFalse: [\\\\n\\\\t\\\\ta _ Array readFrom: s nextLine.\\\\n\\\\t\\\\tbeforeDict at: a first put: a allButFirst.\\\\n\\\\t].\\\\n\\\\ts close.\\\\n\\\\tafterDict _ Dictionary new.\\\\n\\\\ts _ FileDirectory default fileNamed: afterFileName.\\\\n\\\\t[s atEnd] whileFalse: [\\\\n\\\\t\\\\ta _ Array readFrom: s nextLine.\\\\n\\\\t\\\\tafterDict at: a first put: a allButFirst.\\\\n\\\\t].\\\\n\\\\ts close.\\\\n\\\\tanswer _ WriteStream on: String new.\\\\n\\\\tallKeys _ (Set new addAll: beforeDict keys; addAll: afterDict keys; yourself) asSortedCollection.\\\\n\\\\tallKeys do: [ :each |\\\\n\\\\t\\\\tbefore _ beforeDict at: each ifAbsent: [#(0 0 0)].\\\\n\\\\t\\\\tafter _ afterDict at: each ifAbsent: [#(0 0 0)].\\\\n\\\\t\\\\tdiff _ before with: after collect: [ :vBefore :vAfter | vAfter - vBefore].\\\\n\\\\t\\\\tdiff = #(0 0 0) ifFalse: [\\\\n\\\\t\\\\t\\\\tanswer nextPutAll: each,'  ',diff printString; cr.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\tStringHolder new contents: answer contents; openLabel: 'space diffs'.\\\\n\\\\t\\\\n\\\\n\\\\n! !\\\\n\\\\n!SpaceTally methodsFor: 'fileOut' stamp: 'sd 6/20/2003 23:04'!\\\\nprintSpaceAnalysis\\\\t\\\\n\\\\t\\\\\\\"SpaceTally new printSpaceAnalysis\\\\\\\"\\\\n\\\\n\\\\t^ self printSpaceAnalysis: 0 on: 'STspace.text'! !\\\\n\\\\n!SpaceTally methodsFor: 'fileOut' stamp: 'sd 6/20/2003 23:03'!\\\\nprintSpaceAnalysis: threshold on: fileName\\\\n\\\\t\\\\\\\"SpaceTally new printSpaceAnalysis: 1000 on: 'STspace.text1'\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"sd-This method should be rewrote to be more coherent within the rest of the class \\\\n\\\\tie using preAllocate and spaceForInstanceOf:\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"If threshold > 0, then only those classes with more than that number\\\\n\\\\tof instances will be shown, and they will be sorted by total instance space.\\\\n\\\\tIf threshold = 0, then all classes will appear, sorted by name.\\\\\\\"\\\\n\\\\n\\\\t| f codeSpace instCount instSpace totalCodeSpace totalInstCount totalInstSpace eltSize n totalPercent percent |\\\\n\\\\tSmalltalk garbageCollect.\\\\n\\\\ttotalCodeSpace _ totalInstCount _ totalInstSpace _ n _ 0.\\\\n\\\\tresults _ OrderedCollection new: Smalltalk classNames size.\\\\n'Taking statistics...'\\\\n\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\tfrom: 0 to: Smalltalk classNames size\\\\n\\\\tduring: [:bar |\\\\n\\\\tSmalltalk allClassesDo:\\\\n\\\\t\\\\t[:cl | codeSpace _ cl spaceUsed.\\\\n\\\\t\\\\tbar value: (n _ n+1).\\\\n\\\\t\\\\tSmalltalk garbageCollectMost.\\\\n\\\\t\\\\tinstCount _ cl instanceCount.\\\\n\\\\t\\\\tinstSpace _ (cl indexIfCompact > 0 ifTrue: [4] ifFalse: [8])*instCount. \\\\\\\"Object headers\\\\\\\"\\\\n\\\\t\\\\tcl isVariable\\\\n\\\\t\\\\t\\\\tifTrue: [eltSize _ cl isBytes ifTrue: [1] ifFalse: [4].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcl allInstancesDo: [:x | instSpace _ instSpace + (x basicSize*eltSize)]]\\\\n\\\\t\\\\t\\\\tifFalse: [instSpace _ instSpace + (cl instSize*instCount*4)].\\\\n\\\\t\\\\tresults add: (SpaceTallyItem analyzedClassName: cl name codeSize: codeSpace instanceCount:  instCount spaceForInstances: instSpace).\\\\n\\\\t\\\\ttotalCodeSpace _ totalCodeSpace + codeSpace.\\\\n\\\\t\\\\ttotalInstCount _ totalInstCount + instCount.\\\\n\\\\t\\\\ttotalInstSpace _ totalInstSpace + instSpace]].\\\\n\\\\ttotalPercent _ 0.0.\\\\n\\\\n\\\\tf _ FileStream newFileNamed: fileName.\\\\n\\\\tf timeStamp.\\\\n\\\\tf nextPutAll: ('Class' padded: #right to: 30 with: $ );\\\\n\\\\t\\\\t\\\\tnextPutAll: ('code space' padded: #left to: 12 with: $ );\\\\n\\\\t\\\\t\\\\tnextPutAll: ('# instances' padded: #left to: 12 with: $ );\\\\n\\\\t\\\\t\\\\tnextPutAll: ('inst space' padded: #left to: 12 with: $ );\\\\n\\\\t\\\\t\\\\tnextPutAll: ('percent' padded: #left to: 8 with: $ ); cr.\\\\n\\\\n\\\\tthreshold > 0 ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"If inst count threshold > 0, then sort by space\\\\\\\"\\\\n\\\\t\\\\tresults _ (results select: [:s | s instanceCount >= threshold or: [s spaceForInstances > (totalInstSpace // 500)]])\\\\n\\\\t\\\\t\\\\t\\\\tasSortedCollection: [:s :s2 | s spaceForInstances > s2 spaceForInstances]].\\\\n\\\\n\\\\tresults do:\\\\n\\\\t\\\\t[:s | f nextPutAll: (s analyzedClassName padded: #right to: 30 with: $ );\\\\n\\\\t\\\\t\\\\tnextPutAll: (s codeSize printString padded: #left to: 12 with: $ );\\\\n\\\\t\\\\t\\\\tnextPutAll: (s instanceCount printString padded: #left to: 12 with: $ );\\\\n\\\\t\\\\t\\\\tnextPutAll: (s spaceForInstances printString padded: #left to: 14 with: $ ).\\\\n\\\\t\\\\tpercent _ s spaceForInstances*100.0/totalInstSpace roundTo: 0.1.\\\\n\\\\t\\\\ttotalPercent _ totalPercent + percent.\\\\n\\\\t\\\\tpercent >= 0.1 ifTrue:\\\\n\\\\t\\\\t\\\\t[f nextPutAll: (percent printString padded: #left to: 8 with: $ )].\\\\n\\\\t\\\\tf cr].\\\\n\\\\n\\\\tf cr; nextPutAll: ('Total' padded: #right to: 30 with: $ );\\\\n\\\\t\\\\tnextPutAll: (totalCodeSpace printString padded: #left to: 12 with: $ );\\\\n\\\\t\\\\tnextPutAll: (totalInstCount printString padded: #left to: 12 with: $ );\\\\n\\\\t\\\\tnextPutAll: (totalInstSpace printString padded: #left to: 14 with: $ );\\\\n\\\\t\\\\tnextPutAll: ((totalPercent roundTo: 0.1) printString padded: #left to: 8 with: $ ).\\\\n\\\\tf close! !\\\\n\\\\n!SpaceTally methodsFor: 'fileOut' stamp: 'sd 6/20/2003 23:07'!\\\\nprintSpaceDifferenceFrom: fileName1 to: fileName2\\\\n\\\\t\\\\\\\"For differential results, run printSpaceAnalysis twice with different fileNames,\\\\n\\\\tthen run this method...\\\\n\\\\t\\\\tSpaceTally new printSpaceAnalysis: 0 on: 'STspace.text1'.\\\\n\\\\t\\\\t\\\\t--- do something that uses space here ---\\\\n\\\\t\\\\tSpaceTally new printSpaceAnalysis: 0 on: 'STspace.text2'.\\\\n\\\\t\\\\tSpaceTally new printSpaceDifferenceFrom: 'STspace.text1' to: 'STspace.text2'\\\\n\\\\\\\"\\\\n\\\\t| f coll1 coll2 item |\\\\n\\\\tf _ FileStream readOnlyFileNamed: fileName1.\\\\n\\\\tcoll1 _ OrderedCollection new.\\\\n\\\\t[f atEnd] whileFalse: [coll1 add: (f upTo: Character cr)].\\\\n\\\\tf close.\\\\n\\\\tf _ FileStream readOnlyFileNamed: fileName2.\\\\n\\\\tcoll2 _ OrderedCollection new.\\\\n\\\\t[f atEnd] whileFalse:\\\\n\\\\t\\\\t[item _ (f upTo: Character cr).\\\\n\\\\t\\\\t((coll1 includes: item) and: [(item endsWith: 'percent') not])\\\\n\\\\t\\\\t\\\\tifTrue: [coll1 remove: item]\\\\n\\\\t\\\\t\\\\tifFalse: [coll2 add: item]].\\\\n\\\\tf close.\\\\n\\\\t(StringHolder new contents: (String streamContents: \\\\n\\\\t\\\\t\\\\t[:s | \\\\n\\\\t\\\\t\\\\ts nextPutAll: fileName1; cr.\\\\n\\\\t\\\\t\\\\tcoll1 do: [:x | s nextPutAll: x; cr].\\\\n\\\\t\\\\t\\\\ts cr; cr.\\\\n\\\\t\\\\t\\\\ts nextPutAll: fileName2; cr.\\\\n\\\\t\\\\t\\\\tcoll2 do: [:x | s nextPutAll: x; cr]]))\\\\n\\\\t\\\\topenLabel: 'Differential Space Analysis'.\\\\n! !\\\\n\\\\n!SpaceTally methodsFor: 'fileOut' stamp: 'sd 6/20/2003 22:59'!\\\\nsaveTo: aFileName\\\\n\\\\t\\\\\\\"| st |\\\\n\\\\tst := SpaceTally new.\\\\n\\\\tst spaceTally: (Array with: TextMorph with: Point).\\\\n\\\\tst saveTo: 'spaceTally2'\\\\\\\"\\\\n\\\\t| s |\\\\n\\\\t(FileDirectory default fileExists: aFileName) ifTrue: [\\\\n\\\\t\\\\tFileDirectory default deleteFileNamed: aFileName].\\\\n\\\\ts _ FileDirectory default fileNamed: aFileName.\\\\n\\\\tresults do: [:each | s nextPutAll: each analyzedClassName asString ; \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnextPutAll: ' '; nextPutAll: each codeSize printString; \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnextPutAll: ' '; nextPutAll: each instanceCount printString; \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnextPutAll: ' '; nextPutAll: each spaceForInstances printString; cr].\\\\n\\\\ts close! !\\\\n\\\\n\\\\n!SpaceTally methodsFor: 'instance size' stamp: 'efc 7/6/2004 00:30'!\\\\nspaceForInstancesOf: aClass withInstanceCount: instCount\\\\n\\\\t\\\\\\\"Answer the number of bytes consumed by all instances of the given class, including their object headers.\\\\\\\"\\\\n\\\\n\\\\t| isCompact instVarBytes bytesPerElement contentBytes headerBytes total |\\\\n\\\\tinstCount = 0 ifTrue: [^ 0].\\\\n\\\\tisCompact _ aClass indexIfCompact > 0.\\\\n\\\\tinstVarBytes _ aClass instSize * 4.\\\\n\\\\taClass isVariable\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\tbytesPerElement _ aClass isBytes ifTrue: [1] ifFalse: [4].\\\\n\\\\t\\\\t\\\\ttotal _ 0.\\\\n\\\\t\\\\t\\\\taClass allInstancesDo: [:inst |\\\\n\\\\t\\\\t\\\\t\\\\tcontentBytes _ instVarBytes + (inst size * bytesPerElement).\\\\n\\\\t\\\\t\\\\t\\\\theaderBytes _\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcontentBytes > 255\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [12]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [isCompact ifTrue: [4] ifFalse: [8]].\\\\n\\\\t\\\\t\\\\t\\\\ttotal _ total + headerBytes + contentBytes].\\\\n\\\\t\\\\t\\\\t^ total]\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\theaderBytes _\\\\n\\\\t\\\\t\\\\t\\\\tinstVarBytes > 255\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [12]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [isCompact ifTrue: [4] ifFalse: [8]].\\\\n\\\\t\\\\t\\\\t^ instCount * (headerBytes + instVarBytes)].\\\\n! !\\\\nObject subclass: #SpaceTallyItem\\\\n\\\\tinstanceVariableNames: 'analyzedClassName codeSize instanceCount spaceForInstances'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Tools'!\\\\n!SpaceTallyItem commentStamp: 'sd 6/20/2003 22:02' prior: 0!\\\\nI'm represent an entry in the spaceTally.!\\\\n\\\\n\\\\n!SpaceTallyItem methodsFor: 'accessing' stamp: 'sd 6/20/2003 22:59'!\\\\nanalyzedClassName\\\\n\\\\n\\\\t^ analyzedClassName! !\\\\n\\\\n!SpaceTallyItem methodsFor: 'accessing' stamp: 'sd 6/20/2003 22:59'!\\\\nanalyzedClassName: aClassName\\\\n\\\\n\\\\tanalyzedClassName := aClassName! !\\\\n\\\\n!SpaceTallyItem methodsFor: 'accessing' stamp: 'sd 6/20/2003 22:08'!\\\\ncodeSize\\\\n\\\\n\\\\t^ codeSize! !\\\\n\\\\n!SpaceTallyItem methodsFor: 'accessing' stamp: 'sd 6/20/2003 22:09'!\\\\ncodeSize: aNumber\\\\n\\\\n\\\\tcodeSize := aNumber! !\\\\n\\\\n!SpaceTallyItem methodsFor: 'accessing' stamp: 'sd 6/20/2003 22:09'!\\\\ninstanceCount\\\\n\\\\n\\\\t^ instanceCount! !\\\\n\\\\n!SpaceTallyItem methodsFor: 'accessing' stamp: 'sd 6/20/2003 22:09'!\\\\ninstanceCount: aNumber\\\\n\\\\n\\\\tinstanceCount := aNumber! !\\\\n\\\\n!SpaceTallyItem methodsFor: 'accessing' stamp: 'sd 6/20/2003 22:10'!\\\\nspaceForInstances\\\\n\\\\n\\\\t^ spaceForInstances! !\\\\n\\\\n!SpaceTallyItem methodsFor: 'accessing' stamp: 'sd 6/20/2003 22:10'!\\\\nspaceForInstances: aNumber\\\\n\\\\n\\\\tspaceForInstances := aNumber! !\\\\n\\\\n\\\\n!SpaceTallyItem methodsFor: 'printing' stamp: 'sd 6/20/2003 22:52'!\\\\nprintOn: aStream\\\\n\\\\n\\\\tanalyzedClassName isNil\\\\n\\\\t\\\\tifFalse: [aStream nextPutAll: analyzedClassName asString]. \\\\n\\\\taStream nextPutAll: ' ('.\\\\n\\\\tcodeSize isNil\\\\n\\\\t\\\\tifFalse: [aStream nextPutAll: 'code size: ' ;  nextPutAll: codeSize asString]. \\\\n\\\\tinstanceCount isNil\\\\n\\\\t\\\\tifFalse: [aStream nextPutAll: ' instance count: ' ;  nextPutAll: instanceCount asString]. \\\\n\\\\tspaceForInstances isNil\\\\n\\\\t\\\\tifFalse: [aStream nextPutAll: ' space for instances: ' ;  nextPutAll: spaceForInstances asString]. \\\\n\\\\taStream nextPut: $).\\\\n\\\\t! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSpaceTallyItem class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SpaceTallyItem class methodsFor: 'instance creation' stamp: 'sd 6/20/2003 22:54'!\\\\nanalyzedClassName: aClassName\\\\n\\\\n\\\\t^ self new\\\\n\\\\t\\\\tanalyzedClassName: aClassName ; yourself\\\\n\\\\t\\\\t! !\\\\n\\\\n!SpaceTallyItem class methodsFor: 'instance creation' stamp: 'sd 6/20/2003 22:54'!\\\\nanalyzedClassName: aClassName codeSize: codeSize instanceCount: instanceCount spaceForInstances: spaceForInstances\\\\n\\\\n\\\\t^ self new\\\\n\\\\t\\\\tanalyzedClassName: aClassName ;\\\\n\\\\t\\\\tcodeSize: codeSize ;\\\\n\\\\t\\\\tinstanceCount: instanceCount ;\\\\n\\\\t\\\\tspaceForInstances: spaceForInstances ; yourself! !\\\\nArrayedCollection variableSubclass: #SparseLargeTable\\\\n\\\\tinstanceVariableNames: 'base size chunkSize defaultValue'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Collections-Arrayed'!\\\\n!SparseLargeTable commentStamp: '<historical>' prior: 0!\\\\nDerivated from Stephan Pair's LargeArray, but to hold a sparse table, in which most of the entries are the same default value, it uses some tricks.!\\\\n\\\\n\\\\n!SparseLargeTable methodsFor: 'accessing' stamp: 'yo 12/1/2003 15:58'!\\\\narrayClass\\\\n\\\\n\\\\t^(self basicAt: 1) class\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'accessing' stamp: 'yo 12/1/2003 15:58'!\\\\nat: index\\\\n\\\\n\\\\tself pvtCheckIndex: index.\\\\n\\\\t^self noCheckAt: index.\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'accessing' stamp: 'yo 12/1/2003 15:58'!\\\\nat: index put: value\\\\n\\\\t\\\\n\\\\tself pvtCheckIndex: index.\\\\n\\\\t^self noCheckAt: index put: value\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'accessing' stamp: 'yo 12/1/2003 17:56'!\\\\nbase\\\\n\\\\n\\\\t^ base.\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'accessing' stamp: 'yo 12/1/2003 15:58'!\\\\nchunkSize\\\\n\\\\n\\\\t^chunkSize\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'accessing' stamp: 'tak 12/21/2004 16:59'!\\\\nnoCheckAt: index\\\\n\\\\t| chunkIndex t |\\\\n\\\\n\\\\tchunkIndex := index - base // chunkSize + 1.\\\\n\\\\t(chunkIndex > self basicSize or: [chunkIndex < 1]) ifTrue: [^ defaultValue].\\\\n\\\\tt _ self basicAt: chunkIndex.\\\\n\\\\tt ifNil: [^ defaultValue].\\\\n\\\\t^ t at: (index - base + 1 - (chunkIndex - 1 * chunkSize))\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'accessing' stamp: 'yo 12/1/2003 19:18'!\\\\nnoCheckAt: index put: value\\\\n\\\\t| chunkIndex t |\\\\n\\\\n\\\\tchunkIndex := index - base // chunkSize + 1.\\\\n\\\\tchunkIndex > self basicSize ifTrue: [^ value].\\\\n\\\\tt _  self basicAt: chunkIndex.\\\\n\\\\tt ifNil: [^ value].\\\\n\\\\t^ t at: (index - base + 1 - (chunkIndex - 1 * chunkSize)) put: value\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'accessing' stamp: 'yo 12/1/2003 15:58'!\\\\nsize\\\\n\\\\n\\\\t^size\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'accessing' stamp: 'yo 12/1/2003 22:34'!\\\\nzapDefaultOnlyEntries\\\\n\\\\n\\\\t| lastIndex newInst |\\\\n\\\\t1 to: self basicSize do: [:i |\\\\n\\\\t\\\\t(self allDefaultValueSubtableAt: i) ifTrue: [self basicAt: i put: nil].\\\\n\\\\t].\\\\n\\\\n\\\\tlastIndex _ self findLastNonNilSubTable.\\\\n\\\\tlastIndex = 0 ifTrue: [^ self].\\\\n\\\\t\\\\n\\\\tnewInst _ self class new: lastIndex*chunkSize chunkSize: chunkSize arrayClass: (self basicAt: lastIndex) class base: base defaultValue: defaultValue.\\\\n\\\\tnewInst privateSize: self size.\\\\n\\\\tbase to: newInst size do: [:i | newInst at: i put: (self at: i)].\\\\n\\\\t1 to: newInst basicSize do: [:i |\\\\n\\\\t\\\\t(newInst allDefaultValueSubtableAt: i) ifTrue: [newInst basicAt: i put: nil].\\\\n\\\\t].\\\\n\\\\n\\\\tself becomeForward: newInst.\\\\n\\\\t^ newInst.\\\\n! !\\\\n\\\\n\\\\n!SparseLargeTable methodsFor: 'initialization' stamp: 'yo 12/1/2003 16:58'!\\\\ninitChunkSize: aChunkSize size: aSize arrayClass: aClass base: b defaultValue: d\\\\n\\\\n\\\\t| lastChunkSize |\\\\n\\\\tchunkSize := aChunkSize.\\\\n\\\\tsize := aSize.\\\\n\\\\tbase _ b.\\\\n\\\\tdefaultValue _ d.\\\\n\\\\t1 to: (self basicSize - 1) do: [ :in | self basicAt: in put: (aClass new: chunkSize withAll: defaultValue) ].\\\\n\\\\tlastChunkSize := size \\\\\\\\\\\\\\\\ chunkSize.\\\\n\\\\tlastChunkSize = 0 ifTrue: [lastChunkSize := chunkSize].\\\\n\\\\tsize = 0 \\\\n\\\\t\\\\tifTrue: [self basicAt: 1 put: (aClass new: 0)]\\\\n\\\\t\\\\tifFalse: [self basicAt: self basicSize put: (aClass new: lastChunkSize withAll: defaultValue)].\\\\n! !\\\\n\\\\n\\\\n!SparseLargeTable methodsFor: 'printing' stamp: 'yo 12/1/2003 17:06'!\\\\nprintElementsOn: aStream\\\\n\\\\t| element |\\\\n\\\\taStream nextPut: $(.\\\\n\\\\tbase to: size do: [:index | element _ self at: index. aStream print: element; space].\\\\n\\\\tself isEmpty ifFalse: [aStream skip: -1].\\\\n\\\\taStream nextPut: $)\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'printing' stamp: 'yo 12/1/2003 15:58'!\\\\nprintOn: aStream\\\\n\\\\n\\\\t(#(String) includes: self arrayClass name) \\\\n\\\\t\\\\tifTrue: [^self storeOn: aStream].\\\\n\\\\t^super printOn: aStream\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'printing' stamp: 'yo 12/1/2003 15:59'!\\\\nstoreOn: aStream\\\\n\\\\n\\\\t| x |\\\\n\\\\t(#(String) includes: self arrayClass name) ifTrue: \\\\n\\\\t\\\\t[aStream nextPut: $'.\\\\n\\\\t\\\\t1 to: self size do:\\\\n\\\\t\\\\t\\\\t[:i |\\\\n\\\\t\\\\t\\\\taStream nextPut: (x _ self at: i).\\\\n\\\\t\\\\t\\\\tx == $' ifTrue: [aStream nextPut: x]].\\\\n\\\\t\\\\taStream nextPutAll: ''' asLargeArrayChunkSize: '.\\\\n\\\\t\\\\taStream nextPutAll: self chunkSize asString.\\\\n\\\\t\\\\t^self].\\\\n\\\\t^super storeOn: aStream\\\\n! !\\\\n\\\\n\\\\n!SparseLargeTable methodsFor: 'private' stamp: 'yo 12/1/2003 18:58'!\\\\nallDefaultValueSubtableAt: index\\\\n\\\\n\\\\t| t |\\\\n\\\\tt _ self basicAt: index.\\\\n\\\\tt ifNil: [^ true].\\\\n\\\\tt do: [:e |\\\\n\\\\t\\\\te ~= defaultValue ifTrue: [^ false].\\\\n\\\\t].\\\\n\\\\t^ true.\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'private' stamp: 'yo 12/1/2003 17:10'!\\\\nanalyzeSpaceSaving\\\\n\\\\n\\\\t| total elems tablesTotal nonNilTables |\\\\n\\\\ttotal _ size - base + 1.\\\\n\\\\telems _ 0.\\\\n\\\\tbase to: size do: [:i | (self at: i) ~= defaultValue ifTrue: [elems _ elems + 1]].\\\\n\\\\ttablesTotal _ self basicSize.\\\\n\\\\tnonNilTables _ 0.\\\\n\\\\t1 to: self basicSize do: [:i | (self basicAt: i) ifNotNil: [nonNilTables _ nonNilTables + 1]].\\\\n\\\\n\\\\t^ String streamContents: [:strm |\\\\n\\\\t\\\\tstrm nextPutAll: 'total: '.\\\\n\\\\t\\\\tstrm nextPutAll: total printString.\\\\n\\\\t\\\\tstrm nextPutAll: ' elements: '.\\\\n\\\\t\\\\tstrm nextPutAll: elems printString.\\\\n\\\\t\\\\tstrm nextPutAll: ' tables: '.\\\\n\\\\t\\\\tstrm nextPutAll: tablesTotal printString.\\\\n\\\\t\\\\tstrm nextPutAll: ' non-nil: '.\\\\n\\\\t\\\\tstrm nextPutAll: nonNilTables printString.\\\\n\\\\t].\\\\n\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'private' stamp: 'nk 8/31/2004 08:34'!\\\\ncopyEmpty\\\\n\\\\t\\\\\\\"Answer a copy of the receiver that contains no elements.\\\\\\\"\\\\n\\\\t^self speciesNew: 0\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'private' stamp: 'yo 12/1/2003 22:34'!\\\\nfindLastNonNilSubTable\\\\n\\\\n\\\\t(self basicAt: self basicSize) ifNotNil: [^ self basicSize].\\\\n\\\\n\\\\tself basicSize - 1 to: 1 by: -1 do: [:lastIndex |\\\\n\\\\t\\\\t(self basicAt: lastIndex) ifNotNil: [^ lastIndex].\\\\n\\\\t].\\\\n\\\\t^ 0.\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'private' stamp: 'yo 12/1/2003 19:19'!\\\\nprivateSize: s\\\\n\\\\n\\\\tsize _ s.\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'private' stamp: 'yo 12/1/2003 17:34'!\\\\npvtCheckIndex: index \\\\n\\\\n\\\\tindex isInteger ifFalse: [self errorNonIntegerIndex].\\\\n\\\\tindex < 1 ifTrue: [self errorSubscriptBounds: index].\\\\n\\\\tindex > size ifTrue: [self errorSubscriptBounds: index].\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'private' stamp: 'yo 12/1/2003 15:59'!\\\\nsimilarInstance\\\\n\\\\n\\\\t^self class\\\\n\\\\t\\\\tnew: self size \\\\n\\\\t\\\\tchunkSize: self chunkSize \\\\n\\\\t\\\\tarrayClass: self arrayClass\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'private' stamp: 'yo 12/1/2003 15:59'!\\\\nsimilarInstance: newSize\\\\n\\\\n\\\\t^self class\\\\n\\\\t\\\\tnew: newSize \\\\n\\\\t\\\\tchunkSize: self chunkSize \\\\n\\\\t\\\\tarrayClass: self arrayClass\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'private' stamp: 'yo 12/1/2003 15:59'!\\\\nsimilarSpeciesInstance\\\\n\\\\n\\\\t^self similarInstance\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'private' stamp: 'yo 12/1/2003 16:00'!\\\\nsimilarSpeciesInstance: newSize\\\\n\\\\n\\\\t^self similarInstance: newSize\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'private' stamp: 'yo 12/1/2003 16:00'!\\\\nspeciesNew\\\\n\\\\n\\\\t^self species\\\\n\\\\t\\\\tnew: self size \\\\n\\\\t\\\\tchunkSize: self chunkSize \\\\n\\\\t\\\\tarrayClass: self arrayClass\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'private' stamp: 'yo 12/1/2003 16:00'!\\\\nspeciesNew: newSize\\\\n\\\\n\\\\t^self species\\\\n\\\\t\\\\tnew: newSize \\\\n\\\\t\\\\tchunkSize: self chunkSize \\\\n\\\\t\\\\tarrayClass: self arrayClass\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSparseLargeTable class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SparseLargeTable class methodsFor: 'accessing' stamp: 'yo 12/1/2003 15:54'!\\\\ndefaultChunkSize\\\\n\\\\n\\\\t^100! !\\\\n\\\\n!SparseLargeTable class methodsFor: 'accessing' stamp: 'yo 12/1/2003 15:54'!\\\\ndefaultChunkSizeForFiles\\\\n\\\\n\\\\t^8000! !\\\\n\\\\n\\\\n!SparseLargeTable class methodsFor: 'instance creation' stamp: 'yo 12/1/2003 16:06'!\\\\nnew: size\\\\n\\\\n\\\\t^self new: size chunkSize: self defaultChunkSize\\\\n! !\\\\n\\\\n!SparseLargeTable class methodsFor: 'instance creation' stamp: 'yo 12/1/2003 16:07'!\\\\nnew: size chunkSize: chunkSize\\\\n\\\\n\\\\t^self new: size chunkSize: chunkSize arrayClass: Array\\\\n! !\\\\n\\\\n!SparseLargeTable class methodsFor: 'instance creation' stamp: 'yo 12/1/2003 16:08'!\\\\nnew: size chunkSize: chunkSize arrayClass: aClass\\\\n\\\\n\\\\t^self new: size chunkSize: chunkSize arrayClass: Array base: 1.\\\\n! !\\\\n\\\\n!SparseLargeTable class methodsFor: 'instance creation' stamp: 'yo 12/1/2003 16:37'!\\\\nnew: size chunkSize: chunkSize arrayClass: aClass base: b\\\\n\\\\n\\\\t^self new: size chunkSize: chunkSize arrayClass: Array base: 1 defaultValue: nil.\\\\n! !\\\\n\\\\n!SparseLargeTable class methodsFor: 'instance creation' stamp: 'yo 12/1/2003 16:37'!\\\\nnew: size chunkSize: chunkSize arrayClass: aClass base: b defaultValue: d\\\\n\\\\n\\\\t| basicSize |\\\\n\\\\t(basicSize := ((size - 1) // chunkSize) + 1) = 0\\\\n\\\\t\\\\tifTrue: [basicSize := 1].\\\\n\\\\t^(self basicNew: basicSize)\\\\n\\\\t\\\\tinitChunkSize: chunkSize size: size arrayClass: aClass base: b defaultValue: d;\\\\n\\\\t\\\\tyourself\\\\n! !\\\\nObject subclass: #SparseXTable\\\\n\\\\tinstanceVariableNames: 'tables xTables'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Multilingual-Display'!\\\\n\\\\n!SparseXTable methodsFor: 'as yet unclassified' stamp: 'yo 7/30/2003 17:38'!\\\\ntableFor: code\\\\n\\\\n\\\\t| div t table |\\\\n\\\\tdiv _ code // 65536.\\\\n\\\\tt _ xTables at: div ifAbsent: [table _ Array new: 65536 withAll: 0. xTables at: div put: table. table].\\\\n\\\\t^ t.\\\\n! !\\\\nObject subclass: #Speaker\\\\n\\\\tinstanceVariableNames: 'pitch range loudness speed transcriber voice visitors'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Speech-TTS'!\\\\n\\\\n!Speaker methodsFor: 'accessing' stamp: 'len 12/8/1999 16:33'!\\\\nloudness\\\\n\\\\t^ loudness! !\\\\n\\\\n!Speaker methodsFor: 'accessing' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\nloudness: aNumber\\\\n\\\\tloudness := aNumber! !\\\\n\\\\n!Speaker methodsFor: 'accessing' stamp: 'len 12/13/1999 03:02'!\\\\nphonemes\\\\n\\\\t\\\\\\\"Answer the phoneme set of the receiver.\\\\\\\"\\\\n\\\\t^ self transcriber phonemes! !\\\\n\\\\n!Speaker methodsFor: 'accessing' stamp: 'len 12/12/1999 23:18'!\\\\npitch\\\\n\\\\t\\\\\\\"Answer the average pitch.\\\\\\\"\\\\n\\\\t^ pitch! !\\\\n\\\\n!Speaker methodsFor: 'accessing' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\npitch: aNumber\\\\n\\\\t\\\\\\\"Set the average pitch.\\\\\\\"\\\\n\\\\tpitch := aNumber! !\\\\n\\\\n!Speaker methodsFor: 'accessing' stamp: 'len 12/12/1999 23:18'!\\\\nrange\\\\n\\\\t\\\\\\\"Answer the pitch range (variation).\\\\\\\"\\\\n\\\\t^ range! !\\\\n\\\\n!Speaker methodsFor: 'accessing' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\nrange: aNumber\\\\n\\\\t\\\\\\\"Set the pitch range (variation).\\\\\\\"\\\\n\\\\trange := aNumber! !\\\\n\\\\n!Speaker methodsFor: 'accessing' stamp: 'len 12/8/1999 16:33'!\\\\nspeed\\\\n\\\\t^ speed! !\\\\n\\\\n!Speaker methodsFor: 'accessing' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\nspeed: aNumber\\\\n\\\\tspeed := aNumber! !\\\\n\\\\n!Speaker methodsFor: 'accessing' stamp: 'len 12/8/1999 16:31'!\\\\ntranscriber\\\\n\\\\t^ transcriber! !\\\\n\\\\n!Speaker methodsFor: 'accessing' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\ntranscriber: aPhoneticTranscriber\\\\n\\\\ttranscriber := aPhoneticTranscriber! !\\\\n\\\\n!Speaker methodsFor: 'accessing' stamp: 'len 12/12/1999 23:02'!\\\\nvisitors\\\\n\\\\t^ visitors! !\\\\n\\\\n!Speaker methodsFor: 'accessing' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\nvisitors: aCollection\\\\n\\\\tvisitors := aCollection! !\\\\n\\\\n!Speaker methodsFor: 'accessing' stamp: 'len 12/8/1999 16:32'!\\\\nvoice\\\\n\\\\t^ voice! !\\\\n\\\\n!Speaker methodsFor: 'accessing' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\nvoice: aVoice\\\\n\\\\tvoice := aVoice! !\\\\n\\\\n\\\\n!Speaker methodsFor: 'editing' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\nedit\\\\n\\\\t| answer buttons |\\\\n\\\\tanswer := (self findAVoice: KlattVoice) editor.\\\\n\\\\tbuttons := AlignmentMorph new listDirection: #leftToRight; color: answer color.\\\\n\\\\tbuttons\\\\n\\\\t\\\\taddMorphFront: (SimpleButtonMorph new target: self; actWhen: #buttonDown; actionSelector:  #newHead; labelString: 'new head');\\\\n\\\\t\\\\taddMorphFront: (SimpleButtonMorph new target: self; actWhen: #buttonDown; actionSelector:  #saySomething; labelString: 'test').\\\\n\\\\tanswer\\\\n\\\\t\\\\taddSliderForParameter: #speed target: self min: 0.1 max: 2.0 description: 'Speed';\\\\n\\\\t\\\\taddSliderForParameter: #loudness target: self min: 0.0 max: 1.0 description: 'Loudness';\\\\n\\\\t\\\\taddSliderForParameter: #range target: self min: 0.0 max: 1.0 description: 'Pitch Range';\\\\n\\\\t\\\\taddSliderForParameter: #pitch target: self min: 20.0 max: 800.0 description: 'Pitch';\\\\n\\\\t\\\\taddMorphFront: buttons;\\\\n\\\\t\\\\topenInWorld! !\\\\n\\\\n!Speaker methodsFor: 'editing' stamp: 'len 12/2/1999 03:19'!\\\\nfindAVoice: aClass\\\\n\\\\t(self voice isKindOf: aClass) ifTrue: [^ self voice].\\\\n\\\\t(self voice isKindOf: CompositeVoice)\\\\n\\\\t\\\\tifTrue: [self voice do: [ :each | (each isKindOf: aClass) ifTrue: [^ each]]].\\\\n\\\\t^ nil! !\\\\n\\\\n!Speaker methodsFor: 'editing' stamp: 'len 12/2/1999 03:27'!\\\\nmakeGestural\\\\n\\\\t(self findAVoice: GesturalVoice) isNil ifFalse: [^ self].\\\\n\\\\tself voice: self voice + GesturalVoice new! !\\\\n\\\\n!Speaker methodsFor: 'editing' stamp: 'len 12/2/1999 03:27'!\\\\nnewHead\\\\n\\\\tself makeGestural.\\\\n\\\\t(self findAVoice: GesturalVoice) newHead! !\\\\n\\\\n!Speaker methodsFor: 'editing' stamp: 'len 12/14/1999 05:24'!\\\\nsaySomething\\\\n\\\\tself say: #('This is my voice.' 'I am speaking.' 'Do you like my voice?' 'Listen to my voice.' 'Hello.' 'Hay. What are you doing?' 'How are you?' 'Is this my voice?' 'Are you there?' 'Help, please.' 'Howdy.' 'Ha ha he he hi.') atRandom! !\\\\n\\\\n\\\\n!Speaker methodsFor: 'initialization' stamp: 'len 11/27/2000 09:59'!\\\\ninitialize\\\\n\\\\tself pitch: 100.0; range: 0.3; loudness: 1.0; speed: 0.6; \\\\\\\"normalizer: TextNormalizer new;\\\\\\\" transcriber: PhoneticTranscriber default; visitors: {IntonationVisitor default. DurationsVisitor default. F0RenderingVisitor default}! !\\\\n\\\\n\\\\n!Speaker methodsFor: 'parsing' stamp: 'len 12/14/1999 02:13'!\\\\nclauseFromString: aString\\\\n\\\\t^ Clause new\\\\n\\\\t\\\\tstring: aString;\\\\n\\\\t\\\\tphrases: ((aString findTokens: '!!?.,;()') collect: [ :each | self phraseFromString: each])! !\\\\n\\\\n!Speaker methodsFor: 'parsing' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\neventsFromString: aString\\\\n\\\\t| clause |\\\\n\\\\tclause := self clauseFromString: aString.\\\\n\\\\tclause phrases do: [ :each | each lastSyllable events add: (PhoneticEvent new phoneme: self phonemes silence; duration: 0.1)].\\\\n\\\\tclause lastSyllable events last duration: 0.5.\\\\n\\\\tvisitors do: [ :each | each speaker: self. clause accept: each].\\\\n\\\\tclause eventsDo: [ :each | each loudness: self loudness].\\\\n\\\\t^ clause events! !\\\\n\\\\n!Speaker methodsFor: 'parsing' stamp: 'len 12/13/1999 03:19'!\\\\nphraseFromString: aString\\\\n\\\\t^ Phrase new\\\\n\\\\t\\\\tstring: aString;\\\\n\\\\t\\\\twords: ((aString findTokens: ' !!?.,;()') collect: [ :each | self wordFromString: each])! !\\\\n\\\\n!Speaker methodsFor: 'parsing' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\nsyllabizationOf: phonemes\\\\n\\\\t| syllable stream last answer |\\\\n\\\\tanswer := OrderedCollection new.\\\\n\\\\tsyllable := Syllable new phonemes: (OrderedCollection new: 4).\\\\n\\\\tstream := ReadStream on: phonemes.\\\\n\\\\t[stream atEnd]\\\\n\\\\t\\\\twhileFalse: [syllable phonemes add: (last := stream next).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(stream atEnd not and: [last isConsonant not and: [stream peek isConsonant]])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [answer add: syllable. syllable := Syllable new phonemes: (OrderedCollection new: 4)]].\\\\n\\\\tsyllable phonemes isEmpty ifFalse: [answer add: syllable].\\\\n\\\\t^ answer! !\\\\n\\\\n!Speaker methodsFor: 'parsing' stamp: 'len 12/8/1999 18:24'!\\\\nwordFromString: aString\\\\n\\\\t^ Word new\\\\n\\\\t\\\\tstring: aString;\\\\n\\\\t\\\\tsyllables: (self syllabizationOf: (self transcriber transcriptionOf: aString))! !\\\\n\\\\n\\\\n!Speaker methodsFor: 'playing' stamp: 'nk 2/19/2004 16:50'!\\\\nnumberSignDelay\\\\n\\\\t\\\\\\\"Answer the number of milliseconds that a # symbol in the string given to say: will generate.\\\\\\\"\\\\n\\\\t^200! !\\\\n\\\\n!Speaker methodsFor: 'playing' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\nsay: aString \\\\n\\\\t\\\\\\\"aString may contain characters and punctuation.\\\\n\\\\tYou may also include the # symbol in aString;\\\\n\\\\tfor each one of these, a 200msec delay will be generated.\\\\\\\"\\\\n\\\\n\\\\t| events stream string token delay |\\\\n\\\\n\\\\tstream := ReadStream\\\\n\\\\t\\\\t\\\\t\\\\ton: ((aString\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcopyReplaceAll: '-'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twith: ' '\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tasTokens: false)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfindTokens: '?# '\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tkeep: '?#').\\\\n\\\\tstring := ''.\\\\n\\\\tdelay := 0.\\\\n\\\\t[stream atEnd]\\\\n\\\\t\\\\twhileFalse: [token := stream next.\\\\n\\\\t\\\\t\\\\ttoken = '#'\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [ self voice playSilenceMSecs: self numberSignDelay.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdelay := delay + self numberSignDelay ]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [string := string , ' ' , token.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(token = '?' or: [stream atEnd])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tevents := CompositeEvent new.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tevents addAll: (self eventsFromString: string).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tevents playOn: self voice delayed: delay.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdelay := delay + (events duration * 1000).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstring := ''  ]]].\\\\n\\\\tself voice flush! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSpeaker class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!Speaker class methodsFor: 'examples' stamp: 'len 12/14/1999 03:17'!\\\\nbicyclic\\\\n\\\\t\\\\\\\"\\\\n\\\\tSpeaker bicyclic say: 'This is my voice. I am a woman with bicyclic voice.'\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t^ self new\\\\n\\\\t\\\\tpitch: 200.0;\\\\n\\\\t\\\\tvoice: (KlattVoice new diplophonia: 0.4; tract: 14.4)! !\\\\n\\\\n!Speaker class methodsFor: 'examples' stamp: 'len 12/14/1999 03:56'!\\\\nbigMan\\\\n\\\\t\\\\\\\"\\\\n\\\\tSpeaker bigMan say: 'I am the child? No. I am the big man speaking.'\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t^ self new\\\\n\\\\t\\\\tpitch: 90.0;\\\\n\\\\t\\\\trange: 0.5;\\\\n\\\\t\\\\tvoice: (KlattVoice new tract: 20)! !\\\\n\\\\n!Speaker class methodsFor: 'examples' stamp: 'len 12/14/1999 03:19'!\\\\nbreathy\\\\n\\\\t\\\\\\\"\\\\n\\\\tSpeaker breathy say: 'This is my breathy voice.'\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t^ self new\\\\n\\\\t\\\\tpitch: 100.0;\\\\n\\\\t\\\\tvoice: (KlattVoice new ro: 0.6; turbulence: 70)! !\\\\n\\\\n!Speaker class methodsFor: 'examples' stamp: 'len 12/14/1999 04:07'!\\\\nchild\\\\n\\\\t\\\\\\\"\\\\n\\\\tSpeaker child say: 'Hello. I am a child speaking.'\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t^ self new\\\\n\\\\t\\\\tpitch: 320.0;\\\\n\\\\t\\\\tvoice: (KlattVoice new tract: 12)! !\\\\n\\\\n!Speaker class methodsFor: 'examples' stamp: 'len 12/14/1999 03:21'!\\\\ncreaky\\\\n\\\\t\\\\\\\"\\\\n\\\\tSpeaker creaky say: 'This is my creaky voice with hight jitter and shimmer.'\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t^ self new\\\\n\\\\t\\\\tpitch: 90.0;\\\\n\\\\t\\\\tspeed: 0.5;\\\\n\\\\t\\\\tvoice: (KlattVoice new jitter: 0.5; shimmer: 0.5)! !\\\\n\\\\n!Speaker class methodsFor: 'examples' stamp: 'len 11/27/2000 10:01'!\\\\ndefault\\\\n\\\\t\\\\\\\"\\\\n\\\\tSpeaker default say: 'This is the default voice.'\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t^ self new voice: KlattVoice new! !\\\\n\\\\n!Speaker class methodsFor: 'examples' stamp: 'len 12/14/1999 04:13'!\\\\nexorsist\\\\n\\\\t\\\\\\\"\\\\n\\\\tSpeaker exorsist say: 'This is an scary voice. Boo.'\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t^ self new\\\\n\\\\t\\\\tpitch: 40.0;\\\\n\\\\t\\\\tspeed: 0.5;\\\\n\\\\t\\\\tvoice: (KlattVoice new tract: 10; diplophonia: 0.4; jitter: 0.3; shimmer: 0.5; turbulence: 50)! !\\\\n\\\\n!Speaker class methodsFor: 'examples' stamp: 'len 12/14/1999 04:13'!\\\\nfly\\\\n\\\\t\\\\\\\"\\\\n\\\\tSpeaker fly say: 'Haaaaaalp.'\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t^ self new\\\\n\\\\t\\\\tpitch: 650.0;\\\\n\\\\t\\\\tloudness: 0.5;\\\\n\\\\t\\\\tspeed: 0.8;\\\\n\\\\t\\\\tvoice: (KlattVoice new flutter: 1.0; tract: 1)! !\\\\n\\\\n!Speaker class methodsFor: 'examples' stamp: 'len 12/14/1999 04:01'!\\\\nkid\\\\n\\\\t\\\\\\\"\\\\n\\\\tSpeaker kid say: 'Do you like my voice? I am the kid speaking.'\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t^ self new\\\\n\\\\t\\\\tpitch: 170.0;\\\\n\\\\t\\\\trange: 0.4;\\\\n\\\\t\\\\tvoice: (KlattVoice new tract: 16)! !\\\\n\\\\n!Speaker class methodsFor: 'examples' stamp: 'len 11/27/2000 10:01'!\\\\nman\\\\n\\\\t\\\\\\\"\\\\n\\\\tSpeaker man say: 'Listen to my voice. I am a man speaking.'\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t^ self default pitch: 90.0! !\\\\n\\\\n!Speaker class methodsFor: 'examples' stamp: 'len 12/14/1999 03:26'!\\\\nnotPressed\\\\n\\\\t\\\\\\\"\\\\n\\\\tSpeaker notPressed say: 'This is a non pressed voice.'\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t^ self new\\\\n\\\\t\\\\tpitch: 100.0;\\\\n\\\\t\\\\tvoice: (KlattVoice new ro: 0.9)! !\\\\n\\\\n!Speaker class methodsFor: 'examples' stamp: 'len 12/14/1999 03:26'!\\\\npressed\\\\n\\\\t\\\\\\\"\\\\n\\\\tSpeaker pressed say: 'This is a pressed voice.'\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t^ self new\\\\n\\\\t\\\\tpitch: 100.0;\\\\n\\\\t\\\\tvoice: (KlattVoice new ro: 0.1)! !\\\\n\\\\n!Speaker class methodsFor: 'examples' stamp: 'len 12/14/1999 03:27'!\\\\nwhispery\\\\n\\\\t\\\\\\\"\\\\n\\\\tSpeaker whispery say: 'This is my whispery voice.'\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t^ self new\\\\n\\\\t\\\\tvoice: (KlattVoice new breathiness: 1.0)! !\\\\n\\\\n!Speaker class methodsFor: 'examples' stamp: 'len 12/14/1999 04:10'!\\\\nwoman\\\\n\\\\t\\\\\\\"\\\\n\\\\tSpeaker woman say: 'Do you listen? I am a woman speaking.'\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t^ self new\\\\n\\\\t\\\\tpitch: 230.0;\\\\n\\\\t\\\\trange: 0.5;\\\\n\\\\t\\\\tspeed: 0.7;\\\\n\\\\t\\\\tvoice: (KlattVoice new flutter: 0.5; ro: 0.3; ra: 0.003; tract: 14.4)! !\\\\n\\\\n\\\\n!Speaker class methodsFor: 'examples-others' stamp: 'len 12/2/1999 03:46'!\\\\nmanWithEditor\\\\n\\\\t\\\\\\\"\\\\n\\\\tSpeaker manWithEditor say: 'With this editor you can change my voice.'\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t^ self man edit! !\\\\n\\\\n!Speaker class methodsFor: 'examples-others' stamp: 'len 12/14/1999 05:10'!\\\\nmanWithHead\\\\n\\\\t\\\\\\\"\\\\n\\\\tSpeaker manWithHead say: 'This is my voice. Can you see my lips?'\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t^ self man newHead! !\\\\nMorph subclass: #SpeakerMorph\\\\n\\\\tinstanceVariableNames: 'bufferSize buffer lastConePosition sound'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-SoundInterface'!\\\\n\\\\n!SpeakerMorph methodsFor: 'initialization' stamp: 'nk 6/12/2004 10:05'!\\\\naddGraphic\\\\n\\\\n\\\\t| graphic |\\\\n\\\\tgraphic _ World drawingClass withForm: self speakerGraphic.\\\\n\\\\tgraphic position: bounds center - (graphic extent // 2).\\\\n\\\\tself addMorph: graphic.\\\\n! !\\\\n\\\\n!SpeakerMorph methodsFor: 'initialization' stamp: 'dgd 3/7/2003 14:51'!\\\\ndefaultColor\\\\n\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color\\\\n\\\\t\\\\tr: 1.0\\\\n\\\\t\\\\tg: 0.484\\\\n\\\\t\\\\tb: 0.258! !\\\\n\\\\n!SpeakerMorph methodsFor: 'initialization' stamp: 'dgd 3/7/2003 14:51'!\\\\ninitialize\\\\n\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\\\\"\\\\\\\"\\\\n\\\\tself addGraphic.\\\\n\\\\tbufferSize _ 5000.\\\\n\\\\tbuffer _ WriteStream\\\\n\\\\t\\\\t\\\\t\\\\ton: (SoundBuffer newMonoSampleCount: bufferSize).\\\\n\\\\tlastConePosition _ 0.\\\\n\\\\tsound _ SequentialSound new! !\\\\n\\\\n!SpeakerMorph methodsFor: 'initialization' stamp: 'jm 4/22/1999 22:58'!\\\\nspeakerGraphic\\\\n\\\\n\\\\t^ Form\\\\n\\\\t\\\\textent: 19@18\\\\n\\\\t\\\\tdepth: 8\\\\n\\\\t\\\\tfromArray: #(0 0 1493172224 2816 0 0 0 1493172224 11 0 0 138 1493172224 184549376 184549376 0 35509 2315255808 720896 720896 0 9090522 2315255808 2816 720896 0 2327173887 2315255819 2816 720896 138 3051028442 2315255819 2816 2816 1505080590 4294957786 2315255808 184549387 2816 3053453311 4292532917 1493172224 184549387 2816 1505080714 3048584629 1493172224 184549387 2816 9079434 3048584629 1493172224 184549387 2816 138 2327164341 1493172235 2816 2816 0 2324346293 1493172235 2816 720896 0 9079477 1493172224 2816 720896 0 35466 1493172224 720896 720896 0 138 0 184549376 184549376 0 0 0 11 0 0 0 0 2816 0)\\\\n\\\\t\\\\toffset: 0@0\\\\n! !\\\\n\\\\n\\\\n!SpeakerMorph methodsFor: 'speaker' stamp: 'jdl 3/28/2003 09:38'!\\\\nappendSample: aFloat \\\\n\\\\t\\\\\\\"Append the given sample, a number between -100.0 and 100.0, to my buffer. Flush the buffer if it is full.\\\\\\\"\\\\n\\\\n\\\\tlastConePosition := aFloat.\\\\n\\\\tlastConePosition := lastConePosition min: 100.0.\\\\n\\\\tlastConePosition := lastConePosition max: -100.0.\\\\n\\\\tbuffer nextPut: (327.67 * lastConePosition) truncated.\\\\n\\\\tbuffer position >= bufferSize ifTrue: [self flushBuffer]\\\\n! !\\\\n\\\\n!SpeakerMorph methodsFor: 'speaker' stamp: 'jm 4/21/1999 10:18'!\\\\nconePosition\\\\n\\\\n\\\\t^ lastConePosition\\\\n! !\\\\n\\\\n!SpeakerMorph methodsFor: 'speaker' stamp: 'jm 4/22/1999 16:46'!\\\\nconePosition: aNumber\\\\n\\\\n\\\\tself appendSample: aNumber asFloat.  \\\\\\\"sets lastConePosition\\\\\\\"\\\\n! !\\\\n\\\\n!SpeakerMorph methodsFor: 'speaker' stamp: 'jm 4/22/1999 13:29'!\\\\nflushBuffer\\\\n\\\\n\\\\t| buf |\\\\n\\\\tbuf _ buffer contents.\\\\n\\\\tbuffer resetContents.\\\\n\\\\tsound isPlaying ifFalse: [sound _ SequentialSound new].\\\\n\\\\tsound add: (SampledSound samples: buf samplingRate: 11025).\\\\n\\\\tsound isPlaying\\\\n\\\\t\\\\tifTrue: [sound pruneFinishedSounds]\\\\n\\\\t\\\\tifFalse: [sound play].\\\\n! !\\\\n\\\\n!SpeakerMorph methodsFor: 'speaker' stamp: 'jm 4/22/1999 15:33'!\\\\nstopSound\\\\n\\\\n\\\\tsound pause.\\\\n\\\\tbuffer resetContents.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSpeakerMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SpeakerMorph class methodsFor: '*eToys-scripting' stamp: 'sw 9/26/2001 04:27'!\\\\nadditionsToViewerCategories\\\\n\\\\t\\\\\\\"Answer a list of (<categoryName> <list of category specs>) pairs that characterize the phrases this kind of morph wishes to add to various Viewer categories.\\\\\\\"\\\\n\\\\n\\\\t^  #((speaker\\\\n\\\\n((slot conePosition  'the position of the speaker cone' Number readWrite Player getConePosition Player setConePosition:))))\\\\n\\\\n\\\\n\\\\n! !\\\\nAlignmentMorph subclass: #SpectrumAnalyzerMorph\\\\n\\\\tinstanceVariableNames: 'soundInput statusLight levelMeter graphMorph sonogramMorph fft displayType'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-SoundInterface'!\\\\n!SpectrumAnalyzerMorph commentStamp: '<historical>' prior: 0!\\\\nI am a tool for analyzing sound data from a microphone, CD, or other input source in real time. I have several display modes:\\\\n\\\\n\\\\tsignal\\\\t\\\\tsnapshots of the raw signal data as it arrives\\\\n\\\\tspectrum\\\\tfrequency spectrum of the signal data as it arrives\\\\n\\\\tsonogram\\\\tscrolling plot of the frequency spectrum over time,\\\\n\\\\t\\\\t\\\\t      where the vertical axis is frequency, the horizontal\\\\n\\\\t\\\\t\\\\t\\\\t  axis is time, and amount of energy at a given\\\\n\\\\t\\\\t\\\\t\\\\t  frequency is shown as a grayscale value with\\\\n\\\\t\\\\t\\\\t\\\\t  larger values being darker\\\\n\\\\nTo use this tool, be sure that you have selected the proper sound source using you host OS facilities. Set the desired sampling rate and FFT size (try 22050 samples/sec and an FFT size of 512) then click on the 'start' button. Use the slider to adjust the level so that the yellow level indicator peaks somewhere between the middle and the right edge at the maximum signal level.\\\\n\\\\nNote that if the level meter peaks hit the right edge, you will get 'clipping', which creates a bunch of spurious high frequency noise in the frequency spectrum. If the display is set to 'signal' mode, you can actually see the tops and bottoms of the waveform being cut off when clipping occurs.\\\\n\\\\nMany machines may not be able to perform spectrum analysis in real time, especially at higher sampling rates and larger FFT sizes. In both 'signal' and 'spectrum' modes, this tool will skip data to try to keep up with real time. However, in 'sonogram' mode it always processes all the data, even if it falls behind. This allows you to get a complete sonogram without dropouts even on a slower machine. However, as the sonogram display falls behind there will be a larger and larger time lag between when a sound is input and when it appears on the display.\\\\n\\\\nThe smaller the FFT size, the less frequency resolution you get. The lower the sampling rate, the less total frequency range you get. For an FFT size of N and a sampling rate of R, each of the N/2 'bins' of the frequency spectrum has a frequency resolution of R / N. For example, at a sampleing rate of 22050 samples/second, the total frequency range is 0 to 11025 Hz and an FFT of size 256 would divide this range into 128 bins (the output of an FFT of size N has N/2 bins), each of which covers a frequency band about 86 Hz wide.\\\\n\\\\nTo increase time resolution, increase the sampling rate and decrease the FFT size.\\\\n!\\\\n\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'initialization' stamp: 'dgd 3/7/2003 14:52'!\\\\ndefaultBorderWidth\\\\n\\\\\\\"answer the default border width for the receiver\\\\\\\"\\\\n\\\\t^ 2! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'initialization' stamp: 'dgd 3/7/2003 14:52'!\\\\ninitialize\\\\n\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\\\\"\\\\\\\"\\\\n\\\\tself listDirection: #topToBottom.\\\\n\\\\tsoundInput _ SoundInputStream new samplingRate: 22050.\\\\n\\\\tfft _ FFT new: 512.\\\\n\\\\tdisplayType _ 'sonogram'.\\\\n\\\\tself hResizing: #shrinkWrap.\\\\n\\\\tself vResizing: #shrinkWrap.\\\\n\\\\tself addButtonRow.\\\\n\\\\tself addLevelSlider.\\\\n\\\\tself addMorphBack: self makeLevelMeter.\\\\n\\\\tself addMorphBack: (Morph new extent: 10 @ 10;\\\\n\\\\t\\\\t\\\\t color: Color transparent).\\\\n\\\\t\\\\\\\"spacer\\\\\\\"\\\\n\\\\tself resetDisplay! !\\\\n\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'menu and buttons' stamp: 'dgd 9/19/2003 13:25'!\\\\ninvokeMenu\\\\n\\\\t\\\\\\\"Invoke the settings menu.\\\\\\\"\\\\n\\\\n\\\\t| aMenu |\\\\n\\\\taMenu _ CustomMenu new.\\\\n\\\\taMenu addList:\\\\t{\\\\n\\\\t\\\\t{'set sampling rate' translated.\\\\t\\\\t#setSamplingRate}.\\\\n\\\\t\\\\t{'set FFT size' translated.\\\\t\\\\t\\\\t#setFFTSize}.\\\\n\\\\t\\\\t{'set display type' translated.\\\\t\\\\t#setDisplayType}}.\\\\n\\\\taMenu invokeOn: self defaultSelection: nil.\\\\n! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'menu and buttons' stamp: 'jm 9/8/1999 12:52'!\\\\nresetDisplay\\\\n\\\\t\\\\\\\"Recreate my display after changing some parameter such as FFT size.\\\\\\\"\\\\n\\\\n\\\\tdisplayType = 'signal' ifTrue: [self showSignal].\\\\n\\\\tdisplayType = 'spectrum' ifTrue: [self showSpectrum].\\\\n\\\\tdisplayType = 'sonogram' ifTrue: [self showSonogram].\\\\n! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'menu and buttons' stamp: 'dgd 9/19/2003 13:29'!\\\\nsetDisplayType\\\\n\\\\t\\\\\\\"Set the display type.\\\\\\\"\\\\n\\\\n\\\\t| aMenu choice on |\\\\n\\\\taMenu _ CustomMenu new title: ('display type (currently {1})' translated format:{displayType}).\\\\n\\\\taMenu addList:\\\\t{\\\\n\\\\t\\\\t{'signal' translated.\\\\t'signal'}.\\\\n\\\\t\\\\t{'spectrum' translated.\\\\t'spectrum'}.\\\\n\\\\t\\\\t{'sonogram' translated.\\\\t'sonogram'}}.\\\\n\\\\tchoice _ aMenu startUp.\\\\n\\\\tchoice ifNil: [^ self].\\\\n\\\\n\\\\ton _ soundInput isRecording.\\\\n\\\\tself stop.\\\\n\\\\tdisplayType _ choice.\\\\n\\\\tself resetDisplay.\\\\n\\\\ton ifTrue: [self start].\\\\n\\\\n! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'menu and buttons' stamp: 'dgd 9/19/2003 13:27'!\\\\nsetFFTSize\\\\n\\\\t\\\\\\\"Set the size of the FFT used for frequency analysis.\\\\\\\"\\\\n\\\\n\\\\t| aMenu sz on |\\\\n\\\\taMenu _ CustomMenu new title: ('FFT size (currently {1})' translated format:{fft n}).\\\\n\\\\t((7 to: 10) collect: [:n | 2 raisedTo: n]) do:[:r | aMenu add: r printString action: r].\\\\n\\\\tsz _ aMenu startUp.\\\\n\\\\tsz ifNil: [^ self].\\\\n\\\\ton _ soundInput isRecording.\\\\n\\\\tself stop.\\\\n\\\\tfft _ FFT new: sz.\\\\n\\\\tself resetDisplay.\\\\n\\\\ton ifTrue: [self start].\\\\n! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'menu and buttons' stamp: 'dgd 9/19/2003 13:26'!\\\\nsetSamplingRate\\\\n\\\\t\\\\\\\"Set the sampling rate to be used for incoming sound data.\\\\\\\"\\\\n\\\\n\\\\t| aMenu rate on |\\\\n\\\\taMenu _ CustomMenu new title:\\\\n\\\\t\\\\t('Sampling rate (currently {1})' translated format:{soundInput samplingRate}).\\\\n\\\\t#(11025 22050 44100) do:[:r | aMenu add: r printString action: r].\\\\n\\\\trate _ aMenu startUp.\\\\n\\\\trate ifNil: [^ self].\\\\n\\\\ton _ soundInput isRecording.\\\\n\\\\tself stop.\\\\n\\\\tsoundInput samplingRate: rate.\\\\n\\\\tself resetDisplay.\\\\n\\\\ton ifTrue: [self start].\\\\n\\\\n! !\\\\n\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'stepping and presenter' stamp: 'jm 9/8/1999 15:12'!\\\\nstart\\\\n\\\\t\\\\\\\"Start displaying sound data.\\\\\\\"\\\\n\\\\n\\\\tdisplayType = 'signal'\\\\n\\\\t\\\\tifTrue: [soundInput bufferSize: graphMorph width - (2 * graphMorph borderWidth)]\\\\n\\\\t\\\\tifFalse: [soundInput bufferSize: fft n].\\\\n\\\\tsoundInput startRecording.\\\\n! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'stepping and presenter' stamp: 'jm 9/8/1999 19:05'!\\\\nstep\\\\n\\\\t\\\\\\\"Update the record light, level meter, and display.\\\\\\\"\\\\n\\\\n\\\\t| w |\\\\n\\\\t\\\\\\\"update the record light and level meter\\\\\\\"\\\\n\\\\tsoundInput isRecording\\\\n\\\\t\\\\tifTrue: [statusLight color: Color yellow]\\\\n\\\\t\\\\tifFalse: [statusLight color: Color gray].\\\\n\\\\tw _ ((121 * soundInput meterLevel) // 100) max: 1.\\\\n\\\\tlevelMeter width ~= w ifTrue: [levelMeter width: w].\\\\n\\\\n\\\\t\\\\\\\"update the display if any data is available\\\\\\\"\\\\n\\\\tself updateDisplay.\\\\n! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'stepping and presenter' stamp: 'jm 9/8/1999 15:12'!\\\\nstop\\\\n\\\\t\\\\\\\"Stop displaying sound data.\\\\\\\"\\\\n\\\\n\\\\tsoundInput stopRecording.\\\\n! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'stepping and presenter' stamp: 'jm 9/6/1999 12:12'!\\\\nstopStepping\\\\n\\\\t\\\\\\\"Turn off recording.\\\\\\\"\\\\n\\\\n\\\\tsuper stopStepping.\\\\n\\\\tsoundInput stopRecording.\\\\n! !\\\\n\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'submorphs-add/remove' stamp: 'jm 9/6/1999 14:40'!\\\\ndelete\\\\n\\\\t\\\\\\\"Turn off recording when this morph is deleted.\\\\\\\"\\\\n\\\\n\\\\tsuper delete.\\\\n\\\\tsoundInput stopRecording.\\\\n! !\\\\n\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'testing' stamp: 'jm 9/7/1999 22:26'!\\\\nstepTime\\\\n\\\\n\\\\t^ 0\\\\n! !\\\\n\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'private' stamp: 'dgd 9/19/2003 13:30'!\\\\naddButtonRow\\\\n\\\\n\\\\t| r |\\\\n\\\\tr _ AlignmentMorph newRow vResizing: #shrinkWrap.\\\\n\\\\tr addMorphBack: (self buttonName: 'Menu' translated action: #invokeMenu).\\\\n\\\\tr addMorphBack: (Morph new extent: 4@1; color: Color transparent).\\\\n\\\\tr addMorphBack: (self buttonName: 'Start' translated action: #start).\\\\n\\\\tr addMorphBack: (Morph new extent: 4@1; color: Color transparent).\\\\n\\\\tr addMorphBack: (self buttonName: 'Stop' translated action: #stop).\\\\n\\\\tr addMorphBack: (Morph new extent: 12@1; color: Color transparent).\\\\n\\\\tr addMorphBack: self makeStatusLight.\\\\n\\\\tself addMorphBack: r.\\\\n! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'private' stamp: 'ar 11/9/2000 21:23'!\\\\naddLevelSlider\\\\n\\\\n\\\\t| levelSlider r |\\\\n\\\\tlevelSlider _ SimpleSliderMorph new\\\\n\\\\t\\\\tcolor: color;\\\\n\\\\t\\\\textent: 100@2;\\\\n\\\\t\\\\ttarget: soundInput;\\\\n\\\\t\\\\tactionSelector: #recordLevel:;\\\\n\\\\t\\\\tadjustToValue: soundInput recordLevel.\\\\n\\\\tr _ AlignmentMorph newRow\\\\n\\\\t\\\\tcolor: color;\\\\n\\\\t\\\\tlayoutInset: 0;\\\\n\\\\t\\\\twrapCentering: #center; cellPositioning: #leftCenter;\\\\n\\\\t\\\\thResizing: #shrinkWrap;\\\\n\\\\t\\\\tvResizing: #rigid;\\\\n\\\\t\\\\theight: 24.\\\\n\\\\tr addMorphBack: (StringMorph contents: '0 ').\\\\n\\\\tr addMorphBack: levelSlider.\\\\n\\\\tr addMorphBack: (StringMorph contents: ' 10').\\\\n\\\\tself addMorphBack: r.\\\\n! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'private' stamp: 'jhm 10/15/97 14:30'!\\\\nbuttonName: aString action: aSymbol\\\\n\\\\n\\\\t^ SimpleButtonMorph new\\\\n\\\\t\\\\ttarget: self;\\\\n\\\\t\\\\tlabel: aString;\\\\n\\\\t\\\\tactionSelector: aSymbol\\\\n! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'private' stamp: 'jm 9/8/1999 13:27'!\\\\nmakeLevelMeter\\\\n\\\\n\\\\t| outerBox |\\\\n\\\\touterBox _ RectangleMorph new extent: 125@14; color: Color lightGray.\\\\n\\\\tlevelMeter _ Morph new extent: 2@10; color: Color yellow.\\\\n\\\\tlevelMeter position: outerBox topLeft + (2@2).\\\\n\\\\touterBox addMorph: levelMeter.\\\\n\\\\t^ outerBox\\\\n! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'private' stamp: 'dgd 9/19/2003 13:31'!\\\\nmakeStatusLight\\\\n\\\\n\\\\t| s |\\\\n\\\\tstatusLight _ RectangleMorph new extent: 24@19.\\\\n\\\\tstatusLight color: Color gray.\\\\n\\\\ts _ StringMorph contents: 'On' translated.\\\\n\\\\ts position: statusLight center - (s extent // 2).\\\\n\\\\tstatusLight addMorph: s.\\\\n\\\\t^ statusLight\\\\n! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'private' stamp: 'gm 2/28/2003 00:11'!\\\\nprocessBuffer: buf \\\\n\\\\t\\\\\\\"Analyze one buffer of data.\\\\\\\"\\\\n\\\\n\\\\t| data |\\\\n\\\\tdata := displayType = 'signal' \\\\n\\\\t\\\\tifTrue: [buf]\\\\n\\\\t\\\\tifFalse: [fft transformDataFrom: buf startingAt: 1].\\\\n\\\\tgraphMorph ifNotNil: \\\\n\\\\t\\\\t\\\\t[graphMorph\\\\n\\\\t\\\\t\\\\t\\\\tdata: data;\\\\n\\\\t\\\\t\\\\t\\\\tchanged].\\\\n\\\\tsonogramMorph ifNotNil: \\\\n\\\\t\\\\t\\\\t[data := data collect: [:v | v sqrt].\\\\t\\\\\\\"square root compresses dynamic range\\\\\\\"\\\\n\\\\t\\\\t\\\\tdata /= 400.0.\\\\n\\\\t\\\\t\\\\tsonogramMorph plotColumn: (data copyFrom: 1 to: data size // 1)]! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'private' stamp: 'jm 9/8/1999 12:49'!\\\\nremoveAllDisplays\\\\n\\\\t\\\\\\\"Remove all currently showing displays.\\\\\\\"\\\\n\\\\n\\\\tsonogramMorph ifNotNil: [sonogramMorph delete].\\\\n\\\\tgraphMorph ifNotNil: [graphMorph delete].\\\\n\\\\tsonogramMorph _ graphMorph _ nil.\\\\n! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'private' stamp: 'jm 9/8/1999 19:56'!\\\\nshowSignal\\\\n\\\\t\\\\\\\"Display the actual signal waveform.\\\\\\\"\\\\n\\\\n\\\\tdisplayType _ 'signal'.\\\\n\\\\tself removeAllDisplays.\\\\n\\\\tgraphMorph _ GraphMorph new.\\\\n\\\\tgraphMorph extent: (400 + (2 * graphMorph borderWidth))@128.\\\\n\\\\tgraphMorph data: (Array new: 100 withAll: 0).\\\\n\\\\tgraphMorph color: (Color r: 0.8 g: 1.0 b: 1.0).\\\\n\\\\tself addMorphBack: graphMorph.\\\\n\\\\tself extent: 10@10.  \\\\\\\"shrink to minimum size\\\\\\\"\\\\n! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'private' stamp: 'jm 9/8/1999 19:43'!\\\\nshowSonogram\\\\n\\\\t\\\\\\\"Display a sonogram showing the frequency spectrum versus time.\\\\\\\"\\\\n\\\\n\\\\t| zeros h w |\\\\n\\\\tdisplayType _ 'sonogram'.\\\\n\\\\tself removeAllDisplays.\\\\n\\\\th _ fft n // 2.\\\\n\\\\th _ h min: 512 max: 64.\\\\n\\\\tw _ 400.\\\\n\\\\tsonogramMorph _\\\\n\\\\t\\\\tSonogram new\\\\n\\\\t\\\\t\\\\textent: w@h\\\\n\\\\t\\\\t\\\\tminVal: 0.0\\\\n\\\\t\\\\t\\\\tmaxVal: 1.0\\\\n\\\\t\\\\t\\\\tscrollDelta: w.\\\\n\\\\tzeros _ Array new: sonogramMorph height withAll: 0.\\\\n\\\\tsonogramMorph width timesRepeat: [sonogramMorph plotColumn: zeros].\\\\n\\\\tself addMorphBack: sonogramMorph.\\\\n\\\\tself extent: 10@10.  \\\\\\\"shrink to minimum size\\\\\\\"\\\\n! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'private' stamp: 'jm 9/8/1999 15:10'!\\\\nshowSpectrum\\\\n\\\\t\\\\\\\"Display the frequency spectrum.\\\\\\\"\\\\n\\\\n\\\\tdisplayType _ 'spectrum'.\\\\n\\\\tself removeAllDisplays.\\\\n\\\\tgraphMorph _ GraphMorph new.\\\\n\\\\tgraphMorph extent: ((fft n // 2) + (2 * graphMorph borderWidth))@128.\\\\n\\\\tgraphMorph data: (Array new: fft n // 2 withAll: 0).\\\\n\\\\tself addMorphBack: graphMorph.\\\\n\\\\tself extent: 10@10.  \\\\\\\"shrink to minimum size\\\\\\\"\\\\n! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'private' stamp: 'jm 9/8/1999 19:39'!\\\\nupdateDisplay\\\\n\\\\t\\\\\\\"Update the display if any data is available.\\\\\\\"\\\\n\\\\n\\\\t| buf bufCount |\\\\n\\\\tsoundInput bufferCount = 0 ifTrue: [^ self].\\\\n\\\\n\\\\tgraphMorph ifNotNil: [\\\\n\\\\t\\\\t[soundInput bufferCount > 0] whileTrue: [\\\\n\\\\t\\\\t\\\\t\\\\\\\"skip to the most recent buffer\\\\\\\"\\\\n\\\\t\\\\t\\\\tbuf _ soundInput nextBufferOrNil].\\\\n\\\\t\\\\t^ self processBuffer: buf].\\\\n\\\\n\\\\tsonogramMorph ifNotNil: [\\\\n\\\\t\\\\t\\\\\\\"at small buffer sizes we have to update the sonogram in\\\\n\\\\t\\\\t batches or we may get behind; shoot for 8 updates/second\\\\\\\"\\\\n\\\\t\\\\tbufCount _ (soundInput samplingRate / (8 * soundInput bufferSize)) truncated max: 1.\\\\n\\\\t\\\\t[bufCount > 0 and: [soundInput bufferCount > 0]] whileTrue: [\\\\n\\\\t\\\\t\\\\tself processBuffer: (soundInput nextBufferOrNil)]].\\\\n! !\\\\nPath subclass: #Spline\\\\n\\\\tinstanceVariableNames: 'coefficients'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'ST80-Paths'!\\\\n!Spline commentStamp: '<historical>' prior: 0!\\\\nI represent a collection of Points through which a cubic spline curve is fitted.!\\\\n\\\\n\\\\n!Spline methodsFor: 'accessing'!\\\\ncoefficients\\\\n\\\\t\\\\\\\"Answer an eight-element Array of Arrays each of which is the length \\\\n\\\\tof the receiver. The first four arrays are the values, first, second and \\\\n\\\\tthird derivatives, respectively, for the parametric spline in x. The last \\\\n\\\\tfour elements are for y.\\\\\\\"\\\\n\\\\n\\\\t^coefficients! !\\\\n\\\\n\\\\n!Spline methodsFor: 'displaying'!\\\\ncomputeCurve\\\\n\\\\t\\\\\\\"Compute an array for the coefficients.\\\\\\\"\\\\n\\\\n\\\\t| length extras |\\\\n\\\\tlength _ self size.\\\\n\\\\textras _ 0.\\\\n\\\\tcoefficients _ Array new: 8.\\\\n\\\\t1 to: 8 do: [:i | coefficients at: i put: (Array new: length + extras)].\\\\n\\\\t1 to: 5 by: 4 do: \\\\n\\\\t\\\\t[:k | \\\\n\\\\t\\\\t1 to: length do:\\\\n\\\\t\\\\t\\\\t[:i | (coefficients at: k)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tat: i put: (k = 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [(self at: i) x asFloat]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [(self at: i) y asFloat])].\\\\n\\\\t\\\\t\\\\t1 to: extras do: [:i | (coefficients at: k)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tat: length + i put: ((coefficients at: k)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tat: i + 1)].\\\\n\\\\t\\\\t\\\\tself derivs: (coefficients at: k)\\\\n\\\\t\\\\t\\\\t\\\\tfirst: (coefficients at: k + 1)\\\\n\\\\t\\\\t\\\\t\\\\tsecond: (coefficients at: k + 2)\\\\n\\\\t\\\\t\\\\t\\\\tthird: (coefficients at: k + 3)].\\\\n\\\\textras > 0 \\\\n\\\\t\\\\tifTrue: [1 to: 8 do: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:i | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcoefficients at: i put: ((coefficients at: i)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcopyFrom: 2 to: length + 1)]]! !\\\\n\\\\n!Spline methodsFor: 'displaying'!\\\\ndisplayOn: aDisplayMedium at: aPoint clippingBox: clipRect rule: anInteger fillColor: aForm \\\\n\\\\t\\\\\\\"Display the receiver, a spline curve, approximated by straight line\\\\n\\\\tsegments.\\\\\\\"\\\\n\\\\n\\\\t| n line t x y x1 x2 x3 y1 y2 y3 |\\\\n\\\\tcollectionOfPoints size < 1 ifTrue: [self error: 'a spline must have at least one point'].\\\\n\\\\tline _ Line new.\\\\n\\\\tline form: self form.\\\\n\\\\tline beginPoint: \\\\n\\\\t\\\\t(x _ (coefficients at: 1) at: 1) rounded @ (y _ (coefficients at: 5) at: 1) rounded.\\\\n\\\\t1 to: (coefficients at: 1) size - 1 do: \\\\n\\\\t\\\\t[:i | \\\\n\\\\t\\\\t\\\\\\\"taylor series coefficients\\\\\\\"\\\\n\\\\t\\\\tx1 _ (coefficients at: 2) at: i.\\\\n\\\\t\\\\ty1 _ (coefficients at: 6) at: i.\\\\n\\\\t\\\\tx2 _ ((coefficients at: 3) at: i) / 2.0.\\\\n\\\\t\\\\ty2 _ ((coefficients at: 7) at: i) / 2.0.\\\\n\\\\t\\\\tx3 _ ((coefficients at: 4) at: i) / 6.0.\\\\n\\\\t\\\\ty3 _ ((coefficients at: 8) at: i) / 6.0.\\\\n\\\\t\\\\t\\\\\\\"guess n\\\\\\\"\\\\n\\\\t\\\\tn _ 5 max: (x2 abs + y2 abs * 2.0 + ((coefficients at: 3)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tat: i + 1) abs + ((coefficients at: 7)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tat: i + 1) abs / 100.0) rounded.\\\\n\\\\t\\\\t1 to: n - 1 do: \\\\n\\\\t\\\\t\\\\t[:j | \\\\n\\\\t\\\\t\\\\tt _ j asFloat / n.\\\\n\\\\t\\\\t\\\\tline endPoint: \\\\n\\\\t\\\\t\\\\t\\\\t(x3 * t + x2 * t + x1 * t + x) rounded \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t@ (y3 * t + y2 * t + y1 * t + y) rounded.\\\\n\\\\t\\\\t\\\\tline\\\\n\\\\t\\\\t\\\\t\\\\tdisplayOn: aDisplayMedium\\\\n\\\\t\\\\t\\\\t\\\\tat: aPoint\\\\n\\\\t\\\\t\\\\t\\\\tclippingBox: clipRect\\\\n\\\\t\\\\t\\\\t\\\\trule: anInteger\\\\n\\\\t\\\\t\\\\t\\\\tfillColor: aForm.\\\\n\\\\t\\\\t\\\\tline beginPoint: line endPoint].\\\\n\\\\t\\\\tline beginPoint: \\\\n\\\\t\\\\t\\\\t\\\\t(x _ (coefficients at: 1) at: i + 1) rounded \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t@ (y _ (coefficients at: 5) at: i + 1) rounded.\\\\n\\\\t\\\\tline\\\\n\\\\t\\\\t\\\\tdisplayOn: aDisplayMedium\\\\n\\\\t\\\\t\\\\tat: aPoint\\\\n\\\\t\\\\t\\\\tclippingBox: clipRect\\\\n\\\\t\\\\t\\\\trule: anInteger\\\\n\\\\t\\\\t\\\\tfillColor: aForm]! !\\\\n\\\\n!Spline methodsFor: 'displaying'!\\\\ndisplayOn: aDisplayMedium transformation: aTransformation clippingBox: clipRect rule: anInteger fillColor: aForm \\\\n\\\\t\\\\\\\"Get the scaled and translated path of newKnots.\\\\\\\"\\\\n\\\\n\\\\t| newKnots newSpline |\\\\n\\\\tnewKnots _ aTransformation applyTo: self.\\\\n\\\\tnewSpline _ Spline new.\\\\n\\\\tnewKnots do: [:knot | newSpline add: knot].\\\\n\\\\tnewSpline form: self form.\\\\n\\\\tnewSpline\\\\n\\\\t\\\\tdisplayOn: aDisplayMedium\\\\n\\\\t\\\\tat: 0 @ 0\\\\n\\\\t\\\\tclippingBox: clipRect\\\\n\\\\t\\\\trule: anInteger\\\\n\\\\t\\\\tfillColor: aForm! !\\\\n\\\\n\\\\n!Spline methodsFor: 'private'!\\\\nderivs: a first: point1 second: point2 third: point3\\\\n\\\\t\\\\\\\"Compute the first, second and third derivitives (in coefficients) from\\\\n\\\\tthe Points in this Path (coefficients at: 1 and coefficients at: 5).\\\\\\\"\\\\n\\\\n\\\\t| l v anArray |\\\\n\\\\tl _ a size.\\\\n\\\\tl < 2 ifTrue: [^self].\\\\n\\\\tl > 2\\\\n\\\\t  ifTrue:\\\\n\\\\t\\\\t[v _ Array new: l.\\\\n\\\\t\\\\t v  at:  1 put: 4.0.\\\\n\\\\t\\\\t anArray _ Array new: l.\\\\n\\\\t\\\\t anArray  at:  1 put: (6.0 * ((a  at:  1) - ((a  at:  2) * 2.0) + (a  at:  3))).\\\\n\\\\t\\\\t 2 to: l - 2 do:\\\\n\\\\t\\\\t\\\\t[:i | \\\\n\\\\t\\\\t\\\\tv  at:  i put: (4.0 - (1.0 / (v  at:  (i - 1)))).\\\\n\\\\t\\\\t\\\\tanArray\\\\n\\\\t\\\\t\\\\t\\\\tat:  i \\\\n\\\\t\\\\t\\\\t\\\\tput: (6.0 * ((a  at:  i) - ((a  at:  (i + 1)) * 2.0) + (a  at:  (i + 2)))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t- ((anArray  at:  (i - 1)) / (v  at:  (i - 1))))].\\\\n\\\\t\\\\t point2  at: (l - 1) put: ((anArray  at:  (l - 2)) / (v  at:  (l - 2))).\\\\n\\\\t\\\\t l - 2 to: 2 by: 0-1 do: \\\\n\\\\t\\\\t\\\\t[:i | \\\\n\\\\t\\\\t\\\\tpoint2 \\\\n\\\\t\\\\t\\\\t\\\\tat: i \\\\n\\\\t\\\\t\\\\t\\\\tput: ((anArray  at:  (i - 1)) - (point2  at:  (i + 1)) / (v  at:  (i - 1)))]].\\\\n\\\\tpoint2 at: 1 put: (point2  at:  l put: 0.0).\\\\n\\\\t1 to: l - 1 do:\\\\n\\\\t\\\\t[:i | point1 \\\\n\\\\t\\\\t\\\\t\\\\tat: i \\\\n\\\\t\\\\t\\\\t\\\\tput: ((a at: (i + 1)) - (a  at:  i) - \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t((point2  at:  i) * 2.0 + (point2  at:  (i + 1)) / 6.0)).\\\\n\\\\t\\\\t      point3 at: i put: ((point2  at:  (i + 1)) - (point2  at:  i))]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSpline class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!Spline class methodsFor: 'examples' stamp: '6/8/97 13:55 di'!\\\\nexample\\\\n\\\\t\\\\\\\"Designate points on the Path by clicking the red button. Terminate by\\\\n\\\\tpressing any other button. A curve will be displayed, through the\\\\n\\\\tselected points, using a long black form.\\\\\\\"\\\\n\\\\n\\\\t| splineCurve aForm flag|\\\\n\\\\taForm _ Form extent: 2@2.\\\\n\\\\taForm  fillBlack.\\\\n\\\\tsplineCurve _ Spline new.\\\\n\\\\tsplineCurve form: aForm.\\\\n\\\\tflag _ true.\\\\n\\\\t[flag] whileTrue:\\\\n\\\\t\\\\t[Sensor waitButton.\\\\n\\\\t\\\\t Sensor redButtonPressed\\\\n\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t[splineCurve add: Sensor waitButton. \\\\n\\\\t\\\\t\\\\t\\\\t Sensor waitNoButton.\\\\n\\\\t\\\\t\\\\t\\\\t aForm displayOn: Display at: splineCurve last]\\\\n\\\\t\\\\t\\\\tifFalse: [flag_false]].\\\\n\\\\tsplineCurve computeCurve.\\\\n\\\\tsplineCurve isEmpty \\\\n\\\\t\\\\tifFalse: [splineCurve displayOn: Display.\\\\n\\\\t\\\\t\\\\t\\\\tSensor waitNoButton].\\\\n \\\\n\\\\t\\\\\\\"Spline example\\\\\\\"! !\\\\nObject subclass: #SqNumberParser\\\\n\\\\tinstanceVariableNames: 'sourceStream base neg integerPart fractionPart exponent scale nDigits lastNonZero requestor failBlock'\\\\n\\\\tclassVariableNames: 'BelllerophonBase10'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Kernel-Numbers'!\\\\n!SqNumberParser commentStamp: 'nice 4/27/2006 22:38' prior: 0!\\\\nThis is a class specialized in parsing and building numbers.\\\\nNumber syntax should follow Smalltalk syntax.\\\\n\\\\nIf you have to read foreign number syntax, create a subclass.!\\\\n\\\\n\\\\n!SqNumberParser methodsFor: 'error' stamp: 'nice 4/28/2006 00:20'!\\\\nexpected: errorString \\\\n\\\\trequestor isNil\\\\n\\\\t\\\\tifFalse: [requestor\\\\n\\\\t\\\\t\\\\t\\\\tnotify: errorString , ' ->'\\\\n\\\\t\\\\t\\\\t\\\\tat: sourceStream position\\\\n\\\\t\\\\t\\\\t\\\\tin: sourceStream].\\\\n\\\\tself fail! !\\\\n\\\\n!SqNumberParser methodsFor: 'error' stamp: 'nice 4/28/2006 00:19'!\\\\nfail\\\\n\\\\tfailBlock isNil ifFalse: [^failBlock value].\\\\n\\\\tself error: 'Reading a number failed'! !\\\\n\\\\n\\\\n!SqNumberParser methodsFor: 'accessing' stamp: 'nice 4/27/2006 22:57'!\\\\nexponentLetters\\\\n\\\\t\\\\\\\"answer the list of possible exponents for Numbers.\\\\n\\\\tNote: this parser will not honour precision attached to the exponent.\\\\n\\\\tdifferent exponent do not lead to different precisions.\\\\n\\\\tonly IEEE 754 floating point numbers will be created\\\\\\\"\\\\n\\\\t\\\\n\\\\t^'edq'! !\\\\n\\\\n!SqNumberParser methodsFor: 'accessing' stamp: 'nice 5/1/2006 01:58'!\\\\nfailBlock: aBlockOrNil\\\\n\\\\tfailBlock := aBlockOrNil! !\\\\n\\\\n!SqNumberParser methodsFor: 'accessing' stamp: 'nice 5/1/2006 01:59'!\\\\nrequestor: anObjectOrNil\\\\n\\\\trequestor := anObjectOrNil! !\\\\n\\\\n\\\\n!SqNumberParser methodsFor: 'parsing-private' stamp: 'nice 5/7/2006 17:33'!\\\\nmakeFloatFromMantissa: m exponent: k base: aRadix \\\\n\\\\t\\\\\\\"Convert infinite precision arithmetic into Floating point.\\\\n\\\\tThis alogrithm rely on correct IEEE rounding mode\\\\n\\\\tbeing implemented in Integer>>asFloat and Fraction>>asFloat\\\\\\\"\\\\n\\\\n\\\\t^(k positive\\\\n\\\\t\\\\tifTrue: [m * (aRadix raisedTo: k)]\\\\n\\\\t\\\\tifFalse: [Fraction numerator: m denominator: (aRadix raisedTo: k negated)]) asFloat! !\\\\n\\\\n!SqNumberParser methodsFor: 'parsing-private' stamp: 'nice 4/28/2006 00:52'!\\\\nmakeIntegerOrScaledInteger\\\\n\\\\t\\\\\\\"at this point, there is no digit, nor fractionPart.\\\\n\\\\tmaybe it can be a scaled decimal with fraction omitted...\\\\\\\"\\\\n\\\\t\\\\n\\\\tneg\\\\n\\\\t\\\\tifTrue: [integerPart := integerPart negated].\\\\n\\\\tself readExponent\\\\n\\\\t\\\\tifTrue: [integerPart := integerPart\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t* (base raisedTo: exponent)]\\\\n\\\\t\\\\tifFalse: [self readScale\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [nil.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ ScaledDecimal newFromNumber: integerPart scale: scale]].\\\\n\\\\t^ integerPart! !\\\\n\\\\n!SqNumberParser methodsFor: 'parsing-private' stamp: 'nice 4/28/2006 01:14'!\\\\nreadExponent\\\\n\\\\t\\\\\\\"read the exponent if any (stored in instVar).\\\\n\\\\tAnswer true if found, answer false if none.\\\\n\\\\tIf exponent letter is not followed by a digit,\\\\n\\\\tthis is not considered as an error.\\\\n\\\\tExponent are always read in base 10, though i do not see why...\\\\\\\"\\\\n\\\\t\\\\n\\\\t| eneg |\\\\n\\\\texponent := 0.\\\\n\\\\tsourceStream atEnd\\\\n\\\\t\\\\tifTrue: [^ false].\\\\n\\\\t(self exponentLetters includes: sourceStream next)\\\\n\\\\t\\\\tifFalse: [sourceStream skip: -1.\\\\n\\\\t\\\\t\\\\t^ false].\\\\n\\\\teneg := sourceStream peekFor: $-.\\\\n\\\\texponent := self\\\\n\\\\t\\\\t\\\\t\\\\tnextUnsignedIntegerBase: 10\\\\n\\\\t\\\\t\\\\t\\\\tifFail: [sourceStream\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tskip: (eneg\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [-2]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [-1]).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ false].\\\\n\\\\teneg\\\\n\\\\t\\\\tifTrue: [exponent := exponent negated].\\\\n\\\\t^ true! !\\\\n\\\\n!SqNumberParser methodsFor: 'parsing-private' stamp: 'nice 4/28/2006 03:08'!\\\\nreadScale\\\\n\\\\t\\\\\\\"read the scale if any (stored in instVar).\\\\n\\\\tAnswer true if found, answer false if none.\\\\n\\\\tIf scale letter is not followed by a digit,\\\\n\\\\tthis is not considered as an error.\\\\n\\\\tScales are always read in base 10, though i do not see why...\\\\\\\"\\\\n\\\\t\\\\n\\\\tscale := 0.\\\\n\\\\tsourceStream atEnd ifTrue: [^ false].\\\\n\\\\t('s' includes: sourceStream next)\\\\n\\\\t\\\\tifFalse: [sourceStream skip: -1.\\\\n\\\\t\\\\t\\\\t^ false].\\\\n\\\\tscale := self\\\\n\\\\t\\\\t\\\\t\\\\tnextUnsignedIntegerBase: 10\\\\n\\\\t\\\\t\\\\t\\\\tifFail: [sourceStream skip: -1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ false].\\\\n\\\\t^ true! !\\\\n\\\\n\\\\n!SqNumberParser methodsFor: 'parsing-public' stamp: 'nice 4/27/2006 23:08'!\\\\nnextIntegerBase: aRadix\\\\n\\\\t\\\\\\\"Form an integer with following digits\\\\\\\"\\\\n\\\\t\\\\n\\\\t| isNeg value |\\\\n\\\\tisNeg := sourceStream peekFor: $-.\\\\n\\\\tvalue := self nextUnsignedIntegerBase: aRadix.\\\\n\\\\t^isNeg\\\\n\\\\t\\\\tifTrue: [value negated]\\\\n\\\\t\\\\tifFalse: [value]! !\\\\n\\\\n!SqNumberParser methodsFor: 'parsing-public' stamp: 'nice 4/28/2006 01:12'!\\\\nnextIntegerBase: aRadix ifFail: aBlock\\\\n\\\\t\\\\\\\"Form an integer with following digits\\\\\\\"\\\\n\\\\t\\\\n\\\\t| isNeg value |\\\\n\\\\tisNeg := sourceStream peekFor: $-.\\\\n\\\\tvalue := self nextUnsignedIntegerBase: aRadix ifFail: [^aBlock value].\\\\n\\\\t^isNeg\\\\n\\\\t\\\\tifTrue: [value negated]\\\\n\\\\t\\\\tifFalse: [value]! !\\\\n\\\\n!SqNumberParser methodsFor: 'parsing-public' stamp: 'nice 4/28/2006 03:38'!\\\\nnextNumber\\\\n\\\\t\\\\\\\"main method for reading a number.\\\\n\\\\tThis one can read Float Integer and ScaledDecimal\\\\\\\"\\\\n\\\\t\\\\n\\\\t| numberOfTrailingZeroInIntegerPart numberOfNonZeroFractionDigits mantissa decimalMultiplier decimalFraction value numberOfTrailingZeroInFractionPart |\\\\n\\\\t(sourceStream nextMatchAll: 'NaN')\\\\n\\\\t\\\\tifTrue: [^ Float nan].\\\\n\\\\tneg := sourceStream peekFor: $-.\\\\n\\\\t(sourceStream nextMatchAll: 'Infinity')\\\\n\\\\t\\\\tifTrue: [^ neg\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [Float infinity negated]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [Float infinity]].\\\\n\\\\tintegerPart := self nextUnsignedIntegerBase: base.\\\\n\\\\tnumberOfTrailingZeroInIntegerPart := nDigits - lastNonZero.\\\\n\\\\t(sourceStream peekFor: $r)\\\\n\\\\t\\\\tifTrue: [\\\\\\\"<base>r<integer>\\\\\\\"\\\\n\\\\t\\\\t\\\\t(base := integerPart) < 2\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [^ self expected: 'an integer greater than 1 as valid radix'].\\\\n\\\\t\\\\t\\\\t(sourceStream peekFor: $-)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [neg := neg not].\\\\n\\\\t\\\\t\\\\tintegerPart := self nextUnsignedIntegerBase: base.\\\\n\\\\t\\\\t\\\\tnumberOfTrailingZeroInIntegerPart := nDigits - lastNonZero].\\\\n\\\\t^ (sourceStream peekFor: $.)\\\\n\\\\t\\\\tifTrue: [fractionPart := self\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnextUnsignedIntegerBase: base\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFail: [sourceStream skip: -1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^ neg\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [integerPart negated]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [integerPart]].\\\\n\\\\t\\\\t\\\\tnumberOfNonZeroFractionDigits := lastNonZero.\\\\n\\\\t\\\\t\\\\tnumberOfTrailingZeroInFractionPart := nDigits - lastNonZero.\\\\n\\\\t\\\\t\\\\tself readExponent\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self readScale\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [decimalMultiplier := base raisedTo: numberOfNonZeroFractionDigits.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdecimalFraction := integerPart * decimalMultiplier + fractionPart / decimalMultiplier.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tneg\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [decimalFraction := decimalFraction negated].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^ ScaledDecimal newFromNumber: decimalFraction scale: scale]].\\\\n\\\\t\\\\t\\\\tfractionPart isZero\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [mantissa := integerPart\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t// (base raisedTo: numberOfTrailingZeroInIntegerPart).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\texponent := exponent + numberOfTrailingZeroInIntegerPart]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [mantissa := integerPart\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t* (base raisedTo: numberOfNonZeroFractionDigits) + (fractionPart // (base raisedTo: numberOfTrailingZeroInFractionPart)).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\texponent := exponent - numberOfNonZeroFractionDigits].\\\\n\\\\t\\\\t\\\\t\\\\\\\"very naive algorithm\\\\\\\"\\\\n\\\\t\\\\t\\\\tvalue := self makeFloatFromMantissa: mantissa exponent: exponent base: base.\\\\n\\\\t\\\\t\\\\t^ neg\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [value isZero\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [Float negativeZero]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [value negated]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [value]]\\\\n\\\\t\\\\tifFalse: [self makeIntegerOrScaledInteger]! !\\\\n\\\\n!SqNumberParser methodsFor: 'parsing-public' stamp: 'nice 4/28/2006 01:10'!\\\\nnextUnsignedIntegerBase: aRadix \\\\n\\\\t\\\\\\\"Form an unsigned integer with incoming digits from sourceStream.\\\\n\\\\tCount the number of digits and the lastNonZero digit and store int in\\\\n\\\\tinstVar \\\\\\\"\\\\n\\\\t\\\\n\\\\t^ self\\\\n\\\\t\\\\tnextUnsignedIntegerBase: aRadix\\\\n\\\\t\\\\tifFail: [self expected: 'a digit between 0 and 9']! !\\\\n\\\\n!SqNumberParser methodsFor: 'parsing-public' stamp: 'nice 4/28/2006 03:14'!\\\\nnextUnsignedIntegerBase: aRadix ifFail: errorBlock\\\\n\\\\t\\\\\\\"Form an unsigned integer with incoming digits from sourceStream.\\\\n\\\\tCount the number of digits and the lastNonZero digit and store int in instVar\\\\\\\"\\\\n\\\\t\\\\n\\\\t| value digit |\\\\n\\\\tvalue := 0.\\\\n\\\\tnDigits := 0.\\\\n\\\\tlastNonZero := 0.\\\\n\\\\t[sourceStream atEnd\\\\n\\\\t\\\\tor: [digit := sourceStream next digitValue.\\\\n\\\\t\\\\t\\\\t(digit < 0\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tor: [digit >= aRadix])\\\\n\\\\t\\\\t\\\\t\\\\tand: [sourceStream skip: -1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttrue]]]\\\\n\\\\t\\\\twhileFalse: [nDigits := nDigits + 1.\\\\n\\\\t\\\\t\\\\tdigit isZero\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [lastNonZero := nDigits].\\\\n\\\\t\\\\t\\\\tvalue := value * aRadix + digit].\\\\n\\\\tnDigits = 0\\\\n\\\\t\\\\tifTrue: [errorBlock value].\\\\n\\\\t^value! !\\\\n\\\\n\\\\n!SqNumberParser methodsFor: 'initialize-release' stamp: 'nice 5/1/2006 00:41'!\\\\non: aStringOrStream\\\\n\\\\tsourceStream := aStringOrStream isString\\\\n\\\\t\\\\tifTrue: [ReadStream on: aStringOrStream]\\\\n\\\\t\\\\tifFalse: [aStringOrStream].\\\\n\\\\tbase := 10.\\\\n\\\\tneg := false.\\\\n\\\\tintegerPart := fractionPart := exponent := scale := 0.\\\\n\\\\trequestor := failBlock := nil.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSqNumberParser class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SqNumberParser class methodsFor: 'instance creation' stamp: 'nice 5/1/2006 00:45'!\\\\non: aStringOrStream\\\\n\\\\t^self new on: aStringOrStream! !\\\\n\\\\n!SqNumberParser class methodsFor: 'instance creation' stamp: 'nice 5/1/2006 02:02'!\\\\nparse: aStringOrStream \\\\n\\\\t^(self new)\\\\n\\\\t\\\\ton: aStringOrStream;\\\\n\\\\t\\\\tnextNumber! !\\\\n\\\\n!SqNumberParser class methodsFor: 'instance creation' stamp: 'nice 5/1/2006 02:02'!\\\\nparse: aStringOrStream onError: failBlock \\\\n\\\\t^(self new)\\\\n\\\\t\\\\ton: aStringOrStream;\\\\n\\\\t\\\\tfailBlock: failBlock;\\\\n\\\\t\\\\tnextNumber! !\\\\nClassTestCase subclass: #SqNumberParserTest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'KernelTests-Numbers'!\\\\n!SqNumberParserTest commentStamp: 'nice 5/7/2006 17:54' prior: 0!\\\\nProvide tests for new clas aimed at parsing numbers.\\\\n\\\\nIt duplicates NumberParsingTest, with few more tests.!\\\\n\\\\n\\\\n!SqNumberParserTest methodsFor: 'tests - Float' stamp: 'nice 5/7/2006 17:46'!\\\\ntestFloatFromStreamAsNumber\\\\n\\\\t\\\\\\\"This covers parsing in Number>>readFrom:\\\\\\\"\\\\n\\\\n\\\\t| rs aFloat |\\\\n\\\\trs := '10r-12.3456' readStream.\\\\n\\\\taFloat := SqNumberParser parse: rs.\\\\n\\\\tself assert: -12.3456 = aFloat.\\\\n\\\\tself assert: rs atEnd.\\\\n\\\\n\\\\trs := '10r-12.3456e2' readStream.\\\\n\\\\taFloat := SqNumberParser parse: rs.\\\\n\\\\tself assert: -1234.56 = aFloat.\\\\n\\\\tself assert: rs atEnd.\\\\n\\\\n\\\\trs := '10r-12.3456e2e2' readStream.\\\\n\\\\taFloat := SqNumberParser parse: rs.\\\\n\\\\tself assert: -1234.56 = aFloat.\\\\n\\\\tself assert: rs upToEnd = 'e2'.\\\\n\\\\n\\\\trs := '10r-12.3456d2' readStream.\\\\n\\\\taFloat := SqNumberParser parse: rs.\\\\n\\\\tself assert: -1234.56 = aFloat.\\\\n\\\\tself assert: rs atEnd.\\\\n\\\\n\\\\trs := '10r-12.3456q2' readStream.\\\\n\\\\taFloat := SqNumberParser parse: rs.\\\\n\\\\tself assert: -1234.56 = aFloat.\\\\n\\\\tself assert: rs atEnd.\\\\n\\\\n\\\\trs := '-12.3456q2' readStream.\\\\n\\\\taFloat := SqNumberParser parse: rs.\\\\n\\\\tself assert: -1234.56 = aFloat.\\\\n\\\\tself assert: rs atEnd.\\\\n\\\\n\\\\trs := '12.3456q2' readStream.\\\\n\\\\taFloat := SqNumberParser parse: rs.\\\\n\\\\tself assert: 1234.56 = aFloat.\\\\n\\\\tself assert: rs atEnd.\\\\n\\\\n\\\\trs := '12.3456z2' readStream.\\\\n\\\\taFloat := SqNumberParser parse: rs.\\\\n\\\\tself assert: 12.3456 = aFloat.\\\\n\\\\tself assert: rs upToEnd = 'z2'.\\\\n! !\\\\n\\\\n!SqNumberParserTest methodsFor: 'tests - Float' stamp: 'nice 5/7/2006 17:46'!\\\\ntestFloatFromStreamWithExponent\\\\n\\\\t\\\\\\\"This covers parsing in Number>>readFrom:\\\\\\\"\\\\n\\\\n\\\\t| rs aFloat |\\\\n\\\\trs := '1.0e-14' readStream.\\\\n\\\\taFloat := SqNumberParser parse: rs.\\\\n\\\\tself assert: 1.0e-14 = aFloat.\\\\n\\\\tself assert: rs atEnd.\\\\n\\\\n\\\\trs := '1.0e-14 1' readStream.\\\\n\\\\taFloat := SqNumberParser parse: rs.\\\\n\\\\tself assert: 1.0e-14 = aFloat.\\\\n\\\\tself assert: rs upToEnd = ' 1'.\\\\n\\\\n\\\\trs := '1.0e-14eee' readStream.\\\\n\\\\taFloat := SqNumberParser parse: rs.\\\\n\\\\tself assert: 1.0e-14 = aFloat.\\\\n\\\\tself assert: rs upToEnd = 'eee'.\\\\n\\\\n\\\\trs := '1.0e14e10' readStream.\\\\n\\\\taFloat := SqNumberParser parse: rs.\\\\n\\\\tself assert: 1.0e14 = aFloat.\\\\n\\\\tself assert: rs upToEnd = 'e10'.\\\\n\\\\n\\\\trs := '1.0e+14e' readStream. \\\\\\\"Plus sign is not parseable\\\\\\\"\\\\n\\\\taFloat := SqNumberParser parse: rs.\\\\n\\\\tself assert: 1.0 = aFloat.\\\\n\\\\tself assert: rs upToEnd = 'e+14e'.\\\\n\\\\n\\\\trs := '1.0e' readStream.\\\\n\\\\taFloat := SqNumberParser parse: rs.\\\\n\\\\tself assert: 1.0 = aFloat.\\\\n\\\\tself assert: rs upToEnd = 'e'.! !\\\\n\\\\n!SqNumberParserTest methodsFor: 'tests - Float' stamp: 'nice 5/1/2006 00:40'!\\\\ntestFloatPrintString\\\\n\\\\t\\\\\\\"self debug: #testFloatPrintString\\\\\\\"\\\\n\\\\t\\\\n\\\\t| f r |\\\\n\\\\tf := Float basicNew: 2.\\\\n\\\\tr := Random new seed: 1234567.\\\\n\\\\t100\\\\n\\\\t\\\\ttimesRepeat: [f basicAt: 1 put: (r nextInt: 16r100000000)- 1.\\\\n\\\\t\\\\t\\\\tf basicAt: 2 put: (r nextInt: 16r100000000) - 1.\\\\n\\\\t\\\\t\\\\t#(2 8 10 16)\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:base | | str |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstr := (String new: 64) writeStream.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tf negative ifTrue: [str nextPut: $-].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstr print: base; nextPut: $r.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tf absPrintExactlyOn: str base: base.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself assert: (SqNumberParser parse: str contents) = f]].\\\\n\\\\t\\\\\\\"test big num near infinity\\\\\\\"\\\\n\\\\t10\\\\n\\\\t\\\\ttimesRepeat: [f basicAt: 1 put: 16r7FE00000 + ((r nextInt: 16r100000) - 1).\\\\n\\\\t\\\\t\\\\tf basicAt: 2 put: (r nextInt: 16r100000000) - 1.\\\\n\\\\t\\\\t\\\\t#(2 8 10 16)\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:base | | str |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstr := (String new: 64) writeStream.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tf negative ifTrue: [str nextPut: $-].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstr print: base; nextPut: $r.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tf absPrintExactlyOn: str base: base.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself assert: (SqNumberParser parse: str contents) = f]].\\\\n\\\\t\\\\\\\"test infinitesimal (gradual underflow)\\\\\\\"\\\\n\\\\t10\\\\n\\\\t\\\\ttimesRepeat: [f basicAt: 1 put: 0 + ((r nextInt: 16r100000) - 1).\\\\n\\\\t\\\\t\\\\tf basicAt: 2 put: (r nextInt: 16r100000000) - 1.\\\\n\\\\t\\\\t\\\\t#(2 8 10 16)\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:base | | str |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstr := (String new: 64) writeStream.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tf negative ifTrue: [str nextPut: $-].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstr print: base; nextPut: $r.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tf absPrintExactlyOn: str base: base.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself assert: (SqNumberParser parse: str contents) = f]].! !\\\\n\\\\n!SqNumberParserTest methodsFor: 'tests - Float' stamp: 'nice 5/1/2006 00:40'!\\\\ntestFloatReadError\\\\n\\\\t\\\\\\\"This covers parsing in Number>>readFrom:\\\\\\\"\\\\n\\\\n\\\\t| rs num |\\\\n\\\\trs := '1e' readStream.\\\\n\\\\tnum := SqNumberParser parse: rs.\\\\n\\\\tself assert: 1 = num.\\\\n\\\\tself assert: rs upToEnd = 'e'.\\\\n\\\\t\\\\n\\\\trs := '1s' readStream.\\\\n\\\\tnum := SqNumberParser parse: rs.\\\\n\\\\tself assert: 1 = num.\\\\n\\\\tself assert: rs upToEnd = 's'.\\\\n\\\\n\\\\trs := '1.' readStream.\\\\n\\\\tnum := SqNumberParser parse: rs.\\\\n\\\\tself assert: 1 = num.\\\\n\\\\tself assert: num isInteger.\\\\n\\\\tself assert: rs upToEnd = '.'.\\\\n\\\\t\\\\n\\\\trs := '' readStream.\\\\n\\\\tself should: [SqNumberParser parse: rs] raise: Error.\\\\n\\\\t\\\\n\\\\trs := 'foo' readStream.\\\\n\\\\tself should: [SqNumberParser parse: rs] raise: Error.\\\\n\\\\n\\\\trs := 'radix' readStream.\\\\n\\\\tself should: [SqNumberParser parse: rs] raise: Error.\\\\n\\\\t\\\\n\\\\trs := '.e0' readStream.\\\\n\\\\tself should: [SqNumberParser parse: rs] raise: Error.\\\\n\\\\t\\\\n\\\\trs := '-.e0' readStream.\\\\n\\\\tself should: [SqNumberParser parse: rs] raise: Error.\\\\n\\\\t\\\\n\\\\trs := '--1' readStream.\\\\n\\\\tself should: [SqNumberParser parse: rs] raise: Error.! !\\\\n\\\\n!SqNumberParserTest methodsFor: 'tests - Float' stamp: 'nice 5/7/2006 17:46'!\\\\ntestFloatReadWithRadix\\\\n\\\\t\\\\\\\"This covers parsing in Number>>readFrom:\\\\n\\\\tNote: In most Smalltalk dialects, the radix notation is not used for numbers\\\\n\\\\twith exponents. In Squeak, a string with radix and exponent can be parsed,\\\\n\\\\tand the exponent is always treated as base 10 (not the base indicated in the\\\\n\\\\tradix prefix). I am not sure if this is a feature, a bug, or both, but the\\\\n\\\\tSqueak behavior is documented in this test. -dtl\\\\\\\"\\\\n\\\\n\\\\t| aNumber rs |\\\\n\\\\taNumber := '2r1.0101e9' asNumber.\\\\n\\\\tself assert: 672.0 = aNumber.\\\\n\\\\tself assert: (SqNumberParser parse: '2r1.0101e9') = (1.3125 * (2 raisedTo: 9)).\\\\n\\\\trs := ReadStream on: '2r1.0101e9e9'.\\\\n\\\\tself assert: (SqNumberParser parse: rs) = 672.0.\\\\n\\\\tself assert: rs upToEnd = 'e9'\\\\n! !\\\\n\\\\n\\\\n!SqNumberParserTest methodsFor: 'tests - Integer' stamp: 'nice 5/7/2006 17:46'!\\\\ntestIntegerReadFrom\\\\n\\\\t\\\\\\\"Ensure remaining characters in a stream are not lost when parsing an integer.\\\\\\\"\\\\n\\\\n\\\\t| rs i s |\\\\n\\\\trs := ReadStream on: '123s could be confused with a ScaledDecimal'.\\\\n\\\\ti := SqNumberParser parse: rs.\\\\n\\\\tself assert: i == 123.\\\\n\\\\ts := rs upToEnd.\\\\n\\\\tself assert: 's could be confused with a ScaledDecimal' = s.\\\\n\\\\trs := ReadStream on: '123.s could be confused with a ScaledDecimal'.\\\\n\\\\ti := SqNumberParser parse: rs.\\\\n\\\\tself assert: i == 123.\\\\n\\\\ts := rs upToEnd.\\\\n\\\\tself assert: '.s could be confused with a ScaledDecimal' = s\\\\n! !\\\\n\\\\n!SqNumberParserTest methodsFor: 'tests - Integer' stamp: 'nice 5/7/2006 17:46'!\\\\ntestIntegerReadWithRadix\\\\n\\\\t\\\\\\\"This covers parsing in Number>>readFrom:\\\\n\\\\tNote: In most Smalltalk dialects, the radix notation is not used for numbers\\\\n\\\\twith exponents. In Squeak, a string with radix and exponent can be parsed,\\\\n\\\\tand the exponent is always treated as base 10 (not the base indicated in the\\\\n\\\\tradix prefix). I am not sure if this is a feature, a bug, or both, but the\\\\n\\\\tSqueak behavior is documented in this test. -dtl\\\\\\\"\\\\n\\\\n\\\\t| aNumber rs |\\\\n\\\\taNumber := '2r1e26' asNumber.\\\\n\\\\tself assert: 67108864 = aNumber.\\\\n\\\\tself assert: (SqNumberParser parse: '2r1e26') = (2 raisedTo: 26).\\\\n\\\\trs := '2r1e26eee' readStream.\\\\n\\\\tself assert: (SqNumberParser parse: rs) = 67108864.\\\\n\\\\tself assert: rs upToEnd = 'eee'\\\\n! !\\\\nObject subclass: #SqueakPage\\\\n\\\\tinstanceVariableNames: 'url title comment thumbnail contentsMorph creationTime creationAuthor lastChangeTime lastChangeAuthor policy dirty'\\\\n\\\\tclassVariableNames: 'MaxThumbnailWidthOrHeight RecentMaxNum RecentStem'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-SqueakPage'!\\\\n!SqueakPage commentStamp: '<historical>' prior: 0!\\\\nA SqueakPage is holder for a page of morphs that live on the disk or on a server.\\\\nA URLMorph is a thumbnail sized stand-in for the page.  Clicking on it gets the page.\\\\nAn ObjectOut is a fake object that stands for an object that is out on the disk.  (Like ObjectTracer or ObjectViewer.)\\\\nA MorphObjectOut is a subclass that stands for a Morph that is out on the disk.\\\\n\\\\nTo find out how to make the pages of any BookMorph go out to the disk (or a server), see \\\\thttp://minnow.cc.gatech.edu/SqueakDoc.1 then go to 'SqueakPages'.\\\\n\\\\nA SqueakPage is always in-memory.  Its contentsMorph will be 'become-ed' to a MorphObjectOut tombstone when it goes out.  (A page may or may not be in the cache.  First put it in, then ask it for the data.)  Sending any message to the contentsMorph triggers the fetch.  Many URLMorphs may hold onto one page.  A page has a thumbnail.  A URLMorph points at its page object.\\\\n\\\\nStates of a SqueakPage, and the transitions to another state:\\\\n1) have a url as a string.  Then: (URLMorph grabURL: 'file://Ted''s/books/tryThis/p1').  \\\\n\\\\tDrop it into any morph.\\\\n2) have a URLMorph, with page==nil.     Click it.  (makes an empty page, installs \\\\n\\\\tit in the global page cache)\\\\n3) have a URLMorph with a SqueakPage, with contentsMorph==nil, \\\\n\\\\tbut page is not in the cache (this is a rare case).  ask page contentsMorph.\\\\n4) OUT: have a URLMorph with a SqueakPage, with contentsMorph being a MorphObjectOut, \\\\n\\\\tand its page is in the cache.  Sending the contentsMorph any message brings it in and\\\\n\\\\tbecomes it to the morph.  (fix up morph's pointer to the page.)\\\\n5) Totally IN:  a morph, owned by a SqueakPage, has a page in the cache.  \\\\n\\\\tThe morph is clean.   \\\\n\\\\tWhenever someone triggers a purge (when?), contentsMorph is becomed\\\\n\\\\tto a MorphObjectOut. (go to 4)\\\\n\\\\tCausing the morph to execute layoutChanged marks the morph as dirty.\\\\n\\\\t(morph's property #pageDirty is set to true) (go to 6)\\\\n6) Totally IN and dirty.  \\\\n\\\\tWhenever any other page is fetched from the disk or the net, all other \\\\n\\\\tdirty pages are written and marked clean.  (go to 5)\\\\n\\\\nNote that the entire tree of submorphs goes out -- hundreds of objects.  Bringing the object back in brings in the SqueakPage, installs it in the cache.  Classes other than PasteUpMorph can easily be made to send their contents out if there is any need.\\\\n\\\\nNote that every book is now automatically a WebBook.  We simply give a page a url and tell it to purge.\\\\n\\\\nurl\\\\t\\\\ta string\\\\ntitle\\\\t\\\\t\\\\ncomment\\\\t\\\\t\\\\nthumbnail\\\\t\\\\t\\\\ncontentsMorph\\\\t\\\\t(1) a pasteUpMorph with other morphs in it.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(2) a MorphObjectOut.  Sending any message brings it in. \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(3) nil if the page has never been in this image.\\\\ncreationTime\\\\t\\\\t\\\\ncreationAuthor\\\\t\\\\t\\\\nlastChangeTime\\\\t\\\\t\\\\nlastChangeAuthor \\\\npolicy\\\\t\\\\t#alwaysWrite, #neverWrite, #ask.  (cache can override with a global policy)\\\\n\\\\t\\\\t\\\\t(Explicit writing by user has policy #neverWrite)\\\\ndirty \\\\t\\\\t(Morph>>layoutChanged sends changed: #SqueakPage. If policy==#check, \\\\n\\\\t\\\\t\\\\t\\\\tthen the page sets dirty_true.)\\\\n\\\\t\\\\t\\\\t(If policy==#alwaysWrite, then set dirty when the page is retrieved from the cache.)\\\\n\\\\nClass MorphObjectOut has an instance variable called page.\\\\nAll messages to an MorphObjectOut cause it to be brought in.  Except the messages needed to write the MorphObjectOut on the disk as part of a parent's being sent out.  (size, class, instSize, instVar:at:.  Can rename these and call from its own version of the writing routine.)\\\\n\\\\tTo purge, go through the clean pages, and any that have world not equal to this world, entomb them.  \\\\n\\\\t(If an object in the subtree is held by an object outside the tree, it will remain,  And will be duplicated when the tree comes back in.  This is a problem already in normal uses of SmartRefStream.)\\\\n\\\\n\\\\n!\\\\n\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'tk 2/5/1999 16:47'!\\\\nasMorph\\\\n\\\\t^ self fetchContents! !\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'jm 6/16/1998 13:47'!\\\\ncomment\\\\n\\\\n\\\\tcomment ifNil: [^ ''] ifNotNil: [^ comment].\\\\n! !\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'jm 6/16/1998 18:12'!\\\\ncomment: aString\\\\n\\\\n\\\\taString isEmpty\\\\n\\\\t\\\\tifTrue: [comment _ nil]\\\\n\\\\t\\\\tifFalse: [comment _ aString].\\\\n! !\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'tk 10/2/1998 11:27'!\\\\ncontentsMorph\\\\n\\\\t\\\\\\\"Return what it is now.  If the morph is out on the disk, return nil.  Use fetchContents to get the data for sure.\\\\\\\"\\\\n\\\\n\\\\t^ contentsMorph\\\\n! !\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'tk 11/11/1998 12:54'!\\\\ncontentsMorph: aPasteUpMorph\\\\n\\\\n\\\\tcontentsMorph _ aPasteUpMorph! !\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'tk 2/23/1999 14:39'!\\\\ncopyForSaving\\\\n\\\\t\\\\\\\"Make a copy and configure me to be put out on the disk.  When it is brought in and touched, it will turn into the object at the url.\\\\\\\"\\\\n\\\\n\\\\t| forDisk holder |\\\\n\\\\tforDisk _ self clone.\\\\n\\\\tholder _ MorphObjectOut new xxxSetUrl: url page: forDisk.\\\\n\\\\tforDisk contentsMorph: holder.\\\\n\\\\t^ holder\\\\t\\\\t\\\\\\\"directly representing the object\\\\\\\"! !\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'tk 10/30/1998 15:08'!\\\\nfetchContents\\\\n\\\\t\\\\\\\"Make every effort to get contentsMorph.\\\\\\\"\\\\n\\\\n\\\\tself isContentsInMemory ifTrue: [^ contentsMorph].\\\\n\\\\t^ self fetchInformIfError! !\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'ar 4/10/2005 18:52'!\\\\nfetchContentsIfAbsent: failBlock\\\\n\\\\t\\\\\\\"Make every effort to get contentsMorph.  Assume I am in the cache already.\\\\\\\"\\\\n\\\\t| strm page temp temp2 |\\\\n\\\\tSqueakPageCache write.\\\\t\\\\t\\\\\\\"sorry about the pause\\\\\\\"\\\\n\\\\tCursor wait showWhile: [\\\\n\\\\t\\\\tstrm _ (ServerFile new fullPath: url) asStream].\\\\n\\\\tstrm isString ifTrue: [^ failBlock value].\\\\t\\\\t\\\\n\\\\tpage _ strm fileInObjectAndCode.\\\\n\\\\tpage isMorph ifTrue: [contentsMorph _ page].\\\\t\\\\\\\"may be a bare morph\\\\\\\"\\\\n\\\\t\\\\\\\"copy over the state\\\\\\\"\\\\n\\\\ttemp _ url.\\\\n\\\\ttemp2 _ policy.\\\\n\\\\tself copyAddedStateFrom: page.\\\\n\\\\turl _ temp.\\\\t\\\\\\\"don't care what it says\\\\\\\"\\\\n\\\\ttemp2 ifNotNil: [policy _ temp2].\\\\t\\\\t\\\\\\\"use mine\\\\\\\"\\\\n\\\\tcontentsMorph setProperty: #pageDirty toValue: nil.\\\\n\\\\tself dirty: false.\\\\n\\\\t^ contentsMorph! !\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'ar 4/10/2005 18:52'!\\\\nfetchInformIfError\\\\n\\\\t\\\\\\\"Make every effort to get contentsMorph.  Put up a good notice if can't get it.  Assume page is in the cache already.  Overwrite the contentsMorph no matter what.\\\\\\\"\\\\n\\\\t| strm page temp temp2 |\\\\n\\\\n\\\\tSqueakPageCache write.\\\\t\\\\t\\\\\\\"sorry about the pause\\\\\\\"\\\\n\\\\tCursor wait showWhile: [\\\\n\\\\t\\\\tstrm _ (ServerFile new fullPath: url) asStream].\\\\n\\\\tstrm isString ifTrue: [self inform: 'Sorry, ',strm. ^ nil].\\\\t\\\\\\\"<<<<< Note Diff\\\\\\\"\\\\n\\\\t(url beginsWith: 'file:') ifTrue: [Transcript show: 'Fetching  ', url; cr].\\\\t\\\\n\\\\tpage _ strm fileInObjectAndCode.\\\\n\\\\tpage isMorph \\\\n\\\\t\\\\tifTrue: [contentsMorph _ page]\\\\t\\\\\\\"may be a bare morph\\\\\\\"\\\\n\\\\t\\\\tifFalse: [\\\\\\\"copy over the state\\\\\\\"\\\\n\\\\t\\\\t\\\\ttemp _ url.\\\\n\\\\t\\\\t\\\\ttemp2 _ policy.\\\\n\\\\t\\\\t\\\\tself copyFrom: page.\\\\t\\\\\\\"including contentsMorph\\\\\\\"\\\\n\\\\t\\\\t\\\\turl _ temp.\\\\t\\\\\\\"I know best!!\\\\\\\"\\\\n\\\\t\\\\t\\\\ttemp2 ifNotNil: [policy _ temp2]].\\\\t\\\\t\\\\\\\"use mine\\\\\\\"\\\\n\\\\tcontentsMorph setProperty: #pageDirty toValue: nil.\\\\n\\\\tcontentsMorph setProperty: #SqueakPage toValue: self.\\\\n\\\\tself dirty: false.\\\\n\\\\t^ contentsMorph! !\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'tk 10/30/1998 15:08'!\\\\nisContentsInMemory\\\\n\\\\t\\\\\\\"Is my contentsMorph in memory, or is it an ObjectOut tombstone?  Be careful not to send it any message.\\\\\\\"\\\\n\\\\n\\\\t^ (contentsMorph xxxClass inheritsFrom: Object) and: [(contentsMorph == nil) not]! !\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'tk 12/4/1998 01:00'!\\\\nlastChangeTime\\\\n\\\\t^ lastChangeTime! !\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'tk 2/24/1999 12:06'!\\\\nsaveMorph: aMorph author: authorString\\\\n\\\\t\\\\\\\"Save the given morph as this page's contents. Update its thumbnail and inform references to this URL that the page has changed.\\\\\\\"\\\\n\\\\t\\\\\\\"Details: updateThumbnail releases the cached state of the saved page contents after computing the thumbnail.\\\\\\\"\\\\n\\\\n\\\\t| n |\\\\n\\\\tcontentsMorph _ aMorph.\\\\n\\\\tn _ aMorph knownName.\\\\n\\\\tn ifNotNil: [self title: n].\\\\n\\\\tcreationAuthor ifNil: [\\\\n\\\\t\\\\tcreationAuthor _ authorString.\\\\n\\\\t\\\\tcreationTime _ Time totalSeconds].\\\\n\\\\\\\"\\\\tlastChangeAuthor _ authorString.\\\\n\\\\tlastChangeTime _ Time totalSeconds.\\\\tdo it when actually write\\\\\\\"\\\\n\\\\tself computeThumbnail.\\\\n\\\\tself postChangeNotification.\\\\n! !\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'jm 6/16/1998 17:45'!\\\\nthumbnail\\\\n\\\\n\\\\t^ thumbnail\\\\n! !\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'jm 6/16/1998 13:47'!\\\\ntitle\\\\n\\\\n\\\\ttitle ifNil: [^ ''] ifNotNil: [^ title].\\\\n! !\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'jm 6/16/1998 18:12'!\\\\ntitle: aString\\\\n\\\\n\\\\taString isEmpty\\\\n\\\\t\\\\tifTrue: [title _ nil]\\\\n\\\\t\\\\tifFalse: [title _ aString].\\\\n! !\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'tk 11/4/1998 20:34'!\\\\nurl\\\\n\\\\n\\\\t^ url! !\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'tk 1/14/1999 23:50'!\\\\nurl: aString\\\\n\\\\n\\\\t| sd |\\\\n\\\\taString isEmpty ifTrue: [url _ nil. ^ self].\\\\n\\\\n\\\\t\\\\\\\"Expand ./ and store as an absolute url\\\\\\\"\\\\n\\\\tsd _ ServerFile new.\\\\n\\\\tsd fullPath: aString.\\\\n\\\\turl _ sd realUrl.! !\\\\n\\\\n\\\\n!SqueakPage methodsFor: 'saving' stamp: 'tk 9/30/1998 22:40'!\\\\ndirty: aBool\\\\n\\\\tdirty _ aBool! !\\\\n\\\\n!SqueakPage methodsFor: 'saving' stamp: 'tk 10/8/1998 13:18'!\\\\npolicy\\\\n\\\\t^ policy! !\\\\n\\\\n!SqueakPage methodsFor: 'saving' stamp: 'tk 9/30/1998 22:39'!\\\\npolicy: aSymbol\\\\n\\\\tpolicy _ aSymbol! !\\\\n\\\\n!SqueakPage methodsFor: 'saving' stamp: 'ar 3/17/2001 23:36'!\\\\nprePurge\\\\n\\\\t\\\\\\\"Return self if ready to be purged, or nil if not\\\\\\\"\\\\n\\\\n\\\\tself isContentsInMemory ifFalse: [^ nil].\\\\n\\\\tcontentsMorph ifNil: [^ nil].  \\\\\\\"out already\\\\\\\"\\\\n\\\\turl ifNil: [^ nil].\\\\t\\\\\\\"just to be safe\\\\\\\"\\\\n\\\\t^ (World ~~ nil and: [contentsMorph world == World]) \\\\n\\\\t\\\\tifTrue: [nil \\\\\\\"showing now\\\\\\\"] ifFalse: [self]! !\\\\n\\\\n!SqueakPage methodsFor: 'saving' stamp: 'tk 12/16/1998 08:24'!\\\\npurge\\\\n\\\\t\\\\\\\"Replace my morph with a tombstone, if I am not in a world that is being shown.\\\\\\\"\\\\n\\\\n\\\\t(self prePurge) ifNotNil: [\\\\n\\\\t\\\\tcontentsMorph become: (MorphObjectOut new xxxSetUrl: url page: self)].\\\\n\\\\t\\\\t\\\\\\\"Simple, isn't it!!\\\\\\\"! !\\\\n\\\\n!SqueakPage methodsFor: 'saving' stamp: 'tk 1/23/1999 13:19'!\\\\nurlNoOverwrite: suggested\\\\n\\\\t\\\\\\\"Look in the directory.  If there is a file of this name, create a new name.  Keep track of highest numbers used as a hint.\\\\\\\"\\\\n\\\\n\\\\t| dir ll stem num local trial suffix |\\\\n\\\\t(suggested endsWith: '.sp') ifTrue: [suffix _ '.sp'].\\\\n\\\\t(suggested endsWith: '.bo') ifTrue: [suffix _ '.bo'].\\\\n\\\\tsuffix ifNil: [self error: 'unknown suffix'].\\\\n\\\\tdir _ ServerFile new fullPath: suggested.\\\\n\\\\t(dir includesKey: dir fileName) ifFalse: [^ url _ suggested].\\\\n\\\\t\\\\\\\"File already exists!!  Create a new name\\\\\\\"\\\\n\\\\t\\\\\\\"Find the stem file name\\\\\\\"\\\\n\\\\tstem _ SqueakPage stemUrl: suggested.\\\\n\\\\tnum _ stem = RecentStem ifTrue: [RecentMaxNum+1] ifFalse: [1].\\\\n\\\\n\\\\tlocal _ dir fileName.\\\\t\\\\\\\"ugh, take stem again...\\\\\\\"\\\\n\\\\tll _ local findLast: [:char | char == $.].\\\\n\\\\tll = 0 ifFalse: [local _ local copyFrom: 1 to: ll-1].\\\\t\\\\\\\"remove .sp\\\\\\\"\\\\n\\\\tlocal _ (local splitInteger) at: 1.\\\\t\\\\t\\\\\\\"remove trailing number\\\\\\\"\\\\n\\\\tlocal last == $x ifFalse: [local _ local , 'x'].\\\\n\\\\t[trial _ local, num printString, suffix.\\\\n\\\\t\\\\tdir includesKey: trial] whileTrue: [num _ num + 1].\\\\n\\\\tRecentStem _ stem.  RecentMaxNum _ num.\\\\n\\\\t^ url _ stem, 'x', num printString, suffix! !\\\\n\\\\n!SqueakPage methodsFor: 'saving' stamp: 'RAA 8/30/2000 11:43'!\\\\nwrite\\\\n\\\\t\\\\\\\"Decide whether to write this page on the disk.\\\\\\\"\\\\n\\\\t| sf remoteFile |\\\\n\\\\tpolicy == #neverWrite ifTrue: [^ self].\\\\n\\\\t\\\\t\\\\\\\"demo mode, or write only when user explicitly orders it\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"All other policies do write:   #now\\\\\\\"\\\\n\\\\tcontentsMorph ifNil: [^ self].\\\\n\\\\tdirty _ dirty | ((contentsMorph valueOfProperty: #pageDirty) == true).\\\\n\\\\t\\\\t\\\\\\\"set by layoutChanged\\\\\\\"\\\\n\\\\tdirty == true ifTrue: [ \\\\n\\\\t\\\\tsf _ ServerDirectory new fullPath: url.\\\\n\\\\t\\\\t\\\\\\\"check for shared password\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"contentsMorph allMorphsDo: [:m | m prepareToBeSaved].\\\\n\\\\t\\\\t\\\\t\\\\tdone in objectToStoreOnDataStream\\\\\\\"\\\\n\\\\t\\\\tlastChangeAuthor _ Utilities authorInitialsPerSe ifNil: ['*'].\\\\n\\\\t\\\\tlastChangeTime _ Time totalSeconds.\\\\n\\\\t\\\\tCursor wait showWhile: [\\\\n\\\\t\\\\t\\\\tremoteFile _ sf fileNamed: url.\\\\t\\\\\\\"no notification when overwriting\\\\\\\"\\\\n\\\\t\\\\t\\\\tremoteFile dataIsValid.\\\\n\\\\t\\\\t\\\\tremoteFile fileOutClass: nil andObject: self.\\\\n\\\\t\\\\t\\\\t\\\\\\\"remoteFile close\\\\\\\"].\\\\n\\\\t\\\\tcontentsMorph setProperty: #pageDirty toValue: nil.\\\\n\\\\t\\\\tdirty _ false].! !\\\\n\\\\n\\\\n!SqueakPage methodsFor: 'private' stamp: 'tk 2/25/1999 09:13'!\\\\ncomputeThumbnail\\\\n\\\\t\\\\\\\"Make a thumbnail from my morph.\\\\\\\"\\\\n\\\\n\\\\t(contentsMorph isKindOf: PasteUpMorph) \\\\n\\\\t\\\\tifTrue: [thumbnail _ contentsMorph smallThumbnailForPageSorter]\\\\n\\\\t\\\\tifFalse: [self updateThumbnail]! !\\\\n\\\\n!SqueakPage methodsFor: 'private' stamp: 'tk 6/24/1999 11:42'!\\\\npostChangeNotification\\\\n\\\\t\\\\\\\"Inform all thumbnails and books that this page has been updated.\\\\\\\"\\\\n\\\\n\\\\tURLMorph allSubInstancesDo: [:m | m pageHasChanged: self].\\\\n! !\\\\n\\\\n!SqueakPage methodsFor: 'private' stamp: 'jm 6/18/1998 11:31'!\\\\nupdateThumbnail\\\\n\\\\t\\\\\\\"Update my thumbnail from my morph.\\\\\\\"\\\\n\\\\n\\\\t| f scale scaleX scaleY shrunkF |\\\\n\\\\tcontentsMorph ifNil: [thumbnail _ nil. ^ self].\\\\n\\\\tf _ contentsMorph imageForm.\\\\n\\\\tscaleX _ MaxThumbnailWidthOrHeight asFloat / f height.\\\\n\\\\tscaleY _ MaxThumbnailWidthOrHeight asFloat/ f width.\\\\n\\\\tscale _ scaleX min: scaleY.  \\\\\\\"choose scale that maintains aspect ratio\\\\\\\"\\\\n\\\\tshrunkF _ (f magnify: f boundingBox by: scale@scale smoothing: 2).\\\\n\\\\tthumbnail _ Form extent: shrunkF extent depth: 8.  \\\\\\\"force depth to be 8\\\\\\\"\\\\n\\\\tshrunkF displayOn: thumbnail.\\\\n\\\\tcontentsMorph allMorphsDo: [:m | m releaseCachedState].\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSqueakPage class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SqueakPage class methodsFor: 'as yet unclassified' stamp: 'jm 6/18/1998 11:15'!\\\\ninitialize\\\\n\\\\t\\\\\\\"SqueakPage initialize\\\\\\\"\\\\n\\\\n\\\\tMaxThumbnailWidthOrHeight _ 60.\\\\n! !\\\\n\\\\n!SqueakPage class methodsFor: 'as yet unclassified' stamp: 'sw 7/6/1998 11:49'!\\\\nnewURLAndPageFor: aMorph\\\\n\\\\t\\\\\\\"Create a new SqueakPage whose contents is the given morph. Assign a URL for that page, record it in the page cache, and answer its URL.\\\\\\\"\\\\n\\\\n\\\\t| pg newURL stamp |\\\\n\\\\tpg _ self new.\\\\n\\\\tstamp _ Utilities authorInitialsPerSe ifNil: ['*'].\\\\n\\\\tpg saveMorph: aMorph author: stamp.\\\\n\\\\tnewURL _ SqueakPageCache generateURL.\\\\n\\\\tSqueakPageCache atURL: newURL put: pg.\\\\n\\\\t^ newURL \\\\n! !\\\\n\\\\n!SqueakPage class methodsFor: 'as yet unclassified' stamp: 'tk 1/15/1999 08:13'!\\\\nstemUrl: aUrlString\\\\n\\\\t\\\\\\\"Peel off the 'x5.sp'  or '.bo' from the end of a url of a SqueakPage or a BookMorph index file\\\\\\\"\\\\n\\\\n\\\\t| ll aUrl |\\\\n\\\\tll _ aUrlString findLast: [:char | char == $.].\\\\n\\\\tll = 0 \\\\n\\\\t\\\\tifTrue: [aUrl _ aUrlString]\\\\n\\\\t\\\\tifFalse: [aUrl _ aUrlString copyFrom: 1 to: ll-1].\\\\t\\\\\\\"remove .sp\\\\\\\"\\\\n\\\\taUrl _ (aUrl stemAndNumericSuffix) at: 1.\\\\n\\\\t\\\\t\\\\t\\\\\\\"remove trailing number\\\\\\\"\\\\n\\\\taUrl size = 0 ifTrue: [^ aUrl].\\\\t\\\\\\\"empty\\\\\\\"\\\\n\\\\t[aUrl last == $x] whileTrue: [aUrl _ aUrl allButLast].\\\\n\\\\t^ aUrl! !\\\\nObject subclass: #SqueakPageCache\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: 'GlobalPolicy PageCache'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-SqueakPage'!\\\\n!SqueakPageCache commentStamp: '<historical>' prior: 0!\\\\nA global cache of web pages known to this Squeak image.  Since there is a single, global page cache, it is implemented entirely as class methods.\\\\n\\\\nOnce a page has an entry, keep it.  (url string -> A SqueakPage)  The SqueakPage has a thumbnail and other info, but may not have the contentsMorph.  The morph is purged when space is needed, and fetched from the server as needed.\\\\n\\\\nSee SqueakPage's comment for the stages of in/out.!\\\\n\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSqueakPageCache class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SqueakPageCache class methodsFor: 'cache access' stamp: 'jm 6/25/1998 11:06'!\\\\nallURLs\\\\n\\\\t\\\\\\\"Answer a collection of URLs for all pages in the cache.\\\\\\\"\\\\n\\\\n\\\\t^ PageCache keys\\\\n\\\\n! !\\\\n\\\\n!SqueakPageCache class methodsFor: 'cache access' stamp: 'tk 10/2/1998 12:07'!\\\\natURL: aURLString\\\\n\\\\t\\\\\\\"Answer the page corresponding to this URL. Evaluate the given block if there is no entry for the given URL.\\\\\\\"\\\\n\\\\n\\\\t| pg |\\\\n\\\\t^ PageCache at: aURLString ifAbsent: [\\\\n\\\\t\\\\tpg _ SqueakPage new.\\\\n\\\\t\\\\t\\\\\\\"stamp _ Utilities authorInitialsPerSe ifNil: ['*'].\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"pg author: stamp.\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"Need to deal with inst vars if we turn out to be new!!\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"pg url: aURLString. \\\\tdone by atURL:put:\\\\\\\"\\\\n\\\\t\\\\tself atURL: aURLString put: pg.\\\\n\\\\t\\\\tpg]\\\\n! !\\\\n\\\\n!SqueakPageCache class methodsFor: 'cache access' stamp: 'tk 10/2/1998 12:06'!\\\\natURL: aURLString ifAbsent: failBlock\\\\n\\\\t\\\\\\\"Answer the page corresponding to this URL. Evaluate the given block if there is no entry for the given URL.\\\\\\\"\\\\n\\\\n\\\\tself halt.  \\\\\\\"use atURL:\\\\\\\"\\\\n! !\\\\n\\\\n!SqueakPageCache class methodsFor: 'cache access' stamp: 'tk 10/20/1998 15:51'!\\\\natURL: aURLString oldPage: aPage\\\\n\\\\t\\\\\\\"Bring in page and return the object.  First try looking up my url in the pageCache.  Then try the page (and install it, under its url).  Then start from scratch with the url.\\\\\\\"\\\\n\\\\n\\\\t| myPage |\\\\n\\\\t(myPage _ PageCache at: aURLString ifAbsent: [nil]) ifNotNil: [\\\\n\\\\t\\\\t^ myPage].\\\\n\\\\taPage url: aURLString.\\\\t\\\\\\\"for consistancy\\\\\\\"\\\\n\\\\tPageCache at: aPage url put: aPage.\\\\n\\\\t^ aPage! !\\\\n\\\\n!SqueakPageCache class methodsFor: 'cache access' stamp: 'tk 12/8/1998 21:51'!\\\\natURL: aURLString put: aSqueakPage\\\\n\\\\t\\\\\\\"Store the given page in the cache entry for the given URL.\\\\\\\"\\\\n\\\\n\\\\taSqueakPage url: aURLString.\\\\n\\\\taSqueakPage contentsMorph isInMemory ifTrue: [\\\\n\\\\t\\\\taSqueakPage contentsMorph ifNotNil: [\\\\n\\\\t\\\\t\\\\taSqueakPage contentsMorph setProperty: #SqueakPage \\\\n\\\\t\\\\t\\\\t\\\\ttoValue: aSqueakPage]].\\\\n\\\\tPageCache at: aURLString put: aSqueakPage.\\\\n! !\\\\n\\\\n!SqueakPageCache class methodsFor: 'cache access' stamp: 'tk 10/30/1998 15:08'!\\\\ndoPagesInMemory: aBlock\\\\n\\\\t\\\\\\\"Evaluate aBlock for each page whose contentsMorph is in-memory.  Don't add or remove pages while in this loop.\\\\\\\"\\\\n\\\\n\\\\tPageCache do: [:sqkPage |\\\\n\\\\t\\\\tsqkPage isContentsInMemory ifTrue: [aBlock value: sqkPage]].! !\\\\n\\\\n!SqueakPageCache class methodsFor: 'cache access' stamp: 'tk 11/24/1998 14:52'!\\\\ngenerateURL\\\\n\\\\t\\\\\\\"Generate an unused URL for an in-memory page.\\\\\\\"\\\\n\\\\t\\\\\\\"SqueakPageCache generateURL\\\\\\\"\\\\n\\\\n\\\\t| sd |\\\\n\\\\tsd _ ServerFile new on: 'file:./'.\\\\n\\\\tsd fileName: 'page1.sp'.\\\\n\\\\t^ SqueakPage new urlNoOverwrite: sd pathForFile\\\\n! !\\\\n\\\\n!SqueakPageCache class methodsFor: 'cache access' stamp: 'tk 10/1/1998 13:02'!\\\\nincludesMorph: aPasteUp\\\\n\\\\n\\\\tPageCache do: [:squeakPage |\\\\n\\\\t\\\\tsqueakPage contentsMorph == aPasteUp ifTrue: [^ true]].\\\\n\\\\t^ false! !\\\\n\\\\n!SqueakPageCache class methodsFor: 'cache access' stamp: 'tk 10/20/1998 15:11'!\\\\npageCache\\\\n\\\\n\\\\t^ PageCache! !\\\\n\\\\n!SqueakPageCache class methodsFor: 'cache access' stamp: 'tk 10/1/1998 13:04'!\\\\npageForMorph: aPasteUp\\\\n\\\\n\\\\tPageCache do: [:squeakPage |\\\\n\\\\t\\\\tsqueakPage contentsMorph == aPasteUp ifTrue: [^ squeakPage]].\\\\n\\\\t^ nil! !\\\\n\\\\n!SqueakPageCache class methodsFor: 'cache access' stamp: 'tk 12/16/1998 08:30'!\\\\npurge\\\\n\\\\t\\\\\\\"Replace morphs with tombstones in all pages that are clean and not being shown.  Write any dirty ones first, if allowed to.\\\\\\\"\\\\n\\\\n\\\\t| list |\\\\n\\\\tlist _ OrderedCollection new.\\\\n\\\\tGlobalPolicy == #neverWrite \\\\n\\\\t\\\\tifTrue: [PageCache doPagesInMemory: [:aPage | list add: aPage prePurge]]\\\\n\\\\t\\\\t\\\\t\\\\\\\"Writing only done by user's command\\\\\\\"\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\tPageCache doPagesInMemory: [:aPage | aPage write\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t list add: aPage prePurge]].\\\\n\\\\tlist _ list select: [:each | each notNil].\\\\n\\\\t\\\\\\\"do bulk become:\\\\\\\"\\\\n\\\\t(list collect: [:each | each contentsMorph])\\\\n\\\\t\\\\telementsExchangeIdentityWith:\\\\n\\\\t\\\\t\\\\t(list collect: [:pg | MorphObjectOut new xxxSetUrl: pg url page: pg])\\\\n! !\\\\n\\\\n!SqueakPageCache class methodsFor: 'cache access' stamp: 'tk 10/21/1998 13:28'!\\\\npurge: megs\\\\n\\\\t\\\\\\\"Replace morphs with tombstones in all pages that are clean and not being shown.  Do this until megs of new memory have been recovered.  Write any dirty ones first, if allowed to.\\\\\\\"\\\\n\\\\n\\\\t| goal |\\\\n\\\\tgoal _ Smalltalk garbageCollect + (megs * 1000000) asInteger.\\\\n\\\\tPageCache doPagesInMemory: [:aPage | \\\\n\\\\t\\\\tGlobalPolicy == #neverWrite ifFalse: [aPage write].\\\\n\\\\t\\\\taPage purge.\\\\n\\\\t\\\\tSmalltalk garbageCollect > goal ifTrue: [^ true]].\\\\t\\\\\\\"got enough\\\\\\\"\\\\n\\\\t^ false\\\\t\\\\\\\"caller may want to tell the user to write out more pages\\\\\\\"! !\\\\n\\\\n!SqueakPageCache class methodsFor: 'cache access' stamp: 'jm 6/16/1998 18:12'!\\\\nremoveURL: aURLString\\\\n\\\\t\\\\\\\"Remove the cache entry for the given URL. Do nothing if it has no cache entry.\\\\\\\"\\\\n\\\\n\\\\tPageCache removeKey: aURLString ifAbsent: [].\\\\n! !\\\\n\\\\n!SqueakPageCache class methodsFor: 'cache access' stamp: 'tk 10/22/1998 11:07'!\\\\nwrite\\\\n\\\\t\\\\\\\"Write out all dirty pages\\\\\\\"\\\\n\\\\tGlobalPolicy == #neverWrite ifTrue: [^ self].\\\\n\\\\tself doPagesInMemory: [:aPage | aPage write].! !\\\\n\\\\n\\\\n!SqueakPageCache class methodsFor: 'class initialization' stamp: 'tk 11/24/1998 14:53'!\\\\ninitialize\\\\n\\\\t\\\\\\\"SqueakPageCache initialize\\\\\\\"\\\\n\\\\n\\\\tGlobalPolicy _ #neverWrite.\\\\n\\\\tPageCache _ Dictionary new: 100.\\\\n\\\\t\\\\t\\\\\\\"forgets urls of pages, but ObjectOuts still remember them\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!SqueakPageCache class methodsFor: 'housekeeping' stamp: 'tk 6/24/1999 11:42'!\\\\ndeleteUnreferencedPages\\\\n\\\\t\\\\\\\"Remove any pages that are not current referred to by any book or URL morph.\\\\\\\"\\\\n\\\\t\\\\\\\"Details: Since unreferenced pages could refer to other pages, this process is iterated until no unreferenced pages can be found. It currently does not collect cycles.\\\\\\\"\\\\n\\\\t\\\\\\\"SqueakPageCache deleteUnreferencedPages\\\\\\\"\\\\n\\\\n\\\\t| unreferenced |\\\\n\\\\t[true] whileTrue: [\\\\n\\\\t\\\\tSmalltalk garbageCollect.\\\\n\\\\t\\\\tunreferenced _ PageCache keys.\\\\n\\\\t\\\\tURLMorph allSubInstancesDo: [:m | unreferenced remove: m url ifAbsent: []].\\\\n\\\\t\\\\tMorphObjectOut allInstancesDo: [:ticklish |\\\\n\\\\t\\\\t\\\\tunreferenced remove: ticklish url ifAbsent: []].\\\\n\\\\t\\\\tunreferenced size = 0 ifTrue: [^ self].\\\\n\\\\t\\\\tunreferenced do: [:url | PageCache removeKey: url ifAbsent: []]].\\\\n! !\\\\n\\\\n!SqueakPageCache class methodsFor: 'housekeeping' stamp: 'jm 6/25/1998 13:00'!\\\\nreleaseCachedStateOfPages\\\\n\\\\t\\\\\\\"Note: This shouldn't be necessary if we are doing a good job of releasing cached state as we go. If running this doesn't do very much, we're doing well!!\\\\\\\"\\\\n\\\\t\\\\\\\"SqueakPageCache releaseCachedStateOfPages\\\\\\\"\\\\n\\\\n\\\\t| memBytes |\\\\n\\\\tmemBytes _ Smalltalk garbageCollect.\\\\n\\\\tPageCache do: [:pg |\\\\n\\\\t\\\\tpg contentsMorph allMorphsDo: [:m | m releaseCachedState]].\\\\n\\\\t^ (Smalltalk garbageCollect - memBytes) printString, ' bytes recovered'\\\\n! !\\\\nMorph subclass: #SquishedNameMorph\\\\n\\\\tinstanceVariableNames: 'target getSelector setSelector'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-Navigators'!\\\\n\\\\n!SquishedNameMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/11/2000 23:19'!\\\\ncolorAroundName\\\\n\\\\n\\\\t^Color gray: 0.8! !\\\\n\\\\n!SquishedNameMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/11/2000 23:18'!\\\\nfontForName\\\\n\\\\n\\\\t| pickem |\\\\n\\\\tpickem _ 3.\\\\n\\\\n\\\\tpickem = 1 ifTrue: [\\\\n\\\\t\\\\t^(((TextStyle named: #Helvetica) ifNil: [TextStyle default]) fontOfSize: 13) emphasized: 1.\\\\n\\\\t].\\\\n\\\\tpickem = 2 ifTrue: [\\\\n\\\\t\\\\t^(((TextStyle named: #Palatino) ifNil: [TextStyle default]) fontOfSize: 12) emphasized: 1.\\\\n\\\\t].\\\\n\\\\t^((TextStyle default) fontAt: 1) emphasized: 1\\\\n! !\\\\n\\\\n!SquishedNameMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/11/2000 23:17'!\\\\nisEditingName\\\\n\\\\n\\\\t^((self findA: UpdatingStringMorph) ifNil: [^false]) hasFocus\\\\n! !\\\\n\\\\n!SquishedNameMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/11/2000 23:32'!\\\\nstringToShow\\\\n\\\\n\\\\t(target isNil or: [getSelector isNil]) ifTrue: [^'????'].\\\\n\\\\t^target perform: getSelector! !\\\\n\\\\n!SquishedNameMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/11/2000 23:31'!\\\\ntarget: aTarget getSelector: symbol1 setSelector: symbol2\\\\n\\\\n\\\\ttarget _ aTarget.\\\\n\\\\tgetSelector _ symbol1.\\\\n\\\\tsetSelector _ symbol2.! !\\\\n\\\\n\\\\n!SquishedNameMorph methodsFor: 'drawing' stamp: 'RAA 11/11/2000 23:17'!\\\\ndrawOn: aCanvas\\\\n\\\\n\\\\t| font stringToShow nameForm rectForName |\\\\n\\\\n\\\\tsuper drawOn: aCanvas.\\\\n\\\\tself isEditingName ifTrue: [^self].\\\\n\\\\n\\\\tfont _ self fontForName.\\\\n\\\\tstringToShow _ self stringToShow.\\\\n\\\\tnameForm _ (StringMorph contents: stringToShow font: font) imageForm.\\\\n\\\\tnameForm _ nameForm scaledToSize: (self extent - (4@2) min: nameForm extent).\\\\n\\\\trectForName _ self bottomLeft + \\\\n\\\\t\\\\t\\\\t(self width - nameForm width // 2 @ (nameForm height + 2) negated)\\\\n\\\\t\\\\t\\\\t\\\\textent: nameForm extent.\\\\n\\\\trectForName topLeft eightNeighbors do: [ :pt |\\\\n\\\\t\\\\taCanvas\\\\n\\\\t\\\\t\\\\tstencil: nameForm \\\\n\\\\t\\\\t\\\\tat: pt\\\\n\\\\t\\\\t\\\\tcolor: self colorAroundName.\\\\n\\\\t].\\\\n\\\\taCanvas\\\\n\\\\t\\\\tstencil: nameForm \\\\n\\\\t\\\\tat: rectForName topLeft \\\\n\\\\t\\\\tcolor: Color black.\\\\n\\\\n\\\\n\\\\t\\\\n! !\\\\nObject subclass: #Stack\\\\n\\\\tinstanceVariableNames: 'linkedList'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Collections-Stack'!\\\\n!Stack commentStamp: 'dc 7/24/2005 15:41' prior: 0!\\\\nI implement a simple Stack. #push: adds a new object of any kind on top of the stack. #pop returns the first element and remove it from the stack. #top answer the first element of the stack without removing it.!\\\\n\\\\n\\\\n!Stack methodsFor: 'accessing' stamp: 'dc 7/25/2005 10:04'!\\\\nsize\\\\n\\\\t\\\\\\\"How many objects in me ?\\\\\\\"\\\\n\\\\t^ self linkedList size! !\\\\n\\\\n!Stack methodsFor: 'accessing' stamp: 'sd 3/25/2006 15:05'!\\\\ntop\\\\n\\\\t\\\\\\\"Answer the first element of the stack without removing it.\\\\\\\"\\\\n\\\\tself notEmptyCheck.\\\\n\\\\t^ self linkedList first element! !\\\\n\\\\n\\\\n!Stack methodsFor: 'adding' stamp: 'dc 7/25/2005 10:22'!\\\\npush: anObject \\\\n\\\\t\\\\\\\"Adds a new object of any kind on top of the stack.\\\\\\\"\\\\n\\\\tself linkedList\\\\n\\\\t\\\\taddFirst: (StackLink with: anObject).\\\\n\\\\t^ anObject.! !\\\\n\\\\n\\\\n!Stack methodsFor: 'initialize-release' stamp: 'dc 7/25/2005 11:39'!\\\\ninitialize\\\\n\\\\tsuper initialize.\\\\n\\\\tlinkedList := LinkedList new! !\\\\n\\\\n\\\\n!Stack methodsFor: 'removing' stamp: 'dc 7/24/2005 16:16'!\\\\npop\\\\n\\\\t\\\\\\\"Returns the first element and remove it from the stack.\\\\\\\"\\\\n\\\\n\\\\tself notEmptyCheck.\\\\n\\\\t^self linkedList removeFirst element! !\\\\n\\\\n\\\\n!Stack methodsFor: 'testing' stamp: 'dc 7/25/2005 10:05'!\\\\nisEmpty\\\\n\\\\t^ self linkedList isEmpty! !\\\\n\\\\n\\\\n!Stack methodsFor: 'private' stamp: 'dc 7/25/2005 10:05'!\\\\nerrorEmptyStack\\\\n\\\\tself error: 'this stack is empty'! !\\\\n\\\\n!Stack methodsFor: 'private' stamp: 'dc 7/25/2005 10:20'!\\\\nlinkedList\\\\n\\\\t\\\\\\\"The stack is implemented with a LinkedList. Do NOT call this function, it  \\\\n\\\\tis for private use !!\\\\\\\"\\\\n\\\\t^ linkedList! !\\\\n\\\\n!Stack methodsFor: 'private' stamp: 'dc 7/25/2005 10:05'!\\\\nnotEmptyCheck\\\\n\\\\t\\\\\\\"Ensure the stack is not empty.\\\\\\\"\\\\n\\\\tself isEmpty\\\\n\\\\t\\\\tifTrue: [self errorEmptyStack]! !\\\\nLink subclass: #StackLink\\\\n\\\\tinstanceVariableNames: 'element'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Collections-Stack'!\\\\n!StackLink commentStamp: '<historical>' prior: 0!\\\\nI implement an element of a stack. I'm a container for any type of object, saved into the 'element' variable. My superclass Link allows me to be part of a LinkedList.!\\\\n\\\\n\\\\n!StackLink methodsFor: 'accessing' stamp: 'dc 7/24/2005 15:34'!\\\\nelement\\\\n\\\\t^element! !\\\\n\\\\n!StackLink methodsFor: 'accessing' stamp: 'dc 7/25/2005 10:16'!\\\\nelement: anObject \\\\n\\\\t\\\\\\\"Any kind of Object.\\\\\\\"\\\\n\\\\telement := anObject! !\\\\n\\\\n\\\\n!StackLink methodsFor: 'printing' stamp: 'dc 7/25/2005 10:15'!\\\\nprintOn: aStream \\\\n\\\\taStream nextPutAll: self class printString;\\\\n\\\\t\\\\t nextPutAll: ' with: ';\\\\n\\\\t\\\\t nextPutAll: self element printString! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStackLink class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StackLink class methodsFor: 'instance creation' stamp: 'dc 7/25/2005 10:15'!\\\\nwith: anObject \\\\n\\\\t^ self new element: anObject! !\\\\nBookMorph subclass: #StackMorph\\\\n\\\\tinstanceVariableNames: 'cards'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'EToys-Stacks'!\\\\n!StackMorph commentStamp: '<historical>' prior: 0!\\\\nA book that is very much like a HyperCard stack.  \\\\n\\\\nEach book page represents a different background.  The page stays while different cards are projected onto it.  \\\\n\\\\tThe data for a single card is stored in a CardPlayer.  There is a list of objects that only appear on this card (privateMorphs) and the card-specific text to be inserted into the background fields.\\\\n\\\\nItem\\\\t\\\\t\\\\t\\\\t\\\\tHow it is stored\\\\na background\\\\t\\\\t\\\\ta page of the StackMorph\\\\na card\\\\t\\\\t\\\\t\\\\t\\\\tdata is in an instance of a subclass of CardPlayer.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tA list of CardPlayers is in the 'cards' inst var of the StackMorph.\\\\na background field\\\\t\\\\ta TextMorph on a page of the StackMorph\\\\na background picture\\\\ta morph of any kind on a page of the StackMorph\\\\nscript for bkgnd button\\\\t\\\\tmethod in Player.  Button is its costume.\\\\ntext in a background field\\\\t\\\\tvalue of inst var 'field1' in a CardPlayer.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(The CardPlayer is also pointed at by the #cardInstance \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tproperty of the bkgnd field (TextMorph))\\\\ntext in a card field\\\\t\\\\tin the TextMorph in privateMorphs in the CardPlayer.\\\\npicture on a card\\\\t\\\\ta morph of any kind in privateMorphs in the CardPlayer.\\\\nscript for card button\\\\tmethod in the CardPlayer.  Button is its costume.\\\\n\\\\nSee VariableDock.!\\\\n\\\\n\\\\n!StackMorph methodsFor: 'accessing' stamp: 'sw 11/2/2002 15:51'!\\\\ncardNumberOf: aPlayer\\\\n\\\\t\\\\\\\"Answer the card-number of the given player, in the which-card-of-the-stack sense.\\\\\\\"\\\\n\\\\n\\\\t^ self cards identityIndexOf: aPlayer ifAbsent: [0]! !\\\\n\\\\n!StackMorph methodsFor: 'accessing' stamp: 'sw 3/18/2002 02:09'!\\\\ncardsOrPages\\\\n\\\\t\\\\\\\"The turnable and printable entities\\\\\\\"\\\\n\\\\n\\\\t^ self cards! !\\\\n\\\\n\\\\n!StackMorph methodsFor: 'as yet unclassified' stamp: 'sw 10/23/2000 16:27'!\\\\ncommitCardData\\\\n\\\\t\\\\\\\"Make certain that the player data are written back to the player instance\\\\\\\"\\\\n\\\\n\\\\t^ self currentCard commitCardPlayerData \\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'as yet unclassified' stamp: 'em 3/31/2005 10:56'!\\\\ninsertCardOfBackground\\\\n\\\\t\\\\\\\"Prompt the user for choice of a background, and insert a new card of that background\\\\\\\"\\\\n\\\\n\\\\t| bgs aMenu aBackground |\\\\n\\\\t(bgs _ self backgrounds) size == 1 ifTrue:\\\\n\\\\t\\\\t[self inform: \\\\n'At this time, there IS only one kind of\\\\nbackground in this stack, so that''s\\\\nwhat you''ll get' translated.\\\\n\\\\t\\\\t^ self insertCard].\\\\n\\\\taMenu _ SelectionMenu\\\\n\\\\t\\\\tlabels: \\\\t\\\\t(bgs collect: [:bg | bg externalName])\\\\n\\\\t\\\\tselections: \\\\tbgs.\\\\n\\\\t(aBackground _ aMenu startUp) ifNotNil:\\\\n\\\\t\\\\t[self insertCardOfBackground: aBackground]! !\\\\n\\\\n!StackMorph methodsFor: 'as yet unclassified' stamp: 'sw 3/18/2002 02:02'!\\\\ninsertCardOfBackground: aBackground\\\\n\\\\t\\\\\\\"Insert a new card of the given background and have it become the current card\\\\\\\"\\\\n\\\\n\\\\t| newCard |\\\\n\\\\tnewCard _  aBackground newCard.\\\\n\\\\tself privateCards add: newCard after: self currentCard.\\\\n\\\\tself goToCard: newCard! !\\\\n\\\\n!StackMorph methodsFor: 'as yet unclassified' stamp: 'sw 10/30/2000 10:08'!\\\\nopenInsideLook\\\\n\\\\t\\\\\\\"Open an inside-look at the current page.  This is a previously-demoed feature not presently incorporated in released code,\\\\\\\"\\\\n\\\\n\\\\ttrue ifTrue: [self notYetImplemented] ifFalse: [self currentPage openInsideLook]\\\\n! !\\\\n\\\\n\\\\n!StackMorph methodsFor: 'background' stamp: 'nb 6/17/2003 12:25'!\\\\naddCardsFromAFile\\\\n\\\\t\\\\\\\"Using the current background, create new cards by reading in data from a fileThe data are in each record are expected to be tab-delimited, and to occur in the same order as the instance variables of the current-background's cards \\\\\\\"\\\\n\\\\n\\\\t| aFileStream |\\\\n\\\\t(aFileStream _ FileList2 modalFileSelector) ifNil: [^ Beeper beep].\\\\n\\\\tself addCardsFromString: aFileStream contentsOfEntireFile.\\\\n\\\\taFileStream close! !\\\\n\\\\n!StackMorph methodsFor: 'background' stamp: 'nb 6/17/2003 12:25'!\\\\naddCardsFromClipboardData\\\\n\\\\t\\\\\\\"Using the current background, paste data from the (textual) clipboard to create new records.  The data are in each record are expected to be tab-delimited, and to occur in the same order as the instance variables of the current-background's cards \\\\\\\"\\\\n\\\\n\\\\t| clip |\\\\n\\\\t(clip _ Clipboard clipboardText) isEmptyOrNil ifTrue: [^ Beeper beep].\\\\n\\\\tself addCardsFromString: clip! !\\\\n\\\\n!StackMorph methodsFor: 'background' stamp: 'nb 6/17/2003 12:25'!\\\\naddCardsFromClipboardDataForInstanceVariables: slotNames\\\\n\\\\t\\\\\\\"Using the current background, paste data from the (textual) clipboard to create new records.  No senders, but can be usefully called manually for selectively bringing in data in oddball format.\\\\\\\"\\\\n\\\\n\\\\t| clip |\\\\n\\\\t(clip _ Clipboard clipboardText) isEmptyOrNil ifTrue: [^ Beeper beep].\\\\n\\\\tself addCardsFromString: clip slotNames: slotNames! !\\\\n\\\\n!StackMorph methodsFor: 'background' stamp: 'nb 6/17/2003 12:25'!\\\\naddCardsFromFile: fileStream\\\\n\\\\t\\\\\\\"Using the current background, take tab delimited data from the file to create new records.\\\\\\\"\\\\n\\\\n\\\\t| aString |\\\\n\\\\t(aString _ fileStream contentsOfEntireFile) isEmptyOrNil ifTrue: [^ Beeper beep].\\\\n\\\\tself addCardsFromString: aString! !\\\\n\\\\n!StackMorph methodsFor: 'background' stamp: 'sw 12/18/2001 11:35'!\\\\naddCardsFromString: aString\\\\n\\\\t\\\\\\\"Using the current background, add cards from a string, which is expected be tab- and return-delimited.  The data are in each record are expected to be tab-delimited, and to occur in the same order as the instance variables of the current-background's cards \\\\\\\"\\\\n\\\\n\\\\tself addCardsFromString: aString slotNames: self currentCard slotNames\\\\n \\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'background' stamp: 'em 3/31/2005 10:23'!\\\\naddCardsFromString: aString slotNames: slotNames \\\\n\\\\t\\\\\\\"Using the current background, add cards from a string, which is expected be tab- and return-delimited\\\\\\\"\\\\n\\\\n\\\\t| count |\\\\n\\\\tcount := 0.\\\\n\\\\taString asString linesDo: \\\\n\\\\t\\\\t\\\\t[:aLine | \\\\n\\\\t\\\\t\\\\taLine notEmpty \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[count := count + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinsertCardOfBackground: self currentPage\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twithDataFrom: aLine\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforInstanceVariables: slotNames]].\\\\n\\\\tself inform: count asString , ' card(s) added' translated! !\\\\n\\\\n!StackMorph methodsFor: 'background' stamp: 'sw 10/26/2000 14:41'!\\\\nbackgroundWithCard: aCard\\\\n\\\\t\\\\\\\"Answer the background which contains aCard.\\\\\\\"\\\\n\\\\n\\\\t^ self backgrounds detect:\\\\n\\\\t\\\\t[:aBackground | aBackground containsCard: aCard] ifNone: [nil]! !\\\\n\\\\n!StackMorph methodsFor: 'background' stamp: 'sw 10/30/2000 10:04'!\\\\nbackgrounds\\\\n\\\\t\\\\\\\"Answer the list of backgrounds available in the receiver\\\\\\\"\\\\n\\\\n\\\\t^ self pages! !\\\\n\\\\n!StackMorph methodsFor: 'background' stamp: 'sw 12/6/2001 21:26'!\\\\nbeDefaultsForNewCards\\\\n\\\\t\\\\\\\"Make the values that I see here all be accepted as defaults for new cards\\\\\\\"\\\\n\\\\n\\\\tself currentPage submorphs do:\\\\n\\\\t\\\\t[:aMorph | aMorph holdsSeparateDataForEachInstance ifTrue:\\\\n\\\\t\\\\t\\\\t[aMorph setAsDefaultValueForNewCard]]! !\\\\n\\\\n!StackMorph methodsFor: 'background' stamp: 'sw 11/2/2002 17:56'!\\\\nchangeInstVarOrder\\\\n\\\\t\\\\\\\"Change the order of the receiver's instance variables\\\\\\\"\\\\n\\\\n\\\\t| reply |\\\\n\\\\treply _ FillInTheBlank request: 'rearrange, then accept; or cancel' initialAnswer:\\\\n\\\\t\\\\t((self currentPage player class instVarNames asArray collect: [:v | v asSymbol]) storeString copyWithoutAll: #($# $( $))) asString.\\\\n\\\\treply isEmptyOrNil ifTrue: [^ self].\\\\n\\\\tself flag: #deferred.  \\\\\\\"Error checking and graceful escape wanted\\\\\\\"\\\\n\\\\tself currentPage player class resortInstanceVariables: (Compiler evaluate:\\\\n\\\\t\\\\t('#(', reply, ')'))! !\\\\n\\\\n!StackMorph methodsFor: 'background' stamp: 'em 3/30/2005 14:47'!\\\\ninsertAsBackground: newPage resize: doResize\\\\n\\\\t\\\\\\\"Make a new background for the stack.  Obtain a name for it from the user.  It starts out life empty\\\\\\\"\\\\n\\\\n\\\\t| aName |\\\\n\\\\taName _ FillInTheBlank request: 'What should we call this new background?' translated initialAnswer: 'alternateBackground' translated.\\\\n\\\\taName isEmptyOrNil ifTrue: [^ self].\\\\n\\\\tnewPage beSticky.\\\\n\\\\tdoResize ifTrue: [newPage extent: currentPage extent].\\\\n\\\\tnewPage beAStackBackground.\\\\n\\\\tnewPage setNameTo: aName.\\\\n\\\\tnewPage vResizeToFit: false.\\\\n\\\\tpages isEmpty\\\\n\\\\t\\\\tifTrue: [pages add: newPage]\\\\n\\\\t\\\\tifFalse: [pages add: newPage after: currentPage].\\\\n\\\\tself privateCards add: newPage currentDataInstance after: currentPage currentDataInstance.\\\\n\\\\tself nextPage.\\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'background' stamp: 'tk 10/30/2001 19:01'!\\\\nmakeNewBackground\\\\n\\\\t\\\\\\\"Make a new background for the stack.  Obtain a name for it from the user.  It starts out life empty\\\\\\\"\\\\n\\\\n\\\\t| newPage |\\\\n\\\\t(newPage _ PasteUpMorph newSticky) color: self color muchLighter.\\\\n\\\\tnewPage borderWidth: currentPage borderWidth; borderColor: currentPage borderColor.\\\\n\\\\tself insertAsBackground: newPage resize: true. \\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'background' stamp: 'sw 3/18/2002 02:14'!\\\\nsortByField: varName\\\\n\\\\t\\\\\\\"Perform a simple reordering of my cards, sorting by the given field name.  If there are multiple backgrounds, then sort the current one, placing all its cards first, followed by all others in unchanged order\\\\\\\"\\\\n\\\\n\\\\t| holdCards thisClassesInstances sortedList |\\\\n\\\\tholdCards _ self privateCards copy.\\\\n\\\\n\\\\tthisClassesInstances _ self privateCards select: [:c | c isKindOf: self currentCard class].\\\\n\\\\tsortedList _ thisClassesInstances asSortedCollection:\\\\n\\\\t\\\\t[:a :b | (a instVarNamed: varName) asString <= (b instVarNamed: varName) asString].\\\\n\\\\tsortedList _ sortedList asOrderedCollection.\\\\n\\\\tholdCards removeAllFoundIn: sortedList.\\\\n\\\\tself privateCards:  (sortedList asOrderedCollection, holdCards).\\\\n\\\\tself goToFirstCardOfStack\\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'background' stamp: 'sw 12/6/2001 22:08'!\\\\nsortCards\\\\n\\\\t\\\\\\\"Let the user provide an inst var on which to sort the cards of a background.\\\\\\\"\\\\n\\\\n\\\\t| names aMenu |\\\\n\\\\tnames _ self currentPage player class instVarNames.\\\\n\\\\taMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\taMenu addTitle: 'Choose field by which to sort:'.\\\\n\\\\tnames do: [:n | aMenu add: n selector: #sortByField: argument: n].\\\\n\\\\taMenu popUpInWorld! !\\\\n\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'sw 10/23/2000 16:24'!\\\\nbrowseCardClass\\\\n\\\\t\\\\\\\"Browse the class of the current card\\\\\\\"\\\\n\\\\n\\\\t| suffix |\\\\n\\\\tsuffix _ self currentCard class name numericSuffix.\\\\n\\\\tHierarchyBrowser newFor: self currentCard class labeled: 'Background ', suffix asString\\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'sw 3/18/2002 02:20'!\\\\ncardIndexOf: aCard\\\\n\\\\t\\\\\\\"Answer the ordinal position of aCard in the receiver's list\\\\\\\"\\\\n\\\\n\\\\t^ self privateCards indexOf: aCard ifAbsent: [nil]! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'sw 3/18/2002 02:12'!\\\\ncards\\\\n\\\\t\\\\\\\"Answer a list of the cards of the receiver, in order\\\\\\\"\\\\n\\\\n\\\\t^ self privateCards copy! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'sw 10/23/2000 16:27'!\\\\ncurrentCard\\\\n\\\\t\\\\\\\"Answer the current card of the current background of the receiver\\\\\\\"\\\\n\\\\n\\\\t^ currentPage currentDataInstance! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'em 3/31/2005 10:24'!\\\\ndeleteAllCardsExceptThisOne\\\\n\\\\t\\\\\\\"Delete all cards except the current one\\\\\\\"\\\\n\\\\n\\\\tself privateCards size <= 1 ifTrue: [^ Beeper beep].\\\\n\\\\t(self confirm: 'Really delete ' translated, self privateCards size asString, ' card(s) and all of their data?' translated) ifTrue:\\\\n\\\\t\\\\t[self privateCards: (OrderedCollection with: self currentCard)].! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'sd 11/13/2003 21:03'!\\\\ndeleteCard\\\\n\\\\t\\\\\\\"Delete the current card from the stack\\\\\\\"\\\\n\\\\n\\\\t| aCard |\\\\n\\\\taCard _ self currentCard.\\\\n\\\\tself privateCards size = 1 ifTrue: [^ Beeper beep].\\\\n\\\\t(self confirm: 'Really delete this card and all of its data?' translated) ifTrue:\\\\n\\\\t\\\\t[self goToNextCardInStack.\\\\n\\\\t\\\\tself privateCards remove: aCard].! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'nb 6/17/2003 12:25'!\\\\ndeleteCard: aCard\\\\n\\\\t\\\\\\\"Delete the current card from the stack.\\\\\\\"\\\\n\\\\n\\\\tself privateCards size = 1 ifTrue: [^ Beeper beep].\\\\n\\\\t(aCard == self currentCard) ifTrue: [^ self deleteCard].\\\\n\\\\n\\\\tself privateCards remove: aCard ifAbsent: []! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'em 3/31/2005 10:23'!\\\\ngoToCard\\\\n\\\\t\\\\\\\"prompt the user for an ordinal number, and use that as a basis for choosing a new card to install in the receiver\\\\\\\"\\\\n\\\\n\\\\t| reply index |\\\\n\\\\treply _ FillInTheBlank request: 'Which card number? ' translated initialAnswer: '1'.\\\\n\\\\treply isEmptyOrNil ifTrue: [^ self].\\\\n\\\\t((index _ reply asNumber) > 0 and: [index <= self privateCards size])\\\\n\\\\t\\\\tifFalse: [^ self inform: 'no such card'].\\\\n\\\\tself goToCard: (self privateCards at: index)! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'sw 11/8/2002 15:15'!\\\\ngoToCard: destinationCard\\\\n\\\\t\\\\\\\"Install the indicated destinationCard as the current card in the receiver.  Any viewer currently open on the current card will get retargeted to look at the new one.\\\\\\\"\\\\n\\\\n\\\\t| aBackground existingCard oldViewers |\\\\n\\\\tdestinationCard == self currentCard ifTrue: [^ self].\\\\n\\\\tself currentPlayerDo:\\\\n\\\\t\\\\t[:aPlayer | aPlayer runAllClosingScripts].   \\\\\\\"Like HyperCard 'on closeCard'\\\\\\\"\\\\n\\\\n\\\\taBackground _ self backgroundWithCard: destinationCard.\\\\n\\\\texistingCard _ aBackground currentDataInstance.\\\\n\\\\toldViewers _ existingCard ifNil: [#()] ifNotNil: [existingCard allOpenViewers].\\\\n\\\\n\\\\taBackground installAsCurrent: destinationCard.\\\\n\\\\taBackground setProperty: #myStack toValue: self.\\\\t\\\\\\\"pointer cardMorph -> stack\\\\\\\"\\\\n\\\\n\\\\taBackground ~~ currentPage ifTrue:\\\\n\\\\t\\\\t[self goToPageMorph: aBackground runTransitionScripts: false].\\\\n\\\\tself currentPlayerDo:\\\\n\\\\t\\\\t[:aPlayer | aPlayer runAllOpeningScripts] .  \\\\\\\"Like HyperCard 'on opencard'\\\\\\\"\\\\n\\\\n\\\\toldViewers do: [:aViewer | aViewer retargetFrom: existingCard to: destinationCard]! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'sw 11/11/2002 03:07'!\\\\ngoToCardNumber: aCardNumber\\\\n\\\\t\\\\\\\"Install the card whose ordinal number is provided as the current card in the stack\\\\\\\"\\\\n\\\\n\\\\tself goToCard: (self privateCards atWrap: aCardNumber)! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'nb 6/17/2003 12:25'!\\\\ngoToFirstCardInBackground\\\\n\\\\t\\\\\\\"Install the initial card in the current background as the current card in the stack\\\\\\\"\\\\n\\\\n\\\\t| kind |\\\\n\\\\tkind _ currentPage player class baseUniclass.\\\\n\\\\tself goToCard: (self privateCards detect: [:aCard | aCard isKindOf: kind] ifNone: [^ Beeper beep])! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'sw 3/18/2002 02:01'!\\\\ngoToFirstCardOfStack\\\\n\\\\t\\\\\\\"Install the initial card in the stack as the current card\\\\\\\"\\\\n\\\\n\\\\tself goToCard: self privateCards first! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'nb 6/17/2003 12:25'!\\\\ngoToLastCardInBackground\\\\n\\\\t\\\\\\\"Install the final card in the current background as the current card\\\\\\\"\\\\n\\\\n\\\\t| kind |\\\\n\\\\tkind _ currentPage player class baseUniclass.\\\\n\\\\tself goToCard: (self privateCards reversed detect: [:aCard | aCard isKindOf: kind] ifNone: [^ Beeper beep])! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'sw 3/18/2002 02:09'!\\\\ngoToLastCardOfStack\\\\n\\\\t\\\\\\\"Install the final card in the stack as the current card\\\\\\\"\\\\n\\\\n\\\\tself goToCard: self privateCards last! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'sw 3/18/2002 02:03'!\\\\ninsertCardOfBackground: aBackground withDataFrom: aLine forInstanceVariables: slotNames\\\\n\\\\t\\\\\\\"Insert a new card of the given background and have it become the current card. \\\\\\\"\\\\n\\\\n\\\\t| newCard |\\\\n\\\\tnewCard _  aBackground newCard.\\\\n\\\\tself privateCards add: newCard after: self currentCard.\\\\n\\\\tnewCard absorbBackgroundDataFrom: aLine forInstanceVariables: slotNames.\\\\n\\\\tself goToCard: newCard! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'sw 3/18/2002 01:57'!\\\\nmakeCurrentCardFirstInStack\\\\n\\\\t\\\\\\\"Move the current card such that it becomes the first card in the stack\\\\\\\"\\\\n\\\\n\\\\t| aCard |\\\\n\\\\taCard _ self currentCard.\\\\n\\\\tself privateCards remove: aCard ifAbsent: [];\\\\n\\\\t\\\\taddFirst: aCard.\\\\n\\\\tself currentPage flash! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'sw 3/18/2002 02:03'!\\\\nmakeCurrentCardLastInStack\\\\n\\\\t\\\\\\\"Move the current card such that it becomes the last card in the stack\\\\\\\"\\\\n\\\\n\\\\t| aCard |\\\\n\\\\taCard _ self currentCard.\\\\n\\\\tself privateCards remove: aCard ifAbsent: [];\\\\n\\\\t\\\\taddLast: aCard.\\\\n\\\\tself currentPage flash! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'sw 3/18/2002 02:08'!\\\\nmoveCardOnePositionEarlier\\\\n\\\\t\\\\\\\"Move the current card such that its ordinal position is one fewer than it formerly was.  If the current card is already the first one one in the stack, then do nothing\\\\\\\"\\\\n\\\\n\\\\t| aCard aPosition |\\\\n\\\\taCard _ self currentCard.\\\\n\\\\taCard == self privateCards first ifTrue: [^ self].\\\\n\\\\taPosition _ self privateCards indexOf: aCard.\\\\n\\\\tself privateCards remove: aCard;\\\\n\\\\t\\\\tadd: aCard afterIndex: (aPosition - 2).\\\\n\\\\tself currentPage flash! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'sw 3/18/2002 02:05'!\\\\nmoveCardOnePositionLater\\\\n\\\\t\\\\\\\"Move the current card such that its ordinal position is one greater than it formerly was.  If the current card is already the last one one in the stack, then do nothing\\\\\\\"\\\\n\\\\n\\\\t| aCard aPosition privateCards |\\\\n\\\\taCard _ self currentCard.\\\\n\\\\tprivateCards _ self privateCards.\\\\n\\\\taCard == privateCards last ifTrue: [^ self].\\\\n\\\\taPosition _ privateCards indexOf: aCard.\\\\n\\\\tprivateCards remove: aCard.\\\\n\\\\tprivateCards add: aCard afterIndex: aPosition.\\\\n\\\\tself currentPage flash! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'sw 3/18/2002 01:56'!\\\\nprivateCards\\\\n\\\\t\\\\\\\"Private - answer the collection object that sits in my cards instance variable\\\\\\\"\\\\n\\\\n\\\\t^ cards! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'sw 3/18/2002 02:51'!\\\\nprivateCards: aCollection\\\\n\\\\t\\\\\\\"Private - Make my cards be te given colllection\\\\\\\"\\\\n\\\\n\\\\tcards _ aCollection! !\\\\n\\\\n\\\\n!StackMorph methodsFor: 'card in a stack' stamp: 'sw 10/30/2000 10:03'!\\\\nexplainDesignations\\\\n\\\\t\\\\\\\"Give the user an explanation of what the designations mean\\\\\\\"\\\\n\\\\n\\\\tself currentPage explainDesignations\\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'card in a stack' stamp: 'sw 3/18/2002 02:03'!\\\\ngoToNextCardInStack\\\\n\\\\t\\\\\\\"Make the card *after* the current card become the current card\\\\\\\"\\\\n\\\\n\\\\t| anIndex newCard |\\\\n\\\\tanIndex _ self privateCards indexOf: currentPage currentDataInstance.\\\\n\\\\tnewCard _ self privateCards atWrap: anIndex + 1.\\\\n\\\\tself goToCard: newCard! !\\\\n\\\\n!StackMorph methodsFor: 'card in a stack' stamp: 'sw 3/18/2002 02:01'!\\\\ngoToPreviousCardInStack\\\\n\\\\t\\\\\\\"Install the previous card as my current one\\\\\\\"\\\\n\\\\n\\\\t| anIndex newCard |\\\\n\\\\tanIndex _ self privateCards indexOf: currentPage currentDataInstance.\\\\n\\\\tnewCard _ self privateCards atWrap: anIndex - 1.\\\\n\\\\tself goToCard: newCard! !\\\\n\\\\n!StackMorph methodsFor: 'card in a stack' stamp: 'sw 10/23/2000 16:02'!\\\\ninsertCard\\\\n\\\\t\\\\\\\"Create a new card of the current background and make it become the current card\\\\\\\"\\\\n\\\\n\\\\tself insertCardOfBackground: currentPage! !\\\\n\\\\n!StackMorph methodsFor: 'card in a stack' stamp: 'tk 10/5/2001 06:27'!\\\\nreassessBackgroundShape\\\\n\\\\t\\\\\\\"Have the current page reconsider its cards' instance structure\\\\\\\"\\\\n\\\\n\\\\tcurrentPage setProperty: #myStack toValue: self. \\\\t\\\\\\\"pointer cardMorph -> stack\\\\\\\"\\\\n\\\\t^ self currentPage reassessBackgroundShape \\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'card in a stack' stamp: 'sw 10/30/2000 10:04'!\\\\nrelaxGripOnVariableNames\\\\n\\\\t\\\\\\\"Have the current background relax its grip on existing variable name\\\\\\\"\\\\n\\\\n\\\\t^ self currentPage relaxGripOnVariableNames \\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'card in a stack' stamp: 'sw 10/30/2000 10:15'!\\\\nreshapeBackground\\\\n\\\\t\\\\\\\"Abandon any memory of variable-name preferences for the current background, and reassess its instance structure\\\\\\\"\\\\n\\\\n\\\\t^ self currentPage reshapeBackground \\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'card in a stack' stamp: 'sw 10/30/2000 10:10'!\\\\nshowDesignationsOfObjects\\\\n\\\\t\\\\\\\"Momentarily show which objects on the current card belong to which designation category\\\\\\\"\\\\n\\\\n\\\\tself currentPage showDesignationsOfObjects\\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'card in a stack' stamp: 'sw 10/23/2000 17:37'!\\\\nstackDo: aBlock\\\\n\\\\t\\\\\\\"Evaluate aBlock on behalf of the receiver stack\\\\\\\"\\\\n\\\\n\\\\t^ aBlock value: self! !\\\\n\\\\n\\\\n!StackMorph methodsFor: 'controls' stamp: 'sw 10/30/2000 16:31'!\\\\npageControlsMorphFrom: controlSpecs\\\\n\\\\t\\\\\\\"Answer a controls morph derived from the spec supplied\\\\\\\"\\\\n\\\\n\\\\t| controls |\\\\n\\\\tcontrols _ super pageControlsMorphFrom: controlSpecs.\\\\n\\\\tcontrols eventHandler: nil.  \\\\\\\"not grabbable\\\\\\\"\\\\n\\\\t^ controls! !\\\\n\\\\n\\\\n!StackMorph methodsFor: 'debugging' stamp: 'sw 10/30/2000 10:13'!\\\\ninspectCurrentBackground\\\\n\\\\t\\\\\\\"Open an inspector on the corrent background.  Ideally should put include the background name in the inspector's title.\\\\\\\"\\\\n\\\\n\\\\t^ self currentPage inspectWithLabel: 'A Background'\\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'debugging' stamp: 'sw 10/23/2000 16:37'!\\\\ninspectCurrentCard\\\\n\\\\t\\\\\\\"For debugging: open an Inspector on the receiver's current card\\\\\\\"\\\\n\\\\n\\\\t^ self currentCard inspectWithLabel: 'A Card'\\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'debugging' stamp: 'sw 10/30/2000 10:09'!\\\\ninspectCurrentStack\\\\n\\\\t\\\\\\\"Triggered from the stack-debug menu, open an Inspector on the receiver\\\\\\\"\\\\n\\\\n\\\\t^ self inspectWithLabel: 'A Stack'\\\\n! !\\\\n\\\\n\\\\n!StackMorph methodsFor: 'initialization' stamp: 'sw 6/5/2003 04:04'!\\\\naddPane: aPane paneType: aType\\\\n\\\\n\\\\t| anIndex |\\\\n\\\\n\\\\tanIndex _ self insertionIndexForPaneOfType: aType.\\\\n\\\\n\\\\tself privateAddMorph: aPane atIndex: anIndex! !\\\\n\\\\n!StackMorph methodsFor: 'initialization' stamp: 'sw 3/18/2002 02:12'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Initialize the stack\\\\\\\"\\\\n\\\\n\\\\t| initialBackground |\\\\n\\\\tsuper initialize.\\\\n\\\\tinitialBackground _ pages first.\\\\n\\\\tinitialBackground extent: (640@480); beSticky.\\\\n\\\\tinitialBackground beAStackBackground.\\\\n\\\\tself beUnsticky.\\\\n\\\\tself setProperty: #controlsAtBottom toValue: true.\\\\n\\\\tself privateCards: (OrderedCollection with: initialBackground currentDataInstance).\\\\n\\\\n\\\\\\\"self currentHand attachMorph: StackMorph authoringPrototype\\\\\\\"! !\\\\n\\\\n!StackMorph methodsFor: 'initialization' stamp: 'sw 3/18/2002 02:13'!\\\\ninitializeWith: aCardMorph\\\\n\\\\t\\\\\\\"Install the card inside a new stack.  Make no border or controls, so I the card's look is unchanged.  Card already has a CardPlayer.\\\\\\\"\\\\n\\\\t\\\\n\\\\t| wld |\\\\n\\\\twld _ aCardMorph world.\\\\n\\\\tself initialize.\\\\n\\\\tself pageSize: aCardMorph extent.\\\\n\\\\tself borderWidth: 0; layoutInset: 0; color: Color transparent.\\\\n\\\\tpages _ Array with: aCardMorph.\\\\n\\\\tcurrentPage _ aCardMorph.\\\\n\\\\tself privateCards: (OrderedCollection with: currentPage currentDataInstance).\\\\n\\\\tcurrentPage beAStackBackground.\\\\n\\\\tself position: aCardMorph position.\\\\n\\\\tsubmorphs last delete.\\\\n\\\\tself addMorph: currentPage.\\\\t\\\\n\\\\tself showPageControls: self fullControlSpecs.\\\\n\\\\twld addMorph: self.\\\\n! !\\\\n\\\\n\\\\n!StackMorph methodsFor: 'insert and delete' stamp: 'sw 10/30/2000 10:10'!\\\\ndefaultNameStemForNewPages\\\\n\\\\t\\\\\\\"Answer the stem to use as the default for names of cards in the stack\\\\\\\"\\\\n\\\\n\\\\t^ 'card'\\\\n! !\\\\n\\\\n\\\\n!StackMorph methodsFor: 'menu' stamp: 'dgd 8/30/2003 21:14'!\\\\naddBookMenuItemsTo: aMenu hand: aHandMorph\\\\n\\\\t\\\\\\\"Add book-related items to the given menu\\\\\\\"\\\\n\\\\n\\\\t| controlsShowing subMenu |\\\\n\\\\tsubMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\tsubMenu add: 'previous card' translated action: #goToPreviousCardInStack.\\\\n\\\\tsubMenu add: 'next card' translated action: #goToNextCardInStack.\\\\n\\\\tsubMenu add: 'go to card...' translated action: #goToCard.\\\\n\\\\tsubMenu add: 'insert a card' translated action: #insertCard.\\\\n\\\\tsubMenu add: 'delete this card' translated action: #deleteCard.\\\\n\\\\n\\\\tcontrolsShowing _ self hasSubmorphWithProperty: #pageControl.\\\\n\\\\tcontrolsShowing\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[subMenu add: 'hide card controls' translated action: #hidePageControls.\\\\n\\\\t\\\\t\\\\tsubMenu add: 'fewer card controls' translated action: #fewerPageControls]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[subMenu add: 'show card controls' translated action: #showPageControls].\\\\n\\\\n\\\\tsubMenu addLine.\\\\n\\\\tsubMenu add: 'sound effect for all backgrounds' translated action: #menuPageSoundForAll:.\\\\n\\\\tsubMenu add: 'sound effect this background only' translated action: #menuPageSoundForThisPage:.\\\\n\\\\tsubMenu add: 'visual effect for all backgrounds' translated action: #menuPageVisualForAll:.\\\\n\\\\tsubMenu add: 'visual effect this background only' translated action: #menuPageVisualForThisPage:.\\\\n\\\\n\\\\tsubMenu addLine.\\\\n\\\\tsubMenu add: 'sort pages' translated action: #sortPages:.\\\\n\\\\tsubMenu add: 'uncache page sorter' translated action: #uncachePageSorter.\\\\n\\\\t(self hasProperty: #dontWrapAtEnd)\\\\n\\\\t\\\\tifTrue: [subMenu add: 'wrap after last page' translated selector: #setWrapPages: argument: true]\\\\n\\\\t\\\\tifFalse: [subMenu add: 'stop at last page' translated selector: #setWrapPages: argument: false].\\\\n\\\\n\\\\tsubMenu  addUpdating: #showingFullScreenString action: #toggleFullScreen.\\\\n\\\\tsubMenu addLine.\\\\n\\\\tsubMenu add: 'search for text' translated action: #textSearch.\\\\n\\\\t(self primaryHand pasteBuffer class isKindOf: PasteUpMorph class) ifTrue:\\\\n\\\\t\\\\t[subMenu add: 'paste book page' translated action: #pasteBookPage].\\\\n\\\\n\\\\tsubMenu add: 'send all pages to server' translated action: #savePagesOnURL.\\\\n\\\\tsubMenu add: 'send this page to server' translated action: #saveOneOnURL.\\\\n\\\\tsubMenu add: 'reload all from server' translated action: #reload.\\\\n\\\\tsubMenu add: 'copy page url to clipboard' translated action: #copyUrl.\\\\n\\\\tsubMenu add: 'keep in one file' translated action: #keepTogether.\\\\n\\\\tsubMenu add: 'save as new-page prototype' translated action: #setNewPagePrototype.\\\\n\\\\tnewPagePrototype ifNotNil:\\\\n\\\\t\\\\t[subMenu add: 'clear new-page prototype' translated action: #clearNewPagePrototype].\\\\n\\\\n\\\\taMenu add: 'book...' translated subMenu: subMenu\\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'menu' stamp: 'sw 3/18/2002 02:06'!\\\\nfindText: wants\\\\n\\\\t\\\\\\\"Turn to the next card that has all of the strings mentioned on it.  Highlight where it is found.  allText and allTextUrls have been set.  Case insensitive search.\\\\n\\\\tResuming a search.  If container's text is still in the list and secondary keys are still in the page, (1) search rest of that container.  (2) search rest of containers on that page (3) pages till end of book, (4) from page 1 to this page again.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Later sort wants so longest key is first\\\\\\\"\\\\n\\\\t| allText good thisWord here fromHereOn startToHere oldContainer oldIndex otherKeys strings |\\\\n\\\\tallText _ self valueOfProperty: #allText ifAbsent: [#()].\\\\n\\\\there _ self privateCards identityIndexOf: self currentCard ifAbsent: [1].\\\\n\\\\tfromHereOn _ here+1 to: self privateCards size.\\\\n\\\\tstartToHere _ 1 to: here.\\\\t\\\\t\\\\\\\"repeat this page\\\\\\\"\\\\n\\\\t(self valueOfProperty: #searchKey ifAbsent: [#()]) = wants ifTrue: [\\\\n\\\\t\\\\t\\\\\\\"does page have all the other keys?  No highlight if found!!\\\\\\\"\\\\n\\\\t\\\\totherKeys _ wants allButFirst.\\\\n\\\\t\\\\tstrings _ allText at: here.\\\\n\\\\t\\\\tgood _ true.\\\\n\\\\t\\\\totherKeys do: [:searchString | \\\\\\\"each key\\\\\\\"\\\\n\\\\t\\\\t\\\\tgood ifTrue: [thisWord _ false.\\\\n\\\\t\\\\t\\\\t\\\\tstrings do: [:longString |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(longString findWordStart: searchString startingAt: 1) > 0 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tthisWord _ true]].\\\\n\\\\t\\\\t\\\\t\\\\tgood _ thisWord]].\\\\n\\\\t\\\\tgood ifTrue: [\\\\\\\"all are on this page.  Look in rest for string again.\\\\\\\"\\\\n\\\\t\\\\t\\\\toldContainer _ self valueOfProperty: #searchContainer.\\\\n\\\\t\\\\t\\\\toldIndex _ self valueOfProperty: #searchOffset.\\\\n\\\\t\\\\t\\\\t(self findText: (OrderedCollection with: wants first) inStrings: strings\\\\t\\\\n\\\\t\\\\t\\\\t\\\\tstartAt: oldIndex+1 container: oldContainer \\\\n\\\\t\\\\t\\\\t\\\\tcardNum: here) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself setProperty: #searchKey toValue: wants.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ true]]]\\\\n\\\\t\\\\tifFalse: [fromHereOn _ here to: self privateCards size].\\\\t\\\\\\\"do search this page\\\\\\\"\\\\n\\\\t\\\\\\\"other pages\\\\\\\"\\\\n\\\\tfromHereOn do: [:cardNum |\\\\n\\\\t\\\\t(self findText: wants inStrings: (allText at: cardNum) startAt: 1 container: nil \\\\n\\\\t\\\\t\\\\t\\\\tcardNum: cardNum) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [^ true]].\\\\n\\\\tstartToHere do: [:cardNum |\\\\n\\\\t\\\\t(self findText: wants inStrings: (allText at: cardNum) startAt: 1 container: nil \\\\n\\\\t\\\\t\\\\t\\\\tcardNum: cardNum) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [^ true]].\\\\n\\\\t\\\\\\\"if fail\\\\\\\"\\\\n\\\\tself setProperty: #searchContainer toValue: nil.\\\\n\\\\tself setProperty: #searchOffset toValue: nil.\\\\n\\\\tself setProperty: #searchKey toValue: nil.\\\\n\\\\t^ false! !\\\\n\\\\n!StackMorph methodsFor: 'menu' stamp: 'gm 2/22/2003 13:13'!\\\\nfindText: keys inStrings: rawStrings startAt: startIndex container: oldContainer cardNum: cardNum \\\\n\\\\t\\\\\\\"Call once to search a card of the stack.  Return true if found and highlight the text.  oldContainer should be NIL.  \\\\n\\\\t(oldContainer is only non-nil when (1) doing a 'search again' and (2) the page is in memory and (3) keys has just one element.  oldContainer is a TextMorph.)\\\\\\\"\\\\n\\\\n\\\\t| good thisWord index insideOf place container start strings old |\\\\n\\\\tgood := true.\\\\n\\\\tstart := startIndex.\\\\n\\\\tstrings := oldContainer ifNil: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"normal case\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\trawStrings]\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil: [self currentPage allStringsAfter: oldContainer text].\\\\n\\\\tkeys do: \\\\n\\\\t\\\\t\\\\t[:searchString | \\\\n\\\\t\\\\t\\\\t\\\\\\\"each key\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\tgood \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[thisWord := false.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstrings do: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:longString | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(index := longString findWordStart: searchString startingAt: start) > 0 \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[thisWord not & (searchString == keys first) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[insideOf := longString.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tplace := index].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tthisWord := true].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstart := 1].\\\\t\\\\\\\"only first key on first container\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tgood := thisWord]].\\\\n\\\\tgood \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"all are on this page\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\\\\"wasIn _ (pages at: pageNum) isInMemory.\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\tself goToCardNumber: cardNum\\\\n\\\\t\\\\t\\\\t\\\\\\\"wasIn ifFalse: ['search again, on the real current text.  Know page is in.'.\\\\n\\\\t\\\\t\\\\t^ self findText: keys \\\\n\\\\t\\\\t\\\\t\\\\tinStrings: ((pages at: pageNum) allStringsAfter: nil)         recompute it\\\\t\\\\n\\\\t\\\\t\\\\t\\\\tstartAt: startIndex container: oldContainer \\\\n\\\\t\\\\t\\\\t\\\\tpageNum: pageNum]\\\\\\\"].\\\\n\\\\t(old := self valueOfProperty: #searchContainer) ifNotNil: \\\\n\\\\t\\\\t\\\\t[(old respondsTo: #editor) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[old editor selectFrom: 1 to: 0.\\\\t\\\\\\\"trying to remove the previous selection!!\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\told changed]].\\\\n\\\\tgood \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"have the exact string object\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t(container := oldContainer) ifNil: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[container := self \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\thighlightText: keys first\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tat: place\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tin: insideOf]\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[container userString == insideOf \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[container := self \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\thighlightText: keys first\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tat: place\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tin: insideOf]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[(container isTextMorph) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[container editor selectFrom: place to: keys first size - 1 + place.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcontainer changed]]].\\\\n\\\\t\\\\t\\\\tself setProperty: #searchContainer toValue: container.\\\\n\\\\t\\\\t\\\\tself setProperty: #searchOffset toValue: place.\\\\n\\\\t\\\\t\\\\tself setProperty: #searchKey toValue: keys.\\\\t\\\\\\\"override later\\\\\\\"\\\\n\\\\t\\\\t\\\\tActiveHand newKeyboardFocus: container.\\\\n\\\\t\\\\t\\\\t^true].\\\\n\\\\t^false! !\\\\n\\\\n!StackMorph methodsFor: 'menu' stamp: 'em 3/31/2005 10:20'!\\\\nfindViaTemplate\\\\n\\\\t| list pl cardInst |\\\\n\\\\t\\\\\\\"Current card is the template.  Only search cards in this background. Look at cards directly (not allText). Key must be found in the same field as in the template.  HyperCard style (multiple starts of words).  \\\\n\\\\tPut results in a list, outside the stack.\\\\\\\"\\\\n\\\\n\\\\tlist _ self templateMatches.\\\\n\\\\tlist isEmpty ifTrue: [^ self inform: 'No matches were found.\\\\nBe sure the current card is mostly blank\\\\nand only has text you want to match.' translated]. \\\\n\\\\t\\\\\\\"put up a PluggableListMorph\\\\\\\"\\\\n\\\\tcardInst _ self currentCard.\\\\n\\\\tcardInst matchIndex: 0.\\\\t\\\\\\\"establish entries\\\\\\\"\\\\n\\\\tcardInst results at: 1 put: list.\\\\n\\\\tself currentPage setProperty: #myStack toValue: self.\\\\t\\\\\\\"way to get back\\\\\\\"\\\\n\\\\n\\\\tpl _ PluggableListMorph new\\\\n\\\\t\\\\t\\\\ton: cardInst list: #matchNames\\\\n\\\\t\\\\t\\\\tselected: #matchIndex changeSelected: #matchIndex:\\\\n\\\\t\\\\t\\\\tmenu: nil \\\\\\\"#matchMenu:shifted:\\\\\\\" keystroke: nil.\\\\n\\\\tActiveHand attachMorph: (self formatList: pl).\\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'menu' stamp: 'tk 6/2/2001 11:40'!\\\\nformatList: pl\\\\n\\\\t| rr ff |\\\\n\\\\t\\\\\\\"Turn this plugglable list into a good looking morph.\\\\\\\"\\\\n\\\\n\\\\tpl color: Color transparent; borderWidth: 0.\\\\n\\\\tpl font: ((TextStyle named: #Palatino) fontOfSize: 14).\\\\n\\\\tpl toggleCornerRounding; width: 252; retractableOrNot; hResizing: #spaceFill.\\\\n\\\\trr _ (RectangleMorph new) toggleCornerRounding; extent: pl extent + (30@30).\\\\n\\\\trr color: self currentPage color; fillStyle: (ff _ self currentPage fillStyle copy).\\\\n\\\\tff isGradientFill ifTrue: [\\\\n\\\\t\\\\trr fillStyle direction: (ff direction * self currentPage extent / rr extent) rounded.\\\\n\\\\t\\\\trr fillStyle origin: rr bounds origin].\\\\n\\\\trr addMorph: pl.\\\\n\\\\trr layoutPolicy: TableLayout new.\\\\n\\\\trr layoutInset: 10@15; cellInset: 10@15; wrapDirection: #leftToRight.\\\\n\\\\trr listCentering: #center; borderWidth: 5; borderColor: #raised.\\\\n\\\\t\\\\\\\"Up and down buttons on left with arrows in a holder.\\\\\\\"\\\\n\\\\t\\\\\\\"lb _ (RectangleMorph new) color: transparent; borderWidth: 0.\\\\\\\"\\\\n\\\\t^ rr! !\\\\n\\\\n!StackMorph methodsFor: 'menu' stamp: 'sw 3/18/2002 02:07'!\\\\ngetAllText\\\\n\\\\t\\\\\\\"Collect the text for each card.  Just point at strings so don't have to recopy them.  (Parallel array of urls for ID of cards.  Remote cards not working yet.)\\\\n\\\\tallText = Array (cards size) of arrays (fields in it) of strings of text.\\\\n\\\\tallTextUrls = Array (cards size) of urls or card numbers.\\\\\\\"\\\\n\\\\n\\\\t| oldUrls oldStringLists allText allTextUrls aUrl which |\\\\n\\\\tself writeSingletonData.\\\\n\\\\toldUrls _ self valueOfProperty: #allTextUrls ifAbsent: [#()].\\\\n\\\\toldStringLists _ self valueOfProperty: #allText ifAbsent: [#()].\\\\n\\\\tallText _ self privateCards collect: [:pg | OrderedCollection new].\\\\n\\\\tallTextUrls _ Array new: self privateCards size.\\\\n\\\\tself privateCards doWithIndex: [:aCard :ind | aUrl _ aCard url.  aCard isInMemory \\\\n\\\\t\\\\tifTrue: [(allText at: ind) addAll: (aCard allStringsAfter: nil).\\\\n\\\\t\\\\t\\\\taUrl ifNil: [aUrl _ ind].\\\\n\\\\t\\\\t\\\\tallTextUrls at: ind put: aUrl]\\\\n\\\\t\\\\tifFalse: [\\\\\\\"Order of cards on server may be different.  (later keep up to date?)\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\\\\"*** bug in this algorithm if delete a page?\\\\\\\"\\\\n\\\\t\\\\t\\\\twhich _ oldUrls indexOf: aUrl.\\\\n\\\\t\\\\t\\\\tallTextUrls at: ind put: aUrl.\\\\n\\\\t\\\\t\\\\twhich = 0 ifFalse: [allText at: ind put: (oldStringLists at: which)]]].\\\\n\\\\tself setProperty: #allText toValue: allText.\\\\n\\\\tself setProperty: #allTextUrls toValue: allTextUrls.\\\\n\\\\t^ allText! !\\\\n\\\\n!StackMorph methodsFor: 'menu' stamp: 'dgd 9/29/2004 20:47'!\\\\ninvokeBookMenu\\\\n\\\\t\\\\\\\"Invoke the book's control panel menu.\\\\\\\"\\\\n\\\\n\\\\t| aMenu |\\\\n\\\\taMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\taMenu addTitle: 'Stack' translated.\\\\n\\\\tPreferences noviceMode\\\\n\\\\t\\\\tifFalse: [aMenu addStayUpItem].\\\\n\\\\taMenu addList: {\\\\n\\\\t\\\\t{'find...' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#textSearch}.\\\\n\\\\t\\\\t{'find via this template' translated.\\\\t\\\\t\\\\t#findViaTemplate}.\\\\n\\\\t\\\\t{'show designations' translated. \\\\t\\\\t\\\\t#showDesignationsOfObjects}.\\\\n\\\\t\\\\t{'explain designations' translated.\\\\t\\\\t\\\\t#explainDesignations}.\\\\n\\\\t\\\\t#-.\\\\n\\\\t\\\\t{'previous card' translated. \\\\t\\\\t\\\\t\\\\t#goToPreviousCardInStack}.\\\\n\\\\t\\\\t{'next card' translated. \\\\t\\\\t\\\\t\\\\t#goToNextCardInStack}.\\\\n\\\\t\\\\t{'first card' translated. \\\\t\\\\t\\\\t\\\\t#goToFirstCardOfStack}.\\\\n\\\\t\\\\t{'last card' translated. \\\\t\\\\t\\\\t\\\\t#goToLastCardOfStack}.\\\\n\\\\t\\\\t{'go to card...' translated. \\\\t\\\\t\\\\t\\\\t#goToCard}.\\\\n\\\\t\\\\t#-.\\\\n\\\\t\\\\t{'add a card of this background' translated. \\\\t\\\\t#insertCard}.\\\\n\\\\t\\\\t{'add a card of background...' translated.\\\\t\\\\t#insertCardOfBackground}.\\\\n\\\\t\\\\t{'make a new background...' translated. \\\\t\\\\t#makeNewBackground}.\\\\n\\\\t\\\\t#-.\\\\n\\\\t\\\\t{'insert cards from clipboard data' translated.\\\\t\\\\t#addCardsFromClipboardData.\\\\t'Create new cards from a formatted string on the clipboard' translated}.\\\\n\\\\t\\\\t{'insert cards from a file...' translated.\\\\t\\\\t#addCardsFromAFile.\\\\t\\\\t'Create new cards from data in a file' translated}.\\\\n\\\\t\\\\t#-.\\\\n\\\\t\\\\t{'instance variable order...' translated.\\\\t\\\\t#changeInstVarOrder.\\\\t\\\\t'Caution -- DANGER. Change the order of the variables on the cards' translated}.\\\\n\\\\t\\\\t{'be defaults for new cards' translated. \\\\t\\\\t#beDefaultsForNewCards.\\\\t\\\\t'Make these current field values be the defaults for their respective fields on new cards' translated}.\\\\n\\\\t\\\\t    {'sort cards by...' translated.\\\\t\\\\t\\\\t#sortCards.\\\\t\\\\t\\\\t'Sort all the cards of the current background using some field as the sort key' translated}.\\\\n\\\\t\\\\t#-.\\\\n\\\\t\\\\t{'delete this card' translated. \\\\t\\\\t\\\\t#deleteCard}.\\\\n\\\\t\\\\t{'delete all cards *except* this one' translated.\\\\t#deleteAllCardsExceptThisOne}.\\\\n\\\\t\\\\t#-.\\\\n\\\\t\\\\t{'move card to front of stack' translated.\\\\t\\\\t#makeCurrentCardFirstInStack}.\\\\n\\\\t\\\\t{'move card to back of stack' translated.\\\\t\\\\t#makeCurrentCardLastInStack}.\\\\n\\\\t\\\\t{'move card one position earlier' translated.\\\\t\\\\t#moveCardOnePositionEarlier}.\\\\n\\\\t\\\\t{'move card one position later' translated.\\\\t\\\\t#moveCardOnePositionLater}.\\\\n\\\\t\\\\t#-.\\\\n\\\\t\\\\t{'scripts for this background' translated.\\\\t\\\\t#browseCardClass}.\\\\n\\\\t\\\\t#-.\\\\n\\\\t\\\\t{'debug...' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#offerStackDebugMenu}.\\\\n\\\\t\\\\t{'bookish items...' translated. \\\\t\\\\t\\\\t#offerBookishMenu}}.\\\\n\\\\n\\\\taMenu addUpdating: #showingPageControlsString action: #toggleShowingOfPageControls.\\\\n\\\\taMenu addUpdating: #showingFullScreenString action: #toggleFullScreen.\\\\n\\\\n\\\\taMenu popUpEvent: self world activeHand lastEvent in: self world\\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'menu' stamp: 'dgd 4/4/2006 16:49'!\\\\nofferBookishMenu\\\\n\\\\t\\\\\\\"Offer a menu with book-related items in it\\\\\\\"\\\\n\\\\n\\\\t| aMenu |\\\\n\\\\taMenu := MenuMorph new defaultTarget: self.\\\\n\\\\taMenu addTitle: 'Stack / Book' translated.\\\\n\\\\tPreferences noviceMode\\\\n\\\\t\\\\tifFalse: [aMenu addStayUpItem].\\\\n\\\\taMenu addList:\\\\n\\\\t\\\\t#(('sort pages' sortPages)\\\\n\\\\t\\\\t('uncache page sorter' uncachePageSorter)).\\\\n\\\\t(self hasProperty: #dontWrapAtEnd)\\\\n\\\\t\\\\tifTrue: [aMenu add: 'wrap after last page' translated selector: #setWrapPages: argument: true]\\\\n\\\\t\\\\tifFalse: [aMenu add: 'stop at last page' translated selector: #setWrapPages: argument: false].\\\\n\\\\taMenu addList:\\\\n\\\\t\\\\t#(('make bookmark'\\\\t bookmarkForThisPage)\\\\n\\\\t\\\\t('make thumbnail' thumbnailForThisPage)).\\\\n\\\\n\\\\taMenu addLine.\\\\n\\\\taMenu add: 'sound effect for all pages' translated action: #menuPageSoundForAll:.\\\\n\\\\taMenu add: 'sound effect this page only' translated action: #menuPageSoundForThisPage:.\\\\n\\\\taMenu add: 'visual effect for all pages' translated action: #menuPageVisualForAll:.\\\\n\\\\taMenu add: 'visual effect this page only' translated action: #menuPageVisualForThisPage:.\\\\n\\\\n\\\\taMenu addLine.\\\\n\\\\t(self primaryHand pasteBuffer class isKindOf: PasteUpMorph class) ifTrue:\\\\n\\\\t\\\\t[aMenu add: 'paste book page'   translated action: #pasteBookPage].\\\\n\\\\n\\\\taMenu add: 'save as new-page prototype' translated action: #setNewPagePrototype.\\\\n\\\\tnewPagePrototype ifNotNil: [\\\\n\\\\t\\\\taMenu add: 'clear new-page prototype' translated action: #clearNewPagePrototype].\\\\n\\\\n\\\\taMenu add: (self dragNDropEnabled ifTrue: ['close' translated ] ifFalse: ['open' translated]) , ' dragNdrop' translated\\\\n\\\\t\\\\t\\\\taction: #toggleDragNDrop.\\\\n\\\\taMenu addLine.\\\\n\\\\taMenu add: 'make all pages this size' translated action: #makeUniformPageSize.\\\\n\\\\taMenu addUpdating: #keepingUniformPageSizeString target: self action: #toggleMaintainUniformPageSize.\\\\n\\\\taMenu addLine.\\\\n\\\\taMenu add: 'send all pages to server' translated action: #savePagesOnURL.\\\\n\\\\taMenu add: 'send this page to server' translated action: #saveOneOnURL.\\\\n\\\\taMenu add: 'reload all from server' translated action: #reload.\\\\n\\\\taMenu add: 'copy page url to clipboard' translated action: #copyUrl.\\\\n\\\\taMenu add: 'keep in one file' translated action: #keepTogether.\\\\n\\\\n\\\\taMenu addLine.\\\\n\\\\taMenu add: 'load PPT images from slide #1' translated action: #loadImagesIntoBook.\\\\n\\\\taMenu add: 'background color for all pages...' translated action: #setPageColor.\\\\n\\\\n\\\\taMenu popUpEvent: self world activeHand lastEvent in: self world\\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'menu' stamp: 'dgd 9/29/2004 20:47'!\\\\nofferStackDebugMenu\\\\n\\\\t\\\\\\\"Put up a menu offering debugging items for the stack\\\\\\\"\\\\n\\\\n\\\\t| aMenu |\\\\n\\\\taMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\taMenu addTitle: 'Stack debugging'.\\\\n\\\\tPreferences noviceMode\\\\n\\\\t\\\\tifFalse: [aMenu addStayUpItem].\\\\n\\\\taMenu addList: #(\\\\n\\\\t\\\\t('reassess'\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\treassessBackgroundShape)\\\\n\\\\t\\\\t('relax grip on variable names'\\\\t\\\\t\\\\trelaxGripOnVariableNames)\\\\n\\\\t\\\\t('commit card data'\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcommitCardData)\\\\n\\\\t\\\\t-\\\\n\\\\t\\\\t('browse card uniclass'\\\\t\\\\t\\\\t\\\\t\\\\tbrowseCardClass)\\\\n\\\\t\\\\t('inspect card'\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinspectCurrentCard)\\\\n\\\\t\\\\t('inspect background'\\\\t\\\\t\\\\t\\\\t\\\\tinspectCurrentBackground)\\\\n\\\\t\\\\t('inspect stack'\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinspectCurrentStack)).\\\\n\\\\taMenu popUpInWorld: (self world ifNil: [self currentWorld])\\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'menu' stamp: 'sw 3/18/2002 01:58'!\\\\ntemplateMatches\\\\n\\\\t| template docks keys bkg |\\\\n\\\\t\\\\\\\"Current card is the template.  Only search cards in this background. Look at cards directly (not allText). Key must be found in the same field as in the template.  HyperCard style (multiple starts of words).  \\\\n\\\\tPut results in a list, outside the stack.\\\\\\\"\\\\n\\\\n\\\\ttemplate _ self currentCard.\\\\n\\\\ttemplate commitCardPlayerData.\\\\n\\\\tdocks _ template class variableDocks.\\\\n\\\\t(keys _ template asKeys) ifNil: [^ #()]. \\\\\\\"nothing to match against\\\\\\\"\\\\n\\\\tbkg _ self currentPage.\\\\n\\\\t^ self privateCards select: [:cardPlayer | \\\\n\\\\t\\\\t(((cardPlayer == template) not) and: [cardPlayer costume == bkg]) \\\\n\\\\t\\\\t\\\\tand: [cardPlayer match: keys fields: docks]].\\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'menu' stamp: 'sw 3/18/2002 02:00'!\\\\nwriteSingletonData\\\\n\\\\t\\\\\\\"Backgrounds that have just one card, may never get their data written into a CardPlayer. Make sure we do it.\\\\\\\"\\\\n\\\\n\\\\t| sieve |\\\\n\\\\tsieve _ IdentityDictionary new.\\\\n\\\\tpages do: [:pp | sieve at: pp put: 0].\\\\n\\\\tself privateCards do: [:cc | sieve at: cc costume put: (sieve at: cc costume) + 1].\\\\n\\\\tsieve associationsDo: [:ass | \\\\n\\\\t\\\\tass value = 1 ifTrue:\\\\n\\\\t\\\\t\\\\t[ass key player commitCardPlayerDataFrom: ass key]].\\\\n\\\\t\\\\t\\\\t\\\\\\\"If currently showing card, may be some trouble... <- tk note 5/01\\\\\\\"! !\\\\n\\\\n\\\\n!StackMorph methodsFor: 'page controls' stamp: 'sw 6/6/2003 13:59'!\\\\naddPageControlMorph: aMorph\\\\n\\\\n\\\\t\\\\\\\"Add the given morph as a page-control, at the appropriate place\\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\taMorph setProperty: #pageControl toValue: true.\\\\n\\\\n\\\\tself addPane: aMorph paneType: #pageControl! !\\\\n\\\\n!StackMorph methodsFor: 'page controls' stamp: 'tk 11/5/2001 08:21'!\\\\nfullControlSpecs\\\\n\\\\t\\\\\\\"Answer specifications for the long form of iconic stack/book controls\\\\\\\"\\\\n\\\\n\\\\t^ #(\\\\n\\\\t\\\\tspacer\\\\n\\\\t\\\\tvariableSpacer\\\\n\\\\t\\\\t('-'\\\\t\\\\t\\\\tdeleteCard\\\\t\\\\t\\\\t\\\\t\\\\t'Delete this card')\\\\n\\\\t\\\\tspacer\\\\n\\\\t\\\\t( '\\\\U00ab'\\\\t\\\\tgoToFirstCardOfStack\\\\t\\\\t\\\\t'First card')\\\\n\\\\t\\\\tspacer\\\\n\\\\t\\\\t( '<' \\\\t\\\\tgoToPreviousCardInStack\\\\t\\\\t'Previous card')\\\\n\\\\t\\\\tspacer\\\\n\\\\t\\\\t('\\\\U00b7'\\\\t\\\\t\\\\tinvokeBookMenu \\\\t\\\\t\\\\t'Click here to get a menu of options for this stack.')\\\\n\\\\t\\\\t\\\\\\\"spacer\\\\t('\\\\U00b6'\\\\t\\\\t\\\\treshapeBackground  \\\\t\\\\t'Reshape')\\\\t\\\\\\\"\\\\n\\\\n\\\\t\\\\tspacer\\\\n\\\\t\\\\t('\\\\U00a7'\\\\t\\\\t\\\\tshowDesignationsOfObjects \\\\t'Show designations')\\\\n\\\\t\\\\tspacer\\\\n\\\\t\\\\t('>'\\\\t\\\\t\\\\tgoToNextCardInStack\\\\t\\\\t\\\\t'Next card')\\\\n\\\\t\\\\tspacer\\\\n\\\\t\\\\t( '\\\\U00bb'\\\\t\\\\tgoToLastCardOfStack\\\\t\\\\t\\\\t'Final card')\\\\n\\\\t\\\\tspacer\\\\n\\\\t\\\\t('+'\\\\t\\\\t\\\\tinsertCard\\\\t\\\\t\\\\t\\\\t\\\\t'Add a new card after this one')\\\\n\\\\t\\\\tvariableSpacer\\\\n\\\\t\\\\t('\\\\U00b3'\\\\t\\\\t\\\\tfewerPageControls\\\\t\\\\t\\\\t'Fewer controls\\\\n(if shift key pressed,\\\\ndeletes controls)')\\\\n)! !\\\\n\\\\n!StackMorph methodsFor: 'page controls' stamp: 'sw 10/30/2000 10:09'!\\\\nshortControlSpecs\\\\n\\\\t\\\\\\\"Answer specficiations for the shorter form of stack controls\\\\\\\"\\\\n\\\\n\\\\t^ #(\\\\n\\\\t\\\\tspacer\\\\n\\\\t\\\\tvariableSpacer\\\\n\\\\t\\\\t( '<'\\\\t\\\\tgoToPreviousCardInStack\\\\t\\\\t'Previous card')\\\\n\\\\t\\\\tspacer\\\\n\\\\t\\\\t('\\\\U00b7'\\\\t\\\\tinvokeBookMenu \\\\t\\\\t\\\\t'Click here to get a menu for this stack.')\\\\n\\\\t\\\\tspacer\\\\n\\\\t\\\\t('>'\\\\t\\\\tgoToNextCardInStack\\\\t\\\\t\\\\t'Next card')\\\\n\\\\t\\\\tvariableSpacer\\\\n\\\\t\\\\t('\\\\U00b3'\\\\tshowMoreControls\\\\t\\\\t\\\\t\\\\t'More controls\\\\n(if shift key pressed,\\\\ndeletes controls)'))! !\\\\n\\\\n\\\\n!StackMorph methodsFor: 'parts bin' stamp: 'sw 8/2/2001 18:14'!\\\\ninitializeToStandAlone\\\\n\\\\t\\\\n\\\\tself initialize.\\\\n\\\\tself pageSize: (480 @ 320); color: (Color gray: 0.7).\\\\n\\\\tself borderWidth: 1; borderColor: Color black.\\\\n\\\\tself currentPage extent: self pageSize.\\\\n\\\\tself showPageControls: self fullControlSpecs.\\\\n\\\\t^ self\\\\n\\\\n\\\\\\\"StackMorph initializedInstance openInHand\\\\\\\"! !\\\\n\\\\n\\\\n!StackMorph methodsFor: 'submorphs-accessing' stamp: 'sw 3/18/2002 02:20'!\\\\nallNonSubmorphMorphs\\\\n\\\\t\\\\\\\"Return a collection containing all morphs in this morph which are not currently in the submorph containment hierarchy.  Especially the non-showing pages in BookMorphs.\\\\\\\"\\\\n\\\\n\\\\t| coll |\\\\n\\\\tcoll _ OrderedCollection new.\\\\n\\\\tself privateCards do: [:cd | \\\\n\\\\t\\\\tcd privateMorphs ifNotNil: [coll addAll: cd privateMorphs]].\\\\n\\\\t^ coll! !\\\\n\\\\n!StackMorph methodsFor: 'submorphs-accessing' stamp: 'sw 6/5/2003 04:01'!\\\\ninsertionIndexForPaneOfType: aType\\\\n\\\\n\\\\t| naturalIndex insertionIndex |\\\\n\\\\n\\\\tnaturalIndex _ self naturalPaneOrder indexOf: aType.\\\\n\\\\n\\\\tinsertionIndex _ 1.\\\\n\\\\n\\\\t(self naturalPaneOrder copyFrom: 1 to: (naturalIndex - 1)) do: \\\\\\\"guys that would precede\\\\\\\"\\\\n\\\\n\\\\t\\\\t[:sym | (self hasSubmorphWithProperty: sym)\\\\n\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t[insertionIndex _ insertionIndex + 1]].\\\\n\\\\n\\\\t^ insertionIndex! !\\\\n\\\\n!StackMorph methodsFor: 'submorphs-accessing' stamp: 'sw 6/5/2003 04:02'!\\\\nnaturalPaneOrder\\\\n\\\\n\\\\t^ #(header pageControl retrieve search index content)! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStackMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StackMorph class methodsFor: 'authoring prototype' stamp: 'nk 7/12/2003 08:59'!\\\\ndesignationsExplainer\\\\n\\\\t\\\\\\\"Answer a morph that contains designation explanation\\\\\\\"\\\\n\\\\n\\\\t| aMorph aSwatch aTextMorph |\\\\n\\\\taMorph _ AlignmentMorph newColumn color: Color black; layoutInset: 1.\\\\n\\\\t#((green\\\\t\\\\t\\\\n'Shared items on\\\\nBackground.\\\\nExact same item\\\\nshared by every card')\\\\n\\\\t(orange\\\\n'Data items on\\\\nBackground\\\\nEach card has its\\\\nown data')\\\\n\\\\t(red\\\\n'Instance-specific\\\\nitems\\\\nunique\\\\nto this card')) do:\\\\n\\\\n\\\\t[:aPair |\\\\n\\\\t\\\\taSwatch _ AlignmentMorph new extent: 132 @80; color: (Color perform: aPair first); lock.\\\\n\\\\t\\\\taSwatch hResizing: #rigid; vResizing: #rigid; layoutInset: 0.\\\\n\\\\t\\\\taSwatch borderColor: Color black.\\\\n\\\\t\\\\taTextMorph _ TextMorph new string: aPair second fontName: Preferences standardEToysFont familyName size: 18.\\\\n\\\\t\\\\taTextMorph width: 130.\\\\n\\\\t\\\\taTextMorph centered.\\\\n\\\\t\\\\taSwatch addMorphBack: aTextMorph.\\\\n\\\\t\\\\taMorph addMorphBack: aSwatch].\\\\n\\\\taMorph hResizing: #shrinkWrap; vResizing: #shrinkWrap.\\\\n\\\\n\\\\t^ aMorph\\\\n\\\\n\\\\t\\\\\\\"StackMorph designationsExplainer openInHand\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!StackMorph class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 11:30'!\\\\ninitialize\\\\n\\\\n\\\\tself registerInFlapsRegistry.\\\\t! !\\\\n\\\\n!StackMorph class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 11:36'!\\\\nregisterInFlapsRegistry\\\\n\\\\t\\\\\\\"Register the receiver in the system's flaps registry\\\\\\\"\\\\n\\\\tself environment\\\\n\\\\t\\\\tat: #Flaps\\\\n\\\\t\\\\tifPresent: [:cl | cl registerQuad: #(StackMorph\\\\tauthoringPrototype\\\\t'Stack'\\\\t\\\\t'A multi-card data base'\\\\t)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'Scripting'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcl registerQuad: #(StackMorph\\\\tauthoringPrototype\\\\t'Stack'\\\\t\\\\t'A multi-card data base'\\\\t)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'Stack Tools'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcl registerQuad: #(StackMorph\\\\tstackHelpWindow\\\\t'Stack Help'\\\\t'Some hints about how to use Stacks')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'Stack Tools'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcl registerQuad: #(StackMorph\\\\tpreviousCardButton\\\\t'Previous Card'\\\\t'A button that takes the user to the previous card in the stack')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'Stack Tools'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcl registerQuad: #(StackMorph\\\\tnextCardButton\\\\t'Next Card'\\\\t\\\\t'A button that takes the user to the next card in the stack')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'Stack Tools']! !\\\\n\\\\n!StackMorph class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 12:40'!\\\\nunload\\\\n\\\\t\\\\\\\"Unload the receiver from global registries\\\\\\\"\\\\n\\\\n\\\\tself environment at: #Flaps ifPresent: [:cl |\\\\n\\\\tcl unregisterQuadsWithReceiver: self] ! !\\\\n\\\\n\\\\n!StackMorph class methodsFor: 'misc' stamp: 'tk 12/14/2001 19:23'!\\\\ndiscoverSlots: aMorph\\\\n\\\\t\\\\\\\"Examine the parts of the morph for ones that couldHoldSeparateData.  Return a pair of lists: Named morphs, and unnamed morphs (which may be labels, and non-data).  Examine all submorphs.\\\\\\\"\\\\n\\\\n\\\\t| named unnamed got sn generic |\\\\n\\\\tnamed _ OrderedCollection new.\\\\n\\\\tunnamed _ OrderedCollection new.\\\\n\\\\taMorph submorphsDo: [:direct | \\\\n\\\\t\\\\tgot _ false.\\\\n\\\\t\\\\tdirect allMorphsDo: [:sub |\\\\n\\\\t\\\\t\\\\tsub couldHoldSeparateDataForEachInstance ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t(sn _ sub knownName) ifNotNil: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tgeneric _ (#('Number (fancy)' 'Number (mid)' 'Number (bare)')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tincludes: sn).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(sn beginsWith: 'shared' \\\\\\\"label\\\\\\\") | generic ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnamed add: sub.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tgot _ true]]]].\\\\n\\\\t\\\\tgot ifFalse: [unnamed add: direct]].\\\\n\\\\t^ Array with: named with: unnamed\\\\n\\\\t\\\\t! !\\\\n\\\\n\\\\n!StackMorph class methodsFor: 'navigation buttons' stamp: 'sw 10/27/2000 10:53'!\\\\nnextCardButton\\\\n\\\\t\\\\\\\"Answer a button that advances the user to the next card in the stack\\\\\\\"\\\\n\\\\n\\\\t| aButton |\\\\n\\\\taButton _ SimpleButtonMorph new.\\\\n\\\\taButton target: aButton; actionSelector: #goToNextCardInStack; label: '>'; color: Color yellow; borderWidth: 0.\\\\n\\\\taButton setNameTo: 'next'.\\\\n\\\\t^ aButton! !\\\\n\\\\n!StackMorph class methodsFor: 'navigation buttons' stamp: 'sw 10/27/2000 10:53'!\\\\npreviousCardButton\\\\n\\\\t\\\\\\\"Answer a button that will take the user to the preceding card in the stack\\\\\\\"\\\\n\\\\n\\\\t| aButton |\\\\n\\\\taButton _ SimpleButtonMorph new.\\\\n\\\\taButton target: aButton; actionSelector: #goToPreviousCardInStack; label: '<'; color: Color yellow ; borderWidth: 0.\\\\n\\\\taButton setNameTo: 'previous'.\\\\n\\\\t^ aButton! !\\\\n\\\\n\\\\n!StackMorph class methodsFor: 'parts bin' stamp: 'sw 8/2/2001 12:52'!\\\\ndescriptionForPartsBin\\\\n\\\\t^ self partName:\\\\t'Stack'\\\\n\\\\t\\\\tcategories:\\\\t\\\\t#('Presentation')\\\\n\\\\t\\\\tdocumentation:\\\\t'A database of any sort -- slide show, rolodex, and any point in between'! !\\\\n\\\\n!StackMorph class methodsFor: 'parts bin' stamp: 'sw 4/8/2002 09:30'!\\\\nstackHelpWindow\\\\n\\\\t^ (Workspace new contents: 'A \\\\\\\"stack\\\\\\\" is a place where you can create, store, view and retrieve data \\\\\\\"fields\\\\\\\" from a set of \\\\\\\"cards\\\\\\\".  Data that you want to occur on every card (such as a name and an address in an Address Stack) are represented by objects such as \\\\\\\"Simple Text\\\\\\\", \\\\\\\"Fancy Text\\\\\\\", and \\\\\\\"Scrolling Text\\\\\\\" that you obtain from the Stack Tools flap.\\\\n\\\\nWhen you look at a card in a Stack, you may be seeing three different kinds of material.  Press the \\\\U00a7 button in the stack''s controls to see the current designations, and use the \\\\\\\"explain designations\\\\\\\" to get a reminder of what the three different colors mean.\\\\n\\\\U00b7  Things that are designated to be seen on every card, and have the same contents whichever card is being shown. (green)\\\\n\\\\U00b7  Things that are designated to be seen on every card, with each card having its own value for them. (orange)\\\\n\\\\U00b7  Things that are designated to occur only on the particular card at hand. (red)\\\\n\\\\nUse the \\\\\\\"stack/cards\\\\\\\" menu (in an object''s halo menu) to change the designation of any object.  For example, if you have an object that is private to just one card, and you want to make it visible on all cards, use \\\\\\\"place onto background\\\\\\\".  If you further want it to hold a separate value for each separate card, use \\\\\\\"start holding separate data for each instance\\\\\\\".\\\\n\\\\nThe normal sequence to define a Stack''s structure is to obtain a blank Stack, then create your fields by grabbing what you want from the Stack Tools flap and dropping it where you want it in the stack.  For easiest use, give a name to each field (by editing the name in its halo) *before* you put it onto the background..  Those fields that you want to represent the basic data of the stack need to be given names, placed on the background, and then told to hold separate data.\\\\n\\\\nWhen you hit the + button in a stack''s controls, a new card is created with default values in all the fields.  You can arrange for a particular default value to be used in a field -- do this either for one field at a time with \\\\\\\"be default value on new card\\\\\\\", or you can request that the all the values seen on a particular card serve as default by choosing \\\\\\\"be defaults for new cards\\\\\\\" from the stack''s \\\\U00b7 menu.\\\\n\\\\nIt is also possible to have multiple \\\\\\\"backgrounds\\\\\\\" in the same stack -- each different background defines a different data structure, and cards from multiple backgrounds can be freely mixed in the same stack.\\\\n\\\\nBesides text fields, it is also possible to have picture-valued fields -- and potentially fields with data values of any other type as well.')\\\\n\\\\n\\\\tembeddedInMorphicWindowLabeled: 'Stack Help'\\\\n\\\\n\\\\t\\\\\\\"StackMorph stackHelpWindow\\\\\\\"! !\\\\n\\\\n\\\\n!StackMorph class methodsFor: 'scripting' stamp: 'sw 11/2/2002 15:47'!\\\\nadditionsToViewerCategories\\\\n\\\\t\\\\\\\"Answer a list of (<categoryName> <list of category specs>) pairs that characterize the phrases this kind of morph wishes to add to various Viewer categories.\\\\\\\"\\\\n\\\\n\\\\t^ # ((#'stack navigation'\\\\n\\\\t\\\\t\\\\t((command goToNextCardInStack 'Go to the next card')\\\\n\\\\t\\\\t\\\\t(command goToPreviousCardInStack  'Go to the previous card')\\\\n\\\\t\\\\t\\\\t(command goToFirstCardInBackground 'Go to the first card of the current background')\\\\n\\\\t\\\\t\\\\t(command goToFirstCardOfStack 'Go to the first card of the entire stack')\\\\n\\\\t\\\\t\\\\t(command goToLastCardInBackground 'Go to the last card of the current background')\\\\n\\\\t\\\\t\\\\t(command goToLastCardOfStack 'Go to the last card of the entire stack')\\\\n\\\\t\\\\t\\\\t(command deleteCard 'Delete the current card')\\\\n\\\\t\\\\t\\\\t(command insertCard 'Create a new card')\\\\n\\\\t\\\\t\\\\t(slot cardNumber 'The ordinal number of the current card' Number readWrite Player getCardNumber Player setCardNumber:))))! !\\\\n\\\\n!StackMorph class methodsFor: 'scripting' stamp: 'sw 10/9/2000 07:43'!\\\\nauthoringPrototype\\\\n\\\\t\\\\\\\"Answer an instance of the receiver suitable for placing in a parts bin for authors\\\\\\\"\\\\n\\\\t\\\\n\\\\t| book |\\\\n\\\\tbook _ self new markAsPartsDonor.\\\\n\\\\tbook pageSize: (480 @ 320); color: (Color gray: 0.7).\\\\n\\\\tbook borderWidth: 1; borderColor: Color black.\\\\n\\\\tbook currentPage extent: book pageSize.\\\\n\\\\tbook showPageControls: book fullControlSpecs.\\\\n\\\\t^ book\\\\n\\\\n\\\\\\\"self currentHand attachMorph: StackMorph authoringPrototype\\\\\\\"! !\\\\nTestCase subclass: #StackTest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'CollectionsTests-Stack'!\\\\n\\\\n!StackTest methodsFor: 'test' stamp: 'dc 6/21/2006 10:55'!\\\\ntestEmptyError\\\\n\\\\n\\\\t| aStack |\\\\n\\\\taStack := Stack new.\\\\n\\\\tself should: [ aStack top ] raise: Error.\\\\n\\\\tself should: [ aStack pop] raise: Error.\\\\n\\\\t\\\\n\\\\taStack push: 'element'.\\\\n\\\\t\\\\n\\\\tself shouldnt: [ aStack top ] raise: Error.\\\\n\\\\tself shouldnt: [ aStack pop] raise: Error.\\\\n\\\\t\\\\n\\\\t\\\\n\\\\t\\\\\\\"The stack is empty again due to previous pop\\\\\\\"\\\\n\\\\tself should: [ aStack top ] raise: Error.\\\\n\\\\tself should: [ aStack pop] raise: Error.! !\\\\n\\\\n!StackTest methodsFor: 'test' stamp: 'sd 3/21/2006 22:13'!\\\\ntestPop\\\\n\\\\n\\\\t| aStack res elem |\\\\n\\\\telem := 'anElement'.\\\\t\\\\n\\\\taStack := Stack new.\\\\n\\\\tself assert: aStack isEmpty.\\\\n\\\\t\\\\n\\\\taStack push: 'a'.\\\\n\\\\taStack push: elem.\\\\n\\\\tres := aStack pop.\\\\t\\\\n\\\\tself assert: res = elem.\\\\n\\\\tself assert: res == elem.\\\\n\\\\t\\\\n\\\\tself assert: aStack size = 1.\\\\n\\\\taStack pop.\\\\n\\\\tself assert: aStack isEmpty.\\\\n\\\\n! !\\\\n\\\\n!StackTest methodsFor: 'test' stamp: 'sd 3/21/2006 22:13'!\\\\ntestPush\\\\n\\\\t\\\\n\\\\t| aStack |\\\\n\\\\taStack := Stack new.\\\\n\\\\taStack push: 'a'.\\\\n\\\\tself assert: aStack size = 1.\\\\t\\\\n\\\\taStack push: 'b'.\\\\n\\\\tself assert: aStack size = 2.\\\\n\\\\t! !\\\\n\\\\n!StackTest methodsFor: 'test' stamp: 'sd 3/21/2006 22:13'!\\\\ntestSize\\\\n\\\\t\\\\n\\\\t| aStack |\\\\n\\\\taStack := Stack new.\\\\n\\\\tself assert: aStack size = 0.\\\\n\\\\taStack push: 'a'.\\\\n\\\\tself assert: aStack size = 1.\\\\n\\\\taStack push: 'b'.\\\\n\\\\tself assert: aStack size = 2.\\\\n\\\\taStack pop.\\\\n\\\\tself assert: aStack size = 1.\\\\n\\\\taStack pop.\\\\n\\\\tself assert: aStack size = 0.\\\\n\\\\n \\\\n\\\\t\\\\n\\\\n\\\\n! !\\\\n\\\\n!StackTest methodsFor: 'test' stamp: 'sd 3/21/2006 22:13'!\\\\ntestTop\\\\n\\\\n\\\\t| aStack |\\\\n\\\\taStack := Stack new.\\\\n\\\\tself assert: aStack isEmpty.\\\\n\\\\taStack push: 'a'.\\\\n\\\\taStack push: 'b'.\\\\n\\\\tself assert: aStack top = 'b'.\\\\n\\\\tself assert: aStack top = 'b'.\\\\n\\\\tself assert: aStack size = 2.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStackTest class\\\\n\\\\tinstanceVariableNames: 'testSize'!\\\\nSelectionMenu subclass: #StandardFileMenu\\\\n\\\\tinstanceVariableNames: 'canTypeFileName pattern'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-FileList'!\\\\n!StandardFileMenu commentStamp: 'mp 8/15/2005 18:44' prior: 0!\\\\nI represent a SelectionMenu which operates like a modal dialog for selecting files, somewhat similar to the StandardFile dialogs in MacOS and Java Swing.\\\\n\\\\nTry for example, the following:\\\\n\\\\n\\\\tStandardFileMenu oldFile inspect\\\\n\\\\n\\\\tStandardFileMenu oldFileStream inspect\\\\n\\\\n\\\\tStandardFileMenu newFile inspect\\\\n\\\\n\\\\tStandardFileMenu newFileStream inspect\\\\n\\\\t\\\\n\\\\t(StandardFileMenu oldFileMenu: FileDirectory default withPattern: '*') startUpWithCaption: 'Select a file:'\\\\n\\\\t\\\\n\\\\t(StandardFileMenu oldFileMenu: (FileDirectory default) withPatternList: {'*.txt'. '*.changes'}) startUpWithCaption: 'Select a file:'\\\\n!\\\\n\\\\n\\\\n!StandardFileMenu methodsFor: 'basic control sequences' stamp: 'rbb 2/16/2005 16:59'!\\\\nconfirmExistingFiles: aResult\\\\n\\\\n\\\\t|choice|\\\\n\\\\t(aResult directory fileExists: aResult name) ifFalse: [^aResult].\\\\n\\\\t\\\\n\\\\tchoice _ (UIManager default chooseFrom: #('overwrite that file' 'choose another name'\\\\n 'cancel')\\\\n\\\\t\\\\ttitle: aResult name, '\\\\nalready exists.').\\\\n\\\\n\\\\tchoice = 1 ifTrue: [\\\\n\\\\t\\\\taResult directory \\\\n\\\\t\\\\t\\\\tdeleteFileNamed: aResult name\\\\n\\\\t\\\\t\\\\tifAbsent: \\\\n\\\\t\\\\t\\\\t\\\\t[^self startUpWithCaption: \\\\n'Can''t delete ', aResult name, '\\\\nSelect another file'].\\\\n\\\\t\\\\t^aResult].\\\\n\\\\tchoice = 2 ifTrue: [^self startUpWithCaption: 'Select Another File'].\\\\n\\\\t^nil\\\\n ! !\\\\n\\\\n!StandardFileMenu methodsFor: 'basic control sequences' stamp: 'rbb 3/1/2005 11:14'!\\\\ngetTypedFileName: aResult\\\\n\\\\n\\\\t| name |\\\\n\\\\tname := UIManager default \\\\n\\\\t\\\\trequest: 'Enter a new file name' \\\\n\\\\t\\\\tinitialAnswer: ''.\\\\n\\\\tname = '' ifTrue: [^self startUpWithCaption: 'Select a File:' translated].\\\\n\\\\tname := aResult directory fullNameFor: name.\\\\n\\\\t^ StandardFileMenuResult\\\\n\\\\t\\\\t\\\\tdirectory: (FileDirectory forFileName: name)\\\\n\\\\t\\\\t\\\\tname: (FileDirectory localNameFor: name)\\\\n! !\\\\n\\\\n!StandardFileMenu methodsFor: 'basic control sequences' stamp: 'acg 9/28/1999 23:34'!\\\\nstartUpWithCaption: aString at: location\\\\n\\\\n\\\\t|result|\\\\n\\\\tresult _ super startUpWithCaption: aString at: location.\\\\n\\\\tresult ifNil: [^nil].\\\\n\\\\tresult isDirectory ifTrue:\\\\n\\\\t\\\\t[self makeFileMenuFor: result directory.\\\\n\\\\t\\\\t self computeForm.\\\\n\\\\t\\\\t ^self startUpWithCaption: aString at: location].\\\\n\\\\tresult isCommand ifTrue: \\\\n\\\\t\\\\t[result _ self getTypedFileName: result.\\\\n\\\\t\\\\tresult ifNil: [^nil]].\\\\n\\\\tcanTypeFileName ifTrue: [^self confirmExistingFiles: result].\\\\n\\\\t^result\\\\n\\\\t! !\\\\n\\\\n\\\\n!StandardFileMenu methodsFor: 'menu building' stamp: 'di 5/12/2000 10:31'!\\\\ndirectoryNamesString: aDirectory\\\\n\\\\\\\"Answer a string concatenating the directory name strings in aDirectory, each string followed by a '[...]' indicator, and followed by a cr.\\\\\\\"\\\\n\\\\n\\\\t^ String streamContents:\\\\n\\\\t\\\\t[:s | aDirectory directoryNames do: \\\\n\\\\t\\\\t\\\\t\\\\t[:dn | s nextPutAll: dn withBlanksTrimmed , ' [...]'; cr]]\\\\n\\\\n! !\\\\n\\\\n!StandardFileMenu methodsFor: 'menu building' stamp: 'zz 8/15/2005 17:33'!\\\\nfileNamesString: aDirectory\\\\n\\\\\\\"Answer a string concatenating the file name strings in aDirectory, each string followed by a cr.\\\\\\\"\\\\n\\\\n\\\\t^String streamContents:\\\\n\\\\t\\\\t[:s | \\\\n\\\\t\\\\t\\\\taDirectory fileNames do: \\\\n\\\\t\\\\t\\\\t\\\\t[:fn |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpattern do:[:each | (each match: fn) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ts nextPutAll: fn withBlanksTrimmed; cr]]]]\\\\n\\\\t\\\\t! !\\\\n\\\\n!StandardFileMenu methodsFor: 'menu building' stamp: 'zz 8/15/2005 16:28'!\\\\nmakeFileMenuFor: aDirectory\\\\n\\\\\\\"Initialize an instance of me to operate on aDirectory\\\\\\\"\\\\n\\\\n\\\\t| theMenu |\\\\n\\\\tpattern ifNil: [pattern := {'*'}].\\\\n\\\\tCursor wait showWhile: \\\\n\\\\t\\\\t[self \\\\n\\\\t\\\\t\\\\tlabels: \\\\t(self menuLabelsString: aDirectory)\\\\n\\\\t\\\\t\\\\tfont: \\\\t(MenuStyle fontAt: 1) \\\\n\\\\t\\\\t\\\\tlines: \\\\t(self menuLinesArray: aDirectory).\\\\n\\\\t\\\\ttheMenu := self selections: (self menuSelectionsArray: aDirectory)].\\\\n\\\\t^theMenu! !\\\\n\\\\n!StandardFileMenu methodsFor: 'menu building' stamp: 'acg 4/15/1999 21:57'!\\\\nmenuLabelsString: aDirectory\\\\n\\\\\\\"Answer a menu labels object corresponding to aDirectory\\\\\\\"\\\\n\\\\n\\\\t^ String streamContents: \\\\n\\\\t\\\\t[:s | \\\\n\\\\t\\\\t\\\\tcanTypeFileName ifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t[s nextPutAll: 'Enter File Name...'; cr].\\\\n\\\\t\\\\t\\\\ts nextPutAll: (self pathPartsString: aDirectory).\\\\n\\\\t\\\\t\\\\ts nextPutAll: (self directoryNamesString: aDirectory).\\\\n\\\\t\\\\t\\\\ts nextPutAll: (self fileNamesString: aDirectory).\\\\n\\\\t\\\\t\\\\ts skip: -1]! !\\\\n\\\\n!StandardFileMenu methodsFor: 'menu building' stamp: 'tpr 11/28/2003 15:12'!\\\\nmenuLinesArray: aDirectory\\\\n\\\\\\\"Answer a menu lines object corresponding to aDirectory\\\\\\\"\\\\n\\\\n\\\\t| typeCount nameCnt dirDepth|\\\\n\\\\ttypeCount _ canTypeFileName \\\\n\\\\t\\\\tifTrue: [1] \\\\n\\\\t\\\\tifFalse: [0].\\\\n\\\\tnameCnt _ aDirectory directoryNames size.\\\\n\\\\tdirDepth _ aDirectory pathParts size.\\\\n\\\\t^Array streamContents: [:s |\\\\n\\\\t\\\\tcanTypeFileName ifTrue: [s nextPut: 1].\\\\n\\\\t\\\\ts nextPut: dirDepth + typeCount + 1.\\\\n\\\\t\\\\ts nextPut: dirDepth + nameCnt + typeCount + 1]! !\\\\n\\\\n!StandardFileMenu methodsFor: 'menu building' stamp: 'zz 8/15/2005 18:18'!\\\\nmenuSelectionsArray: aDirectory\\\\n\\\\\\\"Answer a menu selections object corresponding to aDirectory.  The object is an array corresponding to each item, each element itself constituting a two-element array, the first element of which contains a selector to operate on and the second element of which contains the parameters for that selector.\\\\\\\"\\\\n\\\\n\\\\t|dirSize|\\\\n\\\\tdirSize := aDirectory pathParts size.\\\\n\\\\t^Array streamContents: [:s |\\\\n\\\\t\\\\tcanTypeFileName ifTrue:\\\\n\\\\t\\\\t\\\\t[s nextPut: (StandardFileMenuResult\\\\n\\\\t\\\\t\\\\t\\\\tdirectory: aDirectory\\\\n\\\\t\\\\t\\\\t\\\\tname: nil)].\\\\n\\\\t\\\\ts nextPut: (StandardFileMenuResult\\\\n\\\\t\\\\t\\\\tdirectory: (FileDirectory root)\\\\n\\\\t\\\\t\\\\tname: '').\\\\n\\\\t\\\\taDirectory pathParts doWithIndex: \\\\n\\\\t\\\\t\\\\t[:d :i | s nextPut: (StandardFileMenuResult\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdirectory: (self \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tadvance: dirSize - i\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcontainingDirectoriesFrom: aDirectory)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tname: '')].\\\\n\\\\t\\\\taDirectory directoryNames do: \\\\n\\\\t\\\\t\\\\t[:dn |  s nextPut: (StandardFileMenuResult\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdirectory: (FileDirectory on: (aDirectory fullNameFor: dn))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tname: '')].\\\\n\\\\t\\\\taDirectory fileNames do: \\\\n\\\\t\\\\t\\\\t[:fn | pattern do: [:pat | (pat match: fn) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ts nextPut: (StandardFileMenuResult\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdirectory: aDirectory\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tname: fn)]]]]! !\\\\n\\\\n!StandardFileMenu methodsFor: 'menu building' stamp: 'acg 4/15/1999 21:03'!\\\\npathPartsString: aDirectory\\\\n\\\\\\\"Answer a string concatenating the path parts strings in aDirectory, each string followed by a cr.\\\\\\\"\\\\n\\\\n\\\\t^String streamContents:\\\\n\\\\t\\\\t[:s | \\\\n\\\\t\\\\t\\\\ts nextPutAll: '[]'; cr.\\\\n\\\\t\\\\t\\\\taDirectory pathParts asArray doWithIndex: \\\\n\\\\t\\\\t\\\\t\\\\t[:part :i |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ts next: i put: $ .\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ts nextPutAll: part withBlanksTrimmed; cr]]! !\\\\n\\\\n\\\\n!StandardFileMenu methodsFor: 'private' stamp: 'acg 4/15/1999 00:32'!\\\\nadvance: anInteger containingDirectoriesFrom: aDirectory\\\\n\\\\n\\\\t| theDirectory |\\\\n\\\\ttheDirectory _ aDirectory.\\\\n\\\\t1 to: anInteger do: [:i | theDirectory _ theDirectory containingDirectory].\\\\n\\\\t^theDirectory! !\\\\n\\\\n!StandardFileMenu methodsFor: 'private' stamp: 'acg 4/15/1999 20:50'!\\\\ncomputeLabelParagraph\\\\n\\\\t\\\\\\\"Answer a Paragraph containing this menu's labels, one per line and centered.\\\\\\\"\\\\n\\\\n\\\\t^ Paragraph withText: labelString asText style: (MenuStyle leftFlush)! !\\\\n\\\\n!StandardFileMenu methodsFor: 'private' stamp: 'acg 4/15/1999 22:03'!\\\\nnewFileFrom: aDirectory\\\\n\\\\n\\\\tcanTypeFileName _ true.\\\\n\\\\t^self makeFileMenuFor: aDirectory! !\\\\n\\\\n!StandardFileMenu methodsFor: 'private' stamp: 'zz 8/15/2005 18:25'!\\\\nnewFileFrom: aDirectory withPatternList: aPatternList\\\\n\\\\n\\\\tcanTypeFileName := true.\\\\n\\\\tpattern := aPatternList.\\\\n\\\\t^self makeFileMenuFor: aDirectory! !\\\\n\\\\n!StandardFileMenu methodsFor: 'private' stamp: 'zz 8/15/2005 16:29'!\\\\nnewFileFrom: aDirectory withPattern: aPattern\\\\n\\\\n\\\\tcanTypeFileName := true.\\\\n\\\\tpattern := {aPattern}.\\\\n\\\\t^self makeFileMenuFor: aDirectory! !\\\\n\\\\n!StandardFileMenu methodsFor: 'private' stamp: 'acg 4/15/1999 22:03'!\\\\noldFileFrom: aDirectory\\\\n\\\\n\\\\tcanTypeFileName _ false.\\\\n\\\\t^self makeFileMenuFor: aDirectory! !\\\\n\\\\n!StandardFileMenu methodsFor: 'private' stamp: 'zz 8/15/2005 17:28'!\\\\noldFileFrom: aDirectory withPatternList: aPatternList\\\\n\\\\n\\\\tcanTypeFileName := false.\\\\n\\\\tpattern := aPatternList.\\\\n\\\\t^self makeFileMenuFor: aDirectory! !\\\\n\\\\n!StandardFileMenu methodsFor: 'private' stamp: 'zz 8/15/2005 16:28'!\\\\noldFileFrom: aDirectory withPattern: aPattern\\\\n\\\\n\\\\tcanTypeFileName := false.\\\\n\\\\tpattern := {aPattern}.\\\\n\\\\t^self makeFileMenuFor: aDirectory! !\\\\n\\\\n!StandardFileMenu methodsFor: 'private' stamp: 'zz 8/15/2005 17:29'!\\\\npatternList: aPatternList\\\\n\\\\n\\\\tpattern := aPatternList! !\\\\n\\\\n!StandardFileMenu methodsFor: 'private' stamp: 'zz 8/15/2005 16:31'!\\\\npattern: aPattern\\\\n\\\\t\\\\\\\" * for all files, or '*.cs' for changeSets, etc.  Just like fileLists\\\\\\\"\\\\n\\\\n\\\\tpattern := {aPattern}! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStandardFileMenu class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StandardFileMenu class methodsFor: 'instance creation' stamp: 'sma 4/30/2000 10:14'!\\\\nnewFileMenu: aDirectory\\\\n\\\\tSmalltalk isMorphic ifFalse: [^ PluggableFileList newFileMenu: aDirectory].\\\\n\\\\t^ super new newFileFrom: aDirectory! !\\\\n\\\\n!StandardFileMenu class methodsFor: 'instance creation' stamp: 'zz 8/15/2005 18:21'!\\\\nnewFileMenu: aDirectory withPatternList: aPatternList\\\\n\\\\tSmalltalk isMorphic ifFalse: [^ PluggableFileList newFileMenu: aDirectory].\\\\n\\\\t^ super new newFileFrom: aDirectory withPatternList: aPatternList! !\\\\n\\\\n!StandardFileMenu class methodsFor: 'instance creation' stamp: 'rww 9/23/2001 09:56'!\\\\nnewFileMenu: aDirectory withPattern: aPattern\\\\n\\\\tSmalltalk isMorphic ifFalse: [^ PluggableFileList newFileMenu: aDirectory].\\\\n\\\\t^ super new newFileFrom: aDirectory withPattern: aPattern! !\\\\n\\\\n!StandardFileMenu class methodsFor: 'instance creation' stamp: 'sma 4/30/2000 10:15'!\\\\noldFileMenu: aDirectory\\\\n\\\\tSmalltalk isMorphic ifFalse: [^ PluggableFileList oldFileMenu: aDirectory].\\\\n\\\\t^ super new oldFileFrom: aDirectory! !\\\\n\\\\n!StandardFileMenu class methodsFor: 'instance creation' stamp: 'zz 8/15/2005 17:41'!\\\\noldFileMenu: aDirectory withPatternList: aPatternList\\\\n\\\\n\\\\tSmalltalk isMorphic ifFalse: [^PluggableFileList oldFileMenu: aDirectory].\\\\n\\\\t^super new oldFileFrom: aDirectory withPatternList: aPatternList! !\\\\n\\\\n!StandardFileMenu class methodsFor: 'instance creation' stamp: 'RAA 5/25/2000 09:30'!\\\\noldFileMenu: aDirectory withPattern: aPattern\\\\n\\\\n\\\\tSmalltalk isMorphic ifFalse: [^PluggableFileList oldFileMenu: aDirectory].\\\\n\\\\t^super new oldFileFrom: aDirectory withPattern: aPattern! !\\\\n\\\\n\\\\n!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'tk 2/14/2000 14:28'!\\\\nnewFile\\\\n\\\\n\\\\t^self newFileFrom: (FileDirectory default)! !\\\\n\\\\n!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'dgd 9/21/2003 13:17'!\\\\nnewFileFrom: aDirectory\\\\n\\\\n\\\\t^(self newFileMenu: aDirectory)\\\\n\\\\t\\\\tstartUpWithCaption: 'Select a File:' translated! !\\\\n\\\\n!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'acg 4/15/1999 22:18'!\\\\nnewFileStream\\\\n\\\\n\\\\t^self newFileStreamFrom: (FileDirectory default)! !\\\\n\\\\n!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'tk 2/14/2000 14:28'!\\\\nnewFileStreamFrom: aDirectory\\\\n\\\\n\\\\t| sfmResult fileStream |\\\\n\\\\tsfmResult _ self newFileFrom: aDirectory.\\\\n\\\\tsfmResult ifNil: [^nil].\\\\n\\\\tfileStream _ sfmResult directory newFileNamed: sfmResult name.\\\\n\\\\t[fileStream isNil] whileTrue:\\\\n\\\\t\\\\t[sfmResult _ self newFileFrom: aDirectory.\\\\n\\\\t\\\\tsfmResult ifNil: [^nil].\\\\n\\\\t\\\\tfileStream _ sfmResult directory newFileNamed: sfmResult name].\\\\n\\\\t^fileStream\\\\n! !\\\\n\\\\n!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'tk 2/14/2000 14:28'!\\\\noldFile\\\\n\\\\n\\\\t^self oldFileFrom: (FileDirectory default)! !\\\\n\\\\n!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'dgd 9/21/2003 13:17'!\\\\noldFileFrom: aDirectory\\\\n\\\\n\\\\t^(self oldFileMenu: aDirectory)\\\\n\\\\t\\\\tstartUpWithCaption: 'Select a File:' translated! !\\\\n\\\\n!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'MM 4/6/2004 22:56'!\\\\noldFileFrom: aDirectory withPattern: aPattern\\\\n\\\\\\\"\\\\nSelect an existing file from a selection conforming to aPattern.\\\\n\\\\\\\"\\\\n\\\\t^(self oldFileMenu: aDirectory withPattern: aPattern)\\\\n\\\\t\\\\tstartUpWithCaption: 'Select a File:' translated! !\\\\n\\\\n!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'acg 4/15/1999 22:17'!\\\\noldFileStream\\\\n\\\\n\\\\t^self oldFileStreamFrom: (FileDirectory default)\\\\n! !\\\\n\\\\n!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'tk 2/14/2000 14:27'!\\\\noldFileStreamFrom: aDirectory\\\\n\\\\n\\\\t| sfmResult fileStream |\\\\n\\\\tsfmResult _ self oldFileFrom: aDirectory.\\\\n\\\\tsfmResult ifNil: [^nil].\\\\n\\\\tfileStream _ sfmResult directory oldFileNamed: sfmResult name.\\\\n\\\\t[fileStream isNil] whileTrue:\\\\n\\\\t\\\\t[sfmResult _ self oldFileFrom: aDirectory.\\\\n\\\\t\\\\tsfmResult ifNil: [^nil].\\\\n\\\\t\\\\tfileStream _ sfmResult directory oldFileNamed: sfmResult name].\\\\n\\\\t^fileStream\\\\n! !\\\\nObject subclass: #StandardFileMenuResult\\\\n\\\\tinstanceVariableNames: 'directory name'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-FileList'!\\\\n\\\\n!StandardFileMenuResult methodsFor: 'accessing' stamp: 'acg 4/15/1999 08:43'!\\\\ndirectory\\\\n\\\\n\\\\t^directory! !\\\\n\\\\n!StandardFileMenuResult methodsFor: 'accessing' stamp: 'acg 4/15/1999 08:43'!\\\\ndirectory: aDirectory\\\\n\\\\n\\\\t^directory _ aDirectory! !\\\\n\\\\n!StandardFileMenuResult methodsFor: 'accessing' stamp: 'acg 4/15/1999 08:43'!\\\\nname\\\\n\\\\n\\\\t^name! !\\\\n\\\\n!StandardFileMenuResult methodsFor: 'accessing' stamp: 'acg 4/15/1999 08:43'!\\\\nname: aString\\\\n\\\\n\\\\t^name _ aString! !\\\\n\\\\n!StandardFileMenuResult methodsFor: 'accessing' stamp: 'sw 6/9/1999 11:50'!\\\\nprintOn: aStream\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream nextPutAll: ' with directory: '.\\\\n\\\\tdirectory printOn: aStream.\\\\n\\\\taStream nextPutAll: ' name: '.\\\\n\\\\tname printOn: aStream\\\\n\\\\n\\\\\\\"StandardFileMenu oldFile\\\\\\\"! !\\\\n\\\\n\\\\n!StandardFileMenuResult methodsFor: 'testing' stamp: 'acg 4/15/1999 09:05'!\\\\nisCommand\\\\n\\\\n\\\\t^name isNil! !\\\\n\\\\n!StandardFileMenuResult methodsFor: 'testing' stamp: 'acg 4/15/1999 20:57'!\\\\nisDirectory\\\\n\\\\n\\\\t^name = ''! !\\\\n\\\\n\\\\n!StandardFileMenuResult methodsFor: 'private' stamp: 'acg 4/15/1999 08:42'!\\\\ndirectory: aDirectory name: aString\\\\n\\\\n\\\\tdirectory _ aDirectory.\\\\n\\\\tname _ aString.\\\\n\\\\t^self! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStandardFileMenuResult class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StandardFileMenuResult class methodsFor: 'instance creation' stamp: 'acg 4/15/1999 08:42'!\\\\ndirectory: aDirectory name: aString\\\\n\\\\n\\\\t^super new directory: aDirectory name: aString! !\\\\nFileStream subclass: #StandardFileStream\\\\n\\\\tinstanceVariableNames: 'name fileID buffer1'\\\\n\\\\tclassVariableNames: 'Registry'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Files-Kernel'!\\\\n!StandardFileStream commentStamp: '<historical>' prior: 0!\\\\nProvides a simple, platform-independent, interface to a file system.  This initial version ignores issues of Directories etc.  The instance-variable fallbackStream at the moment holds an instance of HFSMacFileStream, to bridge us to the new world while in the old.  The instance variable rwmode, inherited from class PositionableStream, here is used to hold a Boolean -- true means opened for read-write, false means opened for read-only.  2/12/96 sw!\\\\n\\\\n\\\\n!StandardFileStream methodsFor: 'access' stamp: 'jm 9/21/1998 14:16'!\\\\ndirectory\\\\n\\\\t\\\\\\\"Return the directory containing this file.\\\\\\\"\\\\n\\\\n\\\\t^ FileDirectory forFileName: self fullName\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'access' stamp: 'tk 3/14/2000 23:31'!\\\\ndirectoryUrl\\\\n\\\\n\\\\t^ self directory url! !\\\\n\\\\n!StandardFileStream methodsFor: 'access'!\\\\nfile\\\\n\\\\t\\\\\\\"Answer the object representing the receiver's file.  Need for compatibility with some calls -- check senders.  2/14/96 sw\\\\\\\"\\\\n\\\\n\\\\t^ self! !\\\\n\\\\n!StandardFileStream methodsFor: 'access' stamp: 'jm 9/21/1998 14:19'!\\\\nfullName\\\\n\\\\t\\\\\\\"Answer this file's full path name.\\\\\\\"\\\\n\\\\n\\\\t^ name\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'access'!\\\\nisDirectory\\\\n\\\\t\\\\\\\"Answer whether the receiver represents a directory.  For the post-transition case, uncertain what to do.  2/14/96 sw\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n!StandardFileStream methodsFor: 'access' stamp: 'ar 11/24/1998 14:00'!\\\\nlocalName\\\\n\\\\t^ name ifNotNil: [(name findTokens: FileDirectory pathNameDelimiter asString) last]! !\\\\n\\\\n!StandardFileStream methodsFor: 'access' stamp: 'jm 9/21/1998 14:19'!\\\\nname\\\\n\\\\t\\\\\\\"Answer this file's full path name.\\\\\\\"\\\\n\\\\n\\\\t^ name\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'access' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\npeekFor: item \\\\n\\\\t\\\\\\\"Answer false and do not advance if the next element is not equal to item, or if this stream is at the end.  If the next element is equal to item, then advance over it and return true\\\\\\\"\\\\n\\\\t| next |\\\\n\\\\t\\\\\\\"self atEnd ifTrue: [^ false]. -- SFStream will give nil\\\\\\\"\\\\n\\\\t(next := self next) == nil ifTrue: [^ false].\\\\n\\\\titem = next ifTrue: [^ true].\\\\n\\\\tself skip: -1.\\\\n\\\\t^ false! !\\\\n\\\\n!StandardFileStream methodsFor: 'access'!\\\\nprintOn: aStream\\\\n\\\\t\\\\\\\"Put a printed version of the receiver onto aStream.  1/31/96 sw\\\\\\\"\\\\n\\\\n\\\\taStream nextPutAll: self class name; nextPutAll: ': '; print: name! !\\\\n\\\\n!StandardFileStream methodsFor: 'access' stamp: 'ar 6/16/2002 18:58'!\\\\nreset\\\\n\\\\tself ensureOpen.\\\\n\\\\tself position: 0.! !\\\\n\\\\n!StandardFileStream methodsFor: 'access'!\\\\nsize\\\\n\\\\t\\\\\\\"Answer the size of the file in characters.  2/12/96 sw\\\\\\\"\\\\n\\\\n\\\\t^ self primSize: fileID! !\\\\n\\\\n\\\\n!StandardFileStream methodsFor: 'browser requests' stamp: 'mir 1/11/2000 10:44'!\\\\ndefaultBrowserReadyWait\\\\n\\\\t^5000! !\\\\n\\\\n!StandardFileStream methodsFor: 'browser requests' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\npost: data target: target url: url ifError: errorBlock\\\\n\\\\t\\\\\\\"Post data to the given URL. The returned file stream contains the reply of the server.\\\\n\\\\tIf Squeak is not running in a browser evaluate errorBlock\\\\\\\"\\\\n\\\\t| sema index request result |\\\\n\\\\tself waitBrowserReadyFor: self defaultBrowserReadyWait ifFail: [^errorBlock value].\\\\n\\\\tsema := Semaphore new.\\\\n\\\\tindex := Smalltalk registerExternalObject: sema.\\\\n\\\\trequest := self primURLPost: url target: target data: data semaIndex: index.\\\\n\\\\trequest == nil ifTrue:[\\\\n\\\\t\\\\n\\\\tSmalltalk unregisterExternalObject: sema.\\\\n\\\\t\\\\t^errorBlock value.\\\\n\\\\t] ifFalse:[\\\\n\\\\t\\\\t[sema wait. \\\\\\\"until something happens\\\\\\\"\\\\n\\\\t\\\\tresult := self primURLRequestState: request.\\\\n\\\\t\\\\tresult == nil] whileTrue.\\\\n\\\\t\\\\tresult ifTrue:[fileID := self primURLRequestFileHandle: request].\\\\n\\\\t\\\\tself primURLRequestDestroy: request.\\\\n\\\\t].\\\\n\\\\tSmalltalk unregisterExternalObject: sema.\\\\n\\\\tfileID == nil ifTrue:[^nil].\\\\n\\\\tself register.\\\\n\\\\tname := url.\\\\n\\\\trwmode := false.\\\\n\\\\tbuffer1 := String new: 1.! !\\\\n\\\\n!StandardFileStream methodsFor: 'browser requests' stamp: 'mir 2/2/2001 14:22'!\\\\npost: data url: url ifError: errorBlock\\\\n\\\\n\\\\tself post: data target: nil url: url ifError: errorBlock! !\\\\n\\\\n!StandardFileStream methodsFor: 'browser requests' stamp: 'ar 2/26/2001 15:58'!\\\\nprimBrowserReady\\\\n\\\\t<primitive:'primitivePluginBrowserReady'>\\\\n\\\\t^nil! !\\\\n\\\\n!StandardFileStream methodsFor: 'browser requests' stamp: 'mir 9/21/2000 16:58'!\\\\nprimURLPost: url data: contents semaIndex: index\\\\n\\\\t^self primURLPost: url target: nil data: contents semaIndex: index! !\\\\n\\\\n!StandardFileStream methodsFor: 'browser requests' stamp: 'mir 9/21/2000 16:58'!\\\\nprimURLPost: url target: target data: contents semaIndex: index\\\\n\\\\t\\\\\\\"Post the data (url might be 'mailto:' etc)\\\\\\\"\\\\n\\\\t<primitive:'primitivePluginPostURL'>\\\\n\\\\t^nil\\\\n ! !\\\\n\\\\n!StandardFileStream methodsFor: 'browser requests'!\\\\nprimURLRequest: url semaIndex: index\\\\n\\\\t<primitive:'primitivePluginRequestURLStream'>\\\\n\\\\t^nil! !\\\\n\\\\n!StandardFileStream methodsFor: 'browser requests' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nprimURLRequest: url target: target semaIndex: index\\\\n\\\\t\\\\\\\"target - String (frame, also ':=top', ':=parent' etc)\\\\\\\"\\\\n\\\\t<primitive:'primitivePluginRequestURL'>\\\\n\\\\t^nil\\\\n ! !\\\\n\\\\n!StandardFileStream methodsFor: 'browser requests'!\\\\nprimURLRequestDestroy: request\\\\n\\\\t<primitive:'primitivePluginDestroyRequest'>\\\\n\\\\t^nil! !\\\\n\\\\n!StandardFileStream methodsFor: 'browser requests'!\\\\nprimURLRequestFileHandle: request\\\\n\\\\t<primitive: 'primitivePluginRequestFileHandle'>\\\\n\\\\t^nil! !\\\\n\\\\n!StandardFileStream methodsFor: 'browser requests'!\\\\nprimURLRequestState: request\\\\n\\\\t<primitive:'primitivePluginRequestState'>\\\\n\\\\t^false! !\\\\n\\\\n!StandardFileStream methodsFor: 'browser requests' stamp: 'mir 2/29/2000 11:22'!\\\\nrequestURL: url target: target\\\\n\\\\t^self requestURL: url target: target ifError: [nil]! !\\\\n\\\\n!StandardFileStream methodsFor: 'browser requests' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nrequestURL: url target: target ifError: errorBlock\\\\n\\\\t\\\\\\\"Request to go to the target for the given URL.\\\\n\\\\tIf Squeak is not running in a browser evaluate errorBlock\\\\\\\"\\\\n\\\\n\\\\t| sema index request result |\\\\n\\\\tself waitBrowserReadyFor: self defaultBrowserReadyWait ifFail: [^errorBlock value].\\\\n\\\\tsema := Semaphore new.\\\\n\\\\tindex := Smalltalk registerExternalObject: sema.\\\\n\\\\trequest := self primURLRequest: url target: target semaIndex: index.\\\\n\\\\trequest == nil ifTrue:[\\\\n\\\\t\\\\n\\\\tSmalltalk unregisterExternalObject: sema.\\\\n\\\\t\\\\t^errorBlock value.\\\\n\\\\t] ifFalse:[\\\\n\\\\t\\\\t[sema wait. \\\\\\\"until something happens\\\\\\\"\\\\n\\\\t\\\\tresult := self primURLRequestState: request.\\\\n\\\\t\\\\tresult == nil] whileTrue.\\\\n\\\\t\\\\tself primURLRequestDestroy: request.\\\\n\\\\t].\\\\n\\\\tSmalltalk unregisterExternalObject: sema.\\\\n\\\\tfileID == nil ifTrue:[^nil].\\\\n\\\\tself register.\\\\n\\\\tname := url.\\\\n\\\\trwmode := false.\\\\n\\\\tbuffer1 := String new: 1.! !\\\\n\\\\n!StandardFileStream methodsFor: 'browser requests'!\\\\nrequestURLStream: url\\\\n\\\\t\\\\\\\"FileStream requestURLStream:'http://www.squeak.org'\\\\\\\"\\\\n\\\\t^self requestURLStream: url ifError:[nil]! !\\\\n\\\\n!StandardFileStream methodsFor: 'browser requests' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nrequestURLStream: url ifError: errorBlock\\\\n\\\\t\\\\\\\"Request a FileStream for the given URL.\\\\n\\\\tIf Squeak is not running in a browser evaluate errorBlock\\\\\\\"\\\\n\\\\t\\\\\\\"FileStream requestURLStream:'http://www.squeak.org'\\\\\\\"\\\\n\\\\t| sema index request result |\\\\n\\\\tself waitBrowserReadyFor: self defaultBrowserReadyWait ifFail: [^errorBlock value].\\\\n\\\\tsema := Semaphore new.\\\\n\\\\tindex := Smalltalk registerExternalObject: sema.\\\\n\\\\trequest := self primURLRequest: url semaIndex: index.\\\\n\\\\trequest == nil ifTrue:[\\\\n\\\\t\\\\n\\\\tSmalltalk unregisterExternalObject: sema.\\\\n\\\\t\\\\t^errorBlock value.\\\\n\\\\t] ifFalse:[\\\\n\\\\t\\\\t[sema wait. \\\\\\\"until something happens\\\\\\\"\\\\n\\\\t\\\\tresult := self primURLRequestState: request.\\\\n\\\\t\\\\tresult == nil] whileTrue.\\\\n\\\\t\\\\tresult ifTrue:[fileID := self primURLRequestFileHandle: request].\\\\n\\\\t\\\\tself primURLRequestDestroy: request.\\\\n\\\\t].\\\\n\\\\tSmalltalk unregisterExternalObject: sema.\\\\n\\\\tfileID == nil ifTrue:[^nil].\\\\n\\\\tself register.\\\\n\\\\tname := url.\\\\n\\\\trwmode := false.\\\\n\\\\tbuffer1 := String new: 1.! !\\\\n\\\\n!StandardFileStream methodsFor: 'browser requests' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nwaitBrowserReadyFor: timeout ifFail: errorBlock\\\\n\\\\t| startTime delay okay |\\\\n\\\\tokay := self primBrowserReady.\\\\n\\\\tokay ifNil:[^errorBlock value].\\\\n\\\\tokay ifTrue: [^true].\\\\n\\\\tstartTime := Time millisecondClockValue.\\\\n\\\\tdelay := Delay forMilliseconds: 100.\\\\n\\\\t[(Time millisecondsSince: startTime) < timeout]\\\\n\\\\t\\\\twhileTrue: [\\\\n\\\\t\\\\t\\\\tdelay wait.\\\\n\\\\t\\\\t\\\\tokay := self primBrowserReady.\\\\n\\\\t\\\\t\\\\tokay ifNil:[^errorBlock value].\\\\n\\\\t\\\\t\\\\tokay ifTrue: [^true]].\\\\n\\\\t^errorBlock value! !\\\\n\\\\n\\\\n!StandardFileStream methodsFor: 'dnd requests' stamp: 'ar 1/10/2001 20:01'!\\\\nprimDropRequestFileHandle: dropIndex\\\\n\\\\t\\\\\\\"Primitive. Return the (read-only) file handle for some file that was just dropped onto Squeak.\\\\n\\\\tFail if dropIndex is out of range or the primitive is not supported.\\\\\\\"\\\\n\\\\t<primitive: 'primitiveDropRequestFileHandle' module:'DropPlugin'>\\\\n\\\\t^nil! !\\\\n\\\\n!StandardFileStream methodsFor: 'dnd requests' stamp: 'ar 1/10/2001 20:01'!\\\\nprimDropRequestFileName: dropIndex\\\\n\\\\t\\\\\\\"Primitive. Return the file name for some file that was just dropped onto Squeak.\\\\n\\\\tFail if dropIndex is out of range or the primitive is not supported.\\\\\\\"\\\\n\\\\t<primitive: 'primitiveDropRequestFileName' module:'DropPlugin'>\\\\n\\\\t^nil! !\\\\n\\\\n!StandardFileStream methodsFor: 'dnd requests' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nrequestDropStream: dropIndex\\\\n\\\\t\\\\\\\"Return a read-only stream for some file the user has just dropped onto Squeak.\\\\\\\"\\\\n\\\\tname := self primDropRequestFileName: dropIndex.\\\\n\\\\tfileID := self primDropRequestFileHandle: dropIndex.\\\\n\\\\tfileID == nil ifTrue:[^nil].\\\\n\\\\tself register.\\\\n\\\\trwmode := false.\\\\n\\\\tbuffer1 := String new: 1.\\\\n\\\\n! !\\\\n\\\\n\\\\n!StandardFileStream methodsFor: 'finalization' stamp: 'ar 3/21/98 18:16'!\\\\nactAsExecutor\\\\n\\\\tsuper actAsExecutor.\\\\n\\\\tname := nil.! !\\\\n\\\\n!StandardFileStream methodsFor: 'finalization' stamp: 'ar 10/7/1998 15:44'!\\\\nfinalize\\\\n\\\\tself primCloseNoError: fileID.! !\\\\n\\\\n\\\\n!StandardFileStream methodsFor: 'open/close' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nclose\\\\n\\\\t\\\\\\\"Close this file.\\\\\\\"\\\\n\\\\n\\\\tfileID ifNotNil: [\\\\n\\\\t\\\\tself primClose: fileID.\\\\n\\\\t\\\\tself unregister.\\\\n\\\\t\\\\tfileID := nil].\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'open/close' stamp: 'jm 2/6/2002 08:33'!\\\\nclosed\\\\n\\\\t\\\\\\\"Answer true if this file is closed.\\\\\\\"\\\\n\\\\n\\\\t^ fileID isNil or: [(self primSizeNoError: fileID) isNil]\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'open/close' stamp: 'jm 9/21/1998 16:20'!\\\\nensureOpen\\\\n\\\\t\\\\\\\"Make sure that this file really is open.\\\\\\\"\\\\n\\\\n\\\\tself closed ifTrue: [^ self reopen].\\\\n\\\\t(self primSizeNoError: fileID) ifNotNil: [^ self].\\\\n\\\\tself reopen.\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'open/close'!\\\\nopen\\\\n\\\\t\\\\\\\"For compatibility with a few existing things.  2/14/96 sw\\\\\\\"\\\\n\\\\n\\\\t^ self reopen! !\\\\n\\\\n!StandardFileStream methodsFor: 'open/close' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nopen: fileName forWrite: writeMode \\\\n\\\\t\\\\\\\"Open the file with the given name. If writeMode is true, allow writing, otherwise open the file in read-only mode.\\\\\\\"\\\\n\\\\t\\\\\\\"Changed to do a GC and retry before failing ar 3/21/98 17:25\\\\\\\"\\\\n\\\\t| f |\\\\n\\\\tf := fileName asVmPathName.\\\\n\\\\n\\\\tfileID := StandardFileStream retryWithGC:[self primOpen: f writable: writeMode] \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tuntil:[:id| id notNil] \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tforFileNamed: fileName.\\\\n\\\\tfileID ifNil: [^ nil].  \\\\\\\"allows sender to detect failure\\\\\\\"\\\\n\\\\tself register.\\\\n\\\\tname := fileName.\\\\n\\\\trwmode := writeMode.\\\\n\\\\tbuffer1 := String new: 1.\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'open/close'!\\\\nopenReadOnly\\\\n\\\\t\\\\\\\"Open the receiver as a read-only file.  1/31/96 sw\\\\\\\"\\\\n\\\\n\\\\t^ self open: name forWrite: false! !\\\\n\\\\n!StandardFileStream methodsFor: 'open/close' stamp: 'jm 9/21/1998 13:58'!\\\\nreopen\\\\n\\\\t\\\\\\\"Close and reopen this file. The file position is reset to zero.\\\\\\\"\\\\n\\\\t\\\\\\\"Details: Files that were open when a snapshot occurs are no longer valid when the snapshot is resumed. This operation re-opens the file if that has happened.\\\\\\\"\\\\n\\\\n\\\\tfileID ifNotNil: [self primCloseNoError: fileID].\\\\n\\\\tself open: name forWrite: rwmode.\\\\n! !\\\\n\\\\n\\\\n!StandardFileStream methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimAtEnd: id\\\\n\\\\t\\\\\\\"Answer true if the file position is at the end of the file.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveFileAtEnd' module: 'FilePlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimClose: id\\\\n\\\\t\\\\\\\"Close this file.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveFileClose' module: 'FilePlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimCloseNoError: id\\\\n\\\\t\\\\\\\"Close this file. Don't raise an error if the primitive fails.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveFileClose' module: 'FilePlugin'>\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'primitives' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nprimFlush: id\\\\n\\\\t\\\\\\\"Flush pending changes to the disk\\\\\\\"\\\\n\\\\t| p |\\\\n\\\\t<primitive: 'primitiveFileFlush' module: 'FilePlugin'>\\\\n\\\\t\\\\\\\"In some OS's seeking to 0 and back will do a flush\\\\\\\"\\\\n\\\\tp := self position.\\\\n\\\\tself position: 0; position: p! !\\\\n\\\\n!StandardFileStream methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimGetPosition: id\\\\n\\\\t\\\\\\\"Get this files current position.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveFileGetPosition' module: 'FilePlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimOpen: fileName writable: writableFlag\\\\n\\\\t\\\\\\\"Open a file of the given name, and return the file ID obtained.\\\\n\\\\tIf writableFlag is true, then\\\\n\\\\t\\\\tif there is none with this name, then create one\\\\n\\\\t\\\\telse prepare to overwrite the existing from the beginning\\\\n\\\\totherwise\\\\n\\\\t\\\\tif the file exists, open it read-only\\\\n\\\\t\\\\telse return nil\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveFileOpen' module: 'FilePlugin'>\\\\n\\\\t^ nil\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimRead: id into: byteArray startingAt: startIndex count: count\\\\n\\\\t\\\\\\\"Read up to count bytes of data from this file into the given string or byte array starting at the given index. Answer the number of bytes actually read.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveFileRead' module: 'FilePlugin'>\\\\n\\\\tself closed ifTrue: [^ self error: 'File is closed'].\\\\n\\\\tself error: 'File read failed'.\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSetPosition: id to: anInteger\\\\n\\\\t\\\\\\\"Set this file to the given position.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveFileSetPosition' module: 'FilePlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSize: id\\\\n\\\\t\\\\\\\"Answer the size of this file.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveFileSize' module: 'FilePlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSizeNoError: id\\\\n\\\\t\\\\\\\"Answer the size of this file. Answer nil if the primitive fails; this indicates that the file handle has become stale.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveFileSize' module: 'FilePlugin'>\\\\n\\\\t^ nil\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'primitives' stamp: 'JMM 5/24/2001 21:55'!\\\\nprimTruncate: id to: anInteger\\\\n\\\\t\\\\\\\"Truncate this file to the given position.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveFileTruncate' module: 'FilePlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimWrite: id from: stringOrByteArray startingAt: startIndex count: count\\\\n\\\\t\\\\\\\"Write count bytes onto this file from the given string or byte array starting at the given index. Answer the number of bytes written.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveFileWrite' module: 'FilePlugin'>\\\\n\\\\tself closed ifTrue: [^ self error: 'File is closed'].\\\\n\\\\tself error: 'File write failed'.\\\\n! !\\\\n\\\\n\\\\n!StandardFileStream methodsFor: 'properties-setting'!\\\\nasHtml\\\\n\\\\t\\\\\\\"Convert me in to an HtmlFileStream. 4/11/96 tk\\\\\\\"\\\\n\\\\n\\\\t^ self as: HtmlFileStream \\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'properties-setting' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nascii\\\\n\\\\t\\\\\\\"opposite of binary\\\\\\\"\\\\n\\\\tbuffer1 := String new: 1! !\\\\n\\\\n!StandardFileStream methodsFor: 'properties-setting' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nbinary\\\\n\\\\tbuffer1 := ByteArray new: 1! !\\\\n\\\\n!StandardFileStream methodsFor: 'properties-setting' stamp: 'JMM 1/28/2001 18:44'!\\\\ngetFileType\\\\n\\\\t\\\\\\\"On the Macintosh, get the file type and creator of this file. On other platforms, do nothing.\\\\\\\"\\\\n\\\\n\\\\t^FileDirectory default\\\\n\\\\t\\\\tgetMacFileTypeAndCreator: self fullName\\\\n\\\\t\\\\t\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'properties-setting' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\ninsertLineFeeds\\\\n\\\\t\\\\\\\"(FileStream oldFileNamed: 'BBfix2.st') insertLineFeeds\\\\\\\"\\\\n\\\\t| s crLf f |\\\\n\\\\tcrLf := String with: Character cr with: (Character value: 10).\\\\n\\\\ts := ReadStream on: (self next: self size).\\\\n\\\\tself close.\\\\n\\\\tf := FileStream newFileNamed: self name.\\\\n\\\\t[s atEnd] whileFalse: \\\\n\\\\t\\\\t[f nextPutAll: (s upTo: Character cr); nextPutAll: crLf].\\\\n\\\\tf close! !\\\\n\\\\n!StandardFileStream methodsFor: 'properties-setting'!\\\\nisBinary\\\\n\\\\t^ buffer1 class == ByteArray! !\\\\n\\\\n!StandardFileStream methodsFor: 'properties-setting' stamp: 'tk 11/4/1998 19:17'!\\\\nisReadOnly\\\\n\\\\n\\\\t^ rwmode not\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'properties-setting' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nreadOnly\\\\n\\\\t\\\\\\\"Make this file read-only.\\\\\\\"\\\\n\\\\n\\\\trwmode := false.\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'properties-setting' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nreadWrite\\\\n\\\\t\\\\\\\"Make this file writable.\\\\\\\"\\\\n\\\\n\\\\trwmode := true.\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'properties-setting' stamp: 'jm 12/5/97 15:14'!\\\\nsetFileTypeToObject\\\\n\\\\t\\\\\\\"On the Macintosh, set the file type and creator of this file to be a Squeak object file. On other platforms, do nothing. Setting the file type allows Squeak object files to be sent as email attachments and launched by double-clicking. On other platforms, similar behavior is achieved by creating the file with the '.sqo' file name extension.\\\\\\\"\\\\n\\\\n\\\\tFileDirectory default\\\\n\\\\t\\\\tsetMacFileNamed: self fullName\\\\n\\\\t\\\\ttype: 'SOBJ'\\\\n\\\\t\\\\tcreator: 'FAST'.\\\\n! !\\\\n\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'sw 2/12/96'!\\\\natEnd\\\\n\\\\t\\\\\\\"Answer whether the receiver is at its end.  \\\\\\\"\\\\n\\\\t^ self primAtEnd: fileID! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nbasicNext\\\\n\\\\t\\\\\\\"Answer the next byte from this file, or nil if at the end of the file.\\\\\\\"\\\\n\\\\n\\\\t| count |\\\\n\\\\tcount := self primRead: fileID into: buffer1 startingAt: 1 count: 1.\\\\n\\\\tcount = 1\\\\n\\\\t\\\\tifTrue: [^ buffer1 at: 1]\\\\n\\\\t\\\\tifFalse: [^ nil].\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\ncompressFile\\\\n\\\\t\\\\\\\"Write a new file that has the data in me compressed in GZip format.\\\\\\\"\\\\n\\\\t| zipped buffer |\\\\n\\\\n\\\\tself readOnly; binary.\\\\n\\\\tzipped := self directory newFileNamed: (self name, FileDirectory dot, 'gz').\\\\n\\\\tzipped binary; setFileTypeToObject.\\\\n\\\\t\\\\t\\\\\\\"Type and Creator not to be text, so can be enclosed in an email\\\\\\\"\\\\n\\\\tzipped := GZipWriteStream on: zipped.\\\\n\\\\tbuffer := ByteArray new: 50000.\\\\n\\\\t'Compressing ', self fullName displayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\tfrom: 0 to: self size\\\\n\\\\t\\\\tduring: [:bar |\\\\n\\\\t\\\\t\\\\t[self atEnd] whileFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tbar value: self position.\\\\n\\\\t\\\\t\\\\t\\\\tzipped nextPutAll: (self nextInto: buffer)].\\\\n\\\\t\\\\t\\\\tzipped close.\\\\n\\\\t\\\\t\\\\tself close].\\\\n\\\\t^zipped! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nfindString: string\\\\n\\\\t\\\\\\\"Fast version of #upToAll: to find a String in a file starting from the beginning.\\\\n\\\\tReturns the position and also sets the position there.\\\\n\\\\tIf string is not found 0 is returned and position is unchanged.\\\\\\\"\\\\n\\\\n\\\\t| pos buffer count oldPos sz |\\\\n\\\\toldPos := self position.\\\\n\\\\tself reset.\\\\n\\\\tsz := self size.\\\\n\\\\tpos := 0.\\\\n\\\\tbuffer := String new: 2000.\\\\n\\\\t[ buffer := self nextInto: buffer.\\\\n\\\\t(count := buffer findString: string) > 0\\\\n\\\\t\\\\tifTrue: [\\\\\\\"Found the string part way into buffer\\\\\\\"\\\\n\\\\t\\\\t\\\\tself position: pos.\\\\n\\\\t\\\\t\\\\tself next: count - 1.\\\\n\\\\t\\\\t\\\\t^self position ].\\\\n\\\\tpos := ((pos + 2000 - string size) min: sz).\\\\n\\\\tself position: pos.\\\\n\\\\tpos = sz] whileFalse.\\\\n\\\\t\\\\\\\"Never found it, and hit end of file\\\\\\\"\\\\n\\\\tself position: oldPos.\\\\n\\\\t^0! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nfindStringFromEnd: string\\\\n\\\\t\\\\\\\"Fast version to find a String in a file starting from the end.\\\\n\\\\tReturns the position and also sets the position there.\\\\n\\\\tIf string is not found 0 is returned and position is unchanged.\\\\\\\"\\\\n\\\\n\\\\t| pos buffer count oldPos |\\\\n\\\\toldPos := self position.\\\\n\\\\tself setToEnd.\\\\n\\\\tpos := self position.\\\\n\\\\t[ pos := ((pos - 2000 + string size) max: 0).  \\\\\\\"the [+ string size] allows for the case where the end of the search string is at the beginning of the current buffer\\\\\\\"\\\\n\\\\tself position: pos.\\\\n\\\\tbuffer := self next: 2000.\\\\n\\\\t(count := buffer findString: string) > 0\\\\n\\\\t\\\\tifTrue: [\\\\\\\"Found the string part way into buffer\\\\\\\"\\\\n\\\\t\\\\t\\\\tself position: pos.\\\\n\\\\t\\\\t\\\\tself next: count-1.  \\\\\\\"use next instead of position:, so that CrLfFileStream can do its magic if it is being used\\\\\\\"\\\\n\\\\t\\\\t\\\\t^self position].\\\\n\\\\tpos = 0] whileFalse.\\\\n\\\\t\\\\\\\"Never found it, and hit beginning of file\\\\\\\"\\\\n\\\\tself position: oldPos.\\\\n\\\\t^0! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'ar 2/6/2001 17:59'!\\\\nflush\\\\n\\\\t\\\\\\\"Flush pending changes\\\\\\\"\\\\n\\\\t^self primFlush: fileID! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'mir 2/25/2000 12:37'!\\\\nnext\\\\n\\\\t\\\\\\\"Answer the next byte from this file, or nil if at the end of the file.\\\\\\\"\\\\n\\\\n\\\\t^ self basicNext! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position'!\\\\nnext: n\\\\n\\\\t\\\\\\\"Return a string with the next n characters of the filestream in it.  1/31/96 sw\\\\\\\"\\\\n\\\\t^ self nextInto: (buffer1 class new: n)! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nnext: n into: aString startingAt: startIndex\\\\n\\\\t\\\\\\\"Read n bytes into the given string.\\\\n\\\\tReturn aString or a partial copy if less than\\\\n\\\\tn elements have been read.\\\\\\\"\\\\n\\\\t| count |\\\\n\\\\tcount := self primRead: fileID into: aString\\\\n\\\\t\\\\t\\\\t\\\\tstartingAt: startIndex count: n.\\\\n\\\\tcount = n\\\\n\\\\t\\\\tifTrue:[^aString]\\\\n\\\\t\\\\tifFalse:[^aString copyFrom: 1 to: startIndex+count-1]! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'ar 1/2/2000 15:33'!\\\\nnext: anInteger putAll: aString startingAt: startIndex\\\\n\\\\t\\\\\\\"Store the next anInteger elements from the given collection.\\\\\\\"\\\\n\\\\trwmode ifFalse: [^ self error: 'Cannot write a read-only file'].\\\\n\\\\tself primWrite: fileID from: aString startingAt: startIndex count: anInteger.\\\\n\\\\t^aString! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'jm 9/21/1998 13:55'!\\\\nnextPut: char\\\\n\\\\t\\\\\\\"Write the given character to this file.\\\\\\\"\\\\n\\\\n\\\\trwmode ifFalse: [^ self error: 'Cannot write a read-only file'].\\\\n\\\\tbuffer1 at: 1 put: char.\\\\n\\\\tself primWrite: fileID from: buffer1 startingAt: 1 count: 1.\\\\n\\\\t^ char\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'tk 2/5/2000 21:43'!\\\\nnextPutAll: aString\\\\n\\\\t\\\\\\\"Write all the characters of the given string to this file.\\\\\\\"\\\\n\\\\n\\\\trwmode ifFalse: [^ self error: 'Cannot write a read-only file'].\\\\n\\\\tself primWrite: fileID from: aString startingAt: 1 count: aString basicSize.\\\\n\\\\t^ aString\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'tk 2/5/2000 21:58'!\\\\nnextWordsInto: aBitmap\\\\n\\\\t\\\\\\\"Note: The file primitives automatically adjust for word based objects.\\\\\\\"\\\\n\\\\n\\\\tself next: aBitmap basicSize into: aBitmap startingAt: 1.\\\\n\\\\taBitmap restoreEndianness.\\\\n\\\\t^ aBitmap! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\npadToEndWith: aChar\\\\n\\\\t\\\\\\\"On the Mac, files do not truncate.  One can delete the old file and write a new one, but sometime deletion fails (file still open? file stale?).  This is a sad compromise.  Just let the file be the same length but pad it with a harmless character.\\\\\\\"\\\\n\\\\n\\\\t| pad |\\\\n\\\\tself atEnd ifTrue: [^ self].\\\\n\\\\tpad := self isBinary \\\\n\\\\t\\\\tifTrue: [aChar asCharacter asciiValue]\\\\t\\\\\\\"ok for char or number\\\\\\\"\\\\n\\\\t\\\\tifFalse: [aChar asCharacter].\\\\n\\\\tself nextPutAll: (buffer1 class new: ((self size - self position) min: 20000) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twithAll: pad).! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\npeek\\\\n\\\\t\\\\\\\"Answer what would be returned if the message next were sent to the receiver. If the receiver is at the end, answer nil.  \\\\\\\"\\\\n\\\\t| next |\\\\n\\\\tself atEnd ifTrue: [^ nil].\\\\n\\\\tnext := self basicNext.\\\\n\\\\tself position: self position - 1.\\\\n\\\\t^ next! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'tk 10/19/2001 11:29'!\\\\npeekLast\\\\n\\\\t\\\\\\\"Return that item just put at the end of the stream\\\\\\\"\\\\n\\\\n\\\\t^ buffer1 size > 0 \\\\n\\\\t\\\\tifTrue: [buffer1 last]\\\\n\\\\t\\\\tifFalse: [nil]\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position'!\\\\nposition\\\\n\\\\t\\\\\\\"Return the receiver's current file position.  2/12/96 sw\\\\\\\"\\\\n\\\\n\\\\t^ self primGetPosition: fileID! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position'!\\\\nposition: pos\\\\n\\\\t\\\\\\\"Set the receiver's position as indicated.  2/12/96 sw\\\\\\\"\\\\n\\\\n\\\\t^ self primSetPosition: fileID to: pos! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position'!\\\\nreadInto: byteArray startingAt: startIndex count: count\\\\n\\\\t\\\\\\\"Read into the given array as specified, and return the count\\\\n\\\\tactually transferred.  index and count are in units of bytes or\\\\n\\\\tlongs depending on whether the array is Bitmap, String or ByteArray\\\\\\\"\\\\n\\\\t^ self primRead: fileID into: byteArray\\\\n\\\\t\\\\t\\\\tstartingAt: startIndex count: count\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'yo 10/31/2002 22:33'!\\\\nreadOnlyCopy\\\\n\\\\n\\\\t^ self class readOnlyFileNamed: self name.\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position'!\\\\nsetToEnd\\\\n\\\\t\\\\\\\"Set the position of the receiver to the end of file.  1/31/96 sw\\\\\\\"\\\\n\\\\n\\\\tself position: self size! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position'!\\\\nskip: n\\\\n\\\\t\\\\\\\"Set the character position to n characters from the current position.\\\\n\\\\tError if not enough characters left in the file.  1/31/96 sw\\\\\\\"\\\\n\\\\n\\\\tself position: self position + n! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'JMM 5/24/2001 22:00'!\\\\ntruncate\\\\n\\\\t\\\\\\\"Truncate to zero\\\\\\\"\\\\n\\\\n\\\\t^ self truncate: 0! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'JMM 5/24/2001 22:47'!\\\\ntruncate: pos\\\\n\\\\t\\\\\\\"Truncate to this position\\\\\\\"\\\\n\\\\n\\\\tself position: pos.\\\\n\\\\t^self primTruncate: fileID to: pos! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nupTo: delim \\\\n\\\\t\\\\\\\"Fast version to speed up nextChunk\\\\\\\"\\\\n\\\\t| pos buffer count |\\\\n\\\\tpos := self position.\\\\n\\\\tbuffer := self next: 2000.\\\\n\\\\t(count := buffer indexOf: delim) > 0 ifTrue: \\\\n\\\\t\\\\t[\\\\\\\"Found the delimiter part way into buffer\\\\\\\"\\\\n\\\\t\\\\tself position: pos + count.\\\\n\\\\t\\\\t^ buffer copyFrom: 1 to: count - 1].\\\\n\\\\tself atEnd ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"Never found it, and hit end of file\\\\\\\"\\\\n\\\\t\\\\t^ buffer].\\\\n\\\\t\\\\\\\"Never found it, but there's more...\\\\\\\"\\\\n\\\\t^ buffer , (self upTo: delim)! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nupToEnd\\\\n\\\\t\\\\\\\"Answer a subcollection from the current access position through the last element of the receiver.\\\\\\\"\\\\n\\\\n\\\\t| newStream buffer |\\\\n\\\\tbuffer := buffer1 species new: 1000.\\\\n\\\\tnewStream := WriteStream on: (buffer1 species new: 100).\\\\n\\\\t[self atEnd] whileFalse: [newStream nextPutAll: (self nextInto: buffer)].\\\\n\\\\t^ newStream contents! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'jm 9/21/1998 13:56'!\\\\nverbatim: aString\\\\n\\\\t\\\\\\\"A version of nextPutAll that can be called knowing it won't call nextPut: \\\\\\\"\\\\n\\\\n\\\\t^ self nextPutAll: aString\\\\n! !\\\\n\\\\n\\\\n!StandardFileStream methodsFor: 'registry' stamp: 'ar 3/21/98 17:23'!\\\\nregister\\\\n\\\\t^self class register: self! !\\\\n\\\\n!StandardFileStream methodsFor: 'registry' stamp: 'ar 3/21/98 17:23'!\\\\nunregister\\\\n\\\\t^self class unregister: self! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStandardFileStream class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StandardFileStream class methodsFor: 'browser requests' stamp: 'mir 3/8/2001 16:28'!\\\\nisRunningAsBrowserPlugin\\\\n\\\\tself new waitBrowserReadyFor: 1000 ifFail: [^false].\\\\n\\\\t^true! !\\\\n\\\\n!StandardFileStream class methodsFor: 'browser requests' stamp: 'mir 9/7/2000 16:08'!\\\\nprivateCheckForBrowserPrimitives\\\\n\\\\t<primitive:'primitivePluginBrowserReady'>\\\\n\\\\t^false! !\\\\n\\\\n\\\\n!StandardFileStream class methodsFor: 'error handling' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nfileDoesNotExistUserHandling: fullFileName\\\\n\\\\n\\\\t| selection newName |\\\\n\\\\tselection := (PopUpMenu labels:\\\\n'create a new file\\\\nchoose another name\\\\ncancel')\\\\n\\\\t\\\\t\\\\tstartUpWithCaption: (FileDirectory localNameFor: fullFileName) , '\\\\ndoes not exist.'.\\\\n\\\\tselection = 1 ifTrue:\\\\n\\\\t\\\\t[^ self new open: fullFileName forWrite: true].\\\\n\\\\tselection = 2 ifTrue:\\\\n\\\\t\\\\t[ newName := FillInTheBlank request: 'Enter a new file name'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinitialAnswer:  fullFileName.\\\\n\\\\t\\\\t^ self oldFileNamed:\\\\n\\\\t\\\\t\\\\t(self fullName: newName)].\\\\n\\\\tself halt! !\\\\n\\\\n!StandardFileStream class methodsFor: 'error handling' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nfileExistsUserHandling: fullFileName\\\\n\\\\t| dir localName choice newName newFullFileName |\\\\n\\\\tdir := FileDirectory forFileName: fullFileName.\\\\n\\\\tlocalName := FileDirectory localNameFor: fullFileName.\\\\n\\\\tchoice := (PopUpMenu\\\\n\\\\t\\\\tlabels:\\\\n'overwrite that file\\\\\\\\choose another name\\\\\\\\cancel' withCRs)\\\\n\\\\t\\\\tstartUpWithCaption: localName, '\\\\nalready exists.'.\\\\n\\\\n\\\\tchoice = 1 ifTrue: [\\\\n\\\\t\\\\tdir deleteFileNamed: localName\\\\n\\\\t\\\\t\\\\tifAbsent: [self error: 'Could not delete the old version of that file'].\\\\n\\\\t\\\\t^ self new open: fullFileName forWrite: true].\\\\n\\\\n\\\\tchoice = 2 ifTrue: [\\\\n\\\\t\\\\tnewName := FillInTheBlank request: 'Enter a new file name' initialAnswer: fullFileName.\\\\n\\\\t\\\\tnewFullFileName := self fullName: newName.\\\\n\\\\t\\\\t^ self newFileNamed: newFullFileName].\\\\n\\\\n\\\\tself error: 'Please close this to abort file opening'! !\\\\n\\\\n!StandardFileStream class methodsFor: 'error handling' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nreadOnlyFileDoesNotExistUserHandling: fullFileName\\\\n\\\\n\\\\t| dir files choices selection newName fileName |\\\\n\\\\tdir := FileDirectory forFileName: fullFileName.\\\\n\\\\tfiles := dir fileNames.\\\\n\\\\tfileName := FileDirectory localNameFor: fullFileName.\\\\n\\\\tchoices := fileName correctAgainst: files.\\\\n\\\\tchoices add: 'Choose another name'.\\\\n\\\\tchoices add: 'Cancel'.\\\\n\\\\tselection := (PopUpMenu labelArray: choices lines: (Array with: 5) )\\\\n\\\\t\\\\tstartUpWithCaption: (FileDirectory localNameFor: fullFileName), '\\\\ndoes not exist.'.\\\\n\\\\tselection = choices size ifTrue:[\\\\\\\"cancel\\\\\\\" ^ nil \\\\\\\"should we raise another exception here?\\\\\\\"].\\\\n\\\\tselection < (choices size - 1) ifTrue: [\\\\n\\\\t\\\\tnewName := (dir pathName , FileDirectory slash , (choices at: selection))].\\\\n\\\\tselection = (choices size - 1) ifTrue: [\\\\n\\\\t\\\\tnewName := FillInTheBlank \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trequest: 'Enter a new file name' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinitialAnswer: fileName].\\\\n\\\\tnewName = '' ifFalse: [^ self readOnlyFileNamed: (self fullName: newName)].\\\\n\\\\t^ self error: 'Could not open a file'! !\\\\n\\\\n\\\\n!StandardFileStream class methodsFor: 'file creation' stamp: 'TPR 8/13/1999 21:22'!\\\\nfileNamed: fileName\\\\n\\\\t\\\\\\\"Open a file with the given name for reading and writing. If the name has no directory part, then the file will be created in the default directory. If the file already exists, its prior contents may be modified or replaced, but the file will not be truncated on close.\\\\\\\"\\\\n\\\\n\\\\t^ self new open: (self fullName: fileName) forWrite: true\\\\n! !\\\\n\\\\n!StandardFileStream class methodsFor: 'file creation' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nforceNewFileNamed: fileName \\\\n\\\\t\\\\\\\"Create a new file with the given name, and answer a stream opened \\\\n\\\\tfor writing on that file. If the file already exists, delete it without \\\\n\\\\tasking before creating the new file.\\\\\\\"\\\\n\\\\t| dir localName fullName f |\\\\n\\\\tfullName := self fullName: fileName.\\\\n\\\\t(self isAFileNamed: fullName)\\\\n\\\\t\\\\tifFalse: [f := self new open: fullName forWrite: true.\\\\n\\\\t\\\\t\\\\t^ f isNil\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"Failed to open the file\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(FileDoesNotExistException fileName: fullName) signal]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [f]].\\\\n\\\\tdir := FileDirectory forFileName: fullName.\\\\n\\\\tlocalName := FileDirectory localNameFor: fullName.\\\\n\\\\tdir\\\\n\\\\t\\\\tdeleteFileNamed: localName\\\\n\\\\t\\\\tifAbsent: [(CannotDeleteFileException new\\\\n\\\\t\\\\t\\\\tmessageText: 'Could not delete the old version of file ' , fullName) signal].\\\\n\\\\tf := self new open: fullName forWrite: true.\\\\n\\\\t^ f isNil\\\\n\\\\t\\\\tifTrue: [\\\\\\\"Failed to open the file\\\\\\\"\\\\n\\\\t\\\\t\\\\t(FileDoesNotExistException fileName: fullName) signal]\\\\n\\\\t\\\\tifFalse: [f]! !\\\\n\\\\n!StandardFileStream class methodsFor: 'file creation' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nisAFileNamed: fileName\\\\n\\\\t\\\\\\\"Answer true if a file of the given name exists.\\\\\\\"\\\\n\\\\n\\\\t| f |\\\\n\\\\tf := self new open: fileName forWrite: false.\\\\n\\\\tf ifNil: [^ false].\\\\n\\\\tf close.\\\\n\\\\t^ true\\\\n! !\\\\n\\\\n!StandardFileStream class methodsFor: 'file creation' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nnewFileNamed: fileName\\\\n \\\\t\\\\\\\"Create a new file with the given name, and answer a stream opened for writing on that file. If the file already exists, ask the user what to do.\\\\\\\"\\\\n\\\\n\\\\t| fullName |\\\\n\\\\tfullName := self fullName: fileName.\\\\n\\\\n\\\\t^(self isAFileNamed: fullName)\\\\n\\\\t\\\\tifTrue: [\\\\\\\"file already exists:\\\\\\\"\\\\n\\\\t\\\\t\\\\t(FileExistsException fileName: fullName fileClass: self) signal]\\\\n\\\\t\\\\tifFalse: [self new open: fullName forWrite: true]\\\\n\\\\n! !\\\\n\\\\n!StandardFileStream class methodsFor: 'file creation' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\noldFileNamed: fileName\\\\n\\\\t\\\\\\\"Open an existing file with the given name for reading and writing. If the name has no directory part, then the file will be created in the default directory. If the file already exists, its prior contents may be modified or replaced, but the file will not be truncated on close.\\\\\\\"\\\\n\\\\n\\\\t| fullName |\\\\n\\\\tfullName := self fullName: fileName.\\\\n\\\\n\\\\t^(self isAFileNamed: fullName)\\\\n\\\\t\\\\tifTrue: [self new open: fullName forWrite: true]\\\\n\\\\t\\\\tifFalse: [\\\\\\\"File does not exist...\\\\\\\"\\\\n\\\\t\\\\t\\\\t(FileDoesNotExistException fileName: fullName) signal]! !\\\\n\\\\n!StandardFileStream class methodsFor: 'file creation' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nreadOnlyFileNamed: fileName \\\\n\\\\t\\\\\\\"Open an existing file with the given name for reading.\\\\\\\"\\\\n\\\\n\\\\t| fullName f |\\\\n\\\\tfullName := self fullName: fileName.\\\\n\\\\tf := self new open: fullName forWrite: false.\\\\n\\\\t^ f isNil\\\\n\\\\t\\\\tifFalse: [f]\\\\n\\\\t\\\\tifTrue: [\\\\\\\"File does not exist...\\\\\\\"\\\\n\\\\t\\\\t\\\\t((FileDoesNotExistException fileName: fullName) readOnly: true) signal].\\\\n\\\\n\\\\t\\\\\\\"StandardFileStream readOnlyFileNamed: 'kjsd.txt' \\\\\\\"! !\\\\n\\\\n\\\\n!StandardFileStream class methodsFor: 'registry' stamp: 'ar 10/7/1998 14:41'!\\\\nregister: anObject\\\\n\\\\tWeakArray isFinalizationSupported ifFalse:[^anObject].\\\\n\\\\tself registry add: anObject! !\\\\n\\\\n!StandardFileStream class methodsFor: 'registry' stamp: 'ar 10/7/1998 14:41'!\\\\nregistry\\\\n\\\\tWeakArray isFinalizationSupported ifFalse:[^nil].\\\\n\\\\t^Registry isNil\\\\n\\\\t\\\\tifTrue:[Registry := WeakRegistry new]\\\\n\\\\t\\\\tifFalse:[Registry].! !\\\\n\\\\n!StandardFileStream class methodsFor: 'registry' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nretryWithGC: execBlock until: testBlock forFileNamed: fullName\\\\n\\\\t\\\\\\\"Re-implemented to only force GC if a file with the given name exists\\\\\\\"\\\\n\\\\t| blockValue foundIt |\\\\n\\\\tblockValue := execBlock value.\\\\n\\\\t(testBlock value: blockValue) ifTrue:[^blockValue].\\\\n\\\\t\\\\\\\"See if we have a file with the given name\\\\\\\"\\\\n\\\\tfoundIt := Registry keys \\\\\\\"hold on strongly for now\\\\\\\" \\\\n\\\\t\\\\tanySatisfy:[:file| file name sameAs: fullName].\\\\n\\\\tfoundIt ifFalse:[^blockValue].\\\\n\\\\tSmalltalk garbageCollectMost.\\\\n\\\\tblockValue := execBlock value.\\\\n\\\\t(testBlock value: blockValue) ifTrue:[^blockValue].\\\\n\\\\tSmalltalk garbageCollect.\\\\n\\\\t^execBlock value.! !\\\\n\\\\n!StandardFileStream class methodsFor: 'registry' stamp: 'ar 10/7/1998 15:23'!\\\\nunregister: anObject\\\\n\\\\tWeakArray isFinalizationSupported ifFalse:[^anObject].\\\\n\\\\tself registry remove: anObject ifAbsent:[]! !\\\\nObject subclass: #StandardScriptingSystem\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: 'ClassVarNamesInUse FormDictionary HelpStrings StandardPartsBin'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Refactoring Candidates'!\\\\n!StandardScriptingSystem commentStamp: '<historical>' prior: 0!\\\\nAn instance of this is installed as the value of the global variable \\\\\\\"ScriptingSystem\\\\\\\".  Client subclasses are invited, such as one used internally by squeak team for ongoing internal work.!\\\\n\\\\n\\\\n!StandardScriptingSystem methodsFor: 'form dictionary' stamp: 'ar 3/3/2001 19:45'!\\\\ndeletePrivateGraphics\\\\n\\\\t\\\\\\\"ScriptingSystem deletePrivateGraphics\\\\\\\"\\\\n\\\\tself deletePrivateGraphics: self privateGraphics\\\\n\\\\t\\\\tafterStoringToFileNamed: 'disGraphics'! !\\\\n\\\\n!StandardScriptingSystem methodsFor: 'form dictionary' stamp: 'di 2/3/2001 20:10'!\\\\ndeletePrivateGraphics: nameList afterStoringToFileNamed: aFileName\\\\n\\\\t\\\\\\\"This method is used to strip private graphics from the FormDictionary and store them on a file of the given name\\\\\\\"\\\\n\\\\n\\\\t|  replacement toRemove aReferenceStream keySymbol |\\\\n\\\\ttoRemove _ Dictionary new.\\\\n\\\\treplacement _ FormDictionary at: #Gets.\\\\n\\\\n\\\\tnameList do:\\\\n\\\\t\\\\t[:aKey |\\\\n\\\\t\\\\t\\\\tkeySymbol _ aKey asSymbol.\\\\n\\\\t\\\\t\\\\t(toRemove at: keySymbol put: (self formAtKey: keySymbol)).\\\\n\\\\t\\\\t\\\\tFormDictionary at: keySymbol put: replacement].\\\\n\\\\n\\\\taReferenceStream _ ReferenceStream fileNamed: aFileName.\\\\n\\\\taReferenceStream nextPut: toRemove.\\\\n\\\\taReferenceStream close! !\\\\n\\\\n!StandardScriptingSystem methodsFor: 'form dictionary' stamp: 'sw 2/24/2003 16:28'!\\\\nformAtKey: aString\\\\n\\\\t\\\\\\\"Answer the form saved under the given key\\\\\\\"\\\\n\\\\n\\\\tSymbol hasInterned: aString ifTrue:\\\\n\\\\t\\\\t[:aKey | ^ FormDictionary at: aKey ifAbsent: [nil]].\\\\n\\\\t^ nil! !\\\\n\\\\n!StandardScriptingSystem methodsFor: 'form dictionary' stamp: 'ar 3/3/2001 19:46'!\\\\nformAtKey: aKey extent: extent depth: depth\\\\n\\\\t\\\\\\\"ScriptingSystem saveForm: (TileMorph downPicture) atKey: 'downArrow'\\\\\\\"\\\\n\\\\t^ FormDictionary at: aKey asSymbol ifAbsent: [Form extent: extent depth: depth]! !\\\\n\\\\n!StandardScriptingSystem methodsFor: 'form dictionary' stamp: 'ar 3/3/2001 19:49'!\\\\nformDictionary\\\\n\\\\t^FormDictionary! !\\\\n\\\\n!StandardScriptingSystem methodsFor: 'form dictionary' stamp: 'sd 5/11/2003 21:32'!\\\\ninspectFormDictionary\\\\n\\\\t\\\\\\\"ScriptingSystem inspectFormDictionary\\\\\\\"\\\\n\\\\t\\\\n\\\\tGraphicalDictionaryMenu openOn: FormDictionary withLabel: 'Testing One Two Three'! !\\\\n\\\\n!StandardScriptingSystem methodsFor: 'form dictionary' stamp: 'ar 3/3/2001 19:44'!\\\\nprivateGraphics\\\\n\\\\t\\\\\\\"ScriptingSystem deletePrivateGraphics\\\\\\\"\\\\n\\\\t^#(#BadgeMiniPic #BadgePic #Broom #CedarPic #CollagePic #CoverMain #CoverSpiral #CoverTexture #Fred #ImagiPic #KayaPic #StudioPic)! !\\\\n\\\\n!StandardScriptingSystem methodsFor: 'form dictionary' stamp: 'sw 10/6/1999 20:57'!\\\\nsaveForm: aForm atKey: aKey\\\\n\\\\tFormDictionary at: aKey asSymbol put: aForm! !\\\\n\\\\n!StandardScriptingSystem methodsFor: 'form dictionary' stamp: 'sw 10/24/1998 14:12'!\\\\nsqueakyMouseForm\\\\n\\\\t^ self formAtKey: 'squeakyMouse'\\\\n\\\\n\\\\\\\"\\\\n\\\\tScriptingSystem saveForm: (Form\\\\n\\\\textent: 30@29\\\\n\\\\tdepth: 16\\\\n\\\\tfromArray: #( 1811114995 1878286257 2012637171 1811180532 1811180533 1811179508 1811180532 1811179508 1744006133 1878289396 1811180533 1878289396 1744007156 1674736630 1744006132 1811114995 1811181556 1744006131 1811246068 1811180532 1811179508 1811180532 1744071668 1811113972 1811180532 1811180532 1811179507 1878288338 1945529332 1744071668 1743941620 1811112945 1811179506 1811114995 1744006131 1744006130 1744005106 1811048434 1811113969 1743939570 1811179506 1743939571 1676833782 1676765171 1811047410 1744006131 1811048435 1811116020 1811180531 1743939571 1811048435 1743939570 1743939570 1743939570 1743940594 1744005106 1811181556 1811180532 1676766196 1743939570 1878420468 1676963830 1189896082 1811245044 1744137204 1744070644 1811179508 1811113971 1743939571 1811179508 1811246070 1811309524 1811302093 1811310580 1811246068 1674867703 1744049472 1120606594 1118465013 1744137205 1811179508 1811180532 1744071667 1744006132 1811112947 1811247095 1605584589 358761132 289435638 1676830707 1741975543 1462778473 1811312631 702891724 1811310548 1945528308 1811178450 1945528307 1878288372 1878353875 1878421494 1051471335 1809213397 1118524175 1811246068 1945659348 1185698607 1878486005 1672694510 1118531574 1607626741 1878420467 1811180533 1743942645 1744072693 1811301035 1185770487 1878486006 1324239597 1811180533 1811116019 1120623438 1878352818 1945462739 704868339 1878289395 1811049459 1878221808 1878223859 1743876083 1811162563 1945463796 1811181556 1464746666 1811116018 1809019893 1120551562 1945464821 1741844468 1466842760 1878289395 1811048434 1811050483 1811050483 1878223859 1049188174 1741910004 1811181556 1256998634 1811114994 1878289396 1466840647 1744007156 1744006131 1676877216 1743940596 1878222835 1743938545 1878351792 1676833781 358641652 1743940596 1811050484 845566798 1811113970 1811114995 1811163652 1811112913 1878420468 1878282028 1811179506 1607560178 1878289395 1676900342 1878351825 1466853330 1811113971 1811116019 635659217 1811179506 1811245045 1676942754 1744137206 1744201717 1676962806 1676962805 1811310581 1676896245 1744199635 1811376117 1744072695 1744005109 1811244019 499279861 1811310581 1811244020 1811293668 1399943159 1605528567 1744136181 982063522 986342388 1744070645 1744189066 430063308 1744071669 1744070644 1744067504 566519797 1744136181 1744137205 1743999854 912813044 1811311606 1742162607 4195488 283139922 1945531382 1253113857 144710948 1601400791 1811246069 1811167879 1464821747 1744136180 1674799094 1811178482 843473875 1811311606 1878533542 2106790 2080066222 1876193270 696845376 627472380 1185772536 1878355957 1743990309 1744007157 1676898294 1744006132 1811114996 1743941620 1811180533 1809204941 4194368 4217681 1878290421 1252982848 4194336 1670540278 1739811795 1878353906 1744006131 1811179506 1744007157 1744005106 1945462771 1811182582 1811311574 1393641133 1462856629 2012638196 1876382449 1112301394 1742041045 1945596917 1676833781 1811113970 1811179507 1811180532 1672705014 1674735606 1672697648 1945725943 1878551479 1809215479 1811312629 1809216504 1809215479 1809215478 1462853490 1878487029 1744007158 1744005075 1811239726 704979363 495004132 700789287 562372997 631646663 1739998892 4194400 1116497846 698688932 562375109 770124262 633609569 495070758 1257010166 562315916 1809279958 2012894002 1047280171 980237901 910966381 1668677696 4194400 6314867 1047281260 908804749 910968495 1393719290 1809279959 1185750370 1809214455 1878469062 423836236 1532188466 1601592148 1462986647 1672937568 4194368 6319062 1603622706 1601525554 1601522417 1047336194 770206679 1878487031 1878409899 977955830 1809145716 1118586509 980105834 980045584 1811372914 980104778 1605526483 1395605131 910769804 1118651052 1534358520 1809136234 1118596053 1532059506 1878485973 1326456163 1945660374 1742106615 1811311607 1945725942 1742107641 1744072693 1811311605 1744203767 1878551543 564478604 1878553591 1603428242 1811048433 1811049459 1051290611 1744006131 1811049459 1878156273 1743874034 1744007156 1743874033 1811048434 1811113970 1743939571 1743933228 1603301363 1743875059 1811049458 1945461745 1811181556 1811113971 1811049458 1811048434 1811116020 1878287346 1878223857 1743940594 1744006130 1744007157 1945395153 1945400309 1811048434 1743810547 1676765170 1878353906 1811113970 1743874032 1810983921 1743874033 1811113971 1676765169 1743874034 1743940593 1743939569 1811047409 1676765168 1743940595 1810981872 1945397235 1607560179 1743941620 1810982897 1810983921 1811048433 1744007155 1743875059 1811048434 1743875058 1743939568 1676832754 1811116019 1811114994 1811244019 1676962805 1677029367 1811244020 1744005106 1743940594 1811246068 1744070645 1676961781 1744004084 1676897269 1811180533 1878353908 1744004083 1744070645)\\\\n\\\\toffset: 0@0) atKey: 'squeakyMouse'\\\\\\\"! !\\\\n\\\\n\\\\n!StandardScriptingSystem methodsFor: 'help dictionary' stamp: 'dgd 9/1/2003 14:25'!\\\\nhelpStringOrNilFor: aSymbol \\\\n\\\\t\\\\\\\"If my HelpStrings dictionary has an entry at the given symbol, \\\\n\\\\tanswer that entry's value, else answer nil\\\\\\\"\\\\n\\\\tHelpStrings\\\\n\\\\t\\\\tat: aSymbol\\\\n\\\\t\\\\tifPresent:[:string | ^ string translated].\\\\n^ nil! !\\\\n\\\\n!StandardScriptingSystem methodsFor: 'help dictionary' stamp: 'sw 6/15/1999 17:03'!\\\\ninitializeHelpStrings\\\\n\\\\t\\\\\\\"Initialize the data structure that determines, for the etoy system, help messages for various scripting elements.  The structure is built up by letting every Morph subclass contribute elements simply by implementing method #helpContributions.  Consult implementors of #helpContributions for examples of how this goes.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"ScriptingSystem initializeHelpStrings\\\\\\\"\\\\n\\\\n\\\\t| aDictionary |\\\\n\\\\taDictionary _ IdentityDictionary new.  \\\\n\\\\t\\\\\\\"For safety, the new copy is built up in this temp first, so that if an error occurs during the creation of the structure, the old version will remain remain in place\\\\\\\"\\\\n\\\\n\\\\tMorph withAllSubclasses do:\\\\n\\\\t\\\\t[:aClass | (aClass class selectors includes: #helpContributions)\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[aClass helpContributions do:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:pair | aDictionary at: pair first put: pair second]]].\\\\n\\\\n\\\\t\\\\tHelpStrings _ aDictionary! !\\\\n\\\\n\\\\n!StandardScriptingSystem methodsFor: 'utilities' stamp: 'sw 10/30/2000 16:33'!\\\\nallClassVarNamesInSystem\\\\n\\\\t\\\\\\\"Compute and answer a set of all the class variable names known to the sytem from any class\\\\\\\"\\\\n\\\\n\\\\t| aList |\\\\n\\\\taList _ OrderedCollection new.\\\\n\\\\tObject withAllSubclasses do:\\\\n\\\\t\\\\t[:c | aList addAll: c allClassVarNames].\\\\n\\\\t^ aList asSet\\\\n\\\\n\\\\t\\\\\\\"ScriptingSystem allClassVarNamesInSystem\\\\\\\"\\\\n! !\\\\n\\\\n!StandardScriptingSystem methodsFor: 'utilities' stamp: 'sw 6/16/2005 01:35'!\\\\ncustomizeForEToyUsers: aBoolean\\\\n\\\\t\\\\\\\"If aBoolean is true, set things up for etoy users.  If it's false, unset some of those things.  Some things are set when switching into etoy mode but not reversed when switching out of etoy mode.\\\\\\\"\\\\n \\\\n\\\\t#(\\\\t\\\\n\\\\t\\\\t(allowEtoyUserCustomEvents\\\\tno\\\\t\\\\treverse)\\\\n\\\\t\\\\t(balloonHelpEnabled\\\\t\\\\t\\\\tyes\\\\t\\\\tdontReverse)\\\\n\\\\t\\\\t(debugHaloHandle\\\\t\\\\t\\\\tno\\\\t\\\\treverse)\\\\n\\\\t\\\\t(modalColorPickers\\\\t\\\\t\\\\tyes\\\\t\\\\tdontReverse)\\\\n\\\\t\\\\t(oliveHandleForScriptedObjects\\\\tno\\\\tdontReverse)\\\\n\\\\t\\\\t(uniqueNamesInHalos\\\\t\\\\tyes\\\\t\\\\treverse)\\\\n\\\\t\\\\t(useUndo\\\\t\\\\t\\\\t\\\\t\\\\tyes\\\\t\\\\tdontReverse)\\\\n\\\\t\\\\t(infiniteUndo\\\\t\\\\t\\\\t\\\\tno\\\\t\\\\tdontReverse)\\\\n\\\\t\\\\t(warnIfNoChangesFile\\\\t\\\\tno\\\\t\\\\treverse)\\\\n\\\\t\\\\t(warnIfNoSourcesFile\\\\t\\\\tno\\\\t\\\\treverse)) do:\\\\n\\\\t\\\\t\\\\t[:trip |\\\\n\\\\t\\\\t\\\\t\\\\t(aBoolean or: [trip third == #reverse]) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[Preferences enableOrDisable: trip first asPer:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t((trip second == #yes) & aBoolean) | ((trip second == #no) & aBoolean not)]]! !\\\\n\\\\n!StandardScriptingSystem methodsFor: 'utilities' stamp: 'sw 4/6/2005 09:30'!\\\\nsoundNamesToSuppress\\\\n\\\\t\\\\\\\"Answer a list of sound-names that are not to be offered in sound-choice pop-ups unless they are the current choice\\\\\\\"\\\\n\\\\n\\\\t^ #('scrape' 'scritch' 'peaks')! !\\\\n\\\\n!StandardScriptingSystem methodsFor: 'utilities' stamp: 'sw 11/26/1999 15:44'!\\\\nstripGraphicsForExternalRelease\\\\n\\\\t\\\\\\\"ScriptingSystem stripGraphicsForExternalRelease\\\\\\\"\\\\n\\\\n\\\\t|  replacement |\\\\n\\\\treplacement _ FormDictionary at: #Gets.\\\\n\\\\n\\\\t#('BadgeMiniPic' 'BadgePic' 'Broom' 'CedarPic' 'CollagePic' 'CoverMain' 'CoverSpiral' 'CoverTexture' 'Fred' 'ImagiPic' 'KayaPic' 'StudioPic')\\\\n\\\\t\\\\tdo:\\\\n\\\\t\\\\t\\\\t[:aKey | FormDictionary at: aKey asSymbol put: replacement]! !\\\\n\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-customevents-custom events' stamp: 'nk 11/1/2004 07:47'!\\\\naddCustomEventFor: registrantClass named: aSymbol help: helpString targetMorphClass: targetClass\\\\n\\\\t| registration |\\\\n\\\\tregistration _ self customEventsRegistry at: aSymbol ifAbsentPut: [ IdentityDictionary new ].\\\\n\\\\tregistration at: registrantClass put: { helpString. targetClass }.\\\\n! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-customevents-custom events' stamp: 'nk 9/26/2003 23:23'!\\\\naddUserCustomEventNamed: aSymbol help: helpString\\\\n\\\\tself currentWorld addUserCustomEventNamed: aSymbol help: helpString.\\\\n\\\\t\\\\\\\"Vocabulary addStandardVocabulary: UserCustomEventNameType new.\\\\\\\"\\\\n\\\\tVocabulary customEventsVocabulary.\\\\n\\\\tSymbolListTile updateAllTilesForVocabularyNamed: #CustomEvents! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-customevents-custom events' stamp: 'nk 11/1/2004 08:19'!\\\\ncustomEventNamesAndHelpStringsFor: aPlayer\\\\n\\\\t| retval help helpStrings morph |\\\\n\\\\tmorph := aPlayer costume renderedMorph.\\\\n\\\\tretval := SortedCollection sortBlock: [ :a :b | a first < b first ].\\\\n\\\\tself customEventsRegistry\\\\n\\\\t\\\\tkeysAndValuesDo: [ :k :v |\\\\n\\\\t\\\\t\\\\thelpStrings := Array streamContents: [ :hsStream |\\\\n\\\\t\\\\t\\\\t\\\\tv keysAndValuesDo: [ :registrant :array |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(morph isKindOf: array second) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\thelp := String streamContents: [ :stream |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tv size > 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [ stream nextPut: $(;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnextPutAll: array second name;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnextPut: $);\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tspace ].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstream nextPutAll: array first ].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\thsStream nextPut: help ]]].\\\\n\\\\t\\\\t\\\\thelpStrings isEmpty ifFalse: [retval add: { k. helpStrings } ]].\\\\n\\\\t^ retval! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-customevents-custom events' stamp: 'nk 9/26/2003 23:31'!\\\\ncustomEventStati\\\\n\\\\t^self globalCustomEventNames,\\\\n\\\\tself userCustomEventNames! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-customevents-custom events' stamp: 'nk 10/12/2003 13:14'!\\\\ncustomEventsRegistry\\\\n\\\\t^Smalltalk at: #CustomEventsRegistry ifAbsentPut: [ IdentityDictionary new ].! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-customevents-custom events' stamp: 'nk 9/26/2003 23:30'!\\\\nglobalCustomEventNames\\\\n\\\\t^self customEventsRegistry keys asArray sort! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-customevents-custom events' stamp: 'nk 11/1/2004 07:56'!\\\\nglobalCustomEventNamesFor: aPlayer\\\\n\\\\t| morph names |\\\\n\\\\tmorph := aPlayer costume renderedMorph.\\\\n\\\\tnames := SortedCollection new.\\\\n\\\\tself customEventsRegistry keysAndValuesDo: [ :k :v |\\\\n\\\\t\\\\t(v anySatisfy: [ :array | morph isKindOf: array second ])\\\\n\\\\t\\\\t\\\\tifTrue: [ names add: k ]].\\\\n\\\\t^names asArray! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-customevents-custom events' stamp: 'nk 7/20/2003 12:37'!\\\\nremoveCustomEventNamed: aSymbol for: registrant\\\\n\\\\t| registration helpString |\\\\n\\\\tregistration _ self customEventsRegistry at: aSymbol ifAbsent: [ ^nil ].\\\\n\\\\thelpString _ registration removeKey: registrant ifAbsent: [].\\\\n\\\\tregistration isEmpty ifTrue: [ self customEventsRegistry removeKey: aSymbol ].\\\\n\\\\t^helpString! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-customevents-custom events' stamp: 'nk 9/26/2003 23:26'!\\\\nremoveUserCustomEventNamed: eventName\\\\n\\\\t| retval |\\\\n\\\\tretval _ self currentWorld removeUserCustomEventNamed: eventName.\\\\n\\\\t\\\\\\\"Vocabulary addStandardVocabulary: UserCustomEventNameType new.\\\\\\\"\\\\n\\\\tVocabulary customEventsVocabulary.\\\\n\\\\tSymbolListTile updateAllTilesForVocabularyNamed: #CustomEvents.\\\\n\\\\t^retval! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-customevents-custom events' stamp: 'nk 6/30/2004 18:16'!\\\\nstandardEventStati\\\\n\\\\t\\\\\\\"Answer the events that can be directed to a particular morph by its event handler.\\\\\\\"\\\\n\\\\t^ #(mouseDown\\\\t\\\\\\\"run when mouse goes down on me\\\\\\\"\\\\n\\\\t\\\\tmouseStillDown\\\\t\\\\\\\"while mouse still down\\\\\\\"\\\\n\\\\t\\\\tmouseUp\\\\t\\\\t\\\\\\\"when mouse comes back up\\\\\\\"\\\\n\\\\t\\\\tmouseEnter\\\\t\\\\\\\"when mouse enters my bounds, button up\\\\\\\"\\\\n\\\\t\\\\tmouseLeave\\\\t\\\\\\\"when mouse exits my bounds, button up\\\\\\\"\\\\n\\\\t\\\\tmouseEnterDragging\\\\t\\\\\\\"when mouse enters my bounds, button down\\\\\\\"\\\\n\\\\t\\\\tmouseLeaveDragging\\\\t\\\\\\\"when mouse exits my bounds, button down\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"keyStroke\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"gesture\\\\\\\"\\\\n\\\\t)\\\\n! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-customevents-custom events' stamp: 'nk 9/26/2003 23:22'!\\\\nuserCustomEventNames\\\\n\\\\t^ self currentWorld userCustomEventNames! !\\\\n\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-customevents-help dictionary' stamp: 'nk 11/1/2004 08:21'!\\\\nstatusHelpStringFor: aPlayer\\\\n\\\\t^String streamContents: [ :stream |\\\\n\\\\t\\\\tstream nextPutAll: 'normal -- run when called\\\\npaused -- ready to run all the time\\\\nticking -- run all the time\\\\nmouseDown -- run when mouse goes down on me\\\\nmouseStillDown -- while mouse still down\\\\nmouseUp -- when mouse comes back up\\\\nmouseEnter -- when mouse enters my bounds, button up\\\\nmouseLeave -- when mouse exits my bounds, button up\\\\nmouseEnterDragging -- when mouse enters my bounds, button down\\\\nmouseLeaveDragging -- when mouse exits my bounds, button down\\\\nopening -- when I am being opened\\\\nclosing -- when I am being closed' translated.\\\\n\\\\n\\\\\\\"'keyStroke -- run when user hits a key' \\\\\\\"\\\\n\\\\n\\\\tstream cr; cr; nextPutAll: 'More events:' translated; cr.\\\\n\\\\n\\\\t(self customEventNamesAndHelpStringsFor: aPlayer) do: [ :array |\\\\n\\\\t\\\\tstream cr;\\\\n\\\\t\\\\tnextPutAll: array first;\\\\n\\\\t\\\\tnextPutAll: ' -- '.\\\\n\\\\t\\\\tarray second do: [ :help | stream nextPutAll: help translated ]\\\\n\\\\t\\\\t\\\\tseparatedBy: [ stream nextPutAll: ' or ' translated ]].\\\\n\\\\n\\\\t(Preferences allowEtoyUserCustomEvents) ifTrue: [\\\\n\\\\tself userCustomEventNames isEmpty ifFalse: [\\\\n\\\\t\\\\tstream cr; cr; nextPutAll: 'User custom events:' translated; cr.\\\\n\\\\t\\\\tself currentWorld userCustomEventsRegistry keysAndValuesDo: [ :key :value |\\\\n\\\\t\\\\t\\\\tstream cr; nextPutAll: key; nextPutAll: ' -- '; nextPutAll: value ]]]]! !\\\\n\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-font & color choices' stamp: 'sw 5/2/1998 14:26'!\\\\ncolorBehindTiles\\\\n\\\\t^ Color r: 0.903 g: 1.0 b: 0.903! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-font & color choices' stamp: 'dgd 7/12/2003 12:06'!\\\\nfontForNameEditingInScriptor\\\\n\\\\t^ Preferences standardEToysFont! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-font & color choices' stamp: 'dgd 7/12/2003 12:05'!\\\\nfontForTiles\\\\n\\\\t^ Preferences standardEToysFont! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-font & color choices' stamp: 'nk 7/12/2003 08:59'!\\\\nsmallBoldFont\\\\n\\\\t\\\\\\\"Answer a small bold font for use in some standard scripting-support structures\\\\\\\"\\\\n\\\\n\\\\t^ StrikeFont familyName: Preferences standardEToysFont familyName size: 12! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-font & color choices' stamp: 'sw 9/14/1998 14:41'!\\\\nstatusColorSymbolFor: statusSymbol\\\\n\\\\t#(\\\\t(normal\\\\t\\\\t\\\\t\\\\t\\\\tgreen)\\\\n\\\\t\\\\t(ticking\\\\t\\\\t\\\\t\\\\t\\\\tblue)\\\\n\\\\t\\\\t(paused\\\\t\\\\t\\\\t\\\\t\\\\tred)\\\\n\\\\t\\\\t(mouseDown\\\\t\\\\t\\\\t\\\\tyellow)\\\\n\\\\t\\\\t(mouseStillDown\\\\t\\\\t\\\\tlightYellow)\\\\n\\\\t\\\\t(mouseUp\\\\t\\\\t\\\\t\\\\tlightBlue)\\\\n\\\\t\\\\t(mouseEnter\\\\t\\\\t\\\\t\\\\tlightBrown)\\\\n\\\\t\\\\t(mouseLeave\\\\t\\\\t\\\\tlightRed)\\\\n\\\\t\\\\t(mouseEnterDragging\\\\tlightGray)\\\\n\\\\t\\\\t(mouseLeaveDragging\\\\tdarkGray)\\\\n\\\\t\\\\t(keyStroke\\\\t\\\\t\\\\t\\\\tlightGreen)) do:\\\\n\\\\n\\\\t\\\\t\\\\t[:pair | statusSymbol == pair first ifTrue: [^ pair second]].\\\\n\\\\n\\\\t\\\\t^ #blue! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-font & color choices' stamp: 'sw 5/2/1998 14:23'!\\\\nuniformTileInteriorColor\\\\n\\\\t^ Color r: 0.806 g: 1.0 b: 0.806! !\\\\n\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-form dictionary' stamp: 'sw 5/12/1999 10:09'!\\\\ninstallSolidMenuForm\\\\n\\\\t\\\\\\\"ScriptingSystem installSolidMenuForm\\\\\\\"\\\\n\\\\tself saveForm:\\\\n\\\\t\\\\t(Form extent: 14@16 depth: 16\\\\n\\\\tfromArray: #( 1 0 0 0 0 0 0 65537 65536 0 0 0 65537 0 65537 65537 65537 65537 65537 65537 65536 65537 65537 65537 65537 65537 1600061441 65536 65537 1600085855 1600085855 1600085855 1600085855 1600061441 65536 65537 1600085855 65537 65537 65537 65537 65536 65537 1600085855 65537 65537 65537 1600061441 65536 65537 1600085855 1600085855 1600085855 1600085855 1600085855 65537 65537 1600085855 65537 65537 65537 1600085855 65537 65537 1600085855 1600061441 65537 65537 89951 65537 65537 1600085855 1600085855 1600085855 1600085855 1600085855 65537 65537 1600085855 1600061441 65537 65537 65537 65537 65537 1600085855 65537 65537 65537 65536 65537 65537 65537 65537 65537 65537 65537 65537 1 65537 65537 65537 65537 65537 65536 0 65536 0 0 0 0 0) offset: 0@0)\\\\n\\\\t\\\\tatKey: 'SolidMenu'! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-form dictionary' stamp: 'sw 11/26/1999 15:37'!\\\\nmergeGraphicsFrom: aDictionary\\\\n\\\\t\\\\\\\"aDictionary is assumed to hold associations of the form <formName> -> <form>.   Merge the graphics held by that dictionary into the internal FormDictionary, overlaying any existing entries with the ones found in aDictionary\\\\\\\"\\\\n\\\\n\\\\taDictionary associationsDo:\\\\n\\\\t\\\\t[:assoc | self saveForm: assoc value atKey: assoc key]\\\\n\\\\n\\\\t\\\\t\\\\\\\"works ok even if keys in aDictionary are strings rather than symbols\\\\\\\"! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-form dictionary' stamp: 'sw 2/20/2002 01:09'!\\\\npatchInNewStandardPlayerForm\\\\n\\\\t\\\\\\\"Patch in a darker and larger representation of a Dot.  No senders -- called from the postscript of an update\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"ScriptingSystem patchInNewStandardPlayerForm\\\\\\\"\\\\n\\\\n\\\\tFormDictionary at: #standardPlayer put:\\\\n\\\\t\\\\t(Form\\\\n\\\\textent: 13@13\\\\n\\\\tdepth: 16\\\\n\\\\tfromArray: #( 0 0 0 65536 0 0 0 0 0 65537 65537 65536 0 0 0 65537 65537 65537 65537 65536 0 0 65537 65537 65537 65537 65536 0 1 65537 65537 65537 65537 65537 0 1 65537 65537 65537 65537 65537 0 65537 65537 65537 65537 65537 65537 65536 1 65537 65537 65537 65537 65537 0 1 65537 65537 65537 65537 65537 0 0 65537 65537 65537 65537 65536 0 0 65537 65537 65537 65537 65536 0 0 0 65537 65537 65536 0 0 0 0 0 65536 0 0 0)\\\\n\\\\toffset: 0@0)! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-form dictionary' stamp: 'sw 5/2/1998 14:01'!\\\\nreadFormsFromFileNamed: aFileName\\\\n\\\\t\\\\\\\"Read the entire FormDictionary in from a designated file on disk\\\\\\\"\\\\n\\\\n\\\\t| aReferenceStream |\\\\n\\\\taReferenceStream _ ReferenceStream fileNamed: aFileName.\\\\n\\\\tFormDictionary _ aReferenceStream next.\\\\n\\\\taReferenceStream close\\\\n\\\\n\\\\t\\\\\\\"ScriptingSystem readFormsFromFileNamed: 'EToyForms22Apr'\\\\\\\"! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-form dictionary' stamp: 'sw 9/14/2000 21:29'!\\\\nreadFormsFromFileNamed: aFileName andStoreIntoGlobal: globalName\\\\n\\\\t\\\\\\\"Read the a FormDictionary in from a designated file on disk and save it in the designated global\\\\\\\"\\\\n\\\\n\\\\t| aReferenceStream |\\\\n\\\\taReferenceStream _ ReferenceStream fileNamed: aFileName.\\\\n\\\\tSmalltalk at: globalName put: aReferenceStream next.\\\\n\\\\taReferenceStream close\\\\n\\\\n\\\\t\\\\\\\"ScriptingSystem readFormsFromFileNamed: 'SystemFormsFromFwdF.forms' andStoreIntoGlobal: #FormsTemp\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"ScriptingSystem saveForm:  (FormsTemp at: #StackElementDesignationHelp) atKey: #StackElementDesignationHelp\\\\\\\"! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-form dictionary' stamp: 'sw 4/23/1999 11:24'!\\\\nrestorePrivateGraphics\\\\n\\\\t\\\\\\\"ScriptingSystem restorePrivateGraphics\\\\\\\"\\\\n\\\\t| aReferenceStream |\\\\n\\\\taReferenceStream _ ReferenceStream fileNamed: 'disGraphics'.\\\\n\\\\tself mergeGraphicsFrom: aReferenceStream next.\\\\n\\\\taReferenceStream close.\\\\n! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-form dictionary' stamp: 'sw 5/6/1998 17:46'!\\\\nsaveFormsToFileNamed: aFileName\\\\n\\\\t\\\\\\\"Save the current state of form dictionary to disk for possible later retrieval\\\\\\\"\\\\n  \\\\t (ReferenceStream fileNamed: aFileName) nextPut: FormDictionary; close\\\\n\\\\n\\\\t\\\\\\\"ScriptingSystem saveFormsToFileNamed: 'SystemForms06May98.forms'\\\\\\\"! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-form dictionary' stamp: 'sw 12/7/1998 16:47'!\\\\nstandardForms\\\\n\\\\t\\\\\\\"ScriptingSystem standardForms\\\\\\\"\\\\n\\\\t^ FormDictionary collect: [:f | f]! !\\\\n\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-parts bin' stamp: 'tk 10/20/2004 15:52'!\\\\nanyButtonPressedTiles\\\\n\\\\t\\\\\\\"Answer tiles representing the query 'is any button pressed?'\\\\\\\"\\\\n\\\\n\\\\t^ self tilesForQuery: '(ActiveHand anyButtonPressed)' label: 'button down?' translated! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-parts bin' stamp: 'sw 11/16/2004 13:56'!\\\\nnoButtonPressedTiles\\\\n\\\\t\\\\\\\"Answer tiles representing the query 'is no button pressed?'\\\\\\\"\\\\n\\\\n\\\\t^ self tilesForQuery: '(ActiveHand noButtonPressed)' label: 'button up?' translated! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-parts bin' stamp: 'sw 5/3/1999 22:40'!\\\\nprototypicalHolder\\\\n\\\\t| aHolder |\\\\n\\\\taHolder _ PasteUpMorph authoringPrototype color: Color orange muchLighter; borderColor: Color orange lighter.\\\\n\\\\taHolder setNameTo: 'holder'; extent: 160 @ 110.\\\\n\\\\t^ aHolder behaveLikeHolder.\\\\n! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-parts bin' stamp: 'sw 10/27/1998 13:35'!\\\\nresetStandardPartsBin\\\\n\\\\t\\\\\\\"ScriptingSystem resetStandardPartsBin\\\\\\\"\\\\n\\\\n\\\\tStandardPartsBin _ nil! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-parts bin' stamp: 'sw 7/3/2001 08:01'!\\\\ntilesForQuery: expressionString label: aLabel\\\\n\\\\t\\\\\\\"Answer scripting tiles that represent the query,\\\\\\\"\\\\n\\\\n\\\\t| aPhrase aTile |\\\\n\\\\taPhrase _ SystemQueryPhrase new.\\\\n\\\\taTile _ BooleanTile new.\\\\n\\\\taTile setExpression: expressionString  label: aLabel.\\\\n\\\\taPhrase addMorph: aTile.\\\\n\\\\t^ aPhrase\\\\n! !\\\\n\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-script-control' stamp: 'dgd 9/19/2003 14:40'!\\\\ngoButton\\\\n\\\\t| aButton |\\\\n\\\\taButton _  ThreePhaseButtonMorph new.\\\\n\\\\taButton image:  (ScriptingSystem formAtKey: 'GoPicOn');\\\\n\\\\t\\\\t\\\\toffImage: (ScriptingSystem formAtKey: 'GoPic');\\\\n\\\\t\\\\t\\\\tpressedImage: (ScriptingSystem formAtKey: 'GoPicOn');\\\\n\\\\t\\\\t\\\\tactionSelector: #goUp:with:; \\\\n\\\\t\\\\t\\\\targuments: (Array with: nil with: aButton);\\\\n\\\\t\\\\t\\\\tactWhen: #buttonUp;\\\\n\\\\t\\\\t\\\\ttarget: self;\\\\n\\\\t\\\\t\\\\tsetNameTo: 'Go Button';\\\\n\\\\t\\\\t\\\\tsetBalloonText:\\\\n'Resume running all paused scripts' translated.\\\\n\\\\t^ aButton! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-script-control' stamp: 'sw 11/11/1998 15:24'!\\\\ngoUp: evt with: aGoButton\\\\n\\\\taGoButton presenter startRunningScriptsFrom: aGoButton! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-script-control' stamp: 'sw 1/23/2001 11:39'!\\\\nscriptControlButtons\\\\n\\\\t\\\\\\\"Answer a composite object that serves to control the stop/stop/go status of a Presenter\\\\\\\"\\\\n\\\\n\\\\t| wrapper |\\\\n\\\\twrapper _ AlignmentMorph newRow setNameTo: 'script controls'.\\\\n\\\\twrapper vResizing: #shrinkWrap.\\\\n\\\\twrapper hResizing: #shrinkWrap.\\\\n\\\\twrapper addMorph: self stopButton.\\\\n\\\\twrapper addMorphBack: self stepButton.\\\\n\\\\twrapper addMorphBack: self goButton.\\\\n\\\\twrapper beTransparent.\\\\n\\\\t^ wrapper! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-script-control' stamp: 'dgd 9/19/2003 14:41'!\\\\nstepButton\\\\n\\\\t| aButton |\\\\n\\\\tself flag: #deferred.  \\\\\\\"ambiguity about recipients\\\\\\\"\\\\n\\\\taButton _ ThreePhaseButtonMorph new.\\\\n\\\\t\\\\taButton\\\\n\\\\t\\\\t\\\\timage:  (ScriptingSystem formAtKey: 'StepPicOn');\\\\n\\\\t\\\\t\\\\toffImage: (ScriptingSystem formAtKey: 'StepPic');\\\\n\\\\t\\\\t\\\\tpressedImage:  (ScriptingSystem formAtKey: 'StepPicOn');\\\\n\\\\t\\\\t\\\\targuments: (Array with: nil with: aButton);\\\\n\\\\t\\\\t \\\\tactionSelector: #stepStillDown:with:; \\\\n\\\\t\\\\t\\\\ttarget: self;\\\\n\\\\t\\\\t\\\\tsetNameTo: 'Step Button'; \\\\n\\\\t\\\\t\\\\tactWhen: #whilePressed;\\\\n\\\\t\\\\t\\\\ton: #mouseDown send: #stepDown:with: to: self;\\\\n\\\\t\\\\t\\\\ton: #mouseStillDown send: #stepStillDown:with: to: self;\\\\n\\\\t\\\\t\\\\ton: #mouseUp send: #stepUp:with: to: self;\\\\n\\\\t\\\\t\\\\tsetBalloonText:\\\\n'Run every paused script exactly once.  Keep the mouse button down over \\\\\\\"Step\\\\\\\" and everything will keep running until you release it' translated.\\\\n\\\\t^ aButton! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-script-control' stamp: 'sw 10/30/1998 15:33'!\\\\nstepDown: evt with: aMorph\\\\n\\\\taMorph presenter stopRunningScripts! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-script-control' stamp: 'sw 10/30/1998 15:35'!\\\\nstepStillDown: dummy with: theButton\\\\n\\\\ttheButton presenter stepStillDown: dummy with: theButton! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-script-control' stamp: 'sw 10/30/1998 15:35'!\\\\nstepUp: evt with: aMorph\\\\n\\\\taMorph presenter stepUp: evt with: aMorph! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-script-control' stamp: 'dgd 9/19/2003 14:41'!\\\\nstopButton\\\\n\\\\t\\\\\\\"Answer a new button that can serve as a stop button\\\\\\\"\\\\n\\\\t| aButton |\\\\n\\\\taButton _ ThreePhaseButtonMorph new.\\\\n\\\\taButton\\\\n\\\\t\\\\timage:  (ScriptingSystem formAtKey: 'StopPic');\\\\n\\\\t\\\\toffImage: (ScriptingSystem formAtKey: 'StopPic');\\\\n\\\\t\\\\tpressedImage:  (ScriptingSystem formAtKey: 'StopPicOn').\\\\n\\\\t\\\\taButton actionSelector: #stopUp:with:; \\\\n\\\\t\\\\targuments: (Array with: nil with: aButton);\\\\n\\\\t\\\\tactWhen: #buttonUp;\\\\n\\\\t\\\\ttarget: self;\\\\n\\\\t\\\\tsetNameTo: 'Stop Button'; \\\\n\\\\t\\\\tsetBalloonText: 'Pause all ticking scripts.' translated.\\\\n\\\\t^ aButton! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-script-control' stamp: 'sw 11/11/1998 15:16'!\\\\nstopUp: dummy with: theButton\\\\n\\\\t| aPresenter |\\\\n\\\\t(aPresenter _ theButton presenter) flushPlayerListCache.  \\\\\\\"catch guys not in cache but who're running\\\\\\\"\\\\n\\\\taPresenter stopRunningScriptsFrom: theButton! !\\\\n\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-tile colors' stamp: 'sw 8/28/2004 15:19'!\\\\ncolorForType: typeSymbol\\\\n\\\\t\\\\\\\"Answer the color to use to represent the given type symbol\\\\\\\"\\\\n\\\\n\\\\ttrue ifTrue:\\\\n\\\\t\\\\t[^ self standardTileBorderColor].\\\\n\\\\n\\\\ttypeSymbol capitalized = #Command ifTrue:\\\\n\\\\t\\\\t[^ Color fromRgbTriplet: #(0.065 0.258 1.0)].\\\\n\\\\t\\\\\\\"Command is historical and idiosyncratic and should be regularized\\\\\\\"\\\\n\\\\n\\\\t^ (Vocabulary vocabularyForType: typeSymbol) typeColor! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-tile colors' stamp: 'sw 10/29/1998 16:18'!\\\\ncolorFudge\\\\n\\\\t^ 0.4! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-tile colors' stamp: 'sw 8/28/2004 20:31'!\\\\nstandardTileBorderColor\\\\n\\\\t\\\\\\\"Answer the color to use for tile borders\\\\\\\"\\\\n\\\\n\\\\t^ Color r: 0.804 g: 0.76 b: 0.564! !\\\\n\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-universal slots & scripts' stamp: 'sw 1/4/2005 02:20'!\\\\nacceptableSlotNameFrom: originalString forSlotCurrentlyNamed: currentName asSlotNameIn: aPlayer world: aWorld\\\\n\\\\t\\\\\\\"Produce an acceptable slot name, derived from the current name, for aPlayer.  This method will always return a valid slot name that will be suitable for use in the given situation, though you might not like its beauty sometimes.\\\\\\\"\\\\n\\\\n\\\\t| aString stemAndSuffix proscribed stem suffix putative |\\\\n\\\\taString _ originalString asIdentifier: false.  \\\\\\\"get an identifier not lowercase\\\\\\\"\\\\n\\\\tstemAndSuffix _ aString stemAndNumericSuffix.\\\\n\\\\tproscribed _ #(self super thisContext costume costumes dependents #true #false size), aPlayer class allInstVarNames.\\\\n\\\\n\\\\tstem _ stemAndSuffix first.\\\\n\\\\tsuffix _ stemAndSuffix last.\\\\n\\\\tputative _ aString asSymbol.\\\\n\\\\t\\\\n\\\\t[(putative ~~ currentName) and: [(proscribed includes: putative)\\\\n\\\\t\\\\tor:\\\\t[(aPlayer respondsTo: putative)\\\\n\\\\t\\\\tor:\\\\t[Smalltalk includesKey: putative]]]]\\\\n\\\\twhileTrue:\\\\n\\\\t\\\\t[suffix _ suffix + 1.\\\\n\\\\t\\\\tputative _ (stem, suffix printString) asSymbol].\\\\n\\\\t^ putative! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-universal slots & scripts' stamp: 'kfr 9/23/2003 09:29'!\\\\ndoesOperatorWantArrows: aSymbol\\\\n\\\\taSymbol = #, ifTrue:[^ false].\\\\n\\\\t^ aSymbol isInfix or: [#(isDivisibleBy:) includes: aSymbol]! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-universal slots & scripts' stamp: 'sw 9/27/2001 04:08'!\\\\nsystemSlotNamesOfType: aType\\\\n\\\\t\\\\\\\"Answer the type of the slot name, or nil if not found.\\\\\\\"\\\\n\\\\t\\\\n\\\\t| aList |\\\\n\\\\tself flag: #deferred.  \\\\\\\"Hard-coded etoyVocabulary needed here to make this work.\\\\\\\"\\\\n\\\\taList _ OrderedCollection new.\\\\n\\\\tVocabulary eToyVocabulary methodInterfacesDo:\\\\n\\\\t\\\\t [:anInterface |\\\\n\\\\t\\\\t\\\\tanInterface resultType = aType ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[aList add: anInterface selector]].\\\\n\\\\t^ aList! !\\\\n\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 10/30/2000 16:37'!\\\\nallKnownClassVariableNames\\\\n\\\\t\\\\\\\"Answer a set of all the knwon class variable names in the system.  This normally retrieves them from a cache, and at present there is no organized mechanism for invalidating the cache.  The idea is to avoid, in the References scheme, names that may create a conflict\\\\\\\"\\\\n\\\\n\\\\t^ ClassVarNamesInUse ifNil: [ClassVarNamesInUse _ self allClassVarNamesInSystem]\\\\n\\\\n\\\\t\\\\\\\"ClassVarNamesInUse _ nil.\\\\n\\\\tTime millisecondsToRun: [ScriptingSystem allKnownClassVariableNames]\\\\\\\"\\\\n! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'kfr 9/23/2003 09:44'!\\\\narithmeticalOperatorsAndHelpStrings\\\\n\\\\t\\\\\\\"Answer an array consisting of lists of the standard arithmetical operator tiles and of the corresponding balloon help for them\\\\\\\"\\\\n\\\\n\\\\t^ #((+ - * / // \\\\\\\\\\\\\\\\ max: min:)\\\\n\\\\t \\\\t('add' 'subtract' 'multiply' 'divide' 'divide & truncate' 'remainder when divided by' 'larger value' 'smaller value' ))! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'tk 10/20/2004 15:52'!\\\\nbuttonDownTile\\\\n\\\\t\\\\\\\"Answer a boolean-valued tile which reports whether the button is down\\\\\\\"\\\\n\\\\n\\\\t^ self systemQueryPhraseWithActionString: '(ActiveHand anyButtonPressed)' labelled: 'button down?' translated! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'tk 10/20/2004 15:52'!\\\\nbuttonUpTile\\\\n\\\\t\\\\\\\"Answer a boolean-valued tile which reports whether the button is up\\\\\\\"\\\\n\\\\n\\\\t^ self systemQueryPhraseWithActionString: '(ActiveHand noButtonPressed)' labelled: 'button up?' translated! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'tk 8/21/2000 12:59'!\\\\ncleanupsForRelease\\\\n\\\\t\\\\\\\"Miscellaneous space cleanups to do before a release.\\\\\\\"\\\\n\\\\t\\\\\\\"EToySystem cleanupsForRelease\\\\\\\"\\\\n\\\\n\\\\tSocket deadServer: ''.  \\\\\\\"Don't reveal any specific server name\\\\\\\"\\\\n\\\\tHandMorph initialize.  \\\\\\\"free cached ColorChart\\\\\\\"\\\\n\\\\tPaintBoxMorph initialize.\\\\t\\\\\\\"forces Prototype to let go of extra things it might hold\\\\\\\"\\\\n\\\\tSmalltalk removeKey: #AA ifAbsent: [].\\\\n\\\\tSmalltalk removeKey: #BB ifAbsent: [].\\\\n\\\\tSmalltalk removeKey: #CC ifAbsent: [].\\\\n\\\\tSmalltalk removeKey: #DD ifAbsent: [].\\\\n\\\\tSmalltalk removeKey: #Temp ifAbsent: [].\\\\n\\\\n\\\\tScriptingSystem reclaimSpace.\\\\n\\\\tSmalltalk cleanOutUndeclared.\\\\n\\\\tSmalltalk reclaimDependents.\\\\n\\\\tSmalltalk forgetDoIts.\\\\n\\\\tSmalltalk removeEmptyMessageCategories.\\\\n\\\\tSymbol rehash! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 3/10/2004 23:24'!\\\\nhelpStringForOperator: anOperator\\\\n\\\\t\\\\\\\"Answer the help string associated with the given operator. If none found, return a standard no-help-available reply\\\\\\\"\\\\n\\\\n\\\\t^ (self helpStringOrNilForOperator: anOperator) ifNil:\\\\n\\\\t\\\\t['Sorry, no help available here' translated]  \\\\\\\"This should never be seen, but is provided as a backstop\\\\\\\"! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 6/27/2004 11:11'!\\\\nhelpStringOrNilForOperator: anOperator\\\\n\\\\t\\\\\\\"Answer the help string associated with the given operator, nil if none found.\\\\\\\"\\\\n\\\\n\\\\t| anIndex opsAndHelp |\\\\n\\\\t(anIndex _ (opsAndHelp _ self arithmeticalOperatorsAndHelpStrings) first indexOf: anOperator) > 0\\\\n\\\\t\\\\tifTrue:\\\\t[^ (opsAndHelp second at: anIndex) translated].\\\\n\\\\n\\\\t(anIndex _ (opsAndHelp _ self numericComparitorsAndHelpStrings) first indexOf: anOperator) > 0\\\\n\\\\t\\\\tifTrue:\\\\t[^ (opsAndHelp second at: anIndex) translated].\\\\n\\\\n\\\\tanOperator = #, ifTrue:\\\\n\\\\t\\\\t[^ 'Concatenate two Strings' translated].\\\\n\\\\n\\\\t^ nil! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'nk 7/12/2003 08:59'!\\\\nholderWithAlphabet\\\\n\\\\t\\\\\\\"Answer a fully instantiated Holder that has submorphs that represent the letters of the uppercase alphabet, with each one having an 'index' slot which bears the letter's index in the alphabet -- 1 for A, 2 for B, etc.   A few special characters are provided as per ack request 10/00; for these the index provided is rather arbitrarily assigned\\\\\\\"\\\\n\\\\n\\\\t| aMorph aPlayer newMorph oneCharString aContainer aWrapper |\\\\n\\\\n\\\\t\\\\\\\"ScriptingSystem holderWithAlphabet openInHand\\\\\\\"\\\\n\\\\n\\\\taContainer _ self prototypicalHolder useRoundedCorners.\\\\n\\\\taContainer borderColor: Color blue lighter.\\\\n\\\\n\\\\taWrapper _ AlignmentMorph new hResizing: #shrinkWrap; vResizing: #shrinkWrap; layoutInset: 0.\\\\n\\\\taWrapper addMorphBack: (aMorph _ TextMorph new contents: 'A').\\\\n\\\\taMorph beAllFont: ((TextStyle named: Preferences standardEToysFont familyName) fontOfSize: 24).\\\\n\\\\taMorph width: 14; lock.\\\\n\\\\taWrapper beTransparent; setNameTo: 'A'.\\\\n\\\\taPlayer _ aWrapper assuredPlayer.\\\\n\\\\taPlayer addInstanceVariableNamed: #index type: #Number value: 1.\\\\n\\\\taContainer addMorphBack: aWrapper.\\\\n\\\\t2 to: 26 do:\\\\n\\\\t\\\\t[:anIndex |\\\\n\\\\t\\\\t\\\\tnewMorph _ aWrapper usableSiblingInstance.\\\\n\\\\t\\\\t\\\\tnewMorph player perform: #setIndex: with: anIndex.\\\\n\\\\t\\\\t\\\\tnewMorph firstSubmorph contents: (oneCharString _ ($A asciiValue + anIndex - 1) asCharacter asString).\\\\n\\\\t\\\\t\\\\tnewMorph setNameTo: oneCharString.\\\\n\\\\n\\\\t\\\\t\\\\taContainer addMorphBack: newMorph].\\\\n\\\\n\\\\t#(' ' '.' '#') with: #(27 28 29) do:\\\\n\\\\t\\\\t[:aString :anIndex |\\\\n\\\\t\\\\t\\\\tnewMorph _ aWrapper usableSiblingInstance.\\\\n\\\\t\\\\t\\\\tnewMorph player perform: #setIndex: with: anIndex.\\\\n\\\\t\\\\t\\\\tnewMorph firstSubmorph contents: aString.\\\\n\\\\t\\\\t\\\\taString = ' '\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[newMorph setNameTo: 'space'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnewMorph color: (Color gray alpha: 0.2)]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[newMorph setNameTo: aString].\\\\n\\\\t\\\\t\\\\taContainer addMorphBack: newMorph].\\\\n\\\\n\\\\taContainer setNameTo: 'alphabet'.\\\\n\\\\taContainer isPartsBin: true.\\\\n\\\\taContainer enableDrop: false.\\\\n\\\\taContainer indicateCursor: false; width: 162.\\\\n\\\\taContainer color: (Color r: 0.839 g: 1.0 b: 1.0).  \\\\\\\"Color fromUser\\\\\\\"\\\\n\\\\t^ aContainer! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 9/15/2000 06:24'!\\\\ninformScriptingUser: aString\\\\n\\\\t\\\\\\\"This provides a hook for logging messages that the user or the developer may wish to see; at present it simply logs the message to the Transcript, with a standard prefix to signal their provenance.  Such messages will fall on the floor if there is no Transcript window open\\\\\\\"\\\\n\\\\n\\\\tTranscript cr; show: 'SCRIPT NOTE: ', aString! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 2/26/2003 22:44'!\\\\nnameForInstanceVariablesCategory\\\\n\\\\t\\\\\\\"Answer the name to use for the viewer category that contains instance variables\\\\\\\"\\\\n\\\\n\\\\t^ #variables    \\\\n\\\\t\\\\\\\"^ #'instance variables'\\\\\\\"\\\\n\\\\n\\\\\\\"ScriptingSystem nameForInstanceVariablesCategory\\\\\\\"! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 2/6/2003 18:00'!\\\\nnameForScriptsCategory\\\\n\\\\t\\\\\\\"Answer the name to use for the viewer category that contains scripts\\\\\\\"\\\\n\\\\n\\\\t^ #scripts! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 2/18/2001 17:50'!\\\\nnewScriptingSpace\\\\n\\\\t\\\\\\\"Answer a complete scripting space - raa 19 sept 2000 - experiment for Alan, a variant *not* in a window, now adopted as the only true scripting space\\\\\\\"\\\\n\\\\n\\\\t^ self newScriptingSpace2! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 11/13/2001 14:41'!\\\\nnewScriptingSpace2\\\\n\\\\t\\\\\\\"Answer a complete scripting space\\\\\\\"\\\\n\\\\n\\\\t| aTemplate  aPlayfield aControl |\\\\n\\\\t\\\\n\\\\t(aTemplate _ PasteUpMorph new)\\\\n\\\\t\\\\tsetNameTo: 'etoy';\\\\n\\\\t\\\\textent: 638 @ 470;\\\\n\\\\t\\\\tcolor: Color white;\\\\n\\\\t\\\\timpartPrivatePresenter;\\\\n\\\\t\\\\tsetProperty: #automaticPhraseExpansion toValue: true;\\\\n\\\\t\\\\tbeSticky.\\\\n\\\\taTemplate useRoundedCorners; borderWidth: 2. \\\\n\\\\taControl _  ScriptingSystem scriptControlButtons setToAdhereToEdge: #bottomLeft.\\\\n\\\\taControl beSticky; borderWidth: 0; beTransparent.\\\\n\\\\taTemplate addMorphBack: aControl.\\\\n\\\\taTemplate presenter addTrashCan.\\\\n\\\\n\\\\taTemplate addMorph: (aPlayfield _ PasteUpMorph new).\\\\n\\\\taPlayfield\\\\n\\\\t\\\\tsetNameTo: 'playfield';\\\\n\\\\t\\\\tuseRoundedCorners;\\\\n\\\\t\\\\tsetToAdhereToEdge: #topLeft;\\\\n\\\\t\\\\textent: 340@300;\\\\n\\\\t\\\\tposition: aTemplate topRight - (400@0);\\\\n\\\\t\\\\tbeSticky;\\\\n\\\\t\\\\tautomaticViewing: true;\\\\n\\\\t\\\\twantsMouseOverHalos: true.\\\\n\\\\taTemplate presenter standardPlayfield: aPlayfield.\\\\n\\\\t\\\\n\\\\t^ aTemplate\\\\n\\\\n! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 9/21/2000 22:39'!\\\\nnumericComparitorsAndHelpStrings\\\\n\\\\t\\\\\\\"Answer an array whose first element is the list of comparitors, and whose second element is a list of the corresponding help strings\\\\\\\"\\\\n\\\\n\\\\t^ #((< <= = ~= > >= isDivisibleBy:)\\\\n\\\\t \\\\t('less than' 'less than or equal' 'equal' 'not equal' 'greater than' 'greater than or equal' 'divisible by' ))! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities'!\\\\nprepareForExternalReleaseNamed: aReleaseName\\\\n\\\\t\\\\\\\"ScriptingSystem prepareForExternalReleaseNamed: '2.2Beta'\\\\\\\"\\\\n\\\\n\\\\tEToySystem stripMethodsForExternalRelease.\\\\n\\\\n\\\\tScriptingSystem saveFormsToFileNamed: aReleaseName, '.Dis.Forms'.\\\\n\\\\tScriptingSystem stripGraphicsForExternalRelease.\\\\n\\\\tScriptingSystem cleanupsForRelease.\\\\n\\\\tScreenController initialize.\\\\n! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 5/2/1998 14:17'!\\\\nreclaimSpace\\\\n\\\\t\\\\\\\"Reclaim space from the scripting system, and report the result in an informer\\\\\\\"\\\\n\\\\t\\\\\\\"ScriptingSystem reclaimSpace\\\\\\\"\\\\n\\\\n\\\\t| reclaimed |\\\\n\\\\t(reclaimed _ self spaceReclaimed)  > 0\\\\n\\\\t\\\\tifTrue:\\\\t[self inform: reclaimed printString, ' bytes reclaimed']\\\\n\\\\t\\\\tifFalse:\\\\t[self inform: 'Hmm...  Nothing gained this time.']! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 10/30/2000 09:08'!\\\\nreferenceAt: aSymbol\\\\n\\\\t\\\\\\\"Answer the object referred to by aSymbol in the 'References' scheme of things, or nil if none\\\\\\\"\\\\n\\\\n\\\\t^ References at: aSymbol ifAbsent: [nil]! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 10/30/2000 09:33'!\\\\nreferenceAt: aSymbol put: anObject\\\\n\\\\t\\\\\\\"Store a reference to anObject at the given symbol in the References directory\\\\\\\"\\\\n\\\\n\\\\t^ References at: aSymbol put: anObject! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 6/9/2000 18:44'!\\\\nreinvigorateThumbnailsInViewerFlapTabs\\\\n\\\\t\\\\\\\"It has happened that the thumbnail in a viewer flap tab will go solid gray because it got associated with some passing and disused player temporarily created during the initial painting process.  This method takes a sledge hammer to repair such thumbnails.   At its genesis, this method is called only from the postscript of its defining fileout.\\\\\\\"\\\\n\\\\t| vwr thumbnail |\\\\n\\\\tViewerFlapTab allInstancesDo:\\\\n\\\\t\\\\t[:aTab | \\\\n\\\\t\\\\t\\\\tvwr _ aTab referent findA: StandardViewer.\\\\n\\\\t\\\\t\\\\tthumbnail _ aTab findA: ThumbnailMorph.\\\\n\\\\t\\\\t\\\\t(vwr notNil and: [thumbnail notNil]) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[thumbnail objectToView: vwr scriptedPlayer]]\\\\n\\\\n\\\\t\\\\\\\"ScriptingSystem reinvigorateThumbnailsInViewerFlapTabs\\\\\\\"! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 12/20/2003 18:02'!\\\\nreportToUser: aString\\\\n\\\\t\\\\\\\"Make a message accessible to the user.  For the moment, we simply defer to the Transcript mechanism\\\\\\\"\\\\n\\\\n\\\\tTranscript cr; show: aString! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 10/30/2000 16:47'!\\\\nresetAllScriptingReferences\\\\n\\\\t\\\\\\\"Clear out all the elements in the References directory\\\\\\\"\\\\n\\\\t\\\\n\\\\tSmalltalk at: #References put: IdentityDictionary new\\\\n\\\\n\\\\t\\\\\\\"ScriptingSystem resetAllScriptingReferences\\\\\\\"! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 10/30/2000 16:45'!\\\\nresetStaleScriptingReferences\\\\n\\\\t\\\\\\\"Remove all scripting references that are no longer needed\\\\\\\"\\\\n\\\\n\\\\tReferences  removeUnreferencedKeys\\\\n\\\\n\\\\t\\\\\\\"ScriptingSystem resetStaleScriptingReferences\\\\\\\"\\\\n! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 7/25/2004 17:27'!\\\\nrestoreClassicEToyLook\\\\n\\\\t\\\\\\\"Restore classic EToy look, as closely as possible.  If ComicBold is present, restore it as the standard etoy and button font.  Substitute ComicSansMS and Accuny as respective alternatives if the classic fonts are absent.  If those also aren't available, do nothing.\\\\\\\"\\\\n\\\\n\\\\t| aTextStyle aFont | \\\\n\\\\t(aTextStyle _ TextStyle named: #ComicBold)\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t[aFont _ aTextStyle fontOfSize: 16.\\\\n\\\\t\\\\t\\\\tPreferences setEToysFontTo: aFont.\\\\n\\\\t\\\\t\\\\tPreferences setButtonFontTo: aFont]\\\\n\\\\t\\\\tifNil:\\\\n\\\\t\\\\t\\\\t[(aTextStyle _ TextStyle named: #ComicSansMS) ifNotNil:\\\\n\\\\t\\\\t\\\\t\\\\t[Preferences setEToysFontTo: (aTextStyle fontOfSize: 18)].\\\\n\\\\t\\\\t\\\\t(aTextStyle _ TextStyle named: #Accuny) ifNotNil:\\\\n\\\\t\\\\t\\\\t\\\\t[Preferences setButtonFontTo: (aTextStyle fontOfSize: 12)]].\\\\n\\\\n\\\\t(aTextStyle _ TextStyle named: #NewYork)\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t[Preferences setSystemFontTo: (aTextStyle fontOfSize: 12)]! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 5/16/2001 12:58'!\\\\nsetterSelectorForGetter: aGetterSymbol\\\\n\\\\t\\\\\\\"Answer the setter selector corresponding to a given getter\\\\\\\"\\\\n\\\\n\\\\t^ (('s', (aGetterSymbol copyFrom: 2 to: aGetterSymbol size)), ':') asSymbol\\\\n\\\\n\\\\t\\\\\\\"ScriptingSystem setterSelectorForGetter: #getCursor\\\\\\\"! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'di 3/3/2001 08:47'!\\\\nspaceReclaimed\\\\n\\\\t\\\\\\\"Reclaim space from the EToy system, and return the number of bytes reclaimed\\\\\\\"\\\\n\\\\t\\\\\\\"ScriptingSystem spaceReclaimed\\\\\\\"\\\\n\\\\n\\\\t| oldFree  |\\\\n\\\\toldFree _ Smalltalk garbageCollect.\\\\n\\\\tThumbnailMorph recursionReset.\\\\n\\\\tPlayer removeUninstantiatedSubclassesSilently.\\\\n\\\\tSmalltalk cleanOutUndeclared.\\\\n\\\\tSmalltalk reclaimDependents.\\\\n\\\\t^ Smalltalk garbageCollect - oldFree.! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 9/27/2001 13:28'!\\\\ntileForArgType: aType\\\\n\\\\t\\\\\\\"Anwer a default tile to represent a datum of the given argument type, which may be either a symbol (e.g. #Color) or a class\\\\\\\"\\\\n\\\\n\\\\t(aType isKindOf: Class)  \\\\\\\"Allowed in Ted's work\\\\\\\"\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[^ aType name asString newTileMorphRepresentative typeColor: Color gray].\\\\n\\\\n\\\\t^ (Vocabulary vocabularyForType: aType) defaultArgumentTile! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'dgd 7/12/2003 12:05'!\\\\ntryButtonFor: aPhraseTileMorph \\\\n\\\\t| aButton |\\\\n\\\\taButton := SimpleButtonMorph new.\\\\n\\\\taButton target: aPhraseTileMorph;\\\\n\\\\t\\\\t actionSelector: #try;\\\\n\\\\t\\\\t\\\\n\\\\t\\\\tlabel: '!!'\\\\n\\\\t\\\\tfont: Preferences standardEToysFont;\\\\n\\\\t\\\\t color: Color yellow;\\\\n\\\\t\\\\t borderWidth: 0.\\\\n\\\\taButton actWhen: #whilePressed.\\\\n\\\\taButton balloonTextSelector: #try.\\\\n\\\\t^ aButton! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'nk 10/14/2004 11:19'!\\\\nwordingForOperator: aString\\\\n\\\\t\\\\\\\"Answer the wording to be seen by the user for the given operator symbol/string\\\\\\\"\\\\n\\\\n\\\\t| toTest |\\\\n\\\\ttoTest _ aString asString.\\\\n\\\\t#(\\\\t(append:\\\\t\\\\t\\\\t\\\\t'include at end')\\\\n\\\\t\\\\t(arrowheadsOnAllPens\\\\t'arrowheads on all pens')\\\\n\\\\t\\\\t(beep:\\\\t\\\\t\\\\t\\\\t\\\\t'make sound')\\\\n\\\\t\\\\t(bounce:\\\\t\\\\t\\\\t\\\\t'bounce')\\\\n\\\\t\\\\t(clearTurtleTrails\\\\t\\\\t'clear pen trails')\\\\n\\\\t\\\\t(clearOwnersPenTrails\\\\t'clear all pen trails')\\\\n\\\\t\\\\t(colorSees\\\\t\\\\t\\\\t\\\\t'color  sees')\\\\n\\\\t\\\\t(color:sees:\\\\t\\\\t\\\\t\\\\t'color sees')\\\\n\\\\t\\\\t(doMenuItem:\\\\t\\\\t\\\\t'do menu item')\\\\n\\\\t\\\\t(doScript:\\\\t\\\\t\\\\t\\\\t'do')\\\\n\\\\t\\\\t(forward:\\\\t\\\\t\\\\t\\\\t'forward by')\\\\n\\\\t\\\\t(goToRightOf:\\\\t\\\\t\\\\t'align after')\\\\n\\\\t\\\\t(includeAtCursor:\\\\t\\\\t'include at cursor')\\\\n\\\\t\\\\t(isDivisibleBy:\\\\t\\\\t\\\\t'is divisible by')\\\\n\\\\t\\\\t(liftAllPens\\\\t\\\\t\\\\t\\\\t'lift all pens')\\\\n\\\\t\\\\t(lowerAllPens\\\\t\\\\t\\\\t'lower all pens')\\\\n\\\\t\\\\t(makeNewDrawingIn:\\\\t'start painting in')\\\\n\\\\t\\\\t(max:\\\\t\\\\t\\\\t\\\\t\\\\t'max')\\\\n\\\\t\\\\t(min:\\\\t\\\\t\\\\t\\\\t\\\\t'min')\\\\n\\\\t\\\\t(moveToward:\\\\t\\\\t\\\\t'move toward')\\\\n\\\\t\\\\t(noArrowheadsOnAllPens\\\\t'no arrowheads on pens')\\\\n\\\\t\\\\t(overlapsAny\\\\t\\\\t\\\\t'overlaps any')\\\\n\\\\t\\\\t(pauseAll:\\\\t\\\\t\\\\t\\\\t'pause all')\\\\n\\\\t\\\\t(pauseScript:\\\\t\\\\t\\\\t'pause script')\\\\n\\\\t\\\\t(prepend:\\\\t\\\\t\\\\t\\\\t'include at beginning')\\\\n\\\\t\\\\t(seesColor:\\\\t\\\\t\\\\t\\\\t'is over color')\\\\n\\\\t\\\\t(startAll:\\\\t\\\\t\\\\t\\\\t'start all')\\\\n\\\\t\\\\t(startScript:\\\\t\\\\t\\\\t\\\\t'start script')\\\\n\\\\t\\\\t(stopProgramatically\\\\t'stop')\\\\n\\\\t\\\\t(stopAll:\\\\t\\\\t\\\\t\\\\t\\\\t'stop all')\\\\n\\\\t\\\\t(stopScript:\\\\t\\\\t\\\\t\\\\t'stop script')\\\\n\\\\t\\\\t(tellAllSiblings:\\\\t\\\\t\\\\t'tell all siblings')\\\\n\\\\t\\\\t(tellSelfAndAllSiblings:\\\\t'send to all')\\\\n\\\\t\\\\t(turn:\\\\t\\\\t\\\\t\\\\t\\\\t'turn by')\\\\n\\\\t\\\\t(turnToward:\\\\t\\\\t\\\\t\\\\t'turn toward')\\\\n\\\\t\\\\t(wearCostumeOf:\\\\t\\\\t'look like'))\\\\n\\\\n\\\\tdo:\\\\n\\\\t\\\\t[:pair | toTest = pair first ifTrue: [^ pair second]].\\\\n\\\\n\\\\t^ toTest\\\\n\\\\n\\\\t\\\\\\\"StandardScriptingSystem initialize\\\\\\\"\\\\n\\\\n! !\\\\n\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-viewer' stamp: 'sw 10/30/2000 09:07'!\\\\nuniqueNameForReference\\\\n\\\\t\\\\\\\"Answer a more-or-less global name by which the receiver can be referred to in scripts\\\\\\\"\\\\n\\\\n\\\\t^ #ScriptingSystem! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStandardScriptingSystem class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StandardScriptingSystem class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 19:04'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Initialize the scripting system.  Sometimes this method is vacuously changed just to get it in a changeset so that its invocation will occur as part of an update\\\\\\\"\\\\n\\\\n\\\\t(self environment at: #ScriptingSystem ifAbsent: [nil]) ifNil:\\\\n\\\\t\\\\t[self environment at: #ScriptingSystem put: self new].\\\\n\\\\n\\\\tScriptingSystem\\\\n\\\\t\\\\tinitializeHelpStrings.\\\\n\\\\n\\\\tself registerInFlapsRegistry.\\\\n\\\\n\\\\\\\"StandardScriptingSystem initialize\\\\\\\"! !\\\\n\\\\n\\\\n!StandardScriptingSystem class methodsFor: 'utilities' stamp: 'nk 9/1/2004 10:53'!\\\\napplyNewEToyLook\\\\n\\\\t\\\\\\\"Apply the new EToy look based on free fonts, approximating the classic look as closely as possible.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"StandardScriptingSystem applyNewEToyLook\\\\\\\"\\\\n\\\\n\\\\\\\"\\\\t| aTextStyle aFont | \\\\n\\\\taTextStyle _ TextStyle named: #BitstreamVeraSansMono.\\\\n\\\\taFont _ aTextStyle fontOfSize: 12.\\\\n\\\\taFont _ aFont emphasis: 1.\\\\n\\\\tPreferences setEToysFontTo: aFont.\\\\n\\\\tPreferences setButtonFontTo: aFont.\\\\n\\\\n\\\\taTextStyle _ TextStyle named: #Accushi.\\\\n\\\\taFont _ aTextStyle fontOfSize: 12.\\\\n\\\\tPreferences setFlapsFontTo: aFont.\\\\n\\\\n\\\\t(aTextStyle _ TextStyle named: #Accuny)\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t[Preferences setSystemFontTo: (aTextStyle fontOfSize: 12)]\\\\\\\"\\\\n\\\\n\\\\tPreferences setDefaultFonts: #(\\\\n\\\\t\\\\t(setEToysFontTo:\\\\t\\\\t\\\\tBitstreamVeraSansBold\\\\t10)\\\\n\\\\t\\\\t(setButtonFontTo:\\\\t\\\\tBitstreamVeraSansMono\\\\t9)\\\\n\\\\t\\\\t(setFlapsFontTo:\\\\t\\\\t\\\\tAccushi\\\\t\\\\t\\\\t\\\\t12)\\\\n\\\\t\\\\t(setSystemFontTo:\\\\t\\\\tAccuny\\\\t\\\\t\\\\t\\\\t10)\\\\n\\\\t\\\\t(setWindowTitleFontTo:\\\\tBitstreamVeraSansBold\\\\t12)\\\\n\\\\t)\\\\n! !\\\\n\\\\n!StandardScriptingSystem class methodsFor: 'utilities' stamp: 'mir 11/26/2004 16:14'!\\\\nremovePlayersIn: project\\\\n\\\\t\\\\\\\"Remove existing player references for project\\\\\\\"\\\\n\\\\n\\\\tReferences keys do: \\\\n\\\\t\\\\t[:key | (References at: key) costume pasteUpMorph == project world\\\\n\\\\t\\\\t\\\\tifTrue: [References removeKey: key]].\\\\n! !\\\\n\\\\n!StandardScriptingSystem class methodsFor: 'utilities' stamp: 'mir 11/25/2004 19:01'!\\\\nremoveUnreferencedPlayers\\\\n\\\\t\\\\\\\"Remove existing but unreferenced player references\\\\\\\"\\\\n\\\\t\\\\\\\"StandardScriptingSystem removeUnreferencedPlayers\\\\\\\"\\\\n\\\\tReferences keys do: \\\\n\\\\t\\\\t[:key | (References at: key) costume pasteUpMorph\\\\n\\\\t\\\\t\\\\tifNil: [References removeKey: key]].\\\\n! !\\\\n\\\\n\\\\n!StandardScriptingSystem class methodsFor: '*MorphicExtras-class initialization' stamp: 'asm 4/11/2003 19:08'!\\\\nregisterInFlapsRegistry\\\\n\\\\t\\\\\\\"Register the receiver in the system's flaps registry\\\\\\\"\\\\n\\\\tself environment\\\\n\\\\t\\\\tat: #Flaps\\\\n\\\\t\\\\tifPresent: [:cl | cl registerQuad: #(ScriptingSystem\\\\tprototypicalHolder\\\\t'Holder'\\\\t\\\\t'A place for storing alternative pictures in an animation, etc.')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'PlugIn Supplies'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcl registerQuad: #(ScriptingSystem\\\\tprototypicalHolder\\\\t'Holder'\\\\t\\\\t'A place for storing alternative pictures in an animation, etc.')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'Supplies'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcl registerQuad: #(ScriptingSystem\\\\tnewScriptingSpace\\\\t'Scripting'\\\\t'A confined place for drawing and scripting, with its own private stop/step/go buttons.')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'Widgets'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcl registerQuad: #(ScriptingSystem\\\\tholderWithAlphabet\\\\t'Alphabet'\\\\t'A source for single-letter objects')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'Widgets'.]! !\\\\n\\\\n!StandardScriptingSystem class methodsFor: '*MorphicExtras-class initialization' stamp: 'asm 4/12/2003 14:38'!\\\\nunload\\\\n\\\\t\\\\\\\"Unload the receiver from global registries\\\\\\\"\\\\n\\\\n\\\\tself environment at: #Flaps ifPresent: [:cl |\\\\n\\\\tcl unregisterQuadsWithReceiver: ScriptingSystem] ! !\\\\n\\\\n\\\\n\\\\n!StandardScriptingSystem class methodsFor: '*flexibleVocabularies-flexibleVocabularies' stamp: 'NS 4/8/2004 19:06'!\\\\nnoteAddedSelector: aSelector meta: isMeta\\\\n\\\\taSelector == #wordingForOperator: ifTrue:\\\\n\\\\t\\\\t[Vocabulary changeMadeToViewerAdditions].\\\\n\\\\tsuper noteAddedSelector: aSelector meta: isMeta! !\\\\n\\\\n!StandardScriptingSystem class methodsFor: '*flexibleVocabularies-flexibleVocabularies' stamp: 'NS 4/15/2004 12:41'!\\\\nnoteCompilationOf: aSelector meta: isMeta\\\\n\\\\t\\\\\\\"This method does nothing and should be removed.\\\\\\\"\\\\n\\\\n\\\\t^ super noteCompilationOf: aSelector meta: isMeta! !\\\\nSourceFileArray subclass: #StandardSourceFileArray\\\\n\\\\tinstanceVariableNames: 'files'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Files-System'!\\\\n!StandardSourceFileArray commentStamp: '<historical>' prior: 0!\\\\nThis class implements the source file management behavior of traditional Squeak, with a sources file and a changes file. File positions are mapped such that those files can be up to 32MBytes in size.\\\\n\\\\nStructure:\\\\n files\\\\t\\\\tArray -- storing the actual source files\\\\n!\\\\n\\\\n\\\\n!StandardSourceFileArray methodsFor: 'accessing' stamp: 'hmm 4/25/2000 21:20'!\\\\nat: index\\\\n\\\\t^files at: index! !\\\\n\\\\n!StandardSourceFileArray methodsFor: 'accessing' stamp: 'hmm 4/25/2000 21:20'!\\\\nat: index put: aFile\\\\n\\\\tfiles at: index put: aFile! !\\\\n\\\\n!StandardSourceFileArray methodsFor: 'accessing' stamp: 'hmm 4/25/2000 21:20'!\\\\nsize\\\\n\\\\t^files size! !\\\\n\\\\n\\\\n!StandardSourceFileArray methodsFor: 'initialize-release' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\ninitialize\\\\n\\\\tfiles := Array new: 2.\\\\n\\\\tfiles at: 1 put: (SourceFiles at: 1).\\\\n\\\\tfiles at: 2 put: (SourceFiles at: 2)! !\\\\n\\\\n!StandardSourceFileArray methodsFor: 'initialize-release' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\ninitialize: nFiles\\\\n\\\\tfiles := Array new: nFiles! !\\\\n\\\\n\\\\n!StandardSourceFileArray methodsFor: 'sourcePointer conversion' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nfileIndexFromSourcePointer: anInteger\\\\n\\\\t\\\\\\\"Return the index of the source file which contains the source chunk addressed by anInteger\\\\\\\"\\\\n\\\\t\\\\\\\"This implements the recent 32M source file algorithm\\\\\\\"\\\\n\\\\n\\\\t| hi |\\\\n\\\\thi := anInteger // 16r1000000.\\\\n\\\\t^hi < 3\\\\n\\\\t\\\\tifTrue: [hi]\\\\n\\\\t\\\\tifFalse: [hi - 2]! !\\\\n\\\\n!StandardSourceFileArray methodsFor: 'sourcePointer conversion' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nfilePositionFromSourcePointer: anInteger\\\\n\\\\t\\\\\\\"Return the position of the source chunk addressed by anInteger\\\\\\\"\\\\n\\\\t\\\\\\\"This implements the recent 32M source file algorithm\\\\\\\"\\\\n\\\\n\\\\t| hi lo |\\\\n\\\\thi := anInteger // 16r1000000.\\\\n\\\\tlo := anInteger \\\\\\\\\\\\\\\\ 16r1000000.\\\\n\\\\t^hi < 3\\\\n\\\\t\\\\tifTrue: [lo]\\\\n\\\\t\\\\tifFalse: [lo + 16r1000000]! !\\\\n\\\\n!StandardSourceFileArray methodsFor: 'sourcePointer conversion' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nsourcePointerFromFileIndex: index andPosition: position\\\\n\\\\t| hi lo |\\\\n\\\\t\\\\\\\"Return a source pointer according to the new 32M algorithm\\\\\\\"\\\\n\\\\t((index between: 1 and: 2) and: [position between: 0 and: 16r1FFFFFF])\\\\n\\\\t\\\\tifFalse: [self error: 'invalid source code pointer'].\\\\n\\\\thi := index.\\\\n\\\\tlo := position.\\\\n\\\\tlo >= 16r1000000 ifTrue: [\\\\n\\\\t\\\\thi := hi+2.\\\\n\\\\t\\\\tlo := lo - 16r1000000].\\\\n\\\\t^hi * 16r1000000 + lo! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStandardSourceFileArray class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StandardSourceFileArray class methodsFor: 'initialize-release' stamp: 'nk 7/30/2004 21:50'!\\\\ninstall\\\\n\\\\t\\\\\\\"Replace SourceFiles by an instance of me with the standard sources and changes files.\\\\n\\\\tThis only works if SourceFiles is either an Array or an instance of this class\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"StandardSourceFileArray install\\\\\\\"\\\\n\\\\n\\\\tSourceFiles := self new! !\\\\n\\\\n!StandardSourceFileArray class methodsFor: 'initialize-release' stamp: 'ar 5/17/2000 18:27'!\\\\nnew: nFiles\\\\n\\\\t^self new initialize: nFiles.! !\\\\nMouseMenuController subclass: #StandardSystemController\\\\n\\\\tinstanceVariableNames: 'status'\\\\n\\\\tclassVariableNames: 'HBorderCursor ScheduledBlueButtonMenu ScheduledBlueButtonMessages VBorderCursor'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'ST80-Support'!\\\\n!StandardSystemController commentStamp: '<historical>' prior: 0!\\\\nI am a controller for StandardSystemViews, that is, those views that are at the top level of a project in the system user interface. I am a kind of MouseMenuController that creates a blue button menu for moving, framing, collapsing, and closing ScheduledViews, and for selecting views under the view of my instance.!\\\\n\\\\n\\\\n!StandardSystemController methodsFor: 'basic control sequence' stamp: 'sw 10/20/1999 09:52'!\\\\ncontrolInitialize\\\\n\\\\tview displayEmphasized.\\\\n\\\\tview uncacheBits.  \\\\\\\"Release cached bitmap while active\\\\\\\"\\\\n\\\\tmodel windowActiveOnFirstClick ifFalse: [sensor waitNoButton].\\\\n\\\\tstatus _ #active.\\\\n\\\\tview isCollapsed ifFalse: [model modelWakeUpIn: view]! !\\\\n\\\\n!StandardSystemController methodsFor: 'basic control sequence' stamp: 'di 5/11/1999 22:05'!\\\\ncontrolTerminate\\\\n\\\\tstatus == #closed\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[view ~~ nil ifTrue: [view release].\\\\n\\\\t\\\\t\\\\tScheduledControllers unschedule: self.\\\\n\\\\t\\\\t\\\\t^self].\\\\n\\\\tview deEmphasize; cacheBits.\\\\n\\\\tview isCollapsed ifFalse: [model modelSleep].! !\\\\n\\\\n\\\\n!StandardSystemController methodsFor: 'borders' stamp: 'ls 7/11/1998 07:45'!\\\\nadjustPaneBorders \\\\n\\\\t| side sub newRect outerFrame |\\\\n\\\\touterFrame _ view displayBox.\\\\n\\\\tside _ #none.\\\\n\\\\tVBorderCursor showWhile:\\\\n\\\\t\\\\t[ [sub _ view subviewWithLongestSide: [:s | side _ s]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnear: sensor cursorPoint.\\\\n\\\\t\\\\t  self cursorOnBorder and: [(side = #left) | (side = #right)]]\\\\n\\\\t\\\\t\\\\twhileTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tself interActivityPause.\\\\n\\\\t\\\\t\\\\t\\\\tsensor redButtonPressed ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[side = #left ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[newRect _ sub stretchFrame:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:f | (f withLeft: sensor cursorPoint x)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: outerFrame]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartingWith: sub displayBox].\\\\n\\\\t\\\\t\\\\t\\\\tside = #right ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[newRect _ sub stretchFrame:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:f | (f withRight: sensor cursorPoint x)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: outerFrame]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartingWith: sub displayBox].\\\\n\\\\t\\\\t\\\\t\\\\tview reframePanesAdjoining: sub along: side to: newRect]]].\\\\n\\\\tHBorderCursor showWhile:\\\\n\\\\t\\\\t[ [sub _ view subviewWithLongestSide: [:s | side _ s]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnear: sensor cursorPoint.\\\\n\\\\t\\\\t  self cursorOnBorder and: [(side = #top) | (side = #bottom)]]\\\\n\\\\t\\\\t\\\\twhileTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tself interActivityPause.\\\\n\\\\t\\\\t\\\\t\\\\tsensor redButtonPressed ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[side = #top ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[newRect _ sub stretchFrame:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:f | (f withTop: sensor cursorPoint y)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: outerFrame]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartingWith: sub displayBox].\\\\n\\\\t\\\\t\\\\t\\\\tside = #bottom ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[newRect _ sub stretchFrame:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:f | (f withBottom: sensor cursorPoint y)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: outerFrame]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartingWith: sub displayBox].\\\\n\\\\t\\\\t\\\\t\\\\tview reframePanesAdjoining: sub along: side to: newRect]]]! !\\\\n\\\\n!StandardSystemController methodsFor: 'borders' stamp: 'di 11/16/2001 22:22'!\\\\nadjustWindowBorders \\\\n\\\\t| side noClickYet |\\\\n\\\\tnoClickYet _ true.\\\\n\\\\tVBorderCursor showWhile:\\\\n\\\\t\\\\t[ [side _ view displayBox sideNearestTo: sensor cursorPoint.\\\\n\\\\t\\\\t  self cursorOnBorder\\\\n\\\\t\\\\t\\\\tand: [(side = #left) | (side = #right)\\\\n\\\\t\\\\t\\\\tand: [noClickYet or: [sensor redButtonPressed]]]]\\\\n\\\\t\\\\t\\\\twhileTrue:\\\\n\\\\t\\\\t\\\\t[sensor redButtonPressed ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[noClickYet _ false.\\\\n\\\\t\\\\t\\\\t\\\\tside = #left ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[view newFrame: [:f | f withLeft: sensor cursorPoint x]].\\\\n\\\\t\\\\t\\\\t\\\\tside = #right ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[view newFrame: [:f | f withRight: sensor cursorPoint x]]].\\\\n\\\\t\\\\t\\\\tself interActivityPause]].\\\\n\\\\tHBorderCursor showWhile:\\\\n\\\\t\\\\t[ [side _ view displayBox sideNearestTo: sensor cursorPoint.\\\\n\\\\t\\\\t  self cursorOnBorder\\\\n\\\\t\\\\t\\\\tand: [(side = #top) | (side = #bottom)\\\\n\\\\t\\\\t\\\\tand: [noClickYet or: [sensor redButtonPressed]]]]\\\\n\\\\t\\\\t\\\\twhileTrue:\\\\n\\\\t\\\\t\\\\t[sensor redButtonPressed ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[noClickYet _ false.\\\\n\\\\t\\\\t\\\\t\\\\tside = #top ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[view newFrame: [:f | f withTop: sensor cursorPoint y]].\\\\n\\\\t\\\\t\\\\t\\\\tside = #bottom ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[view newFrame: [:f | f withBottom: sensor cursorPoint y]]].\\\\n\\\\t\\\\t  self interActivityPause]]! !\\\\n\\\\n!StandardSystemController methodsFor: 'borders' stamp: 'ls 7/11/1998 07:38'!\\\\nadjustWindowCorners \\\\n\\\\t| box cornerBox p clicked f2 |\\\\n\\\\tbox _ view windowBox.\\\\n\\\\tclicked _ false.\\\\n\\\\t#(topLeft topRight bottomRight bottomLeft)\\\\n\\\\t\\\\tdo: [:readCorner |\\\\n\\\\t\\\\t\\\\tcornerBox _ ((box insetBy: 2) perform: readCorner) - (10@10) extent: 20@20.\\\\n\\\\t\\\\t\\\\t(cornerBox containsPoint: sensor cursorPoint)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t[\\\\\\\"Display reverse: cornerBox.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t(Cursor perform: readCorner) showWhile:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[[(cornerBox containsPoint: (p _ sensor cursorPoint))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tand: [(clicked _ sensor anyButtonPressed) not]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twhileTrue: [ self interActivityPause ].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"Display reverse: cornerBox.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tclicked ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[view newFrame:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:f | p _ sensor cursorPoint.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\treadCorner = #topLeft ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[f2 _ p corner: f bottomRight].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\treadCorner = #bottomLeft ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[f2 _ (f withBottom: p y) withLeft: p x].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\treadCorner = #bottomRight ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[f2 _ f topLeft corner: p].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\treadCorner = #topRight ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[f2 _ (f withTop: p y) withRight: p x].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tf2]]]]].\\\\n\\\\t^ clicked! !\\\\n\\\\n!StandardSystemController methodsFor: 'borders' stamp: 'di 11/16/2001 22:30'!\\\\ncheckForReframe\\\\n\\\\t| cp |\\\\n\\\\tview isCollapsed ifTrue: [^ self].\\\\n\\\\tcp _ sensor cursorPoint.\\\\n\\\\t((view closeBoxFrame expandBy: 2) containsPoint: cp)\\\\n\\\\t\\\\t| ((view growBoxFrame expandBy: 2) containsPoint: cp)\\\\n\\\\t\\\\tifTrue: [^ self].  \\\\\\\"Dont let reframe interfere with close/grow\\\\\\\"\\\\n\\\\tself adjustWindowCorners.\\\\n\\\\tself cursorOnBorder ifFalse: [^ self].\\\\n\\\\t((view insetDisplayBox insetBy: 2@2) containsPoint: cp)\\\\n\\\\t\\\\tifFalse: [^ self adjustWindowBorders].\\\\n\\\\tview subViews size <= 1 ifTrue: [^ self].\\\\n\\\\t(view subviewWithLongestSide: [:s | ] near: cp) == nil\\\\n\\\\t\\\\tifFalse: [^ self adjustPaneBorders].! !\\\\n\\\\n!StandardSystemController methodsFor: 'borders'!\\\\ncursorOnBorder \\\\n\\\\t| cp i box |\\\\n\\\\tview isCollapsed ifTrue: [^ false].\\\\n\\\\tcp _ sensor cursorPoint.\\\\n\\\\t((view labelDisplayBox insetBy: (0@2 corner: 0@-2)) containsPoint: cp)\\\\n\\\\t\\\\tifTrue: [^ false].\\\\n\\\\t(i _ view subViews findFirst: [:v | v displayBox containsPoint: cp]) = 0\\\\n\\\\t\\\\tifTrue: [box _ view windowBox]\\\\n\\\\t\\\\tifFalse: [box _ (view subViews at: i) insetDisplayBox].\\\\n\\\\t^ ((box insetBy: 3) containsPoint: cp) not\\\\n\\\\t\\\\tand: [(box expandBy: 4) containsPoint: cp]! !\\\\n\\\\n!StandardSystemController methodsFor: 'borders'!\\\\nfullScreen\\\\n\\\\t\\\\\\\"Make the receiver's window occupy jes' about the full screen.  6/10/96 sw\\\\\\\"\\\\n\\\\n\\\\tview fullScreen! !\\\\n\\\\n\\\\n!StandardSystemController methodsFor: 'control defaults' stamp: 'sma 3/11/2000 12:01'!\\\\nblueButtonActivity\\\\n\\\\tScheduledBlueButtonMenu ifNil: [^ super controlActivity].\\\\n\\\\tScheduledBlueButtonMenu invokeOn: self! !\\\\n\\\\n!StandardSystemController methodsFor: 'control defaults' stamp: 'sma 3/11/2000 15:20'!\\\\ncontrolActivity\\\\n\\\\tself checkForReframe.\\\\n\\\\t^ super controlActivity! !\\\\n\\\\n!StandardSystemController methodsFor: 'control defaults'!\\\\nisControlActive\\\\n\\\\tstatus == #active ifFalse: [^ false].\\\\n\\\\tsensor anyButtonPressed ifFalse: [^ true].\\\\n\\\\tself viewHasCursor\\\\n\\\\t\\\\tifTrue: [^ true]\\\\n\\\\t\\\\tifFalse: [ScheduledControllers noteNewTop.\\\\n\\\\t\\\\t\\\\t\\\\t^ false]! !\\\\n\\\\n!StandardSystemController methodsFor: 'control defaults' stamp: 'sma 3/15/2000 22:19'!\\\\nredButtonActivity\\\\n\\\\t\\\\\\\"If cursor is in label of a window when red button is pushed,\\\\n\\\\tcheck for closeBox or growBox, else drag the window frame\\\\n\\\\tor edit the label.\\\\\\\"\\\\n\\\\n\\\\t| box p |\\\\n\\\\tp _ sensor cursorPoint.\\\\n\\\\tself labelHasCursor ifFalse: [super redButtonActivity. ^ self].\\\\n\\\\t((box _ view closeBoxFrame) containsPoint: p)\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[Utilities\\\\n\\\\t\\\\t\\\\t\\\\tawaitMouseUpIn: box\\\\n\\\\t\\\\t\\\\t\\\\trepeating: []\\\\n\\\\t\\\\t\\\\t\\\\tifSucceed: [self close. ^ self].\\\\n\\\\t\\\\t\\\\t^ self].\\\\n\\\\t((box _ view growBoxFrame) containsPoint: p)\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[Utilities\\\\n\\\\t\\\\t\\\\t\\\\tawaitMouseUpIn: box\\\\n\\\\t\\\\t\\\\t\\\\trepeating: []\\\\n\\\\t\\\\t\\\\t\\\\tifSucceed:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[Sensor controlKeyPressed ifTrue: [^ self expand; fullScreen].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ view isCollapsed\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self expand]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [self collapse]].\\\\n\\\\t\\\\t\\\\t^ self].\\\\n\\\\t(((box _ view labelTextRegion expandBy: 1) containsPoint: p)\\\\n\\\\t\\\\t\\\\tand: [Preferences clickOnLabelToEdit or: [sensor leftShiftDown]])\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[Utilities\\\\n\\\\t\\\\t\\\\t\\\\tawaitMouseUpIn: box\\\\n\\\\t\\\\t\\\\t\\\\trepeating: []\\\\n\\\\t\\\\t\\\\t\\\\tifSucceed: [^ self label].\\\\n\\\\t\\\\t\\\\t^ self].\\\\n\\\\tself move! !\\\\n\\\\n\\\\n!StandardSystemController methodsFor: 'cursor'!\\\\nlabelHasCursor\\\\n\\\\t\\\\\\\"Answer true if the cursor is within the window's label\\\\\\\"\\\\n\\\\t^view labelContainsPoint: sensor cursorPoint! !\\\\n\\\\n\\\\n!StandardSystemController methodsFor: 'initialize-release' stamp: 'sma 3/11/2000 11:48'!\\\\ninitialize\\\\n\\\\tsuper initialize.\\\\n\\\\tstatus _ #inactive! !\\\\n\\\\n\\\\n!StandardSystemController methodsFor: 'menu messages'!\\\\nchooseColor\\\\n\\\\t\\\\\\\"Allow the user to specify a new background color for the receiver's window.  5/6/96 sw.\\\\n\\\\t 7/31/96 sw: use Color fromUser\\\\\\\"\\\\n\\\\n\\\\tview backgroundColor: Color fromUser; uncacheBits; display! !\\\\n\\\\n!StandardSystemController methodsFor: 'menu messages'!\\\\nclose\\\\n\\\\t\\\\\\\"The receiver's view should be removed from the screen and from the \\\\n\\\\tcollection of scheduled views.\\\\\\\"\\\\n\\\\n\\\\tmodel okToChange ifFalse: [^self].\\\\n\\\\tstatus _ #closed.\\\\n\\\\tview erase! !\\\\n\\\\n!StandardSystemController methodsFor: 'menu messages'!\\\\ncollapse\\\\n\\\\t\\\\\\\"Get the receiver's view to change to a collapsed view on the screen.\\\\\\\"\\\\n\\\\tview collapseToPoint: view chooseCollapsePoint! !\\\\n\\\\n!StandardSystemController methodsFor: 'menu messages'!\\\\nexpand\\\\n\\\\t\\\\\\\"The receiver's view was collapsed; open it again and ask the user to \\\\n\\\\tdesignate its rectangular area.\\\\\\\"\\\\n\\\\tview expand; emphasize! !\\\\n\\\\n!StandardSystemController methodsFor: 'menu messages' stamp: 'rbb 3/1/2005 11:14'!\\\\nlabel\\\\n\\\\n\\\\t| newLabel |\\\\n\\\\tnewLabel := UIManager default\\\\n\\\\t\\\\trequest: 'Edit the label, then type RETURN'\\\\n\\\\t\\\\tinitialAnswer: view label.\\\\n\\\\tnewLabel isEmpty ifFalse: [view relabel: newLabel].\\\\n! !\\\\n\\\\n!StandardSystemController methodsFor: 'menu messages'!\\\\nmove\\\\n\\\\t\\\\\\\"Ask the user to designate a new origin position for the receiver's view.\\\\n\\\\t6/10/96 sw: tell the view that it has moved\\\\\\\"\\\\n\\\\n\\\\t| oldBox | \\\\n\\\\toldBox _ view windowBox.\\\\n\\\\tview uncacheBits.\\\\n\\\\tview align: view windowBox topLeft\\\\n\\\\t\\\\twith: view chooseMoveRectangle topLeft.\\\\n\\\\tview displayEmphasized.\\\\n\\\\tview moved.  \\\\\\\"In case its model wishes to take note.\\\\\\\"\\\\n\\\\t(oldBox areasOutside: view windowBox) do:\\\\n\\\\t\\\\t[:rect | ScheduledControllers restore: rect]! !\\\\n\\\\n!StandardSystemController methodsFor: 'menu messages'!\\\\nreframe\\\\n\\\\t^ view reframeTo: view getFrame! !\\\\n\\\\n!StandardSystemController methodsFor: 'menu messages'!\\\\ntoggleTwoTone\\\\n\\\\t(view isMemberOf: StandardSystemView) ifTrue:\\\\n\\\\t\\\\t[^ view become: (view as: ColorSystemView)].\\\\n\\\\t(view isMemberOf: ColorSystemView) ifTrue:\\\\n\\\\t\\\\t[^ view become: (view as: StandardSystemView)].\\\\n! !\\\\n\\\\n!StandardSystemController methodsFor: 'menu messages'!\\\\nunder\\\\n\\\\t\\\\\\\"Deactive the receiver's scheduled view and pass control to any view that \\\\n\\\\tmight be positioned directly underneath it and the cursor.\\\\\\\"\\\\n\\\\n\\\\tstatus _ #inactive! !\\\\n\\\\n\\\\n!StandardSystemController methodsFor: 'pluggable menus' stamp: 'sma 3/11/2000 15:12'!\\\\ngetPluggableYellowButtonMenu: shiftKeyState\\\\n\\\\t^ nil! !\\\\n\\\\n\\\\n!StandardSystemController methodsFor: 'scheduling' stamp: 'sw 9/30/97 22:04'!\\\\ncloseAndUnschedule\\\\n\\\\t\\\\\\\"Erase the receiver's view and remove it from the collection of scheduled \\\\n\\\\tviews.\\\\\\\"\\\\n\\\\n\\\\tstatus _ #closed.\\\\n\\\\tview erase.\\\\n\\\\tview release.\\\\n\\\\tScheduledControllers unschedule: self; searchForActiveController\\\\n! !\\\\n\\\\n!StandardSystemController methodsFor: 'scheduling'!\\\\ncloseAndUnscheduleNoErase\\\\n\\\\t\\\\\\\"Remove the scheduled view from the collection of scheduled views. Set \\\\n\\\\tits status to closed but do not erase.\\\\\\\"\\\\n\\\\n\\\\tstatus _ #closed.\\\\n\\\\tview release.\\\\n\\\\tScheduledControllers unschedule: self! !\\\\n\\\\n!StandardSystemController methodsFor: 'scheduling' stamp: 'jm 3/18/98 19:21'!\\\\ncloseAndUnscheduleNoTerminate\\\\n\\\\t\\\\\\\"Erase the receiver's view and remove it from the collection of scheduled views, but do not terminate the current process.\\\\\\\"\\\\n\\\\n\\\\tstatus _ #closed.\\\\n\\\\tview erase.\\\\n\\\\tview release.\\\\n\\\\tScheduledControllers unschedule: self.\\\\n! !\\\\n\\\\n!StandardSystemController methodsFor: 'scheduling'!\\\\nopen\\\\n\\\\t\\\\\\\"Create an area on the screen in which the receiver's scheduled view can \\\\n\\\\tbe displayed. Make it the active view.\\\\\\\"\\\\n\\\\n\\\\tview resizeInitially.\\\\n\\\\tstatus _ #open.\\\\n\\\\tScheduledControllers scheduleActive: self! !\\\\n\\\\n!StandardSystemController methodsFor: 'scheduling'!\\\\nopenDisplayAt: aPoint \\\\n\\\\t\\\\\\\"Create an area with origin aPoint in which the receiver's scheduled \\\\n\\\\tview can be displayed. Make it the active view.\\\\\\\"\\\\n\\\\n\\\\tview align: view viewport center with: aPoint.\\\\n\\\\tview translateBy:\\\\n\\\\t\\\\t(view displayBox amountToTranslateWithin: Display boundingBox).\\\\n\\\\tstatus _ #open.\\\\n\\\\tScheduledControllers scheduleActive: self! !\\\\n\\\\n!StandardSystemController methodsFor: 'scheduling' stamp: 'jm 10/22/97 08:16'!\\\\nopenNoTerminate\\\\n\\\\t\\\\\\\"Create an area in which the receiver's scheduled view can be displayed. \\\\n\\\\tMake it the active view. Do not terminate the currently active process.\\\\\\\"\\\\n\\\\n\\\\tview resizeInitially.\\\\n\\\\tstatus _ #open.\\\\n\\\\tScheduledControllers scheduleActiveNoTerminate: self! !\\\\n\\\\n!StandardSystemController methodsFor: 'scheduling'!\\\\nopenNoTerminateDisplayAt: aPoint \\\\n\\\\t\\\\\\\"Create an area with origin aPoint in which the receiver's scheduled \\\\n\\\\tview can be displayed. Make it the active view. Do not terminate the \\\\n\\\\tcurrently active process.\\\\\\\"\\\\n\\\\n\\\\tview resizeMinimumCenteredAt: aPoint.\\\\n\\\\tstatus _ #open.\\\\n\\\\tScheduledControllers scheduleActiveNoTerminate: self! !\\\\n\\\\n!StandardSystemController methodsFor: 'scheduling'!\\\\nstatus: aSymbol\\\\n\\\\tstatus _ aSymbol! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStandardSystemController class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StandardSystemController class methodsFor: 'class initialization' stamp: 'sma 3/11/2000 11:57'!\\\\ninitialize\\\\n\\\\t\\\\\\\"StandardSystemController initialize\\\\\\\"\\\\n\\\\n\\\\tScheduledBlueButtonMenu _ SelectionMenu\\\\n\\\\t\\\\tlabels:\\\\n'edit label\\\\nchoose color...\\\\ntwo-tone/full color\\\\nmove\\\\nframe\\\\nfull screen\\\\ncollapse\\\\nclose'\\\\n\\\\tlines: #(3 7)\\\\n\\\\tselections: #(label chooseColor toggleTwoTone move reframe fullScreen collapse close).\\\\n\\\\n\\\\tVBorderCursor _ Cursor extent: 16@16 fromArray: #(\\\\n\\\\t\\\\t2r1010000000000000\\\\n\\\\t\\\\t2r1010000000000000\\\\n\\\\t\\\\t2r1010000000000000\\\\n\\\\t\\\\t2r1010000000000000\\\\n\\\\t\\\\t2r1010000000000000\\\\n\\\\t\\\\t2r1010010000100000\\\\n\\\\t\\\\t2r1010110000110000\\\\n\\\\t\\\\t2r1011111111111000\\\\n\\\\t\\\\t2r1010110000110000\\\\n\\\\t\\\\t2r1010010000100000\\\\n\\\\t\\\\t2r1010000000000000\\\\n\\\\t\\\\t2r1010000000000000\\\\n\\\\t\\\\t2r1010000000000000\\\\n\\\\t\\\\t2r1010000000000000\\\\n\\\\t\\\\t2r1010000000000000\\\\n\\\\t\\\\t2r1010000000000000)\\\\n\\\\t\\\\t\\\\toffset: 0@0.\\\\n\\\\tHBorderCursor _ Cursor extent: 16@16 fromArray: #(\\\\n\\\\t\\\\t2r1111111111111111\\\\n\\\\t\\\\t2r0000000000000000\\\\n\\\\t\\\\t2r1111111111111111\\\\n\\\\t\\\\t2r0000000100000000\\\\n\\\\t\\\\t2r0000001110000000\\\\n\\\\t\\\\t2r0000011111000000\\\\n\\\\t\\\\t2r0000000100000000\\\\n\\\\t\\\\t2r0000000100000000\\\\n\\\\t\\\\t2r0000000100000000\\\\n\\\\t\\\\t2r0000000100000000\\\\n\\\\t\\\\t2r0000011111000000\\\\n\\\\t\\\\t2r0000001110000000\\\\n\\\\t\\\\t2r0000000100000000\\\\n\\\\t\\\\t2r0000000000000000\\\\n\\\\t\\\\t2r0000000000000000\\\\n\\\\t\\\\t2r0000000000000000)\\\\n\\\\t\\\\t\\\\toffset: 0@0.! !\\\\nTestCase subclass: #StandardSystemFontsTest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Support-Tests'!\\\\n\\\\n!StandardSystemFontsTest methodsFor: 'testing' stamp: 'bp 11/6/2004 23:15'!\\\\ntestRestoreDefaultFonts\\\\n\\\\n\\\\tself saveStandardSystemFontsDuring: [\\\\n\\\\t\\\\tPreferences restoreDefaultFonts.\\\\n\\\\t\\\\tself assert: #standardDefaultTextFont familyName: 'Accuny' pointSize: 10.\\\\n\\\\t\\\\tself assert: #standardListFont familyName: 'Accuny' pointSize: 10.\\\\n\\\\t\\\\tself assert: #standardFlapFont familyName: 'Accushi' pointSize: 12.\\\\n\\\\t\\\\tself assert: #standardEToysFont familyName: 'BitstreamVeraSans' pointSize: 9.\\\\n\\\\t\\\\tself assert: #standardMenuFont familyName: 'Accuny' pointSize: 10.\\\\n\\\\t\\\\tself assert: #windowTitleFont familyName: 'BitstreamVeraSans' pointSize: 12.\\\\n\\\\t\\\\tself assert: #standardBalloonHelpFont familyName: 'Accujen' pointSize: 9.\\\\n\\\\t\\\\tself assert: #standardCodeFont familyName: 'Accuny' pointSize: 10.\\\\n\\\\t\\\\tself assert: #standardButtonFont familyName: 'BitstreamVeraSansMono' pointSize: 9]! !\\\\n\\\\n\\\\n!StandardSystemFontsTest methodsFor: 'utilities' stamp: 'bp 6/13/2004 18:22'!\\\\nassert: selector familyName: aString pointSize: anInteger\\\\n\\\\n\\\\t| font |\\\\n\\\\tfont _ Preferences perform: selector.\\\\n\\\\tself assert: font familyName = aString.\\\\n\\\\tself assert: font pointSize = anInteger\\\\n\\\\t! !\\\\n\\\\n!StandardSystemFontsTest methodsFor: 'utilities' stamp: 'bp 6/13/2004 21:51'!\\\\nsaveStandardSystemFontsDuring: aBlock\\\\n\\\\n\\\\t| standardDefaultTextFont standardListFont standardEToysFont standardMenuFont \\\\n\\\\twindowTitleFont standardBalloonHelpFont standardCodeFont standardButtonFont |\\\\n\\\\n\\\\tstandardDefaultTextFont _ Preferences standardDefaultTextFont.\\\\n\\\\tstandardListFont _ Preferences standardListFont.\\\\n\\\\tstandardEToysFont _ Preferences standardEToysFont.\\\\n\\\\tstandardMenuFont _ Preferences standardMenuFont.\\\\n\\\\twindowTitleFont _ Preferences windowTitleFont.\\\\n\\\\tstandardBalloonHelpFont _ Preferences standardBalloonHelpFont.\\\\n\\\\tstandardCodeFont _ Preferences standardCodeFont.\\\\n\\\\tstandardButtonFont _ Preferences standardButtonFont.\\\\n\\\\t[aBlock value] ensure: [\\\\n\\\\t\\\\tPreferences setSystemFontTo: standardDefaultTextFont.\\\\n\\\\t\\\\tPreferences setListFontTo: standardListFont.\\\\n\\\\t\\\\tPreferences setEToysFontTo: standardEToysFont.\\\\n\\\\t\\\\tPreferences setMenuFontTo: standardMenuFont.\\\\n\\\\t\\\\tPreferences setWindowTitleFontTo: windowTitleFont.\\\\n\\\\t\\\\tPreferences setBalloonHelpFontTo: standardBalloonHelpFont.\\\\n\\\\t\\\\tPreferences setCodeFontTo: standardCodeFont.\\\\n\\\\t\\\\tPreferences setButtonFontTo: standardButtonFont].\\\\n! !\\\\nView subclass: #StandardSystemView\\\\n\\\\tinstanceVariableNames: 'labelFrame labelText isLabelComplemented savedSubViews minimumSize maximumSize collapsedViewport expandedViewport labelBits windowBits bitsValid updatablePanes'\\\\n\\\\tclassVariableNames: 'CacheBits LabelStyle'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'ST80-Support'!\\\\n!StandardSystemView commentStamp: '<historical>' prior: 0!\\\\nI represent a view that has a label above its top left corner. The text in the label identifies the kind of view. In addition to a label, I add control over the maximum and minimum size of the display box of my instance. My default controller is StandardSystemController. The elements of ScheduledControllers, the sole instance of ControlManager, are usually controllers for instances of me.!\\\\n\\\\n\\\\n!StandardSystemView methodsFor: 'clipping box access'!\\\\nclippingBox\\\\n\\\\t\\\\\\\"Answer the rectangular area in which the receiver can show its label.\\\\\\\"\\\\n\\\\n\\\\t^self isTopView\\\\n\\\\t\\\\tifTrue: [self labelDisplayBox]\\\\n\\\\t\\\\tifFalse: [super insetDisplayBox]! !\\\\n\\\\n!StandardSystemView methodsFor: 'clipping box access' stamp: 'BG 12/5/2003 11:13'!\\\\nconstrainFrame: aRectangle\\\\n\\\\t\\\\\\\"Constrain aRectangle, to the minimum and maximum size\\\\n\\\\tfor this window\\\\\\\"\\\\n\\\\n   | adjustmentForLabel |\\\\n   adjustmentForLabel := 0 @ (labelFrame height  - labelFrame borderWidth).\\\\n\\\\t^ aRectangle origin extent:\\\\n\\\\t\\\\t((aRectangle extent max: minimumSize + adjustmentForLabel)\\\\n\\\\t\\\\t      min: maximumSize + adjustmentForLabel).! !\\\\n\\\\n\\\\n!StandardSystemView methodsFor: 'controller access'!\\\\ndefaultControllerClass \\\\n\\\\t\\\\\\\"Refer to the comment in View|defaultControllerClass.\\\\\\\"\\\\n\\\\n\\\\t^StandardSystemController! !\\\\n\\\\n\\\\n!StandardSystemView methodsFor: 'deEmphasizing'!\\\\ndeEmphasizeView \\\\n\\\\t\\\\\\\"Refer to the comment in View|deEmphasizeView.\\\\\\\"\\\\n\\\\n\\\\tisLabelComplemented ifTrue:\\\\n\\\\t\\\\t[self deEmphasizeLabel.\\\\n\\\\t\\\\tisLabelComplemented _ false]! !\\\\n\\\\n!StandardSystemView methodsFor: 'deEmphasizing'!\\\\nemphasizeView \\\\n\\\\t\\\\\\\"Refer to the comment in View|emphasizeView.\\\\\\\"\\\\n\\\\n\\\\tself emphasizeLabel! !\\\\n\\\\n\\\\n!StandardSystemView methodsFor: 'displaying'!\\\\ncacheBits\\\\n\\\\t| oldLabelState |\\\\n\\\\tCacheBits ifFalse: [^ self uncacheBits].\\\\n\\\\t(oldLabelState _ isLabelComplemented) ifTrue: [ self deEmphasize ].\\\\n\\\\tself cacheBitsAsIs.\\\\n\\\\t(isLabelComplemented _ oldLabelState) ifTrue: [ self emphasize ].\\\\n! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying'!\\\\ncacheBitsAsIs\\\\n\\\\tCacheBits ifFalse: [^ self uncacheBits].\\\\n\\\\twindowBits _ (self cacheBitsAsTwoTone and: [Display depth > 1])\\\\n\\\\t\\\\tifTrue: [ColorForm\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttwoToneFromDisplay: self windowBox\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tusing: windowBits\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbackgroundColor: self backgroundColor]\\\\n\\\\t\\\\tifFalse: [Form fromDisplay: self windowBox using: windowBits].\\\\n\\\\tbitsValid _ true.\\\\n! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying'!\\\\ncacheBitsAsTwoTone\\\\n\\\\t^ true! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying'!\\\\ndeEmphasizeForDebugger\\\\n\\\\t\\\\\\\"Carefully de-emphasis this window because a debugger is being opened. Care must be taken to avoid invoking potentially buggy window display code that could cause a recursive chain of errors eventually resulting in a virtual machine crash. In particular, do not de-emphasize the subviews.\\\\\\\"\\\\n\\\\n\\\\tself deEmphasizeView.  \\\\\\\"de-emphasize this top-level view\\\\\\\"\\\\n\\\\tself uncacheBits.\\\\n\\\\tSmalltalk garbageCollectMost > 1000000 ifTrue: [\\\\n\\\\t\\\\t\\\\\\\"if there is enough space, cache current window screen bits\\\\\\\"\\\\n\\\\t\\\\tself cacheBitsAsIs].\\\\n! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying' stamp: 'di 10/3/97 13:18'!\\\\ndeEmphasizeLabel\\\\n\\\\t\\\\\\\"Un-Highlight the label.\\\\\\\"\\\\n\\\\tlabelFrame height = 0 ifTrue: [^ self].  \\\\\\\"no label\\\\\\\"\\\\n\\\\tself displayLabelBackground: false.\\\\n\\\\tself displayLabelText.! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying'!\\\\ndisplay\\\\n\\\\tisLabelComplemented\\\\n\\\\t\\\\tifTrue: [self displayEmphasized]\\\\n\\\\t\\\\tifFalse: [self displayDeEmphasized]! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying' stamp: 'hmm 7/21/1999 07:37'!\\\\ndisplayDeEmphasized \\\\n\\\\t\\\\\\\"Display this view with emphasis off.\\\\n\\\\tIf windowBits is not nil, then simply BLT if possible,\\\\n\\\\t\\\\tbut force full display for top window so color is preserved.\\\\\\\"\\\\n\\\\t(bitsValid and: [controller ~~ ScheduledControllers activeController])\\\\n\\\\t\\\\tifTrue: [self lock.\\\\n\\\\t\\\\t\\\\t\\\\twindowBits displayAt: self windowOrigin]\\\\n\\\\t\\\\tifFalse: [Display deferUpdates: true.\\\\n\\\\t\\\\t\\\\t\\\\tsuper display.\\\\n\\\\t\\\\t\\\\t\\\\tDisplay deferUpdates: false; forceToScreen: self windowBox.\\\\n\\\\t\\\\t\\\\t\\\\tCacheBits ifTrue: [self cacheBitsAsIs]]\\\\n! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying'!\\\\ndisplayEmphasized\\\\n\\\\t\\\\\\\"Display with label highlighted to indicate that it is active.\\\\\\\"\\\\n\\\\n\\\\tself displayDeEmphasized; emphasize.\\\\n\\\\tisLabelComplemented _ true! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying' stamp: 'di 5/15/1998 21:55'!\\\\ndisplayLabelBackground: emphasized\\\\n\\\\t\\\\\\\"Clear or emphasize the inner region of the label\\\\\\\"\\\\n\\\\t| r1 r2 r3 c3 c2 c1 |\\\\n\\\\temphasized ifFalse:\\\\n\\\\t\\\\t[\\\\\\\"Just clear the label if not emphasized\\\\\\\"\\\\n\\\\t\\\\t^ Display fill: (self labelDisplayBox insetBy: 2) fillColor: self labelColor].\\\\n\\\\tr1 _ self labelDisplayBox insetBy: 2.\\\\n\\\\tr2 _ r1 insetBy: 0@2.\\\\n\\\\tr3 _ r2 insetBy: 0@3.\\\\n\\\\tc3 _ self labelColor.\\\\n\\\\tc2 _ c3 dansDarker.\\\\n\\\\tc1 _ c2 dansDarker.\\\\n\\\\tDisplay fill: r1 fillColor: c1.\\\\n\\\\tDisplay fill: r2 fillColor: c2.\\\\n\\\\tDisplay fill: r3 fillColor: c3.\\\\n \\\\n\\\\\\\"\\\\tHere is the Mac racing stripe code\\\\n\\\\tstripes _ Bitmap with: (self labelColor pixelWordForDepth: Display depth)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\twith: (Form black pixelWordForDepth: Display depth).\\\\n\\\\tself windowOrigin y even ifTrue: [stripes swap: 1 with: 2].\\\\n\\\\tDisplay fill: (self labelDisplayBox insetBy: 3) fillColor: stripes.\\\\n\\\\\\\"! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying'!\\\\ndisplayLabelBoxes\\\\n\\\\t\\\\\\\"closeBox, growBox.\\\\\\\"\\\\n\\\\t| aRect smallRect backColor |\\\\n\\\\taRect _ self closeBoxFrame.\\\\n\\\\tbackColor _ self labelColor.\\\\n\\\\tDisplay fill: (aRect insetBy: -2) fillColor: backColor.\\\\n\\\\tDisplay fillBlack: aRect.\\\\n\\\\tDisplay fill: (aRect insetBy: 1) fillColor: backColor.\\\\n\\\\n\\\\taRect _ self growBoxFrame.\\\\n\\\\tsmallRect _ aRect origin extent: 7@7.\\\\n\\\\tDisplay fill: (aRect insetBy: -2) fillColor: backColor.\\\\n\\\\taRect _ aRect insetOriginBy: 2@2 cornerBy: 0@0.\\\\n\\\\tDisplay fillBlack: aRect.\\\\n\\\\tDisplay fill: (aRect insetBy: 1) fillColor: backColor.\\\\n\\\\tDisplay fillBlack: smallRect.\\\\n\\\\tDisplay fill: (smallRect insetBy: 1) fillColor: backColor! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying' stamp: 'di 9/10/1998 09:43'!\\\\ndisplayLabelText\\\\n\\\\t\\\\\\\"The label goes in the center of the window\\\\\\\"\\\\n\\\\t| labelRect |\\\\n\\\\tlabelText foregroundColor: self foregroundColor\\\\n\\\\t\\\\t\\\\tbackgroundColor: self labelColor.\\\\n\\\\tlabelRect _ self labelTextRegion.\\\\n\\\\tDisplay fill: (labelRect expandBy: 3@0) fillColor: self labelColor.\\\\n\\\\tlabelText displayOn: Display at: labelRect topLeft clippingBox: labelRect\\\\n\\\\t\\\\t\\\\trule: labelText rule fillColor: labelText fillColor.\\\\n\\\\tlabelText destinationForm: nil! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying' stamp: 'di 8/29/97 18:57'!\\\\ndisplayOn: aPort\\\\n\\\\tbitsValid ifFalse:\\\\n\\\\t\\\\t[^ Display clippingTo: aPort clipRect do: [super display]].\\\\n\\\\twindowBits displayOnPort: aPort at: self windowOrigin! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying' stamp: 'ar 5/14/2001 23:40'!\\\\ndisplayRacingStripes\\\\n\\\\t\\\\\\\"Display Racing Stripes in the label\\\\\\\"\\\\n\\\\t| labelDisplayBox stripes top bottom left box right |\\\\n\\\\tlabelDisplayBox _ self labelDisplayBox.\\\\n\\\\ttop _ labelDisplayBox top + 3.\\\\n\\\\tbottom _ labelDisplayBox bottom - 3.\\\\n\\\\tstripes _ Bitmap with: (Display pixelWordFor: self labelColor)\\\\n\\\\t\\\\t\\\\twith: (Display pixelWordFor: Color black).\\\\n\\\\ttop even ifFalse: [stripes swap: 1 with: 2].\\\\n\\\\n\\\\tleft _ labelDisplayBox left + 3.\\\\n\\\\n\\\\tbox _ self closeBoxFrame.\\\\n\\\\tright _ box left - 2.\\\\n\\\\tDisplay fill: (Rectangle left: left right: right top: top bottom: bottom)\\\\n\\\\t\\\\t\\\\tfillColor: stripes.\\\\n\\\\tleft _ box right + 2.\\\\n\\\\n\\\\tbox _ self labelTextRegion.\\\\n\\\\tright _ box left - 3.\\\\n\\\\tDisplay fill: (Rectangle left: left right: right top: top bottom: bottom)\\\\n\\\\t\\\\t\\\\tfillColor: stripes.\\\\n\\\\tleft _ box right + 2.\\\\n\\\\n\\\\tbox _ self growBoxFrame.\\\\n\\\\tright _ box left - 2.\\\\n\\\\tDisplay fill: (Rectangle left: left right: right top: top bottom: bottom)\\\\n\\\\t\\\\t\\\\tfillColor: stripes.\\\\n\\\\tleft _ box right + 2.\\\\n\\\\n\\\\tright _ labelDisplayBox right - 3.\\\\n\\\\tDisplay fill: (Rectangle left: left right: right top: top bottom: bottom)\\\\n\\\\t\\\\t\\\\tfillColor: stripes.\\\\n! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying' stamp: 'di 10/3/97 13:14'!\\\\ndisplayView\\\\n\\\\t\\\\\\\"Refer to the comment in View|displayView. \\\\\\\"\\\\n\\\\tlabelFrame height = 0 ifTrue: [^ self].  \\\\\\\"no label\\\\\\\"\\\\n\\\\tself displayBox width = labelFrame width ifFalse:\\\\n\\\\t\\\\t[\\\\\\\"recompute label width when window changes size\\\\\\\"\\\\n\\\\t\\\\tself setLabelRegion].\\\\n\\\\t(labelFrame align: labelFrame topLeft with: self windowOrigin)\\\\n\\\\t\\\\tinsideColor: self labelColor;\\\\n\\\\t\\\\tdisplayOn: Display.\\\\n\\\\tself displayLabelText! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying' stamp: 'di 10/3/97 13:18'!\\\\nemphasizeLabel\\\\n\\\\t\\\\\\\"Highlight the label.\\\\\\\"\\\\n\\\\tlabelFrame height = 0 ifTrue: [^ self].  \\\\\\\"no label\\\\\\\"\\\\n\\\\tself displayLabelBackground: true.\\\\n\\\\tself displayLabelBoxes.\\\\n\\\\tself displayLabelText.! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying' stamp: 'di 8/30/97 11:07'!\\\\nerase\\\\n\\\\t\\\\\\\"Clear the display box of the receiver to be gray, as the screen background.\\\\\\\"\\\\n\\\\t| oldValid |\\\\n\\\\tCacheBits\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[oldValid _ bitsValid.\\\\n\\\\t\\\\t\\\\tbitsValid _ false.\\\\n\\\\t\\\\t\\\\tScheduledControllers restore: self windowBox without: self.\\\\n\\\\t\\\\t\\\\tbitsValid _ oldValid]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[ScheduledControllers restore: self windowBox without: self]! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying' stamp: 'RAA 6/14/2000 17:27'!\\\\nmakeMeVisible\\\\n\\\\n        | newLoc portRect |\\\\n        ((Display boundingBox insetBy: (0@0 corner: self labelHeight asPoint))\\\\n                containsPoint: self displayBox topLeft) ifTrue: [^ self \\\\\\\"OK -- my top left is visible\\\\\\\"].\\\\n\\\\n        \\\\\\\"window not on screen (probably due to reframe) -- move it now\\\\\\\"\\\\n        newLoc _ self isCollapsed\\\\n                ifTrue: [RealEstateAgent assignCollapsePointFor: self]\\\\n                ifFalse: [(RealEstateAgent initialFrameFor: self world: nil) topLeft].\\\\n        portRect _ newLoc + self labelOffset\\\\n                                extent: self windowBox extent - self labelOffset.\\\\n        self resizeTo: portRect.\\\\n        self setLabelRegion.\\\\n! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying'!\\\\nuncacheBits\\\\n\\\\twindowBits _ nil.\\\\n\\\\tbitsValid _ false.! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying'!\\\\nwindowBits\\\\n\\\\t^ windowBits! !\\\\n\\\\n\\\\n!StandardSystemView methodsFor: 'framing' stamp: 'sr 3/26/2000 03:47'!\\\\nchooseCollapsePoint\\\\n\\\\t\\\\\\\"Answer the point at which to place the collapsed window.\\\\\\\"\\\\n\\\\t| pt labelForm beenDown offset |\\\\n\\\\tlabelForm _ Form fromDisplay: self labelDisplayBox.\\\\n\\\\tself uncacheBits.\\\\n\\\\tself erase.\\\\n\\\\tbeenDown _ Sensor anyButtonPressed.\\\\n\\\\tself isCollapsed ifTrue:\\\\n\\\\t\\\\t[offset _ self labelDisplayBox topLeft - self growBoxFrame topLeft.\\\\n\\\\t\\\\tlabelForm follow: [pt _ (Sensor cursorPoint + offset max: 0@0) truncateTo: 8]\\\\n\\\\t\\\\t\\\\t\\\\twhile: [Sensor anyButtonPressed\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [beenDown _ true]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [beenDown not]].\\\\n\\\\t\\\\t^ pt].\\\\n\\\\t^ (RealEstateAgent assignCollapseFrameFor: self) origin.\\\\n! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing'!\\\\nchooseFrame\\\\n\\\\t\\\\\\\"Answer a new frame, depending on whether the view is currently \\\\n\\\\tcollapsed or not.\\\\\\\"\\\\n\\\\t| labelForm f |\\\\n\\\\tself isCollapsed & expandedViewport notNil\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[labelForm _ bitsValid\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [windowBits]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [Form fromDisplay: self labelDisplayBox].\\\\n\\\\t\\\\t\\\\tbitsValid _ false.\\\\n\\\\t\\\\t\\\\tself erase.\\\\n\\\\t\\\\t\\\\tlabelForm slideFrom: self labelDisplayBox origin\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tto: expandedViewport origin-self labelOffset\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnSteps: 10.\\\\n\\\\t\\\\t\\\\t^ expandedViewport]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[f _ self getFrame.\\\\n\\\\t\\\\t\\\\tbitsValid _ false.\\\\n\\\\t\\\\t\\\\tself erase.\\\\n\\\\t\\\\t\\\\t^ f topLeft + self labelOffset extent: f extent]! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing'!\\\\nchooseMoveRectangle\\\\n\\\\t\\\\\\\"Ask the user to designate a new window rectangle.\\\\\\\"\\\\n\\\\t| offset p |\\\\n\\\\toffset _ Sensor anyButtonPressed \\\\\\\"Offset if draggin, eg, label\\\\\\\"\\\\n\\\\t\\\\tifTrue: [self windowBox topLeft - Sensor cursorPoint]\\\\n\\\\t\\\\tifFalse: [0@0].\\\\n\\\\tself isCollapsed\\\\n\\\\t\\\\tifTrue: [^ self labelDisplayBox newRectFrom:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:f | p _ Sensor cursorPoint + offset.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tp _ (p max: 0@0) truncateTo: 8.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tp extent: f extent]]\\\\n\\\\t\\\\tifFalse: [^ self windowBox newRectFrom:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:f | p _ Sensor cursorPoint + offset.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself constrainFrame: (p extent: f extent)]]! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing' stamp: 'di 5/11/1999 22:09'!\\\\ncollapse\\\\n\\\\t\\\\\\\"If the receiver is not already collapsed, change its view to be that of its \\\\n\\\\tlabel only.\\\\\\\"\\\\n\\\\n\\\\tself isCollapsed ifFalse:\\\\n\\\\t\\\\t\\\\t[model modelSleep.\\\\n\\\\t\\\\t\\\\t(subViews ~~ nil and: [subViews size = 1 and: [subViews first isKindOf: MorphWorldView]])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [subViews first deEmphasizeView].\\\\n\\\\t\\\\t\\\\texpandedViewport _ self viewport.\\\\n\\\\t\\\\t\\\\tsavedSubViews _ subViews.\\\\n\\\\t\\\\t\\\\tself resetSubViews.\\\\n\\\\t\\\\t\\\\tlabelText isNil ifTrue: [self label: nil.  bitsValid _ false.].\\\\n\\\\t\\\\t\\\\tself window: (self inverseDisplayTransform:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t((self labelDisplayBox topLeft extent: (labelText extent x + 70) @ self labelHeight)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t intersect: self labelDisplayBox))]! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing'!\\\\ncollapseToPoint: collapsePoint\\\\n\\\\tself collapse.\\\\n\\\\tself align: self displayBox topLeft with: collapsePoint.\\\\n\\\\tcollapsedViewport _ self viewport.\\\\n\\\\tself displayEmphasized! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing'!\\\\ncollapsedFrame\\\\n\\\\t\\\\\\\"Answer the rectangle occupied by this window when collapsed.\\\\\\\"\\\\n\\\\t^ collapsedViewport  \\\\\\\"NOTE may be nil\\\\\\\"! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing' stamp: 'sw 10/20/1999 09:46'!\\\\nexpand\\\\n\\\\t\\\\\\\"If the receiver is collapsed, change its view to be that of all of its subviews, not its label alone.\\\\\\\"\\\\n\\\\t| newFrame |\\\\n\\\\tself isCollapsed\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[newFrame _ self chooseFrame expandBy: borderWidth.\\\\n\\\\t\\\\t\\\\tcollapsedViewport _ self viewport.\\\\n\\\\t\\\\t\\\\tsubViews _ savedSubViews.\\\\n\\\\t\\\\t\\\\tlabelFrame borderWidthLeft: 2 right: 2 top: 2 bottom: 2.\\\\n\\\\t\\\\t\\\\tsavedSubViews _ nil.\\\\n\\\\t\\\\t\\\\tself setWindow: nil.\\\\n\\\\t\\\\t\\\\tself resizeTo: newFrame.\\\\n\\\\t\\\\t\\\\tself displayDeEmphasized.\\\\n\\\\t\\\\t\\\\tmodel modelWakeUpIn: self]! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing'!\\\\nexpandedFrame\\\\n\\\\t\\\\\\\"Answer the rectangle occupied by this window when expanded.\\\\\\\"\\\\n\\\\t^ expandedViewport  \\\\\\\"NOTE may be nil\\\\\\\"! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing' stamp: 'sw 8/15/97 17:18'!\\\\nfullScreen\\\\n\\\\t\\\\\\\"Expand the receiver to fill the screen.  Let the model decide how big is full -- allows for flop-out scrollbar on left if desired\\\\\\\"\\\\n\\\\n\\\\tself isCollapsed ifFalse:\\\\n\\\\t\\\\t[self reframeTo: model fullScreenSize]! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing'!\\\\ngetFrame\\\\n\\\\t\\\\\\\"Ask the user to designate a rectangular area in which\\\\n\\\\tthe receiver should be displayed.\\\\\\\"\\\\n\\\\t| minFrame |\\\\n\\\\tminFrame _ Cursor origin showWhile: \\\\n\\\\t\\\\t[(Sensor cursorPoint extent: self minimumSize) newRectFrom:\\\\n\\\\t\\\\t\\\\t[:f | Sensor cursorPoint extent: self minimumSize]].\\\\n\\\\tself maximumSize <= self minimumSize ifTrue: [^ minFrame].\\\\n\\\\t^ Cursor corner showWhile:\\\\n\\\\t\\\\t[minFrame newRectFrom:\\\\n\\\\t\\\\t\\\\t[:f | self constrainFrame: (f origin corner: Sensor cursorPoint)]]! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing' stamp: 'sw 1/22/96'!\\\\ninitialExtent\\\\n\\\\t\\\\\\\"Answer the desired extent for the receiver when it is first opened on the screen.  \\\\\\\"\\\\n\\\\n\\\\t^ model initialExtent min: maximumSize max: minimumSize! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing' stamp: 'RAA 6/14/2000 17:27'!\\\\ninitialFrame\\\\n        \\\\\\\"Find a plausible initial screen area for the receiver, taking into account user preference, the size needed, and other windows currently on the screen.  5/22/96 sw: let RealEstateAgent do it for us\\\\\\\"\\\\n\\\\n        ^ RealEstateAgent initialFrameFor: self world: nil! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing'!\\\\nmoved\\\\n\\\\t\\\\\\\"The user has moved the receiver; after a new view rectangle is chosen, this method is called to allow certain views to take note of the change.  6/10/96 sw\\\\\\\" ! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing'!\\\\nnewFrame: frameChangeBlock\\\\n\\\\tself reframeTo: (self windowBox newRectFrom:\\\\n\\\\t\\\\t[:f | self constrainFrame: (frameChangeBlock value: f)])! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing' stamp: 'di 10/22/1998 16:15'!\\\\nreframePanesAdjoining: subView along: side to: aDisplayBox \\\\n\\\\t| newBox delta newRect minDim theMin |\\\\n\\\\tnewRect _ aDisplayBox.\\\\n\\\\ttheMin _ 16.\\\\n\\\\t\\\\\\\"First check that this won't make any pane smaller than theMin screen dots\\\\\\\"\\\\n\\\\tminDim _ ((subViews select: [:sub | sub displayBox bordersOn: subView displayBox along: side])\\\\n\\\\t\\\\tcollect: [:sub | sub displayBox adjustTo: newRect along: side])\\\\n\\\\t\\\\t\\\\tinject: 999 into: [:was :rect | (was min: rect width) min: rect height].\\\\n\\\\t\\\\\\\"If so, amend newRect as required\\\\\\\"\\\\n\\\\tminDim < theMin ifTrue:\\\\n\\\\t\\\\t[delta _ minDim - theMin.\\\\n\\\\t\\\\tnewRect _ newRect withSide: side setTo: \\\\n\\\\t\\\\t\\\\t\\\\t((newRect perform: side) > (subView displayBox perform: side)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [(newRect perform: side) + delta]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [(newRect perform: side) - delta])].\\\\n\\\\t\\\\\\\"Now adjust all adjoining panes for real\\\\\\\"\\\\n\\\\tsubViews do:\\\\n\\\\t\\\\t[:sub | (sub displayBox bordersOn: subView displayBox along: side) ifTrue:\\\\n\\\\t\\\\t\\\\t[newBox _ sub displayBox adjustTo: newRect along: side.\\\\n\\\\t\\\\t\\\\tsub window: sub window viewport:\\\\n\\\\t\\\\t\\\\t\\\\t(sub transform: (sub inverseDisplayTransform: newBox)) rounded]].\\\\n\\\\t\\\\\\\"And adjust the growing pane itself\\\\\\\"\\\\n\\\\tsubView window: subView window viewport:\\\\n\\\\t\\\\t\\\\t(subView transform: (subView inverseDisplayTransform: newRect)) rounded.\\\\n\\\\n\\\\t\\\\\\\"Finally force a recomposition of the whole window\\\\\\\"\\\\n\\\\tviewport _ nil.\\\\n\\\\tself resizeTo: self viewport.\\\\n\\\\tself uncacheBits; displayEmphasized! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing' stamp: 'BG 12/4/2003 13:14'!\\\\nreframeTo: newFrame\\\\n\\\\t\\\\\\\"Reframe the receiver to the given screen rectangle.  \\\\n\\\\tRepaint difference after the change.  \\\\\\\"\\\\n\\\\t| oldBox newBox portRect |\\\\n\\\\tself uncacheBits.\\\\n\\\\toldBox _ self windowBox.\\\\n\\\\tportRect _ newFrame topLeft + self labelOffset\\\\n\\\\t\\\\t\\\\t\\\\tcorner: newFrame corner.\\\\n\\\\tself setWindow: nil.\\\\n\\\\tself resizeTo: portRect.\\\\n\\\\tself setLabelRegion.\\\\n\\\\tnewBox _ self windowBox.\\\\n\\\\t(oldBox areasOutside: newBox) do:\\\\n\\\\t\\\\t[:rect | ScheduledControllers restore: rect].\\\\n\\\\tself displayEmphasized! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing'!\\\\nresize\\\\n\\\\t\\\\\\\"Determine the rectangular area for the receiver, adjusted to the \\\\n\\\\tminimum and maximum sizes.\\\\\\\"\\\\n\\\\t| f |\\\\n\\\\tf _ self getFrame.\\\\n\\\\tself resizeTo: (f topLeft + self labelOffset extent: f extent)\\\\n! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing'!\\\\nresizeInitially\\\\n\\\\t\\\\\\\"Determine the rectangular area for the receiver, adjusted to the \\\\n\\\\tminimum and maximum sizes.\\\\\\\"\\\\n\\\\tself resizeTo: self initialFrame\\\\n! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing' stamp: 'di 4/6/98 15:12'!\\\\nresizeMinimumCenteredAt: aPoint \\\\n\\\\t\\\\\\\"Determine the rectangular area for the receiver, adjusted so that it is \\\\n\\\\tcentered a position, aPoint.\\\\\\\"\\\\n\\\\t| aRectangle |\\\\n\\\\taRectangle _ 0 @ 0 extent: self minimumSize.\\\\n\\\\taRectangle _ aRectangle align: aRectangle center with: aPoint.\\\\n\\\\tself resizeTo: aRectangle! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing' stamp: 'di 4/6/98 15:29'!\\\\nresizeTo: aRectangle\\\\n\\\\t\\\\\\\"Resize this view to aRectangle\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"First get scaling right inside borders\\\\\\\"\\\\n\\\\tself window: (self window insetBy: borderWidth)\\\\n\\\\t\\\\tviewport: (aRectangle insetBy: borderWidth).\\\\n\\\\n\\\\t\\\\\\\"Then ensure window maps to aRectangle\\\\\\\"\\\\n\\\\twindow _ transformation applyInverseTo: aRectangle! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing'!\\\\nstandardWindowOffset\\\\n\\\\t^ Preferences standardWindowOffset! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing'!\\\\nwindowBox\\\\n\\\\t^ self displayBox merge: self labelDisplayBox! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing' stamp: 'di 10/3/97 14:19'!\\\\nwindowOrigin\\\\n\\\\t^ (self isCollapsed or: [labelFrame height = 0  \\\\\\\"no label\\\\\\\"])\\\\n\\\\t\\\\tifTrue: [self displayBox topLeft]\\\\n\\\\t\\\\tifFalse: [self displayBox topLeft - self labelOffset]! !\\\\n\\\\n\\\\n!StandardSystemView methodsFor: 'initialize-release' stamp: 'sw 10/29/1999 12:58'!\\\\ninitialize \\\\n\\\\t\\\\\\\"Refer to the comment in View|initialize.\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\tlabelFrame _ Quadrangle new.\\\\n\\\\tlabelFrame region: (Rectangle origin: 0 @ 0 extent: 50 @ self labelHeight).\\\\n\\\\tlabelFrame borderWidthLeft: 2 right: 2 top: 2 bottom: 2.\\\\n\\\\tself label: nil.\\\\n\\\\tisLabelComplemented _ false.\\\\n\\\\tminimumSize _ 50 @ 50.\\\\n\\\\tmaximumSize _ Display extent.\\\\n\\\\tcollapsedViewport _ nil.\\\\n\\\\texpandedViewport _ nil.\\\\n\\\\tbitsValid _ false.\\\\n\\\\tupdatablePanes _ #()! !\\\\n\\\\n!StandardSystemView methodsFor: 'initialize-release'!\\\\nmodel: aModel\\\\n\\\\t\\\\\\\"Set the receiver's model.  For a Standard System View, we also at this time get the default background color set up.  7/30/96 sw\\\\\\\"\\\\n\\\\tsuper model: aModel.\\\\n\\\\tself setDefaultBackgroundColor! !\\\\n\\\\n!StandardSystemView methodsFor: 'initialize-release' stamp: 'jm 8/20/1998 18:29'!\\\\nrelease\\\\n\\\\n\\\\tmodel windowIsClosing.\\\\n\\\\tself isCollapsed ifTrue: [savedSubViews do: [:v | v release]].\\\\n\\\\tsuper release.\\\\n! !\\\\n\\\\n\\\\n!StandardSystemView methodsFor: 'label access' stamp: 'di 6/16/97 12:30'!\\\\ncloseBoxFrame\\\\n\\\\t^ Rectangle origin: (self labelDisplayBox leftCenter + (10@-5)) extent: (11@11)! !\\\\n\\\\n!StandardSystemView methodsFor: 'label access' stamp: 'di 6/16/97 12:29'!\\\\ngrowBoxFrame\\\\n\\\\t^ Rectangle origin: (self labelDisplayBox rightCenter + (-22@-5)) extent: (11@11)! !\\\\n\\\\n!StandardSystemView methodsFor: 'label access'!\\\\nlabel\\\\n\\\\t\\\\\\\"Answer the string that appears in the receiver's label.\\\\\\\"\\\\n\\\\tlabelText isNil\\\\n\\\\t\\\\tifTrue: [^ 'Untitled' copy]\\\\n\\\\t\\\\tifFalse: [^ labelText asString]! !\\\\n\\\\n!StandardSystemView methodsFor: 'label access' stamp: 'sw 12/9/1999 17:44'!\\\\nlabel: aString \\\\n\\\\t\\\\\\\"Set aString to be the receiver's label.\\\\\\\"\\\\n\\\\tlabelText _ Paragraph\\\\n\\\\t\\\\t\\\\twithText: (Text string: ((aString == nil or: [aString isEmpty])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: ['Untitled' copy]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [aString])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tattributes: (Array with: TextEmphasis bold))\\\\n\\\\t\\\\t\\\\tstyle: LabelStyle.\\\\n\\\\tinsetDisplayBox == nil ifTrue: [^ self].  \\\\\\\"wait for further initialization\\\\\\\"\\\\n\\\\tself setLabelRegion! !\\\\n\\\\n!StandardSystemView methodsFor: 'label access'!\\\\nlabelColor\\\\n\\\\t\\\\\\\"Answer the color to use as the background for the receiver's label.  By default, this is the same as the background color of the window, but need not be.  7/16/96 sw\\\\\\\"\\\\n\\\\n\\\\t^ self backgroundColor! !\\\\n\\\\n!StandardSystemView methodsFor: 'label access'!\\\\nlabelDisplayBox\\\\n\\\\t\\\\\\\"Answer the rectangle that borders the visible parts of the receiver's label \\\\n\\\\ton the display screen.\\\\\\\"\\\\n\\\\n\\\\t^ labelFrame region\\\\n\\\\t\\\\talign: labelFrame topLeft\\\\n\\\\t\\\\twith: self windowOrigin! !\\\\n\\\\n!StandardSystemView methodsFor: 'label access'!\\\\nlabelFrame\\\\n\\\\t^labelFrame! !\\\\n\\\\n!StandardSystemView methodsFor: 'label access' stamp: 'sw 12/9/1999 17:47'!\\\\nlabelHeight\\\\n\\\\t^ ((LabelStyle fontAt: 1) height + 4) max: 20! !\\\\n\\\\n!StandardSystemView methodsFor: 'label access'!\\\\nlabelOffset\\\\n\\\\t^ 0 @ (self labelHeight-2)! !\\\\n\\\\n!StandardSystemView methodsFor: 'label access' stamp: 'sr 3/26/2000 04:26'!\\\\nlabelText\\\\n\\\\t^labelText! !\\\\n\\\\n!StandardSystemView methodsFor: 'label access'!\\\\nlabelTextRegion\\\\n\\\\tlabelText == nil ifTrue: [^ self labelDisplayBox center extent: 0@0].\\\\n\\\\t^ (labelText boundingBox\\\\n\\\\t\\\\t\\\\talign: labelText boundingBox center\\\\n\\\\t\\\\t\\\\twith: self labelDisplayBox center)\\\\n\\\\t\\\\tintersect: (self labelDisplayBox insetBy: 35@0)! !\\\\n\\\\n!StandardSystemView methodsFor: 'label access' stamp: 'di 10/3/97 14:20'!\\\\nnoLabel\\\\n\\\\t\\\\\\\"A label of zero height indicates no label\\\\\\\"\\\\n\\\\tlabelFrame height > 0\\\\n\\\\t\\\\tifTrue: [labelFrame region: (labelFrame bottomLeft + (0@1) extent: labelFrame width@0).\\\\n\\\\t\\\\t\\\\t\\\\tlabelFrame borderWidth: 0.\\\\n\\\\t\\\\t\\\\t\\\\tself uncacheBits]! !\\\\n\\\\n!StandardSystemView methodsFor: 'label access' stamp: 'di 6/10/1998 13:18'!\\\\nrelabel: aString \\\\n\\\\t\\\\\\\"A new string for the label.  Window is assumed to be active.\\\\n\\\\tWindow will redisplay only if label bar has to grow.\\\\\\\"\\\\n\\\\t| oldRegion oldWidth |\\\\n\\\\t(model windowReqNewLabel: aString) ifFalse: [^ self].\\\\n\\\\toldRegion _ self labelTextRegion.\\\\n\\\\toldWidth _ self insetDisplayBox width.\\\\n\\\\tself label: aString.\\\\n\\\\tDisplay fill: ((oldRegion merge: self labelTextRegion) expandBy: 3@0)\\\\n\\\\t\\\\t\\\\tfillColor: self labelColor.\\\\n\\\\tself insetDisplayBox width = oldWidth\\\\n\\\\t\\\\tifTrue: [self displayLabelText; emphasizeLabel]\\\\n\\\\t\\\\tifFalse: [self uncacheBits; displayEmphasized].\\\\n! !\\\\n\\\\n!StandardSystemView methodsFor: 'label access' stamp: 'sw 1/19/2001 20:13'!\\\\nsetLabel: aLabel\\\\n\\\\t\\\\\\\"For compatibility with morphic\\\\\\\"\\\\n\\\\n\\\\tself relabel: aLabel! !\\\\n\\\\n!StandardSystemView methodsFor: 'label access' stamp: 'di 10/3/97 13:35'!\\\\nsetLabelRegion\\\\n\\\\t\\\\\\\"Always follows view width\\\\\\\"\\\\n\\\\n\\\\tlabelFrame region: (0 @ 0 extent: self displayBox width @ self labelHeight).\\\\n\\\\tlabelFrame borderWidth: 2! !\\\\n\\\\n!StandardSystemView methodsFor: 'label access' stamp: 'sumim 2/8/2002 14:36'!\\\\nsetLabelTo: aString \\\\n\\\\t\\\\\\\"Force aString to be the new label of the receiver, bypassing any logic about whether it is acceptable and about propagating information about the change.\\\\\\\"\\\\n\\\\n\\\\t| oldRegion oldWidth |\\\\n\\\\tself label: aString.\\\\n\\\\tself controller isControlActive ifFalse: [^ self].\\\\n\\\\toldRegion _ self labelTextRegion.\\\\n\\\\toldWidth _ self insetDisplayBox width.\\\\n\\\\tDisplay fill: ((oldRegion merge: self labelTextRegion) expandBy: 3@0)\\\\n\\\\t\\\\t\\\\tfillColor: self labelColor.\\\\n\\\\tself insetDisplayBox width = oldWidth\\\\n\\\\t\\\\tifTrue: [self displayLabelText; emphasizeLabel]\\\\n\\\\t\\\\tifFalse: [self uncacheBits; displayEmphasized]! !\\\\n\\\\n\\\\n!StandardSystemView methodsFor: 'object fileIn' stamp: 'RAA 12/20/2000 17:49'!\\\\nconvertToCurrentVersion: varDict refStream: smartRefStrm\\\\n\\\\t\\\\n\\\\tupdatablePanes ifNil: [updatablePanes _ #()].\\\\n\\\\t^super convertToCurrentVersion: varDict refStream: smartRefStrm.\\\\n\\\\n! !\\\\n\\\\n\\\\n!StandardSystemView methodsFor: 'size'!\\\\nmaximumSize\\\\n\\\\t\\\\\\\"Answer a point representing the maximum width and height of the \\\\n\\\\treceiver.\\\\\\\"\\\\n\\\\n\\\\t^maximumSize! !\\\\n\\\\n!StandardSystemView methodsFor: 'size'!\\\\nmaximumSize: aPoint \\\\n\\\\t\\\\\\\"Set the argument, aPoint, to be the maximum width and height of the \\\\n\\\\treceiver.\\\\\\\"\\\\n\\\\n\\\\tmaximumSize _ aPoint! !\\\\n\\\\n!StandardSystemView methodsFor: 'size'!\\\\nminimumSize\\\\n\\\\t\\\\\\\"Answer a point representing the minimum width and height of the \\\\n\\\\treceiver.\\\\\\\"\\\\n\\\\n\\\\t^minimumSize! !\\\\n\\\\n!StandardSystemView methodsFor: 'size'!\\\\nminimumSize: aPoint \\\\n\\\\t\\\\\\\"Set the argument, aPoint, to be the minimum width and height of the \\\\n\\\\treceiver.\\\\\\\"\\\\n\\\\n\\\\tminimumSize _ aPoint! !\\\\n\\\\n\\\\n!StandardSystemView methodsFor: 'testing'!\\\\ncontainsPoint: aPoint \\\\n\\\\t\\\\\\\"Refer to the comment in View|containsPoint:.\\\\\\\"\\\\n\\\\n\\\\t^(super containsPoint: aPoint) | (self labelContainsPoint: aPoint)! !\\\\n\\\\n!StandardSystemView methodsFor: 'testing'!\\\\nisCollapsed\\\\n\\\\t\\\\\\\"Answer whether the receiver is collapsed (true) or expanded (false).\\\\\\\"\\\\n\\\\n\\\\t^savedSubViews ~~ nil! !\\\\n\\\\n!StandardSystemView methodsFor: 'testing'!\\\\nlabelContainsPoint: aPoint \\\\n\\\\t\\\\\\\"Answer TRUE if aPoint is in the label box.\\\\\\\"\\\\n\\\\n\\\\t^self labelDisplayBox containsPoint: aPoint! !\\\\n\\\\n\\\\n!StandardSystemView methodsFor: 'updating' stamp: 'sw 10/29/1999 12:57'!\\\\nsetUpdatablePanesFrom: getSelectors\\\\n\\\\t| aList aPane |\\\\n\\\\t\\\\\\\"Set my updatablePanes inst var to the list of panes which are list panes with the given get-list selectors.  Order is important here!!  Note that the method is robust in the face of panes not found, but a warning is printed in the transcript in each such case\\\\\\\"\\\\n\\\\n\\\\taList _ OrderedCollection new.\\\\n\\\\tgetSelectors do:\\\\n\\\\t\\\\t[:sel | aPane _ self subViewSatisfying:\\\\n\\\\t\\\\t\\\\t\\\\t[:pane | (pane isKindOf: PluggableListView) and: [pane getListSelector == sel]].\\\\n\\\\t\\\\t\\\\taPane\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[aList add: aPane]\\\\n\\\\t\\\\t\\\\t\\\\tifNil:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[Transcript cr; show: 'Warning: view ', sel, ' not found.']].\\\\n\\\\tupdatablePanes _ aList asArray! !\\\\n\\\\n!StandardSystemView methodsFor: 'updating' stamp: 'sw 10/29/1999 21:20'!\\\\nupdatablePanes\\\\n\\\\t\\\\\\\"Answer the list of panes, in order, which might be sent the #verifyContents message upon window activation or expansion.\\\\\\\"\\\\n\\\\t^ updatablePanes ifNil: [updatablePanes _ #()]! !\\\\n\\\\n!StandardSystemView methodsFor: 'updating' stamp: 'sw 1/11/2000 15:30'!\\\\nupdate: aSymbol\\\\n\\\\taSymbol = #relabel\\\\n\\\\t\\\\tifTrue: [^ self setLabelTo: model labelString].\\\\n\\\\t^ super update: aSymbol! !\\\\n\\\\n\\\\n!StandardSystemView methodsFor: 'private'!\\\\nsetTransformation: aTransformation \\\\n\\\\t\\\\\\\"Override to support label size changes \\\\\\\"\\\\n\\\\tsuper setTransformation: aTransformation.\\\\n\\\\tself label: self label! !\\\\n\\\\n!StandardSystemView methodsFor: 'private' stamp: 'di 10/21/1998 16:12'!\\\\nsubviewWithLongestSide: sideBlock near: aPoint \\\\n\\\\t| theSub theSide theLen box |\\\\n\\\\ttheLen _ 0.\\\\n\\\\tsubViews do:\\\\n\\\\t\\\\t[:sub | box _ sub insetDisplayBox.\\\\n\\\\t\\\\tbox forPoint: aPoint closestSideDistLen:\\\\n\\\\t\\\\t\\\\t[:side :dist :len |\\\\n\\\\t\\\\t\\\\t(dist <= 5 and: [len > theLen]) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[theSub _ sub.\\\\n\\\\t\\\\t\\\\t\\\\ttheSide _ side.\\\\n\\\\t\\\\t\\\\t\\\\ttheLen _ len]]].\\\\n\\\\tsideBlock value: theSide.\\\\n\\\\t^ theSub! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStandardSystemView class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StandardSystemView class methodsFor: 'class initialization'!\\\\ncachingBits\\\\n\\\\t^ CacheBits! !\\\\n\\\\n!StandardSystemView class methodsFor: 'class initialization'!\\\\ndoCacheBits\\\\n\\\\t\\\\\\\"StandardSystemView doCacheBits - Enable fast window repaint feature\\\\\\\"\\\\n\\\\tCacheBits _ true.\\\\n\\\\tScheduledControllers unCacheWindows.\\\\n\\\\tScheduledControllers restore! !\\\\n\\\\n!StandardSystemView class methodsFor: 'class initialization'!\\\\ndontCacheBits\\\\n\\\\t\\\\\\\"StandardSystemView dontCacheBits - Disable fast window repaint feature.\\\\n\\\\tReturn true iff bits were cached, ie if space was been recovered\\\\\\\"\\\\n\\\\tCacheBits ifFalse: [^ false].\\\\n\\\\tCacheBits _ false.\\\\n\\\\tScheduledControllers unCacheWindows.\\\\n\\\\t^ true! !\\\\n\\\\n!StandardSystemView class methodsFor: 'class initialization' stamp: 'sw 12/6/1999 23:42'!\\\\ninitialize\\\\t\\\\t\\\\\\\"StandardSystemView initialize\\\\\\\"\\\\n\\\\tself doCacheBits.\\\\n\\\\tself setLabelStyle! !\\\\n\\\\n!StandardSystemView class methodsFor: 'class initialization' stamp: 'nk 9/1/2004 10:26'!\\\\nsetLabelStyle\\\\n\\\\t| aFont |\\\\n\\\\t\\\\\\\"StandardSystemView setLabelStyle\\\\\\\"\\\\n\\\\taFont _ Preferences windowTitleFont.\\\\n\\\\tLabelStyle _ TextStyle fontArray: { aFont }.\\\\n\\\\tLabelStyle gridForFont: 1 withLead: 0! !\\\\nObject subclass: #StandardToolSet\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Tools-Base'!\\\\n!StandardToolSet commentStamp: '<historical>' prior: 0!\\\\nMain comment stating the purpose of this class and relevant relationship to other classes.\\\\n\\\\nPossible useful expressions for doIt or printIt.\\\\n\\\\nStructure:\\\\n instVar1\\\\t\\\\ttype -- comment about the purpose of instVar1\\\\n instVar2\\\\t\\\\ttype -- comment about the purpose of instVar2\\\\n\\\\nAny further useful comments about the general approach of this implementation.!\\\\n\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStandardToolSet class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StandardToolSet class methodsFor: 'browsing' stamp: 'ar 7/16/2005 15:20'!\\\\nbrowseChangeSetsWithClass: aClass selector: aSelector\\\\n\\\\t\\\\\\\"Browse all the change sets with the given class/selector\\\\\\\"\\\\n\\\\t^ChangeSorter browseChangeSetsWithClass: aClass selector: aSelector! !\\\\n\\\\n!StandardToolSet class methodsFor: 'browsing' stamp: 'md 3/10/2006 21:42'!\\\\nbrowseHierarchy: aClass selector: aSelector\\\\n\\\\t\\\\\\\"Open a browser\\\\\\\"\\\\n\\\\t| newBrowser |\\\\n\\\\t(aClass == nil)  ifTrue: [^ self].\\\\n\\\\t(newBrowser := SystemBrowser default new) setClass: aClass selector: aSelector.\\\\n\\\\tnewBrowser spawnHierarchy.! !\\\\n\\\\n!StandardToolSet class methodsFor: 'browsing' stamp: 'ar 7/17/2005 11:12'!\\\\nbrowseMessageNames: aString\\\\n\\\\t^(MessageNames methodBrowserSearchingFor: aString) openInWorld! !\\\\n\\\\n!StandardToolSet class methodsFor: 'browsing' stamp: 'ar 7/17/2005 11:13'!\\\\nbrowseMessageSet: messageList name: title autoSelect: autoSelectString\\\\n\\\\t\\\\\\\"Open a message set browser\\\\\\\"\\\\n\\\\t^MessageSet\\\\n\\\\t\\\\topenMessageList: messageList \\\\n\\\\t\\\\tname: title \\\\n\\\\t\\\\tautoSelect: autoSelectString! !\\\\n\\\\n!StandardToolSet class methodsFor: 'browsing' stamp: 'ar 7/17/2005 11:35'!\\\\nbrowseVersionsOf: aClass selector: aSelector\\\\n\\\\t\\\\\\\"Open a browser\\\\\\\"\\\\n\\\\tVersionsBrowser\\\\n\\\\t\\\\tbrowseVersionsOf: (aClass compiledMethodAt: aSelector)\\\\n\\\\t\\\\tclass: aClass theNonMetaClass\\\\n\\\\t\\\\tmeta: aClass isMeta\\\\n\\\\t\\\\tcategory: (aClass organization categoryOfElement: aSelector)\\\\n\\\\t\\\\tselector: aSelector! !\\\\n\\\\n!StandardToolSet class methodsFor: 'browsing' stamp: 'md 3/10/2006 21:43'!\\\\nbrowse: aClass selector: aSelector\\\\n\\\\t\\\\\\\"Open a browser\\\\\\\"\\\\n\\\\t^SystemBrowser default fullOnClass: aClass selector: aSelector! !\\\\n\\\\n!StandardToolSet class methodsFor: 'browsing' stamp: 'ar 7/15/2005 18:58'!\\\\nopenChangedMessageSet: aChangeSet\\\\n\\\\t\\\\\\\"Open a ChangedMessageSet for aChangeSet\\\\\\\"\\\\n\\\\tChangedMessageSet openFor: aChangeSet! !\\\\n\\\\n!StandardToolSet class methodsFor: 'browsing' stamp: 'ar 7/15/2005 18:58'!\\\\nopenClassListBrowser: anArray title: aString\\\\n\\\\t\\\\\\\"Open a class list browser\\\\\\\"\\\\n\\\\t^ClassListBrowser new initForClassesNamed: anArray title: aString\\\\n! !\\\\n\\\\n\\\\n!StandardToolSet class methodsFor: 'class initialization' stamp: 'ar 7/17/2005 01:04'!\\\\ninitialize\\\\n\\\\tToolSet register: self.\\\\n\\\\tPreferences installMissingWindowColors.! !\\\\n\\\\n!StandardToolSet class methodsFor: 'class initialization' stamp: 'ar 7/16/2005 16:18'!\\\\nunload\\\\n\\\\tToolSet unregister: self.! !\\\\n\\\\n\\\\n!StandardToolSet class methodsFor: 'debugging' stamp: 'ar 7/15/2005 19:15'!\\\\ndebugContext: aContext label: aString contents: contents\\\\n\\\\t\\\\\\\"Open a debugger on the given process and context.\\\\\\\"\\\\n\\\\t^Debugger openContext: aContext label: aString contents: contents! !\\\\n\\\\n!StandardToolSet class methodsFor: 'debugging' stamp: 'ar 7/17/2005 11:16'!\\\\ndebugError: anError\\\\n\\\\t\\\\\\\"Handle an otherwise unhandled error\\\\\\\"\\\\n\\\\t^Processor activeProcess\\\\n\\\\t\\\\tdebug: anError signalerContext\\\\n\\\\t\\\\ttitle: anError description! !\\\\n\\\\n!StandardToolSet class methodsFor: 'debugging' stamp: 'ar 9/27/2005 19:18'!\\\\ndebugSyntaxError: anError\\\\n\\\\t\\\\\\\"Handle a syntax error\\\\\\\"\\\\n\\\\t| notifier |\\\\n\\\\tnotifier :=  SyntaxError new\\\\n\\\\t\\\\tsetClass: anError errorClass\\\\n\\\\t\\\\tcode: anError errorCode\\\\n\\\\t\\\\tdebugger: (Debugger context: anError signalerContext)\\\\n\\\\t\\\\tdoitFlag: anError doitFlag.\\\\n\\\\tnotifier category: anError category.\\\\n\\\\tSyntaxError open: notifier.! !\\\\n\\\\n!StandardToolSet class methodsFor: 'debugging' stamp: 'ar 7/15/2005 18:57'!\\\\ndebug: aProcess context: aContext label: aString contents: contents fullView: aBool\\\\n\\\\t\\\\\\\"Open a debugger on the given process and context.\\\\\\\"\\\\n\\\\t^Debugger openOn: aProcess context: aContext label: aString contents: contents fullView: aBool! !\\\\n\\\\n!StandardToolSet class methodsFor: 'debugging' stamp: 'ar 7/17/2005 11:16'!\\\\ninterrupt: aProcess label: aString\\\\n\\\\t\\\\\\\"Open a debugger on the given process and context.\\\\\\\"\\\\n\\\\tDebugger\\\\n\\\\t\\\\topenInterrupt: aString\\\\n\\\\t\\\\tonProcess: aProcess! !\\\\n\\\\n\\\\n!StandardToolSet class methodsFor: 'inspecting' stamp: 'ar 7/15/2005 18:57'!\\\\nbasicInspect: anObject\\\\n\\\\t\\\\\\\"Open an inspector on the given object. The tool set must know which inspector type to use for which object - the object cannot possibly know what kind of inspectors the toolset provides.\\\\\\\"\\\\n\\\\t^BasicInspector openOn: anObject! !\\\\n\\\\n!StandardToolSet class methodsFor: 'inspecting' stamp: 'ar 7/15/2005 19:34'!\\\\nexplore: anObject\\\\n\\\\t\\\\\\\"Open an explorer on the given object.\\\\\\\"\\\\n\\\\t^ObjectExplorer new openExplorerFor: anObject! !\\\\n\\\\n!StandardToolSet class methodsFor: 'inspecting' stamp: 'ar 7/15/2005 19:54'!\\\\ninspectorClassOf: anObject\\\\n\\\\t\\\\\\\"Answer the inspector class for the given object. The tool set must know which inspector type to use for which object - the object cannot possibly know what kind of inspectors the toolset provides.\\\\\\\"\\\\n\\\\t| map |\\\\n\\\\tmap := Dictionary new.\\\\n\\\\t#(\\\\n\\\\t\\\\t(CompiledMethod\\\\t\\\\tCompiledMethodInspector)\\\\n\\\\t\\\\t(CompositeEvent\\\\t\\\\tOrderedCollectionInspector)\\\\n\\\\t\\\\t(Dictionary\\\\t\\\\t\\\\tDictionaryInspector)\\\\n\\\\t\\\\t(ExternalStructure\\\\tExternalStructureInspector)\\\\n\\\\t\\\\t(FloatArray\\\\t\\\\t\\\\tOrderedCollectionInspector)\\\\n\\\\t\\\\t(OrderedCollection\\\\tOrderedCollectionInspector)\\\\n\\\\t\\\\t(Set\\\\t\\\\t\\\\t\\\\t\\\\tSetInspector)\\\\n\\\\t\\\\t(WeakSet\\\\t\\\\t\\\\tWeakSetInspector)\\\\n\\\\t) do:[:spec|\\\\n\\\\t\\\\tmap at: spec first put: spec last.\\\\n\\\\t].\\\\n\\\\tanObject class withAllSuperclassesDo:[:cls|\\\\n\\\\t\\\\tmap at: cls name ifPresent:[:inspectorName| ^Smalltalk classNamed: inspectorName].\\\\n\\\\t].\\\\n\\\\t^Inspector! !\\\\n\\\\n!StandardToolSet class methodsFor: 'inspecting' stamp: 'ar 7/15/2005 18:58'!\\\\ninspect: anObject\\\\n\\\\t\\\\\\\"Open an inspector on the given object. The tool set must know which inspector type to use for which object - the object cannot possibly know what kind of inspectors the toolset provides.\\\\\\\"\\\\n\\\\t^(self inspectorClassOf: anObject) openOn: anObject! !\\\\n\\\\n!StandardToolSet class methodsFor: 'inspecting' stamp: 'ar 7/15/2005 19:57'!\\\\ninspect: anObject label: aString\\\\n\\\\t\\\\\\\"Open an inspector on the given object. The tool set must know which inspector type to use for which object - the object cannot possibly know what kind of inspectors the toolset provides.\\\\\\\"\\\\n\\\\t^(self inspectorClassOf: anObject) openOn: anObject withEvalPane: true withLabel: aString! !\\\\n\\\\n\\\\n!StandardToolSet class methodsFor: 'menu' stamp: 'ar 7/17/2005 13:19'!\\\\nmenuItems\\\\n\\\\t\\\\\\\"Answer the menu items available for this tool set\\\\\\\"\\\\n\\\\t^#(\\\\n\\\\t\\\\t('class browser' \\\\t\\\\t\\\\t#openClassBrowser)\\\\n\\\\t\\\\t('workspace'\\\\t\\\\t\\\\t\\\\t#openWorkspace)\\\\n\\\\t\\\\t('file list'\\\\t\\\\t\\\\t\\\\t\\\\t#openFileList)\\\\n\\\\t\\\\t('package pane browser' \\\\t#openPackagePaneBrowser)\\\\n\\\\t\\\\t('process browser' \\\\t\\\\t\\\\t#openProcessBrowser)\\\\n\\\\t\\\\t-\\\\n\\\\t\\\\t('method finder'\\\\t\\\\t\\\\t\\\\t#openSelectorBrowser)\\\\n\\\\t\\\\t('message names'\\\\t\\\\t\\\\t#openMessageNames)\\\\n\\\\t\\\\t-\\\\n\\\\t\\\\t('simple change sorter'\\\\t\\\\t#openChangeSorter)\\\\n\\\\t\\\\t('dual change sorter'\\\\t\\\\t#openDualChangeSorter)\\\\n\\\\t)\\\\n! !\\\\n\\\\n!StandardToolSet class methodsFor: 'menu' stamp: 'ar 7/17/2005 13:05'!\\\\nopenChangeSorter\\\\n\\\\tChangeSorter new morphicWindow openInWorld! !\\\\n\\\\n!StandardToolSet class methodsFor: 'menu' stamp: 'md 3/10/2006 21:47'!\\\\nopenClassBrowser\\\\n\\\\tSystemBrowser default open! !\\\\n\\\\n!StandardToolSet class methodsFor: 'menu' stamp: 'ar 7/17/2005 13:05'!\\\\nopenDualChangeSorter\\\\n\\\\tDualChangeSorter new morphicWindow openInWorld! !\\\\n\\\\n!StandardToolSet class methodsFor: 'menu' stamp: 'md 2/24/2006 15:21'!\\\\nopenFileList\\\\n\\\\tFileList2 prototypicalToolWindow openInWorld.! !\\\\n\\\\n!StandardToolSet class methodsFor: 'menu' stamp: 'ar 7/17/2005 12:59'!\\\\nopenMessageNames\\\\n\\\\t\\\\\\\"Bring a MessageNames tool to the front\\\\\\\"\\\\n\\\\tMessageNames openMessageNames! !\\\\n\\\\n!StandardToolSet class methodsFor: 'menu' stamp: 'ar 7/17/2005 13:04'!\\\\nopenPackagePaneBrowser\\\\n\\\\tPackagePaneBrowser openBrowser.! !\\\\n\\\\n!StandardToolSet class methodsFor: 'menu' stamp: 'ar 7/17/2005 12:59'!\\\\nopenProcessBrowser\\\\n\\\\tProcessBrowser open! !\\\\n\\\\n!StandardToolSet class methodsFor: 'menu' stamp: 'ar 7/17/2005 13:00'!\\\\nopenSelectorBrowser\\\\n\\\\tSelectorBrowser new morphicWindow openInWorld! !\\\\n\\\\n!StandardToolSet class methodsFor: 'menu' stamp: 'md 1/18/2006 19:08'!\\\\nopenWorkspace\\\\n\\\\tWorkspace open! !\\\\nViewer subclass: #StandardViewer\\\\n\\\\tinstanceVariableNames: 'firstPanel'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'EToys-Scripting'!\\\\n!StandardViewer commentStamp: 'sw 8/17/2002 02:04' prior: 0!\\\\nA structure that allows you to view state and behavior of an object; it consists of a header and then any number of CategoryViewers.!\\\\n\\\\n\\\\n!StandardViewer methodsFor: 'categories' stamp: 'sw 12/28/1998 15:22'!\\\\naddCategoryViewer\\\\t\\\\n\\\\tself addCategoryViewerFor: self likelyCategoryToShow! !\\\\n\\\\n!StandardViewer methodsFor: 'categories' stamp: 'sw 8/23/2002 14:50'!\\\\naddCategoryViewerFor: categoryInfo\\\\n\\\\t\\\\\\\"Add a category viewer for the given category info\\\\\\\"\\\\n\\\\n\\\\tself addCategoryViewerFor: categoryInfo atEnd: true! !\\\\n\\\\n!StandardViewer methodsFor: 'categories' stamp: 'sw 8/23/2002 14:56'!\\\\naddCategoryViewerFor: categoryInfo atEnd: atEnd\\\\n\\\\t\\\\\\\"Add a category viewer for the given category info.  If atEnd is true, add it at the end, else add it just after the header morph\\\\\\\"\\\\n\\\\n\\\\t| aViewer |\\\\n\\\\taViewer _ self categoryViewerFor: categoryInfo.\\\\n\\\\tatEnd\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self addMorphBack: aViewer]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self addMorph: aViewer after: submorphs first].\\\\n\\\\taViewer establishContents.\\\\n\\\\tself world ifNotNil: [self world startSteppingSubmorphsOf: aViewer].\\\\n\\\\tself fitFlap! !\\\\n\\\\n!StandardViewer methodsFor: 'categories' stamp: 'sw 8/23/2002 14:18'!\\\\naddSearchPane\\\\n\\\\t\\\\\\\"Add a search pane\\\\\\\"\\\\n\\\\n\\\\tself addCategoryViewerFor: #(search '') atEnd: false! !\\\\n\\\\n!StandardViewer methodsFor: 'categories' stamp: 'sw 11/18/1999 16:00'!\\\\ncategoriesCurrentlyShowing\\\\n\\\\t^ self categoryMorphs collect: [:m | m currentCategory]! !\\\\n\\\\n!StandardViewer methodsFor: 'categories' stamp: 'sw 10/30/1998 18:38'!\\\\ncategoryMorphs\\\\n\\\\t^ self submorphsSatisfying: [:m | m isKindOf: CategoryViewer]! !\\\\n\\\\n!StandardViewer methodsFor: 'categories' stamp: 'gm 2/22/2003 13:01'!\\\\ncategoryViewerFor: categoryInfo \\\\n\\\\t\\\\\\\"Answer a category viewer for the given category info\\\\\\\"\\\\n\\\\n\\\\t| aViewer |\\\\n\\\\taViewer := ((categoryInfo isCollection) \\\\n\\\\t\\\\t\\\\t\\\\tand: [categoryInfo first == #search]) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [CategoryViewer new]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [SearchingViewer new].\\\\n\\\\taViewer initializeFor: scriptedPlayer categoryChoice: categoryInfo.\\\\n\\\\t^aViewer! !\\\\n\\\\n!StandardViewer methodsFor: 'categories' stamp: 'sw 8/3/2001 18:22'!\\\\nchooseLimitClass\\\\n\\\\t\\\\\\\"Put up a menu allowing the user to choose the most generic class to show\\\\\\\"\\\\n\\\\n\\\\t| aMenu limitClass |\\\\n\\\\taMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\tlimitClass _ self limitClass.\\\\n\\\\tscriptedPlayer class withAllSuperclasses do:\\\\n\\\\t\\\\t[:aClass | \\\\n\\\\t\\\\t\\\\taClass == ProtoObject\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[aMenu addLine].\\\\n\\\\t\\\\t\\\\taMenu add: aClass name selector: #setLimitClass: argument: aClass.\\\\n\\\\t\\\\t\\\\taClass == limitClass ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[aMenu lastItem color: Color red].\\\\n\\\\t\\\\t\\\\taClass == limitClass ifTrue: [aMenu addLine]].\\\\n\\\\taMenu addTitle: 'Show only methods\\\\nimplemented at or above...'.  \\\\\\\"heh heh -- somebody please find nice wording here!!\\\\\\\"\\\\n\\\\taMenu popUpInWorld: self currentWorld! !\\\\n\\\\n!StandardViewer methodsFor: 'categories' stamp: 'ka 11/29/2005 20:53'!\\\\nlikelyCategoryToShow\\\\n\\\\t\\\\\\\"Choose a category to show based on what's already showing and on some predefined heuristics\\\\\\\"\\\\n\\\\n\\\\t| possible all aCat currVocab |\\\\n\\\\tall := (scriptedPlayer categoriesForViewer: self) asOrderedCollection.\\\\n\\\\tpossible _ all copy.\\\\n\\\\n\\\\tcurrVocab := self currentVocabulary.\\\\n\\\\tself categoryMorphs do: \\\\n\\\\t\\\\t\\\\t[:m | \\\\n\\\\t\\\\t\\\\taCat := currVocab categoryWhoseTranslatedWordingIs: m currentCategory.\\\\n\\\\t\\\\t\\\\taCat ifNotNil: [possible remove: aCat wording ifAbsent: []]].\\\\n\\\\n\\\\t(possible includes: ScriptingSystem nameForInstanceVariablesCategory translated) ifTrue:\\\\n\\\\t\\\\t[^ ScriptingSystem nameForInstanceVariablesCategory].\\\\n\\\\n\\\\t(currVocab isEToyVocabulary) \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[(possible includes: ScriptingSystem nameForScriptsCategory translated) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [^ ScriptingSystem nameForScriptsCategory]].\\\\n\\\\t{'kedama' translated. #basic translated} \\\\n\\\\t\\\\tdo: [:preferred | (possible includes: preferred) ifTrue: [^ preferred]].\\\\n\\\\t((scriptedPlayer isPlayerLike) \\\\n\\\\t\\\\tand: [scriptedPlayer hasOnlySketchCostumes]) \\\\n\\\\t\\\\t\\\\tifTrue: [(possible includes: #tests translated) ifTrue: [^#tests translated]].\\\\n\\\\t{#'color & border' translated. #tests translated. #color translated. #flagging translated. #comparing translated.} \\\\n\\\\t\\\\tdo: [:preferred | (possible includes: preferred) ifTrue: [^ preferred]].\\\\n\\\\t^ possible isEmpty ifFalse: [possible first] ifTrue: [all first]! !\\\\n\\\\n!StandardViewer methodsFor: 'categories' stamp: 'sw 8/3/2001 18:17'!\\\\nlimitClass\\\\n\\\\t\\\\\\\"Answer the limit class to use in this viewer\\\\\\\"\\\\n\\\\n\\\\t| aClass |\\\\n\\\\t(aClass _ self valueOfProperty: #limitClass)  ifNotNil:\\\\n\\\\t\\\\t[^ aClass].\\\\n\\\\n\\\\taClass _ scriptedPlayer defaultLimitClassForVocabulary: self currentVocabulary.\\\\n\\\\tself setProperty: #limitClass toValue: aClass.\\\\n\\\\t^ aClass! !\\\\n\\\\n!StandardViewer methodsFor: 'categories' stamp: 'sw 8/3/2001 18:31'!\\\\nlimitClass: aClass\\\\n\\\\t\\\\\\\"Set aClass as the limit class for this viewer, without side effects\\\\\\\"\\\\n\\\\n\\\\tself setProperty: #limitClass toValue: aClass\\\\n! !\\\\n\\\\n!StandardViewer methodsFor: 'categories' stamp: 'sw 12/11/2000 10:51'!\\\\nouterViewer\\\\n\\\\t\\\\\\\"Answer the StandardViewer or equivalent that contains this object\\\\\\\"\\\\n\\\\n\\\\t^ self! !\\\\n\\\\n!StandardViewer methodsFor: 'categories' stamp: 'di 2/19/2001 10:39'!\\\\nrecreateCategories\\\\n\\\\t\\\\\\\"To change from old to new tiles\\\\\\\"\\\\n\\\\t| cats |\\\\n\\\\tcats _ self categoriesCurrentlyShowing.\\\\n\\\\tself removeAllMorphsIn: self categoryMorphs.\\\\n\\\\tcats do: [:cat | self addCategoryViewerFor: cat]! !\\\\n\\\\n!StandardViewer methodsFor: 'categories' stamp: 'yo 4/4/2005 14:42'!\\\\nsearchingViewerMorphs\\\\n\\\\t^ self submorphsSatisfying: [:m | m isKindOf: SearchingViewer].! !\\\\n\\\\n!StandardViewer methodsFor: 'categories' stamp: 'sw 8/3/2001 18:31'!\\\\nsetLimitClass: aClass\\\\n\\\\t\\\\\\\"Set aClass as the limit class for this viewer\\\\\\\"\\\\n\\\\n\\\\tself limitClass: aClass.\\\\n\\\\tself relaunchViewer\\\\n! !\\\\n\\\\n!StandardViewer methodsFor: 'categories' stamp: 'sw 5/29/2001 22:43'!\\\\nsymbolsOfCategoriesCurrentlyShowing\\\\n\\\\t\\\\\\\"Answer the category symbols of my categoryMorphs\\\\\\\"\\\\n\\\\n\\\\t^ self categoryMorphs collect: [:m | m chosenCategorySymbol]! !\\\\n\\\\n\\\\n!StandardViewer methodsFor: 'classification' stamp: 'ar 6/30/2001 13:13'!\\\\nisStandardViewer\\\\n\\\\t^true! !\\\\n\\\\n\\\\n!StandardViewer methodsFor: 'debug and other' stamp: 'sw 6/20/2001 12:47'!\\\\nviewMorphDirectly\\\\n\\\\t\\\\\\\"Launch a new viewer to replace the receiver.\\\\\\\"\\\\n\\\\n\\\\tself delete.\\\\n\\\\tself presenter viewObjectDirectly: scriptedPlayer costume renderedMorph! !\\\\n\\\\n\\\\n!StandardViewer methodsFor: 'initialization' stamp: 'nk 9/2/2004 11:30'!\\\\naddHeaderMorphWithBarHeight: anInteger includeDismissButton: aBoolean\\\\n\\\\t\\\\\\\"Add the header morph to the receiver, using anInteger as a guide for its height, and if aBoolean is true, include a dismiss buton for it\\\\\\\"\\\\n\\\\n\\\\t| header aFont aButton aTextMorph nail wrpr costs headWrapper |\\\\n\\\\theader _ AlignmentMorph newRow color: self color muchLighter; wrapCentering: #center; cellPositioning: #leftCenter.\\\\n\\\\taFont _ Preferences standardButtonFont.\\\\n\\\\taBoolean ifTrue:\\\\n\\\\t\\\\t[aButton _ self tanOButton.\\\\n\\\\t\\\\theader addMorph: aButton.\\\\n\\\\t\\\\taButton target: self;\\\\n\\\\t\\\\t\\\\t\\\\tactionSelector: #dismiss;\\\\n\\\\t\\\\t\\\\t\\\\tsetBalloonText: 'remove this entire Viewer from the screen\\\\ndon''t worry -- nothing will be lost!!.' translated.\\\\n\\\\t\\\\theader addTransparentSpacerOfSize: 4@1].\\\\n\\\\n\\\\taButton _ IconicButton new borderWidth: 0;\\\\n\\\\t\\\\t\\\\tlabelGraphic: (ScriptingSystem formAtKey: #AddCategoryViewer); color: Color transparent; \\\\n\\\\t\\\\t\\\\tactWhen: #buttonDown;\\\\n\\\\t\\\\t\\\\ttarget: self;\\\\n\\\\t\\\\t\\\\tactionSelector: #addCategoryViewer;\\\\n\\\\t\\\\t\\\\tsetBalloonText: 'click here to add\\\\nanother category pane' translated;\\\\n\\\\t\\\\t\\\\tshedSelvedge.\\\\n\\\\theader addMorphBack: aButton.\\\\n\\\\theader addTransparentSpacerOfSize: 4@1.\\\\n\\\\n\\\\tcosts _ scriptedPlayer costumes.\\\\n\\\\tcosts ifNotNil:\\\\n\\\\t[(costs size > 1 or: [costs size = 1 and: [costs first ~~ scriptedPlayer costume]]) ifTrue:\\\\n\\\\t\\\\t[header addUpDownArrowsFor: self.\\\\n\\\\t\\\\t(wrpr _ header submorphs last) submorphs second setBalloonText: 'switch to previous costume' translated.\\\\t\\\\n\\\\t\\\\twrpr submorphs first  setBalloonText: 'switch to next costume' translated]].\\\\t\\\\n\\\\n\\\\tnail _ (self hasProperty: #noInteriorThumbnail)\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[ThumbnailMorph new objectToView: scriptedPlayer viewSelector: #costume]\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[ImageMorph new image: Cursor menu].\\\\n\\\\tnail on: #mouseDown send: #offerViewerMenuForEvt:morph: to: scriptedPlayer.\\\\n\\\\theader addMorphBack: nail.\\\\n\\\\tnail setBalloonText: 'click here to get a menu\\\\nthat will allow you to\\\\nadd a variable,\\\\ntear off a tile, etc..' translated.\\\\n\\\\t(self hasProperty: #noInteriorThumbnail)\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[nail borderWidth: 3; borderColor: #raised].\\\\n\\\\n\\\\theader addTransparentSpacerOfSize: 5@5.\\\\n\\\\n\\\\\\\"\\\\taButton _ SimpleButtonMorph new target: self; actionSelector: #newEmptyScript; label: 'S' translated font: (aFont _ StrikeFont familyName: #ComicBold size: 16);  color: Color transparent; borderWidth: 0; actWhen: #buttonDown.\\\\n\\\\taButton setBalloonText: 'drag from here to\\\\ncreate a new script\\\\nfor this object' translated.\\\\t\\\\n\\\\theader addMorphBack: aButton.\\\\n\\\\n\\\\theader addTransparentSpacerOfSize: 8@5.\\\\\\\"\\\\n\\\\t\\\\n\\\\taButton _ SimpleButtonMorph new target: scriptedPlayer; actionSelector: #addInstanceVariable; label: 'v' translated font: (aFont emphasized: 1);  color: Color transparent; borderWidth: 1; actWhen: #buttonUp.\\\\n\\\\t\\\\\\\"aButton firstSubmorph color: Color gray.\\\\\\\"\\\\n\\\\taButton setBalloonText: 'click here to add a variable\\\\nto this object.' translated.\\\\n\\\\theader addMorphBack: aButton.\\\\n\\\\n\\\\theader addTransparentSpacerOfSize: 5@5.\\\\n\\\\tself viewsMorph ifTrue: [scriptedPlayer costume assureExternalName].\\\\n\\\\taTextMorph _ UpdatingStringMorph new\\\\n\\\\t\\\\tuseStringFormat;\\\\n\\\\t\\\\ttarget:  scriptedPlayer;\\\\n\\\\t\\\\tgetSelector: #nameForViewer;\\\\n\\\\t\\\\tsetNameTo: 'name';\\\\n\\\\t\\\\tfont: ScriptingSystem fontForNameEditingInScriptor.\\\\n\\\\tself viewsMorph ifTrue:\\\\n\\\\t\\\\t[aTextMorph putSelector: #setName:.\\\\n\\\\t\\\\taTextMorph setProperty: #okToTextEdit toValue: true].\\\\n\\\\taTextMorph step.\\\\n\\\\theader  addMorphBack: aTextMorph.\\\\n\\\\taTextMorph setBalloonText: 'Click here to edit the player''s name.' translated.\\\\t\\\\n\\\\n\\\\theader beSticky.\\\\n\\\\tanInteger > 0\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[headWrapper _ AlignmentMorph newColumn color: self color.\\\\n\\\\t\\\\t\\\\theadWrapper addTransparentSpacerOfSize: (0 @ anInteger).\\\\n\\\\t\\\\t\\\\theadWrapper addMorphBack: header.\\\\n\\\\t\\\\t\\\\tself addMorph: headWrapper]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self addMorph: header]! !\\\\n\\\\n!StandardViewer methodsFor: 'initialization' stamp: 'gm 2/22/2003 13:44'!\\\\naffordsUniclass\\\\n\\\\t\\\\\\\"Answer true iff the receiver operates on behalf of an object that is, or could become, a member of a Uniclass\\\\\\\"\\\\n\\\\n\\\\t| viewee |\\\\n\\\\t^(viewee := self objectViewed) belongsToUniClass or: \\\\n\\\\t\\\\t\\\\t[((viewee isInteger) not and: [viewee isBehavior not]) \\\\n\\\\t\\\\t\\\\t\\\\tand: [self userLevel > 0]]! !\\\\n\\\\n!StandardViewer methodsFor: 'initialization' stamp: 'ar 6/30/2001 13:23'!\\\\nfitFlap\\\\n\\\\t(owner notNil and:[owner isFlap]) ifTrue:[\\\\n\\\\t\\\\towner width < self fullBounds width ifTrue:[\\\\n\\\\t\\\\t\\\\towner assureFlapWidth: self fullBounds width + 25.\\\\n\\\\t\\\\t].\\\\n\\\\t].! !\\\\n\\\\n!StandardViewer methodsFor: 'initialization' stamp: 'sw 12/23/1998 23:26'!\\\\ninitialHeightToAllow\\\\n\\\\t^ 300! !\\\\n\\\\n!StandardViewer methodsFor: 'initialization' stamp: 'sw 6/25/1999 23:04'!\\\\ninitializeFor: aPlayer barHeight: anInteger\\\\n\\\\t^ self initializeFor: aPlayer barHeight: anInteger includeDismissButton: true! !\\\\n\\\\n!StandardViewer methodsFor: 'initialization' stamp: 'sw 8/4/2000 13:02'!\\\\ninitializeFor: aPlayer barHeight: anInteger includeDismissButton: aBoolean\\\\n\\\\tself initializeFor: aPlayer barHeight: anInteger includeDismissButton: aBoolean showCategories: nil! !\\\\n\\\\n!StandardViewer methodsFor: 'initialization' stamp: 'yo 8/18/2005 13:43'!\\\\ninitializeFor: aPlayer barHeight: anInteger includeDismissButton: aBoolean showCategories: categoryInfo\\\\n\\\\t\\\\\\\"Initialize the receiver to be a look inside the given Player.  The categoryInfo, if present, describes which categories should be present in it, in which order\\\\\\\"\\\\n\\\\n\\\\tscriptedPlayer _ aPlayer.\\\\n\\\\tself listDirection: #topToBottom;\\\\n\\\\t\\\\thResizing: #shrinkWrap;\\\\n\\\\t\\\\tvResizing: #shrinkWrap;\\\\n\\\\t\\\\tborderWidth: 1.\\\\n\\\\tself color: self standardViewerColor.\\\\n\\\\tself addHeaderMorphWithBarHeight: anInteger includeDismissButton: aBoolean.\\\\n\\\\n\\\\tcategoryInfo isEmptyOrNil\\\\n\\\\t\\\\tifFalse:  \\\\\\\"Reincarnating an pre-existing list\\\\\\\"\\\\n\\\\t\\\\t\\\\t[categoryInfo do:\\\\n\\\\t\\\\t\\\\t\\\\t[:aCat | self addCategoryViewerFor: aCat]]\\\\n\\\\t\\\\tifTrue:  \\\\\\\"starting fresh\\\\\\\"\\\\n\\\\t\\\\t\\\\t[self addSearchPane. \\\\n\\\\t\\\\t\\\\tself addCategoryViewer.\\\\n\\\\t\\\\t\\\\tself addCategoryViewer.\\\\n\\\\t\\\\t\\\\t(scriptedPlayer costume isMemberOf: KedamaMorph) ifTrue: [self addCategoryViewer].\\\\n\\\\t\\\\t].! !\\\\n\\\\n!StandardViewer methodsFor: 'initialization' stamp: 'sw 6/4/2001 18:06'!\\\\nrawVocabulary: aVocabulary\\\\n\\\\t\\\\\\\"Mark the receiver as having aVocabulary as its vocabulary\\\\\\\"\\\\n\\\\n\\\\tself setProperty: #currentVocabularySymbol toValue: aVocabulary vocabularyName! !\\\\n\\\\n!StandardViewer methodsFor: 'initialization' stamp: 'nk 8/29/2004 17:18'!\\\\nswitchToVocabulary: aVocabulary\\\\n\\\\t\\\\\\\"Make the receiver show categories and methods as dictated by aVocabulary.  If this constitutes a switch, then wipe out existing category viewers, which may be showing the wrong thing.\\\\\\\"\\\\n\\\\n\\\\tself adoptVocabulary: aVocabulary.  \\\\\\\"for benefit of submorphs\\\\\\\"\\\\n\\\\tself setProperty: #currentVocabularySymbol toValue: aVocabulary vocabularyName.\\\\n\\\\t((scriptedPlayer isPlayerLike) and: [self isUniversalTiles not]) ifTrue:\\\\n\\\\t\\\\t[scriptedPlayer allScriptEditors do:\\\\n\\\\t\\\\t\\\\t[:aScriptEditor |\\\\n\\\\t\\\\t\\\\t\\\\taScriptEditor adoptVocabulary: aVocabulary]]! !\\\\n\\\\n!StandardViewer methodsFor: 'initialization' stamp: 'sw 6/4/2001 19:40'!\\\\nuseVocabulary: aVocabulary\\\\n\\\\t\\\\\\\"Make the receiver show categories and methods as dictated by aVocabulary\\\\\\\"\\\\n\\\\n\\\\t| itsName |\\\\n\\\\t((self valueOfProperty: #currentVocabularySymbol ifAbsent: [nil]) == (itsName _ aVocabulary vocabularyName)) ifFalse:\\\\n\\\\t\\\\t[self setProperty: #currentVocabularySymbol toValue: itsName.\\\\n\\\\t\\\\tself removeProperty: #currentVocabulary.  \\\\\\\"grandfathered\\\\\\\"\\\\n\\\\t\\\\t(self submorphs select: [:m | m isKindOf: CategoryViewer]) do: [:m | m delete]]! !\\\\n\\\\n!StandardViewer methodsFor: 'initialization' stamp: 'sw 10/26/2000 09:42'!\\\\nuserLevel\\\\n\\\\t\\\\\\\"Answer the user level for this viewer, which can be used in figuring out what to display in the viewer.  Initially, we make little use of this, but in past prototypes, and in future deployments, it may be handy.\\\\\\\"\\\\n\\\\n\\\\t^ self valueOfProperty: #userLevel ifAbsent: [1]! !\\\\n\\\\n!StandardViewer methodsFor: 'initialization' stamp: 'nk 8/29/2004 17:18'!\\\\nviewsMorph\\\\n\\\\t\\\\\\\"Answer whether the receiver views a morph.  Traditional viewers up until late 2000 *all* viewed morphs (as per the morph/player architecture), but viewers on non-morph/players have now become possible\\\\\\\"\\\\n\\\\n\\\\t^ scriptedPlayer isPlayerLike! !\\\\n\\\\n\\\\n!StandardViewer methodsFor: 'macpal' stamp: 'sw 6/4/2001 18:05'!\\\\ncurrentVocabulary\\\\n\\\\t\\\\\\\"Answer the vocabulary currently associated with the receiver\\\\\\\"\\\\n\\\\n\\\\t| aSym aVocab |\\\\n\\\\taSym _ self valueOfProperty: #currentVocabularySymbol ifAbsent: [nil].\\\\n\\\\taSym ifNil:\\\\n\\\\t\\\\t[aVocab _ self valueOfProperty: #currentVocabulary ifAbsent: [nil].\\\\n\\\\t\\\\taVocab ifNotNil:\\\\n\\\\t\\\\t\\\\t[aSym _ aVocab vocabularyName.\\\\n\\\\t\\\\t\\\\tself removeProperty: #currentVocabulary.\\\\n\\\\t\\\\t\\\\tself setProperty: #currentVocabularySymbol toValue: aSym]].\\\\n\\\\t^ aSym\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t[Vocabulary vocabularyNamed: aSym]\\\\n\\\\t\\\\tifNil:\\\\n\\\\t\\\\t\\\\t[(self world ifNil: [ActiveWorld]) currentVocabularyFor: scriptedPlayer]! !\\\\n\\\\n\\\\n!StandardViewer methodsFor: 'user interface' stamp: 'sw 10/25/1999 22:08'!\\\\ndismiss\\\\n\\\\t| aFlapTab |\\\\n\\\\t\\\\\\\"User hit the dismiss button.\\\\\\\"\\\\n\\\\t(owner isKindOf: TabbedPalette)\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[^ owner showNoPalette].\\\\n\\\\t(aFlapTab _ self pasteUpMorph correspondingFlapTab) ifNotNil:\\\\n\\\\t\\\\t[^ aFlapTab dismissViaHalo].\\\\n\\\\tself topRendererOrSelf delete! !\\\\n\\\\n!StandardViewer methodsFor: 'user interface' stamp: 'sw 10/24/1998 14:34'!\\\\ndownArrowHit\\\\n\\\\tself nextCostume! !\\\\n\\\\n!StandardViewer methodsFor: 'user interface' stamp: 'sw 10/26/1999 01:07'!\\\\nhasDismissButton\\\\n\\\\tsubmorphs isEmptyOrNil ifTrue: [^ false].\\\\n\\\\t^ (submorphs first allMorphs detect:\\\\n\\\\t\\\\t[:possible |  (possible isKindOf: SimpleButtonMorph) and: [possible actionSelector == #dismiss]]\\\\n\\\\t\\\\t\\\\tifNone: [nil]) notNil! !\\\\n\\\\n!StandardViewer methodsFor: 'user interface' stamp: 'sw 5/18/2001 10:46'!\\\\nopenLexicon\\\\n\\\\t\\\\\\\"Open a lexicon browser on the receiver, showing its current vocabulary\\\\\\\"\\\\n\\\\n\\\\t| littleHim | \\\\n\\\\tlittleHim _ scriptedPlayer assureUniClass.\\\\n\\\\n\\\\t(InstanceBrowser new useVocabulary: self currentVocabulary) openOnObject: littleHim  inWorld: ActiveWorld showingSelector: nil! !\\\\n\\\\n!StandardViewer methodsFor: 'user interface' stamp: 'sw 4/20/2001 21:22'!\\\\nrelaunchViewer\\\\n\\\\t\\\\\\\"Launch a new viewer to replace the receiver.\\\\\\\"\\\\n\\\\n\\\\tself presenter updateViewer: self forceToShow: nil! !\\\\n\\\\n!StandardViewer methodsFor: 'user interface' stamp: 'sw 12/23/1998 22:45'!\\\\nstandardViewerColor\\\\n\\\\t ^ Color r: 0.572 g: 0.883 b: 0.572! !\\\\n\\\\n!StandardViewer methodsFor: 'user interface' stamp: 'sw 10/24/1998 14:33'!\\\\nupArrowHit\\\\n\\\\tself previousCostume! !\\\\nPolygonMorph subclass: #StarMorph\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-Widgets'!\\\\n!StarMorph commentStamp: 'wiz 9/6/2005 12:30' prior: 0!\\\\nI am a very flexible star..\\\\n\\\\nGrab me from the supplies flap or from the graphic objects.\\\\nAdd my handles and you can move and resize me.\\\\nThe up and down arrows increase or reduce the number of my sides.\\\\nThe right and left arrows cycle thru different amounts of  pointiness.\\\\n\\\\n\\\\nUse the arrows right and left of my center or get stars with a specific amount of pointyness.  The left side goes from fat to thin and then cycles around again. The right goes from thin to fat. Hold down the shift key if you wish to stop the cycling at the extremes.\\\\n\\\\nUse the arrows up and down to change the number of sides if you would like a different number of points.\\\\n\\\\nTo add or remove just one side hold the shift key down as you use the arrows or use the menu items for that purpose.\\\\n\\\\n\\\\nIf you add or remove just one point I will have an odd number of sides.  When that happens I can only look like a regular polygon. The right and left arrows will have no effect.  Add or remove just one more side and you can shift drag the outer handle or use the arrows to restore my pointiness. \\\\n\\\\nThat was too complicated. It is gone. You can get regular polygon shapes by adjusting my pointiness. For example the extreme of a five pointed star is a dodecahedron (10 sided regular polygon) and one step less extreme is a pentagon (5 sided regular polygon).\\\\n\\\\n\\\\nAt some time you will probably shift drag the outer handle thru the center handle.\\\\nWhile I looked round as you shrunk me, I will look very much like an asterisk as you pull me away.  What happens is that inside bend shrunk on the way down because it can never be larger than the outer point (or it wouldn't be the innerbend would it).\\\\nBut on the way out it is perfectly happy to remain small. So I look like an asterisk.\\\\n\\\\nTo fatten me up  (if you haven't already figured this out by fooling around)  hold the shift down an move the outer handle towards the center (but not quite all the way) then let the shift up and move the outer handle away.  A couple of cycles like this and I'll be looking fat and jolly again. Or you can now just use the right arrow to make me fatter.\\\\n\\\\nThis is also the reason I don't let the inside bend get larger than the outer point.\\\\nIf I did the same process that fattened me when I was an asterisk would also grow an asterisk so large squeak would complain about not having enough memory.\\\\n\\\\nHistorical note:\\\\n\\\\nThe former star had two bugs that are fixed here.\\\\nThe outer handle now no longer jumps from one point to another.\\\\nThe other bug prevented some higher order stars from looking right. \\\\nWhich is why the former star didn't allow you to change the number of points. !\\\\n\\\\n\\\\n!StarMorph methodsFor: 'access' stamp: 'wiz 1/11/2005 03:58'!\\\\nskipRatios\\\\n\\\\\\\"Return an array of  ratios  of the inner radius to the outer radius.\\\\nRatios are in ascending order from 0.0 to 1.0.\\\\\\\"\\\\n\\\\\\\"Assume we have at least one vertex.\\\\nAll ways return a number <= 1.0\\\\\\\"\\\\n\\\\n| n  alpha  |\\\\n\\\\\\\"Odd vertices sizes can not be stars only regular polygons\\\\\\\"\\\\nn:= vertices size . n odd ifTrue: [ ^ #(  1.0) ] .\\\\n\\\\nalpha := Float pi / (n//2)  asFloat .\\\\n\\\\n^ ((((    Float halfPi -alpha  to: alpha /2.0  by: alpha  negated ) \\\\n\\\\tcollect:  [:angle |( (angle) sin )/\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(angle + alpha ) sin ]\\\\n\\\\t) copyWith: 0.0) copyWithFirst: 1.0) reversed .! !\\\\n\\\\n!StarMorph methodsFor: 'access' stamp: 'wiz 1/4/2005 20:14'!\\\\nstarRatio\\\\n\\\\\\\"Return the ratio of the inner radius to the outer radius.\\\\\\\"\\\\n\\\\\\\"Assume we have at least one vertex.\\\\nAll ways return a number <= 1.0\\\\\\\"\\\\n| r c |\\\\nc := vertices average rounded .\\\\nr := (c dist: vertices last) / (c dist:  vertices first)  .\\\\n^ r > 1.0  ifTrue: [  r reciprocal ] ifFalse: [r ] .! !\\\\n\\\\n\\\\n!StarMorph methodsFor: 'accessing' stamp: 'wiz 1/4/2005 19:47'!\\\\nstarRatio: r\\\\n\\\\\\\"Set the star s.t. the ratio of the inner radius to the outer radius is r.\\\\nIf r is > 1 use the reciprocal to keep the outer radius first.\\\\\\\"\\\\n\\\\\\\"Assume we have at least one vertex.\\\\nset\\\\nAll ways return a number <= 1.0\\\\\\\"\\\\nself makeVertices: vertices size starRatio:( r > 1.0  ifTrue: [  r reciprocal ] ifFalse: [r ] ).! !\\\\n\\\\n\\\\n!StarMorph methodsFor: 'editing' stamp: 'wiz 12/15/2004 00:59'!\\\\naddHandles\\\\n\\\\tself addStarHandles! !\\\\n\\\\n!StarMorph methodsFor: 'editing' stamp: 'wiz 1/15/2005 00:20'!\\\\naddStarHandles\\\\n\\\\t\\\\\\\"Outer handle must not be blocked so it comes first. \\\\n\\\\tThe editing routine expects to find the center handle second.\\\\n\\\\tThe side and shape changing handles follow these.\\\\\\\"\\\\n\\\\t| center |\\\\n\\\\tself removeHandles.\\\\n\\\\t\\\\\\\"Check for old stars and correct order of vertices.\\\\\\\"\\\\n\\\\tself insureCompatability .\\\\n\\\\thandles := OrderedCollection new.\\\\n\\\\tcenter := vertices average rounded.\\\\n\\\\tself withCenterOuterHandles; withUpDownLeftRightHandlesAround: 6 center: center.\\\\n\\\\tself placeHandles.\\\\n\\\\tself changed.\\\\n\\\\t! !\\\\n\\\\n!StarMorph methodsFor: 'editing' stamp: 'wiz 9/5/2005 23:12'!\\\\nchangeVertices: label event: evt fromHandle: handle \\\\n\\\\t| |\\\\n\\\\tlabel == #more\\\\n\\\\t\\\\tifTrue: [evt shiftPressed\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self moreVertices \\\\\\\"not oneMoreVertex\\\\\\\"]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self moreVertices]].\\\\n\\\\tlabel == #less\\\\n\\\\t\\\\tifTrue: [evt shiftPressed\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self lessVertices \\\\\\\"not oneLessVertex\\\\\\\"]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self lessVertices]].\\\\n\\\\tlabel == #next\\\\n\\\\t\\\\tifTrue: [evt shiftPressed\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self makeVertices: vertices size starRatio: self nextSkip]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self makeVertices: vertices size starRatio: self nextTwinkleSkip]].\\\\n\\\\tlabel == #prev\\\\n\\\\t\\\\tifTrue: [evt shiftPressed\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self makeVertices: vertices size starRatio: self prevSkip]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self makeVertices: vertices size starRatio: self prevTwinkleSkip]].\\\\n\\\\tself computeBounds! !\\\\n\\\\n!StarMorph methodsFor: 'editing' stamp: 'wiz 1/20/2005 19:07'!\\\\ndragVertex: label event: evt fromHandle: handle \\\\n\\\\t| center r1 rN rNext a1 rTotal |\\\\n\\\\tlabel == #outside\\\\n\\\\t\\\\tifTrue: [center := handles second center.\\\\n\\\\t\\\\t\\\\tr1 := center dist: vertices first.\\\\n\\\\t\\\\t\\\\t\\\\\\\"Rounding and what happens as the outer handle\\\\n\\\\t\\\\t\\\\tapproached the center, \\\\n\\\\t\\\\t\\\\trequires we guard the inner radius \\\\n\\\\t\\\\t\\\\tfrom becoming larger than the outer radius.\\\\\\\"\\\\n\\\\t\\\\t\\\\trN := r1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmin: (center dist: vertices last).\\\\n\\\\t\\\\t\\\\trNext := 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmax: (center dist: evt cursorPoint).\\\\n\\\\t\\\\t\\\\ta1 := 270.0\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t+ (center bearingToPoint: evt cursorPoint).\\\\n\\\\t\\\\t\\\\trTotal := vertices size even\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [evt shiftPressed\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [rNext + rNext min: rNext + rN]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [r1 + rN * rNext / r1]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [rNext + rNext].\\\\n\\\\t\\\\t\\\\trNext := rTotal - rNext.\\\\n\\\\t\\\\t\\\\tvertices := ((a1 to: a1 + 359.999 by: 360.0 / vertices size)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcollect: [:angle | center\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t+ (Point r: (rNext := rTotal - rNext) degrees: angle)]) .\\\\n\\\\t\\\\t\\\\thandle align: handle center with: evt cursorPoint].\\\\n\\\\tlabel == #center\\\\n\\\\t\\\\tifTrue: [evt shiftPressed\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self updateFormFromUser]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self position: self position + (evt cursorPoint - handle center)]].\\\\n\\\\tself computeBounds! !\\\\n\\\\n!StarMorph methodsFor: 'editing' stamp: 'wiz 1/15/2005 00:19'!\\\\nplaceHandles\\\\n\\\\t\\\\\\\"Add the handles to my submorphs.\\\\\\\"\\\\n\\\\thandles reverseDo: [:each | self addMorphFront: each ] .\\\\n\\\\t\\\\n\\\\t! !\\\\n\\\\n!StarMorph methodsFor: 'editing' stamp: 'di 9/26/97 11:11'!\\\\nupdateHandles! !\\\\n\\\\n!StarMorph methodsFor: 'editing' stamp: 'wiz 1/11/2005 19:39'!\\\\nwithCenterOuterHandles\\\\n\\\\t\\\\\\\"Add to our handles the center positioning and outer resizing\\\\n\\\\thandles. Outer handle must not be blocked so it comes first. \\\\n\\\\tThe editing routine expects to find the center handle second.\\\\n\\\\tThe side and shape changing handles follow these.\\\\\\\"\\\\n\\\\t| center v1 hExtent holder |\\\\n\\\\tcenter := vertices average rounded.\\\\n\\\\thExtent := 8 @ 8.\\\\n\\\\tv1 := vertices first.\\\\n\\\\tholder := {(EllipseMorph\\\\n\\\\t\\\\t\\\\t\\\\tnewBounds: (Rectangle center: v1 extent: hExtent)\\\\n\\\\t\\\\t\\\\t\\\\tcolor: Color yellow)\\\\n\\\\t\\\\t\\\\t\\\\tsetBalloonText: 'Move me to adjust size. Shift move to adjust pointiness'. (EllipseMorph\\\\n\\\\t\\\\t\\\\t\\\\tnewBounds: (Rectangle center: center extent: hExtent)\\\\n\\\\t\\\\t\\\\t\\\\tcolor: Color yellow)\\\\n\\\\t\\\\t\\\\t\\\\tsetBalloonText: 'Move me to adjust position'}.\\\\n\\\\tholder\\\\n\\\\t\\\\twith: {#outside. #center}\\\\n\\\\t\\\\tdo: [:handle :which | handle\\\\n\\\\t\\\\t\\\\t\\\\ton: #mouseDown\\\\n\\\\t\\\\t\\\\t\\\\tsend: #dragVertex:event:fromHandle:\\\\n\\\\t\\\\t\\\\t\\\\tto: self\\\\n\\\\t\\\\t\\\\t\\\\twithValue: which;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\n\\\\t\\\\t\\\\t\\\\ton: #mouseMove\\\\n\\\\t\\\\t\\\\t\\\\tsend: #dragVertex:event:fromHandle:\\\\n\\\\t\\\\t\\\\t\\\\tto: self\\\\n\\\\t\\\\t\\\\t\\\\twithValue: which].\\\\n\\\\thandles addAll: holder! !\\\\n\\\\n!StarMorph methodsFor: 'editing' stamp: 'wiz 1/11/2005 19:47'!\\\\nwithUpDownLeftRightHandlesAround: radius center: center\\\\n\\\\t\\\\\\\"Add to our handles the side and shape changing handles.\\\\\\\"\\\\n\\\\t| tri  above holder  triAbove triBelow triRight triLeft |\\\\n\\\\tabove := 0 @ radius negated.\\\\n\\\\t\\\\n\\\\ttri := Array\\\\n\\\\t\\\\t\\\\t\\\\twith: 0 @ -5\\\\n\\\\t\\\\t\\\\t\\\\twith: 4 @ 3\\\\n\\\\t\\\\t\\\\t\\\\twith: -4 @ 3.\\\\n\\\\ttriAbove := tri + (center + above).\\\\n\\\\ttriBelow := triAbove\\\\n\\\\t\\\\t\\\\t\\\\tcollect: [:pt | pt rotateBy: #pi centerAt: center].\\\\n\\\\ttriRight := triAbove\\\\n\\\\t\\\\t\\\\t\\\\tcollect: [:pt | pt rotateBy: #right centerAt: center].\\\\n\\\\ttriLeft := triAbove\\\\n\\\\t\\\\t\\\\t\\\\tcollect: [:pt | pt rotateBy: #left centerAt: center].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\n\\\\tholder := { (PolygonMorph\\\\n\\\\t\\\\t\\\\t\\\\tvertices: triAbove\\\\n\\\\t\\\\t\\\\t\\\\tcolor: Color green\\\\n\\\\t\\\\t\\\\t\\\\tborderWidth: 1\\\\n\\\\t\\\\t\\\\t\\\\tborderColor: Color black)\\\\n\\\\t\\\\t\\\\t\\\\t setBalloonText: 'More points.'. \\\\n\\\\t\\\\t\\\\t\\\\t\\\\n\\\\t\\\\t\\\\t\\\\t(PolygonMorph\\\\n\\\\t\\\\t\\\\t\\\\tvertices: triBelow\\\\n\\\\t\\\\t\\\\t\\\\tcolor: Color magenta\\\\n\\\\t\\\\t\\\\t\\\\tborderWidth: 1\\\\n\\\\t\\\\t\\\\t\\\\tborderColor: Color black)\\\\n\\\\t\\\\t\\\\t\\\\t setBalloonText: 'Fewer points.'. \\\\n\\\\t\\\\t\\\\t\\\\t\\\\n\\\\t\\\\t\\\\t\\\\t(PolygonMorph\\\\n\\\\t\\\\t\\\\t\\\\tvertices: triRight\\\\n\\\\t\\\\t\\\\t\\\\tcolor: Color green\\\\n\\\\t\\\\t\\\\t\\\\tborderWidth: 1\\\\n\\\\t\\\\t\\\\t\\\\tborderColor: Color black)\\\\n\\\\t\\\\t\\\\t\\\\t setBalloonText: 'Twinkle fatter.'. \\\\n\\\\t\\\\t\\\\t\\\\t\\\\n\\\\t\\\\t\\\\t\\\\t(PolygonMorph\\\\n\\\\t\\\\t\\\\t\\\\tvertices: triLeft\\\\n\\\\t\\\\t\\\\t\\\\tcolor: Color magenta\\\\n\\\\t\\\\t\\\\t\\\\tborderWidth: 1\\\\n\\\\t\\\\t\\\\t\\\\tborderColor: Color black)\\\\n\\\\t\\\\t\\\\t\\\\t setBalloonText: 'Twinkle thinner.'}.\\\\n\\\\t\\\\n\\\\tholder\\\\n\\\\t\\\\twith: {#more. #less. #next. #prev}\\\\n\\\\t\\\\tdo: [:handle :which | handle\\\\n\\\\t\\\\t\\\\t\\\\ton: #mouseDown\\\\n\\\\t\\\\t\\\\t\\\\tsend: #changeVertices:event:fromHandle:\\\\n\\\\t\\\\t\\\\t\\\\tto: self\\\\n\\\\t\\\\t\\\\t\\\\twithValue: which;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\n\\\\t\\\\t\\\\t\\\\ton: #mouseMove\\\\n\\\\t\\\\t\\\\t\\\\tsend: #changeVertices:event:fromHandle:\\\\n\\\\t\\\\t\\\\t\\\\tto: self\\\\n\\\\t\\\\t\\\\t\\\\twithValue: which].\\\\n\\\\t^ handles addAll: holder! !\\\\n\\\\n\\\\n!StarMorph methodsFor: 'geometry' stamp: 'wiz 1/19/2005 22:34'!\\\\nnextSkip\\\\n\\\\t\\\\\\\"Set starRatio to next skip wrapping if needed.\\\\\\\"\\\\n\\\\t| skips n c r1 rN |\\\\n\\\\tc := vertices average rounded.\\\\n\\\\tr1 := (c dist: vertices first) truncated asFloat.\\\\n\\\\trN := c dist: vertices last.\\\\n\\\\tskips := self skipRatios.\\\\n\\\\tn := skips * r1\\\\n\\\\t\\\\t\\\\t\\\\tfindFirst: [:r | r > (rN + 1.0)].\\\\n\\\\t\\\\\\\"n = 0\\\\n\\\\t\\\\tifTrue: [n := skips size].\\\\\\\"\\\\n\\\\t^ skips atWrap: n! !\\\\n\\\\n!StarMorph methodsFor: 'geometry' stamp: 'wiz 1/19/2005 22:42'!\\\\nnextTwinkleSkip\\\\n\\\\t\\\\\\\"Set starRatio to next skip wrapping if needed.\\\\\\\"\\\\n\\\\t| skips n c r1 rN |\\\\n\\\\tc := vertices average rounded.\\\\n\\\\tr1 := (c dist: vertices first) truncated asFloat.\\\\n\\\\trN := c dist: vertices last.\\\\n\\\\tskips := self skipRatios.\\\\n\\\\tn := skips * r1\\\\n\\\\t\\\\t\\\\t\\\\tfindFirst: [:r | r > (rN + 1.0)].\\\\n\\\\tn = 0\\\\n\\\\t\\\\tifTrue: [ n := 1].\\\\n\\\\t^ skips atWrap: n! !\\\\n\\\\n!StarMorph methodsFor: 'geometry' stamp: 'wiz 1/19/2005 22:41'!\\\\nprevSkip\\\\n\\\\t\\\\\\\"Set starRatio to next skip wrapping if necessary\\\\\\\"\\\\n\\\\t| skips n c r1 rN |\\\\n\\\\tc := vertices average rounded.\\\\n\\\\tr1 := c dist: vertices first.\\\\n\\\\trN := (c dist: vertices last) truncated asFloat.\\\\n\\\\tskips := self skipRatios.\\\\n\\\\tn := skips * r1\\\\n\\\\t\\\\t\\\\t\\\\tfindLast: [:r | r + 1.0 < rN].\\\\n\\\\tn = 0\\\\n\\\\t\\\\tifTrue: [n := 1].\\\\n\\\\t^ skips at: n! !\\\\n\\\\n!StarMorph methodsFor: 'geometry' stamp: 'wiz 1/19/2005 22:19'!\\\\nprevTwinkleSkip\\\\n\\\\t\\\\\\\"Set starRatio to next skip wrapping if necessary\\\\\\\"\\\\n\\\\t| skips n c r1 rN |\\\\n\\\\tc := vertices average rounded.\\\\n\\\\tr1 := c dist: vertices first.\\\\n\\\\trN := (c dist: vertices last) truncated asFloat.\\\\n\\\\tskips := self skipRatios.\\\\n\\\\tn := skips * r1\\\\n\\\\t\\\\t\\\\t\\\\tfindLast: [:r | r + 1.0 < rN].\\\\n\\\\t\\\\\\\"n = 0\\\\n\\\\tifTrue: [^ oldR].\\\\\\\"\\\\n\\\\t^ skips atWrap: n! !\\\\n\\\\n\\\\n!StarMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:35'!\\\\ndefaultBorderColor\\\\n\\\\t\\\\\\\"answer the default border color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color black! !\\\\n\\\\n!StarMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:40'!\\\\ndefaultBorderWidth\\\\n\\\\t\\\\\\\"answer the default border width for the receiver\\\\\\\"\\\\n\\\\t^ 1! !\\\\n\\\\n!StarMorph methodsFor: 'initialization' stamp: 'wiz 1/11/2005 14:33'!\\\\ndefaultCenter\\\\n\\\\t\\\\\\\"answer the default center for the receiver\\\\\\\"\\\\n\\\\t^ 0 asPoint! !\\\\n\\\\n!StarMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:31'!\\\\ndefaultColor\\\\n\\\\t\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color lightBlue! !\\\\n\\\\n!StarMorph methodsFor: 'initialization' stamp: 'wiz 1/11/2005 14:33'!\\\\ndefaultFirstVertex\\\\n\\\\t\\\\\\\"answer the default first outer point for the receiver.\\\\n\\\\tThis with the center determines the angle and size of the outer radius.\\\\\\\"\\\\n\\\\t^ 10 asPoint! !\\\\n\\\\n!StarMorph methodsFor: 'initialization' stamp: 'wiz 1/11/2005 14:28'!\\\\ndefaultSides\\\\n\\\\t\\\\\\\"answer the default number of sides for the receiver\\\\\\\"\\\\n\\\\t^ 10! !\\\\n\\\\n!StarMorph methodsFor: 'initialization' stamp: 'wiz 1/11/2005 14:29'!\\\\ndefaultStarRatio\\\\n\\\\t\\\\\\\"answer the default ratio of outer radius to inner radius for the receiver\\\\\\\"\\\\n\\\\t^ 5.0 / 12.0! !\\\\n\\\\n!StarMorph methodsFor: 'initialization' stamp: 'wiz 1/11/2005 14:36'!\\\\ninitialize\\\\n\\\\t\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\tself\\\\n\\\\t\\\\tmakeVertices: self defaultSides\\\\n\\\\t\\\\tstarRatio: self defaultStarRatio\\\\n\\\\t\\\\twithCenter: self defaultCenter\\\\n\\\\t\\\\twithPoint: self defaultFirstVertex.\\\\n\\\\tself computeBounds! !\\\\n\\\\n!StarMorph methodsFor: 'initialization' stamp: 'wiz 1/9/2005 20:15'!\\\\ninsureCompatability\\\\n\\\\\\\"The old stars had the point on the second not the first vertex. So we need to check for this special case.\\\\\\\"\\\\n | c v1 v2 |\\\\nc := vertices average rounded.\\\\n v1 := vertices first .\\\\n v2 := vertices second .\\\\n(c dist: v1) + 0.001 < (c dist: v2) ifTrue: [vertices := vertices allButFirst copyWith: v1]\\\\n\\\\n! !\\\\n\\\\n!StarMorph methodsFor: 'initialization' stamp: 'wiz 12/30/2004 02:57'!\\\\nmakeVertices: nSides \\\\n\\\\t\\\\\\\"Assuming vertices has at least one point, make a new star \\\\n\\\\tor regular polygon (for odd sided polygons).\\\\n\\\\tThe center of the polygon and the first vertex remain in\\\\n\\\\tplace. The inner distances for stars remain the same also if\\\\n\\\\tpossible.\\\\\\\"\\\\n\\\\t| center r1 rN rNext a1 rTotal |\\\\n\\\\tcenter := vertices average rounded.\\\\n\\\\tr1 := center dist: vertices first.\\\\n\\\\trN := center dist: vertices last.\\\\n\\\\trNext := 1 max: r1.\\\\n\\\\ta1 := 270.0\\\\n\\\\t\\\\t\\\\t\\\\t+ (center bearingToPoint: vertices first).\\\\n\\\\trTotal := nSides even\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [rNext + rNext min: rNext + rN]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [rNext + rNext].\\\\n\\\\trNext := rTotal - rNext.\\\\n\\\\tself changed .\\\\n\\\\tvertices := (a1 to: a1 + 359.999 by: 360.0 / nSides)\\\\n\\\\t\\\\t\\\\t\\\\tcollect: [:angle | center\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t+ (Point r: (rNext := rTotal - rNext) degrees: angle)].\\\\n\\\\tself computeBounds.\\\\n\\\\tself changed! !\\\\n\\\\n!StarMorph methodsFor: 'initialization' stamp: 'wiz 1/4/2005 19:31'!\\\\nmakeVertices: nSides starRatio: fraction\\\\n\\\\t\\\\\\\"Assuming vertices has at least one point, make a new star \\\\n\\\\tor regular polygon (for odd sided polygons).\\\\n\\\\tThe center of the polygon and the first vertex remain in\\\\n\\\\tplace. The inner distances for stars remain the same also if\\\\n\\\\tpossible.\\\\\\\"\\\\n\\\\t| center r1 rN rNext a1 rTotal |\\\\n\\\\tcenter := vertices average rounded.\\\\n\\\\tr1 := center dist: vertices first.\\\\n\\\\trNext := 1 max: r1.\\\\n\\\\trN := (1.0 min: fraction) * rNext.\\\\n\\\\ta1 := 270.0\\\\n\\\\t\\\\t\\\\t\\\\t+ (center bearingToPoint: vertices first).\\\\n\\\\trTotal := nSides even\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [rNext + rNext min: rNext + rN]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [rNext + rNext].\\\\n\\\\trNext := rTotal - rNext.\\\\n\\\\tself changed .\\\\n\\\\tvertices := (a1 to: a1 + 359.999 by: 360.0 / nSides)\\\\n\\\\t\\\\t\\\\t\\\\tcollect: [:angle | center\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t+ (Point r: (rNext := rTotal - rNext) degrees: angle)].\\\\n\\\\tself computeBounds.\\\\n\\\\tself changed! !\\\\n\\\\n!StarMorph methodsFor: 'initialization' stamp: 'wiz 1/11/2005 21:36'!\\\\nmakeVertices: nSides starRatio: fraction withCenter: center withPoint: aPoint \\\\n\\\\t\\\\\\\"Make a new star or regular polygon (for odd sided polygons).\\\\n\\\\tThis makes star vertices from scratch without any feedback from existing vertices.\\\\\\\"\\\\n\\\\t| r1 rN rNext a1 rTotal |\\\\n\\\\tr1 := center dist: aPoint.\\\\n\\\\trNext := 1 max: r1.\\\\n\\\\trN := (1.0 min: fraction)\\\\n\\\\t\\\\t\\\\t\\\\t* rNext.\\\\n\\\\ta1 := 270.0\\\\n\\\\t\\\\t\\\\t\\\\t+ (center bearingToPoint: aPoint).\\\\n\\\\trTotal := nSides even\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [rNext + rNext min: rNext + rN]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [rNext + rNext].\\\\n\\\\trNext := rTotal - rNext.\\\\n\\\\tself changed.\\\\n\\\\tvertices := (a1 to: a1 + 359.999 by: 360.0 / nSides)\\\\n\\\\t\\\\t\\\\t\\\\tcollect: [:angle | center\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t+ (Point r: (rNext := rTotal - rNext) degrees: angle)].\\\\n\\\\tself computeBounds.\\\\n\\\\tself changed! !\\\\n\\\\n\\\\n!StarMorph methodsFor: 'menu' stamp: 'wiz 9/5/2005 23:08'!\\\\naddChangeSidesMenuItems: aCustomMenu hand: aHandMorph \\\\n\\\\t\\\\\\\"Menu items to change number of sides.\\\\\\\"\\\\n\\\\taCustomMenu addLine.\\\\n\\\\taCustomMenu add: 'more sides' translated action: #moreVertices.\\\\n\\\\taCustomMenu add: 'fewer sides' translated action: #lessVertices.\\\\n\\\\\\\"\\\\tRegular polygons can be simulated with the one of the skip stars \\\\n\\\\tand it would confuse users to have stars be limited to Regular polygons.\\\\n\\\\tSo we've removed those menu items - wiz\\\\\\\"\\\\n\\\\\\\"\\\\taCustomMenu add: 'one more side' translated action: #oneMoreVertex.\\\\n\\\\taCustomMenu add: 'one fewer side' translated action: #oneLessVertex\\\\\\\"! !\\\\n\\\\n!StarMorph methodsFor: 'menu' stamp: 'wiz 1/11/2005 14:55'!\\\\naddCustomMenuItems: aCustomMenu hand: aHandMorph \\\\n\\\\tsuper addCustomMenuItems: aCustomMenu hand: aHandMorph.\\\\nself addChangeSidesMenuItems: aCustomMenu hand: aHandMorph.\\\\nself addTwinkleMenuItems: aCustomMenu hand: aHandMorph.\\\\n\\\\t! !\\\\n\\\\n!StarMorph methodsFor: 'menu' stamp: 'wiz 1/11/2005 20:38'!\\\\naddTwinkleMenuItems: aCustomMenu hand: aHandMorph \\\\n\\\\t\\\\\\\"Menu items to change the sharpness of the star.\\\\\\\"\\\\n\\\\taCustomMenu addLine.\\\\n\\\\taCustomMenu add: 'twinkle fatter' translated action: #nextTwinkle.\\\\n\\\\taCustomMenu add: 'twinkle thinner' translated action: #prevTwinkle.\\\\n\\\\\\\"\\\\taCustomMenu add: 'fatter star' translated action: #nextFatter.\\\\n\\\\taCustomMenu add: 'thinner star' translated action: #prevThinner\\\\\\\"\\\\n\\\\t\\\\n\\\\t\\\\n\\\\n\\\\n! !\\\\n\\\\n!StarMorph methodsFor: 'menu' stamp: 'wiz 12/11/2004 16:45'!\\\\noneLessVertex\\\\n\\\\tself\\\\n\\\\t\\\\tmakeVertices: (3 max: 1 negated + vertices size)! !\\\\n\\\\n!StarMorph methodsFor: 'menu' stamp: 'wiz 12/11/2004 16:46'!\\\\noneMoreVertex\\\\n\\\\tself makeVertices: 1 + vertices size! !\\\\n\\\\n\\\\n!StarMorph methodsFor: 'menus' stamp: 'wiz 12/12/2004 16:43'!\\\\nlessVertices\\\\n\\\\\\\"Reduce the number of points by one until we are  a diamond. If odd reduce the number of sides by two until we become a triangle. See class comment.\\\\\\\"\\\\n\\\\t| nVerts |\\\\n\\\\t( nVerts := 2 negated + vertices size) < 3 ifFalse: [\\\\n\\\\tself\\\\n\\\\t\\\\tmakeVertices: nVerts]! !\\\\n\\\\n!StarMorph methodsFor: 'menus' stamp: 'wiz 12/11/2004 16:45'!\\\\nmoreVertices\\\\n\\\\tself makeVertices: 2+ vertices size! !\\\\n\\\\n!StarMorph methodsFor: 'menus' stamp: 'wiz 1/11/2005 20:37'!\\\\nnextTwinkle\\\\n\\\\tself makeVertices: vertices size starRatio: self nextTwinkleSkip .\\\\n\\\\tself computeBounds.! !\\\\n\\\\n!StarMorph methodsFor: 'menus' stamp: 'wiz 1/11/2005 20:37'!\\\\nprevTwinkle\\\\n\\\\tself makeVertices: vertices size starRatio: self prevTwinkleSkip .\\\\n\\\\tself computeBounds.! !\\\\n\\\\n!StarMorph methodsFor: 'menus' stamp: 'wiz 1/15/2005 02:26'!\\\\nupdateFormFromUser\\\\n\\\\\\\"Does nothing here. Overridden in subclasses e.g. Kaleidoscope.\\\\\\\"\\\\n^ self.! !\\\\n\\\\n\\\\n!StarMorph methodsFor: 'parts bin' stamp: 'sw 7/2/2001 11:07'!\\\\ninitializeToStandAlone\\\\n\\\\t^ self initialize removeHandles! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStarMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StarMorph class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 11:37'!\\\\ninitialize\\\\n\\\\n\\\\tself registerInFlapsRegistry.\\\\t! !\\\\n\\\\n!StarMorph class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 11:39'!\\\\nregisterInFlapsRegistry\\\\n\\\\t\\\\\\\"Register the receiver in the system's flaps registry\\\\\\\"\\\\n\\\\tself environment\\\\n\\\\t\\\\tat: #Flaps\\\\n\\\\t\\\\tifPresent: [:cl | cl registerQuad: #(StarMorph\\\\t\\\\tauthoringPrototype\\\\t'Star'\\\\t'A star')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'PlugIn Supplies'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcl registerQuad: #(StarMorph\\\\tauthoringPrototype\\\\t'Star'\\\\t'A star')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'Supplies'.]! !\\\\n\\\\n!StarMorph class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 12:41'!\\\\nunload\\\\n\\\\t\\\\\\\"Unload the receiver from global registries\\\\\\\"\\\\n\\\\n\\\\tself environment at: #Flaps ifPresent: [:cl |\\\\n\\\\tcl unregisterQuadsWithReceiver: self] ! !\\\\n\\\\n\\\\n!StarMorph class methodsFor: 'parts bin' stamp: 'sw 8/2/2001 16:22'!\\\\ndescriptionForPartsBin\\\\n\\\\t^ self partName:\\\\t'Star'\\\\n\\\\t\\\\tcategories:\\\\t\\\\t#('Graphics')\\\\n\\\\t\\\\tdocumentation:\\\\t'A symmetrical polygon in the shape of a star'! !\\\\nStarSqueakMorph subclass: #StarSqueakAntColony\\\\n\\\\tinstanceVariableNames: 'antCount'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'StarSqueak-Worlds'!\\\\n\\\\n!StarSqueakAntColony methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:26'!\\\\ninitialize\\\\n\\\\n\\\\tantCount := 50.\\\\n\\\\tsuper initialize.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakAntColony methodsFor: 'menu' stamp: 'jm 2/7/2001 18:41'!\\\\nsliderParameters\\\\n\\\\t\\\\\\\"Answer a list of parameters that the user can change via a slider. Each parameter is described by an array of: <name> <min value> <max value> <balloon help string>.\\\\\\\"\\\\n\\\\n\\\\t^ super sliderParameters, #(\\\\n\\\\t\\\\t(antCount 10 500 'The number of ants searching for food.'))\\\\n! !\\\\n\\\\n\\\\n!StarSqueakAntColony methodsFor: 'other' stamp: 'jm 1/19/2001 10:30'!\\\\ndiffusePheromone\\\\n\\\\n\\\\tself diffusePatchVariable: 'pheromone'.\\\\n! !\\\\n\\\\n!StarSqueakAntColony methodsFor: 'other' stamp: 'jm 1/19/2001 18:02'!\\\\nevaporatePheromone\\\\n\\\\n\\\\tself decayPatchVariable: 'pheromone'.\\\\n! !\\\\n\\\\n!StarSqueakAntColony methodsFor: 'other' stamp: 'jm 2/7/2001 08:03'!\\\\nsetupFood: aPatch\\\\n\\\\t\\\\\\\"Create several food caches.\\\\\\\"\\\\n\\\\n\\\\taPatch set: 'food' to: 0.  \\\\\\\"patch default is no food\\\\\\\"\\\\n\\\\n\\\\t((aPatch distanceTo: 15@15) <= 1 or:\\\\n\\\\t [(aPatch distanceTo: 80@20) <= 1 or:\\\\n\\\\t [(aPatch distanceTo: 25@80) <= 1 or:\\\\n\\\\t [(aPatch distanceTo: 70@70) <= 1]]]) ifTrue: [\\\\n\\\\t\\\\taPatch set: 'food' to: 10.\\\\n\\\\t\\\\taPatch color: Color red].\\\\n\\\\n! !\\\\n\\\\n!StarSqueakAntColony methodsFor: 'other' stamp: 'sd 11/20/2005 21:26'!\\\\nsetupNest: aPatch\\\\n\\\\t\\\\\\\"Create a nest of radius 5 centered at 50@50.\\\\\\\"\\\\n\\\\n\\\\t| distanceToNest |\\\\n\\\\tdistanceToNest := aPatch distanceTo: 50@50.\\\\n\\\\tdistanceToNest <= 4\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\taPatch set: 'isNest' to: 1.\\\\n\\\\t\\\\t\\\\taPatch color: Color brown lighter]\\\\n\\\\t\\\\tifFalse: [aPatch set: 'isNest' to: 0].\\\\n\\\\n\\\\t\\\\\\\"create a 'hill' of nest scent centered on the nest\\\\\\\"\\\\n\\\\tdistanceToNest > 0 ifTrue: [\\\\n\\\\t\\\\taPatch set: 'nestScent' to: 10000.0 // distanceToNest].\\\\n\\\\n! !\\\\n\\\\n!StarSqueakAntColony methodsFor: 'other' stamp: 'jm 3/8/2001 14:23'!\\\\nsetupPatches\\\\n\\\\t\\\\\\\"Create patch variables for sensing the nest and food caches. The nestScent variable is diffused so that it forms a 'hill' of scent over the entire world with its peak at the center of the nest. That way, the ants always know which way the nest is.\\\\\\\"\\\\n\\\\n\\\\tself createPatchVariable: 'food'.\\\\t\\\\t\\\\t\\\\\\\"greater than zero if patch has food\\\\\\\"\\\\n\\\\tself createPatchVariable: 'isNest'.\\\\t\\\\t\\\\\\\"greater than zero if patch is nest\\\\\\\"\\\\n\\\\tself createPatchVariable: 'nestScent'.\\\\t\\\\\\\"circular gradient with peak centered on nest\\\\\\\"\\\\n\\\\tself createPatchVariable: 'pheromone'.\\\\t\\\\\\\"dropped by ants when carrying food\\\\\\\"\\\\n\\\\tself displayPatchVariable: 'pheromone'.\\\\n\\\\tself patchesDo: [:p |\\\\n\\\\t\\\\tp color: self backgroundColor.\\\\n\\\\t\\\\tself setupNest: p.\\\\n\\\\t\\\\tself setupFood: p].\\\\n\\\\n! !\\\\n\\\\n!StarSqueakAntColony methodsFor: 'other' stamp: 'jm 3/8/2001 14:24'!\\\\nsetupTurtles\\\\n\\\\n\\\\tself makeTurtles: antCount class: AntColonyTurtle.\\\\n\\\\tturtles do: [:t |\\\\n\\\\t\\\\tt goto: 50@50.\\\\n\\\\t\\\\tt color: Color black.\\\\n\\\\t\\\\tt isCarryingFood: false.\\\\n\\\\t\\\\tt pheromoneDropSize: 100].\\\\n! !\\\\n\\\\n\\\\n!StarSqueakAntColony methodsFor: 'parameters' stamp: 'jm 2/7/2001 14:45'!\\\\nantCount\\\\n\\\\n\\\\t^ antCount\\\\n! !\\\\n\\\\n!StarSqueakAntColony methodsFor: 'parameters' stamp: 'sd 11/20/2005 21:26'!\\\\nantCount: aNumber\\\\n\\\\n\\\\tantCount := aNumber.\\\\n! !\\\\n\\\\n!StarSqueakAntColony methodsFor: 'parameters' stamp: 'jm 3/11/2001 17:10'!\\\\nbackgroundColor\\\\n\\\\n\\\\t^ Color brown lighter lighter lighter! !\\\\n\\\\n\\\\n!StarSqueakAntColony methodsFor: 'setup' stamp: 'sd 11/20/2005 21:26'!\\\\nsetup\\\\n\\\\n\\\\tself clearAll.\\\\n\\\\tself setupPatches.\\\\n\\\\tself setupTurtles.\\\\n\\\\tturtleDemons := #(searchForFood pickUpFood returnToNest dropFoodInNest).\\\\n\\\\tworldDemons := #(evaporatePheromone diffusePheromone).\\\\n! !\\\\nStarSqueakMorph subclass: #StarSqueakDiffusion\\\\n\\\\tinstanceVariableNames: 'waterCount dyeCount'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'StarSqueak-Worlds'!\\\\n\\\\n!StarSqueakDiffusion methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:26'!\\\\ninitialize\\\\n\\\\n\\\\tdyeCount := 200.\\\\n\\\\twaterCount := 2000.\\\\n\\\\tsuper initialize.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakDiffusion methodsFor: 'menu' stamp: 'jm 3/8/2001 14:08'!\\\\nsliderParameters\\\\n\\\\t\\\\\\\"Answer a list of parameters that the user can change via a slider. Each parameter is described by an array of: <name> <min value> <max value> <balloon help string>.\\\\\\\"\\\\n\\\\n\\\\t^ super sliderParameters, #(\\\\n\\\\t\\\\t(dyeCount 50 1000 'The number of dye particles.')\\\\n\\\\t\\\\t(waterCount 100 4000 'The number of water particles.'))\\\\n! !\\\\n\\\\n\\\\n!StarSqueakDiffusion methodsFor: 'other' stamp: 'sd 11/20/2005 21:26'!\\\\nsetupTurtles\\\\n\\\\n\\\\t| radius t |\\\\n\\\\tdyeCount ifNil: [dyeCount := 200].\\\\n\\\\twaterCount ifNil: [waterCount := 2000].\\\\n\\\\tradius := 10.\\\\n\\\\tself makeTurtles: waterCount class: DiffusionTurtle.\\\\n\\\\tturtles do: [:each |\\\\n\\\\t\\\\teach color: (Color gray: 0.7).\\\\n\\\\t\\\\t(each distanceTo: 50@50) < radius ifTrue: [each die]].\\\\n\\\\n\\\\tself makeTurtles: dyeCount class: DiffusionTurtle.\\\\n\\\\tturtles size - (dyeCount - 1) to: turtles size do: [:i |\\\\n\\\\t\\\\tt := turtles at: i.\\\\n\\\\t\\\\tt goto: 50@50.\\\\n\\\\t\\\\tt forward: (self random: radius).\\\\n\\\\t\\\\tt color: Color green darker darker].\\\\n! !\\\\n\\\\n\\\\n!StarSqueakDiffusion methodsFor: 'parameters' stamp: 'jm 3/8/2001 14:07'!\\\\ndyeCount\\\\n\\\\n\\\\t^ dyeCount\\\\n! !\\\\n\\\\n!StarSqueakDiffusion methodsFor: 'parameters' stamp: 'sd 11/20/2005 21:26'!\\\\ndyeCount: aNumber\\\\n\\\\n\\\\tdyeCount := aNumber asInteger max: 1.\\\\n! !\\\\n\\\\n!StarSqueakDiffusion methodsFor: 'parameters' stamp: 'jm 3/8/2001 14:07'!\\\\nwaterCount\\\\n\\\\n\\\\t^ waterCount\\\\n! !\\\\n\\\\n!StarSqueakDiffusion methodsFor: 'parameters' stamp: 'sd 11/20/2005 21:26'!\\\\nwaterCount: aNumber\\\\n\\\\n\\\\twaterCount := aNumber asInteger max: 1.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakDiffusion methodsFor: 'setup' stamp: 'sd 11/20/2005 21:26'!\\\\nsetup\\\\n\\\\n\\\\tself clearAll.\\\\n\\\\tself patchesDo: [:p | p color: (Color gray: 0.9)].\\\\n\\\\tself setupTurtles.\\\\n\\\\tturtleDemons := #(move bounce).\\\\n! !\\\\nStarSqueakMorph subclass: #StarSqueakForestFire\\\\n\\\\tinstanceVariableNames: 'treePercentage'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'StarSqueak-Worlds'!\\\\n\\\\n!StarSqueakForestFire methodsFor: 'demons' stamp: 'sd 11/20/2005 21:26'!\\\\nconsumeFuel\\\\n\\\\n\\\\t| level |\\\\n\\\\tself patchesDo: [:p |\\\\n\\\\t\\\\tlevel := p get: #flameLevel.\\\\n\\\\t\\\\tlevel > 0 ifTrue: [\\\\n\\\\t\\\\t\\\\tlevel := (level - 15) max: 0.\\\\n\\\\t\\\\t\\\\tp set: #flameLevel to: level.\\\\n\\\\t\\\\t\\\\tp brightness: level]].\\\\n! !\\\\n\\\\n!StarSqueakForestFire methodsFor: 'demons' stamp: 'jm 1/28/2001 16:33'!\\\\nspreadFire\\\\n\\\\n\\\\tself patchesDo: [:p |\\\\n\\\\t\\\\t(p get: #isUnburnt) > 0  ifTrue: [\\\\n\\\\t\\\\t\\\\t((p neighborN get: #flameLevel) +\\\\n\\\\t\\\\t\\\\t (p neighborS get: #flameLevel) +\\\\n\\\\t\\\\t\\\\t (p neighborE get: #flameLevel) +\\\\n\\\\t\\\\t\\\\t (p neighborW get: #flameLevel)) > 0 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tp set: #isUnburnt to: 0.\\\\n\\\\t\\\\t\\\\t\\\\tp set: #flameLevel to: 100.\\\\n\\\\t\\\\t\\\\t\\\\tp color: Color red]]].\\\\n! !\\\\n\\\\n\\\\n!StarSqueakForestFire methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:26'!\\\\ninitialize\\\\n\\\\n\\\\ttreePercentage := 70.\\\\n\\\\tsuper initialize.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakForestFire methodsFor: 'menu' stamp: 'jm 3/10/2001 11:06'!\\\\nsliderParameters\\\\n\\\\t\\\\\\\"Answer a list of parameters that the user can change via a slider. Each parameter is described by an array of: <name> <min value> <max value> <balloon help string>.\\\\\\\"\\\\n\\\\n\\\\t^ super sliderParameters, #(\\\\n\\\\t\\\\t(treePercentage 0 100 'The probability of that a given patch has a tree.'))\\\\n! !\\\\n\\\\n\\\\n!StarSqueakForestFire methodsFor: 'parameters' stamp: 'jm 3/10/2001 11:06'!\\\\ntreePercentage\\\\n\\\\n\\\\t^ treePercentage\\\\n! !\\\\n\\\\n!StarSqueakForestFire methodsFor: 'parameters' stamp: 'sd 11/20/2005 21:26'!\\\\ntreePercentage: aNumber\\\\n\\\\n\\\\ttreePercentage := aNumber.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakForestFire methodsFor: 'setup' stamp: 'sd 11/20/2005 21:26'!\\\\nsetup\\\\n\\\\n\\\\tself clearAll.\\\\n\\\\tself createPatchVariable: #isUnburnt.\\\\n\\\\tself createPatchVariable: #flameLevel.\\\\n\\\\tself setupTrees.\\\\n\\\\tself setupFire.\\\\n\\\\tself setupBorder.\\\\n\\\\tworldDemons := #(spreadFire consumeFuel).\\\\n\\\\n! !\\\\n\\\\n!StarSqueakForestFire methodsFor: 'setup' stamp: 'jm 1/28/2001 16:32'!\\\\nsetupBorder\\\\n\\\\n\\\\tself patchesDo: [:p |\\\\n\\\\t\\\\tp isLeftEdge | p isRightEdge |\\\\n\\\\t\\\\tp isTopEdge | p isBottomEdge ifTrue: [\\\\n\\\\t\\\\t\\\\tp set: #isUnburnt to: 0.\\\\n\\\\t\\\\t\\\\tp color: Color blue]].\\\\n! !\\\\n\\\\n!StarSqueakForestFire methodsFor: 'setup' stamp: 'jm 1/28/2001 16:32'!\\\\nsetupFire\\\\n\\\\n\\\\tself patchesDo: [:p |\\\\n\\\\t\\\\tp neighborW isLeftEdge ifTrue: [\\\\n\\\\t\\\\t\\\\tp set: #isUnburnt to: 0.\\\\n\\\\t\\\\t\\\\tp set: #flameLevel to: 100.\\\\n\\\\t\\\\t\\\\tp color: Color red]].\\\\n! !\\\\n\\\\n!StarSqueakForestFire methodsFor: 'setup' stamp: 'jm 3/10/2001 11:09'!\\\\nsetupTrees\\\\n\\\\t\\\\\\\"Setup a forest with treePercentage of trees.\\\\\\\"\\\\n\\\\n\\\\tself patchesDo: [:p |\\\\n\\\\t\\\\tp set: #isUnburnt to: 0.\\\\n\\\\t\\\\tp set: #flameLevel to: 0.\\\\n\\\\t\\\\t(10 * treePercentage) > (self random: 1000) ifTrue: [\\\\n\\\\t\\\\t\\\\tp set: #isUnburnt to: 1.\\\\n\\\\t\\\\t\\\\tp color: Color green]].\\\\n! !\\\\nMorph subclass: #StarSqueakMorph\\\\n\\\\tinstanceVariableNames: 'dimensions pixelsPerPatch patchVariables patchVariableToDisplay logPatchVariableScale patchVarDisplayForm patchForm patchColorSetter patchColorGetter turtles turtleDemons worldDemons sniffRange scaledEvaporationRate diffusionRate lastTurtleID generation running stepTime turtlesAtPatchCache turtlesAtPatchCacheValid'\\\\n\\\\tclassVariableNames: 'RandomSeed'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'StarSqueak-Kernel'!\\\\n!StarSqueakMorph commentStamp: '<historical>' prior: 0!\\\\nI implement a StarSqueak simulation. StarSqueak is a Squeak version of Mitchel Resnick's Star Logo, a simulation environment designed to explore massively parallel simulations with hundreds or thousands of turtles. See the excellent book \\\\\\\"Turtles, Termites, and Traffic Jams: Explorations in Massively Parallel Microworlds\\\\\\\" by Mitchel Resnick, MIT Press, 1994.\\\\n!\\\\n\\\\n\\\\n!StarSqueakMorph methodsFor: 'accessing' stamp: 'jm 2/7/2001 13:48'!\\\\ndiffusionRate\\\\n\\\\n\\\\t^ diffusionRate\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'accessing' stamp: 'sd 11/20/2005 21:26'!\\\\ndiffusionRate: newRate\\\\n\\\\t\\\\\\\"Set the diffusion rate to an integer between 0 and 10. The diffusion rate gives the number of patches on one size of the area averaged to compute the next value of the variable for a given patch. Larger numbers cause faster diffusion. Zero means no diffusion.\\\\\\\"\\\\n\\\\n\\\\tdiffusionRate := (newRate rounded max: 0) min: 10.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'accessing' stamp: 'jm 2/7/2001 18:59'!\\\\nevaporationRate\\\\n\\\\n\\\\t^ 1024 - scaledEvaporationRate! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'accessing' stamp: 'sd 11/20/2005 21:26'!\\\\nevaporationRate: newRate\\\\n\\\\t\\\\\\\"Set the evaporation rate. The useful range is 0 to 25 or so. Larger numbers cause faster evaporation. Zero means no evaporization.\\\\\\\"\\\\n\\\\n\\\\tscaledEvaporationRate := ((1024 - newRate truncated) max: 1) min: 1024.\\\\n\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'accessing' stamp: 'jm 3/3/2001 12:50'!\\\\npixelsPerPatch\\\\n\\\\n\\\\t^ pixelsPerPatch\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'accessing' stamp: 'sd 11/20/2005 21:26'!\\\\npixelsPerPatch: anInteger\\\\n\\\\t\\\\\\\"Set the width of one patch in pixels. Larger numbers scale up this StarSqueak world, but numbers larger than 2 or 3 result in a blocky look. The useful range is 1 to 10.\\\\\\\"\\\\n\\\\n\\\\tpixelsPerPatch := (anInteger rounded max: 1) min: 10.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakMorph methodsFor: 'drawing' stamp: 'jm 3/3/2001 12:55'!\\\\nareasRemainingToFill: aRectangle\\\\n\\\\t\\\\\\\"Drawing optimization. Since I completely fill my bounds with opaque pixels, this method tells Morphic that it isn't necessary to draw any morphs covered by me.\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ aRectangle areasOutside: self bounds\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'drawing' stamp: 'sd 11/20/2005 21:26'!\\\\ndisplay\\\\n\\\\t\\\\\\\"Display this world on the Display. Used for debugging.\\\\\\\"\\\\n\\\\n\\\\t| c |\\\\n\\\\tc := FormCanvas extent: (dimensions * pixelsPerPatch) depth: 32.\\\\n\\\\tc := c copyOffset: bounds origin negated.\\\\n\\\\tself drawOn: c.\\\\n\\\\tc form display.\\\\n\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'drawing' stamp: 'sd 11/20/2005 21:26'!\\\\ndrawOn: aCanvas\\\\n\\\\t\\\\\\\"Display this StarSqueak world.\\\\\\\"\\\\n\\\\n\\\\t| tmpForm bitBlt t |\\\\n\\\\t\\\\\\\"copy the patches form\\\\\\\"\\\\n\\\\ttmpForm := patchForm deepCopy.\\\\n\\\\n\\\\t\\\\\\\"draw patchVariableToDisplay on top of tmpForm as translucent color\\\\\\\"\\\\n\\\\tself displayPatchVariableOn: tmpForm color: Color yellow shift: logPatchVariableScale.\\\\n\\\\n\\\\t\\\\\\\"draw turtles on top of tmpForm\\\\\\\"\\\\n\\\\tbitBlt := (BitBlt toForm: tmpForm)\\\\n\\\\t\\\\tclipRect: tmpForm boundingBox;\\\\n\\\\t\\\\tcombinationRule: Form over.\\\\n\\\\t1 to: turtles size do: [:i |\\\\n\\\\t\\\\tt := turtles at: i.\\\\n\\\\t\\\\tbitBlt\\\\n\\\\t\\\\t\\\\tdestX: (pixelsPerPatch * t x truncated)\\\\n\\\\t\\\\t\\\\tdestY: (pixelsPerPatch * t y truncated)\\\\n\\\\t\\\\t\\\\twidth: pixelsPerPatch\\\\n\\\\t\\\\t\\\\theight: pixelsPerPatch.\\\\n\\\\t\\\\tbitBlt\\\\n\\\\t\\\\t\\\\tfillColor: t color;\\\\n\\\\t\\\\t\\\\tcopyBits].\\\\n\\\\n\\\\t\\\\\\\"display tmpForm\\\\\\\"\\\\n\\\\taCanvas paintImage: tmpForm at: bounds origin.\\\\n\\\\n! !\\\\n\\\\n\\\\n!StarSqueakMorph methodsFor: 'geometry' stamp: 'jm 2/7/2001 13:31'!\\\\nextent: aPoint\\\\n\\\\t\\\\\\\"Do nothing; my extent is determined by my StarSqueak world dimensions and pixelsPerPatch.\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!StarSqueakMorph methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:26'!\\\\ninitialize\\\\n\\\\n\\\\tsuper initialize.\\\\n\\\\tdimensions := self starSqueakDimensions.  \\\\\\\"dimensions of this StarSqueak world in patches\\\\\\\"\\\\n\\\\tpixelsPerPatch := 2.\\\\n\\\\tsuper extent: dimensions * pixelsPerPatch.\\\\n\\\\tself evaporationRate: 6.\\\\n\\\\tself diffusionRate: 1.\\\\n\\\\tself clearAll.  \\\\\\\"be sure this is done once in case setup fails to do it\\\\\\\"\\\\n\\\\tself setup.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakMorph methodsFor: 'menu' stamp: 'dgd 8/30/2003 22:17'!\\\\naddCustomMenuItems: aCustomMenu hand: aHandMorph\\\\n\\\\n\\\\tsuper addCustomMenuItems: aCustomMenu hand: aHandMorph.\\\\n\\\\taCustomMenu addLine.\\\\n\\\\taCustomMenu add: 'start' translated action: #startRunning.\\\\n\\\\taCustomMenu add: 'stop' translated action: #stopRunning.\\\\n\\\\taCustomMenu add: 'step' translated action: #singleStep.\\\\n\\\\taCustomMenu add: 'start over' translated action: #startOver.\\\\n\\\\taCustomMenu addLine.\\\\n\\\\taCustomMenu add: 'full speed' translated action: #fullSpeed.\\\\n\\\\taCustomMenu add: 'slow speed' translated action: #slowSpeed.\\\\n\\\\taCustomMenu addLine.\\\\n\\\\taCustomMenu add: 'set scale' translated action: #setScale.\\\\n\\\\taCustomMenu add: 'make parameter slider' translated action: #makeParameterSlider.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'menu' stamp: 'sd 11/20/2005 21:26'!\\\\nfullSpeed\\\\n\\\\t\\\\\\\"Run at maximum speed.\\\\\\\"\\\\n\\\\n\\\\tstepTime := 0.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'menu' stamp: 'dgd 2/21/2003 22:53'!\\\\nmakeParameterSlider\\\\n\\\\t| menu choice s |\\\\n\\\\tmenu := CustomMenu new title: 'Parameter?'.\\\\n\\\\tself sliderParameters do: [:rec | menu add: rec first action: rec].\\\\n\\\\tchoice := menu startUp.\\\\n\\\\tchoice ifNil: [^self].\\\\n\\\\ts := self \\\\n\\\\t\\\\t\\\\t\\\\tnewSliderForParameter: choice first\\\\n\\\\t\\\\t\\\\t\\\\ttarget: self\\\\n\\\\t\\\\t\\\\t\\\\tmin: (choice second)\\\\n\\\\t\\\\t\\\\t\\\\tmax: (choice third)\\\\n\\\\t\\\\t\\\\t\\\\tdescription: (choice fourth).\\\\n\\\\tself world activeHand attachMorph: s! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'menu' stamp: 'sd 11/20/2005 21:26'!\\\\nsetScale\\\\n\\\\n\\\\t| reply |\\\\n\\\\treply := FillInTheBlank\\\\n\\\\t\\\\trequest: 'Set the number of pixels per patch (a number between 1 and 10)?'\\\\n\\\\t\\\\t initialAnswer: pixelsPerPatch printString.\\\\n\\\\treply isEmpty ifTrue: [^ self].\\\\n\\\\tpixelsPerPatch := ((reply asNumber rounded) max: 1) min: 10.\\\\n\\\\tself changed.\\\\n\\\\tsuper extent: dimensions * pixelsPerPatch.\\\\n\\\\tself clearAll.  \\\\\\\"be sure this is done once in case setup fails to do it\\\\\\\"\\\\n\\\\tself setup.\\\\n\\\\tself startOver.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'menu' stamp: 'jm 2/5/2001 17:52'!\\\\nsingleStep\\\\n\\\\t\\\\\\\"Take one step and redisplay.\\\\\\\"\\\\n\\\\n\\\\tself oneStep.\\\\n\\\\tself changed.\\\\n\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'menu' stamp: 'jm 2/7/2001 19:07'!\\\\nsliderParameters\\\\n\\\\t\\\\\\\"Answer a list of parameters that the user can change via a slider. Each parameter is described by an array of: <name> <min value> <max value> <balloon help string>.\\\\\\\"\\\\n\\\\n\\\\t^ #((evaporationRate 0 40\\\\n\\\\t\\\\t\\\\t'The rate at which chemicals evaporate in this world. Larger numbers give faster evaporation.')\\\\n\\\\t\\\\t(diffusionRate 0 5\\\\n\\\\t\\\\t\\\\t'The rate of chemical diffusion. Larger numbers give quicker diffusion.'))\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'menu' stamp: 'sd 11/20/2005 21:26'!\\\\nslowSpeed\\\\n\\\\t\\\\\\\"Run at slow speed.\\\\\\\"\\\\n\\\\n\\\\tstepTime := 250.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'menu' stamp: 'jm 2/6/2001 22:04'!\\\\nstartOver\\\\n\\\\t\\\\\\\"Restart this StarSqueak simulation from its initial conditions.\\\\\\\"\\\\n\\\\n\\\\tself clearAll.\\\\n\\\\tself setup.\\\\n\\\\tself changed.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'menu' stamp: 'sd 11/20/2005 21:26'!\\\\nstartRunning\\\\n\\\\t\\\\\\\"Start running this StarSqueak simulation.\\\\\\\"\\\\n\\\\n\\\\trunning := true.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'menu' stamp: 'sd 11/20/2005 21:26'!\\\\nstopRunning\\\\n\\\\t\\\\\\\"STop running this StarSqueak simulation.\\\\\\\"\\\\n\\\\n\\\\trunning := false.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakMorph methodsFor: 'parts bin' stamp: 'sw 7/13/2001 22:22'!\\\\ninitializeToStandAlone\\\\n\\\\tself initialize.\\\\n\\\\tself startRunning! !\\\\n\\\\n\\\\n!StarSqueakMorph methodsFor: 'patches' stamp: 'jm 3/8/2001 13:47'!\\\\nclearPatches\\\\n\\\\t\\\\\\\"Clear patch colors, including turtle trails.\\\\\\\"\\\\n\\\\n\\\\tpatchForm fill: patchForm boundingBox fillColor: Color black.\\\\n\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'patches' stamp: 'jm 1/22/2001 16:52'!\\\\ncreatePatchVariable: patchVarName\\\\n\\\\t\\\\\\\"Create a patch variable of the given name. It is initialized to a value of zero for every patch.\\\\\\\"\\\\n\\\\n\\\\tpatchVariables\\\\n\\\\t\\\\tat: patchVarName\\\\n\\\\t\\\\tput: (Bitmap new: (dimensions x * dimensions y) withAll: 0).\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'patches' stamp: 'sd 11/20/2005 21:26'!\\\\ndecayPatchVariable: patchVarName\\\\n\\\\t\\\\\\\"Decay the values of the patch variable of the given name. That is, the value of each patch is replaced by a fraction of its former value, resulting in an expontial decay each patch's value over time. This can be used to model evaporation of a pheromone.\\\\\\\"\\\\n\\\\n\\\\t| patchVar |\\\\n\\\\tpatchVar := patchVariables at: patchVarName ifAbsent: [^ self].\\\\n\\\\tself primEvaporate: patchVar rate: scaledEvaporationRate.\\\\n\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'patches' stamp: 'sd 11/20/2005 21:26'!\\\\ndiffusePatchVariable: patchVarName\\\\n\\\\t\\\\\\\"Diffuse the patch variable of the given name.\\\\\\\"\\\\n\\\\n\\\\t| v newV |\\\\n\\\\tdiffusionRate = 0 ifTrue: [^ self].  \\\\\\\"no diffusion\\\\\\\"\\\\n\\\\tv := patchVariables at: patchVarName ifAbsent: [^ self].\\\\n\\\\tnewV := Bitmap new: v size.\\\\n\\\\tself primDiffuseFrom: v\\\\n\\\\t\\\\tto: newV\\\\n\\\\t\\\\twidth: dimensions x\\\\n\\\\t\\\\theight: dimensions y\\\\n\\\\t\\\\tdelta: diffusionRate truncated.\\\\n\\\\tpatchVariables at: patchVarName put: newV.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'patches' stamp: 'sd 11/20/2005 21:26'!\\\\npatchesDo: aBlock\\\\n\\\\t\\\\\\\"Evaluate the given block for every patch in this world.\\\\\\\"\\\\n\\\\n\\\\t| patch |\\\\n\\\\tpatch := StarSqueakPatch new world: self.\\\\n\\\\t0 to: dimensions y - 1 do: [:y |\\\\n\\\\t\\\\tpatch y: y.\\\\n\\\\t\\\\t0 to: dimensions x - 1 do: [:x |\\\\n\\\\t\\\\t\\\\tpatch x: x.\\\\n\\\\t\\\\t\\\\taBlock value: patch]].\\\\n! !\\\\n\\\\n\\\\n!StarSqueakMorph methodsFor: 'setup' stamp: 'sd 11/20/2005 21:26'!\\\\naddTurtleDemon: aSelector\\\\n\\\\t\\\\\\\"Add the given selector to the list of selectors sent to every turtle on every step.\\\\\\\"\\\\n\\\\n\\\\tturtleDemons := turtleDemons copyWith: aSelector.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'setup' stamp: 'sd 11/20/2005 21:26'!\\\\naddWorldDemon: aSelector\\\\n\\\\t\\\\\\\"Add the given selector to the list of selectors sent to the world on every step.\\\\\\\"\\\\n\\\\n\\\\tworldDemons := worldDemons copyWith: aSelector.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'setup' stamp: 'sd 11/20/2005 21:26'!\\\\nclearAll\\\\n\\\\t\\\\\\\"Reset this StarSqueak world. All patch variables are cleared, all turtles are removed, and all demons are turned off.\\\\\\\"\\\\n\\\\n\\\\tpatchVariables := Dictionary new: 10.\\\\n\\\\tpatchVariableToDisplay := nil.\\\\n\\\\tlogPatchVariableScale := 0.\\\\n\\\\tpatchForm := Form extent: (dimensions * pixelsPerPatch) depth: 32.\\\\n\\\\tself createPatchFormGetterAndSetter.\\\\n\\\\tpatchVarDisplayForm := nil.\\\\n\\\\tself clearPatches.\\\\n\\\\tturtles := #().\\\\n\\\\tturtleDemons := #().\\\\n\\\\tworldDemons := #().\\\\n\\\\tsniffRange := 1.\\\\n\\\\tlastTurtleID := -1.\\\\n\\\\tgeneration := 0.\\\\n\\\\trunning := false.\\\\n\\\\tstepTime := 0.  \\\\\\\"full speed\\\\\\\"\\\\n\\\\tturtlesAtPatchCache := nil.\\\\n\\\\tturtlesAtPatchCacheValid := false.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'setup' stamp: 'jm 1/24/2001 12:42'!\\\\ndisplayPatchVariable: patchVarName\\\\n\\\\t\\\\\\\"Make this StarSqueak world display the patch variable of the given name. Only one patch variable can be displayed at any given time.\\\\\\\"\\\\n\\\\n\\\\tself displayPatchVariable: patchVarName logScale: -2.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'setup' stamp: 'sd 11/20/2005 21:26'!\\\\ndisplayPatchVariable: patchVarName logScale: logBase2OfScaleFactor\\\\n\\\\t\\\\\\\"Make this StarSqueak world display the patch variable of the given name. Only one patch variable can be displayed at any given time. Values are scaled by 2^logBase2OfScaleFactor. For example, a value of 5 scales by 32 and a value of -2 scales by 1/4.\\\\\\\"\\\\n\\\\n\\\\t(patchVariables includesKey: patchVarName) ifFalse: [\\\\n\\\\t\\\\tpatchVariableToDisplay := nil.\\\\n\\\\t\\\\tpatchVarDisplayForm := nil.\\\\n\\\\t\\\\t^ self].\\\\n\\\\tpatchVariableToDisplay := patchVarName.\\\\n\\\\tpatchVarDisplayForm := Form extent: (dimensions * pixelsPerPatch) depth: 32.\\\\n\\\\tlogPatchVariableScale := logBase2OfScaleFactor.\\\\n\\\\tself clearPatches.\\\\n\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'setup' stamp: 'sd 11/20/2005 21:26'!\\\\nrandom: range\\\\n\\\\t\\\\\\\"Answer a random integer between 0 and range.\\\\\\\"\\\\n\\\\n\\\\tRandomSeed := ((RandomSeed * 1309) + 13849) bitAnd: 65535.\\\\n\\\\t^ (RandomSeed * (range + 1)) // 65536\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'setup' stamp: 'jm 1/23/2001 07:24'!\\\\nsetup\\\\n\\\\t\\\\\\\"Subclasses should override this to setup the initial conditions of this StarSqueak world. The method should start with 'self clearAll'.\\\\\\\"\\\\n\\\\n\\\\tself clearAll.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'setup' stamp: 'jm 3/3/2001 12:54'!\\\\nstarSqueakDimensions\\\\n\\\\t\\\\\\\"Answer the dimensions of this StarSqueak simulation. Subclasses can override this method to define their own world size.\\\\\\\"\\\\n\\\\n\\\\t^ 100@100\\\\n! !\\\\n\\\\n\\\\n!StarSqueakMorph methodsFor: 'stepping and presenter' stamp: 'dgd 2/21/2003 22:53'!\\\\noneStep\\\\n\\\\t\\\\\\\"Perform one step of the StarSqueak world. Execute all turtle and world demons.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"run demons in random order and increment the generation counter\\\\\\\"\\\\n\\\\n\\\\t| currentTurtles |\\\\n\\\\tturtleDemons notEmpty \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"Note: Make a copy of turtles list that won't change if turtles are created/deleted.\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\tcurrentTurtles := turtles copy.\\\\n\\\\t\\\\t\\\\tturtleDemons shuffled \\\\n\\\\t\\\\t\\\\t\\\\tdo: [:sel | 1 to: currentTurtles size do: [:i | (currentTurtles at: i) perform: sel]]].\\\\n\\\\tworldDemons shuffled do: [:sel | self perform: sel].\\\\n\\\\tgeneration := generation + 1.\\\\n\\\\tturtlesAtPatchCacheValid := false! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'stepping and presenter' stamp: 'jm 1/26/2001 17:21'!\\\\nstep\\\\n\\\\n\\\\trunning ifTrue: [\\\\n\\\\t\\\\tself oneStep.\\\\n\\\\t\\\\tself changed].\\\\n! !\\\\n\\\\n\\\\n!StarSqueakMorph methodsFor: 'testing' stamp: 'jm 1/22/2001 17:52'!\\\\nstepTime\\\\n\\\\n\\\\t^ stepTime\\\\n! !\\\\n\\\\n\\\\n!StarSqueakMorph methodsFor: 'turtles' stamp: 'jm 3/12/2001 09:44'!\\\\nmakeTurtles: count\\\\n\\\\t\\\\\\\"Create the given number of generic turtles.\\\\\\\"\\\\n\\\\n\\\\tself makeTurtles: count class: StarSqueakTurtle.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'turtles' stamp: 'sd 11/20/2005 21:26'!\\\\nmakeTurtles: count class: turtleClass\\\\n\\\\t\\\\\\\"Create the given number of turtles of the given turtle class.\\\\\\\"\\\\n\\\\n\\\\tturtles := turtles,\\\\n\\\\t\\\\t((1 to: count) collect: [:i |\\\\n\\\\t\\\\t\\\\tturtleClass new\\\\n\\\\t\\\\t\\\\t\\\\tinitializeWorld: self\\\\n\\\\t\\\\t\\\\t\\\\twho: (lastTurtleID := lastTurtleID + 1)]).\\\\n\\\\tself changed.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'turtles' stamp: 'jm 1/28/2001 10:55'!\\\\nturtles\\\\n\\\\n\\\\t^ turtles\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'turtles' stamp: 'dgd 2/21/2003 22:53'!\\\\nturtlesAtX: x y: y do: aBlock \\\\n\\\\t\\\\\\\"Evaluate the given block for each turtle at the given location.\\\\\\\"\\\\n\\\\n\\\\t| t |\\\\n\\\\tt := self firstTurtleAtX: x y: y.\\\\n\\\\t[t isNil] whileFalse: \\\\n\\\\t\\\\t\\\\t[aBlock value: t.\\\\n\\\\t\\\\t\\\\tt := t nextTurtle]! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'turtles' stamp: 'jm 3/3/2001 18:08'!\\\\nturtlesDo: aBlock\\\\n\\\\t\\\\\\\"Evaluate the given block for every turtle. For example:\\\\n\\\\t\\\\tw turtlesDo: [:t | t forward: 1]\\\\n\\\\twill tell every turtle to go forward by one turtle step.\\\\\\\"\\\\n\\\\n\\\\tturtles do: aBlock.\\\\n\\\\tself changed.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'sd 11/20/2005 21:26'!\\\\ncreatePatchFormGetterAndSetter\\\\n\\\\t\\\\\\\"Create BitBlt's for getting and setting patch colors.\\\\\\\"\\\\n\\\\n\\\\tpatchColorGetter := BitBlt bitPeekerFromForm: patchForm.\\\\n\\\\tpatchColorSetter :=\\\\n\\\\t\\\\t(BitBlt toForm: patchForm)\\\\n\\\\t\\\\t\\\\tcombinationRule: Form over;\\\\n\\\\t\\\\t\\\\tclipRect: patchForm boundingBox;\\\\n\\\\t\\\\t\\\\twidth: pixelsPerPatch;\\\\n\\\\t\\\\t\\\\theight: pixelsPerPatch.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'sd 11/20/2005 21:26'!\\\\ndeleteTurtle: aTurtle\\\\n\\\\t\\\\\\\"Delete the given turtle from this world.\\\\\\\"\\\\n\\\\n\\\\tturtles := turtles copyWithout: aTurtle.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'jm 1/22/2001 16:58'!\\\\ndimensions\\\\n\\\\n\\\\t^ dimensions\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'jdl 3/28/2003 09:32'!\\\\ndisplayPatchVariableOn: aForm color: aColor shift: shiftAmount \\\\n\\\\t\\\\\\\"Display patchVariableToDisplay in the given color. The opacity (alpha) of of each patch is determined by the patch variable value for that patch and shiftAmount. If shiftAmount is zero, the source value is unscaled. Positive shiftAmount values result in right shifting the source value by the given number of bits (That is, multiplying by 2^N. Negative values perform right shifts, dividing by 2^N).\\\\\\\"\\\\n\\\\n\\\\t| patchVar bitBlt w rowOffset alpha |\\\\n\\\\tpatchVariableToDisplay ifNil: [^self].\\\\n\\\\tpatchVar := patchVariables at: patchVariableToDisplay ifAbsent: [^self].\\\\n\\\\n\\\\t\\\\\\\"set up the BitBlt\\\\\\\"\\\\n\\\\tbitBlt := (BitBlt toForm: aForm)\\\\n\\\\t\\\\t\\\\t\\\\tsourceRect: (0 @ 0 extent: pixelsPerPatch);\\\\n\\\\t\\\\t\\\\t\\\\tfillColor: aColor;\\\\n\\\\t\\\\t\\\\t\\\\tcombinationRule: 30.\\\\n\\\\tw := dimensions x.\\\\n\\\\t0 to: dimensions y - 1\\\\n\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t[:y | \\\\n\\\\t\\\\t\\\\trowOffset := y * w + 1.\\\\n\\\\t\\\\t\\\\t0 to: w - 1\\\\n\\\\t\\\\t\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:x | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\talpha := (patchVar at: rowOffset + x) bitShift: shiftAmount.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\talpha := alpha min: 255.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\talpha > 1 \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"if not transparent, fill using the given alpha\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbitBlt destOrigin: (x * pixelsPerPatch) @ (y * pixelsPerPatch).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbitBlt copyBitsTranslucent: alpha]]]! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'sd 11/20/2005 21:26'!\\\\nfirstTurtleAtX: xPos y: yPos \\\\n\\\\n\\\\t| w t x y index |\\\\n\\\\t\\\\\\\"create turtlesAtPatchCache if necessary\\\\\\\"\\\\n\\\\tturtlesAtPatchCache ifNil: [\\\\n\\\\t\\\\tturtlesAtPatchCache := Array new: (dimensions x * dimensions y) withAll: nil.\\\\n\\\\t\\\\tturtlesAtPatchCacheValid := false].\\\\n\\\\n\\\\tw := dimensions y.\\\\n\\\\tturtlesAtPatchCacheValid ifFalse: [\\\\n\\\\t\\\\tturtlesAtPatchCache atAllPut: nil.\\\\n\\\\t\\\\t\\\\\\\"cache not yet computed for this step; make linked list of turtles for each patch\\\\\\\"\\\\n\\\\t\\\\t1 to: turtles size do: [:i |\\\\n\\\\t\\\\t\\\\tt := turtles at: i.\\\\n\\\\t\\\\t\\\\tx := t x truncated.\\\\n\\\\t\\\\t\\\\ty := t y truncated.\\\\n\\\\t\\\\t\\\\tindex := (w * y) + x + 1.\\\\n\\\\t\\\\t\\\\tt nextTurtle: (turtlesAtPatchCache at: index).\\\\n\\\\t\\\\t\\\\tturtlesAtPatchCache at: index put: t].\\\\n\\\\t\\\\tturtlesAtPatchCacheValid := true].\\\\n\\\\n\\\\tx := xPos truncated.\\\\n\\\\ty := yPos truncated.\\\\n\\\\tindex := (w * y) + x + 1.\\\\n\\\\t^ turtlesAtPatchCache at: index\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'sd 11/20/2005 21:26'!\\\\ngetPatchBrightnessAtX: x y: y\\\\n\\\\t\\\\\\\"Answer the brightness of the patch at the given location, a number from 0 to 100.\\\\\\\"\\\\n\\\\n\\\\t| c |\\\\n\\\\tc := self getPatchColorAtX: x y: y.\\\\n\\\\t^ (c brightness * 100.0) rounded\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'sd 11/20/2005 21:26'!\\\\ngetPatchColorAtX: x y: y\\\\n\\\\t\\\\\\\"Answer the color of the patch at the given location.\\\\\\\"\\\\n\\\\n\\\\t| pixel |\\\\n\\\\tpixel := patchColorGetter pixelAt:\\\\n\\\\t\\\\t(pixelsPerPatch * x truncated)@(pixelsPerPatch * y truncated).\\\\n\\\\t^ Color colorFromPixelValue: pixel depth: patchForm depth\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'sd 11/20/2005 21:26'!\\\\ngetPatchVariable: patchVarName atX: xPos y: yPos\\\\n\\\\t\\\\\\\"Answer the value of the given patch variable at the given turtle. Answer zero if the turtle is out of bounds.\\\\\\\"\\\\n\\\\n\\\\t| x y i |\\\\n\\\\tx := xPos truncated.\\\\n\\\\ty := yPos truncated.\\\\n\\\\t((x < 0) or: [y < 0]) ifTrue: [^ 0].\\\\n\\\\t((x >= dimensions x) or: [y >= dimensions y]) ifTrue: [^ 0].\\\\n\\\\ti := ((y * dimensions x) + x) truncated + 1.\\\\n\\\\t^ (patchVariables at: patchVarName ifAbsent: [^ 0]) at: i\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'sd 11/20/2005 21:26'!\\\\nincrementPatchVariable: patchVarName atX: xPos y: yPos by: amount\\\\n\\\\t\\\\\\\"Increment the value of the given patch variable at the given location by the given amount. Do nothing if the location is out of bounds.\\\\\\\"\\\\n\\\\n\\\\t| x y i var |\\\\n\\\\tx := xPos truncated.\\\\n\\\\ty := yPos truncated.\\\\n\\\\t((x < 0) or: [y < 0]) ifTrue: [^ self].\\\\n\\\\t((x >= dimensions x) or: [y >= dimensions y]) ifTrue: [^ self].\\\\n\\\\ti := ((y * dimensions x) + x) truncated + 1.\\\\n\\\\tvar := patchVariables at: patchVarName ifAbsent: [^ self].\\\\n\\\\tvar at: i put: ((var at: i) + amount).\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'sd 11/20/2005 21:26'!\\\\nnewSliderForParameter: parameter target: target min: min max: max description: description\\\\n\\\\n\\\\t| c slider r s |\\\\n\\\\tc := (AlignmentMorph newColumn)\\\\n\\\\t\\\\tcolor: Color lightBlue;\\\\n\\\\t\\\\tborderWidth: 2;\\\\n\\\\t\\\\thResizing: #shrinkWrap;\\\\n\\\\t\\\\tvResizing: #shrinkWrap;\\\\n\\\\t\\\\tuseRoundedCorners.\\\\n\\\\tslider := SimpleSliderMorph new\\\\n\\\\t\\\\tcolor: (Color r: 0.065 g: 0.548 b: 0.645);\\\\n\\\\t\\\\textent: 150@2;\\\\n\\\\t\\\\ttarget: target;\\\\n\\\\t\\\\tactionSelector: (parameter, ':') asSymbol;\\\\n\\\\t\\\\tminVal: min;\\\\n\\\\t\\\\tmaxVal: max;\\\\n\\\\t\\\\tadjustToValue: (target perform: parameter asSymbol).\\\\n\\\\tc addMorphBack: slider.\\\\n\\\\tr := (AlignmentMorph newRow)\\\\n\\\\t\\\\tcolor: Color lightBlue;\\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tvResizing: #spaceFill.\\\\n\\\\ts := StringMorph new contents: parameter, ': '.\\\\n\\\\tr addMorphBack: s.\\\\n\\\\ts := UpdatingStringMorph new\\\\n\\\\t\\\\ttarget: target;\\\\n\\\\t\\\\tgetSelector: parameter asSymbol;\\\\n\\\\t\\\\tputSelector: (parameter, ':') asSymbol;\\\\n\\\\t\\\\tfloatPrecision: (10.0 raisedTo: (((max - min) / 150.0) log: 10) floor);\\\\n\\\\t\\\\tstep.\\\\n\\\\tr addMorphBack: s.\\\\n\\\\tc addMorphBack: r.\\\\n\\\\tc setBalloonText: description.\\\\n\\\\t^ c\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'jm 1/18/2001 21:58'!\\\\npatchVariable: patchVarName ifAbsent: aBlock\\\\n\\\\t\\\\\\\"Answer the patch variable array of the given name. If no such patch variables exists, answer the result of evaluating the given block.\\\\\\\"\\\\n\\\\n\\\\t^ patchVariables at: patchVarName ifAbsent: aBlock\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'sd 11/20/2005 21:26'!\\\\nreplicateTurtle: aTurtle\\\\n\\\\t\\\\\\\"Create an exact copy of the given turtle and add it to this world.\\\\\\\"\\\\n\\\\n\\\\t| newTurtle |\\\\n\\\\tnewTurtle := aTurtle clone who: (lastTurtleID := lastTurtleID + 1).\\\\n\\\\tturtles := turtles copyWith: newTurtle.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'jdl 3/28/2003 09:34'!\\\\nsetPatchBrightnessAtX: x y: y to: percent \\\\n\\\\t\\\\\\\"Set the brightness of the patch at the given location to the given level, where 0 is black and 100 is full brightness.\\\\\\\"\\\\n\\\\n\\\\t| c brightness |\\\\n\\\\tc := self getPatchColorAtX: x y: y.\\\\n\\\\tbrightness := percent / 100.0.\\\\n\\\\tbrightness := brightness max: 0.03125.\\\\n\\\\tself \\\\n\\\\t\\\\tsetPatchColorAtX: x\\\\n\\\\t\\\\ty: y\\\\n\\\\t\\\\tto: (Color \\\\n\\\\t\\\\t\\\\t\\\\th: c hue\\\\n\\\\t\\\\t\\\\t\\\\ts: c saturation\\\\n\\\\t\\\\t\\\\t\\\\tv: brightness)! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'jm 2/7/2001 07:20'!\\\\nsetPatchColorAtX: x y: y to: aColor\\\\n\\\\t\\\\\\\"Paint the patch at the given location with the given color.\\\\\\\"\\\\n\\\\n\\\\tpatchColorSetter\\\\n\\\\t\\\\tfillColor: aColor;\\\\n\\\\t\\\\tdestX: (pixelsPerPatch * x truncated);\\\\n\\\\t\\\\tdestY: (pixelsPerPatch * y truncated);\\\\n\\\\t\\\\tcopyBits.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'sd 11/20/2005 21:26'!\\\\nsetPatchVariable: patchVarName atX: xPos y: yPos to: newValue\\\\n\\\\t\\\\\\\"Set the value of the given patch variable below the given turtle to the given value. Do nothing if the turtle is out of bounds.\\\\\\\"\\\\n\\\\n\\\\t| x y i var |\\\\n\\\\tx := xPos truncated.\\\\n\\\\ty := yPos truncated.\\\\n\\\\t((x < 0) or: [y < 0]) ifTrue: [^ self].\\\\n\\\\t((x >= dimensions x) or: [y >= dimensions y]) ifTrue: [^ self].\\\\n\\\\ti := ((y * dimensions x) + x) truncated + 1.\\\\n\\\\tvar := patchVariables at: patchVarName ifAbsent: [^ self].\\\\n\\\\tvar at: i put: newValue.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'sd 11/20/2005 21:26'!\\\\nsumPatchVariable: patchVarName neighborsAtX: xPos y: yPos\\\\n\\\\t\\\\\\\"Answer the sum of the given patch variable for the eight neighbors of the patch at the given location. Answer zero if the location is out of bounds.\\\\\\\"\\\\n\\\\n\\\\t| patchVar x y w h xLeft xRight rowOffset sum |\\\\n\\\\tpatchVar := patchVariables at: patchVarName ifAbsent: [^ 0].\\\\n\\\\tx := xPos truncated.\\\\n\\\\ty := yPos truncated.\\\\n\\\\tw := dimensions x.\\\\n\\\\th := dimensions y.\\\\n\\\\t((x < 0) or: [y < 0]) ifTrue: [^ 0].\\\\n\\\\t((x >= w) or: [y >= h]) ifTrue: [^ 0].\\\\n\\\\txLeft := (x - 1) \\\\\\\\\\\\\\\\ w.  \\\\\\\"column before x, wrapped\\\\\\\"\\\\n\\\\txRight := (x + 1) \\\\\\\\\\\\\\\\ w.  \\\\\\\"column after x, wrapped\\\\\\\"\\\\n\\\\trowOffset := y * w.\\\\n\\\\tsum :=\\\\n\\\\t\\\\t(patchVar at: rowOffset + xLeft) +\\\\n\\\\t\\\\t(patchVar at: rowOffset + xRight).\\\\n\\\\trowOffset := ((y - 1) \\\\\\\\\\\\\\\\ h) * w.  \\\\\\\"row above y, wrapped\\\\\\\"\\\\n\\\\tsum := sum +\\\\n\\\\t\\\\t(patchVar at: rowOffset + xLeft) +\\\\n\\\\t\\\\t(patchVar at: rowOffset + x) +\\\\n\\\\t\\\\t(patchVar at: rowOffset + xRight).\\\\n\\\\trowOffset := ((y + 1) \\\\\\\\\\\\\\\\ h) * w.  \\\\\\\"row below y, wrapped\\\\\\\"\\\\n\\\\tsum := sum +\\\\n\\\\t\\\\t(patchVar at: rowOffset + xLeft) +\\\\n\\\\t\\\\t(patchVar at: rowOffset + x) +\\\\n\\\\t\\\\t(patchVar at: rowOffset + xRight).\\\\n\\\\t^ sum\\\\n\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'jdl 3/28/2003 09:36'!\\\\nuphillOf: patchVarName forTurtle: aTurtle \\\\n\\\\t\\\\\\\"Answer the heading the points in the direction of increasing value for the given patch variable. If there is no gradient, or if the turtle is outside the world bounds, answer the turtles current heading.\\\\\\\"\\\\n\\\\n\\\\t| patchVar turtleX turtleY startX endX startY endY maxVal rowOffset thisVal maxValX maxValY |\\\\n\\\\tpatchVar := patchVariables at: patchVarName ifAbsent: [^aTurtle heading].\\\\n\\\\tturtleX := aTurtle x truncated + 1.\\\\n\\\\tturtleY := aTurtle y truncated + 1.\\\\n\\\\tturtleX := turtleX max: 1.\\\\n\\\\tturtleY := turtleY max: 1.\\\\n\\\\tturtleX := turtleX min: dimensions x.\\\\n\\\\tturtleY := turtleY min: dimensions y.\\\\n\\\\tstartX := turtleX - sniffRange max: 1.\\\\n\\\\tendX := turtleX + sniffRange min: dimensions x.\\\\n\\\\tstartY := turtleY - sniffRange max: 1.\\\\n\\\\tendY := turtleY + sniffRange min: dimensions y.\\\\n\\\\tmaxVal := patchVar at: (turtleY - 1) * dimensions x + turtleX.\\\\n\\\\tmaxValX := nil.\\\\n\\\\tstartY to: endY\\\\n\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t[:y | \\\\n\\\\t\\\\t\\\\trowOffset := (y - 1) * dimensions x.\\\\n\\\\t\\\\t\\\\tstartX to: endX\\\\n\\\\t\\\\t\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:x | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tthisVal := patchVar at: rowOffset + x.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tthisVal > maxVal \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[maxValX := x.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmaxValY := y.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmaxVal := thisVal]]].\\\\n\\\\tnil = maxValX ifTrue: [^aTurtle heading].\\\\n\\\\t^(((maxValX - turtleX) @ (maxValY - turtleY)) degrees + 90.0) \\\\\\\\\\\\\\\\ 360.0! !\\\\n\\\\n\\\\n!StarSqueakMorph methodsFor: 'private-primitives' stamp: 'jdl 3/28/2003 09:46'!\\\\nprimDiffuseFrom: srcBitmap to: dstBitmap width: width height: height delta: delta \\\\n\\\\t\\\\\\\"Diffuse the integer values of the source patch variable Bitmap into the output Bitmap. Each cell of the output is the average of the NxN area around it in the source, where N = (2 * delta) + 1.\\\\\\\"\\\\n\\\\n\\\\t| area startY endY startX endX sum rowStart |\\\\n\\\\t<primitive: 'primitiveDiffuseFromToWidthHeightDelta' module: 'StarSqueakPlugin'>\\\\n\\\\tarea := (2 * delta + 1) * (2 * delta + 1).\\\\n\\\\t1 to: height\\\\n\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t[:y | \\\\n\\\\t\\\\t\\\\tstartY := y - delta.\\\\n\\\\t\\\\t\\\\tstartY := startY max: 1.\\\\n\\\\t\\\\t\\\\tendY := y + delta.\\\\n\\\\t\\\\t\\\\tendY := endY min: height.\\\\n\\\\t\\\\t\\\\t1 to: width\\\\n\\\\t\\\\t\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:x | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstartX := x - delta.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstartX := startX max: 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tendX := x + delta.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tendX := endX min: width.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsum := 0.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstartY to: endY\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:y2 | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trowStart := (y2 - 1) * width.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartX to: endX do: [:x2 | sum := sum + (srcBitmap at: rowStart + x2)]].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdstBitmap at: (y - 1) * width + x put: sum // area]]! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private-primitives' stamp: 'jm 3/12/2001 09:45'!\\\\nprimEvaporate: aBitmap rate: rate\\\\n\\\\t\\\\\\\"Evaporate the integer values of the source Bitmap at the given rate, an integer between 0 and 1024, where 1024 is a scale factor of 1.0 (i.e., no evaporation). That is, replace each integer element v with (rate * v) / 1024.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveEvaporateRate' module: 'StarSqueakPlugin'>\\\\n\\\\t1 to: aBitmap size do: [:i |\\\\n\\\\t\\\\taBitmap at: i put: (((aBitmap at: i) * rate) bitShift: -10)].\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private-primitives' stamp: 'sd 11/20/2005 21:26'!\\\\nprimMapFrom: srcBitmap to: dstBitmap width: w height: h patchSize: patchSize rgbFlags: rgbFlags shift: shiftAmount \\\\n\\\\t\\\\\\\"Map values in the source bitmap (interpreted as unsigned 32-bit integers) to 2x2 patches of color in the destination bitmap. The color brightness level is determined by the source value and the color hue is determined by the bottom three bits of the rgbFlags value. For example, if rgbFlags is 1, you get shades of blue, if it is 6 you get shades of yellow, and if it is 7, you get shades of gray. The shiftAmount is used to scale the source data values by a power of two. If shiftAmount is zero, the data is unscaled. Positive shiftAmount values result in right shifting the source data by the given number of bits (multiplying by 2^N, negative values perform right shifts (dividing by 2^N). The width parameter gives the width of the Form that owns the destination bitmap.\\\\\\\"\\\\n\\\\n\\\\t| rgbMult srcIndex level pixel offset |\\\\n\\\\t<primitive: 'primitiveMapFromToWidthHeightPatchSizeRgbFlagsShift' module: 'StarSqueakPlugin'>\\\\n\\\\trgbMult := 0.\\\\n\\\\t(rgbFlags bitAnd: 4) > 0 ifTrue: [rgbMult := rgbMult + 65536].\\\\n\\\\t(rgbFlags bitAnd: 2) > 0 ifTrue: [rgbMult := rgbMult + 256].\\\\n\\\\t(rgbFlags bitAnd: 1) > 0 ifTrue: [rgbMult := rgbMult + 1].\\\\n\\\\tsrcIndex := 0.\\\\n\\\\t0 to: h // patchSize - 1\\\\n\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t[:y | \\\\n\\\\t\\\\t\\\\t0 to: w // patchSize - 1\\\\n\\\\t\\\\t\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:x | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tlevel := (srcBitmap at: (srcIndex := srcIndex + 1)) bitShift: shiftAmount.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tlevel := level min: 255.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpixel := level <= 0 \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"non-transparent black\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t1]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [level * rgbMult].\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"fill a patchSize x patchSize square with the pixel value\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\toffset := (y * w + x) * patchSize.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\toffset to: offset + ((patchSize - 1) * w)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tby: w\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:rowStart | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trowStart + 1 to: rowStart + patchSize\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:dstIndex | dstBitmap at: dstIndex put: pixel]]]]! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private-primitives' stamp: 'sd 11/20/2005 21:26'!\\\\ntestDiffusePrim\\\\n\\\\t\\\\\\\"This test should diffuse the initial value in the center cell so that each cell has 1000.\\\\\\\"\\\\n\\\\t\\\\\\\"StarSqueakMorph new testDiffusePrim\\\\\\\"\\\\n\\\\n\\\\t| src dst |\\\\n\\\\tsrc := Bitmap new: 49.\\\\n\\\\tsrc at: 25 put: 49000.\\\\n\\\\tdst := Bitmap new: 49.\\\\n\\\\tself primDiffuseFrom: src to: dst width: 7 height: 7 delta: 3.\\\\n\\\\t^ dst asArray\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private-primitives' stamp: 'sd 11/20/2005 21:26'!\\\\ntestEvaporatePrim\\\\n\\\\t\\\\\\\"This test should result in reducing each element of the array to 75% of its initial value.\\\\\\\"\\\\n\\\\t\\\\\\\"StarSqueakMorph new testEvaporatePrim\\\\\\\"\\\\n\\\\n\\\\t| data |\\\\n\\\\tdata := Bitmap new: 10.\\\\n\\\\t1 to: data size do: [:i | data at: i put: (10000 * i)].\\\\n\\\\tself primEvaporate: data rate: (75 * 1024) // 100.\\\\n\\\\t^ data asArray\\\\n\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStarSqueakMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StarSqueakMorph class methodsFor: 'class initialization' stamp: 'sd 11/20/2005 21:26'!\\\\ninitialize\\\\n\\\\t\\\\\\\"StarSqueakMorph initialize\\\\\\\"\\\\n\\\\n\\\\tRandomSeed := 17.\\\\n! !\\\\nObject subclass: #StarSqueakPatch\\\\n\\\\tinstanceVariableNames: 'world worldWidth worldHeight x y'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'StarSqueak-Kernel'!\\\\n!StarSqueakPatch commentStamp: '<historical>' prior: 0!\\\\nI represent a patch in a StarSqueak world. Patch objects are not retained, but are created as needed, such as in patchesDo:.\\\\n!\\\\n\\\\n\\\\n!StarSqueakPatch methodsFor: 'accessing' stamp: 'jm 1/27/2001 08:59'!\\\\nasPoint\\\\n\\\\n\\\\t^ x @ y\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'accessing' stamp: 'jm 1/19/2001 08:28'!\\\\nworld\\\\n\\\\n\\\\t^ world\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'accessing' stamp: 'sd 11/20/2005 21:26'!\\\\nworld: aStarSqueakMorph\\\\n\\\\t\\\\\\\"Set the world for this patch. Also record the world's width and height.\\\\\\\"\\\\n\\\\n\\\\t| dims |\\\\n\\\\tworld := aStarSqueakMorph.\\\\n\\\\tdims := world dimensions.\\\\n\\\\tworldWidth := dims x.\\\\n\\\\tworldHeight := dims y.\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'accessing' stamp: 'jm 1/18/2001 21:27'!\\\\nx\\\\n\\\\n\\\\t^ x\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'accessing' stamp: 'sd 11/20/2005 21:26'!\\\\nx: anInteger\\\\n\\\\n\\\\tx := anInteger.\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'accessing' stamp: 'jm 1/18/2001 21:27'!\\\\ny\\\\n\\\\n\\\\t^ y\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'accessing' stamp: 'sd 11/20/2005 21:26'!\\\\ny: anInteger\\\\n\\\\n\\\\ty := anInteger.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakPatch methodsFor: 'geometry' stamp: 'jm 1/28/2001 15:27'!\\\\nisBottomEdge\\\\n\\\\n\\\\t^ y = (worldHeight - 1)\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'geometry' stamp: 'jm 1/28/2001 15:27'!\\\\nisLeftEdge\\\\n\\\\n\\\\t^ x = 0\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'geometry' stamp: 'jm 1/28/2001 15:27'!\\\\nisRightEdge\\\\n\\\\n\\\\t^ x = (worldWidth - 1)\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'geometry' stamp: 'jm 1/28/2001 15:27'!\\\\nisTopEdge\\\\n\\\\n\\\\t^ y = 0\\\\n! !\\\\n\\\\n\\\\n!StarSqueakPatch methodsFor: 'neighborhood' stamp: 'jm 1/28/2001 15:06'!\\\\nneighborE\\\\n\\\\t\\\\\\\"Answer the neightboring patch directly south of (below) this patch.\\\\\\\"\\\\n\\\\n\\\\t^ self clone x: ((x + 1) \\\\\\\\\\\\\\\\ worldWidth)\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'neighborhood' stamp: 'jm 1/28/2001 15:06'!\\\\nneighborN\\\\n\\\\t\\\\\\\"Answer the neightboring patch directly north of (above) this patch.\\\\\\\"\\\\n\\\\n\\\\t^ self clone y: ((y - 1) \\\\\\\\\\\\\\\\ worldHeight)\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'neighborhood' stamp: 'hh 8/26/2001 17:03'!\\\\nneighborNE\\\\n\\\\t\\\\\\\"Answer the neightboring patch directly south of (below) this patch.\\\\\\\"\\\\n\\\\n\\\\t^ self clone\\\\n\\\\t\\\\tx: ((x + 1) \\\\\\\\\\\\\\\\ worldWidth);\\\\n\\\\t\\\\ty: ((y - 1) \\\\\\\\\\\\\\\\ worldHeight)\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'neighborhood' stamp: 'hh 8/26/2001 17:03'!\\\\nneighborNW\\\\n\\\\t\\\\\\\"Answer the neightboring patch directly south of (below) this patch.\\\\\\\"\\\\n\\\\n\\\\t^ self clone\\\\n\\\\t\\\\tx: ((x - 1) \\\\\\\\\\\\\\\\ worldWidth);\\\\n\\\\t\\\\ty: ((y - 1) \\\\\\\\\\\\\\\\ worldHeight)\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'neighborhood' stamp: 'jm 1/28/2001 15:06'!\\\\nneighborS\\\\n\\\\t\\\\\\\"Answer the neightboring patch directly south of (below) this patch.\\\\\\\"\\\\n\\\\n\\\\t^ self clone y: ((y + 1) \\\\\\\\\\\\\\\\ worldHeight)\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'neighborhood' stamp: 'hh 8/26/2001 17:03'!\\\\nneighborSE\\\\n\\\\t\\\\\\\"Answer the neightboring patch directly south of (below) this patch.\\\\\\\"\\\\n\\\\n\\\\t^ self clone\\\\n\\\\t\\\\tx: ((x + 1) \\\\\\\\\\\\\\\\ worldWidth);\\\\n\\\\t\\\\ty: ((y + 1) \\\\\\\\\\\\\\\\ worldHeight)\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'neighborhood' stamp: 'hh 8/26/2001 17:04'!\\\\nneighborSW\\\\n\\\\t\\\\\\\"Answer the neightboring patch directly south of (below) this patch.\\\\\\\"\\\\n\\\\n\\\\t^ self clone\\\\n\\\\t\\\\tx: ((x - 1) \\\\\\\\\\\\\\\\ worldWidth);\\\\n\\\\t\\\\ty: ((y + 1) \\\\\\\\\\\\\\\\ worldHeight)\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'neighborhood' stamp: 'jm 1/28/2001 15:06'!\\\\nneighborW\\\\n\\\\t\\\\\\\"Answer the neightboring patch directly south of (below) this patch.\\\\\\\"\\\\n\\\\n\\\\t^ self clone x: ((x - 1) \\\\\\\\\\\\\\\\ worldWidth)\\\\n! !\\\\n\\\\n\\\\n!StarSqueakPatch methodsFor: 'patch color' stamp: 'jm 1/24/2001 15:57'!\\\\nbrightness\\\\n\\\\t\\\\\\\"Answer the brightness of this patch, a number from 0 to 100.\\\\\\\"\\\\n\\\\n\\\\t^ world getPatchBrightnessAtX: x y: y\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'patch color' stamp: 'jm 1/24/2001 15:56'!\\\\nbrightness: percent\\\\n\\\\t\\\\\\\"Set the brightness of this patch to the given level, where 0 is nearly black and 100 is full brightness.\\\\\\\"\\\\n\\\\n\\\\tworld setPatchBrightnessAtX: x y: y to: percent.\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'patch color' stamp: 'jm 1/24/2001 15:58'!\\\\ncolor\\\\n\\\\t\\\\\\\"Answer the color of this patch.\\\\\\\"\\\\n\\\\n\\\\t^ world getPatchColorAtX: x y: y\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'patch color' stamp: 'jm 1/24/2001 15:58'!\\\\ncolor: aColor\\\\n\\\\t\\\\\\\"Paint this patch the given color.\\\\\\\"\\\\n\\\\n\\\\tworld setPatchColorAtX: x y: y to: aColor.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakPatch methodsFor: 'patch variables' stamp: 'jm 1/18/2001 21:31'!\\\\ndistanceTo: aPoint\\\\n\\\\t\\\\\\\"Answer the distance from this patch to the given point.\\\\\\\"\\\\n\\\\n\\\\t^ ((x - aPoint x) squared + (y - aPoint y) squared) sqrt\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'patch variables' stamp: 'sd 11/20/2005 21:26'!\\\\nget: patchVarName\\\\n\\\\t\\\\\\\"Answer the value of the given patch variable for this patch.\\\\\\\"\\\\n\\\\n\\\\t| patchVar |\\\\n\\\\tpatchVar := world patchVariable: patchVarName ifAbsent: [^ 0].\\\\n\\\\t^ patchVar at: (y * world dimensions x) + x + 1\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'patch variables' stamp: 'sd 11/20/2005 21:26'!\\\\nset: patchVarName to: newValue\\\\n\\\\t\\\\\\\"Set the value of the given patch variable for this patch to the given value.\\\\\\\"\\\\n\\\\n\\\\t| patchVar |\\\\n\\\\tpatchVar := world patchVariable: patchVarName ifAbsent: [^ self].\\\\n\\\\tpatchVar at: (y * world dimensions x) + x + 1 put: newValue.\\\\n! !\\\\nStarSqueakMorph subclass: #StarSqueakSlimeMold\\\\n\\\\tinstanceVariableNames: 'cellCount'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'StarSqueak-Worlds'!\\\\n\\\\n!StarSqueakSlimeMold methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:26'!\\\\ninitialize\\\\n\\\\n\\\\tcellCount := 200.\\\\n\\\\tsuper initialize.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakSlimeMold methodsFor: 'menu' stamp: 'jm 2/7/2001 19:51'!\\\\nsliderParameters\\\\n\\\\t\\\\\\\"Answer a list of parameters that the user can change via a slider. Each parameter is described by an array of: <name> <min value> <max value> <balloon help string>.\\\\\\\"\\\\n\\\\n\\\\t^ super sliderParameters, #(\\\\n\\\\t\\\\t(cellCount 50 2000 'The number of slime mold cells.'))\\\\n! !\\\\n\\\\n\\\\n!StarSqueakSlimeMold methodsFor: 'other' stamp: 'jm 1/19/2001 18:36'!\\\\ndiffusePheromone\\\\n\\\\n\\\\tself diffusePatchVariable: 'pheromone'.\\\\n! !\\\\n\\\\n!StarSqueakSlimeMold methodsFor: 'other' stamp: 'jm 1/19/2001 18:36'!\\\\nevaporatePheromone\\\\n\\\\n\\\\tself decayPatchVariable: 'pheromone'.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakSlimeMold methodsFor: 'parameters' stamp: 'jm 2/7/2001 19:28'!\\\\ncellCount\\\\n\\\\n\\\\t^ cellCount\\\\n! !\\\\n\\\\n!StarSqueakSlimeMold methodsFor: 'parameters' stamp: 'sd 11/20/2005 21:26'!\\\\ncellCount: aNumber\\\\n\\\\n\\\\tcellCount := aNumber asInteger.\\\\n\\\\n! !\\\\n\\\\n\\\\n!StarSqueakSlimeMold methodsFor: 'setup' stamp: 'sd 11/20/2005 21:26'!\\\\nsetup\\\\n\\\\n\\\\tself clearAll.\\\\n\\\\tself makeTurtles: cellCount class: SlimeMoldTurtle.\\\\n\\\\tself createPatchVariable: 'pheromone'.  \\\\\\\"emitted by slime mold cells\\\\\\\"\\\\n\\\\tturtleDemons := #(dropPheromone followPheromone breakLoose).\\\\n\\\\tworldDemons := #(evaporatePheromone diffusePheromone).\\\\n\\\\tself displayPatchVariable: 'pheromone'.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStarSqueakSlimeMold class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StarSqueakSlimeMold class methodsFor: 'parts bin' stamp: 'sw 10/24/2001 16:36'!\\\\ndescriptionForPartsBin\\\\n\\\\t\\\\\\\"Answer a description of the receiver for use in a parts bin\\\\\\\"\\\\n\\\\n\\\\t^ self partName:\\\\t'SlimeMold'\\\\n\\\\t\\\\tcategories:\\\\t\\\\t#('StarSqueak')\\\\n\\\\t\\\\tdocumentation:\\\\t'A slime-mold simulation using StarSqueak'\\\\n\\\\t\\\\tsampleImageForm: (Form\\\\n\\\\textent: 92@96\\\\n\\\\tdepth: 8\\\\n\\\\tfromArray: #( 673720360 676154664 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 1296911693 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1296911693 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1398364499 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1396729208 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1296911693 1294477352 674900008 673720360 673720360 673720360 673720360 673720360 673729869 1918072946 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1296911693 1296902184 674900008 673720360 673720360 673720360 673720360 673720360 673729869 1296911693 1296902184 673720360 673720360 673720360 673720360 673720360 676154701 1296911693 673720360 673720360 673720360 673720360 1296921202 1920103026 1296911656 673720360 673720360 673720360 673720360 673720360 673720360 673720397 1296911693 1294477352 673720360 673720360 673720360 673720360 673720397 1296911693 1296911693 1296902184 673720360 673720360 673720397 1296921239 2021169010 1296911656 673720360 673720360 673720360 673720360 673720360 673720360 673720397 1296911693 1294477352 673720360 673720360 673720360 673720360 673720397 1296921202 1917668685 1296911656 673720360 673720360 673720397 1299346040 1701148786 1917668685 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729832 673720360 673720360 673720360 673720360 673720360 673729869 1299355580 2543284850 1296911656 673720360 673720360 673720397 1296921276 2122234994 1917668685 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1920121883 3784808306 1296911656 673720360 673720360 673720397 1296921202 2543294322 1296911693 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1922530886 3787233138 1296911656 673720360 673720360 673720397 1296911730 1920103026 1296911693 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1918442267 3784808306 1296911656 673720360 673720360 673720397 1296911693 1920093517 1296911693 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1299365052 3164041842 1296911656 673720360 673720360 673720397 1296911693 1296911693 1296911693 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 1296902184 673720360 673720360 673720360 673720360 673720397 1299346034 2540859981 1296911656 673720360 673720360 673720397 1296911693 1296911693 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1296911693 1294477352 673720360 673720360 673720360 673720397 1296911730 1920093517 1296911656 673720360 673720360 673729869 1296911693 1296911693 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1296911693 1296902184 673720360 673720360 673720360 673720360 1296911693 1296911693 1296911656 673720360 673720360 676154701 1296911693 1296911656 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1299336525 1296911693 673720360 673720360 673720360 673720360 1296911693 1296911693 1296911656 673720360 673720360 1296911693 1296911693 1294477352 673720360 1179002920 673720360 673720360 673720360 673720360 673720360 673720360 1296911730 1920103026 1917668685 1296902184 673720360 673720360 673720360 676154701 1296911693 1296911656 673720360 673720397 1296911693 1179471181 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 1296921202 2543294359 1920093517 1296911693 1294477352 673720360 673720360 673729869 1296911693 1296911656 673720360 673720397 1296462450 1917668685 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720397 1296921177 1189199036 2540850509 1296911693 1296911656 673720360 673720360 673729869 1296911693 1296911693 673720360 673720397 1299346071 1917668685 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720397 1296921276 3779479228 2540859981 1296911693 1296911693 673720360 673720360 673729869 1296921202 1917668685 1294477352 673720397 1299334726 1179471181 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720397 1299346108 1179050465 2543284850 1920103026 1917668685 1294477352 673720360 673729869 1299346034 1920093517 1294477352 673720397 1299346071 1917668685 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720397 1296921276 3779518908 2540860018 1920103001 1500663117 1294477352 673720360 673729869 1920112454 2540859981 1296902184 673720397 1296921202 1917668648 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720397 1296921239 3166485692 1920103026 1920104537 1501065805 1296902184 673720360 673729869 1922530886 2123854413 1296902184 673720360 1296911693 1296911656 673720360 673720360 975710248 673720360 673720360 673720360 673720360 673720360 673720397 1296921202 1920103026 1920093554 1920104549 1702392397 1296902184 673720360 673729869 1922530886 1503097421 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673721896 673720360 673720360 673720360 673720360 1296911693 1920103026 1296911693 1920103032 2020756813 1296902184 673720360 673729869 1920121945 2540859981 1294477352 673720360 673720360 673720360 673720360 774383656 673720360 673720360 673721896 673720360 673720360 673720360 673720360 676154701 1296911693 1296911693 1299346040 2020756813 1294477352 673720360 673729869 1299346034 1500663117 1294477352 673720360 673720360 673720360 673720360 774383656 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1296911693 1296911693 1296911699 1397574989 1294477352 673720360 673729869 1296911693 877481293 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 774776872 673720360 673720360 673720360 673720360 673720360 676154701 1296911693 1296911693 1296911693 673720360 673720360 673720397 1296911693 1296911693 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 774776872 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1296902184 673720360 673720360 673720397 1296911693 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1296911693 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 1296911693 1296911693 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720397 1296911693 1296911693 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1299346034 1920102989 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1299355580 3164041842 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1922546845 2646382450 1296911656 673720360 673720360 673720360 674900008 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1924981019 454777202 1296911656 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1920917787 454777202 1296911656 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1920122044 3166466674 1296911656 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1920103001 1180267085 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1299346034 1920093517 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1296911730 1296911693 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1296911693 1296911693 1294477352 673720360 673720360 673724968 673720360 673720397 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1296911693 1296911693 673720360 673720360 673720360 673720360 673720360 676154701 1296911656 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1296911693 1296902184 673720360 673720360 673720360 673720360 673720360 1296911693 1296911693 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 1296911693 1296911693 1296902184 673720360 673720360 673720360 673720360 673720397 1296921202 1499024717 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720397 1296911693 1296911693 1294477352 673720360 673720360 673720360 673720360 673720397 1296921239 2540850509 1294477352 673720360 673720360 673720360 673720360 675686440 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1296911693 1296911693 1294477352 673720360 673720360 673720360 673720360 673729869 1296914758 1180257613 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1296462450 1917668685 1294477352 673720360 673720360 673720360 673720360 673729869 1299346009 1500663117 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1920112535 2540850509 1294477352 673720360 673720360 673720360 673720360 676154701 1296921202 1920093517 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1920112454 2539205709 1294477352 673720360 673720360 673720360 673720360 676154701 1296921202 1917668685 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1922516550 3161607501 1294477352 673720360 673720360 673720360 673720360 1296911693 1299345997 1296911693 1294477352 673720360 673720360 673720360 673720390 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1299339609 2540850509 1294477352 673720360 673720360 673720360 673720360 1296911730 1920093517 1296911693 1294477352 673729832 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1299346009 1917668685 1294477352 673720360 673720360 673720360 673720360 1296921202 1500672589 1296911693 673720397 1296911693 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1296911705 1296911693 673720360 673720360 673720360 673720360 673720397 1296914839 1181905491 1397574989 673729869 1296911668 1296911693 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720397 1296911693 1296911656 673720360 673720360 673720360 673720360 673720360 1296914802 1181896019 1397574952 676154701 1296921177 1917668685 1294477352 673720360 673720360 673720366 673720360 673720360 673720360 673720360 673720360 673720360 1296911693 1296902184 673720360 673720360 673720360 673720360 673720360 1296911730 1181896013 1296902184 673729869 1299346009 1397969741 1296902184 673720360 673720360 673720366 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 674900008 673720360 673720360 676154701 877481293 1294477352 673729869 1296914777 1397969741 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 674900008 673720360 673720360 673729869 1296911693 673720360 673720397 1296914802 1917668685 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 1296911705 1296911693 1294477352 673729844 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154676 1296911656 673720360 673729844 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1296911693 673720360 673720360 673720360 673720360 673729869 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 674113576 673720360 673720360 673720360 673720360 673720360 676154701 1296911693 1294477352 673720360 673720360 673720360 1296911693 1296911656 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 674113576 673720360 673720360 673720360 673720360 673720360 1296911693 1296911693 1296902184 673724986 673720360 673720397 1296921202 1917668685 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720397 1296921202 1920103026 1296911656 673720360 673720360 673720397 1299355543 1917668685 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720397 1299346071 2543294322 1917668648 673720360 673720360 673720397 1299334726 1498238285 673720360 673720360 673720360 673720360 673720360 673720360 673720378 975710248 673720360 673720360 673720360 673720360 673720360 673720360 673720397 1920112572 3789676988 1917668648 673720360 673720360 673720397 1299339609 1917668685 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1922546913 3779518908 1920093480 673720360 673720360 673720397 1296921202 1296911656 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1922516705 3779468121 1499024717 673720360 673720360 673720360 1296911693 1296911656 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1922546913 3779518908 1920093480 673720360 673720360 673720360 676154701 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1920112572 3789676988 1917668648 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 674904616 673720397 1299334726 2543294322 1917668648 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720397 1299346034 1920103026 1296911656 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673724986 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720397 1296911730 1920093517 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1294477352 673720360 673720360 673720360 1296911693 1296911693 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676148294 877471784 673720360 673720360 673720360 676154701 1296911693 673720360 673720360 673720360 675686440 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 1296911668 877013032 673720360 673720360 673720360 673720360 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 1296911693 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720397 1296911656 673720360 673720360 676154701 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1296911693 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1397968205 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1497387853 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1497387853 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1397968205 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1296911693 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 1296911668 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720378 673720360 673720360 673720360 673720360 673720360 673720360 673721896 673720360 673720360 673720360)\\\\n\\\\toffset: 152@256)! !\\\\nStarSqueakMorph subclass: #StarSqueakTermites\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'StarSqueak-Worlds'!\\\\n\\\\n!StarSqueakTermites methodsFor: 'all' stamp: 'jm 1/24/2001 08:50'!\\\\nsetupPatches\\\\n\\\\t\\\\\\\"Create patch variables for sensing the nest and food caches. The nestScent variable is diffused so that it forms a 'hill' of scent over the entire world with its peak at the center of the nest. That way, the ants always know which way the nest is.\\\\\\\"\\\\n\\\\n\\\\tself createPatchVariable: 'woodChips'.  \\\\\\\"number of wood chips on patch\\\\\\\"\\\\n\\\\tself displayPatchVariable: 'woodChips' logScale: 5.\\\\n\\\\tself patchesDo: [:p |\\\\n\\\\t\\\\t(self random: 8) = 0\\\\n\\\\t\\\\t\\\\tifTrue: [p set: 'woodChips' to: 1]\\\\n\\\\t\\\\t\\\\tifFalse: [p set: 'woodChips' to: 0]].\\\\n! !\\\\n\\\\n!StarSqueakTermites methodsFor: 'all' stamp: 'jm 1/28/2001 15:35'!\\\\nsetupTurtles\\\\n\\\\t\\\\\\\"Create an initialize my termites.\\\\\\\"\\\\n\\\\n\\\\tself makeTurtles: 400 class: TermiteTurtle.\\\\n\\\\tself turtlesDo: [:t | t isCarryingChip: false].\\\\n! !\\\\n\\\\n\\\\n!StarSqueakTermites methodsFor: 'setup' stamp: 'sd 11/20/2005 21:26'!\\\\nsetup\\\\n\\\\n\\\\tself clearAll.\\\\n\\\\tself setupPatches.\\\\n\\\\tself setupTurtles.\\\\n\\\\tturtleDemons := #(walk wiggle lookForChip lookForPile).\\\\n! !\\\\nStarSqueakMorph subclass: #StarSqueakTrees\\\\n\\\\tinstanceVariableNames: 'depth treeTypeSelector'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'StarSqueak-Worlds'!\\\\n\\\\n!StarSqueakTrees methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:26'!\\\\ninitialize\\\\n\\\\n\\\\tsuper initialize.\\\\n\\\\tdepth := 8.\\\\n\\\\ttreeTypeSelector := #tree1.\\\\n\\\\tself setup.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakTrees methodsFor: 'menu' stamp: 'dgd 8/30/2003 22:17'!\\\\naddCustomMenuItems: aCustomMenu hand: aHandMorph\\\\n\\\\n\\\\tsuper addCustomMenuItems: aCustomMenu hand: aHandMorph.\\\\n\\\\taCustomMenu addLine.\\\\n\\\\taCustomMenu add: 'set tree depth' translated action: #setTreeDepth.\\\\n\\\\taCustomMenu add: 'set tree type' translated action: #setTreeType.\\\\n! !\\\\n\\\\n!StarSqueakTrees methodsFor: 'menu' stamp: 'rbb 3/1/2005 11:15'!\\\\nsetTreeDepth\\\\n\\\\n\\\\t| reply |\\\\n\\\\treply := UIManager default\\\\n\\\\t\\\\trequest: 'Tree depth (a number between 1 and 12)?'\\\\n\\\\t\\\\tinitialAnswer: depth printString.\\\\n\\\\treply isEmpty ifTrue: [^ self].\\\\n\\\\tdepth := ((reply asNumber rounded) max: 1) min: 12.\\\\n\\\\tself startOver.\\\\n! !\\\\n\\\\n!StarSqueakTrees methodsFor: 'menu' stamp: 'sd 11/20/2005 21:26'!\\\\nsetTreeType\\\\n\\\\n\\\\t| menu choice |\\\\n\\\\tmenu := CustomMenu new title: 'Choose tree type:'.\\\\n\\\\tmenu add: 'tree1' action: #tree1.\\\\n\\\\tmenu add: 'tree2' action: #tree2.\\\\n\\\\tchoice := menu startUp.\\\\n\\\\tchoice ifNotNil: [\\\\n\\\\t\\\\ttreeTypeSelector := choice.\\\\n\\\\t\\\\tself startOver].\\\\n! !\\\\n\\\\n\\\\n!StarSqueakTrees methodsFor: 'parts bin' stamp: 'sd 11/20/2005 21:26'!\\\\ninitializeToStandAlone\\\\n\\\\tself initialize.\\\\n\\\\ttreeTypeSelector := #tree2.\\\\n\\\\tself setup.  \\\\\\\"Run earlier, but need to run again to get the #tree2 used\\\\\\\"\\\\n\\\\tself startRunning! !\\\\n\\\\n\\\\n!StarSqueakTrees methodsFor: 'setup' stamp: 'jm 3/12/2001 09:59'!\\\\nsetup\\\\n\\\\n\\\\tself clearAll.\\\\n\\\\tself makeTurtles: 1 class: TreeTurtle.\\\\n\\\\tself turtlesDo: [:t |\\\\n\\\\t\\\\tt goto: 50@90.\\\\n\\\\t\\\\tt penDown.\\\\n\\\\t\\\\tt color: Color red.\\\\n\\\\t\\\\tt heading: 0.\\\\n\\\\t\\\\tt length: 15.\\\\n\\\\t\\\\tt depth: depth].\\\\n\\\\tself addTurtleDemon: treeTypeSelector.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStarSqueakTrees class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StarSqueakTrees class methodsFor: 'parts bin' stamp: 'sw 10/24/2001 16:37'!\\\\ndescriptionForPartsBin\\\\n\\\\t\\\\\\\"Answer a description of the receiver for use in a parts bin\\\\\\\"\\\\n\\\\n\\\\t^ self partName:\\\\t'Trees'\\\\n\\\\t\\\\tcategories:\\\\t\\\\t#('StarSqueak')\\\\n\\\\t\\\\tdocumentation:\\\\t'A tree-growing simulation using StarSqueak'\\\\n\\\\t\\\\tsampleImageForm: (Form\\\\n\\\\textent: 70@72\\\\n\\\\tdepth: 8\\\\n\\\\tfromArray: #( 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 681453608 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 681453608 673720360 673720360 673720360 673710080 673720360 673720360 673720360 1313744936 2661165134 2655922216 673720360 676241054 673720360 673720360 673720360 673720360 2653431848 1311284776 673720398 673720360 673720360 673710080 673720360 673720360 673720398 1313744936 2661195342 1311254568 673720360 676241054 2653431848 673750686 2661174862 2653431848 2655931944 1318987816 673720398 681453608 673720360 673710080 673720360 673720360 673750686 1313754664 2661195342 1311254568 673750606 673750686 673720360 673750686 2655931982 1318987816 2655922254 2653462174 673720398 2653431848 673720360 673710080 673720360 673720360 681453646 1319018024 2653431966 1311254568 673750686 1311284894 673720360 673720478 2661174862 2661165096 2653441694 2661195422 673720398 673750568 673720360 673710080 673720360 673720360 2661195342 676220574 2653431886 1313775262 681483934 1311284776 2653441576 673720478 681463374 2653431848 3257421470 2653462174 1311264334 681453726 673720360 673710080 673720360 673720398 2661195342 673730206 2653431848 1318997662 2661174862 3262300712 2653462174 1311254722 683852402 673720514 683843230 2661195422 1311264334 2661195304 673720360 673710080 673720360 673720360 2661195342 1313754782 2661165096 1920093854 2653441614 3262300712 681483854 1313744936 3262300786 673720514 3257411662 2661195304 673730206 673720360 673720360 673710080 673720360 673720398 681483934 2661195422 2661165096 1319018142 2653462094 678609448 681463454 2655922216 3262280232 673759938 3257421470 3267504286 676220456 673750568 673720360 673710080 673720360 673730206 673750606 2655922370 673759902 2661174942 3257421352 678570024 683852366 673720360 3245437224 683786792 683831848 1915264670 1316123176 673750686 673720360 673710080 673720360 673720360 2661165134 678589122 673750686 3267514049 2663524392 678504488 683812904 673720360 683766056 683747368 3267543746 2661195304 3262261288 2661165214 1311254568 673710080 673720360 673720360 673750606 673739304 3265175118 2661174977 3267504168 678504488 3240634408 673720360 678504488 1898496449 673720433 3265175198 3267543746 2661195422 1311254568 673710080 673720360 673730206 673720398 673720514 3257411742 2663563969 683812904 673759681 3240634408 673720360 678504488 1908484136 673720433 1898487490 1915234344 673720360 673720360 673710080 673720360 676241054 673720434 3262261288 3257441832 673739458 683747368 673759528 673720360 673720360 678504561 1898457128 673720433 1908484136 673720360 2661165096 673720360 673710080 673720360 676220456 2661195304 1920084008 3250661416 673720513 3250661416 673759528 673720360 673720360 678504561 1898457128 673739121 1898457128 673720360 2661195422 673720360 673710080 673720360 673730206 2653432002 3267523112 673759528 673720360 3250661416 673759528 673720360 673720360 678523249 673720360 673739201 1898457128 673720360 2661195304 673720360 673710080 673720360 676154958 1311254642 1920103025 1898496296 673720360 3245428008 676163880 673720360 673720360 681341261 673720360 676163953 1294477352 673720397 1313754702 673720360 673710080 673720360 676154664 673720360 673729905 1903280461 673720360 3240653133 678504488 673720360 673720360 681332008 673720360 681341224 673720360 676164253 676220574 673720360 673710080 673720360 673720360 673720360 673720360 678523292 1294477352 3240653212 1299261480 673720360 673720360 1903241256 673720360 681332008 673720360 1302109554 1319018142 673720360 673710080 673720360 673720360 673720360 673720360 673720433 1903250728 3240643996 1903241256 673720360 673720360 3243059240 673720360 1900881960 673720433 1903250728 1313775262 673720360 673710080 673720360 673720360 673720360 673720360 673720360 1299280168 3240634445 1906059304 673720360 673720360 3223857192 673720433 1898457165 1903260097 1898457128 1917754958 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673739121 1903241256 1302079528 673720360 673720360 3223857192 673739121 1903260017 1903260017 1903260274 1917734440 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673729905 1908484136 678504488 673720360 673720360 3223857192 678543729 1903259981 673720360 1299280498 1917724712 1296902184 673710080 673720360 673720360 673720360 673720360 673720360 673720360 1908418600 678504488 673720360 673720360 3223857192 1287680369 673720360 673720360 673720360 1922977358 1313679400 673710080 673720360 673720360 673720360 673720360 673720360 673720360 678513704 678504488 673720360 673720360 3223857228 1903241256 673720360 673720360 673720360 676240974 1313679400 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673739084 678504488 673720360 673720433 1898466417 1277700136 673720360 673720360 673720360 673750606 1296902184 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673739163 1282484264 673720360 673720512 676098380 673720360 673720360 673720360 673720360 673730206 1294477352 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673729691 1903241256 673720360 673720512 1903250472 673720360 673720360 673720360 673720360 673720478 1294477352 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720396 1905993768 673720360 673720512 1900816424 673720360 673720360 673720360 673720360 673720398 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 1285236776 673720360 673739200 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 678504488 673720360 673759345 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 678504488 673720360 673759272 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676098344 673720360 676098344 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673739121 673720360 678504488 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720512 673720360 1282484264 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720433 1898457128 1903241256 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 3223857192 1903241256 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 3223857228 1900816424 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 1903241329 1898457128 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 683681905 1898457128 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 683681905 1898457128 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673759345 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673759345 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673739121 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673738864 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673738864 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673738864 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673738864 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673738864 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673738864 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673738864 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673738864 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673738864 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673738864 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673738864 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673738864 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673738864 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673738864 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673738864 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080)\\\\n\\\\toffset: 478@345)! !\\\\nObject subclass: #StarSqueakTurtle\\\\n\\\\tinstanceVariableNames: 'world who x y wrapX wrapY headingRadians color penDown nextTurtle'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'StarSqueak-Kernel'!\\\\n!StarSqueakTurtle commentStamp: '<historical>' prior: 0!\\\\nI represent a \\\\\\\"creature\\\\\\\" that can move about on the surface of a StarSqueak world. I have a position and a heading (direction), and respond commands such as \\\\\\\"turnRight:\\\\\\\" and \\\\\\\"forward:\\\\\\\" by turning or moving. I also have an imaginary pen that can draw a trail as I move. In StarSqueak, turtles are born with random positions and headings.\\\\n\\\\nHere are some expressions to try in a workspace:\\\\n\\\\tw _ StarSqueakMorph new openInWorld.\\\\t\\\\\\\"make an empty world\\\\\\\"\\\\n\\\\tw makeTurtles: 100.\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"create 100 turtles\\\\\\\"\\\\n\\\\tw turtlesDo: [:t | t forward: 1].\\\\t\\\\t\\\\t\\\\\\\"tell all turtles to take a step\\\\\\\"\\\\n\\\\tw turtlesDo: [:t | t goto: 50@50].\\\\t\\\\t\\\\t\\\\\\\"tell all turtles to go to 50@50\\\\\\\"\\\\n\\\\tw turtlesDo: [:t | t forward: 10].\\\\t\\\\t\\\\t\\\\\\\"tell all turtles to take 10 steps\\\\\\\"\\\\n\\\\nStructure:\\\\n  world\\\\t\\\\t\\\\t\\\\tStarSqueakMorph\\\\t\\\\tthe world that owns this turtle\\\\n  who\\\\t\\\\t\\\\t\\\\tinteger\\\\t\\\\t\\\\t\\\\t\\\\tunique id\\\\n  x\\\\t\\\\t\\\\t\\\\t\\\\tnumber\\\\t\\\\t\\\\t\\\\t\\\\tx position in world\\\\n  y\\\\t\\\\t\\\\t\\\\t\\\\tnumber\\\\t\\\\t\\\\t\\\\t\\\\ty position in world\\\\n  wrapX\\\\t\\\\t\\\\t\\\\tfloat\\\\t\\\\t\\\\t\\\\t\\\\tprivate; used for wrapping in x\\\\n  wrapY\\\\t\\\\t\\\\tfloat\\\\t\\\\t\\\\t\\\\t\\\\tprivate; used for wrapping in y\\\\n  headingRadians\\\\tfloat\\\\t\\\\t\\\\t\\\\t\\\\theading in radians\\\\n  color\\\\t\\\\t\\\\t\\\\tcolor\\\\t\\\\t\\\\t\\\\t\\\\tturtle color and its pen color\\\\n  penDown\\\\t\\\\t\\\\tboolean\\\\t\\\\t\\\\t\\\\t\\\\ttrue if drawing a pen trail\\\\n  nextTurtle\\\\t\\\\t\\\\tStarSqueaktTurtle\\\\t\\\\tprivate; used to make linked list of turtles\\\\n!\\\\n\\\\n\\\\n!StarSqueakTurtle methodsFor: 'accessing' stamp: 'jm 1/27/2001 08:59'!\\\\nasPoint\\\\n\\\\n\\\\t^ x truncated @ y truncated\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'accessing' stamp: 'jm 2/25/2000 16:03'!\\\\ncolor\\\\n\\\\n\\\\t^ color\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'accessing' stamp: 'sd 11/20/2005 21:26'!\\\\ncolor: aColor\\\\n\\\\n\\\\tcolor := aColor.\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'accessing' stamp: 'sd 11/20/2005 21:26'!\\\\nheading\\\\n\\\\t\\\\\\\"Answer my heading in degrees.\\\\\\\"\\\\n\\\\n\\\\t| degrees |\\\\n\\\\tdegrees := 90.0 - headingRadians radiansToDegrees.\\\\n\\\\t^ degrees >= 0.0 ifTrue: [degrees] ifFalse: [degrees + 360.0].\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'accessing' stamp: 'sd 11/20/2005 21:26'!\\\\nheading: angleInDegrees\\\\n\\\\t\\\\\\\"Set my heading in degrees. Like a compass, up or north is 0 degrees and right or east is 90 degrees.\\\\\\\"\\\\n\\\\n\\\\theadingRadians := ((90.0 - angleInDegrees) \\\\\\\\\\\\\\\\ 360.0) degreesToRadians.\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'accessing' stamp: 'jm 3/3/2001 17:49'!\\\\nnextTurtle\\\\n\\\\t\\\\\\\"The nextTurtle slot is used to make a linked list of turtles at a given patch.\\\\\\\"\\\\n\\\\n\\\\t^ nextTurtle\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'accessing' stamp: 'sd 11/20/2005 21:26'!\\\\nnextTurtle: aStarSqueakTurtle\\\\n\\\\t\\\\\\\"The nextTurtle slot is used to make a linked list of turtles at a given patch.\\\\\\\"\\\\n\\\\n\\\\tnextTurtle := aStarSqueakTurtle.\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'accessing' stamp: 'jm 1/26/2001 17:36'!\\\\nwho\\\\n\\\\n\\\\t^ who\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'accessing' stamp: 'sd 11/20/2005 21:26'!\\\\nwho: anInteger\\\\n\\\\n\\\\twho := anInteger.\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'accessing' stamp: 'jm 2/25/2000 16:02'!\\\\nx\\\\n\\\\n\\\\t^ x\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'accessing' stamp: 'sd 11/20/2005 21:26'!\\\\nx: aNumber\\\\n\\\\n\\\\tx := aNumber.\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'accessing' stamp: 'jm 2/25/2000 16:02'!\\\\ny\\\\n\\\\n\\\\t^ y\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'accessing' stamp: 'sd 11/20/2005 21:26'!\\\\ny: aNumber\\\\n\\\\n\\\\ty := aNumber.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakTurtle methodsFor: 'commands' stamp: 'jm 1/26/2001 17:39'!\\\\ndie\\\\n\\\\t\\\\\\\"Delete this turtle at the end of the current cycle. The turtle will finish running all demons for the current cycle before it dies.\\\\\\\"\\\\n\\\\n\\\\tworld deleteTurtle: self.\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'commands' stamp: 'jm 1/23/2001 17:26'!\\\\nforward: dist\\\\n\\\\t\\\\\\\"Move the given distance in the direction of my heading.\\\\\\\"\\\\n\\\\n\\\\t1 to: dist do: [:i | self forwardOne].\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'commands' stamp: 'sd 11/20/2005 21:26'!\\\\nforwardOne\\\\n\\\\t\\\\\\\"Move one turtle step in the direction of my heading.\\\\\\\"\\\\n\\\\n\\\\tpenDown ifTrue: [world setPatchColorAtX: x y: y to: color].\\\\n\\\\tx := x + headingRadians cos.\\\\n\\\\ty := y - headingRadians sin.\\\\n\\\\tx < 0.0 ifTrue: [x := x + wrapX].\\\\n\\\\ty < 0.0 ifTrue: [y := y + wrapY].\\\\n\\\\tx >= wrapX ifTrue: [x := x - wrapX].\\\\n\\\\ty >= wrapY ifTrue: [y := y - wrapY].\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'commands' stamp: 'sd 11/20/2005 21:26'!\\\\ngoto: aPoint\\\\n\\\\t\\\\\\\"Jump to the given location.\\\\\\\"\\\\n\\\\n\\\\tx := aPoint x.\\\\n\\\\ty := aPoint y.\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'commands' stamp: 'sd 11/20/2005 21:26'!\\\\npenDown\\\\n\\\\t\\\\\\\"Put down this turtle's pen. That is, the turtle will leave a trail the same color as itself when it moves.\\\\\\\"\\\\n\\\\n\\\\tpenDown := true.\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'commands' stamp: 'sd 11/20/2005 21:26'!\\\\npenUp\\\\n\\\\t\\\\\\\"Lift this turtle's pen. The turtle will stop leaving a trail.\\\\\\\"\\\\n\\\\n\\\\tpenDown := false.\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'commands' stamp: 'jm 1/19/2001 19:20'!\\\\nrandom: range\\\\n\\\\t\\\\\\\"Answer a random integer between 0 and range.\\\\\\\"\\\\n\\\\n\\\\t^ world random: range\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'commands' stamp: 'jm 1/27/2001 08:47'!\\\\nreplicate\\\\n\\\\t\\\\\\\"Add an exact replica of this turtle to the world. The new turtle does not become active until the next cycle.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: We call this operation 'replicate' instead of Mitch Resnick's term 'clone' because Squeak already used the message 'clone' for cloning a generic object.\\\\\\\"\\\\n\\\\n\\\\tworld replicateTurtle: self.\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'commands' stamp: 'jm 1/29/2001 10:11'!\\\\nstop\\\\n\\\\t\\\\\\\"Stop running.\\\\\\\"\\\\n\\\\n\\\\tworld stopRunning.\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'commands' stamp: 'jm 1/19/2001 19:14'!\\\\nturnLeft: degrees\\\\n\\\\t\\\\\\\"Turn left by the given number of degrees.\\\\\\\"\\\\n\\\\n\\\\tself heading: (self heading - degrees).\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'commands' stamp: 'jm 2/27/2000 18:19'!\\\\nturnRight: degrees\\\\n\\\\t\\\\\\\"Turn right by the given number of degrees.\\\\\\\"\\\\n\\\\n\\\\tself heading: (self heading + degrees).\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'commands' stamp: 'sd 11/20/2005 21:26'!\\\\nturnTowards: aPointTurtleOrPatch\\\\n\\\\t\\\\\\\"Turn to face the given point, turtle, or patch.\\\\\\\"\\\\n\\\\n\\\\t| degrees |\\\\n\\\\tdegrees := (aPointTurtleOrPatch asPoint - self asPoint) degrees.\\\\n\\\\theadingRadians := (0.0 - degrees) degreesToRadians.\\\\n\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'commands' stamp: 'jm 1/27/2001 08:58'!\\\\nturnTowardsStrongest: patchVarName\\\\n\\\\t\\\\\\\"Turn to point toward the nearby patch having the highest value of the given patch variable. This command uses only local information. In particular, it only considers patches within 'sniffRange' of this turtles location. For example, with the default 'sniffRange' of 1, it only considers the immediate neighbors of the patch this turtle is on.\\\\\\\"\\\\n\\\\n\\\\tself heading: (world uphillOf: patchVarName forTurtle: self).\\\\n! !\\\\n\\\\n\\\\n!StarSqueakTurtle methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:26'!\\\\ninitializeWorld: aStarSqueakWorld who: anInteger\\\\n\\\\n\\\\t| dims |\\\\n\\\\tdims := aStarSqueakWorld dimensions.\\\\n\\\\tworld := aStarSqueakWorld.\\\\n\\\\twho := anInteger.\\\\n\\\\tx := world random: dims x - 1.\\\\n\\\\ty := world random: dims y - 1.\\\\n\\\\twrapX := dims x asFloat.\\\\n\\\\twrapY := dims y asFloat.\\\\n\\\\theadingRadians := ((self random: 36000) / 100.0) degreesToRadians.\\\\n\\\\tcolor := Color blue.\\\\n\\\\tpenDown := false.\\\\n\\\\tnextTurtle := nil.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakTurtle methodsFor: 'patches' stamp: 'jm 1/19/2001 19:08'!\\\\nget: patchVar\\\\n\\\\t\\\\\\\"Answer the value of the given patch variable below this turtle.\\\\\\\"\\\\n\\\\n\\\\t^ world getPatchVariable: patchVar atX: x y: y\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'patches' stamp: 'jm 1/27/2001 08:49'!\\\\nincrement: patchVar by: delta\\\\n\\\\t\\\\\\\"Increment the value of the given patch variable below this turtle by the given amount (positive or negative).\\\\\\\"\\\\n\\\\n\\\\t world incrementPatchVariable: patchVar atX: x y: y by: delta.\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'patches' stamp: 'hh 8/26/2001 19:49'!\\\\npatchBrightness\\\\n\\\\t\\\\\\\"Answer the brightness of the patch below this turtle, where 0 is black and 100 is full brightness.\\\\\\\"\\\\n\\\\n\\\\t^world getPatchBrightnessAtX: x y: y.\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'patches' stamp: 'jm 1/24/2001 13:28'!\\\\npatchBrightness: percent\\\\n\\\\t\\\\\\\"Set the brightness of the patch below this turtle to the given value, where 0 is black and 100 is full brightness.\\\\\\\"\\\\n\\\\n\\\\tworld setPatchBrightnessAtX: x y: y to: percent.\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'patches' stamp: 'jm 1/23/2001 17:17'!\\\\npatchColor\\\\n\\\\t\\\\\\\"Answer the color of the patch below this turtle.\\\\\\\"\\\\n\\\\n\\\\t^ world getPatchColorAtX: x y: y.\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'patches' stamp: 'jm 1/24/2001 13:37'!\\\\npatchColor: aColor\\\\n\\\\t\\\\\\\"Paint the patch below this turtle with the given color.\\\\\\\"\\\\n\\\\n\\\\tworld setPatchColorAtX: x y: y to: aColor.\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'patches' stamp: 'jm 1/19/2001 19:09'!\\\\nset: patchVar to: newValue\\\\n\\\\t\\\\\\\"Set the value of the given patch variable below this turtle to the given value.\\\\\\\"\\\\n\\\\n\\\\t world setPatchVariable: patchVar atX: x y: y to: newValue.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakTurtle methodsFor: 'sensing' stamp: 'jm 2/5/2001 19:42'!\\\\ndistanceTo: aPoint\\\\n\\\\t\\\\\\\"Answer the distance from this turtle to the given point.\\\\\\\"\\\\n\\\\n\\\\t^ ((x - aPoint x) squared + (y - aPoint y) squared) sqrt\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'sensing' stamp: 'sd 11/20/2005 21:26'!\\\\nturtleCountHere\\\\n\\\\t\\\\\\\"Answer a collection of turtles at this turtle's current location, including this turtle itself.\\\\\\\"\\\\n\\\\n\\\\t| n |\\\\n\\\\tn := 0.\\\\n\\\\tworld turtlesAtX: x y: y do: [:t | n := n + 1].\\\\n\\\\t^ n\\\\n! !\\\\nChangeSetCategory subclass: #StaticChangeSetCategory\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Tools-Changes'!\\\\n!StaticChangeSetCategory commentStamp: '<historical>' prior: 0!\\\\nStaticChangeSetCategory is a user-defined change-set category that has in it only those change sets specifically placed there.!\\\\n\\\\n\\\\n!StaticChangeSetCategory methodsFor: 'add' stamp: 'sw 4/11/2001 15:58'!\\\\naddChangeSet: aChangeSet\\\\n\\\\t\\\\\\\"Add the change set manually\\\\\\\"\\\\n\\\\n\\\\tself elementAt: aChangeSet name put: aChangeSet! !\\\\n\\\\n\\\\n!StaticChangeSetCategory methodsFor: 'queries' stamp: 'sw 4/11/2001 16:10'!\\\\nacceptsManualAdditions\\\\n\\\\t\\\\\\\"Answer whether the user is allowed manually to manipulate the contents of the change-set-category.\\\\\\\"\\\\n\\\\n\\\\t^ true! !\\\\n\\\\n!StaticChangeSetCategory methodsFor: 'queries' stamp: 'sw 4/11/2001 16:00'!\\\\nincludesChangeSet: aChangeSet\\\\n\\\\t\\\\\\\"Answer whether the receiver includes aChangeSet in its retrieval list\\\\\\\"\\\\n\\\\n\\\\t^ elementDictionary includesKey: aChangeSet name! !\\\\n\\\\n\\\\n!StaticChangeSetCategory methodsFor: 'updating' stamp: 'sd 11/20/2005 21:27'!\\\\nreconstituteList\\\\n\\\\t\\\\\\\"Reformulate the list.  Here, since we have a manually-maintained list, at this juncture we only make sure change-set-names are still up to date, and we purge moribund elements\\\\\\\"\\\\n\\\\n\\\\t|  survivors |\\\\n\\\\tsurvivors := elementDictionary select: [:aChangeSet | aChangeSet isMoribund not].\\\\n\\\\tself clear.\\\\n\\\\t(survivors asSortedCollection: [:a :b | a name <= b name]) reverseDo:\\\\n\\\\t\\\\t[:aChangeSet | self addChangeSet: aChangeSet]! !\\\\nForm subclass: #StaticForm\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Graphics-Display Objects'!\\\\n!StaticForm commentStamp: '<historical>' prior: 0!\\\\nAn optimization for Nebraska - a StaticForm does not change once created so it may be cached on the remote end.!\\\\n\\\\n\\\\n!StaticForm methodsFor: 'as yet unclassified' stamp: 'RAA 8/14/2000 09:59'!\\\\nisStatic\\\\n\\\\n\\\\t^true! !\\\\nMorphicAlarm subclass: #StepMessage\\\\n\\\\tinstanceVariableNames: 'stepTime'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Events'!\\\\n\\\\n!StepMessage methodsFor: 'accessing' stamp: 'ar 10/22/2000 16:56'!\\\\nstepTime: aNumber\\\\n\\\\t\\\\\\\"Set the step time for this message. If nil, the receiver of the message will be asked for its #stepTime.\\\\\\\"\\\\n\\\\tstepTime _ aNumber! !\\\\n\\\\n\\\\n!StepMessage methodsFor: 'printing' stamp: 'ar 10/22/2000 15:59'!\\\\nprintOn: aStream\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream \\\\n\\\\t\\\\tnextPut: $(;\\\\n\\\\t\\\\tprint: receiver;\\\\n\\\\t\\\\tspace;\\\\n\\\\t\\\\tprint: selector;\\\\n\\\\t\\\\tspace;\\\\n\\\\t\\\\tprint: scheduledTime;\\\\n\\\\t\\\\tnextPut: $).! !\\\\n\\\\n\\\\n!StepMessage methodsFor: 'testing' stamp: 'ar 10/22/2000 16:56'!\\\\nstepTime\\\\n\\\\t\\\\\\\"Return the step time for this message. If nil, the receiver of the message will be asked for its #stepTime.\\\\\\\"\\\\n\\\\t^stepTime! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStepMessage class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StepMessage class methodsFor: 'instance creation' stamp: 'ar 10/22/2000 15:48'!\\\\nscheduledAt: scheduledTime stepTime: stepTime receiver: aTarget selector: aSelector arguments: argArray\\\\n\\\\t^(self receiver: aTarget selector: aSelector arguments: argArray)\\\\n\\\\t\\\\tscheduledTime: scheduledTime;\\\\n\\\\t\\\\tstepTime: stepTime! !\\\\nRectangleMorph subclass: #StickyPadMorph\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: 'Colors LastColorIndex'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-Demo'!\\\\n!StickyPadMorph commentStamp: 'sw 3/3/2004 13:31' prior: 0!\\\\nA custom item for the  Squeakland Supplies bin, as defined by Kim Rose and BJ Con.A parts bin will deliver up translucent, borderless Rectangles in a sequence of 6 colors.  It offers some complication to the parts-bin protocols in two ways::\\\\n* The multi-colored icon seen in the parts bin is not a thumbnail of any actual instance, all of which are monochrome\\\\n* New instances need to be given default names that are not the same as the name seen in the parts bin.!\\\\n\\\\n\\\\n!StickyPadMorph methodsFor: 'visual properties' stamp: 'dgd 9/18/2004 18:52'!\\\\ncanHaveFillStyles\\\\n\\\\t\\\\\\\"Return true if the receiver can have general fill styles; not just \\\\n\\\\tcolors. This method is for gradually converting old morphs.\\\\\\\"\\\\n\\\\t^ true! !\\\\n\\\\n\\\\n!StickyPadMorph methodsFor: 'parts bin' stamp: 'sw 4/3/2003 15:25'!\\\\ninitializeToStandAlone\\\\n\\\\t\\\\\\\"Initialize the receiver to stand alone.  Use the next color in the standard sequence.\\\\\\\"\\\\n\\\\n\\\\tColors ifNil: [self initialize].\\\\n\\\\tLastColorIndex _ \\\\n\\\\t\\\\tLastColorIndex\\\\n\\\\t\\\\t\\\\tifNil:\\\\n\\\\t\\\\t\\\\t\\\\t[1]\\\\n\\\\t\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t\\\\t[(LastColorIndex \\\\\\\\\\\\\\\\ Colors size) + 1].\\\\n\\\\tsuper initializeToStandAlone.\\\\n\\\\tself assureExternalName.\\\\n\\\\tself color: (Colors at: LastColorIndex).\\\\n\\\\tself extent: 100@80.\\\\n\\\\tself borderWidth: 0\\\\n\\\\t! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStickyPadMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StickyPadMorph class methodsFor: 'as yet unclassified' stamp: 'sw 3/3/2004 13:42'!\\\\nregisterInFlapsRegistry\\\\n\\\\t\\\\\\\"Register the receiver in the system's flaps registry\\\\\\\"\\\\n\\\\t\\\\n\\\\tself environment\\\\n\\\\t\\\\tat: #Flaps\\\\n\\\\t\\\\tifPresent: [:cl | cl registerQuad: #(StickyPadMorph\\\\t\\\\tnewStandAlone\\\\t\\\\t\\\\t'Sticky Pad'\\\\t\\\\t\\\\t'Each time you obtain one of these pastel, translucent, borderless rectangles, it will be a different color from the previous time.')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'Supplies'.\\\\n\\\\t\\\\t\\\\t\\\\tcl registerQuad: #(StickyPadMorph\\\\t\\\\tnewStandAlone\\\\t\\\\t\\\\t'Sticky Pad'\\\\t\\\\t\\\\t'Each time you obtain one of these pastel, translucent, borderless rectangles, it will be a different color from the previous time.')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'PlugIn Supplies'.]! !\\\\n\\\\n\\\\n!StickyPadMorph class methodsFor: 'class initialization' stamp: 'sw 3/3/2004 13:44'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Class initialization\\\\\\\"\\\\n\\\\n\\\\tLastColorIndex _ 0.\\\\n\\\\tColors _  {\\\\n\\\\t\\\\tTranslucentColor r: 0.0 g: 0.0 b: 0.839 alpha: 0.267.\\\\n\\\\t\\\\tTranslucentColor r: 0.484 g: 1.0 b: 0.452 alpha: 0.706.\\\\n\\\\t\\\\tTranslucentColor r: 1.0 g: 0.355 b: 0.71 alpha: 0.569.\\\\n\\\\t\\\\tTranslucentColor r: 1.0 g: 1.0 b: 0.03 alpha: 0.561.\\\\n\\\\t\\\\tTranslucentColor r: 0.484 g: 0.161 b: 1.0 alpha: 0.529.\\\\n\\\\t\\\\tTranslucentColor r: 0.097 g: 0.097 b: 0.097 alpha: 0.192.\\\\n\\\\t}.\\\\n\\\\t\\\\n\\\\tself registerInFlapsRegistry.\\\\t\\\\n\\\\n\\\\\\\"StickyPadMorph initialize\\\\\\\"! !\\\\n\\\\n\\\\n!StickyPadMorph class methodsFor: 'parts bin' stamp: 'sw 4/3/2003 14:26'!\\\\ndefaultNameStemForInstances\\\\n\\\\t\\\\\\\"Answer the default name stem to use\\\\\\\"\\\\n\\\\n\\\\t^ 'tear off'! !\\\\n\\\\n!StickyPadMorph class methodsFor: 'parts bin' stamp: 'sw 4/4/2003 11:12'!\\\\ndescriptionForPartsBin\\\\n\\\\t\\\\\\\"Answer a description of the receiver for use in a parts bin\\\\\\\"\\\\n\\\\n\\\\t^ self partName: \\\\t'Sticky Pad'\\\\n\\\\t\\\\tcategories:\\\\t\\\\t#('Graphics')\\\\n\\\\t\\\\tdocumentation:\\\\t'A translucent, borderless rectangle of a standard size, delivered in a predictable sequence of pastel colors'\\\\n\\\\t\\\\tsampleImageForm: (Form extent: 50@40 depth: 16\\\\n\\\\tfromArray: #( 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461414680 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1796762392 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461414680 1796762392 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1796762392 1796762392 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461414680 1796762392 1796762392 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1521900214 1521900214 1521900214 1521900214 1521900214 1521900214 1521900214 1521900214 1723098804 1723098804 1723098804 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1521900214 1521900214 1521900214 1521900214 1521900214 1521900214 1521900214 1521903284 1723098804 1723098804 1723096921 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1521900214 1521900214 1521900214 1521900214 1521900214 1521900214 1521900214 1723098804 1723098804 1723098804 1599692633 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1521900214 1521900214 1521900214 1521900214 1521900214 1521900214 1521903284 1723098804 1723098804 1723096921 1599692633 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1521900214 1521900214 1521900214 1521900214 1521900214 1521900214 1723098804 1723098804 1723098804 1599692633 1599692633 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1521900214 1521900214 1521900214 1521900214 1521900214 1521903284 1723098804 1723098804 1723096921 1599692633 1599692633 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1521900214 1521900214 1322274512 1322274512 1322274512 1389318863 1389318863 1389318863 1328697138 1328697138 1328697138 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1521900214 1521900214 1322274512 1322274512 1322275535 1389318863 1389318863 1389317938 1328697138 1328697138 1328702226 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1521900214 1521900214 1322274512 1322274512 1389318863 1389318863 1389318863 1328697138 1328697138 1328697138 1662149394 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1521900214 1521900214 1322274512 1322275535 1389318863 1389318863 1389317938 1328697138 1328697138 1328702226 1662149394 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1521900214 1521900214 1322274512 1389318863 1389318863 1389318863 1328697138 1328697138 1328697138 1662149394 1662149394 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1521900214 1521900214 1322275535 1389318863 1389318863 1389317938 1328697138 1328697138 1328702226 1662149394 1662149394 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1521900214 1521900214 1389318863 1389318863 1389318863 1460426508 1460426508 1460426508 1659658988 1659658988 1659658988 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1521900214 1521903284 1389318863 1389318863 1389317938 1460426508 1460426508 1460429548 1659658988 1659658988 1659660157 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1521900214 1723098804 1389318863 1389318863 1328697138 1460426508 1460426508 1659658988 1659658988 1659658988 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1521903284 1723098804 1389318863 1389317938 1328697138 1460426508 1460429548 1659658988 1659658988 1659660157 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1723098804 1723098804 1389318863 1328697138 1328697138 1460426508 1659658988 1659658988 1659658988 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521903284 1723098804 1723098804 1389317938 1328697138 1328697138 1460429548 1659658988 1659658988 1659660157 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1723098804 1723098804 1723098804 1328697138 1328697138 1328697138 1659658988 1659658988 1659658988 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461414680 1723098804 1723098804 1723096921 1328697138 1328697138 1328702226 1659658988 1659658988 1659660157 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1796762392 1723098804 1723098804 1599692633 1328697138 1328697138 1662149394 1659658988 1659658988 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461414680 1796762392 1723098804 1723096921 1599692633 1328697138 1328702226 1662149394 1659658988 1659660157 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1796762392 1796762392 1723098804 1599692633 1599692633 1328697138 1662149394 1662149394 1659658988 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461414680 1796762392 1796762392 1723096921 1599692633 1599692633 1328702226 1662149394 1662149394 1659660157 1736271741 1736271741 1736271741 1736271741 1736271741)\\\\n\\\\toffset: 0@0)! !\\\\n\\\\n!StickyPadMorph class methodsFor: 'parts bin' stamp: 'sw 7/5/2004 18:09'!\\\\nlaunchPartVia: aSelector label: aString\\\\n\\\\t\\\\\\\"Obtain a morph by sending aSelector to self, and attach it to the morphic hand.  This provides a general protocol for parts bins.  Overridden here so that all instances will be given the name, unlike the prevailing convention for other object types\\\\\\\"\\\\n\\\\n\\\\t| aMorph |\\\\n\\\\taMorph _ self perform: aSelector.\\\\n\\\\taMorph setNameTo: self defaultNameStemForInstances.  \\\\\\\"i.e., circumvent uniqueness in this case\\\\\\\"\\\\n\\\\taMorph setProperty: #beFullyVisibleAfterDrop toValue: true.\\\\n\\\\taMorph openInHand! !\\\\nSketchMorph subclass: #StickySketchMorph\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'EToys-Scripting Support'!\\\\n\\\\n!StickySketchMorph methodsFor: 'e-toy support' stamp: 'sw 4/16/1998 13:44'!\\\\nmustBeBackmost\\\\n\\\\t^ true! !\\\\n\\\\n\\\\n!StickySketchMorph methodsFor: 'halos and balloon help' stamp: 'sw 9/18/97 15:37'!\\\\nwantsHalo\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!StickySketchMorph methodsFor: 'thumbnail' stamp: 'sw 6/16/1999 11:32'!\\\\npermitsThumbnailing\\\\n\\\\t^ false! !\\\\nObject subclass: #Stopwatch\\\\n\\\\tinstanceVariableNames: 'timespans state'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Kernel-Chronology'!\\\\n!Stopwatch commentStamp: '<historical>' prior: 0!\\\\nA Stopwatch maintains a collection of timespans.!\\\\n\\\\n\\\\n!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/24/2003 23:12'!\\\\nactivate\\\\n\\\\n\\\\tself isSuspended ifTrue:\\\\n\\\\t\\\\t[self timespans add: \\\\n\\\\t\\\\t\\\\t(Timespan starting: DateAndTime now duration: Duration zero).\\\\n\\\\t\\\\tself state: #active]\\\\n! !\\\\n\\\\n!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/24/2003 23:45'!\\\\nduration\\\\n\\\\n\\\\t| ts last |\\\\n\\\\tself isSuspended \\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[ (ts _ self timespans) isEmpty ifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t[ ts _ { Timespan starting: DateAndTime now duration: Duration zero } ] ]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[ last _ self timespans last.\\\\n\\\\t\\\\t\\\\tts _ self timespans allButLast\\\\n\\\\t\\\\t\\\\t\\\\tadd: (last duration: (DateAndTime now - last start); yourself);\\\\n\\\\t\\\\t\\\\t\\\\tyourself ].\\\\n\\\\t\\\\t\\\\n\\\\t^ (ts collect: [ :t | t duration ]) sum\\\\n! !\\\\n\\\\n!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/25/2003 11:21'!\\\\nend\\\\n\\\\n\\\\t^ self timespans last next\\\\n\\\\n! !\\\\n\\\\n!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/24/2003 22:48'!\\\\nisActive\\\\n\\\\n\\\\t^ self state = #active\\\\n! !\\\\n\\\\n!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/24/2003 22:48'!\\\\nisSuspended\\\\n\\\\n\\\\t^ self state = #suspended\\\\n\\\\n! !\\\\n\\\\n!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/25/2003 13:25'!\\\\nprintOn: aStream\\\\n\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream\\\\n\\\\t\\\\tnextPut: $(;\\\\n\\\\t\\\\tnextPutAll: self state;\\\\n\\\\t\\\\tnextPut: $:;\\\\n\\\\t\\\\tprint: self duration;\\\\n\\\\t\\\\tnextPut: $).\\\\n\\\\n! !\\\\n\\\\n!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/25/2003 12:03'!\\\\nreActivate\\\\n\\\\n\\\\tself \\\\n\\\\t\\\\tsuspend;\\\\n\\\\t\\\\tactivate.\\\\n! !\\\\n\\\\n!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/25/2003 11:54'!\\\\nreset\\\\n\\\\n\\\\tself suspend.\\\\n\\\\ttimespans _ nil.\\\\n\\\\n! !\\\\n\\\\n!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/24/2003 23:18'!\\\\nstart\\\\n\\\\n\\\\t^ self timespans first start\\\\n\\\\n! !\\\\n\\\\n!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/24/2003 22:47'!\\\\nstate\\\\n\\\\n\\\\t^ state ifNil: [ state _ #suspended ]\\\\n! !\\\\n\\\\n!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/24/2003 22:46'!\\\\nstate: aSymbol\\\\n\\\\n\\\\tstate _ aSymbol\\\\n! !\\\\n\\\\n!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/24/2003 23:13'!\\\\nsuspend\\\\n\\\\n\\\\t| ts |\\\\n\\\\tself isActive ifTrue:\\\\n\\\\t\\\\t[ ts _ self timespans last.\\\\n\\\\t\\\\tts duration: (DateAndTime now - ts start).\\\\n\\\\t\\\\tself state: #suspended]\\\\n! !\\\\n\\\\n!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/24/2003 22:44'!\\\\ntimespans\\\\n\\\\n\\\\t^ timespans ifNil: [ timespans _ OrderedCollection new ]\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStopwatch class\\\\n\\\\tinstanceVariableNames: ''!\\\\nClassTestCase subclass: #StopwatchTest\\\\n\\\\tinstanceVariableNames: 'aStopwatch aDelay'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'KernelTests-Chronology'!\\\\n\\\\n!StopwatchTest methodsFor: 'Coverage' stamp: 'brp 9/24/2003 22:49'!\\\\nclassToBeTested\\\\n\\\\n\\\\t^ Stopwatch\\\\n\\\\n! !\\\\n\\\\n!StopwatchTest methodsFor: 'Coverage' stamp: 'brp 9/24/2003 23:01'!\\\\nselectorsToBeIgnored\\\\n\\\\n\\\\t| private | \\\\n\\\\tprivate := #( #printOn: #state: ).\\\\n\\\\n\\\\t^ super selectorsToBeIgnored, private\\\\n! !\\\\n\\\\n\\\\n!StopwatchTest methodsFor: 'running' stamp: 'brp 1/21/2004 18:49'!\\\\nsetUp\\\\n\\\\taStopwatch := Stopwatch new.\\\\n\\\\taDelay := Delay forMilliseconds: 1.! !\\\\n\\\\n\\\\n!StopwatchTest methodsFor: 'Tests' stamp: 'brp 9/25/2003 11:45'!\\\\ntestActive\\\\n\\\\n\\\\t| sw |\\\\n\\\\tsw _ Stopwatch new.\\\\n\\\\tsw activate.\\\\n\\\\t\\\\n\\\\t1 seconds asDelay wait.\\\\n\\\\tself \\\\n\\\\t\\\\tassert: (sw duration >= 1 seconds).\\\\n\\\\n\\\\t2 seconds asDelay wait.\\\\n\\\\tself \\\\n\\\\t\\\\tassert: (sw duration >= 3 seconds).\\\\n\\\\n\\\\tsw suspend.! !\\\\n\\\\n!StopwatchTest methodsFor: 'Tests' stamp: 'brp 9/24/2003 22:56'!\\\\ntestNew\\\\n\\\\n\\\\t| sw |\\\\n\\\\tsw _ Stopwatch new.\\\\n\\\\t\\\\n\\\\tself \\\\n\\\\t\\\\tassert: (sw isSuspended);\\\\n\\\\t\\\\tassert: (sw state = #suspended);\\\\n\\\\t\\\\tdeny: (sw isActive);\\\\n\\\\t\\\\tassert: (sw timespans isEmpty)\\\\n\\\\n! !\\\\n\\\\n!StopwatchTest methodsFor: 'Tests' stamp: 'brp 9/25/2003 12:02'!\\\\ntestReActivate\\\\n\\\\n\\\\t| sw |\\\\n\\\\tsw _ Stopwatch new.\\\\n\\\\tsw \\\\n\\\\t\\\\tactivate;\\\\n\\\\t\\\\tsuspend;\\\\n\\\\t\\\\treActivate.\\\\n\\\\t\\\\n\\\\tself \\\\n\\\\t\\\\tassert: (sw isActive).\\\\n! !\\\\n\\\\n!StopwatchTest methodsFor: 'Tests' stamp: 'brp 9/25/2003 11:56'!\\\\ntestReset\\\\n\\\\n\\\\t| sw |\\\\n\\\\tsw _ Stopwatch new.\\\\n\\\\tsw activate.\\\\n\\\\t\\\\n\\\\tsw reset.\\\\n\\\\tself \\\\n\\\\t\\\\tassert: (sw isSuspended);\\\\n\\\\t\\\\tassert: (sw timespans isEmpty)\\\\n! !\\\\n\\\\n!StopwatchTest methodsFor: 'Tests' stamp: 'brp 9/26/2004 19:36'!\\\\ntestStartStop\\\\n\\\\n\\\\t| sw t1 t2 t3 t4 |\\\\n\\\\tsw := Stopwatch new.\\\\n\\\\tt1 := DateAndTime now.\\\\n\\\\t(Delay forMilliseconds: 10) wait.\\\\n\\\\tsw activate; activate.\\\\n\\\\t(Delay forMilliseconds: 10) wait.\\\\n\\\\tt2 := DateAndTime now.\\\\n\\\\t\\\\n\\\\tself \\\\n\\\\t\\\\tdeny: (sw isSuspended);\\\\n\\\\t\\\\tassert: (sw isActive);\\\\n\\\\t\\\\tassert: (sw timespans size = 1);\\\\n\\\\t\\\\tassert: (t1 <= sw start);\\\\n\\\\t\\\\tassert: (sw start <= t2).\\\\n\\\\n\\\\t(Delay forMilliseconds: 10) wait.\\\\n\\\\tt3 := DateAndTime now.\\\\n\\\\t(Delay forMilliseconds: 10) wait.\\\\n\\\\tsw suspend; suspend.\\\\n\\\\t(Delay forMilliseconds: 10) wait.\\\\n\\\\tt4 := DateAndTime now.\\\\n\\\\n\\\\tself \\\\n\\\\t\\\\tassert: (sw isSuspended);\\\\n\\\\t\\\\tdeny: (sw isActive);\\\\n\\\\t\\\\tassert: (sw timespans size = 1);\\\\n\\\\t\\\\tassert: (sw end between: t3 and: t4);\\\\n\\\\t\\\\tassert: (t3 <= sw end);\\\\n\\\\t\\\\tassert: (sw end <= t4).\\\\n! !\\\\n\\\\n\\\\n!StopwatchTest methodsFor: 'testing' stamp: 'brp 1/21/2004 18:49'!\\\\ntestChangingStatus\\\\n\\\\taStopwatch activate.\\\\n\\\\tself assert: aStopwatch isActive.\\\\n\\\\tself assert: aStopwatch timespans size = 1.\\\\n\\\\taStopwatch suspend.\\\\n\\\\tself assert: aStopwatch isSuspended.\\\\n\\\\tself assert: aStopwatch timespans size = 1.\\\\n\\\\taStopwatch activate.\\\\n\\\\taStopwatch reActivate.\\\\n\\\\tself assert: aStopwatch isActive.\\\\n\\\\tself assert: aStopwatch timespans size = 3.\\\\n\\\\taStopwatch reset.\\\\n\\\\tself assert: aStopwatch isSuspended.\\\\n\\\\tself assert: aStopwatch timespans size = 0.! !\\\\n\\\\n!StopwatchTest methodsFor: 'testing' stamp: 'brp 1/21/2004 18:49'!\\\\ntestInitialStatus\\\\n\\\\tself assert: aStopwatch isSuspended.\\\\n\\\\tself deny: aStopwatch isActive.\\\\n\\\\tself assert: aStopwatch duration = 0 seconds! !\\\\n\\\\n!StopwatchTest methodsFor: 'testing' stamp: 'brp 9/26/2004 19:32'!\\\\ntestMultipleTimings\\\\n\\\\taStopwatch activate.\\\\n\\\\taDelay wait.\\\\n\\\\taStopwatch suspend.\\\\n\\\\taStopwatch activate.\\\\n\\\\taDelay wait.\\\\n\\\\taStopwatch suspend.\\\\n\\\\tself assert: aStopwatch timespans size = 2. \\\\n\\\\tself assert: aStopwatch timespans first asDateAndTime <= \\\\n\\\\t\\\\t\\\\t\\\\t\\\\taStopwatch timespans last asDateAndTime.\\\\n! !\\\\n\\\\n!StopwatchTest methodsFor: 'testing' stamp: 'brp 1/21/2004 18:49'!\\\\ntestPrintOn\\\\n\\\\t| cs rw |\\\\n\\\\tcs := ReadStream on: 'a Stopwatch(suspended:0:00:00:00)'.\\\\n\\\\trw := ReadWriteStream on: ''.\\\\n\\\\taStopwatch printOn: rw.\\\\n\\\\tself assert: rw contents = cs contents! !\\\\n\\\\n!StopwatchTest methodsFor: 'testing' stamp: 'brp 9/26/2004 19:32'!\\\\ntestSingleTiming\\\\n\\\\t| timeBefore |\\\\n\\\\ttimeBefore := DateAndTime now.\\\\n\\\\taStopwatch activate.\\\\n\\\\taDelay wait.\\\\n\\\\taStopwatch suspend.\\\\n\\\\tself assert: aStopwatch timespans size = 1. \\\\n\\\\tself assert: aStopwatch timespans first asDateAndTime >= timeBefore. \\\\n\\\\tself assert: aStopwatch timespans first asDateAndTime <= aStopwatch end.\\\\n! !\\\\nPrintableEncoder subclass: #StoreEncoder\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-Postscript Filters'!\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStoreEncoder class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StoreEncoder class methodsFor: 'configuring' stamp: 'MPW 1/1/1901 01:52'!\\\\nfilterSelector\\\\n    ^#storeOnStream:.\\\\n! !\\\\nBookMorph subclass: #StoryboardBookMorph\\\\n\\\\tinstanceVariableNames: 'alansSliders panAndTiltFactor zoomFactor zoomController'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-Books'!\\\\n!StoryboardBookMorph commentStamp: '<historical>' prior: 0!\\\\nA BookMorph variant whose pages are instances of ZoomAndScrollMorph. I have a control area where the user may pan, tilt and zoom over the image shown in the page.\\\\n\\\\n- drag up and down to zoom in and out\\\\n- drag left and right to pan\\\\n- shift-drag up and down to tilt.!\\\\n\\\\n\\\\n!StoryboardBookMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/30/2000 16:37'!\\\\nchangeTiltFactor: x\\\\n\\\\n\\\\tcurrentPage changeTiltFactor: x.\\\\n\\\\tpanAndTiltFactor _ x.\\\\n\\\\n! !\\\\n\\\\n!StoryboardBookMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/30/2000 16:37'!\\\\nchangeZoomFactor: x\\\\n\\\\n\\\\tcurrentPage changeZoomFactor: x.\\\\n\\\\tzoomFactor _ x.! !\\\\n\\\\n!StoryboardBookMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/30/2000 16:38'!\\\\ngetTiltFactor\\\\n\\\\n\\\\t^panAndTiltFactor ifNil: [panAndTiltFactor _ 0.5].! !\\\\n\\\\n!StoryboardBookMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/30/2000 16:38'!\\\\ngetZoomFactor\\\\n\\\\n\\\\t^zoomFactor ifNil: [zoomFactor _ 0.5]! !\\\\n\\\\n!StoryboardBookMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/22/2000 08:41'!\\\\noffsetX\\\\n\\\\n\\\\t^currentPage offsetX! !\\\\n\\\\n!StoryboardBookMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/22/2000 08:41'!\\\\noffsetX: aNumber\\\\n\\\\n\\\\tcurrentPage offsetX: aNumber! !\\\\n\\\\n!StoryboardBookMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/22/2000 08:41'!\\\\noffsetY\\\\n\\\\n\\\\t^currentPage offsetY! !\\\\n\\\\n!StoryboardBookMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/22/2000 08:41'!\\\\noffsetY: aNumber\\\\n\\\\n\\\\tcurrentPage offsetY: aNumber! !\\\\n\\\\n!StoryboardBookMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/22/2000 08:35'!\\\\nscale\\\\n\\\\n\\\\t^currentPage scale! !\\\\n\\\\n!StoryboardBookMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/22/2000 08:26'!\\\\nscale: aValue\\\\n\\\\n\\\\tcurrentPage scale: aValue! !\\\\n\\\\n\\\\n!StoryboardBookMorph methodsFor: 'initialization' stamp: 'RAA 12/1/2000 15:22'!\\\\ninitialize\\\\n\\\\n\\\\tnewPagePrototype _ ZoomAndScrollMorph new extent: Display extent // 3.\\\\n\\\\tzoomController _ ZoomAndScrollControllerMorph new\\\\n\\\\t\\\\t\\\\tsetBalloonText: 'Drag in here to zoom, tilt and pan the page above'.\\\\n\\\\n\\\\tsuper initialize.\\\\n\\\\n\\\\tself addMorphBack: zoomController.\\\\n\\\\n\\\\talansSliders _ {\\\\n\\\\t\\\\t{#changeTiltFactor: . #getTiltFactor . 'Pan and tilt sensitivity'}.\\\\n\\\\t\\\\t{#changeZoomFactor: . #getZoomFactor . 'Zoom sensitivity'}.\\\\n\\\\t} collect: [ :sData |\\\\n\\\\t\\\\t{\\\\n\\\\t\\\\t\\\\tSimpleSliderMorph new\\\\n\\\\t\\\\t\\\\t\\\\textent: 150@10;\\\\n\\\\t\\\\t\\\\t\\\\tcolor: Color orange;\\\\n\\\\t\\\\t\\\\t\\\\tsliderColor: Color gray;\\\\n\\\\t\\\\t\\\\t\\\\ttarget: self; \\\\n\\\\t\\\\t\\\\t\\\\tactionSelector: sData first;\\\\n\\\\t\\\\t\\\\t\\\\tsetBalloonText: sData third;\\\\n\\\\t\\\\t\\\\t\\\\tadjustToValue: (self perform: sData second).\\\\n\\\\t\\\\t\\\\tsData second\\\\n\\\\t\\\\t}\\\\n\\\\t].\\\\n\\\\talansSliders do: [ :each | self addMorphBack: each first]\\\\n! !\\\\n\\\\n\\\\n!StoryboardBookMorph methodsFor: 'navigation' stamp: 'sw 7/25/2003 16:47'!\\\\ninsertPageMorphInCorrectSpot: aPageMorph\\\\n\\\\t\\\\\\\"Insert the page morph at the correct spot\\\\\\\"\\\\n\\\\t\\\\n\\\\t| place |\\\\n\\\\tplace _ submorphs size > 1 ifTrue: [submorphs second] ifFalse: [submorphs first].\\\\n\\\\t\\\\\\\"Old architecture had a tiny spacer morph as the second morph; now architecture does not\\\\\\\"\\\\n\\\\tself addMorph: (currentPage _ aPageMorph) behind: place.\\\\n\\\\tself changeTiltFactor: self getTiltFactor.\\\\n\\\\tself changeZoomFactor: self getZoomFactor.\\\\n\\\\tzoomController target: currentPage.\\\\n\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStoryboardBookMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StoryboardBookMorph class methodsFor: 'parts bin' stamp: 'sw 8/2/2001 12:53'!\\\\ndescriptionForPartsBin\\\\n\\\\t^ self partName:\\\\t'Storyboard'\\\\n\\\\t\\\\tcategories:\\\\t\\\\t#('Presentation')\\\\n\\\\t\\\\tdocumentation:\\\\t'A storyboard authoring tool'! !\\\\nObject subclass: #Stream\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Collections-Streams'!\\\\n!Stream commentStamp: '<historical>' prior: 0!\\\\nI am an abstract class that represents an accessor for a sequence of objects. This sequence is referred to as my \\\\\\\"contents\\\\\\\".!\\\\n\\\\n\\\\n!Stream methodsFor: 'accessing' stamp: 'yo 8/30/2002 17:13'!\\\\nbasicNext\\\\n\\\\n\\\\t^ self next.\\\\n! !\\\\n\\\\n!Stream methodsFor: 'accessing' stamp: 'yo 8/30/2002 17:13'!\\\\nbasicNextPut: anObject \\\\n\\\\n\\\\t^ self nextPut: anObject! !\\\\n\\\\n!Stream methodsFor: 'accessing' stamp: 'yo 8/30/2002 17:13'!\\\\nbasicNextPutAll: aCollection \\\\n\\\\n\\\\t^ self nextPutAll: aCollection.\\\\n! !\\\\n\\\\n!Stream methodsFor: 'accessing' stamp: 'nk 2/24/2001 17:31'!\\\\nbinary! !\\\\n\\\\n!Stream methodsFor: 'accessing'!\\\\ncontents\\\\n\\\\t\\\\\\\"Answer all of the contents of the receiver.\\\\\\\"\\\\n\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n!Stream methodsFor: 'accessing' stamp: 'sma 4/22/2000 17:07'!\\\\nflush\\\\n\\\\t\\\\\\\"Do nothing by default\\\\\\\"! !\\\\n\\\\n!Stream methodsFor: 'accessing' stamp: 'nk 4/29/2004 10:38'!\\\\nlocalName\\\\n\\\\t^'a stream'! !\\\\n\\\\n!Stream methodsFor: 'accessing'!\\\\nnext\\\\n\\\\t\\\\\\\"Answer the next object accessible by the receiver.\\\\\\\"\\\\n\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n!Stream methodsFor: 'accessing'!\\\\nnext: anInteger \\\\n\\\\t\\\\\\\"Answer the next anInteger number of objects accessible by the receiver.\\\\\\\"\\\\n\\\\n\\\\t| aCollection |\\\\n\\\\taCollection _ OrderedCollection new.\\\\n\\\\tanInteger timesRepeat: [aCollection addLast: self next].\\\\n\\\\t^aCollection! !\\\\n\\\\n!Stream methodsFor: 'accessing'!\\\\nnext: anInteger put: anObject \\\\n\\\\t\\\\\\\"Make anObject be the next anInteger number of objects accessible by the \\\\n\\\\treceiver. Answer anObject.\\\\\\\"\\\\n\\\\n\\\\tanInteger timesRepeat: [self nextPut: anObject].\\\\n\\\\t^anObject! !\\\\n\\\\n!Stream methodsFor: 'accessing'!\\\\nnextMatchAll: aColl\\\\n    \\\\\\\"Answer true if next N objects are the ones in aColl,\\\\n     else false.  Advance stream of true, leave as was if false.\\\\\\\"\\\\n    | save |\\\\n    save _ self position.\\\\n    aColl do: [:each |\\\\n       (self next) = each ifFalse: [\\\\n            self position: save.\\\\n            ^ false]\\\\n        ].\\\\n    ^ true! !\\\\n\\\\n!Stream methodsFor: 'accessing'!\\\\nnextMatchFor: anObject \\\\n\\\\t\\\\\\\"Gobble the next object and answer whether it is equal to the argument, \\\\n\\\\tanObject.\\\\\\\"\\\\n\\\\n\\\\t^anObject = self next! !\\\\n\\\\n!Stream methodsFor: 'accessing'!\\\\nnextPut: anObject \\\\n\\\\t\\\\\\\"Insert the argument, anObject, as the next object accessible by the \\\\n\\\\treceiver. Answer anObject.\\\\\\\"\\\\n\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n!Stream methodsFor: 'accessing'!\\\\nnextPutAll: aCollection \\\\n\\\\t\\\\\\\"Append the elements of aCollection to the sequence of objects accessible \\\\n\\\\tby the receiver. Answer aCollection.\\\\\\\"\\\\n\\\\n\\\\taCollection do: [:v | self nextPut: v].\\\\n\\\\t^aCollection! !\\\\n\\\\n!Stream methodsFor: 'accessing' stamp: 'nk 4/29/2004 10:40'!\\\\nopenReadOnly\\\\n\\\\t^self! !\\\\n\\\\n!Stream methodsFor: 'accessing' stamp: 'ajh 7/31/2001 20:34'!\\\\nprintOn: stream\\\\n\\\\n\\\\tsuper printOn: stream.\\\\n\\\\tstream space.\\\\n\\\\tself contents printOn: stream.\\\\n! !\\\\n\\\\n!Stream methodsFor: 'accessing' stamp: 'nk 4/29/2004 10:41'!\\\\nreadOnly\\\\n\\\\t^self! !\\\\n\\\\n!Stream methodsFor: 'accessing' stamp: 'ls 9/12/1998 20:55'!\\\\nupToEnd\\\\n\\\\t\\\\\\\"answer the remaining elements in the string\\\\\\\"\\\\n\\\\t| elements |\\\\n\\\\telements _ OrderedCollection new.\\\\n\\\\t[ self atEnd ] whileFalse: [ \\\\n\\\\t\\\\telements add: self next ].\\\\n\\\\t^elements! !\\\\n\\\\n\\\\n!Stream methodsFor: 'alternate syntax' stamp: 'RAA 6/20/2000 12:52'!\\\\ndialect\\\\n\\\\n\\\\t^#ST80\\\\t\\\\t\\\\\\\"in case a regular stream is used to print parse nodes\\\\\\\"! !\\\\n\\\\n!Stream methodsFor: 'alternate syntax' stamp: 'RAA 6/20/2000 12:54'!\\\\nwithStyleFor: elementType do: aBlock\\\\n\\\\n\\\\t^aBlock value\\\\t\\\\t\\\\\\\"in case a regular stream is used to print parse nodes\\\\\\\"\\\\n\\\\\\\">>\\\\n(Compiler new compile: 'blah ^self' in: String notifying: nil ifFail: []) printString\\\\n<<\\\\\\\"! !\\\\n\\\\n\\\\n!Stream methodsFor: 'as yet unclassified' stamp: 'RAA 9/11/2000 19:12'!\\\\nsleep\\\\n\\\\n\\\\t\\\\\\\"an FTP-based stream might close the connection here\\\\\\\"! !\\\\n\\\\n\\\\n!Stream methodsFor: 'enumerating'!\\\\ndo: aBlock \\\\n\\\\t\\\\\\\"Evaluate aBlock for each of the objects accessible by receiver.\\\\\\\"\\\\n\\\\n\\\\t[self atEnd]\\\\n\\\\t\\\\twhileFalse: [aBlock value: self next]! !\\\\n\\\\n\\\\n!Stream methodsFor: 'file open/close' stamp: 'mir 8/10/1999 12:04'!\\\\nclose! !\\\\n\\\\n\\\\n!Stream methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 00:48'!\\\\nwrite:encodedObject\\\\n\\\\t^encodedObject putOn:self.\\\\n! !\\\\n\\\\n\\\\n!Stream methodsFor: 'printing' stamp: 'sma 6/1/2000 09:56'!\\\\nprint: anObject\\\\n\\\\t\\\\\\\"Have anObject print itself on the receiver.\\\\\\\"\\\\n\\\\n\\\\tanObject printOn: self! !\\\\n\\\\n!Stream methodsFor: 'printing' stamp: 'djp 7/21/1998 17:13'!\\\\nprintHtml: anObject\\\\n\\\\tanObject printHtmlOn: self! !\\\\n\\\\n\\\\n!Stream methodsFor: 'testing'!\\\\natEnd\\\\n\\\\t\\\\\\\"Answer whether the receiver can access any more objects.\\\\\\\"\\\\n\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n!Stream methodsFor: 'testing' stamp: 'ab 8/28/2003 18:30'!\\\\nclosed\\\\n\\\\t^ false! !\\\\n\\\\n!Stream methodsFor: 'testing' stamp: 'ar 12/23/1999 15:43'!\\\\nisStream\\\\n\\\\t\\\\\\\"Return true if the receiver responds to the stream protocol\\\\\\\"\\\\n\\\\t^true! !\\\\n\\\\n!Stream methodsFor: 'testing' stamp: 'mir 11/10/2003 18:22'!\\\\nisTypeHTTP\\\\n\\\\n\\\\t^false! !\\\\n\\\\n!Stream methodsFor: 'testing' stamp: 'ar 5/17/2001 19:07'!\\\\nnextWordsPutAll: aCollection\\\\n\\\\t\\\\\\\"Write the argument a word-like object in big endian format on the receiver.\\\\n\\\\tMay be used to write other than plain word-like objects (such as ColorArray).\\\\\\\"\\\\n\\\\taCollection class isPointers | aCollection class isWords not \\\\n\\\\t\\\\tifTrue: [^self error: aCollection class name,' is not word-like'].\\\\n\\\\t1 to: aCollection basicSize do:[:i|\\\\n\\\\t\\\\tself nextNumber: 4 put: (aCollection basicAt: i).\\\\n\\\\t].\\\\n\\\\t^aCollection! !\\\\n\\\\n\\\\n!Stream methodsFor: '*monticello' stamp: 'cwp 8/9/2003 12:02'!\\\\nisMessageStream\\\\n\\\\t^ false! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStream class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!Stream class methodsFor: 'instance creation'!\\\\nnew\\\\n\\\\n\\\\tself error: 'Streams are created with on: and with:'! !\\\\nTestCase subclass: #StreamBugz\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Tests-Bugs'!\\\\n\\\\n!StreamBugz methodsFor: 'as yet unclassified' stamp: 'ar 8/5/2003 02:25'!\\\\ntestReadWriteStreamNextNBug\\\\n\\\\t| aStream |\\\\n\\\\taStream := ReadWriteStream on: String new.\\\\n\\\\taStream nextPutAll: 'Hello World'.\\\\n\\\\tself shouldnt:[aStream next: 5] raise: Error.\\\\n! !\\\\nAbstractSound subclass: #StreamingMP3Sound\\\\n\\\\tinstanceVariableNames: 'volume repeat mpegFile mpegStreamIndex totalSamples streamSamplingRate mixer lastBufferMSecs mutex'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Movies-Kernel'!\\\\n!StreamingMP3Sound commentStamp: '<historical>' prior: 0!\\\\nI implement a streaming player for MPEG or MP3 files.\\\\nExample of use:\\\\n\\\\t(StreamingMP3Sound onFileNamed: 'song.mp3') play.\\\\n!\\\\n\\\\n\\\\n!StreamingMP3Sound methodsFor: 'accessing' stamp: 'jm 11/16/2001 17:16'!\\\\nduration\\\\n\\\\t\\\\\\\"Answer the duration of this sound in seconds.\\\\\\\"\\\\n\\\\n\\\\t^ totalSamples asFloat / streamSamplingRate\\\\n! !\\\\n\\\\n!StreamingMP3Sound methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nrepeat\\\\n\\\\t\\\\\\\"Answer the repeat flag.\\\\\\\"\\\\n\\\\n\\\\trepeat ifNil: [repeat := false].\\\\n\\\\t^ repeat\\\\n! !\\\\n\\\\n!StreamingMP3Sound methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nrepeat: aBoolean\\\\n\\\\t\\\\\\\"Set the repeat flag. If true, this sound will loop back to the beginning when it gets to the end.\\\\\\\"\\\\n\\\\n\\\\trepeat := aBoolean.\\\\n! !\\\\n\\\\n!StreamingMP3Sound methodsFor: 'accessing' stamp: 'jm 11/16/2001 16:18'!\\\\nsoundPosition\\\\n\\\\t\\\\\\\"Answer the relative position of sound playback as a number between 0.0 and 1.0.\\\\\\\"\\\\n\\\\n\\\\tself mpegFileIsOpen ifFalse: [^ 0.0].\\\\n\\\\tmpegFile hasAudio ifFalse: [^ 0.0].\\\\n\\\\t^ (mpegFile audioGetSample: 0) asFloat / totalSamples\\\\n! !\\\\n\\\\n!StreamingMP3Sound methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nsoundPosition: fraction\\\\n\\\\t\\\\\\\"Jump to the position the given fraction through the sound file. The argument is a number between 0.0 and 1.0.\\\\\\\"\\\\n\\\\n\\\\t| sampleIndex |\\\\n\\\\tself mpegFileIsOpen ifFalse: [^ self].\\\\n\\\\tmpegFile hasAudio ifTrue: [\\\\n\\\\t\\\\tsampleIndex := ((totalSamples * fraction) truncated max: 0) min: totalSamples.\\\\n\\\\t\\\\tmpegFile audioSetSample: 0 stream: 0.  \\\\\\\"work around for library bug: first seek to zero\\\\\\\"\\\\n\\\\t\\\\tmpegFile audioSetSample: sampleIndex stream: 0].\\\\n! !\\\\n\\\\n!StreamingMP3Sound methodsFor: 'accessing' stamp: 'jm 11/16/2001 15:34'!\\\\nstreamSamplingRate\\\\n\\\\t\\\\\\\"Answer the sampling rate of the MP3 stream.\\\\\\\"\\\\n\\\\n\\\\t^ streamSamplingRate\\\\n! !\\\\n\\\\n!StreamingMP3Sound methodsFor: 'accessing' stamp: 'jm 9/26/2000 07:49'!\\\\nvolume\\\\n\\\\t\\\\\\\"Answer my volume.\\\\\\\"\\\\n\\\\n\\\\t^ volume\\\\n! !\\\\n\\\\n!StreamingMP3Sound methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nvolume: aNumber\\\\n\\\\t\\\\\\\"Set my volume to the given number between 0.0 and 1.0.\\\\\\\"\\\\n\\\\n\\\\tvolume := aNumber.\\\\n\\\\tself createMixer.\\\\n! !\\\\n\\\\n\\\\n!StreamingMP3Sound methodsFor: 'converting' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nsaveAsFileNamed: newFileName compressionType: compressionTypeString\\\\n\\\\t\\\\\\\"Store this MP3 sound in a SunAudio file with the given name using the given compression type.\\\\\\\"\\\\n\\\\n\\\\t| outFile |\\\\n\\\\toutFile := (FileStream newFileNamed: newFileName) binary.\\\\n\\\\tself storeSunAudioOn: outFile compressionType: compressionTypeString.\\\\n\\\\toutFile close.\\\\n! !\\\\n\\\\n!StreamingMP3Sound methodsFor: 'converting' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nstoreSunAudioOn: aBinaryStream compressionType: compressionName\\\\n\\\\t\\\\\\\"Store myself on the given stream as a monophonic sound compressed with the given type of compression. The sampling rate is reduced to 22050 samples/second if it is higher.\\\\\\\"\\\\n\\\\n\\\\t| fmt inBufSize samplesPerFrame codec inBuf compressed outSamplingRate audioWriter samplesRemaining outBuf counts byteCount |\\\\n\\\\tself pause; reset.  \\\\\\\"stop playing and return to beginning\\\\\\\"\\\\n\\\\n\\\\tfmt := SunAudioFileWriter formatCodeForCompressionType: compressionName.\\\\n\\\\tinBufSize := 64000.\\\\n\\\\tsamplesPerFrame := 1.\\\\n\\\\tcodec := SunAudioFileWriter codecForFormatCode: fmt.\\\\n\\\\tcodec ifNotNil: [\\\\n\\\\t\\\\tsamplesPerFrame := codec samplesPerFrame.\\\\n\\\\t\\\\tinBufSize := inBufSize roundUpTo: (2 * samplesPerFrame).\\\\n\\\\t\\\\tcompressed := ByteArray new:\\\\n\\\\t\\\\t\\\\t(inBufSize // samplesPerFrame) * codec bytesPerEncodedFrame].\\\\n\\\\tinBuf := SoundBuffer newMonoSampleCount: inBufSize.\\\\n\\\\toutSamplingRate := streamSamplingRate.\\\\n\\\\tstreamSamplingRate > 22050 ifTrue: [\\\\n\\\\t\\\\tstreamSamplingRate = 44100 ifFalse: [self error: 'unexpected MP3 sampling rate'].\\\\n\\\\t\\\\toutSamplingRate := 22050].\\\\n\\\\n\\\\t\\\\\\\"write audio header\\\\\\\"\\\\n\\\\taudioWriter := SunAudioFileWriter onStream: aBinaryStream.\\\\n\\\\taudioWriter writeHeaderSamplingRate: outSamplingRate format: fmt.\\\\n\\\\n\\\\t\\\\\\\"convert and write sound data\\\\\\\"\\\\n\\\\t'Storing audio...' displayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\tfrom: 0 to: totalSamples during: [:bar |\\\\n\\\\t\\\\t\\\\tsamplesRemaining := totalSamples.\\\\n\\\\t\\\\t\\\\t[samplesRemaining > 0] whileTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tbar value: totalSamples - samplesRemaining.\\\\n\\\\t\\\\t\\\\t\\\\tsamplesRemaining < inBuf monoSampleCount ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tinBuf := SoundBuffer newMonoSampleCount:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(samplesRemaining roundUpTo: 2 * samplesPerFrame)].\\\\n\\\\t\\\\t\\\\t\\\\tmpegFile audioReadBuffer: inBuf stream: 0 channel: 0.\\\\n\\\\t\\\\t\\\\t\\\\toutSamplingRate < streamSamplingRate\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [outBuf := inBuf downSampledLowPassFiltering: true]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [outBuf := inBuf].\\\\n\\\\t\\\\t\\\\t\\\\tcodec\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifNil: [audioWriter appendSamples: outBuf]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifNotNil: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcounts := codec\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tencodeFrames: (outBuf size // samplesPerFrame)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfrom: outBuf at: 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinto: compressed at: 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbyteCount := counts last.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbyteCount = compressed size\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [audioWriter appendBytes: compressed]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [audioWriter appendBytes: (compressed copyFrom: 1 to: byteCount)]].\\\\n\\\\t\\\\t\\\\t\\\\tsamplesRemaining := samplesRemaining - inBuf monoSampleCount]].\\\\n\\\\n\\\\t\\\\\\\"update audio header\\\\\\\"\\\\n\\\\taudioWriter updateHeaderDataSize.\\\\n! !\\\\n\\\\n\\\\n!StreamingMP3Sound methodsFor: 'file ops' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\ncloseFile\\\\n\\\\t\\\\\\\"Close the MP3 or MPEG file.\\\\\\\"\\\\n\\\\n\\\\tself pause.\\\\n\\\\tmpegFile ifNil: [^ self].\\\\n\\\\tmpegFile closeFile.\\\\n\\\\tmpegFile := nil.\\\\n\\\\tmixer := nil.\\\\n! !\\\\n\\\\n!StreamingMP3Sound methodsFor: 'file ops' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nmpegFileIsOpen\\\\n\\\\t\\\\\\\"Answer true if I have an open, valid MPEG file handle. If the handle is not valid, try to re-open the file.\\\\\\\"\\\\n\\\\n\\\\tmpegFile ifNil: [^ false].\\\\n\\\\tmpegFile fileHandle ifNil: [\\\\n\\\\t\\\\t\\\\\\\"try to reopen the file, which may have been saved in a snapshot\\\\\\\"\\\\n\\\\t\\\\tmpegFile openFile: mpegFile fileName.\\\\n\\\\t\\\\tmpegFile fileHandle ifNil: [mpegFile := nil]].\\\\n\\\\t^ mpegFile notNil\\\\n! !\\\\n\\\\n\\\\n!StreamingMP3Sound methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\ninitMPEGFile: anMPEGFile streamIndex: anInteger\\\\n\\\\t\\\\\\\"Initialize for playing the given stream of the given MPEG or MP3 file.\\\\\\\"\\\\n\\\\n\\\\tvolume := 0.3.\\\\n\\\\trepeat := false.\\\\n\\\\tmpegFile := anMPEGFile.\\\\n\\\\tmpegStreamIndex := anInteger.\\\\n\\\\ttotalSamples := mpegFile audioSamples: mpegStreamIndex.\\\\n\\\\tself reset.\\\\n! !\\\\n\\\\n\\\\n!StreamingMP3Sound methodsFor: 'playing' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nmillisecondsSinceStart\\\\n\\\\t\\\\\\\"Answer the number of milliseconds since this sound started playing.\\\\\\\"\\\\n\\\\n\\\\t| i mSecs |\\\\n\\\\tmpegFile ifNil: [^ 0].\\\\n\\\\tmpegFile fileHandle ifNil: [^ 0].  \\\\\\\"mpeg file not open\\\\\\\"\\\\n\\\\ti := mpegFile audioGetSample: mpegStreamIndex.\\\\n\\\\ti < 0 ifTrue: [^ 0].  \\\\\\\"movie file has no audio\\\\\\\"\\\\n\\\\tmSecs := i * 1000 // streamSamplingRate.\\\\n\\\\t(self isPlaying and: [lastBufferMSecs > 0]) ifTrue: [\\\\n\\\\t\\\\t\\\\\\\"adjust mSecs by the milliseconds since the last buffer\\\\\\\"\\\\n\\\\t\\\\tmutex critical: [\\\\n\\\\t\\\\t\\\\tmSecs := i * 1000 // streamSamplingRate.\\\\n\\\\t\\\\t\\\\tmSecs := mSecs + ((Time millisecondClockValue - lastBufferMSecs) max: 0)]].\\\\n\\\\t^ mSecs + 350 - (2 * SoundPlayer bufferMSecs)\\\\n! !\\\\n\\\\n!StreamingMP3Sound methodsFor: 'playing' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nplaySampleCount: n into: aSoundBuffer startingAt: startIndex\\\\n\\\\t\\\\\\\"Mix the next n samples of this sound into the given buffer starting at the given index\\\\\\\"\\\\n\\\\n\\\\t| current |\\\\n\\\\tself repeat ifTrue: [  \\\\\\\"loop if necessary\\\\\\\"\\\\n\\\\t\\\\tcurrent := mpegFile audioGetSample: mpegStreamIndex.\\\\n\\\\t\\\\t(totalSamples - current) < n ifTrue: [\\\\n\\\\t\\\\t\\\\tmpegFile audioSetSample: 0 stream: mpegStreamIndex]].\\\\n\\\\n\\\\tmutex critical: [\\\\n\\\\t\\\\tlastBufferMSecs := Time millisecondClockValue.\\\\n\\\\t\\\\tself loadBuffersForSampleCount: (n * streamSamplingRate) // SoundPlayer samplingRate.\\\\n\\\\t\\\\tmixer playSampleCount: n into: aSoundBuffer startingAt: startIndex].\\\\n! !\\\\n\\\\n!StreamingMP3Sound methodsFor: 'playing' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nreset\\\\n\\\\n\\\\tsuper reset.\\\\n\\\\tself createMixer.\\\\n\\\\tmpegFile audioSetSample: 0 stream: mpegStreamIndex.\\\\n\\\\tlastBufferMSecs := 0.\\\\n\\\\tmutex := Semaphore forMutualExclusion.\\\\n! !\\\\n\\\\n!StreamingMP3Sound methodsFor: 'playing' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nsamplesRemaining\\\\n\\\\n\\\\t| samplesPlayed |\\\\n\\\\tmpegFile ifNil: [^ 0].\\\\n\\\\tself repeat ifTrue: [^ 1000000].\\\\n\\\\tsamplesPlayed := mpegFile audioGetSample: mpegStreamIndex.\\\\n\\\\tsamplesPlayed > totalSamples ifTrue: [^ 0].\\\\n\\\\t^ totalSamples - samplesPlayed\\\\n! !\\\\n\\\\n\\\\n!StreamingMP3Sound methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\ncreateMixer\\\\n\\\\t\\\\\\\"Create a mixed sound consisting of sampled sounds with one sound buffer's worth of samples. The sound has the same sampling rate and number of channels as the MPEG or MP3 file.\\\\\\\"\\\\n\\\\n\\\\t| channels pan snd |\\\\n\\\\tmpegFile ifNil: [^ self error: 'No MPEG or MP3 file'].\\\\n\\\\tchannels := mpegFile audioChannels: mpegStreamIndex.\\\\n\\\\tstreamSamplingRate := mpegFile audioSampleRate: mpegStreamIndex.\\\\n\\\\tmixer := MixedSound new.\\\\n\\\\t1 to: channels do: [:c |\\\\n\\\\t\\\\tchannels = 1\\\\n\\\\t\\\\t\\\\tifTrue: [pan := 0.5]\\\\n\\\\t\\\\t\\\\tifFalse: [pan := (c - 1) asFloat / (channels - 1)].\\\\n\\\\t\\\\tsnd := SampledSound\\\\n\\\\t\\\\t\\\\tsamples: (SoundBuffer newMonoSampleCount: 2)  \\\\\\\"buffer size will be adjusted dynamically\\\\\\\"\\\\n\\\\t\\\\t\\\\tsamplingRate: streamSamplingRate.\\\\n\\\\t\\\\tmixer add: snd pan: pan volume: volume].\\\\n! !\\\\n\\\\n!StreamingMP3Sound methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nloadBuffersForSampleCount: count\\\\n        \\\\\\\"Load the sound buffers for all tracks with the next count\\\\nsamples from the MPEG\\\\nfile sound track.\\\\\\\"\\\\n\\\\n        | snd buf |\\\\n        1 to: mixer sounds size do: [:i |\\\\n                snd := mixer sounds at: i.\\\\n                buf := snd samples.\\\\n                buf monoSampleCount = count ifFalse: [\\\\n                        buf := SoundBuffer newMonoSampleCount: count.\\\\n                        snd setSamples: buf samplingRate:\\\\nstreamSamplingRate].\\\\n                i = 1 ifTrue: [  \\\\\\\"first channel\\\\\\\"\\\\n                                mpegFile\\\\n                                        audioReadBuffer: buf\\\\n                                        stream: mpegStreamIndex\\\\n                                        channel: 0]\\\\n                        ifFalse: [  \\\\\\\"all other channels\\\\\\\"\\\\n                                mpegFile\\\\n                                        audioReReadBuffer: buf\\\\n                                        stream: mpegStreamIndex\\\\n                                        channel: 1]].\\\\n        mixer reset.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStreamingMP3Sound class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StreamingMP3Sound class methodsFor: 'instance creation' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nonFileNamed: fileName\\\\n\\\\t\\\\\\\"Answer an instance of me for playing the sound track of the MPEG or MP3 file with the given name. Answer nil the file is not a valid MPEG or MP3 file.\\\\\\\"\\\\n\\\\n\\\\t| mpegFile |\\\\n\\\\t(MPEGFile isFileValidMPEG: fileName) ifFalse: [^ nil].\\\\n\\\\tmpegFile := MPEGFile openFile: fileName.\\\\n\\\\t^ self new initMPEGFile: mpegFile streamIndex: 0  \\\\\\\"assume sound track is in stream 0\\\\\\\"\\\\n! !\\\\nAbstractSound subclass: #StreamingMonoSound\\\\n\\\\tinstanceVariableNames: 'stream volume repeat headerStart audioDataStart streamSamplingRate totalSamples codec mixer leftoverSamples lastBufferMSecs mutex'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Sound-Synthesis'!\\\\n!StreamingMonoSound commentStamp: '<historical>' prior: 0!\\\\nI implement a streaming player for monophonic Sun (.au) and AIFF (.aif) audio files.\\\\nExample of use:\\\\n\\\\t(StreamingMonoSound onFileNamed: 'song.aif') play.\\\\n!\\\\n\\\\n\\\\n!StreamingMonoSound methodsFor: 'accessing' stamp: 'jm 11/16/2001 17:12'!\\\\nduration\\\\n\\\\t\\\\\\\"Answer the duration of this sound in seconds.\\\\\\\"\\\\n\\\\n\\\\t^ totalSamples asFloat / streamSamplingRate\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'accessing' stamp: 'jm 10/18/2001 15:46'!\\\\nrepeat\\\\n\\\\t\\\\\\\"Answer the repeat flag.\\\\\\\"\\\\n\\\\n\\\\t^ repeat\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nrepeat: aBoolean\\\\n\\\\t\\\\\\\"Set the repeat flag. If true, this sound will loop back to the beginning when it gets to the end.\\\\\\\"\\\\n\\\\n\\\\trepeat := aBoolean.\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'accessing' stamp: 'jm 11/16/2001 17:05'!\\\\nsoundPosition\\\\n\\\\t\\\\\\\"Answer the relative position of sound playback as a number between 0.0 and 1.0.\\\\\\\"\\\\n\\\\n\\\\t(stream isNil or: [stream closed]) ifTrue: [^ 0.0].\\\\n\\\\t^ self currentSampleIndex asFloat / totalSamples\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nsoundPosition: fraction\\\\n\\\\t\\\\\\\"Jump to the position the given fraction through the sound file. The argument is a number between 0.0 and 1.0.\\\\\\\"\\\\n\\\\n\\\\t| desiredSampleIndex |\\\\n\\\\t(stream isNil or: [stream closed]) ifTrue: [^ self].\\\\n\\\\tdesiredSampleIndex := ((totalSamples * fraction) truncated max: 0) min: totalSamples.\\\\n\\\\tcodec\\\\n\\\\t\\\\tifNil: [stream position: audioDataStart + (desiredSampleIndex * 2)]\\\\n\\\\t\\\\tifNotNil: [self positionCodecTo: desiredSampleIndex].\\\\n\\\\tleftoverSamples := SoundBuffer new.\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'accessing' stamp: 'jm 11/20/2001 16:59'!\\\\nstreamSamplingRate\\\\n\\\\t\\\\\\\"Answer the sampling rate of the MP3 stream.\\\\\\\"\\\\n\\\\n\\\\t^ streamSamplingRate\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'accessing' stamp: 'jm 9/26/2000 07:49'!\\\\nvolume\\\\n\\\\t\\\\\\\"Answer my volume.\\\\\\\"\\\\n\\\\n\\\\t^ volume\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nvolume: aNumber\\\\n\\\\t\\\\\\\"Set my volume to the given number between 0.0 and 1.0.\\\\\\\"\\\\n\\\\n\\\\tvolume := aNumber.\\\\n\\\\tself createMixer.\\\\n! !\\\\n\\\\n\\\\n!StreamingMonoSound methodsFor: 'converting' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nsaveAsFileNamed: newFileName compressionType: compressionTypeString\\\\n\\\\t\\\\\\\"Store this sound in a new file with the given name using the given compression type. Useful for converting between compression formats.\\\\\\\"\\\\n\\\\n\\\\t| outFile |\\\\n\\\\toutFile := (FileStream newFileNamed: newFileName) binary.\\\\n\\\\tself storeSunAudioOn: outFile compressionType: compressionTypeString.\\\\n\\\\toutFile close.\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'converting' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nstoreSunAudioOn: aBinaryStream compressionType: compressionName\\\\n\\\\t\\\\\\\"Store myself on the given stream as a monophonic sound compressed with the given type of compression. The sampling rate is reduced to 22050 samples/second if it is higher.\\\\\\\"\\\\n\\\\n\\\\t| fmt inBufSize samplesPerFrame outCodec compressed outSamplingRate audioWriter samplesRemaining inBuf outBuf counts byteCount |\\\\n\\\\tself pause; reset.  \\\\\\\"stop playing and return to beginning\\\\\\\"\\\\n\\\\n\\\\tfmt := SunAudioFileWriter formatCodeForCompressionType: compressionName.\\\\n\\\\tinBufSize := 64000.\\\\n\\\\tsamplesPerFrame := 1.\\\\n\\\\toutCodec := SunAudioFileWriter codecForFormatCode: fmt.\\\\n\\\\toutCodec ifNotNil: [\\\\n\\\\t\\\\tsamplesPerFrame := outCodec samplesPerFrame.\\\\n\\\\t\\\\tinBufSize := inBufSize roundUpTo: (2 * samplesPerFrame).\\\\n\\\\t\\\\tcompressed := ByteArray new:\\\\n\\\\t\\\\t\\\\t(inBufSize // samplesPerFrame) * outCodec bytesPerEncodedFrame].\\\\n\\\\toutSamplingRate := streamSamplingRate.\\\\n\\\\tstreamSamplingRate > 22050 ifTrue: [\\\\n\\\\t\\\\tstreamSamplingRate = 44100 ifFalse: [self error: 'unexpected MP3 sampling rate'].\\\\n\\\\t\\\\toutSamplingRate := 22050].\\\\n\\\\n\\\\t\\\\\\\"write audio header\\\\\\\"\\\\n\\\\taudioWriter := SunAudioFileWriter onStream: aBinaryStream.\\\\n\\\\taudioWriter writeHeaderSamplingRate: outSamplingRate format: fmt.\\\\n\\\\n\\\\t\\\\\\\"convert and write sound data\\\\\\\"\\\\n\\\\t'Storing audio...' displayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\tfrom: 0 to: totalSamples during: [:bar |\\\\n\\\\t\\\\t\\\\tsamplesRemaining := totalSamples.\\\\n\\\\t\\\\t\\\\t[samplesRemaining > 0] whileTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tbar value: totalSamples - samplesRemaining.\\\\n\\\\t\\\\t\\\\t\\\\tself loadBuffersForSampleCount: (inBufSize min: samplesRemaining).\\\\n\\\\t\\\\t\\\\t\\\\tinBuf := mixer sounds first samples.\\\\n\\\\t\\\\t\\\\t\\\\toutSamplingRate < streamSamplingRate\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [outBuf := inBuf downSampledLowPassFiltering: true]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [outBuf := inBuf].\\\\n\\\\t\\\\t\\\\t\\\\toutCodec\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifNil: [audioWriter appendSamples: outBuf]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifNotNil: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcounts := outCodec\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tencodeFrames: (outBuf size // samplesPerFrame)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfrom: outBuf at: 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinto: compressed at: 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbyteCount := counts last.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbyteCount = compressed size\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [audioWriter appendBytes: compressed]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [audioWriter appendBytes: (compressed copyFrom: 1 to: byteCount)]].\\\\n\\\\t\\\\t\\\\t\\\\tsamplesRemaining := samplesRemaining - inBuf monoSampleCount]].\\\\n\\\\n\\\\t\\\\\\\"update audio header\\\\\\\"\\\\n\\\\taudioWriter updateHeaderDataSize.\\\\n! !\\\\n\\\\n\\\\n!StreamingMonoSound methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ninitStream: aStream headerStart: anInteger\\\\n\\\\t\\\\\\\"Initialize for streaming from the given stream. The audio file header starts at the given stream position.\\\\\\\"\\\\n\\\\n\\\\tstream := aStream.\\\\n\\\\tvolume := 1.0.\\\\n\\\\trepeat := false.\\\\n\\\\theaderStart := anInteger.\\\\n\\\\tself reset.\\\\n! !\\\\n\\\\n\\\\n!StreamingMonoSound methodsFor: 'other' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ncloseFile\\\\n\\\\t\\\\\\\"Close my stream, if it responds to close.\\\\\\\"\\\\n\\\\n\\\\tstream ifNotNil: [\\\\n\\\\t\\\\t(stream respondsTo: #close) ifTrue: [stream close]].\\\\n\\\\tmixer := nil.\\\\n\\\\tcodec := nil.\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'other' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nextractFrom: startSecs to: endSecs\\\\n\\\\t\\\\\\\"Extract a portion of this sound between the given start and end times. The current implementation only works if the sound is uncompressed.\\\\\\\"\\\\n\\\\n\\\\t| emptySound first last sampleCount byteStream sndBuf |\\\\n\\\\tcodec ifNotNil: [^ self error: 'only works on uncompressed sounds'].\\\\n\\\\temptySound := SampledSound samples: SoundBuffer new samplingRate: streamSamplingRate.\\\\n\\\\tfirst := (startSecs * streamSamplingRate) truncated max: 0.\\\\n\\\\tlast := ((endSecs * streamSamplingRate) truncated min: totalSamples) - 1.\\\\n\\\\tfirst >= last ifTrue: [^ emptySound].\\\\n\\\\tcodec ifNotNil: [self error: 'extracting from compressed sounds is not supported'].\\\\n\\\\tsampleCount := last + 1 - first.\\\\n\\\\tstream position: audioDataStart + (2 * first).\\\\n\\\\tbyteStream := ReadStream on: (stream next: 2 * sampleCount).\\\\n\\\\tsndBuf := SoundBuffer newMonoSampleCount: sampleCount.\\\\n\\\\t1 to: sampleCount do: [:i | sndBuf at: i put: byteStream int16].\\\\n\\\\t^ SampledSound samples: sndBuf samplingRate: streamSamplingRate\\\\n! !\\\\n\\\\n\\\\n!StreamingMonoSound methodsFor: 'playing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nmillisecondsSinceStart\\\\n\\\\t\\\\\\\"Answer the number of milliseconds of this sound started playing.\\\\\\\"\\\\n\\\\n\\\\t| mSecs |\\\\n\\\\t(stream isNil or: [stream closed]) ifTrue: [^ 0].\\\\n\\\\tmSecs := self currentSampleIndex * 1000 // streamSamplingRate.\\\\n\\\\t(self isPlaying and: [lastBufferMSecs > 0]) ifTrue: [\\\\n\\\\t\\\\t\\\\\\\"adjust mSecs by the milliseconds since the last buffer\\\\\\\"\\\\n\\\\t\\\\tmutex critical: [\\\\n\\\\t\\\\t\\\\tmSecs := self currentSampleIndex * 1000 // streamSamplingRate.\\\\n\\\\t\\\\t\\\\tmSecs := mSecs + ((Time millisecondClockValue - lastBufferMSecs) max: 0)]].\\\\n\\\\t^ mSecs + 350 - (2 * SoundPlayer bufferMSecs)\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'playing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nplaySampleCount: n into: aSoundBuffer startingAt: startIndex\\\\n\\\\t\\\\\\\"Mix the next n samples of this sound into the given buffer starting at the given index\\\\\\\"\\\\n\\\\n\\\\tself repeat ifTrue: [  \\\\\\\"loop if necessary\\\\\\\"\\\\n\\\\t\\\\t(totalSamples - self currentSampleIndex) < n ifTrue: [self startOver]].\\\\n\\\\n\\\\tmutex critical: [\\\\n\\\\t\\\\tlastBufferMSecs := Time millisecondClockValue.\\\\n\\\\t\\\\tself loadBuffersForSampleCount: (n * streamSamplingRate) // SoundPlayer samplingRate.\\\\n\\\\t\\\\tmixer playSampleCount: n into: aSoundBuffer startingAt: startIndex].\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'playing' stamp: 'jm 10/21/2001 09:45'!\\\\nreset\\\\n\\\\n\\\\tsuper reset.\\\\n\\\\tself startOver.\\\\n\\\\tself createMixer.\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'playing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nsamplesRemaining\\\\n\\\\t\\\\\\\"Answer the number of samples remaining to be played.\\\\\\\"\\\\n\\\\n\\\\t| result |\\\\n\\\\t(stream isNil or: [stream closed]) ifTrue: [^ 0].\\\\n\\\\tself repeat ifTrue: [^ 1000000].\\\\n\\\\tresult := (totalSamples - self currentSampleIndex) max: 0.\\\\n\\\\tresult <= 0 ifTrue: [self closeFile].\\\\n\\\\t^ result\\\\n! !\\\\n\\\\n\\\\n!StreamingMonoSound methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ncreateMixer\\\\n\\\\t\\\\\\\"Create a mixed sound consisting of sampled sounds with one sound buffer's worth of samples.\\\\\\\"\\\\n\\\\n\\\\t| snd |\\\\n\\\\tmixer := MixedSound new.\\\\n\\\\tsnd := SampledSound\\\\n\\\\t\\\\tsamples: (SoundBuffer newMonoSampleCount: 2)  \\\\\\\"buffer size will be adjusted dynamically\\\\\\\"\\\\n\\\\t\\\\tsamplingRate: streamSamplingRate.\\\\n\\\\tmixer add: snd pan: 0.5 volume: volume.\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ncurrentSampleIndex\\\\n\\\\t\\\\\\\"Answer the index of the current sample.\\\\\\\"\\\\n\\\\n\\\\t| bytePosition frameIndex |\\\\n\\\\tbytePosition := stream position - audioDataStart.\\\\n\\\\tcodec\\\\n\\\\t\\\\tifNil: [^ bytePosition // 2]\\\\n\\\\t\\\\tifNotNil: [\\\\n\\\\t\\\\t\\\\tframeIndex := bytePosition // codec bytesPerEncodedFrame.\\\\n\\\\t\\\\t\\\\t^ (frameIndex * codec samplesPerFrame) - leftoverSamples monoSampleCount].\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nloadBuffer: aSoundBuffer compressedSampleCount: sampleCount\\\\n\\\\t\\\\\\\"Load the given sound buffer from the compressed sample stream.\\\\\\\"\\\\n\\\\t\\\\\\\"Details: Most codecs decode in multi-sample units called 'frames'. Since the requested sampleCount is typically not an even multiple of the frame size, we need to deal with partial frames. The unused samples from a partial frame are retained until the next call to this method.\\\\\\\"\\\\n\\\\n\\\\t| n samplesNeeded frameCount encodedBytes r decodedCount buf j |\\\\n\\\\t\\\\\\\"first, use any leftover samples\\\\\\\"\\\\n\\\\tn := self loadFromLeftovers: aSoundBuffer sampleCount: sampleCount.\\\\n\\\\tsamplesNeeded := sampleCount - n.\\\\n\\\\tsamplesNeeded <= 0 ifTrue: [^ self].\\\\n\\\\n\\\\t\\\\\\\"decode an integral number of full compression frames\\\\\\\"\\\\n\\\\tframeCount := samplesNeeded // codec samplesPerFrame.\\\\n\\\\tencodedBytes := stream next: (frameCount * codec bytesPerEncodedFrame).\\\\n\\\\tr := codec decodeFrames: frameCount from: encodedBytes at: 1 into: aSoundBuffer at: n + 1.\\\\n\\\\tdecodedCount := r last.\\\\n\\\\tdecodedCount >= samplesNeeded ifTrue: [^ self].\\\\n\\\\n\\\\t\\\\\\\"decode one last compression frame to finish filling the buffer\\\\\\\"\\\\n\\\\tbuf := SoundBuffer newMonoSampleCount: codec samplesPerFrame.\\\\n\\\\tencodedBytes := stream next: codec bytesPerEncodedFrame.\\\\n\\\\tcodec decodeFrames: 1 from: encodedBytes at: 1 into: buf at: 1.\\\\n\\\\tj := 0.\\\\n\\\\t(n + decodedCount + 1) to: sampleCount do: [:i |\\\\n\\\\t\\\\taSoundBuffer at: i put: (buf at: (j := j + 1))].\\\\n\\\\n\\\\t\\\\\\\"save the leftover samples\\\\\\\"\\\\n\\\\tleftoverSamples := buf copyFrom: (j + 1) to: buf monoSampleCount.\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'private' stamp: 'jm 11/21/2001 08:03'!\\\\nloadBuffer: aSoundBuffer uncompressedSampleCount: sampleCount\\\\n\\\\t\\\\\\\"Load the given sound buffer from the uncompressed sample stream.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"read directly into the sample buffer; count is in 32-bit words\\\\\\\"\\\\n\\\\tstream next: sampleCount // 2 into: aSoundBuffer startingAt: 1.\\\\n\\\\taSoundBuffer restoreEndianness.\\\\n\\\\n\\\\t\\\\\\\"read the final sample if sampleCount is odd:\\\\\\\"\\\\n\\\\tsampleCount odd ifTrue: [aSoundBuffer at: sampleCount put: stream int16].\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nloadBuffersForSampleCount: count\\\\n\\\\t\\\\\\\"Load the sound buffers from the stream.\\\\\\\"\\\\n\\\\n\\\\t| snd buf sampleCount |\\\\n\\\\tsnd := mixer sounds first.\\\\n\\\\tbuf := snd samples.\\\\n\\\\tbuf monoSampleCount = count ifFalse: [\\\\n\\\\t\\\\tbuf := SoundBuffer newMonoSampleCount: count.\\\\n\\\\t\\\\tsnd setSamples: buf samplingRate: streamSamplingRate].\\\\n\\\\tsampleCount := count min: (totalSamples - self currentSampleIndex).\\\\n\\\\tsampleCount < count ifTrue: [buf primFill: 0].\\\\n\\\\n\\\\tcodec\\\\n\\\\t\\\\tifNil: [self loadBuffer: buf uncompressedSampleCount: sampleCount]\\\\n\\\\t\\\\tifNotNil: [self loadBuffer: buf compressedSampleCount: sampleCount].\\\\n\\\\n\\\\tmixer reset.\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nloadFromLeftovers: aSoundBuffer sampleCount: sampleCount\\\\n\\\\t\\\\\\\"Load the given sound buffer from the samples leftover from the last frame. Answer the number of samples loaded, which typically is less than sampleCount.\\\\\\\"\\\\n\\\\n\\\\t| leftoverCount n |\\\\n\\\\tleftoverCount := leftoverSamples monoSampleCount.\\\\n\\\\tleftoverCount = 0 ifTrue: [^ 0].\\\\n\\\\n\\\\tn := leftoverCount min: sampleCount.\\\\n\\\\t1 to: n do: [:i | aSoundBuffer at: i put: (leftoverSamples at: i)].\\\\n\\\\tn < sampleCount\\\\n\\\\t\\\\tifTrue: [leftoverSamples := SoundBuffer new]\\\\n\\\\t\\\\tifFalse: [leftoverSamples := leftoverSamples copyFrom: n + 1 to: leftoverSamples size].\\\\n\\\\t^ n\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\npositionCodecTo: desiredSampleIndex\\\\n\\\\t\\\\\\\"Position to the closest frame before the given sample index when using a codec. If using the ADPCM codec, try to ensure that it is in sync with the compressed sample stream.\\\\\\\"\\\\n\\\\n\\\\t| desiredFrameIndex desiredPosition tmpStream tmpCodec byteBuf bufFrames sampleBuf frameCount n startOffset |\\\\n\\\\t(codec isKindOf: ADPCMCodec) ifFalse: [\\\\n\\\\t\\\\t\\\\\\\"stateless codecs (or relatively stateless ones, like GSM: just jump to frame boundary\\\\\\\"\\\\n\\\\t\\\\tdesiredFrameIndex := desiredSampleIndex // codec samplesPerFrame.\\\\n\\\\t\\\\tstream position: audioDataStart + (desiredFrameIndex * codec bytesPerEncodedFrame).\\\\n\\\\t\\\\tcodec reset.\\\\n\\\\t\\\\t^ self].\\\\n\\\\n\\\\t\\\\\\\"compute the desired stream position\\\\\\\"\\\\n\\\\tdesiredFrameIndex := desiredSampleIndex // codec samplesPerFrame.\\\\n\\\\tdesiredPosition := audioDataStart + (desiredFrameIndex * codec bytesPerEncodedFrame).\\\\n\\\\n\\\\t\\\\\\\"copy stream and codec\\\\\\\"\\\\n\\\\t(stream isKindOf: FileStream)\\\\n\\\\t\\\\tifTrue: [tmpStream := (FileStream readOnlyFileNamed: stream name) binary]\\\\n\\\\t\\\\tifFalse: [tmpStream := stream deepCopy].\\\\n\\\\ttmpCodec := codec copy reset.\\\\n\\\\n\\\\t\\\\\\\"reset the codec and start back about 30 seconds to try to get codec in sync\\\\\\\"\\\\n\\\\tstartOffset := ((desiredFrameIndex - 80000) max: 0) * codec bytesPerEncodedFrame.\\\\n\\\\ttmpStream position: audioDataStart + startOffset.\\\\n\\\\n\\\\t\\\\\\\"decode forward to the desired position\\\\\\\"\\\\n\\\\tbyteBuf := ByteArray new: (32000 roundTo: codec bytesPerEncodedFrame).\\\\n\\\\tbufFrames := byteBuf size // codec bytesPerEncodedFrame.\\\\n\\\\tsampleBuf := SoundBuffer newMonoSampleCount: bufFrames * codec samplesPerFrame.\\\\n\\\\tframeCount := (desiredPosition - tmpStream position) // codec bytesPerEncodedFrame.\\\\n\\\\t[frameCount > 0] whileTrue: [\\\\n\\\\t\\\\tn := bufFrames min: frameCount.\\\\n\\\\t\\\\ttmpStream next: n * codec bytesPerEncodedFrame into: byteBuf startingAt: 1.\\\\n\\\\t\\\\ttmpCodec decodeFrames: n from: byteBuf at: 1 into: sampleBuf at: 1.\\\\n\\\\t\\\\tframeCount := frameCount - n].\\\\n\\\\n\\\\tcodec := tmpCodec.\\\\n\\\\tstream position: tmpStream position.\\\\n\\\\t(tmpStream isKindOf: FileStream) ifTrue: [tmpStream close].! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nreadAIFFHeader\\\\n\\\\t\\\\\\\"Read an AIFF file header from stream.\\\\\\\"\\\\n\\\\n\\\\t| aiffReader |\\\\n\\\\taiffReader := AIFFFileReader new.\\\\n\\\\taiffReader readFromStream: stream mergeIfStereo: false skipDataChunk: true.\\\\n\\\\taiffReader channelCount = 1 ifFalse: [self error: 'not monophonic'].\\\\n\\\\taiffReader bitsPerSample = 16 ifFalse: [self error: 'not 16-bit'].\\\\n\\\\n\\\\taudioDataStart := headerStart + aiffReader channelDataOffset.\\\\n\\\\tstreamSamplingRate := aiffReader samplingRate.\\\\n\\\\ttotalSamples := aiffReader frameCount min: (stream size - audioDataStart) // 2.\\\\n\\\\tcodec := nil.\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nreadHeader\\\\n\\\\t\\\\\\\"Read the sound file header from my stream.\\\\\\\"\\\\n\\\\n\\\\t| id |\\\\n\\\\tstream position: headerStart.\\\\n\\\\tid := (stream next: 4) asString.\\\\n\\\\tstream position: headerStart.\\\\n\\\\tid = '.snd' ifTrue: [^ self readSunAudioHeader].\\\\n\\\\tid = 'FORM' ifTrue: [^ self readAIFFHeader].\\\\n\\\\tself error: 'unrecognized sound file format'.\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nreadSunAudioHeader\\\\n\\\\t\\\\\\\"Read a Sun audio file header from my stream.\\\\\\\"\\\\n\\\\n\\\\t| id headerBytes dataBytes format channelCount |\\\\n\\\\tid := (stream next: 4) asString.\\\\n\\\\theaderBytes := stream uint32.  \\\\\\\"header bytes\\\\\\\"\\\\n\\\\tdataBytes := stream uint32.\\\\n\\\\tformat := stream uint32.\\\\n\\\\tstreamSamplingRate := stream uint32.\\\\n\\\\tchannelCount := stream uint32.\\\\n\\\\n\\\\tid = '.snd' ifFalse: [self error: 'not Sun audio format'].\\\\n\\\\tdataBytes := dataBytes min: (stream size - headerBytes).\\\\n\\\\tchannelCount = 1 ifFalse: [self error: 'not monophonic'].\\\\n\\\\taudioDataStart := headerStart + headerBytes.\\\\n\\\\tcodec := nil.\\\\n\\\\tformat = 1 ifTrue: [  \\\\\\\"8-bit u-LAW\\\\\\\"\\\\n\\\\t\\\\tcodec := MuLawCodec new.\\\\n\\\\t\\\\ttotalSamples := dataBytes.\\\\n\\\\t\\\\t^ self].\\\\n\\\\tformat = 3 ifTrue: [  \\\\\\\"16-bit linear\\\\\\\"\\\\n\\\\t\\\\ttotalSamples := dataBytes // 2.\\\\n\\\\t\\\\t^ self].\\\\n\\\\tformat = 23 ifTrue: [  \\\\\\\"ADPCM-4 bit (CCITT G.721)\\\\\\\"\\\\n\\\\t\\\\tcodec := ADPCMCodec new\\\\n\\\\t\\\\t\\\\tinitializeForBitsPerSample: 4 samplesPerFrame: 0.\\\\n\\\\t\\\\ttotalSamples := (dataBytes // 4) * 8.\\\\n\\\\t\\\\t^ self].\\\\n\\\\tformat = 25 ifTrue: [  \\\\\\\"ADPCM-3 bit (CCITT G.723)\\\\\\\"\\\\n\\\\t\\\\tcodec := ADPCMCodec new\\\\n\\\\t\\\\t\\\\tinitializeForBitsPerSample: 3 samplesPerFrame: 0.\\\\n\\\\t\\\\ttotalSamples := (dataBytes // 3) * 8.\\\\n\\\\t\\\\t^ self].\\\\n\\\\tformat = 26 ifTrue: [  \\\\\\\"ADPCM-5 bit (CCITT G.723)\\\\\\\"\\\\n\\\\t\\\\tcodec := ADPCMCodec new\\\\n\\\\t\\\\t\\\\tinitializeForBitsPerSample: 5 samplesPerFrame: 0.\\\\n\\\\t\\\\ttotalSamples := (dataBytes // 5) * 8.\\\\n\\\\t\\\\t^ self].\\\\n\\\\tformat = 610 ifTrue: [  \\\\\\\"GSM 06.10 (this format was added by Squeak)\\\\\\\"\\\\n\\\\t\\\\tcodec := GSMCodec new.\\\\n\\\\t\\\\ttotalSamples := (dataBytes // 33) * 160.\\\\n\\\\t\\\\t^ self].\\\\n\\\\tself error: 'unsupported Sun audio format ', format printString\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nstartOver\\\\n\\\\t\\\\\\\"Jump back to the first sample.\\\\\\\"\\\\n\\\\n\\\\tstream reopen; binary.\\\\n\\\\tself readHeader.\\\\n\\\\tstream position: audioDataStart.\\\\n\\\\tleftoverSamples := SoundBuffer new.\\\\n\\\\tlastBufferMSecs := 0.\\\\n\\\\tmutex := Semaphore forMutualExclusion.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStreamingMonoSound class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StreamingMonoSound class methodsFor: 'instance creation' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nonFileNamed: fileName\\\\n\\\\t\\\\\\\"Answer an instance of me for playing the file with the given name.\\\\\\\"\\\\n\\\\n\\\\t| f |\\\\n\\\\tf := FileDirectory default readOnlyFileNamed: fileName.\\\\n\\\\tf ifNil: [^ self error: 'could not open ', fileName].\\\\n\\\\t^ self new initStream: f headerStart: 0\\\\n! !\\\\n\\\\n!StreamingMonoSound class methodsFor: 'instance creation' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nonFileNamed: fileName headerStart: anInteger\\\\n\\\\t\\\\\\\"Answer an instance of me for playing audio data starting at the given position in the file with the given name.\\\\\\\"\\\\n\\\\n\\\\t| f |\\\\n\\\\tf := FileDirectory default readOnlyFileNamed: fileName.\\\\n\\\\tf ifNil: [^ self error: 'could not open ', fileName].\\\\n\\\\t^ self new initStream: f headerStart: anInteger\\\\n! !\\\\nAlignmentMorphBob1 subclass: #StretchyImageMorph\\\\n\\\\tinstanceVariableNames: 'form cache'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'EToys-Experimental'!\\\\n!StretchyImageMorph commentStamp: '<historical>' prior: 0!\\\\nI draw a form to fill whatever bounds I have.!\\\\n\\\\n\\\\n!StretchyImageMorph methodsFor: 'as yet unclassified' stamp: 'RAA 7/10/2000 16:20'!\\\\nform: aForm\\\\n\\\\n\\\\tform _ aForm! !\\\\n\\\\n\\\\n!StretchyImageMorph methodsFor: 'drawing' stamp: 'nk 1/3/2004 17:40'!\\\\ndrawOn: aCanvas\\\\n| t |\\\\n\\\\\\\"\\\\nSmalltalk at: #Q4 put: OrderedCollection new.\\\\n\\\\\\\"\\\\n\\\\tform ifNil: [form _ (Form extent: 32@32 depth: 8) fillColor: Color green].\\\\n\\\\t(cache isNil or: [cache extent ~= bounds extent]) ifTrue: [\\\\n\\\\t\\\\tt _ [cache _ Form extent: bounds extent depth: form depth.\\\\n\\\\t\\\\tform displayInterpolatedIn: cache boundingBox on: cache.\\\\n\\\\t\\\\tcache _ cache asFormOfDepth: aCanvas depth] timeToRun.\\\\n\\\\t\\\\t\\\\\\\"Q4 add: {t. form. cache}.\\\\\\\"\\\\n\\\\t].\\\\n\\\\taCanvas paintImage: cache at: bounds origin.\\\\n! !\\\\n\\\\n\\\\n!StretchyImageMorph methodsFor: 'initialization' stamp: 'ar 10/30/2000 15:31'!\\\\ninitialize\\\\n\\\\n\\\\tsuper initialize.\\\\n\\\\tself hResizing: #spaceFill.\\\\n\\\\tself vResizing: #spaceFill.\\\\n! !\\\\nAbstractFont subclass: #StrikeFont\\\\n\\\\tinstanceVariableNames: 'characterToGlyphMap xTable glyphs name type minAscii maxAscii maxWidth strikeLength ascent descent xOffset raster subscript superscript emphasis derivativeFonts pointSize fallbackFont charIndex'\\\\n\\\\tclassVariableNames: 'DefaultStringScanner'\\\\n\\\\tpoolDictionaries: 'TextConstants'\\\\n\\\\tcategory: 'Graphics-Fonts'!\\\\n!StrikeFont commentStamp: '<historical>' prior: 0!\\\\nI represent a compact encoding of a set of Forms corresponding to characters in the ASCII character set. All the forms are placed side by side in a large form whose height is the font height, and whose width is the sum of all the character widths. The xTable variable gives the left-x coordinates of the subforms corresponding to the glyphs. Characters are mapped to glyphs by using the characterToGyphMap.\\\\n\\\\nSubclasses can have non-trivial mapping rules as well as different representations for glyphs sizes (e.g., not using an xTable). If so, these classes should return nil when queried for xTable and/or the characterToGlyphMap. This will cause the CharacterScanner primitive to fail and query the font for the width of a character (so that a more programatical approach can be implemented).\\\\n\\\\nFor display, fonts need to implement two messages:\\\\n\\\\t#installOn: aDisplayContext foregroundColor: foregroundColor backgroundColor: backgroundColor\\\\nThis method installs the receiver (a font) on the given DisplayContext (which may be an instance of BitBlt or Canvas (or any of it's subclasses). The font should take the appropriate action to initialize the display context so that further display operations can be optimized.\\\\n\\\\t#displayString: aString on: aDisplayContext from: startIndex to: stopIndex at: aPoint kern: kernDelta\\\\nThis method is called for each subsequent run of characters in aString which is to be displayed with the (previously installed) settings.\\\\n!\\\\n\\\\n\\\\n!StrikeFont methodsFor: 'accessing'!\\\\nascent\\\\n\\\\t\\\\\\\"Answer the receiver's maximum extent of characters above the baseline.\\\\\\\"\\\\n\\\\n\\\\t^ascent! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'di 9/2/2000 13:06'!\\\\nascentKern\\\\n\\\\t\\\\\\\"Return the kern delta for ascenders.\\\\\\\"\\\\n\\\\t(emphasis noMask: 2) ifTrue: [^ 0].\\\\n\\\\t^ (self ascent-5+4)//4 max: 0  \\\\\\\"See makeItalicGlyphs\\\\\\\"\\\\n\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'yo 1/6/2005 04:19'!\\\\nascentOf: aCharacter\\\\n\\\\n\\\\t(self hasGlyphOf: aCharacter) ifFalse: [\\\\n\\\\t\\\\tfallbackFont ifNotNil: [\\\\n\\\\t\\\\t\\\\t^ fallbackFont ascentOf: aCharacter.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\t^ self ascent.\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'di 9/1/2000 17:17'!\\\\nbaseKern\\\\n\\\\t\\\\\\\"Return the base kern value to be used for all characters.\\\\\\\"\\\\n\\\\t(emphasis noMask: 2) ifTrue: [^ 0].\\\\n\\\\t^ ((self height-1-self ascent+4)//4 max: 0)  \\\\\\\"See makeItalicGlyphs\\\\\\\"\\\\n\\\\t\\\\t+ (((self ascent-5+4)//4 max: 0))\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'ar 5/23/2000 12:52'!\\\\ncharacterToGlyphMap\\\\n\\\\t^characterToGlyphMap ifNil:[characterToGlyphMap _ self createCharacterToGlyphMap].! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'ar 5/23/2000 12:52'!\\\\ncharacterToGlyphMap: anArray\\\\n\\\\tcharacterToGlyphMap _ anArray.! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'nk 3/15/2004 18:57'!\\\\nderivativeFonts\\\\n\\\\t^derivativeFonts copyWithout: nil! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing'!\\\\ndescent\\\\n\\\\t\\\\\\\"Answer the receiver's maximum extent of characters below the baseline.\\\\\\\"\\\\n\\\\n\\\\t^descent! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'di 9/2/2000 13:06'!\\\\ndescentKern\\\\n\\\\t\\\\\\\"Return the kern delta for descenders.\\\\\\\"\\\\n\\\\t(emphasis noMask: 2) ifTrue: [^ 0].\\\\n\\\\t^ (self height-1-self ascent+4)//4 max: 0  \\\\\\\"See makeItalicGlyphs\\\\\\\"\\\\n\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'yo 1/6/2005 04:19'!\\\\ndescentOf: aCharacter\\\\n\\\\n\\\\t(self hasGlyphOf: aCharacter) ifFalse: [\\\\n\\\\t\\\\tfallbackFont ifNotNil: [\\\\n\\\\t\\\\t\\\\t^ fallbackFont descentOf: aCharacter.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\t^ self descent.\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'tak 12/22/2004 01:25'!\\\\nfallbackFont\\\\n\\\\t^ fallbackFont\\\\n\\\\t\\\\tifNil: [fallbackFont _ FixedFaceFont new errorFont fontSize: self height]! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'yo 5/20/2004 11:01'!\\\\nfallbackFont: aFontSetOrNil\\\\n\\\\n\\\\tfallbackFont _ aFontSetOrNil.\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing'!\\\\nfamilyName\\\\n\\\\t^self name withoutTrailingDigits.\\\\n\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'tk 6/26/1998 16:45'!\\\\nfamilySizeFace\\\\n\\\\t\\\\\\\"Answer an array with familyName, a String, pointSize, an Integer, and\\\\n\\\\tfaceCode, an Integer.\\\\\\\"\\\\n\\\\n\\\\t^Array with: name\\\\n\\\\t\\\\twith: self height\\\\n\\\\t\\\\twith: emphasis\\\\n\\\\n\\\\t\\\\\\\"(1 to: 12) collect: [:x | (TextStyle default fontAt: x) familySizeFace]\\\\\\\"! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'ar 9/21/2000 11:53'!\\\\nfontNameWithPointSize\\\\n\\\\t^self name withoutTrailingDigits, ' ', self pointSize printString! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'yo 1/7/2005 11:15'!\\\\nglyphInfoOf: aCharacter into: glyphInfoArray\\\\n\\\\t\\\\\\\"Answer the width of the argument as a character in the receiver.\\\\\\\"\\\\n\\\\n\\\\t| code |\\\\n\\\\t(self hasGlyphOf: aCharacter) ifFalse: [\\\\n\\\\t\\\\tfallbackFont ifNotNil: [\\\\n\\\\t\\\\t\\\\t^ fallbackFont glyphInfoOf: aCharacter into: glyphInfoArray.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tcode _ 0.\\\\n\\\\t] ifTrue: [\\\\n\\\\t\\\\tcode _ aCharacter charCode.\\\\n\\\\t].\\\\n\\\\tglyphInfoArray at: 1 put: glyphs;\\\\n\\\\t\\\\tat: 2 put: (xTable at: code + 1);\\\\n\\\\t\\\\tat: 3 put: (xTable at: code + 2);\\\\n\\\\t\\\\tat: 4 put: (self ascentOf: aCharacter);\\\\n\\\\t\\\\tat: 5 put: self.\\\\n\\\\t^ glyphInfoArray.\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'yo 1/6/2005 04:19'!\\\\nglyphOf: aCharacter \\\\n\\\\t\\\\\\\"Answer the width of the argument as a character in the receiver.\\\\\\\"\\\\n\\\\n\\\\t| code |\\\\n\\\\t(self hasGlyphOf: aCharacter) ifFalse: [\\\\n\\\\t\\\\tfallbackFont ifNotNil: [\\\\n\\\\t\\\\t\\\\t^ fallbackFont glyphOf: aCharacter.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\t^ (Form extent: 1@self height) fillColor: Color white\\\\n\\\\t].\\\\n\\\\tcode _ aCharacter charCode.\\\\n\\\\t^ glyphs copy: (((xTable at: code + 1)@0) corner: (xTable at: code +2)@self height).\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing'!\\\\nglyphs\\\\n\\\\t\\\\\\\"Answer a Form containing the bits representing the characters of the \\\\n\\\\treceiver.\\\\\\\"\\\\n\\\\n\\\\t^glyphs! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing'!\\\\nheight\\\\n\\\\t\\\\\\\"Answer the height of the receiver, total of maximum extents of \\\\n\\\\tcharacters above and below the baseline.\\\\\\\"\\\\n\\\\n\\\\t^self ascent + self descent! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'yo 1/6/2005 04:19'!\\\\nheightOf: aCharacter\\\\n\\\\n\\\\t(self hasGlyphOf: aCharacter) ifFalse: [\\\\n\\\\t\\\\tfallbackFont ifNotNil: [\\\\n\\\\t\\\\t\\\\t^ fallbackFont heightOf: aCharacter.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\t^ self height.\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing'!\\\\nlineGrid\\\\n\\\\t^ ascent + descent! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing'!\\\\nmaxAscii\\\\n\\\\t\\\\\\\"Answer the integer that is the last Ascii character value of the receiver.\\\\\\\"\\\\n\\\\n\\\\t^maxAscii! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing'!\\\\nmaxWidth\\\\n\\\\t\\\\\\\"Answer the integer that is the width of the receiver's widest character.\\\\\\\"\\\\n\\\\n\\\\t^maxWidth! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing'!\\\\nminAscii\\\\n\\\\t\\\\\\\"Answer the integer that is the first Ascii character value of the receiver.\\\\\\\"\\\\n\\\\n\\\\t^minAscii! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'ls 3/27/2000 19:54'!\\\\nname\\\\n\\\\t\\\\\\\"Answer the receiver's name.\\\\\\\"\\\\n\\\\n\\\\t^name ifNil: ['(unnamed)']! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing'!\\\\nname: aString\\\\n\\\\t\\\\\\\"Set the receiver's name.\\\\\\\"\\\\n\\\\n\\\\tname _ aString! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'sw 1/18/2000 20:54'!\\\\npointSize\\\\n\\\\t^ pointSize! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'sma 5/5/2000 14:21'!\\\\npointSize: anInteger\\\\n\\\\tpointSize _ anInteger! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing'!\\\\nraster\\\\n\\\\t\\\\\\\"Answer an integer that specifies the layout of the glyphs' form.\\\\\\\"\\\\n\\\\n\\\\t^raster! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing'!\\\\nsetGlyphs: newGlyphs\\\\n\\\\t\\\\\\\"Replace the glyphs form.  Used to make a synthetic bold or italic font quickly.\\\\\\\"\\\\n\\\\n\\\\tglyphs _ newGlyphs! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing'!\\\\nsubscript\\\\n\\\\t\\\\\\\"Answer an integer that is the further vertical offset relative to the \\\\n\\\\tbaseline for positioning characters as subscripts.\\\\\\\"\\\\n\\\\n\\\\t^subscript! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing'!\\\\nsuperscript\\\\n\\\\t\\\\\\\"Answer an integer that is the further vertical offset relative to the \\\\n\\\\tbaseline for positioning characters as superscripts.\\\\\\\"\\\\n\\\\n\\\\t^superscript! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'nk 6/17/2003 14:26'!\\\\ntextStyle\\\\n\\\\t^ TextStyle actualTextStyles detect:\\\\n\\\\t\\\\t[:aStyle | aStyle fontArray includes: self] ifNone: [nil]! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'ar 4/12/2005 17:12'!\\\\nwidthOf: aCharacter \\\\n\\\\t\\\\\\\"Answer the width of the argument as a character in the receiver.\\\\\\\"\\\\n\\\\t| code |\\\\n\\\\tcode := aCharacter charCode.\\\\n\\\\t((code < minAscii or: [maxAscii < code]) \\\\n\\\\t\\\\tor: [(xTable at: code + 1) < 0])\\\\n\\\\t\\\\t\\\\tifTrue: [^ self fallbackFont widthOf: aCharacter].\\\\n\\\\t^ (xTable at: code + 2) - (xTable at: code + 1)! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing'!\\\\nxTable\\\\n\\\\t\\\\\\\"Answer an Array of the left x-coordinate of characters in glyphs.\\\\\\\"\\\\n\\\\n\\\\t^xTable! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'yo 8/28/2002 16:33'!\\\\nxTable: anObject\\\\n\\\\n\\\\txTable _ anObject.\\\\n! !\\\\n\\\\n\\\\n!StrikeFont methodsFor: 'character shapes'!\\\\nalter: char formBlock: formBlock\\\\n\\\\tself characterFormAt: char \\\\n\\\\t\\\\tput: (formBlock value: (self characterFormAt: char))! !\\\\n\\\\n!StrikeFont methodsFor: 'character shapes' stamp: 'yo 12/28/2002 22:37'!\\\\ncharacterFormAtMulti: character \\\\n\\\\t\\\\\\\"Answer a Form copied out of the glyphs for the argument, character.\\\\\\\"\\\\n\\\\t| ascii leftX rightX |\\\\n\\\\tascii _ character charCode.\\\\n\\\\t(ascii between: minAscii and: maxAscii) ifFalse: [ascii _ maxAscii + 1].\\\\n\\\\tleftX _ xTable at: ascii + 1.\\\\n\\\\trightX _ xTable at: ascii + 2.\\\\n\\\\t^ glyphs copy: (leftX @ 0 corner: rightX @ self height)! !\\\\n\\\\n!StrikeFont methodsFor: 'character shapes' stamp: 'yo 12/1/2003 17:01'!\\\\ncharacterFormAt: character \\\\n\\\\t\\\\\\\"Answer a Form copied out of the glyphs for the argument, character.\\\\\\\"\\\\n\\\\t| ascii leftX rightX |\\\\n\\\\tascii _ character charCode.\\\\n\\\\t(ascii between: minAscii and: maxAscii) ifFalse: [ascii _ maxAscii + 1].\\\\n\\\\tleftX _ xTable at: ascii + 1.\\\\n\\\\trightX _ xTable at: ascii + 2.\\\\n\\\\tleftX < 0 ifTrue: [^ glyphs copy: (0@0 corner: 0@self height)].\\\\n\\\\t^ glyphs copy: (leftX @ 0 corner: rightX @ self height)! !\\\\n\\\\n!StrikeFont methodsFor: 'character shapes' stamp: 'di 8/30/2000 10:00'!\\\\ncharacterFormAt: character put: characterForm\\\\n\\\\t\\\\\\\"Copy characterForm over the glyph for the argument, character.\\\\\\\"\\\\n\\\\t| ascii leftX rightX widthDif newGlyphs |\\\\n\\\\tascii _ character asciiValue.\\\\n\\\\tascii < minAscii ifTrue: [^ self error: 'Cant store characters below min ascii'].\\\\n\\\\tascii > maxAscii ifTrue:\\\\n\\\\t\\\\t[(self confirm:\\\\n'This font does not accomodate ascii values higher than ' , maxAscii printString , '.\\\\nDo you wish to extend it permanently to handle values up to ' , ascii printString)\\\\n\\\\t\\\\t\\\\tifTrue: [self extendMaxAsciiTo: ascii]\\\\n\\\\t\\\\t\\\\tifFalse: [^ self error: 'No change made']].\\\\n\\\\tleftX _ xTable at: ascii + 1.\\\\n\\\\trightX _ xTable at: ascii + 2.\\\\n\\\\twidthDif _ characterForm width - (rightX - leftX).\\\\n\\\\twidthDif ~= 0 ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"Make new glyphs with more or less space for this char\\\\\\\"\\\\n\\\\t\\\\tnewGlyphs _ Form extent: (glyphs width + widthDif) @ glyphs height.\\\\n\\\\t\\\\tnewGlyphs copy: (0@0 corner: leftX@glyphs height)\\\\n\\\\t\\\\t\\\\tfrom: 0@0 in: glyphs rule: Form over.\\\\n\\\\t\\\\tnewGlyphs copy: ((rightX+widthDif)@0 corner: newGlyphs width@glyphs height)\\\\n\\\\t\\\\t\\\\tfrom: rightX@0 in: glyphs rule: Form over.\\\\n\\\\t\\\\tglyphs _ newGlyphs.\\\\n\\\\t\\\\t\\\\\\\"adjust further entries on xTable\\\\\\\"\\\\n\\\\t\\\\txTable _ xTable copy.\\\\n\\\\t\\\\tascii+2 to: xTable size\\\\n\\\\t\\\\t\\\\tdo: [:i | xTable at: i put: (xTable at: i) + widthDif]].\\\\n\\\\tglyphs copy: (leftX @ 0 extent: characterForm extent)\\\\n\\\\t\\\\tfrom: 0@0 in: characterForm rule: Form over\\\\n\\\\\\\"\\\\n| f |  f _ TextStyle defaultFont.\\\\nf characterFormAt: $  put: (Form extent: (f widthOf: $ )+10@f height)\\\\n\\\\\\\"! !\\\\n\\\\n!StrikeFont methodsFor: 'character shapes'!\\\\ncharacterForm: char pixelValueAt: pt put: val\\\\n\\\\t| f |\\\\n\\\\tf _ self characterFormAt: char.\\\\n\\\\tf pixelAt: pt put: val.\\\\n\\\\tself characterFormAt: char put: val! !\\\\n\\\\n!StrikeFont methodsFor: 'character shapes' stamp: 'btr 11/18/2002 15:00'!\\\\nedit: character \\\\n\\\\t\\\\\\\"Open a Bit Editor on the given character. Note that you must do an accept \\\\n\\\\t(in the option menu of the bit editor) if you want this work. \\\\n\\\\tAccepted edits will not take effect in the font until you leave or close the bit editor. \\\\n\\\\tAlso note that unaccepted edits will be lost when you leave or close.\\\\\\\"\\\\n\\\\t\\\\\\\"Note that BitEditor only works in MVC currently.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"(TextStyle default fontAt: 1) edit: $_\\\\\\\"\\\\n\\\\n\\\\t| charForm editRect scaleFactor bitEditor savedForm r |\\\\n\\\\tcharForm _ self characterFormAt: character.\\\\n\\\\teditRect _ BitEditor locateMagnifiedView: charForm scale: (scaleFactor _ 8 @ 8).\\\\n\\\\tbitEditor _ BitEditor\\\\n\\\\t\\\\t\\\\t\\\\tbitEdit: charForm\\\\n\\\\t\\\\t\\\\t\\\\tat: editRect topLeft\\\\n\\\\t\\\\t\\\\t\\\\tscale: scaleFactor\\\\n\\\\t\\\\t\\\\t\\\\tremoteView: nil.\\\\n\\\\tsavedForm _ Form fromDisplay: (r _ bitEditor displayBox\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\texpandBy: (0 @ 23 corner: 0 @ 0)).\\\\n\\\\tbitEditor controller startUp.\\\\n\\\\tbitEditor release.\\\\n\\\\tsavedForm displayOn: Display at: r topLeft.\\\\n\\\\tself characterFormAt: character put: charForm! !\\\\n\\\\n!StrikeFont methodsFor: 'character shapes' stamp: 'BG 12/6/2004 19:22'!\\\\nensureCleanBold\\\\n\\\\t\\\\\\\"This ensures that all character glyphs have at least one pixel of white space on the right\\\\n\\\\tso as not to cause artifacts in neighboring characters in bold or italic.\\\\\\\"\\\\n\\\\n\\\\t| newGlyphs newXTable newGlyphPos startPos newWidth widthOfGlyph increment lastCol |\\\\n\\\\temphasis = 0 ifFalse: [^ self].\\\\n    newWidth := glyphs width + maxAscii - minAscii + 1.\\\\n    lastCol := Form extent: 1@ glyphs height.\\\\n    newGlyphs := Form extent: newWidth @ glyphs height.\\\\n    newXTable := Array new: xTable size.\\\\n    1 to: minAscii do: [:idx | newXTable at: idx put: (xTable at: idx)].\\\\n   \\\\n    newGlyphPos := startPos := 0.\\\\n    minAscii to: maxAscii do:\\\\n      [:idx | \\\\n         newXTable at: idx + 1 put: newGlyphPos.\\\\n         widthOfGlyph := (xTable at: idx + 2 ) - (xTable at: idx + 1).\\\\n         widthOfGlyph > 0\\\\n           ifTrue:\\\\n             [newGlyphs copy: (newGlyphPos @ 0 extent: widthOfGlyph @ glyphs height)\\\\n                          from: startPos@0 in: glyphs rule: Form over.\\\\n              lastCol copy: (0 @ 0 extent: 1 @ glyphs height)\\\\n                          from: startPos + widthOfGlyph - 1 @0 in: glyphs rule: Form over.\\\\n              increment := lastCol isAllWhite ifTrue: [0] ifFalse: [1].\\\\n              startPos := startPos + widthOfGlyph.\\\\n              newGlyphPos := newGlyphPos + widthOfGlyph + increment.\\\\n             ].\\\\n      ].\\\\n    maxAscii + 2 to: newXTable size do: [:idx | newXTable at: idx put: newGlyphPos.].\\\\n    glyphs := Form extent: newGlyphPos @ glyphs height.\\\\n    glyphs copy: (0 @ 0 extent: glyphs extent)\\\\n            from: 0@0 in: newGlyphs rule: Form over.\\\\n    xTable := newXTable.\\\\n\\\\\\\"\\\\nStrikeFont allInstancesDo: [:f | f ensureCleanBold].\\\\n(StrikeFont familyName: 'NewYork' size: 21) ensureCleanBold.\\\\nStrikeFont shutDown.  'Flush synthetic fonts'.\\\\n\\\\\\\"\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'character shapes' stamp: 'ar 5/23/2000 12:48'!\\\\nextendMaxAsciiTo: newMax\\\\n\\\\t\\\\\\\"Extend the range of this font so that it can display glyphs up to newMax.\\\\\\\"\\\\n\\\\n\\\\t(newMax+3) <= xTable size ifTrue: [^ self].  \\\\\\\"No need to extend.\\\\\\\"\\\\n\\\\txTable size = (maxAscii+3) ifFalse:\\\\n\\\\t\\\\t[^ self error: 'This font is not well-formed.'].\\\\n\\\\n\\\\t\\\\\\\"Insert a bunch of zero-width characters...\\\\\\\"\\\\n\\\\txTable _ (xTable copyFrom: 1 to: maxAscii+2) ,\\\\n\\\\t\\\\t\\\\t((maxAscii+1 to: newMax) collect: [:i | xTable at: maxAscii+2]) ,\\\\n\\\\t\\\\t\\\\t{ xTable at: maxAscii+3 }.\\\\n\\\\tmaxAscii _ newMax.\\\\n\\\\tself fillZeroWidthSlots.\\\\n\\\\tcharacterToGlyphMap _ nil.! !\\\\n\\\\n!StrikeFont methodsFor: 'character shapes' stamp: 'di 3/27/2000 16:10'!\\\\nfillZeroWidthSlots\\\\n\\\\t| nullGlyph |\\\\n\\\\t\\\\\\\"Note: this is slow because it copies the font once for every replacement.\\\\\\\"\\\\n\\\\n\\\\tnullGlyph _ (Form extent: 1@glyphs height) fillGray.\\\\n\\\\t\\\\\\\"Now fill the empty slots with narrow box characters.\\\\\\\"\\\\n\\\\tminAscii to: maxAscii do:\\\\n\\\\t\\\\t[:i | (self widthOf: (Character value: i)) = 0 ifTrue:\\\\n\\\\t\\\\t\\\\t[self characterFormAt: (Character value: i) put: nullGlyph]].\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'character shapes' stamp: 'di 4/28/2000 16:10'!\\\\nfixOneWideChars \\\\n\\\\t\\\\\\\"This fixes all 1-wide characters to be 2 wide with blank on the right\\\\n\\\\tso as not to cause artifacts in neighboring characters in bold or italic.\\\\\\\"\\\\n\\\\t| twoWide |\\\\n\\\\tminAscii to: maxAscii do:\\\\n\\\\t\\\\t[:i | (self widthOf: (Character value: i)) = 1 ifTrue:\\\\n\\\\t\\\\t\\\\t[twoWide _ Form extent: 2@glyphs height.\\\\n\\\\t\\\\t\\\\t(self characterFormAt: (Character value: i)) displayOn: twoWide at: 0@0.\\\\n\\\\t\\\\t\\\\tself characterFormAt: (Character value: i) put: twoWide]].\\\\n\\\\\\\"\\\\nStrikeFont allInstancesDo: [:f | f fixOneWideChars].\\\\nStrikeFont shutDown.  'Flush synthetic fonts'.\\\\n\\\\\\\"\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'character shapes' stamp: 'RAA 7/6/2000 16:50'!\\\\nmakeCarriageReturnsWhite\\\\n\\\\t| crForm |\\\\n\\\\t\\\\\\\"Some larger fonts have a gray carriage return (from the zero wide fixup) make it white so it doesn't show\\\\\\\"\\\\n\\\\n\\\\tcrForm _ self characterFormAt: 13 asCharacter.\\\\n\\\\tcrForm fillWhite.\\\\n\\\\tself characterFormAt: 13 asCharacter put: crForm.\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'character shapes'!\\\\nwiden: char by: delta\\\\n\\\\t| newForm |\\\\n\\\\t^ self alter: char formBlock:  \\\\\\\"Make a new form, wider or narrower...\\\\\\\"\\\\n\\\\t\\\\t[:charForm | newForm _ Form extent: charForm extent + (delta@0).\\\\n\\\\t\\\\tcharForm displayOn: newForm.  \\\\\\\"Copy this image into it\\\\\\\"\\\\n\\\\t\\\\tnewForm]    \\\\\\\"and substitute it in the font\\\\\\\"! !\\\\n\\\\n\\\\n!StrikeFont methodsFor: 'copying' stamp: 'BG 12/9/2004 17:27'!\\\\ndeepCopy\\\\n \\\\\\\" there is a circular reference from the derivative fonts back to the receiver. It is therefore not possible to make a deep copy. We make a sahllow copy. The method postCopy can be used to modify the shallow copy. \\\\\\\" \\\\n  ^self copy! !\\\\n\\\\n!StrikeFont methodsFor: 'copying' stamp: 'BG 12/9/2004 17:35'!\\\\npostCopy\\\\n \\\\\\\" the receiver is a just created shallow copy. This method gives it the final touch. \\\\\\\" \\\\n \\\\n    glyphs := glyphs copy.\\\\n    xTable := xTable copy.\\\\n    characterToGlyphMap := characterToGlyphMap copy.\\\\n \\\\n    self reset.  \\\\\\\" takes care of the derivative fonts \\\\\\\"! !\\\\n\\\\n!StrikeFont methodsFor: 'copying' stamp: 'tk 8/19/1998 16:15'!\\\\nveryDeepCopyWith: deepCopier\\\\n\\\\t\\\\\\\"Return self.  I am shared.  Do not record me.\\\\\\\"! !\\\\n\\\\n\\\\n!StrikeFont methodsFor: 'displaying' stamp: 'yo 5/19/2004 11:34'!\\\\ncharacters: anInterval in: sourceString displayAt: aPoint clippedBy: clippingRectangle rule: ruleInteger fillColor: aForm kernDelta: kernDelta on: aBitBlt\\\\n\\\\t\\\\\\\"Simple, slow, primitive method for displaying a line of characters.\\\\n\\\\tNo wrap-around is provided.\\\\\\\"\\\\n\\\\t| ascii destPoint leftX rightX sourceRect |\\\\n\\\\tdestPoint _ aPoint.\\\\n\\\\tanInterval do: \\\\n\\\\t\\\\t[:i |\\\\n\\\\t\\\\tself flag: #yoDisplay.\\\\n\\\\t\\\\t\\\\\\\"if the char is not supported, fall back to the specified fontset.\\\\\\\"\\\\n\\\\t\\\\tascii _ (sourceString at: i) charCode.\\\\n\\\\t\\\\t(ascii < minAscii or: [ascii > maxAscii])\\\\n\\\\t\\\\t\\\\tifTrue: [ascii _ maxAscii].\\\\n\\\\t\\\\tleftX _ xTable at: ascii + 1.\\\\n\\\\t\\\\trightX _ xTable at: ascii + 2.\\\\n\\\\t\\\\tsourceRect _ leftX@0 extent: (rightX-leftX) @ self height.\\\\n\\\\t\\\\taBitBlt copyFrom: sourceRect in: glyphs to: destPoint.\\\\n\\\\t\\\\tdestPoint _ destPoint + ((rightX-leftX+kernDelta)@0).\\\\n\\\\t\\\\t\\\\\\\"destPoint printString displayAt: 0@(i*20)\\\\\\\"].\\\\n\\\\t^ destPoint! !\\\\n\\\\n!StrikeFont methodsFor: 'displaying' stamp: 'yo 5/19/2004 11:36'!\\\\ndisplayLine: aString at: aPoint \\\\n\\\\t\\\\\\\"Display the characters in aString, starting at position aPoint.\\\\\\\"\\\\n\\\\n\\\\tself characters: (1 to: aString size)\\\\n\\\\t\\\\tin: aString\\\\n\\\\t\\\\tdisplayAt: aPoint\\\\n\\\\t\\\\tclippedBy: Display boundingBox\\\\n\\\\t\\\\trule: Form over\\\\n\\\\t\\\\tfillColor: nil\\\\n\\\\t\\\\tkernDelta: 0\\\\n\\\\t\\\\ton: (BitBlt current toForm: Display).\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'displaying' stamp: 'yo 1/7/2005 15:16'!\\\\ndisplayMultiString: aString on: aBitBlt from: startIndex to: stopIndex at: aPoint kern: kernDelta baselineY: baselineY\\\\n\\\\n\\\\t| destPoint leftX rightX glyphInfo char displayInfo destY |\\\\n\\\\tdestPoint _ aPoint.\\\\n\\\\tcharIndex _ startIndex.\\\\n\\\\tglyphInfo _ Array new: 5.\\\\n\\\\t[charIndex <= stopIndex] whileTrue: [\\\\n\\\\t\\\\tchar _ aString at: charIndex.\\\\n\\\\t\\\\t(self hasGlyphOf: char) not ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tdisplayInfo _ self fallbackFont displayString: aString on: aBitBlt from: charIndex to: stopIndex at: destPoint kern: kernDelta from: self baselineY: baselineY.\\\\n\\\\t\\\\t\\\\t\\\\tcharIndex _ displayInfo first.\\\\n\\\\t\\\\t\\\\t\\\\tdestPoint _ displayInfo second.\\\\n\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\tself glyphInfoOf: char into: glyphInfo.\\\\n\\\\t\\\\t\\\\tleftX _ glyphInfo second.\\\\n\\\\t\\\\t\\\\trightX _ glyphInfo third.\\\\n\\\\t\\\\t\\\\t(glyphInfo fifth ~= aBitBlt lastFont) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tglyphInfo fifth installOn: aBitBlt.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\taBitBlt sourceForm: glyphInfo first.\\\\n\\\\t\\\\t\\\\tdestY _ baselineY - glyphInfo fourth. \\\\n\\\\t\\\\t\\\\taBitBlt destX: destPoint x.\\\\n\\\\t\\\\t\\\\taBitBlt destY: destY.\\\\n\\\\t\\\\t\\\\taBitBlt sourceOrigin: leftX @ 0.\\\\n\\\\t\\\\t\\\\taBitBlt width: rightX - leftX.\\\\n\\\\t\\\\t\\\\taBitBlt height: self height.\\\\n\\\\t\\\\t\\\\taBitBlt copyBits.\\\\n\\\\t\\\\t\\\\tdestPoint _ destPoint + (rightX - leftX + kernDelta @ 0).\\\\n\\\\t\\\\t\\\\tcharIndex _ charIndex + 1.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\t^ Array with: charIndex with: destPoint.\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'displaying' stamp: 'yo 12/20/2002 18:54'!\\\\ndisplayStringR2L: aString on: aBitBlt from: startIndex to: stopIndex at: aPoint kern: kernDelta\\\\n\\\\t\\\\\\\"You are screwed if you reach this method.\\\\\\\"\\\\n\\\\tself halt.\\\\n\\\\taBitBlt displayString: aString \\\\n\\\\t\\\\t\\\\tfrom: startIndex \\\\n\\\\t\\\\t\\\\tto: stopIndex \\\\n\\\\t\\\\t\\\\tat: aPoint \\\\n\\\\t\\\\t\\\\tstrikeFont: self\\\\n\\\\t\\\\t\\\\tkern: kernDelta.! !\\\\n\\\\n!StrikeFont methodsFor: 'displaying' stamp: 'ar 4/10/2005 18:06'!\\\\ndisplayString: aString on: aBitBlt from: startIndex to: stopIndex at: aPoint kern: kernDelta\\\\n\\\\t\\\\\\\"Draw the given string from startIndex to stopIndex \\\\n\\\\tat aPoint on the (already prepared) BitBlt.\\\\\\\"\\\\n\\\\t\\\\n\\\\t(aString isByteString) ifFalse: [^ self displayMultiString: aString on: aBitBlt from: startIndex to: stopIndex at: aPoint kern: kernDelta baselineY: aPoint y + self ascent.].\\\\n\\\\n\\\\t^ aBitBlt displayString: aString \\\\n\\\\t\\\\t\\\\tfrom: startIndex \\\\n\\\\t\\\\t\\\\tto: stopIndex \\\\n\\\\t\\\\t\\\\tat: aPoint \\\\n\\\\t\\\\t\\\\tstrikeFont: self\\\\n\\\\t\\\\t\\\\tkern: kernDelta.! !\\\\n\\\\n!StrikeFont methodsFor: 'displaying' stamp: 'ar 4/10/2005 18:06'!\\\\ndisplayString: aString on: aBitBlt from: startIndex to: stopIndex at: aPoint kern: kernDelta baselineY: baselineY\\\\n\\\\t\\\\\\\"Draw the given string from startIndex to stopIndex \\\\n\\\\tat aPoint on the (already prepared) BitBlt.\\\\\\\"\\\\n\\\\t\\\\n\\\\t(aString isByteString) ifFalse:[^ self displayMultiString: aString on: aBitBlt from: startIndex to: stopIndex at: aPoint kern: kernDelta baselineY: baselineY.].\\\\n\\\\n\\\\t^ aBitBlt displayString: aString \\\\n\\\\t\\\\t\\\\tfrom: startIndex \\\\n\\\\t\\\\t\\\\tto: stopIndex \\\\n\\\\t\\\\t\\\\tat: aPoint \\\\n\\\\t\\\\t\\\\tstrikeFont: self\\\\n\\\\t\\\\t\\\\tkern: kernDelta.! !\\\\n\\\\n!StrikeFont methodsFor: 'displaying' stamp: 'BG 3/16/2005 08:27'!\\\\nfontDisplay\\\\n\\\\t\\\\\\\"TextStyle default defaultFont fontDisplay.\\\\\\\"\\\\n\\\\n\\\\tDisplay restoreAfter:\\\\n\\\\t\\\\t[(Form extent: 440@400) displayAt: 90@90.\\\\n\\\\t\\\\t 0 to: 15 do:\\\\n\\\\t\\\\t\\\\t[:i |\\\\n\\\\t\\\\t\\\\ti storeStringHex displayAt: 100 @ (20 * i + 100).\\\\n\\\\t\\\\t\\\\t0 to: 15 do:\\\\n\\\\t\\\\t\\\\t\\\\t[:j |\\\\n\\\\t\\\\t\\\\t\\\\t((16*i+j) between: 1 and: (self xTable size - 2)) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[(self characterFormAt: (16 * i + j) asCharacter)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdisplayAt: (20 * j + 150) @ (20 * i + 100)]]].\\\\n\\\\t\\\\t\\\\t'Click to continue...' asDisplayText displayAt: 100@450]! !\\\\n\\\\n!StrikeFont methodsFor: 'displaying' stamp: 'yo 1/5/2005 13:59'!\\\\ninstallOn: aDisplayContext\\\\n\\\\n\\\\t^aDisplayContext installStrikeFont: self.\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'displaying' stamp: 'ar 5/19/2000 15:08'!\\\\ninstallOn: aDisplayContext foregroundColor: foregroundColor backgroundColor: backgroundColor\\\\n\\\\t^aDisplayContext \\\\n\\\\t\\\\tinstallStrikeFont: self\\\\n\\\\t\\\\tforegroundColor: foregroundColor \\\\n\\\\t\\\\tbackgroundColor: backgroundColor! !\\\\n\\\\n!StrikeFont methodsFor: 'displaying' stamp: 'tak 1/11/2005 18:03'!\\\\nwidthOfString: aString from: firstIndex to: lastIndex\\\\n\\\\t| resultX |\\\\n\\\\tresultX _ 0.\\\\n\\\\tfirstIndex to: lastIndex do:[:i | \\\\n\\\\t\\\\tresultX _ resultX + (self widthOf: (aString at: i))].\\\\n\\\\t^ resultX.\\\\n! !\\\\n\\\\n\\\\n!StrikeFont methodsFor: 'emphasis' stamp: 'yo 12/18/2003 23:30'!\\\\nbonk: glyphForm with: bonkForm\\\\n\\\\t\\\\\\\"Bonking means to run through the glyphs clearing out black pixels\\\\n\\\\tbetween characters to prevent them from straying into an adjacent\\\\n\\\\tcharacter as a result of, eg, bolding or italicizing\\\\\\\"\\\\n\\\\t\\\\\\\"Uses the bonkForm to erase at every character boundary in glyphs.\\\\\\\"\\\\n\\\\t| bb offset x |\\\\n\\\\toffset _ bonkForm offset x.\\\\n\\\\tbb _ BitBlt current toForm: glyphForm.\\\\n\\\\tbb sourceForm: bonkForm; sourceRect: bonkForm boundingBox;\\\\n\\\\t\\\\tcombinationRule: Form erase; destY: 0.\\\\n\\\\tx _ self xTable.\\\\n\\\\t(x isMemberOf: SparseLargeTable) ifTrue: [\\\\n\\\\t\\\\tx base to: x size-1 do: [:i | bb destX: (x at: i) + offset; copyBits].\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\t1 to: x size-1 do: [:i | bb destX: (x at: i) + offset; copyBits].\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'emphasis'!\\\\nemphasis\\\\n\\\\t\\\\\\\"Answer the integer code for synthetic bold, italic, underline, and \\\\n\\\\tstrike-out.\\\\\\\"\\\\n\\\\n\\\\t^emphasis! !\\\\n\\\\n!StrikeFont methodsFor: 'emphasis'!\\\\nemphasis: code \\\\n\\\\t\\\\\\\"Set the integer code for synthetic bold, itallic, underline, and strike-out, \\\\n\\\\twhere bold=1, italic=2, underlined=4, and struck out=8.\\\\\\\"\\\\n\\\\n\\\\temphasis _ code! !\\\\n\\\\n!StrikeFont methodsFor: 'emphasis' stamp: 'di 9/3/2000 13:22'!\\\\nemphasized: code \\\\n\\\\t\\\\\\\"Answer a copy of the receiver with emphasis set to include code.\\\\\\\"\\\\n\\\\t| derivative addedEmphasis base safeCode |\\\\n\\\\tcode = 0 ifTrue: [^ self].\\\\n\\\\t(derivativeFonts == nil or: [derivativeFonts size = 0]) ifTrue: [^ self].\\\\n\\\\tderivative _ derivativeFonts at: (safeCode _ code min: derivativeFonts size).\\\\n\\\\tderivative == nil ifFalse: [^ derivative].  \\\\\\\"Already have this style\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Dont have it -- derive from another with one with less emphasis\\\\\\\"\\\\n\\\\taddedEmphasis _ 1 bitShift: safeCode highBit - 1.\\\\n\\\\tbase _ self emphasized: safeCode - addedEmphasis.  \\\\\\\"Order is Bold, Ital, Under, Narrow\\\\\\\"\\\\n\\\\taddedEmphasis = 1 ifTrue:   \\\\\\\"Compute synthetic bold version of the font\\\\\\\"\\\\n\\\\t\\\\t[derivative _ (base copy ensureCleanBold name: base name , 'B') makeBoldGlyphs].\\\\n\\\\taddedEmphasis = 2 ifTrue:   \\\\\\\"Compute synthetic italic version of the font\\\\\\\"\\\\n\\\\t\\\\t[ derivative _ (base copy name: base name , 'I') makeItalicGlyphs].\\\\n\\\\taddedEmphasis = 4 ifTrue:   \\\\\\\"Compute underlined version of the font\\\\\\\"\\\\n\\\\t\\\\t[derivative _ (base copy name: base name , 'U') makeUnderlinedGlyphs].\\\\n\\\\taddedEmphasis = 8 ifTrue:   \\\\\\\"Compute narrow version of the font\\\\\\\"\\\\n\\\\t\\\\t[derivative _ (base copy name: base name , 'N') makeCondensedGlyphs].\\\\n\\\\taddedEmphasis = 16 ifTrue:   \\\\\\\"Compute struck-out version of the font\\\\\\\"\\\\n\\\\t\\\\t[derivative _ (base copy name: base name , 'X') makeStruckOutGlyphs].\\\\n\\\\tderivative emphasis: safeCode.\\\\n\\\\tderivativeFonts at: safeCode put: derivative.\\\\n\\\\t^ derivative! !\\\\n\\\\n!StrikeFont methodsFor: 'emphasis' stamp: 'yo 5/24/2004 17:54'!\\\\nmakeBoldGlyphs\\\\n\\\\t\\\\\\\"Make a bold set of glyphs with same widths by ORing 1 bit to the right\\\\n\\\\t\\\\t(requires at least 1 pixel of intercharacter space)\\\\\\\"\\\\n\\\\t| g bonkForm |\\\\n\\\\tg _ glyphs deepCopy.\\\\n\\\\tbonkForm _ (Form extent: 1@16) fillBlack offset: -1@0.\\\\n\\\\tself bonk: g with: bonkForm.\\\\n\\\\tg copyBits: g boundingBox from: g at: (1@0)\\\\n\\\\t\\\\tclippingBox: g boundingBox rule: Form under fillColor: nil.\\\\n\\\\tglyphs _ g.\\\\n\\\\tfallbackFont ifNotNil: [\\\\n\\\\t\\\\tfallbackFont _ fallbackFont emphasized: 1\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'emphasis' stamp: 'yo 5/24/2004 17:51'!\\\\nmakeCondensedGlyphs\\\\n\\\\t\\\\\\\"Make a condensed set of glyphs with same widths.\\\\n\\\\tNOTE: this has been superceded by kerning -- should not get called\\\\\\\"\\\\n\\\\t| g newXTable x x1 w |\\\\n\\\\tg _ glyphs deepCopy.\\\\n\\\\tnewXTable _ Array new: xTable size.\\\\n\\\\tnewXTable at: 1 put: (x _ xTable at: 1).\\\\n\\\\t1 to: xTable size-1 do:\\\\n\\\\t\\\\t[:i | x1 _ xTable at: i.  w _ (xTable at: i+1) - x1.\\\\n\\\\t\\\\tw > 1 ifTrue: [w _ w-1].  \\\\\\\"Shrink every character wider than 1\\\\\\\"\\\\n\\\\t\\\\tg copy: (x@0 extent: w@g height) from: x1@0 in: glyphs rule: Form over.\\\\n\\\\t\\\\tnewXTable at: i+1 put: (x _ x + w)].\\\\n\\\\txTable _ newXTable.\\\\n\\\\tglyphs _ g.\\\\n\\\\tfallbackFont ifNotNil: [\\\\n\\\\t\\\\tfallbackFont emphasized: 8\\\\n\\\\t].\\\\n\\\\n\\\\\\\"\\\\n(TextStyle default fontAt: 1) copy makeCondensedGlyphs\\\\n\\\\tdisplayLine: 'The quick brown fox jumps over the lazy dog'\\\\n\\\\tat: Sensor cursorPoint\\\\n\\\\\\\"! !\\\\n\\\\n!StrikeFont methodsFor: 'emphasis' stamp: 'yo 5/24/2004 17:54'!\\\\nmakeItalicGlyphs\\\\n\\\\t\\\\\\\"Make an italic set of glyphs with same widths by skewing left and right.\\\\n\\\\tIn the process, characters would overlap, so we widen them all first.\\\\n\\\\t\\\\\\\"\\\\n\\\\t| extraWidth newGlyphs newXTable x newX w extraOnLeft |  \\\\n\\\\textraOnLeft _ (self height-1-self ascent+4)//4 max: 0.\\\\n\\\\textraWidth _ ((self ascent-5+4)//4 max: 0) + extraOnLeft.\\\\n\\\\tnewGlyphs _ Form extent: (glyphs width + (maxAscii + 1 - minAscii*extraWidth)) @ glyphs height.\\\\n\\\\tnewXTable _ xTable copy.\\\\n\\\\n\\\\t\\\\\\\"Copy glyphs into newGlyphs with room on left and right for overlap.\\\\\\\"\\\\n\\\\tminAscii to: maxAscii+1 do:\\\\n\\\\t\\\\t[:ascii | x _ xTable at: ascii+1.  w _ (xTable at: ascii+2) - x.\\\\n\\\\t\\\\tnewX _ newXTable at: ascii+1.\\\\n\\\\t\\\\tnewGlyphs copy: ((newX + extraOnLeft) @ 0 extent: w @ glyphs height)\\\\n\\\\t\\\\t\\\\tfrom: x @ 0 in: glyphs rule: Form over.\\\\n\\\\t\\\\tnewXTable at: ascii+2 put: newX + w + extraWidth].\\\\t\\\\t\\\\n\\\\tglyphs _ newGlyphs. \\\\n\\\\txTable _ newXTable.\\\\n\\\\t\\\\\\\"Slide the bitmaps left and right for synthetic italic effect.\\\\\\\"\\\\n\\\\t4 to: self ascent-1 by: 4 do:\\\\n\\\\t\\\\t[:y | \\\\t\\\\t\\\\\\\"Slide ascenders right...\\\\\\\"\\\\n\\\\t\\\\tglyphs copy: (1@0 extent: glyphs width @ (self ascent - y))\\\\n\\\\t\\\\t\\\\tfrom: 0@0 in: glyphs rule: Form over].\\\\n\\\\tself ascent to: self height-1 by: 4 do:\\\\n\\\\t\\\\t[:y | \\\\t\\\\t\\\\\\\"Slide descenders left...\\\\\\\"\\\\n\\\\t\\\\tglyphs copy: (0@y extent: glyphs width @ glyphs height)\\\\n\\\\t\\\\t\\\\tfrom: 1@y in: glyphs rule: Form over].\\\\n\\\\tfallbackFont ifNotNil: [\\\\n\\\\t\\\\tfallbackFont _ fallbackFont emphasized: 2\\\\n\\\\t].\\\\n\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'emphasis' stamp: 'yo 5/24/2004 17:54'!\\\\nmakeStruckOutGlyphs\\\\n\\\\t\\\\\\\"Make a struck-out set of glyphs with same widths\\\\\\\"\\\\n\\\\t| g |\\\\n\\\\tg _ glyphs deepCopy.\\\\n\\\\tg fillBlack: (0 @ (self ascent - (self ascent//3)) extent: g width @ 1).\\\\n\\\\tglyphs _ g.\\\\n\\\\tfallbackFont ifNotNil: [\\\\n\\\\t\\\\tfallbackFont _ fallbackFont emphasized: 16\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'emphasis' stamp: 'yo 5/24/2004 17:54'!\\\\nmakeUnderlinedGlyphs\\\\n\\\\t\\\\\\\"Make an underlined set of glyphs with same widths\\\\\\\"\\\\n\\\\t| g |\\\\n\\\\tg _ glyphs deepCopy.\\\\n\\\\tg fillBlack: (0 @ (self ascent+1) extent: g width @ 1).\\\\n\\\\tglyphs _ g.\\\\n\\\\tfallbackFont ifNotNil: [\\\\n\\\\t\\\\tfallbackFont _ fallbackFont emphasized: 4\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'emphasis' stamp: 'nk 3/15/2004 18:46'!\\\\nreleaseCachedState\\\\n\\\\n\\\\tself reset.! !\\\\n\\\\n!StrikeFont methodsFor: 'emphasis' stamp: 'tak 3/11/2005 17:09'!\\\\nreset\\\\n\\\\t\\\\\\\"Reset the cache of derivative emphasized fonts\\\\\\\"\\\\n\\\\n\\\\t| style font |\\\\n\\\\tfallbackFont class = FixedFaceFont\\\\n\\\\t\\\\tifTrue: [fallbackFont _ nil].\\\\n\\\\tderivativeFonts _ Array new: 32.\\\\n\\\\t#('B' 'I' 'BI') doWithIndex:\\\\n\\\\t\\\\t[:tag :index | \\\\n\\\\t\\\\t(style _ TextStyle named: self familyName) ifNotNil:\\\\n\\\\t\\\\t\\\\t[(font _ style fontArray\\\\n\\\\t\\\\t\\\\t\\\\tdetect: [:each | each name = (self name , tag)]\\\\n\\\\t\\\\t\\\\t\\\\tifNone: [nil]) ifNotNil: [derivativeFonts at: index put: font]]]! !\\\\n\\\\n\\\\n!StrikeFont methodsFor: 'file in/out' stamp: 'ar 5/23/2000 12:50'!\\\\nbuildfontNamed: nm fromForms: forms startingAtAscii: startAscii\\\\n\\\\tascent: a descent: d maxWid: m\\\\n\\\\t\\\\\\\"This builds a StrikeFont instance from existing forms.\\\\\\\"\\\\n\\\\n\\\\t| lastAscii width ascii charForm missingForm tempGlyphs |\\\\n\\\\tname _ nm.\\\\n\\\\tascent _ 11.\\\\n\\\\tdescent _ 3.\\\\n\\\\tmaxWidth _ 16.\\\\n\\\\tpointSize _ 8.\\\\n\\\\tname _ (name copyWithout: Character space) ,\\\\n\\\\t\\\\t\\\\t\\\\t(pointSize < 10\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: ['0' , pointSize printString]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [pointSize printString]).\\\\n\\\\tminAscii _ 258.\\\\n\\\\tmaxAscii _ 0.\\\\n\\\\tsuperscript _ ascent - descent // 3.\\\\t\\\\n\\\\tsubscript _ descent - ascent // 3.\\\\t\\\\n\\\\temphasis _ 0.\\\\n\\\\ttype _ 0.  \\\\\\\"ignored for now\\\\\\\"\\\\n\\\\n\\\\ttempGlyphs _ Form extent: (maxWidth*257) @ self height.\\\\n\\\\txTable _ (Array new: 258) atAllPut: 0.\\\\n\\\\txTable at: 1 put: 0.\\\\n\\\\n\\\\t\\\\\\\"Read character forms and blt into tempGlyphs\\\\\\\"\\\\n\\\\tlastAscii _ -1.\\\\n\\\\t1 to: forms size do:\\\\n\\\\t\\\\t[:i | charForm _ forms at: i. width _ charForm width.\\\\n\\\\t\\\\tascii _ startAscii-1+i.\\\\n\\\\t\\\\tself displayChar: ascii form: charForm.\\\\n\\\\t\\\\tascii = 256\\\\n\\\\t\\\\t\\\\tifTrue: [missingForm _ charForm deepCopy]\\\\n\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[minAscii _ minAscii min: ascii.\\\\n\\\\t\\\\t\\\\tmaxAscii _ maxAscii max: ascii.\\\\n\\\\t\\\\t\\\\tlastAscii+1 to: ascii-1 do: [:as | xTable at: as+2 put: (xTable at: as+1)].\\\\n\\\\t\\\\t\\\\ttempGlyphs copy: ((xTable at: ascii+1)@0\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\textent: charForm extent)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfrom: 0@0 in: charForm rule: Form over.\\\\n\\\\t\\\\t\\\\txTable at: ascii+2 put: (xTable at: ascii+1) + width.\\\\n\\\\t\\\\t\\\\tlastAscii _ ascii]].\\\\n\\\\tlastAscii+1 to: maxAscii+1 do: [:as | xTable at: as+2 put: (xTable at: as+1)].\\\\n\\\\tmissingForm == nil ifFalse:\\\\n\\\\t\\\\t[tempGlyphs copy: missingForm boundingBox from: missingForm\\\\n\\\\t\\\\t\\\\t\\\\tto: (xTable at: maxAscii+2)@0 rule: Form over.\\\\n\\\\t\\\\txTable at: maxAscii+3 put: (xTable at: maxAscii+2) + missingForm width].\\\\n\\\\tglyphs _ Form extent: (xTable at: maxAscii+3) @ self height.\\\\n\\\\tglyphs copy: glyphs boundingBox from: 0@0 in: tempGlyphs rule: Form over.\\\\n\\\\txTable _ xTable copyFrom: 1 to: maxAscii+3.\\\\n\\\\tcharacterToGlyphMap _ nil.! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out'!\\\\ndisplayChar: ascii form: charForm\\\\n\\\\t\\\\\\\"Convenience utility used during conversion of BitFont files\\\\\\\"\\\\n\\\\t| m bigForm |\\\\n\\\\tDisplay fillBlack: (0@0 extent: 20@14).\\\\n\\\\tascii printString displayAt: 0@2.\\\\n\\\\tcharForm width > 0 ifTrue:\\\\n\\\\t\\\\t[m _ 5.\\\\n\\\\t\\\\tbigForm _ charForm magnify: charForm boundingBox by: m@m.\\\\n\\\\t\\\\tDisplay border: ((bigForm boundingBox expandBy: m) translateBy: 50@2) width: m.\\\\n\\\\t\\\\tbigForm displayAt: 50@2.\\\\n\\\\t\\\\tDisplay fillBlack: ((50@2)+((m*charForm width)@0) extent: 1@(m*self height))].! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out' stamp: 'md 11/14/2003 17:25'!\\\\nnewFromStrike: fileName\\\\n\\\\t\\\\\\\"Build an instance from the strike font file name. The '.strike' extension\\\\n\\\\tis optional.\\\\\\\"\\\\n\\\\n\\\\t| strike startName raster16 |\\\\n\\\\tname _ fileName copyUpTo: $..\\\\t\\\\\\\"assumes extension (if any) is '.strike'\\\\\\\"\\\\n\\\\tstrike _ FileStream readOnlyFileNamed: name, '.strike.'.\\\\n\\\\tstrike binary.\\\\n\\\\n\\\\t\\\\\\\"strip off direcory name if any\\\\\\\"\\\\n\\\\tstartName _ name size.\\\\n\\\\t[startName > 0 and: [((name at: startName) ~= $>) & ((name at: startName) ~= $])]]\\\\n\\\\t\\\\twhileTrue: [startName _ startName - 1].\\\\n\\\\tname _ name copyFrom: startName+1 to: name size.\\\\n\\\\n\\\\ttype\\\\t\\\\t\\\\t_\\\\t\\\\tstrike nextWord.\\\\t\\\\t\\\\\\\"type is ignored now -- simplest\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tassumed.  Kept here to make\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twriting and consistency more\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstraightforward.\\\\\\\"\\\\n\\\\tminAscii\\\\t\\\\t_\\\\t\\\\tstrike nextWord.\\\\n\\\\tmaxAscii\\\\t\\\\t_\\\\t\\\\tstrike nextWord.\\\\n\\\\tmaxWidth\\\\t\\\\t_\\\\t\\\\tstrike nextWord.\\\\n\\\\tstrikeLength\\\\t_\\\\t\\\\tstrike nextWord.\\\\n\\\\tascent\\\\t\\\\t\\\\t_\\\\t\\\\tstrike nextWord.\\\\n\\\\tdescent\\\\t\\\\t\\\\t_\\\\t\\\\tstrike nextWord.\\\\n\\\\t\\\\\\\"xOffset\\\\t\\\\t\\\\t_\\\\\\\"\\\\t\\\\tstrike nextWord. \\\\t\\\\n\\\\traster16\\\\t\\\\t\\\\t_\\\\t\\\\tstrike nextWord.\\\\t\\\\n\\\\tsuperscript\\\\t\\\\t_\\\\t\\\\tascent - descent // 3.\\\\t\\\\n\\\\tsubscript\\\\t\\\\t_\\\\t\\\\tdescent - ascent // 3.\\\\t\\\\n\\\\temphasis\\\\t\\\\t_\\\\t\\\\t0.\\\\n\\\\tglyphs\\\\t\\\\t\\\\t_\\\\tForm extent: (raster16 * 16) @ (self height)  \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\toffset: 0@0.\\\\n\\\\t\\\\tglyphs bits fromByteStream: strike.\\\\n\\\\n\\\\txTable _ (Array new: maxAscii + 3) atAllPut: 0.\\\\n\\\\t(minAscii + 1 to: maxAscii + 3) do:\\\\n\\\\t\\\\t[:index | xTable at: index put: strike nextWord].\\\\n\\\\n\\\\t\\\\\\\"Set up space character\\\\\\\"\\\\n\\\\t((xTable at: (Space asciiValue + 2))  = 0 or:\\\\n\\\\t\\\\t\\\\t[(xTable at: (Space asciiValue + 2)) = (xTable at: (Space asciiValue + 1))])\\\\n\\\\t\\\\tifTrue:\\\\t[(Space asciiValue + 2) to: xTable size do:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:index | xTable at: index put: ((xTable at: index) + DefaultSpace)]].\\\\n\\\\tstrike close.\\\\n\\\\tcharacterToGlyphMap _ nil.! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out' stamp: 'tk 9/28/2000 15:50'!\\\\nobjectForDataStream: refStrm\\\\n\\\\t| dp |\\\\n\\\\t\\\\\\\"I am about to be written on an object file.  Write a reference to a known Font in the other system instead.  \\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"A path to me\\\\\\\"\\\\n\\\\t(TextConstants at: #forceFontWriting ifAbsent: [false]) ifTrue: [^ self].\\\\n\\\\t\\\\t\\\\\\\"special case for saving the default fonts on the disk.  See collectionFromFileNamed:\\\\\\\"\\\\n\\\\n\\\\tdp _ DiskProxy global: #StrikeFont selector: #familyName:size:emphasized:\\\\n\\\\t\\\\t\\\\targs: (Array with: self familyName   with: self height\\\\n\\\\t\\\\t\\\\t\\\\t\\\\twith: self emphasis).\\\\n\\\\trefStrm replace: self with: dp.\\\\n\\\\t^ dp! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out' stamp: 'sma 6/1/2000 09:32'!\\\\nprintOn: aStream\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream\\\\n\\\\t\\\\tnextPut: $(;\\\\n\\\\t\\\\tnextPutAll: self name;\\\\n\\\\t\\\\tspace;\\\\n\\\\t\\\\tprint: self height;\\\\n\\\\t\\\\tnextPut: $)! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out' stamp: 'ar 10/25/2005 00:21'!\\\\nreadBDFFromFile: fileName name: aString \\\\n\\\\t\\\\\\\"This builds a StrikeFont instance by reading the X11 Binary \\\\n\\\\tDistribution Format font source file.  See the BDFFontReader class\\\\n\\\\tcomment.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"StrikeFont new readBDFFromFile: 'helvR12' name: 'Helvetica12'.\\\\\\\"\\\\n\\\\n\\\\t| fontReader stream |\\\\n\\\\tfontReader := BDFFontReader openFileNamed: fileName.\\\\n\\\\tstream := ReadStream on: fontReader read.\\\\n\\\\txTable := stream next.\\\\n\\\\tglyphs := stream next.\\\\n\\\\tminAscii := stream next.\\\\n\\\\tmaxAscii := stream next.\\\\n\\\\tmaxWidth := stream next.\\\\n\\\\tascent := stream next.\\\\n\\\\tdescent := stream next.\\\\n\\\\tpointSize := stream next.\\\\n\\\\tname := aString.\\\\n\\\\\\\"\\\\txTable size <= 256 ifTrue: [self setStopConditions].\\\\\\\"\\\\n\\\\ttype := 0.\\\\t\\\\\\\"no one see this\\\\\\\"\\\\n\\\\tsuperscript := (ascent - descent) // 3.\\\\n\\\\tsubscript := (descent - ascent) // 3.\\\\n\\\\temphasis := 0.\\\\n\\\\tself reset! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out'!\\\\nreadBFHeaderFrom: f\\\\n\\\\tname _ self restOfLine: 'Font name = ' from: f.\\\\n\\\\tascent _ (self restOfLine: 'Ascent = ' from: f) asNumber.\\\\n\\\\tdescent _ (self restOfLine: 'Descent = ' from: f) asNumber.\\\\n\\\\tmaxWidth _ (self restOfLine: 'Maximum width = ' from: f) asNumber.\\\\n\\\\tpointSize _ (self restOfLine: 'Font size = ' from: f) asNumber.\\\\n\\\\tname _ (name copyWithout: Character space) ,\\\\n\\\\t\\\\t\\\\t\\\\t(pointSize < 10\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: ['0' , pointSize printString]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [pointSize printString]).\\\\n\\\\tminAscii _ 258.\\\\n\\\\tmaxAscii _ 0.\\\\n\\\\tsuperscript _ ascent - descent // 3.\\\\t\\\\n\\\\tsubscript _ descent - ascent // 3.\\\\t\\\\n\\\\temphasis _ 0.\\\\n\\\\ttype _ 0.  \\\\\\\"ignored for now\\\\\\\"\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out' stamp: 'yo 11/30/2003 17:08'!\\\\nreadEFontBDFForJapaneseFromFile: fileName name: aString overrideWith: otherFileName\\\\n\\\\n\\\\t| fontReader stream |\\\\n\\\\tfontReader _ EFontBDFFontReaderForRanges readOnlyFileNamed: fileName.\\\\n\\\\tstream _ ReadStream on: (fontReader readRanges: fontReader rangesForJapanese overrideWith: otherFileName otherRanges: {Array with: 8481 with: 12320} additionalOverrideRange: fontReader additionalRangesForJapanese).\\\\n\\\\txTable _ stream next.\\\\n\\\\tglyphs _ stream next.\\\\n\\\\tminAscii _ stream next.\\\\n\\\\tmaxAscii _ stream next.\\\\n\\\\tmaxWidth _ stream next.\\\\n\\\\tascent _ stream next.\\\\n\\\\tdescent _ stream next.\\\\n\\\\tpointSize _ stream next.\\\\n\\\\tname _ aString.\\\\n\\\\ttype _ 0. \\\\\\\"no one see this\\\\\\\"\\\\n\\\\tsuperscript _ ascent - descent // 3.\\\\t\\\\n\\\\tsubscript _ descent - ascent // 3.\\\\t\\\\n\\\\temphasis _ 0.\\\\n\\\\tself reset.\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out' stamp: 'yo 1/15/2004 16:48'!\\\\nreadEFontBDFForKoreanFromFile: fileName name: aString overrideWith: otherFileName\\\\n\\\\n\\\\t| fontReader stream |\\\\n\\\\tfontReader _ EFontBDFFontReaderForRanges readOnlyFileNamed: fileName.\\\\n\\\\tstream _ ReadStream on: (fontReader readRanges: fontReader rangesForKorean overrideWith: otherFileName otherRanges: {Array with: 8481 with: 12320} additionalOverrideRange: fontReader additionalRangesForKorean).\\\\n\\\\txTable _ stream next.\\\\n\\\\tglyphs _ stream next.\\\\n\\\\tminAscii _ stream next.\\\\n\\\\tmaxAscii _ stream next.\\\\n\\\\tmaxWidth _ stream next.\\\\n\\\\tascent _ stream next.\\\\n\\\\tdescent _ stream next.\\\\n\\\\tpointSize _ stream next.\\\\n\\\\tname _ aString.\\\\n\\\\ttype _ 0. \\\\\\\"no one see this\\\\\\\"\\\\n\\\\tsuperscript _ ascent - descent // 3.\\\\t\\\\n\\\\tsubscript _ descent - ascent // 3.\\\\t\\\\n\\\\temphasis _ 0.\\\\n\\\\tself reset.\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out' stamp: 'yo 12/28/2002 21:02'!\\\\nreadEFontBDFFromFile: fileName name: aString rangeFrom: startRange to: endRange\\\\n\\\\n\\\\t| fontReader stream |\\\\n\\\\tfontReader _ EFontBDFFontReader readOnlyFileNamed: fileName.\\\\n\\\\tstream _ ReadStream on: (fontReader readFrom: startRange to: endRange).\\\\n\\\\txTable _ stream next.\\\\n\\\\tglyphs _ stream next.\\\\n\\\\tminAscii _ stream next.\\\\n\\\\tmaxAscii _ stream next.\\\\n\\\\tmaxWidth _ stream next.\\\\n\\\\tascent _ stream next.\\\\n\\\\tdescent _ stream next.\\\\n\\\\tpointSize _ stream next.\\\\n\\\\tname _ aString.\\\\n\\\\ttype _ 0. \\\\\\\"no one see this\\\\\\\"\\\\n\\\\tsuperscript _ ascent - descent // 3.\\\\t\\\\n\\\\tsubscript _ descent - ascent // 3.\\\\t\\\\n\\\\temphasis _ 0.\\\\n\\\\tself reset.\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out' stamp: 'yo 1/19/2005 11:22'!\\\\nreadEFontBDFFromFile: fileName name: aString ranges: ranges\\\\n\\\\n\\\\t| fontReader stream |\\\\n\\\\tfontReader _ EFontBDFFontReaderForRanges readOnlyFileNamed: fileName.\\\\n\\\\tstream _ ReadStream on: (fontReader readRanges: ranges).\\\\n\\\\txTable _ stream next.\\\\n\\\\tglyphs _ stream next.\\\\n\\\\tminAscii _ stream next.\\\\n\\\\tmaxAscii _ stream next.\\\\n\\\\tmaxWidth _ stream next.\\\\n\\\\tascent _ stream next.\\\\n\\\\tdescent _ stream next.\\\\n\\\\tpointSize _ stream next.\\\\n\\\\tname _ aString.\\\\n\\\\ttype _ 0. \\\\\\\"no one see this\\\\\\\"\\\\n\\\\tsuperscript _ ascent - descent // 3.\\\\t\\\\n\\\\tsubscript _ descent - ascent // 3.\\\\t\\\\n\\\\temphasis _ 0.\\\\n\\\\tself reset.\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out' stamp: 'yo 9/23/2002 16:30'!\\\\nreadF12FromStream: aStream\\\\n\\\\n\\\\t| box blt |\\\\n\\\\tminAscii _ 0.\\\\n\\\\tmaxAscii _ 94*94.\\\\n\\\\tascent _ 12.\\\\n\\\\tdescent _ 0.\\\\n\\\\tpointSize _ 12.\\\\n\\\\tsuperscript _ 0.\\\\n\\\\tsubscript _ 0.\\\\n\\\\temphasis _ 0.\\\\n\\\\tmaxWidth _ 12.\\\\n\\\\t\\\\n\\\\tbox _ Form extent: 12@12.\\\\n\\\\tglyphs  _ Form extent: (94*94*12)@12.\\\\n\\\\tblt _ BitBlt toForm: glyphs. \\\\n\\\\txTable _ XTableForFixedFont new.\\\\n\\\\txTable maxAscii: maxAscii + 3.\\\\n\\\\txTable width: 12.\\\\n\\\\t1 to: 256 do:  [:index | \\\\n\\\\t\\\\t1 to: 12 do: [:i |\\\\n\\\\t\\\\t\\\\taStream next.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\t(minAscii + 1 to: 94*94) do:  [:index | \\\\n\\\\t\\\\tself readCharacter: (box bits) from: aStream.\\\\n\\\\t\\\\tblt copy: ((12*(index-1))@0 extent: 12@12) from: 0@0 in: box.\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out' stamp: 'ar 5/23/2000 12:50'!\\\\nreadFromBitFont: fileName\\\\n\\\\t\\\\\\\"This builds a StrikeFont instance by reading the data file format\\\\n\\\\tproduced by BitFont, a widely available font conversion utility\\\\n\\\\twritten by Peter DiCamillo at Brown University\\\\\\\"\\\\n\\\\t\\\\\\\"StrikeFont new readFromBitFont: 'Palatino10.BF' \\\\\\\"\\\\n\\\\t| f lastAscii charLine width ascii charForm line missingForm tempGlyphs iRect p rectLine left tokens right |\\\\n\\\\tf _ FileStream readOnlyFileNamed: fileName.\\\\n\\\\tself readBFHeaderFrom: f.\\\\n\\\\n\\\\t\\\\\\\"NOTE: if font has been scaled (and in any case),\\\\n\\\\tthe REAL bitmap dimensions come after the header.\\\\\\\"\\\\n\\\\tself restOfLine: 'Extent information for entire font' from: f.\\\\n\\\\t\\\\\\\"Parse the following line (including mispelling!!)\\\\\\\"\\\\n\\\\t\\\\\\\"Image rectange: left = -2, right = 8, bottom = -2, top = 7\\\\\\\"\\\\n\\\\ttokens _ (f upTo: Character cr)  findTokens: ' '.\\\\n\\\\tiRect _ Rectangle left: (tokens at: 5) asNumber right: (tokens at: 8) asNumber\\\\n\\\\t\\\\t\\\\t\\\\ttop: (tokens at: 14) asNumber bottom: (tokens at: 11) asNumber.\\\\n\\\\tascent _ iRect top.\\\\n\\\\tdescent _ iRect bottom negated.\\\\n\\\\t\\\\n\\\\ttempGlyphs _ Form extent: (maxWidth*257) @ self height.\\\\n\\\\txTable _ (Array new: 258) atAllPut: 0.\\\\n\\\\txTable at: 1 put: 0.\\\\n\\\\n\\\\t\\\\\\\"Read character forms and blt into tempGlyphs\\\\\\\"\\\\n\\\\tlastAscii _ -1.\\\\n\\\\t[charLine _ self restOfLine: 'Character: ' from: f.\\\\n\\\\tcharLine == nil ifFalse:\\\\n\\\\t\\\\t[p _ f position.\\\\n\\\\t\\\\trectLine _ f upTo: Character cr.\\\\n\\\\t\\\\t(rectLine beginsWith: 'Image rectange: left = ')\\\\n\\\\t\\\\t\\\\tifTrue: [tokens _ rectLine findTokens: ' '.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tleft _ (tokens at: 5) asNumber. right _ (tokens at: 8) asNumber]\\\\n\\\\t\\\\t\\\\tifFalse: [left _ right _ 0. f position: p].\\\\n\\\\t\\\\twidth_ (self restOfLine: 'Width (final pen position) = ' from: f) asNumber - left\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmax: (right-left+1).\\\\n\\\\t\\\\t(charLine beginsWith: 'Missing character') ifTrue: [ascii _ 256].\\\\n\\\\t\\\\t('x''*' match: charLine) ifTrue:\\\\n\\\\t\\\\t\\\\t[ascii _ Number readFrom: (charLine copyFrom: 3 to: 4) asUppercase base: 16].\\\\n\\\\t\\\\tcharForm _ Form extent: width@self height.\\\\n\\\\t\\\\t('*[all blank]' match: charLine) ifFalse:\\\\n\\\\t\\\\t\\\\t[self restOfLine: '  +' from: f.\\\\n\\\\t\\\\t\\\\t1 to: self height do:\\\\n\\\\t\\\\t\\\\t\\\\t[:y | line _ f upTo: Character cr.\\\\n\\\\t\\\\t\\\\t\\\\t4 to: (width + 3 min: line size + iRect left - left) do:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:x | (line at: x - iRect left + left) = $*\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [charForm pixelValueAt: (x-4)@(y-1) put: 1]]]]].\\\\n\\\\tcharLine == nil]\\\\n\\\\t\\\\twhileFalse:\\\\n\\\\t\\\\t\\\\t[self displayChar: ascii form: charForm.\\\\n\\\\t\\\\t\\\\tascii = 256\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [missingForm _ charForm deepCopy]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[minAscii _ minAscii min: ascii.\\\\n\\\\t\\\\t\\\\t\\\\tmaxAscii _ maxAscii max: ascii.\\\\n\\\\t\\\\t\\\\t\\\\tlastAscii+1 to: ascii-1 do: [:a | xTable at: a+2 put: (xTable at: a+1)].\\\\n\\\\t\\\\t\\\\t\\\\ttempGlyphs copy: ((xTable at: ascii+1)@0\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\textent: charForm extent)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfrom: 0@0 in: charForm rule: Form over.\\\\n\\\\t\\\\t\\\\t\\\\txTable at: ascii+2 put: (xTable at: ascii+1) + width.\\\\n\\\\t\\\\t\\\\t\\\\tlastAscii _ ascii]].\\\\n\\\\tf close.\\\\n\\\\tlastAscii+1 to: maxAscii+1 do: [:a | xTable at: a+2 put: (xTable at: a+1)].\\\\n\\\\tmissingForm == nil ifFalse:\\\\n\\\\t\\\\t[tempGlyphs copy: missingForm boundingBox from: missingForm\\\\n\\\\t\\\\t\\\\t\\\\tto: (xTable at: maxAscii+2)@0 rule: Form over.\\\\n\\\\t\\\\txTable at: maxAscii+3 put: (xTable at: maxAscii+2) + missingForm width].\\\\n\\\\tglyphs _ Form extent: (xTable at: maxAscii+3) @ self height.\\\\n\\\\tglyphs copy: glyphs boundingBox from: 0@0 in: tempGlyphs rule: Form over.\\\\n\\\\txTable _ xTable copyFrom: 1 to: maxAscii+3.\\\\n\\\\tcharacterToGlyphMap _ nil.! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out' stamp: 'ar 5/23/2000 12:53'!\\\\nreadFromStrike2Stream: file \\\\n\\\\t\\\\\\\"Build an instance from the supplied binary stream on data in strike2 format\\\\\\\"\\\\n\\\\ttype _ file nextInt32.  type = 2 ifFalse: [file close. self error: 'not strike2 format'].\\\\n\\\\tminAscii _ file nextInt32.\\\\n\\\\tmaxAscii _ file nextInt32.\\\\n\\\\tmaxWidth _ file nextInt32.\\\\n\\\\tascent _ file nextInt32.\\\\n\\\\tdescent _ file nextInt32.\\\\n\\\\tpointSize _ file nextInt32.\\\\n\\\\tsuperscript _ ascent - descent // 3.\\\\t\\\\n\\\\tsubscript _ descent - ascent // 3.\\\\t\\\\n\\\\temphasis _ file nextInt32.\\\\n\\\\txTable _ (Array new: maxAscii + 3) atAllPut: 0.\\\\n\\\\t(minAscii + 1 to: maxAscii + 3) do:\\\\n\\\\t\\\\t[:index | xTable at: index put: file nextInt32].\\\\n\\\\tglyphs _ Form new readFrom: file.\\\\n\\\\n\\\\t\\\\\\\"Set up space character\\\\\\\"\\\\n\\\\t((xTable at: (Space asciiValue + 2))  = 0 or:\\\\n\\\\t\\\\t\\\\t[(xTable at: (Space asciiValue + 2)) = (xTable at: (Space asciiValue + 1))])\\\\n\\\\t\\\\tifTrue:\\\\t[(Space asciiValue + 2) to: xTable size do:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:index | xTable at: index put: ((xTable at: index) + DefaultSpace)]].\\\\n\\\\tcharacterToGlyphMap _ nil.! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out' stamp: 'sma 12/30/1999 14:20'!\\\\nreadFromStrike2: fileName  \\\\\\\"StrikeFont new readFromStrike2: 'Palatino14.sf2'\\\\\\\"\\\\n\\\\t\\\\\\\"Build an instance from the strike font stored in strike2 format.\\\\n\\\\tfileName is of the form: <family name><pointSize>.sf2\\\\\\\"\\\\n\\\\t| file |\\\\n\\\\t('*.sf2' match: fileName) ifFalse: [self halt.  \\\\\\\"likely incompatible\\\\\\\"].\\\\n\\\\tname _ fileName copyUpTo: $. .  \\\\\\\"Drop filename extension\\\\\\\"\\\\n\\\\tfile _ FileStream readOnlyFileNamed: fileName.\\\\n\\\\tfile binary.\\\\n\\\\t[self readFromStrike2Stream: file] ensure: [file close]! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out'!\\\\nrestOfLine: leadString from: file\\\\n\\\\t\\\\\\\"Utility method to assist reading of BitFont data files\\\\\\\"\\\\n\\\\t| line |\\\\n\\\\t[line _ file upTo: Character cr.\\\\n\\\\tline size < leadString size or: [leadString ~= (line copyFrom: 1 to: leadString size)]]\\\\n\\\\twhileTrue: [file atEnd ifTrue: [^ nil]].\\\\n\\\\t^ line copyFrom: leadString size+1 to: line size! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out' stamp: 'ls 4/11/2000 18:57'!\\\\nwriteAsStrike2named: fileName\\\\n\\\\t\\\\\\\"Write me onto a file in strike2 format.\\\\n\\\\tfileName should be of the form: <family name><pointSize>.sf2\\\\\\\"\\\\n\\\\t| file |\\\\n\\\\tfile _ FileStream fileNamed: fileName.\\\\n\\\\tself writeAsStrike2On: file.\\\\n\\\\tfile close.! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out' stamp: 'ls 3/27/2000 17:43'!\\\\nwriteAsStrike2On: file\\\\n\\\\t\\\\\\\"Write me onto a file in strike2 format.\\\\n\\\\tfileName should be of the form: <family name><pointSize>.sf2\\\\\\\"\\\\n\\\\tfile binary.\\\\n\\\\tfile nextInt32Put: 2.\\\\n\\\\tfile nextInt32Put: minAscii.\\\\n\\\\tfile nextInt32Put: maxAscii.\\\\n\\\\tfile nextInt32Put: maxWidth.\\\\n\\\\tfile nextInt32Put: ascent.\\\\n\\\\tfile nextInt32Put: descent.\\\\n\\\\tfile nextInt32Put: pointSize.\\\\n\\\\tsuperscript _ ascent - descent // 3.\\\\t\\\\n\\\\tsubscript _ descent - ascent // 3.\\\\t\\\\n\\\\tfile nextInt32Put: emphasis.\\\\n\\\\t(minAscii + 1 to: maxAscii + 3) do:\\\\n\\\\t\\\\t[:index | file nextInt32Put: (xTable at: index)].\\\\n\\\\tglyphs writeOn: file.\\\\n\\\\tfile close.\\\\n! !\\\\n\\\\n\\\\n!StrikeFont methodsFor: 'Mac reader'!\\\\naComment\\\\n\\\\t\\\\\\\"To read Mac font resources.  \\\\n1) Use ResEdit in the Fonts folder in the System Folder.  Open the file of the Font you want.  (A screen font, not a TrueType outline font).\\\\n2) Open the FOND resource and scroll down to the list of sizes and resource numbers. Note the resource number of the size you want.\\\\n3) Open the NFNT resource.  Click on the number you have noted.\\\\n4) Choose 'Open Using Hex Editor' from the resource editor.\\\\n5) Copy all of the hex numbers and paste into a text editor.  Save the file into the Smalltalk folder under the name 'FontName 12 hex' (or other size).\\\\n6) Enter the fileName below and execute: \\\\n\\\\nTextStyle default fontAt: 8 put: (StrikeFont new readMacFontHex: 'fileName').\\\\n\\\\nSelect text and type Command-7 to change it to your new font.\\\\n\\\\n(There is some problem in the ParagraphEditor with the large size of Cairo 18.  Its line heights are not the right.)\\\\n\\\\t\\\\\\\"! !\\\\n\\\\n!StrikeFont methodsFor: 'Mac reader'!\\\\nfixKerning: extraWidth\\\\n\\\\t\\\\\\\"Insert one pixel (extraWidth) between each character.  And add the bits for the space character\\\\\\\"\\\\n\\\\t\\\\\\\"Create a space character Form.  Estimate width by ascent / 2 - 1\\\\\\\"\\\\n\\\\t| characterForm char leftX |\\\\n\\\\tcharacterForm _ Form extent: (ascent//2 - 1) @ self height.\\\\n\\\\tself characterFormAt: $  put: characterForm.\\\\n\\\\n\\\\t\\\\\\\"Put one pixel of space after every character.  Mac fonts have no space in the bitmap.\\\\\\\"\\\\n\\\\textraWidth <= 0 ifTrue: [^ self].\\\\n\\\\tminAscii to: maxAscii do: [:ascii |\\\\n\\\\t\\\\tchar _ Character value: ascii.\\\\n\\\\t\\\\tleftX _ xTable at: ascii + 1.\\\\n\\\\t\\\\tcharacterForm _ Form extent: \\\\n\\\\t\\\\t\\\\t((self widthOf: char) + extraWidth) @ self height.\\\\n\\\\t\\\\tcharacterForm \\\\n\\\\t\\\\t\\\\tcopy: (characterForm boundingBox extendBy: \\\\n\\\\t\\\\t\\\\t\\\\t(0-extraWidth@0))\\\\n\\\\t\\\\t\\\\tfrom: leftX@0 in: glyphs rule: Form over.\\\\n\\\\t\\\\tself characterFormAt: char put: characterForm.\\\\n\\\\t\\\\t].\\\\t! !\\\\n\\\\n!StrikeFont methodsFor: 'Mac reader' stamp: 'ar 5/23/2000 12:49'!\\\\nreadMacFontHex: fileName\\\\n\\\\t\\\\\\\"Read the hex version of a Mac FONT type resource.  See the method aComment for how to prepare the input file. 4/26/96 tk\\\\\\\"\\\\n\\\\t| file hh fRectWidth |\\\\n\\\\tname _ fileName.\\\\t\\\\\\\"Palatino 12\\\\\\\"\\\\n\\\\tfile _ FileStream readOnlyFileNamed: fileName, ' hex'.\\\\n\\\\n\\\\t\\\\\\\"See Inside Macintosh page IV-42 for this record\\\\\\\"\\\\n\\\\t\\\\\\\"FontType _ \\\\\\\" Number readFrom: (file next: 4) base: 16.\\\\n\\\\temphasis\\\\t\\\\t_\\\\t\\\\t0.\\\\n\\\\tminAscii _ Number readFrom: (file next: 4) base: 16.\\\\n\\\\tmaxAscii _ Number readFrom: (file next: 4) base: 16.\\\\n\\\\tmaxWidth\\\\t\\\\t_ Number readFrom: (file next: 4) base: 16.\\\\n\\\\t\\\\\\\"kernMax _ \\\\\\\" Number readFrom: (file next: 4) base: 16.\\\\n\\\\t\\\\\\\"NDescent _ \\\\\\\" Number readFrom: (file next: 4) base: 16.\\\\n\\\\tfRectWidth _  Number readFrom: (file next: 4) base: 16.\\\\n\\\\thh _  Number readFrom: (file next: 4) base: 16.\\\\n\\\\t\\\\\\\"OWTLoc _ \\\\\\\" Number readFrom: (file next: 4) base: 16.\\\\n\\\\tascent\\\\t\\\\t\\\\t_ Number readFrom: (file next: 4) base: 16.\\\\n\\\\tdescent\\\\t\\\\t\\\\t_ Number readFrom: (file next: 4) base: 16.\\\\n\\\\t\\\\\\\"leading _ \\\\\\\" Number readFrom: (file next: 4) base: 16.\\\\n\\\\txOffset\\\\t\\\\t\\\\t_\\\\t\\\\t0. \\\\t\\\\n\\\\traster\\\\t\\\\t\\\\t_ Number readFrom: (file next: 4) base: 16.\\\\n\\\\n\\\\tstrikeLength\\\\t_\\\\t\\\\traster*16.\\\\n\\\\tsuperscript\\\\t\\\\t_\\\\t\\\\tascent - descent // 3.\\\\t\\\\n\\\\tsubscript\\\\t\\\\t_\\\\t\\\\tdescent - ascent // 3.\\\\t\\\\n\\\\tself strikeFromHex: file width: raster height: hh.\\\\n\\\\tself xTableFromHex: file.\\\\n\\\\tfile close.\\\\n\\\\n\\\\t\\\\\\\"Insert one pixel between each character.  And add space character.\\\\\\\"\\\\n\\\\tself fixKerning: (fRectWidth - maxWidth).\\\\t\\\\n\\\\n\\\\t\\\\\\\"Recompute character to glyph mapping\\\\\\\"\\\\n\\\\tcharacterToGlyphMap _ nil.! !\\\\n\\\\n!StrikeFont methodsFor: 'Mac reader'!\\\\nstrikeFromHex: file width: w height: h\\\\n\\\\t\\\\\\\"read in just the raw strike bits from a hex file.  No spaces or returns.  W is in words (2 bytes), h in pixels.\\\\\\\" \\\\n\\\\t| newForm theBits offsetX offsetY str num cnt |\\\\n\\\\toffsetX  _ 0.\\\\n\\\\toffsetY _ 0.\\\\n\\\\toffsetX > 32767 ifTrue: [offsetX _ offsetX - 65536]. \\\\\\\"stored two's-complement\\\\\\\"\\\\n\\\\toffsetY > 32767 ifTrue: [offsetY _ offsetY - 65536]. \\\\\\\"stored two's-complement\\\\\\\"\\\\n\\\\tnewForm _ Form extent: strikeLength @ h offset: offsetX @ offsetY.\\\\n\\\\ttheBits _ newForm bits.\\\\n\\\\tcnt _ 0.\\\\t\\\\t\\\\\\\"raster may be 16 bits, but theBits width is 32\\\\\\\" \\\\n\\\\t1 to: theBits size do: [:i | \\\\n\\\\t\\\\t(cnt _ cnt + 32) > strikeLength \\\\n\\\\t\\\\t  ifTrue: [cnt _ 0.\\\\n\\\\t\\\\t\\\\tnum _ Number readFrom: (str _ file next: 4) base: 16]\\\\n\\\\t\\\\t  ifFalse: [\\\\n\\\\t\\\\t\\\\tcnt = strikeLength ifTrue: [cnt _ 0].\\\\n\\\\t\\\\t\\\\tnum _ Number readFrom: (str _ file next: 8) base: 16].\\\\n\\\\t\\\\ttheBits at: i put: num].\\\\n\\\\tglyphs _ newForm.! !\\\\n\\\\n!StrikeFont methodsFor: 'Mac reader'!\\\\nxTableFromHex: file\\\\n\\\\n\\\\t| strike num str wid |\\\\n\\\\tstrike _ file.\\\\n\\\\txTable _ (Array new: maxAscii + 3) atAllPut: 0.\\\\n\\\\t(minAscii + 1 to: maxAscii + 3) do:\\\\n\\\\t\\\\t[:index | \\\\n\\\\t\\\\t\\\\tnum _ Number readFrom: (str _ strike next: 4) base: 16. \\\\n\\\\t\\\\t\\\\txTable at: index put: num].\\\\n\\\\n\\\\t1 to: xTable size - 1 do: [:ind |\\\\n\\\\t\\\\twid _ (xTable at: ind+1) - (xTable at: ind).\\\\n\\\\t\\\\t(wid < 0) | (wid > 40) ifTrue: [\\\\n\\\\t\\\\t\\\\tfile close.\\\\n\\\\t\\\\t\\\\tself error: 'illegal character width']].\\\\n! !\\\\n\\\\n\\\\n!StrikeFont methodsFor: 'make arrows' stamp: 'sps 10/15/2003 17:06'!\\\\nmakeAssignArrow\\\\n\\\\\\\"Replace the underline character with an arrow for this font\\\\\\\"\\\\n\\\\n\\\\t| arrowForm arrowCanvas arrowY arrowLeft arrowRight arrowHeadLength |\\\\n\\\\n\\\\tarrowForm _ (self characterFormAt: $_) copy.\\\\n\\\\tarrowCanvas _ arrowForm getCanvas.\\\\n\\\\tarrowCanvas fillColor: Color white.\\\\n\\\\tarrowY _ arrowForm height // 2.\\\\n\\\\tarrowLeft _ 0. \\\\n\\\\tarrowRight _ arrowForm width - 2.\\\\n\\\\tarrowHeadLength _ (arrowRight - arrowLeft) * 2 // 5.\\\\n\\\\t\\\\\\\"Draw the lines\\\\\\\"\\\\n\\\\tarrowCanvas line: (arrowLeft@arrowY) to: (arrowRight@arrowY) color: Color black.\\\\n\\\\tarrowCanvas \\\\n\\\\t\\\\tline: (arrowLeft@arrowY) \\\\n\\\\t\\\\tto: ((arrowLeft + arrowHeadLength)@(arrowY - arrowHeadLength)) \\\\n\\\\t\\\\tcolor: Color black.\\\\n\\\\tarrowCanvas \\\\n\\\\t\\\\tline: (arrowLeft@arrowY) \\\\n\\\\t\\\\tto: ((arrowLeft + arrowHeadLength)@(arrowY + arrowHeadLength)) \\\\n\\\\t\\\\tcolor: Color black.\\\\n\\\\n\\\\t\\\\\\\"Replace the glyph\\\\\\\"\\\\n\\\\tself characterFormAt: $_ put: arrowForm.\\\\n\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'make arrows' stamp: 'sps 10/15/2003 17:06'!\\\\nmakeReturnArrow\\\\n\\\\\\\"Replace the caret character with an arrow\\\\\\\"\\\\n\\\\n\\\\t| arrowForm arrowCanvas arrowHeadLength arrowX arrowTop arrowBottom |\\\\n\\\\n\\\\tarrowForm _ (self characterFormAt: $^) copy.\\\\n\\\\tarrowCanvas _ arrowForm getCanvas.\\\\n\\\\tarrowCanvas fillColor: Color white.\\\\n\\\\n\\\\tarrowHeadLength _ ((arrowForm width - 2)// 2).\\\\n\\\\tarrowX _ (arrowHeadLength max: (arrowForm width // 2)).\\\\n\\\\tarrowTop _ arrowForm height // 4. \\\\n\\\\tarrowBottom _ (arrowTop + (arrowForm width * 4 // 5 )).\\\\n\\\\tarrowBottom _ (arrowBottom min: arrowForm height) max: (arrowForm height * 2 // 3).\\\\n\\\\n\\\\t\\\\\\\"Draw the lines\\\\\\\"\\\\n\\\\tarrowCanvas line: (arrowX@arrowTop) to: (arrowX@arrowBottom) color: Color black.\\\\n\\\\tarrowCanvas \\\\n\\\\t\\\\tline: (arrowX@arrowTop) \\\\n\\\\t\\\\tto: ((arrowX - arrowHeadLength)@(arrowTop + arrowHeadLength)) \\\\n\\\\t\\\\tcolor: Color black.\\\\n\\\\tarrowCanvas \\\\n\\\\t\\\\tline: (arrowX@arrowTop) \\\\n\\\\t\\\\tto: ((arrowX + arrowHeadLength)@(arrowTop + arrowHeadLength)) \\\\n\\\\t\\\\tcolor: Color black.\\\\n\\\\n\\\\t\\\\\\\"Replace the glyph\\\\\\\"\\\\n\\\\tself characterFormAt: $^ put: arrowForm.\\\\n\\\\n! !\\\\n\\\\n\\\\n!StrikeFont methodsFor: 'multibyte character methods' stamp: 'yo 3/18/2004 00:10'!\\\\nfixAccuISO8859From: aStrikeFont\\\\n\\\\n\\\\t| f |\\\\n\\\\tself reset.\\\\n\\\\txTable _ aStrikeFont xTable copy.\\\\n\\\\tglyphs _ Form extent: aStrikeFont glyphs extent.\\\\n\\\\tmaxAscii _ 255.\\\\n\\\\tminAscii _ 0.\\\\n\\\\t\\\\\\\"stopConditions _ nil.\\\\\\\"\\\\n\\\\n\\\\t0 to: 127 do: [:i |\\\\n\\\\t\\\\tf _ aStrikeFont characterFormAt: (Character value: i) isoToSqueak.\\\\n\\\\t\\\\tf width  = 0 ifTrue: [f _ Form extent: 1@f height].\\\\n\\\\t\\\\t\\\\n\\\\t\\\\tself characterFormAt: (Character value: i) put: f.\\\\n\\\\t].\\\\n\\\\t128 to: 159 do: [:i |\\\\n\\\\t\\\\tf _ Form extent: 1@f height.\\\\n\\\\t\\\\tself characterFormAt: (Character value: i) put: f.\\\\n\\\\t].\\\\n\\\\t160 to: 255 do: [:i |\\\\n\\\\t\\\\tf _ aStrikeFont characterFormAt: (Character value: i) isoToSqueak.\\\\n\\\\t\\\\tf width  = 0 ifTrue: [f _ Form extent: 1@f height].\\\\n\\\\t\\\\t\\\\n\\\\t\\\\tself characterFormAt: (Character value: i) put: f.\\\\n\\\\t].\\\\n\\\\t\\\\t\\\\n\\\\t^ self.\\\\t\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'multibyte character methods' stamp: 'yo 11/12/2002 12:56'!\\\\nfixAscent: a andDescent: d head: h\\\\n\\\\n\\\\t| bb newGlyphs |\\\\n\\\\t\\\\\\\"(a + d) = (ascent + descent) ifTrue: [\\\\\\\"\\\\n\\\\t\\\\tascent _ a.\\\\n\\\\t\\\\tdescent _ d.\\\\n\\\\t\\\\tnewGlyphs _ Form extent: (glyphs width@(h + glyphs height)).\\\\n\\\\t\\\\tbb _ BitBlt toForm: newGlyphs.\\\\n\\\\t\\\\tbb copy: (0@h extent: (glyphs extent)) from: 0@0 in: glyphs\\\\n\\\\t\\\\t\\\\tfillColor: nil rule: Form over.\\\\n\\\\t\\\\tglyphs _ newGlyphs.\\\\n\\\\t\\\\\\\"].\\\\\\\"\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'multibyte character methods' stamp: 'yo 9/16/2002 15:07'!\\\\nfixForISO8859From: aStrikeFont\\\\n\\\\n\\\\t| fixer m mappingTable |\\\\n\\\\tfixer _ StrikeFontFixer newOn: aStrikeFont.\\\\n\\\\tself reset.\\\\n\\\\txTable _ aStrikeFont xTable copy.\\\\n\\\\tglyphs _ Form extent: aStrikeFont glyphs extent.\\\\n\\\\tmaxAscii _ 255.\\\\n\\\\tminAscii _ 0.\\\\n\\\\tmappingTable _ fixer mappingTable.\\\\n\\\\t\\\\\\\"stopConditions _ nil.\\\\\\\"\\\\n\\\\n\\\\t0 to: 255 do: [:i |\\\\n\\\\t\\\\t(m _ mappingTable at: i+1) ~= nil ifTrue: [\\\\n\\\\t\\\\t\\\\tself characterFormAt: (Character value: i)\\\\n\\\\t\\\\t\\\\t\\\\tput: (aStrikeFont characterFormAt: (Character value: m)).\\\\n\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\tself characterFormAt: (Character value: i)\\\\n\\\\t\\\\t\\\\t\\\\tput: (aStrikeFont characterFormAt: (Character space)).\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\t^self.\\\\t\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'multibyte character methods' stamp: 'yo 8/28/2002 16:35'!\\\\nfixXTable\\\\n\\\\n\\\\t| newXTable val |\\\\n\\\\txTable size >= 258 ifTrue: [\\\\n\\\\t\\\\t^ self.\\\\n\\\\t].\\\\n\\\\n\\\\tnewXTable _ Array new: 258.\\\\n\\\\t1 to: xTable size do: [:i |\\\\n\\\\t\\\\tnewXTable at: i put: (xTable at: i).\\\\n\\\\t].\\\\n\\\\n\\\\tval _ xTable at: (xTable size).\\\\n\\\\t\\\\n\\\\txTable size + 1 to: 258 do: [:i |\\\\n\\\\t\\\\tnewXTable at: i put: val.\\\\n\\\\t].\\\\n\\\\tminAscii _ 0.\\\\n\\\\tmaxAscii _ 255.\\\\n\\\\txTable _ newXTable.\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'multibyte character methods' stamp: 'yo 1/6/2005 04:18'!\\\\nhasGlyphOf: aCharacter\\\\n\\\\n\\\\t| code |\\\\n\\\\tcode _ aCharacter charCode.\\\\n\\\\t((code between: self minAscii and: self maxAscii) not) ifTrue: [\\\\n\\\\t\\\\t^ false.\\\\n\\\\t].\\\\n\\\\t(xTable at: code + 1) < 0 ifTrue: [\\\\n\\\\t\\\\t^ false.\\\\n\\\\t].\\\\n\\\\t^ true.\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'multibyte character methods' stamp: 'yo 8/28/2002 16:37'!\\\\nreadCharacter: aBits from: aStream\\\\n\\\\n\\\\t| pos |\\\\n\\\\tpos _ 0.\\\\n\\\\t12 timesRepeat: [\\\\n\\\\t\\\\t1 to: 2 do: [ :w |\\\\n\\\\t\\\\t\\\\taBits byteAt: (pos+w) put: (aStream next ). \\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tpos _ pos + 4.\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'multibyte character methods' stamp: 'yo 5/24/2004 23:11'!\\\\nsetupDefaultFallbackFont\\\\n\\\\n\\\\t| fonts f |\\\\n\\\\tfonts _ TextStyle default fontArray.\\\\n\\\\tf _ fonts first.\\\\n\\\\t1 to: fonts size do: [:i |\\\\n\\\\t\\\\tself height > (fonts at: i) height ifTrue: [f _ fonts at: i].\\\\n\\\\t].\\\\n\\\\tself fallbackFont: f.\\\\n\\\\tself reset.\\\\n\\\\n! !\\\\n\\\\n\\\\n!StrikeFont methodsFor: 'testing'!\\\\ncheckCharacter: character \\\\n\\\\t\\\\\\\"Answer a Character that is within the ascii range of the receiver--either \\\\n\\\\tcharacter or the last character in the receiver.\\\\\\\"\\\\n\\\\n\\\\t| ascii |  \\\\n\\\\tascii _ character asciiValue.\\\\n\\\\t((ascii < minAscii) or: [ascii > maxAscii])\\\\n\\\\t\\\\t\\\\tifTrue: [^maxAscii asCharacter]\\\\n\\\\t\\\\t\\\\tifFalse:\\\\t[^character]\\\\n! !\\\\n\\\\n\\\\n!StrikeFont methodsFor: '*nebraska-file in/out' stamp: 'yo 12/17/2005 20:36'!\\\\nencodedForRemoteCanvas\\\\n\\\\n\\\\t| stream |\\\\n\\\\tstream := RWBinaryOrTextStream on: ''.\\\\n\\\\tstream nextPutAll: self familyName.\\\\n\\\\tstream nextPut: Character space.\\\\n\\\\tstream nextPutAll: self name.\\\\n\\\\tstream nextPut: Character space.\\\\n\\\\tstream nextPutAll: self height.\\\\n\\\\tstream nextPut: Character space.\\\\n\\\\tstream nextPutAll: self emphasis asString.\\\\n\\\\t^ stream contents asString.\\\\n! !\\\\n\\\\n\\\\n!StrikeFont methodsFor: 'private' stamp: 'yo 3/11/2005 07:38'!\\\\ncreateCharacterToGlyphMap\\\\n        \\\\\\\"Private. Create the character to glyph mapping for a font that didn't have any before. This is basically equivalent to what the former setStopCondition did, only based on indexes.\\\\\\\"\\\\n\\\\n        maxAscii < 256 ifTrue: [^ (1 to: 256) collect: [:i | i - 1]].\\\\n        ^ nil.\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'private' stamp: 'yo 5/20/2004 10:51'!\\\\nleftAndRighOrNilFor: char\\\\n\\\\n\\\\t| code leftX |\\\\n\\\\tcode _ char charCode.\\\\n\\\\t((code between: self minAscii and: self maxAscii) not) ifTrue: [\\\\n\\\\t\\\\tcode _ $? charCode.\\\\n\\\\t].\\\\n\\\\tleftX _ xTable at: code + 1.\\\\n\\\\tleftX < 0 ifTrue: [\\\\n\\\\t\\\\tcode _ $? charCode.\\\\n\\\\t\\\\tleftX _ xTable at: code + 1.\\\\n\\\\t].\\\\n\\\\t^ Array with: leftX with: (xTable at: code + 2).\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStrikeFont class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StrikeFont class methodsFor: 'accessing' stamp: 'nk 9/1/2004 11:00'!\\\\nactualFamilyNames\\\\n\\\\t\\\\\\\"Answer a sorted list of actual family names, without the Default aliases\\\\\\\"\\\\n\\\\n\\\\t^(self familyNames copyWithoutAll: TextStyle defaultFamilyNames) asOrderedCollection! !\\\\n\\\\n!StrikeFont class methodsFor: 'accessing' stamp: 'ar 2/3/2002 23:04'!\\\\nfamilyName: aName pointSize: aSize\\\\n\\\\t\\\\\\\"Answer a font (or the default font if the name is unknown) in the specified size.\\\\\\\"\\\\n\\\\n\\\\t^ ((TextStyle named: aName asSymbol) ifNil: [TextStyle default]) fontOfPointSize: aSize! !\\\\n\\\\n!StrikeFont class methodsFor: 'accessing' stamp: 'ar 11/25/2004 15:19'!\\\\nfamilyName: aName size: aSize\\\\n\\\\t\\\\\\\"Answer a font (or the default font if the name is unknown) in the specified size.\\\\\\\"\\\\n\\\\t| style |\\\\n\\\\tstyle := TextStyle named: aName asSymbol.\\\\n\\\\tstyle ifNil: [^(FontSubstitutionDuringLoading forFamilyName: aName pixelSize: aSize)\\\\n\\\\t\\\\t\\\\tsignal: 'missing font' ].\\\\n\\\\t^style fontOfSize: aSize! !\\\\n\\\\n!StrikeFont class methodsFor: 'accessing' stamp: 'sma 12/30/1999 13:48'!\\\\nfamilyNames\\\\n\\\\t^ (TextConstants select: [:each | each isKindOf: TextStyle]) keys asSortedCollection! !\\\\n\\\\n!StrikeFont class methodsFor: 'accessing' stamp: 'tak 11/11/2004 21:14'!\\\\nsetupDefaultFallbackFont\\\\n\\\\\\\"\\\\n\\\\tStrikeFont setupDefaultFallbackFont\\\\n\\\\\\\"\\\\n\\\\n\\\\t(#(#Accuat #Accujen #Accula #Accumon #Accusf #Accushi #Accuve #Atlanta) collect: [:e | TextStyle named: e]) do: [:style |\\\\n\\\\t\\\\tstyle fontArray do: [:e |\\\\n\\\\t\\\\t\\\\te reset.\\\\n\\\\t\\\\t\\\\te setupDefaultFallbackFont.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\tTTCFont allSubInstances\\\\n\\\\t\\\\tdo: [:font | font reset.\\\\n\\\\t\\\\t\\\\tfont setupDefaultFallbackFont]\\\\n\\\\n! !\\\\n\\\\n\\\\n!StrikeFont class methodsFor: 'derivative font caching' stamp: 'tak 3/11/2005 16:27'!\\\\nshutDown  \\\\\\\"StrikeFont shutDown\\\\\\\"\\\\n\\\\t\\\\\\\"Deallocate synthetically derived copies of base fonts to save space\\\\\\\"\\\\n\\\\tself allSubInstancesDo: [:sf | sf reset].\\\\n\\\\tStrikeFontSet allSubInstancesDo: [:sf | sf reset].\\\\n\\\\tDefaultStringScanner _ nil.\\\\n! !\\\\n\\\\n\\\\n!StrikeFont class methodsFor: 'examples'!\\\\nconvertFontsNamed: familyName  \\\\\\\" StrikeFont convertFontsNamed: 'NewYork' \\\\\\\"\\\\n\\\\t\\\\\\\"This utility is for use after you have used BitFont to produce data files \\\\n\\\\tfor the fonts you wish to use.  It will read the BitFont files and then \\\\n\\\\twrite them out in strike2 (*.sf2) format which is much more compact,\\\\n\\\\tand which can be read in again very quickly.\\\\\\\"\\\\n\\\\t\\\\\\\"For this utility to work as is, the BitFont data files must be named\\\\n\\\\t'familyNN.BF', and must reside in the same directory as the image.\\\\\\\"\\\\n\\\\t| f |\\\\n\\\\t(FileDirectory default fileNamesMatching: familyName , '*.BF') do:\\\\n\\\\t\\\\t[:fname | Transcript cr; show: fname.\\\\n\\\\t\\\\tf _ StrikeFont new readFromBitFont: fname.\\\\n\\\\t\\\\tf writeAsStrike2named: f name , '.sf2']! !\\\\n\\\\n!StrikeFont class methodsFor: 'examples'!\\\\nexample\\\\n\\\\t\\\\\\\"Displays a line of text on the display screen at the location of the cursor.\\\\n\\\\tExample depends on the strike font file, 'TimesRoman10.strike'. existing.\\\\\\\"\\\\n\\\\n\\\\t(StrikeFont new readFromStrike2: 'NewYork12.sf2')\\\\n\\\\t\\\\tdisplayLine: 'A line of 12-pt text in New York style' at: Sensor cursorPoint\\\\n\\\\t \\\\n\\\\t\\\\\\\"StrikeFont example.\\\\\\\"! !\\\\n\\\\n!StrikeFont class methodsFor: 'examples' stamp: 'tpr 6/10/2005 16:07'!\\\\nreadStrikeFont2Family: familyName \\\\n\\\\t\\\\\\\"StrikeFont readStrikeFont2Family: 'Lucida'\\\\\\\"\\\\n\\\\t^self readStrikeFont2Family: familyName fromDirectory: FileDirectory default! !\\\\n\\\\n!StrikeFont class methodsFor: 'examples' stamp: 'tpr 6/10/2005 16:07'!\\\\nreadStrikeFont2Family: familyName fromDirectory: aDirectory\\\\n\\\\t\\\\\\\"StrikeFont readStrikeFont2Family: 'Lucida' fromDirectory: FileDirectory default\\\\\\\"\\\\n\\\\t\\\\\\\"This utility reads all available .sf2 StrikeFont files for a given family from  \\\\n\\\\tthe current directory. It returns an Array, sorted by size, suitable for handing \\\\n\\\\tto TextStyle newFontArray: .\\\\\\\"\\\\n\\\\t\\\\\\\"For this utility to work as is, the .sf2 files must be named 'familyNN.sf2'.\\\\\\\"\\\\n\\\\t| fileNames strikeFonts fontArray |\\\\n\\\\tfileNames _ aDirectory fileNamesMatching: familyName , '##.sf2'.\\\\n\\\\tstrikeFonts _ fileNames collect: [:fname | StrikeFont new readFromStrike2: fname].\\\\n\\\\tstrikeFonts do: [ :font | font reset ].\\\\n\\\\tstrikeFonts _ strikeFonts asSortedCollection: [:a :b | a height < b height].\\\\n\\\\tfontArray _ strikeFonts asArray.\\\\n\\\\t^ fontArray\\\\n\\\\n\\\\\\\"TextConstants at: #Lucida put: (TextStyle fontArray: (StrikeFont \\\\n\\\\treadStrikeFont2Family: 'Lucida')).\\\\\\\"! !\\\\n\\\\n\\\\n!StrikeFont class methodsFor: 'font creation' stamp: 'ar 6/4/2000 22:27'!\\\\nfromHostFont: fontName size: fontSize flags: fontFlags weight: fontWeight\\\\n\\\\t\\\\\\\"\\\\n\\\\t\\\\t^StrikeFont fromHostFont: (StrikeFont hostFontFromUser)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsize: 12 flags: 0 weight: 4.\\\\n\\\\t\\\\\\\"\\\\n\\\\t| fontHandle glyphs xTable xStart maxWidth w glyphForm ascent descent fontHeight |\\\\n\\\\tfontHandle _ self primitiveCreateFont: fontName size: fontSize flags: fontFlags weight: fontWeight.\\\\n\\\\tascent _ self primitiveFontAscent: fontHandle.\\\\n\\\\tdescent _ self primitiveFontDescent: fontHandle.\\\\n\\\\tfontHeight _ ascent + descent.\\\\n\\\\txTable _ Array new: 258.\\\\n\\\\txStart _ maxWidth _ 0.\\\\n\\\\t0 to: 255 do:[:i|\\\\n\\\\t\\\\txTable at: i+1 put: xStart.\\\\n\\\\t\\\\tw _ self primitiveFont: fontHandle widthOfChar: i.\\\\n\\\\t\\\\tw > maxWidth ifTrue:[maxWidth _ w].\\\\n\\\\t\\\\txStart _ xStart + w].\\\\n\\\\txTable at: 256 put: xStart.\\\\n\\\\txTable at: 257 put: xStart.\\\\n\\\\txTable at: 258 put: xStart.\\\\n\\\\tglyphs _ Form extent: xTable last @ fontHeight depth: 1.\\\\n\\\\tglyphForm _ Form extent: maxWidth @ fontHeight depth: 1.\\\\n\\\\t0 to: 255 do:[:i|\\\\n\\\\t\\\\tglyphForm fillWhite.\\\\n\\\\t\\\\tself primitiveFont: fontHandle glyphOfChar: i into: glyphForm.\\\\n\\\\t\\\\txStart _ xTable at: i+1.\\\\n\\\\t\\\\tglyphForm displayOn: glyphs at: xStart@0.\\\\n\\\\t\\\\tglyphForm displayOn: Display at: xStart@0.\\\\n\\\\t].\\\\n\\\\tself primitiveDestroyFont: fontHandle.\\\\n\\\\t^Array with: glyphs with: xTable! !\\\\n\\\\n!StrikeFont class methodsFor: 'font creation' stamp: 'rbb 2/18/2005 13:21'!\\\\nhostFontFromUser\\\\n\\\\t\\\\\\\"StrikeFont hostFontFromUser\\\\\\\"\\\\n\\\\t| fontNames index labels |\\\\n\\\\tfontNames _ self listFontNames asSortedCollection.\\\\n\\\\tlabels _ WriteStream on: (String new: 100).\\\\n\\\\tfontNames do:[:fn| labels nextPutAll: fn] separatedBy:[labels cr].\\\\n\\\\tindex _ (UIManager default chooseFrom: (labels contents substrings) \\\\n\\\\t\\\\t\\\\t\\\\ttitle: 'Choose your font').\\\\n\\\\tindex = 0 ifTrue:[^nil].\\\\n\\\\t^fontNames at: index! !\\\\n\\\\n!StrikeFont class methodsFor: 'font creation' stamp: 'ar 6/4/2000 21:12'!\\\\nlistFont: index\\\\n\\\\t<primitive:'primitiveListFont' module:'FontPlugin'>\\\\n\\\\t^nil! !\\\\n\\\\n!StrikeFont class methodsFor: 'font creation' stamp: 'ar 6/4/2000 21:12'!\\\\nlistFontNames\\\\n\\\\t\\\\\\\"StrikeFont listFontNames\\\\\\\"\\\\n\\\\t\\\\\\\"List all the OS font names\\\\\\\"\\\\n\\\\t| font fontNames index |\\\\n\\\\tfontNames _ WriteStream on: Array new.\\\\n\\\\tindex _ 0.\\\\n\\\\t[font _ self listFont: index.\\\\n\\\\tfont == nil] whileFalse:[\\\\n\\\\t\\\\tfontNames nextPut: font.\\\\n\\\\t\\\\tindex _ index + 1].\\\\n\\\\t^fontNames contents! !\\\\n\\\\n!StrikeFont class methodsFor: 'font creation' stamp: 'tak 8/3/2005 21:11'!\\\\nlocaleChanged\\\\n\\\\tself setupDefaultFallbackFont! !\\\\n\\\\n!StrikeFont class methodsFor: 'font creation' stamp: 'ar 6/4/2000 21:13'!\\\\nprimitiveCreateFont: fontName size: fontSize flags: fontFlags weight: fontWeight\\\\n\\\\t<primitive:'primitiveCreateFont' module:'FontPlugin'>\\\\n\\\\t^self primitiveFailed! !\\\\n\\\\n!StrikeFont class methodsFor: 'font creation' stamp: 'ar 6/4/2000 21:13'!\\\\nprimitiveDestroyFont: fontHandle\\\\n\\\\t<primitive:'primitiveDestroyFont' module:'FontPlugin'>\\\\n\\\\t^self primitiveFailed! !\\\\n\\\\n!StrikeFont class methodsFor: 'font creation' stamp: 'ar 6/4/2000 21:14'!\\\\nprimitiveFont: fontHandle glyphOfChar: charIndex into: glyphForm\\\\n\\\\t<primitive:'primitiveFontGlyphOfChar' module:'FontPlugin'>\\\\n\\\\t^self primitiveFailed! !\\\\n\\\\n!StrikeFont class methodsFor: 'font creation' stamp: 'ar 6/4/2000 21:15'!\\\\nprimitiveFont: fontHandle widthOfChar: charIndex\\\\n\\\\t<primitive:'primitiveFontWidthOfChar' module:'FontPlugin'>\\\\n\\\\t^self primitiveFailed! !\\\\n\\\\n!StrikeFont class methodsFor: 'font creation' stamp: 'ar 6/4/2000 22:25'!\\\\nprimitiveFontAscent: fontHandle\\\\n\\\\t<primitive:'primitiveFontAscent' module:'FontPlugin'>\\\\n\\\\t^self primitiveFailed! !\\\\n\\\\n!StrikeFont class methodsFor: 'font creation' stamp: 'ar 6/4/2000 22:25'!\\\\nprimitiveFontDescent: fontHandle\\\\n\\\\t<primitive:'primitiveFontDescent' module:'FontPlugin'>\\\\n\\\\t^self primitiveFailed! !\\\\n\\\\n!StrikeFont class methodsFor: 'font creation' stamp: 'ar 6/4/2000 21:14'!\\\\nprimitiveFontEncoding: fontHandle\\\\n\\\\t<primitive:'primitiveFontEncoding' module:'FontPlugin'>\\\\n\\\\t^self primitiveFailed! !\\\\n\\\\n\\\\n!StrikeFont class methodsFor: 'instance creation' stamp: 'ar 2/3/2002 23:06'!\\\\nfamilyName: aName pointSize: aSize emphasized: emphasisCode\\\\n\\\\t\\\\\\\"Create the font with this emphasis\\\\\\\"\\\\n\\\\n\\\\t^ (self familyName: aName pointSize: aSize) emphasized: emphasisCode! !\\\\n\\\\n!StrikeFont class methodsFor: 'instance creation' stamp: 'tk 1/28/1999 11:31'!\\\\nfamilyName: aName size: aSize emphasized: emphasisCode\\\\n\\\\t\\\\\\\"Create the font with this emphasis\\\\\\\"\\\\n\\\\n\\\\t^ (self familyName: aName size: aSize) emphasized: emphasisCode! !\\\\n\\\\n!StrikeFont class methodsFor: 'instance creation' stamp: 'yo 3/18/2004 00:10'!\\\\nfixAccuISO8859From: aStrikeFont\\\\n\\\\n\\\\t^aStrikeFont copy fixAccuISO8859From: aStrikeFont.\\\\n! !\\\\n\\\\n!StrikeFont class methodsFor: 'instance creation' stamp: 'yo 9/16/2002 15:55'!\\\\nfixForISO8859From: aStrikeFont\\\\n\\\\n\\\\t^aStrikeFont copy fixForISO8859From: aStrikeFont.\\\\n! !\\\\n\\\\n!StrikeFont class methodsFor: 'instance creation'!\\\\nfromStrike: fileName \\\\n\\\\t\\\\\\\"Read a font from disk in the old ST-80 'strike' format.\\\\n\\\\tNote: this is an old format; use strike2 format instead\\\\\\\"\\\\n\\\\n\\\\t^self new newFromStrike: fileName! !\\\\n\\\\n!StrikeFont class methodsFor: 'instance creation' stamp: 'ar 1/5/2002 21:41'!\\\\nfromUser\\\\n\\\\t\\\\\\\"StrikeFont fromUser\\\\\\\"\\\\n\\\\t^self fromUser: TextStyle defaultFont! !\\\\n\\\\n!StrikeFont class methodsFor: 'instance creation' stamp: 'nk 9/1/2004 14:29'!\\\\nfromUser: priorFont\\\\n\\\\t^self fromUser: priorFont allowKeyboard: true! !\\\\n\\\\n!StrikeFont class methodsFor: 'instance creation' stamp: 'nk 9/1/2004 14:28'!\\\\nfromUser: priorFont allowKeyboard: aBoolean\\\\n\\\\t\\\\\\\"rr 3/23/2004 10:02 : made the menu invoked modally, thus allowing\\\\n\\\\tkeyboard control\\\\\\\" \\\\n\\\\t\\\\\\\"StrikeFont fromUser\\\\\\\"\\\\n\\\\t\\\\\\\"Present a menu of available fonts, and if one is chosen, return it.\\\\n\\\\tOtherwise return nil.\\\\\\\"\\\\n\\\\n\\\\t| fontList fontMenu style active ptMenu label spec font |\\\\n\\\\tfontList _ StrikeFont actualFamilyNames.\\\\n\\\\tfontMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\tfontList do: [:fontName |\\\\n\\\\t\\\\tstyle _ TextStyle named: fontName.\\\\n\\\\t\\\\tactive _ priorFont familyName sameAs: fontName.\\\\n\\\\t\\\\tptMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\t\\\\tstyle pointSizes do: [:pt |\\\\n\\\\t\\\\t\\\\t(active and:[pt = priorFont pointSize]) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue:[label _ '<on>'] \\\\n\\\\t\\\\t\\\\t\\\\tifFalse:[label _ '<off>'].\\\\n\\\\t\\\\t\\\\tlabel _ label, pt printString, ' pt'.\\\\n\\\\t\\\\t\\\\tptMenu add: label \\\\n\\\\t\\\\t\\\\t\\\\ttarget: fontMenu\\\\n\\\\t\\\\t\\\\t\\\\tselector: #modalSelection:\\\\n\\\\t\\\\t\\\\t\\\\targument: {fontName. pt}].\\\\n\\\\t\\\\tstyle isTTCStyle ifTrue: [\\\\n\\\\t\\\\t\\\\tptMenu add: 'new size'\\\\n\\\\t\\\\t\\\\t\\\\ttarget: style selector: #addNewFontSizeDialog: argument: {fontName. fontMenu}.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tactive ifTrue:[label _ '<on>'] ifFalse:[label _ '<off>'].\\\\n\\\\t\\\\tlabel _ label, fontName.\\\\n\\\\t\\\\tfontMenu add: label subMenu: ptMenu].\\\\n\\\\tspec _ fontMenu invokeModalAt: ActiveHand position in: ActiveWorld allowKeyboard: aBoolean.\\\\n\\\\tspec ifNil: [^ nil].\\\\n\\\\tstyle _ TextStyle named: spec first.\\\\n\\\\tstyle ifNil: [^ self].\\\\n\\\\tfont _ style fonts detect: [:any | any pointSize = spec last] ifNone: [nil].\\\\n\\\\t^ font! !\\\\n\\\\n!StrikeFont class methodsFor: 'instance creation' stamp: 'yo 8/5/2003 13:11'!\\\\nnewForJapaneseFromEFontBDFFile: fileName name: aString overrideWith: otherFileName\\\\n\\\\n\\\\t| n |\\\\n\\\\tn _ self new.\\\\n\\\\tn readEFontBDFForJapaneseFromFile: fileName name: aString overrideWith: otherFileName.\\\\n\\\\t^ n.\\\\n! !\\\\n\\\\n!StrikeFont class methodsFor: 'instance creation' stamp: 'yo 1/15/2004 16:48'!\\\\nnewForKoreanFromEFontBDFFile: fileName name: aString overrideWith: otherFileName\\\\n\\\\n\\\\t| n |\\\\n\\\\tn _ self new.\\\\n\\\\tn readEFontBDFForKoreanFromFile: fileName name: aString overrideWith: otherFileName.\\\\n\\\\t^ n.\\\\n! !\\\\n\\\\n!StrikeFont class methodsFor: 'instance creation' stamp: 'nop 1/23/2000 19:21'!\\\\nnewFromBDFFile: aFileName name: aString  \\\\\\\"StrikeFont newFromBDFFile: 'helvR12.bdf' name: 'Helvetica12'\\\\\\\"\\\\n\\\\t\\\\\\\"Read a font from disk in the X11 Bitmap Distribution Format.\\\\\\\"\\\\n\\\\n\\\\t| n |\\\\n\\\\tn _ self new.\\\\n\\\\tn readBDFFromFile: aFileName name: aString.\\\\n\\\\t^n.\\\\n\\\\n\\\\t\\\\\\\"TextConstants at: #Helvetica put: (TextStyle fontArray: {StrikeFont newFromBDFFile: 'helvR12.bdf' name: 'Helvetica12'})\\\\\\\"\\\\n\\\\t\\\\\\\"TextConstants at: #Lucida put: (TextStyle fontArray: {StrikeFont newFromBDFFile: 'luRS12.bdf' name: 'Lucida'})\\\\\\\"\\\\n\\\\t\\\\\\\"TextStyle default fontAt: 5 put: (StrikeFont new readFromStrike2: 'helv12.sf2').\\\\\\\"\\\\n\\\\n! !\\\\n\\\\n!StrikeFont class methodsFor: 'instance creation' stamp: 'yo 1/19/2005 11:22'!\\\\nnewFromEFontBDFFile: fileName name: aString ranges: ranges\\\\n\\\\n\\\\t| n |\\\\n\\\\tn _ self new.\\\\n\\\\tn readEFontBDFFromFile: fileName name: aString ranges: ranges.\\\\n\\\\t^ n.\\\\n! !\\\\n\\\\n!StrikeFont class methodsFor: 'instance creation' stamp: 'yo 12/27/2002 16:57'!\\\\nnewFromEFontBDFFile: aFileName name: aString startRange: start endRange: end\\\\n\\\\n\\\\t| n |\\\\n\\\\tn _ self new.\\\\n\\\\tn readEFontBDFFromFile: aFileName name: aString rangeFrom: start to: end.\\\\n\\\\t^n.\\\\n\\\\n\\\\t\\\\\\\"TextConstants at: #Helvetica put: (TextStyle fontArray: {StrikeFont newFromBDFFile: 'helvR12.bdf' name: 'Helvetica12'})\\\\\\\"\\\\n\\\\t\\\\\\\"TextConstants at: #Lucida put: (TextStyle fontArray: {StrikeFont newFromBDFFile: 'luRS12.bdf' name: 'Lucida'})\\\\\\\"\\\\n\\\\t\\\\\\\"TextStyle default fontAt: 5 put: (StrikeFont new readFromStrike2: 'helv12.sf2').\\\\\\\"\\\\n\\\\n! !\\\\n\\\\n!StrikeFont class methodsFor: 'instance creation' stamp: 'yo 9/23/2002 16:28'!\\\\nnewFromF12File: aFileName\\\\n\\\\t\\\\\\\"StrikeFont newFromF12File: 'kaname.f12'\\\\\\\"\\\\n\\\\n\\\\t| file n |\\\\n\\\\t('*.F12' match: aFileName) ifFalse: [\\\\\\\"self halt. \\\\\\\" \\\\\\\"likely incompatible\\\\\\\"].\\\\n\\\\tfile _ FileStream readOnlyFileNamed: aFileName.\\\\n\\\\tfile binary.\\\\n\\\\tn _ self new.\\\\n\\\\tn name: (FileDirectory baseNameFor: (FileDirectory localNameFor: aFileName)).\\\\n\\\\tn readF12FromStream: file.\\\\n\\\\t^ n.\\\\n! !\\\\n\\\\n!StrikeFont class methodsFor: 'instance creation' stamp: 'tak 12/20/2004 10:23'!\\\\npasswordFontSize: aSize \\\\n\\\\t^ FixedFaceFont new passwordFont fontSize: aSize! !\\\\n\\\\n\\\\n!StrikeFont class methodsFor: '*nebraska-instance creation' stamp: 'yo 12/17/2005 22:41'!\\\\ndecodedFromRemoteCanvas: aString\\\\n\\\\n\\\\t| array style base |\\\\n\\\\tarray _ aString findTokens: #($ ).\\\\n\\\\tstyle _ TextStyle named: (array at: 1) asSymbol.\\\\n\\\\tstyle ifNil: [^ TextStyle defaultFont].\\\\n\\\\t(style fontArray first name = style fontArray first name withoutTrailingDigits) ifTrue: [\\\\n\\\\t\\\\t\\\\t^ self familyName: (array at: 1) size: (array at: 3) asNumber emphasized: (array at: 4) asNumber].\\\\n\\\\tbase _ style fontArray detect: [:f | (array at: 2) beginsWith: f name].\\\\n\\\\t^ base emphasized: (array at: 4) asNumber.\\\\n\\\\n\\\\t\\\\\\\"^ self familyName: (array at: 1) size: (array at: 2) asNumber emphasized: (array at: 3) asNumber.\\\\\\\"\\\\n! !\\\\nObject subclass: #StrikeFontFixer\\\\n\\\\tinstanceVariableNames: 'strikeFont charForms newFont'\\\\n\\\\tclassVariableNames: 'MappingTable NoFontTable'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Multilingual-Display'!\\\\n\\\\n!StrikeFontFixer methodsFor: 'as yet unclassified' stamp: 'yo 9/16/2002 15:03'!\\\\ncharacterFormAt: aCharacter at: aPoint\\\\n\\\\n\\\\t| f |\\\\n\\\\tf _ charForms at: aCharacter asciiValue + 1.\\\\n\\\\t(f magnifyBy: 3) displayAt: aPoint.\\\\n\\\\t^ f.\\\\n! !\\\\n\\\\n!StrikeFontFixer methodsFor: 'as yet unclassified' stamp: 'yo 9/16/2002 15:03'!\\\\ndisplayOn: aDisplayObject at: aPoint magnifyBy: aNumber\\\\n\\\\n\\\\t| form hStep vStep bb source nextPoint |\\\\n\\\\thStep _ (strikeFont maxWidth * aNumber * 1.2) asInteger.\\\\n\\\\tvStep _ (strikeFont height * aNumber *  1.2) asInteger.\\\\n\\\\t\\\\n\\\\tform _ Form extent: (hStep * 16)@(vStep * 16).\\\\n\\\\tbb _ BitBlt toForm: form.\\\\n\\\\t0 to: 15 do: [:i |\\\\n\\\\t\\\\t1 to: 16 do: [:j |\\\\n\\\\t\\\\t\\\\tsource _ ((charForms at: (i * 16 + j)) magnifyBy: aNumber).\\\\n\\\\t\\\\t\\\\tnextPoint _ (hStep * (j - 1)@(vStep * i)).\\\\n\\\\t\\\\t\\\\tbb copy: ((nextPoint+((hStep@vStep - source extent) // 2)) extent: source extent)\\\\n\\\\t\\\\t\\\\t\\\\tfrom: 0@0 in: source fillColor: Color black rule: Form over.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\tform displayOn: aDisplayObject at: aPoint.\\\\n! !\\\\n\\\\n!StrikeFontFixer methodsFor: 'as yet unclassified' stamp: 'yo 9/16/2002 15:03'!\\\\nfont: aStrikeFont\\\\n\\\\n\\\\tstrikeFont _ aStrikeFont.\\\\n\\\\tself forms.\\\\n! !\\\\n\\\\n!StrikeFontFixer methodsFor: 'as yet unclassified' stamp: 'yo 9/16/2002 15:04'!\\\\nforms\\\\n\\\\n\\\\t1 to: 256 do: [:i |\\\\n\\\\t\\\\tcharForms at: i put: (strikeFont characterFormAt: (Character value: (i - 1)))\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StrikeFontFixer methodsFor: 'as yet unclassified' stamp: 'yo 9/16/2002 15:04'!\\\\ninitialize\\\\n\\\\n\\\\tcharForms _ Array new: 256.\\\\n! !\\\\n\\\\n!StrikeFontFixer methodsFor: 'as yet unclassified' stamp: 'yo 9/16/2002 15:04'!\\\\nmappingTable\\\\n\\\\n\\\\t^ MappingTable.\\\\n! !\\\\n\\\\n!StrikeFontFixer methodsFor: 'as yet unclassified' stamp: 'yo 9/16/2002 15:04'!\\\\nstoreEditedGlyphsOn: aStream\\\\n\\\\n\\\\t| n |\\\\n\\\\tNoFontTable do: [:i |\\\\n\\\\t\\\\tn _ strikeFont name.\\\\n\\\\t\\\\t(n beginsWith: 'NewYork') ifTrue: [n _ 'NewYork'].\\\\n\\\\t\\\\taStream nextPutAll: '((StrikeFont familyName: ''', n, ''' size: ',\\\\n\\\\t\\\\t\\\\tstrikeFont height asString, ')'.\\\\n\\\\t\\\\taStream nextPutAll: ' characterFormAt: '.\\\\n\\\\t\\\\taStream nextPutAll: '(Character value: ', i asString, ')'.\\\\n\\\\t\\\\taStream nextPutAll: ' put: '.\\\\n\\\\t\\\\t(strikeFont characterFormAt: (Character value: i)) storeOn: aStream base: 2.\\\\n\\\\t\\\\taStream nextPutAll: ')!!'.\\\\n\\\\t\\\\taStream nextPut: Character cr.\\\\n\\\\t\\\\taStream nextPut: Character cr.\\\\n\\\\t].\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStrikeFontFixer class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StrikeFontFixer class methodsFor: 'as yet unclassified' stamp: 'yo 9/16/2002 15:06'!\\\\ninitialize\\\\n\\\\\\\"\\\\n\\\\tStrikeFontFixer initialize\\\\n\\\\\\\"\\\\n\\\\n\\\\t| d |\\\\n\\\\tself initializeNoFontTable.\\\\n\\\\td _ Array new: 256.\\\\n\\\\t0 to: 127 do: [:i | d at: i+1 put: i].\\\\n\\\\t16r80 to: 16r9F do: [:i | d at: i+1 put: nil].\\\\n\\\\td at: 16rA0+1 put: 16r20.\\\\n\\\\td at: 16rA1+1 put: 16rC1.\\\\n\\\\td at: 16rA2+1 put: 16rA2.\\\\n\\\\td at: 16rA3+1 put: 16rA3.\\\\n\\\\td at: 16rA4+1 put: 16rA9. \\\\\\\"CURRENCY SIGN\\\\\\\"\\\\n\\\\td at: 16rA5+1 put: 16rB4.\\\\n\\\\td at: 16rA6+1 put: 16r7C. \\\\\\\"BROKEN BAR\\\\\\\"\\\\n\\\\td at: 16rA7+1 put: 16rA4.\\\\n\\\\td at: 16rA8+1 put: 16r80. \\\\\\\"DIAERESIS\\\\\\\"\\\\n\\\\td at: 16rA9+1 put: 16rA9.\\\\n\\\\td at: 16rAA+1 put: 16rBB.\\\\n\\\\td at: 16rAB+1 put: 16rC7.\\\\n\\\\td at: 16rAC+1 put: 16rD1. \\\\\\\"NOT SIGN\\\\\\\"\\\\n\\\\td at: 16rAD+1 put: 16rD0.\\\\n\\\\td at: 16rAE+1 put: 16rA8.\\\\n\\\\td at: 16rAF+1 put: 16rD1. \\\\\\\"MACRON\\\\\\\"\\\\n\\\\td at: 16rB0+1 put: 16rA1.\\\\n\\\\td at: 16rB1+1 put: 16r2B. \\\\\\\"PLUS-MINUS SIGN\\\\\\\"\\\\n\\\\td at: 16rB2+1 put: 16rAB. \\\\\\\"SUPERSCRIPT TWO\\\\\\\"\\\\n\\\\td at: 16rB3+1 put: 16rAB. \\\\\\\"SUPERSCRIPT THREE\\\\\\\"\\\\n\\\\td at: 16rB4+1 put: 16rAB.\\\\n\\\\td at: 16rB5+1 put: 16r75. \\\\\\\"MICRO SIGN\\\\\\\"\\\\n\\\\td at: 16rB6+1 put: 16rA6.\\\\n\\\\td at: 16rB7+1 put: 16rA5.\\\\n\\\\td at: 16rB8+1 put: 16r82. \\\\\\\"CEDILLA\\\\\\\"\\\\n\\\\td at: 16rB9+1 put: 16rAB. \\\\\\\"SUPERSCRIPT ONE\\\\\\\"\\\\n\\\\td at: 16rBA+1 put: 16rBC.\\\\n\\\\td at: 16rBB+1 put: 16rC8.\\\\n\\\\td at: 16rBC+1 put: 16r4D. \\\\\\\"VULGAR FRACTION ONE QUARTER\\\\\\\"\\\\n\\\\td at: 16rBD+1 put: 16r4D. \\\\\\\"VULGAR FRACTIOIN ONE HALF\\\\\\\"\\\\n\\\\td at: 16rBE+1 put: 16r4D. \\\\\\\"VALGAR FRACTION THREE QUARTERS\\\\\\\"\\\\n\\\\td at: 16rBF+1 put: 16rC0.\\\\n\\\\td at: 16rC0+1 put: 16rCB.\\\\n\\\\td at: 16rC1+1 put: 16rCB. \\\\\\\"CAPITAL A WITH ACUTE\\\\\\\"\\\\n\\\\td at: 16rC2+1 put: 16rCB. \\\\\\\"CAPITAL A WITH CIRCUMFLEX\\\\\\\"\\\\n\\\\td at: 16rC3+1 put: 16rCC.\\\\n\\\\td at: 16rC4+1 put: 16r80.\\\\n\\\\td at: 16rC5+1 put: 16r81.\\\\n\\\\td at: 16rC6+1 put: 16rAE.\\\\n\\\\td at: 16rC7+1 put: 16r82.\\\\n\\\\td at: 16rC8+1 put: 16r83. \\\\\\\"CAPITAL E WITH GRAVE\\\\\\\"\\\\n\\\\td at: 16rC9+1 put: 16r83.\\\\n\\\\td at: 16rCA+1 put: 16r83. \\\\\\\"CAPITAL E WITH CIRCUMFLEX\\\\\\\"\\\\n\\\\td at: 16rCB+1 put: 16r83. \\\\\\\"CAPITAL E WITH DIAERESIS\\\\\\\"\\\\n\\\\td at: 16rCC+1 put: 16r49. \\\\\\\"CAPITAL I WITH GRAVE\\\\\\\"\\\\n\\\\td at: 16rCD+1 put: 16r49. \\\\\\\"CAPITAL I WITH ACUTE\\\\\\\"\\\\n\\\\td at: 16rCE+1 put: 16r49. \\\\\\\"CAPITAL I WITH CIRCUMFLEX\\\\\\\"\\\\n\\\\td at: 16rCF+1 put: 16r49. \\\\\\\"CAPITAL I WITH DIAERESIS\\\\\\\"\\\\n\\\\td at: 16rD0+1 put: 16r44. \\\\\\\"CAPITAL ETH\\\\\\\"\\\\n\\\\td at: 16rD1+1 put: 16r84.\\\\n\\\\td at: 16rD2+1 put: 16rCD. \\\\\\\"CAPITAL O WITH GRAVE\\\\\\\"\\\\n\\\\td at: 16rD3+1 put: 16rCD. \\\\\\\"CAPITAL O WITH ACUTE\\\\\\\"\\\\n\\\\td at: 16rD4+1 put: 16rCD. \\\\\\\"CAPITAL O WITH CIRCUMFLEX\\\\\\\"\\\\n\\\\td at: 16rD5+1 put: 16rCD.\\\\n\\\\td at: 16rD6+1 put: 16r85.\\\\n\\\\td at: 16rD7+1 put: 16r2B. \\\\\\\"MULTIPLICATION SIGN\\\\\\\"\\\\n\\\\td at: 16rD8+1 put: 16rBF.\\\\n\\\\td at: 16rD9+1 put: 16r86. \\\\\\\"CAPITAL U WITH GRAVE\\\\\\\"\\\\n\\\\td at: 16rDA+1 put: 16r86. \\\\\\\"CAPITAL U WITH ACUTE\\\\\\\"\\\\n\\\\td at: 16rDB+1 put: 16r86. \\\\\\\"CAPITAL U WITH CIRCUMFLEX\\\\\\\"\\\\n\\\\td at: 16rDC+1 put: 16r86. \\\\\\\"CAPTIAL U WITH DIAERESIS\\\\\\\"\\\\n\\\\td at: 16rDD+1 put: 16r59. \\\\\\\"CAPITAL Y WITH ACUTE\\\\\\\"\\\\n\\\\td at: 16rDE+1 put: 16r50. \\\\\\\"CAPITAL THORN\\\\\\\"\\\\n\\\\td at: 16rDF+1 put: 16rA7.\\\\n\\\\td at: 16rE0+1 put: 16r88.\\\\n\\\\td at: 16rE1+1 put: 16r87.\\\\n\\\\td at: 16rE2+1 put: 16r89.\\\\n\\\\td at: 16rE3+1 put: 16r8B.\\\\n\\\\td at: 16rE4+1 put: 16r8A.\\\\n\\\\td at: 16rE5+1 put: 16r8C.\\\\n\\\\td at: 16rE6+1 put: 16rBE.\\\\n\\\\td at: 16rE7+1 put: 16r8D.\\\\n\\\\td at: 16rE8+1 put: 16r8F.\\\\n\\\\td at: 16rE9+1 put: 16r8E.\\\\n\\\\td at: 16rEA+1 put: 16r90.\\\\n\\\\td at: 16rEB+1 put: 16r91.\\\\n\\\\td at: 16rEC+1 put: 16r93.\\\\n\\\\td at: 16rED+1 put: 16r92.\\\\n\\\\td at: 16rEE+1 put: 16r94.\\\\n\\\\td at: 16rEF+1 put: 16r95.\\\\n\\\\td at: 16rF0+1 put: 16r64. \\\\\\\"SMALL ETH\\\\\\\"\\\\n\\\\td at: 16rF1+1 put: 16r96.\\\\n\\\\td at: 16rF2+1 put: 16r98.\\\\n\\\\td at: 16rF3+1 put: 16r97.\\\\n\\\\td at: 16rF4+1 put: 16r99.\\\\n\\\\td at: 16rF5+1 put: 16r9B.\\\\n\\\\td at: 16rF6+1 put: 16r9A.\\\\n\\\\td at: 16rF7+1 put: 16r2D. \\\\\\\"DIVISION SIGN\\\\\\\"\\\\n\\\\td at: 16rF8+1 put: 16rBF.\\\\n\\\\td at: 16rF9+1 put: 16r9D.\\\\n\\\\td at: 16rFA+1 put: 16r9C.\\\\n\\\\td at: 16rFB+1 put: 16r9E.\\\\n\\\\td at: 16rFC+1 put: 16r9F.\\\\n\\\\td at: 16rFD+1 put: 16rD8. \\\\\\\"SMALL Y WITH ACUTE\\\\\\\"\\\\n\\\\td at: 16rFE+1 put: 16r70. \\\\\\\"SMALL THORN\\\\\\\"\\\\n\\\\td at: 16rFF+1 put: 16rD8.\\\\n\\\\n\\\\tMappingTable _ d.\\\\n! !\\\\n\\\\n!StrikeFontFixer class methodsFor: 'as yet unclassified' stamp: 'yo 9/16/2002 15:05'!\\\\ninitializeNoFontTable\\\\n\\\\n\\\\t| n |\\\\n\\\\tn _ #(\\\\n\\\\t16rA4 \\\\\\\"CURRENCY SIGN\\\\\\\"\\\\n\\\\t16rA6 \\\\\\\"BROKEN BAR\\\\\\\"\\\\n\\\\t16rA8 \\\\\\\"DIAERESIS\\\\\\\"\\\\n\\\\t16rAC \\\\\\\"NOT SIGN\\\\\\\"\\\\n\\\\t16rAF \\\\\\\"MACRON\\\\\\\"\\\\n\\\\t16rB1 \\\\\\\"PLUS-MINUS SIGN\\\\\\\"\\\\n\\\\t16rB2 \\\\\\\"SUPERSCRIPT TWO\\\\\\\"\\\\n\\\\t16rB3 \\\\\\\"SUPERSCRIPT THREE\\\\\\\"\\\\n\\\\t16rB5 \\\\\\\"MICRO SIGN\\\\\\\"\\\\n\\\\t16rB8 \\\\\\\"CEDILLA\\\\\\\"\\\\n\\\\t16rB9 \\\\\\\"SUPERSCRIPT ONE\\\\\\\"\\\\n\\\\t16rBC \\\\\\\"VULGAR FRACTION ONE QUARTER\\\\\\\"\\\\n\\\\t16rBD \\\\\\\"VULGAR FRACTIOIN ONE HALF\\\\\\\"\\\\n\\\\t16rBE \\\\\\\"VALGAR FRACTION THREE QUARTERS\\\\\\\"\\\\n\\\\t16rC1 \\\\\\\"CAPITAL A WITH ACUTE\\\\\\\"\\\\n\\\\t16rC2 \\\\\\\"CAPITAL A WITH CIRCUMFLEX\\\\\\\"\\\\n\\\\t16rC8 \\\\\\\"CAPITAL E WITH GRAVE\\\\\\\"\\\\n\\\\t16rCA \\\\\\\"CAPITAL E WITH CIRCUMFLEX\\\\\\\"\\\\n\\\\t16rCB \\\\\\\"CAPITAL E WITH DIAERESIS\\\\\\\"\\\\n\\\\t16rCC \\\\\\\"CAPITAL I WITH GRAVE\\\\\\\"\\\\n\\\\t16rCD \\\\\\\"CAPITAL I WITH ACUTE\\\\\\\"\\\\n\\\\t16rCE \\\\\\\"CAPITAL I WITH CIRCUMFLEX\\\\\\\"\\\\n\\\\t16rCF \\\\\\\"CAPITAL I WITH DIAERESIS\\\\\\\"\\\\n\\\\t16rD0 \\\\\\\"CAPITAL ETH\\\\\\\"\\\\n\\\\t16rD2 \\\\\\\"CAPITAL O WITH GRAVE\\\\\\\"\\\\n\\\\t16rD3 \\\\\\\"CAPITAL O WITH ACUTE\\\\\\\"\\\\n\\\\t16rD4 \\\\\\\"CAPITAL O WITH CIRCUMFLEX\\\\\\\"\\\\n\\\\t16rD7 \\\\\\\"MULTIPLICATION SIGN\\\\\\\"\\\\n\\\\t16rD9 \\\\\\\"CAPITAL U WITH GRAVE\\\\\\\"\\\\n\\\\t16rDA \\\\\\\"CAPITAL U WITH ACUTE\\\\\\\"\\\\n\\\\t16rDB \\\\\\\"CAPITAL U WITH CIRCUMFLEX\\\\\\\"\\\\n\\\\t16rDD \\\\\\\"CAPITAL Y WITH ACUTE\\\\\\\"\\\\n\\\\t16rDE \\\\\\\"CAPITAL THORN\\\\\\\"\\\\n\\\\t16rF0 \\\\\\\"SMALL ETH\\\\\\\"\\\\n\\\\t16rF7 \\\\\\\"DIVISION SIGN\\\\\\\"\\\\n\\\\t16rFD \\\\\\\"SMALL Y WITH ACUTE\\\\\\\"\\\\n\\\\t16rFE \\\\\\\"SMALL THORN\\\\\\\"\\\\n\\\\t).\\\\n\\\\tNoFontTable _ n.\\\\n\\\\n! !\\\\n\\\\n!StrikeFontFixer class methodsFor: 'as yet unclassified' stamp: 'nk 7/30/2004 18:09'!\\\\nnewOn: aStrikeFont \\\\n\\\\t^self new  font: aStrikeFont! !\\\\nAbstractFont subclass: #StrikeFontSet\\\\n\\\\tinstanceVariableNames: 'fontArray emphasis derivativeFonts name rIndex'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Multilingual-Display'!\\\\n\\\\n!StrikeFontSet methodsFor: 'accessing' stamp: 'ar 4/12/2005 17:14'!\\\\nascentOf: aCharacter\\\\n\\\\t^(self fontOf: aCharacter) ascent! !\\\\n\\\\n!StrikeFontSet methodsFor: 'accessing' stamp: 'ar 4/12/2005 17:15'!\\\\ndescentOf: aCharacter\\\\n\\\\t^(self fontOf: aCharacter) descent! !\\\\n\\\\n!StrikeFontSet methodsFor: 'accessing' stamp: 'yo 9/23/2002 20:08'!\\\\nfontArray\\\\n\\\\n\\\\t^ fontArray\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'accessing' stamp: 'ar 4/12/2005 17:14'!\\\\nfontOf: aCharacter\\\\n\\\\t\\\\\\\"Answer the actual font to use for aCharacter\\\\\\\"\\\\n\\\\t^self fontOf: aCharacter ifAbsent:[fontArray at: 1]! !\\\\n\\\\n!StrikeFontSet methodsFor: 'accessing' stamp: 'ar 4/12/2005 17:14'!\\\\nfontOf: aCharacter ifAbsent: aBlock\\\\n\\\\t\\\\\\\"Answer the actual font to use for aCharacter\\\\\\\"\\\\n\\\\t| encoding font |\\\\n\\\\tencoding := aCharacter leadingChar + 1.\\\\n\\\\tencoding <= fontArray size \\\\n\\\\t\\\\tifTrue:[font := fontArray at: encoding].\\\\n\\\\tfont ifNil:[^aBlock value].\\\\n\\\\t^font\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'accessing' stamp: 'ar 4/12/2005 17:15'!\\\\nheightOf: aCharacter\\\\n\\\\t^(self fontOf: aCharacter) height! !\\\\n\\\\n!StrikeFontSet methodsFor: 'accessing' stamp: 'tak 12/21/2004 16:43'!\\\\nlatin1\\\\n\\\\t\\\\\\\"Answer primary font\\\\\\\"\\\\n\\\\t^ fontArray at: 1! !\\\\n\\\\n!StrikeFontSet methodsFor: 'accessing' stamp: 'yo 11/15/2002 14:22'!\\\\nmaxAsciiFor: encoding\\\\n\\\\n\\\\t| f |\\\\n\\\\tf _ (fontArray at: encoding+1).\\\\n\\\\tf ifNotNil: [^ f maxAscii].\\\\n\\\\t^ 0.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'accessing' stamp: 'yo 8/5/2003 15:31'!\\\\ntextStyle\\\\n\\\\n\\\\t^ TextStyle actualTextStyles detect: [:aStyle | (aStyle fontArray collect: [:s | s name]) includes: self name]\\\\n\\\\t\\\\tifNone: [].\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'accessing' stamp: 'ar 4/12/2005 17:15'!\\\\nwidthOf: aCharacter \\\\n\\\\t\\\\\\\"Answer the width of the argument as a character in the receiver.\\\\\\\"\\\\n\\\\t^(self fontOf: aCharacter) widthOf: aCharacter! !\\\\n\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 16:43'!\\\\nascent\\\\n\\\\n\\\\t^ fontArray first ascent.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 16:49'!\\\\nascentKern\\\\n\\\\n\\\\t^ fontArray first ascentKern.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 16:49'!\\\\nbaseKern\\\\n\\\\n\\\\t^ fontArray first baseKern.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 12/1/2003 18:00'!\\\\nbonk: glyphForm with: bonkForm at: j\\\\n\\\\t\\\\\\\"Bonking means to run through the glyphs clearing out black pixels\\\\n\\\\tbetween characters to prevent them from straying into an adjacent\\\\n\\\\tcharacter as a result of, eg, bolding or italicizing\\\\\\\"\\\\n\\\\t\\\\\\\"Uses the bonkForm to erase at every character boundary in glyphs.\\\\\\\"\\\\n\\\\n\\\\t| bb offset font x |\\\\n\\\\tfont _ (fontArray at: j).\\\\n\\\\toffset _ bonkForm offset x.\\\\n\\\\tbb _ BitBlt toForm: glyphForm.\\\\n\\\\tbb sourceForm: bonkForm; sourceRect: bonkForm boundingBox;\\\\n\\\\t\\\\tcombinationRule: Form erase; destY: 0.\\\\n\\\\tx _ font xTable.\\\\n\\\\t(x isMemberOf: SparseLargeTable) ifTrue: [\\\\n\\\\t\\\\tx base to: x size-1 do: [:i | bb destX: (x at: i) + offset; copyBits].\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\t1 to: x size-1 do: [:i | bb destX: (x at: i) + offset; copyBits].\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:15'!\\\\ncopy\\\\n\\\\n\\\\t| s a |\\\\n\\\\ts _ self class new.\\\\n\\\\ts name: self name.\\\\n\\\\ts emphasis: self emphasis.\\\\n\\\\ts reset.\\\\n\\\\ta _ Array new: fontArray size.\\\\n\\\\t1 to: a size do: [:i |\\\\n\\\\t\\\\ta at: i put: (fontArray at: i) copy.\\\\n\\\\t].\\\\n\\\\ts fontArray: a.\\\\n\\\\t^ s.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'nk 9/1/2004 12:06'!\\\\nderivativeFonts\\\\n\\\\t^derivativeFonts copyWithout: nil! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:02'!\\\\ndescent\\\\n\\\\n\\\\t^ fontArray first descent.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:02'!\\\\ndescentKern\\\\n\\\\n\\\\t^ fontArray first descentKern.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 5/19/2004 11:36'!\\\\ndisplayLine: aString at: aPoint \\\\n\\\\t\\\\\\\"Display the characters in aString, starting at position aPoint.\\\\\\\"\\\\n\\\\n\\\\tself characters: (1 to: aString size)\\\\n\\\\t\\\\tin: aString\\\\n\\\\t\\\\tdisplayAt: aPoint\\\\n\\\\t\\\\tclippedBy: Display boundingBox\\\\n\\\\t\\\\trule: Form over\\\\n\\\\t\\\\tfillColor: nil\\\\n\\\\t\\\\tkernDelta: 0\\\\n\\\\t\\\\ton: (BitBlt current toForm: Display).\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:06'!\\\\nemphasis\\\\n\\\\t\\\\\\\"Answer the integer code for synthetic bold, italic, underline, and \\\\n\\\\tstrike-out.\\\\\\\"\\\\n\\\\n\\\\t^ emphasis.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:07'!\\\\nemphasis: code \\\\n\\\\t\\\\\\\"Set the integer code for synthetic bold, itallic, underline, and strike-out, \\\\n\\\\twhere bold=1, italic=2, underlined=4, and struck out=8.\\\\\\\"\\\\n\\\\n\\\\temphasis _ code.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:15'!\\\\nemphasized: code \\\\n\\\\n\\\\t\\\\\\\"Answer a copy of the receiver with emphasis set to include code.\\\\\\\"\\\\n\\\\t| derivative addedEmphasis base safeCode |\\\\n\\\\tcode = 0 ifTrue: [^ self].\\\\n\\\\t(derivativeFonts == nil or: [derivativeFonts size = 0]) ifTrue: [^ self].\\\\n\\\\tderivative _ derivativeFonts at: (safeCode _ code min: derivativeFonts size).\\\\n\\\\tderivative == nil ifFalse: [^ derivative].  \\\\\\\"Already have this style\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Dont have it -- derive from another with one with less emphasis\\\\\\\"\\\\n\\\\taddedEmphasis _ 1 bitShift: safeCode highBit - 1.\\\\n\\\\tbase _ self emphasized: safeCode - addedEmphasis.  \\\\\\\"Order is Bold, Ital, Under, Narrow\\\\\\\"\\\\n\\\\taddedEmphasis = 1 ifTrue:   \\\\\\\"Compute synthetic bold version of the font\\\\\\\"\\\\n\\\\t\\\\t[derivative _ (base copy name: base name , 'B') makeBoldGlyphs].\\\\n\\\\taddedEmphasis = 2 ifTrue:   \\\\\\\"Compute synthetic italic version of the font\\\\\\\"\\\\n\\\\t\\\\t[ derivative _ (base copy name: base name , 'I') makeItalicGlyphs].\\\\n\\\\taddedEmphasis = 4 ifTrue:   \\\\\\\"Compute underlined version of the font\\\\\\\"\\\\n\\\\t\\\\t[derivative _ (base copy name: base name , 'U') makeUnderlinedGlyphs].\\\\n\\\\taddedEmphasis = 8 ifTrue:   \\\\\\\"Compute narrow version of the font\\\\\\\"\\\\n\\\\t\\\\t[derivative _ (base copy name: base name , 'N') makeCondensedGlyphs].\\\\n\\\\taddedEmphasis = 16 ifTrue:   \\\\\\\"Compute struck-out version of the font\\\\\\\"\\\\n\\\\t\\\\t[derivative _ (base copy name: base name , 'X') makeStruckOutGlyphs].\\\\n\\\\tderivative emphasis: safeCode.\\\\n\\\\tderivativeFonts at: safeCode put: derivative.\\\\n\\\\t^ derivative\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 8/18/2003 20:59'!\\\\nfamilyName\\\\n\\\\n\\\\t^ fontArray first familyName.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:38'!\\\\nfamilySizeFace\\\\n\\\\n\\\\t^ Array\\\\n\\\\t\\\\twith: fontArray first name\\\\n\\\\t\\\\twith: self height\\\\n\\\\t\\\\twith: fontArray first emphasis\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:49'!\\\\nfontArray: anArray\\\\n\\\\n\\\\tfontArray _ anArray.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:49'!\\\\nfontNameWithPointSize\\\\n\\\\n\\\\t^ fontArray first fontNameWithPointSize.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:50'!\\\\nglyphs\\\\n\\\\n\\\\t^ fontArray first glyphs\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:50'!\\\\nglyphsEncoding: anInteger\\\\n\\\\n\\\\t^ (fontArray at: (anInteger+1)) glyphs.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:50'!\\\\nheight\\\\n\\\\n\\\\t^ fontArray first height.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'tak 12/16/2004 19:15'!\\\\ninitializeWithFontArray: anArray \\\\n\\\\t\\\\\\\"Initialize with given font array, the ascent of primary font is modified \\\\n\\\\tif another font has higher size\\\\\\\"\\\\n\\\\t| primaryFont maxHeight newFont |\\\\n\\\\tfontArray := anArray.\\\\n\\\\tprimaryFont := anArray first.\\\\n\\\\temphasis := 0.\\\\n\\\\tname := primaryFont name.\\\\n\\\\tmaxHeight := anArray\\\\n\\\\t\\\\t\\\\t\\\\tinject: 0\\\\n\\\\t\\\\t\\\\t\\\\tinto: [:theHeight :font | (font notNil\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tand: [theHeight < font height])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [font height]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [theHeight]].\\\\n\\\\tprimaryFont height < maxHeight\\\\n\\\\t\\\\tifTrue: [newFont := primaryFont copy\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfixAscent: primaryFont ascent + (maxHeight - primaryFont height)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tandDescent: primaryFont descent\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\thead: 0.\\\\n\\\\t\\\\t\\\\tfontArray at: 1 put: newFont].\\\\n\\\\tself reset! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 1/5/2005 13:59'!\\\\ninstallOn: aDisplayContext\\\\n\\\\n\\\\t^ aDisplayContext installStrikeFont: self.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:50'!\\\\ninstallOn: aDisplayContext foregroundColor: foregroundColor backgroundColor: backgroundColor \\\\n\\\\n\\\\t^ aDisplayContext\\\\n\\\\t\\\\tinstallStrikeFont: self\\\\n\\\\t\\\\tforegroundColor: foregroundColor\\\\n\\\\t\\\\tbackgroundColor: backgroundColor.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:50'!\\\\nlineGrid\\\\n\\\\n\\\\t| f |\\\\n\\\\tf _ fontArray first.\\\\n\\\\t^ f ascent + f descent.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:52'!\\\\nmaxEncoding\\\\n\\\\n\\\\t^ fontArray size.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 2/24/2005 15:45'!\\\\nmaxWidth\\\\n\\\\n\\\\t^ (fontArray at: 1) maxWidth.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:52'!\\\\nname\\\\n\\\\n\\\\t^ name\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:52'!\\\\nname: aString\\\\n\\\\n\\\\tname _ aString\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 8/18/2003 21:17'!\\\\nobjectForDataStream: refStrm\\\\n\\\\t| dp |\\\\n\\\\t\\\\\\\"I am about to be written on an object file.  Write a reference to a known Font in the other system instead.  \\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"A path to me\\\\\\\"\\\\n\\\\t(TextConstants at: #forceFontWriting ifAbsent: [false]) ifTrue: [^ self].\\\\n\\\\t\\\\t\\\\\\\"special case for saving the default fonts on the disk.  See collectionFromFileNamed:\\\\\\\"\\\\n\\\\n\\\\tdp _ DiskProxy global: #StrikeFontSet selector: #familyName:size:emphasized:\\\\n\\\\t\\\\t\\\\targs: (Array with: self familyName with: self pointSize\\\\n\\\\t\\\\t\\\\t\\\\t\\\\twith: self emphasis).\\\\n\\\\trefStrm replace: self with: dp.\\\\n\\\\t^ dp.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:53'!\\\\npointSize\\\\n\\\\n\\\\t^ fontArray first pointSize.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:53'!\\\\nprintOn: aStream\\\\n\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream nextPutAll: '(' , self name.\\\\n\\\\taStream space.\\\\n\\\\tself height printOn: aStream.\\\\n\\\\taStream nextPut: $).\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:53'!\\\\nreset\\\\n\\\\t\\\\\\\"Reset the cache of derivative emphasized fonts\\\\\\\"\\\\n\\\\n\\\\tderivativeFonts _ Array new: 32.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:53'!\\\\nsubscript\\\\n\\\\n\\\\t^ fontArray first subscript\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:53'!\\\\nsuperscript\\\\n\\\\n\\\\t^ fontArray first superscript\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'ar 4/10/2005 18:53'!\\\\nwidthOfString: aString\\\\n\\\\n\\\\taString ifNil:[^0].\\\\n\\\\t\\\\\\\"Optimizing\\\\\\\"\\\\n\\\\t(aString isByteString) ifTrue: [\\\\n\\\\t\\\\t^ self fontArray first widthOfString: aString from: 1 to: aString size].\\\\n\\\\t^ self widthOfString: aString from: 1 to: aString size.\\\\n\\\\\\\"\\\\n\\\\tTextStyle default defaultFont widthOfString: 'zort' 21\\\\n\\\\\\\"\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'tak 1/11/2005 17:59'!\\\\nwidthOfString: aString from: startIndex to: stopIndex\\\\n\\\\t\\\\\\\"Measure the length of the given string between start and stop index\\\\\\\"\\\\n\\\\n\\\\t| resultX |\\\\n\\\\tresultX _ 0.\\\\n\\\\tstartIndex to: stopIndex do:[:i | \\\\n\\\\t\\\\tresultX _ resultX + (self widthOf: (aString at: i))].\\\\n\\\\t^ resultX.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:56'!\\\\nxTable\\\\n\\\\t\\\\\\\"Answer an Array of the left x-coordinate of characters in glyphs.\\\\\\\"\\\\n\\\\n\\\\t^ fontArray first xTable.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:56'!\\\\nxTableEncoding: anInteger\\\\n\\\\t\\\\\\\"Answer an Array of the left x-coordinate of characters in glyphs.\\\\\\\"\\\\n\\\\n\\\\t^(fontArray at: anInteger + 1) xTable.\\\\n! !\\\\n\\\\n\\\\n!StrikeFontSet methodsFor: 'character shapes' stamp: 'yo 12/27/2002 04:35'!\\\\ncharacterFormAt: character \\\\n\\\\n\\\\t| encoding ascii xTable leftX rightX |\\\\n\\\\tencoding _ character leadingChar + 1.\\\\n\\\\tascii _ character charCode.\\\\n\\\\t(ascii < (fontArray at: encoding) minAscii or: [ascii > (fontArray at: encoding) maxAscii])\\\\n\\\\t\\\\tifTrue: [ascii _ (fontArray at: encoding) maxAscii].\\\\n\\\\txTable _ (fontArray at: encoding) xTable.\\\\n\\\\tleftX _ xTable at: ascii + 1.\\\\n\\\\trightX _ xTable at: ascii + 2.\\\\n\\\\t^ (fontArray at: encoding) glyphs copy: (leftX @ 0 corner: rightX @ self height).\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'character shapes' stamp: 'yo 12/27/2002 04:35'!\\\\ncharacterFormAt: character put: characterForm \\\\n\\\\n\\\\t| ascii leftX rightX widthDif newGlyphs encoding xTable glyphs |\\\\n\\\\tencoding _ character leadingChar + 1.\\\\n\\\\tascii _ character charCode.\\\\n\\\\tascii < (fontArray at: encoding) minAscii ifTrue: [\\\\n\\\\t\\\\t^ self error: 'Cant store characters below min ascii'\\\\n\\\\t].\\\\n\\\\tascii > (fontArray at: encoding) maxAscii ifTrue: [\\\\n\\\\t\\\\t^ self error: 'No change made'\\\\n\\\\t].\\\\n\\\\txTable _ (fontArray at: encoding) xTable.\\\\n\\\\tleftX _ xTable at: ascii + 1.\\\\n\\\\trightX _ xTable at: ascii + 2.\\\\n\\\\tglyphs _ (fontArray at: encoding) glyphs.\\\\n\\\\twidthDif _ characterForm width - (rightX - leftX).\\\\n\\\\twidthDif ~= 0 ifTrue: [\\\\n\\\\t\\\\tnewGlyphs _ Form extent: glyphs width + widthDif @ glyphs height.\\\\n\\\\t\\\\tnewGlyphs copy: (0 @ 0 corner: leftX @ glyphs height) from: 0 @ 0\\\\n\\\\t\\\\t\\\\tin: glyphs rule: Form over.\\\\n\\\\t\\\\tnewGlyphs\\\\n\\\\t\\\\t\\\\t\\\\tcopy: (rightX + widthDif @ 0 corner: newGlyphs width @ glyphs height)\\\\n\\\\t\\\\t\\\\t\\\\tfrom: rightX @ 0 in: glyphs rule: Form over.\\\\n\\\\t\\\\tglyphs _ newGlyphs.\\\\n\\\\t\\\\t\\\\\\\"adjust further entries on xTable\\\\\\\"\\\\n\\\\t\\\\txTable _ xTable copy.\\\\n\\\\t\\\\tascii + 2 to: xTable size do: [:i |\\\\n\\\\t\\\\t\\\\txTable at: i put: (xTable at: i) + widthDif]].\\\\n\\\\tglyphs copy: (leftX @ 0 extent: characterForm extent) from: 0 @ 0 in: characterForm rule: Form over.\\\\n! !\\\\n\\\\n\\\\n!StrikeFontSet methodsFor: 'displaying' stamp: 'yo 5/19/2004 11:35'!\\\\ncharacters: anInterval in: sourceString displayAt: aPoint clippedBy: clippingRectangle rule: ruleInteger fillColor: aForm kernDelta: kernDelta on: aBitBlt\\\\n\\\\t\\\\\\\"Simple, slow, primitive method for displaying a line of characters.\\\\n\\\\tNo wrap-around is provided.\\\\\\\"\\\\n\\\\n\\\\t| ascii encoding destPoint leftX rightX sourceRect xTable noFont f |\\\\n\\\\tdestPoint _ aPoint.\\\\n\\\\tanInterval do: \\\\n\\\\t\\\\t[:i |\\\\n\\\\t\\\\tencoding _ (sourceString at: i) leadingChar + 1.\\\\n\\\\t\\\\tnoFont _ false.\\\\n\\\\t\\\\t[f _ fontArray at: encoding]\\\\n\\\\t\\\\t\\\\ton: Exception do: [:ex | noFont _ true. f _ fontArray at: 1].\\\\n\\\\t\\\\tf ifNil: [noFont _ true. f _ fontArray at: 1].\\\\n\\\\t\\\\tascii _ noFont ifTrue: [$?] ifFalse: [(sourceString at: i) charCode].\\\\n\\\\t\\\\t(ascii < f minAscii\\\\n\\\\t\\\\t\\\\tor: [ascii > f maxAscii])\\\\n\\\\t\\\\t\\\\tifTrue: [ascii _ f maxAscii].\\\\n\\\\t\\\\txTable _ f xTable.\\\\n\\\\t\\\\tleftX _ xTable at: ascii + 1.\\\\n\\\\t\\\\trightX _ xTable at: ascii + 2.\\\\n\\\\t\\\\tsourceRect _ leftX@0 extent: (rightX-leftX) @ self height.\\\\n\\\\t\\\\taBitBlt copyFrom: sourceRect in: f glyphs to: destPoint.\\\\n\\\\t\\\\tdestPoint _ destPoint + ((rightX-leftX+kernDelta)@0).\\\\n\\\\t\\\\t\\\\\\\"destPoint printString displayAt: 0@(i*20).\\\\\\\"\\\\n\\\\t].\\\\n\\\\t^ destPoint.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'displaying' stamp: 'efc 8/6/2005 11:45'!\\\\ndisplayMultiString: aString on: aBitBlt from: startIndex to: stopIndex at: aPoint kern: kernDelta baselineY: baselineY\\\\n\\\\n\\\\t| destPoint leftX rightX glyphInfo g destY |\\\\n\\\\tdestPoint := aPoint.\\\\n\\\\tglyphInfo := Array new: 5.\\\\n\\\\tstartIndex to: stopIndex do: [:charIndex |\\\\n\\\\t\\\\tself glyphInfoOf: (aString at: charIndex) into: glyphInfo.\\\\n\\\\t\\\\tg := glyphInfo at:1.\\\\n\\\\t\\\\tleftX := glyphInfo at:2.\\\\n\\\\t\\\\trightX := glyphInfo at:3.\\\\n\\\\t\\\\t((glyphInfo at:5) ~= aBitBlt lastFont) ifTrue: [\\\\n\\\\t\\\\t\\\\t(glyphInfo at:5) installOn: aBitBlt.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\taBitBlt sourceForm: g.\\\\n\\\\t\\\\tdestY := baselineY - (glyphInfo at:4).\\\\n\\\\t\\\\taBitBlt destX: (destPoint x) destY: destY width: (rightX - leftX) height: (self height).\\\\n\\\\t\\\\taBitBlt sourceOrigin: leftX @ 0.\\\\n\\\\t\\\\taBitBlt copyBits.\\\\n\\\\t\\\\tdestPoint := destPoint + (rightX - leftX + kernDelta @ 0).\\\\n\\\\t].\\\\n\\\\t^ destPoint.! !\\\\n\\\\n!StrikeFontSet methodsFor: 'displaying' stamp: 'yo 12/27/2002 04:35'!\\\\ndisplayStringR2L: aString on: aBitBlt from: startIndex to: stopIndex at: aPoint kern: kernDelta \\\\n\\\\n\\\\t| destPoint font |\\\\n\\\\tdestPoint _ aPoint.\\\\n\\\\tstartIndex to: stopIndex do: [:charIndex | \\\\n\\\\t\\\\t| encoding ascii xTable leftX rightX | \\\\n\\\\t\\\\tencoding _ (aString at: charIndex) leadingChar + 1.\\\\n\\\\t\\\\tascii _ (aString at: charIndex) charCode.\\\\n\\\\t\\\\tfont _ fontArray at: encoding.\\\\n\\\\t\\\\t((ascii between: font minAscii and: font maxAscii) not) ifTrue: [\\\\n\\\\t\\\\t\\\\tascii _ font maxAscii].\\\\n\\\\t\\\\txTable _ font xTable.\\\\n\\\\t\\\\tleftX _ xTable at: ascii + 1.\\\\n\\\\t\\\\trightX _ xTable at: ascii + 2.\\\\n\\\\t\\\\taBitBlt sourceForm: font glyphs.\\\\n\\\\t\\\\taBitBlt destX: destPoint x - (rightX - leftX).\\\\n\\\\t\\\\taBitBlt destY: destPoint y.\\\\n\\\\t\\\\taBitBlt sourceOrigin: leftX @ 0.\\\\n\\\\t\\\\taBitBlt width: rightX - leftX.\\\\n\\\\t\\\\taBitBlt height: self height.\\\\n\\\\t\\\\taBitBlt copyBits.\\\\n\\\\t\\\\tdestPoint _ destPoint - (rightX - leftX + kernDelta @ 0).\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'displaying' stamp: 'yo 1/7/2005 12:04'!\\\\ndisplayString: aString on: aBitBlt from: startIndex to: stopIndex at: aPoint kern: kernDelta \\\\n\\\\n\\\\t^ self displayString: aString on: aBitBlt from: startIndex to: stopIndex at: aPoint kern: kernDelta baselineY: aPoint y + self ascent.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'displaying' stamp: 'efc 8/6/2005 13:35'!\\\\ndisplayString: aString on: aBitBlt from: startIndex to: stopIndex at: aPoint kern: kernDelta baselineY: baselineY\\\\n\\\\t\\\\\\\"Draw the given string from startIndex to stopIndex \\\\n\\\\tat aPoint on the (already prepared) BitBlt.\\\\\\\"\\\\n\\\\t\\\\n\\\\t\\\\\\\"Assume this is a wide string\\\\\\\"\\\\n\\\\t| isMulti |\\\\n\\\\tisMulti _ true.\\\\n\\\\n\\\\t\\\\\\\"Look for an excuse to use the fast primitive\\\\\\\"\\\\n \\\\t(aString isKindOf: ByteString) \\\\n\\\\t\\\\tifTrue:[ isMulti _ false]\\\\n\\\\t\\\\tifFalse:[ (aString isKindOf: Text) \\\\n\\\\t\\\\t\\\\tifTrue:[ (aString string isKindOf: ByteString) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue:[ isMulti _ false ] \\\\n\\\\t]].\\\\n\\\\n\\\\tisMulti ifTrue:[^ self displayMultiString: aString on: aBitBlt from: startIndex to: stopIndex at: aPoint kern: kernDelta baselineY: baselineY].\\\\n\\\\n\\\\t^ aBitBlt displayString: aString \\\\n\\\\t\\\\t\\\\tfrom: startIndex \\\\n\\\\t\\\\t\\\\tto: stopIndex \\\\n\\\\t\\\\t\\\\tat: aPoint \\\\n\\\\t\\\\t\\\\tstrikeFont: self\\\\n\\\\t\\\\t\\\\tkern: kernDelta! !\\\\n\\\\n!StrikeFontSet methodsFor: 'displaying' stamp: 'yo 1/7/2005 15:17'!\\\\ndisplayString: aString on: aBitBlt from: startIndex to: stopIndex at: aPoint kern: kernDelta from: fromFont baselineY: baselineY\\\\n\\\\n\\\\t| destPoint leftX rightX glyphInfo g tag char destY |\\\\n\\\\tdestPoint _ aPoint.\\\\n\\\\trIndex _ startIndex.\\\\n\\\\ttag _ (aString at: rIndex) leadingChar.\\\\n\\\\tglyphInfo _ Array new: 5.\\\\n\\\\t[rIndex <= stopIndex] whileTrue: [\\\\n\\\\t\\\\tchar _ aString at: rIndex.\\\\n\\\\t\\\\t((fromFont hasGlyphOf: char) or: [char leadingChar ~= tag]) ifTrue: [^ Array with: rIndex with: destPoint].\\\\n\\\\t\\\\tself glyphInfoOf: char into: glyphInfo.\\\\n\\\\t\\\\tg _ glyphInfo first.\\\\n\\\\t\\\\tleftX _ glyphInfo second.\\\\n\\\\t\\\\trightX _ glyphInfo third.\\\\n\\\\t\\\\t(glyphInfo fifth ~= aBitBlt lastFont) ifTrue: [\\\\n\\\\t\\\\t\\\\tglyphInfo fifth installOn: aBitBlt.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\taBitBlt sourceForm: g.\\\\n\\\\t\\\\tdestY _ baselineY - glyphInfo fourth. \\\\n\\\\t\\\\taBitBlt destX: destPoint x.\\\\n\\\\t\\\\taBitBlt destY: destY.\\\\n\\\\t\\\\taBitBlt sourceOrigin: leftX @ 0.\\\\n\\\\t\\\\taBitBlt width: rightX - leftX.\\\\n\\\\t\\\\taBitBlt height: self height.\\\\n\\\\t\\\\taBitBlt copyBits.\\\\n\\\\t\\\\tdestPoint _ destPoint + (rightX - leftX + kernDelta @ 0).\\\\n\\\\t\\\\trIndex _ rIndex + 1.\\\\n\\\\t].\\\\n\\\\t^ Array with: rIndex with: destPoint.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'displaying' stamp: 'BG 3/16/2005 08:27'!\\\\nfontDisplay\\\\n\\\\t\\\\\\\"TextStyle default defaultFont fontDisplay.\\\\\\\"\\\\n\\\\n\\\\tDisplay restoreAfter:\\\\n\\\\t\\\\t[(Form extent: 440@400) displayAt: 90@90.\\\\n\\\\t\\\\t 0 to: 15 do:\\\\n\\\\t\\\\t\\\\t[:i |\\\\n\\\\t\\\\t\\\\ti storeStringHex displayAt: 100 @ (20 * i + 100).\\\\n\\\\t\\\\t\\\\t0 to: 15 do:\\\\n\\\\t\\\\t\\\\t\\\\t[:j |\\\\n\\\\t\\\\t\\\\t\\\\t((16*i+j) between: 1 and: (self xTable size - 2)) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[(self characterFormAt: (16 * i + j) asCharacter)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdisplayAt: (20 * j + 150) @ (20 * i + 100)]]].\\\\n\\\\t\\\\t\\\\t'Click to continue...' asDisplayText displayAt: 100@450]! !\\\\n\\\\n\\\\n!StrikeFontSet methodsFor: 'emphasis' stamp: 'yo 12/27/2002 13:52'!\\\\nmakeBoldGlyphs\\\\n\\\\t\\\\\\\"Make a bold set of glyphs with same widths by ORing 1 bit to the right\\\\n\\\\t\\\\t(requires at least 1 pixel of intercharacter space)\\\\\\\"\\\\n\\\\n\\\\t| g bonkForm font |\\\\n\\\\t1 to: fontArray size do: [:i |\\\\n\\\\t\\\\tfont _ fontArray at: i.\\\\n\\\\t\\\\tfont ifNotNil: [\\\\n\\\\t\\\\t\\\\tg _ font glyphs deepCopy.\\\\n\\\\t\\\\t\\\\tbonkForm _ (Form extent: 1@16) fillBlack offset: -1@0.\\\\n\\\\t\\\\t\\\\tself bonk: g with: bonkForm at: i.\\\\n\\\\t\\\\t\\\\tg copyBits: g boundingBox from: g at: (1@0)\\\\n\\\\t\\\\t\\\\t\\\\tclippingBox: g boundingBox rule: Form under fillColor: nil.\\\\n\\\\t\\\\t\\\\t(fontArray at: i) setGlyphs: g.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'emphasis' stamp: 'yo 12/27/2002 13:51'!\\\\nmakeItalicGlyphs\\\\n\\\\t\\\\\\\"Make an italic set of glyphs with same widths by skewing left and right\\\\n\\\\t\\\\t(may require more intercharacter space)\\\\\\\"\\\\n\\\\n\\\\t| g bonkForm bc font |\\\\n\\\\t1 to: fontArray size do: [:j |\\\\n\\\\t\\\\tfont _ (fontArray at: j).\\\\n\\\\t\\\\tfont ifNotNil: [\\\\n\\\\t\\\\t\\\\tg _ font glyphs deepCopy.\\\\n\\\\t\\\\t\\\\t\\\\\\\"BonkForm will have bits where slanted characters overlap their neighbors.\\\\\\\"\\\\n\\\\t\\\\t\\\\tbonkForm _ Form extent: (self height//4+2) @ self height.\\\\n\\\\t\\\\t\\\\tbc _ font descent//4 + 1.  \\\\\\\"Bonker x-coord corresponding to char boundary.\\\\\\\"\\\\n\\\\t\\\\t\\\\tbonkForm fill: (0 @ 0 corner: (bc+1) @ font ascent) fillColor: Color black.\\\\n\\\\t\\\\t\\\\t4 to: font ascent-1 by: 4 do:\\\\n\\\\t\\\\t\\\\t\\\\t[:y | \\\\t\\\\t\\\\\\\"Slide ascenders right...\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tg copy: (1@0 extent: g width @ (font ascent - y))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tfrom: 0@0 in: g rule: Form over.\\\\n\\\\t\\\\t\\\\t\\\\tbonkForm copy: (1@0 extent: bonkForm width @ (font ascent - y))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tfrom: 0@0 in: bonkForm rule: Form over].\\\\n\\\\t\\\\t\\\\tbonkForm fill: (0 @ 0 corner: (bc+1) @ font ascent) fillColor: Color white.\\\\n\\\\t\\\\t\\\\tbonkForm fill: (bc @ font ascent corner: bonkForm extent) fillColor: Color black.\\\\n\\\\t\\\\t\\\\tfont ascent to: font height-1 by: 4 do:\\\\n\\\\t\\\\t\\\\t\\\\t[:y | \\\\t\\\\t\\\\\\\"Slide descenders left...\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tg copy: (0@y extent: g width @ g height)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tfrom: 1@y in: g rule: Form over.\\\\n\\\\t\\\\t\\\\t\\\\tbonkForm copy: (0@0 extent: bonkForm width @ bonkForm height)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tfrom: 1@0 in: bonkForm rule: Form over].\\\\n\\\\t\\\\t\\\\tbonkForm fill: (bc @ font ascent corner: bonkForm extent) fillColor: Color white.\\\\n\\\\t\\\\t\\\\t\\\\\\\"Now use bonkForm to erase at every character boundary in glyphs.\\\\\\\"\\\\n\\\\t\\\\t\\\\tbonkForm offset: (0-bc) @ 0.\\\\n\\\\t\\\\t\\\\tfont bonk: g with: bonkForm.\\\\n\\\\t\\\\t\\\\tfont setGlyphs: g\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'emphasis' stamp: 'yo 12/27/2002 13:53'!\\\\nmakeStruckOutGlyphs\\\\n\\\\t\\\\\\\"Make a struck-out set of glyphs with same widths\\\\\\\"\\\\n\\\\n\\\\t| g font |\\\\n\\\\t1 to: fontArray size do: [:i |\\\\n\\\\t\\\\tfont _ (fontArray at: i).\\\\n\\\\t\\\\tfont ifNotNil: [\\\\n\\\\t\\\\t\\\\tg _ font glyphs deepCopy.\\\\n\\\\t\\\\t\\\\tg fillBlack: (0 @ (font ascent - (font ascent//3)) extent: g width @ 1).\\\\n\\\\t\\\\t\\\\tfont setGlyphs: g\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'emphasis' stamp: 'yo 12/27/2002 13:51'!\\\\nmakeUnderlinedGlyphs\\\\n\\\\t\\\\\\\"Make an underlined set of glyphs with same widths\\\\\\\"\\\\n\\\\n\\\\t| g font |\\\\n\\\\t1 to: fontArray size do: [:i |\\\\n\\\\t\\\\tfont _ (fontArray at: i).\\\\n\\\\t\\\\tfont ifNotNil: [\\\\n\\\\t\\\\t\\\\tg _ font glyphs deepCopy.\\\\n\\\\t\\\\t\\\\tg fillBlack: (0 @ (font ascent+1) extent: g width @ 1).\\\\n\\\\t\\\\t\\\\tfont setGlyphs: g\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n! !\\\\n\\\\n\\\\n!StrikeFontSet methodsFor: '*nebraska-as yet unclassified' stamp: 'yo 12/17/2005 20:19'!\\\\nencodedForRemoteCanvas\\\\n\\\\n\\\\t| stream |\\\\n\\\\tstream := RWBinaryOrTextStream on: ''.\\\\n\\\\tstream nextPutAll: self familyName.\\\\n\\\\tstream nextPut: Character space.\\\\n\\\\tstream nextPutAll: self pointSize asString.\\\\n\\\\tstream nextPut: Character space.\\\\n\\\\tstream nextPutAll: self emphasis asString.\\\\n\\\\t^ stream contents asString.\\\\n! !\\\\n\\\\n\\\\n!StrikeFontSet methodsFor: 'private' stamp: 'yo 12/27/2002 13:39'!\\\\naddNewFont: aFont at: encodingIndex\\\\n\\\\n\\\\t| newArray |\\\\n\\\\tencodingIndex > fontArray size ifTrue: [\\\\n\\\\t\\\\tnewArray _ Array new: encodingIndex.\\\\n\\\\t\\\\tnewArray replaceFrom: 1 to: fontArray size with: fontArray startingAt: 1.\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tnewArray _ fontArray.\\\\n\\\\t].\\\\n\\\\n\\\\tnewArray at: encodingIndex put: aFont.\\\\n\\\\n\\\\tself initializeWithFontArray: newArray.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'private' stamp: 'yo 1/7/2005 11:16'!\\\\nglyphInfoOf: aCharacter into: glyphInfoArray\\\\n\\\\n\\\\t| index f code leftX |\\\\n\\\\tindex _ aCharacter leadingChar + 1.\\\\n\\\\tfontArray size < index ifTrue: [^ self questionGlyphInfoInto: glyphInfoArray].\\\\n\\\\t(f _ fontArray at: index) ifNil: [^ self questionGlyphInfoInto: glyphInfoArray].\\\\n\\\\n\\\\tcode _ aCharacter charCode.\\\\n\\\\t((code between: f minAscii and: f maxAscii) not) ifTrue: [\\\\n\\\\t\\\\t^ self questionGlyphInfoInto: glyphInfoArray.\\\\n\\\\t].\\\\n\\\\tleftX _ f xTable at: code + 1.\\\\n\\\\tleftX < 0 ifTrue: [\\\\n\\\\t\\\\t^ self questionGlyphInfoInto: glyphInfoArray.\\\\n\\\\t].\\\\n\\\\tglyphInfoArray at: 1 put: f glyphs;\\\\n\\\\t\\\\tat: 2 put: leftX;\\\\n\\\\t\\\\tat: 3 put: (f xTable at: code + 2);\\\\n\\\\t\\\\tat: 4 put: (f ascentOf: aCharacter);\\\\n\\\\t\\\\tat: 5 put: self.\\\\n\\\\t^ glyphInfoArray.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'private' stamp: 'yo 1/13/2005 16:43'!\\\\nquestionGlyphInfoInto: glyphInfoArray\\\\n\\\\n\\\\t| f ascii |\\\\n\\\\tf _ fontArray at: 1.\\\\n\\\\tascii _ $? asciiValue.\\\\n\\\\tglyphInfoArray at: 1 put: f glyphs;\\\\n\\\\t\\\\tat: 2 put: (f xTable at: ascii + 1);\\\\n\\\\t\\\\tat: 3 put: (f xTable at: ascii + 2);\\\\n\\\\t\\\\tat: 4 put: (self ascentOf: $?);\\\\n\\\\t\\\\tat: 5 put: self.\\\\n\\\\t^ glyphInfoArray.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStrikeFontSet class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StrikeFontSet class methodsFor: 'as yet unclassified' stamp: 'yo 1/19/2005 11:25'!\\\\ncreateExternalFontFileForLatin2: fileName\\\\n\\\\\\\"\\\\n\\\\tStrikeFontSet createExternalFontFileForLatin2: 'latin2.out'.\\\\n\\\\\\\"\\\\n\\\\n\\\\t| file array f installDirectory |\\\\n\\\\tfile _ FileStream newFileNamed: fileName.\\\\n\\\\tinstallDirectory _ Smalltalk at: #M17nInstallDirectory ifAbsent: [].\\\\n\\\\tinstallDirectory _ installDirectory\\\\n\\\\t\\\\tifNil: [String new]\\\\n\\\\t\\\\tifNotNil: [installDirectory , FileDirectory pathNameDelimiter asString].\\\\n\\\\tarray _ Array\\\\n\\\\t\\\\t\\\\t\\\\twith: (StrikeFont newFromEFontBDFFile: installDirectory , 'b10.bdf' name: 'LatinTwo9' ranges: EFontBDFFontReaderForRanges rangesForLatin2)\\\\n\\\\t\\\\t\\\\t\\\\twith: (StrikeFont newFromEFontBDFFile: installDirectory , 'b12.bdf' name: 'LatinTwo10' ranges: EFontBDFFontReaderForRanges rangesForLatin2)\\\\n\\\\t\\\\t\\\\t\\\\twith: (StrikeFont newFromEFontBDFFile: installDirectory , 'b14.bdf' name: 'LatinTwo12' ranges: EFontBDFFontReaderForRanges rangesForLatin2)\\\\n\\\\t\\\\t\\\\t\\\\twith: (StrikeFont newFromEFontBDFFile: installDirectory , 'b16.bdf' name: 'LatingTwo14' ranges: EFontBDFFontReaderForRanges rangesForLatin2)\\\\n\\\\t\\\\t\\\\t\\\\twith: (StrikeFont newFromEFontBDFFile: installDirectory , 'b24.bdf' name: 'LatinTwo20' ranges: EFontBDFFontReaderForRanges rangesForLatin2).\\\\n\\\\tTextConstants at: #forceFontWriting put: true.\\\\n\\\\tf _ ReferenceStream on: file.\\\\n\\\\tf nextPut: array.\\\\n\\\\tfile close.\\\\n\\\\tTextConstants removeKey: #forceFontWriting.\\\\n! !\\\\n\\\\n!StrikeFontSet class methodsFor: 'as yet unclassified' stamp: 'yo 5/25/2004 11:05'!\\\\ncreateExternalFontFileForUnicodeJapanese: fileName\\\\n\\\\\\\"\\\\n\\\\tStrikeFontSet createExternalFontFileForUnicodeJapanese: 'uJapaneseFont.out'.\\\\n\\\\\\\"\\\\n\\\\n\\\\t| file array f installDirectory |\\\\n\\\\tfile _ FileStream newFileNamed: fileName.\\\\n\\\\tinstallDirectory _ Smalltalk at: #M17nInstallDirectory ifAbsent: [].\\\\n\\\\tinstallDirectory _ installDirectory\\\\n\\\\t\\\\tifNil: [String new]\\\\n\\\\t\\\\tifNotNil: [installDirectory , FileDirectory pathNameDelimiter asString].\\\\n\\\\tarray _ Array\\\\n\\\\t\\\\t\\\\t\\\\twith: (StrikeFont newForJapaneseFromEFontBDFFile: installDirectory , 'b12.bdf' name: 'Japanese10' overrideWith: 'shnmk12.bdf')\\\\n\\\\t\\\\t\\\\t\\\\twith: ((StrikeFont newForJapaneseFromEFontBDFFile: installDirectory , 'b14.bdf' name: 'Japanese12' overrideWith: 'shnmk14.bdf') \\\\\\\"fixAscent: 14 andDescent: 1 head: 1\\\\\\\")\\\\n\\\\t\\\\t\\\\t\\\\twith: ((StrikeFont newForJapaneseFromEFontBDFFile: 'b16.bdf' name: 'Japanese14' overrideWith: 'shnmk16.bdf') \\\\\\\"fixAscent: 16 andDescent: 4 head: 4\\\\\\\")\\\\n\\\\t\\\\t\\\\t\\\\twith: (StrikeFont newForJapaneseFromEFontBDFFile: installDirectory , 'b24.bdf' name: 'Japanese18' overrideWith: 'kanji24.bdf').\\\\n\\\\tTextConstants at: #forceFontWriting put: true.\\\\n\\\\tf _ ReferenceStream on: file.\\\\n\\\\tf nextPut: array.\\\\n\\\\tfile close.\\\\n\\\\tTextConstants removeKey: #forceFontWriting.\\\\n! !\\\\n\\\\n!StrikeFontSet class methodsFor: 'as yet unclassified' stamp: 'yo 1/15/2004 16:58'!\\\\ncreateExternalFontFileForUnicodeKorean: fileName\\\\n\\\\\\\"\\\\n\\\\tSmalltalk garbageCollect.\\\\n\\\\tStrikeFontSet createExternalFontFileForUnicodeKorean: 'uKoreanFont.out'.\\\\n\\\\\\\"\\\\n\\\\n\\\\t| file array f installDirectory |\\\\n\\\\tfile _ FileStream newFileNamed: fileName.\\\\n\\\\tinstallDirectory _ Smalltalk at: #M17nInstallDirectory ifAbsent: [].\\\\n\\\\tinstallDirectory _ installDirectory\\\\n\\\\t\\\\tifNil: [String new]\\\\n\\\\t\\\\tifNotNil: [installDirectory , FileDirectory pathNameDelimiter asString].\\\\n\\\\tarray _ Array\\\\n\\\\t\\\\t\\\\t\\\\twith: (StrikeFont newForKoreanFromEFontBDFFile: installDirectory , 'b12.bdf' name: 'Japanese10' overrideWith: 'shnmk12.bdf')\\\\n\\\\t\\\\t\\\\t\\\\twith: ((StrikeFont newForKoreanFromEFontBDFFile: installDirectory , 'b14.bdf' name: 'Japanese12' overrideWith: 'shnmk14.bdf') \\\\\\\"fixAscent: 14 andDescent: 1 head: 1\\\\\\\")\\\\n\\\\t\\\\t\\\\t\\\\twith: ((StrikeFont newForKoreanFromEFontBDFFile: installDirectory , 'b16.bdf' name: 'Japanese14' overrideWith: 'hanglg16.bdf') fixAscent: 16 andDescent: 4 head: 4)\\\\n\\\\t\\\\t\\\\t\\\\twith: (StrikeFont newForKoreanFromEFontBDFFile: installDirectory , 'b24.bdf' name: 'Japanese18' overrideWith: 'hanglm24.bdf').\\\\n\\\\tTextConstants at: #forceFontWriting put: true.\\\\n\\\\tf _ ReferenceStream on: file.\\\\n\\\\tf nextPut: array.\\\\n\\\\tfile close.\\\\n\\\\tTextConstants removeKey: #forceFontWriting.\\\\n! !\\\\n\\\\n!StrikeFontSet class methodsFor: 'as yet unclassified' stamp: 'yo 12/17/2005 22:42'!\\\\ndecodedFromRemoteCanvas: aString\\\\n\\\\n\\\\t| array |\\\\n\\\\tarray _ aString findTokens: #($ ).\\\\n\\\\t^ self familyName: (array at: 1) size: (array at: 2) asNumber emphasized: (array at: 3) asNumber.\\\\n! !\\\\n\\\\n!StrikeFontSet class methodsFor: 'as yet unclassified' stamp: 'yo 12/27/2002 14:08'!\\\\nduplicateArrayElementsForLeadingCharShift\\\\n\\\\\\\"\\\\n\\\\tself duplicateArrayElementsForLeadingCharShift\\\\n\\\\\\\"\\\\n\\\\t| array font |\\\\n\\\\tself allInstances do: [:s |\\\\n\\\\t\\\\ts emphasis = 0 ifTrue: [\\\\n\\\\t\\\\t\\\\tarray _ s fontArray.\\\\n\\\\t\\\\t\\\\t2 to: (4 min: array size) do: [:i |\\\\n\\\\t\\\\t\\\\t\\\\tfont _ array at: i.\\\\n\\\\t\\\\t\\\\t\\\\ts addNewFont: font at: ((i - 1) << 2) + 1.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\ts reset\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StrikeFontSet class methodsFor: 'as yet unclassified' stamp: 'yo 8/19/2003 13:04'!\\\\nfamilyName: aName size: aSize\\\\n\\\\t\\\\\\\"Answer a font (or the default font if the name is unknown) in the specified size.\\\\\\\"\\\\n\\\\n\\\\t| collection |\\\\n\\\\tcollection _  self allInstances select: [:inst | (inst name beginsWith: aName) and: [inst emphasis = 0]].\\\\n\\\\tcollection isEmpty ifTrue: [\\\\n\\\\t\\\\t(aName = 'DefaultMultiStyle') ifTrue: [\\\\n\\\\t\\\\t\\\\tcollection _ (TextConstants at: #DefaultMultiStyle) fontArray.\\\\n\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\t^ TextStyle defaultFont\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\tcollection _ collection asSortedCollection: [:a :b | a pointSize <= b pointSize].\\\\n\\\\tcollection do: [:s | (s pointSize >= aSize) ifTrue: [^ s]].\\\\n\\\\t^ TextStyle defaultFont.\\\\n! !\\\\n\\\\n!StrikeFontSet class methodsFor: 'as yet unclassified' stamp: 'yo 8/18/2003 21:03'!\\\\nfamilyName: aName size: aSize emphasized: emphasisCode\\\\n\\\\t\\\\\\\"Create the font with this emphasis\\\\\\\"\\\\n\\\\n\\\\t^ (self familyName: aName size: aSize) emphasized: emphasisCode\\\\n! !\\\\n\\\\n!StrikeFontSet class methodsFor: 'as yet unclassified' stamp: 'yo 5/25/2004 14:32'!\\\\nfindMaximumLessThan: f in: array\\\\n\\\\n\\\\tarray size to: 1 by: -1 do: [:i |\\\\n\\\\t\\\\tf height >= (array at: i) height ifTrue: [^ array at: i].\\\\n\\\\t].\\\\n\\\\t^ array first.\\\\n! !\\\\n\\\\n!StrikeFontSet class methodsFor: 'as yet unclassified' stamp: 'yo 9/23/2002 16:32'!\\\\nnewFontArray: anArray\\\\n \\\\n\\\\t^super new initializeWithFontArray: anArray\\\\n! !\\\\n\\\\n\\\\n!StrikeFontSet class methodsFor: 'fileIn/Out' stamp: 'yo 1/18/2005 16:00'!\\\\ninstallExternalFontFileName6: fileName encoding: encoding encodingName: aString textStyleName: styleName\\\\n\\\\n\\\\t^ self installExternalFontFileName6: fileName inDir: FileDirectory default encoding: encoding encodingName: aString textStyleName: styleName.\\\\n\\\\n\\\\\\\"\\\\nStrikeFontSet createExternalFontFileForCyrillic: 'cyrillicFont.out'.\\\\n\\\\nStrikeFontSet installExternalFontFileName6: 'latin2.out' encoding: Latin2Environment leadingChar encodingName: #Latin2 textStyleName: #DefaultMultiStyle.\\\\nStrikeFontSet installExternalFontFileName6: 'uJapaneseFont.out' encoding: JapaneseEnvironment leadingChar encodingName: #Japanese textStyleName: #DefaultMultiStyle.\\\\n\\\\nStrikeFontSet installExternalFontFileName6: 'uKoreanFont.out' encoding: UnicodeKorean leadingChar encodingName: #Korean textStyleName: #DefaultMultiStyle.\\\\n\\\\nStrikeFontSet removeFontsForEncoding: 2 encodingName: #Gb2312.\\\\nself halt.\\\\nStrikeFontSet removeFontsForEncoding: 3 encodingName: #KsX1001.\\\\n\\\\\\\"\\\\n! !\\\\n\\\\n!StrikeFontSet class methodsFor: 'fileIn/Out' stamp: 'tak 8/3/2005 17:40'!\\\\ninstallExternalFontFileName6: fileName inDir: dir encoding: encoding encodingName: aString textStyleName: styleName \\\\n\\\\t| aStream |\\\\n\\\\taStream := dir readOnlyFileNamed: fileName.\\\\n\\\\t[self\\\\n\\\\t\\\\tinstallExternalFontOn: aStream\\\\n\\\\t\\\\tencoding: encoding\\\\n\\\\t\\\\tencodingName: aString\\\\n\\\\t\\\\ttextStyleName: styleName]\\\\n\\\\t\\\\tensure: [aStream close]! !\\\\n\\\\n!StrikeFontSet class methodsFor: 'fileIn/Out' stamp: 'yo 3/17/2004 10:32'!\\\\ninstallExternalFontFileName: fileName encoding: encoding encodingName: aString textStyleName: styleName\\\\n\\\\n\\\\t^ self installExternalFontFileName: fileName inDir: FileDirectory default encoding: encoding encodingName: aString textStyleName: styleName.\\\\n\\\\n\\\\\\\"\\\\nStrikeFontSet createExternalFontFileForCyrillic: 'cyrillicFont.out'.\\\\n\\\\nStrikeFontSet installExternalFontFileName: 'chineseFont.out' encoding: 2 encodingName: #Gb2312 textStyleName: #DefaultMultiStyle.\\\\nStrikeFontSet installExternalFontFileName: 'japaneseFont.out' encoding: 1 encodingName: #JisX0208 textStyleName: #DefaultMultiStyle.\\\\nStrikeFontSet installExternalFontFileName: 'defaultFont.out' encoding: 0 encodingName: #Latin1 textStyleName: #DefaultMultiStyle.\\\\nStrikeFontSet installExternalFontFileName: 'cyrillicFont.out' encoding: UnicodeCyrillic leadingChar encodingName: #Cyrillic textStyleName: #DefaultMultiStyle.\\\\nStrikeFontSet installExternalFontFileName: 'extendedLatinFont.out' encoding: UnicodeLatinExtendedAB leadingChar encodingName: #ExtendedLatin textStyleName: #DefaultMultiStyle.\\\\nStrikeFontSet installExternalFontFileName: 'ipaExtensionsFont.out' encoding: UnicodeIPA leadingChar encodingName: #IPAExtensions textStyleName: #DefaultMultiStyle.\\\\nStrikeFontSet installExternalFontFileName: 'armenianFont.out' encoding: UnicodeArmenian leadingChar encodingName: #Armenian textStyleName: #DefaultMultiStyle.\\\\nStrikeFontSet installExternalFontFileName: 'greekFont.out' encoding: UnicodeGreek leadingChar encodingName: #Greek textStyleName: #DefaultMultiStyle.\\\\n\\\\nStrikeFontSet installExternalFontFileName: 'arrowFont.out' encoding: UnicodeArrows leadingChar encodingName: #Arrow textStyleName: #DefaultMultiStyle.\\\\n\\\\nStrikeFontSet installExternalFontFileName: 'uJapaneseFont.out' indir: FileDirectory default encoding: JapaneseEnvironment leadingChar encodingName: #Japanese textStyleName: #DefaultMultiStyle.\\\\n\\\\nStrikeFontSet installExternalFontFileName: 'uKoreanFont.out' encoding: UnicodeKorean leadingChar encodingName: #Korean textStyleName: #DefaultMultiStyle.\\\\n\\\\nStrikeFontSet removeFontsForEncoding: 2 encodingName: #Gb2312.\\\\nself halt.\\\\nStrikeFontSet removeFontsForEncoding: 3 encodingName: #KsX1001.\\\\n\\\\\\\"\\\\n! !\\\\n\\\\n!StrikeFontSet class methodsFor: 'fileIn/Out' stamp: 'yo 8/19/2003 00:32'!\\\\ninstallExternalFontFileName: fileName inDir: dir encoding: encoding encodingName: aString textStyleName: styleName\\\\n\\\\n\\\\t| array arrayFour oldStyle arrayOfFS fs fonts newFonts |\\\\n\\\\tarray _ (ReferenceStream on: (dir readOnlyFileNamed: fileName)) next.\\\\n\\\\n\\\\tarrayFour _ Array new: 4 withAll: array last.\\\\n\\\\tarrayFour replaceFrom: 1 to: array size with: array startingAt: 1.\\\\n\\\\tTextConstants at: aString asSymbol put: arrayFour.\\\\n\\\\n\\\\toldStyle _ TextConstants at: styleName asSymbol.\\\\n\\\\tarrayOfFS _ oldStyle fontArray.\\\\n\\\\tarrayOfFS _ (1 to: 4) collect: [:i |\\\\n\\\\t\\\\tfs _ arrayOfFS at: i.\\\\n\\\\t\\\\tfonts _ fs fontArray.\\\\n\\\\t\\\\tencoding + 1 > fonts size ifTrue: [\\\\n\\\\t\\\\t\\\\tnewFonts _ Array new: encoding + 1.\\\\n\\\\t\\\\t\\\\tnewFonts replaceFrom: 1 to: fonts size with: fonts startingAt: 1.\\\\n\\\\t\\\\t\\\\tnewFonts at: encoding + 1 put: (arrayFour at: i).\\\\n\\\\t\\\\t\\\\tfs initializeWithFontArray: newFonts.\\\\n\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\tfonts at: encoding + 1 put: (arrayFour at: i).\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tfs.\\\\n\\\\t].\\\\n\\\\n\\\\tTextConstants at: styleName asSymbol put: (TextStyle fontArray: arrayOfFS).\\\\n\\\\toldStyle becomeForward: (TextConstants at: styleName asSymbol).\\\\n\\\\n! !\\\\n\\\\n!StrikeFontSet class methodsFor: 'fileIn/Out' stamp: 'tak 8/5/2005 10:34'!\\\\ninstallExternalFontOn: aStream encoding: encoding encodingName: aString textStyleName: styleName\\\\n\\\\n\\\\t| array fonts encodingIndex textStyle |\\\\n\\\\n\\\\tarray _ aStream\\\\n\\\\t\\\\tuntilEndWithFork: [(ReferenceStream on: aStream) next]\\\\n\\\\t\\\\tdisplayingProgress: 'Font reading...'. \\\\n\\\\t\\\\n\\\\tTextConstants at: aString asSymbol put: array.\\\\n\\\\n\\\\ttextStyle _ TextConstants at: styleName asSymbol.\\\\n\\\\tencodingIndex _ encoding + 1.\\\\n\\\\ttextStyle fontArray do: [:fs |\\\\n\\\\t\\\\tfonts _ fs fontArray.\\\\n\\\\t\\\\tencodingIndex > fonts size\\\\n\\\\t\\\\t\\\\tifTrue: [fonts _  (Array new: encodingIndex)\\\\n\\\\t\\\\t\\\\t\\\\treplaceFrom: 1 to: fonts size with: fonts startingAt: 1].\\\\n\\\\t\\\\tfonts at: encodingIndex put: (self findMaximumLessThan: fs fontArray first in: array).\\\\n\\\\t\\\\tfs initializeWithFontArray: fonts.\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StrikeFontSet class methodsFor: 'fileIn/Out' stamp: 'tak 8/4/2005 11:03'!\\\\ninstallExternalFontOn: aStream forLocale: locale \\\\n\\\\tself\\\\n\\\\t\\\\tinstallExternalFontOn: aStream\\\\n\\\\t\\\\tencoding: locale languageEnvironment leadingChar\\\\n\\\\t\\\\tencodingName: locale languageEnvironment fontEncodingName\\\\n\\\\t\\\\ttextStyleName: #DefaultMultiStyle! !\\\\n\\\\n!StrikeFontSet class methodsFor: 'fileIn/Out' stamp: 'yo 1/15/2004 16:06'!\\\\ninstallNewFontAtIndex: newIndex fromOld: oldIndex\\\\n\\\\n\\\\t| fontArray newArray |\\\\n\\\\tself allInstances do: [:set |\\\\n\\\\t\\\\tfontArray _ set fontArray.\\\\n\\\\t\\\\tnewIndex + 1 > fontArray size ifTrue: [\\\\n\\\\t\\\\t\\\\tnewArray _ Array new: newIndex + 1.\\\\n\\\\t\\\\t\\\\tnewArray replaceFrom: 1 to: fontArray size with: fontArray startingAt: 1.\\\\n\\\\t\\\\t\\\\tnewArray at: newIndex + 1 put: (fontArray at: oldIndex + 1).\\\\n\\\\t\\\\t\\\\tset initializeWithFontArray: newArray.\\\\n\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\tfontArray at: newIndex + 1 put: (fontArray at: oldIndex + 1).\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\n\\\\\\\"\\\\nStrikeFontSet installNewFontAtIndex: UnicodeSimplifiedChinese leadingChar fromOld: UnicodeJapanese leadingChar\\\\nStrikeFontSet installNewFontAtIndex: UnicodeKorean leadingChar fromOld: UnicodeJapanese leadingChar\\\\n\\\\\\\"\\\\n! !\\\\n\\\\n!StrikeFontSet class methodsFor: 'fileIn/Out' stamp: 'tak 8/4/2005 14:41'!\\\\nremoveFontsForEncoding: leadingChar encodingName: encodingSymbol\\\\n\\\\n\\\\t| insts fonts newFonts index |\\\\n\\\\tleadingChar = 0 ifTrue: [^ self error: 'you cannot delete the intrinsic fonts'].\\\\n\\\\tinsts _ self allInstances.\\\\n\\\\tinsts do: [:inst |\\\\n\\\\t\\\\tfonts _ inst fontArray.\\\\n\\\\t\\\\tfonts size >= (leadingChar + 1) ifTrue: [\\\\n\\\\t\\\\t\\\\tleadingChar + 1 = fonts size ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tnewFonts _ fonts copyFrom: 1 to: fonts size - 1.\\\\n\\\\t\\\\t\\\\t\\\\tindex _ newFonts indexOf: nil.\\\\n\\\\t\\\\t\\\\t\\\\tindex > 0 ifTrue: [newFonts _ newFonts copyFrom: 1 to: index - 1].\\\\n\\\\t\\\\t\\\\t\\\\tinst initializeWithFontArray: newFonts.\\\\n\\\\t\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tfonts at: leadingChar + 1 put: nil.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\n\\\\tTextConstants removeKey: encodingSymbol asSymbol ifAbsent: [].\\\\n! !\\\\nArrayedCollection subclass: #String\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: 'AsciiOrder CSLineEnders CSNonSeparators CSSeparators CaseInsensitiveOrder CaseSensitiveOrder HtmlEntities LowercasingTable Tokenish UppercasingTable'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Collections-Strings'!\\\\n!String commentStamp: '<historical>' prior: 0!\\\\nA String is an indexed collection of Characters. Class String provides the abstract super class for ByteString (that represents an array of 8-bit Characters) and WideString (that represents an array of  32-bit characters).  In the similar manner of LargeInteger and SmallInteger, those subclasses are chosen accordingly for a string; namely as long as the system can figure out so, the String is used to represent the given string.\\\\n\\\\nStrings support a vast array of useful methods, which can best be learned by browsing and trying out examples as you find them in the code.\\\\n\\\\nHere are a few useful methods to look at...\\\\n\\\\tString match:\\\\n\\\\tString contractTo:\\\\n\\\\nString also inherits many useful methods from its hierarchy, such as\\\\n\\\\tSequenceableCollection ,\\\\n\\\\tSequenceableCollection copyReplaceAll:with:\\\\n!\\\\n]style[(55 376 188 13 2 18 72 24 2 44)f1,f2,f1,f1LString match:;,f1,f1LString contractTo:;,f1,f1LSequenceableCollection ,;,f1,f1LSequenceableCollection copyReplaceAll:with:;!\\\\n\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'ar 4/12/2005 16:30'!\\\\nbyteAt: index\\\\n\\\\t^self subclassResponsibility! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'ar 4/12/2005 16:30'!\\\\nbyteAt: index put: value\\\\n\\\\t^self subclassResponsibility! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'ar 4/12/2005 16:30'!\\\\nbyteSize\\\\n\\\\t^self subclassResponsibility! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\ndo: aBlock toFieldNumber: aNumber\\\\n\\\\t\\\\\\\"Considering the receiver as a holder of tab-delimited fields, evaluate aBlock on behalf of a field in this string\\\\\\\"\\\\n\\\\n\\\\t| start end index |\\\\n\\\\tstart _ 1.\\\\n\\\\tindex _ 1.\\\\n\\\\t[start <= self size] whileTrue: \\\\n\\\\t\\\\t[end _ self indexOf: Character tab startingAt: start ifAbsent: [self size + 1].\\\\n\\\\t\\\\tend _ end - 1.\\\\n\\\\t\\\\taNumber = index ifTrue:\\\\n\\\\t\\\\t\\\\t[aBlock value: (self copyFrom: start  to: end).\\\\n\\\\t\\\\t\\\\t^ self].\\\\n\\\\t\\\\tindex _ index + 1.\\\\n\\\\t\\\\tstart _ end + 2]\\\\n\\\\n\\\\\\\"\\\\n1 to: 6 do:\\\\n\\\\t[:aNumber |\\\\n\\\\t\\\\t'fred\\\\tcharlie\\\\telmo\\\\t\\\\twimpy\\\\tfriml' do:\\\\n\\\\t\\\\t\\\\t[:aField | Transcript cr; show: aField] toFieldNumber: aNumber]\\\\n\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nendsWithDigit\\\\n\\\\t\\\\\\\"Answer whether the receiver's final character represents a digit.  3/11/96 sw\\\\\\\"\\\\n\\\\n\\\\t^ self size > 0 and: [self last isDigit]! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'ar 4/10/2005 17:12'!\\\\nfindAnySubStr: delimiters startingAt: start \\\\n\\\\t\\\\\\\"Answer the index of the character within the receiver, starting at start, that begins a substring matching one of the delimiters.  delimiters is an Array of Strings (Characters are permitted also).  If the receiver does not contain any of the delimiters, answer size + 1.\\\\\\\"\\\\n\\\\n\\\\t| min ind |\\\\n\\\\tmin _ self size + 1.\\\\n\\\\tdelimiters do: [:delim |\\\\t\\\\\\\"May be a char, a string of length 1, or a substring\\\\\\\"\\\\n\\\\t\\\\tdelim isCharacter \\\\n\\\\t\\\\t\\\\tifTrue: [ind _ self indexOfSubCollection: (String with: delim) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: start ifAbsent: [min]]\\\\n\\\\t\\\\t\\\\tifFalse: [ind _ self indexOfSubCollection: delim \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: start ifAbsent: [min]].\\\\n\\\\t\\\\t\\\\tmin _ min min: ind].\\\\n\\\\t^ min! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nfindBetweenSubStrs: delimiters\\\\n\\\\t\\\\\\\"Answer the collection of String tokens that result from parsing self.  Tokens are separated by 'delimiters', which can be a collection of Strings, or a collection of Characters.  Several delimiters in a row are considered as just one separation.\\\\\\\"\\\\n\\\\n\\\\t| tokens keyStart keyStop |\\\\n\\\\ttokens _ OrderedCollection new.\\\\n\\\\tkeyStop _ 1.\\\\n\\\\t[keyStop <= self size] whileTrue:\\\\n\\\\t\\\\t[keyStart _ self skipAnySubStr: delimiters startingAt: keyStop.\\\\n\\\\t\\\\tkeyStop _ self findAnySubStr: delimiters startingAt: keyStart.\\\\n\\\\t\\\\tkeyStart < keyStop\\\\n\\\\t\\\\t\\\\tifTrue: [tokens add: (self copyFrom: keyStart to: (keyStop - 1))]].\\\\n\\\\t^tokens! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nfindCloseParenthesisFor: startIndex\\\\n\\\\t\\\\\\\"assume (self at: startIndex) is $(.  Find the matching $), allowing parentheses to nest.\\\\\\\"\\\\n\\\\t\\\\\\\" '(1+(2-3))-3.14159' findCloseParenthesisFor: 1 \\\\\\\"\\\\n\\\\t\\\\\\\" '(1+(2-3))-3.14159' findCloseParenthesisFor: 4 \\\\\\\"\\\\n\\\\t| pos nestLevel |\\\\n\\\\tpos := startIndex+1.\\\\n\\\\tnestLevel := 1.\\\\n\\\\t[ pos <= self size ] whileTrue: [\\\\n\\\\t\\\\t(self at: pos) = $( ifTrue: [ nestLevel := nestLevel + 1 ].\\\\n\\\\t\\\\t(self at: pos) = $) ifTrue: [ nestLevel := nestLevel - 1 ].\\\\n\\\\t\\\\tnestLevel = 0 ifTrue: [ ^pos ].\\\\n\\\\t\\\\tpos := pos + 1.\\\\n\\\\t].\\\\n\\\\t^self size + 1! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nfindDelimiters: delimiters startingAt: start \\\\n\\\\t\\\\\\\"Answer the index of the character within the receiver, starting at start, that matches one of the delimiters. If the receiver does not contain any of the delimiters, answer size + 1.\\\\\\\"\\\\n\\\\n\\\\tstart to: self size do: [:i |\\\\n\\\\t\\\\tdelimiters do: [:delim | delim = (self at: i) ifTrue: [^ i]]].\\\\n\\\\t^ self size + 1! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 10/15/2003 15:32'!\\\\nfindLastOccuranceOfString: subString startingAt: start \\\\n\\\\t\\\\\\\"Answer the index of the last occurance of subString within the receiver, starting at start. If \\\\n\\\\tthe receiver does not contain subString, answer 0.\\\\\\\"\\\\n\\\\n\\\\t| last now |\\\\n\\\\tlast _ self findSubstring: subString in: self startingAt: start matchTable: CaseSensitiveOrder.\\\\n\\\\tlast = 0 ifTrue: [^ 0].\\\\n\\\\t[last > 0] whileTrue: [\\\\n\\\\t\\\\tnow _ last.\\\\n\\\\t\\\\tlast _ self findSubstring: subString in: self startingAt: last + subString size matchTable: CaseSensitiveOrder.\\\\n\\\\t].\\\\n\\\\n\\\\t^ now.\\\\n! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nfindString: subString\\\\n\\\\t\\\\\\\"Answer the index of subString within the receiver, starting at start. If \\\\n\\\\tthe receiver does not contain subString, answer 0.\\\\\\\"\\\\n\\\\t^self findString: subString startingAt: 1.! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nfindString: subString startingAt: start \\\\n\\\\t\\\\\\\"Answer the index of subString within the receiver, starting at start. If \\\\n\\\\tthe receiver does not contain subString, answer 0.\\\\\\\"\\\\n\\\\n\\\\t^ self findSubstring: subString in: self startingAt: start matchTable: CaseSensitiveOrder! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nfindString: key startingAt: start caseSensitive: caseSensitive\\\\n\\\\t\\\\\\\"Answer the index in this String at which the substring key first occurs, at or beyond start.  The match can be case-sensitive or not.  If no match is found, zero will be returned.\\\\\\\"\\\\n\\\\n\\\\tcaseSensitive\\\\n\\\\tifTrue: [^ self findSubstring: key in: self startingAt: start matchTable: CaseSensitiveOrder]\\\\n\\\\tifFalse: [^ self findSubstring: key in: self startingAt: start matchTable: CaseInsensitiveOrder]! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'ar 4/10/2005 17:13'!\\\\nfindTokens: delimiters\\\\n\\\\t\\\\\\\"Answer the collection of tokens that result from parsing self.  Return strings between the delimiters.  Any character in the Collection delimiters marks a border.  Several delimiters in a row are considered as just one separation.  Also, allow delimiters to be a single character.\\\\\\\"\\\\n\\\\n\\\\t| tokens keyStart keyStop separators |\\\\n\\\\n\\\\ttokens _ OrderedCollection new.\\\\n\\\\tseparators _ delimiters isCharacter \\\\n\\\\t\\\\tifTrue: [Array with: delimiters]\\\\n\\\\t\\\\tifFalse: [delimiters].\\\\n\\\\tkeyStop _ 1.\\\\n\\\\t[keyStop <= self size] whileTrue:\\\\n\\\\t\\\\t[keyStart _ self skipDelimiters: separators startingAt: keyStop.\\\\n\\\\t\\\\tkeyStop _ self findDelimiters: separators startingAt: keyStart.\\\\n\\\\t\\\\tkeyStart < keyStop\\\\n\\\\t\\\\t\\\\tifTrue: [tokens add: (self copyFrom: keyStart to: (keyStop - 1))]].\\\\n\\\\t^tokens! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'dtl 8/14/2004 11:27'!\\\\nfindTokens: delimiters escapedBy: quoteDelimiters \\\\n\\\\t\\\\\\\"Answer a collection of Strings separated by the delimiters, where  \\\\n\\\\tdelimiters is a Character or collection of characters. Two delimiters in a  \\\\n\\\\trow produce an empty string (compare this to #findTokens, which  \\\\n\\\\ttreats sequential delimiters as one).  \\\\n\\\\t \\\\n\\\\tThe characters in quoteDelimiters are treated as quote characters, such  \\\\n\\\\tthat any delimiter within a pair of matching quoteDelimiter characters  \\\\n\\\\tis treated literally, rather than as a delimiter.  \\\\n\\\\t \\\\n\\\\tThe quoteDelimiter characters may be escaped within a quoted string.  \\\\n\\\\tTwo sequential quote characters within a quoted string are treated as  \\\\n\\\\ta single character.  \\\\n\\\\t \\\\n\\\\tThis method is useful for parsing comma separated variable strings for  \\\\n\\\\tspreadsheet import and export.\\\\\\\"\\\\n\\\\n\\\\t| tokens rs activeEscapeCharacter ts char token delimiterChars quoteChars |\\\\n\\\\tdelimiterChars _ (delimiters isNil\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: ['']\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [delimiters]) asString.\\\\n\\\\tquoteChars _ (quoteDelimiters isNil\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: ['']\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [quoteDelimiters]) asString.\\\\n\\\\ttokens _ OrderedCollection new.\\\\n\\\\trs _ ReadStream on: self.\\\\n\\\\tactiveEscapeCharacter _ nil.\\\\n\\\\tts _ WriteStream on: ''.\\\\n\\\\t[rs atEnd]\\\\n\\\\t\\\\twhileFalse: [char _ rs next.\\\\n\\\\t\\\\t\\\\tactiveEscapeCharacter isNil\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [(quoteChars includes: char)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [activeEscapeCharacter _ char]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [(delimiterChars includes: char)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [token _ ts contents.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttokens add: token.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tts _ WriteStream on: '']\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [ts nextPut: char]]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [char == activeEscapeCharacter\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [rs peek == activeEscapeCharacter\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [ts nextPut: rs next]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [activeEscapeCharacter _ nil]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [ts nextPut: char]]].\\\\n\\\\ttoken _ ts contents.\\\\n\\\\t(tokens isEmpty and: [token isEmpty])\\\\n\\\\t\\\\tifFalse: [tokens add: token].\\\\n\\\\t^ tokens! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nfindTokens: delimiters includes: subString\\\\n\\\\t\\\\\\\"Divide self into pieces using delimiters.  Return the piece that includes subString anywhere in it.  Is case sensitive (say asLowercase to everything beforehand to make insensitive).\\\\\\\"\\\\n\\\\n^ (self findTokens: delimiters) \\\\n\\\\tdetect: [:str | (str includesSubString: subString)] \\\\n\\\\tifNone: [nil]! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nfindTokens: delimiters keep: keepers\\\\n\\\\t\\\\\\\"Answer the collection of tokens that result from parsing self.  The tokens are seperated by delimiters, any of a string of characters.  If a delimiter is also in keepers, make a token for it.  (Very useful for carriage return.  A sole return ends a line, but is also saved as a token so you can see where the line breaks were.)\\\\\\\"\\\\n\\\\n\\\\t| tokens keyStart keyStop |\\\\n\\\\ttokens _ OrderedCollection new.\\\\n\\\\tkeyStop _ 1.\\\\n\\\\t[keyStop <= self size] whileTrue:\\\\n\\\\t\\\\t[keyStart _ self skipDelimiters: delimiters startingAt: keyStop.\\\\n\\\\t\\\\tkeyStop to: keyStart-1 do: [:ii | \\\\n\\\\t\\\\t\\\\t(keepers includes: (self at: ii)) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\ttokens add: (self copyFrom: ii to: ii)]].\\\\t\\\\\\\"Make this keeper be a token\\\\\\\"\\\\n\\\\t\\\\tkeyStop _ self findDelimiters: delimiters startingAt: keyStart.\\\\n\\\\t\\\\tkeyStart < keyStop\\\\n\\\\t\\\\t\\\\tifTrue: [tokens add: (self copyFrom: keyStart to: (keyStop - 1))]].\\\\n\\\\t^tokens! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nfindWordStart: key startingAt: start\\\\n\\\\t| ind |\\\\n\\\\t\\\\\\\"HyperCard style searching.  Answer the index in self of the substring key, when that key is preceeded by a separator character.  Must occur at or beyond start.  The match is case-insensitive.  If no match is found, zero will be returned.\\\\\\\"\\\\n\\\\n\\\\tind _ start.\\\\n\\\\t[ind _ self findSubstring: key in: self startingAt: ind matchTable: CaseInsensitiveOrder.\\\\n\\\\tind = 0 ifTrue: [^ 0].\\\\t\\\\\\\"not found\\\\\\\"\\\\n\\\\tind = 1 ifTrue: [^ 1].\\\\t\\\\\\\"First char is the start of a word\\\\\\\"\\\\n\\\\t(self at: ind-1) isSeparator] whileFalse: [ind _ ind + 1].\\\\n\\\\t^ ind\\\\t\\\\\\\"is a word start\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nincludesSubString: subString\\\\n\\\\t^ (self findString: subString startingAt: 1) > 0! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nincludesSubstring: aString caseSensitive: caseSensitive\\\\n\\\\t\\\\n\\\\t^ (self findString: aString startingAt: 1 caseSensitive: caseSensitive) > 0! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 8/28/2002 16:45'!\\\\nindexOf: aCharacter\\\\n\\\\n\\\\taCharacter isCharacter ifFalse: [^ 0].\\\\n\\\\t^ self class\\\\n\\\\t\\\\tindexOfAscii: aCharacter asciiValue\\\\n\\\\t\\\\tinString: self\\\\n\\\\t\\\\tstartingAt: 1.\\\\n! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'ar 4/12/2005 16:31'!\\\\nindexOf: aCharacter startingAt: start\\\\n\\\\n\\\\t(aCharacter isCharacter) ifFalse: [^ 0].\\\\n\\\\t^ self class indexOfAscii: aCharacter asciiValue inString: self startingAt: start! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'ar 4/12/2005 16:31'!\\\\nindexOf: aCharacter  startingAt: start  ifAbsent: aBlock\\\\n\\\\t| ans |\\\\n\\\\t(aCharacter isCharacter) ifFalse: [ ^ aBlock value ].\\\\n\\\\tans _ self class indexOfAscii: aCharacter asciiValue inString: self  startingAt: start.\\\\n\\\\tans = 0\\\\n\\\\t\\\\tifTrue: [ ^ aBlock value ]\\\\n\\\\t\\\\tifFalse: [ ^ ans ]! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nindexOfAnyOf: aCharacterSet\\\\n\\\\t\\\\\\\"returns the index of the first character in the given set.  Returns 0 if none are found\\\\\\\"\\\\n\\\\t^self indexOfAnyOf: aCharacterSet  startingAt: 1! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nindexOfAnyOf: aCharacterSet  ifAbsent: aBlock\\\\n\\\\t\\\\\\\"returns the index of the first character in the given set.  Returns the evaluation of aBlock if none are found\\\\\\\"\\\\n\\\\t^self indexOfAnyOf: aCharacterSet  startingAt: 1  ifAbsent: aBlock! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nindexOfAnyOf: aCharacterSet  startingAt: start\\\\n\\\\t\\\\\\\"returns the index of the first character in the given set, starting from start.  Returns 0 if none are found\\\\\\\"\\\\n\\\\t^self indexOfAnyOf: aCharacterSet  startingAt: start  ifAbsent: [ 0 ]! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'ar 4/10/2005 16:22'!\\\\nindexOfAnyOf: aCharacterSet  startingAt: start ifAbsent: aBlock\\\\n\\\\t\\\\\\\"returns the index of the first character in the given set, starting from start\\\\\\\"\\\\n\\\\n\\\\t| ans |\\\\n\\\\tans _ self class findFirstInString: self  inSet: aCharacterSet byteArrayMap startingAt: start.\\\\n\\\\n\\\\tans = 0 \\\\n\\\\t\\\\tifTrue: [ ^aBlock value ]\\\\n\\\\t\\\\tifFalse: [ ^ans ]! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nindexOfSubCollection: sub \\\\n\\\\t#Collectn.\\\\n\\\\t\\\\\\\"Added 2000/04/08 For ANSI <sequenceReadableCollection> protocol.\\\\\\\"\\\\n\\\\t^ self\\\\n\\\\t\\\\tindexOfSubCollection: sub\\\\n\\\\t\\\\tstartingAt: 1\\\\n\\\\t\\\\tifAbsent: [0]! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nindexOfSubCollection: sub startingAt: start ifAbsent: exceptionBlock\\\\n\\\\t| index |\\\\n\\\\tindex _ self findSubstring: sub in: self startingAt: start matchTable: CaseSensitiveOrder.\\\\n\\\\tindex = 0 ifTrue: [^ exceptionBlock value].\\\\n\\\\t^ index! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nlastIndexOfPKSignature: aSignature\\\\n\\\\t\\\\\\\"Answer the last index in me where aSignature (4 bytes long) occurs, or 0 if not found\\\\\\\"\\\\n\\\\t| a b c d |\\\\n\\\\ta _ aSignature first.\\\\n\\\\tb _ aSignature second.\\\\n\\\\tc _ aSignature third.\\\\n\\\\td _ aSignature fourth.\\\\n\\\\t(self size - 3) to: 1 by: -1 do: [ :i |\\\\n\\\\t\\\\t(((self at: i) = a)\\\\n\\\\t\\\\t\\\\tand: [ ((self at: i + 1) = b)\\\\n\\\\t\\\\t\\\\t\\\\tand: [ ((self at: i + 2) = c)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [ ((self at: i + 3) = d) ]]])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [ ^i ]\\\\n\\\\t].\\\\n\\\\t^0! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 12/17/2002 16:56'!\\\\nleadingCharRunLengthAt: index\\\\n\\\\n\\\\t| leadingChar |\\\\n\\\\tleadingChar _ (self at: index) leadingChar.\\\\n\\\\tindex to: self size do: [:i |\\\\n\\\\t\\\\t(self at: i) leadingChar ~= leadingChar ifTrue: [^ i - index].\\\\n\\\\t].\\\\n\\\\t^ self size - index + 1.\\\\n! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 8/27/2002 14:33'!\\\\nlineCorrespondingToIndex: anIndex\\\\n\\\\t\\\\\\\"Answer a string containing the line at the given character position.  1/15/96 sw:  Inefficient first stab at this\\\\\\\"\\\\n\\\\n\\\\t| cr aChar answer |\\\\n\\\\tcr _ Character cr.\\\\n\\\\tanswer _ ''.\\\\n\\\\t1 to: self size do:\\\\n\\\\t\\\\t[:i | \\\\n\\\\t\\\\t\\\\taChar _ self at: i.\\\\n\\\\t\\\\t\\\\taChar = cr\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[i > anIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[^ answer]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[answer _ '']]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[answer _ answer copyWith: aChar]].\\\\n\\\\t^ answer! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 8/27/2002 14:34'!\\\\nlineCount\\\\n\\\\t\\\\\\\"Answer the number of lines represented by the receiver, where every cr adds one line.  5/10/96 sw\\\\\\\"\\\\n\\\\n\\\\t| cr count |\\\\n\\\\tcr _ Character cr.\\\\n\\\\tcount _ 1  min: self size..\\\\n\\\\t1 to: self size do:\\\\n\\\\t\\\\t[:i | (self at: i) = cr ifTrue: [count _ count + 1]].\\\\n\\\\t^ count\\\\n\\\\n\\\\\\\"\\\\n'Fred\\\\nthe\\\\nBear' lineCount\\\\n\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 8/27/2002 14:34'!\\\\nlineNumber: anIndex\\\\n\\\\t\\\\\\\"Answer a string containing the characters in the given line number.  5/10/96 sw\\\\\\\"\\\\n\\\\n\\\\t| crString pos finalPos |\\\\n\\\\tcrString _ String with: Character cr.\\\\n\\\\tpos _ 0.\\\\n\\\\t1 to: anIndex - 1 do:\\\\n\\\\t\\\\t[:i | pos _ self findString: crString startingAt: pos + 1.\\\\n\\\\t\\\\t\\\\tpos = 0 ifTrue: [^ nil]].\\\\n\\\\tfinalPos _ self findString: crString startingAt: pos + 1.\\\\n\\\\tfinalPos = 0 ifTrue: [finalPos _ self size + 1].\\\\n\\\\t^ self copyFrom: pos + 1 to: finalPos - 1\\\\n\\\\n\\\\\\\"\\\\n'Fred\\\\nthe\\\\nBear' lineNumber: 3\\\\n\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nlinesDo: aBlock\\\\n\\\\t\\\\\\\"execute aBlock with each line in this string.  The terminating CR's are not included in what is passed to aBlock\\\\\\\"\\\\n\\\\t| start end |\\\\n\\\\tstart _ 1.\\\\n\\\\t[ start <= self size ] whileTrue: [\\\\n\\\\t\\\\tend _ self indexOf: Character cr  startingAt: start  ifAbsent: [ self size + 1 ].\\\\n\\\\t\\\\tend _ end - 1.\\\\n\\\\n\\\\t\\\\taBlock value: (self copyFrom: start  to: end).\\\\n\\\\t\\\\tstart _ end + 2. ].! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 8/28/2002 14:28'!\\\\nskipAnySubStr: delimiters startingAt: start \\\\n\\\\t\\\\\\\"Answer the index of the last character within the receiver, starting at start, that does NOT match one of the delimiters. delimiters is a Array of substrings (Characters also allowed).  If the receiver is all delimiters, answer size + 1.\\\\\\\"\\\\n\\\\n\\\\t| any this ind ii |\\\\n\\\\tii _ start-1.\\\\n\\\\t[(ii _ ii + 1) <= self size] whileTrue: [ \\\\\\\"look for char that does not match\\\\\\\"\\\\n\\\\t\\\\tany _ false.\\\\n\\\\t\\\\tdelimiters do: [:delim |\\\\n\\\\t\\\\t\\\\tdelim isCharacter \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [(self at: ii) == delim ifTrue: [any _ true]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\\\\"a substring\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdelim size > (self size - ii + 1) ifFalse: \\\\\\\"Here's where the one-off error was.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[ind _ 0.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tthis _ true.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdelim do: [:dd | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdd == (self at: ii+ind) ifFalse: [this _ false].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tind _ ind + 1].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tthis ifTrue: [ii _ ii + delim size - 1.  any _ true]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [any _ false] \\\\\\\"if the delim is too big, it can't match\\\\\\\"]].\\\\n\\\\t\\\\tany ifFalse: [^ ii]].\\\\n\\\\t^ self size + 1! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nskipDelimiters: delimiters startingAt: start \\\\n\\\\t\\\\\\\"Answer the index of the character within the receiver, starting at start, that does NOT match one of the delimiters. If the receiver does not contain any of the delimiters, answer size + 1.  Assumes the delimiters to be a non-empty string.\\\\\\\"\\\\n\\\\n\\\\tstart to: self size do: [:i |\\\\n\\\\t\\\\tdelimiters detect: [:delim | delim = (self at: i)]\\\\n\\\\t\\\\t\\\\t\\\\tifNone: [^ i]].\\\\n\\\\t^ self size + 1! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nstartsWithDigit\\\\n\\\\t\\\\\\\"Answer whether the receiver's first character represents a digit\\\\\\\"\\\\n\\\\n\\\\t^ self size > 0 and: [self first isDigit]! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'md 5/26/2005 13:35'!\\\\nstring\\\\n\\\\t^self! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\ntabDelimitedFieldsDo: aBlock\\\\n\\\\t\\\\\\\"Considering the receiver as a holder of tab-delimited fields, evaluate execute aBlock with each field in this string.  The separatilng tabs are not included in what is passed to aBlock\\\\\\\"\\\\n\\\\n\\\\t| start end |\\\\n\\\\t\\\\\\\"No senders but was useful enough in earlier work that it's retained for the moment.\\\\\\\"\\\\n\\\\tstart _ 1.\\\\n\\\\t[start <= self size] whileTrue: \\\\n\\\\t\\\\t[end _ self indexOf: Character tab startingAt: start ifAbsent: [self size + 1].\\\\n\\\\t\\\\tend _ end - 1.\\\\n\\\\t\\\\taBlock value: (self copyFrom: start  to: end).\\\\n\\\\t\\\\tstart _ end + 2]\\\\n\\\\n\\\\\\\"\\\\n'fred\\\\tcharlie\\\\telmo\\\\t\\\\t2' tabDelimitedFieldsDo: [:aField | Transcript cr; show: aField]\\\\n\\\\\\\"! !\\\\n\\\\n\\\\n!String methodsFor: 'arithmetic' stamp: 'yo 11/3/2004 19:24'!\\\\n* arg\\\\n\\\\n\\\\t^ arg adaptToString: self andSend: #*! !\\\\n\\\\n!String methodsFor: 'arithmetic' stamp: 'yo 11/3/2004 19:24'!\\\\n+ arg\\\\n\\\\n\\\\t^ arg adaptToString: self andSend: #+! !\\\\n\\\\n!String methodsFor: 'arithmetic' stamp: 'yo 11/3/2004 19:24'!\\\\n- arg\\\\n\\\\n\\\\t^ arg adaptToString: self andSend: #-! !\\\\n\\\\n!String methodsFor: 'arithmetic' stamp: 'yo 11/3/2004 19:24'!\\\\n/ arg\\\\n\\\\n\\\\t^ arg adaptToString: self andSend: #/! !\\\\n\\\\n!String methodsFor: 'arithmetic' stamp: 'yo 11/3/2004 19:24'!\\\\n// arg\\\\n\\\\n\\\\t^ arg adaptToString: self andSend: #//! !\\\\n\\\\n!String methodsFor: 'arithmetic' stamp: 'yo 11/3/2004 19:24'!\\\\n\\\\\\\\\\\\\\\\ arg\\\\n\\\\n\\\\t^ arg adaptToString: self andSend: #\\\\\\\\\\\\\\\\! !\\\\n\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'lr 7/7/2006 11:19'!\\\\n< aString \\\\n\\\\t\\\\\\\"Answer whether the receiver sorts before aString.\\\\n\\\\tThe collation order is simple ascii (with case differences).\\\\\\\"\\\\n\\\\n\\\\t^ (self compare: self with: aString collated: AsciiOrder) = 1! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'lr 7/7/2006 11:20'!\\\\n<= aString \\\\n\\\\t\\\\\\\"Answer whether the receiver sorts before or equal to aString.\\\\n\\\\tThe collation order is simple ascii (with case differences).\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ (self compare: self with: aString collated: AsciiOrder) <= 2! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'lr 7/7/2006 11:21'!\\\\n= aString \\\\n\\\\t\\\\\\\"Answer whether the receiver sorts equally as aString.\\\\n\\\\tThe collation order is simple ascii (with case differences).\\\\\\\"\\\\n\\\\t\\\\n\\\\taString isString ifFalse: [ ^ false ].\\\\n\\\\t^ (self compare: self with: aString collated: AsciiOrder) = 2! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'lr 7/7/2006 11:21'!\\\\n> aString \\\\n\\\\t\\\\\\\"Answer whether the receiver sorts after aString.\\\\n\\\\tThe collation order is simple ascii (with case differences).\\\\\\\"\\\\n\\\\n\\\\t^ (self compare: self with: aString collated: AsciiOrder) = 3! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'lr 7/7/2006 11:21'!\\\\n>= aString \\\\n\\\\t\\\\\\\"Answer whether the receiver sorts after or equal to aString.\\\\n\\\\tThe collation order is simple ascii (with case differences).\\\\\\\"\\\\n\\\\n\\\\t^ (self compare: self with: aString collated: AsciiOrder) >= 2! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'yo 11/3/2004 19:24'!\\\\nalike: aString \\\\n\\\\t\\\\\\\"Answer some indication of how alike the receiver is to the argument,  0 is no match, twice aString size is best score.  Case is ignored.\\\\\\\"\\\\n\\\\n\\\\t| i j k minSize bonus |\\\\n\\\\tminSize _ (j _ self size) min: (k _ aString size).\\\\n\\\\tbonus _ (j - k) abs < 2 ifTrue: [ 1 ] ifFalse: [ 0 ].\\\\n\\\\ti _ 1.\\\\n\\\\t[(i <= minSize) and: [((super at: i) bitAnd: 16rDF)  = ((aString at: i) asciiValue bitAnd: 16rDF)]]\\\\n\\\\t\\\\twhileTrue: [ i _ i + 1 ].\\\\n\\\\t[(j > 0) and: [(k > 0) and:\\\\n\\\\t\\\\t[((super at: j) bitAnd: 16rDF) = ((aString at: k) asciiValue bitAnd: 16rDF)]]]\\\\n\\\\t\\\\t\\\\twhileTrue: [ j _ j - 1.  k _ k - 1. ].\\\\n\\\\t^ i - 1 + self size - j + bonus. ! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'yo 11/3/2004 19:24'!\\\\nbeginsWith: prefix\\\\n\\\\t\\\\\\\"Answer whether the receiver begins with the given prefix string.\\\\n\\\\tThe comparison is case-sensitive.\\\\\\\"\\\\n\\\\n\\\\tself size < prefix size ifTrue: [^ false].\\\\n\\\\t^ (self findSubstring: prefix in: self startingAt: 1\\\\n\\\\t\\\\t\\\\tmatchTable: CaseSensitiveOrder) = 1\\\\n! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'ar 4/10/2005 16:39'!\\\\ncaseInsensitiveLessOrEqual: aString \\\\n\\\\t\\\\\\\"Answer whether the receiver sorts before or equal to aString.\\\\n\\\\tThe collation order is case insensitive.\\\\\\\"\\\\n\\\\t^(self compare: aString caseSensitive: false) <= 2! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'ar 4/10/2005 16:39'!\\\\ncaseSensitiveLessOrEqual: aString \\\\n\\\\t\\\\\\\"Answer whether the receiver sorts before or equal to aString.\\\\n\\\\tThe collation order is case sensitive.\\\\\\\"\\\\n\\\\t^(self compare: aString caseSensitive: true) <= 2! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'yo 8/27/2002 14:15'!\\\\ncharactersExactlyMatching: aString\\\\n\\\\t\\\\\\\"Do a character-by-character comparison between the receiver and aString.  Return the index of the final character that matched exactly.\\\\\\\"\\\\n\\\\n\\\\t| count |\\\\n\\\\tcount _ self size min: aString size.\\\\n\\\\t1 to: count do: [:i | \\\\n\\\\t\\\\t(self at: i) = (aString at: i) ifFalse: [\\\\n\\\\t\\\\t\\\\t^ i - 1]].\\\\n\\\\t^ count! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'ar 4/10/2005 16:38'!\\\\ncompare: aString \\\\n\\\\t\\\\\\\"Answer a comparison code telling how the receiver sorts relative to aString:\\\\n\\\\t\\\\t1 - before\\\\n\\\\t\\\\t2 - equal\\\\n\\\\t\\\\t3 - after.\\\\n\\\\tThe collation sequence is ascii with case differences ignored.\\\\n\\\\tTo get the effect of a <= b, but ignoring case, use (a compare: b) <= 2.\\\\\\\"\\\\n\\\\t^self compare: aString caseSensitive: false! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'ar 4/10/2005 16:42'!\\\\ncompare: aString caseSensitive: aBool\\\\n\\\\t\\\\\\\"Answer a comparison code telling how the receiver sorts relative to aString:\\\\n\\\\t\\\\t1 - before\\\\n\\\\t\\\\t2 - equal\\\\n\\\\t\\\\t3 - after.\\\\n\\\\t\\\\\\\"\\\\n\\\\t| map |\\\\n\\\\tmap := aBool ifTrue:[CaseSensitiveOrder] ifFalse:[CaseInsensitiveOrder].\\\\n\\\\t^self compare: self with: aString collated: map! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'yo 12/15/2005 14:28'!\\\\ncompare: string1 with: string2 collated: order\\\\n\\\\n\\\\t(string1 isByteString and: [string2 isByteString]) ifTrue: [\\\\n\\\\t\\\\t^ ByteString compare: string1 with: string2 collated: order\\\\n\\\\t].\\\\n     \\\\\\\"Primitive does not fail properly right now\\\\\\\"\\\\n      ^ String compare: string1 with: string2 collated: order\\\\n\\\\n\\\\\\\"\\\\nself assert: 'abc' = 'abc' asWideString.\\\\nself assert: 'abc' asWideString = 'abc'.\\\\nself assert: ((ByteArray with: 97 with: 0 with: 0 with: 0) asString ~= 'a000' asWideString).\\\\nself assert: ('a000' asWideString ~= (ByteArray with: 97 with: 0 with: 0 with: 0) asString).\\\\n\\\\nself assert: ('abc' sameAs: 'aBc' asWideString).\\\\nself assert: ('aBc' asWideString sameAs: 'abc').\\\\nself assert: ((ByteArray with: 97 with: 0 with: 0 with: 0) asString sameAs: 'Abcd' asWideString) not.\\\\nself assert: ('a000' asWideString sameAs: (ByteArray with: 97 with: 0 with: 0 with: 0) asString) not.\\\\n\\\\n\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'ar 4/10/2005 17:27'!\\\\ncrc16\\\\n\\\\t\\\\\\\"Compute a 16 bit cyclic redundancy check.\\\\\\\"\\\\n\\\\n\\\\t| crc |\\\\n\\\\tcrc := 0.\\\\n\\\\t1 to: self byteSize do: [:i |\\\\n\\\\t\\\\tcrc := (crc bitShift: -8) bitXor: (\\\\n\\\\t\\\\t #(\\\\t16r0000\\\\t16rC0C1\\\\t16rC181\\\\t16r0140\\\\t16rC301\\\\t16r03C0\\\\t16r0280\\\\t16rC241\\\\n\\\\t\\\\t\\\\t16rC601\\\\t16r06C0\\\\t16r0780\\\\t16rC741\\\\t16r0500\\\\t16rC5C1\\\\t16rC481\\\\t16r0440\\\\n\\\\t\\\\t\\\\t16rCC01\\\\t16r0CC0\\\\t16r0D80\\\\t16rCD41\\\\t16r0F00\\\\t16rCFC1\\\\t16rCE81\\\\t16r0E40\\\\n\\\\t\\\\t\\\\t16r0A00\\\\t16rCAC1\\\\t16rCB81\\\\t16r0B40\\\\t16rC901\\\\t16r09C0\\\\t16r0880\\\\t16rC841\\\\n\\\\t\\\\t\\\\t16rD801\\\\t16r18C0\\\\t16r1980\\\\t16rD941\\\\t16r1B00\\\\t16rDBC1\\\\t16rDA81\\\\t16r1A40\\\\n\\\\t\\\\t\\\\t16r1E00\\\\t16rDEC1\\\\t16rDF81\\\\t16r1F40\\\\t16rDD01\\\\t16r1DC0\\\\t16r1C80\\\\t16rDC41\\\\n\\\\t\\\\t\\\\t16r1400\\\\t16rD4C1\\\\t16rD581\\\\t16r1540\\\\t16rD701\\\\t16r17C0\\\\t16r1680\\\\t16rD641\\\\n\\\\t\\\\t\\\\t16rD201\\\\t16r12C0\\\\t16r1380\\\\t16rD341\\\\t16r1100\\\\t16rD1C1\\\\t16rD081\\\\t16r1040\\\\n\\\\t\\\\t\\\\t16rF001\\\\t16r30C0\\\\t16r3180\\\\t16rF141\\\\t16r3300\\\\t16rF3C1\\\\t16rF281\\\\t16r3240\\\\n\\\\t\\\\t\\\\t16r3600\\\\t16rF6C1\\\\t16rF781\\\\t16r3740\\\\t16rF501\\\\t16r35C0\\\\t16r3480\\\\t16rF441\\\\n\\\\t\\\\t\\\\t16r3C00\\\\t16rFCC1\\\\t16rFD81\\\\t16r3D40\\\\t16rFF01\\\\t16r3FC0\\\\t16r3E80\\\\t16rFE41\\\\n\\\\t\\\\t\\\\t16rFA01\\\\t16r3AC0\\\\t16r3B80\\\\t16rFB41\\\\t16r3900\\\\t16rF9C1\\\\t16rF881\\\\t16r3840\\\\n\\\\t\\\\t\\\\t16r2800\\\\t16rE8C1\\\\t16rE981\\\\t16r2940\\\\t16rEB01\\\\t16r2BC0\\\\t16r2A80\\\\t16rEA41\\\\n\\\\t\\\\t\\\\t16rEE01\\\\t16r2EC0\\\\t16r2F80\\\\t16rEF41\\\\t16r2D00\\\\t16rEDC1\\\\t16rEC81\\\\t16r2C40\\\\n\\\\t\\\\t\\\\t16rE401\\\\t16r24C0\\\\t16r2580\\\\t16rE541\\\\t16r2700\\\\t16rE7C1\\\\t16rE681\\\\t16r2640\\\\n\\\\t\\\\t\\\\t16r2200\\\\t16rE2C1\\\\t16rE381\\\\t16r2340\\\\t16rE101\\\\t16r21C0\\\\t16r2080\\\\t16rE041\\\\n\\\\t\\\\t\\\\t16rA001\\\\t16r60C0\\\\t16r6180\\\\t16rA141\\\\t16r6300\\\\t16rA3C1\\\\t16rA281\\\\t16r6240\\\\n\\\\t\\\\t\\\\t16r6600\\\\t16rA6C1\\\\t16rA781\\\\t16r6740\\\\t16rA501\\\\t16r65C0\\\\t16r6480\\\\t16rA441\\\\n\\\\t\\\\t\\\\t16r6C00\\\\t16rACC1\\\\t16rAD81\\\\t16r6D40\\\\t16rAF01\\\\t16r6FC0\\\\t16r6E80\\\\t16rAE41\\\\n\\\\t\\\\t\\\\t16rAA01\\\\t16r6AC0\\\\t16r6B80\\\\t16rAB41\\\\t16r6900\\\\t16rA9C1\\\\t16rA881\\\\t16r6840\\\\n\\\\t\\\\t\\\\t16r7800\\\\t16rB8C1\\\\t16rB981\\\\t16r7940\\\\t16rBB01\\\\t16r7BC0\\\\t16r7A80\\\\t16rBA41\\\\n\\\\t\\\\t\\\\t16rBE01\\\\t16r7EC0\\\\t16r7F80\\\\t16rBF41\\\\t16r7D00\\\\t16rBDC1\\\\t16rBC81\\\\t16r7C40\\\\n\\\\t\\\\t\\\\t16rB401\\\\t16r74C0\\\\t16r7580\\\\t16rB541\\\\t16r7700\\\\t16rB7C1\\\\t16rB681\\\\t16r7640\\\\n\\\\t\\\\t\\\\t16r7200\\\\t16rB2C1\\\\t16rB381\\\\t16r7340\\\\t16rB101\\\\t16r71C0\\\\t16r7080\\\\t16rB041\\\\n\\\\t\\\\t\\\\t16r5000\\\\t16r90C1\\\\t16r9181\\\\t16r5140\\\\t16r9301\\\\t16r53C0\\\\t16r5280\\\\t16r9241\\\\n\\\\t\\\\t\\\\t16r9601\\\\t16r56C0\\\\t16r5780\\\\t16r9741\\\\t16r5500\\\\t16r95C1\\\\t16r9481\\\\t16r5440\\\\n\\\\t\\\\t\\\\t16r9C01\\\\t16r5CC0\\\\t16r5D80\\\\t16r9D41\\\\t16r5F00\\\\t16r9FC1\\\\t16r9E81\\\\t16r5E40\\\\n\\\\t\\\\t\\\\t16r5A00\\\\t16r9AC1\\\\t16r9B81\\\\t16r5B40\\\\t16r9901\\\\t16r59C0\\\\t16r5880\\\\t16r9841\\\\n\\\\t\\\\t\\\\t16r8801\\\\t16r48C0\\\\t16r4980\\\\t16r8941\\\\t16r4B00\\\\t16r8BC1\\\\t16r8A81\\\\t16r4A40\\\\n\\\\t\\\\t\\\\t16r4E00\\\\t16r8EC1\\\\t16r8F81\\\\t16r4F40\\\\t16r8D01\\\\t16r4DC0\\\\t16r4C80\\\\t16r8C41\\\\n\\\\t\\\\t\\\\t16r4400\\\\t16r84C1\\\\t16r8581\\\\t16r4540\\\\t16r8701\\\\t16r47C0\\\\t16r4680\\\\t16r8641\\\\n\\\\t\\\\t\\\\t16r8201\\\\t16r42C0\\\\t16r4380\\\\t16r8341\\\\t16r4100\\\\t16r81C1\\\\t16r8081\\\\t16r4040)\\\\n\\\\t\\\\t\\\\t at: ((crc bitXor: (self byteAt: i)) bitAnd: 16rFF) + 1) ].\\\\n\\\\t^crc! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'yo 11/3/2004 19:24'!\\\\nendsWith: suffix\\\\n\\\\t\\\\\\\"Answer whether the tail end of the receiver is the same as suffix.\\\\n\\\\tThe comparison is case-sensitive.\\\\\\\"\\\\n\\\\t| extra |\\\\n\\\\t(extra _ self size - suffix size) < 0 ifTrue: [^ false].\\\\n\\\\t^ (self findSubstring: suffix in: self startingAt: extra + 1\\\\n\\\\t\\\\t\\\\tmatchTable: CaseSensitiveOrder) > 0\\\\n\\\\\\\"\\\\n  'Elvis' endsWith: 'vis'\\\\n\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'yo 11/3/2004 19:24'!\\\\nendsWithAnyOf: aCollection\\\\n\\\\taCollection do:[:suffix|\\\\n\\\\t\\\\t(self endsWith: suffix) ifTrue:[^true].\\\\n\\\\t].\\\\n\\\\t^false! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'md 2/16/2006 17:49'!\\\\nhash\\\\n\\\\t\\\\\\\"#hash is implemented, because #= is implemented\\\\\\\"\\\\n\\\\t\\\\\\\"ar 4/10/2005: I had to change this to use ByteString hash as initial \\\\n\\\\thash in order to avoid having to rehash everything and yet compute\\\\n\\\\tthe same hash for ByteString and WideString.\\\\n\\\\tmd 16/10/2006: use identityHash as initialHash, as behavior hash will \\\\n    use String hash (name) to have a better hash soon\\\\\\\"\\\\n\\\\t^ self class stringHash: self initialHash: ByteString identityHash! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'yo 11/3/2004 19:24'!\\\\nhashMappedBy: map\\\\n\\\\t\\\\\\\"My hash is independent of my oop.\\\\\\\"\\\\n\\\\n\\\\t^self hash! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'yo 11/3/2004 19:24'!\\\\nhowManyMatch: string \\\\n\\\\t\\\\\\\"Count the number of characters that match up in self and aString.\\\\\\\"\\\\n\\\\t| count shorterLength |\\\\n\\\\t\\\\n\\\\tcount  _  0 .\\\\n\\\\tshorterLength  _  ((self size ) min: (string size ) ) .\\\\n\\\\t(1 to: shorterLength  do: [:index |\\\\n\\\\t\\\\t (((self at: index ) = (string at: index )  ) ifTrue: [count  _  (count + 1 ) .\\\\n\\\\t\\\\t\\\\t]   ).\\\\n\\\\t\\\\t]   ).\\\\n\\\\t^  count \\\\n\\\\t\\\\n\\\\t! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'yo 11/3/2004 19:24'!\\\\nmatch: text\\\\n\\\\t\\\\\\\"Answer whether text matches the pattern in this string.\\\\n\\\\tMatching ignores upper/lower case differences.\\\\n\\\\tWhere this string contains #, text may contain any character.\\\\n\\\\tWhere this string contains *, text may contain any sequence of characters.\\\\\\\"\\\\n\\\\n\\\\t^ self startingAt: 1 match: text startingAt: 1\\\\n\\\\\\\"\\\\n\\\\t'*'\\\\t\\\\t\\\\tmatch: 'zort' true\\\\n\\\\t'*baz'\\\\t\\\\tmatch: 'mobaz' true\\\\n\\\\t'*baz'\\\\t\\\\tmatch: 'mobazo' false\\\\n\\\\t'*baz*'\\\\t\\\\tmatch: 'mobazo' true\\\\n\\\\t'*baz*'\\\\t\\\\tmatch: 'mozo' false\\\\n\\\\t'foo*'\\\\t\\\\tmatch: 'foozo' true\\\\n\\\\t'foo*'\\\\t\\\\tmatch: 'bozo' false\\\\n\\\\t'foo*baz'\\\\tmatch: 'foo23baz' true\\\\n\\\\t'foo*baz'\\\\tmatch: 'foobaz' true\\\\n\\\\t'foo*baz'\\\\tmatch: 'foo23bazo' false\\\\n\\\\t'foo'\\\\t\\\\tmatch: 'Foo' true\\\\n\\\\t'foo*baz*zort' match: 'foobazort' false\\\\n\\\\t'foo*baz*zort' match: 'foobazzort' false\\\\n\\\\t'*foo#zort'\\\\tmatch: 'afoo3zortthenfoo3zort' true\\\\n\\\\t'*foo*zort'\\\\tmatch: 'afoodezortorfoo3zort' true\\\\n\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'ar 4/10/2005 17:35'!\\\\nsameAs: aString \\\\n\\\\t\\\\\\\"Answer whether the receiver sorts equal to aString. The \\\\n\\\\tcollation sequence is ascii with case differences ignored.\\\\\\\"\\\\n\\\\t^(self compare: aString caseSensitive: false) = 2! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'yo 11/3/2004 19:24'!\\\\nstartingAt: keyStart match: text startingAt: textStart\\\\n\\\\t\\\\\\\"Answer whether text matches the pattern in this string.\\\\n\\\\tMatching ignores upper/lower case differences.\\\\n\\\\tWhere this string contains #, text may contain any character.\\\\n\\\\tWhere this string contains *, text may contain any sequence of characters.\\\\\\\"\\\\n\\\\t| anyMatch matchStart matchEnd i matchStr j ii jj |\\\\n\\\\ti _ keyStart.\\\\n\\\\tj _ textStart.\\\\n\\\\n\\\\t\\\\\\\"Check for any #'s\\\\\\\"\\\\n\\\\t[i > self size ifTrue: [^ j > text size \\\\\\\"Empty key matches only empty string\\\\\\\"].\\\\n\\\\t(self at: i) = $#] whileTrue:\\\\n\\\\t\\\\t[\\\\\\\"# consumes one char of key and one char of text\\\\\\\"\\\\n\\\\t\\\\tj > text size ifTrue: [^ false \\\\\\\"no more text\\\\\\\"].\\\\n\\\\t\\\\ti _ i+1.  j _ j+1].\\\\n\\\\n\\\\t\\\\\\\"Then check for *\\\\\\\"\\\\n\\\\t(self at: i) = $*\\\\n\\\\t\\\\tifTrue: [i = self size ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[^ true \\\\\\\"Terminal * matches all\\\\\\\"].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"* means next match string can occur anywhere\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tanyMatch _ true.\\\\n\\\\t\\\\t\\\\t\\\\tmatchStart _ i + 1]\\\\n\\\\t\\\\tifFalse: [\\\\\\\"Otherwise match string must occur immediately\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tanyMatch _ false.\\\\n\\\\t\\\\t\\\\t\\\\tmatchStart _ i].\\\\n\\\\n\\\\t\\\\\\\"Now determine the match string\\\\\\\"\\\\n\\\\tmatchEnd _ self size.\\\\n\\\\t(ii _ self indexOf: $* startingAt: matchStart) > 0 ifTrue:\\\\n\\\\t\\\\t[ii = 1 ifTrue: [self error: '** not valid -- use * instead'].\\\\n\\\\t\\\\tmatchEnd _ ii-1].\\\\n\\\\t(ii _ self indexOf: $# startingAt: matchStart) > 0 ifTrue:\\\\n\\\\t\\\\t[ii = 1 ifTrue: [self error: '*# not valid -- use #* instead'].\\\\n\\\\t\\\\tmatchEnd _ matchEnd min: ii-1].\\\\n\\\\tmatchStr _ self copyFrom: matchStart to: matchEnd.\\\\n\\\\n\\\\t\\\\\\\"Now look for the match string\\\\\\\"\\\\n\\\\t[jj _ text findString: matchStr startingAt: j caseSensitive: false.\\\\n\\\\tanyMatch ifTrue: [jj > 0] ifFalse: [jj = j]]\\\\n\\\\t\\\\twhileTrue:\\\\n\\\\t\\\\t[\\\\\\\"Found matchStr at jj.  See if the rest matches...\\\\\\\"\\\\n\\\\t\\\\t(self startingAt: matchEnd+1 match: text startingAt: jj + matchStr size) ifTrue:\\\\n\\\\t\\\\t\\\\t[^ true \\\\\\\"the rest matches -- success\\\\\\\"].\\\\n\\\\t\\\\t\\\\\\\"The rest did not match.\\\\\\\"\\\\n\\\\t\\\\tanyMatch ifFalse: [^ false].\\\\n\\\\t\\\\t\\\\\\\"Preceded by * -- try for a later match\\\\\\\"\\\\n\\\\t\\\\tj _ j+1].\\\\n\\\\t^ false \\\\\\\"Failed to find the match string\\\\\\\"! !\\\\n\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nadaptToCollection: rcvr andSend: selector\\\\n\\\\t\\\\\\\"If I am involved in arithmetic with a collection, convert me to a number.\\\\\\\"\\\\n\\\\n\\\\t^ rcvr perform: selector with: self asNumber! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nadaptToNumber: rcvr andSend: selector\\\\n\\\\t\\\\\\\"If I am involved in arithmetic with a number, convert me to a number.\\\\\\\"\\\\n\\\\n\\\\t^ rcvr perform: selector with: self asNumber! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nadaptToPoint: rcvr andSend: selector\\\\n\\\\t\\\\\\\"If I am involved in arithmetic with a point, convert me to a number.\\\\\\\"\\\\n\\\\n\\\\t^ rcvr perform: selector with: self asNumber! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nadaptToString: rcvr andSend: selector\\\\n\\\\t\\\\\\\"If I am involved in arithmetic with a string, convert us both to\\\\n\\\\tnumbers, and return the printString of the result.\\\\\\\"\\\\n\\\\n\\\\t^ (rcvr asNumber perform: selector with: self asNumber) printString! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'mw 1/30/2004 11:53'!\\\\nasAlphaNumeric: totalSize extraChars: additionallyAllowed mergeUID: minimalSizeOfRandomPart\\\\n\\\\t\\\\\\\"Generates a String with unique identifier ( UID ) qualities, the difference to a\\\\n\\\\t UUID is that its beginning is derived from the receiver, so that it has a meaning\\\\n\\\\t for a human reader.\\\\n\\\\n\\\\t Answers a String of totalSize, which consists of 3 parts\\\\n\\\\t 1.part: the beginning of the receiver only consisting of\\\\n\\\\t\\\\ta-z, A-Z, 0-9 and extraChars in Collection additionallyAllowed ( which can be nil )\\\\n\\\\t 2.part: a single _\\\\n\\\\t 3.part: a ( random ) UID of size >= minimalSizeOfRandomPart consisting of\\\\n\\\\t\\\\ta-z, A-Z, 0-9\\\\n\\\\n\\\\t Starting letters are capitalized. \\\\n\\\\t TotalSize must be at least 1.\\\\n\\\\t Exactly 1 occurrence of $_ is guaranteed ( unless additionallyAllowed includes $_ ).\\\\n\\\\t The random part has even for small sizes good UID qualitites for many practical purposes.\\\\n\\\\t If only lower- or uppercase letters are demanded, simply convert the answer with\\\\n\\\\t say #asLowercase. The probability of a duplicate will rise only moderately ( see below ).\\\\n\\\\n\\\\t Example: \\\\n\\\\t\\\\tsize of random part = 10\\\\n\\\\t\\\\tin n generated UIDs the chance p of having non-unique UIDs is\\\\n\\\\t\\\\t\\\\tn = 10000 ->  p < 1e-10\\\\t\\\\tif answer is reduced to lowerCase: p < 1.4 e-8\\\\n\\\\t\\\\t\\\\tn = 100000 -> p < 1e-8\\\\n\\\\t\\\\tat the bottom is a snippet for your own calculations  \\\\n\\\\t\\\\tNote: the calculated propabilites are theoretical,\\\\n\\\\t\\\\t\\\\tfor the actually used random generator they may be much worse\\\\\\\"\\\\n\\\\n\\\\t| stream out sizeOfFirstPart index ascii ch skip array random |\\\\n\\\\ttotalSize > minimalSizeOfRandomPart \\\\n\\\\t\\\\tifFalse: [ self errorOutOfBounds ].\\\\n\\\\tstream := ReadStream on: self.\\\\n\\\\tout := WriteStream on: ( String new: totalSize ).\\\\n\\\\tindex := 0.\\\\n\\\\tskip := true.\\\\n\\\\tsizeOfFirstPart := totalSize - minimalSizeOfRandomPart - 1.\\\\n\\\\t[ stream atEnd or: [ index >= sizeOfFirstPart ]]\\\\n\\\\twhileFalse: [\\\\n\\\\t\\\\t((( ascii := ( ch := stream next ) asciiValue ) >= 65 and: [ ascii <= 90 ]) or: [\\\\n\\\\t\\\\t\\\\t( ascii >= 97 and: [ ascii <= 122 ]) or: [\\\\t\\\\t\\\\t \\\\n\\\\t\\\\t\\\\tch isDigit or: [\\\\n\\\\t\\\\t\\\\tadditionallyAllowed notNil and: [ additionallyAllowed includes: ch ]]]])\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\tskip\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [ out nextPut: ch asUppercase ]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [ out nextPut: ch ].\\\\n\\\\t\\\\t\\\\tindex := index + 1.\\\\n\\\\t\\\\t\\\\tskip := false ]\\\\n\\\\t\\\\tifFalse: [ skip := true ]].\\\\n\\\\tout nextPut: $_.\\\\n\\\\tarray := Array new: 62.\\\\n\\\\t1 to: 26 do: [ :i |\\\\n\\\\t\\\\tarray at: i put: ( i + 64 ) asCharacter.\\\\n\\\\t\\\\tarray at: i + 26 put: ( i + 96 ) asCharacter ].\\\\n\\\\t53 to: 62 do: [ :i |\\\\n\\\\t\\\\tarray at: i put: ( i - 5 ) asCharacter ].\\\\n\\\\trandom := UUIDGenerator default randomGenerator. \\\\n\\\\ttotalSize - index - 1 timesRepeat: [\\\\n\\\\t\\\\tout nextPut: ( array atRandom: random )].\\\\n\\\\t^out contents\\\\n\\\\n\\\\t\\\\\\\"\\\\tcalculation of probability p for failure of uniqueness in n UIDs\\\\n\\\\t\\\\tNote: if answer will be converted to upper or lower case replace 62 with 36\\\\n\\\\t| n i p all |\\\\n\\\\tall := 62 raisedTo: sizeOfRandomPart.\\\\n\\\\ti := 1.\\\\n\\\\tp := 0.0 .\\\\n\\\\tn := 10000.\\\\n\\\\t[ i <= n ]\\\\n\\\\twhileTrue: [\\\\n\\\\t\\\\tp := p + (( i - 1 ) / all ).\\\\n\\\\t\\\\ti := i + 1 ].\\\\n\\\\tp   \\\\n\\\\n\\\\tapproximation formula: n squared / ( 62.0 raisedTo: sizeOfRandomPart ) / 2 \\\\n\\\\t\\\\\\\" \\\\n\\\\n\\\\t\\\\\\\"'Crop SketchMorphs and Grab Screen Rect to JPG' \\\\n\\\\t\\\\t\\\\tasAlphaNumeric: 31 extraChars: nil mergeUID: 10  \\\\n\\\\t \\\\t\\\\t\\\\t'CropSketchMorphsAndG_iOw94jquN6'\\\\n\\\\t 'Monticello' \\\\n\\\\t\\\\t\\\\tasAlphaNumeric: 31 extraChars: nil mergeUID: 10    \\\\n\\\\t\\\\t\\\\t\\\\t'Monticello_kp6aV2l0IZK9uBULGOeG' \\\\n\\\\t 'version-', ( '1.1.2' replaceAll: $. with: $- )\\\\n\\\\t\\\\t\\\\tasAlphaNumeric: 31 extraChars: #( $- ) mergeUID: 10    \\\\n\\\\t\\\\t\\\\t\\\\t'Version-1-1-2_kuz2tMg2xX9iRLDVR'\\\\\\\"\\\\n\\\\t\\\\t! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'ar 4/10/2005 17:18'!\\\\nasByteArray\\\\n\\\\t\\\\\\\"Convert to a ByteArray with the ascii values of the string.\\\\\\\"\\\\n\\\\t| b |\\\\n\\\\tb _ ByteArray new: self byteSize.\\\\n\\\\t1 to: self size * 4 do: [:i |\\\\n\\\\t\\\\tb at: i put: (self byteAt: i).\\\\n\\\\t].\\\\n\\\\t^ b.\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'ar 4/10/2005 16:22'!\\\\nasByteString\\\\n\\\\t\\\\\\\"Convert the receiver into a ByteString\\\\\\\"\\\\n\\\\t^self asOctetString! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'ar 4/10/2005 17:03'!\\\\nasCharacter\\\\n\\\\t\\\\\\\"Answer the receiver's first character, or '*' if none.  Idiosyncratic, provisional.\\\\\\\"\\\\n\\\\n\\\\t^ self size > 0 ifTrue: [self first] ifFalse:[$\\\\U00b7]! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasDate\\\\n\\\\t\\\\\\\"Many allowed forms, see Date>>#readFrom:\\\\\\\"\\\\n\\\\n\\\\t^ Date fromString: self! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasDateAndTime\\\\n\\\\n\\\\n\\\\n\\\\t\\\\\\\"Convert from UTC format\\\\\\\" \\\\t^ DateAndTime fromString: self! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 10/22/2002 17:38'!\\\\nasDefaultDecodedString\\\\n\\\\n\\\\t^ self\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasDisplayText\\\\n\\\\t\\\\\\\"Answer a DisplayText whose text string is the receiver.\\\\\\\"\\\\n\\\\n\\\\t^DisplayText text: self asText! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasDuration\\\\n\\\\n\\\\t\\\\\\\"convert from [nnnd]hh:mm:ss[.nanos] format. [] implies optional elements\\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\t^ Duration fromString: self\\\\n\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'ar 4/12/2005 13:55'!\\\\nasFileName\\\\n\\\\t\\\\\\\"Answer a String made up from the receiver that is an acceptable file \\\\n\\\\tname.\\\\\\\"\\\\n\\\\n\\\\t| string checkedString |\\\\n\\\\tstring _ FileDirectory checkName: self fixErrors: true.\\\\n\\\\tcheckedString _ (FilePath pathName: string) asVmPathName.\\\\n\\\\t^ (FilePath pathName: checkedString isEncoded: true) asSqueakPathName.\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 8/27/2002 14:38'!\\\\nasFourCode\\\\n\\\\n\\\\t| result |\\\\n\\\\tself size = 4 ifFalse: [^self error: 'must be exactly four characters'].\\\\n\\\\tresult _ self inject: 0 into: [:val :each | 256 * val + each asciiValue].\\\\n\\\\t(result bitAnd: 16r80000000) = 0 \\\\n\\\\t\\\\tifFalse: [self error: 'cannot resolve fourcode'].\\\\n\\\\t(result bitAnd: 16r40000000) = 0 ifFalse: [^result - 16r80000000].\\\\n\\\\t^ result\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 8/26/2002 23:06'!\\\\nasHex\\\\n\\\\t| stream |\\\\n\\\\tstream _ WriteStream on: (String new: self size * 4).\\\\n\\\\tself do: [ :ch | stream nextPutAll: ch hex ].\\\\n\\\\t^stream contents! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasHtml\\\\n\\\\t\\\\\\\"Do the basic character conversion for HTML.  Leave all original return \\\\n\\\\tand tabs in place, so can conver back by simply removing bracked \\\\n\\\\tthings. 4/4/96 tk\\\\\\\"\\\\n\\\\t| temp |\\\\n\\\\ttemp _ self copyReplaceAll: '&' with: '&amp;'.\\\\n\\\\tHtmlEntities keysAndValuesDo:\\\\n\\\\t\\\\t[:entity :char |\\\\n\\\\t\\\\tchar = $& ifFalse:\\\\n\\\\t\\\\t\\\\t[temp _ temp copyReplaceAll: char asString with: '&' , entity , ';']].\\\\n\\\\ttemp _ temp copyReplaceAll: '\\\\t' with: '\\\\t<IMG SRC=\\\\\\\"tab.gif\\\\\\\" ALT=\\\\\\\"    \\\\\\\">'.\\\\n\\\\ttemp _ temp copyReplaceAll: '\\\\n' with: '\\\\n<BR>'.\\\\n\\\\t^ temp\\\\n\\\\n\\\\\\\"\\\\n\\\\t'A<&>B' asHtml\\\\n\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasIRCLowercase\\\\n\\\\t\\\\\\\"Answer a String made up from the receiver whose characters are all \\\\n\\\\tlowercase, where 'lowercase' is by IRC's definition\\\\\\\"\\\\n\\\\n\\\\t^self collect: [ :c | c asIRCLowercase ]! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasIdentifier: shouldBeCapitalized\\\\n\\\\t\\\\\\\"Return a legal identifier, with first character in upper case if shouldBeCapitalized is true, else lower case.  This will always return a legal identifier, even for an empty string\\\\\\\"\\\\n\\\\n\\\\t| aString firstChar firstLetterPosition |\\\\n\\\\taString _ self select: [:el | el isAlphaNumeric].\\\\n\\\\tfirstLetterPosition _ aString findFirst: [:ch | ch isLetter].\\\\n\\\\taString _ firstLetterPosition == 0\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[aString copyFrom: firstLetterPosition to: aString size]\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t['a', aString].\\\\n\\\\tfirstChar _ shouldBeCapitalized ifTrue: [aString first asUppercase] ifFalse: [aString first asLowercase].\\\\n\\\\n\\\\t^ firstChar asString, (aString copyFrom: 2 to: aString size)\\\\n\\\\\\\"\\\\n'234Fred987' asIdentifier: false\\\\n'235Fred987' asIdentifier: true\\\\n'' asIdentifier: true\\\\n'()87234' asIdentifier: false\\\\n'())z>=PPve889  U >' asIdentifier: false\\\\n\\\\n\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'laza 10/1/2004 09:55'!\\\\nasInteger \\\\n\\\\t^self asSignedInteger\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasLegalSelector\\\\n\\\\t| toUse |\\\\n\\\\ttoUse _ ''.\\\\n\\\\tself do:\\\\n\\\\t\\\\t[:char | char isAlphaNumeric ifTrue: [toUse _ toUse copyWith: char]].\\\\n\\\\t(self size == 0 or: [self first isLetter not])\\\\n\\\\t\\\\tifTrue:\\\\t\\\\t[toUse _ 'v', toUse].\\\\n\\\\n\\\\t^ toUse withFirstCharacterDownshifted\\\\n\\\\n\\\\\\\"'234znak 43 ) 2' asLegalSelector\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasLowercase\\\\n\\\\t\\\\\\\"Answer a String made up from the receiver whose characters are all \\\\n\\\\tlowercase.\\\\\\\"\\\\n\\\\n\\\\t^ self copy asString translateToLowercase! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasNumber \\\\n\\\\t\\\\\\\"Answer the Number created by interpreting the receiver as the string \\\\n\\\\trepresentation of a number.\\\\\\\"\\\\n\\\\n\\\\t^Number readFromString: self! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'ar 4/10/2005 20:55'!\\\\nasOctetString\\\\n\\\\t\\\\\\\"Convert the receiver into an octet string\\\\\\\"\\\\n\\\\t| string |\\\\n\\\\tstring _ String new: self size.\\\\n\\\\t1 to: self size do: [:i | string at: i put: (self at: i)].\\\\n\\\\t^string! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 8/27/2002 14:39'!\\\\nasPacked\\\\n\\\\t\\\\\\\"Convert to a longinteger that describes the string\\\\\\\"\\\\n\\\\n\\\\t^ self inject: 0 into: [ :pack :next | pack _ pack * 256 + next asInteger ].! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasParagraph\\\\n\\\\t\\\\\\\"Answer a Paragraph whose text string is the receiver.\\\\\\\"\\\\n\\\\n\\\\t^Paragraph withText: self asText! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'dew 9/13/2001 01:17'!\\\\nasPluralBasedOn: aNumberOrCollection\\\\n\\\\t\\\\\\\"Append an 's' to this string based on whether aNumberOrCollection is 1 or of size 1.\\\\\\\"\\\\n\\\\n\\\\t^ (aNumberOrCollection = 1 or:\\\\n\\\\t\\\\t[aNumberOrCollection isCollection and: [aNumberOrCollection size = 1]])\\\\n\\\\t\\\\t\\\\tifTrue: [self]\\\\n\\\\t\\\\t\\\\tifFalse: [self, 's']\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'laza 10/1/2004 09:54'!\\\\nasSignedInteger \\\\n\\\\t\\\\\\\"Returns the first signed integer it can find or nil.\\\\\\\"\\\\n\\\\n\\\\t| start stream |\\\\n\\\\tstart := self findFirst: [:char | char isDigit].\\\\n\\\\tstart isZero ifTrue: [^nil].\\\\n\\\\tstream := (ReadStream on: self) position: start.\\\\n\\\\tstream back = $- ifTrue: [stream back].\\\\n\\\\t^Integer readFrom: stream! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasSmalltalkComment\\\\n\\\\t\\\\\\\"return this string, munged so that it can be treated as a comment in Smalltalk code.  Quote marks are added to the beginning and end of the string, and whenever a solitary quote mark appears within the string, it is doubled\\\\\\\"\\\\n\\\\n\\\\t^String streamContents:  [ :str |\\\\n\\\\t\\\\t| quoteCount first |\\\\n\\\\n\\\\t\\\\tstr nextPut: $\\\\\\\".\\\\n\\\\t\\\\n\\\\t\\\\tquoteCount := 0.\\\\n\\\\t\\\\tfirst := true.\\\\n\\\\t\\\\tself do: [ :char |\\\\n\\\\t\\\\t\\\\tchar = $\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tfirst ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstr nextPut: char.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tquoteCount := quoteCount + 1 ] ]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tquoteCount odd ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"add a quote to even the number of quotes in a row\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstr nextPut: $\\\\\\\" ].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tquoteCount := 0.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstr nextPut: char ].\\\\n\\\\t\\\\t\\\\tfirst := false ]. \\\\n\\\\n\\\\t\\\\tquoteCount odd ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\\\\"check at the end\\\\\\\"\\\\n\\\\t\\\\t\\\\tstr nextPut: $\\\\\\\". ].\\\\n\\\\n\\\\t\\\\tstr nextPut: $\\\\\\\".\\\\n\\\\t].\\\\n\\\\t! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 12/19/2003 21:16'!\\\\nasSqueakPathName\\\\n\\\\n\\\\t^ self.\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasString\\\\n\\\\t\\\\\\\"Answer this string.\\\\\\\"\\\\n\\\\n\\\\t^ self\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasStringOrText\\\\n\\\\t\\\\\\\"Answer this string.\\\\\\\"\\\\n\\\\n\\\\t^ self\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'ar 4/10/2005 19:24'!\\\\nasSymbol\\\\n\\\\t\\\\\\\"Answer the unique Symbol whose characters are the characters of the \\\\n\\\\tstring.\\\\\\\"\\\\n\\\\t^Symbol intern: self! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasText\\\\n\\\\t\\\\\\\"Answer a Text whose string is the receiver.\\\\\\\"\\\\n\\\\n\\\\t^Text fromString: self! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasTime\\\\n\\\\t\\\\\\\"Many allowed forms, see Time>>readFrom:\\\\\\\"\\\\n\\\\n\\\\t^ Time fromString: self.! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasTimeStamp\\\\n\\\\t\\\\\\\"Convert from obsolete TimeStamp format\\\\\\\"\\\\n\\\\n\\\\n\\\\t^ TimeStamp fromString: self! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'ar 4/10/2005 17:05'!\\\\nasUnHtml\\\\n\\\\t\\\\\\\"Strip out all Html stuff (commands in angle brackets <>) and convert\\\\nthe characters &<> back to their real value.  Leave actual cr and tab as\\\\nthey were in text.\\\\\\\"\\\\n\\\\t| in out char rest did |\\\\n\\\\tin _ ReadStream on: self.\\\\n\\\\tout _ WriteStream on: (String new: self size).\\\\n\\\\t[in atEnd] whileFalse:\\\\n\\\\t\\\\t[in peek = $<\\\\n\\\\t\\\\t\\\\tifTrue: [in unCommand] \\\\t\\\\\\\"Absorb <...><...>\\\\\\\"\\\\n\\\\t\\\\t\\\\tifFalse: [(char _ in next) = $&\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [rest _ in upTo: $;.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdid _ out position.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trest = 'lt' ifTrue: [out nextPut: $<].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trest = 'gt' ifTrue: [out nextPut: $>].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trest = 'amp' ifTrue: [out nextPut: $&].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trest = 'deg' ifTrue: [out nextPut: $\\\\U00b0].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trest = 'quot' ifTrue: [out nextPut: $\\\\\\\"].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdid = out position ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself error: 'unknown encoded HTML char'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Please add it to this method\\\\\\\"]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [out nextPut: char]].\\\\n\\\\t\\\\t].\\\\n\\\\t^ out contents! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'laza 10/1/2004 10:02'!\\\\nasUnsignedInteger \\\\n\\\\t\\\\\\\"Returns the first integer it can find or nil.\\\\\\\"\\\\n\\\\n\\\\t| start stream |\\\\n\\\\tstart := self findFirst: [:char | char isDigit].\\\\n\\\\tstart isZero ifTrue: [^nil].\\\\n\\\\tstream := (ReadStream on: self) position: start - 1.\\\\n\\\\t^Integer readFrom: stream! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasUppercase\\\\n\\\\t\\\\\\\"Answer a String made up from the receiver whose characters are all \\\\n\\\\tuppercase.\\\\\\\"\\\\n\\\\n\\\\t^self copy asString translateToUppercase! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasUrl\\\\n\\\\t\\\\\\\"convert to a Url\\\\\\\"\\\\n\\\\t\\\\\\\"'http://www.cc.gatech.edu/' asUrl\\\\\\\"\\\\n\\\\t\\\\\\\"msw://chaos.resnet.gatech.edu:9000/' asUrl\\\\\\\"\\\\n\\\\t^Url absoluteFromText: self! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasUrlRelativeTo: aUrl\\\\n\\\\t^aUrl newFromRelativeText: self! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 2/24/2005 18:33'!\\\\nasVmPathName\\\\n\\\\n\\\\t^ (FilePath pathName: self) asVmPathName.\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\naskIfAddStyle: priorMethod req: requestor\\\\n\\\\t^ self   \\\\\\\"we are a string with no text style\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'ar 4/12/2005 17:36'!\\\\nasWideString \\\\n\\\\tself isWideString\\\\n\\\\t\\\\tifTrue:[^self]\\\\n\\\\t\\\\tifFalse:[^WideString from: self]! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\ncapitalized\\\\n\\\\t\\\\\\\"Return a copy with the first letter capitalized\\\\\\\"\\\\n\\\\t| cap |\\\\n\\\\tself isEmpty ifTrue: [ ^self copy ].\\\\n\\\\tcap _ self copy.\\\\n\\\\tcap at: 1 put: (cap at: 1) asUppercase.\\\\n\\\\t^ cap! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\ncompressWithTable: tokens\\\\n\\\\t\\\\\\\"Return a string with all substrings that occur in tokens replaced\\\\n\\\\tby a character with ascii code = 127 + token index.\\\\n\\\\tThis will work best if tokens are sorted by size.\\\\n\\\\tAssumes this string contains no characters > 127, or that they\\\\n\\\\tare intentionally there and will not interfere with this process.\\\\\\\"\\\\n\\\\t| str null finalSize start result ri c ts |\\\\n\\\\tnull _ Character value: 0.\\\\n\\\\tstr _ self copyFrom: 1 to: self size.  \\\\\\\"Working string will get altered\\\\\\\"\\\\n\\\\tfinalSize _ str size.\\\\n\\\\ttokens doWithIndex:\\\\n\\\\t\\\\t[:token :tIndex |\\\\n\\\\t\\\\tstart _ 1.\\\\n\\\\t\\\\t[(start _ str findString: token startingAt: start) > 0]\\\\n\\\\t\\\\t\\\\twhileTrue:\\\\n\\\\t\\\\t\\\\t[ts _ token size.\\\\n\\\\t\\\\t\\\\t((start + ts) <= str size\\\\n\\\\t\\\\t\\\\t\\\\tand: [(str at: start + ts) = $  and: [tIndex*2 <= 128]])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [ts _ token size + 1.  \\\\\\\"include training blank\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstr at: start put: (Character value: tIndex*2 + 127)]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [str at: start put: (Character value: tIndex + 127)].\\\\n\\\\t\\\\t\\\\tstr at: start put: (Character value: tIndex + 127).\\\\n\\\\t\\\\t\\\\t1 to: ts-1 do: [:i | str at: start+i put: null].\\\\n\\\\t\\\\t\\\\tfinalSize _ finalSize - (ts - 1).\\\\n\\\\t\\\\t\\\\tstart _ start + ts]].\\\\n\\\\tresult _ String new: finalSize.\\\\n\\\\tri _ 0.\\\\n\\\\t1 to: str size do:\\\\n\\\\t\\\\t[:i | (c _ str at: i) = null ifFalse: [result at: (ri _ ri+1) put: c]].\\\\n\\\\t^ result! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\ncontractTo: smallSize\\\\n\\\\t\\\\\\\"return myself or a copy shortened by ellipsis to smallSize\\\\\\\"\\\\n\\\\t| leftSize |\\\\n\\\\tself size <= smallSize\\\\n\\\\t\\\\tifTrue: [^ self].  \\\\\\\"short enough\\\\\\\"\\\\n\\\\tsmallSize < 5\\\\n\\\\t\\\\tifTrue: [^ self copyFrom: 1 to: smallSize].    \\\\\\\"First N characters\\\\\\\"\\\\n\\\\tleftSize _ smallSize-2//2.\\\\n\\\\t^ self copyReplaceFrom: leftSize+1\\\\t\\\\t\\\\\\\"First N/2 ... last N/2\\\\\\\"\\\\n\\\\t\\\\tto: self size - (smallSize - leftSize - 3)\\\\n\\\\t\\\\twith: '...'\\\\n\\\\\\\"\\\\n\\\\t'A clear but rather long-winded summary' contractTo: 18\\\\n\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'KR 1/30/2006 21:47'!\\\\nconvertFromEncoding: encodingName\\\\n\\\\t^self convertFromWithConverter: (TextConverter newForEncoding: encodingName)! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'KR 1/30/2006 21:47'!\\\\nconvertFromSuperSwikiServerString\\\\n\\\\t^self convertFromEncoding: 'shift_jis'! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 7/8/2004 12:02'!\\\\nconvertFromWithConverter: converter\\\\n\\\\n\\\\t| readStream writeStream c |\\\\n\\\\treadStream _ self readStream.\\\\n\\\\twriteStream _ String new writeStream.\\\\n\\\\tconverter ifNil: [^ self].\\\\n\\\\t[readStream atEnd] whileFalse: [\\\\n\\\\t\\\\tc _ converter nextFromStream: readStream.\\\\n\\\\t\\\\tc ifNotNil: [writeStream nextPut: c] ifNil: [^ writeStream contents]\\\\n\\\\t].\\\\n\\\\t^ writeStream contents\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'KR 1/30/2006 21:49'!\\\\nconvertToEncoding: encodingName\\\\n\\\\t^self convertToWithConverter: (TextConverter newForEncoding: encodingName).! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'KR 1/30/2006 21:50'!\\\\nconvertToSuperSwikiServerString\\\\n\\\\t^self convertToEncoding: 'shift_jis'! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'ar 4/12/2005 14:01'!\\\\nconvertToSystemString\\\\n\\\\n\\\\t| readStream writeStream converter |\\\\n\\\\treadStream _ self readStream.\\\\n\\\\twriteStream _ String new writeStream.\\\\n\\\\tconverter _ LanguageEnvironment defaultSystemConverter.\\\\n\\\\tconverter ifNil: [^ self].\\\\n\\\\t[readStream atEnd] whileFalse: [\\\\n\\\\t\\\\tconverter nextPut: readStream next toStream: writeStream\\\\n\\\\t].\\\\n\\\\tconverter emitSequenceToResetStateIfNeededOn: writeStream.\\\\n\\\\t^ writeStream contents.\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 7/8/2004 12:01'!\\\\nconvertToWithConverter: converter\\\\n\\\\n\\\\t| readStream writeStream |\\\\n\\\\treadStream _ self readStream.\\\\n\\\\twriteStream _ String new writeStream.\\\\n\\\\tconverter ifNil: [^ self].\\\\n\\\\t[readStream atEnd] whileFalse: [\\\\n\\\\t\\\\tconverter nextPut: readStream next toStream: writeStream\\\\n\\\\t].\\\\n\\\\tconverter emitSequenceToResetStateIfNeededOn: writeStream.\\\\n\\\\t^ writeStream contents.\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\ncorrectAgainst: wordList\\\\n\\\\t\\\\\\\"Correct the receiver: assume it is a misspelled word and return the (maximum of five) nearest words in the wordList.  Depends on the scoring scheme of alike:\\\\\\\"\\\\n\\\\t| results |\\\\n\\\\tresults _ self correctAgainst: wordList continuedFrom: nil.\\\\n\\\\tresults _ self correctAgainst: nil continuedFrom: results.\\\\n\\\\t^ results! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\ncorrectAgainst: wordList continuedFrom: oldCollection\\\\n\\\\t\\\\\\\"Like correctAgainst:.  Use when you want to correct against several lists, give nil as the first oldCollection, and nil as the last wordList.\\\\\\\"\\\\n\\\\n\\\\t^ wordList isNil\\\\n\\\\t\\\\tifTrue: [ self correctAgainstEnumerator: nil\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcontinuedFrom: oldCollection ]\\\\n\\\\t\\\\tifFalse: [ self correctAgainstEnumerator: [ :action | wordList do: action without: nil]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcontinuedFrom: oldCollection ]! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\ncorrectAgainstDictionary: wordDict continuedFrom: oldCollection\\\\n\\\\t\\\\\\\"Like correctAgainst:continuedFrom:.  Use when you want to correct against a dictionary.\\\\\\\"\\\\n\\\\n\\\\t^ wordDict isNil\\\\n\\\\t\\\\tifTrue: [ self correctAgainstEnumerator: nil\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcontinuedFrom: oldCollection ]\\\\n\\\\t\\\\tifFalse: [ self correctAgainstEnumerator: [ :action | wordDict keysDo: action ]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcontinuedFrom: oldCollection ]! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 7/29/2005 16:04'!\\\\nencodeForHTTP\\\\n\\\\t\\\\\\\"change dangerous characters to their %XX form, for use in HTTP transactions\\\\\\\"\\\\n\\\\n\\\\t^ self encodeForHTTPWithTextEncoding: 'utf-8' conditionBlock: [:c | c isSafeForHTTP].\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 7/29/2005 16:04'!\\\\nencodeForHTTPWithTextEncoding: encodingName\\\\n\\\\n\\\\t^ self encodeForHTTPWithTextEncoding: encodingName conditionBlock: [:c | c isSafeForHTTP].\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 7/29/2005 16:03'!\\\\nencodeForHTTPWithTextEncoding: encodingName conditionBlock: conditionBlock\\\\n\\\\t\\\\\\\"change dangerous characters to their %XX form, for use in HTTP transactions\\\\\\\"\\\\n\\\\n\\\\t| httpSafeStream encodedStream cont |\\\\n\\\\thttpSafeStream _ WriteStream on: (String new).\\\\n\\\\tencodedStream _ MultiByteBinaryOrTextStream on: (String new: 6).\\\\n\\\\tencodedStream converter: (TextConverter newForEncoding: encodingName).\\\\n\\\\tself do: [:c |\\\\n\\\\t\\\\t(conditionBlock value: c)\\\\n\\\\t\\\\t\\\\tifTrue: [httpSafeStream nextPut: (Character value: c charCode)]\\\\n\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tencodedStream text; reset.\\\\n\\\\t\\\\t\\\\t\\\\tencodedStream nextPut: c.\\\\n\\\\t\\\\t\\\\t\\\\tencodedStream position: 0.\\\\n\\\\t\\\\t\\\\t\\\\tencodedStream binary.\\\\n\\\\t\\\\t\\\\t\\\\tcont _ encodedStream contents.\\\\n\\\\t\\\\t\\\\t\\\\tcont do: [:byte |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\thttpSafeStream nextPut: $%.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\thttpSafeStream nextPut: (byte // 16) asHexDigit.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\thttpSafeStream nextPut: (byte \\\\\\\\\\\\\\\\ 16) asHexDigit.\\\\n\\\\t\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\t^ httpSafeStream contents.\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 7/5/2004 16:48'!\\\\nfindSelector\\\\n\\\\t\\\\\\\"Dan's code for hunting down selectors with keyword parts; while this doesn't give a true parse, in most cases it does what we want, in where it doesn't, we're none the worse for it.\\\\\\\"\\\\n\\\\t| sel possibleParens level n |\\\\n\\\\tsel _ self withBlanksTrimmed.\\\\n\\\\t(sel includes: $:) ifTrue:\\\\n\\\\t\\\\t[sel _ sel copyReplaceAll: ':' with: ': '.\\\\t\\\\\\\"for the style (aa max:bb) with no space\\\\\\\"\\\\n\\\\t\\\\tpossibleParens _ sel findTokens: Character separators.\\\\n\\\\t\\\\tsel _ self class streamContents:\\\\n\\\\t\\\\t\\\\t[:s | level _ 0.\\\\n\\\\t\\\\t\\\\tpossibleParens do:\\\\n\\\\t\\\\t\\\\t\\\\t[:token |\\\\n\\\\t\\\\t\\\\t\\\\t(level = 0 and: [token endsWith: ':'])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [s nextPutAll: token]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [(n _ token occurrencesOf: $( ) > 0 ifTrue: [level _ level + n].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(n _ token occurrencesOf: $[ ) > 0 ifTrue: [level _ level + n].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(n _ token occurrencesOf: $] ) > 0 ifTrue: [level _ level - n].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(n _ token occurrencesOf: $) ) > 0 ifTrue: [level _ level - n]]]]].\\\\n\\\\n\\\\tsel isEmpty ifTrue: [^ nil].\\\\n\\\\tsel isOctetString ifTrue: [sel _ sel asOctetString].\\\\n\\\\tSymbol hasInterned: sel ifTrue:\\\\n\\\\t\\\\t[:aSymbol | ^ aSymbol].\\\\n\\\\t^ nil! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\ninitialIntegerOrNil\\\\n\\\\t\\\\\\\"Answer the integer represented by the leading digits of the receiver, or nil if the receiver does not begin with a digit\\\\\\\"\\\\n\\\\t| firstNonDigit |\\\\n\\\\t(self size == 0 or: [self first isDigit not]) ifTrue: [^ nil].\\\\n\\\\tfirstNonDigit _ (self findFirst: [:m | m isDigit not]).\\\\n\\\\tfirstNonDigit = 0 ifTrue: [firstNonDigit _ self size + 1].\\\\n\\\\t^ (self copyFrom: 1  to: (firstNonDigit - 1)) asNumber\\\\n\\\\\\\"\\\\n'234Whoopie' initialIntegerOrNil\\\\n'wimpy' initialIntegerOrNil\\\\n'234' initialIntegerOrNil\\\\n'2N' initialIntegerOrNil\\\\n'2' initialIntegerOrNil\\\\n'  89Ten ' initialIntegerOrNil\\\\n'78 92' initialIntegerOrNil\\\\n\\\\\\\"\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nkeywords\\\\n\\\\t\\\\\\\"Answer an array of the keywords that compose the receiver.\\\\\\\"\\\\n\\\\t| kwd char keywords |\\\\n\\\\tkeywords _ Array streamContents:\\\\n\\\\t\\\\t[:kwds | kwd _ WriteStream on: (String new: 16).\\\\n\\\\t\\\\t1 to: self size do:\\\\n\\\\t\\\\t\\\\t[:i |\\\\n\\\\t\\\\t\\\\tkwd nextPut: (char _ self at: i).\\\\n\\\\t\\\\t\\\\tchar = $: ifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[kwds nextPut: kwd contents.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tkwd reset]].\\\\n\\\\t\\\\tkwd isEmpty ifFalse: [kwds nextPut: kwd contents]].\\\\n\\\\t(keywords size >= 1 and: [(keywords at: 1) = ':']) ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"Has an initial keyword, as in #:if:then:else:\\\\\\\"\\\\n\\\\t\\\\tkeywords _ keywords allButFirst].\\\\n\\\\t(keywords size >= 2 and: [(keywords at: keywords size - 1) = ':']) ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"Has a final keyword, as in #nextPut::andCR\\\\\\\"\\\\n\\\\t\\\\tkeywords _ keywords copyReplaceFrom: keywords size - 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tto: keywords size with: {':' , keywords last}].\\\\n\\\\t^ keywords! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nnumericSuffix\\\\n\\\\t^ self stemAndNumericSuffix last\\\\n\\\\n\\\\\\\"\\\\n'abc98' numericSuffix\\\\n'98abc' numericSuffix\\\\n\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nonlyLetters\\\\n\\\\t\\\\\\\"answer the receiver with only letters\\\\\\\"\\\\n\\\\t^ self select:[:each | each isLetter]! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nromanNumber\\\\n\\\\t| value v1 v2 |\\\\n\\\\tvalue _ v1 _ v2 _ 0.\\\\n\\\\tself reverseDo:\\\\n\\\\t\\\\t[:each |\\\\n\\\\t\\\\tv1 _ #(1 5 10 50 100 500 1000) at: ('IVXLCDM' indexOf: each).\\\\n\\\\t\\\\tv1 >= v2\\\\n\\\\t\\\\t\\\\tifTrue: [value _ value + v1]\\\\n\\\\t\\\\t\\\\tifFalse: [value _ value - v1].\\\\n\\\\t\\\\tv2 _ v1].\\\\n\\\\t^ value! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nsansPeriodSuffix\\\\n\\\\t\\\\\\\"Return a copy of the receiver up to, but not including, the first period.  If the receiver's *first* character is a period, then just return the entire receiver. \\\\\\\"\\\\n\\\\n\\\\t| likely |\\\\n\\\\tlikely _ self copyUpTo: $..\\\\n\\\\t^ likely size == 0\\\\n\\\\t\\\\tifTrue:\\\\t[self]\\\\n\\\\t\\\\tifFalse:\\\\t[likely]! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 8/27/2002 11:13'!\\\\nsplitInteger\\\\n\\\\t\\\\\\\"Answer an array that is a splitting of self into a string and an integer.\\\\n\\\\t'43Sam' ==> #(43 'Sam').  'Try90' ==> #('Try' 90)\\\\n\\\\tBUT NOTE: 'Sam' ==> #('Sam' 0), and '90' ==> #('' 90)  ie, (<string> <integer>).\\\\\\\"\\\\n\\\\n\\\\t| pos |\\\\n\\\\t(pos _ self findFirst: [:d | d isDigit not]) = 0 ifTrue: [^ Array with: '' with: self asNumber].\\\\n\\\\tself first isDigit ifTrue: [\\\\n\\\\t\\\\t^ Array with: (self copyFrom: 1 to: pos - 1) asNumber \\\\n\\\\t\\\\t\\\\t\\\\twith: (self copyFrom: pos to: self size)].\\\\n\\\\t(pos _ self findFirst: [:d | d isDigit]) = 0 ifTrue: [^ Array with: self with: 0].\\\\n\\\\t^ Array with: (self copyFrom: 1 to: pos - 1)\\\\n\\\\t\\\\t\\\\twith: (self copyFrom: pos to: self size) asNumber! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nstemAndNumericSuffix\\\\n\\\\t\\\\\\\"Parse the receiver into a string-valued stem and a numeric-valued suffix.  6/7/96 sw\\\\\\\"\\\\n\\\\n\\\\t| stem suffix position |\\\\n\\\\n\\\\tstem _ self.\\\\n\\\\tsuffix _ 0.\\\\n\\\\tposition _ 1.\\\\n\\\\t[stem endsWithDigit and: [stem size > 1]] whileTrue:\\\\n\\\\t\\\\t[suffix _  stem last digitValue * position + suffix.\\\\n\\\\t\\\\tposition _ position * 10.\\\\n\\\\t\\\\tstem _ stem copyFrom: 1 to: stem size - 1].\\\\n\\\\t^ Array with: stem with: suffix\\\\n\\\\n\\\\\\\"'Fred2305' stemAndNumericSuffix\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nsubStrings\\\\n\\\\t\\\\\\\"Answer an array of the substrings that compose the receiver.\\\\\\\"\\\\n\\\\t#Collectn.\\\\n\\\\t\\\\\\\"Added 2000/04/08 For ANSI <readableString> protocol.\\\\\\\"\\\\n\\\\t^ self substrings! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'ar 4/12/2005 16:32'!\\\\nsubStrings: separators \\\\n\\\\t\\\\\\\"Answer an array containing the substrings in the receiver separated \\\\n\\\\tby the elements of separators.\\\\\\\"\\\\n\\\\t| char result sourceStream subString |\\\\n\\\\t#Collectn.\\\\n\\\\t\\\\\\\"Changed 2000/04/08 For ANSI <readableString> protocol.\\\\\\\"\\\\n\\\\t(separators isString or:[separators allSatisfy: [:element | element isKindOf: Character]])\\\\n\\\\t\\\\tifFalse: [^ self error: 'separators must be Characters.'].\\\\n\\\\tsourceStream := ReadStream on: self.\\\\n\\\\tresult := OrderedCollection new.\\\\n\\\\tsubString := String new.\\\\n\\\\t[sourceStream atEnd]\\\\n\\\\t\\\\twhileFalse: \\\\n\\\\t\\\\t\\\\t[char := sourceStream next.\\\\n\\\\t\\\\t\\\\t(separators includes: char)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [subString notEmpty\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[result add: subString copy.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsubString := String new]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [subString := subString , (String with: char)]].\\\\n\\\\tsubString notEmpty ifTrue: [result add: subString copy].\\\\n\\\\t^ result asArray! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nsubstrings\\\\n\\\\t\\\\\\\"Answer an array of the substrings that compose the receiver.\\\\\\\"\\\\n\\\\t| result end beginning |\\\\n\\\\n\\\\tresult _ WriteStream on: (Array new: 10).\\\\n\\\\n\\\\n\\\\n\\\\tend _ 0.\\\\n\\\\t\\\\\\\"find one substring each time through this loop\\\\\\\"\\\\n\\\\t[ \\\\n\\\\t\\\\t\\\\\\\"find the beginning of the next substring\\\\\\\"\\\\n\\\\t\\\\tbeginning _ self indexOfAnyOf: CSNonSeparators startingAt: end+1 ifAbsent: [ nil ].\\\\n\\\\t\\\\tbeginning ~~ nil ] \\\\n\\\\twhileTrue: [\\\\n\\\\t\\\\t\\\\\\\"find the end\\\\\\\"\\\\n\\\\t\\\\tend _ self indexOfAnyOf: CSSeparators startingAt: beginning ifAbsent: [ self size + 1 ].\\\\n\\\\t\\\\tend _ end - 1.\\\\n\\\\n\\\\t\\\\tresult nextPut: (self copyFrom: beginning to: end).\\\\n\\\\n\\\\t].\\\\n\\\\n\\\\n\\\\t^result contents! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nsurroundedBySingleQuotes\\\\n\\\\t\\\\\\\"Answer the receiver with leading and trailing quotes.  \\\\\\\"\\\\n\\\\n\\\\t^ $' asString, self, $' asString! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 8/28/2002 15:14'!\\\\ntranslateFrom: start  to: stop  table: table\\\\n\\\\t\\\\\\\"translate the characters in the string by the given table, in place\\\\\\\"\\\\n\\\\tself class translate: self from: start to: stop table: table! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\ntranslateToLowercase\\\\n\\\\t\\\\\\\"Translate all characters to lowercase, in place\\\\\\\"\\\\n\\\\n\\\\tself translateWith: LowercasingTable! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\ntranslateToUppercase\\\\n\\\\t\\\\\\\"Translate all characters to lowercase, in place\\\\\\\"\\\\n\\\\n\\\\tself translateWith: UppercasingTable! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 8/28/2002 15:13'!\\\\ntranslateWith: table\\\\n\\\\t\\\\\\\"translate the characters in the string by the given table, in place\\\\\\\"\\\\n\\\\t^ self translateFrom: 1 to: self size table: table! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\ntruncateTo: smallSize\\\\n\\\\t\\\\\\\"return myself or a copy shortened to smallSize.  1/18/96 sw\\\\\\\"\\\\n\\\\n\\\\t^ self size <= smallSize\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self copyFrom: 1 to: smallSize]! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\ntruncateWithElipsisTo: maxLength\\\\n\\\\t\\\\\\\"Return myself or a copy suitably shortened but with elipsis added\\\\\\\"\\\\n\\\\n\\\\t^ self size <= maxLength\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[(self copyFrom: 1 to: (maxLength - 3)), '...']\\\\n\\\\n\\\\n\\\\t\\\\\\\"'truncateWithElipsisTo:' truncateWithElipsisTo: 20\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'KR 9/22/2005 23:06'!\\\\nunescapePercents\\\\n\\\\t\\\\\\\"decode %xx form.  This is the opposite of #encodeForHTTP\\\\\\\"\\\\n\\\\t^ self unescapePercentsWithTextEncoding: 'utf-8'.! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'ky 7/8/2006 17:56'!\\\\nunescapePercentsWithTextEncoding: encodingName \\\\n\\\\t\\\\\\\"decode string including %XX form\\\\\\\"\\\\n\\\\t| unescaped char asciiVal specialChars oldPos pos converter |\\\\n\\\\tunescaped := ReadWriteStream on: String new.\\\\n\\\\tspecialChars := '+%' asCharacterSet.\\\\n\\\\toldPos := 1.\\\\n\\\\t[pos := self indexOfAnyOf: specialChars startingAt: oldPos.\\\\n\\\\tpos > 0]\\\\n\\\\t\\\\twhileTrue: [unescaped\\\\n\\\\t\\\\t\\\\t\\\\tnextPutAll: (self copyFrom: oldPos to: pos - 1).\\\\n\\\\t\\\\t\\\\tchar := self at: pos.\\\\n\\\\t\\\\t\\\\t(char = $%\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [pos + 2 <= self size])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [asciiVal := (self at: pos + 1) asUppercase digitValue * 16 + (self at: pos + 2) asUppercase digitValue.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tasciiVal > 255\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [^ self].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tunescaped\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnextPut: (Character value: asciiVal).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpos := pos + 3.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpos <= self size\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [char := nil].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\toldPos := pos]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [char = $+\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [unescaped nextPut: Character space]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [unescaped nextPut: char].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\toldPos := pos + 1]].\\\\n\\\\toldPos <= self size\\\\n\\\\t\\\\tifTrue: [unescaped\\\\n\\\\t\\\\t\\\\t\\\\tnextPutAll: (self copyFrom: oldPos to: self size)].\\\\n\\\\tconverter := (TextConverter newForEncoding: encodingName)\\\\n\\\\t\\\\t\\\\t\\\\tifNil: [TextConverter newForEncoding: nil].\\\\n\\\\t^ [unescaped contents convertFromWithConverter: converter]\\\\n\\\\t\\\\ton: Error\\\\n\\\\t\\\\tdo: [\\\\\\\"the contents may be squeak-encoded\\\\\\\"\\\\n\\\\t\\\\t\\\\tunescaped contents]! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 8/27/2002 11:20'!\\\\nunparenthetically\\\\n\\\\t\\\\\\\"If the receiver starts with (..( and ends with matching )..), strip them\\\\\\\"\\\\n\\\\n\\\\t| curr |\\\\n\\\\tcurr _ self.\\\\n\\\\t[((curr first = $() and: [curr last = $)])] whileTrue:\\\\n\\\\t\\\\t[curr _ curr copyFrom: 2 to: (curr size - 1)].\\\\n\\\\n\\\\t^ curr\\\\n\\\\n\\\\\\\"\\\\n\\\\n'((fred the bear))' unparenthetically\\\\n\\\\n\\\\\\\"\\\\n\\\\t\\\\t! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nunzipped\\\\n\\\\t| magic1 magic2 |\\\\n\\\\tmagic1 _ (self at: 1) asInteger.\\\\n\\\\tmagic2 _ (self at: 2) asInteger.\\\\n\\\\t(magic1 = 16r1F and:[magic2 = 16r8B]) ifFalse:[^self].\\\\n\\\\t^(GZipReadStream on: self) upToEnd! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nwithBlanksCondensed\\\\n\\\\t\\\\\\\"Return a copy of the receiver with leading/trailing blanks removed\\\\n\\\\t and consecutive white spaces condensed.\\\\\\\"\\\\n\\\\n\\\\t| trimmed lastBlank |\\\\n\\\\ttrimmed _ self withBlanksTrimmed.\\\\n\\\\t^String streamContents: [:stream |\\\\n\\\\t\\\\tlastBlank _ false.\\\\n\\\\t\\\\ttrimmed do: [:c | (c isSeparator and: [lastBlank]) ifFalse: [stream nextPut: c].\\\\n\\\\t\\\\t\\\\tlastBlank _ c isSeparator]].\\\\n\\\\n\\\\t\\\\\\\" ' abc  d   ' withBlanksCondensed\\\\\\\"\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 7/5/2004 16:43'!\\\\nwithBlanksTrimmed\\\\n\\\\t\\\\\\\"Return a copy of the receiver from which leading and trailing blanks have been trimmed.\\\\\\\"\\\\n\\\\n\\\\t| first result |\\\\n\\\\tfirst _ self findFirst: [:c | c isSeparator not].\\\\n\\\\tfirst = 0 ifTrue: [^ ''].  \\\\\\\"no non-separator character\\\\\\\"\\\\n\\\\tresult _  self\\\\n\\\\t\\\\tcopyFrom: first\\\\n\\\\t\\\\tto: (self findLast: [:c | c isSeparator not]).\\\\n\\\\tresult isOctetString ifTrue: [^ result asOctetString] ifFalse: [^ result].\\\\n\\\\n\\\\t\\\\\\\" ' abc  d   ' withBlanksTrimmed\\\\\\\"\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'md 9/19/2004 15:19'!\\\\nwithFirstCharacterDownshifted\\\\n\\\\t\\\\\\\"Return a copy with the first letter downShifted\\\\\\\"\\\\n\\\\t\\\\n\\\\t| answer |\\\\n\\\\t\\\\n\\\\tself ifEmpty: [^ self copy].\\\\n\\\\tanswer _ self copy.\\\\n\\\\tanswer at: 1 put: (answer at: 1) asLowercase.\\\\n\\\\t^ answer. ! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nwithNoLineLongerThan: aNumber\\\\n\\\\t\\\\\\\"Answer a string with the same content as receiver, but rewrapped so that no line has more characters than the given number\\\\\\\"\\\\n\\\\t| listOfLines currentLast currentStart resultString putativeLast putativeLine crPosition |\\\\n\\\\taNumber isNumber not | (aNumber < 1) ifTrue: [self error: 'too narrow'].\\\\n\\\\tlistOfLines _ OrderedCollection new.\\\\n\\\\tcurrentLast _ 0.\\\\n\\\\t[currentLast < self size] whileTrue:\\\\n\\\\t\\\\t[currentStart _ currentLast + 1.\\\\n\\\\t\\\\tputativeLast _ (currentStart + aNumber - 1) min: self size.\\\\n\\\\t\\\\tputativeLine _ self copyFrom: currentStart to: putativeLast.\\\\n\\\\t\\\\t(crPosition _ putativeLine indexOf: Character cr) > 0 ifTrue:\\\\n\\\\t\\\\t\\\\t[putativeLast _ currentStart + crPosition - 1.\\\\n\\\\t\\\\t\\\\tputativeLine _ self copyFrom: currentStart to: putativeLast].\\\\n\\\\t\\\\tcurrentLast _ putativeLast == self size\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[putativeLast]\\\\n\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[currentStart + putativeLine lastSpacePosition - 1].\\\\n\\\\t\\\\tcurrentLast <= currentStart ifTrue:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"line has NO spaces; baleout!!\\\\\\\"\\\\n\\\\t\\\\t\\\\tcurrentLast _ putativeLast].\\\\n\\\\t\\\\tlistOfLines add: (self copyFrom: currentStart to: currentLast) withBlanksTrimmed].\\\\n\\\\n\\\\tlistOfLines size > 0 ifFalse: [^ ''].\\\\n\\\\tresultString _ listOfLines first.\\\\n\\\\t2 to: listOfLines size do:\\\\n\\\\t\\\\t[:i | resultString _ resultString, String cr, (listOfLines at: i)].\\\\n\\\\t^ resultString\\\\n\\\\n\\\\\\\"#(5 7 20) collect:\\\\n\\\\t[:i | 'Fred the bear went down to the brook to read his book in silence' withNoLineLongerThan: i]\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'md 10/5/2005 11:01'!\\\\nwithoutLeadingBlanks\\\\n\\\\t\\\\n\\\\t\\\\\\\"Return a copy of the receiver from which leading blanks have been\\\\ntrimmed.\\\\\\\"\\\\n\\\\n\\\\t\\\\n\\\\t| first |\\\\n\\\\t\\\\n\\\\tfirst := self findFirst: [:c | c isSeparator not ].\\\\n\\\\n\\\\tfirst = 0 ifTrue: [^ ''].  \\\\n\\\\t\\\\n\\\\t\\\\\\\"no non-separator character\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ self copyFrom: first to: self size\\\\n\\\\n\\\\t\\\\n\\\\t\\\\t\\\\n\\\\t\\\\\\\" '    abc  d' withoutLeadingBlanks\\\\\\\"\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'tak 4/25/2004 12:57'!\\\\nwithSeparatorsCompacted\\\\n\\\\t\\\\\\\"replace each sequences of whitespace by a single space character\\\\\\\"\\\\n\\\\t\\\\\\\"' test ' withSeparatorsCompacted = ' test '\\\\\\\"\\\\n\\\\t\\\\\\\"' test test' withSeparatorsCompacted = ' test test'\\\\\\\"\\\\n\\\\t\\\\\\\"'test test\\\\t\\\\t' withSeparatorsCompacted = 'test test '\\\\\\\"\\\\n\\\\n\\\\t| out in next isSeparator |\\\\n\\\\tself isEmpty ifTrue: [^ self].\\\\n\\\\n\\\\tout _ WriteStream on: (String new: self size).\\\\n\\\\tin _ self readStream.\\\\n\\\\tisSeparator _ [:char | char asciiValue < 256\\\\n\\\\t\\\\t\\\\t\\\\tand: [CSSeparators includes: char]].\\\\n\\\\t[in atEnd] whileFalse: [\\\\n\\\\t\\\\tnext _ in next.\\\\n\\\\t\\\\t(isSeparator value: next)\\\\n\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tout nextPut: $ .\\\\n\\\\t\\\\t\\\\t\\\\t[in atEnd or:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[next _ in next.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(isSeparator value: next)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [false]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [out nextPut: next. true]]] whileFalse]\\\\n\\\\t\\\\t\\\\tifFalse: [out nextPut: next]].\\\\n\\\\t^ out contents! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 8/27/2002 14:06'!\\\\nwithoutLeadingDigits\\\\n\\\\t\\\\\\\"Answer the portion of the receiver that follows any leading series of digits and blanks.  If the receiver consists entirely of digits and blanks, return an empty string\\\\\\\"\\\\n\\\\t| firstNonDigit |\\\\n\\\\tfirstNonDigit _ (self findFirst: [:m | m isDigit not and: [m ~= $ ]]).\\\\n\\\\t^ firstNonDigit > 0\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self copyFrom: firstNonDigit  to: self size]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t['']\\\\n\\\\n\\\\\\\"\\\\n'234Whoopie' withoutLeadingDigits\\\\n' 4321 BlastOff!!' withoutLeadingDigits\\\\n'wimpy' withoutLeadingDigits\\\\n'  89Ten ' withoutLeadingDigits\\\\n'78 92' withoutLeadingDigits\\\\n\\\\\\\"\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nwithoutTrailingBlanks\\\\n\\\\t\\\\\\\"Return a copy of the receiver from which trailing blanks have been trimmed.\\\\\\\"\\\\n\\\\n\\\\t| last |\\\\n\\\\tlast _ self findLast: [:c | c isSeparator not].\\\\n\\\\tlast = 0 ifTrue: [^ ''].  \\\\\\\"no non-separator character\\\\\\\"\\\\n\\\\t^ self copyFrom: 1 to: last\\\\n\\\\n\\\\t\\\\\\\" ' abc  d   ' withoutTrailingBlanks\\\\\\\"\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 8/27/2002 14:06'!\\\\nwithoutTrailingDigits\\\\n\\\\t\\\\\\\"Answer the portion of the receiver that precedes any trailing series of digits and blanks.  If the receiver consists entirely of digits and blanks, return an empty string\\\\\\\"\\\\n\\\\t| firstDigit |\\\\n\\\\tfirstDigit _ (self findFirst: [:m | m isDigit or: [m = $ ]]).\\\\n\\\\t^ firstDigit > 0\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self copyFrom: 1 to: firstDigit-1]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self]\\\\n\\\\n\\\\\\\"\\\\n'Whoopie234' withoutTrailingDigits\\\\n' 4321 BlastOff!!' withoutLeadingDigits\\\\n'wimpy' withoutLeadingDigits\\\\n'  89Ten ' withoutLeadingDigits\\\\n'78 92' withoutLeadingDigits\\\\n\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!String methodsFor: 'copying' stamp: 'yo 11/3/2004 19:24'!\\\\ncopyReplaceTokens: oldSubstring with: newSubstring \\\\n\\\\t\\\\\\\"Replace all occurrences of oldSubstring that are surrounded\\\\n\\\\tby non-alphanumeric characters\\\\\\\"\\\\n\\\\t^ self copyReplaceAll: oldSubstring with: newSubstring asTokens: true\\\\n\\\\t\\\\\\\"'File asFile Files File''s File' copyReplaceTokens: 'File' with: 'Snick'\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'copying' stamp: 'yo 11/3/2004 19:24'!\\\\ndeepCopy\\\\n\\\\t\\\\\\\"DeepCopy would otherwise mean make a copy of the character;  since \\\\n\\\\tcharacters are unique, just return a shallowCopy.\\\\\\\"\\\\n\\\\n\\\\t^self shallowCopy! !\\\\n\\\\n!String methodsFor: 'copying' stamp: 'yo 11/3/2004 19:24'!\\\\npadded: leftOrRight to: length with: char\\\\n\\\\tleftOrRight = #left ifTrue:\\\\n\\\\t\\\\t[^ (String new: (length - self size max: 0) withAll: char) , self].\\\\n\\\\tleftOrRight = #right ifTrue:\\\\n\\\\t\\\\t[^ self , (String new: (length - self size max: 0) withAll: char)].! !\\\\n\\\\n\\\\n!String methodsFor: 'displaying' stamp: 'yo 11/3/2004 19:24'!\\\\ndisplayAt: aPoint \\\\n\\\\t\\\\\\\"Display the receiver as a DisplayText at aPoint on the display screen.\\\\\\\"\\\\n\\\\n\\\\tself displayOn: Display at: aPoint! !\\\\n\\\\n!String methodsFor: 'displaying' stamp: 'yo 11/3/2004 19:24'!\\\\ndisplayOn: aDisplayMedium\\\\n\\\\t\\\\\\\"Display the receiver on the given DisplayMedium.  5/16/96 sw\\\\\\\"\\\\n\\\\n\\\\tself displayOn: aDisplayMedium at: 0 @ 0! !\\\\n\\\\n!String methodsFor: 'displaying' stamp: 'yo 11/3/2004 19:24'!\\\\ndisplayOn: aDisplayMedium at: aPoint \\\\n\\\\t\\\\\\\"Show a representation of the receiver as a DisplayText at location aPoint on aDisplayMedium, using black-colored text.\\\\\\\"\\\\n\\\\n\\\\tself displayOn: aDisplayMedium at: aPoint textColor: Color black! !\\\\n\\\\n!String methodsFor: 'displaying' stamp: 'yo 11/3/2004 19:24'!\\\\ndisplayOn: aDisplayMedium at: aPoint textColor: aColor\\\\n\\\\t\\\\\\\"Show a representation of the receiver as a DisplayText at location aPoint on aDisplayMedium, rendering the text in the designated color\\\\\\\"\\\\n\\\\n\\\\t(self asDisplayText foregroundColor: (aColor ifNil: [Color black]) backgroundColor: Color white)\\\\n\\\\t\\\\tdisplayOn: aDisplayMedium at: aPoint! !\\\\n\\\\n!String methodsFor: 'displaying' stamp: 'yo 11/3/2004 19:24'!\\\\ndisplayProgressAt: aPoint from: minVal to: maxVal during: workBlock \\\\n\\\\t\\\\\\\"Display this string as a caption over a progress bar while workBlock is evaluated.\\\\n\\\\nEXAMPLE (Select next 6 lines and Do It)\\\\n'Now here''s some Real Progress'\\\\n\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\tfrom: 0 to: 10\\\\n\\\\tduring: [:bar |\\\\n\\\\t1 to: 10 do: [:x | bar value: x.\\\\n\\\\t\\\\t\\\\t(Delay forMilliseconds: 500) wait]].\\\\n\\\\nHOW IT WORKS (Try this in any other language :-)\\\\nSince your code (the last 2 lines in the above example) is in a block,\\\\nthis method gets control to display its heading before, and clean up \\\\nthe screen after, its execution.\\\\nThe key, though, is that the block is supplied with an argument,\\\\nnamed 'bar' in the example, which will update the bar image every \\\\nit is sent the message value: x, where x is in the from:to: range.\\\\n\\\\\\\"\\\\n\\\\t^ProgressInitiationException \\\\n\\\\t\\\\tdisplay: self\\\\n\\\\t\\\\tat: aPoint \\\\n\\\\t\\\\tfrom: minVal \\\\n\\\\t\\\\tto: maxVal \\\\n\\\\t\\\\tduring: workBlock! !\\\\n\\\\n\\\\n!String methodsFor: 'encoding' stamp: 'ar 4/10/2005 17:16'!\\\\ngetInteger32: location\\\\n\\\\t| integer |\\\\n\\\\t<primitive: 'getInteger' module: 'IntegerPokerPlugin'>\\\\n\\\\t\\\\\\\"^IntegerPokerPlugin doPrimitive: #getInteger\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"the following is about 7x faster than interpreting the plugin if not compiled\\\\\\\"\\\\n\\\\n\\\\tinteger := \\\\n\\\\t\\\\t((self at: location) asInteger bitShift: 24) +\\\\n\\\\t\\\\t((self at: location+1) asInteger bitShift: 16) +\\\\n\\\\t\\\\t((self at: location+2) asInteger bitShift: 8) +\\\\n\\\\t\\\\t(self at: location+3) asInteger.\\\\n\\\\n\\\\tinteger > 1073741824 ifTrue: [^1073741824 - integer ].\\\\n\\\\t^integer\\\\n! !\\\\n\\\\n!String methodsFor: 'encoding' stamp: 'ar 4/10/2005 17:17'!\\\\nputInteger32: anInteger at: location\\\\n\\\\t| integer |\\\\n\\\\t<primitive: 'putInteger' module: 'IntegerPokerPlugin'>\\\\n\\\\t\\\\\\\"IntegerPokerPlugin doPrimitive: #putInteger\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"the following is close to 20x faster than the above if the primitive is not compiled\\\\\\\"\\\\n\\\\t\\\\\\\"PUTCOUNTER _ PUTCOUNTER + 1.\\\\\\\"\\\\n\\\\tinteger _ anInteger.\\\\n\\\\tinteger < 0 ifTrue: [integer :=  1073741824 - integer. ].\\\\n\\\\tself at: location+3 put: (Character value: (integer \\\\\\\\\\\\\\\\ 256)).\\\\n\\\\tself at: location+2 put: (Character value: (integer bitShift: -8) \\\\\\\\\\\\\\\\ 256).\\\\n\\\\tself at: location+1 put: (Character value: (integer bitShift: -16) \\\\\\\\\\\\\\\\ 256).\\\\n\\\\tself at: location put: (Character value: (integer bitShift: -24) \\\\\\\\\\\\\\\\ 256).\\\\n\\\\n\\\\\\\"Smalltalk at: #PUTCOUNTER put: 0\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'encoding' stamp: 'ar 4/10/2005 17:18'!\\\\nwriteLeadingCharRunsOn: stream\\\\n\\\\n\\\\t| runLength runValues runStart leadingChar |\\\\n\\\\tself isEmpty ifTrue: [^ self].\\\\n\\\\n\\\\trunLength _ OrderedCollection new.\\\\n\\\\trunValues _ OrderedCollection new.\\\\n\\\\trunStart _ 1.\\\\n\\\\tleadingChar _ (self at: runStart) leadingChar.\\\\n\\\\t2 to: self size do: [:index |\\\\n\\\\t\\\\t(self at: index) leadingChar = leadingChar ifFalse: [\\\\n\\\\t\\\\t\\\\trunValues add: leadingChar.\\\\n\\\\t\\\\t\\\\trunLength add: (index - runStart).\\\\n\\\\t\\\\t\\\\tleadingChar _ (self at: index) leadingChar.\\\\n\\\\t\\\\t\\\\trunStart _ index.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\trunValues add: (self last) leadingChar.\\\\n\\\\trunLength add: self size + 1 -  runStart.\\\\n\\\\n\\\\tstream nextPut: $(.\\\\n\\\\trunLength do: [:rr | rr printOn: stream. stream space].\\\\n\\\\tstream skip: -1; nextPut: $).\\\\n\\\\trunValues do: [:vv | vv printOn: stream. stream nextPut: $,].\\\\n\\\\tstream skip: -1.\\\\n! !\\\\n\\\\n\\\\n!String methodsFor: 'filter streaming' stamp: 'yo 8/26/2002 22:31'!\\\\nbyteEncode:aStream\\\\n\\\\n\\\\t^aStream writeString: self.\\\\n! !\\\\n\\\\n!String methodsFor: 'filter streaming' stamp: 'yo 8/26/2002 22:31'!\\\\nputOn:aStream\\\\n\\\\n\\\\t^aStream nextPutAll: self.\\\\n! !\\\\n\\\\n\\\\n!String methodsFor: 'formatting' stamp: 'md 5/26/2005 13:34'!\\\\nexpandMacros\\\\n\\\\t^self expandMacrosWithArguments: #()! !\\\\n\\\\n!String methodsFor: 'formatting' stamp: 'md 5/26/2005 13:34'!\\\\nexpandMacrosWithArguments: anArray \\\\n\\\\t| newStream readStream char index |\\\\n\\\\tnewStream := WriteStream on: (String new: self size).\\\\n\\\\treadStream := ReadStream on: self.\\\\n\\\\t[readStream atEnd] whileFalse: \\\\n\\\\t\\\\t\\\\t[char := readStream next.\\\\n\\\\t\\\\t\\\\tchar == $< \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[| nextChar |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnextChar := readStream next asUppercase.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnextChar == $N ifTrue: [newStream cr].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnextChar == $T ifTrue: [newStream tab].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnextChar isDigit \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[index := nextChar digitValue.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[readStream atEnd \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tor: [(nextChar := readStream next asUppercase) isDigit not]] \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twhileFalse: [index := index * 10 + nextChar digitValue]].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnextChar == $? \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[| trueString falseString |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttrueString := readStream upTo: $:.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfalseString := readStream upTo: $>.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\treadStream position: readStream position - 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnewStream \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnextPutAll: ((anArray at: index) ifTrue: [trueString] ifFalse: [falseString])].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnextChar == $P \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [newStream nextPutAll: (anArray at: index) printString].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnextChar == $S ifTrue: [newStream nextPutAll: (anArray at: index)].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\treadStream skipTo: $>]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[newStream nextPut: (char == $% ifTrue: [readStream next] ifFalse: [char])]].\\\\n\\\\t^newStream contents! !\\\\n\\\\n!String methodsFor: 'formatting' stamp: 'md 5/26/2005 13:34'!\\\\nexpandMacrosWith: anObject \\\\n\\\\t^self expandMacrosWithArguments: (Array with: anObject)! !\\\\n\\\\n!String methodsFor: 'formatting' stamp: 'md 5/26/2005 13:34'!\\\\nexpandMacrosWith: anObject with: anotherObject \\\\n\\\\t^self \\\\n\\\\t\\\\texpandMacrosWithArguments: (Array with: anObject with: anotherObject)! !\\\\n\\\\n!String methodsFor: 'formatting' stamp: 'md 5/26/2005 13:34'!\\\\nexpandMacrosWith: anObject with: anotherObject with: thirdObject \\\\n\\\\t^self expandMacrosWithArguments: (Array \\\\n\\\\t\\\\t\\\\t\\\\twith: anObject\\\\n\\\\t\\\\t\\\\t\\\\twith: anotherObject\\\\n\\\\t\\\\t\\\\t\\\\twith: thirdObject)! !\\\\n\\\\n!String methodsFor: 'formatting' stamp: 'md 5/26/2005 13:34'!\\\\nexpandMacrosWith: anObject with: anotherObject with: thirdObject with: fourthObject \\\\n\\\\t^self expandMacrosWithArguments: (Array \\\\n\\\\t\\\\t\\\\t\\\\twith: anObject\\\\n\\\\t\\\\t\\\\t\\\\twith: anotherObject\\\\n\\\\t\\\\t\\\\t\\\\twith: thirdObject\\\\n\\\\t\\\\t\\\\t\\\\twith: fourthObject)! !\\\\n\\\\n!String methodsFor: 'formatting' stamp: 'yo 11/3/2004 19:24'!\\\\nformat: aCollection \\\\n\\\\t\\\\\\\"format the receiver with aCollection  \\\\n\\\\t \\\\n\\\\tsimplest example:  \\\\n\\\\t'foo {1} bar' format: {Date today}.\\\\n\\\\t \\\\n\\\\tcomplete example:  \\\\n\\\\t'\\\\\\\\{ \\\\\\\\} \\\\\\\\\\\\\\\\ foo {1} bar {2}' format: {12. 'string'}.  \\\\n\\\\t\\\\\\\"\\\\n\\\\t| result stream |\\\\n\\\\tresult := String new writeStream.\\\\n\\\\tstream := self readStream.\\\\n\\\\n\\\\t[stream atEnd]\\\\n\\\\t\\\\twhileFalse: [| currentChar | \\\\n\\\\t\\\\t\\\\tcurrentChar := stream next.\\\\n\\\\t\\\\t\\\\tcurrentChar == ${\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [| expression | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\texpression := self getEnclosedExpressionFrom: stream.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tresult\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnextPutAll: (self evaluateExpression: expression parameters: aCollection)]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcurrentChar == $\\\\\\\\\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [stream atEnd\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [result nextPut: stream next]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [result nextPut: currentChar]]].\\\\n\\\\n\\\\t^ result contents! !\\\\n\\\\n!String methodsFor: 'formatting' stamp: 'yo 11/3/2004 19:24'!\\\\nwithCRs\\\\n\\\\t\\\\\\\"Return a copy of the receiver in which backslash (\\\\\\\\) characters have been replaced with carriage returns.\\\\\\\"\\\\n\\\\n\\\\t^ self collect: [ :c | c = $\\\\\\\\ ifTrue: [ Character cr ] ifFalse: [ c ]].! !\\\\n\\\\n\\\\n!String methodsFor: 'internet' stamp: 'yo 12/28/2003 01:17'!\\\\ndecodeMimeHeader\\\\n\\\\t\\\\\\\"See RFC 2047, MIME Part Three: Message Header Extension for Non-ASCII  \\\\n\\\\tText. Text containing non-ASCII characters is encoded by the sequence  \\\\n\\\\t=?character-set?encoding?encoded-text?=  \\\\n\\\\tEncoding is Q (quoted printable) or B (Base64), handled by  \\\\n\\\\tBase64MimeConverter / RFC2047MimeConverter.\\\\n\\\\n\\\\tThanks to Yokokawa-san, it works in m17n package.  Try the following:\\\\n\\\\n\\\\t'=?ISO-2022-JP?B?U1dJS0lQT1AvGyRCPUJDKyVpJXMlQRsoQi8=?= =?ISO-2022-JP?B?GyRCJVElRiUjJSobKEIoUGF0aW8p?=' decodeMimeHeader.\\\\n\\\\\\\"\\\\n\\\\t| input output temp charset decoder encodedStream encoding pos |\\\\n\\\\tinput _ ReadStream on: self.\\\\n\\\\toutput _ WriteStream on: String new.\\\\n\\\\t[output\\\\n\\\\t\\\\tnextPutAll: (input upTo: $=).\\\\n\\\\t\\\\\\\"ASCII Text\\\\\\\"\\\\n\\\\tinput atEnd]\\\\n\\\\t\\\\twhileFalse: [(temp _ input next) = $?\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [charset _ input upTo: $?.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tencoding _ (input upTo: $?) asUppercase.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttemp _ input upTo: $?.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tinput next.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Skip final =\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(charset isNil or: [charset size = 0]) ifTrue: [charset _ 'LATIN-1'].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tencodedStream _ MultiByteBinaryOrTextStream on: String new encoding: charset.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdecoder _ encoding = 'B'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [Base64MimeConverter new]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [RFC2047MimeConverter new].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdecoder\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmimeStream: (ReadStream on: temp);\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t dataStream: encodedStream;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t mimeDecode.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\toutput nextPutAll: encodedStream reset contents.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpos _ input position.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tinput skipSeparators.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Delete spaces if followed by =\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tinput peek = $=\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [input position: pos]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [output nextPut: $=;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t nextPut: temp]].\\\\n\\\\t^ output contents! !\\\\n\\\\n!String methodsFor: 'internet' stamp: 'yo 11/3/2004 19:24'!\\\\ndecodeQuotedPrintable\\\\n\\\\t\\\\\\\"Assume receiver is in MIME 'quoted-printable' encoding, and decode it.\\\\\\\"\\\\n  \\\\n\\\\t^QuotedPrintableMimeConverter mimeDecode: self as: self class! !\\\\n\\\\n!String methodsFor: 'internet' stamp: 'ar 4/9/2005 22:16'!\\\\nisoToSqueak\\\\n\\\\t^self \\\\\\\"no longer needed\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'internet' stamp: 'yo 11/3/2004 19:24'!\\\\nisoToUtf8\\\\n\\\\t\\\\\\\"Convert ISO 8559-1 to UTF-8\\\\\\\"\\\\n\\\\t| s v |\\\\n\\\\ts _ WriteStream on: (String new: self size).\\\\n\\\\n\\\\tself do: [:c |\\\\n\\\\t\\\\tv _ c asciiValue.\\\\n\\\\t\\\\t(v > 128)\\\\n\\\\t\\\\t\\\\tifFalse: [s nextPut: c]\\\\n\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\ts nextPut: (192+(v >> 6)) asCharacter.\\\\n\\\\t\\\\t\\\\t\\\\ts nextPut: (128+(v bitAnd: 63)) asCharacter]].\\\\n\\\\t^s contents. \\\\n! !\\\\n\\\\n!String methodsFor: 'internet' stamp: 'ar 4/10/2005 15:58'!\\\\nmacToSqueak\\\\n\\\\t\\\\\\\"Convert the receiver from MacRoman to Squeak encoding\\\\\\\"\\\\n\\\\t^ self collect: [:each | each macToSqueak]! !\\\\n\\\\n!String methodsFor: 'internet' stamp: 'ar 4/9/2005 22:16'!\\\\nsqueakToIso\\\\n\\\\t^self \\\\\\\"no longer needed\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'internet' stamp: 'ar 4/10/2005 15:55'!\\\\nsqueakToMac\\\\n\\\\t\\\\\\\"Convert the receiver from Squeak to MacRoman encoding\\\\\\\"\\\\n\\\\t^ self collect: [:each | each squeakToMac]! !\\\\n\\\\n!String methodsFor: 'internet' stamp: 'yo 11/3/2004 19:24'!\\\\nutf8ToIso\\\\n\\\\t\\\\\\\"Only UTF-8 characters that maps to 8-bit ISO-8559-1 values are converted. Others raises an error\\\\\\\"\\\\n\\\\t| s i c v c2 v2 |\\\\n\\\\ts _ WriteStream on: (String new: self size).\\\\n\\\\t\\\\n\\\\ti _ 1.\\\\n\\\\t[i <= self size] whileTrue: [\\\\n\\\\t\\\\tc _ self at: i. i_i+1.\\\\n\\\\t\\\\tv _ c asciiValue.\\\\n\\\\t\\\\t(v > 128)\\\\n\\\\t\\\\t\\\\tifFalse: [ s nextPut: c ]\\\\n\\\\t\\\\t\\\\tifTrue: [((v bitAnd: 252) == 192)\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self error: 'illegal UTF-8 ISO character']\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(i > self size) ifTrue: [ self error: 'illegal end-of-string, expected 2nd byte of UTF-8'].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tc2 _ self at: i. i_i+1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tv2 _ c2 asciiValue.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t((v2 bitAnd: 192) = 128) ifFalse: [self error: 'illegal 2nd UTF-8 char']. \\\\n\\\\t\\\\t\\\\t\\\\t\\\\ts nextPut: ((v2 bitAnd: 63) bitOr: ((v << 6) bitAnd: 192)) asCharacter]]].\\\\n\\\\t^s contents. \\\\n! !\\\\n\\\\n!String methodsFor: 'internet' stamp: 'yo 11/3/2004 19:24'!\\\\nwithInternetLineEndings\\\\n\\\\t\\\\\\\"change line endings from CR's to CRLF's.  This is probably in\\\\nprepration for sending a string over the Internet\\\\\\\"\\\\n\\\\t| cr lf |\\\\n\\\\tcr _ Character cr.\\\\n\\\\tlf _ Character linefeed.\\\\n\\\\t^self class streamContents: [ :stream |\\\\n\\\\t\\\\tself do: [ :c |\\\\n\\\\t\\\\t\\\\tstream nextPut: c.\\\\n\\\\t\\\\t\\\\tc = cr ifTrue:[ stream nextPut: lf ]. ] ].! !\\\\n\\\\n!String methodsFor: 'internet' stamp: 'yo 11/3/2004 19:24'!\\\\nwithSqueakLineEndings\\\\n\\\\t\\\\\\\"assume the string is textual, and that CR, LF, and CRLF are all \\\\n\\\\tvalid line endings.  Replace each occurence with a single CR\\\\\\\"\\\\n\\\\t| cr lf input c crlf inPos outPos outString lineEndPos newOutPos |\\\\n\\\\tcr _ Character cr.\\\\n\\\\tlf _ Character linefeed.\\\\n\\\\tcrlf _ CharacterSet new.\\\\n\\\\tcrlf add: cr; add: lf.\\\\n\\\\n\\\\tinPos _ 1.\\\\n\\\\toutPos _ 1.\\\\n\\\\toutString _\\\\n String new: self size.\\\\n\\\\n\\\\t[ lineEndPos _ self indexOfAnyOf: crlf startingAt: inPos ifAbsent: [0].\\\\n\\\\t\\\\tlineEndPos ~= 0 ] whileTrue: [\\\\n\\\\t\\\\t\\\\tnewOutPos _ outPos + (lineEndPos - inPos + 1).\\\\n\\\\t\\\\t\\\\toutString replaceFrom: outPos to: newOutPos - 2 with: self startingAt: inPos.\\\\n\\\\t\\\\t\\\\toutString at: newOutPos-1 put: cr.\\\\n\\\\t\\\\t\\\\toutPos _ newOutPos.\\\\n\\\\n\\\\t\\\\t\\\\t((self at: lineEndPos) = cr and: [ lineEndPos < self size and: [ (self at: lineEndPos+1) = lf ] ]) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"CRLF ending\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tinPos _ lineEndPos + 2 ]\\\\n\\\\t\\\\t\\\\tifFalse: [ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"CR or LF ending\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tinPos _ lineEndPos + 1 ]. ].\\\\n\\\\n\\\\t\\\\\\\"no more line endings.  copy the rest\\\\\\\"\\\\n\\\\tnewOutPos _ outPos + (self size - inPos + 1).\\\\n\\\\toutString replaceFrom: outPos to: newOutPos-1 with: self startingAt: inPos.\\\\n\\\\n\\\\t^outString copyFrom: 1 to: newOutPos-1\\\\n\\\\t! !\\\\n\\\\n!String methodsFor: 'internet' stamp: 'yo 11/3/2004 19:24'!\\\\nwithoutQuoting\\\\n\\\\t\\\\\\\"remove the initial and final quote marks, if present\\\\\\\"\\\\n\\\\t\\\\\\\"'''h''' withoutQuoting\\\\\\\"\\\\n\\\\t| quote |\\\\n\\\\tself size < 2 ifTrue: [ ^self ].\\\\n\\\\tquote _ self first.\\\\n\\\\t(quote = $' or: [ quote = $\\\\\\\" ])\\\\n\\\\t\\\\tifTrue: [ ^self copyFrom: 2 to: self size - 1 ]\\\\n\\\\t\\\\tifFalse: [ ^self ].! !\\\\n\\\\n\\\\n!String methodsFor: 'paragraph support' stamp: 'yo 8/26/2002 22:19'!\\\\nindentationIfBlank: aBlock\\\\n\\\\t\\\\\\\"Answer the number of leading tabs in the receiver.  If there are\\\\n\\\\t no visible characters, pass the number of tabs to aBlock and return its value.\\\\\\\"\\\\n\\\\n\\\\t| reader leadingTabs lastSeparator cr tab ch |\\\\n\\\\tcr _ Character cr.\\\\n\\\\ttab _ Character tab.\\\\n\\\\treader _ ReadStream on: self.\\\\n\\\\tleadingTabs _ 0.\\\\n\\\\t[reader atEnd not and: [(ch _ reader next) = tab]]\\\\n\\\\t\\\\twhileTrue: [leadingTabs _ leadingTabs + 1].\\\\n\\\\tlastSeparator _ leadingTabs + 1.\\\\n\\\\t[reader atEnd not and: [ch isSeparator and: [ch ~= cr]]]\\\\n\\\\t\\\\twhileTrue: [lastSeparator _ lastSeparator + 1. ch _ reader next].\\\\n\\\\tlastSeparator = self size | (ch = cr)\\\\n\\\\t\\\\tifTrue: [^aBlock value: leadingTabs].\\\\n\\\\t^ leadingTabs.\\\\n! !\\\\n\\\\n\\\\n!String methodsFor: 'printing' stamp: 'yo 11/3/2004 19:24'!\\\\nbasicType\\\\n\\\\t\\\\\\\"Answer a symbol representing the inherent type of the receiver\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Number String Boolean player collection sound color etc\\\\\\\"\\\\n\\\\t^ #String! !\\\\n\\\\n!String methodsFor: 'printing' stamp: 'yo 8/26/2002 22:57'!\\\\nencodeDoublingQuoteOn: aStream \\\\n\\\\t\\\\\\\"Print inside string quotes, doubling inbedded quotes.\\\\\\\"\\\\n\\\\t| x |\\\\n\\\\taStream print: $'.\\\\n\\\\t1 to: self size do:\\\\n\\\\t\\\\t[:i |\\\\n\\\\t\\\\taStream print: (x _ self at: i).\\\\n\\\\t\\\\tx = $' ifTrue: [aStream print: x]].\\\\n\\\\taStream print: $'! !\\\\n\\\\n!String methodsFor: 'printing' stamp: 'yo 11/3/2004 19:24'!\\\\nisLiteral\\\\n\\\\n\\\\t^true! !\\\\n\\\\n!String methodsFor: 'printing' stamp: 'sd 7/8/2006 18:06'!\\\\nprintOn: aStream \\\\n\\\\t\\\\\\\"Print inside string quotes, doubling inbedded quotes.\\\\\\\"\\\\n \\\\n\\\\tself storeOn: aStream! !\\\\n\\\\n!String methodsFor: 'printing' stamp: 'yo 8/26/2002 22:58'!\\\\nstoreOn: aStream \\\\n\\\\t\\\\\\\"Print inside string quotes, doubling inbedded quotes.\\\\\\\"\\\\n\\\\t| x |\\\\n\\\\taStream nextPut: $'.\\\\n\\\\t1 to: self size do:\\\\n\\\\t\\\\t[:i |\\\\n\\\\t\\\\taStream nextPut: (x _ self at: i).\\\\n\\\\t\\\\tx = $' ifTrue: [aStream nextPut: x]].\\\\n\\\\taStream nextPut: $'! !\\\\n\\\\n!String methodsFor: 'printing' stamp: 'yo 11/3/2004 19:24'!\\\\nstringRepresentation\\\\n\\\\t\\\\\\\"Answer a string that represents the receiver.  For most objects this is simply its printString, but for strings themselves, it's themselves, to avoid the superfluous extra pair of quotes.  6/12/96 sw\\\\\\\"\\\\n\\\\n\\\\t^ self ! !\\\\n\\\\n\\\\n!String methodsFor: 'system primitives' stamp: 'sw 10/20/2004 17:51'!\\\\nendsWithAColon \\\\n\\\\t\\\\\\\"Answer whether the final character of the receiver is a colon\\\\\\\"\\\\n\\\\n\\\\t^ self size > 0 and: [self last == $:]\\\\n\\\\n\\\\\\\"\\\\n#fred: endsWithAColon\\\\n'fred' endsWithAColon\\\\n\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'system primitives' stamp: 'ar 4/10/2005 16:55'!\\\\nfindSubstring: key in: body startingAt: start matchTable: matchTable\\\\n\\\\t\\\\\\\"Answer the index in the string body at which the substring key first occurs, at or beyond start.  The match is determined using matchTable, which can be used to effect, eg, case-insensitive matches.  If no match is found, zero will be returned.\\\\\\\"\\\\n\\\\t| index c1 c2 |\\\\n\\\\tmatchTable == nil ifTrue: [\\\\n\\\\t\\\\tkey size = 0 ifTrue: [^ 0].\\\\n\\\\t\\\\tstart to: body size - key size + 1 do:\\\\n\\\\t\\\\t\\\\t[:startIndex |\\\\n\\\\t\\\\t\\\\tindex _ 1.\\\\n\\\\t\\\\t\\\\t\\\\t[(body at: startIndex+index-1)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t= (key at: index)]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\twhileTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[index = key size ifTrue: [^ startIndex].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tindex _ index+1]].\\\\n\\\\t\\\\t^ 0\\\\n\\\\t].\\\\n\\\\n\\\\tkey size = 0 ifTrue: [^ 0].\\\\n\\\\tstart to: body size - key size + 1 do:\\\\n\\\\t\\\\t[:startIndex |\\\\n\\\\t\\\\tindex _ 1.\\\\n\\\\t\\\\t[c1 _ body at: startIndex+index-1.\\\\n\\\\t\\\\tc2 _ key at: index.\\\\n\\\\t\\\\t((c1 leadingChar = 0) ifTrue: [(matchTable at: c1 asciiValue + 1)]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [c1 asciiValue + 1])\\\\n\\\\t\\\\t\\\\t= ((c2 leadingChar = 0) ifTrue: [(matchTable at: c2 asciiValue + 1)]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [c2 asciiValue + 1])]\\\\n\\\\t\\\\t\\\\twhileTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[index = key size ifTrue: [^ startIndex].\\\\n\\\\t\\\\t\\\\t\\\\tindex _ index+1]].\\\\n\\\\t^ 0\\\\n! !\\\\n\\\\n!String methodsFor: 'system primitives' stamp: 'yo 11/3/2004 19:24'!\\\\nnumArgs \\\\n\\\\t\\\\\\\"Answer either the number of arguments that the receiver would take if considered a selector.  Answer -1 if it couldn't be a selector.  Note that currently this will answer -1 for anything begining with an uppercase letter even though the system will accept such symbols as selectors.  It is intended mostly for the assistance of spelling correction.\\\\\\\"\\\\n\\\\n\\\\t| firstChar numColons excess start ix |\\\\n\\\\tself size = 0 ifTrue: [^ -1].\\\\n\\\\tfirstChar _ self at: 1.\\\\n\\\\t(firstChar isLetter or: [firstChar = $:]) ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"Fast reject if any chars are non-alphanumeric\\\\\\\"\\\\n\\\\t\\\\t(self findSubstring: '~' in: self startingAt: 1 matchTable: Tokenish) > 0 ifTrue: [^ -1].\\\\n\\\\t\\\\t\\\\\\\"Fast colon count\\\\\\\"\\\\n\\\\t\\\\tnumColons _ 0.  start _ 1.\\\\n\\\\t\\\\t[(ix _ self findSubstring: ':' in: self startingAt: start matchTable: CaseSensitiveOrder) > 0]\\\\n\\\\t\\\\t\\\\twhileTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[numColons _ numColons + 1.\\\\n\\\\t\\\\t\\\\t\\\\tstart _ ix + 1].\\\\n\\\\t\\\\tnumColons = 0 ifTrue: [^ 0].\\\\n\\\\t\\\\tfirstChar = $:\\\\n\\\\t\\\\t\\\\tifTrue: [excess _ 2 \\\\\\\"Has an initial keyword, as #:if:then:else:\\\\\\\"]\\\\n\\\\t\\\\t\\\\tifFalse: [excess _ 0].\\\\n\\\\t\\\\tself last = $:\\\\n\\\\t\\\\t\\\\tifTrue: [^ numColons - excess]\\\\n\\\\t\\\\t\\\\tifFalse: [^ numColons - excess - 1 \\\\\\\"Has a final keywords as #nextPut::andCR\\\\\\\"]].\\\\n\\\\tfirstChar isSpecial ifTrue:\\\\n\\\\t\\\\t[self size = 1 ifTrue: [^ 1].\\\\n\\\\t\\\\t2 to: self size do: [:i | (self at: i) isSpecial ifFalse: [^ -1]].\\\\n\\\\t\\\\t^ 1].\\\\n\\\\t^ -1.! !\\\\n\\\\n\\\\n!String methodsFor: 'testing' stamp: 'yo 11/3/2004 19:24'!\\\\nhasContentsInExplorer\\\\n\\\\n\\\\t^false! !\\\\n\\\\n!String methodsFor: 'testing' stamp: 'ar 4/10/2005 16:49'!\\\\nincludesUnifiedCharacter\\\\n\\\\t^false! !\\\\n\\\\n!String methodsFor: 'testing' stamp: 'yo 11/3/2004 19:24'!\\\\nisAllDigits\\\\n\\\\t\\\\\\\"whether the receiver is composed entirely of digits\\\\\\\"\\\\n\\\\tself do: [:c | c isDigit ifFalse: [^ false]].\\\\n\\\\t^ true! !\\\\n\\\\n!String methodsFor: 'testing' stamp: 'yo 11/3/2004 19:24'!\\\\nisAllSeparators\\\\n\\\\t\\\\\\\"whether the receiver is composed entirely of separators\\\\\\\"\\\\n\\\\tself do: [ :c | c isSeparator ifFalse: [ ^false ] ].\\\\n\\\\t^true! !\\\\n\\\\n!String methodsFor: 'testing' stamp: 'yo 8/4/2003 12:26'!\\\\nisAsciiString\\\\n\\\\n\\\\t| c |\\\\n\\\\tc _ self detect: [:each | each asciiValue > 127] ifNone: [nil].\\\\n\\\\t^ c isNil.\\\\n! !\\\\n\\\\n!String methodsFor: 'testing' stamp: 'ar 4/10/2005 16:23'!\\\\nisByteString\\\\n\\\\t\\\\\\\"Answer whether the receiver is a ByteString\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n!String methodsFor: 'testing' stamp: 'ar 4/10/2005 23:25'!\\\\nisOctetString\\\\n\\\\t\\\\\\\"Answer whether the receiver can be represented as a byte string. \\\\n\\\\tThis is different from asking whether the receiver *is* a ByteString \\\\n\\\\t(i.e., #isByteString)\\\\\\\"\\\\n\\\\t1 to: self size do: [:pos |\\\\n\\\\t\\\\t(self at: pos) asInteger >= 256 ifTrue: [^ false].\\\\n\\\\t].\\\\n\\\\t^ true.\\\\n! !\\\\n\\\\n!String methodsFor: 'testing' stamp: 'yo 11/3/2004 19:24'!\\\\nisString\\\\n\\\\t^ true! !\\\\n\\\\n!String methodsFor: 'testing' stamp: 'ar 4/12/2005 19:52'!\\\\nisWideString\\\\n\\\\t\\\\\\\"Answer whether the receiver is a WideString\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n!String methodsFor: 'testing' stamp: 'yo 11/3/2004 19:24'!\\\\nlastSpacePosition\\\\n\\\\t\\\\\\\"Answer the character position of the final space or other separator character in the receiver, and 0 if none\\\\\\\"\\\\n\\\\tself size to: 1 by: -1 do:\\\\n\\\\t\\\\t[:i | ((self at: i) isSeparator) ifTrue: [^ i]].\\\\n\\\\t^ 0\\\\n\\\\n\\\\\\\"\\\\n'fred the bear' lastSpacePosition\\\\n'ziggie' lastSpacePosition\\\\n'elvis ' lastSpacePosition\\\\n'wimpy  ' lastSpacePosition\\\\n'' lastSpacePosition\\\\n\\\\\\\"! !\\\\n\\\\n\\\\n!String methodsFor: 'translating' stamp: 'dgd 8/24/2004 19:42'!\\\\ntranslated\\\\n\\\\t\\\\\\\"answer the receiver translated to the default language\\\\\\\"\\\\n\\\\t^ NaturalLanguageTranslator current  translate: self! !\\\\n\\\\n!String methodsFor: 'translating' stamp: 'dgd 8/27/2004 18:43'!\\\\ntranslatedIfCorresponds\\\\n\\\\t\\\\\\\"answer the receiver translated to the default language only if \\\\n\\\\tthe receiver begins and ends with an underscore (_)\\\\\\\"\\\\n\\\\t^ ('_*_' match: self)\\\\n\\\\t\\\\tifTrue: [(self copyFrom: 2 to: self size - 1) translated]\\\\n\\\\t\\\\tifFalse: [self]! !\\\\n\\\\n!String methodsFor: 'translating' stamp: 'dgd 8/24/2004 19:38'!\\\\ntranslatedTo: localeID \\\\n\\\\t\\\\\\\"answer the receiver translated to the given locale id\\\\\\\"\\\\n\\\\t^ localeID translator translate: self! !\\\\n\\\\n\\\\n!String methodsFor: 'user interface' stamp: 'md 7/28/2005 20:42'!\\\\nasExplorerString\\\\n\\\\n\\\\t^ self printString! !\\\\n\\\\n!String methodsFor: 'user interface' stamp: 'ar 9/27/2005 20:02'!\\\\nopenInWorkspaceWithTitle: aTitle\\\\n\\\\t\\\\\\\"Open up a workspace with the receiver as its contents, with the given title\\\\\\\"\\\\n\\\\tUIManager default edit: self label: aTitle! !\\\\n\\\\n\\\\n!String methodsFor: '*eToys-*Morphic' stamp: 'ar 4/10/2005 17:06'!\\\\nnewTileMorphRepresentative\\\\n\\\\t^ TileMorph new setLiteral: self;addSuffixIfCan! !\\\\n\\\\n\\\\n!String methodsFor: '*Morphic' stamp: 'ar 4/10/2005 17:07'!\\\\nasMorph \\\\n\\\\t\\\\\\\"Answer the receiver as a StringMorph\\\\\\\"\\\\n\\\\n\\\\t^ StringMorph contents: self\\\\n\\\\n\\\\\\\"'bugs black blood' asMorph openInHand\\\\\\\"! !\\\\n\\\\n!String methodsFor: '*Morphic' stamp: 'ar 4/10/2005 17:07'!\\\\nasStringMorph \\\\n\\\\t\\\\\\\"Answer the receiver as a StringMorph\\\\\\\"\\\\n\\\\n\\\\t^ StringMorph contents: self\\\\n\\\\n\\\\\\\"'bugs black blood' asStringMorph openInHand\\\\\\\"! !\\\\n\\\\n\\\\n!String methodsFor: '*MorphicExtras-*morphic-Postscript Canvases' stamp: 'yo 11/3/2004 19:24'!\\\\nasPostscript\\\\n\\\\n\\\\t| temp |\\\\n\\\\ttemp _ self asString copyReplaceAll: '(' with: '\\\\\\\\('.\\\\n\\\\ttemp _ temp copyReplaceAll: ')' with: '\\\\\\\\)'.\\\\n\\\\ttemp _ temp copyReplaceAll: '\\\\n' \\\\n\\\\t\\\\t\\\\twith: ''.\\\\n\\\\t^ PostscriptEncoder mapMacStringToPS: temp! !\\\\n\\\\n\\\\n!String methodsFor: '*Morphic-converting' stamp: 'yo 11/3/2004 19:24'!\\\\nopenAsMorph\\\\n\\\\t\\\\\\\"Open the receiver as a morph\\\\\\\"\\\\n\\\\n\\\\t^ self asMorph openInHand ! !\\\\n\\\\n\\\\n!String methodsFor: '*monticello' stamp: 'avi 2/4/2004 14:14'!\\\\nextractNumber\\\\n\\\\t^ ('0', self select: [:ea | ea isDigit]) asNumber! !\\\\n\\\\n\\\\n!String methodsFor: '*network-uri' stamp: 'mir 2/26/2002 14:59'!\\\\nasURI\\\\n\\\\t\\\\\\\"convert to a Url\\\\\\\"\\\\n\\\\t\\\\\\\"'http://www.cc.gatech.edu/' asURI\\\\\\\"\\\\n\\\\t\\\\\\\"'msw://chaos.resnet.gatech.edu:9000/' asURI\\\\\\\"\\\\n\\\\t^URI fromString: self! !\\\\n\\\\n\\\\n!String methodsFor: '*packageinfo-base' stamp: 'nk 8/30/2004 09:02'!\\\\nescapeEntities\\\\n\\\\t^ self species streamContents: [:s | self do: [:c | s nextPutAll: c escapeEntities]]\\\\n! !\\\\n\\\\n\\\\n!String methodsFor: '*services-base' stamp: 'rr 3/21/2006 12:00'!\\\\nservice\\\\n\\\\t^ self serviceOrNil ifNil: [ServiceCategory new id: self asSymbol]! !\\\\n\\\\n!String methodsFor: '*services-base' stamp: 'rr 3/21/2006 12:00'!\\\\nserviceOrNil\\\\n\\\\t^ ServiceRegistry current serviceWithId: self asSymbol! !\\\\n\\\\n\\\\n!String methodsFor: '*versionnumber' stamp: 'yo 11/3/2004 19:24'!\\\\nasVersion\\\\n\\\\n\\\\t\\\\\\\"Answer a VersionNumber\\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\t^VersionNumber fromString: self! !\\\\n\\\\n\\\\n!String methodsFor: 'private' stamp: 'yo 11/3/2004 19:24'!\\\\ncorrectAgainstEnumerator: wordBlock continuedFrom: oldCollection\\\\n\\\\t\\\\\\\"The guts of correction, instead of a wordList, there is a block that should take another block and enumerate over some list with it.\\\\\\\"\\\\n\\\\n\\\\t| choices scoreMin results score maxChoices |\\\\n\\\\tscoreMin _ self size // 2 min: 3.\\\\n\\\\tmaxChoices _ 10.\\\\n\\\\toldCollection isNil\\\\n\\\\t\\\\tifTrue: [ choices _ SortedCollection sortBlock: [ :x :y | x value > y value ] ]\\\\n\\\\t\\\\tifFalse: [ choices _ oldCollection ].\\\\n\\\\twordBlock isNil\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[ results _ OrderedCollection new.\\\\n\\\\t\\\\t\\\\t1 to: (maxChoices min: choices size) do: [ :i | results add: (choices at: i) key ] ]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[ wordBlock value: [ :word |\\\\n\\\\t\\\\t\\\\t\\\\t(score _ self alike: word) >= scoreMin ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[ choices add: (Association key: word value: score).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(choices size >= maxChoices) ifTrue: [ scoreMin _ (choices at: maxChoices) value] ] ].\\\\n\\\\t\\\\t\\\\tresults _ choices ].\\\\n\\\\t^ results! !\\\\n\\\\n!String methodsFor: 'private' stamp: 'yo 11/3/2004 19:24'!\\\\nevaluateExpression: aString parameters: aCollection \\\\n\\\\t\\\\\\\"private - evaluate the expression aString with  \\\\n\\\\taCollection as the parameters and answer the  \\\\n\\\\tevaluation result as an string\\\\\\\"\\\\n\\\\t| index |\\\\n\\\\tindex := ('0' , aString) asNumber.\\\\n\\\\n\\\\tindex isZero\\\\n\\\\t\\\\tifTrue: [^ '[invalid subscript: {1}]' format: {aString}].\\\\n\\\\n\\\\tindex > aCollection size\\\\n\\\\t\\\\tifTrue: [^ '[subscript is out of bounds: {1}]' format: {aString}].\\\\n\\\\n\\\\t^ (aCollection at: index) asString! !\\\\n\\\\n!String methodsFor: 'private' stamp: 'yo 11/3/2004 19:24'!\\\\ngetEnclosedExpressionFrom: aStream \\\\n\\\\t\\\\\\\"private - get the expression enclosed between '{' and \\\\n\\\\t'}' and remove all the characters from the stream\\\\\\\"\\\\n\\\\t| result currentChar |\\\\n\\\\tresult := String new writeStream.\\\\n\\\\n\\\\t[aStream atEnd \\\\n\\\\t\\\\tor: [(currentChar := aStream next) == $}]]\\\\n\\\\t\\\\twhileFalse: [result nextPut: currentChar].\\\\n\\\\n\\\\t^ result contents withBlanksTrimmed! !\\\\n\\\\n!String methodsFor: 'private' stamp: 'yo 8/26/2002 22:53'!\\\\nreplaceFrom: start to: stop with: replacement startingAt: repStart \\\\n\\\\t\\\\\\\"Primitive. This destructively replaces elements from start to stop in the receiver starting at index, repStart, in the collection, replacement. Answer the receiver. Range checks are performed in the primitive only. Optional. See Object documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\t<primitive: 105>\\\\n\\\\tsuper replaceFrom: start to: stop with: replacement startingAt: repStart! !\\\\n\\\\n!String methodsFor: 'private' stamp: 'yo 8/28/2002 15:22'!\\\\nstringhash\\\\n\\\\n\\\\t^ self hash.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nString class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!String class methodsFor: 'examples' stamp: 'yo 11/3/2004 19:24'!\\\\nexample\\\\n\\\\t\\\\\\\"To see the string displayed at the cursor point, execute this expression\\\\n\\\\tand select a point by pressing a mouse button.\\\\\\\"\\\\n\\\\n\\\\t'this is some text' displayOn: Display at: Sensor waitButton! !\\\\n\\\\n\\\\n!String class methodsFor: 'formatting' stamp: 'md 6/5/2005 07:49'!\\\\nexpandMacro: macroType argument: argument withExpansions: expansions \\\\n\\\\tmacroType = $s ifTrue: [^expansions at: argument].\\\\n\\\\tmacroType = $p ifTrue: [^(expansions at: argument) printString].\\\\n\\\\tmacroType = $n ifTrue: [^String cr].\\\\n\\\\tmacroType = $t ifTrue: [^String tab].\\\\n\\\\tself error: 'unknown expansion type'! !\\\\n\\\\n\\\\n!String class methodsFor: 'initialization' stamp: 'ar 4/9/2005 22:37'!\\\\ninitialize   \\\\\\\"self initialize\\\\\\\"\\\\n\\\\n\\\\t| order |\\\\n\\\\tAsciiOrder _ (0 to: 255) as: ByteArray.\\\\n\\\\n\\\\tCaseInsensitiveOrder _ AsciiOrder copy.\\\\n\\\\t($a to: $z) do:\\\\n\\\\t\\\\t[:c | CaseInsensitiveOrder at: c asciiValue + 1\\\\n\\\\t\\\\t\\\\t\\\\tput: (CaseInsensitiveOrder at: c asUppercase asciiValue +1)].\\\\n\\\\n\\\\t\\\\\\\"Case-sensitive compare sorts space, digits, letters, all the rest...\\\\\\\"\\\\n\\\\tCaseSensitiveOrder _ ByteArray new: 256 withAll: 255.\\\\n\\\\torder _ -1.\\\\n\\\\t' 0123456789' do:  \\\\\\\"0..10\\\\\\\"\\\\n\\\\t\\\\t[:c | CaseSensitiveOrder at: c asciiValue + 1 put: (order _ order+1)].\\\\n\\\\t($a to: $z) do:     \\\\\\\"11-64\\\\\\\"\\\\n\\\\t\\\\t[:c | CaseSensitiveOrder at: c asUppercase asciiValue + 1 put: (order _ order+1).\\\\n\\\\t\\\\tCaseSensitiveOrder at: c asciiValue + 1 put: (order _ order+1)].\\\\n\\\\t1 to: CaseSensitiveOrder size do:\\\\n\\\\t\\\\t[:i | (CaseSensitiveOrder at: i) = 255 ifTrue:\\\\n\\\\t\\\\t\\\\t[CaseSensitiveOrder at: i put: (order _ order+1)]].\\\\n\\\\torder = 255 ifFalse: [self error: 'order problem'].\\\\n\\\\n\\\\t\\\\\\\"a table for translating to lower case\\\\\\\"\\\\n\\\\tLowercasingTable _ String withAll: (Character allByteCharacters collect: [:c | c asLowercase]).\\\\n\\\\n\\\\t\\\\\\\"a table for translating to upper case\\\\\\\"\\\\n\\\\tUppercasingTable _ String withAll: (Character allByteCharacters collect: [:c | c asUppercase]).\\\\n\\\\n\\\\t\\\\\\\"a table for testing tokenish (for fast numArgs)\\\\\\\"\\\\n\\\\tTokenish _ String withAll: (Character allByteCharacters collect:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:c | c tokenish ifTrue: [c] ifFalse: [$~]]).\\\\n\\\\n\\\\t\\\\\\\"CR and LF--characters that terminate a line\\\\\\\"\\\\n\\\\tCSLineEnders _ CharacterSet empty.\\\\n\\\\tCSLineEnders add: Character cr.\\\\n\\\\tCSLineEnders add: Character lf.\\\\n\\\\n \\\\t\\\\\\\"separators and non-separators\\\\\\\"\\\\n\\\\tCSSeparators _ CharacterSet separators.\\\\n\\\\tCSNonSeparators _ CSSeparators complement.! !\\\\n\\\\n!String class methodsFor: 'initialization' stamp: 'yo 8/11/2003 21:11'!\\\\ninitializeHtmlEntities\\\\n\\\\t\\\\\\\"self initializeHtmlEntities\\\\\\\"\\\\n\\\\n\\\\tHtmlEntities _ (Dictionary new: 128)\\\\n\\\\t\\\\tat: 'amp'\\\\tput: $&;\\\\n\\\\t\\\\tat: 'lt'\\\\t\\\\tput: $<;\\\\n\\\\t\\\\tat: 'gt'\\\\t\\\\tput: $>;\\\\n\\\\t\\\\tat: 'quot'\\\\tput: $\\\\\\\";\\\\n\\\\t\\\\tat: 'euro'\\\\tput: Character euro;\\\\n\\\\t\\\\tyourself.\\\\n\\\\t#('nbsp' 'iexcl' 'cent' 'pound' 'curren' 'yen' 'brvbar' 'sect' 'uml' 'copy' 'ordf' 'laquo' 'not' 'shy' 'reg' 'hibar' 'deg' 'plusmn' 'sup2' 'sup3' 'acute' 'micro' 'para' 'middot' 'cedil' 'sup1' 'ordm' 'raquo' 'frac14' 'frac12' 'frac34' 'iquest' 'Agrave' 'Aacute' 'Acirc' 'Atilde' 'Auml' 'Aring' 'AElig' 'Ccedil' 'Egrave' 'Eacute' 'Ecirc' 'Euml' 'Igrave' 'Iacute' 'Icirc' 'Iuml' 'ETH' 'Ntilde' 'Ograve' 'Oacute' 'Ocirc' 'Otilde' 'Ouml' 'times' 'Oslash' 'Ugrave' 'Uacute' 'Ucirc' 'Uuml' 'Yacute' 'THORN' 'szlig' 'agrave' 'aacute' 'acirc' 'atilde' 'auml' 'aring' 'aelig' 'ccedil' 'egrave' 'eacute' 'ecirc' 'euml' 'igrave' 'iacute' 'icirc' 'iuml' 'eth' 'ntilde' 'ograve' 'oacute' 'ocirc' 'otilde' 'ouml' 'divide' 'oslash' 'ugrave' 'uacute' 'ucirc' 'uuml' 'yacute' 'thorn' 'yuml' ) withIndexDo: [:each :index | HtmlEntities at: each put: (index + 159) asCharacter]! !\\\\n\\\\n\\\\n!String class methodsFor: 'instance creation' stamp: 'yo 11/3/2004 19:24'!\\\\ncr\\\\n\\\\t\\\\\\\"Answer a string containing a single carriage return character.\\\\\\\"\\\\n\\\\n\\\\t^ self with: Character cr\\\\n! !\\\\n\\\\n!String class methodsFor: 'instance creation' stamp: 'yo 11/3/2004 19:24'!\\\\ncrlf\\\\n\\\\t\\\\\\\"Answer a string containing a carriage return and a linefeed.\\\\\\\"\\\\n\\\\n\\\\t^ self with: Character cr with: Character lf\\\\n! !\\\\n\\\\n!String class methodsFor: 'instance creation' stamp: 'yo 11/3/2004 19:24'!\\\\ncrlfcrlf\\\\n\\\\t^self crlf , self crlf.\\\\n! !\\\\n\\\\n!String class methodsFor: 'instance creation' stamp: 'ar 4/10/2005 16:24'!\\\\nfromByteArray: aByteArray\\\\n\\\\n\\\\t^ aByteArray asString\\\\n! !\\\\n\\\\n!String class methodsFor: 'instance creation' stamp: 'yo 11/3/2004 19:24'!\\\\nfromPacked: aLong\\\\n\\\\t\\\\\\\"Convert from a longinteger to a String of length 4.\\\\\\\"\\\\n\\\\n\\\\t| s |\\\\n\\\\ts _ self new: 4.\\\\n\\\\ts at: 1 put: (aLong digitAt: 4) asCharacter.\\\\n\\\\ts at: 2 put: (aLong digitAt: 3) asCharacter.\\\\n\\\\ts at: 3 put: (aLong digitAt: 2) asCharacter.\\\\n\\\\ts at: 4 put: (aLong digitAt: 1) asCharacter.\\\\n\\\\t^s\\\\n\\\\n\\\\\\\"String fromPacked: 'TEXT' asPacked\\\\\\\"\\\\n! !\\\\n\\\\n!String class methodsFor: 'instance creation' stamp: 'yo 11/3/2004 19:24'!\\\\nfromString: aString \\\\n\\\\t\\\\\\\"Answer an instance of me that is a copy of the argument, aString.\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ aString copyFrom: 1 to: aString size! !\\\\n\\\\n!String class methodsFor: 'instance creation' stamp: 'yo 11/3/2004 19:24'!\\\\nlf\\\\n\\\\t\\\\\\\"Answer a string containing a single carriage return character.\\\\\\\"\\\\n\\\\n\\\\t^ self with: Character lf! !\\\\n\\\\n!String class methodsFor: 'instance creation' stamp: 'ar 4/10/2005 23:26'!\\\\nnew: sizeRequested \\\\n\\\\t\\\\\\\"Answer an instance of this class with the number of indexable\\\\n\\\\tvariables specified by the argument, sizeRequested.\\\\\\\"\\\\n\\\\tself == String \\\\n\\\\t\\\\tifTrue:[^ByteString new: sizeRequested]\\\\n\\\\t\\\\tifFalse:[^self basicNew: sizeRequested].! !\\\\n\\\\n!String class methodsFor: 'instance creation' stamp: 'yo 8/28/2002 13:27'!\\\\nreadFrom: inStream\\\\n\\\\t\\\\\\\"Answer an instance of me that is determined by reading the stream, \\\\n\\\\tinStream. Embedded double quotes become the quote Character.\\\\\\\"\\\\n\\\\n\\\\t| outStream char done |\\\\n\\\\toutStream _ WriteStream on: (self new: 16).\\\\n\\\\t\\\\\\\"go to first quote\\\\\\\"\\\\n\\\\tinStream skipTo: $'.\\\\n\\\\tdone _ false.\\\\n\\\\t[done or: [inStream atEnd]]\\\\n\\\\t\\\\twhileFalse: \\\\n\\\\t\\\\t\\\\t[char _ inStream next.\\\\n\\\\t\\\\t\\\\tchar = $'\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[char _ inStream next.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tchar = $'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [outStream nextPut: char]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [done _ true]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [outStream nextPut: char]].\\\\n\\\\t^outStream contents! !\\\\n\\\\n!String class methodsFor: 'instance creation' stamp: 'yo 11/3/2004 19:24'!\\\\ntab\\\\n\\\\t\\\\\\\"Answer a string containing a single tab character.\\\\\\\"\\\\n\\\\n\\\\t^ self with: Character tab\\\\n! !\\\\n\\\\n!String class methodsFor: 'instance creation' stamp: 'yo 8/28/2002 13:29'!\\\\nvalue: anInteger\\\\n\\\\n\\\\t^ self with: (Character value: anInteger).\\\\n! !\\\\n\\\\n!String class methodsFor: 'instance creation' stamp: 'ar 4/12/2005 17:34'!\\\\nwith: aCharacter\\\\n\\\\t| newCollection |\\\\n\\\\taCharacter asInteger < 256\\\\n\\\\t\\\\tifTrue:[newCollection _ ByteString new: 1]\\\\n\\\\t\\\\tifFalse:[newCollection _ WideString new: 1].\\\\n\\\\tnewCollection at: 1 put: aCharacter.\\\\n\\\\t^newCollection! !\\\\n\\\\n\\\\n!String class methodsFor: 'primitives' stamp: 'yo 12/15/2005 13:41'!\\\\ncompare: string1 with: string2 collated: order\\\\n\\\\t\\\\\\\"Return 1, 2 or 3, if string1 is <, =, or > string2, with the collating order of characters given by the order array.\\\\\\\"\\\\n\\\\n\\\\t| len1 len2 c1 c2 |\\\\n\\\\torder == nil ifTrue: [\\\\n\\\\t\\\\tlen1 _ string1 size.\\\\n\\\\t\\\\tlen2 _ string2 size.\\\\n\\\\t\\\\t1 to: (len1 min: len2) do:[:i |\\\\n\\\\t\\\\t\\\\tc1 _ (string1 at: i) asInteger.\\\\n\\\\t\\\\t\\\\tc2 _ (string2 at: i) asInteger.\\\\n\\\\t\\\\t\\\\tc1 = c2 ifFalse: [c1 < c2 ifTrue: [^ 1] ifFalse: [^ 3]].\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tlen1 = len2 ifTrue: [^ 2].\\\\n\\\\t\\\\tlen1 < len2 ifTrue: [^ 1] ifFalse: [^ 3].\\\\n\\\\t].\\\\n\\\\tlen1 _ string1 size.\\\\n\\\\tlen2 _ string2 size.\\\\n\\\\t1 to: (len1 min: len2) do:[:i |\\\\n\\\\t\\\\tc1 _ (string1 at: i) asInteger.\\\\n\\\\t\\\\tc2 _ (string2 at: i) asInteger.\\\\n\\\\t\\\\tc1 < 256 ifTrue: [c1 _ order at: c1 + 1].\\\\n\\\\t\\\\tc2 < 256 ifTrue: [c2 _ order at: c2 + 1].\\\\n\\\\t\\\\tc1 = c2 ifFalse:[c1 < c2 ifTrue: [^ 1] ifFalse: [^ 3]].\\\\n\\\\t].\\\\n\\\\tlen1 = len2 ifTrue: [^ 2].\\\\n\\\\tlen1 < len2 ifTrue: [^ 1] ifFalse: [^ 3].\\\\n! !\\\\n\\\\n!String class methodsFor: 'primitives' stamp: 'ar 4/10/2005 16:36'!\\\\nfindFirstInString: aString inSet: inclusionMap startingAt: start\\\\n\\\\t\\\\\\\"Trivial, non-primitive version\\\\\\\"\\\\n\\\\t| i stringSize ascii more |\\\\n\\\\tinclusionMap size ~= 256 ifTrue: [^ 0].\\\\n\\\\tstringSize _ aString size.\\\\n\\\\tmore _ true.\\\\n\\\\ti _ start - 1.\\\\n\\\\t[more and: [i + 1 <= stringSize]] whileTrue: [\\\\n\\\\t\\\\ti _ i + 1.\\\\n\\\\t\\\\tascii _ (aString at: i) asciiValue.\\\\n\\\\t\\\\tmore _ ascii < 256 ifTrue: [(inclusionMap at: ascii + 1) = 0] ifFalse: [true].\\\\n\\\\t].\\\\n\\\\n\\\\ti + 1 > stringSize ifTrue: [^ 0].\\\\n\\\\t^ i! !\\\\n\\\\n!String class methodsFor: 'primitives' stamp: 'ar 4/10/2005 16:36'!\\\\nindexOfAscii: anInteger inString: aString startingAt: start\\\\n\\\\t\\\\\\\"Trivial, non-primitive version\\\\\\\"\\\\n\\\\t| stringSize |\\\\n\\\\tstringSize _ aString size.\\\\n\\\\tstart to: stringSize do: [:pos |\\\\n\\\\t\\\\t(aString at: pos) asInteger = anInteger ifTrue: [^ pos]].\\\\n\\\\t^ 0\\\\n! !\\\\n\\\\n!String class methodsFor: 'primitives' stamp: 'ar 4/10/2005 16:29'!\\\\nstringHash: aString initialHash: speciesHash\\\\n\\\\t| stringSize hash low |\\\\n\\\\tstringSize _ aString size.\\\\n\\\\thash _ speciesHash bitAnd: 16rFFFFFFF.\\\\n\\\\t1 to: stringSize do: [:pos |\\\\n\\\\t\\\\thash _ hash + (aString at: pos) asInteger.\\\\n\\\\t\\\\t\\\\\\\"Begin hashMultiply\\\\\\\"\\\\n\\\\t\\\\tlow _ hash bitAnd: 16383.\\\\n\\\\t\\\\thash _ (16r260D * low + ((16r260D * (hash bitShift: -14) + (16r0065 * low) bitAnd: 16383) * 16384)) bitAnd: 16r0FFFFFFF.\\\\n\\\\t].\\\\n\\\\t^ hash.\\\\n! !\\\\n\\\\n!String class methodsFor: 'primitives' stamp: 'ar 4/10/2005 16:36'!\\\\ntranslate: aString from: start  to: stop  table: table\\\\n\\\\t\\\\\\\"Trivial, non-primitive version\\\\\\\"\\\\n\\\\t| char |\\\\n\\\\tstart to: stop do: [:i |\\\\n\\\\t\\\\tchar _ (aString at: i) asInteger.\\\\n\\\\t\\\\tchar < 256 ifTrue: [aString at: i put: (table at: char+1)].\\\\n\\\\t].\\\\n! !\\\\nStringMorph subclass: #StringButtonMorph\\\\n\\\\tinstanceVariableNames: 'target actionSelector arguments actWhen oldColor'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-Widgets'!\\\\n\\\\n!StringButtonMorph methodsFor: 'accessing'!\\\\nactionSelector\\\\n\\\\n\\\\t^ actionSelector\\\\n! !\\\\n\\\\n!StringButtonMorph methodsFor: 'accessing'!\\\\nactionSelector: aSymbolOrString\\\\n\\\\n\\\\t(nil = aSymbolOrString or:\\\\n\\\\t ['nil' = aSymbolOrString or:\\\\n\\\\t [aSymbolOrString isEmpty]])\\\\n\\\\t\\\\tifTrue: [^ actionSelector _ nil].\\\\n\\\\n\\\\tactionSelector _ aSymbolOrString asSymbol.\\\\n! !\\\\n\\\\n!StringButtonMorph methodsFor: 'accessing'!\\\\narguments\\\\n\\\\n\\\\t^ arguments\\\\n! !\\\\n\\\\n!StringButtonMorph methodsFor: 'accessing'!\\\\narguments: aCollection\\\\n\\\\n\\\\targuments _ aCollection asArray copy.\\\\n! !\\\\n\\\\n!StringButtonMorph methodsFor: 'accessing'!\\\\ntarget\\\\n\\\\n\\\\t^ target\\\\n! !\\\\n\\\\n!StringButtonMorph methodsFor: 'accessing'!\\\\ntarget: anObject\\\\n\\\\n\\\\ttarget _ anObject\\\\n! !\\\\n\\\\n\\\\n!StringButtonMorph methodsFor: 'button' stamp: 'dgd 2/22/2003 18:45'!\\\\ndoButtonAction\\\\n\\\\t\\\\\\\"Perform the action of this button. Subclasses may override this method. The default behavior is to send the button's actionSelector to its target object with its arguments.\\\\\\\"\\\\n\\\\n\\\\t(target notNil and: [actionSelector notNil]) \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[Cursor normal \\\\n\\\\t\\\\t\\\\t\\\\tshowWhile: [target perform: actionSelector withArguments: arguments]]! !\\\\n\\\\n\\\\n!StringButtonMorph methodsFor: 'copying' stamp: 'jm 7/28/97 11:55'!\\\\nupdateReferencesUsing: aDictionary\\\\n\\\\t\\\\\\\"If the arguments array points at a morph we are copying, then point at the new copy.  And also copies the array, which is important!!\\\\\\\"\\\\n\\\\n\\\\tsuper updateReferencesUsing: aDictionary.\\\\n\\\\targuments _ arguments collect:\\\\n\\\\t\\\\t[:old | aDictionary at: old ifAbsent: [old]].\\\\n! !\\\\n\\\\n!StringButtonMorph methodsFor: 'copying' stamp: 'tk 1/8/1999 09:47'!\\\\nveryDeepFixupWith: deepCopier\\\\n\\\\t\\\\\\\"If target and arguments fields were weakly copied, fix them here.  If they were in the tree being copied, fix them up, otherwise point to the originals!!!!\\\\\\\"\\\\n\\\\nsuper veryDeepFixupWith: deepCopier.\\\\ntarget _ deepCopier references at: target ifAbsent: [target].\\\\narguments _ arguments collect: [:each |\\\\n\\\\tdeepCopier references at: each ifAbsent: [each]].\\\\n! !\\\\n\\\\n!StringButtonMorph methodsFor: 'copying' stamp: 'tk 1/8/1999 09:46'!\\\\nveryDeepInner: deepCopier\\\\n\\\\t\\\\\\\"Copy all of my instance variables.  Some need to be not copied at all, but shared.  \\\\tWarning!!!!  Every instance variable defined in this class must be handled.  We must also implement veryDeepFixupWith:.  See DeepCopier class comment.\\\\\\\"\\\\n\\\\nsuper veryDeepInner: deepCopier.\\\\n\\\\\\\"target _ target.\\\\t\\\\tWeakly copied\\\\\\\"\\\\n\\\\\\\"actionSelector _ actionSelector.\\\\t\\\\ta Symbol\\\\\\\"\\\\n\\\\\\\"arguments _ arguments.\\\\t\\\\tAll weakly copied\\\\\\\"\\\\nactWhen _ actWhen veryDeepCopyWith: deepCopier.\\\\noldColor _ oldColor veryDeepCopyWith: deepCopier.! !\\\\n\\\\n\\\\n!StringButtonMorph methodsFor: 'event handling'!\\\\nhandlesMouseDown: evt\\\\n\\\\n\\\\t^ true\\\\n! !\\\\n\\\\n!StringButtonMorph methodsFor: 'event handling' stamp: 'ar 10/25/2000 18:14'!\\\\nhandlesMouseStillDown: evt\\\\n\\\\t^actWhen == #whilePressed! !\\\\n\\\\n!StringButtonMorph methodsFor: 'event handling'!\\\\nmouseDown: evt\\\\n\\\\n\\\\toldColor _ color.\\\\n\\\\tactWhen == #buttonDown\\\\n\\\\t\\\\tifTrue: [self doButtonAction].\\\\n! !\\\\n\\\\n!StringButtonMorph methodsFor: 'event handling' stamp: 'ar 10/25/2000 18:15'!\\\\nmouseMove: evt\\\\n\\\\tactWhen == #buttonDown ifTrue: [^ self].\\\\n\\\\t(self containsPoint: evt cursorPoint)\\\\n\\\\t\\\\tifTrue:[self color: (oldColor alphaMixed: 1/2 with: Color white)]\\\\n\\\\t\\\\tifFalse: [self color: oldColor].\\\\n! !\\\\n\\\\n!StringButtonMorph methodsFor: 'event handling' stamp: 'ar 10/25/2000 18:15'!\\\\nmouseStillDown: evt\\\\n\\\\tactWhen == #whilePressed ifFalse: [^ self].\\\\n\\\\t(self containsPoint: evt cursorPoint) ifTrue:[self doButtonAction].! !\\\\n\\\\n!StringButtonMorph methodsFor: 'event handling'!\\\\nmouseUp: evt\\\\n\\\\n\\\\tself color: oldColor.\\\\n\\\\t(actWhen == #buttonUp and: [self containsPoint: evt cursorPoint])\\\\n\\\\t\\\\tifTrue: [self doButtonAction].\\\\n! !\\\\n\\\\n\\\\n!StringButtonMorph methodsFor: 'e-toy support' stamp: 'ar 3/17/2001 20:17'!\\\\nadaptToWorld: aWorld\\\\n\\\\tsuper adaptToWorld: aWorld.\\\\n\\\\ttarget _ target adaptedToWorld: aWorld.! !\\\\n\\\\n\\\\n!StringButtonMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 20:44'!\\\\ninitialize\\\\n\\\\t\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\ttarget _ nil.\\\\n\\\\tactionSelector _ #flash.\\\\n\\\\targuments _ EmptyArray.\\\\n\\\\tactWhen _ #buttonUp.\\\\n\\\\tself contents: 'Flash' ! !\\\\n\\\\n\\\\n!StringButtonMorph methodsFor: 'menu' stamp: 'wiz 1/16/2006 19:57'!\\\\naddCustomMenuItems: aCustomMenu hand: aHandMorph\\\\n\\\\n\\\\tsuper addCustomMenuItems: aCustomMenu hand: aHandMorph.\\\\n\\\\taCustomMenu add: 'change label' translated action: #setLabel.\\\\n\\\\taCustomMenu add: 'change action selector' translated action: #setActionSelector.\\\\n\\\\taCustomMenu add: 'change arguments' translated action: #setArguments.\\\\n\\\\taCustomMenu add: 'change when to act' translated action: #setActWhen.\\\\n\\\\tself addTargetingMenuItems: aCustomMenu hand: aHandMorph .! !\\\\n\\\\n!StringButtonMorph methodsFor: 'menu' stamp: 'wiz 1/16/2006 19:56'!\\\\naddTargetingMenuItems: aCustomMenu hand: aHandMorph \\\\n\\\\t\\\\\\\"Add targeting menu items\\\\\\\"\\\\n\\\\taCustomMenu addLine.\\\\n\\\\n\\\\taCustomMenu add: 'set target' translated action: #targetWith:.\\\\n\\\\taCustomMenu add: 'sight target' translated action: #sightTargets:.\\\\n\\\\ttarget\\\\n\\\\t\\\\tifNotNil: [aCustomMenu add: 'clear target' translated action: #clearTarget]! !\\\\n\\\\n!StringButtonMorph methodsFor: 'menu' stamp: 'wiz 1/16/2006 19:55'!\\\\nclearTarget\\\\n\\\\n\\\\ttarget _ nil.\\\\n! !\\\\n\\\\n!StringButtonMorph methodsFor: 'menu' stamp: 'yo 3/16/2005 21:02'!\\\\nsetActWhen\\\\n\\\\n\\\\t| selections |\\\\n\\\\tselections _ #(buttonDown buttonUp whilePressed).\\\\n\\\\tactWhen _ (SelectionMenu labelList: (selections collect: [:t | t translated]) selections: selections)\\\\n\\\\t\\\\tstartUpWithCaption: 'Choose one of the following conditions' translated.\\\\n! !\\\\n\\\\n!StringButtonMorph methodsFor: 'menu' stamp: 'yo 3/16/2005 20:54'!\\\\nsetActionSelector\\\\n\\\\n\\\\t| newSel |\\\\n\\\\tnewSel _ FillInTheBlank\\\\n\\\\t\\\\trequest:\\\\n'Please type the selector to be sent to\\\\nthe target when this button is pressed' translated\\\\n\\\\t\\\\tinitialAnswer: actionSelector.\\\\n\\\\tnewSel isEmpty ifFalse: [self actionSelector: newSel].\\\\n! !\\\\n\\\\n!StringButtonMorph methodsFor: 'menu' stamp: 'yo 3/14/2005 13:09'!\\\\nsetArguments\\\\n\\\\n\\\\t| s newArgs newArgsArray |\\\\n\\\\ts _ WriteStream on: ''.\\\\n\\\\targuments do: [:arg | arg printOn: s. s nextPutAll: '. '].\\\\n\\\\tnewArgs _ FillInTheBlank\\\\n\\\\t\\\\trequest:\\\\n'Please type the arguments to be sent to the target\\\\nwhen this button is pressed separated by periods' translated\\\\n\\\\t\\\\tinitialAnswer: s contents.\\\\n\\\\tnewArgs isEmpty ifFalse: [\\\\n\\\\t\\\\tnewArgsArray _ Compiler evaluate: '{', newArgs, '}' for: self logged: false.\\\\n\\\\t\\\\tself arguments: newArgsArray].\\\\n! !\\\\n\\\\n!StringButtonMorph methodsFor: 'menu'!\\\\nsetLabel\\\\n\\\\n\\\\t| newLabel |\\\\n\\\\tnewLabel _ FillInTheBlank\\\\n\\\\t\\\\trequest:\\\\n'Please type a new label for this button'\\\\n\\\\t\\\\tinitialAnswer: self contents.\\\\n\\\\tnewLabel isEmpty ifFalse: [self contents: newLabel].\\\\n! !\\\\n\\\\n!StringButtonMorph methodsFor: 'menu' stamp: 'dgd 2/22/2003 18:55'!\\\\nsetTarget: evt \\\\n\\\\t| rootMorphs |\\\\n\\\\trootMorphs _ self world rootMorphsAt: evt hand targetOffset.\\\\n\\\\ttarget _ rootMorphs size > 1\\\\n\\\\t\\\\tifTrue: [rootMorphs second]\\\\n\\\\t\\\\tifFalse: [nil]! !\\\\n\\\\n\\\\n!StringButtonMorph methodsFor: 'submorphs-add/remove'!\\\\nactWhen: aSymbol\\\\n\\\\t\\\\\\\"Set the condition under which to invoke my action to one of: #buttonDown, #buttonUp, and #whilePressed.\\\\\\\"\\\\n\\\\n\\\\tactWhen _ aSymbol.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStringButtonMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StringButtonMorph class methodsFor: 'printing' stamp: 'sw 2/16/98 03:02'!\\\\ndefaultNameStemForInstances\\\\n\\\\t^ 'SButton'! !\\\\nModel subclass: #StringHolder\\\\n\\\\tinstanceVariableNames: 'contents'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'ST80-Kernel-Remnants'!\\\\n!StringHolder commentStamp: '<historical>' prior: 0!\\\\nI am a kind of Model that includes a piece of text.  In some cases, the text can be edited, and in some the text is a method.\\\\n\\\\nCategories 'code pane menu' and 'message list menu' are messages that may be called by my menus when the text is a method, and when some pane is a list of methods.  Other of my subclasses may ignore these two catagories altogether.!\\\\n\\\\n\\\\n!StringHolder methodsFor: 'accessing' stamp: 'di 5/19/1998 15:34'!\\\\nacceptContents: aString \\\\n\\\\t\\\\\\\"Set aString to be the contents of the receiver.  Return true cuz happy\\\\\\\"\\\\n\\\\n\\\\tself contents: aString.\\\\n\\\\t^ true! !\\\\n\\\\n!StringHolder methodsFor: 'accessing' stamp: 'nk 4/29/2004 12:32'!\\\\nclassCommentIndicated\\\\n\\\\t\\\\\\\"Answer true iff we're viewing the class comment.\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n!StringHolder methodsFor: 'accessing'!\\\\ncontents\\\\n\\\\t\\\\\\\"Answer the contents that the receiver is holding--presumably a string.\\\\\\\"\\\\n\\\\n\\\\t^contents! !\\\\n\\\\n!StringHolder methodsFor: 'accessing' stamp: 'sw 1/12/1999 11:47'!\\\\ncontents: textOrString \\\\n\\\\t\\\\\\\"Set textOrString to be the contents of the receiver.\\\\\\\"\\\\n\\\\n\\\\tcontents _ textOrString \\\\\\\"asString\\\\\\\"! !\\\\n\\\\n!StringHolder methodsFor: 'accessing' stamp: 'tk 4/3/98 22:50'!\\\\ncontentsSelection\\\\n\\\\t\\\\\\\"Return the interval of text in the code pane to select when I set the pane's contents\\\\\\\"\\\\n\\\\n\\\\t^ 1 to: 0  \\\\\\\"null selection\\\\\\\"! !\\\\n\\\\n!StringHolder methodsFor: 'accessing' stamp: 'sw 12/9/2000 23:59'!\\\\nnoteAcceptanceOfCodeFor: aSelector\\\\n\\\\t\\\\\\\"A method has possibly been submitted for the receiver with aSelector as its selector; If the receiver wishes to take soem action here is a chance for it to do so\\\\\\\"\\\\n! !\\\\n\\\\n!StringHolder methodsFor: 'accessing' stamp: 'sw 12/1/2000 11:04'!\\\\nreformulateList\\\\n\\\\t\\\\\\\"If the receiver has a way of reformulating its message list, here is a chance for it to do so\\\\\\\"! !\\\\n\\\\n!StringHolder methodsFor: 'accessing' stamp: 'sw 12/6/2000 17:48'!\\\\nreformulateListNoting: newSelector\\\\n\\\\t\\\\\\\"A method has possibly been submitted for the receiver with newSelector as its selector; If the receiver has a way of reformulating its message list, here is a chance for it to do so\\\\\\\"\\\\n\\\\n\\\\t^ self reformulateList! !\\\\n\\\\n!StringHolder methodsFor: 'accessing' stamp: 'tk 4/18/1998 14:59'!\\\\nselectedClassName\\\\n\\\\t\\\\\\\"I may know what class is currently selected\\\\\\\"\\\\n\\\\n\\\\tself selectedClass ifNotNil: [^ self selectedClass name].\\\\n\\\\t^ nil! !\\\\n\\\\n!StringHolder methodsFor: 'accessing' stamp: 'tk 4/18/1998 15:01'!\\\\nselectedClassOrMetaClass\\\\n\\\\n\\\\t^ self selectedClass\\\\t\\\\\\\"I don't know any better\\\\\\\"! !\\\\n\\\\n!StringHolder methodsFor: 'accessing' stamp: 'tk 4/18/1998 15:22'!\\\\nselectedMessageName\\\\n\\\\n\\\\t^ nil! !\\\\n\\\\n!StringHolder methodsFor: 'accessing' stamp: 'di 11/23/1998 15:21'!\\\\ntextContents: aStringOrText \\\\n\\\\t\\\\\\\"Set aStringOrText to be the contents of the receiver.\\\\\\\"\\\\n\\\\n\\\\tcontents _ aStringOrText! !\\\\n\\\\n\\\\n!StringHolder methodsFor: 'code pane menu' stamp: 'dgd 10/1/2004 13:43'!\\\\ncodePaneMenu: aMenu shifted: shifted \\\\n\\\\t\\\\\\\"Note that unless we override perform:orSendTo:, \\\\n\\\\tPluggableTextController will respond to all menu items in a \\\\n\\\\ttext pane\\\\\\\"\\\\n\\\\t| donorMenu |\\\\n\\\\tdonorMenu := shifted\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [ParagraphEditor shiftedYellowButtonMenu]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [ParagraphEditor yellowButtonMenu].\\\\n\\\\t^ aMenu addAllFrom: donorMenu! !\\\\n\\\\n!StringHolder methodsFor: 'code pane menu' stamp: 'wod 5/29/1998 16:35'!\\\\nperform: selector orSendTo: otherTarget\\\\n\\\\t\\\\\\\"Selector was just chosen from a menu by a user.  If can respond, then\\\\nperform it on myself. If not, send it to otherTarget, presumably the\\\\neditPane from which the menu was invoked.\\\\\\\"\\\\n\\\\n\\\\t(self respondsTo: selector)\\\\n\\\\t\\\\tifTrue: [^ self perform: selector]\\\\n\\\\t\\\\tifFalse: [^ otherTarget perform: selector]! !\\\\n\\\\n!StringHolder methodsFor: 'code pane menu' stamp: 'tk 4/6/98 11:43'!\\\\nshowBytecodes\\\\n\\\\t\\\\\\\"We don't know how to do this\\\\\\\"\\\\n\\\\n\\\\t^ self changed: #flash! !\\\\n\\\\n!StringHolder methodsFor: 'code pane menu' stamp: 'ar 9/27/2005 20:47'!\\\\nspawn: contentsString\\\\n\\\\n\\\\tUIManager default edit: contentsString label: 'Workspace'\\\\n! !\\\\n\\\\n\\\\n!StringHolder methodsFor: 'evaluation'!\\\\ndoItContext\\\\n\\\\t\\\\\\\"Answer the context in which a text selection can be evaluated.\\\\\\\"\\\\n\\\\n\\\\t^nil! !\\\\n\\\\n!StringHolder methodsFor: 'evaluation'!\\\\ndoItReceiver\\\\n\\\\t\\\\\\\"Answer the object that should be informed of the result of evaluating a \\\\n\\\\ttext selection.\\\\\\\"\\\\n\\\\n\\\\t^nil! !\\\\n\\\\n\\\\n!StringHolder methodsFor: 'initialize-release'!\\\\ndefaultContents\\\\n\\\\n\\\\t^''! !\\\\n\\\\n!StringHolder methodsFor: 'initialize-release' stamp: 'sw 10/16/1998 11:36'!\\\\nembeddedInMorphicWindowLabeled: labelString\\\\n\\\\t| window |\\\\n\\\\twindow _ (SystemWindow labelled: labelString) model: self.\\\\n\\\\twindow addMorph: (PluggableTextMorph on: self text: #contents accept: #acceptContents:\\\\n\\\\t\\\\t\\\\treadSelection: nil menu: #codePaneMenu:shifted:)\\\\n\\\\t\\\\tframe: (0@0 corner: 1@1).\\\\n\\\\t^ window! !\\\\n\\\\n!StringHolder methodsFor: 'initialize-release' stamp: 'jm 3/24/98 17:56'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Initialize the state of the receiver with its default contents.\\\\\\\"\\\\n\\\\n\\\\tcontents _ self defaultContents.\\\\n! !\\\\n\\\\n!StringHolder methodsFor: 'initialize-release' stamp: 'sw 10/16/1998 11:37'!\\\\nopenAsMorphLabel: labelString \\\\n\\\\t\\\\\\\"Workspace new openAsMorphLabel: 'Workspace'\\\\\\\"\\\\n\\\\t(self embeddedInMorphicWindowLabeled: labelString) openInWorld! !\\\\n\\\\n!StringHolder methodsFor: 'initialize-release' stamp: 'sw 12/22/1998 00:16'!\\\\nopenLabel: aString \\\\n\\\\t\\\\\\\"Create a standard system view of the model, me, a StringHolder and open it.  If in mvc, terminate the active controller so that the new window will immediately be activated.\\\\\\\"\\\\n\\\\tself openLabel: aString andTerminate: true! !\\\\n\\\\n!StringHolder methodsFor: 'initialize-release' stamp: 'sma 4/30/2000 10:15'!\\\\nopenLabel: aString andTerminate: terminateBoolean\\\\n\\\\t\\\\\\\"Create a standard system view of the model, me, a StringHolder and open it.; do not terminate the active process if in mvc\\\\\\\"\\\\n\\\\t| topView codeView |\\\\n\\\\n\\\\tSmalltalk isMorphic ifTrue: [^ self openAsMorphLabel: aString].\\\\n\\\\n\\\\ttopView _ (StandardSystemView new) model: self.\\\\n\\\\ttopView borderWidth: 1.\\\\n\\\\ttopView label: aString.\\\\n\\\\ttopView minimumSize: 100 @ 50.\\\\n\\\\n\\\\tcodeView _ PluggableTextView on: self \\\\n\\\\t\\\\t\\\\ttext: #contents accept: #acceptContents:\\\\n\\\\t\\\\t\\\\treadSelection: #contentsSelection menu: #codePaneMenu:shifted:.\\\\n\\\\tcodeView window: (0@0 extent: 200@200).\\\\n\\\\ttopView addSubView: codeView.\\\\n\\\\t\\\\\\\"self contents size > 0 ifTrue: [\\\\n\\\\t\\\\t\\\\tcodeView hasUnacceptedEdits: true].  Is it already saved or not??\\\\\\\"\\\\n\\\\tterminateBoolean\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[topView controller open]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[topView controller openNoTerminate]! !\\\\n\\\\n\\\\n!StringHolder methodsFor: 'optional panes' stamp: 'sw 1/24/2001 21:25'!\\\\nwantsAnnotationPane\\\\n\\\\t\\\\\\\"Answer whether the receiver, seen in some browser window, would like to have the so-called  annotationpane included.  By default, various browsers defer to the global preference 'optionalButtons' -- but individual subclasses can insist to the contrary.\\\\\\\"\\\\n\\\\n\\\\t^ Preferences annotationPanes! !\\\\n\\\\n!StringHolder methodsFor: 'optional panes' stamp: 'sw 1/24/2001 18:57'!\\\\nwantsOptionalButtons\\\\n\\\\t\\\\\\\"Answer whether the receiver, seen in some browser window, would like to have the so-called optional button pane included.  By default, various browsers defer to the global preference 'optionalButtons' -- but individual subclasses can insist to the contrary.\\\\\\\"\\\\n\\\\n\\\\t^ Preferences optionalButtons! !\\\\n\\\\n\\\\n!StringHolder methodsFor: 'tiles' stamp: 'di 11/4/2000 11:07'!\\\\nopenSyntaxView\\\\n\\\\t\\\\\\\"Open a syntax view on the current method\\\\\\\"\\\\n\\\\n\\\\t| class selector |\\\\n\\\\n\\\\t(selector _ self selectedMessageName) ifNotNil: [\\\\n\\\\t\\\\tclass _ self selectedClassOrMetaClass.\\\\n\\\\t\\\\tSyntaxMorph testClass: class andMethod: selector.\\\\n\\\\t]! !\\\\n\\\\n\\\\n!StringHolder methodsFor: 'toolbuilder' stamp: 'ar 2/11/2005 20:36'!\\\\nbuildWith: builder\\\\n\\\\t| windowSpec textSpec |\\\\n\\\\twindowSpec := builder pluggableWindowSpec new.\\\\n\\\\twindowSpec model: self.\\\\n\\\\twindowSpec label: 'Workspace'.\\\\n\\\\twindowSpec children: OrderedCollection new.\\\\n\\\\ttextSpec := builder pluggableTextSpec new.\\\\n\\\\ttextSpec \\\\n\\\\t\\\\tmodel: self;\\\\n\\\\t\\\\tgetText: #contents; \\\\n\\\\t\\\\tsetText: #acceptContents:; \\\\n\\\\t\\\\tselection: nil; \\\\n\\\\t\\\\tmenu: #codePaneMenu:shifted:;\\\\n\\\\t\\\\tframe: (0@0corner: 1@1).\\\\n\\\\twindowSpec children add: textSpec.\\\\n\\\\n\\\\t^builder build: windowSpec! !\\\\n\\\\n\\\\n!StringHolder methodsFor: 'user edits' stamp: 'di 4/21/1998 11:30'!\\\\nclearUserEditFlag\\\\n\\\\t\\\\\\\"Clear the hasUnacceptedEdits flag in all my dependent views.\\\\\\\"\\\\n\\\\n\\\\tself changed: #clearUserEdits! !\\\\n\\\\n!StringHolder methodsFor: 'user edits' stamp: 'tk 4/13/1998 23:07'!\\\\nokToChange\\\\n\\\\n\\\\tself canDiscardEdits ifTrue: [^ true].\\\\n\\\\tself changed: #wantToChange.  \\\\\\\"Solicit cancel from view\\\\\\\"\\\\n\\\\t^ self canDiscardEdits\\\\n! !\\\\n\\\\n\\\\n!StringHolder methodsFor: '*services-base' stamp: 'rr 3/15/2004 09:17'!\\\\ncodeTextMorph\\\\n\\\\t^ self dependents\\\\n\\\\t\\\\tdetect: [:dep | (dep isKindOf: PluggableTextMorph)\\\\n\\\\t\\\\t\\\\t\\\\tand: [dep getTextSelector == #contents]]\\\\n\\\\t\\\\tifNone: []! !\\\\n\\\\n!StringHolder methodsFor: '*services-base' stamp: 'rr 6/9/2005 10:47'!\\\\nrequestor\\\\n\\\\t^ (TextRequestor new) model: self; yourself! !\\\\n\\\\n!StringHolder methodsFor: '*services-base' stamp: 'rr 3/15/2004 09:17'!\\\\nselectedInterval\\\\n\\\\t^self codeTextMorph selectionInterval! !\\\\n\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nbrowseAllMessages\\\\n\\\\t\\\\\\\"Create and schedule a message set browser on all implementors of all the messages sent by the current method.\\\\\\\"\\\\n\\\\n\\\\t| aClass aName method filteredList |\\\\n\\\\t(aName := self selectedMessageName) ifNotNil: [\\\\n\\\\t\\\\tmethod := (aClass := self selectedClassOrMetaClass) compiledMethodAt: aName.\\\\n\\\\t\\\\tfilteredList := method messages reject: \\\\n\\\\t\\\\t\\\\t[:each | #(new initialize = ) includes: each].\\\\n\\\\t\\\\tself systemNavigation browseAllImplementorsOfList: filteredList asSortedCollection\\\\n\\\\t\\\\t\\\\t title: 'All messages sent in ', aClass name, '.', aName]\\\\n! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'tk 4/18/1998 16:11'!\\\\nbrowseClass\\\\n\\\\t\\\\\\\"Open an class browser on this class and method\\\\\\\"\\\\n\\\\n\\\\tself selectedClassOrMetaClass ifNotNil: [\\\\n\\\\t\\\\tBrowser newOnClass: self selectedClassOrMetaClass \\\\n\\\\t\\\\t\\\\tselector: self selectedMessageName]! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 4/16/2003 08:42'!\\\\nbrowseLocalImplementors\\\\n\\\\t\\\\\\\"Present a menu of all messages sent by the currently selected message. \\\\n\\\\tOpen a message set browser of all implementors of the message chosen in or below\\\\n\\\\tthe selected class.\\\\n\\\\tDo nothing if no message is chosen.\\\\\\\"\\\\n\\\\tself getSelectorAndSendQuery: #browseAllImplementorsOf:localTo:\\\\n\\\\t\\\\tto: self systemNavigation\\\\n\\\\t\\\\twith: { self selectedClass }! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 4/16/2003 20:41'!\\\\nbrowseLocalSendersOfMessages\\\\n\\\\t\\\\\\\"Present a menu of the currently selected message, as well as all\\\\n\\\\tmessages sent by it.  Open a message set browser of all implementors\\\\n\\\\tof the message chosen in or below the selected class\\\\\\\"\\\\n\\\\n\\\\tself getSelectorAndSendQuery: #browseAllCallsOn:localTo:\\\\n\\\\t\\\\tto: self systemNavigation\\\\n\\\\t\\\\twith: { self selectedClass }! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 4/16/2003 08:45'!\\\\nbrowseMessages\\\\n\\\\t\\\\\\\"Present a menu of all messages sent by the currently selected message. \\\\n\\\\tOpen a message set browser of all implementors of the message chosen.\\\\\\\"\\\\n\\\\n\\\\tself getSelectorAndSendQuery: #browseAllImplementorsOf: to: self systemNavigation! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nbrowseMethodFull\\\\n\\\\t\\\\\\\"Create and schedule a full Browser and then select the current class and message.\\\\\\\"\\\\n\\\\n\\\\t| myClass |\\\\n\\\\t(myClass := self selectedClassOrMetaClass) ifNotNil:\\\\n\\\\t\\\\t[Browser fullOnClass: myClass selector: self selectedMessageName]! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 4/16/2003 20:40'!\\\\nbrowseSendersOfMessages\\\\n\\\\t\\\\\\\"Present a menu of the currently selected message, as well as all messages sent by it.  Open a message set browser of all senders of the selector chosen.\\\\\\\"\\\\n\\\\n\\\\tself getSelectorAndSendQuery: #browseAllCallsOn: to: self systemNavigation! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nbrowseUnusedMethods\\\\n\\\\t| classes unsent messageList cls |\\\\n\\\\t(cls := self selectedClass)\\\\n\\\\t\\\\tifNil: [^ self].\\\\n\\\\tclasses := Array with: cls with: cls class.\\\\n\\\\tunsent := Set new.\\\\n\\\\tclasses\\\\n\\\\t\\\\tdo: [:c | unsent addAll: c selectors].\\\\n\\\\tunsent := self systemNavigation allUnSentMessagesIn: unsent.\\\\n\\\\tmessageList := OrderedCollection new.\\\\n\\\\tclasses\\\\n\\\\t\\\\tdo: [:c | (c selectors\\\\n\\\\t\\\\t\\\\t\\\\tselect: [:s | unsent includes: s]) asSortedCollection\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:sel | messageList add: c name , ' ' , sel]].\\\\n\\\\tself systemNavigation browseMessageList: messageList name: 'Unsent Methods in ' , cls name! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nbrowseVersions\\\\n\\\\t\\\\\\\"Create and schedule a Versions Browser, showing all versions of the \\\\n\\\\tcurrently selected message. Answer the browser or nil.\\\\\\\"\\\\n\\\\t| selector class | \\\\n\\\\tself classCommentIndicated\\\\n\\\\t\\\\tifTrue: [ ClassCommentVersionsBrowser browseCommentOf: self selectedClass.\\\\n\\\\t\\\\t\\\\t^nil ].\\\\n\\\\n\\\\t(selector := self selectedMessageName)\\\\n\\\\t\\\\tifNil:[ self inform: 'Sorry, only actual methods have retrievable versions.'. ^nil ]\\\\n\\\\t\\\\tifNotNil: [\\\\n\\\\t\\\\t\\\\tclass := self selectedClassOrMetaClass.\\\\n\\\\t\\\\t\\\\t^VersionsBrowser\\\\n\\\\t\\\\t\\\\t\\\\tbrowseVersionsOf: (class compiledMethodAt: selector)\\\\n\\\\t\\\\t\\\\t\\\\tclass: self selectedClass\\\\n\\\\t\\\\t\\\\t\\\\tmeta: class isMeta\\\\n\\\\t\\\\t\\\\t\\\\tcategory: (class organization categoryOfElement: selector)\\\\n\\\\t\\\\t\\\\t\\\\tselector: selector]! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'tk 4/28/1998 19:14'!\\\\nbuildMessageBrowser\\\\n\\\\t\\\\\\\"Create and schedule a message browser.\\\\\\\"\\\\n\\\\n\\\\tself selectedMessageName ifNil: [^ self].\\\\n\\\\tBrowser openMessageBrowserForClass: self selectedClassOrMetaClass \\\\n\\\\t\\\\tselector: self selectedMessageName editString: nil! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 1/16/2004 21:14'!\\\\nclassHierarchy\\\\n\\\\t\\\\\\\"Create and schedule a class list browser on the receiver's hierarchy.\\\\\\\"\\\\n\\\\n\\\\tself systemNavigation\\\\n\\\\t\\\\tspawnHierarchyForClass: self selectedClassOrMetaClass \\\\\\\"OK if nil\\\\\\\"\\\\n\\\\t\\\\tselector: self selectedMessageName\\\\n! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sw 5/8/2000 02:16'!\\\\nclassListKey: aChar from: view \\\\n\\\\t\\\\\\\"Respond to a Command key.  I am a model with a list of classes and a \\\\n\\\\tcode pane, and I also have a listView that has a list of methods.  The \\\\n\\\\tview knows how to get the list and selection.\\\\\\\"\\\\n\\\\n\\\\taChar == $f ifTrue: [^ self findMethod].\\\\n\\\\taChar == $r ifTrue: [^ self recent].\\\\n\\\\taChar == $h ifTrue: [^ self spawnHierarchy].\\\\n\\\\taChar == $x ifTrue: [^ self removeClass].\\\\n\\\\t^ self messageListKey: aChar from: view! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\ncopyName\\\\n\\\\t\\\\\\\"Copy the current selector to the clipboard\\\\\\\"\\\\n\\\\t| selector |\\\\n\\\\t(selector := self selectedMessageName) ifNotNil:\\\\n\\\\t\\\\t[Clipboard clipboardText: selector asString asText]! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\ncopySelector\\\\n\\\\t\\\\\\\"Copy the selected selector to the clipboard\\\\\\\"\\\\n\\\\n\\\\t| selector |\\\\n\\\\t(selector := self selectedMessageName) ifNotNil:\\\\n\\\\t\\\\t[Clipboard clipboardText: selector asString]! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sw 7/1/2001 08:24'!\\\\nfileOutMessage\\\\n\\\\t\\\\\\\"Put a description of the selected message on a file\\\\\\\"\\\\n\\\\n\\\\tself selectedMessageName ifNotNil:\\\\n\\\\t\\\\t[Cursor write showWhile:\\\\n\\\\t\\\\t\\\\t[self selectedClassOrMetaClass fileOutMethod: self selectedMessageName]]! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nfindMethodInChangeSets\\\\n\\\\t\\\\\\\"Find and open a changeSet containing the current method.\\\\\\\"\\\\n\\\\n\\\\t| aName |\\\\n\\\\t(aName := self selectedMessageName) ifNotNil: [\\\\n\\\\t\\\\tChangeSorter browseChangeSetsWithClass: self selectedClassOrMetaClass\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tselector: aName]! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\ninspectInstances\\\\n\\\\t\\\\\\\"Inspect all instances of the selected class.\\\\\\\"\\\\n\\\\n\\\\t| myClass |\\\\n\\\\t(myClass := self selectedClassOrMetaClass) ifNotNil:\\\\n\\\\t\\\\t[myClass theNonMetaClass inspectAllInstances]. \\\\n! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\ninspectSubInstances\\\\n\\\\t\\\\\\\"Inspect all instances of the selected class and all its subclasses\\\\\\\"\\\\n\\\\n\\\\t| aClass |\\\\n\\\\t(aClass := self selectedClassOrMetaClass) ifNotNil: [\\\\n\\\\t\\\\taClass theNonMetaClass inspectSubInstances].\\\\n! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nmakeIsolatedCodePane\\\\n\\\\t| msgName |\\\\n\\\\n\\\\t(msgName := self selectedMessageName) ifNil: [^ Beeper beep].\\\\n\\\\tMethodHolder makeIsolatedCodePaneForClass: self selectedClassOrMetaClass selector: msgName! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nmessageListKey: aChar from: view\\\\n\\\\t\\\\\\\"Respond to a Command key.  I am a model with a code pane, and I also\\\\n\\\\thave a listView that has a list of methods.  The view knows how to get\\\\n\\\\tthe list and selection.\\\\\\\"\\\\n\\\\n\\\\t| sel class |\\\\n\\\\taChar == $D ifTrue: [^ self toggleDiffing].\\\\n\\\\n\\\\tsel := self selectedMessageName.\\\\n\\\\taChar == $m ifTrue:  \\\\\\\"These next two put up a type in if no message selected\\\\\\\"\\\\n\\\\t\\\\t[^ self useSelector: sel orGetSelectorAndSendQuery: #browseAllImplementorsOf: to: self systemNavigation].\\\\n\\\\taChar == $n ifTrue: \\\\n\\\\t\\\\t[^ self useSelector: sel orGetSelectorAndSendQuery: #browseAllCallsOn: to: self systemNavigation].\\\\n\\\\n\\\\t\\\\\\\"The following require a class selection\\\\\\\"\\\\n\\\\t(class := self selectedClassOrMetaClass) ifNil: [^ self arrowKey: aChar from: view].\\\\n\\\\taChar == $b ifTrue: [^ Browser fullOnClass: class selector: sel].\\\\n\\\\taChar == $N ifTrue: [^ self browseClassRefs].\\\\n\\\\taChar == $i ifTrue: [^ self methodHierarchy].\\\\n\\\\taChar == $h ifTrue: [^ self classHierarchy].\\\\n\\\\taChar == $p ifTrue: [^ self browseFullProtocol].\\\\n\\\\n\\\\t\\\\\\\"The following require a method selection\\\\\\\"\\\\n\\\\tsel ifNotNil: \\\\n\\\\t\\\\t[aChar == $o ifTrue: [^ self fileOutMessage].\\\\n\\\\t\\\\taChar == $c ifTrue: [^ self copySelector].\\\\n\\\\t\\\\taChar == $v ifTrue: [^ self browseVersions].\\\\n\\\\t\\\\taChar == $O ifTrue: [^ self openSingleMessageBrowser].\\\\n\\\\t\\\\taChar == $x ifTrue: [^ self removeMessage]].\\\\n\\\\n\\\\t^ self arrowKey: aChar from: view! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nmessageListSelectorTitle\\\\n\\\\t| selector aString aStamp aSize |\\\\n\\\\n\\\\t(selector := self selectedMessageName)\\\\n\\\\t\\\\tifNil:\\\\n\\\\t\\\\t\\\\t[aSize := self messageList size.\\\\n\\\\t\\\\t\\\\t^ (aSize == 0 ifTrue: ['no'] ifFalse: [aSize printString]), ' message', (aSize == 1 ifTrue: [''] ifFalse: ['s'])]\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t[Preferences timeStampsInMenuTitles\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\t[^ nil].\\\\n\\\\t\\\\t\\\\taString := selector truncateWithElipsisTo: 28.\\\\n\\\\t\\\\t\\\\t^ (aStamp := self timeStamp) size > 0\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[aString, String cr, aStamp]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[aString]]! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 1/16/2004 21:10'!\\\\nmethodHierarchy\\\\n\\\\t\\\\\\\"Create and schedule a method browser on the hierarchy of implementors.\\\\\\\"\\\\n\\\\n\\\\tself systemNavigation \\\\n\\\\t\\\\t\\\\tmethodHierarchyBrowserForClass: self selectedClassOrMetaClass \\\\n\\\\t\\\\t\\\\tselector: self selectedMessageName\\\\n! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nofferDurableMenuFrom: menuRetriever shifted: aBoolean\\\\n\\\\t\\\\\\\"Pop up (morphic only) a menu whose target is the receiver and whose contents are provided by sending the menuRetriever to the receiver.  The menuRetriever takes two arguments: a menu, and a boolean representing the shift state; put a stay-up item at the top of the menu.\\\\\\\"\\\\n\\\\n\\\\t| aMenu |\\\\n\\\\taMenu := MenuMorph new defaultTarget: self.\\\\n\\\\taMenu addStayUpItem.\\\\n\\\\tself perform: menuRetriever with: aMenu with: aBoolean.\\\\n\\\\t\\\\taMenu popUpInWorld! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nofferMenuFrom: menuRetriever shifted: aBoolean\\\\n\\\\t\\\\\\\"Pop up, in morphic or mvc as the case may be, a menu whose target is the receiver and whose contents are provided by sending the menuRetriever to the receiver.  The menuRetriever takes two arguments: a menu, and a boolean representing the shift state.\\\\\\\"\\\\n\\\\n\\\\t| aMenu |\\\\n\\\\tSmalltalk isMorphic\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[aMenu := MenuMorph new defaultTarget: self.\\\\n\\\\t\\\\t\\\\tself perform: menuRetriever with: aMenu with: aBoolean.\\\\n\\\\t\\\\t\\\\taMenu popUpInWorld]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[aMenu := CustomMenu new.\\\\n\\\\t\\\\t\\\\tself perform: menuRetriever with: aMenu with: aBoolean.\\\\n\\\\t\\\\t\\\\taMenu invokeOn: self]! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nopenSingleMessageBrowser\\\\n\\\\t| msgName mr |\\\\n\\\\t\\\\\\\"Create and schedule a message list browser populated only by the currently selected message\\\\\\\"\\\\n\\\\n\\\\t(msgName := self selectedMessageName) ifNil: [^ self].\\\\n\\\\n\\\\tmr := MethodReference new\\\\n\\\\t\\\\tsetStandardClass: self selectedClassOrMetaClass\\\\n\\\\t\\\\tmethodSymbol: msgName.\\\\n\\\\n\\\\tself systemNavigation \\\\n\\\\t\\\\tbrowseMessageList: (Array with: mr)\\\\n\\\\t\\\\tname: mr asStringOrText\\\\n\\\\t\\\\tautoSelect: nil! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'RAA 12/10/1999 09:36'!\\\\npackageListKey: aChar from: view\\\\n\\\\t\\\\\\\"Respond to a Command key in the package pane in the PackageBrowser\\\\\\\"\\\\n\\\\taChar == $f ifTrue: [^ self findClass].\\\\n\\\\t^ self classListKey: aChar from: view\\\\n! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'tk 4/28/1998 18:16'!\\\\nprintOutMessage\\\\n\\\\t\\\\\\\"Write a file with the text of the selected message, for printing by a web browser\\\\\\\"\\\\n\\\\n\\\\tself selectedMessageName ifNotNil: [\\\\n\\\\t\\\\tself selectedClassOrMetaClass fileOutMethod: self selectedMessageName\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tasHtml: true]! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 5/23/2003 14:42'!\\\\nremoveFromCurrentChanges\\\\n\\\\t\\\\\\\"Tell the changes mgr to forget that the current msg was changed.\\\\\\\"\\\\n\\\\n\\\\tChangeSet current removeSelectorChanges: self selectedMessageName \\\\n\\\\t\\\\t\\\\tclass: self selectedClassOrMetaClass.\\\\n\\\\tself changed: #annotation! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sw 1/28/1999 12:34'!\\\\nrevertAndForget\\\\n\\\\t\\\\\\\"Revert to the previous version of the current method, and tell the changes mgr to forget that it was ever changed.  Danger!!  Use only if you really know what you're doing!!\\\\\\\"\\\\n\\\\n\\\\tself okToChange ifFalse: [^ self].\\\\n\\\\tself revertToPreviousVersion.\\\\n\\\\tself removeFromCurrentChanges.\\\\n\\\\tself contentsChanged\\\\n! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nrevertToPreviousVersion\\\\n\\\\t\\\\\\\"Revert to the previous version of the current method\\\\\\\"\\\\n\\\\t| aClass aSelector  changeRecords |\\\\n\\\\tself okToChange ifFalse: [^ self].\\\\n\\\\taClass := self selectedClassOrMetaClass.\\\\n\\\\taClass ifNil: [^ self changed: #flash].\\\\n\\\\taSelector := self selectedMessageName.\\\\n\\\\tchangeRecords := aClass changeRecordsAt: aSelector.\\\\n\\\\t(changeRecords == nil or: [changeRecords size <= 1]) ifTrue: [self changed: #flash.  ^ Beeper beep].\\\\n\\\\tchangeRecords second fileIn.\\\\n\\\\tself contentsChanged\\\\n! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nselectMessageAndEvaluate: aBlock\\\\n\\\\t\\\\\\\"Allow the user to choose one selector, chosen from the currently selected message's selector, as well as those of all messages sent by it, and evaluate aBlock on behalf of chosen selector.  If there is only one possible choice, simply make it; if there are multiple choices, put up a menu, and evaluate aBlock on behalf of the the chosen selector, doing nothing if the user declines to choose any\\\\\\\"\\\\n\\\\n\\\\t| selector method messages |\\\\n\\\\t(selector := self selectedMessageName) ifNil: [^ self].\\\\n\\\\tmethod := (self selectedClassOrMetaClass ifNil: [^ self])\\\\n\\\\t\\\\tcompiledMethodAt: selector\\\\n\\\\t\\\\tifAbsent: [].\\\\n\\\\t(method isNil or: [(messages := method messages) size == 0])\\\\n\\\\t\\\\t ifTrue: [^ aBlock value: selector].\\\\n\\\\t(messages size == 1 and: [messages includes: selector])\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[^ aBlock value: selector].  \\\\\\\"If only one item, there is no choice\\\\\\\"\\\\n\\\\n\\\\tself systemNavigation \\\\n\\\\t\\\\tshowMenuOf: messages\\\\n\\\\t\\\\twithFirstItem: selector\\\\n\\\\t\\\\tifChosenDo: [:sel | aBlock value: sel]! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'nk 11/15/2002 12:23'!\\\\nsystemCatListKey: aChar from: view\\\\n\\\\t\\\\\\\"Respond to a Command key.  I am a model with a code pane, and I also have a listView that has a list of methods.  The view knows how to get the list and selection.\\\\\\\"\\\\n\\\\n\\\\taChar == $f ifTrue: [^ self findClass].\\\\n\\\\taChar == $x ifTrue: [^ self removeSystemCategory].\\\\n\\\\t^ self classListKey: aChar from: view! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\ntimeStamp\\\\n\\\\t\\\\\\\"Answer the time stamp for the chosen class and method, if any, else an empty string\\\\\\\"\\\\n\\\\n\\\\t|  selector  aMethod |\\\\n\\\\t(selector := self selectedMessageName) ifNotNil:\\\\n\\\\t\\\\t[self selectedClassOrMetaClass \\\\n\\\\t\\\\t\\\\tifNil:\\\\n\\\\t\\\\t\\\\t\\\\t[^ String new]\\\\n\\\\t\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t\\\\t[aMethod := self selectedClassOrMetaClass compiledMethodAt: selector ifAbsent: [nil].\\\\n\\\\t\\\\t\\\\t\\\\taMethod ifNotNil: [^ Utilities timeStampForMethod: aMethod]]].\\\\n\\\\t^ String new! !\\\\n\\\\n\\\\n!StringHolder methodsFor: '*Tools-traits' stamp: 'al 12/6/2005 22:22'!\\\\nbrowseClassRefs\\\\n\\\\n\\\\t| cls |\\\\n\\\\tcls := self selectedClass.\\\\n\\\\t(cls notNil and: [cls isTrait not])\\\\n\\\\t\\\\tifTrue: [self systemNavigation browseAllCallsOnClass: cls theNonMetaClass]\\\\n! !\\\\n\\\\n!StringHolder methodsFor: '*Tools-traits' stamp: 'al 12/6/2005 22:22'!\\\\nbrowseClassVariables\\\\n\\\\t\\\\\\\"Browse the class variables of the selected class. 2/5/96 sw\\\\\\\"\\\\n\\\\t| cls |\\\\n\\\\tcls := self selectedClass.\\\\n\\\\t(cls notNil and: [cls isTrait not])\\\\n\\\\t\\\\tifTrue: [self systemNavigation  browseClassVariables: cls]\\\\n! !\\\\n\\\\n!StringHolder methodsFor: '*Tools-traits' stamp: 'al 12/6/2005 22:23'!\\\\nbrowseClassVarRefs\\\\n\\\\t\\\\\\\"1/17/96 sw: devolve responsibility to the class, so that the code that does the real work can be shared\\\\\\\"\\\\n\\\\n\\\\t| cls |\\\\n\\\\tcls := self selectedClass.\\\\n\\\\t(cls notNil and: [cls isTrait not])\\\\n\\\\t\\\\tifTrue: [self systemNavigation  browseClassVarRefs: cls]! !\\\\n\\\\n!StringHolder methodsFor: '*Tools-traits' stamp: 'al 12/6/2005 22:23'!\\\\nbrowseFullProtocol\\\\n\\\\t\\\\\\\"Open up a protocol-category browser on the value of the receiver's current selection.    If in mvc, an old-style protocol browser is opened instead.  Someone who still uses mvc might wish to make the protocol-category-browser work there too, thanks.\\\\\\\"\\\\n\\\\n\\\\t| aClass |\\\\n\\\\n\\\\t(Smalltalk isMorphic and: [Smalltalk includesKey: #Lexicon]) ifFalse: [^ self spawnFullProtocol].\\\\n\\\\t((aClass := self selectedClassOrMetaClass) notNil and: [aClass isTrait not]) ifTrue:\\\\n\\\\t\\\\t[(Smalltalk at: #Lexicon) new openOnClass: aClass inWorld: ActiveWorld showingSelector: self selectedMessageName]! !\\\\n\\\\n!StringHolder methodsFor: '*Tools-traits' stamp: 'al 12/6/2005 22:24'!\\\\nbrowseInstVarDefs \\\\n\\\\n\\\\t| cls |\\\\n\\\\tcls := self selectedClassOrMetaClass.\\\\n\\\\t(cls notNil and: [cls isTrait not])\\\\n\\\\t\\\\tifTrue: [self systemNavigation browseInstVarDefs: cls]! !\\\\n\\\\n!StringHolder methodsFor: '*Tools-traits' stamp: 'al 12/6/2005 22:24'!\\\\nbrowseInstVarRefs\\\\n\\\\t\\\\\\\"1/26/96 sw: real work moved to class, so it can be shared\\\\\\\"\\\\n\\\\t| cls |\\\\n\\\\tcls := self selectedClassOrMetaClass.\\\\n\\\\t(cls notNil and: [cls isTrait not])\\\\n\\\\t\\\\tifTrue: [self systemNavigation browseInstVarRefs: cls]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStringHolder class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StringHolder class methodsFor: 'class initialization'!\\\\ninitialize\\\\n\\\\t\\\\\\\"The class variables were initialized once, and subsequently filled with\\\\n\\\\tinformation. Re-executing this method is therefore dangerous.\\\\\\\" \\\\n\\\\t \\\\n\\\\t\\\\\\\"workSpace _ StringHolder new\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"StringHolder initialize\\\\\\\"! !\\\\n\\\\n\\\\n!StringHolder class methodsFor: 'instance creation' stamp: 'ar 9/27/2005 20:48'!\\\\nopen\\\\n\\\\t(Smalltalk at: #Workspace ifAbsent:[self]) new openLabel: 'Workspace'\\\\n\\\\t\\\\t\\\\\\\"Not to be confused with our own class var 'Workspace'\\\\\\\"! !\\\\n\\\\n!StringHolder class methodsFor: 'instance creation' stamp: 'tk 5/4/1998 16:41'!\\\\nopenLabel: aString\\\\n\\\\n\\\\tself new openLabel: aString! !\\\\n\\\\n\\\\n!StringHolder class methodsFor: 'window color' stamp: 'sw 2/26/2002 14:44'!\\\\nwindowColorSpecification\\\\n\\\\t\\\\\\\"Answer a WindowColorSpec object that declares my preference\\\\\\\"\\\\n\\\\n\\\\t^ WindowColorSpec classSymbol: self name wording: 'Workspace' brightColor: #lightYellow pastelColor: #paleYellow helpMessage: 'A place for text in a window.'! !\\\\nParagraphEditor subclass: #StringHolderController\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: 'CodeYellowButtonMenu CodeYellowButtonMessages'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'ST80-Support'!\\\\n!StringHolderController commentStamp: '<historical>' prior: 0!\\\\nI represent a ParagraphEditor for a single paragraph of text, omitting alignment commands. I provide items in the yellow button menu so that the text selection can be evaluated and so that the contents of the model can be stored or restored.\\\\n\\\\tdoIt\\\\tevaluate the text selection as an expression\\\\n\\\\tprintIt\\\\tsame as doIt but insert a description of the result after the selection\\\\n\\\\taccept\\\\tstore the contents of the StringHolder into the model\\\\n\\\\tcancel\\\\tstore the contents of the model into the StringHolder!\\\\n\\\\n\\\\n!StringHolderController methodsFor: 'accessing' stamp: 'di 6/21/2001 10:32'!\\\\nchangeText: aText\\\\n\\\\t\\\\\\\"The paragraph to be edited is changed to aText.\\\\\\\"\\\\n\\\\tparagraph text: aText.\\\\n\\\\tself resetState.\\\\n\\\\tself selectInvisiblyFrom: paragraph text size + 1 to: paragraph text size.\\\\n\\\\tself selectAndScroll.\\\\n\\\\tself deselect! !\\\\n\\\\n!StringHolderController methodsFor: 'accessing'!\\\\nmodel: aModel\\\\n\\\\n\\\\tsuper model: aModel.\\\\n\\\\tview displayContents == nil\\\\n\\\\t\\\\tifFalse: [self changeParagraph: view displayContents]! !\\\\n\\\\n\\\\n!StringHolderController methodsFor: 'compiler access'!\\\\nbindingOf: aString\\\\n\\\\t^model bindingOf: aString! !\\\\n\\\\n\\\\n!StringHolderController methodsFor: 'edit flag' stamp: 'di 10/9/1998 15:41'!\\\\nhasUnacceptedEdits: aBoolean\\\\n\\\\t^ view hasUnacceptedEdits: aBoolean! !\\\\n\\\\n!StringHolderController methodsFor: 'edit flag' stamp: 'tk 4/13/1998 23:09'!\\\\nuserHasEdited\\\\n\\\\t\\\\\\\"Note that the user has edited my text.\\\\\\\"\\\\n\\\\n\\\\tview hasUnacceptedEdits: true\\\\n! !\\\\n\\\\n!StringHolderController methodsFor: 'edit flag' stamp: 'tk 4/13/1998 23:08'!\\\\nuserHasNotEdited\\\\n\\\\t\\\\\\\"Note that my text is free of user edits.\\\\\\\"\\\\n\\\\n\\\\tmodel clearUserEditFlag\\\\n! !\\\\n\\\\n\\\\n!StringHolderController methodsFor: 'menu messages' stamp: 'jm 3/18/98 20:53'!\\\\naccept \\\\n\\\\t\\\\\\\"Refer to the comment in ParagraphEditor|accept.\\\\\\\"\\\\n\\\\n\\\\tsuper accept.\\\\n\\\\tmodel contents: paragraph string.\\\\n\\\\tself userHasNotEdited.\\\\n! !\\\\n\\\\n!StringHolderController methodsFor: 'menu messages' stamp: 'jm 3/18/98 20:54'!\\\\ncancel \\\\n\\\\t\\\\\\\"Refer to the comment in ParagraphEditor|cancel.\\\\\\\"\\\\n\\\\n\\\\tsuper cancel.\\\\n\\\\tself userHasNotEdited.\\\\n! !\\\\n\\\\n!StringHolderController methodsFor: 'menu messages' stamp: 'tk 4/13/1998 23:14'!\\\\nperformMenuMessage: aSelector\\\\n\\\\t\\\\\\\"Intercept #again so the model does not get locked by keying the search text.\\\\\\\"\\\\n\\\\n\\\\t| hadEdits |\\\\n\\\\thadEdits _ view canDiscardEdits not.\\\\n\\\\tsuper performMenuMessage: aSelector.\\\\n\\\\t(hadEdits not and:\\\\n\\\\t [aSelector == #again and:\\\\n\\\\t [(UndoMessage sends: #undoAgain:andReselect:typedKey:) and:\\\\n\\\\t [UndoMessage arguments at: 3]]])\\\\n\\\\t\\\\tifTrue: [self userHasNotEdited].\\\\n! !\\\\n\\\\n\\\\n!StringHolderController methodsFor: 'private' stamp: 'jm 3/18/98 20:43'!\\\\ncloseTypeIn\\\\n\\\\t\\\\\\\"Note edit if something actually was typed.\\\\\\\"\\\\n\\\\n\\\\tbeginTypeInBlock ~~ nil ifTrue: [self userHasEdited].\\\\n\\\\tsuper closeTypeIn.\\\\n! !\\\\n\\\\n!StringHolderController methodsFor: 'private' stamp: 'jm 3/18/98 20:45'!\\\\nzapSelectionWith: aText\\\\n\\\\t\\\\\\\"Note edit except during typeIn, which notes edits at close.\\\\\\\"\\\\n\\\\n\\\\tsuper zapSelectionWith: aText.\\\\n\\\\tbeginTypeInBlock == nil ifTrue: [self userHasEdited].\\\\n! !\\\\nView subclass: #StringHolderView\\\\n\\\\tinstanceVariableNames: 'displayContents hasUnacceptedEdits askBeforeDiscardingEdits'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'ST80-Support'!\\\\n!StringHolderView commentStamp: '<historical>' prior: 0!\\\\nI am a View of a String that is an aspect of a more structured object. This String should not be changed by any editing unless the user issues the accept command. Thus my instances provide a working copy of the String. This copy is edited. When the user issues the accept command, the String is copied from the working version; or if the user issues the cancel command, the working version is restored from the String. StringHolderController is my default controller. It is initialized specially by passing the string viewed which is then converted to a Paragraph for editing.!\\\\n\\\\n\\\\n!StringHolderView methodsFor: 'controller access'!\\\\ndefaultController \\\\n\\\\t\\\\\\\"Refer to the comment in View|defaultController.\\\\\\\"\\\\n\\\\n\\\\t^self defaultControllerClass newParagraph: displayContents! !\\\\n\\\\n!StringHolderView methodsFor: 'controller access'!\\\\ndefaultControllerClass \\\\n\\\\t\\\\\\\"Refer to the comment in View|defaultControllerClass.\\\\\\\"\\\\n\\\\n\\\\t^StringHolderController! !\\\\n\\\\n!StringHolderView methodsFor: 'controller access'!\\\\ndisplayContents\\\\n\\\\n\\\\t^displayContents! !\\\\n\\\\n\\\\n!StringHolderView methodsFor: 'deEmphasizing'!\\\\ndeEmphasizeView \\\\n\\\\t\\\\\\\"Refer to the comment in View|deEmphasizeView.\\\\\\\"\\\\n\\\\n\\\\t(self controller isKindOf: ParagraphEditor)\\\\n\\\\t \\\\tifTrue: [controller deselect]! !\\\\n\\\\n\\\\n!StringHolderView methodsFor: 'displaying'!\\\\ndisplay \\\\n\\\\t\\\\\\\"Refer to the comment in View.display.\\\\\\\"\\\\n\\\\t(self isUnlocked and: [self insetDisplayBox ~= displayContents clippingRectangle])\\\\n\\\\t\\\\tifTrue:  \\\\\\\"Recompose the text if the window changed\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t[self positionDisplayContents. \\\\n\\\\t\\\\t\\\\t\\\\t(self controller isKindOf: ParagraphEditor)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [controller recomputeSelection]].\\\\n\\\\tsuper display! !\\\\n\\\\n!StringHolderView methodsFor: 'displaying' stamp: 'hmm 6/18/2000 19:24'!\\\\ndisplayView \\\\n\\\\t\\\\\\\"Refer to the comment in View|displayView.\\\\\\\"\\\\n\\\\n\\\\tDisplay deferUpdatesIn: self displayBox while: [\\\\n\\\\t\\\\tself clearInside.\\\\n\\\\t\\\\t(self controller isKindOf: ParagraphEditor)\\\\n\\\\t\\\\t\\\\tifTrue: [controller display]\\\\n\\\\t\\\\t\\\\tifFalse: [displayContents display]]! !\\\\n\\\\n!StringHolderView methodsFor: 'displaying'!\\\\nlock\\\\n\\\\t\\\\\\\"Refer to the comment in view|lock.  Must do at least what display would do to lock the view.\\\\\\\"\\\\n\\\\t(self isUnlocked and: [self insetDisplayBox ~= displayContents clippingRectangle])\\\\n\\\\t\\\\tifTrue:  \\\\\\\"Recompose the text if the window changed\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t[self positionDisplayContents. \\\\n\\\\t\\\\t\\\\t\\\\t(self controller isKindOf: ParagraphEditor)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [controller recomputeSelection]].\\\\n\\\\tsuper lock! !\\\\n\\\\n!StringHolderView methodsFor: 'displaying'!\\\\npositionDisplayContents\\\\n\\\\t\\\\\\\"Presumably the text being displayed changed so that the wrapping box \\\\n\\\\tand clipping box should be reset.\\\\\\\"\\\\n\\\\n\\\\tdisplayContents \\\\n\\\\t\\\\twrappingBox: (self insetDisplayBox insetBy: 6 @ 0)\\\\n\\\\t\\\\tclippingBox: self insetDisplayBox! !\\\\n\\\\n\\\\n!StringHolderView methodsFor: 'initialize-release' stamp: 'jm 3/24/98 14:39'!\\\\ninitialize \\\\n\\\\t\\\\\\\"Refer to the comment in View|initialize.\\\\\\\"\\\\n\\\\n\\\\tsuper initialize.\\\\n\\\\tdisplayContents _ '' asParagraph.\\\\n\\\\thasUnacceptedEdits _ false.\\\\n\\\\taskBeforeDiscardingEdits _ true.\\\\n! !\\\\n\\\\n\\\\n!StringHolderView methodsFor: 'model access'!\\\\neditString: aString \\\\n\\\\t\\\\\\\"The paragraph to be displayed is created from the characters in aString.\\\\\\\"\\\\n\\\\n\\\\tdisplayContents _ Paragraph withText: aString asText\\\\n\\\\t\\\\tstyle: TextStyle default copy\\\\n\\\\t\\\\tcompositionRectangle: (self insetDisplayBox insetBy: 6 @ 0)\\\\n\\\\t\\\\tclippingRectangle: self insetDisplayBox\\\\n\\\\t\\\\tforeColor: self foregroundColor backColor: self backgroundColor.\\\\n\\\\t(self controller isKindOf: ParagraphEditor)\\\\n\\\\t\\\\tifTrue: [controller changeParagraph: displayContents]! !\\\\n\\\\n!StringHolderView methodsFor: 'model access' stamp: 'sma 5/28/2000 23:25'!\\\\ngetMenu: shiftKeyState\\\\n\\\\t^ nil! !\\\\n\\\\n!StringHolderView methodsFor: 'model access'!\\\\nmodel: aLockedModel \\\\n\\\\t\\\\\\\"Refer to the comment in View|model:.\\\\\\\"\\\\n \\\\n\\\\tsuper model: aLockedModel.\\\\n\\\\tself editString: model contents! !\\\\n\\\\n\\\\n!StringHolderView methodsFor: 'updating' stamp: 'jm 3/24/98 14:38'!\\\\naskBeforeDiscardingEdits: aBoolean\\\\n\\\\t\\\\\\\"Set the flag that determines whether the user should be asked before discarding unaccepted edits.\\\\\\\"\\\\n\\\\n\\\\taskBeforeDiscardingEdits _ aBoolean.\\\\n! !\\\\n\\\\n!StringHolderView methodsFor: 'updating' stamp: 'tk 4/13/1998 22:58'!\\\\ncanDiscardEdits\\\\n\\\\t\\\\\\\"Return true if this view either has no text changes or does not care.\\\\\\\"\\\\n\\\\n\\\\t^ (hasUnacceptedEdits & askBeforeDiscardingEdits) not\\\\n! !\\\\n\\\\n!StringHolderView methodsFor: 'updating' stamp: 'jm 3/24/98 17:49'!\\\\nhasUnacceptedEdits\\\\n\\\\t\\\\\\\"Return true if this view has unaccepted edits.\\\\\\\"\\\\n\\\\n\\\\t^ hasUnacceptedEdits\\\\n! !\\\\n\\\\n!StringHolderView methodsFor: 'updating' stamp: 'tk 4/13/1998 17:17'!\\\\nhasUnacceptedEdits: aBoolean\\\\n\\\\t\\\\\\\"Set the hasUnacceptedEdits flag to the given value.\\\\\\\"\\\\n\\\\n\\\\thasUnacceptedEdits _ aBoolean.\\\\n! !\\\\n\\\\n!StringHolderView methodsFor: 'updating' stamp: 'dgd 9/21/2003 17:42'!\\\\npromptForCancel\\\\n\\\\t\\\\\\\"Ask if it is OK to cancel changes to text\\\\\\\"\\\\n\\\\t| okToCancel stripes |\\\\n\\\\tself topView isCollapsed ifTrue:\\\\n\\\\t\\\\t[(self confirm: 'Changes have not been saved.\\\\nIs it OK to cancel those changes?' translated) ifTrue: [model clearUserEditFlag].\\\\n\\\\t\\\\t^ self].\\\\n\\\\tstripes _ (Form extent: 16@16 fromStipple: 16r36C9) bits.\\\\n\\\\tDisplay border: self insetDisplayBox width: 4\\\\n\\\\t\\\\t\\\\trule: Form reverse fillColor: stripes.\\\\n\\\\tokToCancel _ self confirm: 'Changes have not been saved.\\\\nIs it OK to cancel those changes?' translated.\\\\n\\\\tDisplay border: self insetDisplayBox width: 4\\\\n\\\\t\\\\t\\\\trule: Form reverse fillColor: stripes.\\\\n\\\\tokToCancel ifTrue:\\\\n\\\\t\\\\t[self updateDisplayContents.\\\\n\\\\t\\\\tmodel clearUserEditFlag].\\\\n! !\\\\n\\\\n!StringHolderView methodsFor: 'updating' stamp: 'di 4/21/1998 11:30'!\\\\nupdate: aSymbol\\\\n\\\\t\\\\\\\"Refer to the comment in View|update:.\\\\\\\"\\\\n\\\\taSymbol == #wantToChange ifTrue: [^ self promptForCancel].\\\\n\\\\taSymbol == #clearUserEdits ifTrue: [^ self hasUnacceptedEdits: false].\\\\n\\\\taSymbol == #flash ifTrue: [^ controller flash].\\\\n\\\\tself updateDisplayContents! !\\\\n\\\\n!StringHolderView methodsFor: 'updating'!\\\\nupdateDisplayContents\\\\n\\\\t\\\\\\\"Make the text that is displayed be the contents of the receiver's model.\\\\\\\"\\\\n\\\\n\\\\tself editString: model contents.\\\\n\\\\tself displayView! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStringHolderView class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StringHolderView class methodsFor: 'instance creation'!\\\\ncontainer\\\\n\\\\t\\\\\\\"Answer an instance of me with a new instance of StringHolder as the \\\\n\\\\tmodel.\\\\\\\"\\\\n\\\\n\\\\t^self container: StringHolder new! !\\\\n\\\\n!StringHolderView class methodsFor: 'instance creation'!\\\\ncontainer: aContainer \\\\n\\\\t\\\\\\\"Answer an instance of me whose model is aContainer. Give it a 2-dot \\\\n\\\\tborder.\\\\\\\"\\\\n\\\\n\\\\t| aCodeView |\\\\n\\\\taCodeView _ self new model: aContainer.\\\\n\\\\taCodeView borderWidthLeft: 2 right: 2 top: 2 bottom: 2.\\\\n\\\\t^aCodeView! !\\\\n\\\\n!StringHolderView class methodsFor: 'instance creation' stamp: 'ar 9/27/2005 20:48'!\\\\nopen\\\\n\\\\t\\\\\\\"Create a standard system view of a workspace on the screen.\\\\\\\"\\\\n\\\\n\\\\tself open: StringHolder new label: 'Workspace'! !\\\\n\\\\n!StringHolderView class methodsFor: 'instance creation'!\\\\nopen: aStringHolder \\\\n\\\\t\\\\\\\"Create a standard system view of the argument, aStringHolder, as viewed \\\\n\\\\tby an instance of me. The view has label 'StringHolder'.\\\\\\\"\\\\n\\\\n\\\\tself open: aStringHolder label: 'StringHolder'! !\\\\n\\\\n!StringHolderView class methodsFor: 'instance creation' stamp: 'sma 4/30/2000 10:15'!\\\\nopen: aStringHolder label: labelString \\\\n\\\\t\\\\\\\"NOTE this should be in the model class, and all senders so redirected,\\\\n\\\\tin order that the view class can be discarded in a morphic world.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Create a standard system view of the model, aStringHolder, as viewed by \\\\n\\\\tan instance of me. The label of the view is aString.\\\\\\\"\\\\n\\\\t| aStringHolderView topView |\\\\n\\\\n\\\\tSmalltalk isMorphic ifTrue: [^ aStringHolder openAsMorphLabel: labelString].\\\\n\\\\n\\\\taStringHolderView _ self container: aStringHolder.\\\\n\\\\ttopView _ StandardSystemView new.\\\\n\\\\ttopView model: aStringHolderView model.\\\\n\\\\ttopView addSubView: aStringHolderView.\\\\n\\\\ttopView label: labelString.\\\\n\\\\ttopView minimumSize: 100 @ 50.\\\\n\\\\ttopView controller open! !\\\\nMorph subclass: #StringMorph\\\\n\\\\tinstanceVariableNames: 'font emphasis contents hasFocus'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Basic'!\\\\n!StringMorph commentStamp: 'efc 3/7/2003 17:34' prior: 0!\\\\nStringMorph is a \\\\\\\"lightweight\\\\\\\" Morph to display a String. It supports only a single font, color, and emphasis combination. For multiple text styles, use TextMorph.\\\\n\\\\nStructure:\\\\ninstance var    \\\\tType              Description \\\\nfont \\\\t\\\\t\\\\tStrikeFont \\\\t\\\\t(normally nil; then the accessor #font gives back TextStyle \\\\n\\\\t\\\\t\\\\t\\\\tor nil\\\\t\\\\t\\\\tdefaultFont) \\\\nemphasis \\\\t\\\\tSmallInteger\\\\tbitmask determining character attributes (underline, bold, \\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\titalics, narrow, struckout) \\\\ncontents \\\\t\\\\tString \\\\t\\\\t\\\\tThe text that will be displayed. \\\\nhasFocus \\\\t\\\\tBoolean \\\\t\\\\tDo I have the keyboard focus or not? \\\\n\\\\nIf you shift-click on a StringMorph you can edit its string. This is accomplished the following way: StringMorph can launch a StringMorphEditor if it receives a #mouseDown event.\\\\n\\\\nA StringMorph may also be used like a SimpleButtonMorph to do an action when clicked. Use the menu 'extras' / 'add mouseUpAction'.\\\\n\\\\nThe following propery will be defined:\\\\naStringMorph valueOfProperty: #mouseUpCodeToRun!\\\\n]style[(11 20 5 14 6 97 9 14 47 9 10 53 9 40 12 108 6 49 7 168 17 75 17 163)f1LStringMorph Hierarchy;,f1,f1LMorph Comment;,f1,f1LString Comment;,f1,f1LTextMorph Comment;,f1,f1i,f1,f1LStrikeFont Comment;,f1,f1LTextStyle Comment;,f1,f1LSmallInteger Comment;,f1,f1LString Comment;,f1,f1LBoolean Comment;,f1,f1LStringMorphEditor Comment;,f1,f1LSimpleButtonMorph Comment;,f1!\\\\n\\\\n\\\\n!StringMorph methodsFor: 'accessing'!\\\\ncontents\\\\n\\\\n\\\\t^ contents! !\\\\n\\\\n!StringMorph methodsFor: 'accessing'!\\\\ncontentsClipped: aString\\\\n\\\\t\\\\\\\"Change my text, but do not change my size as a result\\\\\\\"\\\\n\\\\tcontents = aString ifTrue: [^ self].  \\\\\\\"No substantive change\\\\\\\"\\\\n\\\\tcontents _ aString.\\\\n\\\\tself changed! !\\\\n\\\\n!StringMorph methodsFor: 'accessing' stamp: 'nk 2/26/2004 13:15'!\\\\ncontents: newContents \\\\n\\\\t| scanner |\\\\n\\\\tcontents := newContents isText\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [scanner := StringMorphAttributeScanner new initializeFromStringMorph: self.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(newContents attributesAt: 1 forStyle: self font textStyle)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:attr | attr emphasizeScanner: scanner].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\temphasis := scanner emphasis.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tfont := scanner font emphasis: emphasis.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcolor := scanner textColor.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnewContents string]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [contents = newContents\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [^ self].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"no substantive change\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnewContents].\\\\n\\\\tself fitContents! !\\\\n\\\\n!StringMorph methodsFor: 'accessing' stamp: 'ar 12/12/2001 02:44'!\\\\nfitContents\\\\n\\\\n\\\\t| newBounds boundsChanged |\\\\n\\\\tnewBounds _ self measureContents.\\\\n\\\\tboundsChanged _ bounds extent ~= newBounds.\\\\n\\\\tself extent: newBounds.\\\\t\\\\t\\\\\\\"default short-circuits if bounds not changed\\\\\\\"\\\\n\\\\tboundsChanged ifFalse: [self changed]! !\\\\n\\\\n!StringMorph methodsFor: 'accessing' stamp: 'ar 1/31/2001 19:33'!\\\\nfont\\\\n\\\\t\\\\\\\"who came up with #fontToUse rather than font?!!\\\\\\\"\\\\n\\\\t^self fontToUse! !\\\\n\\\\n!StringMorph methodsFor: 'accessing' stamp: 'tk 8/28/2000 13:59'!\\\\nfontName: fontName size: fontSize\\\\n\\\\n\\\\t^ self font: (StrikeFont familyName: fontName size: fontSize) \\\\n\\\\t\\\\t\\\\temphasis: 0! !\\\\n\\\\n!StringMorph methodsFor: 'accessing' stamp: 'dgd 2/21/2003 23:07'!\\\\nfontToUse\\\\n\\\\t| fontToUse |\\\\n\\\\tfontToUse := font isNil ifTrue: [TextStyle defaultFont] ifFalse: [font].\\\\n\\\\t(emphasis isNil or: [emphasis = 0]) \\\\n\\\\t\\\\tifTrue: [^fontToUse]\\\\n\\\\t\\\\tifFalse: [^fontToUse emphasized: emphasis]! !\\\\n\\\\n!StringMorph methodsFor: 'accessing' stamp: 'di 4/2/1999 16:11'!\\\\nfont: aFont emphasis: emphasisCode\\\\n\\\\tfont _ aFont.\\\\n\\\\temphasis _ emphasisCode.\\\\n\\\\tself fitContents.\\\\n\\\\\\\"\\\\nin inspector say,\\\\n\\\\t self font: (TextStyle default fontAt: 2) emphasis: 1\\\\n\\\\\\\"! !\\\\n\\\\n!StringMorph methodsFor: 'accessing' stamp: 'sw 9/8/1999 11:10'!\\\\ninterimContents: aString\\\\n\\\\t\\\\\\\"The receiver is under edit and aString represents the string the user sees as she edits, which typically will not have been accepted and indeed may be abandoned\\\\\\\"\\\\n\\\\n\\\\tself contents: aString! !\\\\n\\\\n!StringMorph methodsFor: 'accessing' stamp: 'ar 12/30/2001 20:45'!\\\\nmeasureContents\\\\n\\\\t| f |\\\\n\\\\tf _ self fontToUse.\\\\n\\\\t^(((f widthOfString: contents) max: self minimumWidth)  @ f height).! !\\\\n\\\\n!StringMorph methodsFor: 'accessing' stamp: 'sw 9/8/1999 13:44'!\\\\nminimumWidth\\\\n\\\\t\\\\\\\"Answer the minimum width that the receiver can have.  A nonzero value here keeps the receiver from degenerating into something that cannot ever be seen or touched again!!  Obeyed by fitContents.\\\\\\\"\\\\n\\\\n\\\\t^ 3! !\\\\n\\\\n!StringMorph methodsFor: 'accessing' stamp: 'sw 12/6/1999 13:16'!\\\\nsetWidth: width\\\\n\\\\n\\\\tself extent: width @ (font ifNil: [TextStyle defaultFont]) height! !\\\\n\\\\n!StringMorph methodsFor: 'accessing' stamp: 'tk 12/16/1998 11:55'!\\\\nuserString\\\\n\\\\t\\\\\\\"Do I have a text string to be searched on?\\\\\\\"\\\\n\\\\n\\\\t^ contents! !\\\\n\\\\n!StringMorph methodsFor: 'accessing' stamp: 'sw 9/16/1999 22:57'!\\\\nvalueFromContents\\\\n\\\\t\\\\\\\"Return a new value from the current contents string.\\\\\\\"\\\\n\\\\t^ contents! !\\\\n\\\\n\\\\n!StringMorph methodsFor: 'connectors-layout' stamp: 'dgd 2/16/2003 21:52'!\\\\nminHeight\\\\n\\\\\\\"answer the receiver's minHeight\\\\\\\"\\\\n\\\\t^ self fontToUse height! !\\\\n\\\\n\\\\n!StringMorph methodsFor: 'drawing' stamp: 'ar 12/31/2001 02:38'!\\\\ndrawOn: aCanvas\\\\n\\\\n\\\\taCanvas drawString: contents in: bounds font: self fontToUse color: color.! !\\\\n\\\\n!StringMorph methodsFor: 'drawing' stamp: 'tk 8/1/2001 14:15'!\\\\nlookTranslucent\\\\n\\\\n\\\\t\\\\\\\"keep the text the same color (black)\\\\\\\"! !\\\\n\\\\n\\\\n!StringMorph methodsFor: 'editing'!\\\\nacceptContents\\\\n\\\\t\\\\\\\"The message is sent when the user hits enter or Cmd-S. Accept the current contents and end editing. This default implementation does nothing.\\\\\\\"\\\\n! !\\\\n\\\\n!StringMorph methodsFor: 'editing' stamp: 'sw 9/8/1999 17:04'!\\\\nacceptValue: aValue\\\\n\\\\t| val |\\\\n\\\\tself contents: (val _ aValue asString).\\\\n\\\\t^ val! !\\\\n\\\\n!StringMorph methodsFor: 'editing' stamp: 'sw 9/17/1999 13:27'!\\\\ncancelEdits\\\\n\\\\n\\\\tself doneWithEdits! !\\\\n\\\\n!StringMorph methodsFor: 'editing' stamp: 'di 9/6/1999 22:44'!\\\\ndoneWithEdits\\\\n\\\\n\\\\thasFocus _ false! !\\\\n\\\\n!StringMorph methodsFor: 'editing' stamp: 'nk 2/24/2005 20:11'!\\\\nlaunchMiniEditor: evt\\\\n\\\\n\\\\t| textMorph |\\\\n\\\\thasFocus _ true.  \\\\\\\"Really only means edit in progress for this morph\\\\\\\"\\\\n\\\\ttextMorph _ StringMorphEditor new contentsAsIs: contents.\\\\n\\\\ttextMorph beAllFont: self fontToUse.\\\\n\\\\ttextMorph bounds: (self bounds expandBy: 0@2).\\\\n\\\\tself addMorphFront: textMorph.\\\\n\\\\tevt hand newKeyboardFocus: textMorph.\\\\n\\\\ttextMorph editor selectFrom: 1 to: textMorph paragraph text string size! !\\\\n\\\\n!StringMorph methodsFor: 'editing' stamp: 'sw 9/8/1999 10:42'!\\\\nlostFocusWithoutAccepting\\\\n\\\\t\\\\\\\"The message is sent when the user, having been in an editing episode on the receiver, changes the keyboard focus -- typically by clicking on some editable text somewhere else -- without having accepted the current edits.\\\\\\\"\\\\n\\\\n\\\\tself acceptContents! !\\\\n\\\\n!StringMorph methodsFor: 'editing' stamp: 'sw 7/21/1999 14:59'!\\\\nwantsKeyboardFocusOnShiftClick\\\\n\\\\t^ owner topRendererOrSelf wantsKeyboardFocusFor: self\\\\n! !\\\\n\\\\n\\\\n!StringMorph methodsFor: 'event handling' stamp: 'ar 10/6/2000 00:16'!\\\\nhandlesMouseDown: evt\\\\n\\\\t^ (evt shiftPressed and: [self wantsKeyboardFocusOnShiftClick])\\\\n\\\\t\\\\tifTrue: [true]\\\\n\\\\t\\\\tifFalse: [super handlesMouseDown: evt].\\\\n! !\\\\n\\\\n!StringMorph methodsFor: 'event handling' stamp: 'sw 9/8/1999 11:26'!\\\\nhasFocus\\\\n\\\\t^ hasFocus! !\\\\n\\\\n!StringMorph methodsFor: 'event handling' stamp: 'di 9/5/1999 17:25'!\\\\nmouseDown: evt\\\\n\\\\t\\\\\\\"If the shift key is pressed, make this string the keyboard input focus.\\\\\\\"\\\\n\\\\n\\\\t(evt shiftPressed and: [self wantsKeyboardFocusOnShiftClick])\\\\n\\\\t\\\\tifTrue: [self launchMiniEditor: evt]\\\\n\\\\t\\\\tifFalse: [super mouseDown: evt].\\\\n! !\\\\n\\\\n!StringMorph methodsFor: 'event handling' stamp: 'sw 5/6/1998 15:45'!\\\\nwouldAcceptKeyboardFocus\\\\n\\\\t^ self isLocked not! !\\\\n\\\\n\\\\n!StringMorph methodsFor: 'font' stamp: 'efc 2/22/2003 21:35'!\\\\nemphasis: aNumber\\\\n\\\\t\\\\\\\"Set the receiver's emphasis as indicated. aNumber is a bitmask with the following format:\\\\n\\\\n\\\\tbit\\\\tattribute\\\\n\\\\t1\\\\tbold\\\\n\\\\t2\\\\titalic\\\\n\\\\t4\\\\tunderlined\\\\n\\\\t8\\\\tnarrow\\\\n\\\\t16\\\\tstruckOut\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"examples: 0 -> plain.  \\\\n\\\\t1 -> bold.  2 -> italic.  3 -> bold italic.  4 -> underlined  \\\\n\\\\t5 -> bold underlined.  6 -> italic underlined.   7 -> bold italic underlined   \\\\n\\\\tetc...\\\\\\\"\\\\n\\\\n\\\\temphasis _ aNumber.\\\\n\\\\t^ self font: font emphasis: emphasis! !\\\\n\\\\n\\\\n!StringMorph methodsFor: 'halos and balloon help' stamp: 'sw 6/15/1998 15:34'!\\\\naddOptionalHandlesTo: aHalo box: box\\\\n\\\\tself flag: #deferred.\\\\n\\\\n\\\\t\\\\\\\"Eventually...\\\\n\\\\tself addFontHandlesTo: aHalo box: box\\\\\\\"! !\\\\n\\\\n!StringMorph methodsFor: 'halos and balloon help' stamp: 'sw 6/6/2001 13:34'!\\\\nboundsForBalloon\\\\n\\\\t\\\\\\\"Some morphs have bounds that are way too big.  This is a contorted way of making things work okay in PluggableListMorphs, whose list elements historically have huge widths\\\\\\\"\\\\n\\\\n\\\\t| ownerOwner |\\\\n\\\\t^ ((owner notNil and: [(ownerOwner _ owner owner) notNil]) and:\\\\n\\\\t\\\\t\\\\t[ownerOwner isKindOf: PluggableListMorph])\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self boundsInWorld intersect: ownerOwner boundsInWorld]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[super boundsForBalloon]! !\\\\n\\\\n\\\\n!StringMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:31'!\\\\ndefaultColor\\\\n\\\\t\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color black! !\\\\n\\\\n!StringMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 20:42'!\\\\ninitialize\\\\n\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\\\\"\\\\\\\"\\\\n\\\\tfont _ nil.\\\\n\\\\temphasis _ 0.\\\\n\\\\thasFocus _ false! !\\\\n\\\\n!StringMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 21:57'!\\\\ninitWithContents: aString font: aFont emphasis: emphasisCode \\\\n\\\\tsuper initialize.\\\\n\\\\t\\\\n\\\\tfont _ aFont.\\\\n\\\\temphasis _ emphasisCode.\\\\n\\\\thasFocus _ false.\\\\n\\\\tself contents: aString! !\\\\n\\\\n\\\\n!StringMorph methodsFor: 'layout' stamp: 'nk 5/11/2001 09:33'!\\\\nfullBounds\\\\n\\\\tself contents ifNil: [ self contents: 'String Morph' ].\\\\n\\\\t^super fullBounds! !\\\\n\\\\n\\\\n!StringMorph methodsFor: 'menu' stamp: 'dgd 8/30/2003 22:17'!\\\\naddCustomMenuItems: aCustomMenu hand: aHandMorph\\\\n\\\\n\\\\tsuper addCustomMenuItems: aCustomMenu hand: aHandMorph.\\\\n\\\\taCustomMenu add: 'change font' translated action: #changeFont.\\\\n\\\\taCustomMenu add: 'change emphasis' translated action: #changeEmphasis.\\\\n! !\\\\n\\\\n!StringMorph methodsFor: 'menu' stamp: 'yo 3/14/2005 13:03'!\\\\nchangeEmphasis\\\\n\\\\n\\\\t| reply aList |\\\\n\\\\taList _ #(normal bold italic narrow underlined struckOut).\\\\n\\\\treply _ (SelectionMenu labelList: (aList collect: [:t | t translated]) selections: aList) startUp.\\\\n\\\\treply ifNotNil:[\\\\n\\\\t\\\\tself emphasis: (TextEmphasis perform: reply) emphasisCode.\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StringMorph methodsFor: 'menu' stamp: 'ar 1/5/2002 21:45'!\\\\nchangeFont\\\\n\\\\t| newFont |\\\\n\\\\tnewFont _ StrikeFont fromUser: self fontToUse.\\\\n\\\\tnewFont ifNotNil:[self font: newFont].! !\\\\n\\\\n\\\\n!StringMorph methodsFor: 'objects from disk' stamp: 'tk 11/29/2004 16:52'!\\\\nfixUponLoad: aProject seg: anImageSegment\\\\n\\\\n\\\\t\\\\\\\"We are in an old project that is being loaded from disk.\\\\n\\\\nFix up conventions that have changed.\\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\t| substituteFont |\\\\n\\\\n\\\\tsubstituteFont _ aProject projectParameters at:\\\\n\\\\n#substitutedFont ifAbsent: [#none].\\\\n\\\\n\\\\t(substituteFont ~~ #none and: [self font == substituteFont])\\\\n\\\\n\\\\t\\\\t\\\\tifTrue: [ self fitContents ].\\\\n\\\\n\\\\n\\\\n\\\\t^ super fixUponLoad: aProject seg: anImageSegment! !\\\\n\\\\n\\\\n!StringMorph methodsFor: 'parts bin' stamp: 'dgd 2/14/2003 21:58'!\\\\ninitializeToStandAlone\\\\n\\\\tsuper initializeToStandAlone.\\\\n\\\\t\\\\n\\\\tfont _ nil.\\\\n\\\\temphasis _ 0.\\\\n\\\\thasFocus _ false.\\\\n\\\\tself contents: 'String: Shift-click on me to edit'! !\\\\n\\\\n\\\\n!StringMorph methodsFor: 'printing' stamp: 'efc 2/22/2003 21:35'!\\\\nfont: aFont \\\\n\\\\t\\\\\\\"Set the font my text will use. The emphasis remains unchanged.\\\\\\\"\\\\n\\\\n\\\\tfont _ aFont.\\\\n\\\\t^ self font: font emphasis: emphasis! !\\\\n\\\\n!StringMorph methodsFor: 'printing' stamp: 'jm 11/3/97 16:52'!\\\\nprintOn: aStream\\\\n\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream print: contents.\\\\n! !\\\\n\\\\n\\\\n!StringMorph methodsFor: '*MorphicExtras-accessing' stamp: 'sw 2/18/2003 02:55'!\\\\ngetCharacters\\\\n\\\\t\\\\\\\"obtain a string value from the receiver.\\\\\\\"\\\\n\\\\n\\\\t^ self contents! !\\\\n\\\\n!StringMorph methodsFor: '*MorphicExtras-accessing' stamp: 'sw 9/9/1999 18:09'!\\\\nhandsWithMeForKeyboardFocus\\\\n\\\\t| foc |\\\\n\\\\t\\\\\\\"Answer the hands that have me as their keyboard focus\\\\\\\"\\\\n\\\\n\\\\thasFocus ifFalse: [^ #()].\\\\n\\\\t^ self currentWorld hands select:\\\\n\\\\t\\\\t[:aHand | (foc _ aHand keyboardFocus) notNil and: [foc owner == self]]! !\\\\n\\\\n\\\\n!StringMorph methodsFor: '*MorphicExtras-printing'!\\\\nfullPrintOn: aStream\\\\n\\\\n\\\\taStream nextPutAll: '('.\\\\n\\\\tsuper fullPrintOn: aStream.\\\\n\\\\taStream nextPutAll: ') contents: '; print: contents! !\\\\n\\\\n\\\\n!StringMorph methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nballoonTextForClassAndMethodString\\\\n\\\\t\\\\\\\"Answer suitable balloon text for the receiver thought of as an encoding of the form\\\\n\\\\t\\\\t<className>  [ class ] <selector>\\\\\\\"\\\\n\\\\n\\\\t| aComment |\\\\n\\\\tPreferences balloonHelpInMessageLists\\\\n\\\\t\\\\tifFalse: [^ nil].\\\\n\\\\tMessageSet parse: self contents asString toClassAndSelector:\\\\n\\\\t\\\\t[:aClass :aSelector |\\\\n\\\\t\\\\t\\\\t(aClass notNil and: [aSelector notNil]) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[aComment := aClass precodeCommentOrInheritedCommentFor: aSelector]].\\\\n\\\\t^ aComment\\\\n! !\\\\n\\\\n!StringMorph methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nballoonTextForLexiconString\\\\n\\\\t\\\\\\\"Answer suitable balloon text for the receiver thought of as an encoding (used in Lexicons) of the form\\\\n\\\\t\\\\t<selector> <spaces> (<className>>)\\\\\\\"\\\\n\\\\n\\\\t| aComment contentsString aSelector aClassName |\\\\n\\\\tPreferences balloonHelpInMessageLists\\\\n\\\\t\\\\tifFalse: [^ nil].\\\\n\\\\tcontentsString := self contents asString.\\\\n\\\\taSelector := contentsString upTo: $ .\\\\n\\\\taClassName := contentsString copyFrom: ((contentsString indexOf: $() + 1) to: ((contentsString indexOf: $)) - 1).\\\\n\\\\tMessageSet parse: (aClassName, ' dummy') toClassAndSelector:\\\\n\\\\t\\\\t[:cl :sel | cl ifNotNil:\\\\n\\\\t\\\\t\\\\t[aComment := cl precodeCommentOrInheritedCommentFor: aSelector]].\\\\n\\\\t^ aComment\\\\n! !\\\\n\\\\n!StringMorph methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nballoonTextForMethodString\\\\n\\\\t\\\\\\\"Answer suitable balloon text for the receiver thought of as a method belonging to the currently-selected class of a browser tool.\\\\\\\"\\\\n\\\\n\\\\t| aWindow aCodeHolder aClass |\\\\n\\\\tPreferences balloonHelpInMessageLists\\\\n\\\\t\\\\tifFalse: [^ nil].\\\\n\\\\taWindow := self ownerThatIsA: SystemWindow.\\\\n\\\\t(aWindow isNil or: [((aCodeHolder := aWindow model) isKindOf: CodeHolder) not])\\\\n\\\\t\\\\tifTrue:\\\\t[^ nil].\\\\n\\\\t((aClass := aCodeHolder selectedClassOrMetaClass) isNil or:\\\\n\\\\t\\\\t[(aClass includesSelector: contents asSymbol) not])\\\\n\\\\t\\\\t\\\\tifTrue: [^ nil].\\\\n\\\\t^ aClass precodeCommentOrInheritedCommentFor: contents asSymbol\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStringMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StringMorph class methodsFor: 'instance creation' stamp: 'sw 8/22/97 22:19'!\\\\ncontents: aString\\\\n\\\\t\\\\\\\" 'StringMorph contents: str' is faster than 'StringMorph new contents: str' \\\\\\\"\\\\n\\\\t^ self contents: aString font: nil! !\\\\n\\\\n!StringMorph class methodsFor: 'instance creation' stamp: 'di 4/1/1999 17:15'!\\\\ncontents: aString font: aFont\\\\n\\\\t^ self basicNew initWithContents: aString font: aFont emphasis: 0! !\\\\n\\\\n!StringMorph class methodsFor: 'instance creation' stamp: 'di 4/1/1999 17:15'!\\\\ncontents: aString font: aFont emphasis: emphasisCode\\\\n\\\\t^ self basicNew initWithContents: aString font: aFont emphasis: emphasisCode! !\\\\n\\\\n\\\\n!StringMorph class methodsFor: 'scripting' stamp: 'sw 5/6/1998 14:00'!\\\\nauthoringPrototype\\\\n\\\\t^ super authoringPrototype contents: 'String'! !\\\\n\\\\n\\\\n!StringMorph class methodsFor: 'testing' stamp: 'di 5/6/1998 21:07'!\\\\ntest\\\\n\\\\t\\\\\\\"Return a morph with lots of strings for testing display speed.\\\\\\\"\\\\n\\\\t| c |\\\\n\\\\tc _ AlignmentMorph newColumn.\\\\n\\\\tSystemOrganization categories do:\\\\n\\\\t\\\\t[:cat | c addMorph: (StringMorph new contents: cat)].\\\\n\\\\t^ c! !\\\\n\\\\n!StringMorph class methodsFor: 'testing' stamp: 'di 5/6/1998 21:08'!\\\\ntest2\\\\n\\\\t\\\\\\\"Return a morph with lots of strings for testing display speed.\\\\\\\"\\\\n\\\\t| c r |\\\\n\\\\tc _ AlignmentMorph newColumn.\\\\n\\\\tSystemOrganization categories reverseDo:\\\\n\\\\t\\\\t[:cat | c addMorph: (StringMorph new contents: cat)].\\\\n\\\\tr _ RectangleMorph new extent: c fullBounds extent.\\\\n\\\\tc submorphsDo: [:m | r addMorph: m].\\\\n\\\\t^ r\\\\n! !\\\\nObject subclass: #StringMorphAttributeScanner\\\\n\\\\tinstanceVariableNames: 'fontNumber textColor emphasis alignment actualFont indent kern'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Text Support'!\\\\n!StringMorphAttributeScanner commentStamp: '<historical>' prior: 0!\\\\nA StringMorphAttributeScanner provides the interface of a CharacterScanner so that text attributes may be collected from a Text and used elsewhere, like in setting the attributes of a StringMorph.\\\\n!\\\\n]style[(2 195)cblack;,f3cblack;!\\\\n\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'accessing' stamp: 'nk 2/26/2004 13:12'!\\\\nactualFont\\\\n\\\\t\\\\\\\"Answer the value of actualFont\\\\\\\"\\\\n\\\\n\\\\t^ actualFont ifNil: [ TextStyle defaultFont ]! !\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'accessing' stamp: 'nk 2/26/2004 12:34'!\\\\nalignment\\\\n\\\\t\\\\\\\"Answer the value of alignment\\\\\\\"\\\\n\\\\n\\\\t^ alignment! !\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'accessing' stamp: 'nk 2/26/2004 12:34'!\\\\nemphasis\\\\n\\\\t\\\\\\\"Answer the value of emphasis\\\\\\\"\\\\n\\\\n\\\\t^ emphasis! !\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'accessing' stamp: 'nk 2/26/2004 13:14'!\\\\nfont\\\\n\\\\t\\\\\\\"Answer the value of font\\\\\\\"\\\\n\\\\n\\\\t^self textStyle fontAt: self fontNumber! !\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'accessing' stamp: 'nk 2/26/2004 13:11'!\\\\nfontNumber\\\\n\\\\t\\\\\\\"Answer the value of font\\\\\\\"\\\\n\\\\n\\\\t^ fontNumber! !\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'accessing' stamp: 'nk 2/26/2004 12:34'!\\\\nindent\\\\n\\\\t\\\\\\\"Answer the value of indent\\\\\\\"\\\\n\\\\n\\\\t^ indent! !\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'accessing' stamp: 'nk 2/26/2004 12:34'!\\\\nkern\\\\n\\\\t\\\\\\\"Answer the value of kern\\\\\\\"\\\\n\\\\n\\\\t^ kern! !\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'accessing' stamp: 'nk 2/26/2004 12:34'!\\\\ntextColor\\\\n\\\\t\\\\\\\"Answer the value of textColor\\\\\\\"\\\\n\\\\n\\\\t^ textColor! !\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'accessing' stamp: 'nk 2/26/2004 13:12'!\\\\ntextStyle\\\\n\\\\t^self actualFont textStyle ifNil: [ TextStyle default ]! !\\\\n\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'initialize-release' stamp: 'nk 2/26/2004 13:10'!\\\\ninitialize\\\\n\\\\temphasis _ 0.\\\\n\\\\tindent _ 0.\\\\n\\\\tkern _ 0.\\\\n\\\\tfontNumber _ 1.\\\\n\\\\tactualFont _ TextStyle defaultFont! !\\\\n\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'scanning' stamp: 'nk 2/26/2004 12:40'!\\\\naddEmphasis: anInteger\\\\n\\\\t\\\\\\\"Set the value of emphasis\\\\\\\"\\\\n\\\\n\\\\temphasis _ emphasis bitOr: anInteger! !\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'scanning' stamp: 'nk 2/26/2004 12:41'!\\\\naddKern: kernDelta\\\\n\\\\t\\\\\\\"Set the current kern amount.\\\\\\\"\\\\n\\\\tkern _ kern + kernDelta! !\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'scanning' stamp: 'nk 2/26/2004 12:37'!\\\\nindentationLevel: anInteger\\\\n\\\\t\\\\\\\"Set the value of indent\\\\\\\"\\\\n\\\\n\\\\tindent _ anInteger! !\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'scanning' stamp: 'nk 2/26/2004 13:09'!\\\\nsetActualFont: aFont\\\\n\\\\t\\\\\\\"Set the value of actualFont, from a TextFontReference\\\\\\\"\\\\n\\\\n\\\\tactualFont _ aFont.\\\\n\\\\taFont textStyle ifNotNilDo: [ :ts | fontNumber _ ts fontIndexOf: aFont ]! !\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'scanning' stamp: 'nk 2/26/2004 12:39'!\\\\nsetAlignment: aSymbol\\\\n\\\\t\\\\\\\"Set the value of alignment\\\\\\\"\\\\n\\\\n\\\\talignment _ aSymbol! !\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'scanning' stamp: 'nk 2/26/2004 13:10'!\\\\nsetFont: fontNum\\\\n\\\\t\\\\\\\"Set the value of font\\\\\\\"\\\\n\\\\n\\\\tfontNumber _ fontNum! !\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'scanning' stamp: 'nk 2/26/2004 12:34'!\\\\ntextColor: anObject\\\\n\\\\t\\\\\\\"Set the value of textColor\\\\\\\"\\\\n\\\\n\\\\ttextColor _ anObject! !\\\\n\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'string morph' stamp: 'nk 2/26/2004 13:09'!\\\\ninitializeFromStringMorph: aStringMorph\\\\n\\\\t| style |\\\\n\\\\tactualFont _ aStringMorph font ifNil: [ TextStyle defaultFont ].\\\\n\\\\tstyle _ actualFont textStyle.\\\\n\\\\temphasis _ actualFont emphasis.\\\\n\\\\tfontNumber _ (style fontIndexOf: actualFont) ifNil: [ 1 ].\\\\n\\\\ttextColor _ aStringMorph color.\\\\n! !\\\\nTextMorph subclass: #StringMorphEditor\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Text Support'!\\\\n!StringMorphEditor commentStamp: '<historical>' prior: 0!\\\\nI am a textMorph used as a pop-up editor for StringMorphs.  I present a yellow background and I go away when a CR is typed or when the user clicks elsewhere.!\\\\n\\\\n\\\\n!StringMorphEditor methodsFor: 'display' stamp: 'sw 4/20/2003 15:46'!\\\\ninitialize\\\\n\\\\n\\\\t\\\\\\\"Initialize the receiver.  Give it a white background\\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\tsuper initialize.\\\\n\\\\n\\\\tself backgroundColor: Color white.\\\\n\\\\n\\\\tself color: Color red! !\\\\n\\\\n\\\\n!StringMorphEditor methodsFor: 'drawing' stamp: 'sw 9/7/1999 16:22'!\\\\ndrawOn: aCanvas\\\\n\\\\n\\\\taCanvas fillRectangle: self bounds color: Color yellow muchLighter.\\\\n\\\\t^ super drawOn: aCanvas! !\\\\n\\\\n\\\\n!StringMorphEditor methodsFor: 'event handling' stamp: 'nk 6/12/2004 22:07'!\\\\nkeyStroke: evt\\\\n\\\\t\\\\\\\"This is hugely inefficient, but it seems to work, and it's unlikely it will ever need\\\\n\\\\tto be any more efficient -- it's only intended to edit single-line strings.\\\\\\\"\\\\n\\\\n\\\\t| char priorEditor newSel |\\\\n\\\\t(((char _ evt keyCharacter) = Character enter) or: [(char = Character cr)\\\\n\\\\t\\\\t\\\\tor: [char = $s and: [evt commandKeyPressed]]])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [owner doneWithEdits; acceptContents.\\\\n\\\\tself flag: #arNote. \\\\\\\"Probably unnecessary\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tevt hand releaseKeyboardFocus.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^ self delete].\\\\n\\\\t\\\\n\\\\t(char = $l and: [evt commandKeyPressed]) ifTrue:   \\\\\\\"cancel\\\\\\\"\\\\n\\\\t\\\\t[owner cancelEdits.\\\\n\\\\t\\\\tevt hand releaseKeyboardFocus.\\\\n\\\\t\\\\t^ self delete].\\\\n\\\\n\\\\tsuper keyStroke: evt.\\\\n\\\\towner interimContents: self contents asString.\\\\n\\\\tnewSel _ self editor selectionInterval.\\\\n\\\\n\\\\tpriorEditor _ self editor.  \\\\\\\"Save editor state\\\\\\\"\\\\n\\\\tself releaseParagraph.  \\\\\\\"Release paragraph so it will grow with selection.\\\\\\\"\\\\n\\\\tself paragraph.      \\\\\\\"Re-instantiate to set new bounds\\\\\\\"\\\\n\\\\tself installEditorToReplace: priorEditor.  \\\\\\\"restore editor state\\\\\\\"\\\\n\\\\tself editor selectFrom: newSel first to: newSel last.\\\\n! !\\\\n\\\\n!StringMorphEditor methodsFor: 'event handling' stamp: 'nk 1/23/2004 13:18'!\\\\nkeyboardFocusChange: aBoolean\\\\n\\\\t| hadFocus |\\\\n\\\\towner ifNil: [ ^self ].\\\\n\\\\thadFocus _ owner hasFocus.\\\\n\\\\tsuper keyboardFocusChange: aBoolean.\\\\n\\\\taBoolean ifFalse:\\\\n\\\\t\\\\t[hadFocus ifTrue:\\\\n\\\\t\\\\t\\\\t[owner lostFocusWithoutAccepting; doneWithEdits].\\\\n\\\\t\\\\t^ self delete]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStringMorphEditor class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StringMorphEditor class methodsFor: 'new-morph participation' stamp: 'kfr 5/1/2000 13:41'!\\\\nincludeInNewMorphMenu\\\\n\\\\t\\\\\\\"Not to be instantiated from the menu\\\\\\\"\\\\n\\\\t^ false! !\\\\nTileMorph subclass: #StringReadoutTile\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'EToys-Scripting Tiles'!\\\\n\\\\n!StringReadoutTile methodsFor: 'accessing' stamp: 'sw 11/1/97 13:15'!\\\\nliteral: anObject\\\\n\\\\tliteral _ anObject.\\\\n\\\\tself updateLiteralLabel.\\\\n\\\\tsubmorphs last informTarget! !\\\\n\\\\n\\\\n!StringReadoutTile methodsFor: 'literal' stamp: 'sw 9/15/1999 15:14'!\\\\nsetLiteralTo: anObject width: w\\\\n\\\\t\\\\\\\"like literal:width: but does not inform the target\\\\\\\"\\\\n\\\\tliteral _ anObject.\\\\n\\\\tself updateLiteralLabel.\\\\n\\\\tsubmorphs last setWidth: w.\\\\n\\\\tself updateLiteralLabel! !\\\\n\\\\n\\\\n!StringReadoutTile methodsFor: 'misc' stamp: 'sw 9/17/1999 08:01'!\\\\nbasicWidth\\\\n\\\\t^ 26! !\\\\n\\\\n\\\\n!StringReadoutTile methodsFor: 'event handling' stamp: 'tak 8/2/2005 18:20'!\\\\nhandlesMouseDown: evt \\\\n\\\\t^ true! !\\\\n\\\\n!StringReadoutTile methodsFor: 'event handling' stamp: 'tak 8/2/2005 23:38'!\\\\nmouseStillDown: evt \\\\n\\\\t(self labelMorph notNil\\\\n\\\\t\\\\t\\\\tand: [self labelMorph containsPoint: evt cursorPoint])\\\\n\\\\t\\\\tifTrue: [^ self labelMorph mouseDown: evt].\\\\n\\\\t^ super mouseStillDown: evt! !\\\\nObjectSocket subclass: #StringSocket\\\\n\\\\tinstanceVariableNames: 'numStringsInNextArray stringsForNextArray nextStringSize files startTime stringCounter socketWriterProcess outputQueue bytesInOutputQueue extraUnsentBytes transmissionError readBuffer'\\\\n\\\\tclassVariableNames: 'MaxRatesSeen RecentSendHistory RunningSendCount'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Nebraska-Network-ObjectSocket'!\\\\n!StringSocket commentStamp: 'ls 8/4/2004 15:15' prior: 0!\\\\nThis is a socket which sends arrays of strings back and forth.  This is less convenient than ObjectSockets, but it is more secure and it makes it easier to reason about updates to the protocol.\\\\n\\\\nAn array of strings is represented on the network as:\\\\n\\\\n\\\\t4-bytes\\\\t\\\\tnumber of strings in the array\\\\n\\\\t4-byte\\\\t\\\\tnumber of bytes in the first string\\\\n\\\\tn1-bytes\\\\t\\\\tcharacters in the first string\\\\n\\\\t4-bytes\\\\t\\\\tnumber of bytes in the second string\\\\n\\\\tn2-bytes\\\\tcharacters in the second string\\\\n\\\\t...\\\\n\\\\n!\\\\n\\\\n\\\\n!StringSocket methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:26'!\\\\ndestroy\\\\n\\\\n\\\\tsocketWriterProcess ifNotNil: [socketWriterProcess terminate. socketWriterProcess := nil].\\\\n\\\\toutputQueue := nil.\\\\n\\\\tbytesInOutputQueue := 0.\\\\n\\\\tsocket ifNotNil: [socket destroy. socket := nil.].\\\\n! !\\\\n\\\\n!StringSocket methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:26'!\\\\ninitialize: aSocket\\\\n\\\\n\\\\ttransmissionError := false.\\\\n\\\\tsuper initialize: aSocket.\\\\n\\\\toutputQueue := SharedQueue new.\\\\n\\\\textraUnsentBytes := bytesInOutputQueue := 0.\\\\n\\\\tsocketWriterProcess := [\\\\n\\\\t\\\\t[self transmitQueueNext] whileTrue.\\\\n\\\\t\\\\tsocketWriterProcess := nil.\\\\n\\\\t\\\\toutputQueue := nil.\\\\n\\\\t\\\\tbytesInOutputQueue := 0.\\\\n\\\\t] forkAt: Processor lowIOPriority.! !\\\\n\\\\n!StringSocket methodsFor: 'as yet unclassified' stamp: 'yo 10/10/2005 18:47'!\\\\nreadBuffer\\\\n\\\\n\\\\t^ readBuffer ifNil: [readBuffer _ String new: 20000].\\\\n! !\\\\n\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'yo 10/10/2005 18:49'!\\\\naddToInBuf: aString\\\\n\\\\n\\\\t| newAlloc |\\\\n\\\\tnewAlloc _ aString size * 2 max: 80000.\\\\n\\\\tinBuf ifNil: [\\\\n\\\\t\\\\tinBuf _ String new: newAlloc.\\\\n\\\\t\\\\tinBufIndex _ 1.\\\\n\\\\t\\\\tinBufLastIndex _ 0.\\\\n\\\\t].\\\\n\\\\taString size > (inBuf size - inBufLastIndex) ifTrue: [\\\\n\\\\t\\\\tinBuf _ inBuf , (String new: newAlloc)\\\\n\\\\t].\\\\n\\\\tinBuf \\\\n\\\\t\\\\treplaceFrom: inBufLastIndex + 1 \\\\n\\\\t\\\\tto: inBufLastIndex + aString size\\\\n\\\\t\\\\twith: aString \\\\n\\\\t\\\\tstartingAt: 1.\\\\n\\\\tinBufLastIndex _ inBufLastIndex + aString size.\\\\n! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'sd 11/20/2005 21:26'!\\\\naddToOutBuf: arrayToWrite\\\\n\\\\n\\\\t| size newAlloc |\\\\n\\\\tsize := self spaceToEncode: arrayToWrite.\\\\n\\\\tnewAlloc := size * 2 max: 8000.\\\\t\\\\\\\"gives us room to grow\\\\\\\"\\\\n\\\\toutBuf ifNil: [\\\\n\\\\t\\\\toutBuf := String new: newAlloc.\\\\n\\\\t\\\\toutBufIndex := 1.\\\\n\\\\t].\\\\n\\\\toutBuf size - outBufIndex + 1 < size ifTrue: [\\\\n\\\\t\\\\toutBuf := outBuf , (String new: newAlloc).\\\\n\\\\t].\\\\n\\\\tCanvasEncoder at: 1 count: arrayToWrite size + 1.\\\\n\\\\toutBuf putInteger32: arrayToWrite size at: outBufIndex.\\\\n\\\\toutBufIndex := outBufIndex + 4.\\\\n\\\\tarrayToWrite do: [ :each |\\\\n\\\\t\\\\toutBuf putInteger32: each size at: outBufIndex.\\\\n\\\\t\\\\toutBufIndex := outBufIndex + 4.\\\\n\\\\t\\\\toutBuf \\\\n\\\\t\\\\t\\\\treplaceFrom: outBufIndex \\\\n\\\\t\\\\t\\\\tto: outBufIndex + each size - 1 \\\\n\\\\t\\\\t\\\\twith: each \\\\n\\\\t\\\\t\\\\tstartingAt: 1.\\\\n\\\\t\\\\toutBufIndex := outBufIndex + each size.\\\\n\\\\t].\\\\n\\\\t^size! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'RAA 12/13/2000 08:29'!\\\\nbacklog\\\\n\\\\n\\\\t^bytesInOutputQueue + extraUnsentBytes! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'sd 11/20/2005 21:26'!\\\\ngotSomething\\\\n\\\\n\\\\tnumStringsInNextArray ifNil: [^self tryForNumStringsInNextArray ].\\\\n\\\\tnumStringsInNextArray = 0 ifTrue: [\\\\n\\\\t\\\\tinObjects add: #().\\\\n\\\\t\\\\tnumStringsInNextArray := nil.\\\\n\\\\t\\\\t^true ].\\\\n\\\\tnextStringSize ifNil: [^ self tryForNextStringSize ].\\\\n\\\\t^self tryForString\\\\n! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'sd 11/20/2005 21:26'!\\\\ninBufNext: anInteger\\\\n\\\\t\\\\n\\\\t| answer |\\\\n\\\\tanswer := inBuf copyFrom: inBufIndex to: inBufIndex + anInteger - 1.\\\\n\\\\tinBufIndex := inBufIndex + anInteger.\\\\n\\\\t^answer! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'RAA 7/20/2000 15:55'!\\\\ninBufSize\\\\n\\\\n\\\\tinBuf ifNil: [^0].\\\\n\\\\t^inBufLastIndex - inBufIndex + 1! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'RAA 12/14/2000 09:54'!\\\\nisConnected\\\\n\\\\n\\\\t^super isConnected and: [socketWriterProcess notNil]! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'md 2/24/2006 19:51'!\\\\nnextPut: anObject\\\\n\\\\n\\\\tsocketWriterProcess ifNil: [^self].\\\\n\\\\toutObjects addLast: anObject.\\\\n\\\\t\\\\\\\"return the argument - added by kwl\\\\\\\"\\\\n\\\\t^ anObject! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'RAA 12/14/2000 09:46'!\\\\nprocessIO\\\\n\\\\t\\\\\\\"do some as much network IO as possible\\\\\\\"\\\\n\\\\n\\\\tsocketWriterProcess ifNil: [^self].\\\\n\\\\tself processOutput.\\\\n\\\\tself processInput.! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'yo 10/10/2005 18:47'!\\\\nprocessInput\\\\n\\\\t| totalReceived chunkOfData |\\\\n\\\\t\\\\\\\"do as much input as possible\\\\\\\"\\\\n\\\\n\\\\tself flag: #XXX.  \\\\\\\"should have resource limits here--no more than X objects and Y bytes\\\\\\\"\\\\n\\\\n\\\\tchunkOfData _ socket receiveAvailableDataIntoBuffer: self readBuffer.\\\\n\\\\tself addToInBuf: chunkOfData.\\\\n\\\\ttotalReceived _ chunkOfData size.\\\\n\\\\n\\\\ttotalReceived > 0 ifTrue: [\\\\n\\\\t\\\\tNebraskaDebug at: #SendReceiveStats add: {'GET'. totalReceived}.\\\\n\\\\t].\\\\n\\\\n\\\\t[ self gotSomething ] whileTrue: [].\\\\t\\\\t\\\\\\\"decode as many string arrays as possible\\\\\\\"\\\\n\\\\n\\\\tself shrinkInBuf.! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'sd 11/20/2005 21:26'!\\\\nprocessOutput\\\\n\\\\n\\\\t| arrayToWrite size bytesSent timeStartSending t itemsSent now timeSlot bucketAgeInMS bytesThisSlot |\\\\n\\\\n\\\\toutBufIndex := 1.\\\\n\\\\titemsSent := bytesSent := 0.\\\\n\\\\ttimeStartSending := Time millisecondClockValue.\\\\n\\\\t[outObjects isEmpty not and: [self isConnected]] whileTrue: [\\\\n\\\\t\\\\tarrayToWrite := outObjects removeFirst.\\\\n\\\\t\\\\tsize := self addToOutBuf: arrayToWrite.\\\\n\\\\t\\\\tbytesSent := bytesSent + size.\\\\n\\\\t\\\\titemsSent := itemsSent + 1.\\\\n\\\\t\\\\toutBufIndex > 10000 ifTrue: [self queueOutBufContents].\\\\n\\\\t].\\\\n\\\\toutBufIndex > 1 ifTrue: [self queueOutBufContents].\\\\n\\\\tbytesSent > 0 ifTrue: [\\\\n\\\\t\\\\tMaxRatesSeen ifNil: [MaxRatesSeen := Dictionary new].\\\\n\\\\t\\\\tnow := Time millisecondClockValue.\\\\n\\\\t\\\\tt := now - timeStartSending.\\\\n\\\\t\\\\ttimeSlot := now // 10000.\\\\t\\\\\\\"ten second buckets\\\\\\\"\\\\n\\\\t\\\\tbucketAgeInMS := now \\\\\\\\\\\\\\\\ 10.\\\\n\\\\t\\\\tbytesThisSlot := (MaxRatesSeen at: timeSlot ifAbsent: [0]) + bytesSent.\\\\n\\\\t\\\\tMaxRatesSeen \\\\n\\\\t\\\\t\\\\tat: timeSlot \\\\n\\\\t\\\\t\\\\tput: bytesThisSlot.\\\\n\\\\t\\\\tNebraskaDebug \\\\n\\\\t\\\\t\\\\tat: #SendReceiveStats \\\\n\\\\t\\\\t\\\\tadd: {'put'. bytesSent. t. itemsSent. bytesThisSlot // (bucketAgeInMS max: 100)}.\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'sd 11/20/2005 21:26'!\\\\npurgeOutputQueue\\\\n\\\\n\\\\tbytesInOutputQueue := 0.\\\\n\\\\t[outputQueue nextOrNil notNil] whileTrue.! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'sd 11/20/2005 21:26'!\\\\nqueueOutBufContents\\\\n\\\\n\\\\tbytesInOutputQueue := bytesInOutputQueue + outBufIndex - 1.\\\\n\\\\toutputQueue nextPut: {outBuf. outBufIndex - 1}.\\\\n\\\\tNebraskaDebug at: #queuedbufferSizes add: {outBufIndex - 1}.\\\\n\\\\toutBufIndex := 1.\\\\n\\\\toutBuf := String new: 11000.\\\\n\\\\t\\\\n! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'sd 11/20/2005 21:26'!\\\\nsendDataCautiously: aStringOrByteArray bytesToSend: bytesToSend\\\\n\\\\t\\\\\\\"Send all of the data in the given array, even if it requires multiple calls to send it all. Return the number of bytes sent. Try not to send too much at once since this seemed to cause problems talking to a port on the same machine\\\\\\\"\\\\n\\\\n\\\\t| bytesSent count |\\\\n\\\\n\\\\tbytesSent := 0.\\\\n\\\\t[bytesSent < bytesToSend] whileTrue: [\\\\n\\\\t\\\\textraUnsentBytes := bytesToSend - bytesSent.\\\\n\\\\t\\\\tcount := socket \\\\n\\\\t\\\\t\\\\tsendSomeData: aStringOrByteArray \\\\n\\\\t\\\\t\\\\tstartIndex: bytesSent + 1  \\\\n\\\\t\\\\t\\\\tcount: (bytesToSend - bytesSent min: 6000).\\\\n\\\\t\\\\tbytesSent := bytesSent + count.\\\\n\\\\t\\\\t(Delay forMilliseconds: 1) wait.\\\\n\\\\t].\\\\n\\\\textraUnsentBytes := 0.\\\\n\\\\t^ bytesSent\\\\n! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'sd 11/20/2005 21:26'!\\\\nshrinkInBuf\\\\n\\\\n\\\\tinBuf ifNil: [^self].\\\\n\\\\tinBufLastIndex < inBufIndex ifTrue: [\\\\n\\\\t\\\\tinBufLastIndex := 0.\\\\n\\\\t\\\\tinBufIndex := 1.\\\\n\\\\t\\\\tinBuf size > 20000 ifTrue: [inBuf := nil].\\\\t\\\\\\\"if really big, kill it\\\\\\\"\\\\n\\\\t\\\\t^self\\\\n\\\\t].\\\\n\\\\tinBuf := inBuf copyFrom: inBufIndex to: inBufLastIndex.\\\\n\\\\tinBufLastIndex := inBuf size.\\\\n\\\\tinBufIndex := 1.\\\\n\\\\n! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'ls 4/25/2000 18:36'!\\\\nspaceToEncode: anArray\\\\n\\\\t\\\\\\\"return the number of characters needed to encode the given string array\\\\\\\"\\\\n\\\\t^anArray inject: 4 into: [ :sum :array |\\\\n\\\\t\\\\tsum + (array size + 4) ].! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'sd 11/20/2005 21:26'!\\\\ntransmitQueueNext\\\\n\\\\n\\\\t| bufTuple |\\\\n\\\\n\\\\tbufTuple := outputQueue next.\\\\n\\\\tbytesInOutputQueue := bytesInOutputQueue - bufTuple second max: 0.\\\\n\\\\t[\\\\n\\\\t\\\\tself \\\\n\\\\t\\\\t\\\\tsendDataCautiously: bufTuple first \\\\n\\\\t\\\\t\\\\tbytesToSend: bufTuple second.\\\\n\\\\t]\\\\n\\\\t\\\\ton: Error\\\\n\\\\t\\\\tdo: [ :ex |\\\\n\\\\t\\\\t\\\\ttransmissionError := true.\\\\n\\\\t\\\\t].\\\\n\\\\t^transmissionError not\\\\n\\\\n! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'sd 11/20/2005 21:26'!\\\\ntryForNextStringSize\\\\n\\\\t\\\\\\\"grab the size of the next string, if it's available\\\\\\\"\\\\n\\\\n\\\\tself inBufSize >= 4 ifFalse: [^false].\\\\n\\\\n\\\\tnextStringSize := inBuf getInteger32: inBufIndex.\\\\n\\\\t\\\\\\\"nextStringSize > 100000 ifTrue: [self barf].\\\\\\\"\\\\n\\\\tinBufIndex := inBufIndex + 4.\\\\n\\\\t\\\\n\\\\tnextStringSize < 0 ifTrue: [\\\\n\\\\t\\\\tsocket disconnect.\\\\n\\\\t\\\\t^false ].\\\\n\\\\t\\\\n\\\\t^true\\\\n! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'sd 11/20/2005 21:26'!\\\\ntryForNumStringsInNextArray\\\\n\\\\t\\\\\\\"input numStringsInNextARray, if 4 bytes are available\\\\\\\"\\\\n\\\\n\\\\tself inBufSize >= 4 ifFalse: [^false].\\\\n\\\\n\\\\tnumStringsInNextArray := inBuf getInteger32: inBufIndex.\\\\n\\\\t\\\\\\\"(numStringsInNextArray > 100 or: [numStringsInNextArray < 1]) ifTrue: [self barf].\\\\\\\"\\\\n\\\\tinBufIndex := inBufIndex + 4.\\\\n\\\\n\\\\tnumStringsInNextArray < 0 ifTrue: [\\\\n\\\\t\\\\tsocket disconnect.\\\\n\\\\t\\\\t^false ].\\\\n\\\\t\\\\n\\\\tstringsForNextArray := Array new: numStringsInNextArray.\\\\n\\\\tstringCounter := 0.\\\\n\\\\tnextStringSize := nil. \\\\n\\\\t^true! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'sd 11/20/2005 21:26'!\\\\ntryForString\\\\n\\\\t\\\\\\\"try to grab an actual string\\\\\\\"\\\\n\\\\n\\\\tself inBufSize >= nextStringSize ifFalse: [^false].\\\\n\\\\n\\\\tstringsForNextArray \\\\n\\\\t\\\\tat: (stringCounter := stringCounter + 1)\\\\n\\\\t\\\\tput: (self inBufNext: nextStringSize) asString.\\\\n\\\\n\\\\tstringCounter = numStringsInNextArray ifTrue: [\\\\t\\\\\\\"we have finished another array!!\\\\\\\"\\\\n\\\\t\\\\tinObjects addLast: stringsForNextArray.\\\\n\\\\t\\\\tstringCounter := stringsForNextArray := numStringsInNextArray := nextStringSize := nil.\\\\n\\\\t] ifFalse: [\\\\t\\\\\\\"still need more strings for this array\\\\\\\"\\\\n\\\\t\\\\tnextStringSize := nil.\\\\n\\\\t].\\\\n\\\\n\\\\t^true\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStringSocket class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StringSocket class methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:26'!\\\\nclearRatesSeen\\\\n\\\\\\\"\\\\nStringSocket clearRatesSeen\\\\n\\\\\\\"\\\\n\\\\tMaxRatesSeen := nil ! !\\\\n\\\\n!StringSocket class methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:26'!\\\\ncompareFiles\\\\n\\\\\\\"\\\\nStringSocket compareFiles\\\\n\\\\\\\"\\\\n\\\\t| data1 data2 |\\\\n\\\\n\\\\tdata1 := (FileStream fileNamed: 'Macintosh HD:bob:nebraska test:58984048.1')\\\\n\\\\t\\\\t\\\\tcontentsOfEntireFile.\\\\n\\\\tdata2 := (FileStream fileNamed: 'BobsG3:squeak:dsqueak:DSqueak2.7 folder:58795431.3')\\\\n\\\\t\\\\t\\\\tcontentsOfEntireFile.\\\\n\\\\t1 to: (data1 size min: data2 size) do: [ :i |\\\\n\\\\t\\\\t(data1 at: i) = (data2 at: i) ifFalse: [self halt].\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StringSocket class methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:26'!\\\\nshowRatesSeen\\\\n\\\\\\\"\\\\nStringSocket showRatesSeen\\\\n\\\\\\\"\\\\n\\\\t| answer |\\\\n\\\\n\\\\tMaxRatesSeen ifNil: [^Beeper beep].\\\\n\\\\tanswer := WriteStream on: String new.\\\\n\\\\tMaxRatesSeen keys asSortedCollection do: [ :key |\\\\n\\\\t\\\\tanswer nextPutAll: key printString,'  ',((MaxRatesSeen at: key) // 10000) printString; cr\\\\n\\\\t].\\\\n\\\\tStringHolder new contents: answer contents; openLabel: 'send rates at 10 second intervals'.! !\\\\nTestCase subclass: #StringSocketTestCase\\\\n\\\\tinstanceVariableNames: 'socket1 socket2 end1 end2'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Nebraska-Network-ObjectSocket'!\\\\n\\\\n!StringSocketTestCase methodsFor: 'running' stamp: 'sd 11/20/2005 21:26'!\\\\nsetUp\\\\n\\\\t\\\\\\\"it would be nice to have an in-image loopback socket, so that the tests do not need the underlying platform's sockets to behave nicely\\\\\\\"\\\\n\\\\tsocket1 := Socket newTCP.\\\\n\\\\tsocket2 := Socket newTCP.\\\\n\\\\t\\\\n\\\\tsocket1 listenOn: 9999.\\\\n\\\\tsocket2 connectTo: (NetNameResolver localHostAddress) port: 9999.\\\\n\\\\n\\\\tsocket1 waitForConnectionFor: 60.\\\\t\\\\n\\\\tsocket2 waitForConnectionFor: 60.\\\\n\\\\t\\\\n\\\\tend1 := StringSocket on: socket1.\\\\n\\\\tend2 := StringSocket on: socket2.\\\\n\\\\t! !\\\\n\\\\n!StringSocketTestCase methodsFor: 'running' stamp: 'ls 8/4/2004 15:22'!\\\\ntearDown\\\\n\\\\tend1 destroy.\\\\n\\\\tend2 destroy.\\\\n\\\\t! !\\\\n\\\\n!StringSocketTestCase methodsFor: 'running' stamp: 'ls 8/4/2004 15:21'!\\\\ntestBasics\\\\n\\\\tend1 nextPut: #().\\\\n\\\\tend1 nextPut: #('').\\\\n\\\\tend1 nextPut: #('hello' 'world').\\\\n\\\\tend1 processIO.\\\\n\\\\t\\\\n\\\\tend2 processIO.\\\\n\\\\n\\\\tself should: [ end2 next = #() ].\\\\n\\\\tself should: [ end2 next = #('') ].\\\\n\\\\tself should: [ end2 next = #('hello' 'world') ].\\\\n\\\\t! !\\\\n\\\\n!StringSocketTestCase methodsFor: 'running' stamp: 'sd 11/20/2005 21:26'!\\\\ntestBogusInput1\\\\n\\\\t| negString |\\\\n\\\\tnegString := String new: 4.\\\\n\\\\tnegString putInteger32: -10 at: 1.\\\\n\\\\tsocket1 sendData: negString.\\\\n\\\\tend2 processIO.\\\\n\\\\t\\\\n\\\\tself should: [ end2 isConnected not ].\\\\n\\\\t! !\\\\n\\\\n!StringSocketTestCase methodsFor: 'running' stamp: 'sd 11/20/2005 21:26'!\\\\ntestBogusInput2\\\\n\\\\t| bogoString |\\\\n\\\\tbogoString := String new: 8.\\\\n\\\\tbogoString putInteger32: 2 at: 1.\\\\n\\\\tbogoString putInteger32: -10 at: 5.\\\\n\\\\tsocket1 sendData: bogoString.\\\\n\\\\tend2 processIO.\\\\n\\\\t\\\\n\\\\tself should: [ end2 isConnected not ].\\\\n\\\\t! !\\\\nClassTestCase subclass: #StringTest\\\\n\\\\tinstanceVariableNames: 'string'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'CollectionsTests-Text'!\\\\n!StringTest commentStamp: '<historical>' prior: 0!\\\\nThis is the unit test for the class String. Unit tests are a good way to exercise the functionality of your system in a repeatable and automatic manner. They are therefore recommended if you plan to release anything. For more information, see: \\\\n\\\\t- http://www.c2.com/cgi/wiki?UnitTest\\\\n\\\\t- http://minnow.cc.gatech.edu/squeak/1547\\\\n\\\\t- the sunit class category!\\\\n\\\\n\\\\n!StringTest methodsFor: 'initialize-release' stamp: 'md 4/18/2003 10:00'!\\\\nsetUp\\\\n\\\\tstring := 'Hi, I am a String'! !\\\\n\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'stephaneducasse 2/4/2006 20:10'!\\\\ntestFindTokensEscapedBy01\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'this, is, \\\\\\\"a, test\\\\\\\"'.\\\\n\\\\ttokens := string findTokens: ',' escapedBy: '\\\\\\\"'.\\\\n\\\\tself assert: tokens size == 3! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'fbs 2/13/2006 22:20'!\\\\ntestFindTokensEscapedBy02\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := ''.\\\\n\\\\ttokens := string findTokens: ',' escapedBy: '\\\\\\\"'.\\\\n\\\\tself assert: tokens isEmpty! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'stephaneducasse 2/4/2006 20:10'!\\\\ntestFindTokensEscapedBy03\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'this, is, a, test'.\\\\n\\\\ttokens := string findTokens: ',' escapedBy: '\\\\\\\"'.\\\\n\\\\tself assert: tokens size == 4! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'stephaneducasse 2/4/2006 20:10'!\\\\ntestFindTokensEscapedBy04\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'this, is, a\\\\\\\",\\\\\\\" test'.\\\\n\\\\ttokens := string findTokens: ',' escapedBy: '\\\\\\\"'.\\\\n\\\\tself assert: tokens size == 3.\\\\n\\\\tself assert: tokens third = ' a, test'! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'fbs 2/13/2006 22:19'!\\\\ntestFindTokensEscapedBy05\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'this, /is, a\\\\\\\",\\\\\\\" test/'.\\\\n\\\\ttokens := string findTokens: ',#' escapedBy: '\\\\\\\"/'.\\\\n\\\\tself assert: tokens size = 2.\\\\n\\\\tself assert: tokens first = 'this'.\\\\n\\\\tself assert: tokens second = ' is, a\\\\\\\",\\\\\\\" test'.! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'stephaneducasse 2/4/2006 20:10'!\\\\ntestFindTokensEscapedBy06\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'this, is, \\\\\\\"a, test'.\\\\n\\\\ttokens := string findTokens: ',' escapedBy: '\\\\\\\"'.\\\\n\\\\tself assert: tokens size == 3.\\\\n\\\\tself assert: tokens third = ' a, test'! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'stephaneducasse 2/4/2006 20:10'!\\\\ntestFindTokensEscapedBy07\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'a:b::c'.\\\\n\\\\ttokens := string findTokens: ':' escapedBy: '\\\\\\\"'.\\\\n\\\\tself assert: tokens size == 4.\\\\n\\\\tself assert: tokens first = 'a'.\\\\n\\\\tself assert: tokens second = 'b'.\\\\n\\\\tself assert: tokens third = ''.\\\\n\\\\tself assert: tokens fourth = 'c'! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'stephaneducasse 2/4/2006 20:10'!\\\\ntestFindTokensEscapedBy08\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'this, is, ##a, test'.\\\\n\\\\ttokens := string findTokens: ',' escapedBy: '#'.\\\\n\\\\tself assert: tokens size == 4.\\\\n\\\\tself assert: tokens third = ' a'.\\\\n\\\\tself assert: tokens fourth = ' test'! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'stephaneducasse 2/4/2006 20:10'!\\\\ntestFindTokensEscapedBy09\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'this, is, ###a, test#'.\\\\n\\\\ttokens := string findTokens: ',' escapedBy: '#'.\\\\n\\\\tself assert: tokens size == 3.\\\\n\\\\tself assert: tokens third = ' #a, test'! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'stephaneducasse 2/4/2006 20:10'!\\\\ntestFindTokensEscapedBy10\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'this, is, ###a, test'.\\\\n\\\\ttokens := string findTokens: ',' escapedBy: '#'.\\\\n\\\\tself assert: tokens size == 3.\\\\n\\\\tself assert: tokens third = ' #a, test'! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'stephaneducasse 2/4/2006 20:10'!\\\\ntestFindTokensEscapedBy11\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'this, is, \\\\\\\"\\\\\\\"\\\\\\\"a, test\\\\\\\"'.\\\\n\\\\ttokens := string findTokens: ',' escapedBy: '\\\\\\\"'.\\\\n\\\\tself assert: tokens size == 3.\\\\n\\\\tself assert: tokens third = ' \\\\\\\"a, test'! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'stephaneducasse 2/4/2006 20:10'!\\\\ntestFindTokensEscapedBy12\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'one, two# three; four. five'.\\\\n\\\\ttokens := string findTokens: ',#;.' escapedBy: '\\\\\\\"'.\\\\n\\\\tself assert: tokens size == 5.\\\\n\\\\tself assert: tokens third = ' three'! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'stephaneducasse 2/4/2006 20:10'!\\\\ntestFindTokensEscapedBy13\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'one, two# three; four. five'.\\\\n\\\\ttokens := string findTokens: ',#;.' escapedBy: nil.\\\\n\\\\tself assert: tokens size == 5.\\\\n\\\\tself assert: tokens third = ' three'! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'stephaneducasse 2/4/2006 20:10'!\\\\ntestFindTokensEscapedBy14\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'one, \\\\\\\"two# three\\\\\\\"; &four. five&'.\\\\n\\\\ttokens := string findTokens: ',#;.' escapedBy: '\\\\\\\"&'.\\\\n\\\\tself assert: tokens size == 3.\\\\n\\\\tself assert: tokens second = ' two# three'.\\\\n\\\\tself assert: tokens third = ' four. five'! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'fbs 2/13/2006 22:19'!\\\\ntestFindTokensEscapedBy15\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'one, \\\\\\\"two# three\\\\\\\"; &four. five&'.\\\\n\\\\ttokens := string findTokens: nil escapedBy: '\\\\\\\"&'.\\\\n\\\\tself assert: tokens size = 1.\\\\n\\\\tself assert: tokens first = 'one, two# three; four. five'! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'fbs 2/13/2006 22:19'!\\\\ntestFindTokensEscapedBy16\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'one, \\\\\\\"two# three\\\\\\\"; &four. five&'.\\\\n\\\\ttokens := string findTokens: nil escapedBy: nil.\\\\n\\\\tself assert: tokens size = 1.\\\\n\\\\tself assert: tokens first = string! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'stephaneducasse 2/4/2006 20:10'!\\\\ntestFindTokensEscapedBy21\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'this, is, \\\\\\\"a, test\\\\\\\"'.\\\\n\\\\ttokens := string findTokens: $, escapedBy: $\\\\\\\".\\\\n\\\\tself assert: tokens size == 3! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'fbs 2/13/2006 22:19'!\\\\ntestFindTokensEscapedBy22\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := ''.\\\\n\\\\ttokens := string findTokens: $, escapedBy: $\\\\\\\".\\\\n\\\\tself assert: tokens size = 0! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'stephaneducasse 2/4/2006 20:10'!\\\\ntestFindTokensEscapedBy23\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'this, is, a, test'.\\\\n\\\\ttokens := string findTokens: $, escapedBy: $\\\\\\\".\\\\n\\\\tself assert: tokens size == 4! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'stephaneducasse 2/4/2006 20:10'!\\\\ntestFindTokensEscapedBy24\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'this, is, a\\\\\\\",\\\\\\\" test'.\\\\n\\\\ttokens := string findTokens: $, escapedBy: $\\\\\\\".\\\\n\\\\tself assert: tokens size == 3.\\\\n\\\\tself assert: tokens third = ' a, test'! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'fbs 2/13/2006 22:19'!\\\\ntestFindTokensEscapedBy25\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'this, /is, a\\\\\\\",\\\\\\\" test/'.\\\\n\\\\ttokens := string findTokens: $, escapedBy: $/.\\\\n\\\\tself assert: tokens size = 2.\\\\n\\\\tself assert: tokens first = 'this'.\\\\n\\\\tself assert: tokens second = ' is, a\\\\\\\",\\\\\\\" test'.! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'stephaneducasse 2/4/2006 20:10'!\\\\ntestFindTokensEscapedBy26\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'this, is, \\\\\\\"a, test'.\\\\n\\\\ttokens := string findTokens: $, escapedBy: $\\\\\\\".\\\\n\\\\tself assert: tokens size == 3.\\\\n\\\\tself assert: tokens third = ' a, test'! !\\\\n\\\\n\\\\n!StringTest methodsFor: 'tests - accessing' stamp: 'sd 6/5/2005 09:27'!\\\\ntestAt\\\\n\\\\n\\\\tself assert: (string at: 1) = $H.! !\\\\n\\\\n\\\\n!StringTest methodsFor: 'tests - converting' stamp: 'sd 6/5/2005 09:26'!\\\\ntestAsInteger\\\\n\\\\n\\\\tself assert: '1796exportFixes-tkMX' asInteger = 1796.\\\\n\\\\tself assert: 'donald' asInteger isNil.\\\\n\\\\tself assert: 'abc234def567' asInteger = 234.\\\\n\\\\tself assert: '-94' asInteger = -94.\\\\n\\\\tself assert: 'foo-bar-92' asInteger = -92! !\\\\n\\\\n!StringTest methodsFor: 'tests - converting' stamp: 'sd 6/5/2005 09:27'!\\\\ntestAsSmalltalkComment\\\\n\\\\n\\\\t| exampleStrings  |\\\\n\\\\texampleStrings := #(\\\\n\\\\t\\\\t''\\\\n\\\\t\\\\t' '\\\\n\\\\t\\\\t'\\\\\\\"'\\\\n\\\\t\\\\t'\\\\\\\"\\\\\\\"'\\\\n\\\\t\\\\t'\\\\\\\"\\\\\\\"\\\\\\\"'\\\\n\\\\t\\\\t'abc\\\\\\\"abc'\\\\n\\\\t\\\\t'abc\\\\\\\"\\\\\\\"abc'\\\\n\\\\t\\\\t'abc\\\\\\\"hello\\\\\\\"abc'\\\\n\\\\t\\\\t'abc\\\\\\\"'\\\\n\\\\t\\\\t'\\\\\\\"abc' ).\\\\n\\\\n\\\\t\\\\\\\"check that the result of scanning the comment is empty\\\\\\\"\\\\n\\\\texampleStrings do: [ :s |\\\\n\\\\t\\\\t| tokens  |\\\\n\\\\t\\\\ttokens :=  Scanner new scanTokens: s asSmalltalkComment.\\\\n\\\\t\\\\tself assert: (tokens isEmpty) ].\\\\n\\\\n\\\\t\\\\\\\"check that the result has the same non-quote characters as the original\\\\\\\"\\\\n\\\\texampleStrings do: [ :s |\\\\n\\\\t\\\\tself assert: ( (s copyWithout: $\\\\\\\") = (s asSmalltalkComment copyWithout: $\\\\\\\"))].\\\\n\\\\n\\\\t\\\\\\\"finnaly, test for some common kinds of inputs\\\\\\\"\\\\n\\\\tself assert: ( 'abc' asSmalltalkComment = '\\\\\\\"abc\\\\\\\"').\\\\n\\\\tself assert: ( 'abc\\\\\\\"abc' asSmalltalkComment = '\\\\\\\"abc\\\\\\\"\\\\\\\"abc\\\\\\\"').\\\\n\\\\tself assert: ('abc\\\\\\\"\\\\\\\"abc' asSmalltalkComment = '\\\\\\\"abc\\\\\\\"\\\\\\\"abc\\\\\\\"' ).\\\\n\\\\t\\\\t! !\\\\n\\\\n!StringTest methodsFor: 'tests - converting' stamp: 'sd 6/5/2005 09:27'!\\\\ntestCapitalized\\\\n\\\\n\\\\t| uc lc empty |\\\\t\\\\t\\\\n\\\\tuc := 'MElViN'.\\\\n\\\\tlc := 'mElViN'.\\\\n\\\\tempty := ' '.\\\\n\\\\tself assert:  lc capitalized = uc.\\\\n\\\\tself assert: uc capitalized = uc.\\\\n\\\\t\\\\\\\"the string gets copied\\\\\\\"\\\\n\\\\tself deny: uc capitalized == uc.\\\\n\\\\tself deny: empty capitalized == empty.! !\\\\n\\\\n!StringTest methodsFor: 'tests - converting' stamp: 'ky 7/8/2006 15:28'!\\\\ntestUnescapePercents\\\\n\\\\tself assert: '' unescapePercents = ''.\\\\n\\\\tself assert: 'x' unescapePercents = 'x'.\\\\n\\\\n\\\\tself assert: '+' unescapePercents = ' '.\\\\n\\\\tself assert: 'x+' unescapePercents = 'x '.\\\\n\\\\tself assert: '+x' unescapePercents = ' x'.\\\\n\\\\tself assert: 'x+x' unescapePercents = 'x x'.\\\\n\\\\n\\\\tself assert: '%' unescapePercents = '%'.\\\\n\\\\tself assert: '%3' unescapePercents = '%3'.\\\\n\\\\tself assert: '%3C' unescapePercents = '<'.\\\\n\\\\t\\\\n\\\\tself assert: '%3Cx%3E4%3C%2Fx%3E' unescapePercents = '<x>4</x>'.\\\\n\\\\t\\\\n\\\\tself assert: '!!@#$%25%5E&*()%7B%7D%5B%5D=:/;?+''%22' unescapePercents  = '!!@#$%^&*(){}[]=:/;? ''\\\\\\\"'.\\\\n\\\\tself assert: '!!%40%23%24%25%5E%26*()%7B%7D%5B%5D%3D%3A%2F%3B%3F%2B''%22' unescapePercents  = '!!@#$%^&*(){}[]=:/;?+''\\\\\\\"'.\\\\n\\\\tself assert: '%21@%23%24%25%5E%26*%28%29%7B%7D%5B%5D%3D%3A/%3B%3F+%27%22' unescapePercents = '!!@#$%^&*(){}[]=:/;? ''\\\\\\\"'! !\\\\n\\\\n!StringTest methodsFor: 'tests - converting' stamp: 'ky 7/8/2006 18:01'!\\\\ntestUnescapePercentsWithTextEncoding\\\\n\\\\t| leading kataTe kataSu kataTo |\\\\n\\\\tleading := JapaneseEnvironment leadingChar.\\\\n\\\\t\\\\\\\"Katakana letter Te\\\\\\\"\\\\n\\\\tkataTe := (Character leadingChar: leading code: 12486) asString.\\\\n\\\\t\\\\\\\"Katakana letter Su\\\\\\\"\\\\n\\\\tkataSu := (Character leadingChar: leading code: 12473) asString.\\\\n\\\\t\\\\\\\"Katakana letter To\\\\\\\"\\\\n\\\\tkataTo := (Character leadingChar: leading code: 12488) asString.\\\\n\\\\tself assert: ('%83e%83X%83g' unescapePercentsWithTextEncoding: 'shift_jis')\\\\n\\\\t\\\\t\\\\t= (kataTe , kataSu , kataTo).\\\\n\\\\tself assert: ('%83e%83X%83g%20and%20%83e%83X%83g' unescapePercentsWithTextEncoding: 'shift_jis')\\\\n\\\\t\\\\t\\\\t= (kataTe , kataSu , kataTo , ' and ' , kataTe , kataSu , kataTo)! !\\\\n\\\\n!StringTest methodsFor: 'tests - converting' stamp: 'sd 6/5/2005 09:27'!\\\\ntestWithFirstCharacterDownshifted\\\\n\\\\n\\\\t| uc lc empty |\\\\t\\\\t\\\\n\\\\tuc := 'MElViN'.\\\\n\\\\tlc := 'mElViN'.\\\\n\\\\tempty := ' '.\\\\n\\\\tself assert:  uc withFirstCharacterDownshifted = lc.\\\\n\\\\tself assert: lc withFirstCharacterDownshifted = lc.\\\\n\\\\t\\\\\\\"the string gets copied\\\\\\\"\\\\n\\\\tself deny: lc withFirstCharacterDownshifted == lc.\\\\n\\\\tself deny: empty withFirstCharacterDownshifted == empty.! !\\\\n\\\\n\\\\n!StringTest methodsFor: 'as yet unclassified' stamp: 'md 3/16/2006 22:12'!\\\\ntestEquality\\\\n\\\\n\\\\tself assert: 'abc' = 'abc' asWideString.\\\\n\\\\tself assert: 'abc' asWideString = 'abc'.\\\\n\\\\tself assert: ((ByteArray with: 97 with: 0 with: 0 with: 0) asString ~= 'a000' asWideString).\\\\n\\\\tself assert: ('a000' asWideString ~= (ByteArray with: 97 with: 0 with: 0 with: 0) asString).\\\\n\\\\n\\\\tself assert: ('abc' sameAs: 'aBc' asWideString).\\\\n\\\\tself assert: ('aBc' asWideString sameAs: 'abc').\\\\n\\\\tself assert: ((ByteArray with: 97 with: 0 with: 0 with: 0) asString \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsameAs: 'Abcd' asWideString) not.\\\\n\\\\tself assert: ('a000' asWideString sameAs: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(ByteArray with: 97 with: 0 with: 0 with: 0) asString) not.! !\\\\n\\\\n\\\\n!StringTest methodsFor: 'test-comparing' stamp: 'lr 7/7/2006 11:32'!\\\\ntestComparing\\\\n\\\\tself assert: 'foo' < 'foo:'.\\\\n\\\\tself assert: 'foo' < 'fooBar'.\\\\n\\\\tself assert: 'foo' <= 'foo:'.\\\\n\\\\tself assert: 'foo' <= 'fooBar'.\\\\n\\\\tself assert: 'foo:' > 'foo'.\\\\n\\\\tself assert: 'fooBar' > 'foo'.\\\\n\\\\tself assert: 'foo:' >= 'foo'.\\\\n\\\\tself assert: 'fooBar' >= 'foo'! !\\\\n\\\\n\\\\n!StringTest methodsFor: 'testing - converting' stamp: 'KR 06/24/2005 11:21'!\\\\ntestPercentEncodingJa\\\\n\\\\t| leading hiraA hiraO hiraAO encodedHiraA encodedHiraO encodedHiraAO |\\\\n\\\\n    \\\\\\\"Make Japanese String from unicode. see http://www.unicode.org/charts/PDF/U3040.pdf\\\\\\\"\\\\n     leading _ JapaneseEnvironment leadingChar.\\\\n\\\\thiraA _ (Character leadingChar: leading code: 16r3042) asString.  \\\\\\\"HIRAGANA LETTER A\\\\\\\"\\\\n\\\\thiraO _ (Character leadingChar: leading code: 16r304A) asString.  \\\\\\\"HIRAGANA LETTER O\\\\\\\"\\\\n\\\\thiraAO _ hiraA, hiraO.\\\\n\\\\n\\\\t\\\\\\\"Percent Encoded Japanese String\\\\\\\"\\\\n\\\\tencodedHiraA _ hiraA encodeForHTTP.\\\\n\\\\tself assert: encodedHiraA = '%E3%81%82'.\\\\n\\\\tencodedHiraO _ hiraO encodeForHTTP.\\\\n\\\\tself assert: encodedHiraO = '%E3%81%8A'.\\\\n\\\\tencodedHiraAO _ hiraAO encodeForHTTP.\\\\n\\\\tself assert: encodedHiraAO =  '%E3%81%82%E3%81%8A'.\\\\n\\\\n     \\\\\\\"without percent encoded string\\\\\\\"\\\\n\\\\tself assert: '' unescapePercents = ''.\\\\n\\\\tself assert: 'abc' unescapePercents = 'abc'.\\\\t\\\\\\\"latin1 character\\\\\\\"\\\\n\\\\tself assert: hiraAO unescapePercents = hiraAO.  \\\\\\\"multibyte character\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"encoded latin1 string\\\\\\\"\\\\n\\\\tself assert: '%61' unescapePercents = 'a'.\\\\n\\\\tself assert: '%61%62%63' unescapePercents = 'abc'.\\\\n\\\\n\\\\t\\\\\\\"encoded multibyte string\\\\\\\"\\\\n\\\\tLocale currentPlatform: (Locale isoLanguage: 'ja') during: [ \\\\n\\\\t\\\\tself assert: encodedHiraA unescapePercents = hiraA.\\\\n\\\\t\\\\tself assert: encodedHiraAO unescapePercents = hiraAO].\\\\n\\\\n\\\\t\\\\\\\"mixed string\\\\\\\"\\\\n\\\\tLocale currentPlatform: (Locale isoLanguage: 'ja') during: [ \\\\n\\\\t\\\\tself assert: (encodedHiraAO,'a') unescapePercents = (hiraAO, 'a').\\\\n\\\\t\\\\tself assert: ('a', encodedHiraA) unescapePercents = ('a', hiraA).\\\\n\\\\t\\\\tself assert: ('a', encodedHiraA, 'b')  unescapePercents = ('a', hiraA, 'b').\\\\n\\\\t\\\\tself assert: ('a', encodedHiraA, 'b', encodedHiraO) unescapePercents = ('a', hiraA, 'b', hiraO).\\\\n\\\\t\\\\tself assert: (encodedHiraA, encodedHiraO, 'b', encodedHiraA) unescapePercents = (hiraA, hiraO, 'b', hiraA)].\\\\n\\\\n\\\\n\\\\t\\\\\\\"for Seaside\\\\\\\"\\\\n\\\\tLocale currentPlatform: (Locale isoLanguage: 'ja') during: [ \\\\n\\\\t\\\\tself assert: (encodedHiraA, '+', encodedHiraO) unescapePercents = (hiraA, ' ', hiraO)].\\\\n\\\\n! !\\\\n\\\\n\\\\n!StringTest methodsFor: 'tests - indexOf' stamp: 'nice 5/9/2006 23:55'!\\\\ntestIndexOf\\\\n\\\\t\\\\n\\\\t\\\\\\\"test for http://bugs.impara.de/view.php?id=3574\\\\\\\"\\\\n\\\\tself assert: ('abc-' asWideString indexOfAnyOf: (CharacterSet newFrom: ' -0123456789')) = 4.\\\\n\\\\tself assert: ('ab7' asWideString indexOfAnyOf: (CharacterSet newFrom: ' -0123456789')) = 3.\\\\n\\\\tself assert: ('a2c' asWideString indexOfAnyOf: (CharacterSet newFrom: ' -0123456789')) = 2.\\\\n\\\\tself assert: ('3bc' asWideString indexOfAnyOf: (CharacterSet newFrom: ' -0123456789')) = 1.\\\\n\\\\tself assert: ('abc' asWideString indexOfAnyOf: (CharacterSet newFrom: ' -0123456789')) = 0.\\\\n\\\\t\\\\n\\\\t\\\\\\\"extension to wide characters\\\\\\\"\\\\n\\\\tself assert: ((String with: 803 asCharacter with: 811 asCharacter) indexOfAnyOf: (CharacterSet newFrom: (String with: 811 asCharacter with: 812 asCharacter))) = 2.\\\\n\\\\t\\\\n\\\\tself assert: ('abc' indexOfAnyOf: (CharacterSet newFrom: (String with: 811 asCharacter with: 812 asCharacter))) = 0.\\\\n\\\\t\\\\n\\\\tself assert: ('abc' indexOfAnyOf: (CharacterSet newFrom: (String with: 811 asCharacter with: $c))) = 3.! !\\\\nDataType subclass: #StringType\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Protocols-Type Vocabularies'!\\\\n\\\\n!StringType methodsFor: 'initial value' stamp: 'sw 9/27/2001 17:29'!\\\\ninitialValueForASlotFor: aPlayer\\\\n\\\\t\\\\\\\"Answer the value to give initially to a newly created slot of the given type in the given player\\\\\\\"\\\\n\\\\n\\\\t^ 'abc'! !\\\\n\\\\n\\\\n!StringType methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:39'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Initialize the receiver (automatically called when instances are created via 'new')\\\\\\\"\\\\n\\\\n\\\\t| aMethodCategory aMethodInterface |\\\\n\\\\tsuper initialize.\\\\n\\\\tself vocabularyName: #String.\\\\n\\\\n#((accessing \\\\t\\\\t\\\\t'The basic info'\\\\n\\\\t\\\\t(at: at:put: size endsWithDigit findString: findTokens: includesSubString: indexOf: indexOf:startingAt: indexOf:startingAt:ifAbsent: lineCorrespondingToIndex: lineCount lineNumber: startsWithDigit numArgs))\\\\n(#'more accessing' \\\\t\\\\t'More basic info'\\\\n\\\\t\\\\t(allButFirst allButFirst: allButLast allButLast: at:ifAbsent: atAllPut: atPin: atRandom: atWrap: atWrap:put: fifth first first: fourth from:to:put: last last: lastIndexOf: lastIndexOf:ifAbsent: middle replaceAll:with: replaceFrom:to:with: replaceFrom:to:with:startingAt: second sixth third))\\\\n(comparing\\\\t\\\\t\\\\t\\\\t'Determining which comes first alphabeticly'\\\\n\\\\t\\\\t(< <= = > >= beginsWith: endsWith: endsWithAnyOf: howManyMatch: match:))\\\\n(testing \\\\t\\\\t\\\\t\\\\t'Testing'\\\\n\\\\t\\\\t(includes: isEmpty ifNil: ifNotNil: isAllDigits isAllSeparators isString lastSpacePosition))\\\\n(converting \\\\t\\\\t\\\\t'Converting it to another form'\\\\n\\\\t\\\\t(asCharacter asDate asInteger asLowercase asNumber asString asStringOrText asSymbol asText asTime asUppercase asUrl capitalized keywords numericSuffix romanNumber reversed splitInteger surroundedBySingleQuotes withBlanksTrimmed withSeparatorsCompacted withoutTrailingBlanks withoutTrailingDigits asSortedCollection))\\\\n(copying \\\\t\\\\t\\\\t\\\\t'Make another one like me'\\\\n\\\\t\\\\t(copy copyFrom:to: copyUpTo: copyUpToLast: shuffled))\\\\n(enumerating\\\\t\\\\t'Passing over the letters'\\\\n\\\\t\\\\t(collect: collectWithIndex: do: from:to:do: reverseDo: select: withIndexDo: detect: detect:ifNone:))\\\\n) do: [:item | \\\\n\\\\t\\\\t\\\\taMethodCategory := ElementCategory new categoryName: item first.\\\\n\\\\t\\\\t\\\\taMethodCategory documentation: item second.\\\\n\\\\t\\\\t\\\\titem third do:\\\\n\\\\t\\\\t\\\\t\\\\t[:aSelector | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\taMethodInterface := MethodInterface new initializeFor: aSelector.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself atKey: aSelector putMethodInterface: aMethodInterface.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\taMethodCategory elementAt: aSelector put: aMethodInterface].\\\\n\\\\t\\\\t\\\\tself addCategory: aMethodCategory].\\\\n! !\\\\n\\\\n\\\\n!StringType methodsFor: '*eToys-color' stamp: 'sw 9/27/2001 17:21'!\\\\ntypeColor\\\\n\\\\t\\\\\\\"Answer the color for tiles to be associated with objects of this type\\\\\\\"\\\\n\\\\n\\\\t^ self subduedColorFromTriplet: #(0.0 0.0 1.0)\\\\t! !\\\\n\\\\n\\\\n!StringType methodsFor: '*eToys-tiles' stamp: 'yo 3/14/2005 21:27'!\\\\ndefaultArgumentTile\\\\n        \\\\\\\"Answer a tile to represent the type\\\\\\\"\\\\n\\\\n        ^ 'abc' translated newTileMorphRepresentative typeColor: self typeColor! !\\\\n\\\\n!StringType methodsFor: '*eToys-tiles' stamp: 'sw 9/27/2001 17:33'!\\\\nsetFormatForDisplayer: aDisplayer\\\\n\\\\t\\\\\\\"Set up the displayer to have the right format characteristics\\\\\\\"\\\\n\\\\n\\\\taDisplayer useStringFormat\\\\n\\\\t! !\\\\n\\\\n!StringType methodsFor: '*eToys-tiles' stamp: 'sw 9/27/2001 17:33'!\\\\nwantsArrowsOnTiles\\\\n\\\\t\\\\\\\"Answer whether this data type wants up/down arrows on tiles representing its values\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\nMorph subclass: #SubpaneDividerMorph\\\\n\\\\tinstanceVariableNames: 'resizingEdge'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Windows'!\\\\n!SubpaneDividerMorph commentStamp: '<historical>' prior: 0!\\\\nA morph which presents a visible separator between subpanes of a SystemWindow which have zero edgeWidth.  Subpanes are submorphs of a SystemWindow's paneMorphs.\\\\n\\\\nA SubpaneDividerMorph may also initiate reframe handles for the subpanes.  For resizing, it is expected that the main paneMorph has a ProportionalLayout LayoutPolicy, and that the subpanes to be resized have LayoutFrames with equal topFractions and bottomFractions, but different topOffsets and bottomOffsets.  It is the offsets that are changed, and the change is propagated through sibling morphs up to the first resizable morph (with different nominal frame fractions).\\\\n\\\\nThe direction of propagation is determined by the value of resizingEdge, which is one of: nil (for non-adjustible subpane divisions), #bottom or #top (which acts a though the divider is the corresponding edge of the subpane directly above or below it).  Does not currently support #left or #right binding, or subpanes in a TableLayout.\\\\n!\\\\n\\\\n\\\\n!SubpaneDividerMorph methodsFor: 'accessing' stamp: 'sw 5/18/2001 11:27'!\\\\nborderColor\\\\n\\\\t\\\\\\\"I behave like a border for the purpose of browser beautifying, so I obey this protocol, to advantage\\\\\\\"\\\\n\\\\n\\\\t^ self color! !\\\\n\\\\n!SubpaneDividerMorph methodsFor: 'accessing' stamp: 'sw 5/18/2001 11:26'!\\\\nborderColor: aColor\\\\n\\\\t\\\\\\\"I behave like a border for the purpose of browser beautifying, so I obey this protocol, to advantage\\\\\\\"\\\\n\\\\n\\\\tself color: aColor! !\\\\n\\\\n!SubpaneDividerMorph methodsFor: 'accessing' stamp: 'JW 2/3/2001 09:39'!\\\\nresizingEdge\\\\n\\\\n\\\\t^resizingEdge\\\\n! !\\\\n\\\\n\\\\n!SubpaneDividerMorph methodsFor: 'initialization' stamp: 'dgd 3/7/2003 14:53'!\\\\ndefaultColor\\\\n\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color black! !\\\\n\\\\n!SubpaneDividerMorph methodsFor: 'initialization' stamp: 'JW 2/3/2001 09:26'!\\\\nfirstEnter: evt\\\\n\\\\t\\\\\\\"The first time this divider is activated, find its window and redirect further interaction there.\\\\\\\"\\\\n\\\\t| window |\\\\n\\\\n\\\\twindow := self firstOwnerSuchThat: [:m | m respondsTo: #secondaryPaneTransition:divider:].\\\\n\\\\twindow ifNil: [ self suspendEventHandler. ^ self ]. \\\\\\\"not working out\\\\\\\"\\\\n\\\\twindow secondaryPaneTransition: evt divider: self.\\\\n\\\\tself on: #mouseEnter send: #secondaryPaneTransition:divider: to: window.\\\\n! !\\\\n\\\\n!SubpaneDividerMorph methodsFor: 'initialization' stamp: 'JW 2/3/2001 09:07'!\\\\nhorizontal\\\\n\\\\n\\\\tself hResizing: #spaceFill.! !\\\\n\\\\n!SubpaneDividerMorph methodsFor: 'initialization' stamp: 'dgd 3/7/2003 14:53'!\\\\ninitialize\\\\n\\\\t\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tself extent: 1 @ 1! !\\\\n\\\\n!SubpaneDividerMorph methodsFor: 'initialization' stamp: 'JW 2/3/2001 09:12'!\\\\nresizingEdge: edgeSymbol\\\\n\\\\n\\\\t(#(top bottom) includes: edgeSymbol) ifFalse:\\\\n\\\\t\\\\t[ self error: 'resizingEdge must be #top or #bottom' ].\\\\n\\\\tresizingEdge := edgeSymbol.\\\\n\\\\tself on: #mouseEnter send: #firstEnter: to: self.\\\\n! !\\\\n\\\\n!SubpaneDividerMorph methodsFor: 'initialization' stamp: 'JW 2/3/2001 09:07'!\\\\nvertical\\\\n\\\\n\\\\tself vResizing: #spaceFill.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSubpaneDividerMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SubpaneDividerMorph class methodsFor: 'instance creation' stamp: 'JW 2/3/2001 09:35'!\\\\nforBottomEdge\\\\n\\\\t^self new horizontal resizingEdge: #bottom! !\\\\n\\\\n!SubpaneDividerMorph class methodsFor: 'instance creation' stamp: 'JW 2/3/2001 09:35'!\\\\nforTopEdge\\\\n\\\\t^self new horizontal resizingEdge: #top! !\\\\n\\\\n!SubpaneDividerMorph class methodsFor: 'instance creation' stamp: 'JW 2/3/2001 09:31'!\\\\nhorizontal\\\\n\\\\t^self new horizontal! !\\\\n\\\\n!SubpaneDividerMorph class methodsFor: 'instance creation' stamp: 'JW 2/3/2001 09:31'!\\\\nvertical\\\\n\\\\t^self new vertical! !\\\\nObject subclass: #SunAudioFileWriter\\\\n\\\\tinstanceVariableNames: 'stream headerStart'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Sound-Synthesis'!\\\\n!SunAudioFileWriter commentStamp: '<historical>' prior: 0!\\\\nI encode monophonic sampled sounds in Sun audio (.au) file format. Sun audio files have a very simple format but can store both compressed and uncompressed sample data. I can write this format either directly into a file or onto any writable binary stream.\\\\n!\\\\n\\\\n\\\\n!SunAudioFileWriter methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nsetStream: aBinaryStream\\\\n\\\\t\\\\\\\"Initialize myself for writing on the given stream.\\\\\\\"\\\\n\\\\n\\\\tstream := aBinaryStream.\\\\n\\\\theaderStart := aBinaryStream position.\\\\n! !\\\\n\\\\n\\\\n!SunAudioFileWriter methodsFor: 'other' stamp: 'jm 11/16/2001 18:02'!\\\\nappendBytes: aByteArray\\\\n\\\\t\\\\\\\"Append the given sample data to my stream.\\\\\\\"\\\\n\\\\n\\\\tstream nextPutAll: aByteArray.\\\\n! !\\\\n\\\\n!SunAudioFileWriter methodsFor: 'other' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nappendSamples: aSoundBuffer\\\\n\\\\t\\\\\\\"Append the given SoundBuffer to my stream.\\\\\\\"\\\\n\\\\n\\\\t| swapBytes s |\\\\n\\\\t(stream isKindOf: StandardFileStream) ifTrue: [\\\\n\\\\t\\\\t\\\\\\\"optimization: write sound buffer directly to file\\\\\\\"\\\\n\\\\t\\\\tswapBytes := SmalltalkImage current  isLittleEndian.\\\\n\\\\t\\\\tswapBytes ifTrue: [aSoundBuffer reverseEndianness].  \\\\\\\"make big endian\\\\\\\"\\\\n\\\\t\\\\tstream next: (aSoundBuffer size // 2) putAll: aSoundBuffer startingAt: 1.  \\\\\\\"size in words\\\\\\\"\\\\n\\\\t\\\\tswapBytes ifTrue: [aSoundBuffer reverseEndianness].  \\\\\\\"revert to little endian\\\\\\\"\\\\n\\\\t\\\\t^ self].\\\\n\\\\n\\\\t\\\\\\\"for non-file streams:\\\\\\\"\\\\n\\\\ts := WriteStream on: (ByteArray new: 2 * aSoundBuffer monoSampleCount).\\\\n\\\\t1 to: aSoundBuffer monoSampleCount do: [:i | s int16: (aSoundBuffer at: i)].\\\\n\\\\tself appendBytes: s contents.\\\\n! !\\\\n\\\\n!SunAudioFileWriter methodsFor: 'other' stamp: 'jm 11/16/2001 22:09'!\\\\ncloseFile\\\\n\\\\t\\\\\\\"Update the Sun audio file header to reflect the final size of the sound data. If my stream is a file stream, close it and, on a Macintosh, set the file type and creator to that used by SoundApp for Sun Audio files. (This does nothing on other platforms.)\\\\\\\"\\\\n\\\\n\\\\tself ensureOpen.\\\\n\\\\tself updateHeaderDataSize.\\\\n\\\\t(stream isKindOf: StandardFileStream) ifTrue: [\\\\n\\\\t\\\\tstream close.\\\\n\\\\t\\\\tFileDirectory default setMacFileNamed: stream name type: 'ULAW' creator: 'SCPL'].\\\\n! !\\\\n\\\\n!SunAudioFileWriter methodsFor: 'other' stamp: 'sd 1/30/2004 15:23'!\\\\nensureOpen\\\\n\\\\t\\\\\\\"Ensure that my stream is open.\\\\\\\"\\\\n\\\\n\\\\tstream closed ifTrue: [stream reopen; binary].\\\\n! !\\\\n\\\\n!SunAudioFileWriter methodsFor: 'other' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nupdateHeaderDataSize\\\\n\\\\t\\\\\\\"Update the Sun audio file header to reflect the final size of the sound data.\\\\\\\"\\\\n\\\\n\\\\t| byteCount |\\\\n\\\\tbyteCount := stream position - (headerStart + 24).\\\\n\\\\tstream position: headerStart + 8.\\\\n\\\\tstream uint32: byteCount.\\\\n! !\\\\n\\\\n!SunAudioFileWriter methodsFor: 'other' stamp: 'jm 11/16/2001 17:55'!\\\\nwriteHeaderSamplingRate: samplingRate\\\\n\\\\t\\\\\\\"Write a Sun audio file header for 16-bit linear format.\\\\\\\"\\\\n\\\\n\\\\tself writeHeaderSamplingRate: samplingRate format: 3.\\\\n! !\\\\n\\\\n!SunAudioFileWriter methodsFor: 'other' stamp: 'jm 11/16/2001 22:10'!\\\\nwriteHeaderSamplingRate: samplingRate format: audioFormat\\\\n\\\\t\\\\\\\"Write a Sun audio file header for the given sampling rate and format. Currently, only monophonic files are supported.\\\\\\\"\\\\n\\\\n\\\\tself ensureOpen.\\\\n\\\\tstream position: headerStart.\\\\n\\\\tstream nextPutAll: '.snd' asByteArray.\\\\n\\\\tstream uint32: 24.\\\\t\\\\\\\"header size in bytes\\\\\\\"\\\\n\\\\tstream uint32: 0.\\\\t\\\\\\\"sample data size in bytes; fill in later\\\\\\\"\\\\n\\\\tstream uint32: audioFormat.\\\\n\\\\tstream uint32: samplingRate truncated.\\\\n\\\\tstream uint32: 1.\\\\t\\\\\\\"channel count\\\\\\\"\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSunAudioFileWriter class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SunAudioFileWriter class methodsFor: 'instance creation' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nonFileNamed: fileName\\\\n\\\\t\\\\\\\"Answer an instance of me on a newly created file with the given name.\\\\\\\"\\\\n\\\\n\\\\t| file |\\\\n\\\\tfile := (FileStream newFileNamed: fileName) binary.\\\\n\\\\t^ self new setStream: file\\\\n! !\\\\n\\\\n!SunAudioFileWriter class methodsFor: 'instance creation' stamp: 'jm 11/16/2001 17:50'!\\\\nonStream: aBinaryStream\\\\n\\\\t\\\\\\\"Answer an instance of me on the given binary stream.\\\\\\\"\\\\n\\\\n\\\\t^ self new setStream: aBinaryStream\\\\n! !\\\\n\\\\n\\\\n!SunAudioFileWriter class methodsFor: 'sound storing' stamp: 'jm 11/21/2001 15:42'!\\\\ncodecForFormatCode: formatCode\\\\n\\\\t\\\\\\\"Answer the codec for the given Sun audio file format number.\\\\\\\"\\\\n\\\\n\\\\tformatCode = 1 ifTrue: [^ MuLawCodec new].\\\\n\\\\tformatCode = 3 ifTrue: [^ nil].  \\\\\\\"uncompressed\\\\\\\"\\\\n\\\\tformatCode = 23 ifTrue: [^ ADPCMCodec newBitsPerSample: 4].\\\\n\\\\tformatCode = 25 ifTrue: [^ ADPCMCodec newBitsPerSample: 3].\\\\n\\\\tformatCode = 26 ifTrue: [^ ADPCMCodec newBitsPerSample: 5].\\\\n\\\\tformatCode = 610 ifTrue: [^ GSMCodec new].\\\\n\\\\tself error: 'unsupported Sun audio format'\\\\n! !\\\\n\\\\n!SunAudioFileWriter class methodsFor: 'sound storing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nformatCodeForCompressionType: aString\\\\n\\\\t\\\\\\\"Answer the Sun audio file format number for the given compression type name.\\\\\\\"\\\\n\\\\n\\\\t| lowercase |\\\\n\\\\tlowercase := aString asLowercase.\\\\n\\\\t'mulaw' = lowercase ifTrue: [^ 1].\\\\n\\\\t'none' = lowercase ifTrue: [^ 3].\\\\n\\\\t'adpcm3' = lowercase ifTrue: [^ 25].\\\\n\\\\t'adpcm4' = lowercase ifTrue: [^ 23].\\\\n\\\\t'adpcm5' = lowercase ifTrue: [^ 26].\\\\n\\\\t'gsm' = lowercase ifTrue: [^ 610].\\\\n\\\\tself error: 'unknown compression style'\\\\n! !\\\\n\\\\n!SunAudioFileWriter class methodsFor: 'sound storing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nstoreSampledSound: aSampledSound onFileNamed: fileName compressionType: aString\\\\n\\\\t\\\\\\\"Store the samples of the given sampled sound on a file with the given name using the given type of compression. See formatCodeForCompressionType: for the list of compression types.\\\\\\\"\\\\n\\\\n\\\\t| fmt codec f compressed |\\\\n\\\\tfmt := self formatCodeForCompressionType: aString.\\\\n\\\\tcodec := self codecForFormatCode: fmt.\\\\n\\\\tf := self onFileNamed: fileName.\\\\n\\\\tf writeHeaderSamplingRate: aSampledSound originalSamplingRate format: fmt.\\\\n\\\\tcodec\\\\n\\\\t\\\\tifNil: [f appendSamples: aSampledSound samples]\\\\n\\\\t\\\\tifNotNil: [\\\\n\\\\t\\\\t\\\\tcompressed := codec encodeSoundBuffer: aSampledSound samples.\\\\n\\\\t\\\\t\\\\tf appendBytes: compressed].\\\\n\\\\tf closeFile.\\\\n! !\\\\nFileDirectoryWrapper subclass: #SuperSwikiDirectoryWrapper\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Explorer'!\\\\n!SuperSwikiDirectoryWrapper commentStamp: '<historical>' prior: 0!\\\\nThe super swiki does not at present have subdirectories!\\\\n\\\\n\\\\n!SuperSwikiDirectoryWrapper methodsFor: 'as yet unclassified' stamp: 'RAA 2/2/2001 08:28'!\\\\ncontents\\\\n\\\\n\\\\t^#()\\\\t\\\\t\\\\\\\"we have no sundirectories\\\\\\\"! !\\\\n\\\\n!SuperSwikiDirectoryWrapper methodsFor: 'as yet unclassified' stamp: 'RAA 2/2/2001 08:28'!\\\\nhasContents\\\\n\\\\n\\\\t^false\\\\t\\\\t\\\\\\\"we have no sundirectories\\\\\\\"! !\\\\nProjectSwikiServer subclass: #SuperSwikiServer\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Network-RemoteDirectory'!\\\\n\\\\n!SuperSwikiServer methodsFor: 'accessing' stamp: 'KR 2/1/2006 13:07'!\\\\nencodingName\\\\n\\\\t(super encodingName) ifNil: [ ^SuperSwikiServer defaultEncodingName ] ifNotNil: [^super encodingName].! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'accessing' stamp: 'mir 6/25/2001 17:17'!\\\\ntypeForPrefs\\\\n\\\\n\\\\t^'bss'! !\\\\n\\\\n\\\\n!SuperSwikiServer methodsFor: 'for real' stamp: 'mir 8/23/2001 22:15'!\\\\nallEntries\\\\n\\\\n\\\\t| answer |\\\\n\\\\n\\\\tanswer _ self sendToSwikiProjectServer: {\\\\n\\\\t\\\\t'action: listallprojects'.\\\\n\\\\t}.\\\\n\\\\t(answer beginsWith: 'OK') ifFalse: [^#()].\\\\n\\\\t^self parseListEntries: answer! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'for real' stamp: 'ar 3/2/2001 14:36'!\\\\ndirectoryNames\\\\n\\\\n\\\\t^self entries select:[:each| each isDirectory] thenCollect: [ :each | each name]! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'for real' stamp: 'RAA 2/2/2001 08:29'!\\\\ndirectoryWrapperClass\\\\n\\\\n\\\\t^SuperSwikiDirectoryWrapper! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'for real' stamp: 'mir 8/23/2001 22:16'!\\\\nentries\\\\n\\\\n\\\\t^self allEntries! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'for real' stamp: 'KR 1/30/2006 21:59'!\\\\nfastParseEntriesFrom: aString\\\\n\\\\n\\\\t| c first strm xEntryName xCreationTime xModificationTime xIsDirectory xFileSize ch |\\\\n\\\\n\\\\tc _ OrderedCollection new.\\\\n\\\\tfirst _ true.\\\\n\\\\taString linesDo: [ :x |\\\\n\\\\t\\\\tfirst ifFalse: [\\\\n\\\\t\\\\t\\\\tstrm _ ReadStream on: x.\\\\n\\\\t\\\\t\\\\t(strm upTo: $ ) = '(DirectoryEntry' ifFalse: [^nil].\\\\n\\\\t\\\\t\\\\t(strm upTo: $ ) = 'name:' ifFalse: [^nil].\\\\n\\\\t\\\\t\\\\txEntryName _ WriteStream on: String new.\\\\n\\\\t\\\\t\\\\tstrm next = $' ifFalse: [^nil].\\\\n\\\\t\\\\t\\\\t[\\\\n\\\\t\\\\t\\\\t\\\\tch _ strm next.\\\\n\\\\t\\\\t\\\\t\\\\tch = $' and: [(strm peekFor: $') not]\\\\n\\\\t\\\\t\\\\t] whileFalse: [\\\\n\\\\t\\\\t\\\\t\\\\txEntryName nextPut: ch.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\txEntryName _ xEntryName contents.\\\\n\\\\t\\\\t\\\\tstrm skipSeparators.\\\\n\\\\t\\\\t\\\\t(strm upTo: $ ) = 'creationTime:' ifFalse: [^nil].\\\\n\\\\t\\\\t\\\\txCreationTime _ (strm upTo: $ ) asNumber.\\\\n\\\\t\\\\t\\\\t(strm upTo: $ ) = 'modificationTime:' ifFalse: [^nil].\\\\n\\\\t\\\\t\\\\txModificationTime _ (strm upTo: $ ) asNumber.\\\\n\\\\t\\\\t\\\\t(strm upTo: $ ) = 'isDirectory:' ifFalse: [^nil].\\\\n\\\\t\\\\t\\\\txIsDirectory _ (strm upTo: $ ) = 'true'.\\\\n\\\\t\\\\t\\\\t(strm upTo: $ ) = 'fileSize:' ifFalse: [^nil].\\\\n\\\\t\\\\t\\\\txFileSize _ (strm upTo: $ ) asNumber.\\\\n\\\\n\\\\t\\\\t\\\\tc add: (DirectoryEntry \\\\n\\\\t\\\\t\\\\t\\\\tname: (xEntryName convertFromEncoding: self encodingName)\\\\n\\\\t\\\\t\\\\t\\\\tcreationTime: xCreationTime \\\\n\\\\t\\\\t\\\\t\\\\tmodificationTime: xModificationTime \\\\n\\\\t\\\\t\\\\t\\\\tisDirectory: xIsDirectory \\\\n\\\\t\\\\t\\\\t\\\\tfileSize: xFileSize\\\\n\\\\t\\\\t\\\\t)\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tfirst _ false.\\\\n\\\\t].\\\\n\\\\t^c\\\\n! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'for real' stamp: 'ar 3/2/2001 14:36'!\\\\nfileNames\\\\n\\\\n\\\\t^self entries select:[:each| each isDirectory not] thenCollect: [ :each | each name]! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'for real' stamp: 'RAA 10/17/2000 12:49'!\\\\ngetOnly: numberOfBytes from: aName\\\\n\\\\n\\\\t| answer |\\\\n\\\\n\\\\tanswer _ self sendToSwikiProjectServer: {\\\\n\\\\t\\\\t'action: readnamedfile'.\\\\n\\\\t\\\\t'projectname: ',aName.\\\\n\\\\t\\\\t'bytestoread: ',numberOfBytes printString.\\\\n\\\\t}.\\\\n\\\\t(answer beginsWith: 'OK') ifFalse: [ ^nil].\\\\n\\\\t^answer allButFirst: 3\\\\n! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'for real' stamp: 'md 11/14/2003 17:28'!\\\\nmatchingEntries: criteria\\\\n\\\\t| result |\\\\n\\\\teToyUserListUrl ifNil:[^self entries].\\\\n\\\\tresult _ self sendToSwikiProjectServer: {\\\\n\\\\t\\\\t'action: listmatchingprojects'.\\\\n\\\\t}  , criteria.\\\\n\\\\t(result beginsWith: 'OK')\\\\n\\\\t\\\\tifFalse: [^self entries]. \\\\\\\"If command not supported\\\\\\\"\\\\n\\\\t^self parseListEntries: result! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'for real' stamp: 'KR 1/30/2006 22:02'!\\\\noldFileNamed: aName\\\\n\\\\n\\\\t| answer |\\\\n\\\\n\\\\tanswer _ self sendToSwikiProjectServer: {\\\\n\\\\t\\\\t'action: readnamedfile'.\\\\n\\\\t\\\\t'projectname: ',aName convertToEncoding: self encodingName.\\\\n\\\\t}.\\\\n\\\\t(answer beginsWith: 'OK') ifFalse: [ ^nil].\\\\n\\\\t^(SwikiPseudoFileStream with: (answer allButFirst: 3))\\\\n\\\\t\\\\treset;\\\\n\\\\t\\\\tdirectory: self;\\\\n\\\\t\\\\tlocalName: (aName convertToEncoding: self encodingName);\\\\n\\\\t\\\\tyourself\\\\n! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'for real' stamp: 'RAA 10/17/2000 14:54'!\\\\noldFileOrNoneNamed: fullName\\\\n\\\\n\\\\t| answer aName |\\\\n\\\\n\\\\tself flag: #bob.\\\\t\\\\t\\\\\\\"fix this up for full names\\\\\\\"\\\\n\\\\n\\\\taName _ fullName.\\\\n\\\\tanswer _ self sendToSwikiProjectServer: {\\\\n\\\\t\\\\t'action: readnamedfile'.\\\\n\\\\t\\\\t'projectname: ',(self localNameFor: aName).\\\\n\\\\t}.\\\\n\\\\t(answer beginsWith: 'OK') ifFalse: [^nil].\\\\n\\\\t^(SwikiPseudoFileStream with: (answer allButFirst: 3))\\\\n\\\\t\\\\treset;\\\\n\\\\t\\\\tdirectory: self;\\\\n\\\\t\\\\tlocalName: aName;\\\\n\\\\t\\\\tyourself\\\\n! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'for real' stamp: 'KR 1/30/2006 21:57'!\\\\nputFile: fileStream named: fileNameOnServer\\\\n\\\\n\\\\t\\\\n\\\\t^(\\\\n\\\\t\\\\tself sendToSwikiProjectServer: {\\\\n\\\\t\\\\t\\\\t'uploadproject: ',fileNameOnServer convertToEncoding: self encodingName.\\\\n\\\\t\\\\t\\\\t'password: ',ProjectPasswordNotification signal.\\\\n\\\\t\\\\t\\\\tfileStream contentsOfEntireFile.\\\\n\\\\t\\\\t}\\\\n\\\\t) beginsWith: 'OK'\\\\n! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'for real' stamp: 'RAA 10/13/2000 16:53'!\\\\nreadOnlyFileNamed: aName\\\\n\\\\n\\\\t^self oldFileNamed: aName\\\\n! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'for real' stamp: 'RAA 2/16/2001 18:22'!\\\\nsendToSwikiProjectServer: anArray\\\\n\\\\n\\\\t| argsDict answer buildStream |\\\\n\\\\n\\\\tbuildStream _ WriteStream on: String new.\\\\n\\\\tanArray do: [ :each | \\\\n\\\\t\\\\tbuildStream \\\\n\\\\t\\\\t\\\\tnextPutAll: each size printString;\\\\n\\\\t\\\\t\\\\tspace;\\\\n\\\\t\\\\t\\\\tnextPutAll: each\\\\n\\\\t].\\\\n\\\\t(argsDict _ Dictionary new)\\\\n\\\\t\\\\tat: 'swikicommands'\\\\n\\\\t\\\\tput: {buildStream contents}.\\\\n\\\\tanswer _ HTTPSocket \\\\n\\\\t\\\\thttpPostToSuperSwiki: self url\\\\n\\\\t\\\\targs: argsDict\\\\n\\\\t\\\\taccept: 'application/octet-stream' \\\\n\\\\t\\\\trequest: ''.\\\\n\\\\t^(answer isKindOf: MIMEDocument) ifTrue: [answer content] ifFalse: [answer]\\\\n! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'for real' stamp: 'KR 2/20/2006 12:50'!\\\\nupdateProjectInfoFor: aProject\\\\n\\\\n\\\\t| data details projectLinks linkString uploader |\\\\n\\\\n\\\\tdata _ OrderedCollection new.\\\\n\\\\tdata add: 'action: updatepage'.\\\\n\\\\tdata add: 'password: ',ProjectPasswordNotification signal.\\\\n\\\\tdata add: 'projectimage: ', (aProject name convertToEncoding: self encodingName) , '.gif'.\\\\n\\\\tuploader _ Utilities authorNamePerSe.\\\\n\\\\tuploader isEmptyOrNil ifTrue: [uploader _ Utilities authorInitialsPerSe].\\\\n\\\\tuploader isEmptyOrNil ifFalse: [\\\\n\\\\t\\\\tdata add: ('submittedBy: ',uploader convertToEncoding: self encodingName).\\\\n\\\\t].\\\\n\\\\tprojectLinks _ Set new.\\\\n\\\\taProject world allMorphsDo: [ :each |\\\\n\\\\t\\\\t(each isKindOf: ProjectViewMorph) ifTrue: [\\\\n\\\\t\\\\t\\\\tprojectLinks add: each safeProjectName.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\tdetails _ aProject world valueOfProperty: #ProjectDetails ifAbsent: [Dictionary new].\\\\n\\\\tdetails at: 'projectname' ifAbsentPut: [aProject name].\\\\n\\\\tprojectLinks isEmpty ifTrue: [\\\\n\\\\t\\\\tdetails removeKey: 'projectlinks' ifAbsent: []\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tlinkString _ String streamContents: [ :strm |\\\\n\\\\t\\\\t\\\\tprojectLinks asSortedCollection do: [ :each |\\\\n\\\\t\\\\t\\\\t\\\\tstrm nextPutAll: each\\\\n\\\\t\\\\t\\\\t] separatedBy: [\\\\n\\\\t\\\\t\\\\t\\\\tstrm nextPut: $.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tdetails at: 'projectlinks' put: linkString\\\\n\\\\t].\\\\n\\\\tdetails keysAndValuesDo: [ :k :v |\\\\n\\\\t\\\\tdata add: k , ': ' , (v convertToEncoding: self encodingName). self flag: #yoFlag.\\\\n\\\\t].\\\\n\\\\t^self sendToSwikiProjectServer: data! !\\\\n\\\\n\\\\n\\\\n!SuperSwikiServer methodsFor: 'squeaklets' stamp: 'KR 1/30/2006 22:15'!\\\\nupLoadProject: projectName members: archiveMembers retry: aBool\\\\n\\\\t| answer |\\\\n\\\\tarchiveMembers do:[:entry|\\\\n\\\\t\\\\tProgressNotification signal: '4:uploadingFile' extra:'(uploading ' translated, entry fileName convertFromSystemString , '...)' translated.\\\\n\\\\t\\\\tanswer _ self sendToSwikiProjectServer: {\\\\n\\\\t\\\\t\\\\t'uploadproject2: ', entry fileName convertFromSystemString convertToEncoding: self encodingName.\\\\n\\\\t\\\\t\\\\t'password: ',ProjectPasswordNotification signal.\\\\n\\\\t\\\\t\\\\tentry contents.\\\\n\\\\t\\\\t}.\\\\n\\\\t\\\\tanswer = 'OK' ifFalse:[\\\\n\\\\t\\\\t\\\\tself inform:'Server responded ' translated, answer.\\\\n\\\\t\\\\t\\\\t^false].\\\\n\\\\t].\\\\n\\\\tProgressNotification signal: '4:uploadingFile' extra:''.\\\\n\\\\t^true! !\\\\n\\\\n\\\\n!SuperSwikiServer methodsFor: 'testing' stamp: 'mir 11/14/2001 16:25'!\\\\nisSearchable\\\\n\\\\t^true! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'testing' stamp: 'ar 8/24/2001 15:12'!\\\\nparseQueryResult: resultStream\\\\n\\\\n\\\\t| projectInfos projectName  downloadUrl |\\\\n\\\\tprojectInfos _ OrderedCollection new.\\\\n\\\\tdownloadUrl _ self downloadUrl.\\\\n\\\\tresultStream reset; nextLine.\\\\n\\\\t[resultStream atEnd] whileFalse: [\\\\n\\\\t\\\\tprojectName _ resultStream nextLine.\\\\n\\\\t\\\\tprojectInfos add: projectName.\\\\n\\\\t\\\\t\\\\\\\"Transcript show: projectName; cr.\\\\\\\"\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\\\\"Transcript show: 'done'; cr.\\\\\\\"\\\\n\\\\t^projectInfos\\\\n! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'testing' stamp: 'RAA 10/17/2000 16:10'!\\\\nqueryAllProjects\\\\n\\\\n\\\\\\\"answer a collection of DirectoryEntry objects for each file on server\\\\\\\"\\\\n\\\\n\\\\\\\"SuperSwikiServer testOnlySuperSwiki queryAllProjects\\\\\\\"\\\\n\\\\n\\\\t^self sendToSwikiProjectServer: {\\\\n\\\\t\\\\t'action: listallprojects'.\\\\n\\\\t}! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'testing' stamp: 'md 11/14/2003 17:28'!\\\\nqueryProjects: criteria\\\\n\\\\t| result |\\\\n\\\\t\\\\\\\"SuperSwikiServer defaultSuperSwiki queryProjects: #('submittedBy: mir' )\\\\\\\"\\\\n\\\\tresult _ self sendToSwikiProjectServer: {\\\\n\\\\t\\\\t'action: findproject'.\\\\n\\\\t}  , criteria.\\\\n\\\\t(result beginsWith: 'OK') ifFalse: [^self inform: result printString].\\\\n\\\\t^self parseQueryResult: (ReadStream on: result).\\\\n! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'testing' stamp: 'RAA 10/17/2000 19:23'!\\\\nqueryProjectsAndShow\\\\n\\\\t| result |\\\\n\\\\\\\"SuperSwikiServer testOnlySuperSwiki queryProjectsAndShow\\\\\\\"\\\\n\\\\n\\\\tresult _ self sendToSwikiProjectServer: {\\\\n\\\\t\\\\t'action: findproject'.\\\\n\\\\t\\\\t\\\\\\\"'projectname: *proj*'.\\\\\\\"\\\\n\\\\t}.\\\\n\\\\t(result beginsWith: 'OK') ifFalse: [^self inform: result printString].\\\\n\\\\tself showQueryAsPVM: (ReadStream on: result).\\\\n! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'testing' stamp: 'RAA 10/18/2000 12:23'!\\\\nqueryProjectsAndShow: thingsToSearchFor\\\\n\\\\t| result |\\\\n\\\\\\\"SuperSwikiServer testOnlySuperSwiki queryProjectsAndShow\\\\\\\"\\\\n\\\\n\\\\tresult _ self sendToSwikiProjectServer: {\\\\n\\\\t\\\\t'action: findproject'.\\\\n\\\\t}, thingsToSearchFor.\\\\n\\\\t(result beginsWith: 'OK') ifFalse: [^self inform: result printString].\\\\n\\\\tself showQueryAsPVM: (ReadStream on: result).\\\\n! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'testing' stamp: 'RAA 10/12/2000 17:01'!\\\\nqueryPythagoras\\\\n\\\\\\\"SuperSwikiServer testOnlySuperSwiki queryPythagoras\\\\\\\"\\\\n\\\\n\\\\t^self sendToSwikiProjectServer: {\\\\n\\\\t\\\\t'action: findproject'.\\\\n\\\\t\\\\t'projectsubcategory: *geometry*'.\\\\n\\\\t\\\\t\\\\\\\"'projectname: *pythagoras*'.\\\\\\\"\\\\n\\\\t}! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'testing' stamp: 'KR 1/30/2006 21:59'!\\\\nshowQueryAsPVM: resultStream\\\\n\\\\t| answer gif whatToShow projectName fileName firstURL wrapper currX currY maxX maxY rawProjectName |\\\\n\\\\\\\"SuperSwikiServer testOnlySuperSwiki queryProjectsAndShow\\\\\\\"\\\\n\\\\n\\\\tresultStream reset; nextLine.\\\\n\\\\tanswer _ RectangleMorph new\\\\n\\\\t\\\\tuseRoundedCorners;\\\\n\\\\t\\\\tborderWidth: 0;\\\\n\\\\t\\\\tborderColor: Color blue;\\\\n\\\\t\\\\tcolor: Color paleBlue.\\\\n\\\\tcurrX _ currY _ maxX _ maxY _ 10.\\\\n\\\\t[resultStream atEnd] whileFalse: [\\\\n\\\\t\\\\trawProjectName _ resultStream nextLine.\\\\n\\\\t\\\\tprojectName _ rawProjectName convertFromEncoding: self encodingName.\\\\n\\\\t\\\\tfileName _ resultStream nextLine convertFromEncoding: self encodingName.\\\\n\\\\t\\\\tgif _ self oldFileOrNoneNamed: rawProjectName,'.gif'.\\\\n\\\\t\\\\tgif ifNotNil: [gif _ GIFReadWriter formFromStream: gif].\\\\n\\\\t\\\\tcurrX > 600 ifTrue: [\\\\n\\\\t\\\\t\\\\tcurrX _ 10.\\\\n\\\\t\\\\t\\\\tcurrY _ maxY + 10.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tgif ifNil: [\\\\n\\\\t\\\\t\\\\tgif _ AlignmentMorph newColumn\\\\n\\\\t\\\\t\\\\t\\\\thResizing: #shrinkWrap;\\\\n\\\\t\\\\t\\\\t\\\\tvResizing: #shrinkWrap;\\\\n\\\\t\\\\t\\\\t\\\\tborderWidth: 8;\\\\n\\\\t\\\\t\\\\t\\\\tborderColor: Color red;\\\\n\\\\t\\\\t\\\\t\\\\tcolor: Color lightRed;\\\\n\\\\t\\\\t\\\\t\\\\taddMorph: (StringMorph contents: 'No GIF for ',projectName);\\\\n\\\\t\\\\t\\\\t\\\\tfullBounds;\\\\n\\\\t\\\\t\\\\t\\\\timageForm\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tfirstURL _ self url.\\\\n\\\\t\\\\tfirstURL last == $/ ifFalse: [firstURL _ firstURL, '/'].\\\\n\\\\n\\\\t\\\\twhatToShow _ ProjectViewMorph new\\\\n\\\\t\\\\t\\\\timage: (gif asFormOfDepth: Display depth);\\\\n\\\\t\\\\t\\\\tlastProjectThumbnail: gif;\\\\n\\\\t\\\\t\\\\tsetProperty: #SafeProjectName toValue: projectName;\\\\n\\\\t\\\\t\\\\tproject: (DiskProxy \\\\n\\\\t\\\\t\\\\t\\\\tglobal: #Project \\\\n\\\\t\\\\t\\\\t\\\\tselector: #namedUrl: \\\\n\\\\t\\\\t\\\\t\\\\targs: {firstURL,fileName}\\\\n\\\\t\\\\t\\\\t).\\\\n\\\\n\\\\t\\\\tanswer addMorphBack: (whatToShow position: currX @ currY).\\\\n\\\\t\\\\tcurrX _ currX + whatToShow width + 10.\\\\n\\\\t\\\\tmaxX _ maxX max: currX.\\\\n\\\\t\\\\tmaxY _ maxY max: currY + whatToShow height.\\\\n\\\\t].\\\\n\\\\tmaxX = 10 ifTrue: [\\\\n\\\\t\\\\t^self inform: 'No projects found for your criteria'\\\\n\\\\t].\\\\n\\\\tanswer extent: (maxX @ maxY) + (0@10).\\\\n\\\\twrapper _ ScrollPane new extent: (answer width + 10) @ (answer height min: 400).\\\\n\\\\twrapper color: Color white.\\\\n\\\\twrapper scroller addMorph: answer.\\\\n\\\\twrapper \\\\n\\\\t\\\\tbecomeModal;\\\\n\\\\t\\\\topenCenteredInWorld;\\\\n\\\\t\\\\tuseRoundedCorners;\\\\n\\\\t\\\\tsetScrollDeltas.! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'testing' stamp: 'RAA 10/25/2000 12:14'!\\\\nspeedTest1\\\\n\\\\n\\\\\\\"SuperSwikiServer testOnlySuperSwiki speedTest1\\\\\\\"\\\\n\\\\n\\\\t| answer t totalTime |\\\\n\\\\n\\\\ttotalTime _ [\\\\n\\\\t\\\\tanswer _ (1 to: 10) collect: [ :x |\\\\n\\\\t\\\\t\\\\tt _ [answer _ self sendToSwikiProjectServer: {\\\\n\\\\t\\\\t\\\\t\\\\t'action: readnamedfile'.\\\\n\\\\t\\\\t\\\\t\\\\t'projectname: xyz.002.pr'.\\\\n\\\\t\\\\t\\\\t}] timeToRun.\\\\n\\\\t\\\\t\\\\t{t. answer size}\\\\n\\\\t\\\\t].\\\\n\\\\t] timeToRun.\\\\n\\\\t^{totalTime. answer}\\\\n! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'testing' stamp: 'ar 7/8/2001 17:06'!\\\\nspeedTest2\\\\n\\\\n\\\\\\\"SuperSwikiServer testOnlySuperSwiki speedTest2\\\\\\\"\\\\n\\\\n\\\\\\\"==observed results\\\\n10 forks of 10 reads of 88K in 12.7 seconds\\\\n100 * 88110 / 12.7 ===> 693779 bytes per second\\\\n---\\\\n10 forks of 10 reads of 88K in 10.7 seconds\\\\n100 * 88110 / 10.7 ===> 823457 bytes per second\\\\n---at priority 5\\\\n10 forks of 10 reads of 88K in 9.8 seconds\\\\n100 * 88110 / 9.8 ===> 899081 bytes per second\\\\n===\\\\\\\"\\\\n\\\\n\\\\t| answer bigAnswer tRealBegin tRealEnd |\\\\n\\\\n\\\\tbigAnswer _ SharedQueue new.\\\\n\\\\ttRealBegin _ tRealEnd _ Time millisecondClockValue.\\\\n\\\\t10 timesRepeat: [\\\\n\\\\t\\\\t[\\\\n\\\\t\\\\t\\\\tanswer _ SuperSwikiServer testOnlySuperSwiki speedTest1.\\\\n\\\\t\\\\t\\\\ttRealEnd _ Time millisecondClockValue.\\\\n\\\\t\\\\t\\\\tbigAnswer nextPut: {\\\\n\\\\t\\\\t\\\\t\\\\t{tRealBegin. tRealEnd. tRealEnd - tRealBegin}.\\\\n\\\\t\\\\t\\\\t\\\\tanswer\\\\n\\\\t\\\\t\\\\t}.\\\\n\\\\t\\\\t] forkAt: Processor userInterruptPriority.\\\\n\\\\t].\\\\n\\\\tbigAnswer inspect.\\\\n! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'testing' stamp: 'RAA 10/7/2000 16:12'!\\\\ntest1\\\\n\\\\n\\\\t| localDirectory localFileName local resp |\\\\n\\\\n\\\\tlocalDirectory _ FileDirectory default.\\\\n\\\\tlocalFileName _ 'superTest1.07Oct1611.cs'.\\\\n\\\\tlocal _ localDirectory oldFileNamed: localFileName.\\\\n\\\\tresp _ self putFile: local named: localFileName retry: false.\\\\n\\\\tlocal close.\\\\n\\\\t^resp\\\\n! !\\\\n\\\\n\\\\n!SuperSwikiServer methodsFor: 'private' stamp: 'mir 8/23/2001 22:04'!\\\\nparseListEntries: listResult\\\\n\\\\n\\\\t| c first |\\\\n\\\\tc _ self fastParseEntriesFrom: listResult.\\\\n\\\\tc ifNotNil: [^c].\\\\n\\\\tc _ OrderedCollection new.\\\\n\\\\tfirst _ true.\\\\n\\\\tlistResult linesDo: [ :x |\\\\n\\\\t\\\\tfirst ifFalse: [c add: (Compiler evaluate: x)].\\\\n\\\\t\\\\tfirst _ false.\\\\n\\\\t].\\\\n\\\\t^c\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSuperSwikiServer class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SuperSwikiServer class methodsFor: 'as yet unclassified' stamp: 'RAA 10/7/2000 17:47'!\\\\ncurrentSuperSwiki\\\\n\\\\n\\\\t\\\\\\\"make this return nil to disable SuperSwiki hack\\\\\\\"\\\\n\\\\n\\\\t^self defaultSuperSwiki\\\\n\\\\n! !\\\\n\\\\n!SuperSwikiServer class methodsFor: 'as yet unclassified' stamp: 'KR 2/1/2006 13:18'!\\\\ndefaultEncodingName\\\\n\\\\tLocale current isoLanguage = 'ja' ifTrue: [^'shift_jis' copy] ifFalse: [^'latin1' copy].\\\\n! !\\\\n\\\\n!SuperSwikiServer class methodsFor: 'as yet unclassified' stamp: 'RAA 10/17/2000 19:11'!\\\\ndefaultSuperSwiki\\\\n\\\\n\\\\t^SuperSwikiServer new \\\\n\\\\t\\\\ttype: #http;\\\\n\\\\t\\\\tserver: self defaultSuperSwikiIPAddress;\\\\n\\\\t\\\\tdirectory: '/super/SuperSwikiProj'\\\\n\\\\t\\\\n! !\\\\n\\\\n!SuperSwikiServer class methodsFor: 'as yet unclassified' stamp: 'RAA 10/19/2000 11:05'!\\\\ndefaultSuperSwikiIPAddress\\\\n\\\\n\\\\t^'209.143.91.36'\\\\n! !\\\\n\\\\n!SuperSwikiServer class methodsFor: 'as yet unclassified' stamp: 'RAA 10/17/2000 19:11'!\\\\ntestOnlySuperSwiki\\\\n\\\\n\\\\t^SuperSwikiServer new \\\\n\\\\t\\\\ttype: #http;\\\\n\\\\t\\\\tserver: self defaultSuperSwikiIPAddress;\\\\n\\\\t\\\\tdirectory: '/super/SuperSwikiProj'\\\\n\\\\t\\\\n! !\\\\nRWBinaryOrTextStream subclass: #SwikiPseudoFileStream\\\\n\\\\tinstanceVariableNames: 'directoryUrl localName directory'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Network-RemoteDirectory'!\\\\n\\\\n!SwikiPseudoFileStream methodsFor: 'as yet unclassified' stamp: 'RAA 10/17/2000 14:53'!\\\\ndirectory\\\\n\\\\n\\\\t^directory url! !\\\\n\\\\n!SwikiPseudoFileStream methodsFor: 'as yet unclassified' stamp: 'RAA 10/17/2000 14:53'!\\\\ndirectory: x\\\\n\\\\n\\\\tdirectory _ x! !\\\\n\\\\n!SwikiPseudoFileStream methodsFor: 'as yet unclassified' stamp: 'RAA 10/17/2000 15:00'!\\\\ndirectoryObject\\\\n\\\\n\\\\t^directory! !\\\\n\\\\n!SwikiPseudoFileStream methodsFor: 'as yet unclassified' stamp: 'RAA 10/17/2000 15:00'!\\\\ndirectoryUrl\\\\n\\\\n\\\\t^directory url! !\\\\n\\\\n!SwikiPseudoFileStream methodsFor: 'as yet unclassified' stamp: 'RAA 10/13/2000 11:50'!\\\\ndirectoryUrl: x\\\\n\\\\n\\\\tdirectoryUrl _ x! !\\\\n\\\\n!SwikiPseudoFileStream methodsFor: 'as yet unclassified' stamp: 'RAA 10/17/2000 13:59'!\\\\nfileName\\\\n\\\\n\\\\t^localName! !\\\\n\\\\n!SwikiPseudoFileStream methodsFor: 'as yet unclassified' stamp: 'RAA 10/17/2000 14:01'!\\\\nisTypeHTTP\\\\n\\\\n\\\\t^true! !\\\\n\\\\n!SwikiPseudoFileStream methodsFor: 'as yet unclassified' stamp: 'RAA 10/13/2000 11:50'!\\\\nlocalName\\\\n\\\\n\\\\t^localName! !\\\\n\\\\n!SwikiPseudoFileStream methodsFor: 'as yet unclassified' stamp: 'RAA 10/13/2000 11:50'!\\\\nlocalName: x\\\\n\\\\n\\\\tlocalName _ x! !\\\\nModel subclass: #Switch\\\\n\\\\tinstanceVariableNames: 'on onAction offAction'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'ST80-Menus'!\\\\n!Switch commentStamp: '<historical>' prior: 0!\\\\nI represent a selection setting and actions to take depending on a change in the setting. An instance has three attributes: state, which is either on or off; on action; and off action. The on and off actions are blocks of code that execute whenever the instance changes state. I am typically used as a menu item in conjunction with a SwitchView and a SwitchController.\\\\n1/24/96 sw: made this a subclass of Model, for faster dependents handling!\\\\n\\\\n\\\\n!Switch methodsFor: 'action'!\\\\ndoAction: anAction \\\\n\\\\t\\\\\\\"Execute anAction if it is non-nil.\\\\\\\"\\\\n\\\\n\\\\tanAction == nil ifFalse: [anAction value]! !\\\\n\\\\n!Switch methodsFor: 'action'!\\\\noffAction: anAction \\\\n\\\\t\\\\\\\"Set the off action of the receiver to anAction.\\\\\\\"\\\\n\\\\n\\\\toffAction _ anAction fixTemps! !\\\\n\\\\n!Switch methodsFor: 'action'!\\\\nonAction: anAction \\\\n\\\\t\\\\\\\"Set the on action of the receiver to anAction.\\\\\\\"\\\\n\\\\n\\\\tonAction _ anAction fixTemps! !\\\\n\\\\n\\\\n!Switch methodsFor: 'converting' stamp: 'md 9/18/2004 19:51'!\\\\nprintOn: aStream\\\\n\\\\tself isOn\\\\n\\\\t\\\\tifTrue: [aStream nextPutAll: 'ON-Switch']\\\\n\\\\t\\\\tifFalse: [aStream nextPutAll: 'OFF-Switch']! !\\\\n\\\\n\\\\n!Switch methodsFor: 'state'!\\\\nclear\\\\n\\\\t\\\\\\\"Set the state of the receiver to 'off'. If the state of the receiver was \\\\n\\\\tpreviously 'on', then 'self change' is sent. The receiver's off action is \\\\n\\\\tNOT executed.\\\\\\\"\\\\n\\\\n\\\\tself isOn\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[on _ false.\\\\n\\\\t\\\\t\\\\tself changed]! !\\\\n\\\\n!Switch methodsFor: 'state'!\\\\nisOff\\\\n\\\\t\\\\\\\"Answer whether the receiver is set off or not.\\\\\\\"\\\\n\\\\n\\\\t^on not! !\\\\n\\\\n!Switch methodsFor: 'state'!\\\\nisOn\\\\n\\\\t\\\\\\\"Answer whether the receiver is set on or not.\\\\\\\"\\\\n\\\\n\\\\t^on! !\\\\n\\\\n!Switch methodsFor: 'state'!\\\\nset\\\\n\\\\t\\\\\\\"Set the state of the receiver to 'on'. If the state of the receiver was \\\\n\\\\tpreviously 'off', then 'self change' is sent. The receiver's on action is \\\\n\\\\tNOT executed.\\\\\\\"\\\\n\\\\n\\\\tself isOff\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[on _ true.\\\\n\\\\t\\\\t\\\\tself changed]! !\\\\n\\\\n!Switch methodsFor: 'state'!\\\\nswitch\\\\n\\\\t\\\\\\\"Change the state of the receiver from 'on' to 'off' or from 'off' to 'on' (see \\\\n\\\\tSwitch|turnOn, Switch|turnOff).\\\\\\\"\\\\n\\\\n\\\\tself isOn\\\\n\\\\t\\\\tifTrue: [self turnOff]\\\\n\\\\t\\\\tifFalse: [self turnOn]! !\\\\n\\\\n!Switch methodsFor: 'state'!\\\\nturnOff\\\\n\\\\t\\\\\\\"Set the state of the receiver to 'off'. If the state of the receiver was \\\\n\\\\tpreviously 'on', then 'self change' is sent and the receiver's off action is \\\\n\\\\texecuted.\\\\\\\"\\\\n\\\\n\\\\tself isOn\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[on _ false.\\\\n\\\\t\\\\t\\\\tself changed.\\\\n\\\\t\\\\t\\\\tself doAction: offAction]! !\\\\n\\\\n!Switch methodsFor: 'state'!\\\\nturnOn\\\\n\\\\t\\\\\\\"Set the state of the receiver to 'on'. If the state of the receiver was \\\\n\\\\tpreviously 'off', then 'self change' is sent and the receiver's on action is \\\\n\\\\texecuted.\\\\\\\"\\\\n\\\\n\\\\tself isOff\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[on _ true.\\\\n\\\\t\\\\t\\\\tself changed.\\\\n\\\\t\\\\t\\\\tself doAction: onAction]! !\\\\n\\\\n\\\\n!Switch methodsFor: 'private'!\\\\ninitializeOff\\\\n\\\\n\\\\ton _ false. \\\\n\\\\tonAction _ nil.\\\\n\\\\toffAction _ nil! !\\\\n\\\\n!Switch methodsFor: 'private'!\\\\ninitializeOn\\\\n\\\\n\\\\ton _ true. \\\\n\\\\tonAction _ nil.\\\\n\\\\toffAction _ nil! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSwitch class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!Switch class methodsFor: 'instance creation'!\\\\nnew\\\\n\\\\t\\\\\\\"Answer an instance of me such that the on and off actions are set to nil\\\\n\\\\t('no action'), and the state is set to 'off'.\\\\\\\"\\\\n\\\\n\\\\t^self newOff! !\\\\n\\\\n!Switch class methodsFor: 'instance creation'!\\\\nnewOff\\\\n\\\\t\\\\\\\"Answer an instance of me such that the on and off actions are set to nil \\\\n\\\\t('no action'), and the state is set to 'off'.\\\\\\\"\\\\n\\\\n\\\\t^super new initializeOff! !\\\\n\\\\n!Switch class methodsFor: 'instance creation'!\\\\nnewOn\\\\n\\\\t\\\\\\\"Answer an instance of me such that the on and off actions are set to nil \\\\n\\\\t('no action'), and the state is set to 'on'.\\\\\\\"\\\\n\\\\n\\\\t^super new initializeOn! !\\\\nObject subclass: #Syllable\\\\n\\\\tinstanceVariableNames: 'phonemes accent events'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Speech-TTS'!\\\\n!Syllable commentStamp: '<historical>' prior: 0!\\\\nMy instances are syllables. They can carry a pitch accent: 'H*', 'L*', etc.!\\\\n\\\\n\\\\n!Syllable methodsFor: 'accessing' stamp: 'len 12/11/1999 13:03'!\\\\naccent\\\\n\\\\t^ accent! !\\\\n\\\\n!Syllable methodsFor: 'accessing' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\naccent: aString\\\\n\\\\taccent := aString! !\\\\n\\\\n!Syllable methodsFor: 'accessing' stamp: 'len 12/8/1999 17:47'!\\\\naccept: anObject\\\\n\\\\tanObject syllable: self! !\\\\n\\\\n!Syllable methodsFor: 'accessing' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\nevents\\\\n\\\\t^ events ifNil: [events := CompositeEvent new addAll: (self phonemes collect: [ :each | PhoneticEvent new phoneme: each; duration: 0.080]); yourself]! !\\\\n\\\\n!Syllable methodsFor: 'accessing' stamp: 'len 12/8/1999 02:55'!\\\\nphonemes\\\\n\\\\t^ phonemes! !\\\\n\\\\n!Syllable methodsFor: 'accessing' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\nphonemes: aCollection\\\\n\\\\tphonemes := aCollection! !\\\\n\\\\n!Syllable methodsFor: 'accessing' stamp: 'len 12/8/1999 02:54'!\\\\nstress\\\\n\\\\tself phonemes do: [ :each | each stress > 0 ifTrue: [^ each stress]].\\\\n\\\\t^ 0! !\\\\n\\\\n\\\\n!Syllable methodsFor: 'enumarating' stamp: 'len 12/13/1999 01:20'!\\\\neventsDo: aBlock\\\\n\\\\tself events do: aBlock! !\\\\n\\\\n\\\\n!Syllable methodsFor: 'printing' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\nprintOn: aStream\\\\n\\\\t| first |\\\\n\\\\taStream nextPut: $[.\\\\n\\\\tfirst := true.\\\\n\\\\tself phonemes do: [ :each |\\\\n\\\\t\\\\tfirst ifFalse: [aStream space].\\\\n\\\\t\\\\taStream print: each.\\\\n\\\\t\\\\tfirst := false].\\\\n\\\\taStream nextPut: $]! !\\\\n\\\\n\\\\n!Syllable methodsFor: 'testing' stamp: 'len 12/8/1999 19:03'!\\\\nhasPrimaryStress\\\\n\\\\t^ self stress = 1! !\\\\n\\\\n!Syllable methodsFor: 'testing' stamp: 'len 12/8/1999 19:03'!\\\\nhasSecondaryStress\\\\n\\\\t^ self stress = 2! !\\\\n\\\\n!Syllable methodsFor: 'testing' stamp: 'len 12/11/1999 13:11'!\\\\nisAccented\\\\n\\\\t^ self accent notNil! !\\\\nString subclass: #Symbol\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: 'NewSymbols OneCharacterSymbols SymbolTable'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Collections-Strings'!\\\\n!Symbol commentStamp: '<historical>' prior: 0!\\\\nI represent Strings that are created uniquely. Thus, someString asSymbol == someString asSymbol.!\\\\n\\\\n\\\\n!Symbol methodsFor: 'accessing'!\\\\nat: anInteger put: anObject \\\\n\\\\t\\\\\\\"You cannot modify the receiver.\\\\\\\"\\\\n\\\\n\\\\tself errorNoModification! !\\\\n\\\\n!Symbol methodsFor: 'accessing' stamp: 'sma 2/5/2000 12:32'!\\\\nprecedence\\\\n\\\\t\\\\\\\"Answer the receiver's precedence, assuming it is a valid Smalltalk\\\\n\\\\tmessage selector or 0 otherwise.  The numbers are 1 for unary,\\\\n\\\\t2 for binary and 3 for keyword selectors.\\\\\\\"\\\\n\\\\n\\\\tself size = 0 ifTrue: [^ 0].\\\\n\\\\tself first isLetter ifFalse: [^ 2].\\\\n\\\\tself last = $: ifTrue: [^ 3].\\\\n\\\\t^ 1! !\\\\n\\\\n!Symbol methodsFor: 'accessing'!\\\\nreplaceFrom: start to: stop with: replacement startingAt: repStart\\\\n\\\\n\\\\tself errorNoModification! !\\\\n\\\\n\\\\n!Symbol methodsFor: 'comparing' stamp: 'ar 4/10/2005 23:45'!\\\\n= aSymbol\\\\n\\\\t\\\\\\\"Compare the receiver and aSymbol.\\\\\\\" \\\\n\\\\tself == aSymbol ifTrue: [^ true].\\\\n\\\\tself class == aSymbol class ifTrue: [^ false].\\\\n\\\\t\\\\\\\"Use String comparison otherwise\\\\\\\"\\\\n\\\\t^ super = aSymbol! !\\\\n\\\\n\\\\n!Symbol methodsFor: 'converting' stamp: 'st 11/22/2004 17:26'!\\\\nasMutator\\\\n\\\\t\\\\\\\"Return a setter message from a getter message. For example,\\\\n\\\\t#name asMutator returns #name:\\\\\\\"\\\\n\\\\t^ (self copyWith: $:) asSymbol! !\\\\n\\\\n!Symbol methodsFor: 'converting' stamp: 'ar 4/10/2005 22:42'!\\\\nasString \\\\n\\\\t\\\\\\\"Refer to the comment in String|asString.\\\\\\\"\\\\n\\\\t| newString |\\\\n\\\\tnewString _ self species new: self size.\\\\n\\\\tnewString replaceFrom: 1 to: newString size with: self startingAt: 1.\\\\n\\\\t^newString! !\\\\n\\\\n!Symbol methodsFor: 'converting'!\\\\nasSymbol \\\\n\\\\t\\\\\\\"Refer to the comment in String|asSymbol.\\\\\\\"! !\\\\n\\\\n!Symbol methodsFor: 'converting' stamp: 'sw 1/28/98 18:18'!\\\\ncapitalized\\\\n\\\\t^ self asString capitalized asSymbol! !\\\\n\\\\n!Symbol methodsFor: 'converting' stamp: 'md 8/10/2004 10:54'!\\\\nwithFirstCharacterDownshifted\\\\n\\\\t\\\\\\\"Answer an object like the receiver but with first character downshifted if necesary\\\\\\\"\\\\n\\\\n\\\\t^self asString withFirstCharacterDownshifted asSymbol.! !\\\\n\\\\n\\\\n!Symbol methodsFor: 'copying' stamp: 'tk 6/26/1998 11:35'!\\\\nclone\\\\n\\\\t\\\\\\\"Answer with the receiver, because Symbols are unique.\\\\\\\"! !\\\\n\\\\n!Symbol methodsFor: 'copying'!\\\\ncopy\\\\n\\\\t\\\\\\\"Answer with the receiver, because Symbols are unique.\\\\\\\"! !\\\\n\\\\n!Symbol methodsFor: 'copying'!\\\\nshallowCopy\\\\n\\\\t\\\\\\\"Answer with the receiver, because Symbols are unique.\\\\\\\"! !\\\\n\\\\n!Symbol methodsFor: 'copying' stamp: 'tk 8/19/1998 16:05'!\\\\nveryDeepCopyWith: deepCopier\\\\n\\\\t\\\\\\\"Return self.  I am immutable in the Morphic world.  Do not record me.\\\\\\\"! !\\\\n\\\\n\\\\n!Symbol methodsFor: 'filter streaming' stamp: 'mpw 1/1/1901 00:20'!\\\\nbyteEncode:aStream\\\\n\\\\t^aStream writeSymbol:self.\\\\n! !\\\\n\\\\n\\\\n!Symbol methodsFor: 'printing' stamp: 'sw 8/19/1999 11:30'!\\\\nisOrientedFill\\\\n\\\\t\\\\\\\"Needs to be implemented here because symbols can occupy 'color' slots of morphs.\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Symbol methodsFor: 'printing' stamp: 'di 4/25/2000 12:32'!\\\\nstoreOn: aStream \\\\n\\\\n\\\\taStream nextPut: $#.\\\\n\\\\t(Scanner isLiteralSymbol: self)\\\\n\\\\t\\\\tifTrue: [aStream nextPutAll: self]\\\\n\\\\t\\\\tifFalse: [super storeOn: aStream]! !\\\\n\\\\n\\\\n!Symbol methodsFor: 'system primitives' stamp: 'di 1/2/1999 17:00'!\\\\nflushCache\\\\n\\\\t\\\\\\\"Tell the interpreter to remove all entries with this symbol as a selector from its method lookup cache, if it has one.  This primitive must be called whenever a method is defined or removed.\\\\n\\\\tNOTE:  Only one of the two selective flush methods needs to be used.\\\\n\\\\tSqueak 2.3 and later uses 116 (See CompiledMethod flushCache).\\\\\\\"\\\\n\\\\n\\\\t<primitive: 119>\\\\n! !\\\\n\\\\n!Symbol methodsFor: 'system primitives' stamp: 'md 2/16/2006 17:17'!\\\\nnumArgs: n\\\\n\\\\t\\\\\\\"Answer a string that can be used as a selector with n arguments.\\\\n\\\\t TODO: need to be extended to support shrinking and for selectors like #+ \\\\\\\" \\\\n\\\\n\\\\t| selector numArgs aStream offs |\\\\n\\\\t\\\\n\\\\tselector := self.\\\\n\\\\t(numArgs := selector numArgs) >= n ifTrue: [^self].\\\\t\\\\n\\\\taStream := WriteStream on: (String new: 16).\\\\n\\\\taStream nextPutAll: self.\\\\n\\\\t\\\\n\\\\t(numArgs = 0) ifTrue: [aStream nextPutAll: ':'. offs := 0] ifFalse: [offs := 1].\\\\n\\\\t2 to: n - numArgs + offs do: [:i | aStream nextPutAll: 'with:'].\\\\t\\\\n\\\\t^aStream contents asSymbol\\\\n\\\\t\\\\n! !\\\\n\\\\n\\\\n!Symbol methodsFor: 'testing' stamp: 'md 1/20/2006 16:16'!\\\\nincludesKey: sym\\\\n\\\\t^self == sym.! !\\\\n\\\\n!Symbol methodsFor: 'testing' stamp: 'md 8/27/2005 16:33'!\\\\nisDoIt\\\\n\\\\n\\\\t^ (self == #DoIt) or: [self == #DoItIn:].! !\\\\n\\\\n!Symbol methodsFor: 'testing' stamp: 'sma 2/5/2000 12:32'!\\\\nisInfix\\\\n\\\\t\\\\\\\"Answer whether the receiver is an infix message selector.\\\\\\\"\\\\n\\\\n\\\\t^ self precedence == 2! !\\\\n\\\\n!Symbol methodsFor: 'testing' stamp: 'sma 2/5/2000 12:34'!\\\\nisKeyword\\\\n\\\\t\\\\\\\"Answer whether the receiver is a message keyword.\\\\\\\"\\\\n\\\\n\\\\t^ self precedence == 3! !\\\\n\\\\n!Symbol methodsFor: 'testing' stamp: 'di 4/25/2000 12:32'!\\\\nisLiteral\\\\n\\\\t\\\\\\\"Answer whether the receiver is a valid Smalltalk literal.\\\\\\\"\\\\n\\\\n\\\\t^ true! !\\\\n\\\\n!Symbol methodsFor: 'testing' stamp: 'sma 2/5/2000 12:13'!\\\\nisPvtSelector\\\\n\\\\t\\\\\\\"Answer whether the receiver is a private message selector, that is,\\\\n\\\\tbegins with 'pvt' followed by an uppercase letter, e.g. pvtStringhash.\\\\\\\"\\\\n\\\\n\\\\t^ (self beginsWith: 'pvt') and: [self size >= 4 and: [(self at: 4) isUppercase]]! !\\\\n\\\\n!Symbol methodsFor: 'testing' stamp: 'md 4/30/2003 15:31'!\\\\nisSymbol\\\\n\\\\t^ true ! !\\\\n\\\\n!Symbol methodsFor: 'testing' stamp: 'sma 2/5/2000 12:34'!\\\\nisUnary\\\\n\\\\t\\\\\\\"Answer whether the receiver is an unary message selector.\\\\\\\"\\\\n\\\\n\\\\t^ self precedence == 1! !\\\\n\\\\n\\\\n!Symbol methodsFor: 'user interface' stamp: 'sma 11/12/2000 11:46'!\\\\nasExplorerString\\\\n\\\\t^ self printString! !\\\\n\\\\n\\\\n!Symbol methodsFor: 'private'!\\\\nerrorNoModification\\\\n\\\\n\\\\tself error: 'symbols can not be modified.'! !\\\\n\\\\n!Symbol methodsFor: 'private'!\\\\nstring: aString\\\\n\\\\n\\\\t1 to: aString size do: [:j | super at: j put: (aString at: j)].\\\\n\\\\t^self  ! !\\\\n\\\\n\\\\n!Symbol methodsFor: 'evaluating' stamp: 'md 3/24/2006 12:09'!\\\\nvalue: anObject \\\\n\\\\t^anObject perform: self.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSymbol class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!Symbol class methodsFor: 'access' stamp: 'ar 4/10/2005 22:49'!\\\\nallSymbols\\\\n\\\\t\\\\\\\"Answer all interned symbols\\\\\\\"\\\\n\\\\t^Array streamContents:[:s|\\\\n\\\\t\\\\ts nextPutAll: NewSymbols.\\\\n\\\\t\\\\ts nextPutAll: OneCharacterSymbols.\\\\n\\\\t\\\\ts nextPutAll: SymbolTable.\\\\n\\\\t].\\\\n! !\\\\n\\\\n!Symbol class methodsFor: 'access' stamp: 'yo 11/3/2004 19:24'!\\\\nselectorsContaining: aString\\\\n\\\\t\\\\\\\"Answer a list of selectors that contain aString within them. Case-insensitive.  Does return symbols that begin with a capital letter.\\\\\\\"\\\\n\\\\n\\\\t| size selectorList ascii |\\\\n\\\\n\\\\tselectorList _ OrderedCollection new.\\\\n\\\\t(size _ aString size) = 0 ifTrue: [^selectorList].\\\\n\\\\n\\\\taString size = 1 ifTrue:\\\\n\\\\t\\\\t[\\\\n\\\\t\\\\t\\\\tascii _ aString first asciiValue.\\\\n\\\\t\\\\t\\\\tascii < 128 ifTrue: [selectorList add: (OneCharacterSymbols at: ascii+1)]\\\\n\\\\t\\\\t].\\\\n\\\\n\\\\taString first isLetter ifFalse:\\\\n\\\\t\\\\t[\\\\n\\\\t\\\\t\\\\taString size == 2 ifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t[Symbol hasInterned: aString ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:s | selectorList add: s]].\\\\n\\\\t\\\\t\\\\t^selectorList\\\\n\\\\t\\\\t].\\\\n\\\\n\\\\tselectorList _ selectorList copyFrom: 2 to: selectorList size.\\\\n\\\\n\\\\tself allSymbolTablesDo: [:each |\\\\n\\\\t\\\\teach size >= size ifTrue:\\\\n\\\\t\\\\t\\\\t[(each findSubstring: aString in: each startingAt: 1 \\\\n\\\\t\\\\t\\\\t\\\\tmatchTable: CaseInsensitiveOrder) > 0\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [selectorList add: each]]].\\\\n\\\\n\\\\t^selectorList reject: [:each | \\\\\\\"reject non-selectors, but keep ones that begin with an uppercase\\\\\\\"\\\\n\\\\t\\\\teach numArgs < 0 and: [each asString withFirstCharacterDownshifted numArgs < 0]].\\\\n\\\\n\\\\\\\"Symbol selectorsContaining: 'scon'\\\\\\\"! !\\\\n\\\\n!Symbol class methodsFor: 'access' stamp: 'tween 9/13/2004 10:09'!\\\\nthatStartsCaseSensitive: leadingCharacters skipping: skipSym\\\\n\\\\t\\\\\\\"Same as thatStarts:skipping: but caseSensitive\\\\\\\"\\\\n\\\\t| size firstMatch key |\\\\n\\\\n\\\\tsize := leadingCharacters size.\\\\n\\\\tsize = 0 ifTrue: [^skipSym ifNil: [#''] ifNotNil: [nil]].\\\\n\\\\tfirstMatch := leadingCharacters at: 1.\\\\n\\\\tsize > 1 ifTrue: [key := leadingCharacters copyFrom: 2 to: size].\\\\n\\\\tself allSymbolTablesDo: [:each |\\\\n\\\\t\\\\t\\\\teach size >= size ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t((each at: 1) == firstMatch and:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[key == nil or:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[(each findString: key startingAt: 2 caseSensitive: true) = 2]])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [^each]\\\\n\\\\t\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t] after: skipSym.\\\\n\\\\n\\\\t^nil\\\\n! !\\\\n\\\\n!Symbol class methodsFor: 'access' stamp: 'RAA 5/29/2001 14:35'!\\\\nthatStarts: leadingCharacters skipping: skipSym\\\\n\\\\t\\\\\\\"Answer a selector symbol that starts with leadingCharacters.\\\\n\\\\tSymbols beginning with a lower-case letter handled directly here.\\\\n\\\\tIgnore case after first char.\\\\n\\\\tIf skipSym is not nil, it is a previous answer; start searching after it.\\\\n\\\\tIf no symbols are found, answer nil.\\\\n\\\\tUsed by Alt-q (Command-q) routines\\\\\\\"\\\\n\\\\n\\\\t| size firstMatch key |\\\\n\\\\n\\\\tsize _ leadingCharacters size.\\\\n\\\\tsize = 0 ifTrue: [^skipSym ifNil: [#''] ifNotNil: [nil]].\\\\n\\\\n\\\\tfirstMatch _ leadingCharacters at: 1.\\\\n\\\\tsize > 1 ifTrue: [key _ leadingCharacters copyFrom: 2 to: size].\\\\n\\\\n\\\\tself allSymbolTablesDo: [:each |\\\\n\\\\t\\\\t\\\\teach size >= size ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t((each at: 1) == firstMatch and:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[key == nil or:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[(each findString: key startingAt: 2 caseSensitive: false) = 2]])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [^each]\\\\n\\\\t\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t] after: skipSym.\\\\n\\\\n\\\\t^nil\\\\n\\\\n\\\\\\\"Symbol thatStarts: 'sf' skipping: nil\\\\\\\"\\\\n\\\\\\\"Symbol thatStarts: 'sf' skipping: #sfpGetFile:with:with:with:with:with:with:with:with:\\\\\\\"\\\\n\\\\\\\"Symbol thatStarts: 'candidate' skipping: nil\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!Symbol class methodsFor: 'class initialization' stamp: 'RAA 5/29/2001 08:21'!\\\\nallSymbolTablesDo: aBlock\\\\n\\\\n\\\\tNewSymbols do: aBlock.\\\\n\\\\tSymbolTable do: aBlock.! !\\\\n\\\\n!Symbol class methodsFor: 'class initialization' stamp: 'RAA 5/29/2001 14:35'!\\\\nallSymbolTablesDo: aBlock after: aSymbol\\\\n\\\\n\\\\tNewSymbols do: aBlock after: aSymbol.\\\\n\\\\tSymbolTable do: aBlock after: aSymbol.! !\\\\n\\\\n!Symbol class methodsFor: 'class initialization' stamp: 'RAA 12/17/2000 18:05'!\\\\ncompactSymbolTable\\\\n\\\\t\\\\\\\"Reduce the size of the symbol table so that it holds all existing symbols + 25% (changed from 1000 since sets like to have 25% free and the extra space would grow back in a hurry)\\\\\\\"\\\\n\\\\n\\\\t| oldSize |\\\\n\\\\n\\\\tSmalltalk garbageCollect.\\\\n\\\\toldSize _ SymbolTable array size.\\\\n\\\\tSymbolTable growTo: SymbolTable size * 4 // 3 + 100.\\\\n\\\\t^oldSize printString,'  ',(oldSize - SymbolTable array size) printString, ' slot(s) reclaimed'! !\\\\n\\\\n!Symbol class methodsFor: 'class initialization' stamp: 'RAA 5/29/2001 09:04'!\\\\ninitialize\\\\n\\\\n\\\\t\\\\\\\"Symbol initialize\\\\\\\"\\\\n\\\\n\\\\tSymbol rehash.\\\\n\\\\tOneCharacterSymbols _ nil.\\\\n\\\\tOneCharacterSymbols _ (1 to: 256) collect: [ :i | (i - 1) asCharacter asSymbol].\\\\n\\\\tSmalltalk addToShutDownList: self.\\\\n! !\\\\n\\\\n\\\\n!Symbol class methodsFor: 'instance creation'!\\\\nfindInterned:aString\\\\n\\\\n\\\\tself hasInterned:aString ifTrue:[:symbol| ^symbol].\\\\n\\\\t^nil.! !\\\\n\\\\n!Symbol class methodsFor: 'instance creation' stamp: 'ar 4/10/2005 23:04'!\\\\ninternCharacter: aCharacter\\\\n\\\\taCharacter asciiValue > 256 ifTrue:[^self intern: aCharacter asString].\\\\n\\\\tOneCharacterSymbols ifNil: [^self intern: aCharacter asString].\\\\n\\\\t^OneCharacterSymbols at: aCharacter asciiValue + 1\\\\n! !\\\\n\\\\n!Symbol class methodsFor: 'instance creation' stamp: 'ar 4/12/2005 17:37'!\\\\nintern: aStringOrSymbol \\\\n\\\\n\\\\t^(self lookup: aStringOrSymbol) ifNil:[\\\\n\\\\t\\\\t| aClass aSymbol |\\\\n\\\\t\\\\taStringOrSymbol isSymbol ifTrue:[\\\\n\\\\t\\\\t\\\\taSymbol _ aStringOrSymbol.\\\\n\\\\t\\\\t] ifFalse:[\\\\n\\\\t\\\\t\\\\taClass := aStringOrSymbol isOctetString ifTrue:[ByteSymbol] ifFalse:[WideSymbol].\\\\n\\\\t\\\\t\\\\taSymbol := aClass new: aStringOrSymbol size.\\\\n\\\\t\\\\t\\\\taSymbol string: aStringOrSymbol.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tNewSymbols add: aSymbol.\\\\n\\\\t\\\\taSymbol].! !\\\\n\\\\n!Symbol class methodsFor: 'instance creation' stamp: 'RAA 5/29/2001 08:09'!\\\\nlookup: aStringOrSymbol\\\\n\\\\n\\\\t^(SymbolTable like: aStringOrSymbol) ifNil: [\\\\n\\\\t\\\\tNewSymbols like: aStringOrSymbol\\\\n\\\\t]! !\\\\n\\\\n!Symbol class methodsFor: 'instance creation'!\\\\nnewFrom: aCollection \\\\n\\\\t\\\\\\\"Answer an instance of me containing the same elements as aCollection.\\\\\\\"\\\\n\\\\n\\\\t^ (aCollection as: String) asSymbol\\\\n\\\\n\\\\\\\"\\\\tSymbol newFrom: {$P. $e. $n}\\\\n\\\\t{$P. $e. $n} as: Symbol\\\\n\\\\\\\"! !\\\\n\\\\n!Symbol class methodsFor: 'instance creation' stamp: 'di 10/11/1999 00:02'!\\\\nreadFrom: strm  \\\\\\\"Symbol readFromString: '#abc'\\\\\\\"\\\\n\\\\n\\\\tstrm peek = $# ifFalse: [self error: 'Symbols must be introduced by #'].\\\\n\\\\t^ (Scanner new scan: strm) advance  \\\\\\\"Just do what the code scanner does\\\\\\\"! !\\\\n\\\\n\\\\n!Symbol class methodsFor: 'private' stamp: 'ar 4/10/2005 22:43'!\\\\nhasInterned: aString ifTrue: symBlock \\\\n\\\\t\\\\\\\"Answer with false if aString hasnt been interned (into a Symbol),  \\\\n\\\\totherwise supply the symbol to symBlock and return true.\\\\\\\"\\\\n\\\\n\\\\t| symbol |\\\\n\\\\t^ (symbol _ self lookup: aString)\\\\n\\\\t\\\\tifNil: [false]\\\\n\\\\t\\\\tifNotNil: [symBlock value: symbol.\\\\n\\\\t\\\\t\\\\ttrue]! !\\\\n\\\\n!Symbol class methodsFor: 'private' stamp: 'RAA 5/29/2001 14:33'!\\\\npossibleSelectorsFor: misspelled \\\\n\\\\t\\\\\\\"Answer an ordered collection of possible corrections\\\\n\\\\tfor the misspelled selector in order of likelyhood\\\\\\\"\\\\n\\\\n\\\\t| numArgs candidates lookupString best binary short long first ss |\\\\n\\\\tlookupString _ misspelled asLowercase. \\\\\\\"correct uppercase selectors to lowercase\\\\\\\"\\\\n\\\\tnumArgs _ lookupString numArgs.\\\\n\\\\t(numArgs < 0 or: [lookupString size < 2]) ifTrue: [^ OrderedCollection new: 0].\\\\n\\\\tfirst _ lookupString first.\\\\n\\\\tshort _ lookupString size - (lookupString size // 4 max: 3) max: 2.\\\\n\\\\tlong _ lookupString size + (lookupString size // 4 max: 3).\\\\n\\\\n\\\\t\\\\\\\"First assemble candidates for detailed scoring\\\\\\\"\\\\n\\\\tcandidates _ OrderedCollection new.\\\\n\\\\tself allSymbolTablesDo: [:s | (((ss _ s size) >= short\\\\t\\\\\\\"not too short\\\\\\\"\\\\n\\\\t\\\\t\\\\tand: [ss <= long\\\\t\\\\t\\\\t\\\\\\\"not too long\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tor: [(s at: 1) = first]])\\\\t\\\\\\\"well, any length OK if starts w/same letter\\\\\\\"\\\\n\\\\t\\\\t\\\\tand: [s numArgs = numArgs])\\\\t\\\\\\\"and numArgs is the same\\\\\\\"\\\\n\\\\t\\\\t\\\\tifTrue: [candidates add: s]].\\\\n\\\\n\\\\t\\\\\\\"Then further prune these by correctAgainst:\\\\\\\"\\\\n\\\\tbest _ lookupString correctAgainst: candidates.\\\\n\\\\t((misspelled last ~~ $:) and: [misspelled size > 1]) ifTrue: [\\\\n\\\\t\\\\tbinary _ misspelled, ':'.\\\\t\\\\t\\\\\\\"try for missing colon\\\\\\\"\\\\n\\\\t\\\\tSymbol hasInterned: binary ifTrue: [:him | best addFirst: him]].\\\\n\\\\t^ best! !\\\\n\\\\n!Symbol class methodsFor: 'private' stamp: 'ar 9/27/2005 20:01'!\\\\nrehash\\\\t\\\\t\\\\\\\"Symbol rehash\\\\\\\"\\\\n\\\\t\\\\\\\"Rebuild the hash table, reclaiming unreferenced Symbols.\\\\\\\"\\\\n\\\\n\\\\tSymbolTable := WeakSet withAll: self allSubInstances.\\\\n\\\\tNewSymbols := WeakSet new.! !\\\\n\\\\n!Symbol class methodsFor: 'private' stamp: 'RAA 5/29/2001 09:04'!\\\\nshutDown: aboutToQuit\\\\n\\\\n\\\\tSymbolTable addAll: NewSymbols.\\\\n\\\\tNewSymbols _ WeakSet new.! !\\\\nKeyboardInputInterpreter subclass: #SymbolInputInterpreter\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Multilingual-TextConversion'!\\\\n\\\\n!SymbolInputInterpreter methodsFor: 'as yet unclassified' stamp: 'ar 4/10/2005 16:10'!\\\\nnextCharFrom: sensor firstEvt: evtBuf\\\\n\\\\n\\\\t| keyValue |\\\\n\\\\tkeyValue := evtBuf third.\\\\n\\\\tevtBuf fifth > 1 ifTrue: [^ keyValue asCharacter macToSqueak].\\\\n\\\\t^ (self symbolKeyValueToUnicode: keyValue) asCharacter.\\\\n! !\\\\n\\\\n!SymbolInputInterpreter methodsFor: 'as yet unclassified' stamp: 'yo 11/8/2004 18:53'!\\\\nsymbolKeyValueToUnicode: keyValue\\\\n\\\\n\\\\tkeyValue = 127 ifTrue: [^ 127].\\\\n\\\\tkeyValue < 32 ifTrue: [^ keyValue].\\\\n\\\\tkeyValue > 255 ifTrue: [^ 0].\\\\n\\\\t^ #(0 0 0 0 0 0 0 0 0 61472 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61472 61473 61474 61475 61476 61477 61478 61479 61480 61481 61482 61483 61484 61485 61486 61487 61488 61489 61490 61491 61492 61493 61494 61495 61496 61497 61498 61499 61500 61501 61502 61503 61504 61505 61506 61507 61508 61509 61510 61511 61512 61513 61514 61515 61516 61517 61518 61519 61520 61521 61522 61523 61524 61525 61526 61527 61528 61529 61530 61531 61532 61533 61534 61535 61536 61537 61538 61539 61540 61541 61542 61543 61544 61545 61546 61547 61548 61549 61550 61551 61552 61553 61554 61555 61556 61557 61558 61559 61560 61561 61562 61563 61564 61565 61566 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61601 61602 61603 61604 61605 61606 61607 61608 61609 61610 61611 61612 61613 61614 61615 61616 61617 61618 61619 61620 61621 61622 61623 61624 61625 61626 61627 61628 61629 61630 61631 61632 61633 61634 61635 61636 61637 61638 61639 61640 61641 61642 61643 61644 61645 61646 61647 61648 61649 61650 61651 61652 61653 61654 61655 61656 61657 61658 61659 61660 61661 61662 61663 61664 61665 61666 61667 61668 61669 61670 61671 61672 61673 61674 61675 61676 61677 61678 61679 0 61681 61682 61683 61684 61685 61686 61687 61688 61689 61690 61691 61692 61693 61694 0) at: keyValue + 1.\\\\n! !\\\\nTileMorph subclass: #SymbolListTile\\\\n\\\\tinstanceVariableNames: 'choices dataType'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'EToys-Scripting Tiles'!\\\\n!SymbolListTile commentStamp: '<historical>' prior: 0!\\\\nInstances of SymbolListTile are literal tiles whose literals are choosable from a finite list.!\\\\n\\\\n\\\\n!SymbolListTile methodsFor: 'accessing' stamp: 'yo 7/2/2004 21:27'!\\\\nliteral: anObject\\\\n\\\\t\\\\\\\"Set the receiver's literal as indicated\\\\\\\"\\\\n\\\\tself flag: #yo.\\\\n\\\\n\\\\tliteral _ anObject asSymbol.\\\\n\\\\tself updateLiteralLabel.\\\\n\\\\\\\"\\\\n\\\\tkey _ Vocabulary eToyVocabulary translationKeyFor: literal.\\\\n\\\\tkey isNil ifFalse: [literal _ key].\\\\n\\\\\\\"\\\\n\\\\tself flag: #deferred.  \\\\\\\"The below formerly was necessary but now is problematical, leading to low-space condition etc.  May need to revisit, since as I comment this out now I am uncertain what if anything this may break\\\\\\\"\\\\n\\\\t\\\\\\\"self labelMorph informTarget\\\\\\\"\\\\n\\\\n! !\\\\n\\\\n!SymbolListTile methodsFor: 'accessing' stamp: 'tak 12/6/2004 01:58'!\\\\noptions\\\\n\\\\t^ {self choices. self choices\\\\n\\\\t\\\\tcollect: [:each | ScriptingSystem helpStringForOperator: literal]}! !\\\\n\\\\n!SymbolListTile methodsFor: 'accessing' stamp: 'tak 12/7/2004 14:42'!\\\\nvalue: anObject \\\\n\\\\tself acceptNewLiteral: anObject! !\\\\n\\\\n\\\\n!SymbolListTile methodsFor: 'customevents-accessing' stamp: 'nk 7/21/2003 22:02'!\\\\ndataType\\\\n\\\\t^dataType! !\\\\n\\\\n\\\\n!SymbolListTile methodsFor: 'customevents-initialization' stamp: 'nk 7/21/2003 22:14'!\\\\nupdateChoices\\\\n\\\\tchoices _ (Vocabulary vocabularyNamed: dataType) choices.\\\\n\\\\t(choices includes: literal) ifFalse: [ literal _ choices first. self changed ]! !\\\\n\\\\n\\\\n!SymbolListTile methodsFor: 'event handling' stamp: 'sw 12/3/2001 21:30'!\\\\nhandlesMouseDown: evt\\\\n\\\\t\\\\\\\"Answer whether the receiver handles mouse-down\\\\\\\"\\\\n\\\\n\\\\t^ true! !\\\\n\\\\n!SymbolListTile methodsFor: 'event handling' stamp: 'sw 11/16/2001 07:31'!\\\\nwantsKeyboardFocusFor: aSubmorph\\\\n\\\\t\\\\\\\"Answer whether a plain mouse click on aSubmorph, a text-edit-capable thing, should result in a text selection there\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!SymbolListTile methodsFor: 'events-processing' stamp: 'sw 12/3/2001 20:45'!\\\\nmouseDownPriority\\\\n\\\\t\\\\\\\"Higher-priority than parts donor, so that the tile can offer a popup even when it is in a larger structure, such as a PhraseTileMorph, that itself behaves as a parts donor\\\\\\\"\\\\n\\\\n\\\\t^ 75! !\\\\n\\\\n\\\\n!SymbolListTile methodsFor: 'initialization' stamp: 'sw 10/30/2000 09:04'!\\\\nchoices: choiceList dataType: aDataType\\\\n\\\\t\\\\\\\"Initialize the receiver with the given choice-list and data type\\\\\\\"\\\\n\\\\n\\\\tchoices _ choiceList.\\\\n\\\\tdataType _ aDataType.\\\\n\\\\tliteral _ choiceList first! !\\\\n\\\\n!SymbolListTile methodsFor: 'initialization' stamp: 'tak 12/6/2004 01:38'!\\\\ninitialize\\\\n\\\\tsuper initialize.\\\\n\\\\tliteral _ #nothing! !\\\\n\\\\n\\\\n!SymbolListTile methodsFor: 'misc' stamp: 'sw 11/6/2001 13:30'!\\\\nsetLiteralInitially: anObject\\\\n\\\\t\\\\\\\"Establish the initial literal.  Get the label correct, but do *not* send the value back to the target via the setter (unlike #literal:)\\\\\\\"\\\\n\\\\n\\\\tliteral _ anObject ifNotNil: [anObject asSymbol].\\\\n\\\\tself updateLiteralLabel! !\\\\n\\\\n\\\\n!SymbolListTile methodsFor: 'player viewer' stamp: 'yo 1/12/2005 14:28'!\\\\nupdateLiteralLabel\\\\n\\\\t\\\\\\\"Update the wording emblazoned on the tile, if needed.  Copied down, for jimmying, unfortunately\\\\\\\"\\\\n\\\\n\\\\t| myLabel |\\\\n\\\\t(myLabel _ self labelMorph) ifNil: [^ self].\\\\n\\\\tmyLabel useSymbolFormat.\\\\n\\\\tmyLabel acceptValue: literal asString.\\\\n\\\\tself changed.! !\\\\n\\\\n\\\\n!SymbolListTile methodsFor: 'user interface' stamp: 'yo 1/12/2005 14:38'!\\\\nacceptNewLiteral: aLiteral\\\\n\\\\t\\\\\\\"Accept the new literal\\\\\\\"\\\\n\\\\n\\\\tself labelMorph useSymbolFormat.\\\\n\\\\tself literal: aLiteral.\\\\n\\\\tself adjustHelpMessage.\\\\n\\\\tself acceptNewLiteral.  \\\\\\\"so tile scriptor can recompile if necessary\\\\\\\"\\\\n\\\\tself labelMorph informTarget\\\\n! !\\\\n\\\\n!SymbolListTile methodsFor: 'user interface' stamp: 'sw 3/10/2004 23:24'!\\\\nadjustHelpMessage\\\\n\\\\t\\\\\\\"Adjust the help message to reflect the new literal\\\\\\\"\\\\n\\\\n\\\\t(ScriptingSystem helpStringOrNilForOperator: literal) ifNotNilDo:\\\\n\\\\t\\\\t[:aString |\\\\n\\\\t\\\\t\\\\tself labelMorph setBalloonText: aString]! !\\\\n\\\\n!SymbolListTile methodsFor: 'user interface' stamp: 'sw 12/21/2003 00:07'!\\\\nchoices\\\\n\\\\t\\\\\\\"Answer the list of current choices for the receiver's symbol\\\\\\\"\\\\n\\\\n\\\\tdataType == #ScriptName ifTrue: \\\\\\\"Backward compatibility with old tiles\\\\\\\"\\\\n\\\\t\\\\t[^ ActiveWorld presenter allKnownUnaryScriptSelectors].\\\\n\\\\t^ choices! !\\\\n\\\\n!SymbolListTile methodsFor: 'user interface' stamp: 'sw 1/4/2005 00:16'!\\\\nofferAllChoicesInAPopUp\\\\n\\\\t\\\\\\\"Retained in deference to pre-existing content that may have event handlers that send this message.\\\\\\\"\\\\n\\\\n\\\\t! !\\\\n\\\\n\\\\n!SymbolListTile methodsFor: 'private' stamp: 'yo 1/12/2005 14:28'!\\\\nline1: line1\\\\n\\\\t\\\\\\\"Emblazon the receiver with the requested label.  If the receiver already has a label, make the new label be of the same class\\\\\\\"\\\\n\\\\n\\\\tsuper line1: line1.\\\\n\\\\tself labelMorph useSymbolFormat! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSymbolListTile class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SymbolListTile class methodsFor: 'customevents-updating' stamp: 'nk 7/21/2003 22:16'!\\\\nupdateAllTilesForVocabularyNamed: aVocabularyName\\\\n\\\\t\\\\\\\"The choices in the Vocabulary named aVocabularyName may have changed.\\\\n\\\\tUpdate my subinstances if necessary to reflect the changes.\\\\\\\"\\\\n\\\\n\\\\t (self allSubInstances select: [ :ea | ea dataType = aVocabularyName ])\\\\n\\\\t\\\\tdo: [ :ea | ea updateChoices ] ! !\\\\nDataType subclass: #SymbolListType\\\\n\\\\tinstanceVariableNames: 'symbols'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Protocols-Type Vocabularies'!\\\\n!SymbolListType commentStamp: 'sw 1/6/2005 17:52' prior: 0!\\\\nA type whose values range across a finite set of symbols, which are held in the \\\\\\\"symbols\\\\\\\" instance variable.!\\\\n\\\\n\\\\n!SymbolListType methodsFor: 'initial value' stamp: 'sw 12/3/2001 19:27'!\\\\ninitialValueForASlotFor: aPlayer\\\\n\\\\t\\\\\\\"Answer the value to give initially to a newly created slot of the given type in the given player\\\\\\\"\\\\n\\\\n\\\\t^ self choices first! !\\\\n\\\\n\\\\n!SymbolListType methodsFor: 'tiles' stamp: 'sw 12/3/2001 19:14'!\\\\nchoices\\\\n\\\\t\\\\\\\"answer the list of choices to offer as variant values\\\\\\\"\\\\n\\\\n\\\\t^ symbols copy! !\\\\n\\\\n!SymbolListType methodsFor: 'tiles' stamp: 'sw 1/6/2005 17:24'!\\\\nrepresentsAType\\\\n\\\\t\\\\\\\"Answer whether this vocabulary represents an end-user-sensible data type\\\\\\\"\\\\n\\\\n\\\\t^ #(BorderStyle ButtonPhase TrailStyle) includes: vocabularyName! !\\\\n\\\\n!SymbolListType methodsFor: 'tiles' stamp: 'stephaneducasse 2/4/2006 20:39'!\\\\nsymbols: symbolList\\\\n\\\\t\\\\\\\"Set the receiver's list of symbols as indicated\\\\\\\"\\\\n\\\\n\\\\tsymbols := symbolList! !\\\\n\\\\n\\\\n!SymbolListType methodsFor: '*eToys-tiles' stamp: 'sw 1/12/2005 10:13'!\\\\naffordsCoercionToBoolean\\\\n\\\\t\\\\\\\"Answer true if a tile of this data type, when dropped into a pane that demands a boolean, could plausibly be expanded into a comparison (of the form  frog < toad   or frog = toad) to provide a boolean expression\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Formerly this had been disabled (9/27/01) but from today's perspective I don't see any reason to disable it...\\\\\\\"\\\\n\\\\n\\\\t^ true! !\\\\n\\\\n!SymbolListType methodsFor: '*eToys-tiles' stamp: 'sw 12/3/2001 19:15'!\\\\ndefaultArgumentTile\\\\n\\\\t\\\\\\\"Answer a tile to represent the type\\\\\\\"\\\\n\\\\n\\\\t| aTile choices |\\\\n\\\\taTile _ SymbolListTile new choices: (choices _ self choices) dataType: self vocabularyName.\\\\n\\\\taTile addArrows.\\\\n\\\\taTile setLiteral: choices first.\\\\n\\\\t^ aTile! !\\\\n\\\\n!SymbolListType methodsFor: '*eToys-tiles' stamp: 'sw 12/3/2001 21:00'!\\\\nnewReadoutTile\\\\n\\\\t\\\\\\\"Answer a tile that can serve as a readout for data of this type\\\\\\\"\\\\n\\\\n\\\\t^ SymbolListTile new choices: self choices dataType: self vocabularyName\\\\n! !\\\\nClassTestCase subclass: #SymbolTest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'CollectionsTests-Text'!\\\\n!SymbolTest commentStamp: '<historical>' prior: 0!\\\\nThis is the unit test for the class Symbol. Unit tests are a good way to exercise the functionality of your system in a repeatable and automatic manner. They are therefore recommended if you plan to release anything. For more information, see: \\\\n\\\\t- http://www.c2.com/cgi/wiki?UnitTest\\\\n\\\\t- http://minnow.cc.gatech.edu/squeak/1547\\\\n\\\\t- the sunit class category!\\\\n\\\\n\\\\n!SymbolTest methodsFor: 'tests' stamp: 'md 9/6/2005 20:02'!\\\\ntestAsMutator\\\\n\\\\n\\\\tself assert: #x asMutator = #x:.\\\\n\\\\tself assert: #x asMutator isSymbol! !\\\\n\\\\n!SymbolTest methodsFor: 'tests' stamp: 'sd 6/5/2005 09:29'!\\\\ntestCapitalized\\\\n\\\\n\\\\t| uc lc |\\\\t\\\\t\\\\n\\\\tuc := #MElViN.\\\\n\\\\tlc := #mElViN.\\\\n\\\\tself assert:  lc capitalized = uc.\\\\n\\\\tself assert: uc capitalized = uc.\\\\n! !\\\\n\\\\n!SymbolTest methodsFor: 'tests' stamp: 'sd 6/5/2005 09:29'!\\\\ntestWithFirstCharacterDownshifted\\\\n\\\\n\\\\t| uc lc empty |\\\\t\\\\t\\\\n\\\\tuc := #MElViN.\\\\n\\\\tlc := #mElViN.\\\\n\\\\tempty := #' '.\\\\n\\\\tself assert:  uc withFirstCharacterDownshifted = lc.\\\\n\\\\tself assert: lc withFirstCharacterDownshifted = lc.\\\\n\\\\t\\\\n! !\\\\n\\\\n\\\\n!SymbolTest methodsFor: 'as yet unclassified' stamp: 'md 2/16/2006 17:17'!\\\\ntestNumArgs2\\\\n    \\\\\\\"TODO: need to be extended to support shrinking and for selectors like #+ \\\\\\\" \\\\n\\\\t\\\\n\\\\tself assert: (#test numArgs: 0) = #test.\\\\n\\\\tself assert: (#test numArgs: 1) = #test:.\\\\n\\\\tself assert: (#test numArgs: 2) = #test:with:.\\\\n\\\\tself assert: (#test numArgs: 3) = #test:with:with:.\\\\n\\\\t\\\\n\\\\n\\\\tself assert: (#test: numArgs: 0) = #test:.\\\\n\\\\tself assert: (#test: numArgs: 1) = #test:.\\\\n\\\\tself assert: (#test: numArgs: 2) = #test:with:.\\\\n\\\\tself assert: (#test: numArgs: 3) = #test:with:with:.\\\\n\\\\t\\\\n\\\\tself assert: (#test:with: numArgs: 0) = #test:with:.\\\\n\\\\tself assert: (#test:with: numArgs: 1) = #test:with:.\\\\n\\\\tself assert: (#test:with: numArgs: 2) = #test:with:.\\\\n\\\\tself assert: (#test:with: numArgs: 3) = #test:with:with:.\\\\n\\\\tself assert: (#test:with: numArgs: 4) = #test:with:with:with:.\\\\n\\\\t\\\\n\\\\tself assert: (#test:with:with: numArgs: 0) = #test:with:with:.\\\\n\\\\tself assert: (#test:with:with: numArgs: 1) = #test:with:with:.\\\\n\\\\tself assert: (#test:with:with: numArgs: 2) = #test:with:with:.\\\\n\\\\tself assert: (#test:with:with: numArgs: 3) = #test:with:with:.\\\\n\\\\tself assert: (#test:with:with: numArgs: 4) = #test:with:with:with:.! !\\\\nObject subclass: #SyntaxAttribute\\\\n\\\\tinstanceVariableNames: 'color emphasis attributeList'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Compiler-Support'!\\\\n!SyntaxAttribute commentStamp: '<historical>' prior: 0!\\\\nRepresents a color and possibly a style attribute to be applied to a syntactic element for pretty-printing.  The attributeList inst var is a cache.!\\\\n\\\\n\\\\n!SyntaxAttribute methodsFor: 'accessing' stamp: 'sw 11/17/1999 15:04'!\\\\nattributeList\\\\n\\\\t\\\\\\\"Answer a list of text attributes that characterize the receiver\\\\\\\"\\\\n\\\\tattributeList ifNil:\\\\n\\\\t\\\\t[attributeList _ OrderedCollection new: 2.\\\\n\\\\t\\\\tcolor ifNotNil: [attributeList add: (TextColor color: color)].\\\\n\\\\t\\\\temphasis ifNotNil: [attributeList add: (TextEmphasis perform: emphasis)]].\\\\n\\\\t^ attributeList! !\\\\n\\\\n!SyntaxAttribute methodsFor: 'accessing' stamp: 'djp 11/7/1999 14:52'!\\\\ncolor\\\\n\\\\n\\\\t^ color! !\\\\n\\\\n!SyntaxAttribute methodsFor: 'accessing' stamp: 'sw 11/16/1999 16:21'!\\\\ncolor: aTextColor\\\\n\\\\tcolor _ aTextColor.\\\\n\\\\tattributeList _ nil! !\\\\n\\\\n!SyntaxAttribute methodsFor: 'accessing' stamp: 'djp 11/7/1999 14:52'!\\\\nemphasis\\\\n\\\\n\\\\t^ emphasis! !\\\\n\\\\n!SyntaxAttribute methodsFor: 'accessing' stamp: 'sw 11/16/1999 16:22'!\\\\nemphasis: aTextEmphasis\\\\n\\\\temphasis _ aTextEmphasis.\\\\n\\\\tattributeList _ nil! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSyntaxAttribute class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SyntaxAttribute class methodsFor: 'as yet unclassified' stamp: 'sw 11/16/1999 12:01'!\\\\ncolor: aColor emphasis: anEmphasis\\\\n\\\\t^ self new color: aColor; emphasis: anEmphasis; yourself! !\\\\nStringHolder subclass: #SyntaxError\\\\n\\\\tinstanceVariableNames: 'class selector category debugger doitFlag'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Tools-Debugger'!\\\\n!SyntaxError commentStamp: '<historical>' prior: 0!\\\\nI represent syntax error report for syntax errors encountered when filing in class descriptions from a non-interactive source such as an external file. As a StringHolder, the string to be viewed is the method code or expression containing the error.\\\\n\\\\nThe user may fix the error and accept the method to continue the fileIn.\\\\n!\\\\n\\\\n\\\\n!SyntaxError methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:27'!\\\\ncategory: aSymbol\\\\n\\\\t\\\\\\\"Record the message category of method being compiled. This is used when the user corrects the error and accepts.\\\\\\\"\\\\n\\\\n\\\\tcategory := aSymbol.\\\\n! !\\\\n\\\\n!SyntaxError methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:30'!\\\\nsetClass: aClass code: aString debugger: aDebugger doitFlag: flag\\\\n\\\\n\\\\t| types printables badChar |\\\\n\\\\tclass := aClass.\\\\n\\\\tdebugger := aDebugger.\\\\n\\\\tselector := aClass parserClass new parseSelector: aString.\\\\n\\\\ttypes := Scanner classPool at: #TypeTable.\\\\t\\\\\\\"dictionary\\\\\\\"\\\\n\\\\tprintables := '!!@#$%&*-_=+<>{}?/\\\\\\\\,\\\\U00b7\\\\U00a3\\\\U00a2\\\\U00a7\\\\U00b6\\\\U00aa\\\\U00ba\\\\U0096\\\\U0097\\\\U0093\\\\U0091\\\\U0094\\\\U0092\\\\U0085\\\\U00da\\\\U00e6\\\\U00da\\\\U00af\\\\U00d7\\\\U00bf\\\\U00ab\\\\U00bb`~`' asSet.\\\\n\\\\tbadChar := aString detect: [:aChar | (types at: aChar asciiValue ifAbsent: [#xLetter]) == #xBinary and: [\\\\n\\\\t\\\\t\\\\t(printables includes: aChar) not]] ifNone: [nil].\\\\n\\\\tcontents := badChar \\\\n\\\\t\\\\tifNil: [aString]\\\\n\\\\t\\\\tifNotNil: ['<<<This string contains a character (ascii value ', \\\\n\\\\t\\\\t\\\\tbadChar asciiValue printString,\\\\n\\\\t\\\\t\\\\t') that is not normally used in code>>> ', aString].\\\\n\\\\tcategory ifNil: [category := aClass organization categoryOfElement: selector].\\\\n\\\\tcategory ifNil: [category := ClassOrganizer default].\\\\n\\\\tdoitFlag := flag! !\\\\n\\\\n\\\\n!SyntaxError methodsFor: 'menu' stamp: 'RAA 12/1/2000 14:24'!\\\\ndebug\\\\n\\\\t\\\\\\\"Show the stack of the process leading to this syntax editor, typically showing the stack of the compiler as called from fileIn.\\\\\\\"\\\\n\\\\n\\\\tdebugger openFullNoSuspendLabel: 'Stack of the Syntax Error'.\\\\n\\\\tSmalltalk isMorphic ifFalse: [Processor terminateActive].\\\\n! !\\\\n\\\\n!SyntaxError methodsFor: 'menu' stamp: 'jm 5/3/1998 14:22'!\\\\nlistMenu: aMenu\\\\n\\\\n\\\\t^ aMenu labels:\\\\n'proceed\\\\ndebug calling process\\\\nbrowse full'\\\\n\\\\tlines: #()\\\\n\\\\tselections: #(proceed debug browseMethodFull)\\\\n! !\\\\n\\\\n!SyntaxError methodsFor: 'menu' stamp: 'di 5/5/1998 00:06'!\\\\nproceed\\\\n\\\\t\\\\\\\"The user has has edited and presumably fixed the syntax error and the filein can now proceed.\\\\\\\"\\\\n\\\\n\\\\tdebugger proceed: self topView.\\\\n! !\\\\n\\\\n\\\\n!SyntaxError methodsFor: 'message list' stamp: 'tk 4/19/1999 08:08'!\\\\nlist\\\\n\\\\t\\\\\\\"Answer an array of one element made up of the class name, message category, and message selector in which the syntax error was found. This is the single item in the message list of a view/browser on the receiver.\\\\\\\"\\\\n\\\\n\\\\tselector ifNil: [^ Array with: (class name, '  ', category, '  ', '<none>')].\\\\n\\\\t^ Array with: (class name, '  ', category, '  ', selector)\\\\n! !\\\\n\\\\n!SyntaxError methodsFor: 'message list' stamp: 'jm 5/3/1998 13:48'!\\\\nlistIndex\\\\n\\\\t\\\\\\\"There is always exactly one element in my list and it is always selected.\\\\\\\"\\\\n\\\\n\\\\t^ 1\\\\n! !\\\\n\\\\n\\\\n!SyntaxError methodsFor: 'other' stamp: 'di 10/9/1998 16:36'!\\\\ncontents: aString notifying: aController\\\\n\\\\t\\\\\\\"Compile the code in aString and notify aController of any errors. If there are no errors, then automatically proceed.\\\\\\\"\\\\n\\\\n\\\\tdoitFlag\\\\n\\\\tifTrue: [Compiler new evaluate: aString in: nil to: nil\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnotifying: aController ifFail: [^ false]]\\\\n\\\\tifFalse: [(class compile: aString classified: category\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnotifying: aController) ifNil: [^ false]].\\\\n\\\\n\\\\taController hasUnacceptedEdits: false.\\\\n\\\\tself proceed! !\\\\n\\\\n!SyntaxError methodsFor: 'other' stamp: 'sd 11/20/2005 21:27'!\\\\nnotify: error at: location in: source\\\\n\\\\t\\\\\\\"Open a syntax error view, inserting the given error message into the given source at the given location. This message is sent to the 'requestor' when the parser or compiler finds a syntax error.\\\\\\\"\\\\n\\\\n\\\\t| aClass aString |\\\\n\\\\taClass := thisContext sender receiver encoder classEncoding.\\\\n\\\\taString :=\\\\n\\\\t\\\\tsource contents\\\\n\\\\t\\\\t\\\\tcopyReplaceFrom: location\\\\n\\\\t\\\\t\\\\tto: location - 1\\\\n\\\\t\\\\t\\\\twith: error.\\\\n\\\\tself setClass: aClass\\\\n\\\\t\\\\tcode: aString\\\\n\\\\t\\\\tdebugger: (Debugger context: thisContext)\\\\n\\\\t\\\\tdoitFlag: false.\\\\n\\\\tself class open: self.\\\\n! !\\\\n\\\\n\\\\n!SyntaxError methodsFor: 'text menu support' stamp: 'jm 5/3/1998 14:15'!\\\\nselectedClass\\\\n\\\\t\\\\\\\"Answer the class in which the syntax error occurred.\\\\\\\"\\\\n\\\\n\\\\t^ class\\\\n! !\\\\n\\\\n!SyntaxError methodsFor: 'text menu support' stamp: 'jm 5/3/1998 14:33'!\\\\nselectedClassOrMetaClass\\\\n\\\\t\\\\\\\"Answer the class of the method being compiled.\\\\\\\"\\\\n\\\\n\\\\t^ class\\\\n! !\\\\n\\\\n!SyntaxError methodsFor: 'text menu support' stamp: 'jm 5/3/1998 14:17'!\\\\nselectedMessageName\\\\n\\\\t\\\\\\\"Answer the selector of the method being compiled.\\\\\\\"\\\\n\\\\n\\\\t^ selector\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSyntaxError class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SyntaxError class methodsFor: 'instance creation' stamp: 'sd 11/20/2005 21:28'!\\\\nbuildMVCViewOn: aSyntaxError\\\\n\\\\t\\\\\\\"Answer an MVC view on the given SyntaxError.\\\\\\\"\\\\n\\\\n\\\\t| topView aListView aCodeView |\\\\n\\\\ttopView := StandardSystemView new\\\\n\\\\t\\\\tmodel: aSyntaxError;\\\\n\\\\t\\\\tlabel: 'Syntax Error';\\\\n\\\\t\\\\tminimumSize: 380@220.\\\\n\\\\n\\\\taListView := PluggableListView on: aSyntaxError\\\\n\\\\t\\\\tlist: #list\\\\n\\\\t\\\\tselected: #listIndex\\\\n\\\\t\\\\tchangeSelected: nil\\\\n\\\\t\\\\tmenu: #listMenu:.\\\\n\\\\taListView window: (0@0 extent: 380@20).\\\\n\\\\ttopView addSubView: aListView.\\\\n\\\\n\\\\taCodeView := PluggableTextView on: aSyntaxError\\\\n\\\\t\\\\ttext: #contents\\\\n\\\\t\\\\taccept: #contents:notifying:\\\\n\\\\t\\\\treadSelection: #contentsSelection\\\\n\\\\t\\\\tmenu: #codePaneMenu:shifted:.\\\\n\\\\taCodeView window: (0@0 extent: 380@200).\\\\n\\\\ttopView addSubView: aCodeView below: aListView.\\\\n\\\\n\\\\t^ topView\\\\n! !\\\\n\\\\n!SyntaxError class methodsFor: 'instance creation' stamp: 'sd 11/20/2005 21:28'!\\\\nbuildMorphicViewOn: aSyntaxError\\\\n\\\\t\\\\\\\"Answer an Morphic view on the given SyntaxError.\\\\\\\"\\\\n\\\\t| window |\\\\n\\\\twindow := (SystemWindow labelled: 'Syntax Error') model: aSyntaxError.\\\\n\\\\n\\\\twindow addMorph: (PluggableListMorph on: aSyntaxError list: #list\\\\n\\\\t\\\\t\\\\tselected: #listIndex changeSelected: nil menu: #listMenu:)\\\\n\\\\t\\\\tframe: (0@0 corner: 1@0.15).\\\\n\\\\n\\\\twindow addMorph: (PluggableTextMorph on: aSyntaxError text: #contents\\\\n\\\\t\\\\t\\\\taccept: #contents:notifying: readSelection: #contentsSelection\\\\n\\\\t\\\\t\\\\tmenu: #codePaneMenu:shifted:)\\\\n\\\\t\\\\tframe: (0@0.15 corner: 1@1).\\\\n\\\\n\\\\t^ window openInWorldExtent: 380@220! !\\\\n\\\\n!SyntaxError class methodsFor: 'instance creation' stamp: 'di 9/14/2001 07:46'!\\\\nerrorInClass: aClass withCode: codeString doitFlag: doit\\\\n\\\\t\\\\\\\"Open a view whose model is a syntax error. The error occurred when trying to add the given method code to the given class.\\\\\\\"\\\\n\\\\n\\\\tself open:\\\\n\\\\t\\\\t(self new setClass: aClass\\\\n\\\\t\\\\t\\\\tcode: codeString\\\\n\\\\t\\\\t\\\\tdebugger: (Debugger context: thisContext)\\\\n\\\\t\\\\t\\\\tdoitFlag: doit).\\\\n! !\\\\n\\\\n!SyntaxError class methodsFor: 'instance creation' stamp: 'sd 11/20/2005 21:28'!\\\\nopen: aSyntaxError\\\\n\\\\t\\\\\\\"Answer a standard system view whose model is an instance of me.\\\\\\\"\\\\n\\\\t| topView |\\\\n\\\\t<primitive: 19> \\\\\\\"Simulation guard\\\\\\\"\\\\n\\\\tSmalltalk isMorphic\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self buildMorphicViewOn: aSyntaxError.\\\\n\\\\t\\\\t\\\\tProject spawnNewProcessIfThisIsUI: Processor activeProcess.\\\\n\\\\t\\\\t\\\\t^ Processor activeProcess suspend].\\\\n\\\\ttopView := self buildMVCViewOn: aSyntaxError.\\\\n\\\\ttopView controller openNoTerminateDisplayAt: Display extent // 2.\\\\n\\\\tCursor normal show.\\\\n\\\\tProcessor activeProcess suspend.\\\\n! !\\\\nNotification subclass: #SyntaxErrorNotification\\\\n\\\\tinstanceVariableNames: 'inClass code category doitFlag'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Exceptions-Extensions'!\\\\n\\\\n!SyntaxErrorNotification methodsFor: 'accessing' stamp: 'ar 9/27/2005 19:17'!\\\\ncategory\\\\n\\\\t^category! !\\\\n\\\\n!SyntaxErrorNotification methodsFor: 'accessing' stamp: 'ar 9/27/2005 19:11'!\\\\ndoitFlag\\\\n\\\\t^doitFlag! !\\\\n\\\\n!SyntaxErrorNotification methodsFor: 'accessing' stamp: 'ar 9/27/2005 19:10'!\\\\nerrorClass\\\\n\\\\t^inClass! !\\\\n\\\\n!SyntaxErrorNotification methodsFor: 'accessing' stamp: 'ar 9/27/2005 19:10'!\\\\nerrorCode\\\\n\\\\t^code! !\\\\n\\\\n!SyntaxErrorNotification methodsFor: 'accessing' stamp: 'ar 9/27/2005 19:14'!\\\\nmessageText\\\\n\\\\t^ super messageText\\\\n\\\\t\\\\tifNil: [messageText := code]! !\\\\n\\\\n!SyntaxErrorNotification methodsFor: 'accessing' stamp: 'ar 9/27/2005 19:15'!\\\\nsetClass: aClass category: aCategory code: codeString doitFlag: aBoolean\\\\n\\\\tinClass := aClass.\\\\n\\\\tcategory := aCategory.\\\\n\\\\tcode := codeString.\\\\n\\\\tdoitFlag := aBoolean ! !\\\\n\\\\n\\\\n!SyntaxErrorNotification methodsFor: 'exceptionDescription' stamp: 'ar 9/27/2005 19:13'!\\\\ndefaultAction\\\\n\\\\t^ToolSet debugSyntaxError: self! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSyntaxErrorNotification class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SyntaxErrorNotification class methodsFor: 'exceptionInstantiator' stamp: 'ar 9/27/2005 19:15'!\\\\ninClass: aClass category: aCategory withCode: codeString doitFlag: doitFlag \\\\n\\\\t^ (self new\\\\n\\\\t\\\\tsetClass: aClass\\\\n\\\\t\\\\tcategory: aCategory \\\\n\\\\t\\\\tcode: codeString\\\\n\\\\t\\\\tdoitFlag: doitFlag) signal! !\\\\nAlignmentMorph subclass: #SyntaxMorph\\\\n\\\\tinstanceVariableNames: 'parseNode markerMorph'\\\\n\\\\tclassVariableNames: 'AllSpecs ContrastFactor DownRightArrow SelfTile SizeScaleFactor'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'EToys-Tile Scriptors'!\\\\n!SyntaxMorph commentStamp: '<historical>' prior: 0!\\\\nA single class of morph that holds any piece of Smalltalk syntax, and allows it to be a tile.  Tiles can be dragged in or out of a method. \\\\n\\\\nIn the message list pane of a Browser, choose 'tile scriptor'.  Bring up a second one to steal parts from.  If you use a Protocol Browser, and choose tiles, there will be two buttons that bring up menus with many tiles on them.\\\\n\\\\nClicking multiple times selects enclosing phrases of code.  Dragging lets you take away a copy.  Any tile may be replaced by dropping on it.  Shift-click to edit the text of any tile.  Change variable and message names, but do not change the part-of-speech (objects to selector).\\\\n\\\\nEach SyntaxMorph holds a ParseNode.  After editing, the parseNode is only good as a part-of-speech indicator.  Only the Class of a parseNode is important.  It's state is not kept up to date with the tile edits (but maybe it should be).  (For MessageNodes, whether the receiver slot is nil is significant.)\\\\n\\\\nThe correspondence between SyntaxMorphs and parseNodes in the real parse tree is not one-to-one.  Several extra levels of SyntaxMorph were added as aligners to make the horizontal and vertical layout right.  These sometimes have nil for the parseNode.\\\\n\\\\nWhen accept the method, we pass over the tree of SyntaxMorphs, gathering their printStrings and inserting punctuation.  See (SyntaxMorph>>printOn:indent:).  We send the result to the compiler.  (We do not use the parse tree we already have.)\\\\n\\\\nTo turn on type checking: \\\\nPreferences enable: #eToyFriendly\\\\nor for testing:     World project projectParameters at: #fullCheck put: true.\\\\n\\\\nColors of tiles:  Each tile has a current color (inst car color) and a deselectedColor (a property).  The deselectedColor may be governed by the part of speech, or not.  (translateColor: is only used when a tile is created, to set deselectedColor.)  From deselectedColor (set by #setDeselectedColor), the color changes to:\\\\n\\\\tlightBrown when selected (not the submorphs) in #select\\\\n\\\\ttranslucent when held in the hand (allMorphs) in #lookTranslucent\\\\n\\\\tgreen when a drop target (allMorphs) (change the owners back) #dropColor, \\\\n\\\\t\\\\t#trackDropZones \\\\ndeselectedColor is moderated by the darkness setting, #scaleColorByUserPref:.  (as it is put into color in #color:)\\\\n\\\\nCode to produce an individual tile is: \\\\n\\\\t(SyntaxMorph new) attachTileForCode: '''abc''' nodeType: LiteralNode.\\\\nsee offerTilesMenuFor:in: for many other phrases that produce useful tiles.\\\\n\\\\nAssignmentNode:  If three submorphs, is a statement, and is a noun.  If one submorph, is just the left arrow.  When dropped on a variable, it creates a new assignment statement. !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'tk 8/21/2001 09:36'!\\\\nactualObject\\\\n\\\\t| sub |\\\\n\\\\t\\\\\\\"Who is self in these tiles?  Usually a Player.\\\\\\\"\\\\n\\\\n\\\\n\\\\t(self nodeClassIs: LiteralVariableNode) ifTrue: [\\\\n\\\\t\\\\t(sub _ self findA: StringMorph) ifNil: [^ nil].\\\\n\\\\t\\\\t\\\\\\\"Need to decompile here for odd synonyms of 'self' ?\\\\\\\"\\\\n\\\\t\\\\t^ Compiler evaluate: sub contents for: Player logged: false].\\\\n\\\\n\\\\t(self nodeClassIs: VariableNode) ifTrue: [\\\\n\\\\t\\\\t(sub _ self findA: StringMorph) ifNil: [^ nil].\\\\n\\\\t\\\\t^ References at: (self cleanUpString: sub) asSymbol ifAbsent: [nil]].\\\\n\\\\n\\\\t(self nodeClassIs: LiteralNode) ifTrue: [\\\\n\\\\t\\\\t(sub _ self findA: StringMorph) ifNil: [^ nil].\\\\n\\\\t\\\\t^ Compiler evaluate: sub contents for: nil logged: false].\\\\n\\\\n\\\\t(sub _ self findA: SyntaxMorph) ifNil: [^ nil].\\\\n\\\\t^ sub actualObject\\\\t\\\\\\\"receiver\\\\\\\"! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'tk 9/20/2001 13:21'!\\\\nargumentNodes\\\\n\\\\t\\\\\\\"Return a collection of this message's argument nodes.  \\\\\\\"\\\\n\\\\n\\\\t| cls coll rec |\\\\n\\\\tparseNode ifNil: [^ #()].\\\\n\\\\tcls _ parseNode class.\\\\n\\\\tcls == SelectorNode ifTrue: [^ #()].\\\\n\\\\tcls == KeyWordNode ifTrue: [^ #()].\\\\n\\\\n\\\\tcoll _ OrderedCollection new.\\\\n\\\\trec _ self receiverNode.\\\\n\\\\tsubmorphs do: [:sub | \\\\n\\\\t\\\\t(sub isSyntaxMorph and: [sub ~~ rec]) ifTrue: [\\\\n\\\\t\\\\t\\\\tsub isNoun ifTrue: [coll addLast: sub]\\\\t\\\\\\\"complete arg\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [coll _ coll, sub argumentNodes]]].\\\\t\\\\\\\"MessagePartNode, MessageNode with no receiver\\\\\\\"\\\\n\\\\t^ coll! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'RAA 8/24/1999 17:57'!\\\\nballoonText\\\\n\\\\n\\\\t^(('Value: ',(self getCurrentValue ifNil: [^nil])) \\\\n\\\\t\\\\twithNoLineLongerThan: 35) truncateWithElipsisTo: 300! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'di 12/13/2000 15:25'!\\\\nborderColor: colorOrSymbolOrNil\\\\n\\\\n\\\\tborderColor = colorOrSymbolOrNil ifFalse: [\\\\n\\\\t\\\\tborderColor _ colorOrSymbolOrNil.\\\\n\\\\t\\\\tself bounds area < 40000\\\\n\\\\t\\\\t\\\\tifTrue: [self invalidRect: self bounds]\\\\n\\\\t\\\\t\\\\tifFalse: [(self bounds areasOutside: (self bounds insetBy: self borderWidth))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:r | self invalidRect: r]]].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'RAA 4/4/2001 12:36'!\\\\ncleanUpString: stringSubMorph\\\\n\\\\n\\\\t| style rawData |\\\\n\\\\t^ stringSubMorph \\\\n\\\\t\\\\tvalueOfProperty: #syntacticallyCorrectContents \\\\n\\\\t\\\\tifAbsent: [\\\\n\\\\t\\\\t\\\\tstyle _ stringSubMorph valueOfProperty: #syntacticReformatting.\\\\n\\\\t\\\\t\\\\trawData _ stringSubMorph contents.\\\\n\\\\t\\\\t\\\\t (#(unary tempVariableDeclaration blockarg2 methodHeader1 tempVariable variable) includes: style) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\trawData _ self unSpaceAndUpShift: rawData appending: nil.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\tstyle == #keywordGetz ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\trawData _ self unSpaceAndUpShift: rawData appending: 'Getz:'.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\tstyle == #keywordSetter ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\trawData _ self unSpaceAndUpShift: 'set ',rawData appending: ':'.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\tstyle == #unaryGetter ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\trawData _ self unSpaceAndUpShift: 'get ',rawData appending: nil.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\t(#(keyword2 methodHeader2) includes: style)  ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\trawData _ self unSpaceAndUpShift: rawData appending: ':'.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\trawData\\\\n\\\\t\\\\t]\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'tk 7/19/2001 20:04'!\\\\ncolor: aColorOrSymbol\\\\n\\\\n\\\\t| deselectedColor cc |\\\\n\\\\taColorOrSymbol isColor ifTrue: [\\\\n\\\\t\\\\tself valueOfProperty: #deselectedColor ifAbsent: [\\\\\\\"record my color the first time\\\\\\\"\\\\n\\\\t\\\\t\\\\tself setProperty: #deselectedColor toValue: aColorOrSymbol.\\\\n\\\\t\\\\t\\\\t^ super color: (self scaleColorByUserPref: aColorOrSymbol)].\\\\n\\\\t\\\\t^ super color: aColorOrSymbol].\\\\n\\\\n\\\\tdeselectedColor _ self valueOfProperty: #deselectedColor ifAbsent: [nil].\\\\n\\\\tdeselectedColor ifNotNil: [^ super color: (self scaleColorByUserPref: deselectedColor)].\\\\n\\\\n\\\\taColorOrSymbol == #comment  ifTrue: [^ self color: Color blue lighter].\\\\n\\\\tSyntaxMorph noTileColor ifTrue: [\\\\t\\\\\\\"override\\\\\\\"\\\\n\\\\t\\\\t^ self color: Color transparent].\\\\t\\\\\\\"Fix this to be real color!!\\\\\\\"\\\\n\\\\n\\\\t(cc _ self class translateColor: aColorOrSymbol) isColor\\\\n\\\\t\\\\tifTrue: [^ self color: cc]\\\\n\\\\t\\\\tifFalse: [Transcript show: aColorOrSymbol, ' needs to be handled in translateColor:'; cr.\\\\n\\\\t\\\\t\\\\t^ self color: Color transparent].\\\\t\\\\\\\"help!!\\\\\\\"! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'tk 9/20/2001 12:43'!\\\\ndissectMessage\\\\n\\\\t\\\\\\\"I am a MessageNode.  Return {receiverNode or nil, selector, (keyword nodes), (argument nodes)}.  Ignore all spacing morphs.\\\\\\\"\\\\n\\\\n\\\\t! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'sw 2/3/2001 01:40'!\\\\neditor\\\\n\\\\t\\\\\\\"In parallel with the interface for text morphs, we respond to this, but in our case we are our own editor\\\\\\\"\\\\n\\\\n\\\\t^ self! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'tk 9/19/2001 15:39'!\\\\nenclosingPane\\\\n\\\\t\\\\\\\"The object that owns this script layout\\\\\\\"\\\\n\\\\n\\\\t| oo higher |\\\\n\\\\too _ self owner.\\\\n\\\\t[higher _ oo isSyntaxMorph.\\\\n\\\\thigher _ higher or: [oo class == TransformMorph].\\\\n\\\\thigher _ higher or: [oo class == TwoWayScrollPane].\\\\n\\\\thigher ifFalse: [^ oo].\\\\n\\\\thigher] whileTrue: [oo _ oo owner].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'tk 9/7/2001 16:13'!\\\\ngetCurrentValue\\\\n\\\\n\\\\tparseNode ifNil: [^nil].\\\\n\\\\tparseNode class == Symbol ifTrue: [^nil].\\\\t\\\\\\\"special\\\\\\\"\\\\n\\\\t^parseNode currentValueIn: self hostContext! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'dgd 2/22/2003 18:48'!\\\\nmessageNode\\\\n\\\\t\\\\\\\"Return the enclosing messageNode that is the full message.  It has a receiver.\\\\\\\"\\\\n\\\\n\\\\t^self orOwnerSuchThat: [:oo | oo receiverNode notNil]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'RAA 8/15/1999 16:23'!\\\\nparseNode\\\\n\\\\t\\\\n\\\\t^parseNode\\\\n\\\\t\\\\t\\\\n\\\\t! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'RAA 8/15/1999 16:11'!\\\\nparseNode: x\\\\n\\\\t\\\\n\\\\tparseNode _ x\\\\n\\\\t\\\\t\\\\n\\\\t! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'di 11/17/2000 08:07'!\\\\nparsedInClass\\\\n\\\\n\\\\t^ self rootTile parseNode encoder classEncoding! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'tk 11/15/2000 14:39'!\\\\nparsedInClass: x\\\\n\\\\n\\\\tself parsedInClass == x ifFalse: [self error: 'inconsistent value']! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'tk 9/25/2001 11:28'!\\\\nreadOut\\\\n\\\\t\\\\\\\"Find and return an UpdatingStringMorph, possibly in a NumericReadoutTile\\\\\\\"\\\\n\\\\n\\\\t^ ((self findA: NumericReadoutTile) ifNil: [^ nil]) findA: UpdatingStringMorph! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'tk 7/23/2001 18:04'!\\\\nreceiverNode\\\\n\\\\t\\\\\\\"If I am (have) a MessageNode, return the node of the receiver.  Watch out for foolish noise words.\\\\\\\"\\\\n\\\\n\\\\tparseNode class == MessageNode ifFalse: [^ nil].\\\\n\\\\tparseNode receiver ifNil: [^ nil].\\\\n\\\\tsubmorphs do: [:ss | \\\\n\\\\t\\\\tss isSyntaxMorph ifTrue: [\\\\n\\\\t\\\\t\\\\tss parseNode ifNotNil: [\\\\\\\"not noise word\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tss isNoun ifTrue: [^ ss] \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [^ nil \\\\\\\"found selector\\\\\\\"]]]].\\\\n\\\\t^ nil! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'tk 9/23/2001 00:27'!\\\\nreceiverObject\\\\n\\\\t\\\\\\\"Return some object that could be the receiver to me (a selector).  Either the actual object who is the receiver in this message, or a guy of the right class.\\\\\\\"\\\\n\\\\n\\\\t| rec value mm |\\\\n\\\\t(rec _ owner) isSyntaxMorph ifFalse: [^ nil].\\\\n\\\\trec _ rec receiverNode.\\\\n\\\\trec ifNil: [(rec _ owner owner) isSyntaxMorph ifFalse: [^ nil].\\\\n\\\\t\\\\t\\\\t\\\\trec _ rec receiverNode].\\\\t\\\\n\\\\trec ifNil: [(rec _ owner owner owner) isSyntaxMorph ifFalse: [^ nil].\\\\n\\\\t\\\\t\\\\t\\\\trec _ rec receiverNode].\\\\n\\\\trec isSelfTile ifTrue: [\\\\n\\\\t\\\\t^ ((mm _ self containingWindow model) respondsTo: #targetObject) \\\\n\\\\t\\\\t\\\\tifTrue: [mm targetObject]\\\\n\\\\t\\\\t\\\\tifFalse: [mm selectedClassOrMetaClass new]].\\\\n\\\\tvalue _ rec ifNotNil: [rec try].\\\\n\\\\tvalue class == Error ifTrue: [\\\\n\\\\t\\\\tvalue _ Vocabulary instanceWhoRespondsTo: self selector].\\\\n\\\\t^ value! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'tk 1/13/2001 20:08'!\\\\nrename: newSelector\\\\n\\\\t| keywords mainSel list last |\\\\n\\\\t\\\\\\\"Attempt to change the name as listed in my tiles.  Can change the number of argumtents.  MethodNode (SelectorNode (SelectorNode (string))) or MethodNode (SelectorNode (SelectorNode (string) TempVarNode() SelectorNode (string) TempVarNode()))\\\\\\\"\\\\n\\\\n\\\\tself isMethodNode ifFalse: [\\\\n\\\\t\\\\tself rootTile == self ifTrue: [^ self].  \\\\\\\"not in a script\\\\\\\"\\\\n\\\\t\\\\t^ self rootTile rename: newSelector  \\\\\\\"always do at the root\\\\\\\"].\\\\n\\\\n\\\\tkeywords _ newSelector keywords.\\\\n\\\\tmainSel _ self findA: SelectorNode.\\\\n\\\\tlist _ mainSel submorphs select: [:mm | \\\\n\\\\t\\\\tmm isSyntaxMorph and: [mm parseNode class == SelectorNode]].\\\\n\\\\t1 to: (list size min: keywords size) do: [:ind |\\\\n\\\\t\\\\t((list at: ind) findA: UpdatingStringMorph) contents: (keywords at: ind)].\\\\n\\\\tkeywords size + 1 to: list size do: [:ind | \\\\\\\"removing keywords\\\\\\\"\\\\n\\\\t\\\\t[last _ mainSel submorphs last.\\\\n\\\\t\\\\t (last isSyntaxMorph and: [last parseNode class == TempVariableNode])] whileFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tlast delete].\\\\n\\\\t\\\\t[last _ mainSel submorphs last.\\\\n\\\\t\\\\t (last isSyntaxMorph and: [last parseNode class == SelectorNode])] whileFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tlast delete].\\\\t\\\\\\\"the TempVariableNode and others\\\\\\\"\\\\n\\\\t\\\\tmainSel submorphs last delete.\\\\t\\\\\\\"the SelectorNode\\\\\\\"\\\\n\\\\t\\\\t].\\\\n\\\\tlist size + 1 to: keywords size do: [:ind | \\\\\\\"adding keywords\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"add a SelectorNode, add a spacer, add a TempVarNode\\\\\\\"\\\\n\\\\t\\\\tmainSel addToken: (keywords at: ind) type: #keyword1 \\\\n\\\\t\\\\t\\\\ton: (SelectorNode new key: (keywords at: ind) code: nil).\\\\n\\\\t\\\\tmainSel addMorphBack: (mainSel transparentSpacerOfSize: 4@4).\\\\n\\\\t\\\\t(TempVariableNode new name: 'arg', ind printString index: ind type: nil scope: nil)\\\\n\\\\t\\\\t\\\\t asMorphicSyntaxIn: mainSel].! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'dgd 2/22/2003 13:41'!\\\\nselector\\\\n\\\\t\\\\\\\"Find the selector I represent, or have inside of me.  My parseNode is a SelectorNode or a MessageNode.\\\\\\\"\\\\n\\\\n\\\\t| sel cnt |\\\\n\\\\tparseNode class == SelectorNode \\\\n\\\\t\\\\tifTrue: [^self decompile asString asSymbol].\\\\n\\\\tparseNode class == KeyWordNode ifTrue: [^self decompile asString asSymbol].\\\\n\\\\tparseNode class == MessageNode | (parseNode class == MessagePartNode) \\\\n\\\\t\\\\tifFalse: [^nil].\\\\n\\\\t\\\\\\\"Must be one of those to have a selector\\\\\\\"\\\\n\\\\t\\\\\\\"Beware of messageParts.  If MessagePartNode, only returns this one keyword.\\\\\\\"\\\\n\\\\tsel := ''.\\\\n\\\\tcnt := 0.\\\\n\\\\tsubmorphs do: \\\\n\\\\t\\\\t\\\\t[:mm | \\\\n\\\\t\\\\t\\\\tmm isSyntaxMorph \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[cnt := cnt + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(mm nodeClassIs: SelectorNode) ifTrue: [^mm selector].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(mm nodeClassIs: MessagePartNode) ifTrue: [sel := sel , mm selector].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(mm nodeClassIs: KeyWordNode) ifTrue: [sel := sel , mm decompile asString].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(mm nodeClassIs: ReturnNode) ifTrue: [cnt := cnt - 1].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(mm nodeClassIs: MessageNode) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[parseNode receiver ifNil: [sel := mm selector].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcnt = 2 & (sel isEmpty) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"not the receiver.  Selector and arg\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsel := mm selector]]]].\\\\n\\\\tsel ifNil: [^nil].\\\\n\\\\tsel notEmpty ifTrue: [^sel asSymbol].\\\\n\\\\t^nil! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'aoy 2/15/2003 21:31'!\\\\nunSpaceAndUpShift: aString appending: extraChars \\\\n\\\\t| answer upShiftNext |\\\\n\\\\tanswer := WriteStream on: String new.\\\\n\\\\tupShiftNext := false.\\\\n\\\\taString do: \\\\n\\\\t\\\\t\\\\t[:ch | \\\\n\\\\t\\\\t\\\\tupShiftNext :=( ch == Character space) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [ true]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[answer nextPut: (upShiftNext ifTrue: [ch asUppercase] ifFalse: [ch]).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t false]].\\\\n\\\\tanswer := answer contents.\\\\n\\\\textraChars isEmptyOrNil ifTrue: [^answer].\\\\n\\\\t(answer endsWith: extraChars) ifFalse: [answer := answer , extraChars].\\\\n\\\\t^answer! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'tk 11/12/2000 14:42'!\\\\nuserScriptSelector\\\\n\\\\t\\\\\\\"user wrote this script\\\\\\\"\\\\n\\\\n\\\\t^ self valueOfProperty: #userScriptSelector! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'tk 11/12/2000 14:41'!\\\\nuserScriptSelector: sel\\\\n\\\\t\\\\\\\"user wrote this script\\\\\\\"\\\\n\\\\n\\\\tself setProperty: #userScriptSelector toValue: sel.! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/26/2001 16:03'!\\\\naSimpleStringMorphWith: aString\\\\n\\\\n\\\\tself alansTest1 ifTrue: [\\\\n\\\\t\\\\t^StringMorph contents: aString font: self alansCurrentFontPreference\\\\n\\\\t].\\\\n\\\\n\\\\t^StringMorph contents: aString! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/26/2001 23:24'!\\\\nalansCurrentFontPreference\\\\n\\\\n\\\\t^nil\\\\t\\\\t\\\\\\\"StrikeFont familyName: 'ComicBold' size: 16\\\\\\\"! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/26/2001 13:38'!\\\\nalansTemplateStyleFor: key\\\\n\\\\n\\\\t(#(ifTrue: ifFalse: ifTrue:ifFalse: ifFalse:ifTrue:) includes: key) ifTrue: [^1].\\\\n\\\\t(#(do: collect:) includes: key) ifTrue: [^2].\\\\n\\\\t(#(if:do:) includes: key) ifTrue: [^3].\\\\n\\\\t^0\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/28/2001 13:46'!\\\\nanUpdatingStringMorphWith: aString special: aBoolean\\\\n\\\\n\\\\tself alansTest1 ifTrue: [\\\\n\\\\t\\\\t^(aBoolean ifTrue: [SyntaxUpdatingStringMorph] ifFalse: [UpdatingStringMorph])\\\\n\\\\t\\\\t\\\\t contents: aString\\\\n\\\\t\\\\t\\\\tfont: self alansCurrentFontPreference\\\\n\\\\t].\\\\n\\\\t^UpdatingStringMorph contents: aString! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/26/2001 13:39'!\\\\nconstructSelfVariant: receiver and: key\\\\n\\\\n\\\\t| wordy |\\\\n\\\\t(receiver isKindOf: VariableNode) ifFalse: [^nil].\\\\n\\\\treceiver name = 'self'  ifFalse: [^nil].\\\\n\\\\t(wordy _ self translateFromWordySelfVariant: key) ifNil: [^nil].\\\\n\\\\t^wordy\\\\n\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/26/2001 23:20'!\\\\ndarkerColor\\\\n\\\\n\\\\t^(Color r: 1.0 g: 0.839 b: 0.613)\\\\t\\\\\\\"Color lightBrown lighter lighter.\\\\\\\"\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/26/2001 23:23'!\\\\nfontToUseForSpecialWord: aString\\\\n\\\\n\\\\t^(#('Yes' 'No' 'Test') includes: aString) ifTrue: [\\\\n\\\\t\\\\t(StrikeFont familyName: 'Helvetica' size: 14)\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tnil\\\\t\\\\\\\"(StrikeFont familyName: 'ComicBold' size: 16)\\\\\\\"\\\\n\\\\t]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/28/2001 09:35'!\\\\nlighterColor\\\\n\\\\n\\\\t^Color gray: 0.9\\\\t\\\\t\\\\n\\\\\\\"(Color r: 0.935 g: 0.935 b: 0.935)\\\\\\\"\\\\n\\\\\\\"paleGreen lighter\\\\\\\"\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'tk 8/7/2001 23:15'!\\\\nnoiseBeforeBlockArg\\\\n\\\\n\\\\t^ self alansTest1 ifTrue: [' Use'] ifFalse: [' from']! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 3/25/2001 17:16'!\\\\nnoiseStringMorph: aNoiseString\\\\n\\\\n\\\\t| sMorph |\\\\n\\\\n\\\\tsMorph _ self aSimpleStringMorphWith: aNoiseString.\\\\n\\\\tsMorph \\\\n\\\\t\\\\tfont: (self fontToUseForSpecialWord: aNoiseString); \\\\n\\\\t\\\\tsetProperty: #noiseWord toValue: true.\\\\n\\\\n\\\\t^sMorph\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'tk 8/7/2001 23:12'!\\\\nnoiseWordBeforeVariableNode: aNode string: aString\\\\n\\\\n\\\\t(#('self' 'nil') includes: aString) ifFalse: [\\\\n\\\\t\\\\taNode code ifNil: [^'my'].\\\\n\\\\t\\\\taNode type < 4 ifTrue: [^'my']\\\\n\\\\t].\\\\n\\\\t^nil! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/26/2001 22:50'!\\\\nsetConditionalPartStyle\\\\n\\\\n\\\\tself specialColor: self lighterColor andBorder: self darkerColor.\\\\n\\\\tself useRoundedCorners.\\\\n\\\\tself borderWidth: 1.\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/27/2001 07:34'!\\\\nsetSpecialOuterTestFormat\\\\n\\\\n\\\\tself \\\\n\\\\t\\\\tspecialColor: self darkerColor \\\\n\\\\t\\\\tandBorder: self lighterColor.\\\\n\\\\tself useRoundedCorners.\\\\n\\\\tself layoutInset: 1.\\\\n\\\\t\\\\\\\"self setProperty: #variableInsetSize toValue: 6.\\\\\\\"\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/26/2001 22:50'!\\\\nsetSpecialTempDeclarationFormat1\\\\n\\\\n\\\\t\\\\\\\"the outer template for temp defs\\\\\\\"\\\\n\\\\n\\\\tself \\\\n\\\\t\\\\tspecialColor: self darkerColor \\\\n\\\\t\\\\tandBorder: self lighterColor.\\\\n\\\\t\\\\\\\"self \\\\n\\\\t\\\\tspecialColor: (Color lightYellow) \\\\n\\\\t\\\\tandBorder: (Color r: 0.581 g: 0.774 b: 0.903).\\\\\\\"\\\\n\\\\tself useRoundedCorners.\\\\n\\\\tself layoutInset: 1.\\\\n\\\\tself cellPositioning: #center.\\\\n\\\\t\\\\\\\"self setProperty: #variableInsetSize toValue: 6.\\\\\\\"\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/26/2001 22:50'!\\\\nsetSpecialTempDeclarationFormat2\\\\n\\\\n\\\\t\\\\\\\"the inner template for temp defs\\\\\\\"\\\\n\\\\n\\\\tself \\\\n\\\\t\\\\tspecialColor: self lighterColor \\\\n\\\\t\\\\tandBorder:  self darkerColor.\\\\n\\\\t\\\\\\\"self \\\\n\\\\t\\\\tspecialColor: (Color r: 1.0 g: 1.0 b: 0.548) \\\\n\\\\t\\\\tandBorder:  (Color r: 0.581 g: 0.774 b: 0.903).\\\\\\\"\\\\n\\\\tself useRoundedCorners.\\\\n\\\\tself layoutInset: 1.\\\\n\\\\t\\\\\\\"self setProperty: #variableInsetSize toValue: 6.\\\\\\\"\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'tk 7/27/2001 16:53'!\\\\nshouldBeBrokenIntoWords: aSymbol\\\\n\\\\n\\\\t^#(methodHeader1 methodHeader2 keyword2 upArrow \\\\n\\\\t\\\\ttempVariable tempVariableDeclaration blockarg2 variable\\\\n\\\\t\\\\tkeywordGetz keywordSetter unaryGetter\\\\n\\\\t\\\\tassignmentArrow) includes: aSymbol! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/26/2001 13:44'!\\\\nspecialColor: c1 andBorder: c2\\\\n\\\\n\\\\tself color: (self scaleColorByUserPref: c1).\\\\n\\\\tself setProperty: #deselectedColor toValue: c1.\\\\n\\\\tself borderColor: (self scaleColorByUserPref: c2).\\\\n\\\\tself setProperty: #deselectedBorderColor toValue: c2.\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'yo 11/11/2002 10:32'!\\\\nsplitAtCapsAndDownshifted: aString\\\\n\\\\n\\\\tself flag: #yoCharCases.\\\\n\\\\n\\\\t^String streamContents: [ :strm |\\\\n\\\\t\\\\taString do: [ :each | \\\\n\\\\t\\\\t\\\\teach = $: ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\teach isUppercase ifTrue: [strm nextPut: (Character value: 0);  \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t \\\\tnextPut: (Character value: 0); \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t \\\\tnextPut: (Character value: 0); \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnextPut: each asLowercase]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [strm nextPut: each]\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t]\\\\n\\\\t].! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/26/2001 23:01'!\\\\nstandardCellPositioning\\\\n\\\\n\\\\t^ self alansTest1 ifTrue: [#leftCenter] ifFalse: [#topLeft]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'tk 7/25/2001 17:33'!\\\\nstandardInset\\\\n\\\\n\\\\tparseNode class == BlockNode ifTrue: [^ 5@1].\\\\n\\\\t\\\\t\\\\\\\"allow pointing beside a line so can replace it\\\\\\\"\\\\n\\\\t^ self alansTest1 ifTrue: [1] ifFalse: [-1]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 4/4/2001 13:12'!\\\\nsubstituteKeywordFor: aString\\\\n\\\\n\\\\taString isEmpty ifTrue: [^aString asString].\\\\n\\\\taString asString = '^ ' ifTrue: [^'answer'].\\\\n\\\\taString asString = 'ifTrue:' ifTrue: [^'Yes'].\\\\n\\\\taString asString = 'ifFalse:' ifTrue: [^'No'].\\\\n\\\\taString asString = 'self' ifTrue: [^'self'].\\\\n\\\\taString first isUppercase ifTrue: [^aString asString].\\\\n\\\\n\\\\t^self splitAtCapsAndDownshifted: aString! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/28/2001 15:03'!\\\\ntokenVerticalSeparator\\\\n\\\\n\\\\t^Morph new \\\\n\\\\t\\\\tcolor: Color transparent;\\\\n\\\\t\\\\textent: 3@3;\\\\n\\\\t\\\\tlock\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/26/2001 13:45'!\\\\ntranslateFromWordySelfVariant: key\\\\n\\\\n\\\\t#selfWrittenAsMe == key ifTrue: [^'me'].\\\\n\\\\t#selfWrittenAsMy == key ifTrue: [^'my'].\\\\n\\\\t#selfWrittenAsIll == key ifTrue: [^'I''ll'].\\\\n\\\\t#selfWrittenAsIm == key ifTrue: [^'I''m'].\\\\n\\\\t#selfWrittenAsThis == key ifTrue: [^'this'].\\\\n\\\\t^nil\\\\n\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'tk 7/28/2001 09:05'!\\\\ntranslateToWordyGetter: key\\\\n\\\\t\\\\\\\"  setBlob:  becomes  's blob _  \\\\\\\"\\\\n\\\\n\\\\t^ '''s ', \\\\n\\\\t  (self splitAtCapsAndDownshifted: (key asString allButFirst: 3) \\\\n\\\\t\\\\t\\\\twithFirstCharacterDownshifted)! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/26/2001 13:45'!\\\\ntranslateToWordySelfVariant: aString\\\\n\\\\n\\\\t| lc |\\\\n\\\\tlc _ aString asLowercase.\\\\n\\\\tlc = 'me' ifTrue: [^#selfWrittenAsMe].\\\\n\\\\tlc = 'my' ifTrue: [^#selfWrittenAsMy].\\\\n\\\\tlc = 'i''ll' ifTrue: [^#selfWrittenAsIll].\\\\n\\\\tlc = 'i''m' ifTrue: [^#selfWrittenAsIm].\\\\n\\\\tlc = 'this' ifTrue: [^#selfWrittenAsThis].\\\\n\\\\t^nil\\\\n\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'tk 7/27/2001 17:26'!\\\\ntranslateToWordySetter: key\\\\n\\\\t\\\\\\\"  setBlob:  becomes  's blob _  \\\\\\\"\\\\n\\\\n\\\\t^ '''s ', \\\\n\\\\t  (self splitAtCapsAndDownshifted: (key asString allButFirst: 3) allButLast \\\\n\\\\t\\\\t\\\\twithFirstCharacterDownshifted), \\\\n\\\\t  ' _'! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'card in a stack' stamp: 'tk 9/25/2001 11:46'!\\\\ncouldHoldSeparateDataForEachInstance\\\\n\\\\t\\\\\\\"Answer whether this type of morph is inherently capable of holding separate data for each instance ('card data')\\\\\\\"\\\\n\\\\n\\\\t^ true! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'card & stack' stamp: 'tk 9/25/2001 11:41'!\\\\nsetNewContentsFrom: stringOrNumberOrNil\\\\n\\\\t\\\\\\\"Using stringOrNumberOrNil as a guide, set the receiver's contents afresh.  If the input parameter is nil, the a default value stored in a property of the receiver, if any, will supply the new initial content.  This method is only called when a VariableDock is attempting to put a new value.\\\\\\\"\\\\n\\\\n\\\\t(self readOut ifNil: [^ self]) setNewContentsFrom: stringOrNumberOrNil.! !\\\\n\\\\n!SyntaxMorph methodsFor: 'card & stack' stamp: 'tk 11/4/2001 21:47'!\\\\nsetTarget: aPlayer\\\\n\\\\t\\\\\\\"Find my UpdatingStringMorph and set its getSelector, putSelector, and target\\\\\\\"\\\\n\\\\n\\\\t| updatingString |\\\\n\\\\t(updatingString _ self readOut) ifNil: [^ self].\\\\n\\\\tupdatingString putSelector: (Utilities setterSelectorFor: self knownName).\\\\n\\\\tupdatingString getSelector: (Utilities getterSelectorFor: self knownName).\\\\n\\\\tupdatingString target: aPlayer. ! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'change reporting' stamp: 'tk 9/28/2001 13:36'!\\\\ncolorChangedForSubmorph: colorPatch\\\\n\\\\t| sel newSel cc ms phrase completeMsg |\\\\n\\\\t\\\\\\\"reporting a color change\\\\\\\"\\\\n\\\\n\\\\t(self nodeClassIs: MessageNode) ifFalse: [^ nil].\\\\n\\\\t(sel _ self selector) ifNil: [^ nil].\\\\n\\\\t(Color colorNames includes: sel) | (sel == #r:g:b:) ifFalse: [^ nil].\\\\n\\\\t\\\\t\\\\\\\"a standard color name\\\\\\\"\\\\n\\\\t\\\\\\\"replace self with new tiles from the color\\\\\\\"\\\\n\\\\t(newSel _ (cc _ colorPatch color) name) \\\\n\\\\t\\\\tifNil: [ms _ MessageSend receiver: Color selector: #r:g:b: arguments: \\\\n\\\\t\\\\t\\\\t\\\\t(Array with: cc red with: cc green with: cc blue).\\\\n\\\\t\\\\t\\\\tphrase _ ms asTilesIn: Color globalNames: true]\\\\n\\\\t\\\\tifNotNil: [ms _ MessageSend receiver: Color selector: newSel arguments: #().\\\\n\\\\t\\\\t\\\\tphrase _ ms asTilesIn: Color globalNames: true].\\\\n\\\\tself deletePopup.\\\\n\\\\tcompleteMsg _ self isNoun ifTrue: [self] ifFalse: [owner].\\\\n\\\\tcompleteMsg owner replaceSubmorph: completeMsg by: phrase.\\\\n\\\\t\\\\\\\"rec setSelection: {rec. nil. rec}.\\\\\\\"\\\\n\\\\tphrase acceptIfInScriptor.! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'classification' stamp: 'di 11/2/2000 13:25'!\\\\nisSyntaxMorph\\\\n\\\\t^ true! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'debugging' stamp: 'di 11/17/2000 07:59'!\\\\ndebugger\\\\n\\\\n\\\\t^ self rootTile valueOfProperty: #debugger! !\\\\n\\\\n!SyntaxMorph methodsFor: 'debugging' stamp: 'di 11/17/2000 07:59'!\\\\ndebugger: x\\\\n\\\\n\\\\tself rootTile setProperty: #debugger toValue: x! !\\\\n\\\\n!SyntaxMorph methodsFor: 'debugging' stamp: 'RAA 8/24/1999 12:35'!\\\\nhostContext\\\\n\\\\n\\\\t^nil\\\\t\\\\t\\\\\\\"we don't have one\\\\\\\"! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'drawing' stamp: 'RAA 3/25/2001 16:16'!\\\\ndrawOn: aCanvas\\\\n\\\\n\\\\tsuper drawOn: aCanvas.\\\\n\\\\tself isBlockNode ifFalse: [^self].\\\\n\\\\tself alansTest1 ifTrue: [^self].\\\\n\\\\n\\\\tself immediatelyBelowTheMethodNode ifTrue: [\\\\n\\\\t\\\\taCanvas fillRectangle: (self topLeft + (0@-1) extent: self width@1) color: Color gray\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\taCanvas fillRectangle: (self topLeft + (1@1) extent: 2@(self height-2)) color: Color gray.\\\\n\\\\t\\\\taCanvas fillRectangle: (self topLeft + (1@1) extent: 4@1) color: Color gray.\\\\n\\\\t\\\\taCanvas fillRectangle: (self bottomLeft + (1@-1) extent: 4@1) color: Color gray\\\\n\\\\t].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'drawing' stamp: 'tk 9/13/2001 15:13'!\\\\nlookTranslucent\\\\n\\\\n\\\\tself setDeselectedColor.\\\\n\\\\tsuper color: (self color alpha: 0.25).\\\\n\\\\tsubmorphs do: [:mm | (mm respondsTo: #lookTranslucent) \\\\n\\\\t\\\\tifTrue: [mm lookTranslucent]\\\\n\\\\t\\\\tifFalse: [\\\\\\\"mm color: color\\\\\\\"]].\\\\n! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'dropping/grabbing' stamp: 'di 1/29/2001 16:23'!\\\\ncleanupAfterItDroppedOnMe\\\\n\\\\t\\\\\\\"A tile just dropped into me.  Clean up\\\\\\\"\\\\n\\\\n\\\\tself layoutChanged.  \\\\\\\"** Isn't this already implied by the addMorph: ?\\\\\\\"\\\\n\\\\t\\\\\\\"Auto-accept on drop if in a scriptor\\\\\\\"\\\\n\\\\tself acceptIfInScriptor.! !\\\\n\\\\n!SyntaxMorph methodsFor: 'dropping/grabbing' stamp: 'di 5/4/2001 13:16'!\\\\nhighlightForDrop: evt\\\\n\\\\n\\\\t(self wantsDroppedMorph: evt hand firstSubmorph event: evt)\\\\n\\\\t\\\\tifTrue: [self color: self dropColor].! !\\\\n\\\\n!SyntaxMorph methodsFor: 'dropping/grabbing' stamp: 'tk 7/19/2001 19:04'!\\\\njustDroppedInto: aMorph event: evt\\\\n\\\\taMorph isSyntaxMorph ifFalse:\\\\n\\\\t\\\\t[Preferences tileTranslucentDrag\\\\n\\\\t\\\\t\\\\tifTrue: [self setDeselectedColor]\\\\n\\\\t\\\\t\\\\tifFalse: [self align: self topLeft with: self topLeft - self cursorBaseOffset]].\\\\n\\\\tself removeProperty: #beScript.\\\\n\\\\t^ super justDroppedInto: aMorph event: evt! !\\\\n\\\\n!SyntaxMorph methodsFor: 'dropping/grabbing' stamp: 'tk 9/30/2001 11:09'!\\\\nmorphToDropInPasteUp: aPasteUp\\\\n\\\\t\\\\\\\"If property #beScript is true, create a scriptor around me.\\\\\\\"\\\\n\\\\n\\\\t| actualObject itsSelector aScriptor adjustment handy tw blk |\\\\n\\\\t(self valueOfProperty: #beScript ifAbsent: [false]) ifFalse: [^ self].\\\\n\\\\tself removeProperty: #beScript.\\\\n\\\\tactualObject _ self actualObject ifNil: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself valueOfProperty: #scriptedPlayer ifAbsent: [nil]].\\\\n\\\\tactualObject ifNil: [^ self].\\\\n\\\\tself removeProperty: #scriptedPlayer.\\\\n\\\\tactualObject assureUniClass.\\\\n\\\\n\\\\titsSelector _ self userScriptSelector.\\\\n\\\\taScriptor _ itsSelector isEmptyOrNil\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[adjustment _ 0@0.\\\\n\\\\t\\\\t\\\\tactualObject scriptEditorFor: itsSelector]\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[adjustment _ 60 @ 20.\\\\n\\\\t\\\\t\\\\tactualObject newScriptorAround: self].\\\\n\\\\taScriptor ifNil: [^self].\\\\n\\\\thandy _ aPasteUp primaryHand.\\\\n\\\\n\\\\taScriptor position: handy position - adjustment.\\\\n\\\\taPasteUp addMorphFront: aScriptor.\\\\t\\\\\\\"do this early so can find World\\\\\\\"\\\\n\\\\taScriptor showingMethodPane ifFalse: [\\\\n\\\\t\\\\t\\\\\\\"(tw _ aScriptor findA: TwoWayScrollPane) ifNil:\\\\n\\\\t\\\\t\\\\t[itsSelector ifNil: ['blank script'.\\\\n\\\\t\\\\t\\\\t\\\\ttw _ aScriptor findA: TwoWayScrollPane.\\\\n\\\\t\\\\t\\\\t\\\\tblk _ (tw scroller findA:  SyntaxMorph \\\\\\\"\\\\\\\"MethodNode\\\\\\\"\\\\\\\") findA: BlockNode.\\\\n\\\\t\\\\t\\\\t\\\\tblk addMorphFront: self]].\\\\n\\\\t\\\\t\\\\\\\"\\\\n\\\\t\\\\tSyntaxMorph setSize: nil andMakeResizable: aScriptor.\\\\n\\\\t\\\\t].\\\\n\\\\t^ aScriptor\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'dropping/grabbing' stamp: 'tk 9/24/2001 10:04'!\\\\nstructureMatchWith: aMorph\\\\n\\\\t| meNoun itNoun |\\\\n\\\\t\\\\\\\"Return true if the node types would allow aMorph to replace me.  This tests the gross structure of the method only.\\\\\\\"\\\\n\\\\n\\\\tmeNoun _ self isNoun.\\\\n\\\\titNoun _ aMorph isNoun.\\\\n\\\\n\\\\t\\\\\\\"Consider these nouns to be equal:  TempVariableNode, LiteralNode, VariableNode, (MessageNode with receiver), CascadeNode, AssignmentNode\\\\\\\"\\\\n\\\\tmeNoun & itNoun ifTrue: [^ true].\\\\n\\\\tmeNoun & aMorph isBlockNode ifTrue: [^ true].\\\\n\\\\n\\\\t\\\\\\\"If I am a BlockNode, and it is a TempVariableNode, add it into list\\\\\\\"\\\\n\\\\t\\\\\\\"If I am a BlockNode, and it is a noun, add it as a new line\\\\\\\"\\\\n\\\\tself isBlockNode ifTrue:\\\\n\\\\t\\\\t[itNoun ifTrue: [^ true].\\\\n\\\\t\\\\t(aMorph nodeClassIs: ReturnNode) ifTrue:\\\\n\\\\t\\\\t\\\\t[^ (self submorphs\\\\n\\\\t\\\\t\\\\t\\\\tdetect: [:mm | ((mm isSyntaxMorph) and: [mm nodeClassIs: ReturnNode])]\\\\n\\\\t\\\\t\\\\t\\\\tifNone: [nil]) isNil].\\\\t\\\\\\\"none already in this block\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"If I am a BlockNode, and it is a ReturnNode, add to end\\\\\\\"\\\\n\\\\t\\\\t(aMorph nodeClassIs: CommentNode) ifTrue: [^ true]].\\\\n\\\\n\\\\t(self isMethodNode) ifTrue: [^ false].\\\\t\\\\\\\"Later add args and keywords\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"Later allow comments to be dropped in\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"Add MethodTemps by dropping into the main block\\\\\\\"\\\\n\\\\n\\\\t(self nodeClassIs: ReturnNode) & (aMorph parseNode class == MessageNode) \\\\n\\\\t\\\\tifTrue: [^ true].\\\\t\\\\t\\\\\\\"Command replace Return\\\\\\\"\\\\n\\\\t(self nodeClassIs: MessageNode) & (aMorph parseNode class == ReturnNode) ifTrue: [\\\\n\\\\t\\\\t(owner submorphs select: [:ss | ss isSyntaxMorph]) last == self\\\\n\\\\t\\\\t\\\\tifTrue: [^ true]].\\\\t\\\\\\\"Return replace last command\\\\\\\"\\\\n\\\\n\\\\t(aMorph nodeClassIs: AssignmentNode) ifTrue: [\\\\n\\\\t\\\\titNoun ifFalse: [\\\\\\\"create a new assignment\\\\\\\"\\\\n\\\\t\\\\t\\\\t^ self isAVariable & self isDeclaration not]].\\\\t\\\\\\\"only assign to a variable\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"If nodes are of equal class, replace me with new one.\\\\\\\"\\\\n\\\\t(self nodeClassIs: aMorph parseNode class) ifTrue: [\\\\n\\\\t\\\\t(self nodeClassIs: MessageNode) \\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [^ true]\\\\t\\\\\\\"normal match\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [^ self receiverNode == aMorph receiverNode]].\\\\t\\\\\\\"both nil\\\\\\\"\\\\n\\\\n\\\\t^ false \\\\\\\"otherwise reject\\\\\\\"\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'dropping/grabbing' stamp: 'gm 2/22/2003 12:49'!\\\\nwantsDroppedMorph: aMorph event: evt \\\\n\\\\t\\\\\\\"For the moment, you have to drop it the right place.  We do not look at enclosing morphs\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Two ways to do this:  Must always destroy old node, then drag in new one.\\\\n\\\\t\\\\tOr, drop replaces what you drop on.  Nasty with blocks.\\\\\\\"\\\\n\\\\n\\\\t(aMorph isSyntaxMorph) ifFalse: [^false].\\\\n\\\\t(self structureMatchWith: aMorph) ifFalse: [^false].\\\\t\\\\\\\"gross structure\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Only look at types if NoviceMode -- building EToys\\\\\\\"\\\\n\\\\t^self okToBeReplacedBy: aMorph\\\\t\\\\\\\"test the types\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"^ true\\\\\\\"! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'event handling' stamp: 'di 11/8/2000 22:05'!\\\\ncursorBaseOffset\\\\n\\\\n\\\\t^ 7@14\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'event handling' stamp: 'di 11/6/2000 16:20'!\\\\nhandlesKeyboard: evt\\\\n\\\\t^ evt keyCharacter = Character backspace! !\\\\n\\\\n!SyntaxMorph methodsFor: 'event handling' stamp: 'dgd 2/22/2003 13:39'!\\\\nhandlesMouseDown: evt \\\\n\\\\tevt yellowButtonPressed ifTrue: [^true].\\\\n\\\\tparseNode isNil ifTrue: [^false].\\\\n\\\\towner isSyntaxMorph \\\\n\\\\t\\\\tifTrue: [(owner isMethodNode and: [self isBlockNode not]) ifTrue: [^false]].\\\\t\\\\\\\"Can only take block out of a MethodNode\\\\\\\"\\\\n\\\\t^true! !\\\\n\\\\n!SyntaxMorph methodsFor: 'event handling' stamp: 'tk 10/26/2000 16:58'!\\\\nhandlesMouseOver: evt\\\\n\\\\t\\\\\\\"Am I a tile that could be picked up?\\\\\\\"\\\\n\\\\n\\\\t^ true! !\\\\n\\\\n!SyntaxMorph methodsFor: 'event handling' stamp: 'di 11/6/2000 08:21'!\\\\nhandlesMouseOverDragging: evt\\\\n\\\\n\\\\t^ evt hand hasSubmorphs\\\\n\\\\t\\\\tand: [evt hand firstSubmorph isSyntaxMorph]\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'event handling' stamp: 'di 11/17/2000 08:21'!\\\\nkeyStroke: evt\\\\n\\\\t\\\\\\\"Handle a keystroke event.\\\\\\\"\\\\n\\\\t| spacer |\\\\n\\\\tevt keyCharacter = Character backspace ifTrue:\\\\n\\\\t\\\\t[(owner notNil and: [owner isSyntaxMorph]) ifTrue:\\\\n\\\\t\\\\t\\\\t[owner isBlockNode ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[\\\\\\\"Delete a statement.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t(spacer _ self submorphAfter) class == AlignmentMorph\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [spacer delete].\\\\n\\\\t\\\\t\\\\t\\\\tself delete].\\\\n\\\\t\\\\t\\\\t]].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'event handling' stamp: 'tk 9/26/2001 05:56'!\\\\nmouseDown: evt \\\\n\\\\t| dup rootTile |\\\\n\\\\tevt yellowButtonPressed ifTrue: [^ self showMenu: evt].\\\\n\\\\t(rootTile _ self rootTile) isMethodNode ifTrue:\\\\n\\\\t\\\\t[self currentSelectionDo:\\\\n\\\\t\\\\t\\\\t[:innerMorph :mouseDownLoc :outerMorph |\\\\n\\\\t\\\\t\\\\t(outerMorph notNil and: [self == innerMorph])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"Click on prior selection -- record click point.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself setSelection: {self. evt cursorPoint. outerMorph}]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\\\\"A new selection sequence.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself setSelection: {self. evt cursorPoint. nil}]].\\\\n\\\\t\\\\t^ self].\\\\n\\\\n\\\\t\\\\\\\"Out in the world -- treat as a unit\\\\\\\"\\\\n\\\\trootTile isSticky ifTrue: [^ self].\\\\t\\\\\\\"later may allow to be selected\\\\\\\"\\\\n\\\\trootTile isPartsDonor \\\\n\\\\t\\\\tifTrue: [dup _ rootTile duplicate.\\\\n\\\\t\\\\t\\\\t\\\\tdup setProperty: #beScript toValue: true]\\\\n\\\\t\\\\tifFalse: [dup _ rootTile].\\\\n\\\\tevt hand attachMorph: dup.\\\\n\\\\tPreferences tileTranslucentDrag\\\\n\\\\t\\\\tifTrue: [^ dup lookTranslucent]\\\\n\\\\t\\\\tifFalse: [^ dup align: dup topLeft with: evt hand position + self cursorBaseOffset]\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'event handling' stamp: 'tk 7/19/2001 20:21'!\\\\nmouseEnter: evt\\\\n\\\\t\\\\\\\"Highlight this level as a potential grab target\\\\\\\"\\\\n\\\\n\\\\\\\"Transcript cr; print: self; show: ' enter'.\\\\\\\"\\\\n\\\\tself rootTile isMethodNode ifFalse: [^ self]. \\\\t\\\\\\\"not in a script\\\\\\\"\\\\n\\\\tself unhighlightOwnerBorder.\\\\n\\\\tself highlightForGrab: evt.\\\\n\\\\tevt hand newKeyboardFocus: self.\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'event handling' stamp: 'tk 7/25/2001 10:09'!\\\\nmouseEnterDragging: evt\\\\n\\\\t\\\\\\\"Highlight this level as a potential drop target\\\\\\\"\\\\n\\\\n\\\\\\\"self isBlockNode ifTrue: [Transcript cr; print: self; show: ' enterDragging'].\\\\\\\"\\\\n\\\\tself rootTile isMethodNode ifFalse: [^ self]. \\\\t\\\\\\\"not in a script\\\\\\\"\\\\n\\\\n\\\\tevt hand hasSubmorphs ifFalse: [^ self].  \\\\\\\"Don't react to empty hand\\\\\\\"\\\\n\\\\tself unhighlightOwnerBorder.\\\\n\\\\tself isBlockNode ifFalse: [self highlightForDrop: evt.\\\\n\\\\t\\\\t(self firstOwnerSuchThat: [:m | m isSyntaxMorph and: [m color = self dropColor]])\\\\n\\\\t\\\\t\\\\tifNotNilDo: [:m | m unhighlight]].\\\\n\\\\n\\\\tself isBlockNode ifTrue:\\\\n\\\\t\\\\t[(self firstOwnerSuchThat: [:m | m isSyntaxMorph and: [m isBlockNode]])\\\\n\\\\t\\\\t\\\\tifNotNilDo: [:m | \\\\\\\"Suspend outer block.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tm stopStepping; removeDropZones].\\\\n\\\\t\\\\tself startStepping]\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'event handling' stamp: 'dgd 2/22/2003 18:48'!\\\\nmouseLeave: evt \\\\n\\\\t\\\\\\\"Move grab highlight back out a level\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Transcript cr; print: self; show: ' leave'.\\\\\\\"\\\\n\\\\n\\\\tself rootTile isMethodNode ifFalse: [^self].\\\\t\\\\\\\"not in a script\\\\\\\"\\\\n\\\\tself unhighlightBorder.\\\\n\\\\t(owner notNil and: [owner isSyntaxMorph]) \\\\n\\\\t\\\\tifTrue: [owner highlightForGrab: evt]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'event handling' stamp: 'dgd 2/22/2003 18:48'!\\\\nmouseLeaveDragging: evt \\\\n\\\\t\\\\\\\"Transcript cr; print: self; show: ' leaveDragging'.\\\\\\\"\\\\n\\\\n\\\\tself rootTile isMethodNode ifFalse: [^self].\\\\t\\\\\\\"not in a script\\\\\\\"\\\\n\\\\tself isBlockNode \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[self\\\\n\\\\t\\\\t\\\\t\\\\tstopStepping;\\\\n\\\\t\\\\t\\\\t\\\\tremoveDropZones.\\\\n\\\\t\\\\t\\\\t(self firstOwnerSuchThat: [:m | m isSyntaxMorph and: [m isBlockNode]]) \\\\n\\\\t\\\\t\\\\t\\\\tifNotNilDo: [:m | m startStepping].\\\\t\\\\\\\"Activate outer block.\\\\\\\"\\\\n\\\\t\\\\t\\\\tself submorphs do: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:ss | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"cancel drop color in line beside mouse\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tss color = self dropColor ifTrue: [ss setDeselectedColor]]].\\\\n\\\\n\\\\t\\\\\\\"Move drop highlight back out a level\\\\\\\"\\\\n\\\\tself unhighlight.\\\\n\\\\t(owner notNil and: [owner isSyntaxMorph]) \\\\n\\\\t\\\\tifTrue: [owner isBlockNode ifFalse: [owner highlightForDrop: evt]]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'event handling' stamp: 'tk 10/17/2001 13:41'!\\\\nmouseMove: evt\\\\n\\\\t| dup selection |\\\\n\\\\towner isSyntaxMorph ifFalse: [^ self].\\\\n\\\\nfalse ifTrue: [\\\\\\\"for now, do not drag off a tile\\\\\\\"\\\\n\\\\tself currentSelectionDo:\\\\n\\\\t\\\\t[:innerMorph :mouseDownLoc :outerMorph |\\\\n\\\\t\\\\tmouseDownLoc ifNotNil: [\\\\n\\\\t\\\\t\\\\t(evt cursorPoint dist: mouseDownLoc) > 4 ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[\\\\\\\"If drag 5 pixels, then tear off a copy of outer selection.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tselection _ outerMorph ifNil: [self].\\\\n\\\\t\\\\t\\\\t\\\\tselection deletePopup.\\\\n\\\\t\\\\t\\\\t\\\\tevt hand attachMorph: (dup _ selection duplicate).\\\\n\\\\t\\\\t\\\\t\\\\tPreferences tileTranslucentDrag\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [dup lookTranslucent]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [dup align: dup topLeft\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twith: evt hand position + self cursorBaseOffset].\\\\n\\\\t\\\\t\\\\t\\\\tself setSelection: nil.\\\\t\\\\\\\"Why doesn't this deselect?\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t(self firstOwnerSuchThat: [:m | m isSyntaxMorph and: [m isBlockNode]])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifNotNilDo: [:m | \\\\\\\"Activate enclosing block.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tm startStepping]]]].\\\\n\\\\t].! !\\\\n\\\\n!SyntaxMorph methodsFor: 'event handling' stamp: 'di 11/17/2000 08:13'!\\\\nmouseUp: evt\\\\n\\\\t| newSel |\\\\n\\\\tself rootTile isMethodNode ifFalse: [^ self].\\\\n\\\\tself currentSelectionDo:\\\\n\\\\t\\\\t[:innerMorph :mouseDownLoc :outerMorph |\\\\n\\\\t\\\\tnewSel _ outerMorph\\\\n\\\\t\\\\t\\\\tifNil: [self \\\\\\\"first click\\\\\\\"]\\\\n\\\\t\\\\t\\\\tifNotNil: [(outerMorph firstOwnerSuchThat:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:m | m isSyntaxMorph and: [m isSelectable]]) ifNil: [self]].\\\\n\\\\t\\\\tnewSel isMethodNode ifTrue: [^ self setSelection: nil].\\\\n\\\\t\\\\tself setSelection: {self. nil. newSel}]\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'event handling' stamp: 'tk 12/1/2000 15:42'!\\\\nwantsKeyboardFocusFor: aSubmorph\\\\n\\\\t| doEdit |\\\\n\\\\t\\\\\\\"only let strings edit on shift-click.  Editing on ordinary click defeats the brown selection and tile dragging.\\\\\\\"\\\\n\\\\n\\\\tdoEdit _ self world primaryHand lastEvent shiftPressed.\\\\n\\\\tdoEdit ifTrue: [\\\\\\\"remove the arrows during editing\\\\\\\"\\\\n\\\\t\\\\tself valueOfProperty: #myPopup ifPresentDo: [:panel |\\\\n\\\\t\\\\t\\\\tpanel delete. self removeProperty: #myPopup]].\\\\n\\\\t^ doEdit! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'formatting options' stamp: 'di 2/21/2001 11:42'!\\\\nalansTest1\\\\n\\\\t\\\\n\\\\t| root |\\\\n\\\\n\\\\troot _ self rootTile ifNil: [self].\\\\n\\\\t^root valueOfProperty: #alansNewStyle ifAbsent: [self usingClassicTiles not]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'formatting options' stamp: 'RAA 2/26/2001 09:02'!\\\\ncontrolContrast2: evt\\\\n\\\\n\\\\t| origin scale startingContrastX |\\\\n\\\\n\\\\tevt isMouseUp ifTrue: [\\\\n\\\\t\\\\t^self removeProperty: #startingPointForSomeAdjustment\\\\n\\\\t].\\\\n\\\\tevt isMouseDown ifTrue: [\\\\n\\\\t\\\\t^self setProperty: #startingPointForSomeAdjustment toValue: evt cursorPoint\\\\n\\\\t].\\\\n\\\\tContrastFactor ifNil: [ContrastFactor _ 0.5].\\\\n\\\\tscale _ 200.0.\\\\n\\\\tstartingContrastX _ ContrastFactor * scale.\\\\n\\\\torigin _ self valueOfProperty: #startingPointForSomeAdjustment.\\\\n\\\\tContrastFactor _ (evt cursorPoint x - origin x + startingContrastX) / scale min: 1.0 max: 0.0.\\\\n\\\\tself finalAppearanceTweaks.\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'formatting options' stamp: 'RAA 2/26/2001 09:07'!\\\\ncontrolContrast: evt\\\\n\\\\n\\\\t\\\\\\\"old version. may be some scripts saved with me, so don't crash\\\\\\\"\\\\n\\\\t^self! !\\\\n\\\\n!SyntaxMorph methodsFor: 'formatting options' stamp: 'RAA 5/11/2001 07:41'!\\\\ncontrolSpacing2: evt\\\\n\\\\n\\\\t| origin scale startingContrastX |\\\\n\\\\n\\\\tevt isMouseUp ifTrue: [\\\\n\\\\t\\\\t^self removeProperty: #startingPointForSomeAdjustment\\\\n\\\\t].\\\\n\\\\tevt isMouseDown ifTrue: [\\\\n\\\\t\\\\t^self setProperty: #startingPointForSomeAdjustment toValue: evt cursorPoint\\\\n\\\\t].\\\\n\\\\tSizeScaleFactor ifNil: [SizeScaleFactor _ 0.15].\\\\n\\\\tscale _ 200.0.\\\\n\\\\tstartingContrastX _ SizeScaleFactor * scale.\\\\n\\\\torigin _ self valueOfProperty: #startingPointForSomeAdjustment.\\\\n\\\\tSizeScaleFactor _ (evt cursorPoint x - origin x + startingContrastX) / scale min: 1.0 max: 0.0.\\\\n\\\\tself finalAppearanceTweaks.\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'formatting options' stamp: 'RAA 2/26/2001 09:07'!\\\\ncontrolSpacing: evt\\\\n\\\\n\\\\t\\\\\\\"old version. may be some scripts saved with me, so don't crash\\\\\\\"\\\\n\\\\t^self! !\\\\n\\\\n!SyntaxMorph methodsFor: 'formatting options' stamp: 'di 2/21/2001 12:30'!\\\\nlookClassic\\\\n\\\\tself isLeafTile ifTrue: [self layoutInset: 2@4]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'formatting options' stamp: 'tk 7/18/2001 16:00'!\\\\nusingClassicTiles \\\\n\\\\n\\\\t^ Preferences uniTilesClassic! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'highlighting' stamp: 'tk 7/30/2001 14:48'!\\\\ncompoundBorderColor \\\\n\\\\n\\\\t^ self valueOfProperty: #deselectedBorderColor ifAbsent: [Color veryLightGray]\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'highlighting' stamp: 'di 11/5/2000 07:26'!\\\\ndropColor\\\\n\\\\t^ Color green darker! !\\\\n\\\\n!SyntaxMorph methodsFor: 'highlighting' stamp: 'tk 7/23/2001 18:28'!\\\\ngrabColor\\\\n\\\\n\\\\t\\\\\\\"Not the select color, but the mouseOver border color.  Means it could be grabbed\\\\\\\"\\\\n\\\\t^ Color paleOrange mixed: 0.5 with: Color brown! !\\\\n\\\\n!SyntaxMorph methodsFor: 'highlighting' stamp: 'di 11/6/2000 09:22'!\\\\nhighlightForGrab: evt\\\\n\\\\n\\\\tself borderColor: self grabColor.! !\\\\n\\\\n!SyntaxMorph methodsFor: 'highlighting' stamp: 'tk 7/19/2001 19:09'!\\\\nstdBorderColor \\\\n\\\\n\\\\t\\\\\\\"put choices of how to do the border here\\\\\\\"\\\\n\\\\t^ self valueOfProperty: #deselectedBorderColor ifAbsent: [Color transparent]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'highlighting' stamp: 'tk 7/19/2001 19:50'!\\\\nunhighlight\\\\n\\\\n\\\\tself setDeselectedColor.\\\\n\\\\n\\\\nfalse ifTrue: [\\\\n\\\\tself currentSelectionDo: [:innerMorph :mouseDownLoc :outerMorph |\\\\n\\\\t\\\\tself color: ( false\\\\n\\\\t\\\\t\\\\t\\\\\\\"(self == outerMorph or: [owner notNil and: [owner isSyntaxMorph not]])\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self valueOfProperty: #deselectedBorderColor ifAbsent: [#raised]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self color: Color transparent]\\\\n\\\\t\\\\t)\\\\n\\\\t]].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'highlighting' stamp: 'di 5/4/2001 13:21'!\\\\nunhighlightBorder\\\\n\\\\n\\\\tself currentSelectionDo: [:innerMorph :mouseDownLoc :outerMorph |\\\\n\\\\t\\\\tself borderColor: (\\\\n\\\\t\\\\t\\\\t(self == outerMorph or: [owner notNil and: [owner isSyntaxMorph not]])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self valueOfProperty: #deselectedBorderColor ifAbsent: [#raised]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self stdBorderColor]\\\\n\\\\t\\\\t)\\\\n\\\\t]\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'highlighting' stamp: 'dgd 2/22/2003 18:48'!\\\\nunhighlightOwner\\\\n\\\\t\\\\\\\"Unhighlight my owner\\\\\\\"\\\\n\\\\n\\\\t(owner notNil and: [owner isSyntaxMorph]) ifTrue: [owner unhighlight]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'highlighting' stamp: 'dgd 2/22/2003 18:49'!\\\\nunhighlightOwnerBorder\\\\n\\\\t\\\\\\\"Unhighlight my owner's border\\\\\\\"\\\\n\\\\n\\\\t(owner notNil and: [owner isSyntaxMorph]) \\\\n\\\\t\\\\tifTrue: [owner unhighlightBorder]! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'initialization' stamp: 'sw 3/6/2001 11:26'!\\\\ninAPluggableScrollPane\\\\n\\\\t\\\\\\\"Answer a PluggableTileScriptorMorph that holds the receiver\\\\\\\"\\\\n\\\\n\\\\t| widget |\\\\n\\\\twidget _ PluggableTileScriptorMorph new.\\\\n\\\\twidget extent: 10@10; borderWidth: 0.\\\\n\\\\twidget scroller addMorph: self.\\\\n\\\\twidget setScrollDeltas.\\\\n\\\\twidget hResizing: #spaceFill; vResizing: #spaceFill.\\\\n\\\\t^ widget\\\\n\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'initialization' stamp: 'sw 6/26/2001 10:58'!\\\\ninAScrollPane\\\\n\\\\t\\\\\\\"Answer a scroll pane in which the receiver is scrollable\\\\\\\"\\\\n\\\\n\\\\t^ self inATwoWayScrollPane! !\\\\n\\\\n!SyntaxMorph methodsFor: 'initialization' stamp: 'di 1/31/2001 10:14'!\\\\nopenInWindow\\\\n\\\\n\\\\t| window widget sel |\\\\n\\\\tsel _ ''.\\\\n\\\\tself firstSubmorph allMorphs do: [:rr | \\\\n\\\\t\\\\t\\\\t(rr isKindOf: StringMorph) ifTrue: [sel _ sel, rr contents]].\\\\n\\\\twindow _ (SystemWindow labelled: 'Tiles for ', self parsedInClass printString, '>>',sel).\\\\n\\\\twidget _ self inAScrollPane.\\\\n\\\\twidget color: Color paleOrange.\\\\n\\\\twindow\\\\n\\\\t\\\\taddMorph: widget\\\\n\\\\t\\\\tframe: (0@0 extent: 1.0@1.0).\\\\n\\\\twindow openInWorldExtent: (\\\\n\\\\t\\\\tself extent + (20@40) min: (Display boundingBox extent * 0.8) rounded\\\\n\\\\t)\\\\n\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'initialization' stamp: 'FBS 2/24/2004 14:21'!\\\\nreturnNode: aNode expression: expr\\\\n\\\\n\\\\t| row expMorph sMorph aNoiseString |\\\\n\\\\trow _ self addRow: #return on: aNode.\\\\n\\\\tself alansTest1 ifTrue: [\\\\n\\\\t\\\\trow setSpecialOuterTestFormat.\\\\n\\\\t\\\\taNoiseString _ ' Reply '.\\\\n\\\\t\\\\tsMorph _ self aSimpleStringMorphWith: aNoiseString.\\\\n\\\\t\\\\tsMorph \\\\n\\\\t\\\\t\\\\temphasis: TextEmphasis bold emphasisCode;\\\\n\\\\t\\\\t\\\\tsetProperty: #syntacticallyCorrectContents toValue: '^'.\\\\n\\\\n\\\\t\\\\trow addMorphBack: sMorph.\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\trow addToken: '^ ' type: #upArrow on: aNode.\\\\n\\\\t].\\\\n\\\\texpMorph _ expr asMorphicSyntaxIn: row.\\\\n\\\\tself alansTest1 ifTrue: [\\\\n\\\\t\\\\t(expMorph hasProperty: #deselectedColor) ifFalse: [expMorph setConditionalPartStyle].\\\\n\\\\t].\\\\n\\\\texpr addCommentToMorph: row.\\\\n\\\\t^row\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'initialization' stamp: 'tk 1/19/2001 13:29'!\\\\nsample: arg1\\\\n\\\\\\\"a comment\\\\\\\"\\\\n| temp1 |\\\\ntemp1 _ 5.\\\\ntemp1 yourself.\\\\ntemp1 min: arg1.! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'insertion drop zones' stamp: 'di 1/30/2001 21:00'!\\\\nremoveDropZones\\\\n\\\\t\\\\\\\"Remove the insertion drop-zone morphs.\\\\\\\"\\\\n\\\\n\\\\tself submorphsDo:\\\\n\\\\t\\\\t[:mm | (mm isMemberOf: BorderedMorph) ifTrue: [mm delete]].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'insertion drop zones' stamp: 'tk 9/13/2001 15:24'!\\\\ntrackDropZones\\\\n\\\\t| hand i localPt insertion insHt ii prevBot nxtHt d c1 c2 ht2 spacer1 spacer2 wid ht1 dc each |\\\\n\\\\thand _ self primaryHand.\\\\n\\\\t(\\\\\\\"hand lastEvent redButtonPressed &\\\\\\\" hand hasSubmorphs\\\\n\\\\t\\\\tand: [(self hasOwner: hand) not]) ifFalse: [^ self].\\\\n\\\\n\\\\tinsertion _ hand firstSubmorph renderedMorph.\\\\n\\\\tinsertion isSyntaxMorph ifFalse: [^ self].\\\\n\\\\tinsertion isNoun ifFalse: [(insertion nodeClassIs: CommentNode) ifFalse: [^ self]].\\\\n\\\\tlocalPt _ self globalPointToLocal: hand position.\\\\n\\\\tinsHt _ insertion height.  \\\\\\\"**just use standard line height here\\\\\\\"\\\\n\\\\tself removeDropZones.  \\\\\\\"Maybe first check if in right place, then just tweak heights.\\\\\\\"\\\\n\\\\ti _ (ii _ self indexOfMorphAbove: localPt) min: submorphs size-1.\\\\n\\\\tprevBot _ i <= 0 ifTrue: [(self innerBounds) top]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [(self submorphs at: i) bottom].\\\\n\\\\tnxtHt _ (submorphs isEmpty\\\\n\\\\t\\\\tifTrue: [insertion]\\\\n\\\\t\\\\tifFalse: [self submorphs at: i+1]) height.\\\\n\\\\td _ ii > i ifTrue: [nxtHt \\\\\\\"for consistent behavior at bottom\\\\\\\"]\\\\n\\\\t\\\\t\\\\tifFalse: [0 max: (localPt y - prevBot min: nxtHt)].\\\\n\\\\n\\\\t\\\\\\\"Top and bottom spacer heights cause continuous motion...\\\\\\\"\\\\n\\\\tc1 _ Color transparent.  c2 _ Color transparent.\\\\n\\\\tht2 _ d*insHt//nxtHt.  ht1 _ insHt - ht2.\\\\n\\\\twid _ self width - (2*borderWidth) - (2*self layoutInset).\\\\n\\\\twid isPoint ifTrue: [wid _ wid x].\\\\n\\\\t(spacer1 _ BorderedMorph newBounds: (0@0 extent: wid@ht1)\\\\n\\\\t\\\\t\\\\t\\\\tcolor: (ht1 > (insHt//2) ifTrue: [c1] ifFalse: [c2]))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tborderWidth: 1; borderColor: spacer1 color.\\\\n\\\\tself privateAddMorph: spacer1 atIndex: (i+1 max: 1).\\\\n\\\\t(spacer2 _ BorderedMorph newBounds: (0@0 extent: wid@ht2)\\\\n\\\\t\\\\t\\\\t\\\\tcolor: (ht2 > (insHt//2+1) ifTrue: [c1] ifFalse: [c2]))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tborderWidth: 1; borderColor: spacer2 color.\\\\n\\\\tspacer1 setProperty: #dropZone toValue: true.\\\\n\\\\tspacer2 setProperty: #dropZone toValue: true.\\\\n\\\\tself privateAddMorph: spacer2 atIndex: (i+3 min: submorphs size+1).\\\\n\\\\tself fullBounds.  \\\\\\\"Force layout prior to testing for cursor containment\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Maintain the drop target highlight -- highlight spacer if hand is in it.\\\\\\\"\\\\n\\\\t{spacer1. spacer2} do:\\\\n\\\\t\\\\t[:spacer | (spacer containsPoint: localPt) ifTrue:\\\\n\\\\t\\\\t\\\\t[spacer color: self dropColor.\\\\n\\\\t\\\\t\\\\t\\\\\\\"Ignore border color.  Maybe do it later.\\\\n\\\\t\\\\t\\\\tself borderColor = self dropColor\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self borderColor: self stdBorderColor]\\\\\\\"]].\\\\n\\\\t\\\\\\\"If no submorph (incl spacers) highlighted, then re-highlight the block.\\\\\\\"\\\\n\\\\t\\\\\\\"Ignore border color.  Maybe do it later.\\\\n\\\\t((self wantsDroppedMorph: insertion event: hand lastEvent) and:\\\\n\\\\t\\\\t[(self submorphs anySatisfy: [:m | m containsPoint: localPt]) not])\\\\n\\\\t\\\\t\\\\tifTrue: [self borderColor: self dropColor].\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Dragging a tile within a Block, if beside a tile, color it a dropzone\\\\\\\"\\\\n\\\\t\\\\\\\"Transcript show: localPt y printString; space; show: submorphs first top \\\\n\\\\t\\\\tprintString; space; show: submorphs last top printString; cr.\\\\\\\"\\\\n\\\\tdc _ self dropColor.\\\\n\\\\t1 to: ((ii+4 min: submorphs size) max: 1) do: [:ind | \\\\n\\\\t\\\\teach _ submorphs at: ind.\\\\n\\\\t\\\\teach isSyntaxMorph ifTrue: [\\\\n\\\\t\\\\t\\\\tlocalPt y >= each top \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"in this one or beyond\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(localPt y < each bottom) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [(each submorphs anySatisfy: [:m | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tm containsPoint: localPt])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [each setDeselectedColor]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [each color: dc]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [each color = dc ifTrue: [each setDeselectedColor]]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [each color = dc ifTrue: [each setDeselectedColor]]]].\\\\n! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'tk 9/13/2001 15:28'!\\\\nacceptDroppingMorph: aMorph event: evt\\\\n\\\\t| itNoun old |\\\\n\\\\t\\\\\\\"Two cases: 1) a phrase being dropped into a block.  Add a new line.\\\\n\\\\t\\\\t2) aMorph is replacing self by dropping on it.\\\\n\\\\tFor the moment, you have to drop it the right place (the end of a tile if it is complex).  We do not look at enclosing morphs\\\\\\\"\\\\n\\\\n\\\\titNoun _ aMorph isNoun.\\\\n\\\\tself withAllOwnersDo:\\\\n\\\\t\\\\t[:m | (m isSyntaxMorph and: [m isBlockNode])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [m stopStepping; removeDropZones]].\\\\n\\\\tself isBlockNode & itNoun ifTrue:\\\\n\\\\t\\\\t[(aMorph nodeClassIs: TempVariableNode) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[\\\\\\\"If I am a BlockNode, and it is a TempVariableNode, add it into list\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t(self addBlockArg: aMorph)].\\\\n\\\\t\\\\t\\\\\\\"If I am a BlockNode and it is a noun add it as a new line\\\\\\\"\\\\n\\\\t\\\\t^ self addToBlock: aMorph event: evt].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\n\\\\tself isBlockNode ifTrue: [\\\\n\\\\t\\\\t (aMorph nodeClassIs: CommentNode) ifTrue: [^ self addToBlock: aMorph event: evt].\\\\n\\\\t\\\\t (aMorph nodeClassIs: ReturnNode) ifTrue: [^ self addToBlock: aMorph event: evt]].\\\\n\\\\n\\\\t\\\\\\\"Later add args and keywords.  later allow comments to be dropped\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Can't put statement, literal, assignment, or cascade into left side of assignment\\\\\\\"\\\\n\\\\t(owner isSyntaxMorph) ifTrue:\\\\n\\\\t\\\\t[(owner nodeClassIs: AssignmentNode) ifTrue:\\\\n\\\\t\\\\t\\\\t[(owner submorphIndexOf: self) = 1 ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[aMorph isAVariable ifFalse: [ ^ self]]]].\\\\n\\\\n\\\\t(aMorph nodeClassIs: AssignmentNode) ifTrue: [\\\\n\\\\t\\\\titNoun ifFalse: [\\\\\\\"create a new assignment\\\\\\\"\\\\n\\\\t\\\\t\\\\tself isAVariable ifTrue: [^ self newAssignment]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [^ self]]].\\\\t\\\\\\\"only assign to a variable\\\\\\\"\\\\n\\\\n\\\\taMorph deselect.\\\\n\\\\t(old _ owner) replaceSubmorph: self by: aMorph.\\\\t\\\\\\\"do the normal replacement\\\\\\\"\\\\n\\\\t(old isSyntaxMorph) ifTrue: [old cleanupAfterItDroppedOnMe].\\\\t\\\\\\\"now owned by no one\\\\\\\"\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'FBS 2/24/2004 14:24'!\\\\naddBlockArg: aMorph\\\\n\\\\t\\\\\\\"Add a temporary to a block or the method.  Return true if succeed\\\\\\\"\\\\n\\\\t\\\\\\\"(aMorph nodeClassIs: TempVariableNode) is known to be true.\\\\\\\"\\\\n\\\\t\\\\\\\"***NOTE: This method should be combined with addTempVar:\\\\\\\"\\\\n\\\\n\\\\t| tempHolder tt var nn |\\\\n\\\\towner isMethodNode ifTrue: [\\\\n\\\\t\\\\t^ (self addTempVar: aMorph)].\\\\t\\\\\\\"Node for them is not inside the block\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"If exists, drop the temp in this block and let user extend it.\\\\\\\"\\\\n\\\\tnn _ aMorph decompile string.\\\\t\\\\\\\"name\\\\\\\"\\\\n\\\\t(self isKnownVarName: nn) ifTrue: [^ false].\\\\t\\\\\\\"already defined\\\\\\\"\\\\n\\\\n\\\\ttt _ self firstSubmorph.\\\\n\\\\ttempHolder _ tt firstSubmorph isSyntaxMorph \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [(tt nodeClassIs: BlockArgsNode) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [tt] ifFalse: [nil]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [nil].\\\\n\\\\n\\\\ttempHolder ifNil: [\\\\\\\"make new row\\\\\\\"\\\\n\\\\t\\\\ttempHolder _ self addRow: #blockarg1 on: (BlockArgsNode new).\\\\n\\\\t\\\\ttempHolder addNoiseString: self noiseBeforeBlockArg.\\\\n\\\\t\\\\ttempHolder submorphs last firstSubmorph emphasis: TextEmphasis bold emphasisCode.\\\\n\\\\t\\\\ttempHolder useRoundedCorners.\\\\n\\\\n\\\\t\\\\tself addMorphFront: tempHolder.\\\\n\\\\t\\\\taMorph parseNode name: nn key: nn code: nil.\\\\n\\\\t\\\\taMorph parseNode asMorphicSyntaxIn: tempHolder.\\\\n\\\\t\\\\ttempHolder cleanupAfterItDroppedOnMe.\\\\n\\\\t\\\\t^ true].\\\\n\\\\n\\\\t\\\\\\\"Know this variable is not present, so add it\\\\\\\"\\\\n\\\\n\\\\taMorph parseNode name: nn key: nn code: nil.\\\\n\\\\ttempHolder addMorphBack: (tempHolder transparentSpacerOfSize: 4@4).\\\\n\\\\tvar _ tempHolder addRow: #tempVariable on: aMorph parseNode.\\\\n\\\\tvar layoutInset: 1.\\\\n\\\\tvar addMorphBack: (self aSimpleStringMorphWith: nn).\\\\n\\\\tvar cleanupAfterItDroppedOnMe.\\\\n\\\\t^ true\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'RAA 3/25/2001 16:15'!\\\\naddColumn: aColorOrSymbol on: aNode\\\\n\\\\t| col |\\\\n\\\\tself addMorphBack: (col _ self class column: aColorOrSymbol on: aNode).\\\\n\\\\n\\\\\\\"col setProperty: #howCreated toValue: thisContext longStack.\\\\\\\"\\\\n\\\\n\\\\tself alansTest1 ifTrue: [\\\\n\\\\t\\\\t(aColorOrSymbol == #block and: [self isMethodNode not]) ifTrue: [\\\\n\\\\t\\\\t\\\\tcol setConditionalPartStyle.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\t^ col\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'FBS 2/24/2004 14:44'!\\\\naddNoiseString: aNoiseString\\\\n\\\\n\\\\t^self addNoiseString: aNoiseString emphasis: TextEmphasis normal emphasisCode.\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'RAA 3/25/2001 16:17'!\\\\naddNoiseString: aNoiseString emphasis: anInteger\\\\n\\\\n\\\\tself alansTest1 ifFalse: [^self].\\\\n\\\\t^(self addColumn: #keyword1 on: nil)\\\\n\\\\t\\\\tlayoutInset: 1;\\\\n\\\\t\\\\taddMorphBack: ((self noiseStringMorph: aNoiseString)  emphasis: anInteger)\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'RAA 2/15/2001 19:22'!\\\\naddRow: aColorOrSymbol on: aNode\\\\n\\\\n\\\\t| row |\\\\n\\\\tself addMorphBack: (row _ self class row: aColorOrSymbol on: aNode).\\\\n\\\\n\\\\\\\"row setProperty: #howCreated toValue: thisContext longStack.\\\\\\\"\\\\n\\\\n\\\\t^row\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'tk 8/24/2001 15:15'!\\\\naddSingleKeywordRow: aStringLikeItem\\\\n\\\\n\\\\t| row sMorph modifiedString |\\\\n\\\\n\\\\t(row _ self class row: #text on: nil) borderWidth: 1.\\\\n\\\\n\\\\tmodifiedString _ self substituteKeywordFor: aStringLikeItem.\\\\n\\\\tsMorph _ self addString: modifiedString special: true.\\\\n\\\\tsMorph font: (self fontToUseForSpecialWord: modifiedString).\\\\n\\\\tmodifiedString = aStringLikeItem ifFalse: [\\\\n\\\\t\\\\tsMorph setProperty: #syntacticallyCorrectContents toValue: aStringLikeItem].\\\\n\\\\n\\\\trow addMorph: sMorph.\\\\n\\\\tself addMorphBack: row.\\\\n\\\\t^row! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'RAA 4/4/2001 13:15'!\\\\naddString: literalOrVarName special: aBoolean\\\\n\\\\n\\\\t| answer |\\\\n\\\\t\\\\\\\"Create and return an UpdatingStringMorph containing the value.  Use an UpdatingStringMorph, so it can inform its owner when it has been edited. Keep the getSelector being nil\\\\\\\"\\\\n\\\\n\\\\tanswer _ (self anUpdatingStringMorphWith: literalOrVarName special: aBoolean)\\\\n\\\\t\\\\ttarget: self;\\\\n\\\\t\\\\tputSelector: #acceptIgnoring:;\\\\n\\\\t\\\\tuseStringFormat.\\\\n\\\\n\\\\t^answer\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'FBS 2/24/2004 14:23'!\\\\naddTempVar: aMorph \\\\n\\\\t\\\\\\\"know we are a block inside a MethodNode\\\\\\\" \\\\n\\\\t\\\\\\\"(aMorph nodeClassIs: TempVariableNode) is known to be true.\\\\\\\"\\\\n\\\\t| tempHolder ii tt var nn |\\\\n\\\\tnn _ aMorph decompile string.\\\\t\\\\\\\"name\\\\\\\"\\\\n\\\\t(self isKnownVarName: nn) ifTrue: [^ false].\\\\t\\\\\\\"already defined\\\\\\\"\\\\n\\\\n\\\\ttempHolder _ nil.\\\\n\\\\t(ii _ owner submorphIndexOf: self) = 1 ifFalse: [\\\\n\\\\t\\\\ttt _ owner submorphs at: ii - 1.\\\\n\\\\t\\\\ttt isSyntaxMorph ifTrue: [\\\\n\\\\t\\\\t\\\\t(tt nodeClassIs: MethodTempsNode) ifTrue: [tempHolder _ tt].\\\\n\\\\t\\\\t\\\\t(tt nodeClassIs: UndefinedObject) ifTrue: [tempHolder _ tt findA: MethodTempsNode]]].\\\\n\\\\n\\\\ttempHolder ifNil: [\\\\n\\\\t\\\\ttempHolder _ owner addRow: #tempVariable on: MethodTempsNode new.\\\\n\\\\t\\\\ttempHolder addNoiseString: self noiseBeforeBlockArg.\\\\n\\\\t\\\\ttempHolder submorphs last firstSubmorph emphasis: TextEmphasis bold emphasisCode.\\\\n\\\\t\\\\ttempHolder useRoundedCorners.\\\\n\\\\n\\\\t\\\\towner addMorph: tempHolder inFrontOf: self.\\\\n\\\\t\\\\taMorph parseNode name: nn key: nn code: nil.\\\\n\\\\t\\\\taMorph parseNode asMorphicSyntaxIn: tempHolder.\\\\n\\\\t\\\\ttempHolder cleanupAfterItDroppedOnMe.\\\\n\\\\t\\\\t^ true].\\\\n\\\\n\\\\taMorph parseNode name: nn key: nn code: nil.\\\\n\\\\ttempHolder addMorphBack: (tempHolder transparentSpacerOfSize: 4@4).\\\\n\\\\tvar _ tempHolder addRow: #tempVariable on: aMorph parseNode.\\\\n\\\\tvar layoutInset: 1.\\\\n\\\\tvar addMorphBack: (self addString: nn special: false).\\\\n\\\\tvar cleanupAfterItDroppedOnMe.\\\\n\\\\t^ true! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'tk 8/10/2001 09:57'!\\\\naddTextRow: aStringLikeItem\\\\n\\\\n\\\\t| row tt |\\\\n\\\\t(row _ self class row: #text on: nil) borderWidth: 1.\\\\n\\\\t(tt _ TextMorph new) contents: aStringLikeItem.\\\\n\\\\trow addMorph: tt.\\\\n\\\\t\\\\\\\"row addMorph: (self addString: (aStringLikeItem copyWithout: Character cr) special: false).\\\\\\\"\\\\n\\\\tself addMorphBack: row.\\\\n\\\\t^row! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'tk 7/25/2001 10:01'!\\\\naddToBlock: aMorph event: evt\\\\n\\\\t\\\\\\\"Insert a new line of code.  Figure out who it goes before.  If evt Y is within an existing line (to the right of a tile), then replace that tile.\\\\\\\"\\\\n\\\\n\\\\t| whereDropped dropBefore replace |\\\\n\\\\twhereDropped _ \\\\\\\"self pointFromWorld:\\\\\\\" evt cursorPoint.\\\\n\\\\tdropBefore _ self submorphs \\\\n\\\\t\\\\tdetect: [:each | each isSyntaxMorph ifTrue: [\\\\n\\\\t\\\\t\\\\twhereDropped y < each top ifTrue: [true]\\\\t\\\\\\\"before this one\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [whereDropped y < each bottom \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [replace _ true]\\\\t\\\\\\\"replace this one\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [false]]]] \\\\\\\"try next line\\\\\\\"\\\\n\\\\t\\\\tifNone: [nil].\\\\n\\\\t(aMorph nodeClassIs: ReturnNode) ifTrue: [dropBefore _ nil].\\\\n\\\\t\\\\t\\\\\\\"Returns are always at the end. (Watch out for comments)\\\\\\\"\\\\n\\\\n\\\\tdropBefore \\\\n\\\\t\\\\tifNil: [self addMorphBack: aMorph]\\\\n\\\\t\\\\tifNotNil: [\\\\n\\\\t\\\\t\\\\treplace ifNotNil: [aMorph deselect.\\\\n\\\\t\\\\t\\\\t\\\\tself replaceSubmorph: dropBefore by: aMorph.\\\\t\\\\\\\"replace it!!\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t^ dropBefore cleanupAfterItDroppedOnMe].\\\\t\\\\\\\"now owned by no one\\\\\\\"\\\\n\\\\t\\\\t\\\\tself addMorph: aMorph inFrontOf: dropBefore].\\\\n\\\\tself cleanupAfterItDroppedOnMe.\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'FBS 2/24/2004 14:22'!\\\\naddToken: aString type: aColorOrSymbol on: aNode\\\\n\\\\n\\\\t| sMorph modifiedString noiseWord row |\\\\n\\\\n\\\\trow _ (self addRow: aColorOrSymbol on: aNode) layoutInset: 1.\\\\n\\\\tself alansTest1 ifFalse: [\\\\n\\\\t\\\\tsMorph _ self addString: aString special: false.\\\\n\\\\t\\\\trow addMorphBack: sMorph.\\\\n\\\\t\\\\t^row\\\\n\\\\t].\\\\n\\\\n\\\\tnoiseWord _ [ :w |\\\\n\\\\t\\\\tw ifNotNil: [\\\\n\\\\t\\\\t\\\\trow \\\\n\\\\t\\\\t\\\\t\\\\taddMorphBack: (self noiseStringMorph: w);\\\\n\\\\t\\\\t\\\\t\\\\taddMorphBack: (self tokenVerticalSeparator)\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\t(self shouldBeBrokenIntoWords: aColorOrSymbol) ifTrue: [\\\\n\\\\t\\\\tmodifiedString _ self substituteKeywordFor: aString.\\\\n\\\\t\\\\tsMorph _ self addString: modifiedString special: (aColorOrSymbol ~= #assignmentArrow).\\\\n\\\\t\\\\t\\\\t\\\\\\\"(#(unary keywordGetz keywordSetter unaryGetter) includes: aColorOrSymbol)\\\\\\\"\\\\n\\\\t\\\\tmodifiedString = aString ifFalse: [\\\\n\\\\t\\\\t\\\\tsMorph setProperty: #syntacticallyCorrectContents toValue: aString].\\\\n\\\\t\\\\tsMorph setProperty: #syntacticReformatting toValue: aColorOrSymbol;\\\\n\\\\t\\\\t\\\\tcontents: modifiedString.\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tsMorph _ self addString: (modifiedString _ aString) special: false.\\\\n\\\\t].\\\\n\\\\t(#(keyword2 upArrow) includes: aColorOrSymbol) ifTrue: [\\\\n\\\\t\\\\tsMorph \\\\n\\\\t\\\\t\\\\tfont: (self fontToUseForSpecialWord: modifiedString).\\\\n\\\\t].\\\\n\\\\t(#(keyword2 unary assignmentArrow methodHeader1 methodHeader2) includes: aColorOrSymbol) ifTrue: [\\\\n\\\\t\\\\tsMorph emphasis: TextEmphasis bold emphasisCode.\\\\n\\\\t].\\\\n\\\\taColorOrSymbol == #blockarg1 ifTrue: [\\\\n\\\\t].\\\\n\\\\t(aColorOrSymbol == #variable or: [aColorOrSymbol == #tempVariable]) ifTrue: [\\\\n\\\\t\\\\taString = 'self' ifTrue: [\\\\n\\\\t\\\\t\\\\tsMorph setProperty: #wordyVariantOfSelf toValue: true.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tnoiseWord value: (self noiseWordBeforeVariableNode: aNode string: aString).\\\\n\\\\t].\\\\n\\\\n\\\\trow addMorphBack: sMorph.\\\\n\\\\t^row! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'RAA 3/25/2001 17:22'!\\\\naddTokenSpecialCase: aString type: aColorOrSymbol on: aNode\\\\n\\\\n\\\\t| sMorph modifiedString noiseWord col |\\\\n\\\\n\\\\tnoiseWord _ nil.\\\\n\\\\tsMorph _ self addString: aString special: false.\\\\n\\\\t(aColorOrSymbol == #keyword2) ifTrue: [\\\\n\\\\t\\\\tmodifiedString _ aString = 'if:' ifTrue: ['Test'] ifFalse: ['Yes'].\\\\n\\\\t\\\\tsMorph \\\\n\\\\t\\\\t\\\\tfont: (self fontToUseForSpecialWord: modifiedString); \\\\n\\\\t\\\\t\\\\tsetProperty: #syntacticallyCorrectContents toValue: aString;\\\\n\\\\t\\\\t\\\\tcontents: modifiedString.\\\\n\\\\t].\\\\n\\\\n\\\\tcol _ (self addRow: aColorOrSymbol on: aNode) layoutInset: 1.\\\\n\\\\tnoiseWord ifNotNil: [\\\\n\\\\t\\\\tcol \\\\n\\\\t\\\\t\\\\taddMorphBack: (self noiseStringMorph: noiseWord);\\\\n\\\\t\\\\t\\\\taddMorphBack: (self transparentSpacerOfSize: 3@1)\\\\n\\\\t].\\\\n\\\\tcol addMorphBack: sMorph.\\\\n\\\\t^col! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'tk 8/24/2001 15:21'!\\\\naddUnaryRow: aStringLikeItem style: aSymbol\\\\n\\\\n\\\\t| row sMorph modifiedString fontToUse |\\\\n\\\\n\\\\t(row _ self class row: #text on: nil) borderWidth: 1.\\\\n\\\\tmodifiedString _ self substituteKeywordFor: aStringLikeItem.\\\\n\\\\tsMorph _ self addString: modifiedString special: true.\\\\n\\\\tfontToUse _ self fontToUseForSpecialWord: modifiedString.\\\\n\\\\n\\\\tsMorph \\\\n\\\\t\\\\tfont: fontToUse emphasis: 1;\\\\n\\\\t\\\\tsetProperty: #syntacticReformatting toValue: #unary.\\\\n\\\\tmodifiedString = aStringLikeItem ifFalse: [\\\\n\\\\t\\\\tsMorph setProperty: #syntacticallyCorrectContents toValue: aStringLikeItem].\\\\n\\\\trow addMorph: sMorph.\\\\n\\\\tself addMorphBack: row.\\\\n\\\\t^row! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'RAA 2/15/2001 19:43'!\\\\nfoldMessage\\\\n\\\\t\\\\\\\"I am a message whose receiver is wide, and whose message part is a column.\\\\n\\\\tRearrange me so that the message part appears indented under the receiver part.\\\\\\\"\\\\n\\\\t| messageRow node2 |\\\\n\\\\tnode2 _ parseNode copy receiver: nil.\\\\n\\\\tmessageRow _ SyntaxMorph row: #keyword1 on: node2.\\\\n\\\\n\\\\tmessageRow \\\\n\\\\t\\\\taddMorph: (self transparentSpacerOfSize: 20@10);\\\\n\\\\t\\\\taddMorphBack: submorphs last.\\\\t\\\\t\\\\\\\"<<handle noise words better\\\\\\\"\\\\n\\\\tself listDirection: #topToBottom;\\\\n\\\\t\\\\twrapCentering: #topLeft;\\\\n\\\\t\\\\taddMorphBack: (self transparentSpacerOfSize: 4@4);\\\\n\\\\t\\\\taddMorphBack: messageRow.\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'tk 1/15/2001 11:15'!\\\\nfoldMessageOneArg\\\\n\\\\t\\\\\\\"I am a message that is wide, a row with receiver and a row with selector and arg.\\\\n\\\\tRearrange me so that the message part appears indented under the receiver part.\\\\\\\"\\\\n\\\\t| messageRow node2 |\\\\n\\\\tnode2 _ parseNode copy receiver: nil.\\\\n\\\\tmessageRow _ SyntaxMorph row: #keyword1 on: node2.\\\\n\\\\tmessageRow addMorph: (self transparentSpacerOfSize: 20@10);\\\\n\\\\t\\\\t\\\\taddMorphBack: submorphs second;\\\\n\\\\t\\\\t\\\\taddMorphBack: submorphs second.  \\\\\\\"was the third\\\\\\\"\\\\n\\\\tself listDirection: #topToBottom;\\\\n\\\\t\\\\twrapCentering: #topLeft;\\\\n\\\\t\\\\taddMorphBack: messageRow.\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'tk 8/22/2001 16:30'!\\\\nisKnownVarName: newVarName\\\\n\\\\t\\\\\\\"Return true if this variable is already known, as an argument, temp var, block temp, or instance variable.\\\\\\\"\\\\n\\\\n\\\\t| syntLevel |\\\\n\\\\t(self parsedInClass allInstVarNames includes: newVarName) ifTrue: [^ true].\\\\n\\\\tsyntLevel _ self.\\\\n\\\\t[syntLevel tempVarNodesDo: [:node | \\\\n\\\\t\\\\tnode decompile string = newVarName ifTrue: [^ true]].\\\\n\\\\t (syntLevel _ syntLevel owner) isSyntaxMorph] whileTrue.\\\\n\\\\t^ false! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'tk 8/1/2001 13:06'!\\\\nremoveReturnNode\\\\n\\\\t| blk |\\\\n\\\\t\\\\\\\"If last line is ^ self, remove it.  I am a methodNode.  Keep if no other tiles in the block.\\\\\\\"\\\\n\\\\n\\\\tblk _ self findA: BlockNode.\\\\n\\\\tblk submorphs last decompile string = '^self ' ifTrue: [\\\\n\\\\t\\\\t(blk submorphs count: [:ss | ss isSyntaxMorph]) > 1 ifTrue: [\\\\n\\\\t\\\\t\\\\tblk submorphs last delete]].! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'tk 8/22/2001 16:35'!\\\\ntempVarNodesDo: aBlock\\\\n\\\\t\\\\\\\"Execute the block for any block temporary variables, method temps, or method args we have\\\\\\\"\\\\n\\\\n\\\\t| tempHolder argsHolder |\\\\n\\\\t((self parseNode class == MethodNode) or: [self parseNode class == BlockNode]) ifTrue: [\\\\n\\\\t\\\\tself submorphsDoIfSyntax: [:sub | \\\\n\\\\t\\\\t\\\\t\\\\t(sub nodeClassIs: MethodTempsNode) ifTrue: [tempHolder _ sub].\\\\n\\\\t\\\\t\\\\t\\\\t((sub nodeClassIs: UndefinedObject) and: [tempHolder isNil]) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttempHolder _ sub findA: MethodTempsNode].\\\\n\\\\t\\\\t\\\\t\\\\t(sub nodeClassIs: BlockArgsNode) ifTrue: [tempHolder _ sub].\\\\n\\\\t\\\\t\\\\t\\\\t(sub nodeClassIs: SelectorNode) ifTrue: [argsHolder _ sub].\\\\n\\\\t\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t\\\\tifString: [:sub | ].\\\\n\\\\t\\\\ttempHolder ifNotNil: [\\\\\\\"Temp variables\\\\\\\"\\\\n\\\\t\\\\t\\\\ttempHolder submorphsDoIfSyntax: [:sm | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(sm nodeClassIs: TempVariableNode) ifTrue: [aBlock value: sm]]\\\\n\\\\t\\\\t\\\\t\\\\tifString: [:sm | ]].\\\\n\\\\t\\\\targsHolder ifNotNil: [\\\\\\\"arguments\\\\\\\"\\\\n\\\\t\\\\t\\\\targsHolder submorphsDoIfSyntax: [:sm | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(sm nodeClassIs: TempVariableNode) ifTrue: [aBlock value: sm]]\\\\n\\\\t\\\\t\\\\t\\\\tifString: [:sm | ]].\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\\\\"otherwise do nothing\\\\\\\"! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'tk 2/12/2001 14:39'!\\\\ntry\\\\n\\\\t\\\\\\\"Evaluate me once\\\\\\\"\\\\n\\\\n\\\\t(#(MessageNode LiteralNode VariableNode) includes: parseNode class name) \\\\n\\\\t\\\\tifFalse: [^ Error new].\\\\n\\\\t^ [Compiler evaluate: self decompile\\\\n\\\\t\\\\t\\\\t\\\\tfor: self actualObject\\\\n\\\\t\\\\t\\\\t\\\\tlogged: false.\\\\t\\\\\\\"should do something to the player\\\\\\\"\\\\n\\\\t\\\\t] ifError: [ :a :b | Error new].! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'ar 8/10/2003 18:19'!\\\\nunfoldMessage\\\\n\\\\t\\\\\\\"I am a message whose message part is a column.\\\\n\\\\tRearrange me so that the entire message is one row.\\\\\\\"\\\\n\\\\t| messageRow |\\\\n\\\\tmessageRow _ self submorphs last.\\\\n\\\\tself removeMorph: messageRow.\\\\n\\\\tmessageRow submorphs do: [:m | self addMorphBack: m].\\\\n\\\\n! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'macpal' stamp: 'sw 6/4/2001 19:26'!\\\\ncurrentVocabulary\\\\n\\\\t\\\\\\\"Answer the current vocabulary associated with the receiver.  If none is yet set, determine an appropriate vocabulary and cache it within my properties dictionary.\\\\\\\"\\\\n\\\\n\\\\t| aVocab aSym |\\\\n\\\\taSym _ self valueOfProperty: #currentVocabularySymbol ifAbsent: [nil].\\\\n\\\\taSym ifNil:\\\\n\\\\t\\\\t[aVocab _ self valueOfProperty: #currentVocabulary ifAbsent: [nil].\\\\n\\\\t\\\\taVocab ifNotNil:\\\\n\\\\t\\\\t\\\\t[aSym _ aVocab vocabularyName.\\\\n\\\\t\\\\t\\\\tself removeProperty: #currentVocabulary.\\\\n\\\\t\\\\t\\\\tself setProperty: #currentVocabularySymbol toValue: aSym]].\\\\n\\\\n\\\\taSym ifNotNil:\\\\n\\\\t\\\\t[^ Vocabulary vocabularyNamed: aSym].\\\\n\\\\taVocab _ super currentVocabulary.\\\\n\\\\tself setProperty: #currentVocabularySymbol toValue: aVocab vocabularyName.\\\\n\\\\t^ aVocab! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'menus' stamp: 'tk 9/27/2001 19:09'!\\\\naccept\\\\n\\\\t\\\\\\\"Turn my current state into the text of a method.  Compile it in my class.\\\\\\\"\\\\n\\\\n\\\\t^ self acceptInCategory: ClassOrganizer default! !\\\\n\\\\n!SyntaxMorph methodsFor: 'menus' stamp: 'tk 11/21/2000 16:35'!\\\\nacceptIfInScriptor\\\\n\\\\t| root |\\\\n\\\\t\\\\\\\"If I am in a ScriptEditorMorph, tell my root to accept the new changes.\\\\\\\"\\\\n\\\\n\\\\t(self ownerThatIsA: ScriptEditorMorph) ifNotNil: [\\\\n\\\\t\\\\troot _ self rootTile.\\\\n\\\\t\\\\troot ifNotNil: [root accept]]. ! !\\\\n\\\\n!SyntaxMorph methodsFor: 'menus' stamp: 'RAA 2/14/2001 15:40'!\\\\nacceptIgnoring: aString\\\\n\\\\t\\\\\\\"If I am inside a ScriptEditorMorph, tell my root to accept the new changes.  Ignore the argument, which is the string whose conents just changed.\\\\\\\"\\\\n\\\\n\\\\tthisContext sender receiver removeProperty: #syntacticallyCorrectContents.\\\\n\\\\tself acceptIfInScriptor! !\\\\n\\\\n!SyntaxMorph methodsFor: 'menus' stamp: 'tk 9/27/2001 17:15'!\\\\nacceptInCategory: categoryString\\\\n\\\\t\\\\\\\"Turn my current state into the text of a method.  Compile it in my class.\\\\\\\"\\\\n\\\\t| cls sc sel |\\\\n\\\\tself isMethodNode ifFalse: [\\\\n\\\\t\\\\tself rootTile == self ifTrue: [^ self].  \\\\\\\"not in a script\\\\\\\"\\\\n\\\\t\\\\t^ self rootTile accept  \\\\\\\"always accept at the root\\\\\\\"].\\\\n\\\\t(cls _ self parsedInClass) ifNil: [^ self].\\\\n\\\\tsel _ cls compile: self decompile classified: categoryString.\\\\n\\\\t(sc _ self firstOwnerSuchThat: [:mm | mm class == ScriptEditorMorph]) \\\\n\\\\t\\\\tifNotNil: [sc hibernate; unhibernate].\\\\t\\\\\\\"rebuild the tiles\\\\\\\"\\\\n\\\\t^ sel! !\\\\n\\\\n!SyntaxMorph methodsFor: 'menus' stamp: 'tk 9/27/2001 19:12'!\\\\nacceptSilently\\\\n\\\\t\\\\\\\"Turn my current state into the text of a method.\\\\n\\\\tCompile it in my class.  Don't rebuild the tiles.\\\\\\\"\\\\n\\\\t| cls |\\\\n\\\\tself isMethodNode ifFalse: [\\\\n\\\\t\\\\tself rootTile == self ifTrue: [^ false].  \\\\\\\"not in a script\\\\\\\"\\\\n\\\\t\\\\t^ self rootTile acceptSilently  \\\\\\\"always accept at the root\\\\\\\"].\\\\n\\\\t(self ownerThatIsA: ScriptEditorMorph) ifNil: [^ false].\\\\n\\\\t(cls _ self parsedInClass) ifNil: [^ false].\\\\n\\\\tcls compile: self decompile classified: 'scripts'.\\\\n\\\\t^ true! !\\\\n\\\\n!SyntaxMorph methodsFor: 'menus' stamp: 'di 5/4/2001 12:14'!\\\\nacceptUnlogged\\\\n\\\\t\\\\\\\"This is an exact copy of acceptSilently, except it does not log to the source file.\\\\n\\\\tUsed for all but the last of scrolling number changes.\\\\\\\"\\\\n\\\\t| cls |\\\\n\\\\tself isMethodNode ifFalse:\\\\n\\\\t\\\\t[self rootTile == self ifTrue: [^ self].  \\\\\\\"not in a script\\\\\\\"\\\\n\\\\t\\\\t^ self rootTile acceptUnlogged  \\\\\\\"always accept at the root\\\\\\\"].\\\\n\\\\t(self ownerThatIsA: ScriptEditorMorph) ifNil: [^ self].\\\\n\\\\t(cls _ self parsedInClass) ifNil: [^ self].\\\\n\\\\tcls compile: self decompile\\\\n\\\\t\\\\tclassified: ClassOrganizer default\\\\n\\\\t\\\\twithStamp: nil\\\\n\\\\t\\\\tnotifying: nil\\\\n\\\\t\\\\tlogSource: false.\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'menus' stamp: 'md 8/15/2005 11:02'!\\\\ndecompile\\\\n\\\\t| stream |\\\\n\\\\t\\\\\\\"Produce Smalltalk code.  We have a tree of SyntaxMorphs, but not a tree of ParseNodes.  The user has dragged in many SyntaxMorphs, each with its own parseNode, but those nodes are not sewn together in a tree.  The only data we get from a ParseNode is its class.\\\\n\\\\tWe produce really ugly code.  But we compile it and decompile (prettyPrint) again for user to see.\\\\\\\"\\\\n\\\\n\\\\tstream _ ColoredCodeStream on: (Text new: 400).\\\\n\\\\tself printOn: stream indent: 1.\\\\t\\\\\\\"Tree walk and produce text of the code\\\\\\\"\\\\n\\\\t^ stream contents! !\\\\n\\\\n!SyntaxMorph methodsFor: 'menus' stamp: 'di 11/13/2000 20:23'!\\\\ngetMenuBlock\\\\n\\\\n\\\\t^ nil! !\\\\n\\\\n!SyntaxMorph methodsFor: 'menus' stamp: 'tk 9/23/2001 02:05'!\\\\nofferTilesMenuFor: aReceiver in: aLexiconModel\\\\n\\\\t\\\\\\\"Offer a menu of tiles for assignment and constants\\\\\\\"\\\\n\\\\n\\\\t| menu |\\\\n\\\\tmenu _ MenuMorph new addTitle: 'Hand me a tile for...'.\\\\n\\\\tmenu addLine.\\\\n\\\\tmenu add: '(accept method now)' target: aLexiconModel selector: #acceptTiles.\\\\n\\\\tmenu submorphs last color: Color red darker.\\\\n\\\\tmenu addLine.\\\\n\\\\n\\\\tmenu add: 'me, by name' target: self  selector: #attachTileForCode:nodeType: \\\\n\\\\t\\\\t\\\\t\\\\targumentList: {'<me by name>'. aReceiver}.\\\\n\\\\tmenu add: 'self' target: self  selector: #attachTileForCode:nodeType: \\\\n\\\\t\\\\t\\\\t\\\\targumentList: {'self'. VariableNode}.\\\\n\\\\tmenu add: '_   (assignment)' target: self  selector: #attachTileForCode:nodeType: \\\\n\\\\t\\\\t\\\\t\\\\targumentList: {'<assignment>'. nil}.\\\\n\\\\tmenu add: '\\\\\\\"a Comment\\\\\\\"' target: self  selector: #attachTileForCode:nodeType: \\\\n\\\\t\\\\t\\\\t\\\\targumentList: {'\\\\\\\"a comment\\\\\\\"\\\\\\\\' withCRs. CommentNode}.\\\\n\\\\tmenu submorphs last color: Color blue.\\\\n\\\\tmenu add: 'a Number' target: self  selector: #attachTileForCode:nodeType: \\\\n\\\\t\\\\t\\\\t\\\\targumentList: {'5'. LiteralNode}.\\\\n\\\\tmenu add: 'a Character' target: self  selector: #attachTileForCode:nodeType: \\\\n\\\\t\\\\t\\\\t\\\\targumentList: {'$z'. LiteralNode}.\\\\n\\\\tmenu add: '''abc''' target: self selector: #attachTileForCode:nodeType: \\\\n\\\\t\\\\t\\\\t\\\\targumentList: {'''abc'''. LiteralNode}.\\\\n\\\\tmenu add: 'a Symbol constant' target: self selector: #attachTileForCode:nodeType: \\\\n\\\\t\\\\t\\\\t\\\\targumentList: {'#next'. LiteralNode}.\\\\n\\\\tmenu add: 'true' target: self selector: #attachTileForCode:nodeType: \\\\n\\\\t\\\\t\\\\t\\\\targumentList: {'true'. VariableNode}.\\\\n\\\\tmenu add: 'a Test' target: self  selector: #attachTileForCode:nodeType: \\\\n\\\\t\\\\t\\\\t\\\\targumentList: {'true ifTrue: [self] ifFalse: [self]'. MessageNode}.\\\\n\\\\tmenu add: 'a Loop' target: self selector: #attachTileForCode:nodeType: \\\\n\\\\t\\\\t\\\\t\\\\targumentList: {'1 to: 10 do: [:index | self]'. MessageNode}.\\\\n\\\\tmenu add: 'a Block' target: self selector: #attachTileForCode:nodeType: \\\\n\\\\t\\\\t\\\\t\\\\targumentList: {'[self]'. BlockNode}.\\\\n\\\\tmenu add: 'a Class or Global' target: self selector: #attachTileForCode:nodeType: \\\\n\\\\t\\\\t\\\\t\\\\targumentList: {'Character'. LiteralVariableNode}.\\\\n\\\\tmenu add: 'a Reply' target: self selector: #attachTileForCode:nodeType: \\\\n\\\\t\\\\t\\\\t\\\\targumentList: {'| temp | temp'. ReturnNode}.\\\\n\\\\tmenu popUpAt: ActiveHand position forHand: ActiveHand in: World.\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'menus' stamp: 'tk 9/17/2001 13:38'!\\\\nofferVarsMenuFor: aReceiver in: aLexiconModel\\\\n\\\\t\\\\\\\"Offer a menu of tiles for assignment and constants\\\\\\\"\\\\n\\\\n\\\\t| menu instVarList cls |\\\\n\\\\tmenu _ MenuMorph new addTitle: 'Hand me a tile for...'.\\\\n\\\\tmenu addLine.\\\\n\\\\tmenu add: '(accept method now)' target: aLexiconModel selector: #acceptTiles.\\\\n\\\\tmenu submorphs last color: Color red darker.\\\\n\\\\tmenu addLine.\\\\n\\\\tmenu add: 'new temp variable' target: self selector: #attachTileForCode:nodeType: \\\\n\\\\t\\\\t\\\\t\\\\targumentList: {'| temp | temp'. TempVariableNode}.\\\\n\\\\n\\\\tinstVarList _ OrderedCollection new.\\\\n\\\\tcls _ aReceiver class.\\\\n\\\\t[instVarList addAllFirst: cls instVarNames.\\\\n\\\\t cls == aLexiconModel limitClass] whileFalse: [cls _ cls superclass].\\\\n\\\\tinstVarList do: [:nn |\\\\n\\\\t\\\\tmenu add: nn target: self selector: #instVarTile: argument: nn].\\\\n\\\\tmenu popUpAt: ActiveHand position forHand: ActiveHand in: World.\\\\n\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'menus' stamp: 'tk 12/14/2001 11:58'!\\\\nputOnBackground\\\\n\\\\t\\\\\\\"Place the receiver, formerly private to its card, onto the shared background.  If the receiver needs data carried on its behalf by the card, such data will be represented on every card.\\\\\\\"\\\\n\\\\n\\\\t| updStr |\\\\n\\\\t(updStr _ self readOut) ifNotNil: [\\\\\\\"If has a place to put per-card data, set that up.\\\\\\\"\\\\n\\\\t\\\\tupdStr getSelector ifNotNil: [\\\\n\\\\t\\\\t\\\\tself setProperty: #holdsSeparateDataForEachInstance toValue: true]].\\\\n\\\\tsuper putOnBackground.! !\\\\n\\\\n!SyntaxMorph methodsFor: 'menus' stamp: 'di 11/17/2000 09:00'!\\\\nshowCode\\\\n\\\\t\\\\\\\"Turn my current state into the text of a method.  Put it in a window.\\\\\\\"\\\\n\\\\n\\\\t(Workspace new contents: self rootTile decompile) openLabel: self printString,' code'\\\\n\\\\n\\\\t\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'menus' stamp: 'tk 12/10/2001 17:48'!\\\\nshowMenu: evt\\\\n\\\\t| menu |\\\\n\\\\tmenu _ MenuMorph new.\\\\n\\\\tself rootTile isMethodNode ifTrue:\\\\n\\\\t\\\\t[menu add: 'accept method' target: self selector: #accept.\\\\n\\\\t\\\\tmenu addLine.\\\\n\\\\n\\\\t\\\\tmenu add: 'new temp variable' target: self selector: #attachTileForCode:nodeType: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\targumentList: {'| temp | temp'. TempVariableNode}.\\\\n\\\\t\\\\tmenu addLine.\\\\n\\\\n\\\\t\\\\tself parsedInClass allInstVarNames do: [:nn |\\\\n\\\\t\\\\t\\\\tmenu add: nn,' tile' target: self selector: #instVarTile: argument: nn].\\\\n\\\\t\\\\tmenu addLine.\\\\n\\\\n\\\\t\\\\tmenu add: 'show code' target: self selector: #showCode.\\\\n\\\\t\\\\tmenu add: 'try out' target: self selector: #try.\\\\n\\\\t\\\\tmenu popUpAt: evt hand position forHand: evt hand in: World].\\\\n\\\\n\\\\n\\\\n! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'new tiles' stamp: 'FBS 2/24/2004 14:32'!\\\\nattachTileForCode: expression nodeType: nodeClass\\\\n\\\\t| nn master tile |\\\\n\\\\t\\\\\\\"create a new tile for a part of speech, and put it into the hand\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"a few special cases\\\\\\\"\\\\n\\\\texpression = 'self' ifTrue: [\\\\n\\\\t\\\\t^ (((self string: expression toTilesIn: Object) \\\\n\\\\t\\\\t\\\\t\\\\tfindA: ReturnNode) findA: nodeClass) attachToHand].\\\\n\\\\n\\\\texpression = '<me by name>' ifTrue: [\\\\\\\"Tile for the variable in References\\\\\\\"\\\\n\\\\t\\\\tnn _ nodeClass knownName ifNil: [#+].\\\\n\\\\t\\\\t(References at: nn asSymbol ifAbsent: [nil]) == nodeClass ifTrue: [\\\\n\\\\t\\\\t\\\\t^ self attachTileForCode: nn nodeType: LiteralVariableNode].\\\\n\\\\t\\\\t\\\\\\\"otherwise just give a tile for self\\\\\\\"\\\\n\\\\t\\\\t^ self attachTileForCode: 'self' nodeType: VariableNode].\\\\n\\\\n\\\\texpression = '<assignment>' ifTrue: [\\\\\\\"do something really special\\\\\\\"\\\\n\\\\t\\\\tmaster _ self class new.\\\\n\\\\t\\\\tmaster addNoiseString: '  _  ' emphasis: TextEmphasis bold emphasisCode.\\\\n\\\\t\\\\ttile _ master firstSubmorph.\\\\n\\\\t\\\\t^ (tile parseNode: AssignmentNode new) attachToHand].\\\\t\\\\\\\"special marker\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"When this is dropped on a variable, enclose it in \\\\n\\\\t\\\\t\\\\ta new assignment statement\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"general case -- a tile for a whole line of code is returned\\\\\\\"\\\\n\\\\t^ ((self string: expression toTilesIn: Object) \\\\n\\\\t\\\\t\\\\t\\\\tfindA: nodeClass) attachToHand.! !\\\\n\\\\n!SyntaxMorph methodsFor: 'new tiles' stamp: 'tk 9/7/2001 11:21'!\\\\nattachToHand\\\\n\\\\t\\\\\\\"Adjust my look and attach me to the hand\\\\\\\"\\\\n\\\\n\\\\tself roundedCorners.\\\\n\\\\tActiveHand attachMorph: self.\\\\n\\\\tPreferences tileTranslucentDrag\\\\n\\\\t\\\\tifTrue: [self lookTranslucent.\\\\n\\\\t\\\\t\\\\tself align: self center with: ActiveHand position \\\\\\\"+ self cursorBaseOffset\\\\\\\"]\\\\n\\\\t\\\\tifFalse: [self align: self topLeft with: ActiveHand position + self cursorBaseOffset]\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'new tiles' stamp: 'tk 8/30/2001 06:22'!\\\\ninstVarTile: aName\\\\n\\\\t\\\\\\\"Make and put into hand a tile for an instance variable\\\\\\\"\\\\n\\\\n\\\\t| sm |\\\\n\\\\tsm _ ((VariableNode new\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tname: aName\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tindex: 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttype: 1 \\\\\\\"LdInstType\\\\\\\") asMorphicSyntaxIn: SyntaxMorph new).\\\\n\\\\tsm roundedCorners.\\\\n\\\\tActiveHand attachMorph: sm.\\\\n\\\\tPreferences tileTranslucentDrag\\\\n\\\\t\\\\tifTrue: [sm lookTranslucent.\\\\n\\\\t\\\\t\\\\tsm align: sm center with: ActiveHand position \\\\\\\"+ self cursorBaseOffset\\\\\\\"]\\\\n\\\\t\\\\tifFalse: [sm align: sm topLeft with: ActiveHand position + self cursorBaseOffset]\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'new tiles' stamp: 'tk 9/13/2001 13:44'!\\\\nstring: anExpression toTilesIn: playerClass\\\\n\\\\t| code tree methodNode |\\\\n\\\\t\\\\\\\"Construct SyntaxMorph tiles for some code.  Returns the main BlockNode of a doIt.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"This is really cheating!!  Make a true parse tree later. -tk\\\\\\\"\\\\n\\\\tcode _ String streamContents: [:strm | \\\\n\\\\t\\\\tstrm nextPutAll: 'doIt'; cr; tab; nextPutAll: anExpression].\\\\n\\\\t\\\\\\\"decompile to tiles\\\\\\\"\\\\n\\\\ttree _ Compiler new \\\\n\\\\t\\\\tparse: code \\\\n\\\\t\\\\tin: playerClass\\\\n\\\\t\\\\tnotifying: nil.\\\\n\\\\tmethodNode _ tree asMorphicSyntaxUsing: SyntaxMorph.\\\\n\\\\tanExpression first == $\\\\\\\" ifTrue: [\\\\\\\"a comment\\\\\\\" \\\\n\\\\t\\\\t\\\\\\\"(methodNode findA: CommentNode) firstSubmorph color: Color blue.\\\\\\\"\\\\n\\\\t\\\\t^ methodNode].\\\\n\\\\t^ methodNode submorphs detect: [:mm | \\\\n\\\\t\\\\t(mm respondsTo: #parseNode) \\\\n\\\\t\\\\t\\\\tifTrue: [mm parseNode class == BlockNode] \\\\n\\\\t\\\\t\\\\tifFalse: [false]].\\\\n! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'FBS 2/24/2004 14:23'!\\\\naddTemporaries: temporaries \\\\n\\\\t| tempMorph outerMorph w2 |\\\\n\\\\ttemporaries notEmpty ifFalse: [^self].\\\\n\\\\tself alansTest1 \\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[tempMorph := self addRow: #tempVariable on: MethodTempsNode new.\\\\n\\\\t\\\\t\\\\ttemporaries do: [:temp | temp asMorphicSyntaxIn: tempMorph]\\\\n\\\\t\\\\t\\\\t\\\\tseparatedBy: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[tempMorph addMorphBack: (tempMorph transparentSpacerOfSize: 4 @ 4)].\\\\n\\\\t\\\\t\\\\t^self].\\\\n\\\\touterMorph := self addRow: #tempVariable on: nil.\\\\n\\\\touterMorph setSpecialTempDeclarationFormat1.\\\\n\\\\touterMorph \\\\n\\\\t\\\\taddMorphBack: (w2 := self noiseStringMorph: self noiseBeforeBlockArg).\\\\n\\\\tw2 emphasis: TextEmphasis bold emphasisCode.\\\\n\\\\ttempMorph := outerMorph addRow: #tempVariable on: MethodTempsNode new.\\\\n\\\\ttempMorph setSpecialTempDeclarationFormat2.\\\\n\\\\ttemporaries do: \\\\n\\\\t\\\\t\\\\t[:temp | \\\\n\\\\t\\\\t\\\\ttempMorph \\\\n\\\\t\\\\t\\\\t\\\\taddToken: temp name\\\\n\\\\t\\\\t\\\\t\\\\ttype: #tempVariableDeclaration\\\\n\\\\t\\\\t\\\\t\\\\ton: temp]\\\\n\\\\t\\\\tseparatedBy: [tempMorph addMorphBack: self tokenVerticalSeparator]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'tk 7/31/2001 17:27'!\\\\naddTemporaryControls\\\\n\\\\n\\\\t| row stdSize |\\\\n\\\\t\\\\n\\\\tstdSize _ 8@8.\\\\n\\\\trow _ AlignmentMorph newRow\\\\n\\\\t\\\\tcolor: Color transparent;\\\\n\\\\t\\\\thResizing: #shrinkWrap;\\\\n\\\\t\\\\tvResizing: #shrinkWrap.\\\\n\\\\tself addMorphBack: row.\\\\n\\\\n\\\\t{\\\\n\\\\t\\\\tMorph new\\\\n\\\\t\\\\t\\\\textent: stdSize; \\\\n\\\\t\\\\t\\\\tcolor: Color paleBlue darker;\\\\n\\\\t\\\\t\\\\tsetBalloonText: 'Change the contrast';\\\\n\\\\t\\\\t\\\\ton: #mouseUp send: #controlContrast2: to: self;\\\\n\\\\t\\\\t\\\\ton: #mouseMove send: #controlContrast2: to: self;\\\\n\\\\t\\\\t\\\\ton: #mouseDown send: #controlContrast2: to: self.\\\\n\\\\n\\\\t\\\\\\\"Removed because it's default is giant tiles, which no one wants. --tk\\\\n\\\\t\\\\tMorph new\\\\n\\\\t\\\\t\\\\textent: stdSize; \\\\n\\\\t\\\\t\\\\tcolor: Color green;\\\\n\\\\t\\\\t\\\\tsetBalloonText: 'Change basic spacing';\\\\n\\\\t\\\\t\\\\ton: #mouseUp send: #controlSpacing2: to: self;\\\\n\\\\t\\\\t\\\\ton: #mouseMove send: #controlSpacing2: to: self;\\\\n\\\\t\\\\t\\\\ton: #mouseDown send: #controlSpacing2: to: self.\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t\\\\tMorph new\\\\n\\\\t\\\\t\\\\textent: stdSize; \\\\n\\\\t\\\\t\\\\tcolor: Color lightRed;\\\\n\\\\t\\\\t\\\\tsetBalloonText: 'Change basic style';\\\\n\\\\t\\\\t\\\\ton: #mouseUp send: #changeBasicStyle to: self.\\\\n\\\\n\\\\t} do: [ :each |\\\\n\\\\t\\\\trow addMorphBack: each.\\\\n\\\\t\\\\trow addMorphBack: (self transparentSpacerOfSize: stdSize).\\\\n\\\\t].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'yo 12/3/2004 17:01'!\\\\nalanBinaryPostRcvr: aNode key: key args: args\\\\n\\\\n\\\\t| nodeWithNilReceiver row |\\\\n\\\\n\\\\\\\"==\\\\nRepeat for collection [ collect ( from foo. blah blah foo blah) ]\\\\nRepeat for 1 to 50 [ do ( from i. blah blab i blah ) ]\\\\n==\\\\\\\"\\\\n\\\\n\\\\tnodeWithNilReceiver _ aNode copy receiver: nil.\\\\n\\\\t(row _ self addRow: #keyword2 on: nodeWithNilReceiver)\\\\n\\\\t\\\\tborderWidth: 1;\\\\n\\\\t\\\\tparseNode: (nodeWithNilReceiver as: MessageNode);\\\\n\\\\t\\\\tborderColor: row stdBorderColor.\\\\n\\\\trow addToken: key asString\\\\n\\\\t\\\\ttype: #binary\\\\n\\\\t\\\\ton: (SelectorNode new key: key asString code: nil \\\\\\\"fill this in?\\\\\\\").\\\\n\\\\targs first asMorphicSyntaxIn: row.\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'tk 7/30/2001 14:52'!\\\\nalanKeywordMessage: aNode isAConditional: template key: key args: args\\\\n\\\\n\\\\t| nodeWithNilReceiver column keywords row onlyOne |\\\\n\\\\n\\\\t(key == #collect: and: [args first isKindOf: BlockNode]) ifTrue: [\\\\n\\\\t\\\\t^self\\\\n\\\\t\\\\t\\\\talanKwdCollect: aNode \\\\n\\\\t\\\\t\\\\tisAConditional: template \\\\n\\\\t\\\\t\\\\tkey: key \\\\n\\\\t\\\\t\\\\targs: args\\\\n\\\\t].\\\\n\\\\tkey == #repeatFor:doing: ifTrue: [\\\\n\\\\t\\\\t^self\\\\n\\\\t\\\\t\\\\talanKwdRepeatForDoing: aNode \\\\n\\\\t\\\\t\\\\tisAConditional: template \\\\n\\\\t\\\\t\\\\tkey: key \\\\n\\\\t\\\\t\\\\targs: args\\\\n\\\\t].\\\\n\\\\tkey == #if:do: ifTrue: [\\\\n\\\\t\\\\t^self\\\\n\\\\t\\\\t\\\\talanKwdIfDo: aNode \\\\n\\\\t\\\\t\\\\tisAConditional: template \\\\n\\\\t\\\\t\\\\tkey: key \\\\n\\\\t\\\\t\\\\targs: args\\\\n\\\\t].\\\\n\\\\t(args size = 1 and: [key endsWith: 'Getz:']) ifTrue: [\\\\n\\\\t\\\\t^self\\\\n\\\\t\\\\t\\\\talanKwdSetter: aNode \\\\n\\\\t\\\\t\\\\tisAConditional: 0 \\\\n\\\\t\\\\t\\\\tkey: key \\\\n\\\\t\\\\t\\\\targs: args\\\\n\\\\t].\\\\n\\\\t(args size = 1 and: [self isStandardSetterKeyword: key]) ifTrue: [\\\\n\\\\t\\\\t^self\\\\n\\\\t\\\\t\\\\talanKwdSetter2: aNode \\\\n\\\\t\\\\t\\\\tisAConditional: 0 \\\\n\\\\t\\\\t\\\\tkey: key \\\\n\\\\t\\\\t\\\\targs: args\\\\n\\\\t].\\\\n\\\\tnodeWithNilReceiver _ aNode copy receiver: nil.\\\\n\\\\ttemplate = 1 ifTrue: [\\\\n\\\\t\\\\tself listDirection: #topToBottom.\\\\n\\\\t].\\\\n\\\\tcolumn _ self addColumn: #keyword1 on: nodeWithNilReceiver.\\\\n\\\\tkeywords _ key keywords.\\\\n\\\\tonlyOne _ args size = 1.\\\\n\\\\tonlyOne ifFalse: [\\\\\\\"necessary for three keyword messages!!\\\\\\\"\\\\n\\\\t\\\\tcolumn setProperty: #deselectedBorderColor toValue: column compoundBorderColor].\\\\n\\\\tkeywords\\\\n\\\\t\\\\twith: (args first: keywords size)\\\\n\\\\t\\\\tdo: [:kwd :arg |\\\\n\\\\t\\\\t\\\\ttemplate = 1 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tcolumn addMorphBack: (column transparentSpacerOfSize: 3@3).\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\t(row _ column addRow: #keyword2 on: nodeWithNilReceiver)\\\\n\\\\t\\\\t\\\\t\\\\tparseNode: (nodeWithNilReceiver as: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(onlyOne ifTrue: [MessageNode] ifFalse: [MessagePartNode]));\\\\n\\\\t\\\\t\\\\t\\\\tborderColor: row stdBorderColor.\\\\n\\\\t\\\\t\\\\ttemplate = 1 ifTrue: [row addMorphBack: (row transparentSpacerOfSize: 20@6)].\\\\n\\\\t\\\\t\\\\trow addToken: kwd\\\\n\\\\t\\\\t\\\\t\\\\ttype: #keyword2\\\\n\\\\t\\\\t\\\\t\\\\ton: (onlyOne ifTrue: [SelectorNode new key: kwd code: nil \\\\\\\"fill this in?\\\\\\\"]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [KeyWordNode new]).\\\\n\\\\t\\\\t\\\\t(arg asMorphicSyntaxIn: row) setConditionalPartStyle.\\\\n\\\\t\\\\t].\\\\n\\\\tonlyOne ifTrue: [\\\\n\\\\t\\\\tself replaceSubmorph: column by: row.\\\\n\\\\t\\\\tcolumn _ row.\\\\n\\\\t].\\\\n\\\\t\\\\t\\\\t\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'RAA 3/25/2001 16:31'!\\\\nalanKwdCollect: aNode isAConditional: template key: key args: args\\\\n\\\\n\\\\t| nodeWithNilReceiver row kwdHolder |\\\\n\\\\n\\\\tnodeWithNilReceiver _ aNode copy receiver: nil.\\\\n\\\\t(row _ self addRow: #keyword2 on: nodeWithNilReceiver)\\\\n\\\\t\\\\tborderWidth: 1;\\\\n\\\\t\\\\tparseNode: (nodeWithNilReceiver as: MessageNode);\\\\n\\\\t\\\\tborderColor: row stdBorderColor.\\\\n\\\\tkwdHolder _ row\\\\n\\\\t\\\\taddToken: key\\\\n\\\\t\\\\ttype: #keyword2\\\\n\\\\t\\\\ton: (SelectorNode new key: key code: nil \\\\\\\"fill this in?\\\\\\\").\\\\n\\\\tkwdHolder firstSubmorph \\\\n\\\\t\\\\tsetProperty: #syntacticallyCorrectContents toValue: key asString;\\\\n\\\\t\\\\tcontents: ''.\\\\n\\\\n\\\\targs first asMorphicCollectSyntaxIn: row.\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'tk 7/30/2001 14:52'!\\\\nalanKwdIfDo: aNode isAConditional: template key: key args: args\\\\n\\\\t\\\\\\\"(know it has more than one arg)\\\\\\\"\\\\n\\\\t| nodeWithNilReceiver column keywords row |\\\\n\\\\n\\\\tnodeWithNilReceiver _ aNode copy receiver: nil.\\\\n\\\\tcolumn _ self addColumn: #keyword1 on: nodeWithNilReceiver.\\\\n\\\\t\\\\\\\"column borderColor: column compoundBorderColor.\\\\\\\"\\\\n\\\\tkeywords _ key keywords.\\\\n\\\\tkeywords\\\\n\\\\t\\\\twith: (args first: keywords size)\\\\n\\\\t\\\\tdo: [:kwd :arg |\\\\n\\\\t\\\\t\\\\t(row _ column addRow: #keyword2 on: nodeWithNilReceiver)\\\\n\\\\t\\\\t\\\\t\\\\tparseNode: (nodeWithNilReceiver as: MessagePartNode).\\\\n\\\\t\\\\t\\\\tkwd = 'do:' ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\trow addMorphBack: (row transparentSpacerOfSize: 26@6).\\\\n\\\\t\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\trow addMorphBack: (row transparentSpacerOfSize: 10@6).\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\trow addTokenSpecialCase: kwd\\\\n\\\\t\\\\t\\\\t\\\\ttype: #keyword2\\\\n\\\\t\\\\t\\\\t\\\\ton: KeyWordNode new.\\\\n\\\\t\\\\t\\\\t(arg asMorphicSyntaxIn: row) setConditionalPartStyle.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\t\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'RAA 2/28/2001 10:16'!\\\\nalanKwdRepeatForDoing: aNode isAConditional: template key: key args: args\\\\n\\\\n\\\\t| nodeWithNilReceiver row column keywords |\\\\n\\\\n\\\\tnodeWithNilReceiver _ aNode copy receiver: nil.\\\\n\\\\tcolumn _ self addColumn: #keyword1 on: nodeWithNilReceiver.\\\\n\\\\tkeywords _ key keywords.\\\\n\\\\tkeywords\\\\n\\\\t\\\\twith: (args first: keywords size)\\\\n\\\\t\\\\tdo: [:kwd :arg |\\\\n\\\\t\\\\t\\\\t(row _ column addRow: #keyword2 on: nodeWithNilReceiver)\\\\n\\\\t\\\\t\\\\t\\\\tparseNode: (nodeWithNilReceiver as: MessagePartNode).\\\\n\\\\t\\\\t\\\\trow addToken: kwd\\\\n\\\\t\\\\t\\\\t\\\\ttype: #keyword2\\\\n\\\\t\\\\t\\\\t\\\\ton: KeyWordNode new.\\\\n\\\\t\\\\t\\\\t(arg asMorphicSyntaxIn: row) setConditionalPartStyle.\\\\n\\\\t\\\\t].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'FBS 2/24/2004 14:22'!\\\\nalanKwdSetter2: aNode isAConditional: template key: key args: args\\\\n\\\\t\\\\\\\"translates\\\\n\\\\t\\\\tfoo setHeading: 0\\\\n\\\\tto\\\\n\\\\t\\\\tfoo's heading _ 0\\\\n\\\\t\\\\\\\"\\\\n\\\\t| kwdHolder wordy |\\\\n\\\\tkwdHolder _ self\\\\n\\\\t\\\\taddToken: key\\\\n\\\\t\\\\ttype: #keywordSetter\\\\n\\\\t\\\\ton: (SelectorNode new key: key code: nil \\\\\\\"fill this in?\\\\\\\").\\\\n\\\\twordy _ self translateToWordySetter: key.\\\\n\\\\tkwdHolder firstSubmorph \\\\n\\\\t\\\\tsetProperty: #syntacticReformatting toValue: #keywordSetter;\\\\n\\\\t\\\\tcontents: wordy;\\\\n\\\\t\\\\temphasis: TextEmphasis bold emphasisCode.\\\\n\\\\twordy = key asString ifFalse: [\\\\n\\\\t\\\\tkwdHolder firstSubmorph \\\\n\\\\t\\\\t\\\\tsetProperty: #syntacticallyCorrectContents toValue: key asString].\\\\n\\\\n\\\\t(args first asMorphicSyntaxIn: self) setConditionalPartStyle\\\\n\\\\t\\\\t\\\\t\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'FBS 2/24/2004 14:22'!\\\\nalanKwdSetter: aNode isAConditional: template key: key args: args\\\\n\\\\n\\\\t| nodeWithNilReceiver row kwdHolder |\\\\n\\\\n\\\\tnodeWithNilReceiver _ aNode copy receiver: nil.\\\\n\\\\t(row _ self addRow: #keyword2 on: nodeWithNilReceiver)\\\\n\\\\t\\\\tborderWidth: 1;\\\\n\\\\t\\\\tparseNode: (nodeWithNilReceiver as: MessageNode);\\\\n\\\\t\\\\tborderColor: row stdBorderColor.\\\\n\\\\trow addNoiseString: '''s' emphasis: TextEmphasis bold emphasisCode.\\\\n\\\\tkwdHolder _ row\\\\n\\\\t\\\\taddToken: key\\\\n\\\\t\\\\ttype: #keywordGetz\\\\n\\\\t\\\\ton: (SelectorNode new key: key code: nil \\\\\\\"fill this in?\\\\\\\").\\\\n\\\\tkwdHolder firstSubmorph \\\\n\\\\t\\\\tsetProperty: #syntacticReformatting toValue: #keywordGetz;\\\\n\\\\t\\\\tsetProperty: #syntacticallyCorrectContents toValue: key asString;\\\\n\\\\t\\\\tcontents: (self splitAtCapsAndDownshifted: (key asString allButLast: 5));\\\\n\\\\t\\\\temphasis: TextEmphasis bold emphasisCode.\\\\n\\\\trow addNoiseString: '_' emphasis: TextEmphasis bold emphasisCode.\\\\n\\\\n\\\\t(args first asMorphicSyntaxIn: row) setConditionalPartStyle\\\\n\\\\t\\\\t\\\\t\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'FBS 2/24/2004 14:21'!\\\\nalanUnaryGetter: aNode key: key\\\\n\\\\t\\\\\\\"I am a MessageNode.  Fill me with a SelectorNode {getX} whose string is {'s x}.  All on one level.\\\\\\\"\\\\n\\\\n\\\\t| selSyn usm wordy |\\\\n\\\\tselSyn _ self\\\\n\\\\t\\\\taddToken: key\\\\n\\\\t\\\\ttype: #unaryGetter\\\\n\\\\t\\\\ton: (SelectorNode new key: key code: nil \\\\\\\"fill this in?\\\\\\\").\\\\n\\\\tusm _ selSyn firstSubmorph.\\\\n\\\\tusm setProperty: #syntacticReformatting toValue: #unaryGetter.\\\\n\\\\twordy _ self translateToWordyGetter: key.\\\\n\\\\twordy = key asString ifFalse: [\\\\n\\\\t\\\\tusm setProperty: #syntacticallyCorrectContents toValue: key asString].\\\\n\\\\tusm contents: wordy; emphasis: TextEmphasis bold emphasisCode.\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'RAA 4/4/2001 12:49'!\\\\nalanUnaryPostRcvr: aNode key: key selector: selector\\\\n\\\\n\\\\t| row |\\\\n\\\\n\\\\t(self isStandardGetterSelector: key) ifTrue: [\\\\n\\\\t\\\\t^self alanUnaryGetter: aNode key: key\\\\n\\\\t].\\\\n\\\\trow _ (self addUnaryRow: key style: #unary) layoutInset: 1.\\\\n\\\\t^ row parseNode: selector\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'dgd 2/22/2003 13:38'!\\\\nalansMessageNode: aNode receiver: receiver selector: selector keywords: key arguments: args \\\\n\\\\t| receiverMorph testAndReceiver anotherSelf wordyMorph template |\\\\n\\\\ttemplate := self alansTemplateStyleFor: key.\\\\n\\\\treceiver ifNotNil: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"i.e. not a cascade\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\tanotherSelf := self constructSelfVariant: receiver and: key.\\\\n\\\\t\\\\t\\\\tanotherSelf ifNotNil: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[wordyMorph := self addString: anotherSelf special: false.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\twordyMorph setProperty: #wordyVariantOfSelf toValue: true.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself addMorph: wordyMorph.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself layoutInset: 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^self].\\\\n\\\\t\\\\t\\\\ttestAndReceiver := self.\\\\n\\\\t\\\\t\\\\ttemplate = 1 \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[testAndReceiver := self addRow: #keyword1 on: nil.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself setSpecialOuterTestFormat.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttestAndReceiver addNoiseString: 'Test'].\\\\n\\\\t\\\\t\\\\tfalse \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"template = 2\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttestAndReceiver := self addRow: #keyword1 on: nil.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"self setSpecialOuterTestFormat.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttestAndReceiver addNoiseString: 'Repeat for'].\\\\n\\\\t\\\\t\\\\treceiverMorph := receiver asMorphicSyntaxIn: testAndReceiver.\\\\n\\\\t\\\\t\\\\ttemplate = 1 ifTrue: [receiverMorph setConditionalPartStyle]].\\\\n\\\\n\\\\t\\\\\\\"unary messages\\\\\\\"\\\\n\\\\targs isEmpty \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[^self \\\\n\\\\t\\\\t\\\\t\\\\talanUnaryPostRcvr: aNode\\\\n\\\\t\\\\t\\\\t\\\\tkey: key\\\\n\\\\t\\\\t\\\\t\\\\tselector: selector].\\\\n\\\\n\\\\t\\\\\\\"binary messages\\\\\\\"\\\\n\\\\tkey last = $: \\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[^self \\\\n\\\\t\\\\t\\\\t\\\\talanBinaryPostRcvr: aNode\\\\n\\\\t\\\\t\\\\t\\\\tkey: key\\\\n\\\\t\\\\t\\\\t\\\\targs: args].\\\\n\\\\n\\\\t\\\\\\\"keyword messages\\\\\\\"\\\\n\\\\treceiverMorph ifNotNil: [receiverMorph setConditionalPartStyle].\\\\n\\\\tself setSpecialOuterTestFormat.\\\\n\\\\tself \\\\n\\\\t\\\\talanKeywordMessage: aNode\\\\n\\\\t\\\\tisAConditional: template\\\\n\\\\t\\\\tkey: key\\\\n\\\\t\\\\targs: args! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'RAA 2/27/2001 14:19'!\\\\nassignmentNode: aNode variable: variable value: value\\\\n\\\\n\\\\t| row v expMorph |\\\\n\\\\n\\\\trow _ self addRow: #assignment on: aNode.\\\\n\\\\tv _ variable asMorphicSyntaxIn: row.\\\\n\\\\tself alansTest1 ifTrue: [v setConditionalPartStyle; layoutInset: 2].\\\\n\\\\trow addToken: ' _ ' type: #assignmentArrow on: aNode.\\\\n\\\\texpMorph _ value asMorphicSyntaxIn: row.\\\\n\\\\tself alansTest1 ifTrue: [\\\\n\\\\t\\\\trow setSpecialOuterTestFormat.\\\\n\\\\t\\\\t(expMorph hasProperty: #deselectedColor) ifFalse: [expMorph setConditionalPartStyle].\\\\n\\\\t].\\\\n\\\\t^row\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'dgd 2/22/2003 13:39'!\\\\nblockNode: aNode arguments: arguments statements: statements \\\\n\\\\t| row column |\\\\n\\\\tcolumn := self addColumn: #block on: aNode.\\\\n\\\\tself alansTest1 ifFalse: [column layoutInset: 5 @ -1].\\\\n\\\\tself alansTest1 \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[column setProperty: #deselectedBorderColor toValue: self lighterColor].\\\\n\\\\taNode addCommentToMorph: column.\\\\n\\\\targuments notEmpty \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[row := column addRow: #blockarg1 on: BlockArgsNode new.\\\\n\\\\t\\\\t\\\\trow addNoiseString: self noiseBeforeBlockArg.\\\\n\\\\t\\\\t\\\\targuments do: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:arg | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\trow \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taddToken: arg name\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttype: #blockarg2\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ton: arg]].\\\\n\\\\tstatements do: \\\\n\\\\t\\\\t\\\\t[:each | \\\\n\\\\t\\\\t\\\\t(row := each asMorphicSyntaxIn: column) borderWidth: 1.\\\\n\\\\t\\\\t\\\\tself alansTest1 ifTrue: [row setSpecialOuterTestFormat].\\\\n\\\\t\\\\t\\\\teach addCommentToMorph: column].\\\\n\\\\t^column! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'FBS 2/24/2004 14:32'!\\\\nblockNodeCollect: aNode arguments: arguments statements: statements \\\\n\\\\t| row column c2 r2 r3 |\\\\n\\\\tcolumn := self addColumn: #blockCollectOnly on: aNode.\\\\n\\\\tself alansTest1 ifFalse: [column layoutInset: 5 @ -1].\\\\n\\\\taNode addCommentToMorph: column.\\\\n\\\\targuments notEmpty \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[row := column addRow: #blockarg1 on: BlockArgsNode new.\\\\n\\\\t\\\\t\\\\trow addNoiseString: 'collect using' emphasis: TextEmphasis bold emphasisCode.\\\\n\\\\t\\\\t\\\\tr3 := row addRow: #blockarg1b on: nil.\\\\t\\\\\\\"aNode\\\\\\\"\\\\n\\\\t\\\\t\\\\tr3 setConditionalPartStyle.\\\\n\\\\t\\\\t\\\\targuments do: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:arg | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tr3 \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taddToken: arg name\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttype: #blockarg2\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ton: arg]].\\\\n\\\\tr2 := column addRow: #block on: aNode.\\\\n\\\\tr2 setProperty: #ignoreNodeWhenPrinting toValue: true.\\\\n\\\\tr2 addNoiseString: self noiseBeforeBlockArg emphasis: TextEmphasis bold emphasisCode.\\\\n\\\\tc2 := r2 addColumn: #block on: aNode.\\\\n\\\\tc2 setProperty: #ignoreNodeWhenPrinting toValue: true.\\\\n\\\\tstatements do: \\\\n\\\\t\\\\t\\\\t[:each | \\\\n\\\\t\\\\t\\\\t(each asMorphicSyntaxIn: c2) borderWidth: 1.\\\\n\\\\t\\\\t\\\\teach addCommentToMorph: c2].\\\\n\\\\t^column! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'RAA 2/22/2001 17:00'!\\\\ncascadeNode: aNode receiver: receiver messages: messages\\\\n\\\\t| row |\\\\n\\\\n\\\\tself alansTest1 ifTrue: [\\\\n\\\\t\\\\trow _ self addColumn: #cascade on: aNode.\\\\n\\\\t\\\\trow setSpecialOuterTestFormat.\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\trow _ self addRow: #cascade on: aNode\\\\n\\\\t].\\\\n\\\\treceiver asMorphicSyntaxIn: row.\\\\n\\\\tmessages do: [:m | m asMorphicSyntaxIn: row].\\\\n\\\\t^ row\\\\n\\\\n\\\\\\\"\\\\t(node2 _ aNode copy) receiver: nil messages: messages.\\\\n\\\\tcascadeMorph _ row addColumn: #cascade2 on: node2.\\\\n\\\\tmessages do: [ :m | m asMorphicSyntaxIn: cascadeMorph].\\\\n\\\\t^row\\\\n\\\\\\\"\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'RAA 2/16/2001 16:34'!\\\\nchangeBasicStyle\\\\n\\\\n\\\\tself removeAllMorphs.\\\\n\\\\tself setProperty: #alansNewStyle toValue: self alansTest1 not.\\\\n\\\\tself methodNodeOuter: parseNode\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'gm 2/22/2003 13:42'!\\\\nfinalAppearanceTweaks\\\\n\\\\t| deletes lw |\\\\n\\\\tSizeScaleFactor ifNil: [SizeScaleFactor := 0.15].\\\\n\\\\tSizeScaleFactor := 0.0.\\\\t\\\\\\\"disable this feature.  Default was for giant tiles\\\\\\\"\\\\n\\\\tself usingClassicTiles \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[self \\\\n\\\\t\\\\t\\\\t\\\\tallMorphsDo: [:each | (each isSyntaxMorph) ifTrue: [each lookClassic]].\\\\n\\\\t\\\\t\\\\t^self].\\\\n\\\\tdeletes := OrderedCollection new.\\\\n\\\\tself allMorphsDo: \\\\n\\\\t\\\\t\\\\t[:each | \\\\n\\\\t\\\\t\\\\t(each respondsTo: #setDeselectedColor) ifTrue: [each setDeselectedColor].\\\\n\\\\t\\\\t\\\\t\\\\\\\"(each hasProperty: #variableInsetSize) ifTrue: [\\\\n\\\\t\\\\t\\\\teach layoutInset: \\\\n\\\\t\\\\t\\\\t\\\\t((each valueOfProperty: #variableInsetSize) * SizeScaleFactor) rounded].\\\\\\\"\\\\n\\\\t\\\\t\\\\teach isSyntaxMorph \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[lw := each layoutInset.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tlw isPoint ifTrue: [lw := lw x].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\teach layoutInset: lw @ 0\\\\t\\\\\\\"(6 * SizeScaleFactor) rounded\\\\\\\"]].\\\\n\\\\tdeletes do: [:each | each delete]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'yo 11/11/2002 10:30'!\\\\nisStandardGetterSelector: key\\\\n\\\\n\\\\tself flag: #yoCharCases.\\\\n\\\\n\\\\tkey size > 3 ifFalse: [^false].\\\\n\\\\t(key beginsWith: 'get') ifFalse: [^false].\\\\n\\\\tkey fourth isUppercase ifFalse: [^false].\\\\n\\\\t^true\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'yo 11/11/2002 10:31'!\\\\nisStandardSetterKeyword: key\\\\n\\\\n\\\\tself flag: #yoCharCases.\\\\n\\\\n\\\\tkey size > 4 ifFalse: [^false].\\\\n\\\\t(key endsWith: ':') ifFalse: [^false].\\\\n\\\\t(key beginsWith: 'set') ifFalse: [^false].\\\\n\\\\tkey fourth isUppercase ifFalse: [^false].\\\\n\\\\t^true\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'dgd 2/22/2003 13:39'!\\\\nmessageNode: aNode receiver: receiver selector: selector keywords: key arguments: args \\\\n\\\\t| keywords column row receiverMorph receiverWidth messageWidth onlyOne nodeWithNilReceiver isAConditional |\\\\n\\\\tself alansTest1 \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[^self \\\\n\\\\t\\\\t\\\\t\\\\talansMessageNode: aNode\\\\n\\\\t\\\\t\\\\t\\\\treceiver: receiver\\\\n\\\\t\\\\t\\\\t\\\\tselector: selector\\\\n\\\\t\\\\t\\\\t\\\\tkeywords: key\\\\n\\\\t\\\\t\\\\t\\\\targuments: args].\\\\n\\\\tisAConditional := #(#ifTrue: #ifFalse: #ifTrue:ifFalse: #ifFalse:ifTrue:) \\\\n\\\\t\\\\t\\\\t\\\\tincludes: key.\\\\n\\\\treceiver ifNotNil: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"i.e. not a cascade\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\treceiverMorph := receiver asMorphicSyntaxIn: self].\\\\n\\\\tkeywords := key keywords.\\\\n\\\\targs isEmpty \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[row := (self addSingleKeywordRow: key) layoutInset: 1.\\\\n\\\\t\\\\t\\\\t^row parseNode: selector].\\\\n\\\\treceiverWidth := receiver ifNil: [0]\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil: [receiverMorph fullBounds width].\\\\n\\\\tonlyOne := args size = 1.\\\\n\\\\t(receiverWidth <= 80 and: [onlyOne]) \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[self \\\\n\\\\t\\\\t\\\\t\\\\tmessageOneArg: key\\\\n\\\\t\\\\t\\\\t\\\\treceiver: receiver\\\\n\\\\t\\\\t\\\\t\\\\tselector: selector\\\\n\\\\t\\\\t\\\\t\\\\targs: args.\\\\n\\\\t\\\\t\\\\t^self].\\\\n\\\\tnodeWithNilReceiver := aNode copy receiver: nil.\\\\n\\\\tcolumn := self addColumn: #keyword1 on: nodeWithNilReceiver.\\\\n\\\\t\\\\\\\"onlyOne ifTrue: [column parseNode: nil].\\\\tis a spacer\\\\\\\"\\\\n\\\\tmessageWidth := 0.\\\\n\\\\tkeywords with: (args copyFrom: 1 to: keywords size)\\\\n\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t[:kwd :arg | \\\\n\\\\t\\\\t\\\\tisAConditional \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [column addMorphBack: (column transparentSpacerOfSize: 3 @ 3)].\\\\n\\\\t\\\\t\\\\t(row := column addRow: #keyword2 on: nodeWithNilReceiver)\\\\n\\\\t\\\\t\\\\t\\\\tborderWidth: 1;\\\\n\\\\t\\\\t\\\\t\\\\tparseNode: (nodeWithNilReceiver \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tas: (onlyOne ifTrue: [MessageNode] ifFalse: [MessagePartNode]));\\\\n\\\\t\\\\t\\\\t\\\\tborderColor: row stdBorderColor.\\\\n\\\\t\\\\t\\\\tisAConditional \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [row addMorphBack: (row transparentSpacerOfSize: 20 @ 6)].\\\\n\\\\t\\\\t\\\\trow \\\\n\\\\t\\\\t\\\\t\\\\taddToken: kwd\\\\n\\\\t\\\\t\\\\t\\\\ttype: #keyword2\\\\n\\\\t\\\\t\\\\t\\\\ton: (onlyOne \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [SelectorNode new key: kwd code: nil\\\\t\\\\\\\"fill this in?\\\\\\\"]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [KeyWordNode new]).\\\\n\\\\t\\\\t\\\\targ asMorphicSyntaxIn: row.\\\\n\\\\t\\\\t\\\\tmessageWidth := messageWidth + row fullBounds width].\\\\n\\\\tonlyOne \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[self replaceSubmorph: column by: row.\\\\n\\\\t\\\\t\\\\tcolumn := row].\\\\n\\\\treceiverMorph ifNil: [^self].\\\\n\\\\treceiverWidth + messageWidth < 350 \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[isAConditional ifFalse: [self unfoldMessage].\\\\n\\\\t\\\\t\\\\t^self].\\\\n\\\\t((receiverWidth > 200 \\\\n\\\\t\\\\tor: [receiverWidth > 80 and: [column fullBounds height > 20]]) or: \\\\n\\\\t\\\\t\\\\t\\\\t[receiverMorph fullBounds width > 30 \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [column fullBounds height > 100 or: [column fullBounds width > 250]]]) \\\\n\\\\t\\\\tifTrue: [^self foldMessage]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'RAA 2/26/2001 14:04'!\\\\nmessageOneArg: key receiver: receiver selector: selector args: args\\\\n\\\\n\\\\t| row firstArgMorph |\\\\n\\\\n\\\\trow _ (self addSingleKeywordRow: key) layoutInset: 1.\\\\n\\\\trow parseNode: selector.\\\\n\\\\tfirstArgMorph _ args first asMorphicSyntaxIn: self.\\\\n\\\\treceiver ifNil: [^ self].\\\\n\\\\t(firstArgMorph fullBounds height > 100\\\\n\\\\t\\\\t\\\\tor: [firstArgMorph fullBounds width > 250])\\\\n\\\\t\\\\tifTrue: [self foldMessageOneArg].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'RAA 2/26/2001 17:12'!\\\\nmethodNodeInner: aNode selectorOrFalse: selectorOrFalse precedence: precedence arguments: arguments temporaries: temporaries primitive: primitive block: block\\\\n\\\\t| header selNode |\\\\n\\\\n\\\\tselNode _ selectorOrFalse class == SelectorNode \\\\n\\\\t\\\\tifTrue: [selectorOrFalse] \\\\n\\\\t\\\\tifFalse: [SelectorNode new key: selectorOrFalse code: nil].\\\\n\\\\theader _ self addRow: Color white on: selNode.\\\\n\\\\tprecedence = 1\\\\n\\\\t\\\\tifTrue: [header addToken: aNode selector type: #methodHeader1 on: selNode]\\\\n\\\\t\\\\tifFalse: [aNode selector keywords with: arguments do:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:kwd :arg | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\theader addToken: kwd type: #methodHeader2 on: selNode.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(arg asMorphicSyntaxIn: header) color: #blockarg2]].\\\\n\\\\taNode addCommentToMorph: self.\\\\n\\\\tself addTemporaries: temporaries.\\\\n\\\\t(primitive > 0 and: [(primitive between: 255 and: 519) not]) ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"Dont decompile <prim> for, eg, ^ self \\\\\\\"\\\\n\\\\t\\\\tself addTextRow: (String streamContents: [ :strm | aNode printPrimitiveOn: strm])].\\\\n\\\\tblock asMorphicSyntaxIn: self.\\\\n\\\\t^ self\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'tk 7/31/2001 17:37'!\\\\nmethodNodeOuter: aNode\\\\n\\\\n\\\\t| block |\\\\n\\\\t\\\\n\\\\tself borderWidth: 0.\\\\n\\\\taNode asMorphicSyntaxIn: self.\\\\n\\\\tself alansTest1 ifTrue: [self addTemporaryControls].\\\\n\\\\tself finalAppearanceTweaks.\\\\n\\\\t\\\\t\\\\\\\"self setProperty: #deselectedColor toValue: Color transparent.\\\\\\\"\\\\n\\\\tblock _ self findA: BlockNode.\\\\n\\\\t\\\\t\\\\\\\"block setProperty: #deselectedColor toValue: Color transparent.\\\\\\\"\\\\n\\\\tblock submorphs size = 1 ifTrue: [^ self].\\\\t\\\\\\\"keep '^ self' if that is the only thing in method\\\\\\\"\\\\n\\\\tblock submorphs last decompile string = '^  self ' ifTrue: [\\\\n\\\\t\\\\tblock submorphs last delete].\\\\n\\\\t^ self! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'RAA 2/15/2001 19:49'!\\\\nvanillaMessageNode: aNode receiver: receiver selector: selector arguments: arguments\\\\n\\\\n\\\\t| substitute row sel |\\\\n\\\\tsel _ #message.\\\\n\\\\t((self nodeClassIs: CascadeNode) and: [self parseNode receiver ~~ aNode]) ifTrue: [\\\\n\\\\t\\\\tsel _ #keyword2.\\\\n\\\\t\\\\treceiver ifNotNil: [self inform: 'receiver should be nil']].\\\\n\\\\trow _ self addRow: sel on: aNode.\\\\n\\\\tsubstitute _ aNode as: TileMessageNode.\\\\n\\\\t(aNode macroPrinter == #printCaseOn:indent:) ifTrue: [\\\\n\\\\t\\\\taNode asMorphicCaseOn: row indent: nil.\\\\n\\\\t\\\\t^ self].\\\\n\\\\taNode macroPrinter\\\\n\\\\t\\\\tifNotNil: \\\\n\\\\t\\\\t\\\\t[substitute perform: aNode macroPrinter with: row with: nil]\\\\n\\\\t\\\\tifNil: \\\\n\\\\t\\\\t\\\\t[substitute \\\\n\\\\t\\\\t\\\\t\\\\tprintKeywords: selector key\\\\n\\\\t\\\\t\\\\t\\\\targuments: arguments\\\\n\\\\t\\\\t\\\\t\\\\ton: row\\\\n\\\\t\\\\t\\\\t\\\\tindent: nil].\\\\n\\\\t^ row addTransparentSpacerOfSize: 3@0.\\\\t\\\\\\\"horizontal spacing only\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'node types' stamp: 'RAA 2/14/2001 20:34'!\\\\nimmediatelyBelowTheMethodNode\\\\n\\\\n\\\\t^(owner respondsTo: #isMethodNode) and: [owner isMethodNode]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node types' stamp: 'tk 8/24/2001 15:41'!\\\\nisAVariable\\\\n\\\\t\\\\\\\"There are three kinds of variable nodes\\\\\\\"\\\\n\\\\n\\\\t((parseNode class == TempVariableNode) or: [\\\\n\\\\t\\\\t(parseNode class == LiteralVariableNode) or: [\\\\n\\\\t\\\\t\\\\tparseNode class == VariableNode]]) ifFalse: [^ false].\\\\n\\\\t^ (ClassBuilder new reservedNames includes: \\\\n\\\\t\\\\t\\\\tself decompile string withoutTrailingBlanks) not! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node types' stamp: 'di 11/17/2000 08:31'!\\\\nisBlockNode\\\\n\\\\t^ parseNode class == BlockNode! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node types' stamp: 'tk 9/26/2001 05:50'!\\\\nisDeclaration\\\\n\\\\t\\\\\\\"Return true if I am a TempVarNode inside a declaration of some kind, including a method arg\\\\\\\"\\\\n\\\\n\\\\t| opc |\\\\n\\\\towner isSyntaxMorph ifFalse: [^ false].\\\\n\\\\topc _ owner parseNode class.\\\\n\\\\topc == BlockArgsNode ifTrue: [^ true].\\\\n\\\\topc == MethodTempsNode ifTrue: [^ true].\\\\n\\\\topc == SelectorNode ifTrue: [^ true].\\\\n\\\\t^ false! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node types' stamp: 'gm 2/22/2003 12:30'!\\\\nisLeafTile\\\\n\\\\tself hasSubmorphs ifFalse: [^false].\\\\n\\\\t(self firstSubmorph isSyntaxMorph) ifTrue: [^false].\\\\n\\\\t(self firstSubmorph isMemberOf: Morph) ifTrue: [^false].\\\\n\\\\t^true! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node types' stamp: 'di 11/17/2000 08:31'!\\\\nisMethodNode\\\\n\\\\t^ parseNode class == MethodNode! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node types' stamp: 'tk 9/13/2001 15:28'!\\\\nisNoun\\\\n\\\\t\\\\\\\"Consider these to be nouns:  MessageNode with receiver, CascadeNode with receiver, AssignmentNode, TempVariableNode, LiteralNode, VariableNode, LiteralVariableNode.\\\\\\\"\\\\n\\\\n\\\\t(#(TempVariableNode LiteralNode VariableNode LiteralVariableNode) includes:\\\\n\\\\t\\\\t(parseNode class name)) ifTrue: [^ true].\\\\n\\\\n\\\\t(self nodeClassIs: MessageNode) ifTrue: [^ parseNode receiver notNil].\\\\n\\\\t(self nodeClassIs: CascadeNode) ifTrue: [^ parseNode receiver notNil].\\\\n\\\\t(self nodeClassIs: AssignmentNode) ifTrue: [^ submorphs size >= 3].\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node types' stamp: 'tk 9/23/2001 00:17'!\\\\nisSelfTile\\\\n\\\\n\\\\t^ parseNode class == VariableNode and: [self decompile asString = 'self ']\\\\n\\\\t! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node types' stamp: 'di 11/6/2000 15:26'!\\\\nnodeClassIs: aParseNodeClass\\\\n\\\\t\\\\\\\"Test the class of my parseNode\\\\\\\"\\\\n\\\\n\\\\t^ parseNode class == aParseNodeClass! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node types' stamp: 'dgd 2/22/2003 13:40'!\\\\nrootTile\\\\n\\\\t^self \\\\n\\\\t\\\\torOwnerSuchThat: [:m | m owner isNil or: [m owner isSyntaxMorph not]]! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'player' stamp: 'tk 9/26/2001 06:05'!\\\\ncurrentDataValue\\\\n\\\\t\\\\\\\"Answer the current data value held by the receiver\\\\\\\"\\\\n\\\\n\\\\t^ self readOut valueFromContents! !\\\\n\\\\n!SyntaxMorph methodsFor: 'player' stamp: 'tk 2/15/2002 13:03'!\\\\nvariableDocks\\\\n\\\\t\\\\\\\"Answer a list of VariableDock objects for docking up my data with an instance held in my containing playfield.  For a numeric-readout tile.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Is CardPlayer class holding my variableDock, or should I be using the caching mechanism in Morph>>variableDocks?\\\\\\\"\\\\n\\\\t| updatingString lab nn aGetter |\\\\n\\\\t(updatingString _ self readOut) ifNil: [^ #()].\\\\n\\\\tupdatingString getSelector ifNil: [\\\\n\\\\t\\\\tlab _ self submorphNamed: 'label' ifNone: [self defaultName].\\\\n\\\\t\\\\tnn _ lab contents asString.\\\\n\\\\t\\\\t\\\\\\\"nn at: 1 put: nn first asUppercase.\\\\\\\"\\\\n\\\\t\\\\tupdatingString getSelector: (aGetter _ 'get',nn) asSymbol;\\\\n\\\\t\\\\t\\\\tputSelector: (ScriptingSystem setterSelectorForGetter: aGetter).\\\\n\\\\t\\\\t].\\\\n\\\\t^ Array with: (VariableDock new \\\\n\\\\t\\\\t\\\\tvariableName: (updatingString getSelector allButFirst: 3) withFirstCharacterDownshifted \\\\n\\\\t\\\\t\\\\ttype: #number \\\\n\\\\t\\\\t\\\\tdefiningMorph: updatingString \\\\n\\\\t\\\\t\\\\tmorphGetSelector: #valueFromContents \\\\n\\\\t\\\\t\\\\tmorphPutSelector: #acceptValue:)! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'aoy 2/15/2003 21:30'!\\\\naddArg: index \\\\n\\\\t\\\\\\\"I rep a SelectorNode.  My string has been replaced.  Append an argument to my owner.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"See if any sample args are recorded\\\\\\\"\\\\n\\\\n\\\\t| sel rec aVocabulary mi sample descrip mthNode tiles |\\\\n\\\\tsel := self decompile asString asSymbol.\\\\n\\\\trec := self receiverObject.\\\\n\\\\tsample := rec class == Error \\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[aVocabulary := self vocabularyToUseWith: rec.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmi := aVocabulary methodInterfaceAt: sel ifAbsent: [nil].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmi ifNil: [5]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifNotNil: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[descrip := mi argumentVariables at: index.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdescrip sample]]\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [5]. \\\\n\\\\tmthNode := self string: sample storeString toTilesIn: sample class.\\\\n\\\\ttiles := mthNode submorphs at: mthNode submorphs size - 1.\\\\t\\\\\\\"before the ^ self\\\\\\\"\\\\n\\\\tself owner addMorphBack: tiles! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 8/24/2001 13:24'!\\\\nassignmentArrow\\\\n\\\\t\\\\\\\"Offer to embed this variable in a new assignment statement.  (Don't confuse this with upDownAssignment:, which runs the up and down arrows that rotate among assignment types.)\\\\\\\"\\\\n\\\\t| rr |\\\\n\\\\n\\\\tself isAVariable ifFalse: [^ nil].\\\\n\\\\tself isDeclaration ifTrue: [^ nil].\\\\n\\\\t^ (rr _ RectangleMorph new)\\\\n\\\\t\\\\textent: 11@13; borderWidth: 1; color: Color lightGreen;\\\\n\\\\t\\\\tborderColor: Color gray;\\\\n\\\\t\\\\taddMorph: ((self noiseStringMorph: '_') topLeft: rr topLeft + (3@0));\\\\n\\\\t\\\\ton: #mouseUp send: #newAssignment to: self\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'gk 2/23/2004 21:08'!\\\\nchangeSound: upDown\\\\n\\\\t| ind arg st soundChoices index it current |\\\\n\\\\t\\\\\\\"move in the list of sounds.  Adjust arg tile after me\\\\\\\"\\\\n\\\\n\\\\tind _ owner submorphs indexOf: self.\\\\n\\\\targ _ owner submorphs atWrap: ind+1.\\\\n\\\\targ isSyntaxMorph ifFalse: [^ self].\\\\n\\\\tst _ arg submorphs detect: [:mm | mm isKindOf: StringMorph] ifNone: [^ self].\\\\n\\\\tsoundChoices _ SoundService default sampledSoundChoices.\\\\n\\\\tcurrent _ st contents copyFrom: 2 to: st contents size-1.\\\\t\\\\\\\"remove string quotes\\\\\\\"\\\\n\\\\tindex _ soundChoices indexOf: current.\\\\n\\\\tindex > 0 ifTrue:\\\\n\\\\t\\\\t[st contents: (it _ soundChoices atWrap: index + upDown) printString.\\\\n\\\\t\\\\tself playSoundNamed: it].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 8/26/2001 14:31'!\\\\ncolorPatch\\\\n\\\\t\\\\\\\"Return a color patch button that lets the user choose a color and modifies the code\\\\\\\"\\\\n\\\\t| cc patch sel completeMsg |\\\\n\\\\t\\\\n\\\\t\\\\n\\\\t((self nodeClassIs: MessageNode) \\\\\\\"or: [self nodeClassIs: SelectorNode]\\\\\\\") ifFalse: [^ nil].\\\\n\\\\t(sel _ self selector) ifNil: [^ nil].\\\\n\\\\t(Color colorNames includes: sel) | (sel == #r:g:b:) ifFalse: [^ nil].\\\\n\\\\t\\\\t\\\\\\\"a standard color name\\\\\\\"\\\\n\\\\tcompleteMsg _ self isNoun ifTrue: [self] \\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [owner isNoun ifTrue: [owner] ifFalse: [owner owner]].\\\\n\\\\n\\\\t(cc _ completeMsg try) class == Color ifFalse: [^ nil].\\\\n\\\\tpatch _ ColorTileMorph new colorSwatchColor: cc.\\\\n\\\\t\\\\t\\\\\\\"sends colorChangedForSubmorph: to the messageNode\\\\\\\"\\\\n\\\\tpatch color: Color transparent; borderWidth: 0.  patch submorphs last delete.\\\\n\\\\t^ patch! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 2/21/2001 16:37'!\\\\ndeleteLine\\\\n\\\\t| temp |\\\\n\\\\ttemp _ owner.\\\\n\\\\tself deletePopup.\\\\n\\\\tself delete.\\\\n\\\\ttemp setSelection: nil.\\\\n\\\\ttemp acceptIfInScriptor.! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'di 12/13/2000 13:05'!\\\\ndeletePopup\\\\n\\\\n\\\\tself valueOfProperty: #myPopup ifPresentDo:\\\\n\\\\t\\\\t[:panel | panel delete. self removeProperty: #myPopup]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 2/21/2001 13:09'!\\\\ndismisser\\\\n\\\\t\\\\\\\"Return the icon to delete this line of tiles.  I am an entire line in a block.\\\\\\\"\\\\n\\\\t| handle handleSpec colorToUse iconName form |\\\\n\\\\n\\\\t(owner isSyntaxMorph and: [owner nodeClassIs: BlockNode]) ifFalse: [^ nil].\\\\n\\\\thandleSpec _ Preferences haloSpecifications fourth.\\\\t\\\\\\\"dismiss\\\\\\\"\\\\n\\\\thandle _ EllipseMorph\\\\n\\\\t\\\\t\\\\tnewBounds: (Rectangle center: 10@10 extent: 16 asPoint)\\\\n\\\\t\\\\t\\\\tcolor: (colorToUse _ Color colorFrom: handleSpec color).\\\\n\\\\ticonName _ handleSpec iconSymbol.\\\\n\\\\tform _ ScriptingSystem formAtKey: iconName.\\\\t\\\\\\\"#'Halo-Dismiss'\\\\\\\"\\\\n\\\\thandle addMorphCentered: (ImageMorph new\\\\n\\\\t\\\\t\\\\t\\\\timage: form; \\\\n\\\\t\\\\t\\\\t\\\\tcolor: colorToUse makeForegroundColor;\\\\n\\\\t\\\\t\\\\t\\\\tlock).\\\\n\\\\thandle on: #mouseDown send: #deleteLine to: self.\\\\n\\\\t^ handle! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 10/17/2001 13:38'!\\\\ndupTile: evt\\\\n\\\\n\\\\t| dup |\\\\n\\\\tself deletePopup.\\\\n\\\\t\\\\\\\"self deselect.\\\\\\\"\\\\n\\\\tdup _ self duplicateMorph: evt.\\\\n\\\\tPreferences tileTranslucentDrag\\\\n\\\\t\\\\tifTrue: [dup align: dup center with: evt hand position.\\\\n\\\\t\\\\t\\\\t\\\\tdup lookTranslucent]\\\\n\\\\t\\\\tifFalse: [dup align: dup topLeft\\\\n\\\\t\\\\t\\\\t\\\\t\\\\twith: evt hand position + self cursorBaseOffset].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 10/17/2001 13:29'!\\\\nduplicator\\\\n\\\\t\\\\\\\"Return the icon to duplicate this tile.\\\\\\\"\\\\n\\\\t| handle handleSpec colorToUse iconName form |\\\\n\\\\n\\\\thandleSpec _ Preferences haloSpecifications at: 11.\\\\t\\\\\\\"duplicate\\\\\\\"\\\\n\\\\thandle _ EllipseMorph\\\\n\\\\t\\\\t\\\\tnewBounds: (Rectangle center: 10@10 extent: 16 asPoint)\\\\n\\\\t\\\\t\\\\tcolor: (colorToUse _ Color colorFrom: handleSpec color).\\\\n\\\\ticonName _ handleSpec iconSymbol.\\\\n\\\\tform _ ScriptingSystem formAtKey: iconName.\\\\t\\\\\\\"#'Halo-Dup'\\\\\\\"\\\\n\\\\thandle addMorphCentered: (ImageMorph new\\\\n\\\\t\\\\t\\\\t\\\\timage: form; \\\\n\\\\t\\\\t\\\\t\\\\tcolor: colorToUse makeForegroundColor;\\\\n\\\\t\\\\t\\\\t\\\\tlock).\\\\n\\\\thandle on: #mouseDown send: #dupTile: to: self.\\\\n\\\\t^ handle! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'ar 3/18/2001 17:28'!\\\\nevent: arg1 arrow: arg2 upDown: arg3\\\\n\\\\t\\\\\\\"Reorder the arguments for existing event handlers\\\\\\\"\\\\n\\\\t(arg3 isMorph and:[arg3 eventHandler notNil]) ifTrue:[arg3 eventHandler fixReversedValueMessages].\\\\n\\\\t^self upDown: arg1 event: arg2 arrow: arg3! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 9/28/2001 13:38'!\\\\nextend\\\\n\\\\t| messageNodeMorph first |\\\\n\\\\t\\\\\\\"replace this noun with a new message like (arg + 1).  If type is not known, ask the user to type in a selector.  Use nil as arg.  Let user drag something to it afterwards.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Later do evaluation of self to see what type and offer right selector\\\\\\\"\\\\n\\\\tself deselect.\\\\n\\\\tmessageNodeMorph _ (MessageSend receiver: 1 selector: #+ arguments: #(1))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tasTilesIn: Player globalNames: false.\\\\n\\\\towner replaceSubmorph: self by: messageNodeMorph.\\\\n\\\\tfirst _ messageNodeMorph submorphs detect: [:mm | mm isSyntaxMorph].\\\\n\\\\tmessageNodeMorph replaceSubmorph: first by: self.\\\\n\\\\tself acceptIfInScriptor.! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 8/24/2001 13:14'!\\\\nextendArrow\\\\n\\\\t\\\\\\\"Return the extend arrow button.  It replaces the argument with a new message.\\\\n\\\\tI am a number or getter messageNode.\\\\\\\"\\\\n\\\\t| patch |\\\\n\\\\t\\\\n\\\\tself isNoun ifFalse: [^ nil].\\\\n\\\\tself isDeclaration ifTrue: [^ nil].\\\\n\\\\tpatch _ (ImageMorph new image: (TileMorph classPool at: #SuffixPicture)).\\\\n\\\\tpatch on: #mouseDown send: #extend to: self.\\\\n\\\\t^ patch! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 9/28/2001 11:35'!\\\\nnewAssignment\\\\n\\\\t\\\\\\\"I am a variableNode.  Place me inside an assignment statement.\\\\\\\"\\\\n\\\\n\\\\t| new old |\\\\n\\\\tparseNode name: self decompile.\\\\t\\\\\\\"in case user changed name\\\\\\\"\\\\n\\\\tnew _ owner assignmentNode: AssignmentNode new variable: parseNode \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tvalue: parseNode copy.\\\\n\\\\tself deselect.\\\\n\\\\t(old _ owner) replaceSubmorph: self by: new.\\\\t\\\\\\\"do the normal replacement\\\\\\\"\\\\n\\\\t(old isSyntaxMorph) ifTrue: [old cleanupAfterItDroppedOnMe].\\\\t\\\\\\\"now owned by no one\\\\\\\"\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'dgd 2/22/2003 13:40'!\\\\nofferPopUp\\\\n\\\\t\\\\\\\"Put up a halo to allow user to change\\\\n\\\\t\\\\tLiterals (Integer, true),\\\\n\\\\t\\\\tSelector (beep: sound, +,-,*,//,\\\\\\\\\\\\\\\\, r:g:b:, setX: incX: decX: for any X,),\\\\n\\\\t\\\\tVariable (Color),\\\\n\\\\t\\\\tnot AssignmentNode (_ inc dec),\\\\n\\\\tExtend arrows on each literal, variable, and message, (block that is by itself).\\\\n\\\\tRetract arrows on each literal or variable, or message or block that is an argument.\\\\n\\\\tAny literal can be changed by Shift-clicking and typing.\\\\\\\"\\\\n\\\\n\\\\t| panel any upDown retract extend colorPatch edge dismiss rr duplicate |\\\\n\\\\t(self hasProperty: #myPopup) ifTrue: [^self].\\\\t\\\\\\\"already has one\\\\\\\"\\\\n\\\\tany := false.\\\\n\\\\t(upDown := self upDownArrows) ifNotNil: [any := true].\\\\t\\\\\\\"includes menu of selectors\\\\\\\"\\\\n\\\\t(retract := self retractArrow) ifNotNil: [any := true].\\\\n\\\\t(extend := self extendArrow) ifNotNil: [any := true].\\\\n\\\\t(dismiss := self dismisser) ifNotNil: [any := true].\\\\n\\\\t(duplicate := self duplicator) ifNotNil: [any := true].\\\\n\\\\t\\\\\\\"(assign _ self assignmentArrow) ifNotNil: [any _ true].\\\\n\\\\t\\\\t\\\\tget from menu or any other assignment\\\\\\\"\\\\n\\\\tsubmorphs last class == ColorTileMorph \\\\n\\\\t\\\\tifFalse: [(colorPatch := self colorPatch) ifNotNil: [any := true]].\\\\n\\\\tany ifFalse: [^self].\\\\n\\\\t\\\\\\\"Transcript cr; print: parseNode class; space; \\\\n\\\\t\\\\tprint: (self hasProperty: #myPopup); endEntry.\\\\\\\"\\\\n\\\\tpanel := (RectangleMorph new)\\\\n\\\\t\\\\t\\\\t\\\\tcolor: Color transparent;\\\\n\\\\t\\\\t\\\\t\\\\tborderWidth: 0.\\\\n\\\\tupDown ifNotNil: \\\\n\\\\t\\\\t\\\\t[panel addMorphBack: upDown first.\\\\n\\\\t\\\\t\\\\tupDown first align: upDown first topLeft with: panel topLeft + (0 @ 0).\\\\n\\\\t\\\\t\\\\tpanel addMorphBack: upDown second.\\\\n\\\\t\\\\t\\\\tupDown second align: upDown second topLeft\\\\n\\\\t\\\\t\\\\t\\\\twith: upDown first bottomLeft + (0 @ 1).\\\\n\\\\t\\\\t\\\\tupDown size > 2 \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[panel addMorphBack: upDown third.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tupDown third align: upDown third topLeft\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twith: upDown first topRight + (2 @ 3)]].\\\\n\\\\trr := self right.\\\\n\\\\tcolorPatch ifNotNil: \\\\n\\\\t\\\\t\\\\t[rr := rr + colorPatch submorphs first width + 1.\\\\n\\\\t\\\\t\\\\tself addMorphBack: colorPatch\\\\t\\\\\\\"always in tile\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\\\\"colorPatch align: colorPatch topLeft \\\\n\\\\t\\\\t\\\\t\\\\t\\\\twith: panel topLeft + (1@1)\\\\\\\"].\\\\n\\\\tretract ifNotNil: \\\\n\\\\t\\\\t\\\\t[edge := panel submorphs isEmpty \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [panel left]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [panel submorphs last right].\\\\n\\\\t\\\\t\\\\tpanel addMorphBack: retract.\\\\n\\\\t\\\\t\\\\tretract align: retract topLeft with: (edge + 2) @ (panel top + 3)].\\\\n\\\\textend ifNotNil: \\\\n\\\\t\\\\t\\\\t[edge := panel submorphs isEmpty \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [panel left]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [panel submorphs last right].\\\\n\\\\t\\\\t\\\\tpanel addMorphBack: extend.\\\\n\\\\t\\\\t\\\\textend align: extend topLeft with: (edge + 2) @ (panel top + 3)].\\\\n\\\\tduplicate ifNotNil: \\\\n\\\\t\\\\t\\\\t[edge := panel submorphs isEmpty \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [panel left]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [panel submorphs last right].\\\\n\\\\t\\\\t\\\\tpanel addMorphBack: duplicate.\\\\n\\\\t\\\\t\\\\tduplicate align: duplicate topLeft with: (edge + 2) @ (panel top + 1)].\\\\n\\\\tdismiss ifNotNil: \\\\n\\\\t\\\\t\\\\t[edge := panel submorphs isEmpty \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [panel left]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [panel submorphs last right].\\\\n\\\\t\\\\t\\\\tpanel addMorphBack: dismiss.\\\\n\\\\t\\\\t\\\\tdismiss align: dismiss topLeft with: (edge + 2) @ (panel top + 1)].\\\\n\\\\t\\\\\\\"\\\\tassign ifNotNil: [\\\\n\\\\t\\\\tedge _ panel submorphs isEmpty \\\\n\\\\t\\\\t\\\\tifTrue: [panel left] \\\\n\\\\t\\\\t\\\\tifFalse: [panel submorphs last right].\\\\n\\\\t\\\\tpanel addMorphBack: assign.\\\\n\\\\t\\\\tassign align: assign topLeft with: (edge+2) @ (panel top + 2)].\\\\n\\\\\\\"\\\\n\\\\tpanel align: panel topLeft with: rr @ (self top - 2).\\\\n\\\\tpanel extent: panel submorphs last bottomRight - panel topLeft.\\\\n\\\\tself setProperty: #myPopup toValue: panel.\\\\n\\\\tself addMorphBack: panel\\\\t\\\\\\\"Any reason ever to have panel below?\\\\\\\"\\\\n\\\\t\\\\\\\"(owner listDirection = #topToBottom and: [self listDirection = #leftToRight])\\\\n\\\\t\\\\tifTrue: [self addMorphBack: panel]\\\\n\\\\t\\\\tifFalse: [owner addMorph: panel after: self].\\\\\\\"! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 9/28/2001 13:39'!\\\\nreplaceKeyWord: evt menuItem: stringMorph\\\\n\\\\t\\\\\\\"Replace my entire message (which may be multi-part) with the one specified.  Preserve all argument tiles, either in the new message or in the world outside the scriptor.  I am a SelectorNode or KeyWordNode.\\\\\\\"\\\\n\\\\n\\\\t| menu new news newSel mm newTree newRec newArgs top oldArgNodes share ctrY |\\\\n\\\\t(menu _ stringMorph owner owner) class == RectangleMorph ifTrue: [\\\\n\\\\t\\\\tmenu delete].\\\\n\\\\tnew _ stringMorph contents.\\\\n\\\\tnew first = $( ifTrue: [^ self].\\\\t\\\\\\\"Cancel\\\\\\\"\\\\n\\\\tnew first = $  ifTrue: [^ self].\\\\t\\\\\\\"nothing\\\\\\\"\\\\n\\\\tnews _ String streamContents: [:strm | \\\\\\\"remove fake args\\\\\\\"\\\\n\\\\t\\\\t(new findBetweenSubStrs: #(' 5' $ )) do: [:part | strm nextPutAll: part]].\\\\n\\\\tnewSel _ stringMorph valueOfProperty: #syntacticallyCorrectContents.\\\\n\\\\tnewSel ifNil: [newSel _ news].\\\\n\\\\tmm _ MessageSend receiver: 5 selector: newSel \\\\n\\\\t\\\\t\\\\targuments: ((Array new: newSel numArgs) atAllPut: 5).\\\\n\\\\tnewTree _ mm asTilesIn: Object globalNames: false.\\\\n\\\\tnewRec _ newTree receiverNode.\\\\n\\\\tnewArgs _ newTree argumentNodes.\\\\n\\\\tctrY _ self fullBoundsInWorld center y.\\\\n\\\\ttop _ self messageNode.\\\\n\\\\tnewRec owner replaceSubmorph: newRec by: top receiverNode.\\\\n\\\\toldArgNodes _ top argumentNodes.\\\\n\\\\tshare _ newArgs size min: oldArgNodes size.\\\\n\\\\t(newArgs first: share) with: (oldArgNodes first: share) do: [:newNode :oldNode | \\\\n\\\\t\\\\tnewNode owner replaceSubmorph: newNode by: oldNode].\\\\n\\\\t\\\\\\\"later get nodes for objects of the right type for new extra args\\\\\\\"\\\\n\\\\n\\\\ttop owner replaceSubmorph: top by: newTree.\\\\n\\\\n\\\\t\\\\\\\"Deposit extra args in the World\\\\\\\"\\\\n\\\\t(oldArgNodes copyFrom: share+1 to: oldArgNodes size) do: [:leftOver |\\\\n\\\\t\\\\t(leftOver parseNode class == LiteralNode and: [leftOver decompile asString = '5']) \\\\n\\\\t\\\\t\\\\tifFalse: [newTree pasteUpMorph addMorphFront: leftOver.\\\\n\\\\t\\\\t\\\\t\\\\tleftOver position: newTree enclosingPane fullBoundsInWorld right - 20 @ ctrY.\\\\n\\\\t\\\\t\\\\t\\\\tctrY _ ctrY + 26]\\\\n\\\\t\\\\t\\\\tifTrue: [leftOver delete]].\\\\n\\\\tnewTree acceptIfInScriptor.! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 9/19/2001 21:32'!\\\\nreplaceSel: evt menuItem: stringMorph\\\\n\\\\t\\\\\\\"I rep a SelectorNode.  Replace my selector with new one that was just chosen from a menu\\\\\\\"\\\\n\\\\n\\\\t| menu new old newSel ms oa na case news |\\\\n\\\\t(menu _ stringMorph owner owner) class == RectangleMorph ifTrue: [\\\\n\\\\t\\\\tmenu delete].\\\\n\\\\tnew _ stringMorph contents.\\\\n\\\\tnew first = $( ifTrue: [^ self].\\\\t\\\\\\\"Cancel\\\\\\\"\\\\n\\\\tnew first = $  ifTrue: [^ self].\\\\t\\\\\\\"nothing\\\\\\\"\\\\n\\\\tnews _ String streamContents: [:strm | \\\\\\\"remove fake args\\\\\\\"\\\\n\\\\t\\\\t(new findBetweenSubStrs: #(' 5' $ )) do: [:part | strm nextPutAll: part]].\\\\n\\\\tnewSel _ stringMorph valueOfProperty: #syntacticallyCorrectContents.\\\\n\\\\tnewSel ifNil: [newSel _ news].\\\\n\\\\told _ (ms _ self findA: StringMorph) valueOfProperty: #syntacticallyCorrectContents.\\\\n\\\\told ifNil: [old _ (self findA: StringMorph) contents].\\\\n\\\\toa _ old numArgs.  na _ newSel numArgs.  case _ 5.\\\\n\\\\t(oa = 1) & (na = 1) ifTrue: [case _ 1]. \\\\n\\\\t(oa = 0) & (na = 0) ifTrue: [case _ 2].\\\\n\\\\t(oa = 1) & (na  = 0) ifTrue: [case _ 3].\\\\n\\\\t(oa = 0) & (na  = 1) ifTrue: [case _ 4].\\\\n\\\\tcase <= 4 ifTrue: [\\\\\\\"replace the selector\\\\\\\"\\\\n\\\\t\\\\tms contents: news.\\\\t\\\\\\\"not multi-part\\\\\\\"\\\\n\\\\t\\\\tms setProperty: #syntacticallyCorrectContents toValue: newSel].\\\\n\\\\tcase = 3 ifTrue: [owner tossOutArg: 1].\\\\n\\\\tcase = 4 ifTrue: [self addArg: 1].\\\\n\\\\t\\\\\\\"more cases here.  Rebuild the entire MessageNode\\\\\\\"\\\\n\\\\t\\\\n\\\\tself acceptIfInScriptor.! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 9/28/2001 10:06'!\\\\nretract\\\\n\\\\t\\\\\\\"replace this message with its receiver.  I am the message node.\\\\\\\"\\\\n\\\\t| rec cascade msg |\\\\n\\\\t(self nodeClassIs: CascadeNode) ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"This is a piece of a cascaded message -- just delete it\\\\\\\"\\\\n\\\\t\\\\tself deletePopup.\\\\n\\\\t\\\\tcascade _ owner.\\\\n\\\\t\\\\tself delete.\\\\n\\\\t\\\\tcascade setSelection: {cascade. nil. cascade}.\\\\n\\\\t\\\\t^ cascade acceptIfInScriptor].\\\\n\\\\tself deletePopup.\\\\n\\\\t(rec _ self receiverNode)\\\\n\\\\t\\\\tifNil: [msg _ owner.\\\\n\\\\t\\\\t\\\\trec _ owner receiverNode.\\\\n\\\\t\\\\t\\\\tmsg owner replaceSubmorph: msg by: rec]\\\\n\\\\t\\\\tifNotNil: [owner replaceSubmorph: self by: rec].\\\\n\\\\trec setSelection: {rec. nil. rec}.\\\\n\\\\trec acceptIfInScriptor.! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'di 12/13/2000 12:57'!\\\\nretractArrow\\\\n\\\\t\\\\\\\"Return the retract arrow button.  It replaces the current message with its receiver.\\\\n\\\\tI am in a MessageNode whose first subnode is not a MessagePartNode.  I did not encounter a block on the way up to it.  I am the last subnode in every owner up to it.\\\\\\\"\\\\n\\\\t| patch |\\\\n\\\\n\\\\t(self nodeClassIs: MessageNode) ifFalse: [^ nil].\\\\n\\\\t(owner isSyntaxMorph and: [owner parseNode == parseNode]) ifTrue: [^ nil].\\\\n\\\\n\\\\tpatch _ (ImageMorph new image: (TileMorph classPool at: #RetractPicture)).\\\\n\\\\tpatch on: #mouseDown send: #retract to: self.\\\\n\\\\t^ patch! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 9/18/2001 16:27'!\\\\nselectorMenu\\\\n\\\\t\\\\\\\"Put up a menu of all selectors that my receiver could be sent.  Replace me with the one chosen.  (If fewer args, put the tiles for the extra arg to the side, in script's owner (world?).)\\\\n\\\\tGo ahead and eval receiver to find out its type.  Later, mark selectors for side effects, and don't eval those.\\\\n\\\\tPut up a table.  Each column is a viewer category.\\\\\\\"\\\\n\\\\n\\\\t| cats value catNames interfaces list setter wording all words ind aVocabulary limitClass |\\\\n\\\\tcats _ #().\\\\n\\\\tall _ Set new.\\\\n\\\\tvalue _ self receiverObject.\\\\n\\\\tvalue class == Error ifTrue: [^ nil].\\\\n\\\\t\\\\n\\\\taVocabulary _ self vocabularyToUseWith: value.\\\\n\\\\tlimitClass _ self limitClassToUseWith: value vocabulary: aVocabulary.\\\\n\\\\tcatNames _ value categoriesForVocabulary: aVocabulary limitClass: limitClass.\\\\n\\\\tcats _ catNames collect: [:nn | \\\\n\\\\t\\\\tlist _ OrderedCollection new.\\\\n\\\\t\\\\tinterfaces _ value methodInterfacesForCategory: nn \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinVocabulary: aVocabulary limitClass: limitClass.\\\\n\\\\t\\\\tinterfaces do: [:mi | \\\\n\\\\t\\\\t\\\\t(all includes: mi selector) ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"list add: (self aSimpleStringMorphWith: mi elementWording).  Expensive\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\twords _ mi selector.\\\\n\\\\t\\\\t\\\\t\\\\t(words beginsWith: 'get ') ifTrue: [words _ words allButFirst: 4].\\\\n\\\\t\\\\t\\\\t\\\\tmi selector last == $: ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\twords _ String streamContents: [:strm | \\\\\\\"add fake args\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(words findTokens: $:) do: [:part | strm nextPutAll: part; nextPutAll: ' 5 ']].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\twords _ words allButLast].\\\\n\\\\t\\\\t\\\\t\\\\tmi selector isInfix ifTrue: [words _ words, ' 5'].\\\\n\\\\t\\\\t\\\\t\\\\twords _ self splitAtCapsAndDownshifted: words.\\\\t\\\\n\\\\t\\\\t\\\\t\\\\tlist add: (self anUpdatingStringMorphWith: words special: true).\\\\n\\\\t\\\\t\\\\t\\\\twords = mi selector ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tlist last setProperty: #syntacticallyCorrectContents toValue: mi selector].\\\\n\\\\t\\\\t\\\\t\\\\tall add: mi selector].\\\\n\\\\t\\\\t\\\\tsetter _ mi companionSetterSelector asString.\\\\n\\\\t\\\\t\\\\t(setter = 'nil') | (all includes: setter) ifFalse: [\\\\\\\"need setters also\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\twording _ (self translateToWordySetter: setter).\\\\n\\\\t\\\\t\\\\t\\\\tlist add:  (self aSimpleStringMorphWith: wording, ' 5').\\\\n\\\\t\\\\t\\\\t\\\\twording = setter ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tlist last setProperty: #syntacticallyCorrectContents \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttoValue: setter].\\\\n\\\\t\\\\t\\\\t\\\\tall add: setter]].\\\\n\\\\t\\\\tlist].\\\\n\\\\t(ind _ catNames indexOf: 'scripts') > 0 ifTrue: [\\\\n\\\\t\\\\t(cats at: ind) first contents = 'empty script' ifTrue: [(cats at: ind) removeFirst]].\\\\n\\\\tcats first addFirst: (self aSimpleStringMorphWith: ' ').\\\\t\\\\\\\"spacer\\\\\\\"\\\\n\\\\tcats first addFirst: (self aSimpleStringMorphWith: '( from ', value class name, ' )').\\\\n\\\\tcats first first color: (Color green mixed: 0.25 with: Color black).\\\\n\\\\tself selectorMenuAsk: cats.\\\\t\\\\\\\"The method replaceSel:menuItem: does the work.  \\\\n\\\\t\\\\tand replaces the selector.\\\\\\\"\\\\n\\\\t! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 9/20/2001 16:04'!\\\\nselectorMenuAsk: listOfLists\\\\n\\\\t\\\\\\\"I represent a SelectorNode to be replaced by one of the selectors in one of the category lists.  Each list has pre-built StringMorphs in it.\\\\\\\"\\\\n\\\\n\\\\t| menu col |\\\\n\\\\tlistOfLists isEmpty ifTrue: [^ nil].\\\\n\\\\tlistOfLists first addFirst: (self aSimpleStringMorphWith: '( Cancel )').\\\\n\\\\tlistOfLists first first color: Color red.\\\\n\\\\tmenu _ RectangleMorph new.\\\\n\\\\tmenu listDirection: #leftToRight; layoutInset: 3; cellInset: 1@0.\\\\n\\\\tmenu layoutPolicy: TableLayout new; hResizing: #shrinkWrap; \\\\n\\\\t\\\\tvResizing: #shrinkWrap; color: (Color r: 0.767 g: 1.0 b: 0.767);\\\\n\\\\t\\\\tuseRoundedCorners; cellPositioning: #topLeft.\\\\n\\\\tlistOfLists do: [:ll |\\\\n\\\\t\\\\tcol _ Morph new.\\\\n\\\\t \\\\tcol listDirection: #topToBottom; layoutInset: 0; cellInset: 0@0.\\\\n\\\\t\\\\tcol layoutPolicy: TableLayout new; hResizing: #shrinkWrap.\\\\n\\\\t\\\\tcol color: Color transparent; vResizing: #shrinkWrap.\\\\n\\\\t\\\\tmenu addMorphBack: col.\\\\n\\\\t\\\\tll do: [:ss | \\\\n\\\\t\\\\t\\\\tcol addMorphBack: ss.\\\\n\\\\t\\\\t\\\\tss on: #mouseUp send: #replaceKeyWord:menuItem: to: self]\\\\n\\\\t\\\\t].\\\\n\\\\tself world addMorph: menu.\\\\n\\\\tmenu setConstrainedPosition: (owner localPointToGlobal: self topRight) + (10@-30) \\\\n\\\\t\\\\t\\\\thangOut: false.\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'sw 3/18/2004 00:35'!\\\\nsetSelector: stringLike in: stringMorph\\\\n\\\\t\\\\\\\"Store the new selector and accept method.\\\\\\\"\\\\n\\\\n\\\\t| aSymbol myType str |\\\\n\\\\taSymbol _ stringLike asSymbol.\\\\n\\\\t(ScriptingSystem helpStringOrNilFor: aSymbol) ifNotNilDo:\\\\n\\\\t\\\\t[:aString |\\\\n\\\\t\\\\t\\\\tself setBalloonText: aString translated].\\\\n\\\\tmyType _ stringMorph valueOfProperty: #syntacticReformatting ifAbsent: [#none].\\\\n\\\\tstr _ aSymbol.\\\\n\\\\t(self isStandardSetterKeyword: str) ifTrue: [str _ self translateToWordySetter: str].\\\\n\\\\t(self isStandardGetterSelector: str) ifTrue: [str _ self translateToWordyGetter: str].\\\\n\\\\t(self shouldBeBrokenIntoWords: myType) \\\\n\\\\t\\\\tifTrue: [str _ self substituteKeywordFor: str].\\\\n\\\\tstringMorph contents: str.\\\\n\\\\t\\\\\\\"parseNode key: aSymbol code: nil.\\\\\\\"\\\\n\\\\tstr = stringLike ifFalse:\\\\n\\\\t\\\\t[stringMorph setProperty: #syntacticallyCorrectContents toValue: aSymbol].\\\\n\\\\tself acceptSilently! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 9/19/2001 15:47'!\\\\ntossOutArg: extras\\\\n\\\\n\\\\t\\\\\\\"Remove the tiles for the last N keywords and arguments.  Place the tiles beside the current window.  I am a SyntaxMorph for a MessageNode.\\\\\\\"\\\\n\\\\n\\\\t| cnt ctr |\\\\n\\\\tcnt _ 0.\\\\n\\\\t submorphs copy reverseDo: [:sub |\\\\n\\\\t\\\\tctr _ sub fullBoundsInWorld center.\\\\n\\\\t\\\\tsub delete.\\\\n\\\\t\\\\t(sub isSyntaxMorph and: [sub parseNode notNil]) ifTrue: [\\\\n\\\\t\\\\t\\\\tsub isNoun ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tself pasteUpMorph addMorphFront: sub.\\\\n\\\\t\\\\t\\\\t\\\\tsub position: self enclosingPane fullBoundsInWorld right - 20 @ ctr y].\\\\n\\\\t\\\\t\\\\t(cnt _ cnt + 1) >= extras ifTrue: [^ self]]].! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 8/24/2001 13:35'!\\\\nupDown: delta event: evt arrow: arrowMorph\\\\n\\\\n\\\\t| st |\\\\n\\\\tst _ submorphs detect: [:mm | mm isKindOf: StringMorph] ifNone: [^ self].\\\\n\\\\t(self nodeClassIs: LiteralNode) ifTrue:\\\\n\\\\t\\\\t[ \\\\\\\"+/- 1\\\\\\\"\\\\n\\\\t\\\\tst contents: (self decompile asNumber + delta) printString.\\\\n\\\\t\\\\t^ self acceptUnlogged].\\\\n\\\\t(self nodeClassIs: VariableNode) ifTrue:\\\\n\\\\t\\\\t[ \\\\\\\"true/false\\\\\\\"\\\\n\\\\t\\\\tst contents: (self decompile string = 'true') not printString.\\\\n\\\\t\\\\t^ self acceptSilently ifFalse: [self changed].\\\\n\\\\t\\\\t\\\\t\\\\\\\"maybe set parseNode's key\\\\\\\"].\\\\n\\\\n\\\\t(self upDownArithOp: delta) ifTrue: [^ self].\\\\t\\\\\\\"+ - // *   < > <= =   beep:\\\\\\\"\\\\n\\\\n\\\\t(self upDownAssignment: delta) ifTrue: [^ self].\\\\n\\\\t\\\\t\\\\\\\"Handle assignment --  increaseBy:  <-   multiplyBy:\\\\\\\"\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 7/24/2001 17:54'!\\\\nupDownArithOp: delta\\\\n\\\\t\\\\\\\"Change a + into a -.  Also do sounds (change the arg to the beep:).\\\\\\\"\\\\n\\\\n\\\\t| aList index st |\\\\n\\\\tst _ submorphs detect: [:mm | mm isKindOf: StringMorph] ifNone: [^ self].\\\\n\\\\t(self nodeClassIs: SelectorNode) ifTrue:\\\\n\\\\t\\\\t[aList _ #(+ - * / // \\\\\\\\\\\\\\\\ min: max:).\\\\n\\\\t\\\\t(index _ aList indexOf: self decompile asString) > 0 ifTrue:\\\\n\\\\t\\\\t\\\\t[self setSelector: (aList atWrap: index + delta) in: st.  ^ true].\\\\n\\\\n\\\\t\\\\taList _ #(= ~= > >= isDivisibleBy: < <=).\\\\n\\\\t\\\\t(index _ aList indexOf: self decompile asString) > 0 ifTrue:\\\\n\\\\t\\\\t\\\\t[self setSelector: (aList atWrap: index + delta) in: st.  ^ true].\\\\n\\\\n\\\\t\\\\taList _ #(== ~~).\\\\n\\\\t\\\\t(index _ aList indexOf: self decompile asString) > 0 ifTrue:\\\\n\\\\t\\\\t\\\\t[self setSelector: (aList atWrap: index + delta) in: st.  ^ true].\\\\n\\\\n\\\\t\\\\t'beep:' = self decompile asString ifTrue:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"replace sound arg\\\\\\\"\\\\n\\\\t\\\\t\\\\tself changeSound: delta.\\\\n\\\\t\\\\t\\\\tself acceptSilently.  ^ true].\\\\n\\\\t\\\\t].\\\\n\\\\t^ false! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 9/20/2001 16:33'!\\\\nupDownArrows\\\\n\\\\t\\\\\\\"Return an array of two up/down arrow buttons.\\\\n\\\\tIt replaces the selector or arg with a new one.\\\\n\\\\tI am a number or boolean or a selector (beep:, +,-,*,//,\\\\\\\\\\\\\\\\, or setX: incX: decX: for any X.\\\\\\\"\\\\n\\\\t| patch any noMenu |\\\\n\\\\tany _ (self nodeClassIs: LiteralNode) and: [parseNode key isNumber].\\\\n\\\\tany _ any or: [(self nodeClassIs: VariableNode) and:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[(#('true' 'false') includes: self decompile asString)]].\\\\n\\\\tnoMenu _ any.\\\\n\\\\n\\\\tany _ any or: [self nodeClassIs: SelectorNode].\\\\t\\\\\\\"arrows and menu of selectors\\\\\\\"\\\\n\\\\tany _ any or: [self nodeClassIs: KeyWordNode].\\\\n\\\\tany ifFalse: [^ nil].\\\\n\\\\n\\\\tpatch _ {(ImageMorph new image: TileMorph upPicture)\\\\n\\\\t\\\\t\\\\t\\\\ton: #mouseDown send: #upDown:event:arrow: to: self withValue: 1;\\\\n\\\\t\\\\t\\\\t\\\\ton: #mouseStillDown send: #upDownMore:event:arrow: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tto: self withValue: 1;\\\\n\\\\t\\\\t\\\\t\\\\ton: #mouseUp send: #upDownDone to: self.\\\\n\\\\t\\\\t\\\\t(ImageMorph new image: TileMorph downPicture)\\\\n\\\\t\\\\t\\\\t\\\\ton: #mouseDown send: #upDown:event:arrow: to: self withValue: -1;\\\\n\\\\t\\\\t\\\\t\\\\ton: #mouseStillDown send: #upDownMore:event:arrow: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tto: self withValue: -1;\\\\n\\\\t\\\\t\\\\t\\\\ton: #mouseUp send: #upDownDone to: self}.\\\\n\\\\tnoMenu ifFalse: [patch _ patch, {(RectangleMorph new)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\textent: 6@10; borderWidth: 1;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tborderColor: Color gray;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ton: #mouseUp send: #selectorMenu to: self}.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpatch last color: ((self nodeClassIs: SelectorNode) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [Color lightGreen] ifFalse: [Color red darker])].\\\\n\\\\t^ patch! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 8/24/2001 12:33'!\\\\nupDownAssignment: delta\\\\n\\\\t\\\\\\\"Rotate between increaseBy:  decreaseBy:   _  multiplyBy:\\\\\\\"\\\\n\\\\n\\\\t| st now want instVar |\\\\n\\\\tst _ submorphs detect: [:mm | mm isKindOf: StringMorph] ifNone: [^ self].\\\\n\\\\t(self nodeClassIs: SelectorNode) ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"kinds of assignment\\\\\\\"\\\\n\\\\t\\\\t((now _ self decompile asString) beginsWith: 'set') ifTrue:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"a setX: 3\\\\\\\"\\\\n\\\\t\\\\t\\\\twant _ 1+delta.  instVar _ (now allButFirst: 3) allButLast].\\\\n\\\\t\\\\t(now endsWith: 'IncreaseBy:') ifTrue:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"a xIncreaseBy: 3 a setX: (a getX +3).\\\\\\\"\\\\n\\\\t\\\\t\\\\twant _ 2+delta.  instVar _ now allButLast: 11].\\\\n\\\\t\\\\t(now endsWith: 'DecreaseBy:') ifTrue:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"a xDecreaseBy: 3 a setX: (a getX -3).\\\\\\\"\\\\n\\\\t\\\\t\\\\twant _ 3+delta.  instVar _ now allButLast: 11].\\\\n\\\\t\\\\t(now endsWith: 'MultiplyBy:') ifTrue:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"a xMultiplyBy: 3 a setX: (a getX *3).\\\\\\\"\\\\n\\\\t\\\\t\\\\twant _ 4+delta.  instVar _ now allButLast: 11].\\\\n\\\\t\\\\twant ifNil: [^ false].\\\\n\\\\t\\\\tinstVar _ instVar asLowercase.\\\\n\\\\t\\\\twant _ #(1 2 3 4) atWrap: want.\\\\n\\\\t\\\\twant = 1 ifTrue:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"setter method is present\\\\\\\"\\\\n\\\\t\\\\t\\\\tself setSelector: ('set', instVar capitalized, ':') in: st.  ^ true].\\\\n\\\\t\\\\twant = 2 ifTrue:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"notUnderstood will create the method if needed\\\\\\\"\\\\n\\\\t\\\\t\\\\tself setSelector: instVar, 'IncreaseBy:' in: st.  ^ true].\\\\n\\\\t\\\\twant = 3 ifTrue:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"notUnderstood will create the method if needed\\\\\\\"\\\\n\\\\t\\\\t\\\\tself setSelector: instVar, 'DecreaseBy:' in: st.  ^ true].\\\\n\\\\t\\\\twant = 4 ifTrue:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"notUnderstood will create the method if needed\\\\\\\"\\\\n\\\\t\\\\t\\\\tself setSelector: instVar, 'MultiplyBy:' in: st.  ^ true].\\\\n\\\\t\\\\t].\\\\n\\\\t^ false\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'di 5/4/2001 11:49'!\\\\nupDownDone\\\\n\\\\n\\\\t(self nodeClassIs: LiteralNode) ifTrue:\\\\n\\\\t\\\\t[self acceptSilently.  \\\\\\\"Final compilation logs source\\\\\\\"\\\\n\\\\t\\\\tself removeProperty: #timeOfLastTick;\\\\n\\\\t\\\\t\\\\tremoveProperty: #currentDelay].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'di 5/4/2001 12:26'!\\\\nupDownMore: delta event: evt arrow: arrowMorph\\\\n\\\\n\\\\t| st delay1 delay2 now timeOfLastTick currentDelay |\\\\n\\\\t(self nodeClassIs: LiteralNode) ifFalse: [^ self].\\\\n\\\\tst _ submorphs detect: [:mm | mm isKindOf: StringMorph] ifNone: [^ self].\\\\n\\\\tdelay1 _ 300.  \\\\\\\"ms\\\\\\\"\\\\n\\\\tdelay2 _ 50.  \\\\\\\"ms\\\\\\\"\\\\n\\\\tnow _ Time millisecondClockValue.\\\\n\\\\ttimeOfLastTick _ (self valueOfProperty: #timeOfLastTick) ifNil: [now - delay1].\\\\n\\\\tcurrentDelay _ (self valueOfProperty: #currentDelay) ifNil: [delay1].\\\\n\\\\tnow >= (timeOfLastTick + currentDelay) ifTrue:\\\\n\\\\t\\\\t[self setProperty: #timeOfLastTick toValue: now.\\\\n\\\\t\\\\t\\\\\\\"decrease the delay\\\\\\\"\\\\n\\\\t\\\\tself setProperty: #currentDelay toValue: (currentDelay*8//10 max: delay2).\\\\n\\\\t\\\\tst contents: (self decompile asNumber + delta) printString.\\\\n\\\\t\\\\t^ self acceptUnlogged].\\\\n! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'tk 9/23/2001 01:33'!\\\\ngetHeader: strm\\\\n\\\\t| se |\\\\n\\\\t\\\\\\\"We are in an EToy scriptor and the method header line has been removed.  Try to recover the method name.  Fail if method has args (deal with this later).\\\\\\\"\\\\n\\\\n\\\\t(se _ self ownerThatIsA: ScriptEditorMorph) ifNotNil: [\\\\n\\\\t\\\\tse scriptName numArgs > 0 ifTrue: [^ false].\\\\t\\\\\\\"abort\\\\\\\"\\\\n\\\\t\\\\tstrm nextPutAll: se scriptName].\\\\n\\\\t^ true! !\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'dgd 2/22/2003 13:40'!\\\\nownerPrecedence\\\\n\\\\t\\\\\\\"Return the selector precedence of my owner.  1 for unary (asInteger), 2 for binary arithmetic (+), and 3 for keyword selectors (from:to:).  Subtract 0.5 if self is an arg, not the receiver (the case of a + (b + c))\\\\\\\"\\\\n\\\\n\\\\t| oo below sel pp |\\\\n\\\\too := owner.\\\\n\\\\tbelow := self.\\\\n\\\\t\\\\n\\\\t[oo isSyntaxMorph ifFalse: [^10].\\\\t\\\\\\\"I do not need parens\\\\\\\"\\\\n\\\\too parseNode isNil] \\\\n\\\\t\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t\\\\t[below := oo.\\\\n\\\\t\\\\t\\\\t\\\\too := oo owner].\\\\n\\\\t(sel := oo selector) ifNil: [^10].\\\\n\\\\t(pp := sel precedence) = 3 ifTrue: [^2.5].\\\\t\\\\\\\"keyword messages need parens\\\\\\\"\\\\n\\\\t^oo receiverNode == below ifTrue: [pp] ifFalse: [pp - 0.5]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'tk 9/23/2001 02:11'!\\\\nprintAssignmentNodeOn: strm indent: level\\\\n\\\\t\\\\\\\"sometimes an assignment is in parens\\\\\\\"\\\\n\\\\t| parens above |\\\\n\\\\n\\\\tparens _ submorphs size >= 3.\\\\n\\\\tparens ifTrue: [\\\\n\\\\t\\\\tabove _ self ownerPrecedence.\\\\t\\\\\\\"high if not in an expression\\\\\\\"\\\\n\\\\t\\\\tparens _ above <= 3].\\\\t\\\\\\\"assignment is a noun inside a message\\\\\\\"\\\\n\\\\tparens ifTrue: [strm nextPut: $( ].\\\\n\\\\tself\\\\n\\\\t\\\\tsubmorphsDoIfSyntax: [ :sub |\\\\n\\\\t\\\\t\\\\tsub printOn: strm indent: level.\\\\n\\\\t\\\\t\\\\tstrm ensureASpace.\\\\n\\\\t\\\\t]\\\\n\\\\t\\\\tifString: [ :sub |\\\\n\\\\t\\\\t\\\\tstrm ensureNoSpace. \\\\t\\\\\\\"_ will have a leading space\\\\\\\"\\\\n\\\\t\\\\t\\\\tself printSimpleStringMorph: sub on: strm\\\\n\\\\t\\\\t].\\\\n\\\\tparens ifTrue: [strm ensureNoSpace; nextPut: $) ].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'RAA 3/4/2001 12:19'!\\\\nprintBlockArgsNodeOn: strm indent: level\\\\n\\\\n\\\\t| argString |\\\\n\\\\n\\\\tself\\\\n\\\\t\\\\tsubmorphsDoIfSyntax: [ :sub |\\\\n\\\\t\\\\t\\\\t(argString _ sub decompile) isEmpty ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tstrm \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnextPut: $:;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnextPutAll: argString;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tspace\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t] \\\\n\\\\t\\\\tifString: [ :sub |\\\\n\\\\t\\\\t\\\\t\\\\\\\"self printSimpleStringMorph: sub on: strm\\\\t<<<< do we need this??\\\\\\\"\\\\n\\\\t\\\\t].\\\\n\\\\tstrm nextPut: $|; crtab: level.\\\\n\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'tk 9/23/2001 01:17'!\\\\nprintBlockNodeOn: strm indent: level\\\\n\\\\n\\\\t| lev inASyntaxButNotOutermost subNodeClass |\\\\n\\\\n\\\\tlev _ level.\\\\n\\\\tinASyntaxButNotOutermost _ owner isSyntaxMorph and: [ owner isMethodNode not].\\\\n\\\\tinASyntaxButNotOutermost ifTrue: [strm nextPut: $[.  lev _ lev+1].\\\\n\\\\tself\\\\n\\\\t\\\\tsubmorphsDoIfSyntax: [ :sub |\\\\n\\\\t\\\\t\\\\tsub printOn: strm indent: lev.\\\\n\\\\t\\\\t\\\\tsubNodeClass _ sub parseNode class.\\\\n\\\\t\\\\t\\\\t(#(BlockArgsNode ReturnNode CommentNode) includes: subNodeClass name) ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tstrm ensureNoSpace; nextPut: $.].\\\\n\\\\t\\\\t\\\\tsubNodeClass == BlockArgsNode\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [strm space]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [strm crtab: lev].\\\\n\\\\t\\\\t] \\\\n\\\\t\\\\tifString: [ :sub |\\\\n\\\\t\\\\t\\\\tself printSimpleStringMorph: sub on: strm\\\\n\\\\t\\\\t].\\\\n\\\\tinASyntaxButNotOutermost ifTrue: [strm nextPut: $] ].\\\\n\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'tk 9/23/2001 01:19'!\\\\nprintCascadeNodeOn: strm indent: level\\\\n\\\\n\\\\t| parens cnt me above |\\\\n\\\\n\\\\tparens _ parseNode receiver notNil.\\\\n\\\\tparens ifTrue: [me _ self selector precedence.\\\\n\\\\t\\\\tabove _ self ownerPrecedence.\\\\t\\\\\\\"high if not in an expression\\\\\\\"\\\\n\\\\t\\\\tparens _ me > above].\\\\n\\\\tparens ifTrue: [strm nextPut: $( ].\\\\n\\\\tcnt _ 0.\\\\n\\\\tself\\\\n\\\\t\\\\tsubmorphsDoIfSyntax: [ :sub |\\\\n\\\\t\\\\t\\\\tcnt _ cnt + 1.\\\\n\\\\t\\\\t\\\\t\\\\\\\"maybe we want to test sub isCascadePart for the following???\\\\\\\"\\\\n\\\\t\\\\t\\\\tcnt > 2 ifTrue: [strm nextPutAll: '; '].\\\\n\\\\t\\\\t\\\\tsub printOn: strm indent: level.\\\\n\\\\t\\\\t\\\\tstrm ensureASpace.\\\\n\\\\t\\\\t]\\\\n\\\\t\\\\tifString: [ :sub |\\\\n\\\\t\\\\t\\\\tself printSimpleStringMorph: sub on: strm\\\\n\\\\t\\\\t].\\\\n\\\\tparens ifTrue: [strm ensureNoSpace; nextPut: $) ].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'tk 9/23/2001 01:17'!\\\\nprintMessageNodeOn: strm indent: level\\\\n\\\\n\\\\t| parens me above |\\\\n\\\\n\\\\tparens _ parseNode receiver notNil.\\\\n\\\\tparens ifTrue: [me _ self selector precedence.\\\\n\\\\t\\\\tabove _ self ownerPrecedence.\\\\t\\\\\\\"high if not in an expression\\\\\\\"\\\\n\\\\t\\\\tparens _ me > above].\\\\n\\\\tparens ifTrue: [strm nextPut: $( ].\\\\n\\\\tself\\\\n\\\\t\\\\tsubmorphsDoIfSyntax: [ :sub |\\\\n\\\\t\\\\t\\\\tsub printOn: strm indent: level.\\\\n\\\\t\\\\t\\\\tstrm ensureASpace.\\\\n\\\\t\\\\t]\\\\n\\\\t\\\\tifString: [ :sub |\\\\n\\\\t\\\\t\\\\tself printSimpleStringMorph: sub on: strm\\\\n\\\\t\\\\t].\\\\n\\\\tparens ifTrue: [strm ensureNoSpace; nextPut: $) ].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'tk 9/23/2001 02:12'!\\\\nprintMethodNodeOn: strm indent: level\\\\n\\\\n\\\\t(self findA: SelectorNode) ifNil: [\\\\n\\\\t\\\\t(self getHeader: strm) ifFalse: [^ self].\\\\t\\\\t\\\\\\\"might fail\\\\\\\"\\\\n\\\\t\\\\tstrm crtab: level].\\\\n\\\\tself \\\\n\\\\t\\\\tsubmorphsDoIfSyntax: [ :sub |\\\\n\\\\t\\\\t\\\\tsub printOn: strm indent: level.\\\\n\\\\t\\\\t\\\\tstrm crtab: level.\\\\n\\\\t\\\\t]\\\\n\\\\t\\\\tifString: [ :sub |\\\\n\\\\t\\\\t\\\\tself printSimpleStringMorph: sub on: strm\\\\n\\\\t\\\\t]. \\\\n\\\\tstrm last == $. ifTrue: [strm skip: -1].  \\\\\\\"ugh!!  erase duplicate final period\\\\\\\"! !\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'RAA 3/4/2001 12:08'!\\\\nprintMethodTempsNodeOn: strm indent: level\\\\n\\\\n\\\\tstrm nextPut: $|; space.\\\\n\\\\tself\\\\n\\\\t\\\\tsubmorphsDoIfSyntax: [ :sub |\\\\n\\\\t\\\\t\\\\tsub printOn: strm indent: level.\\\\n\\\\t\\\\t\\\\tstrm space.\\\\n\\\\t\\\\t]\\\\n\\\\t\\\\tifString: [ :sub |\\\\n\\\\t\\\\t\\\\tself printSimpleStringMorph: sub on: strm\\\\n\\\\t\\\\t].\\\\n\\\\tstrm nextPut: $|; crtab: level.\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'tk 10/22/2000 20:43'!\\\\nprintOn: strm\\\\n\\\\n\\\\tsuper printOn: strm.\\\\n\\\\tstrm space; nextPutAll: parseNode class name.! !\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'tk 9/14/2001 13:52'!\\\\nprintOn: strm indent: level\\\\n\\\\n\\\\t| nodeClass |\\\\n\\\\n\\\\t(self hasProperty: #ignoreNodeWhenPrinting) ifFalse: [\\\\n\\\\t\\\\tnodeClass _ parseNode class.\\\\n\\\\t\\\\tnodeClass == VariableNode ifTrue: [^self printVariableNodeOn: strm indent: level].\\\\n\\\\t\\\\tnodeClass == LiteralVariableNode ifTrue: [^self printVariableNodeOn: strm indent: level].\\\\n\\\\t\\\\tnodeClass == MessageNode ifTrue: [^self printMessageNodeOn: strm indent: level].\\\\n\\\\t\\\\tnodeClass == BlockNode ifTrue: [^self printBlockNodeOn: strm indent: level].\\\\n\\\\t\\\\tnodeClass == BlockArgsNode ifTrue: [^self printBlockArgsNodeOn: strm indent: level].\\\\n\\\\t\\\\tnodeClass == MethodNode ifTrue: [^self printMethodNodeOn: strm indent: level].\\\\n\\\\t\\\\tnodeClass == MethodTempsNode ifTrue: [^self printMethodTempsNodeOn: strm indent: level].\\\\n\\\\t\\\\tnodeClass == CascadeNode ifTrue: [^self printCascadeNodeOn: strm indent: level].\\\\n\\\\t\\\\tnodeClass == AssignmentNode ifTrue: [^self printAssignmentNodeOn: strm indent: level].\\\\n\\\\t].\\\\n\\\\tself\\\\n\\\\t\\\\tsubmorphsDoIfSyntax: [ :sub |\\\\n\\\\t\\\\t\\\\tsub printOn: strm indent: level.\\\\n\\\\t\\\\t\\\\tstrm ensureASpace.\\\\n\\\\t\\\\t]\\\\n\\\\t\\\\tifString: [ :sub |\\\\n\\\\t\\\\t\\\\tself printSimpleStringMorph: sub on: strm\\\\n\\\\t\\\\t].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'RAA 2/16/2001 18:16'!\\\\nprintSimpleStringMorph: aMorph on: strm\\\\n\\\\n\\\\t| trialContents |\\\\n\\\\n\\\\t(aMorph hasProperty: #wordyVariantOfSelf) ifTrue: [\\\\n\\\\t\\\\tstrm nextPutAll: 'self '.\\\\n\\\\t\\\\tstrm nextPutAll: ((self translateToWordySelfVariant: aMorph contents) ifNil: [^self]).\\\\n\\\\t\\\\t^self\\\\n\\\\t].\\\\n\\\\t(aMorph hasProperty: #noiseWord) ifFalse: [\\\\n\\\\t\\\\ttrialContents _ self cleanUpString: aMorph.\\\\n\\\\t\\\\tstrm nextPutAll: trialContents\\\\n\\\\t].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'RAA 2/13/2001 23:10'!\\\\nprintStatementsOn: aStream indent: indent\\\\n\\\\n\\\\t\\\\\\\"seemed to be necessary to see top node in explorer\\\\\\\"\\\\n\\\\n\\\\t^parseNode printStatementsOn: aStream indent: indent! !\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'ar 8/16/2001 13:29'!\\\\nprintVariableNodeOn: strm indent: level\\\\n\\\\n\\\\t\\\\\\\"nil out any old association\\\\\\\"\\\\n\\\\tparseNode key isVariableBinding ifTrue: [\\\\n\\\\t\\\\tparseNode \\\\n\\\\t\\\\t\\\\tname: parseNode name \\\\n\\\\t\\\\t\\\\tkey: nil \\\\n\\\\t\\\\t\\\\tcode: parseNode code\\\\n\\\\t].\\\\n\\\\tself\\\\n\\\\t\\\\tsubmorphsDoIfSyntax: [ :sub |\\\\n\\\\t\\\\t\\\\tsub printOn: strm indent: level.\\\\n\\\\t\\\\t\\\\tstrm ensureASpace.\\\\n\\\\t\\\\t]\\\\n\\\\t\\\\tifString: [ :sub |\\\\n\\\\t\\\\t\\\\tself printSimpleStringMorph: sub on: strm\\\\n\\\\t\\\\t].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'di 11/13/2000 07:43'!\\\\nstructure\\\\n\\\\t\\\\\\\"Print my structure from inner to outer.\\\\\\\"\\\\n\\\\t^ String streamContents: [:s |\\\\n\\\\t\\\\tself withAllOwnersDo:\\\\n\\\\t\\\\t\\\\t[:m | m isSyntaxMorph ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[s cr; print: m parseNode class.\\\\n\\\\t\\\\t\\\\t\\\\t((m nodeClassIs: MessageNode) or: [m nodeClassIs: TileMessageNode]) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[s space; nextPutAll: m parseNode selector key]]]]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'RAA 3/4/2001 11:55'!\\\\nsubmorphsDoIfSyntax: block1 ifString: block2 \\\\n\\\\n\\\\t^self submorphsDoIfSyntax: block1 ifString: block2 otherwise: [ :sub | ]\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'gm 2/22/2003 12:34'!\\\\nsubmorphsDoIfSyntax: block1 ifString: block2 otherwise: block3 \\\\n\\\\tsubmorphs do: \\\\n\\\\t\\\\t\\\\t[:sub | \\\\n\\\\t\\\\t\\\\tsub isSyntaxMorph \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [block1 value: sub]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[(sub isKindOf: StringMorph) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [block2 value: sub]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[(sub isTextMorph) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [block2 value: sub]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [block3 value: sub]]]]! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'scripting' stamp: 'tk 9/26/2001 06:01'!\\\\ntearOffTile\\\\n\\\\t\\\\\\\"For a SyntaxMorph, this means give a copy of me\\\\\\\"\\\\n\\\\n\\\\t| dup |\\\\n\\\\tdup _ self duplicate.\\\\n\\\\tActiveHand attachMorph: dup.\\\\n\\\\tPreferences tileTranslucentDrag\\\\n\\\\t\\\\tifTrue: [^ dup lookTranslucent]\\\\n\\\\t\\\\tifFalse: [^ dup align: dup topLeft with: ActiveHand position + self cursorBaseOffset]\\\\n! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'selection' stamp: 'di 11/17/2000 08:10'!\\\\ncurrentSelectionDo: blockForSelection\\\\n\\\\t| rootTile |\\\\n\\\\t(rootTile _ self rootTile) isMethodNode ifFalse:\\\\n\\\\t\\\\t [^ blockForSelection value: nil value: nil value: nil].\\\\n\\\\trootTile valueOfProperty: #selectionSpec ifPresentDo:\\\\n\\\\t\\\\t[:selectionSpec | ^ blockForSelection\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tvalue: selectionSpec first\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tvalue: selectionSpec second\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tvalue: selectionSpec third].\\\\n\\\\t^ blockForSelection value: nil value: nil value: nil! !\\\\n\\\\n!SyntaxMorph methodsFor: 'selection' stamp: 'RAA 2/14/2001 11:33'!\\\\ndeselect\\\\n\\\\tself allMorphsDo:\\\\n\\\\t\\\\t[:m | m isSyntaxMorph ifTrue: [m setDeselectedColor]].\\\\n\\\\n\\\\t\\\\\\\"Note following is wasteful because we do a deselect before each select, and it is often the same morph.\\\\\\\"\\\\n\\\\tself deletePopup! !\\\\n\\\\n!SyntaxMorph methodsFor: 'selection' stamp: 'tk 1/17/2001 15:07'!\\\\nisSelectable\\\\n\\\\t| ss |\\\\n\\\\t\\\\\\\"Spacer morphs enclose other morphs with the same parseNode\\\\\\\"\\\\n\\\\tself submorphs size > 1 ifTrue: [\\\\n\\\\t\\\\tss _ self submorphs second.\\\\n\\\\t\\\\tss isSyntaxMorph ifTrue: [\\\\n\\\\t\\\\t\\\\tss parseNode == parseNode ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t^ self submorphs first class ~~ Morph]]].\\\\n\\\\t\\\\t\\\\n\\\\\\\"\\\\t(self nodeClassIs: SelectorNode) ifTrue: [^ false].\\\\n\\\\t(self nodeClassIs: KeyWordNode) ifTrue: [^ false].\\\\n\\\\\\\"\\\\n\\\\tself isMethodNode ifTrue: [^ false].\\\\n\\\\tparseNode ifNil: [^ false].\\\\n\\\\t^ true! !\\\\n\\\\n!SyntaxMorph methodsFor: 'selection' stamp: 'tk 7/31/2001 17:18'!\\\\nscaleColorByUserPref: aColor\\\\n\\\\t\\\\n\\\\t| myRoot underLyingColor |\\\\n\\\\n\\\\tmyRoot _ self rootTile.\\\\n\\\\tunderLyingColor _ myRoot ifNil: [Color transparent] ifNotNil: [myRoot color].\\\\n\\\\t[underLyingColor isTransparent and: [(myRoot _ myRoot owner) notNil]] whileTrue: [\\\\n\\\\t\\\\tunderLyingColor _ myRoot color.\\\\n\\\\t].\\\\n\\\\t\\\\n\\\\t\\\\\\\"rude hack to get the desired effect before we have an owner\\\\\\\"\\\\n\\\\n\\\\tunderLyingColor isTransparent ifTrue: [underLyingColor _ Color r: 0.903 g: 1.0 b: 0.903].\\\\n\\\\t^aColor mixed: (ContrastFactor ifNil: [0.3]) with: underLyingColor\\\\n\\\\n\\\\\\\"Would like to be able to make MethodNode and outer Block be transparent.  This method does not allow that.  Consider (^ myRoot color) inside the whileTrue.  Consider setting underLyingColor to (myRoot valueOfProperty: #deselectedBorderColor ifAbsent: [myRoot color]) in second line.\\\\\\\"! !\\\\n\\\\n!SyntaxMorph methodsFor: 'selection' stamp: 'tk 7/23/2001 18:31'!\\\\nselect\\\\n\\\\tself deselect.\\\\n\\\\t\\\\\\\"Outer block is not colored and has no popup\\\\\\\"\\\\n\\\\t(owner isSyntaxMorph and: [owner nodeClassIs: MethodNode]) \\\\n\\\\t\\\\tifTrue: [self setDeselectedColor \\\\\\\"normal\\\\\\\"]\\\\n\\\\t\\\\tifFalse: [self color: Color lightBrown].\\\\n\\\\tself borderColor: #raised.\\\\n\\\\tself offerPopUp.! !\\\\n\\\\n!SyntaxMorph methodsFor: 'selection' stamp: 'tk 7/19/2001 17:52'!\\\\nsetDeselectedColor\\\\n\\\\t\\\\\\\"The normal color of the tile, stored with the tile\\\\\\\"\\\\n\\\\t| deselectedColor deselectedBorderColor |\\\\n\\\\n\\\\tdeselectedColor _ self valueOfProperty: #deselectedColor ifAbsent: [nil].\\\\n\\\\tdeselectedBorderColor _ self valueOfProperty: #deselectedBorderColor ifAbsent: [nil].\\\\n\\\\tdeselectedColor ifNotNil: [\\\\n\\\\t\\\\tdeselectedColor _ self scaleColorByUserPref: deselectedColor].\\\\n\\\\tdeselectedBorderColor ifNotNil: [\\\\n\\\\t\\\\tdeselectedBorderColor _ self scaleColorByUserPref: deselectedBorderColor].\\\\n\\\\tself \\\\n\\\\t\\\\tcolor: (deselectedColor ifNil: [Color transparent]);\\\\n\\\\t\\\\tborderColor: (deselectedBorderColor ifNil: [Color transparent])! !\\\\n\\\\n!SyntaxMorph methodsFor: 'selection' stamp: 'dgd 2/22/2003 13:41'!\\\\nsetSelection: newSpec \\\\n\\\\t\\\\\\\"A selectionSpec is {Inner morph.  Where clicked.  Outer morph}.\\\\n\\\\tFirst mouseDown starts a selection (with outerMorph isNil).\\\\n\\\\tDragging more than 4 pixels means to grab a copy of the current outer selection.\\\\n\\\\t\\\\tThe current selection is the outerMorph, or the inner if it is nil.\\\\n\\\\tEach mouseUp extends the selection to the next outer morph that is selectable.\\\\n\\\\t\\\\tExcept if this is the first click.\\\\\\\"\\\\n\\\\n\\\\t| rootTile |\\\\n\\\\t(rootTile := self rootTile) valueOfProperty: #selectionSpec\\\\n\\\\t\\\\tifPresentDo: [:oldSpec | oldSpec third ifNotNilDo: [:m | m deselect]].\\\\n\\\\t(newSpec isNil or: [newSpec third isNil and: [self isMethodNode]]) \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[self deselect.\\\\n\\\\t\\\\t\\\\t^rootTile removeProperty: #selectionSpec].\\\\n\\\\n\\\\t\\\\\\\"Select outer morph of the new selection\\\\\\\"\\\\n\\\\tnewSpec third isNil \\\\n\\\\t\\\\tifTrue: [self select\\\\t\\\\\\\"first click down\\\\\\\"]\\\\n\\\\t\\\\tifFalse: [newSpec third select\\\\t\\\\\\\"subsequent clicks\\\\\\\"].\\\\n\\\\trootTile setProperty: #selectionSpec toValue: newSpec! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'stepping and presenter' stamp: 'tk 7/25/2001 11:26'!\\\\nstep\\\\n\\\\tsuper step.\\\\n\\\\tself isBlockNode ifTrue: [self trackDropZones].\\\\n! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'submorphs-accessing' stamp: 'tk 1/13/2001 20:41'!\\\\nfindA: aClass\\\\n\\\\t| ans |\\\\n\\\\t\\\\\\\"Allow finding on the class of the parseNode\\\\\\\"\\\\n\\\\n\\\\t(ans _ super findA: aClass) ifNotNil: [^ ans].\\\\n\\\\tsubmorphs do: [:ss | \\\\n\\\\t\\\\tss isSyntaxMorph ifTrue: [\\\\n\\\\t\\\\t\\\\tss parseNode class == aClass ifTrue: [^ ss]]].\\\\n\\\\t^ nil! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'testing' stamp: 'di 11/3/2000 08:03'!\\\\nstepTime\\\\n\\\\n\\\\t^ 50! !\\\\n\\\\n!SyntaxMorph methodsFor: 'testing' stamp: 'di 1/30/2001 11:22'!\\\\nwantsSteps\\\\n\\\\t\\\\\\\"Only step this morph if we explicitly send startStepping\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'tests' stamp: 'di 11/6/2000 10:47'!\\\\ntest\\\\n\\\\t3 > 4 ifTrue: [].\\\\n\\\\t^ self! !\\\\n\\\\n!SyntaxMorph methodsFor: 'tests' stamp: 'gm 2/22/2003 12:35'!\\\\ntestForNode: targetNode andDo: aBlock \\\\n\\\\ttargetNode == parseNode ifTrue: [aBlock value: self].\\\\n\\\\tself submorphsDo: \\\\n\\\\t\\\\t\\\\t[:each | \\\\n\\\\t\\\\t\\\\t(each isSyntaxMorph) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [each testForNode: targetNode andDo: aBlock]]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'tests' stamp: 'di 11/14/2000 14:54'!\\\\ntoDo\\\\n\\\\\\\"\\\\nBiggies...\\\\n[ ]\\\\tIntegrate with EToy scriptors\\\\n\\\\treleaseCachedState can discard all morphic structure.\\\\n\\\\n[ ]\\\\tOptions:\\\\n\\\\tShow / hide syntax markers (like [], (), ., :, ;, etc)\\\\n\\\\tNo color / color-in-focus / full color\\\\n\\\\tTiles / textiles / text\\\\n\\\\n[ ]\\\\tParsedTextMorph -- looks like text but has all same substructure\\\\n\\\\n[ ]\\\\tIntroduce notion of an UnParsedNode -- maybe a flag in ParseNode\\\\n\\\\tText -> UnParsed -> Parsed -> CodeGen\\\\n\\\\n[ ]\\\\tNeed DnD evaluator, or some sort of '!!' button on any entity (halo?)\\\\n\\\\tAlso inspector / browser\\\\n\\\\n[ ]\\\\tAll the type help we can get\\\\n\\\\nDetails ...\\\\n[ ]\\\\tOpen up the parse of BraceNodes\\\\n\\\\n[ ]\\\\tVerify that all pastes are OK\\\\n\\\\n[ ]\\\\tColors not yet right for colored version.\\\\n\\\\n[ ]\\\\tStart work on show / hide of syntax markers -- (), [], etc.\\\\n\\\\n[ ]\\\\tStart work on textiles (grabable entites in 'normal' text)\\\\n\\\\n[ ]\\\\tNeed autoscroll during drag for drop\\\\n\\\\n[ ]\\\\tUse, eg, shift-drag to move, del to delete\\\\n\\\\n[ ]\\\\tWhat about invalid drops -- stick on cursor?\\\\n\\\\nSystem...\\\\n[ ]\\\\tOnly keep history 7 deep; option to clear on quit\\\\n\\\\tclear command above spaceLeft\\\\n\\\\n[ ]\\\\tCompute each page of prefs viewer on demand instead of as now.\\\\n\\\\n[ ]\\\\tOffer a search command that will gather up all preferences that match a given string (name or help string)\\\\n\\\\nPreferences enable: #noTileColor.\\\\nPreferences disable: #noTileColor.\\\\nSmalltalk browseAllSelect: [:cm | cm size > 600]\\\\nSyntaxMorph testAll\\\\n\\\\\\\"! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'type checking' stamp: 'sw 2/23/2001 23:40'!\\\\nargTypeFor: aSelector\\\\n\\\\t\\\\\\\"Answer the type of the argument of this selector.  Return #unknown if not found.\\\\\\\"\\\\n\\\\n\\\\t| itsInterface |\\\\n\\\\taSelector numArgs = 0 \\\\n\\\\t\\\\tifTrue: [self inform: aSelector, ' does not take an argument'. ^ #error \\\\\\\"7\\\\\\\"].\\\\n\\\\titsInterface _ self currentVocabulary methodInterfaceAt: aSelector ifAbsent:\\\\n\\\\t\\\\t[^ #unknown].\\\\n\\\\t^ itsInterface typeForArgumentNumber: 1! !\\\\n\\\\n!SyntaxMorph methodsFor: 'type checking' stamp: 'sw 2/15/2001 14:25'!\\\\nokToBeReplacedBy: aSyntaxMorph\\\\n\\\\t\\\\\\\"Return true if it is OK to replace me with aSyntaxMorph.  Enforce the type rules in the old EToy green tiles.\\\\\\\"\\\\n\\\\n\\\\t| itsType myType |\\\\n\\\\t(Preferences eToyFriendly or: [Preferences typeCheckingInTileScripting])\\\\n\\\\t\\\\tifFalse: [^ true].\\\\t\\\\\\\"not checking unless one of those prefs is true\\\\\\\"\\\\n\\\\t(parseNode class == BlockNode and: [aSyntaxMorph parseNode class == BlockNode]) \\\\n\\\\t\\\\tifTrue: [^ true].\\\\n\\\\t(parseNode class == ReturnNode and: [aSyntaxMorph parseNode class == ReturnNode]) \\\\n\\\\t\\\\tifTrue: [^ true].\\\\n\\\\tparseNode class == KeyWordNode ifTrue: [^ false].\\\\n\\\\taSyntaxMorph parseNode class == KeyWordNode ifTrue: [^ false].\\\\n\\\\tparseNode class == SelectorNode ifTrue: [^ false].\\\\n\\\\taSyntaxMorph parseNode class == SelectorNode ifTrue: [^ false].\\\\n\\\\towner isSyntaxMorph ifFalse: [^ true].\\\\t\\\\\\\"only within a script\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"Transcript show: aSyntaxMorph resultType printString, ' dropped on ', \\\\n\\\\t\\\\t\\\\tself receiverOrArgType printString; cr.\\\\n\\\\t\\\\t\\\\\\\"\\\\n\\\\t(itsType _ aSyntaxMorph resultType) == #unknown ifTrue: [^ true].\\\\n\\\\t(myType _ self receiverOrArgType) == #unknown ifTrue: [^ true].\\\\n\\\\t\\\\t\\\\\\\"my type in enclosing message\\\\\\\"\\\\n\\\\t^ myType = itsType! !\\\\n\\\\n!SyntaxMorph methodsFor: 'type checking' stamp: 'tk 2/9/2001 15:56'!\\\\nreceiverOrArgType\\\\n\\\\t| ty |\\\\n\\\\t\\\\\\\"Return my type in my role as a receiver or as an argument.  Ask my enclosing message first, then ask myself.  (If owner accepts any #object, and I am a #point, do return #object.)\\\\\\\"\\\\n\\\\n\\\\t^ (ty _ self receiverOrArgTypeAbove) == #unknown\\\\n\\\\t\\\\tifTrue: [self resultType]\\\\n\\\\t\\\\tifFalse: [ty]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'type checking' stamp: 'dgd 2/22/2003 18:48'!\\\\nreceiverOrArgTypeAbove\\\\n\\\\t\\\\\\\"Return the type for me according to the message that encloses me.\\\\\\\"\\\\n\\\\n\\\\t| enclosing sub list |\\\\n\\\\t(self nodeClassIs: BlockNode) ifTrue: [^#command].\\\\n\\\\tenclosing := owner.\\\\n\\\\tsub := self.\\\\n\\\\t\\\\n\\\\t[enclosing isSyntaxMorph ifFalse: [^#unknown].\\\\n\\\\t(enclosing nodeClassIs: MessageNode) \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[list := enclosing submorphs \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tselect: [:ss | ss isSyntaxMorph and: [ss parseNode notNil]].\\\\n\\\\t\\\\t\\\\tlist size = 1 \\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[^(list indexOf: sub) = 1 \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [enclosing receiverTypeFor: enclosing selector]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [enclosing argTypeFor: enclosing selector]]].\\\\n\\\\t(enclosing nodeClassIs: BlockNode) ifTrue: [^#command].\\\\n\\\\tsub := enclosing.\\\\n\\\\tenclosing := enclosing owner.\\\\n\\\\ttrue] \\\\n\\\\t\\\\t\\\\twhileTrue! !\\\\n\\\\n!SyntaxMorph methodsFor: 'type checking' stamp: 'sw 2/27/2001 09:11'!\\\\nreceiverTypeFor: aSelector\\\\n\\\\t\\\\\\\"Answer the type of the receiver of this selector.  Return #unknown if not found.\\\\\\\"\\\\n\\\\n\\\\t| itsInterface |\\\\n\\\\n\\\\taSelector ifNil: [^ #unknown].\\\\n\\\\titsInterface _ self currentVocabulary methodInterfaceAt: aSelector ifAbsent:\\\\n\\\\t\\\\t[^ #unknown].\\\\n\\\\t^ itsInterface receiverType! !\\\\n\\\\n!SyntaxMorph methodsFor: 'type checking' stamp: 'yo 7/22/2005 16:43'!\\\\nresultType\\\\n\\\\t\\\\\\\"Look up my result type.  If I am a constant, use that class.  If I am a message, look up the selector.\\\\\\\"\\\\n\\\\n\\\\t| list value soundChoices |\\\\n\\\\tparseNode class == BlockNode ifTrue: [^#blockContext].\\\\n\\\\tparseNode class == AssignmentNode ifTrue: [^#command].\\\\n\\\\tparseNode class == ReturnNode ifTrue: [^#command].\\\\t\\\\\\\"Need more restriction than this\\\\\\\"\\\\n\\\\tlist := submorphs \\\\n\\\\t\\\\t\\\\t\\\\tselect: [:ss | ss isSyntaxMorph and: [ss parseNode notNil]].\\\\n\\\\tlist size > 1 ifTrue: [^self resultTypeFor: self selector].\\\\n\\\\tlist size = 1 \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"test for levels that are just for spacing in layout\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t(list first isSyntaxMorph and: [list first nodeClassIs: MessageNode]) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [^list first resultType]].\\\\t\\\\\\\"go down one level\\\\\\\"\\\\n\\\\tvalue := self try.\\\\n\\\\tvalue class == Error ifTrue: [^#unknown].\\\\n\\\\t(value isNumber) ifTrue: [^#Number].\\\\n\\\\t(value isKindOf: Boolean) ifTrue: [^#Boolean].\\\\n\\\\t(value isForm) ifTrue: [^#Graphic].\\\\n\\\\t(value isPlayerLike and: [value costume renderedMorph isMemberOf: KedamaPatchMorph]) ifTrue: [^#Patch].\\\\n\\\\tvalue isString\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[soundChoices := #('silence').\\\\t\\\\\\\"default, if no SampledSound class\\\\\\\"\\\\n\\\\t\\\\t\\\\tSmalltalk at: #SampledSound\\\\n\\\\t\\\\t\\\\t\\\\tifPresent: [:sampledSound | soundChoices := sampledSound soundNames].\\\\n\\\\t\\\\t\\\\t(soundChoices includes: value) ifTrue: [^#Sound]].\\\\n\\\\t(value isPlayerLike) ifTrue: [^#Player].\\\\n\\\\t^value class name asLowercase\\\\t\\\\\\\"asSymbol (not needed)\\\\\\\"! !\\\\n\\\\n!SyntaxMorph methodsFor: 'type checking' stamp: 'sw 2/24/2001 12:13'!\\\\nresultTypeFor: aSelector\\\\n\\\\t\\\\\\\"Answer the result type of selector.  Return #unknown if not found.\\\\\\\"\\\\n\\\\n\\\\t| itsInterface |\\\\n\\\\taSelector ifNil: [self inform: 'Please tell Ted how you caused this'.\\\\n\\\\t\\\\t^ #abs \\\\\\\"a bogus type\\\\\\\"].\\\\n\\\\titsInterface _ self currentVocabulary methodInterfaceAt: aSelector ifAbsent:\\\\n\\\\t\\\\t[^ #unknown].\\\\n\\\\t^ itsInterface resultType! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'updating' stamp: 'di 11/13/2000 20:30'!\\\\nupdate: aSymbol\\\\n\\\\n\\\\t| bingo saveOwner newMorph db |\\\\n\\\\n\\\\t(db _ self debugger) ifNil: [^super update: aSymbol].\\\\n\\\\taSymbol == #contents ifTrue: [\\\\n\\\\t\\\\tsaveOwner _ owner.\\\\n\\\\t\\\\tdb removeDependent: self.\\\\n\\\\t\\\\tmarkerMorph ifNotNil: [markerMorph delete. markerMorph _ nil].\\\\n\\\\t\\\\tnewMorph _ db createSyntaxMorph.\\\\n\\\\t\\\\tself delete.\\\\n\\\\t\\\\tsaveOwner addMorph: newMorph.\\\\n\\\\t\\\\tsaveOwner owner setScrollDeltas.\\\\n\\\\t\\\\tnewMorph update: #contentsSelection.\\\\n\\\\t].\\\\n\\\\taSymbol == #contentsSelection ifTrue: [\\\\n\\\\t\\\\tmarkerMorph ifNil: [\\\\n\\\\t\\\\t\\\\tmarkerMorph _ RectangleMorph new.\\\\n\\\\t\\\\t\\\\tmarkerMorph\\\\n\\\\t\\\\t\\\\t\\\\tcolor: Color transparent;\\\\n\\\\t\\\\t\\\\t\\\\tborderWidth: 2;\\\\n\\\\t\\\\t\\\\t\\\\tborderColor: Color red;\\\\n\\\\t\\\\t\\\\t\\\\tlock.\\\\n\\\\t\\\\t\\\\towner addMorphFront: markerMorph.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tbingo _ parseNode rawSourceRanges keyAtValue: db pcRange ifAbsent: [nil].\\\\n\\\\t\\\\tself testForNode: bingo andDo: [ :foundMorph | \\\\n\\\\t\\\\t\\\\tmarkerMorph\\\\n\\\\t\\\\t\\\\t\\\\tposition: foundMorph position;\\\\n\\\\t\\\\t\\\\t\\\\textent: foundMorph extent.\\\\n\\\\t\\\\t\\\\towner owner scrollIntoView: foundMorph bounds extra: 0.5.\\\\n\\\\t\\\\t\\\\t^self\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\tsuper update: aSymbol! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'viewer' stamp: 'tk 11/5/2001 08:32'!\\\\nexternalName\\\\n\\\\n\\\\t^ self knownName ifNil: [\\\\n\\\\t\\\\tparseNode ifNil: ['Syntax -- (extra layer)']\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil: [self parseNode class printString]]! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'visual properties' stamp: 'tk 7/31/2001 16:53'!\\\\nfillStyle: aFillStyle\\\\n\\\\n\\\\taFillStyle isColor \\\\n\\\\t\\\\tifTrue: [self color: aFillStyle]\\\\t\\\\\\\"so we will process it\\\\\\\"\\\\n\\\\t\\\\tifFalse: [super fillStyle: aFillStyle].\\\\n! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'vocabulary' stamp: 'gm 2/22/2003 12:31'!\\\\nlimitClassToUseWith: aValue vocabulary: aVocabulary \\\\n\\\\t\\\\\\\"Answer the most generic whose method should be shown in a selector pop-up in the receiver that is put up on behalf of aValue\\\\\\\"\\\\n\\\\n\\\\t(aValue isNumber) ifTrue: [^Number].\\\\n\\\\t\\\\\\\"Ted: This hook allows you to intervene as suits your purposes here if you don't like the defaults.\\\\\\\"\\\\n\\\\t^aValue defaultLimitClassForVocabulary: aVocabulary! !\\\\n\\\\n!SyntaxMorph methodsFor: 'vocabulary' stamp: 'gm 2/22/2003 12:48'!\\\\nvocabularyToUseWith: aValue \\\\n\\\\t\\\\\\\"Answer a vocabulary to use with the given value\\\\\\\"\\\\n\\\\n\\\\t(aValue isNumber) ifTrue: [^Vocabulary numberVocabulary].\\\\n\\\\t(aValue isKindOf: Time) ifTrue: [^Vocabulary vocabularyForClass: Time].\\\\n\\\\t(aValue isString) ifTrue: [^Vocabulary vocabularyForClass: String].\\\\n\\\\taValue class isUniClass ifTrue: [^Vocabulary eToyVocabulary].\\\\n\\\\t^self currentVocabulary! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSyntaxMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SyntaxMorph class methodsFor: 'accessing' stamp: 'tk 9/18/2001 16:10'!\\\\nsourceCodeTemplate\\\\n\\\\t\\\\\\\"Return the default tile method template\\\\\\\"\\\\n\\\\n\\\\t^ 'anEmpty: input1 method: input2\\\\n\\\\t\\\\\\\"Edit the name above and the code below to make your own method\\\\\\\"\\\\n\\\\t3 + 4.\\\\n\\\\t\\\\\\\"Drag tiles in here.  Use the ''tiles'' and ''vars'' menus to get new tiles\\\\\\\"\\\\n\\\\t^ ''this is a statement'' sort'  \\\\n! !\\\\n\\\\n\\\\n!SyntaxMorph class methodsFor: 'as yet unclassified' stamp: 'RAA 2/26/2001 22:59'!\\\\ncolumn: aColor on: aParseNode\\\\n\\\\n\\\\t| c color |\\\\n\\\\tcolor _ self translateColor: aColor.\\\\n\\\\t(c _ self newColumn)\\\\n\\\\t\\\\tparseNode: aParseNode;\\\\n\\\\t\\\\tlayoutInset: c standardInset;\\\\n\\\\t\\\\thResizing: #shrinkWrap;\\\\n\\\\t\\\\tvResizing: #shrinkWrap;\\\\n\\\\t\\\\tcolor: color;\\\\n\\\\t\\\\tborderWidth: 1;\\\\n\\\\t\\\\tborderColor: c stdBorderColor;\\\\n\\\\t\\\\twrapCentering: #topLeft;\\\\n\\\\t\\\\tcellPositioning: c standardCellPositioning.\\\\n\\\\t^c\\\\n! !\\\\n\\\\n!SyntaxMorph class methodsFor: 'as yet unclassified' stamp: 'RAA 2/16/2001 15:37'!\\\\nmethodNodeOuter: aNode\\\\n\\\\n\\\\t^(self column: #method on: aNode) methodNodeOuter: aNode\\\\n! !\\\\n\\\\n!SyntaxMorph class methodsFor: 'as yet unclassified' stamp: 'di 11/13/2000 21:12'!\\\\nnoTileColor\\\\n\\\\n\\\\t^ true! !\\\\n\\\\n!SyntaxMorph class methodsFor: 'as yet unclassified' stamp: 'RAA 2/26/2001 23:00'!\\\\nrow: aColor on: aParseNode\\\\n\\\\n\\\\t| r color |\\\\n\\\\tcolor _ self translateColor: aColor.\\\\n\\\\t(r _ self newRow)\\\\n\\\\t\\\\tparseNode: aParseNode;\\\\n\\\\t\\\\tlayoutInset: r standardInset;\\\\n\\\\t\\\\thResizing: #shrinkWrap;\\\\n\\\\t\\\\tvResizing: #shrinkWrap;\\\\n\\\\t\\\\tcolor: color;\\\\n\\\\t\\\\tborderWidth: 1;\\\\n\\\\t\\\\tborderColor: r stdBorderColor;\\\\n\\\\t\\\\twrapCentering: #topLeft;\\\\n\\\\t\\\\tcellPositioning: r standardCellPositioning.\\\\n\\\\t^r! !\\\\n\\\\n!SyntaxMorph class methodsFor: 'as yet unclassified' stamp: 'di 5/2/2001 09:59'!\\\\nsetSize: oldExtent andMakeResizable: outerMorph\\\\n\\\\t| tw |\\\\n\\\\t(tw _ outerMorph findA: TwoWayScrollPane) ifNil: [^self].\\\\n\\\\ttw hResizing: #spaceFill;\\\\n\\\\t\\\\tvResizing: #spaceFill;\\\\n\\\\t\\\\tcolor: Color transparent;\\\\n\\\\t\\\\tsetProperty: #hideUnneededScrollbars toValue: true.\\\\n\\\\touterMorph \\\\n\\\\t\\\\thResizing: #shrinkWrap;\\\\n\\\\t\\\\tvResizing: #shrinkWrap;\\\\n\\\\t\\\\tcellPositioning: #topLeft.\\\\n\\\\touterMorph fullBounds.\\\\n! !\\\\n\\\\n!SyntaxMorph class methodsFor: 'as yet unclassified' stamp: 'RAA 2/26/2001 22:56'!\\\\nstandardInset\\\\n\\\\n\\\\t^ self alansTest1 ifTrue: [1] ifFalse: [-1@-1]! !\\\\n\\\\n!SyntaxMorph class methodsFor: 'as yet unclassified' stamp: 'RAA 8/24/1999 11:59'!\\\\ntest\\\\n\\\\n\\\\\\\"\\\\nSyntaxMorph test\\\\n\\\\\\\"\\\\n\\\\tself testClass: MessageNode andMethod: #asMorphicSyntaxIn:.\\\\n\\\\t\\\\\\\"self testClass: MethodNode andMethod: #asMorphicSyntaxIn:.\\\\\\\"\\\\n\\\\n! !\\\\n\\\\n!SyntaxMorph class methodsFor: 'as yet unclassified' stamp: 'dvf 8/23/2003 12:20'!\\\\ntestAll\\\\n\\\\n\\\\t| source tree total count systNav|\\\\n\\\\\\\"\\\\nSyntaxMorph testAll\\\\n\\\\\\\"\\\\n\\\\tsystNav _ self systemNavigation.\\\\n\\\\tcount _ total _ 0.\\\\n\\\\tsystNav allBehaviorsDo: [ :aClass | total _ total + 1].\\\\n'Testing all behaviors'\\\\n\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\tfrom: 0 to: total\\\\n\\\\tduring: [ :bar |\\\\n\\\\t\\\\tsystNav allBehaviorsDo: [ :aClass |\\\\n\\\\t\\\\t\\\\tbar value: (count _ count + 1).\\\\n\\\\t\\\\t\\\\taClass selectors do: [ :aSelector |\\\\n\\\\t\\\\t\\\\t\\\\tsource _ (aClass compiledMethodAt: aSelector) getSourceFromFile.\\\\n\\\\t\\\\t\\\\t\\\\ttree _ Compiler new \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tparse: source \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tin: aClass \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnotifying: nil.\\\\n\\\\t\\\\t\\\\t\\\\ttree asMorphicSyntaxUsing: SyntaxMorph.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t].\\\\t].\\\\n\\\\n\\\\n! !\\\\n\\\\n!SyntaxMorph class methodsFor: 'as yet unclassified' stamp: 'dvf 8/23/2003 12:20'!\\\\ntestAllMethodsOver: methodSize \\\\n\\\\t\\\\\\\"MessageTally spyOn: [SyntaxMorph testAllMethodsOver: 600]\\\\\\\"\\\\n\\\\t\\\\\\\"Add up the total layout area for syntax morphs representing all  \\\\n\\\\tmethods over the given size. This is a stress-test for SyntaxMorph  \\\\n\\\\tlayout. A small value for the total area is also a figure of merit in the  \\\\n\\\\tpresentation of Squeak source code in general.\\\\\\\"\\\\n\\\\t\\\\\\\"Results:  \\\\n\\\\t#(69 600 180820874 103700) 11/4  \\\\n\\\\t70% build morphs, 12% get source, 9% layout, 8% parse, 1% roundoff  \\\\n\\\\tFolded wide receivers, don't center keywords any more.  \\\\n\\\\t#(68 600 160033784 127727) 11/9  \\\\n\\\\t76% build morphs, 8% get source, 8% layout, 8% parse, 0% roundoff  \\\\n\\\\tFolded more messages, dropped extra vertical spacing in blocks.  \\\\n\\\\t#(68 600 109141704 137308) 11/10  \\\\n\\\\t79% build morphs, 6% get source, 8% layout, 7% parse  \\\\n\\\\tFolded more messages, dropped extra horizontal spacing.  \\\\n\\\\t#(68 600 106912968 132171) 11/10  \\\\n\\\\t80% build morphs, ??% get source, 11% layout, 7% parse  \\\\n\\\\tUnfolded keyword messages that will fit on one line.  \\\\n\\\\t#(68 600 96497372 132153) 11/10  \\\\n\\\\t81% build morphs, ??% get source, 8% layout, 8% parse  \\\\n\\\\tAfter alignment rewrite...  \\\\n\\\\t#(74 600 101082316 244799) 11/12  \\\\n\\\\t76% build morphs, 4% get source, 15% layout, 5% parse  \\\\n\\\\tAfter alignment rewrite...  \\\\n\\\\t#(74 600 101250620 204972) 11/15  \\\\n\\\\t74% build morphs, 6% get source, 13% layout, 7% parse  \\\\n\\\\t\\\\\\\"\\\\n\\\\t| tree source biggies morph stats time area |\\\\n\\\\tbiggies _ self systemNavigation \\\\n\\\\t\\\\t\\\\t\\\\tallMethodsSelect: [:cm | cm size > methodSize].\\\\n\\\\tstats _ OrderedCollection new.\\\\n\\\\t'Laying out all ' , biggies size printString , ' methods over ' , methodSize printString , ' bytes...'\\\\n\\\\t\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\tfrom: 1\\\\n\\\\t\\\\tto: biggies size\\\\n\\\\t\\\\tduring: [:bar | biggies\\\\n\\\\t\\\\t\\\\t\\\\twithIndexDo: [:methodRef :i | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbar value: i.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tUtilities\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsetClassAndSelectorFrom: methodRef\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tin: [:aClass :aSelector | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsource _ (aClass compiledMethodAt: aSelector) getSourceFromFile.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttime _ Time\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmillisecondsToRun: [tree _ Compiler new\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tparse: source\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tin: aClass\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnotifying: nil.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmorph _ tree asMorphicSyntaxUsing: SyntaxMorph.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tarea _ morph fullBounds area]].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstats add: {methodRef. area. time}]].\\\\n\\\\t^ {{biggies size. methodSize. stats\\\\n\\\\t\\\\tdetectSum: [:a | a second]. stats\\\\n\\\\t\\\\tdetectSum: [:a | a third]}. (stats\\\\n\\\\t\\\\tasSortedCollection: [:x :y | x third >= y third]) asArray}! !\\\\n\\\\n!SyntaxMorph class methodsFor: 'as yet unclassified' stamp: 'di 7/30/2001 16:29'!\\\\ntestClass: aClass andMethod: aSelector\\\\n\\\\t| tree |\\\\n\\\\ttree _ Compiler new \\\\n\\\\t\\\\tparse: (aClass sourceCodeAt: aSelector) \\\\n\\\\t\\\\tin: aClass \\\\n\\\\t\\\\tnotifying: nil.\\\\n\\\\t(tree asMorphicSyntaxUsing: SyntaxMorph)\\\\n\\\\t\\\\tparsedInClass: aClass;\\\\n\\\\t\\\\topenInWindow! !\\\\n\\\\n!SyntaxMorph class methodsFor: 'as yet unclassified' stamp: 'tk 7/19/2001 20:06'!\\\\ntranslateColor: aColorOrSymbol\\\\n\\\\n\\\\taColorOrSymbol isColor  ifTrue: [^ aColorOrSymbol].\\\\n\\\\taColorOrSymbol == #comment  ifTrue: [^ Color blue lighter].\\\\n\\\\taColorOrSymbol == #block  ifTrue: [^ Color r: 0.903 g: 1.0 b: 0.903].\\\\n\\\\taColorOrSymbol == #method  ifTrue: [^ Color r: 0.903 g: 1.0 b: 0.903].\\\\n\\\\taColorOrSymbol == #text  ifTrue: [^ Color r: 0.9 g: 0.9 b: 0.9].\\\\n\\\\n\\\\tself noTileColor ifTrue: [^ Color r: 1.0 g: 0.839 b: 0.613].\\\\t\\\\\\\"override\\\\\\\"\\\\n\\\\n\\\\taColorOrSymbol == #assignment  ifTrue: [^ Color paleGreen].\\\\n\\\\taColorOrSymbol == #keyword1  ifTrue: [^ Color paleBuff].\\\\t\\\\\\\"binary\\\\\\\"\\\\n\\\\taColorOrSymbol == #keyword2  ifTrue: [^ Color paleBuff lighter].\\\\t\\\\\\\"multipart\\\\\\\" \\\\n\\\\taColorOrSymbol == #cascade  ifTrue: [^ Color paleYellow darker].\\\\t\\\\\\\"has receiver\\\\\\\"\\\\n\\\\taColorOrSymbol == #cascade2  ifTrue: [^ Color paleOrange].\\\\t\\\\\\\"one send in the cascade\\\\\\\"\\\\n\\\\taColorOrSymbol == #literal  ifTrue: [^ Color paleMagenta].\\\\n\\\\taColorOrSymbol == #message  ifTrue: [^ Color paleYellow].\\\\n\\\\taColorOrSymbol == #method  ifTrue: [^ Color white].\\\\n\\\\taColorOrSymbol == #error  ifTrue: [^ Color red].\\\\n\\\\taColorOrSymbol == #return  ifTrue: [^ Color lightGray].\\\\n\\\\taColorOrSymbol == #variable  ifTrue: [^ Color paleTan].\\\\n\\\\taColorOrSymbol == #brace  ifTrue: [^ Color paleOrange].\\\\n\\\\taColorOrSymbol == #tempVariable  ifTrue: [^ Color paleYellow mixed: 0.75 with: Color paleGreen\\\\n\\\\t\\\\t\\\\\\\"Color yellow lighter lighter\\\\\\\"].\\\\n\\\\taColorOrSymbol == #blockarg2  ifTrue: [\\\\n\\\\t\\\\t\\\\t^ Color paleYellow mixed: 0.75 with: Color paleGreen].\\\\t\\\\\\\"arg itself\\\\\\\"\\\\n\\\\taColorOrSymbol == #blockarg1  ifTrue: [^ Color paleRed].\\\\t\\\\\\\"container\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"yellow mixed: 0.5 with: Color white\\\\\\\"\\\\n\\\\n\\\\t^ Color tan\\\\t\\\\\\\"has to be something!!\\\\\\\"! !\\\\n\\\\n\\\\n!SyntaxMorph class methodsFor: '*flexibleVocabularies-flexiblevocabularies-accessing' stamp: 'stephaneducasse 2/4/2006 20:33'!\\\\nallSpecs\\\\n\\\\t\\\\\\\"Return all specs that the Viewer knows about. Cache them.\\\\\\\"\\\\n\\\\t\\\\\\\"SyntaxMorph allSpecs\\\\\\\"\\\\n\\\\n\\\\t^AllSpecs ifNil: [\\\\n\\\\t\\\\tAllSpecs := Dictionary new.\\\\n\\\\t\\\\t(EToyVocabulary morphClassesDeclaringViewerAdditions)\\\\n\\\\t\\\\t\\\\tdo: [:cls | cls allAdditionsToViewerCategories keysAndValuesDo: [ :k :v | \\\\n\\\\t\\\\t\\\\t\\\\t(AllSpecs at: k ifAbsentPut: [ OrderedCollection new ]) addAll: v ] ].\\\\n\\\\t\\\\tAllSpecs\\\\n\\\\t]! !\\\\n\\\\n!SyntaxMorph class methodsFor: '*flexibleVocabularies-flexiblevocabularies-accessing' stamp: 'stephaneducasse 2/4/2006 20:33'!\\\\nclearAllSpecs\\\\n\\\\t\\\\\\\"Clear the specs that the Viewer knows about.\\\\\\\"\\\\n\\\\t\\\\\\\"SyntaxMorph clearAllSpecs\\\\\\\"\\\\n\\\\n\\\\tAllSpecs := nil.! !\\\\nUpdatingStringMorph subclass: #SyntaxUpdatingStringMorph\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'EToys-Tile Scriptors'!\\\\n\\\\n!SyntaxUpdatingStringMorph methodsFor: 'drawing' stamp: 'tk 1/31/2002 09:53'!\\\\ndrawOn: aCanvas\\\\n\\\\n\\\\t| tempForm strm where chars wid spaceWidth putLigature topOfLigature sizeOfLigature colorOfLigature dots charZero canvas f |\\\\n\\\\n\\\\ttempForm _ Form extent: self extent depth: aCanvas depth.\\\\n\\\\tcanvas _ tempForm getCanvas.\\\\n\\\\tf _ self fontToUse.\\\\n\\\\tspaceWidth _ f widthOf: Character space.\\\\n\\\\tstrm _ ReadStream on: contents.\\\\n\\\\tcharZero _ Character value: 0.\\\\t\\\\\\\"a marker for center dot \\\\U00b7\\\\\\\"\\\\n\\\\twhere _ 0@0.\\\\n\\\\ttopOfLigature _ self height // 2 - 1.\\\\n\\\\tsizeOfLigature _ (spaceWidth-2)@(spaceWidth-2).\\\\n\\\\tcolorOfLigature _ Color black alpha: 0.45\\\\t\\\\\\\"veryLightGray\\\\\\\".\\\\n\\\\tdots _ OrderedCollection new.\\\\n\\\\tputLigature _ [\\\\n\\\\t\\\\tdots add: ((where x + 1) @ topOfLigature extent: sizeOfLigature).\\\\n\\\\t\\\\twhere _ where + (spaceWidth@0)].\\\\n\\\\tstrm peek = charZero ifTrue: [\\\\n\\\\t\\\\tstrm next.\\\\n\\\\t\\\\tputLigature value].\\\\n\\\\t[strm peek = charZero] whileTrue: [strm next].\\\\n\\\\t[strm atEnd] whileFalse: [\\\\n\\\\t\\\\tchars _ strm upTo: charZero.\\\\n\\\\t\\\\twid _ f widthOfString: chars.\\\\n\\\\t\\\\tcanvas drawString: chars at: where.\\\\n\\\\t\\\\twhere _ where + (wid@0).\\\\n\\\\t\\\\tstrm atEnd ifFalse: [putLigature value.\\\\n\\\\t\\\\t\\\\t[strm peek = charZero] whileTrue: [strm next]].\\\\n\\\\t].\\\\n\\\\taCanvas paintImage: tempForm at: self topLeft.\\\\n\\\\tdots do: [ :each |\\\\n\\\\t\\\\taCanvas \\\\n\\\\t\\\\t\\\\tfillRectangle: (each translateBy: self topLeft) \\\\n\\\\t\\\\t\\\\tfillStyle: colorOfLigature.\\\\n\\\\t].\\\\n! !\\\\nAppRegistry subclass: #SystemBrowser\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Tools-Base'!\\\\n!SystemBrowser commentStamp: '<historical>' prior: 0!\\\\nThis is the AppRegistry class for class browsing!\\\\n\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSystemBrowser class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SystemBrowser class methodsFor: 'class initialization' stamp: 'sd 11/20/2005 21:28'!\\\\ninitialize\\\\n\\\\t| pref |\\\\n\\\\tpref := Preferences preferenceAt: #browserShowsPackagePane.\\\\n\\\\tPreferences\\\\n\\\\t\\\\taddPreference: #browserShowsPackagePane\\\\n\\\\t\\\\tcategories: pref categoryList\\\\n\\\\t\\\\tdefault: pref defaultValue\\\\n\\\\t\\\\tballoonHelp: pref helpString\\\\n\\\\t\\\\tprojectLocal: pref localToProject\\\\n\\\\t\\\\tchangeInformee: self\\\\n\\\\t\\\\tchangeSelector: #packagePanePreferenceChanged\\\\n\\\\t\\\\t! !\\\\n\\\\n\\\\n!SystemBrowser class methodsFor: 'events' stamp: 'sd 11/20/2005 21:28'!\\\\npackagePanePreferenceChanged\\\\n\\\\t| theOtherOne |\\\\n\\\\tself registeredClasses size = 2\\\\n\\\\t\\\\tifTrue: [theOtherOne := (self registeredClasses copyWithout: PackagePaneBrowser) first]\\\\n\\\\t\\\\tifFalse: [theOtherOne := nil].\\\\n\\\\t(Preferences valueOfFlag: #browserShowsPackagePane ifAbsent: [false])\\\\n\\\\t\\\\tifTrue: [self default: PackagePaneBrowser]\\\\n\\\\t\\\\tifFalse: [self default: theOtherOne].\\\\n\\\\tSystemNavigation default browserClass: self default.! !\\\\n\\\\n\\\\n!SystemBrowser class methodsFor: 'initialize-release' stamp: 'sd 11/20/2005 21:28'!\\\\nunload\\\\n\\\\t| pref |\\\\n\\\\tpref := Preferences preferenceAt: #browserShowsPackagePane.\\\\n\\\\tPreferences\\\\n\\\\t\\\\taddPreference: #browserShowsPackagePane\\\\n\\\\t\\\\tcategories: pref categoryList\\\\n\\\\t\\\\tdefault: pref defaultValue\\\\n\\\\t\\\\tballoonHelp: pref helpString\\\\n\\\\t\\\\tprojectLocal: pref localToProject\\\\n\\\\t\\\\tchangeInformee: nil\\\\n\\\\t\\\\tchangeSelector: nil\\\\n\\\\t\\\\t! !\\\\n\\\\n\\\\n!SystemBrowser class methodsFor: 'instance creation' stamp: 'hpt 8/5/2004 20:27'!\\\\ndefaultOpenBrowser\\\\n\\\\t^self default openBrowser! !\\\\n\\\\n\\\\n!SystemBrowser class methodsFor: 'registration' stamp: 'hpt 9/30/2004 20:53'!\\\\naddRegistryMenuItemsTo: aMenu inAccountOf: aBrowser \\\\n\\\\t\\\\\\\"Add some useful options related Browser registry to the\\\\n\\\\tbrowsers windows menu\\\\\\\"\\\\n\\\\taMenu addLine;\\\\n\\\\t\\\\tadd: 'Register this Browser as default'\\\\n\\\\t\\\\ttarget: [self default: aBrowser class]\\\\n\\\\t\\\\taction: #value;\\\\n\\\\t\\\\tadd: 'Choose new default Browser'\\\\n\\\\t\\\\ttarget: self\\\\n\\\\t\\\\taction: #askForDefault! !\\\\nSystemChangeTestRoot subclass: #SystemChangeErrorHandling\\\\n\\\\tinstanceVariableNames: 'capturedEvents'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'SystemChangeNotification-Tests'!\\\\n!SystemChangeErrorHandling commentStamp: 'rw 4/3/2006 17:21' prior: 0!\\\\nThis class tests the error handing of the notification mechanism to ensure that one client that receives a system change cannot lock up the complete system.\\\\\\\"!\\\\n\\\\n\\\\n!SystemChangeErrorHandling methodsFor: 'Event Notifications' stamp: 'rw 4/3/2006 17:57'!\\\\nhandleEventWithError: event\\\\n\\\\n\\\\tself error: 'Example of event handling code that throws an error.'! !\\\\n\\\\n!SystemChangeErrorHandling methodsFor: 'Event Notifications' stamp: 'rw 4/3/2006 18:07'!\\\\nhandleEventWithHalt: event\\\\n\\\\n\\\\tself halt: 'Example of event handling code that contains a halt.'! !\\\\n\\\\n!SystemChangeErrorHandling methodsFor: 'Event Notifications' stamp: 'rw 4/3/2006 17:57'!\\\\nstoreEvent1: anEvent\\\\n\\\\n\\\\tcapturedEvents add: anEvent! !\\\\n\\\\n!SystemChangeErrorHandling methodsFor: 'Event Notifications' stamp: 'rw 4/3/2006 17:57'!\\\\nstoreEvent2: anEvent\\\\n\\\\n\\\\tcapturedEvents add: anEvent! !\\\\n\\\\n!SystemChangeErrorHandling methodsFor: 'Event Notifications' stamp: 'rw 4/3/2006 17:57'!\\\\nstoreEvent3: anEvent\\\\n\\\\n\\\\tcapturedEvents add: anEvent! !\\\\n\\\\n\\\\n!SystemChangeErrorHandling methodsFor: 'Running' stamp: 'rw 4/3/2006 17:51'!\\\\nsetUp\\\\n\\\\n\\\\tsuper setUp.\\\\n\\\\tcapturedEvents := OrderedCollection new! !\\\\n\\\\n!SystemChangeErrorHandling methodsFor: 'Running' stamp: 'rw 4/3/2006 17:56'!\\\\ntearDown\\\\n\\\\n\\\\tcapturedEvents := nil.\\\\n\\\\tsuper tearDown! !\\\\n\\\\n\\\\n!SystemChangeErrorHandling methodsFor: 'Testing' stamp: 'rw 4/5/2006 17:24'!\\\\ntestErrorOperation\\\\n\\\\n\\\\t| notifier wasCaptured |\\\\n\\\\tnotifier := self systemChangeNotifier.\\\\n\\\\twasCaptured := false.\\\\n\\\\tnotifier notify: self ofSystemChangesOfItem: #class change: #Added using: #storeEvent1:.\\\\n\\\\tnotifier notify: self ofSystemChangesOfItem: #class change: #Added using: #storeEvent2:.\\\\n\\\\tnotifier notify: self ofSystemChangesOfItem: #class change: #Added using: #handleEventWithError:.\\\\n\\\\tnotifier notify: self ofSystemChangesOfItem: #class change: #Added using: #storeEvent3:.\\\\n\\\\t[notifier classAdded: self class inCategory: #FooCat] on: Error do: [:exc |\\\\n\\\\t\\\\twasCaptured := true.\\\\n\\\\t\\\\tself assert: (capturedEvents size = 3)].\\\\n\\\\tself assert: wasCaptured.! !\\\\n\\\\n!SystemChangeErrorHandling methodsFor: 'Testing' stamp: 'rw 4/5/2006 17:24'!\\\\ntestHaltOperation\\\\n\\\\t\\\\n\\\\t| notifier wasCaptured |\\\\n\\\\tnotifier := self systemChangeNotifier.\\\\n\\\\twasCaptured := false.\\\\n\\\\tnotifier notify: self ofAllSystemChangesUsing: #storeEvent1:.\\\\n\\\\tnotifier notify: self ofAllSystemChangesUsing: #storeEvent2:.\\\\n\\\\tnotifier notify: self ofAllSystemChangesUsing: #handleEventWithHalt:.\\\\n\\\\tnotifier notify: self ofAllSystemChangesUsing: #storeEvent3:.\\\\n\\\\t[notifier classAdded: self class inCategory: #FooCat] on: Halt do: [:exc |\\\\n\\\\t\\\\twasCaptured := true.\\\\n\\\\t\\\\tself assert: (capturedEvents size = 3)].\\\\n\\\\tself assert: wasCaptured.! !\\\\n\\\\n!SystemChangeErrorHandling methodsFor: 'Testing' stamp: 'rw 4/5/2006 17:24'!\\\\ntestUnhandledEventOperation\\\\n\\\\n\\\\t| notifier wasCaptured |\\\\n\\\\tnotifier := self systemChangeNotifier.\\\\n\\\\twasCaptured := false.\\\\n\\\\tnotifier notify: self ofSystemChangesOfItem: #class change: #Added using: #storeEvent1:.\\\\n\\\\tnotifier notify: self ofSystemChangesOfItem: #class change: #Added using: #storeEvent2:.\\\\n\\\\tnotifier notify: self ofSystemChangesOfItem: #class change: #Added using: #zork:.\\\\n\\\\tnotifier notify: self ofSystemChangesOfItem: #class change: #Added using: #storeEvent3:.\\\\n\\\\t[notifier classAdded: self class inCategory: #FooCat] on: MessageNotUnderstood do: [:exc |\\\\n\\\\t\\\\twasCaptured := true.\\\\n\\\\t\\\\tself assert: (capturedEvents size = 3)].\\\\n\\\\tself assert: wasCaptured.! !\\\\nObject subclass: #SystemChangeNotifier\\\\n\\\\tinstanceVariableNames: 'eventSource silenceLevel'\\\\n\\\\tclassVariableNames: 'UniqueInstance'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Change Notification'!\\\\n\\\\n!SystemChangeNotifier methodsFor: 'initialize' stamp: 'NS 1/26/2004 20:41'!\\\\ninitialize\\\\n\\\\n\\\\teventSource := SystemEventManager new.\\\\n\\\\tsilenceLevel _ 0.! !\\\\n\\\\n\\\\n!SystemChangeNotifier methodsFor: 'public' stamp: 'NS 1/28/2004 11:29'!\\\\ndoSilently: aBlock\\\\n\\\\t\\\\\\\"Perform the block, and ensure that no system notification are broadcasted while doing so.\\\\\\\"\\\\n\\\\n\\\\t| result |\\\\n\\\\tsilenceLevel := silenceLevel + 1.\\\\n\\\\t[result := aBlock value] ensure: [silenceLevel > 0 ifTrue: [silenceLevel := silenceLevel - 1]].\\\\n\\\\t^ result.! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'public' stamp: 'NS 1/26/2004 20:41'!\\\\nisBroadcasting\\\\n\\\\n\\\\t^ silenceLevel = 0! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'public' stamp: 'rw 7/29/2003 17:01'!\\\\nnoMoreNotificationsFor: anObject\\\\n\\\\t\\\\\\\"Stop sending system notifications to an object.\\\\\\\"\\\\n\\\\n\\\\teventSource removeActionsWithReceiver: anObject! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'public' stamp: 'rw 7/10/2003 12:00'!\\\\nnotify: anObject ofAllSystemChangesUsing: oneArgumentSelector \\\\n\\\\t\\\\\\\"Notifies an object of any system changes.\\\\\\\"\\\\n\\\\n\\\\tself \\\\n\\\\t\\\\tnotify: anObject\\\\n\\\\t\\\\tofEvents: self allSystemEvents\\\\n\\\\t\\\\tusing: oneArgumentSelector! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'public' stamp: 'bvs 7/20/2004 12:13'!\\\\nnotify: anObject ofSystemChangesOfChange: changeKind using: oneArgumentSelector \\\\n\\\\t\\\\\\\"Notifies an object of system changes of the specified changeKind (#added, #removed, ...). Evaluate 'AbstractEvent allChangeKinds' to get the complete list.\\\\\\\"\\\\n\\\\n\\\\tself \\\\n\\\\t\\\\tnotify: anObject\\\\n\\\\t\\\\tofEvents: (self systemEventsForChange: changeKind)\\\\n\\\\t\\\\tusing: oneArgumentSelector! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'public' stamp: 'bvs 7/20/2004 12:13'!\\\\nnotify: anObject ofSystemChangesOfItem: itemKind change: changeKind using: oneArgumentSelector \\\\n\\\\t\\\\\\\"Notifies an object of system changes of the specified itemKind (#class, #category, ...) and changeKind (#added, #removed, ...). This is the finest granularity possible.\\\\n\\\\tEvaluate 'AbstractEvent allChangeKinds' to get the complete list of change kinds, and 'AbstractEvent allItemKinds to get all the possible item kinds supported.\\\\\\\"\\\\n\\\\n\\\\tself \\\\n\\\\t\\\\tnotify: anObject\\\\n\\\\t\\\\tofEvents: (Bag with: (self systemEventsForItem: itemKind change: changeKind))\\\\n\\\\t\\\\tusing: oneArgumentSelector! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'public' stamp: 'bvs 7/20/2004 12:13'!\\\\nnotify: anObject ofSystemChangesOfItem: itemKind  using: oneArgumentSelector \\\\n\\\\t\\\\\\\"Notifies an object of system changes of the specified itemKind (#class, #method, #protocol, ...). Evaluate 'AbstractEvent allItemKinds' to get the complete list.\\\\\\\"\\\\n\\\\n\\\\tself \\\\n\\\\t\\\\tnotify: anObject\\\\n\\\\t\\\\tofEvents: (self systemEventsForItem: itemKind)\\\\n\\\\t\\\\tusing: oneArgumentSelector! !\\\\n\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'ab 2/10/2005 16:32'!\\\\nclassCategoryAdded: aClassCategoryName\\\\n\\\\n\\\\tself trigger: (AddedEvent\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tclassCategory: aClassCategoryName)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'ab 2/10/2005 16:35'!\\\\nclassCategoryRemoved: aClassCategoryName\\\\n\\\\n\\\\tself trigger: (RemovedEvent\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tclassCategory: aClassCategoryName)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'ab 2/10/2005 16:44'!\\\\nclassCategoryRenamedFrom: anOldClassCategoryName to: aNewClassCategoryName\\\\n\\\\n\\\\tself trigger: (RenamedEvent\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tclassCategoryRenamedFrom: anOldClassCategoryName \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tto: aNewClassCategoryName)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'rw 7/29/2003 15:12'!\\\\nclass: aClass recategorizedFrom: oldCategory to: newCategory \\\\n\\\\tself trigger: (RecategorizedEvent \\\\n\\\\t\\\\t\\\\t\\\\tclass: aClass\\\\n\\\\t\\\\t\\\\t\\\\tcategory: newCategory\\\\n\\\\t\\\\t\\\\t\\\\toldCategory: oldCategory)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'rw 7/29/2003 15:11'!\\\\nclassAdded: aClass inCategory: aCategoryName \\\\n\\\\tself trigger: (AddedEvent class: aClass category: aCategoryName)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/26/2004 09:37'!\\\\nclassCommented: aClass\\\\n\\\\t\\\\\\\"A class with the given name was commented in the system.\\\\\\\"\\\\n\\\\n\\\\tself trigger: (CommentedEvent class: aClass)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'rw 7/29/2003 15:11'!\\\\nclassCommented: aClass inCategory: aCategoryName \\\\n\\\\t\\\\\\\"A class with the given name was commented in the system.\\\\\\\"\\\\n\\\\n\\\\tself trigger: (CommentedEvent class: aClass category: aCategoryName)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/20/2004 19:37'!\\\\nclassDefinitionChangedFrom: oldClass to: newClass\\\\n\\\\tself trigger: (ModifiedClassDefinitionEvent classDefinitionChangedFrom: oldClass to: newClass)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/16/2004 15:10'!\\\\nclassRemoved: aClass fromCategory: aCategoryName \\\\n\\\\tself trigger: (RemovedEvent class: aClass category: aCategoryName)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/27/2004 12:19'!\\\\nclassRenamed: aClass from: oldClassName to: newClassName inCategory: aCategoryName \\\\n\\\\tself trigger: (RenamedEvent \\\\n\\\\t\\\\t\\\\t\\\\tclass: aClass\\\\n\\\\t\\\\t\\\\t\\\\tcategory: aCategoryName\\\\n\\\\t\\\\t\\\\t\\\\toldName: oldClassName\\\\n\\\\t\\\\t\\\\t\\\\tnewName: newClassName)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/27/2004 12:48'!\\\\nclassReorganized: aClass\\\\n\\\\tself trigger: (ReorganizedEvent class: aClass)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/19/2004 09:48'!\\\\nevaluated: textOrStream\\\\n\\\\t^ self evaluated: textOrStream context: nil.! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/19/2004 09:47'!\\\\nevaluated: expression context: aContext\\\\n\\\\tself trigger: (DoItEvent \\\\n\\\\t\\\\t\\\\t\\\\texpression: expression\\\\n\\\\t\\\\t\\\\t\\\\tcontext: aContext)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/27/2004 11:24'!\\\\nmethodAdded: aMethod selector: aSymbol inClass: aClass \\\\n\\\\t\\\\\\\"A method with the given selector was added to aClass, but not put in a protocol.\\\\\\\"\\\\n\\\\n\\\\tself trigger: (AddedEvent\\\\n\\\\t\\\\t\\\\t\\\\tmethod: aMethod \\\\n\\\\t\\\\t\\\\t\\\\tselector: aSymbol\\\\n\\\\t\\\\t\\\\t\\\\tclass: aClass)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/27/2004 11:24'!\\\\nmethodAdded: aMethod selector: aSymbol inClass: aClass requestor: requestor\\\\n\\\\t\\\\\\\"A method with the given selector was added to aClass, but not put in a protocol.\\\\\\\"\\\\n\\\\n\\\\tself trigger: (AddedEvent\\\\n\\\\t\\\\t\\\\t\\\\tmethod: aMethod \\\\n\\\\t\\\\t\\\\t\\\\tselector: aSymbol\\\\n\\\\t\\\\t\\\\t\\\\tclass: aClass\\\\n\\\\t\\\\t\\\\t\\\\trequestor: requestor)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/27/2004 11:24'!\\\\nmethodAdded: aMethod selector: aSymbol inProtocol: aCategoryName class: aClass \\\\n\\\\t\\\\\\\"A method with the given selector was added to aClass in protocol aCategoryName.\\\\\\\"\\\\n\\\\n\\\\tself trigger: (AddedEvent\\\\n\\\\t\\\\t\\\\t\\\\tmethod: aMethod\\\\n\\\\t\\\\t\\\\t\\\\tselector: aSymbol\\\\n\\\\t\\\\t\\\\t\\\\tprotocol: aCategoryName\\\\n\\\\t\\\\t\\\\t\\\\tclass: aClass)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/27/2004 11:24'!\\\\nmethodAdded: aMethod selector: aSymbol inProtocol: aCategoryName class: aClass requestor: requestor\\\\n\\\\t\\\\\\\"A method with the given selector was added to aClass in protocol aCategoryName.\\\\\\\"\\\\n\\\\n\\\\tself trigger: (AddedEvent\\\\n\\\\t\\\\t\\\\t\\\\tmethod: aMethod\\\\n\\\\t\\\\t\\\\t\\\\tselector: aSymbol\\\\n\\\\t\\\\t\\\\t\\\\tprotocol: aCategoryName\\\\n\\\\t\\\\t\\\\t\\\\tclass: aClass\\\\n\\\\t\\\\t\\\\t\\\\trequestor: requestor)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/27/2004 11:41'!\\\\nmethodChangedFrom: oldMethod to: newMethod selector: aSymbol inClass: aClass\\\\n\\\\tself trigger: (ModifiedEvent\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmethodChangedFrom: oldMethod\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tto: newMethod\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tselector: aSymbol \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tinClass: aClass)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/27/2004 11:41'!\\\\nmethodChangedFrom: oldMethod to: newMethod selector: aSymbol inClass: aClass requestor: requestor\\\\n\\\\tself trigger: (ModifiedEvent\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmethodChangedFrom: oldMethod\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tto: newMethod\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tselector: aSymbol \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tinClass: aClass\\\\n\\\\t\\\\t\\\\t\\\\t\\\\trequestor: requestor)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/28/2004 11:12'!\\\\nmethodRemoved: aMethod selector: aSymbol class: aClass \\\\n\\\\t\\\\\\\"A method with the given selector was removed from the class.\\\\\\\"\\\\n\\\\n\\\\tself trigger: (RemovedEvent\\\\n\\\\t\\\\t\\\\t\\\\tmethod: aMethod \\\\n\\\\t\\\\t\\\\t\\\\tselector: aSymbol\\\\n\\\\t\\\\t\\\\t\\\\tclass: aClass)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/28/2004 11:11'!\\\\nmethodRemoved: aMethod selector: aSymbol inProtocol: protocol class: aClass \\\\n\\\\t\\\\\\\"A method with the given selector was removed from the class.\\\\\\\"\\\\n\\\\n\\\\tself trigger: (RemovedEvent\\\\n\\\\t\\\\t\\\\t\\\\tmethod: aMethod \\\\n\\\\t\\\\t\\\\t\\\\tselector: aSymbol\\\\n\\\\t\\\\t\\\\t\\\\tprotocol: protocol\\\\n\\\\t\\\\t\\\\t\\\\tclass: aClass)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 4/7/2004 13:35'!\\\\nselector: selector recategorizedFrom: oldCategory to: newCategory inClass: aClass\\\\n\\\\n\\\\tself trigger: (RecategorizedEvent \\\\n\\\\t\\\\t\\\\t\\\\tmethod: (aClass compiledMethodAt: selector ifAbsent: [nil])\\\\n\\\\t\\\\t\\\\t\\\\tprotocol: newCategory\\\\n\\\\t\\\\t\\\\t\\\\tclass: aClass\\\\n\\\\t\\\\t\\\\t\\\\toldProtocol: oldCategory)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'al 7/18/2004 10:48'!\\\\ntraitDefinitionChangedFrom: oldTrait to: newTrait\\\\n\\\\tself trigger: (ModifiedTraitDefinitionEvent traitDefinitionChangedFrom: oldTrait to: newTrait)! !\\\\n\\\\n\\\\n\\\\n!SystemChangeNotifier methodsFor: 'private' stamp: 'rw 7/10/2003 15:15'!\\\\nnotify: anObject ofEvents: eventsCollection using: oneArgumentSelector\\\\n\\\\t\\\\\\\"Notifies an object of any events in the eventsCollection. Send it back a message #oneArgumentSelector, with as argument the particular system event instance.\\\\\\\"\\\\n\\\\n\\\\teventsCollection do: [:eachEvent |\\\\n\\\\t\\\\teventSource when: eachEvent send: oneArgumentSelector to: anObject]! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'private' stamp: 'rw 7/29/2003 17:05'!\\\\nreleaseAll\\\\n\\\\t\\\\\\\"Release all the dependents so that nobody receives notifications anymore.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Done for cleaning up the system.\\\\\\\"\\\\n\\\\t\\\\\\\"self uniqueInstance releaseAll\\\\\\\"\\\\n\\\\n\\\\teventSource releaseActionMap! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'private' stamp: 'NS 1/26/2004 20:43'!\\\\nsetBroadcasting\\\\n\\\\tsilenceLevel := 0.! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'private' stamp: 'NS 1/26/2004 20:41'!\\\\ntrigger: event\\\\n\\\\n\\\\tself isBroadcasting ifTrue: [event trigger: eventSource]\\\\n\\\\n\\\\\\\"\\\\t| caughtExceptions |\\\\n\\\\tcaughtExceptions := OrderedCollection new.\\\\n\\\\tself isBroadcasting ifTrue: [\\\\n\\\\t\\\\t[(eventSource actionForEvent: event eventSelector) valueWithArguments: (Array with: event)] on: Exception do: [:exc | caughtExceptions add: exc]].\\\\n\\\\tcaughtExceptions do: [:exc | exc resignalAs: exc class new]\\\\\\\"! !\\\\n\\\\n\\\\n!SystemChangeNotifier methodsFor: 'private-event lists' stamp: 'rw 7/29/2003 15:14'!\\\\nallSystemEvents\\\\n\\\\t^AbstractEvent systemEvents! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'private-event lists' stamp: 'rw 7/29/2003 15:14'!\\\\nsystemEventsForChange: changeKind \\\\n\\\\t| selectorBlock |\\\\n\\\\tselectorBlock := AbstractEvent eventSelectorBlock.\\\\n\\\\t^AbstractEvent allItemKinds \\\\n\\\\t\\\\tcollect: [:itemKind | selectorBlock value: itemKind value: changeKind]! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'private-event lists' stamp: 'rw 7/29/2003 15:14'!\\\\nsystemEventsForItem: itemKind \\\\n\\\\t| selectorBlock |\\\\n\\\\tselectorBlock := AbstractEvent eventSelectorBlock.\\\\n\\\\t^AbstractEvent allChangeKinds \\\\n\\\\t\\\\tcollect: [:changeKind | selectorBlock value: itemKind value: changeKind]! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'private-event lists' stamp: 'rw 7/29/2003 15:14'!\\\\nsystemEventsForItem: itemKind change: changeKind \\\\n\\\\t^AbstractEvent eventSelectorBlock value: itemKind value: changeKind! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSystemChangeNotifier class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SystemChangeNotifier class methodsFor: 'instance creation' stamp: 'rw 6/28/2003 09:41'!\\\\nnew\\\\n\\\\n\\\\t^self error: self instanceCreationErrorString! !\\\\n\\\\n\\\\n!SystemChangeNotifier class methodsFor: 'item kinds' stamp: 'NS 1/21/2004 09:31'!\\\\ncategoryKind\\\\n\\\\n\\\\t^ AbstractEvent categoryKind! !\\\\n\\\\n!SystemChangeNotifier class methodsFor: 'item kinds' stamp: 'NS 1/21/2004 09:31'!\\\\nclassKind\\\\n\\\\n\\\\t^ AbstractEvent classKind! !\\\\n\\\\n!SystemChangeNotifier class methodsFor: 'item kinds' stamp: 'NS 1/21/2004 09:32'!\\\\nexpressionKind\\\\n\\\\t^ AbstractEvent expressionKind! !\\\\n\\\\n!SystemChangeNotifier class methodsFor: 'item kinds' stamp: 'NS 1/21/2004 09:31'!\\\\nmethodKind\\\\n\\\\n\\\\t^ AbstractEvent methodKind! !\\\\n\\\\n!SystemChangeNotifier class methodsFor: 'item kinds' stamp: 'NS 1/21/2004 09:32'!\\\\nprotocolKind\\\\n\\\\t^ AbstractEvent protocolKind! !\\\\n\\\\n\\\\n!SystemChangeNotifier class methodsFor: 'public' stamp: 'NS 1/27/2004 16:23'!\\\\nuniqueInstance\\\\n\\\\n\\\\tUniqueInstance ifNil: [UniqueInstance := self createInstance].\\\\n\\\\t^UniqueInstance! !\\\\n\\\\n\\\\n!SystemChangeNotifier class methodsFor: 'private' stamp: 'NS 1/27/2004 16:23'!\\\\ncreateInstance\\\\n\\\\n\\\\t^self basicNew initialize! !\\\\n\\\\n!SystemChangeNotifier class methodsFor: 'private' stamp: 'rw 6/28/2003 09:41'!\\\\ninstanceCreationErrorString\\\\n\\\\n\\\\t^'This is a singleton implementation, so you are not allowed to create instances yourself. Use #uniqueInstance to access the instance.'! !\\\\n\\\\n!SystemChangeNotifier class methodsFor: 'private' stamp: 'rw 7/11/2003 14:36'!\\\\nresetUniqueInstance\\\\n\\\\t\\\\\\\"self resetUniqueInstance\\\\\\\"\\\\n\\\\n\\\\tUniqueInstance\\\\n\\\\t\\\\tifNotNilDo: [:u | UniqueInstance releaseAll.\\\\n\\\\t\\\\t\\\\tUniqueInstance _ nil]! !\\\\nSystemChangeTestRoot subclass: #SystemChangeNotifierTest\\\\n\\\\tinstanceVariableNames: 'capturedEvent'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'SystemChangeNotification-Tests'!\\\\n!SystemChangeNotifierTest commentStamp: 'rw 4/3/2006 17:19' prior: 0!\\\\nA SystemChangeNotifierTest is a test class that tests whether the triggering of changes indeed results in the intended changes to be sent to registered object. The basic mechanism for each test is fairly simple:\\\\n\\\\t- register the receiver as the one to get the change notifier.\\\\n\\\\t- manually trigger a change (so the system is not polluted just to see whether we get the needed event).\\\\n\\\\t- the method #event: is invoked and remembers the change event.\\\\n\\\\t- the change event is checked to see whether it was the intended one.\\\\n\\\\nInstance Variables\\\\n\\\\tcapturedEvent:\\\\t\\\\tRemembers the captured event!\\\\n\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Private' stamp: 'rw 4/3/2006 16:34'!\\\\ncapturedEvent: eventOrNil\\\\n\\\\t\\\\\\\"Remember the event being sent.\\\\\\\"\\\\n\\\\n\\\\tcapturedEvent := eventOrNil! !\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Private' stamp: 'rw 4/3/2006 16:36'!\\\\ncheckEventForClass: aClass category: cat change: changeKind \\\\n\\\\n\\\\tself assert: (capturedEvent perform: ('is' , changeKind) asSymbol).\\\\n\\\\tself assert: capturedEvent item = aClass.\\\\n\\\\tself assert: capturedEvent itemKind = AbstractEvent classKind.\\\\n\\\\tself assert: capturedEvent itemClass = aClass.\\\\n\\\\tself assert: capturedEvent itemCategory = cat! !\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Private' stamp: 'rw 4/3/2006 16:43'!\\\\ncheckEventForMethod: aMethod protocol: prot change: changeKind \\\\n\\\\n\\\\tself assert: (capturedEvent perform: ('is' , changeKind) asSymbol).\\\\n\\\\tself assert: capturedEvent item = aMethod.\\\\n\\\\tself assert: capturedEvent itemKind = AbstractEvent methodKind.\\\\n\\\\tself assert: capturedEvent itemClass = self class.\\\\n\\\\tself assert: capturedEvent itemMethod = aMethod.\\\\n\\\\tself assert: capturedEvent itemProtocol = prot! !\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Private' stamp: 'rw 4/3/2006 16:43'!\\\\ncheckEventForMethod: aMethod protocol: prot change: changeKind oldMethod: oldMethod\\\\n\\\\n\\\\tself checkEventForMethod: aMethod protocol: prot change: changeKind.\\\\n\\\\tself assert: capturedEvent oldItem == oldMethod\\\\n\\\\t! !\\\\n\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Event Notifications' stamp: 'rw 4/3/2006 17:50'!\\\\nevent: event\\\\n\\\\t\\\\\\\"The notification message being sent to me when an event is captured. Remember it.\\\\\\\"\\\\n\\\\n\\\\\\\"\\\\tcapturedEvent isNil ifTrue: [\\\\tself capturedEvent: event] ifFalse: [self assert: false]\\\\\\\"\\\\n\\\\n\\\\tself capturedEvent: event! !\\\\n\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Running' stamp: 'rw 4/3/2006 17:55'!\\\\ntearDown\\\\n\\\\n\\\\tself capturedEvent: nil.\\\\n\\\\tsuper tearDown! !\\\\n\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Testing-system triggers' stamp: 'rw 4/5/2006 17:24'!\\\\ntestClassAddedEvent\\\\n\\\\n\\\\tself systemChangeNotifier notify: self ofAllSystemChangesUsing: #event:.\\\\n\\\\tself systemChangeNotifier classAdded: self class inCategory: #FooCat.\\\\n\\\\tself\\\\n\\\\t\\\\tcheckEventForClass: self class\\\\n\\\\t\\\\tcategory: #FooCat\\\\n\\\\t\\\\tchange: #Added! !\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Testing-system triggers' stamp: 'rw 4/5/2006 17:24'!\\\\ntestClassAddedEvent2\\\\n\\\\n\\\\tself systemChangeNotifier notify: self ofSystemChangesOfItem: #class change: #Added using: #event:.\\\\n\\\\tself systemChangeNotifier classAdded: self class inCategory: #FooCat.\\\\n\\\\tself\\\\n\\\\t\\\\tcheckEventForClass: self class\\\\n\\\\t\\\\tcategory: #FooCat\\\\n\\\\t\\\\tchange: #Added! !\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Testing-system triggers' stamp: 'rw 4/5/2006 17:24'!\\\\ntestClassCommentedEvent\\\\n\\\\n\\\\tself systemChangeNotifier notify: self ofAllSystemChangesUsing: #event:.\\\\n\\\\tself systemChangeNotifier classCommented: self class inCategory: #FooCat.\\\\n\\\\tself\\\\n\\\\t\\\\tcheckEventForClass: self class\\\\n\\\\t\\\\tcategory: #FooCat\\\\n\\\\t\\\\tchange: #Commented! !\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Testing-system triggers' stamp: 'rw 4/5/2006 17:24'!\\\\ntestClassRecategorizedEvent\\\\n\\\\n\\\\tself systemChangeNotifier notify: self ofAllSystemChangesUsing: #event:.\\\\n\\\\tself systemChangeNotifier \\\\n\\\\t\\\\tclass: self class\\\\n\\\\t\\\\trecategorizedFrom: #FooCat\\\\n\\\\t\\\\tto: #FooBar.\\\\n\\\\tself\\\\n\\\\t\\\\tcheckEventForClass: self class\\\\n\\\\t\\\\tcategory: #FooBar\\\\n\\\\t\\\\tchange: #Recategorized.\\\\n\\\\tself assert: capturedEvent oldCategory = #FooCat! !\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Testing-system triggers' stamp: 'rw 4/5/2006 17:24'!\\\\ntestClassRemovedEvent\\\\n\\\\n\\\\tself systemChangeNotifier notify: self ofAllSystemChangesUsing: #event:.\\\\n\\\\tself systemChangeNotifier classRemoved: self class fromCategory: #FooCat.\\\\n\\\\tself\\\\n\\\\t\\\\tcheckEventForClass: self class\\\\n\\\\t\\\\tcategory: #FooCat\\\\n\\\\t\\\\tchange: #Removed! !\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Testing-system triggers' stamp: 'rw 4/5/2006 17:24'!\\\\ntestClassRenamedEvent\\\\n\\\\n\\\\tself systemChangeNotifier notify: self ofAllSystemChangesUsing: #event:.\\\\n\\\\tself systemChangeNotifier \\\\n\\\\t\\\\tclassRenamed: self class\\\\n\\\\t\\\\tfrom: #OldFooClass\\\\n\\\\t\\\\tto: #NewFooClass\\\\n\\\\t\\\\tinCategory: #FooCat.\\\\n\\\\tself\\\\n\\\\t\\\\tcheckEventForClass: self class\\\\n\\\\t\\\\tcategory: #FooCat\\\\n\\\\t\\\\tchange: #Renamed.\\\\n\\\\\\\"\\\\tself assert: capturedEvent oldName = #OldFooClass.\\\\n\\\\tself assert: capturedEvent newName = #NewFooClass\\\\\\\"! !\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Testing-system triggers' stamp: 'rw 4/5/2006 17:25'!\\\\ntestDoItEvent\\\\n\\\\n\\\\tself systemChangeNotifier notify: self ofAllSystemChangesUsing: #event:.\\\\n\\\\tself systemChangeNotifier \\\\n\\\\t\\\\tevaluated: '1 + 2'\\\\n\\\\t\\\\tcontext: self.\\\\n\\\\tself assert: capturedEvent isDoIt.\\\\n\\\\tself assert: capturedEvent item = '1 + 2'.\\\\n\\\\tself assert: capturedEvent itemKind = AbstractEvent expressionKind.\\\\n\\\\tself assert: capturedEvent itemClass = nil.\\\\n\\\\tself assert: capturedEvent itemMethod = nil.\\\\n\\\\tself assert: capturedEvent itemProtocol = nil.\\\\n\\\\tself assert: capturedEvent itemExpression = '1 + 2'.\\\\n\\\\tself assert: capturedEvent context = self.! !\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Testing-system triggers' stamp: 'rw 4/5/2006 17:25'!\\\\ntestMethodAddedEvent1\\\\n\\\\n\\\\tself systemChangeNotifier notify: self ofAllSystemChangesUsing: #event:.\\\\n\\\\tself systemChangeNotifier \\\\n\\\\t\\\\tmethodAdded: self class >> #testMethodAddedEvent1\\\\n\\\\t\\\\tselector: #testMethodAddedEvent1\\\\n\\\\t\\\\tinProtocol: #FooCat\\\\n\\\\t\\\\tclass: self class.\\\\n\\\\tself \\\\n\\\\t\\\\tcheckEventForMethod: self class >> #testMethodAddedEvent1\\\\n\\\\t\\\\tprotocol: #FooCat\\\\n\\\\t\\\\tchange: #Added! !\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Testing-system triggers' stamp: 'rw 4/5/2006 17:25'!\\\\ntestMethodAddedEvent2\\\\n\\\\n\\\\tself systemChangeNotifier notify: self ofAllSystemChangesUsing: #event:.\\\\n\\\\tself systemChangeNotifier \\\\n\\\\t\\\\tmethodAdded: self class >> #testMethodAddedEvent1\\\\n\\\\t\\\\tselector: #testMethodAddedEvent1\\\\n\\\\t\\\\tinClass: self class.\\\\n\\\\tself \\\\n\\\\t\\\\tcheckEventForMethod: self class >> #testMethodAddedEvent1\\\\n\\\\t\\\\tprotocol: nil\\\\n\\\\t\\\\tchange: #Added! !\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Testing-system triggers' stamp: 'rw 4/5/2006 17:25'!\\\\ntestMethodAddedEvent3\\\\n\\\\n\\\\tself systemChangeNotifier notify: self ofAllSystemChangesUsing: #event:.\\\\n\\\\tself systemChangeNotifier \\\\n\\\\t\\\\tmethodChangedFrom: self class >> #testMethodAddedEvent1\\\\n\\\\t\\\\tto: self class >> #testMethodAddedEvent2\\\\n\\\\t\\\\tselector: #testMethodAddedEvent2\\\\n\\\\t\\\\tinClass: self class.\\\\n\\\\tself \\\\n\\\\t\\\\tcheckEventForMethod: self class >> #testMethodAddedEvent2\\\\n\\\\t\\\\tprotocol: nil\\\\n\\\\t\\\\tchange: #Modified\\\\n\\\\t\\\\toldMethod: self class >> #testMethodAddedEvent1.! !\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Testing-system triggers' stamp: 'rw 4/5/2006 17:25'!\\\\ntestMethodRemovedEvent\\\\n\\\\n\\\\tself systemChangeNotifier notify: self ofAllSystemChangesUsing: #event:.\\\\n\\\\tself systemChangeNotifier \\\\n\\\\t\\\\tmethodRemoved: self class>> #testMethodRemovedEvent\\\\n\\\\t\\\\tselector: #testMethodRemovedEvent\\\\n\\\\t\\\\tinProtocol: #FooCat\\\\n\\\\t\\\\tclass: self class.\\\\n\\\\tself\\\\n\\\\t\\\\tcheckEventForMethod: self class>> #testMethodRemovedEvent\\\\n\\\\t\\\\tprotocol: #FooCat\\\\n\\\\t\\\\tchange: #Removed.! !\\\\nTestCase subclass: #SystemChangeTestRoot\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'SystemChangeNotification-Tests'!\\\\n!SystemChangeTestRoot commentStamp: 'rw 4/5/2006 17:28' prior: 0!\\\\nThe Root test class for the System Change Notification tests.!\\\\n\\\\n\\\\n!SystemChangeTestRoot methodsFor: 'Private' stamp: 'rw 4/3/2006 17:48'!\\\\nsystemChangeNotifier\\\\n\\\\t\\\\\\\"The notifier to use. Use the one for the system.\\\\\\\"\\\\n\\\\n\\\\t^SystemChangeNotifier uniqueInstance! !\\\\n\\\\n\\\\n!SystemChangeTestRoot methodsFor: 'Running' stamp: 'rw 4/3/2006 17:59'!\\\\ntearDown\\\\n\\\\n\\\\tself unhook.\\\\n\\\\tsuper tearDown! !\\\\n\\\\n!SystemChangeTestRoot methodsFor: 'Running' stamp: 'rw 4/3/2006 17:23'!\\\\nunhook\\\\n\\\\n\\\\tself systemChangeNotifier noMoreNotificationsFor: self! !\\\\nIdentityDictionary subclass: #SystemDictionary\\\\n\\\\tinstanceVariableNames: 'cachedClassNames'\\\\n\\\\tclassVariableNames: 'LastImageName LastQuitLogPosition LowSpaceProcess LowSpaceSemaphore MemoryHogs ShutDownList SpecialSelectors StartUpList StartupStamp SystemChanges'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Support'!\\\\n!SystemDictionary commentStamp: '<historical>' prior: 0!\\\\nI represent a special dictionary that supports protocol for asking questions about the structure of the system. Other than class names, I contain (print this)...\\\\n\\\\tSmalltalk keys select: [:k | ((Smalltalk at: k) isKindOf: Class) not]\\\\n\\\\t\\\\t\\\\tthenCollect: [:k | k -> (Smalltalk at: k) class]\\\\n!\\\\n\\\\n\\\\n!SystemDictionary methodsFor: 'accessing' stamp: 'ar 7/11/1999 21:56'!\\\\norganization\\\\n\\\\t\\\\\\\"Return the organizer for the receiver\\\\\\\"\\\\n\\\\t^SystemOrganization! !\\\\n\\\\n\\\\n!SystemDictionary methodsFor: 'class and trait names' stamp: 'al 1/12/2006 23:59'!\\\\nallClassesAndTraits\\\\n\\\\t\\\\\\\"Return all the classes and traits defined in the Smalltalk SystemDictionary\\\\\\\"\\\\n\\\\n\\\\t^ self classNames , self traitNames collect: [:each | self at: each]! !\\\\n\\\\n!SystemDictionary methodsFor: 'class and trait names' stamp: 'al 1/13/2006 00:15'!\\\\nallClassesAndTraitsDo: aBlock\\\\n\\\\t^self allClassesAndTraits do: aBlock! !\\\\n\\\\n!SystemDictionary methodsFor: 'class and trait names' stamp: 'al 1/12/2006 23:57'!\\\\nclassNamed: className \\\\n\\\\t^self classOrTraitNamed: className.! !\\\\n\\\\n!SystemDictionary methodsFor: 'class and trait names' stamp: 'al 1/13/2006 00:51'!\\\\nclassNames\\\\n\\\\t\\\\\\\"Answer a SortedCollection of all class names.\\\\\\\"\\\\n\\\\t| names |\\\\n\\\\tcachedClassNames == nil ifTrue:\\\\n\\\\t\\\\t[names _ OrderedCollection new: self size.\\\\n\\\\t\\\\tself do: \\\\n\\\\t\\\\t\\\\t[:cl | (cl isInMemory\\\\n\\\\t\\\\t\\\\t\\\\tand: [(cl isKindOf: Class)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [(cl name beginsWith: 'AnObsolete') not]])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [names add: cl name]].\\\\n\\\\t\\\\tcachedClassNames _ names asSortedCollection].\\\\n\\\\t^ cachedClassNames! !\\\\n\\\\n!SystemDictionary methodsFor: 'class and trait names' stamp: 'al 1/12/2006 23:56'!\\\\nclassOrTraitNamed: aString \\\\n\\\\t\\\\\\\"aString is either a class or trait name or a class or trait name followed by ' class' or 'classTrait' respectively.\\\\n\\\\tAnswer the class or metaclass it names.\\\\\\\"\\\\n\\\\n\\\\t| meta baseName baseClass |\\\\n\\\\t(aString endsWith: ' class')\\\\n\\\\t\\\\tifTrue: [meta _ true.\\\\n\\\\t\\\\t\\\\t\\\\tbaseName _ aString copyFrom: 1 to: aString size - 6]\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t(aString endsWith: ' classTrait')\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmeta _ true.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbaseName _ aString copyFrom: 1 to: aString size - 11]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmeta _ false.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbaseName _ aString]].\\\\n\\\\tbaseClass _ Smalltalk at: baseName asSymbol ifAbsent: [^ nil].\\\\n\\\\tmeta\\\\n\\\\t\\\\tifTrue: [^ baseClass classSide]\\\\n\\\\t\\\\tifFalse: [^ baseClass]! !\\\\n\\\\n!SystemDictionary methodsFor: 'class and trait names' stamp: 'di 2/16/2000 10:28'!\\\\nflushClassNameCache\\\\n\\\\t\\\\\\\"Smalltalk flushClassNameCache\\\\\\\"\\\\n\\\\t\\\\\\\"Forse recomputation of the cached list of class names.\\\\\\\"\\\\n\\\\n\\\\tcachedClassNames _ nil! !\\\\n\\\\n!SystemDictionary methodsFor: 'class and trait names' stamp: 'NS 1/27/2004 12:08'!\\\\nforgetClass: aClass logged: aBool \\\\n\\\\t\\\\\\\"Delete the class, aClass, from the system.\\\\n\\\\tNote that this doesn't do everything required to dispose of a class - to do that use Class>>removeFromSystem.\\\\\\\"\\\\n\\\\n\\\\taBool ifTrue: [SystemChangeNotifier uniqueInstance classRemoved: aClass fromCategory: aClass category].\\\\t\\\\t\\\\n\\\\tSystemOrganization removeElement: aClass name.\\\\n\\\\tself removeFromStartUpList: aClass.\\\\n\\\\tself removeFromShutDownList: aClass.\\\\n\\\\tself removeKey: aClass name ifAbsent: [].\\\\n\\\\tself flushClassNameCache! !\\\\n\\\\n!SystemDictionary methodsFor: 'class and trait names'!\\\\nhasClassNamed: aString\\\\n\\\\t\\\\\\\"Answer whether there is a class of the given name, but don't intern aString if it's not alrady interned.  4/29/96 sw\\\\\\\"\\\\n\\\\n\\\\tSymbol hasInterned: aString ifTrue: \\\\n\\\\t\\\\t[:aSymbol | ^ (self at: aSymbol ifAbsent: [nil]) isKindOf: Class].\\\\n\\\\t^ false! !\\\\n\\\\n!SystemDictionary methodsFor: 'class and trait names' stamp: 'sw 9/5/97 18:30'!\\\\nremoveClassNamed: aName\\\\n\\\\t\\\\\\\"Invoked from fileouts:  if there is currently a class in the system named aName, then remove it.  If anything untoward happens, report it in the Transcript.  \\\\\\\"\\\\n\\\\n\\\\t| oldClass |\\\\n\\\\t(oldClass _ self at: aName asSymbol ifAbsent: [nil]) == nil\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[Transcript cr; show: 'Removal of class named ', aName, ' ignored because ', aName, ' does not exist.'.\\\\n\\\\t\\\\t\\\\t^ self].\\\\n\\\\n\\\\toldClass removeFromSystem! !\\\\n\\\\n!SystemDictionary methodsFor: 'class and trait names' stamp: 'sw 10/28/96'!\\\\nrenameClassNamed: oldName as: newName\\\\n\\\\t\\\\\\\"Invoked from fileouts:  if there is currently a class in the system named oldName, then rename it to newName.  If anything untoward happens, report it in the Transcript.  \\\\\\\"\\\\n\\\\n\\\\t| oldClass |\\\\n\\\\t(oldClass _ self at: oldName asSymbol ifAbsent: [nil]) == nil\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[Transcript cr; show: 'Class-rename for ', oldName, ' ignored because ', oldName, ' does not exist.'.\\\\n\\\\t\\\\t\\\\t^ self].\\\\n\\\\n\\\\toldClass rename: newName! !\\\\n\\\\n!SystemDictionary methodsFor: 'class and trait names' stamp: 'rr 3/11/2004 15:18'!\\\\nrenameClass: aClass as: newName \\\\n\\\\t\\\\\\\"Rename the class, aClass, to have the title newName.\\\\\\\"\\\\n\\\\t| oldref i oldName category |\\\\n\\\\toldName := aClass name.\\\\n\\\\tcategory := aClass category.\\\\n\\\\tSystemOrganization classify: newName under: aClass category.\\\\n\\\\tSystemOrganization removeElement: aClass name.\\\\n\\\\toldref _ self associationAt: aClass name.\\\\n\\\\tself removeKey: aClass name.\\\\n\\\\toldref key: newName.\\\\n\\\\tself add: oldref.  \\\\\\\"Old association preserves old refs\\\\\\\"\\\\n\\\\t(Array with: StartUpList with: ShutDownList) do:\\\\n\\\\t\\\\t[:list |  i _ list indexOf: aClass name ifAbsent: [0].\\\\n\\\\t\\\\ti > 0 ifTrue: [list at: i put: newName]].\\\\n\\\\tself flushClassNameCache.\\\\n\\\\tSystemChangeNotifier uniqueInstance classRenamed: aClass from: oldName to: newName inCategory: category! !\\\\n\\\\n!SystemDictionary methodsFor: 'class and trait names' stamp: 'al 1/12/2006 23:54'!\\\\ntraitNames\\\\n\\\\t\\\\\\\"Answer a SortedCollection of all traits (not including class-traits) names.\\\\\\\"\\\\n\\\\t| names |\\\\n\\\\tnames := OrderedCollection new.\\\\n\\\\tself do: \\\\n\\\\t\\\\t[:cl | (cl isInMemory\\\\n\\\\t\\\\t\\\\tand: [(cl isKindOf: Trait)\\\\n\\\\t\\\\t\\\\tand: [(cl name beginsWith: 'AnObsolete') not]])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [names add: cl name]].\\\\n\\\\t^ names! !\\\\n\\\\n\\\\n!SystemDictionary methodsFor: 'copying' stamp: 'tk 10/20/2000 11:35'!\\\\nveryDeepCopyWith: deepCopier\\\\n\\\\t\\\\\\\"Return self.  I can't be copied.  Do not record me.\\\\\\\"! !\\\\n\\\\n\\\\n!SystemDictionary methodsFor: 'dictionary access' stamp: 'md 3/2/2006 22:01'!\\\\nassociationOrUndeclaredAt: key \\\\n\\\\t\\\\\\\"return an association or install in undeclared.  Used for mating up ImageSegments.\\\\\\\"\\\\n\\\\n\\\\t^ self associationAt: key ifAbsent: [\\\\n\\\\t\\\\tUndeclared at: key put: nil.\\\\n\\\\t\\\\tUndeclared associationAt: key]! !\\\\n\\\\n!SystemDictionary methodsFor: 'dictionary access'!\\\\nat: aKey put: anObject \\\\n\\\\t\\\\\\\"Override from Dictionary to check Undeclared and fix up\\\\n\\\\treferences to undeclared variables.\\\\\\\"\\\\n\\\\t| index element |\\\\n\\\\t(self includesKey: aKey) ifFalse: \\\\n\\\\t\\\\t[self declare: aKey from: Undeclared.\\\\n\\\\t\\\\tself flushClassNameCache].\\\\n\\\\tsuper at: aKey put: anObject.\\\\n\\\\t^ anObject! !\\\\n\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping'!\\\\ncleanOutUndeclared \\\\n\\\\tUndeclared removeUnreferencedKeys! !\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping' stamp: 'md 1/5/2004 18:05'!\\\\ncompressSources\\\\t\\\\n\\\\t\\\\\\\"Copy all the source file to a compressed file. Usually preceded by Smalltalk condenseSources.\\\\\\\"\\\\n\\\\t\\\\\\\"The new file will be created in the default directory, and the code in openSources\\\\n\\\\twill try to open it if it is there, otherwise it will look for normal sources.\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk compressSources\\\\\\\"\\\\n\\\\n\\\\t| f cfName cf |\\\\n\\\\tf _ SourceFiles first.\\\\n\\\\t(SmalltalkImage current sourcesName endsWith: 'sources')\\\\n\\\\t\\\\tifTrue: [cfName _ (SmalltalkImage current sourcesName allButLast: 7) , 'stc']\\\\n\\\\t\\\\tifFalse: [self error: 'Hey, I thought the sources name ended with ''.sources''.'].\\\\n\\\\tcf _ (CompressedSourceStream on: (FileStream newFileNamed: cfName))\\\\n\\\\t\\\\t\\\\t\\\\tsegmentSize: 20000 maxSize: f size.\\\\n\\\\n\\\\t\\\\\\\"Copy the sources\\\\\\\"\\\\n'Compressing Sources File...'\\\\n\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\tfrom: 0 to: f size\\\\n\\\\tduring:\\\\n\\\\t\\\\t[:bar | f position: 0.\\\\n\\\\t\\\\t[f atEnd] whileFalse:\\\\n\\\\t\\\\t\\\\t[cf nextPutAll: (f next: 20000).\\\\n\\\\t\\\\t\\\\tbar value: f position]].\\\\n\\\\tcf close.\\\\n\\\\tself setMacFileInfoOn: cfName.\\\\n\\\\tself inform: 'You now have a compressed sources file!!\\\\nSqueak will use it the next time you start.'! !\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping' stamp: 'al 1/13/2006 00:17'!\\\\ncondenseChanges\\\\n\\\\t\\\\\\\"Move all the changes onto a compacted sources file.\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk condenseChanges\\\\\\\"\\\\n\\\\t| f oldChanges count |\\\\n\\\\tf := FileStream fileNamed: 'ST80.temp'.\\\\n\\\\tf header; timeStamp.\\\\n\\\\t'Condensing Changes File...'\\\\n\\\\t\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\tfrom: 0\\\\n\\\\t\\\\tto: self classNames size + self traitNames size\\\\n\\\\t\\\\tduring: [:bar | \\\\n\\\\t\\\\t\\\\tcount := 0.\\\\n\\\\t\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\t\\\\tallClassesAndTraitsDo: [:classOrTrait | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbar value: (count := count + 1).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tclassOrTrait moveChangesTo: f.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tclassOrTrait putClassCommentToCondensedChangesFile: f.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tclassOrTrait classSide moveChangesTo: f]].\\\\n\\\\tSmalltalkImage current lastQuitLogPosition: f position.\\\\n\\\\tf trailer; close.\\\\n\\\\toldChanges := SourceFiles at: 2.\\\\n\\\\toldChanges close.\\\\n\\\\tFileDirectory default deleteFileNamed: oldChanges name , '.old';\\\\n\\\\t\\\\t rename: oldChanges name toBe: oldChanges name , '.old';\\\\n\\\\t\\\\t rename: f name toBe: oldChanges name.\\\\n\\\\tself setMacFileInfoOn: oldChanges name.\\\\n\\\\tSourceFiles\\\\n\\\\t\\\\tat: 2\\\\n\\\\t\\\\tput: (StandardFileStream oldFileNamed: oldChanges name)! !\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping' stamp: 'md 3/1/2006 00:02'!\\\\ncondenseSources\\\\t\\\\n\\\\t\\\\\\\"Move all the changes onto a compacted sources file.\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk condenseSources\\\\\\\"\\\\n\\\\n\\\\t| f dir newVersionString count |\\\\n\\\\tUtilities fixUpProblemsWithAllCategory.\\\\n\\\\t\\\\\\\"The above removes any concrete, spurious '-- all --' categories, which mess up the process.\\\\\\\"\\\\n\\\\tdir := FileDirectory default.\\\\n\\\\tnewVersionString := UIManager default request: 'Please designate the version\\\\nfor the new source code file...' initialAnswer: SmalltalkImage current sourceFileVersionString.\\\\n\\\\tnewVersionString ifNil: [^ self].\\\\n\\\\tnewVersionString = SmalltalkImage current sourceFileVersionString ifTrue:\\\\n\\\\t\\\\t[^ self error: 'The new source file must not be the same as the old.'].\\\\n\\\\tSmalltalkImage current sourceFileVersionString: newVersionString.\\\\n\\\\n\\\\t\\\\\\\"Write all sources with fileIndex 1\\\\\\\"\\\\n\\\\tf := FileStream newFileNamed: SmalltalkImage current sourcesName.\\\\n\\\\tf header; timeStamp.\\\\n'Condensing Sources File...'\\\\n\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\tfrom: 0 to: self classNames size + self traitNames size\\\\n\\\\tduring:\\\\n\\\\t\\\\t[:bar | count := 0.\\\\n\\\\t\\\\tSmalltalk allClassesAndTraitsDo:\\\\n\\\\t\\\\t\\\\t[:classOrTrait | bar value: (count := count + 1).\\\\n\\\\t\\\\t\\\\tclassOrTrait fileOutOn: f moveSource: true toFile: 1]].\\\\n\\\\tf trailer; close.\\\\n\\\\n\\\\t\\\\\\\"Make a new empty changes file\\\\\\\"\\\\n\\\\tSmalltalkImage current closeSourceFiles.\\\\n\\\\tdir rename: SmalltalkImage current changesName\\\\n\\\\t\\\\ttoBe: SmalltalkImage current changesName , '.old'.\\\\n\\\\t(FileStream newFileNamed: SmalltalkImage current changesName)\\\\n\\\\t\\\\theader; timeStamp; close.\\\\n\\\\tSmalltalkImage current lastQuitLogPosition: 0.\\\\n\\\\n\\\\tself setMacFileInfoOn: SmalltalkImage current changesName.\\\\n\\\\tself setMacFileInfoOn: SmalltalkImage current sourcesName.\\\\n\\\\tSmalltalkImage current openSourceFiles.\\\\n\\\\tself inform: 'Source files have been rewritten!!\\\\nCheck that all is well,\\\\nand then save/quit.'! !\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping' stamp: 'sd 4/17/2003 20:59'!\\\\nforgetDoIts\\\\t\\\\n\\\\t\\\\\\\"Smalltalk forgetDoIts\\\\\\\"\\\\n\\\\t \\\\\\\"get rid of old DoIt methods\\\\\\\"\\\\n\\\\n\\\\tself systemNavigation allBehaviorsDo:\\\\n\\\\t\\\\t[:cl | cl forgetDoIts]\\\\n\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping' stamp: 'ar 9/27/2005 21:45'!\\\\nmakeExternalRelease\\\\n\\\\t\\\\\\\"Smalltalk makeExternalRelease\\\\\\\"\\\\n\\\\t(self confirm: SystemVersion current version , '\\\\nIs this the correct version designation?\\\\nIf not, choose no, and fix it.')\\\\n\\\\t\\\\tifFalse: [^ self].\\\\n\\\\t\\\\\\\"Object classPool at: #DependentsFields\\\\\\\"\\\\n\\\\tself reclaimDependents.\\\\n\\\\tPreferences enable: #mvcProjectsAllowed.\\\\n\\\\tPreferences enable: #fastDragWindowForMorphic.\\\\n\\\\tSmalltalk at: #Browser ifPresent:[:br| br initialize].\\\\n\\\\tUndeclared isEmpty\\\\n\\\\t\\\\tifFalse: [self halt].\\\\n\\\\tScriptingSystem deletePrivateGraphics.\\\\n\\\\t#(#Helvetica #Palatino #Courier )\\\\n\\\\t\\\\tdo: [:n | TextConstants\\\\n\\\\t\\\\t\\\\t\\\\tremoveKey: n\\\\n\\\\t\\\\t\\\\t\\\\tifAbsent: []].\\\\n\\\\t(Utilities classPool at: #UpdateUrlLists) copy\\\\n\\\\t\\\\tdo: [:pair | (pair first includesSubstring: 'Disney' caseSensitive: false)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [(Utilities classPool at: #UpdateUrlLists)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tremove: pair]].\\\\n\\\\t(ServerDirectory serverNames copyWithoutAll: #('UCSBCreateArchive' 'UIUCArchive' 'UpdatesExtUIUC' 'UpdatesExtWebPage' ))\\\\n\\\\t\\\\tdo: [:sn | ServerDirectory removeServerNamed: sn].\\\\n\\\\tself  garbageCollect.\\\\n\\\\tself obsoleteClasses isEmpty\\\\n\\\\t\\\\tifFalse: [self halt].\\\\n\\\\tSymbol rehash.\\\\n\\\\tself halt: 'Ready to condense changes or sources'! !\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping' stamp: 'ar 9/27/2005 21:45'!\\\\nmakeInternalRelease\\\\n\\\\t\\\\\\\"Smalltalk makeInternalRelease\\\\\\\"\\\\n\\\\t(self confirm: SystemVersion current version , '\\\\nIs this the correct version designation?\\\\nIf not, choose no, and fix it.')\\\\n\\\\t\\\\tifFalse: [^ self].\\\\n\\\\t(Object classPool at: #DependentsFields) size > 1\\\\n\\\\t\\\\tifTrue: [self halt].\\\\n\\\\tSmalltalk at: #Browser ifPresent:[:br| br initialize].\\\\n\\\\tUndeclared isEmpty\\\\n\\\\t\\\\tifFalse: [self halt].\\\\n\\\\tself garbageCollect.\\\\n\\\\tself obsoleteClasses isEmpty\\\\n\\\\t\\\\tifFalse: [self halt].\\\\n\\\\tSymbol rehash.\\\\n\\\\tself halt: 'Ready to condense changes'.\\\\n\\\\tself condenseChanges! !\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping' stamp: 'sd 9/29/2004 18:15'!\\\\nreclaimDependents\\\\n\\\\t\\\\\\\"No-opped due to weak dictionary in use\\\\\\\"\\\\n\\\\tself garbageCollect! !\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping' stamp: 'al 1/13/2006 00:19'!\\\\nreconstructChanges\\\\t\\\\n\\\\t\\\\\\\"Move all the changes and its histories onto another sources file.\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk reconstructChanges\\\\\\\"\\\\n\\\\n\\\\t| f oldChanges classCount |\\\\n\\\\tf _ FileStream fileNamed: 'ST80.temp'.\\\\n\\\\tf header; timeStamp.\\\\n'Condensing Changes File...'\\\\n\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\tfrom: 0 to: self classNames size + self traitNames size\\\\n\\\\tduring:\\\\n\\\\t\\\\t[:bar | classCount _ 0.\\\\n\\\\t\\\\tSmalltalk allClassesAndTraitsDo:\\\\n\\\\t\\\\t\\\\t[:classOrTrait | bar value: (classCount _ classCount + 1).\\\\n\\\\t\\\\t\\\\tclassOrTrait moveChangesWithVersionsTo: f.\\\\n\\\\t\\\\t\\\\tclassOrTrait putClassCommentToCondensedChangesFile: f.\\\\n\\\\t\\\\t\\\\tclassOrTrait classSide moveChangesWithVersionsTo: f]].\\\\n\\\\tSmalltalkImage current lastQuitLogPosition: f position.\\\\n\\\\tf trailer; close.\\\\n\\\\toldChanges _ SourceFiles at: 2.\\\\n\\\\toldChanges close.\\\\n\\\\tFileDirectory default \\\\n\\\\t\\\\tdeleteFileNamed: oldChanges name , '.old';\\\\n\\\\t\\\\trename: oldChanges name toBe: oldChanges name , '.old';\\\\n\\\\t\\\\trename: f name toBe: oldChanges name.\\\\n\\\\tself setMacFileInfoOn: oldChanges name.\\\\n\\\\tSourceFiles at: 2\\\\n\\\\t\\\\t\\\\tput: (FileStream oldFileNamed: oldChanges name)! !\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping' stamp: 'yo 2/24/2005 18:01'!\\\\nreformatChangesToUTF8\\\\n\\\\t\\\\\\\"Smalltalk reformatChangesToUTF8\\\\\\\"\\\\n\\\\n\\\\t| f oldChanges classCount |\\\\n\\\\tf _ FileStream fileNamed: 'ST80.temp'.\\\\n\\\\tf converter: (UTF8TextConverter new).\\\\n\\\\tf header; timeStamp.\\\\n'Condensing Changes File...'\\\\n\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\tfrom: 0 to: Smalltalk classNames size\\\\n\\\\tduring:\\\\n\\\\t\\\\t[:bar | classCount _ 0.\\\\n\\\\t\\\\tSmalltalk allClassesDo:\\\\n\\\\t\\\\t\\\\t[:class | bar value: (classCount _ classCount + 1).\\\\n\\\\t\\\\t\\\\tclass moveChangesTo: f.\\\\n\\\\t\\\\t\\\\tclass putClassCommentToCondensedChangesFile: f.\\\\n\\\\t\\\\t\\\\tclass class moveChangesTo: f]].\\\\n\\\\tSmalltalkImage current lastQuitLogPosition: f position.\\\\n\\\\tf trailer; close.\\\\n\\\\toldChanges _ SourceFiles at: 2.\\\\n\\\\toldChanges close.\\\\n\\\\tFileDirectory default \\\\n\\\\t\\\\tdeleteFileNamed: oldChanges name , '.old';\\\\n\\\\t\\\\trename: oldChanges name toBe: oldChanges name , '.old';\\\\n\\\\t\\\\trename: f name toBe: oldChanges name.\\\\n\\\\tself setMacFileInfoOn: oldChanges name.\\\\n\\\\tSourceFiles at: 2\\\\n\\\\t\\\\t\\\\tput: (FileStream oldFileNamed: oldChanges name).\\\\n\\\\tMultiByteFileStream codeConverterClass: UTF8TextConverter.\\\\n\\\\t(SourceFiles at: 2) converter: (UTF8TextConverter new).\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping' stamp: 'nk 6/2/2006 10:22'!\\\\nremoveAllLineFeeds\\\\n\\\\t\\\\\\\"Smalltalk removeAllLineFeeds\\\\\\\"\\\\n\\\\t\\\\\\\"Scan all methods for source code with lineFeeds.\\\\n\\\\tReplaces all occurrences of <CR><LF> or <LF> by <CR>.\\\\n\\\\tWhen done, offers to display an Inspector containing the message\\\\n\\\\tnames grouped by author initials.\\\\n\\\\tIn this dictionary, the key 'OK' contains the methods that had literals that contained <LF> characters.\\\\\\\"\\\\n\\\\t| n authors totalStripped totalOK |\\\\n\\\\t'Scanning sources for LineFeeds.\\\\nThis will take a few minutes...'\\\\n\\\\t\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\tfrom: 0\\\\n\\\\t\\\\tto: CompiledMethod instanceCount\\\\n\\\\t\\\\tduring: [:bar | \\\\n\\\\t\\\\t\\\\tn _ 0.\\\\n\\\\t\\\\t\\\\tauthors _ self\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tremoveAllLineFeedsQuietlyCalling: [:cls :sel | (n _ n + 1) \\\\\\\\\\\\\\\\ 100 = 0\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [bar value: n]]].\\\\n\\\\ttotalStripped _ authors\\\\n\\\\t\\\\t\\\\t\\\\tinject: 1\\\\n\\\\t\\\\t\\\\t\\\\tinto: [:sum :set | sum + set size].\\\\n\\\\ttotalOK _ (authors at: 'OK') size.\\\\n\\\\ttotalStripped _ totalStripped - totalOK.\\\\n\\\\tTranscript cr; show: totalStripped printString , ' methods stripped of LFs.'.\\\\n\\\\tTranscript cr; show: totalOK printString , ' methods still correctly contain LFs.'.\\\\n\\\\t(self confirm: 'Do you want to see the affected methods?')\\\\n\\\\t\\\\tifTrue: [authors inspect]! !\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping' stamp: 'nk 6/2/2006 08:35'!\\\\nremoveAllLineFeedsQuietly\\\\n\\\\t\\\\\\\"Smalltalk removeAllLineFeedsQuietly\\\\\\\"\\\\n\\\\t\\\\\\\"Scan all methods for source code with lineFeeds.\\\\n\\\\tReplaces all occurrences of <CR><LF> or <LF> by <CR>.\\\\n\\\\tAnswer a Dictionary keyed by author name containing sets of affected method names,\\\\n\\\\tas well as (at the key 'OK') a list of methods that still contain LF characters inside literal strings or characters.\\\\\\\"\\\\n\\\\t^self removeAllLineFeedsQuietlyCalling: [ :cls :sel | ].! !\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping' stamp: 'nk 6/2/2006 09:22'!\\\\nremoveAllLineFeedsQuietlyCalling: aBlock\\\\n\\\\t\\\\\\\"Smalltalk removeAllLineFeedsQuietly\\\\\\\"\\\\n\\\\t\\\\\\\"Scan all methods for source code with lineFeeds.\\\\n\\\\tReplaces all occurrences of <CR><LF> or <LF> by <CR>.\\\\n\\\\tAnswer a Dictionary keyed by author name containing sets of affected method names,\\\\n\\\\tas well as (at the key 'OK') a list of methods that still contain LF characters inside literal strings or characters.\\\\n\\\\tEvaluate aBlock for each method so that status can be updated.\\\\\\\"\\\\n\\\\t| oldCodeString newCodeString oldStamp oldCategory authors nameString |\\\\n\\\\tself forgetDoIts.\\\\n\\\\tauthors _ Dictionary new.\\\\n\\\\tauthors at: 'OK' put: Set new.\\\\n\\\\tself systemNavigation\\\\n\\\\t\\\\tallBehaviorsDo: [:cls | cls selectors\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:selector | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\taBlock value: cls value: selector.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\toldCodeString _ cls sourceCodeAt: selector.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(oldCodeString includes: Character lf)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnewCodeString _ oldCodeString withSqueakLineEndings.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnameString _ cls name , '>>' , selector.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t((cls compiledMethodAt: selector) hasLiteralSuchThat: [ :lit | lit asString includes: Character lf ])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [(authors at: 'OK')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tadd: nameString]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [oldStamp _ (Utilities\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttimeStampForMethod: (cls compiledMethodAt: selector))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcopy replaceAll: Character cr\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twith: Character space.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(authors\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tat: (oldStamp copyFrom: 1 to: (oldStamp findFirst: [ :c | c isAlphaNumeric not ]))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifAbsentPut: [Set new])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tadd: nameString.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\toldCategory _ cls whichCategoryIncludesSelector: selector.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcls\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcompile: newCodeString\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tclassified: oldCategory\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twithStamp: oldStamp\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnotifying: nil ]]]].\\\\n\\\\t^ authors! !\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping' stamp: 'sd 9/29/2004 18:15'!\\\\nremoveEmptyMessageCategories\\\\n\\\\t\\\\\\\"Smalltalk removeEmptyMessageCategories\\\\\\\"\\\\n\\\\tself garbageCollect.\\\\n\\\\t(ClassOrganizer allInstances copyWith: SystemOrganization)\\\\n\\\\t\\\\tdo: [:org | org removeEmptyCategories]! !\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping' stamp: 'nk 2/23/2005 18:00'!\\\\ntestFormatter\\\\n\\\\t\\\\\\\"Smalltalk testFormatter\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Reformats the source for every method in the system, and\\\\n\\\\tthen compiles that source and verifies that it generates\\\\n\\\\tidentical code. The formatting used will be either classic\\\\n\\\\tmonochrome or fancy polychrome, depending on the setting\\\\n\\\\tof the preference #colorWhenPrettyPrinting.\\\\\\\"\\\\n\\\\n\\\\t| newCodeString methodNode oldMethod newMethod badOnes n |\\\\n\\\\tbadOnes := OrderedCollection new.\\\\n\\\\tself forgetDoIts.\\\\n\\\\t'Formatting all classes...' \\\\n\\\\t\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\tfrom: 0\\\\n\\\\t\\\\tto: CompiledMethod instanceCount\\\\n\\\\t\\\\tduring: \\\\n\\\\t\\\\t\\\\t[:bar | \\\\n\\\\t\\\\t\\\\tn := 0.\\\\n\\\\t\\\\t\\\\tself systemNavigation allBehaviorsDo: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:cls | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Transcript cr; show: cls name.\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcls selectors do: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:selector | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(n := n + 1) \\\\\\\\\\\\\\\\ 100 = 0 ifTrue: [bar value: n].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnewCodeString := cls prettyPrinterClass \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tformat: (cls sourceCodeAt: selector)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tin: cls\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnotifying: nil\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdecorated: Preferences colorWhenPrettyPrinting.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmethodNode := cls compilerClass new \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcompile: newCodeString\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tin: cls\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnotifying: nil\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFail: [].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnewMethod := methodNode generate: #(0 0 0 0).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\toldMethod := cls compiledMethodAt: selector.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\toldMethod = newMethod \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[Transcript\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcr;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tshow: '***' , cls name , ' ' , selector.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbadOnes add: cls name , ' ' , selector]]]].\\\\n\\\\tself systemNavigation browseMessageList: badOnes asSortedCollection\\\\n\\\\t\\\\tname: 'Formatter Discrepancies'! !\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping' stamp: 'nk 2/23/2005 18:00'!\\\\ntestFormatter2\\\\n\\\\t\\\\\\\"Smalltalk testFormatter2\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Reformats the source for every method in the system, and\\\\n\\\\tthen verifies that the order of source tokens is unchanged.\\\\n\\\\tThe formatting used will be either classic monochrome or\\\\n\\\\tfancy polychrome, depending on the setting of the preference\\\\n\\\\t#colorWhenPrettyPrinting. \\\\\\\"\\\\n\\\\n\\\\t| newCodeString badOnes n oldCodeString oldTokens newTokens |\\\\n\\\\tbadOnes := OrderedCollection new.\\\\n\\\\tself forgetDoIts.\\\\n\\\\t'Formatting all classes...' \\\\n\\\\t\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\tfrom: 0\\\\n\\\\t\\\\tto: CompiledMethod instanceCount\\\\n\\\\t\\\\tduring: \\\\n\\\\t\\\\t\\\\t[:bar | \\\\n\\\\t\\\\t\\\\tn := 0.\\\\n\\\\t\\\\t\\\\tself systemNavigation allBehaviorsDo: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:cls | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Transcript cr; show: cls name.\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcls selectors do: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:selector | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(n := n + 1) \\\\\\\\\\\\\\\\ 100 = 0 ifTrue: [bar value: n].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\toldCodeString := (cls sourceCodeAt: selector) asString.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnewCodeString := cls prettyPrinterClass \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tformat: oldCodeString\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tin: cls\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnotifying: nil\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdecorated: Preferences colorWhenPrettyPrinting.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\toldTokens := oldCodeString findTokens: Character separators.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnewTokens := newCodeString findTokens: Character separators.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\toldTokens = newTokens \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[Transcript\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcr;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tshow: '***' , cls name , ' ' , selector.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbadOnes add: cls name , ' ' , selector]]]].\\\\n\\\\tself systemNavigation browseMessageList: badOnes asSortedCollection\\\\n\\\\t\\\\tname: 'Formatter Discrepancies'! !\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping' stamp: 'sd 4/17/2003 21:01'!\\\\nverifyChanges\\\\t\\\\t\\\\\\\"Smalltalk verifyChanges\\\\\\\"\\\\n\\\\t\\\\\\\"Recompile all methods in the changes file.\\\\\\\"\\\\n\\\\tself systemNavigation allBehaviorsDo: [:class | class recompileChanges].\\\\n! !\\\\n\\\\n\\\\n!SystemDictionary methodsFor: 'image, changes name' stamp: 'yo 3/29/2004 09:36'!\\\\nprimImageName\\\\n\\\\t\\\\\\\"Answer the full path name for the current image.\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk imageName\\\\\\\"\\\\n\\\\n\\\\t<primitive: 121>\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!SystemDictionary methodsFor: 'image, changes name' stamp: 'yo 3/29/2004 09:36'!\\\\nprimImageName: newName\\\\n\\\\t\\\\\\\"Set the the full path name for the current image.  All further snapshots will use this.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 121>\\\\n\\\\t^ self primitiveFailed! !\\\\n\\\\n!SystemDictionary methodsFor: 'image, changes name' stamp: 'yo 3/29/2004 09:36'!\\\\nprimVmPath\\\\n\\\\t\\\\\\\"Answer the path for the directory containing the Smalltalk virtual machine. Return the empty string if this primitive is not implemented.\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk vmPath\\\\\\\"\\\\n\\\\n\\\\t<primitive: 142>\\\\n\\\\t^ ''! !\\\\n\\\\n\\\\n!SystemDictionary methodsFor: 'memory space'!\\\\nbytesLeft\\\\n\\\\t\\\\\\\"Answer the number of bytes of space available. Does a full garbage collection.\\\\\\\"\\\\n\\\\n\\\\t^ self garbageCollect\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'ar 2/25/2001 18:00'!\\\\nbytesLeftString\\\\n\\\\t\\\\\\\"Return a string describing the amount of memory available\\\\\\\"\\\\n\\\\t| availInternal availPhysical availTotal |\\\\n\\\\tself garbageCollect.\\\\n\\\\tavailInternal _ self primBytesLeft.\\\\n\\\\tavailPhysical _ self bytesLeft: false.\\\\n\\\\tavailTotal _ self bytesLeft: true.\\\\n\\\\t(availTotal > (availInternal + 10000)) \\\\\\\"compensate for mini allocations inbetween\\\\\\\"\\\\n\\\\t\\\\tifFalse:[^availInternal asStringWithCommas, ' bytes available'].\\\\n\\\\t^String streamContents:[:s|\\\\n\\\\t\\\\ts nextPutAll: availInternal asStringWithCommas, \\\\t' bytes (internal) '; cr.\\\\n\\\\t\\\\ts nextPutAll: availPhysical asStringWithCommas,\\\\t' bytes (physical) '; cr.\\\\n\\\\t\\\\ts nextPutAll: availTotal asStringWithCommas, \\\\t' bytes (total)     '].! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'ar 2/25/2001 17:55'!\\\\nbytesLeft: aBool\\\\n\\\\t\\\\\\\"Return the amount of available space. If aBool is true, include possibly available swap space. If aBool is false, include possibly available physical memory. For a report on the largest free block currently availabe within Squeak memory but not counting extra memory use #primBytesLeft.\\\\\\\"\\\\n\\\\t<primitive: 112>\\\\n\\\\t^self primBytesLeft! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space'!\\\\ncreateStackOverflow\\\\n\\\\t\\\\\\\"For testing the low space handler...\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk installLowSpaceWatcher; createStackOverflow\\\\\\\"\\\\n\\\\n\\\\tself createStackOverflow.  \\\\\\\"infinite recursion\\\\\\\"! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'JMM 1/27/2005 13:23'!\\\\nforceTenure\\\\n\\\\t\\\\\\\"Primitive. Tell the GC logic to force a tenure on the next increment GC.\\\\\\\"\\\\n\\\\t<primitive: 'primitiveForceTenure'>\\\\n\\\\t^self primitiveFailed! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'ar 2/11/2001 02:36'!\\\\ngarbageCollect\\\\n\\\\t\\\\\\\"Primitive. Reclaims all garbage and answers the number of bytes of available space.\\\\\\\"\\\\n\\\\tObject flushDependents.\\\\n\\\\tObject flushEvents.\\\\n\\\\t^self primitiveGarbageCollect! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space'!\\\\ngarbageCollectMost\\\\n\\\\t\\\\\\\"Primitive. Reclaims recently created garbage (which is usually most of it) fairly quickly and answers the number of bytes of available space.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 131>\\\\n\\\\t^ self primBytesLeft! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space'!\\\\ninstallLowSpaceWatcher\\\\n\\\\t\\\\\\\"Start a process to watch for low-space conditions.\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk installLowSpaceWatcher\\\\\\\"\\\\n\\\\n\\\\tself primSignalAtBytesLeft: 0.  \\\\\\\"disable low-space interrupts\\\\\\\"\\\\n\\\\tLowSpaceProcess == nil ifFalse: [LowSpaceProcess terminate].\\\\n\\\\tLowSpaceProcess _ [self lowSpaceWatcher] newProcess.\\\\n\\\\tLowSpaceProcess priority: Processor lowIOPriority.\\\\n\\\\tLowSpaceProcess resume.\\\\n\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'ar 1/18/2005 16:46'!\\\\nisRoot: oop\\\\n\\\\t\\\\\\\"Primitive. Answer whether the object is currently a root for youngSpace.\\\\\\\"\\\\n\\\\t<primitive: 'primitiveIsRoot'>\\\\n\\\\t^self primitiveFailed! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'ar 1/18/2005 16:47'!\\\\nisYoung: oop\\\\n\\\\t\\\\\\\"Primitive. Answer whether the object currently resides in youngSpace.\\\\\\\"\\\\n\\\\t<primitive: 'primitiveIsYoung'>\\\\n\\\\t^self primitiveFailed! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'di 8/18/2000 16:49'!\\\\nlowSpaceThreshold \\\\n\\\\t\\\\\\\"Return the low space threshold. When the amount of free memory (after garbage collection) falls below this limit, the system is in serious danger of completely exhausting memory and crashing. This limit should be made high enough to allow the user open a debugger to diagnose a problem or to save the image.\\\\\\\"\\\\n\\\\n\\\\tthisContext isPseudoContext\\\\n\\\\t\\\\tifTrue: [^ 400000  \\\\\\\"Enough for JIT compiler\\\\\\\"]\\\\n\\\\t\\\\tifFalse: [^ 200000  \\\\\\\"Enough for interpreter\\\\\\\"]! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'dtl 10/3/2005 06:12'!\\\\nlowSpaceWatcher\\\\n\\\\t\\\\\\\"Wait until the low space semaphore is signalled, then take appropriate actions.\\\\\\\"\\\\n\\\\n\\\\t| free preemptedProcess |\\\\n\\\\tself garbageCollectMost <= self lowSpaceThreshold\\\\n\\\\t\\\\tifTrue: [self garbageCollect <= self lowSpaceThreshold\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"free space must be above threshold before\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstarting low space watcher\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ Beeper beep]].\\\\n\\\\n\\\\tSmalltalk specialObjectsArray at: 23 put: nil.  \\\\\\\"process causing low space will be saved here\\\\\\\"\\\\n\\\\tLowSpaceSemaphore _ Semaphore new.\\\\n\\\\tself primLowSpaceSemaphore: LowSpaceSemaphore.\\\\n\\\\tself primSignalAtBytesLeft: self lowSpaceThreshold.  \\\\\\\"enable low space interrupts\\\\\\\"\\\\n\\\\n\\\\tLowSpaceSemaphore wait.  \\\\\\\"wait for a low space condition...\\\\\\\"\\\\n\\\\n\\\\tself primSignalAtBytesLeft: 0.  \\\\\\\"disable low space interrupts\\\\\\\"\\\\n\\\\tself primLowSpaceSemaphore: nil.\\\\n\\\\tLowSpaceProcess _ nil.\\\\n\\\\n\\\\t\\\\\\\"The process that was active at the time of the low space interrupt.\\\\\\\"\\\\n\\\\tpreemptedProcess _ Smalltalk specialObjectsArray at: 23.\\\\n\\\\tSmalltalk specialObjectsArray at: 23 put: nil.\\\\n\\\\n\\\\t\\\\\\\"Note: user now unprotected until the low space watcher is re-installed\\\\\\\"\\\\n\\\\n\\\\tself memoryHogs isEmpty\\\\n\\\\t\\\\tifFalse: [free := self bytesLeft.\\\\n\\\\t\\\\t\\\\tself memoryHogs\\\\n\\\\t\\\\t\\\\t\\\\tdo: [ :hog | hog freeSomeSpace ].\\\\n\\\\t\\\\t\\\\tself bytesLeft > free\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [ ^ self installLowSpaceWatcher ]].\\\\n\\\\tself isMorphic\\\\n\\\\t\\\\tifTrue: [CurrentProjectRefactoring\\\\n\\\\t\\\\t\\\\t\\\\tcurrentInterruptName: 'Space is low'\\\\n\\\\t\\\\t\\\\t\\\\tpreemptedProcess: preemptedProcess]\\\\n\\\\t\\\\tifFalse: [ScheduledControllers\\\\n\\\\t\\\\t\\\\t\\\\tinterruptName: 'Space is low'\\\\n\\\\t\\\\t\\\\t\\\\tpreemptedProcess: preemptedProcess]\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'nk 10/28/2000 20:37'!\\\\nlowSpaceWatcherProcess\\\\n\\\\t^LowSpaceProcess! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'sma 4/22/2000 19:03'!\\\\nmemoryHogs\\\\n\\\\t\\\\\\\"Answer the list of objects to notify with #freeSomeSpace if memory gets full.\\\\\\\"\\\\n\\\\n\\\\t^ MemoryHogs ifNil: [MemoryHogs _ OrderedCollection new]! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space'!\\\\nokayToProceedEvenIfSpaceIsLow\\\\n\\\\t\\\\\\\"Return true if either there is enough memory to do so safely or if the user gives permission after being given fair warning.\\\\\\\"\\\\n\\\\n\\\\tself garbageCollectMost > self lowSpaceThreshold ifTrue: [^ true].  \\\\\\\"quick\\\\\\\"\\\\n\\\\tself garbageCollect > self lowSpaceThreshold ifTrue: [^ true].  \\\\\\\"work harder\\\\\\\"\\\\n\\\\n\\\\t^ self confirm:\\\\n'WARNING: There is not enough space to start the low space watcher.\\\\nIf you proceed, you will not be warned again, and the system may\\\\nrun out of memory and crash. If you do proceed, you can start the\\\\nlow space notifier when more space becomes available simply by\\\\nopening and then closing a debugger (e.g., by hitting Cmd-period.)\\\\nDo you want to proceed?'\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space'!\\\\nprimBytesLeft\\\\n\\\\t\\\\\\\"Primitive. Answer the number of bytes available for new object data.\\\\n\\\\tNot accurate unless preceded by\\\\n\\\\t\\\\tSmalltalk garbageCollectMost (for reasonable accuracy), or\\\\n\\\\t\\\\tSmalltalk garbageCollect (for real accuracy).\\\\n\\\\tSee Object documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 112>\\\\n\\\\t^ 0! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'ar 2/11/2001 02:16'!\\\\nprimitiveGarbageCollect\\\\n\\\\t\\\\\\\"Primitive. Reclaims all garbage and answers the number of bytes of available space.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 130>\\\\n\\\\t^ self primBytesLeft! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space'!\\\\nprimLowSpaceSemaphore: aSemaphore\\\\n\\\\t\\\\\\\"Primitive. Register the given Semaphore to be signalled when the\\\\n\\\\tnumber of free bytes drops below some threshold. Disable low-space\\\\n\\\\tinterrupts if the argument is nil.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 124>\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space'!\\\\nprimSignalAtBytesLeft: numBytes\\\\n\\\\t\\\\\\\"Tell the interpreter the low-space threshold in bytes. When the free\\\\n\\\\tspace falls below this threshold, the interpreter will signal the low-space\\\\n\\\\tsemaphore, if one has been registered.  Disable low-space interrupts if the\\\\n\\\\targument is zero.  Fail if numBytes is not an Integer.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 125>\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'ar 1/18/2005 16:48'!\\\\nrootTable\\\\n\\\\t\\\\\\\"Primitive. Answer a snapshot of the VMs root table. \\\\n\\\\tKeep in mind that the primitive may itself cause GC.\\\\\\\"\\\\n\\\\t<primitive: 'primitiveRootTable'>\\\\n\\\\t^self primitiveFailed! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'ar 1/18/2005 16:49'!\\\\nrootTableAt: index\\\\n\\\\t\\\\\\\"Primitive. Answer the nth element of the VMs root table\\\\\\\"\\\\n\\\\t<primitive: 'primitiveRootTableAt'>\\\\n\\\\t^nil! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'JMM 1/27/2005 12:27'!\\\\nsetGCBiasToGrowGCLimit: aNumber\\\\n\\\\t\\\\\\\"Primitive. Indicate that the bias to grow logic should do a GC after aNumber Bytes\\\\\\\"\\\\n\\\\t<primitive: 'primitiveSetGCBiasToGrowGCLimit'>\\\\n\\\\t^self primitiveFailed\\\\n\\\\\\\"Example:\\\\n\\\\tSmalltalk setGCBiasToGrowGCLimit: 16*1024*1024.\\\\n\\\\\\\"! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'JMM 1/27/2005 13:12'!\\\\nsetGCBiasToGrow: aNumber\\\\n\\\\t\\\\\\\"Primitive. Indicate that the GC logic should be bias to grow\\\\\\\"\\\\n\\\\t<primitive: 'primitiveSetGCBiasToGrow'>\\\\n\\\\t^self primitiveFailed\\\\n\\\\\\\"Example:\\\\n\\\\tSmalltalk setGCBiasToGrowGCLimit: 16*1024*1024.\\\\n\\\\tSmalltalk setGCBiasToGrow: 1.\\\\n\\\\\\\"! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'ar 1/18/2005 16:54'!\\\\nsetGCSemaphore: semaIndex\\\\n\\\\t\\\\\\\"Primitive. Indicate the GC semaphore index to be signaled on GC occurance.\\\\\\\"\\\\n\\\\t<primitive: 'primitiveSetGCSemaphore'>\\\\n\\\\t^self primitiveFailed\\\\n\\\\\\\"Example:\\\\n\\\\n\\\\t| index sema process |\\\\n\\\\tsema := Semaphore new.\\\\n\\\\tindex := Smalltalk registerExternalObject: sema.\\\\n\\\\tSmalltalk setGCSemaphore: index.\\\\n\\\\tprocess := [\\\\n\\\\t\\\\t[[true] whileTrue:[\\\\n\\\\t\\\\t\\\\tsema wait.\\\\n\\\\t\\\\t\\\\tSmalltalk beep.\\\\n\\\\t\\\\t]] ensure:[\\\\n\\\\t\\\\t\\\\tSmalltalk setGCSemaphore: 0.\\\\n\\\\t\\\\t\\\\tSmalltalk unregisterExternalObject: sema.\\\\n\\\\t\\\\t].\\\\n\\\\t] fork.\\\\n\\\\tprocess inspect.\\\\n\\\\\\\"! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space'!\\\\nsignalLowSpace\\\\n\\\\t\\\\\\\"Signal the low-space semaphore to alert the user that space is running low.\\\\\\\"\\\\n\\\\n\\\\tLowSpaceSemaphore signal.! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'apb 10/3/2000 16:40'!\\\\nuseUpMemory\\\\n\\\\t\\\\\\\"For testing the low space handler...\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk installLowSpaceWatcher; useUpMemory\\\\\\\"\\\\n\\\\n\\\\t| lst |\\\\n\\\\tlst _ nil.\\\\n\\\\t[true] whileTrue: [\\\\n\\\\t\\\\tlst _ Link nextLink: lst.\\\\n\\\\t].! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'di 8/18/2000 21:15'!\\\\nuseUpMemoryWithArrays \\\\n\\\\t\\\\\\\"For testing the low space handler...\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk installLowSpaceWatcher; useUpMemoryWithArrays\\\\\\\"\\\\n\\\\n\\\\t| b |  \\\\\\\"First use up most of memory.\\\\\\\"\\\\n\\\\tb _ String new: self bytesLeft - self lowSpaceThreshold - 100000.\\\\n\\\\tb _ b.  \\\\\\\"Avoid unused value warning\\\\\\\"\\\\n\\\\t(1 to: 10000) collect: [:i | Array new: 10000]! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'di 8/18/2000 16:49'!\\\\nuseUpMemoryWithContexts \\\\n\\\\t\\\\\\\"For testing the low space handler...\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk installLowSpaceWatcher; useUpMemoryWithContexts\\\\\\\"\\\\n\\\\n\\\\tself useUpMemoryWithContexts! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'di 8/18/2000 16:50'!\\\\nuseUpMemoryWithTinyObjects \\\\n\\\\t\\\\\\\"For testing the low space handler...\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk installLowSpaceWatcher; useUpMemoryWithTinyObjects\\\\\\\"\\\\n\\\\n\\\\t| b |  \\\\\\\"First use up most of memory.\\\\\\\"\\\\n\\\\tb _ String new: self bytesLeft - self lowSpaceThreshold - 100000.\\\\n\\\\tb _ b.  \\\\\\\"Avoid unused value warning\\\\\\\"\\\\n\\\\t(1 to: 10000) collect: [:i | BitBlt new]! !\\\\n\\\\n\\\\n!SystemDictionary methodsFor: 'miscellaneous'!\\\\nexitToDebugger\\\\n\\\\t\\\\\\\"Primitive. Enter the machine language debugger, if one exists. Essential.\\\\n\\\\tSee Object documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 114>\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!SystemDictionary methodsFor: 'miscellaneous' stamp: 'dao 10/1/2004 13:33'!\\\\nhandleUserInterrupt\\\\n\\\\tPreferences cmdDotEnabled ifTrue:\\\\n\\\\t\\\\t[Smalltalk isMorphic\\\\n\\\\t\\\\t\\\\tifTrue: [[Project interruptName: 'User Interrupt'] fork]\\\\n\\\\t\\\\t\\\\tifFalse: [[ScheduledControllers interruptName: 'User Interrupt'] fork]]! !\\\\n\\\\n!SystemDictionary methodsFor: 'miscellaneous' stamp: 'sd 9/29/2004 18:17'!\\\\nhasMorphic\\\\n\\\\t\\\\\\\"Answer whether the Morphic classes are available in the\\\\n\\\\tsystem (they may have been stripped, such as by a call to\\\\n\\\\tSmalltalk removeMorphic\\\\\\\"\\\\n\\\\t^ (self\\\\n\\\\t\\\\tat: #Morph\\\\n\\\\t\\\\tifAbsent: [])\\\\n\\\\t\\\\tisKindOf: Class! !\\\\n\\\\n!SystemDictionary methodsFor: 'miscellaneous' stamp: 'tk 10/16/2001 19:24'!\\\\nlogError: errMsg inContext: aContext to: aFilename\\\\n\\\\t\\\\\\\"Log the error message and a stack trace to the given file.\\\\\\\"\\\\n\\\\n\\\\t| ff |\\\\n\\\\tFileDirectory default deleteFileNamed: aFilename ifAbsent: [].\\\\n\\\\t(ff _ FileStream fileNamed: aFilename) ifNil: [^ self \\\\\\\"avoid recursive errors\\\\\\\"].\\\\n\\\\n  \\\\tff nextPutAll: errMsg; cr.\\\\n\\\\taContext errorReportOn: ff.\\\\n\\\\tff close.! !\\\\n\\\\n!SystemDictionary methodsFor: 'miscellaneous' stamp: 'yo 7/2/2004 13:32'!\\\\nm17nVersion\\\\n\\\\n\\\\t^ 'M17n 5.0' copy\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'miscellaneous' stamp: 'yo 7/2/2004 13:32'!\\\\nnihongoVersion\\\\n\\\\n\\\\t^ 'Nihongo7.0' copy\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'miscellaneous' stamp: 'MPH 10/24/2000 14:27'!\\\\nsetMacFileInfoOn: aString\\\\n\\\\t\\\\\\\"On Mac, set the file type and creator (noop on other platforms)\\\\\\\"\\\\n\\\\tFileDirectory default\\\\n\\\\t\\\\tsetMacFileNamed: aString\\\\n\\\\t\\\\ttype: 'STch'\\\\n\\\\t\\\\tcreator: 'FAST'.! !\\\\n\\\\n!SystemDictionary methodsFor: 'miscellaneous' stamp: 'nb 6/17/2003 12:25'!\\\\nverifyMorphicAvailability\\\\n\\\\t\\\\\\\"If Morphic is available, return true; if not, put up an informer and return false\\\\\\\"\\\\n\\\\tself hasMorphic ifFalse:\\\\n\\\\t\\\\t[Beeper beep.\\\\n\\\\t\\\\tself inform: 'Sorry, Morphic must\\\\nbe present to use this feature'.\\\\n\\\\t\\\\t^ false].\\\\n\\\\t^ true! !\\\\n\\\\n\\\\n!SystemDictionary methodsFor: 'objects from disk' stamp: 'tk 9/28/2000 15:50'!\\\\nobjectForDataStream: refStrm\\\\n\\\\t| dp |\\\\n\\\\t\\\\\\\"I am about to be written on an object file.  Write a reference to Smalltalk instead.\\\\\\\"\\\\n\\\\n\\\\tdp _ DiskProxy global: #Smalltalk selector: #yourself\\\\n\\\\t\\\\t\\\\targs: #().\\\\n\\\\trefStrm replace: self with: dp.\\\\n\\\\t^ dp! !\\\\n\\\\n!SystemDictionary methodsFor: 'objects from disk' stamp: 'tk 3/7/2000 18:40'!\\\\nstoreDataOn: aDataStream\\\\n\\\\t\\\\\\\"I don't get stored.  Use a DiskProxy\\\\\\\"\\\\n\\\\n\\\\tself error: 'use a DiskProxy to store me'! !\\\\n\\\\n\\\\n!SystemDictionary methodsFor: 'printing' stamp: 'sma 6/1/2000 09:53'!\\\\nprintElementsOn: aStream\\\\n\\\\taStream nextPutAll:'(lots of globals)'! !\\\\n\\\\n\\\\n!SystemDictionary methodsFor: 'retrieving' stamp: 'sd 4/17/2003 21:15'!\\\\nallClasses  \\\\n\\\\t\\\\\\\"Return all the class defines in the Smalltalk SystemDictionary\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk allClasses\\\\\\\"\\\\n\\\\n\\\\t^ self classNames collect: [:name | self at: name]! !\\\\n\\\\n!SystemDictionary methodsFor: 'retrieving' stamp: 'sd 4/17/2003 21:18'!\\\\nallClassesDo: aBlock\\\\n\\\\t\\\\\\\"Evaluate the argument, aBlock, for each class in the system.\\\\\\\"\\\\n\\\\n\\\\t(self classNames collect: [:name | self at: name]) do: aBlock! !\\\\n\\\\n!SystemDictionary methodsFor: 'retrieving' stamp: 'al 2/23/2006 21:39'!\\\\nallTraits\\\\n\\\\t\\\\\\\"Return all traits defined in the Smalltalk SystemDictionary\\\\\\\"\\\\n\\\\n\\\\t^ self traitNames collect: [:each | self at: each]! !\\\\n\\\\n!SystemDictionary methodsFor: 'retrieving' stamp: 'sd 9/29/2004 18:17'!\\\\npoolUsers\\\\n\\\\t\\\\\\\"Answer a dictionary of pool name -> classes that refer to it.\\\\n\\\\tAlso includes any globally know dictionaries (such as\\\\n\\\\tSmalltalk, Undeclared etc) which although not strictly\\\\n\\\\taccurate is potentially useful information\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk poolUsers\\\\\\\"\\\\n\\\\t| poolUsers pool refs |\\\\n\\\\tpoolUsers := Dictionary new.\\\\n\\\\tself keys\\\\n\\\\t\\\\tdo: [:k | \\\\\\\"yes, using isKindOf: is tacky but for reflective code like\\\\n\\\\t\\\\t\\\\tthis it is very useful. If you really object you can:-\\\\n\\\\t\\\\t\\\\ta) go boil your head.\\\\n\\\\t\\\\t\\\\tb) provide a better answer.\\\\n\\\\t\\\\t\\\\tyour choice.\\\\\\\"\\\\n\\\\t\\\\t\\\\t(((pool := self at: k) isKindOf: Dictionary)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tor: [pool isKindOf: SharedPool class])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [refs := self systemNavigation allClasses\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tselect: [:c | c sharedPools identityIncludes: pool]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tthenCollect: [:c | c name].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\trefs\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tadd: (self systemNavigation\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tallCallsOn: (self associationAt: k)).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpoolUsers at: k put: refs]].\\\\n\\\\t^ poolUsers! !\\\\n\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'sd 9/29/2004 18:18'!\\\\nabandonSources\\\\n\\\\t\\\\\\\"Smalltalk abandonSources\\\\\\\"\\\\n\\\\t\\\\\\\"Replaces every method by a copy with the 4-byte source\\\\n\\\\tpointer \\\\n\\\\treplaced by a string of all arg and temp names, followed by its\\\\n\\\\tlength. These names can then be used to inform the\\\\n\\\\tdecompiler. See stats below\\\\\\\"\\\\n\\\\t\\\\\\\"wod 11/3/1998: zap the organization before rather than after\\\\n\\\\tcondensing changes.\\\\\\\"\\\\n\\\\t| oldCodeString argsAndTemps oldMethods newMethods m bTotal bCount |\\\\n\\\\t(self confirm: 'This method will preserve most temp names\\\\n(up to about 400 characters) while allowing\\\\nthe sources file to be discarded.\\\\n-- CAUTION --\\\\nIf you have backed up your system and\\\\nare prepared to face the consequences of\\\\nabandoning source code files, choose Yes.\\\\nIf you have any doubts, you may choose No\\\\nto back out with no harm done.')\\\\n\\\\t\\\\t\\\\t== true\\\\n\\\\t\\\\tifFalse: [^ self inform: 'Okay - no harm done'].\\\\n\\\\tself forgetDoIts.\\\\n\\\\toldMethods := OrderedCollection new: CompiledMethod instanceCount.\\\\n\\\\tnewMethods := OrderedCollection new: CompiledMethod instanceCount.\\\\n\\\\tbTotal := 0.\\\\n\\\\tbCount := 0.\\\\n\\\\tself systemNavigation\\\\n\\\\t\\\\tallBehaviorsDo: [:b | bTotal := bTotal + 1].\\\\n\\\\t'Saving temp names for better decompilation...'\\\\n\\\\t\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\tfrom: 0\\\\n\\\\t\\\\tto: bTotal\\\\n\\\\t\\\\tduring: [:bar | self systemNavigation\\\\n\\\\t\\\\t\\\\t\\\\tallBehaviorsDo: [:cl | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"for test: (Array with: Arc with: Arc class) do:\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbar value: (bCount := bCount + 1).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcl selectors\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:selector | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tm := cl compiledMethodAt: selector.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tm fileIndex > 0\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [oldCodeString := cl sourceCodeAt: selector.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\targsAndTemps := (cl compilerClass new\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tparse: oldCodeString\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tin: cl\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnotifying: nil) tempNames.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\toldMethods addLast: m.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnewMethods\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taddLast: (m copyWithTempNames: argsAndTemps)]]]].\\\\n\\\\toldMethods asArray elementsExchangeIdentityWith: newMethods asArray.\\\\n\\\\tself systemNavigation\\\\n\\\\t\\\\tallBehaviorsDo: [:b | b zapOrganization].\\\\n\\\\tself condenseChanges.\\\\n\\\\tPreferences disable: #warnIfNoSourcesFile! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'sd 9/29/2004 18:18'!\\\\nabandonTempNames\\\\n\\\\t\\\\\\\"Replaces every method by a copy with no source pointer or\\\\n\\\\tencoded temp names.\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk abandonTempNames\\\\\\\"\\\\n\\\\t| continue oldMethods newMethods n m |\\\\n\\\\tcontinue := self confirm: '-- CAUTION --\\\\nIf you have backed up your system and\\\\nare prepared to face the consequences of\\\\nabandoning all source code, hit Yes.\\\\nIf you have any doubts, hit No,\\\\nto back out with no harm done.'.\\\\n\\\\tcontinue\\\\n\\\\t\\\\tifFalse: [^ self inform: 'Okay - no harm done'].\\\\n\\\\tself forgetDoIts; garbageCollect.\\\\n\\\\toldMethods := OrderedCollection new.\\\\n\\\\tnewMethods := OrderedCollection new.\\\\n\\\\tn := 0.\\\\n\\\\t'Removing temp names to save space...'\\\\n\\\\t\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\tfrom: 0\\\\n\\\\t\\\\tto: CompiledMethod instanceCount\\\\n\\\\t\\\\tduring: [:bar | self systemNavigation\\\\n\\\\t\\\\t\\\\t\\\\tallBehaviorsDo: [:cl | cl selectors\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:sel | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbar value: (n := n + 1).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tm := cl compiledMethodAt: sel.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\toldMethods addLast: m.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnewMethods\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taddLast: (m copyWithTrailerBytes: #(0 ))]]].\\\\n\\\\toldMethods asArray elementsExchangeIdentityWith: newMethods asArray.\\\\n\\\\tSmalltalkImage current closeSourceFiles.\\\\n\\\\tself flag: #shouldUseAEnsureBlockToBeSureThatTheFileIsClosed.\\\\n\\\\t\\\\\\\"sd: 17 April 2003\\\\\\\"\\\\n\\\\tPreferences disable: #warnIfNoChangesFile.\\\\n\\\\tPreferences disable: #warnIfNoSourcesFile! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'di 3/3/2001 08:31'!\\\\ncleanUpUndoCommands\\\\n\\\\t\\\\\\\"Smalltalk cleanUpUndoCommands\\\\\\\"  \\\\\\\"<== print this to get classes involved\\\\\\\"\\\\n\\\\n\\\\t| classes i p |\\\\n\\\\tclasses _ Bag new.\\\\n\\\\t'Ferreting out obsolete undo commands'\\\\n\\\\t\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\tfrom: 0 to: Morph withAllSubclasses size\\\\n\\\\t\\\\tduring:\\\\n\\\\t[:bar | i _ 0.\\\\n\\\\tMorph withAllSubclassesDo:\\\\n\\\\t\\\\t[:c | bar value: (i _ i+1).\\\\n\\\\t\\\\tc allInstancesDo:\\\\n\\\\t\\\\t\\\\t[:m | (p _ m otherProperties) ifNotNil:\\\\n\\\\t\\\\t\\\\t\\\\t[p keys do:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:k | (p at: k) class == Command ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[classes add: c name.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tm removeProperty: k]]]]]].\\\\n\\\\t^ classes! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'sd 9/29/2004 18:40'!\\\\ncomputeImageSegmentation\\\\n\\\\t\\\\\\\"Smalltalk computeImageSegmentation\\\\\\\"\\\\n\\\\t\\\\\\\"Here's how the segmentation works:\\\\n\\\\tFor each partition, we collect the classes involved, and also all\\\\n\\\\tmessages no longer used in the absence of this partition. We\\\\n\\\\tstart by computing a 'Miscellaneous' segment of all the\\\\n\\\\tunused classes in the system as is.\\\\\\\"\\\\n\\\\t| partitions unusedCandM newClasses expandedCandM |\\\\n\\\\tpartitions := Dictionary new.\\\\n\\\\tunusedCandM := self unusedClassesAndMethodsWithout: {{}. {}}.\\\\n\\\\tpartitions at: 'Miscellaneous' put: unusedCandM.\\\\n\\\\tnewClasses := Array\\\\n\\\\t\\\\t\\\\t\\\\tstreamContents: [:s | (SystemOrganization categoriesMatching: 'VMConstruction-*')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:cat | (SystemOrganization superclassOrder: cat)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:c | s nextPut: c name]]].\\\\n\\\\texpandedCandM := self unusedClassesAndMethodsWithout: {unusedCandM first asArray , newClasses. unusedCandM second}.\\\\n\\\\tpartitions at: 'VMConstruction' put: {(expandedCandM first copyWithoutAll: unusedCandM first) addAll: newClasses;\\\\n\\\\t\\\\t\\\\t yourself. expandedCandM second copyWithoutAll: unusedCandM second}.\\\\n\\\\tunusedCandM := expandedCandM.\\\\n\\\\tnewClasses := Array\\\\n\\\\t\\\\t\\\\t\\\\tstreamContents: [:s | (SystemOrganization categoriesMatching: 'ST80-*')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:cat | (SystemOrganization superclassOrder: cat)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:c | s nextPut: c name]]].\\\\n\\\\texpandedCandM := self unusedClassesAndMethodsWithout: {unusedCandM first asArray , newClasses. unusedCandM second}.\\\\n\\\\tpartitions at: 'ST80' put: {(expandedCandM first copyWithoutAll: unusedCandM first) addAll: newClasses;\\\\n\\\\t\\\\t\\\\t yourself. expandedCandM second copyWithoutAll: unusedCandM second}.\\\\n\\\\tunusedCandM := expandedCandM.\\\\n\\\\tnewClasses := Array\\\\n\\\\t\\\\t\\\\t\\\\tstreamContents: [:s | (SystemOrganization categoriesMatching: 'Morphic-Games')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:cat | (SystemOrganization superclassOrder: cat)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:c | s nextPut: c name]]].\\\\n\\\\texpandedCandM := self unusedClassesAndMethodsWithout: {unusedCandM first asArray , newClasses. unusedCandM second}.\\\\n\\\\tpartitions at: 'Games' put: {(expandedCandM first copyWithoutAll: unusedCandM first) addAll: newClasses;\\\\n\\\\t\\\\t\\\\t yourself. expandedCandM second copyWithoutAll: unusedCandM second}.\\\\n\\\\tunusedCandM := expandedCandM.\\\\n\\\\tnewClasses := Array\\\\n\\\\t\\\\t\\\\t\\\\tstreamContents: [:s | (SystemOrganization categoriesMatching: 'Morphic-Remote')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:cat | (SystemOrganization superclassOrder: cat)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:c | s nextPut: c name]]].\\\\n\\\\texpandedCandM := self unusedClassesAndMethodsWithout: {unusedCandM first asArray , newClasses. unusedCandM second}.\\\\n\\\\tpartitions at: 'Nebraska' put: {(expandedCandM first copyWithoutAll: unusedCandM first) addAll: newClasses;\\\\n\\\\t\\\\t\\\\t yourself. expandedCandM second copyWithoutAll: unusedCandM second}.\\\\n\\\\tunusedCandM := expandedCandM.\\\\n\\\\tnewClasses := Array\\\\n\\\\t\\\\t\\\\t\\\\tstreamContents: [:s | ((SystemOrganization categoriesMatching: 'Network-*')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcopyWithoutAll: #('Network-Kernel' 'Network-Url' 'Network-Protocols' 'Network-ObjectSocket' ))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:cat | (SystemOrganization superclassOrder: cat)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:c | s nextPut: c name]]].\\\\n\\\\texpandedCandM := Smalltalk unusedClassesAndMethodsWithout: {unusedCandM first asArray , newClasses. unusedCandM second}.\\\\n\\\\tpartitions at: 'Network' put: {(expandedCandM first copyWithoutAll: unusedCandM first) addAll: newClasses;\\\\n\\\\t\\\\t\\\\t yourself. expandedCandM second copyWithoutAll: unusedCandM second}.\\\\n\\\\tunusedCandM := expandedCandM.\\\\n\\\\tnewClasses := Array\\\\n\\\\t\\\\t\\\\t\\\\tstreamContents: [:s | (SystemOrganization categoriesMatching: 'Balloon3D-*')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:cat | (SystemOrganization superclassOrder: cat)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:c | s nextPut: c name]]].\\\\n\\\\texpandedCandM := self unusedClassesAndMethodsWithout: {unusedCandM first asArray , newClasses. unusedCandM second}.\\\\n\\\\tpartitions at: 'Balloon3D' put: {(expandedCandM first copyWithoutAll: unusedCandM first) addAll: newClasses;\\\\n\\\\t\\\\t\\\\t yourself. expandedCandM second copyWithoutAll: unusedCandM second}.\\\\n\\\\tunusedCandM := expandedCandM.\\\\n\\\\tnewClasses := Array\\\\n\\\\t\\\\t\\\\t\\\\tstreamContents: [:s | (SystemOrganization categoriesMatching: 'FFI-*')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:cat | (SystemOrganization superclassOrder: cat)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:c | s nextPut: c name]]].\\\\n\\\\texpandedCandM := self unusedClassesAndMethodsWithout: {unusedCandM first asArray , newClasses. unusedCandM second}.\\\\n\\\\tpartitions at: 'FFI' put: {(expandedCandM first copyWithoutAll: unusedCandM first) addAll: newClasses;\\\\n\\\\t\\\\t\\\\t yourself. expandedCandM second copyWithoutAll: unusedCandM second}.\\\\n\\\\tunusedCandM := expandedCandM.\\\\n\\\\tnewClasses := Array\\\\n\\\\t\\\\t\\\\t\\\\tstreamContents: [:s | (SystemOrganization categoriesMatching: 'Genie-*')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:cat | (SystemOrganization superclassOrder: cat)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:c | s nextPut: c name]]].\\\\n\\\\texpandedCandM := self unusedClassesAndMethodsWithout: {unusedCandM first asArray , newClasses. unusedCandM second}.\\\\n\\\\tpartitions at: 'Genie' put: {(expandedCandM first copyWithoutAll: unusedCandM first) addAll: newClasses;\\\\n\\\\t\\\\t\\\\t yourself. expandedCandM second copyWithoutAll: unusedCandM second}.\\\\n\\\\tunusedCandM := expandedCandM.\\\\n\\\\tnewClasses := Array\\\\n\\\\t\\\\t\\\\t\\\\tstreamContents: [:s | (SystemOrganization categoriesMatching: 'Speech-*')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:cat | (SystemOrganization superclassOrder: cat)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:c | s nextPut: c name]]].\\\\n\\\\texpandedCandM := self unusedClassesAndMethodsWithout: {unusedCandM first asArray , newClasses. unusedCandM second}.\\\\n\\\\tpartitions at: 'Speech' put: {(expandedCandM first copyWithoutAll: unusedCandM first) addAll: newClasses;\\\\n\\\\t\\\\t\\\\t yourself. expandedCandM second copyWithoutAll: unusedCandM second}.\\\\n\\\\tunusedCandM := expandedCandM.\\\\n\\\\tnewClasses := Array\\\\n\\\\t\\\\t\\\\t\\\\tstreamContents: [:s | #('Morphic-Components' )\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:cat | (SystemOrganization superclassOrder: cat)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:c | s nextPut: c name]]].\\\\n\\\\tnewClasses := newClasses copyWithoutAll: #(#ComponentLikeModel ).\\\\n\\\\texpandedCandM := Smalltalk unusedClassesAndMethodsWithout: {unusedCandM first asArray , newClasses. unusedCandM second}.\\\\n\\\\tpartitions at: 'Components' put: {(expandedCandM first copyWithoutAll: unusedCandM first) addAll: newClasses;\\\\n\\\\t\\\\t\\\\t yourself. expandedCandM second copyWithoutAll: unusedCandM second}.\\\\n\\\\tunusedCandM := expandedCandM.\\\\n\\\\tnewClasses := Array\\\\n\\\\t\\\\t\\\\t\\\\tstreamContents: [:s | #('Sound-Scores' 'Sound-Interface' )\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:cat | (SystemOrganization superclassOrder: cat)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:c | s nextPut: c name]]].\\\\n\\\\tnewClasses := newClasses , #(#WaveletCodec #Sonogram #FWT #AIFFFileReader ).\\\\n\\\\texpandedCandM := self unusedClassesAndMethodsWithout: {unusedCandM first asArray , newClasses. unusedCandM second}.\\\\n\\\\tpartitions at: 'Sound' put: {(expandedCandM first copyWithoutAll: unusedCandM first) addAll: newClasses;\\\\n\\\\t\\\\t\\\\t yourself. expandedCandM second copyWithoutAll: unusedCandM second}.\\\\n\\\\tunusedCandM := expandedCandM.\\\\n\\\\tnewClasses := Array\\\\n\\\\t\\\\t\\\\t\\\\tstreamContents: [:s | ((SystemOrganization categoriesMatching: 'Tools-*')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcopyWithout: 'Tools-Menus')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:cat | (SystemOrganization superclassOrder: cat)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:c | s nextPut: c name]]].\\\\n\\\\tnewClasses := newClasses copyWithoutAll: #(#Debugger #Inspector #ContextVariablesInspector #SyntaxError #ChangeSet #ChangeRecord #ClassChangeRecord #ChangeList #VersionsBrowser ).\\\\n\\\\texpandedCandM := self unusedClassesAndMethodsWithout: {unusedCandM first asArray , newClasses. unusedCandM second}.\\\\n\\\\tpartitions at: 'Tools' put: {(expandedCandM first copyWithoutAll: unusedCandM first) addAll: newClasses;\\\\n\\\\t\\\\t\\\\t yourself. expandedCandM second copyWithoutAll: unusedCandM second}.\\\\n\\\\tunusedCandM := expandedCandM.\\\\n\\\\tnewClasses := Array\\\\n\\\\t\\\\t\\\\t\\\\tstreamContents: [:s | (SystemOrganization categoriesMatching: 'Balloon-MMFlash*')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:cat | (SystemOrganization superclassOrder: cat)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:c | s nextPut: c name]]].\\\\n\\\\tnewClasses := newClasses , #(#ADPCMCodec ).\\\\n\\\\texpandedCandM := self unusedClassesAndMethodsWithout: {unusedCandM first asArray , newClasses. unusedCandM second}.\\\\n\\\\tpartitions at: 'Flash' put: {(expandedCandM first copyWithoutAll: unusedCandM first) addAll: newClasses;\\\\n\\\\t\\\\t\\\\t yourself. expandedCandM second copyWithoutAll: unusedCandM second}.\\\\n\\\\tunusedCandM := expandedCandM.\\\\n\\\\tnewClasses := Array\\\\n\\\\t\\\\t\\\\t\\\\tstreamContents: [:s | (SystemOrganization categoriesMatching: 'Balloon-TrueType*')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:cat | (SystemOrganization superclassOrder: cat)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:c | s nextPut: c name]]].\\\\n\\\\texpandedCandM := self unusedClassesAndMethodsWithout: {unusedCandM first asArray , newClasses. unusedCandM second}.\\\\n\\\\tpartitions at: 'TrueType' put: {(expandedCandM first copyWithoutAll: unusedCandM first) addAll: newClasses;\\\\n\\\\t\\\\t\\\\t yourself. expandedCandM second copyWithoutAll: unusedCandM second}.\\\\n\\\\tunusedCandM := expandedCandM.\\\\n\\\\tnewClasses := Array\\\\n\\\\t\\\\t\\\\t\\\\tstreamContents: [:s | (SystemOrganization categoriesMatching: 'Graphics-Files')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:cat | (SystemOrganization superclassOrder: cat)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:c | s nextPut: c name]]].\\\\n\\\\texpandedCandM := self unusedClassesAndMethodsWithout: {unusedCandM first asArray , newClasses. unusedCandM second}.\\\\n\\\\tpartitions at: 'GraphicFiles' put: {(expandedCandM first copyWithoutAll: unusedCandM first) addAll: newClasses;\\\\n\\\\t\\\\t\\\\t yourself. expandedCandM second copyWithoutAll: unusedCandM second}.\\\\n\\\\tunusedCandM := expandedCandM.\\\\n\\\\t#(#AliceConstants 'Balloon3D' #B3DEngineConstants 'Balloon3D' #WonderlandConstants 'Balloon3D' #FFIConstants 'FFI' #KlattResonatorIndices 'Speech' )\\\\n\\\\t\\\\tpairsDo: [:poolName :part | (partitions at: part) first add: poolName].\\\\n\\\\tpartitions\\\\n\\\\t\\\\tkeysDo: [:k | k = 'Miscellaneous'\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [(partitions at: 'Miscellaneous') first removeAllFoundIn: (partitions at: k) first]].\\\\n\\\\t^ partitions! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'sma 6/18/2000 12:32'!\\\\ndiscardDiscards\\\\n\\\\t\\\\\\\"Discard all discard* methods - including this one.\\\\\\\"\\\\n\\\\n\\\\t(self class selectors select: [:each | each beginsWith: 'discard']) \\\\n\\\\t\\\\tdo: [:each | self class removeSelector: each].\\\\n\\\\t#(lastRemoval majorShrink zapMVCprojects)\\\\n\\\\t\\\\tdo: [:each | self class removeSelector: each]! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'sd 9/29/2004 18:20'!\\\\ndiscardFFI\\\\n\\\\t\\\\\\\"Discard the complete foreign function interface.\\\\n\\\\tNOTE: Recreates specialObjectsArray to prevent obsolete\\\\n\\\\treferences. Has to specially remove external structure\\\\n\\\\thierarchy before ExternalType\\\\\\\"\\\\n\\\\tself\\\\n\\\\t\\\\tat: #ExternalStructure\\\\n\\\\t\\\\tifPresent: [:cls | (ChangeSet superclassOrder: cls withAllSubclasses asArray)\\\\n\\\\t\\\\t\\\\t\\\\treverseDo: [:c | c removeFromSystem]].\\\\n\\\\tSystemOrganization removeCategoriesMatching: 'FFI-*'.\\\\n\\\\tself recreateSpecialObjectsArray.\\\\n\\\\t\\\\\\\"Remove obsolete refs\\\\\\\"\\\\n\\\\tByteArray removeSelector: #asExternalPointer.\\\\n\\\\tByteArray removeSelector: #pointerAt:! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'TPR 8/5/2000 01:32'!\\\\ndiscardFlash\\\\n\\\\t\\\\\\\"Discard Flash support.\\\\\\\"\\\\n\\\\n\\\\tSystemOrganization removeCategoriesMatching: 'Balloon-MMFlash*'\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'RAA 12/17/2000 16:50'!\\\\ndiscardMIDI\\\\n\\\\n\\\\t\\\\\\\"this seems to have gone away\\\\\\\"! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'sd 9/29/2004 18:21'!\\\\ndiscardMorphic\\\\n\\\\t\\\\\\\"Discard Morphic.\\\\n\\\\tUpdated for 2.8 TPR\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk discardMorphic\\\\\\\"\\\\n\\\\t\\\\\\\"Check that we are in an MVC Project and that there are no\\\\n\\\\tMorphic Projects\\\\n\\\\tor WorldMorphViews.\\\\\\\"\\\\n\\\\t| subs |\\\\n\\\\tFlaps clobberFlapTabList.\\\\n\\\\tself discardFlash.\\\\n\\\\tself discardTrueType.\\\\n\\\\tsubs := OrderedCollection new.\\\\n\\\\tMorph\\\\n\\\\t\\\\tallSubclassesWithLevelDo: [:c :i | subs addFirst: c]\\\\n\\\\t\\\\tstartingLevel: 0.\\\\n\\\\tsubs\\\\n\\\\t\\\\tdo: [:c | c removeFromSystem].\\\\n\\\\tself removeClassNamed: #CornerRounder.\\\\n\\\\tself\\\\n\\\\t\\\\tremoveKey: #BalloonEngineConstants\\\\n\\\\t\\\\tifAbsent: [].\\\\n\\\\tSystemOrganization removeCategoriesMatching: 'Balloon-*'.\\\\n\\\\tSystemOrganization removeCategoriesMatching: 'Morphic-*'.\\\\n\\\\tSystemOrganization removeSystemCategory: 'Graphics-Transformations'.\\\\n\\\\tSystemOrganization removeSystemCategory: 'ST80-Morphic'.\\\\n\\\\tScriptingSystem := nil! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'sd 9/29/2004 18:21'!\\\\ndiscardMVC\\\\n\\\\t\\\\\\\"After suitable checks, strip out much of MVC from the system\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk discardMVC\\\\\\\"\\\\n\\\\t| keepers |\\\\n\\\\tself flag: #bob.\\\\n\\\\t\\\\\\\"zapping projects\\\\\\\"\\\\n\\\\tself isMorphic\\\\n\\\\t\\\\tifFalse: [self inform: 'You must be in a Morphic project to discard MVC.'.\\\\n\\\\t\\\\t\\\\t^ self].\\\\n\\\\t\\\\\\\"Check that there are no MVC Projects\\\\\\\"\\\\n\\\\t(Project allProjects\\\\n\\\\t\\\\t\\\\tallSatisfy: [:proj | proj isMorphic])\\\\n\\\\t\\\\tifFalse: [(self confirm: 'Would you like a chance to remove your\\\\nMVC projects in an orderly manner?')\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [^ self].\\\\n\\\\t\\\\t\\\\t(self confirm: 'If you wish, I can remove all MVC projects,\\\\nmake this project be the top project, and place\\\\nall orphaned sub-projects of MVC parents here.\\\\nWould you like be to do this\\\\nand proceed to discard all MVC classes?')\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self zapMVCprojects]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [^ self]].\\\\n\\\\tself reclaimDependents.\\\\n\\\\t\\\\\\\"Remove old Paragraph classes and View classes.\\\\\\\"\\\\n\\\\tself\\\\n\\\\t\\\\tat: #Paragraph\\\\n\\\\t\\\\tifPresent: [:paraClass | (ChangeSet superclassOrder: paraClass withAllSubclasses asArray)\\\\n\\\\t\\\\t\\\\t\\\\treverseDo: [:c | c removeFromSystem]].\\\\n\\\\tself\\\\n\\\\t\\\\tat: #View\\\\n\\\\t\\\\tifPresent: [:viewClass | (ChangeSet superclassOrder: viewClass withAllSubclasses asArray)\\\\n\\\\t\\\\t\\\\t\\\\treverseDo: [:c | c removeFromSystem]].\\\\n\\\\t\\\\\\\"Get rid of ParagraphEditor's ScrollController dependence\\\\\\\"\\\\n\\\\t#(#markerDelta #viewDelta #scrollAmount #scrollBar #computeMarkerRegion )\\\\n\\\\t\\\\tdo: [:sel | ParagraphEditor removeSelector: sel].\\\\n\\\\tParagraphEditor compile: 'updateMarker'.\\\\n\\\\t\\\\\\\"Reshape to MouseMenuController\\\\\\\"\\\\n\\\\tCompiler\\\\n\\\\t\\\\tevaluate: (ParagraphEditor definition copyReplaceAll: 'ScrollController' with: 'MouseMenuController').\\\\n\\\\t\\\\\\\"Get rid of all Controller classes not needed by\\\\n\\\\tParagraphEditor and ScreenController\\\\\\\"\\\\n\\\\tkeepers := TextMorphEditor withAllSuperclasses copyWith: ScreenController.\\\\n\\\\t(ChangeSet superclassOrder: Controller withAllSubclasses asArray)\\\\n\\\\t\\\\treverseDo: [:c | (keepers includes: c)\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [c removeFromSystem]].\\\\n\\\\tSystemOrganization removeCategoriesMatching: 'ST80-Paths'.\\\\n\\\\tSystemOrganization removeCategoriesMatching: 'ST80-Symbols'.\\\\n\\\\tSystemOrganization removeCategoriesMatching: 'ST80-Pluggable Views'.\\\\n\\\\tself removeClassNamed: 'FormButtonCache'.\\\\n\\\\tself removeClassNamed: 'WindowingTransformation'.\\\\n\\\\tself removeClassNamed: 'ControlManager'.\\\\n\\\\tself removeClassNamed: 'DisplayTextView'.\\\\n\\\\tScheduledControllers := nil.\\\\n\\\\tUndeclared removeUnreferencedKeys.\\\\n\\\\tSystemOrganization removeEmptyCategories.\\\\n\\\\tSymbol rehash! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'cwp 11/8/2002 13:38'!\\\\ndiscardNetworking\\\\n\\\\t\\\\\\\"Discard the support for TCP/IP networking.\\\\\\\"\\\\n\\\\n\\\\tSystemOrganization removeCategoriesMatching: 'Network-*'.\\\\n\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'md 7/29/2005 16:00'!\\\\ndiscardOddsAndEnds\\\\n\\\\t\\\\\\\"This method throws out lots of classes that are not frequently\\\\n\\\\tused.\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk discardOddsAndEnds\\\\\\\"\\\\n\\\\tself organization removeSystemCategory: 'System-Serial Port'.\\\\n\\\\tself organization removeSystemCategory: 'ST80-Symbols'.\\\\n\\\\tself organization removeSystemCategory: 'Tools-File Contents Browser'.\\\\n\\\\tself organization removeSystemCategory: 'System-Compression'.\\\\n\\\\tself organization removeSystemCategory: 'Tools-Explorer'.\\\\n\\\\tself organization removeSystemCategory: 'System-Digital Signatures'.\\\\n\\\\tForm removeSelector: #edit.\\\\n\\\\tself\\\\n\\\\t\\\\tat: #FormView\\\\n\\\\t\\\\tifPresent: [:c | c compile: 'defaultControllerClass  ^ NoController' classified: 'controller access'].\\\\n\\\\tself removeClassNamed: #FormEditorView.\\\\n\\\\tself removeClassNamed: #FormEditor.\\\\n\\\\tself organization removeSystemCategory: 'ST80-Paths'.\\\\n\\\\t\\\\\\\"bit editor (remove Form editor first):\\\\\\\"\\\\n\\\\tForm removeSelector: #bitEdit.\\\\n\\\\tForm removeSelector: #bitEditAt:scale:.\\\\n\\\\tStrikeFont removeSelector: #edit:.\\\\n\\\\tself removeClassNamed: #FormButtonCache.\\\\n\\\\tself removeClassNamed: #FormMenuController.\\\\n\\\\tself removeClassNamed: #FormMenuView.\\\\n\\\\tself removeClassNamed: #BitEditor.\\\\n\\\\t\\\\\\\"inspector for Dictionaries of Forms\\\\\\\"\\\\n\\\\tDictionary removeSelector: #inspectFormsWithLabel:.\\\\n\\\\tSystemDictionary removeSelector: #viewImageImports.\\\\n\\\\tScreenController removeSelector: #viewImageImports.\\\\n\\\\tself removeClassNamed: #FormHolderView.\\\\n\\\\tself removeClassNamed: #FormInspectView.\\\\n\\\\t\\\\\\\"experimental updating object viewer:\\\\\\\"\\\\n\\\\tObject removeSelector: #evaluate:wheneverChangeIn:.\\\\n\\\\tself removeClassNamed: #ObjectViewer.\\\\n\\\\tself removeClassNamed: #ObjectTracer.\\\\n\\\\t\\\\\\\"miscellaneous classes:\\\\\\\"\\\\n\\\\tself removeClassNamed: #Array2D.\\\\n\\\\tself removeClassNamed: #DriveACar.\\\\n\\\\tself removeClassNamed: #EventRecorder.\\\\n\\\\tself removeClassNamed: #FindTheLight.\\\\n\\\\tself removeClassNamed: #PluggableTest.\\\\n\\\\tself removeClassNamed: #SystemMonitor.\\\\n\\\\tself removeClassNamed: #ProtocolBrowser.\\\\n\\\\tself removeClassNamed: #ObjectExplorerWrapper.\\\\n\\\\tself removeClassNamed: #HierarchyBrowser.\\\\n\\\\tself removeClassNamed: #LinkedMessageSet.\\\\n\\\\tself removeClassNamed: #ObjectExplorer.\\\\n\\\\tself removeClassNamed: #PackageBrowser.\\\\n\\\\tself removeClassNamed: #AbstractHierarchicalList.\\\\n\\\\tself removeClassNamed: #ChangeList.\\\\n\\\\tself removeClassNamed: #VersionsBrowser.\\\\n\\\\tself removeClassNamed: #ChangeRecord.\\\\n\\\\tself removeClassNamed: #SelectorBrowser.\\\\n\\\\tself removeClassNamed: #HtmlFileStream.\\\\n\\\\tself removeClassNamed: #CrLfFileStream.\\\\n\\\\tself removeClassNamed: #FXGrafPort.\\\\n\\\\tself removeClassNamed: #FXBlt.\\\\n\\\\tself\\\\n\\\\t\\\\tat: #SampledSound\\\\n\\\\t\\\\tifPresent: [:c | c initialize].\\\\n\\\\t#(#Helvetica #Palatino #Courier #ComicBold #ComicPlain )\\\\n\\\\t\\\\tdo: [:k | TextConstants\\\\n\\\\t\\\\t\\\\t\\\\tremoveKey: k\\\\n\\\\t\\\\t\\\\t\\\\tifAbsent: []].\\\\n\\\\tPreferences\\\\n\\\\t\\\\tsetButtonFontTo: (StrikeFont familyName: #NewYork size: 12).\\\\n\\\\tPreferences\\\\n\\\\t\\\\tsetFlapsFontTo: (StrikeFont familyName: #NewYork size: 12).\\\\n\\\\t#(#GZipConstants #ZipConstants #KlattResonatorIndices )\\\\n\\\\t\\\\tdo: [:k | self\\\\n\\\\t\\\\t\\\\t\\\\tremoveKey: k\\\\n\\\\t\\\\t\\\\t\\\\tifAbsent: []]! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'sd 9/29/2004 18:23'!\\\\ndiscardSoundSynthesis\\\\n\\\\t\\\\\\\"Discard the sound synthesis facilities, and the methods and\\\\n\\\\tclasses that use it. This also discards MIDI.\\\\\\\"\\\\n\\\\tself discardMIDI.\\\\n\\\\tself discardSpeech.\\\\n\\\\tSystemOrganization removeCategoriesMatching: 'Sound-Interface'.\\\\n\\\\tself\\\\n\\\\t\\\\tat: #GraphMorph\\\\n\\\\t\\\\tifPresent: [:graphMorph | #(#playOnce #readDataFromFile )\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:sel | graphMorph removeSelector: sel]].\\\\n\\\\tself\\\\n\\\\t\\\\tat: #TrashCanMorph\\\\n\\\\t\\\\tifPresent: [:trashMorph | \\\\n\\\\t\\\\t\\\\ttrashMorph class removeSelector: #samplesForDelete.\\\\n\\\\t\\\\t\\\\ttrashMorph class removeSelector: #samplesForMouseEnter.\\\\n\\\\t\\\\t\\\\ttrashMorph class removeSelector: #samplesForMouseLeave].\\\\n\\\\tSystemOrganization removeCategoriesMatching: 'Sound-Synthesis'.\\\\n\\\\tSystemOrganization removeCategoriesMatching: 'Sound-Scores'! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'TPR 8/3/2000 19:21'!\\\\ndiscardSpeech\\\\n\\\\t\\\\\\\"Discard support for speech synthesis\\\\\\\"\\\\n\\\\n\\\\tSystemOrganization removeCategoriesMatching: 'Speech*'.\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'sd 9/29/2004 18:23'!\\\\ndiscardSUnit\\\\n\\\\t\\\\\\\"Smalltalk discardSUnit\\\\\\\"\\\\n\\\\t| oc |\\\\n\\\\toc := OrderedCollection new.\\\\n\\\\t(self\\\\n\\\\t\\\\tat: #TestCase\\\\n\\\\t\\\\tifAbsent: [^ self])\\\\n\\\\t\\\\tallSubclassesWithLevelDo: [:c :i | oc addFirst: c]\\\\n\\\\t\\\\tstartingLevel: 0.\\\\n\\\\toc\\\\n\\\\t\\\\tdo: [:c | c removeFromSystem].\\\\n\\\\tSystemOrganization removeCategoriesMatching: 'SUnit-*'! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'TPR 8/5/2000 01:32'!\\\\ndiscardTrueType\\\\n\\\\t\\\\\\\"Discard TrueType support.\\\\\\\"\\\\n\\\\n\\\\tSystemOrganization removeCategoriesMatching: 'Balloon-TrueType*'.\\\\n\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'sd 9/29/2004 18:24'!\\\\nlastRemoval\\\\n\\\\t\\\\\\\"Smalltalk lastRemoval\\\\\\\"\\\\n\\\\t\\\\\\\"Some explicit removals - add unwanted methods keeping\\\\n\\\\tother methods.\\\\\\\"\\\\n\\\\t| oldDicts newDicts |\\\\n\\\\t#(#abandonSources )\\\\n\\\\t\\\\tdo: [:each | self class removeSelector: each].\\\\n\\\\t\\\\\\\"Get rid of all unsent methods.\\\\\\\"\\\\n\\\\t[self removeAllUnSentMessages > 0] whileTrue.\\\\n\\\\t\\\\\\\"Shrink method dictionaries.\\\\\\\"\\\\n\\\\tself garbageCollect.\\\\n\\\\toldDicts := MethodDictionary allInstances.\\\\n\\\\tnewDicts := Array new: oldDicts size.\\\\n\\\\toldDicts\\\\n\\\\t\\\\twithIndexDo: [:d :index | newDicts at: index put: d rehashWithoutBecome].\\\\n\\\\toldDicts elementsExchangeIdentityWith: newDicts.\\\\n\\\\toldDicts := newDicts := nil.\\\\n\\\\tself\\\\n\\\\t\\\\tallClassesDo: [:c | c zapOrganization].\\\\n\\\\tSystemOrganization := nil.\\\\n\\\\tChangeSet current initialize! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'md 2/24/2006 15:42'!\\\\nmajorShrink\\\\n\\\\t\\\\\\\"Undertake a major shrinkage of the image.\\\\n\\\\tThis method throws out lots of the system that is not needed\\\\n\\\\tfor, eg, operation in a hand-held PC. majorShrink produces a\\\\n\\\\t999k image in Squeak 2.8\\\\n\\\\tSmalltalk majorShrink; abandonSources; lastRemoval\\\\\\\"\\\\n\\\\t| oldDicts newDicts |\\\\n\\\\tself isMorphic\\\\n\\\\t\\\\tifTrue: [^ self error: 'You can only run majorShrink in MVC'].\\\\n\\\\tProject current isTopProject\\\\n\\\\t\\\\tifFalse: [^ self error: 'You can only run majorShrink in the top project'].\\\\n\\\\t(self confirm: 'All sub-projects will be deleted from this image.\\\\nYou should already have made a backup copy,\\\\nor you must save with a different name after shrinking.\\\\nShall we proceed to discard most of the content in this image?')\\\\n\\\\t\\\\tifFalse: [^ self inform: 'No changes have been made.'].\\\\n\\\\t\\\\\\\"Remove all projects but the current one. - saves 522k\\\\\\\"\\\\n\\\\tProjectView\\\\n\\\\t\\\\tallInstancesDo: [:pv | pv controller closeAndUnscheduleNoTerminate].\\\\n\\\\tProject current setParent: Project current.\\\\n\\\\tMorphWorldView\\\\n\\\\t\\\\tallInstancesDo: [:pv | pv topView controller closeAndUnscheduleNoTerminate].\\\\n\\\\tself\\\\n\\\\t\\\\tat: #Wonderland\\\\n\\\\t\\\\tifPresent: [:cls | cls removeActorPrototypesFromSystem].\\\\n\\\\tPlayer freeUnreferencedSubclasses.\\\\n\\\\tMorphicModel removeUninstantiatedModels.\\\\n\\\\tUtilities classPool at: #ScrapsBook put: nil.\\\\n\\\\tUtilities zapUpdateDownloader.\\\\n\\\\tProjectHistory currentHistory initialize.\\\\n\\\\tProject rebuildAllProjects.\\\\n\\\\t\\\\\\\"Smalltalk discardVMConstruction.\\\\\\\"\\\\n\\\\t\\\\\\\"755k\\\\\\\"\\\\n\\\\tself discardSoundSynthesis.\\\\n\\\\t\\\\\\\"544k\\\\\\\"\\\\n\\\\tself discardOddsAndEnds.\\\\n\\\\t\\\\\\\"227k\\\\\\\"\\\\n\\\\tself discardNetworking.\\\\n\\\\t\\\\\\\"234k\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk discard3D.\\\\\\\"\\\\n\\\\t\\\\\\\"407k\\\\\\\"\\\\n\\\\tself discardFFI.\\\\n\\\\t\\\\\\\"33k\\\\\\\"\\\\n\\\\tself discardMorphic.\\\\n\\\\t\\\\\\\"1372k\\\\\\\"\\\\n\\\\tSymbol rehash.\\\\n\\\\t\\\\\\\"40k\\\\\\\"\\\\n\\\\t\\\\\\\"Above by itself saves about 4,238k\\\\\\\"\\\\n\\\\t\\\\\\\"Remove references to a few classes to be deleted, so that they\\\\n\\\\twon't leave obsolete versions around.\\\\\\\"\\\\n\\\\tChangeSet class compile: 'defaultName\\\\n\\\\t\\\\t^ ''Changes'' ' classified: 'initialization'.\\\\n\\\\tScreenController removeSelector: #openChangeManager.\\\\n\\\\tScreenController removeSelector: #exitProject.\\\\n\\\\tScreenController removeSelector: #openProject.\\\\n\\\\tScreenController removeSelector: #viewImageImports.\\\\n\\\\t\\\\\\\"Now delete various other classes..\\\\\\\"\\\\n\\\\tSystemOrganization removeSystemCategory: 'Graphics-Files'.\\\\n\\\\tSystemOrganization removeSystemCategory: 'System-Object Storage'.\\\\n\\\\tself removeClassNamed: #ProjectController.\\\\n\\\\tself removeClassNamed: #ProjectView.\\\\n\\\\t\\\\\\\"Smalltalk removeClassNamed: #Project.\\\\\\\"\\\\n\\\\tself removeClassNamed: #Component1.\\\\n\\\\tself removeClassNamed: #FormSetFont.\\\\n\\\\tself removeClassNamed: #FontSet.\\\\n\\\\tself removeClassNamed: #InstructionPrinter.\\\\n\\\\tself removeClassNamed: #ChangeSorter.\\\\n\\\\tself removeClassNamed: #DualChangeSorter.\\\\n\\\\tself removeClassNamed: #EmphasizedMenu.\\\\n\\\\tself removeClassNamed: #MessageTally.\\\\n\\\\tStringHolder class removeSelector: #originalWorkspaceContents.\\\\n\\\\tCompiledMethod removeSelector: #symbolic.\\\\n\\\\tRemoteString removeSelector: #makeNewTextAttVersion.\\\\n\\\\tUtilities class removeSelector: #absorbUpdatesFromServer.\\\\n\\\\tself removeClassNamed: #PenPointRecorder.\\\\n\\\\tself removeClassNamed: #Path.\\\\n\\\\tself removeClassNamed: #Base64MimeConverter.\\\\n\\\\t\\\\\\\"Smalltalk removeClassNamed: #EToySystem. Dont bother - its\\\\n\\\\tvery small and used for timestamps etc\\\\\\\"\\\\n\\\\tself removeClassNamed: #RWBinaryOrTextStream.\\\\n\\\\tself removeClassNamed: #AttributedTextStream.\\\\n\\\\tself removeClassNamed: #WordNet.\\\\n\\\\tself removeClassNamed: #SelectorBrowser.\\\\n\\\\tTextStyle\\\\n\\\\t\\\\tallSubInstancesDo: [:ts | ts\\\\n\\\\t\\\\t\\\\t\\\\tnewFontArray: (ts fontArray\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcopyFrom: 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tto: (2 min: ts fontArray size))].\\\\n\\\\tListParagraph initialize.\\\\n\\\\tPopUpMenu initialize.\\\\n\\\\tStandardSystemView initialize.\\\\n\\\\tChangeSet noChanges.\\\\n\\\\tChangeSet classPool\\\\n\\\\t\\\\tat: #AllChangeSets\\\\n\\\\t\\\\tput: (OrderedCollection with: ChangeSet current).\\\\n\\\\tSystemDictionary removeSelector: #majorShrink.\\\\n\\\\t[self removeAllUnSentMessages > 0]\\\\n\\\\t\\\\twhileTrue: [Smalltalk unusedClasses\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:c | (Smalltalk at: c) removeFromSystem]].\\\\n\\\\tSystemOrganization removeEmptyCategories.\\\\n\\\\tself\\\\n\\\\t\\\\tallClassesDo: [:c | c zapOrganization].\\\\n\\\\tself garbageCollect.\\\\n\\\\t'Rehashing method dictionaries . . .'\\\\n\\\\t\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\tfrom: 0\\\\n\\\\t\\\\tto: MethodDictionary instanceCount\\\\n\\\\t\\\\tduring: [:bar | \\\\n\\\\t\\\\t\\\\toldDicts := MethodDictionary allInstances.\\\\n\\\\t\\\\t\\\\tnewDicts := Array new: oldDicts size.\\\\n\\\\t\\\\t\\\\toldDicts\\\\n\\\\t\\\\t\\\\t\\\\twithIndexDo: [:d :index | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbar value: index.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnewDicts at: index put: d rehashWithoutBecome].\\\\n\\\\t\\\\t\\\\toldDicts elementsExchangeIdentityWith: newDicts].\\\\n\\\\toldDicts := newDicts := nil.\\\\n\\\\tProject rebuildAllProjects.\\\\n\\\\tChangeSet current initialize.\\\\n\\\\t\\\\\\\"seems to take more than one try to gc all the weak refs in\\\\n\\\\tSymbolTable \\\\\\\"\\\\n\\\\t3\\\\n\\\\t\\\\ttimesRepeat: [self garbageCollect.\\\\n\\\\t\\\\t\\\\tSymbol compactSymbolTable]! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'nk 4/28/2004 10:24'!\\\\npresumedSentMessages   | sent |\\\\n\\\\\\\"Smalltalk presumedSentMessages\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"The following should be preserved for doIts, etc\\\\\\\"\\\\n\\\\tsent _ IdentitySet new.\\\\n\\\\t#( rehashWithoutBecome compactSymbolTable rebuildAllProjects\\\\n\\\\t\\\\tbrowseAllSelect:  lastRemoval\\\\n\\\\t\\\\tscrollBarValue: vScrollBarValue: scrollBarMenuButtonPressed: \\\\n\\\\t\\\\twithSelectionFrom:  to: removeClassNamed:\\\\n\\\\t\\\\tdragon: hilberts: mandala: web test3 factorial tinyBenchmarks benchFib\\\\n\\\\t\\\\tnewDepth: restoreAfter: forgetDoIts zapAllMethods obsoleteClasses\\\\n\\\\t\\\\tremoveAllUnSentMessages abandonSources removeUnreferencedKeys\\\\n\\\\t\\\\treclaimDependents zapOrganization condenseChanges browseObsoleteReferences\\\\n\\\\t\\\\tsubclass:instanceVariableNames:classVariableNames:poolDictionaries:category:\\\\n\\\\t\\\\tmethodsFor:stamp: methodsFor:stamp:prior: instanceVariableNames:\\\\n\\\\t\\\\tstartTimerInterruptWatcher unusedClasses) do:\\\\n\\\\t\\\\t[:sel | sent add: sel].\\\\n\\\\t\\\\\\\"The following may be sent by perform: in dispatchOnChar...\\\\\\\"\\\\n\\\\t(ParagraphEditor classPool at: #CmdActions) asSet do:\\\\n\\\\t\\\\t[:sel | sent add: sel].\\\\n\\\\t(ParagraphEditor classPool at: #ShiftCmdActions) asSet do:\\\\n\\\\t\\\\t[:sel | sent add: sel].\\\\n\\\\t^ sent! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'nk 4/28/2004 10:24'!\\\\nremoveAllUnSentMessages\\\\n\\\\t\\\\\\\"Smalltalk removeAllUnSentMessages\\\\\\\"\\\\n\\\\t\\\\\\\"[Smalltalk unusedClasses do: [:c | (Smalltalk at: c) removeFromSystem]. \\\\n\\\\tSmalltalk removeAllUnSentMessages > 0] whileTrue.\\\\\\\"\\\\n\\\\t\\\\\\\"Remove all implementations of unsent messages.\\\\\\\"\\\\n\\\\t| sels n |\\\\n\\\\tsels _ self systemNavigation allUnSentMessages.\\\\n\\\\t\\\\\\\"The following should be preserved for doIts, etc\\\\\\\"\\\\n\\\\t\\\\\\\"needed even after #majorShrink is pulled\\\\\\\"\\\\n\\\\t#(#rehashWithoutBecome #compactSymbolTable #rebuildAllProjects #browseAllSelect:  #lastRemoval #scrollBarValue: vScrollBarValue: #scrollBarMenuButtonPressed: #withSelectionFrom: #to: #removeClassNamed: #dragon: #hilberts: #mandala: #web #test3 #factorial #tinyBenchmarks #benchFib #newDepth: #restoreAfter: #forgetDoIts #zapAllMethods #obsoleteClasses #removeAllUnSentMessages #abandonSources #removeUnreferencedKeys #reclaimDependents #zapOrganization #condenseChanges #browseObsoleteReferences #subclass:instanceVariableNames:classVariableNames:poolDictionaries:category: #methodsFor:stamp: #methodsFor:stamp:prior: #instanceVariableNames: #startTimerInterruptWatcher #unusedClasses )\\\\n\\\\t\\\\tdo: [:sel | sels\\\\n\\\\t\\\\t\\\\t\\\\tremove: sel\\\\n\\\\t\\\\t\\\\t\\\\tifAbsent: []].\\\\n\\\\t\\\\\\\"The following may be sent by perform: in dispatchOnChar...\\\\\\\"\\\\n\\\\t(ParagraphEditor classPool at: #CmdActions) asSet\\\\n\\\\t\\\\tdo: [:sel | sels\\\\n\\\\t\\\\t\\\\t\\\\tremove: sel\\\\n\\\\t\\\\t\\\\t\\\\tifAbsent: []].\\\\n\\\\t(ParagraphEditor classPool at: #ShiftCmdActions) asSet\\\\n\\\\t\\\\tdo: [:sel | sels\\\\n\\\\t\\\\t\\\\t\\\\tremove: sel\\\\n\\\\t\\\\t\\\\t\\\\tifAbsent: []].\\\\n\\\\tsels size = 0\\\\n\\\\t\\\\tifTrue: [^ 0].\\\\n\\\\tn _ 0.\\\\n\\\\tself systemNavigation\\\\n\\\\t\\\\tallBehaviorsDo: [:x | n _ n + 1].\\\\n\\\\t'Removing ' , sels size printString , ' messages . . .'\\\\n\\\\t\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\tfrom: 0\\\\n\\\\t\\\\tto: n\\\\n\\\\t\\\\tduring: [:bar | \\\\n\\\\t\\\\t\\\\tn _ 0.\\\\n\\\\t\\\\t\\\\tself systemNavigation\\\\n\\\\t\\\\t\\\\t\\\\tallBehaviorsDo: [:class | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbar value: (n _ n + 1).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsels\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:sel | class basicRemoveSelector: sel]]].\\\\n\\\\t^ sels size! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'sd 9/29/2004 18:26'!\\\\nremoveNormalCruft\\\\n\\\\t\\\\\\\"Remove various graphics, uniclasses, references. Caution: see\\\\n\\\\tcomment at bottom of method\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk removeNormalCruft\\\\\\\"\\\\n\\\\tScriptingSystem stripGraphicsForExternalRelease.\\\\n\\\\tScriptingSystem spaceReclaimed.\\\\n\\\\tReferences keys\\\\n\\\\t\\\\tdo: [:k | References removeKey: k].\\\\n\\\\tself classNames\\\\n\\\\t\\\\tdo: [:cName | #('Player' 'CardPlayer' 'Component' 'WonderlandActor' 'MorphicModel' 'PlayWithMe' )\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:superName | ((cName ~= superName\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tand: [cName beginsWith: superName])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tand: [(cName allButFirst: superName size)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tallSatisfy: [:ch | ch isDigit]])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self removeClassNamed: cName]]].\\\\n\\\\tself\\\\n\\\\t\\\\tat: #Wonderland\\\\n\\\\t\\\\tifPresent: [:cls | cls removeActorPrototypesFromSystem].\\\\n\\\\tChangeSet current clear\\\\n\\\\t\\\\\\\"Caution: if any worlds in the image happen to have uniclass\\\\n\\\\tplayers associated with them, running this method would\\\\n\\\\tlikely compromise their functioning and could cause errors,\\\\n\\\\tespecially if the uniclass player of the current world had any\\\\n\\\\tscripts set to ticking. If that happens to you somehow, you will\\\\n\\\\tprobably want to find a way to reset the offending world's\\\\n\\\\tplayer to be an UnscriptedCardPlayer, or perhaps nil\\\\\\\"! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'sd 9/29/2004 18:26'!\\\\nremoveSelector: descriptor \\\\n\\\\t\\\\\\\"Safely remove a selector from a class (or metaclass). If the\\\\n\\\\tclass or the method doesn't exist anymore, never mind and\\\\n\\\\tanswer nil.\\\\n\\\\tThis method should be used instead of 'Class removeSelector:\\\\n\\\\t#method' to omit global class references.\\\\\\\"\\\\n\\\\t| class sel |\\\\n\\\\tclass := self\\\\n\\\\t\\\\t\\\\t\\\\tat: descriptor first\\\\n\\\\t\\\\t\\\\t\\\\tifAbsent: [^ nil].\\\\n\\\\t(descriptor size > 2\\\\n\\\\t\\\\t\\\\tand: [descriptor second == #class])\\\\n\\\\t\\\\tifTrue: [class := class class.\\\\n\\\\t\\\\t\\\\tsel := descriptor third]\\\\n\\\\t\\\\tifFalse: [sel := descriptor second].\\\\n\\\\t^ class removeSelector: sel! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'di 2/25/2001 22:34'!\\\\nreportClassAndMethodRemovalsFor: collectionOfClassNames\\\\n\\\\t| initialClassesAndMethods finalClassesAndMethods |\\\\n\\\\t\\\\\\\"Smalltalk reportClassAndMethodRemovalsFor: #(Celeste Scamper MailMessage)\\\\\\\"\\\\n\\\\n\\\\tinitialClassesAndMethods _ self unusedClassesAndMethodsWithout: {{}. {}}.\\\\n\\\\tfinalClassesAndMethods _ self unusedClassesAndMethodsWithout: {collectionOfClassNames. {}}.\\\\n\\\\t^ {finalClassesAndMethods first copyWithoutAll: initialClassesAndMethods first.\\\\n\\\\t\\\\tfinalClassesAndMethods second copyWithoutAll: initialClassesAndMethods second}! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'sd 4/29/2003 19:06'!\\\\nunusedClasses\\\\n\\\\t\\\\\\\"Enumerates all classes in the system and returns a list of those that are \\\\n\\\\tapparently unused. A class is considered in use if it (a) has subclasses \\\\n\\\\tor (b) is referred to by some method or (c) has its name in use as a \\\\n\\\\tliteral. \\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk unusedClasses asSortedCollection\\\\\\\"\\\\n\\\\t^ self systemNavigation allUnusedClassesWithout: {{}. {}}! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'edc 11/8/2005 10:11'!\\\\nunusedClassesAndMethodsWithout: classesAndMessagesPair \\\\n\\\\t\\\\\\\"Accepts and returns a pair: {set of class names. set of selectors}. \\\\n\\\\tIt is expected these results will be diff'd with the normally unused \\\\n\\\\tresults. \\\\\\\"\\\\n\\\\t| classRemovals messageRemovals nClasses nMessages |\\\\n\\\\t(classRemovals _ IdentitySet new) addAll: classesAndMessagesPair first.\\\\n\\\\t(messageRemovals _ IdentitySet new) addAll: classesAndMessagesPair second.\\\\n\\\\tnClasses _ nMessages _ -1.\\\\n\\\\t[\\\\\\\"As long as we keep making progress...\\\\\\\"\\\\n\\\\tclassRemovals size > nClasses\\\\n\\\\t\\\\tor: [messageRemovals size > nMessages]]\\\\n\\\\t\\\\twhileTrue: [\\\\\\\"...keep trying for bigger sets of unused classes and selectors.\\\\\\\"\\\\n\\\\t\\\\t\\\\tnClasses _ classRemovals size.\\\\n\\\\t\\\\t\\\\tnMessages _ messageRemovals size.\\\\n\\\\t\\\\t\\\\tUtilities\\\\n\\\\t\\\\t\\\\t\\\\tinformUser: 'Iterating removals '\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t, (classesAndMessagesPair first isEmpty\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: ['for baseline...']\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: ['for ' , classesAndMessagesPair first first , ' etc...']) , Character cr asString , nClasses printString , ' classes, ' , nMessages printString , ' messages.\\\\n|\\\\n|'\\\\n\\\\t\\\\t\\\\t\\\\tduring: [\\\\\\\"spacers move menu off cursor\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tclassRemovals\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taddAll: (self systemNavigation allUnusedClassesWithout: {classRemovals. messageRemovals}).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmessageRemovals\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taddAll: (self systemNavigation allUnSentMessagesWithout: {classRemovals. messageRemovals})]].\\\\n\\\\t^ {classRemovals. self systemNavigation allUnSentMessagesWithout: {classRemovals. messageRemovals}}! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'dao 10/1/2004 13:51'!\\\\nwriteImageSegmentsFrom: segmentDictionary withKernel: kernel\\\\n\\\\t\\\\\\\"segmentDictionary is associates segmentName -> {classNames. methodNames},\\\\n\\\\tand kernel is another set of classNames determined to be essential.\\\\n\\\\tAdd a partition, 'Secondary' with everything not in partitions and not in the kernel.\\\\n\\\\tThen write segments based on this partitioning of classes.\\\\\\\"\\\\n\\\\n\\\\t| metas secondary dups segDict overlaps classes n symbolHolder |\\\\n\\\\t\\\\\\\"First, put all classes that are in no other partition, and not in kernel into a new partition called 'Secondary'.  Also remove any classes in kernel from putative partitions.\\\\\\\"\\\\n\\\\tsecondary _ Smalltalk classNames asIdentitySet.\\\\n\\\\tsegmentDictionary keysDo:\\\\n\\\\t\\\\t[:segName |\\\\n\\\\t\\\\tsecondary removeAllFoundIn: (segmentDictionary at: segName) first.\\\\n\\\\t\\\\t(segmentDictionary at: segName) first removeAllFoundIn: kernel].\\\\n\\\\tsecondary removeAllFoundIn: kernel.\\\\n\\\\tsecondary removeAllFoundIn: #(PseudoContext TranslatedMethod Utilities Preferences OutOfScopeNotification FakeClassPool  BlockCannotReturn FormSetFont ExternalSemaphoreTable NetNameResolver ScreenController InterpreterPlugin Command WeakSet).\\\\n\\\\tFileDirectory allSubclassesDo: [:c | secondary remove: c name ifAbsent: []].\\\\n\\\\tsegmentDictionary at: 'Secondary' put: {secondary. {}}.\\\\n\\\\n\\\\t\\\\\\\"Now build segDict giving className -> segName, and report any duplicates.\\\\\\\"\\\\n\\\\tdups _ Dictionary new.\\\\n\\\\tsegDict _ IdentityDictionary new: 3000.\\\\n\\\\tsegmentDictionary keysDo:\\\\n\\\\t\\\\t[:segName | (segmentDictionary at: segName) first do:\\\\n\\\\t\\\\t\\\\t[:className |\\\\n\\\\t\\\\t\\\\t(segDict includesKey: className) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[(dups includesKey: className) ifFalse: [dups at: className put: Array new].\\\\n\\\\t\\\\t\\\\t\\\\tdups at: className put: (dups at: className) , {segName}].\\\\n\\\\t\\\\t\\\\tsegDict at: className put: segName]].\\\\n\\\\tdups size > 0 ifTrue: [dups inspect.  ^ self error: 'Duplicate entries'].\\\\n\\\\n\\\\t\\\\\\\"Then for every class in every partition, make sure that neither it\\\\n\\\\tnor any of its superclasses are in any other partition.  If they are,\\\\n\\\\tenter them in a dictionary of overlaps.\\\\n\\\\tIf the dictionary is not empty, then stop and report it.\\\\\\\"\\\\n\\\\toverlaps _ Dictionary new.\\\\n\\\\tsegmentDictionary keysDo:\\\\n\\\\t\\\\t[:segName |  \\\\n\\\\t\\\\tclasses _ (segmentDictionary at: segName) first asArray collect: [:k | Smalltalk at: k].\\\\n\\\\t\\\\tclasses do:\\\\n\\\\t\\\\t\\\\t[:c | (c isKindOf: Class) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[c withAllSuperclasses do:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:sc | n _ segDict at: sc name ifAbsent: [segName].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tn ~= segName ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[n = 'Secondary'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [(segmentDictionary at: 'Secondary') first\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tremove: sc name ifAbsent: []]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [overlaps at: c name put: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(c withAllSuperclasses collect: [:cc | segDict associationAt: cc name ifAbsent: [cc name -> 'Kernel']])]]]]]].\\\\n\\\\toverlaps size > 0 ifTrue: [overlaps inspect.  ^ self error: 'Superclasses in separate segments'].\\\\n\\\\n\\\\t\\\\\\\"If there are no overlaps, then proceed to write the partitioned classes.\\\\\\\"\\\\n\\\\tsymbolHolder _ Symbol allInstances.\\\\t\\\\\\\"Hold onto Symbols with strong pointers, \\\\n\\\\t\\\\tso they will be in outPointers\\\\\\\"\\\\n\\\\tsegmentDictionary keysDo:\\\\n\\\\t\\\\t[:segName |  Utilities informUser: segName during:\\\\n\\\\t\\\\t\\\\t[classes _ (segmentDictionary at: segName) first asArray collect: [:k | Smalltalk at: k].\\\\n\\\\t\\\\t\\\\tmetas _ classes select: [:c | c isKindOf: Class] thenCollect: [:c | c class].\\\\n\\\\t\\\\t\\\\t(ImageSegment new copyFromRoots: classes , metas sizeHint: 0) extract; \\\\n\\\\t\\\\t\\\\t\\\\t\\\\twriteToFile: segName]].\\\\n\\\\tsymbolHolder.  \\\\\\\"Keep compiler for getting uppity.\\\\\\\"! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'ar 9/27/2005 20:12'!\\\\nzapAllOtherProjects \\\\n\\\\t\\\\\\\"Smalltalk zapAllOtherProjects\\\\\\\"\\\\n\\\\\\\"Note: as of this writing, the only reliable way to get rid of all but the current project is te execute the following, one line at a time...\\\\n\\\\t\\\\tSmalltalk zapAllOtherProjects.\\\\n\\\\t\\\\tProjectHistory currentHistory initialize.\\\\n\\\\t\\\\tSmalltalk garbageCollect.\\\\n\\\\t\\\\tProject rebuildAllProjects.\\\\n\\\\\\\"\\\\n\\\\n\\\\t\\\\n\\\\tProject allInstancesDo: [:p | p setParent: nil].\\\\n\\\\tProject current setParent: Project current.\\\\n\\\\tProject current isMorphic ifTrue: [ScheduledControllers := nil].\\\\n\\\\tTheWorldMenu allInstancesDo: [:m | 1 to: m class instSize do: [:i | m instVarAt: i put: nil]].\\\\n\\\\tChangeSet classPool at: #AllChangeSets put: nil.\\\\n\\\\tProject classPool at: #AllProjects put: nil.\\\\n\\\\tProjectHistory currentHistory initialize.\\\\n\\\\tChangeSet initialize.\\\\n\\\\tProject rebuildAllProjects.  \\\\\\\"Does a GC\\\\\\\"\\\\n\\\\tProject allProjects size > 1 ifTrue: [Project allProjects inspect]! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'dao 10/1/2004 13:30'!\\\\nzapMVCprojects\\\\n\\\\t\\\\\\\"Smalltalk zapMVCprojects\\\\\\\"\\\\n\\\\t| window |\\\\n\\\\n\\\\tself flag: #bob. \\\\\\\"zapping projects\\\\\\\"\\\\n\\\\n\\\\tSmalltalk garbageCollect.\\\\n\\\\t\\\\\\\"So allInstances is precise\\\\\\\"\\\\n\\\\tProject\\\\n\\\\t\\\\tallSubInstancesDo: [:proj | proj isTopProject\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [proj isMorphic\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\\\\"Root project is MVC -- we must become the root\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tProject current setParent: Project current.]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [proj parent isMorphic\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [proj isMorphic\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"Remove Morphic projects from MVC \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tviews \\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"... and add them back here.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twindow _ (SystemWindow labelled: proj name)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmodel: proj.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twindow\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taddMorph: (ProjectViewMorph on: proj)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tframe: (0 @ 0 corner: 1.0 @ 1.0).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twindow openInWorld.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tproj setParent: Project current]].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tproj isMorphic\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\\\\"Remove MVC projects from Morphic views\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tProject deletingProject: proj]]]! !\\\\n\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'di 2/4/1999 15:38'!\\\\naddToShutDownList: aClass\\\\n\\\\t\\\\\\\"This will add a ref to this class at the BEGINNING of the shutDown list.\\\\\\\"\\\\n\\\\n\\\\tself addToShutDownList: aClass after: nil! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'di 2/3/1999 22:04'!\\\\naddToShutDownList: aClass after: predecessor\\\\n\\\\n\\\\tself add: aClass toList: ShutDownList after: predecessor! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'di 2/4/1999 15:37'!\\\\naddToStartUpList: aClass\\\\n\\\\t\\\\\\\"This will add a ref to this class at the END of the startUp list.\\\\\\\"\\\\n\\\\n\\\\tself addToStartUpList: aClass after: nil! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'di 2/3/1999 22:04'!\\\\naddToStartUpList: aClass after: predecessor\\\\n\\\\n\\\\tself add: aClass toList: StartUpList after: predecessor! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'ar 11/19/1999 22:36'!\\\\nadd: aClass toList: startUpOrShutDownList after: predecessor\\\\n\\\\t\\\\\\\"Add the name of aClass to the startUp or shutDown list.\\\\n\\\\tAdd it after the name of predecessor, or at the end if predecessor is nil.\\\\\\\"\\\\n\\\\n\\\\t| name earlierName |\\\\n\\\\tname _ aClass name.\\\\n\\\\t(self at: name ifAbsent: [nil]) == aClass ifFalse:\\\\n\\\\t\\\\t[self error: name , ' cannot be found in Smalltalk dictionary.'].\\\\n\\\\tpredecessor == nil\\\\n\\\\t\\\\tifTrue: [\\\\\\\"No-op if alredy in the list.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t(startUpOrShutDownList includes: name) ifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[startUpOrShutDownList == StartUpList\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"Add to end of startUp list\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartUpOrShutDownList addLast: name]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\\\\"Add to front of shutDown list\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartUpOrShutDownList addFirst: name]]]\\\\n\\\\t\\\\tifFalse: [\\\\\\\"Add after predecessor, moving it if already there.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tearlierName _ predecessor name.\\\\n\\\\t\\\\t\\\\t\\\\t(self at: earlierName) == predecessor ifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self error: earlierName , ' cannot be found in Smalltalk dictionary.'].\\\\n\\\\t\\\\t\\\\t\\\\t(startUpOrShutDownList includes: earlierName) ifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self error: earlierName , ' cannot be found in the list.'].\\\\n\\\\t\\\\t\\\\t\\\\tstartUpOrShutDownList remove: name ifAbsent:[].\\\\n\\\\t\\\\t\\\\t\\\\tstartUpOrShutDownList add: name after: earlierName]! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'RAA 6/14/2000 17:21'!\\\\nisMorphic\\\\n        \\\\\\\"Answer true if the user interface is running in Morphic rathern than \\\\n        MVC.  By convention the gloabl variable World is set to nil when MVC is \\\\n        running.  ScheduledControllers could be set to nil when Morphic is \\\\n        running, but this symmetry is not yet in effect.\\\\\\\"\\\\n\\\\n        ^ World ~~ nil \\\\\\\"or: [RequestCurrentWorldNotification signal notNil]\\\\\\\"! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'ar 11/16/1999 20:12'!\\\\nprocessShutDownList: quitting\\\\n\\\\t\\\\\\\"Send #shutDown to each class that needs to wrap up before a snapshot.\\\\\\\"\\\\n\\\\n\\\\tself send: #shutDown: toClassesNamedIn: ShutDownList with: quitting.\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'ar 11/16/1999 20:12'!\\\\nprocessStartUpList: resuming\\\\n\\\\t\\\\\\\"Send #startUp to each class that needs to run initialization after a snapshot.\\\\\\\"\\\\n\\\\n\\\\tself send: #startUp: toClassesNamedIn: StartUpList with: resuming.\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit'!\\\\nquitPrimitive\\\\n\\\\t\\\\\\\"Primitive. Exit to another operating system on the host machine, if one\\\\n\\\\texists. All state changes in the object space since the last snapshot are lost.\\\\n\\\\tEssential. See Object documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 113>\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'di 2/3/1999 22:22'!\\\\nremoveFromShutDownList: aClass\\\\n\\\\n\\\\tShutDownList remove: aClass name ifAbsent: []! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'di 2/3/1999 22:22'!\\\\nremoveFromStartUpList: aClass\\\\n\\\\n\\\\tStartUpList remove: aClass name ifAbsent: []! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'di 3/7/2001 01:26'!\\\\nsend: startUpOrShutDown toClassesNamedIn: startUpOrShutDownList with: argument\\\\n\\\\t\\\\\\\"Send the message #startUp: or #shutDown: to each class named in the list.\\\\n\\\\tThe argument indicates if the system is about to quit (for #shutDown:) or if\\\\n\\\\tthe image is resuming (for #startUp:).\\\\n\\\\tIf any name cannot be found, then remove it from the list.\\\\\\\"\\\\n\\\\n\\\\t| removals class |\\\\n\\\\tremovals _ OrderedCollection new.\\\\n\\\\tstartUpOrShutDownList do:\\\\n\\\\t\\\\t[:name |\\\\n\\\\t\\\\tclass _ self at: name ifAbsent: [nil].\\\\n\\\\t\\\\tclass == nil\\\\n\\\\t\\\\t\\\\tifTrue: [removals add: name]\\\\n\\\\t\\\\t\\\\tifFalse: [class isInMemory ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[class perform: startUpOrShutDown with: argument]]].\\\\n\\\\n\\\\t\\\\\\\"Remove any obsolete entries, but after the iteration\\\\\\\"\\\\n\\\\tstartUpOrShutDownList removeAll: removals! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'sd 9/30/2003 13:47'!\\\\nsetGCParameters\\\\n\\\\t\\\\\\\"Adjust the VM's default GC parameters to avoid premature tenuring.\\\\\\\"\\\\n\\\\n\\\\tSmalltalkImage current  vmParameterAt: 5 put: 4000.  \\\\\\\"do an incremental GC after this many allocations\\\\\\\"\\\\n\\\\tSmalltalkImage current  vmParameterAt: 6 put: 2000.  \\\\\\\"tenure when more than this many objects survive the GC\\\\\\\"\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'sd 11/16/2003 13:14'!\\\\nshutDown\\\\n\\\\t^ SmalltalkImage current closeSourceFiles! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'gk 2/23/2004 20:51'!\\\\nshutDownSound\\\\n\\\\t\\\\\\\"No longer used in the release, but retained for backward compatibility.\\\\\\\"\\\\n\\\\n\\\\tSoundService default shutDown\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'JMM 11/21/2000 21:02'!\\\\nsnapshotEmbeddedPrimitive\\\\n\\\\t<primitive: 247>\\\\n\\\\t^nil \\\\\\\"indicates error writing embedded image file\\\\\\\"! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'ar 7/22/2000 14:34'!\\\\nsnapshotPrimitive\\\\n\\\\t\\\\\\\"Primitive. Write the current state of the object memory on a file in the\\\\n\\\\tsame format as the Smalltalk-80 release. The file can later be resumed,\\\\n\\\\treturning you to this exact state. Return normally after writing the file.\\\\n\\\\tEssential. See Object documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 97>\\\\n\\\\t^nil \\\\\\\"indicates error writing image file\\\\\\\"! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'nk 11/12/2003 10:32'!\\\\nunbindExternalPrimitives\\\\n\\\\t\\\\\\\"Primitive. Force all external primitives to be looked up again afterwards. Since external primitives that have not found are bound for fast failure this method will force the lookup of all primitives again so that after adding some plugin the primitives may be found.\\\\\\\"\\\\n\\\\t^ self deprecated: 'Use SmalltalkImage unbindExternalPrimitives'\\\\n\\\\t\\\\tblock: [SmalltalkImage unbindExternalPrimitives].\\\\n\\\\t\\\\\\\"Do nothing if the primitive fails for compatibility with older VMs\\\\\\\"! !\\\\n\\\\n\\\\n!SystemDictionary methodsFor: 'sources, change log'!\\\\ncopyright\\\\n\\\\t\\\\\\\"The Smalltalk copyright.\\\\\\\"\\\\n\\\\n\\\\t^'Copyright (c) Xerox Corp. 1981, 1982 All rights reserved.\\\\nCopyright (c) Apple Computer, Inc. 1985-1996 All rights reserved.'! !\\\\n\\\\n!SystemDictionary methodsFor: 'sources, change log' stamp: 'em 3/31/2005 11:48'!\\\\ncurrentChangeSetString\\\\n\\\\t\\\\\\\"Smalltalk currentChangeSetString\\\\\\\"\\\\n\\\\t^ 'Current Change Set: ' translated, ChangeSet current name! !\\\\n\\\\n!SystemDictionary methodsFor: 'sources, change log' stamp: 'sd 9/29/2004 18:27'!\\\\ncurrentProjectDo: aBlock \\\\n\\\\t\\\\\\\"So that code can work after removal of Projects\\\\\\\"\\\\n\\\\tself\\\\n\\\\t\\\\tat: #Project\\\\n\\\\t\\\\tifPresent: [:projClass | aBlock value: projClass current]! !\\\\n\\\\n!SystemDictionary methodsFor: 'sources, change log' stamp: 'sd 11/16/2003 12:55'!\\\\nexternalizeSources   \\\\n\\\\t\\\\\\\"Write the sources and changes streams onto external files.\\\\\\\"\\\\n \\\\t\\\\\\\"Smalltalk externalizeSources\\\\\\\"\\\\n\\\\t\\\\\\\"the logic of this method is complex because it uses changesName and self changesName\\\\n\\\\tmay be this is normal - sd\\\\\\\"\\\\n\\\\t\\\\n\\\\t| sourcesName changesName aFile |\\\\n\\\\tsourcesName _ SmalltalkImage current sourcesName.\\\\n\\\\t(FileDirectory default fileExists: sourcesName)\\\\n\\\\t\\\\tifTrue: [^ self inform:\\\\n'Sorry, you must first move or remove the\\\\nfile named ', sourcesName].\\\\n\\\\tchangesName _ SmalltalkImage current changesName.\\\\n\\\\t(FileDirectory default fileExists: changesName)\\\\n\\\\t\\\\tifTrue: [^ self inform:\\\\n'Sorry, you must first move or remove the\\\\nfile named ', changesName].\\\\n\\\\n\\\\taFile _  FileStream newFileNamed: sourcesName.\\\\n\\\\taFile nextPutAll: SourceFiles first originalContents.\\\\n\\\\taFile close.\\\\n\\\\tself setMacFileInfoOn: sourcesName.\\\\n\\\\tSourceFiles at: 1 put: (FileStream readOnlyFileNamed: sourcesName).\\\\n\\\\n\\\\taFile _ FileStream newFileNamed: SmalltalkImage current changesName.\\\\n\\\\taFile nextPutAll: SourceFiles last contents.\\\\n\\\\taFile close.\\\\n\\\\t\\\\\\\"On Mac, set the file type and creator (noop on other platforms)\\\\\\\"\\\\n\\\\tFileDirectory default\\\\n\\\\t\\\\tsetMacFileNamed: SmalltalkImage current changesName\\\\n\\\\t\\\\ttype: 'STch'\\\\n\\\\t\\\\tcreator: 'FAST'.\\\\n\\\\tSourceFiles at: 2 put: (FileStream oldFileNamed: changesName).\\\\n\\\\n\\\\tself inform: 'Sources successfully externalized'.\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'sources, change log' stamp: 'ar 2/6/2001 18:42'!\\\\nforceChangesToDisk\\\\n\\\\t\\\\\\\"Ensure that the changes file has been fully written to disk by closing and re-opening it. This makes the system more robust in the face of a power failure or hard-reboot.\\\\\\\"\\\\n\\\\n\\\\t| changesFile |\\\\n\\\\tchangesFile _ SourceFiles at: 2.\\\\n\\\\t(changesFile isKindOf: FileStream) ifTrue: [\\\\n\\\\t\\\\tchangesFile flush.\\\\n\\\\t\\\\tSecurityManager default hasFileAccess ifTrue:[\\\\n\\\\t\\\\t\\\\tchangesFile close.\\\\n\\\\t\\\\t\\\\tchangesFile open: changesFile name forWrite: true].\\\\n\\\\t\\\\tchangesFile setToEnd.\\\\n\\\\t].\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'sources, change log' stamp: 'sd 11/16/2003 12:55'!\\\\ninternalizeChangeLog    \\\\n\\\\t\\\\t\\\\\\\"Smalltalk internalizeChangeLog\\\\\\\"\\\\n\\\\t\\\\\\\"Bring the changes file into a memory-resident filestream, for faster access and freedom from external file system.  1/31/96 sw\\\\\\\"\\\\n\\\\n\\\\t| reply aName aFile |\\\\n\\\\treply _ self confirm:  'CAUTION -- do not undertake this lightly!!\\\\nIf you have backed up your system and\\\\nare prepared to face the consequences of\\\\nthe requested internalization of sources,\\\\nhit Yes.  If you have any doubts, hit No\\\\nto back out with no harm done.'.\\\\n\\\\n\\\\t(reply ==  true) ifFalse:\\\\n\\\\t\\\\t[^ self inform: 'Okay - abandoned'].\\\\n\\\\n\\\\taName _ SmalltalkImage current changesName.\\\\n\\\\t(aFile _ SourceFiles last) == nil ifTrue:\\\\n\\\\t\\\\t[(FileDirectory default fileExists: aName)\\\\n\\\\t\\\\t\\\\tifFalse: [^ self halt: 'Cannot locate ', aName, ' so cannot proceed.'].\\\\n\\\\t\\\\taFile _ FileStream readOnlyFileNamed: aName].\\\\n\\\\tSourceFiles at: 2 put: (ReadWriteStream with: aFile contentsOfEntireFile).\\\\n\\\\n\\\\tself inform: 'Okay, changes file internalized'! !\\\\n\\\\n!SystemDictionary methodsFor: 'sources, change log' stamp: 'sd 11/16/2003 12:55'!\\\\ninternalizeSources    \\\\n\\\\t\\\\t\\\\\\\"Smalltalk internalizeSources\\\\\\\"\\\\n\\\\t\\\\\\\"Bring the sources and changes files into memory-resident filestreams, for faster access and freedom from file-system interface.  1/29/96 sw\\\\\\\"\\\\n\\\\n\\\\t| reply aName aFile |\\\\n\\\\treply _ self confirm:  'CAUTION -- do not undertake this lightly!!\\\\nIf you have backed up your system and\\\\nare prepared to face the consequences of\\\\nthe requested internalization of sources,\\\\nhit Yes.  If you have any doubts, hit No\\\\nto back out with no harm done.'.\\\\n\\\\n\\\\t(reply ==  true) ifFalse:\\\\n\\\\t\\\\t[^ self inform: 'Okay - abandoned'].\\\\n\\\\n\\\\taName _ SmalltalkImage current sourcesName.\\\\n\\\\t(aFile _ SourceFiles first) == nil ifTrue:\\\\n\\\\t\\\\t[(FileDirectory default fileExists: aName)\\\\n\\\\t\\\\t\\\\tifFalse: [^ self halt: 'Cannot locate ', aName, ' so cannot proceed.'].\\\\n\\\\t\\\\taFile _ FileStream readOnlyFileNamed: aName].\\\\n\\\\tSourceFiles at: 1 put: (ReadWriteStream with: aFile contentsOfEntireFile).\\\\n\\\\n\\\\taName _ SmalltalkImage current changesName.\\\\n\\\\t(aFile _ SourceFiles last) == nil ifTrue:\\\\n\\\\t\\\\t[(FileDirectory default fileExists: aName)\\\\n\\\\t\\\\t\\\\tifFalse: [^ self halt: 'Cannot locate ', aName, ' so cannot proceed.'].\\\\n\\\\t\\\\taFile _ FileStream readOnlyFileNamed: aName].\\\\n\\\\tSourceFiles at: 2 put: (ReadWriteStream with: aFile contentsOfEntireFile).\\\\n\\\\n\\\\tself inform: 'Okay, sources internalized'! !\\\\n\\\\n!SystemDictionary methodsFor: 'sources, change log' stamp: 'sw 2/3/2000 15:59'!\\\\nrecover: nCharacters\\\\n\\\\t\\\\\\\"Schedule an editable text view on the last n characters of changes.\\\\\\\"\\\\n\\\\tself writeRecentCharacters: nCharacters toFileNamed: 'st80.recent'! !\\\\n\\\\n!SystemDictionary methodsFor: 'sources, change log' stamp: 'md 5/16/2006 12:34'!\\\\nversion\\\\n\\\\t\\\\\\\"Answer the version of this release.\\\\\\\"\\\\n\\\\n\\\\t^SystemVersion current version! !\\\\n\\\\n!SystemDictionary methodsFor: 'sources, change log' stamp: 'JMM 4/13/2005 20:35'!\\\\nwordSize\\\\n\\\\t\\\\\\\"Answer the size (in bytes) of an object pointer.\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk wordSize\\\\\\\"\\\\n\\\\n\\\\t^[SmalltalkImage current vmParameterAt: 40] on: Error do: [4]! !\\\\n\\\\n!SystemDictionary methodsFor: 'sources, change log' stamp: 'nk 8/21/2004 15:55'!\\\\nwriteRecentCharacters: nCharacters toFileNamed: aFilename\\\\n\\\\t\\\\\\\"Schedule an editable text view on the last n characters of changes.\\\\\\\"\\\\n\\\\t| changes |\\\\n\\\\tchanges _ SourceFiles at: 2.\\\\n\\\\tchanges setToEnd; skip: nCharacters negated.\\\\n\\\\t(StandardFileStream newFileNamed: aFilename) nextPutAll: (changes next: nCharacters); close; open; edit! !\\\\n\\\\n!SystemDictionary methodsFor: 'sources, change log' stamp: 'ar 9/27/2005 22:38'!\\\\nwriteRecentToFile\\\\n\\\\t\\\\\\\"Smalltalk writeRecentToFile\\\\\\\"\\\\n\\\\t| numChars aDirectory aFileName |\\\\n\\\\taDirectory := FileDirectory default.\\\\n\\\\taFileName := Utilities\\\\n\\\\t\\\\t\\\\t\\\\tkeyLike: 'squeak-recent.01'\\\\n\\\\t\\\\t\\\\t\\\\twithTrailing: '.log'\\\\n\\\\t\\\\t\\\\t\\\\tsatisfying: [:aKey | (aDirectory includesKey: aKey) not].\\\\n\\\\tnumChars := ChangeSet getRecentLocatorWithPrompt: 'copy logged source as far back as...'.\\\\n\\\\tnumChars\\\\n\\\\t\\\\tifNotNil: [self writeRecentCharacters: numChars toFileNamed: aFileName]! !\\\\n\\\\n\\\\n!SystemDictionary methodsFor: 'special objects' stamp: 'JMM 6/6/2000 20:36'!\\\\nclearExternalObjects\\\\n\\\\t\\\\\\\"Clear the array of objects that have been registered for use in non-Smalltalk code.\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk clearExternalObjects\\\\\\\"\\\\n\\\\n\\\\tExternalSemaphoreTable clearExternalObjects\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'special objects' stamp: 'sd 9/29/2004 18:30'!\\\\ncompactClassesArray\\\\n\\\\t\\\\\\\"Smalltalk compactClassesArray\\\\\\\"\\\\n\\\\t\\\\\\\"Return the array of 31 classes whose instances may be\\\\n\\\\trepresented compactly\\\\\\\"\\\\n\\\\t^ self specialObjectsArray at: 29! !\\\\n\\\\n!SystemDictionary methodsFor: 'special objects' stamp: 'JMM 6/6/2000 21:01'!\\\\nexternalObjects\\\\n\\\\t\\\\\\\"Return an array of objects that have been registered for use in non-Smalltalk code. Smalltalk objects should be referrenced by external code only via indirection through this array, thus allowing the objects to move during compaction. This array can be cleared when the VM re-starts, since variables in external code do not survive snapshots. Note that external code should not attempt to access a Smalltalk object, even via this mechanism, while garbage collection is in progress.\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk externalObjects\\\\\\\"\\\\n\\\\n\\\\t^ ExternalSemaphoreTable externalObjects\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'special objects'!\\\\nhasSpecialSelector: aLiteral ifTrueSetByte: aBlock\\\\n\\\\n\\\\t1 to: self specialSelectorSize do:\\\\n\\\\t\\\\t[:index | \\\\n\\\\t\\\\t(self specialSelectorAt: index) == aLiteral\\\\n\\\\t\\\\t\\\\tifTrue: [aBlock value: index + 16rAF. ^true]].\\\\n\\\\t^false! !\\\\n\\\\n!SystemDictionary methodsFor: 'special objects' stamp: 'dtl 10/3/2005 05:56'!\\\\nrecreateSpecialObjectsArray\\\\n\\\\t\\\\\\\"Smalltalk recreateSpecialObjectsArray\\\\\\\"\\\\n\\\\t\\\\\\\"The Special Objects Array is an array of object pointers used\\\\n\\\\tby the\\\\n\\\\tSqueak virtual machine. Its contents are critical and\\\\n\\\\tunchecked, so don't even think of playing here unless you\\\\n\\\\tknow what you are doing.\\\\\\\"\\\\n\\\\t| newArray |\\\\n\\\\tnewArray := Array new: 50.\\\\n\\\\t\\\\\\\"Nil false and true get used throughout the interpreter\\\\\\\"\\\\n\\\\tnewArray at: 1 put: nil.\\\\n\\\\tnewArray at: 2 put: false.\\\\n\\\\tnewArray at: 3 put: true.\\\\n\\\\t\\\\\\\"This association holds the active process (a ProcessScheduler)\\\\\\\"\\\\n\\\\tnewArray\\\\n\\\\t\\\\tat: 4\\\\n\\\\t\\\\tput: (self associationAt: #Processor).\\\\n\\\\t\\\\\\\"Numerous classes below used for type checking and\\\\n\\\\tinstantiation\\\\\\\"\\\\n\\\\tnewArray at: 5 put: Bitmap.\\\\n\\\\tnewArray at: 6 put: SmallInteger.\\\\n\\\\tnewArray at: 7 put: ByteString.\\\\n\\\\tnewArray at: 8 put: Array.\\\\n\\\\tnewArray at: 9 put: Smalltalk.\\\\n\\\\tnewArray at: 10 put: Float.\\\\n\\\\tnewArray at: 11 put: MethodContext.\\\\n\\\\tnewArray at: 12 put: BlockContext.\\\\n\\\\tnewArray at: 13 put: Point.\\\\n\\\\tnewArray at: 14 put: LargePositiveInteger.\\\\n\\\\tnewArray at: 15 put: Display.\\\\n\\\\tnewArray at: 16 put: Message.\\\\n\\\\tnewArray at: 17 put: CompiledMethod.\\\\n\\\\tnewArray\\\\n\\\\t\\\\tat: 18\\\\n\\\\t\\\\tput: (self specialObjectsArray at: 18).\\\\n\\\\t\\\\\\\"(low space Semaphore)\\\\\\\"\\\\n\\\\tnewArray at: 19 put: Semaphore.\\\\n\\\\tnewArray at: 20 put: Character.\\\\n\\\\tnewArray at: 21 put: #doesNotUnderstand:.\\\\n\\\\tnewArray at: 22 put: #cannotReturn:.\\\\n\\\\t\\\\\\\"The process that signaled the low space semaphore.\\\\\\\"\\\\n\\\\tnewArray at: 23 put: nil.\\\\n\\\\t\\\\\\\"An array of the 32 selectors that are compiled as special\\\\n\\\\tbytecodes, paired alternately with the number of arguments\\\\n\\\\teach takes.\\\\\\\"\\\\n\\\\tnewArray at: 24 put: #(#+ 1 #- 1 #< 1 \\\";\\n            r = \\\"{13490630, 1448950}\\\";\\n            s = 1;\\n        }\\n    );\\n    r = \\\"{0, 17583493}\\\";\\n    s = 0;\\n}\";\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {3988, 3.06823e+06}}\";\n\t\t\tsepNavSelRange = \"{1340, 0}\";\n\t\t\tsepNavVisRange = \"{0, 2724}\";\n\t\t};\n\t};\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/RoarVMOnIPad.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t0A040E2213B7526D007E172E /* performance_counters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A040E2013B7526D007E172E /* performance_counters.cpp */; };\n\t\t0A4EFFDC13317C0D004BC399 /* iPhone.changes in Resources */ = {isa = PBXBuildFile; fileRef = 0A4EFFD913317C0D004BC399 /* iPhone.changes */; };\n\t\t0A4EFFDD13317C0D004BC399 /* iPhone.image in Resources */ = {isa = PBXBuildFile; fileRef = 0A4EFFDA13317C0D004BC399 /* iPhone.image */; };\n\t\t0A4EFFDE13317C0D004BC399 /* SqueakV3-minimum-MVC.sources in Resources */ = {isa = PBXBuildFile; fileRef = 0A4EFFDB13317C0D004BC399 /* SqueakV3-minimum-MVC.sources */; };\n\t\t0A5D7CAC135E37A900D13E53 /* externals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7CAA135E37A900D13E53 /* externals.cpp */; };\n\t\t0A5D7D6A135E37CB00D13E53 /* abstract_mark_sweep_collector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7CAF135E37CB00D13E53 /* abstract_mark_sweep_collector.cpp */; };\n\t\t0A5D7D6B135E37CB00D13E53 /* abstract_object_heap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7CB1135E37CB00D13E53 /* abstract_object_heap.cpp */; };\n\t\t0A5D7D6C135E37CB00D13E53 /* memory_system.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7CB8135E37CB00D13E53 /* memory_system.cpp */; };\n\t\t0A5D7D6D135E37CB00D13E53 /* multicore_object_heap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7CBB135E37CB00D13E53 /* multicore_object_heap.cpp */; };\n\t\t0A5D7D6E135E37CB00D13E53 /* multicore_object_table.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7CBE135E37CB00D13E53 /* multicore_object_table.cpp */; };\n\t\t0A5D7D72135E37CB00D13E53 /* squeak_image_reader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7CCB135E37CB00D13E53 /* squeak_image_reader.cpp */; };\n\t\t0A5D7D73135E37CB00D13E53 /* at_cache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7CCF135E37CB00D13E53 /* at_cache.cpp */; };\n\t\t0A5D7D74135E37CB00D13E53 /* interpreter_bytecodes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7CD2135E37CB00D13E53 /* interpreter_bytecodes.cpp */; };\n\t\t0A5D7D75135E37CB00D13E53 /* interpreter_primitives.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7CD4135E37CB00D13E53 /* interpreter_primitives.cpp */; };\n\t\t0A5D7D76135E37CB00D13E53 /* method_cache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7CD6135E37CB00D13E53 /* method_cache.cpp */; };\n\t\t0A5D7D77135E37CB00D13E53 /* obsolete_indexed_primitive_table.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7CD8135E37CB00D13E53 /* obsolete_indexed_primitive_table.cpp */; };\n\t\t0A5D7D78135E37CB00D13E53 /* obsolete_named_primitive_table.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7CDA135E37CB00D13E53 /* obsolete_named_primitive_table.cpp */; };\n\t\t0A5D7D79135E37CB00D13E53 /* primitive_table.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7CDC135E37CB00D13E53 /* primitive_table.cpp */; };\n\t\t0A5D7D7A135E37CB00D13E53 /* squeak_interpreter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7CDE135E37CB00D13E53 /* squeak_interpreter.cpp */; };\n\t\t0A5D7D7B135E37CB00D13E53 /* abstract_message.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7CE1135E37CB00D13E53 /* abstract_message.cpp */; };\n\t\t0A5D7D7C135E37CB00D13E53 /* deferred_request.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7CE3135E37CB00D13E53 /* deferred_request.cpp */; };\n\t\t0A5D7D7D135E37CB00D13E53 /* interactions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7CE5135E37CB00D13E53 /* interactions.cpp */; };\n\t\t0A5D7D7E135E37CB00D13E53 /* interpreter_subset_for_control_transfer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7CE7135E37CB00D13E53 /* interpreter_subset_for_control_transfer.cpp */; };\n\t\t0A5D7D7F135E37CB00D13E53 /* message_classes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7CE9135E37CB00D13E53 /* message_classes.cpp */; };\n\t\t0A5D7D80135E37CB00D13E53 /* message_or_ack_request.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7CEB135E37CB00D13E53 /* message_or_ack_request.cpp */; };\n\t\t0A5D7D81135E37CB00D13E53 /* message_statics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7CED135E37CB00D13E53 /* message_statics.cpp */; };\n\t\t0A5D7D82135E37CB00D13E53 /* message_stats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7CEF135E37CB00D13E53 /* message_stats.cpp */; };\n\t\t0A5D7D83135E37CB00D13E53 /* receive_marker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7CF2135E37CB00D13E53 /* receive_marker.cpp */; };\n\t\t0A5D7D84135E37CB00D13E53 /* header_type.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7CF7135E37CB00D13E53 /* header_type.cpp */; };\n\t\t0A5D7D85135E37CB00D13E53 /* object.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7CF9135E37CB00D13E53 /* object.cpp */; };\n\t\t0A5D7D86135E37CB00D13E53 /* process_field_locator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7CFF135E37CB00D13E53 /* process_field_locator.cpp */; };\n\t\t0A5D7D87135E37CB00D13E53 /* roots.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D01135E37CB00D13E53 /* roots.cpp */; };\n\t\t0A5D7D88135E37CB00D13E53 /* oop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D07135E37CB00D13E53 /* oop.cpp */; };\n\t\t0A5D7D89135E37CB00D13E53 /* abstract_os_interface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D0F135E37CB00D13E53 /* abstract_os_interface.cpp */; };\n\t\t0A5D7D8A135E37CB00D13E53 /* dummy_cpu_coordinate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D13135E37CB00D13E53 /* dummy_cpu_coordinate.cpp */; };\n\t\t0A5D7D8B135E37CB00D13E53 /* ilib_message_queue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D15135E37CB00D13E53 /* ilib_message_queue.cpp */; };\n\t\t0A5D7D8C135E37CB00D13E53 /* ilib_os_interface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D17135E37CB00D13E53 /* ilib_os_interface.cpp */; };\n\t\t0A5D7D8D135E37CB00D13E53 /* logical_core.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D19135E37CB00D13E53 /* logical_core.cpp */; };\n\t\t0A5D7D8E135E37CB00D13E53 /* osx_os_interface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D1E135E37CB00D13E53 /* osx_os_interface.cpp */; };\n\t\t0A5D7D8F135E37CB00D13E53 /* posix_os_interface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D20135E37CB00D13E53 /* posix_os_interface.cpp */; };\n\t\t0A5D7D90135E37CB00D13E53 /* process_memory_semantics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D22135E37CB00D13E53 /* process_memory_semantics.cpp */; };\n\t\t0A5D7D91135E37CB00D13E53 /* shared_memory_message_queue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D24135E37CB00D13E53 /* shared_memory_message_queue.cpp */; };\n\t\t0A5D7D92135E37CB00D13E53 /* shared_memory_message_queue_per_sender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D26135E37CB00D13E53 /* shared_memory_message_queue_per_sender.cpp */; };\n\t\t0A5D7D93135E37CB00D13E53 /* thread_memory_semantics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D28135E37CB00D13E53 /* thread_memory_semantics.cpp */; };\n\t\t0A5D7D94135E37CB00D13E53 /* tile_cpu_coordinate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D2A135E37CB00D13E53 /* tile_cpu_coordinate.cpp */; };\n\t\t0A5D7D95135E37CB00D13E53 /* RVMPlugin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D2D135E37CB00D13E53 /* RVMPlugin.cpp */; };\n\t\t0A5D7D96135E37CB00D13E53 /* abstract_mutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D30135E37CB00D13E53 /* abstract_mutex.cpp */; };\n\t\t0A5D7D97135E37CB00D13E53 /* abstract_tracer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D32135E37CB00D13E53 /* abstract_tracer.cpp */; };\n\t\t0A5D7D98135E37CB00D13E53 /* bytemap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D34135E37CB00D13E53 /* bytemap.cpp */; };\n\t\t0A5D7D99135E37CB00D13E53 /* core_tracer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D36135E37CB00D13E53 /* core_tracer.cpp */; };\n\t\t0A5D7D9A135E37CB00D13E53 /* debug_helper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D38135E37CB00D13E53 /* debug_helper.cpp */; };\n\t\t0A5D7D9C135E37CB00D13E53 /* error_handling.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D3D135E37CB00D13E53 /* error_handling.cpp */; };\n\t\t0A5D7D9D135E37CB00D13E53 /* execution_tracer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D3F135E37CB00D13E53 /* execution_tracer.cpp */; };\n\t\t0A5D7D9E135E37CB00D13E53 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D42135E37CB00D13E53 /* main.cpp */; };\n\t\t0A5D7D9F135E37CB00D13E53 /* measurements.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D43135E37CB00D13E53 /* measurements.cpp */; };\n\t\t0A5D7DA0135E37CB00D13E53 /* my_rank.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D45135E37CB00D13E53 /* my_rank.cpp */; };\n\t\t0A5D7DA1135E37CB00D13E53 /* oop_tracer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D47135E37CB00D13E53 /* oop_tracer.cpp */; };\n\t\t0A5D7DA2135E37CB00D13E53 /* printer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D49135E37CB00D13E53 /* printer.cpp */; };\n\t\t0A5D7DA3135E37CB00D13E53 /* profiling_tracer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D4B135E37CB00D13E53 /* profiling_tracer.cpp */; };\n\t\t0A5D7DA4135E37CB00D13E53 /* rank_set.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D4D135E37CB00D13E53 /* rank_set.cpp */; };\n\t\t0A5D7DA5135E37CB00D13E53 /* rvm_bitmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D50135E37CB00D13E53 /* rvm_bitmap.cpp */; };\n\t\t0A5D7DA6135E37CB00D13E53 /* rvm_config.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D52135E37CB00D13E53 /* rvm_config.cpp */; };\n\t\t0A5D7DA7135E37CB00D13E53 /* safepoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D54135E37CB00D13E53 /* safepoint.cpp */; };\n\t\t0A5D7DA8135E37CB00D13E53 /* safepoint_ability.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D56135E37CB00D13E53 /* safepoint_ability.cpp */; };\n\t\t0A5D7DA9135E37CB00D13E53 /* safepoint_request_queue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D58135E37CB00D13E53 /* safepoint_request_queue.cpp */; };\n\t\t0A5D7DAA135E37CB00D13E53 /* scheduler_mutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D5A135E37CB00D13E53 /* scheduler_mutex.cpp */; };\n\t\t0A5D7DAB135E37CB00D13E53 /* semaphore_mutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D5C135E37CB00D13E53 /* semaphore_mutex.cpp */; };\n\t\t0A5D7DAC135E37CB00D13E53 /* squeak_adapters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D5E135E37CB00D13E53 /* squeak_adapters.cpp */; };\n\t\t0A5D7DAD135E37CB00D13E53 /* timeout_deferral.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D60135E37CB00D13E53 /* timeout_deferral.cpp */; };\n\t\t0A5D7DAE135E37CB00D13E53 /* timeout_timer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D62135E37CB00D13E53 /* timeout_timer.cpp */; };\n\t\t0A5D7DAF135E37CB00D13E53 /* utils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A5D7D66135E37CB00D13E53 /* utils.cpp */; };\n\t\t0A890E9A13FDA46400067C04 /* Squeak72x72.png in Resources */ = {isa = PBXBuildFile; fileRef = 0A890E9913FDA46400067C04 /* Squeak72x72.png */; };\n\t\t0AA32BAA135EC5EE00B97FB8 /* sqFilePluginBasicPrims.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B32135EC5EE00B97FB8 /* sqFilePluginBasicPrims.c */; };\n\t\t0AA32BAB135EC5EE00B97FB8 /* Error.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B38135EC5EE00B97FB8 /* Error.c */; };\n\t\t0AA32BAC135EC5EE00B97FB8 /* jcapimin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B39135EC5EE00B97FB8 /* jcapimin.c */; };\n\t\t0AA32BAD135EC5EE00B97FB8 /* jcapistd.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B3A135EC5EE00B97FB8 /* jcapistd.c */; };\n\t\t0AA32BAE135EC5EE00B97FB8 /* jccoefct.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B3B135EC5EE00B97FB8 /* jccoefct.c */; };\n\t\t0AA32BAF135EC5EE00B97FB8 /* jccolor.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B3C135EC5EE00B97FB8 /* jccolor.c */; };\n\t\t0AA32BB0135EC5EE00B97FB8 /* jcdctmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B3D135EC5EE00B97FB8 /* jcdctmgr.c */; };\n\t\t0AA32BB1135EC5EE00B97FB8 /* jchuff.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B3E135EC5EE00B97FB8 /* jchuff.c */; };\n\t\t0AA32BB2135EC5EE00B97FB8 /* jcinit.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B40135EC5EE00B97FB8 /* jcinit.c */; };\n\t\t0AA32BB3135EC5EE00B97FB8 /* jcmainct.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B41135EC5EE00B97FB8 /* jcmainct.c */; };\n\t\t0AA32BB4135EC5EE00B97FB8 /* jcmarker.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B42135EC5EE00B97FB8 /* jcmarker.c */; };\n\t\t0AA32BB5135EC5EE00B97FB8 /* jcmaster.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B43135EC5EE00B97FB8 /* jcmaster.c */; };\n\t\t0AA32BB6135EC5EE00B97FB8 /* jcomapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B44135EC5EE00B97FB8 /* jcomapi.c */; };\n\t\t0AA32BB7135EC5EE00B97FB8 /* jcparam.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B46135EC5EE00B97FB8 /* jcparam.c */; };\n\t\t0AA32BB8135EC5EE00B97FB8 /* jcphuff.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B47135EC5EE00B97FB8 /* jcphuff.c */; };\n\t\t0AA32BB9135EC5EE00B97FB8 /* jcprepct.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B48135EC5EE00B97FB8 /* jcprepct.c */; };\n\t\t0AA32BBA135EC5EE00B97FB8 /* jcsample.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B49135EC5EE00B97FB8 /* jcsample.c */; };\n\t\t0AA32BBB135EC5EE00B97FB8 /* jctrans.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B4A135EC5EE00B97FB8 /* jctrans.c */; };\n\t\t0AA32BBC135EC5EE00B97FB8 /* jdapimin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B4B135EC5EE00B97FB8 /* jdapimin.c */; };\n\t\t0AA32BBD135EC5EE00B97FB8 /* jdapistd.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B4C135EC5EE00B97FB8 /* jdapistd.c */; };\n\t\t0AA32BBE135EC5EE00B97FB8 /* jdatadst.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B4D135EC5EE00B97FB8 /* jdatadst.c */; };\n\t\t0AA32BBF135EC5EE00B97FB8 /* jdatasrc.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B4E135EC5EE00B97FB8 /* jdatasrc.c */; };\n\t\t0AA32BC0135EC5EE00B97FB8 /* jdcoefct.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B4F135EC5EE00B97FB8 /* jdcoefct.c */; };\n\t\t0AA32BC1135EC5EE00B97FB8 /* jdcolor.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B50135EC5EE00B97FB8 /* jdcolor.c */; };\n\t\t0AA32BC2135EC5EE00B97FB8 /* jddctmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B52135EC5EE00B97FB8 /* jddctmgr.c */; };\n\t\t0AA32BC3135EC5EE00B97FB8 /* jdhuff.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B53135EC5EE00B97FB8 /* jdhuff.c */; };\n\t\t0AA32BC4135EC5EE00B97FB8 /* jdinput.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B55135EC5EE00B97FB8 /* jdinput.c */; };\n\t\t0AA32BC5135EC5EE00B97FB8 /* jdmainct.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B56135EC5EE00B97FB8 /* jdmainct.c */; };\n\t\t0AA32BC6135EC5EE00B97FB8 /* jdmarker.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B57135EC5EE00B97FB8 /* jdmarker.c */; };\n\t\t0AA32BC7135EC5EE00B97FB8 /* jdmaster.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B58135EC5EE00B97FB8 /* jdmaster.c */; };\n\t\t0AA32BC8135EC5EE00B97FB8 /* jdmerge.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B59135EC5EE00B97FB8 /* jdmerge.c */; };\n\t\t0AA32BC9135EC5EE00B97FB8 /* jdphuff.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B5A135EC5EE00B97FB8 /* jdphuff.c */; };\n\t\t0AA32BCA135EC5EE00B97FB8 /* jdpostct.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B5B135EC5EE00B97FB8 /* jdpostct.c */; };\n\t\t0AA32BCB135EC5EE00B97FB8 /* jdsample.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B5C135EC5EE00B97FB8 /* jdsample.c */; };\n\t\t0AA32BCC135EC5EE00B97FB8 /* jdtrans.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B5D135EC5EE00B97FB8 /* jdtrans.c */; };\n\t\t0AA32BCD135EC5EE00B97FB8 /* jerror.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B5E135EC5EE00B97FB8 /* jerror.c */; };\n\t\t0AA32BCE135EC5EE00B97FB8 /* jfdctflt.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B60135EC5EE00B97FB8 /* jfdctflt.c */; };\n\t\t0AA32BCF135EC5EE00B97FB8 /* jfdctfst.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B61135EC5EE00B97FB8 /* jfdctfst.c */; };\n\t\t0AA32BD0135EC5EE00B97FB8 /* jfdctint.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B62135EC5EE00B97FB8 /* jfdctint.c */; };\n\t\t0AA32BD1135EC5EE00B97FB8 /* jidctflt.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B63135EC5EE00B97FB8 /* jidctflt.c */; };\n\t\t0AA32BD2135EC5EE00B97FB8 /* jidctfst.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B64135EC5EE00B97FB8 /* jidctfst.c */; };\n\t\t0AA32BD3135EC5EE00B97FB8 /* jidctint.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B65135EC5EE00B97FB8 /* jidctint.c */; };\n\t\t0AA32BD4135EC5EE00B97FB8 /* jidctred.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B66135EC5EE00B97FB8 /* jidctred.c */; };\n\t\t0AA32BD5135EC5EE00B97FB8 /* jmemdatadst.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B68135EC5EE00B97FB8 /* jmemdatadst.c */; };\n\t\t0AA32BD6135EC5EE00B97FB8 /* jmemdatasrc.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B69135EC5EE00B97FB8 /* jmemdatasrc.c */; };\n\t\t0AA32BD7135EC5EE00B97FB8 /* jmemmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B6A135EC5EE00B97FB8 /* jmemmgr.c */; };\n\t\t0AA32BD8135EC5EE00B97FB8 /* jmemnobs.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B6B135EC5EE00B97FB8 /* jmemnobs.c */; };\n\t\t0AA32BD9135EC5EE00B97FB8 /* jquant1.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B71135EC5EE00B97FB8 /* jquant1.c */; };\n\t\t0AA32BDA135EC5EE00B97FB8 /* jquant2.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B72135EC5EE00B97FB8 /* jquant2.c */; };\n\t\t0AA32BDB135EC5EE00B97FB8 /* jutils.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B73135EC5EE00B97FB8 /* jutils.c */; };\n\t\t0AA32BDC135EC5EE00B97FB8 /* ReadMe.txt in Resources */ = {isa = PBXBuildFile; fileRef = 0AA32B75135EC5EE00B97FB8 /* ReadMe.txt */; };\n\t\t0AA32BDD135EC5EE00B97FB8 /* chartables.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B7F135EC5EE00B97FB8 /* chartables.c */; };\n\t\t0AA32BDE135EC5EE00B97FB8 /* get.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B81135EC5EE00B97FB8 /* get.c */; };\n\t\t0AA32BDF135EC5EE00B97FB8 /* pcre.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B84135EC5EE00B97FB8 /* pcre.c */; };\n\t\t0AA32BE0135EC5EE00B97FB8 /* RePlugin3-Fixes.1.cs in Resources */ = {isa = PBXBuildFile; fileRef = 0AA32B87135EC5EE00B97FB8 /* RePlugin3-Fixes.1.cs */; };\n\t\t0AA32BE1135EC5EE00B97FB8 /* RePlugin3-Fixes2.1.cs in Resources */ = {isa = PBXBuildFile; fileRef = 0AA32B88135EC5EE00B97FB8 /* RePlugin3-Fixes2.1.cs */; };\n\t\t0AA32BE2135EC5EE00B97FB8 /* RePlugin3.3.1.cs in Resources */ = {isa = PBXBuildFile; fileRef = 0AA32B89135EC5EE00B97FB8 /* RePlugin3.3.1.cs */; };\n\t\t0AA32BE3135EC5EE00B97FB8 /* study.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B8A135EC5EE00B97FB8 /* study.c */; };\n\t\t0AA32BE4135EC5EE00B97FB8 /* SocketPrims.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 0AA32B8F135EC5EE00B97FB8 /* SocketPrims.pdf */; };\n\t\t0AA32BE5135EC5EE00B97FB8 /* sqSoundCodecPluginBasicPrims.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B92135EC5EE00B97FB8 /* sqSoundCodecPluginBasicPrims.c */; };\n\t\t0AA32BE6135EC5EE00B97FB8 /* b3dAlloc.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B99135EC5EE00B97FB8 /* b3dAlloc.c */; };\n\t\t0AA32BE7135EC5EE00B97FB8 /* b3dDraw.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B9B135EC5EE00B97FB8 /* b3dDraw.c */; };\n\t\t0AA32BE8135EC5EE00B97FB8 /* b3dInit.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B9C135EC5EE00B97FB8 /* b3dInit.c */; };\n\t\t0AA32BE9135EC5EE00B97FB8 /* b3dMain.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B9D135EC5EE00B97FB8 /* b3dMain.c */; };\n\t\t0AA32BEA135EC5EE00B97FB8 /* b3dRemap.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32B9E135EC5EE00B97FB8 /* b3dRemap.c */; };\n\t\t0AA32BEB135EC5EE00B97FB8 /* sqManualSurface.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32BA2135EC5EE00B97FB8 /* sqManualSurface.c */; };\n\t\t0AA32BEC135EC5EE00B97FB8 /* SurfacePlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32BA6135EC5EE00B97FB8 /* SurfacePlugin.c */; };\n\t\t0AA32BF2135EC61300B97FB8 /* sqNamedPrims.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32BF0135EC61300B97FB8 /* sqNamedPrims.c */; };\n\t\t0AA32BF3135EC61300B97FB8 /* sqVirtualMachine.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32BF1135EC61300B97FB8 /* sqVirtualMachine.c */; };\n\t\t0AA32C00135EC69F00B97FB8 /* drawing.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32BF7135EC69F00B97FB8 /* drawing.m */; };\n\t\t0AA32C01135EC69F00B97FB8 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 0AA32BF8135EC69F00B97FB8 /* Info.plist */; };\n\t\t0AA32C02135EC69F00B97FB8 /* PDColoredProgressView.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32BFA135EC69F00B97FB8 /* PDColoredProgressView.m */; };\n\t\t0AA32C03135EC69F00B97FB8 /* SqueakObjectiveC.xcodeproj.zip in Resources */ = {isa = PBXBuildFile; fileRef = 0AA32BFB135EC69F00B97FB8 /* SqueakObjectiveC.xcodeproj.zip */; };\n\t\t0AA32C04135EC69F00B97FB8 /* squeakProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32BFD135EC69F00B97FB8 /* squeakProxy.m */; };\n\t\t0AA32C05135EC69F00B97FB8 /* squeakSUnitTester.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32BFF135EC69F00B97FB8 /* squeakSUnitTester.m */; };\n\t\t0AA32C0B135EC6D900B97FB8 /* sqUnixAsynchFile.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32C09135EC6D900B97FB8 /* sqUnixAsynchFile.c */; };\n\t\t0AA32C0F135EC6F400B97FB8 /* dummyFFI.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32C0D135EC6F400B97FB8 /* dummyFFI.c */; };\n\t\t0AA32C17135EC70F00B97FB8 /* sqMacSecurity.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32C11135EC70F00B97FB8 /* sqMacSecurity.c */; };\n\t\t0AA32C18135EC70F00B97FB8 /* sqSqueakSoundCoreAudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32C14135EC70F00B97FB8 /* sqSqueakSoundCoreAudio.m */; };\n\t\t0AA32C19135EC70F00B97FB8 /* sqSqueakSoundCoreAudioAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32C16135EC70F00B97FB8 /* sqSqueakSoundCoreAudioAPI.m */; };\n\t\t0AA32C7B135ECFDD00B97FB8 /* sqUnixExternalPrims.c in Sources */ = {isa = PBXBuildFile; fileRef = 0AA32C1B135EC76600B97FB8 /* sqUnixExternalPrims.c */; };\n\t\t0ABEA92513C26C7A003108B9 /* gc_debugging_tracer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0ABEA92313C26C7A003108B9 /* gc_debugging_tracer.cpp */; };\n\t\t0ADE8A8F135F38B200D37EAD /* AsynchFilePlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0ADE8A7C135F38B200D37EAD /* AsynchFilePlugin.c */; };\n\t\t0ADE8A90135F38B200D37EAD /* B2DPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0ADE8A7E135F38B200D37EAD /* B2DPlugin.c */; };\n\t\t0ADE8A91135F38B200D37EAD /* BitBltPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0ADE8A80135F38B200D37EAD /* BitBltPlugin.c */; };\n\t\t0ADE8A92135F38B200D37EAD /* BMPReadWriterPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0ADE8A82135F38B200D37EAD /* BMPReadWriterPlugin.c */; };\n\t\t0ADE8A93135F38B200D37EAD /* DSAPrims.c in Sources */ = {isa = PBXBuildFile; fileRef = 0ADE8A84135F38B200D37EAD /* DSAPrims.c */; };\n\t\t0ADE8A94135F38B200D37EAD /* FFTPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0ADE8A86135F38B200D37EAD /* FFTPlugin.c */; };\n\t\t0ADE8A95135F38B200D37EAD /* FilePlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0ADE8A88135F38B200D37EAD /* FilePlugin.c */; };\n\t\t0ADE8A96135F38B200D37EAD /* FloatArrayPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0ADE8A8A135F38B200D37EAD /* FloatArrayPlugin.c */; };\n\t\t0ADE8A97135F38B200D37EAD /* GeniePlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0ADE8A8C135F38B200D37EAD /* GeniePlugin.c */; };\n\t\t0ADE8A98135F38B200D37EAD /* HostWindowPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0ADE8A8E135F38B200D37EAD /* HostWindowPlugin.c */; };\n\t\t0ADE8AB5135F38FE00D37EAD /* JPEGReaderPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0ADE8A9A135F38FE00D37EAD /* JPEGReaderPlugin.c */; };\n\t\t0ADE8AB6135F38FE00D37EAD /* JPEGReadWriter2Plugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0ADE8A9C135F38FE00D37EAD /* JPEGReadWriter2Plugin.c */; };\n\t\t0ADE8AB7135F38FE00D37EAD /* Klatt.c in Sources */ = {isa = PBXBuildFile; fileRef = 0ADE8A9E135F38FE00D37EAD /* Klatt.c */; };\n\t\t0ADE8AB8135F38FE00D37EAD /* LargeIntegers.c in Sources */ = {isa = PBXBuildFile; fileRef = 0ADE8AA0135F38FE00D37EAD /* LargeIntegers.c */; };\n\t\t0ADE8AB9135F38FE00D37EAD /* Matrix2x3Plugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0ADE8AA2135F38FE00D37EAD /* Matrix2x3Plugin.c */; };\n\t\t0ADE8ABA135F38FE00D37EAD /* MiscPrimitivePlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0ADE8AA4135F38FE00D37EAD /* MiscPrimitivePlugin.c */; };\n\t\t0ADE8ABB135F38FE00D37EAD /* ObjectiveCPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0ADE8AA6135F38FE00D37EAD /* ObjectiveCPlugin.c */; };\n\t\t0ADE8ABC135F38FE00D37EAD /* RePlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0ADE8AA8135F38FE00D37EAD /* RePlugin.c */; };\n\t\t0ADE8ABD135F38FE00D37EAD /* SecurityPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0ADE8AAA135F38FE00D37EAD /* SecurityPlugin.c */; };\n\t\t0ADE8ABE135F38FE00D37EAD /* SocketPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0ADE8AAC135F38FE00D37EAD /* SocketPlugin.c */; };\n\t\t0ADE8ABF135F38FE00D37EAD /* SoundCodecPrims.c in Sources */ = {isa = PBXBuildFile; fileRef = 0ADE8AAE135F38FE00D37EAD /* SoundCodecPrims.c */; };\n\t\t0ADE8AC0135F38FE00D37EAD /* SoundGenerationPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0ADE8AB0135F38FE00D37EAD /* SoundGenerationPlugin.c */; };\n\t\t0ADE8AC1135F38FE00D37EAD /* SoundPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0ADE8AB2135F38FE00D37EAD /* SoundPlugin.c */; };\n\t\t0ADE8AC2135F38FE00D37EAD /* Squeak3D.c in Sources */ = {isa = PBXBuildFile; fileRef = 0ADE8AB4135F38FE00D37EAD /* Squeak3D.c */; };\n\t\t0ADE8ACC135F392E00D37EAD /* StarSqueakPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0ADE8AC6135F392E00D37EAD /* StarSqueakPlugin.c */; };\n\t\t0ADE8ACD135F392E00D37EAD /* UUIDPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0ADE8AC8135F392E00D37EAD /* UUIDPlugin.c */; };\n\t\t0ADE8ACE135F392E00D37EAD /* ZipPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 0ADE8ACA135F392E00D37EAD /* ZipPlugin.c */; };\n\t\t0ADE8ACF135F399D00D37EAD /* sqUnixSocket.c in Sources */ = {isa = PBXBuildFile; fileRef = 94883B400E0C2B9C005A4738 /* sqUnixSocket.c */; };\n\t\t1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; };\n\t\t1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };\n\t\t28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; };\n\t\t940BE57B1239F10000674A11 /* SqueakUIViewCALayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 940BE57A1239F10000674A11 /* SqueakUIViewCALayer.m */; };\n\t\t940BE5E91239F50100674A11 /* SqueakUIViewOpenGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 940BE5E81239F50100674A11 /* SqueakUIViewOpenGL.m */; };\n\t\t940BE5F91239F70D00674A11 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 940BE5F81239F70D00674A11 /* OpenGLES.framework */; };\n\t\t9412CAB30E6C037B00DB8625 /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 9412CAB20E6C037B00DB8625 /* Settings.bundle */; };\n\t\t9412CAE60E6C05EC00DB8625 /* sqSqueakInfoPlistInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = 9412CAE50E6C05EC00DB8625 /* sqSqueakInfoPlistInterface.m */; };\n\t\t9424FF760DDCB271009912BF /* osExports.c in Sources */ = {isa = PBXBuildFile; fileRef = 9424FF750DDCB271009912BF /* osExports.c */; };\n\t\t942F75D30E0B67AD00848BF2 /* sqSqueakVmAndImagePathAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 942F75D20E0B67AD00848BF2 /* sqSqueakVmAndImagePathAPI.m */; };\n\t\t942F76320E0B6C7600848BF2 /* sqSqueakMainApplication+attributes.m in Sources */ = {isa = PBXBuildFile; fileRef = 942F76310E0B6C7600848BF2 /* sqSqueakMainApplication+attributes.m */; };\n\t\t9452D5E50E044A9D000AD792 /* Queue.m in Sources */ = {isa = PBXBuildFile; fileRef = 9452D5D80E044A9D000AD792 /* Queue.m */; };\n\t\t9452D5E60E044A9D000AD792 /* sqMacV2Time.c in Sources */ = {isa = PBXBuildFile; fileRef = 9452D5D90E044A9D000AD792 /* sqMacV2Time.c */; };\n\t\t9452D5E70E044A9D000AD792 /* sqSqueakFileDirectoryAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 9452D5DC0E044A9D000AD792 /* sqSqueakFileDirectoryAPI.m */; };\n\t\t9452D5E80E044A9D000AD792 /* sqSqueakFileDirectoryInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = 9452D5DE0E044A9D000AD792 /* sqSqueakFileDirectoryInterface.m */; };\n\t\t9452D5E90E044A9D000AD792 /* sqSqueakMainApp.m in Sources */ = {isa = PBXBuildFile; fileRef = 9452D5DF0E044A9D000AD792 /* sqSqueakMainApp.m */; };\n\t\t9452D5EA0E044A9D000AD792 /* sqSqueakMainApplication+vmAndImagePath.m in Sources */ = {isa = PBXBuildFile; fileRef = 9452D5E20E044A9D000AD792 /* sqSqueakMainApplication+vmAndImagePath.m */; };\n\t\t9452D5EB0E044A9D000AD792 /* sqSqueakMainApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = 9452D5E40E044A9D000AD792 /* sqSqueakMainApplication.m */; };\n\t\t9452D6030E044CB3000AD792 /* sqSqueakAttributesAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 9452D6020E044CB3000AD792 /* sqSqueakAttributesAPI.m */; };\n\t\t9452D6080E044D2F000AD792 /* sqSqueakEventsAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 9452D6070E044D2F000AD792 /* sqSqueakEventsAPI.m */; };\n\t\t945550010DF1BC6A00FB176B /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 945550000DF1BC6A00FB176B /* AudioToolbox.framework */; };\n\t\t94577FBD10684D5E0020840A /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94577FBC10684D5E0020840A /* CoreAudio.framework */; };\n\t\t94577FBF10684D5E0020840A /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94577FBE10684D5E0020840A /* CoreLocation.framework */; };\n\t\t94577FC510684D7E0020840A /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94577FC410684D7E0020840A /* SystemConfiguration.framework */; };\n\t\t9458525610F04339001401E7 /* sqSqueakIPhoneClipboardAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 9458525510F04339001401E7 /* sqSqueakIPhoneClipboardAPI.m */; };\n\t\t9458525C10F043EB001401E7 /* sqSqueakIPhoneApplication+clipboard.m in Sources */ = {isa = PBXBuildFile; fileRef = 9458525B10F043EB001401E7 /* sqSqueakIPhoneApplication+clipboard.m */; };\n\t\t945C95FF0E97084C00529DC1 /* aio.c in Sources */ = {isa = PBXBuildFile; fileRef = 94883B2A0E0C2A5E005A4738 /* aio.c */; };\n\t\t9471D2730E04703B00703D45 /* sqSqueakScreenAndWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 9471D2720E04703B00703D45 /* sqSqueakScreenAndWindow.m */; };\n\t\t9471D2E10E04743F00703D45 /* sqSqueakAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9471D2E00E04743F00703D45 /* sqSqueakAppDelegate.m */; };\n\t\t9484F8DB10B0E09B0038BDC0 /* sqiPhoneScreenAndWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 9452D7640E0452D3000AD792 /* sqiPhoneScreenAndWindow.m */; };\n\t\t9484F8DC10B0E0C60038BDC0 /* sqSqueakIPhoneApplication+attributes.m in Sources */ = {isa = PBXBuildFile; fileRef = 94A0E8450DE5EB6E0071C8B9 /* sqSqueakIPhoneApplication+attributes.m */; };\n\t\t9484F8DD10B0E0C70038BDC0 /* sqSqueakIPhoneApplication+events.m in Sources */ = {isa = PBXBuildFile; fileRef = 94BCE93F0DDE044700F38F31 /* sqSqueakIPhoneApplication+events.m */; };\n\t\t9484F8DE10B0E0C90038BDC0 /* sqSqueakIPhoneApplication+imageReadWrite.m in Sources */ = {isa = PBXBuildFile; fileRef = 943001270E0D5D670040BB27 /* sqSqueakIPhoneApplication+imageReadWrite.m */; };\n\t\t9484F8DF10B0E0CB0038BDC0 /* sqSqueakIPhoneApplication+Network.m in Sources */ = {isa = PBXBuildFile; fileRef = 9452BDC20F4095DE006410DE /* sqSqueakIPhoneApplication+Network.m */; };\n\t\t9484F8E010B0E0CE0038BDC0 /* sqSqueakiPhoneApplication+sound.m in Sources */ = {isa = PBXBuildFile; fileRef = 94554F1E0DF1B65700FB176B /* sqSqueakiPhoneApplication+sound.m */; };\n\t\t9484F8E110B0E0CE0038BDC0 /* sqSqueakIPhoneApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = 942F761C0E0B6B6100848BF2 /* sqSqueakIPhoneApplication.m */; };\n\t\t9484F8E210B0E0D10038BDC0 /* sqSqueakIPhoneFileDirectoryInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = 943001A40E0D600C0040BB27 /* sqSqueakIPhoneFileDirectoryInterface.m */; };\n\t\t9484F8E310B0E0D30038BDC0 /* sqSqueakIPhoneInfoPlistInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = 94F879900E6C0C7E00662DEA /* sqSqueakIPhoneInfoPlistInterface.m */; };\n\t\t9484F8E410B0E0ED0038BDC0 /* Squeak.png in Resources */ = {isa = PBXBuildFile; fileRef = 94F3A9690E6BFA7C00E0B12A /* Squeak.png */; };\n\t\t9484F8E510B0E0F00038BDC0 /* SqueakNoOGLIPhoneAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* SqueakNoOGLIPhoneAppDelegate.m */; };\n\t\t9484F8E610B0E0FD0038BDC0 /* SqueakUIController.m in Sources */ = {isa = PBXBuildFile; fileRef = 940CE8550DFCE2D200EBA91B /* SqueakUIController.m */; };\n\t\t9484F8E710B0E0FE0038BDC0 /* SqueakUIView.m in Sources */ = {isa = PBXBuildFile; fileRef = 949E5DB60DE3AB6A007388E0 /* SqueakUIView.m */; };\n\t\t9484F8E810B0E1050038BDC0 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };\n\t\t9484F8EF10B0E1580038BDC0 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 945550910DF2041100FB176B /* Default.png */; };\n\t\t9484F99010B13D470038BDC0 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D3623EB0D0F72F000981E51 /* CoreGraphics.framework */; };\n\t\t9484F9AF10B13DA50038BDC0 /* sqMacHostWindow.c in Sources */ = {isa = PBXBuildFile; fileRef = 94BCEA2B0DDE0C1600F38F31 /* sqMacHostWindow.c */; };\n\t\t948EC3901155312600B08A4F /* MainWindow-iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 948EC38F1155312600B08A4F /* MainWindow-iPad.xib */; };\n\t\t94A0E8850DE5EF430071C8B9 /* sqSqueakMainApplication+imageReadWrite.m in Sources */ = {isa = PBXBuildFile; fileRef = 94A0E8840DE5EF430071C8B9 /* sqSqueakMainApplication+imageReadWrite.m */; };\n\t\t94A0E9840DE5F1FE0071C8B9 /* sqSqueakMainApplication+screen.m in Sources */ = {isa = PBXBuildFile; fileRef = 94A0E9830DE5F1FE0071C8B9 /* sqSqueakMainApplication+screen.m */; };\n\t\t94A1B0070E0DBE2400EB5EFC /* sqSqueakMainApplication+events.m in Sources */ = {isa = PBXBuildFile; fileRef = 94A1B0060E0DBE2400EB5EFC /* sqSqueakMainApplication+events.m */; };\n\t\t94A1B02D0E0DC10D00EB5EFC /* sqSqueakSoundAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 94A1B02C0E0DC10D00EB5EFC /* sqSqueakSoundAPI.m */; };\n\t\t94A1B0320E0DC19300EB5EFC /* sqSqueakMainApplication+sound.m in Sources */ = {isa = PBXBuildFile; fileRef = 94A1B0310E0DC19300EB5EFC /* sqSqueakMainApplication+sound.m */; };\n\t\t94A3488E0DDCCCC700D1D4A9 /* sqSqueakScreenAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 94A3488D0DDCCCC700D1D4A9 /* sqSqueakScreenAPI.m */; };\n\t\t94B6E9DD10BC777A00333E9E /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 94B6E9DC10BC777A00333E9E /* Localizable.strings */; };\n\t\t94BCE78C0DDDF61200F38F31 /* sqUnixUUID.c in Sources */ = {isa = PBXBuildFile; fileRef = 94BCE7870DDDF61200F38F31 /* sqUnixUUID.c */; };\n\t\t94D2A24C112B8ED000B6E459 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94C208F810AF7262002F4160 /* QuartzCore.framework */; };\n\t\tBC6CC8E9134B045100B9B2B0 /* RoarVMMouseEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = BC6CC8E8134B045100B9B2B0 /* RoarVMMouseEvent.m */; };\n\t\tBC6CC8ED134B138300B9B2B0 /* RoarVMSwipeEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = BC6CC8EC134B138300B9B2B0 /* RoarVMSwipeEvent.m */; };\n\t\tBC82F912135697D000EC2309 /* UIGestureRecognizer+RoarVMEvents.m in Sources */ = {isa = PBXBuildFile; fileRef = BC82F911135697CE00EC2309 /* UIGestureRecognizer+RoarVMEvents.m */; };\n\t\tBC82F9151356A4C400EC2309 /* RoarVMMouseUpEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = BC82F9141356A4C300EC2309 /* RoarVMMouseUpEvent.m */; };\n\t\tBCAB989D134B0139004AB528 /* RoarVMAbstractEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = BCAB989C134B0139004AB528 /* RoarVMAbstractEvent.m */; };\n\t\tBCCC348E1349603100063417 /* Entitlements.plist in Resources */ = {isa = PBXBuildFile; fileRef = BCCC348D1349603100063417 /* Entitlements.plist */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXFileReference section */\n\t\t0A040E2013B7526D007E172E /* performance_counters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = performance_counters.cpp; sourceTree = \"<group>\"; };\n\t\t0A040E2113B7526D007E172E /* performance_counters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = performance_counters.h; sourceTree = \"<group>\"; };\n\t\t0A4EFFD913317C0D004BC399 /* iPhone.changes */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = iPhone.changes; path = iPhone/iPhone.changes; sourceTree = \"<group>\"; };\n\t\t0A4EFFDA13317C0D004BC399 /* iPhone.image */ = {isa = PBXFileReference; lastKnownFileType = file; name = iPhone.image; path = iPhone/iPhone.image; sourceTree = \"<group>\"; };\n\t\t0A4EFFDB13317C0D004BC399 /* SqueakV3-minimum-MVC.sources */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = \"SqueakV3-minimum-MVC.sources\"; path = \"iPhone/SqueakV3-minimum-MVC.sources\"; sourceTree = \"<group>\"; };\n\t\t0A5D7CAA135E37A900D13E53 /* externals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = externals.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7CAB135E37A900D13E53 /* externals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = externals.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CAF135E37CB00D13E53 /* abstract_mark_sweep_collector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = abstract_mark_sweep_collector.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7CB0135E37CB00D13E53 /* abstract_mark_sweep_collector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abstract_mark_sweep_collector.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CB1135E37CB00D13E53 /* abstract_object_heap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = abstract_object_heap.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7CB2135E37CB00D13E53 /* abstract_object_heap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abstract_object_heap.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CB3135E37CB00D13E53 /* abstract_object_heap.inline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abstract_object_heap.inline.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CB4135E37CB00D13E53 /* abstract_object_table.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abstract_object_table.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CB5135E37CB00D13E53 /* gc_oop_stack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gc_oop_stack.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CB6135E37CB00D13E53 /* indirect_oop_mark_sweep_collector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = indirect_oop_mark_sweep_collector.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CB7135E37CB00D13E53 /* mark_sweep_collector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mark_sweep_collector.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CB8135E37CB00D13E53 /* memory_system.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = memory_system.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7CB9135E37CB00D13E53 /* memory_system.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = memory_system.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CBA135E37CB00D13E53 /* memory_system.inline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = memory_system.inline.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CBB135E37CB00D13E53 /* multicore_object_heap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = multicore_object_heap.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7CBC135E37CB00D13E53 /* multicore_object_heap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = multicore_object_heap.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CBD135E37CB00D13E53 /* multicore_object_heap.inline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = multicore_object_heap.inline.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CBE135E37CB00D13E53 /* multicore_object_table.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = multicore_object_table.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7CBF135E37CB00D13E53 /* multicore_object_table.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = multicore_object_table.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CC0135E37CB00D13E53 /* multicore_object_table.inline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = multicore_object_table.inline.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CC1135E37CB00D13E53 /* oop_closure.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oop_closure.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CCB135E37CB00D13E53 /* squeak_image_reader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = squeak_image_reader.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7CCC135E37CB00D13E53 /* squeak_image_reader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = squeak_image_reader.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CCE135E37CB00D13E53 /* abstract_primitive_table.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abstract_primitive_table.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CCF135E37CB00D13E53 /* at_cache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = at_cache.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7CD0135E37CB00D13E53 /* at_cache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = at_cache.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CD1135E37CB00D13E53 /* external_primitive_table.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = external_primitive_table.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CD2135E37CB00D13E53 /* interpreter_bytecodes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = interpreter_bytecodes.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7CD3135E37CB00D13E53 /* interpreter_bytecodes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = interpreter_bytecodes.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CD4135E37CB00D13E53 /* interpreter_primitives.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = interpreter_primitives.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7CD5135E37CB00D13E53 /* interpreter_primitives.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = interpreter_primitives.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CD6135E37CB00D13E53 /* method_cache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = method_cache.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7CD7135E37CB00D13E53 /* method_cache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = method_cache.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CD8135E37CB00D13E53 /* obsolete_indexed_primitive_table.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = obsolete_indexed_primitive_table.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7CD9135E37CB00D13E53 /* obsolete_indexed_primitive_table.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = obsolete_indexed_primitive_table.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CDA135E37CB00D13E53 /* obsolete_named_primitive_table.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = obsolete_named_primitive_table.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7CDB135E37CB00D13E53 /* obsolete_named_primitive_table.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = obsolete_named_primitive_table.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CDC135E37CB00D13E53 /* primitive_table.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = primitive_table.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7CDD135E37CB00D13E53 /* primitive_table.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = primitive_table.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CDE135E37CB00D13E53 /* squeak_interpreter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = squeak_interpreter.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7CDF135E37CB00D13E53 /* squeak_interpreter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = squeak_interpreter.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CE1135E37CB00D13E53 /* abstract_message.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = abstract_message.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7CE2135E37CB00D13E53 /* abstract_message.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abstract_message.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CE3135E37CB00D13E53 /* deferred_request.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = deferred_request.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7CE4135E37CB00D13E53 /* deferred_request.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = deferred_request.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CE5135E37CB00D13E53 /* interactions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = interactions.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7CE6135E37CB00D13E53 /* interactions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = interactions.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CE7135E37CB00D13E53 /* interpreter_subset_for_control_transfer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = interpreter_subset_for_control_transfer.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7CE8135E37CB00D13E53 /* interpreter_subset_for_control_transfer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = interpreter_subset_for_control_transfer.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CE9135E37CB00D13E53 /* message_classes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = message_classes.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7CEA135E37CB00D13E53 /* message_classes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = message_classes.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CEB135E37CB00D13E53 /* message_or_ack_request.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = message_or_ack_request.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7CEC135E37CB00D13E53 /* message_or_ack_request.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = message_or_ack_request.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CED135E37CB00D13E53 /* message_statics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = message_statics.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7CEE135E37CB00D13E53 /* message_statics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = message_statics.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CEF135E37CB00D13E53 /* message_stats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = message_stats.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7CF0135E37CB00D13E53 /* message_stats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = message_stats.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CF1135E37CB00D13E53 /* message_templates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = message_templates.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CF2135E37CB00D13E53 /* receive_marker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = receive_marker.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7CF3135E37CB00D13E53 /* receive_marker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = receive_marker.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CF5135E37CB00D13E53 /* chunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chunk.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CF6135E37CB00D13E53 /* chunk.inline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chunk.inline.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CF7135E37CB00D13E53 /* header_type.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = header_type.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7CF8135E37CB00D13E53 /* header_type.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = header_type.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CF9135E37CB00D13E53 /* object.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = object.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7CFA135E37CB00D13E53 /* object.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = object.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CFB135E37CB00D13E53 /* object.inline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = object.inline.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CFC135E37CB00D13E53 /* object_indices.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = object_indices.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CFD135E37CB00D13E53 /* object_p.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = object_p.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CFE135E37CB00D13E53 /* preheader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = preheader.h; sourceTree = \"<group>\"; };\n\t\t0A5D7CFF135E37CB00D13E53 /* process_field_locator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = process_field_locator.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D00135E37CB00D13E53 /* process_field_locator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = process_field_locator.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D01135E37CB00D13E53 /* roots.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = roots.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D02135E37CB00D13E53 /* roots.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = roots.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D03135E37CB00D13E53 /* special_indices.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = special_indices.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D04135E37CB00D13E53 /* word_containing_object_type.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = word_containing_object_type.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D06135E37CB00D13E53 /* abstract_oop.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abstract_oop.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D07135E37CB00D13E53 /* oop.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = oop.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D08135E37CB00D13E53 /* oop.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oop.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D09135E37CB00D13E53 /* oop.inline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oop.inline.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D0A135E37CB00D13E53 /* tags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tags.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D0C135E37CB00D13E53 /* abstract_cpu_coordinate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abstract_cpu_coordinate.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D0D135E37CB00D13E53 /* abstract_memory_semantics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abstract_memory_semantics.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D0E135E37CB00D13E53 /* abstract_message_queue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abstract_message_queue.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D0F135E37CB00D13E53 /* abstract_os_interface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = abstract_os_interface.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D10135E37CB00D13E53 /* abstract_os_interface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abstract_os_interface.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D11135E37CB00D13E53 /* cacheline_aligned.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cacheline_aligned.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D12135E37CB00D13E53 /* cpu_coordinate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpu_coordinate.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D13135E37CB00D13E53 /* dummy_cpu_coordinate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = dummy_cpu_coordinate.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D14135E37CB00D13E53 /* dummy_cpu_coordinate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dummy_cpu_coordinate.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D15135E37CB00D13E53 /* ilib_message_queue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ilib_message_queue.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D16135E37CB00D13E53 /* ilib_message_queue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ilib_message_queue.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D17135E37CB00D13E53 /* ilib_os_interface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ilib_os_interface.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D18135E37CB00D13E53 /* ilib_os_interface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ilib_os_interface.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D19135E37CB00D13E53 /* logical_core.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = logical_core.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D1A135E37CB00D13E53 /* logical_core.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = logical_core.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D1B135E37CB00D13E53 /* memory_semantics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = memory_semantics.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D1C135E37CB00D13E53 /* message_queue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = message_queue.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D1D135E37CB00D13E53 /* os_interface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = os_interface.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D1E135E37CB00D13E53 /* osx_os_interface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = osx_os_interface.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D1F135E37CB00D13E53 /* osx_os_interface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = osx_os_interface.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D20135E37CB00D13E53 /* posix_os_interface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = posix_os_interface.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D21135E37CB00D13E53 /* posix_os_interface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = posix_os_interface.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D22135E37CB00D13E53 /* process_memory_semantics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = process_memory_semantics.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D23135E37CB00D13E53 /* process_memory_semantics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = process_memory_semantics.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D24135E37CB00D13E53 /* shared_memory_message_queue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = shared_memory_message_queue.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D25135E37CB00D13E53 /* shared_memory_message_queue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = shared_memory_message_queue.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D26135E37CB00D13E53 /* shared_memory_message_queue_per_sender.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = shared_memory_message_queue_per_sender.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D27135E37CB00D13E53 /* shared_memory_message_queue_per_sender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = shared_memory_message_queue_per_sender.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D28135E37CB00D13E53 /* thread_memory_semantics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = thread_memory_semantics.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D29135E37CB00D13E53 /* thread_memory_semantics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = thread_memory_semantics.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D2A135E37CB00D13E53 /* tile_cpu_coordinate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tile_cpu_coordinate.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D2B135E37CB00D13E53 /* tile_cpu_coordinate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tile_cpu_coordinate.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D2D135E37CB00D13E53 /* RVMPlugin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RVMPlugin.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D2E135E37CB00D13E53 /* RVMPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RVMPlugin.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D30135E37CB00D13E53 /* abstract_mutex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = abstract_mutex.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D31135E37CB00D13E53 /* abstract_mutex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abstract_mutex.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D32135E37CB00D13E53 /* abstract_tracer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = abstract_tracer.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D33135E37CB00D13E53 /* abstract_tracer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abstract_tracer.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D34135E37CB00D13E53 /* bytemap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = bytemap.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D35135E37CB00D13E53 /* bytemap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bytemap.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D36135E37CB00D13E53 /* core_tracer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = core_tracer.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D37135E37CB00D13E53 /* core_tracer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = core_tracer.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D38135E37CB00D13E53 /* debug_helper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = debug_helper.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D39135E37CB00D13E53 /* debug_helper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = debug_helper.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D3A135E37CB00D13E53 /* debug_store_checks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = debug_store_checks.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D3D135E37CB00D13E53 /* error_handling.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = error_handling.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D3E135E37CB00D13E53 /* error_handling.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = error_handling.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D3F135E37CB00D13E53 /* execution_tracer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = execution_tracer.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D40135E37CB00D13E53 /* execution_tracer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = execution_tracer.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D41135E37CB00D13E53 /* headers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = headers.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D42135E37CB00D13E53 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D43135E37CB00D13E53 /* measurements.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = measurements.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D44135E37CB00D13E53 /* measurements.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = measurements.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D45135E37CB00D13E53 /* my_rank.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = my_rank.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D46135E37CB00D13E53 /* my_rank.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = my_rank.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D47135E37CB00D13E53 /* oop_tracer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = oop_tracer.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D48135E37CB00D13E53 /* oop_tracer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oop_tracer.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D49135E37CB00D13E53 /* printer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = printer.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D4A135E37CB00D13E53 /* printer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = printer.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D4B135E37CB00D13E53 /* profiling_tracer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = profiling_tracer.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D4C135E37CB00D13E53 /* profiling_tracer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = profiling_tracer.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D4D135E37CB00D13E53 /* rank_set.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rank_set.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D4E135E37CB00D13E53 /* rank_set.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rank_set.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D4F135E37CB00D13E53 /* runtime_tester.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = runtime_tester.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D50135E37CB00D13E53 /* rvm_bitmap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rvm_bitmap.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D51135E37CB00D13E53 /* rvm_bitmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rvm_bitmap.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D52135E37CB00D13E53 /* rvm_config.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rvm_config.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D53135E37CB00D13E53 /* rvm_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rvm_config.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D54135E37CB00D13E53 /* safepoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = safepoint.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D55135E37CB00D13E53 /* safepoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = safepoint.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D56135E37CB00D13E53 /* safepoint_ability.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = safepoint_ability.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D57135E37CB00D13E53 /* safepoint_ability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = safepoint_ability.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D58135E37CB00D13E53 /* safepoint_request_queue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = safepoint_request_queue.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D59135E37CB00D13E53 /* safepoint_request_queue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = safepoint_request_queue.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D5A135E37CB00D13E53 /* scheduler_mutex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = scheduler_mutex.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D5B135E37CB00D13E53 /* scheduler_mutex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = scheduler_mutex.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D5C135E37CB00D13E53 /* semaphore_mutex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = semaphore_mutex.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D5D135E37CB00D13E53 /* semaphore_mutex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = semaphore_mutex.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D5E135E37CB00D13E53 /* squeak_adapters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = squeak_adapters.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D5F135E37CB00D13E53 /* squeak_adapters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = squeak_adapters.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D60135E37CB00D13E53 /* timeout_deferral.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = timeout_deferral.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D61135E37CB00D13E53 /* timeout_deferral.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = timeout_deferral.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D62135E37CB00D13E53 /* timeout_timer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = timeout_timer.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D63135E37CB00D13E53 /* timeout_timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = timeout_timer.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D64135E37CB00D13E53 /* tracked_ptr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tracked_ptr.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D65135E37CB00D13E53 /* tracked_ptr_registry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tracked_ptr_registry.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D66135E37CB00D13E53 /* utils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = utils.cpp; sourceTree = \"<group>\"; };\n\t\t0A5D7D67135E37CB00D13E53 /* utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utils.h; sourceTree = \"<group>\"; };\n\t\t0A5D7D69135E37CB00D13E53 /* types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = types.h; sourceTree = \"<group>\"; };\n\t\t0A68E005153CB66B00C850D2 /* buffered_channel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = buffered_channel.cpp; sourceTree = \"<group>\"; };\n\t\t0A68E006153CB66B00C850D2 /* buffered_channel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = buffered_channel.h; sourceTree = \"<group>\"; };\n\t\t0A68E007153CB66B00C850D2 /* buffered_channel_debug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = buffered_channel_debug.h; sourceTree = \"<group>\"; };\n\t\t0A68E008153CB66B00C850D2 /* synced_queue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = synced_queue.cpp; sourceTree = \"<group>\"; };\n\t\t0A68E009153CB66B00C850D2 /* synced_queue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = synced_queue.h; sourceTree = \"<group>\"; };\n\t\t0A68E00C153CB6B700C850D2 /* tmc_os_interface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tmc_os_interface.cpp; sourceTree = \"<group>\"; };\n\t\t0A68E00D153CB6B700C850D2 /* tmc_os_interface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tmc_os_interface.h; sourceTree = \"<group>\"; };\n\t\t0A890E9913FDA46400067C04 /* Squeak72x72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Squeak72x72.png; sourceTree = \"<group>\"; };\n\t\t0AA32B2D135EC5EE00B97FB8 /* AsynchFilePlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AsynchFilePlugin.h; sourceTree = \"<group>\"; };\n\t\t0AA32B2F135EC5EE00B97FB8 /* FileCopyPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileCopyPlugin.h; sourceTree = \"<group>\"; };\n\t\t0AA32B31135EC5EE00B97FB8 /* FilePlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FilePlugin.h; sourceTree = \"<group>\"; };\n\t\t0AA32B32135EC5EE00B97FB8 /* sqFilePluginBasicPrims.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqFilePluginBasicPrims.c; sourceTree = \"<group>\"; };\n\t\t0AA32B34135EC5EE00B97FB8 /* HostWindowPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HostWindowPlugin.h; sourceTree = \"<group>\"; };\n\t\t0AA32B38135EC5EE00B97FB8 /* Error.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Error.c; sourceTree = \"<group>\"; };\n\t\t0AA32B39135EC5EE00B97FB8 /* jcapimin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jcapimin.c; sourceTree = \"<group>\"; };\n\t\t0AA32B3A135EC5EE00B97FB8 /* jcapistd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jcapistd.c; sourceTree = \"<group>\"; };\n\t\t0AA32B3B135EC5EE00B97FB8 /* jccoefct.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jccoefct.c; sourceTree = \"<group>\"; };\n\t\t0AA32B3C135EC5EE00B97FB8 /* jccolor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jccolor.c; sourceTree = \"<group>\"; };\n\t\t0AA32B3D135EC5EE00B97FB8 /* jcdctmgr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jcdctmgr.c; sourceTree = \"<group>\"; };\n\t\t0AA32B3E135EC5EE00B97FB8 /* jchuff.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jchuff.c; sourceTree = \"<group>\"; };\n\t\t0AA32B3F135EC5EE00B97FB8 /* jchuff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jchuff.h; sourceTree = \"<group>\"; };\n\t\t0AA32B40135EC5EE00B97FB8 /* jcinit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jcinit.c; sourceTree = \"<group>\"; };\n\t\t0AA32B41135EC5EE00B97FB8 /* jcmainct.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jcmainct.c; sourceTree = \"<group>\"; };\n\t\t0AA32B42135EC5EE00B97FB8 /* jcmarker.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jcmarker.c; sourceTree = \"<group>\"; };\n\t\t0AA32B43135EC5EE00B97FB8 /* jcmaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jcmaster.c; sourceTree = \"<group>\"; };\n\t\t0AA32B44135EC5EE00B97FB8 /* jcomapi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jcomapi.c; sourceTree = \"<group>\"; };\n\t\t0AA32B45135EC5EE00B97FB8 /* jconfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jconfig.h; sourceTree = \"<group>\"; };\n\t\t0AA32B46135EC5EE00B97FB8 /* jcparam.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jcparam.c; sourceTree = \"<group>\"; };\n\t\t0AA32B47135EC5EE00B97FB8 /* jcphuff.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jcphuff.c; sourceTree = \"<group>\"; };\n\t\t0AA32B48135EC5EE00B97FB8 /* jcprepct.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jcprepct.c; sourceTree = \"<group>\"; };\n\t\t0AA32B49135EC5EE00B97FB8 /* jcsample.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jcsample.c; sourceTree = \"<group>\"; };\n\t\t0AA32B4A135EC5EE00B97FB8 /* jctrans.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jctrans.c; sourceTree = \"<group>\"; };\n\t\t0AA32B4B135EC5EE00B97FB8 /* jdapimin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdapimin.c; sourceTree = \"<group>\"; };\n\t\t0AA32B4C135EC5EE00B97FB8 /* jdapistd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdapistd.c; sourceTree = \"<group>\"; };\n\t\t0AA32B4D135EC5EE00B97FB8 /* jdatadst.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdatadst.c; sourceTree = \"<group>\"; };\n\t\t0AA32B4E135EC5EE00B97FB8 /* jdatasrc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdatasrc.c; sourceTree = \"<group>\"; };\n\t\t0AA32B4F135EC5EE00B97FB8 /* jdcoefct.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdcoefct.c; sourceTree = \"<group>\"; };\n\t\t0AA32B50135EC5EE00B97FB8 /* jdcolor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdcolor.c; sourceTree = \"<group>\"; };\n\t\t0AA32B51135EC5EE00B97FB8 /* jdct.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jdct.h; sourceTree = \"<group>\"; };\n\t\t0AA32B52135EC5EE00B97FB8 /* jddctmgr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jddctmgr.c; sourceTree = \"<group>\"; };\n\t\t0AA32B53135EC5EE00B97FB8 /* jdhuff.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdhuff.c; sourceTree = \"<group>\"; };\n\t\t0AA32B54135EC5EE00B97FB8 /* jdhuff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jdhuff.h; sourceTree = \"<group>\"; };\n\t\t0AA32B55135EC5EE00B97FB8 /* jdinput.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdinput.c; sourceTree = \"<group>\"; };\n\t\t0AA32B56135EC5EE00B97FB8 /* jdmainct.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdmainct.c; sourceTree = \"<group>\"; };\n\t\t0AA32B57135EC5EE00B97FB8 /* jdmarker.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdmarker.c; sourceTree = \"<group>\"; };\n\t\t0AA32B58135EC5EE00B97FB8 /* jdmaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdmaster.c; sourceTree = \"<group>\"; };\n\t\t0AA32B59135EC5EE00B97FB8 /* jdmerge.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdmerge.c; sourceTree = \"<group>\"; };\n\t\t0AA32B5A135EC5EE00B97FB8 /* jdphuff.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdphuff.c; sourceTree = \"<group>\"; };\n\t\t0AA32B5B135EC5EE00B97FB8 /* jdpostct.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdpostct.c; sourceTree = \"<group>\"; };\n\t\t0AA32B5C135EC5EE00B97FB8 /* jdsample.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdsample.c; sourceTree = \"<group>\"; };\n\t\t0AA32B5D135EC5EE00B97FB8 /* jdtrans.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdtrans.c; sourceTree = \"<group>\"; };\n\t\t0AA32B5E135EC5EE00B97FB8 /* jerror.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jerror.c; sourceTree = \"<group>\"; };\n\t\t0AA32B5F135EC5EE00B97FB8 /* jerror.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jerror.h; sourceTree = \"<group>\"; };\n\t\t0AA32B60135EC5EE00B97FB8 /* jfdctflt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jfdctflt.c; sourceTree = \"<group>\"; };\n\t\t0AA32B61135EC5EE00B97FB8 /* jfdctfst.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jfdctfst.c; sourceTree = \"<group>\"; };\n\t\t0AA32B62135EC5EE00B97FB8 /* jfdctint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jfdctint.c; sourceTree = \"<group>\"; };\n\t\t0AA32B63135EC5EE00B97FB8 /* jidctflt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jidctflt.c; sourceTree = \"<group>\"; };\n\t\t0AA32B64135EC5EE00B97FB8 /* jidctfst.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jidctfst.c; sourceTree = \"<group>\"; };\n\t\t0AA32B65135EC5EE00B97FB8 /* jidctint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jidctint.c; sourceTree = \"<group>\"; };\n\t\t0AA32B66135EC5EE00B97FB8 /* jidctred.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jidctred.c; sourceTree = \"<group>\"; };\n\t\t0AA32B67135EC5EE00B97FB8 /* jinclude.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jinclude.h; sourceTree = \"<group>\"; };\n\t\t0AA32B68135EC5EE00B97FB8 /* jmemdatadst.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jmemdatadst.c; sourceTree = \"<group>\"; };\n\t\t0AA32B69135EC5EE00B97FB8 /* jmemdatasrc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jmemdatasrc.c; sourceTree = \"<group>\"; };\n\t\t0AA32B6A135EC5EE00B97FB8 /* jmemmgr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jmemmgr.c; sourceTree = \"<group>\"; };\n\t\t0AA32B6B135EC5EE00B97FB8 /* jmemnobs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jmemnobs.c; sourceTree = \"<group>\"; };\n\t\t0AA32B6C135EC5EE00B97FB8 /* jmemsys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jmemsys.h; sourceTree = \"<group>\"; };\n\t\t0AA32B6D135EC5EE00B97FB8 /* jmorecfg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jmorecfg.h; sourceTree = \"<group>\"; };\n\t\t0AA32B6E135EC5EE00B97FB8 /* jpegint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jpegint.h; sourceTree = \"<group>\"; };\n\t\t0AA32B6F135EC5EE00B97FB8 /* jpeglib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jpeglib.h; sourceTree = \"<group>\"; };\n\t\t0AA32B70135EC5EE00B97FB8 /* JPEGReadWriter2Plugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JPEGReadWriter2Plugin.h; sourceTree = \"<group>\"; };\n\t\t0AA32B71135EC5EE00B97FB8 /* jquant1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jquant1.c; sourceTree = \"<group>\"; };\n\t\t0AA32B72135EC5EE00B97FB8 /* jquant2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jquant2.c; sourceTree = \"<group>\"; };\n\t\t0AA32B73135EC5EE00B97FB8 /* jutils.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jutils.c; sourceTree = \"<group>\"; };\n\t\t0AA32B74135EC5EE00B97FB8 /* jversion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jversion.h; sourceTree = \"<group>\"; };\n\t\t0AA32B75135EC5EE00B97FB8 /* ReadMe.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadMe.txt; sourceTree = \"<group>\"; };\n\t\t0AA32B77135EC5EE00B97FB8 /* LocalePlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalePlugin.h; sourceTree = \"<group>\"; };\n\t\t0AA32B79135EC5EE00B97FB8 /* MIDIPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MIDIPlugin.h; sourceTree = \"<group>\"; };\n\t\t0AA32B7B135EC5EE00B97FB8 /* PseudoTTYPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PseudoTTYPlugin.h; sourceTree = \"<group>\"; };\n\t\t0AA32B7D135EC5EE00B97FB8 /* QuicktimePlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QuicktimePlugin.h; sourceTree = \"<group>\"; };\n\t\t0AA32B7F135EC5EE00B97FB8 /* chartables.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = chartables.c; sourceTree = \"<group>\"; };\n\t\t0AA32B80135EC5EE00B97FB8 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = \"<group>\"; };\n\t\t0AA32B81135EC5EE00B97FB8 /* get.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = get.c; sourceTree = \"<group>\"; };\n\t\t0AA32B82135EC5EE00B97FB8 /* internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = internal.h; sourceTree = \"<group>\"; };\n\t\t0AA32B83135EC5EE00B97FB8 /* oldInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oldInternal.h; sourceTree = \"<group>\"; };\n\t\t0AA32B84135EC5EE00B97FB8 /* pcre.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre.c; sourceTree = \"<group>\"; };\n\t\t0AA32B85135EC5EE00B97FB8 /* pcre.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pcre.h; sourceTree = \"<group>\"; };\n\t\t0AA32B86135EC5EE00B97FB8 /* rePlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rePlugin.h; sourceTree = \"<group>\"; };\n\t\t0AA32B87135EC5EE00B97FB8 /* RePlugin3-Fixes.1.cs */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = \"RePlugin3-Fixes.1.cs\"; sourceTree = \"<group>\"; };\n\t\t0AA32B88135EC5EE00B97FB8 /* RePlugin3-Fixes2.1.cs */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = \"RePlugin3-Fixes2.1.cs\"; sourceTree = \"<group>\"; };\n\t\t0AA32B89135EC5EE00B97FB8 /* RePlugin3.3.1.cs */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RePlugin3.3.1.cs; sourceTree = \"<group>\"; };\n\t\t0AA32B8A135EC5EE00B97FB8 /* study.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = study.c; sourceTree = \"<group>\"; };\n\t\t0AA32B8C135EC5EE00B97FB8 /* SecurityPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SecurityPlugin.h; sourceTree = \"<group>\"; };\n\t\t0AA32B8E135EC5EE00B97FB8 /* SocketPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SocketPlugin.h; sourceTree = \"<group>\"; };\n\t\t0AA32B8F135EC5EE00B97FB8 /* SocketPrims.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = SocketPrims.pdf; sourceTree = \"<group>\"; };\n\t\t0AA32B91135EC5EE00B97FB8 /* SoundCodecPrims.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoundCodecPrims.h; sourceTree = \"<group>\"; };\n\t\t0AA32B92135EC5EE00B97FB8 /* sqSoundCodecPluginBasicPrims.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqSoundCodecPluginBasicPrims.c; sourceTree = \"<group>\"; };\n\t\t0AA32B94135EC5EE00B97FB8 /* SoundGenerationPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoundGenerationPlugin.h; sourceTree = \"<group>\"; };\n\t\t0AA32B96135EC5EE00B97FB8 /* SoundPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoundPlugin.h; sourceTree = \"<group>\"; };\n\t\t0AA32B98135EC5EE00B97FB8 /* b3d.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b3d.h; sourceTree = \"<group>\"; };\n\t\t0AA32B99135EC5EE00B97FB8 /* b3dAlloc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = b3dAlloc.c; sourceTree = \"<group>\"; };\n\t\t0AA32B9A135EC5EE00B97FB8 /* b3dAlloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b3dAlloc.h; sourceTree = \"<group>\"; };\n\t\t0AA32B9B135EC5EE00B97FB8 /* b3dDraw.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = b3dDraw.c; sourceTree = \"<group>\"; };\n\t\t0AA32B9C135EC5EE00B97FB8 /* b3dInit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = b3dInit.c; sourceTree = \"<group>\"; };\n\t\t0AA32B9D135EC5EE00B97FB8 /* b3dMain.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = b3dMain.c; sourceTree = \"<group>\"; };\n\t\t0AA32B9E135EC5EE00B97FB8 /* b3dRemap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = b3dRemap.c; sourceTree = \"<group>\"; };\n\t\t0AA32B9F135EC5EE00B97FB8 /* b3dTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b3dTypes.h; sourceTree = \"<group>\"; };\n\t\t0AA32BA1135EC5EE00B97FB8 /* sqFFI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqFFI.h; sourceTree = \"<group>\"; };\n\t\t0AA32BA2135EC5EE00B97FB8 /* sqManualSurface.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqManualSurface.c; sourceTree = \"<group>\"; };\n\t\t0AA32BA4135EC5EE00B97FB8 /* SqueakSSL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SqueakSSL.h; sourceTree = \"<group>\"; };\n\t\t0AA32BA6135EC5EE00B97FB8 /* SurfacePlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SurfacePlugin.c; sourceTree = \"<group>\"; };\n\t\t0AA32BA7135EC5EE00B97FB8 /* SurfacePlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SurfacePlugin.h; sourceTree = \"<group>\"; };\n\t\t0AA32BA9135EC5EE00B97FB8 /* UUIDPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UUIDPlugin.h; sourceTree = \"<group>\"; };\n\t\t0AA32BEE135EC61300B97FB8 /* sq.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sq.h; sourceTree = \"<group>\"; };\n\t\t0AA32BEF135EC61300B97FB8 /* sqMemoryAccess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqMemoryAccess.h; sourceTree = \"<group>\"; };\n\t\t0AA32BF0135EC61300B97FB8 /* sqNamedPrims.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqNamedPrims.c; sourceTree = \"<group>\"; };\n\t\t0AA32BF1135EC61300B97FB8 /* sqVirtualMachine.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqVirtualMachine.c; sourceTree = \"<group>\"; };\n\t\t0AA32BF7135EC69F00B97FB8 /* drawing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = drawing.m; sourceTree = \"<group>\"; };\n\t\t0AA32BF8135EC69F00B97FB8 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n\t\t0AA32BF9135EC69F00B97FB8 /* PDColoredProgressView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PDColoredProgressView.h; sourceTree = \"<group>\"; };\n\t\t0AA32BFA135EC69F00B97FB8 /* PDColoredProgressView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PDColoredProgressView.m; sourceTree = \"<group>\"; };\n\t\t0AA32BFB135EC69F00B97FB8 /* SqueakObjectiveC.xcodeproj.zip */ = {isa = PBXFileReference; lastKnownFileType = archive.zip; path = SqueakObjectiveC.xcodeproj.zip; sourceTree = \"<group>\"; };\n\t\t0AA32BFC135EC69F00B97FB8 /* squeakProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = squeakProxy.h; sourceTree = \"<group>\"; };\n\t\t0AA32BFD135EC69F00B97FB8 /* squeakProxy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = squeakProxy.m; sourceTree = \"<group>\"; };\n\t\t0AA32BFE135EC69F00B97FB8 /* squeakSUnitTester.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = squeakSUnitTester.h; sourceTree = \"<group>\"; };\n\t\t0AA32BFF135EC69F00B97FB8 /* squeakSUnitTester.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = squeakSUnitTester.m; sourceTree = \"<group>\"; };\n\t\t0AA32C09135EC6D900B97FB8 /* sqUnixAsynchFile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqUnixAsynchFile.c; sourceTree = \"<group>\"; };\n\t\t0AA32C0A135EC6D900B97FB8 /* sqUnixAsynchFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqUnixAsynchFile.h; sourceTree = \"<group>\"; };\n\t\t0AA32C0D135EC6F400B97FB8 /* dummyFFI.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dummyFFI.c; sourceTree = \"<group>\"; };\n\t\t0AA32C0E135EC6F400B97FB8 /* dummyFFI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dummyFFI.h; sourceTree = \"<group>\"; };\n\t\t0AA32C11135EC70F00B97FB8 /* sqMacSecurity.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqMacSecurity.c; sourceTree = \"<group>\"; };\n\t\t0AA32C13135EC70F00B97FB8 /* sqSqueakSoundCoreAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqSqueakSoundCoreAudio.h; sourceTree = \"<group>\"; };\n\t\t0AA32C14135EC70F00B97FB8 /* sqSqueakSoundCoreAudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = sqSqueakSoundCoreAudio.m; sourceTree = \"<group>\"; };\n\t\t0AA32C15135EC70F00B97FB8 /* sqSqueakSoundCoreAudioAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqSqueakSoundCoreAudioAPI.h; sourceTree = \"<group>\"; };\n\t\t0AA32C16135EC70F00B97FB8 /* sqSqueakSoundCoreAudioAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = sqSqueakSoundCoreAudioAPI.m; sourceTree = \"<group>\"; };\n\t\t0AA32C1B135EC76600B97FB8 /* sqUnixExternalPrims.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sqUnixExternalPrims.c; path = ../../unix/vm/sqUnixExternalPrims.c; sourceTree = \"<group>\"; };\n\t\t0AB173FB135F2A2F0095BF89 /* sqVirtualMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqVirtualMachine.h; sourceTree = \"<group>\"; };\n\t\t0ABEA92313C26C7A003108B9 /* gc_debugging_tracer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = gc_debugging_tracer.cpp; sourceTree = \"<group>\"; };\n\t\t0ABEA92413C26C7A003108B9 /* gc_debugging_tracer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gc_debugging_tracer.h; sourceTree = \"<group>\"; };\n\t\t0ADE8A7C135F38B200D37EAD /* AsynchFilePlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = AsynchFilePlugin.c; sourceTree = \"<group>\"; };\n\t\t0ADE8A7E135F38B200D37EAD /* B2DPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = B2DPlugin.c; sourceTree = \"<group>\"; };\n\t\t0ADE8A80135F38B200D37EAD /* BitBltPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = BitBltPlugin.c; sourceTree = \"<group>\"; };\n\t\t0ADE8A82135F38B200D37EAD /* BMPReadWriterPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = BMPReadWriterPlugin.c; sourceTree = \"<group>\"; };\n\t\t0ADE8A84135F38B200D37EAD /* DSAPrims.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = DSAPrims.c; sourceTree = \"<group>\"; };\n\t\t0ADE8A86135F38B200D37EAD /* FFTPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = FFTPlugin.c; sourceTree = \"<group>\"; };\n\t\t0ADE8A88135F38B200D37EAD /* FilePlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = FilePlugin.c; sourceTree = \"<group>\"; };\n\t\t0ADE8A8A135F38B200D37EAD /* FloatArrayPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = FloatArrayPlugin.c; sourceTree = \"<group>\"; };\n\t\t0ADE8A8C135F38B200D37EAD /* GeniePlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = GeniePlugin.c; sourceTree = \"<group>\"; };\n\t\t0ADE8A8E135F38B200D37EAD /* HostWindowPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = HostWindowPlugin.c; sourceTree = \"<group>\"; };\n\t\t0ADE8A9A135F38FE00D37EAD /* JPEGReaderPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = JPEGReaderPlugin.c; sourceTree = \"<group>\"; };\n\t\t0ADE8A9C135F38FE00D37EAD /* JPEGReadWriter2Plugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = JPEGReadWriter2Plugin.c; sourceTree = \"<group>\"; };\n\t\t0ADE8A9E135F38FE00D37EAD /* Klatt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Klatt.c; sourceTree = \"<group>\"; };\n\t\t0ADE8AA0135F38FE00D37EAD /* LargeIntegers.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = LargeIntegers.c; sourceTree = \"<group>\"; };\n\t\t0ADE8AA2135F38FE00D37EAD /* Matrix2x3Plugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Matrix2x3Plugin.c; sourceTree = \"<group>\"; };\n\t\t0ADE8AA4135F38FE00D37EAD /* MiscPrimitivePlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = MiscPrimitivePlugin.c; sourceTree = \"<group>\"; };\n\t\t0ADE8AA6135F38FE00D37EAD /* ObjectiveCPlugin.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = ObjectiveCPlugin.c; sourceTree = \"<group>\"; };\n\t\t0ADE8AA8135F38FE00D37EAD /* RePlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = RePlugin.c; sourceTree = \"<group>\"; };\n\t\t0ADE8AAA135F38FE00D37EAD /* SecurityPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SecurityPlugin.c; sourceTree = \"<group>\"; };\n\t\t0ADE8AAC135F38FE00D37EAD /* SocketPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SocketPlugin.c; sourceTree = \"<group>\"; };\n\t\t0ADE8AAE135F38FE00D37EAD /* SoundCodecPrims.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SoundCodecPrims.c; sourceTree = \"<group>\"; };\n\t\t0ADE8AB0135F38FE00D37EAD /* SoundGenerationPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SoundGenerationPlugin.c; sourceTree = \"<group>\"; };\n\t\t0ADE8AB2135F38FE00D37EAD /* SoundPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SoundPlugin.c; sourceTree = \"<group>\"; };\n\t\t0ADE8AB4135F38FE00D37EAD /* Squeak3D.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Squeak3D.c; sourceTree = \"<group>\"; };\n\t\t0ADE8AC4135F392E00D37EAD /* SqueakFFIPrims.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SqueakFFIPrims.c; sourceTree = \"<group>\"; };\n\t\t0ADE8AC6135F392E00D37EAD /* StarSqueakPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = StarSqueakPlugin.c; sourceTree = \"<group>\"; };\n\t\t0ADE8AC8135F392E00D37EAD /* UUIDPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = UUIDPlugin.c; sourceTree = \"<group>\"; };\n\t\t0ADE8ACA135F392E00D37EAD /* ZipPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ZipPlugin.c; sourceTree = \"<group>\"; };\n\t\t1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };\n\t\t1D3623240D0F684500981E51 /* SqueakNoOGLIPhoneAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SqueakNoOGLIPhoneAppDelegate.h; sourceTree = \"<group>\"; };\n\t\t1D3623250D0F684500981E51 /* SqueakNoOGLIPhoneAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SqueakNoOGLIPhoneAppDelegate.m; sourceTree = \"<group>\"; };\n\t\t1D3623EB0D0F72F000981E51 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };\n\t\t1D6058910D05DD3D006BFB54 /* RoarVM.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RoarVM.app; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };\n\t\t28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = \"<group>\"; };\n\t\t29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = vm/Common/main.m; sourceTree = \"<group>\"; };\n\t\t9400325B0DEF3936002FA1C4 /* sqDummyaio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqDummyaio.h; sourceTree = \"<group>\"; };\n\t\t9400325C0DEF3936002FA1C4 /* sqDummyaio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqDummyaio.c; sourceTree = \"<group>\"; };\n\t\t9402DD5E10CE0C16005C2102 /* SqViewBitmapConversion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SqViewBitmapConversion.h; path = vm/OSX/SqViewBitmapConversion.h; sourceTree = \"<group>\"; };\n\t\t9402DD5F10CE0C16005C2102 /* SqViewBitmapConversion.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SqViewBitmapConversion.m; path = vm/OSX/SqViewBitmapConversion.m; sourceTree = \"<group>\"; };\n\t\t9402DD6F10CE0E91005C2102 /* SqViewClut.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SqViewClut.m; path = vm/OSX/SqViewClut.m; sourceTree = \"<group>\"; };\n\t\t940BE5791239F10000674A11 /* SqueakUIViewCALayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SqueakUIViewCALayer.h; sourceTree = \"<group>\"; };\n\t\t940BE57A1239F10000674A11 /* SqueakUIViewCALayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SqueakUIViewCALayer.m; sourceTree = \"<group>\"; };\n\t\t940BE5E71239F50100674A11 /* SqueakUIViewOpenGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SqueakUIViewOpenGL.h; sourceTree = \"<group>\"; };\n\t\t940BE5E81239F50100674A11 /* SqueakUIViewOpenGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SqueakUIViewOpenGL.m; sourceTree = \"<group>\"; };\n\t\t940BE5F81239F70D00674A11 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };\n\t\t940CE8540DFCE2D200EBA91B /* SqueakUIController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SqueakUIController.h; sourceTree = \"<group>\"; };\n\t\t940CE8550DFCE2D200EBA91B /* SqueakUIController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SqueakUIController.m; sourceTree = \"<group>\"; };\n\t\t9412CAB20E6C037B00DB8625 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = \"wrapper.plug-in\"; path = Settings.bundle; sourceTree = \"<group>\"; };\n\t\t9412CAE40E6C05EC00DB8625 /* sqSqueakInfoPlistInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakInfoPlistInterface.h; path = vm/Common/Classes/sqSqueakInfoPlistInterface.h; sourceTree = \"<group>\"; };\n\t\t9412CAE50E6C05EC00DB8625 /* sqSqueakInfoPlistInterface.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakInfoPlistInterface.m; path = vm/Common/Classes/sqSqueakInfoPlistInterface.m; sourceTree = \"<group>\"; };\n\t\t9414421E10BC89440088F8AC /* Squeak.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = Squeak.icns; path = OSX/Squeak.icns; sourceTree = \"<group>\"; };\n\t\t9414421F10BC89440088F8AC /* SqueakChanges.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = SqueakChanges.icns; path = OSX/SqueakChanges.icns; sourceTree = \"<group>\"; };\n\t\t9414422010BC89440088F8AC /* SqueakGeneric.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = SqueakGeneric.icns; path = OSX/SqueakGeneric.icns; sourceTree = \"<group>\"; };\n\t\t9414422110BC89440088F8AC /* SqueakImage.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = SqueakImage.icns; path = OSX/SqueakImage.icns; sourceTree = \"<group>\"; };\n\t\t9414422210BC89440088F8AC /* SqueakPlugin.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = SqueakPlugin.icns; path = OSX/SqueakPlugin.icns; sourceTree = \"<group>\"; };\n\t\t9414422310BC89440088F8AC /* SqueakProject.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = SqueakProject.icns; path = OSX/SqueakProject.icns; sourceTree = \"<group>\"; };\n\t\t9414422410BC89440088F8AC /* SqueakScript.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = SqueakScript.icns; path = OSX/SqueakScript.icns; sourceTree = \"<group>\"; };\n\t\t9414422510BC89440088F8AC /* SqueakSources.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = SqueakSources.icns; path = OSX/SqueakSources.icns; sourceTree = \"<group>\"; };\n\t\t9424FF5B0DDCB1C7009912BF /* sqGnu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqGnu.h; path = vm/sqGnu.h; sourceTree = \"<group>\"; };\n\t\t9424FF640DDCB1EF009912BF /* sqPlatformSpecific.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqPlatformSpecific.h; sourceTree = \"<group>\"; };\n\t\t9424FF650DDCB1EF009912BF /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = \"<group>\"; };\n\t\t9424FF660DDCB1EF009912BF /* sqConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqConfig.h; sourceTree = \"<group>\"; };\n\t\t9424FF670DDCB202009912BF /* sqMacV2Memory.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqMacV2Memory.c; sourceTree = \"<group>\"; };\n\t\t9424FF680DDCB202009912BF /* sqMacV2Memory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqMacV2Memory.h; sourceTree = \"<group>\"; };\n\t\t9424FF750DDCB271009912BF /* osExports.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = osExports.c; sourceTree = \"<group>\"; };\n\t\t9428BA9510BB440800DAD287 /* sqSqueakOSXClipboardAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakOSXClipboardAPI.h; path = vm/OSX/sqSqueakOSXClipboardAPI.h; sourceTree = \"<group>\"; };\n\t\t9428BA9610BB440800DAD287 /* sqSqueakOSXClipboardAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakOSXClipboardAPI.m; path = vm/OSX/sqSqueakOSXClipboardAPI.m; sourceTree = \"<group>\"; };\n\t\t9428BB0410BB478600DAD287 /* sqSqueakOSXApplication+clipboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = \"sqSqueakOSXApplication+clipboard.h\"; path = \"vm/OSX/sqSqueakOSXApplication+clipboard.h\"; sourceTree = \"<group>\"; };\n\t\t9428BB0510BB478600DAD287 /* sqSqueakOSXApplication+clipboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = \"sqSqueakOSXApplication+clipboard.m\"; path = \"vm/OSX/sqSqueakOSXApplication+clipboard.m\"; sourceTree = \"<group>\"; };\n\t\t942ABE6E10AA23E20086D908 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = \"<absolute>\"; };\n\t\t942F75D10E0B67AD00848BF2 /* sqSqueakVmAndImagePathAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakVmAndImagePathAPI.h; path = vm/Common/Classes/sqSqueakVmAndImagePathAPI.h; sourceTree = \"<group>\"; };\n\t\t942F75D20E0B67AD00848BF2 /* sqSqueakVmAndImagePathAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakVmAndImagePathAPI.m; path = vm/Common/Classes/sqSqueakVmAndImagePathAPI.m; sourceTree = \"<group>\"; };\n\t\t942F761B0E0B6B6100848BF2 /* sqSqueakIPhoneApplication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqSqueakIPhoneApplication.h; sourceTree = \"<group>\"; };\n\t\t942F761C0E0B6B6100848BF2 /* sqSqueakIPhoneApplication.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = sqSqueakIPhoneApplication.m; sourceTree = \"<group>\"; };\n\t\t942F76310E0B6C7600848BF2 /* sqSqueakMainApplication+attributes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = \"sqSqueakMainApplication+attributes.m\"; path = \"vm/Common/Classes/sqSqueakMainApplication+attributes.m\"; sourceTree = \"<group>\"; };\n\t\t942F76350E0B6CEF00848BF2 /* sqSqueakIPhoneApplication+attributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"sqSqueakIPhoneApplication+attributes.h\"; sourceTree = \"<group>\"; };\n\t\t943001260E0D5D670040BB27 /* sqSqueakIPhoneApplication+imageReadWrite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"sqSqueakIPhoneApplication+imageReadWrite.h\"; sourceTree = \"<group>\"; };\n\t\t943001270E0D5D670040BB27 /* sqSqueakIPhoneApplication+imageReadWrite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = \"sqSqueakIPhoneApplication+imageReadWrite.m\"; sourceTree = \"<group>\"; };\n\t\t943001A30E0D600C0040BB27 /* sqSqueakIPhoneFileDirectoryInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqSqueakIPhoneFileDirectoryInterface.h; sourceTree = \"<group>\"; };\n\t\t943001A40E0D600C0040BB27 /* sqSqueakIPhoneFileDirectoryInterface.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = sqSqueakIPhoneFileDirectoryInterface.m; sourceTree = \"<group>\"; };\n\t\t94329ECA12275FFA0090298B /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; };\n\t\t943B9C9E1235C5120056205E /* sqMacHostWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = sqMacHostWindow.m; sourceTree = \"<group>\"; };\n\t\t943B9C9F1235C5120056205E /* sqMacHostWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqMacHostWindow.h; sourceTree = \"<group>\"; };\n\t\t9452BDC10F4095DE006410DE /* sqSqueakIPhoneApplication+Network.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"sqSqueakIPhoneApplication+Network.h\"; sourceTree = \"<group>\"; };\n\t\t9452BDC20F4095DE006410DE /* sqSqueakIPhoneApplication+Network.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = \"sqSqueakIPhoneApplication+Network.m\"; sourceTree = \"<group>\"; };\n\t\t9452D5D70E044A9D000AD792 /* Queue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Queue.h; path = vm/Common/Classes/Queue.h; sourceTree = \"<group>\"; };\n\t\t9452D5D80E044A9D000AD792 /* Queue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Queue.m; path = vm/Common/Classes/Queue.m; sourceTree = \"<group>\"; };\n\t\t9452D5D90E044A9D000AD792 /* sqMacV2Time.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sqMacV2Time.c; path = vm/Common/Classes/sqMacV2Time.c; sourceTree = \"<group>\"; };\n\t\t9452D5DA0E044A9D000AD792 /* sqMacV2Time.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqMacV2Time.h; path = vm/Common/Classes/sqMacV2Time.h; sourceTree = \"<group>\"; };\n\t\t9452D5DB0E044A9D000AD792 /* sqSqueakFileDirectoryAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakFileDirectoryAPI.h; path = vm/Common/Classes/sqSqueakFileDirectoryAPI.h; sourceTree = \"<group>\"; };\n\t\t9452D5DC0E044A9D000AD792 /* sqSqueakFileDirectoryAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakFileDirectoryAPI.m; path = vm/Common/Classes/sqSqueakFileDirectoryAPI.m; sourceTree = \"<group>\"; };\n\t\t9452D5DD0E044A9D000AD792 /* sqSqueakFileDirectoryInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakFileDirectoryInterface.h; path = vm/Common/Classes/sqSqueakFileDirectoryInterface.h; sourceTree = \"<group>\"; };\n\t\t9452D5DE0E044A9D000AD792 /* sqSqueakFileDirectoryInterface.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakFileDirectoryInterface.m; path = vm/Common/Classes/sqSqueakFileDirectoryInterface.m; sourceTree = \"<group>\"; };\n\t\t9452D5DF0E044A9D000AD792 /* sqSqueakMainApp.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakMainApp.m; path = vm/Common/Classes/sqSqueakMainApp.m; sourceTree = \"<group>\"; };\n\t\t9452D5E00E044A9D000AD792 /* sqSqueakMainApp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakMainApp.h; path = vm/Common/Classes/sqSqueakMainApp.h; sourceTree = \"<group>\"; };\n\t\t9452D5E10E044A9D000AD792 /* sqSqueakMainApplication+vmAndImagePath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = \"sqSqueakMainApplication+vmAndImagePath.h\"; path = \"vm/Common/Classes/sqSqueakMainApplication+vmAndImagePath.h\"; sourceTree = \"<group>\"; };\n\t\t9452D5E20E044A9D000AD792 /* sqSqueakMainApplication+vmAndImagePath.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = \"sqSqueakMainApplication+vmAndImagePath.m\"; path = \"vm/Common/Classes/sqSqueakMainApplication+vmAndImagePath.m\"; sourceTree = \"<group>\"; };\n\t\t9452D5E30E044A9D000AD792 /* sqSqueakMainApplication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakMainApplication.h; path = vm/Common/Classes/sqSqueakMainApplication.h; sourceTree = \"<group>\"; };\n\t\t9452D5E40E044A9D000AD792 /* sqSqueakMainApplication.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakMainApplication.m; path = vm/Common/Classes/sqSqueakMainApplication.m; sourceTree = \"<group>\"; };\n\t\t9452D6010E044CB3000AD792 /* sqSqueakAttributesAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakAttributesAPI.h; path = vm/Common/Classes/sqSqueakAttributesAPI.h; sourceTree = \"<group>\"; };\n\t\t9452D6020E044CB3000AD792 /* sqSqueakAttributesAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakAttributesAPI.m; path = vm/Common/Classes/sqSqueakAttributesAPI.m; sourceTree = \"<group>\"; };\n\t\t9452D6060E044D2F000AD792 /* sqSqueakEventsAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakEventsAPI.h; path = vm/Common/Classes/sqSqueakEventsAPI.h; sourceTree = \"<group>\"; };\n\t\t9452D6070E044D2F000AD792 /* sqSqueakEventsAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakEventsAPI.m; path = vm/Common/Classes/sqSqueakEventsAPI.m; sourceTree = \"<group>\"; };\n\t\t9452D7630E0452D3000AD792 /* sqiPhoneScreenAndWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqiPhoneScreenAndWindow.h; sourceTree = \"<group>\"; };\n\t\t9452D7640E0452D3000AD792 /* sqiPhoneScreenAndWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = sqiPhoneScreenAndWindow.m; sourceTree = \"<group>\"; };\n\t\t94554F1D0DF1B65700FB176B /* sqSqueakIPhoneApplication+sound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"sqSqueakIPhoneApplication+sound.h\"; sourceTree = \"<group>\"; };\n\t\t94554F1E0DF1B65700FB176B /* sqSqueakiPhoneApplication+sound.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = \"sqSqueakiPhoneApplication+sound.m\"; sourceTree = \"<group>\"; };\n\t\t945550000DF1BC6A00FB176B /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = \"<absolute>\"; };\n\t\t945550910DF2041100FB176B /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = \"<group>\"; };\n\t\t94577FBC10684D5E0020840A /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = \"<absolute>\"; };\n\t\t94577FBE10684D5E0020840A /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = /System/Library/Frameworks/CoreLocation.framework; sourceTree = \"<absolute>\"; };\n\t\t94577FC410684D7E0020840A /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = /System/Library/Frameworks/SystemConfiguration.framework; sourceTree = \"<absolute>\"; };\n\t\t9458525410F04339001401E7 /* sqSqueakIPhoneClipboardAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqSqueakIPhoneClipboardAPI.h; sourceTree = \"<group>\"; };\n\t\t9458525510F04339001401E7 /* sqSqueakIPhoneClipboardAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = sqSqueakIPhoneClipboardAPI.m; sourceTree = \"<group>\"; };\n\t\t9458525A10F043EB001401E7 /* sqSqueakIPhoneApplication+clipboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"sqSqueakIPhoneApplication+clipboard.h\"; sourceTree = \"<group>\"; };\n\t\t9458525B10F043EB001401E7 /* sqSqueakIPhoneApplication+clipboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = \"sqSqueakIPhoneApplication+clipboard.m\"; sourceTree = \"<group>\"; };\n\t\t946DA91310C0C71100F26F56 /* sqSqueakOSXDropAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakOSXDropAPI.h; path = vm/OSX/sqSqueakOSXDropAPI.h; sourceTree = \"<group>\"; };\n\t\t946DA91410C0C71100F26F56 /* sqSqueakOSXDropAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakOSXDropAPI.m; path = vm/OSX/sqSqueakOSXDropAPI.m; sourceTree = \"<group>\"; };\n\t\t946DA9FF10C0D35500F26F56 /* sqMacUnixExternalPrims.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqMacUnixExternalPrims.m; path = vm/OSX/sqMacUnixExternalPrims.m; sourceTree = \"<group>\"; };\n\t\t9471D2710E04703B00703D45 /* sqSqueakScreenAndWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakScreenAndWindow.h; path = vm/Common/Classes/sqSqueakScreenAndWindow.h; sourceTree = \"<group>\"; };\n\t\t9471D2720E04703B00703D45 /* sqSqueakScreenAndWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakScreenAndWindow.m; path = vm/Common/Classes/sqSqueakScreenAndWindow.m; sourceTree = \"<group>\"; };\n\t\t9471D2DF0E04743F00703D45 /* sqSqueakAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakAppDelegate.h; path = vm/Common/Classes/sqSqueakAppDelegate.h; sourceTree = \"<group>\"; };\n\t\t9471D2E00E04743F00703D45 /* sqSqueakAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakAppDelegate.m; path = vm/Common/Classes/sqSqueakAppDelegate.m; sourceTree = \"<group>\"; };\n\t\t947E5F9310A9FF4A00D3B69E /* SqueakPureObjc_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SqueakPureObjc_Prefix.pch; sourceTree = \"<group>\"; };\n\t\t947E5F9F10A9FFA000D3B69E /* SqueakPureObjc-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = \"SqueakPureObjc-Info.plist\"; sourceTree = \"<group>\"; };\n\t\t947E61C210AA03C300D3B69E /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = \"<absolute>\"; };\n\t\t947E61C410AA03DC00D3B69E /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = \"<absolute>\"; };\n\t\t947E642710AA0E9E00D3B69E /* sqMacV2Browser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqMacV2Browser.h; path = vm/OSX/sqMacV2Browser.h; sourceTree = \"<group>\"; };\n\t\t947E642810AA0E9E00D3B69E /* sqMacV2Browser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqMacV2Browser.m; path = vm/OSX/sqMacV2Browser.m; sourceTree = \"<group>\"; };\n\t\t947E647910AA100900D3B69E /* SqueakOSXAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SqueakOSXAppDelegate.h; path = vm/OSX/SqueakOSXAppDelegate.h; sourceTree = \"<group>\"; };\n\t\t947E647A10AA100900D3B69E /* SqueakOSXAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SqueakOSXAppDelegate.m; path = vm/OSX/SqueakOSXAppDelegate.m; sourceTree = \"<group>\"; };\n\t\t947E64CA10AA16FE00D3B69E /* sqSqueakOSXApplication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakOSXApplication.h; path = vm/OSX/sqSqueakOSXApplication.h; sourceTree = \"<group>\"; };\n\t\t947E64CB10AA16FE00D3B69E /* sqSqueakOSXApplication.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakOSXApplication.m; path = vm/OSX/sqSqueakOSXApplication.m; sourceTree = \"<group>\"; };\n\t\t947E64DD10AA18FE00D3B69E /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = \"<group>\"; };\n\t\t948774B110C64DD800E4AEC5 /* SqueakPureObjc-Info 64x64.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = \"SqueakPureObjc-Info 64x64.plist\"; sourceTree = \"<group>\"; };\n\t\t94883B2A0E0C2A5E005A4738 /* aio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = aio.c; path = ../iOS/vm/Common/aio.c; sourceTree = \"<group>\"; };\n\t\t94883B400E0C2B9C005A4738 /* sqUnixSocket.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqUnixSocket.c; sourceTree = \"<group>\"; };\n\t\t948EC38F1155312600B08A4F /* MainWindow-iPad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = \"MainWindow-iPad.xib\"; path = \"Resources-iPad/MainWindow-iPad.xib\"; sourceTree = \"<group>\"; };\n\t\t9492452F10BA43AA00E726F5 /* SqueakOSXApplication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SqueakOSXApplication.h; path = vm/OSX/SqueakOSXApplication.h; sourceTree = \"<group>\"; };\n\t\t9492453010BA43AA00E726F5 /* SqueakOSXApplication.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SqueakOSXApplication.m; path = vm/OSX/SqueakOSXApplication.m; sourceTree = \"<group>\"; };\n\t\t949E5DB50DE3AB6A007388E0 /* SqueakUIView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SqueakUIView.h; sourceTree = \"<group>\"; };\n\t\t949E5DB60DE3AB6A007388E0 /* SqueakUIView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SqueakUIView.m; sourceTree = \"<group>\"; };\n\t\t94A0E8440DE5EB6E0071C8B9 /* sqSqueakMainApplication+attributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = \"sqSqueakMainApplication+attributes.h\"; path = \"vm/Common/Classes/sqSqueakMainApplication+attributes.h\"; sourceTree = \"<group>\"; };\n\t\t94A0E8450DE5EB6E0071C8B9 /* sqSqueakIPhoneApplication+attributes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = \"sqSqueakIPhoneApplication+attributes.m\"; sourceTree = \"<group>\"; };\n\t\t94A0E8830DE5EF430071C8B9 /* sqSqueakMainApplication+imageReadWrite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = \"sqSqueakMainApplication+imageReadWrite.h\"; path = \"vm/Common/Classes/sqSqueakMainApplication+imageReadWrite.h\"; sourceTree = \"<group>\"; };\n\t\t94A0E8840DE5EF430071C8B9 /* sqSqueakMainApplication+imageReadWrite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = \"sqSqueakMainApplication+imageReadWrite.m\"; path = \"vm/Common/Classes/sqSqueakMainApplication+imageReadWrite.m\"; sourceTree = \"<group>\"; };\n\t\t94A0E9820DE5F1FE0071C8B9 /* sqSqueakMainApplication+screen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = \"sqSqueakMainApplication+screen.h\"; path = \"vm/Common/Classes/sqSqueakMainApplication+screen.h\"; sourceTree = \"<group>\"; };\n\t\t94A0E9830DE5F1FE0071C8B9 /* sqSqueakMainApplication+screen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = \"sqSqueakMainApplication+screen.m\"; path = \"vm/Common/Classes/sqSqueakMainApplication+screen.m\"; sourceTree = \"<group>\"; };\n\t\t94A1B0050E0DBE2400EB5EFC /* sqSqueakMainApplication+events.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = \"sqSqueakMainApplication+events.h\"; path = \"vm/Common/Classes/sqSqueakMainApplication+events.h\"; sourceTree = \"<group>\"; };\n\t\t94A1B0060E0DBE2400EB5EFC /* sqSqueakMainApplication+events.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = \"sqSqueakMainApplication+events.m\"; path = \"vm/Common/Classes/sqSqueakMainApplication+events.m\"; sourceTree = \"<group>\"; };\n\t\t94A1B02B0E0DC10D00EB5EFC /* sqSqueakSoundAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakSoundAPI.h; path = vm/Common/Classes/sqSqueakSoundAPI.h; sourceTree = \"<group>\"; };\n\t\t94A1B02C0E0DC10D00EB5EFC /* sqSqueakSoundAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakSoundAPI.m; path = vm/Common/Classes/sqSqueakSoundAPI.m; sourceTree = \"<group>\"; };\n\t\t94A1B0300E0DC19300EB5EFC /* sqSqueakMainApplication+sound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = \"sqSqueakMainApplication+sound.h\"; path = \"vm/Common/Classes/sqSqueakMainApplication+sound.h\"; sourceTree = \"<group>\"; };\n\t\t94A1B0310E0DC19300EB5EFC /* sqSqueakMainApplication+sound.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = \"sqSqueakMainApplication+sound.m\"; path = \"vm/Common/Classes/sqSqueakMainApplication+sound.m\"; sourceTree = \"<group>\"; };\n\t\t94A1B21A10B9DE0300C64473 /* keyBoardStrokeDetails.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = keyBoardStrokeDetails.h; path = vm/OSX/keyBoardStrokeDetails.h; sourceTree = \"<group>\"; };\n\t\t94A1B21B10B9DE0300C64473 /* keyBoardStrokeDetails.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = keyBoardStrokeDetails.m; path = vm/OSX/keyBoardStrokeDetails.m; sourceTree = \"<group>\"; };\n\t\t94A3488C0DDCCCC700D1D4A9 /* sqSqueakScreenAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakScreenAPI.h; path = vm/Common/Classes/sqSqueakScreenAPI.h; sourceTree = \"<group>\"; };\n\t\t94A3488D0DDCCCC700D1D4A9 /* sqSqueakScreenAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakScreenAPI.m; path = vm/Common/Classes/sqSqueakScreenAPI.m; sourceTree = \"<group>\"; };\n\t\t94B6E9D910BC775E00333E9E /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = vm/Common/English.lproj/Localizable.strings; sourceTree = \"<group>\"; };\n\t\t94B8F54E10CF677800F0DD6B /* SqViewClut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SqViewClut.h; path = vm/OSX/SqViewClut.h; sourceTree = \"<group>\"; };\n\t\t94BCABBF10AB72A600F87527 /* sqSqueakOSXFileDirectoryInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakOSXFileDirectoryInterface.h; path = vm/OSX/sqSqueakOSXFileDirectoryInterface.h; sourceTree = \"<group>\"; };\n\t\t94BCABC010AB72A600F87527 /* sqSqueakOSXFileDirectoryInterface.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakOSXFileDirectoryInterface.m; path = vm/OSX/sqSqueakOSXFileDirectoryInterface.m; sourceTree = \"<group>\"; };\n\t\t94BCAD1B10AB942300F87527 /* sqSqueakOSXApplication+attributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = \"sqSqueakOSXApplication+attributes.h\"; path = \"vm/OSX/sqSqueakOSXApplication+attributes.h\"; sourceTree = \"<group>\"; };\n\t\t94BCAD1C10AB942300F87527 /* sqSqueakOSXApplication+attributes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = \"sqSqueakOSXApplication+attributes.m\"; path = \"vm/OSX/sqSqueakOSXApplication+attributes.m\"; sourceTree = \"<group>\"; };\n\t\t94BCAE6710ACA10100F87527 /* sqSqueakOSXInfoPlistInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakOSXInfoPlistInterface.h; path = vm/OSX/sqSqueakOSXInfoPlistInterface.h; sourceTree = \"<group>\"; };\n\t\t94BCAE6810ACA10100F87527 /* sqSqueakOSXInfoPlistInterface.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakOSXInfoPlistInterface.m; path = vm/OSX/sqSqueakOSXInfoPlistInterface.m; sourceTree = \"<group>\"; };\n\t\t94BCE6660DDDEB5000F38F31 /* sqMacHostWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqMacHostWindow.h; sourceTree = \"<group>\"; };\n\t\t94BCE7870DDDF61200F38F31 /* sqUnixUUID.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqUnixUUID.c; sourceTree = \"<group>\"; };\n\t\t94BCE7A60DDDF8F800F38F31 /* sqaio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqaio.h; path = vm/sqaio.h; sourceTree = \"<group>\"; };\n\t\t94BCE93E0DDE044700F38F31 /* sqSqueakIPhoneApplication+events.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"sqSqueakIPhoneApplication+events.h\"; sourceTree = \"<group>\"; };\n\t\t94BCE93F0DDE044700F38F31 /* sqSqueakIPhoneApplication+events.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = \"sqSqueakIPhoneApplication+events.m\"; sourceTree = \"<group>\"; };\n\t\t94BCEA2B0DDE0C1600F38F31 /* sqMacHostWindow.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqMacHostWindow.c; sourceTree = \"<group>\"; };\n\t\t94C2068810AF4F53002F4160 /* sqSqueakOSXNSView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakOSXNSView.h; path = vm/OSX/sqSqueakOSXNSView.h; sourceTree = \"<group>\"; };\n\t\t94C2068910AF4F53002F4160 /* sqSqueakOSXNSView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakOSXNSView.m; path = vm/OSX/sqSqueakOSXNSView.m; sourceTree = \"<group>\"; };\n\t\t94C208F810AF7262002F4160 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = /System/Library/Frameworks/QuartzCore.framework; sourceTree = \"<absolute>\"; };\n\t\t94C3687610AFA77F0041953A /* sqSqueakOSXApplication+cursor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = \"sqSqueakOSXApplication+cursor.h\"; path = \"vm/OSX/sqSqueakOSXApplication+cursor.h\"; sourceTree = \"<group>\"; };\n\t\t94C3687710AFA77F0041953A /* sqSqueakOSXApplication+cursor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = \"sqSqueakOSXApplication+cursor.m\"; path = \"vm/OSX/sqSqueakOSXApplication+cursor.m\"; sourceTree = \"<group>\"; };\n\t\t94C3687B10AFA8300041953A /* sqSqueakCursorAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakCursorAPI.h; path = vm/Common/Classes/sqSqueakCursorAPI.h; sourceTree = \"<group>\"; };\n\t\t94C3687C10AFA8300041953A /* sqSqueakCursorAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakCursorAPI.m; path = vm/Common/Classes/sqSqueakCursorAPI.m; sourceTree = \"<group>\"; };\n\t\t94C3688A10AFA9EF0041953A /* sqSqueakMainApplication+cursor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = \"sqSqueakMainApplication+cursor.h\"; path = \"vm/Common/Classes/sqSqueakMainApplication+cursor.h\"; sourceTree = \"<group>\"; };\n\t\t94C3688B10AFA9EF0041953A /* sqSqueakMainApplication+cursor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = \"sqSqueakMainApplication+cursor.m\"; path = \"vm/Common/Classes/sqSqueakMainApplication+cursor.m\"; sourceTree = \"<group>\"; };\n\t\t94C36A9210B09EE70041953A /* sqSqueakOSXApplication+events.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = \"sqSqueakOSXApplication+events.h\"; path = \"vm/OSX/sqSqueakOSXApplication+events.h\"; sourceTree = \"<group>\"; };\n\t\t94C36A9310B09EE70041953A /* sqSqueakOSXApplication+events.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = \"sqSqueakOSXApplication+events.m\"; path = \"vm/OSX/sqSqueakOSXApplication+events.m\"; sourceTree = \"<group>\"; };\n\t\t94C36C9710B0CF290041953A /* Info-iPhone.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = \"Info-iPhone.plist\"; sourceTree = \"<group>\"; };\n\t\t94C4B82E10C06F8800CD4F90 /* sqSqueakOSXSoundCoreAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakOSXSoundCoreAudio.h; path = vm/OSX/plugins/SoundPlugin/sqSqueakOSXSoundCoreAudio.h; sourceTree = \"<group>\"; };\n\t\t94C4B82F10C06F8800CD4F90 /* sqSqueakOSXSoundCoreAudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakOSXSoundCoreAudio.m; path = vm/OSX/plugins/SoundPlugin/sqSqueakOSXSoundCoreAudio.m; sourceTree = \"<group>\"; };\n\t\t94C887F910ADCEFC007CB39E /* sqSqueakOSXApplication+imageReadWrite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = \"sqSqueakOSXApplication+imageReadWrite.h\"; path = \"vm/OSX/sqSqueakOSXApplication+imageReadWrite.h\"; sourceTree = \"<group>\"; };\n\t\t94C887FA10ADCEFC007CB39E /* sqSqueakOSXApplication+imageReadWrite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = \"sqSqueakOSXApplication+imageReadWrite.m\"; path = \"vm/OSX/sqSqueakOSXApplication+imageReadWrite.m\"; sourceTree = \"<group>\"; };\n\t\t94C88BDD10AF3C52007CB39E /* sqSqueakOSXScreenAndWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakOSXScreenAndWindow.h; path = vm/OSX/sqSqueakOSXScreenAndWindow.h; sourceTree = \"<group>\"; };\n\t\t94C88BDE10AF3C52007CB39E /* sqSqueakOSXScreenAndWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakOSXScreenAndWindow.m; path = vm/OSX/sqSqueakOSXScreenAndWindow.m; sourceTree = \"<group>\"; };\n\t\t94D16CAF10BCF96B00A69A89 /* Credits.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = Credits.rtf; path = OSX/Credits.rtf; sourceTree = \"<group>\"; };\n\t\t94D3654D10CEC86C00805023 /* BitMapConversionLogicFromX11.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BitMapConversionLogicFromX11.h; path = vm/OSX/BitMapConversionLogicFromX11.h; sourceTree = \"<group>\"; };\n\t\t94D3654E10CEC86C00805023 /* BitMapConversionLogicFromX11.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = BitMapConversionLogicFromX11.c; path = vm/OSX/BitMapConversionLogicFromX11.c; sourceTree = \"<group>\"; };\n\t\t94E658DE0DDD03FE00358328 /* plugins.int */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = plugins.int; sourceTree = \"<group>\"; };\n\t\t94E658E00DDD03FE00358328 /* interp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; lineEnding = 1; path = interp.c; sourceTree = \"<group>\"; xcLanguageSpecificationIdentifier = xcode.lang.c; };\n\t\t94E658E10DDD03FE00358328 /* interp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = interp.h; sourceTree = \"<group>\"; };\n\t\t94E659200DDD03FE00358328 /* sqNamedPrims.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqNamedPrims.h; sourceTree = \"<group>\"; };\n\t\t94F3A9690E6BFA7C00E0B12A /* Squeak.png */ = {isa = PBXFileReference; explicitFileType = image.png; path = Squeak.png; sourceTree = \"<group>\"; };\n\t\t94F8798F0E6C0C7E00662DEA /* sqSqueakIPhoneInfoPlistInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqSqueakIPhoneInfoPlistInterface.h; sourceTree = \"<group>\"; };\n\t\t94F879900E6C0C7E00662DEA /* sqSqueakIPhoneInfoPlistInterface.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = sqSqueakIPhoneInfoPlistInterface.m; sourceTree = \"<group>\"; };\n\t\tBC4F78761358D2870081FC27 /* SqueakV3-minimum-MVC.sources */ = {isa = PBXFileReference; lastKnownFileType = text; name = \"SqueakV3-minimum-MVC.sources\"; path = \"iPhone/SqueakV3-minimum-MVC.sources\"; sourceTree = \"<group>\"; };\n\t\tBC6CC8E7134B045000B9B2B0 /* RoarVMMouseEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoarVMMouseEvent.h; sourceTree = \"<group>\"; };\n\t\tBC6CC8E8134B045100B9B2B0 /* RoarVMMouseEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RoarVMMouseEvent.m; sourceTree = \"<group>\"; };\n\t\tBC6CC8EB134B138300B9B2B0 /* RoarVMSwipeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RoarVMSwipeEvent.h; path = ../../RoarVMSwipeEvent.h; sourceTree = \"<group>\"; };\n\t\tBC6CC8EC134B138300B9B2B0 /* RoarVMSwipeEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RoarVMSwipeEvent.m; path = ../../RoarVMSwipeEvent.m; sourceTree = \"<group>\"; };\n\t\tBC82F910135697CD00EC2309 /* UIGestureRecognizer+RoarVMEvents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"UIGestureRecognizer+RoarVMEvents.h\"; sourceTree = \"<group>\"; };\n\t\tBC82F911135697CE00EC2309 /* UIGestureRecognizer+RoarVMEvents.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = \"UIGestureRecognizer+RoarVMEvents.m\"; sourceTree = \"<group>\"; };\n\t\tBC82F9131356A4C200EC2309 /* RoarVMMouseUpEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoarVMMouseUpEvent.h; sourceTree = \"<group>\"; };\n\t\tBC82F9141356A4C300EC2309 /* RoarVMMouseUpEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RoarVMMouseUpEvent.m; sourceTree = \"<group>\"; };\n\t\tBCAB989B134B0139004AB528 /* RoarVMAbstractEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoarVMAbstractEvent.h; sourceTree = \"<group>\"; };\n\t\tBCAB989C134B0139004AB528 /* RoarVMAbstractEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RoarVMAbstractEvent.m; sourceTree = \"<group>\"; };\n\t\tBCCC348D1349603100063417 /* Entitlements.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Entitlements.plist; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t1D60588F0D05DD3D006BFB54 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t94D2A24C112B8ED000B6E459 /* QuartzCore.framework in Frameworks */,\n\t\t\t\t9484F99010B13D470038BDC0 /* CoreGraphics.framework in Frameworks */,\n\t\t\t\t1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,\n\t\t\t\t945550010DF1BC6A00FB176B /* AudioToolbox.framework in Frameworks */,\n\t\t\t\t94577FBD10684D5E0020840A /* CoreAudio.framework in Frameworks */,\n\t\t\t\t94577FBF10684D5E0020840A /* CoreLocation.framework in Frameworks */,\n\t\t\t\t94577FC510684D7E0020840A /* SystemConfiguration.framework in Frameworks */,\n\t\t\t\t9484F8E810B0E1050038BDC0 /* UIKit.framework in Frameworks */,\n\t\t\t\t940BE5F91239F70D00674A11 /* OpenGLES.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t080E96DDFE201D6D7F000001 /* Classes */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tBC6CC8EB134B138300B9B2B0 /* RoarVMSwipeEvent.h */,\n\t\t\t\tBC6CC8EC134B138300B9B2B0 /* RoarVMSwipeEvent.m */,\n\t\t\t\t1D3623240D0F684500981E51 /* SqueakNoOGLIPhoneAppDelegate.h */,\n\t\t\t\t1D3623250D0F684500981E51 /* SqueakNoOGLIPhoneAppDelegate.m */,\n\t\t\t\t942F761B0E0B6B6100848BF2 /* sqSqueakIPhoneApplication.h */,\n\t\t\t\t942F761C0E0B6B6100848BF2 /* sqSqueakIPhoneApplication.m */,\n\t\t\t\t942F76350E0B6CEF00848BF2 /* sqSqueakIPhoneApplication+attributes.h */,\n\t\t\t\t94A0E8450DE5EB6E0071C8B9 /* sqSqueakIPhoneApplication+attributes.m */,\n\t\t\t\t9458525A10F043EB001401E7 /* sqSqueakIPhoneApplication+clipboard.h */,\n\t\t\t\t9458525B10F043EB001401E7 /* sqSqueakIPhoneApplication+clipboard.m */,\n\t\t\t\t943001260E0D5D670040BB27 /* sqSqueakIPhoneApplication+imageReadWrite.h */,\n\t\t\t\t943001270E0D5D670040BB27 /* sqSqueakIPhoneApplication+imageReadWrite.m */,\n\t\t\t\t94BCE93E0DDE044700F38F31 /* sqSqueakIPhoneApplication+events.h */,\n\t\t\t\t94BCE93F0DDE044700F38F31 /* sqSqueakIPhoneApplication+events.m */,\n\t\t\t\t9452BDC10F4095DE006410DE /* sqSqueakIPhoneApplication+Network.h */,\n\t\t\t\t9452BDC20F4095DE006410DE /* sqSqueakIPhoneApplication+Network.m */,\n\t\t\t\t94554F1D0DF1B65700FB176B /* sqSqueakIPhoneApplication+sound.h */,\n\t\t\t\t94554F1E0DF1B65700FB176B /* sqSqueakiPhoneApplication+sound.m */,\n\t\t\t\t943001A30E0D600C0040BB27 /* sqSqueakIPhoneFileDirectoryInterface.h */,\n\t\t\t\t943001A40E0D600C0040BB27 /* sqSqueakIPhoneFileDirectoryInterface.m */,\n\t\t\t\t94F8798F0E6C0C7E00662DEA /* sqSqueakIPhoneInfoPlistInterface.h */,\n\t\t\t\t94F879900E6C0C7E00662DEA /* sqSqueakIPhoneInfoPlistInterface.m */,\n\t\t\t\t9452D7630E0452D3000AD792 /* sqiPhoneScreenAndWindow.h */,\n\t\t\t\t9452D7640E0452D3000AD792 /* sqiPhoneScreenAndWindow.m */,\n\t\t\t\t949E5DB50DE3AB6A007388E0 /* SqueakUIView.h */,\n\t\t\t\t949E5DB60DE3AB6A007388E0 /* SqueakUIView.m */,\n\t\t\t\t940BE5791239F10000674A11 /* SqueakUIViewCALayer.h */,\n\t\t\t\t940BE57A1239F10000674A11 /* SqueakUIViewCALayer.m */,\n\t\t\t\t940BE5E71239F50100674A11 /* SqueakUIViewOpenGL.h */,\n\t\t\t\t940BE5E81239F50100674A11 /* SqueakUIViewOpenGL.m */,\n\t\t\t\t940CE8540DFCE2D200EBA91B /* SqueakUIController.h */,\n\t\t\t\t940CE8550DFCE2D200EBA91B /* SqueakUIController.m */,\n\t\t\t\t9458525410F04339001401E7 /* sqSqueakIPhoneClipboardAPI.h */,\n\t\t\t\t9458525510F04339001401E7 /* sqSqueakIPhoneClipboardAPI.m */,\n\t\t\t\tBCAB989B134B0139004AB528 /* RoarVMAbstractEvent.h */,\n\t\t\t\tBC6CC8E7134B045000B9B2B0 /* RoarVMMouseEvent.h */,\n\t\t\t\tBC82F9131356A4C200EC2309 /* RoarVMMouseUpEvent.h */,\n\t\t\t\tBC82F9141356A4C300EC2309 /* RoarVMMouseUpEvent.m */,\n\t\t\t\tBC6CC8E8134B045100B9B2B0 /* RoarVMMouseEvent.m */,\n\t\t\t\tBCAB989C134B0139004AB528 /* RoarVMAbstractEvent.m */,\n\t\t\t\tBC82F910135697CD00EC2309 /* UIGestureRecognizer+RoarVMEvents.h */,\n\t\t\t\tBC82F911135697CE00EC2309 /* UIGestureRecognizer+RoarVMEvents.m */,\n\t\t\t);\n\t\t\tpath = Classes;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A5D7CA9135E37A900D13E53 /* externals */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A5D7CAA135E37A900D13E53 /* externals.cpp */,\n\t\t\t\t0A5D7CAB135E37A900D13E53 /* externals.h */,\n\t\t\t);\n\t\t\tname = externals;\n\t\t\tpath = ../../../../../externals;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A5D7CAE135E37CB00D13E53 /* heap */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A5D7CAF135E37CB00D13E53 /* abstract_mark_sweep_collector.cpp */,\n\t\t\t\t0A5D7CB0135E37CB00D13E53 /* abstract_mark_sweep_collector.h */,\n\t\t\t\t0A5D7CB1135E37CB00D13E53 /* abstract_object_heap.cpp */,\n\t\t\t\t0A5D7CB2135E37CB00D13E53 /* abstract_object_heap.h */,\n\t\t\t\t0A5D7CB3135E37CB00D13E53 /* abstract_object_heap.inline.h */,\n\t\t\t\t0A5D7CB4135E37CB00D13E53 /* abstract_object_table.h */,\n\t\t\t\t0A5D7CB5135E37CB00D13E53 /* gc_oop_stack.h */,\n\t\t\t\t0A5D7CB6135E37CB00D13E53 /* indirect_oop_mark_sweep_collector.h */,\n\t\t\t\t0A5D7CB7135E37CB00D13E53 /* mark_sweep_collector.h */,\n\t\t\t\t0A5D7CB8135E37CB00D13E53 /* memory_system.cpp */,\n\t\t\t\t0A5D7CB9135E37CB00D13E53 /* memory_system.h */,\n\t\t\t\t0A5D7CBA135E37CB00D13E53 /* memory_system.inline.h */,\n\t\t\t\t0A5D7CBB135E37CB00D13E53 /* multicore_object_heap.cpp */,\n\t\t\t\t0A5D7CBC135E37CB00D13E53 /* multicore_object_heap.h */,\n\t\t\t\t0A5D7CBD135E37CB00D13E53 /* multicore_object_heap.inline.h */,\n\t\t\t\t0A5D7CBE135E37CB00D13E53 /* multicore_object_table.cpp */,\n\t\t\t\t0A5D7CBF135E37CB00D13E53 /* multicore_object_table.h */,\n\t\t\t\t0A5D7CC0135E37CB00D13E53 /* multicore_object_table.inline.h */,\n\t\t\t\t0A5D7CC1135E37CB00D13E53 /* oop_closure.h */,\n\t\t\t);\n\t\t\tname = heap;\n\t\t\tpath = ../../../../../heap;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A5D7CCA135E37CB00D13E53 /* image_readers */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A5D7CCB135E37CB00D13E53 /* squeak_image_reader.cpp */,\n\t\t\t\t0A5D7CCC135E37CB00D13E53 /* squeak_image_reader.h */,\n\t\t\t);\n\t\t\tname = image_readers;\n\t\t\tpath = ../../../../../image_readers;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A5D7CCD135E37CB00D13E53 /* interpreter */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A5D7CCE135E37CB00D13E53 /* abstract_primitive_table.h */,\n\t\t\t\t0A5D7CCF135E37CB00D13E53 /* at_cache.cpp */,\n\t\t\t\t0A5D7CD0135E37CB00D13E53 /* at_cache.h */,\n\t\t\t\t0A5D7CD1135E37CB00D13E53 /* external_primitive_table.h */,\n\t\t\t\t0A5D7CD2135E37CB00D13E53 /* interpreter_bytecodes.cpp */,\n\t\t\t\t0A5D7CD3135E37CB00D13E53 /* interpreter_bytecodes.h */,\n\t\t\t\t0A5D7CD4135E37CB00D13E53 /* interpreter_primitives.cpp */,\n\t\t\t\t0A5D7CD5135E37CB00D13E53 /* interpreter_primitives.h */,\n\t\t\t\t0A5D7CD6135E37CB00D13E53 /* method_cache.cpp */,\n\t\t\t\t0A5D7CD7135E37CB00D13E53 /* method_cache.h */,\n\t\t\t\t0A5D7CD8135E37CB00D13E53 /* obsolete_indexed_primitive_table.cpp */,\n\t\t\t\t0A5D7CD9135E37CB00D13E53 /* obsolete_indexed_primitive_table.h */,\n\t\t\t\t0A5D7CDA135E37CB00D13E53 /* obsolete_named_primitive_table.cpp */,\n\t\t\t\t0A5D7CDB135E37CB00D13E53 /* obsolete_named_primitive_table.h */,\n\t\t\t\t0A5D7CDC135E37CB00D13E53 /* primitive_table.cpp */,\n\t\t\t\t0A5D7CDD135E37CB00D13E53 /* primitive_table.h */,\n\t\t\t\t0A5D7CDE135E37CB00D13E53 /* squeak_interpreter.cpp */,\n\t\t\t\t0A5D7CDF135E37CB00D13E53 /* squeak_interpreter.h */,\n\t\t\t);\n\t\t\tname = interpreter;\n\t\t\tpath = ../../../../../interpreter;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A5D7CE0135E37CB00D13E53 /* messages */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A5D7CE1135E37CB00D13E53 /* abstract_message.cpp */,\n\t\t\t\t0A5D7CE2135E37CB00D13E53 /* abstract_message.h */,\n\t\t\t\t0A5D7CE3135E37CB00D13E53 /* deferred_request.cpp */,\n\t\t\t\t0A5D7CE4135E37CB00D13E53 /* deferred_request.h */,\n\t\t\t\t0A5D7CE5135E37CB00D13E53 /* interactions.cpp */,\n\t\t\t\t0A5D7CE6135E37CB00D13E53 /* interactions.h */,\n\t\t\t\t0A5D7CE7135E37CB00D13E53 /* interpreter_subset_for_control_transfer.cpp */,\n\t\t\t\t0A5D7CE8135E37CB00D13E53 /* interpreter_subset_for_control_transfer.h */,\n\t\t\t\t0A5D7CE9135E37CB00D13E53 /* message_classes.cpp */,\n\t\t\t\t0A5D7CEA135E37CB00D13E53 /* message_classes.h */,\n\t\t\t\t0A5D7CEB135E37CB00D13E53 /* message_or_ack_request.cpp */,\n\t\t\t\t0A5D7CEC135E37CB00D13E53 /* message_or_ack_request.h */,\n\t\t\t\t0A5D7CED135E37CB00D13E53 /* message_statics.cpp */,\n\t\t\t\t0A5D7CEE135E37CB00D13E53 /* message_statics.h */,\n\t\t\t\t0A5D7CEF135E37CB00D13E53 /* message_stats.cpp */,\n\t\t\t\t0A5D7CF0135E37CB00D13E53 /* message_stats.h */,\n\t\t\t\t0A5D7CF1135E37CB00D13E53 /* message_templates.h */,\n\t\t\t\t0A5D7CF2135E37CB00D13E53 /* receive_marker.cpp */,\n\t\t\t\t0A5D7CF3135E37CB00D13E53 /* receive_marker.h */,\n\t\t\t);\n\t\t\tname = messages;\n\t\t\tpath = ../../../../../messages;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A5D7CF4135E37CB00D13E53 /* objects */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A5D7CF5135E37CB00D13E53 /* chunk.h */,\n\t\t\t\t0A5D7CF6135E37CB00D13E53 /* chunk.inline.h */,\n\t\t\t\t0A5D7CF7135E37CB00D13E53 /* header_type.cpp */,\n\t\t\t\t0A5D7CF8135E37CB00D13E53 /* header_type.h */,\n\t\t\t\t0A5D7CF9135E37CB00D13E53 /* object.cpp */,\n\t\t\t\t0A5D7CFA135E37CB00D13E53 /* object.h */,\n\t\t\t\t0A5D7CFB135E37CB00D13E53 /* object.inline.h */,\n\t\t\t\t0A5D7CFC135E37CB00D13E53 /* object_indices.h */,\n\t\t\t\t0A5D7CFD135E37CB00D13E53 /* object_p.h */,\n\t\t\t\t0A5D7CFE135E37CB00D13E53 /* preheader.h */,\n\t\t\t\t0A5D7CFF135E37CB00D13E53 /* process_field_locator.cpp */,\n\t\t\t\t0A5D7D00135E37CB00D13E53 /* process_field_locator.h */,\n\t\t\t\t0A5D7D01135E37CB00D13E53 /* roots.cpp */,\n\t\t\t\t0A5D7D02135E37CB00D13E53 /* roots.h */,\n\t\t\t\t0A5D7D03135E37CB00D13E53 /* special_indices.h */,\n\t\t\t\t0A5D7D04135E37CB00D13E53 /* word_containing_object_type.h */,\n\t\t\t);\n\t\t\tname = objects;\n\t\t\tpath = ../../../../../objects;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A5D7D05135E37CB00D13E53 /* oops */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A5D7D06135E37CB00D13E53 /* abstract_oop.h */,\n\t\t\t\t0A5D7D07135E37CB00D13E53 /* oop.cpp */,\n\t\t\t\t0A5D7D08135E37CB00D13E53 /* oop.h */,\n\t\t\t\t0A5D7D09135E37CB00D13E53 /* oop.inline.h */,\n\t\t\t\t0A5D7D0A135E37CB00D13E53 /* tags.h */,\n\t\t\t);\n\t\t\tname = oops;\n\t\t\tpath = ../../../../../oops;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A5D7D0B135E37CB00D13E53 /* platform */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A5D7D0C135E37CB00D13E53 /* abstract_cpu_coordinate.h */,\n\t\t\t\t0A5D7D0D135E37CB00D13E53 /* abstract_memory_semantics.h */,\n\t\t\t\t0A5D7D0E135E37CB00D13E53 /* abstract_message_queue.h */,\n\t\t\t\t0A5D7D0F135E37CB00D13E53 /* abstract_os_interface.cpp */,\n\t\t\t\t0A5D7D10135E37CB00D13E53 /* abstract_os_interface.h */,\n\t\t\t\t0A5D7D11135E37CB00D13E53 /* cacheline_aligned.h */,\n\t\t\t\t0A5D7D12135E37CB00D13E53 /* cpu_coordinate.h */,\n\t\t\t\t0A5D7D13135E37CB00D13E53 /* dummy_cpu_coordinate.cpp */,\n\t\t\t\t0A5D7D14135E37CB00D13E53 /* dummy_cpu_coordinate.h */,\n\t\t\t\t0A5D7D15135E37CB00D13E53 /* ilib_message_queue.cpp */,\n\t\t\t\t0A5D7D16135E37CB00D13E53 /* ilib_message_queue.h */,\n\t\t\t\t0A5D7D17135E37CB00D13E53 /* ilib_os_interface.cpp */,\n\t\t\t\t0A5D7D18135E37CB00D13E53 /* ilib_os_interface.h */,\n\t\t\t\t0A5D7D19135E37CB00D13E53 /* logical_core.cpp */,\n\t\t\t\t0A5D7D1A135E37CB00D13E53 /* logical_core.h */,\n\t\t\t\t0A5D7D1B135E37CB00D13E53 /* memory_semantics.h */,\n\t\t\t\t0A5D7D1C135E37CB00D13E53 /* message_queue.h */,\n\t\t\t\t0A5D7D1D135E37CB00D13E53 /* os_interface.h */,\n\t\t\t\t0A5D7D1E135E37CB00D13E53 /* osx_os_interface.cpp */,\n\t\t\t\t0A5D7D1F135E37CB00D13E53 /* osx_os_interface.h */,\n\t\t\t\t0A5D7D20135E37CB00D13E53 /* posix_os_interface.cpp */,\n\t\t\t\t0A5D7D21135E37CB00D13E53 /* posix_os_interface.h */,\n\t\t\t\t0A5D7D22135E37CB00D13E53 /* process_memory_semantics.cpp */,\n\t\t\t\t0A5D7D23135E37CB00D13E53 /* process_memory_semantics.h */,\n\t\t\t\t0A5D7D24135E37CB00D13E53 /* shared_memory_message_queue.cpp */,\n\t\t\t\t0A5D7D25135E37CB00D13E53 /* shared_memory_message_queue.h */,\n\t\t\t\t0A5D7D26135E37CB00D13E53 /* shared_memory_message_queue_per_sender.cpp */,\n\t\t\t\t0A5D7D27135E37CB00D13E53 /* shared_memory_message_queue_per_sender.h */,\n\t\t\t\t0A5D7D28135E37CB00D13E53 /* thread_memory_semantics.cpp */,\n\t\t\t\t0A5D7D29135E37CB00D13E53 /* thread_memory_semantics.h */,\n\t\t\t\t0A5D7D2A135E37CB00D13E53 /* tile_cpu_coordinate.cpp */,\n\t\t\t\t0A5D7D2B135E37CB00D13E53 /* tile_cpu_coordinate.h */,\n\t\t\t\t0A68E00C153CB6B700C850D2 /* tmc_os_interface.cpp */,\n\t\t\t\t0A68E00D153CB6B700C850D2 /* tmc_os_interface.h */,\n\t\t\t);\n\t\t\tname = platform;\n\t\t\tpath = ../../../../../platform;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A5D7D2C135E37CB00D13E53 /* primitives */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A5D7D2D135E37CB00D13E53 /* RVMPlugin.cpp */,\n\t\t\t\t0A5D7D2E135E37CB00D13E53 /* RVMPlugin.h */,\n\t\t\t);\n\t\t\tname = primitives;\n\t\t\tpath = ../../../../../primitives;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A5D7D2F135E37CB00D13E53 /* runtime */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A5D7D30135E37CB00D13E53 /* abstract_mutex.cpp */,\n\t\t\t\t0A5D7D31135E37CB00D13E53 /* abstract_mutex.h */,\n\t\t\t\t0A5D7D32135E37CB00D13E53 /* abstract_tracer.cpp */,\n\t\t\t\t0A5D7D33135E37CB00D13E53 /* abstract_tracer.h */,\n\t\t\t\t0A5D7D34135E37CB00D13E53 /* bytemap.cpp */,\n\t\t\t\t0A5D7D35135E37CB00D13E53 /* bytemap.h */,\n\t\t\t\t0A5D7D36135E37CB00D13E53 /* core_tracer.cpp */,\n\t\t\t\t0A5D7D37135E37CB00D13E53 /* core_tracer.h */,\n\t\t\t\t0A5D7D38135E37CB00D13E53 /* debug_helper.cpp */,\n\t\t\t\t0A5D7D39135E37CB00D13E53 /* debug_helper.h */,\n\t\t\t\t0A5D7D3A135E37CB00D13E53 /* debug_store_checks.h */,\n\t\t\t\t0ABEA92313C26C7A003108B9 /* gc_debugging_tracer.cpp */,\n\t\t\t\t0ABEA92413C26C7A003108B9 /* gc_debugging_tracer.h */,\n\t\t\t\t0A5D7D3D135E37CB00D13E53 /* error_handling.cpp */,\n\t\t\t\t0A5D7D3E135E37CB00D13E53 /* error_handling.h */,\n\t\t\t\t0A5D7D3F135E37CB00D13E53 /* execution_tracer.cpp */,\n\t\t\t\t0A5D7D40135E37CB00D13E53 /* execution_tracer.h */,\n\t\t\t\t0A5D7D41135E37CB00D13E53 /* headers.h */,\n\t\t\t\t0A5D7D42135E37CB00D13E53 /* main.cpp */,\n\t\t\t\t0A5D7D43135E37CB00D13E53 /* measurements.cpp */,\n\t\t\t\t0A5D7D44135E37CB00D13E53 /* measurements.h */,\n\t\t\t\t0A5D7D45135E37CB00D13E53 /* my_rank.cpp */,\n\t\t\t\t0A5D7D46135E37CB00D13E53 /* my_rank.h */,\n\t\t\t\t0A5D7D47135E37CB00D13E53 /* oop_tracer.cpp */,\n\t\t\t\t0A5D7D48135E37CB00D13E53 /* oop_tracer.h */,\n\t\t\t\t0A040E2013B7526D007E172E /* performance_counters.cpp */,\n\t\t\t\t0A040E2113B7526D007E172E /* performance_counters.h */,\n\t\t\t\t0A5D7D49135E37CB00D13E53 /* printer.cpp */,\n\t\t\t\t0A5D7D4A135E37CB00D13E53 /* printer.h */,\n\t\t\t\t0A5D7D4B135E37CB00D13E53 /* profiling_tracer.cpp */,\n\t\t\t\t0A5D7D4C135E37CB00D13E53 /* profiling_tracer.h */,\n\t\t\t\t0A5D7D4D135E37CB00D13E53 /* rank_set.cpp */,\n\t\t\t\t0A5D7D4E135E37CB00D13E53 /* rank_set.h */,\n\t\t\t\t0A5D7D4F135E37CB00D13E53 /* runtime_tester.h */,\n\t\t\t\t0A5D7D50135E37CB00D13E53 /* rvm_bitmap.cpp */,\n\t\t\t\t0A5D7D51135E37CB00D13E53 /* rvm_bitmap.h */,\n\t\t\t\t0A5D7D52135E37CB00D13E53 /* rvm_config.cpp */,\n\t\t\t\t0A5D7D53135E37CB00D13E53 /* rvm_config.h */,\n\t\t\t\t0A5D7D54135E37CB00D13E53 /* safepoint.cpp */,\n\t\t\t\t0A5D7D55135E37CB00D13E53 /* safepoint.h */,\n\t\t\t\t0A5D7D56135E37CB00D13E53 /* safepoint_ability.cpp */,\n\t\t\t\t0A5D7D57135E37CB00D13E53 /* safepoint_ability.h */,\n\t\t\t\t0A5D7D58135E37CB00D13E53 /* safepoint_request_queue.cpp */,\n\t\t\t\t0A5D7D59135E37CB00D13E53 /* safepoint_request_queue.h */,\n\t\t\t\t0A5D7D5A135E37CB00D13E53 /* scheduler_mutex.cpp */,\n\t\t\t\t0A5D7D5B135E37CB00D13E53 /* scheduler_mutex.h */,\n\t\t\t\t0A5D7D5C135E37CB00D13E53 /* semaphore_mutex.cpp */,\n\t\t\t\t0A5D7D5D135E37CB00D13E53 /* semaphore_mutex.h */,\n\t\t\t\t0A5D7D5E135E37CB00D13E53 /* squeak_adapters.cpp */,\n\t\t\t\t0A5D7D5F135E37CB00D13E53 /* squeak_adapters.h */,\n\t\t\t\t0A5D7D60135E37CB00D13E53 /* timeout_deferral.cpp */,\n\t\t\t\t0A5D7D61135E37CB00D13E53 /* timeout_deferral.h */,\n\t\t\t\t0A5D7D62135E37CB00D13E53 /* timeout_timer.cpp */,\n\t\t\t\t0A5D7D63135E37CB00D13E53 /* timeout_timer.h */,\n\t\t\t\t0A5D7D64135E37CB00D13E53 /* tracked_ptr.h */,\n\t\t\t\t0A5D7D65135E37CB00D13E53 /* tracked_ptr_registry.h */,\n\t\t\t\t0A5D7D66135E37CB00D13E53 /* utils.cpp */,\n\t\t\t\t0A5D7D67135E37CB00D13E53 /* utils.h */,\n\t\t\t);\n\t\t\tname = runtime;\n\t\t\tpath = ../../../../../runtime;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A5D7D68135E37CB00D13E53 /* types */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A5D7D69135E37CB00D13E53 /* types.h */,\n\t\t\t);\n\t\t\tname = types;\n\t\t\tpath = ../../../../../types;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0A68E004153CB66B00C850D2 /* message_buffers */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A68E005153CB66B00C850D2 /* buffered_channel.cpp */,\n\t\t\t\t0A68E006153CB66B00C850D2 /* buffered_channel.h */,\n\t\t\t\t0A68E007153CB66B00C850D2 /* buffered_channel_debug.h */,\n\t\t\t\t0A68E008153CB66B00C850D2 /* synced_queue.cpp */,\n\t\t\t\t0A68E009153CB66B00C850D2 /* synced_queue.h */,\n\t\t\t);\n\t\t\tname = message_buffers;\n\t\t\tpath = ../../../../../message_buffers;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32B28135EC55400B97FB8 /* from_squeak */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0ADE8A79135F389000D37EAD /* intplugins */,\n\t\t\t\t0AA32C06135EC6BF00B97FB8 /* unix */,\n\t\t\t\t0AA32BF4135EC68800B97FB8 /* iOS */,\n\t\t\t\t0AA32B2A135EC5B700B97FB8 /* Cross */,\n\t\t\t);\n\t\t\tname = from_squeak;\n\t\t\tsourceTree = SOURCE_ROOT;\n\t\t};\n\t\t0AA32B2A135EC5B700B97FB8 /* Cross */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32B2B135EC5C300B97FB8 /* plugins */,\n\t\t\t\t0AA32BED135EC61300B97FB8 /* vm */,\n\t\t\t);\n\t\t\tname = Cross;\n\t\t\tsourceTree = SOURCE_ROOT;\n\t\t};\n\t\t0AA32B2B135EC5C300B97FB8 /* plugins */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32B2C135EC5EE00B97FB8 /* AsynchFilePlugin */,\n\t\t\t\t0AA32B2E135EC5EE00B97FB8 /* FileCopyPlugin */,\n\t\t\t\t0AA32B30135EC5EE00B97FB8 /* FilePlugin */,\n\t\t\t\t0AA32B33135EC5EE00B97FB8 /* HostWindowPlugin */,\n\t\t\t\t0AA32B37135EC5EE00B97FB8 /* JPEGReadWriter2Plugin */,\n\t\t\t\t0AA32B76135EC5EE00B97FB8 /* LocalePlugin */,\n\t\t\t\t0AA32B78135EC5EE00B97FB8 /* MIDIPlugin */,\n\t\t\t\t0AA32B7A135EC5EE00B97FB8 /* PseudoTTYPlugin */,\n\t\t\t\t0AA32B7C135EC5EE00B97FB8 /* QuicktimePlugin */,\n\t\t\t\t0AA32B7E135EC5EE00B97FB8 /* RePlugin */,\n\t\t\t\t0AA32B8B135EC5EE00B97FB8 /* SecurityPlugin */,\n\t\t\t\t0AA32B8D135EC5EE00B97FB8 /* SocketPlugin */,\n\t\t\t\t0AA32B90135EC5EE00B97FB8 /* SoundCodecPrims */,\n\t\t\t\t0AA32B93135EC5EE00B97FB8 /* SoundGenerationPlugin */,\n\t\t\t\t0AA32B95135EC5EE00B97FB8 /* SoundPlugin */,\n\t\t\t\t0AA32B97135EC5EE00B97FB8 /* Squeak3D */,\n\t\t\t\t0AA32BA0135EC5EE00B97FB8 /* SqueakFFIPrims */,\n\t\t\t\t0AA32BA3135EC5EE00B97FB8 /* SqueakSSL */,\n\t\t\t\t0AA32BA5135EC5EE00B97FB8 /* SurfacePlugin */,\n\t\t\t\t0AA32BA8135EC5EE00B97FB8 /* UUIDPlugin */,\n\t\t\t);\n\t\t\tname = plugins;\n\t\t\tsourceTree = SOURCE_ROOT;\n\t\t};\n\t\t0AA32B2C135EC5EE00B97FB8 /* AsynchFilePlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32B2D135EC5EE00B97FB8 /* AsynchFilePlugin.h */,\n\t\t\t);\n\t\t\tname = AsynchFilePlugin;\n\t\t\tpath = ../../Cross/plugins/AsynchFilePlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32B2E135EC5EE00B97FB8 /* FileCopyPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32B2F135EC5EE00B97FB8 /* FileCopyPlugin.h */,\n\t\t\t);\n\t\t\tname = FileCopyPlugin;\n\t\t\tpath = ../../Cross/plugins/FileCopyPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32B30135EC5EE00B97FB8 /* FilePlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32B31135EC5EE00B97FB8 /* FilePlugin.h */,\n\t\t\t\t0AA32B32135EC5EE00B97FB8 /* sqFilePluginBasicPrims.c */,\n\t\t\t);\n\t\t\tname = FilePlugin;\n\t\t\tpath = ../../Cross/plugins/FilePlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32B33135EC5EE00B97FB8 /* HostWindowPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32B34135EC5EE00B97FB8 /* HostWindowPlugin.h */,\n\t\t\t);\n\t\t\tname = HostWindowPlugin;\n\t\t\tpath = ../../Cross/plugins/HostWindowPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32B37135EC5EE00B97FB8 /* JPEGReadWriter2Plugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32B38135EC5EE00B97FB8 /* Error.c */,\n\t\t\t\t0AA32B39135EC5EE00B97FB8 /* jcapimin.c */,\n\t\t\t\t0AA32B3A135EC5EE00B97FB8 /* jcapistd.c */,\n\t\t\t\t0AA32B3B135EC5EE00B97FB8 /* jccoefct.c */,\n\t\t\t\t0AA32B3C135EC5EE00B97FB8 /* jccolor.c */,\n\t\t\t\t0AA32B3D135EC5EE00B97FB8 /* jcdctmgr.c */,\n\t\t\t\t0AA32B3E135EC5EE00B97FB8 /* jchuff.c */,\n\t\t\t\t0AA32B3F135EC5EE00B97FB8 /* jchuff.h */,\n\t\t\t\t0AA32B40135EC5EE00B97FB8 /* jcinit.c */,\n\t\t\t\t0AA32B41135EC5EE00B97FB8 /* jcmainct.c */,\n\t\t\t\t0AA32B42135EC5EE00B97FB8 /* jcmarker.c */,\n\t\t\t\t0AA32B43135EC5EE00B97FB8 /* jcmaster.c */,\n\t\t\t\t0AA32B44135EC5EE00B97FB8 /* jcomapi.c */,\n\t\t\t\t0AA32B45135EC5EE00B97FB8 /* jconfig.h */,\n\t\t\t\t0AA32B46135EC5EE00B97FB8 /* jcparam.c */,\n\t\t\t\t0AA32B47135EC5EE00B97FB8 /* jcphuff.c */,\n\t\t\t\t0AA32B48135EC5EE00B97FB8 /* jcprepct.c */,\n\t\t\t\t0AA32B49135EC5EE00B97FB8 /* jcsample.c */,\n\t\t\t\t0AA32B4A135EC5EE00B97FB8 /* jctrans.c */,\n\t\t\t\t0AA32B4B135EC5EE00B97FB8 /* jdapimin.c */,\n\t\t\t\t0AA32B4C135EC5EE00B97FB8 /* jdapistd.c */,\n\t\t\t\t0AA32B4D135EC5EE00B97FB8 /* jdatadst.c */,\n\t\t\t\t0AA32B4E135EC5EE00B97FB8 /* jdatasrc.c */,\n\t\t\t\t0AA32B4F135EC5EE00B97FB8 /* jdcoefct.c */,\n\t\t\t\t0AA32B50135EC5EE00B97FB8 /* jdcolor.c */,\n\t\t\t\t0AA32B51135EC5EE00B97FB8 /* jdct.h */,\n\t\t\t\t0AA32B52135EC5EE00B97FB8 /* jddctmgr.c */,\n\t\t\t\t0AA32B53135EC5EE00B97FB8 /* jdhuff.c */,\n\t\t\t\t0AA32B54135EC5EE00B97FB8 /* jdhuff.h */,\n\t\t\t\t0AA32B55135EC5EE00B97FB8 /* jdinput.c */,\n\t\t\t\t0AA32B56135EC5EE00B97FB8 /* jdmainct.c */,\n\t\t\t\t0AA32B57135EC5EE00B97FB8 /* jdmarker.c */,\n\t\t\t\t0AA32B58135EC5EE00B97FB8 /* jdmaster.c */,\n\t\t\t\t0AA32B59135EC5EE00B97FB8 /* jdmerge.c */,\n\t\t\t\t0AA32B5A135EC5EE00B97FB8 /* jdphuff.c */,\n\t\t\t\t0AA32B5B135EC5EE00B97FB8 /* jdpostct.c */,\n\t\t\t\t0AA32B5C135EC5EE00B97FB8 /* jdsample.c */,\n\t\t\t\t0AA32B5D135EC5EE00B97FB8 /* jdtrans.c */,\n\t\t\t\t0AA32B5E135EC5EE00B97FB8 /* jerror.c */,\n\t\t\t\t0AA32B5F135EC5EE00B97FB8 /* jerror.h */,\n\t\t\t\t0AA32B60135EC5EE00B97FB8 /* jfdctflt.c */,\n\t\t\t\t0AA32B61135EC5EE00B97FB8 /* jfdctfst.c */,\n\t\t\t\t0AA32B62135EC5EE00B97FB8 /* jfdctint.c */,\n\t\t\t\t0AA32B63135EC5EE00B97FB8 /* jidctflt.c */,\n\t\t\t\t0AA32B64135EC5EE00B97FB8 /* jidctfst.c */,\n\t\t\t\t0AA32B65135EC5EE00B97FB8 /* jidctint.c */,\n\t\t\t\t0AA32B66135EC5EE00B97FB8 /* jidctred.c */,\n\t\t\t\t0AA32B67135EC5EE00B97FB8 /* jinclude.h */,\n\t\t\t\t0AA32B68135EC5EE00B97FB8 /* jmemdatadst.c */,\n\t\t\t\t0AA32B69135EC5EE00B97FB8 /* jmemdatasrc.c */,\n\t\t\t\t0AA32B6A135EC5EE00B97FB8 /* jmemmgr.c */,\n\t\t\t\t0AA32B6B135EC5EE00B97FB8 /* jmemnobs.c */,\n\t\t\t\t0AA32B6C135EC5EE00B97FB8 /* jmemsys.h */,\n\t\t\t\t0AA32B6D135EC5EE00B97FB8 /* jmorecfg.h */,\n\t\t\t\t0AA32B6E135EC5EE00B97FB8 /* jpegint.h */,\n\t\t\t\t0AA32B6F135EC5EE00B97FB8 /* jpeglib.h */,\n\t\t\t\t0AA32B70135EC5EE00B97FB8 /* JPEGReadWriter2Plugin.h */,\n\t\t\t\t0AA32B71135EC5EE00B97FB8 /* jquant1.c */,\n\t\t\t\t0AA32B72135EC5EE00B97FB8 /* jquant2.c */,\n\t\t\t\t0AA32B73135EC5EE00B97FB8 /* jutils.c */,\n\t\t\t\t0AA32B74135EC5EE00B97FB8 /* jversion.h */,\n\t\t\t\t0AA32B75135EC5EE00B97FB8 /* ReadMe.txt */,\n\t\t\t);\n\t\t\tname = JPEGReadWriter2Plugin;\n\t\t\tpath = ../../Cross/plugins/JPEGReadWriter2Plugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32B76135EC5EE00B97FB8 /* LocalePlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32B77135EC5EE00B97FB8 /* LocalePlugin.h */,\n\t\t\t);\n\t\t\tname = LocalePlugin;\n\t\t\tpath = ../../Cross/plugins/LocalePlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32B78135EC5EE00B97FB8 /* MIDIPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32B79135EC5EE00B97FB8 /* MIDIPlugin.h */,\n\t\t\t);\n\t\t\tname = MIDIPlugin;\n\t\t\tpath = ../../Cross/plugins/MIDIPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32B7A135EC5EE00B97FB8 /* PseudoTTYPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32B7B135EC5EE00B97FB8 /* PseudoTTYPlugin.h */,\n\t\t\t);\n\t\t\tname = PseudoTTYPlugin;\n\t\t\tpath = ../../Cross/plugins/PseudoTTYPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32B7C135EC5EE00B97FB8 /* QuicktimePlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32B7D135EC5EE00B97FB8 /* QuicktimePlugin.h */,\n\t\t\t);\n\t\t\tname = QuicktimePlugin;\n\t\t\tpath = ../../Cross/plugins/QuicktimePlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32B7E135EC5EE00B97FB8 /* RePlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32B7F135EC5EE00B97FB8 /* chartables.c */,\n\t\t\t\t0AA32B80135EC5EE00B97FB8 /* config.h */,\n\t\t\t\t0AA32B81135EC5EE00B97FB8 /* get.c */,\n\t\t\t\t0AA32B82135EC5EE00B97FB8 /* internal.h */,\n\t\t\t\t0AA32B83135EC5EE00B97FB8 /* oldInternal.h */,\n\t\t\t\t0AA32B84135EC5EE00B97FB8 /* pcre.c */,\n\t\t\t\t0AA32B85135EC5EE00B97FB8 /* pcre.h */,\n\t\t\t\t0AA32B86135EC5EE00B97FB8 /* rePlugin.h */,\n\t\t\t\t0AA32B87135EC5EE00B97FB8 /* RePlugin3-Fixes.1.cs */,\n\t\t\t\t0AA32B88135EC5EE00B97FB8 /* RePlugin3-Fixes2.1.cs */,\n\t\t\t\t0AA32B89135EC5EE00B97FB8 /* RePlugin3.3.1.cs */,\n\t\t\t\t0AA32B8A135EC5EE00B97FB8 /* study.c */,\n\t\t\t);\n\t\t\tname = RePlugin;\n\t\t\tpath = ../../Cross/plugins/RePlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32B8B135EC5EE00B97FB8 /* SecurityPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32B8C135EC5EE00B97FB8 /* SecurityPlugin.h */,\n\t\t\t);\n\t\t\tname = SecurityPlugin;\n\t\t\tpath = ../../Cross/plugins/SecurityPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32B8D135EC5EE00B97FB8 /* SocketPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32B8E135EC5EE00B97FB8 /* SocketPlugin.h */,\n\t\t\t\t0AA32B8F135EC5EE00B97FB8 /* SocketPrims.pdf */,\n\t\t\t);\n\t\t\tname = SocketPlugin;\n\t\t\tpath = ../../Cross/plugins/SocketPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32B90135EC5EE00B97FB8 /* SoundCodecPrims */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32B91135EC5EE00B97FB8 /* SoundCodecPrims.h */,\n\t\t\t\t0AA32B92135EC5EE00B97FB8 /* sqSoundCodecPluginBasicPrims.c */,\n\t\t\t);\n\t\t\tname = SoundCodecPrims;\n\t\t\tpath = ../../Cross/plugins/SoundCodecPrims;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32B93135EC5EE00B97FB8 /* SoundGenerationPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32B94135EC5EE00B97FB8 /* SoundGenerationPlugin.h */,\n\t\t\t);\n\t\t\tname = SoundGenerationPlugin;\n\t\t\tpath = ../../Cross/plugins/SoundGenerationPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32B95135EC5EE00B97FB8 /* SoundPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32B96135EC5EE00B97FB8 /* SoundPlugin.h */,\n\t\t\t);\n\t\t\tname = SoundPlugin;\n\t\t\tpath = ../../Cross/plugins/SoundPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32B97135EC5EE00B97FB8 /* Squeak3D */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32B98135EC5EE00B97FB8 /* b3d.h */,\n\t\t\t\t0AA32B99135EC5EE00B97FB8 /* b3dAlloc.c */,\n\t\t\t\t0AA32B9A135EC5EE00B97FB8 /* b3dAlloc.h */,\n\t\t\t\t0AA32B9B135EC5EE00B97FB8 /* b3dDraw.c */,\n\t\t\t\t0AA32B9C135EC5EE00B97FB8 /* b3dInit.c */,\n\t\t\t\t0AA32B9D135EC5EE00B97FB8 /* b3dMain.c */,\n\t\t\t\t0AA32B9E135EC5EE00B97FB8 /* b3dRemap.c */,\n\t\t\t\t0AA32B9F135EC5EE00B97FB8 /* b3dTypes.h */,\n\t\t\t);\n\t\t\tname = Squeak3D;\n\t\t\tpath = ../../Cross/plugins/Squeak3D;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32BA0135EC5EE00B97FB8 /* SqueakFFIPrims */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32BA1135EC5EE00B97FB8 /* sqFFI.h */,\n\t\t\t\t0AA32BA2135EC5EE00B97FB8 /* sqManualSurface.c */,\n\t\t\t);\n\t\t\tname = SqueakFFIPrims;\n\t\t\tpath = ../../Cross/plugins/SqueakFFIPrims;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32BA3135EC5EE00B97FB8 /* SqueakSSL */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32BA4135EC5EE00B97FB8 /* SqueakSSL.h */,\n\t\t\t);\n\t\t\tname = SqueakSSL;\n\t\t\tpath = ../../Cross/plugins/SqueakSSL;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32BA5135EC5EE00B97FB8 /* SurfacePlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32BA6135EC5EE00B97FB8 /* SurfacePlugin.c */,\n\t\t\t\t0AA32BA7135EC5EE00B97FB8 /* SurfacePlugin.h */,\n\t\t\t);\n\t\t\tname = SurfacePlugin;\n\t\t\tpath = ../../Cross/plugins/SurfacePlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32BA8135EC5EE00B97FB8 /* UUIDPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32BA9135EC5EE00B97FB8 /* UUIDPlugin.h */,\n\t\t\t);\n\t\t\tname = UUIDPlugin;\n\t\t\tpath = ../../Cross/plugins/UUIDPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32BED135EC61300B97FB8 /* vm */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32BEE135EC61300B97FB8 /* sq.h */,\n\t\t\t\t0AA32BEF135EC61300B97FB8 /* sqMemoryAccess.h */,\n\t\t\t\t0AA32BF0135EC61300B97FB8 /* sqNamedPrims.c */,\n\t\t\t\t0AB173FB135F2A2F0095BF89 /* sqVirtualMachine.h */,\n\t\t\t\t0AA32BF1135EC61300B97FB8 /* sqVirtualMachine.c */,\n\t\t\t);\n\t\t\tname = vm;\n\t\t\tpath = ../../Cross/vm;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32BF4135EC68800B97FB8 /* iOS */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32C1D135EC7DF00B97FB8 /* vm */,\n\t\t\t\t0AA32BF5135EC69200B97FB8 /* plugins */,\n\t\t\t);\n\t\t\tname = iOS;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32BF5135EC69200B97FB8 /* plugins */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32C10135EC70F00B97FB8 /* SecurityPlugin */,\n\t\t\t\t0AA32C12135EC70F00B97FB8 /* SoundPlugin */,\n\t\t\t\t0AA32C0C135EC6F400B97FB8 /* SqueakFFIPrims */,\n\t\t\t\t0AA32BF6135EC69F00B97FB8 /* SqueakObjectiveC */,\n\t\t\t);\n\t\t\tname = plugins;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32BF6135EC69F00B97FB8 /* SqueakObjectiveC */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32BF7135EC69F00B97FB8 /* drawing.m */,\n\t\t\t\t0AA32BF8135EC69F00B97FB8 /* Info.plist */,\n\t\t\t\t0AA32BF9135EC69F00B97FB8 /* PDColoredProgressView.h */,\n\t\t\t\t0AA32BFA135EC69F00B97FB8 /* PDColoredProgressView.m */,\n\t\t\t\t0AA32BFB135EC69F00B97FB8 /* SqueakObjectiveC.xcodeproj.zip */,\n\t\t\t\t0AA32BFC135EC69F00B97FB8 /* squeakProxy.h */,\n\t\t\t\t0AA32BFD135EC69F00B97FB8 /* squeakProxy.m */,\n\t\t\t\t0AA32BFE135EC69F00B97FB8 /* squeakSUnitTester.h */,\n\t\t\t\t0AA32BFF135EC69F00B97FB8 /* squeakSUnitTester.m */,\n\t\t\t);\n\t\t\tname = SqueakObjectiveC;\n\t\t\tpath = ../plugins/SqueakObjectiveC;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32C06135EC6BF00B97FB8 /* unix */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32C1A135EC74C00B97FB8 /* vm */,\n\t\t\t\t0AA32C07135EC6CC00B97FB8 /* plugins */,\n\t\t\t);\n\t\t\tname = unix;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32C07135EC6CC00B97FB8 /* plugins */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32C08135EC6D900B97FB8 /* AsynchFilePlugin */,\n\t\t\t);\n\t\t\tname = plugins;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32C08135EC6D900B97FB8 /* AsynchFilePlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32C09135EC6D900B97FB8 /* sqUnixAsynchFile.c */,\n\t\t\t\t0AA32C0A135EC6D900B97FB8 /* sqUnixAsynchFile.h */,\n\t\t\t);\n\t\t\tname = AsynchFilePlugin;\n\t\t\tpath = ../../unix/plugins/AsynchFilePlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32C0C135EC6F400B97FB8 /* SqueakFFIPrims */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32C0D135EC6F400B97FB8 /* dummyFFI.c */,\n\t\t\t\t0AA32C0E135EC6F400B97FB8 /* dummyFFI.h */,\n\t\t\t);\n\t\t\tname = SqueakFFIPrims;\n\t\t\tpath = ../plugins/SqueakFFIPrims;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32C10135EC70F00B97FB8 /* SecurityPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32C11135EC70F00B97FB8 /* sqMacSecurity.c */,\n\t\t\t);\n\t\t\tname = SecurityPlugin;\n\t\t\tpath = ../plugins/SecurityPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32C12135EC70F00B97FB8 /* SoundPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32C13135EC70F00B97FB8 /* sqSqueakSoundCoreAudio.h */,\n\t\t\t\t0AA32C14135EC70F00B97FB8 /* sqSqueakSoundCoreAudio.m */,\n\t\t\t\t0AA32C15135EC70F00B97FB8 /* sqSqueakSoundCoreAudioAPI.h */,\n\t\t\t\t0AA32C16135EC70F00B97FB8 /* sqSqueakSoundCoreAudioAPI.m */,\n\t\t\t);\n\t\t\tname = SoundPlugin;\n\t\t\tpath = ../plugins/SoundPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32C1A135EC74C00B97FB8 /* vm */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32C1B135EC76600B97FB8 /* sqUnixExternalPrims.c */,\n\t\t\t);\n\t\t\tname = vm;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32C1D135EC7DF00B97FB8 /* vm */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32C77135ECEBF00B97FB8 /* iPhone */,\n\t\t\t);\n\t\t\tname = vm;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0AA32C77135ECEBF00B97FB8 /* iPhone */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t);\n\t\t\tname = iPhone;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0ADE8A79135F389000D37EAD /* intplugins */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0ADE8A99135F38FE00D37EAD /* JPEGReaderPlugin */,\n\t\t\t\t0ADE8A9B135F38FE00D37EAD /* JPEGReadWriter2Plugin */,\n\t\t\t\t0ADE8A9D135F38FE00D37EAD /* Klatt */,\n\t\t\t\t0ADE8A9F135F38FE00D37EAD /* LargeIntegers */,\n\t\t\t\t0ADE8AA1135F38FE00D37EAD /* Matrix2x3Plugin */,\n\t\t\t\t0ADE8AA3135F38FE00D37EAD /* MiscPrimitivePlugin */,\n\t\t\t\t0ADE8AA5135F38FE00D37EAD /* ObjectiveCPlugin */,\n\t\t\t\t0ADE8AA7135F38FE00D37EAD /* RePlugin */,\n\t\t\t\t0ADE8AA9135F38FE00D37EAD /* SecurityPlugin */,\n\t\t\t\t0ADE8AAB135F38FE00D37EAD /* SocketPlugin */,\n\t\t\t\t0ADE8AAD135F38FE00D37EAD /* SoundCodecPrims */,\n\t\t\t\t0ADE8AAF135F38FE00D37EAD /* SoundGenerationPlugin */,\n\t\t\t\t0ADE8AB1135F38FE00D37EAD /* SoundPlugin */,\n\t\t\t\t0ADE8AB3135F38FE00D37EAD /* Squeak3D */,\n\t\t\t\t0ADE8A7B135F38B200D37EAD /* AsynchFilePlugin */,\n\t\t\t\t0ADE8A7D135F38B200D37EAD /* B2DPlugin */,\n\t\t\t\t0ADE8A7F135F38B200D37EAD /* BitBltPlugin */,\n\t\t\t\t0ADE8A81135F38B200D37EAD /* BMPReadWriterPlugin */,\n\t\t\t\t0ADE8A83135F38B200D37EAD /* DSAPrims */,\n\t\t\t\t0ADE8A85135F38B200D37EAD /* FFTPlugin */,\n\t\t\t\t0ADE8A87135F38B200D37EAD /* FilePlugin */,\n\t\t\t\t0ADE8A89135F38B200D37EAD /* FloatArrayPlugin */,\n\t\t\t\t0ADE8A8B135F38B200D37EAD /* GeniePlugin */,\n\t\t\t\t0ADE8A8D135F38B200D37EAD /* HostWindowPlugin */,\n\t\t\t\t0ADE8AC3135F392E00D37EAD /* SqueakFFIPrims */,\n\t\t\t\t0ADE8AC5135F392E00D37EAD /* StarSqueakPlugin */,\n\t\t\t\t0ADE8AC7135F392E00D37EAD /* UUIDPlugin */,\n\t\t\t\t0ADE8AC9135F392E00D37EAD /* ZipPlugin */,\n\t\t\t);\n\t\t\tname = intplugins;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0ADE8A7B135F38B200D37EAD /* AsynchFilePlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0ADE8A7C135F38B200D37EAD /* AsynchFilePlugin.c */,\n\t\t\t);\n\t\t\tname = AsynchFilePlugin;\n\t\t\tpath = ../../intplugins/AsynchFilePlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0ADE8A7D135F38B200D37EAD /* B2DPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0ADE8A7E135F38B200D37EAD /* B2DPlugin.c */,\n\t\t\t);\n\t\t\tname = B2DPlugin;\n\t\t\tpath = ../../intplugins/B2DPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0ADE8A7F135F38B200D37EAD /* BitBltPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0ADE8A80135F38B200D37EAD /* BitBltPlugin.c */,\n\t\t\t);\n\t\t\tname = BitBltPlugin;\n\t\t\tpath = ../../intplugins/BitBltPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0ADE8A81135F38B200D37EAD /* BMPReadWriterPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0ADE8A82135F38B200D37EAD /* BMPReadWriterPlugin.c */,\n\t\t\t);\n\t\t\tname = BMPReadWriterPlugin;\n\t\t\tpath = ../../intplugins/BMPReadWriterPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0ADE8A83135F38B200D37EAD /* DSAPrims */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0ADE8A84135F38B200D37EAD /* DSAPrims.c */,\n\t\t\t);\n\t\t\tname = DSAPrims;\n\t\t\tpath = ../../intplugins/DSAPrims;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0ADE8A85135F38B200D37EAD /* FFTPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0ADE8A86135F38B200D37EAD /* FFTPlugin.c */,\n\t\t\t);\n\t\t\tname = FFTPlugin;\n\t\t\tpath = ../../intplugins/FFTPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0ADE8A87135F38B200D37EAD /* FilePlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0ADE8A88135F38B200D37EAD /* FilePlugin.c */,\n\t\t\t);\n\t\t\tname = FilePlugin;\n\t\t\tpath = ../../intplugins/FilePlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0ADE8A89135F38B200D37EAD /* FloatArrayPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0ADE8A8A135F38B200D37EAD /* FloatArrayPlugin.c */,\n\t\t\t);\n\t\t\tname = FloatArrayPlugin;\n\t\t\tpath = ../../intplugins/FloatArrayPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0ADE8A8B135F38B200D37EAD /* GeniePlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0ADE8A8C135F38B200D37EAD /* GeniePlugin.c */,\n\t\t\t);\n\t\t\tname = GeniePlugin;\n\t\t\tpath = ../../intplugins/GeniePlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0ADE8A8D135F38B200D37EAD /* HostWindowPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0ADE8A8E135F38B200D37EAD /* HostWindowPlugin.c */,\n\t\t\t);\n\t\t\tname = HostWindowPlugin;\n\t\t\tpath = ../../intplugins/HostWindowPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0ADE8A99135F38FE00D37EAD /* JPEGReaderPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0ADE8A9A135F38FE00D37EAD /* JPEGReaderPlugin.c */,\n\t\t\t);\n\t\t\tname = JPEGReaderPlugin;\n\t\t\tpath = ../../intplugins/JPEGReaderPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0ADE8A9B135F38FE00D37EAD /* JPEGReadWriter2Plugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0ADE8A9C135F38FE00D37EAD /* JPEGReadWriter2Plugin.c */,\n\t\t\t);\n\t\t\tname = JPEGReadWriter2Plugin;\n\t\t\tpath = ../../intplugins/JPEGReadWriter2Plugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0ADE8A9D135F38FE00D37EAD /* Klatt */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0ADE8A9E135F38FE00D37EAD /* Klatt.c */,\n\t\t\t);\n\t\t\tname = Klatt;\n\t\t\tpath = ../../intplugins/Klatt;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0ADE8A9F135F38FE00D37EAD /* LargeIntegers */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0ADE8AA0135F38FE00D37EAD /* LargeIntegers.c */,\n\t\t\t);\n\t\t\tname = LargeIntegers;\n\t\t\tpath = ../../intplugins/LargeIntegers;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0ADE8AA1135F38FE00D37EAD /* Matrix2x3Plugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0ADE8AA2135F38FE00D37EAD /* Matrix2x3Plugin.c */,\n\t\t\t);\n\t\t\tname = Matrix2x3Plugin;\n\t\t\tpath = ../../intplugins/Matrix2x3Plugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0ADE8AA3135F38FE00D37EAD /* MiscPrimitivePlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0ADE8AA4135F38FE00D37EAD /* MiscPrimitivePlugin.c */,\n\t\t\t);\n\t\t\tname = MiscPrimitivePlugin;\n\t\t\tpath = ../../intplugins/MiscPrimitivePlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0ADE8AA5135F38FE00D37EAD /* ObjectiveCPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0ADE8AA6135F38FE00D37EAD /* ObjectiveCPlugin.c */,\n\t\t\t);\n\t\t\tname = ObjectiveCPlugin;\n\t\t\tpath = ../../intplugins/ObjectiveCPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0ADE8AA7135F38FE00D37EAD /* RePlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0ADE8AA8135F38FE00D37EAD /* RePlugin.c */,\n\t\t\t);\n\t\t\tname = RePlugin;\n\t\t\tpath = ../../intplugins/RePlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0ADE8AA9135F38FE00D37EAD /* SecurityPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0ADE8AAA135F38FE00D37EAD /* SecurityPlugin.c */,\n\t\t\t);\n\t\t\tname = SecurityPlugin;\n\t\t\tpath = ../../intplugins/SecurityPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0ADE8AAB135F38FE00D37EAD /* SocketPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0ADE8AAC135F38FE00D37EAD /* SocketPlugin.c */,\n\t\t\t);\n\t\t\tname = SocketPlugin;\n\t\t\tpath = ../../intplugins/SocketPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0ADE8AAD135F38FE00D37EAD /* SoundCodecPrims */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0ADE8AAE135F38FE00D37EAD /* SoundCodecPrims.c */,\n\t\t\t);\n\t\t\tname = SoundCodecPrims;\n\t\t\tpath = ../../intplugins/SoundCodecPrims;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0ADE8AAF135F38FE00D37EAD /* SoundGenerationPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0ADE8AB0135F38FE00D37EAD /* SoundGenerationPlugin.c */,\n\t\t\t);\n\t\t\tname = SoundGenerationPlugin;\n\t\t\tpath = ../../intplugins/SoundGenerationPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0ADE8AB1135F38FE00D37EAD /* SoundPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0ADE8AB2135F38FE00D37EAD /* SoundPlugin.c */,\n\t\t\t);\n\t\t\tname = SoundPlugin;\n\t\t\tpath = ../../intplugins/SoundPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0ADE8AB3135F38FE00D37EAD /* Squeak3D */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0ADE8AB4135F38FE00D37EAD /* Squeak3D.c */,\n\t\t\t);\n\t\t\tname = Squeak3D;\n\t\t\tpath = ../../intplugins/Squeak3D;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0ADE8AC3135F392E00D37EAD /* SqueakFFIPrims */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0ADE8AC4135F392E00D37EAD /* SqueakFFIPrims.c */,\n\t\t\t);\n\t\t\tname = SqueakFFIPrims;\n\t\t\tpath = ../../intplugins/SqueakFFIPrims;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0ADE8AC5135F392E00D37EAD /* StarSqueakPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0ADE8AC6135F392E00D37EAD /* StarSqueakPlugin.c */,\n\t\t\t);\n\t\t\tname = StarSqueakPlugin;\n\t\t\tpath = ../../intplugins/StarSqueakPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0ADE8AC7135F392E00D37EAD /* UUIDPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0ADE8AC8135F392E00D37EAD /* UUIDPlugin.c */,\n\t\t\t);\n\t\t\tname = UUIDPlugin;\n\t\t\tpath = ../../intplugins/UUIDPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0ADE8AC9135F392E00D37EAD /* ZipPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0ADE8ACA135F392E00D37EAD /* ZipPlugin.c */,\n\t\t\t);\n\t\t\tname = ZipPlugin;\n\t\t\tpath = ../../intplugins/ZipPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t19C28FACFE9D520D11CA2CBB /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t1D6058910D05DD3D006BFB54 /* RoarVM.app */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A890E9913FDA46400067C04 /* Squeak72x72.png */,\n\t\t\t\t9412CAB20E6C037B00DB8625 /* Settings.bundle */,\n\t\t\t\t29B97315FDCFA39411CA2CEA /* Other Sources */,\n\t\t\t\t29B97317FDCFA39411CA2CEA /* Resources */,\n\t\t\t\t948EC38E1155311D00B08A4F /* Resources-iPad */,\n\t\t\t\t29B97323FDCFA39411CA2CEA /* Frameworks */,\n\t\t\t\t19C28FACFE9D520D11CA2CBB /* Products */,\n\t\t\t\tBCCC348D1349603100063417 /* Entitlements.plist */,\n\t\t\t\t94C36C9710B0CF290041953A /* Info-iPhone.plist */,\n\t\t\t\t947E5F9F10A9FFA000D3B69E /* SqueakPureObjc-Info.plist */,\n\t\t\t\t948774B110C64DD800E4AEC5 /* SqueakPureObjc-Info 64x64.plist */,\n\t\t\t);\n\t\t\tname = CustomTemplate;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t29B97315FDCFA39411CA2CEA /* Other Sources */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0AA32B28135EC55400B97FB8 /* from_squeak */,\n\t\t\t\t94E658DF0DDD03FE00358328 /* vm */,\n\t\t\t\t9424FF570DDCB17F009912BF /* platforms */,\n\t\t\t\t94E658DC0DDD03FE00358328 /* src */,\n\t\t\t\t947E5F9310A9FF4A00D3B69E /* SqueakPureObjc_Prefix.pch */,\n\t\t\t);\n\t\t\tname = \"Other Sources\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t29B97317FDCFA39411CA2CEA /* Resources */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tBC4F78761358D2870081FC27 /* SqueakV3-minimum-MVC.sources */,\n\t\t\t\t94B6E9DC10BC777A00333E9E /* Localizable.strings */,\n\t\t\t\t947E64DC10AA18FE00D3B69E /* MainMenu.xib */,\n\t\t\t\t0A4EFFD913317C0D004BC399 /* iPhone.changes */,\n\t\t\t\t0A4EFFDA13317C0D004BC399 /* iPhone.image */,\n\t\t\t\t0A4EFFDB13317C0D004BC399 /* SqueakV3-minimum-MVC.sources */,\n\t\t\t\t28AD733E0D9D9553002E5188 /* MainWindow.xib */,\n\t\t\t\t945550910DF2041100FB176B /* Default.png */,\n\t\t\t\t94F3A9690E6BFA7C00E0B12A /* Squeak.png */,\n\t\t\t\t9414421E10BC89440088F8AC /* Squeak.icns */,\n\t\t\t\t9414421F10BC89440088F8AC /* SqueakChanges.icns */,\n\t\t\t\t9414422010BC89440088F8AC /* SqueakGeneric.icns */,\n\t\t\t\t9414422110BC89440088F8AC /* SqueakImage.icns */,\n\t\t\t\t9414422210BC89440088F8AC /* SqueakPlugin.icns */,\n\t\t\t\t9414422310BC89440088F8AC /* SqueakProject.icns */,\n\t\t\t\t9414422410BC89440088F8AC /* SqueakScript.icns */,\n\t\t\t\t9414422510BC89440088F8AC /* SqueakSources.icns */,\n\t\t\t\t94D16CAF10BCF96B00A69A89 /* Credits.rtf */,\n\t\t\t);\n\t\t\tname = Resources;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t29B97323FDCFA39411CA2CEA /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t947E61C410AA03DC00D3B69E /* AppKit.framework */,\n\t\t\t\t947E61C210AA03C300D3B69E /* Cocoa.framework */,\n\t\t\t\t945550000DF1BC6A00FB176B /* AudioToolbox.framework */,\n\t\t\t\t1D3623EB0D0F72F000981E51 /* CoreGraphics.framework */,\n\t\t\t\t1DF5F4DF0D08C38300B7A737 /* UIKit.framework */,\n\t\t\t\t1D30AB110D05D00D00671497 /* Foundation.framework */,\n\t\t\t\t94577FBC10684D5E0020840A /* CoreAudio.framework */,\n\t\t\t\t94577FBE10684D5E0020840A /* CoreLocation.framework */,\n\t\t\t\t94577FC410684D7E0020840A /* SystemConfiguration.framework */,\n\t\t\t\t942ABE6E10AA23E20086D908 /* ApplicationServices.framework */,\n\t\t\t\t94C208F810AF7262002F4160 /* QuartzCore.framework */,\n\t\t\t\t94329ECA12275FFA0090298B /* OpenGL.framework */,\n\t\t\t\t940BE5F81239F70D00674A11 /* OpenGLES.framework */,\n\t\t\t);\n\t\t\tname = Frameworks;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t9424FF570DDCB17F009912BF /* platforms */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94BCE77E0DDDF61200F38F31 /* unix */,\n\t\t\t\t94BCE6880DDDECC200F38F31 /* Cross */,\n\t\t\t\t9424FF590DDCB198009912BF /* iOS */,\n\t\t\t);\n\t\t\tname = platforms;\n\t\t\tpath = ../..;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t9424FF590DDCB198009912BF /* iOS */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t947E642610AA0E1100D3B69E /* OSX */,\n\t\t\t\t9452D5EF0E044AC2000AD792 /* Common */,\n\t\t\t\t9424FF5B0DDCB1C7009912BF /* sqGnu.h */,\n\t\t\t\t9424FF5A0DDCB19F009912BF /* iPhone */,\n\t\t\t);\n\t\t\tpath = iOS;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t9424FF5A0DDCB19F009912BF /* iPhone */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94BCE6640DDDEB5000F38F31 /* plugins */,\n\t\t\t\t080E96DDFE201D6D7F000001 /* Classes */,\n\t\t\t\t9424FF650DDCB1EF009912BF /* config.h */,\n\t\t\t\t9424FF750DDCB271009912BF /* osExports.c */,\n\t\t\t\t9424FF660DDCB1EF009912BF /* sqConfig.h */,\n\t\t\t\t9400325C0DEF3936002FA1C4 /* sqDummyaio.c */,\n\t\t\t\t9400325B0DEF3936002FA1C4 /* sqDummyaio.h */,\n\t\t\t\t9424FF670DDCB202009912BF /* sqMacV2Memory.c */,\n\t\t\t\t9424FF680DDCB202009912BF /* sqMacV2Memory.h */,\n\t\t\t\t9424FF640DDCB1EF009912BF /* sqPlatformSpecific.h */,\n\t\t\t);\n\t\t\tname = iPhone;\n\t\t\tpath = vm/iPhone;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t943B9C9D1235C5120056205E /* HostWindowPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t943B9C9E1235C5120056205E /* sqMacHostWindow.m */,\n\t\t\t\t943B9C9F1235C5120056205E /* sqMacHostWindow.h */,\n\t\t\t);\n\t\t\tname = HostWindowPlugin;\n\t\t\tpath = vm/OSX/plugins/HostWindowPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t9452D5EF0E044AC2000AD792 /* Common */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t29B97316FDCFA39411CA2CEA /* main.m */,\n\t\t\t\t9452D5F00E044AD1000AD792 /* Classes */,\n\t\t\t);\n\t\t\tname = Common;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t9452D5F00E044AD1000AD792 /* Classes */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t9452D5D70E044A9D000AD792 /* Queue.h */,\n\t\t\t\t9452D5D80E044A9D000AD792 /* Queue.m */,\n\t\t\t\t9452D5D90E044A9D000AD792 /* sqMacV2Time.c */,\n\t\t\t\t9452D5DA0E044A9D000AD792 /* sqMacV2Time.h */,\n\t\t\t\t9471D2DF0E04743F00703D45 /* sqSqueakAppDelegate.h */,\n\t\t\t\t9471D2E00E04743F00703D45 /* sqSqueakAppDelegate.m */,\n\t\t\t\t9452D5DB0E044A9D000AD792 /* sqSqueakFileDirectoryAPI.h */,\n\t\t\t\t9452D5DC0E044A9D000AD792 /* sqSqueakFileDirectoryAPI.m */,\n\t\t\t\t9452D5DD0E044A9D000AD792 /* sqSqueakFileDirectoryInterface.h */,\n\t\t\t\t9452D5DE0E044A9D000AD792 /* sqSqueakFileDirectoryInterface.m */,\n\t\t\t\t9412CAE40E6C05EC00DB8625 /* sqSqueakInfoPlistInterface.h */,\n\t\t\t\t9412CAE50E6C05EC00DB8625 /* sqSqueakInfoPlistInterface.m */,\n\t\t\t\t9452D5DF0E044A9D000AD792 /* sqSqueakMainApp.m */,\n\t\t\t\t9452D5E00E044A9D000AD792 /* sqSqueakMainApp.h */,\n\t\t\t\t9452D5E30E044A9D000AD792 /* sqSqueakMainApplication.h */,\n\t\t\t\t9452D5E40E044A9D000AD792 /* sqSqueakMainApplication.m */,\n\t\t\t\t94A0E8440DE5EB6E0071C8B9 /* sqSqueakMainApplication+attributes.h */,\n\t\t\t\t942F76310E0B6C7600848BF2 /* sqSqueakMainApplication+attributes.m */,\n\t\t\t\t9452D6010E044CB3000AD792 /* sqSqueakAttributesAPI.h */,\n\t\t\t\t9452D6020E044CB3000AD792 /* sqSqueakAttributesAPI.m */,\n\t\t\t\t94A1B0050E0DBE2400EB5EFC /* sqSqueakMainApplication+events.h */,\n\t\t\t\t94A1B0060E0DBE2400EB5EFC /* sqSqueakMainApplication+events.m */,\n\t\t\t\t9452D6060E044D2F000AD792 /* sqSqueakEventsAPI.h */,\n\t\t\t\t9452D6070E044D2F000AD792 /* sqSqueakEventsAPI.m */,\n\t\t\t\t94A0E8830DE5EF430071C8B9 /* sqSqueakMainApplication+imageReadWrite.h */,\n\t\t\t\t94A0E8840DE5EF430071C8B9 /* sqSqueakMainApplication+imageReadWrite.m */,\n\t\t\t\t94A1B0300E0DC19300EB5EFC /* sqSqueakMainApplication+sound.h */,\n\t\t\t\t94A1B0310E0DC19300EB5EFC /* sqSqueakMainApplication+sound.m */,\n\t\t\t\t94A1B02B0E0DC10D00EB5EFC /* sqSqueakSoundAPI.h */,\n\t\t\t\t94A1B02C0E0DC10D00EB5EFC /* sqSqueakSoundAPI.m */,\n\t\t\t\t9452D5E10E044A9D000AD792 /* sqSqueakMainApplication+vmAndImagePath.h */,\n\t\t\t\t9452D5E20E044A9D000AD792 /* sqSqueakMainApplication+vmAndImagePath.m */,\n\t\t\t\t942F75D10E0B67AD00848BF2 /* sqSqueakVmAndImagePathAPI.h */,\n\t\t\t\t942F75D20E0B67AD00848BF2 /* sqSqueakVmAndImagePathAPI.m */,\n\t\t\t\t94A0E9820DE5F1FE0071C8B9 /* sqSqueakMainApplication+screen.h */,\n\t\t\t\t94A0E9830DE5F1FE0071C8B9 /* sqSqueakMainApplication+screen.m */,\n\t\t\t\t94A3488C0DDCCCC700D1D4A9 /* sqSqueakScreenAPI.h */,\n\t\t\t\t94A3488D0DDCCCC700D1D4A9 /* sqSqueakScreenAPI.m */,\n\t\t\t\t9471D2710E04703B00703D45 /* sqSqueakScreenAndWindow.h */,\n\t\t\t\t9471D2720E04703B00703D45 /* sqSqueakScreenAndWindow.m */,\n\t\t\t\t94C3687B10AFA8300041953A /* sqSqueakCursorAPI.h */,\n\t\t\t\t94C3687C10AFA8300041953A /* sqSqueakCursorAPI.m */,\n\t\t\t\t94C3688A10AFA9EF0041953A /* sqSqueakMainApplication+cursor.h */,\n\t\t\t\t94C3688B10AFA9EF0041953A /* sqSqueakMainApplication+cursor.m */,\n\t\t\t);\n\t\t\tname = Classes;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t947E642610AA0E1100D3B69E /* OSX */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94C4B82C10C06F0D00CD4F90 /* plugins */,\n\t\t\t\t947E647610AA0FF200D3B69E /* Classes */,\n\t\t\t);\n\t\t\tname = OSX;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t947E647610AA0FF200D3B69E /* Classes */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t947E647910AA100900D3B69E /* SqueakOSXAppDelegate.h */,\n\t\t\t\t947E647A10AA100900D3B69E /* SqueakOSXAppDelegate.m */,\n\t\t\t\t947E642710AA0E9E00D3B69E /* sqMacV2Browser.h */,\n\t\t\t\t947E642810AA0E9E00D3B69E /* sqMacV2Browser.m */,\n\t\t\t\t946DA9FF10C0D35500F26F56 /* sqMacUnixExternalPrims.m */,\n\t\t\t\t947E64CA10AA16FE00D3B69E /* sqSqueakOSXApplication.h */,\n\t\t\t\t947E64CB10AA16FE00D3B69E /* sqSqueakOSXApplication.m */,\n\t\t\t\t94BCABBF10AB72A600F87527 /* sqSqueakOSXFileDirectoryInterface.h */,\n\t\t\t\t94BCABC010AB72A600F87527 /* sqSqueakOSXFileDirectoryInterface.m */,\n\t\t\t\t94BCAD1B10AB942300F87527 /* sqSqueakOSXApplication+attributes.h */,\n\t\t\t\t94BCAD1C10AB942300F87527 /* sqSqueakOSXApplication+attributes.m */,\n\t\t\t\t94BCAE6710ACA10100F87527 /* sqSqueakOSXInfoPlistInterface.h */,\n\t\t\t\t94BCAE6810ACA10100F87527 /* sqSqueakOSXInfoPlistInterface.m */,\n\t\t\t\t94C887F910ADCEFC007CB39E /* sqSqueakOSXApplication+imageReadWrite.h */,\n\t\t\t\t94C887FA10ADCEFC007CB39E /* sqSqueakOSXApplication+imageReadWrite.m */,\n\t\t\t\t94C88BDD10AF3C52007CB39E /* sqSqueakOSXScreenAndWindow.h */,\n\t\t\t\t94C88BDE10AF3C52007CB39E /* sqSqueakOSXScreenAndWindow.m */,\n\t\t\t\t94C2068810AF4F53002F4160 /* sqSqueakOSXNSView.h */,\n\t\t\t\t94C2068910AF4F53002F4160 /* sqSqueakOSXNSView.m */,\n\t\t\t\t9402DD6F10CE0E91005C2102 /* SqViewClut.m */,\n\t\t\t\t94B8F54E10CF677800F0DD6B /* SqViewClut.h */,\n\t\t\t\t94D3654D10CEC86C00805023 /* BitMapConversionLogicFromX11.h */,\n\t\t\t\t94D3654E10CEC86C00805023 /* BitMapConversionLogicFromX11.c */,\n\t\t\t\t9402DD5E10CE0C16005C2102 /* SqViewBitmapConversion.h */,\n\t\t\t\t9402DD5F10CE0C16005C2102 /* SqViewBitmapConversion.m */,\n\t\t\t\t94C3687610AFA77F0041953A /* sqSqueakOSXApplication+cursor.h */,\n\t\t\t\t94C3687710AFA77F0041953A /* sqSqueakOSXApplication+cursor.m */,\n\t\t\t\t94C36A9210B09EE70041953A /* sqSqueakOSXApplication+events.h */,\n\t\t\t\t94C36A9310B09EE70041953A /* sqSqueakOSXApplication+events.m */,\n\t\t\t\t94A1B21A10B9DE0300C64473 /* keyBoardStrokeDetails.h */,\n\t\t\t\t94A1B21B10B9DE0300C64473 /* keyBoardStrokeDetails.m */,\n\t\t\t\t9492452F10BA43AA00E726F5 /* SqueakOSXApplication.h */,\n\t\t\t\t9492453010BA43AA00E726F5 /* SqueakOSXApplication.m */,\n\t\t\t\t9428BA9510BB440800DAD287 /* sqSqueakOSXClipboardAPI.h */,\n\t\t\t\t9428BA9610BB440800DAD287 /* sqSqueakOSXClipboardAPI.m */,\n\t\t\t\t9428BB0410BB478600DAD287 /* sqSqueakOSXApplication+clipboard.h */,\n\t\t\t\t9428BB0510BB478600DAD287 /* sqSqueakOSXApplication+clipboard.m */,\n\t\t\t\t946DA91310C0C71100F26F56 /* sqSqueakOSXDropAPI.h */,\n\t\t\t\t946DA91410C0C71100F26F56 /* sqSqueakOSXDropAPI.m */,\n\t\t\t);\n\t\t\tname = Classes;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94883B3F0E0C2B9C005A4738 /* SocketPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94883B400E0C2B9C005A4738 /* sqUnixSocket.c */,\n\t\t\t);\n\t\t\tpath = SocketPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t948EC38E1155311D00B08A4F /* Resources-iPad */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t948EC38F1155312600B08A4F /* MainWindow-iPad.xib */,\n\t\t\t);\n\t\t\tname = \"Resources-iPad\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94BCE6640DDDEB5000F38F31 /* plugins */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94BCE6650DDDEB5000F38F31 /* HostWindowPlugin */,\n\t\t\t);\n\t\t\tpath = plugins;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94BCE6650DDDEB5000F38F31 /* HostWindowPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94BCEA2B0DDE0C1600F38F31 /* sqMacHostWindow.c */,\n\t\t\t\t94BCE6660DDDEB5000F38F31 /* sqMacHostWindow.h */,\n\t\t\t);\n\t\t\tpath = HostWindowPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94BCE6880DDDECC200F38F31 /* Cross */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t);\n\t\t\tpath = Cross;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94BCE77E0DDDF61200F38F31 /* unix */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94883B2A0E0C2A5E005A4738 /* aio.c */,\n\t\t\t\t94BCE7A60DDDF8F800F38F31 /* sqaio.h */,\n\t\t\t\t94BCE77F0DDDF61200F38F31 /* plugins */,\n\t\t\t);\n\t\t\tpath = unix;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94BCE77F0DDDF61200F38F31 /* plugins */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94883B3F0E0C2B9C005A4738 /* SocketPlugin */,\n\t\t\t\t94BCE7840DDDF61200F38F31 /* UUIDPlugin */,\n\t\t\t);\n\t\t\tpath = plugins;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94BCE7840DDDF61200F38F31 /* UUIDPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94BCE7870DDDF61200F38F31 /* sqUnixUUID.c */,\n\t\t\t);\n\t\t\tpath = UUIDPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94C4B82C10C06F0D00CD4F90 /* plugins */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t943B9C9D1235C5120056205E /* HostWindowPlugin */,\n\t\t\t\t94C4B82D10C06F1800CD4F90 /* SoundPlugin */,\n\t\t\t);\n\t\t\tname = plugins;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94C4B82D10C06F1800CD4F90 /* SoundPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94C4B82E10C06F8800CD4F90 /* sqSqueakOSXSoundCoreAudio.h */,\n\t\t\t\t94C4B82F10C06F8800CD4F90 /* sqSqueakOSXSoundCoreAudio.m */,\n\t\t\t);\n\t\t\tname = SoundPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E658DC0DDD03FE00358328 /* src */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E658DE0DDD03FE00358328 /* plugins.int */,\n\t\t\t);\n\t\t\tpath = src;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E658DF0DDD03FE00358328 /* vm */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0A68E004153CB66B00C850D2 /* message_buffers */,\n\t\t\t\t0A5D7CAE135E37CB00D13E53 /* heap */,\n\t\t\t\t0A5D7CCA135E37CB00D13E53 /* image_readers */,\n\t\t\t\t0A5D7CCD135E37CB00D13E53 /* interpreter */,\n\t\t\t\t0A5D7CE0135E37CB00D13E53 /* messages */,\n\t\t\t\t0A5D7CF4135E37CB00D13E53 /* objects */,\n\t\t\t\t0A5D7D05135E37CB00D13E53 /* oops */,\n\t\t\t\t0A5D7D0B135E37CB00D13E53 /* platform */,\n\t\t\t\t0A5D7D2C135E37CB00D13E53 /* primitives */,\n\t\t\t\t0A5D7D2F135E37CB00D13E53 /* runtime */,\n\t\t\t\t0A5D7D68135E37CB00D13E53 /* types */,\n\t\t\t\t0A5D7CA9135E37A900D13E53 /* externals */,\n\t\t\t\t94E658E00DDD03FE00358328 /* interp.c */,\n\t\t\t\t94E658E10DDD03FE00358328 /* interp.h */,\n\t\t\t\t94E659200DDD03FE00358328 /* sqNamedPrims.h */,\n\t\t\t);\n\t\t\tname = vm;\n\t\t\tpath = src/vm;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\t1D6058900D05DD3D006BFB54 /* RoarVMIPad */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget \"RoarVMIPad\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t1D60588D0D05DD3D006BFB54 /* Resources */,\n\t\t\t\t1D60588E0D05DD3D006BFB54 /* Sources */,\n\t\t\t\t1D60588F0D05DD3D006BFB54 /* Frameworks */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = RoarVMIPad;\n\t\t\tproductName = SqueakNoOGLIPhone;\n\t\t\tproductReference = 1D6058910D05DD3D006BFB54 /* RoarVM.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t29B97313FDCFA39411CA2CEA /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastUpgradeCheck = 0420;\n\t\t\t};\n\t\t\tbuildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject \"RoarVMOnIPad\" */;\n\t\t\tcompatibilityVersion = \"Xcode 3.2\";\n\t\t\tdevelopmentRegion = English;\n\t\t\thasScannedForEncodings = 1;\n\t\t\tknownRegions = (\n\t\t\t\tEnglish,\n\t\t\t\tJapanese,\n\t\t\t\tFrench,\n\t\t\t\tGerman,\n\t\t\t);\n\t\t\tmainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t1D6058900D05DD3D006BFB54 /* RoarVMIPad */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t1D60588D0D05DD3D006BFB54 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t0A4EFFDE13317C0D004BC399 /* SqueakV3-minimum-MVC.sources in Resources */,\n\t\t\t\t28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */,\n\t\t\t\t9412CAB30E6C037B00DB8625 /* Settings.bundle in Resources */,\n\t\t\t\t9484F8E410B0E0ED0038BDC0 /* Squeak.png in Resources */,\n\t\t\t\t9484F8EF10B0E1580038BDC0 /* Default.png in Resources */,\n\t\t\t\t94B6E9DD10BC777A00333E9E /* Localizable.strings in Resources */,\n\t\t\t\t948EC3901155312600B08A4F /* MainWindow-iPad.xib in Resources */,\n\t\t\t\t0A4EFFDC13317C0D004BC399 /* iPhone.changes in Resources */,\n\t\t\t\t0A4EFFDD13317C0D004BC399 /* iPhone.image in Resources */,\n\t\t\t\tBCCC348E1349603100063417 /* Entitlements.plist in Resources */,\n\t\t\t\t0AA32BDC135EC5EE00B97FB8 /* ReadMe.txt in Resources */,\n\t\t\t\t0AA32BE0135EC5EE00B97FB8 /* RePlugin3-Fixes.1.cs in Resources */,\n\t\t\t\t0AA32BE1135EC5EE00B97FB8 /* RePlugin3-Fixes2.1.cs in Resources */,\n\t\t\t\t0AA32BE2135EC5EE00B97FB8 /* RePlugin3.3.1.cs in Resources */,\n\t\t\t\t0AA32BE4135EC5EE00B97FB8 /* SocketPrims.pdf in Resources */,\n\t\t\t\t0AA32C01135EC69F00B97FB8 /* Info.plist in Resources */,\n\t\t\t\t0AA32C03135EC69F00B97FB8 /* SqueakObjectiveC.xcodeproj.zip in Resources */,\n\t\t\t\t0A890E9A13FDA46400067C04 /* Squeak72x72.png in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t1D60588E0D05DD3D006BFB54 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t1D60589B0D05DD56006BFB54 /* main.m in Sources */,\n\t\t\t\t9424FF760DDCB271009912BF /* osExports.c in Sources */,\n\t\t\t\t94A3488E0DDCCCC700D1D4A9 /* sqSqueakScreenAPI.m in Sources */,\n\t\t\t\t94BCE78C0DDDF61200F38F31 /* sqUnixUUID.c in Sources */,\n\t\t\t\t94A0E8850DE5EF430071C8B9 /* sqSqueakMainApplication+imageReadWrite.m in Sources */,\n\t\t\t\t94A0E9840DE5F1FE0071C8B9 /* sqSqueakMainApplication+screen.m in Sources */,\n\t\t\t\t9452D5E50E044A9D000AD792 /* Queue.m in Sources */,\n\t\t\t\t9452D5E60E044A9D000AD792 /* sqMacV2Time.c in Sources */,\n\t\t\t\t9452D5E70E044A9D000AD792 /* sqSqueakFileDirectoryAPI.m in Sources */,\n\t\t\t\t9452D5E80E044A9D000AD792 /* sqSqueakFileDirectoryInterface.m in Sources */,\n\t\t\t\t9452D5E90E044A9D000AD792 /* sqSqueakMainApp.m in Sources */,\n\t\t\t\t9452D5EA0E044A9D000AD792 /* sqSqueakMainApplication+vmAndImagePath.m in Sources */,\n\t\t\t\t9452D5EB0E044A9D000AD792 /* sqSqueakMainApplication.m in Sources */,\n\t\t\t\t9452D6030E044CB3000AD792 /* sqSqueakAttributesAPI.m in Sources */,\n\t\t\t\t9452D6080E044D2F000AD792 /* sqSqueakEventsAPI.m in Sources */,\n\t\t\t\t9471D2730E04703B00703D45 /* sqSqueakScreenAndWindow.m in Sources */,\n\t\t\t\t9471D2E10E04743F00703D45 /* sqSqueakAppDelegate.m in Sources */,\n\t\t\t\t942F75D30E0B67AD00848BF2 /* sqSqueakVmAndImagePathAPI.m in Sources */,\n\t\t\t\t942F76320E0B6C7600848BF2 /* sqSqueakMainApplication+attributes.m in Sources */,\n\t\t\t\t94A1B0070E0DBE2400EB5EFC /* sqSqueakMainApplication+events.m in Sources */,\n\t\t\t\t94A1B02D0E0DC10D00EB5EFC /* sqSqueakSoundAPI.m in Sources */,\n\t\t\t\t94A1B0320E0DC19300EB5EFC /* sqSqueakMainApplication+sound.m in Sources */,\n\t\t\t\t9412CAE60E6C05EC00DB8625 /* sqSqueakInfoPlistInterface.m in Sources */,\n\t\t\t\t945C95FF0E97084C00529DC1 /* aio.c in Sources */,\n\t\t\t\t9484F8DB10B0E09B0038BDC0 /* sqiPhoneScreenAndWindow.m in Sources */,\n\t\t\t\t9484F8DC10B0E0C60038BDC0 /* sqSqueakIPhoneApplication+attributes.m in Sources */,\n\t\t\t\t9484F8DD10B0E0C70038BDC0 /* sqSqueakIPhoneApplication+events.m in Sources */,\n\t\t\t\t9484F8DE10B0E0C90038BDC0 /* sqSqueakIPhoneApplication+imageReadWrite.m in Sources */,\n\t\t\t\t9484F8DF10B0E0CB0038BDC0 /* sqSqueakIPhoneApplication+Network.m in Sources */,\n\t\t\t\t9484F8E010B0E0CE0038BDC0 /* sqSqueakiPhoneApplication+sound.m in Sources */,\n\t\t\t\t9484F8E110B0E0CE0038BDC0 /* sqSqueakIPhoneApplication.m in Sources */,\n\t\t\t\t9484F8E210B0E0D10038BDC0 /* sqSqueakIPhoneFileDirectoryInterface.m in Sources */,\n\t\t\t\t9484F8E310B0E0D30038BDC0 /* sqSqueakIPhoneInfoPlistInterface.m in Sources */,\n\t\t\t\t9484F8E510B0E0F00038BDC0 /* SqueakNoOGLIPhoneAppDelegate.m in Sources */,\n\t\t\t\t9484F8E610B0E0FD0038BDC0 /* SqueakUIController.m in Sources */,\n\t\t\t\t9484F8E710B0E0FE0038BDC0 /* SqueakUIView.m in Sources */,\n\t\t\t\t9484F9AF10B13DA50038BDC0 /* sqMacHostWindow.c in Sources */,\n\t\t\t\t9458525610F04339001401E7 /* sqSqueakIPhoneClipboardAPI.m in Sources */,\n\t\t\t\t9458525C10F043EB001401E7 /* sqSqueakIPhoneApplication+clipboard.m in Sources */,\n\t\t\t\t940BE57B1239F10000674A11 /* SqueakUIViewCALayer.m in Sources */,\n\t\t\t\t940BE5E91239F50100674A11 /* SqueakUIViewOpenGL.m in Sources */,\n\t\t\t\tBCAB989D134B0139004AB528 /* RoarVMAbstractEvent.m in Sources */,\n\t\t\t\tBC6CC8E9134B045100B9B2B0 /* RoarVMMouseEvent.m in Sources */,\n\t\t\t\tBC6CC8ED134B138300B9B2B0 /* RoarVMSwipeEvent.m in Sources */,\n\t\t\t\tBC82F912135697D000EC2309 /* UIGestureRecognizer+RoarVMEvents.m in Sources */,\n\t\t\t\tBC82F9151356A4C400EC2309 /* RoarVMMouseUpEvent.m in Sources */,\n\t\t\t\t0A5D7CAC135E37A900D13E53 /* externals.cpp in Sources */,\n\t\t\t\t0A5D7D6A135E37CB00D13E53 /* abstract_mark_sweep_collector.cpp in Sources */,\n\t\t\t\t0A5D7D6B135E37CB00D13E53 /* abstract_object_heap.cpp in Sources */,\n\t\t\t\t0A5D7D6C135E37CB00D13E53 /* memory_system.cpp in Sources */,\n\t\t\t\t0A5D7D6D135E37CB00D13E53 /* multicore_object_heap.cpp in Sources */,\n\t\t\t\t0A5D7D6E135E37CB00D13E53 /* multicore_object_table.cpp in Sources */,\n\t\t\t\t0A5D7D72135E37CB00D13E53 /* squeak_image_reader.cpp in Sources */,\n\t\t\t\t0A5D7D73135E37CB00D13E53 /* at_cache.cpp in Sources */,\n\t\t\t\t0A5D7D74135E37CB00D13E53 /* interpreter_bytecodes.cpp in Sources */,\n\t\t\t\t0A5D7D75135E37CB00D13E53 /* interpreter_primitives.cpp in Sources */,\n\t\t\t\t0A5D7D76135E37CB00D13E53 /* method_cache.cpp in Sources */,\n\t\t\t\t0A5D7D77135E37CB00D13E53 /* obsolete_indexed_primitive_table.cpp in Sources */,\n\t\t\t\t0A5D7D78135E37CB00D13E53 /* obsolete_named_primitive_table.cpp in Sources */,\n\t\t\t\t0A5D7D79135E37CB00D13E53 /* primitive_table.cpp in Sources */,\n\t\t\t\t0A5D7D7A135E37CB00D13E53 /* squeak_interpreter.cpp in Sources */,\n\t\t\t\t0A5D7D7B135E37CB00D13E53 /* abstract_message.cpp in Sources */,\n\t\t\t\t0A5D7D7C135E37CB00D13E53 /* deferred_request.cpp in Sources */,\n\t\t\t\t0A5D7D7D135E37CB00D13E53 /* interactions.cpp in Sources */,\n\t\t\t\t0A5D7D7E135E37CB00D13E53 /* interpreter_subset_for_control_transfer.cpp in Sources */,\n\t\t\t\t0A5D7D7F135E37CB00D13E53 /* message_classes.cpp in Sources */,\n\t\t\t\t0A5D7D80135E37CB00D13E53 /* message_or_ack_request.cpp in Sources */,\n\t\t\t\t0A5D7D81135E37CB00D13E53 /* message_statics.cpp in Sources */,\n\t\t\t\t0A5D7D82135E37CB00D13E53 /* message_stats.cpp in Sources */,\n\t\t\t\t0A5D7D83135E37CB00D13E53 /* receive_marker.cpp in Sources */,\n\t\t\t\t0A5D7D84135E37CB00D13E53 /* header_type.cpp in Sources */,\n\t\t\t\t0A5D7D85135E37CB00D13E53 /* object.cpp in Sources */,\n\t\t\t\t0A5D7D86135E37CB00D13E53 /* process_field_locator.cpp in Sources */,\n\t\t\t\t0A5D7D87135E37CB00D13E53 /* roots.cpp in Sources */,\n\t\t\t\t0A5D7D88135E37CB00D13E53 /* oop.cpp in Sources */,\n\t\t\t\t0A5D7D89135E37CB00D13E53 /* abstract_os_interface.cpp in Sources */,\n\t\t\t\t0A5D7D8A135E37CB00D13E53 /* dummy_cpu_coordinate.cpp in Sources */,\n\t\t\t\t0A5D7D8B135E37CB00D13E53 /* ilib_message_queue.cpp in Sources */,\n\t\t\t\t0A5D7D8C135E37CB00D13E53 /* ilib_os_interface.cpp in Sources */,\n\t\t\t\t0A5D7D8D135E37CB00D13E53 /* logical_core.cpp in Sources */,\n\t\t\t\t0A5D7D8E135E37CB00D13E53 /* osx_os_interface.cpp in Sources */,\n\t\t\t\t0A5D7D8F135E37CB00D13E53 /* posix_os_interface.cpp in Sources */,\n\t\t\t\t0A5D7D90135E37CB00D13E53 /* process_memory_semantics.cpp in Sources */,\n\t\t\t\t0A5D7D91135E37CB00D13E53 /* shared_memory_message_queue.cpp in Sources */,\n\t\t\t\t0A5D7D92135E37CB00D13E53 /* shared_memory_message_queue_per_sender.cpp in Sources */,\n\t\t\t\t0A5D7D93135E37CB00D13E53 /* thread_memory_semantics.cpp in Sources */,\n\t\t\t\t0A5D7D94135E37CB00D13E53 /* tile_cpu_coordinate.cpp in Sources */,\n\t\t\t\t0A5D7D95135E37CB00D13E53 /* RVMPlugin.cpp in Sources */,\n\t\t\t\t0A5D7D96135E37CB00D13E53 /* abstract_mutex.cpp in Sources */,\n\t\t\t\t0A5D7D97135E37CB00D13E53 /* abstract_tracer.cpp in Sources */,\n\t\t\t\t0A5D7D98135E37CB00D13E53 /* bytemap.cpp in Sources */,\n\t\t\t\t0A5D7D99135E37CB00D13E53 /* core_tracer.cpp in Sources */,\n\t\t\t\t0A5D7D9A135E37CB00D13E53 /* debug_helper.cpp in Sources */,\n\t\t\t\t0A5D7D9C135E37CB00D13E53 /* error_handling.cpp in Sources */,\n\t\t\t\t0A5D7D9D135E37CB00D13E53 /* execution_tracer.cpp in Sources */,\n\t\t\t\t0A5D7D9E135E37CB00D13E53 /* main.cpp in Sources */,\n\t\t\t\t0A5D7D9F135E37CB00D13E53 /* measurements.cpp in Sources */,\n\t\t\t\t0A5D7DA0135E37CB00D13E53 /* my_rank.cpp in Sources */,\n\t\t\t\t0A5D7DA1135E37CB00D13E53 /* oop_tracer.cpp in Sources */,\n\t\t\t\t0A5D7DA2135E37CB00D13E53 /* printer.cpp in Sources */,\n\t\t\t\t0A5D7DA3135E37CB00D13E53 /* profiling_tracer.cpp in Sources */,\n\t\t\t\t0A5D7DA4135E37CB00D13E53 /* rank_set.cpp in Sources */,\n\t\t\t\t0A5D7DA5135E37CB00D13E53 /* rvm_bitmap.cpp in Sources */,\n\t\t\t\t0A5D7DA6135E37CB00D13E53 /* rvm_config.cpp in Sources */,\n\t\t\t\t0A5D7DA7135E37CB00D13E53 /* safepoint.cpp in Sources */,\n\t\t\t\t0A5D7DA8135E37CB00D13E53 /* safepoint_ability.cpp in Sources */,\n\t\t\t\t0A5D7DA9135E37CB00D13E53 /* safepoint_request_queue.cpp in Sources */,\n\t\t\t\t0A5D7DAA135E37CB00D13E53 /* scheduler_mutex.cpp in Sources */,\n\t\t\t\t0A5D7DAB135E37CB00D13E53 /* semaphore_mutex.cpp in Sources */,\n\t\t\t\t0A5D7DAC135E37CB00D13E53 /* squeak_adapters.cpp in Sources */,\n\t\t\t\t0A5D7DAD135E37CB00D13E53 /* timeout_deferral.cpp in Sources */,\n\t\t\t\t0A5D7DAE135E37CB00D13E53 /* timeout_timer.cpp in Sources */,\n\t\t\t\t0A5D7DAF135E37CB00D13E53 /* utils.cpp in Sources */,\n\t\t\t\t0AA32BAA135EC5EE00B97FB8 /* sqFilePluginBasicPrims.c in Sources */,\n\t\t\t\t0AA32BAB135EC5EE00B97FB8 /* Error.c in Sources */,\n\t\t\t\t0AA32BAC135EC5EE00B97FB8 /* jcapimin.c in Sources */,\n\t\t\t\t0AA32BAD135EC5EE00B97FB8 /* jcapistd.c in Sources */,\n\t\t\t\t0AA32BAE135EC5EE00B97FB8 /* jccoefct.c in Sources */,\n\t\t\t\t0AA32BAF135EC5EE00B97FB8 /* jccolor.c in Sources */,\n\t\t\t\t0AA32BB0135EC5EE00B97FB8 /* jcdctmgr.c in Sources */,\n\t\t\t\t0AA32BB1135EC5EE00B97FB8 /* jchuff.c in Sources */,\n\t\t\t\t0AA32BB2135EC5EE00B97FB8 /* jcinit.c in Sources */,\n\t\t\t\t0AA32BB3135EC5EE00B97FB8 /* jcmainct.c in Sources */,\n\t\t\t\t0AA32BB4135EC5EE00B97FB8 /* jcmarker.c in Sources */,\n\t\t\t\t0AA32BB5135EC5EE00B97FB8 /* jcmaster.c in Sources */,\n\t\t\t\t0AA32BB6135EC5EE00B97FB8 /* jcomapi.c in Sources */,\n\t\t\t\t0AA32BB7135EC5EE00B97FB8 /* jcparam.c in Sources */,\n\t\t\t\t0AA32BB8135EC5EE00B97FB8 /* jcphuff.c in Sources */,\n\t\t\t\t0AA32BB9135EC5EE00B97FB8 /* jcprepct.c in Sources */,\n\t\t\t\t0AA32BBA135EC5EE00B97FB8 /* jcsample.c in Sources */,\n\t\t\t\t0AA32BBB135EC5EE00B97FB8 /* jctrans.c in Sources */,\n\t\t\t\t0AA32BBC135EC5EE00B97FB8 /* jdapimin.c in Sources */,\n\t\t\t\t0AA32BBD135EC5EE00B97FB8 /* jdapistd.c in Sources */,\n\t\t\t\t0AA32BBE135EC5EE00B97FB8 /* jdatadst.c in Sources */,\n\t\t\t\t0AA32BBF135EC5EE00B97FB8 /* jdatasrc.c in Sources */,\n\t\t\t\t0AA32BC0135EC5EE00B97FB8 /* jdcoefct.c in Sources */,\n\t\t\t\t0AA32BC1135EC5EE00B97FB8 /* jdcolor.c in Sources */,\n\t\t\t\t0AA32BC2135EC5EE00B97FB8 /* jddctmgr.c in Sources */,\n\t\t\t\t0AA32BC3135EC5EE00B97FB8 /* jdhuff.c in Sources */,\n\t\t\t\t0AA32BC4135EC5EE00B97FB8 /* jdinput.c in Sources */,\n\t\t\t\t0AA32BC5135EC5EE00B97FB8 /* jdmainct.c in Sources */,\n\t\t\t\t0AA32BC6135EC5EE00B97FB8 /* jdmarker.c in Sources */,\n\t\t\t\t0AA32BC7135EC5EE00B97FB8 /* jdmaster.c in Sources */,\n\t\t\t\t0AA32BC8135EC5EE00B97FB8 /* jdmerge.c in Sources */,\n\t\t\t\t0AA32BC9135EC5EE00B97FB8 /* jdphuff.c in Sources */,\n\t\t\t\t0AA32BCA135EC5EE00B97FB8 /* jdpostct.c in Sources */,\n\t\t\t\t0AA32BCB135EC5EE00B97FB8 /* jdsample.c in Sources */,\n\t\t\t\t0AA32BCC135EC5EE00B97FB8 /* jdtrans.c in Sources */,\n\t\t\t\t0AA32BCD135EC5EE00B97FB8 /* jerror.c in Sources */,\n\t\t\t\t0AA32BCE135EC5EE00B97FB8 /* jfdctflt.c in Sources */,\n\t\t\t\t0AA32BCF135EC5EE00B97FB8 /* jfdctfst.c in Sources */,\n\t\t\t\t0AA32BD0135EC5EE00B97FB8 /* jfdctint.c in Sources */,\n\t\t\t\t0AA32BD1135EC5EE00B97FB8 /* jidctflt.c in Sources */,\n\t\t\t\t0AA32BD2135EC5EE00B97FB8 /* jidctfst.c in Sources */,\n\t\t\t\t0AA32BD3135EC5EE00B97FB8 /* jidctint.c in Sources */,\n\t\t\t\t0AA32BD4135EC5EE00B97FB8 /* jidctred.c in Sources */,\n\t\t\t\t0AA32BD5135EC5EE00B97FB8 /* jmemdatadst.c in Sources */,\n\t\t\t\t0AA32BD6135EC5EE00B97FB8 /* jmemdatasrc.c in Sources */,\n\t\t\t\t0AA32BD7135EC5EE00B97FB8 /* jmemmgr.c in Sources */,\n\t\t\t\t0AA32BD8135EC5EE00B97FB8 /* jmemnobs.c in Sources */,\n\t\t\t\t0AA32BD9135EC5EE00B97FB8 /* jquant1.c in Sources */,\n\t\t\t\t0AA32BDA135EC5EE00B97FB8 /* jquant2.c in Sources */,\n\t\t\t\t0AA32BDB135EC5EE00B97FB8 /* jutils.c in Sources */,\n\t\t\t\t0AA32BDD135EC5EE00B97FB8 /* chartables.c in Sources */,\n\t\t\t\t0AA32BDE135EC5EE00B97FB8 /* get.c in Sources */,\n\t\t\t\t0AA32BDF135EC5EE00B97FB8 /* pcre.c in Sources */,\n\t\t\t\t0AA32BE3135EC5EE00B97FB8 /* study.c in Sources */,\n\t\t\t\t0AA32BE5135EC5EE00B97FB8 /* sqSoundCodecPluginBasicPrims.c in Sources */,\n\t\t\t\t0AA32BE6135EC5EE00B97FB8 /* b3dAlloc.c in Sources */,\n\t\t\t\t0AA32BE7135EC5EE00B97FB8 /* b3dDraw.c in Sources */,\n\t\t\t\t0AA32BE8135EC5EE00B97FB8 /* b3dInit.c in Sources */,\n\t\t\t\t0AA32BE9135EC5EE00B97FB8 /* b3dMain.c in Sources */,\n\t\t\t\t0AA32BEA135EC5EE00B97FB8 /* b3dRemap.c in Sources */,\n\t\t\t\t0AA32BEB135EC5EE00B97FB8 /* sqManualSurface.c in Sources */,\n\t\t\t\t0AA32BEC135EC5EE00B97FB8 /* SurfacePlugin.c in Sources */,\n\t\t\t\t0AA32BF2135EC61300B97FB8 /* sqNamedPrims.c in Sources */,\n\t\t\t\t0AA32BF3135EC61300B97FB8 /* sqVirtualMachine.c in Sources */,\n\t\t\t\t0AA32C00135EC69F00B97FB8 /* drawing.m in Sources */,\n\t\t\t\t0AA32C02135EC69F00B97FB8 /* PDColoredProgressView.m in Sources */,\n\t\t\t\t0AA32C04135EC69F00B97FB8 /* squeakProxy.m in Sources */,\n\t\t\t\t0AA32C05135EC69F00B97FB8 /* squeakSUnitTester.m in Sources */,\n\t\t\t\t0AA32C0B135EC6D900B97FB8 /* sqUnixAsynchFile.c in Sources */,\n\t\t\t\t0AA32C0F135EC6F400B97FB8 /* dummyFFI.c in Sources */,\n\t\t\t\t0AA32C17135EC70F00B97FB8 /* sqMacSecurity.c in Sources */,\n\t\t\t\t0AA32C18135EC70F00B97FB8 /* sqSqueakSoundCoreAudio.m in Sources */,\n\t\t\t\t0AA32C19135EC70F00B97FB8 /* sqSqueakSoundCoreAudioAPI.m in Sources */,\n\t\t\t\t0AA32C7B135ECFDD00B97FB8 /* sqUnixExternalPrims.c in Sources */,\n\t\t\t\t0ADE8A8F135F38B200D37EAD /* AsynchFilePlugin.c in Sources */,\n\t\t\t\t0ADE8A90135F38B200D37EAD /* B2DPlugin.c in Sources */,\n\t\t\t\t0ADE8A91135F38B200D37EAD /* BitBltPlugin.c in Sources */,\n\t\t\t\t0ADE8A92135F38B200D37EAD /* BMPReadWriterPlugin.c in Sources */,\n\t\t\t\t0ADE8A93135F38B200D37EAD /* DSAPrims.c in Sources */,\n\t\t\t\t0ADE8A94135F38B200D37EAD /* FFTPlugin.c in Sources */,\n\t\t\t\t0ADE8A95135F38B200D37EAD /* FilePlugin.c in Sources */,\n\t\t\t\t0ADE8A96135F38B200D37EAD /* FloatArrayPlugin.c in Sources */,\n\t\t\t\t0ADE8A97135F38B200D37EAD /* GeniePlugin.c in Sources */,\n\t\t\t\t0ADE8A98135F38B200D37EAD /* HostWindowPlugin.c in Sources */,\n\t\t\t\t0ADE8AB5135F38FE00D37EAD /* JPEGReaderPlugin.c in Sources */,\n\t\t\t\t0ADE8AB6135F38FE00D37EAD /* JPEGReadWriter2Plugin.c in Sources */,\n\t\t\t\t0ADE8AB7135F38FE00D37EAD /* Klatt.c in Sources */,\n\t\t\t\t0ADE8AB8135F38FE00D37EAD /* LargeIntegers.c in Sources */,\n\t\t\t\t0ADE8AB9135F38FE00D37EAD /* Matrix2x3Plugin.c in Sources */,\n\t\t\t\t0ADE8ABA135F38FE00D37EAD /* MiscPrimitivePlugin.c in Sources */,\n\t\t\t\t0ADE8ABB135F38FE00D37EAD /* ObjectiveCPlugin.c in Sources */,\n\t\t\t\t0ADE8ABC135F38FE00D37EAD /* RePlugin.c in Sources */,\n\t\t\t\t0ADE8ABD135F38FE00D37EAD /* SecurityPlugin.c in Sources */,\n\t\t\t\t0ADE8ABE135F38FE00D37EAD /* SocketPlugin.c in Sources */,\n\t\t\t\t0ADE8ABF135F38FE00D37EAD /* SoundCodecPrims.c in Sources */,\n\t\t\t\t0ADE8AC0135F38FE00D37EAD /* SoundGenerationPlugin.c in Sources */,\n\t\t\t\t0ADE8AC1135F38FE00D37EAD /* SoundPlugin.c in Sources */,\n\t\t\t\t0ADE8AC2135F38FE00D37EAD /* Squeak3D.c in Sources */,\n\t\t\t\t0ADE8ACC135F392E00D37EAD /* StarSqueakPlugin.c in Sources */,\n\t\t\t\t0ADE8ACD135F392E00D37EAD /* UUIDPlugin.c in Sources */,\n\t\t\t\t0ADE8ACE135F392E00D37EAD /* ZipPlugin.c in Sources */,\n\t\t\t\t0ADE8ACF135F399D00D37EAD /* sqUnixSocket.c in Sources */,\n\t\t\t\t0A040E2213B7526D007E172E /* performance_counters.cpp in Sources */,\n\t\t\t\t0ABEA92513C26C7A003108B9 /* gc_debugging_tracer.cpp in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin PBXVariantGroup section */\n\t\t947E64DC10AA18FE00D3B69E /* MainMenu.xib */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t947E64DD10AA18FE00D3B69E /* English */,\n\t\t\t);\n\t\t\tname = MainMenu.xib;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94B6E9DC10BC777A00333E9E /* Localizable.strings */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t94B6E9D910BC775E00333E9E /* English */,\n\t\t\t);\n\t\t\tname = Localizable.strings;\n\t\t\tpath = ..;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXVariantGroup section */\n\n/* Begin XCBuildConfiguration section */\n\t\t947E5F3610A9FD0400D3B69E /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tARCHS = \"$(ARCHS_UNIVERSAL_IPHONE_OS)\";\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer: Engineer Bainomugisha (882W55QM4Q)\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer: Engineer Bainomugisha (882W55QM4Q)\";\n\t\t\t\tCODE_SIGN_RESOURCE_RULES_PATH = \"$(SDKROOT)/ResourceRules.plist\";\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = c99;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = SQUEAK_BUILTIN_PLUGIN;\n\t\t\t\tGCC_VERSION = 4.2;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tHEADER_SEARCH_PATHS = /usr/include/uuid;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tPROVISIONING_PROFILE = \"9A3C6CEC-E313-4BB0-B855-DBFA91037171\";\n\t\t\t\t\"PROVISIONING_PROFILE[sdk=iphoneos*]\" = \"9A3C6CEC-E313-4BB0-B855-DBFA91037171\";\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t947E5F3710A9FD0400D3B69E /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCODE_SIGN_ENTITLEMENTS = \"\";\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer: David Ungar (X77TU3SX7E)\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer: David Ungar (X77TU3SX7E)\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PRECOMPILE_PREFIX_HEADER = YES;\n\t\t\t\tGCC_PREFIX_HEADER = ../../../runtime/rvm_config.h;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\tUSE_INLINE_MEMORY_ACCESSORS,\n\t\t\t\t\tHAVE_SYS_TIME_H,\n\t\t\t\t\tHAVE_NANOSLEEP,\n\t\t\t\t\tSQUEAK_BUILTIN_PLUGIN,\n\t\t\t\t\t\"ISQUEAK_IMAGE=\\\"iPhone\\\"\",\n\t\t\t\t\t\"ISQUEAK_SOURCES=\\\"SqueakV3-minimum-MVC\\\"\",\n\t\t\t\t\tTARGET_OS_IS_FOR_IPHONE,\n\t\t\t\t\t\"Extra_Preheader_Word_Experiment=1\",\n\t\t\t\t);\n\t\t\t\tGCC_THUMB_SUPPORT = NO;\n\t\t\t\tGCC_VERSION = com.apple.compilers.llvmgcc42;\n\t\t\t\tHEADER_SEARCH_PATHS = (\n\t\t\t\t\t/usr/include/uuid,\n\t\t\t\t\t../../../runtime,\n\t\t\t\t\t../../../from_squeak/iOS/vm/src/vm,\n\t\t\t\t\t../../../from_squeak/iOS/vm/iPhone,\n\t\t\t\t\t../../../from_squeak/Cross/vm/,\n\t\t\t\t);\n\t\t\t\tINFOPLIST_FILE = \"Info-iPhone.plist\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 4.3;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tOTHER_CFLAGS = (\n\t\t\t\t\t\"-DROAR_VM\",\n\t\t\t\t\t\"-DHAVE_DLOPEN=1\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_NAME = Squeak;\n\t\t\t\tPROVISIONING_PROFILE = \"91607298-9968-43DA-98FC-32C6D6712CD6\";\n\t\t\t\t\"PROVISIONING_PROFILE[sdk=iphoneos*]\" = \"91607298-9968-43DA-98FC-32C6D6712CD6\";\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tTARGETED_DEVICE_FAMILY = 2;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t9480CD150E5C7D9300C32178 /* Distribution */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tARCHS = \"$(ARCHS_UNIVERSAL_IPHONE_OS)\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Distribution: Corporate Smalltalk Consulting Ltd\";\n\t\t\t\tCODE_SIGN_RESOURCE_RULES_PATH = \"$(SDKROOT)/ResourceRules.plist\";\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = c99;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = SQUEAK_BUILTIN_PLUGIN;\n\t\t\t\tGCC_VERSION = 4.2;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tHEADER_SEARCH_PATHS = /usr/include/uuid;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\t\"PROVISIONING_PROFILE[sdk=iphoneos*]\" = \"4D1323CE-3998-4FF8-AB83-49838083E965\";\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t};\n\t\t\tname = Distribution;\n\t\t};\n\t\t9480CD160E5C7D9300C32178 /* Distribution */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tARCHS = \"$(ARCHS_UNIVERSAL_IPHONE_OS)\";\n\t\t\t\tCODE_SIGN_ENTITLEMENTS = Entitlements.plist;\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer: David Ungar (X77TU3SX7E)\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer: David Ungar (X77TU3SX7E)\";\n\t\t\t\tCOPY_PHASE_STRIP = YES;\n\t\t\t\tGCC_PRECOMPILE_PREFIX_HEADER = YES;\n\t\t\t\tGCC_PREFIX_HEADER = ../../../runtime/rvm_config.h;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\tUSE_INLINE_MEMORY_ACCESSORS,\n\t\t\t\t\tHAVE_SYS_TIME_H,\n\t\t\t\t\tHAVE_NANOSLEEP,\n\t\t\t\t\tSQUEAK_BUILTIN_PLUGIN,\n\t\t\t\t\t\"ISQUEAK_IMAGE=\\\"iPhone\\\"\",\n\t\t\t\t\t\"ISQUEAK_SOURCES=\\\"SqueakV3-minimum-MVC\\\"\",\n\t\t\t\t\tTARGET_OS_IS_FOR_IPHONE,\n\t\t\t\t\t\"Extra_Preheader_Word_Experiment=1\",\n\t\t\t\t);\n\t\t\t\tGCC_THUMB_SUPPORT = NO;\n\t\t\t\tGCC_VERSION = com.apple.compilers.llvmgcc42;\n\t\t\t\tHEADER_SEARCH_PATHS = (\n\t\t\t\t\t/usr/include/uuid,\n\t\t\t\t\t../../../runtime,\n\t\t\t\t\t../../../from_squeak/iOS/vm/src/vm,\n\t\t\t\t\t../../../from_squeak/iOS/vm/iPhone,\n\t\t\t\t\t../../../from_squeak/Cross/vm/,\n\t\t\t\t);\n\t\t\t\tINFOPLIST_FILE = \"Info-iPhone.plist\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 4.3;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tOTHER_CFLAGS = (\n\t\t\t\t\t\"-fno-cse-follow-jumps\",\n\t\t\t\t\t\"-finline-functions\",\n\t\t\t\t\t\"-O3\",\n\t\t\t\t\t\"-fno-gcse\",\n\t\t\t\t\t\"-fomit-frame-pointer\",\n\t\t\t\t\t\"-DHAVE_DLOPEN=1\",\n\t\t\t\t\t\"-DROAR_VM\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_NAME = Squeak;\n\t\t\t\tPROVISIONING_PROFILE = \"91607298-9968-43DA-98FC-32C6D6712CD6\";\n\t\t\t\t\"PROVISIONING_PROFILE[sdk=iphoneos*]\" = \"91607298-9968-43DA-98FC-32C6D6712CD6\";\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tTARGETED_DEVICE_FAMILY = 2;\n\t\t\t};\n\t\t\tname = Distribution;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget \"RoarVMIPad\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t947E5F3710A9FD0400D3B69E /* Debug */,\n\t\t\t\t9480CD160E5C7D9300C32178 /* Distribution */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Debug;\n\t\t};\n\t\tC01FCF4E08A954540054247B /* Build configuration list for PBXProject \"RoarVMOnIPad\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t947E5F3610A9FD0400D3B69E /* Debug */,\n\t\t\t\t9480CD150E5C7D9300C32178 /* Distribution */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Debug;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 29B97313FDCFA39411CA2CEA /* Project object */;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/RoarVMSwipeEvent.h",
    "content": "//\n//  RoarVMSwipeEvent.h\n//  RoarVMOnIPad\n//\n\n#import <Foundation/Foundation.h>\n#import \"RoarVMMouseEvent.h\"\n\n\n@interface RoarVMSwipeEvent : RoarVMAbstractEvent {\n  UISwipeGestureRecognizerDirection direction;\n}\n\n\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/RoarVMSwipeEvent.m",
    "content": "//\n//  RoarVMSwipeEvent.m\n//  RoarVMOnIPad\n//\n\n#import \"RoarVMSwipeEvent.h\"\n#import \"sq.h\"\n\n\n@implementation RoarVMSwipeEvent\n\n-(void) initFrom: (UISwipeGestureRecognizer*) recognizer view: (UIView*) view where: (RoarVMEventLocationType) where {\n  [super initFrom: recognizer view: view where: where];\n  direction = recognizer.direction;\n}\n\n- (void) processInto: (sqInputEvent*)evt {\n  [super processInto: evt];\n  // placeholder\n}\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/Settings.bundle/Root.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>Title</key>\n\t<string>RoarVM</string>\n\t<key>StringsTable</key>\n\t<string>Root</string>\n\t<key>PreferenceSpecifiers</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>Type</key>\n\t\t\t<string>PSGroupSpecifier</string>\n\t\t\t<key>Title</key>\n\t\t\t<string>Startup</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Type</key>\n\t\t\t<string>PSToggleSwitchSpecifier</string>\n\t\t\t<key>Title</key>\n\t\t\t<string>Make Image writeable</string>\n\t\t\t<key>Key</key>\n\t\t\t<string>writeable_preference</string>\n\t\t\t<key>DefaultValue</key>\n\t\t\t<string>YES</string>\n\t\t\t<key>TrueValue</key>\n\t\t\t<string>YES</string>\n\t\t\t<key>FalseValue</key>\n\t\t\t<string>NO</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Type</key>\n\t\t\t<string>PSToggleSwitchSpecifier</string>\n\t\t\t<key>Title</key>\n\t\t\t<string>Use Scrolling View</string>\n\t\t\t<key>Key</key>\n\t\t\t<string>scrollableView_preference</string>\n\t\t\t<key>DefaultValue</key>\n\t\t\t<string>NO</string>\n\t\t\t<key>TrueValue</key>\n\t\t\t<string>YES</string>\n\t\t\t<key>FalseValue</key>\n\t\t\t<string>NO</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Type</key>\n\t\t\t<string>PSGroupSpecifier</string>\n\t\t\t<key>Title</key>\n\t\t\t<string>Memory 20 MB to 132 MB (limited)</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Type</key>\n\t\t\t<string>PSSliderSpecifier</string>\n\t\t\t<key>Title</key>\n\t\t\t<string>Memory Size</string>\n\t\t\t<key>Key</key>\n\t\t\t<string>memorySize_preference</string>\n\t\t\t<key>DefaultValue</key>\n\t\t\t<integer>33554432</integer>\n\t\t\t<key>MinimumValue</key>\n\t\t\t<integer>20971520</integer>\n\t\t\t<key>MaximumValue</key>\n\t\t\t<integer>138412032</integer>\n\t\t</dict>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/SqueakNoOGLIPhone_Prefix.pch",
    "content": "//\n// Prefix header for all source files of the 'SqueakNoOGLIPhone' target in the 'SqueakNoOGLIPhone' project\n//\n\n#ifdef __OBJC__\n#import <Foundation/Foundation.h>\n#import <UIKit/UIKit.h>\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/SqueakPureObjc-Info 64x64.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleDocumentTypes</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>image</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeIconFile</key>\n\t\t\t<string>SqueakImage.icns</string>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Squeak Image File</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>STim</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>sources</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeIconFile</key>\n\t\t\t<string>SqueakSources.icns</string>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Squeak Sources File</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>STso</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>changes</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeIconFile</key>\n\t\t\t<string>SqueakChanges.icns</string>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Squeak Changes File</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>STch</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>sobj</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeIconFile</key>\n\t\t\t<string>SqueakScript.icns</string>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Squeak Script File</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>SOBJ</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>pr</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeIconFile</key>\n\t\t\t<string>SqueakProject.icns</string>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Squeak Project File</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>STpr</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>JPEG</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>JPEG</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>TEXT</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>TEXT</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>ttro</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>ttro</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>HTML</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>HTML</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>RTF </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>RTF</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>TIFF </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>TIFF</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>PICT </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>PICT</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>URL  </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>URL</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>ZIP </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>ZIP</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>zip </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>zip</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>BINA</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>BINA</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>GIFf</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>GIFf</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>PNGf</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>PNGf</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MP3 </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MP3</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MP3!</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MP3!</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MP3U</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MP3U</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MPEG</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MPEG</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>mp3!</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>mp3!</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MPG2</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MPG2</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MPG3</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MPG3</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MPG </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MPG</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Mp3</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>mp3</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>M3U</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>M3U</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>SRCS</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>SRCS</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Chng</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>Chng</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>HPS5</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>HPS5</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t</array>\n\t<key>UTExportedTypeDeclarations</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>UTTypeConformsTo</key>\n\t\t\t<array>\n\t\t\t\t<string>public.data</string>\n\t\t\t</array>\n\t\t\t<key>UTTypeDescription</key>\n\t\t\t<string>Squeak Image File</string>\n\t\t\t<key>UTTypeIdentifier</key>\n\t\t\t<string>org.squeak.image</string>\n\t\t\t<key>UTTypeTagSpecification</key>\n\t\t\t<dict>\n\t\t\t\t<key>com.apple.ostype</key>\n\t\t\t\t<string>STim</string>\n\t\t\t\t<key>public.filename-extension</key>\n\t\t\t\t<array>\n\t\t\t\t\t<string>image</string>\n\t\t\t\t</array>\n\t\t\t\t<key>public.mime-type</key>\n\t\t\t\t<string>application/squeak-image</string>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>UTTypeConformsTo</key>\n\t\t\t<array>\n\t\t\t\t<string>public.utf8-plain-text</string>\n\t\t\t</array>\n\t\t\t<key>UTTypeDescription</key>\n\t\t\t<string>Squeak Sources File</string>\n\t\t\t<key>UTTypeIdentifier</key>\n\t\t\t<string>org.squeak.sources</string>\n\t\t\t<key>UTTypeTagSpecification</key>\n\t\t\t<dict>\n\t\t\t\t<key>com.apple.ostype</key>\n\t\t\t\t<string>STso</string>\n\t\t\t\t<key>public.filename-extension</key>\n\t\t\t\t<array>\n\t\t\t\t\t<string>sources</string>\n\t\t\t\t</array>\n\t\t\t\t<key>public.mime-type</key>\n\t\t\t\t<string>application/squeak-sources</string>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>UTTypeConformsTo</key>\n\t\t\t<array>\n\t\t\t\t<string>public.utf8-plain-text</string>\n\t\t\t</array>\n\t\t\t<key>UTTypeDescription</key>\n\t\t\t<string>Squeak Changes File</string>\n\t\t\t<key>UTTypeIdentifier</key>\n\t\t\t<string>org.squeak.changes</string>\n\t\t\t<key>UTTypeTagSpecification</key>\n\t\t\t<dict>\n\t\t\t\t<key>com.apple.ostype</key>\n\t\t\t\t<string>STch</string>\n\t\t\t\t<key>public.filename-extension</key>\n\t\t\t\t<array>\n\t\t\t\t\t<string>changes</string>\n\t\t\t\t</array>\n\t\t\t\t<key>public.mime-type</key>\n\t\t\t\t<string>application/squeak-changes</string>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>UTTypeConformsTo</key>\n\t\t\t<array>\n\t\t\t\t<string>public.data</string>\n\t\t\t</array>\n\t\t\t<key>UTTypeDescription</key>\n\t\t\t<string>Squeak Script File</string>\n\t\t\t<key>UTTypeIdentifier</key>\n\t\t\t<string>org.squeak.script</string>\n\t\t\t<key>UTTypeTagSpecification</key>\n\t\t\t<dict>\n\t\t\t\t<key>com.apple.ostype</key>\n\t\t\t\t<string>SOBJ</string>\n\t\t\t\t<key>public.filename-extension</key>\n\t\t\t\t<array>\n\t\t\t\t\t<string>sobj</string>\n\t\t\t\t</array>\n\t\t\t\t<key>public.mime-type</key>\n\t\t\t\t<string>application/squeak-script</string>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>UTTypeConformsTo</key>\n\t\t\t<array>\n\t\t\t\t<string>public.data</string>\n\t\t\t</array>\n\t\t\t<key>UTTypeDescription</key>\n\t\t\t<string>Squeak Project File</string>\n\t\t\t<key>UTTypeIdentifier</key>\n\t\t\t<string>org.squeak.project</string>\n\t\t\t<key>UTTypeTagSpecification</key>\n\t\t\t<dict>\n\t\t\t\t<key>com.apple.ostype</key>\n\t\t\t\t<string>STpr</string>\n\t\t\t\t<key>public.filename-extension</key>\n\t\t\t\t<array>\n\t\t\t\t\t<string>pr</string>\n\t\t\t\t</array>\n\t\t\t\t<key>public.mime-type</key>\n\t\t\t\t<string>application/x-squeak-project</string>\n\t\t\t</dict>\n\t\t</dict>\n\t</array>\n\t<key>CFBundleExecutable</key>\n\t<string>${EXECUTABLE_NAME}</string>\n\t<key>CFBundleName</key>\n\t<string>Squeak VM Host 64/64bits</string>\n\t<key>CFBundleGetInfoString</key>\n\t<string>Squeak VM 5.7b3 64/64 bits http://www.squeak.org</string>\n\t<key>CFBundleIconFile</key>\n\t<string>Squeak.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.${PRODUCT_NAME:rfc1034identifier}</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>5.7b3</string>\n\t<key>CFBundleSignature</key>\n\t<string>FAST</string>\n\t<key>CFBundleVersion</key>\n\t<string>21.0</string>\n\t<key>LSBackgroundOnly</key>\n\t<false/>\n\t<key>LSMinimumSystemVersion</key>\n\t<string>${MACOSX_DEPLOYMENT_TARGET}</string>\n\t<key>NSMainNibFile</key>\n\t<string>MainMenu</string>\n\t<key>NSPrincipalClass</key>\n\t<string>SqueakOSXApplication</string>\n\t<key>SqueakBrowserMouseCmdButton1</key>\n\t<integer>3</integer>\n\t<key>SqueakBrowserMouseCmdButton2</key>\n\t<integer>3</integer>\n\t<key>SqueakBrowserMouseCmdButton3</key>\n\t<integer>2</integer>\n\t<key>SqueakBrowserMouseControlButton1</key>\n\t<integer>1</integer>\n\t<key>SqueakBrowserMouseControlButton2</key>\n\t<integer>3</integer>\n\t<key>SqueakBrowserMouseControlButton3</key>\n\t<integer>2</integer>\n\t<key>SqueakBrowserMouseNoneButton1</key>\n\t<integer>1</integer>\n\t<key>SqueakBrowserMouseNoneButton2</key>\n\t<integer>3</integer>\n\t<key>SqueakBrowserMouseNoneButton3</key>\n\t<integer>2</integer>\n\t<key>SqueakBrowserMouseOptionButton1</key>\n\t<integer>2</integer>\n\t<key>SqueakBrowserMouseOptionButton2</key>\n\t<integer>3</integer>\n\t<key>SqueakBrowserMouseOptionButton3</key>\n\t<integer>2</integer>\n\t<key>SqueakDebug</key>\n\t<integer>0</integer>\n\t<key>SqueakExplicitWindowOpenNeeded</key>\n\t<false/>\n\t<key>SqueakImageName</key>\n\t<string>Squeak.image</string>\n\t<key>SqueakMaxHeapSize</key>\n\t<integer>536870912</integer>\n\t<key>SqueakMouseCmdButton1</key>\n\t<integer>3</integer>\n\t<key>SqueakMouseCmdButton2</key>\n\t<integer>3</integer>\n\t<key>SqueakMouseCmdButton3</key>\n\t<integer>2</integer>\n\t<key>SqueakMouseControlButton1</key>\n\t<integer>1</integer>\n\t<key>SqueakMouseControlButton2</key>\n\t<integer>3</integer>\n\t<key>SqueakMouseControlButton3</key>\n\t<integer>2</integer>\n\t<key>SqueakMouseNoneButton1</key>\n\t<integer>1</integer>\n\t<key>SqueakMouseNoneButton2</key>\n\t<integer>3</integer>\n\t<key>SqueakMouseNoneButton3</key>\n\t<integer>2</integer>\n\t<key>SqueakMouseOptionButton1</key>\n\t<integer>2</integer>\n\t<key>SqueakMouseOptionButton2</key>\n\t<integer>3</integer>\n\t<key>SqueakMouseOptionButton3</key>\n\t<integer>2</integer>\n\t<key>SqueakPluginsBuiltInOrLocalOnly</key>\n\t<true/>\n\t<key>SqueakQuitOnQuitAppleEvent</key>\n\t<false/>\n\t<key>SqueakResourceDirectory</key>\n\t<string></string>\n\t<key>SqueakTrustedDirectory</key>\n\t<string>/foobar/tooBar/forSqueak/bogus/</string>\n\t<key>SqueakUIFlushPrimaryDeferNMilliseconds</key>\n\t<integer>20</integer>\n\t<key>SqueakUnTrustedDirectory</key>\n\t<string>~/Library/Preferences/Squeak/Internet/My Squeak/</string>\n\t<key>SqueakUseFileMappedMMAP</key>\n\t<false/>\n\t<key>SqueakUIFadeForFullScreenInSeconds</key>\n\t<real>1.5</real>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/SqueakPureObjc-Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleDocumentTypes</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>image</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeIconFile</key>\n\t\t\t<string>SqueakImage.icns</string>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Squeak Image File</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>STim</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>sources</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeIconFile</key>\n\t\t\t<string>SqueakSources.icns</string>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Squeak Sources File</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>STso</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>changes</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeIconFile</key>\n\t\t\t<string>SqueakChanges.icns</string>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Squeak Changes File</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>STch</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>sobj</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeIconFile</key>\n\t\t\t<string>SqueakScript.icns</string>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Squeak Script File</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>SOBJ</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>pr</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeIconFile</key>\n\t\t\t<string>SqueakProject.icns</string>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Squeak Project File</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>STpr</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>JPEG</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>JPEG</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>TEXT</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>TEXT</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>ttro</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>ttro</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>HTML</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>HTML</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>RTF </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>RTF</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>TIFF </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>TIFF</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>PICT </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>PICT</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>URL  </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>URL</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>ZIP </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>ZIP</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>zip </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>zip</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>BINA</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>BINA</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>GIFf</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>GIFf</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>PNGf</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>PNGf</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MP3 </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MP3</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MP3!</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MP3!</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MP3U</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MP3U</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MPEG</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MPEG</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>mp3!</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>mp3!</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MPG2</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MPG2</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MPG3</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MPG3</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MPG </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MPG</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Mp3</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>mp3</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>M3U</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>M3U</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>SRCS</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>SRCS</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Chng</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>Chng</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>HPS5</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>HPS5</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t</array>\n\t<key>CFBundleExecutable</key>\n\t<string>${EXECUTABLE_NAME}</string>\n\t<key>CFBundleGetInfoString</key>\n\t<string>Squeak VM 5.7b3 http://www.squeak.org</string>\n\t<key>CFBundleIconFile</key>\n\t<string>Squeak.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.${PRODUCT_NAME:rfc1034identifier}</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>Squeak VM Host 64/32bits</string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>5.7b3</string>\n\t<key>CFBundleSignature</key>\n\t<string>FAST</string>\n\t<key>CFBundleVersion</key>\n\t<string>21.0</string>\n\t<key>LSBackgroundOnly</key>\n\t<false/>\n\t<key>LSMinimumSystemVersion</key>\n\t<string>${MACOSX_DEPLOYMENT_TARGET}</string>\n\t<key>NSMainNibFile</key>\n\t<string>MainMenu</string>\n\t<key>NSPrincipalClass</key>\n\t<string>SqueakOSXApplication</string>\n\t<key>SqueakBrowserMouseCmdButton1</key>\n\t<integer>3</integer>\n\t<key>SqueakBrowserMouseCmdButton2</key>\n\t<integer>3</integer>\n\t<key>SqueakBrowserMouseCmdButton3</key>\n\t<integer>2</integer>\n\t<key>SqueakBrowserMouseControlButton1</key>\n\t<integer>1</integer>\n\t<key>SqueakBrowserMouseControlButton2</key>\n\t<integer>3</integer>\n\t<key>SqueakBrowserMouseControlButton3</key>\n\t<integer>2</integer>\n\t<key>SqueakBrowserMouseNoneButton1</key>\n\t<integer>1</integer>\n\t<key>SqueakBrowserMouseNoneButton2</key>\n\t<integer>3</integer>\n\t<key>SqueakBrowserMouseNoneButton3</key>\n\t<integer>2</integer>\n\t<key>SqueakBrowserMouseOptionButton1</key>\n\t<integer>2</integer>\n\t<key>SqueakBrowserMouseOptionButton2</key>\n\t<integer>3</integer>\n\t<key>SqueakBrowserMouseOptionButton3</key>\n\t<integer>2</integer>\n\t<key>SqueakDebug</key>\n\t<integer>0</integer>\n\t<key>SqueakExplicitWindowOpenNeeded</key>\n\t<false/>\n\t<key>SqueakImageName</key>\n\t<string>rvm-base.image</string>\n\t<key>SqueakMaxHeapSize</key>\n\t<integer>536870912</integer>\n\t<key>SqueakMouseCmdButton1</key>\n\t<integer>3</integer>\n\t<key>SqueakMouseCmdButton2</key>\n\t<integer>3</integer>\n\t<key>SqueakMouseCmdButton3</key>\n\t<integer>2</integer>\n\t<key>SqueakMouseControlButton1</key>\n\t<integer>1</integer>\n\t<key>SqueakMouseControlButton2</key>\n\t<integer>3</integer>\n\t<key>SqueakMouseControlButton3</key>\n\t<integer>2</integer>\n\t<key>SqueakMouseNoneButton1</key>\n\t<integer>1</integer>\n\t<key>SqueakMouseNoneButton2</key>\n\t<integer>3</integer>\n\t<key>SqueakMouseNoneButton3</key>\n\t<integer>2</integer>\n\t<key>SqueakMouseOptionButton1</key>\n\t<integer>2</integer>\n\t<key>SqueakMouseOptionButton2</key>\n\t<integer>3</integer>\n\t<key>SqueakMouseOptionButton3</key>\n\t<integer>2</integer>\n\t<key>SqueakPluginsBuiltInOrLocalOnly</key>\n\t<false/>\n\t<key>SqueakQuitOnQuitAppleEvent</key>\n\t<false/>\n\t<key>SqueakResourceDirectory</key>\n\t<string></string>\n\t<key>SqueakTrustedDirectory</key>\n\t<string>/foobar/tooBar/forSqueak/bogus/</string>\n\t<key>SqueakUIFadeForFullScreenInSeconds</key>\n\t<real>0.5</real>\n\t<key>SqueakUIFlushPrimaryDeferNMilliseconds</key>\n\t<integer>20</integer>\n\t<key>SqueakUnTrustedDirectory</key>\n\t<string>~/Library/Preferences/Squeak/Internet/My Squeak/</string>\n\t<key>SqueakUseFileMappedMMAP</key>\n\t<false/>\n\t<key>UTExportedTypeDeclarations</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>UTTypeConformsTo</key>\n\t\t\t<array>\n\t\t\t\t<string>public.data</string>\n\t\t\t</array>\n\t\t\t<key>UTTypeDescription</key>\n\t\t\t<string>Squeak Image File</string>\n\t\t\t<key>UTTypeIdentifier</key>\n\t\t\t<string>org.squeak.image</string>\n\t\t\t<key>UTTypeTagSpecification</key>\n\t\t\t<dict>\n\t\t\t\t<key>com.apple.ostype</key>\n\t\t\t\t<string>STim</string>\n\t\t\t\t<key>public.filename-extension</key>\n\t\t\t\t<array>\n\t\t\t\t\t<string>image</string>\n\t\t\t\t</array>\n\t\t\t\t<key>public.mime-type</key>\n\t\t\t\t<string>application/squeak-image</string>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>UTTypeConformsTo</key>\n\t\t\t<array>\n\t\t\t\t<string>public.utf8-plain-text</string>\n\t\t\t</array>\n\t\t\t<key>UTTypeDescription</key>\n\t\t\t<string>Squeak Sources File</string>\n\t\t\t<key>UTTypeIdentifier</key>\n\t\t\t<string>org.squeak.sources</string>\n\t\t\t<key>UTTypeTagSpecification</key>\n\t\t\t<dict>\n\t\t\t\t<key>com.apple.ostype</key>\n\t\t\t\t<string>STso</string>\n\t\t\t\t<key>public.filename-extension</key>\n\t\t\t\t<array>\n\t\t\t\t\t<string>sources</string>\n\t\t\t\t</array>\n\t\t\t\t<key>public.mime-type</key>\n\t\t\t\t<string>application/squeak-sources</string>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>UTTypeConformsTo</key>\n\t\t\t<array>\n\t\t\t\t<string>public.utf8-plain-text</string>\n\t\t\t</array>\n\t\t\t<key>UTTypeDescription</key>\n\t\t\t<string>Squeak Changes File</string>\n\t\t\t<key>UTTypeIdentifier</key>\n\t\t\t<string>org.squeak.changes</string>\n\t\t\t<key>UTTypeTagSpecification</key>\n\t\t\t<dict>\n\t\t\t\t<key>com.apple.ostype</key>\n\t\t\t\t<string>STch</string>\n\t\t\t\t<key>public.filename-extension</key>\n\t\t\t\t<array>\n\t\t\t\t\t<string>changes</string>\n\t\t\t\t</array>\n\t\t\t\t<key>public.mime-type</key>\n\t\t\t\t<string>application/squeak-changes</string>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>UTTypeConformsTo</key>\n\t\t\t<array>\n\t\t\t\t<string>public.data</string>\n\t\t\t</array>\n\t\t\t<key>UTTypeDescription</key>\n\t\t\t<string>Squeak Script File</string>\n\t\t\t<key>UTTypeIdentifier</key>\n\t\t\t<string>org.squeak.script</string>\n\t\t\t<key>UTTypeTagSpecification</key>\n\t\t\t<dict>\n\t\t\t\t<key>com.apple.ostype</key>\n\t\t\t\t<string>SOBJ</string>\n\t\t\t\t<key>public.filename-extension</key>\n\t\t\t\t<array>\n\t\t\t\t\t<string>sobj</string>\n\t\t\t\t</array>\n\t\t\t\t<key>public.mime-type</key>\n\t\t\t\t<string>application/squeak-script</string>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>UTTypeConformsTo</key>\n\t\t\t<array>\n\t\t\t\t<string>public.data</string>\n\t\t\t</array>\n\t\t\t<key>UTTypeDescription</key>\n\t\t\t<string>Squeak Project File</string>\n\t\t\t<key>UTTypeIdentifier</key>\n\t\t\t<string>org.squeak.project</string>\n\t\t\t<key>UTTypeTagSpecification</key>\n\t\t\t<dict>\n\t\t\t\t<key>com.apple.ostype</key>\n\t\t\t\t<string>STpr</string>\n\t\t\t\t<key>public.filename-extension</key>\n\t\t\t\t<array>\n\t\t\t\t\t<string>pr</string>\n\t\t\t\t</array>\n\t\t\t\t<key>public.mime-type</key>\n\t\t\t\t<string>application/x-squeak-project</string>\n\t\t\t</dict>\n\t\t</dict>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/SqueakPureObjc-InfoCOG.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>English</string>\n\t<key>CFBundleDocumentTypes</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>image</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeIconFile</key>\n\t\t\t<string>SqueakImage.icns</string>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Squeak Image File</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>STim</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>sources</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeIconFile</key>\n\t\t\t<string>SqueakSources.icns</string>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Squeak Sources File</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>STso</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>changes</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeIconFile</key>\n\t\t\t<string>SqueakChanges.icns</string>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Squeak Changes File</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>STch</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>sobj</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeIconFile</key>\n\t\t\t<string>SqueakScript.icns</string>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Squeak Script File</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>SOBJ</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeExtensions</key>\n\t\t\t<array>\n\t\t\t\t<string>pr</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeIconFile</key>\n\t\t\t<string>SqueakProject.icns</string>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Squeak Project File</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>STpr</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>JPEG</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>JPEG</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>TEXT</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>TEXT</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>ttro</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>ttro</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>HTML</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>HTML</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>RTF </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>RTF</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>TIFF </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>TIFF</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>PICT </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>PICT</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>URL  </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>URL</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>ZIP </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>ZIP</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>zip </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>zip</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>BINA</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>BINA</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>GIFf</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>GIFf</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>PNGf</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>PNGf</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MP3 </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MP3</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MP3!</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MP3!</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MP3U</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MP3U</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MPEG</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MPEG</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>mp3!</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>mp3!</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MPG2</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MPG2</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MPG3</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MPG3</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>MPG </string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>MPG</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Mp3</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>mp3</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>M3U</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>M3U</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>SRCS</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>SRCS</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Chng</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>Chng</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>HPS5</string>\n\t\t\t<key>CFBundleTypeOSTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>HPS5</string>\n\t\t\t</array>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Viewer</string>\n\t\t</dict>\n\t</array>\n\t<key>CFBundleExecutable</key>\n\t<string>${EXECUTABLE_NAME}</string>\n\t<key>CFBundleGetInfoString</key>\n\t<string>Squeak VM 5.8b12 http://www.squeak.org</string>\n\t<key>CFBundleIconFile</key>\n\t<string>Squeak.icns</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>org.squeak.${PRODUCT_NAME:rfc1034identifier}</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>Squeak VM Cog 32bits</string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>5.8b12</string>\n\t<key>CFBundleSignature</key>\n\t<string>FAST</string>\n\t<key>CFBundleVersion</key>\n\t<string>30.0</string>\n\t<key>LSBackgroundOnly</key>\n\t<false/>\n\t<key>LSMinimumSystemVersion</key>\n\t<string>${MACOSX_DEPLOYMENT_TARGET}</string>\n\t<key>NSMainNibFile</key>\n\t<string>MainMenu</string>\n\t<key>NSPrincipalClass</key>\n\t<string>SqueakOSXApplication</string>\n\t<key>SqueakBrowserMouseCmdButton1</key>\n\t<integer>3</integer>\n\t<key>SqueakBrowserMouseCmdButton2</key>\n\t<integer>3</integer>\n\t<key>SqueakBrowserMouseCmdButton3</key>\n\t<integer>2</integer>\n\t<key>SqueakBrowserMouseControlButton1</key>\n\t<integer>1</integer>\n\t<key>SqueakBrowserMouseControlButton2</key>\n\t<integer>3</integer>\n\t<key>SqueakBrowserMouseControlButton3</key>\n\t<integer>2</integer>\n\t<key>SqueakBrowserMouseNoneButton1</key>\n\t<integer>1</integer>\n\t<key>SqueakBrowserMouseNoneButton2</key>\n\t<integer>3</integer>\n\t<key>SqueakBrowserMouseNoneButton3</key>\n\t<integer>2</integer>\n\t<key>SqueakBrowserMouseOptionButton1</key>\n\t<integer>2</integer>\n\t<key>SqueakBrowserMouseOptionButton2</key>\n\t<integer>3</integer>\n\t<key>SqueakBrowserMouseOptionButton3</key>\n\t<integer>2</integer>\n\t<key>SqueakDebug</key>\n\t<integer>0</integer>\n\t<key>SqueakExplicitWindowOpenNeeded</key>\n\t<false/>\n\t<key>SqueakImageName</key>\n\t<string>Squeak.image</string>\n\t<key>SqueakMaxHeapSize</key>\n\t<integer>536870912</integer>\n\t<key>SqueakMouseCmdButton1</key>\n\t<integer>3</integer>\n\t<key>SqueakMouseCmdButton2</key>\n\t<integer>3</integer>\n\t<key>SqueakMouseCmdButton3</key>\n\t<integer>2</integer>\n\t<key>SqueakMouseControlButton1</key>\n\t<integer>1</integer>\n\t<key>SqueakMouseControlButton2</key>\n\t<integer>3</integer>\n\t<key>SqueakMouseControlButton3</key>\n\t<integer>2</integer>\n\t<key>SqueakMouseNoneButton1</key>\n\t<integer>1</integer>\n\t<key>SqueakMouseNoneButton2</key>\n\t<integer>3</integer>\n\t<key>SqueakMouseNoneButton3</key>\n\t<integer>2</integer>\n\t<key>SqueakMouseOptionButton1</key>\n\t<integer>2</integer>\n\t<key>SqueakMouseOptionButton2</key>\n\t<integer>3</integer>\n\t<key>SqueakMouseOptionButton3</key>\n\t<integer>2</integer>\n\t<key>SqueakPluginsBuiltInOrLocalOnly</key>\n\t<true/>\n\t<key>SqueakQuitOnQuitAppleEvent</key>\n\t<false/>\n\t<key>SqueakResourceDirectory</key>\n\t<string></string>\n\t<key>SqueakTrustedDirectory</key>\n\t<string>/foobar/tooBar/forSqueak/bogus/</string>\n\t<key>SqueakUIFlushPrimaryDeferNMilliseconds</key>\n\t<integer>20</integer>\n\t<key>SqueakUnTrustedDirectory</key>\n\t<string>/foobar/tooBar/forSqueak/bogus/</string>\n\t<key>SqueakUseFileMappedMMAP</key>\n\t<false/>\n\t<key>SqueakUIFadeForFullScreenInSeconds</key>\n\t<real>0.75</real>\n\t<key>UTExportedTypeDeclarations</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>UTTypeConformsTo</key>\n\t\t\t<array>\n\t\t\t\t<string>public.data</string>\n\t\t\t</array>\n\t\t\t<key>UTTypeDescription</key>\n\t\t\t<string>Squeak Image File</string>\n\t\t\t<key>UTTypeIdentifier</key>\n\t\t\t<string>org.squeak.image</string>\n\t\t\t<key>UTTypeTagSpecification</key>\n\t\t\t<dict>\n\t\t\t\t<key>com.apple.ostype</key>\n\t\t\t\t<string>STim</string>\n\t\t\t\t<key>public.filename-extension</key>\n\t\t\t\t<array>\n\t\t\t\t\t<string>image</string>\n\t\t\t\t</array>\n\t\t\t\t<key>public.mime-type</key>\n\t\t\t\t<string>application/squeak-image</string>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>UTTypeConformsTo</key>\n\t\t\t<array>\n\t\t\t\t<string>public.utf8-plain-text</string>\n\t\t\t</array>\n\t\t\t<key>UTTypeDescription</key>\n\t\t\t<string>Squeak Sources File</string>\n\t\t\t<key>UTTypeIdentifier</key>\n\t\t\t<string>org.squeak.sources</string>\n\t\t\t<key>UTTypeTagSpecification</key>\n\t\t\t<dict>\n\t\t\t\t<key>com.apple.ostype</key>\n\t\t\t\t<string>STso</string>\n\t\t\t\t<key>public.filename-extension</key>\n\t\t\t\t<array>\n\t\t\t\t\t<string>sources</string>\n\t\t\t\t</array>\n\t\t\t\t<key>public.mime-type</key>\n\t\t\t\t<string>application/squeak-sources</string>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>UTTypeConformsTo</key>\n\t\t\t<array>\n\t\t\t\t<string>public.utf8-plain-text</string>\n\t\t\t</array>\n\t\t\t<key>UTTypeDescription</key>\n\t\t\t<string>Squeak Changes File</string>\n\t\t\t<key>UTTypeIdentifier</key>\n\t\t\t<string>org.squeak.changes</string>\n\t\t\t<key>UTTypeTagSpecification</key>\n\t\t\t<dict>\n\t\t\t\t<key>com.apple.ostype</key>\n\t\t\t\t<string>STch</string>\n\t\t\t\t<key>public.filename-extension</key>\n\t\t\t\t<array>\n\t\t\t\t\t<string>changes</string>\n\t\t\t\t</array>\n\t\t\t\t<key>public.mime-type</key>\n\t\t\t\t<string>application/squeak-changes</string>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>UTTypeConformsTo</key>\n\t\t\t<array>\n\t\t\t\t<string>public.data</string>\n\t\t\t</array>\n\t\t\t<key>UTTypeDescription</key>\n\t\t\t<string>Squeak Script File</string>\n\t\t\t<key>UTTypeIdentifier</key>\n\t\t\t<string>org.squeak.script</string>\n\t\t\t<key>UTTypeTagSpecification</key>\n\t\t\t<dict>\n\t\t\t\t<key>com.apple.ostype</key>\n\t\t\t\t<string>SOBJ</string>\n\t\t\t\t<key>public.filename-extension</key>\n\t\t\t\t<array>\n\t\t\t\t\t<string>sobj</string>\n\t\t\t\t</array>\n\t\t\t\t<key>public.mime-type</key>\n\t\t\t\t<string>application/squeak-script</string>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>UTTypeConformsTo</key>\n\t\t\t<array>\n\t\t\t\t<string>public.data</string>\n\t\t\t</array>\n\t\t\t<key>UTTypeDescription</key>\n\t\t\t<string>Squeak Project File</string>\n\t\t\t<key>UTTypeIdentifier</key>\n\t\t\t<string>org.squeak.project</string>\n\t\t\t<key>UTTypeTagSpecification</key>\n\t\t\t<dict>\n\t\t\t\t<key>com.apple.ostype</key>\n\t\t\t\t<string>STpr</string>\n\t\t\t\t<key>public.filename-extension</key>\n\t\t\t\t<array>\n\t\t\t\t\t<string>pr</string>\n\t\t\t\t</array>\n\t\t\t\t<key>public.mime-type</key>\n\t\t\t\t<string>application/x-squeak-project</string>\n\t\t\t</dict>\n\t\t</dict>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/SqueakPureObjc.xcodeproj/MAC.mode1v3",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>ActivePerspectiveName</key>\n\t<string>Project</string>\n\t<key>AllowedModules</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Groups and Files Outline View</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCTaskListModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Task List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDetailModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>File and Smart Group Detail Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Detailed Build Results Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Batch Find Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Format Conflicts List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXCVSModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Source Code Control Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Breakpoints Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDockableInspector</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Inspector</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXOpenQuicklyModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Open Quickly Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Console</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCSnapshotModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Snapshots Tool</string>\n\t\t</dict>\n\t</array>\n\t<key>BundlePath</key>\n\t<string>/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources</string>\n\t<key>Description</key>\n\t<string>DefaultDescriptionKey</string>\n\t<key>DockingSystemVisible</key>\n\t<false/>\n\t<key>Extension</key>\n\t<string>mode1v3</string>\n\t<key>FavBarConfig</key>\n\t<dict>\n\t\t<key>PBXProjectModuleGUID</key>\n\t\t<string>043223C712D3706400260293</string>\n\t\t<key>XCBarModuleItemNames</key>\n\t\t<dict/>\n\t\t<key>XCBarModuleItems</key>\n\t\t<array/>\n\t</dict>\n\t<key>FirstTimeWindowDisplayed</key>\n\t<false/>\n\t<key>Identifier</key>\n\t<string>com.apple.perspectives.project.mode1v3</string>\n\t<key>MajorVersion</key>\n\t<integer>33</integer>\n\t<key>MinorVersion</key>\n\t<integer>0</integer>\n\t<key>Name</key>\n\t<string>Default</string>\n\t<key>Notifications</key>\n\t<array/>\n\t<key>OpenEditors</key>\n\t<array/>\n\t<key>PerspectiveWidths</key>\n\t<array>\n\t\t<integer>-1</integer>\n\t\t<integer>-1</integer>\n\t</array>\n\t<key>Perspectives</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>ChosenToolbarItems</key>\n\t\t\t<array>\n\t\t\t\t<string>active-combo-popup</string>\n\t\t\t\t<string>action</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>debugger-enable-breakpoints</string>\n\t\t\t\t<string>build-and-go</string>\n\t\t\t\t<string>com.apple.ide.PBXToolbarStopButton</string>\n\t\t\t\t<string>get-info</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>com.apple.pbx.toolbar.searchfield</string>\n\t\t\t</array>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProjectWithEditor</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.project</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<true/>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>29B97314FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 445}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 463}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>208 222 788 504 0 0 1280 778 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>203pt</string>\n\t\t\t\t</dict>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>MyNewFile14.java</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CE0B20406471E060097A5F4</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>MyNewFile14.java</string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {580, 277}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>208 222 788 504 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>277pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 282}, {580, 181}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>208 222 788 504 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>181pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>580pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>043223C512D3706400260293</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>043223C612D3706400260293</string>\n\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfigUserDefaultsMinorVersion</key>\n\t\t\t<string>2</string>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.defaultV3</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProject</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.morph</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>29B97314FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 337}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 355}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>373 269 690 397 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Morph</string>\n\t\t\t<key>PreferredWidth</key>\n\t\t\t<integer>300</integer>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default.shortV3</string>\n\t\t</dict>\n\t</array>\n\t<key>PerspectivesBarVisible</key>\n\t<false/>\n\t<key>ShelfIsVisible</key>\n\t<false/>\n\t<key>SourceDescription</key>\n\t<string>file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string>\n\t<key>StatusbarIsVisible</key>\n\t<true/>\n\t<key>TimeStamp</key>\n\t<real>0.0</real>\n\t<key>ToolbarConfigUserDefaultsMinorVersion</key>\n\t<string>2</string>\n\t<key>ToolbarDisplayMode</key>\n\t<integer>1</integer>\n\t<key>ToolbarIsVisible</key>\n\t<true/>\n\t<key>ToolbarSizeMode</key>\n\t<integer>1</integer>\n\t<key>Type</key>\n\t<string>Perspectives</string>\n\t<key>UpdateMessage</key>\n\t<string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the \"Metro-Morph\" feature).  You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature.  Do you wish to update to the latest Workspace defaults for project '%@'?</string>\n\t<key>WindowJustification</key>\n\t<integer>5</integer>\n\t<key>WindowOrderList</key>\n\t<array>\n\t\t<string>043223C812D3706400260293</string>\n\t\t<string>/Users/MAC/Desktop/Dev/VM/cog-osx/platforms/iOS/vm/SqueakPureObjc.xcodeproj</string>\n\t</array>\n\t<key>WindowString</key>\n\t<string>208 222 788 504 0 0 1280 778 </string>\n\t<key>WindowToolsV3</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.build</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string></string>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {500, 218}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>267 201 500 500 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>218pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Build Results</string>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Collapse</key>\n\t\t\t\t\t\t\t\t<integer>1021</integer>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Open</key>\n\t\t\t\t\t\t\t\t<integer>1011</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 223}, {500, 236}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>267 201 500 500 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>236pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>459pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Build Results</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>043223C812D3706400260293</string>\n\t\t\t\t<string>043223C912D3706400260293</string>\n\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.buildV3</string>\n\t\t\t<key>WindowContentMinSize</key>\n\t\t\t<string>486 300</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>267 201 500 500 0 0 1280 778 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>043223C812D3706400260293</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugger</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Debugger</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {317, 164}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{317, 0}, {377, 164}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {694, 164}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 164}, {694, 216}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debug - GLUTExamples (Underwater)</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>DebugConsoleDrawerSize</key>\n\t\t\t\t\t\t\t\t<string>{100, 120}</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleVisible</key>\n\t\t\t\t\t\t\t\t<string>None</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>DebugSTDIOWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {694, 380}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>321 238 694 422 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t\t<string>1C0AD2AB069F1E9B00FABCE6</string>\n\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t<string>1C0AD2AC069F1E9B00FABCE6</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>321 238 694 422 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.find</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t\t\t<string>1CD0528D0623707200166675</string>\n\t\t\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {781, 167}}</string>\n\t\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t\t<string>62 385 781 470 0 0 1440 878 </string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t\t\t<string>781pt</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>50%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Project Find</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{8, 0}, {773, 254}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>62 385 781 470 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>50%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>428pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Find</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t\t<string>1C530D58069F1CE1000CFCEE</string>\n\t\t\t\t<string>1C530D59069F1CE1000CFCEE</string>\n\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t<string>1C530D5A069F1CE1000CFCEE</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>62 385 781 470 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>MENUSEPARATOR</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debuggerConsole</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debugger Console</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {650, 250}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>516 632 650 250 0 0 1680 1027 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>209pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>209pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger Console</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t\t<string>1C78EAAE065D492600B07095</string>\n\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.consoleV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>650 41 650 250 0 0 1280 1002 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.snapshots</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCSnapshotModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Snapshots</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCSnapshotModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<string>Yes</string>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.snapshots</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>315 824 300 550 0 0 1440 878 </string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<string>Yes</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.scm</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1C78EAB3065D492600B07095</string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>0pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>SCM</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ConsoleFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 259}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 7}, {452, 259}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t\t<key>TableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>Status</string>\n\t\t\t\t\t\t\t\t\t<real>30</real>\n\t\t\t\t\t\t\t\t\t<string>FileName</string>\n\t\t\t\t\t\t\t\t\t<real>199</real>\n\t\t\t\t\t\t\t\t\t<string>Path</string>\n\t\t\t\t\t\t\t\t\t<real>197.0950012207031</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>TableFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 250}}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>262pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>266pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>SCM</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAB4065D492600B07095</string>\n\t\t\t\t<string>1C78EAB5065D492600B07095</string>\n\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.scm</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.breakpoints</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t\t\t<string>no</string>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {168, 350}}</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {185, 368}}</string>\n\t\t\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>185pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{190, 0}, {554, 368}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>554pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>368pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>MajorVersion</key>\n\t\t\t<integer>3</integer>\n\t\t\t<key>MinorVersion</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Name</key>\n\t\t\t<string>Breakpoints</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CDDB66807F98D9800BB5817</string>\n\t\t\t\t<string>1CDDB66907F98D9800BB5817</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.breakpointsV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CDDB66807F98D9800BB5817</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugAnimator</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Visualizer</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugAnimatorV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>100 100 700 500 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.bookmarks</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>538 42 401 187 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.projectFormatConflicts</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Format Conflicts</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowContentMinSize</key>\n\t\t\t<string>450 300</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>50 850 472 307 0 0 1440 877</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.classBrowser</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>OptionsSetName</key>\n\t\t\t\t\t\t\t\t<string>Hierarchy, all classes</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Class Browser - NSObject</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ClassesFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {374, 96}}</string>\n\t\t\t\t\t\t\t\t<key>ClassesTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXClassNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>208</real>\n\t\t\t\t\t\t\t\t\t<string>PBXClassBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {630, 331}}</string>\n\t\t\t\t\t\t\t\t<key>MembersFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 105}, {374, 395}}</string>\n\t\t\t\t\t\t\t\t<key>MembersTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeIconColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>216</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>97</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>332pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>332pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t\t<string>1C0AD2B0069F1E9B00FABCE6</string>\n\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.classbrowser</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.refactoring</string>\n\t\t\t<key>IncludeInToolsMenu</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{0, 0}, {500, 335}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{0, 0}, {500, 335}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCRefactoringModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Refactoring</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCRefactoringModule</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>200 200 500 356 0 0 1920 1200 </string>\n\t\t</dict>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/SqueakPureObjc.xcodeproj/MAC.pbxuser",
    "content": "// !$*UTF8*$!\n{\n\t043223A412D3705C00260293 /* SqueakNoOGLIPhone */ = {\n\t\tisa = PBXExecutable;\n\t\tactiveArgIndices = (\n\t\t);\n\t\targumentStrings = (\n\t\t);\n\t\tautoAttachOnCrash = 1;\n\t\tbreakpointsEnabled = 0;\n\t\tconfigStateDict = {\n\t\t};\n\t\tcustomDataFormattersEnabled = 1;\n\t\tdataTipCustomDataFormattersEnabled = 1;\n\t\tdataTipShowTypeColumn = 1;\n\t\tdataTipSortType = 0;\n\t\tdebuggerPlugin = GDBDebugging;\n\t\tdisassemblyDisplayState = 0;\n\t\tenableDebugStr = 1;\n\t\tenvironmentEntries = (\n\t\t);\n\t\texecutableSystemSymbolLevel = 0;\n\t\texecutableUserSymbolLevel = 0;\n\t\tlibgmallocEnabled = 0;\n\t\tname = SqueakNoOGLIPhone;\n\t\tshowTypeColumn = 0;\n\t\tsourceDirectories = (\n\t\t);\n\t};\n\t043223A512D3705C00260293 /* SqueakPureObjc */ = {\n\t\tisa = PBXExecutable;\n\t\tactiveArgIndices = (\n\t\t);\n\t\targumentStrings = (\n\t\t);\n\t\tautoAttachOnCrash = 1;\n\t\tbreakpointsEnabled = 0;\n\t\tconfigStateDict = {\n\t\t};\n\t\tcustomDataFormattersEnabled = 1;\n\t\tdataTipCustomDataFormattersEnabled = 1;\n\t\tdataTipShowTypeColumn = 1;\n\t\tdataTipSortType = 0;\n\t\tdebuggerPlugin = GDBDebugging;\n\t\tdisassemblyDisplayState = 0;\n\t\tenableDebugStr = 1;\n\t\tenvironmentEntries = (\n\t\t);\n\t\texecutableSystemSymbolLevel = 0;\n\t\texecutableUserSymbolLevel = 0;\n\t\tlibgmallocEnabled = 0;\n\t\tname = SqueakPureObjc;\n\t\tshowTypeColumn = 0;\n\t\tsourceDirectories = (\n\t\t);\n\t};\n\t043223A612D3705C00260293 /* SqueakPureObjc64*64 */ = {\n\t\tisa = PBXExecutable;\n\t\tactiveArgIndices = (\n\t\t);\n\t\targumentStrings = (\n\t\t);\n\t\tautoAttachOnCrash = 1;\n\t\tbreakpointsEnabled = 0;\n\t\tconfigStateDict = {\n\t\t};\n\t\tcustomDataFormattersEnabled = 1;\n\t\tdataTipCustomDataFormattersEnabled = 1;\n\t\tdataTipShowTypeColumn = 1;\n\t\tdataTipSortType = 0;\n\t\tdebuggerPlugin = GDBDebugging;\n\t\tdisassemblyDisplayState = 0;\n\t\tenableDebugStr = 1;\n\t\tenvironmentEntries = (\n\t\t);\n\t\texecutableSystemSymbolLevel = 0;\n\t\texecutableUserSymbolLevel = 0;\n\t\tlibgmallocEnabled = 0;\n\t\tname = \"SqueakPureObjc64*64\";\n\t\tshowTypeColumn = 0;\n\t\tsourceDirectories = (\n\t\t);\n\t};\n\t043223CA12D3706500260293 /* Source Control */ = {\n\t\tisa = PBXSourceControlManager;\n\t\tfallbackIsa = XCSourceControlManager;\n\t\tisSCMEnabled = 0;\n\t\tscmConfiguration = {\n\t\t\trepositoryNamesForRoots = {\n\t\t\t\t\"\" = \"\";\n\t\t\t};\n\t\t};\n\t};\n\t043223CB12D3706500260293 /* Code sense */ = {\n\t\tisa = PBXCodeSenseManager;\n\t\tindexTemplatePath = \"\";\n\t};\n\t1D6058900D05DD3D006BFB54 /* SqueakNoOGLIPhone */ = {\n\t\tactiveExec = 0;\n\t\texecutables = (\n\t\t\t043223A412D3705C00260293 /* SqueakNoOGLIPhone */,\n\t\t);\n\t};\n\t29B97313FDCFA39411CA2CEA /* Project object */ = {\n\t\tactiveBuildConfigurationName = Debug;\n\t\tactiveExecutable = 043223A412D3705C00260293 /* SqueakNoOGLIPhone */;\n\t\tactiveTarget = 1D6058900D05DD3D006BFB54 /* SqueakNoOGLIPhone */;\n\t\tcodeSenseManager = 043223CB12D3706500260293 /* Code sense */;\n\t\texecutables = (\n\t\t\t043223A412D3705C00260293 /* SqueakNoOGLIPhone */,\n\t\t\t043223A512D3705C00260293 /* SqueakPureObjc */,\n\t\t\t043223A612D3705C00260293 /* SqueakPureObjc64*64 */,\n\t\t);\n\t\tperUserDictionary = {\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t341,\n\t\t\t\t\t20,\n\t\t\t\t\t48.16259765625,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t\t20,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Target_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXPerProjectTemplateStateSaveDate = 315846749;\n\t\t\tPBXWorkspaceStateSaveDate = 315846749;\n\t\t};\n\t\tsourceControlManager = 043223CA12D3706500260293 /* Source Control */;\n\t\tuserBuildSettings = {\n\t\t};\n\t};\n\t947E626F10AA098300D3B69E /* SqueakPureObjc */ = {\n\t\tactiveExec = 0;\n\t\texecutables = (\n\t\t\t043223A512D3705C00260293 /* SqueakPureObjc */,\n\t\t);\n\t};\n\t948773F910C64DD800E4AEC5 /* SqueakPureObjc64*64 */ = {\n\t\tactiveExec = 0;\n\t\texecutables = (\n\t\t\t043223A612D3705C00260293 /* SqueakPureObjc64*64 */,\n\t\t);\n\t};\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/SqueakPureObjcCogVM.xcodeproj/MAC.mode1v3",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>ActivePerspectiveName</key>\n\t<string>Project</string>\n\t<key>AllowedModules</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Groups and Files Outline View</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCTaskListModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Task List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDetailModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>File and Smart Group Detail Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Detailed Build Results Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Batch Find Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Format Conflicts List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXCVSModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Source Code Control Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Breakpoints Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDockableInspector</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Inspector</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXOpenQuicklyModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Open Quickly Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Console</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCSnapshotModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Snapshots Tool</string>\n\t\t</dict>\n\t</array>\n\t<key>BundlePath</key>\n\t<string>/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources</string>\n\t<key>Description</key>\n\t<string>DefaultDescriptionKey</string>\n\t<key>DockingSystemVisible</key>\n\t<false/>\n\t<key>Extension</key>\n\t<string>mode1v3</string>\n\t<key>FavBarConfig</key>\n\t<dict>\n\t\t<key>PBXProjectModuleGUID</key>\n\t\t<string>04F521BB12B78AF70063E79B</string>\n\t\t<key>XCBarModuleItemNames</key>\n\t\t<dict/>\n\t\t<key>XCBarModuleItems</key>\n\t\t<array/>\n\t</dict>\n\t<key>FirstTimeWindowDisplayed</key>\n\t<false/>\n\t<key>Identifier</key>\n\t<string>com.apple.perspectives.project.mode1v3</string>\n\t<key>MajorVersion</key>\n\t<integer>33</integer>\n\t<key>MinorVersion</key>\n\t<integer>0</integer>\n\t<key>Name</key>\n\t<string>Default</string>\n\t<key>Notifications</key>\n\t<array/>\n\t<key>OpenEditors</key>\n\t<array/>\n\t<key>PerspectiveWidths</key>\n\t<array>\n\t\t<integer>-1</integer>\n\t\t<integer>-1</integer>\n\t</array>\n\t<key>Perspectives</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>ChosenToolbarItems</key>\n\t\t\t<array>\n\t\t\t\t<string>active-combo-popup</string>\n\t\t\t\t<string>action</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>debugger-enable-breakpoints</string>\n\t\t\t\t<string>build-and-go</string>\n\t\t\t\t<string>com.apple.ide.PBXToolbarStopButton</string>\n\t\t\t\t<string>get-info</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>com.apple.pbx.toolbar.searchfield</string>\n\t\t\t</array>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProjectWithEditor</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.project</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<true/>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>29B97314FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>29B97315FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>9424FF570DDCB17F009912BF</string>\n\t\t\t\t\t\t\t\t<string>94BCE77E0DDDF61200F38F31</string>\n\t\t\t\t\t\t\t\t<string>94BCE77F0DDDF61200F38F31</string>\n\t\t\t\t\t\t\t\t<string>94883B3F0E0C2B9C005A4738</string>\n\t\t\t\t\t\t\t\t<string>94BCE7840DDDF61200F38F31</string>\n\t\t\t\t\t\t\t\t<string>94BCE6880DDDECC200F38F31</string>\n\t\t\t\t\t\t\t\t<string>9424FF580DDCB18C009912BF</string>\n\t\t\t\t\t\t\t\t<string>9424FF590DDCB198009912BF</string>\n\t\t\t\t\t\t\t\t<string>9424FF5A0DDCB19F009912BF</string>\n\t\t\t\t\t\t\t\t<string>94E658DC0DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94E658DF0DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94E658E20DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94584F6010F020BD001401E7</string>\n\t\t\t\t\t\t\t\t<string>29B97323FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>85</integer>\n\t\t\t\t\t\t\t\t\t<integer>55</integer>\n\t\t\t\t\t\t\t\t\t<integer>48</integer>\n\t\t\t\t\t\t\t\t\t<integer>46</integer>\n\t\t\t\t\t\t\t\t\t<integer>2</integer>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 645}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 663}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>149 68 948 704 0 0 1280 778 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>203pt</string>\n\t\t\t\t</dict>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>squeakProxy.m</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CE0B20406471E060097A5F4</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>squeakProxy.m</string>\n\t\t\t\t\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>04F521C112B78B350063E79B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FABF12C188A200EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB1112C1969D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB1212C1969D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB1E12C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB2112C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB2212C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB2312C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB2512C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB2612C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB2712C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB2812C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB2912C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB2A12C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB2B12C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB2C12C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB2D12C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB2E12C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB2F12C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB3012C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB3112C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB3212C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB3312C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB3412C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB3512C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB3612C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB3712C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB3812C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB3912C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB3A12C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>04E0703B12C2D04C007397EE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>04E0703C12C2D04C007397EE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>04E0703E12C2D04C007397EE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>04E0703F12C2D04C007397EE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>04E0704012C2D04C007397EE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>04E0704112C2D04C007397EE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>04E0704212C2D04C007397EE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>043F2D5E12C2D42F003DD14E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>043F2D5F12C2D42F003DD14E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>043F2D6012C2D42F003DD14E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>043F2D6112C2D42F003DD14E</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {740, 353}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>149 68 948 704 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>353pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 358}, {740, 305}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>149 68 948 704 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>305pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>740pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>043F438612C38D8700503AE6</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>043F438712C38D8700503AE6</string>\n\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfigUserDefaultsMinorVersion</key>\n\t\t\t<string>2</string>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.defaultV3</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProject</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.morph</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>29B97314FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 337}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 355}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>373 269 690 397 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Morph</string>\n\t\t\t<key>PreferredWidth</key>\n\t\t\t<integer>300</integer>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default.shortV3</string>\n\t\t</dict>\n\t</array>\n\t<key>PerspectivesBarVisible</key>\n\t<false/>\n\t<key>ShelfIsVisible</key>\n\t<false/>\n\t<key>SourceDescription</key>\n\t<string>file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string>\n\t<key>StatusbarIsVisible</key>\n\t<true/>\n\t<key>TimeStamp</key>\n\t<real>0.0</real>\n\t<key>ToolbarConfigUserDefaultsMinorVersion</key>\n\t<string>2</string>\n\t<key>ToolbarDisplayMode</key>\n\t<integer>1</integer>\n\t<key>ToolbarIsVisible</key>\n\t<true/>\n\t<key>ToolbarSizeMode</key>\n\t<integer>1</integer>\n\t<key>Type</key>\n\t<string>Perspectives</string>\n\t<key>UpdateMessage</key>\n\t<string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the \"Metro-Morph\" feature).  You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature.  Do you wish to update to the latest Workspace defaults for project '%@'?</string>\n\t<key>WindowJustification</key>\n\t<integer>5</integer>\n\t<key>WindowOrderList</key>\n\t<array>\n\t\t<string>04F521BC12B78AF70063E79B</string>\n\t\t<string>/Users/MAC/Desktop/Dev/VM/cog-osx/platforms/iOS/vm/SqueakPureObjcCogVM.xcodeproj</string>\n\t</array>\n\t<key>WindowString</key>\n\t<string>149 68 948 704 0 0 1280 778 </string>\n\t<key>WindowToolsV3</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.build</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string></string>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {832, 306}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>267 113 832 588 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>306pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Build Results</string>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Collapse</key>\n\t\t\t\t\t\t\t\t<integer>1021</integer>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Open</key>\n\t\t\t\t\t\t\t\t<integer>1011</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 311}, {832, 236}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>267 113 832 588 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>236pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>547pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Build Results</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>04F521BC12B78AF70063E79B</string>\n\t\t\t\t<string>043F438812C38D8700503AE6</string>\n\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.buildV3</string>\n\t\t\t<key>WindowContentMinSize</key>\n\t\t\t<string>486 300</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>267 113 832 588 0 0 1280 778 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>04F521BC12B78AF70063E79B</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugger</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Debugger</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {316, 198}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{316, 0}, {378, 198}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {694, 198}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 198}, {694, 183}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debug - GLUTExamples (Underwater)</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>DebugConsoleVisible</key>\n\t\t\t\t\t\t\t\t<string>None</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>DebugSTDIOWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {694, 381}}</string>\n\t\t\t\t\t\t\t\t<key>PBXDebugSessionStackFrameViewKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>DebugVariablesTableConfiguration</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>Name</string>\n\t\t\t\t\t\t\t\t\t\t<real>120</real>\n\t\t\t\t\t\t\t\t\t\t<string>Value</string>\n\t\t\t\t\t\t\t\t\t\t<real>85</real>\n\t\t\t\t\t\t\t\t\t\t<string>Summary</string>\n\t\t\t\t\t\t\t\t\t\t<real>148</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t<string>{{316, 0}, {378, 198}}</string>\n\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t<string>194 312 694 422 0 0 1280 778 </string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>194 312 694 422 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>381pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>381pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t\t<string>04E0702C12C2D04C007397EE</string>\n\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t<string>04E0702D12C2D04C007397EE</string>\n\t\t\t\t<string>04E0702E12C2D04C007397EE</string>\n\t\t\t\t<string>04E0702F12C2D04C007397EE</string>\n\t\t\t\t<string>04E0703012C2D04C007397EE</string>\n\t\t\t\t<string>04E0703112C2D04C007397EE</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>194 312 694 422 0 0 1280 778 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.find</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>sqNamedPrims.h</string>\n\t\t\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {781, 212}}</string>\n\t\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t\t<string>39 297 781 470 0 0 1280 778 </string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t\t\t<string>781pt</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>212pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Project Find</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 217}, {781, 212}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>39 297 781 470 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>212pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>429pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Find</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t\t<string>043F2D5812C2D3D6003DD14E</string>\n\t\t\t\t<string>043F2D5912C2D3D6003DD14E</string>\n\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>39 297 781 470 0 0 1280 778 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>MENUSEPARATOR</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debuggerConsole</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debugger Console</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {650, 209}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>170 499 650 250 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>209pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>209pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger Console</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t\t<string>0477FB4C12C1992500EB4B40</string>\n\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.consoleV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>170 499 650 250 0 0 1280 778 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.snapshots</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCSnapshotModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Snapshots</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCSnapshotModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<string>Yes</string>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.snapshots</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>315 824 300 550 0 0 1440 878 </string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<string>Yes</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.scm</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1C78EAB3065D492600B07095</string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>0pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>SCM</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ConsoleFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 259}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 7}, {452, 259}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t\t<key>TableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>Status</string>\n\t\t\t\t\t\t\t\t\t<real>30</real>\n\t\t\t\t\t\t\t\t\t<string>FileName</string>\n\t\t\t\t\t\t\t\t\t<real>199</real>\n\t\t\t\t\t\t\t\t\t<string>Path</string>\n\t\t\t\t\t\t\t\t\t<real>197.0950012207031</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>TableFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 250}}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>262pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>266pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>SCM</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAB4065D492600B07095</string>\n\t\t\t\t<string>1C78EAB5065D492600B07095</string>\n\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.scm</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.breakpoints</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t\t\t<string>no</string>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {168, 350}}</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {185, 368}}</string>\n\t\t\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>185pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{190, 0}, {554, 368}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>554pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>368pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>MajorVersion</key>\n\t\t\t<integer>3</integer>\n\t\t\t<key>MinorVersion</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Name</key>\n\t\t\t<string>Breakpoints</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CDDB66807F98D9800BB5817</string>\n\t\t\t\t<string>1CDDB66907F98D9800BB5817</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.breakpointsV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CDDB66807F98D9800BB5817</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugAnimator</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Visualizer</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugAnimatorV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>100 100 700 500 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.bookmarks</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>538 42 401 187 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.projectFormatConflicts</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Format Conflicts</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowContentMinSize</key>\n\t\t\t<string>450 300</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>50 850 472 307 0 0 1440 877</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.classBrowser</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>OptionsSetName</key>\n\t\t\t\t\t\t\t\t<string>Hierarchy, all classes</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Class Browser - NSObject</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ClassesFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {374, 96}}</string>\n\t\t\t\t\t\t\t\t<key>ClassesTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXClassNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>208</real>\n\t\t\t\t\t\t\t\t\t<string>PBXClassBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {630, 331}}</string>\n\t\t\t\t\t\t\t\t<key>MembersFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 105}, {374, 395}}</string>\n\t\t\t\t\t\t\t\t<key>MembersTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeIconColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>216</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>97</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>332pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>332pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t\t<string>1C0AD2B0069F1E9B00FABCE6</string>\n\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.classbrowser</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.refactoring</string>\n\t\t\t<key>IncludeInToolsMenu</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{0, 0}, {500, 335}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{0, 0}, {500, 335}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCRefactoringModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Refactoring</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCRefactoringModule</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>200 200 500 356 0 0 1920 1200 </string>\n\t\t</dict>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/SqueakPureObjcCogVM.xcodeproj/MAC.mode1v3~esteban_master",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>ActivePerspectiveName</key>\n\t<string>Project</string>\n\t<key>AllowedModules</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Groups and Files Outline View</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCTaskListModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Task List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDetailModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>File and Smart Group Detail Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Detailed Build Results Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Batch Find Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Format Conflicts List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXCVSModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Source Code Control Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Breakpoints Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDockableInspector</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Inspector</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXOpenQuicklyModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Open Quickly Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Console</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCSnapshotModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Snapshots Tool</string>\n\t\t</dict>\n\t</array>\n\t<key>BundlePath</key>\n\t<string>/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources</string>\n\t<key>Description</key>\n\t<string>DefaultDescriptionKey</string>\n\t<key>DockingSystemVisible</key>\n\t<false/>\n\t<key>Extension</key>\n\t<string>mode1v3</string>\n\t<key>FavBarConfig</key>\n\t<dict>\n\t\t<key>PBXProjectModuleGUID</key>\n\t\t<string>04F521BB12B78AF70063E79B</string>\n\t\t<key>XCBarModuleItemNames</key>\n\t\t<dict/>\n\t\t<key>XCBarModuleItems</key>\n\t\t<array/>\n\t</dict>\n\t<key>FirstTimeWindowDisplayed</key>\n\t<false/>\n\t<key>Identifier</key>\n\t<string>com.apple.perspectives.project.mode1v3</string>\n\t<key>MajorVersion</key>\n\t<integer>33</integer>\n\t<key>MinorVersion</key>\n\t<integer>0</integer>\n\t<key>Name</key>\n\t<string>Default</string>\n\t<key>Notifications</key>\n\t<array/>\n\t<key>OpenEditors</key>\n\t<array/>\n\t<key>PerspectiveWidths</key>\n\t<array>\n\t\t<integer>-1</integer>\n\t\t<integer>-1</integer>\n\t</array>\n\t<key>Perspectives</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>ChosenToolbarItems</key>\n\t\t\t<array>\n\t\t\t\t<string>active-combo-popup</string>\n\t\t\t\t<string>action</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>debugger-enable-breakpoints</string>\n\t\t\t\t<string>build-and-go</string>\n\t\t\t\t<string>com.apple.ide.PBXToolbarStopButton</string>\n\t\t\t\t<string>get-info</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>com.apple.pbx.toolbar.searchfield</string>\n\t\t\t</array>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProjectWithEditor</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.project</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>212</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>29B97314FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>29B97315FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>9424FF570DDCB17F009912BF</string>\n\t\t\t\t\t\t\t\t<string>94BCE77E0DDDF61200F38F31</string>\n\t\t\t\t\t\t\t\t<string>94BCE77F0DDDF61200F38F31</string>\n\t\t\t\t\t\t\t\t<string>94E658DC0DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94EF6CB911E55947003BA64D</string>\n\t\t\t\t\t\t\t\t<string>94EF6CBC11E55947003BA64D</string>\n\t\t\t\t\t\t\t\t<string>29B97323FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {212, 604}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {229, 622}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>212</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>224 98 889 663 0 0 1280 778 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>229pt</string>\n\t\t\t\t</dict>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Info-iPhone.plist</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CE0B20406471E060097A5F4</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>Info-iPhone.plist</string>\n\t\t\t\t\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t\t\t\t\t<string>043FE5E912FD7CB60094027A</string>\n\t\t\t\t\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FABF12C188A200EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB1212C1969D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB2112C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB2212C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB2312C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB2512C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB2612C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB2712C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB2812C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB2912C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB2A12C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB2C12C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB2D12C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB2E12C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB3012C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB3112C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB3212C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB3312C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB3412C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB3512C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB3612C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB3712C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB3812C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>0477FB3912C1977D00EB4B40</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>04E0703C12C2D04C007397EE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>04E0703F12C2D04C007397EE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>04E0704212C2D04C007397EE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>043F2D5E12C2D42F003DD14E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>043F2D5F12C2D42F003DD14E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>043F2D6112C2D42F003DD14E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>043F43E412C3976600503AE6</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F1E9412CD2832008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F1E9712CD2832008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F1E9812CD2832008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F1E9912CD2832008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F1E9A12CD2832008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F201112CD3625008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F201312CD3625008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F201412CD3625008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F201512CD3625008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F201612CD3625008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F205412CD42D2008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F207212CD525C008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F20BC12CE0DE6008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F20C412CE1042008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F20EE12CE1309008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F22EC12CE15A3008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F232A12CE2C03008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>040F232F12D0970F008BA0CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>043223E412D3709700260293</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>043223F212D3CC4700260293</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>04F8801012D5055200C22208</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>04F8801112D5055200C22208</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>04B3FC0112F367E000666210</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>04B3FC0212F367E000666210</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>04B3FC8812F374A800666210</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>043FE54A12FD6C160094027A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>043FE5E112FD7C830094027A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>043FE5E712FD7CB60094027A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>043FE5E812FD7CB60094027A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>043223F312D3CC4700260293</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {655, 380}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>224 98 889 663 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>380pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 385}, {655, 237}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>224 98 889 663 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>237pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>655pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>043FE5E412FD7C830094027A</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>043FE5E512FD7C830094027A</string>\n\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfigUserDefaultsMinorVersion</key>\n\t\t\t<string>2</string>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.defaultV3</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProject</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.morph</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>29B97314FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 337}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 355}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>373 269 690 397 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Morph</string>\n\t\t\t<key>PreferredWidth</key>\n\t\t\t<integer>300</integer>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default.shortV3</string>\n\t\t</dict>\n\t</array>\n\t<key>PerspectivesBarVisible</key>\n\t<false/>\n\t<key>ShelfIsVisible</key>\n\t<false/>\n\t<key>SourceDescription</key>\n\t<string>file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string>\n\t<key>StatusbarIsVisible</key>\n\t<true/>\n\t<key>TimeStamp</key>\n\t<real>0.0</real>\n\t<key>ToolbarConfigUserDefaultsMinorVersion</key>\n\t<string>2</string>\n\t<key>ToolbarDisplayMode</key>\n\t<integer>1</integer>\n\t<key>ToolbarIsVisible</key>\n\t<true/>\n\t<key>ToolbarSizeMode</key>\n\t<integer>1</integer>\n\t<key>Type</key>\n\t<string>Perspectives</string>\n\t<key>UpdateMessage</key>\n\t<string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the \"Metro-Morph\" feature).  You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature.  Do you wish to update to the latest Workspace defaults for project '%@'?</string>\n\t<key>WindowJustification</key>\n\t<integer>5</integer>\n\t<key>WindowOrderList</key>\n\t<array>\n\t\t<string>04F521BC12B78AF70063E79B</string>\n\t\t<string>/Users/MAC/Desktop/Dev/VM/cog-osx/platforms/iOS/vm/SqueakPureObjcCogVM.xcodeproj</string>\n\t</array>\n\t<key>WindowString</key>\n\t<string>224 98 889 663 0 0 1280 778 </string>\n\t<key>WindowToolsV3</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.build</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string></string>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {832, 306}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>267 113 832 588 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>306pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Build Results</string>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Collapse</key>\n\t\t\t\t\t\t\t\t<integer>1021</integer>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Open</key>\n\t\t\t\t\t\t\t\t<integer>1011</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 311}, {832, 236}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>267 113 832 588 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>236pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>547pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Build Results</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>04F521BC12B78AF70063E79B</string>\n\t\t\t\t<string>043FE5E612FD7C830094027A</string>\n\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.buildV3</string>\n\t\t\t<key>WindowContentMinSize</key>\n\t\t\t<string>486 300</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>267 113 832 588 0 0 1280 778 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>04F521BC12B78AF70063E79B</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugger</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Debugger</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {316, 203}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{316, 0}, {378, 203}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {694, 203}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 203}, {694, 178}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debug - GLUTExamples (Underwater)</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>DebugConsoleVisible</key>\n\t\t\t\t\t\t\t\t<string>None</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>DebugSTDIOWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {694, 381}}</string>\n\t\t\t\t\t\t\t\t<key>PBXDebugSessionStackFrameViewKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>DebugVariablesTableConfiguration</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>Name</string>\n\t\t\t\t\t\t\t\t\t\t<real>120</real>\n\t\t\t\t\t\t\t\t\t\t<string>Value</string>\n\t\t\t\t\t\t\t\t\t\t<real>85</real>\n\t\t\t\t\t\t\t\t\t\t<string>Summary</string>\n\t\t\t\t\t\t\t\t\t\t<real>148</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t<string>{{316, 0}, {378, 203}}</string>\n\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t<string>194 312 694 422 0 0 1280 778 </string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>194 312 694 422 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>381pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>381pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t\t<string>04F87FAF12D4E63100C22208</string>\n\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t<string>04F87FB012D4E63100C22208</string>\n\t\t\t\t<string>04F87FB112D4E63100C22208</string>\n\t\t\t\t<string>04F87FB212D4E63100C22208</string>\n\t\t\t\t<string>04F87FB312D4E63100C22208</string>\n\t\t\t\t<string>04F87FB412D4E63100C22208</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>194 312 694 422 0 0 1280 778 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.find</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {781, 212}}</string>\n\t\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t\t<string>229 298 781 470 0 0 1280 778 </string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t\t\t<string>781pt</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>212pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Project Find</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 217}, {781, 212}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>229 298 781 470 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>212pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>429pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Find</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t\t<string>04B3FC8612F3749200666210</string>\n\t\t\t\t<string>04B3FC8712F3749200666210</string>\n\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>229 298 781 470 0 0 1280 778 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>MENUSEPARATOR</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debuggerConsole</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debugger Console</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {981, 441}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>276 284 981 482 0 0 1280 778 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>441pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>441pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger Console</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t\t<string>04F87FB512D4E63100C22208</string>\n\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.consoleV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>276 284 981 482 0 0 1280 778 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<true/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.snapshots</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCSnapshotModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Snapshots</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCSnapshotModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<string>Yes</string>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.snapshots</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>315 824 300 550 0 0 1440 878 </string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<string>Yes</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.scm</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>&lt;No Editor&gt;</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1C78EAB3065D492600B07095</string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>0pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>SCM</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ConsoleFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 259}, {452, 0}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 7}, {452, 259}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t\t\t\t\t\t\t<key>TableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>Status</string>\n\t\t\t\t\t\t\t\t\t<real>30</real>\n\t\t\t\t\t\t\t\t\t<string>FileName</string>\n\t\t\t\t\t\t\t\t\t<real>199</real>\n\t\t\t\t\t\t\t\t\t<string>Path</string>\n\t\t\t\t\t\t\t\t\t<real>197.0950012207031</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>TableFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {452, 250}}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>262pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>266pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>SCM</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAB4065D492600B07095</string>\n\t\t\t\t<string>1C78EAB5065D492600B07095</string>\n\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.scm</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>743 379 452 308 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.breakpoints</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t\t\t<string>no</string>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {168, 350}}</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {185, 368}}</string>\n\t\t\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t<real>168</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>185pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{190, 0}, {554, 368}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>554pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>368pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>MajorVersion</key>\n\t\t\t<integer>3</integer>\n\t\t\t<key>MinorVersion</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Name</key>\n\t\t\t<string>Breakpoints</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CDDB66807F98D9800BB5817</string>\n\t\t\t\t<string>1CDDB66907F98D9800BB5817</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.breakpointsV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>315 424 744 409 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CDDB66807F98D9800BB5817</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugAnimator</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Visualizer</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugAnimatorV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>100 100 700 500 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.bookmarks</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>538 42 401 187 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.projectFormatConflicts</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Format Conflicts</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowContentMinSize</key>\n\t\t\t<string>450 300</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>50 850 472 307 0 0 1440 877</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.classBrowser</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>OptionsSetName</key>\n\t\t\t\t\t\t\t\t<string>Hierarchy, all classes</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Class Browser - NSObject</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ClassesFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {374, 96}}</string>\n\t\t\t\t\t\t\t\t<key>ClassesTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXClassNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>208</real>\n\t\t\t\t\t\t\t\t\t<string>PBXClassBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {630, 331}}</string>\n\t\t\t\t\t\t\t\t<key>MembersFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 105}, {374, 395}}</string>\n\t\t\t\t\t\t\t\t<key>MembersTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeIconColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>216</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>97</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXModuleWindowStatusBarHidden2</key>\n\t\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>332pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>332pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t\t<string>1C0AD2B0069F1E9B00FABCE6</string>\n\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.classbrowser</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>385 179 630 352 0 0 1440 878 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.refactoring</string>\n\t\t\t<key>IncludeInToolsMenu</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{0, 0}, {500, 335}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{0, 0}, {500, 335}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCRefactoringModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Refactoring</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCRefactoringModule</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>200 200 500 356 0 0 1920 1200 </string>\n\t\t</dict>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/SqueakPureObjcCogVM.xcodeproj/MAC.pbxuser",
    "content": "// !$*UTF8*$!\n{\n\t040F1E9412CD2832008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E658F20DDD03FE00358328 /* FFTPlugin.c */;\n\t\tname = \"FFTPlugin.c: 13\";\n\t\trLen = 0;\n\t\trLoc = 364;\n\t\trType = 0;\n\t\tvrLen = 707;\n\t\tvrLoc = 0;\n\t};\n\t040F1E9712CD2832008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E659970DDD053900358328 /* b3d.h */;\n\t\tname = \"b3d.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 577;\n\t\tvrLoc = 0;\n\t};\n\t040F1E9812CD2832008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9494927E11E5178D0019BC29 /* cogit.h */;\n\t\tname = \"cogit.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 928;\n\t\tvrLoc = 0;\n\t};\n\t040F1E9912CD2832008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9494928111E5178D0019BC29 /* cointerp.h */;\n\t\tname = \"cointerp.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 949;\n\t\tvrLoc = 0;\n\t};\n\t040F1E9A12CD2832008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E659980DDD053900358328 /* b3dAlloc.c */;\n\t\tname = \"b3dAlloc.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 729;\n\t\tvrLoc = 0;\n\t};\n\t040F201112CD3625008BA0CB /* PlistBookmark */ = {\n\t\tisa = PlistBookmark;\n\t\tfRef = 947E5F9F10A9FFA000D3B69E /* SqueakPureObjc-Info.plist */;\n\t\tfallbackIsa = PBXBookmark;\n\t\tisK = 0;\n\t\tkPath = (\n\t\t\tSqueakBrowserMouseCmdButton3,\n\t\t);\n\t\tname = \"/Users/MAC/Desktop/Dev/VM/cog-osx/platforms/iOS/vm/SqueakPureObjc-Info.plist\";\n\t\trLen = 0;\n\t\trLoc = 9223372036854775808;\n\t};\n\t040F201312CD3625008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94584FDA10F02378001401E7 /* sqMacExtendedClipboard.h */;\n\t\tname = \"sqMacExtendedClipboard.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1076;\n\t\tvrLoc = 0;\n\t};\n\t040F201412CD3625008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 949492C311E51C6B0019BC29 /* sqExternalSemaphores.c */;\n\t\tname = \"sqExternalSemaphores.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1011;\n\t\tvrLoc = 0;\n\t};\n\t040F201512CD3625008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947E20F90EB2826C007957D0 /* sqFFI.h */;\n\t\tname = \"sqFFI.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1057;\n\t\tvrLoc = 0;\n\t};\n\t040F201612CD3625008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E659A40DDD053900358328 /* sqSoundCodecPluginBasicPrims.c */;\n\t\tname = \"sqSoundCodecPluginBasicPrims.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 631;\n\t\tvrLoc = 0;\n\t};\n\t040F205412CD42D2008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 946DA9FF10C0D35500F26F56 /* sqMacUnixExternalPrims.m */;\n\t\tname = \"sqMacUnixExternalPrims.m: 295\";\n\t\trLen = 0;\n\t\trLoc = 10957;\n\t\trType = 0;\n\t\tvrLen = 1163;\n\t\tvrLoc = 10140;\n\t};\n\t040F207212CD525C008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9471D2DF0E04743F00703D45 /* sqSqueakAppDelegate.h */;\n\t\tname = \"sqSqueakAppDelegate.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1774;\n\t\tvrLoc = 0;\n\t};\n\t040F20BC12CE0DE6008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E6591D0DDD03FE00358328 /* UUIDPlugin.c */;\n\t\tname = \"UUIDPlugin.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 727;\n\t\tvrLoc = 0;\n\t};\n\t040F20C112CE0FFB008BA0CB /* UnixOSProcessPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {684, 60112}}\";\n\t\t\tsepNavSelRange = \"{1263, 0}\";\n\t\t\tsepNavVisRange = \"{921, 748}\";\n\t\t};\n\t};\n\t040F20C412CE1042008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E6591F0DDD03FE00358328 /* ZipPlugin.c */;\n\t\tname = \"ZipPlugin.c: 1686\";\n\t\trLen = 0;\n\t\trLoc = 54016;\n\t\trType = 0;\n\t\tvrLen = 624;\n\t\tvrLoc = 792;\n\t};\n\t040F20D412CE118B008BA0CB /* NSObjCRuntime.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSObjCRuntime.h;\n\t\tpath = /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t040F20E212CE1283008BA0CB /* ObjectiveCPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {685, 27157}}\";\n\t\t\tsepNavSelRange = \"{822, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1355}\";\n\t\t};\n\t};\n\t040F20EE12CE1309008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 040F20D412CE118B008BA0CB /* NSObjCRuntime.h */;\n\t\tname = \"NSObjCRuntime.h: 132\";\n\t\trLen = 0;\n\t\trLoc = 4203;\n\t\trType = 0;\n\t\tvrLen = 1570;\n\t\tvrLoc = 3767;\n\t};\n\t040F22EC12CE15A3008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 040F20E212CE1283008BA0CB /* ObjectiveCPlugin.c */;\n\t\tname = \"ObjectiveCPlugin.c: 29\";\n\t\trLen = 0;\n\t\trLoc = 822;\n\t\trType = 0;\n\t\tvrLen = 1355;\n\t\tvrLoc = 0;\n\t};\n\t040F230612CE1AE2008BA0CB /* SqueakFFIPrims.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {785, 37284}}\";\n\t\t\tsepNavSelRange = \"{772, 0}\";\n\t\t\tsepNavVisRange = \"{67, 1233}\";\n\t\t};\n\t};\n\t040F230D12CE1B28008BA0CB /* HostWindowPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {594, 5148}}\";\n\t\t\tsepNavSelRange = \"{439, 0}\";\n\t\t\tsepNavVisRange = \"{0, 806}\";\n\t\t\tsepNavWindowFrame = \"{{15, 93}, {847, 680}}\";\n\t\t};\n\t};\n\t040F232A12CE2C03008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 040F230612CE1AE2008BA0CB /* SqueakFFIPrims.c */;\n\t\tname = \"SqueakFFIPrims.c: 28\";\n\t\trLen = 0;\n\t\trLoc = 772;\n\t\trType = 0;\n\t\tvrLen = 1233;\n\t\tvrLoc = 67;\n\t};\n\t040F232F12D0970F008BA0CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9494928011E5178D0019BC29 /* gcc3x-cointerp.c */;\n\t\tname = \"gcc3x-cointerp.c: 26017\";\n\t\trLen = 0;\n\t\trLoc = 821119;\n\t\trType = 0;\n\t\tvrLen = 1528;\n\t\tvrLoc = 820039;\n\t};\n\t043223E412D3709700260293 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9424FF5C0DDCB1C7009912BF /* sqMemoryAccess.h */;\n\t\tname = \"sqMemoryAccess.h: 77\";\n\t\trLen = 0;\n\t\trLoc = 2378;\n\t\trType = 0;\n\t\tvrLen = 2191;\n\t\tvrLoc = 1517;\n\t};\n\t043223F212D3CC4700260293 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94A0E8450DE5EB6E0071C8B9 /* sqSqueakIPhoneApplication+attributes.m */;\n\t\tname = \"sqSqueakIPhoneApplication+attributes.m: 59\";\n\t\trLen = 0;\n\t\trLoc = 2444;\n\t\trType = 0;\n\t\tvrLen = 1194;\n\t\tvrLoc = 1304;\n\t};\n\t043223F312D3CC4700260293 /* PlistBookmark */ = {\n\t\tisa = PlistBookmark;\n\t\tfRef = 94C36C9710B0CF290041953A /* Info-iPhone.plist */;\n\t\tfallbackIsa = PBXBookmark;\n\t\tisK = 0;\n\t\tkPath = (\n\t\t);\n\t\tname = \"/Users/MAC/Desktop/Dev/VM/cog-osx/platforms/iOS/vm/Info-iPhone.plist\";\n\t\trLen = 0;\n\t\trLoc = 9223372036854775808;\n\t};\n\t043F2D5E12C2D42F003DD14E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94F879900E6C0C7E00662DEA /* sqSqueakIPhoneInfoPlistInterface.m */;\n\t\tname = \"sqSqueakIPhoneInfoPlistInterface.m: 54\";\n\t\trLen = 0;\n\t\trLoc = 2264;\n\t\trType = 0;\n\t\tvrLen = 1060;\n\t\tvrLoc = 2069;\n\t};\n\t043F2D5F12C2D42F003DD14E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E6599A0DDD053900358328 /* b3dDraw.c */;\n\t\tname = \"b3dDraw.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1031;\n\t\tvrLoc = 0;\n\t};\n\t043F2D6112C2D42F003DD14E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9424FF5E0DDCB1C7009912BF /* sqNamedPrims.c */;\n\t\tname = \"sqNamedPrims.c: 9\";\n\t\trLen = 0;\n\t\trLoc = 327;\n\t\trType = 0;\n\t\tvrLen = 647;\n\t\tvrLoc = 0;\n\t};\n\t043F43E412C3976600503AE6 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E659990DDD053900358328 /* b3dAlloc.h */;\n\t\tname = \"b3dAlloc.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 735;\n\t\tvrLoc = 0;\n\t};\n\t043FE54A12FD6C160094027A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 040F230D12CE1B28008BA0CB /* HostWindowPlugin.c */;\n\t\tname = \"HostWindowPlugin.c: 16\";\n\t\trLen = 0;\n\t\trLoc = 439;\n\t\trType = 0;\n\t\tvrLen = 806;\n\t\tvrLoc = 0;\n\t};\n\t043FE5E112FD7C830094027A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94EF6CC011E55947003BA64D /* interp.h */;\n\t\tname = \"interp.h: 12\";\n\t\trLen = 0;\n\t\trLoc = 319;\n\t\trType = 0;\n\t\tvrLen = 620;\n\t\tvrLoc = 0;\n\t};\n\t043FE5E712FD7CB60094027A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94EF6CBE11E55947003BA64D /* gcc3x-interp.c */;\n\t\tname = \"gcc3x-interp.c: 36497\";\n\t\trLen = 0;\n\t\trLoc = 1086798;\n\t\trType = 0;\n\t\tvrLen = 1046;\n\t\tvrLoc = 1086749;\n\t};\n\t043FE5E812FD7CB60094027A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E658E40DDD03FE00358328 /* ADPCMCodecPlugin.c */;\n\t\tname = \"ADPCMCodecPlugin.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 766;\n\t\tvrLoc = 0;\n\t};\n\t043FE5E912FD7CB60094027A /* PlistBookmark */ = {\n\t\tisa = PlistBookmark;\n\t\tfRef = 94C36C9710B0CF290041953A /* Info-iPhone.plist */;\n\t\tfallbackIsa = PBXBookmark;\n\t\tisK = 0;\n\t\tkPath = (\n\t\t);\n\t\tname = \"/Users/MAC/Desktop/Dev/VM/cog-osx/platforms/iOS/vm/Info-iPhone.plist\";\n\t\trLen = 0;\n\t\trLoc = 9223372036854775807;\n\t};\n\t0477FABF12C188A200EB4B40 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 0477FAC012C188A200EB4B40 /* stdio.h */;\n\t\tname = \"stdio.h: 75\";\n\t\trLen = 14;\n\t\trLoc = 3209;\n\t\trType = 0;\n\t\tvrLen = 590;\n\t\tvrLoc = 2723;\n\t};\n\t0477FAC012C188A200EB4B40 /* stdio.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = stdio.h;\n\t\tpath = /Developer/SDKs/MacOSX10.5.sdk/usr/include/stdio.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t0477FB1212C1969D00EB4B40 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E659100DDD03FE00358328 /* SocketPlugin.c */;\n\t\tname = \"SocketPlugin.c: 810\";\n\t\trLen = 71;\n\t\trLoc = 23631;\n\t\trType = 0;\n\t\tvrLen = 941;\n\t\tvrLoc = 23153;\n\t};\n\t0477FB2112C1977D00EB4B40 /* PBXBookmark */ = {\n\t\tisa = PBXBookmark;\n\t\tfRef = 9414421E10BC89440088F8AC /* Squeak.icns */;\n\t};\n\t0477FB2212C1977D00EB4B40 /* PBXBookmark */ = {\n\t\tisa = PBXBookmark;\n\t\tfRef = 94F3A9690E6BFA7C00E0B12A /* Squeak.png */;\n\t};\n\t0477FB2312C1977D00EB4B40 /* PBXBookmark */ = {\n\t\tisa = PBXBookmark;\n\t\tfRef = 9414421F10BC89440088F8AC /* SqueakChanges.icns */;\n\t};\n\t0477FB2512C1977D00EB4B40 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 1D3623240D0F684500981E51 /* SqueakNoOGLIPhoneAppDelegate.h */;\n\t\tname = \"SqueakNoOGLIPhoneAppDelegate.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1328;\n\t\tvrLoc = 0;\n\t};\n\t0477FB2612C1977D00EB4B40 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 1D3623250D0F684500981E51 /* SqueakNoOGLIPhoneAppDelegate.m */;\n\t\tname = \"SqueakNoOGLIPhoneAppDelegate.m: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1328;\n\t\tvrLoc = 0;\n\t};\n\t0477FB2712C1977D00EB4B40 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947E647910AA100900D3B69E /* SqueakOSXAppDelegate.h */;\n\t\tname = \"SqueakOSXAppDelegate.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1318;\n\t\tvrLoc = 0;\n\t};\n\t0477FB2812C1977D00EB4B40 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947E647A10AA100900D3B69E /* SqueakOSXAppDelegate.m */;\n\t\tname = \"SqueakOSXAppDelegate.m: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1288;\n\t\tvrLoc = 0;\n\t};\n\t0477FB2912C1977D00EB4B40 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9492452F10BA43AA00E726F5 /* SqueakOSXApplication.h */;\n\t\tname = \"SqueakOSXApplication.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1316;\n\t\tvrLoc = 0;\n\t};\n\t0477FB2A12C1977D00EB4B40 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9492453010BA43AA00E726F5 /* SqueakOSXApplication.m */;\n\t\tname = \"SqueakOSXApplication.m: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1316;\n\t\tvrLoc = 0;\n\t};\n\t0477FB2C12C1977D00EB4B40 /* PBXBookmark */ = {\n\t\tisa = PBXBookmark;\n\t\tfRef = 9414422310BC89440088F8AC /* SqueakProject.icns */;\n\t};\n\t0477FB2D12C1977D00EB4B40 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 941724430F36624C0031AF33 /* squeakProxy.h */;\n\t\tname = \"squeakProxy.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1227;\n\t\tvrLoc = 0;\n\t};\n\t0477FB2E12C1977D00EB4B40 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 941724420F36624C0031AF33 /* squeakProxy.m */;\n\t\tname = \"squeakProxy.m: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1008;\n\t\tvrLoc = 0;\n\t};\n\t0477FB3012C1977D00EB4B40 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947E5F9310A9FF4A00D3B69E /* SqueakPureObjc_Prefix.pch */;\n\t\tname = \"SqueakPureObjc_Prefix.pch: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 149;\n\t\tvrLoc = 0;\n\t};\n\t0477FB3112C1977D00EB4B40 /* PBXBookmark */ = {\n\t\tisa = PBXBookmark;\n\t\tfRef = 9414422410BC89440088F8AC /* SqueakScript.icns */;\n\t};\n\t0477FB3212C1977D00EB4B40 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9478E02A0EC8D957007096A7 /* squeakSUnitTester.h */;\n\t\tname = \"squeakSUnitTester.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1319;\n\t\tvrLoc = 0;\n\t};\n\t0477FB3312C1977D00EB4B40 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 940CE8550DFCE2D200EBA91B /* SqueakUIController.m */;\n\t\tname = \"SqueakUIController.m: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1373;\n\t\tvrLoc = 0;\n\t};\n\t0477FB3412C1977D00EB4B40 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 949E5DB50DE3AB6A007388E0 /* SqueakUIView.h */;\n\t\tname = \"SqueakUIView.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1313;\n\t\tvrLoc = 0;\n\t};\n\t0477FB3512C1977D00EB4B40 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 949E5DB60DE3AB6A007388E0 /* SqueakUIView.m */;\n\t\tname = \"SqueakUIView.m: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1313;\n\t\tvrLoc = 0;\n\t};\n\t0477FB3612C1977D00EB4B40 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 942F48FA123C1C0C002B05DF /* SqueakUIViewCALayer.h */;\n\t\tname = \"SqueakUIViewCALayer.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1307;\n\t\tvrLoc = 0;\n\t};\n\t0477FB3712C1977D00EB4B40 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 942F48FB123C1C0C002B05DF /* SqueakUIViewCALayer.m */;\n\t\tname = \"SqueakUIViewCALayer.m: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1277;\n\t\tvrLoc = 0;\n\t};\n\t0477FB3812C1977D00EB4B40 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 942F48FC123C1C0C002B05DF /* SqueakUIViewOpenGL.h */;\n\t\tname = \"SqueakUIViewOpenGL.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1306;\n\t\tvrLoc = 0;\n\t};\n\t0477FB3912C1977D00EB4B40 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 942F48FD123C1C0C002B05DF /* SqueakUIViewOpenGL.m */;\n\t\tname = \"SqueakUIViewOpenGL.m: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1306;\n\t\tvrLoc = 0;\n\t};\n\t04B3FC0112F367E000666210 /* PlistBookmark */ = {\n\t\tisa = PlistBookmark;\n\t\tfRef = 949AD14911E542E8006D6BF4 /* SqueakPureObjc-InfoCOG.plist */;\n\t\tfallbackIsa = PBXBookmark;\n\t\tisK = 0;\n\t\tkPath = (\n\t\t\tCFBundleName,\n\t\t);\n\t\tname = \"/Users/MAC/Desktop/Dev/VM/cog-osx/platforms/iOS/vm/SqueakPureObjc-InfoCOG.plist\";\n\t\trLen = 0;\n\t\trLoc = 9223372036854775808;\n\t};\n\t04B3FC0212F367E000666210 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCE7A60DDDF8F800F38F31 /* sqaio.h */;\n\t\tname = \"sqaio.h: 39\";\n\t\trLen = 73;\n\t\trLoc = 1631;\n\t\trType = 0;\n\t\tvrLen = 1103;\n\t\tvrLoc = 861;\n\t};\n\t04B3FC8812F374A800666210 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 040F20C112CE0FFB008BA0CB /* UnixOSProcessPlugin.c */;\n\t\tname = \"UnixOSProcessPlugin.c: 46\";\n\t\trLen = 0;\n\t\trLoc = 1263;\n\t\trType = 0;\n\t\tvrLen = 748;\n\t\tvrLoc = 921;\n\t};\n\t04E0703C12C2D04C007397EE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E6590E0DDD03FE00358328 /* SecurityPlugin.c */;\n\t\tname = \"SecurityPlugin.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 801;\n\t\tvrLoc = 0;\n\t};\n\t04E0703F12C2D04C007397EE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9471D2E00E04743F00703D45 /* sqSqueakAppDelegate.m */;\n\t\tname = \"sqSqueakAppDelegate.m: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1152;\n\t\tvrLoc = 0;\n\t};\n\t04E0704212C2D04C007397EE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9424FF670DDCB202009912BF /* sqMacV2Memory.c */;\n\t\tname = \"sqMacV2Memory.c: 150\";\n\t\trLen = 0;\n\t\trLoc = 5414;\n\t\trType = 0;\n\t\tvrLen = 879;\n\t\tvrLoc = 6126;\n\t};\n\t04F521B312B78AED0063E79B /* SqueakNoOGLIPhone */ = {\n\t\tisa = PBXExecutable;\n\t\tactiveArgIndices = (\n\t\t);\n\t\targumentStrings = (\n\t\t);\n\t\tautoAttachOnCrash = 1;\n\t\tbreakpointsEnabled = 0;\n\t\tconfigStateDict = {\n\t\t};\n\t\tcustomDataFormattersEnabled = 1;\n\t\tdataTipCustomDataFormattersEnabled = 1;\n\t\tdataTipShowTypeColumn = 1;\n\t\tdataTipSortType = 0;\n\t\tdebuggerPlugin = GDBDebugging;\n\t\tdisassemblyDisplayState = 0;\n\t\tdylibVariantSuffix = \"\";\n\t\tenableDebugStr = 1;\n\t\tenvironmentEntries = (\n\t\t);\n\t\texecutableSystemSymbolLevel = 0;\n\t\texecutableUserSymbolLevel = 0;\n\t\tlibgmallocEnabled = 0;\n\t\tname = SqueakNoOGLIPhone;\n\t\tshowTypeColumn = 0;\n\t\tsourceDirectories = (\n\t\t);\n\t};\n\t04F521B412B78AED0063E79B /* SqueakPureObjc */ = {\n\t\tisa = PBXExecutable;\n\t\tactiveArgIndices = (\n\t\t);\n\t\targumentStrings = (\n\t\t);\n\t\tautoAttachOnCrash = 1;\n\t\tbreakpointsEnabled = 1;\n\t\tconfigStateDict = {\n\t\t};\n\t\tcustomDataFormattersEnabled = 1;\n\t\tdataTipCustomDataFormattersEnabled = 1;\n\t\tdataTipShowTypeColumn = 1;\n\t\tdataTipSortType = 0;\n\t\tdebuggerPlugin = GDBDebugging;\n\t\tdisassemblyDisplayState = 0;\n\t\tdylibVariantSuffix = \"\";\n\t\tenableDebugStr = 1;\n\t\tenvironmentEntries = (\n\t\t);\n\t\texecutableSystemSymbolLevel = 0;\n\t\texecutableUserSymbolLevel = 0;\n\t\tlibgmallocEnabled = 0;\n\t\tname = SqueakPureObjc;\n\t\tsavedGlobals = {\n\t\t};\n\t\tshowTypeColumn = 0;\n\t\tsourceDirectories = (\n\t\t);\n\t\tvariableFormatDictionary = {\n\t\t};\n\t};\n\t04F521BE12B78AF70063E79B /* Source Control */ = {\n\t\tisa = PBXSourceControlManager;\n\t\tfallbackIsa = XCSourceControlManager;\n\t\tisSCMEnabled = 0;\n\t\tscmConfiguration = {\n\t\t\trepositoryNamesForRoots = {\n\t\t\t\t\"\" = \"\";\n\t\t\t};\n\t\t};\n\t};\n\t04F521BF12B78AF70063E79B /* Code sense */ = {\n\t\tisa = PBXCodeSenseManager;\n\t\tindexTemplatePath = \"\";\n\t};\n\t04F8801012D5055200C22208 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9452D5DF0E044A9D000AD792 /* sqSqueakMainApp.m */;\n\t\tname = \"sqSqueakMainApp.m: 57\";\n\t\trLen = 0;\n\t\trLoc = 2273;\n\t\trType = 0;\n\t\tvrLen = 681;\n\t\tvrLoc = 1967;\n\t};\n\t04F8801112D5055200C22208 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 29B97316FDCFA39411CA2CEA /* main.m */;\n\t\tname = \"main.m: 40\";\n\t\trLen = 0;\n\t\trLoc = 1834;\n\t\trType = 0;\n\t\tvrLen = 946;\n\t\tvrLoc = 1321;\n\t};\n\t1D3623240D0F684500981E51 /* SqueakNoOGLIPhoneAppDelegate.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {796, 923}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1328}\";\n\t\t};\n\t};\n\t1D3623250D0F684500981E51 /* SqueakNoOGLIPhoneAppDelegate.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {796, 3432}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1328}\";\n\t\t};\n\t};\n\t1D6058900D05DD3D006BFB54 /* SqueakNoOGLIPhone */ = {\n\t\tactiveExec = 0;\n\t\texecutables = (\n\t\t\t04F521B312B78AED0063E79B /* SqueakNoOGLIPhone */,\n\t\t);\n\t};\n\t29B97313FDCFA39411CA2CEA /* Project object */ = {\n\t\tactiveBuildConfigurationName = Distribution;\n\t\tactiveExecutable = 04F521B412B78AED0063E79B /* SqueakPureObjc */;\n\t\tactiveTarget = 947E626F10AA098300D3B69E /* SqueakPureObjc */;\n\t\taddToTargets = (\n\t\t\t947E626F10AA098300D3B69E /* SqueakPureObjc */,\n\t\t);\n\t\tcodeSenseManager = 04F521BF12B78AF70063E79B /* Code sense */;\n\t\texecutables = (\n\t\t\t04F521B312B78AED0063E79B /* SqueakNoOGLIPhone */,\n\t\t\t04F521B412B78AED0063E79B /* SqueakPureObjc */,\n\t\t);\n\t\tperUserDictionary = {\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t416,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t\t20,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Target_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t467,\n\t\t\t\t\t60,\n\t\t\t\t\t20,\n\t\t\t\t\t48.16259765625,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXTargetDataSource_PrimaryAttribute,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXPerProjectTemplateStateSaveDate = 318602357;\n\t\t\tPBXWorkspaceStateSaveDate = 318602357;\n\t\t};\n\t\tperUserProjectItems = {\n\t\t\t040F1E9412CD2832008BA0CB /* PBXTextBookmark */ = 040F1E9412CD2832008BA0CB /* PBXTextBookmark */;\n\t\t\t040F1E9712CD2832008BA0CB /* PBXTextBookmark */ = 040F1E9712CD2832008BA0CB /* PBXTextBookmark */;\n\t\t\t040F1E9812CD2832008BA0CB /* PBXTextBookmark */ = 040F1E9812CD2832008BA0CB /* PBXTextBookmark */;\n\t\t\t040F1E9912CD2832008BA0CB /* PBXTextBookmark */ = 040F1E9912CD2832008BA0CB /* PBXTextBookmark */;\n\t\t\t040F1E9A12CD2832008BA0CB /* PBXTextBookmark */ = 040F1E9A12CD2832008BA0CB /* PBXTextBookmark */;\n\t\t\t040F201112CD3625008BA0CB /* PlistBookmark */ = 040F201112CD3625008BA0CB /* PlistBookmark */;\n\t\t\t040F201312CD3625008BA0CB /* PBXTextBookmark */ = 040F201312CD3625008BA0CB /* PBXTextBookmark */;\n\t\t\t040F201412CD3625008BA0CB /* PBXTextBookmark */ = 040F201412CD3625008BA0CB /* PBXTextBookmark */;\n\t\t\t040F201512CD3625008BA0CB /* PBXTextBookmark */ = 040F201512CD3625008BA0CB /* PBXTextBookmark */;\n\t\t\t040F201612CD3625008BA0CB /* PBXTextBookmark */ = 040F201612CD3625008BA0CB /* PBXTextBookmark */;\n\t\t\t040F205412CD42D2008BA0CB /* PBXTextBookmark */ = 040F205412CD42D2008BA0CB /* PBXTextBookmark */;\n\t\t\t040F207212CD525C008BA0CB /* PBXTextBookmark */ = 040F207212CD525C008BA0CB /* PBXTextBookmark */;\n\t\t\t040F20BC12CE0DE6008BA0CB /* PBXTextBookmark */ = 040F20BC12CE0DE6008BA0CB /* PBXTextBookmark */;\n\t\t\t040F20C412CE1042008BA0CB /* PBXTextBookmark */ = 040F20C412CE1042008BA0CB /* PBXTextBookmark */;\n\t\t\t040F20EE12CE1309008BA0CB /* PBXTextBookmark */ = 040F20EE12CE1309008BA0CB /* PBXTextBookmark */;\n\t\t\t040F22EC12CE15A3008BA0CB /* PBXTextBookmark */ = 040F22EC12CE15A3008BA0CB /* PBXTextBookmark */;\n\t\t\t040F232A12CE2C03008BA0CB /* PBXTextBookmark */ = 040F232A12CE2C03008BA0CB /* PBXTextBookmark */;\n\t\t\t040F232F12D0970F008BA0CB /* PBXTextBookmark */ = 040F232F12D0970F008BA0CB /* PBXTextBookmark */;\n\t\t\t043223E412D3709700260293 /* PBXTextBookmark */ = 043223E412D3709700260293 /* PBXTextBookmark */;\n\t\t\t043223F212D3CC4700260293 /* PBXTextBookmark */ = 043223F212D3CC4700260293 /* PBXTextBookmark */;\n\t\t\t043223F312D3CC4700260293 /* PlistBookmark */ = 043223F312D3CC4700260293 /* PlistBookmark */;\n\t\t\t043F2D5E12C2D42F003DD14E /* PBXTextBookmark */ = 043F2D5E12C2D42F003DD14E /* PBXTextBookmark */;\n\t\t\t043F2D5F12C2D42F003DD14E /* PBXTextBookmark */ = 043F2D5F12C2D42F003DD14E /* PBXTextBookmark */;\n\t\t\t043F2D6112C2D42F003DD14E /* PBXTextBookmark */ = 043F2D6112C2D42F003DD14E /* PBXTextBookmark */;\n\t\t\t043F43E412C3976600503AE6 /* PBXTextBookmark */ = 043F43E412C3976600503AE6 /* PBXTextBookmark */;\n\t\t\t043FE54A12FD6C160094027A /* PBXTextBookmark */ = 043FE54A12FD6C160094027A /* PBXTextBookmark */;\n\t\t\t043FE5E112FD7C830094027A /* PBXTextBookmark */ = 043FE5E112FD7C830094027A /* PBXTextBookmark */;\n\t\t\t043FE5E712FD7CB60094027A /* PBXTextBookmark */ = 043FE5E712FD7CB60094027A /* PBXTextBookmark */;\n\t\t\t043FE5E812FD7CB60094027A /* PBXTextBookmark */ = 043FE5E812FD7CB60094027A /* PBXTextBookmark */;\n\t\t\t043FE5E912FD7CB60094027A /* PlistBookmark */ = 043FE5E912FD7CB60094027A /* PlistBookmark */;\n\t\t\t0477FABF12C188A200EB4B40 /* PBXTextBookmark */ = 0477FABF12C188A200EB4B40 /* PBXTextBookmark */;\n\t\t\t0477FB1212C1969D00EB4B40 /* PBXTextBookmark */ = 0477FB1212C1969D00EB4B40 /* PBXTextBookmark */;\n\t\t\t0477FB2112C1977D00EB4B40 /* PBXBookmark */ = 0477FB2112C1977D00EB4B40 /* PBXBookmark */;\n\t\t\t0477FB2212C1977D00EB4B40 /* PBXBookmark */ = 0477FB2212C1977D00EB4B40 /* PBXBookmark */;\n\t\t\t0477FB2312C1977D00EB4B40 /* PBXBookmark */ = 0477FB2312C1977D00EB4B40 /* PBXBookmark */;\n\t\t\t0477FB2512C1977D00EB4B40 /* PBXTextBookmark */ = 0477FB2512C1977D00EB4B40 /* PBXTextBookmark */;\n\t\t\t0477FB2612C1977D00EB4B40 /* PBXTextBookmark */ = 0477FB2612C1977D00EB4B40 /* PBXTextBookmark */;\n\t\t\t0477FB2712C1977D00EB4B40 /* PBXTextBookmark */ = 0477FB2712C1977D00EB4B40 /* PBXTextBookmark */;\n\t\t\t0477FB2812C1977D00EB4B40 /* PBXTextBookmark */ = 0477FB2812C1977D00EB4B40 /* PBXTextBookmark */;\n\t\t\t0477FB2912C1977D00EB4B40 /* PBXTextBookmark */ = 0477FB2912C1977D00EB4B40 /* PBXTextBookmark */;\n\t\t\t0477FB2A12C1977D00EB4B40 /* PBXTextBookmark */ = 0477FB2A12C1977D00EB4B40 /* PBXTextBookmark */;\n\t\t\t0477FB2C12C1977D00EB4B40 /* PBXBookmark */ = 0477FB2C12C1977D00EB4B40 /* PBXBookmark */;\n\t\t\t0477FB2D12C1977D00EB4B40 /* PBXTextBookmark */ = 0477FB2D12C1977D00EB4B40 /* PBXTextBookmark */;\n\t\t\t0477FB2E12C1977D00EB4B40 /* PBXTextBookmark */ = 0477FB2E12C1977D00EB4B40 /* PBXTextBookmark */;\n\t\t\t0477FB3012C1977D00EB4B40 /* PBXTextBookmark */ = 0477FB3012C1977D00EB4B40 /* PBXTextBookmark */;\n\t\t\t0477FB3112C1977D00EB4B40 /* PBXBookmark */ = 0477FB3112C1977D00EB4B40 /* PBXBookmark */;\n\t\t\t0477FB3212C1977D00EB4B40 /* PBXTextBookmark */ = 0477FB3212C1977D00EB4B40 /* PBXTextBookmark */;\n\t\t\t0477FB3312C1977D00EB4B40 /* PBXTextBookmark */ = 0477FB3312C1977D00EB4B40 /* PBXTextBookmark */;\n\t\t\t0477FB3412C1977D00EB4B40 /* PBXTextBookmark */ = 0477FB3412C1977D00EB4B40 /* PBXTextBookmark */;\n\t\t\t0477FB3512C1977D00EB4B40 /* PBXTextBookmark */ = 0477FB3512C1977D00EB4B40 /* PBXTextBookmark */;\n\t\t\t0477FB3612C1977D00EB4B40 /* PBXTextBookmark */ = 0477FB3612C1977D00EB4B40 /* PBXTextBookmark */;\n\t\t\t0477FB3712C1977D00EB4B40 /* PBXTextBookmark */ = 0477FB3712C1977D00EB4B40 /* PBXTextBookmark */;\n\t\t\t0477FB3812C1977D00EB4B40 /* PBXTextBookmark */ = 0477FB3812C1977D00EB4B40 /* PBXTextBookmark */;\n\t\t\t0477FB3912C1977D00EB4B40 /* PBXTextBookmark */ = 0477FB3912C1977D00EB4B40 /* PBXTextBookmark */;\n\t\t\t04B3FC0112F367E000666210 /* PlistBookmark */ = 04B3FC0112F367E000666210 /* PlistBookmark */;\n\t\t\t04B3FC0212F367E000666210 /* PBXTextBookmark */ = 04B3FC0212F367E000666210 /* PBXTextBookmark */;\n\t\t\t04B3FC8812F374A800666210 /* PBXTextBookmark */ = 04B3FC8812F374A800666210 /* PBXTextBookmark */;\n\t\t\t04E0703C12C2D04C007397EE /* PBXTextBookmark */ = 04E0703C12C2D04C007397EE /* PBXTextBookmark */;\n\t\t\t04E0703F12C2D04C007397EE /* PBXTextBookmark */ = 04E0703F12C2D04C007397EE /* PBXTextBookmark */;\n\t\t\t04E0704212C2D04C007397EE /* PBXTextBookmark */ = 04E0704212C2D04C007397EE /* PBXTextBookmark */;\n\t\t\t04F8801012D5055200C22208 /* PBXTextBookmark */ = 04F8801012D5055200C22208 /* PBXTextBookmark */;\n\t\t\t04F8801112D5055200C22208 /* PBXTextBookmark */ = 04F8801112D5055200C22208 /* PBXTextBookmark */;\n\t\t};\n\t\tsourceControlManager = 04F521BE12B78AF70063E79B /* Source Control */;\n\t\tuserBuildSettings = {\n\t\t};\n\t};\n\t29B97316FDCFA39411CA2CEA /* main.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {831, 819}}\";\n\t\t\tsepNavSelRange = \"{1834, 0}\";\n\t\t\tsepNavVisRange = \"{1321, 946}\";\n\t\t};\n\t};\n\t940CE8550DFCE2D200EBA91B /* SqueakUIController.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {922, 1339}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1373}\";\n\t\t};\n\t};\n\t941724420F36624C0031AF33 /* squeakProxy.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {679, 2561}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1008}\";\n\t\t};\n\t};\n\t941724430F36624C0031AF33 /* squeakProxy.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {838, 1248}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1227}\";\n\t\t};\n\t};\n\t9424FF5C0DDCB1C7009912BF /* sqMemoryAccess.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {880, 2223}}\";\n\t\t\tsepNavSelRange = \"{2378, 0}\";\n\t\t\tsepNavVisRange = \"{1517, 2191}\";\n\t\t\tsepNavWindowFrame = \"{{84, 30}, {847, 680}}\";\n\t\t};\n\t};\n\t9424FF5D0DDCB1C7009912BF /* sq.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {685, 7085}}\";\n\t\t\tsepNavSelRange = \"{1104, 0}\";\n\t\t\tsepNavVisRange = \"{818, 2005}\";\n\t\t\tsepNavWindowFrame = \"{{38, 72}, {847, 680}}\";\n\t\t};\n\t};\n\t9424FF5E0DDCB1C7009912BF /* sqNamedPrims.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {789, 6799}}\";\n\t\t\tsepNavSelRange = \"{327, 0}\";\n\t\t\tsepNavVisRange = \"{0, 647}\";\n\t\t};\n\t};\n\t9424FF610DDCB1C7009912BF /* sqVirtualMachine.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {999, 4186}}\";\n\t\t\tsepNavSelRange = \"{7199, 37}\";\n\t\t\tsepNavVisRange = \"{6543, 962}\";\n\t\t};\n\t};\n\t9424FF640DDCB1EF009912BF /* sqPlatformSpecific.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1202, 2236}}\";\n\t\t\tsepNavSelRange = \"{3898, 0}\";\n\t\t\tsepNavVisRange = \"{3195, 1054}\";\n\t\t};\n\t};\n\t9424FF650DDCB1EF009912BF /* config.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {679, 2158}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1222}\";\n\t\t};\n\t};\n\t9424FF660DDCB1EF009912BF /* sqConfig.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {679, 301}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 302}\";\n\t\t};\n\t};\n\t9424FF670DDCB202009912BF /* sqMacV2Memory.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {720, 2769}}\";\n\t\t\tsepNavSelRange = \"{6099, 24}\";\n\t\t\tsepNavVisRange = \"{5847, 420}\";\n\t\t};\n\t};\n\t942F48FA123C1C0C002B05DF /* SqueakUIViewCALayer.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {803, 624}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1307}\";\n\t\t};\n\t};\n\t942F48FB123C1C0C002B05DF /* SqueakUIViewCALayer.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {679, 1677}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1277}\";\n\t\t};\n\t};\n\t942F48FC123C1C0C002B05DF /* SqueakUIViewOpenGL.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {803, 975}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1306}\";\n\t\t};\n\t};\n\t942F48FD123C1C0C002B05DF /* SqueakUIViewOpenGL.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {803, 2613}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1306}\";\n\t\t};\n\t};\n\t942F76310E0B6C7600848BF2 /* sqSqueakMainApplication+attributes.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1076, 1417}}\";\n\t\t\tsepNavSelRange = \"{2038, 0}\";\n\t\t\tsepNavVisRange = \"{1943, 548}\";\n\t\t};\n\t};\n\t944069CD10E6B63200353B27 /* MacMenubarPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {838, 23036}}\";\n\t\t\tsepNavSelRange = \"{1004, 45}\";\n\t\t\tsepNavVisRange = \"{769, 348}\";\n\t\t};\n\t};\n\t9452D5DF0E044A9D000AD792 /* sqSqueakMainApp.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {831, 2145}}\";\n\t\t\tsepNavSelRange = \"{2197, 24}\";\n\t\t\tsepNavVisRange = \"{1974, 342}\";\n\t\t\tsepNavWindowFrame = \"{{38, 72}, {847, 680}}\";\n\t\t};\n\t};\n\t94584FDA10F02378001401E7 /* sqMacExtendedClipboard.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {685, 533}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1076}\";\n\t\t};\n\t};\n\t946DA9FF10C0D35500F26F56 /* sqMacUnixExternalPrims.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {950, 4108}}\";\n\t\t\tsepNavSelRange = \"{10242, 69}\";\n\t\t\tsepNavVisRange = \"{10427, 618}\";\n\t\t};\n\t};\n\t9471D2DF0E04743F00703D45 /* sqSqueakAppDelegate.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {831, 702}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1774}\";\n\t\t};\n\t};\n\t9471D2E00E04743F00703D45 /* sqSqueakAppDelegate.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {679, 1443}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1152}\";\n\t\t};\n\t};\n\t9478E02A0EC8D957007096A7 /* squeakSUnitTester.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {838, 2301}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1319}\";\n\t\t};\n\t};\n\t947E20F90EB2826C007957D0 /* sqFFI.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {685, 507}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1057}\";\n\t\t};\n\t};\n\t947E5F9310A9FF4A00D3B69E /* SqueakPureObjc_Prefix.pch */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {679, 365}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 149}\";\n\t\t};\n\t};\n\t947E626F10AA098300D3B69E /* SqueakPureObjc */ = {\n\t\tactiveExec = 0;\n\t\texecutables = (\n\t\t\t04F521B412B78AED0063E79B /* SqueakPureObjc */,\n\t\t);\n\t};\n\t947E647910AA100900D3B69E /* SqueakOSXAppDelegate.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {803, 741}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1318}\";\n\t\t};\n\t};\n\t947E647A10AA100900D3B69E /* SqueakOSXAppDelegate.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {679, 2353}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1288}\";\n\t\t};\n\t};\n\t94883B400E0C2B9C005A4738 /* sqUnixSocket.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {788, 18616}}\";\n\t\t\tsepNavSelRange = \"{207, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1781}\";\n\t\t\tsepNavWindowFrame = \"{{61, 51}, {847, 680}}\";\n\t\t};\n\t};\n\t9492452F10BA43AA00E726F5 /* SqueakOSXApplication.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {803, 559}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1316}\";\n\t\t};\n\t};\n\t9492453010BA43AA00E726F5 /* SqueakOSXApplication.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {803, 754}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1316}\";\n\t\t};\n\t};\n\t9494927E11E5178D0019BC29 /* cogit.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {679, 1547}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 928}\";\n\t\t};\n\t};\n\t9494928011E5178D0019BC29 /* gcc3x-cointerp.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {894, 540826}}\";\n\t\t\tsepNavSelRange = \"{1290722, 0}\";\n\t\t\tsepNavVisRange = \"{1103611, 288}\";\n\t\t};\n\t};\n\t9494928111E5178D0019BC29 /* cointerp.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {679, 2431}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 949}\";\n\t\t};\n\t};\n\t949492C311E51C6B0019BC29 /* sqExternalSemaphores.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {685, 3055}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1011}\";\n\t\t};\n\t};\n\t9494932C11E527180019BC29 /* sqUnixHeartbeat.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {720, 9204}}\";\n\t\t\tsepNavSelRange = \"{8515, 16}\";\n\t\t\tsepNavVisRange = \"{8291, 302}\";\n\t\t};\n\t};\n\t949493BF11E52ADE0019BC29 /* aio.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {656, 5109}}\";\n\t\t\tsepNavSelRange = \"{6270, 0}\";\n\t\t\tsepNavVisRange = \"{5730, 631}\";\n\t\t};\n\t};\n\t949E5DB50DE3AB6A007388E0 /* SqueakUIView.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {803, 689}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1313}\";\n\t\t};\n\t};\n\t949E5DB60DE3AB6A007388E0 /* SqueakUIView.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {803, 2509}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1313}\";\n\t\t};\n\t};\n\t94A0E8450DE5EB6E0071C8B9 /* sqSqueakIPhoneApplication+attributes.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {838, 1495}}\";\n\t\t\tsepNavSelRange = \"{2069, 51}\";\n\t\t\tsepNavVisRange = \"{1771, 393}\";\n\t\t};\n\t};\n\t94BCAE6810ACA10100F87527 /* sqSqueakOSXInfoPlistInterface.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1006, 3536}}\";\n\t\t\tsepNavSelRange = \"{2776, 24}\";\n\t\t\tsepNavVisRange = \"{2412, 415}\";\n\t\t};\n\t};\n\t94BCE7A60DDDF8F800F38F31 /* sqaio.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {771, 1326}}\";\n\t\t\tsepNavSelRange = \"{1704, 0}\";\n\t\t\tsepNavVisRange = \"{1253, 586}\";\n\t\t};\n\t};\n\t94E658E10DDD03FE00358328 /* interp.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {679, 325}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 634}\";\n\t\t};\n\t};\n\t94E658E40DDD03FE00358328 /* ADPCMCodecPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {852, 12480}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 680}\";\n\t\t};\n\t};\n\t94E658E60DDD03FE00358328 /* B2DPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {859, 166426}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 931}\";\n\t\t};\n\t};\n\t94E658F20DDD03FE00358328 /* FFTPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {782, 6539}}\";\n\t\t\tsepNavSelRange = \"{364, 0}\";\n\t\t\tsepNavVisRange = \"{0, 707}\";\n\t\t};\n\t};\n\t94E6590E0DDD03FE00358328 /* SecurityPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {817, 4368}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 801}\";\n\t\t};\n\t};\n\t94E659100DDD03FE00358328 /* SocketPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1125, 21853}}\";\n\t\t\tsepNavSelRange = \"{23836, 0}\";\n\t\t\tsepNavVisRange = \"{23440, 462}\";\n\t\t\tsepNavWindowFrame = \"{{15, 93}, {847, 680}}\";\n\t\t};\n\t};\n\t94E6591D0DDD03FE00358328 /* UUIDPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {810, 2080}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 727}\";\n\t\t};\n\t};\n\t94E6591F0DDD03FE00358328 /* ZipPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {831, 22061}}\";\n\t\t\tsepNavSelRange = \"{54016, 0}\";\n\t\t\tsepNavVisRange = \"{792, 624}\";\n\t\t};\n\t};\n\t94E659200DDD03FE00358328 /* sqNamedPrims.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {685, 988}}\";\n\t\t\tsepNavSelRange = \"{1029, 24}\";\n\t\t\tsepNavVisRange = \"{637, 895}\";\n\t\t};\n\t};\n\t94E659970DDD053900358328 /* b3d.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {679, 1495}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 577}\";\n\t\t};\n\t};\n\t94E659980DDD053900358328 /* b3dAlloc.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {679, 1716}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 729}\";\n\t\t};\n\t};\n\t94E659990DDD053900358328 /* b3dAlloc.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {679, 1989}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 735}\";\n\t\t};\n\t};\n\t94E6599A0DDD053900358328 /* b3dDraw.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {679, 6552}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1031}\";\n\t\t};\n\t};\n\t94E659A40DDD053900358328 /* sqSoundCodecPluginBasicPrims.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {685, 50531}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 631}\";\n\t\t};\n\t};\n\t94EF6CBE11E55947003BA64D /* gcc3x-interp.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1307, 472901}}\";\n\t\t\tsepNavSelRange = \"{1086798, 0}\";\n\t\t\tsepNavVisRange = \"{1086749, 1046}\";\n\t\t};\n\t};\n\t94EF6CC011E55947003BA64D /* interp.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {677, 348}}\";\n\t\t\tsepNavSelRange = \"{319, 0}\";\n\t\t\tsepNavVisRange = \"{0, 620}\";\n\t\t};\n\t};\n\t94F879900E6C0C7E00662DEA /* sqSqueakIPhoneInfoPlistInterface.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {831, 1430}}\";\n\t\t\tsepNavSelRange = \"{2264, 0}\";\n\t\t\tsepNavVisRange = \"{2069, 1060}\";\n\t\t};\n\t};\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/SqueakPureObjcCogVM.xcodeproj/johnmci.mode1v3",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>ActivePerspectiveName</key>\n\t<string>Project</string>\n\t<key>AllowedModules</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Groups and Files Outline View</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Editor</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCTaskListModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Task List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDetailModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>File and Smart Group Detail Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Detailed Build Results Viewer</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Batch Find Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Format Conflicts List</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXCVSModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Source Code Control Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugBreakpointsModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Breakpoints Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCDockableInspector</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Inspector</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXOpenQuicklyModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Open Quickly Tool</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>1</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Console</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>BundleLoadPath</key>\n\t\t\t<string></string>\n\t\t\t<key>MaxInstances</key>\n\t\t\t<string>n</string>\n\t\t\t<key>Module</key>\n\t\t\t<string>XCSnapshotModule</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Snapshots Tool</string>\n\t\t</dict>\n\t</array>\n\t<key>BundlePath</key>\n\t<string>/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources</string>\n\t<key>Description</key>\n\t<string>DefaultDescriptionKey</string>\n\t<key>DockingSystemVisible</key>\n\t<false/>\n\t<key>Extension</key>\n\t<string>mode1v3</string>\n\t<key>FavBarConfig</key>\n\t<dict>\n\t\t<key>PBXProjectModuleGUID</key>\n\t\t<string>9424FF4A0DDC8675009912BF</string>\n\t\t<key>XCBarModuleItemNames</key>\n\t\t<dict/>\n\t\t<key>XCBarModuleItems</key>\n\t\t<array/>\n\t</dict>\n\t<key>FirstTimeWindowDisplayed</key>\n\t<false/>\n\t<key>Identifier</key>\n\t<string>com.apple.perspectives.project.mode1v3</string>\n\t<key>MajorVersion</key>\n\t<integer>33</integer>\n\t<key>MinorVersion</key>\n\t<integer>0</integer>\n\t<key>Name</key>\n\t<string>Default</string>\n\t<key>Notifications</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>XCObserverAutoDisconnectKey</key>\n\t\t\t<true/>\n\t\t\t<key>XCObserverDefintionKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusErrorsKey</key>\n\t\t\t\t<integer>0</integer>\n\t\t\t</dict>\n\t\t\t<key>XCObserverFactoryKey</key>\n\t\t\t<string>XCPerspectivesSpecificationIdentifier</string>\n\t\t\t<key>XCObserverGUIDKey</key>\n\t\t\t<string>XCObserverProjectIdentifier</string>\n\t\t\t<key>XCObserverNotificationKey</key>\n\t\t\t<string>PBXStatusBuildStateMessageNotification</string>\n\t\t\t<key>XCObserverTargetKey</key>\n\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t<key>XCObserverTriggerKey</key>\n\t\t\t<string>awakenModuleWithObserver:</string>\n\t\t\t<key>XCObserverValidationKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusErrorsKey</key>\n\t\t\t\t<integer>2</integer>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>XCObserverAutoDisconnectKey</key>\n\t\t\t<true/>\n\t\t\t<key>XCObserverDefintionKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusWarningsKey</key>\n\t\t\t\t<integer>0</integer>\n\t\t\t</dict>\n\t\t\t<key>XCObserverFactoryKey</key>\n\t\t\t<string>XCPerspectivesSpecificationIdentifier</string>\n\t\t\t<key>XCObserverGUIDKey</key>\n\t\t\t<string>XCObserverProjectIdentifier</string>\n\t\t\t<key>XCObserverNotificationKey</key>\n\t\t\t<string>PBXStatusBuildStateMessageNotification</string>\n\t\t\t<key>XCObserverTargetKey</key>\n\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t<key>XCObserverTriggerKey</key>\n\t\t\t<string>awakenModuleWithObserver:</string>\n\t\t\t<key>XCObserverValidationKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusWarningsKey</key>\n\t\t\t\t<integer>2</integer>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>XCObserverAutoDisconnectKey</key>\n\t\t\t<true/>\n\t\t\t<key>XCObserverDefintionKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusAnalyzerResultsKey</key>\n\t\t\t\t<integer>0</integer>\n\t\t\t</dict>\n\t\t\t<key>XCObserverFactoryKey</key>\n\t\t\t<string>XCPerspectivesSpecificationIdentifier</string>\n\t\t\t<key>XCObserverGUIDKey</key>\n\t\t\t<string>XCObserverProjectIdentifier</string>\n\t\t\t<key>XCObserverNotificationKey</key>\n\t\t\t<string>PBXStatusBuildStateMessageNotification</string>\n\t\t\t<key>XCObserverTargetKey</key>\n\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t<key>XCObserverTriggerKey</key>\n\t\t\t<string>awakenModuleWithObserver:</string>\n\t\t\t<key>XCObserverValidationKey</key>\n\t\t\t<dict>\n\t\t\t\t<key>PBXStatusAnalyzerResultsKey</key>\n\t\t\t\t<integer>2</integer>\n\t\t\t</dict>\n\t\t</dict>\n\t</array>\n\t<key>OpenEditors</key>\n\t<array/>\n\t<key>PerspectiveWidths</key>\n\t<array>\n\t\t<integer>-1</integer>\n\t\t<integer>-1</integer>\n\t</array>\n\t<key>Perspectives</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>ChosenToolbarItems</key>\n\t\t\t<array>\n\t\t\t\t<string>active-combo-popup</string>\n\t\t\t\t<string>action</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>debugger-enable-breakpoints</string>\n\t\t\t\t<string>build-and-go</string>\n\t\t\t\t<string>com.apple.ide.PBXToolbarStopButton</string>\n\t\t\t\t<string>get-info</string>\n\t\t\t\t<string>NSToolbarFlexibleSpaceItem</string>\n\t\t\t\t<string>com.apple.pbx.toolbar.searchfield</string>\n\t\t\t</array>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProjectWithEditor</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.project</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<true/>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t<real>386</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>SCMStatusColumn</string>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>29B97314FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>9412CAB20E6C037B00DB8625</string>\n\t\t\t\t\t\t\t\t<string>29B97315FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>9424FF570DDCB17F009912BF</string>\n\t\t\t\t\t\t\t\t<string>94BCE77E0DDDF61200F38F31</string>\n\t\t\t\t\t\t\t\t<string>9494932B11E527180019BC29</string>\n\t\t\t\t\t\t\t\t<string>94BCE77F0DDDF61200F38F31</string>\n\t\t\t\t\t\t\t\t<string>94883B3F0E0C2B9C005A4738</string>\n\t\t\t\t\t\t\t\t<string>94BCE6880DDDECC200F38F31</string>\n\t\t\t\t\t\t\t\t<string>9424FF580DDCB18C009912BF</string>\n\t\t\t\t\t\t\t\t<string>94BCE6890DDDECD600F38F31</string>\n\t\t\t\t\t\t\t\t<string>94E659420DDD04FA00358328</string>\n\t\t\t\t\t\t\t\t<string>946DA8EE10C0C38600F26F56</string>\n\t\t\t\t\t\t\t\t<string>94E659440DDD04FA00358328</string>\n\t\t\t\t\t\t\t\t<string>94BCE6860DDDECB800F38F31</string>\n\t\t\t\t\t\t\t\t<string>94E659510DDD053900358328</string>\n\t\t\t\t\t\t\t\t<string>94E65A280DDD053900358328</string>\n\t\t\t\t\t\t\t\t<string>94E6594C0DDD053900358328</string>\n\t\t\t\t\t\t\t\t<string>94E6599F0DDD053900358328</string>\n\t\t\t\t\t\t\t\t<string>94E659A20DDD053900358328</string>\n\t\t\t\t\t\t\t\t<string>94E6594E0DDD053900358328</string>\n\t\t\t\t\t\t\t\t<string>94E659920DDD053900358328</string>\n\t\t\t\t\t\t\t\t<string>9463943C0E95845000015851</string>\n\t\t\t\t\t\t\t\t<string>94E659960DDD053900358328</string>\n\t\t\t\t\t\t\t\t<string>947E20F80EB2826C007957D0</string>\n\t\t\t\t\t\t\t\t<string>94E659480DDD053900358328</string>\n\t\t\t\t\t\t\t\t<string>94E659900DDD053900358328</string>\n\t\t\t\t\t\t\t\t<string>9424FF590DDCB198009912BF</string>\n\t\t\t\t\t\t\t\t<string>947E642610AA0E1100D3B69E</string>\n\t\t\t\t\t\t\t\t<string>94C4B82C10C06F0D00CD4F90</string>\n\t\t\t\t\t\t\t\t<string>943B9B271235BD960056205E</string>\n\t\t\t\t\t\t\t\t<string>94584FD810F02378001401E7</string>\n\t\t\t\t\t\t\t\t<string>94B9528410E6B79E00DC476A</string>\n\t\t\t\t\t\t\t\t<string>94C4B82D10C06F1800CD4F90</string>\n\t\t\t\t\t\t\t\t<string>947E647610AA0FF200D3B69E</string>\n\t\t\t\t\t\t\t\t<string>9452D5EF0E044AC2000AD792</string>\n\t\t\t\t\t\t\t\t<string>9478E0220EC8D957007096A7</string>\n\t\t\t\t\t\t\t\t<string>9478E0270EC8D957007096A7</string>\n\t\t\t\t\t\t\t\t<string>9452D5F00E044AD1000AD792</string>\n\t\t\t\t\t\t\t\t<string>9424FF5A0DDCB19F009912BF</string>\n\t\t\t\t\t\t\t\t<string>94BCE6640DDDEB5000F38F31</string>\n\t\t\t\t\t\t\t\t<string>94BCE6650DDDEB5000F38F31</string>\n\t\t\t\t\t\t\t\t<string>080E96DDFE201D6D7F000001</string>\n\t\t\t\t\t\t\t\t<string>94E658DC0DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94E658DD0DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94E658DF0DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94E658E20DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94E658E30DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94E658E50DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94E658E90DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94E658EB0DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94584F6010F020BD001401E7</string>\n\t\t\t\t\t\t\t\t<string>946DA8D110C0C30D00F26F56</string>\n\t\t\t\t\t\t\t\t<string>94E658EF0DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94E658F10DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94E658F30DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94E658F50DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94E658F70DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94E658F90DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94E658FD0DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94E658FF0DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94E659010DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94E659030DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>944069CC10E6B63200353B27</string>\n\t\t\t\t\t\t\t\t<string>94E659050DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94E659070DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94E659090DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94210B270E956AC200C1A314</string>\n\t\t\t\t\t\t\t\t<string>94E6590B0DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94E6590D0DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94E6590F0DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94E659110DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94E659130DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94E659150DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94E659170DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>947E20F40EB281C5007957D0</string>\n\t\t\t\t\t\t\t\t<string>94E659190DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94E6591B0DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94E6591C0DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94E6591E0DDD03FE00358328</string>\n\t\t\t\t\t\t\t\t<string>94EF6CB911E55947003BA64D</string>\n\t\t\t\t\t\t\t\t<string>94EF6CBC11E55947003BA64D</string>\n\t\t\t\t\t\t\t\t<string>29B97317FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>29B97323FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>19C28FACFE9D520D11CA2CBB</string>\n\t\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>436</integer>\n\t\t\t\t\t\t\t\t\t<integer>435</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {408, 918}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {425, 936}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>SCMStatusColumn</string>\n\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>386</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>217 51 1243 977 0 0 1680 1028 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>425pt</string>\n\t\t\t\t</dict>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>sqMacV2Memory.c</string>\n\t\t\t\t\t\t\t\t<key>PBXSplitModuleInNavigatorKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>Split0</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CE0B20406471E060097A5F4</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>sqMacV2Memory.c</string>\n\t\t\t\t\t\t\t\t\t\t<key>_historyCapacity</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>bookmark</key>\n\t\t\t\t\t\t\t\t\t\t<string>949C3B171262C9C900F4EF15</string>\n\t\t\t\t\t\t\t\t\t\t<key>history</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>94547F160DE0AC7D00DD588F</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>945481A60DE2A79200DD588F</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94B1514E0DE2CE530059F208</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>945E9D7C0DE525E100CDF01E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F8E42E0DE6129D003F4F53</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E297D10DECA72F009CF73A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E297D30DECA72F009CF73A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E297D50DECA72F009CF73A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E297D70DECA72F009CF73A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94554E670DF1171500FB176B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94554E690DF1171500FB176B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94554EB80DF1A86A00FB176B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F5C1870DF26EF200099B11</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F5C25F0DF42C7600099B11</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F5C2600DF42C7600099B11</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94AB2E6A0E003879006A79E4</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94AB2E6C0E003879006A79E4</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>945F30FC0E0C763800CFF3DC</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>948704AE0E12CABF00D565C3</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9487071F0E132B1000D565C3</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94ED7EFA0E6C2ABE00F4DD03</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94B88C560E81500200C98131</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F155570E83EA1F001657CE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F155580E83EA1F001657CE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947332EE0EA70E8C003F9084</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>942B77330EA7E642004B266D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>942B77380EA7E642004B266D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>942B779B0EA7F2E0004B266D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>942B779C0EA7F2E0004B266D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>942B77B90EA800E1004B266D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>942B77BB0EA800E1004B266D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>942B77C00EA800E1004B266D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94638CEA0EB16F1100A3F155</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947E210C0EB28486007957D0</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9478E13D0EC8EB46007096A7</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E2DAD40ED2351B00012E92</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E2DB270ED2355F00012E92</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>946D973B0FE165B70038846B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9421AB550FF1807D008F54E9</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947E61D610AA049300D3B69E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947E61DA10AA049300D3B69E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947E61DC10AA049300D3B69E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>942ABEC510AA34820086D908</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94BCAD4A10AB981B00F87527</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94BCAE9010ACA3A300F87527</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94BCAFC710ACC89100F87527</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C887D410ADCC0D007CB39E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C888B710ADE75B007CB39E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C88B6810AF26F8007CB39E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C2074310AF5FB7002F4160</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C2091210AF7413002F4160</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C2092A10AF769A002F4160</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C2092D10AF769A002F4160</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C367C010AF9C0A0041953A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C367C210AF9C0A0041953A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C367D110AF9C830041953A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C3696410AFB7550041953A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C3698D10B082DF0041953A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C3699110B082DF0041953A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9484F86210B0DCC60038BDC0</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9484F86510B0DCC60038BDC0</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9484F8FC10B0E1770038BDC0</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9456C24F10B2F268000BF3DE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9456C25A10B2F2C9000BF3DE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9456C32210B32F43000BF3DE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9456C34E10B33618000BF3DE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9456C3CB10B341F9000BF3DE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F89AFE10B4997900556475</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F89BDE10B4B77400556475</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F89BE010B4B77400556475</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F89C9110B4C0B800556475</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73E5210B5B9CE00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73E5410B5B9CE00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73E5610B5B9CE00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73E5810B5B9CE00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73E5A10B5B9CE00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73E5C10B5B9CE00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73E5E10B5B9CE00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73E6010B5B9CE00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73E6210B5B9CE00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73E6410B5B9CE00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73E6810B5B9CE00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73E6A10B5B9CE00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73EE610B5CF8400F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73F4910B5DA4E00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73FA010B5E5A200F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73FAD10B5E69900F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D73FB510B5E6DA00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D7401510B5F8AF00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D7403810B5FDDB00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D7403A10B5FDDB00F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D740B210B6242000F8C034</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9406E7E210B663F4002F81F2</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9406E87110B66A74002F81F2</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9406E8CC10B67499002F81F2</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D715CB10B723B200F69A71</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D7174110B72FDF00F69A71</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D7177D10B73A3800F69A71</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D7178410B73A3800F69A71</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D7178610B73A3800F69A71</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D7178810B73A3800F69A71</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D7178A10B73A3800F69A71</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D7178C10B73A3800F69A71</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D7179110B73A3800F69A71</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D717BE10B73DD900F69A71</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D717F810B743B800F69A71</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D7183810B74BF300F69A71</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D7183A10B74BF300F69A71</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94A1B2AA10B9E92A00C64473</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94A1B41E10BA05E600C64473</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94862F8310BA182500CAA2EB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94862F9E10BA1A0100CAA2EB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9486302A10BA247200CAA2EB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9492450510BA42EF00E726F5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9492450710BA42EF00E726F5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9492450910BA42EF00E726F5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>949245B210BA4A6200E726F5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>945C4D7C10BB0A8500548CC1</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>945C4EAC10BB348300548CC1</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9428BBAD10BB50E200DAD287</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9428BC5510BB74BF00DAD287</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9428BC5710BB74BF00DAD287</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9428BF3810BBC2ED00DAD287</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9428BF4F10BBCAAC00DAD287</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9473A34810BBD84100ED7D00</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F5F29110BC518B00847EEE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F5F29210BC518B00847EEE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F5F29410BC518B00847EEE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F5F29510BC518B00847EEE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F5F2A810BC539700847EEE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>941441FD10BC817D0088F8AC</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9414420110BC817D0088F8AC</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>949198B010BC8DFC00C629D1</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>949198C910BC8FBB00C629D1</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D16BFC10BCEFEE00A69A89</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D16BFE10BCEFEE00A69A89</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D16C2A10BCF28A00A69A89</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D16C4010BCF3E100A69A89</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D16CA310BCF93000A69A89</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9430325510BD0B6D0045D33B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9430329A10BD103B0045D33B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9430329B10BD103B0045D33B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E4930310BD32D00011AC75</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94CFE6A910BE63A900847DF5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94CFE6B810BE63A900847DF5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94CFE6B910BE63A900847DF5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94CFE6C010BE63A900847DF5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94CFE70110BE683800847DF5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9475F4DB10BEF4100047A24B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9475F56B10BF20A00047A24B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9475F5A710BF25A10047A24B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E583DB10BF43970073FD63</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E584AE10BF6EE30073FD63</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E584FF10BF79AB0073FD63</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E5850010BF79AB0073FD63</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>948FAA0310BF855500BE88CF</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>948FAB5B10BFAD3C00BE88CF</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>946DA7E010C0A7A400F26F56</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>946DA8D910C0C32800F26F56</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>946DA8DA10C0C32800F26F56</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>946DA8DB10C0C32800F26F56</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>946DAA3810C0D8B700F26F56</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>946DAA3A10C0D8B700F26F56</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>946DAA3C10C0D8B700F26F56</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F1F5C910C30C22008DB9CF</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947713D410C45E5F00890A9B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94B7898910C4F95E005EA70D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9402DDB610CE12A5005C2102</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94D3660B10CEE03900805023</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9493E98F10EE90BC000C4FB3</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9448940B10F3E8FF00FB3EC8</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947923FE1102BE53007C87F8</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9473A95A1102F70B00D135CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9473A9701103BE0A00D135CB</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>948C0820112DE98D0017EE7F</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E8EEEA11C94D5D0049D853</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>949DDD6D11D141080017F79B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>949AD35211E54A81006D6BF4</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>949AD36211E54AAA006D6BF4</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94EE1DAA11E57FAB00DC6E8C</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E1BDAB11E5A9F400D5B92B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>941A331D11E63E1A004796BA</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>941A331F11E63E1A004796BA</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9441DB7111E6805300345F6C</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9441DB7211E6805300345F6C</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9475A83511E6B5D50010FB38</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94238E5E11E7B0EB004401BE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94F1F15C11EB8AB5004B3AE3</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9406B4DF11EC314E002670B7</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>949F254511EC33FA00A34245</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>949F254611EC33FA00A34245</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>949F254811EC33FA00A34245</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94977E7C11EE46BC002BC5E9</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>940E86A31220A8D200AAB6F5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>940E86EE1220AF3D00AAB6F5</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94AF3A1F12231A7200691409</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>942807EE1224862A0000DCFE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>942807EF1224862A0000DCFE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>942807F01224862A0000DCFE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E8FA3C12258ED500EECD29</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>940125A81228E3FC002883F0</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>948034A9122A264A00C42504</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94059113122AFF8C009939CE</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>943C0AC7122DF3710086B6AD</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>943C0AC8122DF3710086B6AD</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>943C0ACA122DF3710086B6AD</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>943C0AE0122DF5E70086B6AD</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>943C0AE2122DF5E70086B6AD</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>943C0AE5122DF5E70086B6AD</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>943C0AE7122DF5E70086B6AD</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94FE53951230323500BA17E1</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9415C07412306BDD0067CD8E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>946C240C1230A80A004938A1</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94CAE0ED1230DE6C00AFE487</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C7480712333A2900B1F982</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9453F58A1234AF8A00C91CF7</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9453F58C1234AF8A00C91CF7</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9453F58D1234AF8A00C91CF7</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9453F5911234AF8A00C91CF7</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9453F5931234AF8A00C91CF7</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9453F5951234AF8A00C91CF7</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>943B9B151235BB080056205E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>943B9B1E1235BD150056205E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>943B9BD31235C1120056205E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>943B9BD41235C1120056205E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>943B9C041235C1EE0056205E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>943B9C311235C3D70056205E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>943B9C331235C3D70056205E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>943B9D621235C79C0056205E</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C3CD4E1235C80200A4E319</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94E7F6B812373EB800A03A11</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94AC16D912395FF10067037A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94AC16DA12395FF10067037A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94AC16DC12395FF10067037A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94AC16DE12395FF10067037A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C16B42123D72AE00A8622A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C16B43123D72AE00A8622A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C16B5A123D735F00A8622A</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94BE8B9C123DA0C900C89FDD</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94BE8BAD123DA0EB00C89FDD</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94BE8BD5123DA32300C89FDD</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94BE8BF5123DA42700C89FDD</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94700A50123DF62D00874318</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94700A51123DF62D00874318</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94700AAD123DFCEA00874318</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C8D197123EDAD30019544B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C8D19A123EDAD30019544B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C8D19B123EDAD30019544B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94C8D19C123EDAD30019544B</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9451E64F123F0E9200B4119F</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>948127E812444F7800BD1543</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>948127E912444F7800BD1543</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>948127EA12444F7800BD1543</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>948127EB12444F7800BD1543</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947E9920125D73FD0048E783</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947E9964125D756D0048E783</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947E9967125D756D0048E783</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947E9969125D756D0048E783</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947E996B125D756D0048E783</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947E996D125D756D0048E783</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947E996F125D756D0048E783</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947E9971125D756D0048E783</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947E9994125D76820048E783</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947E99A0125D76BB0048E783</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>947E99FA125D7B850048E783</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9427E35512626DFB002DCA6D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9427E37B12626EE6002DCA6D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9427E3F612627C61002DCA6D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9427E3F812627C61002DCA6D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9427E3F912627C61002DCA6D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9427E44B12628333002DCA6D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9427E44C12628333002DCA6D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9427E44D12628333002DCA6D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9427E46212629AE3002DCA6D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9427E46312629AE3002DCA6D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9427E4D11262B997002DCA6D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>9427E4D21262B997002DCA6D</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>94EF43151262BFC100817F37</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>949C3A281262C1F700F4EF15</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>949C3A441262C2D200F4EF15</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>949C3AFE1262C91300F4EF15</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>949C3AFF1262C91300F4EF15</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>SplitCount</key>\n\t\t\t\t\t\t\t\t\t<string>1</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {813, 734}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>217 51 1243 977 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>734pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 739}, {813, 197}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>217 51 1243 977 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>197pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>813pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>949C3AE31262C82500F4EF15</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>949C3AE41262C82500F4EF15</string>\n\t\t\t\t<string>1CE0B20306471E060097A5F4</string>\n\t\t\t\t<string>1CE0B20506471E060097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfigUserDefaultsMinorVersion</key>\n\t\t\t<string>2</string>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.defaultV3</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>ControllerClassBaseName</key>\n\t\t\t<string></string>\n\t\t\t<key>IconName</key>\n\t\t\t<string>WindowOfProject</string>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>perspective.morph</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>1C37FBAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FAAC04509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C08E77C0454961000C914BD</string>\n\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t<string>1C37FABC05539CD112110102</string>\n\t\t\t\t\t\t\t<string>E2644B35053B69B200211256</string>\n\t\t\t\t\t\t\t<string>1C37FABC04509CD000100104</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90044410B</string>\n\t\t\t\t\t\t\t<string>1CC0EA4004350EF90041110B</string>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<string>29B97314FDCFA39411CA2CEA</string>\n\t\t\t\t\t\t\t\t<string>1C37FABC05509CD000000102</string>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t<string>{{0, 0}, {186, 337}}</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t<integer>1</integer>\n\t\t\t\t\t\t<key>XCSharingToken</key>\n\t\t\t\t\t\t<string>com.apple.Xcode.GFSharingToken</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t<string>{{0, 0}, {203, 355}}</string>\n\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t<real>186</real>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t<string>373 269 690 397 0 0 1440 878 </string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Morph</string>\n\t\t\t<key>PreferredWidth</key>\n\t\t\t<integer>300</integer>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCModuleDock</string>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t</array>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>11E0B1FE06471DED0097A5F4</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.default.shortV3</string>\n\t\t</dict>\n\t</array>\n\t<key>PerspectivesBarVisible</key>\n\t<false/>\n\t<key>ShelfIsVisible</key>\n\t<false/>\n\t<key>SourceDescription</key>\n\t<string>file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string>\n\t<key>StatusbarIsVisible</key>\n\t<true/>\n\t<key>TimeStamp</key>\n\t<real>308464073.06916898</real>\n\t<key>ToolbarDisplayMode</key>\n\t<integer>1</integer>\n\t<key>ToolbarIsVisible</key>\n\t<true/>\n\t<key>ToolbarSizeMode</key>\n\t<integer>2</integer>\n\t<key>Type</key>\n\t<string>Perspectives</string>\n\t<key>UpdateMessage</key>\n\t<string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the \"Metro-Morph\" feature).  You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature.  Do you wish to update to the latest Workspace defaults for project '%@'?</string>\n\t<key>WindowJustification</key>\n\t<integer>5</integer>\n\t<key>WindowOrderList</key>\n\t<array>\n\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t<string>9424FF6E0DDCB226009912BF</string>\n\t\t<string>/Volumes/330GB Photos/Cog/platforms/iOS/vm/SqueakPureObjcCogVM.xcodeproj</string>\n\t</array>\n\t<key>WindowString</key>\n\t<string>217 51 1243 977 0 0 1680 1028 </string>\n\t<key>WindowToolsV3</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.build</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>gcc3x-cointerp.c</string>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1332, 678}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>297 105 1332 919 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>678pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Build Results</string>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Collapse</key>\n\t\t\t\t\t\t\t\t<integer>1021</integer>\n\t\t\t\t\t\t\t\t<key>XCBuildResultsTrigger_Open</key>\n\t\t\t\t\t\t\t\t<integer>1013</integer>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 683}, {1332, 195}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>297 105 1332 919 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>195pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>878pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Build Results</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBuildResultsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>9424FF6E0DDCB226009912BF</string>\n\t\t\t\t<string>949C3AC11262C59600F4EF15</string>\n\t\t\t\t<string>1CD0528F0623707200166675</string>\n\t\t\t\t<string>XCMainBuildResultsModuleGUID</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.buildV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>297 105 1332 919 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>9424FF6E0DDCB226009912BF</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugger</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Debugger</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>HorizontalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {150, 491}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{150, 0}, {1226, 491}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>VerticalSplitView</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>_collapsingFrameDimension</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>_indexOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t<key>_percentageOfCollapsedView</key>\n\t\t\t\t\t\t\t\t\t\t<real>0.0</real>\n\t\t\t\t\t\t\t\t\t\t<key>isCollapsed</key>\n\t\t\t\t\t\t\t\t\t\t<string>yes</string>\n\t\t\t\t\t\t\t\t\t\t<key>sizes</key>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {1376, 491}}</string>\n\t\t\t\t\t\t\t\t\t\t\t<string>{{0, 491}, {1376, 436}}</string>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>LauncherConfigVersion</key>\n\t\t\t\t\t\t\t\t<string>8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debug - GLUTExamples (Underwater)</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>DebugConsoleVisible</key>\n\t\t\t\t\t\t\t\t<string>None</string>\n\t\t\t\t\t\t\t\t<key>DebugConsoleWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>DebugSTDIOWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>{{200, 200}, {500, 300}}</string>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1376, 927}}</string>\n\t\t\t\t\t\t\t\t<key>PBXDebugSessionStackFrameViewKey</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>DebugVariablesTableConfiguration</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>Name</string>\n\t\t\t\t\t\t\t\t\t\t<real>243</real>\n\t\t\t\t\t\t\t\t\t\t<string>Value</string>\n\t\t\t\t\t\t\t\t\t\t<real>245</real>\n\t\t\t\t\t\t\t\t\t\t<string>Summary</string>\n\t\t\t\t\t\t\t\t\t\t<real>713</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t<string>{{150, 0}, {1226, 491}}</string>\n\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t<string>304 60 1376 968 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>304 60 1376 968 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>927pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>927pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugSessionModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t\t<string>949C3B061262C99F00F4EF15</string>\n\t\t\t\t<string>1C162984064C10D400B95A72</string>\n\t\t\t\t<string>949C3B071262C99F00F4EF15</string>\n\t\t\t\t<string>949C3B081262C99F00F4EF15</string>\n\t\t\t\t<string>949C3B091262C99F00F4EF15</string>\n\t\t\t\t<string>949C3B0A1262C99F00F4EF15</string>\n\t\t\t\t<string>949C3B0B1262C99F00F4EF15</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>304 60 1376 968 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1CD10A99069EF8BA00B06720</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.find</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t\t\t<string>gcc3x-cointerp.c</string>\n\t\t\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {1387, 597}}</string>\n\t\t\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t\t\t<string>293 12 1387 982 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t\t\t<string>1387pt</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>597pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Project Find</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 602}, {1387, 339}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>293 12 1387 982 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>339pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>941pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Find</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXProjectFindModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t\t<string>949C3AEA1262C87A00F4EF15</string>\n\t\t\t\t<string>949C3AEB1262C87A00F4EF15</string>\n\t\t\t\t<string>1CDD528C0622207200134675</string>\n\t\t\t\t<string>1CD0528E0623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>293 12 1387 982 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C530D57069F1CE1000CFCEE</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>MENUSEPARATOR</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debuggerConsole</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Debugger Console</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1619, 787}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>61 137 1619 828 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>787pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>787pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debugger Console</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXDebugCLIModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t\t<string>9427E36F12626E8F002DCA6D</string>\n\t\t\t\t<string>1C78EAAC065D492600B07095</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.consoleV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>61 137 1619 828 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C78EAAD065D492600B07095</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.snapshots</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>945480600DE1484B00DD588F</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Snapshots</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1593, 926}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>-19 61 1593 967 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCSnapshotModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>926pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>926pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Snapshots</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCSnapshotModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>945480610DE1484B00DD588F</string>\n\t\t\t\t<string>94F7102110C332830095BDD8</string>\n\t\t\t\t<string>945480600DE1484B00DD588F</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.snapshots</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>-19 61 1593 967 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>945480610DE1484B00DD588F</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.scm</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string></string>\n\t\t\t\t\t\t\t\t<key>StatusBarVisibility</key>\n\t\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1582, 298}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>98 4 1582 1024 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>298pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXCVSModuleFilterTypeKey</key>\n\t\t\t\t\t\t\t\t<integer>1031</integer>\n\t\t\t\t\t\t\t\t<key>PBXCVSModuleTreeModuleColumnData</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXCVSModuleTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<real>1000</real>\n\t\t\t\t\t\t\t\t\t\t<real>56</real>\n\t\t\t\t\t\t\t\t\t\t<real>63</real>\n\t\t\t\t\t\t\t\t\t\t<real>60</real>\n\t\t\t\t\t\t\t\t\t\t<real>63</real>\n\t\t\t\t\t\t\t\t\t\t<real>139</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXCVSModuleTreeModuleColumnsKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>Name</string>\n\t\t\t\t\t\t\t\t\t\t<string>Status</string>\n\t\t\t\t\t\t\t\t\t\t<string>Update</string>\n\t\t\t\t\t\t\t\t\t\t<string>Revision</string>\n\t\t\t\t\t\t\t\t\t\t<string>Author</string>\n\t\t\t\t\t\t\t\t\t\t<string>Date</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>SCM Results</string>\n\t\t\t\t\t\t\t\t<key>SCMActivityViewerShowingDefaultKey</key>\n\t\t\t\t\t\t\t\t<string>{{0, 576}, {1582, 104}}</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 303}, {1582, 680}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>98 4 1582 1024 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>680pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>983pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>SCM</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXCVSModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>9488792B0E0F2F8000555242</string>\n\t\t\t\t<string>9427E4FD1262BB49002DCA6D</string>\n\t\t\t\t<string>1C78EAB2065D492600B07095</string>\n\t\t\t\t<string>1CD052920623707200166675</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.scm</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>98 4 1582 1024 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>9488792B0E0F2F8000555242</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.breakpoints</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<false/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXBottomSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Files</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectStructureProvided</key>\n\t\t\t\t\t\t\t\t<string>no</string>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnData</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<real>275</real>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>\n\t\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<string>1C77FABC04509CD000000102</string>\n\t\t\t\t\t\t\t\t\t\t<string>1C3E0DCA080725EA00A55177</string>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>\n\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t\t\t<integer>0</integer>\n\t\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t\t<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>\n\t\t\t\t\t\t\t\t\t<string>{{0, 0}, {275, 829}}</string>\n\t\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t\t<key>PBXTopSmartGroupGIDs</key>\n\t\t\t\t\t\t\t\t<array/>\n\t\t\t\t\t\t\t\t<key>XCIncludePerspectivesSwitch</key>\n\t\t\t\t\t\t\t\t<false/>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {292, 847}}</string>\n\t\t\t\t\t\t\t\t<key>GroupTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>MainColumn</string>\n\t\t\t\t\t\t\t\t\t<real>275</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>19 140 1661 888 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>292pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>BecomeActive</key>\n\t\t\t\t\t\t\t<true/>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Detail</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{297, 0}, {1364, 847}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>19 140 1661 888 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCDetailModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>1364pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>847pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>MajorVersion</key>\n\t\t\t<integer>3</integer>\n\t\t\t<key>MinorVersion</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>Name</key>\n\t\t\t<string>Breakpoints</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXSmartGroupTreeModule</string>\n\t\t\t\t<string>XCDetailModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>94CAA4DB123DC8AD00651F54</string>\n\t\t\t\t<string>94CAA4DC123DC8AD00651F54</string>\n\t\t\t\t<string>1CE0B1FE06471DED0097A5F4</string>\n\t\t\t\t<string>1CA1AED706398EBD00589147</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.breakpointsV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>19 140 1661 888 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>94CAA4DB123DC8AD00651F54</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.debugAnimator</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Debug Visualizer</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXNavigatorGroup</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>1</integer>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.debugAnimatorV3</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>100 100 700 500 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.bookmarks</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Bookmarks</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXBookmarksModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>538 42 401 187 0 0 1280 1002 </string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.projectFormatConflicts</string>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>100%</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>100%</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Project Format Conflicts</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCProjectFormatConflictsModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>WindowContentMinSize</key>\n\t\t\t<string>450 300</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>50 850 472 307 0 0 1440 877</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.classBrowser</string>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>OptionsSetName</key>\n\t\t\t\t\t\t\t\t<string>Hierarchy, project classes</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleLabel</key>\n\t\t\t\t\t\t\t\t<string>Class Browser - sqiPhoneScreenAndWindow</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>ClassesFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {464, 96}}</string>\n\t\t\t\t\t\t\t\t<key>ClassesTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXClassNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>208</real>\n\t\t\t\t\t\t\t\t\t<string>PBXClassBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {716, 601}}</string>\n\t\t\t\t\t\t\t\t<key>MembersFrame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 101}, {464, 500}}</string>\n\t\t\t\t\t\t\t\t<key>MembersTreeTableConfiguration</key>\n\t\t\t\t\t\t\t\t<array>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeIconColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberNameColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>216</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberTypeColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>187</real>\n\t\t\t\t\t\t\t\t\t<string>PBXMemberBookColumnIdentifier</string>\n\t\t\t\t\t\t\t\t\t<real>22</real>\n\t\t\t\t\t\t\t\t</array>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>831 328 716 621 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>601pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>601pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Class Browser</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>PBXClassBrowserModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<false/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t\t<string>942EF6B610C6F21E006DF917</string>\n\t\t\t\t<string>1CA6456E063B45B4001379D8</string>\n\t\t\t</array>\n\t\t\t<key>ToolbarConfiguration</key>\n\t\t\t<string>xcode.toolbar.config.classbrowser</string>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>831 328 716 621 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>1C0AD2AF069F1E9B00FABCE6</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FirstTimeWindowDisplayed</key>\n\t\t\t<false/>\n\t\t\t<key>Identifier</key>\n\t\t\t<string>windowTool.refactoring</string>\n\t\t\t<key>IncludeInToolsMenu</key>\n\t\t\t<integer>0</integer>\n\t\t\t<key>IsVertical</key>\n\t\t\t<true/>\n\t\t\t<key>Layout</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Dock</key>\n\t\t\t\t\t<array>\n\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t<key>ContentConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>PBXProjectModuleGUID</key>\n\t\t\t\t\t\t\t\t<string>949E5F260DE3F297007388E0</string>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>GeometryConfiguration</key>\n\t\t\t\t\t\t\t<dict>\n\t\t\t\t\t\t\t\t<key>Frame</key>\n\t\t\t\t\t\t\t\t<string>{{0, 0}, {1293, 860}}</string>\n\t\t\t\t\t\t\t\t<key>RubberWindowFrame</key>\n\t\t\t\t\t\t\t\t<string>268 92 1293 901 0 0 1680 1028 </string>\n\t\t\t\t\t\t\t\t<key>XCRefactoringSplitViewLowerHeight</key>\n\t\t\t\t\t\t\t\t<real>383</real>\n\t\t\t\t\t\t\t\t<key>XCRefactoringSplitViewTotalHeight</key>\n\t\t\t\t\t\t\t\t<real>777</real>\n\t\t\t\t\t\t\t</dict>\n\t\t\t\t\t\t\t<key>Module</key>\n\t\t\t\t\t\t\t<string>XCRefactoringModule</string>\n\t\t\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t\t\t<string>860pt</string>\n\t\t\t\t\t\t</dict>\n\t\t\t\t\t</array>\n\t\t\t\t\t<key>Proportion</key>\n\t\t\t\t\t<string>860pt</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t\t<key>Name</key>\n\t\t\t<string>Refactoring</string>\n\t\t\t<key>ServiceClasses</key>\n\t\t\t<array>\n\t\t\t\t<string>XCRefactoringModule</string>\n\t\t\t</array>\n\t\t\t<key>StatusbarIsVisible</key>\n\t\t\t<true/>\n\t\t\t<key>TableOfContents</key>\n\t\t\t<array>\n\t\t\t\t<string>949E5F270DE3F297007388E0</string>\n\t\t\t\t<string>9402DD2B10CE0815005C2102</string>\n\t\t\t\t<string>949E5F260DE3F297007388E0</string>\n\t\t\t</array>\n\t\t\t<key>WindowString</key>\n\t\t\t<string>268 92 1293 901 0 0 1680 1028 </string>\n\t\t\t<key>WindowToolGUID</key>\n\t\t\t<string>949E5F270DE3F297007388E0</string>\n\t\t\t<key>WindowToolIsVisible</key>\n\t\t\t<false/>\n\t\t</dict>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/SqueakPureObjcCogVM.xcodeproj/johnmci.pbxuser",
    "content": "// !$*UTF8*$!\n{\n\t1D3623240D0F684500981E51 /* SqueakNoOGLIPhoneAppDelegate.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1167, 858}}\";\n\t\t\tsepNavSelRange = \"{3089, 12}\";\n\t\t\tsepNavVisRange = \"{656, 2653}\";\n\t\t\tsepNavWindowFrame = \"{{15, 15}, {694, 1008}}\";\n\t\t};\n\t};\n\t1D3623250D0F684500981E51 /* SqueakNoOGLIPhoneAppDelegate.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {943, 3341}}\";\n\t\t\tsepNavSelRange = \"{5386, 0}\";\n\t\t\tsepNavVisRange = \"{5229, 1794}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {1426, 1019}}\";\n\t\t};\n\t};\n\t1D6058900D05DD3D006BFB54 /* SqueakNoOGLIPhone */ = {\n\t\tactiveExec = 0;\n\t\texecutables = (\n\t\t\t9424FF3E0DDC8654009912BF /* Squeak */,\n\t\t);\n\t};\n\t29B97313FDCFA39411CA2CEA /* Project object */ = {\n\t\tactiveArchitecturePreference = armv6;\n\t\tactiveBuildConfigurationName = Distribution;\n\t\tactiveExecutable = 947E62FD10AA098300D3B69E /* SqueakPureObjc */;\n\t\tactiveSDKPreference = macosx10.5;\n\t\tactiveTarget = 947E626F10AA098300D3B69E /* SqueakPureObjc */;\n\t\taddToTargets = (\n\t\t\t1D6058900D05DD3D006BFB54 /* SqueakNoOGLIPhone */,\n\t\t);\n\t\tbreakpoints = (\n\t\t\t9458511410F03996001401E7 /* sqMacExtendedClipboard.m:101 */,\n\t\t\t9458523210F040A0001401E7 /* sqMacExtendedClipboard.m:37 */,\n\t\t\t9458523410F040A1001401E7 /* sqMacExtendedClipboard.m:45 */,\n\t\t\t9458523610F040A2001401E7 /* sqMacExtendedClipboard.m:50 */,\n\t\t\t9458523A10F040AF001401E7 /* sqMacExtendedClipboard.m:72 */,\n\t\t\t9458524810F04272001401E7 /* sqMacExtendedClipboard.m:88 */,\n\t\t\t9458527F10F045FB001401E7 /* sqSqueakIPhoneClipboardAPI.m:31 */,\n\t\t\t9458528110F045FC001401E7 /* sqSqueakIPhoneClipboardAPI.m:24 */,\n\t\t\t9458528310F045FD001401E7 /* sqSqueakIPhoneClipboardAPI.m:17 */,\n\t\t\t944F6D171224D7B300DFC0CD /* sqSqueakOSXApplication+imageReadWrite.m:64 */,\n\t\t\t94E8FA6512258FDF00EECD29 /* sqMacV2Memory.c:191 */,\n\t\t\t9415C06312306B660067CD8E /* SqueakUIView.m:118 */,\n\t\t\t9415C06512306B6F0067CD8E /* SqueakUIView.m:126 */,\n\t\t\t9415C11412306FCC0067CD8E /* sqiPhoneScreenAndWindow.m:63 */,\n\t\t\t94C748E012333EE900B1F982 /* sqMacUIEventsUniversal.c:1113 */,\n\t\t\t943B9AF71235B9FD0056205E /* sqSqueakOSXNSWindowController.m:18 */,\n\t\t\t943B9B9E1235BE580056205E /* sqMacHostWindow.m:58 */,\n\t\t\t94AC16D512395FE40067037A /* sqSqueakOSXNSView.m:551 */,\n\t\t\t94C8D195123EDACE0019544B /* SqueakUIViewOpenGL.m:135 */,\n\t\t\t947E99CB125D78FB0048E783 /* NSLOG */,\n\t\t\t947E99CC125D78FE0048E783 /* NSlog */,\n\t\t\t947E99D0125D79050048E783 /* NSLog */,\n\t\t\t947E99F8125D7B1C0048E783 /* cl */,\n\t\t\t9427E42E12627E6A002DCA6D /* sqSqueakIPhoneApplication+imageReadWrite.m:95 */,\n\t\t);\n\t\tcodeSenseManager = 9424FF430DDC8673009912BF /* Code sense */;\n\t\texecutables = (\n\t\t\t9424FF3E0DDC8654009912BF /* Squeak */,\n\t\t\t947E62FD10AA098300D3B69E /* SqueakPureObjc */,\n\t\t);\n\t\texpressions = (\n\t\t\tpluginExports,\n\t\t);\n\t\tignoreBreakpointsInProjectsDict = {\n\t\t\tSqueakVMUNIXPATHS = Ignored;\n\t\t};\n\t\tperUserDictionary = {\n\t\t\t\"PBXConfiguration.PBXBreakpointsDataSource.v1:1CA1AED706398EBD00589147\" = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXBreakpointsDataSource_LocationID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t20,\n\t\t\t\t\t401,\n\t\t\t\t\t20,\n\t\t\t\t\t301,\n\t\t\t\t\t301,\n\t\t\t\t\t232,\n\t\t\t\t\t20,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXBreakpointsDataSource_ActionID,\n\t\t\t\t\tPBXBreakpointsDataSource_TypeID,\n\t\t\t\t\tPBXBreakpointsDataSource_BreakpointID,\n\t\t\t\t\tPBXBreakpointsDataSource_UseID,\n\t\t\t\t\tPBXBreakpointsDataSource_LocationID,\n\t\t\t\t\tPBXBreakpointsDataSource_ConditionID,\n\t\t\t\t\tPBXBreakpointsDataSource_IgnoreCountID,\n\t\t\t\t\tPBXBreakpointsDataSource_ContinueID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXBookmarksDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXBookmarksDataSource_NameID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t200,\n\t\t\t\t\t200,\n\t\t\t\t\t481,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXBookmarksDataSource_LocationID,\n\t\t\t\t\tPBXBookmarksDataSource_NameID,\n\t\t\t\t\tPBXBookmarksDataSource_CommentsID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXErrorsWarningsDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXErrorsWarningsDataSource_LocationID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t300,\n\t\t\t\t\t734,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXErrorsWarningsDataSource_TypeID,\n\t\t\t\t\tPBXErrorsWarningsDataSource_MessageID,\n\t\t\t\t\tPBXErrorsWarningsDataSource_LocationID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXExecutablesDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXExecutablesDataSource_NameID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t22,\n\t\t\t\t\t300,\n\t\t\t\t\t829.58349609375,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXExecutablesDataSource_ActiveFlagID,\n\t\t\t\t\tPBXExecutablesDataSource_NameID,\n\t\t\t\t\tPBXExecutablesDataSource_CommentsID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t574,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t\t20,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Target_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXFindDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFindDataSource_LocationID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t278,\n\t\t\t\t\t913,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFindDataSource_MessageID,\n\t\t\t\t\tPBXFindDataSource_LocationID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.PBXSymbolsDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXSymbolsDataSource_SymbolTypeIconID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t16,\n\t\t\t\t\t200,\n\t\t\t\t\t50,\n\t\t\t\t\t534.20849609375,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXSymbolsDataSource_SymbolTypeIconID,\n\t\t\t\t\tPBXSymbolsDataSource_SymbolNameID,\n\t\t\t\t\tPBXSymbolsDataSource_SymbolTypeID,\n\t\t\t\t\tPBXSymbolsDataSource_ReferenceNameID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXFileTableDataSource3.XCSCMDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t20,\n\t\t\t\t\t839,\n\t\t\t\t\t20,\n\t\t\t\t\t48.16259765625,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t\t20,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_SCM_ColumnID,\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Target_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {\n\t\t\t\tPBXFileTableDataSourceColumnSortingDirectionKey = \"-1\";\n\t\t\t\tPBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;\n\t\t\t\tPBXFileTableDataSourceColumnWidthsKey = (\n\t\t\t\t\t20,\n\t\t\t\t\t534,\n\t\t\t\t\t60,\n\t\t\t\t\t20,\n\t\t\t\t\t48,\n\t\t\t\t\t43,\n\t\t\t\t\t43,\n\t\t\t\t);\n\t\t\t\tPBXFileTableDataSourceColumnsKey = (\n\t\t\t\t\tPBXFileDataSource_FiletypeID,\n\t\t\t\t\tPBXFileDataSource_Filename_ColumnID,\n\t\t\t\t\tPBXTargetDataSource_PrimaryAttribute,\n\t\t\t\t\tPBXFileDataSource_Built_ColumnID,\n\t\t\t\t\tPBXFileDataSource_ObjectSize_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Errors_ColumnID,\n\t\t\t\t\tPBXFileDataSource_Warnings_ColumnID,\n\t\t\t\t);\n\t\t\t};\n\t\t\tPBXPerProjectTemplateStateSaveDate = 308462977;\n\t\t\tPBXWorkspaceStateSaveDate = 308462977;\n\t\t};\n\t\tperUserProjectItems = {\n\t\t\t940125A81228E3FC002883F0 /* PBXTextBookmark */ = 940125A81228E3FC002883F0 /* PBXTextBookmark */;\n\t\t\t9402DDB610CE12A5005C2102 /* PBXTextBookmark */ = 9402DDB610CE12A5005C2102 /* PBXTextBookmark */;\n\t\t\t94059113122AFF8C009939CE /* PBXTextBookmark */ = 94059113122AFF8C009939CE /* PBXTextBookmark */;\n\t\t\t9406B4DF11EC314E002670B7 /* PBXTextBookmark */ = 9406B4DF11EC314E002670B7 /* PBXTextBookmark */;\n\t\t\t9406E7E210B663F4002F81F2 /* PBXTextBookmark */ = 9406E7E210B663F4002F81F2 /* PBXTextBookmark */;\n\t\t\t9406E87110B66A74002F81F2 /* PBXTextBookmark */ = 9406E87110B66A74002F81F2 /* PBXTextBookmark */;\n\t\t\t9406E8CC10B67499002F81F2 /* PBXTextBookmark */ = 9406E8CC10B67499002F81F2 /* PBXTextBookmark */;\n\t\t\t940E86A31220A8D200AAB6F5 /* PBXTextBookmark */ = 940E86A31220A8D200AAB6F5 /* PBXTextBookmark */;\n\t\t\t940E86EE1220AF3D00AAB6F5 /* PBXTextBookmark */ = 940E86EE1220AF3D00AAB6F5 /* PBXTextBookmark */;\n\t\t\t941441FD10BC817D0088F8AC /* PBXTextBookmark */ = 941441FD10BC817D0088F8AC /* PBXTextBookmark */;\n\t\t\t9414420110BC817D0088F8AC /* PBXTextBookmark */ = 9414420110BC817D0088F8AC /* PBXTextBookmark */;\n\t\t\t9415C07412306BDD0067CD8E /* PBXTextBookmark */ = 9415C07412306BDD0067CD8E /* PBXTextBookmark */;\n\t\t\t941A331D11E63E1A004796BA /* PBXTextBookmark */ = 941A331D11E63E1A004796BA /* PBXTextBookmark */;\n\t\t\t941A331F11E63E1A004796BA /* PBXTextBookmark */ = 941A331F11E63E1A004796BA /* PBXTextBookmark */;\n\t\t\t9421AB550FF1807D008F54E9 /* PBXTextBookmark */ = 9421AB550FF1807D008F54E9 /* PBXTextBookmark */;\n\t\t\t94238E5E11E7B0EB004401BE /* PBXTextBookmark */ = 94238E5E11E7B0EB004401BE /* PBXTextBookmark */;\n\t\t\t9427E35512626DFB002DCA6D /* PBXTextBookmark */ = 9427E35512626DFB002DCA6D /* PBXTextBookmark */;\n\t\t\t9427E37B12626EE6002DCA6D /* PBXTextBookmark */ = 9427E37B12626EE6002DCA6D /* PBXTextBookmark */;\n\t\t\t9427E3F612627C61002DCA6D /* PBXTextBookmark */ = 9427E3F612627C61002DCA6D /* PBXTextBookmark */;\n\t\t\t9427E3F812627C61002DCA6D /* PlistBookmark */ = 9427E3F812627C61002DCA6D /* PlistBookmark */;\n\t\t\t9427E3F912627C61002DCA6D /* PlistBookmark */ = 9427E3F912627C61002DCA6D /* PlistBookmark */;\n\t\t\t9427E44B12628333002DCA6D /* PBXTextBookmark */ = 9427E44B12628333002DCA6D /* PBXTextBookmark */;\n\t\t\t9427E44C12628333002DCA6D /* PBXTextBookmark */ = 9427E44C12628333002DCA6D /* PBXTextBookmark */;\n\t\t\t9427E44D12628333002DCA6D /* PlistBookmark */ = 9427E44D12628333002DCA6D /* PlistBookmark */;\n\t\t\t9427E46212629AE3002DCA6D /* PBXBookmark */ = 9427E46212629AE3002DCA6D /* PBXBookmark */;\n\t\t\t9427E46312629AE3002DCA6D /* PlistBookmark */ = 9427E46312629AE3002DCA6D /* PlistBookmark */;\n\t\t\t9427E4D11262B997002DCA6D /* PBXTextBookmark */ = 9427E4D11262B997002DCA6D /* PBXTextBookmark */;\n\t\t\t9427E4D21262B997002DCA6D /* PBXTextBookmark */ = 9427E4D21262B997002DCA6D /* PBXTextBookmark */;\n\t\t\t942807EE1224862A0000DCFE /* PBXTextBookmark */ = 942807EE1224862A0000DCFE /* PBXTextBookmark */;\n\t\t\t942807EF1224862A0000DCFE /* PBXTextBookmark */ = 942807EF1224862A0000DCFE /* PBXTextBookmark */;\n\t\t\t942807F01224862A0000DCFE /* PBXTextBookmark */ = 942807F01224862A0000DCFE /* PBXTextBookmark */;\n\t\t\t9428BBAD10BB50E200DAD287 /* PBXTextBookmark */ = 9428BBAD10BB50E200DAD287 /* PBXTextBookmark */;\n\t\t\t9428BC5510BB74BF00DAD287 /* PBXTextBookmark */ = 9428BC5510BB74BF00DAD287 /* PBXTextBookmark */;\n\t\t\t9428BC5710BB74BF00DAD287 /* PBXTextBookmark */ = 9428BC5710BB74BF00DAD287 /* PBXTextBookmark */;\n\t\t\t9428BF3810BBC2ED00DAD287 /* PBXTextBookmark */ = 9428BF3810BBC2ED00DAD287 /* PBXTextBookmark */;\n\t\t\t9428BF4F10BBCAAC00DAD287 /* PBXTextBookmark */ = 9428BF4F10BBCAAC00DAD287 /* PBXTextBookmark */;\n\t\t\t942ABEC510AA34820086D908 /* PBXTextBookmark */ = 942ABEC510AA34820086D908 /* PBXTextBookmark */;\n\t\t\t942B77330EA7E642004B266D /* PBXTextBookmark */ = 942B77330EA7E642004B266D /* PBXTextBookmark */;\n\t\t\t942B77380EA7E642004B266D /* PBXTextBookmark */ = 942B77380EA7E642004B266D /* PBXTextBookmark */;\n\t\t\t942B779B0EA7F2E0004B266D /* PBXTextBookmark */ = 942B779B0EA7F2E0004B266D /* PBXTextBookmark */;\n\t\t\t942B779C0EA7F2E0004B266D /* PBXTextBookmark */ = 942B779C0EA7F2E0004B266D /* PBXTextBookmark */;\n\t\t\t942B77B90EA800E1004B266D /* PBXTextBookmark */ = 942B77B90EA800E1004B266D /* PBXTextBookmark */;\n\t\t\t942B77BB0EA800E1004B266D /* PBXTextBookmark */ = 942B77BB0EA800E1004B266D /* PBXTextBookmark */;\n\t\t\t942B77C00EA800E1004B266D /* PBXTextBookmark */ = 942B77C00EA800E1004B266D /* PBXTextBookmark */;\n\t\t\t9430325510BD0B6D0045D33B /* PBXTextBookmark */ = 9430325510BD0B6D0045D33B /* PBXTextBookmark */;\n\t\t\t9430329A10BD103B0045D33B /* PBXTextBookmark */ = 9430329A10BD103B0045D33B /* PBXTextBookmark */;\n\t\t\t9430329B10BD103B0045D33B /* PBXTextBookmark */ = 9430329B10BD103B0045D33B /* PBXTextBookmark */;\n\t\t\t943B9B151235BB080056205E /* PBXTextBookmark */ = 943B9B151235BB080056205E /* PBXTextBookmark */;\n\t\t\t943B9B1E1235BD150056205E /* PBXTextBookmark */ = 943B9B1E1235BD150056205E /* PBXTextBookmark */;\n\t\t\t943B9BD31235C1120056205E /* PBXTextBookmark */ = 943B9BD31235C1120056205E /* PBXTextBookmark */;\n\t\t\t943B9BD41235C1120056205E /* PBXTextBookmark */ = 943B9BD41235C1120056205E /* PBXTextBookmark */;\n\t\t\t943B9C041235C1EE0056205E /* PBXTextBookmark */ = 943B9C041235C1EE0056205E /* PBXTextBookmark */;\n\t\t\t943B9C311235C3D70056205E /* PBXTextBookmark */ = 943B9C311235C3D70056205E /* PBXTextBookmark */;\n\t\t\t943B9C331235C3D70056205E /* PBXTextBookmark */ = 943B9C331235C3D70056205E /* PBXTextBookmark */;\n\t\t\t943B9D621235C79C0056205E /* PBXTextBookmark */ = 943B9D621235C79C0056205E /* PBXTextBookmark */;\n\t\t\t943C0AC7122DF3710086B6AD /* PBXTextBookmark */ = 943C0AC7122DF3710086B6AD /* PBXTextBookmark */;\n\t\t\t943C0AC8122DF3710086B6AD /* PBXTextBookmark */ = 943C0AC8122DF3710086B6AD /* PBXTextBookmark */;\n\t\t\t943C0ACA122DF3710086B6AD /* PBXTextBookmark */ = 943C0ACA122DF3710086B6AD /* PBXTextBookmark */;\n\t\t\t943C0AE0122DF5E70086B6AD /* PBXTextBookmark */ = 943C0AE0122DF5E70086B6AD /* PBXTextBookmark */;\n\t\t\t943C0AE2122DF5E70086B6AD /* PBXTextBookmark */ = 943C0AE2122DF5E70086B6AD /* PBXTextBookmark */;\n\t\t\t943C0AE5122DF5E70086B6AD /* PBXTextBookmark */ = 943C0AE5122DF5E70086B6AD /* PBXTextBookmark */;\n\t\t\t943C0AE7122DF5E70086B6AD /* PBXTextBookmark */ = 943C0AE7122DF5E70086B6AD /* PBXTextBookmark */;\n\t\t\t9441DB7111E6805300345F6C /* PBXTextBookmark */ = 9441DB7111E6805300345F6C /* PBXTextBookmark */;\n\t\t\t9441DB7211E6805300345F6C /* PBXTextBookmark */ = 9441DB7211E6805300345F6C /* PBXTextBookmark */;\n\t\t\t9448940B10F3E8FF00FB3EC8 /* PBXTextBookmark */ = 9448940B10F3E8FF00FB3EC8 /* PBXTextBookmark */;\n\t\t\t9451E64F123F0E9200B4119F /* PlistBookmark */ = 9451E64F123F0E9200B4119F /* PlistBookmark */;\n\t\t\t9453F58A1234AF8A00C91CF7 /* PBXTextBookmark */ = 9453F58A1234AF8A00C91CF7 /* PBXTextBookmark */;\n\t\t\t9453F58C1234AF8A00C91CF7 /* PBXTextBookmark */ = 9453F58C1234AF8A00C91CF7 /* PBXTextBookmark */;\n\t\t\t9453F58D1234AF8A00C91CF7 /* PBXTextBookmark */ = 9453F58D1234AF8A00C91CF7 /* PBXTextBookmark */;\n\t\t\t9453F5911234AF8A00C91CF7 /* PBXTextBookmark */ = 9453F5911234AF8A00C91CF7 /* PBXTextBookmark */;\n\t\t\t9453F5931234AF8A00C91CF7 /* PBXTextBookmark */ = 9453F5931234AF8A00C91CF7 /* PBXTextBookmark */;\n\t\t\t9453F5951234AF8A00C91CF7 /* PBXTextBookmark */ = 9453F5951234AF8A00C91CF7 /* PBXTextBookmark */;\n\t\t\t94547F160DE0AC7D00DD588F /* PBXTextBookmark */ = 94547F160DE0AC7D00DD588F /* PBXTextBookmark */;\n\t\t\t945481A60DE2A79200DD588F /* PBXTextBookmark */ = 945481A60DE2A79200DD588F /* PBXTextBookmark */;\n\t\t\t94554E670DF1171500FB176B /* PBXTextBookmark */ = 94554E670DF1171500FB176B /* PBXTextBookmark */;\n\t\t\t94554E690DF1171500FB176B /* PBXTextBookmark */ = 94554E690DF1171500FB176B /* PBXTextBookmark */;\n\t\t\t94554EB80DF1A86A00FB176B /* PBXTextBookmark */ = 94554EB80DF1A86A00FB176B /* PBXTextBookmark */;\n\t\t\t9456C24F10B2F268000BF3DE /* PBXTextBookmark */ = 9456C24F10B2F268000BF3DE /* PBXTextBookmark */;\n\t\t\t9456C25A10B2F2C9000BF3DE /* PBXTextBookmark */ = 9456C25A10B2F2C9000BF3DE /* PBXTextBookmark */;\n\t\t\t9456C32210B32F43000BF3DE /* PBXTextBookmark */ = 9456C32210B32F43000BF3DE /* PBXTextBookmark */;\n\t\t\t9456C34E10B33618000BF3DE /* PBXTextBookmark */ = 9456C34E10B33618000BF3DE /* PBXTextBookmark */;\n\t\t\t9456C3CB10B341F9000BF3DE /* PBXTextBookmark */ = 9456C3CB10B341F9000BF3DE /* PBXTextBookmark */;\n\t\t\t945C4D7C10BB0A8500548CC1 /* PBXTextBookmark */ = 945C4D7C10BB0A8500548CC1 /* PBXTextBookmark */;\n\t\t\t945C4EAC10BB348300548CC1 /* PBXTextBookmark */ = 945C4EAC10BB348300548CC1 /* PBXTextBookmark */;\n\t\t\t945E9D7C0DE525E100CDF01E /* PBXTextBookmark */ = 945E9D7C0DE525E100CDF01E /* PBXTextBookmark */;\n\t\t\t945F30FC0E0C763800CFF3DC /* PBXTextBookmark */ = 945F30FC0E0C763800CFF3DC /* PBXTextBookmark */;\n\t\t\t94638CEA0EB16F1100A3F155 /* PBXTextBookmark */ = 94638CEA0EB16F1100A3F155 /* PBXTextBookmark */;\n\t\t\t946C240C1230A80A004938A1 /* PBXTextBookmark */ = 946C240C1230A80A004938A1 /* PBXTextBookmark */;\n\t\t\t946D973B0FE165B70038846B /* PBXTextBookmark */ = 946D973B0FE165B70038846B /* PBXTextBookmark */;\n\t\t\t946DA7E010C0A7A400F26F56 /* PBXTextBookmark */ = 946DA7E010C0A7A400F26F56 /* PBXTextBookmark */;\n\t\t\t946DA8D910C0C32800F26F56 /* PBXTextBookmark */ = 946DA8D910C0C32800F26F56 /* PBXTextBookmark */;\n\t\t\t946DA8DA10C0C32800F26F56 /* PBXTextBookmark */ = 946DA8DA10C0C32800F26F56 /* PBXTextBookmark */;\n\t\t\t946DA8DB10C0C32800F26F56 /* PBXTextBookmark */ = 946DA8DB10C0C32800F26F56 /* PBXTextBookmark */;\n\t\t\t946DAA3810C0D8B700F26F56 /* PBXTextBookmark */ = 946DAA3810C0D8B700F26F56 /* PBXTextBookmark */;\n\t\t\t946DAA3A10C0D8B700F26F56 /* PBXTextBookmark */ = 946DAA3A10C0D8B700F26F56 /* PBXTextBookmark */;\n\t\t\t946DAA3C10C0D8B700F26F56 /* PBXTextBookmark */ = 946DAA3C10C0D8B700F26F56 /* PBXTextBookmark */;\n\t\t\t94700A50123DF62D00874318 /* PBXTextBookmark */ = 94700A50123DF62D00874318 /* PBXTextBookmark */;\n\t\t\t94700A51123DF62D00874318 /* PBXTextBookmark */ = 94700A51123DF62D00874318 /* PBXTextBookmark */;\n\t\t\t94700AAD123DFCEA00874318 /* PBXTextBookmark */ = 94700AAD123DFCEA00874318 /* PBXTextBookmark */;\n\t\t\t947332EE0EA70E8C003F9084 /* PBXTextBookmark */ = 947332EE0EA70E8C003F9084 /* PBXTextBookmark */;\n\t\t\t9473A34810BBD84100ED7D00 /* PBXTextBookmark */ = 9473A34810BBD84100ED7D00 /* PBXTextBookmark */;\n\t\t\t9473A95A1102F70B00D135CB /* PBXTextBookmark */ = 9473A95A1102F70B00D135CB /* PBXTextBookmark */;\n\t\t\t9473A9701103BE0A00D135CB /* PBXTextBookmark */ = 9473A9701103BE0A00D135CB /* PBXTextBookmark */;\n\t\t\t9475A83511E6B5D50010FB38 /* PBXTextBookmark */ = 9475A83511E6B5D50010FB38 /* PBXTextBookmark */;\n\t\t\t9475F4DB10BEF4100047A24B /* PBXTextBookmark */ = 9475F4DB10BEF4100047A24B /* PBXTextBookmark */;\n\t\t\t9475F56B10BF20A00047A24B /* PBXTextBookmark */ = 9475F56B10BF20A00047A24B /* PBXTextBookmark */;\n\t\t\t9475F5A710BF25A10047A24B /* PBXTextBookmark */ = 9475F5A710BF25A10047A24B /* PBXTextBookmark */;\n\t\t\t947713D410C45E5F00890A9B /* PBXTextBookmark */ = 947713D410C45E5F00890A9B /* PBXTextBookmark */;\n\t\t\t9478E13D0EC8EB46007096A7 /* PBXTextBookmark */ = 9478E13D0EC8EB46007096A7 /* PBXTextBookmark */;\n\t\t\t947923FE1102BE53007C87F8 /* PBXTextBookmark */ = 947923FE1102BE53007C87F8 /* PBXTextBookmark */;\n\t\t\t947E210C0EB28486007957D0 /* PBXTextBookmark */ = 947E210C0EB28486007957D0 /* PBXTextBookmark */;\n\t\t\t947E61D610AA049300D3B69E /* PBXTextBookmark */ = 947E61D610AA049300D3B69E /* PBXTextBookmark */;\n\t\t\t947E61DA10AA049300D3B69E /* PBXTextBookmark */ = 947E61DA10AA049300D3B69E /* PBXTextBookmark */;\n\t\t\t947E61DC10AA049300D3B69E /* PBXTextBookmark */ = 947E61DC10AA049300D3B69E /* PBXTextBookmark */;\n\t\t\t947E9920125D73FD0048E783 /* PBXTextBookmark */ = 947E9920125D73FD0048E783 /* PBXTextBookmark */;\n\t\t\t947E9964125D756D0048E783 /* PBXTextBookmark */ = 947E9964125D756D0048E783 /* PBXTextBookmark */;\n\t\t\t947E9967125D756D0048E783 /* PBXTextBookmark */ = 947E9967125D756D0048E783 /* PBXTextBookmark */;\n\t\t\t947E9969125D756D0048E783 /* PBXTextBookmark */ = 947E9969125D756D0048E783 /* PBXTextBookmark */;\n\t\t\t947E996B125D756D0048E783 /* PBXTextBookmark */ = 947E996B125D756D0048E783 /* PBXTextBookmark */;\n\t\t\t947E996D125D756D0048E783 /* PBXTextBookmark */ = 947E996D125D756D0048E783 /* PBXTextBookmark */;\n\t\t\t947E996F125D756D0048E783 /* PBXTextBookmark */ = 947E996F125D756D0048E783 /* PBXTextBookmark */;\n\t\t\t947E9971125D756D0048E783 /* PBXTextBookmark */ = 947E9971125D756D0048E783 /* PBXTextBookmark */;\n\t\t\t947E9994125D76820048E783 /* PBXTextBookmark */ = 947E9994125D76820048E783 /* PBXTextBookmark */;\n\t\t\t947E99A0125D76BB0048E783 /* PBXTextBookmark */ = 947E99A0125D76BB0048E783 /* PBXTextBookmark */;\n\t\t\t947E99FA125D7B850048E783 /* PBXTextBookmark */ = 947E99FA125D7B850048E783 /* PBXTextBookmark */;\n\t\t\t948034A9122A264A00C42504 /* PBXTextBookmark */ = 948034A9122A264A00C42504 /* PBXTextBookmark */;\n\t\t\t948127E812444F7800BD1543 /* PBXTextBookmark */ = 948127E812444F7800BD1543 /* PBXTextBookmark */;\n\t\t\t948127E912444F7800BD1543 /* PBXTextBookmark */ = 948127E912444F7800BD1543 /* PBXTextBookmark */;\n\t\t\t948127EA12444F7800BD1543 /* PBXTextBookmark */ = 948127EA12444F7800BD1543 /* PBXTextBookmark */;\n\t\t\t948127EB12444F7800BD1543 /* PBXTextBookmark */ = 948127EB12444F7800BD1543 /* PBXTextBookmark */;\n\t\t\t9484F86210B0DCC60038BDC0 /* PBXTextBookmark */ = 9484F86210B0DCC60038BDC0 /* PBXTextBookmark */;\n\t\t\t9484F86510B0DCC60038BDC0 /* PBXTextBookmark */ = 9484F86510B0DCC60038BDC0 /* PBXTextBookmark */;\n\t\t\t9484F8FC10B0E1770038BDC0 /* PBXBookmark */ = 9484F8FC10B0E1770038BDC0 /* PBXBookmark */;\n\t\t\t94862F8310BA182500CAA2EB /* PBXTextBookmark */ = 94862F8310BA182500CAA2EB /* PBXTextBookmark */;\n\t\t\t94862F9E10BA1A0100CAA2EB /* PBXTextBookmark */ = 94862F9E10BA1A0100CAA2EB /* PBXTextBookmark */;\n\t\t\t9486302A10BA247200CAA2EB /* PBXTextBookmark */ = 9486302A10BA247200CAA2EB /* PBXTextBookmark */;\n\t\t\t948704AE0E12CABF00D565C3 /* PBXTextBookmark */ = 948704AE0E12CABF00D565C3 /* PBXTextBookmark */;\n\t\t\t9487071F0E132B1000D565C3 /* PBXTextBookmark */ = 9487071F0E132B1000D565C3 /* PBXTextBookmark */;\n\t\t\t948C0820112DE98D0017EE7F /* PBXTextBookmark */ = 948C0820112DE98D0017EE7F /* PBXTextBookmark */;\n\t\t\t948FAA0310BF855500BE88CF /* PBXTextBookmark */ = 948FAA0310BF855500BE88CF /* PBXTextBookmark */;\n\t\t\t948FAB5B10BFAD3C00BE88CF /* PBXTextBookmark */ = 948FAB5B10BFAD3C00BE88CF /* PBXTextBookmark */;\n\t\t\t949198B010BC8DFC00C629D1 /* PBXTextBookmark */ = 949198B010BC8DFC00C629D1 /* PBXTextBookmark */;\n\t\t\t949198C910BC8FBB00C629D1 /* PBXTextBookmark */ = 949198C910BC8FBB00C629D1 /* PBXTextBookmark */;\n\t\t\t9492450510BA42EF00E726F5 /* PBXTextBookmark */ = 9492450510BA42EF00E726F5 /* PBXTextBookmark */;\n\t\t\t9492450710BA42EF00E726F5 /* PBXTextBookmark */ = 9492450710BA42EF00E726F5 /* PBXTextBookmark */;\n\t\t\t9492450910BA42EF00E726F5 /* PBXTextBookmark */ = 9492450910BA42EF00E726F5 /* PBXTextBookmark */;\n\t\t\t949245B210BA4A6200E726F5 /* PBXTextBookmark */ = 949245B210BA4A6200E726F5 /* PBXTextBookmark */;\n\t\t\t9493E98F10EE90BC000C4FB3 /* PBXTextBookmark */ = 9493E98F10EE90BC000C4FB3 /* PBXTextBookmark */;\n\t\t\t94977E7C11EE46BC002BC5E9 /* PBXTextBookmark */ = 94977E7C11EE46BC002BC5E9 /* PBXTextBookmark */;\n\t\t\t949AD35211E54A81006D6BF4 /* PBXTextBookmark */ = 949AD35211E54A81006D6BF4 /* PBXTextBookmark */;\n\t\t\t949AD36211E54AAA006D6BF4 /* PBXTextBookmark */ = 949AD36211E54AAA006D6BF4 /* PBXTextBookmark */;\n\t\t\t949C3A281262C1F700F4EF15 /* PBXTextBookmark */ = 949C3A281262C1F700F4EF15 /* PBXTextBookmark */;\n\t\t\t949C3A441262C2D200F4EF15 /* PBXTextBookmark */ = 949C3A441262C2D200F4EF15 /* PBXTextBookmark */;\n\t\t\t949C3AFE1262C91300F4EF15 /* PBXTextBookmark */ = 949C3AFE1262C91300F4EF15 /* PBXTextBookmark */;\n\t\t\t949C3AFF1262C91300F4EF15 /* PBXTextBookmark */ = 949C3AFF1262C91300F4EF15 /* PBXTextBookmark */;\n\t\t\t949C3B171262C9C900F4EF15 /* PBXTextBookmark */ = 949C3B171262C9C900F4EF15 /* PBXTextBookmark */;\n\t\t\t949DDD6D11D141080017F79B /* PBXTextBookmark */ = 949DDD6D11D141080017F79B /* PBXTextBookmark */;\n\t\t\t949F254511EC33FA00A34245 /* PBXTextBookmark */ = 949F254511EC33FA00A34245 /* PBXTextBookmark */;\n\t\t\t949F254611EC33FA00A34245 /* PBXTextBookmark */ = 949F254611EC33FA00A34245 /* PBXTextBookmark */;\n\t\t\t949F254811EC33FA00A34245 /* PBXTextBookmark */ = 949F254811EC33FA00A34245 /* PBXTextBookmark */;\n\t\t\t94A1B2AA10B9E92A00C64473 /* PBXTextBookmark */ = 94A1B2AA10B9E92A00C64473 /* PBXTextBookmark */;\n\t\t\t94A1B41E10BA05E600C64473 /* PBXTextBookmark */ = 94A1B41E10BA05E600C64473 /* PBXTextBookmark */;\n\t\t\t94AB2E6A0E003879006A79E4 /* PBXTextBookmark */ = 94AB2E6A0E003879006A79E4 /* PBXTextBookmark */;\n\t\t\t94AB2E6C0E003879006A79E4 /* PBXTextBookmark */ = 94AB2E6C0E003879006A79E4 /* PBXTextBookmark */;\n\t\t\t94AC16D912395FF10067037A /* PBXTextBookmark */ = 94AC16D912395FF10067037A /* PBXTextBookmark */;\n\t\t\t94AC16DA12395FF10067037A /* PBXTextBookmark */ = 94AC16DA12395FF10067037A /* PBXTextBookmark */;\n\t\t\t94AC16DC12395FF10067037A /* PBXTextBookmark */ = 94AC16DC12395FF10067037A /* PBXTextBookmark */;\n\t\t\t94AC16DE12395FF10067037A /* PBXTextBookmark */ = 94AC16DE12395FF10067037A /* PBXTextBookmark */;\n\t\t\t94AF3A1F12231A7200691409 /* PBXTextBookmark */ = 94AF3A1F12231A7200691409 /* PBXTextBookmark */;\n\t\t\t94B1514E0DE2CE530059F208 /* PBXTextBookmark */ = 94B1514E0DE2CE530059F208 /* PBXTextBookmark */;\n\t\t\t94B7898910C4F95E005EA70D /* PBXTextBookmark */ = 94B7898910C4F95E005EA70D /* PBXTextBookmark */;\n\t\t\t94B88C560E81500200C98131 /* PBXTextBookmark */ = 94B88C560E81500200C98131 /* PBXTextBookmark */;\n\t\t\t94BCAD4A10AB981B00F87527 /* PBXTextBookmark */ = 94BCAD4A10AB981B00F87527 /* PBXTextBookmark */;\n\t\t\t94BCAE9010ACA3A300F87527 /* PBXTextBookmark */ = 94BCAE9010ACA3A300F87527 /* PBXTextBookmark */;\n\t\t\t94BCAFC710ACC89100F87527 /* PBXTextBookmark */ = 94BCAFC710ACC89100F87527 /* PBXTextBookmark */;\n\t\t\t94BE8B9C123DA0C900C89FDD /* PBXTextBookmark */ = 94BE8B9C123DA0C900C89FDD /* PBXTextBookmark */;\n\t\t\t94BE8BAD123DA0EB00C89FDD /* PBXTextBookmark */ = 94BE8BAD123DA0EB00C89FDD /* PBXTextBookmark */;\n\t\t\t94BE8BD5123DA32300C89FDD /* PBXTextBookmark */ = 94BE8BD5123DA32300C89FDD /* PBXTextBookmark */;\n\t\t\t94BE8BF5123DA42700C89FDD /* PBXTextBookmark */ = 94BE8BF5123DA42700C89FDD /* PBXTextBookmark */;\n\t\t\t94C16B42123D72AE00A8622A /* PBXTextBookmark */ = 94C16B42123D72AE00A8622A /* PBXTextBookmark */;\n\t\t\t94C16B43123D72AE00A8622A /* PBXTextBookmark */ = 94C16B43123D72AE00A8622A /* PBXTextBookmark */;\n\t\t\t94C16B5A123D735F00A8622A /* PBXTextBookmark */ = 94C16B5A123D735F00A8622A /* PBXTextBookmark */;\n\t\t\t94C2074310AF5FB7002F4160 /* PBXTextBookmark */ = 94C2074310AF5FB7002F4160 /* PBXTextBookmark */;\n\t\t\t94C2091210AF7413002F4160 /* PBXTextBookmark */ = 94C2091210AF7413002F4160 /* PBXTextBookmark */;\n\t\t\t94C2092A10AF769A002F4160 /* PBXTextBookmark */ = 94C2092A10AF769A002F4160 /* PBXTextBookmark */;\n\t\t\t94C2092D10AF769A002F4160 /* PBXTextBookmark */ = 94C2092D10AF769A002F4160 /* PBXTextBookmark */;\n\t\t\t94C367C010AF9C0A0041953A /* PBXTextBookmark */ = 94C367C010AF9C0A0041953A /* PBXTextBookmark */;\n\t\t\t94C367C210AF9C0A0041953A /* PBXTextBookmark */ = 94C367C210AF9C0A0041953A /* PBXTextBookmark */;\n\t\t\t94C367D110AF9C830041953A /* PBXTextBookmark */ = 94C367D110AF9C830041953A /* PBXTextBookmark */;\n\t\t\t94C3696410AFB7550041953A /* PBXTextBookmark */ = 94C3696410AFB7550041953A /* PBXTextBookmark */;\n\t\t\t94C3698D10B082DF0041953A /* PBXTextBookmark */ = 94C3698D10B082DF0041953A /* PBXTextBookmark */;\n\t\t\t94C3699110B082DF0041953A /* PBXTextBookmark */ = 94C3699110B082DF0041953A /* PBXTextBookmark */;\n\t\t\t94C3CD4E1235C80200A4E319 /* PBXTextBookmark */ = 94C3CD4E1235C80200A4E319 /* PBXTextBookmark */;\n\t\t\t94C7480712333A2900B1F982 /* PBXTextBookmark */ = 94C7480712333A2900B1F982 /* PBXTextBookmark */;\n\t\t\t94C887D410ADCC0D007CB39E /* PBXTextBookmark */ = 94C887D410ADCC0D007CB39E /* PBXTextBookmark */;\n\t\t\t94C888B710ADE75B007CB39E /* PBXTextBookmark */ = 94C888B710ADE75B007CB39E /* PBXTextBookmark */;\n\t\t\t94C88B6810AF26F8007CB39E /* PBXTextBookmark */ = 94C88B6810AF26F8007CB39E /* PBXTextBookmark */;\n\t\t\t94C8D197123EDAD30019544B /* PBXTextBookmark */ = 94C8D197123EDAD30019544B /* PBXTextBookmark */;\n\t\t\t94C8D19A123EDAD30019544B /* PBXTextBookmark */ = 94C8D19A123EDAD30019544B /* PBXTextBookmark */;\n\t\t\t94C8D19B123EDAD30019544B /* PBXTextBookmark */ = 94C8D19B123EDAD30019544B /* PBXTextBookmark */;\n\t\t\t94C8D19C123EDAD30019544B /* PBXTextBookmark */ = 94C8D19C123EDAD30019544B /* PBXTextBookmark */;\n\t\t\t94CAE0ED1230DE6C00AFE487 /* PBXTextBookmark */ = 94CAE0ED1230DE6C00AFE487 /* PBXTextBookmark */;\n\t\t\t94CFE6A910BE63A900847DF5 /* PBXTextBookmark */ = 94CFE6A910BE63A900847DF5 /* PBXTextBookmark */;\n\t\t\t94CFE6B810BE63A900847DF5 /* PBXTextBookmark */ = 94CFE6B810BE63A900847DF5 /* PBXTextBookmark */;\n\t\t\t94CFE6B910BE63A900847DF5 /* PBXTextBookmark */ = 94CFE6B910BE63A900847DF5 /* PBXTextBookmark */;\n\t\t\t94CFE6C010BE63A900847DF5 /* PBXTextBookmark */ = 94CFE6C010BE63A900847DF5 /* PBXTextBookmark */;\n\t\t\t94CFE70110BE683800847DF5 /* PBXTextBookmark */ = 94CFE70110BE683800847DF5 /* PBXTextBookmark */;\n\t\t\t94D16BFC10BCEFEE00A69A89 /* PBXTextBookmark */ = 94D16BFC10BCEFEE00A69A89 /* PBXTextBookmark */;\n\t\t\t94D16BFE10BCEFEE00A69A89 /* PBXTextBookmark */ = 94D16BFE10BCEFEE00A69A89 /* PBXTextBookmark */;\n\t\t\t94D16C2A10BCF28A00A69A89 /* PBXTextBookmark */ = 94D16C2A10BCF28A00A69A89 /* PBXTextBookmark */;\n\t\t\t94D16C4010BCF3E100A69A89 /* PBXTextBookmark */ = 94D16C4010BCF3E100A69A89 /* PBXTextBookmark */;\n\t\t\t94D16CA310BCF93000A69A89 /* PBXTextBookmark */ = 94D16CA310BCF93000A69A89 /* PBXTextBookmark */;\n\t\t\t94D3660B10CEE03900805023 /* PBXTextBookmark */ = 94D3660B10CEE03900805023 /* PBXTextBookmark */;\n\t\t\t94D715CB10B723B200F69A71 /* PBXTextBookmark */ = 94D715CB10B723B200F69A71 /* PBXTextBookmark */;\n\t\t\t94D7174110B72FDF00F69A71 /* PBXTextBookmark */ = 94D7174110B72FDF00F69A71 /* PBXTextBookmark */;\n\t\t\t94D7177D10B73A3800F69A71 /* PBXTextBookmark */ = 94D7177D10B73A3800F69A71 /* PBXTextBookmark */;\n\t\t\t94D7178410B73A3800F69A71 /* PBXTextBookmark */ = 94D7178410B73A3800F69A71 /* PBXTextBookmark */;\n\t\t\t94D7178610B73A3800F69A71 /* PBXTextBookmark */ = 94D7178610B73A3800F69A71 /* PBXTextBookmark */;\n\t\t\t94D7178810B73A3800F69A71 /* PBXTextBookmark */ = 94D7178810B73A3800F69A71 /* PBXTextBookmark */;\n\t\t\t94D7178A10B73A3800F69A71 /* PBXTextBookmark */ = 94D7178A10B73A3800F69A71 /* PBXTextBookmark */;\n\t\t\t94D7178C10B73A3800F69A71 /* PBXTextBookmark */ = 94D7178C10B73A3800F69A71 /* PBXTextBookmark */;\n\t\t\t94D7179110B73A3800F69A71 /* PBXTextBookmark */ = 94D7179110B73A3800F69A71 /* PBXTextBookmark */;\n\t\t\t94D717BE10B73DD900F69A71 /* PBXTextBookmark */ = 94D717BE10B73DD900F69A71 /* PBXTextBookmark */;\n\t\t\t94D717F810B743B800F69A71 /* PBXTextBookmark */ = 94D717F810B743B800F69A71 /* PBXTextBookmark */;\n\t\t\t94D7183810B74BF300F69A71 /* PBXTextBookmark */ = 94D7183810B74BF300F69A71 /* PBXTextBookmark */;\n\t\t\t94D7183A10B74BF300F69A71 /* PBXTextBookmark */ = 94D7183A10B74BF300F69A71 /* PBXTextBookmark */;\n\t\t\t94D73E5210B5B9CE00F8C034 /* PBXTextBookmark */ = 94D73E5210B5B9CE00F8C034 /* PBXTextBookmark */;\n\t\t\t94D73E5410B5B9CE00F8C034 /* PBXTextBookmark */ = 94D73E5410B5B9CE00F8C034 /* PBXTextBookmark */;\n\t\t\t94D73E5610B5B9CE00F8C034 /* PBXTextBookmark */ = 94D73E5610B5B9CE00F8C034 /* PBXTextBookmark */;\n\t\t\t94D73E5810B5B9CE00F8C034 /* PBXTextBookmark */ = 94D73E5810B5B9CE00F8C034 /* PBXTextBookmark */;\n\t\t\t94D73E5A10B5B9CE00F8C034 /* PBXTextBookmark */ = 94D73E5A10B5B9CE00F8C034 /* PBXTextBookmark */;\n\t\t\t94D73E5C10B5B9CE00F8C034 /* PBXTextBookmark */ = 94D73E5C10B5B9CE00F8C034 /* PBXTextBookmark */;\n\t\t\t94D73E5E10B5B9CE00F8C034 /* PBXTextBookmark */ = 94D73E5E10B5B9CE00F8C034 /* PBXTextBookmark */;\n\t\t\t94D73E6010B5B9CE00F8C034 /* PBXTextBookmark */ = 94D73E6010B5B9CE00F8C034 /* PBXTextBookmark */;\n\t\t\t94D73E6210B5B9CE00F8C034 /* PBXTextBookmark */ = 94D73E6210B5B9CE00F8C034 /* PBXTextBookmark */;\n\t\t\t94D73E6410B5B9CE00F8C034 /* PBXTextBookmark */ = 94D73E6410B5B9CE00F8C034 /* PBXTextBookmark */;\n\t\t\t94D73E6810B5B9CE00F8C034 /* PBXTextBookmark */ = 94D73E6810B5B9CE00F8C034 /* PBXTextBookmark */;\n\t\t\t94D73E6A10B5B9CE00F8C034 /* PBXTextBookmark */ = 94D73E6A10B5B9CE00F8C034 /* PBXTextBookmark */;\n\t\t\t94D73EE610B5CF8400F8C034 /* PBXTextBookmark */ = 94D73EE610B5CF8400F8C034 /* PBXTextBookmark */;\n\t\t\t94D73F4910B5DA4E00F8C034 /* PBXTextBookmark */ = 94D73F4910B5DA4E00F8C034 /* PBXTextBookmark */;\n\t\t\t94D73FA010B5E5A200F8C034 /* PBXTextBookmark */ = 94D73FA010B5E5A200F8C034 /* PBXTextBookmark */;\n\t\t\t94D73FAD10B5E69900F8C034 /* PBXTextBookmark */ = 94D73FAD10B5E69900F8C034 /* PBXTextBookmark */;\n\t\t\t94D73FB510B5E6DA00F8C034 /* PBXTextBookmark */ = 94D73FB510B5E6DA00F8C034 /* PBXTextBookmark */;\n\t\t\t94D7401510B5F8AF00F8C034 /* PBXTextBookmark */ = 94D7401510B5F8AF00F8C034 /* PBXTextBookmark */;\n\t\t\t94D7403810B5FDDB00F8C034 /* PBXTextBookmark */ = 94D7403810B5FDDB00F8C034 /* PBXTextBookmark */;\n\t\t\t94D7403A10B5FDDB00F8C034 /* PBXTextBookmark */ = 94D7403A10B5FDDB00F8C034 /* PBXTextBookmark */;\n\t\t\t94D740B210B6242000F8C034 /* PBXTextBookmark */ = 94D740B210B6242000F8C034 /* PBXTextBookmark */;\n\t\t\t94E1BDAB11E5A9F400D5B92B /* PBXTextBookmark */ = 94E1BDAB11E5A9F400D5B92B /* PBXTextBookmark */;\n\t\t\t94E297D10DECA72F009CF73A /* PBXTextBookmark */ = 94E297D10DECA72F009CF73A /* PBXTextBookmark */;\n\t\t\t94E297D30DECA72F009CF73A /* PBXTextBookmark */ = 94E297D30DECA72F009CF73A /* PBXTextBookmark */;\n\t\t\t94E297D50DECA72F009CF73A /* PBXTextBookmark */ = 94E297D50DECA72F009CF73A /* PBXTextBookmark */;\n\t\t\t94E297D70DECA72F009CF73A /* PBXTextBookmark */ = 94E297D70DECA72F009CF73A /* PBXTextBookmark */;\n\t\t\t94E2DAD40ED2351B00012E92 /* PBXTextBookmark */ = 94E2DAD40ED2351B00012E92 /* PBXTextBookmark */;\n\t\t\t94E2DB270ED2355F00012E92 /* PBXTextBookmark */ = 94E2DB270ED2355F00012E92 /* PBXTextBookmark */;\n\t\t\t94E4930310BD32D00011AC75 /* PBXTextBookmark */ = 94E4930310BD32D00011AC75 /* PBXTextBookmark */;\n\t\t\t94E583DB10BF43970073FD63 /* PBXTextBookmark */ = 94E583DB10BF43970073FD63 /* PBXTextBookmark */;\n\t\t\t94E584AE10BF6EE30073FD63 /* PBXTextBookmark */ = 94E584AE10BF6EE30073FD63 /* PBXTextBookmark */;\n\t\t\t94E584FF10BF79AB0073FD63 /* PBXTextBookmark */ = 94E584FF10BF79AB0073FD63 /* PBXTextBookmark */;\n\t\t\t94E5850010BF79AB0073FD63 /* PBXTextBookmark */ = 94E5850010BF79AB0073FD63 /* PBXTextBookmark */;\n\t\t\t94E7F6B812373EB800A03A11 /* PBXTextBookmark */ = 94E7F6B812373EB800A03A11 /* PBXTextBookmark */;\n\t\t\t94E8EEEA11C94D5D0049D853 /* PBXTextBookmark */ = 94E8EEEA11C94D5D0049D853 /* PBXTextBookmark */;\n\t\t\t94E8FA3C12258ED500EECD29 /* PBXTextBookmark */ = 94E8FA3C12258ED500EECD29 /* PBXTextBookmark */;\n\t\t\t94ED7EFA0E6C2ABE00F4DD03 /* PBXTextBookmark */ = 94ED7EFA0E6C2ABE00F4DD03 /* PBXTextBookmark */;\n\t\t\t94EE1DAA11E57FAB00DC6E8C /* PBXTextBookmark */ = 94EE1DAA11E57FAB00DC6E8C /* PBXTextBookmark */;\n\t\t\t94EF43151262BFC100817F37 /* PBXTextBookmark */ = 94EF43151262BFC100817F37 /* PBXTextBookmark */;\n\t\t\t94F155570E83EA1F001657CE /* PBXTextBookmark */ = 94F155570E83EA1F001657CE /* PBXTextBookmark */;\n\t\t\t94F155580E83EA1F001657CE /* PBXTextBookmark */ = 94F155580E83EA1F001657CE /* PBXTextBookmark */;\n\t\t\t94F1F15C11EB8AB5004B3AE3 /* PBXTextBookmark */ = 94F1F15C11EB8AB5004B3AE3 /* PBXTextBookmark */;\n\t\t\t94F1F5C910C30C22008DB9CF /* PBXTextBookmark */ = 94F1F5C910C30C22008DB9CF /* PBXTextBookmark */;\n\t\t\t94F5C1870DF26EF200099B11 /* PBXTextBookmark */ = 94F5C1870DF26EF200099B11 /* PBXTextBookmark */;\n\t\t\t94F5C25F0DF42C7600099B11 /* PBXTextBookmark */ = 94F5C25F0DF42C7600099B11 /* PBXTextBookmark */;\n\t\t\t94F5C2600DF42C7600099B11 /* PBXTextBookmark */ = 94F5C2600DF42C7600099B11 /* PBXTextBookmark */;\n\t\t\t94F5F29110BC518B00847EEE /* PBXTextBookmark */ = 94F5F29110BC518B00847EEE /* PBXTextBookmark */;\n\t\t\t94F5F29210BC518B00847EEE /* PBXTextBookmark */ = 94F5F29210BC518B00847EEE /* PBXTextBookmark */;\n\t\t\t94F5F29410BC518B00847EEE /* PBXTextBookmark */ = 94F5F29410BC518B00847EEE /* PBXTextBookmark */;\n\t\t\t94F5F29510BC518B00847EEE /* PBXTextBookmark */ = 94F5F29510BC518B00847EEE /* PBXTextBookmark */;\n\t\t\t94F5F2A810BC539700847EEE /* PBXTextBookmark */ = 94F5F2A810BC539700847EEE /* PBXTextBookmark */;\n\t\t\t94F89AFE10B4997900556475 /* PBXTextBookmark */ = 94F89AFE10B4997900556475 /* PBXTextBookmark */;\n\t\t\t94F89BDE10B4B77400556475 /* PBXTextBookmark */ = 94F89BDE10B4B77400556475 /* PBXTextBookmark */;\n\t\t\t94F89BE010B4B77400556475 /* PBXTextBookmark */ = 94F89BE010B4B77400556475 /* PBXTextBookmark */;\n\t\t\t94F89C9110B4C0B800556475 /* PBXTextBookmark */ = 94F89C9110B4C0B800556475 /* PBXTextBookmark */;\n\t\t\t94F8E42E0DE6129D003F4F53 /* PBXTextBookmark */ = 94F8E42E0DE6129D003F4F53 /* PBXTextBookmark */;\n\t\t\t94FE53951230323500BA17E1 /* PBXTextBookmark */ = 94FE53951230323500BA17E1 /* PBXTextBookmark */;\n\t\t};\n\t\tsourceControlManager = 9424FF420DDC8673009912BF /* Source Control */;\n\t\tuserBookmarkGroup = 94B8F4B910CF5BFF00F0DD6B /* PBXBookmarkGroup */;\n\t\tuserBuildSettings = {\n\t\t};\n\t};\n\t29B97316FDCFA39411CA2CEA /* main.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1327, 728}}\";\n\t\t\tsepNavSelRange = \"{1872, 0}\";\n\t\t\tsepNavVisRange = \"{278, 1871}\";\n\t\t\tsepNavWindowFrame = \"{{15, 15}, {694, 1008}}\";\n\t\t};\n\t};\n\t9400325B0DEF3936002FA1C4 /* sqDummyaio.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1208, 824}}\";\n\t\t\tsepNavSelRange = \"{1850, 8}\";\n\t\t\tsepNavVisRange = \"{0, 1878}\";\n\t\t\tsepNavWindowFrame = \"{{483, 4}, {694, 1008}}\";\n\t\t};\n\t};\n\t9400325C0DEF3936002FA1C4 /* sqDummyaio.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1357, 1040}}\";\n\t\t\tsepNavSelRange = \"{2139, 0}\";\n\t\t\tsepNavVisRange = \"{2081, 171}\";\n\t\t\tsepNavWindowFrame = \"{{483, -9}, {694, 1008}}\";\n\t\t};\n\t};\n\t940125A81228E3FC002883F0 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94845C211228E29F00BEB880 /* macvideo.cpp */;\n\t\tname = \"macvideo.cpp: 883\";\n\t\trLen = 30;\n\t\trLoc = 41143;\n\t\trType = 0;\n\t\tvrLen = 3284;\n\t\tvrLoc = 40081;\n\t};\n\t9402DD5E10CE0C16005C2102 /* SqViewBitmapConversion.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {2070, 1053}}\";\n\t\t\tsepNavSelRange = \"{1161, 6}\";\n\t\t\tsepNavVisRange = \"{0, 2416}\";\n\t\t\tsepNavWindowFrame = \"{{15, 13}, {1326, 1010}}\";\n\t\t};\n\t};\n\t9402DD5F10CE0C16005C2102 /* SqViewBitmapConversion.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {2077, 3523}}\";\n\t\t\tsepNavSelRange = \"{6138, 14}\";\n\t\t\tsepNavVisRange = \"{6017, 1887}\";\n\t\t\tsepNavWindowFrame = \"{{15, 13}, {1326, 1010}}\";\n\t\t};\n\t};\n\t9402DD6F10CE0E91005C2102 /* SqViewClut.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1167, 1066}}\";\n\t\t\tsepNavSelRange = \"{343, 0}\";\n\t\t\tsepNavVisRange = \"{0, 2832}\";\n\t\t\tsepNavWindowFrame = \"{{15, 13}, {1326, 1010}}\";\n\t\t};\n\t};\n\t9402DDB610CE12A5005C2102 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9402DDB710CE12A5005C2102 /* SqView.h */;\n\t\tname = \"SqView.h: 50\";\n\t\trLen = 33;\n\t\trLoc = 1358;\n\t\trType = 0;\n\t\tvrLen = 1671;\n\t\tvrLoc = 0;\n\t};\n\t9402DDB710CE12A5005C2102 /* SqView.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = SqView.h;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/CocoaSqueak-3.0.4/src/SqueakAppKit/SqView.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9402F2AE0F3F9BB900F3D637 /* PDColoredProgressView.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 546}}\";\n\t\t\tsepNavSelRange = \"{1081, 6}\";\n\t\t\tsepNavVisRange = \"{31, 1299}\";\n\t\t};\n\t};\n\t9402F2AF0F3F9BB900F3D637 /* PDColoredProgressView.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {964, 1547}}\";\n\t\t\tsepNavSelRange = \"{3465, 0}\";\n\t\t\tsepNavVisRange = \"{2282, 1236}\";\n\t\t\tsepNavWindowFrame = \"{{204, 6}, {1346, 974}}\";\n\t\t};\n\t};\n\t9402F2C50F3F9C5600F3D637 /* drawing.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1492, 897}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1669}\";\n\t\t};\n\t};\n\t94059106122AFB60009939CE /* ucontext.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = ucontext.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/usr/include/ucontext.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94059113122AFF8C009939CE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94059106122AFB60009939CE /* ucontext.h */;\n\t\tname = \"ucontext.h: 42\";\n\t\trLen = 0;\n\t\trLoc = 1410;\n\t\trType = 0;\n\t\tvrLen = 1545;\n\t\tvrLoc = 0;\n\t};\n\t9406B4DF11EC314E002670B7 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9406B4E011EC314E002670B7 /* mach_time.h */;\n\t\tname = \"mach_time.h: 46\";\n\t\trLen = 18;\n\t\trLoc = 1660;\n\t\trType = 0;\n\t\tvrLen = 1731;\n\t\tvrLoc = 0;\n\t};\n\t9406B4E011EC314E002670B7 /* mach_time.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = mach_time.h;\n\t\tpath = /System/Library/Frameworks/Kernel.framework/Versions/A/Headers/mach/mach_time.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9406E7E210B663F4002F81F2 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C36A6D10B091BB0041953A /* NSCursor.h */;\n\t\tname = \"NSCursor.h: 75\";\n\t\trLen = 41;\n\t\trLoc = 3288;\n\t\trType = 0;\n\t\tvrLen = 1499;\n\t\tvrLoc = 1836;\n\t};\n\t9406E87110B66A74002F81F2 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9406E87210B66A74002F81F2 /* SqueakInterpreterEventSensor.h */;\n\t\tname = \"SqueakInterpreterEventSensor.h: 11\";\n\t\trLen = 8;\n\t\trLoc = 416;\n\t\trType = 0;\n\t\tvrLen = 555;\n\t\tvrLoc = 0;\n\t};\n\t9406E87210B66A74002F81F2 /* SqueakInterpreterEventSensor.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = SqueakInterpreterEventSensor.h;\n\t\tpath = \"/Users/johnmci/Work In Progress/smalltalk/CocoaSqueakSource/Squeak/SqueakInterpreterEventSensor.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9406E87510B66A74002F81F2 /* SqueakInterpreterEventSensor.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = SqueakInterpreterEventSensor.m;\n\t\tpath = \"/Users/johnmci/Work In Progress/smalltalk/CocoaSqueakSource/Squeak/SqueakInterpreterEventSensor.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9406E87710B66A74002F81F2 /* SqViewEventSensor.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = SqViewEventSensor.m;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/CocoaSqueak-3.0.4/src/SqueakAppKit/SqViewEventSensor.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9406E8CC10B67499002F81F2 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9406E8CD10B67499002F81F2 /* NSTextStorageScripting.h */;\n\t\tname = \"NSTextStorageScripting.h: 21\";\n\t\trLen = 25;\n\t\trLoc = 417;\n\t\trType = 0;\n\t\tvrLen = 620;\n\t\tvrLoc = 0;\n\t};\n\t9406E8CD10B67499002F81F2 /* NSTextStorageScripting.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSTextStorageScripting.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSTextStorageScripting.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9406E8D110B67499002F81F2 /* NSRange.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSRange.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSRange.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t940CE8540DFCE2D200EBA91B /* SqueakUIController.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {831, 754}}\";\n\t\t\tsepNavSelRange = \"{95, 1688}\";\n\t\t\tsepNavVisRange = \"{0, 1839}\";\n\t\t};\n\t};\n\t940CE8550DFCE2D200EBA91B /* SqueakUIController.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {922, 1365}}\";\n\t\t\tsepNavSelRange = \"{3914, 0}\";\n\t\t\tsepNavVisRange = \"{2585, 1552}\";\n\t\t\tsepNavWindowFrame = \"{{15, 49}, {1346, 974}}\";\n\t\t};\n\t};\n\t940E86A31220A8D200AAB6F5 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947E647910AA100900D3B69E /* SqueakOSXAppDelegate.h */;\n\t\tname = \"SqueakOSXAppDelegate.h: 49\";\n\t\trLen = 8;\n\t\trLoc = 2151;\n\t\trType = 0;\n\t\tvrLen = 1827;\n\t\tvrLoc = 645;\n\t};\n\t940E86EE1220AF3D00AAB6F5 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9424FF5B0DDCB1C7009912BF /* sqGnu.h */;\n\t\tname = \"sqGnu.h: 165\";\n\t\trLen = 0;\n\t\trLoc = 10975;\n\t\trType = 0;\n\t\tvrLen = 2508;\n\t\tvrLoc = 9372;\n\t};\n\t9412CAE40E6C05EC00DB8625 /* sqSqueakInfoPlistInterface.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {831, 749}}\";\n\t\t\tsepNavSelRange = \"{2019, 23}\";\n\t\t\tsepNavVisRange = \"{0, 2070}\";\n\t\t\tsepNavWindowFrame = \"{{15, 8}, {1012, 1015}}\";\n\t\t};\n\t};\n\t9412CAE50E6C05EC00DB8625 /* sqSqueakInfoPlistInterface.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {965, 887}}\";\n\t\t\tsepNavSelRange = \"{1814, 43}\";\n\t\t\tsepNavVisRange = \"{0, 2410}\";\n\t\t\tsepNavWindowFrame = \"{{15, 8}, {1012, 1015}}\";\n\t\t};\n\t};\n\t941441FD10BC817D0088F8AC /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 941441FE10BC817D0088F8AC /* NSSavePanel.h */;\n\t\tname = \"NSSavePanel.h: 207\";\n\t\trLen = 23;\n\t\trLoc = 10442;\n\t\trType = 0;\n\t\tvrLen = 3994;\n\t\tvrLoc = 8956;\n\t};\n\t941441FE10BC817D0088F8AC /* NSSavePanel.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSSavePanel.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSSavePanel.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9414420010BC817D0088F8AC /* NSPanel.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSPanel.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSPanel.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9414420110BC817D0088F8AC /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9414420210BC817D0088F8AC /* NSOpenPanel.h */;\n\t\tname = \"NSOpenPanel.h: 43\";\n\t\trLen = 24;\n\t\trLoc = 877;\n\t\trType = 0;\n\t\tvrLen = 1896;\n\t\tvrLoc = 0;\n\t};\n\t9414420210BC817D0088F8AC /* NSOpenPanel.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSOpenPanel.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSOpenPanel.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9415BF3F123065640067CD8E /* dtraceOperationsPerSecond.d */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.dtrace;\n\t\tname = dtraceOperationsPerSecond.d;\n\t\tpath = /Users/johnmci/Documents/Squeak3.8.0/platforms/iOS/vm/OSX/dtraceOperationsPerSecond.d;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9415C06312306B660067CD8E /* SqueakUIView.m:118 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 949E5DB60DE3AB6A007388E0 /* SqueakUIView.m */;\n\t\tfunctionName = \"-drawImageUsingClip:\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 118;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 308445394.271715;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t9415C06512306B6F0067CD8E /* SqueakUIView.m:126 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 949E5DB60DE3AB6A007388E0 /* SqueakUIView.m */;\n\t\tfunctionName = \"-drawThelayers\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 126;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 308445394.299481;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t9415C07412306BDD0067CD8E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9415BF3F123065640067CD8E /* dtraceOperationsPerSecond.d */;\n\t\tname = \"dtraceOperationsPerSecond.d: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1560;\n\t\tvrLoc = 0;\n\t};\n\t9415C11412306FCC0067CD8E /* sqiPhoneScreenAndWindow.m:63 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 9452D7640E0452D3000AD792 /* sqiPhoneScreenAndWindow.m */;\n\t\tfunctionName = \"-ioForceDisplayUpdateActual\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 63;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 308445394.388573;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t941724420F36624C0031AF33 /* squeakProxy.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1167, 2431}}\";\n\t\t\tsepNavSelRange = \"{1931, 11}\";\n\t\t\tsepNavVisRange = \"{493, 2138}\";\n\t\t\tsepNavWindowFrame = \"{{15, 49}, {1346, 974}}\";\n\t\t};\n\t};\n\t941724430F36624C0031AF33 /* squeakProxy.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 1274}}\";\n\t\t\tsepNavSelRange = \"{3018, 6}\";\n\t\t\tsepNavVisRange = \"{2526, 1527}\";\n\t\t};\n\t};\n\t941A331D11E63E1A004796BA /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 941A331E11E63E1A004796BA /* ia64.c */;\n\t\tname = \"ia64.c: 7278\";\n\t\trLen = 1;\n\t\trLoc = 208277;\n\t\trType = 0;\n\t\tvrLen = 2659;\n\t\tvrLoc = 207667;\n\t};\n\t941A331E11E63E1A004796BA /* ia64.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = ia64.c;\n\t\tpath = \"/Users/johnmci/Documents/Files from Lamie/Documents/Darwin/gcc3-1151/gcc/config/ia64/ia64.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t941A331F11E63E1A004796BA /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 941A332011E63E1A004796BA /* gatomic.c */;\n\t\tname = \"gatomic.c: 522\";\n\t\trLen = 18;\n\t\trLoc = 14250;\n\t\trType = 0;\n\t\tvrLen = 1827;\n\t\tvrLoc = 13448;\n\t};\n\t941A332011E63E1A004796BA /* gatomic.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = gatomic.c;\n\t\tpath = \"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_glib2-devel/work/glib-2.15.6/glib/gatomic.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t941D1C9A0E696FC7005B77B3 /* Entitlements.plist */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavWindowFrame = \"{{15, 166}, {1288, 857}}\";\n\t\t};\n\t};\n\t94210B280E956AC200C1A314 /* ObjectiveCPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {838, 27248}}\";\n\t\t\tsepNavSelRange = \"{53186, 9}\";\n\t\t\tsepNavVisRange = \"{52405, 1628}\";\n\t\t\tsepNavWindowFrame = \"{{710, 97}, {901, 833}}\";\n\t\t};\n\t};\n\t9421AB550FF1807D008F54E9 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 949EFD7D0FF17FED00F540EB /* ObjectiveCPlugin.c */;\n\t\tname = \"ObjectiveCPlugin.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1049;\n\t\tvrLoc = 0;\n\t};\n\t94238E5E11E7B0EB004401BE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9452D5DA0E044A9D000AD792 /* sqMacV2Time.h */;\n\t\tname = \"sqMacV2Time.h: 6\";\n\t\trLen = 0;\n\t\trLoc = 72;\n\t\trType = 0;\n\t\tvrLen = 1791;\n\t\tvrLoc = 0;\n\t};\n\t9424FF3E0DDC8654009912BF /* Squeak */ = {\n\t\tisa = PBXExecutable;\n\t\tactiveArgIndices = (\n\t\t);\n\t\targumentStrings = (\n\t\t);\n\t\tautoAttachOnCrash = 1;\n\t\tbreakpointsEnabled = 0;\n\t\tconfigStateDict = {\n\t\t\t\"PBXLSLaunchAction-0\" = {\n\t\t\t\tPBXLSLaunchAction = 0;\n\t\t\t\tPBXLSLaunchStartAction = 1;\n\t\t\t\tPBXLSLaunchStdioStyle = 2;\n\t\t\t\tPBXLSLaunchStyle = 0;\n\t\t\t\tclass = PBXLSRunLaunchConfig;\n\t\t\t\tcommandLineArgs = (\n\t\t\t\t);\n\t\t\t\tdisplayName = \"Executable Runner\";\n\t\t\t\tenvironment = {\n\t\t\t\t};\n\t\t\t\tidentifier = com.apple.Xcode.launch.runConfig;\n\t\t\t\tremoteHostInfo = \"\";\n\t\t\t\tstartActionInfo = \"\";\n\t\t\t};\n\t\t};\n\t\tcustomDataFormattersEnabled = 1;\n\t\tdataTipCustomDataFormattersEnabled = 1;\n\t\tdataTipShowTypeColumn = 1;\n\t\tdataTipSortType = 0;\n\t\tdebuggerPlugin = GDBDebugging;\n\t\tdisassemblyDisplayState = 0;\n\t\tdylibVariantSuffix = \"\";\n\t\tenableDebugStr = 0;\n\t\tenvironmentEntries = (\n\t\t\t{\n\t\t\t\tactive = NO;\n\t\t\t\tname = NSAutoreleaseHaltOnFreedObject;\n\t\t\t\tvalue = YES;\n\t\t\t},\n\t\t\t{\n\t\t\t\tactive = NO;\n\t\t\t\tname = NSZombieEnabled;\n\t\t\t\tvalue = YES;\n\t\t\t},\n\t\t\t{\n\t\t\t\tactive = NO;\n\t\t\t\tname = NSAutoreleaseFreedObjectCheckEnabled;\n\t\t\t\tvalue = YES;\n\t\t\t},\n\t\t);\n\t\texecutableSystemSymbolLevel = 0;\n\t\texecutableUserSymbolLevel = 0;\n\t\tlibgmallocEnabled = 0;\n\t\tname = Squeak;\n\t\tsavedGlobals = {\n\t\t};\n\t\tshowTypeColumn = 0;\n\t\tsourceDirectories = (\n\t\t);\n\t\tstartupPath = \"<<ProductDirectory>>\";\n\t\tvariableFormatDictionary = {\n\t\t\t$cpsr = 1;\n\t\t\t$cs = 1;\n\t\t\t$d0 = 1;\n\t\t\t$d1 = 1;\n\t\t\t$d10 = 1;\n\t\t\t$d11 = 1;\n\t\t\t$d12 = 1;\n\t\t\t$d13 = 1;\n\t\t\t$d14 = 1;\n\t\t\t$d15 = 1;\n\t\t\t$d2 = 1;\n\t\t\t$d3 = 1;\n\t\t\t$d4 = 1;\n\t\t\t$d5 = 1;\n\t\t\t$d6 = 1;\n\t\t\t$d7 = 1;\n\t\t\t$d8 = 1;\n\t\t\t$d9 = 1;\n\t\t\t$ds = 1;\n\t\t\t$eax = 1;\n\t\t\t$ebp = 1;\n\t\t\t$ebx = 1;\n\t\t\t$ecx = 1;\n\t\t\t$edi = 1;\n\t\t\t$edx = 1;\n\t\t\t$eflags = 1;\n\t\t\t$eip = 1;\n\t\t\t$es = 1;\n\t\t\t$esi = 1;\n\t\t\t$esp = 1;\n\t\t\t$fs = 1;\n\t\t\t$gs = 1;\n\t\t\t$ip = 1;\n\t\t\t$lr = 1;\n\t\t\t$mxcsr = 1;\n\t\t\t$pc = 1;\n\t\t\t$r0 = 1;\n\t\t\t$r1 = 1;\n\t\t\t$r10 = 1;\n\t\t\t$r11 = 1;\n\t\t\t$r12 = 1;\n\t\t\t$r2 = 1;\n\t\t\t$r3 = 1;\n\t\t\t$r4 = 1;\n\t\t\t$r5 = 1;\n\t\t\t$r6 = 1;\n\t\t\t$r7 = 1;\n\t\t\t$r8 = 1;\n\t\t\t$r9 = 1;\n\t\t\t$s0 = 1;\n\t\t\t$s1 = 1;\n\t\t\t$s10 = 1;\n\t\t\t$s11 = 1;\n\t\t\t$s12 = 1;\n\t\t\t$s13 = 1;\n\t\t\t$s14 = 1;\n\t\t\t$s15 = 1;\n\t\t\t$s16 = 1;\n\t\t\t$s17 = 1;\n\t\t\t$s18 = 1;\n\t\t\t$s19 = 1;\n\t\t\t$s2 = 1;\n\t\t\t$s20 = 1;\n\t\t\t$s21 = 1;\n\t\t\t$s22 = 1;\n\t\t\t$s23 = 1;\n\t\t\t$s24 = 1;\n\t\t\t$s25 = 1;\n\t\t\t$s26 = 1;\n\t\t\t$s27 = 1;\n\t\t\t$s28 = 1;\n\t\t\t$s29 = 1;\n\t\t\t$s3 = 1;\n\t\t\t$s30 = 1;\n\t\t\t$s31 = 1;\n\t\t\t$s4 = 1;\n\t\t\t$s5 = 1;\n\t\t\t$s6 = 1;\n\t\t\t$s7 = 1;\n\t\t\t$s8 = 1;\n\t\t\t$s9 = 1;\n\t\t\t$sl = 1;\n\t\t\t$sp = 1;\n\t\t\t$ss = 1;\n\t\t\t\"*buffer-short int-primitiveNSInvocationGetShortType\" = 1;\n\t\t\t\"_return_value-sqInt-primitiveNSInvocationGetShortType\" = 1;\n\t\t\t\"actually-void *-sqAllocateMemoryMac\" = 2;\n\t\t\t\"data-id-primitiveNSInvocationGetObjectType\" = 1;\n\t\t\t\"data-short int-primitiveNSInvocationGetShortType\" = 1;\n\t\t\t\"dateDifference-sqInt-convertToSqueakTime\" = 1;\n\t\t\t\"fileSize-off_t-sqAllocateMemoryMac\" = 2;\n\t\t\t\"integerValue-sqInt-positive32BitIntegerFor\" = 1;\n\t\t\t\"mFormatID-UInt32--[sqSqueakSoundCoreAudio snd_StartRecording:stereo:semaIndex:]\" = 5;\n\t\t\t\"possibleLocation-void *-sqAllocateMemoryMac\" = 2;\n\t\t\t\"returnValue-struct objc_object * volatile-primitivePerformSelector\" = 2;\n\t\t\t\"startOfAnonymousMemory-void *-sqAllocateMemoryMac\" = 1;\n\t\t\t\"startOfAnonymousMemoryPageSize-size_t-sqAllocateMemoryMac\" = 1;\n\t\t\t\"unsignedData-long long unsigned int-primitiveNSInvocationGetLongLongType\" = 1;\n\t\t\t\"what-long int--[SqueakProxy forwardInvocation:]\" = 1;\n\t\t\t\"why-int-aioPoll\" = 1;\n\t\t};\n\t};\n\t9424FF420DDC8673009912BF /* Source Control */ = {\n\t\tisa = PBXSourceControlManager;\n\t\tfallbackIsa = XCSourceControlManager;\n\t\tisSCMEnabled = 0;\n\t\tscmConfiguration = {\n\t\t\trepositoryName = \"http://svn.isqueak.org/\";\n\t\t\trepositoryNamesForRoots = {\n\t\t\t\t\"\" = SqueakVM;\n\t\t\t};\n\t\t};\n\t};\n\t9424FF430DDC8673009912BF /* Code sense */ = {\n\t\tisa = PBXCodeSenseManager;\n\t\tindexTemplatePath = \"\";\n\t};\n\t9424FF5B0DDCB1C7009912BF /* sqGnu.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1132, 2730}}\";\n\t\t\tsepNavSelRange = \"{10975, 0}\";\n\t\t\tsepNavVisRange = \"{9372, 2508}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {1194, 1019}}\";\n\t\t};\n\t};\n\t9424FF5C0DDCB1C7009912BF /* sqMemoryAccess.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1327, 2171}}\";\n\t\t\tsepNavSelRange = \"{2839, 0}\";\n\t\t\tsepNavVisRange = \"{0, 0}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {878, 1019}}\";\n\t\t};\n\t};\n\t9424FF5D0DDCB1C7009912BF /* sq.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1027, 6916}}\";\n\t\t\tsepNavSelRange = \"{18266, 35}\";\n\t\t\tsepNavVisRange = \"{17190, 2307}\";\n\t\t\tsepNavWindowFrame = \"{{73, 4}, {1326, 1010}}\";\n\t\t};\n\t};\n\t9424FF5E0DDCB1C7009912BF /* sqNamedPrims.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {800, 6890}}\";\n\t\t\tsepNavSelRange = \"{660, 33}\";\n\t\t\tsepNavVisRange = \"{0, 1563}\";\n\t\t\tsepNavWindowFrame = \"{{15, 38}, {847, 985}}\";\n\t\t};\n\t};\n\t9424FF600DDCB1C7009912BF /* sqVirtualMachine.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 6500}}\";\n\t\t\tsepNavSelRange = \"{14571, 22}\";\n\t\t\tsepNavVisRange = \"{13799, 1509}\";\n\t\t};\n\t};\n\t9424FF610DDCB1C7009912BF /* sqVirtualMachine.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1391, 3835}}\";\n\t\t\tsepNavSelRange = \"{6672, 30}\";\n\t\t\tsepNavVisRange = \"{5691, 1846}\";\n\t\t\tsepNavWindowFrame = \"{{15, 55}, {1438, 968}}\";\n\t\t};\n\t};\n\t9424FF640DDCB1EF009912BF /* sqPlatformSpecific.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 2158}}\";\n\t\t\tsepNavSelRange = \"{3458, 89}\";\n\t\t\tsepNavVisRange = \"{2732, 1658}\";\n\t\t\tsepNavWindowFrame = \"{{38, 19}, {905, 983}}\";\n\t\t};\n\t};\n\t9424FF650DDCB1EF009912BF /* config.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1132, 2912}}\";\n\t\t\tsepNavSelRange = \"{3660, 0}\";\n\t\t\tsepNavVisRange = \"{3240, 1112}\";\n\t\t\tsepNavWindowFrame = \"{{38, 17}, {847, 985}}\";\n\t\t};\n\t};\n\t9424FF660DDCB1EF009912BF /* sqConfig.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1132, 807}}\";\n\t\t\tsepNavSelRange = \"{88, 25}\";\n\t\t\tsepNavVisRange = \"{0, 302}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {1385, 1024}}\";\n\t\t};\n\t};\n\t9424FF670DDCB202009912BF /* sqMacV2Memory.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1069, 2522}}\";\n\t\t\tsepNavSelRange = \"{2861, 16}\";\n\t\t\tsepNavVisRange = \"{2252, 1746}\";\n\t\t\tsepNavWindowFrame = \"{{497, 1}, {905, 983}}\";\n\t\t};\n\t};\n\t9424FF680DDCB202009912BF /* sqMacV2Memory.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1132, 820}}\";\n\t\t\tsepNavSelRange = \"{2075, 15}\";\n\t\t\tsepNavVisRange = \"{0, 2098}\";\n\t\t\tsepNavWindowFrame = \"{{15, 40}, {905, 983}}\";\n\t\t};\n\t};\n\t9424FF710DDCB234009912BF /* macintoshextra.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 689}}\";\n\t\t\tsepNavSelRange = \"{235, 11}\";\n\t\t\tsepNavVisRange = \"{172, 1750}\";\n\t\t\tsepNavWindowFrame = \"{{539, 15}, {905, 983}}\";\n\t\t};\n\t};\n\t9424FF720DDCB234009912BF /* macintoshextra.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1036, 629}}\";\n\t\t\tsepNavSelRange = \"{183, 15}\";\n\t\t\tsepNavVisRange = \"{0, 198}\";\n\t\t};\n\t};\n\t9424FF750DDCB271009912BF /* osExports.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {802, 587}}\";\n\t\t\tsepNavSelRange = \"{389, 0}\";\n\t\t\tsepNavVisRange = \"{0, 571}\";\n\t\t};\n\t};\n\t9427E35512626DFB002DCA6D /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C2068910AF4F53002F4160 /* sqSqueakOSXNSView.m */;\n\t\tname = \"sqSqueakOSXNSView.m: 293\";\n\t\trLen = 0;\n\t\trLoc = 10089;\n\t\trType = 0;\n\t\tvrLen = 2715;\n\t\tvrLoc = 6392;\n\t};\n\t9427E37B12626EE6002DCA6D /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94638B260EAFB77B00A3F155 /* iPhone.changes */;\n\t\tname = \"iPhone.changes: 134722\";\n\t\trLen = 0;\n\t\trLoc = 5548785;\n\t\trType = 0;\n\t\tvrLen = 2552;\n\t\tvrLoc = 5075399;\n\t};\n\t9427E3F612627C61002DCA6D /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C887FA10ADCEFC007CB39E /* sqSqueakOSXApplication+imageReadWrite.m */;\n\t\tname = \"sqSqueakOSXApplication+imageReadWrite.m: 64\";\n\t\trLen = 0;\n\t\trLoc = 2709;\n\t\trType = 0;\n\t\tvrLen = 1821;\n\t\tvrLoc = 1953;\n\t};\n\t9427E3F812627C61002DCA6D /* PlistBookmark */ = {\n\t\tisa = PlistBookmark;\n\t\tfRef = 949AD14911E542E8006D6BF4 /* SqueakPureObjc-InfoCOG.plist */;\n\t\tfallbackIsa = PBXBookmark;\n\t\tisK = 0;\n\t\tkPath = (\n\t\t\tCFBundleGetInfoString,\n\t\t);\n\t\tname = \"/Users/johnmci/Documents/Squeak3.8.0/platforms/iOS/vm/SqueakPureObjc-InfoCOG.plist\";\n\t\trLen = 0;\n\t\trLoc = 9223372036854775808;\n\t};\n\t9427E3F912627C61002DCA6D /* PlistBookmark */ = {\n\t\tisa = PlistBookmark;\n\t\tfRef = 947E5F9F10A9FFA000D3B69E /* SqueakPureObjc-Info.plist */;\n\t\tfallbackIsa = PBXBookmark;\n\t\tisK = 0;\n\t\tkPath = (\n\t\t\tSqueakUIFadeForFullScreenInSeconds,\n\t\t);\n\t\tname = \"/Users/johnmci/Documents/Squeak3.8.0/platforms/iOS/vm/SqueakPureObjc-Info.plist\";\n\t\trLen = 0;\n\t\trLoc = 9223372036854775808;\n\t};\n\t9427E3FC12627C61002DCA6D /* Root.plist */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = text.plist.xml;\n\t\tname = Root.plist;\n\t\tpath = /Users/johnmci/Documents/Squeak3.8.0/platforms/iOS/vm/Settings.bundle/Root.plist;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9427E42E12627E6A002DCA6D /* sqSqueakIPhoneApplication+imageReadWrite.m:95 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 943001270E0D5D670040BB27 /* sqSqueakIPhoneApplication+imageReadWrite.m */;\n\t\tfunctionName = \"-findImageViaBundleOrPreferences\";\n\t\thitCount = 1;\n\t\tignoreCount = 0;\n\t\tlineNumber = 95;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 308445400.27705;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t9427E44B12628333002DCA6D /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94F879900E6C0C7E00662DEA /* sqSqueakIPhoneInfoPlistInterface.m */;\n\t\tname = \"sqSqueakIPhoneInfoPlistInterface.m: 56\";\n\t\trLen = 0;\n\t\trLoc = 2332;\n\t\trType = 0;\n\t\tvrLen = 2389;\n\t\tvrLoc = 1214;\n\t};\n\t9427E44C12628333002DCA6D /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 943001270E0D5D670040BB27 /* sqSqueakIPhoneApplication+imageReadWrite.m */;\n\t\tname = \"sqSqueakIPhoneApplication+imageReadWrite.m: 54\";\n\t\trLen = 15;\n\t\trLoc = 2235;\n\t\trType = 0;\n\t\tvrLen = 2631;\n\t\tvrLoc = 2815;\n\t};\n\t9427E44D12628333002DCA6D /* PlistBookmark */ = {\n\t\tisa = PlistBookmark;\n\t\tfRef = 9427E3FC12627C61002DCA6D /* Root.plist */;\n\t\tfallbackIsa = PBXBookmark;\n\t\tisK = 0;\n\t\tkPath = (\n\t\t\tPreferenceSpecifiers,\n\t\t\t2,\n\t\t\tTrueValue,\n\t\t);\n\t\tname = /Users/johnmci/Documents/Squeak3.8.0/platforms/iOS/vm/Settings.bundle/Root.plist;\n\t\trLen = 0;\n\t\trLoc = 9223372036854775808;\n\t};\n\t9427E46212629AE3002DCA6D /* PBXBookmark */ = {\n\t\tisa = PBXBookmark;\n\t\tfRef = 94F3A9690E6BFA7C00E0B12A /* Squeak.png */;\n\t};\n\t9427E46312629AE3002DCA6D /* PlistBookmark */ = {\n\t\tisa = PlistBookmark;\n\t\tfRef = 94C36C9710B0CF290041953A /* Info-iPhone.plist */;\n\t\tfallbackIsa = PBXBookmark;\n\t\tisK = 0;\n\t\tkPath = (\n\t\t\tUIFileSharingEnabled,\n\t\t);\n\t\tname = \"/Users/johnmci/Documents/Squeak3.8.0/platforms/iOS/vm/Info-iPhone.plist\";\n\t\trLen = 0;\n\t\trLoc = 9223372036854775808;\n\t};\n\t9427E4D11262B997002DCA6D /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9452D5DE0E044A9D000AD792 /* sqSqueakFileDirectoryInterface.m */;\n\t\tname = \"sqSqueakFileDirectoryInterface.m: 140\";\n\t\trLen = 37;\n\t\trLoc = 4849;\n\t\trType = 0;\n\t\tvrLen = 2369;\n\t\tvrLoc = 3923;\n\t};\n\t9427E4D21262B997002DCA6D /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCE7A60DDDF8F800F38F31 /* sqaio.h */;\n\t\tname = \"sqaio.h: 95\";\n\t\trLen = 16;\n\t\trLoc = 4027;\n\t\trType = 0;\n\t\tvrLen = 2290;\n\t\tvrLoc = 1798;\n\t};\n\t942807EE1224862A0000DCFE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94584FD910F02378001401E7 /* sqMacExtendedClipboard.m */;\n\t\tname = \"sqMacExtendedClipboard.m: 101\";\n\t\trLen = 40;\n\t\trLoc = 3679;\n\t\trType = 0;\n\t\tvrLen = 2397;\n\t\tvrLoc = 1736;\n\t};\n\t942807EF1224862A0000DCFE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 945851EF10F03E60001401E7 /* sqMacExtendedClipboard.m */;\n\t\tname = \"sqMacExtendedClipboard.m: 88\";\n\t\trLen = 111;\n\t\trLoc = 3036;\n\t\trType = 0;\n\t\tvrLen = 2240;\n\t\tvrLoc = 1524;\n\t};\n\t942807F01224862A0000DCFE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9458525510F04339001401E7 /* sqSqueakIPhoneClipboardAPI.m */;\n\t\tname = \"sqSqueakIPhoneClipboardAPI.m: 17\";\n\t\trLen = 28;\n\t\trLoc = 398;\n\t\trType = 0;\n\t\tvrLen = 1345;\n\t\tvrLoc = 0;\n\t};\n\t9428BA9510BB440800DAD287 /* sqSqueakOSXClipboardAPI.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 623}}\";\n\t\t\tsepNavSelRange = \"{0, 1814}\";\n\t\t\tsepNavVisRange = \"{0, 1814}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {878, 1019}}\";\n\t\t};\n\t};\n\t9428BA9610BB440800DAD287 /* sqSqueakOSXClipboardAPI.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 871}}\";\n\t\t\tsepNavSelRange = \"{2148, 13}\";\n\t\t\tsepNavVisRange = \"{787, 2052}\";\n\t\t\tsepNavWindowFrame = \"{{16, 4}, {878, 1019}}\";\n\t\t};\n\t};\n\t9428BB0410BB478600DAD287 /* sqSqueakOSXApplication+clipboard.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 623}}\";\n\t\t\tsepNavSelRange = \"{184, 2018}\";\n\t\t\tsepNavVisRange = \"{0, 2202}\";\n\t\t};\n\t};\n\t9428BB0510BB478600DAD287 /* sqSqueakOSXApplication+clipboard.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1167, 1092}}\";\n\t\t\tsepNavSelRange = \"{2664, 37}\";\n\t\t\tsepNavVisRange = \"{1451, 2157}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {878, 1019}}\";\n\t\t};\n\t};\n\t9428BBAD10BB50E200DAD287 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9428BBAE10BB50E200DAD287 /* sqUnixQuartz.m */;\n\t\tname = \"sqUnixQuartz.m: 1028\";\n\t\trLen = 9;\n\t\trLoc = 28100;\n\t\trType = 0;\n\t\tvrLen = 1398;\n\t\tvrLoc = 27330;\n\t};\n\t9428BBAE10BB50E200DAD287 /* sqUnixQuartz.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = sqUnixQuartz.m;\n\t\tpath = \"/Users/johnmci/Documents/SqueakIA32ABIPlugin/platforms/unix/vm-display-Quartz/sqUnixQuartz.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9428BBE210BB565100DAD287 /* sqUnixQuartz.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = sqUnixQuartz.m;\n\t\tpath = \"/Users/johnmci/Documents/SqueakHydra/SqueakVMMAker/platforms/unix/vm-display-Quartz/zzz/sqUnixQuartz.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9428BBE510BB565100DAD287 /* NSPasteboard.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSPasteboard.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSPasteboard.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9428BC5510BB74BF00DAD287 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAFC410ACC89100F87527 /* string.h */;\n\t\tname = \"string.h: 83\";\n\t\trLen = 44;\n\t\trLoc = 3369;\n\t\trType = 0;\n\t\tvrLen = 1928;\n\t\tvrLoc = 2407;\n\t};\n\t9428BC5710BB74BF00DAD287 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9428BBE510BB565100DAD287 /* NSPasteboard.h */;\n\t\tname = \"NSPasteboard.h: 138\";\n\t\trLen = 50;\n\t\trLoc = 9563;\n\t\trType = 0;\n\t\tvrLen = 3372;\n\t\tvrLoc = 7682;\n\t};\n\t9428BF3810BBC2ED00DAD287 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAC3710AB79DA00F87527 /* NSArray.h */;\n\t\tname = \"NSArray.h: 91\";\n\t\trLen = 15;\n\t\trLoc = 4609;\n\t\trType = 0;\n\t\tvrLen = 2275;\n\t\tvrLoc = 3251;\n\t};\n\t9428BF4F10BBCAAC00DAD287 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAC3C10AB79DA00F87527 /* NSDictionary.h */;\n\t\tname = \"NSDictionary.h: 75\";\n\t\trLen = 19;\n\t\trLoc = 3192;\n\t\trType = 0;\n\t\tvrLen = 2430;\n\t\tvrLoc = 1218;\n\t};\n\t942ABD9410AA1F8E0086D908 /* CGGeometry.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = CGGeometry.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Headers/CGGeometry.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t942ABE0910AA21270086D908 /* NSView.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSView.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSView.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t942ABEC510AA34820086D908 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 942ABEC610AA34820086D908 /* sqMacHostWindow.h */;\n\t\tname = \"sqMacHostWindow.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 845;\n\t\tvrLoc = 0;\n\t};\n\t942ABEC610AA34820086D908 /* sqMacHostWindow.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = sqMacHostWindow.h;\n\t\tpath = \"/Volumes/pm/Mail/IMAP-johnmci@smalltalkconsulting.com@imap.gmail.com/[Gmail]/Sent Mail.imapmbox/Attachments/2958644/8/sqMacHostWindow.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t942B77300EA7E642004B266D /* interp.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = interp.c;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/Squeak3.8.1-6747-basic#2/src32iPhone/vm/interp.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t942B77330EA7E642004B266D /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 942B77340EA7E642004B266D /* sqWin32Prefs.c */;\n\t\tname = \"sqWin32Prefs.c: 184\";\n\t\trLen = 15;\n\t\trLoc = 6379;\n\t\trType = 0;\n\t\tvrLen = 1782;\n\t\tvrLoc = 5482;\n\t};\n\t942B77340EA7E642004B266D /* sqWin32Prefs.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqWin32Prefs.c;\n\t\tpath = /Users/johnmci/Documents/SqueakHydra/platforms/win32/vm/sqWin32Prefs.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t942B77380EA7E642004B266D /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94554E6D0DF1171500FB176B /* sqWin32Window.c */;\n\t\tname = \"sqWin32Window.c: 65\";\n\t\trLen = 19;\n\t\trLoc = 2258;\n\t\trType = 0;\n\t\tvrLen = 2119;\n\t\tvrLoc = 1403;\n\t};\n\t942B778B0EA7EF0B004B266D /* sqUnixX11.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqUnixX11.c;\n\t\tpath = \"/Users/johnmci/Documents/SqueakQuicktimePlugin/platforms/unix/vm-display-X11/sqUnixX11.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t942B779B0EA7F2E0004B266D /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94554E640DF1171500FB176B /* sqUnixX11.c */;\n\t\tname = \"sqUnixX11.c: 1316\";\n\t\trLen = 6;\n\t\trLoc = 37289;\n\t\trType = 0;\n\t\tvrLen = 1058;\n\t\tvrLoc = 36631;\n\t};\n\t942B779C0EA7F2E0004B266D /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 942B778B0EA7EF0B004B266D /* sqUnixX11.c */;\n\t\tname = \"sqUnixX11.c: 1332\";\n\t\trLen = 6;\n\t\trLoc = 37592;\n\t\trType = 0;\n\t\tvrLen = 1035;\n\t\tvrLoc = 36654;\n\t};\n\t942B77B90EA800E1004B266D /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 942B77BA0EA800E1004B266D /* sqWin32Alloc.c */;\n\t\tname = \"sqWin32Alloc.c: 55\";\n\t\trLen = 10;\n\t\trLoc = 2096;\n\t\trType = 0;\n\t\tvrLen = 1633;\n\t\tvrLoc = 2014;\n\t};\n\t942B77BA0EA800E1004B266D /* sqWin32Alloc.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqWin32Alloc.c;\n\t\tpath = /Users/johnmci/Documents/SqueakHydra/platforms/win32/vm/sqWin32Alloc.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t942B77BB0EA800E1004B266D /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 942B77BC0EA800E1004B266D /* sqWin32Alloc.h */;\n\t\tname = \"sqWin32Alloc.h: 15\";\n\t\trLen = 18;\n\t\trLoc = 487;\n\t\trType = 0;\n\t\tvrLen = 955;\n\t\tvrLoc = 0;\n\t};\n\t942B77BC0EA800E1004B266D /* sqWin32Alloc.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = sqWin32Alloc.h;\n\t\tpath = /Users/johnmci/Documents/SqueakHydra/platforms/win32/vm/sqWin32Alloc.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t942B77C00EA800E1004B266D /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 942B77300EA7E642004B266D /* interp.c */;\n\t\tname = \"interp.c: 21810\";\n\t\trLen = 14;\n\t\trLoc = 688282;\n\t\trType = 0;\n\t\tvrLen = 1337;\n\t\tvrLoc = 687512;\n\t};\n\t942CF43710BFCD52008F9BB7 /* sqGnu.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = sqGnu.h;\n\t\tpath = /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/SqueakNoOGLIPhoneOSX/platforms/unix/vm/sqGnu.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t942CF46B10BCE44B009BD905 /* NSWindowController.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSWindowController.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSWindowController.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t942F48FA123C1C0C002B05DF /* SqueakUIViewCALayer.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {838, 754}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 2008}\";\n\t\t};\n\t};\n\t942F48FB123C1C0C002B05DF /* SqueakUIViewCALayer.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1440, 1651}}\";\n\t\t\tsepNavSelRange = \"{3940, 0}\";\n\t\t\tsepNavVisRange = \"{2106, 2714}\";\n\t\t\tsepNavWindowFrame = \"{{501, 9}, {1140, 1019}}\";\n\t\t};\n\t};\n\t942F48FC123C1C0C002B05DF /* SqueakUIViewOpenGL.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1123, 1092}}\";\n\t\t\tsepNavSelRange = \"{2817, 0}\";\n\t\t\tsepNavVisRange = \"{445, 2344}\";\n\t\t\tsepNavWindowFrame = \"{{15, 18}, {1170, 1005}}\";\n\t\t};\n\t};\n\t942F48FD123C1C0C002B05DF /* SqueakUIViewOpenGL.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {943, 2691}}\";\n\t\t\tsepNavSelRange = \"{7522, 0}\";\n\t\t\tsepNavVisRange = \"{4086, 1804}\";\n\t\t};\n\t};\n\t942F6FFC1102F5A300A0A349 /* NSNull.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSNull.h;\n\t\tpath = /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSNull.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t942F75D10E0B67AD00848BF2 /* sqSqueakVmAndImagePathAPI.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1169, 764}}\";\n\t\t\tsepNavSelRange = \"{1777, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1781}\";\n\t\t\tsepNavWindowFrame = \"{{913, 18}, {694, 1008}}\";\n\t\t};\n\t};\n\t942F75D20E0B67AD00848BF2 /* sqSqueakVmAndImagePathAPI.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 1053}}\";\n\t\t\tsepNavSelRange = \"{3050, 9}\";\n\t\t\tsepNavVisRange = \"{1935, 1304}\";\n\t\t\tsepNavWindowFrame = \"{{15, 8}, {1012, 1015}}\";\n\t\t};\n\t};\n\t942F761B0E0B6B6100848BF2 /* sqSqueakIPhoneApplication.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1167, 654}}\";\n\t\t\tsepNavSelRange = \"{1955, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1955}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {1573, 1024}}\";\n\t\t};\n\t};\n\t942F761C0E0B6B6100848BF2 /* sqSqueakIPhoneApplication.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 1014}}\";\n\t\t\tsepNavSelRange = \"{2308, 12}\";\n\t\t\tsepNavVisRange = \"{1439, 1670}\";\n\t\t};\n\t};\n\t942F76310E0B6C7600848BF2 /* sqSqueakMainApplication+attributes.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 1287}}\";\n\t\t\tsepNavSelRange = \"{2326, 7}\";\n\t\t\tsepNavVisRange = \"{1642, 1332}\";\n\t\t\tsepNavWindowFrame = \"{{577, 27}, {997, 998}}\";\n\t\t};\n\t};\n\t942F76350E0B6CEF00848BF2 /* sqSqueakIPhoneApplication+attributes.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1167, 654}}\";\n\t\t\tsepNavSelRange = \"{1913, 14}\";\n\t\t\tsepNavVisRange = \"{0, 1953}\";\n\t\t};\n\t};\n\t943001260E0D5D670040BB27 /* sqSqueakIPhoneApplication+imageReadWrite.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1036, 652}}\";\n\t\t\tsepNavSelRange = \"{1819, 94}\";\n\t\t\tsepNavVisRange = \"{0, 1919}\";\n\t\t\tsepNavWindowFrame = \"{{337, 21}, {1288, 857}}\";\n\t\t};\n\t};\n\t943001270E0D5D670040BB27 /* sqSqueakIPhoneApplication+imageReadWrite.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 1716}}\";\n\t\t\tsepNavSelRange = \"{2350, 0}\";\n\t\t\tsepNavVisRange = \"{3722, 1639}\";\n\t\t\tsepNavWindowFrame = \"{{38, 24}, {1017, 978}}\";\n\t\t};\n\t};\n\t943001A30E0D600C0040BB27 /* sqSqueakIPhoneFileDirectoryInterface.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1036, 652}}\";\n\t\t\tsepNavSelRange = \"{1810, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1951}\";\n\t\t};\n\t};\n\t943001A40E0D600C0040BB27 /* sqSqueakIPhoneFileDirectoryInterface.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 884}}\";\n\t\t\tsepNavSelRange = \"{2025, 19}\";\n\t\t\tsepNavVisRange = \"{1339, 1475}\";\n\t\t\tsepNavWindowFrame = \"{{38, 4}, {1274, 998}}\";\n\t\t};\n\t};\n\t9430325510BD0B6D0045D33B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAB0410AB6DC000F87527 /* NSApplication.h */;\n\t\tname = \"NSApplication.h: 314\";\n\t\trLen = 11;\n\t\trLoc = 14168;\n\t\trType = 0;\n\t\tvrLen = 2745;\n\t\tvrLoc = 14077;\n\t};\n\t9430329A10BD103B0045D33B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAF7D10ACC0D900F87527 /* NSPathUtilities.h */;\n\t\tname = \"NSPathUtilities.h: 26\";\n\t\trLen = 25;\n\t\trLoc = 696;\n\t\trType = 0;\n\t\tvrLen = 1577;\n\t\tvrLoc = 0;\n\t};\n\t9430329B10BD103B0045D33B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAC0310AB759300F87527 /* NSURL.h */;\n\t\tname = \"NSURL.h: 36\";\n\t\trLen = 5;\n\t\trLoc = 1448;\n\t\trType = 0;\n\t\tvrLen = 2612;\n\t\tvrLoc = 0;\n\t};\n\t943198450DDF4D9800EB8E60 /* sqUnixQuartz.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = sqUnixQuartz.m;\n\t\tpath = \"/Users/johnmci/Documents/SqueakHydra/platforms/unix/vm-display-Quartz/sqUnixQuartz.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94360A8C10E84CC90060221A /* NSException.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSException.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSException.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t943B9AF21235B94D0056205E /* sqSqueakOSXNSWindowController.m */ = {\n\t\tisa = PBXFileReference;\n\t\tfileEncoding = 4;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = sqSqueakOSXNSWindowController.m;\n\t\tpath = /Users/johnmci/Documents/Squeak3.8.0/platforms/iOS/vm/OSX/sqSqueakOSXNSWindowController.m;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t943B9AF71235B9FD0056205E /* sqSqueakOSXNSWindowController.m:18 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 943B9AF21235B94D0056205E /* sqSqueakOSXNSWindowController.m */;\n\t\tfunctionName = \"-windowShouldClose:\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 18;\n\t\tmodificationTime = 308445393.436679;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 0;\n\t};\n\t943B9B151235BB080056205E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C88BDD10AF3C52007CB39E /* sqSqueakOSXScreenAndWindow.h */;\n\t\tname = \"sqSqueakOSXScreenAndWindow.h: 42\";\n\t\trLen = 8;\n\t\trLoc = 1876;\n\t\trType = 0;\n\t\tvrLen = 2111;\n\t\tvrLoc = 0;\n\t};\n\t943B9B1E1235BD150056205E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E658FA0DDD03FE00358328 /* HostWindowPlugin.c */;\n\t\tname = \"HostWindowPlugin.c: 45\";\n\t\trLen = 10;\n\t\trLoc = 1148;\n\t\trType = 0;\n\t\tvrLen = 1576;\n\t\tvrLoc = 410;\n\t};\n\t943B9B281235BDD20056205E /* sqMacHostWindow.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1533, 2587}}\";\n\t\t\tsepNavSelRange = \"{2304, 11}\";\n\t\t\tsepNavVisRange = \"{1951, 552}\";\n\t\t\tsepNavWindowFrame = \"{{61, 7}, {1206, 974}}\";\n\t\t};\n\t};\n\t943B9B291235BDD20056205E /* sqMacHostWindow.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 962}}\";\n\t\t\tsepNavSelRange = \"{7, 17}\";\n\t\t\tsepNavVisRange = \"{3, 717}\";\n\t\t\tsepNavWindowFrame = \"{{15, 49}, {1206, 974}}\";\n\t\t};\n\t};\n\t943B9B9E1235BE580056205E /* sqMacHostWindow.m:58 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 943B9B281235BDD20056205E /* sqMacHostWindow.m */;\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 58;\n\t\tmodificationTime = 308445393.436735;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 0;\n\t};\n\t943B9BD31235C1120056205E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCEA2B0DDE0C1600F38F31 /* sqMacHostWindow.c */;\n\t\tname = \"sqMacHostWindow.c: 57\";\n\t\trLen = 11;\n\t\trLoc = 2260;\n\t\trType = 0;\n\t\tvrLen = 1911;\n\t\tvrLoc = 1052;\n\t};\n\t943B9BD41235C1120056205E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCE6660DDDEB5000F38F31 /* sqMacHostWindow.h */;\n\t\tname = \"sqMacHostWindow.h: 26\";\n\t\trLen = 0;\n\t\trLoc = 852;\n\t\trType = 0;\n\t\tvrLen = 2396;\n\t\tvrLoc = 266;\n\t};\n\t943B9C041235C1EE0056205E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 943B9B291235BDD20056205E /* sqMacHostWindow.h */;\n\t\tname = \"sqMacHostWindow.h: 67\";\n\t\trLen = 21;\n\t\trLoc = 2445;\n\t\trType = 0;\n\t\tvrLen = 2417;\n\t\tvrLoc = 279;\n\t};\n\t943B9C311235C3D70056205E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 943B9B281235BDD20056205E /* sqMacHostWindow.m */;\n\t\tname = \"sqMacHostWindow.m: 59\";\n\t\trLen = 0;\n\t\trLoc = 2358;\n\t\trType = 0;\n\t\tvrLen = 1772;\n\t\tvrLoc = 1480;\n\t};\n\t943B9C331235C3D70056205E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9471D2E00E04743F00703D45 /* sqSqueakAppDelegate.m */;\n\t\tname = \"sqSqueakAppDelegate.m: 45\";\n\t\trLen = 0;\n\t\trLoc = 1875;\n\t\trType = 0;\n\t\tvrLen = 1533;\n\t\tvrLoc = 1777;\n\t};\n\t943B9D621235C79C0056205E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947E642710AA0E9E00D3B69E /* sqMacV2Browser.h */;\n\t\tname = \"sqMacV2Browser.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1518;\n\t\tvrLoc = 0;\n\t};\n\t943C0AC7122DF3710086B6AD /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9402DD5E10CE0C16005C2102 /* SqViewBitmapConversion.h */;\n\t\tname = \"SqViewBitmapConversion.h: 23\";\n\t\trLen = 6;\n\t\trLoc = 1161;\n\t\trType = 0;\n\t\tvrLen = 2416;\n\t\tvrLoc = 0;\n\t};\n\t943C0AC8122DF3710086B6AD /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D3654E10CEC86C00805023 /* BitMapConversionLogicFromX11.c */;\n\t\tname = \"BitMapConversionLogicFromX11.c: 42\";\n\t\trLen = 84;\n\t\trLoc = 1749;\n\t\trType = 0;\n\t\tvrLen = 1795;\n\t\tvrLoc = 1650;\n\t};\n\t943C0ACA122DF3710086B6AD /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D3654D10CEC86C00805023 /* BitMapConversionLogicFromX11.h */;\n\t\tname = \"BitMapConversionLogicFromX11.h: 18\";\n\t\trLen = 14;\n\t\trLoc = 581;\n\t\trType = 0;\n\t\tvrLen = 1092;\n\t\tvrLoc = 0;\n\t};\n\t943C0AE0122DF5E70086B6AD /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 943C0AE1122DF5E70086B6AD /* nextdemo4.m */;\n\t\tname = \"nextdemo4.m: 86\";\n\t\trLen = 12;\n\t\trLoc = 3085;\n\t\trType = 0;\n\t\tvrLen = 1904;\n\t\tvrLoc = 2365;\n\t};\n\t943C0AE1122DF5E70086B6AD /* nextdemo4.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = nextdemo4.m;\n\t\tpath = \"/Users/johnmci/Work In Progress/stx/support/MESA/Mesa-3.0/OpenStep/Old_NeXT/nextdemo4.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t943C0AE2122DF5E70086B6AD /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 943C0AE3122DF5E70086B6AD /* CGLMacro.h */;\n\t\tname = \"CGLMacro.h: 35\";\n\t\trLen = 27;\n\t\trLoc = 1169;\n\t\trType = 0;\n\t\tvrLen = 2295;\n\t\tvrLoc = 0;\n\t};\n\t943C0AE3122DF5E70086B6AD /* CGLMacro.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = CGLMacro.h;\n\t\tpath = /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/CGLMacro.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t943C0AE5122DF5E70086B6AD /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 943C0AE6122DF5E70086B6AD /* Texturing.m */;\n\t\tname = \"Texturing.m: 14\";\n\t\trLen = 0;\n\t\trLoc = 486;\n\t\trType = 0;\n\t\tvrLen = 2764;\n\t\tvrLoc = 0;\n\t};\n\t943C0AE6122DF5E70086B6AD /* Texturing.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = Texturing.m;\n\t\tpath = \"/Volumes/330GB Photos/WWDC10-SampleCode/Mac/LayerBackedOpenGLView/Texturing.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t943C0AE7122DF5E70086B6AD /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 943C0AE8122DF5E70086B6AD /* NeonTexture.m */;\n\t\tname = \"NeonTexture.m: 21\";\n\t\trLen = 0;\n\t\trLoc = 300;\n\t\trType = 0;\n\t\tvrLen = 1130;\n\t\tvrLoc = 0;\n\t};\n\t943C0AE8122DF5E70086B6AD /* NeonTexture.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = NeonTexture.m;\n\t\tpath = \"/Volumes/pm/Mail Downloads/iProPutt/NeonEngine/NeonTexture.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t944069CD10E6B63200353B27 /* MacMenubarPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 22763}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 902}\";\n\t\t};\n\t};\n\t9441DB7111E6805300345F6C /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9452D5D80E044A9D000AD792 /* Queue.m */;\n\t\tname = \"Queue.m: 117\";\n\t\trLen = 2;\n\t\trLoc = 3624;\n\t\trType = 0;\n\t\tvrLen = 893;\n\t\tvrLoc = 2784;\n\t};\n\t9441DB7211E6805300345F6C /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 946DA91410C0C71100F26F56 /* sqSqueakOSXDropAPI.m */;\n\t\tname = \"sqSqueakOSXDropAPI.m: 53\";\n\t\trLen = 45;\n\t\trLoc = 2070;\n\t\trType = 0;\n\t\tvrLen = 2385;\n\t\tvrLoc = 718;\n\t};\n\t9448940B10F3E8FF00FB3EC8 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 943198450DDF4D9800EB8E60 /* sqUnixQuartz.m */;\n\t\tname = \"sqUnixQuartz.m: 406\";\n\t\trLen = 36;\n\t\trLoc = 11460;\n\t\trType = 0;\n\t\tvrLen = 1419;\n\t\tvrLoc = 10879;\n\t};\n\t944895AD10F4081300FB3EC8 /* PharoV10.sources */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1209, 3.55314e+06}}\";\n\t\t\tsepNavSelRange = \"{1830818, 7}\";\n\t\t\tsepNavVisRange = \"{1829163, 2429}\";\n\t\t};\n\t};\n\t944F6D171224D7B300DFC0CD /* sqSqueakOSXApplication+imageReadWrite.m:64 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 94C887FA10ADCEFC007CB39E /* sqSqueakOSXApplication+imageReadWrite.m */;\n\t\tfunctionName = \"-attempToOpenImageFromOpenPanel\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 64;\n\t\tmodificationTime = 308445393.4364201;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 0;\n\t};\n\t9451E64F123F0E9200B4119F /* PlistBookmark */ = {\n\t\tisa = PlistBookmark;\n\t\tfRef = 941D1C9A0E696FC7005B77B3 /* Entitlements.plist */;\n\t\tfallbackIsa = PBXBookmark;\n\t\tisK = 0;\n\t\tkPath = (\n\t\t);\n\t\tname = /Users/johnmci/Documents/Squeak3.8.0/platforms/iOS/vm/Entitlements.plist;\n\t\trLen = 0;\n\t\trLoc = 9223372036854775808;\n\t};\n\t9452BDC10F4095DE006410DE /* sqSqueakIPhoneApplication+Network.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1036, 652}}\";\n\t\t\tsepNavSelRange = \"{409, 0}\";\n\t\t\tsepNavVisRange = \"{0, 562}\";\n\t\t};\n\t};\n\t9452BDC20F4095DE006410DE /* sqSqueakIPhoneApplication+Network.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 845}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1067}\";\n\t\t};\n\t};\n\t9452D5D70E044A9D000AD792 /* Queue.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 845}}\";\n\t\t\tsepNavSelRange = \"{2692, 0}\";\n\t\t\tsepNavVisRange = \"{1337, 1516}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {1593, 1019}}\";\n\t\t};\n\t};\n\t9452D5D80E044A9D000AD792 /* Queue.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {970, 1612}}\";\n\t\t\tsepNavSelRange = \"{2961, 27}\";\n\t\t\tsepNavVisRange = \"{2763, 914}\";\n\t\t\tsepNavWindowFrame = \"{{38, 12}, {1017, 978}}\";\n\t\t};\n\t};\n\t9452D5D90E044A9D000AD792 /* sqMacV2Time.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1394, 2392}}\";\n\t\t\tsepNavSelRange = \"{3709, 1378}\";\n\t\t\tsepNavVisRange = \"{3710, 1377}\";\n\t\t\tsepNavWindowFrame = \"{{510, 30}, {1441, 887}}\";\n\t\t};\n\t};\n\t9452D5DA0E044A9D000AD792 /* sqMacV2Time.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1132, 762}}\";\n\t\t\tsepNavSelRange = \"{72, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1791}\";\n\t\t};\n\t};\n\t9452D5DB0E044A9D000AD792 /* sqSqueakFileDirectoryAPI.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 572}}\";\n\t\t\tsepNavSelRange = \"{1792, 10}\";\n\t\t\tsepNavVisRange = \"{3, 1942}\";\n\t\t};\n\t};\n\t9452D5DC0E044A9D000AD792 /* sqSqueakFileDirectoryAPI.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1167, 2691}}\";\n\t\t\tsepNavSelRange = \"{7520, 20}\";\n\t\t\tsepNavVisRange = \"{5747, 1848}\";\n\t\t\tsepNavWindowFrame = \"{{15, 43}, {1379, 980}}\";\n\t\t};\n\t};\n\t9452D5DD0E044A9D000AD792 /* sqSqueakFileDirectoryInterface.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 1170}}\";\n\t\t\tsepNavSelRange = \"{2012, 19}\";\n\t\t\tsepNavVisRange = \"{1284, 1422}\";\n\t\t\tsepNavWindowFrame = \"{{909, 13}, {1012, 1015}}\";\n\t\t};\n\t};\n\t9452D5DE0E044A9D000AD792 /* sqSqueakFileDirectoryInterface.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1076, 4108}}\";\n\t\t\tsepNavSelRange = \"{4849, 37}\";\n\t\t\tsepNavVisRange = \"{3923, 2369}\";\n\t\t\tsepNavWindowFrame = \"{{101, 4}, {1064, 1024}}\";\n\t\t};\n\t};\n\t9452D5DF0E044A9D000AD792 /* sqSqueakMainApp.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1327, 2210}}\";\n\t\t\tsepNavSelRange = \"{3692, 0}\";\n\t\t\tsepNavVisRange = \"{3261, 489}\";\n\t\t};\n\t};\n\t9452D5E00E044A9D000AD792 /* sqSqueakMainApp.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {936, 741}}\";\n\t\t\tsepNavSelRange = \"{1322, 449}\";\n\t\t\tsepNavVisRange = \"{0, 1868}\";\n\t\t};\n\t};\n\t9452D5E10E044A9D000AD792 /* sqSqueakMainApplication+vmAndImagePath.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {850, 778}}\";\n\t\t\tsepNavSelRange = \"{2087, 0}\";\n\t\t\tsepNavVisRange = \"{0, 2202}\";\n\t\t\tsepNavWindowFrame = \"{{15, 15}, {694, 1008}}\";\n\t\t};\n\t};\n\t9452D5E20E044A9D000AD792 /* sqSqueakMainApplication+vmAndImagePath.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 1378}}\";\n\t\t\tsepNavSelRange = \"{2343, 37}\";\n\t\t\tsepNavVisRange = \"{1830, 1334}\";\n\t\t\tsepNavWindowFrame = \"{{15, 15}, {694, 1008}}\";\n\t\t};\n\t};\n\t9452D5E30E044A9D000AD792 /* sqSqueakMainApplication.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 1157}}\";\n\t\t\tsepNavSelRange = \"{3075, 23}\";\n\t\t\tsepNavVisRange = \"{2009, 1532}\";\n\t\t\tsepNavWindowFrame = \"{{888, 14}, {694, 1008}}\";\n\t\t};\n\t};\n\t9452D5E40E044A9D000AD792 /* sqSqueakMainApplication.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 3094}}\";\n\t\t\tsepNavSelRange = \"{4926, 259}\";\n\t\t\tsepNavVisRange = \"{4926, 701}\";\n\t\t\tsepNavWindowFrame = \"{{685, 38}, {905, 983}}\";\n\t\t};\n\t};\n\t9452D6010E044CB3000AD792 /* sqSqueakAttributesAPI.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {936, 766}}\";\n\t\t\tsepNavSelRange = \"{88, 1700}\";\n\t\t\tsepNavVisRange = \"{0, 1790}\";\n\t\t};\n\t};\n\t9452D6020E044CB3000AD792 /* sqSqueakAttributesAPI.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 754}}\";\n\t\t\tsepNavSelRange = \"{2248, 12}\";\n\t\t\tsepNavVisRange = \"{776, 1571}\";\n\t\t};\n\t};\n\t9452D6060E044D2F000AD792 /* sqSqueakEventsAPI.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1036, 652}}\";\n\t\t\tsepNavSelRange = \"{78, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1785}\";\n\t\t};\n\t};\n\t9452D6070E044D2F000AD792 /* sqSqueakEventsAPI.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1538, 1118}}\";\n\t\t\tsepNavSelRange = \"{2380, 11}\";\n\t\t\tsepNavVisRange = \"{1887, 1135}\";\n\t\t\tsepNavWindowFrame = \"{{668, 4}, {1012, 1015}}\";\n\t\t};\n\t};\n\t9452D7630E0452D3000AD792 /* sqiPhoneScreenAndWindow.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {838, 606}}\";\n\t\t\tsepNavSelRange = \"{1909, 23}\";\n\t\t\tsepNavVisRange = \"{0, 1943}\";\n\t\t\tsepNavWindowFrame = \"{{15, 50}, {1346, 974}}\";\n\t\t};\n\t};\n\t9452D7640E0452D3000AD792 /* sqiPhoneScreenAndWindow.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {838, 871}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 2225}\";\n\t\t\tsepNavWindowFrame = \"{{802, 9}, {878, 1019}}\";\n\t\t};\n\t};\n\t9453F58A1234AF8A00C91CF7 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9453F58B1234AF8A00C91CF7 /* SqueakView.m */;\n\t\tname = \"SqueakView.m: 57\";\n\t\trLen = 14;\n\t\trLoc = 1275;\n\t\trType = 0;\n\t\tvrLen = 1163;\n\t\tvrLoc = 328;\n\t};\n\t9453F58B1234AF8A00C91CF7 /* SqueakView.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = SqueakView.m;\n\t\tpath = \"/Users/johnmci/Documents/SqueakHydraZBaseCheck/HydraVM-src/platforms/unix/vm-display-Quartz/SqueakView.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9453F58C1234AF8A00C91CF7 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94B88C540E81500200C98131 /* SqView.m */;\n\t\tname = \"SqView.m: 409\";\n\t\trLen = 10;\n\t\trLoc = 11118;\n\t\trType = 0;\n\t\tvrLen = 1528;\n\t\tvrLoc = 10567;\n\t};\n\t9453F58D1234AF8A00C91CF7 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9453F58E1234AF8A00C91CF7 /* sqUnixQuartz.m */;\n\t\tname = \"sqUnixQuartz.m: 1989\";\n\t\trLen = 12;\n\t\trLoc = 52050;\n\t\trType = 0;\n\t\tvrLen = 1183;\n\t\tvrLoc = 51017;\n\t};\n\t9453F58E1234AF8A00C91CF7 /* sqUnixQuartz.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = sqUnixQuartz.m;\n\t\tpath = \"/Users/johnmci/Documents/SqueakSpellingPlugin/platforms/unix/vm-display-Quartz/zzz/sqUnixQuartz.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9453F5911234AF8A00C91CF7 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9453F5921234AF8A00C91CF7 /* sqUnixQuartz.m */;\n\t\tname = \"sqUnixQuartz.m: 155\";\n\t\trLen = 23;\n\t\trLoc = 5053;\n\t\trType = 0;\n\t\tvrLen = 1549;\n\t\tvrLoc = 35560;\n\t};\n\t9453F5921234AF8A00C91CF7 /* sqUnixQuartz.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = sqUnixQuartz.m;\n\t\tpath = \"/Volumes/330GB Photos/Cog Before Aug 2010 changes/platforms/unix/vm-display-Quartz/zzz/sqUnixQuartz.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9453F5931234AF8A00C91CF7 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9453F5941234AF8A00C91CF7 /* image.c */;\n\t\tname = \"image.c: 1511\";\n\t\trLen = 12;\n\t\trLoc = 46495;\n\t\trType = 0;\n\t\tvrLen = 1885;\n\t\tvrLoc = 0;\n\t};\n\t9453F5941234AF8A00C91CF7 /* image.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = image.c;\n\t\tpath = \"/Users/johnmci/Work In Progress/stx/support/MESA/Mesa-3.0/src/image.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9453F5951234AF8A00C91CF7 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9453F5961234AF8A00C91CF7 /* OpenGLScreenReader.m */;\n\t\tname = \"OpenGLScreenReader.m: 22\";\n\t\trLen = 0;\n\t\trLoc = 939;\n\t\trType = 0;\n\t\tvrLen = 2744;\n\t\tvrLoc = 0;\n\t};\n\t9453F5961234AF8A00C91CF7 /* OpenGLScreenReader.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = OpenGLScreenReader.m;\n\t\tpath = \"/Volumes/330GB Photos/WWDC10-SampleCode/Mac/OpenGLScreenSnapshot/OpenGLScreenReader.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94547F160DE0AC7D00DD588F /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94547F170DE0AC7D00DD588F /* sqMacMain.c */;\n\t\tname = \"sqMacMain.c: 486\";\n\t\trLen = 37;\n\t\trLoc = 19144;\n\t\trType = 0;\n\t\tvrLen = 1112;\n\t\tvrLoc = 18071;\n\t};\n\t94547F170DE0AC7D00DD588F /* sqMacMain.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqMacMain.c;\n\t\tpath = \"/Users/johnmci/Documents/SqueakHydra/platforms/Mac OS/vm/sqMacMain.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9454809B0DE2945300DD588F /* sqMacUnixFileInterface.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqMacUnixFileInterface.c;\n\t\tpath = \"/Users/johnmci/Documents/SqueakHydra/platforms/Mac OS/plugins/FilePlugin/sqMacUnixFileInterface.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t945481A60DE2A79200DD588F /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9454809B0DE2945300DD588F /* sqMacUnixFileInterface.c */;\n\t\tname = \"sqMacUnixFileInterface.c: 512\";\n\t\trLen = 40;\n\t\trLoc = 16278;\n\t\trType = 0;\n\t\tvrLen = 1679;\n\t\tvrLoc = 15123;\n\t};\n\t94554E640DF1171500FB176B /* sqUnixX11.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqUnixX11.c;\n\t\tpath = \"/Users/johnmci/Documents/SqueakSpellingPlugin/platforms/unix/vm-display-X11/sqUnixX11.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94554E670DF1171500FB176B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94554E680DF1171500FB176B /* sqUnixX11.c */;\n\t\tname = \"sqUnixX11.c: 2319\";\n\t\trLen = 12;\n\t\trLoc = 63841;\n\t\trType = 0;\n\t\tvrLen = 1057;\n\t\tvrLoc = 63650;\n\t};\n\t94554E680DF1171500FB176B /* sqUnixX11.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqUnixX11.c;\n\t\tpath = \"/Users/johnmci/Documents/SqueakServicesPlugin/platforms/unix/vm-display-X11/sqUnixX11.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94554E690DF1171500FB176B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94554E6A0DF1171500FB176B /* sqMacWindow.c */;\n\t\tname = \"sqMacWindow.c: 797\";\n\t\trLen = 17;\n\t\trLoc = 29608;\n\t\trType = 0;\n\t\tvrLen = 994;\n\t\tvrLoc = 29083;\n\t};\n\t94554E6A0DF1171500FB176B /* sqMacWindow.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqMacWindow.c;\n\t\tpath = \"/Users/johnmci/Documents/SqueakServicesPlugin/platforms/Mac OS/vm/sqMacWindow.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94554E6D0DF1171500FB176B /* sqWin32Window.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqWin32Window.c;\n\t\tpath = /Users/johnmci/Documents/SqueakServicesPlugin/platforms/win32/vm/sqWin32Window.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94554E7F0DF1171500FB176B /* sqUnixMain.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqUnixMain.c;\n\t\tpath = /Users/johnmci/Documents/SqueakHydra/SqueakVMMAker/platforms/unix/vm/sqUnixMain.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94554EB80DF1A86A00FB176B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94554E7F0DF1171500FB176B /* sqUnixMain.c */;\n\t\tname = \"sqUnixMain.c: 526\";\n\t\trLen = 12;\n\t\trLoc = 12689;\n\t\trType = 0;\n\t\tvrLen = 1587;\n\t\tvrLoc = 12009;\n\t};\n\t94554F1D0DF1B65700FB176B /* sqSqueakIPhoneApplication+sound.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 572}}\";\n\t\t\tsepNavSelRange = \"{1902, 6}\";\n\t\t\tsepNavVisRange = \"{3, 1912}\";\n\t\t\tsepNavWindowFrame = \"{{15, 22}, {1064, 1001}}\";\n\t\t};\n\t};\n\t94554F1E0DF1B65700FB176B /* sqSqueakiPhoneApplication+sound.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 1001}}\";\n\t\t\tsepNavSelRange = \"{2882, 22}\";\n\t\t\tsepNavVisRange = \"{1657, 1632}\";\n\t\t};\n\t};\n\t9456C24F10B2F268000BF3DE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 942ABD9410AA1F8E0086D908 /* CGGeometry.h */;\n\t\tname = \"CGGeometry.h: 29\";\n\t\trLen = 16;\n\t\trLoc = 429;\n\t\trType = 0;\n\t\tvrLen = 1403;\n\t\tvrLoc = 0;\n\t};\n\t9456C25A10B2F2C9000BF3DE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9456C25B10B2F2C9000BF3DE /* types.h */;\n\t\tname = \"types.h: 83\";\n\t\trLen = 25;\n\t\trLoc = 3624;\n\t\trType = 0;\n\t\tvrLen = 1820;\n\t\tvrLoc = 2321;\n\t};\n\t9456C25B10B2F2C9000BF3DE /* types.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = types.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/usr/include/i386/types.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9456C2F910B32D2A000BF3DE /* NSString.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSString.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSString.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9456C32210B32F43000BF3DE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9456C32310B32F43000BF3DE /* NSClipView.h */;\n\t\tname = \"NSClipView.h: 22\";\n\t\trLen = 9;\n\t\trLoc = 509;\n\t\trType = 0;\n\t\tvrLen = 2046;\n\t\tvrLoc = 0;\n\t};\n\t9456C32310B32F43000BF3DE /* NSClipView.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSClipView.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSClipView.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9456C34E10B33618000BF3DE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9456C34F10B33618000BF3DE /* CALayer.h */;\n\t\tname = \"CALayer.h: 169\";\n\t\trLen = 35;\n\t\trLoc = 5389;\n\t\trType = 0;\n\t\tvrLen = 2280;\n\t\tvrLoc = 4266;\n\t};\n\t9456C34F10B33618000BF3DE /* CALayer.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = CALayer.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/QuartzCore.framework/Versions/A/Headers/CALayer.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9456C3CB10B341F9000BF3DE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9456C3CC10B341F9000BF3DE /* NSAffineTransform.h */;\n\t\tname = \"NSAffineTransform.h: 39\";\n\t\trLen = 8;\n\t\trLoc = 933;\n\t\trType = 0;\n\t\tvrLen = 1411;\n\t\tvrLoc = 0;\n\t};\n\t9456C3CC10B341F9000BF3DE /* NSAffineTransform.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSAffineTransform.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSAffineTransform.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94584F6110F020BD001401E7 /* ClipboardExtendedPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 3107}}\";\n\t\t\tsepNavSelRange = \"{4263, 0}\";\n\t\t\tsepNavVisRange = \"{3941, 851}\";\n\t\t};\n\t};\n\t94584FD910F02378001401E7 /* sqMacExtendedClipboard.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1132, 1469}}\";\n\t\t\tsepNavSelRange = \"{3679, 40}\";\n\t\t\tsepNavVisRange = \"{1736, 2397}\";\n\t\t\tsepNavWindowFrame = \"{{242, 4}, {1438, 968}}\";\n\t\t};\n\t};\n\t94584FDA10F02378001401E7 /* sqMacExtendedClipboard.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1357, 507}}\";\n\t\t\tsepNavSelRange = \"{1388, 0}\";\n\t\t\tsepNavVisRange = \"{336, 1542}\";\n\t\t\tsepNavWindowFrame = \"{{15, 55}, {1438, 968}}\";\n\t\t};\n\t};\n\t9458511410F03996001401E7 /* sqMacExtendedClipboard.m:101 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 94584FD910F02378001401E7 /* sqMacExtendedClipboard.m */;\n\t\tfunctionName = \"sqPasteboardCopyItemFlavorDataformatformatLength()\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 101;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 308445393.435976;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t945851EE10F03E60001401E7 /* sqMacExtendedClipboard.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1331, 873}}\";\n\t\t\tsepNavSelRange = \"{7, 24}\";\n\t\t\tsepNavVisRange = \"{0, 1878}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {1378, 1024}}\";\n\t\t};\n\t};\n\t945851EF10F03E60001401E7 /* sqMacExtendedClipboard.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1132, 1352}}\";\n\t\t\tsepNavSelRange = \"{3036, 111}\";\n\t\t\tsepNavVisRange = \"{1524, 2240}\";\n\t\t\tsepNavWindowFrame = \"{{61, 13}, {1438, 968}}\";\n\t\t};\n\t};\n\t9458523210F040A0001401E7 /* sqMacExtendedClipboard.m:37 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 945851EF10F03E60001401E7 /* sqMacExtendedClipboard.m */;\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 37;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 308445393.842733;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t9458523410F040A1001401E7 /* sqMacExtendedClipboard.m:45 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 945851EF10F03E60001401E7 /* sqMacExtendedClipboard.m */;\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 45;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 308445393.890903;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t9458523610F040A2001401E7 /* sqMacExtendedClipboard.m:50 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 945851EF10F03E60001401E7 /* sqMacExtendedClipboard.m */;\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 50;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 308445393.953986;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t9458523A10F040AF001401E7 /* sqMacExtendedClipboard.m:72 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 945851EF10F03E60001401E7 /* sqMacExtendedClipboard.m */;\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 72;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 308445393.982063;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t9458524810F04272001401E7 /* sqMacExtendedClipboard.m:88 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 945851EF10F03E60001401E7 /* sqMacExtendedClipboard.m */;\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 88;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 308445394.050499;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t9458525410F04339001401E7 /* sqSqueakIPhoneClipboardAPI.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1109, 769}}\";\n\t\t\tsepNavSelRange = \"{58, 44}\";\n\t\t\tsepNavVisRange = \"{0, 1817}\";\n\t\t};\n\t};\n\t9458525510F04339001401E7 /* sqSqueakIPhoneClipboardAPI.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1377, 808}}\";\n\t\t\tsepNavSelRange = \"{398, 28}\";\n\t\t\tsepNavVisRange = \"{0, 1345}\";\n\t\t};\n\t};\n\t9458525A10F043EB001401E7 /* sqSqueakIPhoneApplication+clipboard.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1357, 624}}\";\n\t\t\tsepNavSelRange = \"{1956, 0}\";\n\t\t\tsepNavVisRange = \"{799, 1415}\";\n\t\t};\n\t};\n\t9458525B10F043EB001401E7 /* sqSqueakIPhoneApplication+clipboard.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1167, 654}}\";\n\t\t\tsepNavSelRange = \"{695, 37}\";\n\t\t\tsepNavVisRange = \"{0, 1522}\";\n\t\t};\n\t};\n\t9458527F10F045FB001401E7 /* sqSqueakIPhoneClipboardAPI.m:31 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 9458525510F04339001401E7 /* sqSqueakIPhoneClipboardAPI.m */;\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 31;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 308445394.104406;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t9458528110F045FC001401E7 /* sqSqueakIPhoneClipboardAPI.m:24 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 9458525510F04339001401E7 /* sqSqueakIPhoneClipboardAPI.m */;\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 24;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 308445394.164388;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t9458528310F045FD001401E7 /* sqSqueakIPhoneClipboardAPI.m:17 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 9458525510F04339001401E7 /* sqSqueakIPhoneClipboardAPI.m */;\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 17;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 308445394.211606;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t945BA53B10B218F700C2020C /* math.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = math.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/usr/include/architecture/i386/math.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t945C4D7C10BB0A8500548CC1 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 945C4D7D10BB0A8500548CC1 /* OSTypes.h */;\n\t\tname = \"OSTypes.h: 73\";\n\t\trLen = 35;\n\t\trLoc = 2233;\n\t\trType = 0;\n\t\tvrLen = 1245;\n\t\tvrLoc = 1528;\n\t};\n\t945C4D7D10BB0A8500548CC1 /* OSTypes.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = OSTypes.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/usr/include/libkern/OSTypes.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t945C4EAC10BB348300548CC1 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAAE810AB6C3500F87527 /* NSFileManager.h */;\n\t\tname = \"NSFileManager.h: 162\";\n\t\trLen = 14;\n\t\trLoc = 11455;\n\t\trType = 0;\n\t\tvrLen = 4578;\n\t\tvrLoc = 9506;\n\t};\n\t945E9D7C0DE525E100CDF01E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 945E9D7D0DE525E100CDF01E /* npsqueak.c */;\n\t\tname = \"npsqueak.c: 1113\";\n\t\trLen = 21;\n\t\trLoc = 33897;\n\t\trType = 0;\n\t\tvrLen = 2274;\n\t\tvrLoc = 32164;\n\t};\n\t945E9D7D0DE525E100CDF01E /* npsqueak.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = npsqueak.c;\n\t\tpath = \"/Users/johnmci/Documents/SqueakBrowserPlugin/platforms/Mac OS/vm/npsqueak/npsqueak.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t945F30620E0C6A5000CFF3DC /* SqueakApplication.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = SqueakApplication.m;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/CocoaSqueak-3.0.4/src/CocoaSqueak/SqueakApplication.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t945F30670E0C6A5000CFF3DC /* SqueakInterpreter.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = SqueakInterpreter.m;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/CocoaSqueak-3.0.4/src/Squeak/SqueakInterpreter.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t945F30FC0E0C763800CFF3DC /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 945F30670E0C6A5000CFF3DC /* SqueakInterpreter.m */;\n\t\tname = \"SqueakInterpreter.m: 200\";\n\t\trLen = 13;\n\t\trLoc = 5497;\n\t\trType = 0;\n\t\tvrLen = 1593;\n\t\tvrLoc = 2040;\n\t};\n\t94638B260EAFB77B00A3F155 /* iPhone.changes */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1533, 1.75974e+06}}\";\n\t\t\tsepNavSelRange = \"{5549550, 0}\";\n\t\t\tsepNavVisRange = \"{6141, 671}\";\n\t\t};\n\t};\n\t94638CEA0EB16F1100A3F155 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94638CEB0EB16F1100A3F155 /* unxMapMemory.h */;\n\t\tname = \"unxMapMemory.h: 270\";\n\t\trLen = 6;\n\t\trLoc = 8341;\n\t\trType = 0;\n\t\tvrLen = 1425;\n\t\tvrLoc = 0;\n\t};\n\t94638CEB0EB16F1100A3F155 /* unxMapMemory.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = unxMapMemory.h;\n\t\tpath = \"/Users/johnmci/Work In Progress/cincom/VWSourceCode/bkup621/src-51.4/plat/unxMapMemory.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94638CF50EB16F1100A3F155 /* sqUnixMemory.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqUnixMemory.c;\n\t\tpath = /Users/johnmci/Documents/SqueakHydra/platforms/unix/vm/sqUnixMemory.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9463943D0E95845000015851 /* squeakSUnitTester.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1219, 2646}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1036}\";\n\t\t};\n\t};\n\t9463943E0E95845000015851 /* squeakSUnitTester.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 6762}}\";\n\t\t\tsepNavSelRange = \"{4085, 11}\";\n\t\t\tsepNavVisRange = \"{3547, 944}\";\n\t\t};\n\t};\n\t9468DA7511EC31F6000ECA16 /* main time.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = \"main time.c\";\n\t\tpath = \"/Users/johnmci/Documents/temp/time_foobar/main time.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t946C240C1230A80A004938A1 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9471D2DF0E04743F00703D45 /* sqSqueakAppDelegate.h */;\n\t\tname = \"sqSqueakAppDelegate.h: 55\";\n\t\trLen = 12;\n\t\trLoc = 2271;\n\t\trType = 0;\n\t\tvrLen = 2324;\n\t\tvrLoc = 0;\n\t};\n\t946D973B0FE165B70038846B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 946D973C0FE165B70038846B /* sqSqueakEventsAPI.m */;\n\t\tname = \"sqSqueakEventsAPI.m: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 989;\n\t\tvrLoc = 2044;\n\t};\n\t946D973C0FE165B70038846B /* sqSqueakEventsAPI.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = sqSqueakEventsAPI.m;\n\t\tpath = \"/Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/WikiWikiServer/platforms/Mac OSObjC/vm/Common/Classes/sqSqueakEventsAPI.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t946DA77210C09A8C00F26F56 /* sqUnixQuartz.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = sqUnixQuartz.m;\n\t\tpath = \"/Users/johnmci/Documents/SqueakPrintJobPlugin/platforms/unix/vm-display-Quartz/sqUnixQuartz.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t946DA7D710C0A6C700F26F56 /* NSWindow.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSWindow.h;\n\t\tpath = /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSWindow.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t946DA7E010C0A7A400F26F56 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 946DA7E110C0A7A400F26F56 /* NSView.h */;\n\t\tname = \"NSView.h: 327\";\n\t\trLen = 23;\n\t\trLoc = 10791;\n\t\trType = 0;\n\t\tvrLen = 2404;\n\t\tvrLoc = 9657;\n\t};\n\t946DA7E110C0A7A400F26F56 /* NSView.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSView.h;\n\t\tpath = /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSView.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t946DA8D210C0C30D00F26F56 /* DropPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 2496}}\";\n\t\t\tsepNavSelRange = \"{2324, 0}\";\n\t\t\tsepNavVisRange = \"{1835, 1278}\";\n\t\t\tsepNavWindowFrame = \"{{254, 4}, {1426, 1019}}\";\n\t\t};\n\t};\n\t946DA8D910C0C32800F26F56 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 946DA7D710C0A6C700F26F56 /* NSWindow.h */;\n\t\tname = \"NSWindow.h: 580\";\n\t\trLen = 23;\n\t\trLoc = 22568;\n\t\trType = 0;\n\t\tvrLen = 2638;\n\t\tvrLoc = 21350;\n\t};\n\t946DA8DA10C0C32800F26F56 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 946DA77210C09A8C00F26F56 /* sqUnixQuartz.m */;\n\t\tname = \"sqUnixQuartz.m: 2093\";\n\t\trLen = 0;\n\t\trLoc = 54353;\n\t\trType = 0;\n\t\tvrLen = 1177;\n\t\tvrLoc = 53870;\n\t};\n\t946DA8DB10C0C32800F26F56 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 946DA8DC10C0C32800F26F56 /* NSDragging.h */;\n\t\tname = \"NSDragging.h: 56\";\n\t\trLen = 64;\n\t\trLoc = 1665;\n\t\trType = 0;\n\t\tvrLen = 2094;\n\t\tvrLoc = 0;\n\t};\n\t946DA8DC10C0C32800F26F56 /* NSDragging.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSDragging.h;\n\t\tpath = /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSDragging.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t946DA8EF10C0C38600F26F56 /* DropPlugin.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1357, 169}}\";\n\t\t\tsepNavSelRange = \"{300, 21}\";\n\t\t\tsepNavVisRange = \"{0, 490}\";\n\t\t};\n\t};\n\t946DA91310C0C71100F26F56 /* sqSqueakOSXDropAPI.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1357, 507}}\";\n\t\t\tsepNavSelRange = \"{7, 20}\";\n\t\t\tsepNavVisRange = \"{0, 400}\";\n\t\t};\n\t};\n\t946DA91410C0C71100F26F56 /* sqSqueakOSXDropAPI.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 1027}}\";\n\t\t\tsepNavSelRange = \"{2218, 8}\";\n\t\t\tsepNavVisRange = \"{1320, 1285}\";\n\t\t\tsepNavWindowFrame = \"{{15, 13}, {1326, 1010}}\";\n\t\t};\n\t};\n\t946DA9FF10C0D35500F26F56 /* sqMacUnixExternalPrims.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 4056}}\";\n\t\t\tsepNavSelRange = \"{2314, 23}\";\n\t\t\tsepNavVisRange = \"{1497, 1319}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {1426, 1019}}\";\n\t\t};\n\t};\n\t946DAA3810C0D8B700F26F56 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 946DAA3910C0D8B700F26F56 /* sqUnixMain.c */;\n\t\tname = \"sqUnixMain.c: 709\";\n\t\trLen = 12;\n\t\trLoc = 18115;\n\t\trType = 0;\n\t\tvrLen = 1874;\n\t\tvrLoc = 17010;\n\t};\n\t946DAA3910C0D8B700F26F56 /* sqUnixMain.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqUnixMain.c;\n\t\tpath = /Users/johnmci/Documents/SqueakExuperyPlugin/platforms/unix/vm/sqUnixMain.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t946DAA3A10C0D8B700F26F56 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 946DAA3B10C0D8B700F26F56 /* sqMacMain.c */;\n\t\tname = \"sqMacMain.c: 473\";\n\t\trLen = 13;\n\t\trLoc = 17090;\n\t\trType = 0;\n\t\tvrLen = 2581;\n\t\tvrLoc = 14967;\n\t};\n\t946DAA3B10C0D8B700F26F56 /* sqMacMain.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqMacMain.c;\n\t\tpath = \"/Users/johnmci/Documents/SqueakExuperyPlugin/platforms/Mac OS/vm/sqMacMain.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t946DAA3C10C0D8B700F26F56 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 946DAA3D10C0D8B700F26F56 /* sqUnixExternalPrims.c */;\n\t\tname = \"sqUnixExternalPrims.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1365;\n\t\tvrLoc = 4834;\n\t};\n\t946DAA3D10C0D8B700F26F56 /* sqUnixExternalPrims.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqUnixExternalPrims.c;\n\t\tpath = \"/Users/johnmci/Documents/SqueakHydraZBaseCheck/HydraVM-src/platforms/unix/vm/sqUnixExternalPrims.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94700A50123DF62D00874318 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 942F761C0E0B6B6100848BF2 /* sqSqueakIPhoneApplication.m */;\n\t\tname = \"sqSqueakIPhoneApplication.m: 43\";\n\t\trLen = 12;\n\t\trLoc = 1918;\n\t\trType = 0;\n\t\tvrLen = 1878;\n\t\tvrLoc = 1325;\n\t};\n\t94700A51123DF62D00874318 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94A0E8450DE5EB6E0071C8B9 /* sqSqueakIPhoneApplication+attributes.m */;\n\t\tname = \"sqSqueakIPhoneApplication+attributes.m: 102\";\n\t\trLen = 0;\n\t\trLoc = 4729;\n\t\trType = 0;\n\t\tvrLen = 2560;\n\t\tvrLoc = 2120;\n\t};\n\t94700AAD123DFCEA00874318 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 1D3623240D0F684500981E51 /* SqueakNoOGLIPhoneAppDelegate.h */;\n\t\tname = \"SqueakNoOGLIPhoneAppDelegate.h: 60\";\n\t\trLen = 12;\n\t\trLoc = 3089;\n\t\trType = 0;\n\t\tvrLen = 2653;\n\t\tvrLoc = 656;\n\t};\n\t9471D2710E04703B00703D45 /* sqSqueakScreenAndWindow.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1299, 988}}\";\n\t\t\tsepNavSelRange = \"{1903, 56}\";\n\t\t\tsepNavVisRange = \"{446, 2520}\";\n\t\t\tsepNavWindowFrame = \"{{15, 49}, {1346, 974}}\";\n\t\t};\n\t};\n\t9471D2720E04703B00703D45 /* sqSqueakScreenAndWindow.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1496, 2678}}\";\n\t\t\tsepNavSelRange = \"{3533, 13}\";\n\t\t\tsepNavVisRange = \"{2713, 1763}\";\n\t\t\tsepNavWindowFrame = \"{{496, 9}, {1131, 1019}}\";\n\t\t};\n\t};\n\t9471D2DF0E04743F00703D45 /* sqSqueakAppDelegate.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1331, 896}}\";\n\t\t\tsepNavSelRange = \"{2271, 12}\";\n\t\t\tsepNavVisRange = \"{0, 2324}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {1378, 1024}}\";\n\t\t};\n\t};\n\t9471D2E00E04743F00703D45 /* sqSqueakAppDelegate.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 1482}}\";\n\t\t\tsepNavSelRange = \"{2932, 32}\";\n\t\t\tsepNavVisRange = \"{2325, 1128}\";\n\t\t\tsepNavWindowFrame = \"{{264, 7}, {1416, 1021}}\";\n\t\t};\n\t};\n\t947332EE0EA70E8C003F9084 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947332EF0EA70E8C003F9084 /* sqWin32Stubs.c */;\n\t\tname = \"sqWin32Stubs.c: 18\";\n\t\trLen = 18;\n\t\trLoc = 607;\n\t\trType = 0;\n\t\tvrLen = 2348;\n\t\tvrLoc = 0;\n\t};\n\t947332EF0EA70E8C003F9084 /* sqWin32Stubs.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqWin32Stubs.c;\n\t\tpath = /Users/johnmci/Documents/SqueakHydra/platforms/win32/vm/sqWin32Stubs.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9473A34810BBD84100ED7D00 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCACE310AB8AE300F87527 /* NSObject.h */;\n\t\tname = \"NSObject.h: 74\";\n\t\trLen = 3;\n\t\trLoc = 1310;\n\t\trType = 0;\n\t\tvrLen = 1170;\n\t\tvrLoc = 936;\n\t};\n\t9473A95A1102F70B00D135CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 942F6FFC1102F5A300A0A349 /* NSNull.h */;\n\t\tname = \"NSNull.h: 9\";\n\t\trLen = 0;\n\t\trLoc = 159;\n\t\trType = 0;\n\t\tvrLen = 184;\n\t\tvrLoc = 0;\n\t};\n\t9473A9701103BE0A00D135CB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 942CF43710BFCD52008F9BB7 /* sqGnu.h */;\n\t\tname = \"sqGnu.h: 187\";\n\t\trLen = 0;\n\t\trLoc = 11295;\n\t\trType = 0;\n\t\tvrLen = 2361;\n\t\tvrLoc = 9051;\n\t};\n\t9475A83511E6B5D50010FB38 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9478E02B0EC8D957007096A7 /* squeakSUnitTester.m */;\n\t\tname = \"squeakSUnitTester.m: 126\";\n\t\trLen = 19;\n\t\trLoc = 3571;\n\t\trType = 0;\n\t\tvrLen = 843;\n\t\tvrLoc = 2970;\n\t};\n\t9475F4DB10BEF4100047A24B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E4936F10BD39E20011AC75 /* sqUnixQuartz.m */;\n\t\tname = \"sqUnixQuartz.m: 2177\";\n\t\trLen = 0;\n\t\trLoc = 56455;\n\t\trType = 0;\n\t\tvrLen = 1151;\n\t\tvrLoc = 55829;\n\t};\n\t9475F56B10BF20A00047A24B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9475F56C10BF20A00047A24B /* AudioQueue.h */;\n\t\tname = \"AudioQueue.h: 1116\";\n\t\trLen = 66;\n\t\trLoc = 56155;\n\t\trType = 0;\n\t\tvrLen = 2628;\n\t\tvrLoc = 54742;\n\t};\n\t9475F56C10BF20A00047A24B /* AudioQueue.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = AudioQueue.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AudioToolbox.framework/Versions/A/Headers/AudioQueue.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9475F58210BF227D0047A24B /* NSApplication.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSApplication.h;\n\t\tpath = /System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSApplication.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9475F5A710BF25A10047A24B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9475F58210BF227D0047A24B /* NSApplication.h */;\n\t\tname = \"NSApplication.h: 18\";\n\t\trLen = 21;\n\t\trLoc = 470;\n\t\trType = 0;\n\t\tvrLen = 1966;\n\t\tvrLoc = 0;\n\t};\n\t947713C410C45DD700890A9B /* NSDebug.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSDebug.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSDebug.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t947713D410C45E5F00890A9B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947713C410C45DD700890A9B /* NSDebug.h */;\n\t\tname = \"NSDebug.h: 53\";\n\t\trLen = 36;\n\t\trLoc = 2244;\n\t\trType = 0;\n\t\tvrLen = 2334;\n\t\tvrLoc = 74;\n\t};\n\t9478E0250EC8D957007096A7 /* dummyFFI.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 2652}}\";\n\t\t\tsepNavSelRange = \"{3356, 8}\";\n\t\t\tsepNavVisRange = \"{2987, 642}\";\n\t\t};\n\t};\n\t9478E0260EC8D957007096A7 /* dummyFFI.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {899, 548}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1760}\";\n\t\t\tsepNavWindowFrame = \"{{15, 166}, {1288, 857}}\";\n\t\t};\n\t};\n\t9478E02A0EC8D957007096A7 /* squeakSUnitTester.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {964, 2535}}\";\n\t\t\tsepNavSelRange = \"{1808, 17}\";\n\t\t\tsepNavVisRange = \"{0, 2274}\";\n\t\t};\n\t};\n\t9478E02B0EC8D957007096A7 /* squeakSUnitTester.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1327, 6136}}\";\n\t\t\tsepNavSelRange = \"{3608, 0}\";\n\t\t\tsepNavVisRange = \"{2696, 1348}\";\n\t\t};\n\t};\n\t9478E0320EC8D98F007096A7 /* sqSqueakSoundCoreAudioAPI.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1109, 720}}\";\n\t\t\tsepNavSelRange = \"{103, 1666}\";\n\t\t\tsepNavVisRange = \"{0, 1809}\";\n\t\t};\n\t};\n\t9478E0330EC8D98F007096A7 /* sqSqueakSoundCoreAudioAPI.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1377, 1157}}\";\n\t\t\tsepNavSelRange = \"{2223, 98}\";\n\t\t\tsepNavVisRange = \"{1767, 2249}\";\n\t\t\tsepNavWindowFrame = \"{{15, 13}, {1326, 1010}}\";\n\t\t};\n\t};\n\t9478E05E0EC8DCFB007096A7 /* sqSqueakSoundCoreAudio.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1062, 1404}}\";\n\t\t\tsepNavSelRange = \"{2883, 135}\";\n\t\t\tsepNavVisRange = \"{1833, 2636}\";\n\t\t\tsepNavWindowFrame = \"{{52, 4}, {997, 998}}\";\n\t\t};\n\t};\n\t9478E05F0EC8DCFB007096A7 /* sqSqueakSoundCoreAudio.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1540, 5941}}\";\n\t\t\tsepNavSelRange = \"{11445, 29}\";\n\t\t\tsepNavVisRange = \"{10202, 2807}\";\n\t\t\tsepNavWindowFrame = \"{{38, 4}, {1587, 998}}\";\n\t\t};\n\t};\n\t9478E13D0EC8EB46007096A7 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9478E13E0EC8EB46007096A7 /* AudioQueue.h */;\n\t\tname = \"AudioQueue.h: 2\";\n\t\trLen = 10;\n\t\trLoc = 19;\n\t\trType = 0;\n\t\tvrLen = 1351;\n\t\tvrLoc = 0;\n\t};\n\t9478E13E0EC8EB46007096A7 /* AudioQueue.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = AudioQueue.h;\n\t\tpath = /System/Library/Frameworks/AudioToolbox.framework/Headers/AudioQueue.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t947923FE1102BE53007C87F8 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947923FF1102BE53007C87F8 /* sqUnixMain.c */;\n\t\tname = \"sqUnixMain.c: 176\";\n\t\trLen = 281;\n\t\trLoc = 5149;\n\t\trType = 0;\n\t\tvrLen = 1173;\n\t\tvrLoc = 4547;\n\t};\n\t947923FF1102BE53007C87F8 /* sqUnixMain.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqUnixMain.c;\n\t\tpath = /Volumes/px2/business/SqueakiPhone/archivesOLDSTUFF/platformsOLDDrawing/unix/vm/sqUnixMain.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t947E20F50EB281C5007957D0 /* SqueakFFIPrims.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1132, 37440}}\";\n\t\t\tsepNavSelRange = \"{75408, 0}\";\n\t\t\tsepNavVisRange = \"{75315, 897}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {1385, 1024}}\";\n\t\t};\n\t};\n\t947E20F90EB2826C007957D0 /* sqFFI.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1132, 2210}}\";\n\t\t\tsepNavSelRange = \"{2071, 8}\";\n\t\t\tsepNavVisRange = \"{1307, 1682}\";\n\t\t};\n\t};\n\t947E210C0EB28486007957D0 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94638CF50EB16F1100A3F155 /* sqUnixMemory.c */;\n\t\tname = \"sqUnixMemory.c: 214\";\n\t\trLen = 6;\n\t\trLoc = 6843;\n\t\trType = 0;\n\t\tvrLen = 1296;\n\t\tvrLoc = 6040;\n\t};\n\t947E21310EB2868A007957D0 /* dummyFFI.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {831, 494}}\";\n\t\t\tsepNavSelRange = \"{87, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1201}\";\n\t\t};\n\t};\n\t947E21320EB2868A007957D0 /* dummyFFI.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 2587}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 891}\";\n\t\t};\n\t};\n\t947E5F9310A9FF4A00D3B69E /* SqueakPureObjc_Prefix.pch */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 277}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 149}\";\n\t\t\tsepNavWindowFrame = \"{{15, 45}, {1017, 978}}\";\n\t\t};\n\t};\n\t947E5F9F10A9FFA000D3B69E /* SqueakPureObjc-Info.plist */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {972, 7812}}\";\n\t\t\tsepNavSelRange = \"{13195, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 7107}, {972, 697}}\";\n\t\t\tsepNavWindowFrame = \"{{15, 18}, {1170, 1005}}\";\n\t\t};\n\t};\n\t947E61D610AA049300D3B69E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947E61D710AA049300D3B69E /* Availability.h */;\n\t\tname = \"Availability.h: 124\";\n\t\trLen = 11;\n\t\trLoc = 5703;\n\t\trType = 0;\n\t\tvrLen = 2202;\n\t\tvrLoc = 4378;\n\t};\n\t947E61D710AA049300D3B69E /* Availability.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = Availability.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/usr/include/Availability.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t947E61DA10AA049300D3B69E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947E61DB10AA049300D3B69E /* AudioFileStream.h */;\n\t\tname = \"AudioFileStream.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 805;\n\t\tvrLoc = 0;\n\t};\n\t947E61DB10AA049300D3B69E /* AudioFileStream.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = AudioFileStream.h;\n\t\tpath = /System/Library/Frameworks/AudioToolbox.framework/Headers/AudioFileStream.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t947E61DC10AA049300D3B69E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947E61DD10AA049300D3B69E /* AudioFormat.h */;\n\t\tname = \"AudioFormat.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 779;\n\t\tvrLoc = 0;\n\t};\n\t947E61DD10AA049300D3B69E /* AudioFormat.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = AudioFormat.h;\n\t\tpath = /System/Library/Frameworks/AudioToolbox.framework/Headers/AudioFormat.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t947E626F10AA098300D3B69E /* SqueakPureObjc */ = {\n\t\tactiveExec = 0;\n\t\texecutables = (\n\t\t\t947E62FD10AA098300D3B69E /* SqueakPureObjc */,\n\t\t);\n\t};\n\t947E62FD10AA098300D3B69E /* SqueakPureObjc */ = {\n\t\tisa = PBXExecutable;\n\t\tactiveArgIndices = (\n\t\t\tNO,\n\t\t\tNO,\n\t\t\tNO,\n\t\t\tNO,\n\t\t\tNO,\n\t\t);\n\t\targumentStrings = (\n\t\t\t\"-memory 52m\",\n\t\t\t\"-help\",\n\t\t\tbork.image,\n\t\t\t232,\n\t\t\t242,\n\t\t);\n\t\tautoAttachOnCrash = 1;\n\t\tbreakpointsEnabled = 1;\n\t\tconfigStateDict = {\n\t\t};\n\t\tcustomDataFormattersEnabled = 1;\n\t\tdataTipCustomDataFormattersEnabled = 1;\n\t\tdataTipShowTypeColumn = 1;\n\t\tdataTipSortType = 0;\n\t\tdebuggerPlugin = GDBDebugging;\n\t\tdisassemblyDisplayState = 0;\n\t\tdylibVariantSuffix = \"\";\n\t\tenableDebugStr = 1;\n\t\tenvironmentEntries = (\n\t\t\t{\n\t\t\t\tactive = NO;\n\t\t\t\tname = NSAutoreleaseHaltOnFreedObject;\n\t\t\t\tvalue = YES;\n\t\t\t},\n\t\t\t{\n\t\t\t\tactive = NO;\n\t\t\t\tname = NSDebugEnabled;\n\t\t\t\tvalue = YES;\n\t\t\t},\n\t\t\t{\n\t\t\t\tactive = NO;\n\t\t\t\tname = NSAutoreleaseFreedObjectCheckEnabled;\n\t\t\t\tvalue = YES;\n\t\t\t},\n\t\t\t{\n\t\t\t\tactive = NO;\n\t\t\t\tname = NSZombieEnabled;\n\t\t\t\tvalue = YES;\n\t\t\t},\n\t\t\t{\n\t\t\t\tactive = NO;\n\t\t\t\tname = DYLD_INSERT_LIBRARIES;\n\t\t\t\tvalue = /usr/lib/libMallocDebug.A.dylib;\n\t\t\t},\n\t\t\t{\n\t\t\t\tactive = NO;\n\t\t\t\tname = MallocPreScribble;\n\t\t\t\tvalue = YES;\n\t\t\t},\n\t\t\t{\n\t\t\t\tactive = NO;\n\t\t\t\tname = MallocScribble;\n\t\t\t\tvalue = YES;\n\t\t\t},\n\t\t\t{\n\t\t\t\tactive = NO;\n\t\t\t\tname = MallocGuardEdges;\n\t\t\t\tvalue = YES;\n\t\t\t},\n\t\t);\n\t\texecutableSystemSymbolLevel = 0;\n\t\texecutableUserSymbolLevel = 0;\n\t\tlibgmallocEnabled = 0;\n\t\tname = SqueakPureObjc;\n\t\tsavedGlobals = {\n\t\t};\n\t\tshowTypeColumn = 0;\n\t\tsourceDirectories = (\n\t\t);\n\t\tvariableFormatDictionary = {\n\t\t\t$cs = 1;\n\t\t\t$ds = 1;\n\t\t\t$eflags = 1;\n\t\t\t$es = 1;\n\t\t\t$fs = 1;\n\t\t\t$gs = 1;\n\t\t\t$r10 = 1;\n\t\t\t$r11 = 1;\n\t\t\t$r12 = 1;\n\t\t\t$r13 = 1;\n\t\t\t$r14 = 1;\n\t\t\t$r15 = 1;\n\t\t\t$r8 = 1;\n\t\t\t$r9 = 1;\n\t\t\t$rax = 1;\n\t\t\t$rbp = 1;\n\t\t\t$rbx = 1;\n\t\t\t$rcx = 1;\n\t\t\t$rdi = 1;\n\t\t\t$rdx = 1;\n\t\t\t$rip = 1;\n\t\t\t$rsi = 1;\n\t\t\t$rsp = 1;\n\t\t\t$ss = 1;\n\t\t\t\"*from-short unsigned int-copyImage16To32\" = 3;\n\t\t\t\"_return_value-sqInt-primitiveGetMenuHandle\" = 1;\n\t\t\t\"actually-void *-sqAllocateMemoryMac\" = 2;\n\t\t\t\"b-unsigned char--[sqSqueakOSXNSView(BitmapConversion) extractPixels_16_to_32:srcPixelWidth:left:right:top:bottom:position:]\" = 3;\n\t\t\t\"bits-NSInteger-\\U0001\\U0000-[sqSqueakOSXApplication(cursor) setCursor:withMask:offsetX:offsetY:]\" = 3;\n\t\t\t\"currentVMEncoding-NSInteger-\\U0001\\U0000-[sqSqueakMainApplication(attributes) getAttribute:]\" = 1;\n\t\t\t\"endAddr-long unsigned int-sqMakeMemoryNotExecutableFromTo\" = 1;\n\t\t\t\"firstPage-long unsigned int-sqMakeMemoryNotExecutableFromTo\" = 1;\n\t\t\t\"g-unsigned char--[sqSqueakOSXNSView(BitmapConversion) extractPixels_16_to_32:srcPixelWidth:left:right:top:bottom:position:]\" = 3;\n\t\t\t\"inCommandID-MenuCommand-GetIndMenuItemWithCommandID\" = 5;\n\t\t\t\"inputCommandID-OSType-GetIndMenuItemWithCommandID\" = 5;\n\t\t\t\"keyBoardModifiers-NSUInteger--[sqSqueakOSXApplication(events) translateCocoaModifiersToCarbonModifiers:]\" = 3;\n\t\t\t\"mask-NSInteger-\\U0001\\U0000-[sqSqueakOSXApplication(cursor) setCursor:withMask:offsetX:offsetY:]\" = 3;\n\t\t\tmemory = 1;\n\t\t\t\"modifierFlags-NSUInteger--[sqSqueakOSXNSView doCommandBySelector:]\" = 3;\n\t\t\t\"modifierFlags-NSUInteger--[sqSqueakOSXNSView fakeKeyDownUp:]\" = 1;\n\t\t\t\"oop-usqInt-pointerForOop\" = 1;\n\t\t\t\"oop-usqInt-sweepPhase\" = 2;\n\t\t\t\"ptr-char *-longAtPointerput\" = 2;\n\t\t\t\"r-unsigned char--[sqSqueakOSXNSView(BitmapConversion) extractPixels_16_to_32:srcPixelWidth:left:right:top:bottom:position:]\" = 3;\n\t\t\t\"rgb-short int--[sqSqueakOSXNSView(BitmapConversion) extractPixels_16_to_32:srcPixelWidth:left:right:top:bottom:position:]\" = 3;\n\t\t\t\"rgb-short unsigned int--[sqSqueakOSXNSView(BitmapConversion) extractPixels_16_to_32:srcPixelWidth:left:right:top:bottom:position:]\" = 3;\n\t\t\t\"shift-NSUInteger-\\U0001\\U0000-[sqSqueakOSXApplication(cursor) setCursor:withMask:offsetX:offsetY:]\" = 3;\n\t\t\t\"squeakModifiers-int--[sqSqueakOSXApplication(events) translateCocoaModifiersToSqueakModifiers:]\" = 3;\n\t\t\t\"startAddr-long unsigned int-sqMakeMemoryNotExecutableFromTo\" = 1;\n\t\t\t\"to1-int-copyImage16To32\" = 3;\n\t\t\t\"to2-int-copyImage16To32\" = 1;\n\t\t};\n\t};\n\t947E642710AA0E9E00D3B69E /* sqMacV2Browser.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1167, 756}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1518}\";\n\t\t};\n\t};\n\t947E642810AA0E9E00D3B69E /* sqMacV2Browser.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {802, 780}}\";\n\t\t\tsepNavSelRange = \"{1504, 0}\";\n\t\t\tsepNavVisRange = \"{492, 1556}\";\n\t\t};\n\t};\n\t947E647910AA100900D3B69E /* SqueakOSXAppDelegate.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {970, 850}}\";\n\t\t\tsepNavSelRange = \"{2101, 17}\";\n\t\t\tsepNavVisRange = \"{0, 2472}\";\n\t\t\tsepNavWindowFrame = \"{{522, 48}, {1017, 978}}\";\n\t\t};\n\t};\n\t947E647A10AA100900D3B69E /* SqueakOSXAppDelegate.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 2431}}\";\n\t\t\tsepNavSelRange = \"{6384, 120}\";\n\t\t\tsepNavVisRange = \"{5242, 1273}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {1426, 1019}}\";\n\t\t};\n\t};\n\t947E64CA10AA16FE00D3B69E /* sqSqueakOSXApplication.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1379, 891}}\";\n\t\t\tsepNavSelRange = \"{2392, 0}\";\n\t\t\tsepNavVisRange = \"{0, 2397}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {1426, 1019}}\";\n\t\t};\n\t};\n\t947E64CB10AA16FE00D3B69E /* sqSqueakOSXApplication.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 3315}}\";\n\t\t\tsepNavSelRange = \"{3879, 23}\";\n\t\t\tsepNavVisRange = \"{3183, 1249}\";\n\t\t\tsepNavWindowFrame = \"{{522, 48}, {1017, 978}}\";\n\t\t};\n\t};\n\t947E9920125D73FD0048E783 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94210B280E956AC200C1A314 /* ObjectiveCPlugin.c */;\n\t\tname = \"ObjectiveCPlugin.c: 1915\";\n\t\trLen = 9;\n\t\trLoc = 53186;\n\t\trType = 0;\n\t\tvrLen = 1628;\n\t\tvrLoc = 52405;\n\t};\n\t947E9964125D756D0048E783 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94B8F54E10CF677800F0DD6B /* SqViewClut.h */;\n\t\tname = \"SqViewClut.h: 1\";\n\t\trLen = 12;\n\t\trLoc = 3;\n\t\trType = 0;\n\t\tvrLen = 254;\n\t\tvrLoc = 0;\n\t};\n\t947E9967125D756D0048E783 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947E9968125D756D0048E783 /* renderer.cpp */;\n\t\tname = \"renderer.cpp: 58\";\n\t\trLen = 16;\n\t\trLoc = 2694;\n\t\trType = 0;\n\t\tvrLen = 1974;\n\t\tvrLoc = 1631;\n\t};\n\t947E9968125D756D0048E783 /* renderer.cpp */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.cpp.cpp;\n\t\tname = renderer.cpp;\n\t\tpath = \"/Volumes/330GB Photos/WWDC10-SampleCode/Mac/ConditionalRendering/renderer.cpp\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t947E9969125D756D0048E783 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947E996A125D756D0048E783 /* EAGLView.m */;\n\t\tname = \"EAGLView.m: 277\";\n\t\trLen = 7;\n\t\trLoc = 7216;\n\t\trType = 0;\n\t\tvrLen = 1635;\n\t\tvrLoc = 6438;\n\t};\n\t947E996A125D756D0048E783 /* EAGLView.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = EAGLView.m;\n\t\tpath = /Users/johnmci/Shared/RayPicking/Classes/EAGLView.m;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t947E996B125D756D0048E783 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947E996C125D756D0048E783 /* ES1Renderer.m */;\n\t\tname = \"ES1Renderer.m: 155\";\n\t\trLen = 7;\n\t\trLoc = 4891;\n\t\trType = 0;\n\t\tvrLen = 2162;\n\t\tvrLoc = 4012;\n\t};\n\t947E996C125D756D0048E783 /* ES1Renderer.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = ES1Renderer.m;\n\t\tpath = /Users/johnmci/Shared/CubeExample/Classes/ES1Renderer.m;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t947E996D125D756D0048E783 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947E996E125D756D0048E783 /* OpenGLRenderer.m */;\n\t\tname = \"OpenGLRenderer.m: 55\";\n\t\trLen = 7;\n\t\trLoc = 2620;\n\t\trType = 0;\n\t\tvrLen = 2657;\n\t\tvrLoc = 0;\n\t};\n\t947E996E125D756D0048E783 /* OpenGLRenderer.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = OpenGLRenderer.m;\n\t\tpath = \"/Volumes/330GB Photos/WWDC10-SampleCode/Mac/GLEssentials/Classes/OpenGLRenderer.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t947E996F125D756D0048E783 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947E9970125D756D0048E783 /* OpenGLRenderer.m */;\n\t\tname = \"OpenGLRenderer.m: 55\";\n\t\trLen = 7;\n\t\trLoc = 2620;\n\t\trType = 0;\n\t\tvrLen = 2657;\n\t\tvrLoc = 0;\n\t};\n\t947E9970125D756D0048E783 /* OpenGLRenderer.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = OpenGLRenderer.m;\n\t\tpath = \"/Volumes/330GB Photos/WWDC10-SampleCode/iOS/GLEssentials/Classes/OpenGLRenderer.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t947E9971125D756D0048E783 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947E9972125D756D0048E783 /* PVRTexture.m */;\n\t\tname = \"PVRTexture.m: 206\";\n\t\trLen = 7;\n\t\trLoc = 6278;\n\t\trType = 0;\n\t\tvrLen = 1238;\n\t\tvrLoc = 5527;\n\t};\n\t947E9972125D756D0048E783 /* PVRTexture.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = PVRTexture.m;\n\t\tpath = /Users/johnmci/Shared/CubeExample/Classes/PVRTexture.m;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t947E9976125D756D0048E783 /* Shader.mm */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.cpp.objcpp;\n\t\tname = Shader.mm;\n\t\tpath = \"/Volumes/330GB Photos/temp/oolongengine-read-only/Oolong Engine2/Renderer/Core/GraphicsDevice/Shader.mm\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t947E9994125D76820048E783 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947E9976125D756D0048E783 /* Shader.mm */;\n\t\tname = \"Shader.mm: 207\";\n\t\trLen = 7;\n\t\trLoc = 7361;\n\t\trType = 0;\n\t\tvrLen = 1797;\n\t\tvrLoc = 6302;\n\t};\n\t947E99A0125D76BB0048E783 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947E99A1125D76BB0048E783 /* CGLMacro.h */;\n\t\tname = \"CGLMacro.h: 34\";\n\t\trLen = 8;\n\t\trLoc = 1128;\n\t\trType = 0;\n\t\tvrLen = 2254;\n\t\tvrLoc = 12519;\n\t};\n\t947E99A1125D76BB0048E783 /* CGLMacro.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = CGLMacro.h;\n\t\tpath = \"/Volumes/330GB Photos/Developer42/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/CGLMacro.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t947E99CB125D78FB0048E783 /* NSLOG */ = {\n\t\tisa = PBXSymbolicBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 1;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlocation = \"\";\n\t\tmodificationTime = 308445393.439781;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 0;\n\t\tsymbolName = NSLOG;\n\t};\n\t947E99CC125D78FE0048E783 /* NSlog */ = {\n\t\tisa = PBXSymbolicBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 1;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlocation = \"\";\n\t\tmodificationTime = 308445393.4398431;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 0;\n\t\tsymbolName = NSlog;\n\t};\n\t947E99D0125D79050048E783 /* NSLog */ = {\n\t\tisa = PBXSymbolicBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 1;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlocation = Foundation;\n\t\tmodificationTime = 308445393.439915;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 2;\n\t\tsymbolName = NSLog;\n\t};\n\t947E99F8125D7B1C0048E783 /* cl */ = {\n\t\tisa = PBXSymbolicBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 1;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlocation = \"\";\n\t\tmodificationTime = 308445393.43997;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 0;\n\t\tsymbolName = cl;\n\t};\n\t947E99FA125D7B850048E783 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C2068810AF4F53002F4160 /* sqSqueakOSXNSView.h */;\n\t\tname = \"sqSqueakOSXNSView.h: 79\";\n\t\trLen = 6;\n\t\trLoc = 3309;\n\t\trType = 0;\n\t\tvrLen = 1954;\n\t\tvrLoc = 1747;\n\t};\n\t948034A9122A264A00C42504 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 948034AA122A264A00C42504 /* sqWin32Window.c */;\n\t\tname = \"sqWin32Window.c: 1856\";\n\t\trLen = 17;\n\t\trLoc = 59293;\n\t\trType = 0;\n\t\tvrLen = 1429;\n\t\tvrLoc = 53896;\n\t};\n\t948034AA122A264A00C42504 /* sqWin32Window.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqWin32Window.c;\n\t\tpath = /Users/johnmci/Documents/Squeak3.8.0/platforms/win32/vm/sqWin32Window.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t948127E812444F7800BD1543 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 949E5DB60DE3AB6A007388E0 /* SqueakUIView.m */;\n\t\tname = \"SqueakUIView.m: 65\";\n\t\trLen = 13;\n\t\trLoc = 2580;\n\t\trType = 0;\n\t\tvrLen = 1684;\n\t\tvrLoc = 2490;\n\t};\n\t948127E912444F7800BD1543 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9452D7640E0452D3000AD792 /* sqiPhoneScreenAndWindow.m */;\n\t\tname = \"sqiPhoneScreenAndWindow.m: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 2225;\n\t\tvrLoc = 0;\n\t};\n\t948127EA12444F7800BD1543 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 949E5DB50DE3AB6A007388E0 /* SqueakUIView.h */;\n\t\tname = \"SqueakUIView.h: 40\";\n\t\trLen = 218;\n\t\trLoc = 1791;\n\t\trType = 0;\n\t\tvrLen = 2259;\n\t\tvrLoc = 0;\n\t};\n\t948127EB12444F7800BD1543 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 940CE8540DFCE2D200EBA91B /* SqueakUIController.h */;\n\t\tname = \"SqueakUIController.h: 6\";\n\t\trLen = 1688;\n\t\trLoc = 95;\n\t\trType = 0;\n\t\tvrLen = 1839;\n\t\tvrLoc = 0;\n\t};\n\t94845C211228E29F00BEB880 /* macvideo.cpp */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.cpp.cpp;\n\t\tname = macvideo.cpp;\n\t\tpath = /opt/intel/Compiler/11.1/076/Frameworks/tbb/examples/common/gui/macvideo.cpp;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9484F7B910B0D3600038BDC0 /* SystemConfiguration.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = SystemConfiguration.h;\n\t\tpath = /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/Headers/SystemConfiguration.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9484F86210B0DCC60038BDC0 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9484F7B910B0D3600038BDC0 /* SystemConfiguration.h */;\n\t\tname = \"SystemConfiguration.h: 109\";\n\t\trLen = 30;\n\t\trLoc = 4596;\n\t\trType = 0;\n\t\tvrLen = 1985;\n\t\tvrLoc = 3539;\n\t};\n\t9484F86510B0DCC60038BDC0 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9484F86610B0DCC60038BDC0 /* ABGlobals.h */;\n\t\tname = \"ABGlobals.h: 162\";\n\t\trLen = 6;\n\t\trLoc = 6912;\n\t\trType = 0;\n\t\tvrLen = 2845;\n\t\tvrLoc = 5737;\n\t};\n\t9484F86610B0DCC60038BDC0 /* ABGlobals.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = ABGlobals.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AddressBook.framework/Versions/A/Headers/ABGlobals.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9484F8FC10B0E1770038BDC0 /* PBXBookmark */ = {\n\t\tisa = PBXBookmark;\n\t\tfRef = 945550910DF2041100FB176B /* Default.png */;\n\t};\n\t94862F8310BA182500CAA2EB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C3696610AFB7550041953A /* NSBitmapImageRep.h */;\n\t\tname = \"NSBitmapImageRep.h: 100\";\n\t\trLen = 24;\n\t\trLoc = 4439;\n\t\trType = 0;\n\t\tvrLen = 3020;\n\t\tvrLoc = 3019;\n\t};\n\t94862F9E10BA1A0100CAA2EB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAD0410AB922600F87527 /* NSObjCRuntime.h */;\n\t\tname = \"NSObjCRuntime.h: 193\";\n\t\trLen = 5;\n\t\trLoc = 6827;\n\t\trType = 0;\n\t\tvrLen = 1591;\n\t\tvrLoc = 6049;\n\t};\n\t9486302A10BA247200CAA2EB /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C3696310AFB7550041953A /* NSGraphics.h */;\n\t\tname = \"NSGraphics.h: 92\";\n\t\trLen = 159;\n\t\trLoc = 2874;\n\t\trType = 0;\n\t\tvrLen = 3496;\n\t\tvrLoc = 1601;\n\t};\n\t948704AE0E12CABF00D565C3 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 948704AF0E12CABF00D565C3 /* BitBlt.java */;\n\t\tname = \"BitBlt.java: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1739;\n\t\tvrLoc = 0;\n\t};\n\t948704AF0E12CABF00D565C3 /* BitBlt.java */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.java;\n\t\tname = BitBlt.java;\n\t\tpath = /Users/johnmci/Shared/JSqueak/BitBlt.java;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9487071F0E132B1000D565C3 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 948707200E132B1000D565C3 /* sqGnu.h */;\n\t\tname = \"sqGnu.h: 3\";\n\t\trLen = 1318;\n\t\trLoc = 43;\n\t\trType = 0;\n\t\tvrLen = 1999;\n\t\tvrLoc = 0;\n\t};\n\t948707200E132B1000D565C3 /* sqGnu.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = sqGnu.h;\n\t\tpath = /Users/johnmci/Documents/SqueakHydra/platforms/unix/vm/sqGnu.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94883B400E0C2B9C005A4738 /* sqUnixSocket.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {957, 28496}}\";\n\t\t\tsepNavSelRange = \"{56411, 0}\";\n\t\t\tsepNavVisRange = \"{6842, 1375}\";\n\t\t\tsepNavWindowFrame = \"{{38, 14}, {799, 988}}\";\n\t\t};\n\t};\n\t948C0820112DE98D0017EE7F /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 948C0821112DE98D0017EE7F /* interp.c */;\n\t\tname = \"interp.c: 4824\";\n\t\trLen = 58;\n\t\trLoc = 159330;\n\t\trType = 0;\n\t\tvrLen = 1795;\n\t\tvrLoc = 158125;\n\t};\n\t948C0821112DE98D0017EE7F /* interp.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = interp.c;\n\t\tpath = /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/WikiWikiServer/src/vm/interp.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t948FAA0310BF855500BE88CF /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 948FAA0410BF855500BE88CF /* string.h */;\n\t\tname = \"string.h: 85\";\n\t\trLen = 35;\n\t\trLoc = 3458;\n\t\trType = 0;\n\t\tvrLen = 2317;\n\t\tvrLoc = 3588;\n\t};\n\t948FAA0410BF855500BE88CF /* string.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = string.h;\n\t\tpath = /Developer/SDKs/MacOSX10.5.sdk/usr/include/string.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t948FAB5B10BFAD3C00BE88CF /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E5838E10BF3E080073FD63 /* AudioQueue.h */;\n\t\tname = \"AudioQueue.h: 695\";\n\t\trLen = 0;\n\t\trLoc = 34190;\n\t\trType = 0;\n\t\tvrLen = 3087;\n\t\tvrLoc = 33171;\n\t};\n\t949198B010BC8DFC00C629D1 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C88C0E10AF4196007CB39E /* NSGeometry.h */;\n\t\tname = \"NSGeometry.h: 100\";\n\t\trLen = 74;\n\t\trLoc = 2081;\n\t\trType = 0;\n\t\tvrLen = 1067;\n\t\tvrLoc = 1388;\n\t};\n\t949198C910BC8FBB00C629D1 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9456C2F910B32D2A000BF3DE /* NSString.h */;\n\t\tname = \"NSString.h: 103\";\n\t\trLen = 7;\n\t\trLoc = 4785;\n\t\trType = 0;\n\t\tvrLen = 3169;\n\t\tvrLoc = 3123;\n\t};\n\t9492450510BA42EF00E726F5 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9492450610BA42EF00E726F5 /* SqueakApplication.h */;\n\t\tname = \"SqueakApplication.h: 12\";\n\t\trLen = 17;\n\t\trLoc = 192;\n\t\trType = 0;\n\t\tvrLen = 237;\n\t\tvrLoc = 0;\n\t};\n\t9492450610BA42EF00E726F5 /* SqueakApplication.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = SqueakApplication.h;\n\t\tpath = \"/Users/johnmci/Work In Progress/smalltalk/CocoaSqueakSource/CocoaSqueak/SqueakApplication.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9492450710BA42EF00E726F5 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9492450810BA42EF00E726F5 /* SqueakApplication.m */;\n\t\tname = \"SqueakApplication.m: 2\";\n\t\trLen = 17;\n\t\trLoc = 7;\n\t\trType = 0;\n\t\tvrLen = 1109;\n\t\tvrLoc = 0;\n\t};\n\t9492450810BA42EF00E726F5 /* SqueakApplication.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = SqueakApplication.m;\n\t\tpath = \"/Users/johnmci/Work In Progress/smalltalk/CocoaSqueakSource/CocoaSqueak/SqueakApplication.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t9492450910BA42EF00E726F5 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 945F30620E0C6A5000CFF3DC /* SqueakApplication.m */;\n\t\tname = \"SqueakApplication.m: 12\";\n\t\trLen = 611;\n\t\trLoc = 185;\n\t\trType = 0;\n\t\tvrLen = 797;\n\t\tvrLoc = 0;\n\t};\n\t9492452F10BA43AA00E726F5 /* SqueakOSXApplication.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1104, 674}}\";\n\t\t\tsepNavSelRange = \"{1872, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1877}\";\n\t\t};\n\t};\n\t9492453010BA43AA00E726F5 /* SqueakOSXApplication.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1167, 806}}\";\n\t\t\tsepNavSelRange = \"{2023, 13}\";\n\t\t\tsepNavVisRange = \"{99, 2329}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {878, 1019}}\";\n\t\t};\n\t};\n\t9492455D10BA462B00E726F5 /* sqUnixQuartz.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = sqUnixQuartz.m;\n\t\tpath = \"/Users/johnmci/Documents/SqueakHydra/SqueakVMMAker/platforms/unix/vm-display-Quartz/sqUnixQuartz.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t949245B210BA4A6200E726F5 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9492455D10BA462B00E726F5 /* sqUnixQuartz.m */;\n\t\tname = \"sqUnixQuartz.m: 1937\";\n\t\trLen = 17;\n\t\trLoc = 51207;\n\t\trType = 0;\n\t\tvrLen = 1549;\n\t\tvrLoc = 51264;\n\t};\n\t9493E98F10EE90BC000C4FB3 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94360A8C10E84CC90060221A /* NSException.h */;\n\t\tname = \"NSException.h: 67\";\n\t\trLen = 9;\n\t\trLoc = 2116;\n\t\trType = 0;\n\t\tvrLen = 2363;\n\t\tvrLoc = 1177;\n\t};\n\t9494927D11E5178D0019BC29 /* cogit.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1356, 164385}}\";\n\t\t\tsepNavSelRange = \"{325, 38}\";\n\t\t\tsepNavVisRange = \"{0, 1577}\";\n\t\t\tsepNavWindowFrame = \"{{15, 18}, {1170, 1005}}\";\n\t\t};\n\t};\n\t9494927E11E5178D0019BC29 /* cogit.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1559, 1430}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 3035}\";\n\t\t};\n\t};\n\t9494928011E5178D0019BC29 /* gcc3x-cointerp.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 540995}}\";\n\t\t\tsepNavSelRange = \"{1165452, 40}\";\n\t\t\tsepNavVisRange = \"{1164453, 1395}\";\n\t\t\tsepNavWindowFrame = \"{{295, 4}, {1385, 1024}}\";\n\t\t};\n\t};\n\t9494928111E5178D0019BC29 /* cointerp.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 2275}}\";\n\t\t\tsepNavSelRange = \"{3374, 7}\";\n\t\t\tsepNavVisRange = \"{2366, 2130}\";\n\t\t};\n\t};\n\t949492C011E51C6B0019BC29 /* dispdbg.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 1781}}\";\n\t\t\tsepNavSelRange = \"{306, 11}\";\n\t\t\tsepNavVisRange = \"{269, 1550}\";\n\t\t};\n\t};\n\t949492C111E51C6B0019BC29 /* sqAssert.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 644}}\";\n\t\t\tsepNavSelRange = \"{505, 6}\";\n\t\t\tsepNavVisRange = \"{0, 1133}\";\n\t\t\tsepNavWindowFrame = \"{{15, 24}, {1661, 999}}\";\n\t\t};\n\t};\n\t949492C311E51C6B0019BC29 /* sqExternalSemaphores.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1132, 2925}}\";\n\t\t\tsepNavSelRange = \"{2737, 7}\";\n\t\t\tsepNavVisRange = \"{0, 2031}\";\n\t\t};\n\t};\n\t949492C411E51C6B0019BC29 /* sqAtomicOps.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 2574}}\";\n\t\t\tsepNavSelRange = \"{2283, 19}\";\n\t\t\tsepNavVisRange = \"{1497, 1558}\";\n\t\t\tsepNavWindowFrame = \"{{107, 4}, {1573, 1024}}\";\n\t\t};\n\t};\n\t949492C511E51C6B0019BC29 /* sqHeapMap.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 1352}}\";\n\t\t\tsepNavSelRange = \"{2420, 27}\";\n\t\t\tsepNavVisRange = \"{1461, 1192}\";\n\t\t};\n\t};\n\t949492C611E51C6B0019BC29 /* sqTicker.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1132, 3250}}\";\n\t\t\tsepNavSelRange = \"{7347, 0}\";\n\t\t\tsepNavVisRange = \"{6448, 1506}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {1385, 1024}}\";\n\t\t};\n\t};\n\t9494932C11E527180019BC29 /* sqUnixHeartbeat.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1327, 9100}}\";\n\t\t\tsepNavSelRange = \"{18414, 0}\";\n\t\t\tsepNavVisRange = \"{17993, 851}\";\n\t\t\tsepNavWindowFrame = \"{{966, 4}, {714, 1024}}\";\n\t\t};\n\t};\n\t9494932D11E527180019BC29 /* sqUnixThreads.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1132, 676}}\";\n\t\t\tsepNavSelRange = \"{428, 13}\";\n\t\t\tsepNavVisRange = \"{0, 1103}\";\n\t\t};\n\t};\n\t9494932E11E527180019BC29 /* sqUnixVMProfile.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1132, 5252}}\";\n\t\t\tsepNavSelRange = \"{7363, 3}\";\n\t\t\tsepNavVisRange = \"{6688, 1339}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {1573, 1024}}\";\n\t\t};\n\t};\n\t9494935011E527AB0019BC29 /* sqMemoryFence.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 780}}\";\n\t\t\tsepNavSelRange = \"{2337, 16}\";\n\t\t\tsepNavVisRange = \"{386, 1997}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {1573, 1024}}\";\n\t\t};\n\t};\n\t949493BF11E52ADE0019BC29 /* aio.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1132, 5330}}\";\n\t\t\tsepNavSelRange = \"{5142, 7}\";\n\t\t\tsepNavVisRange = \"{4481, 1294}\";\n\t\t\tsepNavWindowFrame = \"{{61, 148}, {901, 833}}\";\n\t\t};\n\t};\n\t94977E7C11EE46BC002BC5E9 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 949F254D11EC33FA00A34245 /* mach_absolute_time.s */;\n\t\tname = \"mach_absolute_time.s: 32\";\n\t\trLen = 24;\n\t\trLoc = 1144;\n\t\trType = 0;\n\t\tvrLen = 1169;\n\t\tvrLoc = 0;\n\t};\n\t949AD14911E542E8006D6BF4 /* SqueakPureObjc-InfoCOG.plist */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavWindowFrame = \"{{15, 20}, {1185, 1003}}\";\n\t\t};\n\t};\n\t949AD35211E54A81006D6BF4 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9424FF660DDCB1EF009912BF /* sqConfig.h */;\n\t\tname = \"sqConfig.h: 4\";\n\t\trLen = 25;\n\t\trLoc = 88;\n\t\trType = 0;\n\t\tvrLen = 302;\n\t\tvrLoc = 0;\n\t};\n\t949AD36211E54AAA006D6BF4 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9424FF650DDCB1EF009912BF /* config.h */;\n\t\tname = \"config.h: 162\";\n\t\trLen = 0;\n\t\trLoc = 3660;\n\t\trType = 0;\n\t\tvrLen = 1112;\n\t\tvrLoc = 3240;\n\t};\n\t949C3A281262C1F700F4EF15 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9424FF5D0DDCB1C7009912BF /* sq.h */;\n\t\tname = \"sq.h: 480\";\n\t\trLen = 35;\n\t\trLoc = 18266;\n\t\trType = 0;\n\t\tvrLen = 2307;\n\t\tvrLoc = 17190;\n\t};\n\t949C3A441262C2D200F4EF15 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9494928011E5178D0019BC29 /* gcc3x-cointerp.c */;\n\t\tname = \"gcc3x-cointerp.c: 40714\";\n\t\trLen = 0;\n\t\trLoc = 1213691;\n\t\trType = 0;\n\t\tvrLen = 1834;\n\t\tvrLoc = 1212988;\n\t};\n\t949C3AFE1262C91300F4EF15 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94EF6CBE11E55947003BA64D /* gcc3x-interp.c */;\n\t\tname = \"gcc3x-interp.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1341;\n\t\tvrLoc = 50;\n\t};\n\t949C3AFF1262C91300F4EF15 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9424FF670DDCB202009912BF /* sqMacV2Memory.c */;\n\t\trLen = 16;\n\t\trLoc = 2861;\n\t\trType = 0;\n\t};\n\t949C3B171262C9C900F4EF15 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9424FF670DDCB202009912BF /* sqMacV2Memory.c */;\n\t\tname = \"sqMacV2Memory.c: 83\";\n\t\trLen = 16;\n\t\trLoc = 2861;\n\t\trType = 0;\n\t\tvrLen = 1746;\n\t\tvrLoc = 2252;\n\t};\n\t949DDD4811D13F630017F79B /* NSDateFormatter.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSDateFormatter.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSDateFormatter.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t949DDD6D11D141080017F79B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 949DDD4811D13F630017F79B /* NSDateFormatter.h */;\n\t\tname = \"NSDateFormatter.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 2173;\n\t\tvrLoc = 0;\n\t};\n\t949E5B970DE3623B007388E0 /* sqUnixMain.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqUnixMain.c;\n\t\tpath = /Users/johnmci/Documents/SqueakHydra/platforms/unix/vm/sqUnixMain.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t949E5DB50DE3AB6A007388E0 /* SqueakUIView.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {838, 754}}\";\n\t\t\tsepNavSelRange = \"{1791, 218}\";\n\t\t\tsepNavVisRange = \"{0, 2259}\";\n\t\t\tsepNavWindowFrame = \"{{21, 20}, {694, 1008}}\";\n\t\t};\n\t};\n\t949E5DB60DE3AB6A007388E0 /* SqueakUIView.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1202, 2587}}\";\n\t\t\tsepNavSelRange = \"{2580, 13}\";\n\t\t\tsepNavVisRange = \"{2490, 1684}\";\n\t\t\tsepNavWindowFrame = \"{{152, 50}, {1040, 978}}\";\n\t\t};\n\t};\n\t949EFD7D0FF17FED00F540EB /* ObjectiveCPlugin.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = ObjectiveCPlugin.c;\n\t\tpath = /Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/WikiWikiServer/src/vm/intplugins/ObjectiveCPlugin/ObjectiveCPlugin.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t949F254511EC33FA00A34245 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9468DA7511EC31F6000ECA16 /* main time.c */;\n\t\tname = \"main time.c: 10\";\n\t\trLen = 18;\n\t\trLoc = 158;\n\t\trType = 0;\n\t\tvrLen = 1061;\n\t\tvrLoc = 0;\n\t};\n\t949F254611EC33FA00A34245 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 949F254711EC33FA00A34245 /* mach_absolute_time.s */;\n\t\tname = \"mach_absolute_time.s: 26\";\n\t\trLen = 18;\n\t\trLoc = 976;\n\t\trType = 0;\n\t\tvrLen = 1080;\n\t\tvrLoc = 0;\n\t};\n\t949F254711EC33FA00A34245 /* mach_absolute_time.s */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.asm;\n\t\tname = mach_absolute_time.s;\n\t\tpath = \"/Users/johnmci/Documents/Files from Lamie/Documents/Darwin/Libc/ppc/mach/mach_absolute_time.s\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t949F254811EC33FA00A34245 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 949F254911EC33FA00A34245 /* mach_absolute_time.c */;\n\t\tname = \"mach_absolute_time.c: 40\";\n\t\trLen = 18;\n\t\trLoc = 1355;\n\t\trType = 0;\n\t\tvrLen = 1650;\n\t\tvrLoc = 0;\n\t};\n\t949F254911EC33FA00A34245 /* mach_absolute_time.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = mach_absolute_time.c;\n\t\tpath = \"/Users/johnmci/Shared/docs/Computer/Libc-391.2.5/i386/mach/mach_absolute_time.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t949F254D11EC33FA00A34245 /* mach_absolute_time.s */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.asm;\n\t\tname = mach_absolute_time.s;\n\t\tpath = \"/Users/johnmci/Shared/docs/Computer/Libc-391.2.5/ppc/mach/mach_absolute_time.s\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94A0E8440DE5EB6E0071C8B9 /* sqSqueakMainApplication+attributes.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1167, 654}}\";\n\t\t\tsepNavSelRange = \"{1987, 14}\";\n\t\t\tsepNavVisRange = \"{0, 2027}\";\n\t\t\tsepNavWindowFrame = \"{{38, 19}, {905, 983}}\";\n\t\t};\n\t};\n\t94A0E8450DE5EB6E0071C8B9 /* sqSqueakIPhoneApplication+attributes.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1167, 1417}}\";\n\t\t\tsepNavSelRange = \"{4729, 0}\";\n\t\t\tsepNavVisRange = \"{2120, 2560}\";\n\t\t\tsepNavWindowFrame = \"{{812, 34}, {818, 994}}\";\n\t\t};\n\t};\n\t94A0E8830DE5EF430071C8B9 /* sqSqueakMainApplication+imageReadWrite.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {850, 778}}\";\n\t\t\tsepNavSelRange = \"{1898, 31}\";\n\t\t\tsepNavVisRange = \"{0, 1966}\";\n\t\t};\n\t};\n\t94A0E8840DE5EF430071C8B9 /* sqSqueakMainApplication+imageReadWrite.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 793}}\";\n\t\t\tsepNavSelRange = \"{2342, 35}\";\n\t\t\tsepNavVisRange = \"{589, 1890}\";\n\t\t\tsepNavWindowFrame = \"{{15, 15}, {694, 1008}}\";\n\t\t};\n\t};\n\t94A0E9820DE5F1FE0071C8B9 /* sqSqueakMainApplication+screen.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1169, 764}}\";\n\t\t\tsepNavSelRange = \"{1779, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1983}\";\n\t\t\tsepNavWindowFrame = \"{{15, 15}, {694, 1008}}\";\n\t\t};\n\t};\n\t94A0E9830DE5F1FE0071C8B9 /* sqSqueakMainApplication+screen.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {905, 767}}\";\n\t\t\tsepNavSelRange = \"{1924, 15}\";\n\t\t\tsepNavVisRange = \"{0, 2171}\";\n\t\t\tsepNavWindowFrame = \"{{15, 15}, {694, 1008}}\";\n\t\t};\n\t};\n\t94A0EBB20DE608350071C8B9 /* squeakAudioVideoPipeLineSignalInterface.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = squeakAudioVideoPipeLineSignalInterface.c;\n\t\tpath = \"/Volumes/pm/Mail Downloads/squeakAudioVideoPipeLineSignalInterface.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94A1B0050E0DBE2400EB5EFC /* sqSqueakMainApplication+events.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 598}}\";\n\t\t\tsepNavSelRange = \"{2009, 11}\";\n\t\t\tsepNavVisRange = \"{3, 2024}\";\n\t\t\tsepNavWindowFrame = \"{{312, -14}, {1416, 1021}}\";\n\t\t};\n\t};\n\t94A1B0060E0DBE2400EB5EFC /* sqSqueakMainApplication+events.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 1053}}\";\n\t\t\tsepNavSelRange = \"{1907, 2}\";\n\t\t\tsepNavVisRange = \"{841, 1729}\";\n\t\t\tsepNavWindowFrame = \"{{437, 4}, {847, 985}}\";\n\t\t};\n\t};\n\t94A1B02B0E0DC10D00EB5EFC /* sqSqueakSoundAPI.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {854, 738}}\";\n\t\t\tsepNavSelRange = \"{7, 16}\";\n\t\t\tsepNavVisRange = \"{0, 1798}\";\n\t\t\tsepNavWindowFrame = \"{{15, 15}, {694, 1008}}\";\n\t\t};\n\t};\n\t94A1B02C0E0DC10D00EB5EFC /* sqSqueakSoundAPI.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 676}}\";\n\t\t\tsepNavSelRange = \"{1926, 6}\";\n\t\t\tsepNavVisRange = \"{252, 1760}\";\n\t\t\tsepNavWindowFrame = \"{{15, 45}, {1017, 978}}\";\n\t\t};\n\t};\n\t94A1B0300E0DC19300EB5EFC /* sqSqueakMainApplication+sound.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1036, 652}}\";\n\t\t\tsepNavSelRange = \"{1878, 6}\";\n\t\t\tsepNavVisRange = \"{0, 1891}\";\n\t\t\tsepNavWindowFrame = \"{{38, 145}, {1288, 857}}\";\n\t\t};\n\t};\n\t94A1B0310E0DC19300EB5EFC /* sqSqueakMainApplication+sound.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 559}}\";\n\t\t\tsepNavSelRange = \"{868, 1033}\";\n\t\t\tsepNavVisRange = \"{3, 1898}\";\n\t\t};\n\t};\n\t94A1B21A10B9DE0300C64473 /* keyBoardStrokeDetails.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1279, 859}}\";\n\t\t\tsepNavSelRange = \"{1866, 25}\";\n\t\t\tsepNavVisRange = \"{0, 2034}\";\n\t\t\tsepNavWindowFrame = \"{{15, 13}, {1326, 1010}}\";\n\t\t};\n\t};\n\t94A1B21B10B9DE0300C64473 /* keyBoardStrokeDetails.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1167, 723}}\";\n\t\t\tsepNavSelRange = \"{1867, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1908}\";\n\t\t};\n\t};\n\t94A1B2AA10B9E92A00C64473 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94A1B2AB10B9E92A00C64473 /* NSCache.h */;\n\t\tname = \"NSCache.h: 25\";\n\t\trLen = 52;\n\t\trLoc = 427;\n\t\trType = 0;\n\t\tvrLen = 1024;\n\t\tvrLoc = 0;\n\t};\n\t94A1B2AB10B9E92A00C64473 /* NSCache.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSCache.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSCache.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94A1B41E10BA05E600C64473 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94A1B41F10BA05E600C64473 /* objc.h */;\n\t\tname = \"objc.h: 64\";\n\t\trLen = 46;\n\t\trLoc = 1748;\n\t\trType = 0;\n\t\tvrLen = 1238;\n\t\tvrLoc = 1195;\n\t};\n\t94A1B41F10BA05E600C64473 /* objc.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = objc.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/usr/include/objc/objc.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94A3488C0DDCCCC700D1D4A9 /* sqSqueakScreenAPI.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1169, 764}}\";\n\t\t\tsepNavSelRange = \"{78, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1806}\";\n\t\t\tsepNavWindowFrame = \"{{15, 8}, {1012, 1015}}\";\n\t\t};\n\t};\n\t94A3488D0DDCCCC700D1D4A9 /* sqSqueakScreenAPI.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1048, 1872}}\";\n\t\t\tsepNavSelRange = \"{3724, 21}\";\n\t\t\tsepNavVisRange = \"{2363, 1770}\";\n\t\t\tsepNavWindowFrame = \"{{21, 20}, {694, 1008}}\";\n\t\t};\n\t};\n\t94A349B50DDCDBE200D1D4A9 /* iPhone.image */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {807273, 3.9741e+06}}\";\n\t\t\tsepNavSelRange = \"{18277000, 0}\";\n\t\t\tsepNavVisRange = \"{1158, 1564}\";\n\t\t};\n\t};\n\t94AB2E6A0E003879006A79E4 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94AB2E6B0E003879006A79E4 /* npsqueak.c */;\n\t\tname = \"npsqueak.c: 984\";\n\t\trLen = 1;\n\t\trLoc = 28701;\n\t\trType = 0;\n\t\tvrLen = 2346;\n\t\tvrLoc = 28415;\n\t};\n\t94AB2E6B0E003879006A79E4 /* npsqueak.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = npsqueak.c;\n\t\tpath = \"/Users/johnmci/Documents/SqueakBrowserPlugin/platforms/Mac OS/vm/npsqueak copy 1/npsqueak.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94AB2E6C0E003879006A79E4 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94AB2E6D0E003879006A79E4 /* npsqueak.c */;\n\t\tname = \"npsqueak.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1371;\n\t\tvrLoc = 0;\n\t};\n\t94AB2E6D0E003879006A79E4 /* npsqueak.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = npsqueak.c;\n\t\tpath = \"/Users/johnmci/Documents/SqueakBrowserPlugin/platforms/Mac OS/vm/npsqueak copy/npsqueak.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94AC16D512395FE40067037A /* sqSqueakOSXNSView.m:551 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 94C2068910AF4F53002F4160 /* sqSqueakOSXNSView.m */;\n\t\tfunctionName = \"-doCommandBySelector:\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 551;\n\t\tmodificationTime = 308445393.4367589;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 0;\n\t};\n\t94AC16D912395FF10067037A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C3687710AFA77F0041953A /* sqSqueakOSXApplication+cursor.m */;\n\t\tname = \"sqSqueakOSXApplication+cursor.m: 90\";\n\t\trLen = 18;\n\t\trLoc = 3586;\n\t\trType = 0;\n\t\tvrLen = 1505;\n\t\tvrLoc = 2779;\n\t};\n\t94AC16DA12395FF10067037A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947E64CB10AA16FE00D3B69E /* sqSqueakOSXApplication.m */;\n\t\tname = \"sqSqueakOSXApplication.m: 249\";\n\t\trLen = 0;\n\t\trLoc = 7873;\n\t\trType = 0;\n\t\tvrLen = 1607;\n\t\tvrLoc = 6761;\n\t};\n\t94AC16DC12395FF10067037A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C88BDE10AF3C52007CB39E /* sqSqueakOSXScreenAndWindow.m */;\n\t\tname = \"sqSqueakOSXScreenAndWindow.m: 70\";\n\t\trLen = 17;\n\t\trLoc = 2578;\n\t\trType = 0;\n\t\tvrLen = 1864;\n\t\tvrLoc = 786;\n\t};\n\t94AC16DE12395FF10067037A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9492453010BA43AA00E726F5 /* SqueakOSXApplication.m */;\n\t\tname = \"SqueakOSXApplication.m: 48\";\n\t\trLen = 13;\n\t\trLoc = 2023;\n\t\trType = 0;\n\t\tvrLen = 2329;\n\t\tvrLoc = 99;\n\t};\n\t94AF3A1F12231A7200691409 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94A1B0050E0DBE2400EB5EFC /* sqSqueakMainApplication+events.h */;\n\t\tname = \"sqSqueakMainApplication+events.h: 42\";\n\t\trLen = 14;\n\t\trLoc = 1878;\n\t\trType = 0;\n\t\tvrLen = 2005;\n\t\tvrLoc = 0;\n\t};\n\t94B1514E0DE2CE530059F208 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94B1514F0DE2CE530059F208 /* sqMacWindowUniversal.c */;\n\t\tname = \"sqMacWindowUniversal.c: 580\";\n\t\trLen = 14;\n\t\trLoc = 21540;\n\t\trType = 0;\n\t\tvrLen = 1552;\n\t\tvrLoc = 21405;\n\t};\n\t94B1514F0DE2CE530059F208 /* sqMacWindowUniversal.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqMacWindowUniversal.c;\n\t\tpath = \"/Users/johnmci/Documents/SqueakHydra/platforms/Mac OS/vm/sqMacWindowUniversal.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94B6E9D910BC775E00333E9E /* English */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1132, 807}}\";\n\t\t\tsepNavSelRange = \"{238, 0}\";\n\t\t\tsepNavVisRange = \"{0, 238}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {878, 1019}}\";\n\t\t};\n\t};\n\t94B7898910C4F95E005EA70D /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94CFE6BD10BE63A900847DF5 /* SqViewEventSensor.m */;\n\t\tname = \"SqViewEventSensor.m: 80\";\n\t\trLen = 22;\n\t\trLoc = 2119;\n\t\trType = 0;\n\t\tvrLen = 1922;\n\t\tvrLoc = 499;\n\t};\n\t94B88C540E81500200C98131 /* SqView.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = SqView.m;\n\t\tpath = \"/Users/johnmci/Work In Progress/smalltalk/CocoaSqueakSource/SqueakAppKit/SqView.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94B88C560E81500200C98131 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94B88C570E81500200C98131 /* MsgContext.m */;\n\t\tname = \"MsgContext.m: 97\";\n\t\trLen = 26;\n\t\trLoc = 3007;\n\t\trType = 0;\n\t\tvrLen = 2255;\n\t\tvrLoc = 4983;\n\t};\n\t94B88C570E81500200C98131 /* MsgContext.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = MsgContext.m;\n\t\tpath = \"/Users/johnmci/Work In Progress/smalltalk/FScriptSources-20031020/FScript/FScriptFramework/MsgContext.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94B88C640E81500200C98131 /* SqueakObjcBridge.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = SqueakObjcBridge.m;\n\t\tpath = \"/Users/johnmci/Work In Progress/smalltalk/CocoaSqueakSource/Squeak/SqueakObjcBridge.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94B8F4B910CF5BFF00F0DD6B /* PBXBookmarkGroup */ = {\n\t\tisa = PBXBookmarkGroup;\n\t\tchildren = (\n\t\t\t94B8F54210CF675200F0DD6B /* PBXBookmark */,\n\t\t);\n\t\tname = Root;\n\t};\n\t94B8F54210CF675200F0DD6B /* PBXBookmark */ = {\n\t\tisa = PBXBookmark;\n\t\tfRef = 9402DD6F10CE0E91005C2102 /* SqViewClut.m */;\n\t};\n\t94B8F54E10CF677800F0DD6B /* SqViewClut.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {764, 742}}\";\n\t\t\tsepNavSelRange = \"{3, 12}\";\n\t\t\tsepNavVisRange = \"{0, 254}\";\n\t\t};\n\t};\n\t94B9528510E6B79E00DC476A /* MacMenubarPlugin.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 3354}}\";\n\t\t\tsepNavSelRange = \"{1194, 0}\";\n\t\t\tsepNavVisRange = \"{1043, 535}\";\n\t\t\tsepNavWindowFrame = \"{{602, 4}, {1078, 1014}}\";\n\t\t};\n\t};\n\t94B9533310E6BD7100DC476A /* MacMenuOS9ToOSX.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 537}}\";\n\t\t\tsepNavSelRange = \"{201, 0}\";\n\t\t\tsepNavVisRange = \"{0, 201}\";\n\t\t\tsepNavWindowFrame = \"{{554, 14}, {1078, 1014}}\";\n\t\t};\n\t};\n\t94B9533410E6BD7100DC476A /* MacMenuOS9ToOSX.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 3614}}\";\n\t\t\tsepNavSelRange = \"{5489, 0}\";\n\t\t\tsepNavVisRange = \"{4856, 1272}\";\n\t\t\tsepNavWindowFrame = \"{{15, 9}, {1078, 1014}}\";\n\t\t};\n\t};\n\t94BCAAE810AB6C3500F87527 /* NSFileManager.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSFileManager.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSFileManager.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94BCAB0410AB6DC000F87527 /* NSApplication.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSApplication.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSApplication.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94BCABBF10AB72A600F87527 /* sqSqueakOSXFileDirectoryInterface.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {996, 793}}\";\n\t\t\tsepNavSelRange = \"{2017, 0}\";\n\t\t\tsepNavVisRange = \"{0, 2022}\";\n\t\t};\n\t};\n\t94BCABC010AB72A600F87527 /* sqSqueakOSXFileDirectoryInterface.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1227, 1482}}\";\n\t\t\tsepNavSelRange = \"{2641, 19}\";\n\t\t\tsepNavVisRange = \"{2047, 2077}\";\n\t\t\tsepNavWindowFrame = \"{{562, 20}, {1274, 998}}\";\n\t\t};\n\t};\n\t94BCAC0310AB759300F87527 /* NSURL.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSURL.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURL.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94BCAC3710AB79DA00F87527 /* NSArray.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSArray.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSArray.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94BCAC3C10AB79DA00F87527 /* NSDictionary.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSDictionary.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSDictionary.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94BCAC4E10AB7A2B00F87527 /* NSProcessInfo.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSProcessInfo.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSProcessInfo.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94BCACE310AB8AE300F87527 /* NSObject.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSObject.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSObject.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94BCAD0410AB922600F87527 /* NSObjCRuntime.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSObjCRuntime.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSObjCRuntime.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94BCAD1B10AB942300F87527 /* sqSqueakOSXApplication+attributes.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {838, 749}}\";\n\t\t\tsepNavSelRange = \"{109, 1692}\";\n\t\t\tsepNavVisRange = \"{0, 1897}\";\n\t\t};\n\t};\n\t94BCAD1C10AB942300F87527 /* sqSqueakOSXApplication+attributes.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1533, 2145}}\";\n\t\t\tsepNavSelRange = \"{3001, 3}\";\n\t\t\tsepNavVisRange = \"{2826, 1075}\";\n\t\t\tsepNavWindowFrame = \"{{622, 43}, {1017, 978}}\";\n\t\t};\n\t};\n\t94BCAD4A10AB981B00F87527 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAC4E10AB7A2B00F87527 /* NSProcessInfo.h */;\n\t\tname = \"NSProcessInfo.h: 20\";\n\t\trLen = 13;\n\t\trLoc = 437;\n\t\trType = 0;\n\t\tvrLen = 861;\n\t\tvrLoc = 0;\n\t};\n\t94BCAE6710ACA10100F87527 /* sqSqueakOSXInfoPlistInterface.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 1066}}\";\n\t\t\tsepNavSelRange = \"{2066, 0}\";\n\t\t\tsepNavVisRange = \"{1327, 2847}\";\n\t\t\tsepNavWindowFrame = \"{{29, 4}, {1326, 1010}}\";\n\t\t};\n\t};\n\t94BCAE6810ACA10100F87527 /* sqSqueakOSXInfoPlistInterface.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 3523}}\";\n\t\t\tsepNavSelRange = \"{2248, 0}\";\n\t\t\tsepNavVisRange = \"{1325, 1573}\";\n\t\t\tsepNavWindowFrame = \"{{15, 45}, {1017, 978}}\";\n\t\t};\n\t};\n\t94BCAE9010ACA3A300F87527 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAE9110ACA3A300F87527 /* NSUserDefaults.h */;\n\t\tname = \"NSUserDefaults.h: 13\";\n\t\trLen = 14;\n\t\trLoc = 365;\n\t\trType = 0;\n\t\tvrLen = 2118;\n\t\tvrLoc = 0;\n\t};\n\t94BCAE9110ACA3A300F87527 /* NSUserDefaults.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSUserDefaults.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSUserDefaults.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94BCAE9D10ACA3A300F87527 /* NSBundle.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSBundle.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSBundle.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94BCAEDF10ACAE2500F87527 /* NSValue.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSValue.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSValue.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94BCAF7D10ACC0D900F87527 /* NSPathUtilities.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSPathUtilities.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSPathUtilities.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94BCAFC410ACC89100F87527 /* string.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = string.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/usr/include/string.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94BCAFC710ACC89100F87527 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAFC810ACC89100F87527 /* CFBundle.h */;\n\t\tname = \"CFBundle.h: 113\";\n\t\trLen = 33;\n\t\trLoc = 4376;\n\t\trType = 0;\n\t\tvrLen = 2277;\n\t\tvrLoc = 2928;\n\t};\n\t94BCAFC810ACC89100F87527 /* CFBundle.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = CFBundle.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreFoundation.framework/Versions/A/Headers/CFBundle.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94BCAFCA10ACC89100F87527 /* CFURL.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = CFURL.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreFoundation.framework/Versions/A/Headers/CFURL.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94BCE6660DDDEB5000F38F31 /* sqMacHostWindow.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1279, 936}}\";\n\t\t\tsepNavSelRange = \"{1980, 27}\";\n\t\t\tsepNavVisRange = \"{50, 2646}\";\n\t\t\tsepNavWindowFrame = \"{{15, 13}, {1326, 1010}}\";\n\t\t};\n\t};\n\t94BCE6870DDDECB800F38F31 /* HostWindowPlugin.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1132, 1040}}\";\n\t\t\tsepNavSelRange = \"{970, 21}\";\n\t\t\tsepNavVisRange = \"{0, 2546}\";\n\t\t\tsepNavWindowFrame = \"{{15, 59}, {1394, 964}}\";\n\t\t};\n\t};\n\t94BCE7870DDDF61200F38F31 /* sqUnixUUID.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 633}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 275}\";\n\t\t};\n\t};\n\t94BCE7A60DDDF8F800F38F31 /* sqaio.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {764, 1287}}\";\n\t\t\tsepNavSelRange = \"{4027, 16}\";\n\t\t\tsepNavVisRange = \"{1798, 2290}\";\n\t\t\tsepNavWindowFrame = \"{{84, 127}, {901, 833}}\";\n\t\t};\n\t};\n\t94BCE93E0DDE044700F38F31 /* sqSqueakIPhoneApplication+events.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 637}}\";\n\t\t\tsepNavSelRange = \"{32, 7}\";\n\t\t\tsepNavVisRange = \"{0, 2199}\";\n\t\t\tsepNavWindowFrame = \"{{73, 45}, {905, 983}}\";\n\t\t};\n\t};\n\t94BCE93F0DDE044700F38F31 /* sqSqueakIPhoneApplication+events.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {999, 3237}}\";\n\t\t\tsepNavSelRange = \"{2125, 0}\";\n\t\t\tsepNavVisRange = \"{1301, 1753}\";\n\t\t\tsepNavWindowFrame = \"{{310, 45}, {905, 983}}\";\n\t\t};\n\t};\n\t94BCEA2B0DDE0C1600F38F31 /* sqMacHostWindow.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1167, 2756}}\";\n\t\t\tsepNavSelRange = \"{2260, 11}\";\n\t\t\tsepNavVisRange = \"{1052, 1911}\";\n\t\t\tsepNavWindowFrame = \"{{775, 4}, {905, 983}}\";\n\t\t};\n\t};\n\t94BCEAF20DDE16B400F38F31 /* sqMacSecurity.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {858, 3341}}\";\n\t\t\tsepNavSelRange = \"{2225, 50}\";\n\t\t\tsepNavVisRange = \"{647, 2896}\";\n\t\t\tsepNavWindowFrame = \"{{15, 40}, {905, 983}}\";\n\t\t};\n\t};\n\t94BD816F11C8A58D00556751 /* sqManualSurface.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1093, 2119}}\";\n\t\t\tsepNavSelRange = \"{360, 20}\";\n\t\t\tsepNavVisRange = \"{0, 2458}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {1140, 1019}}\";\n\t\t};\n\t};\n\t94BE8B9C123DA0C900C89FDD /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAD1C10AB942300F87527 /* sqSqueakOSXApplication+attributes.m */;\n\t\tname = \"sqSqueakOSXApplication+attributes.m: 85\";\n\t\trLen = 0;\n\t\trLoc = 2975;\n\t\trType = 0;\n\t\tvrLen = 2556;\n\t\tvrLoc = 2475;\n\t};\n\t94BE8BAD123DA0EB00C89FDD /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAE6710ACA10100F87527 /* sqSqueakOSXInfoPlistInterface.h */;\n\t\tname = \"sqSqueakOSXInfoPlistInterface.h: 53\";\n\t\trLen = 0;\n\t\trLoc = 2297;\n\t\trType = 0;\n\t\tvrLen = 2619;\n\t\tvrLoc = 1560;\n\t};\n\t94BE8BD5123DA32300C89FDD /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAE6810ACA10100F87527 /* sqSqueakOSXInfoPlistInterface.m */;\n\t\tname = \"sqSqueakOSXInfoPlistInterface.m: 79\";\n\t\trLen = 0;\n\t\trLoc = 3185;\n\t\trType = 0;\n\t\tvrLen = 1921;\n\t\tvrLoc = 2825;\n\t};\n\t94BE8BF5123DA42700C89FDD /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C36A9310B09EE70041953A /* sqSqueakOSXApplication+events.m */;\n\t\tname = \"sqSqueakOSXApplication+events.m: 186\";\n\t\trLen = 0;\n\t\trLoc = 7917;\n\t\trType = 0;\n\t\tvrLen = 1653;\n\t\tvrLoc = 6896;\n\t};\n\t94C16B42123D72AE00A8622A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9428BB0510BB478600DAD287 /* sqSqueakOSXApplication+clipboard.m */;\n\t\tname = \"sqSqueakOSXApplication+clipboard.m: 60\";\n\t\trLen = 37;\n\t\trLoc = 2664;\n\t\trType = 0;\n\t\tvrLen = 2157;\n\t\tvrLoc = 1451;\n\t};\n\t94C16B43123D72AE00A8622A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9458525B10F043EB001401E7 /* sqSqueakIPhoneApplication+clipboard.m */;\n\t\tname = \"sqSqueakIPhoneApplication+clipboard.m: 24\";\n\t\trLen = 37;\n\t\trLoc = 695;\n\t\trType = 0;\n\t\tvrLen = 1522;\n\t\tvrLoc = 0;\n\t};\n\t94C16B5A123D735F00A8622A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9452D5E20E044A9D000AD792 /* sqSqueakMainApplication+vmAndImagePath.m */;\n\t\tname = \"sqSqueakMainApplication+vmAndImagePath.m: 87\";\n\t\trLen = 37;\n\t\trLoc = 3354;\n\t\trType = 0;\n\t\tvrLen = 1651;\n\t\tvrLoc = 2190;\n\t};\n\t94C2068810AF4F53002F4160 /* sqSqueakOSXNSView.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {838, 1157}}\";\n\t\t\tsepNavSelRange = \"{3309, 6}\";\n\t\t\tsepNavVisRange = \"{1747, 1954}\";\n\t\t\tsepNavWindowFrame = \"{{120, 18}, {1326, 1010}}\";\n\t\t};\n\t};\n\t94C2068910AF4F53002F4160 /* sqSqueakOSXNSView.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1132, 9997}}\";\n\t\t\tsepNavSelRange = \"{10089, 0}\";\n\t\t\tsepNavVisRange = \"{6392, 2715}\";\n\t\t\tsepNavWindowFrame = \"{{452, 7}, {1076, 1021}}\";\n\t\t};\n\t};\n\t94C206AA10AF5107002F4160 /* NSImageRep.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSImageRep.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSImageRep.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C206D210AF5536002F4160 /* CGImage.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = CGImage.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Headers/CGImage.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C206D810AF5536002F4160 /* NSGraphicsContext.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSGraphicsContext.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSGraphicsContext.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C206DA10AF5536002F4160 /* CGContext.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = CGContext.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Headers/CGContext.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C2070610AF5A9E002F4160 /* NSImage.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSImage.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSImage.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C2074310AF5FB7002F4160 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C206AA10AF5107002F4160 /* NSImageRep.h */;\n\t\tname = \"NSImageRep.h: 45\";\n\t\trLen = 33;\n\t\trLoc = 1303;\n\t\trType = 0;\n\t\tvrLen = 1800;\n\t\tvrLoc = 0;\n\t};\n\t94C207E910AF66D7002F4160 /* NSWindow.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSWindow.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSWindow.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C2091010AF7413002F4160 /* CIImage.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = CIImage.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/QuartzCore.framework/Versions/A/Headers/CIImage.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C2091210AF7413002F4160 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C2091310AF7413002F4160 /* NSCIImageRep.h */;\n\t\tname = \"NSCIImageRep.h: 29\";\n\t\trLen = 26;\n\t\trLoc = 776;\n\t\trType = 0;\n\t\tvrLen = 841;\n\t\tvrLoc = 0;\n\t};\n\t94C2091310AF7413002F4160 /* NSCIImageRep.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSCIImageRep.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSCIImageRep.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C2092A10AF769A002F4160 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C2091010AF7413002F4160 /* CIImage.h */;\n\t\tname = \"CIImage.h: 98\";\n\t\trLen = 15;\n\t\trLoc = 3526;\n\t\trType = 0;\n\t\tvrLen = 1904;\n\t\tvrLoc = 2714;\n\t};\n\t94C2092D10AF769A002F4160 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C206D810AF5536002F4160 /* NSGraphicsContext.h */;\n\t\tname = \"NSGraphicsContext.h: 59\";\n\t\trLen = 39;\n\t\trLoc = 2654;\n\t\trType = 0;\n\t\tvrLen = 1997;\n\t\tvrLoc = 2593;\n\t};\n\t94C367C010AF9C0A0041953A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C367C110AF9C0A0041953A /* Aliases.h */;\n\t\tname = \"Aliases.h: 286\";\n\t\trLen = 34;\n\t\trLoc = 9594;\n\t\trType = 0;\n\t\tvrLen = 1442;\n\t\tvrLoc = 8779;\n\t};\n\t94C367C110AF9C0A0041953A /* Aliases.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = Aliases.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/Headers/Aliases.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C367C210AF9C0A0041953A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C367C310AF9C0A0041953A /* LSInfo.h */;\n\t\tname = \"LSInfo.h: 257\";\n\t\trLen = 22;\n\t\trLoc = 9965;\n\t\trType = 0;\n\t\tvrLen = 1369;\n\t\tvrLoc = 9104;\n\t};\n\t94C367C310AF9C0A0041953A /* LSInfo.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = LSInfo.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Headers/LSInfo.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C367D110AF9C830041953A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAFCA10ACC89100F87527 /* CFURL.h */;\n\t\tname = \"CFURL.h: 636\";\n\t\trLen = 20;\n\t\trLoc = 30806;\n\t\trType = 0;\n\t\tvrLen = 2114;\n\t\tvrLoc = 29706;\n\t};\n\t94C3682410AFA39A0041953A /* macintoshosxextra.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {996, 770}}\";\n\t\t\tsepNavSelRange = \"{192, 0}\";\n\t\t\tsepNavVisRange = \"{0, 192}\";\n\t\t};\n\t};\n\t94C3682510AFA39A0041953A /* macintoshosxextra.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 572}}\";\n\t\t\tsepNavSelRange = \"{244, 11}\";\n\t\t\tsepNavVisRange = \"{0, 1286}\";\n\t\t\tsepNavWindowFrame = \"{{15, 18}, {1170, 1005}}\";\n\t\t};\n\t};\n\t94C3687610AFA77F0041953A /* sqSqueakOSXApplication+cursor.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 585}}\";\n\t\t\tsepNavSelRange = \"{1874, 6}\";\n\t\t\tsepNavVisRange = \"{0, 2040}\";\n\t\t\tsepNavWindowFrame = \"{{38, 24}, {1017, 978}}\";\n\t\t};\n\t};\n\t94C3687710AFA77F0041953A /* sqSqueakOSXApplication+cursor.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1167, 2041}}\";\n\t\t\tsepNavSelRange = \"{3586, 18}\";\n\t\t\tsepNavVisRange = \"{2779, 1505}\";\n\t\t\tsepNavWindowFrame = \"{{299, 9}, {1426, 1019}}\";\n\t\t};\n\t};\n\t94C3687B10AFA8300041953A /* sqSqueakCursorAPI.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 616}}\";\n\t\t\tsepNavSelRange = \"{9, 12}\";\n\t\t\tsepNavVisRange = \"{0, 1788}\";\n\t\t};\n\t};\n\t94C3687C10AFA8300041953A /* sqSqueakCursorAPI.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 858}}\";\n\t\t\tsepNavSelRange = \"{2250, 19}\";\n\t\t\tsepNavVisRange = \"{640, 2163}\";\n\t\t\tsepNavWindowFrame = \"{{38, 19}, {905, 983}}\";\n\t\t};\n\t};\n\t94C3688A10AFA9EF0041953A /* sqSqueakMainApplication+cursor.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 585}}\";\n\t\t\tsepNavSelRange = \"{1949, 6}\";\n\t\t\tsepNavVisRange = \"{0, 2021}\";\n\t\t};\n\t};\n\t94C3688B10AFA9EF0041953A /* sqSqueakMainApplication+cursor.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 624}}\";\n\t\t\tsepNavSelRange = \"{1961, 6}\";\n\t\t\tsepNavVisRange = \"{62, 1980}\";\n\t\t};\n\t};\n\t94C368F610AFAEA60041953A /* QuickdrawTypes.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = QuickdrawTypes.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/Headers/QuickdrawTypes.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C368F910AFAEA60041953A /* CFByteOrder.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = CFByteOrder.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreFoundation.framework/Versions/A/Headers/CFByteOrder.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C3696310AFB7550041953A /* NSGraphics.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSGraphics.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSGraphics.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C3696410AFB7550041953A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C368F610AFAEA60041953A /* QuickdrawTypes.h */;\n\t\tname = \"QuickdrawTypes.h: 262\";\n\t\trLen = 16;\n\t\trLoc = 8337;\n\t\trType = 0;\n\t\tvrLen = 1520;\n\t\tvrLoc = 7208;\n\t};\n\t94C3696610AFB7550041953A /* NSBitmapImageRep.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSBitmapImageRep.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSBitmapImageRep.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C3698D10B082DF0041953A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C368F910AFAEA60041953A /* CFByteOrder.h */;\n\t\tname = \"CFByteOrder.h: 78\";\n\t\trLen = 20;\n\t\trLoc = 1887;\n\t\trType = 0;\n\t\tvrLen = 1136;\n\t\tvrLoc = 1325;\n\t};\n\t94C3699110B082DF0041953A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C3699210B082DF0041953A /* NSColor.h */;\n\t\tname = \"NSColor.h: 65\";\n\t\trLen = 7;\n\t\trLoc = 3749;\n\t\trType = 0;\n\t\tvrLen = 2379;\n\t\tvrLoc = 2696;\n\t};\n\t94C3699210B082DF0041953A /* NSColor.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSColor.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSColor.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C36A6D10B091BB0041953A /* NSCursor.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSCursor.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSCursor.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C36A9210B09EE70041953A /* sqSqueakOSXApplication+events.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 728}}\";\n\t\t\tsepNavSelRange = \"{1980, 16}\";\n\t\t\tsepNavVisRange = \"{108, 2800}\";\n\t\t\tsepNavWindowFrame = \"{{149, 4}, {905, 983}}\";\n\t\t};\n\t};\n\t94C36A9310B09EE70041953A /* sqSqueakOSXApplication+events.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1412, 5291}}\";\n\t\t\tsepNavSelRange = \"{7917, 0}\";\n\t\t\tsepNavVisRange = \"{6896, 1653}\";\n\t\t\tsepNavWindowFrame = \"{{385, 4}, {1131, 1019}}\";\n\t\t};\n\t};\n\t94C36AD910B0AF960041953A /* NSEvent.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSEvent.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSEvent.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C36C9710B0CF290041953A /* Info-iPhone.plist */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavWindowFrame = \"{{15, 55}, {1438, 968}}\";\n\t\t};\n\t};\n\t94C3CD4E1235C80200A4E319 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9402DD6F10CE0E91005C2102 /* SqViewClut.m */;\n\t\tname = \"SqViewClut.m: 13\";\n\t\trLen = 0;\n\t\trLoc = 343;\n\t\trType = 0;\n\t\tvrLen = 2832;\n\t\tvrLoc = 0;\n\t};\n\t94C4B80F10C06C4700CD4F90 /* configx.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {994, 799}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1946}\";\n\t\t};\n\t};\n\t94C4B82E10C06F8800CD4F90 /* sqSqueakOSXSoundCoreAudio.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1109, 724}}\";\n\t\t\tsepNavSelRange = \"{1876, 22}\";\n\t\t\tsepNavVisRange = \"{0, 1939}\";\n\t\t};\n\t};\n\t94C4B82F10C06F8800CD4F90 /* sqSqueakOSXSoundCoreAudio.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 793}}\";\n\t\t\tsepNavSelRange = \"{1951, 5}\";\n\t\t\tsepNavVisRange = \"{1559, 486}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {1426, 1019}}\";\n\t\t};\n\t};\n\t94C7480712333A2900B1F982 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94A1B21B10B9DE0300C64473 /* keyBoardStrokeDetails.m */;\n\t\tname = \"keyBoardStrokeDetails.m: 42\";\n\t\trLen = 0;\n\t\trLoc = 1867;\n\t\trType = 0;\n\t\tvrLen = 1908;\n\t\tvrLoc = 0;\n\t};\n\t94C748E012333EE900B1F982 /* sqMacUIEventsUniversal.c:1113 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 94C748E112333EE900B1F982 /* sqMacUIEventsUniversal.c */;\n\t\tfunctionName = \"recordKeyboardEventCarbon()\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 1113;\n\t\tmodificationTime = 308445393.436654;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 0;\n\t};\n\t94C748E112333EE900B1F982 /* sqMacUIEventsUniversal.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqMacUIEventsUniversal.c;\n\t\tpath = \"/Volumes/330GB Photos/Cog Before Aug 2010 changes/platforms/Mac OS/vm/sqMacUIEventsUniversal.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C887D410ADCC0D007CB39E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C887D510ADCC0D007CB39E /* NSThread.h */;\n\t\tname = \"NSThread.h: 75\";\n\t\trLen = 96;\n\t\trLoc = 1964;\n\t\trType = 0;\n\t\tvrLen = 2073;\n\t\tvrLoc = 503;\n\t};\n\t94C887D510ADCC0D007CB39E /* NSThread.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSThread.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSThread.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C887F910ADCEFC007CB39E /* sqSqueakOSXApplication+imageReadWrite.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {908, 585}}\";\n\t\t\tsepNavSelRange = \"{1939, 0}\";\n\t\t\tsepNavVisRange = \"{47, 1963}\";\n\t\t};\n\t};\n\t94C887FA10ADCEFC007CB39E /* sqSqueakOSXApplication+imageReadWrite.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {838, 1820}}\";\n\t\t\tsepNavSelRange = \"{2709, 0}\";\n\t\t\tsepNavVisRange = \"{1953, 1821}\";\n\t\t\tsepNavWindowFrame = \"{{685, 4}, {878, 1019}}\";\n\t\t};\n\t};\n\t94C888B710ADE75B007CB39E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAE9D10ACA3A300F87527 /* NSBundle.h */;\n\t\tname = \"NSBundle.h: 11\";\n\t\trLen = 8;\n\t\trLoc = 335;\n\t\trType = 0;\n\t\tvrLen = 2317;\n\t\tvrLoc = 0;\n\t};\n\t94C88B6810AF26F8007CB39E /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C88B6910AF26F8007CB39E /* squeakProxy.m */;\n\t\tname = \"squeakProxy.m: 124\";\n\t\trLen = 22;\n\t\trLoc = 3876;\n\t\trType = 0;\n\t\tvrLen = 1083;\n\t\tvrLoc = 3252;\n\t};\n\t94C88B6910AF26F8007CB39E /* squeakProxy.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = squeakProxy.m;\n\t\tpath = \"/Volumes/px2/business/SqueakiPhone/SqueakObjCBasedForOSXAndIPhone/Blob/platforms/Mac OSObjC/plugins/SqueakObjectiveC/squeakProxy.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C88BDD10AF3C52007CB39E /* sqSqueakOSXScreenAndWindow.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1345, 891}}\";\n\t\t\tsepNavSelRange = \"{1866, 43}\";\n\t\t\tsepNavVisRange = \"{0, 2111}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {1392, 1019}}\";\n\t\t};\n\t};\n\t94C88BDE10AF3C52007CB39E /* sqSqueakOSXScreenAndWindow.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1167, 962}}\";\n\t\t\tsepNavSelRange = \"{2578, 17}\";\n\t\t\tsepNavVisRange = \"{786, 1864}\";\n\t\t\tsepNavWindowFrame = \"{{15, 49}, {1346, 974}}\";\n\t\t};\n\t};\n\t94C88C0E10AF4196007CB39E /* NSGeometry.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSGeometry.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSGeometry.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94C8D195123EDACE0019544B /* SqueakUIViewOpenGL.m:135 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 942F48FD123C1C0C002B05DF /* SqueakUIViewOpenGL.m */;\n\t\tfunctionName = \"-layoutSubviews\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 135;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 308445394.455894;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 1;\n\t};\n\t94C8D197123EDAD30019544B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9452D7630E0452D3000AD792 /* sqiPhoneScreenAndWindow.h */;\n\t\tname = \"sqiPhoneScreenAndWindow.h: 42\";\n\t\trLen = 23;\n\t\trLoc = 1909;\n\t\trType = 0;\n\t\tvrLen = 1943;\n\t\tvrLoc = 0;\n\t};\n\t94C8D19A123EDAD30019544B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCE93F0DDE044700F38F31 /* sqSqueakIPhoneApplication+events.m */;\n\t\tname = \"sqSqueakIPhoneApplication+events.m: 51\";\n\t\trLen = 0;\n\t\trLoc = 2125;\n\t\trType = 0;\n\t\tvrLen = 1753;\n\t\tvrLoc = 1301;\n\t};\n\t94C8D19B123EDAD30019544B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 1D3623250D0F684500981E51 /* SqueakNoOGLIPhoneAppDelegate.m */;\n\t\tname = \"SqueakNoOGLIPhoneAppDelegate.m: 138\";\n\t\trLen = 0;\n\t\trLoc = 5386;\n\t\trType = 0;\n\t\tvrLen = 1794;\n\t\tvrLoc = 5229;\n\t};\n\t94C8D19C123EDAD30019544B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 940CE8550DFCE2D200EBA91B /* SqueakUIController.m */;\n\t\tname = \"SqueakUIController.m: 94\";\n\t\trLen = 0;\n\t\trLoc = 3914;\n\t\trType = 0;\n\t\tvrLen = 1552;\n\t\tvrLoc = 2585;\n\t};\n\t94CAE0ED1230DE6C00AFE487 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 941724420F36624C0031AF33 /* squeakProxy.m */;\n\t\tname = \"squeakProxy.m: 49\";\n\t\trLen = 11;\n\t\trLoc = 1931;\n\t\trType = 0;\n\t\tvrLen = 2138;\n\t\tvrLoc = 493;\n\t};\n\t94CFE6A910BE63A900847DF5 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C207E910AF66D7002F4160 /* NSWindow.h */;\n\t\tname = \"NSWindow.h: 453\";\n\t\trLen = 8;\n\t\trLoc = 19650;\n\t\trType = 0;\n\t\tvrLen = 2322;\n\t\tvrLoc = 18630;\n\t};\n\t94CFE6B810BE63A900847DF5 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9406E87510B66A74002F81F2 /* SqueakInterpreterEventSensor.m */;\n\t\tname = \"SqueakInterpreterEventSensor.m: 54\";\n\t\trLen = 8;\n\t\trLoc = 1477;\n\t\trType = 0;\n\t\tvrLen = 1077;\n\t\tvrLoc = 1241;\n\t};\n\t94CFE6B910BE63A900847DF5 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94F89AED10B497F400556475 /* NSResponder.h */;\n\t\tname = \"NSResponder.h: 31\";\n\t\trLen = 12;\n\t\trLoc = 957;\n\t\trType = 0;\n\t\tvrLen = 1492;\n\t\tvrLoc = 0;\n\t};\n\t94CFE6BD10BE63A900847DF5 /* SqViewEventSensor.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = SqViewEventSensor.m;\n\t\tpath = \"/Users/johnmci/Work In Progress/smalltalk/CocoaSqueakSource/SqueakAppKit/SqViewEventSensor.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94CFE6C010BE63A900847DF5 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 945BA53B10B218F700C2020C /* math.h */;\n\t\tname = \"math.h: 379\";\n\t\trLen = 8;\n\t\trLoc = 15491;\n\t\trType = 0;\n\t\tvrLen = 1479;\n\t\tvrLoc = 14505;\n\t};\n\t94CFE70110BE683800847DF5 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C36AD910B0AF960041953A /* NSEvent.h */;\n\t\tname = \"NSEvent.h: 246\";\n\t\trLen = 6;\n\t\trLoc = 8572;\n\t\trType = 0;\n\t\tvrLen = 1801;\n\t\tvrLoc = 7114;\n\t};\n\t94D16BFC10BCEFEE00A69A89 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D16BFD10BCEFEE00A69A89 /* Document.m */;\n\t\tname = \"Document.m: 35\";\n\t\trLen = 32;\n\t\trLoc = 1133;\n\t\trType = 0;\n\t\tvrLen = 1663;\n\t\tvrLoc = 14;\n\t};\n\t94D16BFD10BCEFEE00A69A89 /* Document.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = Document.m;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/CocoaSqueak-3.0.4/src/CocoaSqueak/Document.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D16BFE10BCEFEE00A69A89 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 942CF46B10BCE44B009BD905 /* NSWindowController.h */;\n\t\tname = \"NSWindowController.h: 13\";\n\t\trLen = 18;\n\t\trLoc = 224;\n\t\trType = 0;\n\t\tvrLen = 2830;\n\t\tvrLoc = 0;\n\t};\n\t94D16C2A10BCF28A00A69A89 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9428BBE210BB565100DAD287 /* sqUnixQuartz.m */;\n\t\tname = \"sqUnixQuartz.m: 1031\";\n\t\trLen = 1;\n\t\trLoc = 27820;\n\t\trType = 0;\n\t\tvrLen = 1184;\n\t\tvrLoc = 27288;\n\t};\n\t94D16C4010BCF3E100A69A89 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D16C4110BCF3E100A69A89 /* CGDirectDisplay.h */;\n\t\tname = \"CGDirectDisplay.h: 336\";\n\t\trLen = 22;\n\t\trLoc = 13802;\n\t\trType = 0;\n\t\tvrLen = 2189;\n\t\tvrLoc = 12694;\n\t};\n\t94D16C4110BCF3E100A69A89 /* CGDirectDisplay.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = CGDirectDisplay.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Headers/CGDirectDisplay.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D16C6510BCF5B700A69A89 /* NSApplication.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSApplication.h;\n\t\tpath = /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSApplication.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D16CA310BCF93000A69A89 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D16C6510BCF5B700A69A89 /* NSApplication.h */;\n\t\tname = \"NSApplication.h: 269\";\n\t\trLen = 43;\n\t\trLoc = 10310;\n\t\trType = 0;\n\t\tvrLen = 2825;\n\t\tvrLoc = 9201;\n\t};\n\t94D16CAF10BCF96B00A69A89 /* Credits.rtf */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1140, 649}}\";\n\t\t\tsepNavSelRange = \"{269, 0}\";\n\t\t\tsepNavVisRect = \"{{0, 0}, {1140, 649}}\";\n\t\t\tsepNavWindowFrame = \"{{175, 9}, {878, 1019}}\";\n\t\t};\n\t};\n\t94D3654D10CEC86C00805023 /* BitMapConversionLogicFromX11.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1167, 804}}\";\n\t\t\tsepNavSelRange = \"{581, 14}\";\n\t\t\tsepNavVisRange = \"{0, 1092}\";\n\t\t\tsepNavWindowFrame = \"{{15, 13}, {1326, 1010}}\";\n\t\t};\n\t};\n\t94D3654E10CEC86C00805023 /* BitMapConversionLogicFromX11.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1167, 3029}}\";\n\t\t\tsepNavSelRange = \"{1749, 84}\";\n\t\t\tsepNavVisRange = \"{1650, 1795}\";\n\t\t\tsepNavWindowFrame = \"{{715, -46}, {1326, 1010}}\";\n\t\t};\n\t};\n\t94D3660B10CEE03900805023 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D3660C10CEE03900805023 /* CIImage.h */;\n\t\tname = \"CIImage.h: 32\";\n\t\trLen = 4;\n\t\trLoc = 826;\n\t\trType = 0;\n\t\tvrLen = 2058;\n\t\tvrLoc = 0;\n\t};\n\t94D3660C10CEE03900805023 /* CIImage.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = CIImage.h;\n\t\tpath = /System/Library/Frameworks/QuartzCore.framework/Versions/A/Headers/CIImage.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D715CB10B723B200F69A71 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D715CC10B723B200F69A71 /* NSData.h */;\n\t\tname = \"NSData.h: 45\";\n\t\trLen = 6;\n\t\trLoc = 1410;\n\t\trType = 0;\n\t\tvrLen = 1584;\n\t\tvrLoc = 0;\n\t};\n\t94D715CC10B723B200F69A71 /* NSData.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSData.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSData.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D7173610B72F8800F69A71 /* FunctionKeyNames.strings */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = text.plist.strings;\n\t\tname = FunctionKeyNames.strings;\n\t\tpath = /System/Library/Frameworks/AppKit.framework/Versions/C/Resources/English.lproj/FunctionKeyNames.strings;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D7174110B72FDF00F69A71 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D7173610B72F8800F69A71 /* FunctionKeyNames.strings */;\n\t\tname = \"FunctionKeyNames.strings: 2\";\n\t\trLen = 9;\n\t\trLoc = 29;\n\t\trType = 0;\n\t\tvrLen = 802;\n\t\tvrLoc = 0;\n\t};\n\t94D7177D10B73A3800F69A71 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D7177E10B73A3800F69A71 /* SqueakEventQueue.m */;\n\t\tname = \"SqueakEventQueue.m: 90\";\n\t\trLen = 17;\n\t\trLoc = 2396;\n\t\trType = 0;\n\t\tvrLen = 1483;\n\t\tvrLoc = 736;\n\t};\n\t94D7177E10B73A3800F69A71 /* SqueakEventQueue.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = SqueakEventQueue.m;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/CocoaSqueak-3.0.4/src/Squeak/SqueakEventQueue.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D7178010B73A3800F69A71 /* SqueakInterpreterEventSensor.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = SqueakInterpreterEventSensor.m;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/CocoaSqueak-3.0.4/src/Squeak/SqueakInterpreterEventSensor.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D7178310B73A3800F69A71 /* SqViewInputSensor.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = SqViewInputSensor.m;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/CocoaSqueak-3.0.4/src/SqueakAppKit/SqViewInputSensor.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D7178410B73A3800F69A71 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D7178510B73A3800F69A71 /* SqueakController.m */;\n\t\tname = \"SqueakController.m: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1497;\n\t\tvrLoc = 370;\n\t};\n\t94D7178510B73A3800F69A71 /* SqueakController.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = SqueakController.m;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/CocoaSqueak-3.0.4/src/CocoaSqueak/SqueakController.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D7178610B73A3800F69A71 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D7178710B73A3800F69A71 /* SqViewBitmapConversion.m */;\n\t\tname = \"SqViewBitmapConversion.m: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1336;\n\t\tvrLoc = 7040;\n\t};\n\t94D7178710B73A3800F69A71 /* SqViewBitmapConversion.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = SqViewBitmapConversion.m;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/CocoaSqueak-3.0.4/src/SqueakAppKit/SqViewBitmapConversion.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D7178810B73A3800F69A71 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D7178910B73A3800F69A71 /* SqView.m */;\n\t\tname = \"SqView.m: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 2292;\n\t\tvrLoc = 6209;\n\t};\n\t94D7178910B73A3800F69A71 /* SqView.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = SqView.m;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/CocoaSqueak-3.0.4/src/SqueakAppKit/SqView.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D7178A10B73A3800F69A71 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D7178B10B73A3800F69A71 /* SqClipboardHandler.m */;\n\t\tname = \"SqClipboardHandler.m: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 1588;\n\t\tvrLoc = 0;\n\t};\n\t94D7178B10B73A3800F69A71 /* SqClipboardHandler.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = SqClipboardHandler.m;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/CocoaSqueak-3.0.4/src/SqueakAppKit/SqClipboardHandler.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D7178C10B73A3800F69A71 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D7178D10B73A3800F69A71 /* CarbonSound.c */;\n\t\tname = \"CarbonSound.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 2068;\n\t\tvrLoc = 1940;\n\t};\n\t94D7178D10B73A3800F69A71 /* CarbonSound.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = CarbonSound.c;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/CocoaSqueak-3.0.4/src/SqueakAppKit/CarbonSound.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D7178F10B73A3800F69A71 /* SqueakInterpreterEventSensor.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = SqueakInterpreterEventSensor.h;\n\t\tpath = \"/Users/johnmci/Documents/Squeak/CocoaSqueak-3.0.4/src/Squeak/SqueakInterpreterEventSensor.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D7179110B73A3800F69A71 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D7179210B73A3800F69A71 /* FScriptTextView.m */;\n\t\tname = \"FScriptTextView.m: 126\";\n\t\trLen = 138;\n\t\trLoc = 4464;\n\t\trType = 0;\n\t\tvrLen = 1701;\n\t\tvrLoc = 4066;\n\t};\n\t94D7179210B73A3800F69A71 /* FScriptTextView.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = FScriptTextView.m;\n\t\tpath = \"/Users/johnmci/Work In Progress/smalltalk/FScriptSources-20031020/FScript/FScriptFramework/FScriptTextView.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D717BE10B73DD900F69A71 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9406E8D110B67499002F81F2 /* NSRange.h */;\n\t\tname = \"NSRange.h: 12\";\n\t\trLen = 23;\n\t\trLoc = 213;\n\t\trType = 0;\n\t\tvrLen = 1181;\n\t\tvrLoc = 0;\n\t};\n\t94D717E610B7421F00F69A71 /* sqUnixQuartz.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = sqUnixQuartz.m;\n\t\tpath = \"/Users/johnmci/Documents/SqueakSparklePlugin/platforms/unix/vm-display-Quartz/sqUnixQuartz.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D717F810B743B800F69A71 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D717E610B7421F00F69A71 /* sqUnixQuartz.m */;\n\t\tname = \"sqUnixQuartz.m: 2301\";\n\t\trLen = 18;\n\t\trLoc = 59489;\n\t\trType = 0;\n\t\tvrLen = 1347;\n\t\tvrLoc = 59154;\n\t};\n\t94D7183810B74BF300F69A71 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D7183910B74BF300F69A71 /* NSInputManager.h */;\n\t\tname = \"NSInputManager.h: 21\";\n\t\trLen = 68;\n\t\trLoc = 621;\n\t\trType = 0;\n\t\tvrLen = 1979;\n\t\tvrLoc = 0;\n\t};\n\t94D7183910B74BF300F69A71 /* NSInputManager.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSInputManager.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSInputManager.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D7183A10B74BF300F69A71 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D7183B10B74BF300F69A71 /* NSTextInputClient.h */;\n\t\tname = \"NSTextInputClient.h: 32\";\n\t\trLen = 20;\n\t\trLoc = 1358;\n\t\trType = 0;\n\t\tvrLen = 2207;\n\t\tvrLoc = 0;\n\t};\n\t94D7183B10B74BF300F69A71 /* NSTextInputClient.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSTextInputClient.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSTextInputClient.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D73E5210B5B9CE00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D73E5310B5B9CE00F8C034 /* cl.h */;\n\t\tname = \"cl.h: 118\";\n\t\trLen = 0;\n\t\trLoc = 4914;\n\t\trType = 0;\n\t\tvrLen = 2396;\n\t\tvrLoc = 3357;\n\t};\n\t94D73E5310B5B9CE00F8C034 /* cl.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = cl.h;\n\t\tpath = /System/Library/Frameworks/OpenCL.framework/Versions/A/Headers/cl.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D73E5410B5B9CE00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D73E5510B5B9CE00F8C034 /* float-i32.h */;\n\t\tname = \"float-i32.h: 20\";\n\t\trLen = 35;\n\t\trLoc = 653;\n\t\trType = 0;\n\t\tvrLen = 2227;\n\t\tvrLoc = 0;\n\t};\n\t94D73E5510B5B9CE00F8C034 /* float-i32.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = \"float-i32.h\";\n\t\tpath = \"/Users/johnmci/Documents/Files from Lamie/Documents/Darwin/gcc3-1151/gcc/config/float-i32.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D73E5610B5B9CE00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D73E5710B5B9CE00F8C034 /* float-i128.h */;\n\t\tname = \"float-i128.h: 19\";\n\t\trLen = 11;\n\t\trLoc = 649;\n\t\trType = 0;\n\t\tvrLen = 2262;\n\t\tvrLoc = 0;\n\t};\n\t94D73E5710B5B9CE00F8C034 /* float-i128.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = \"float-i128.h\";\n\t\tpath = \"/Users/johnmci/Documents/Files from Lamie/Documents/Darwin/gcc3-1151/gcc/config/float-i128.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D73E5810B5B9CE00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D73E5910B5B9CE00F8C034 /* float-i386.h */;\n\t\tname = \"float-i386.h: 20\";\n\t\trLen = 11;\n\t\trLoc = 670;\n\t\trType = 0;\n\t\tvrLen = 2261;\n\t\tvrLoc = 0;\n\t};\n\t94D73E5910B5B9CE00F8C034 /* float-i386.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = \"float-i386.h\";\n\t\tpath = \"/Users/johnmci/Documents/Files from Lamie/Documents/Darwin/gcc3-1151/gcc/config/float-i386.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D73E5A10B5B9CE00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D73E5B10B5B9CE00F8C034 /* float-m68k.h */;\n\t\tname = \"float-m68k.h: 20\";\n\t\trLen = 11;\n\t\trLoc = 677;\n\t\trType = 0;\n\t\tvrLen = 2268;\n\t\tvrLoc = 0;\n\t};\n\t94D73E5B10B5B9CE00F8C034 /* float-m68k.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = \"float-m68k.h\";\n\t\tpath = \"/Users/johnmci/Documents/Files from Lamie/Documents/Darwin/gcc3-1151/gcc/config/float-m68k.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D73E5C10B5B9CE00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D73E5D10B5B9CE00F8C034 /* float-sh.h */;\n\t\tname = \"float-sh.h: 19\";\n\t\trLen = 11;\n\t\trLoc = 642;\n\t\trType = 0;\n\t\tvrLen = 2198;\n\t\tvrLoc = 0;\n\t};\n\t94D73E5D10B5B9CE00F8C034 /* float-sh.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = \"float-sh.h\";\n\t\tpath = \"/Users/johnmci/Documents/Files from Lamie/Documents/Darwin/gcc3-1151/gcc/config/float-sh.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D73E5E10B5B9CE00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D73E5F10B5B9CE00F8C034 /* float-sparc.h */;\n\t\tname = \"float-sparc.h: 20\";\n\t\trLen = 11;\n\t\trLoc = 729;\n\t\trType = 0;\n\t\tvrLen = 2320;\n\t\tvrLoc = 0;\n\t};\n\t94D73E5F10B5B9CE00F8C034 /* float-sparc.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = \"float-sparc.h\";\n\t\tpath = \"/Users/johnmci/Documents/Files from Lamie/Documents/Darwin/gcc3-1151/gcc/config/float-sparc.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D73E6010B5B9CE00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D73E6110B5B9CE00F8C034 /* float-vax.h */;\n\t\tname = \"float-vax.h: 6\";\n\t\trLen = 0;\n\t\trLoc = 173;\n\t\trType = 0;\n\t\tvrLen = 2188;\n\t\tvrLoc = 0;\n\t};\n\t94D73E6110B5B9CE00F8C034 /* float-vax.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = \"float-vax.h\";\n\t\tpath = \"/Users/johnmci/Documents/Files from Lamie/Documents/Darwin/gcc3-1151/gcc/config/float-vax.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D73E6210B5B9CE00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D73E6310B5B9CE00F8C034 /* float-i64.h */;\n\t\tname = \"float-i64.h: 20\";\n\t\trLen = 35;\n\t\trLoc = 660;\n\t\trType = 0;\n\t\tvrLen = 2261;\n\t\tvrLoc = 0;\n\t};\n\t94D73E6310B5B9CE00F8C034 /* float-i64.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = \"float-i64.h\";\n\t\tpath = \"/Users/johnmci/Documents/Files from Lamie/Documents/Darwin/gcc3-1151/gcc/config/float-i64.h\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D73E6410B5B9CE00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D73E6510B5B9CE00F8C034 /* dummyFFI.c */;\n\t\tname = \"dummyFFI.c: 116\";\n\t\trLen = 19;\n\t\trLoc = 2641;\n\t\trType = 0;\n\t\tvrLen = 813;\n\t\tvrLoc = 2018;\n\t};\n\t94D73E6510B5B9CE00F8C034 /* dummyFFI.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = dummyFFI.c;\n\t\tpath = /Users/johnmci/Shared/plugins/SqueakFFIPrims/dummyFFI.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D73E6810B5B9CE00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D73E6910B5B9CE00F8C034 /* c90-float-1.c */;\n\t\tname = \"c90-float-1.c: 47\";\n\t\trLen = 11;\n\t\trLoc = 855;\n\t\trType = 0;\n\t\tvrLen = 1089;\n\t\tvrLoc = 0;\n\t};\n\t94D73E6910B5B9CE00F8C034 /* c90-float-1.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = \"c90-float-1.c\";\n\t\tpath = \"/Users/johnmci/Documents/Files from Lamie/Documents/Darwin/gcc3-1151/gcc/testsuite/gcc.dg/c90-float-1.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D73E6A10B5B9CE00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D73E6B10B5B9CE00F8C034 /* enquire.c */;\n\t\tname = \"enquire.c: 1232\";\n\t\trLen = 48;\n\t\trLoc = 38198;\n\t\trType = 0;\n\t\tvrLen = 1282;\n\t\tvrLoc = 37320;\n\t};\n\t94D73E6B10B5B9CE00F8C034 /* enquire.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = enquire.c;\n\t\tpath = \"/Users/johnmci/Documents/Files from Lamie/Documents/Darwin/gcc3-1151/gcc/enquire.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D73EE610B5CF8400F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94F89C5A10B4BF2800556475 /* NSRunLoop.h */;\n\t\tname = \"NSRunLoop.h: 30\";\n\t\trLen = 8;\n\t\trLoc = 714;\n\t\trType = 0;\n\t\tvrLen = 1899;\n\t\tvrLoc = 0;\n\t};\n\t94D73F4910B5DA4E00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 942ABE0910AA21270086D908 /* NSView.h */;\n\t\tname = \"NSView.h: 219\";\n\t\trLen = 8;\n\t\trLoc = 7448;\n\t\trType = 0;\n\t\tvrLen = 2783;\n\t\tvrLoc = 6088;\n\t};\n\t94D73FA010B5E5A200F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D73FA110B5E5A200F8C034 /* CIColor.h */;\n\t\tname = \"CIColor.h: 50\";\n\t\trLen = 16;\n\t\trLoc = 1220;\n\t\trType = 0;\n\t\tvrLen = 1382;\n\t\tvrLoc = 0;\n\t};\n\t94D73FA110B5E5A200F8C034 /* CIColor.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = CIColor.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/QuartzCore.framework/Versions/A/Headers/CIColor.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D73FA410B5E5A200F8C034 /* CGColor.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = CGColor.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Headers/CGColor.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D73FAD10B5E69900F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D73FA410B5E5A200F8C034 /* CGColor.h */;\n\t\tname = \"CGColor.h: 44\";\n\t\trLen = 68;\n\t\trLoc = 1614;\n\t\trType = 0;\n\t\tvrLen = 2485;\n\t\tvrLoc = 0;\n\t};\n\t94D73FB510B5E6DA00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C206DA10AF5536002F4160 /* CGContext.h */;\n\t\tname = \"CGContext.h: 402\";\n\t\trLen = 62;\n\t\trLoc = 14416;\n\t\trType = 0;\n\t\tvrLen = 511;\n\t\tvrLoc = 14175;\n\t};\n\t94D7401510B5F8AF00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C2070610AF5A9E002F4160 /* NSImage.h */;\n\t\tname = \"NSImage.h: 187\";\n\t\trLen = 103;\n\t\trLoc = 8443;\n\t\trType = 0;\n\t\tvrLen = 6322;\n\t\tvrLoc = 6281;\n\t};\n\t94D7402810B5FA6100F8C034 /* CGDataProvider.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = CGDataProvider.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Headers/CGDataProvider.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94D7403810B5FDDB00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94C206D210AF5536002F4160 /* CGImage.h */;\n\t\tname = \"CGImage.h: 56\";\n\t\trLen = 17;\n\t\trLoc = 1989;\n\t\trType = 0;\n\t\tvrLen = 2464;\n\t\tvrLoc = 1345;\n\t};\n\t94D7403A10B5FDDB00F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D7402810B5FA6100F8C034 /* CGDataProvider.h */;\n\t\tname = \"CGDataProvider.h: 114\";\n\t\trLen = 79;\n\t\trLoc = 4291;\n\t\trType = 0;\n\t\tvrLen = 2286;\n\t\tvrLoc = 4217;\n\t};\n\t94D740B210B6242000F8C034 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D740B310B6242000F8C034 /* mman.h */;\n\t\tname = \"mman.h: 161\";\n\t\trLen = 64;\n\t\trLoc = 6016;\n\t\trType = 0;\n\t\tvrLen = 1386;\n\t\tvrLoc = 5938;\n\t};\n\t94D740B310B6242000F8C034 /* mman.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = mman.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/usr/include/sys/mman.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E1BDAB11E5A9F400D5B92B /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9452D5DF0E044A9D000AD792 /* sqSqueakMainApp.m */;\n\t\tname = \"sqSqueakMainApp.m: 167\";\n\t\trLen = 0;\n\t\trLoc = 4906;\n\t\trType = 0;\n\t\tvrLen = 1514;\n\t\tvrLoc = 3460;\n\t};\n\t94E297D10DECA72F009CF73A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E297D20DECA72F009CF73A /* config.h */;\n\t\tname = \"config.h: 154\";\n\t\trLen = 60;\n\t\trLoc = 3675;\n\t\trType = 0;\n\t\tvrLen = 993;\n\t\tvrLoc = 2863;\n\t};\n\t94E297D20DECA72F009CF73A /* config.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = config.h;\n\t\tpath = /Users/johnmci/Documents/SqueakGStreamer/platforms/unix/bld/config.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E297D30DECA72F009CF73A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E297D40DECA72F009CF73A /* version.c */;\n\t\tname = \"version.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 65;\n\t\tvrLoc = 0;\n\t};\n\t94E297D40DECA72F009CF73A /* version.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = version.c;\n\t\tpath = /Users/johnmci/Documents/SqueakHydra/platforms/win32/vm/version.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E297D50DECA72F009CF73A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E297D60DECA72F009CF73A /* version.h */;\n\t\tname = \"version.h: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 89;\n\t\tvrLoc = 0;\n\t};\n\t94E297D60DECA72F009CF73A /* version.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = version.h;\n\t\tpath = /Users/johnmci/Documents/SqueakHydra/platforms/win32/vm/version.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E297D70DECA72F009CF73A /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 949E5B970DE3623B007388E0 /* sqUnixMain.c */;\n\t\tname = \"sqUnixMain.c: 417\";\n\t\trLen = 15;\n\t\trLoc = 10250;\n\t\trType = 0;\n\t\tvrLen = 1200;\n\t\tvrLoc = 9269;\n\t};\n\t94E2DAD40ED2351B00012E92 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E2DAD50ED2351B00012E92 /* sqMacUnixInterfaceSound.c */;\n\t\tname = \"sqMacUnixInterfaceSound.c: 46\";\n\t\trLen = 29;\n\t\trLoc = 774;\n\t\trType = 0;\n\t\tvrLen = 808;\n\t\tvrLoc = 382;\n\t};\n\t94E2DAD50ED2351B00012E92 /* sqMacUnixInterfaceSound.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqMacUnixInterfaceSound.c;\n\t\tpath = \"/Users/johnmci/Documents/SqueakSpellingPlugin/platforms/Mac OS/plugins/SoundPlugin/sqMacUnixInterfaceSound.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E2DADE0ED2351B00012E92 /* sqUnixSound.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqUnixSound.c;\n\t\tpath = /Users/johnmci/Documents/SqueakServicesPlugin/platforms/unix/plugins/SoundPlugin/sqUnixSound.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E2DB270ED2355F00012E92 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E2DADE0ED2351B00012E92 /* sqUnixSound.c */;\n\t\tname = \"sqUnixSound.c: 114\";\n\t\trLen = 0;\n\t\trLoc = 4098;\n\t\trType = 0;\n\t\tvrLen = 922;\n\t\tvrLoc = 3342;\n\t};\n\t94E4930310BD32D00011AC75 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9414420010BC817D0088F8AC /* NSPanel.h */;\n\t\tname = \"NSPanel.h: 43\";\n\t\trLen = 165;\n\t\trLoc = 3279;\n\t\trType = 0;\n\t\tvrLen = 3883;\n\t\tvrLoc = 0;\n\t};\n\t94E4936F10BD39E20011AC75 /* sqUnixQuartz.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = sqUnixQuartz.m;\n\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0.0CLosureWithEncryption/platforms/unix/vm-display-Quartz/sqUnixQuartz.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E5838A10BF3E080073FD63 /* NSTextInputClient.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSTextInputClient.h;\n\t\tpath = /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSTextInputClient.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E5838E10BF3E080073FD63 /* AudioQueue.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = AudioQueue.h;\n\t\tpath = /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/AudioToolbox.framework/Versions/A/Headers/AudioQueue.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E583DB10BF43970073FD63 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E5838A10BF3E080073FD63 /* NSTextInputClient.h */;\n\t\tname = \"NSTextInputClient.h: 20\";\n\t\trLen = 75;\n\t\trLoc = 497;\n\t\trType = 0;\n\t\tvrLen = 2725;\n\t\tvrLoc = 0;\n\t};\n\t94E5846510BF67600073FD63 /* NSResponder.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSResponder.h;\n\t\tpath = /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSResponder.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E584AE10BF6EE30073FD63 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E5846510BF67600073FD63 /* NSResponder.h */;\n\t\tname = \"NSResponder.h: 99\";\n\t\trLen = 46;\n\t\trLoc = 3759;\n\t\trType = 0;\n\t\tvrLen = 2139;\n\t\tvrLoc = 2704;\n\t};\n\t94E584FF10BF79AB0073FD63 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D7178310B73A3800F69A71 /* SqViewInputSensor.m */;\n\t\tname = \"SqViewInputSensor.m: 34\";\n\t\trLen = 22;\n\t\trLoc = 478;\n\t\trType = 0;\n\t\tvrLen = 1359;\n\t\tvrLoc = 0;\n\t};\n\t94E5850010BF79AB0073FD63 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9406E87710B66A74002F81F2 /* SqViewEventSensor.m */;\n\t\tname = \"SqViewEventSensor.m: 29\";\n\t\trLen = 7;\n\t\trLoc = 449;\n\t\trType = 0;\n\t\tvrLen = 1509;\n\t\tvrLoc = 0;\n\t};\n\t94E658E10DDD03FE00358328 /* interp.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 565}}\";\n\t\t\tsepNavSelRange = \"{161, 5}\";\n\t\t\tsepNavVisRange = \"{0, 685}\";\n\t\t\tsepNavWindowFrame = \"{{38, 14}, {799, 988}}\";\n\t\t};\n\t};\n\t94E658E40DDD03FE00358328 /* ADPCMCodecPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1533, 10348}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 410}\";\n\t\t};\n\t};\n\t94E658E60DDD03FE00358328 /* B2DPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1482, 166114}}\";\n\t\t\tsepNavSelRange = \"{238472, 12}\";\n\t\t\tsepNavVisRange = \"{237846, 1064}\";\n\t\t};\n\t};\n\t94E658EA0DDD03FE00358328 /* BitBltPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1405, 85475}}\";\n\t\t\tsepNavSelRange = \"{52607, 0}\";\n\t\t\tsepNavVisRange = \"{52196, 1366}\";\n\t\t};\n\t};\n\t94E658EC0DDD03FE00358328 /* BMPReadWriterPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1357, 2860}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 261}\";\n\t\t};\n\t};\n\t94E658F00DDD03FE00358328 /* DSAPrims.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1357, 8112}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 261}\";\n\t\t};\n\t};\n\t94E658F20DDD03FE00358328 /* FFTPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1357, 4641}}\";\n\t\t\tsepNavSelRange = \"{8267, 0}\";\n\t\t\tsepNavVisRange = \"{8149, 272}\";\n\t\t};\n\t};\n\t94E658F40DDD03FE00358328 /* FilePlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1132, 14144}}\";\n\t\t\tsepNavSelRange = \"{27580, 7}\";\n\t\t\tsepNavVisRange = \"{26914, 1464}\";\n\t\t\tsepNavWindowFrame = \"{{21, 20}, {694, 1008}}\";\n\t\t};\n\t};\n\t94E658F60DDD03FE00358328 /* FloatArrayPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 7592}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 192}\";\n\t\t};\n\t};\n\t94E658F80DDD03FE00358328 /* GeniePlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 5044}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 192}\";\n\t\t};\n\t};\n\t94E658FA0DDD03FE00358328 /* HostWindowPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 5330}}\";\n\t\t\tsepNavSelRange = \"{9579, 21}\";\n\t\t\tsepNavVisRange = \"{9090, 1206}\";\n\t\t};\n\t};\n\t94E658FE0DDD03FE00358328 /* JPEGReaderPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1357, 17043}}\";\n\t\t\tsepNavSelRange = \"{9474, 0}\";\n\t\t\tsepNavVisRange = \"{9324, 406}\";\n\t\t};\n\t};\n\t94E659000DDD03FE00358328 /* JPEGReadWriter2Plugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1195, 9100}}\";\n\t\t\tsepNavSelRange = \"{21135, 17}\";\n\t\t\tsepNavVisRange = \"{19526, 1968}\";\n\t\t};\n\t};\n\t94E659020DDD03FE00358328 /* Klatt.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1357, 19500}}\";\n\t\t\tsepNavSelRange = \"{44049, 0}\";\n\t\t\tsepNavVisRange = \"{43900, 200}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {1426, 1019}}\";\n\t\t};\n\t};\n\t94E659040DDD03FE00358328 /* LargeIntegers.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1342, 30290}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 869}\";\n\t\t};\n\t};\n\t94E659060DDD03FE00358328 /* Matrix2x3Plugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1357, 8814}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 261}\";\n\t\t};\n\t};\n\t94E659080DDD03FE00358328 /* MIDIPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1867, 4784}}\";\n\t\t\tsepNavSelRange = \"{3309, 0}\";\n\t\t\tsepNavVisRange = \"{3006, 515}\";\n\t\t\tsepNavWindowFrame = \"{{15, 8}, {1012, 1015}}\";\n\t\t};\n\t};\n\t94E6590A0DDD03FE00358328 /* MiscPrimitivePlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 10621}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 850}\";\n\t\t};\n\t};\n\t94E6590C0DDD03FE00358328 /* RePlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {3113, 6032}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 871}\";\n\t\t};\n\t};\n\t94E6590E0DDD03FE00358328 /* SecurityPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 4238}}\";\n\t\t\tsepNavSelRange = \"{5714, 21}\";\n\t\t\tsepNavVisRange = \"{5088, 1429}\";\n\t\t\tsepNavWindowFrame = \"{{15, 45}, {1017, 978}}\";\n\t\t};\n\t};\n\t94E659100DDD03FE00358328 /* SocketPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1377, 23166}}\";\n\t\t\tsepNavSelRange = \"{5715, 37}\";\n\t\t\tsepNavVisRange = \"{4742, 1976}\";\n\t\t\tsepNavWindowFrame = \"{{15, 8}, {1012, 1015}}\";\n\t\t};\n\t};\n\t94E659120DDD03FE00358328 /* SoundCodecPrims.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1357, 2886}}\";\n\t\t\tsepNavSelRange = \"{2059, 0}\";\n\t\t\tsepNavVisRange = \"{1965, 173}\";\n\t\t};\n\t};\n\t94E659140DDD03FE00358328 /* SoundGenerationPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1357, 9087}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 261}\";\n\t\t};\n\t};\n\t94E659160DDD03FE00358328 /* SoundPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 6084}}\";\n\t\t\tsepNavSelRange = \"{5833, 13}\";\n\t\t\tsepNavVisRange = \"{5241, 1174}\";\n\t\t\tsepNavWindowFrame = \"{{38, 28}, {1346, 974}}\";\n\t\t};\n\t};\n\t94E659180DDD03FE00358328 /* Squeak3D.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1440, 39338}}\";\n\t\t\tsepNavSelRange = \"{3704, 6}\";\n\t\t\tsepNavVisRange = \"{2895, 2373}\";\n\t\t};\n\t};\n\t94E6591A0DDD03FE00358328 /* StarSqueakPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1412, 4316}}\";\n\t\t\tsepNavSelRange = \"{4752, 0}\";\n\t\t\tsepNavVisRange = \"{4329, 952}\";\n\t\t};\n\t};\n\t94E6591D0DDD03FE00358328 /* UUIDPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1104, 2041}}\";\n\t\t\tsepNavSelRange = \"{2745, 19}\";\n\t\t\tsepNavVisRange = \"{2105, 1164}\";\n\t\t\tsepNavWindowFrame = \"{{38, 17}, {847, 985}}\";\n\t\t};\n\t};\n\t94E6591F0DDD03FE00358328 /* ZipPlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1104, 17446}}\";\n\t\t\tsepNavSelRange = \"{1700, 11}\";\n\t\t\tsepNavVisRange = \"{710, 2153}\";\n\t\t\tsepNavWindowFrame = \"{{15, 22}, {1064, 1001}}\";\n\t\t};\n\t};\n\t94E659200DDD03FE00358328 /* sqNamedPrims.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 1144}}\";\n\t\t\tsepNavSelRange = \"{2312, 0}\";\n\t\t\tsepNavVisRange = \"{1591, 929}\";\n\t\t\tsepNavWindowFrame = \"{{15, 9}, {1078, 1014}}\";\n\t\t};\n\t};\n\t94E659430DDD04FA00358328 /* AsynchFilePlugin.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 501}}\";\n\t\t\tsepNavSelRange = \"{404, 19}\";\n\t\t\tsepNavVisRange = \"{0, 659}\";\n\t\t};\n\t};\n\t94E659450DDD04FA00358328 /* FilePlugin.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 767}}\";\n\t\t\tsepNavSelRange = \"{1735, 10}\";\n\t\t\tsepNavVisRange = \"{440, 1866}\";\n\t\t\tsepNavWindowFrame = \"{{15, 25}, {997, 998}}\";\n\t\t};\n\t};\n\t94E659460DDD04FA00358328 /* sqFilePluginBasicPrims.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 5850}}\";\n\t\t\tsepNavSelRange = \"{11068, 11}\";\n\t\t\tsepNavVisRange = \"{10580, 897}\";\n\t\t\tsepNavWindowFrame = \"{{38, 19}, {905, 983}}\";\n\t\t};\n\t};\n\t94E659490DDD053900358328 /* SurfacePlugin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {784, 2990}}\";\n\t\t\tsepNavSelRange = \"{2333, 0}\";\n\t\t\tsepNavVisRange = \"{1279, 2223}\";\n\t\t};\n\t};\n\t94E6594A0DDD053900358328 /* SurfacePlugin.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {784, 1716}}\";\n\t\t\tsepNavSelRange = \"{27, 0}\";\n\t\t\tsepNavVisRange = \"{0, 2637}\";\n\t\t};\n\t};\n\t94E6594D0DDD053900358328 /* SecurityPlugin.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1357, 481}}\";\n\t\t\tsepNavSelRange = \"{290, 3}\";\n\t\t\tsepNavVisRange = \"{117, 443}\";\n\t\t\tsepNavWindowFrame = \"{{15, 13}, {1326, 1010}}\";\n\t\t};\n\t};\n\t94E6594F0DDD053900358328 /* SoundGenerationPlugin.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 527}}\";\n\t\t\tsepNavSelRange = \"{299, 3}\";\n\t\t\tsepNavVisRange = \"{0, 360}\";\n\t\t};\n\t};\n\t94E659530DDD053900358328 /* jcapimin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 3822}}\";\n\t\t\tsepNavSelRange = \"{7008, 3}\";\n\t\t\tsepNavVisRange = \"{5989, 1240}\";\n\t\t};\n\t};\n\t94E659550DDD053900358328 /* jccoefct.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 5863}}\";\n\t\t\tsepNavSelRange = \"{9819, 3}\";\n\t\t\tsepNavVisRange = \"{8276, 1834}\";\n\t\t};\n\t};\n\t94E659560DDD053900358328 /* jccolor.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 5889}}\";\n\t\t\tsepNavSelRange = \"{9842, 3}\";\n\t\t\tsepNavVisRange = \"{9173, 1109}\";\n\t\t};\n\t};\n\t94E659570DDD053900358328 /* jcdctmgr.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 4966}}\";\n\t\t\tsepNavSelRange = \"{6549, 3}\";\n\t\t\tsepNavVisRange = \"{5884, 1542}\";\n\t\t};\n\t};\n\t94E659580DDD053900358328 /* jchuff.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 11778}}\";\n\t\t\tsepNavSelRange = \"{22307, 3}\";\n\t\t\tsepNavVisRange = \"{21622, 1607}\";\n\t\t};\n\t};\n\t94E6595B0DDD053900358328 /* jcmainct.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 3783}}\";\n\t\t\tsepNavSelRange = \"{7591, 3}\";\n\t\t\tsepNavVisRange = \"{6975, 964}\";\n\t\t};\n\t};\n\t94E6595C0DDD053900358328 /* jcmarker.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 8866}}\";\n\t\t\tsepNavSelRange = \"{10933, 3}\";\n\t\t\tsepNavVisRange = \"{10271, 1095}\";\n\t\t};\n\t};\n\t94E6595D0DDD053900358328 /* jcmaster.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 7553}}\";\n\t\t\tsepNavSelRange = \"{10789, 3}\";\n\t\t\tsepNavVisRange = \"{10099, 1218}\";\n\t\t};\n\t};\n\t94E6595E0DDD053900358328 /* jcomapi.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1196, 1512}}\";\n\t\t\tsepNavSelRange = \"{2136, 7}\";\n\t\t\tsepNavVisRange = \"{1428, 1392}\";\n\t\t};\n\t};\n\t94E659600DDD053900358328 /* jcparam.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 8164}}\";\n\t\t\tsepNavSelRange = \"{18163, 3}\";\n\t\t\tsepNavVisRange = \"{17732, 1161}\";\n\t\t};\n\t};\n\t94E659610DDD053900358328 /* jcphuff.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 10920}}\";\n\t\t\tsepNavSelRange = \"{18752, 3}\";\n\t\t\tsepNavVisRange = \"{17946, 1058}\";\n\t\t};\n\t};\n\t94E659620DDD053900358328 /* jcprepct.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 4628}}\";\n\t\t\tsepNavSelRange = \"{9095, 3}\";\n\t\t\tsepNavVisRange = \"{8327, 1337}\";\n\t\t};\n\t};\n\t94E659630DDD053900358328 /* jcsample.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 6994}}\";\n\t\t\tsepNavSelRange = \"{7407, 3}\";\n\t\t\tsepNavVisRange = \"{6537, 1530}\";\n\t\t};\n\t};\n\t94E659640DDD053900358328 /* jctrans.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 5187}}\";\n\t\t\tsepNavSelRange = \"{13272, 3}\";\n\t\t\tsepNavVisRange = \"{12530, 1091}\";\n\t\t};\n\t};\n\t94E659650DDD053900358328 /* jdapimin.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 5135}}\";\n\t\t\tsepNavSelRange = \"{7807, 3}\";\n\t\t\tsepNavVisRange = \"{7168, 1550}\";\n\t\t};\n\t};\n\t94E659690DDD053900358328 /* jdcoefct.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 9451}}\";\n\t\t\tsepNavSelRange = \"{21428, 3}\";\n\t\t\tsepNavVisRange = \"{20759, 1160}\";\n\t\t};\n\t};\n\t94E6596A0DDD053900358328 /* jdcolor.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 5057}}\";\n\t\t\tsepNavSelRange = \"{8235, 3}\";\n\t\t\tsepNavVisRange = \"{7573, 1344}\";\n\t\t};\n\t};\n\t94E6596B0DDD053900358328 /* jdct.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 2275}}\";\n\t\t\tsepNavSelRange = \"{693, 3}\";\n\t\t\tsepNavVisRange = \"{0, 1654}\";\n\t\t};\n\t};\n\t94E6596D0DDD053900358328 /* jdhuff.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 8229}}\";\n\t\t\tsepNavSelRange = \"{15652, 3}\";\n\t\t\tsepNavVisRange = \"{14578, 1143}\";\n\t\t};\n\t};\n\t94E6596E0DDD053900358328 /* jdhuff.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 2574}}\";\n\t\t\tsepNavSelRange = \"{4464, 3}\";\n\t\t\tsepNavVisRange = \"{2783, 1780}\";\n\t\t};\n\t};\n\t94E6596F0DDD053900358328 /* jdinput.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 4810}}\";\n\t\t\tsepNavSelRange = \"{6703, 3}\";\n\t\t\tsepNavVisRange = \"{5969, 1701}\";\n\t\t};\n\t};\n\t94E659700DDD053900358328 /* jdmainct.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 6149}}\";\n\t\t\tsepNavSelRange = \"{7953, 3}\";\n\t\t\tsepNavVisRange = \"{7137, 1484}\";\n\t\t};\n\t};\n\t94E659710DDD053900358328 /* jdmarker.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 17706}}\";\n\t\t\tsepNavSelRange = \"{40391, 3}\";\n\t\t\tsepNavVisRange = \"{38997, 1561}\";\n\t\t};\n\t};\n\t94E659720DDD053900358328 /* jdmaster.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 7085}}\";\n\t\t\tsepNavSelRange = \"{14890, 3}\";\n\t\t\tsepNavVisRange = \"{14181, 1516}\";\n\t\t};\n\t};\n\t94E659730DDD053900358328 /* jdmerge.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 5187}}\";\n\t\t\tsepNavSelRange = \"{10331, 3}\";\n\t\t\tsepNavVisRange = \"{9363, 1315}\";\n\t\t};\n\t};\n\t94E659740DDD053900358328 /* jdphuff.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 8606}}\";\n\t\t\tsepNavSelRange = \"{15744, 3}\";\n\t\t\tsepNavVisRange = \"{14845, 1126}\";\n\t\t};\n\t};\n\t94E659760DDD053900358328 /* jdsample.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 6409}}\";\n\t\t\tsepNavSelRange = \"{11463, 3}\";\n\t\t\tsepNavVisRange = \"{10845, 1368}\";\n\t\t};\n\t};\n\t94E659770DDD053900358328 /* jdtrans.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1196, 2002}}\";\n\t\t\tsepNavSelRange = \"{995, 7}\";\n\t\t\tsepNavVisRange = \"{0, 1708}\";\n\t\t};\n\t};\n\t94E659790DDD053900358328 /* jerror.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 4095}}\";\n\t\t\tsepNavSelRange = \"{11163, 7}\";\n\t\t\tsepNavVisRange = \"{10252, 1759}\";\n\t\t};\n\t};\n\t94E6597C0DDD053900358328 /* jfdctint.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 3809}}\";\n\t\t\tsepNavSelRange = \"{5901, 3}\";\n\t\t\tsepNavVisRange = \"{5152, 1247}\";\n\t\t};\n\t};\n\t94E6597D0DDD053900358328 /* jidctflt.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 3094}}\";\n\t\t\tsepNavSelRange = \"{7928, 3}\";\n\t\t\tsepNavVisRange = \"{6879, 1380}\";\n\t\t};\n\t};\n\t94E6597E0DDD053900358328 /* jidctfst.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 4706}}\";\n\t\t\tsepNavSelRange = \"{9786, 3}\";\n\t\t\tsepNavVisRange = \"{8848, 1431}\";\n\t\t};\n\t};\n\t94E6597F0DDD053900358328 /* jidctint.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 5044}}\";\n\t\t\tsepNavSelRange = \"{11723, 3}\";\n\t\t\tsepNavVisRange = \"{10788, 1464}\";\n\t\t};\n\t};\n\t94E659800DDD053900358328 /* jidctred.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 5096}}\";\n\t\t\tsepNavSelRange = \"{11209, 3}\";\n\t\t\tsepNavVisRange = \"{10458, 1488}\";\n\t\t};\n\t};\n\t94E659810DDD053900358328 /* jinclude.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 1248}}\";\n\t\t\tsepNavSelRange = \"{1563, 7}\";\n\t\t\tsepNavVisRange = \"{935, 1320}\";\n\t\t};\n\t};\n\t94E659820DDD053900358328 /* jmemdatadst.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 1924}}\";\n\t\t\tsepNavSelRange = \"{4506, 0}\";\n\t\t\tsepNavVisRange = \"{4026, 877}\";\n\t\t};\n\t};\n\t94E659830DDD053900358328 /* jmemdatasrc.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 2639}}\";\n\t\t\tsepNavSelRange = \"{8018, 0}\";\n\t\t\tsepNavVisRange = \"{7282, 942}\";\n\t\t\tsepNavWindowFrame = \"{{15, 13}, {1326, 1010}}\";\n\t\t};\n\t};\n\t94E659840DDD053900358328 /* jmemmgr.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 14313}}\";\n\t\t\tsepNavSelRange = \"{20872, 3}\";\n\t\t\tsepNavVisRange = \"{20200, 1407}\";\n\t\t};\n\t};\n\t94E659860DDD053900358328 /* jmemsys.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1196, 2730}}\";\n\t\t\tsepNavSelRange = \"{1380, 7}\";\n\t\t\tsepNavVisRange = \"{578, 1969}\";\n\t\t};\n\t};\n\t94E659870DDD053900358328 /* jmorecfg.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 5096}}\";\n\t\t\tsepNavSelRange = \"{4500, 3}\";\n\t\t\tsepNavVisRange = \"{3819, 1298}\";\n\t\t};\n\t};\n\t94E659880DDD053900358328 /* jpegint.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 5135}}\";\n\t\t\tsepNavSelRange = \"{8138, 3}\";\n\t\t\tsepNavVisRange = \"{6999, 1671}\";\n\t\t};\n\t};\n\t94E659890DDD053900358328 /* jpeglib.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 14287}}\";\n\t\t\tsepNavSelRange = \"{44121, 3}\";\n\t\t\tsepNavVisRange = \"{43159, 1631}\";\n\t\t};\n\t};\n\t94E6598A0DDD053900358328 /* JPEGReadWriter2Plugin.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 527}}\";\n\t\t\tsepNavSelRange = \"{400, 3}\";\n\t\t\tsepNavVisRange = \"{0, 606}\";\n\t\t};\n\t};\n\t94E6598B0DDD053900358328 /* jquant1.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 10946}}\";\n\t\t\tsepNavSelRange = \"{23424, 3}\";\n\t\t\tsepNavVisRange = \"{22008, 1505}\";\n\t\t};\n\t};\n\t94E6598C0DDD053900358328 /* jquant2.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 17212}}\";\n\t\t\tsepNavSelRange = \"{35564, 3}\";\n\t\t\tsepNavVisRange = \"{34161, 1581}\";\n\t\t};\n\t};\n\t94E6598D0DDD053900358328 /* jutils.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 2379}}\";\n\t\t\tsepNavSelRange = \"{709, 3}\";\n\t\t\tsepNavVisRange = \"{0, 1126}\";\n\t\t};\n\t};\n\t94E659910DDD053900358328 /* UUIDPlugin.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1357, 141}}\";\n\t\t\tsepNavSelRange = \"{224, 0}\";\n\t\t\tsepNavVisRange = \"{0, 247}\";\n\t\t};\n\t};\n\t94E659930DDD053900358328 /* SoundPlugin.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {831, 891}}\";\n\t\t\tsepNavSelRange = \"{209, 89}\";\n\t\t\tsepNavVisRange = \"{0, 1762}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {878, 1019}}\";\n\t\t};\n\t};\n\t94E659970DDD053900358328 /* b3d.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 1547}}\";\n\t\t\tsepNavSelRange = \"{1163, 18}\";\n\t\t\tsepNavVisRange = \"{725, 933}\";\n\t\t};\n\t};\n\t94E659990DDD053900358328 /* b3dAlloc.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1196, 2044}}\";\n\t\t\tsepNavSelRange = \"{2615, 7}\";\n\t\t\tsepNavVisRange = \"{1909, 1488}\";\n\t\t};\n\t};\n\t94E6599A0DDD053900358328 /* b3dDraw.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 6643}}\";\n\t\t\tsepNavSelRange = \"{13439, 0}\";\n\t\t\tsepNavVisRange = \"{12902, 1039}\";\n\t\t};\n\t};\n\t94E6599B0DDD053900358328 /* b3dInit.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {725, 9529}}\";\n\t\t\tsepNavSelRange = \"{7571, 26}\";\n\t\t\tsepNavVisRange = \"{6648, 1585}\";\n\t\t\tsepNavWindowFrame = \"{{15, 4}, {772, 1019}}\";\n\t\t};\n\t};\n\t94E6599C0DDD053900358328 /* b3dMain.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 19396}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 931}\";\n\t\t};\n\t};\n\t94E6599D0DDD053900358328 /* b3dRemap.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 3718}}\";\n\t\t\tsepNavSelRange = \"{7538, 0}\";\n\t\t\tsepNavVisRange = \"{6829, 1035}\";\n\t\t};\n\t};\n\t94E6599E0DDD053900358328 /* b3dTypes.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 4420}}\";\n\t\t\tsepNavSelRange = \"{4491, 13}\";\n\t\t\tsepNavVisRange = \"{3977, 898}\";\n\t\t};\n\t};\n\t94E659A00DDD053900358328 /* SocketPlugin.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1601, 1118}}\";\n\t\t\tsepNavSelRange = \"{3647, 30}\";\n\t\t\tsepNavVisRange = \"{757, 4070}\";\n\t\t};\n\t};\n\t94E659A30DDD053900358328 /* SoundCodecPrims.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 527}}\";\n\t\t\tsepNavSelRange = \"{3, 10}\";\n\t\t\tsepNavVisRange = \"{0, 401}\";\n\t\t};\n\t};\n\t94E659A40DDD053900358328 /* sqSoundCodecPluginBasicPrims.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1368, 50453}}\";\n\t\t\tsepNavSelRange = \"{10030, 6}\";\n\t\t\tsepNavVisRange = \"{9384, 1276}\";\n\t\t};\n\t};\n\t94E65A290DDD053900358328 /* chartables.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 2457}}\";\n\t\t\tsepNavSelRange = \"{489, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1280}\";\n\t\t};\n\t};\n\t94E65A2B0DDD053900358328 /* get.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1338, 2730}}\";\n\t\t\tsepNavSelRange = \"{2039, 7}\";\n\t\t\tsepNavVisRange = \"{1268, 1649}\";\n\t\t};\n\t};\n\t94E65A2C0DDD053900358328 /* internal.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1283, 5629}}\";\n\t\t\tsepNavSelRange = \"{1665, 0}\";\n\t\t\tsepNavVisRange = \"{1415, 1340}\";\n\t\t};\n\t};\n\t94E65A2E0DDD053900358328 /* pcre.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {950, 66339}}\";\n\t\t\tsepNavSelRange = \"{1763, 31}\";\n\t\t\tsepNavVisRange = \"{781, 2030}\";\n\t\t\tsepNavWindowFrame = \"{{683, 16}, {997, 998}}\";\n\t\t};\n\t};\n\t94E65A2F0DDD053900358328 /* pcre.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 1495}}\";\n\t\t\tsepNavSelRange = \"{2990, 3}\";\n\t\t\tsepNavVisRange = \"{1856, 1482}\";\n\t\t};\n\t};\n\t94E65A300DDD053900358328 /* rePlugin.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1010, 637}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{0, 1259}\";\n\t\t};\n\t};\n\t94E65A340DDD053900358328 /* study.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1215, 5096}}\";\n\t\t\tsepNavSelRange = \"{3001, 3}\";\n\t\t\tsepNavVisRange = \"{2296, 1397}\";\n\t\t};\n\t};\n\t94E7F6B812373EB800A03A11 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E7F6B912373EB800A03A11 /* sqMacLocaleCarbon.c */;\n\t\tname = \"sqMacLocaleCarbon.c: 104\";\n\t\trLen = 21;\n\t\trLoc = 2979;\n\t\trType = 0;\n\t\tvrLen = 1607;\n\t\tvrLoc = 2451;\n\t};\n\t94E7F6B912373EB800A03A11 /* sqMacLocaleCarbon.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = sqMacLocaleCarbon.c;\n\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/platforms/Mac OS/plugins/LocalePlugin/sqMacLocaleCarbon.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E8EEEA11C94D5D0049D853 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94E8EEEB11C94D5D0049D853 /* sqUnixQuartz.m */;\n\t\tname = \"sqUnixQuartz.m: 2113\";\n\t\trLen = 12;\n\t\trLoc = 55330;\n\t\trType = 0;\n\t\tvrLen = 1130;\n\t\tvrLoc = 54733;\n\t};\n\t94E8EEEB11C94D5D0049D853 /* sqUnixQuartz.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = sqUnixQuartz.m;\n\t\tpath = \"/Users/johnmci/Documents/Squeak3.8.0/History/4.2.4b1/platforms/unix/vm-display-Quartz/sqUnixQuartz.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94E8FA3C12258ED500EECD29 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D16CAF10BCF96B00A69A89 /* Credits.rtf */;\n\t\tname = \"Credits.rtf: 9\";\n\t\trLen = 0;\n\t\trLoc = 269;\n\t\trType = 0;\n\t\tvrLen = 425;\n\t\tvrLoc = 0;\n\t};\n\t94E8FA6512258FDF00EECD29 /* sqMacV2Memory.c:191 */ = {\n\t\tisa = PBXFileBreakpoint;\n\t\tactions = (\n\t\t);\n\t\tbreakpointStyle = 0;\n\t\tcontinueAfterActions = 0;\n\t\tcountType = 0;\n\t\tdelayBeforeContinue = 0;\n\t\tfileReference = 9424FF670DDCB202009912BF /* sqMacV2Memory.c */;\n\t\tfunctionName = \"sqMakeMemoryExecutableFromTo()\";\n\t\thitCount = 0;\n\t\tignoreCount = 0;\n\t\tlineNumber = 191;\n\t\tlocation = Squeak;\n\t\tmodificationTime = 308445393.436468;\n\t\toriginalNumberOfMultipleMatches = 1;\n\t\tstate = 0;\n\t};\n\t94ED7EFA0E6C2ABE00F4DD03 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94ED7EFB0E6C2ABE00F4DD03 /* Document.m */;\n\t\tname = \"Document.m: 75\";\n\t\trLen = 20;\n\t\trLoc = 2275;\n\t\trType = 0;\n\t\tvrLen = 1332;\n\t\tvrLoc = 1613;\n\t};\n\t94ED7EFB0E6C2ABE00F4DD03 /* Document.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = Document.m;\n\t\tpath = \"/Users/johnmci/Work In Progress/smalltalk/CocoaSqueakSource/CocoaSqueak/Document.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94EE1DAA11E57FAB00DC6E8C /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 9424FF680DDCB202009912BF /* sqMacV2Memory.h */;\n\t\tname = \"sqMacV2Memory.h: 47\";\n\t\trLen = 15;\n\t\trLoc = 2075;\n\t\trType = 0;\n\t\tvrLen = 2098;\n\t\tvrLoc = 0;\n\t};\n\t94EF43151262BFC100817F37 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94883B400E0C2B9C005A4738 /* sqUnixSocket.c */;\n\t\tname = \"sqUnixSocket.c: 2129\";\n\t\trLen = 0;\n\t\trLoc = 56411;\n\t\trType = 0;\n\t\tvrLen = 1375;\n\t\tvrLoc = 6842;\n\t};\n\t94EF6CBE11E55947003BA64D /* gcc3x-interp.c */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {852, 472550}}\";\n\t\t\tsepNavSelRange = \"{0, 0}\";\n\t\t\tsepNavVisRange = \"{50, 1341}\";\n\t\t\tsepNavWindowFrame = \"{{512, 195}, {901, 833}}\";\n\t\t};\n\t};\n\t94EF6CC011E55947003BA64D /* interp.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1132, 597}}\";\n\t\t\tsepNavSelRange = \"{134, 7}\";\n\t\t\tsepNavVisRange = \"{0, 586}\";\n\t\t};\n\t};\n\t94F155570E83EA1F001657CE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94B88C640E81500200C98131 /* SqueakObjcBridge.m */;\n\t\tname = \"SqueakObjcBridge.m: 291\";\n\t\trLen = 0;\n\t\trLoc = 8126;\n\t\trType = 0;\n\t\tvrLen = 2591;\n\t\tvrLoc = 6567;\n\t};\n\t94F155580E83EA1F001657CE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94F155590E83EA1F001657CE /* FSNSProxy.m */;\n\t\tname = \"FSNSProxy.m: 24\";\n\t\trLen = 26;\n\t\trLoc = 737;\n\t\trType = 0;\n\t\tvrLen = 1622;\n\t\tvrLoc = 0;\n\t};\n\t94F155590E83EA1F001657CE /* FSNSProxy.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = FSNSProxy.m;\n\t\tpath = \"/Users/johnmci/Work In Progress/smalltalk/FScriptSources-20031020/FScript/FScriptFramework/FSNSProxy.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94F1F15C11EB8AB5004B3AE3 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94F1F15D11EB8AB5004B3AE3 /* project.pbxproj */;\n\t\tname = \"project.pbxproj: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 7554;\n\t\tvrLoc = 0;\n\t};\n\t94F1F15D11EB8AB5004B3AE3 /* project.pbxproj */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = text.pbxproject;\n\t\tname = project.pbxproj;\n\t\tpath = /Users/johnmci/Documents/Squeak3.8.0/platforms/iOS/vm/SqueakPureObjcCogVM.xcodeproj/project.pbxproj;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94F1F5C910C30C22008DB9CF /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94F1F5CA10C30C22008DB9CF /* mpeg3io.c */;\n\t\tname = \"mpeg3io.c: 5\";\n\t\trLen = 1155;\n\t\trLoc = 45;\n\t\trType = 0;\n\t\tvrLen = 1995;\n\t\tvrLoc = 0;\n\t};\n\t94F1F5CA10C30C22008DB9CF /* mpeg3io.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = mpeg3io.c;\n\t\tpath = /Users/johnmci/Documents/SqueakmpegFullSource/libmpeg/mpeg3io.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94F3A9690E6BFA7C00E0B12A /* Squeak.png */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavWindowFrame = \"{{61, 124}, {1288, 857}}\";\n\t\t};\n\t};\n\t94F5C1870DF26EF200099B11 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94F5C1880DF26EF200099B11 /* interp.c */;\n\t\tname = \"interp.c: 5170\";\n\t\trLen = 7;\n\t\trLoc = 155552;\n\t\trType = 0;\n\t\tvrLen = 1874;\n\t\tvrLoc = 154817;\n\t};\n\t94F5C1880DF26EF200099B11 /* interp.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = interp.c;\n\t\tpath = /Users/johnmci/Documents/SqueakSquatSpoon/src/vm/interp.c;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94F5C1910DF26EF200099B11 /* gnu-interp.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = \"gnu-interp.c\";\n\t\tpath = \"/Volumes/pm/Mail Downloads/gnu-interp.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94F5C1930DF26EF200099B11 /* gnu-interp.c */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.c;\n\t\tname = \"gnu-interp.c\";\n\t\tpath = \"/Users/johnmci/Work In Progress/squeak Bugs/unixcompiletoomanyinstructions]/memoryAllocationNotes/gnu-interp.c\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94F5C25F0DF42C7600099B11 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94F5C1930DF26EF200099B11 /* gnu-interp.c */;\n\t\tname = \"gnu-interp.c: 5409\";\n\t\trLen = 7;\n\t\trLoc = 161001;\n\t\trType = 0;\n\t\tvrLen = 1782;\n\t\tvrLoc = 160256;\n\t};\n\t94F5C2600DF42C7600099B11 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94F5C1910DF26EF200099B11 /* gnu-interp.c */;\n\t\tname = \"gnu-interp.c: 5916\";\n\t\trLen = 7;\n\t\trLoc = 193171;\n\t\trType = 0;\n\t\tvrLen = 1899;\n\t\tvrLoc = 192393;\n\t};\n\t94F5F29110BC518B00847EEE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D7178F10B73A3800F69A71 /* SqueakInterpreterEventSensor.h */;\n\t\tname = \"SqueakInterpreterEventSensor.h: 10\";\n\t\trLen = 8;\n\t\trLoc = 322;\n\t\trType = 0;\n\t\tvrLen = 461;\n\t\tvrLoc = 0;\n\t};\n\t94F5F29210BC518B00847EEE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94F5F29310BC518B00847EEE /* macXCanvas.m */;\n\t\tname = \"macXCanvas.m: 174\";\n\t\trLen = 8;\n\t\trLoc = 3716;\n\t\trType = 0;\n\t\tvrLen = 1886;\n\t\tvrLoc = 3759;\n\t};\n\t94F5F29310BC518B00847EEE /* macXCanvas.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = macXCanvas.m;\n\t\tpath = \"/Users/johnmci/Work In Progress/cincom/VWSourceCode/721/src/plat/macXCanvas.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94F5F29410BC518B00847EEE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94D7178010B73A3800F69A71 /* SqueakInterpreterEventSensor.m */;\n\t\tname = \"SqueakInterpreterEventSensor.m: 40\";\n\t\trLen = 8;\n\t\trLoc = 1108;\n\t\trType = 0;\n\t\tvrLen = 1744;\n\t\tvrLoc = 0;\n\t};\n\t94F5F29510BC518B00847EEE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94F5F29610BC518B00847EEE /* ShellView.m */;\n\t\tname = \"ShellView.m: 121\";\n\t\trLen = 8;\n\t\trLoc = 4069;\n\t\trType = 0;\n\t\tvrLen = 2026;\n\t\tvrLoc = 3111;\n\t};\n\t94F5F29610BC518B00847EEE /* ShellView.m */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.objc;\n\t\tname = ShellView.m;\n\t\tpath = \"/Users/johnmci/Work In Progress/smalltalk/FScriptSources-20031020/FScript/FScriptFramework/ShellView.m\";\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94F5F2A810BC539700847EEE /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94F5F2A910BC539700847EEE /* NSSet.h */;\n\t\tname = \"NSSet.h: 58\";\n\t\trLen = 69;\n\t\trLoc = 2031;\n\t\trType = 0;\n\t\tvrLen = 1982;\n\t\tvrLoc = 721;\n\t};\n\t94F5F2A910BC539700847EEE /* NSSet.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSSet.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSSet.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94F8798F0E6C0C7E00662DEA /* sqSqueakIPhoneInfoPlistInterface.h */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {1036, 652}}\";\n\t\t\tsepNavSelRange = \"{1834, 26}\";\n\t\t\tsepNavVisRange = \"{0, 2025}\";\n\t\t\tsepNavWindowFrame = \"{{896, 50}, {1017, 978}}\";\n\t\t};\n\t};\n\t94F879900E6C0C7E00662DEA /* sqSqueakIPhoneInfoPlistInterface.m */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {831, 1443}}\";\n\t\t\tsepNavSelRange = \"{2332, 0}\";\n\t\t\tsepNavVisRange = \"{1214, 2389}\";\n\t\t\tsepNavWindowFrame = \"{{15, 8}, {1012, 1015}}\";\n\t\t};\n\t};\n\t94F89AED10B497F400556475 /* NSResponder.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSResponder.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSResponder.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94F89AFE10B4997900556475 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94F89AFF10B4997900556475 /* IOLLEvent.h */;\n\t\tname = \"IOLLEvent.h: 384\";\n\t\trLen = 79;\n\t\trLoc = 14824;\n\t\trType = 0;\n\t\tvrLen = 2433;\n\t\tvrLoc = 0;\n\t};\n\t94F89AFF10B4997900556475 /* IOLLEvent.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = IOLLEvent.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/IOKit.framework/Versions/A/Headers/hidsystem/IOLLEvent.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94F89BDE10B4B77400556475 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94F89BDF10B4B77400556475 /* CGBase.h */;\n\t\tname = \"CGBase.h: 105\";\n\t\trLen = 30;\n\t\trLoc = 2998;\n\t\trType = 0;\n\t\tvrLen = 1747;\n\t\tvrLoc = 1331;\n\t};\n\t94F89BDF10B4B77400556475 /* CGBase.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = CGBase.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Headers/CGBase.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94F89BE010B4B77400556475 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94BCAEDF10ACAE2500F87527 /* NSValue.h */;\n\t\tname = \"NSValue.h: 52\";\n\t\trLen = 27;\n\t\trLoc = 1223;\n\t\trType = 0;\n\t\tvrLen = 1478;\n\t\tvrLoc = 0;\n\t};\n\t94F89C5A10B4BF2800556475 /* NSRunLoop.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSRunLoop.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSRunLoop.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94F89C9110B4C0B800556475 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94F89C9210B4C0B800556475 /* NSTimer.h */;\n\t\tname = \"NSTimer.h: 14\";\n\t\trLen = 30;\n\t\trLoc = 564;\n\t\trType = 0;\n\t\tvrLen = 1132;\n\t\tvrLoc = 0;\n\t};\n\t94F89C9210B4C0B800556475 /* NSTimer.h */ = {\n\t\tisa = PBXFileReference;\n\t\tlastKnownFileType = sourcecode.c.h;\n\t\tname = NSTimer.h;\n\t\tpath = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSTimer.h;\n\t\tsourceTree = \"<absolute>\";\n\t};\n\t94F8E42E0DE6129D003F4F53 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 94A0EBB20DE608350071C8B9 /* squeakAudioVideoPipeLineSignalInterface.c */;\n\t\tname = \"squeakAudioVideoPipeLineSignalInterface.c: 1\";\n\t\trLen = 0;\n\t\trLoc = 0;\n\t\trType = 0;\n\t\tvrLen = 2018;\n\t\tvrLoc = 0;\n\t};\n\t94FE53951230323500BA17E1 /* PBXTextBookmark */ = {\n\t\tisa = PBXTextBookmark;\n\t\tfRef = 947E64CA10AA16FE00D3B69E /* sqSqueakOSXApplication.h */;\n\t\tname = \"sqSqueakOSXApplication.h: 58\";\n\t\trLen = 0;\n\t\trLoc = 2392;\n\t\trType = 0;\n\t\tvrLen = 1496;\n\t\tvrLoc = 918;\n\t};\n\t94FFF7A40EBE2B9C00C69C79 /* SqueakV39.sources */ = {\n\t\tuiCtxt = {\n\t\t\tsepNavFolds = \"{\\n    c =     (\\n                {\\n            l = \\\"123>' selector: #zork ] raise: SyntaxErrorNotification.\\\\n\\\\t\\\\n\\\\tself should: [ self compile: '<foo bar>' selector: #zork ] raise: SyntaxErrorNotification.\\\\n\\\\tself should: [ self compile: '<foo 1>' selector: #zork ] raise: SyntaxErrorNotification.\\\\n\\\\tself should: [ self compile: '<foo bar zork>' selector: #zork ] raise: SyntaxErrorNotification.\\\\n\\\\tself should: [ self compile: '<foo bar 1>' selector: #zork ] raise: SyntaxErrorNotification.\\\\n\\\\t\\\\nself should: [ self compile: '<foo: bar:>' selector: #zork ] raise: SyntaxErrorNotification.\\\\n\\\\tself should: [ self compile: '<foo: #bar: zork:>' selector: #zork ] raise: SyntaxErrorNotification.! !\\\\n\\\\n!MethodPragmaTest methodsFor: 'testing-compiler' stamp: 'lr 1/20/2006 02:25'!\\\\ntestCompileNumber\\\\n\\\\tself assertPragma: 'foo: 123' givesKeyword: #foo: arguments: #( 123 ).\\\\n\\\\tself assertPragma: 'foo: -123' givesKeyword: #foo: arguments: #( -123 ).\\\\n\\\\tself assertPragma: 'foo: 12.3' givesKeyword: #foo: arguments: #( 12.3 ).\\\\n\\\\tself assertPragma: 'foo: -12.3' givesKeyword: #foo: arguments: #( -12.3 ).! !\\\\n\\\\n!MethodPragmaTest methodsFor: 'testing-compiler' stamp: 'lr 1/20/2006 02:25'!\\\\ntestCompileString\\\\n\\\\tself assertPragma: 'foo: ''''' givesKeyword: #foo: arguments: #( '' ).\\\\n\\\\tself assertPragma: 'foo: ''bar''' givesKeyword: #foo: arguments: #( 'bar' ).! !\\\\n\\\\n!MethodPragmaTest methodsFor: 'testing-compiler' stamp: 'lr 1/20/2006 02:25'!\\\\ntestCompileSymbol\\\\n\\\\tself assertPragma: 'foo: #bar' givesKeyword: #foo: arguments: #( bar ).\\\\n\\\\tself assertPragma: 'foo: #bar:' givesKeyword: #foo: arguments: #( bar: ).\\\\n\\\\tself assertPragma: 'foo: #bar:zork:' givesKeyword: #foo: arguments: #( bar:zork: ).! !\\\\n\\\\n!MethodPragmaTest methodsFor: 'testing-compiler' stamp: 'lr 7/3/2006 15:00'!\\\\ntestCompileTemps\\\\n\\\\t\\\\\\\"Pragmas should be placeable before and after temps.\\\\\\\"\\\\n\\\\t\\\\n\\\\tself \\\\n\\\\t\\\\tshouldnt: [\\\\n\\\\t\\\\t\\\\tself assert: (self compile: '| temps | <foo>' selector: #zork) \\\\n\\\\t\\\\t\\\\t\\\\tpragmas notEmpty ]\\\\n\\\\t\\\\traise: SyntaxErrorNotification.\\\\n\\\\tself \\\\n\\\\t\\\\tshouldnt: [\\\\n\\\\t\\\\t\\\\tself assert: (self compile: '<foo> | temps |' selector: #zork) \\\\n\\\\t\\\\t\\\\t\\\\tpragmas notEmpty ]\\\\n\\\\t\\\\traise: SyntaxErrorNotification.! !\\\\n\\\\n!MethodPragmaTest methodsFor: 'testing-compiler' stamp: 'lr 2/6/2006 21:04'!\\\\ntestCompileValue\\\\n\\\\tself assertPragma: 'foo: true' givesKeyword: #foo: arguments: #( true ).\\\\n\\\\tself assertPragma: 'foo: false' givesKeyword: #foo: arguments: #( false ).\\\\n\\\\tself assertPragma: 'foo: nil' givesKeyword: #foo: arguments: #( nil ).\\\\n\\\\t\\\\n\\\\tself assertPragma: 'foo: String' givesKeyword: #foo: arguments: { String }.\\\\n\\\\tself assertPragma: 'foo: Pragma' givesKeyword: #foo: arguments: { Pragma }.! !\\\\n\\\\n\\\\n!MethodPragmaTest methodsFor: 'testing-method' stamp: 'lr 1/20/2006 07:54'!\\\\ntestMethod\\\\n\\\\t| pragma |\\\\n\\\\tpragma := self pragma: 'foo' selector: #bar.\\\\n\\\\tself assert: pragma method == (self class >> #bar).! !\\\\n\\\\n!MethodPragmaTest methodsFor: 'testing-method' stamp: 'md 2/18/2006 19:59'!\\\\ntestMethodClass\\\\n\\\\t| pragma |\\\\n\\\\tpragma := self pragma: 'foo' selector: #bar.\\\\n\\\\tself assert: pragma methodClass == self class.! !\\\\n\\\\n!MethodPragmaTest methodsFor: 'testing-method' stamp: 'lr 1/20/2006 07:54'!\\\\ntestSelector\\\\n\\\\t| pragma |\\\\n\\\\tpragma := self pragma: 'foo' selector: #bar.\\\\n\\\\tself assert: pragma selector == #bar.! !\\\\n\\\\n\\\\n!MethodPragmaTest methodsFor: 'testing-compiled' stamp: 'lr 2/6/2006 21:03'!\\\\ntestNoPragma\\\\n\\\\t| method |\\\\n\\\\tmethod := self compile: '' selector: #foo.\\\\n\\\\tself assert: method pragmas = #().! !\\\\n\\\\n\\\\n!MethodPragmaTest methodsFor: 'testing-primitives' stamp: 'lr 1/20/2006 02:31'!\\\\ntestPrimitiveIndexed1\\\\n\\\\t\\\\\\\"This test useses the #instVarAt: primitive.\\\\\\\"\\\\n\\\\t\\\\n\\\\tself compile: '<primitive: 74> ^ #inst' selector: #inst.\\\\n\\\\tself assert: self inst = #inst.! !\\\\n\\\\n!MethodPragmaTest methodsFor: 'testing-primitives' stamp: 'lr 1/20/2006 02:31'!\\\\ntestPrimitiveIndexed2\\\\n\\\\t\\\\\\\"This test useses the #asOop primitive.\\\\\\\"\\\\n\\\\n\\\\tself compile: '<primitive: 75> ^ #oop' selector: #oop.\\\\n\\\\tself assert: self oop = self asOop.! !\\\\n\\\\n!MethodPragmaTest methodsFor: 'testing-primitives' stamp: 'lr 1/20/2006 02:42'!\\\\ntestPrimitiveNamed1\\\\n\\\\t\\\\\\\"This test useses the #primitiveDirectoryLookup primitive.\\\\\\\"\\\\n\\\\n\\\\tself compile: '<primitive: ''primitiveDirectoryLookup'' module: ''FilePlugin''> ^ #lookup' selector: #lookup.\\\\n\\\\tself assert: self lookup = #lookup.\\\\n\\\\t\\\\n! !\\\\n\\\\n!MethodPragmaTest methodsFor: 'testing-primitives' stamp: 'lr 1/20/2006 02:41'!\\\\ntestPrimitiveNamed2\\\\n\\\\t\\\\\\\"This test useses the #primPathNameDelimiter primitive.\\\\\\\"\\\\n\\\\n\\\\tself compile: '<primitive: ''primitiveDirectoryDelimitor'' module: ''FilePlugin''> ^ #delim' selector: #delim.\\\\n\\\\tself assert: self delim = FileDirectory primPathNameDelimiter.\\\\n\\\\t\\\\n! !\\\\nObject subclass: #MethodProperties\\\\n\\\\tinstanceVariableNames: 'properties pragmas selector'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Kernel-Methods'!\\\\n!MethodProperties commentStamp: 'lr 2/6/2006 19:31' prior: 0!\\\\nI am class holding state for compiled methods. All my instance variables should be actually part of the CompiledMethod itself, but the current implementation of the VM doesn't allow this.\\\\n\\\\nI am a compact class and optimized for size and speed, since every CompiledMethod points onto an instance of myself. I am mostly polymorphic to the protocol of an identity-dictionary, so that key-value pairs can be easily stored and retreived without the need to add new variables. However keep in mind that instantiating a dictionary consumes much more memory than adding an instance-variable, so it might be clever to add a new variable if the property is going to be used by every compiled method.!\\\\n\\\\n\\\\n!MethodProperties methodsFor: 'accessing' stamp: 'lr 2/6/2006 19:11'!\\\\npragmas\\\\n\\\\t^ pragmas! !\\\\n\\\\n!MethodProperties methodsFor: 'accessing' stamp: 'md 2/16/2006 17:50'!\\\\nselector\\\\n\\\\t^selector! !\\\\n\\\\n!MethodProperties methodsFor: 'accessing' stamp: 'md 2/16/2006 17:50'!\\\\nselector: aSymbol\\\\n\\\\tselector := aSymbol! !\\\\n\\\\n\\\\n!MethodProperties methodsFor: 'initialization' stamp: 'lr 2/6/2006 19:12'!\\\\ninitialize\\\\n\\\\tsuper initialize.\\\\n\\\\tpragmas := #().! !\\\\n\\\\n\\\\n!MethodProperties methodsFor: 'properties' stamp: 'lr 2/6/2006 19:04'!\\\\nat: aKey\\\\n\\\\t\\\\\\\"Answer the property value associated with aKey.\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ self at: aKey ifAbsent: [ self error: 'Property not found' ].! !\\\\n\\\\n!MethodProperties methodsFor: 'properties' stamp: 'lr 2/6/2006 20:47'!\\\\nat: aKey ifAbsentPut: aBlock\\\\n\\\\t\\\\\\\"Answer the property associated with aKey or, if aKey isn't found store the result of evaluating aBlock as new value.\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ self at: aKey ifAbsent: [ self at: aKey put: aBlock value ].! !\\\\n\\\\n!MethodProperties methodsFor: 'properties' stamp: 'lr 2/6/2006 19:07'!\\\\nat: aKey ifAbsent: aBlock\\\\n\\\\t\\\\\\\"Answer the property value associated with aKey or, if aKey isn't found, answer the result of evaluating aBlock.\\\\\\\"\\\\n\\\\t\\\\n\\\\tproperties isNil ifTrue: [ ^ aBlock value ].\\\\n\\\\t^ properties at: aKey ifAbsent: aBlock.! !\\\\n\\\\n!MethodProperties methodsFor: 'properties' stamp: 'lr 2/6/2006 19:06'!\\\\nat: aKey put: anObject\\\\n\\\\t\\\\\\\"Set the property at aKey to be anObject. If aKey is not found, create a new entry for aKey and set is value to anObject. Answer anObject.\\\\\\\"\\\\n\\\\n\\\\tproperties ifNil: [ properties :=  IdentityDictionary new ].\\\\n\\\\t^ properties at: aKey put: anObject.! !\\\\n\\\\n!MethodProperties methodsFor: 'properties' stamp: 'lr 2/6/2006 19:11'!\\\\nincludesKey: aKey\\\\n\\\\t\\\\\\\"Test if the property aKey is present.\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ properties notNil and: [ properties includesKey: aKey ].! !\\\\n\\\\n!MethodProperties methodsFor: 'properties' stamp: 'lr 2/6/2006 20:48'!\\\\nremoveKey: aKey\\\\n\\\\t\\\\\\\"Remove the property with aKey. Answer the property or raise an error if aKey isn't found.\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ self removeKey: aKey ifAbsent: [ self error: 'Property not found' ].! !\\\\n\\\\n!MethodProperties methodsFor: 'properties' stamp: 'lr 2/6/2006 19:07'!\\\\nremoveKey: aKey ifAbsent: aBlock\\\\n\\\\t\\\\\\\"Remove the property with aKey. Answer the value or, if aKey isn't found, answer the result of evaluating aBlock.\\\\\\\"\\\\n\\\\t\\\\n\\\\t| answer |\\\\n\\\\tproperties isNil ifTrue: [ ^ aBlock value ].\\\\n\\\\tanswer := properties removeKey: aKey ifAbsent: aBlock.\\\\n\\\\tproperties isEmpty ifTrue: [ properties := nil ].\\\\n\\\\t^ answer.! !\\\\n\\\\n\\\\n!MethodProperties methodsFor: 'private' stamp: 'lr 2/6/2006 20:36'!\\\\naddPragma: aPragma\\\\n\\\\tpragmas := pragmas copyWith: aPragma.! !\\\\n\\\\n\\\\n!MethodProperties methodsFor: 'testing' stamp: 'md 2/19/2006 11:24'!\\\\nisMethodProperties\\\\n\\\\t^true! !\\\\n\\\\n\\\\n!MethodProperties methodsFor: 'copying' stamp: 'md 3/1/2006 15:30'!\\\\npostCopy\\\\n\\\\tproperties := properties copy.\\\\n\\\\tpragmas := pragmas copy.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMethodProperties class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MethodProperties class methodsFor: 'class initialization' stamp: 'lr 2/6/2006 22:06'!\\\\ninitialize\\\\n\\\\tself becomeCompact.! !\\\\nTestCase subclass: #MethodPropertiesTest\\\\n\\\\tinstanceVariableNames: 'method'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'KernelTests-Methods'!\\\\n\\\\n!MethodPropertiesTest methodsFor: 'private' stamp: 'lr 2/6/2006 20:43'!\\\\npropertyDictionaryFor: aMethod\\\\n\\\\t^ aMethod properties instVarNamed: 'properties'.! !\\\\n\\\\n\\\\n!MethodPropertiesTest methodsFor: 'running' stamp: 'lr 1/20/2006 19:16'!\\\\nsetUp\\\\n\\\\tmethod := Object >> #halt.! !\\\\n\\\\n!MethodPropertiesTest methodsFor: 'running' stamp: 'lr 1/20/2006 19:20'!\\\\ntearDown\\\\n\\\\tObject recompile: #halt from: Object.! !\\\\n\\\\n\\\\n!MethodPropertiesTest methodsFor: 'testing' stamp: 'kwl 7/26/2006 11:41'!\\\\ntestAllMethodsHaveMethodClass\\\\n\\\\tSmalltalk garbageCollect.\\\\n\\\\tself assert: (CompiledMethod allInstances\\\\n\\\\t\\\\t\\\\treject: [:cm | cm literals last isVariableBinding\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [cm literals last value isBehavior\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tor: [cm literals last value isTrait]]]) isEmpty\\\\n\\\\t\\\\t\\\\tdescription: 'CompiledMethods must have methodClass literal'! !\\\\n\\\\n!MethodPropertiesTest methodsFor: 'testing' stamp: 'kwl 7/26/2006 11:40'!\\\\ntestAllMethodsHaveNewPropertyFormat\\\\n\\\\tSmalltalk garbageCollect.\\\\n\\\\tself assert: (CompiledMethod allInstances\\\\n\\\\t\\\\t\\\\treject: [:cm | cm hasNewPropertyFormat]) isEmpty\\\\n\\\\t\\\\tdescription: 'CompiledMethods must have new property format'! !\\\\n\\\\n!MethodPropertiesTest methodsFor: 'testing' stamp: 'lr 2/6/2006 22:21'!\\\\ntestAt\\\\n\\\\tself should: [ method properties at: #zork ] raise: Error.\\\\n\\\\tself assert: (self propertyDictionaryFor: method) isNil.\\\\n\\\\tmethod properties at: #zork put: 'hello'.\\\\n\\\\tself assert: (method properties at: #zork) = 'hello'.! !\\\\n\\\\n!MethodPropertiesTest methodsFor: 'testing' stamp: 'lr 2/6/2006 22:18'!\\\\ntestAtIfAbsent\\\\n\\\\tself assert: (method properties at: #zork ifAbsent: [ 'hello' ]) = 'hello'.\\\\n\\\\tself assert: (self propertyDictionaryFor: method) isNil.\\\\n\\\\tmethod properties at: #zork put: 'hi'.\\\\n\\\\tself assert: (method properties at: #zork ifAbsent: [ 'hello' ]) = 'hi'.! !\\\\n\\\\n!MethodPropertiesTest methodsFor: 'testing' stamp: 'lr 2/6/2006 22:18'!\\\\ntestAtIfAbsentPut\\\\n\\\\tself assert: (method properties at: #zork ifAbsentPut: [ 'hello' ]) = 'hello'.\\\\n\\\\tself assert: (method properties at: #zork ifAbsentPut: [ 'hi' ]) = 'hello'.! !\\\\n\\\\n!MethodPropertiesTest methodsFor: 'testing' stamp: 'lr 2/6/2006 22:18'!\\\\ntestAtPut\\\\n\\\\tself assert: (method properties at: #zork put: 'hello') = 'hello'.\\\\n\\\\tself assert: (method properties at: #zork) = 'hello'.! !\\\\n\\\\n!MethodPropertiesTest methodsFor: 'testing' stamp: 'lr 2/6/2006 22:19'!\\\\ntestIncludesKey\\\\n\\\\tself deny: (method properties includesKey: #zork).\\\\n\\\\tself assert: (self propertyDictionaryFor: method) isNil.\\\\n\\\\tmethod properties at: #zork put: 123.\\\\n\\\\tself assert: (method properties includesKey: #zork).! !\\\\n\\\\n!MethodPropertiesTest methodsFor: 'testing' stamp: 'lr 2/6/2006 22:18'!\\\\ntestRemoveKey\\\\n\\\\tmethod properties at: #zork put: 'hello'.\\\\n\\\\tself should: [ method properties removeKey: #halt ] raise: Error.\\\\n\\\\tself assert: (method properties removeKey: #zork) = 'hello'.\\\\n\\\\tself assert: (self propertyDictionaryFor: method) isNil.\\\\n\\\\tself should: [ method properties removeKey: #zork ] raise: Error.\\\\n\\\\tself assert: (self propertyDictionaryFor: method) isNil.! !\\\\n\\\\n!MethodPropertiesTest methodsFor: 'testing' stamp: 'lr 2/6/2006 22:18'!\\\\ntestRemoveKeyifAbsent\\\\n\\\\tmethod properties at: #zork put: 'hello'.\\\\n\\\\tself assert: (method properties removeKey: #halt ifAbsent: [ 'hi' ]) = 'hi'.\\\\n\\\\tself assert: (method properties removeKey: #zork ifAbsent: [ 'hi' ]) = 'hello'.\\\\n\\\\tself assert: (self propertyDictionaryFor: method) isNil.\\\\n\\\\tself should: (method properties removeKey: #zork ifAbsent: [ 'hi' ]) = 'hi'.\\\\n\\\\tself assert: (self propertyDictionaryFor: method) isNil.! !\\\\nObject subclass: #MethodReference\\\\n\\\\tinstanceVariableNames: 'classSymbol classIsMeta methodSymbol stringVersion'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Tools'!\\\\n!MethodReference commentStamp: 'tlk 5/9/2006 18:43' prior: 0!\\\\nA MethodReference is is a lightweight proxy for a CompiledMethod.  Has methods for pointed to the CompileMethod's source statements, byte codes. Is heavily used my Tools.\\\\n\\\\nInstance Variables\\\\n\\\\tclassIsMeta:\\\\t\\\\t     Boolean class vs. instance\\\\n\\\\tclassSymbol:\\\\t\\\\tSymbol for method's class (without class keyword if meta)\\\\n\\\\tmethodSymbol:\\\\t\\\\tSymbol for method's selector\\\\n\\\\tstringVersion:\\\\t\\\\t'Class>>selector:' format\\\\n\\\\n!\\\\n\\\\n\\\\n!MethodReference methodsFor: 'comparisons' stamp: 'dgd 3/8/2003 11:54'!\\\\nhash\\\\n\\\\t\\\\\\\"Answer a SmallInteger whose value is related to the receiver's  \\\\n\\\\tidentity.\\\\\\\"\\\\n\\\\t^ (self species hash bitXor: self classSymbol hash)\\\\n\\\\t\\\\tbitXor: self methodSymbol hash! !\\\\n\\\\n!MethodReference methodsFor: 'comparisons' stamp: 'RAA 5/28/2001 11:56'!\\\\n<= anotherMethodReference\\\\n\\\\n\\\\tclassSymbol < anotherMethodReference classSymbol ifTrue: [^true].\\\\n\\\\tclassSymbol > anotherMethodReference classSymbol ifTrue: [^false].\\\\n\\\\tclassIsMeta = anotherMethodReference classIsMeta ifFalse: [^classIsMeta not].\\\\n\\\\t^methodSymbol <= anotherMethodReference methodSymbol\\\\n! !\\\\n\\\\n!MethodReference methodsFor: 'comparisons' stamp: 'dgd 3/7/2003 13:18'!\\\\n= anotherMethodReference \\\\n\\\\t\\\\\\\"Answer whether the receiver and the argument represent the \\\\n\\\\tsame object.\\\\\\\"\\\\n\\\\t^ self species == anotherMethodReference species\\\\n\\\\t\\\\tand: [self classSymbol = anotherMethodReference classSymbol]\\\\n\\\\t\\\\tand: [self classIsMeta = anotherMethodReference classIsMeta]\\\\n\\\\t\\\\tand: [self methodSymbol = anotherMethodReference methodSymbol]! !\\\\n\\\\n\\\\n!MethodReference methodsFor: 'queries' stamp: 'RAA 5/28/2001 06:19'!\\\\nasStringOrText\\\\n\\\\n\\\\t^stringVersion! !\\\\n\\\\n!MethodReference methodsFor: 'queries' stamp: 'RAA 5/28/2001 08:11'!\\\\nclassIsMeta\\\\n\\\\n\\\\t^classIsMeta! !\\\\n\\\\n!MethodReference methodsFor: 'queries' stamp: 'RAA 5/28/2001 08:10'!\\\\nclassSymbol\\\\n\\\\n\\\\t^classSymbol! !\\\\n\\\\n!MethodReference methodsFor: 'queries' stamp: 'md 8/27/2005 17:17'!\\\\nisValid\\\\n\\\\t\\\\\\\"Answer whether the receiver represents a current selector or Comment\\\\\\\"\\\\n\\\\n\\\\t| aClass |\\\\n\\\\tmethodSymbol isDoIt ifTrue: [^ false].\\\\n\\\\t(aClass _ self actualClass) ifNil: [^ false].\\\\n\\\\t^ (aClass includesSelector: methodSymbol) or:\\\\n\\\\t\\\\t[methodSymbol == #Comment]! !\\\\n\\\\n!MethodReference methodsFor: 'queries' stamp: 'RAA 5/28/2001 08:10'!\\\\nmethodSymbol\\\\n\\\\n\\\\t^methodSymbol! !\\\\n\\\\n!MethodReference methodsFor: 'queries' stamp: 'sw 11/5/2001 00:53'!\\\\nprintOn: aStream\\\\n\\\\t\\\\\\\"Print the receiver on a stream\\\\\\\"\\\\n\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream nextPutAll: ' ', self actualClass name, ' >> ', methodSymbol! !\\\\n\\\\n!MethodReference methodsFor: 'queries' stamp: 'sr 6/4/2004 01:55'!\\\\nsourceString\\\\n\\\\t^ (self actualClass sourceCodeAt: self methodSymbol) asString! !\\\\n\\\\n\\\\n!MethodReference methodsFor: 'setting' stamp: 'RAA 5/28/2001 07:34'!\\\\nsetClassAndSelectorIn: csBlock\\\\n\\\\n\\\\t^csBlock value: self actualClass value: methodSymbol! !\\\\n\\\\n!MethodReference methodsFor: 'setting' stamp: 'RAA 5/28/2001 06:04'!\\\\nsetClassSymbol: classSym classIsMeta: isMeta methodSymbol: methodSym stringVersion: aString \\\\n\\\\n\\\\tclassSymbol _ classSym.\\\\n\\\\tclassIsMeta _ isMeta.\\\\n\\\\tmethodSymbol _ methodSym.\\\\n\\\\tstringVersion _ aString.! !\\\\n\\\\n!MethodReference methodsFor: 'setting' stamp: 'RAA 5/28/2001 08:06'!\\\\nsetClass: aClass methodSymbol: methodSym stringVersion: aString \\\\n\\\\n\\\\tclassSymbol _ aClass theNonMetaClass name.\\\\n\\\\tclassIsMeta _ aClass isMeta.\\\\n\\\\tmethodSymbol _ methodSym.\\\\n\\\\tstringVersion _ aString.! !\\\\n\\\\n!MethodReference methodsFor: 'setting' stamp: 'RAA 5/28/2001 11:34'!\\\\nsetStandardClass: aClass methodSymbol: methodSym\\\\n\\\\n\\\\tclassSymbol _ aClass theNonMetaClass name.\\\\n\\\\tclassIsMeta _ aClass isMeta.\\\\n\\\\tmethodSymbol _ methodSym.\\\\n\\\\tstringVersion _ aClass name , ' ' , methodSym.! !\\\\n\\\\n\\\\n!MethodReference methodsFor: 'string version' stamp: 'RAA 5/29/2001 14:44'!\\\\nstringVersion\\\\n\\\\n\\\\t^stringVersion! !\\\\n\\\\n!MethodReference methodsFor: 'string version' stamp: 'RAA 5/29/2001 14:44'!\\\\nstringVersion: aString\\\\n\\\\n\\\\tstringVersion _ aString! !\\\\n\\\\n\\\\n!MethodReference methodsFor: '*fixUnderscores' stamp: 'cmm 5/1/2006 19:38'!\\\\nfixUnderscores\\\\n\\\\t\\\\\\\"Replace underscores with :=. Answer true if fixed or no fix necessary, false if manual fix required\\\\\\\"\\\\n\\\\n\\\\t| src cm ts |\\\\n\\\\t\\\\\\\"Check if we do need to do anything\\\\\\\"\\\\n\\\\tsrc := self actualClass sourceCodeAt: methodSymbol.\\\\n\\\\t(src includes: $_) ifFalse: [^true].\\\\n\\\\n\\\\t\\\\\\\"Chicken out if there is a literal underscore\\\\\\\"\\\\n\\\\tcm := self actualClass compiledMethodAt: methodSymbol.\\\\n\\\\t(cm hasLiteralSuchThat: [:lit | \\\\n\\\\t\\\\tlit = $_ or: [lit isString and: [lit includes: $_]]]) ifTrue: [^false].\\\\n\\\\n\\\\t\\\\\\\"Otherwise, replace underscores with :=\\\\\\\"\\\\n\\\\tsrc := src copyReplaceAll: '_' with: ':='.\\\\n\\\\tts := self timeStamp.\\\\n\\\\tts = '' ifTrue: [ts := nil].\\\\n\\\\tself actualClass \\\\n\\\\t\\\\tcompile: src\\\\n\\\\t\\\\tclassified: ClassOrganizer default\\\\n\\\\t\\\\twithStamp: ts \\\\n\\\\t\\\\tnotifying: nil.\\\\n\\\\n\\\\t^true\\\\n! !\\\\n\\\\n\\\\n!MethodReference methodsFor: '*Kernel-Traits' stamp: 'md 3/3/2006 09:25'!\\\\nactualClass \\\\n\\\\n\\\\t| actualClass |\\\\n\\\\n\\\\tactualClass _ Smalltalk at: classSymbol ifAbsent: [^nil].\\\\n\\\\tclassIsMeta ifTrue: [^actualClass classSide].\\\\n\\\\t^actualClass\\\\n\\\\n! !\\\\n\\\\n\\\\n!MethodReference methodsFor: '*monticello' stamp: 'ab 8/22/2003 17:55'!\\\\nasMethodDefinition\\\\n\\\\t^ MCMethodDefinition forMethodReference: self! !\\\\n\\\\n!MethodReference methodsFor: '*monticello' stamp: 'ab 8/22/2003 17:58'!\\\\ncategory\\\\n\\\\t^ self actualClass organization categoryOfElement: methodSymbol! !\\\\n\\\\n!MethodReference methodsFor: '*monticello' stamp: 'ab 8/22/2003 17:58'!\\\\ncompiledMethod\\\\n\\\\t^ self actualClass compiledMethodAt: methodSymbol! !\\\\n\\\\n!MethodReference methodsFor: '*monticello' stamp: 'al 10/9/2005 20:05'!\\\\nisLocalSelector\\\\n\\\\t^self actualClass\\\\n\\\\t\\\\tincludesLocalSelector: self methodSymbol! !\\\\n\\\\n!MethodReference methodsFor: '*monticello' stamp: 'ab 8/22/2003 17:59'!\\\\nsource\\\\n\\\\t^ (self actualClass sourceCodeAt: methodSymbol) asString withSqueakLineEndings! !\\\\n\\\\n!MethodReference methodsFor: '*monticello' stamp: 'ab 8/22/2003 17:58'!\\\\ntimeStamp\\\\n\\\\t^ self compiledMethod timeStamp! !\\\\n\\\\n\\\\n!MethodReference methodsFor: '*packageinfo-base' stamp: 'ab 5/23/2003 22:58'!\\\\nsourceCode\\\\n\\\\t^ self actualClass sourceCodeAt: methodSymbol! !\\\\n\\\\n\\\\n!MethodReference methodsFor: '*OB-Standard' stamp: 'dvf 8/19/2005 17:16'!\\\\nasNode\\\\n\\\\t^OBMethodNode on: self! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMethodReference class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MethodReference class methodsFor: 'instance creation' stamp: 'ab 2/6/2005 16:22'!\\\\nclass: aClass selector: aSelector\\\\n\\\\t^ self new setStandardClass: aClass methodSymbol: aSelector! !\\\\nClassTestCase subclass: #MethodReferenceTest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Tools-Browser-Tests'!\\\\n\\\\n!MethodReferenceTest methodsFor: 'Running' stamp: 'sd 11/20/2005 21:27'!\\\\ntestEquals\\\\n\\\\t| aMethodReference anotherMethodReference |\\\\n\\\\taMethodReference := MethodReference new.\\\\n\\\\tanotherMethodReference := MethodReference new.\\\\n\\\\t\\\\\\\" \\\\n\\\\ttwo fresh instances should be equals between them\\\\\\\"\\\\n\\\\tself\\\\n\\\\t\\\\tshould: [aMethodReference = anotherMethodReference].\\\\n\\\\tself\\\\n\\\\t\\\\tshould: [aMethodReference hash = anotherMethodReference hash].\\\\n\\\\t\\\\\\\" \\\\n\\\\ttwo instances representing the same method (same class and  \\\\n\\\\tsame selector) should be equals\\\\\\\"\\\\n\\\\taMethodReference setStandardClass: String methodSymbol: #foo.\\\\n\\\\tanotherMethodReference setStandardClass: String methodSymbol: #foo.\\\\n\\\\tself\\\\n\\\\t\\\\tshould: [aMethodReference = anotherMethodReference].\\\\n\\\\tself\\\\n\\\\t\\\\tshould: [aMethodReference hash = anotherMethodReference hash] ! !\\\\n\\\\n!MethodReferenceTest methodsFor: 'Running' stamp: 'sd 11/20/2005 21:27'!\\\\ntestNotEquals\\\\n\\\\t| aMethodReference anotherMethodReference |\\\\n\\\\taMethodReference := MethodReference new.\\\\n\\\\tanotherMethodReference := MethodReference new.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\taMethodReference setStandardClass: String methodSymbol: #foo.\\\\n\\\\tanotherMethodReference setStandardClass: String class methodSymbol: #foo.\\\\n\\\\t\\\\\\\" \\\\n\\\\tdifferente classes, same selector -> no more equals\\\\\\\"\\\\n\\\\tself\\\\n\\\\t\\\\tshouldnt: [aMethodReference = anotherMethodReference].\\\\n\\\\t\\\\\\\" \\\\n\\\\tsame classes, diferente selector -> no more equals\\\\\\\"\\\\n\\\\tanotherMethodReference setStandardClass: String methodSymbol: #bar.\\\\n\\\\tself\\\\n\\\\t\\\\tshouldnt: [aMethodReference = anotherMethodReference] ! !\\\\nParseNode subclass: #MethodTempsNode\\\\n\\\\tinstanceVariableNames: 'temporaries'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Compiler-ParseNodes'!\\\\nMethodInterface subclass: #MethodWithInterface\\\\n\\\\tinstanceVariableNames: 'playerClass'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'EToys-Scripting'!\\\\n!MethodWithInterface commentStamp: '<historical>' prior: 0!\\\\nA MethodInterface bound to an actual class.\\\\n\\\\n\\\\tselector\\\\t\\\\t\\\\t\\\\t\\\\tA symbol - the selector being described\\\\n\\\\targumentSpecifications\\\\tA list of specifications for the formal arguments of the method\\\\n\\\\tresultSpecification \\\\t\\\\tA characterization of the return value of the method\\\\n\\\\tuserLevel\\\\t\\\\t\\\\t\\\\t\\\\n\\\\tattributeKeywords\\\\t\\\\tA list of symbols, comprising keywords that the user wishes to\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tassociate with this method\\\\n\\\\tdefaultStatus\\\\t\\\\t\\\\tThe status to apply to new instances of the class by default\\\\n\\\\tdefaultFiresPerTick\\\\t\\\\tHow many fires per tick, by default, should be allowed if ticking.\\\\n\\\\tplayerClass\\\\t\\\\t\\\\t\\\\tThe actual class with which this script is associated!\\\\n\\\\n\\\\n!MethodWithInterface methodsFor: 'access' stamp: 'sw 3/28/2001 16:25'!\\\\nplayerClass\\\\n\\\\t\\\\\\\"Answer the playerClass associated with the receiver.  Note: fixes up cases where the playerClass slot was a Playerxxx object because of an earlier bug\\\\\\\"\\\\n\\\\n\\\\t^ (playerClass isKindOf: Class)\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[playerClass]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[playerClass _ playerClass class]! !\\\\n\\\\n\\\\n!MethodWithInterface methodsFor: 'initialization' stamp: 'sw 1/30/2001 11:37'!\\\\nconvertFromUserScript: aUserScript\\\\n\\\\t\\\\\\\"The argument represents an old UserScript object.  convert it over\\\\\\\"\\\\n\\\\n\\\\tdefaultStatus _ aUserScript status.! !\\\\n\\\\n!MethodWithInterface methodsFor: 'initialization' stamp: 'sw 1/26/2001 16:44'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Initialize the receiver by setting its inst vars to default values\\\\\\\"\\\\n\\\\n\\\\tsuper initialize.\\\\n\\\\tdefaultStatus _ #normal! !\\\\n\\\\n!MethodWithInterface methodsFor: 'initialization' stamp: 'sw 2/20/2001 03:29'!\\\\nisTextuallyCoded\\\\n\\\\t\\\\\\\"Answer whether the receiver is in a textually-coded state.  A leftover from much earlier times, this is a vacuous backstop\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!MethodWithInterface methodsFor: 'initialization' stamp: 'sw 9/12/2001 11:59'!\\\\nplayerClass: aPlayerClass selector: aSelector\\\\n\\\\t\\\\\\\"Set the playerClass and selector of the receiver\\\\\\\"\\\\n\\\\n\\\\tplayerClass _ aPlayerClass.\\\\n\\\\tselector _ aSelector.! !\\\\n\\\\n!MethodWithInterface methodsFor: 'initialization' stamp: 'nk 7/2/2004 07:18'!\\\\nstatus\\\\n\\\\t^defaultStatus\\\\n! !\\\\n\\\\n\\\\n!MethodWithInterface methodsFor: 'rename' stamp: 'sw 2/17/2001 04:10'!\\\\nokayToRename\\\\n\\\\t\\\\\\\"Answer whether the receiver is in a state to be renamed.\\\\\\\"\\\\n\\\\n\\\\t^ true! !\\\\n\\\\n!MethodWithInterface methodsFor: 'rename' stamp: 'sw 3/11/2003 00:01'!\\\\nrenameScript: newSelector fromPlayer: aPlayer\\\\n\\\\n\\\\t\\\\\\\"The receiver's selector has changed to the new selector.  Get various things right, including the physical appearance of any Scriptor open on this method\\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\tself allScriptEditors do:\\\\n\\\\n\\\\t\\\\t[:aScriptEditor | aScriptEditor renameScriptTo: newSelector].\\\\n\\\\n\\\\n\\\\n\\\\t(selector numArgs = 0 and: [newSelector numArgs = 1])\\\\n\\\\n\\\\t\\\\tifTrue:\\\\n\\\\n\\\\t\\\\t\\\\t[self argumentVariables: (OrderedCollection with:\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t(Variable new name: #parameter type: #Number))].\\\\n\\\\n\\\\t(selector numArgs = 1 and: [newSelector numArgs = 0])\\\\n\\\\n\\\\t\\\\tifTrue:\\\\n\\\\n\\\\t\\\\t\\\\t[self argumentVariables: OrderedCollection new].\\\\n\\\\n\\\\n\\\\n\\\\tselector _ newSelector asSymbol.\\\\n\\\\n\\\\tself bringUpToDate.\\\\n\\\\n\\\\tself playerClass atSelector: selector putScript: self.\\\\n\\\\n\\\\tself allScriptActivationButtons do:\\\\n\\\\n\\\\t\\\\t[:aButton | aButton bringUpToDate].\\\\n\\\\n\\\\n\\\\n! !\\\\n\\\\n\\\\n!MethodWithInterface methodsFor: 'script editor' stamp: 'sw 3/10/2003 23:58'!\\\\nallScriptActivationButtons\\\\n\\\\n\\\\t\\\\\\\"Answer all the script-activation buttons that exist for this interface\\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\t^ ScriptActivationButton allInstances select: \\\\n\\\\n\\\\t\\\\t[:aButton | aButton uniclassScript == self]! !\\\\n\\\\n!MethodWithInterface methodsFor: 'script editor' stamp: 'sw 3/28/2001 16:26'!\\\\nallScriptEditors\\\\n\\\\t\\\\\\\"Answer all the script editors that exist for the class and selector of this interface\\\\\\\"\\\\n\\\\n\\\\t^ ScriptEditorMorph allInstances select: \\\\n\\\\t\\\\t[:aScriptEditor | aScriptEditor playerScripted class == self playerClass and:\\\\n\\\\t\\\\t\\\\t[aScriptEditor scriptName == selector]]! !\\\\n\\\\n!MethodWithInterface methodsFor: 'script editor' stamp: 'sw 2/17/2001 03:28'!\\\\ncurrentScriptEditor: anEditor\\\\n\\\\t\\\\\\\"Set the receiver's currentScriptEditor as indicated, if I care.  MethodWithInterface does not care, since it does not hold on to a ScriptEditor.  A subclass of mine, however does, or did, care\\\\\\\"! !\\\\n\\\\n!MethodWithInterface methodsFor: 'script editor' stamp: 'sw 3/28/2001 16:26'!\\\\ninstantiatedScriptEditorForPlayer: aPlayer\\\\n\\\\t\\\\\\\"Return a new script editor for the player and selector\\\\\\\"\\\\n\\\\n\\\\t| aScriptEditor |\\\\n\\\\taScriptEditor _ (self playerClass includesSelector: selector) \\\\n\\\\t\\\\t\\\\tifTrue: [ScriptEditorMorph new \\\\n\\\\t\\\\t\\\\t\\\\tfromExistingMethod: selector \\\\n\\\\t\\\\t\\\\t\\\\tforPlayer: aPlayer]\\\\n\\\\t\\\\t\\\\tifFalse: [ScriptEditorMorph new\\\\n\\\\t\\\\t\\\\t\\\\tsetMorph: aPlayer costume\\\\n\\\\t\\\\t\\\\t\\\\tscriptName: selector].\\\\n\\\\t\\\\tdefaultStatus == #ticking ifTrue:\\\\n\\\\t\\\\t\\\\t[aPlayer costume arrangeToStartStepping].\\\\n\\\\t\\\\n\\\\t^ aScriptEditor! !\\\\n\\\\n!MethodWithInterface methodsFor: 'script editor' stamp: 'sw 7/28/2001 01:00'!\\\\nrecompileScriptFromTilesUnlessTextuallyCoded\\\\n\\\\t\\\\\\\"Recompile Script From Tiles Unless Textually Coded.  For the universal-tiles MethodWithInterface case, this is moot.  Used only in support of a reintegration of Open-school forked projects from Sept 2000 in 7/01\\\\\\\"! !\\\\n\\\\n\\\\n!MethodWithInterface methodsFor: 'updating' stamp: 'sw 3/28/2001 16:26'!\\\\nbringUpToDate\\\\n\\\\t\\\\\\\"Bring all scriptors related to this method up to date.  Note that this will not change the senders of this method if the selector changed -- that's something still ahead.\\\\\\\"\\\\n\\\\n\\\\t(ScriptEditorMorph allInstances select:\\\\n\\\\t\\\\t[:m | (m playerScripted isMemberOf: self playerClass) and: [m scriptName == selector]])\\\\n\\\\t\\\\t\\\\tdo:\\\\n\\\\t\\\\t\\\\t\\\\t[:m | m bringUpToDate]! !\\\\n\\\\n!MethodWithInterface methodsFor: 'updating' stamp: 'sw 2/20/2001 03:43'!\\\\nrevertToLastSavedTileVersionFor: anEditor\\\\n\\\\t\\\\\\\"revert to the last saved tile version.  Only for universal tiles.\\\\\\\"\\\\n\\\\n\\\\tanEditor removeAllButFirstSubmorph.\\\\n\\\\tanEditor insertUniversalTiles.\\\\n\\\\tanEditor showingMethodPane: false! !\\\\n\\\\n!MethodWithInterface methodsFor: 'updating' stamp: 'sw 2/20/2001 03:41'!\\\\nsaveScriptVersion: timeStamp\\\\n\\\\t\\\\\\\"Save the tile script version if I do that sort of thing\\\\\\\"! !\\\\nAlignmentMorph subclass: #MidiInputMorph\\\\n\\\\tinstanceVariableNames: 'midiPortNumber midiSynth instrumentSelector'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Sound-Scores'!\\\\n!MidiInputMorph commentStamp: '<historical>' prior: 0!\\\\nI am the user interface for a simple software MIDI synthesizer that is driven by external MIDI input. I come with controls for a single MIDI channel (channel 1), but allow channel controls for additional MIDI channels to be added by the user. The volume, pan, and instrument of each channel can be controlled independently.\\\\n!\\\\n\\\\n\\\\n!MidiInputMorph methodsFor: 'as yet unclassified' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\naddChannel\\\\n\\\\t\\\\\\\"Add a set of controls for another channel. Prompt the user for the channel number.\\\\\\\"\\\\n\\\\n\\\\t| menu existingChannels newChannel |\\\\n\\\\tmenu := CustomMenu new.\\\\n\\\\texistingChannels := Set new.\\\\n\\\\t1 to: 16 do: [:ch | (instrumentSelector at: ch) ifNotNil: [existingChannels add: ch]].\\\\n\\\\t1 to: 16 do: [:ch |\\\\n\\\\t\\\\t(existingChannels includes: ch) ifFalse: [\\\\n\\\\t\\\\t\\\\tmenu add: ch printString action: ch]].\\\\n\\\\tnewChannel := menu startUp.\\\\n\\\\tnewChannel ifNotNil: [self addChannelControlsFor: newChannel].\\\\n! !\\\\n\\\\n!MidiInputMorph methodsFor: 'as yet unclassified' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\naddChannelControlsFor: channelIndex\\\\n\\\\n\\\\t| r divider col |\\\\n\\\\tr := self makeRow\\\\n\\\\t\\\\thResizing: #shrinkWrap;\\\\n\\\\t\\\\tvResizing: #shrinkWrap.\\\\n\\\\tr addMorphBack: (self channelNumAndMuteButtonFor: channelIndex).\\\\n\\\\tr addMorphBack: (Morph new extent: 10@5; color: color).  \\\\\\\"spacer\\\\\\\"\\\\n\\\\tr addMorphBack: (self panAndVolControlsFor: channelIndex).\\\\n\\\\n\\\\tdivider := AlignmentMorph new\\\\n\\\\t\\\\textent: 10@1;\\\\n\\\\t\\\\tborderWidth: 1;\\\\n\\\\t\\\\tlayoutInset: 0;\\\\n\\\\t\\\\tborderColor: #raised;\\\\n\\\\t\\\\tcolor: color;\\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tvResizing: #rigid.\\\\n\\\\n\\\\tcol := self lastSubmorph.\\\\n\\\\tcol addMorphBack: divider.\\\\n\\\\tcol addMorphBack: r.\\\\n! !\\\\n\\\\n!MidiInputMorph methodsFor: 'as yet unclassified' stamp: 'gm 2/28/2003 00:00'!\\\\natChannel: channelIndex from: aPopUpChoice selectInstrument: selection \\\\n\\\\t| oldSnd name snd instSelector |\\\\n\\\\toldSnd := midiSynth instrumentForChannel: channelIndex.\\\\n\\\\t(selection beginsWith: 'edit ') \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[name := selection copyFrom: 6 to: selection size.\\\\n\\\\t\\\\t\\\\taPopUpChoice contentsClipped: name.\\\\n\\\\t\\\\t\\\\t(oldSnd isKindOf: FMSound) | (oldSnd isKindOf: LoopedSampledSound) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [EnvelopeEditorMorph openOn: oldSnd title: name].\\\\n\\\\t\\\\t\\\\t(oldSnd isKindOf: SampledInstrument) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [EnvelopeEditorMorph openOn: oldSnd allNotes first title: name].\\\\n\\\\t\\\\t\\\\t^self].\\\\n\\\\tsnd := nil.\\\\n\\\\t1 to: instrumentSelector size\\\\n\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t[:i | \\\\n\\\\t\\\\t\\\\t(channelIndex ~= i and: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[(instSelector := instrumentSelector at: i) notNil \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tand: [selection = instSelector contents]]) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [snd := midiSynth instrumentForChannel: i]].\\\\t\\\\\\\"use existing instrument prototype\\\\\\\"\\\\n\\\\tsnd ifNil: \\\\n\\\\t\\\\t\\\\t[snd := (selection = 'clink' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[(SampledSound samples: SampledSound coffeeCupClink samplingRate: 11025)]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [(AbstractSound soundNamed: selection) ])copy ].\\\\n\\\\tmidiSynth instrumentForChannel: channelIndex put: snd.\\\\n\\\\t(instrumentSelector at: channelIndex) contentsClipped: selection! !\\\\n\\\\n!MidiInputMorph methodsFor: 'as yet unclassified' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nchannelNumAndMuteButtonFor: channelIndex\\\\n\\\\n\\\\t| muteButton instSelector r |\\\\n\\\\tmuteButton := SimpleSwitchMorph new\\\\n\\\\t\\\\tonColor: (Color r: 1.0 g: 0.6 b: 0.6);\\\\n\\\\t\\\\toffColor: color;\\\\n\\\\t\\\\tcolor: color;\\\\n\\\\t\\\\tlabel: 'Mute';\\\\n\\\\t\\\\ttarget: midiSynth;\\\\n\\\\t\\\\tactionSelector: #mutedForChannel:put:;\\\\n\\\\t\\\\targuments: (Array with: channelIndex).\\\\n\\\\tinstSelector := PopUpChoiceMorph new\\\\n\\\\t\\\\textent: 95@14;\\\\n\\\\t\\\\tcontentsClipped: 'oboe1';\\\\n\\\\t\\\\ttarget: self;\\\\n\\\\t\\\\tactionSelector: #atChannel:from:selectInstrument:;\\\\n\\\\t\\\\tgetItemsSelector: #instrumentChoicesForChannel:;\\\\n\\\\t\\\\tgetItemsArgs: (Array with: channelIndex).\\\\n\\\\tinstSelector arguments:\\\\n\\\\t\\\\t(Array with: channelIndex with: instSelector).\\\\n\\\\tinstrumentSelector at: channelIndex put: instSelector.\\\\n\\\\n\\\\tr := self makeRow\\\\n\\\\t\\\\thResizing: #rigid;\\\\n\\\\t\\\\tvResizing: #spaceFill;\\\\n\\\\t\\\\textent: 70@10.\\\\n\\\\tr addMorphBack:\\\\n\\\\t\\\\t(StringMorph\\\\n\\\\t\\\\t\\\\tcontents: channelIndex printString\\\\n\\\\t\\\\t\\\\tfont: (TextStyle default fontOfSize: 24)).\\\\n\\\\tchannelIndex < 10\\\\n\\\\t\\\\tifTrue: [r addMorphBack: (Morph new color: color; extent: 19@8)]  \\\\\\\"spacer\\\\\\\"\\\\n\\\\t\\\\tifFalse: [r addMorphBack: (Morph new color: color; extent: 8@8)].  \\\\\\\"spacer\\\\\\\"\\\\n\\\\tr addMorphBack: instSelector.\\\\n\\\\tr addMorphBack: (AlignmentMorph newRow color: color).  \\\\\\\"spacer\\\\\\\"\\\\n\\\\tr addMorphBack: muteButton.\\\\n\\\\t^ r\\\\n! !\\\\n\\\\n!MidiInputMorph methodsFor: 'as yet unclassified' stamp: 'jm 1/13/1999 07:33'!\\\\ncloseMIDIPort\\\\n\\\\n\\\\tmidiSynth isOn ifTrue: [midiSynth stopMIDITracking].\\\\n\\\\tmidiSynth closeMIDIPort.\\\\n! !\\\\n\\\\n!MidiInputMorph methodsFor: 'as yet unclassified' stamp: 'jm 1/6/1999 07:55'!\\\\ndisableReverb: aBoolean\\\\n\\\\n\\\\taBoolean\\\\n\\\\t\\\\tifTrue: [SoundPlayer stopReverb]\\\\n\\\\t\\\\tifFalse: [SoundPlayer startReverb].\\\\n! !\\\\n\\\\n!MidiInputMorph methodsFor: 'as yet unclassified' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ninstrumentChoicesForChannel: channelIndex\\\\n\\\\n\\\\t| names inst |\\\\n\\\\tnames := AbstractSound soundNames asOrderedCollection.\\\\n\\\\tnames := names collect: [:n |\\\\n\\\\t\\\\tinst := AbstractSound soundNamed: n.\\\\n\\\\t\\\\t(inst isKindOf: UnloadedSound)\\\\n\\\\t\\\\t\\\\tifTrue: [n, '(out)']\\\\n\\\\t\\\\t\\\\tifFalse: [n]].\\\\n\\\\tnames add: 'clink'.\\\\n\\\\tnames add: 'edit ', (instrumentSelector at: channelIndex) contents.\\\\n\\\\t^ names asArray\\\\n! !\\\\n\\\\n!MidiInputMorph methodsFor: 'as yet unclassified' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ninvokeMenu\\\\n\\\\t\\\\\\\"Invoke a menu of additonal commands.\\\\\\\"\\\\n\\\\n\\\\t| aMenu |\\\\n\\\\taMenu := CustomMenu new.\\\\n\\\\taMenu add: 'add channel' translated action: #addChannel.\\\\n\\\\taMenu add: 'reload instruments' translated target: AbstractSound selector: #updateScorePlayers.\\\\n\\\\tmidiSynth isOn ifFalse: [\\\\n\\\\t\\\\taMenu add: 'set MIDI port' translated action: #setMIDIPort.\\\\n\\\\t\\\\tmidiSynth midiPort\\\\n\\\\t\\\\t\\\\tifNotNil: [aMenu add: 'close MIDI port' translated action: #closeMIDIPort]].\\\\t\\\\n\\\\taMenu invokeOn: self defaultSelection: nil.\\\\n! !\\\\n\\\\n!MidiInputMorph methodsFor: 'as yet unclassified' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nmakeControls\\\\n\\\\n\\\\t| bb r reverbSwitch onOffSwitch |\\\\n\\\\tbb := SimpleButtonMorph new\\\\n\\\\t\\\\ttarget: self;\\\\n\\\\t\\\\tborderColor: #raised;\\\\n\\\\t\\\\tborderWidth: 2;\\\\n\\\\t\\\\tcolor: color.\\\\n\\\\tr := AlignmentMorph newRow.\\\\n\\\\tr color: bb color; borderWidth: 0; layoutInset: 0.\\\\n\\\\tr hResizing: #shrinkWrap; vResizing: #shrinkWrap; extent: 5@5.\\\\n\\\\tr addMorphBack: (\\\\n\\\\t\\\\tbb label: '<>';\\\\n\\\\t\\\\t\\\\tactWhen: #buttonDown;\\\\n\\\\t\\\\t\\\\tactionSelector: #invokeMenu).\\\\n\\\\tonOffSwitch := SimpleSwitchMorph new\\\\n\\\\t\\\\toffColor: color;\\\\n\\\\t\\\\tonColor: (Color r: 1.0 g: 0.6 b: 0.6);\\\\n\\\\t\\\\tborderWidth: 2;\\\\n\\\\t\\\\tlabel: 'On';\\\\n\\\\t\\\\tactionSelector: #toggleOnOff;\\\\n\\\\t\\\\ttarget: self;\\\\n\\\\t\\\\tsetSwitchState: false.\\\\n\\\\tr addMorphBack: onOffSwitch.\\\\n\\\\treverbSwitch := SimpleSwitchMorph new\\\\n\\\\t\\\\toffColor: color;\\\\n\\\\t\\\\tonColor: (Color r: 1.0 g: 0.6 b: 0.6);\\\\n\\\\t\\\\tborderWidth: 2;\\\\n\\\\t\\\\tlabel: 'Reverb Disable';\\\\n\\\\t\\\\tactionSelector: #disableReverb:;\\\\n\\\\t\\\\ttarget: self;\\\\n\\\\t\\\\tsetSwitchState: SoundPlayer isReverbOn not.\\\\n\\\\tr addMorphBack: reverbSwitch.\\\\n\\\\t^ r\\\\n! !\\\\n\\\\n!MidiInputMorph methodsFor: 'as yet unclassified' stamp: 'ar 11/9/2000 21:19'!\\\\nmakeRow\\\\n\\\\n\\\\t^ AlignmentMorph newRow\\\\n\\\\t\\\\tcolor: color;\\\\n\\\\t\\\\tlayoutInset: 0;\\\\n\\\\t\\\\twrapCentering: #center; cellPositioning: #leftCenter;\\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tvResizing: #shrinkWrap\\\\n! !\\\\n\\\\n!MidiInputMorph methodsFor: 'as yet unclassified' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\npanAndVolControlsFor: channelIndex\\\\n\\\\n\\\\t| volSlider panSlider c r middleLine |\\\\n\\\\tvolSlider := SimpleSliderMorph new\\\\n\\\\t\\\\tcolor: color;\\\\n\\\\t\\\\textent: 101@2;\\\\n\\\\t\\\\ttarget: midiSynth;\\\\n\\\\t\\\\targuments: (Array with: channelIndex);\\\\n\\\\t\\\\tactionSelector: #volumeForChannel:put:;\\\\n\\\\t\\\\tminVal: 0.0;\\\\n\\\\t\\\\tmaxVal: 1.0;\\\\n\\\\t\\\\tadjustToValue: (midiSynth volumeForChannel: channelIndex).\\\\n\\\\tpanSlider := SimpleSliderMorph new\\\\n\\\\t\\\\tcolor: color;\\\\n\\\\t\\\\textent: 101@2;\\\\n\\\\t\\\\ttarget: midiSynth;\\\\n\\\\t\\\\targuments: (Array with: channelIndex);\\\\n\\\\t\\\\tactionSelector: #panForChannel:put:;\\\\n\\\\t\\\\tminVal: 0.0;\\\\n\\\\t\\\\tmaxVal: 1.0;\\\\t\\\\t\\\\n\\\\t\\\\tadjustToValue: (midiSynth panForChannel: channelIndex).\\\\n\\\\tc := AlignmentMorph newColumn\\\\n\\\\t\\\\tcolor: color;\\\\n\\\\t\\\\tlayoutInset: 0;\\\\n\\\\t\\\\twrapCentering: #center; cellPositioning: #topCenter;\\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tvResizing: #shrinkWrap.\\\\n\\\\tmiddleLine := Morph new  \\\\\\\"center indicator for pan slider\\\\\\\"\\\\n\\\\t\\\\tcolor: (Color r: 0.4 g: 0.4 b: 0.4);\\\\n\\\\t\\\\textent: 1@(panSlider height - 4);\\\\n\\\\t\\\\tposition: panSlider center x@(panSlider top + 2).\\\\n\\\\tpanSlider addMorphBack: middleLine.\\\\n\\\\tr := self makeRow.\\\\n\\\\tr addMorphBack: (StringMorph contents: '0').\\\\n\\\\tr addMorphBack: volSlider.\\\\n\\\\tr addMorphBack: (StringMorph contents: '10').\\\\n\\\\tc addMorphBack: r.\\\\n\\\\tr := self makeRow.\\\\n\\\\tr addMorphBack: (StringMorph contents: 'L').\\\\n\\\\tr addMorphBack: panSlider.\\\\n\\\\tr addMorphBack: (StringMorph contents: 'R').\\\\n\\\\tc addMorphBack: r.\\\\n\\\\t^ c\\\\n! !\\\\n\\\\n!MidiInputMorph methodsFor: 'as yet unclassified' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nsetMIDIPort\\\\n\\\\n\\\\t| portNum |\\\\n\\\\tportNum := SimpleMIDIPort outputPortNumFromUser.\\\\n\\\\tportNum ifNil: [^ self].\\\\n\\\\tmidiPortNumber := portNum.\\\\n! !\\\\n\\\\n!MidiInputMorph methodsFor: 'as yet unclassified' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ntoggleOnOff\\\\n\\\\n\\\\tmidiSynth isOn\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\tmidiSynth stopMIDITracking]\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\tmidiPortNumber ifNil: [self setMIDIPort].\\\\n\\\\t\\\\t\\\\tmidiPortNumber ifNil: [midiPortNumber := 0].\\\\n\\\\t\\\\t\\\\tmidiSynth midiPort: (SimpleMIDIPort openOnPortNumber: midiPortNumber).\\\\n\\\\t\\\\t\\\\tmidiSynth startMIDITracking].\\\\n! !\\\\n\\\\n!MidiInputMorph methodsFor: 'as yet unclassified' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nupdateInstrumentsFromLibraryExcept: soundsBeingEdited\\\\n\\\\t\\\\\\\"The instrument library has been modified. Update my instruments with the new versions from the library. Use a single instrument prototype for all parts with the same name; this allows the envelope editor to edit all the parts by changing a single sound prototype.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"soundsBeingEdited is a collection of sounds being edited (by an EnvelopeEditor).  If any of my instruments share one of these, then they will be left alone so as not to disturb that dynamic linkage.\\\\\\\"\\\\n\\\\n\\\\t| unloadPostfix myInstruments name displaysAsUnloaded isUnloaded |\\\\n\\\\tunloadPostfix := '(out)'.\\\\n\\\\tmyInstruments := Dictionary new.\\\\n\\\\t1 to: instrumentSelector size do: [:i |\\\\n\\\\t\\\\tname := (instrumentSelector at: i) contents.\\\\n\\\\t\\\\tdisplaysAsUnloaded := name endsWith: unloadPostfix.\\\\n\\\\t\\\\tdisplaysAsUnloaded ifTrue: [\\\\n\\\\t\\\\t\\\\tname := name copyFrom: 1 to: name size - unloadPostfix size].\\\\n\\\\t\\\\t(myInstruments includesKey: name) ifFalse: [\\\\n\\\\t\\\\t\\\\tmyInstruments at: name put:\\\\n\\\\t\\\\t\\\\t\\\\t(name = 'clink'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(SampledSound\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsamples: SampledSound coffeeCupClink\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsamplingRate: 11025) copy]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(AbstractSound\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsoundNamed: name\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifAbsent: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(instrumentSelector at: i) contentsClipped: 'default'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tFMSound default]) copy])].\\\\n\\\\t\\\\t(soundsBeingEdited includes: (midiSynth instrumentForChannel: i)) ifFalse:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"Do not update any instrument that is currently being edited\\\\\\\"\\\\n\\\\t\\\\t\\\\tmidiSynth instrumentForChannel: i put: (myInstruments at: name)].\\\\n\\\\n\\\\t\\\\t\\\\\\\"update loaded/unloaded status in instrumentSelector if necessary\\\\\\\"\\\\n\\\\t\\\\tisUnloaded := (myInstruments at: name) isKindOf: UnloadedSound.\\\\n\\\\t\\\\t(displaysAsUnloaded and: [isUnloaded not])\\\\n\\\\t\\\\t\\\\tifTrue: [(instrumentSelector at: i) contentsClipped: name].\\\\n\\\\t\\\\t(displaysAsUnloaded not and: [isUnloaded])\\\\n\\\\t\\\\t\\\\tifTrue: [(instrumentSelector at: i) contentsClipped: name, unloadPostfix]].\\\\n! !\\\\n\\\\n\\\\n!MidiInputMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:38'!\\\\ndefaultBorderWidth\\\\n\\\\t\\\\\\\"answer the default border width for the receiver\\\\\\\"\\\\n\\\\t^ 2! !\\\\n\\\\n!MidiInputMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:28'!\\\\ndefaultColor\\\\n\\\\t\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color veryLightGray! !\\\\n\\\\n!MidiInputMorph methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ninitialize\\\\n\\\\t\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tself listDirection: #topToBottom;\\\\n\\\\t  wrapCentering: #center;\\\\n\\\\t\\\\t cellPositioning: #topCenter;\\\\n\\\\t  hResizing: #spaceFill;\\\\n\\\\t  vResizing: #spaceFill;\\\\n\\\\t  layoutInset: 3.\\\\n\\\\tmidiPortNumber := nil.\\\\n\\\\tmidiSynth := MIDISynth new.\\\\n\\\\tinstrumentSelector := Array new: 16.\\\\n\\\\tself removeAllMorphs.\\\\n\\\\tself addMorphBack: self makeControls.\\\\n\\\\tself addMorphBack: (AlignmentMorph newColumn color: color;\\\\n\\\\t\\\\t\\\\t layoutInset: 0).\\\\n\\\\tself addChannelControlsFor: 1.\\\\n\\\\tself extent: 20 @ 20! !\\\\nObject subclass: #MidiPrimTester\\\\n\\\\tinstanceVariableNames: 'port'\\\\n\\\\tclassVariableNames: 'CanSetClock CanUseSemaphore ClockTicksPerSec EchoOn EventsAvailable FlushDriver HasBuffer HasDurs HasInputClock Installed UseControllerCache Version'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Serial Port'!\\\\n!MidiPrimTester commentStamp: '<historical>' prior: 0!\\\\nThis class simply demonstrates and tests the MIDI primitives. MIDI applications should use Stephen Pope's MIDIPort class, which will replace this one.\\\\n\\\\nThe Macintosh, and perhaps some other platforms, can send and receive MIDI data over a serial port by using an external clock signal supplied by an external MIDI adapter to generate the correct MIDI baud rate. Typical clock speeds of such adapters are 1, 2, or 0.5 MHz. This clock speed can be specified when a MIDI port is opened. On other platforms, this clock speed parameter is ignored.\\\\n!\\\\n\\\\n\\\\n!MidiPrimTester methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimMIDIClosePort: portNum\\\\n\\\\n\\\\t<primitive: 'primitiveMIDIClosePort' module: 'MIDIPlugin'>\\\\n\\\\tself primitiveFailed.\\\\n! !\\\\n\\\\n!MidiPrimTester methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimMIDIGetClock\\\\n\\\\n\\\\t<primitive: 'primitiveMIDIGetClock' module: 'MIDIPlugin'>\\\\n\\\\tself primitiveFailed.\\\\n! !\\\\n\\\\n!MidiPrimTester methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimMIDIGetPortCount\\\\n\\\\n\\\\t<primitive: 'primitiveMIDIGetPortCount' module: 'MIDIPlugin'>\\\\n\\\\tself primitiveFailed.\\\\n! !\\\\n\\\\n!MidiPrimTester methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimMIDIGetPortDirectionality: portNum\\\\n\\\\n\\\\t<primitive: 'primitiveMIDIGetPortDirectionality' module: 'MIDIPlugin'>\\\\n\\\\tself primitiveFailed.\\\\n! !\\\\n\\\\n!MidiPrimTester methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimMIDIGetPortName: portNum\\\\n\\\\n\\\\t<primitive: 'primitiveMIDIGetPortName' module: 'MIDIPlugin'>\\\\n\\\\tself primitiveFailed.\\\\n! !\\\\n\\\\n!MidiPrimTester methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimMIDIOpenPort: portNum readSemaIndex: readSemaIndex interfaceClockRate: interfaceClockRate\\\\n\\\\t\\\\\\\"Open the given MIDI port. If non-zero, readSemaIndex specifies the index in the external objects array of a semaphore to be signalled when incoming MIDI data is available. Not all platforms support signalling the read semaphore. InterfaceClockRate specifies the clock rate of the external MIDI interface adaptor on Macintosh computers; it is ignored on other platforms.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveMIDIOpenPort' module: 'MIDIPlugin'>\\\\n\\\\tself primitiveFailed.\\\\n! !\\\\n\\\\n!MidiPrimTester methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimMIDIParameterGet: whichParameter\\\\n\\\\n\\\\t<primitive: 'primitiveMIDIParameterGetOrSet' module: 'MIDIPlugin'>\\\\n\\\\tself primitiveFailed.\\\\n! !\\\\n\\\\n!MidiPrimTester methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimMIDIParameterSet: whichParameter to: newValue\\\\n\\\\n\\\\t<primitive: 'primitiveMIDIParameterGetOrSet' module: 'MIDIPlugin'>\\\\n\\\\tself primitiveFailed.\\\\n! !\\\\n\\\\n!MidiPrimTester methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimMIDIReadPort: portNum into: byteArray\\\\n\\\\n\\\\t<primitive: 'primitiveMIDIRead' module: 'MIDIPlugin'>\\\\n\\\\tself primitiveFailed.\\\\n! !\\\\n\\\\n!MidiPrimTester methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimMIDIWritePort: portNum from: byteArray at: midiClockValue\\\\n\\\\n\\\\t<primitive: 'primitiveMIDIWrite' module: 'MIDIPlugin'>\\\\n\\\\tself primitiveFailed.\\\\n! !\\\\n\\\\n\\\\n!MidiPrimTester methodsFor: 'tests' stamp: 'jm 5/18/1998 10:30'!\\\\ngetDriverParameters\\\\n\\\\t\\\\\\\"Return a string that describes this platform's MIDI parameters.\\\\\\\"\\\\n\\\\t\\\\\\\"MidiPrimTester new getDriverParameters\\\\\\\"\\\\n\\\\n\\\\t| s parameterNames v |\\\\n\\\\tparameterNames _ #(Installed Version HasBuffer HasDurs CanSetClock CanUseSemaphore EchoOn UseControllerCache EventsAvailable FlushDriver ClockTicksPerSec HasInputClock).\\\\n\\\\n\\\\ts _ WriteStream on: String new.\\\\n\\\\ts cr.\\\\n\\\\t1 to: parameterNames size do: [:i |\\\\n\\\\t\\\\tv _ self primMIDIParameterGet: i.\\\\n\\\\t\\\\ts nextPutAll: (parameterNames at: i).\\\\n\\\\t\\\\ts nextPutAll: ' = '.\\\\n\\\\t\\\\ts print: v; cr].\\\\n\\\\n\\\\ts nextPutAll: 'MIDI Echoing is '.\\\\n\\\\t(self canTurnOnParameter: EchoOn)\\\\n\\\\t\\\\tifTrue: [s nextPutAll: 'supported.'; cr]\\\\n\\\\t\\\\tifFalse: [s nextPutAll: 'not supported.'; cr].\\\\n\\\\n\\\\ts nextPutAll: 'Controller Caching is '.\\\\n\\\\t(self canTurnOnParameter: UseControllerCache)\\\\n\\\\t\\\\tifTrue: [s nextPutAll: 'supported.'; cr]\\\\n\\\\t\\\\tifFalse: [s nextPutAll: 'not supported.'; cr].\\\\n\\\\n\\\\t^ s contents\\\\n! !\\\\n\\\\n!MidiPrimTester methodsFor: 'tests' stamp: 'jm 5/18/1998 15:33'!\\\\ngetInputForSeconds: seconds onPort: portNum\\\\n\\\\t\\\\\\\"Collect MIDI input from the given port for the given number of seconds, and answer a string describing the data read.\\\\\\\"\\\\n\\\\t\\\\\\\"MidiPrimTester new getInputForSeconds: 5 onPort: 0\\\\\\\"\\\\n\\\\n\\\\t| buf bufList endTime n midiStartTime s t |\\\\n\\\\t\\\\\\\"collect the data\\\\\\\"\\\\n\\\\tself openPort: portNum andDo: [\\\\n\\\\t\\\\tbuf _ ByteArray new: 1000.\\\\n\\\\t\\\\tbufList _ OrderedCollection new.\\\\n\\\\t\\\\tmidiStartTime _ self primMIDIGetClock.\\\\n\\\\t\\\\tendTime _ Time millisecondClockValue + (seconds * 1000).\\\\n\\\\t\\\\t[Time millisecondClockValue < endTime] whileTrue: [\\\\n\\\\t\\\\t\\\\tn _ self primMIDIReadPort: portNum into: buf.\\\\n\\\\t\\\\t\\\\tn > 0 ifTrue: [bufList add: (buf copyFrom: 1 to: n)].\\\\n\\\\t\\\\t\\\\t(Delay forMilliseconds: 5) wait]].\\\\n\\\\n\\\\t\\\\\\\"format the data into a string\\\\\\\"\\\\n\\\\ts _ WriteStream on: String new.\\\\n\\\\ts cr.\\\\n\\\\tbufList do: [:b |\\\\n\\\\t\\\\tt _ (self bufferTimeStampFrom: b) - midiStartTime.\\\\n\\\\t\\\\ts print: t.\\\\n\\\\t\\\\ts nextPutAll: ': '.\\\\n\\\\t\\\\t5 to: b size do: [:i | s print: (b at: i); space].\\\\n\\\\t\\\\ts cr].\\\\n\\\\t^ s contents\\\\n! !\\\\n\\\\n!MidiPrimTester methodsFor: 'tests' stamp: 'jm 5/18/1998 10:05'!\\\\ngetPortList\\\\n\\\\t\\\\\\\"Return a string that describes this platform's MIDI ports.\\\\\\\"\\\\n\\\\t\\\\\\\"MidiPrimTester new getPortList\\\\\\\"\\\\n\\\\n\\\\t| s portCount dir directionString |\\\\n\\\\ts _ WriteStream on: String new.\\\\n\\\\ts cr; nextPutAll: 'MIDI Ports:'; cr.\\\\n\\\\tportCount _ self primMIDIGetPortCount.\\\\n\\\\t0 to: portCount - 1 do: [:i |\\\\n\\\\t\\\\ts tab.\\\\n\\\\t\\\\ts print: i; nextPutAll: ': '. \\\\n\\\\t\\\\ts nextPutAll: (self primMIDIGetPortName: i).\\\\n\\\\t\\\\tdir _ self primMIDIGetPortDirectionality: i.\\\\n\\\\t\\\\tdirectionString _ dir printString.  \\\\\\\"default\\\\\\\"\\\\n\\\\t\\\\tdir = 1 ifTrue: [directionString _ '(in)'].\\\\n\\\\t\\\\tdir = 2 ifTrue: [directionString _ '(out)'].\\\\n\\\\t\\\\tdir = 3 ifTrue: [directionString _ '(in/out)'].\\\\n\\\\t\\\\ts space; nextPutAll: directionString; cr].\\\\n\\\\t^ s contents\\\\n! !\\\\n\\\\n!MidiPrimTester methodsFor: 'tests' stamp: 'jm 5/18/1998 11:24'!\\\\nplayDrumRoll: mSecsBetweenNotes count: tapCount onPort: portNum\\\\n\\\\t\\\\\\\"MidiPrimTester new playDrumRoll: 75 count: 64 onPort: 0\\\\\\\"\\\\n\\\\t\\\\\\\"Play middle-C tapCount times with the given space between notes. This example works best with a short percussive voice, like a drum.\\\\\\\"\\\\n\\\\t\\\\\\\"Details: This test can be used to investigate the real-time performance of your system. On a 110 MHz PowerPC Mac, this method can genererate very fast and smooth drum rolls up to about 100 beats/sec (10 mSecs between notes). However, many factors can prevent one from seeing this level of performance including a slow CPU, lack of a level-2 cache, networking or other background processes stealing chunks of processor time from Squeak, or a sluggish MIDI synthesizer.\\\\\\\"\\\\n\\\\t\\\\\\\"Details: By default, this method does an incremental GC on every note. While not really needed for this example, it illustrates a useful technique for real-time processing in Squeak: do an incremental GC when you know you have a few milliseconds of idle time to avoid triggering one during a time-critical task. In this case, we're also using the GC time to provide a small delay between the note-on and note-off events. If the GC time is too short, as it could be on a fast machine, the note may not sound at all unless you add a few milliseconds of additional delay!!\\\\\\\"\\\\n\\\\t\\\\\\\"Note: This example works best if the VM's millisecond clock has 1 millisecond resolution.\\\\\\\"\\\\n\\\\n\\\\t| gcDuringNote noteOn noteOff endTime waitTime |\\\\n\\\\tgcDuringNote _ true.\\\\n\\\\t\\\\\\\"these events use running status, so the command byte is omitted\\\\\\\"\\\\n\\\\tnoteOn _ #(60 100) as: ByteArray.\\\\n\\\\tnoteOff _ #(60 0) as: ByteArray.\\\\n\\\\tself primMIDIOpenPort: portNum readSemaIndex: 0 interfaceClockRate: 1000000.\\\\n\\\\n\\\\t\\\\\\\"send an initial event with command byte to initiate running status\\\\\\\"\\\\n\\\\tself primMIDIWritePort: portNum from: (#(144 60 0) as: ByteArray) at: 0.\\\\n\\\\n\\\\t1 to: tapCount do: [:i |\\\\n\\\\t\\\\tendTime _ Time millisecondClockValue + mSecsBetweenNotes.\\\\n\\\\t\\\\tself primMIDIWritePort: portNum from: noteOn at: 0.\\\\n\\\\t\\\\tgcDuringNote\\\\n\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"do quick GC; takes a few milliseconds and provides the note-down time\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"Note: if GC is too fast on your machine, you need to add a few mSecs delay!!\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tSmalltalk garbageCollectMost]\\\\n\\\\t\\\\t\\\\tifFalse: [(Delay forMilliseconds: 3) wait].\\\\n\\\\n\\\\t\\\\tself primMIDIWritePort: portNum from: noteOff at: 0.\\\\n\\\\t\\\\twaitTime _ endTime - Time millisecondClockValue.\\\\n\\\\t\\\\twaitTime > 0 ifTrue: [(Delay forMilliseconds: waitTime) wait]].\\\\n\\\\n\\\\tself primMIDIClosePort: portNum.\\\\n! !\\\\n\\\\n!MidiPrimTester methodsFor: 'tests' stamp: 'jm 5/18/1998 15:16'!\\\\nplayNoteOnPort: portNum\\\\n\\\\t\\\\\\\"MidiPrimTester new playNoteOnPort: 0\\\\\\\"\\\\n\\\\n\\\\t| noteOn noteOff bytesWritten |\\\\n\\\\tnoteOn _ #(144 60 100) as: ByteArray.\\\\n\\\\tnoteOff _ #(144 60 0) as: ByteArray.\\\\n\\\\tself openPort: portNum andDo: [\\\\n\\\\t\\\\tbytesWritten _ self primMIDIWritePort: portNum from: noteOn at: 0.\\\\n\\\\t\\\\t(Delay forMilliseconds: 500) wait.\\\\n\\\\t\\\\tbytesWritten _ bytesWritten + (self primMIDIWritePort: portNum from: noteOff at: 0)].\\\\n\\\\n\\\\tbytesWritten = 6 ifFalse: [self error: 'not all bytes were sent'].\\\\n! !\\\\n\\\\n!MidiPrimTester methodsFor: 'tests' stamp: 'jm 5/18/1998 15:17'!\\\\nplayScale: mSecsPerNote onPort: portNum\\\\n\\\\t\\\\\\\"MidiPrimTester new playScale: 130 onPort: 0\\\\\\\"\\\\n\\\\n\\\\t| noteOn noteOff |\\\\n\\\\tnoteOn _ #(144 0 100) as: ByteArray.\\\\n\\\\tnoteOff _ #(144 0 0) as: ByteArray.\\\\n\\\\tself openPort: portNum andDo: [\\\\n\\\\t\\\\t#(60 62 64 65 67 69 71 72 74 72 71 69 67 65 64 62 60) do: [:midiKey | \\\\n\\\\t\\\\t\\\\tnoteOn at: 2 put: midiKey.\\\\n\\\\t\\\\t\\\\tnoteOff at: 2 put: midiKey.\\\\n\\\\t\\\\t\\\\tself primMIDIWritePort: portNum from: noteOn at: 0.\\\\n\\\\t\\\\t\\\\t(Delay forMilliseconds: mSecsPerNote - 10) wait.\\\\n\\\\t\\\\t\\\\tself primMIDIWritePort: portNum from: noteOff at: 0.\\\\n\\\\t\\\\t\\\\t(Delay forMilliseconds: 10) wait]].\\\\n! !\\\\n\\\\n\\\\n!MidiPrimTester methodsFor: 'private' stamp: 'jm 5/18/1998 12:48'!\\\\nbufferTimeStampFrom: aByteArray\\\\n\\\\t\\\\\\\"Return the timestamp from the given MIDI input buffer. Assume the given buffer is at least 4 bytes long.\\\\\\\"\\\\n\\\\n\\\\t^ ((aByteArray at: 1) bitShift: 24) +\\\\n\\\\t  ((aByteArray at: 2) bitShift: 16) +\\\\n\\\\t  ((aByteArray at: 3) bitShift: 8) +\\\\n\\\\t   (aByteArray at: 4)\\\\n! !\\\\n\\\\n!MidiPrimTester methodsFor: 'private' stamp: 'jm 5/18/1998 12:48'!\\\\ncanTurnOnParameter: whichParameter\\\\n\\\\t\\\\\\\"Return true if the given MIDI parameter can be turned on. Leave the parameter in its orginal state.\\\\\\\"\\\\n\\\\n\\\\t| old canSet |\\\\n\\\\told _ self primMIDIParameterGet: whichParameter.\\\\n\\\\tself primMIDIParameterSet: whichParameter to: 1.\\\\n\\\\tcanSet _ (self primMIDIParameterGet: whichParameter) = 1.\\\\n\\\\tself primMIDIParameterSet: whichParameter to: old.\\\\n\\\\t^ canSet\\\\n! !\\\\n\\\\n!MidiPrimTester methodsFor: 'private' stamp: 'jm 5/18/1998 15:32'!\\\\nopenPort: portNum andDo: aBlock\\\\n\\\\t\\\\\\\"Open the given MIDI port, evaluate the block, and close the port again. Answer the value of the block.\\\\\\\"\\\\n\\\\n\\\\t| result |\\\\n\\\\tself primMIDIClosePort: portNum.\\\\n\\\\tself primMIDIOpenPort: portNum readSemaIndex: 0 interfaceClockRate: 1000000.\\\\n\\\\tresult _ aBlock value.\\\\n\\\\tself primMIDIClosePort: portNum.\\\\n\\\\t^ result\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMidiPrimTester class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MidiPrimTester class methodsFor: 'class initialization' stamp: 'yo 12/3/2004 17:05'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Initialize the MIDI parameter constants.\\\\\\\"\\\\n\\\\t\\\\\\\"MidiPrimTester initialize\\\\\\\"\\\\n\\\\n\\\\tInstalled _ 1.\\\\n\\\\t\\\\t\\\\\\\"Read-only. Return 1 if a MIDI driver is installed, 0 if not.\\\\n\\\\t\\\\t On OMS-based MIDI drivers, this returns 1 only if the OMS\\\\n\\\\t\\\\t system is properly installed and configured.\\\\\\\"\\\\n\\\\n\\\\tVersion _ 2.\\\\n\\\\t\\\\t\\\\\\\"Read-only. Return the integer version number of this MIDI driver.\\\\n\\\\t\\\\t The version numbering sequence is relative to a particular driver.\\\\n\\\\t\\\\t That is, version 3 of the Macintosh MIDI driver is not necessarily\\\\n\\\\t\\\\t related to version 3 of the Win95 MIDI driver.\\\\\\\"\\\\n\\\\n\\\\tHasBuffer _ 3.\\\\n\\\\t\\\\t\\\\\\\"Read-only. Return 1 if this MIDI driver has a time-stamped output\\\\n\\\\t\\\\t buffer, 0 otherwise. Such a buffer allows the client to schedule\\\\n\\\\t\\\\t MIDI output packets to be sent later. This can allow more precise\\\\n\\\\t\\\\t timing, since the driver uses timer interrupts to send the data\\\\n\\\\t\\\\t at the right time even if the processor is in the midst of a\\\\n\\\\t\\\\t long-running Squeak primitive or is running some other application\\\\n\\\\t\\\\t or system task.\\\\\\\"\\\\n\\\\n\\\\tHasDurs _ 4.\\\\n\\\\t\\\\t\\\\\\\"Read-only. Return 1 if this MIDI driver supports an extended\\\\n\\\\t\\\\t primitive for note-playing that includes the note duration and\\\\n\\\\t\\\\t schedules both the note-on and the note-off messages in the\\\\n\\\\t\\\\t driver. Otherwise, return 0.\\\\\\\"\\\\n\\\\n\\\\tCanSetClock _ 5.\\\\n\\\\t\\\\t\\\\\\\"Read-only. Return 1 if this MIDI driver's clock can be set\\\\n\\\\t\\\\t via an extended primitive, 0 if not.\\\\\\\"\\\\n\\\\n\\\\tCanUseSemaphore _ 6.\\\\n\\\\t\\\\t\\\\\\\"Read-only. Return 1 if this MIDI driver can signal a semaphore\\\\n\\\\t\\\\t when MIDI input arrives. Otherwise, return 0. If this driver\\\\n\\\\t\\\\t supports controller caching and it is enabled, then incoming\\\\n\\\\t\\\\t controller messages will not signal the semaphore.\\\\\\\"\\\\n\\\\n\\\\tEchoOn _ 7.\\\\n\\\\t\\\\t\\\\\\\"Read-write. If this flag is set to a non-zero value, and if\\\\n\\\\t\\\\t the driver supports echoing, then incoming MIDI events will\\\\n\\\\t\\\\t be echoed immediately. If this driver does not support echoing,\\\\n\\\\t\\\\t then queries of this parameter will always return 0 and\\\\n\\\\t\\\\t attempts to change its value will do nothing.\\\\\\\"\\\\n\\\\n\\\\tUseControllerCache _ 8.\\\\n\\\\t\\\\t\\\\\\\"Read-write. If this flag is set to a non-zero value, and if\\\\n\\\\t\\\\t the driver supports a controller cache, then the driver will\\\\n\\\\t\\\\t maintain a cache of the latest value seen for each MIDI controller,\\\\n\\\\t\\\\t and control update messages will be filtered out of the incoming\\\\n\\\\t\\\\t MIDI stream. An extended MIDI primitive allows the client to\\\\n\\\\t\\\\t poll the driver for the current value of each controller. If\\\\n\\\\t\\\\t this driver does not support a controller cache, then queries\\\\n\\\\t\\\\t of this parameter will always return 0 and attempts to change\\\\n\\\\t\\\\t its value will do nothing.\\\\\\\"\\\\n\\\\n\\\\tEventsAvailable _ 9.\\\\n\\\\t\\\\t\\\\\\\"Read-only. Return the number of MIDI packets in the input queue.\\\\\\\"\\\\n\\\\n\\\\tFlushDriver _ 10.\\\\n\\\\t\\\\t\\\\\\\"Write-only. Setting this parameter to any value forces the driver\\\\n\\\\t\\\\t to flush its I/0 buffer, discarding all unprocessed data. Reading\\\\n\\\\t\\\\t this parameter returns 0. Setting this parameter will do nothing\\\\n\\\\t\\\\t if the driver does not support buffer flushing.\\\\\\\"\\\\n\\\\n\\\\tClockTicksPerSec _ 11.\\\\n\\\\t\\\\t\\\\\\\"Read-only. Return the MIDI clock rate in ticks per second.\\\\\\\"\\\\n\\\\n\\\\tHasInputClock _ 12.\\\\n\\\\t\\\\t\\\\\\\"Read-only. Return 1 if this MIDI driver timestamps incoming\\\\n\\\\t\\\\t MIDI data with the current value of the MIDI clock, 0 otherwise.\\\\n\\\\t\\\\t If the driver does not support such timestamping, then the\\\\n\\\\t\\\\t client must read input data frequently and provide its own\\\\n\\\\t\\\\t timestamping.\\\\\\\"\\\\n! !\\\\nObject subclass: #MimeConverter\\\\n\\\\tinstanceVariableNames: 'dataStream mimeStream'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Collections-Streams'!\\\\n\\\\n!MimeConverter methodsFor: 'accessing' stamp: 'tk 12/9/97 13:55'!\\\\ndataStream\\\\n\\\\t^dataStream! !\\\\n\\\\n!MimeConverter methodsFor: 'accessing' stamp: 'tk 12/9/97 13:51'!\\\\ndataStream: anObject\\\\n\\\\tdataStream _ anObject! !\\\\n\\\\n!MimeConverter methodsFor: 'accessing' stamp: 'tk 12/9/97 13:53'!\\\\nmimeStream\\\\n\\\\t^mimeStream! !\\\\n\\\\n!MimeConverter methodsFor: 'accessing' stamp: 'tk 12/9/97 13:51'!\\\\nmimeStream: anObject\\\\n\\\\tmimeStream _ anObject! !\\\\n\\\\n\\\\n!MimeConverter methodsFor: 'conversion' stamp: 'bf 11/12/1998 13:30'!\\\\nmimeDecode\\\\n\\\\t\\\\\\\"Do conversion reading from mimeStream writing to dataStream\\\\\\\"\\\\n\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n!MimeConverter methodsFor: 'conversion' stamp: 'bf 11/12/1998 13:31'!\\\\nmimeEncode\\\\n\\\\t\\\\\\\"Do conversion reading from dataStream writing to mimeStream\\\\\\\"\\\\n\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMimeConverter class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MimeConverter class methodsFor: 'convenience' stamp: 'bf 3/10/2000 14:47'!\\\\nforEncoding: encodingString\\\\n\\\\t\\\\\\\"Answer a converter class for the given encoding or nil if unknown\\\\\\\"\\\\n\\\\tencodingString ifNil: [^nil].\\\\n\\\\t^ encodingString asLowercase caseOf: \\\\n\\\\t\\\\t{ ['base64'] -> [Base64MimeConverter].\\\\n\\\\t\\\\t  ['quoted-printable'] -> [QuotedPrintableMimeConverter]}\\\\n\\\\t\\\\totherwise: [].\\\\n! !\\\\n\\\\n!MimeConverter class methodsFor: 'convenience' stamp: 'bf 3/10/2000 14:43'!\\\\nmimeDecode: aStringOrStream as: contentsClass\\\\n\\\\t^ contentsClass streamContents: [:out |\\\\n\\\\t\\\\tself mimeDecode: aStringOrStream to: out]! !\\\\n\\\\n!MimeConverter class methodsFor: 'convenience' stamp: 'bf 3/10/2000 14:40'!\\\\nmimeDecode: aStringOrStream to: outStream\\\\n\\\\tself new\\\\n\\\\t\\\\tmimeStream: (aStringOrStream isStream\\\\n\\\\t\\\\t\\\\tifTrue: [aStringOrStream]\\\\n\\\\t\\\\t\\\\tifFalse: [ReadStream on: aStringOrStream]);\\\\n\\\\t\\\\tdataStream: outStream;\\\\n\\\\t\\\\tmimeDecode! !\\\\n\\\\n!MimeConverter class methodsFor: 'convenience' stamp: 'bf 3/10/2000 14:40'!\\\\nmimeEncode: aCollectionOrStream\\\\n\\\\t^ String streamContents: [:out |\\\\n\\\\t\\\\tself mimeEncode: aCollectionOrStream to: out]! !\\\\n\\\\n!MimeConverter class methodsFor: 'convenience' stamp: 'bf 3/10/2000 14:40'!\\\\nmimeEncode: aCollectionOrStream to: outStream\\\\n\\\\tself new\\\\n\\\\t\\\\tdataStream: (aCollectionOrStream isStream\\\\n\\\\t\\\\t\\\\tifTrue: [aCollectionOrStream]\\\\n\\\\t\\\\t\\\\tifFalse: [ReadStream on: aCollectionOrStream]);\\\\n\\\\t\\\\tmimeStream: outStream;\\\\n\\\\t\\\\tmimeEncode! !\\\\nPolygonMorph subclass: #MixedCurveMorph\\\\n\\\\tinstanceVariableNames: 'slopeClamps'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Basic-NewCurve'!\\\\n!MixedCurveMorph commentStamp: '<historical>' prior: 0!\\\\nA MixedCurveMorph is Curve that can be broken up into separately curved segments. It allows for the creation of matching edges( e. g. for jigsaw puzzle pieces).\\\\n\\\\nInstance Variables\\\\n\\\\tslopeClamps:\\\\t\\\\t<Array>\\\\n\\\\nslopeClamps\\\\n\\\\t- elements of array are either 0 or nil. Indicating whether slope for the corresponding vertex is 0@0 or unknown and therefore to be calculated. There is one element for each vertex.\\\\n\\\\t\\\\n\\\\t\\\\n!\\\\n\\\\n\\\\n!MixedCurveMorph methodsFor: 'access' stamp: 'wiz 2/8/2006 18:59'!\\\\nclamps\\\\n\\\\\\\" Return a collection of clamps the same size as vertices.\\\\n\\\\tIf necessary default to unclamped slopes.\\\\n\\\\\\\"\\\\n\\\\nslopeClamps \\\\n\\\\tifNil:   [ ^ slopeClamps := Array new: vertices size  ] .\\\\nslopeClamps size = vertices size\\\\n\\\\tifFalse: [ ^ slopeClamps := Array new: vertices size  ] . \\\\n\\\\t^ slopeClamps           ! !\\\\n\\\\n!MixedCurveMorph methodsFor: 'access' stamp: 'wiz 2/8/2006 17:44'!\\\\nhandleColorAt: vertIndex\\\\n      \\\\\\\" clamped handles are cyan     and \\\\n\\\\tunclamped handles are yellow.\\\\\\\"\\\\n\\\\n(self clamps at: vertIndex ) ifNil: [ ^ Color yellow ] .\\\\n^ Color cyan \\\\n! !\\\\n\\\\n\\\\n!MixedCurveMorph methodsFor: 'editing' stamp: 'wiz 2/8/2006 17:50'!\\\\nclickVertex: ix event: evt fromHandle: handle\\\\n\\\\\\\" Toggle the state of the clamp. \\\\\\\"\\\\n\\\\\\\"Note: self clamps assures slopeClamps will be same size as vertices\\\\\\\"\\\\n\\\\n(self clamps at: ix) \\\\n\\\\tifNil:\\\\t [ slopeClamps  at: ix put: 0 ]\\\\n\\\\tifNotNil: [ slopeClamps  at: ix put: nil ] .\\\\n\\\\tself setVertices: vertices .\\\\n\\\\t\\\\n! !\\\\n\\\\n!MixedCurveMorph methodsFor: 'editing' stamp: 'wiz 2/8/2006 18:01'!\\\\ndeleteVertexAt: anIndex\\\\n\\\\t\\\\t\\\\t(slopeClamps :=\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tslopeClamps\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcopyReplaceFrom: anIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tto: anIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twith: Array new) .\\\\n\\\\t\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\t\\\\tsetVertices: (vertices\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcopyReplaceFrom: anIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tto: anIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twith: Array new).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t! !\\\\n\\\\n!MixedCurveMorph methodsFor: 'editing' stamp: 'wiz 2/8/2006 18:29'!\\\\ninsertVertexAt: anIndex put: aValue\\\\n\\\\t\\\\\\\"New vertexs are unclamped.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: order is important. \\\\n\\\\tThe clamps array must match vertex size before setVertices: is performed.\\\\\\\"\\\\n\\\\tslopeClamps := slopeClamps \\\\n\\\\t\\\\tcopyReplaceFrom: anIndex + 1 to: anIndex with: (Array with: nil).\\\\n\\\\tself setVertices: (vertices copyReplaceFrom: anIndex + 1 to: anIndex \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twith: (Array with: aValue)).! !\\\\n\\\\n\\\\n!MixedCurveMorph methodsFor: 'initialization' stamp: 'wiz 2/12/2006 05:59'!\\\\ninitialize\\\\n\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\tself extent: 32@20 .\\\\n\\\\n\\\\tself rectOval.\\\\n\\\\tself clamps . \\\\\\\"This initializes slopeClamps.\\\\\\\"\\\\n\\\\tslopeClamps at: 1 put: 0 .\\\\n\\\\tslopeClamps at: 4 put: 0 .\\\\n\\\\t\\\\n\\\\tclosed _ true.\\\\n\\\\tsmoothCurve _ true.\\\\n\\\\tarrows _ #none.\\\\n\\\\tself computeBounds! !\\\\n\\\\n\\\\n!MixedCurveMorph methodsFor: 'smoothing' stamp: 'wiz 2/18/2006 12:53'!\\\\nslopes: knots \\\\n\\\\t\\\\\\\"Choose slopes according to state of polygon and preferences\\\\\\\"\\\\n\\\\tself isCurvy\\\\n\\\\t\\\\tifFalse: [^ knots segmentedSlopes].\\\\n\\\\t^ (closed\\\\n\\\\t\\\\t\\\\tand: [self isCurvier])\\\\n\\\\t\\\\tifTrue: [ knots closedCubicSlopes: self clamps ]\\\\n\\\\t\\\\tifFalse: [knots naturalCubicSlopes: self clamps ]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMixedCurveMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MixedCurveMorph class methodsFor: 'as yet unclassified' stamp: 'wiz 2/12/2006 17:12'!\\\\ndescriptionForPartsBin\\\\n\\\\t^ self partName:\\\\t'Mixed'\\\\n\\\\t\\\\tcategories:\\\\t\\\\t#('Graphics' 'Basic')\\\\n\\\\t\\\\tdocumentation:\\\\t'A Curve with optional bends and segments. Shift click to get handles.\\\\n\\\\t\\\\t\\\\tClick handles to change bends. Move handles to move the points.'! !\\\\nAbstractSound subclass: #MixedSound\\\\n\\\\tinstanceVariableNames: 'sounds leftVols rightVols soundDone'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Sound-Synthesis'!\\\\n\\\\n!MixedSound methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nduration\\\\n\\\\t\\\\\\\"Answer the duration of this sound in seconds.\\\\\\\"\\\\n\\\\n\\\\t| dur |\\\\n\\\\tdur := 0.\\\\n\\\\tsounds do: [:snd | dur := dur max: snd duration].\\\\n\\\\t^ dur\\\\n! !\\\\n\\\\n!MixedSound methodsFor: 'accessing' stamp: 'jm 12/16/2001 20:23'!\\\\nisStereo\\\\n\\\\n\\\\t^ true\\\\n! !\\\\n\\\\n!MixedSound methodsFor: 'accessing' stamp: 'jm 2/4/98 13:37'!\\\\nsounds\\\\n\\\\n\\\\t^ sounds\\\\n! !\\\\n\\\\n\\\\n!MixedSound methodsFor: 'composition'!\\\\n+ aSound\\\\n\\\\t\\\\\\\"Return the mix of the receiver and the argument sound.\\\\\\\"\\\\n\\\\n\\\\t^ self add: aSound\\\\n! !\\\\n\\\\n!MixedSound methodsFor: 'composition' stamp: 'jm 1/5/98 13:47'!\\\\nadd: aSound\\\\n\\\\t\\\\\\\"Add the given sound with a pan setting of centered and no attenuation.\\\\\\\"\\\\n\\\\n\\\\tself add: aSound pan: 0.5 volume: 1.0.\\\\n! !\\\\n\\\\n!MixedSound methodsFor: 'composition' stamp: 'jm 1/5/98 13:47'!\\\\nadd: aSound pan: leftRightPan\\\\n\\\\t\\\\\\\"Add the given sound with the given left-right panning and no attenuation.\\\\\\\"\\\\n\\\\n\\\\tself add: aSound pan: leftRightPan volume: 1.0.\\\\n! !\\\\n\\\\n!MixedSound methodsFor: 'composition' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nadd: aSound pan: leftRightPan volume: volume\\\\n\\\\t\\\\\\\"Add the given sound with the given left-right pan, where 0.0 is full left, 1.0 is full right, and 0.5 is centered. The loudness of the sound will be scaled by volume, which ranges from 0 to 1.0.\\\\\\\"\\\\n\\\\n\\\\t| pan vol |\\\\n\\\\tpan := ((leftRightPan * ScaleFactor) asInteger max: 0) min: ScaleFactor.\\\\n\\\\tvol := ((volume * ScaleFactor) asInteger max: 0) min: ScaleFactor.\\\\n\\\\tsounds := sounds copyWith: aSound.\\\\n\\\\tleftVols := leftVols copyWith: ((ScaleFactor - pan) * vol) // ScaleFactor.\\\\n\\\\trightVols := rightVols copyWith: (pan * vol) // ScaleFactor.\\\\n! !\\\\n\\\\n\\\\n!MixedSound methodsFor: 'copying' stamp: 'jm 12/15/97 19:13'!\\\\ncopy\\\\n\\\\t\\\\\\\"Copy my component sounds.\\\\\\\"\\\\n\\\\n\\\\t^ super copy copySounds\\\\n! !\\\\n\\\\n!MixedSound methodsFor: 'copying' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ncopySounds\\\\n\\\\t\\\\\\\"Private!! Support for copying. Copy my component sounds and settings array.\\\\\\\"\\\\n\\\\n\\\\tsounds := sounds collect: [:s | s copy].\\\\n\\\\tleftVols := leftVols copy.\\\\n\\\\trightVols := rightVols copy.\\\\n! !\\\\n\\\\n\\\\n!MixedSound methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ninitialize\\\\n\\\\n\\\\tsuper initialize.\\\\n\\\\tsounds := Array new.\\\\n\\\\tleftVols := Array new.\\\\n\\\\trightVols := Array new.\\\\n! !\\\\n\\\\n\\\\n!MixedSound methodsFor: 'sound generation' stamp: 'jm 11/25/97 13:40'!\\\\ndoControl\\\\n\\\\n\\\\tsuper doControl.\\\\n\\\\t1 to: sounds size do: [:i | (sounds at: i) doControl].\\\\n! !\\\\n\\\\n!MixedSound methodsFor: 'sound generation' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nmixSampleCount: n into: aSoundBuffer startingAt: startIndex leftVol: leftVol rightVol: rightVol\\\\n\\\\t\\\\\\\"Play a number of sounds concurrently. The level of each sound can be set independently for the left and right channels.\\\\\\\"\\\\n\\\\n\\\\t| snd left right |\\\\n\\\\t1 to: sounds size do: [:i |\\\\n\\\\t\\\\t(soundDone at: i) ifFalse: [\\\\n\\\\t\\\\t\\\\tsnd := sounds at: i.\\\\n\\\\t\\\\t\\\\tleft := (leftVol * (leftVols at: i)) // ScaleFactor.\\\\n\\\\t\\\\t\\\\tright := (rightVol * (rightVols at: i)) // ScaleFactor.\\\\n\\\\t\\\\t\\\\tsnd samplesRemaining > 0\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsnd mixSampleCount: n into: aSoundBuffer startingAt: startIndex leftVol: left rightVol: right]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [soundDone at: i put: true]]].\\\\n! !\\\\n\\\\n!MixedSound methodsFor: 'sound generation' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nreset\\\\n\\\\n\\\\tsuper reset.\\\\n\\\\tsounds do: [:snd | snd reset].\\\\n\\\\tsoundDone := (Array new: sounds size) atAllPut: false.\\\\n! !\\\\n\\\\n!MixedSound methodsFor: 'sound generation' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nsamplesRemaining\\\\n\\\\n\\\\t| remaining r |\\\\n\\\\tremaining := 0.\\\\n\\\\t1 to: sounds size do: [:i |\\\\n\\\\t\\\\tr := (sounds at: i) samplesRemaining.\\\\n\\\\t\\\\tr > remaining ifTrue: [remaining := r]].\\\\n\\\\n\\\\t^ remaining\\\\n! !\\\\n\\\\n!MixedSound methodsFor: 'sound generation' stamp: 'jm 1/10/1999 08:45'!\\\\nstopGracefully\\\\n\\\\t\\\\\\\"End this note with a graceful decay. If the note has envelopes, determine the decay time from its envelopes.\\\\\\\"\\\\n\\\\n\\\\tsuper stopGracefully.\\\\n\\\\tsounds do: [:s | s stopGracefully].\\\\n! !\\\\nStream subclass: #MockSocketStream\\\\n\\\\tinstanceVariableNames: 'atEnd inStream outStream'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'NetworkTests-Kernel'!\\\\n\\\\n!MockSocketStream methodsFor: 'accessing' stamp: 'fbs 3/22/2004 12:51'!\\\\natEnd: aBoolean\\\\n\\\\tatEnd := aBoolean.! !\\\\n\\\\n!MockSocketStream methodsFor: 'accessing' stamp: 'fbs 3/22/2004 13:29'!\\\\ninStream\\\\n\\\\t^inStream! !\\\\n\\\\n!MockSocketStream methodsFor: 'accessing' stamp: 'fbs 3/22/2004 13:08'!\\\\noutStream\\\\n\\\\t^outStream! !\\\\n\\\\n\\\\n!MockSocketStream methodsFor: 'initialize-release' stamp: 'fbs 3/22/2004 13:29'!\\\\ninitialize\\\\n\\\\tself resetInStream.\\\\n\\\\tself resetOutStream.! !\\\\n\\\\n\\\\n!MockSocketStream methodsFor: 'stream in' stamp: 'fbs 3/22/2004 13:10'!\\\\nnextLine\\\\n\\\\t^self nextLineCrLf! !\\\\n\\\\n!MockSocketStream methodsFor: 'stream in' stamp: 'fbs 3/22/2004 13:09'!\\\\nnextLineCrLf\\\\n\\\\t^(self upToAll: String crlf).! !\\\\n\\\\n!MockSocketStream methodsFor: 'stream in' stamp: 'fbs 3/22/2004 13:28'!\\\\nresetInStream\\\\n\\\\tinStream := WriteStream on: ''.! !\\\\n\\\\n!MockSocketStream methodsFor: 'stream in' stamp: 'fbs 3/22/2004 13:09'!\\\\nupToAll: delims\\\\n\\\\t^self inStream upToAll: delims.! !\\\\n\\\\n\\\\n!MockSocketStream methodsFor: 'stream out' stamp: 'fbs 3/22/2004 13:28'!\\\\nresetOutStream\\\\n\\\\toutStream := WriteStream on: ''.! !\\\\n\\\\n!MockSocketStream methodsFor: 'stream out' stamp: 'fbs 3/22/2004 13:07'!\\\\nsendCommand: aString\\\\n\\\\tself outStream\\\\n\\\\t\\\\tnextPutAll: aString;\\\\n\\\\t\\\\tnextPutAll: String crlf.! !\\\\n\\\\n\\\\n!MockSocketStream methodsFor: 'testing' stamp: 'fbs 3/22/2004 13:08'!\\\\natEnd\\\\n\\\\t^self inStream atEnd.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMockSocketStream class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MockSocketStream class methodsFor: 'instance creation' stamp: 'fbs 3/22/2004 12:46'!\\\\non: socket\\\\n\\\\t^self basicNew initialize! !\\\\nController subclass: #ModalController\\\\n\\\\tinstanceVariableNames: 'modeActive'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'ST80-Framework'!\\\\n!ModalController commentStamp: '<historical>' prior: 0!\\\\nI am a controller that puts the poor user into a mode by not relinquishing control. However, I do pass control onto my underlings. Some underling is expected to end the mode by sending me 'close'. Watch out Larry Tesler, the mode lives on...\\\\n!\\\\n\\\\n\\\\n!ModalController methodsFor: 'as yet unclassified' stamp: 'jm 5/1/1998 07:05'!\\\\nclose\\\\n\\\\t\\\\\\\"This is how we leave the mode.\\\\\\\" \\\\n\\\\n\\\\tmodeActive _ false.\\\\n! !\\\\n\\\\n!ModalController methodsFor: 'as yet unclassified' stamp: 'jm 5/1/1998 07:02'!\\\\ncontrolInitialize\\\\n\\\\n\\\\tmodeActive _ true.\\\\n\\\\t^ super controlInitialize\\\\n! !\\\\n\\\\n!ModalController methodsFor: 'as yet unclassified' stamp: 'jm 5/1/1998 07:00'!\\\\nisControlActive\\\\n\\\\n\\\\t^ modeActive\\\\n! !\\\\n\\\\n!ModalController methodsFor: 'as yet unclassified' stamp: 'jm 5/1/1998 07:00'!\\\\nisControlWanted\\\\n\\\\n\\\\t^ modeActive\\\\n! !\\\\nStandardSystemView subclass: #ModalSystemWindowView\\\\n\\\\tinstanceVariableNames: 'modalBorder'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-FileList'!\\\\n!ModalSystemWindowView commentStamp: '<historical>' prior: 0!\\\\nI am a view for a Modal System Window.  I vary from StandardSystemView, of which I am a subclass in a few ways:\\\\n\\\\n\\\\t(1) I use ModalController as my default controller;\\\\n\\\\t(2) When asked to update with the symbol #close, I direct the controller to close;\\\\n\\\\t(3) I display a slightly different title bar with no control boxes.!\\\\n\\\\n\\\\n!ModalSystemWindowView methodsFor: 'controller access' stamp: 'acg 2/9/2000 00:58'!\\\\ndefaultControllerClass\\\\n\\\\n\\\\t^ModalController! !\\\\n\\\\n\\\\n!ModalSystemWindowView methodsFor: 'displaying' stamp: 'acg 2/18/2000 20:24'!\\\\ndisplay\\\\n\\\\n\\\\tsuper display.\\\\n\\\\tself displayLabelBackground: false.\\\\n\\\\tself displayLabelText.\\\\n! !\\\\n\\\\n!ModalSystemWindowView methodsFor: 'displaying' stamp: 'acg 2/19/2000 00:59'!\\\\ndisplayBorder\\\\n\\\\t\\\\\\\"Display the receiver's border (using the receiver's borderColor).\\\\\\\"\\\\n\\\\n\\\\tmodalBorder ifFalse: [^super displayBorder].\\\\n\\\\n\\\\tDisplay\\\\n\\\\t\\\\tborder: self displayBox\\\\n\\\\t\\\\twidthRectangle: (1@1 corner: 2@2)\\\\n\\\\t\\\\trule: Form over\\\\n\\\\t\\\\tfillColor: Color black.\\\\n\\\\tDisplay\\\\n\\\\t\\\\tborder: (self displayBox insetBy: (1@1 corner: 2@2))\\\\n\\\\t\\\\twidthRectangle: (4@4 corner: 3@3)\\\\n\\\\t\\\\trule: Form over\\\\n\\\\t\\\\tfillColor: (Color r: 16rEA g: 16rEA b: 16rEA).\\\\n! !\\\\n\\\\n!ModalSystemWindowView methodsFor: 'displaying' stamp: 'acg 2/9/2000 07:21'!\\\\ndisplayLabelBoxes\\\\n\\\\t\\\\\\\"Modal dialogs don't have closeBox or growBox.\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!ModalSystemWindowView methodsFor: 'initialize-release' stamp: 'acg 2/18/2000 20:41'!\\\\nborderWidth: anObject\\\\n\\\\n\\\\tmodalBorder _ false.\\\\n\\\\t^super borderWidth: anObject! !\\\\n\\\\n!ModalSystemWindowView methodsFor: 'initialize-release' stamp: 'acg 2/19/2000 00:50'!\\\\ninitialize \\\\n\\\\t\\\\\\\"Refer to the comment in View|initialize.\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\tself borderWidth: 5.\\\\n\\\\tself noLabel.\\\\n\\\\tmodalBorder _ true.! !\\\\n\\\\n\\\\n!ModalSystemWindowView methodsFor: 'label access' stamp: 'acg 2/9/2000 08:35'!\\\\nbackgroundColor\\\\n\\\\t^Color lightYellow! !\\\\n\\\\n\\\\n!ModalSystemWindowView methodsFor: 'modal dialog' stamp: 'BG 12/13/2002 11:33'!\\\\ndoModalDialog\\\\n\\\\n\\\\t| savedArea |\\\\n\\\\tself resizeInitially.\\\\n\\\\tself resizeTo: \\\\n\\\\t\\\\t((self windowBox)\\\\n\\\\t\\\\t\\\\talign: self windowBox center\\\\n\\\\t\\\\t\\\\twith: Display boundingBox aboveCenter).\\\\n\\\\tsavedArea _ Form fromDisplay: self windowBox.\\\\n\\\\tself displayEmphasized.\\\\n\\\\tself controller startUp.\\\\n\\\\tself release.\\\\n\\\\tsavedArea displayOn: Display at: self windowOrigin.\\\\n! !\\\\n\\\\n\\\\n!ModalSystemWindowView methodsFor: 'model access' stamp: 'acg 2/9/2000 00:57'!\\\\nupdate: aSymbol\\\\n\\\\taSymbol = #close\\\\n\\\\t\\\\tifTrue: [^self controller close].\\\\n\\\\t^super update: aSymbol! !\\\\nObject subclass: #Model\\\\n\\\\tinstanceVariableNames: 'dependents'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Kernel-Objects'!\\\\n!Model commentStamp: '<historical>' prior: 0!\\\\nProvides a superclass for classes that function as models.  The only behavior provided is fast dependents maintenance, which bypasses the generic DependentsFields mechanism.  1/23/96 sw!\\\\n\\\\n\\\\n!Model methodsFor: 'copying' stamp: 'tk 10/21/2002 12:59'!\\\\nveryDeepFixupWith: deepCopier \\\\n\\\\t\\\\\\\"See if the dependents are being copied also.  If so, point at the new copies.  (The dependent has self as its model.)\\\\n\\\\tDependents handled in class Object, when the model is not a Model, are fixed up in Object veryDeepCopy.\\\\\\\"\\\\n\\\\n\\\\t| originalDependents refs newDependent |\\\\n\\\\tsuper veryDeepFixupWith: deepCopier.\\\\n\\\\toriginalDependents _ dependents.\\\\n\\\\toriginalDependents ifNil: [\\\\n\\\\t\\\\t^self.\\\\n\\\\t\\\\t].\\\\n\\\\tdependents _ nil.\\\\n\\\\trefs _ deepCopier references.\\\\n\\\\toriginalDependents\\\\n\\\\t\\\\tdo: [:originalDependent | \\\\n\\\\t\\\\t\\\\tnewDependent _ refs\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tat: originalDependent\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifAbsent: [].\\\\n\\\\t\\\\t\\\\tnewDependent\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil: [self addDependent: newDependent]]!\\\\n]style[(29 206 19 395)f1b,f1,f1LObject veryDeepCopy;,f1! !\\\\n\\\\n!Model methodsFor: 'copying' stamp: 'RB 9/20/2001 16:25'!\\\\nveryDeepInner: deepCopier\\\\n\\\\t\\\\\\\"Shallow copy dependents and fix them later\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!Model methodsFor: 'dependents' stamp: 'sma 2/29/2000 19:26'!\\\\ncanDiscardEdits\\\\n\\\\t\\\\\\\"Answer true if none of the views on this model has unaccepted edits that matter.\\\\\\\"\\\\n\\\\n\\\\tdependents ifNil: [^ true].\\\\n\\\\t^ super canDiscardEdits\\\\n! !\\\\n\\\\n!Model methodsFor: 'dependents' stamp: 'sw 2/6/2001 04:13'!\\\\ncontainingWindow\\\\n\\\\t\\\\\\\"Answer the window that holds the receiver.  The dependents technique is odious and may not be airtight, if multiple windows have the same model.\\\\\\\"\\\\n\\\\n\\\\t^ self dependents detect:\\\\n\\\\t\\\\t[:d | ((d isKindOf: SystemWindow orOf: StandardSystemView) or: [d isKindOf: MVCWiWPasteUpMorph]) and: [d model == self]] ifNone: [nil]! !\\\\n\\\\n!Model methodsFor: 'dependents' stamp: 'jm 3/24/98 15:12'!\\\\nhasUnacceptedEdits\\\\n\\\\t\\\\\\\"Answer true if any of the views on this model has unaccepted edits.\\\\\\\"\\\\n\\\\n\\\\tdependents == nil ifTrue: [^ false].\\\\n\\\\t^ super hasUnacceptedEdits\\\\n! !\\\\n\\\\n!Model methodsFor: 'dependents' stamp: 'sma 2/29/2000 19:54'!\\\\nmyDependents\\\\n\\\\t^ dependents! !\\\\n\\\\n!Model methodsFor: 'dependents' stamp: 'sma 2/29/2000 19:54'!\\\\nmyDependents: aCollectionOrNil\\\\n\\\\tdependents _ aCollectionOrNil! !\\\\n\\\\n!Model methodsFor: 'dependents' stamp: 'gm 2/16/2003 20:37'!\\\\ntopView\\\\n\\\\t\\\\\\\"Find the first top view on me. Is there any danger of their being two with the same model?  Any danger from ungarbage collected old views?  Ask if schedulled?\\\\\\\"\\\\n\\\\n\\\\tdependents ifNil: [^nil].\\\\n\\\\tSmalltalk isMorphic \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[dependents \\\\n\\\\t\\\\t\\\\t\\\\tdo: [:v | ((v isSystemWindow) and: [v isInWorld]) ifTrue: [^v]].\\\\n\\\\t\\\\t\\\\t^nil].\\\\n\\\\tdependents do: [:v | v superView ifNil: [v model == self ifTrue: [^v]]].\\\\n\\\\t^nil! !\\\\n\\\\n\\\\n!Model methodsFor: 'keyboard' stamp: 'nk 6/29/2004 14:46'!\\\\narrowKey: aChar from: view\\\\n\\\\t\\\\\\\"backstop; all the PluggableList* classes actually handle arrow keys, and the models handle other keys.\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n\\\\n!Model methodsFor: 'menus' stamp: 'di 4/11/98 11:34'!\\\\nperform: selector orSendTo: otherTarget\\\\n\\\\t\\\\\\\"Selector was just chosen from a menu by a user.  If can respond, then perform it on myself.  If not, send it to otherTarget, presumably the editPane from which the menu was invoked.\\\\\\\" \\\\n\\\\n\\\\t\\\\\\\"default is that the editor does all\\\\\\\"\\\\n\\\\t^ otherTarget perform: selector.! !\\\\n\\\\n!Model methodsFor: 'menus' stamp: 'tk 4/17/1998 17:28'!\\\\nselectedClass\\\\n\\\\t\\\\\\\"All owners of TextViews are asked this during a doIt\\\\\\\"\\\\n\\\\t^ nil! !\\\\n\\\\n!Model methodsFor: 'menus' stamp: 'zz 3/2/2004 23:49'!\\\\nstep\\\\n\\\\t\\\\\\\"Default for morphic models is no-op\\\\\\\"! !\\\\n\\\\n!Model methodsFor: 'menus' stamp: 'sw 12/15/2000 13:21'!\\\\ntrash\\\\n\\\\t\\\\\\\"What should be displayed if a trash pane is restored to initial state\\\\\\\"\\\\n\\\\n\\\\t^ ''! !\\\\n\\\\n!Model methodsFor: 'menus' stamp: 'sw 12/15/2000 13:21'!\\\\ntrash: ignored\\\\n\\\\t\\\\\\\"Whatever the user submits to the trash, it need not be saved.\\\\\\\"\\\\n\\\\n\\\\t^ true! !\\\\n\\\\n\\\\n!Model methodsFor: '*services-base' stamp: 'rr 3/21/2006 11:54'!\\\\nrequestor\\\\n\\\\t^ Requestor default! !\\\\n\\\\n\\\\n!Model methodsFor: '*Tools' stamp: 'ar 9/27/2005 20:59'!\\\\naddItem: classAndMethod\\\\n\\\\t\\\\\\\"Make a linked message list and put this method in it\\\\\\\"\\\\n\\\\t| list |\\\\n\\\\n\\\\tself flag: #mref.\\\\t\\\\\\\"classAndMethod is a String\\\\\\\"\\\\n\\\\n\\\\tMessageSet \\\\n\\\\t\\\\tparse: classAndMethod  \\\\n\\\\t\\\\ttoClassAndSelector: [ :class :sel |\\\\n\\\\t\\\\t\\\\tclass ifNil: [^self].\\\\n\\\\t\\\\t\\\\tlist := OrderedCollection with: (\\\\n\\\\t\\\\t\\\\t\\\\tMethodReference new\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsetClass: class  \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmethodSymbol: sel \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstringVersion: classAndMethod\\\\n\\\\t\\\\t\\\\t).\\\\n\\\\t\\\\t\\\\tMessageSet \\\\n\\\\t\\\\t\\\\t\\\\topenMessageList: list \\\\n\\\\t\\\\t\\\\t\\\\tname: 'Linked by HyperText'.\\\\n\\\\t\\\\t]\\\\n\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nModel class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!Model class methodsFor: 'toolbuilder' stamp: 'ar 2/11/2005 16:26'!\\\\nbuildWith: toolBuilder\\\\n\\\\t^self new buildWith: toolBuilder! !\\\\nObject subclass: #ModelExtension\\\\n\\\\tinstanceVariableNames: 'interests lock'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Traits-LocalSends'!\\\\n\\\\n!ModelExtension methodsFor: 'access to cache' stamp: 'dvf 9/14/2005 11:27'!\\\\nhaveInterestsIn: aClass \\\\n\\\\tlock critical: [^interests includes: aClass]\\\\n! !\\\\n\\\\n\\\\n!ModelExtension methodsFor: 'interests' stamp: 'dvf 9/14/2005 11:11'!\\\\nlostInterest: client inAll: classes\\\\n\\\\tlock critical: [interests removeAll: classes]! !\\\\n\\\\n!ModelExtension methodsFor: 'interests' stamp: 'dvf 9/2/2005 11:43'!\\\\nlostInterest: client in: class\\\\n\\\\tself lostInterest: client inAll: {class}! !\\\\n\\\\n!ModelExtension methodsFor: 'interests' stamp: 'dvf 9/14/2005 11:28'!\\\\nnoteInterestOf: client inAll: classes\\\\n\\\\tlock critical: [interests addAll: classes].! !\\\\n\\\\n!ModelExtension methodsFor: 'interests' stamp: 'dvf 9/2/2005 11:44'!\\\\nnoteInterestOf: client in: class\\\\n\\\\tself noteInterestOf: client inAll: {class}! !\\\\n\\\\n\\\\n!ModelExtension methodsFor: 'invalidation' stamp: 'dvf 9/14/2005 11:11'!\\\\ninitialize\\\\n\\\\tlock := Semaphore forMutualExclusion.  \\\\n\\\\tinterests := IdentityBag new.\\\\n\\\\tSystemChangeNotifier uniqueInstance \\\\n\\\\t\\\\tnotify: self\\\\n\\\\t\\\\tofSystemChangesOfItem: #class\\\\n\\\\t\\\\tusing: #classChanged:.\\\\n\\\\tSystemChangeNotifier uniqueInstance \\\\n\\\\t\\\\tnotify: self\\\\n\\\\t\\\\tofSystemChangesOfItem: #method\\\\n\\\\t\\\\tusing: #classChanged:.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nModelExtension class\\\\n\\\\tinstanceVariableNames: 'current'!\\\\n\\\\n!ModelExtension class methodsFor: 'accessing' stamp: 'dvf 9/1/2005 21:16'!\\\\ncurrent\\\\n\\\\t^current! !\\\\n\\\\n!ModelExtension class methodsFor: 'accessing' stamp: 'dvf 9/1/2005 21:16'!\\\\ncurrent: anObject\\\\n\\\\t^current := anObject! !\\\\n\\\\n\\\\n!ModelExtension class methodsFor: 'initialize-release' stamp: 'dvf 9/2/2005 12:20'!\\\\ninitialize\\\\n\\\\tself isAbstract not ifTrue:\\\\n\\\\t\\\\t[self current: self new]! !\\\\n\\\\n!ModelExtension class methodsFor: 'initialize-release' stamp: 'dvf 9/2/2005 12:20'!\\\\nisAbstract\\\\n\\\\t^self == ModelExtension! !\\\\n\\\\n\\\\n!ModelExtension class methodsFor: 'instance creation' stamp: 'dvf 9/1/2005 21:16'!\\\\ndoWithTemporaryInstance: aBlock \\\\n\\\\t| singleton |\\\\n\\\\tsingleton := self current.\\\\n\\\\t\\\\n\\\\t[self current: self new.\\\\n\\\\taBlock value] ensure: [self current: singleton]! !\\\\nModifiedEvent subclass: #ModifiedClassDefinitionEvent\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Change Notification'!\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: 'accessing' stamp: 'NS 1/20/2004 19:30'!\\\\nclassVarNames\\\\n\\\\t^ item classVarNames asSet! !\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: 'accessing' stamp: 'NS 1/20/2004 19:29'!\\\\ninstVarNames\\\\n\\\\t^ item instVarNames asSet! !\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: 'accessing' stamp: 'NS 1/20/2004 19:30'!\\\\noldClassVarNames\\\\n\\\\t^ oldItem classVarNames asSet! !\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: 'accessing' stamp: 'NS 1/20/2004 19:29'!\\\\noldInstVarNames\\\\n\\\\t^ oldItem instVarNames asSet! !\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: 'accessing' stamp: 'NS 1/20/2004 19:31'!\\\\noldSharedPools\\\\n\\\\t^ oldItem sharedPools! !\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: 'accessing' stamp: 'NS 1/20/2004 19:28'!\\\\noldSuperclass\\\\n\\\\t^ oldItem superclass! !\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: 'accessing' stamp: 'NS 1/20/2004 19:31'!\\\\nsharedPools\\\\n\\\\t^ item sharedPools! !\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: 'accessing' stamp: 'NS 1/20/2004 19:28'!\\\\nsuperclass\\\\n\\\\t^ item superclass! !\\\\n\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: 'testing' stamp: 'NS 1/20/2004 19:31'!\\\\nareClassVarsModified\\\\n\\\\t^ self classVarNames ~= self oldClassVarNames! !\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: 'testing' stamp: 'NS 1/20/2004 19:30'!\\\\nareInstVarsModified\\\\n\\\\t^ self instVarNames ~= self oldInstVarNames! !\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: 'testing' stamp: 'NS 1/20/2004 19:32'!\\\\nareSharedPoolsModified\\\\n\\\\t^ self sharedPools ~= self oldSharedPools! !\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: 'testing' stamp: 'NS 1/20/2004 19:29'!\\\\nisSuperclassModified\\\\n\\\\t^ item superclass ~~ oldItem superclass! !\\\\n\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: '*Kernel-Classes' stamp: 'al 7/17/2004 21:48'!\\\\nanyChanges\\\\n\\\\t^ self isSuperclassModified or: [self areInstVarsModified or: [self areClassVarsModified or: [self areSharedPoolsModified or: [self isTraitCompositionModified]]]]! !\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: '*Kernel-Classes' stamp: 'al 7/17/2004 21:59'!\\\\nisTraitCompositionModified\\\\n\\\\t^self traitComposition printString ~= self oldTraitComposition printString! !\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: '*Kernel-Classes' stamp: 'al 7/17/2004 21:50'!\\\\noldTraitComposition\\\\n\\\\t^ oldItem traitComposition! !\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: '*Kernel-Classes' stamp: 'al 7/18/2004 10:47'!\\\\nprintOn: aStream\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream\\\\n\\\\t\\\\tnextPutAll: ' Super: ';\\\\n\\\\t\\\\tprint: self isSuperclassModified;\\\\n\\\\t\\\\tnextPutAll: ' TraitComposition: ';\\\\n\\\\t\\\\tprint: self isTraitCompositionModified;\\\\n\\\\t\\\\tnextPutAll: ' InstVars: ';\\\\n\\\\t\\\\tprint: self areInstVarsModified;\\\\n\\\\t\\\\tnextPutAll: ' ClassVars: ';\\\\n\\\\t\\\\tprint: self areClassVarsModified;\\\\n\\\\t\\\\tnextPutAll: ' SharedPools: ';\\\\n\\\\t\\\\tprint: self areSharedPoolsModified.! !\\\\n\\\\n!ModifiedClassDefinitionEvent methodsFor: '*Kernel-Classes' stamp: 'al 7/17/2004 21:50'!\\\\ntraitComposition\\\\n\\\\t^ item traitComposition! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nModifiedClassDefinitionEvent class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!ModifiedClassDefinitionEvent class methodsFor: 'accessing' stamp: 'NS 1/20/2004 12:26'!\\\\nsupportedKinds\\\\n\\\\t\\\\\\\"All the kinds of items that this event can take.\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ Array with: self classKind! !\\\\n\\\\n\\\\n!ModifiedClassDefinitionEvent class methodsFor: 'instance creation' stamp: 'NS 1/20/2004 11:52'!\\\\nclassDefinitionChangedFrom: oldClass to: newClass\\\\n\\\\t| instance |\\\\n\\\\tinstance := self item: newClass kind: self classKind.\\\\n\\\\tinstance oldItem: oldClass.\\\\n\\\\t^instance! !\\\\nAbstractEvent subclass: #ModifiedEvent\\\\n\\\\tinstanceVariableNames: 'oldItem'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Change Notification'!\\\\n\\\\n!ModifiedEvent methodsFor: 'accessing' stamp: 'NS 1/19/2004 15:08'!\\\\noldItem\\\\n\\\\t^ oldItem! !\\\\n\\\\n\\\\n!ModifiedEvent methodsFor: 'printing' stamp: 'NS 1/19/2004 15:10'!\\\\nprintEventKindOn: aStream\\\\n\\\\n\\\\taStream nextPutAll: 'Modified'! !\\\\n\\\\n!ModifiedEvent methodsFor: 'printing' stamp: 'NS 1/19/2004 17:57'!\\\\nprintOn: aStream\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream\\\\n\\\\t\\\\tnextPutAll: ' oldItem: ';\\\\n\\\\t\\\\tprint: oldItem.! !\\\\n\\\\n\\\\n!ModifiedEvent methodsFor: 'testing' stamp: 'NS 1/19/2004 15:09'!\\\\nisModified\\\\n\\\\n\\\\t^true! !\\\\n\\\\n\\\\n!ModifiedEvent methodsFor: 'private-accessing' stamp: 'NS 1/19/2004 15:08'!\\\\noldItem: anItem\\\\n\\\\toldItem _ anItem! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nModifiedEvent class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!ModifiedEvent class methodsFor: 'accessing' stamp: 'NS 1/19/2004 15:10'!\\\\nchangeKind\\\\n\\\\n\\\\t^#Modified! !\\\\n\\\\n!ModifiedEvent class methodsFor: 'accessing' stamp: 'NS 1/20/2004 12:25'!\\\\nsupportedKinds\\\\n\\\\t\\\\\\\"All the kinds of items that this event can take.\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ Array with: self classKind with: self methodKind with: self categoryKind with: self protocolKind! !\\\\n\\\\n\\\\n!ModifiedEvent class methodsFor: 'instance creation' stamp: 'NS 1/20/2004 19:37'!\\\\nclassDefinitionChangedFrom: oldClass to: newClass\\\\n\\\\t^ ModifiedClassDefinitionEvent classDefinitionChangedFrom: oldClass to: newClass! !\\\\n\\\\n!ModifiedEvent class methodsFor: 'instance creation' stamp: 'NS 1/27/2004 11:40'!\\\\nmethodChangedFrom: oldMethod to: newMethod selector: aSymbol inClass: aClass\\\\n\\\\t| instance |\\\\n\\\\tinstance := self method: newMethod selector: aSymbol class: aClass.\\\\n\\\\tinstance oldItem: oldMethod.\\\\n\\\\t^ instance! !\\\\n\\\\n!ModifiedEvent class methodsFor: 'instance creation' stamp: 'NS 1/27/2004 11:40'!\\\\nmethodChangedFrom: oldMethod to: newMethod selector: aSymbol inClass: aClass requestor: requestor\\\\n\\\\t| instance |\\\\n\\\\tinstance := self method: newMethod selector: aSymbol class: aClass requestor: requestor.\\\\n\\\\tinstance oldItem: oldMethod.\\\\n\\\\t^ instance! !\\\\nModifiedEvent subclass: #ModifiedTraitDefinitionEvent\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Change Notification'!\\\\n\\\\n!ModifiedTraitDefinitionEvent methodsFor: 'testing' stamp: 'al 7/18/2004 11:08'!\\\\nanyChanges\\\\n\\\\t^ self isTraitCompositionModified! !\\\\n\\\\n!ModifiedTraitDefinitionEvent methodsFor: 'testing' stamp: 'al 7/18/2004 10:43'!\\\\nisTraitCompositionModified\\\\n\\\\t^self traitComposition printString ~= self oldTraitComposition printString! !\\\\n\\\\n\\\\n!ModifiedTraitDefinitionEvent methodsFor: 'accessing' stamp: 'al 7/18/2004 10:43'!\\\\noldTraitComposition\\\\n\\\\t^ oldItem traitComposition! !\\\\n\\\\n!ModifiedTraitDefinitionEvent methodsFor: 'accessing' stamp: 'al 7/18/2004 10:43'!\\\\ntraitComposition\\\\n\\\\t^ item traitComposition! !\\\\n\\\\n\\\\n!ModifiedTraitDefinitionEvent methodsFor: 'printing' stamp: 'al 7/18/2004 10:47'!\\\\nprintOn: aStream\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream\\\\n\\\\t\\\\tnextPutAll: ' TraitComposition: ';\\\\n\\\\t\\\\tprint: self isTraitCompositionModified! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nModifiedTraitDefinitionEvent class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!ModifiedTraitDefinitionEvent class methodsFor: 'accessing' stamp: 'al 7/18/2004 10:43'!\\\\nsupportedKinds\\\\n\\\\t\\\\\\\"All the kinds of items that this event can take.\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ Array with: self classKind! !\\\\n\\\\n\\\\n!ModifiedTraitDefinitionEvent class methodsFor: 'instance creation' stamp: 'al 7/18/2004 10:50'!\\\\ntraitDefinitionChangedFrom: oldTrait to: newTrait\\\\n\\\\t| instance |\\\\n\\\\tinstance _ self item: newTrait kind: self classKind.\\\\n\\\\tinstance oldItem: oldTrait.\\\\n\\\\t^instance! !\\\\nObject subclass: #Monitor\\\\n\\\\tinstanceVariableNames: 'mutex ownerProcess nestingLevel defaultQueue queueDict queuesMutex'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Kernel-Processes'!\\\\n!Monitor commentStamp: 'md 3/3/2006 09:19' prior: 0!\\\\nA monitor provides process synchronization that is more high level than the one provided by a Semaphore. Similar to the classical definition of a Monitor it has the following properties:\\\\n\\\\n1) At any time, only one process can execute code inside a critical section of a monitor.\\\\n2) A monitor is reentrant, which means that the active process in a monitor never gets blocked when it enters a (nested) critical section of the same monitor.\\\\n3) Inside a critical section, a process can wait for an event that may be coupled to a certain condition. If the condition is not fulfilled, the process leaves the monitor temporarily (in order to let other processes enter) and waits until another process signals the event. Then, the original process checks the condition again (this is often necessary because the state of the monitor could have changed in the meantime) and continues if it is fulfilled.\\\\n4) The monitor is fair, which means that the process that is waiting on a signaled condition the longest gets activated first.\\\\n5) The monitor allows you to define timeouts after which a process gets activated automatically.\\\\n\\\\n\\\\nBasic usage:\\\\n\\\\nMonitor>>critical: aBlock\\\\nCritical section.\\\\nExecutes aBlock as a critical section. At any time, only one process can execute code in a critical section.\\\\nNOTE: All the following synchronization operations are only valid inside the critical section of the monitor!!\\\\n\\\\nMonitor>>wait\\\\nUnconditional waiting for the default event.\\\\nThe current process gets blocked and leaves the monitor, which means that the monitor allows another process to execute critical code. When the default event is signaled, the original process is resumed.\\\\n\\\\nMonitor>>waitWhile: aBlock\\\\nConditional waiting for the default event.\\\\nThe current process gets blocked and leaves the monitor only if the argument block evaluates to true. This means that another process can enter the monitor. When the default event is signaled, the original process is resumed, which means that the condition (argument block) is checked again. Only if it evaluates to false, does execution proceed. Otherwise, the process gets blocked and leaves the monitor again...\\\\n\\\\nMonitor>>waitUntil: aBlock\\\\nConditional waiting for the default event.\\\\nSee Monitor>>waitWhile: aBlock.\\\\n\\\\nMonitor>>signal\\\\nOne process waiting for the default event is woken up.\\\\n\\\\nMonitor>>signalAll\\\\nAll processes waiting for the default event are woken up.\\\\n\\\\n\\\\nUsing non-default (specific) events:\\\\n\\\\nMonitor>>waitFor: aSymbol\\\\nUnconditional waiting for the non-default event represented by the argument symbol.\\\\nSame as Monitor>>wait, but the process gets only reactivated by the specific event and not the default event.\\\\n\\\\nMonitor>>waitWhile: aBlock for: aSymbol\\\\nConfitional waiting for the non-default event represented by the argument symbol.\\\\nSame as Monitor>>waitWhile:for:, but the process gets only reactivated by the specific event and not the default event.\\\\n\\\\nMonitor>>waitUntil: aBlock for: aSymbol\\\\nConfitional waiting for the non-default event represented by the argument symbol.\\\\nSee Monitor>>waitWhile:for: aBlock.\\\\n\\\\nMonitor>>signal: aSymbol\\\\nOne process waiting for the given event is woken up. If there is no process waiting for this specific event, a process waiting for the default event gets resumed.\\\\n\\\\nMonitor>>signalAll: aSymbol\\\\nAll process waiting for the given event or the default event are woken up.\\\\n\\\\nMonitor>>signalReallyAll\\\\nAll processes waiting for any events (default or specific) are woken up.\\\\n\\\\n\\\\nUsing timeouts\\\\n\\\\nMonitor>>waitMaxMilliseconds: anInteger\\\\nMonitor>>waitFor: aSymbol maxMilliseconds: anInteger\\\\nSame as Monitor>>wait (resp. Monitor>>waitFor:), but the process gets automatically woken up when the specified time has passed.\\\\n\\\\nMonitor>>waitWhile: aBlock maxMilliseconds: anInteger\\\\nMonitor>>waitWhile: aBlock for: aSymbol maxMilliseconds: anInteger\\\\nSame as Monitor>>waitWhile: (resp. Monitor>>waitWhile:for:), but the process gets automatically woken up when the specified time has passed.\\\\n\\\\nMonitor>>waitUntil: aBlock maxMilliseconds: anInteger\\\\nMonitor>>waitUntil: aBlock for: aSymbol maxMilliseconds: anInteger\\\\nSame as Monitor>>waitUntil: (resp. Monitor>>waitUntil:for:), but the process gets automatically woken up when the specified time has passed.!\\\\n\\\\n\\\\n!Monitor methodsFor: 'accessing' stamp: 'NS 7/1/2002 20:02'!\\\\ncleanup\\\\n\\\\tself checkOwnerProcess.\\\\n\\\\tself critical: [self privateCleanup].! !\\\\n\\\\n\\\\n!Monitor methodsFor: 'initialize-release' stamp: 'NS 4/13/2004 16:12'!\\\\ninitialize\\\\n\\\\tmutex _ Semaphore forMutualExclusion.\\\\n\\\\tqueuesMutex _ Semaphore forMutualExclusion.\\\\n\\\\tnestingLevel _ 0.! !\\\\n\\\\n\\\\n!Monitor methodsFor: 'signaling-default' stamp: 'NS 7/1/2002 21:57'!\\\\nsignal\\\\n\\\\t\\\\\\\"One process waiting for the default event is woken up.\\\\\\\"\\\\n\\\\n\\\\t^ self signal: nil! !\\\\n\\\\n!Monitor methodsFor: 'signaling-default' stamp: 'NS 7/1/2002 21:57'!\\\\nsignalAll\\\\n\\\\t\\\\\\\"All processes waiting for the default event are woken up.\\\\\\\"\\\\n\\\\n\\\\t^ self signalAll: nil! !\\\\n\\\\n\\\\n!Monitor methodsFor: 'signaling-specific' stamp: 'NS 4/13/2004 15:12'!\\\\nsignal: aSymbolOrNil\\\\n\\\\t\\\\\\\"One process waiting for the given event is woken up. If there is no process waiting \\\\n\\\\tfor this specific event, a process waiting for the default event gets resumed.\\\\\\\"\\\\n\\\\n\\\\t| queue |\\\\n\\\\tself checkOwnerProcess.\\\\n\\\\tqueue _ self queueFor: aSymbolOrNil.\\\\n\\\\tqueue isEmpty ifTrue: [queue _ self defaultQueue].\\\\n\\\\tself signalQueue: queue.! !\\\\n\\\\n!Monitor methodsFor: 'signaling-specific' stamp: 'NS 7/1/2002 22:02'!\\\\nsignalAll: aSymbolOrNil\\\\n\\\\t\\\\\\\"All process waiting for the given event or the default event are woken up.\\\\\\\"\\\\n\\\\n\\\\t| queue |\\\\n\\\\tself checkOwnerProcess.\\\\n\\\\tqueue _ self queueFor: aSymbolOrNil.\\\\n\\\\tself signalAllInQueue: self defaultQueue.\\\\n\\\\tqueue ~~ self defaultQueue ifTrue: [self signalAllInQueue: queue].! !\\\\n\\\\n!Monitor methodsFor: 'signaling-specific' stamp: 'NS 7/1/2002 22:02'!\\\\nsignalReallyAll\\\\n\\\\t\\\\\\\"All processes waiting for any events (default or specific) are woken up.\\\\\\\"\\\\n\\\\n\\\\tself checkOwnerProcess.\\\\n\\\\tself signalAll.\\\\n\\\\tself queueDict valuesDo: [:queue |\\\\n\\\\t\\\\tself signalAllInQueue: queue].! !\\\\n\\\\n\\\\n!Monitor methodsFor: 'synchronization' stamp: 'NS 4/14/2004 13:13'!\\\\ncritical: aBlock\\\\n\\\\t\\\\\\\"Critical section.\\\\n\\\\tExecutes aBlock as a critical section. At any time, only one process can be executing code \\\\n\\\\tin a critical section.\\\\n\\\\tNOTE: All the following synchronization operations are only valid inside the critical section \\\\n\\\\tof the monitor!!\\\\\\\"\\\\n\\\\n\\\\t| result |\\\\n\\\\t[self enter.\\\\n\\\\tresult _ aBlock value] ensure: [self exit].\\\\n\\\\t^ result.! !\\\\n\\\\n\\\\n!Monitor methodsFor: 'waiting-basic' stamp: 'NS 7/1/2002 21:55'!\\\\nwait\\\\n\\\\t\\\\\\\"Unconditional waiting for the default event.\\\\n\\\\tThe current process gets blocked and leaves the monitor, which means that the monitor\\\\n\\\\tallows another process to execute critical code. When the default event is signaled, the\\\\n\\\\toriginal process is resumed.\\\\\\\"\\\\n\\\\n\\\\t^ self waitMaxMilliseconds: nil! !\\\\n\\\\n!Monitor methodsFor: 'waiting-basic' stamp: 'NS 7/1/2002 21:56'!\\\\nwaitUntil: aBlock\\\\n\\\\t\\\\\\\"Conditional waiting for the default event.\\\\n\\\\tSee Monitor>>waitWhile: aBlock.\\\\\\\"\\\\n\\\\n\\\\t^ self waitUntil: aBlock for: nil! !\\\\n\\\\n!Monitor methodsFor: 'waiting-basic' stamp: 'fbs 3/24/2004 14:39'!\\\\nwaitWhile: aBlock\\\\n\\\\t\\\\\\\"Conditional waiting for the default event.\\\\n\\\\tThe current process gets blocked and leaves the monitor only if the argument block\\\\n\\\\tevaluates to true. This means that another process can enter the monitor. When the \\\\n\\\\tdefault event is signaled, the original process is resumed, which means that the condition\\\\n\\\\t(argument block) is checked again. Only if it evaluates to false, does execution proceed.\\\\n\\\\tOtherwise, the process gets blocked and leaves the monitor again...\\\\\\\"\\\\n\\\\n\\\\t^ self waitWhile: aBlock for: nil! !\\\\n\\\\n\\\\n!Monitor methodsFor: 'waiting-specific' stamp: 'NS 7/1/2002 21:58'!\\\\nwaitFor: aSymbolOrNil\\\\n\\\\t\\\\\\\"Unconditional waiting for the non-default event represented by the argument symbol.\\\\n\\\\tSame as Monitor>>wait, but the process gets only reactivated by the specific event and \\\\n\\\\tnot the default event.\\\\\\\"\\\\n\\\\n\\\\t^ self waitFor: aSymbolOrNil maxMilliseconds: nil! !\\\\n\\\\n!Monitor methodsFor: 'waiting-specific' stamp: 'NS 7/1/2002 22:01'!\\\\nwaitUntil: aBlock for: aSymbolOrNil\\\\n\\\\t\\\\\\\"Confitional waiting for the non-default event represented by the argument symbol.\\\\n\\\\tSee Monitor>>waitWhile:for: aBlock.\\\\\\\"\\\\n\\\\n\\\\t^ self waitUntil: aBlock for: aSymbolOrNil maxMilliseconds: nil! !\\\\n\\\\n!Monitor methodsFor: 'waiting-specific' stamp: 'NS 7/1/2002 22:01'!\\\\nwaitWhile: aBlock for: aSymbolOrNil\\\\n\\\\t\\\\\\\"Confitional waiting for the non-default event represented by the argument symbol.\\\\n\\\\tSame as Monitor>>waitWhile:for:, but the process gets only reactivated by the specific \\\\n\\\\tevent and not the default event.\\\\\\\"\\\\n\\\\n\\\\t^ self waitWhile: aBlock for: aSymbolOrNil maxMilliseconds: nil! !\\\\n\\\\n\\\\n!Monitor methodsFor: 'waiting-timeout' stamp: 'NS 7/1/2002 22:03'!\\\\nwaitFor: aSymbolOrNil maxMilliseconds: anIntegerOrNil\\\\n\\\\t\\\\\\\"Same as Monitor>>waitFor:, but the process gets automatically woken up when the \\\\n\\\\tspecified time has passed.\\\\\\\"\\\\n\\\\n\\\\tself checkOwnerProcess.\\\\n\\\\tself waitInQueue: (self queueFor: aSymbolOrNil) maxMilliseconds: anIntegerOrNil.! !\\\\n\\\\n!Monitor methodsFor: 'waiting-timeout' stamp: 'NS 7/1/2002 22:04'!\\\\nwaitFor: aSymbolOrNil maxSeconds: aNumber\\\\n\\\\t\\\\\\\"Same as Monitor>>waitFor:, but the process gets automatically woken up when the \\\\n\\\\tspecified time has passed.\\\\\\\"\\\\n\\\\n\\\\t^ self waitFor: aSymbolOrNil maxMilliseconds: (aNumber * 1000) asInteger! !\\\\n\\\\n!Monitor methodsFor: 'waiting-timeout' stamp: 'NS 7/1/2002 22:04'!\\\\nwaitMaxMilliseconds: anIntegerOrNil\\\\n\\\\t\\\\\\\"Same as Monitor>>wait, but the process gets automatically woken up when the \\\\n\\\\tspecified time has passed.\\\\\\\"\\\\n\\\\n\\\\t^ self waitFor: nil maxMilliseconds: anIntegerOrNil! !\\\\n\\\\n!Monitor methodsFor: 'waiting-timeout' stamp: 'NS 7/1/2002 22:05'!\\\\nwaitMaxSeconds: aNumber\\\\n\\\\t\\\\\\\"Same as Monitor>>wait, but the process gets automatically woken up when the \\\\n\\\\tspecified time has passed.\\\\\\\"\\\\n\\\\n\\\\t^ self waitMaxMilliseconds: (aNumber * 1000) asInteger! !\\\\n\\\\n!Monitor methodsFor: 'waiting-timeout' stamp: 'NS 7/1/2002 22:05'!\\\\nwaitUntil: aBlock for: aSymbolOrNil maxMilliseconds: anIntegerOrNil\\\\n\\\\t\\\\\\\"Same as Monitor>>waitUntil:for:, but the process gets automatically woken up when the \\\\n\\\\tspecified time has passed.\\\\\\\"\\\\n\\\\n\\\\t^ self waitWhile: [aBlock value not] for: aSymbolOrNil maxMilliseconds: anIntegerOrNil! !\\\\n\\\\n!Monitor methodsFor: 'waiting-timeout' stamp: 'NS 7/1/2002 22:05'!\\\\nwaitUntil: aBlock for: aSymbolOrNil maxSeconds: aNumber\\\\n\\\\t\\\\\\\"Same as Monitor>>waitUntil:for:, but the process gets automatically woken up when the \\\\n\\\\tspecified time has passed.\\\\\\\"\\\\n\\\\n\\\\t^ self waitUntil: aBlock for: aSymbolOrNil maxMilliseconds: (aNumber * 1000) asInteger! !\\\\n\\\\n!Monitor methodsFor: 'waiting-timeout' stamp: 'NS 7/1/2002 22:05'!\\\\nwaitUntil: aBlock maxMilliseconds: anIntegerOrNil\\\\n\\\\t\\\\\\\"Same as Monitor>>waitUntil:, but the process gets automatically woken up when the \\\\n\\\\tspecified time has passed.\\\\\\\"\\\\n\\\\n\\\\t^ self waitUntil: aBlock for: nil maxMilliseconds: anIntegerOrNil! !\\\\n\\\\n!Monitor methodsFor: 'waiting-timeout' stamp: 'NS 7/1/2002 22:06'!\\\\nwaitUntil: aBlock maxSeconds: aNumber\\\\n\\\\t\\\\\\\"Same as Monitor>>waitUntil:, but the process gets automatically woken up when the \\\\n\\\\tspecified time has passed.\\\\\\\"\\\\n\\\\n\\\\t^ self waitUntil: aBlock maxMilliseconds: (aNumber * 1000) asInteger! !\\\\n\\\\n!Monitor methodsFor: 'waiting-timeout' stamp: 'NS 7/1/2002 22:06'!\\\\nwaitWhile: aBlock for: aSymbolOrNil maxMilliseconds: anIntegerOrNil\\\\n\\\\t\\\\\\\"Same as Monitor>>waitWhile:for:, but the process gets automatically woken up when the \\\\n\\\\tspecified time has passed.\\\\\\\"\\\\n\\\\n\\\\tself checkOwnerProcess.\\\\n\\\\tself waitWhile: aBlock inQueue: (self queueFor: aSymbolOrNil) maxMilliseconds: anIntegerOrNil.! !\\\\n\\\\n!Monitor methodsFor: 'waiting-timeout' stamp: 'NS 7/1/2002 22:06'!\\\\nwaitWhile: aBlock for: aSymbolOrNil maxSeconds: aNumber\\\\n\\\\t\\\\\\\"Same as Monitor>>waitWhile:for:, but the process gets automatically woken up when the \\\\n\\\\tspecified time has passed.\\\\\\\"\\\\n\\\\n\\\\t^ self waitWhile: aBlock for: aSymbolOrNil maxMilliseconds: (aNumber * 1000) asInteger! !\\\\n\\\\n!Monitor methodsFor: 'waiting-timeout' stamp: 'NS 7/1/2002 22:06'!\\\\nwaitWhile: aBlock maxMilliseconds: anIntegerOrNil\\\\n\\\\t\\\\\\\"Same as Monitor>>waitWhile:, but the process gets automatically woken up when the \\\\n\\\\tspecified time has passed.\\\\\\\"\\\\n\\\\n\\\\t^ self waitWhile: aBlock for: nil maxMilliseconds: anIntegerOrNil! !\\\\n\\\\n!Monitor methodsFor: 'waiting-timeout' stamp: 'NS 7/1/2002 22:06'!\\\\nwaitWhile: aBlock maxSeconds: aNumber\\\\n\\\\t\\\\\\\"Same as Monitor>>waitWhile:, but the process gets automatically woken up when the \\\\n\\\\tspecified time has passed.\\\\\\\"\\\\n\\\\n\\\\t^ self waitWhile: aBlock maxMilliseconds: (aNumber * 1000) asInteger! !\\\\n\\\\n\\\\n!Monitor methodsFor: 'private' stamp: 'NS 4/13/2004 13:40'!\\\\ncheckOwnerProcess\\\\n\\\\tself isOwnerProcess\\\\n\\\\t\\\\tifFalse: [self error: 'Monitor access violation'].! !\\\\n\\\\n!Monitor methodsFor: 'private' stamp: 'NS 7/1/2002 15:06'!\\\\ndefaultQueue\\\\n\\\\tdefaultQueue ifNil: [defaultQueue _ OrderedCollection new].\\\\n\\\\t^ defaultQueue! !\\\\n\\\\n!Monitor methodsFor: 'private' stamp: 'NS 4/13/2004 13:37'!\\\\nenter\\\\n\\\\tself isOwnerProcess ifTrue: [\\\\n\\\\t\\\\tnestingLevel _ nestingLevel + 1.\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tmutex wait.\\\\n\\\\t\\\\townerProcess _ Processor activeProcess.\\\\n\\\\t\\\\tnestingLevel _ 1.\\\\n\\\\t].! !\\\\n\\\\n!Monitor methodsFor: 'private' stamp: 'NS 4/13/2004 13:38'!\\\\nexit\\\\n\\\\tnestingLevel _ nestingLevel - 1.\\\\n\\\\tnestingLevel < 1 ifTrue: [\\\\n\\\\t\\\\townerProcess _ nil.\\\\n\\\\t\\\\tmutex signal\\\\n\\\\t].! !\\\\n\\\\n!Monitor methodsFor: 'private' stamp: 'NS 4/13/2004 16:32'!\\\\nexitAndWaitInQueue: anOrderedCollection maxMilliseconds: anIntegerOrNil\\\\n\\\\t| lock delay |\\\\n\\\\tqueuesMutex \\\\n\\\\t\\\\tcritical: [lock _ anOrderedCollection addLast: Semaphore new].\\\\n\\\\tself exit.\\\\n\\\\tanIntegerOrNil isNil ifTrue: [\\\\n\\\\t\\\\tlock wait\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tdelay _ MonitorDelay signalLock: lock afterMSecs: anIntegerOrNil inMonitor: self queue: anOrderedCollection.\\\\n\\\\t\\\\tlock wait.\\\\n\\\\t\\\\tdelay unschedule.\\\\n\\\\t].\\\\n\\\\tself enter.! !\\\\n\\\\n!Monitor methodsFor: 'private' stamp: 'NS 7/1/2002 15:42'!\\\\nisOwnerProcess\\\\n\\\\t^ Processor activeProcess == ownerProcess! !\\\\n\\\\n!Monitor methodsFor: 'private' stamp: 'NS 4/13/2004 16:14'!\\\\nprivateCleanup\\\\n\\\\tqueuesMutex critical: [\\\\n\\\\t\\\\tdefaultQueue isEmpty ifTrue: [defaultQueue _ nil].\\\\n\\\\t\\\\tqueueDict ifNotNil: [\\\\n\\\\t\\\\t\\\\tqueueDict copy keysAndValuesDo: [:id :queue | \\\\n\\\\t\\\\t\\\\t\\\\tqueue isEmpty ifTrue: [queueDict removeKey: id]].\\\\n\\\\t\\\\t\\\\tqueueDict isEmpty ifTrue: [queueDict _ nil].\\\\n\\\\t\\\\t].\\\\n\\\\t].! !\\\\n\\\\n!Monitor methodsFor: 'private' stamp: 'NS 7/1/2002 15:10'!\\\\nqueueDict\\\\n\\\\tqueueDict ifNil: [queueDict _ IdentityDictionary new].\\\\n\\\\t^ queueDict.! !\\\\n\\\\n!Monitor methodsFor: 'private' stamp: 'NS 7/1/2002 15:12'!\\\\nqueueFor: aSymbol\\\\n\\\\taSymbol ifNil: [^ self defaultQueue].\\\\n\\\\t^ self queueDict \\\\n\\\\t\\\\tat: aSymbol \\\\n\\\\t\\\\tifAbsent: [self queueDict at: aSymbol put: OrderedCollection new].! !\\\\n\\\\n!Monitor methodsFor: 'private' stamp: 'NS 4/13/2004 16:10'!\\\\nsignalAllInQueue: anOrderedCollection\\\\n\\\\tqueuesMutex critical: [\\\\n\\\\t\\\\tanOrderedCollection do: [:lock | lock signal].\\\\n\\\\t\\\\tanOrderedCollection removeAllSuchThat: [:each | true].\\\\n\\\\t].! !\\\\n\\\\n!Monitor methodsFor: 'private' stamp: 'NS 4/13/2004 16:34'!\\\\nsignalLock: aSemaphore inQueue: anOrderedCollection\\\\n\\\\tqueuesMutex critical: [\\\\n\\\\t\\\\taSemaphore signal.\\\\n\\\\t\\\\tanOrderedCollection remove: aSemaphore ifAbsent: [].\\\\n\\\\t].! !\\\\n\\\\n!Monitor methodsFor: 'private' stamp: 'NS 4/13/2004 16:10'!\\\\nsignalQueue: anOrderedCollection\\\\n\\\\tqueuesMutex critical: [\\\\n\\\\t\\\\tanOrderedCollection isEmpty ifTrue: [^ self].\\\\n\\\\t\\\\tanOrderedCollection removeFirst signal.\\\\n\\\\t].! !\\\\n\\\\n!Monitor methodsFor: 'private' stamp: 'NS 7/1/2002 13:17'!\\\\nwaitInQueue: anOrderedCollection maxMilliseconds: anIntegerOrNil\\\\n\\\\tself exitAndWaitInQueue: anOrderedCollection maxMilliseconds: anIntegerOrNil.! !\\\\n\\\\n!Monitor methodsFor: 'private' stamp: 'NS 7/1/2002 13:17'!\\\\nwaitWhile: aBlock inQueue: anOrderedCollection maxMilliseconds: anIntegerOrNil\\\\n\\\\t[aBlock value] whileTrue: [self exitAndWaitInQueue: anOrderedCollection maxMilliseconds: anIntegerOrNil].! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMonitor class\\\\n\\\\tinstanceVariableNames: ''!\\\\nDelay subclass: #MonitorDelay\\\\n\\\\tinstanceVariableNames: 'monitor queue'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Kernel-Processes'!\\\\n!MonitorDelay commentStamp: 'NS 4/13/2004 16:51' prior: 0!\\\\nThis is a specialization of the class Delay that is used for the implementation of the class Monitor.!\\\\n\\\\n\\\\n!MonitorDelay methodsFor: 'private' stamp: 'NS 4/13/2004 16:26'!\\\\nsetDelay: anInteger forSemaphore: aSemaphore monitor: aMonitor queue: anOrderedCollection\\\\n\\\\tmonitor _ aMonitor.\\\\n\\\\tqueue _ anOrderedCollection.\\\\n\\\\tself setDelay: anInteger forSemaphore: aSemaphore.! !\\\\n\\\\n!MonitorDelay methodsFor: 'private' stamp: 'NS 4/13/2004 16:22'!\\\\nsignalWaitingProcess\\\\n\\\\t\\\\\\\"The delay time has elapsed; signal the waiting process.\\\\\\\"\\\\n\\\\n\\\\tbeingWaitedOn _ false.\\\\n\\\\tmonitor signalLock: delaySemaphore inQueue: queue.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMonitorDelay class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MonitorDelay class methodsFor: 'instance creation' stamp: 'NS 4/13/2004 16:25'!\\\\nsignalLock: aSemaphore afterMSecs: anInteger inMonitor: aMonitor queue: anOrderedCollection\\\\n\\\\tanInteger < 0 ifTrue: [self error: 'delay times cannot be negative'].\\\\n\\\\t^ (self new setDelay: anInteger forSemaphore: aSemaphore monitor: aMonitor queue: anOrderedCollection) schedule! !\\\\nTestCase subclass: #MonitorTest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'KernelTests-Processes'!\\\\n\\\\n!MonitorTest methodsFor: 'examples' stamp: 'md 3/19/2006 21:15'!\\\\ntestExample1\\\\n\\\\n\\\\t| producer1 producer2  monitor goal work counter goalReached finished |\\\\n\\\\tgoal _ (1 to: 1000) asOrderedCollection.\\\\n\\\\twork _ OrderedCollection new.\\\\n\\\\tcounter := 0.\\\\n\\\\tgoalReached := false.\\\\n\\\\tfinished := Semaphore new.\\\\n\\\\tmonitor := Monitor new.\\\\n\\\\n\\\\tproducer1 := [\\\\n       [monitor critical:\\\\n             [monitor waitUntil: [counter \\\\\\\\\\\\\\\\5 = 0].\\\\n              goalReached or: [work add: (counter := counter + 1)].\\\\n              goalReached := counter >= goal size.\\\\n              monitor signal\\\\n            ].\\\\n           goalReached\\\\n          ]\\\\n             whileFalse.\\\\n         finished signal.\\\\n\\\\t].\\\\n\\\\n\\\\tproducer2 := [\\\\n         [monitor critical:\\\\n                [monitor waitWhile: [counter \\\\\\\\\\\\\\\\5 = 0].\\\\n                 goalReached or: [work add: (counter := counter + 1)].\\\\n                 goalReached := counter >= goal size.\\\\n                 monitor signal].\\\\n         goalReached\\\\n       ] whileFalse.\\\\n     finished signal\\\\n\\\\t].\\\\n\\\\n\\\\tproducer1 forkAt: Processor userBackgroundPriority.\\\\n\\\\tproducer2 forkAt: Processor userBackgroundPriority.\\\\n\\\\n\\\\tfinished wait; wait.\\\\n\\\\tself assert: goal = work! !\\\\n\\\\n!MonitorTest methodsFor: 'examples' stamp: 'md 3/19/2006 21:19'!\\\\ntestExample2\\\\n\\\\t\\\\\\\"Here is a second version that does not use a semaphore to inform the \\\\n\\\\tforking process about termination of both forked processes\\\\\\\"\\\\n\\\\n\\\\t| producer1 producer2  monitor goal work counter goalReached activeProducers|\\\\n\\\\tgoal _ (1 to: 1000) asOrderedCollection.\\\\n\\\\twork _ OrderedCollection new.\\\\n\\\\tcounter := 0.\\\\n\\\\tgoalReached := false.\\\\n\\\\tactiveProducers := 0.\\\\n\\\\tmonitor := Monitor new.\\\\n\\\\n  producer1 :=\\\\n      [ monitor critical: [activeProducers := activeProducers + 1].\\\\n  [monitor critical:\\\\n            [monitor waitUntil: [counter \\\\\\\\\\\\\\\\5 = 0].\\\\n      goalReached or: [work add: (counter := counter + 1)].\\\\n     \\\\\\\" Transcript show: 'P1  '; show: counter printString; show: '  ';\\\\n       show: activeProducers printString; cr.\\\\\\\"\\\\n      goalReached := counter >= goal size.\\\\n      monitor signal\\\\n            ].\\\\n           goalReached\\\\n          ]\\\\n             whileFalse.\\\\n         monitor critical: [activeProducers := activeProducers - 1.\\\\n        monitor signal: #finish].\\\\n ] .\\\\n\\\\n producer2 :=\\\\n    [monitor critical: [activeProducers := activeProducers + 1].\\\\n\\\\n  [monitor critical:\\\\n          [monitor waitWhile: [counter \\\\\\\\\\\\\\\\5 = 0].\\\\n    goalReached or: [work add: (counter := counter + 1)].\\\\n    goalReached := counter >= goal size.\\\\n    monitor signal].\\\\n         goalReached ] whileFalse.\\\\n     monitor critical: [\\\\n\\\\t\\\\tactiveProducers := activeProducers - 1. \\\\n\\\\t\\\\tmonitor signal: #finish].\\\\n\\\\t].\\\\n\\\\n\\\\tproducer1 forkAt: Processor userBackgroundPriority.\\\\n\\\\tproducer2  forkAt: Processor userBackgroundPriority.\\\\n\\\\n\\\\n\\\\tmonitor critical: [\\\\n\\\\t\\\\tmonitor waitUntil: [activeProducers = 0 & (goalReached)]\\\\n\\\\t\\\\t\\\\t\\\\tfor: #finish.\\\\n  \\\\t].\\\\n\\\\n\\\\tself assert: goal = work\\\\n! !\\\\nTimespan subclass: #Month\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: 'ChronologyConstants'\\\\n\\\\tcategory: 'Kernel-Chronology'!\\\\n!Month commentStamp: 'brp 5/13/2003 09:48' prior: 0!\\\\nI represent a month.!\\\\n\\\\n\\\\n!Month methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 09:04'!\\\\nasMonth\\\\n\\\\n\\\\t^ self\\\\n! !\\\\n\\\\n!Month methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 09:05'!\\\\ndaysInMonth\\\\n\\\\n\\\\t^ self duration days.! !\\\\n\\\\n!Month methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 09:05'!\\\\nindex\\\\n\\\\n\\\\t^ self monthIndex\\\\n! !\\\\n\\\\n!Month methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 09:05'!\\\\nname\\\\n\\\\n\\\\n\\\\t^ self monthName\\\\n! !\\\\n\\\\n!Month methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 09:05'!\\\\nprevious\\\\n\\\\n\\\\n\\\\t^ self class starting: (self start - 1)\\\\n! !\\\\n\\\\n!Month methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 09:05'!\\\\nprintOn: aStream\\\\n\\\\n\\\\n\\\\taStream nextPutAll: self monthName, ' ', self year printString.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMonth class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!Month class methodsFor: 'smalltalk-80' stamp: 'brp 7/27/2003 16:27'!\\\\ndaysInMonth: indexOrName forYear: yearInteger \\\\n\\\\n\\\\t| index |\\\\n\\\\tindex _ indexOrName isInteger \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [indexOrName]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self indexOfMonth: indexOrName].\\\\n\\\\t^ (DaysInMonth at: index)\\\\n\\\\t\\\\t\\\\t+ ((index = 2\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [Year isLeapYear: yearInteger])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [1] ifFalse: [0])! !\\\\n\\\\n!Month class methodsFor: 'smalltalk-80' stamp: 'brp 8/23/2003 09:29'!\\\\nindexOfMonth: aMonthName\\\\n\\\\n\\\\n\\\\t1 to: 12 do: [ :i |  (aMonthName, '*' match: (MonthNames at: i)) ifTrue: [^i] ].\\\\n\\\\n\\\\tself error: aMonthName , ' is not a recognized month name'.! !\\\\n\\\\n!Month class methodsFor: 'smalltalk-80' stamp: 'brp 5/13/2003 09:02'!\\\\nnameOfMonth: anIndex\\\\n\\\\n\\\\t^ MonthNames at: anIndex.! !\\\\n\\\\n\\\\n!Month class methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 16:22'!\\\\nmonth: month year: year\\\\n\\\\t\\\\\\\"Create a Month for the given <year> and <month>.\\\\n\\\\t<month> may be a number or a String with the\\\\n\\\\tname of the month. <year> should be with 4 digits.\\\\\\\"\\\\n\\\\n\\\\t^ self starting: (DateAndTime year: year month: month day: 1)\\\\n! !\\\\n\\\\n!Month class methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 16:21'!\\\\nreadFrom: aStream\\\\n\\\\n\\\\t| m y c |\\\\n\\\\n\\\\tm _ (ReadWriteStream with: '') reset.\\\\n\\\\n\\\\t[(c _ aStream next) isSeparator] whileFalse: [m nextPut: c].\\\\n\\\\n\\\\t[(c _ aStream next) isSeparator] whileTrue.\\\\n\\\\n\\\\ty _ (ReadWriteStream with: '') reset.\\\\n\\\\n\\\\ty nextPut: c.\\\\n\\\\n\\\\t[aStream atEnd] whileFalse: [y nextPut: aStream next].\\\\n\\\\n\\\\n\\\\t^ self \\\\n\\\\t\\\\tmonth: m contents\\\\n\\\\t\\\\tyear: y contents\\\\n\\\\n\\\\\\\"Month readFrom: 'July 1998' readStream\\\\\\\"\\\\n! !\\\\n\\\\n!Month class methodsFor: 'squeak protocol' stamp: 'brp 7/1/2003 13:59'!\\\\nstarting: aDateAndTime duration: aDuration \\\\n\\\\t\\\\\\\"Override - a each month has a defined duration\\\\\\\"\\\\n\\\\t| start adjusted days |\\\\n\\\\tstart _ aDateAndTime asDateAndTime.\\\\n\\\\tadjusted _ DateAndTime\\\\n\\\\t\\\\t\\\\t\\\\tyear: start year\\\\n\\\\t\\\\t\\\\t\\\\tmonth: start month\\\\n\\\\t\\\\t\\\\t\\\\tday: 1.\\\\n\\\\tdays _ self daysInMonth: adjusted month forYear: adjusted year.\\\\n\\\\t^ super\\\\n\\\\t\\\\tstarting: adjusted\\\\n\\\\t\\\\tduration: (Duration days: days)! !\\\\nClassTestCase subclass: #MonthTest\\\\n\\\\tinstanceVariableNames: 'month'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'KernelTests-Chronology'!\\\\n!MonthTest commentStamp: 'brp 7/26/2003 22:44' prior: 0!\\\\nThis is the unit test for the class Month.\\\\n!\\\\n\\\\n\\\\n!MonthTest methodsFor: 'Coverage' stamp: 'brp 7/27/2003 12:42'!\\\\nclassToBeTested\\\\n\\\\n\\\\t^ Month! !\\\\n\\\\n!MonthTest methodsFor: 'Coverage' stamp: 'brp 7/26/2003 23:29'!\\\\nselectorsToBeIgnored\\\\n\\\\n\\\\t| deprecated private special |\\\\n\\\\tdeprecated := #().\\\\n\\\\tprivate := #( #printOn: ).\\\\n\\\\tspecial := #( #next ).\\\\n\\\\n\\\\t^ super selectorsToBeIgnored, deprecated, private, special.! !\\\\n\\\\n\\\\n!MonthTest methodsFor: 'Running' stamp: 'brp 8/6/2003 19:37'!\\\\nsetUp\\\\n\\\\n\\\\tsuper setUp.\\\\n\\\\tmonth _ Month month: 7 year: 1998.! !\\\\n\\\\n!MonthTest methodsFor: 'Running' stamp: 'brp 8/6/2003 19:37'!\\\\ntearDown\\\\n\\\\n\\\\tsuper tearDown.\\\\n\\\\tmonth _ nil.! !\\\\n\\\\n\\\\n!MonthTest methodsFor: 'Tests' stamp: 'brp 7/26/2003 22:52'!\\\\ntestConverting\\\\n\\\\n\\\\tself assert: month asDate = '1 July 1998' asDate! !\\\\n\\\\n!MonthTest methodsFor: 'Tests' stamp: 'brp 1/30/2005 09:35'!\\\\ntestEnumerating\\\\n\\\\t| weeks |\\\\n\\\\tweeks := OrderedCollection new.\\\\n\\\\tmonth weeksDo: [ :w | weeks add: w start ].\\\\n\\\\t0 to: 4 do: [ :i | weeks remove: (Week starting:  ('29 June 1998' asDate addDays: i * 7)) start ].\\\\n\\\\tself assert: weeks isEmpty! !\\\\n\\\\n!MonthTest methodsFor: 'Tests' stamp: 'brp 8/23/2003 16:08'!\\\\ntestInquiries\\\\n\\\\n\\\\tself \\\\n\\\\t\\\\tassert: month index = 7;\\\\n\\\\t\\\\tassert: month name = #July;\\\\n\\\\t\\\\tassert: month duration = (31 days).\\\\n! !\\\\n\\\\n!MonthTest methodsFor: 'Tests' stamp: 'nk 7/30/2004 17:52'!\\\\ntestInstanceCreation\\\\n\\\\t| m1 m2 |\\\\n\\\\tm1 := Month starting:  '4 July 1998' asDate.\\\\n\\\\tm2 := Month month: #July year: 1998.\\\\n\\\\tself\\\\n\\\\t\\\\tassert: month = m1;\\\\n\\\\t\\\\tassert: month = m2! !\\\\n\\\\n!MonthTest methodsFor: 'Tests' stamp: 'brp 7/26/2003 23:02'!\\\\ntestPreviousNext\\\\n\\\\t| n p |\\\\n\\\\tn := month next.\\\\n\\\\tp := month previous.\\\\n\\\\n\\\\tself\\\\n\\\\t\\\\tassert: n year = 1998;\\\\n\\\\t\\\\tassert: n index = 8;\\\\n\\\\t\\\\tassert: p year = 1998;\\\\n\\\\t\\\\tassert: p index = 6.\\\\n\\\\n! !\\\\n\\\\n!MonthTest methodsFor: 'Tests' stamp: 'brp 7/26/2003 22:50'!\\\\ntestPrinting\\\\n\\\\n\\\\tself \\\\n\\\\t\\\\tassert: month printString = 'July 1998'.\\\\n! !\\\\n\\\\n!MonthTest methodsFor: 'Tests' stamp: 'brp 7/26/2003 22:46'!\\\\ntestReadFrom\\\\n\\\\n\\\\t| m |\\\\n\\\\tm := Month readFrom: 'July 1998' readStream.\\\\n\\\\tself \\\\n\\\\t\\\\tassert: m = month! !\\\\nGesturalEvent subclass: #MoodGesturalEvent\\\\n\\\\tinstanceVariableNames: 'state'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Speech-Events'!\\\\n\\\\n!MoodGesturalEvent methodsFor: 'accessing' stamp: 'len 9/7/1999 02:22'!\\\\nstate\\\\n\\\\t^ state! !\\\\n\\\\n!MoodGesturalEvent methodsFor: 'accessing' stamp: 'stephaneducasse 2/3/2006 22:22'!\\\\nstate: aSymbol\\\\n\\\\tstate := aSymbol asSymbol! !\\\\n\\\\n\\\\n!MoodGesturalEvent methodsFor: 'playing' stamp: 'len 9/7/1999 02:23'!\\\\nactOn: aHeadMorph\\\\n\\\\taHeadMorph face perform: self state! !\\\\n\\\\n\\\\n!MoodGesturalEvent methodsFor: 'printing' stamp: 'len 9/7/1999 02:26'!\\\\nprintOn: aStream\\\\n\\\\taStream nextPutAll: 'set ', self state, ' mood'! !\\\\nObject subclass: #Morph\\\\n\\\\tinstanceVariableNames: 'bounds owner submorphs fullBounds color extension'\\\\n\\\\tclassVariableNames: 'EmptyArray'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Kernel'!\\\\n!Morph commentStamp: 'efc 2/26/2003 20:01' prior: 0!\\\\nA Morph (from the Greek \\\\\\\"shape\\\\\\\" or \\\\\\\"form\\\\\\\") is an interactive graphical object. General information on the Morphic system can be found at http://minnow.cc.gatech.edu/squeak/30. \\\\n\\\\nMorphs exist in a tree, rooted at a World (generally a PasteUpMorph). The morphs owned by a morph are its submorphs. Morphs are drawn recursively; if a Morph has no owner it never gets drawn. To hide a Morph and its submorphs, set its #visible property to false using the #visible: method. \\\\n\\\\nThe World (screen) coordinate system is used for most coordinates, but can be changed if there is a TransformMorph somewhere in the owner chain. \\\\n\\\\nMy instance variables have accessor methods (e.g., #bounds, #bounds:). Most users should use the accessor methods instead of using the instance variables directly.\\\\n\\\\nStructure:\\\\ninstance var \\\\tType \\\\t\\\\t\\\\tDescription \\\\nbounds \\\\t\\\\t\\\\tRectangle \\\\t\\\\tA Rectangle indicating my position and a size that will enclose \\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tme. \\\\nowner \\\\t\\\\t\\\\tMorph\\\\t\\\\t \\\\tMy parent Morph, or nil for the top-level Morph, which is a\\\\n \\\\t\\\\t\\\\t\\\\tor nil\\\\t\\\\t\\\\tworld, typically a PasteUpMorph.\\\\nsubmorphs \\\\t\\\\tArray \\\\t\\\\t\\\\tMy child Morphs. \\\\nfullBounds \\\\t\\\\tRectangle \\\\t\\\\tA Rectangle minimally enclosing me and my submorphs. \\\\ncolor \\\\t\\\\t\\\\tColor \\\\t\\\\t\\\\tMy primary color. Subclasses can use this in different ways. \\\\nextension \\\\t\\\\tMorphExtension Allows extra properties to be stored without adding a\\\\n\\\\t\\\\t\\\\t\\\\tor nil  \\\\t\\\\t\\\\t\\\\tstorage burden to all morphs. \\\\n\\\\nBy default, Morphs do not position their submorphs. Morphs may position their submorphs directly or use a LayoutPolicy to automatically control their submorph positioning.\\\\n\\\\nAlthough Morph has some support for BorderStyle, most users should use BorderedMorph if they want borders.!\\\\n]style[(2 5 130 37 59 12 325 14 209 12 2 4 4 11 1 11 9 90 5 123 5 35 9 66 5 78 14 209 12 91 11 24 13 22)f1,f1LMorph Hierarchy;,f1,f1Rhttp://minnow.cc.gatech.edu/squeak/30;,f1,f1LPasteUpMorph Comment;,f1,f1LTransformMorph Comment;,f1,f1u,f1,f1u,f1,f1u,f1i,f1,f1LRectangle Comment;,f1,f1LMorph Comment;,f1,f1LArray Comment;,f1,f1LRectangle Comment;,f1,f1LColor Comment;,f1,f1LMorphExtension Comment;,f1,f1LLayoutPolicy Comment;,f1,f1LBorderStyle Comment;,f1,f1LBorderedMorph Comment;,f1!\\\\n\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 8/11/1998 16:46'!\\\\nactorState\\\\n\\\\t\\\\\\\"This method instantiates actorState as a side-effect.\\\\n\\\\tFor simple queries, use actorStateOrNil\\\\\\\"\\\\n\\\\t| state |\\\\n\\\\tstate _ self actorStateOrNil.\\\\n\\\\tstate ifNil:\\\\n\\\\t\\\\t[state _ ActorState new initializeFor: self assuredPlayer.\\\\n\\\\t\\\\tself actorState: state].\\\\n\\\\t^ state! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'md 2/27/2006 09:51'!\\\\nactorStateOrNil\\\\n\\\\t\\\\\\\"answer the redeiver's actorState\\\\\\\"\\\\n\\\\t^ extension ifNotNil: [extension actorState]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'dgd 2/16/2003 21:52'!\\\\nactorState: anActorState \\\\n\\\\t\\\\\\\"change the receiver's actorState\\\\\\\"\\\\n\\\\tself assureExtension actorState: anActorState! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'ar 12/18/2001 20:09'!\\\\nadoptPaneColor: paneColor\\\\n\\\\tself submorphsDo:[:m| m adoptPaneColor: paneColor].! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'md 2/27/2006 09:51'!\\\\nballoonText\\\\n\\\\t\\\\\\\"Answer balloon help text or nil, if no help is available.  \\\\n\\\\tNB: subclasses may override such that they programatically  \\\\n\\\\tconstruct the text, for economy's sake, such as model phrases in \\\\n\\\\ta Viewer\\\\\\\"\\\\n\\\\n\\\\t| text balloonSelector aString |\\\\n\\\\textension ifNil: [^nil].\\\\n\\\\t(text := extension balloonText) ifNotNil: [^text].\\\\n\\\\t(balloonSelector := extension balloonTextSelector) ifNotNil: \\\\n\\\\t\\\\t\\\\t[aString := ScriptingSystem helpStringOrNilFor: balloonSelector.\\\\n\\\\t\\\\t\\\\t(aString isNil and: [balloonSelector == #methodComment]) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [aString := self methodCommentAsBalloonHelp].\\\\n\\\\t\\\\t\\\\t((aString isNil and: [balloonSelector numArgs = 0]) \\\\n\\\\t\\\\t\\\\t\\\\tand: [self respondsTo: balloonSelector]) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [aString := self perform: balloonSelector]].\\\\n\\\\t^aString ifNotNil: \\\\n\\\\t\\\\t\\\\t[aString asString \\\\n\\\\t\\\\t\\\\t\\\\twithNoLineLongerThan: Preferences maxBalloonHelpLineLength]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'md 2/27/2006 09:52'!\\\\nballoonTextSelector\\\\n\\\\t\\\\\\\"Answer balloon text selector item in the extension, nil if none\\\\\\\"\\\\n\\\\t^ extension ifNotNil: [extension balloonTextSelector]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'dgd 2/16/2003 21:50'!\\\\nballoonTextSelector: aSelector \\\\n\\\\t\\\\\\\"change the receiver's balloonTextSelector\\\\\\\"\\\\n\\\\tself assureExtension balloonTextSelector: aSelector! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 10/31/2001 21:06'!\\\\nbeFlap: aBool\\\\n\\\\t\\\\\\\"Mark the receiver with the #flap property, or unmark it\\\\\\\"\\\\n\\\\n\\\\taBool\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self setProperty: #flap toValue: true.\\\\n\\\\t\\\\t\\\\tself hResizing: #rigid.\\\\n\\\\t\\\\t\\\\tself vResizing: #rigid]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self removeProperty: #flap]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'dgd 2/16/2003 21:57'!\\\\nbeSticky\\\\n\\\\t\\\\\\\"make the receiver sticky\\\\\\\"\\\\n\\\\tself assureExtension sticky: true! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'md 2/27/2006 09:52'!\\\\nbeUnsticky\\\\n\\\\t\\\\\\\"If the receiver is marked as sticky, make it now be unsticky\\\\\\\"\\\\n\\\\textension ifNotNil: [extension sticky: false]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'ar 8/25/2001 18:28'!\\\\nborderColor\\\\n\\\\t^self borderStyle color! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'nk 4/15/2004 10:55'!\\\\nborderColor: aColorOrSymbolOrNil \\\\n\\\\t\\\\\\\"Unfortunately, the argument to borderColor could be more than \\\\tjust a color. \\\\n\\\\tIt could also be a symbol, in which case it is to be interpreted as a style identifier.\\\\n\\\\tBut I might not be able to draw that kind of border, so it may have to be ignored.\\\\n\\\\tOr it could be nil, in which case I should revert to the default border.\\\\\\\"\\\\n\\\\n\\\\t| style newStyle |\\\\n\\\\tstyle := self borderStyle.\\\\n\\\\tstyle baseColor = aColorOrSymbolOrNil\\\\n\\\\t\\\\tifTrue: [^ self].\\\\n\\\\n\\\\taColorOrSymbolOrNil isColor\\\\n\\\\t\\\\tifTrue: [style style = #none \\\\\\\"default border?\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self borderStyle: (SimpleBorder width: 0 color: aColorOrSymbolOrNil)]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [style baseColor: aColorOrSymbolOrNil.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself changed].\\\\n\\\\t\\\\t\\\\t^ self].\\\\n\\\\n\\\\tself\\\\n\\\\t\\\\tborderStyle: ( ({ nil. #none } includes: aColorOrSymbolOrNil)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [BorderStyle default]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [ \\\\\\\"a symbol\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself doesBevels ifFalse: [ ^self ].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnewStyle := (BorderStyle perform: aColorOrSymbolOrNil)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcolor: style color;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twidth: style width;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tyourself.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(self canDrawBorder: newStyle)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [newStyle]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [style]])! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'ar 11/26/2001 14:53'!\\\\nborderStyle\\\\n\\\\t^(self valueOfProperty: #borderStyle ifAbsent:[BorderStyle default]) trackColorFrom: self! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 11/26/2001 16:18'!\\\\nborderStyleForSymbol: aStyleSymbol\\\\n\\\\t\\\\\\\"Answer a suitable BorderStyle for me of the type represented by a given symbol\\\\\\\"\\\\n\\\\n\\\\t| aStyle existing |\\\\n\\\\taStyle _ BorderStyle borderStyleForSymbol: aStyleSymbol asSymbol.\\\\n\\\\taStyle ifNil: [self error: 'bad style'].\\\\n\\\\texisting _ self borderStyle.\\\\n\\\\taStyle width: existing width;\\\\n\\\\t\\\\tbaseColor: existing baseColor.\\\\n\\\\t^ (self canDrawBorder: aStyle)\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[aStyle]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[nil]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'ar 12/11/2001 22:14'!\\\\nborderStyle: newStyle\\\\n\\\\tnewStyle = self borderStyle ifFalse:[\\\\n\\\\t\\\\t(self canDrawBorder: newStyle) ifFalse:[\\\\n\\\\t\\\\t\\\\t\\\\\\\"Replace the suggested border with a simple one\\\\\\\"\\\\n\\\\t\\\\t\\\\t^self borderStyle: (BorderStyle width: newStyle width color: (newStyle trackColorFrom: self) color)].\\\\n\\\\t\\\\tself setProperty: #borderStyle toValue: newStyle.\\\\n\\\\t\\\\tself changed].! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'ar 8/25/2001 18:28'!\\\\nborderWidth\\\\n\\\\t^self borderStyle width! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'di 2/6/2001 14:02'!\\\\nborderWidthForRounding\\\\n\\\\n\\\\t^ self borderWidth! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'nk 4/14/2004 17:48'!\\\\nborderWidth: aNumber\\\\n\\\\t| style |\\\\n\\\\tstyle _ self borderStyle.\\\\n\\\\tstyle width = aNumber ifTrue: [ ^self ].\\\\n\\\\n\\\\tstyle style = #none\\\\n\\\\t\\\\tifTrue: [ self borderStyle: (SimpleBorder width: aNumber color: Color transparent) ]\\\\n\\\\t\\\\tifFalse: [ style width: aNumber. self changed ].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'dgd 9/1/2004 16:10'!\\\\nclearArea\\\\n\\\\t\\\\\\\"Answer the clear area of the receiver. It means the area free  \\\\n\\\\tof docking bars.\\\\\\\"\\\\n\\\\t| visTop visBottom visLeft visRight |\\\\n\\\\n\\\\tvisTop := self top.\\\\n\\\\tvisBottom := self bottom.\\\\n\\\\tvisLeft := self left.\\\\n\\\\tvisRight := self right.\\\\n\\\\n\\\\tself dockingBars\\\\n\\\\t\\\\tdo: [:each | \\\\n\\\\t\\\\t\\\\t(each isAdheringToTop and: [each bottom > visTop])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [visTop := each bottom].\\\\n\\\\n\\\\t\\\\t\\\\t(each isAdheringToBottom and: [each top < visBottom])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [visBottom := each top].\\\\n\\\\n\\\\t\\\\t\\\\t(each isAdheringToLeft and: [each right > visLeft])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [visLeft := each right].\\\\n\\\\n\\\\t\\\\t\\\\t(each isAdheringToRight and: [each left < visRight])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [visRight := each left]\\\\n\\\\t\\\\t].\\\\n\\\\n\\\\t^ Rectangle\\\\n\\\\t\\\\tleft: visLeft\\\\n\\\\t\\\\tright: visRight\\\\n\\\\t\\\\ttop: visTop\\\\n\\\\t\\\\tbottom: visBottom\\\\n! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'tk 2/15/2001 15:55'!\\\\ncolor\\\\n\\\\n\\\\t^ color \\\\t\\\\\\\"has already been set to ((self valueOfProperty: #fillStyle) asColor)\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'ar 8/15/2001 22:40'!\\\\ncolorForInsets\\\\n\\\\t\\\\\\\"Return the color to be used for shading inset borders.  The default is my own color, but it might want to be, eg, my owner's color.  Whoever's color ends up prevailing, the color itself gets the last chance to determine, so that when, for example, an InfiniteForm serves as the color, callers won't choke on some non-Color object being returned\\\\\\\"\\\\n\\\\t(color isColor and:[color isTransparent and:[owner notNil]]) ifTrue:[^owner colorForInsets].\\\\n\\\\t^ color colorForInsets\\\\n! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'ar 8/6/2001 09:03'!\\\\ncolor: aColor\\\\n\\\\t\\\\\\\"Set the receiver's color.  Directly set the color if appropriate, else go by way of fillStyle\\\\\\\"\\\\n\\\\n\\\\t(aColor isColor or: [aColor isKindOf: InfiniteForm]) ifFalse:[^ self fillStyle: aColor].\\\\n\\\\tcolor = aColor ifFalse:\\\\n\\\\t\\\\t[self removeProperty: #fillStyle.\\\\n\\\\t\\\\tcolor _ aColor.\\\\n\\\\t\\\\tself changed]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'dgd 4/4/2006 17:14'!\\\\nconnections\\\\n\\\\t\\\\\\\"Empty method in absence of connectors\\\\\\\"\\\\n\\\\t^ #()! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'ar 12/27/2001 17:56'!\\\\ncouldHaveRoundedCorners\\\\n\\\\t^ true! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'nk 4/15/2004 07:50'!\\\\ndoesBevels\\\\n\\\\t\\\\\\\"To return true means that this object can show bevelled borders, and\\\\n\\\\ttherefore can accept, eg, #raised or #inset as valid borderColors.\\\\n\\\\tMust be overridden by subclasses that do not support bevelled borders.\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'md 2/27/2006 09:53'!\\\\neventHandler\\\\n\\\\t\\\\\\\"answer the receiver's eventHandler\\\\\\\"\\\\n\\\\t^ extension ifNotNil: [extension eventHandler] ! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'dgd 2/16/2003 19:25'!\\\\neventHandler: anEventHandler \\\\n\\\\t\\\\\\\"Note that morphs can share eventHandlers and all is OK. \\\\\\\"\\\\n\\\\tself assureExtension eventHandler: anEventHandler! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'ar 9/22/2000 13:36'!\\\\nforwardDirection\\\\n\\\\t\\\\\\\"Return the receiver's forward direction (in eToy terms)\\\\\\\"\\\\n\\\\t^self valueOfProperty: #forwardDirection ifAbsent:[0.0]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'di 1/3/1999 12:25'!\\\\nhasTranslucentColor\\\\n\\\\t\\\\\\\"Answer true if this any of this morph is translucent but not transparent.\\\\\\\"\\\\n\\\\n\\\\t^ color isColor and: [color isTranslucentColor]\\\\n! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 11/30/1998 12:44'!\\\\nhighlight\\\\n\\\\t\\\\\\\"The receiver is being asked to appear in a highlighted state.  Mostly used for textual morphs\\\\\\\"\\\\n\\\\tself color: self highlightColor! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 3/6/1999 02:09'!\\\\nhighlightColor\\\\n\\\\t\\\\n\\\\t| val |\\\\n\\\\t^ (val _ self valueOfProperty: #highlightColor)\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t[val ifNil: [self error: 'nil highlightColor']]\\\\n\\\\t\\\\tifNil:\\\\n\\\\t\\\\t\\\\t[owner ifNil: [self color] ifNotNil: [owner highlightColor]]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 7/2/1998 13:51'!\\\\nhighlightColor: aColor\\\\n\\\\tself setProperty: #highlightColor toValue: aColor! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'tk 1/31/2002 10:25'!\\\\ninsetColor\\\\n\\\\towner ifNil:[^self color].\\\\n\\\\t^ self colorForInsets! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 6/13/2001 01:04'!\\\\nisFlap\\\\n\\\\t\\\\\\\"Answer whether the receiver claims to be a flap\\\\\\\"\\\\n\\\\n\\\\t^ self hasProperty: #flap! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'md 2/27/2006 09:53'!\\\\nisLocked\\\\n\\\\t\\\\\\\"answer whether the receiver is Locked\\\\\\\"\\\\n\\\\textension ifNil: [^ false].\\\\n\\\\t^ extension locked! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 10/27/2000 17:42'!\\\\nisShared\\\\n\\\\t\\\\\\\"Answer whether the receiver has the #shared property.  This property allows it to be treated as a 'background' item\\\\\\\"\\\\n\\\\n\\\\t^ self hasProperty: #shared! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'md 2/27/2006 09:57'!\\\\nisSticky\\\\n\\\\t\\\\\\\"answer whether the receiver is Sticky\\\\\\\"\\\\n\\\\textension ifNil: [^ false].\\\\n\\\\t^ extension sticky! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 8/4/97 12:05'!\\\\nlock\\\\n\\\\tself lock: true! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'md 2/27/2006 09:58'!\\\\nlock: aBoolean \\\\n\\\\t\\\\\\\"change the receiver's lock property\\\\\\\"\\\\n\\\\t(extension isNil and: [aBoolean not]) ifTrue: [^ self].\\\\n\\\\tself assureExtension locked: aBoolean! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 6/20/2001 15:45'!\\\\nmethodCommentAsBalloonHelp\\\\n\\\\t\\\\\\\"Given that I am a morph that is associated with an object and a method, answer a suitable method comment relating to that object & method if possible\\\\\\\"\\\\n\\\\n\\\\t| inherentSelector actual |\\\\n\\\\t(inherentSelector _ self valueOfProperty: #inherentSelector)\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t[(actual _ (self ownerThatIsA: PhraseTileMorph orA: SyntaxMorph) actualObject) ifNotNil:\\\\n\\\\t\\\\t\\\\t\\\\t[^ actual class precodeCommentOrInheritedCommentFor: inherentSelector]].\\\\n\\\\t^ nil! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 10/23/1999 22:35'!\\\\nmodelOrNil\\\\n\\\\t^ nil! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'md 2/27/2006 09:54'!\\\\nplayer\\\\n\\\\t\\\\\\\"answer the receiver's player\\\\\\\"\\\\n\\\\t^ extension ifNotNil: [extension player]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'dgd 4/4/2006 17:18'!\\\\nplayerRepresented\\\\n\\\\t\\\\\\\"Answer the player represented by the receiver.  Morphs that serve as references to other morphs reimplement this; be default a morph represents its own player.\\\\\\\"\\\\n\\\\n\\\\t^ self player! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'dgd 2/16/2003 21:53'!\\\\nplayer: anObject \\\\n\\\\t\\\\\\\"change the receiver's player\\\\\\\"\\\\n\\\\tself assureExtension player: anObject! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 3/3/1999 13:08'!\\\\npresenter\\\\n\\\\t^ owner ifNotNil: [owner presenter] ifNil: [self currentWorld presenter]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'dgd 3/7/2003 15:24'!\\\\nraisedColor\\\\n\\\\t\\\\\\\"Return the color to be used for shading raised borders. The \\\\n\\\\tdefault is my own color, but it might want to be, eg, my \\\\n\\\\towner's color. Whoever's color ends up prevailing, the color \\\\n\\\\titself gets the last chance to determine, so that when, for \\\\n\\\\texample, an InfiniteForm serves as the color, callers won't choke \\\\n\\\\ton some non-Color object being returned\\\\\\\"\\\\n\\\\t(color isColor\\\\n\\\\t\\\\t\\\\tand: [color isTransparent\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [owner notNil]])\\\\n\\\\t\\\\tifTrue: [^ owner raisedColor].\\\\n\\\\t^ color asColor raisedColor!\\\\n]style[(11 2 355 3 5 18 5 26 5 24 5 18 5 20)f2b,f2,f2c145043000,f2,f2cmagenta;,f2,f2cmagenta;,f2,f2cmagenta;,f2,f2cmagenta;,f2,f2cmagenta;,f2! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 3/6/1999 02:09'!\\\\nregularColor\\\\n\\\\t\\\\n\\\\t| val |\\\\n\\\\t^ (val _ self valueOfProperty: #regularColor)\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t[val ifNil: [self error: 'nil regularColor']]\\\\n\\\\t\\\\tifNil:\\\\n\\\\t\\\\t\\\\t[owner ifNil: [self color] ifNotNil: [owner regularColor]]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 7/2/1998 13:51'!\\\\nregularColor: aColor\\\\n\\\\tself setProperty: #regularColor toValue: aColor! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 8/29/2000 14:56'!\\\\nrememberedColor\\\\n\\\\t\\\\\\\"Answer a rememberedColor, or nil if none\\\\\\\"\\\\n\\\\n\\\\t^ self valueOfProperty: #rememberedColor ifAbsent: [nil]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 8/29/2000 15:47'!\\\\nrememberedColor: aColor\\\\n\\\\t\\\\\\\"Place aColor in a property so I can retrieve it later.  A tortuous but expedient flow of data\\\\\\\"\\\\n\\\\n\\\\t^ self setProperty: #rememberedColor toValue: aColor! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 11/15/2001 16:33'!\\\\nresistsRemoval\\\\n\\\\t\\\\\\\"Answer whether the receiver is marked as resisting removal\\\\\\\"\\\\n\\\\n\\\\t^ self hasProperty: #resistsRemoval! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 11/15/2001 16:33'!\\\\nresistsRemoval: aBoolean\\\\n\\\\t\\\\\\\"Set the receiver's resistsRemoval property as indicated\\\\\\\"\\\\n\\\\n\\\\taBoolean\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self setProperty: #resistsRemoval toValue: true]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self removeProperty: #resistsRemoval]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'nk 9/4/2004 10:49'!\\\\nscaleFactor\\\\n\\\\t^self valueOfProperty: #scaleFactor ifAbsent: [ 1.0 ]\\\\n! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 11/26/2001 16:16'!\\\\nsetBorderStyle: aSymbol\\\\n\\\\t\\\\\\\"Set the border style of my costume\\\\\\\"\\\\n\\\\n\\\\t| aStyle |\\\\n\\\\taStyle _ self borderStyleForSymbol: aSymbol.\\\\n\\\\taStyle ifNil: [^ self].\\\\n\\\\t(self canDrawBorder: aStyle)\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self borderStyle: aStyle]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'tk 12/4/1998 13:06'!\\\\nsqkPage\\\\n\\\\t^ self valueOfProperty: #SqueakPage! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'md 2/27/2006 08:33'!\\\\nsticky: aBoolean \\\\n\\\\t\\\\\\\"change the receiver's sticky property\\\\\\\"\\\\n\\\\textension sticky: aBoolean! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'RAA 2/19/2001 17:38'!\\\\ntoggleLocked\\\\n\\\\t\\\\n\\\\tself lock: self isLocked not! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 11/15/2001 12:21'!\\\\ntoggleResistsRemoval\\\\n\\\\t\\\\\\\"Toggle the resistsRemoval property\\\\\\\"\\\\n\\\\n\\\\tself resistsRemoval\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self removeProperty: #resistsRemoval]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self setProperty: #resistsRemoval toValue: true]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'md 2/27/2006 08:53'!\\\\ntoggleStickiness\\\\n\\\\t\\\\\\\"togle the receiver's Stickiness\\\\\\\"\\\\n\\\\textension ifNil: [^ self beSticky].\\\\n\\\\textension sticky: extension sticky not! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 11/30/1998 12:44'!\\\\nunHighlight\\\\n\\\\tself color: self regularColor! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'di 8/11/1998 12:33'!\\\\nunlock\\\\n\\\\tself lock: false! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'sw 8/15/97 23:59'!\\\\nunlockContents\\\\n\\\\tself submorphsDo:\\\\n\\\\t\\\\t[:m | m unlock]! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'tk 2/17/1999 11:45'!\\\\nurl\\\\n\\\\t\\\\\\\"If I have been assigned a url, return it.  For PasteUpMorphs mostly.\\\\\\\"\\\\n\\\\t| sq |\\\\n\\\\t(sq _ self sqkPage) ifNotNil: [^ sq url].\\\\n\\\\t^ self valueOfProperty: #url\\\\n\\\\t\\\\t! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'tk 12/16/1998 11:54'!\\\\nuserString\\\\n\\\\t\\\\\\\"Do I have a text string to be searched on?\\\\\\\"\\\\n\\\\n\\\\t^ nil! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'dgd 9/27/2004 11:45'!\\\\nviewBox\\\\n\\\\t^ self pasteUpMorph viewBox! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'dgd 9/1/2004 16:14'!\\\\nvisibleClearArea\\\\n\\\\t\\\\\\\"Answer the receiver visible clear area. The intersection \\\\n\\\\tbetween the clear area and the viewbox.\\\\\\\"\\\\n\\\\t^ self viewBox intersect: self clearArea! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'dgd 4/4/2006 17:14'!\\\\nwantsEmbeddingsVocabulary\\\\n\\\\t\\\\\\\"Empty method in absence of connectors\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'ar 6/23/2001 16:06'!\\\\nwantsToBeCachedByHand\\\\n\\\\t\\\\\\\"Return true if the receiver wants to be cached by the hand when it is dragged around.\\\\n\\\\tNote: The default implementation queries all submorphs since subclasses may have shapes that do not fill the receiver's bounds completely.\\\\\\\"\\\\n\\\\tself hasTranslucentColor ifTrue:[^false].\\\\n\\\\tself submorphsDo:[:m|\\\\n\\\\t\\\\tm wantsToBeCachedByHand ifFalse:[^false].\\\\n\\\\t].\\\\n\\\\t^true! !\\\\n\\\\n!Morph methodsFor: 'accessing' stamp: 'dgd 8/31/2004 16:21'!\\\\nwantsToBeTopmost\\\\n\\\\t\\\\\\\"Answer if the receiver want to be one of the topmost objects in its owner\\\\\\\"\\\\n\\\\t^ self isFlapOrTab! !\\\\n\\\\n\\\\n!Morph methodsFor: 'accessing - extension' stamp: 'md 2/27/2006 08:46'!\\\\nassureExtension\\\\n\\\\t\\\\\\\"creates an extension for the receiver if needed\\\\\\\"\\\\n\\\\textension ifNil: [self initializeExtension].\\\\n\\\\t^ extension! !\\\\n\\\\n!Morph methodsFor: 'accessing - extension' stamp: 'dgd 2/16/2003 19:22'!\\\\nextension\\\\n\\\\t\\\\\\\"answer the recevier's extension\\\\\\\"\\\\n\\\\t^ extension! !\\\\n\\\\n!Morph methodsFor: 'accessing - extension' stamp: 'md 2/27/2006 08:31'!\\\\nhasExtension\\\\n\\\\t\\\\\\\"answer whether the receiver has extention\\\\\\\"\\\\n\\\\t^ extension notNil! !\\\\n\\\\n!Morph methodsFor: 'accessing - extension' stamp: 'md 2/27/2006 08:35'!\\\\ninitializeExtension\\\\n\\\\t\\\\\\\"private - initializes the receiver's extension\\\\\\\"\\\\n\\\\textension := MorphExtension new! !\\\\n\\\\n!Morph methodsFor: 'accessing - extension' stamp: 'md 2/27/2006 08:46'!\\\\nprivateExtension: aMorphExtension\\\\n\\\\t\\\\\\\"private - change the receiver's extension\\\\\\\"\\\\n\\\\textension := aMorphExtension! !\\\\n\\\\n!Morph methodsFor: 'accessing - extension' stamp: 'md 2/27/2006 08:47'!\\\\nresetExtension\\\\n\\\\t\\\\\\\"reset the extension slot if it is not needed\\\\\\\"\\\\n\\\\t(extension notNil and: [extension isDefault]) ifTrue: [extension := nil] ! !\\\\n\\\\n\\\\n!Morph methodsFor: 'accessing - properties' stamp: 'md 2/27/2006 09:47'!\\\\nhasProperty: aSymbol \\\\n\\\\t\\\\\\\"Answer whether the receiver has the property named aSymbol\\\\\\\"\\\\n\\\\textension ifNil: [^ false].\\\\n\\\\t^extension hasProperty: aSymbol! !\\\\n\\\\n!Morph methodsFor: 'accessing - properties' stamp: 'md 2/27/2006 09:47'!\\\\notherProperties\\\\n\\\\t\\\\\\\"answer the receiver's otherProperties\\\\\\\"\\\\n\\\\t^ extension ifNotNil: [extension otherProperties]! !\\\\n\\\\n!Morph methodsFor: 'accessing - properties' stamp: 'md 2/27/2006 09:48'!\\\\nremoveProperty: aSymbol \\\\n\\\\t\\\\\\\"removes the property named aSymbol if it exists\\\\\\\"\\\\n\\\\textension ifNil:  [^ self].\\\\n\\\\textension removeProperty: aSymbol! !\\\\n\\\\n!Morph methodsFor: 'accessing - properties' stamp: 'tk 10/9/2002 08:30'!\\\\nsetProperties: aList\\\\n\\\\t\\\\\\\"Set many properties at once from a list of prop, value, prop, value\\\\\\\"\\\\n\\\\n\\\\t1 to: aList size by: 2 do: [:ii |\\\\n\\\\t\\\\tself setProperty: (aList at: ii) toValue: (aList at: ii+1)].! !\\\\n\\\\n!Morph methodsFor: 'accessing - properties' stamp: 'md 2/27/2006 09:48'!\\\\nsetProperty: aSymbol toValue: anObject \\\\n\\\\t\\\\\\\"change the receiver's property named aSymbol to anObject\\\\\\\"\\\\n\\\\tanObject ifNil: [^ self removeProperty: aSymbol].\\\\n\\\\tself assureExtension setProperty: aSymbol toValue: anObject! !\\\\n\\\\n!Morph methodsFor: 'accessing - properties' stamp: 'md 2/27/2006 08:53'!\\\\nvalueOfProperty: aSymbol \\\\n\\\\t\\\\\\\"answer the value of the receiver's property named aSymbol\\\\\\\"\\\\n\\\\t^ extension ifNotNil: [extension valueOfProperty: aSymbol]! !\\\\n\\\\n!Morph methodsFor: 'accessing - properties' stamp: 'dgd 2/16/2003 20:55'!\\\\nvalueOfProperty: aSymbol ifAbsentPut: aBlock \\\\n\\\\t\\\\\\\"If the receiver possesses a property of the given name, answer  \\\\n\\\\tits value. If not, then create a property of the given name, give \\\\n\\\\tit the value obtained by evaluating aBlock, then answer that  \\\\n\\\\tvalue\\\\\\\"\\\\n\\\\t^ self assureExtension valueOfProperty: aSymbol ifAbsentPut: aBlock! !\\\\n\\\\n!Morph methodsFor: 'accessing - properties' stamp: 'md 2/27/2006 08:50'!\\\\nvalueOfProperty: aSymbol ifAbsent: aBlock \\\\n\\\\t\\\\\\\"if the receiver possesses a property of the given name, answer  \\\\n\\\\tits value. If not then evaluate aBlock and answer the result of  \\\\n\\\\tthis block evaluation\\\\\\\"\\\\n\\\\t^ extension \\\\n\\\\t\\\\tifNotNil: [extension valueOfProperty: aSymbol ifAbsent: aBlock]\\\\n\\\\t\\\\tifNil: [aBlock value]! !\\\\n\\\\n!Morph methodsFor: 'accessing - properties' stamp: 'md 2/27/2006 08:49'!\\\\nvalueOfProperty: aSymbol ifPresentDo: aBlock \\\\n\\\\t\\\\\\\"If the receiver has a property of the given name, evaluate  \\\\n\\\\taBlock on behalf of the value of that property\\\\\\\"\\\\n\\\\textension ifNil:  [^ self].\\\\n\\\\t^ aBlock value: (extension valueOfProperty: aSymbol ifAbsent: [^ self])! !\\\\n\\\\n\\\\n!Morph methodsFor: 'caching' stamp: 'jm 11/13/97 16:35'!\\\\nfullLoadCachedState\\\\n\\\\t\\\\\\\"Load the cached state of the receiver and its full submorph tree.\\\\\\\"\\\\n\\\\n\\\\tself allMorphsDo: [:m | m loadCachedState].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'caching' stamp: 'jm 11/13/97 16:34'!\\\\nfullReleaseCachedState\\\\n\\\\t\\\\\\\"Release the cached state of the receiver and its full submorph tree.\\\\\\\"\\\\n\\\\n\\\\tself allMorphsDo: [:m | m releaseCachedState].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'caching' stamp: 'jm 11/13/97 16:37'!\\\\nloadCachedState\\\\n\\\\t\\\\\\\"Load the cached state of this morph. This method may be called to pre-load the cached state of a morph to avoid delays when it is first used. (Cached state can always be recompued on demand, so a morph should not rely on this method being called.) Implementations of this method should do 'super loadCachedState'. This default implementation does nothing.\\\\\\\"\\\\n! !\\\\n\\\\n!Morph methodsFor: 'caching' stamp: 'md 4/3/2006 12:02'!\\\\nreleaseCachedState\\\\n\\\\t\\\\\\\"Release any state that can be recomputed on demand, such as the pixel values for a color gradient or the editor state for a TextMorph. This method may be called to save space when a morph becomes inaccessible. Implementations of this method should do 'super releaseCachedState'.\\\\\\\"\\\\n\\\\tself borderStyle releaseCachedState. \\\\n! !\\\\n\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'sd 3/30/2005 22:04'!\\\\nabstractAModel\\\\n\\\\t\\\\\\\"Find data-containing fields in me.  Make a new class, whose instance variables are named for my fields, and whose values are the values I am showing.  Use a CardPlayer for now.  Force the user to name the fields.  Make slots for text, Number Watchers, SketchMorphs, and ImageMorphs.\\\\\\\"\\\\n\\\\n\\\\t| instVarNames unnamed ans player twoListsOfMorphs holdsSepData docks oldPlayer iVarName |\\\\n\\\\t(oldPlayer := self player) ifNotNil: \\\\n\\\\t\\\\t\\\\t[oldPlayer belongsToUniClass \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"Player\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\toldPlayer class instVarNames notEmpty \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[self \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinform: 'I already have a regular Player, so I can''t have a CardPlayer'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^true]]].\\\\n\\\\ttwoListsOfMorphs := StackMorph discoverSlots: self.\\\\n\\\\tholdsSepData := twoListsOfMorphs first.\\\\n\\\\tinstVarNames := ''.\\\\n\\\\tholdsSepData do: \\\\n\\\\t\\\\t\\\\t[:ea | \\\\n\\\\t\\\\t\\\\tiVarName := Scanner wellFormedInstanceVariableNameFrom: ea knownName.\\\\n\\\\t\\\\t\\\\tiVarName = ea knownName ifFalse: [ea name: iVarName].\\\\n\\\\t\\\\t\\\\tinstVarNames := instVarNames , iVarName , ' '].\\\\n\\\\tunnamed := twoListsOfMorphs second.\\\\t\\\\\\\"have default names\\\\\\\"\\\\n\\\\tinstVarNames isEmpty \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[self \\\\n\\\\t\\\\t\\\\t\\\\tinform: 'No named fields were found.\\\\nPlease get a halo on each field and give it a name.\\\\nLabels or non-data fields should be named \\\\\\\"shared xxx\\\\\\\".'.\\\\n\\\\t\\\\t\\\\t^false].\\\\n\\\\tunnamed notEmpty \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[ans := PopUpMenu \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tconfirm: 'Data fields are ' , instVarNames printString \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t, ('\\\\\\\\Some fields are not named.  Are they labels or non-data fields?' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t, '\\\\\\\\Please get a halo on each data field and give it a name.') withCRs\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttrueChoice: 'All other fields are non-data fields'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfalseChoice: 'Stop.  Let me give a name to some more fields'.\\\\n\\\\t\\\\t\\\\tans ifFalse: [^false]].\\\\n\\\\tunnamed \\\\n\\\\t\\\\twithIndexDo: [:mm :ind | mm setName: 'shared label ' , ind printString].\\\\n\\\\t\\\\\\\"Make a Player with instVarNames.  Make me be the costume\\\\\\\"\\\\n\\\\tplayer := CardPlayer instanceOfUniqueClassWithInstVarString: instVarNames\\\\n\\\\t\\\\t\\\\t\\\\tandClassInstVarString: ''.\\\\n\\\\tself player: player.\\\\n\\\\tplayer costume: self.\\\\n\\\\t\\\\\\\"Fill in the instance values.  Make docks first.\\\\\\\"\\\\n\\\\tdocks := OrderedCollection new.\\\\n\\\\tholdsSepData do: \\\\n\\\\t\\\\t\\\\t[:morph | \\\\n\\\\t\\\\t\\\\tmorph setProperty: #shared toValue: true.\\\\t\\\\\\\"in case it is deeply embedded\\\\\\\"\\\\n\\\\t\\\\t\\\\tmorph setProperty: #holdsSeparateDataForEachInstance toValue: true.\\\\n\\\\t\\\\t\\\\tplayer class compileInstVarAccessorsFor: morph knownName.\\\\n\\\\t\\\\t\\\\tmorph isSyntaxMorph ifTrue: [morph setTarget: player].\\\\t\\\\\\\"hookup the UpdatingString!!\\\\\\\"\\\\n\\\\t\\\\t\\\\tdocks addAll: morph variableDocks].\\\\n\\\\tplayer class newVariableDocks: docks.\\\\n\\\\tdocks do: [:dd | dd storeMorphDataInInstance: player].\\\\n\\\\t\\\\\\\"oldPlayer class mdict do: [:assoc | move to player].\\\\tmove methods to new class?\\\\\\\"\\\\n\\\\t\\\\\\\"oldPlayer become: player.\\\\\\\"\\\\n\\\\t^true\\\\t\\\\\\\"success\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'tk 11/2/2001 13:31'!\\\\nbeAStackBackground\\\\n\\\\t\\\\\\\"Transform the receiver into one that has stack-background behavior.  If just becoming a stack, allocate a uniclass to represent the cards (if one does not already exist\\\\\\\"\\\\n\\\\n\\\\tself assuredCardPlayer assureUniClass.\\\\n\\\\tself setProperty: #tabAmongFields toValue: true.\\\\n\\\\tself setProperty: #stackBackground toValue: true.\\\\n\\\\t\\\\\\\"put my submorphs onto the background\\\\\\\"\\\\n\\\\tsubmorphs do: [:mm | mm setProperty: #shared toValue: true].\\\\n\\\\tself reassessBackgroundShape! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'sw 11/8/2002 14:57'!\\\\nbecomeSharedBackgroundField\\\\n\\\\t\\\\\\\"Mark the receiver as holding separate data for each instance (i.e., like a 'background field') and reassess the shape of the corresponding background so that it will be able to accommodate this arrangement.\\\\\\\"\\\\n\\\\n\\\\t((self hasProperty: #shared) and: [self hasProperty: #holdsSeparateDataForEachInstance])\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[self setProperty: #shared toValue: true.\\\\n\\\\t\\\\t\\\\tself setProperty: #holdsSeparateDataForEachInstance toValue: true.\\\\n\\\\t\\\\t\\\\tself stack reassessBackgroundShape]! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'tk 10/30/2001 18:54'!\\\\ncontainsCard: aCard\\\\n\\\\t\\\\\\\"Answer whether the given card belongs to the uniclass representing the receiver\\\\\\\"\\\\n\\\\n\\\\t^ self isStackBackground and: [aCard isKindOf: self player class baseUniclass]! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'sw 10/27/2000 17:36'!\\\\ncouldHoldSeparateDataForEachInstance\\\\n\\\\t\\\\\\\"Answer whether this type of morph is inherently capable of holding separate data for each instance ('card data')\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'tk 10/30/2001 13:32'!\\\\ncurrentDataInstance\\\\n\\\\t\\\\\\\"Answer the current data instance\\\\\\\"\\\\n\\\\n\\\\t^ self player! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'tk 10/30/2001 13:33'!\\\\nexplainDesignations\\\\n\\\\t\\\\\\\"Hand the user an object that contains explanations for the designation feedback used\\\\\\\"\\\\n\\\\n\\\\tStackMorph designationsExplainer openInHand\\\\n\\\\n\\\\t\\\\\\\"self currentWorld explainDesignations\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'sw 10/23/2000 14:49'!\\\\ngoToNextCardInStack\\\\n\\\\t\\\\\\\"Tell my stack to advance to the next page\\\\\\\"\\\\n\\\\n\\\\tself stackDo: [:aStack | aStack goToNextCardInStack]! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'sw 10/23/2000 14:52'!\\\\ngoToPreviousCardInStack\\\\n\\\\t\\\\\\\"Tell my stack to advance to the previous card\\\\\\\"\\\\n\\\\t\\\\n\\\\tself stackDo: [:aStack | aStack goToPreviousCardInStack]! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'sw 10/27/2000 17:41'!\\\\nholdsSeparateDataForEachInstance\\\\n\\\\t\\\\\\\"Answer whether the receiver is currently behaving as a 'background field', i.e., whether it is marked as shared (viz. occurring on the background of a stack) *and* is marked as holding separate data for each instance\\\\\\\"\\\\n\\\\n\\\\t^ self isShared and: [self hasProperty: #holdsSeparateDataForEachInstance]! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'yo 2/17/2005 17:47'!\\\\ninsertAsStackBackground\\\\n\\\\t\\\\\\\"I am not yet in a stack.  Find a Stack that my reference point (center) overlaps, and insert me as a new background.\\\\\\\"\\\\n\\\\n\\\\t| aMorph |\\\\n\\\\tself isStackBackground ifTrue: [^ Beeper beep].\\\\t\\\\n\\\\t\\\\t\\\\\\\"already in a stack.  Must clear flags when remove.\\\\\\\"\\\\n\\\\\\\"\\\\tself potentialEmbeddingTargets do: [:mm |   No, force user to choose a stack.  \\\\n\\\\t\\\\t(mm respondsTo: #insertAsBackground:resize:) ifTrue: [\\\\n\\\\t\\\\t\\\\t^ mm insertAsBackground: self resize: false]].\\\\n\\\\\\\"\\\\n\\\\t\\\\\\\"None found, ask user\\\\\\\"\\\\n\\\\tself inform: 'Please click on a Stack' translated.\\\\n\\\\tSensor waitNoButton.\\\\n\\\\taMorph _ self world chooseClickTarget.\\\\n\\\\taMorph ifNil: [^ self].\\\\n\\\\t(aMorph ownerThatIsA: StackMorph) insertAsBackground: self resize: false.! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'tk 10/30/2001 13:35'!\\\\ninsertCard\\\\n\\\\t\\\\\\\"Insert a new card in the stack, with the receiver as its background, and have it become the current card of the stack\\\\\\\"\\\\n\\\\n\\\\tself stackDo: [:aStack | aStack insertCardOfBackground: self]! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'sw 11/8/2002 15:16'!\\\\ninstallAsCurrent: anInstance\\\\n\\\\t\\\\\\\"Install anInstance as the one currently viewed in the receiver.  Dock up all the morphs in the receiver which contain data rooted in the player instance to the instance data.  Run any 'opening' scripts that pertain.\\\\\\\"\\\\n\\\\n\\\\t| fieldList itsFocus |\\\\n\\\\tself player == anInstance ifTrue: [^ self].\\\\n\\\\tfieldList _ self allMorphs select:\\\\n\\\\t\\\\t[:aMorph | (aMorph wouldAcceptKeyboardFocusUponTab) and: [aMorph isLocked not]].\\\\n\\\\tself currentWorld hands do:\\\\n\\\\t\\\\t[:aHand | (itsFocus _ aHand keyboardFocus) notNil ifTrue:\\\\n\\\\t\\\\t\\\\t[(fieldList includes: itsFocus) ifTrue: [aHand newKeyboardFocus: nil]]].\\\\n\\\\n\\\\tself player uninstallFrom: self.  \\\\\\\"out with the old\\\\\\\"\\\\n\\\\n\\\\tanInstance installPrivateMorphsInto: self.\\\\n\\\\tself changed.\\\\n\\\\tanInstance costume: self.\\\\n\\\\tself player: anInstance.\\\\n\\\\tself player class variableDocks do:\\\\n\\\\t\\\\t[:aVariableDock | aVariableDock dockMorphUpToInstance: anInstance].\\\\n\\\\tself currentWorld startSteppingSubmorphsOf: self! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'tk 10/30/2001 13:42'!\\\\nisStackBackground\\\\n\\\\t\\\\\\\"Answer whether the receiver serves as a background of a stack\\\\\\\"\\\\n\\\\n\\\\t^ ((owner isKindOf: StackMorph) and: [owner currentPage == self]) or:\\\\n\\\\t\\\\t[self hasProperty: #stackBackground]\\\\n\\\\n\\\\t\\\\\\\"This odd property-based check is because when a paste-up-morph is not the *current* background of a stack, it is maddeningly ownerlyess\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'tk 11/2/2001 13:38'!\\\\nmakeHoldSeparateDataForEachInstance\\\\n\\\\t\\\\\\\"Mark the receiver as holding separate data for each instance (i.e., like a 'background field') and reassess the shape of the corresponding background so that it will be able to accommodate this arrangement.\\\\\\\"\\\\n\\\\n\\\\tself setProperty: #holdsSeparateDataForEachInstance toValue: true.\\\\n\\\\tself stack reassessBackgroundShape.! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'nb 6/17/2003 12:25'!\\\\nnewCard\\\\n\\\\t\\\\\\\"Create a new card for the receiver and return it\\\\\\\"\\\\n\\\\n\\\\t| aNewInstance |\\\\n\\\\tself isStackBackground ifFalse: [^ Beeper beep].  \\\\\\\"bulletproof against deconstruction\\\\\\\"\\\\n\\\\taNewInstance _ self player class baseUniclass new.\\\\n\\\\t^ aNewInstance! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'md 10/22/2003 15:52'!\\\\nreassessBackgroundShape\\\\n\\\\t\\\\\\\"A change has been made which may affect the instance structure of the Card uniclass that holds the instance state, which can also be thought of as the 'card data'.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Caution: still to be done: the mechanism so that when a new instance variable is added, it gets initialized in all subinstances of the receiver's player, which are the cards of this shape.  One needs to take into account here the instance variable names coming in; those that are unchanged should keep their values, but those that have newly arrived should obtain their default values from the morphs on whose behalf they are being maintained in the model\\\\\\\"\\\\n\\\\n\\\\t| takenNames uniqueName requestedName variableDocks docks sepDataMorphs sorted existing name1 name2 |\\\\n\\\\tself isStackBackground ifFalse: [^Beeper beep].\\\\t\\\\\\\"bulletproof against deconstruction\\\\\\\"\\\\n\\\\tCursor wait showWhile: \\\\n\\\\t\\\\t\\\\t[variableDocks := OrderedCollection new.\\\\t\\\\\\\"This will be stored in the uniclass's \\\\n\\\\t\\\\t\\\\tclass-side inst var #variableDocks\\\\\\\"\\\\n\\\\t\\\\t\\\\ttakenNames := OrderedCollection new.\\\\n\\\\t\\\\t\\\\tsepDataMorphs := OrderedCollection new.\\\\t\\\\\\\"fields, holders of per-card data\\\\\\\"\\\\n\\\\t\\\\t\\\\tself submorphs do: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:aMorph | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\taMorph renderedMorph holdsSeparateDataForEachInstance \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [sepDataMorphs add: aMorph renderedMorph]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"look for buried fields, inside a frame\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taMorph renderedMorph isShared \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[aMorph allMorphs do: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:mm | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmm renderedMorph holdsSeparateDataForEachInstance \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [sepDataMorphs add: mm renderedMorph]]]]].\\\\n\\\\t\\\\t\\\\tsorted := SortedCollection new \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsortBlock: [:a :b | (a valueOfProperty: #cardInstance) notNil].\\\\t\\\\\\\"puts existing ones first\\\\\\\"\\\\n\\\\t\\\\t\\\\tsorted addAll: sepDataMorphs.\\\\n\\\\t\\\\t\\\\tsorted do: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:aMorph | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdocks := aMorph variableDocks.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Each morph can request multiple variables.  \\\\n\\\\tThis complicates matters somewhat but creates a generality for Fabrk-like uses.\\\\n\\\\tEach spec is an instance of VariableDock, and it provides a point of departure\\\\n\\\\tfor the negotiation between the PasteUp and its constitutent morphs\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdocks do: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:aVariableDock | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tuniqueName := self player \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tuniqueInstanceVariableNameLike: (requestedName := aVariableDock \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tvariableName)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\texcluding: takenNames.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tuniqueName ~= requestedName \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[aVariableDock variableName: uniqueName.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taMorph noteNegotiatedName: uniqueName for: requestedName].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttakenNames add: uniqueName].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tvariableDocks addAll: docks].\\\\n\\\\t\\\\t\\\\texisting := self player class instVarNames.\\\\n\\\\t\\\\t\\\\tvariableDocks := (variableDocks asSortedCollection: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:dock1 :dock2 | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tname1 := dock1 variableName.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tname2 := dock2 variableName.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(existing indexOf: name1 ifAbsent: [0]) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t< (existing indexOf: name2 ifAbsent: [variableDocks size])]) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tasOrderedCollection.\\\\n\\\\t\\\\t\\\\tself player class setNewInstVarNames: (variableDocks \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcollect: [:info | info variableName asString]).\\\\n\\\\t\\\\t\\\\t\\\\\\\"NB: sets up accessors, and removes obsolete ones\\\\\\\"\\\\n\\\\t\\\\t\\\\tself player class newVariableDocks: variableDocks]! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'tk 10/30/2001 13:46'!\\\\nrelaxGripOnVariableNames\\\\n\\\\t\\\\\\\"Abandon any memory of specific variable names that should be preserved.  The overall situation here is not yet completely understood, and this relaxation is basically always done on each reassessment of the background shape nowadays.  But this doesn't feel quite right, because if the user has somehow intervened to specify certain name preference we should perhaps honored it.  Or perhaps that is no longer relevant.  ????\\\\\\\"\\\\n\\\\n\\\\tself submorphs do:\\\\n\\\\t\\\\t[:m | m removeProperty: #variableName.\\\\n\\\\t\\\\tm removeProperty: #setterSelector].\\\\n\\\\tself reassessBackgroundShape\\\\n! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'tk 10/30/2001 13:47'!\\\\nreshapeBackground\\\\n\\\\t\\\\\\\"Abandon any memory of variable-name preferences, and reassess the shape of the background\\\\\\\"\\\\n\\\\n\\\\tself relaxGripOnVariableNames.\\\\n\\\\t\\\\\\\"self reassessBackgroundShape.\\\\talready done there\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'sw 10/24/2000 06:30'!\\\\nsetAsDefaultValueForNewCard\\\\n\\\\t\\\\\\\"Set the receiver's current value as the one to be used to supply the default value for a variable on a new card.  This implementation does not support multiple variables per morph, which is problematical\\\\\\\"\\\\n\\\\n\\\\tself setProperty: #defaultValue toValue: self currentDataValue deepCopy! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'tk 10/30/2001 13:48'!\\\\nshowBackgroundObjects\\\\n\\\\t\\\\\\\"Momentarily highlight just the background objects on the current playfield\\\\\\\"\\\\n\\\\n\\\\tself isStackBackground ifFalse: [^ self].\\\\n\\\\tself invalidRect: self bounds.\\\\n\\\\tself currentWorld doOneCycle.\\\\n\\\\tDisplay restoreAfter:\\\\n\\\\t\\\\t[self submorphsDo:\\\\n\\\\t\\\\t\\\\t[:aMorph | (aMorph renderedMorph hasProperty: #shared)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[Display border: (aMorph fullBoundsInWorld insetBy: -6) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twidth: 6 rule: Form over fillColor: Color blue]]]! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'aoy 2/15/2003 21:50'!\\\\nshowDesignationsOfObjects\\\\n\\\\t\\\\\\\"Momentarily show the designations of objects on the receiver\\\\\\\"\\\\n\\\\n\\\\t| colorToUse aLabel |\\\\n\\\\tself isStackBackground ifFalse: [^self].\\\\n\\\\tself submorphsDo: \\\\n\\\\t\\\\t\\\\t[:aMorph | \\\\n\\\\t\\\\t\\\\taLabel :=aMorph renderedMorph holdsSeparateDataForEachInstance \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[colorToUse := Color orange.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t aMorph externalName]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[colorToUse := aMorph isShared ifFalse: [Color red] ifTrue: [Color green].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t nil].\\\\n\\\\t\\\\t\\\\tDisplay \\\\n\\\\t\\\\t\\\\t\\\\tborder: (aMorph fullBoundsInWorld insetBy: -6)\\\\n\\\\t\\\\t\\\\t\\\\twidth: 6\\\\n\\\\t\\\\t\\\\t\\\\trule: Form over\\\\n\\\\t\\\\t\\\\t\\\\tfillColor: colorToUse.\\\\n\\\\t\\\\t\\\\taLabel ifNotNil: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[aLabel asString \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdisplayOn: Display\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tat: aMorph fullBoundsInWorld bottomLeft + (0 @ 5)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttextColor: Color blue]].\\\\n\\\\tSensor anyButtonPressed \\\\n\\\\t\\\\tifTrue: [Sensor waitNoButton]\\\\n\\\\t\\\\tifFalse: [Sensor waitButton].\\\\n\\\\tWorld fullRepaintNeeded! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'tk 10/30/2001 13:50'!\\\\nshowForegroundObjects\\\\n\\\\t\\\\\\\"Temporarily highlight the foreground objects\\\\\\\"\\\\n\\\\n\\\\tself isStackBackground ifFalse: [^ self].\\\\n\\\\tDisplay restoreAfter:\\\\n\\\\t\\\\t[self submorphsDo:\\\\n\\\\t\\\\t\\\\t[:aMorph | aMorph renderedMorph isShared\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[Display border: (aMorph fullBoundsInWorld insetBy: -6) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twidth: 6 rule: Form over fillColor: Color orange]]]! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'tk 11/2/2001 13:53'!\\\\nstack\\\\n\\\\t\\\\\\\"Answer the nearest containing Stack, or, if none, a stack in the current project, and if still none, nil.  The extra messiness is because uninstalled backgrounds don't have an owner pointers to their stack.\\\\\\\"\\\\n\\\\n\\\\t| aStack bkgnd |\\\\n\\\\tbkgnd _ self orOwnerSuchThat: [:oo | oo hasProperty: #myStack].\\\\n\\\\tbkgnd ifNotNil: [^ bkgnd valueOfProperty: #myStack].\\\\n\\\\n\\\\t\\\\\\\"fallbacks\\\\\\\"\\\\n\\\\t(aStack _ self ownerThatIsA: StackMorph) ifNotNil: [^ aStack].\\\\n\\\\t^ Project current currentStack! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'sw 10/23/2000 14:38'!\\\\nstackDo: aBlock\\\\n\\\\t\\\\\\\"If the receiver has a stack, evaluate aBlock on its behalf\\\\\\\"\\\\n\\\\n\\\\t| aStack |\\\\n\\\\t(aStack _ self ownerThatIsA: StackMorph) ifNotNil:\\\\n\\\\t\\\\t[^ aBlock value: aStack]! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'tk 11/2/2001 13:38'!\\\\nstopHoldingSeparateDataForEachInstance\\\\n\\\\t\\\\\\\"Make the receiver no longer hold separate data for each instance\\\\\\\"\\\\n\\\\n\\\\tself removeProperty: #holdsSeparateDataForEachInstance.\\\\n\\\\tself stack reassessBackgroundShape.! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'dgd 8/28/2004 19:15'!\\\\ntabHitWithEvent: anEvent\\\\n\\\\t\\\\\\\"The tab key was hit.  The keyboard focus has referred this event to me, though this perhaps seems rather backwards.  Anyway, the assumption is that I have the property #tabAmongFields, so now the task is to tab to the next field.\\\\\\\"\\\\n\\\\n\\\\t| currentFocus fieldList anIndex itemToHighlight variableBearingMorphs otherAmenableMorphs |\\\\n\\\\tcurrentFocus _ anEvent hand keyboardFocus.\\\\n\\\\tfieldList _ self allMorphs select:\\\\n\\\\t\\\\t[:aMorph | (aMorph wouldAcceptKeyboardFocusUponTab) and: [aMorph isLocked not]].\\\\n\\\\n\\\\tfieldList isEmpty ifTrue:[^ self].\\\\n\\\\n\\\\tvariableBearingMorphs _ self player isNil\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue:[#()]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse:[self player class variableDocks collect: [:vd | vd definingMorph] thenSelect: [:m | m isInWorld]].\\\\n\\\\totherAmenableMorphs _ (self allMorphs select:\\\\n\\\\t\\\\t[:aMorph | (aMorph wouldAcceptKeyboardFocusUponTab) and: [aMorph isLocked not]])\\\\n\\\\t\\\\t\\\\tcopyWithoutAll: variableBearingMorphs.\\\\n\\\\tfieldList _ variableBearingMorphs, otherAmenableMorphs.\\\\n\\\\n\\\\tanIndex _ fieldList indexOf: currentFocus ifAbsent: [nil].\\\\n\\\\titemToHighlight _ fieldList atWrap: \\\\n\\\\t\\\\t(anIndex ifNotNil: [anEvent shiftPressed ifTrue: [anIndex - 1] ifFalse: [anIndex + 1]]\\\\n\\\\t\\\\t\\\\t\\\\tifNil: [1]).\\\\n\\\\tanEvent hand newKeyboardFocus: itemToHighlight. self flag: #arNote. \\\\\\\"really???\\\\\\\"\\\\n\\\\titemToHighlight editor selectAll.\\\\n\\\\titemToHighlight invalidRect: itemToHighlight bounds ! !\\\\n\\\\n!Morph methodsFor: 'card in a stack' stamp: 'tk 11/4/2001 20:57'!\\\\nwrapWithAStack\\\\n\\\\t\\\\\\\"Install me as a card inside a new stack.  The stack has no border or controls, so I my look is unchanged.  If I don't already have a CardPlayer, find my data fields and make one.  Be ready to make new cards in the stack that look like me, but hold different field data.\\\\\\\"\\\\n\\\\n\\\\tself player class officialClass == CardPlayer ifFalse: [\\\\n\\\\t\\\\tself abstractAModel ifFalse: [^ false]].\\\\n\\\\tStackMorph new initializeWith: self.\\\\n\\\\tself stack addHalo.\\\\t\\\\\\\"Makes it easier for the user\\\\\\\"! !\\\\n\\\\n\\\\n!Morph methodsFor: 'change reporting' stamp: 'ar 8/12/2003 21:50'!\\\\naddedMorph: aMorph\\\\n\\\\t\\\\\\\"Notify the receiver that the given morph was just added.\\\\\\\"\\\\n! !\\\\n\\\\n!Morph methodsFor: 'change reporting' stamp: 'sw 9/10/1998 08:18'!\\\\ncolorChangedForSubmorph: aSubmorph\\\\n\\\\t\\\\\\\"The color associated with aSubmorph was changed through the UI; react if needed\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'change reporting' stamp: 'ar 11/12/2000 18:50'!\\\\ninvalidRect: damageRect\\\\n\\\\t^self invalidRect: damageRect from: self! !\\\\n\\\\n!Morph methodsFor: 'change reporting' stamp: 'md 4/3/2006 11:52'!\\\\ninvalidRect: aRectangle from: aMorph\\\\n\\\\t| damageRect |\\\\n\\\\taRectangle hasPositiveExtent ifFalse: [ ^self ].\\\\n\\\\tdamageRect _ aRectangle.\\\\n\\\\taMorph == self ifFalse:[\\\\n\\\\t\\\\t\\\\\\\"Clip to receiver's clipping bounds if the damage came from a child\\\\\\\"\\\\n\\\\t\\\\tself clipSubmorphs \\\\n\\\\t\\\\t\\\\tifTrue:[damageRect _ aRectangle intersect: self clippingBounds]].\\\\n\\\\towner ifNotNil: [owner invalidRect: damageRect from: self].! !\\\\n\\\\n!Morph methodsFor: 'change reporting' stamp: 'sw 7/8/1998 13:21'!\\\\nownerChanged\\\\n\\\\t\\\\\\\"The receiver's owner, some kind of a pasteup, has changed its layout.\\\\\\\"\\\\n\\\\n\\\\tself snapToEdgeIfAppropriate! !\\\\n\\\\n!Morph methodsFor: 'change reporting' stamp: 'ar 8/12/2003 22:26'!\\\\nprivateInvalidateMorph: aMorph\\\\n\\\\t\\\\\\\"Private. Invalidate the given morph after adding or removing.\\\\n\\\\tThis method is private because a) we're invalidating the morph 'remotely'\\\\n\\\\tand b) it forces a fullBounds computation which should not be necessary\\\\n\\\\tfor a general morph c) the morph may or may not actually invalidate\\\\n\\\\tanything (if it's not in the world nothing will happen) and d) the entire\\\\n\\\\tmechanism should be rewritten.\\\\\\\"\\\\n\\\\taMorph fullBounds.\\\\n\\\\taMorph changed! !\\\\n\\\\n!Morph methodsFor: 'change reporting' stamp: 'tk 8/24/2001 22:07'!\\\\nuserSelectedColor: aColor\\\\n\\\\t\\\\\\\"The user, via the UI, chose aColor to be the color for the receiver; set it, and tell my owner in case he wishes to react\\\\\\\"\\\\n\\\\tself color: aColor.\\\\n\\\\tself world ifNotNil: [owner colorChangedForSubmorph: self]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'classification' stamp: 'sw 2/26/2002 23:29'!\\\\ndemandsBoolean\\\\n\\\\t\\\\\\\"Answer whether the receiver will only accept a drop if it is boolean-valued.  Particular to tile-scripting.\\\\\\\"\\\\n\\\\n\\\\t^ self hasProperty: #demandsBoolean! !\\\\n\\\\n!Morph methodsFor: 'classification' stamp: 'di 5/7/1998 01:21'!\\\\nisAlignmentMorph\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'classification' stamp: 'ar 9/15/2000 17:56'!\\\\nisBalloonHelp\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'classification' stamp: 'ar 9/28/2000 13:54'!\\\\nisFlapOrTab\\\\n\\\\t^self isFlap or:[self isFlapTab]! !\\\\n\\\\n!Morph methodsFor: 'classification' stamp: 'ar 9/28/2000 13:53'!\\\\nisFlapTab\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'classification' stamp: 'jm 4/17/1998 00:44'!\\\\nisFlexMorph\\\\n\\\\n\\\\t^ false\\\\n! !\\\\n\\\\n!Morph methodsFor: 'classification'!\\\\nisHandMorph\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'classification' stamp: 'ar 10/3/2000 18:11'!\\\\nisModalShell\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'classification' stamp: 'sw 1/29/98 21:51'!\\\\nisPlayfieldLike\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'classification' stamp: 'jm 5/7/1998 13:45'!\\\\nisRenderer\\\\n\\\\t\\\\\\\"A *renderer* morph transforms the appearance of its submorph in some manner. For example, it might supply a drop shadow or scale and rotate the morph it encases. Answer true if this morph acts as a renderer. This default implementation returns false.\\\\\\\"\\\\n\\\\t\\\\\\\"Details: A renderer is assumed to have a single submorph. Renderers may be nested to concatenate their transformations. It is useful to be able to find the outer-most renderer. This can be done by ascending the owner chain from the rendered morph. To find the morph being rendered, one can descend through the (singleton) submorph lists of the renderer chain until a non-renderer is encountered.\\\\\\\"\\\\n\\\\n\\\\t^ false\\\\n! !\\\\n\\\\n!Morph methodsFor: 'classification' stamp: 'ar 6/30/2001 13:13'!\\\\nisStandardViewer\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'classification' stamp: 'di 11/2/2000 13:24'!\\\\nisSyntaxMorph\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'classification' stamp: 'ar 12/16/2001 18:28'!\\\\nisTextMorph\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'classification'!\\\\nisWorldMorph\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'classification'!\\\\nisWorldOrHandMorph\\\\n\\\\n\\\\t^ self isWorldMorph or: [self isHandMorph]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'connectors-scripting' stamp: 'nk 9/10/2004 11:37'!\\\\nwantsConnectorVocabulary\\\\n\\\\t\\\\\\\"Answer true if I want to show a 'connector' vocabulary\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n\\\\n!Morph methodsFor: 'converting'!\\\\nasDraggableMorph\\\\n\\\\t^self! !\\\\n\\\\n!Morph methodsFor: 'converting' stamp: 'wiz 2/19/2006 19:01'!\\\\nasSnapshotThumbnail\\\\n\\\\t^(ThumbnailImageMorph new  newImage: self imageForm ) extent: 90 asPoint .! !\\\\n\\\\n\\\\n!Morph methodsFor: 'copying' stamp: 'tk 2/19/2001 18:21'!\\\\ncopy\\\\n\\\\n\\\\t^ self veryDeepCopy! !\\\\n\\\\n!Morph methodsFor: 'copying' stamp: 'tk 2/14/2001 12:47'!\\\\ndeepCopy\\\\n\\\\n\\\\tself error: 'Please use veryDeepCopy'.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'copying' stamp: 'sw 4/19/2005 17:02'!\\\\nduplicate\\\\n\\\\t\\\\\\\"Make and return a duplicate of the receiver\\\\\\\"\\\\n\\\\n\\\\t| newMorph aName w aPlayer topRend |\\\\n\\\\t((topRend _ self topRendererOrSelf) ~~ self) ifTrue: [^ topRend duplicate].\\\\n\\\\n\\\\tself okayToDuplicate ifFalse: [^ self].\\\\n\\\\taName _ (w _ self world) ifNotNil:\\\\n\\\\t\\\\t[w nameForCopyIfAlreadyNamed: self].\\\\n\\\\tnewMorph _ self veryDeepCopy.\\\\n\\\\taName ifNotNil: [newMorph setNameTo: aName].\\\\n\\\\n\\\\tnewMorph arrangeToStartStepping.\\\\n\\\\tnewMorph privateOwner: nil. \\\\\\\"no longer in world\\\\\\\"\\\\n\\\\tnewMorph isPartsDonor: false. \\\\\\\"no longer parts donor\\\\\\\"\\\\n\\\\t(aPlayer _ newMorph player) belongsToUniClass ifTrue:\\\\n\\\\t\\\\t[aPlayer class bringScriptsUpToDate].\\\\n\\\\taPlayer ifNotNil: [ActiveWorld presenter flushPlayerListCache].\\\\n\\\\t^ newMorph! !\\\\n\\\\n!Morph methodsFor: 'copying' stamp: 'nk 3/12/2001 17:07'!\\\\nduplicateMorphCollection: aCollection\\\\n\\\\t\\\\\\\"Make and return a duplicate of the receiver\\\\\\\"\\\\n\\\\n\\\\t| newCollection names |\\\\n\\\\n\\\\tnames _ aCollection collect: [ :ea | | newMorph w |\\\\n\\\\t\\\\t(w _ ea world) ifNotNil:\\\\n\\\\t\\\\t\\\\t[w nameForCopyIfAlreadyNamed: ea].\\\\n\\\\t].\\\\n\\\\n\\\\tnewCollection _ aCollection veryDeepCopy.\\\\n\\\\n\\\\tnewCollection with: names do: [ :newMorph :name |\\\\n\\\\t\\\\tname ifNotNil: [ newMorph setNameTo: name ].\\\\n\\\\t\\\\tnewMorph arrangeToStartStepping.\\\\n\\\\t\\\\tnewMorph privateOwner: nil. \\\\\\\"no longer in world\\\\\\\"\\\\n\\\\t\\\\tnewMorph isPartsDonor: false. \\\\\\\"no longer parts donor\\\\\\\"\\\\n\\\\t].\\\\n\\\\n\\\\t^newCollection! !\\\\n\\\\n!Morph methodsFor: 'copying' stamp: 'sw 2/16/2001 16:30'!\\\\nfullCopy\\\\n\\\\t\\\\\\\"Deprecated, but maintained for backward compatibility with existing code (no senders in the base 3.0 image).   Calls are revectored to #veryDeepCopy, but note that #veryDeepCopy does not do exactly the same thing that the original #fullCopy did, so beware!!\\\\\\\"\\\\n\\\\n\\\\t^ self veryDeepCopy! !\\\\n\\\\n!Morph methodsFor: 'copying' stamp: 'md 2/27/2006 08:53'!\\\\nupdateReferencesUsing: aDictionary \\\\n\\\\t\\\\\\\"Update intra-morph references within a composite morph that \\\\n\\\\thas been copied. For example, if a button refers to morph X in \\\\n\\\\tthe orginal \\\\n\\\\tcomposite then the copy of that button in the new composite \\\\n\\\\tshould refer to \\\\n\\\\tthe copy of X in new composite, not the original X. This default \\\\n\\\\timplementation updates the contents of any morph-bearing slot. \\\\n\\\\tIt may be \\\\n\\\\toverridden to avoid this behavior if so desired.\\\\\\\"\\\\n\\\\t| old |\\\\n\\\\tMorph instSize + 1\\\\n\\\\t\\\\tto: self class instSize\\\\n\\\\t\\\\tdo: [:i | \\\\n\\\\t\\\\t\\\\told _ self instVarAt: i.\\\\n\\\\t\\\\t\\\\told isMorph\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinstVarAt: i\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tput: (aDictionary\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tat: old\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifAbsent: [old])]].\\\\n\\\\textension ifNotNil: [extension updateReferencesUsing: aDictionary]! !\\\\n\\\\n!Morph methodsFor: 'copying' stamp: 'nk 10/11/2003 16:59'!\\\\nusableSiblingInstance\\\\n\\\\t\\\\\\\"Return another similar morph whose Player is of the same class as mine.\\\\n\\\\tDo not open it in the world.\\\\\\\"\\\\n\\\\n\\\\t| aName usedNames newPlayer newMorph topRenderer |\\\\n\\\\t(topRenderer := self topRendererOrSelf) == self \\\\n\\\\t\\\\tifFalse: [^topRenderer usableSiblingInstance].\\\\n\\\\tself assuredPlayer assureUniClass.\\\\n\\\\tnewMorph := self veryDeepCopySibling.\\\\n\\\\tnewPlayer := newMorph player.\\\\n\\\\tnewPlayer resetCostumeList.\\\\n\\\\t(aName := self knownName) isNil \\\\n\\\\t\\\\tifTrue: [self player notNil ifTrue: [aName := newMorph innocuousName]].\\\\n\\\\t\\\\\\\"Force a difference here\\\\\\\"\\\\n\\\\taName notNil \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[usedNames := (self world ifNil: [OrderedCollection new]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifNotNil: [self world allKnownNames]) copyWith: aName.\\\\n\\\\t\\\\t\\\\tnewMorph setNameTo: (Utilities keyLike: aName\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsatisfying: [:f | (usedNames includes: f) not])].\\\\n\\\\tnewMorph privateOwner: nil.\\\\n\\\\tnewPlayer assureEventHandlerRepresentsStatus.\\\\n\\\\tself presenter flushPlayerListCache.\\\\n\\\\t^newMorph! !\\\\n\\\\n!Morph methodsFor: 'copying' stamp: 'tk 1/6/1999 17:27'!\\\\nveryDeepCopyWith: deepCopier\\\\n\\\\t\\\\\\\"Copy me and the entire tree of objects I point to.  An object in the tree twice is copied once, and both references point to him.  deepCopier holds a dictionary of objects we have seen.  See veryDeepInner:, veryDeepFixupWith:\\\\\\\"\\\\n\\\\n\\\\tself prepareToBeSaved.\\\\n\\\\t^ super veryDeepCopyWith: deepCopier! !\\\\n\\\\n!Morph methodsFor: 'copying' stamp: 'tk 2/3/2001 14:29'!\\\\nveryDeepFixupWith: deepCopier\\\\n\\\\t\\\\\\\"If some fields were weakly copied, fix new copy here.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"super veryDeepFixupWith: deepCopier.\\\\tObject has no fixups, so don't call it\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"If my owner is being duplicated too, then store his duplicate.\\\\n\\\\t If I am owned outside the duplicated tree, then I am no longer owned!!\\\\\\\"\\\\n\\\\towner _ deepCopier references at: owner ifAbsent: [nil].\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'copying' stamp: 'md 2/27/2006 08:47'!\\\\nveryDeepInner: deepCopier \\\\n\\\\t\\\\\\\"The inner loop, so it can be overridden when a field should not  \\\\n\\\\tbe traced.\\\\\\\"\\\\n\\\\t\\\\\\\"super veryDeepInner: deepCopier.\\\\tknow Object has no inst vars\\\\\\\"\\\\n\\\\tbounds _ bounds clone.\\\\n\\\\t\\\\\\\"Points are shared with original\\\\\\\"\\\\n\\\\t\\\\\\\"owner _ owner.\\\\tspecial, see veryDeepFixupWith:\\\\\\\"\\\\n\\\\tsubmorphs _ submorphs veryDeepCopyWith: deepCopier.\\\\n\\\\t\\\\\\\"each submorph's fixup will install me as the owner\\\\\\\"\\\\n\\\\t\\\\\\\"fullBounds _ fullBounds.\\\\tfullBounds is shared with original!!\\\\\\\"\\\\n\\\\tcolor _ color veryDeepCopyWith: deepCopier.\\\\n\\\\t\\\\\\\"color, if simple, will return self. may be complex\\\\\\\"\\\\n\\\\textension := (extension veryDeepCopyWith: deepCopier)! !\\\\n\\\\n\\\\n!Morph methodsFor: 'creation' stamp: 'tk 2/6/1999 22:43'!\\\\nasMorph\\\\n\\\\t^ self! !\\\\n\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'dgd 8/30/2003 20:36'!\\\\naddDebuggingItemsTo: aMenu hand: aHandMorph\\\\n\\\\taMenu add: 'debug...' translated subMenu:  (self buildDebugMenu: aHandMorph)! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'RAA 1/19/2001 07:51'!\\\\naddMouseActionIndicatorsWidth: anInteger color: aColor\\\\n\\\\n\\\\tself deleteAnyMouseActionIndicators.\\\\n\\\\n\\\\tself changed.\\\\n\\\\tself hasRolloverBorder: true.\\\\n\\\\tself setProperty: #rolloverWidth toValue: anInteger@anInteger.\\\\n\\\\tself setProperty: #rolloverColor toValue: aColor.\\\\n\\\\tself layoutChanged.\\\\n\\\\tself changed.\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'gm 4/25/2004 14:23'!\\\\naddMouseUpAction\\\\n\\\\t| codeToRun oldCode |\\\\n\\\\toldCode := self\\\\n\\\\t\\\\t\\\\t\\\\tvalueOfProperty: #mouseUpCodeToRun\\\\n\\\\t\\\\t\\\\t\\\\tifAbsent: [''].\\\\n\\\\tcodeToRun := FillInTheBlank request: 'MouseUp expression:' translated initialAnswer: oldCode.\\\\n\\\\tself addMouseUpActionWith: codeToRun! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'gm 2/22/2003 13:41'!\\\\naddMouseUpActionWith: codeToRun \\\\n\\\\t((codeToRun isMessageSend) not and: [codeToRun isEmptyOrNil]) \\\\n\\\\t\\\\tifTrue: [^self].\\\\n\\\\tself setProperty: #mouseUpCodeToRun toValue: codeToRun.\\\\n\\\\tself \\\\n\\\\t\\\\ton: #mouseUp\\\\n\\\\t\\\\tsend: #programmedMouseUp:for:\\\\n\\\\t\\\\tto: self.\\\\n\\\\tself \\\\n\\\\t\\\\ton: #mouseDown\\\\n\\\\t\\\\tsend: #programmedMouseDown:for:\\\\n\\\\t\\\\tto: self.\\\\n\\\\tself \\\\n\\\\t\\\\ton: #mouseEnter\\\\n\\\\t\\\\tsend: #programmedMouseEnter:for:\\\\n\\\\t\\\\tto: self.\\\\n\\\\tself \\\\n\\\\t\\\\ton: #mouseLeave\\\\n\\\\t\\\\tsend: #programmedMouseLeave:for:\\\\n\\\\t\\\\tto: self! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'sw 1/3/2001 06:42'!\\\\naddViewingItemsTo: aMenu\\\\n\\\\t\\\\\\\"Add viewing-related items to the given menu.  If any are added, this method is also responsible for adding a line after them\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'dgd 2/22/2003 14:27'!\\\\nallStringsAfter: aSubmorph \\\\n\\\\t\\\\\\\"return an OrderedCollection of strings of text in my submorphs.  If aSubmorph is non-nil, begin with that container.\\\\\\\"\\\\n\\\\n\\\\t| list string ok |\\\\n\\\\tlist := OrderedCollection new.\\\\n\\\\tok := aSubmorph isNil.\\\\n\\\\tself allMorphsDo: \\\\n\\\\t\\\\t\\\\t[:sub | \\\\n\\\\t\\\\t\\\\tok ifFalse: [ok := sub == aSubmorph].\\\\t\\\\\\\"and do this one too\\\\\\\"\\\\n\\\\t\\\\t\\\\tok \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[(string := sub userString) ifNotNil: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[string isString ifTrue: [list add: string] ifFalse: [list addAll: string]]]].\\\\n\\\\t^list! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'RAA 7/7/2000 16:27'!\\\\naltSpecialCursor0\\\\n\\\\t\\\\\\\"an arrow\\\\\\\"\\\\n\\\\t^(Form\\\\n\\\\textent: 16@16\\\\n\\\\tdepth: 8\\\\n\\\\tfromArray: #( 0 0 0 0 14869218 3806520034 3806520034 3791650816 14848144 2425393296 2425393378 0 14848144 2425393296 2425414144 0 14848144 2425393296 2430730240 0 14848144 2425393296 3791650816 0 14848144 2425393378 3791650816 0 14848144 2425414370 3806461952 0 14848144 2430788322 3806519808 0 14848144 3791651042 3806520034 0 14848226 0 3806520034 3791650816 14868992 0 14869218 3806461952 14811136 0 58082 3806519808 0 0 226 3806520034 0 0 0 3806520034 0 0 0 14869218)\\\\n\\\\toffset: 0@0)\\\\n! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'RAA 7/7/2000 16:28'!\\\\naltSpecialCursor1\\\\n\\\\t\\\\\\\"a star and an arrow\\\\\\\"\\\\n\\\\t^(Form\\\\n\\\\textent: 31@26\\\\n\\\\tdepth: 8\\\\n\\\\tfromArray: #( 14417920 0 0 0 0 0 0 0 3705461980 3705461980 3705405440 0 0 0 0 0 3705461980 3705461980 3705461760 0 0 0 0 0 14474460 3705461980 3705405440 0 0 0 0 0 56540 3705461980 3690987520 0 0 3690987520 0 0 220 3705461980 3705461760 0 0 3690987520 0 0 220 3705405440 3705461980 0 0 3705405440 0 0 0 3705461760 56540 3690987520 220 3705405440 0 0 0 3705405440 220 3705461760 220 3705405440 0 0 0 0 0 14474460 220 3705461760 0 0 0 0 0 56540 3691044060 3705461760 0 0 0 0 0 220 3705461980 3705461760 0 0 0 0 56540 3705461980 3705461980 3705461980 3705461980 3705461760 0 0 220 3705461980 3705461980 3705461980 3705461980 3705461760 0 0 0 3705461980 3705461980 3705461980 3705461980 3705405440 0 0 0 14474460 3705461980 3705461980 3705461980 3690987520 0 0 0 56540 3705461980 3705461980 3705461760 0 0 0 0 220 3705461980 3705461980 3705405440 0 0 0 0 0 3705461980 3705461980 3690987520 0 0 0 0 0 3705461980 3705461980 3705405440 0 0 0 0 220 3705461980 3705461980 3705405440 0 0 0 0 220 3705461980 3705461980 3705405440 0 0 0 0 220 3705461980 14474460 3705405440 0 0 0 0 220 3705405440 220 3705461760 0 0 0 0 56540 3690987520 0 3705461760 0 0 0 0 56540 0 0 14474240 0)\\\\n\\\\toffset: 0@0)! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'RAA 7/7/2000 16:41'!\\\\naltSpecialCursor2\\\\n\\\\t| f |\\\\n\\\\t\\\\\\\"a blue box with transparent center\\\\\\\"\\\\n\\\\tf _ Form extent: 32@32 depth: 32.\\\\n\\\\tf offset: (f extent // 2) negated.\\\\n\\\\tf fill: f boundingBox rule: Form over fillColor: (Color blue alpha: 0.5).\\\\n\\\\tf fill: (f boundingBox insetBy: 4) rule: Form over fillColor: Color transparent.\\\\n\\\\t^f\\\\n! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'RAA 7/7/2000 16:42'!\\\\naltSpecialCursor3\\\\n\\\\t\\\\n\\\\t^self altSpecialCursor3: Color blue! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'RAA 7/7/2000 16:41'!\\\\naltSpecialCursor3: aColor\\\\n\\\\t| f box |\\\\n\\\\t\\\\\\\"a bulls-eye pattern in this color\\\\\\\"\\\\n\\\\tf _ Form extent: 32@32 depth: 32.\\\\n\\\\tf offset: (f extent // 2) negated.\\\\n\\\\tbox _ f boundingBox.\\\\n\\\\t[ box width > 0] whileTrue: [\\\\n\\\\t\\\\tf fill: box rule: Form over fillColor: aColor.\\\\n\\\\t\\\\tf fill: (box insetBy: 2) rule: Form over fillColor: Color transparent.\\\\n\\\\t\\\\tbox _ box insetBy: 4.\\\\n\\\\t].\\\\n\\\\t^f\\\\n! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'nk 6/14/2004 16:14'!\\\\nbuildDebugMenu: aHand\\\\n\\\\t\\\\\\\"Answer a debugging menu for the receiver.  The hand argument is seemingly historical and plays no role presently\\\\\\\"\\\\n\\\\n\\\\t| aMenu aPlayer |\\\\n\\\\taMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\taMenu addStayUpItem.\\\\n\\\\t(self hasProperty: #errorOnDraw) ifTrue:\\\\n\\\\t\\\\t[aMenu add: 'start drawing again' translated action: #resumeAfterDrawError.\\\\n\\\\t\\\\taMenu addLine].\\\\n\\\\t(self hasProperty: #errorOnStep) ifTrue:\\\\n\\\\t\\\\t[aMenu add: 'start stepping again' translated action: #resumeAfterStepError.\\\\n\\\\t\\\\taMenu addLine].\\\\n\\\\n\\\\taMenu add: 'inspect morph' translated action: #inspectInMorphic:.\\\\n\\\\taMenu add: 'inspect owner chain' translated action: #inspectOwnerChain.\\\\n\\\\tSmalltalk isMorphic ifFalse:\\\\n\\\\t\\\\t[aMenu add: 'inspect morph (in MVC)' translated action: #inspect].\\\\n\\\\n\\\\tself isMorphicModel ifTrue:\\\\n\\\\t\\\\t[aMenu add: 'inspect model' translated target: self model action: #inspect].\\\\n\\\\t(aPlayer _ self player) ifNotNil:\\\\n\\\\t\\\\t[aMenu add: 'inspect player' translated target: aPlayer action: #inspect].\\\\n\\\\n     aMenu add: 'explore morph' translated target: self selector: #explore.\\\\n\\\\n\\\\taMenu addLine.\\\\n\\\\taPlayer ifNotNil:\\\\n\\\\t\\\\t[ aMenu add: 'viewer for Player' translated target: self player action: #beViewed.\\\\n\\\\taMenu balloonTextForLastItem: 'Opens a viewer on my Player -- this is the same thing you get if you click on the cyan \\\\\\\"View\\\\\\\" halo handle' translated ].\\\\n\\\\n\\\\taMenu add: 'viewer for Morph' translated target: self action: #viewMorphDirectly.\\\\n\\\\taMenu balloonTextForLastItem: 'Opens a Viewer on this Morph, rather than on its Player' translated.\\\\n\\\\taMenu addLine.\\\\n\\\\n\\\\taPlayer ifNotNil:\\\\n\\\\t\\\\t[aPlayer class isUniClass ifTrue: [\\\\n\\\\t\\\\t\\\\taMenu add: 'browse player class' translated target: aPlayer action: #browseHierarchy]].\\\\n\\\\taMenu add: 'browse morph class' translated target: self selector: #browseHierarchy.\\\\n\\\\t(self isMorphicModel)\\\\n\\\\t\\\\tifTrue: [aMenu\\\\n\\\\t\\\\t\\\\t\\\\tadd: 'browse model class'\\\\n\\\\t\\\\t\\\\t\\\\ttarget: self model\\\\n\\\\t\\\\t\\\\t\\\\tselector: #browseHierarchy].\\\\n\\\\taMenu addLine.\\\\n\\\\n\\\\taPlayer ifNotNil:\\\\n\\\\t\\\\t[aMenu add: 'player protocol (tiles)' translated target: aPlayer action: #openInstanceBrowserWithTiles\\\\n\\\\t\\\\t\\\\t\\\\\\\"#browseProtocolForPlayer\\\\\\\"].\\\\n\\\\taMenu add: 'morph protocol (text)' translated target: self selector: #haveFullProtocolBrowsed.\\\\n\\\\taMenu add: 'morph protocol (tiles)' translated target: self selector: #openInstanceBrowserWithTiles.\\\\n\\\\taMenu addLine.\\\\n\\\\n\\\\tself addViewingItemsTo: aMenu.\\\\n\\\\taMenu \\\\n\\\\t\\\\tadd: 'make own subclass' translated action: #subclassMorph;\\\\n\\\\t\\\\tadd: 'internal name ' translated action: #choosePartName;\\\\n\\\\t\\\\tadd: 'save morph in file' translated  action: #saveOnFile;\\\\n\\\\t\\\\taddLine;\\\\n\\\\t\\\\tadd: 'call #tempCommand' translated action: #tempCommand;\\\\n\\\\t\\\\tadd: 'define #tempCommand' translated action: #defineTempCommand;\\\\n\\\\t\\\\taddLine;\\\\n\\\\n\\\\t\\\\tadd: 'control-menu...' translated target: self selector: #invokeMetaMenu:;\\\\n\\\\t\\\\tadd: 'edit balloon help' translated action: #editBalloonHelpText.\\\\n\\\\n\\\\t^ aMenu! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'ar 9/27/2005 20:29'!\\\\ndefineTempCommand\\\\n\\\\t\\\\\\\"To use this, comment out what's below here, and substitute your own code.\\\\nYou will then be able to invoke it from the standard debugging menus.  If invoked from the world menu, you'll always get it invoked on behalf of the world, but if invoked from an individual morph's meta-menu, it will be invoked on behalf of that individual morph.\\\\n\\\\nNote that you can indeed reimplement tempCommand in an individual morph's class if you wish\\\\\\\"\\\\n\\\\n\\\\tToolSet browse: Morph\\\\n\\\\t\\\\tselector: #tempCommand! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'RAA 1/19/2001 07:51'!\\\\ndeleteAnyMouseActionIndicators\\\\n\\\\n\\\\tself changed.\\\\n\\\\t(self valueOfProperty: #mouseActionIndicatorMorphs ifAbsent: [#()]) do: [ :each |\\\\n\\\\t\\\\teach deleteWithSiblings\\\\t\\\\t\\\\\\\"one is probably enough, but be safe\\\\\\\"\\\\n\\\\t].\\\\n\\\\tself removeProperty: #mouseActionIndicatorMorphs.\\\\n\\\\tself hasRolloverBorder: false.\\\\n\\\\tself removeProperty: #rolloverWidth.\\\\n\\\\tself removeProperty: #rolloverColor.\\\\n\\\\tself layoutChanged.\\\\n\\\\tself changed.\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'sw 7/17/2001 19:08'!\\\\nhandMeTilesToFire \\\\n\\\\t\\\\\\\"Construct a phrase of tiles comprising a line of code that will 'fire' this object, and hand it to the user\\\\\\\"\\\\n\\\\n\\\\tActiveHand attachMorph: (self assuredPlayer tilesToCall: MethodInterface firingInterface)! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'ar 10/5/2000 17:38'!\\\\ninspectArgumentsPlayerInMorphic: evt\\\\n\\\\tevt hand attachMorph: ((Inspector openAsMorphOn: self player) extent: 300@200)! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'sw 11/5/1998 20:31'!\\\\ninspectOwnerChain\\\\n\\\\tself ownerChain inspectWithLabel: 'Owner chain for ', self printString! !\\\\n\\\\n!Morph methodsFor: 'debug and other'!\\\\ninstallModelIn: ignored\\\\n\\\\t\\\\\\\"Simple morphs have no model\\\\\\\"\\\\n\\\\t\\\\\\\"See MorphicApp for other behavior\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'sw 2/6/2001 22:35'!\\\\nmouseUpCodeOrNil\\\\n\\\\t\\\\\\\"If the receiver has a mouseUpCodeToRun, return it, else return nil\\\\\\\"\\\\n\\\\n\\\\t^ self valueOfProperty: #mouseUpCodeToRun ifAbsent: [nil]! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'dgd 2/22/2003 19:05'!\\\\nownerChain\\\\n\\\\t\\\\\\\"Answer a list of objects representing the receiver and all of its owners.   The first element is the receiver, and the last one is typically the world in which the receiver resides\\\\\\\"\\\\n\\\\n\\\\t| c next |\\\\n\\\\tc := OrderedCollection with: self.\\\\n\\\\tnext := self.\\\\n\\\\t[(next := next owner) notNil] whileTrue: [c add: next].\\\\n\\\\t^c asArray! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'RAA 7/12/2000 11:16'!\\\\nprogrammedMouseDown: anEvent for: aMorph\\\\n\\\\n\\\\taMorph addMouseActionIndicatorsWidth: 15 color: (Color blue alpha: 0.7).\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'RAA 7/12/2000 11:16'!\\\\nprogrammedMouseEnter: anEvent for: aMorph\\\\n\\\\n\\\\taMorph addMouseActionIndicatorsWidth: 10 color: (Color blue alpha: 0.3).\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'RAA 7/12/2000 11:10'!\\\\nprogrammedMouseLeave: anEvent for: aMorph\\\\n\\\\n\\\\tself deleteAnyMouseActionIndicators.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'gm 2/22/2003 13:41'!\\\\nprogrammedMouseUp: anEvent for: aMorph \\\\n\\\\t| aCodeString |\\\\n\\\\tself deleteAnyMouseActionIndicators.\\\\n\\\\taCodeString := self valueOfProperty: #mouseUpCodeToRun ifAbsent: [^self].\\\\n\\\\t(self fullBounds containsPoint: anEvent cursorPoint) ifFalse: [^self].\\\\n\\\\t\\\\n\\\\t[(aCodeString isMessageSend) \\\\n\\\\t\\\\tifTrue: [aCodeString value]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[Compiler \\\\n\\\\t\\\\t\\\\t\\\\tevaluate: aCodeString\\\\n\\\\t\\\\t\\\\t\\\\tfor: self\\\\n\\\\t\\\\t\\\\t\\\\tnotifying: nil\\\\n\\\\t\\\\t\\\\t\\\\tlogged: false]] \\\\n\\\\t\\\\t\\\\ton: ProgressTargetRequestNotification\\\\n\\\\t\\\\t\\\\tdo: [:ex | ex resume: self]\\\\t\\\\\\\"in case a save/load progress display needs a home\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'RAA 7/7/2000 16:43'!\\\\nremoveMouseUpAction\\\\n\\\\n\\\\tself primaryHand showTemporaryCursor: nil.\\\\n\\\\tself removeProperty: #mouseUpCodeToRun.\\\\n\\\\t#(mouseUp mouseEnter mouseLeave mouseDown) do: [ :sym |\\\\n\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\ton: sym \\\\n\\\\t\\\\t\\\\tsend: #yourself \\\\n\\\\t\\\\t\\\\tto: nil.\\\\n\\\\t]\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'RAA 5/24/2000 18:20'!\\\\nresumeAfterDrawError\\\\n\\\\n\\\\tself changed.\\\\n\\\\tself removeProperty:#errorOnDraw.\\\\n\\\\tself changed.! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'RAA 5/24/2000 18:20'!\\\\nresumeAfterStepError\\\\n\\\\t\\\\\\\"Resume stepping after an error has occured.\\\\\\\"\\\\n\\\\n\\\\tself startStepping. \\\\\\\"Will #step\\\\\\\"\\\\n\\\\tself removeProperty:#errorOnStep. \\\\\\\"Will remove prop only if #step was okay\\\\\\\"\\\\n! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'dgd 8/30/2003 20:43'!\\\\ntempCommand\\\\n\\\\t\\\\\\\"Generic backstop.  If you care to, you can comment out what's below here, and substitute your own code, though the intention of design of the feature is that you leave this method as it is, and instead reimplement tempCommand in the class of whatever individual morph you care to.  In any case, once you have your own #tempCommand in place, you will then be able to invoke it from the standard debugging menus.\\\\\\\"\\\\n\\\\n\\\\tself inform: 'Before calling tempCommand, you\\\\nshould first give it a definition.  To\\\\ndo this, choose \\\\\\\"define tempCommand\\\\\\\"\\\\nfrom the debug menu.' translated! !\\\\n\\\\n!Morph methodsFor: 'debug and other' stamp: 'sw 8/4/2001 00:33'!\\\\nviewMorphDirectly\\\\n\\\\t\\\\\\\"Open a Viewer directly on the Receiver, i.e. no Player involved\\\\\\\"\\\\n\\\\n\\\\tself presenter viewObjectDirectly: self renderedMorph\\\\n\\\\n\\\\t! !\\\\n\\\\n\\\\n!Morph methodsFor: 'dispatching' stamp: 'nk 2/15/2004 09:16'!\\\\ndisableSubmorphFocusForHand: aHandMorph\\\\n\\\\t\\\\\\\"Check whether this morph or any of its submorph has the Genie focus.\\\\n\\\\tIf yes, disable it.\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'di 6/24/1998 14:10'!\\\\nareasRemainingToFill: aRectangle\\\\n\\\\t\\\\\\\"May be overridden by any subclasses with opaque regions\\\\\\\"\\\\n\\\\n\\\\t^ Array with: aRectangle! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'sw 6/4/2000 22:02'!\\\\nboundingBoxOfSubmorphs\\\\n\\\\t| aBox |\\\\n\\\\taBox _ bounds origin extent: self minimumExtent.  \\\\\\\"so won't end up with something empty\\\\\\\"\\\\n\\\\tsubmorphs do:\\\\n\\\\t\\\\t[:m | m visible ifTrue: [aBox _ aBox quickMerge: m fullBounds]].\\\\n\\\\t^ aBox\\\\n! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'di 2/15/2001 14:51'!\\\\nboundsWithinCorners\\\\n\\\\n\\\\t^ CornerRounder rectWithinCornersOf: self bounds! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'ar 11/4/2000 23:39'!\\\\nchangeClipSubmorphs\\\\n\\\\tself clipSubmorphs: self clipSubmorphs not.! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'dgd 2/16/2003 20:02'!\\\\nclipLayoutCells\\\\n\\\\t\\\\\\\"Drawing/layout specific. If this property is set, clip the  \\\\n\\\\tsubmorphs of the receiver by its cell bounds.\\\\\\\"\\\\n\\\\t^ self\\\\n\\\\t\\\\tvalueOfProperty: #clipLayoutCells\\\\n\\\\t\\\\tifAbsent: [false]! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'ar 10/29/2000 19:22'!\\\\nclipLayoutCells: aBool\\\\n\\\\t\\\\\\\"Drawing/layout specific. If this property is set, clip the submorphs of the receiver by its cell bounds.\\\\\\\"\\\\n\\\\taBool == false\\\\n\\\\t\\\\tifTrue:[self removeProperty: #clipLayoutCells]\\\\n\\\\t\\\\tifFalse:[self setProperty: #clipLayoutCells toValue: aBool].\\\\n\\\\tself changed.! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'ar 10/29/2000 19:16'!\\\\nclippingBounds\\\\n\\\\t\\\\\\\"Return the bounds to which any submorphs should be clipped if the property is set\\\\\\\"\\\\n\\\\t^self innerBounds! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'md 4/3/2006 11:53'!\\\\nclipSubmorphs\\\\n\\\\t\\\\\\\"Drawing specific. If this property is set, clip the receiver's  \\\\n\\\\tsubmorphs to the receiver's clipping bounds.\\\\\\\"\\\\n\\\\t\\\\n\\\\textension ifNil: [^false].\\\\n\\\\t^ self\\\\n\\\\t\\\\tvalueOfProperty: #clipSubmorphs\\\\n\\\\t\\\\tifAbsent: [false]! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'ar 11/12/2000 18:47'!\\\\nclipSubmorphs: aBool\\\\n\\\\t\\\\\\\"Drawing specific. If this property is set, clip the receiver's submorphs to the receiver's clipping bounds.\\\\\\\"\\\\n\\\\tself invalidRect: self fullBounds.\\\\n\\\\taBool == false\\\\n\\\\t\\\\tifTrue:[self removeProperty: #clipSubmorphs]\\\\n\\\\t\\\\tifFalse:[self setProperty: #clipSubmorphs toValue: aBool].\\\\n\\\\tself invalidRect: self fullBounds.! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'tk 8/2/1998 14:33'!\\\\ndoesOwnRotation\\\\n\\\\t\\\\\\\"Some morphs don't want to TransformMorph to rotate their images, but we do\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'panda 4/28/2000 11:59'!\\\\ndrawDropHighlightOn: aCanvas\\\\n\\\\tself highlightedForDrop ifTrue: [\\\\n\\\\t\\\\taCanvas frameRectangle: self fullBounds color: self dropHighlightColor].! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'ar 12/30/2001 19:17'!\\\\ndrawDropShadowOn: aCanvas\\\\n\\\\n\\\\taCanvas \\\\n\\\\t\\\\ttranslateBy: self shadowOffset \\\\n\\\\t\\\\tduring: [ :shadowCanvas |\\\\n\\\\t\\\\t\\\\tshadowCanvas shadowColor: self shadowColor.\\\\n\\\\t\\\\t\\\\tshadowCanvas roundCornersOf: self during: [ \\\\n\\\\t\\\\t\\\\t\\\\t(shadowCanvas isVisible: self bounds) ifTrue:[shadowCanvas drawMorph: self ]]\\\\n\\\\t\\\\t].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'ar 4/2/1999 13:13'!\\\\ndrawErrorOn: aCanvas\\\\n\\\\t\\\\\\\"The morph (or one of its submorphs) had an error in its drawing method.\\\\\\\"\\\\n\\\\taCanvas\\\\n\\\\t\\\\tframeAndFillRectangle: bounds\\\\n\\\\t\\\\tfillColor: Color red\\\\n\\\\t\\\\tborderWidth: 1\\\\n\\\\t\\\\tborderColor: Color yellow.\\\\n\\\\taCanvas line: bounds topLeft to: bounds bottomRight width: 1 color: Color yellow.\\\\n\\\\taCanvas line: bounds topRight to: bounds bottomLeft width: 1 color: Color yellow.! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: '   9/3/2000 13:55'!\\\\ndrawMouseDownHighlightOn: aCanvas\\\\n\\\\tself highlightedForMouseDown ifTrue: [\\\\n\\\\t\\\\taCanvas frameRectangle: self fullBounds color: self color darker darker].! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'ar 8/25/2001 17:31'!\\\\ndrawOn: aCanvas\\\\n\\\\n\\\\taCanvas fillRectangle: self bounds fillStyle: self fillStyle borderStyle: self borderStyle.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'wiz 3/21/2006 20:44'!\\\\ndrawRolloverBorderOn: aCanvas \\\\n\\\\t| colorToUse offsetToUse myShadow newForm f |\\\\n\\\\tcolorToUse := self\\\\n\\\\t\\\\t\\\\t\\\\tvalueOfProperty: #rolloverColor\\\\n\\\\t\\\\t\\\\t\\\\tifAbsent: [Color blue alpha: 0.5].\\\\n\\\\toffsetToUse := self\\\\n\\\\t\\\\t\\\\t\\\\tvalueOfProperty: #rolloverWidth\\\\n\\\\t\\\\t\\\\t\\\\tifAbsent: [10 @ 10].\\\\n\\\\tself hasRolloverBorder: false.\\\\n\\\\tmyShadow := self shadowForm.\\\\n\\\\tself hasRolloverBorder: true.\\\\n\\\\tmyShadow offset: 0 @ 0.\\\\n\\\\tf := ColorForm extent: myShadow extent depth: 1.\\\\n\\\\tmyShadow displayOn: f.\\\\n\\\\tf colors: {Color transparent. colorToUse}.\\\\n\\\\tnewForm := Form extent: offsetToUse * 2 + myShadow extent depth: 32.\\\\n\\\\t(WarpBlt current toForm: newForm) sourceForm: f;\\\\n\\\\t\\\\t cellSize: 1;\\\\n\\\\t\\\\t combinationRule: 3;\\\\n\\\\t\\\\t copyQuad: f boundingBox innerCorners toRect: newForm boundingBox.\\\\n\\\\taCanvas\\\\n\\\\t\\\\ttranslateBy: offsetToUse negated\\\\n\\\\t\\\\tduring: [:shadowCanvas | \\\\n\\\\t\\\\t\\\\tshadowCanvas shadowColor: colorToUse.\\\\n\\\\t\\\\t\\\\tshadowCanvas paintImage: newForm at: self position]! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'dgd 2/22/2003 14:31'!\\\\ndrawSubmorphsOn: aCanvas \\\\n\\\\t\\\\\\\"Display submorphs back to front\\\\\\\"\\\\n\\\\n\\\\t| drawBlock |\\\\n\\\\tsubmorphs isEmpty ifTrue: [^self].\\\\n\\\\tdrawBlock := [:canvas | submorphs reverseDo: [:m | canvas fullDrawMorph: m]].\\\\n\\\\tself clipSubmorphs \\\\n\\\\t\\\\tifTrue: [aCanvas clipBy: self clippingBounds during: drawBlock]\\\\n\\\\t\\\\tifFalse: [drawBlock value: aCanvas]! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'RAA 1/6/2001 22:12'!\\\\nexpandFullBoundsForDropShadow: aRectangle\\\\n\\\\t\\\\\\\"Return an expanded rectangle for an eventual drop shadow\\\\\\\"\\\\n\\\\t| delta box |\\\\n\\\\n\\\\tbox _ aRectangle.\\\\n\\\\tdelta _ self shadowOffset.\\\\n\\\\tbox _ delta x >= 0 \\\\n\\\\t\\\\tifTrue:[box right: aRectangle right + delta x]\\\\n\\\\t\\\\tifFalse:[box left: aRectangle left + delta x].\\\\n\\\\tbox _ delta y >= 0\\\\n\\\\t\\\\tifTrue:[box bottom: aRectangle bottom + delta y]\\\\n\\\\t\\\\tifFalse:[box top: aRectangle top + delta y].\\\\n\\\\t^box! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'ar 11/8/2000 19:29'!\\\\nexpandFullBoundsForRolloverBorder: aRectangle\\\\n\\\\t| delta |\\\\n\\\\tdelta _ self valueOfProperty: #rolloverWidth ifAbsent: [10@10].\\\\n\\\\t^aRectangle expandBy: delta.\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'sw 11/26/2003 17:43'!\\\\nflashBounds\\\\n\\\\t\\\\\\\"Flash the receiver's bounds  -- does not use the receiver's color, thus works with StringMorphs and SketchMorphs, etc., for which #flash is useless.  No senders initially, but useful to send this from a debugger or inspector\\\\\\\"\\\\n\\\\n\\\\t5 timesRepeat:\\\\n\\\\t\\\\t[Display flash: self boundsInWorld  andWait: 120]! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'ar 12/30/2001 15:22'!\\\\nfullDrawOn: aCanvas\\\\n\\\\t\\\\\\\"Draw the full Morphic structure on the given Canvas\\\\\\\"\\\\n\\\\n\\\\tself visible ifFalse: [^ self].\\\\n\\\\t(aCanvas isVisible: self fullBounds) ifFalse:[^self].\\\\n\\\\t(self hasProperty: #errorOnDraw) ifTrue:[^self drawErrorOn: aCanvas].\\\\n\\\\t\\\\\\\"Note: At some point we should generalize this into some sort of \\\\n\\\\tmulti-canvas so that we can cross-optimize some drawing operations.\\\\\\\"\\\\n\\\\t\\\\\\\"Pass 1: Draw eventual drop-shadow\\\\\\\"\\\\n\\\\tself hasDropShadow ifTrue: [self drawDropShadowOn: aCanvas].\\\\n\\\\t(self hasRolloverBorder and: [(aCanvas seesNothingOutside: self bounds) not])\\\\n\\\\t\\\\tifTrue: [self drawRolloverBorderOn: aCanvas].\\\\n\\\\n\\\\t\\\\\\\"Pass 2: Draw receiver itself\\\\\\\"\\\\n\\\\taCanvas roundCornersOf: self during:[\\\\n\\\\t\\\\t(aCanvas isVisible: self bounds) ifTrue:[aCanvas drawMorph: self].\\\\n\\\\t\\\\tself drawSubmorphsOn: aCanvas.\\\\n\\\\t\\\\tself drawDropHighlightOn: aCanvas.\\\\n\\\\t\\\\tself drawMouseDownHighlightOn: aCanvas].! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'dgd 8/30/2003 20:20'!\\\\nhasClipSubmorphsString\\\\n\\\\t\\\\\\\"Answer a string that represents the clip-submophs checkbox\\\\\\\"\\\\n\\\\t^ (self clipSubmorphs\\\\n\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\tifFalse: ['<off>'])\\\\n\\\\t\\\\t, 'provide clipping' translated! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'sw 10/30/1998 18:27'!\\\\nhide\\\\n\\\\towner ifNil: [^ self].\\\\n\\\\tself visible ifTrue: [self visible: false.  self changed]! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'LC 5/18/2000 08:48'!\\\\nhighlightedForMouseDown\\\\n\\\\t^(self valueOfProperty: #highlightedForMouseDown) == true! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'LC 5/18/2000 08:51'!\\\\nhighlightForMouseDown\\\\n\\\\tself highlightForMouseDown: true! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'ar 3/17/2001 15:56'!\\\\nhighlightForMouseDown: aBoolean\\\\n\\\\taBoolean \\\\n\\\\t\\\\tifTrue:[self setProperty: #highlightedForMouseDown toValue: aBoolean]\\\\n\\\\t\\\\tifFalse:[self removeProperty: #highlightedForMouseDown. self resetExtension].\\\\n\\\\tself changed! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'jm 6/11/97 17:21'!\\\\nimageForm\\\\n\\\\n\\\\t^ self imageFormForRectangle: self fullBounds\\\\n! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'di 7/8/1998 12:42'!\\\\nimageFormDepth: depth\\\\n\\\\n\\\\t^ self imageForm: depth forRectangle: self fullBounds\\\\n! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'di 9/9/1998 22:25'!\\\\nimageFormForRectangle: rect\\\\n\\\\n\\\\t^ self imageForm: Display depth forRectangle: rect\\\\n! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'ar 9/1/2000 14:23'!\\\\nimageFormWithout: stopMorph andStopThere: stopThere\\\\n\\\\t\\\\\\\"Like imageForm, except it does not display stopMorph,\\\\n\\\\tand it will not display anything above it if stopThere is true.\\\\n\\\\tReturns a pair of the imageForm and a boolean that is true\\\\n\\\\t\\\\tif it has hit stopMorph, and display should stop.\\\\\\\"\\\\n\\\\t| canvas rect |\\\\n\\\\trect _ self fullBounds.\\\\n\\\\tcanvas _ ColorPatchCanvas extent: rect extent depth: Display depth.\\\\n\\\\tcanvas stopMorph: stopMorph.\\\\n\\\\tcanvas doStop: stopThere.\\\\n\\\\tcanvas translateBy: rect topLeft negated during:[:tempCanvas| tempCanvas fullDrawMorph: self].\\\\n\\\\t^ Array with: (canvas form offset: rect topLeft)\\\\n\\\\t\\\\t\\\\twith: canvas foundMorph! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'nk 9/1/2004 15:08'!\\\\nimageForm: depth backgroundColor: aColor forRectangle: rect\\\\n\\\\t| canvas |\\\\n\\\\tcanvas _ Display defaultCanvasClass extent: rect extent depth: depth.\\\\n\\\\tcanvas translateBy: rect topLeft negated\\\\n\\\\t\\\\tduring:[:tempCanvas| \\\\n\\\\t\\\\t\\\\ttempCanvas fillRectangle: rect color: aColor.\\\\n\\\\t\\\\t\\\\ttempCanvas fullDrawMorph: self].\\\\n\\\\t^ canvas form offset: rect topLeft! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'ar 9/1/2000 14:23'!\\\\nimageForm: depth forRectangle: rect\\\\n\\\\t| canvas |\\\\n\\\\tcanvas _ Display defaultCanvasClass extent: rect extent depth: depth.\\\\n\\\\tcanvas translateBy: rect topLeft negated\\\\n\\\\t\\\\tduring:[:tempCanvas| tempCanvas fullDrawMorph: self].\\\\n\\\\t^ canvas form offset: rect topLeft! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'sw 10/10/1999 23:25'!\\\\nrefreshWorld\\\\n\\\\t| aWorld |\\\\n\\\\t(aWorld _ self world) ifNotNil: [aWorld displayWorldSafely]\\\\n! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'JW 7/12/2005 20:12'!\\\\nshadowForm\\\\n\\\\t\\\\\\\"Return a form representing the 'shadow' of the receiver - e.g., all pixels that are occupied by the receiver are one, all others are zero.\\\\\\\"\\\\n\\\\t| canvas |\\\\n\\\\tcanvas := (Display defaultCanvasClass extent: self fullBounds extent depth: 1)\\\\n\\\\t\\\\t\\\\t\\\\tasShadowDrawingCanvas: Color black. \\\\\\\"Color black represents one for 1bpp\\\\\\\"\\\\n\\\\tcanvas translateBy: bounds topLeft negated\\\\n\\\\t\\\\tduring:[:tempCanvas| tempCanvas fullDrawMorph: self].\\\\n\\\\t^ canvas form offset: bounds topLeft\\\\n! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'sw 10/22/1998 20:29'!\\\\nshow\\\\n\\\\t\\\\\\\"Make sure this morph is on-stage.\\\\\\\"\\\\n\\\\tself visible ifFalse: [self visible: true.  self changed]! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'md 2/27/2006 08:49'!\\\\nvisible\\\\n\\\\t\\\\\\\"answer whether the receiver is visible\\\\\\\"\\\\n\\\\textension ifNil: [^ true].\\\\n\\\\t^ extension visible! !\\\\n\\\\n!Morph methodsFor: 'drawing' stamp: 'md 2/27/2006 08:49'!\\\\nvisible: aBoolean \\\\n\\\\t\\\\\\\"set the 'visible' attribute of the receiver to aBoolean\\\\\\\"\\\\n\\\\t(extension isNil and:[aBoolean]) ifTrue: [^ self].\\\\n\\\\tself visible == aBoolean ifTrue: [^ self].\\\\n\\\\tself assureExtension visible: aBoolean.\\\\n\\\\tself changed! !\\\\n\\\\n\\\\n!Morph methodsFor: 'drop shadows' stamp: 'RAA 1/19/2001 07:51'!\\\\naddDropShadow\\\\n\\\\n\\\\tself hasDropShadow ifTrue:[^self].\\\\n\\\\tself changed.\\\\n\\\\tself hasDropShadow: true.\\\\n\\\\tself shadowOffset: 3@3.\\\\n\\\\tself layoutChanged.\\\\n\\\\tself changed.! !\\\\n\\\\n!Morph methodsFor: 'drop shadows' stamp: 'dgd 8/30/2003 16:48'!\\\\naddDropShadowMenuItems: aMenu hand: aHand\\\\n\\\\t| menu |\\\\n\\\\tmenu _ MenuMorph new defaultTarget: self.\\\\n\\\\tmenu\\\\n\\\\t\\\\taddUpdating: #hasDropShadowString\\\\n\\\\t\\\\taction: #toggleDropShadow.\\\\n\\\\tmenu addLine.\\\\n\\\\tmenu add: 'shadow color...' translated target: self selector: #changeShadowColor.\\\\n\\\\tmenu add: 'shadow offset...' translated target: self selector: #setShadowOffset:.\\\\n\\\\taMenu add: 'drop shadow' translated subMenu: menu.! !\\\\n\\\\n!Morph methodsFor: 'drop shadows' stamp: 'ar 10/26/2000 20:22'!\\\\nchangeShadowColor\\\\n\\\\t\\\\\\\"Change the shadow color of the receiver -- triggered, e.g. from a menu\\\\\\\"\\\\n\\\\n\\\\tColorPickerMorph new\\\\n\\\\t\\\\tchoseModalityFromPreference;\\\\n\\\\t\\\\tsourceHand: self activeHand;\\\\n\\\\t\\\\ttarget: self;\\\\n\\\\t\\\\tselector: #shadowColor:;\\\\n\\\\t\\\\toriginalColor: self shadowColor;\\\\n\\\\t\\\\tputUpFor: self near: self fullBoundsInWorld! !\\\\n\\\\n!Morph methodsFor: 'drop shadows' stamp: 'dgd 2/16/2003 21:42'!\\\\nhasDropShadow\\\\n\\\\t\\\\\\\"answer whether the receiver has DropShadow\\\\\\\"\\\\n\\\\t^ self\\\\n\\\\t\\\\tvalueOfProperty: #hasDropShadow\\\\n\\\\t\\\\tifAbsent: [false]! !\\\\n\\\\n!Morph methodsFor: 'drop shadows' stamp: 'dgd 8/30/2003 16:49'!\\\\nhasDropShadowString\\\\n\\\\t^ (self hasDropShadow\\\\n\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\tifFalse: ['<off>'])\\\\n\\\\t\\\\t, 'show shadow' translated! !\\\\n\\\\n!Morph methodsFor: 'drop shadows' stamp: 'ar 10/26/2000 19:03'!\\\\nhasDropShadow: aBool\\\\n\\\\taBool\\\\n\\\\t\\\\tifTrue:[self setProperty: #hasDropShadow toValue: true]\\\\n\\\\t\\\\tifFalse:[self removeProperty: #hasDropShadow]! !\\\\n\\\\n!Morph methodsFor: 'drop shadows' stamp: 'dgd 2/16/2003 21:58'!\\\\nhasRolloverBorder\\\\n\\\\t\\\\\\\"answer whether the receiver has RolloverBorder\\\\\\\"\\\\n\\\\t^ self\\\\n\\\\t\\\\tvalueOfProperty: #hasRolloverBorder\\\\n\\\\t\\\\tifAbsent: [false]! !\\\\n\\\\n!Morph methodsFor: 'drop shadows' stamp: 'RAA 11/7/2000 15:54'!\\\\nhasRolloverBorder: aBool\\\\n\\\\taBool\\\\n\\\\t\\\\tifTrue:[self setProperty: #hasRolloverBorder toValue: true]\\\\n\\\\t\\\\tifFalse:[self removeProperty: #hasRolloverBorder]! !\\\\n\\\\n!Morph methodsFor: 'drop shadows' stamp: 'ar 11/12/2000 18:57'!\\\\nremoveDropShadow\\\\n\\\\tself hasDropShadow ifFalse:[^self].\\\\n\\\\tself changed.\\\\n\\\\tself hasDropShadow: false.\\\\n\\\\tfullBounds ifNotNil:[fullBounds _ self privateFullBounds].\\\\n\\\\tself changed.! !\\\\n\\\\n!Morph methodsFor: 'drop shadows' stamp: 'ar 10/26/2000 18:58'!\\\\nsetShadowOffset: evt\\\\n\\\\t| handle |\\\\n\\\\thandle _ HandleMorph new forEachPointDo:\\\\n\\\\t\\\\t[:newPoint | self shadowPoint: newPoint].\\\\n\\\\tevt hand attachMorph: handle.\\\\n\\\\thandle startStepping.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'drop shadows' stamp: 'ar 10/26/2000 18:59'!\\\\nshadowColor\\\\n\\\\t^self valueOfProperty: #shadowColor ifAbsent:[Color black]! !\\\\n\\\\n!Morph methodsFor: 'drop shadows' stamp: 'ar 10/26/2000 20:22'!\\\\nshadowColor: aColor\\\\n\\\\tself shadowColor = aColor ifFalse:[self changed].\\\\n\\\\tself setProperty: #shadowColor toValue: aColor.! !\\\\n\\\\n!Morph methodsFor: 'drop shadows' stamp: 'ar 10/26/2000 18:57'!\\\\nshadowOffset\\\\n\\\\t\\\\\\\"Return the current shadow offset\\\\\\\"\\\\n\\\\t^self valueOfProperty: #shadowOffset ifAbsent:[0@0]! !\\\\n\\\\n!Morph methodsFor: 'drop shadows' stamp: 'ar 10/26/2000 19:00'!\\\\nshadowOffset: aPoint\\\\n\\\\t\\\\\\\"Set the current shadow offset\\\\\\\"\\\\n\\\\t(aPoint isNil or:[(aPoint x isZero) & (aPoint y isZero)])\\\\n\\\\t\\\\tifTrue:[self removeProperty: #shadowOffset]\\\\n\\\\t\\\\tifFalse:[self setProperty: #shadowOffset toValue: aPoint].! !\\\\n\\\\n!Morph methodsFor: 'drop shadows' stamp: 'ar 11/12/2000 18:58'!\\\\nshadowPoint: newPoint\\\\n\\\\tself changed.\\\\n\\\\tself shadowOffset: newPoint - self center // 5.\\\\n\\\\tfullBounds ifNotNil:[fullBounds _ self privateFullBounds].\\\\n\\\\tself changed.! !\\\\n\\\\n!Morph methodsFor: 'drop shadows' stamp: 'ar 10/26/2000 20:16'!\\\\ntoggleDropShadow\\\\n\\\\tself hasDropShadow\\\\n\\\\t\\\\tifTrue:[self removeDropShadow]\\\\n\\\\t\\\\tifFalse:[self addDropShadow].! !\\\\n\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'ar 10/5/2000 20:00'!\\\\naboutToBeGrabbedBy: aHand\\\\n\\\\t\\\\\\\"The receiver is being grabbed by a hand.\\\\n\\\\tPerform necessary adjustments (if any) and return the actual morph\\\\n\\\\tthat should be added to the hand.\\\\\\\"\\\\n\\\\t| extentToHandToHand cmd |\\\\n\\\\tself formerOwner: owner.\\\\n\\\\tself formerPosition: self position.\\\\n\\\\tcmd _ self undoGrabCommand.\\\\n\\\\tcmd ifNotNil:[self setProperty: #undoGrabCommand toValue: cmd].\\\\n\\\\t(extentToHandToHand _ self valueOfProperty: #expandedExtent)\\\\n\\\\t\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t\\\\t[self removeProperty: #expandedExtent.\\\\n\\\\t\\\\t\\\\t\\\\tself extent: extentToHandToHand].\\\\n\\\\t^self \\\\\\\"Grab me\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'panda 4/25/2000 15:41'!\\\\ndisableDragNDrop\\\\n\\\\tself enableDragNDrop: false! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'panda 4/25/2000 15:50'!\\\\ndragEnabled\\\\n\\\\t\\\\\\\"Get this morph's ability to add and remove morphs via drag-n-drop.\\\\\\\"\\\\n\\\\t^(self valueOfProperty: #dragEnabled) == true\\\\n! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'ar 10/11/2000 18:18'!\\\\ndragEnabled: aBool\\\\n\\\\t^self enableDrag: aBool! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'ar 10/11/2000 18:20'!\\\\ndragNDropEnabled\\\\n\\\\t\\\\\\\"Note: This method is only useful for dragEnabled == dropEnabled at all times\\\\\\\"\\\\n\\\\tself separateDragAndDrop.\\\\n\\\\t^self dragEnabled and:[self dropEnabled]! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'panda 4/25/2000 18:36'!\\\\ndragSelectionColor\\\\n\\\\t^ Color magenta! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'panda 4/25/2000 15:51'!\\\\ndropEnabled\\\\n\\\\t\\\\\\\"Get this morph's ability to add and remove morphs via drag-n-drop.\\\\\\\"\\\\n\\\\t^(self valueOfProperty: #dropEnabled) == true\\\\n! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'ar 10/11/2000 18:18'!\\\\ndropEnabled: aBool\\\\n\\\\t^self enableDrop: aBool! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'panda 4/28/2000 10:52'!\\\\ndropHighlightColor\\\\n\\\\t^ Color blue! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'panda 4/25/2000 18:08'!\\\\ndropSuccessColor\\\\n\\\\t^ Color blue! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'panda 4/25/2000 15:41'!\\\\nenableDragNDrop\\\\n\\\\tself enableDragNDrop: true! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'ar 10/11/2000 18:21'!\\\\nenableDragNDrop: aBoolean\\\\n\\\\t\\\\\\\"Set both properties at once\\\\\\\"\\\\n\\\\tself separateDragAndDrop.\\\\n\\\\tself enableDrag: aBoolean.\\\\n\\\\tself enableDrop: aBoolean.! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'panda 4/25/2000 15:50'!\\\\nenableDrag: aBoolean\\\\n\\\\tself setProperty: #dragEnabled toValue: aBoolean! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'panda 4/25/2000 15:51'!\\\\nenableDrop: aBoolean\\\\n\\\\tself setProperty: #dropEnabled toValue: aBoolean! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'ar 10/5/2000 18:13'!\\\\nformerOwner\\\\n\\\\t^self valueOfProperty: #formerOwner! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'dgd 2/22/2003 14:31'!\\\\nformerOwner: aMorphOrNil \\\\n\\\\taMorphOrNil isNil \\\\n\\\\t\\\\tifTrue: [self removeProperty: #formerOwner]\\\\n\\\\t\\\\tifFalse: [self setProperty: #formerOwner toValue: aMorphOrNil]! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'ar 10/5/2000 18:13'!\\\\nformerPosition\\\\n\\\\t^self valueOfProperty: #formerPosition! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'dgd 2/22/2003 14:31'!\\\\nformerPosition: formerPosition \\\\n\\\\tformerPosition isNil \\\\n\\\\t\\\\tifTrue: [self removeProperty: #formerPosition]\\\\n\\\\t\\\\tifFalse: [self setProperty: #formerPosition toValue: formerPosition]! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'ar 10/6/2000 15:13'!\\\\ngrabTransform\\\\n\\\\t\\\\\\\"Return the transform for the receiver which should be applied during grabbing\\\\\\\"\\\\n\\\\t^owner ifNil:[IdentityTransform new] ifNotNil:[owner grabTransform]! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'panda 4/28/2000 10:53'!\\\\nhighlightedForDrop\\\\n\\\\t^(self valueOfProperty: #highlightedForDrop) == true! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'panda 4/28/2000 11:51'!\\\\nhighlightForDrop\\\\n\\\\tself highlightForDrop: true! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'panda 4/28/2000 12:01'!\\\\nhighlightForDrop: aBoolean\\\\n\\\\tself setProperty: #highlightedForDrop toValue: aBoolean.\\\\n\\\\tself changed! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'dgd 9/10/2004 13:42'!\\\\njustDroppedInto: aMorph event: anEvent\\\\n\\\\t\\\\\\\"This message is sent to a dropped morph after it has been dropped on -- and been accepted by -- a drop-sensitive morph\\\\\\\"\\\\n\\\\n\\\\t| aWindow partsBinCase cmd aStack |\\\\n\\\\t(self formerOwner notNil and: [self formerOwner ~~ aMorph])\\\\n\\\\t\\\\tifTrue: [self removeHalo].\\\\n\\\\tself formerOwner: nil.\\\\n\\\\tself formerPosition: nil.\\\\n\\\\tcmd _ self valueOfProperty: #undoGrabCommand.\\\\n\\\\tcmd ifNotNil:[aMorph rememberCommand: cmd.\\\\n\\\\t\\\\t\\\\t\\\\tself removeProperty: #undoGrabCommand].\\\\n\\\\t(partsBinCase _ aMorph isPartsBin) ifFalse:\\\\n\\\\t\\\\t[self isPartsDonor: false].\\\\n\\\\t(aWindow _ aMorph ownerThatIsA: SystemWindow) ifNotNil:\\\\n\\\\t\\\\t[aWindow isActive ifFalse:\\\\n\\\\t\\\\t\\\\t[aWindow activate]].\\\\n\\\\t(self isInWorld and: [partsBinCase not]) ifTrue:\\\\n\\\\t\\\\t[self world startSteppingSubmorphsOf: self].\\\\n\\\\t\\\\\\\"Note an unhappy inefficiency here:  the startStepping... call will often have already been called in the sequence leading up to entry to this method, but unfortunately the isPartsDonor: call often will not have already happened, with the result that the startStepping... call will not have resulted in the startage of the steppage.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"An object launched by certain parts-launcher mechanisms should end up fully visible...\\\\\\\"\\\\n\\\\t(self hasProperty: #beFullyVisibleAfterDrop) ifTrue:\\\\n\\\\t\\\\t[aMorph == ActiveWorld ifTrue:\\\\n\\\\t\\\\t\\\\t[self goHome].\\\\n\\\\t\\\\tself removeProperty: #beFullyVisibleAfterDrop].\\\\n\\\\n\\\\t(self holdsSeparateDataForEachInstance and: [(aStack _ self stack) notNil])\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[aStack reassessBackgroundShape]\\\\n! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'ar 2/6/2001 22:12'!\\\\njustGrabbedFrom: formerOwner\\\\n\\\\t\\\\\\\"The receiver was just grabbed from its former owner and is now attached to the hand. By default, we pass this message on if we're a renderer.\\\\\\\"\\\\n\\\\t(self isRenderer and:[self hasSubmorphs]) \\\\n\\\\t\\\\tifTrue:[self firstSubmorph justGrabbedFrom: formerOwner].! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'sw 3/27/2001 11:52'!\\\\nnameForUndoWording\\\\n\\\\t\\\\\\\"Return wording appropriate to the receiver for use in an undo-related menu item (and perhaps elsewhere)\\\\\\\"\\\\n\\\\n\\\\t| aName |\\\\n\\\\taName _ self knownName ifNil: [self renderedMorph class name].\\\\n\\\\t^ aName truncateTo: 24! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'di 12/12/2000 14:35'!\\\\nrejectDropMorphEvent: evt\\\\n\\\\t\\\\\\\"The receiver has been rejected, and must be put back somewhere.  There are three cases:\\\\n\\\\t(1)  It remembers its former owner and position, and goes right back there\\\\n\\\\t(2)  It remembers its former position only, in which case it was torn off from a parts bin, and the UI is that it floats back to its donor position and then vanishes.\\\\n\\\\t(3)  Neither former owner nor position is remembered, in which case it is whisked to the Trash\\\\\\\"\\\\n\\\\n\\\\tself removeProperty: #undoGrabCommand.\\\\n\\\\t(self formerOwner notNil and: [self formerOwner isPartsBin not]) ifTrue:\\\\n\\\\t\\\\t[^ self slideBackToFormerSituation: evt].\\\\n\\\\n\\\\tself formerPosition ifNotNil:  \\\\\\\"Position but no owner -- can just make it vanish\\\\\\\"\\\\n\\\\t\\\\t[^ self vanishAfterSlidingTo: self formerPosition event: evt].\\\\n\\\\t\\\\t\\\\n\\\\tself slideToTrash: evt! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'sw 1/11/1999 20:07'!\\\\nrepelsMorph: aMorph event: ev\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'panda 4/28/2000 12:02'!\\\\nresetHighlightForDrop\\\\n\\\\tself highlightForDrop: false! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'ar 10/11/2000 18:24'!\\\\nseparateDragAndDrop\\\\n\\\\t\\\\\\\"Conversion only. Separate the old #dragNDropEnabled into #dragEnabled and #dropEnabled and remove the old property.\\\\\\\"\\\\n\\\\t| dnd |\\\\n\\\\t(self hasProperty: #dragNDropEnabled) ifFalse:[^self].\\\\n\\\\tdnd _ (self valueOfProperty: #dragNDropEnabled) == true.\\\\n\\\\tself dragEnabled: dnd.\\\\n\\\\tself dropEnabled: dnd.\\\\n\\\\tself removeProperty: #dragNDropEnabled.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'ar 8/12/2003 23:35'!\\\\nslideBackToFormerSituation: evt \\\\n\\\\t| slideForm formerOwner formerPosition aWorld startPoint endPoint trans |\\\\n\\\\tformerOwner := self formerOwner.\\\\n\\\\tformerPosition := self formerPosition.\\\\n\\\\taWorld := evt hand world.\\\\n\\\\ttrans := formerOwner transformFromWorld.\\\\n\\\\tslideForm := trans isPureTranslation \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self imageForm offset: 0 @ 0]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[((TransformationMorph new asFlexOf: self) transform: trans) imageForm \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\toffset: 0 @ 0]. \\\\n\\\\tstartPoint := evt hand fullBounds origin.\\\\n\\\\tendPoint := trans localPointToGlobal: formerPosition.\\\\n\\\\towner removeMorph: self.\\\\n\\\\taWorld displayWorld.\\\\n\\\\tslideForm \\\\n\\\\t\\\\tslideFrom: startPoint\\\\n\\\\t\\\\tto: endPoint\\\\n\\\\t\\\\tnSteps: 12\\\\n\\\\t\\\\tdelay: 15.\\\\n\\\\tformerOwner addMorph: self.\\\\n\\\\tself position: formerPosition.\\\\n\\\\tself justDroppedInto: formerOwner event: evt! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'dgd 4/3/2006 14:12'!\\\\nslideToTrash: evt\\\\n\\\\t\\\\\\\"Perhaps slide the receiver across the screen to a trash can and make it disappear into it.  In any case, remove the receiver from the screen.\\\\\\\"\\\\n\\\\n\\\\t| aForm trash startPoint endPoint morphToSlide |\\\\n\\\\t((self renderedMorph == Utilities scrapsBook) or: [self renderedMorph isKindOf: TrashCanMorph]) ifTrue:\\\\n\\\\t\\\\t[self dismissMorph.  ^ self].\\\\n\\\\tPreferences slideDismissalsToTrash ifTrue:\\\\n\\\\t\\\\t[morphToSlide _ self representativeNoTallerThan: 200 norWiderThan: 200 thumbnailHeight: 100.\\\\n\\\\t\\\\taForm _ morphToSlide imageForm offset: (0@0).\\\\n\\\\t\\\\ttrash _ ActiveWorld\\\\n\\\\t\\\\t\\\\tfindDeepSubmorphThat:\\\\n\\\\t\\\\t\\\\t\\\\t[:aMorph | (aMorph isKindOf: TrashCanMorph) and:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[aMorph topRendererOrSelf owner == ActiveWorld]]\\\\n\\\\t\\\\t\\\\tifAbsent:\\\\n\\\\t\\\\t\\\\t\\\\t[trash _ TrashCanMorph new.\\\\n\\\\t\\\\t\\\\t\\\\ttrash bottomLeft: ActiveWorld bottomLeft - (-10@10).\\\\n\\\\t\\\\t\\\\t\\\\ttrash openInWorld.\\\\n\\\\t\\\\t\\\\t\\\\ttrash].\\\\n\\\\t\\\\tendPoint _ trash fullBoundsInWorld center.\\\\n\\\\t\\\\tstartPoint _ self topRendererOrSelf fullBoundsInWorld center - (aForm extent // 2)].\\\\n\\\\tself dismissMorph.\\\\n\\\\tActiveWorld displayWorld.\\\\n\\\\tPreferences slideDismissalsToTrash ifTrue:\\\\n\\\\t\\\\t[aForm slideFrom: startPoint to: endPoint nSteps: 12 delay: 15].\\\\n\\\\tUtilities addToTrash: self! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'mir 1/4/2001 11:02'!\\\\nstartDrag: anItem with: anObject\\\\n\\\\tself currentHand attachMorph: anObject! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'panda 4/25/2000 15:46'!\\\\ntoggleDragNDrop\\\\n\\\\t\\\\\\\"Toggle this morph's ability to add and remove morphs via drag-n-drop.\\\\\\\"\\\\n\\\\n\\\\t\\\\tself enableDragNDrop: self dragNDropEnabled not.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing'!\\\\ntransportedMorph\\\\n\\\\t^self! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'dgd 8/26/2003 21:44'!\\\\nundoGrabCommand\\\\n\\\\t\\\\\\\"Return an undo command for grabbing the receiver\\\\\\\"\\\\n\\\\n\\\\t| cmd |\\\\n\\\\towner ifNil:\\\\n\\\\t\\\\t[^ nil]. \\\\\\\"no owner - no undo\\\\\\\"\\\\n\\\\t^ (cmd _ Command new)\\\\n\\\\t\\\\tcmdWording: 'move ' translated, self nameForUndoWording;\\\\n\\\\t\\\\tundoTarget: self\\\\n\\\\t\\\\tselector: #undoMove:redo:owner:bounds:predecessor:\\\\n\\\\t\\\\targuments: {cmd. false. owner. self bounds. (owner morphPreceding: self)};\\\\n\\\\t\\\\tyourself! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'bf 1/5/2000 19:11'!\\\\nvanishAfterSlidingTo: aPosition event: evt\\\\n\\\\n\\\\t| aForm aWorld startPoint endPoint |\\\\n\\\\taForm _ self imageForm offset: 0@0.\\\\n\\\\taWorld _ self world.\\\\n\\\\tstartPoint _ evt hand fullBounds origin.\\\\n\\\\tself delete.\\\\n\\\\taWorld displayWorld.\\\\n\\\\tendPoint _ aPosition.\\\\n\\\\taForm slideFrom: startPoint  to: endPoint nSteps: 12 delay: 15.\\\\n\\\\tPreferences soundsEnabled ifTrue: [TrashCanMorph playDeleteSound].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'ar 10/11/2000 18:24'!\\\\nwantsDroppedMorph: aMorph event: evt\\\\n\\\\t\\\\\\\"Return true if the receiver wishes to accept the given morph, which is being dropped by a hand in response to the given event. Note that for a successful drop operation both parties need to agree. The symmetric check is done automatically via aMorph wantsToBeDroppedInto: self.\\\\\\\"\\\\n\\\\n\\\\t^self dropEnabled! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'ar 9/18/2000 18:34'!\\\\nwantsToBeDroppedInto: aMorph\\\\n\\\\t\\\\\\\"Return true if it's okay to drop the receiver into aMorph. This check is symmetric to #wantsDroppedMorph:event: to give both parties a chance of figuring out whether they like each other.\\\\\\\"\\\\n\\\\t^true! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'ar 2/10/1999 05:44'!\\\\nwantsToBeOpenedInWorld\\\\n\\\\t\\\\\\\"Return true if the receiver wants to be put into the World directly,\\\\n\\\\trather than allowing the user to place it (e.g., prevent attaching me\\\\n\\\\tto the hand after choosing 'new morph' in the world menu)\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'dropping/grabbing' stamp: 'sw 8/15/2000 16:58'!\\\\nwillingToBeDiscarded\\\\n\\\\t^ true! !\\\\n\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'tk 9/6/2000 12:42'!\\\\nclick\\\\n\\\\t\\\\\\\"Pretend the user clicked on me.\\\\\\\"\\\\n\\\\n\\\\t(self handlesMouseDown: nil) ifTrue: [\\\\n\\\\t\\\\tself mouseDown: nil.\\\\n\\\\t\\\\tself mouseUp: nil].! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'LC 5/18/2000 09:54'!\\\\nclick: evt\\\\n\\\\t\\\\\\\"Handle a single-click event. This message is only sent to clients that request it by sending #waitForClicksOrDrag:event: to the initiating hand in their mouseDown: method. This default implementation does nothing.\\\\n\\\\tLC 2/14/2000 08:32 - added: EventHandler notification\\\\\\\"\\\\n\\\\n\\\\tself eventHandler ifNotNil:\\\\n\\\\t\\\\t[self eventHandler click: evt fromMorph: self].! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'sw 3/8/1999 00:17'!\\\\ncursorPoint\\\\n\\\\t^ self currentHand lastEvent cursorPoint! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'jcg 10/2/2001 09:26'!\\\\ndoubleClickTimeout: evt\\\\n\\\\t\\\\\\\"Handle a double-click timeout event. This message is only sent to clients that request it by sending #waitForClicksOrDrag:event: to the initiating hand in their mouseDown: method. This default implementation does nothing.\\\\\\\"\\\\n\\\\n\\\\tself eventHandler ifNotNil:\\\\n\\\\t\\\\t[self eventHandler doubleClickTimeout: evt fromMorph: self].! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'LC 5/18/2000 09:54'!\\\\ndoubleClick: evt\\\\n\\\\t\\\\\\\"Handle a double-click event. This message is only sent to clients that request it by sending #waitForClicksOrDrag:event: to the initiating hand in their mouseDown: method. This default implementation does nothing.\\\\n\\\\tLC 2/14/2000 08:32 - added: EventHandler notification\\\\\\\"\\\\n\\\\n\\\\tself eventHandler ifNotNil:\\\\n\\\\t\\\\t[self eventHandler doubleClick: evt fromMorph: self].! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'ar 1/10/2001 21:28'!\\\\ndropFiles: anEvent\\\\n\\\\t\\\\\\\"Handle a number of files dropped from the OS\\\\\\\"\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'RAA 2/12/2001 15:26'!\\\\nfirstClickTimedOut: evt\\\\n\\\\t\\\\\\\"Useful for double-click candidates who want to know whether or not the click is a single or double. In this case, ignore the #click: and wait for either this or #doubleClick:\\\\\\\"\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'nk 3/10/2004 19:48'!\\\\nhandlerForYellowButtonDown: anEvent \\\\n\\\\t\\\\\\\"Return the (prospective) handler for a mouse down event with the yellow button pressed.\\\\n\\\\tThe \\\\thandler is temporarily installed and can be used for morphs further \\\\n\\\\tdown the hierarchy to negotiate whether the inner or the outer \\\\n\\\\tmorph should finally handle the event.\\\\\\\"\\\\n\\\\n\\\\t(self hasYellowButtonMenu or: [ self handlesMouseDown: anEvent ])\\\\n\\\\t\\\\tifFalse: [ ^ nil].\\\\t\\\\\\\"Not interested.\\\\\\\"\\\\n\\\\n\\\\tanEvent handler\\\\n\\\\t\\\\tifNil: [^ self].\\\\t\\\\\\\"Nobody else was interested\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Same priority but I am innermost.\\\\\\\"\\\\n\\\\t^ self mouseDownPriority >= anEvent handler mouseDownPriority\\\\n\\\\t\\\\tifFalse: [nil ]\\\\n\\\\t\\\\tifTrue: [self]! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'ar 10/28/2000 22:18'!\\\\nhandlesKeyboard: evt\\\\n\\\\t\\\\\\\"Return true if the receiver wishes to handle the given keyboard event\\\\\\\"\\\\n\\\\tself eventHandler ifNotNil: [^ self eventHandler handlesKeyboard: evt].\\\\n\\\\t^ false\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'nk 2/14/2004 18:42'!\\\\nhandlesMouseDown: evt\\\\n\\\\t\\\\\\\"Do I want to receive mouseDown events (mouseDown:, mouseMove:, mouseUp:)?\\\\\\\"\\\\n\\\\t\\\\\\\"NOTE: The default response is false, except if you have added sensitivity to mouseDown events using the on:send:to: mechanism.  Subclasses that implement these messages directly should override this one to return true.\\\\\\\" \\\\n\\\\n\\\\tself eventHandler ifNotNil: [^ self eventHandler handlesMouseDown: evt].\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'di 9/14/1998 07:31'!\\\\nhandlesMouseOverDragging: evt\\\\n\\\\t\\\\\\\"Return true if I want to receive mouseEnterDragging: and mouseLeaveDragging: when the hand drags something over me (button up or button down), or when the mouse button is down but there is no mouseDown recipient.  The default response is false, except if you have added sensitivity to mouseEnterLaden: or mouseLeaveLaden:, using the on:send:to: mechanism.\\\\\\\"\\\\n\\\\t\\\\\\\"NOTE:  If the hand state matters in these cases, it may be tested by constructs such as\\\\n\\\\t\\\\tevent anyButtonPressed\\\\n\\\\t\\\\tevent hand hasSubmorphs\\\\\\\"\\\\n\\\\n\\\\tself eventHandler ifNotNil: [^ self eventHandler handlesMouseOverDragging: evt].\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'di 9/14/1998 07:31'!\\\\nhandlesMouseOver: evt\\\\n\\\\t\\\\\\\"Do I want to receive mouseEnter: and mouseLeave: when the button is up and the hand is empty?  The default response is false, except if you have added sensitivity to mouseEnter: or mouseLeave:, using the on:send:to: mechanism.\\\\\\\" \\\\n\\\\n\\\\tself eventHandler ifNotNil: [^ self eventHandler handlesMouseOver: evt].\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'ar 10/22/2000 17:06'!\\\\nhandlesMouseStillDown: evt\\\\n\\\\t\\\\\\\"Return true if the receiver wants to get repeated #mouseStillDown: messages between #mouseDown: and #mouseUp\\\\\\\"\\\\n\\\\tself eventHandler ifNotNil: [^ self eventHandler handlesMouseStillDown: evt].\\\\n\\\\t^ false\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'sw 4/2/98 14:16'!\\\\nhasFocus\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'event handling'!\\\\nkeyboardFocusChange: aBoolean\\\\n\\\\t\\\\\\\"The message is sent to a morph when its keyboard focus change. The given argument indicates that the receiver is gaining keyboard focus (versus losing) the keyboard focus. Morphs that accept keystrokes should change their appearance in some way when they are the current keyboard focus. This default implementation does nothing.\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'ar 9/14/2000 18:23'!\\\\nkeyDown: anEvent\\\\n\\\\t\\\\\\\"Handle a key down event. The default response is to do nothing.\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'tk 8/10/1998 16:05'!\\\\nkeyStroke: anEvent\\\\n\\\\t\\\\\\\"Handle a keystroke event.  The default response is to let my eventHandler, if any, handle it.\\\\\\\"\\\\n\\\\n\\\\tself eventHandler ifNotNil:\\\\n\\\\t\\\\t[self eventHandler keyStroke: anEvent fromMorph: self].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'KTT 6/1/2004 11:41'!\\\\nkeyUp: anEvent\\\\n\\\\t\\\\\\\"Handle a key up event. The default response is to do nothing.\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'dgd 9/19/2004 13:14'!\\\\nmouseDown: evt \\\\n\\\\t\\\\\\\"Handle a mouse down event. The default response is to let my \\\\n\\\\teventHandler, if any, handle it.\\\\\\\"\\\\n\\\\tevt yellowButtonPressed\\\\n\\\\t\\\\tifTrue: [\\\\\\\"First check for option (menu) click\\\\\\\"\\\\n\\\\t\\\\t\\\\t^ self yellowButtonActivity: evt shiftPressed].\\\\n\\\\tself eventHandler\\\\n\\\\t\\\\tifNotNil: [self eventHandler mouseDown: evt fromMorph: self]\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'di 9/14/1998 07:33'!\\\\nmouseEnterDragging: evt\\\\n\\\\t\\\\\\\"Handle a mouseEnterDragging event, meaning the mouse just entered my bounds with a button pressed or laden with submorphs.  The default response is to let my eventHandler, if any, handle it, or else to do nothing.\\\\\\\"\\\\n\\\\n\\\\tself eventHandler ifNotNil:\\\\n\\\\t\\\\t[^ self eventHandler mouseEnterDragging: evt fromMorph: self].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'tk 8/10/1998 16:00'!\\\\nmouseEnter: evt\\\\n\\\\t\\\\\\\"Handle a mouseEnter event, meaning the mouse just entered my bounds with no button pressed. The default response is to let my eventHandler, if any, handle it.\\\\\\\"\\\\n\\\\n\\\\tself eventHandler ifNotNil:\\\\n\\\\t\\\\t[self eventHandler mouseEnter: evt fromMorph: self].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'di 9/14/1998 07:38'!\\\\nmouseLeaveDragging: evt\\\\n\\\\t\\\\\\\"Handle a mouseLeaveLaden event, meaning the mouse just left my bounds with a button pressed or laden with submorphs. The default response is to let my eventHandler, if any, handle it; else to do nothing.\\\\\\\"\\\\n\\\\n\\\\tself eventHandler ifNotNil:\\\\n\\\\t\\\\t[self eventHandler mouseLeaveDragging: evt fromMorph: self]! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'tk 8/10/1998 16:01'!\\\\nmouseLeave: evt\\\\n\\\\t\\\\\\\"Handle a mouseLeave event, meaning the mouse just left my bounds with no button pressed. The default response is to let my eventHandler, if any, handle it.\\\\\\\"\\\\n\\\\n\\\\tself eventHandler ifNotNil:\\\\n\\\\t\\\\t[self eventHandler mouseLeave: evt fromMorph: self].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'ar 10/25/2000 18:04'!\\\\nmouseMove: evt\\\\n\\\\t\\\\\\\"Handle a mouse move event. The default response is to let my eventHandler, if any, handle it.\\\\\\\"\\\\n\\\\tself eventHandler ifNotNil:\\\\n\\\\t\\\\t[self eventHandler mouseMove: evt fromMorph: self].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'ar 10/25/2000 18:02'!\\\\nmouseStillDownThreshold\\\\n\\\\t\\\\\\\"Return the number of milliseconds after which mouseStillDown: should be sent\\\\\\\"\\\\n\\\\t^200! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'ar 10/22/2000 17:08'!\\\\nmouseStillDown: evt\\\\n\\\\t\\\\\\\"Handle a mouse move event. The default response is to let my eventHandler, if any, handle it.\\\\\\\"\\\\n\\\\n\\\\tself eventHandler ifNotNil:\\\\n\\\\t\\\\t[self eventHandler mouseStillDown: evt fromMorph: self].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'tk 8/10/1998 16:05'!\\\\nmouseUp: evt\\\\n\\\\t\\\\\\\"Handle a mouse up event. The default response is to let my eventHandler, if any, handle it.\\\\\\\"\\\\n\\\\n\\\\tself eventHandler ifNotNil:\\\\n\\\\t\\\\t[self eventHandler mouseUp: evt fromMorph: self].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'dgd 8/28/2004 18:20'!\\\\nmoveOrResizeFromKeystroke: anEvent \\\\n\\\\t\\\\\\\"move or resize the receiver based on a keystroke\\\\\\\"\\\\n\\\\t| dir | \\\\n\\\\n\\\\tanEvent keyValue = 28 ifTrue: [dir := -1 @ 0].\\\\n\\\\tanEvent keyValue = 29 ifTrue: [dir := 1 @ 0].\\\\n\\\\tanEvent keyValue = 30 ifTrue: [dir := 0 @ -1].\\\\n\\\\tanEvent keyValue = 31 ifTrue: [dir := 0 @ 1].\\\\n\\\\n\\\\tdir notNil\\\\n\\\\t\\\\tifTrue:[\\\\n\\\\t\\\\t\\\\tanEvent controlKeyPressed ifTrue: [dir := dir * 10].\\\\n\\\\n\\\\t\\\\t\\\\tanEvent shiftPressed\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self extent: self extent + dir]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self position: self position + dir].\\\\n\\\\n\\\\t\\\\t\\\\t\\\\\\\"anEvent wasHandled: true.\\\\\\\"\\\\n\\\\t]\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'tk 8/10/1998 16:01'!\\\\non: eventName send: selector to: recipient\\\\n\\\\tself eventHandler ifNil: [self eventHandler: EventHandler new].\\\\n\\\\tself eventHandler on: eventName send: selector to: recipient! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'ar 3/18/2001 17:21'!\\\\non: eventName send: selector to: recipient withValue: value\\\\n\\\\t\\\\\\\"NOTE: selector must take 3 arguments, of which value will be the *** FIRST ***\\\\\\\"\\\\n\\\\n\\\\tself eventHandler ifNil: [self eventHandler: EventHandler new].\\\\n\\\\tself eventHandler on: eventName send: selector to: recipient withValue: value\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'fbs 1/7/2005 15:43'!\\\\npreferredKeyboardBounds\\\\n\\\\n\\\\t^ self bounds: self bounds in: World.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'fbs 1/7/2005 15:42'!\\\\npreferredKeyboardPosition\\\\n\\\\n\\\\t^ (self bounds: self bounds in: World) topLeft.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'tk 8/10/1998 16:02'!\\\\nremoveLink: actionCode\\\\n\\\\tself eventHandler ifNotNil:\\\\n\\\\t\\\\t[self eventHandler on: actionCode send: nil to: nil]! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'sw 11/16/1998 08:06'!\\\\nrestoreSuspendedEventHandler\\\\n\\\\t| savedHandler |\\\\n\\\\t(savedHandler _ self valueOfProperty: #suspendedEventHandler) ifNotNil:\\\\n\\\\t\\\\t[self eventHandler: savedHandler].\\\\n\\\\tsubmorphs do: [:m | m restoreSuspendedEventHandler]\\\\n! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'mir 5/23/2000 17:43'!\\\\nstartDrag: evt\\\\n\\\\t\\\\\\\"Handle a double-click event. This message is only sent to clients that request it by sending #waitForClicksOrDrag:event: to the initiating hand in their mouseDown: method. This default implementation does nothing.\\\\\\\"\\\\n\\\\n\\\\tself eventHandler ifNotNil:\\\\n\\\\t\\\\t[self eventHandler startDrag: evt fromMorph: self].! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'sw 11/16/1998 08:07'!\\\\nsuspendEventHandler\\\\n\\\\tself eventHandler ifNotNil:\\\\n\\\\t\\\\t[self setProperty: #suspendedEventHandler toValue: self eventHandler.\\\\n\\\\t\\\\tself eventHandler: nil].\\\\n\\\\tsubmorphs do: [:m | m suspendEventHandler].  \\\\\\\"All those rectangles\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'dgd 8/28/2004 18:42'!\\\\ntabAmongFields\\\\n\\\\t^ Preferences tabAmongFields\\\\n\\\\t\\\\tor: [self hasProperty: #tabAmongFields] ! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'RAA 6/19/2000 07:13'!\\\\ntransformFromOutermostWorld\\\\n\\\\t\\\\\\\"Return a transform to map world coordinates into my local coordinates\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"self isWorldMorph ifTrue: [^ MorphicTransform identity].\\\\\\\"\\\\n\\\\t^ self transformFrom: self outermostWorldMorph! !\\\\n\\\\n!Morph methodsFor: 'event handling'!\\\\ntransformFromWorld\\\\n\\\\t\\\\\\\"Return a transform to map world coordinates into my local coordinates\\\\\\\"\\\\n\\\\n\\\\t^ self transformFrom: nil! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'dgd 2/22/2003 14:36'!\\\\ntransformFrom: uberMorph \\\\n\\\\t\\\\\\\"Return a transform to be used to map coordinates in a morph above me into my childrens coordinates, or vice-versa. This is used to support scrolling, scaling, and/or rotation. This default implementation just returns my owner's transform or the identity transform if my owner is nil. \\\\n\\\\tNote:  This method cannot be used to map into the receiver's coordinate system!!\\\\\\\"\\\\n\\\\n\\\\t(self == uberMorph or: [owner isNil]) ifTrue: [^IdentityTransform new].\\\\n\\\\t^owner transformFrom: uberMorph! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'ar 1/10/2001 21:28'!\\\\nwantsDropFiles: anEvent\\\\n\\\\t\\\\\\\"Return true if the receiver wants files dropped from the OS.\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'di 9/14/2000 11:46'!\\\\nwantsEveryMouseMove\\\\n\\\\t\\\\\\\"Unless overridden, this method allows processing to skip mouse move events\\\\n\\\\twhen processing is lagging.  No 'significant' event (down/up, etc) will be skipped.\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'sw 11/3/97 02:11'!\\\\nwantsKeyboardFocusFor: aSubmorph\\\\n\\\\t\\\\\\\"Answer whether a plain mouse click on aSubmorph, a text-edit-capable thing, should result in a text selection there\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'sw 5/6/1998 12:54'!\\\\nwouldAcceptKeyboardFocus\\\\n\\\\t\\\\\\\"Answer whether a plain mouse click on the receiver should result in a text selection there\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'sw 8/29/2000 14:57'!\\\\nwouldAcceptKeyboardFocusUponTab\\\\n\\\\t\\\\\\\"Answer whether the receiver is in the running as the new keyboard focus if the tab key were hit at a meta level.  This provides the leverage for tabbing among fields of a card, for example.\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'event handling' stamp: 'dgd 7/28/2005 13:02'!\\\\nyellowButtonActivity: shiftState \\\\n\\\\t\\\\\\\"Find me or my outermost owner that has items to add to a  \\\\n\\\\tyellow button menu.  \\\\n\\\\tshiftState is true if the shift was pressed.  \\\\n\\\\tOtherwise, build a menu that contains the contributions from  \\\\n\\\\tmyself and my interested submorphs,  \\\\n\\\\tand present it to the user.\\\\\\\"\\\\n\\\\t| menu |\\\\n\\\\tself isWorldMorph\\\\n\\\\t\\\\tifFalse: [| outerOwner | \\\\n\\\\t\\\\t\\\\touterOwner := self outermostOwnerWithYellowButtonMenu.\\\\n\\\\t\\\\t\\\\touterOwner\\\\n\\\\t\\\\t\\\\t\\\\tifNil: [^ self].\\\\n\\\\t\\\\t\\\\touterOwner == self\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [^ outerOwner yellowButtonActivity: shiftState]].\\\\n\\\\tmenu := self buildYellowButtonMenu: ActiveHand.\\\\n\\\\tmenu\\\\n\\\\t\\\\taddTitle: self externalName\\\\n\\\\t\\\\ticon: (self iconOrThumbnailOfSize: (Preferences tinyDisplay ifTrue: [16] ifFalse: [28])).\\\\n\\\\tmenu popUpInWorld: self currentWorld! !\\\\n\\\\n\\\\n!Morph methodsFor: 'events-accessing' stamp: 'rw 4/25/2002 07:18'!\\\\nactionMap\\\\n\\\\t\\\\\\\"Answer an action map\\\\\\\"\\\\n\\\\n\\\\t| actionMap |\\\\n\\\\tactionMap := self valueOfProperty: #actionMap.\\\\n\\\\tactionMap ifNil:\\\\n\\\\t\\\\t[actionMap _ self createActionMap].\\\\n\\\\t^ actionMap! !\\\\n\\\\n!Morph methodsFor: 'events-accessing' stamp: 'rw 4/25/2002 07:17'!\\\\nupdateableActionMap\\\\n\\\\t\\\\\\\"Answer an updateable action map, saving it in my #actionMap property\\\\\\\"\\\\n\\\\t\\\\n\\\\t| actionMap |\\\\n\\\\tactionMap := self valueOfProperty: #actionMap.\\\\n\\\\tactionMap ifNil:\\\\n\\\\t\\\\t[actionMap _ self createActionMap.\\\\n\\\\t\\\\tself setProperty: #actionMap toValue: actionMap].\\\\n\\\\t^ actionMap! !\\\\n\\\\n\\\\n!Morph methodsFor: 'events-alarms' stamp: 'ar 9/11/2000 16:35'!\\\\naddAlarm: aSelector after: delayTime\\\\n\\\\t\\\\\\\"Add an alarm (that is an action to be executed once) with the given set of parameters\\\\\\\"\\\\n\\\\t^self addAlarm: aSelector withArguments: #() after: delayTime! !\\\\n\\\\n!Morph methodsFor: 'events-alarms' stamp: 'ar 9/11/2000 16:35'!\\\\naddAlarm: aSelector at: scheduledTime\\\\n\\\\t\\\\\\\"Add an alarm (that is an action to be executed once) with the given set of parameters\\\\\\\"\\\\n\\\\t^self addAlarm: aSelector withArguments: #() at: scheduledTime! !\\\\n\\\\n!Morph methodsFor: 'events-alarms' stamp: 'ar 9/11/2000 16:35'!\\\\naddAlarm: aSelector withArguments: args after: delayTime\\\\n\\\\t\\\\\\\"Add an alarm (that is an action to be executed once) with the given set of parameters\\\\\\\"\\\\n\\\\t^self addAlarm: aSelector withArguments: args at: Time millisecondClockValue + delayTime! !\\\\n\\\\n!Morph methodsFor: 'events-alarms' stamp: 'ar 9/14/2000 12:15'!\\\\naddAlarm: aSelector withArguments: args at: scheduledTime\\\\n\\\\t\\\\\\\"Add an alarm (that is an action to be executed once) with the given set of parameters\\\\\\\"\\\\n\\\\t| scheduler |\\\\n\\\\tscheduler _ self alarmScheduler.\\\\n\\\\tscheduler ifNotNil:[scheduler addAlarm: aSelector withArguments: args for: self at: scheduledTime].! !\\\\n\\\\n!Morph methodsFor: 'events-alarms' stamp: 'ar 9/11/2000 16:35'!\\\\naddAlarm: aSelector with: arg1 after: delayTime\\\\n\\\\t\\\\\\\"Add an alarm (that is an action to be executed once) with the given set of parameters\\\\\\\"\\\\n\\\\t^self addAlarm: aSelector withArguments: (Array with: arg1) after: delayTime! !\\\\n\\\\n!Morph methodsFor: 'events-alarms' stamp: 'ar 9/11/2000 16:35'!\\\\naddAlarm: aSelector with: arg1 at: scheduledTime\\\\n\\\\t\\\\\\\"Add an alarm (that is an action to be executed once) with the given set of parameters\\\\\\\"\\\\n\\\\t^self addAlarm: aSelector withArguments: (Array with: arg1) at: scheduledTime! !\\\\n\\\\n!Morph methodsFor: 'events-alarms' stamp: 'ar 9/11/2000 16:35'!\\\\naddAlarm: aSelector with: arg1 with: arg2 after: delayTime\\\\n\\\\t\\\\\\\"Add an alarm (that is an action to be executed once) with the given set of parameters\\\\\\\"\\\\n\\\\t^self addAlarm: aSelector withArguments: (Array with: arg1 with: arg2) after: delayTime! !\\\\n\\\\n!Morph methodsFor: 'events-alarms' stamp: 'ar 9/11/2000 16:35'!\\\\naddAlarm: aSelector with: arg1 with: arg2 at: scheduledTime\\\\n\\\\t\\\\\\\"Add an alarm (that is an action to be executed once) with the given set of parameters\\\\\\\"\\\\n\\\\t^self addAlarm: aSelector withArguments: (Array with: arg1 with: arg2) at: scheduledTime! !\\\\n\\\\n!Morph methodsFor: 'events-alarms' stamp: 'ar 9/11/2000 16:34'!\\\\nalarmScheduler\\\\n\\\\t\\\\\\\"Return the scheduler being responsible for triggering alarms\\\\\\\"\\\\n\\\\t^self world! !\\\\n\\\\n!Morph methodsFor: 'events-alarms' stamp: 'ar 9/14/2000 12:14'!\\\\nremoveAlarm: aSelector\\\\n\\\\t\\\\\\\"Remove the given alarm\\\\\\\"\\\\n\\\\t| scheduler |\\\\n\\\\tscheduler _ self alarmScheduler.\\\\n\\\\tscheduler ifNotNil:[scheduler removeAlarm: aSelector for: self].! !\\\\n\\\\n!Morph methodsFor: 'events-alarms' stamp: 'ar 9/14/2000 12:15'!\\\\nremoveAlarm: aSelector at: scheduledTime\\\\n\\\\t\\\\\\\"Remove the given alarm\\\\\\\"\\\\n\\\\t| scheduler |\\\\n\\\\tscheduler _ self alarmScheduler.\\\\n\\\\tscheduler ifNotNil:[scheduler removeAlarm: aSelector at: scheduledTime for: self].! !\\\\n\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 9/13/2000 17:58'!\\\\ncontainsPoint: aPoint event: anEvent\\\\n\\\\t\\\\\\\"Return true if aPoint is considered to be inside the receiver for the given event.\\\\n\\\\tThe default implementation treats locked children as integral part of their owners.\\\\\\\"\\\\n\\\\t(self fullBounds containsPoint: aPoint) ifFalse:[^false].\\\\n\\\\t(self containsPoint: aPoint) ifTrue:[^true].\\\\n\\\\tself submorphsDo:[:m|\\\\n\\\\t\\\\t(m isLocked and:[m fullContainsPoint: \\\\n\\\\t\\\\t\\\\t((m transformedFrom: self) globalPointToLocal: aPoint)]) ifTrue:[^true]].\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 9/13/2000 14:51'!\\\\ndefaultEventDispatcher\\\\n\\\\t\\\\\\\"Return the default event dispatcher to use with events that are directly sent to the receiver\\\\\\\"\\\\n\\\\t^MorphicEventDispatcher new! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 1/10/2001 21:35'!\\\\nhandleDropFiles: anEvent\\\\n\\\\t\\\\\\\"Handle a drop from the OS.\\\\\\\"\\\\n\\\\tanEvent wasHandled ifTrue:[^self]. \\\\\\\"not interested\\\\\\\"\\\\n\\\\t(self wantsDropFiles: anEvent) ifFalse:[^self].\\\\n\\\\tanEvent wasHandled: true.\\\\n\\\\tself dropFiles: anEvent.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'di 12/12/2000 14:39'!\\\\nhandleDropMorph: anEvent\\\\n\\\\t\\\\\\\"Handle a dropping morph.\\\\\\\"\\\\n\\\\t| aMorph localPt |\\\\n\\\\taMorph _ anEvent contents.\\\\n\\\\t\\\\\\\"Do a symmetric check if both morphs like each other\\\\\\\"\\\\n\\\\t((self wantsDroppedMorph: aMorph event: anEvent)\\\\t\\\\\\\"I want her\\\\\\\"\\\\n\\\\t\\\\tand: [aMorph wantsToBeDroppedInto: self])\\\\t\\\\t\\\\\\\"she wants me\\\\\\\"\\\\n\\\\t\\\\tifFalse: [aMorph removeProperty: #undoGrabCommand.\\\\n\\\\t\\\\t\\\\t\\\\t^ self].\\\\n\\\\tanEvent wasHandled: true.\\\\n\\\\t\\\\\\\"Transform the morph into the receiver's coordinate frame. This is currently incomplete since it only takes the offset into account where it really should take the entire transform.\\\\\\\"\\\\n\\\\tlocalPt _ (self transformedFrom: anEvent hand world) \\\\\\\"full transform down\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tglobalPointToLocal: aMorph referencePosition.\\\\n\\\\taMorph referencePosition: localPt.\\\\n\\\\tself acceptDroppingMorph: aMorph event: anEvent.\\\\n\\\\taMorph justDroppedInto: self event: anEvent.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 9/15/2000 21:13'!\\\\nhandleEvent: anEvent\\\\n\\\\t\\\\\\\"Handle the given event\\\\\\\"\\\\n\\\\t^anEvent sentTo: self.! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 10/4/2000 18:48'!\\\\nhandleFocusEvent: anEvent\\\\n\\\\t\\\\\\\"Handle the given event. This message is sent if the receiver currently has the focus and is therefore receiving events directly from some hand.\\\\\\\"\\\\n\\\\t^self handleEvent: anEvent! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 9/15/2000 23:01'!\\\\nhandleKeyDown: anEvent\\\\n\\\\t\\\\\\\"System level event handling.\\\\\\\"\\\\n\\\\tanEvent wasHandled ifTrue:[^self].\\\\n\\\\t(self handlesKeyboard: anEvent) ifFalse:[^self].\\\\n\\\\tanEvent wasHandled: true.\\\\n\\\\t^self keyDown: anEvent! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 9/15/2000 23:01'!\\\\nhandleKeyUp: anEvent\\\\n\\\\t\\\\\\\"System level event handling.\\\\\\\"\\\\n\\\\tanEvent wasHandled ifTrue:[^self].\\\\n\\\\t(self handlesKeyboard: anEvent) ifFalse:[^self].\\\\n\\\\tanEvent wasHandled: true.\\\\n\\\\t^self keyUp: anEvent! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'md 8/2/2006 18:57'!\\\\nhandleKeystroke: anEvent \\\\n\\\\t\\\\\\\"System level event handling.\\\\\\\"\\\\n\\\\t\\\\n\\\\tanEvent wasHandled\\\\n\\\\t\\\\tifTrue: [^ self].\\\\n\\\\t(self handlesKeyboard: anEvent)\\\\n\\\\t\\\\tifFalse: [^ self].\\\\n\\\\tanEvent wasHandled: true.\\\\n\\\\t^ self keyStroke: anEvent! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 9/16/2000 14:22'!\\\\nhandleListenEvent: anEvent\\\\n\\\\t\\\\\\\"Handle the given event. This message is sent if the receiver is a registered listener for the given event.\\\\\\\"\\\\n\\\\t^anEvent sentTo: self.! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'dgd 9/10/2004 13:36'!\\\\nhandleMouseDown: anEvent\\\\n\\\\t\\\\\\\"System level event handling.\\\\\\\"\\\\n\\\\tanEvent wasHandled ifTrue:[^self]. \\\\\\\"not interested\\\\\\\"\\\\n\\\\tanEvent hand removePendingBalloonFor: self.\\\\n\\\\tanEvent hand removePendingHaloFor: self.\\\\n\\\\tanEvent wasHandled: true.\\\\n\\\\n\\\\t(anEvent controlKeyPressed\\\\n\\\\t\\\\t\\\\tand: [Preferences cmdGesturesEnabled])\\\\n\\\\t\\\\tifTrue: [^ self invokeMetaMenu: anEvent].\\\\n\\\\n\\\\t\\\\\\\"Make me modal during mouse transitions\\\\\\\"\\\\n\\\\tanEvent hand newMouseFocus: self event: anEvent.\\\\n\\\\tanEvent blueButtonChanged ifTrue:[^self blueButtonDown: anEvent].\\\\n\\\\t\\\\n\\\\t\\\\\\\"this mouse down could be the start of a gesture, or the end of a gesture focus\\\\\\\"\\\\n\\\\t(self isGestureStart: anEvent)\\\\n\\\\t\\\\tifTrue: [^ self gestureStart: anEvent].\\\\n\\\\n\\\\tself mouseDown: anEvent.\\\\n\\\\n\\\\tPreferences maintainHalos\\\\n\\\\t\\\\tifFalse:[ anEvent hand removeHaloFromClick: anEvent on: self ].\\\\n\\\\n\\\\t(self handlesMouseStillDown: anEvent) ifTrue:[\\\\n\\\\t\\\\tself startStepping: #handleMouseStillDown: \\\\n\\\\t\\\\t\\\\tat: Time millisecondClockValue + self mouseStillDownThreshold\\\\n\\\\t\\\\t\\\\targuments: {anEvent copy resetHandlerFields}\\\\n\\\\t\\\\t\\\\tstepTime: self mouseStillDownStepRate ].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 8/8/2001 15:29'!\\\\nhandleMouseEnter: anEvent\\\\n\\\\t\\\\\\\"System level event handling.\\\\\\\"\\\\n\\\\t(anEvent isDraggingEvent) ifTrue:[\\\\n\\\\t\\\\t(self handlesMouseOverDragging: anEvent) ifTrue:[\\\\n\\\\t\\\\t\\\\tanEvent wasHandled: true.\\\\n\\\\t\\\\t\\\\tself mouseEnterDragging: anEvent].\\\\n\\\\t\\\\t^self].\\\\n\\\\tself wantsHalo \\\\\\\"If receiver wants halo and balloon, trigger balloon after halo\\\\\\\"\\\\n\\\\t\\\\tifTrue:[anEvent hand triggerHaloFor: self after: self haloDelayTime]\\\\n\\\\t\\\\tifFalse:[self wantsBalloon\\\\n\\\\t\\\\t\\\\tifTrue:[anEvent hand triggerBalloonFor: self after: self balloonHelpDelayTime]].\\\\n\\\\t(self handlesMouseOver: anEvent) ifTrue:[\\\\n\\\\t\\\\tanEvent wasHandled: true.\\\\n\\\\t\\\\tself mouseEnter: anEvent.\\\\n\\\\t].! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 10/6/2000 00:15'!\\\\nhandleMouseLeave: anEvent\\\\n\\\\t\\\\\\\"System level event handling.\\\\\\\"\\\\n\\\\tanEvent hand removePendingBalloonFor: self.\\\\n\\\\tanEvent hand removePendingHaloFor: self.\\\\n\\\\tanEvent isDraggingEvent ifTrue:[\\\\n\\\\t\\\\t(self handlesMouseOverDragging: anEvent) ifTrue:[\\\\n\\\\t\\\\t\\\\tanEvent wasHandled: true.\\\\n\\\\t\\\\t\\\\tself mouseLeaveDragging: anEvent].\\\\n\\\\t\\\\t^self].\\\\n\\\\t(self handlesMouseOver: anEvent) ifTrue:[\\\\n\\\\t\\\\tanEvent wasHandled: true.\\\\n\\\\t\\\\tself mouseLeave: anEvent.\\\\n\\\\t].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'nk 6/13/2004 09:16'!\\\\nhandleMouseMove: anEvent\\\\n\\\\t\\\\\\\"System level event handling.\\\\\\\"\\\\n\\\\tanEvent wasHandled ifTrue:[^self]. \\\\\\\"not interested\\\\\\\"\\\\n\\\\t\\\\\\\"Rules say that by default a morph gets #mouseMove iff\\\\n\\\\t\\\\t* the hand is not dragging anything,\\\\n\\\\t\\\\t\\\\t+ and some button is down,\\\\n\\\\t\\\\t\\\\t+ and the receiver is the current mouse focus.\\\\\\\"\\\\n\\\\t(anEvent hand hasSubmorphs) ifTrue:[^self].\\\\n\\\\t(anEvent anyButtonPressed and:[anEvent hand mouseFocus == self]) ifFalse:[^self].\\\\n\\\\tanEvent wasHandled: true.\\\\n\\\\tself mouseMove: anEvent.\\\\n\\\\t(self handlesMouseStillDown: anEvent) ifTrue:[\\\\n\\\\t\\\\t\\\\\\\"Step at the new location\\\\\\\"\\\\n\\\\t\\\\tself startStepping: #handleMouseStillDown: \\\\n\\\\t\\\\t\\\\tat: Time millisecondClockValue\\\\n\\\\t\\\\t\\\\targuments: {anEvent copy resetHandlerFields}\\\\n\\\\t\\\\t\\\\tstepTime: self mouseStillDownStepRate ].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 4/23/2001 17:24'!\\\\nhandleMouseOver: anEvent\\\\n\\\\t\\\\\\\"System level event handling.\\\\\\\"\\\\n\\\\tanEvent hand mouseFocus == self ifTrue:[\\\\n\\\\t\\\\t\\\\\\\"Got this directly through #handleFocusEvent: so check explicitly\\\\\\\"\\\\n\\\\t\\\\t(self containsPoint: anEvent position event: anEvent) ifFalse:[^self]].\\\\n\\\\tanEvent hand noticeMouseOver: self event: anEvent! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 10/22/2000 17:11'!\\\\nhandleMouseStillDown: anEvent\\\\n\\\\t\\\\\\\"Called from the stepping mechanism for morphs wanting continuously repeated 'yes the mouse is still down, yes it is still down, yes it has not changed yet, no the mouse is still not up, yes the button is down' etc messages\\\\\\\"\\\\n\\\\t(anEvent hand mouseFocus == self) \\\\n\\\\t\\\\tifFalse:[^self stopSteppingSelector: #handleMouseStillDown:].\\\\n\\\\tself mouseStillDown: anEvent.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 10/22/2000 17:09'!\\\\nhandleMouseUp: anEvent\\\\n\\\\t\\\\\\\"System level event handling.\\\\\\\"\\\\n\\\\tanEvent wasHandled ifTrue:[^self]. \\\\\\\"not interested\\\\\\\"\\\\n\\\\tanEvent hand mouseFocus == self ifFalse:[^self]. \\\\\\\"Not interested in other parties\\\\\\\"\\\\n\\\\tanEvent hand releaseMouseFocus: self.\\\\n\\\\tanEvent wasHandled: true.\\\\n\\\\tanEvent blueButtonChanged\\\\n\\\\t\\\\tifTrue:[self blueButtonUp: anEvent]\\\\n\\\\t\\\\tifFalse:[self mouseUp: anEvent.\\\\n\\\\t\\\\t\\\\t\\\\tself stopSteppingSelector: #handleMouseStillDown:].! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'md 10/22/2003 15:55'!\\\\nhandleUnknownEvent: anEvent\\\\n\\\\t\\\\\\\"An event of an unknown type was sent to the receiver. What shall we do?!!\\\\\\\"\\\\n\\\\tBeeper beep. \\\\n\\\\tanEvent printString displayAt: 0@0.\\\\n\\\\tanEvent wasHandled: true.! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'sw 10/5/2002 01:47'!\\\\nmouseDownPriority\\\\n\\\\t\\\\\\\"Return the default mouse down priority for the receiver\\\\\\\"\\\\n\\\\n\\\\t^ (self isPartsDonor or: [self isPartsBin])\\\\n\\\\t\\\\tifTrue:\\\\t[50]\\\\n\\\\t\\\\tifFalse:\\\\t[0]\\\\n\\\\n\\\\t\\\\\\\"The above is a workaround for the complete confusion between parts donors and parts bins. Morphs residing in a parts bin may or may not have the parts donor property set; if they have they may or may not actually handle events. To work around this, parts bins get an equal priority to parts donors so that when a morph in the parts bin does have the property set but does not handle the event we still get a copy from picking it up through the parts bin. Argh. This just *cries* for a cleanup.\\\\\\\"\\\\n\\\\t\\\\\\\"And the above comment is Andreas's from 10/2000, which was formerly retrievable by a #flag: call which however caused a problem when trying to recompile the method from decompiled source.\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 9/13/2000 17:14'!\\\\nprocessEvent: anEvent\\\\n\\\\t\\\\\\\"Process the given event using the default event dispatcher.\\\\\\\"\\\\n\\\\t^self processEvent: anEvent using: self defaultEventDispatcher! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 9/18/2000 19:14'!\\\\nprocessEvent: anEvent using: defaultDispatcher\\\\n\\\\t\\\\\\\"This is the central entry for dispatching events in morphic. Given some event and a default dispatch strategy, find the right receiver and let him handle it.\\\\n\\\\tWARNING: This is a powerful hook. If you want to use a different event dispatcher from the default, here is the place to hook it in. Depending on how the dispatcher is written (e.g., whether it calls simply #processEvent: or #processEvent:using:) you can change the dispatch strategy for entire trees of morphs. Similarly, you can disable entire trees of morphs from receiving any events whatsoever. Read the documentation in class MorphicEventDispatcher before playing with it. \\\\\\\"\\\\n\\\\t(self rejectsEvent: anEvent) ifTrue:[^#rejected].\\\\n\\\\t^defaultDispatcher dispatchEvent: anEvent with: self! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 10/5/2000 19:25'!\\\\nrejectDropEvent: anEvent\\\\n\\\\t\\\\\\\"This hook allows the receiver to repel a drop operation currently executed. The method is called prior to checking children so the receiver must validate that the event was really designated for it.\\\\n\\\\tNote that the ordering of the tests below is designed to avoid a (possibly expensive) #fullContainsPoint: test. If the receiver doesn't want to repel the morph anyways we don't need to check after all.\\\\\\\"\\\\n\\\\t(self repelsMorph: anEvent contents event: anEvent) ifFalse:[^self]. \\\\\\\"not repelled\\\\\\\"\\\\n\\\\t(self fullContainsPoint: anEvent position) ifFalse:[^self]. \\\\\\\"not for me\\\\\\\"\\\\n\\\\t\\\\\\\"Throw it away\\\\\\\"\\\\n\\\\tanEvent wasHandled: true.\\\\n\\\\tanEvent contents rejectDropMorphEvent: anEvent.! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 9/12/2000 23:40'!\\\\nrejectsEvent: anEvent\\\\n\\\\t\\\\\\\"Return true to reject the given event. Rejecting an event means neither the receiver nor any of it's submorphs will be given any chance to handle it.\\\\\\\"\\\\n\\\\t^self isLocked or:[self visible not]! !\\\\n\\\\n!Morph methodsFor: 'events-processing' stamp: 'ar 9/15/2000 21:09'!\\\\ntransformedFrom: uberMorph\\\\n\\\\t\\\\\\\"Return a transform to map coordinates of uberMorph, a morph above me in my owner chain, into the coordinates of MYSELF not any of my children.\\\\\\\"\\\\n\\\\tself flag: #arNote. \\\\\\\"rename this method\\\\\\\"\\\\n\\\\towner ifNil:[^IdentityTransform new].\\\\n\\\\t^ (owner transformFrom: uberMorph)! !\\\\n\\\\n\\\\n!Morph methodsFor: 'events-removing' stamp: 'rw 4/25/2002 07:18'!\\\\nreleaseActionMap\\\\n\\\\t\\\\\\\"Release the action map\\\\\\\"\\\\n\\\\t\\\\n \\\\tself removeProperty: #actionMap! !\\\\n\\\\n\\\\n!Morph methodsFor: 'fileIn/out' stamp: 'di 11/18/1999 08:35'!\\\\nattachToResource\\\\n\\\\t\\\\\\\"Produce a morph from a file -- either a saved .morph file or a graphics file\\\\\\\"\\\\n\\\\n\\\\t| pathName |\\\\n\\\\tpathName _ Utilities chooseFileWithSuffixFromList: (#('.morph'), Utilities graphicsFileSuffixes)\\\\n\\\\t\\\\t\\\\twithCaption: 'Choose a file\\\\nto load'.\\\\n\\\\tpathName ifNil: [^ self].  \\\\\\\"User made no choice\\\\\\\"\\\\n\\\\tpathName == #none ifTrue: [^ self inform: \\\\n'Sorry, no suitable files found\\\\n(names should end with .morph, .gif,\\\\n.bmp, .jpeg, .jpe, .jp, or .form)'].\\\\n\\\\n\\\\tself setProperty: #resourceFilePath toValue: pathName! !\\\\n\\\\n!Morph methodsFor: 'fileIn/out' stamp: 'tak 2/10/2006 02:24'!\\\\nprepareToBeSaved\\\\n\\\\t\\\\\\\"Prepare this morph to be saved to disk. Subclasses should nil out any instance variables that holds state that should not be saved, such as cached Forms. Note that this operation may take more drastic measures than releaseCachedState; for example, it might discard the transcript of an interactive chat session.\\\\\\\"\\\\n\\\\n\\\\tself releaseCachedState.\\\\n\\\\tself formerOwner: nil.\\\\n\\\\tself formerPosition: nil.\\\\n\\\\tself removeProperty: #undoGrabCommand.\\\\n\\\\tfullBounds _ nil! !\\\\n\\\\n!Morph methodsFor: 'fileIn/out' stamp: 'tk 2/17/1999 17:50'!\\\\nreserveUrl: urlString\\\\n\\\\t\\\\\\\"Write a dummy object to the server to hold a name and place for this object.\\\\\\\"\\\\n\\\\n\\\\t| dummy ext str |\\\\n\\\\tdummy _ PasteUpMorph new.\\\\n\\\\tdummy borderWidth: 2.\\\\n\\\\tdummy setProperty: #initialExtent toValue: (ext _ 300@100).\\\\n\\\\tdummy topLeft: 50@50; extent: ext.\\\\t\\\\\\\"reset when comes in\\\\\\\"\\\\n\\\\tstr _ (TextMorph new) topLeft: dummy topLeft + (10@10); \\\\n\\\\t\\\\textent: dummy width - 15 @ 30.\\\\n\\\\tdummy addMorph: str.\\\\n\\\\tstr contents: 'This is a place holder only.  Please \\\\\\\\find the original page and choose \\\\\\\\\\\\\\\"send this page to server\\\\\\\"' withCRs.\\\\n\\\\tstr extent: dummy width - 15 @ 30.\\\\n\\\\tdummy saveOnURL: urlString.\\\\n\\\\n\\\\t\\\\\\\"Claim that url myself\\\\\\\"\\\\n\\\\tself setProperty: #SqueakPage toValue: dummy sqkPage.\\\\n\\\\t(dummy sqkPage) contentsMorph: self; dirty: true.\\\\n\\\\t^ self url! !\\\\n\\\\n!Morph methodsFor: 'fileIn/out' stamp: 'di 11/18/1999 08:52'!\\\\nsaveAsResource\\\\n\\\\n\\\\t| pathName |\\\\n\\\\t(self hasProperty: #resourceFilePath) ifFalse: [^ self].\\\\n\\\\tpathName _ self valueOfProperty: #resourceFilePath.\\\\n\\\\t(pathName asLowercase endsWith: '.morph') ifFalse:\\\\n\\\\t\\\\t[^ self error: 'Can only update morphic resources'].\\\\n\\\\t(FileStream newFileNamed: pathName) fileOutClass: nil andObject: self.! !\\\\n\\\\n!Morph methodsFor: 'fileIn/out' stamp: 'ar 9/27/2005 21:02'!\\\\nsaveDocPane\\\\n\\\\n\\\\tSmalltalk at: #DocLibrary ifPresent:[:dl| dl external saveDocCheck: self]! !\\\\n\\\\n!Morph methodsFor: 'fileIn/out' stamp: 'yo 7/2/2004 13:14'!\\\\nsaveOnFile\\\\n\\\\t\\\\\\\"Ask the user for a filename and save myself on a SmartReferenceStream file.  Writes out the version and class structure.  The file is fileIn-able.  UniClasses will be filed out.\\\\\\\"\\\\n\\\\n\\\\t| aFileName fileStream ok |\\\\n\\\\taFileName _ ('my {1}' translated format: {self class name}) asFileName.\\\\t\\\\\\\"do better?\\\\\\\"\\\\n\\\\taFileName _ FillInTheBlank request: 'File name? (\\\\\\\".morph\\\\\\\" will be added to end)' translated \\\\n\\\\t\\\\t\\\\tinitialAnswer: aFileName.\\\\n\\\\taFileName isEmpty ifTrue: [^ Beeper beep].\\\\n\\\\tself allMorphsDo: [:m | m prepareToBeSaved].\\\\n\\\\n\\\\tok _ aFileName endsWith: '.morph'.\\\\t\\\\\\\"don't double them\\\\\\\"\\\\n\\\\tok _ ok | (aFileName endsWith: '.sp').\\\\n\\\\tok ifFalse: [aFileName _ aFileName,'.morph'].\\\\n\\\\tfileStream _ FileStream newFileNamed: aFileName asFileName.\\\\n\\\\tfileStream fileOutClass: nil andObject: self.\\\\t\\\\\\\"Puts UniClass definitions out anyway\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'fileIn/out' stamp: 'tk 7/16/1999 13:03'!\\\\nsaveOnURL\\\\n\\\\t\\\\\\\"Ask the user for a url and save myself on a SmartReferenceStream file.  Writes out the version and class structure.  The file is fileIn-able.  UniClasses will be filed out.\\\\\\\"\\\\n\\\\n\\\\t| um pg |\\\\n\\\\t(pg _ self saveOnURLbasic) == #cancel ifTrue: [^ self].\\\\n\\\\tum _ URLMorph newForURL: pg url.\\\\n\\\\tum setURL: pg url page: pg.\\\\n\\\\tpg isContentsInMemory ifTrue: [pg computeThumbnail].\\\\n\\\\tum isBookmark: true.\\\\n\\\\tum removeAllMorphs.\\\\n\\\\tum color: Color transparent.\\\\n\\\\tself primaryHand attachMorph: um.! !\\\\n\\\\n!Morph methodsFor: 'fileIn/out' stamp: 'dgd 2/22/2003 14:35'!\\\\nsaveOnURLbasic\\\\n\\\\t\\\\\\\"Ask the user for a url and save myself on a SmartReferenceStream file.  Writes out the version and class structure.  The file is fileIn-able.  UniClasses will be filed out.\\\\\\\"\\\\n\\\\n\\\\t| url pg stamp pol |\\\\n\\\\t(pg := self valueOfProperty: #SqueakPage) ifNil: [pg := SqueakPage new]\\\\n\\\\t\\\\tifNotNil: \\\\n\\\\t\\\\t\\\\t[pg contentsMorph ~~ self \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self inform: 'morph''s SqueakPage property is out of date'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpg := SqueakPage new]].\\\\n\\\\t(url := pg url) ifNil: \\\\n\\\\t\\\\t\\\\t[url := ServerDirectory defaultStemUrl , '1.sp'.\\\\t\\\\\\\"A new legal place\\\\\\\"\\\\n\\\\t\\\\t\\\\turl := FillInTheBlank \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trequest: 'url of a place to store this object.\\\\nMust begin with file:// or ftp://'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinitialAnswer: url.\\\\n\\\\t\\\\t\\\\turl isEmpty ifTrue: [^#cancel]].\\\\n\\\\tstamp := Utilities authorInitialsPerSe ifNil: ['*'].\\\\n\\\\tpg saveMorph: self author: stamp.\\\\n\\\\tSqueakPageCache atURL: url put: pg.\\\\t\\\\\\\"setProperty: #SqueakPage\\\\\\\"\\\\n\\\\t(pol := pg policy) ifNil: [pol := #neverWrite].\\\\n\\\\tpg\\\\n\\\\t\\\\tpolicy: #now;\\\\n\\\\t\\\\tdirty: true.\\\\n\\\\tpg write.\\\\t\\\\\\\"force the write\\\\\\\"\\\\n\\\\tpg policy: pol.\\\\n\\\\t^pg! !\\\\n\\\\n!Morph methodsFor: 'fileIn/out' stamp: 'tk 11/20/1998 11:47'!\\\\nsaveOnURL: suggestedUrlString\\\\n\\\\t\\\\\\\"Save myself on a SmartReferenceStream file.  If I don't already have a url, use the suggested one.  Writes out the version and class structure.  The file is fileIn-able.  UniClasses will be filed out.\\\\\\\"\\\\n\\\\n\\\\t| url pg stamp pol |\\\\n\\\\t(pg _ self valueOfProperty: #SqueakPage) ifNil: [pg _ SqueakPage new]\\\\n\\\\t\\\\tifNotNil: [pg contentsMorph ~~ self ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tself inform: 'morph''s SqueakPage property is out of date'.\\\\n\\\\t\\\\t\\\\t\\\\tpg _ SqueakPage new]].\\\\n\\\\t(url _ pg url) ifNil: [url _ pg urlNoOverwrite: suggestedUrlString].\\\\n\\\\tstamp _ Utilities authorInitialsPerSe ifNil: ['*'].\\\\n\\\\tpg saveMorph: self author: stamp.\\\\n\\\\tSqueakPageCache atURL: url put: pg.\\\\t\\\\\\\"setProperty: #SqueakPage\\\\\\\"\\\\n\\\\t(pol _ pg policy) ifNil: [pol _ #neverWrite].\\\\n\\\\tpg policy: #now; dirty: true.  pg write.\\\\t\\\\\\\"force the write\\\\\\\"\\\\n\\\\tpg policy: pol.\\\\n\\\\t^ pg! !\\\\n\\\\n!Morph methodsFor: 'fileIn/out' stamp: 'di 11/18/1999 09:15'!\\\\nupdateAllFromResources\\\\n\\\\n\\\\tself allMorphsDo: [:m | m updateFromResource]! !\\\\n\\\\n!Morph methodsFor: 'fileIn/out' stamp: 'nk 1/6/2004 12:38'!\\\\nupdateFromResource\\\\n\\\\t| pathName newMorph f |\\\\n\\\\t(pathName := self valueOfProperty: #resourceFilePath) ifNil: [^self].\\\\n\\\\t(pathName asLowercase endsWith: '.morph') \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[newMorph := (FileStream readOnlyFileNamed: pathName) fileInObjectAndCode.\\\\n\\\\t\\\\t\\\\t(newMorph isMorph) \\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [^self error: 'Resource not a single morph']]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[f := Form fromFileNamed: pathName.\\\\n\\\\t\\\\t\\\\tf ifNil: [^self error: 'unrecognized image file format'].\\\\n\\\\t\\\\t\\\\tnewMorph := World drawingClass withForm: f].\\\\n\\\\tnewMorph setProperty: #resourceFilePath toValue: pathName.\\\\n\\\\tself owner replaceSubmorph: self by: newMorph! !\\\\n\\\\n\\\\n!Morph methodsFor: 'filter streaming' stamp: 'ar 10/26/2000 19:55'!\\\\ndrawOnCanvas: aCanvas\\\\n\\\\t^aCanvas fullDraw: self.\\\\n! !\\\\n\\\\n\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'di 7/24/97 11:55'!\\\\nalign: aPoint1 with: aPoint2\\\\n\\\\t\\\\\\\"Translate by aPoint2 - aPoint1.\\\\\\\"\\\\n\\\\n\\\\t^ self position: self position + (aPoint2 - aPoint1)! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'efc 2/13/2003 18:17'!\\\\nbottom\\\\n\\\\t\\\\\\\" Return the y-coordinate of my bottom side \\\\\\\"\\\\n\\\\n\\\\t^ bounds bottom! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'di 3/6/2002 13:06'!\\\\nbottomCenter\\\\n\\\\n\\\\t^ bounds bottomCenter! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'tk 9/8/97 10:44'!\\\\nbottomLeft\\\\n\\\\n\\\\t^ bounds bottomLeft! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'efc 2/13/2003 18:08'!\\\\nbottomLeft: aPoint\\\\n\\\\t\\\\\\\" Move me so that my bottom left corner is at aPoint. My extent (width & height) are unchanged \\\\\\\"\\\\n\\\\n\\\\tself position: ((aPoint x) @ (aPoint y - self height)).\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'di 6/12/97 11:17'!\\\\nbottomRight\\\\n\\\\n\\\\t^ bounds bottomRight! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'efc 2/13/2003 18:09'!\\\\nbottomRight: aPoint\\\\n\\\\t\\\\\\\" Move me so that my bottom right corner is at aPoint. My extent (width & height) are unchanged \\\\\\\"\\\\n\\\\n\\\\tself position: ((aPoint x - bounds width) @ (aPoint y - self height))\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'efc 2/13/2003 18:14'!\\\\nbottom: aNumber\\\\n\\\\t\\\\\\\" Move me so that my bottom is at the y-coordinate aNumber. My extent (width & height) are unchanged \\\\\\\"\\\\n\\\\n\\\\tself position: (bounds left @ (aNumber - self height))! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'jm 8/3/97 15:50'!\\\\nbounds\\\\n\\\\t\\\\\\\"Return the bounds of this morph.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: It is best not to override this method because many methods in Morph and its subclasses use the instance variable directly rather than 'self bounds'. Instead, subclasses should be sure that the bounds instance variable is correct.\\\\\\\"\\\\n\\\\n\\\\t^ bounds\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'ar 10/25/2000 15:05'!\\\\nboundsInWorld\\\\n\\\\t^self bounds: self bounds in: self world! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'ar 10/25/2000 15:04'!\\\\nboundsIn: referenceMorph\\\\n\\\\t\\\\\\\"Return the receiver's bounds as seen by aMorphs coordinate frame\\\\\\\"\\\\n\\\\t^self bounds: self bounds in: referenceMorph! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'ar 12/14/2000 13:48'!\\\\nbounds: newBounds\\\\n\\\\t| oldExtent newExtent |\\\\n\\\\toldExtent _ self extent.\\\\n\\\\tnewExtent _ newBounds extent.\\\\n\\\\t(oldExtent dotProduct: oldExtent) <= (newExtent dotProduct: newExtent) ifTrue:[\\\\n\\\\t\\\\t\\\\\\\"We're growing. First move then resize.\\\\\\\"\\\\n\\\\t\\\\tself position: newBounds topLeft; extent: newExtent.\\\\n\\\\t] ifFalse:[\\\\n\\\\t\\\\t\\\\\\\"We're shrinking. First resize then move.\\\\\\\"\\\\n\\\\t\\\\tself extent: newExtent; position: newBounds topLeft.\\\\n\\\\t].! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'ar 10/25/2000 15:04'!\\\\nbounds: aRectangle from: referenceMorph\\\\n\\\\t\\\\\\\"Return the receiver's bounds as seen by aMorphs coordinate frame\\\\\\\"\\\\n\\\\towner ifNil: [^ aRectangle].\\\\n\\\\t^(owner transformFrom: referenceMorph) globalBoundsToLocal: aRectangle\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'ar 10/25/2000 15:04'!\\\\nbounds: aRectangle in: referenceMorph\\\\n\\\\t\\\\\\\"Return the receiver's bounds as seen by aMorphs coordinate frame\\\\\\\"\\\\n\\\\towner ifNil: [^ aRectangle].\\\\n\\\\t^(owner transformFrom: referenceMorph) localBoundsToGlobal: aRectangle\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry'!\\\\ncenter\\\\n\\\\n\\\\t^ bounds center! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'sw 6/11/1999 18:48'!\\\\ncenter: aPoint\\\\n\\\\tself position: (aPoint - (self extent // 2))! !\\\\n\\\\n!Morph methodsFor: 'geometry'!\\\\nextent\\\\n\\\\n\\\\t^ bounds extent! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'laza 3/25/2004 21:31'!\\\\nextent: aPoint\\\\n\\\\n\\\\tbounds extent = aPoint ifTrue: [^ self].\\\\n\\\\tself changed.\\\\n\\\\tbounds _ (bounds topLeft extent: aPoint) rounded.\\\\n\\\\tself layoutChanged.\\\\n\\\\tself changed.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'ar 10/25/2000 15:06'!\\\\nfullBoundsInWorld\\\\n\\\\t^self bounds: self fullBounds in: self world! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'ar 10/25/2000 15:06'!\\\\nglobalPointToLocal: aPoint\\\\n\\\\t^self point: aPoint from: nil! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'ar 9/15/2000 14:21'!\\\\ngriddedPoint: ungriddedPoint\\\\n\\\\n\\\\t| griddingContext |\\\\n\\\\tself flag: #arNote. \\\\\\\"Used by event handling - should transform to pasteUp for gridding\\\\\\\"\\\\n\\\\t(griddingContext _ self pasteUpMorph) ifNil: [^ ungriddedPoint].\\\\n\\\\t^ griddingContext gridPoint: ungriddedPoint! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'di 8/25/2000 00:35'!\\\\ngridPoint: ungriddedPoint\\\\n\\\\n\\\\t^ ungriddedPoint! !\\\\n\\\\n!Morph methodsFor: 'geometry'!\\\\nheight\\\\n\\\\n\\\\t^ bounds height! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'efc 2/13/2003 18:22'!\\\\nheight: aNumber\\\\n\\\\t\\\\\\\" Set my height; my position (top-left corner) and width will remain the same \\\\\\\"\\\\n\\\\n\\\\tself extent: self width@aNumber asInteger.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'ar 12/22/2001 22:43'!\\\\ninnerBounds\\\\n\\\\t\\\\\\\"Return the inner rectangle enclosed by the bounds of this morph excluding the space taken by its borders. For an unbordered morph, this is just its bounds.\\\\\\\"\\\\n\\\\n\\\\t^ self bounds insetBy: self borderWidth! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'efc 2/13/2003 18:16'!\\\\nleft\\\\n\\\\t\\\\\\\" Return the x-coordinate of my left side \\\\\\\"\\\\n\\\\n\\\\t^ bounds left! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'di 3/6/2002 13:06'!\\\\nleftCenter\\\\n\\\\n\\\\t^ bounds leftCenter! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'efc 2/13/2003 18:15'!\\\\nleft: aNumber\\\\n\\\\t\\\\\\\" Move me so that my left side is at the x-coordinate aNumber. My extent (width & height) are unchanged \\\\\\\"\\\\n\\\\n\\\\tself position: (aNumber @ bounds top)! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'ar 10/25/2000 15:07'!\\\\nlocalPointToGlobal: aPoint\\\\n\\\\t^self point: aPoint in: nil! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'sw 6/4/2000 21:59'!\\\\nminimumExtent\\\\n\\\\t| ext |\\\\n\\\\t\\\\\\\"This returns the minimum extent that the morph may be shrunk to.  Not honored in too many places yet, but respected by the resizeToFit feature, at least.  copied up from SystemWindow 6/00\\\\\\\"\\\\n\\\\t(ext _ self valueOfProperty: #minimumExtent)\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t[^ ext].\\\\n\\\\t^ 100 @ 80! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'sw 6/4/2000 22:00'!\\\\nminimumExtent: aPoint\\\\n\\\\t\\\\\\\"Remember a minimumExtent, for possible future use\\\\\\\"\\\\n\\\\n\\\\tself setProperty: #minimumExtent toValue: aPoint\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'sw 7/10/1999 17:26'!\\\\nnextOwnerPage\\\\n\\\\t\\\\\\\"Tell my container to advance to the next page\\\\\\\"\\\\n\\\\t| targ |\\\\n\\\\ttarg _ self ownerThatIsA: BookMorph.\\\\n\\\\ttarg ifNotNil: [targ nextPage]! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'ar 11/12/2000 22:06'!\\\\nouterBounds\\\\n\\\\t\\\\\\\"Return the 'outer' bounds of the receiver, e.g., the bounds that need to be invalidated when the receiver changes.\\\\\\\"\\\\n\\\\t| box |\\\\n\\\\tbox _ self bounds.\\\\n\\\\tself hasDropShadow ifTrue:[box _ self expandFullBoundsForDropShadow: box].\\\\n\\\\tself hasRolloverBorder ifTrue:[box _ self expandFullBoundsForRolloverBorder: box].\\\\n\\\\t^box! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'nk 5/19/2003 20:39'!\\\\noverlapsShadowForm: itsShadow bounds: itsBounds\\\\n\\\\t\\\\\\\"Answer true if itsShadow and my shadow overlap at all\\\\\\\"\\\\n\\\\t| andForm overlapExtent |\\\\n\\\\toverlapExtent _ (itsBounds intersect: self fullBounds) extent.\\\\n\\\\toverlapExtent > (0 @ 0)\\\\n\\\\t\\\\tifFalse: [^ false].\\\\n\\\\tandForm _ self shadowForm.\\\\n\\\\toverlapExtent ~= self fullBounds extent\\\\n\\\\t\\\\tifTrue: [andForm _ andForm\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcontentsOfArea: (0 @ 0 extent: overlapExtent)].\\\\n\\\\tandForm _ andForm\\\\n\\\\t\\\\t\\\\t\\\\tcopyBits: (self fullBounds translateBy: itsShadow offset negated)\\\\n\\\\t\\\\t\\\\t\\\\tfrom: itsShadow\\\\n\\\\t\\\\t\\\\t\\\\tat: 0 @ 0\\\\n\\\\t\\\\t\\\\t\\\\tclippingBox: (0 @ 0 extent: overlapExtent)\\\\n\\\\t\\\\t\\\\t\\\\trule: Form and\\\\n\\\\t\\\\t\\\\t\\\\tfillColor: nil.\\\\n\\\\t^ andForm bits\\\\n\\\\t\\\\tanySatisfy: [:w | w ~= 0]! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'ar 10/25/2000 15:02'!\\\\npointFromWorld: aPoint\\\\n\\\\t^self point: aPoint from: self world! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'ar 10/25/2000 15:03'!\\\\npointInWorld: aPoint\\\\n\\\\t^self point: aPoint in: self world! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'ar 10/25/2000 15:01'!\\\\npoint: aPoint from: aReferenceMorph\\\\n\\\\n\\\\towner ifNil: [^ aPoint].\\\\n\\\\t^ (owner transformFrom: aReferenceMorph) globalPointToLocal: aPoint.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'ar 10/25/2000 15:01'!\\\\npoint: aPoint in: aReferenceMorph\\\\n\\\\n\\\\towner ifNil: [^ aPoint].\\\\n\\\\t^ (owner transformFrom: aReferenceMorph) localPointToGlobal: aPoint.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry'!\\\\nposition\\\\n\\\\n\\\\t^ bounds topLeft! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'di 9/30/1998 12:11'!\\\\npositionInWorld\\\\n\\\\n\\\\t^ self pointInWorld: self position.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'sw 10/9/1998 08:56'!\\\\npositionSubmorphs\\\\n\\\\tself submorphsDo:\\\\n\\\\t\\\\t[:aMorph | aMorph snapToEdgeIfAppropriate]! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'wiz 11/25/2004 12:54'!\\\\nposition: aPoint \\\\n\\\\t\\\\\\\"Change the position of this morph and and all of its\\\\n\\\\tsubmorphs. \\\\\\\"\\\\n\\\\t| delta box |\\\\n\\\\tdelta := aPoint asNonFractionalPoint - bounds topLeft.\\\\n\\\\t(delta x = 0\\\\n\\\\t\\\\t\\\\tand: [delta y = 0])\\\\n\\\\t\\\\tifTrue: [^ self].\\\\n\\\\t\\\\\\\"Null change\\\\\\\"\\\\n\\\\tbox := self fullBounds.\\\\n\\\\t(delta dotProduct: delta)\\\\n\\\\t\\\\t\\\\t> 100\\\\n\\\\t\\\\tifTrue: [\\\\\\\"e.g., more than 10 pixels moved\\\\\\\"\\\\n\\\\t\\\\t\\\\tself invalidRect: box.\\\\n\\\\t\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\t\\\\tinvalidRect: (box translateBy: delta)]\\\\n\\\\t\\\\tifFalse: [self\\\\n\\\\t\\\\t\\\\t\\\\tinvalidRect: (box\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmerge: (box translateBy: delta))].\\\\n\\\\tself privateFullMoveBy: delta.\\\\n\\\\towner\\\\n\\\\t\\\\tifNotNil: [owner layoutChanged]! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'sw 7/10/1999 17:27'!\\\\npreviousOwnerPage\\\\n\\\\t\\\\\\\"Tell my container to advance to the previous page\\\\\\\"\\\\n\\\\t| targ |\\\\n\\\\ttarg _ self ownerThatIsA: BookMorph.\\\\n\\\\ttarg ifNotNil: [targ previousPage]! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'efc 2/13/2003 18:16'!\\\\nright\\\\n\\\\t\\\\\\\" Return the x-coordinate of my right side \\\\\\\"\\\\n\\\\t^ bounds right! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'di 3/6/2002 13:06'!\\\\nrightCenter\\\\n\\\\n\\\\t^ bounds rightCenter! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'efc 2/13/2003 18:15'!\\\\nright: aNumber\\\\n\\\\t\\\\\\\" Move me so that my right side is at the x-coordinate aNumber. My extent (width & height) are unchanged \\\\\\\"\\\\n\\\\n\\\\tself position: ((aNumber - bounds width) @ bounds top)! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'bf 1/5/2000 19:08'!\\\\nscreenLocation\\\\n\\\\t\\\\\\\"For compatibility only\\\\\\\"\\\\n\\\\n\\\\t^ self fullBounds origin! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'sma 2/5/2000 13:58'!\\\\nscreenRectangle\\\\n\\\\t\\\\\\\"For compatibility only\\\\\\\"\\\\n\\\\n\\\\t^ self fullBounds! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'tk 7/14/2001 11:11'!\\\\nsetConstrainedPosition: aPoint hangOut: partiallyOutside\\\\n\\\\t\\\\\\\"Change the position of this morph and and all of its submorphs to aPoint, but don't let me go outside my owner's bounds.  Let me go within two pixels of completely outside if partiallyOutside is true.\\\\\\\"\\\\n\\\\n\\\\t| trialRect delta boundingMorph bRect |\\\\n\\\\towner ifNil:[^self].\\\\n\\\\ttrialRect _ aPoint extent: self bounds extent.\\\\n\\\\tboundingMorph _ self topRendererOrSelf owner.\\\\n\\\\tdelta _ boundingMorph\\\\n\\\\t\\\\t\\\\tifNil:    [0@0]\\\\n\\\\t\\\\t\\\\tifNotNil: [\\\\n\\\\t\\\\t\\\\t\\\\tbRect _ partiallyOutside \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [boundingMorph bounds insetBy: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself extent negated + boundingMorph borderWidth + (2@2)]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [boundingMorph bounds].\\\\n\\\\t\\\\t\\\\t\\\\ttrialRect amountToTranslateWithin: bRect].\\\\n\\\\tself position: aPoint + delta.\\\\n\\\\tself layoutChanged  \\\\\\\"So that, eg, surrounding text will readjust\\\\\\\"\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'sw 2/16/1999 22:05'!\\\\nshiftSubmorphsOtherThan: listNotToShift by: delta\\\\n\\\\t| rejectList |\\\\n\\\\trejectList _ listNotToShift ifNil: [OrderedCollection new].\\\\n\\\\t(submorphs copyWithoutAll: rejectList) do:\\\\n\\\\t\\\\t[:m | m position: (m position + delta)]! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'efc 2/13/2003 18:17'!\\\\ntop\\\\n\\\\t\\\\\\\" Return the y-coordinate of my top side \\\\\\\"\\\\n\\\\n\\\\t^ bounds top! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'di 3/6/2002 13:06'!\\\\ntopCenter\\\\n\\\\n\\\\t^ bounds topCenter! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'di 6/12/97 11:07'!\\\\ntopLeft\\\\n\\\\n\\\\t^ bounds topLeft! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'efc 2/13/2003 18:10'!\\\\ntopLeft: aPoint\\\\n\\\\t\\\\\\\" Move me so that my top left corner is at aPoint. My extent (width & height) are unchanged \\\\\\\"\\\\n\\\\n\\\\tself position: aPoint\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'sw 8/20/97 23:04'!\\\\ntopRight\\\\n\\\\n\\\\t^ bounds topRight! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'efc 2/13/2003 18:12'!\\\\ntopRight: aPoint\\\\n\\\\t\\\\\\\" Move me so that my top right corner is at aPoint. My extent (width & height) are unchanged \\\\\\\"\\\\n\\\\n\\\\tself position: ((aPoint x - bounds width) @ (aPoint y))\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'efc 2/13/2003 18:14'!\\\\ntop: aNumber\\\\n\\\\t\\\\\\\" Move me so that my top is at the y-coordinate aNumber. My extent (width & height) are unchanged \\\\\\\"\\\\n\\\\n\\\\tself position: (bounds left @ aNumber)! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'ar 10/22/2000 18:03'!\\\\ntransformedBy: aTransform\\\\n\\\\taTransform isIdentity ifTrue:[^self].\\\\n\\\\taTransform isPureTranslation ifTrue:[\\\\n\\\\t\\\\t^self position: (aTransform localPointToGlobal: self position).\\\\n\\\\t].\\\\n\\\\t^self addFlexShell transformedBy: aTransform! !\\\\n\\\\n!Morph methodsFor: 'geometry'!\\\\nwidth\\\\n\\\\n\\\\t^ bounds width! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'efc 2/13/2003 18:22'!\\\\nwidth: aNumber\\\\n\\\\t\\\\\\\" Set my width; my position (top-left corner) and height will remain the same \\\\\\\"\\\\n\\\\n\\\\tself extent: aNumber asInteger@self height.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'di 2/23/98 11:36'!\\\\nworldBounds\\\\n\\\\t^ self world bounds! !\\\\n\\\\n!Morph methodsFor: 'geometry' stamp: 'dgd 9/10/2004 12:37'!\\\\nworldBoundsForHalo\\\\n\\\\t\\\\\\\"Answer the rectangle to be used as the inner dimension of my halos.\\\\n\\\\tAllow for showing either bounds or fullBounds, and compensate for the optional bounds rectangle.\\\\\\\"\\\\n\\\\n\\\\t| r |\\\\n\\\\tr _ (Preferences haloEnclosesFullBounds)\\\\n\\\\t\\\\tifFalse: [ self boundsIn: nil ]\\\\n\\\\t\\\\tifTrue: [ self fullBoundsInWorld ].\\\\n\\\\tPreferences showBoundsInHalo ifTrue: [ ^r outsetBy: 2 ].\\\\n\\\\t^r! !\\\\n\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'sw 10/23/1998 12:00'!\\\\naddTransparentSpacerOfSize: aPoint\\\\n\\\\tself addMorphBack: (self transparentSpacerOfSize: aPoint)! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'sw 10/23/1998 12:01'!\\\\nbeTransparent\\\\n\\\\tself color: Color transparent! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'RAA 11/8/2000 18:29'!\\\\ncartesianBoundsTopLeft\\\\n\\\\t\\\\\\\"Answer the origin of this morph relative to it's container's cartesian origin. \\\\n\\\\tNOTE: y DECREASES toward the bottom of the screen\\\\\\\"\\\\n\\\\n\\\\t| w container |\\\\n\\\\n\\\\tw _ self world ifNil: [^ bounds origin].\\\\n\\\\tcontainer _ self referencePlayfield ifNil: [w].\\\\n\\\\t^ (bounds left - container cartesianOrigin x) @\\\\n\\\\t\\\\t(container cartesianOrigin y - bounds top)! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'sw 1/17/2000 20:55'!\\\\ncartesianXY: coords\\\\n\\\\t^ self x: coords x y: coords y\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'di 9/9/1998 22:49'!\\\\ncolorUnder\\\\n\\\\t\\\\\\\"Return the color of under the receiver's center.\\\\\\\"\\\\n\\\\n\\\\tself isInWorld\\\\n\\\\t\\\\tifTrue: [^ self world colorAt: (self pointInWorld: self referencePosition) belowMorph: self]\\\\n\\\\t\\\\tifFalse: [^ Color black].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'nk 7/7/2003 17:18'!\\\\ncolor: sensitiveColor sees: soughtColor \\\\n\\\\t\\\\\\\"Return true if any of my pixels of sensitiveColor intersect with pixels of soughtColor.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Make a mask with black where sensitiveColor is, white elsewhere\\\\\\\"\\\\n\\\\n\\\\t| myImage sensitivePixelMask map patchBelowMe tfm morphAsFlexed i1 pasteUp |\\\\n\\\\tpasteUp _ self world ifNil: [ ^false ].\\\\n\\\\ttfm := self transformFrom: pasteUp.\\\\n\\\\tmorphAsFlexed := tfm isIdentity \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [TransformationMorph new flexing: self clone byTransformation: tfm].\\\\n\\\\tmyImage := morphAsFlexed imageForm offset: 0 @ 0.\\\\n\\\\tsensitivePixelMask := Form extent: myImage extent depth: 1.\\\\n\\\\t\\\\\\\"ensure at most a 16-bit map\\\\\\\"\\\\n\\\\tmap := Bitmap new: (1 bitShift: (myImage depth - 1 min: 15)).\\\\n\\\\tmap at: (i1 := sensitiveColor indexInMap: map) put: 1.\\\\n\\\\tsensitivePixelMask \\\\n\\\\t\\\\tcopyBits: sensitivePixelMask boundingBox\\\\n\\\\t\\\\tfrom: myImage form\\\\n\\\\t\\\\tat: 0 @ 0\\\\n\\\\t\\\\tcolorMap: map.\\\\n\\\\n\\\\t\\\\\\\"get an image of the world below me\\\\\\\"\\\\n\\\\tpatchBelowMe := pasteUp \\\\n\\\\t\\\\t\\\\t\\\\tpatchAt: morphAsFlexed fullBounds\\\\n\\\\t\\\\t\\\\t\\\\twithout: self\\\\n\\\\t\\\\t\\\\t\\\\tandNothingAbove: false.\\\\n\\\\t\\\\\\\"\\\\nsensitivePixelMask displayAt: 0@0.\\\\npatchBelowMe displayAt: 100@0.\\\\n\\\\\\\"\\\\n\\\\t\\\\\\\"intersect world pixels of the color we're looking for with the sensitive pixels\\\\\\\"\\\\n\\\\tmap at: i1 put: 0.\\\\t\\\\\\\"clear map and reuse it\\\\\\\"\\\\n\\\\tmap at: (soughtColor indexInMap: map) put: 1.\\\\n\\\\tsensitivePixelMask \\\\n\\\\t\\\\tcopyBits: patchBelowMe boundingBox\\\\n\\\\t\\\\tfrom: patchBelowMe\\\\n\\\\t\\\\tat: 0 @ 0\\\\n\\\\t\\\\tclippingBox: patchBelowMe boundingBox\\\\n\\\\t\\\\trule: Form and\\\\n\\\\t\\\\tfillColor: nil\\\\n\\\\t\\\\tmap: map.\\\\n\\\\t\\\\\\\"\\\\nsensitivePixelMask displayAt: 200@0.\\\\n\\\\\\\"\\\\n\\\\t^(sensitivePixelMask tallyPixelValues second) > 0! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'di 10/1/2000 11:54'!\\\\ndegreesOfFlex\\\\n\\\\t\\\\\\\"Return any rotation due to flexing\\\\\\\"\\\\n\\\\t\\\\\\\"NOTE: because renderedMorph, which is used by the halo to set heading, goes down through dropShadows as well as transformations, we need this method (and its other implems) to come back up through such a chain.\\\\\\\"\\\\n\\\\t^ 0.0! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'ar 9/22/2000 14:29'!\\\\nforwardDirection: newDirection\\\\n\\\\t\\\\\\\"Set the receiver's forward direction (in eToy terms)\\\\\\\"\\\\n\\\\tself setProperty: #forwardDirection toValue: newDirection.! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'sw 9/8/2000 16:35'!\\\\ngetIndexInOwner\\\\n\\\\t\\\\\\\"Answer which position the receiver holds in its owner's hierarchy\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"NB: There is some concern about submorphs that aren't really to be counted, such as a background morph of a playfield.\\\\\\\"\\\\n\\\\n\\\\t| container topRenderer |\\\\n\\\\tcontainer _ (topRenderer _ self topRendererOrSelf) owner.\\\\n\\\\t^ container submorphIndexOf: topRenderer.! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'dgd 9/20/2004 14:15'!\\\\ngoHome\\\\n\\\\t| box fb |\\\\n\\\\towner isInMemory ifFalse: [^ self].\\\\n\\\\towner isNil ifTrue: [^ self].\\\\n\\\\tself visible ifFalse: [^ self].\\\\n\\\\n\\\\tbox := owner visibleClearArea.\\\\n\\\\tfb := self fullBounds.\\\\n\\\\n\\\\tfb left < box left\\\\n\\\\t\\\\tifTrue: [self left: box left - fb left + self left].\\\\n\\\\tfb right > box right\\\\n\\\\t\\\\tifTrue: [self right: box right - fb right + self right].\\\\n\\\\n\\\\tfb top < box top\\\\n\\\\t\\\\tifTrue: [self top: box top - fb top + self top].\\\\n\\\\tfb bottom > box bottom\\\\n\\\\t\\\\tifTrue: [self bottom: box bottom - fb bottom + self bottom].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'di 10/1/2000 11:50'!\\\\nheading\\\\n\\\\t\\\\\\\"Return the receiver's heading (in eToy terms)\\\\\\\"\\\\n\\\\towner ifNil: [^ self forwardDirection].\\\\n\\\\t^ self forwardDirection + owner degreesOfFlex! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'ar 9/22/2000 13:37'!\\\\nheading: newHeading\\\\n\\\\t\\\\\\\"Set the receiver's heading (in eToy terms)\\\\\\\"\\\\n\\\\tself isFlexed ifFalse:[self addFlexShell].\\\\n\\\\towner rotationDegrees: (newHeading - self forwardDirection).! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy'!\\\\nmove: aMorph toPosition: aPointOrNumber\\\\n\\\\t\\\\\\\"Support for e-toy demo. Move the given submorph to the given position. Allows the morph's owner to determine the policy for motion. For example, moving forward through a table might mean motion only in the x-axis with wrapping modulo the table size.\\\\\\\"\\\\n\\\\n\\\\taMorph position: aPointOrNumber asPoint.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'ar 9/22/2000 20:12'!\\\\nreferencePosition\\\\n\\\\t\\\\\\\"Return the current reference position of the receiver\\\\\\\"\\\\n\\\\t| box |\\\\n\\\\tbox _ self bounds.\\\\n\\\\t^box origin + (self rotationCenter * box extent).\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'sw 10/25/1999 16:49'!\\\\nreferencePositionInWorld\\\\n\\\\n\\\\t^ self pointInWorld: self referencePosition\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'sw 10/25/1999 23:33'!\\\\nreferencePositionInWorld: aPoint\\\\n\\\\t| localPosition |\\\\n\\\\tlocalPosition _ owner\\\\n\\\\t\\\\tifNil: [aPoint]\\\\n\\\\t\\\\tifNotNil: [(owner transformFrom: self world) globalPointToLocal: aPoint].\\\\n\\\\n\\\\tself referencePosition: localPosition\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'ar 9/27/2000 14:04'!\\\\nreferencePosition: aPosition\\\\n\\\\t\\\\\\\"Move the receiver to match its reference position with aPosition\\\\\\\"\\\\n\\\\t| newPos intPos |\\\\n\\\\tnewPos _ self position + (aPosition - self referencePosition).\\\\n\\\\tintPos _ newPos asIntegerPoint.\\\\n\\\\tnewPos = intPos \\\\n\\\\t\\\\tifTrue:[self position: intPos]\\\\n\\\\t\\\\tifFalse:[self position: newPos].! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'ar 9/22/2000 20:10'!\\\\nrotationCenter\\\\n\\\\t\\\\\\\"Return the rotation center of the receiver. The rotation center defines the relative offset inside the receiver's bounds for locating the reference position.\\\\\\\"\\\\n\\\\t^self valueOfProperty: #rotationCenter ifAbsent:[0.5@0.5]\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'ar 9/22/2000 20:11'!\\\\nrotationCenter: aPointOrNil\\\\n\\\\t\\\\\\\"Set the new rotation center of the receiver. The rotation center defines the relative offset inside the receiver's bounds for locating the reference position.\\\\\\\"\\\\n\\\\taPointOrNil isNil\\\\n\\\\t\\\\tifTrue:[self removeProperty: #rotationCenter]\\\\n\\\\t\\\\tifFalse:[self setProperty: #rotationCenter toValue: aPointOrNil]\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'nk 9/4/2004 11:04'!\\\\nscaleFactor: newScale \\\\n\\\\t\\\\\\\"Backstop for morphs that don't have to do something special to set their \\\\n\\\\tscale \\\\\\\"\\\\n\\\\t| toBeScaled |\\\\n\\\\ttoBeScaled := self.\\\\n\\\\tnewScale = 1.0\\\\n\\\\t\\\\tifTrue: [(self heading isZero\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [self isFlexMorph])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [toBeScaled := self removeFlexShell]]\\\\n\\\\t\\\\tifFalse: [self isFlexMorph\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [toBeScaled := self addFlexShellIfNecessary]].\\\\n\\\\n\\\\ttoBeScaled scale: newScale.\\\\n\\\\n\\\\ttoBeScaled == self ifTrue: [\\\\n\\\\t\\\\tnewScale = 1.0\\\\n\\\\t\\\\t\\\\tifTrue: [ self removeProperty: #scaleFactor ]\\\\n\\\\t\\\\t\\\\tifFalse: [ self setProperty: #scaleFactor toValue: newScale ]]! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'nk 9/4/2004 11:00'!\\\\nscale: newScale\\\\n\\\\t\\\\\\\"Backstop for morphs that don't have to do something special to set their scale\\\\\\\"\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'ar 6/12/2001 05:23'!\\\\nsetDirectionFrom: aPoint\\\\n\\\\t| delta degrees |\\\\n\\\\tdelta _ (self transformFromWorld globalPointToLocal: aPoint) - self referencePosition.\\\\n\\\\tdegrees _ delta degrees + 90.0.\\\\n\\\\tself forwardDirection: (degrees \\\\\\\\\\\\\\\\ 360) rounded.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'sw 8/31/2000 11:18'!\\\\nsetIndexInOwner: anInteger\\\\n\\\\t\\\\\\\"Answer which position the receiver holds in its owner's hierarchy\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"There is some concern about submorphs that aren't really to be counted, such as a background morph of a playfield.\\\\\\\"\\\\n\\\\t| container topRenderer indexToUse |\\\\n\\\\tcontainer _ (topRenderer _ self topRendererOrSelf) owner.\\\\n\\\\tindexToUse _ (anInteger min: container submorphCount) max: 1.\\\\n\\\\tcontainer addMorph: topRenderer asElementNumber: indexToUse! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'wiz 11/6/2005 17:10'!\\\\nsimplySetVisible: aBoolean\\\\n\\\\t\\\\\\\"Set the receiver's visibility property.  This mild circumlocution is because my TransfomationMorph #visible: method would also set the visibility flag of my flexee, which in this case is pointless because it's the flexee that calls this.\\\\n\\\\tThis appears in morph as a backstop for morphs that don't inherit from TFMorph\\\\\\\"\\\\n\\\\n\\\\tself visible: aBoolean! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'nk 7/7/2003 17:19'!\\\\ntouchesColor: soughtColor \\\\n\\\\t\\\\\\\"Return true if any of my pixels overlap pixels of soughtColor.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Make a shadow mask with black in my shape, white elsewhere\\\\\\\"\\\\n\\\\n\\\\t| map patchBelowMe shadowForm tfm morphAsFlexed pasteUp |\\\\n\\\\tpasteUp := self world ifNil: [ ^false ].\\\\n\\\\n\\\\ttfm := self transformFrom: pasteUp.\\\\n\\\\tmorphAsFlexed := tfm isIdentity \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [TransformationMorph new flexing: self clone byTransformation: tfm].\\\\n\\\\tshadowForm := morphAsFlexed shadowForm offset: 0 @ 0.\\\\n\\\\n\\\\t\\\\\\\"get an image of the world below me\\\\\\\"\\\\n\\\\tpatchBelowMe := (pasteUp \\\\n\\\\t\\\\t\\\\t\\\\tpatchAt: morphAsFlexed fullBounds\\\\n\\\\t\\\\t\\\\t\\\\twithout: self\\\\n\\\\t\\\\t\\\\t\\\\tandNothingAbove: false) offset: 0 @ 0.\\\\n\\\\t\\\\\\\"\\\\nshadowForm displayAt: 0@0.\\\\npatchBelowMe displayAt: 100@0.\\\\n\\\\\\\"\\\\n\\\\t\\\\\\\"intersect world pixels of the color we're looking for with our shape.\\\\\\\"\\\\n\\\\t\\\\\\\"ensure a maximum 16-bit map\\\\\\\"\\\\n\\\\tmap := Bitmap new: (1 bitShift: (patchBelowMe depth - 1 min: 15)).\\\\n\\\\tmap at: (soughtColor indexInMap: map) put: 1.\\\\n\\\\tshadowForm \\\\n\\\\t\\\\tcopyBits: patchBelowMe boundingBox\\\\n\\\\t\\\\tfrom: patchBelowMe\\\\n\\\\t\\\\tat: 0 @ 0\\\\n\\\\t\\\\tclippingBox: patchBelowMe boundingBox\\\\n\\\\t\\\\trule: Form and\\\\n\\\\t\\\\tfillColor: nil\\\\n\\\\t\\\\tmap: map.\\\\n\\\\t\\\\\\\"\\\\nshadowForm displayAt: 200@0.\\\\n\\\\\\\"\\\\n\\\\t^(shadowForm tallyPixelValues second) > 0! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'sw 10/23/1998 11:50'!\\\\ntransparentSpacerOfSize: aPoint\\\\n\\\\t^ (Morph new extent: aPoint) color: Color transparent! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'tk 7/8/1998 23:47'!\\\\nwrap\\\\n\\\\n\\\\t| myBox box newX newY wrapped |\\\\n\\\\towner ifNil: [^ self].\\\\n\\\\tmyBox _ self fullBounds.\\\\n\\\\tmyBox corner < (50000@50000) ifFalse: [\\\\n\\\\t\\\\tself inform: 'Who is trying to wrap a hidden object?'. ^ self].\\\\n\\\\tbox _ owner bounds.\\\\n\\\\tnewX _ self position x.\\\\n\\\\tnewY _ self position y.\\\\n\\\\twrapped _ false.\\\\n\\\\t((myBox right < box left) or: [myBox left > box right]) ifTrue: [\\\\n\\\\t\\\\tnewX _ box left + ((self position x - box left) \\\\\\\\\\\\\\\\ box width).\\\\n\\\\t\\\\twrapped _ true].\\\\n\\\\t((myBox bottom < box top) or: [myBox top > box bottom]) ifTrue: [\\\\n\\\\t\\\\tnewY _ box top + ((self position y - box top) \\\\\\\\\\\\\\\\ box height).\\\\n\\\\t\\\\twrapped _ true].\\\\n\\\\tself position: newX@newY.\\\\n\\\\t(wrapped and: [owner isPlayfieldLike])\\\\n\\\\t\\\\tifTrue: [owner changed].  \\\\\\\"redraw all turtle trails if wrapped\\\\\\\"\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'dgd 2/22/2003 14:37'!\\\\nx\\\\n\\\\t\\\\\\\"Return my horizontal position relative to the cartesian origin of a relevant playfield\\\\\\\"\\\\n\\\\n\\\\t| aPlayfield |\\\\n\\\\taPlayfield := self referencePlayfield.\\\\n\\\\t^aPlayfield isNil \\\\n\\\\t\\\\tifTrue: [self referencePosition x]\\\\n\\\\t\\\\tifFalse: [self referencePosition x - aPlayfield cartesianOrigin x]! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'aoy 2/17/2003 01:00'!\\\\nx: aNumber \\\\n\\\\t\\\\\\\"Set my horizontal position relative to the cartesian origin of the playfield or the world.\\\\\\\"\\\\n\\\\n\\\\t| offset aPlayfield newX |\\\\n\\\\taPlayfield := self referencePlayfield.\\\\n\\\\toffset := self left - self referencePosition x.\\\\n\\\\tnewX := aPlayfield isNil\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [aNumber + offset]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [aPlayfield cartesianOrigin x + aNumber + offset].\\\\n\\\\tself position: newX @ bounds top! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'sw 1/17/2000 20:04'!\\\\nx: xCoord y: yCoord\\\\n\\\\t| aWorld xyOffset delta aPlayfield |\\\\n\\\\t(aWorld _ self world) ifNil: [^ self position: xCoord @ yCoord].\\\\n\\\\txyOffset _ self topLeft - self referencePosition.\\\\n\\\\tdelta _ (aPlayfield _ self referencePlayfield)\\\\n\\\\t\\\\tifNil:\\\\n\\\\t\\\\t\\\\t[xCoord @ (aWorld bottom - yCoord)]\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t[aPlayfield cartesianOrigin + (xCoord @ (yCoord negated))].\\\\n\\\\tself position: (xyOffset + delta)\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'dgd 2/22/2003 14:37'!\\\\ny\\\\n\\\\t\\\\\\\"Return my vertical position relative to the cartesian origin of the playfield or the world. Note that larger y values are closer to the top of the screen.\\\\\\\"\\\\n\\\\n\\\\t| w aPlayfield |\\\\n\\\\tw := self world.\\\\n\\\\tw ifNil: [^bounds top].\\\\n\\\\taPlayfield := self referencePlayfield.\\\\n\\\\t^aPlayfield isNil \\\\n\\\\t\\\\tifTrue: [w cartesianOrigin y - self referencePosition y]\\\\n\\\\t\\\\tifFalse: [aPlayfield cartesianOrigin y - self referencePosition y]! !\\\\n\\\\n!Morph methodsFor: 'geometry eToy' stamp: 'aoy 2/17/2003 01:00'!\\\\ny: aNumber \\\\n\\\\t\\\\\\\"Set my vertical position relative to the cartesian origin of the playfield or the world. Note that larger y values are closer to the top of the screen.\\\\\\\"\\\\n\\\\n\\\\t| w offset newY aPlayfield |\\\\n\\\\tw := self world.\\\\n\\\\tw ifNil: [^self position: bounds left @ aNumber].\\\\n\\\\taPlayfield := self referencePlayfield.\\\\n\\\\toffset := self top - self referencePosition y.\\\\n\\\\tnewY := aPlayfield isNil\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [w bottom - aNumber + offset]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [aPlayfield cartesianOrigin y - aNumber + offset].\\\\n\\\\tself position: bounds left @ newY! !\\\\n\\\\n\\\\n!Morph methodsFor: 'geometry testing'!\\\\ncontainsPoint: aPoint\\\\n\\\\n\\\\t^ self bounds containsPoint: aPoint! !\\\\n\\\\n!Morph methodsFor: 'geometry testing' stamp: 'di 5/3/2000 19:05'!\\\\nfullContainsPoint: aPoint\\\\n\\\\n\\\\t(self fullBounds containsPoint: aPoint) ifFalse: [^ false].  \\\\\\\"quick elimination\\\\\\\"\\\\n\\\\t(self containsPoint: aPoint) ifTrue: [^ true].  \\\\\\\"quick acceptance\\\\\\\"\\\\n\\\\tsubmorphs do: [:m | (m fullContainsPoint: aPoint) ifTrue: [^ true]].\\\\n\\\\t^ false\\\\n! !\\\\n\\\\n!Morph methodsFor: 'geometry testing' stamp: 'dgd 2/22/2003 14:33'!\\\\nobtrudesBeyondContainer\\\\n\\\\t\\\\\\\"Answer whether the receiver obtrudes beyond the bounds of its container\\\\\\\"\\\\n\\\\n\\\\t| top |\\\\n\\\\ttop := self topRendererOrSelf.\\\\n\\\\t(top owner isNil or: [top owner isHandMorph]) ifTrue: [^false].\\\\n\\\\t^(top owner bounds containsRect: top bounds) not! !\\\\n\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'ar 11/7/1999 18:57'!\\\\naddHalo\\\\n\\\\t\\\\\\\"Invoke a halo programatically (e.g., not from a meta gesture)\\\\\\\"\\\\n\\\\t^self addHalo: nil! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'ar 10/10/2000 19:03'!\\\\naddHalo: evt\\\\n\\\\t| halo prospectiveHaloClass |\\\\n\\\\tprospectiveHaloClass _ Smalltalk at: self haloClass ifAbsent: [HaloMorph].\\\\n\\\\thalo _ prospectiveHaloClass new bounds: self worldBoundsForHalo.\\\\n\\\\thalo popUpFor: self event: evt.\\\\n\\\\t^halo! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'ar 11/7/1999 21:55'!\\\\naddHalo: evt from: formerHaloOwner\\\\n\\\\t\\\\\\\"Transfer a halo from the former halo owner to the receiver\\\\\\\"\\\\n\\\\t^self addHalo: evt! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 12/30/2004 02:53'!\\\\naddHandlesTo: aHaloMorph box: box\\\\n\\\\t\\\\\\\"Add halo handles to the halo.  Apply the halo filter if appropriate\\\\\\\"\\\\n\\\\n\\\\t| wantsIt aSelector |\\\\n\\\\taHaloMorph haloBox: box.\\\\n\\\\tPreferences haloSpecifications  do:\\\\n\\\\t\\\\t[:aSpec | \\\\n\\\\t\\\\t\\\\taSelector _  aSpec addHandleSelector.\\\\n\\\\t\\\\t\\\\twantsIt _ Preferences selectiveHalos\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self wantsHaloHandleWithSelector: aSelector inHalo: aHaloMorph]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[true].\\\\n\\\\t\\\\t\\\\twantsIt ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[(#(addMakeSiblingHandle: addDupHandle:) includes: aSelector) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[wantsIt _ self preferredDuplicationHandleSelector = aSelector].\\\\n\\\\t\\\\t\\\\twantsIt ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[aHaloMorph perform: aSelector with: aSpec]]].\\\\n\\\\n\\\\taHaloMorph innerTarget addOptionalHandlesTo: aHaloMorph box: box! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'ar 8/8/2001 17:31'!\\\\naddMagicHaloFor: aHand\\\\n\\\\t| halo prospectiveHaloClass |\\\\n\\\\taHand halo ifNotNil:[\\\\n\\\\t\\\\taHand halo target == self ifTrue:[^self].\\\\n\\\\t\\\\taHand halo isMagicHalo ifFalse:[^self]].\\\\n\\\\tprospectiveHaloClass _ Smalltalk at: self haloClass ifAbsent: [HaloMorph].\\\\n\\\\thalo _ prospectiveHaloClass new bounds: self worldBoundsForHalo.\\\\n\\\\thalo popUpMagicallyFor: self hand: aHand.! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'ar 9/22/2000 20:41'!\\\\naddOptionalHandlesTo: aHalo box: box\\\\n\\\\taHalo addDirectionHandles! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 12/21/1999 17:52'!\\\\naddSimpleHandlesTo: aHaloMorph box: aBox\\\\n\\\\t^ aHaloMorph addSimpleHandlesTo: aHaloMorph box: aBox! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 1/26/2000 19:37'!\\\\naddWorldHandlesTo: aHaloMorph box: box\\\\n\\\\taHaloMorph haloBox: box.\\\\n\\\\tPreferences haloSpecificationsForWorld do:\\\\n\\\\t\\\\t[:aSpec | \\\\n\\\\t\\\\t\\\\taHaloMorph perform: aSpec addHandleSelector with: aSpec].\\\\n\\\\taHaloMorph innerTarget addOptionalHandlesTo: aHaloMorph box: box! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sma 11/11/2000 14:54'!\\\\nballoonColor\\\\n\\\\t^ self\\\\n\\\\t\\\\tvalueOfProperty: #balloonColor\\\\n\\\\t\\\\tifAbsent: [self defaultBalloonColor]! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sma 11/11/2000 14:55'!\\\\nballoonColor: aColor\\\\n\\\\t^ self\\\\n\\\\t\\\\tsetProperty: #balloonColor\\\\n\\\\t\\\\ttoValue: aColor! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sd 12/5/2001 20:29'!\\\\nballoonFont\\\\n\\\\t^ self\\\\n\\\\t\\\\tvalueOfProperty: #balloonFont\\\\n\\\\t\\\\tifAbsent: [self defaultBalloonFont]! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sd 12/5/2001 20:30'!\\\\nballoonFont: aFont \\\\n\\\\t^ self setProperty: #balloonFont toValue: aFont! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 2/7/2000 11:27'!\\\\nballoonHelpAligner\\\\n\\\\t\\\\\\\"Answer the morph to which the receiver's balloon help should point\\\\\\\"\\\\n\\\\t^ (self valueOfProperty: #balloonTarget) ifNil: [self]! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'dgd 9/7/2004 18:35'!\\\\nballoonHelpDelayTime\\\\n\\\\t\\\\\\\"Return the number of milliseconds before a balloon help should be put up on the receiver. The balloon help will only be put up if the receiver responds to #wantsBalloon by returning true.\\\\\\\"\\\\n\\\\t^ Preferences balloonHelpDelayTime! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'dgd 4/3/2006 14:15'!\\\\nballoonHelpTextForHandle: aHandle\\\\n\\\\t\\\\\\\"Answer a string providing balloon help for the given halo handle\\\\\\\"\\\\n\\\\n\\\\t|  itsSelector |\\\\n\\\\titsSelector _ aHandle eventHandler firstMouseSelector.\\\\n\\\\n\\\\t(itsSelector == #doRecolor:with:) ifTrue:\\\\n\\\\t\\\\t[^ Preferences propertySheetFromHalo\\\\n\\\\t\\\\t\\\\tifTrue: ['Open a property sheet.']\\\\n\\\\t\\\\t\\\\tifFalse: ['Change color']].\\\\n\\\\n\\\\t(itsSelector == #mouseDownInDimissHandle:with:) ifTrue:\\\\n\\\\t\\\\t[^ Preferences preserveTrash\\\\n\\\\t\\\\t\\\\tifTrue: ['Move to trash']\\\\n\\\\t\\\\t\\\\tifFalse: ['Remove from screen']].\\\\n\\\\n\\\\t#(\\\\t(addFullHandles\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'More halo handles')\\\\n\\\\t\\\\t(addSimpleHandles\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Fewer halo handles')\\\\n\\\\t\\\\t(chooseEmphasisOrAlignment\\\\t\\\\t\\\\t\\\\t'Emphasis & alignment')\\\\n\\\\t\\\\t(chooseFont\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Change font')\\\\n\\\\t\\\\t(chooseNewGraphicFromHalo\\\\t\\\\t\\\\t\\\\t'Choose a new graphic')\\\\n\\\\t\\\\t(chooseStyle\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Change style')\\\\n\\\\t\\\\t(dismiss\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Remove')\\\\n\\\\t\\\\t(doDebug:with:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Debug')\\\\n\\\\t\\\\t(doDirection:with:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Choose forward direction')\\\\n\\\\t\\\\t(doDup:with:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Duplicate')\\\\n\\\\t\\\\t(doMakeSibling:with: \\\\t\\\\t\\\\t\\\\t\\\\t'Make a sibling')\\\\n\\\\t\\\\t(doMenu:with:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Menu')\\\\n\\\\t\\\\t(doGrab:with:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Pick up')\\\\n\\\\t\\\\t(editButtonsScript\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'See the script for this button')\\\\n\\\\t\\\\t(editDrawing\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Repaint')\\\\n\\\\t\\\\t(maybeDoDup:with:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Duplicate')\\\\n\\\\t\\\\t(makeNascentScript\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Make a scratch script')\\\\n\\\\t\\\\t(makeNewDrawingWithin\\\\t\\\\t\\\\t\\\\t'Paint new object')\\\\n\\\\t\\\\t(mouseDownInCollapseHandle:with:\\\\t\\\\t'Collapse')\\\\n\\\\t\\\\t(mouseDownOnHelpHandle:\\\\t\\\\t\\\\t\\\\t'Help')\\\\n\\\\t\\\\t(openViewerForArgument\\\\t\\\\t\\\\t\\\\t'Open a Viewer for me. Press shift for a snapshot.')\\\\n\\\\t\\\\t(openViewerForTarget:with:\\\\t\\\\t\\\\t\\\\t'Open a Viewer for me. Press shift for a snapshot.')\\\\n\\\\t\\\\t(paintBackground\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Paint background')\\\\n\\\\t\\\\t(prepareToTrackCenterOfRotation:with:\\\\t'Move object or set center of rotation')\\\\n\\\\t\\\\t(presentViewMenu\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Present the Viewing menu')\\\\n\\\\t\\\\t(startDrag:with:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Move')\\\\n\\\\t\\\\t(startGrow:with:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Change size') \\\\n\\\\t\\\\t(startRot:with:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Rotate')\\\\n\\\\t\\\\t(startScale:with:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Change scale') \\\\n\\\\t\\\\t(tearOffTile\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Make a tile representing this object')\\\\n\\\\t\\\\t(tearOffTileForTarget:with:\\\\t\\\\t\\\\t\\\\t'Make a tile representing this object')\\\\n\\\\t\\\\t(trackCenterOfRotation:with:\\\\t\\\\t\\\\t\\\\t'Set center of rotation')\\\\n\\\\t) \\\\n\\\\tdo:\\\\n\\\\t\\\\t[:pair | itsSelector == pair first ifTrue: [^ pair last]].\\\\n\\\\n\\\\t^ 'unknown halo handle'! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'RAA 7/21/2000 11:10'!\\\\nboundsForBalloon\\\\n\\\\n\\\\t\\\\\\\"some morphs have bounds that are way too big\\\\\\\"\\\\n\\\\t^self boundsInWorld! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 3/1/2000 11:39'!\\\\ncomeToFrontAndAddHalo\\\\n\\\\tself comeToFront.\\\\n\\\\tself addHalo! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sma 11/11/2000 16:15'!\\\\ndefaultBalloonColor\\\\n\\\\t^ Display depth <= 2\\\\n\\\\t\\\\tifTrue: [Color white]\\\\n\\\\t\\\\tifFalse: [BalloonMorph balloonColor]! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sd 12/5/2001 20:23'!\\\\ndefaultBalloonFont\\\\n\\\\t^ BalloonMorph balloonFont! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 1/11/2000 18:24'!\\\\ndefersHaloOnClickTo: aSubMorph\\\\n\\\\t\\\\\\\"If a cmd-click on aSubMorph would make it a preferred recipient of the halo, answer true\\\\\\\"\\\\n\\\\t\\\\\\\"May want to add a way (via a property) for morphs to assert true here -- this would let certain kinds of morphs that are unusually reluctant to take the halo on initial click\\\\\\\"\\\\n\\\\n\\\\t^ false\\\\n\\\\t! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'ar 10/3/2000 17:03'!\\\\ndeleteBalloon\\\\n\\\\t\\\\\\\"If I am showing a balloon, delete it.\\\\\\\"\\\\n\\\\t| w |\\\\n\\\\tw _ self world ifNil:[^self].\\\\n\\\\tw deleteBalloonTarget: self.! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'em 3/24/2005 10:02'!\\\\neditBalloonHelpContent: aString\\\\n\\\\t| reply |\\\\n\\\\treply _ FillInTheBlank\\\\n\\\\t\\\\tmultiLineRequest: 'Edit the balloon help text for ' translated, self externalName\\\\n\\\\t\\\\tcenterAt: Sensor cursorPoint\\\\n\\\\t\\\\tinitialAnswer: (aString ifNil: [self noHelpString] ifNotNil: [aString])\\\\n\\\\t\\\\tanswerHeight: 200.\\\\n\\\\treply ifNil: [^ self].  \\\\\\\"User cancelled out of the dialog\\\\\\\"\\\\n\\\\t(reply isEmpty or: [reply asString = self noHelpString])\\\\n\\\\t\\\\tifTrue: [self setBalloonText: nil]\\\\n\\\\t\\\\tifFalse: [self setBalloonText: reply]! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sma 12/23/1999 13:24'!\\\\neditBalloonHelpText\\\\n\\\\t\\\\\\\"Modify the receiver's balloon help text.\\\\\\\"\\\\n\\\\n\\\\tself editBalloonHelpContent: self balloonText! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'ar 3/17/2001 13:19'!\\\\nhalo\\\\n\\\\n\\\\t(self outermostWorldMorph ifNil: [^nil]) haloMorphs do: [:h | h target == self ifTrue: [^ h]].\\\\n\\\\t^ nil! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'ar 9/15/2000 16:13'!\\\\nhaloClass\\\\n\\\\t\\\\\\\"Answer the name of the desired kind of HaloMorph to launch on behalf of the receiver\\\\\\\"\\\\n\\\\n\\\\t^ #HaloMorph\\\\n! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'ar 8/8/2001 15:40'!\\\\nhaloDelayTime\\\\n\\\\t\\\\\\\"Return the number of milliseconds before a halo should be put up on the receiver. The halo will only be put up if the receiver responds to #wantsHalo by returning true.\\\\\\\"\\\\n\\\\t^800! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'ar 9/15/2000 16:16'!\\\\nhasHalo\\\\n\\\\t^self hasProperty: #hasHalo.! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'ar 9/28/2000 17:54'!\\\\nhasHalo: aBool\\\\n\\\\taBool\\\\n\\\\t\\\\tifTrue:[self setProperty: #hasHalo toValue: true]\\\\n\\\\t\\\\tifFalse:[self removeProperty: #hasHalo]! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'dgd 2/22/2003 19:05'!\\\\nisLikelyRecipientForMouseOverHalos\\\\n\\\\t^self player notNil! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'ar 10/3/2000 17:05'!\\\\nmouseDownOnHelpHandle: anEvent\\\\n\\\\t\\\\\\\"The mouse went down in the show-balloon handle\\\\\\\"\\\\n\\\\t\\\\n\\\\t| str |\\\\n\\\\tanEvent shiftPressed ifTrue: [^ self editBalloonHelpText].\\\\n\\\\tstr _ self balloonText.\\\\n\\\\tstr ifNil: [str _ self noHelpString].\\\\n\\\\tself showBalloon: str hand: anEvent hand.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'em 3/24/2005 10:05'!\\\\nnoHelpString\\\\n\\\\t^ 'Help not yet supplied' translated! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 11/15/2001 12:23'!\\\\nokayToAddDismissHandle\\\\n\\\\t\\\\\\\"Answer whether a halo on the receiver should offer a dismiss handle.  This provides a hook for making it harder to disassemble some strucures even momentarily\\\\\\\"\\\\n\\\\n\\\\t^ self holdsSeparateDataForEachInstance not  and:\\\\n\\\\t\\\\t[self resistsRemoval not]! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 10/26/2000 12:11'!\\\\nokayToAddGrabHandle\\\\n\\\\t\\\\\\\"Answer whether a halo on the receiver should offer a grab handle.  This provides a hook for making it harder to deconstruct some strucures even momentarily\\\\\\\"\\\\n\\\\n\\\\t^ self holdsSeparateDataForEachInstance not ! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 11/27/2001 14:50'!\\\\nokayToBrownDragEasily\\\\n\\\\t\\\\\\\"Answer whether it it okay for the receiver to be brown-dragged easily -- i.e. repositioned within its container without extracting it.  At present this is just a hook -- nobody declines.\\\\\\\"\\\\n\\\\n\\\\t^ true\\\\n\\\\n\\\\n\\\\n\\\\\\\"\\\\n\\\\t^ (self topRendererOrSelf owner isKindOf: PasteUpMorph) and:\\\\n\\\\t\\\\t[self layoutPolicy isNil]\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 11/27/2001 15:02'!\\\\nokayToExtractEasily\\\\n\\\\t\\\\\\\"Answer whether it it okay for the receiver to be extracted easily.  Not yet hooked up to the halo-permissions mechanism.\\\\\\\"\\\\n\\\\n\\\\t^ self topRendererOrSelf owner dragNDropEnabled! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 11/29/2001 06:29'!\\\\nokayToResizeEasily\\\\n\\\\t\\\\\\\"Answer whether it is appropriate to have the receiver be easily resized by the user from the halo\\\\\\\"\\\\n\\\\n\\\\t^ true\\\\n\\\\n\\\\t\\\\\\\"This one was too jarring, not that it didn't most of the time do the right  thing but because some of the time it didn't, such as in a holder.  If we pursue this path, the test needs to be airtight, obviously...\\\\n\\\\t^ (self topRendererOrSelf owner isKindOf: PasteUpMorph) and:\\\\n\\\\t\\\\t[self layoutPolicy isNil]\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 11/27/2001 14:44'!\\\\nokayToRotateEasily\\\\n\\\\t\\\\\\\"Answer whether it is appropriate for a rotation handle to be shown for the receiver.  This is a hook -- at present nobody declines.\\\\\\\"\\\\n\\\\n\\\\t^ true! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 12/31/2004 03:30'!\\\\npreferredDuplicationHandleSelector\\\\n\\\\t\\\\\\\"Answer the selector, either #addMakeSiblingHandle: or addDupHandle:, to be offered as the default in a halo open on me\\\\\\\"\\\\n\\\\n\\\\tPreferences oliveHandleForScriptedObjects ifFalse:\\\\n\\\\t\\\\t[^ #addDupHandle:].\\\\n\\\\t^ self renderedMorph valueOfProperty: #preferredDuplicationHandleSelector ifAbsent:\\\\n\\\\t\\\\t[self player class isUniClass\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[#addMakeSiblingHandle:]\\\\n\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[#addDupHandle:]]! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'dgd 9/9/2004 22:43'!\\\\nremoveHalo\\\\n\\\\t\\\\\\\"remove the surrounding halo (if any)\\\\\\\"\\\\n\\\\tself halo isNil\\\\n\\\\t\\\\tifFalse: [self primaryHand removeHalo]! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sma 12/23/1999 13:32'!\\\\nsetBalloonText: stringOrText\\\\n\\\\t\\\\\\\"Set receiver's balloon help text. Pass nil to remove the help.\\\\\\\"\\\\n\\\\n\\\\tself setBalloonText: stringOrText maxLineLength: Preferences maxBalloonHelpLineLength! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'md 2/27/2006 09:54'!\\\\nsetBalloonText: stringOrText maxLineLength: aLength \\\\n\\\\t\\\\\\\"Set receiver's balloon help text. Pass nil to remove the help.\\\\\\\"\\\\n\\\\t(extension isNil and: [stringOrText isNil]) ifTrue: [^ self].\\\\n\\\\tself assureExtension balloonText: \\\\n\\\\t\\\\t(stringOrText ifNotNil: [stringOrText asString withNoLineLongerThan: aLength])! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 10/29/1999 17:38'!\\\\nsetCenteredBalloonText: aString\\\\n\\\\tself setBalloonText: aString.\\\\n\\\\tself setProperty: #helpAtCenter toValue: true! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'ar 10/3/2000 17:06'!\\\\nshowBalloon: msgString\\\\n\\\\t\\\\\\\"Pop up a balloon containing the given string,\\\\n\\\\tfirst removing any existing BalloonMorphs in the world.\\\\\\\"\\\\n\\\\t| w |\\\\n\\\\tself showBalloon: msgString hand: ((w _ self world) ifNotNil:[w activeHand]).! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'bf 11/1/2000 15:58'!\\\\nshowBalloon: msgString hand: aHand\\\\n\\\\t\\\\\\\"Pop up a balloon containing the given string,\\\\n\\\\tfirst removing any existing BalloonMorphs in the world.\\\\\\\"\\\\n\\\\n\\\\t| w balloon h |\\\\n\\\\t(w _ self world) ifNil: [^ self].\\\\n\\\\th _ aHand.\\\\n\\\\th ifNil:[\\\\n\\\\t\\\\th _ w activeHand].\\\\n\\\\tballoon _ BalloonMorph string: msgString for: self balloonHelpAligner.\\\\n\\\\tballoon popUpFor: self hand: h.! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'dgd 9/10/2004 13:59'!\\\\ntransferHalo: event from: formerHaloOwner\\\\n\\\\t\\\\\\\"Progressively transfer the halo to the next likely recipient\\\\\\\"\\\\n\\\\t| localEvt w target |\\\\n\\\\n\\\\tself flag: #workAround. \\\\\\\"For halo's distinction between 'target' and 'innerTarget' we need to bypass any renderers.\\\\\\\"\\\\n\\\\t(formerHaloOwner == self and:[self isRenderer and:[self wantsHaloFromClick not]]) ifTrue:[\\\\n\\\\t\\\\tevent shiftPressed ifTrue:[\\\\n\\\\t\\\\t\\\\ttarget _ owner.\\\\n\\\\t\\\\t\\\\tlocalEvt _ event transformedBy: (self transformedFrom: owner).\\\\n\\\\t\\\\t] ifFalse:[\\\\n\\\\t\\\\t\\\\ttarget _ self renderedMorph.\\\\n\\\\t\\\\t\\\\tlocalEvt _ event transformedBy: (target transformedFrom: self).\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\t^target transferHalo: localEvt from: target].\\\\n\\\\n\\\\\\\"\\\\tformerHaloOwner == self ifTrue:[^ self removeHalo].\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Never transfer halo to top-most world\\\\\\\"\\\\n\\\\t(self isWorldMorph and:[owner isNil]) ifFalse:[\\\\n\\\\t\\\\t(self wantsHaloFromClick and:[formerHaloOwner ~~ self]) \\\\n\\\\t\\\\t\\\\tifTrue:[^self addHalo: event from: formerHaloOwner]].\\\\n\\\\n\\\\tevent shiftPressed ifTrue:[\\\\n\\\\t\\\\t\\\\\\\"Pass it outwards\\\\\\\"\\\\n\\\\t\\\\towner ifNotNil:[^owner transferHalo: event from: formerHaloOwner].\\\\n\\\\t\\\\t\\\\\\\"We're at the top level; throw the event back in to find recipient\\\\\\\"\\\\n\\\\t\\\\tformerHaloOwner removeHalo.\\\\n\\\\t\\\\t^self processEvent: event copy resetHandlerFields.\\\\n\\\\t].\\\\n\\\\tself submorphsDo:[:m|\\\\n\\\\t\\\\tlocalEvt _ event transformedBy: (m transformedFrom: self).\\\\n\\\\t\\\\t(m fullContainsPoint: localEvt position) \\\\n\\\\t\\\\t\\\\tifTrue:[^m transferHalo: event from: formerHaloOwner].\\\\n\\\\t].\\\\n\\\\t\\\\\\\"We're at the bottom most level; throw the event back up to the root to find recipient\\\\\\\"\\\\n\\\\tformerHaloOwner removeHalo.\\\\n\\\\n\\\\tPreferences maintainHalos ifFalse:[\\\\n\\\\t\\\\t(w _ self world) ifNil: [ ^self ].\\\\n\\\\t\\\\tlocalEvt _ event transformedBy: (self transformedFrom: w) inverseTransformation.\\\\n\\\\t\\\\t^w processEvent: localEvt resetHandlerFields.\\\\n\\\\t].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'rhi 10/5/2001 20:49'!\\\\nwantsBalloon\\\\n\\\\t\\\\\\\"Answer true if receiver wants to show a balloon help text is a few moments.\\\\\\\"\\\\n\\\\n\\\\t^ (self balloonText notNil) and: [Preferences balloonHelpEnabled]! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'ar 11/29/2001 19:50'!\\\\nwantsDirectionHandles\\\\n\\\\t^self valueOfProperty: #wantsDirectionHandles ifAbsent:[Preferences showDirectionHandles]! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'ar 11/29/2001 19:52'!\\\\nwantsDirectionHandles: aBool\\\\n\\\\taBool == Preferences showDirectionHandles\\\\n\\\\t\\\\tifTrue:[self removeProperty: #wantsDirectionHandles]\\\\n\\\\t\\\\tifFalse:[self setProperty: #wantsDirectionHandles toValue: aBool].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'dgd 2/22/2003 19:06'!\\\\nwantsHalo\\\\n\\\\t| topOwner |\\\\n\\\\t^(topOwner := self topRendererOrSelf owner) notNil \\\\n\\\\t\\\\tand: [topOwner wantsHaloFor: self]! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 4/8/98 13:26'!\\\\nwantsHaloFor: aSubMorph\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 1/25/2000 17:43'!\\\\nwantsHaloFromClick\\\\n\\\\t^ true! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 11/27/2001 14:49'!\\\\nwantsHaloHandleWithSelector: aSelector inHalo: aHaloMorph\\\\n\\\\t\\\\\\\"Answer whether the receiver would like to offer the halo handle with the given selector (e.g. #addCollapseHandle:)\\\\\\\"\\\\n\\\\n\\\\t(#(addDismissHandle:) includes: aSelector) ifTrue:\\\\n\\\\t\\\\t[^ self resistsRemoval not].\\\\n\\\\n\\\\t(#( addDragHandle: ) includes: aSelector) ifTrue:\\\\n\\\\t\\\\t[^ self okayToBrownDragEasily].\\\\n\\\\n\\\\t(#(addGrowHandle: addScaleHandle:) includes: aSelector) ifTrue:\\\\n\\\\t\\\\t[^ self okayToResizeEasily].\\\\n\\\\n\\\\t(#( addRotateHandle: ) includes: aSelector) ifTrue:\\\\n\\\\t\\\\t[^ self okayToRotateEasily].\\\\n\\\\n\\\\t(#(addRecolorHandle:) includes: aSelector) ifTrue:\\\\n\\\\t\\\\t[^ self renderedMorph wantsRecolorHandle].\\\\n\\\\n\\\\ttrue ifTrue: [^ true]\\\\n\\\\t! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'sw 10/9/2000 16:56'!\\\\nwantsScriptorHaloHandle\\\\n\\\\t\\\\\\\"Answer whether the receiver would like to have a Scriptor halo handle put up on its behalf.  Initially, only the ScriptableButton says yes\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'halos and balloon help' stamp: 'nk 6/12/2004 09:32'!\\\\nwantsSimpleSketchMorphHandles\\\\n\\\\t\\\\\\\"Answer true if my halo's simple handles should include the simple sketch morph handles.\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:00'!\\\\nbasicInitialize\\\\n\\\\t\\\\\\\"Do basic generic initialization of the instance variables:  \\\\n\\\\tSet up the receiver, created by a #basicNew and now ready to  \\\\n\\\\tbe initialized, by placing initial values in the instance variables  \\\\n\\\\tas appropriate\\\\\\\"\\\\nowner _ nil.\\\\n\\\\tsubmorphs _ EmptyArray.\\\\n\\\\tbounds _ self defaultBounds.\\\\n\\\\t\\\\n\\\\tcolor _ self defaultColor! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'dgd 3/7/2003 15:06'!\\\\ndefaultBounds\\\\n\\\\\\\"answer the default bounds for the receiver\\\\\\\"\\\\n\\\\t^ 0 @ 0 corner: 50 @ 40! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:28'!\\\\ndefaultColor\\\\n\\\\t\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color blue! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'fbs 1/5/2005 09:17'!\\\\ninAScrollPane\\\\n\\\\t\\\\\\\"Answer a scroll pane that allows the user to scroll the receiver in either direction.  It will have permanent scroll bars unless you take some special action.\\\\\\\"\\\\n\\\\n\\\\t| widget |\\\\n\\\\twidget _ ScrollPane new.\\\\n\\\\twidget extent: ((self width min: 300 max: 100) @ (self height min: 150 max: 100));\\\\n\\\\t\\\\tborderWidth: 0.\\\\n\\\\twidget scroller addMorph: self.\\\\n\\\\twidget setScrollDeltas.\\\\n\\\\twidget color: self color darker darker.\\\\n\\\\t^ widget! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'sw 6/26/2001 10:56'!\\\\ninATwoWayScrollPane\\\\n\\\\t\\\\\\\"Answer a two-way scroll pane that allows the user to scroll the receiver in either direction.  It will have permanent scroll bars unless you take some special action.\\\\\\\"\\\\n\\\\n\\\\t| widget |\\\\n\\\\twidget _ TwoWayScrollPane new.\\\\n\\\\twidget extent: ((self width min: 300 max: 100) @ (self height min: 150 max: 100));\\\\n\\\\t\\\\tborderWidth: 0.\\\\n\\\\twidget scroller addMorph: self.\\\\n\\\\twidget setScrollDeltas.\\\\n\\\\twidget color: self color darker darker.\\\\n\\\\t^ widget! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 17:30'!\\\\ninitialize\\\\n\\\\t\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\nowner _ nil.\\\\n\\\\tsubmorphs _ EmptyArray.\\\\n\\\\tbounds _ self defaultBounds.\\\\n\\\\t\\\\n\\\\tcolor _ self defaultColor! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'ar 1/31/2001 13:57'!\\\\nintoWorld: aWorld\\\\n\\\\t\\\\\\\"The receiver has just appeared in a new world. Note:\\\\n\\\\t\\\\t* aWorld can be nil (due to optimizations in other places)\\\\n\\\\t\\\\t* owner is already set\\\\n\\\\t\\\\t* owner's submorphs may not include receiver yet.\\\\n\\\\tImportant: Keep this method fast - it is run whenever morphs are added.\\\\\\\"\\\\n\\\\taWorld ifNil:[^self].\\\\n\\\\tself wantsSteps ifTrue:[aWorld startStepping: self].\\\\n\\\\tself submorphsDo:[:m| m intoWorld: aWorld].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'RAA 10/18/2000 12:33'!\\\\nopenCenteredInWorld\\\\n\\\\n\\\\tself \\\\n\\\\t\\\\tfullBounds;\\\\n\\\\t\\\\tposition: Display extent - self extent // 2;\\\\n\\\\t\\\\topenInWorld.! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'sw 3/21/2000 14:46'!\\\\nopenInHand\\\\n\\\\t\\\\\\\"Attach the receiver to the current hand in the current morphic world\\\\\\\"\\\\n\\\\n\\\\tself currentHand attachMorph: self! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'jm 7/5/1998 12:40'!\\\\nopenInMVC\\\\n\\\\n\\\\tMorphWorldView\\\\n\\\\t\\\\topenWorldWith: self\\\\n\\\\t\\\\tlabelled: self defaultLabelForInspector.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'djp 10/24/1999 17:13'!\\\\nopenInWindow\\\\n\\\\n\\\\t^self openInWindowLabeled: self defaultLabelForInspector\\\\n! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'sma 4/22/2000 20:28'!\\\\nopenInWindowLabeled: aString\\\\n\\\\n\\\\t^self openInWindowLabeled: aString inWorld: self currentWorld! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'RAA 5/25/2000 08:12'!\\\\nopenInWindowLabeled: aString inWorld: aWorld\\\\n\\\\n\\\\t| window extent |\\\\n\\\\n\\\\twindow _ (SystemWindow labelled: aString) model: nil.\\\\n\\\\twindow \\\\n\\\\t\\\\t\\\\\\\" guess at initial extent\\\\\\\"\\\\n\\\\t\\\\tbounds:  (RealEstateAgent initialFrameFor: window initialExtent: self fullBounds extent world: aWorld);\\\\n\\\\t\\\\taddMorph: self frame: (0@0 extent: 1@1);\\\\n\\\\t\\\\tupdatePaneColors.\\\\n\\\\t\\\\\\\" calculate extent after adding in case any size related attributes were changed.  Use\\\\n\\\\tfullBounds in order to trigger re-layout of layout morphs\\\\\\\"\\\\n\\\\textent _ self fullBounds extent + \\\\n\\\\t\\\\t\\\\t(window borderWidth@window labelHeight) + window borderWidth.\\\\n\\\\twindow extent: extent.\\\\n\\\\taWorld addMorph: window.\\\\n\\\\twindow activate.\\\\n\\\\taWorld startSteppingSubmorphsOf: window.\\\\n\\\\t^window\\\\n! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'RAA 6/14/2000 18:09'!\\\\nopenInWorld\\\\n        \\\\\\\"Add this morph to the world.  If in MVC, then provide a Morphic window for it.\\\\\\\"\\\\n\\\\n        self couldOpenInMorphic\\\\n                ifTrue: [self openInWorld: self currentWorld]\\\\n                ifFalse: [self openInMVC]! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'dgd 9/1/2004 16:12'!\\\\nopenInWorld: aWorld\\\\n\\\\t\\\\\\\"Add this morph to the requested World.\\\\\\\"\\\\n\\\\t(aWorld visibleClearArea origin ~= (0@0) and: [self position = (0@0)]) ifTrue:\\\\n\\\\t\\\\t[self position: aWorld visibleClearArea origin].\\\\n\\\\taWorld addMorph: self.\\\\n\\\\taWorld startSteppingSubmorphsOf: self! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'ar 1/31/2001 13:58'!\\\\noutOfWorld: aWorld\\\\n\\\\t\\\\\\\"The receiver has just appeared in a new world. Notes:\\\\n\\\\t\\\\t* aWorld can be nil (due to optimizations in other places)\\\\n\\\\t\\\\t* owner is still valid\\\\n\\\\tImportant: Keep this method fast - it is run whenever morphs are removed.\\\\\\\"\\\\n\\\\taWorld ifNil:[^self].\\\\n\\\\t\\\\\\\"ar 1/31/2001: We could explicitly stop stepping the receiver here but for the sake of speed I'm for now relying on the lazy machinery in the world itself.\\\\\\\"\\\\n\\\\t\\\\\\\"aWorld stopStepping: self.\\\\\\\"\\\\n\\\\tself submorphsDo:[:m| m outOfWorld: aWorld].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'ar 3/3/2001 15:28'!\\\\nresourceJustLoaded\\\\n\\\\t\\\\\\\"In case resource relates to me\\\\\\\"\\\\n\\\\tself releaseCachedState.! !\\\\n\\\\n!Morph methodsFor: 'initialization' stamp: 'sw 9/11/1998 11:13'!\\\\nstandardPalette\\\\n\\\\t\\\\\\\"Answer a standard palette forced by some level of enclosing presenter, or nil if none\\\\\\\"\\\\n\\\\t| pal aPresenter itsOwner |\\\\n\\\\t(aPresenter _ self presenter) ifNil: [^ nil].\\\\n\\\\t^ (pal _ aPresenter ownStandardPalette)\\\\n\\\\t\\\\tifNotNil: [pal]\\\\n\\\\t\\\\tifNil:\\\\t[(itsOwner _ aPresenter associatedMorph owner)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[itsOwner standardPalette]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifNil:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[nil]]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'latter day support' stamp: 'sw 1/6/2005 01:26'!\\\\nisEtoyReadout\\\\n\\\\t\\\\\\\"Answer whether the receiver can serve as an etoy readout\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!Morph methodsFor: 'layout' stamp: 'ar 11/12/2000 17:33'!\\\\nacceptDroppingMorph: aMorph event: evt\\\\n\\\\t\\\\\\\"This message is sent when a morph is dropped onto a morph that has agreed to accept the dropped morph by responding 'true' to the wantsDroppedMorph:Event: message. This default implementation just adds the given morph to the receiver.\\\\\\\"\\\\n\\\\t| layout |\\\\n\\\\tlayout _ self layoutPolicy.\\\\n\\\\tlayout ifNil:[^self addMorph: aMorph].\\\\n\\\\tself privateAddMorph: aMorph \\\\n\\\\t\\\\tatIndex: (layout indexForInserting: aMorph at: evt position in: self).! !\\\\n\\\\n!Morph methodsFor: 'layout' stamp: 'ar 11/12/2000 17:34'!\\\\nadjustLayoutBounds\\\\n\\\\t\\\\\\\"Adjust the receivers bounds depending on the resizing strategy imposed\\\\\\\"\\\\n\\\\t| hFit vFit box myExtent extent |\\\\n\\\\thFit _ self hResizing.\\\\n\\\\tvFit _ self vResizing.\\\\n\\\\t(hFit == #shrinkWrap or:[vFit == #shrinkWrap]) ifFalse:[^self]. \\\\\\\"not needed\\\\\\\"\\\\n\\\\tbox _ self layoutBounds.\\\\n\\\\tmyExtent _ box extent.\\\\n\\\\textent _ self submorphBounds corner - box origin.\\\\n\\\\thFit == #shrinkWrap ifTrue:[myExtent _ extent x @ myExtent y].\\\\n\\\\tvFit == #shrinkWrap ifTrue:[myExtent _ myExtent x @ extent y].\\\\n\\\\t\\\\\\\"Make sure we don't get smaller than minWidth/minHeight\\\\\\\"\\\\n\\\\tmyExtent x < self minWidth ifTrue:[\\\\n\\\\t\\\\tmyExtent _ (myExtent x max: \\\\n\\\\t\\\\t\\\\t(self minWidth - self bounds width + self layoutBounds width)) @ myExtent y].\\\\n\\\\tmyExtent y < self minHeight ifTrue:[\\\\n\\\\t\\\\tmyExtent _ myExtent x @ (myExtent y max:\\\\n\\\\t\\\\t\\\\t(self minHeight - self bounds height + self layoutBounds height))].\\\\n\\\\tself layoutBounds: (box origin extent: myExtent).! !\\\\n\\\\n!Morph methodsFor: 'layout' stamp: 'dgd 2/22/2003 14:31'!\\\\ndoLayoutIn: layoutBounds \\\\n\\\\t\\\\\\\"Compute a new layout based on the given layout bounds.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Note: Testing for #bounds or #layoutBounds would be sufficient to\\\\n\\\\tfigure out if we need an invalidation afterwards but #outerBounds\\\\n\\\\tis what we need for all leaf nodes so we use that.\\\\\\\"\\\\n\\\\n\\\\t| layout box priorBounds |\\\\n\\\\tpriorBounds := self outerBounds.\\\\n\\\\tsubmorphs isEmpty ifTrue: [^fullBounds := priorBounds].\\\\n\\\\t\\\\\\\"Send #ownerChanged to our children\\\\\\\"\\\\n\\\\tsubmorphs do: [:m | m ownerChanged].\\\\n\\\\tlayout := self layoutPolicy.\\\\n\\\\tlayout ifNotNil: [layout layout: self in: layoutBounds].\\\\n\\\\tself adjustLayoutBounds.\\\\n\\\\tfullBounds := self privateFullBounds.\\\\n\\\\tbox := self outerBounds.\\\\n\\\\tbox = priorBounds \\\\n\\\\t\\\\tifFalse: [self invalidRect: (priorBounds quickMerge: box)]! !\\\\n\\\\n!Morph methodsFor: 'layout' stamp: 'ar 1/1/2002 20:00'!\\\\nfullBounds\\\\n\\\\t\\\\\\\"Return the bounding box of the receiver and all its children. Recompute the layout if necessary.\\\\\\\"\\\\n\\\\tfullBounds ifNotNil:[^fullBounds].\\\\n\\\\t\\\\\\\"Errors at this point can be critical so make sure we catch 'em all right\\\\\\\"\\\\n\\\\t[self doLayoutIn: self layoutBounds] on: Error do:[:ex|\\\\n\\\\t\\\\t\\\\\\\"This should do it unless you don't screw up the bounds\\\\\\\"\\\\n\\\\t\\\\tfullBounds _ bounds.\\\\n\\\\t\\\\tex pass].\\\\n\\\\t^fullBounds! !\\\\n\\\\n!Morph methodsFor: 'layout' stamp: 'ar 11/12/2000 23:10'!\\\\nlayoutBounds\\\\n\\\\t\\\\\\\"Return the bounds for laying out children of the receiver\\\\\\\"\\\\n\\\\t| inset box |\\\\n\\\\tinset _ self layoutInset.\\\\n\\\\tbox _ self innerBounds.\\\\n\\\\tinset isZero ifTrue:[^box].\\\\n\\\\t^box insetBy: inset.! !\\\\n\\\\n!Morph methodsFor: 'layout' stamp: 'ar 10/31/2000 21:09'!\\\\nlayoutBounds: aRectangle\\\\n\\\\t\\\\\\\"Set the bounds for laying out children of the receiver.\\\\n\\\\tNote: written so that #layoutBounds can be changed without touching this method\\\\\\\"\\\\n\\\\t| outer inner |\\\\n\\\\touter _ self bounds.\\\\n\\\\tinner _ self layoutBounds.\\\\n\\\\tbounds _ aRectangle origin + (outer origin - inner origin) corner:\\\\n\\\\t\\\\t\\\\t\\\\taRectangle corner + (outer corner - inner corner).! !\\\\n\\\\n!Morph methodsFor: 'layout' stamp: 'ar 1/27/2001 14:41'!\\\\nlayoutChanged\\\\n\\\\t| layout |\\\\n\\\\tfullBounds ifNil:[^self]. \\\\\\\"layout will be recomputed so don't bother\\\\\\\"\\\\n\\\\tfullBounds _ nil.\\\\n\\\\tlayout _ self layoutPolicy.\\\\n\\\\tlayout ifNotNil:[layout flushLayoutCache].\\\\n\\\\towner ifNotNil: [owner layoutChanged].\\\\n\\\\t\\\\\\\"note: does not send #ownerChanged here - we'll do this when computing the new layout\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'layout' stamp: 'ar 8/6/2001 09:55'!\\\\nlayoutInBounds: cellBounds\\\\n\\\\t\\\\\\\"Layout specific. Apply the given bounds to the receiver after being layed out in its owner.\\\\\\\"\\\\n\\\\t| box aSymbol delta |\\\\n\\\\tfullBounds ifNil:[\\\\\\\"We are getting new bounds here but we haven't computed the receiver's layout yet. Although the receiver has reported its minimal size before the actual size it has may differ from what would be after the layout. Normally, this isn't a real problem, but if we have #shrinkWrap constraints then the receiver's bounds may be larger than the cellBounds. THAT is a problem because the centering may not work correctly if the receiver shrinks after the owner layout has been computed. To avoid this problem, we compute the receiver's layout now. Note that the layout computation is based on the new cell bounds rather than the receiver's current bounds.\\\\\\\"\\\\n\\\\t\\\\tcellBounds origin = self bounds origin ifFalse:[\\\\n\\\\t\\\\t\\\\tbox _ self outerBounds.\\\\n\\\\t\\\\t\\\\tdelta _ cellBounds origin - self bounds origin.\\\\n\\\\t\\\\t\\\\tself invalidRect: (box merge: (box translateBy: delta)).\\\\n\\\\t\\\\t\\\\tself privateFullMoveBy: delta]. \\\\\\\"sigh...\\\\\\\"\\\\n\\\\t\\\\tbox _ cellBounds origin extent: \\\\\\\"adjust for #rigid receiver\\\\\\\"\\\\n\\\\t\\\\t\\\\t(self hResizing == #rigid ifTrue:[self bounds extent x] ifFalse:[cellBounds extent x]) @\\\\n\\\\t\\\\t\\\\t(self vResizing == #rigid ifTrue:[self bounds extent y] ifFalse:[cellBounds extent y]).\\\\n\\\\t\\\\t\\\\\\\"Compute inset of layout bounds\\\\\\\"\\\\n\\\\t\\\\tbox _ box origin - (self bounds origin - self layoutBounds origin) corner:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbox corner - (self bounds corner - self layoutBounds corner).\\\\n\\\\t\\\\t\\\\\\\"And do the layout within the new bounds\\\\\\\"\\\\n\\\\t\\\\tself layoutBounds: box.\\\\n\\\\t\\\\tself doLayoutIn: box].\\\\n\\\\tcellBounds = self fullBounds ifTrue:[^self]. \\\\\\\"already up to date\\\\\\\"\\\\n\\\\tcellBounds extent = self fullBounds extent \\\\\\\"nice fit\\\\\\\"\\\\n\\\\t\\\\tifTrue:[^self position: cellBounds origin].\\\\n\\\\tbox _ bounds.\\\\n\\\\t\\\\\\\"match #spaceFill constraints\\\\\\\"\\\\n\\\\tself hResizing == #spaceFill \\\\n\\\\t\\\\tifTrue:[box _ box origin extent: cellBounds width @ box height].\\\\n\\\\tself vResizing == #spaceFill\\\\n\\\\t\\\\tifTrue:[box _ box origin extent: box width @ cellBounds height].\\\\n\\\\t\\\\\\\"align accordingly\\\\\\\"\\\\n\\\\taSymbol _ (owner ifNil:[self]) cellPositioning.\\\\n\\\\tbox _ box align: (box perform: aSymbol) with: (cellBounds perform: aSymbol).\\\\n\\\\t\\\\\\\"and install new bounds\\\\\\\"\\\\n\\\\tself bounds: box.! !\\\\n\\\\n!Morph methodsFor: 'layout' stamp: 'ar 11/12/2000 17:35'!\\\\nlayoutProportionallyIn: newBounds\\\\n\\\\t\\\\\\\"Layout specific. Apply the given bounds to the receiver.\\\\\\\"\\\\n\\\\t| box frame |\\\\n\\\\tframe _ self layoutFrame ifNil:[^self].\\\\n\\\\t\\\\\\\"before applying the proportional values make sure the receiver's layout is computed\\\\\\\"\\\\n\\\\tself fullBounds. \\\\\\\"sigh...\\\\\\\"\\\\n\\\\t\\\\\\\"compute the cell size the receiver has given its layout frame\\\\\\\"\\\\n\\\\tbox _ frame layout: self bounds in: newBounds.\\\\n\\\\t(box = self bounds) ifTrue:[^self]. \\\\\\\"no change\\\\\\\"\\\\n\\\\t^self layoutInBounds: box.! !\\\\n\\\\n!Morph methodsFor: 'layout' stamp: 'dgd 2/22/2003 14:32'!\\\\nminExtent\\\\n\\\\t\\\\\\\"Layout specific. Return the minimum size the receiver can be represented in.\\\\n\\\\tImplementation note: When this message is sent from an owner trying to lay out its children it will traverse down the morph tree and recompute the minimal arrangement of the morphs based on which the minimal extent is returned. When a morph with some layout strategy is encountered, the morph will ask its strategy to compute the new arrangement. However, since the final size given to the receiver is unknown at the point of the query, the assumption is made that the current bounds of the receiver are the base on which the layout should be computed. This scheme prevents strange layout changes when for instance, a table is contained in another table. Unless the inner table has been resized manually (which means its bounds are already enlarged) the arrangement of the inner table will not change here. Thus the entire layout computation is basically an iterative process which may have different results depending on the incremental changes applied.\\\\\\\"\\\\n\\\\n\\\\t| layout minExtent extra hFit vFit |\\\\n\\\\thFit := self hResizing.\\\\n\\\\tvFit := self vResizing.\\\\n\\\\t(hFit == #spaceFill or: [vFit == #spaceFill]) \\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"The receiver will not adjust to parents layout by growing or shrinking,\\\\n\\\\t\\\\twhich means that an accurate layout defines the minimum size.\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t^self fullBounds extent].\\\\n\\\\n\\\\t\\\\\\\"An exception -- a receiver with #shrinkWrap constraints but no children is being treated #rigid (the equivalent to a #spaceFill receiver in a non-layouting owner)\\\\\\\"\\\\n\\\\tself hasSubmorphs \\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[hFit == #shrinkWrap ifTrue: [hFit := #rigid].\\\\n\\\\t\\\\t\\\\tvFit == #shrinkWrap ifTrue: [vFit := #rigid]].\\\\n\\\\tlayout := self layoutPolicy.\\\\n\\\\tlayout isNil \\\\n\\\\t\\\\tifTrue: [minExtent := 0 @ 0]\\\\n\\\\t\\\\tifFalse: [minExtent := layout minExtentOf: self in: self layoutBounds].\\\\n\\\\thFit == #rigid \\\\n\\\\t\\\\tifTrue: [minExtent := self fullBounds extent x @ minExtent y]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[extra := self bounds width - self layoutBounds width.\\\\n\\\\t\\\\t\\\\tminExtent := (minExtent x + extra) @ minExtent y].\\\\n\\\\tminExtent := vFit == #rigid \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [minExtent x @ self fullBounds extent y]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[extra := self bounds height - self layoutBounds height.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tminExtent x @ (minExtent y + extra)].\\\\n\\\\tminExtent := minExtent max: self minWidth @ self minHeight.\\\\n\\\\t^minExtent! !\\\\n\\\\n!Morph methodsFor: 'layout' stamp: 'dgd 2/16/2003 21:52'!\\\\nminHeight\\\\n\\\\t\\\\\\\"answer the receiver's minHeight\\\\\\\"\\\\n\\\\t^ self\\\\n\\\\t\\\\tvalueOfProperty: #minHeight\\\\n\\\\t\\\\tifAbsent: [2]! !\\\\n\\\\n!Morph methodsFor: 'layout' stamp: 'dgd 2/22/2003 14:32'!\\\\nminHeight: aNumber \\\\n\\\\taNumber isNil \\\\n\\\\t\\\\tifTrue: [self removeProperty: #minHeight]\\\\n\\\\t\\\\tifFalse: [self setProperty: #minHeight toValue: aNumber].\\\\n\\\\tself layoutChanged! !\\\\n\\\\n!Morph methodsFor: 'layout' stamp: 'dgd 2/16/2003 21:54'!\\\\nminWidth\\\\n\\\\t\\\\\\\"answer the receiver's minWidth\\\\\\\"\\\\n\\\\t^ self\\\\n\\\\t\\\\tvalueOfProperty: #minWidth\\\\n\\\\t\\\\tifAbsent: [2]! !\\\\n\\\\n!Morph methodsFor: 'layout' stamp: 'dgd 2/22/2003 14:32'!\\\\nminWidth: aNumber \\\\n\\\\taNumber isNil \\\\n\\\\t\\\\tifTrue: [self removeProperty: #minWidth]\\\\n\\\\t\\\\tifFalse: [self setProperty: #minWidth toValue: aNumber].\\\\n\\\\tself layoutChanged! !\\\\n\\\\n!Morph methodsFor: 'layout' stamp: 'dgd 2/22/2003 14:33'!\\\\nprivateFullBounds\\\\n\\\\t\\\\\\\"Private. Compute the actual full bounds of the receiver\\\\\\\"\\\\n\\\\n\\\\t| box |\\\\n\\\\tsubmorphs isEmpty ifTrue: [^self outerBounds].\\\\n\\\\tbox := self outerBounds copy.\\\\n\\\\tbox := box quickMerge: (self clipSubmorphs \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self submorphBounds intersect: self clippingBounds]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [self submorphBounds]).\\\\n\\\\t^box origin asIntegerPoint corner: box corner asIntegerPoint! !\\\\n\\\\n!Morph methodsFor: 'layout' stamp: 'ar 11/2/2000 17:42'!\\\\nsubmorphBounds\\\\n\\\\t\\\\\\\"Private. Compute the actual full bounds of the receiver\\\\\\\"\\\\n\\\\t| box subBox |\\\\n\\\\tsubmorphs do: [:m | \\\\n\\\\t\\\\t(m visible) ifTrue: [\\\\n\\\\t\\\\t\\\\tsubBox _ m fullBounds.\\\\n\\\\t\\\\t\\\\tbox \\\\n\\\\t\\\\t\\\\t\\\\tifNil:[box _ subBox copy]\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil:[box _ box quickMerge: subBox]]].\\\\n\\\\tbox ifNil:[^self bounds]. \\\\\\\"e.g., having submorphs but not visible\\\\\\\"\\\\n\\\\t^ box origin asIntegerPoint corner: box corner asIntegerPoint\\\\n! !\\\\n\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'dgd 8/30/2003 16:57'!\\\\naddCellLayoutMenuItems: aMenu hand: aHand\\\\n\\\\t\\\\\\\"Cell (e.g., child) related items\\\\\\\"\\\\n\\\\t| menu sub |\\\\n\\\\tmenu _ MenuMorph new defaultTarget: self.\\\\n\\\\t\\\\tmenu addUpdating: #hasDisableTableLayoutString action: #changeDisableTableLayout.\\\\n\\\\t\\\\tmenu addLine.\\\\n\\\\n\\\\t\\\\tsub _ MenuMorph new defaultTarget: self.\\\\n\\\\t\\\\t#(rigid shrinkWrap spaceFill) do:[:sym|\\\\n\\\\t\\\\t\\\\tsub addUpdating: #hResizingString: target: self selector: #hResizing: argumentList: (Array with: sym)].\\\\n\\\\t\\\\tmenu add:'horizontal resizing' translated subMenu: sub.\\\\n\\\\n\\\\t\\\\tsub _ MenuMorph new defaultTarget: self.\\\\n\\\\t\\\\t#(rigid shrinkWrap spaceFill) do:[:sym|\\\\n\\\\t\\\\t\\\\tsub addUpdating: #vResizingString: target: self selector: #vResizing: argumentList: (Array with: sym)].\\\\n\\\\t\\\\tmenu add:'vertical resizing' translated subMenu: sub.\\\\n\\\\n\\\\taMenu ifNotNil:[aMenu add: 'child layout' translated subMenu: menu].\\\\n\\\\t^menu! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'dgd 8/30/2003 16:51'!\\\\naddLayoutMenuItems: topMenu hand: aHand\\\\n\\\\t| aMenu |\\\\n\\\\taMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\taMenu addUpdating: #hasNoLayoutString action: #changeNoLayout.\\\\n\\\\taMenu addUpdating: #hasProportionalLayoutString action: #changeProportionalLayout.\\\\n\\\\taMenu addUpdating: #hasTableLayoutString action: #changeTableLayout.\\\\n\\\\taMenu addLine.\\\\n\\\\taMenu add: 'change layout inset...' translated action: #changeLayoutInset:.\\\\n\\\\taMenu addLine.\\\\n\\\\tself addCellLayoutMenuItems: aMenu hand: aHand.\\\\n\\\\tself addTableLayoutMenuItems: aMenu hand: aHand.\\\\n\\\\ttopMenu ifNotNil:[topMenu add: 'layout' translated subMenu: aMenu].\\\\n\\\\t^aMenu! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'dgd 8/30/2003 20:07'!\\\\naddTableLayoutMenuItems: aMenu hand: aHand\\\\n\\\\t| menu sub |\\\\n\\\\tmenu _ MenuMorph new defaultTarget: self.\\\\n\\\\tmenu addUpdating: #hasReverseCellsString action: #changeReverseCells.\\\\n\\\\tmenu addUpdating: #hasClipLayoutCellsString action: #changeClipLayoutCells.\\\\n\\\\tmenu addUpdating: #hasRubberBandCellsString action: #changeRubberBandCells.\\\\n\\\\tmenu addLine.\\\\n\\\\tmenu add: 'change cell inset...' translated action: #changeCellInset:.\\\\n\\\\tmenu add: 'change min cell size...' translated action: #changeMinCellSize:.\\\\n\\\\tmenu add: 'change max cell size...' translated action: #changeMaxCellSize:.\\\\n\\\\tmenu addLine.\\\\n\\\\n\\\\tsub _ MenuMorph new defaultTarget: self.\\\\n\\\\t#(leftToRight rightToLeft topToBottom bottomToTop) do:[:sym|\\\\n\\\\t\\\\tsub addUpdating: #listDirectionString: target: self selector: #changeListDirection: argumentList: (Array with: sym)].\\\\n\\\\tmenu add: 'list direction' translated subMenu: sub.\\\\n\\\\n\\\\tsub _ MenuMorph new defaultTarget: self.\\\\n\\\\t#(none leftToRight rightToLeft topToBottom bottomToTop) do:[:sym|\\\\n\\\\t\\\\tsub addUpdating: #wrapDirectionString: target: self selector: #wrapDirection: argumentList: (Array with: sym)].\\\\n\\\\tmenu add: 'wrap direction' translated subMenu: sub.\\\\n\\\\n\\\\tsub _ MenuMorph new defaultTarget: self.\\\\n\\\\t#(center topLeft topRight bottomLeft bottomRight topCenter leftCenter rightCenter bottomCenter) do:[:sym|\\\\n\\\\t\\\\tsub addUpdating: #cellPositioningString: target: self selector: #cellPositioning: argumentList: (Array with: sym)].\\\\n\\\\tmenu add: 'cell positioning' translated subMenu: sub.\\\\n\\\\n\\\\tsub _ MenuMorph new defaultTarget: self.\\\\n\\\\t#(topLeft bottomRight center justified) do:[:sym|\\\\n\\\\t\\\\tsub addUpdating: #listCenteringString: target: self selector: #listCentering: argumentList: (Array with: sym)].\\\\n\\\\tmenu add: 'list centering' translated subMenu: sub.\\\\n\\\\n\\\\tsub _ MenuMorph new defaultTarget: self.\\\\n\\\\t#(topLeft bottomRight center justified) do:[:sym|\\\\n\\\\t\\\\tsub addUpdating: #wrapCenteringString: target: self selector: #wrapCentering: argumentList: (Array with: sym)].\\\\n\\\\tmenu add: 'wrap centering' translated subMenu: sub.\\\\n\\\\n\\\\tsub _ MenuMorph new defaultTarget: self.\\\\n\\\\t#(none equal) do:[:sym|\\\\n\\\\t\\\\tsub addUpdating: #listSpacingString: target: self selector: #listSpacing: argumentList: (Array with: sym)].\\\\n\\\\tmenu add: 'list spacing' translated subMenu: sub.\\\\n\\\\n\\\\tsub _ MenuMorph new defaultTarget: self.\\\\n\\\\t#(none localRect localSquare globalRect globalSquare) do:[:sym|\\\\n\\\\t\\\\tsub addUpdating: #cellSpacingString: target: self selector: #cellSpacing: argumentList: (Array with: sym)].\\\\n\\\\tmenu add: 'cell spacing' translated subMenu: sub.\\\\n\\\\n\\\\taMenu ifNotNil:[aMenu add: 'table layout' translated subMenu: menu].\\\\n\\\\t^menu! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'ar 11/13/2000 19:08'!\\\\nchangeCellInset: evt\\\\n\\\\t| handle |\\\\n\\\\thandle _ HandleMorph new forEachPointDo:[:newPoint |\\\\n\\\\t\\\\tself cellInset: (newPoint - evt cursorPoint) asIntegerPoint // 5].\\\\n\\\\tevt hand attachMorph: handle.\\\\n\\\\thandle startStepping.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'ar 11/13/2000 18:54'!\\\\nchangeClipLayoutCells\\\\n\\\\tself invalidRect: self fullBounds.\\\\n\\\\tself clipLayoutCells: self clipLayoutCells not.\\\\n\\\\tself invalidRect: self fullBounds.! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'ar 10/31/2000 19:19'!\\\\nchangeDisableTableLayout\\\\n\\\\tself disableTableLayout: self disableTableLayout not.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'ar 11/13/2000 19:09'!\\\\nchangeLayoutInset: evt\\\\n\\\\t| handle |\\\\n\\\\thandle _ HandleMorph new forEachPointDo:[:newPoint |\\\\n\\\\t\\\\tself layoutInset: (newPoint - evt cursorPoint) asIntegerPoint // 5].\\\\n\\\\tevt hand attachMorph: handle.\\\\n\\\\thandle startStepping.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'ar 11/13/2000 19:10'!\\\\nchangeListDirection: aSymbol\\\\n\\\\t| listDir wrapDir |\\\\n\\\\tself listDirection: aSymbol.\\\\n\\\\t(self wrapDirection == #none) ifTrue:[^self].\\\\n\\\\t\\\\\\\"otherwise automatically keep a valid table layout\\\\\\\"\\\\n\\\\tlistDir _ self listDirection.\\\\n\\\\twrapDir _ self wrapDirection.\\\\n\\\\t(listDir == #leftToRight or:[listDir == #rightToLeft]) ifTrue:[\\\\n\\\\t\\\\twrapDir == #leftToRight ifTrue:[^self wrapDirection: #topToBottom].\\\\n\\\\t\\\\twrapDir == #rightToLeft ifTrue:[^self wrapDirection: #bottomToTop].\\\\n\\\\t] ifFalse:[\\\\n\\\\t\\\\twrapDir == #topToBottom ifTrue:[^self wrapDirection: #leftToRight].\\\\n\\\\t\\\\twrapDir == #bottomToTop ifTrue:[^self wrapDirection: #rightToLeft].\\\\n\\\\t].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'ar 11/13/2000 19:10'!\\\\nchangeMaxCellSize: evt\\\\n\\\\t| handle |\\\\n\\\\thandle _ HandleMorph new forEachPointDo:[:newPoint |\\\\n\\\\t\\\\tself maxCellSize: (newPoint - evt cursorPoint) asIntegerPoint].\\\\n\\\\tevt hand attachMorph: handle.\\\\n\\\\thandle startStepping.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'ar 11/13/2000 19:10'!\\\\nchangeMinCellSize: evt\\\\n\\\\t| handle |\\\\n\\\\thandle _ HandleMorph new forEachPointDo:[:newPoint |\\\\n\\\\t\\\\tself minCellSize: (newPoint - evt cursorPoint) asIntegerPoint].\\\\n\\\\tevt hand attachMorph: handle.\\\\n\\\\thandle startStepping.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'ar 10/31/2000 19:19'!\\\\nchangeNoLayout\\\\n\\\\tself layoutPolicy ifNil:[^self]. \\\\\\\"already no layout\\\\\\\"\\\\n\\\\tself layoutPolicy: nil.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'ar 10/31/2000 19:19'!\\\\nchangeProportionalLayout\\\\n\\\\t| layout |\\\\n\\\\t((layout _ self layoutPolicy) notNil and:[layout isProportionalLayout])\\\\n\\\\t\\\\tifTrue:[^self]. \\\\\\\"already proportional layout\\\\\\\"\\\\n\\\\tself layoutPolicy: ProportionalLayout new.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'ar 11/13/2000 19:10'!\\\\nchangeReverseCells\\\\n\\\\tself reverseTableCells: self reverseTableCells not.! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'ar 11/13/2000 19:10'!\\\\nchangeRubberBandCells\\\\n\\\\tself rubberBandCells: self rubberBandCells not.! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'ar 10/31/2000 19:20'!\\\\nchangeTableLayout\\\\n\\\\t| layout |\\\\n\\\\t((layout _ self layoutPolicy) notNil and:[layout isTableLayout])\\\\n\\\\t\\\\tifTrue:[^self]. \\\\\\\"already table layout\\\\\\\"\\\\n\\\\tself layoutPolicy: TableLayout new.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'dgd 8/30/2003 20:09'!\\\\nhasClipLayoutCellsString\\\\n\\\\t^ (self clipLayoutCells\\\\n\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\tifFalse: ['<off>']), 'clip to cell size' translated! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'dgd 8/30/2003 16:58'!\\\\nhasDisableTableLayoutString\\\\n\\\\t^ (self disableTableLayout\\\\n\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\tifFalse: ['<off>'])\\\\n\\\\t\\\\t, 'disable layout in tables' translated! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'dgd 10/8/2003 19:23'!\\\\nhasNoLayoutString\\\\n\\\\t^ (self layoutPolicy isNil\\\\n\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\tifFalse: ['<off>'])\\\\n\\\\t\\\\t, 'no layout' translated! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'dgd 8/30/2003 16:55'!\\\\nhasProportionalLayoutString\\\\n\\\\t| layout |\\\\n\\\\t^ (((layout := self layoutPolicy) notNil\\\\n\\\\t\\\\t\\\\tand: [layout isProportionalLayout])\\\\n\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\tifFalse: ['<off>'])\\\\n\\\\t\\\\t, 'proportional layout' translated! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'dgd 8/30/2003 20:08'!\\\\nhasReverseCellsString\\\\n\\\\t^ (self reverseTableCells\\\\n\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\tifFalse: ['<off>']), 'reverse table cells' translated! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'dgd 8/30/2003 20:09'!\\\\nhasRubberBandCellsString\\\\n\\\\t^ (self rubberBandCells\\\\n\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\tifFalse: ['<off>']), 'rubber band cells' translated! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'dgd 8/30/2003 16:59'!\\\\nhasTableLayoutString\\\\n\\\\t| layout |\\\\n\\\\t^ (((layout := self layoutPolicy) notNil\\\\n\\\\t\\\\t\\\\tand: [layout isTableLayout])\\\\n\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\tifFalse: ['<off>'])\\\\n\\\\t\\\\t, 'table layout' translated! !\\\\n\\\\n!Morph methodsFor: 'layout-menu' stamp: 'dgd 10/19/2003 11:23'!\\\\nlayoutMenuPropertyString: aSymbol from: currentSetting \\\\n\\\\t| onOff wording |\\\\n\\\\tonOff := aSymbol == currentSetting\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: ['<off>'].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\twording := String\\\\n\\\\t\\\\t\\\\t\\\\tstreamContents: [:stream | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t| index | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tindex := 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\taSymbol\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tkeysAndValuesDo: [:idx :ch | ch isUppercase\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"\\\\\\\"stream nextPutAll: (aSymbol copyFrom: index to: idx - 1) asLowercase.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstream nextPutAll: ' '.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tindex := idx]].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tindex < aSymbol size\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [stream nextPutAll: (aSymbol copyFrom: index to: aSymbol size) asLowercase]].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t^ onOff , wording translated! !\\\\n\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/14/2000 17:56'!\\\\nassureLayoutProperties\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\tprops == self ifTrue:[props _ nil].\\\\n\\\\tprops ifNil:[\\\\n\\\\t\\\\tprops _ LayoutProperties new initializeFrom: self.\\\\n\\\\t\\\\tself layoutProperties: props].\\\\n\\\\t^props! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/14/2000 17:57'!\\\\nassureTableProperties\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\tprops == self ifTrue:[props _ nil].\\\\n\\\\tprops ifNil:[\\\\n\\\\t\\\\tprops _ TableLayoutProperties new initializeFrom: self.\\\\n\\\\t\\\\tself layoutProperties: props].\\\\n\\\\tprops includesTableProperties \\\\n\\\\t\\\\tifFalse:[self layoutProperties: (props _ props asTableLayoutProperties)].\\\\n\\\\t^props! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 19:54'!\\\\ncellInset\\\\n\\\\t\\\\\\\"Layout specific. This property specifies an extra inset for each cell in the layout.\\\\\\\"\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\t^props ifNil:[0] ifNotNil:[props cellInset].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 19:54'!\\\\ncellInset: aNumber\\\\n\\\\t\\\\\\\"Layout specific. This property specifies an extra inset for each cell in the layout.\\\\\\\"\\\\n\\\\tself assureTableProperties cellInset: aNumber.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 19:54'!\\\\ncellPositioning\\\\n\\\\t\\\\\\\"Layout specific. This property describes how the receiver should be layed out in its owner when the bounds of the cell assigned to the receiver do not exactly match its bounds. Possible values are:\\\\n\\\\t\\\\t#topLeft, #topRight, #bottomLeft, #bottomRight, #topCenter, #leftCenter, #rightCenter, #bottomCenter, #center \\\\n\\\\twhich align the receiver's bounds with the cell at the given point.\\\\\\\"\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\t^props ifNil:[#center] ifNotNil:[props cellPositioning].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 10/29/2000 02:48'!\\\\ncellPositioningString: aSymbol\\\\n\\\\t^self layoutMenuPropertyString: aSymbol from: self cellPositioning! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/14/2000 17:39'!\\\\ncellPositioning: aSymbol\\\\n\\\\t\\\\\\\"Layout specific. This property describes how the receiver should be layed out in its owner when the bounds of the cell assigned to the receiver do not exactly match its bounds. Possible values are:\\\\n\\\\t\\\\t#topLeft, #topRight, #bottomLeft, #bottomRight, #topCenter, #leftCenter, #rightCenter, #bottomCenter, #center \\\\n\\\\twhich align the receiver's bounds with the cell at the given point.\\\\\\\"\\\\n\\\\tself assureTableProperties cellPositioning: aSymbol.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 19:55'!\\\\ncellSpacing\\\\n\\\\t\\\\\\\"Layout specific. This property describes how the cell size for each element in a list should be computed.\\\\n\\\\t\\\\t#globalRect - globally equal rectangular cells\\\\n\\\\t\\\\t#globalSquare - globally equal square cells\\\\n\\\\t\\\\t#localRect - locally (e.g., per row/column) equal rectangular cells\\\\n\\\\t\\\\t#localSquare - locally (e.g., per row/column) equal square cells\\\\n\\\\t\\\\t#none - cells are sized based on available row/column constraints\\\\n\\\\t\\\\\\\"\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\t^props ifNil:[#none] ifNotNil:[props cellSpacing].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 10/29/2000 02:47'!\\\\ncellSpacingString: aSymbol\\\\n\\\\t^self layoutMenuPropertyString: aSymbol from: self cellSpacing! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 19:56'!\\\\ncellSpacing: aSymbol\\\\n\\\\t\\\\\\\"Layout specific. This property describes how the cell size for each element in a list should be computed.\\\\n\\\\t\\\\t#globalRect - globally equal rectangular cells\\\\n\\\\t\\\\t#globalSquare - globally equal square cells\\\\n\\\\t\\\\t#localRect - locally (e.g., per row/column) equal rectangular cells\\\\n\\\\t\\\\t#localSquare - locally (e.g., per row/column) equal square cells\\\\n\\\\t\\\\t#none - cells are sized based on available row/column constraints\\\\n\\\\t\\\\\\\"\\\\n\\\\tself assureTableProperties cellSpacing: aSymbol.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 19:56'!\\\\ndisableTableLayout\\\\n\\\\t\\\\\\\"Layout specific. Disable laying out the receiver in table layout\\\\\\\"\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\t^props ifNil:[false] ifNotNil:[props disableTableLayout].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:06'!\\\\ndisableTableLayout: aBool\\\\n\\\\t\\\\\\\"Layout specific. Disable laying out the receiver in table layout\\\\\\\"\\\\n\\\\tself assureLayoutProperties disableTableLayout: aBool.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 19:57'!\\\\nhResizing\\\\n\\\\t\\\\\\\"Layout specific. This property describes how the receiver should be resized with respect to its owner and its children. Possible values are:\\\\n\\\\t\\\\t#rigid\\\\t\\\\t\\\\t-\\\\tdo not resize the receiver\\\\n\\\\t\\\\t#spaceFill\\\\t\\\\t-\\\\tresize to fill owner's available space\\\\n\\\\t\\\\t#shrinkWrap\\\\t- resize to fit children\\\\n\\\\t\\\\\\\"\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\t^props ifNil:[#rigid] ifNotNil:[props hResizing].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 10/31/2000 20:45'!\\\\nhResizingString: aSymbol\\\\n\\\\t^self layoutMenuPropertyString: aSymbol from: self hResizing! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:06'!\\\\nhResizing: aSymbol\\\\n\\\\t\\\\\\\"Layout specific. This property describes how the receiver should be resized with respect to its owner and its children. Possible values are:\\\\n\\\\t\\\\t#rigid\\\\t\\\\t\\\\t-\\\\tdo not resize the receiver\\\\n\\\\t\\\\t#spaceFill\\\\t\\\\t-\\\\tresize to fill owner's available space\\\\n\\\\t\\\\t#shrinkWrap\\\\t- resize to fit children\\\\n\\\\t\\\\\\\"\\\\n\\\\tself assureLayoutProperties hResizing: aSymbol.\\\\n\\\\tself layoutChanged.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'md 2/27/2006 09:59'!\\\\nlayoutFrame\\\\n\\\\t\\\\\\\"Layout specific. Return the layout frame describing where the  \\\\n\\\\treceiver should appear in a proportional layout\\\\\\\"\\\\n\\\\t^ extension ifNotNil: [extension layoutFrame]! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/14/2000 17:20'!\\\\nlayoutFrame: aLayoutFrame\\\\n\\\\t\\\\\\\"Layout specific. Return the layout frame describing where the receiver should appear in a proportional layout\\\\\\\"\\\\n\\\\tself layoutFrame == aLayoutFrame ifTrue:[^self].\\\\n\\\\tself assureExtension layoutFrame: aLayoutFrame.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/14/2000 16:38'!\\\\nlayoutInset\\\\n\\\\t\\\\\\\"Return the extra inset for layouts\\\\\\\"\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\t^props ifNil:[0] ifNotNil:[props layoutInset].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/14/2000 16:38'!\\\\nlayoutInset: aNumber\\\\n\\\\t\\\\\\\"Return the extra inset for layouts\\\\\\\"\\\\n\\\\tself assureTableProperties layoutInset: aNumber.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'md 2/27/2006 10:00'!\\\\nlayoutPolicy\\\\n\\\\t\\\\\\\"Layout specific. Return the layout policy describing how children \\\\n\\\\tof the receiver should appear.\\\\\\\"\\\\n\\\\t^ extension ifNotNil: [ extension layoutPolicy]! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/14/2000 17:21'!\\\\nlayoutPolicy: aLayoutPolicy\\\\n\\\\t\\\\\\\"Layout specific. Return the layout policy describing how children of the receiver should appear.\\\\\\\"\\\\n\\\\tself layoutPolicy == aLayoutPolicy ifTrue:[^self].\\\\n\\\\tself assureExtension layoutPolicy: aLayoutPolicy.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'md 2/27/2006 09:58'!\\\\nlayoutProperties\\\\n\\\\t\\\\\\\"Return the current layout properties associated with the  \\\\n\\\\treceiver\\\\\\\"\\\\n\\\\t^ extension ifNotNil: [ extension layoutProperties]! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/14/2000 17:21'!\\\\nlayoutProperties: newProperties\\\\n\\\\t\\\\\\\"Return the current layout properties associated with the receiver\\\\\\\"\\\\n\\\\tself layoutProperties == newProperties ifTrue:[^self].\\\\n\\\\tself assureExtension layoutProperties: newProperties.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 19:58'!\\\\nlistCentering\\\\n\\\\t\\\\\\\"Layout specific. This property describes how the rows/columns in a list-like layout should be centered.\\\\n\\\\t\\\\t#topLeft - center at start of primary direction\\\\n\\\\t\\\\t#bottomRight - center at end of primary direction\\\\n\\\\t\\\\t#center - center in the middle of primary direction\\\\n\\\\t\\\\t#justified - insert extra space inbetween rows/columns\\\\n\\\\t\\\\\\\"\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\t^props ifNil:[#topLeft] ifNotNil:[props listCentering].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 10/29/2000 02:47'!\\\\nlistCenteringString: aSymbol\\\\n\\\\t^self layoutMenuPropertyString: aSymbol from: self listCentering! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:05'!\\\\nlistCentering: aSymbol\\\\n\\\\t\\\\\\\"Layout specific. This property describes how the rows/columns in a list-like layout should be centered.\\\\n\\\\t\\\\t#topLeft - center at start of primary direction\\\\n\\\\t\\\\t#bottomRight - center at end of primary direction\\\\n\\\\t\\\\t#center - center in the middle of primary direction\\\\n\\\\t\\\\t#justified - insert extra space inbetween rows/columns\\\\n\\\\t\\\\\\\"\\\\n\\\\tself assureTableProperties listCentering: aSymbol.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 19:59'!\\\\nlistDirection\\\\n\\\\t\\\\\\\"Layout specific. This property describes the direction in which a list-like layout should be applied. Possible values are:\\\\n\\\\t\\\\t#leftToRight\\\\n\\\\t\\\\t#rightToLeft\\\\n\\\\t\\\\t#topToBottom\\\\n\\\\t\\\\t#bottomToTop\\\\n\\\\tindicating the direction in which any layout should take place\\\\\\\"\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\t^props ifNil:[#topToBottom] ifNotNil:[props listDirection].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 10/29/2000 02:47'!\\\\nlistDirectionString: aSymbol\\\\n\\\\t^self layoutMenuPropertyString: aSymbol from: self listDirection! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:04'!\\\\nlistDirection: aSymbol\\\\n\\\\t\\\\\\\"Layout specific. This property describes the direction in which a list-like layout should be applied. Possible values are:\\\\n\\\\t\\\\t#leftToRight\\\\n\\\\t\\\\t#rightToLeft\\\\n\\\\t\\\\t#topToBottom\\\\n\\\\t\\\\t#bottomToTop\\\\n\\\\tindicating the direction in which any layout should take place\\\\\\\"\\\\n\\\\tself assureTableProperties listDirection: aSymbol.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 19:59'!\\\\nlistSpacing\\\\n\\\\t\\\\\\\"Layout specific. This property describes how the heights for different rows in a table layout should be handled.\\\\n\\\\t\\\\t#equal - all rows have the same height\\\\n\\\\t\\\\t#none - all rows may have different heights\\\\n\\\\t\\\\\\\"\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\t^props ifNil:[#none] ifNotNil:[props listSpacing].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 10/29/2000 02:47'!\\\\nlistSpacingString: aSymbol\\\\n\\\\t^self layoutMenuPropertyString: aSymbol from: self listSpacing! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:04'!\\\\nlistSpacing: aSymbol\\\\n\\\\t\\\\\\\"Layout specific. This property describes how the heights for different rows in a table layout should be handled.\\\\n\\\\t\\\\t#equal - all rows have the same height\\\\n\\\\t\\\\t#none - all rows may have different heights\\\\n\\\\t\\\\\\\"\\\\n\\\\tself assureTableProperties listSpacing: aSymbol.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 19:59'!\\\\nmaxCellSize\\\\n\\\\t\\\\\\\"Layout specific. This property specifies the maximum size of a table cell.\\\\\\\"\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\t^props ifNil:[SmallInteger maxVal] ifNotNil:[props maxCellSize].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:04'!\\\\nmaxCellSize: aPoint\\\\n\\\\t\\\\\\\"Layout specific. This property specifies the maximum size of a table cell.\\\\\\\"\\\\n\\\\tself assureTableProperties maxCellSize: aPoint.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:00'!\\\\nminCellSize\\\\n\\\\t\\\\\\\"Layout specific. This property specifies the minimal size of a table cell.\\\\\\\"\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\t^props ifNil:[0] ifNotNil:[props minCellSize].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:04'!\\\\nminCellSize: aPoint\\\\n\\\\t\\\\\\\"Layout specific. This property specifies the minimal size of a table cell.\\\\\\\"\\\\n\\\\tself assureTableProperties minCellSize: aPoint.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:01'!\\\\nreverseTableCells\\\\n\\\\t\\\\\\\"Layout specific. This property describes if the cells should be treated in reverse order of submorphs.\\\\\\\"\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\t^props ifNil:[false] ifNotNil:[props reverseTableCells].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:04'!\\\\nreverseTableCells: aBool\\\\n\\\\t\\\\\\\"Layout specific. This property describes if the cells should be treated in reverse order of submorphs.\\\\\\\"\\\\n\\\\tself assureTableProperties reverseTableCells: aBool.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:01'!\\\\nrubberBandCells\\\\n\\\\t\\\\\\\"Layout specific. This property describes if a parent that is #shrinkWrapped around its children should ignore any #spaceFill children. E.g., when #rubberBandCells is true, the compound layout will always stay at the smallest available size, even though some child may be able to grow.\\\\\\\"\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\t^props ifNil:[false] ifNotNil:[props rubberBandCells].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:04'!\\\\nrubberBandCells: aBool\\\\n\\\\t\\\\\\\"Layout specific. This property describes if a parent that is #shrinkWrapped around its children should ignore any #spaceFill children. E.g., when #rubberBandCells is true, the compound layout will always stay at the smallest available size, even though some child may be able to grow.\\\\\\\"\\\\n\\\\tself assureTableProperties rubberBandCells: aBool.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'dgd 2/16/2003 20:02'!\\\\nspaceFillWeight\\\\n\\\\t\\\\\\\"Layout specific. This property describes the relative weight that \\\\n\\\\tshould be given to the receiver when extra space is distributed \\\\n\\\\tbetween different #spaceFill cells.\\\\\\\"\\\\n\\\\n\\\\t^ self\\\\n\\\\t\\\\tvalueOfProperty: #spaceFillWeight\\\\n\\\\t\\\\tifAbsent: [1]! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/15/2000 14:16'!\\\\nspaceFillWeight: aNumber\\\\n\\\\t\\\\\\\"Layout specific. This property describes the relative weight that should be given to the receiver when extra space is distributed between different #spaceFill cells.\\\\\\\"\\\\n\\\\taNumber = 1\\\\n\\\\t\\\\tifTrue:[self removeProperty: #spaceFillWeight]\\\\n\\\\t\\\\tifFalse:[self setProperty: #spaceFillWeight toValue: aNumber].\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'tk 10/30/2001 18:39'!\\\\nvResizeToFit: aBoolean\\\\n\\\\taBoolean ifTrue:[\\\\n\\\\t\\\\tself vResizing: #shrinkWrap.\\\\n\\\\t] ifFalse:[\\\\n\\\\t\\\\tself vResizing: #rigid.\\\\n\\\\t].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:02'!\\\\nvResizing\\\\n\\\\t\\\\\\\"Layout specific. This property describes how the receiver should be resized with respect to its owner and its children. Possible values are:\\\\n\\\\t\\\\t#rigid\\\\t\\\\t\\\\t-\\\\tdo not resize the receiver\\\\n\\\\t\\\\t#spaceFill\\\\t\\\\t-\\\\tresize to fill owner's available space\\\\n\\\\t\\\\t#shrinkWrap\\\\t- resize to fit children\\\\n\\\\t\\\\\\\"\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\t^props ifNil:[#rigid] ifNotNil:[props vResizing].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 10/31/2000 20:45'!\\\\nvResizingString: aSymbol\\\\n\\\\t^self layoutMenuPropertyString: aSymbol from: self vResizing! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:03'!\\\\nvResizing: aSymbol\\\\n\\\\t\\\\\\\"Layout specific. This property describes how the receiver should be resized with respect to its owner and its children. Possible values are:\\\\n\\\\t\\\\t#rigid\\\\t\\\\t\\\\t-\\\\tdo not resize the receiver\\\\n\\\\t\\\\t#spaceFill\\\\t\\\\t-\\\\tresize to fill owner's available space\\\\n\\\\t\\\\t#shrinkWrap\\\\t- resize to fit children\\\\n\\\\t\\\\\\\"\\\\n\\\\tself assureLayoutProperties vResizing: aSymbol.\\\\n\\\\tself layoutChanged.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:02'!\\\\nwrapCentering\\\\n\\\\t\\\\\\\"Layout specific. This property describes how the rows/columns in a list-like layout should be centered.\\\\n\\\\t\\\\t#topLeft - center at start of secondary direction\\\\n\\\\t\\\\t#bottomRight - center at end of secondary direction\\\\n\\\\t\\\\t#center - center in the middle of secondary direction\\\\n\\\\t\\\\t#justified - insert extra space inbetween rows/columns\\\\n\\\\t\\\\\\\"\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\t^props ifNil:[#topLeft] ifNotNil:[props wrapCentering].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 10/29/2000 03:00'!\\\\nwrapCenteringString: aSymbol\\\\n\\\\t^self layoutMenuPropertyString: aSymbol from: self wrapCentering! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:03'!\\\\nwrapCentering: aSymbol\\\\n\\\\t\\\\\\\"Layout specific. This property describes how the rows/columns in a list-like layout should be centered.\\\\n\\\\t\\\\t#topLeft - center at start of secondary direction\\\\n\\\\t\\\\t#bottomRight - center at end of secondary direction\\\\n\\\\t\\\\t#center - center in the middle of secondary direction\\\\n\\\\t\\\\t#justified - insert extra space inbetween rows/columns\\\\n\\\\t\\\\\\\"\\\\n\\\\tself assureTableProperties wrapCentering: aSymbol.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:03'!\\\\nwrapDirection\\\\n\\\\t\\\\\\\"Layout specific. This property describes the direction along which a list-like layout should be wrapped. Possible values are:\\\\n\\\\t\\\\t#leftToRight\\\\n\\\\t\\\\t#rightToLeft\\\\n\\\\t\\\\t#topToBottom\\\\n\\\\t\\\\t#bottomToTop\\\\n\\\\t\\\\t#none\\\\n\\\\tindicating in which direction wrapping should occur. This direction must be orthogonal to the list direction, that is if listDirection is #leftToRight or #rightToLeft then wrapDirection must be #topToBottom or #bottomToTop and vice versa.\\\\\\\"\\\\n\\\\t| props |\\\\n\\\\tprops _ self layoutProperties.\\\\n\\\\t^props ifNil:[#none] ifNotNil:[props wrapDirection].! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 10/29/2000 03:00'!\\\\nwrapDirectionString: aSymbol\\\\n\\\\t^self layoutMenuPropertyString: aSymbol from: self wrapDirection ! !\\\\n\\\\n!Morph methodsFor: 'layout-properties' stamp: 'ar 11/13/2000 20:03'!\\\\nwrapDirection: aSymbol\\\\n\\\\t\\\\\\\"Layout specific. This property describes the direction along which a list-like layout should be wrapped. Possible values are:\\\\n\\\\t\\\\t#leftToRight\\\\n\\\\t\\\\t#rightToLeft\\\\n\\\\t\\\\t#topToBottom\\\\n\\\\t\\\\t#bottomToTop\\\\n\\\\t\\\\t#none\\\\n\\\\tindicating in which direction wrapping should occur. This direction must be orthogonal to the list direction, that is if listDirection is #leftToRight or #rightToLeft then wrapDirection must be #topToBottom or #bottomToTop and vice versa.\\\\\\\"\\\\n\\\\tself assureTableProperties wrapDirection: aSymbol.\\\\n\\\\tself layoutChanged.\\\\n! !\\\\n\\\\n\\\\n!Morph methodsFor: 'macpal' stamp: 'sw 5/17/2001 17:57'!\\\\ncurrentVocabulary\\\\n\\\\t\\\\\\\"Answer the receiver's current vocabulary\\\\\\\"\\\\n\\\\n\\\\t| outer |\\\\n\\\\t^ (outer _ self ownerThatIsA: StandardViewer orA: ScriptEditorMorph) \\\\n\\\\t\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t\\\\t[outer currentVocabulary]\\\\n\\\\t\\\\t\\\\tifNil:\\\\n\\\\t\\\\t\\\\t\\\\t[super currentVocabulary]! !\\\\n\\\\n!Morph methodsFor: 'macpal' stamp: 'sw 10/10/1999 10:23'!\\\\nflash\\\\n\\\\t| c w |\\\\n\\\\tc _ self color.\\\\n\\\\tself color: Color black.\\\\n\\\\t(w _ self world) ifNotNil: [w displayWorldSafely].\\\\n\\\\tself color: c\\\\n! !\\\\n\\\\n!Morph methodsFor: 'macpal' stamp: 'sw 7/20/1999 08:13'!\\\\nscriptPerformer\\\\n\\\\t^ self topRendererOrSelf player ifNil: [self]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'menu' stamp: 'sw 11/27/2001 15:21'!\\\\naddBorderStyleMenuItems: aMenu hand: aHandMorph\\\\n\\\\t\\\\\\\"Probably one could offer border-style items even if it's not a borderedMorph, so this remains a loose end for the moment\\\\\\\"\\\\n! !\\\\n\\\\n!Morph methodsFor: 'menu' stamp: 'nk 2/15/2004 09:08'!\\\\naddGestureMenuItems: aMenu hand: aHandMorph\\\\n\\\\t\\\\\\\"If the receiver wishes the Genie menu items, add a line to the menu and then those Genie items, else do nothing\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'menu' stamp: 'nk 6/15/2004 07:11'!\\\\naddGraphModelYellowButtonItemsTo: aCustomMenu event: evt\\\\n\\\\t^aCustomMenu! !\\\\n\\\\n!Morph methodsFor: 'menu' stamp: 'dgd 9/18/2004 17:47'!\\\\naddModelYellowButtonItemsTo: aCustomMenu event: evt \\\\n\\\\t\\\\\\\"Give my models a chance to add their context-menu items to  \\\\n\\\\taCustomMenu.\\\\\\\"\\\\n\\\\tself model\\\\n\\\\t\\\\tifNotNilDo: [:mod |\\\\n\\\\t\\\\t\\\\tmod\\\\n\\\\t\\\\t\\\\t\\\\taddModelYellowButtonMenuItemsTo: aCustomMenu\\\\n\\\\t\\\\t\\\\t\\\\tforMorph: self\\\\n\\\\t\\\\t\\\\t\\\\thand: evt hand]! !\\\\n\\\\n!Morph methodsFor: 'menu' stamp: 'nk 3/10/2004 19:49'!\\\\naddMyYellowButtonMenuItemsToSubmorphMenus\\\\n\\\\t\\\\\\\"Answer true if I have items to add to the context menus of my submorphs\\\\\\\"\\\\n\\\\n\\\\t^true! !\\\\n\\\\n!Morph methodsFor: 'menu' stamp: 'dgd 9/13/2004 19:23'!\\\\naddNestedYellowButtonItemsTo: aMenu event: evt \\\\n\\\\t\\\\\\\"Add items to aMenu starting with me and proceeding down \\\\n\\\\tthrough my submorph chain, \\\\n\\\\tletting any submorphs that include the event position \\\\n\\\\tcontribute their items to the bottom of the menu, separated by \\\\n\\\\ta line.\\\\\\\"\\\\n\\\\t| underMouse |\\\\n\\\\n\\\\tself addYellowButtonMenuItemsTo: aMenu event: evt.\\\\n\\\\n\\\\tunderMouse := self\\\\n\\\\t\\\\t\\\\t\\\\tsubmorphThat: [:each | each containsPoint: evt position]\\\\n\\\\t\\\\t\\\\t\\\\tifNone: [^ self].\\\\n\\\\n\\\\t(underMouse addMyYellowButtonMenuItemsToSubmorphMenus\\\\n\\\\t\\\\t\\\\tand: [underMouse hasYellowButtonMenu])\\\\n\\\\t\\\\tifTrue: [| submenu |\\\\n\\\\t\\\\t\\\\taMenu addLine.\\\\n\\\\t\\\\t\\\\tsubmenu := MenuMorph new defaultTarget: underMouse.\\\\n\\\\t\\\\t\\\\tunderMouse addNestedYellowButtonItemsTo: submenu event: evt.\\\\n\\\\t\\\\t\\\\taMenu\\\\n\\\\t\\\\t\\\\t\\\\tadd: underMouse externalName\\\\n\\\\t\\\\t\\\\t\\\\ticon: (underMouse iconOrThumbnailOfSize: 16)\\\\n\\\\t\\\\t\\\\t\\\\tsubMenu: submenu\\\\n\\\\t\\\\t]\\\\n! !\\\\n\\\\n!Morph methodsFor: 'menu' stamp: 'dgd 7/28/2005 13:02'!\\\\naddTitleForHaloMenu: aMenu \\\\n\\\\taMenu\\\\n\\\\t\\\\taddTitle: self externalName\\\\n\\\\t\\\\ticon: (self iconOrThumbnailOfSize: (Preferences tinyDisplay ifFalse:[28] ifTrue:[16]))! !\\\\n\\\\n!Morph methodsFor: 'menu' stamp: 'dgd 10/13/2004 13:47'!\\\\naddYellowButtonMenuItemsTo: aMenu event: evt \\\\n\\\\t\\\\\\\"Populate aMenu with appropriate menu items for a  \\\\n\\\\tyellow-button (context menu) click.\\\\\\\"\\\\n\\\\taMenu defaultTarget: self.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tPreferences noviceMode\\\\n\\\\t\\\\tifFalse: [aMenu addStayUpItem].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tself addModelYellowButtonItemsTo: aMenu event: evt.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tPreferences generalizedYellowButtonMenu\\\\n\\\\t\\\\tifFalse: [^ self].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tPreferences cmdGesturesEnabled\\\\n\\\\t\\\\tifTrue: [\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\taMenu addLine.\\\\n\\\\t\\\\t\\\\taMenu add: 'inspect' translated action: #inspect].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\taMenu addLine.\\\\n\\\\tself world selectedObject == self\\\\n\\\\t\\\\tifTrue: [aMenu add: 'deselect' translated action: #removeHalo]\\\\n\\\\t\\\\tifFalse: [aMenu add: 'select' translated action: #addHalo].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t(self isWorldMorph\\\\n\\\\t\\\\t\\\\tor: [self mustBeBackmost]\\\\n\\\\t\\\\t\\\\tor: [self wantsToBeTopmost])\\\\n\\\\t\\\\tifFalse: [\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\taMenu addLine.\\\\n\\\\t\\\\t\\\\taMenu add: 'send to back' translated action: #goBehind.\\\\n\\\\t\\\\t\\\\taMenu add: 'bring to front' translated action: #comeToFront.\\\\n\\\\t\\\\t\\\\tself addEmbeddingMenuItemsTo: aMenu hand: evt hand].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tself isWorldMorph\\\\n\\\\t\\\\tifFalse: [\\\\\\\"\\\\\\\"\\\\n\\\\tSmalltalk\\\\n\\\\t\\\\tat: #NCAAConnectorMorph\\\\n\\\\t\\\\tifPresent: [:connectorClass | \\\\n\\\\t\\\\t\\\\taMenu addLine.\\\\n\\\\t\\\\t\\\\taMenu add: 'connect to' translated action: #startWiring.\\\\n\\\\t\\\\t\\\\taMenu addLine].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\tself isFullOnScreen\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [aMenu add: 'move onscreen' translated action: #goHome]].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tPreferences noviceMode\\\\n\\\\t\\\\tifFalse: [\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\tself addLayoutMenuItems: aMenu hand: evt hand.\\\\n\\\\t\\\\t\\\\t(owner notNil\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [owner isTextMorph])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self addTextAnchorMenuItems: aMenu hand: evt hand]].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tself isWorldMorph\\\\n\\\\t\\\\tifFalse: [\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\taMenu addLine.\\\\n\\\\t\\\\t\\\\tself addToggleItemsToHaloMenu: aMenu].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\taMenu addLine.\\\\n\\\\tself isWorldMorph\\\\n\\\\t\\\\tifFalse: [aMenu add: 'copy to paste buffer' translated action: #copyToPasteBuffer:].\\\\n\\\\t(self allStringsAfter: nil) isEmpty\\\\n\\\\t\\\\tifFalse: [aMenu add: 'copy text' translated action: #clipText].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tself addExportMenuItems: aMenu hand: evt hand.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t(Preferences noviceMode not\\\\n\\\\t\\\\t\\\\tand: [self isWorldMorph not])\\\\n\\\\t\\\\tifTrue: [\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\taMenu addLine.\\\\n\\\\t\\\\t\\\\taMenu add: 'adhere to edge...' translated action: #adhereToEdge].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tself addCustomMenuItems: aMenu hand: evt hand! !\\\\n\\\\n!Morph methodsFor: 'menu' stamp: 'dgd 9/18/2004 17:23'!\\\\nbuildYellowButtonMenu: aHand \\\\n\\\\t\\\\\\\"build the morph menu for the yellow button\\\\\\\"\\\\n\\\\t| menu |\\\\n\\\\tmenu := MenuMorph new defaultTarget: self.\\\\n\\\\tself addNestedYellowButtonItemsTo: menu event: ActiveEvent.\\\\n\\\\tMenuIcons decorateMenu: menu.\\\\n\\\\t^ menu! !\\\\n\\\\n!Morph methodsFor: 'menu' stamp: 'dgd 4/4/2006 14:43'!\\\\nhasYellowButtonMenu\\\\n\\\\t\\\\\\\"Answer true if I have any items at all for a context (yellow  \\\\n\\\\tbutton) menu.\\\\\\\"\\\\n\\\\t^ self wantsYellowButtonMenu\\\\n\\\\t\\\\t\\\\tor: [self models anySatisfy: [:each | each hasModelYellowButtonMenuItems]]! !\\\\n\\\\n!Morph methodsFor: 'menu' stamp: 'tak 7/17/2004 18:20'!\\\\nofferCostumeViewerMenu: aMenu\\\\n\\\\t\\\\\\\"do nothing\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'menu' stamp: 'nk 3/10/2004 19:51'!\\\\noutermostOwnerWithYellowButtonMenu\\\\n\\\\t\\\\\\\"Answer me or my outermost owner that is willing to contribute menu items to a context menu.\\\\n\\\\tDon't include the world.\\\\\\\"\\\\n\\\\n\\\\t| outermost |\\\\n\\\\toutermost _ self outermostMorphThat: [ :ea |\\\\n\\\\t\\\\tea isWorldMorph not and: [ ea hasYellowButtonMenu ]].\\\\n\\\\t^outermost ifNil: [ self hasYellowButtonMenu ifTrue: [ self ] ifFalse: []] ! !\\\\n\\\\n!Morph methodsFor: 'menu' stamp: 'dgd 9/29/2004 13:26'!\\\\nstartWiring\\\\n\\\\tSmalltalk\\\\n\\\\t\\\\tat: #NCAAConnectorMorph\\\\n\\\\t\\\\tifPresent: [:connectorClass | connectorClass newCurvyArrow startWiringFrom: self] ! !\\\\n\\\\n!Morph methodsFor: 'menu' stamp: 'dgd 9/18/2004 18:20'!\\\\nwantsYellowButtonMenu\\\\n\\\\t\\\\\\\"Answer true if the receiver wants a yellow button menu\\\\\\\"\\\\n\\\\tself\\\\n\\\\t\\\\tvalueOfProperty: #wantsYellowButtonMenu\\\\n\\\\t\\\\tifPresentDo: [:value | ^ value].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tself isInSystemWindow\\\\n\\\\t\\\\tifTrue: [^ false].\\\\\\\"\\\\\\\"\\\\n\\\\t(Preferences noviceMode\\\\n\\\\t\\\\t\\\\tand: [self isInDockingBar])\\\\n\\\\t\\\\tifTrue: [^ false].\\\\\\\"\\\\\\\"\\\\n\\\\t^ Preferences generalizedYellowButtonMenu! !\\\\n\\\\n!Morph methodsFor: 'menu' stamp: 'dgd 9/18/2004 18:35'!\\\\nwantsYellowButtonMenu: aBoolean \\\\n\\\\t\\\\\\\"Change the receiver to wants or not a yellow button menu\\\\\\\"\\\\n\\\\tself setProperty: #wantsYellowButtonMenu toValue: aBoolean! !\\\\n\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 10/6/2004 11:38'!\\\\nabsorbStateFromRenderer: aRenderer \\\\n\\\\t\\\\\\\"Transfer knownName, actorState, visible, and player info over from aRenderer, which was formerly imposed above me as a transformation shell but is now going away.\\\\\\\"\\\\n\\\\n\\\\t| current |\\\\n\\\\t(current _ aRenderer actorStateOrNil) ifNotNil:\\\\n\\\\t\\\\t[self actorState: current.\\\\n\\\\t\\\\taRenderer actorState: nil].\\\\n\\\\n\\\\t(current _ aRenderer knownName) ifNotNil:\\\\n\\\\t\\\\t[self setNameTo: current.\\\\n\\\\t\\\\taRenderer setNameTo: nil].\\\\n\\\\n\\\\t(current _ aRenderer player) ifNotNil:\\\\n\\\\t\\\\t[self player: current.\\\\n\\\\t\\\\tcurrent rawCostume: self.\\\\n\\\\t\\\\taRenderer player: nil].\\\\n\\\\n\\\\tself visible: aRenderer visible! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 11/27/2001 14:36'!\\\\naddAddHandMenuItemsForHalo: aMenu hand: aHandMorph\\\\n\\\\t\\\\\\\"The former charter of this method was to add halo menu items that pertained specifically to the hand.  Over time this charter has withered, and most morphs reimplement this method simply to add their morph-specific menu items.  So in the latest round, all other implementors in the standard image have been removed.  However, this is left here as a hook for the benefit of existing code in client uses.\\\\\\\"\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'dgd 11/15/2003 19:25'!\\\\naddCopyItemsTo: aMenu\\\\n\\\\t\\\\\\\"Add copy-like items to the halo menu\\\\\\\"\\\\n\\\\n\\\\t| subMenu |\\\\n\\\\tsubMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\tsubMenu add: 'copy to paste buffer' translated action: #copyToPasteBuffer:.\\\\n\\\\tsubMenu add: 'copy text' translated action: #clipText.\\\\n\\\\tsubMenu add: 'copy Postscript' translated action: #clipPostscript.\\\\n\\\\tsubMenu add: 'print Postscript to file...' translated target: self selector: #printPSToFile.\\\\n\\\\taMenu add: 'copy & print...' translated subMenu: subMenu! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 4/27/1998 03:44'!\\\\naddCustomHaloMenuItems: aMenu hand: aHandMorph\\\\n\\\\t\\\\\\\"Add morph-specific items to the given menu which was invoked by the given hand from the halo.  To get started, we defer to the counterpart method used with the option-menu, but in time we can have separate menu choices for halo-menus and for option-menus\\\\\\\"\\\\n\\\\n\\\\tself addCustomMenuItems: aMenu hand: aHandMorph! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 11/27/2001 07:17'!\\\\naddCustomMenuItems: aCustomMenu hand: aHandMorph\\\\n\\\\t\\\\\\\"Add morph-specific items to the given menu which was invoked by the given hand.  This method provides is invoked both from the halo-menu and from the control-menu regimes.\\\\\\\"\\\\n! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'nk 2/16/2004 13:29'!\\\\naddExportMenuItems: aMenu hand: aHandMorph\\\\n\\\\t\\\\\\\"Add export items to the menu\\\\\\\"\\\\n\\\\n\\\\taMenu ifNotNil:\\\\n\\\\t\\\\t[ | aSubMenu |\\\\n\\\\t\\\\taSubMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\t\\\\taSubMenu add: 'BMP file' translated action: #exportAsBMP.\\\\n\\\\t\\\\taSubMenu add: 'GIF file' translated action: #exportAsGIF.\\\\n\\\\t\\\\taSubMenu add: 'JPEG file' translated action: #exportAsJPEG.\\\\n\\\\t\\\\taSubMenu add: 'PNG file' translated action: #exportAsPNG.\\\\n\\\\t\\\\taMenu add: 'export...' translated subMenu: aSubMenu]\\\\n! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'dgd 8/30/2003 16:44'!\\\\naddFillStyleMenuItems: aMenu hand: aHand\\\\n\\\\t\\\\\\\"Add the items for changing the current fill style of the Morph\\\\\\\"\\\\n\\\\t| menu |\\\\n\\\\tself canHaveFillStyles ifFalse:[^aMenu add: 'change color...' translated target: self action: #changeColor].\\\\n\\\\tmenu _ MenuMorph new defaultTarget: self.\\\\n\\\\tself fillStyle addFillStyleMenuItems: menu hand: aHand from: self.\\\\n\\\\tmenu addLine.\\\\n\\\\tmenu add: 'solid fill' translated action: #useSolidFill.\\\\n\\\\tmenu add: 'gradient fill' translated action: #useGradientFill.\\\\n\\\\tmenu add: 'bitmap fill' translated action: #useBitmapFill.\\\\n\\\\tmenu add: 'default fill' translated action: #useDefaultFill.\\\\n\\\\taMenu add: 'fill style' translated subMenu: menu.\\\\n\\\\t\\\\\\\"aMenu add: 'change color...' translated action: #changeColor\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 4/12/2005 23:13'!\\\\naddHaloActionsTo: aMenu\\\\n\\\\t\\\\\\\"Add items to aMenu representing actions requestable via halo\\\\\\\"\\\\n\\\\n\\\\t| subMenu |\\\\n\\\\tsubMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\tsubMenu addTitle: self externalName.\\\\n\\\\tsubMenu addStayUpItemSpecial.\\\\n\\\\tsubMenu addLine.\\\\n\\\\tsubMenu add: 'delete' translated action: #dismissViaHalo.\\\\n\\\\tsubMenu balloonTextForLastItem: 'Delete this object -- warning -- can be destructive!!' translated.\\\\n\\\\n\\\\tself maybeAddCollapseItemTo: subMenu.\\\\n\\\\tsubMenu add: 'grab' translated action: #openInHand.\\\\n\\\\tsubMenu balloonTextForLastItem: 'Pick this object up -- warning, since this removes it from its container, it can have adverse effects.' translated.\\\\n\\\\n\\\\tsubMenu addLine.\\\\n\\\\n\\\\tsubMenu add: 'resize' translated action: #resizeFromMenu.\\\\n\\\\tsubMenu balloonTextForLastItem: 'Change the size of this object' translated.\\\\n\\\\n\\\\tsubMenu add: 'duplicate' translated action: #maybeDuplicateMorph.\\\\n\\\\tsubMenu balloonTextForLastItem: 'Hand me a copy of this object' translated.\\\\n\\\\t\\\\\\\"Note that this allows access to the non-instancing duplicate even when this is a uniclass instance\\\\\\\"\\\\n\\\\n\\\\tself couldMakeSibling ifTrue:\\\\n\\\\t\\\\t[subMenu add: 'make a sibling' translated action: #handUserASibling.\\\\n\\\\t\\\\tsubMenu balloonTextForLastItem: 'Make a new sibling of this object and hand it to me' translated].\\\\n\\\\n\\\\tsubMenu addLine.\\\\n\\\\tsubMenu add: 'property sheet' translated target: self renderedMorph action: #openAPropertySheet.\\\\n\\\\tsubMenu balloonTextForLastItem: 'Open a property sheet for me. Allows changing lots of stuff at once.' translated.\\\\n\\\\n\\\\tsubMenu add: 'set color' translated target: self renderedMorph action: #changeColor.\\\\n\\\\tsubMenu balloonTextForLastItem: 'Change the color of this object' translated.\\\\n\\\\n\\\\tsubMenu add: 'viewer' translated target: self action: #beViewed.\\\\n\\\\tsubMenu balloonTextForLastItem: 'Open a Viewer that will allow everything about this object to be seen and controlled.' translated.\\\\n\\\\n\\\\tsubMenu add: 'tile browser' translated target: self action: #openInstanceBrowserWithTiles.\\\\n\\\\tsubMenu balloonTextForLastItem: 'Open a tool that will facilitate tile scripting of this object.' translated.\\\\n\\\\n\\\\tsubMenu add: 'hand me a tile' translated target: self action: #tearOffTile.\\\\n\\\\tsubMenu balloonTextForLastItem: 'Hand me a tile represting this object' translated.\\\\n\\\\tsubMenu addLine.\\\\n\\\\n\\\\tsubMenu add: 'inspect' translated target: self action: #inspect.\\\\n\\\\tsubMenu balloonTextForLastItem: 'Open an Inspector on this object' translated.\\\\n\\\\n\\\\taMenu add: 'halo actions...' translated subMenu: subMenu\\\\n! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 3/2/2004 22:11'!\\\\naddMiscExtrasTo: aMenu\\\\n\\\\n\\\\t\\\\\\\"Add a submenu of miscellaneous extra items to the menu.\\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\t| realOwner realMorph subMenu |\\\\n\\\\n\\\\tsubMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\n\\\\t(self isWorldMorph not and: [(self renderedMorph isSystemWindow) not])\\\\n\\\\n\\\\t\\\\tifTrue: [subMenu add: 'put in a window' translated action: #embedInWindow].\\\\n\\\\n\\\\n\\\\n\\\\tself isWorldMorph ifFalse:\\\\n\\\\n\\\\t\\\\t[subMenu add: 'adhere to edge...' translated action: #adhereToEdge.\\\\n\\\\n\\\\t\\\\tsubMenu addLine].\\\\n\\\\n\\\\n\\\\n\\\\trealOwner _ (realMorph _ self topRendererOrSelf) owner.\\\\n\\\\n\\\\t(realOwner isKindOf: TextPlusPasteUpMorph) ifTrue:\\\\n\\\\n\\\\t\\\\t[subMenu add: 'GeeMail stuff...' translated subMenu: (realOwner textPlusMenuFor: realMorph)].\\\\n\\\\n\\\\n\\\\n\\\\tsubMenu\\\\n\\\\n\\\\t\\\\tadd: 'add mouse up action' translated action: #addMouseUpAction;\\\\n\\\\n\\\\t\\\\tadd: 'remove mouse up action' translated action: #removeMouseUpAction;\\\\n\\\\n\\\\t\\\\tadd: 'hand me tiles to fire this button' translated action: #handMeTilesToFire.\\\\n\\\\n\\\\tsubMenu addLine.\\\\n\\\\n\\\\tsubMenu add: 'arrowheads on pen trails...' translated action: #setArrowheads.\\\\n\\\\n\\\\tsubMenu addLine.\\\\n\\\\n\\\\n\\\\n\\\\tsubMenu defaultTarget: self topRendererOrSelf.\\\\n\\\\n\\\\tsubMenu add: 'draw new path' translated action: #definePath.\\\\n\\\\n\\\\tsubMenu add: 'follow existing path' translated action: #followPath.\\\\n\\\\n\\\\tsubMenu add: 'delete existing path' translated action: #deletePath.\\\\n\\\\n\\\\tsubMenu addLine.\\\\n\\\\n\\\\n\\\\n\\\\tself addGestureMenuItems: subMenu hand: ActiveHand.\\\\n\\\\n\\\\n\\\\n\\\\taMenu add: 'extras...' translated subMenu: subMenu! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'nk 1/6/2004 12:53'!\\\\naddPaintingItemsTo: aMenu hand: aHandMorph \\\\n\\\\t| subMenu movies |\\\\n\\\\tsubMenu := MenuMorph new defaultTarget: self.\\\\n\\\\tsubMenu add: 'repaint' translated action: #editDrawing.\\\\n\\\\tsubMenu add: 'set rotation center' translated action: #setRotationCenter.\\\\n\\\\tsubMenu add: 'reset forward-direction' translated\\\\n\\\\t\\\\taction: #resetForwardDirection.\\\\n\\\\tsubMenu add: 'set rotation style' translated action: #setRotationStyle.\\\\n\\\\tsubMenu add: 'erase pixels of color' translated\\\\n\\\\t\\\\taction: #erasePixelsOfColor:.\\\\n\\\\tsubMenu add: 'recolor pixels of color' translated\\\\n\\\\t\\\\taction: #recolorPixelsOfColor:.\\\\n\\\\tsubMenu add: 'reduce color palette' translated action: #reduceColorPalette:.\\\\n\\\\tsubMenu add: 'add a border around this shape...' translated\\\\n\\\\t\\\\taction: #addBorderToShape:.\\\\n\\\\tmovies := (self world rootMorphsAt: aHandMorph targetOffset) \\\\n\\\\t\\\\t\\\\t\\\\tselect: [:m | (m isKindOf: MovieMorph) or: [m isSketchMorph]].\\\\n\\\\tmovies size > 1 \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[subMenu add: 'insert into movie' translated action: #insertIntoMovie:].\\\\n\\\\taMenu add: 'painting...' translated subMenu: subMenu! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 4/12/2005 23:12'!\\\\naddPlayerItemsTo: aMenu\\\\n\\\\t\\\\\\\"Add player-related items to the menu if appropriate\\\\\\\"\\\\n\\\\n\\\\t| aPlayer subMenu |\\\\n\\\\tself couldMakeSibling ifFalse: [^ self].\\\\n\\\\taPlayer _ self topRendererOrSelf player.\\\\n\\\\tsubMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\tsubMenu add: 'make a sibling instance' translated target: self action: #makeNewPlayerInstance:.\\\\n\\\\tsubMenu balloonTextForLastItem: 'Makes another morph whose player is of the same class as this one.  Both siblings will share the same scripts' translated.\\\\n\\\\n\\\\tsubMenu add: 'make multiple siblings...' translated target: self action: #makeMultipleSiblings:.\\\\n\\\\tsubMenu balloonTextForLastItem: 'Make any number of sibling instances all at once' translated.\\\\n\\\\n\\\\t(aPlayer belongsToUniClass and: [aPlayer class instanceCount > 1]) ifTrue:\\\\n\\\\t\\\\t[subMenu addLine.\\\\n\\\\t\\\\tsubMenu add: 'make all siblings look like me' translated target: self action: #makeSiblingsLookLikeMe:.\\\\n\\\\t\\\\tsubMenu balloonTextForLastItem: 'make all my sibling instances look like me.' translated.\\\\n\\\\n\\\\t\\\\tsubMenu add: 'bring all siblings to my location' translated target: self action: #bringAllSiblingsToMe:.\\\\n\\\\t\\\\tsubMenu balloonTextForLastItem: 'find all sibling instances and bring them to me' translated.\\\\n\\\\n\\\\t\\\\tsubMenu add: 'apply status to all siblngs' translated target: self action: #applyStatusToAllSiblings:.\\\\n\\\\t\\\\tsubMenu balloonTextForLastItem: 'apply the current status of all of my scripts to the scripts of all my siblings' translated].\\\\n\\\\n\\\\t\\\\tsubMenu add: 'indicate all siblings' translated target: self action: #indicateAllSiblings.\\\\n\\\\t\\\\tsubMenu balloonTextForLastItem: 'momentarily show, by flashing , all of my visible siblings.'.\\\\n\\\\n\\\\t\\\\taMenu add: 'siblings...' translated subMenu: subMenu\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'dgd 8/30/2003 20:34'!\\\\naddStackItemsTo: aMenu\\\\n\\\\t\\\\\\\"Add stack-related items to the menu\\\\\\\"\\\\n\\\\n\\\\t| stackSubMenu |\\\\n\\\\tstackSubMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\t(owner notNil and: [owner isStackBackground]) ifTrue:\\\\n\\\\t\\\\t[self isShared\\\\n\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[self couldHoldSeparateDataForEachInstance\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[stackSubMenu add: 'Background field, shared value' translated target: self action: #putOnBackground.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstackSubMenu add: 'Background field, individual values' translated target: self action: #becomeSharedBackgroundField]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[stackSubMenu add: 'put onto Background' translated target: self action: #putOnBackground]]\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[stackSubMenu add: 'remove from Background' translated target: self action: #putOnForeground.\\\\n\\\\t\\\\t\\\\t\\\\tself couldHoldSeparateDataForEachInstance ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self holdsSeparateDataForEachInstance\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[stackSubMenu add: 'start holding separate data for each instance' translated target: self action: #makeHoldSeparateDataForEachInstance]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[stackSubMenu add: 'stop holding separate data for each instance' translated target: self action: #stopHoldingSeparateDataForEachInstance].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstackSubMenu add: 'be default value on new card' translated target: self action: #setAsDefaultValueForNewCard.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(self hasProperty: #thumbnailImage)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[stackSubMenu add: 'stop using for reference thumbnail' translated target: self action: #stopUsingForReferenceThumbnail]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[stackSubMenu add: 'start using for reference thumbnail' translated target: self action: #startUsingForReferenceThumbnail]]].\\\\n\\\\t\\\\t\\\\t\\\\tstackSubMenu addLine].\\\\n\\\\n\\\\t(self isStackBackground) ifFalse:\\\\n\\\\t\\\\t[stackSubMenu add: 'be a card in an existing stack...' translated action: #insertAsStackBackground].\\\\n\\\\tstackSubMenu add: 'make an instance for my data' translated action: #abstractAModel.\\\\n\\\\t(self isStackBackground) ifFalse:\\\\n\\\\t\\\\t[stackSubMenu add: 'become a stack of cards' translated action: #wrapWithAStack].\\\\n\\\\taMenu add: 'stacks and cards...' translated subMenu: stackSubMenu\\\\n! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'nk 2/15/2004 08:19'!\\\\naddStandardHaloMenuItemsTo: aMenu hand: aHandMorph\\\\n\\\\t\\\\\\\"Add standard halo items to the menu\\\\\\\"\\\\n\\\\n\\\\t| unlockables |\\\\n\\\\n\\\\tself isWorldMorph ifTrue:\\\\n\\\\t\\\\t[^ self addWorldHaloMenuItemsTo: aMenu hand: aHandMorph].\\\\n\\\\n\\\\tself mustBeBackmost ifFalse:\\\\n\\\\t\\\\t[aMenu add: 'send to back' translated action: #goBehind.\\\\n\\\\t\\\\taMenu add: 'bring to front' translated action: #comeToFront.\\\\n\\\\t\\\\tself addEmbeddingMenuItemsTo: aMenu hand: aHandMorph.\\\\n\\\\t\\\\taMenu addLine].\\\\n\\\\n\\\\tself addFillStyleMenuItems: aMenu hand: aHandMorph.\\\\n\\\\tself addBorderStyleMenuItems: aMenu hand: aHandMorph.\\\\n\\\\tself addDropShadowMenuItems: aMenu hand: aHandMorph.\\\\n\\\\tself addLayoutMenuItems: aMenu hand: aHandMorph.\\\\n\\\\tself addHaloActionsTo: aMenu.\\\\n\\\\towner isTextMorph ifTrue:[self addTextAnchorMenuItems: aMenu hand: aHandMorph].\\\\n\\\\taMenu addLine.\\\\n\\\\tself addToggleItemsToHaloMenu: aMenu.\\\\n\\\\taMenu addLine.\\\\n\\\\tself addCopyItemsTo: aMenu.\\\\n\\\\tself addPlayerItemsTo: aMenu.\\\\n\\\\tself addExportMenuItems: aMenu hand: aHandMorph.\\\\n\\\\tself addStackItemsTo: aMenu.\\\\n\\\\tself addMiscExtrasTo: aMenu.\\\\n\\\\tPreferences noviceMode ifFalse:\\\\n\\\\t\\\\t[self addDebuggingItemsTo: aMenu hand: aHandMorph].\\\\n\\\\n\\\\taMenu addLine.\\\\n\\\\taMenu defaultTarget: self.\\\\n\\\\n\\\\taMenu addLine.\\\\n\\\\n\\\\tunlockables _ self submorphs select:\\\\n\\\\t\\\\t[:m | m isLocked].\\\\n\\\\tunlockables size == 1 ifTrue:\\\\n\\\\t\\\\t[aMenu\\\\n\\\\t\\\\t\\\\tadd: ('unlock \\\\\\\"{1}\\\\\\\"' translated format: unlockables first externalName)\\\\n\\\\t\\\\t\\\\taction: #unlockContents].\\\\n\\\\tunlockables size > 1 ifTrue:\\\\n\\\\t\\\\t[aMenu add: 'unlock all contents' translated action: #unlockContents.\\\\n\\\\t\\\\taMenu add: 'unlock...' translated action: #unlockOneSubpart].\\\\n\\\\n\\\\taMenu defaultTarget: aHandMorph.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'dgd 4/3/2006 14:11'!\\\\naddToggleItemsToHaloMenu: aMenu\\\\n\\\\t\\\\\\\"Add standard true/false-checkbox items to the memu\\\\\\\"\\\\n\\\\n\\\\t#(\\\\n\\\\t\\\\t(resistsRemovalString toggleResistsRemoval 'whether I should be reistant to easy deletion via the pink X handle' true)\\\\n\\\\t\\\\t(stickinessString toggleStickiness 'whether I should be resistant to a drag done by mousing down on me' true)\\\\n\\\\t\\\\t(lockedString lockUnlockMorph 'when \\\\\\\"locked\\\\\\\", I am inert to all user interactions' true)\\\\n\\\\t\\\\t(hasClipSubmorphsString changeClipSubmorphs 'whether the parts of objects within me that are outside my bounds should be masked.' false)\\\\n\\\\t\\\\t(hasDirectionHandlesString changeDirectionHandles 'whether direction handles are shown with the halo' false)\\\\n\\\\t\\\\t(hasDragAndDropEnabledString changeDragAndDrop 'whether I am open to having objects dropped into me' false)\\\\n\\\\t)\\\\n\\\\t\\\\tselect:[:each | Preferences noviceMode not or:[each fourth]]\\\\n\\\\t\\\\tthenDo:\\\\n\\\\t\\\\t[:each |\\\\n\\\\t\\\\t\\\\taMenu addUpdating: each first action: each second.\\\\n\\\\t\\\\t\\\\taMenu balloonTextForLastItem: each third translated].\\\\n\\\\n\\\\tself couldHaveRoundedCorners ifTrue:\\\\n\\\\t\\\\t[aMenu addUpdating: #roundedCornersString action: #toggleCornerRounding.\\\\n\\\\t\\\\taMenu balloonTextForLastItem: 'whether my corners should be rounded' translated]! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'wiz 2/14/2006 18:54'!\\\\naddWorldTargetSightingItems: aCustomMenu hand: aHandMorph\\\\n\\\\\\\"Use cursor to select a point on screen.\\\\nSet target from all possible morphs under cursor sight.\\\\\\\" \\\\n\\\\t\\\\n\\\\taCustomMenu addLine.\\\\n\\\\t\\\\n\\\\taCustomMenu add: 'sight target' translated action: #sightWorldTargets:.\\\\n\\\\t! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'dgd 10/17/2003 22:51'!\\\\nadhereToEdge\\\\n\\\\t| menu |\\\\n\\\\tmenu _ MenuMorph new defaultTarget: self.\\\\n\\\\t#(top right bottom left - center - topLeft topRight bottomRight bottomLeft - none)\\\\n\\\\t\\\\tdo: [:each |\\\\n\\\\t\\\\t\\\\teach == #-\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [menu addLine]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [menu add: each asString translated selector: #setToAdhereToEdge: argument: each]].\\\\n\\\\tmenu popUpEvent: self currentEvent in: self world! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'dgd 2/22/2003 14:26'!\\\\nadhereToEdge: edgeSymbol \\\\n\\\\t(owner isNil or: [owner isHandMorph]) ifTrue: [^self].\\\\n\\\\tself perform: (edgeSymbol , ':') asSymbol\\\\n\\\\t\\\\twithArguments: (Array with: (owner perform: edgeSymbol))! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 2/3/2000 00:14'!\\\\nadjustedCenter\\\\n\\\\t\\\\\\\"Provides a hook for objects to provide a reference point other than the receiver's center,for the purpose of centering a submorph under special circumstances, such as BalloonMorph\\\\\\\"\\\\n\\\\n\\\\t^ self center! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 2/3/2000 00:12'!\\\\nadjustedCenter: c\\\\n\\\\t\\\\\\\"Set the receiver's position based on the #adjustedCenter protocol for adhereToEdge.  By default this simply sets the receiver's center.   Though there are (at its inception anyway) no other implementors of this method, it is required in use with the #adhereToEdge when the centering of a submorph is to be with reference to a rectangle  other than the receiver's center.\\\\\\\"\\\\n\\\\n\\\\tself center: c! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'ar 10/5/2000 17:20'!\\\\nallMenuWordings\\\\n\\\\t| tempMenu |\\\\n\\\\ttempMenu _ self buildHandleMenu: self currentHand.\\\\n\\\\ttempMenu allMorphsDo: [:m | m step].  \\\\\\\"Get wordings current\\\\\\\"\\\\n\\\\t^ tempMenu allWordings! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 9/6/2000 18:45'!\\\\nchangeColor\\\\n\\\\t\\\\\\\"Change the color of the receiver -- triggered, e.g. from a menu\\\\\\\"\\\\n\\\\n\\\\tColorPickerMorph new\\\\n\\\\t\\\\tchoseModalityFromPreference;\\\\n\\\\t\\\\tsourceHand: self activeHand;\\\\n\\\\t\\\\ttarget: self;\\\\n\\\\t\\\\tselector: #fillStyle:;\\\\n\\\\t\\\\toriginalColor: self color;\\\\n\\\\t\\\\tputUpFor: self near: self fullBoundsInWorld! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'ar 11/29/2001 19:57'!\\\\nchangeDirectionHandles\\\\n\\\\t^self wantsDirectionHandles: self wantsDirectionHandles not! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'ar 11/2/2000 15:04'!\\\\nchangeDragAndDrop\\\\n\\\\t^self enableDragNDrop: self dragNDropEnabled not! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 12/17/1998 12:09'!\\\\nchooseNewGraphic\\\\n\\\\t\\\\\\\"Used by any morph that can be represented by a graphic\\\\\\\"\\\\n\\\\tself chooseNewGraphicCoexisting: false\\\\n! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'nk 6/12/2004 09:58'!\\\\nchooseNewGraphicCoexisting: aBoolean \\\\n\\\\t\\\\\\\"Allow the user to choose a different form for her form-based morph\\\\\\\"\\\\n\\\\t| replacee aGraphicalMenu |\\\\n\\\\taGraphicalMenu := GraphicalMenu new\\\\n\\\\t\\\\t\\\\t\\\\tinitializeFor: self\\\\n\\\\t\\\\t\\\\t\\\\twithForms: self reasonableForms\\\\n\\\\t\\\\t\\\\t\\\\tcoexist: aBoolean.\\\\n\\\\taBoolean\\\\n\\\\t\\\\tifTrue: [self primaryHand attachMorph: aGraphicalMenu]\\\\n\\\\t\\\\tifFalse: [replacee := self topRendererOrSelf.\\\\n\\\\t\\\\t\\\\treplacee owner replaceSubmorph: replacee by: aGraphicalMenu]! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 10/27/2000 17:34'!\\\\nchooseNewGraphicFromHalo\\\\n\\\\t\\\\\\\"Allow the user to select a changed graphic to replace the one in the receiver\\\\\\\"\\\\n\\\\n\\\\tself currentWorld abandonAllHalos.\\\\n\\\\tself chooseNewGraphicCoexisting: true\\\\n! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 2/21/2000 15:21'!\\\\ncollapse\\\\n\\\\tCollapsedMorph new beReplacementFor: self! !\\\\n\\\\n!Morph methodsFor: 'menus'!\\\\ndefaultArrowheadSize\\\\n\\\\t\\\\n\\\\t^ self class defaultArrowheadSize! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'ar 10/25/2000 23:17'!\\\\ndoMenuItem: menuString\\\\n\\\\t| aMenu anItem aNominalEvent aHand |\\\\n\\\\taMenu _ self buildHandleMenu: (aHand _ self currentHand).\\\\n\\\\taMenu allMorphsDo: [:m | m step].  \\\\\\\"Get wordings current\\\\\\\"\\\\n\\\\tanItem _ aMenu itemWithWording: menuString.\\\\n\\\\tanItem ifNil:\\\\n\\\\t\\\\t[^ self player scriptingError: 'Menu item not found: ', menuString].\\\\n\\\\taNominalEvent _  MouseButtonEvent new\\\\n\\\\t\\\\tsetType: #mouseDown\\\\n\\\\t\\\\tposition: anItem bounds center\\\\n\\\\t\\\\twhich: 4 \\\\\\\"red\\\\\\\"\\\\n\\\\t\\\\tbuttons: 4 \\\\\\\"red\\\\\\\"\\\\n\\\\t\\\\thand: aHand\\\\n\\\\t\\\\tstamp: nil.\\\\n\\\\tanItem invokeWithEvent: aNominalEvent! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'yo 2/17/2005 17:50'!\\\\nexportAsBMP\\\\n\\\\t| fName |\\\\n\\\\tfName _ FillInTheBlank request:'Please enter the name' translated initialAnswer: self externalName,'.bmp'.\\\\n\\\\tfName isEmpty ifTrue:[^self].\\\\n\\\\tself imageForm writeBMPfileNamed: fName.! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'yo 2/17/2005 17:50'!\\\\nexportAsGIF\\\\n\\\\t| fName |\\\\n\\\\tfName _ FillInTheBlank request:'Please enter the name' translated initialAnswer: self externalName,'.gif'.\\\\n\\\\tfName isEmpty ifTrue:[^self].\\\\n\\\\tGIFReadWriter putForm: self imageForm onFileNamed: fName.! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'yo 2/17/2005 17:51'!\\\\nexportAsJPEG\\\\n\\\\t\\\\\\\"Export the receiver's image as a JPEG\\\\\\\"\\\\n\\\\n\\\\t| fName |\\\\n\\\\tfName _ FillInTheBlank request: 'Please enter the name' translated initialAnswer: self externalName,'.jpeg'.\\\\n\\\\tfName isEmpty ifTrue: [^ self].\\\\n\\\\tself imageForm writeJPEGfileNamed: fName! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'yo 2/17/2005 17:51'!\\\\nexportAsPNG\\\\n\\\\t| fName |\\\\n\\\\tfName _ FillInTheBlank request:'Please enter the name' translated initialAnswer: self externalName,'.png'.\\\\n\\\\tfName isEmpty ifTrue:[^self].\\\\n\\\\tPNGReadWriter putForm: self imageForm onFileNamed: fName.! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'dgd 8/30/2003 20:23'!\\\\nhasDirectionHandlesString\\\\n\\\\t^ (self wantsDirectionHandles\\\\n\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\tifFalse: ['<off>'])\\\\n\\\\t\\\\t, 'direction handles' translated! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'dgd 8/30/2003 20:24'!\\\\nhasDragAndDropEnabledString\\\\n\\\\t\\\\\\\"Answer a string to characterize the drag & drop status of the  \\\\n\\\\treceiver\\\\\\\"\\\\n\\\\t^ (self dragNDropEnabled\\\\n\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\tifFalse: ['<off>'])\\\\n\\\\t\\\\t, 'accept drops' translated! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'dgd 4/3/2006 14:09'!\\\\nhelpButton\\\\n\\\\t\\\\\\\"Answer a button whose action would be to put up help concerning the receiver\\\\\\\"\\\\n\\\\n\\\\t| aButton |\\\\n\\\\taButton _ SimpleButtonMorph new.\\\\n\\\\taButton\\\\n\\\\t\\\\ttarget: self;\\\\n\\\\t\\\\tcolor: ColorTheme current helpColor;\\\\n\\\\t\\\\tborderColor: ColorTheme current helpColor muchDarker;\\\\n\\\\t\\\\tborderWidth: 1;\\\\n\\\\t\\\\tlabel: '?' translated font: Preferences standardButtonFont;\\\\n\\\\t\\\\tactionSelector: #presentHelp;\\\\n\\\\t\\\\tsetBalloonText: 'click here for help' translated.\\\\n\\\\t^ aButton! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'ar 9/27/2005 21:01'!\\\\ninspectInMorphic\\\\n\\\\tself currentHand attachMorph: ((ToolSet inspect: self) extent: 300@200)! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'ar 9/27/2005 21:01'!\\\\ninspectInMorphic: evt\\\\n\\\\tevt hand attachMorph: ((ToolSet inspect: self) extent: 300@200)! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'dgd 8/30/2003 20:20'!\\\\nlockedString\\\\n\\\\t\\\\\\\"Answer the string to be shown in a menu to represent the \\\\n\\\\t'locked' status\\\\\\\"\\\\n\\\\t^ (self isLocked\\\\n\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\tifFalse: ['<off>']), 'be locked' translated! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 9/21/2000 22:50'!\\\\nlockUnlockMorph\\\\n\\\\t\\\\\\\"If the receiver is locked, unlock it; if unlocked, lock it\\\\\\\"\\\\n\\\\n\\\\tself isLocked ifTrue: [self unlock] ifFalse: [self lock]! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 10/29/1999 15:34'!\\\\nmakeNascentScript\\\\n\\\\t^ self notYetImplemented! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'dgd 8/30/2003 20:15'!\\\\nmaybeAddCollapseItemTo: aMenu\\\\n\\\\t\\\\\\\"If appropriate, add a collapse item to the given menu\\\\\\\"\\\\n\\\\n\\\\t| anOwner |\\\\n\\\\t(anOwner _ self topRendererOrSelf owner) ifNotNil:\\\\n\\\\t\\\\t\\\\t[anOwner isWorldMorph ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[aMenu add: 'collapse' translated target: self action: #collapse]]! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 11/22/1999 12:13'!\\\\nmenuItemAfter: menuString\\\\n\\\\t| allWordings |\\\\n\\\\tallWordings _ self allMenuWordings.\\\\n\\\\t^ allWordings atWrap: ((allWordings indexOf: menuString) + 1)! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 11/22/1999 12:14'!\\\\nmenuItemBefore: menuString\\\\n\\\\t| allWordings |\\\\n\\\\tallWordings _ self allMenuWordings.\\\\n\\\\t^ allWordings atWrap: ((allWordings indexOf: menuString) - 1)! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'dgd 9/22/2004 20:30'!\\\\nmodel\\\\n\\\\t^ nil ! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 6/12/2001 21:08'!\\\\npresentHelp\\\\n\\\\t\\\\\\\"Present a help message if there is one available\\\\\\\"\\\\n\\\\n\\\\tself inform: 'Sorry, no help has been\\\\nprovided here yet.'! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'yo 2/17/2005 18:03'!\\\\nprintPSToFileNamed: aString \\\\n\\\\t\\\\\\\"Ask the user for a filename and print this morph as postscript.\\\\\\\"\\\\n\\\\t| fileName rotateFlag psCanvasType psExtension |\\\\n\\\\tfileName := aString asFileName.\\\\n\\\\tpsCanvasType _ PostscriptCanvas defaultCanvasType.\\\\n\\\\tpsExtension _ psCanvasType defaultExtension.\\\\n\\\\tfileName := FillInTheBlank request: (String streamContents: [ :s |\\\\n\\\\t\\\\ts nextPutAll: ('File name? (\\\\\\\"{1}\\\\\\\" will be added to end)' translated format: {psExtension})])\\\\n\\\\t\\\\t\\\\tinitialAnswer: fileName.\\\\n\\\\tfileName isEmpty\\\\n\\\\t\\\\tifTrue: [^ Beeper beep].\\\\n\\\\t(fileName endsWith: psExtension)\\\\n\\\\t\\\\tifFalse: [fileName := fileName , psExtension].\\\\n\\\\trotateFlag := ((PopUpMenu labels: 'portrait (tall)\\\\nlandscape (wide)' translated)\\\\n\\\\t\\\\t\\\\t\\\\tstartUpWithCaption: 'Choose orientation...' translated)\\\\n\\\\t\\\\t\\\\t\\\\t= 2.\\\\n\\\\t((FileStream newFileNamed: fileName asFileName) converter: TextConverter defaultSystemConverter)\\\\n\\\\t\\\\tnextPutAll: (psCanvasType morphAsPostscript: self rotated: rotateFlag);\\\\n\\\\t\\\\t close! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 10/27/2000 06:39'!\\\\nputOnBackground\\\\n\\\\t\\\\\\\"Place the receiver, formerly private to its card, onto the shared background.  If the receiver needs data carried on its behalf by the card, such data will be represented on every card.\\\\\\\"\\\\n\\\\n\\\\t(self hasProperty: #shared) ifTrue: [^ self].  \\\\\\\"Already done\\\\\\\"\\\\n\\\\n\\\\tself setProperty: #shared toValue: true.\\\\n\\\\tself stack ifNotNil: [self stack reassessBackgroundShape]! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'dgd 9/5/2003 18:25'!\\\\nputOnForeground\\\\n\\\\t\\\\\\\"Place the receiver, formerly on the background, onto the foreground.  If the receiver needs data carried on its behalf by the card, those data will be lost, so in this case get user confirmation before proceeding.\\\\\\\"\\\\n\\\\n\\\\tself holdsSeparateDataForEachInstance \\\\\\\"later add the refinement of not putting up the following confirmer if only a single instance of the current background's uniclass exists\\\\\\\"\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self confirm: 'Caution -- every card of this background\\\\nformerly had its own value for this\\\\nitem.  If you put it on the foreground,\\\\nthe values  of this item on all other\\\\ncards will be lost' translated\\\\n\\\\t\\\\t\\\\t\\\\torCancel: [^ self]].\\\\n\\\\n\\\\tself removeProperty: #shared.\\\\n\\\\tself stack reassessBackgroundShape.\\\\n\\\\t\\\\\\\"still work to be done here!!\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'nk 6/12/2004 22:42'!\\\\nreasonableBitmapFillForms\\\\n\\\\t\\\\\\\"Answer an OrderedCollection of forms that could be used to replace my bitmap fill, with my current form first.\\\\\\\"\\\\n\\\\t| reasonableForms myGraphic |\\\\n\\\\treasonableForms := self class allSketchMorphForms.\\\\n\\\\treasonableForms addAll: Imports default images.\\\\n\\\\treasonableForms addAll: (BitmapFillStyle allSubInstances collect:[:f| f form]).\\\\n\\\\treasonableForms\\\\n\\\\t\\\\tremove: (myGraphic := self fillStyle form)\\\\n\\\\t\\\\tifAbsent: [].\\\\n\\\\treasonableForms := reasonableForms asOrderedCollection.\\\\n\\\\treasonableForms addFirst: myGraphic.\\\\n\\\\t^reasonableForms! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'nk 6/12/2004 09:55'!\\\\nreasonableForms\\\\n\\\\t\\\\\\\"Answer an OrderedCollection of forms that could be used to replace my form, with my current form first.\\\\\\\"\\\\n\\\\t| reasonableForms myGraphic |\\\\n\\\\treasonableForms := self class allSketchMorphForms.\\\\n\\\\treasonableForms addAll: Imports default images.\\\\n\\\\treasonableForms\\\\n\\\\t\\\\tremove: (myGraphic := self form)\\\\n\\\\t\\\\tifAbsent: [].\\\\n\\\\treasonableForms := reasonableForms asOrderedCollection.\\\\n\\\\treasonableForms addFirst: myGraphic.\\\\n\\\\t^reasonableForms! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'ar 9/22/2000 20:36'!\\\\nresetForwardDirection\\\\n\\\\tself forwardDirection: 0.! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'dgd 8/30/2003 20:18'!\\\\nresistsRemovalString\\\\n\\\\t\\\\\\\"Answer the string to be shown in a menu to represent the \\\\n\\\\t'resistsRemoval' status\\\\\\\"\\\\n\\\\t^ (self resistsRemoval\\\\n\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\tifFalse: ['<off>']), 'resist being deleted' translated! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'yo 2/17/2005 16:58'!\\\\nsetArrowheads\\\\n\\\\t\\\\\\\"Let the user edit the size of arrowheads for this object\\\\\\\"\\\\n\\\\n\\\\t| aParameter result  |\\\\n\\\\taParameter _ self renderedMorph valueOfProperty:  #arrowSpec ifAbsent:\\\\n\\\\t\\\\t[Preferences parameterAt: #arrowSpec ifAbsent: [5 @ 4]].\\\\n\\\\tresult _ Morph obtainArrowheadFor: 'Head size for arrowheads: ' translated defaultValue: aParameter asString.\\\\n\\\\tresult ifNotNil:\\\\n\\\\t\\\\t\\\\t[self renderedMorph  setProperty: #arrowSpec toValue: result]\\\\n\\\\t\\\\tifNil:\\\\n\\\\t\\\\t\\\\t[Beeper beep]! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'ar 9/22/2000 20:15'!\\\\nsetRotationCenter\\\\n\\\\t| p |\\\\n\\\\tself world displayWorld.\\\\n\\\\tCursor crossHair showWhile:\\\\n\\\\t\\\\t[p _ Sensor waitButton].\\\\n\\\\tSensor waitNoButton.\\\\n\\\\tself setRotationCenterFrom: (self transformFromWorld globalPointToLocal: p).\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'ar 9/22/2000 20:14'!\\\\nsetRotationCenterFrom: aPoint\\\\n\\\\tself rotationCenter: (aPoint - self bounds origin) / self bounds extent asFloatPoint.! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'di 12/21/2000 17:18'!\\\\nsetToAdhereToEdge: anEdge\\\\n\\\\tanEdge ifNil: [^ self].\\\\n\\\\tanEdge == #none ifTrue: [^ self removeProperty: #edgeToAdhereTo].\\\\n\\\\tself setProperty: #edgeToAdhereTo toValue: anEdge.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 8/30/1998 09:42'!\\\\nsnapToEdgeIfAppropriate\\\\n\\\\t| edgeSymbol oldBounds aWorld |\\\\n\\\\t(edgeSymbol _ self valueOfProperty: #edgeToAdhereTo) ifNotNil:\\\\n\\\\t\\\\t[oldBounds _ bounds.\\\\n\\\\t\\\\tself adhereToEdge: edgeSymbol.\\\\n\\\\t\\\\tbounds ~= oldBounds ifTrue: [(aWorld _ self world) ifNotNil: [aWorld viewBox ifNotNil:\\\\n\\\\t\\\\t\\\\t[aWorld displayWorld]]]]! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'dgd 8/30/2003 20:19'!\\\\nstickinessString\\\\n\\\\t\\\\\\\"Answer the string to be shown in a menu to represent the  \\\\n\\\\tstickiness status\\\\\\\"\\\\n\\\\t^ (self isSticky\\\\n\\\\t\\\\tifTrue: ['<yes>']\\\\n\\\\t\\\\tifFalse: ['<no>'])\\\\n\\\\t\\\\t, 'resist being picked up' translated! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'sw 10/6/2004 12:16'!\\\\ntransferStateToRenderer: aRenderer\\\\n\\\\t\\\\\\\"Transfer knownName, actorState, visible, and player info over to aRenderer, which is being imposed above me as a transformation shell\\\\\\\"\\\\n\\\\n\\\\t| current |\\\\n\\\\t(current _ self actorStateOrNil) ifNotNil:\\\\n\\\\t\\\\t[aRenderer actorState: current.\\\\n\\\\t\\\\tself actorState: nil].\\\\n\\\\n\\\\t(current _ self knownName) ifNotNil:\\\\n\\\\t\\\\t[aRenderer setNameTo: current.\\\\n\\\\t\\\\tself setNameTo: nil].\\\\n\\\\n\\\\t(current _ self player) ifNotNil:\\\\n\\\\t\\\\t[aRenderer player: current.\\\\n\\\\t\\\\tself player rawCostume: aRenderer.\\\\n\\\\t\\\\t\\\\\\\"NB player is redundantly pointed to in the extension of both the renderer and the rendee; this is regrettable but many years ago occasionally people tried to make that clean but always ran into problems iirc\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"self player: nil\\\\\\\"].\\\\n\\\\n\\\\taRenderer simplySetVisible: self visible\\\\n\\\\n\\\\n\\\\n \\\\n\\\\n\\\\t\\\\t! !\\\\n\\\\n!Morph methodsFor: 'menus' stamp: 'RAA 11/14/2000 13:46'!\\\\nuncollapseSketch\\\\n\\\\n\\\\t| uncollapsedVersion w whomToDelete |\\\\n\\\\n\\\\t(w _ self world) ifNil: [^self].\\\\n\\\\tuncollapsedVersion _ self valueOfProperty: #uncollapsedMorph.\\\\n\\\\tuncollapsedVersion ifNil: [^self].\\\\n\\\\twhomToDelete _ self valueOfProperty: #collapsedMorphCarrier.\\\\n\\\\tuncollapsedVersion setProperty: #collapsedPosition toValue: whomToDelete position.\\\\n\\\\n\\\\twhomToDelete delete.\\\\n\\\\tw addMorphFront: uncollapsedVersion.\\\\n\\\\n! !\\\\n\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'dgd 9/18/2004 16:24'!\\\\naddEmbeddingMenuItemsTo: aMenu hand: aHandMorph\\\\n\\\\t\\\\\\\"Construct a menu offerring embed targets for the receiver.  If the incoming menu is is not degenerate, add the constructed menu as a submenu; in any case, answer the embed-target menu\\\\\\\"\\\\n\\\\n\\\\t| menu potentialEmbeddingTargets |\\\\n\\\\n\\\\tpotentialEmbeddingTargets := self potentialEmbeddingTargets.\\\\n\\\\tpotentialEmbeddingTargets size > 1 ifFalse:[^ self].\\\\n\\\\n\\\\tmenu := MenuMorph new defaultTarget: self.\\\\n\\\\n\\\\tpotentialEmbeddingTargets reverseDo: [:m | \\\\n\\\\t\\\\t\\\\tmenu\\\\n\\\\t\\\\t\\\\t\\\\tadd: (m knownName ifNil:[m class name asString])\\\\n\\\\t\\\\t\\\\t\\\\ttarget: m\\\\n\\\\t\\\\t\\\\t\\\\tselector: #addMorphFrontFromWorldPosition:\\\\n\\\\t\\\\t\\\\t\\\\targument: self topRendererOrSelf.\\\\n\\\\n\\\\t\\\\t\\\\tmenu lastItem icon: (m iconOrThumbnailOfSize: 16).\\\\n\\\\n\\\\t\\\\t\\\\tself owner == m ifTrue:[menu lastItem emphasis: 1].\\\\n\\\\t\\\\t].\\\\n\\\\n\\\\taMenu add:'embed into' translated subMenu: menu.\\\\n\\\\n\\\\t^ menu! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'sw 1/29/2001 02:50'!\\\\napplyStatusToAllSiblings: evt\\\\n\\\\t\\\\\\\"Apply the statuses of all my scripts to the script status of all my siblings\\\\\\\"\\\\n\\\\n\\\\t| aPlayer |\\\\n\\\\t(aPlayer _ self topRendererOrSelf player) belongsToUniClass ifFalse: [self error: 'not uniclass'].\\\\n\\\\taPlayer instantiatedUserScriptsDo: \\\\n\\\\t\\\\t[:aScriptInstantiation | aScriptInstantiation assignStatusToAllSiblings]! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 10/5/2000 16:51'!\\\\nbeThisWorldsModel\\\\n\\\\n\\\\tself world setModel: self.\\\\n\\\\tself model: nil slotName: nil.\\\\t\\\\\\\"A world's model cannot have another model\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'yo 3/15/2005 14:45'!\\\\nblueButtonDown: anEvent\\\\n\\\\t\\\\\\\"Special gestures (cmd-mouse on the Macintosh; Alt-mouse on Windows and Unix) allow a mouse-sensitive morph to be moved or bring up a halo for the morph.\\\\\\\"\\\\n\\\\t| h tfm doNotDrag |\\\\n\\\\th _ anEvent hand halo.\\\\n\\\\t\\\\\\\"Prevent wrap around halo transfers originating from throwing the event back in\\\\\\\"\\\\n\\\\tdoNotDrag _ false.\\\\n\\\\th ifNotNil:[\\\\n\\\\t\\\\t(h innerTarget == self) ifTrue:[doNotDrag _ true].\\\\n\\\\t\\\\t(h innerTarget hasOwner: self) ifTrue:[doNotDrag _ true].\\\\n\\\\t\\\\t(self hasOwner: h target) ifTrue:[doNotDrag _ true]].\\\\n\\\\n\\\\ttfm _ (self transformedFrom: nil) inverseTransformation.\\\\n\\\\n\\\\t\\\\\\\"cmd-drag on flexed morphs works better this way\\\\\\\"\\\\n\\\\th _ self addHalo: (anEvent transformedBy: tfm).\\\\n\\\\th ifNil: [^ self].\\\\n\\\\tdoNotDrag ifTrue:[^self].\\\\n\\\\t\\\\\\\"Initiate drag transition if requested\\\\\\\"\\\\n\\\\tanEvent hand \\\\n\\\\t\\\\twaitForClicksOrDrag: h\\\\n\\\\t\\\\tevent: (anEvent transformedBy: tfm)\\\\n\\\\t\\\\tselectors: { nil. nil. nil. #dragTarget:. }\\\\n\\\\t\\\\tthreshold: 5.\\\\n\\\\t\\\\\\\"Pass focus explicitly here\\\\\\\"\\\\n\\\\tanEvent hand newMouseFocus: h.! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 9/15/2000 20:25'!\\\\nblueButtonUp: anEvent\\\\n\\\\t\\\\\\\"Ignored. Theoretically we should never get here since control is transferred to the halo on #blueButtonDown: but subclasses may implement this differently.\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'sw 1/19/2001 18:10'!\\\\nbringAllSiblingsToMe: evt\\\\n\\\\t\\\\\\\"bring all siblings of the receiver's player found in the same container to the receiver's location.\\\\\\\"\\\\n\\\\n\\\\t| aPlayer aPosition aContainer |\\\\n\\\\t(aPlayer _ self topRendererOrSelf player) belongsToUniClass ifFalse: [self error: 'not uniclass'].\\\\n\\\\taPosition _ self topRendererOrSelf position.\\\\n\\\\taContainer _ self topRendererOrSelf owner.\\\\n\\\\t(aPlayer class allInstances copyWithout: aPlayer) do:\\\\n\\\\t\\\\t[:each |\\\\n\\\\t\\\\t\\\\t(aContainer submorphs includes: each costume) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[each costume  position: aPosition]]! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'dgd 9/18/2004 17:23'!\\\\nbuildHandleMenu: aHand\\\\n\\\\t\\\\\\\"Build the morph menu for the given morph's halo's menu handle. This menu has two sections. The first section contains commands that are interpreted by the hand; the second contains commands provided by the target morph. This method allows the morph to decide which items should be included in the hand's section of the menu.\\\\\\\"\\\\n\\\\n\\\\t| menu |\\\\n\\\\n\\\\t(Preferences generalizedYellowButtonMenu\\\\n\\\\t\\\\t\\\\tand: [Preferences noviceMode])\\\\n\\\\t\\\\tifTrue: [^ self buildYellowButtonMenu: aHand].\\\\n\\\\n\\\\tmenu _ MenuMorph new defaultTarget: self.\\\\n\\\\tmenu addStayUpItem.\\\\n\\\\tmenu addLine.\\\\n\\\\tself addStandardHaloMenuItemsTo: menu hand: aHand.\\\\n\\\\tmenu defaultTarget: aHand.\\\\n\\\\tself addAddHandMenuItemsForHalo: menu  hand: aHand.\\\\n\\\\tmenu defaultTarget: self.\\\\n\\\\tself addCustomHaloMenuItems: menu hand: aHand.\\\\n\\\\tmenu defaultTarget: aHand.\\\\n\\\\t^ menu\\\\n! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'dgd 11/15/2003 19:29'!\\\\nbuildMetaMenu: evt\\\\n\\\\t\\\\\\\"Build the morph menu. This menu has two sections. The first section contains commands that are handled by the hand; the second contains commands handled by the argument morph.\\\\\\\"\\\\n\\\\t| menu |\\\\n\\\\tmenu _ MenuMorph new defaultTarget: self.\\\\n\\\\tmenu addStayUpItem.\\\\n\\\\tmenu add: 'grab' translated action: #grabMorph:.\\\\n\\\\tmenu add: 'copy to paste buffer' translated action: #copyToPasteBuffer:.\\\\n\\\\tself maybeAddCollapseItemTo: menu.\\\\n\\\\tmenu add: 'delete' translated action: #dismissMorph:.\\\\n\\\\tmenu addLine.\\\\n\\\\tmenu add: 'copy text' translated action: #clipText.\\\\n\\\\tmenu add: 'copy Postscript' translated action: #clipPostscript.\\\\n\\\\tmenu add: 'print Postscript to file...' translated action: #printPSToFile.\\\\n\\\\tmenu addLine.\\\\n\\\\tmenu add: 'go behind' translated action: #goBehind.\\\\n\\\\tmenu add: 'add halo' translated action: #addHalo:.\\\\n\\\\tmenu add: 'duplicate' translated action: #maybeDuplicateMorph:.\\\\n\\\\n\\\\tself addEmbeddingMenuItemsTo: menu hand: evt hand.\\\\n\\\\n\\\\tmenu add: 'resize' translated action: #resizeMorph:.\\\\n\\\\t\\\\\\\"Give the argument control over what should be done about fill styles\\\\\\\"\\\\n\\\\tself addFillStyleMenuItems: menu hand: evt hand.\\\\n\\\\tself addDropShadowMenuItems: menu hand: evt hand.\\\\n\\\\tself addLayoutMenuItems: menu hand: evt hand.\\\\n\\\\tmenu addUpdating: #hasClipSubmorphsString target: self selector: #changeClipSubmorphs argumentList: #().\\\\n\\\\tmenu addLine.\\\\n\\\\n\\\\t(self morphsAt: evt position) size > 1 ifTrue:\\\\n\\\\t\\\\t[menu add: 'submorphs...' translated\\\\n\\\\t\\\\t\\\\ttarget: self\\\\n\\\\t\\\\t\\\\tselector: #invokeMetaMenuAt:event:\\\\n\\\\t\\\\t\\\\targument: evt position].\\\\n\\\\tmenu addLine.\\\\n\\\\tmenu add: 'inspect' translated selector: #inspectAt:event: argument: evt position.\\\\n\\\\tmenu add: 'explore' translated action: #explore.\\\\n\\\\tmenu add: 'browse hierarchy' translated action: #browseHierarchy.\\\\n\\\\tmenu add: 'make own subclass' translated action: #subclassMorph.\\\\n\\\\tmenu addLine.\\\\n\\\\tmenu add: 'set variable name...' translated action: #choosePartName.\\\\n\\\\t(self isMorphicModel) ifTrue:\\\\n\\\\t\\\\t[menu add: 'save morph as prototype' translated action: #saveAsPrototype.\\\\n\\\\t\\\\t(self ~~ self world modelOrNil) ifTrue:\\\\n\\\\t\\\\t\\\\t [menu add: 'become this world''s model' translated action: #beThisWorldsModel]].\\\\n\\\\tmenu add: 'save morph in file' translated action: #saveOnFile.\\\\n\\\\t(self hasProperty: #resourceFilePath)\\\\n\\\\t\\\\tifTrue: [((self valueOfProperty: #resourceFilePath) endsWith: '.morph')\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [menu add: 'save as resource' translated action: #saveAsResource].\\\\n\\\\t\\\\t\\\\t\\\\tmenu add: 'update from resource' translated action: #updateFromResource]\\\\n\\\\t\\\\tifFalse: [menu add: 'attach to resource' translated action: #attachToResource].\\\\n\\\\tmenu add: 'show actions' translated action: #showActions.\\\\n\\\\tmenu addLine.\\\\n\\\\tself addDebuggingItemsTo: menu hand: evt hand.\\\\n\\\\n\\\\tself addCustomMenuItems: menu hand: evt hand.\\\\n\\\\t^ menu\\\\n! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 10/5/2000 18:54'!\\\\nchangeColorTarget: anObject selector: aSymbol originalColor: aColor hand: aHand\\\\n\\\\t\\\\\\\"Put up a color picker for changing some kind of color.  May be modal or modeless, depending on #modalColorPickers setting\\\\\\\"\\\\n\\\\tself flag: #arNote. \\\\\\\"Simplify this due to anObject == self for almost all cases\\\\\\\"\\\\n\\\\t^ ColorPickerMorph new\\\\n\\\\t\\\\tchoseModalityFromPreference;\\\\n\\\\t\\\\tsourceHand: aHand;\\\\n\\\\t\\\\ttarget: anObject;\\\\n\\\\t\\\\tselector: aSymbol;\\\\n\\\\t\\\\toriginalColor: aColor;\\\\n\\\\t\\\\tputUpFor: anObject near: (anObject isMorph\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue:\\\\t [Rectangle center: self position extent: 20]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [anObject == self world\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [anObject viewBox bottomLeft + (20@-20) extent: 200]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [anObject fullBoundsInWorld]]);\\\\n\\\\t\\\\tyourself! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 10/5/2000 16:44'!\\\\ncopyToPasteBuffer: evt\\\\n\\\\tself okayToDuplicate ifTrue:[evt hand copyToPasteBuffer: self].! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'mir 3/17/2006 18:02'!\\\\ndismissMorph\\\\n\\\\t\\\\\\\"This is called from an explicit halo destroy/delete action.\\\\\\\"\\\\n\\\\n\\\\t| w |\\\\n\\\\tw _ self world ifNil:[^self].\\\\n\\\\tw abandonAllHalos; stopStepping: self.\\\\n\\\\tself delete! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'mir 3/17/2006 18:01'!\\\\ndismissMorph: evt\\\\n\\\\tself dismissMorph! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'wiz 2/19/2006 12:41'!\\\\nduplicateMorphImage: evt \\\\n\\\\t\\\\\\\"Make and return a imageMorph of the receiver's argument imageForm\\\\\\\"\\\\n\\\\t| dup |\\\\n\\\\tdup := self asSnapshotThumbnail withSnapshotBorder.\\\\n\\\\tdup bounds: self bounds.\\\\n\\\\tevt hand grabMorph: dup from: owner.\\\\n\\\\t\\\\\\\"duplicate was ownerless so use #grabMorph:from: here\\\\\\\"\\\\n\\\\t^ dup! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 11/4/2000 17:56'!\\\\nduplicateMorph: evt\\\\n\\\\t\\\\\\\"Make and return a duplicate of the receiver's argument\\\\\\\"\\\\n\\\\t| dup |\\\\n\\\\tdup _ self duplicate.\\\\n\\\\tevt hand grabMorph: dup from: owner. \\\\\\\"duplicate was ownerless so use #grabMorph:from: here\\\\\\\"\\\\n\\\\t^dup! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 10/7/2000 20:53'!\\\\nembedInto: evt\\\\n\\\\t\\\\\\\"Embed the receiver into some other morph\\\\\\\"\\\\n\\\\t|  menu target |\\\\n\\\\tmenu _ CustomMenu new.\\\\n\\\\tself potentialEmbeddingTargets  do: [:m | \\\\n\\\\t\\\\tmenu add: (m knownName ifNil:[m class name asString]) action: m].\\\\n\\\\ttarget _ menu startUpWithCaption: ('Place ', self externalName, ' in...').\\\\n\\\\ttarget ifNil:[^self].\\\\n\\\\ttarget addMorphFront: self fromWorldPosition: self positionInWorld.! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 10/6/2000 16:37'!\\\\ngrabMorph: evt\\\\n\\\\n\\\\tevt hand grabMorph: self! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 10/7/2000 18:44'!\\\\nhandlerForBlueButtonDown: anEvent\\\\n\\\\t\\\\\\\"Return the (prospective) handler for a mouse down event. The handler is temporarily installed and can be used for morphs further down the hierarchy to negotiate whether the inner or the outer morph should finally handle the event.\\\\n\\\\tNote: Halos handle blue button events themselves so we will only be asked if there is currently no halo on top of us.\\\\\\\"\\\\n\\\\tself wantsHaloFromClick ifFalse:[^nil].\\\\n\\\\tanEvent handler ifNil:[^self].\\\\n\\\\tanEvent handler isPlayfieldLike ifTrue:[^self]. \\\\\\\"by default exclude playfields\\\\\\\"\\\\n\\\\t(anEvent shiftPressed)\\\\n\\\\t\\\\tifFalse:[^nil] \\\\\\\"let outer guy have it\\\\\\\"\\\\n\\\\t\\\\tifTrue:[^self] \\\\\\\"let me have it\\\\\\\"\\\\n! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 10/12/2000 17:07'!\\\\nhandlerForMetaMenu: evt\\\\n\\\\t\\\\\\\"Return the prospective handler for invoking the meta menu. By default, the top-most morph in the innermost world gets this menu\\\\\\\"\\\\n\\\\tself isWorldMorph ifTrue:[^self].\\\\n\\\\tevt handler ifNotNil:[evt handler isWorldMorph ifTrue:[^self]].\\\\n\\\\t^nil! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'yo 2/12/2005 15:25'!\\\\nindicateAllSiblings\\\\n\\\\t\\\\\\\"Indicate all the receiver and all its siblings by flashing momentarily.\\\\\\\"\\\\n\\\\n\\\\t| aPlayer allBoxes |\\\\n\\\\t(aPlayer _ self topRendererOrSelf player) belongsToUniClass ifFalse: [^ self \\\\\\\"error: 'not uniclass'\\\\\\\"].\\\\n\\\\tallBoxes _ aPlayer class allInstances\\\\n\\\\t\\\\tselect: [:m | m costume world == ActiveWorld]\\\\n\\\\t\\\\tthenCollect: [:m | m costume boundsInWorld].\\\\n\\\\n\\\\t5 timesRepeat:\\\\n\\\\t\\\\t[Display flashAll: allBoxes andWait: 120]! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 10/10/2000 14:09'!\\\\ninspectAt: aPoint event: evt\\\\n\\\\t| menu morphs target |\\\\n\\\\tmenu _ CustomMenu new.\\\\n\\\\tmorphs _ self morphsAt: aPoint.\\\\n\\\\t(morphs includes: self) ifFalse:[morphs _ morphs copyWith: self].\\\\n\\\\tmorphs do: [:m | \\\\n\\\\t\\\\tmenu add: (m knownName ifNil:[m class name asString]) action: m].\\\\n\\\\ttarget _ menu startUpWithCaption: ('inspect whom?\\\\n(deepest at top)').\\\\n\\\\ttarget ifNil:[^self].\\\\n\\\\ttarget inspectInMorphic: evt! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 10/10/2000 14:26'!\\\\ninvokeMetaMenuAt: aPoint event: evt\\\\n\\\\t| menu morphs target |\\\\n\\\\tmenu _ CustomMenu new.\\\\n\\\\tmorphs _ self morphsAt: aPoint.\\\\n\\\\t(morphs includes: self) ifFalse:[morphs _ morphs copyWith: self].\\\\n\\\\tmorphs size = 1 ifTrue:[morphs first invokeMetaMenu: evt].\\\\n\\\\tmorphs do: [:m | \\\\n\\\\t\\\\tmenu add: (m knownName ifNil:[m class name asString]) action: m].\\\\n\\\\ttarget _ menu startUp.\\\\n\\\\ttarget ifNil:[^self].\\\\n\\\\ttarget invokeMetaMenu: evt! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'fc 4/27/2004 21:54'!\\\\ninvokeMetaMenu: evt\\\\n\\\\t| menu |\\\\n\\\\tmenu _ self buildMetaMenu: evt.\\\\n\\\\tmenu addTitle: self externalName.\\\\n\\\\tself world ifNotNil: [\\\\n\\\\t\\\\tmenu popUpEvent: evt in: self world\\\\n\\\\t]! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'sw 4/12/2005 23:09'!\\\\nmakeMultipleSiblings: evt\\\\n\\\\t\\\\\\\"Make multiple siblings, first prompting the user for how many\\\\\\\"\\\\n\\\\n\\\\t| result |\\\\n\\\\tself topRendererOrSelf couldMakeSibling ifFalse: [^ Beeper beep].\\\\n\\\\tresult _ FillInTheBlank request: 'how many siblings do you want?' translated initialAnswer: '2'.\\\\n\\\\tresult isEmptyOrNil ifTrue: [^ self].\\\\n\\\\tresult first isDigit ifFalse: [^ Beeper beep].\\\\n\\\\tself topRendererOrSelf makeSiblings: result asInteger.! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 10/5/2000 19:20'!\\\\nmakeNewPlayerInstance: evt\\\\n\\\\t\\\\\\\"Make a duplicate of the receiver's argument.  This is called only where the argument has an associated Player as its costumee, and the intent here is to make another instance of the same uniclass as the donor Player itself.  Much works, but there are flaws so this shouldn't be used without recognizing the risks\\\\\\\"\\\\n\\\\n\\\\tevt hand attachMorph: self usableSiblingInstance! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'sw 1/12/2001 22:47'!\\\\nmakeSiblingsLookLikeMe: evt\\\\n\\\\t\\\\\\\"Make all my siblings wear the same costume that I am wearing.\\\\\\\"\\\\n\\\\n\\\\t| aPlayer |\\\\n\\\\t(aPlayer _ self topRendererOrSelf player) belongsToUniClass ifFalse: [self error: 'not uniclass'].\\\\n\\\\taPlayer class allInstancesDo:\\\\n\\\\t\\\\t[:anInstance | anInstance == aPlayer ifFalse:\\\\n\\\\t\\\\t\\\\t[anInstance wearCostumeOf: aPlayer]]! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'sw 1/29/2001 17:11'!\\\\nmakeSiblings: count\\\\n\\\\t\\\\\\\"Make multiple sibling, and return the list\\\\\\\"\\\\n\\\\n\\\\t| aPosition anInstance listOfNewborns |\\\\n\\\\taPosition _ self position.\\\\n\\\\tlistOfNewborns _ (1 to: count asInteger) asArray collect: \\\\n\\\\t\\\\t[:anIndex |\\\\n\\\\t\\\\t\\\\tanInstance _ self usableSiblingInstance.\\\\n\\\\t\\\\t\\\\towner addMorphFront: anInstance.\\\\n\\\\t\\\\t\\\\taPosition _ aPosition + (10@10).\\\\n\\\\t\\\\t\\\\tanInstance position: aPosition.\\\\n\\\\t\\\\t\\\\tanInstance].\\\\n\\\\tself currentWorld startSteppingSubmorphsOf: self topRendererOrSelf owner.\\\\n\\\\t^ listOfNewborns! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'sw 4/19/2005 14:55'!\\\\nmaybeDuplicateMorph\\\\n\\\\t\\\\\\\"Maybe duplicate the morph\\\\\\\"\\\\n\\\\n\\\\tself okayToDuplicate ifTrue:\\\\n\\\\t\\\\t[self topRendererOrSelf duplicate openInHand]! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 10/5/2000 17:32'!\\\\nmaybeDuplicateMorph: evt\\\\n\\\\tself okayToDuplicate ifTrue:[^self duplicateMorph: evt]! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'RAA 2/19/2001 16:52'!\\\\nopenAPropertySheet\\\\n\\\\n\\\\tObjectPropertiesMorph basicNew\\\\n\\\\t\\\\ttargetMorph: self;\\\\n\\\\t\\\\tinitialize;\\\\n\\\\t\\\\topenNearTarget! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'RAA 3/15/2001 12:56'!\\\\nopenATextPropertySheet\\\\n\\\\n\\\\t\\\\\\\"should only be sent to morphs that are actually supportive\\\\\\\"\\\\n\\\\n\\\\tTextPropertiesMorph basicNew\\\\n\\\\t\\\\ttargetMorph: self;\\\\n\\\\t\\\\tinitialize;\\\\n\\\\t\\\\topenNearTarget! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'wiz 1/2/2005 01:06'!\\\\npotentialEmbeddingTargets\\\\n\\\\t\\\\\\\"Return the potential targets for embedding the receiver\\\\\\\"\\\\n\\\\n\\\\t| oneUp topRend |\\\\n\\\\t(oneUp _ (topRend _ self topRendererOrSelf) owner) ifNil:[^#()].\\\\n\\\\t^ (oneUp morphsAt: topRend referencePosition behind: topRend unlocked: true) select:\\\\n\\\\t\\\\t[:m | m  isFlexMorph not]! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'wiz 7/17/2004 22:17'!\\\\npotentialTargets\\\\n\\\\t\\\\\\\"Return the potential targets for the receiver.\\\\n\\\\tThis is derived from Morph>>potentialEmbeddingTargets.\\\\\\\"\\\\n\\\\towner ifNil:[^#()].\\\\n\\\\t^owner morphsAt: self referencePosition behind: self unlocked: true not! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'wiz 7/20/2004 02:46'!\\\\npotentialTargetsAt: aPoint \\\\n\\\\t\\\\\\\"Return the potential targets for the receiver.  \\\\n\\\\tThis is derived from Morph>>potentialEmbeddingTargets.\\\\\\\"\\\\n\\\\towner\\\\n\\\\t\\\\tifNil: [^ #()].\\\\n\\\\t^ owner\\\\n\\\\t\\\\tmorphsAt: aPoint\\\\n\\\\t\\\\t! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'sw 11/27/2001 14:59'!\\\\nresizeFromMenu\\\\n\\\\t\\\\\\\"Commence an interaction that will resize the receiver\\\\\\\"\\\\n\\\\n\\\\tself resizeMorph: ActiveEvent! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'st 9/14/2004 12:30'!\\\\nresizeMorph: evt\\\\n\\\\t| handle |\\\\n\\\\thandle _ HandleMorph new forEachPointDo: [:newPoint | \\\\n\\\\t\\\\tself extent: (self griddedPoint: newPoint) - self bounds topLeft].\\\\n\\\\tevt hand attachMorph: handle.\\\\n\\\\thandle startStepping.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 10/5/2000 16:50'!\\\\nsaveAsPrototype\\\\n\\\\t(SelectionMenu confirm: 'Make this morph the prototype for ', self class printString, '?')\\\\n\\\\t\\\\tifFalse: [^ self].\\\\n\\\\tself class prototype: self.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 9/27/2005 20:29'!\\\\nshowActions\\\\n\\\\t\\\\\\\"Put up a message list browser of all the code that this morph  \\\\n\\\\twould run for mouseUp, mouseDown, mouseMove, mouseEnter,  \\\\n\\\\tmouseLeave, and  \\\\n\\\\tmouseLinger. tk 9/13/97\\\\\\\"\\\\n\\\\t| list cls selector adder |\\\\n\\\\tlist := SortedCollection new.\\\\n\\\\tadder := [:mrClass :mrSel | list\\\\n\\\\t\\\\t\\\\t\\\\tadd: (MethodReference new setStandardClass: mrClass methodSymbol: mrSel)].\\\\n\\\\t\\\\\\\"the eventHandler\\\\\\\"\\\\n\\\\tself eventHandler\\\\n\\\\t\\\\tifNotNil: [list := self eventHandler methodRefList.\\\\n\\\\t\\\\t\\\\t(self eventHandler handlesMouseDown: nil)\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [adder value: HandMorph value: #grabMorph:]].\\\\n\\\\t\\\\\\\"If not those, then non-default raw events\\\\\\\"\\\\n\\\\t#(#keyStroke: #mouseDown: #mouseEnter: #mouseLeave: #mouseMove: #mouseUp: #doButtonAction )\\\\n\\\\t\\\\tdo: [:sel | \\\\n\\\\t\\\\t\\\\tcls := self class whichClassIncludesSelector: sel.\\\\n\\\\t\\\\t\\\\tcls\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil: [\\\\\\\"want more than default behavior\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcls == Morph\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [adder value: cls value: sel]]].\\\\n\\\\t\\\\\\\"The mechanism on a Button\\\\\\\"\\\\n\\\\t(self respondsTo: #actionSelector)\\\\n\\\\t\\\\tifTrue: [\\\\\\\"A button\\\\\\\"\\\\n\\\\t\\\\t\\\\tselector := self actionSelector.\\\\n\\\\t\\\\t\\\\tcls := self target class whichClassIncludesSelector: selector.\\\\n\\\\t\\\\t\\\\tcls\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil: [\\\\\\\"want more than default behavior\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcls == Morph\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [adder value: cls value: selector]]].\\\\n\\\\tToolSet openMessageList: list name: 'Actions of ' , self printString autoSelect: false! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 10/5/2000 19:21'!\\\\nshowHiders\\\\n\\\\tself allMorphsDo:[:m | m show]! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'wiz 7/13/2006 22:09'!\\\\nsightTargets: event \\\\n\\\\t\\\\\\\"Return the potential targets for the receiver.  \\\\n\\\\tThis is derived from Morph>>potentialEmbeddingTargets.\\\\\\\"\\\\n\\\\t| bullseye |\\\\n\\\\towner\\\\n\\\\t\\\\tifNil: [^ #()].\\\\n\\\\tbullseye := Point fromUserWithCursor: Cursor target.\\\\n\\\\tself targetFromMenu: (self potentialTargetsAt: bullseye) asKnownNameMenu popupAt: bullseye! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'wiz 7/13/2006 22:10'!\\\\nsightWorldTargets: event \\\\n\\\\t\\\\\\\"Return the potential targets for the receiver.  \\\\n\\\\tThis is derived from Morph>>potentialEmbeddingTargets.\\\\\\\"\\\\n\\\\t| bullseye myWorld |\\\\n\\\\tmyWorld := self world\\\\n\\\\t\\\\tifNil: [^ #()].\\\\n\\\\tbullseye := Point fromUserWithCursor: Cursor target.\\\\n\\\\tself targetFromMenu: ( myWorld morphsAt: bullseye) asKnownNameMenu popupAt: bullseye! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'ar 10/5/2000 16:50'!\\\\nsubclassMorph\\\\n\\\\t\\\\\\\"Create a new subclass of this morph's class and make this morph be an instance of it.\\\\\\\"\\\\n\\\\n\\\\t| oldClass newClassName newClass newMorph |\\\\n\\\\toldClass _ self class.\\\\n\\\\tnewClassName _ FillInTheBlank\\\\n\\\\t\\\\trequest: 'Please give this new class a name'\\\\n\\\\t\\\\tinitialAnswer: oldClass name.\\\\n\\\\tnewClassName = '' ifTrue: [^ self].\\\\n\\\\t(Smalltalk includesKey: newClassName)\\\\n\\\\t\\\\tifTrue: [^ self inform: 'Sorry, there is already a class of that name'].\\\\n\\\\n\\\\tnewClass _ oldClass subclass: newClassName asSymbol\\\\n\\\\t\\\\tinstanceVariableNames: ''\\\\n\\\\t\\\\tclassVariableNames: ''\\\\n\\\\t\\\\tpoolDictionaries: ''\\\\n\\\\t\\\\tcategory: oldClass category asString.\\\\n\\\\tnewMorph _ self as: newClass.\\\\n\\\\tself become: newMorph.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'wiz 7/20/2004 01:25'!\\\\ntargetFromMenu: aMenu \\\\n\\\\t\\\\\\\"Some other morph become target of the receiver\\\\\\\"\\\\n\\\\t| newTarget |\\\\n\\\\t\\\\n\\\\tnewTarget := aMenu startUpWithCaption: self externalName , ' targets...'.\\\\n\\\\tnewTarget\\\\n\\\\t\\\\tifNil: [^ self].\\\\n\\\\tself target: newTarget! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'wiz 7/20/2004 12:22'!\\\\ntargetFromMenu: aMenu popupAt: aPoint \\\\n\\\\t\\\\\\\"Some other morph become target of the receiver\\\\\\\"\\\\n\\\\t| newTarget |\\\\n\\\\tnewTarget := aMenu startUpWithCaption: self externalName , ' targets... '\\\\n\\\\tat: aPoint .\\\\n\\\\t\\\\\\\"self halt .\\\\\\\"\\\\n\\\\tnewTarget\\\\n\\\\t\\\\tifNil: [^ self].\\\\n\\\\tself target: newTarget! !\\\\n\\\\n!Morph methodsFor: 'meta-actions' stamp: 'wiz 7/17/2004 23:27'!\\\\ntargetWith: evt\\\\n\\\\t\\\\\\\"Some other morph become target of the receiver\\\\\\\"\\\\n\\\\t|  menu newTarget |\\\\n\\\\tmenu _ CustomMenu new.\\\\n\\\\tself potentialTargets  do: [:m | \\\\n\\\\t\\\\tmenu add: (m knownName ifNil:[m class name asString]) action: m].\\\\n\\\\tnewTarget _ menu startUpWithCaption: ( self externalName, ' targets...').\\\\n\\\\tnewTarget ifNil:[^self].\\\\n\\\\tself target: newTarget.! !\\\\n\\\\n\\\\n!Morph methodsFor: 'miscellaneous' stamp: 'dgd 9/27/2004 12:12'!\\\\nroundUpStrays\\\\n\\\\tself submorphs\\\\n\\\\t\\\\tdo: [:each | each roundUpStrays]! !\\\\n\\\\n!Morph methodsFor: 'miscellaneous' stamp: 'sw 7/20/2001 00:15'!\\\\nsetExtentFromHalo: anExtent\\\\n\\\\t\\\\\\\"The user has dragged the grow box such that the receiver's extent would be anExtent.  Do what's needed\\\\\\\"\\\\n\\\\n\\\\tself extent: anExtent! !\\\\n\\\\n!Morph methodsFor: 'miscellaneous' stamp: 'sw 2/2/2006 00:43'!\\\\nsetFlexExtentFromHalo: anExtent\\\\n\\\\t\\\\\\\"The user has dragged the grow box such that the receiver's extent would be anExtent.  Do what's needed.  Set the extent of the top renderer as indicated.\\\\\\\"\\\\n\\\\n\\\\tself addFlexShellIfNecessary.\\\\n\\\\tself topRendererOrSelf extent: anExtent! !\\\\n\\\\n\\\\n!Morph methodsFor: 'naming' stamp: 'fc 4/27/2004 21:58'!\\\\nchoosePartName\\\\n\\\\t\\\\\\\"Pick an unused name for this morph.\\\\\\\"\\\\n\\\\t| className |\\\\n\\\\tself world ifNil: [^nil].\\\\n\\\\t(self world model isKindOf: Component) ifTrue:\\\\n\\\\t\\\\t[self knownName ifNil: [^ self nameMeIn: self world]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifNotNil: [^ self renameMe]].\\\\n\\\\tclassName _ self class name.\\\\n\\\\t(className size > 5 and: [className endsWith: 'Morph'])\\\\n\\\\t\\\\tifTrue: [className _ className copyFrom: 1 to: className size - 5].\\\\n\\\\t^ self world model addPartNameLike: className withValue: self! !\\\\n\\\\n!Morph methodsFor: 'naming' stamp: 'sw 10/31/2000 09:28'!\\\\ndownshiftedNameOfObjectRepresented\\\\n\\\\t\\\\\\\"Answer the downshiped version of the external name of the object represented\\\\\\\"\\\\n\\\\n\\\\t^ self nameOfObjectRepresented asLowercase! !\\\\n\\\\n!Morph methodsFor: 'naming' stamp: 'dgd 8/30/2003 15:52'!\\\\ninnocuousName\\\\n\\\\t\\\\\\\"Choose an innocuous name for the receiver -- one that does not end in the word Morph\\\\\\\"\\\\n\\\\n\\\\t| className allKnownNames |\\\\n\\\\tclassName _ self defaultNameStemForInstances.\\\\n\\\\t(className size > 5 and: [className endsWith: 'Morph'])\\\\n\\\\t\\\\tifTrue: [className _ className copyFrom: 1 to: className size - 5].\\\\n\\\\tclassName _ className asString translated.\\\\n\\\\tallKnownNames _ self world ifNil: [OrderedCollection new] ifNotNil: [self world allKnownNames].\\\\n\\\\t^ Utilities keyLike: className asString satisfying:\\\\n\\\\t\\\\t[:aName | (allKnownNames includes: aName) not]! !\\\\n\\\\n!Morph methodsFor: 'naming' stamp: 'sw 9/21/2000 13:18'!\\\\nnameForFindWindowFeature\\\\n\\\\t\\\\\\\"Answer the name to show in a list of windows-and-morphs to represent the receiver\\\\\\\"\\\\n\\\\n\\\\t^ self knownName ifNil: [self class name]! !\\\\n\\\\n!Morph methodsFor: 'naming' stamp: 'dgd 2/22/2003 14:33'!\\\\nnameInModel\\\\n\\\\t\\\\\\\"Return the name for this morph in the underlying model or nil.\\\\\\\"\\\\n\\\\n\\\\t| w |\\\\n\\\\tw := self world.\\\\n\\\\tw isNil ifTrue: [^nil] ifFalse: [^w model nameFor: self]! !\\\\n\\\\n!Morph methodsFor: 'naming' stamp: 'sw 10/31/2000 09:24'!\\\\nnameOfObjectRepresented\\\\n\\\\t\\\\\\\"Answer the external name of the object represented\\\\\\\"\\\\n\\\\n\\\\t^ self externalName! !\\\\n\\\\n!Morph methodsFor: 'naming' stamp: 'gm 2/22/2003 13:16'!\\\\nname: aName \\\\n\\\\t(aName isString) ifTrue: [self setNameTo: aName]! !\\\\n\\\\n!Morph methodsFor: 'naming' stamp: 'dgd 2/16/2003 21:57'!\\\\nsetNamePropertyTo: aName \\\\n\\\\t\\\\\\\"change the receiver's externalName\\\\\\\"\\\\n\\\\tself assureExtension externalName: aName! !\\\\n\\\\n!Morph methodsFor: 'naming' stamp: 'yo 12/3/2004 17:02'!\\\\nsetNameTo: aName \\\\n\\\\t| nameToUse nameString |\\\\n\\\\tnameToUse := aName ifNotNil: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[(nameString := aName asString) notEmpty ifTrue: [nameString] ifFalse: ['*']].\\\\n\\\\tself setNamePropertyTo: nameToUse\\\\t\\\\\\\"no Texts here!!\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'naming' stamp: 'gm 2/22/2003 13:16'!\\\\nspecialNameInModel\\\\n\\\\t\\\\\\\"Return the name for this morph in the underlying model or nil.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Not an easy problem.  For now, take the first part of the mouseDownSelector symbol in my eventHandler (fillBrushMouseUp:morph: gives 'fillBrush').  5/26/97 tk\\\\\\\"\\\\n\\\\n\\\\t| hh |\\\\n\\\\t(self isMorphicModel) \\\\n\\\\t\\\\tifTrue: [^self slotName]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[self eventHandler ifNotNil: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self eventHandler mouseDownSelector ifNotNil: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[hh := self eventHandler mouseDownSelector indexOfSubCollection: 'Mouse'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\thh > 0 \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [^self eventHandler mouseDownSelector copyFrom: 1 to: hh - 1]].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself eventHandler mouseUpSelector ifNotNil: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[hh := self eventHandler mouseUpSelector indexOfSubCollection: 'Mouse'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\thh > 0 ifTrue: [^self eventHandler mouseUpSelector copyFrom: 1 to: hh - 1]]]].\\\\n\\\\n\\\\t\\\\\\\"\\\\t(self eventHandler mouseDownRecipient respondsTo: #nameFor:) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ self eventHandler mouseDownRecipient nameFor: self]]].\\\\t\\\\\\\"\\\\n\\\\t\\\\\\\"myModel _ self findA: MorphicModel.\\\\n\\\\t\\\\t\\\\tmyModel ifNotNil: [^ myModel slotName]\\\\\\\"\\\\n\\\\t^self world specialNameInModelFor: self! !\\\\n\\\\n!Morph methodsFor: 'naming' stamp: 'sw 10/27/2000 17:47'!\\\\ntryToRenameTo: aName\\\\n\\\\t\\\\\\\"A new name has been submited; make sure it's appropriate, and react accordingly.  This circumlocution provides the hook by which the simple renaming of a field can result in a change to variable names in a stack, etc.  There are some problems to worry about here.\\\\\\\"\\\\n\\\\n\\\\t| aStack |\\\\n\\\\t(self holdsSeparateDataForEachInstance and: [(aStack _ self stack) notNil])\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self topRendererOrSelf setNameTo: aName.\\\\n\\\\t\\\\t\\\\taStack reassessBackgroundShape]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self renameTo: aName]! !\\\\n\\\\n!Morph methodsFor: 'naming' stamp: 'sw 1/29/2001 02:49'!\\\\nupdateAllScriptingElements\\\\n\\\\t\\\\\\\"A sledge-hammer sweep from the world down to make sure that all live scripting elements are up to date.  Presently in eclipse, not sent at the moment.\\\\\\\"\\\\n\\\\n\\\\t| aPasteUp |\\\\n\\\\t(aPasteUp _ self topPasteUp) ifNotNil:\\\\n\\\\t\\\\t[aPasteUp allTileScriptingElements do: [:m | m bringUpToDate]]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'objects from disk' stamp: 'tk 11/26/2004 06:02'!\\\\nconvertToCurrentVersion: varDict refStream: smartRefStrm\\\\n\\\\n\\\\n\\\\n\\\\t(varDict at: #ClassName) == #DropShadowMorph ifTrue: [\\\\n\\\\n\\\\t\\\\tvarDict at: #ClassName put: #Morph.\\\\t\\\\\\\"so we don't\\\\n\\\\nrepeat this\\\\\\\"\\\\n\\\\n\\\\t\\\\t^ self convertNovember2000DropShadow: varDict using:\\\\n\\\\nsmartRefStrm\\\\n\\\\n\\\\t\\\\t\\\\t\\\\\\\"always returns a new object of a different class\\\\\\\"\\\\n\\\\n\\\\t].\\\\n\\\\n\\\\tvarDict at: 'costumee' ifPresent: [ :x |\\\\n\\\\n\\\\t\\\\tself convertAugust1998: varDict using: smartRefStrm].\\\\n\\\\n\\\\t\\\\t\\\\\\\"never returns a different object\\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\t\\\\\\\"5/18/2000\\\\\\\"\\\\n\\\\n\\\\tvarDict at: 'openToDragNDrop' ifPresent: [ :x | self\\\\n\\\\nenableDragNDrop: x ].\\\\n\\\\n\\\\t^super convertToCurrentVersion: varDict refStream: smartRefStrm.\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'objects from disk' stamp: 'dgd 2/22/2003 14:33'!\\\\nobjectForDataStream: refStrm \\\\n\\\\t\\\\\\\"I am being written out on an object file\\\\\\\"\\\\n\\\\n\\\\t| dp |\\\\n\\\\tself sqkPage ifNotNil: \\\\n\\\\t\\\\t\\\\t[refStrm rootObject == self | (refStrm rootObject == self sqkPage) \\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self url notEmpty \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[dp := self sqkPage copyForSaving.\\\\t\\\\\\\"be careful touching this object!!\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trefStrm replace: self with: dp.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^dp]]].\\\\n\\\\tself prepareToBeSaved.\\\\t\\\\\\\"Amen\\\\\\\"\\\\n\\\\t^self! !\\\\n\\\\n!Morph methodsFor: 'objects from disk' stamp: 'tk 7/11/1998 18:53'!\\\\nstoreDataOn: aDataStream\\\\n\\\\t\\\\\\\"Let all Morphs be written out.  All owners are weak references.  They only go out if the owner is in the tree being written.\\\\\\\"\\\\n\\\\t| cntInstVars cntIndexedVars ti localInstVars |\\\\n\\\\n\\\\t\\\\\\\"block my owner unless he is written out by someone else\\\\\\\"\\\\n\\\\tcntInstVars _ self class instSize.\\\\n\\\\tcntIndexedVars _ self basicSize.\\\\n\\\\tlocalInstVars _ Morph instVarNames.\\\\n\\\\tti _ 2.  \\\\n\\\\t((localInstVars at: ti) = 'owner') & (Morph superclass == Object) ifFalse:\\\\n\\\\t\\\\t\\\\t[self error: 'this method is out of date'].\\\\n\\\\taDataStream\\\\n\\\\t\\\\tbeginInstance: self class\\\\n\\\\t\\\\tsize: cntInstVars + cntIndexedVars.\\\\n\\\\t1 to: ti-1 do:\\\\n\\\\t\\\\t[:i | aDataStream nextPut: (self instVarAt: i)].\\\\n\\\\taDataStream nextPutWeak: owner.\\\\t\\\\\\\"owner only written if in our tree\\\\\\\"\\\\n\\\\tti+1 to: cntInstVars do:\\\\n\\\\t\\\\t[:i | aDataStream nextPut: (self instVarAt: i)].\\\\n\\\\t1 to: cntIndexedVars do:\\\\n\\\\t\\\\t[:i | aDataStream nextPut: (self basicAt: i)]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'other events' stamp: 'sw 8/1/2001 14:08'!\\\\nmenuButtonMouseEnter: event\\\\n\\\\t\\\\\\\"The mouse entered a menu-button area; show the menu cursor temporarily\\\\\\\"\\\\n\\\\n\\\\tevent hand showTemporaryCursor: Cursor menu! !\\\\n\\\\n!Morph methodsFor: 'other events' stamp: 'sw 8/1/2001 14:09'!\\\\nmenuButtonMouseLeave: event\\\\n\\\\t\\\\\\\"The mouse left a menu-button area; restore standard cursor\\\\\\\"\\\\n\\\\n\\\\tevent hand showTemporaryCursor: nil! !\\\\n\\\\n\\\\n!Morph methodsFor: 'parts bin' stamp: 'sw 8/12/2001 02:07'!\\\\ninitializeToStandAlone\\\\n\\\\t\\\\\\\"Set up the receiver, created by a #basicNew and now ready to be initialized, as a fully-formed morph suitable for providing a graphic for a parts bin surrogate, and, when such a parts-bin surrogate is clicked on, for attaching to the hand as a viable stand-alone morph.  Because of historical precedent, #initialize has been expected to handle this burden, though a great number of morphs actually cannot stand alone.  In any case, by default we call the historical #initialize, though unhappily, so that all existing morphs will work no worse than before when using this protocol.\\\\\\\"\\\\n\\\\n\\\\tself initialize! !\\\\n\\\\n!Morph methodsFor: 'parts bin' stamp: 'di 11/13/2000 00:49'!\\\\ninPartsBin\\\\n\\\\n\\\\tself isPartsDonor ifTrue: [^ true].\\\\n\\\\tself allOwnersDo: [:m | m isPartsBin ifTrue: [^ true]].\\\\n\\\\t^ false\\\\n! !\\\\n\\\\n!Morph methodsFor: 'parts bin' stamp: 'sw 8/12/97 14:16'!\\\\nisPartsBin\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'parts bin' stamp: 'md 2/27/2006 09:53'!\\\\nisPartsDonor\\\\n\\\\t\\\\\\\"answer whether the receiver is PartsDonor\\\\\\\"\\\\n\\\\textension ifNil: [^ false].\\\\n\\\\t^ extension isPartsDonor! !\\\\n\\\\n!Morph methodsFor: 'parts bin' stamp: 'md 2/27/2006 09:59'!\\\\nisPartsDonor: aBoolean \\\\n\\\\t\\\\\\\"change the receiver's isPartDonor property\\\\\\\"\\\\n\\\\t(extension isNil and: [aBoolean not]) ifTrue: [^ self].\\\\n\\\\tself assureExtension isPartsDonor: aBoolean! !\\\\n\\\\n!Morph methodsFor: 'parts bin' stamp: 'di 8/11/1998 13:02'!\\\\nmarkAsPartsDonor\\\\n\\\\t\\\\\\\"Mark the receiver specially so that mouse actions on it are interpreted as 'tearing off a copy'\\\\\\\"\\\\n\\\\n\\\\tself isPartsDonor: true! !\\\\n\\\\n!Morph methodsFor: 'parts bin' stamp: 'ar 10/6/2000 22:45'!\\\\npartRepresented\\\\n\\\\t^self! !\\\\n\\\\n!Morph methodsFor: 'parts bin' stamp: 'sw 4/22/1998 14:45'!\\\\nresidesInPartsBin\\\\n\\\\t\\\\\\\"Answer true if the receiver is, or has some ancestor owner who is, a parts bin\\\\\\\"\\\\n\\\\t^ owner ifNotNil: [owner residesInPartsBin] ifNil: [false]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'pen' stamp: 'sw 8/11/1998 16:46'!\\\\nchoosePenColor: evt\\\\n\\\\tself assuredPlayer choosePenColor: evt! !\\\\n\\\\n!Morph methodsFor: 'pen' stamp: 'sw 8/11/1998 16:46'!\\\\nchoosePenSize\\\\n\\\\tself assuredPlayer choosePenSize! !\\\\n\\\\n!Morph methodsFor: 'pen' stamp: 'sw 8/11/1998 16:53'!\\\\ngetPenColor\\\\n\\\\t^ self player ifNotNil: [self actorState getPenColor] ifNil: [Color green]! !\\\\n\\\\n!Morph methodsFor: 'pen' stamp: 'sw 8/11/1998 16:53'!\\\\ngetPenDown\\\\n\\\\tself player ifNil: [^ false].\\\\n\\\\t^ self actorState getPenDown! !\\\\n\\\\n!Morph methodsFor: 'pen' stamp: 'sw 8/11/1998 16:53'!\\\\ngetPenSize\\\\n\\\\tself player ifNil: [^ 1].\\\\n\\\\t^ self actorState getPenSize! !\\\\n\\\\n!Morph methodsFor: 'pen' stamp: 'sw 8/11/1998 16:46'!\\\\nliftPen\\\\n\\\\tself assuredPlayer liftPen! !\\\\n\\\\n!Morph methodsFor: 'pen' stamp: 'sw 8/11/1998 16:46'!\\\\nlowerPen\\\\n\\\\tself assuredPlayer lowerPen! !\\\\n\\\\n!Morph methodsFor: 'pen' stamp: 'sw 8/11/1998 16:46'!\\\\npenColor: aColor\\\\n\\\\tself assuredPlayer penColor: aColor! !\\\\n\\\\n!Morph methodsFor: 'pen' stamp: 'di 9/3/1998 10:38'!\\\\npenUpWhile: changeBlock \\\\n\\\\t\\\\\\\"Suppress any possible pen trail during the execution of changeBlock\\\\\\\"\\\\n\\\\tself getPenDown\\\\n\\\\t\\\\tifTrue: [\\\\\\\"If this is a costume for a player with its pen down, suppress any line.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tself liftPen.\\\\n\\\\t\\\\t\\\\t\\\\tchangeBlock value.\\\\n\\\\t\\\\t\\\\t\\\\tself lowerPen]\\\\n\\\\t\\\\tifFalse: [\\\\\\\"But usually, just do it.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tchangeBlock value]! !\\\\n\\\\n!Morph methodsFor: 'pen' stamp: 'dgd 2/22/2003 14:36'!\\\\ntrailMorph\\\\n\\\\t\\\\\\\"You can't draw trails on me, but try my owner.\\\\\\\"\\\\n\\\\n\\\\towner isNil ifTrue: [^nil].\\\\n\\\\t^owner trailMorph! !\\\\n\\\\n\\\\n!Morph methodsFor: 'printing' stamp: 'bf 7/17/2003 12:53'!\\\\nclipText\\\\n\\\\t\\\\\\\"Copy the text in the receiver or in its submorphs to the clipboard\\\\\\\"\\\\n\\\\t| content |\\\\n\\\\t\\\\\\\"My own text\\\\\\\"\\\\n\\\\tcontent _ self userString.\\\\n\\\\t\\\\\\\"Or in my submorphs\\\\\\\"\\\\n\\\\tcontent ifNil: [\\\\n\\\\t\\\\t| list |\\\\n\\\\t\\\\tlist _ self allStringsAfter: nil.\\\\n\\\\t\\\\tlist notEmpty ifTrue: [\\\\n\\\\t\\\\t\\\\tcontent _ String streamContents: [:stream |\\\\n\\\\t\\\\t\\\\t\\\\tlist do: [:each | stream nextPutAll: each; cr]]]].\\\\n\\\\t\\\\\\\"Did we find something?\\\\\\\"\\\\n\\\\tcontent\\\\n\\\\t\\\\tifNil: [self flash \\\\\\\"provide feedback\\\\\\\"]\\\\n\\\\t\\\\tifNotNil: [Clipboard clipboardText: content].! !\\\\n\\\\n!Morph methodsFor: 'printing' stamp: 'dgd 2/22/2003 14:27'!\\\\ncolorString: aColor \\\\n\\\\taColor isNil ifTrue: [^'nil'].\\\\n\\\\tColor colorNames \\\\n\\\\t\\\\tdo: [:colorName | aColor = (Color perform: colorName) ifTrue: [^'Color ' , colorName]].\\\\n\\\\t^aColor storeString! !\\\\n\\\\n!Morph methodsFor: 'printing'!\\\\nconstructorString\\\\n\\\\n\\\\t^ String streamContents: [:s | self printConstructorOn: s indent: 0].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'printing'!\\\\nfullPrintOn: aStream\\\\n\\\\n\\\\taStream nextPutAll: self class name , ' newBounds: (';\\\\n\\\\t\\\\tprint: bounds;\\\\n\\\\t\\\\tnextPutAll: ') color: ' , (self colorString: color)! !\\\\n\\\\n!Morph methodsFor: 'printing'!\\\\ninitString\\\\n\\\\n\\\\t^ String streamContents: [:s | self fullPrintOn: s]! !\\\\n\\\\n!Morph methodsFor: 'printing' stamp: 'RAA 2/26/2001 07:22'!\\\\nmorphReport\\\\n\\\\n\\\\t^self morphReportFor: #(hResizing vResizing bounds)! !\\\\n\\\\n!Morph methodsFor: 'printing' stamp: 'RAA 2/25/2001 17:47'!\\\\nmorphReportFor: attributeList\\\\n\\\\n\\\\t| s |\\\\n\\\\n\\\\ts _ WriteStream on: String new.\\\\n\\\\tself\\\\n\\\\t\\\\tmorphReportFor: attributeList \\\\n\\\\t\\\\ton: s \\\\n\\\\t\\\\tindent: 0.\\\\n\\\\tStringHolder new contents: s contents; openLabel: 'morph report'! !\\\\n\\\\n!Morph methodsFor: 'printing' stamp: 'RAA 2/25/2001 17:48'!\\\\nmorphReportFor: attributeList on: aStream indent: anInteger\\\\n\\\\n\\\\tanInteger timesRepeat: [aStream tab].\\\\n\\\\taStream print: self; space.\\\\n\\\\tattributeList do: [ :a | aStream print: (self perform: a); space].\\\\n\\\\taStream cr.\\\\n\\\\tsubmorphs do: [ :sub |\\\\n\\\\t\\\\tsub morphReportFor: attributeList on: aStream indent: anInteger + 1\\\\n\\\\t].! !\\\\n\\\\n!Morph methodsFor: 'printing' stamp: 'RAA 2/1/2001 17:42'!\\\\npagesHandledAutomatically\\\\n\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'printing'!\\\\nprintConstructorOn: aStream indent: level\\\\n\\\\n\\\\t^ self printConstructorOn: aStream indent: level nodeDict: IdentityDictionary new\\\\n! !\\\\n\\\\n!Morph methodsFor: 'printing'!\\\\nprintConstructorOn: aStream indent: level nodeDict: nodeDict\\\\n\\\\t| nodeString |\\\\n\\\\t(nodeString _ nodeDict at: self ifAbsent: [nil])\\\\n\\\\t\\\\tifNotNil: [^ aStream nextPutAll: nodeString].\\\\n\\\\tsubmorphs isEmpty ifFalse: [aStream nextPutAll: '('].\\\\n\\\\taStream nextPutAll: '('.\\\\n\\\\tself fullPrintOn: aStream.\\\\n\\\\taStream nextPutAll: ')'.\\\\n\\\\tsubmorphs isEmpty ifTrue: [^ self].\\\\n\\\\tsubmorphs size <= 4\\\\n\\\\tifTrue:\\\\n\\\\t\\\\t[aStream crtab: level+1;\\\\n\\\\t\\\\t\\\\tnextPutAll: 'addAllMorphs: (Array'.\\\\n\\\\t\\\\t1 to: submorphs size do:\\\\n\\\\t\\\\t\\\\t[:i | aStream crtab: level+1; nextPutAll: 'with: '.\\\\n\\\\t\\\\t\\\\t(submorphs at: i) printConstructorOn: aStream indent: level+1 nodeDict: nodeDict].\\\\n\\\\t\\\\taStream nextPutAll: '))']\\\\n\\\\tifFalse:\\\\n\\\\t\\\\t[aStream crtab: level+1;\\\\n\\\\t\\\\t\\\\tnextPutAll: 'addAllMorphs: ((Array new: ', submorphs size printString, ')'.\\\\n\\\\t\\\\t1 to: submorphs size do:\\\\n\\\\t\\\\t\\\\t[:i |\\\\n\\\\t\\\\t\\\\taStream crtab: level+1; nextPutAll: 'at: ', i printString, ' put: '.\\\\n\\\\t\\\\t\\\\t(submorphs at: i) printConstructorOn: aStream indent: level+1 nodeDict: nodeDict.\\\\n\\\\t\\\\t\\\\taStream nextPutAll: ';'].\\\\n\\\\t\\\\taStream crtab: level+1; nextPutAll: 'yourself))']! !\\\\n\\\\n!Morph methodsFor: 'printing' stamp: 'dgd 2/22/2003 19:05'!\\\\nprintOn: aStream \\\\n\\\\t| aName |\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\t(aName := self knownName) notNil \\\\n\\\\t\\\\tifTrue: [aStream nextPutAll: '<' , aName , '>'].\\\\n\\\\taStream nextPutAll: '('.\\\\n\\\\taStream\\\\n\\\\t\\\\tprint: self identityHash;\\\\n\\\\t\\\\tnextPutAll: ')'! !\\\\n\\\\n!Morph methodsFor: 'printing' stamp: 'RAA 9/18/2000 10:22'!\\\\nprintSpecs\\\\n\\\\n\\\\t| printSpecs |\\\\n\\\\n\\\\tprintSpecs _ self valueOfProperty: #PrintSpecifications.\\\\n\\\\tprintSpecs ifNil: [\\\\n\\\\t\\\\tprintSpecs _ PrintSpecifications defaultSpecs.\\\\n\\\\t\\\\tself printSpecs: printSpecs.\\\\n\\\\t].\\\\n\\\\t^printSpecs! !\\\\n\\\\n!Morph methodsFor: 'printing' stamp: 'RAA 9/18/2000 10:21'!\\\\nprintSpecs: aPrintSecification\\\\n\\\\n\\\\tself setProperty: #PrintSpecifications toValue: aPrintSecification.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'printing' stamp: 'jm 5/28/1998 18:00'!\\\\nprintStructureOn: aStream indent: tabCount\\\\n\\\\n\\\\ttabCount timesRepeat: [aStream tab].\\\\n\\\\tself printOn: aStream.\\\\n\\\\taStream cr.\\\\n\\\\tself submorphsDo: [:m | m printStructureOn: aStream indent: tabCount + 1].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'printing' stamp: 'sw 10/27/2000 17:45'!\\\\nreportableSize\\\\n\\\\t\\\\\\\"Answer a size worth reporting as the receiver's size in a list view\\\\\\\"\\\\n\\\\n\\\\t| total |\\\\n\\\\ttotal _ super reportableSize.\\\\n\\\\tsubmorphs do:\\\\n\\\\t\\\\t[:m | total _ total + m reportableSize].\\\\n\\\\t^ total! !\\\\n\\\\n!Morph methodsFor: 'printing' stamp: 'jm 5/28/1998 17:58'!\\\\nstructureString\\\\n\\\\t\\\\\\\"Return a string that showing this morph and all its submorphs in an indented list that reflects its structure.\\\\\\\"\\\\n\\\\n\\\\t| s |\\\\n\\\\ts _ WriteStream on: (String new: 1000).\\\\n\\\\tself printStructureOn: s indent: 0.\\\\n\\\\t^ s contents\\\\n! !\\\\n\\\\n!Morph methodsFor: 'printing' stamp: 'sw 10/27/2000 17:47'!\\\\ntextToPaste\\\\n\\\\t\\\\\\\"If the receiver has text to offer pasting, answer it, else answer nil\\\\\\\"\\\\n\\\\n\\\\t^ nil! !\\\\n\\\\n\\\\n!Morph methodsFor: 'rotate scale and flex' stamp: 'sw 3/30/2005 03:44'!\\\\naddFlexShell\\\\n\\\\t\\\\\\\"Wrap a rotating and scaling shell around this morph.\\\\\\\"\\\\n\\\\n\\\\t| oldHalo flexMorph myWorld anIndex |\\\\n\\\\n\\\\tmyWorld _ self world.\\\\n\\\\toldHalo _ self halo.\\\\n\\\\tanIndex _ self owner submorphIndexOf: self.\\\\n\\\\tself owner addMorph: (flexMorph _ self newTransformationMorph asFlexOf: self)\\\\n\\\\t\\\\tasElementNumber: anIndex.\\\\n\\\\tself transferStateToRenderer: flexMorph.\\\\n\\\\toldHalo ifNotNil: [oldHalo setTarget: flexMorph].\\\\n\\\\tmyWorld ifNotNil: [myWorld startSteppingSubmorphsOf: flexMorph].\\\\n\\\\n\\\\t^ flexMorph! !\\\\n\\\\n!Morph methodsFor: 'rotate scale and flex' stamp: 'di 11/28/2001 18:22'!\\\\naddFlexShellIfNecessary\\\\n\\\\t\\\\\\\"If this morph requires a flex shell to scale or rotate,\\\\n\\\\t\\\\tthen wrap it in one and return it.\\\\n\\\\tPolygons, eg, may override to return themselves.\\\\\\\"\\\\n\\\\n\\\\t^ self addFlexShell! !\\\\n\\\\n!Morph methodsFor: 'rotate scale and flex' stamp: 'ar 11/24/1998 14:19'!\\\\nkeepsTransform\\\\n\\\\t\\\\\\\"Return true if the receiver will keep it's transform while being grabbed by a hand.\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'rotate scale and flex' stamp: 'ar 2/16/1999 18:59'!\\\\nnewTransformationMorph\\\\n\\\\t^TransformationMorph new! !\\\\n\\\\n!Morph methodsFor: 'rotate scale and flex' stamp: 'mu 3/29/2004 17:33'!\\\\nremoveFlexShell\\\\n\\\\tself isFlexed\\\\n\\\\t\\\\tifTrue: [self owner removeFlexShell]! !\\\\n\\\\n!Morph methodsFor: 'rotate scale and flex' stamp: 'jm 4/25/1998 05:19'!\\\\nrotationDegrees\\\\n\\\\t\\\\\\\"Default implementation.\\\\\\\"\\\\n\\\\n\\\\t^ 0.0\\\\n! !\\\\n\\\\n\\\\n!Morph methodsFor: 'rounding' stamp: 'mk 8/7/2005 10:03'!\\\\ncornerStyle: aSymbol\\\\n\\\\t\\\\\\\"This method makes it possible to set up desired corner style. aSymbol has to be one of:\\\\n\\\\t\\\\t#square\\\\n\\\\t\\\\t#rounded\\\\\\\"\\\\n\\\\n\\\\taSymbol == #square\\\\n\\\\t\\\\tifTrue:[self removeProperty: #cornerStyle]\\\\n\\\\t\\\\tifFalse:[self setProperty: #cornerStyle toValue: aSymbol].\\\\n\\\\tself changed! !\\\\n\\\\n!Morph methodsFor: 'rounding' stamp: 'mk 8/14/2005 13:31'!\\\\nroundedCorners\\\\n\\\\t\\\\\\\"Return a list of those corners to round.\\\\n\\\\n\\\\t\\\\t1-4\\\\n\\\\t\\\\t|  |\\\\n\\\\t\\\\t2-3\\\\n\\\\n\\\\tReturned array contains `codes' of those corners, which should be rounded.\\\\n\\\\n\\\\t1 denotes top-left corner\\\\n\\\\t2 denotes bottom-left corner\\\\n\\\\t3 denotes bottom-right corner\\\\n\\\\t4 denotes top-right corner.\\\\n\\\\n\\\\tThus, if this method returned #(2 3) that would mean that bottom (left and right)\\\\n\\\\tcorners would be rounded whereas top (left and right) corners wouldn't be rounded.\\\\n\\\\n\\\\tThis method returns #(1 2 3 4) and that means that all the corners should be rounded.\\\\\\\"\\\\n\\\\n\\\\t^ #(1 2 3 4)! !\\\\n\\\\n!Morph methodsFor: 'rounding' stamp: 'dgd 9/6/2003 18:27'!\\\\nroundedCornersString\\\\n\\\\t\\\\\\\"Answer the string to put in a menu that will invite the user to \\\\n\\\\tswitch to the opposite corner-rounding mode\\\\\\\"\\\\n\\\\t^ (self wantsRoundedCorners\\\\n\\\\t\\\\tifTrue: ['<yes>']\\\\n\\\\t\\\\tifFalse: ['<no>'])\\\\n\\\\t\\\\t, 'round corners' translated! !\\\\n\\\\n!Morph methodsFor: 'rounding' stamp: 'ar 12/25/2001 19:44'!\\\\ntoggleCornerRounding\\\\n\\\\tself cornerStyle == #rounded\\\\n\\\\t\\\\tifTrue: [self cornerStyle: #square]\\\\n\\\\t\\\\tifFalse: [self cornerStyle: #rounded].\\\\n\\\\tself changed! !\\\\n\\\\n!Morph methodsFor: 'rounding' stamp: 'ar 12/22/2001 22:45'!\\\\nwantsRoundedCorners\\\\n\\\\t\\\\\\\"Return true if the receiver wants its corners rounded\\\\\\\"\\\\n\\\\t^ self cornerStyle == #rounded! !\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'dgd 7/4/2004 12:41'!\\\\narrowDeltaFor: aGetSelector \\\\n\\\\t\\\\\\\"Answer a number indicating the default arrow delta to be  \\\\n\\\\tused in a numeric readout with the given get-selector. This is  \\\\n\\\\ta hook that subclasses of Morph can reimplement.\\\\\\\"\\\\n\\\\taGetSelector == #getScaleFactor\\\\n\\\\t\\\\tifTrue: [^ 0.1].\\\\n\\\\t^ 1! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'ar 1/25/2001 12:50'!\\\\nasEmptyPermanentScriptor\\\\n\\\\t\\\\\\\"Answer a new empty permanent scriptor derived from info deftly secreted in the receiver.  Good grief\\\\\\\"\\\\n\\\\n\\\\t| aScriptor aPlayer |\\\\n\\\\taPlayer _ self valueOfProperty: #newPermanentPlayer.\\\\n\\\\taPlayer assureUniClass.\\\\n\\\\taScriptor _  aPlayer newScriptorAround: nil.\\\\n\\\\taScriptor position: (self world primaryHand position - (10 @ 10)).\\\\n\\\\taPlayer updateAllViewersAndForceToShow: #scripts.\\\\n\\\\t^ aScriptor! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'sw 10/17/2001 09:46'!\\\\nbringTileScriptingElementsUpToDate\\\\n\\\\t\\\\\\\"Send #bringUpToDate to every tile-scripting element of the receiver, including possibly the receiver itself\\\\\\\"\\\\n\\\\n\\\\t(self allMorphs select: [:s | s isTileScriptingElement]) do:\\\\n\\\\t\\\\t[:el | el bringUpToDate]! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'RAA 3/9/2001 11:39'!\\\\nbringUpToDate\\\\n\\\\n\\\\t(self buttonProperties ifNil: [^self]) bringUpToDate! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'sw 7/19/2005 01:55'!\\\\ndefaultFloatPrecisionFor: aGetSelector\\\\n\\\\t\\\\\\\"Answer a number indicating the default float precision to be used in a numeric readout for which the receiver provides the data.   Individual morphs can override this.  Showing fractional values for readouts of getCursor was in response to an explicit request from ack\\\\\\\"\\\\n\\\\n\\\\t(self renderedMorph decimalPlacesForGetter: aGetSelector) ifNotNilDo: [:places | ^ (Utilities floatPrecisionForDecimalPlaces: places)].\\\\n\\\\n\\\\t(#(getCursor getNumericValue getNumberAtCursor getCursorWrapped getScaleFactor getUnitVector getAlpha) includes: aGetSelector)\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[^ 0.01].\\\\n\\\\t^ 1! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'sw 8/12/2005 13:26'!\\\\nfilterViewerCategoryDictionary: dict\\\\n\\\\t\\\\\\\"dict has keys of categories and values of priority.\\\\n\\\\tYou can re-order or remove categories here.\\\\\\\"\\\\n\\\\n\\\\tself wantsConnectionVocabulary\\\\n\\\\t\\\\tifFalse: [ dict removeKey: #'connections to me' ifAbsent: [].\\\\n\\\\t\\\\t\\\\tdict removeKey: #connection ifAbsent: []].\\\\n\\\\tself wantsConnectorVocabulary\\\\n\\\\t\\\\tifFalse: [ dict removeKey: #connector ifAbsent: [] ].\\\\n\\\\tself wantsEmbeddingsVocabulary\\\\n\\\\t\\\\tifFalse: [dict removeKey: #embeddings ifAbsent: []].\\\\n\\\\tPreferences eToyFriendly\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[dict removeKey: #layout ifAbsent: []].\\\\n\\\\t(Preferences eToyFriendly or: [self isWorldMorph not]) ifTrue:\\\\n\\\\t\\\\t[dict removeKey: #preferences ifAbsent: []].! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'tk 10/1/97 18:23'!\\\\nisTileLike\\\\n\\\\t\\\\\\\"Cannot be dropped into a script\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'RAA 3/9/2001 11:47'!\\\\nisTileScriptingElement\\\\n\\\\n\\\\t^ self hasButtonProperties and: [self buttonProperties isTileScriptingElement]! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'sw 8/11/1998 16:53'!\\\\njettisonScripts\\\\n\\\\tself player ifNotNil: [self player class jettisonScripts]! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'LC 9/28/1999 21:57'!\\\\nmakeAllTilesColored\\\\n\\\\tself allMorphsDo: \\\\n\\\\t\\\\t[:m | m restoreTypeColor]! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'LC 9/28/1999 21:57'!\\\\nmakeAllTilesGreen\\\\n\\\\tself allMorphsDo: \\\\n\\\\t\\\\t[:m | m useUniformTileColor]! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'sw 8/11/1998 16:59'!\\\\nrestoreTypeColor\\\\n\\\\tself player ifNotNil: [self player allScriptEditors do:\\\\n\\\\t\\\\t[:anEditor | anEditor allMorphsDo:\\\\n\\\\t\\\\t\\\\t[:m | m restoreTypeColor]]]! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'sw 8/11/1998 16:46'!\\\\nscriptEditorFor: aScriptName\\\\n\\\\t^ self assuredPlayer scriptEditorFor: aScriptName! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'sw 7/5/2005 00:31'!\\\\ntearOffTile\\\\n\\\\t\\\\\\\"Tear off a tile representing the player associated with the receiver.  This is obtained from the top renderer\\\\\\\"\\\\n\\\\n\\\\t^ self topRendererOrSelf assuredPlayer tearOffTileForSelf! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'nk 8/21/2004 12:17'!\\\\ntriggerScript: aSymbol\\\\n\\\\t\\\\\\\"Have my player perform the script of the given name, which is guaranteed to exist.\\\\\\\"\\\\n\\\\n\\\\t^self assuredPlayer triggerScript: aSymbol! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'sw 8/11/1998 16:55'!\\\\nuseUniformTileColor\\\\n\\\\tself player ifNotNil:\\\\n\\\\t\\\\t[self player allScriptEditors do:\\\\n\\\\t\\\\t\\\\t[:anEditor | anEditor allMorphsDo:\\\\n\\\\t\\\\t\\\\t\\\\t[:m | m useUniformTileColor]]]! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'sw 10/18/2000 10:32'!\\\\nviewAfreshIn: aPasteUp showingScript: aScriptName at: aPosition\\\\n\\\\t\\\\\\\"Obtain a smartly updated ScriptEditor for the given script name and zap it into place at aPosition\\\\\\\"\\\\n\\\\n\\\\t| anEditor |\\\\n\\\\tself player updateAllViewersAndForceToShow: #scripts.\\\\n\\\\tanEditor _ self player scriptEditorFor: aScriptName.\\\\n\\\\taPasteUp ifNotNil: [aPasteUp addMorph: anEditor].\\\\n\\\\tanEditor position: aPosition.\\\\n\\\\tanEditor currentWorld startSteppingSubmorphsOf: anEditor! !\\\\n\\\\n!Morph methodsFor: 'scripting' stamp: 'nk 8/21/2004 08:39'!\\\\nwantsConnectionVocabulary\\\\n\\\\tsubmorphs ifNil: [ ^true ].\\\\t\\\\\\\"called from EToyVocabulary>>initialize after basicNew\\\\\\\"\\\\n\\\\n\\\\t^ (Preferences valueOfFlag: #alwaysShowConnectionVocabulary)\\\\n\\\\t\\\\tor: [ self connections isEmpty not ]! !\\\\n\\\\n\\\\n\\\\n!Morph methodsFor: 'stepping and presenter' stamp: 'sw 3/22/2000 14:27'!\\\\narrangeToStartStepping\\\\n\\\\t\\\\\\\"Arrange to start getting sent the 'step' message, but don't do that initial #step call that startStepping does\\\\\\\"\\\\n\\\\n\\\\tself arrangeToStartSteppingIn: self world! !\\\\n\\\\n!Morph methodsFor: 'stepping and presenter' stamp: 'sw 3/22/2000 14:26'!\\\\narrangeToStartSteppingIn: aWorld\\\\n\\\\t\\\\\\\"Start getting sent the 'step' message in aWorld.  Like startSteppingIn:, but without the initial one to get started'\\\\\\\"\\\\n\\\\taWorld ifNotNil:\\\\n\\\\t\\\\t[aWorld startStepping: self.\\\\n\\\\t\\\\tself changed]! !\\\\n\\\\n!Morph methodsFor: 'stepping and presenter' stamp: 'sw 3/22/2000 14:28'!\\\\nisStepping\\\\n\\\\t\\\\\\\"Return true if the receiver is currently stepping in its world\\\\\\\"\\\\n\\\\t| aWorld |\\\\n\\\\t^ (aWorld _ self world)\\\\n\\\\t\\\\tifNil:\\\\t\\\\t[false]\\\\n\\\\t\\\\tifNotNil:\\\\t[aWorld isStepping: self]! !\\\\n\\\\n!Morph methodsFor: 'stepping and presenter' stamp: 'ar 10/22/2000 16:43'!\\\\nisSteppingSelector: aSelector\\\\n\\\\t\\\\\\\"Return true if the receiver is currently stepping in its world\\\\\\\"\\\\n\\\\t| aWorld |\\\\n\\\\t^ (aWorld _ self world)\\\\n\\\\t\\\\tifNil:\\\\t\\\\t[false]\\\\n\\\\t\\\\tifNotNil:\\\\t[aWorld isStepping: self selector: aSelector]! !\\\\n\\\\n!Morph methodsFor: 'stepping and presenter'!\\\\nstart\\\\n\\\\t\\\\\\\"Start running my script. For ordinary morphs, this means start stepping.\\\\\\\"\\\\n\\\\n\\\\tself startStepping.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'stepping and presenter' stamp: 'ar 1/31/2001 13:07'!\\\\nstartStepping\\\\n\\\\t\\\\\\\"Start getting sent the 'step' message.\\\\\\\"\\\\n\\\\tself startStepping: #stepAt: at: Time millisecondClockValue arguments: nil stepTime: nil.! !\\\\n\\\\n!Morph methodsFor: 'stepping and presenter' stamp: 'sw 7/19/1998 11:51'!\\\\nstartSteppingIn: aWorld\\\\n\\\\t\\\\\\\"Start getting sent the 'step' message in aWorld\\\\\\\"\\\\n\\\\n\\\\tself step.  \\\\\\\"one to get started!!\\\\\\\"\\\\n\\\\taWorld ifNotNil: [aWorld startStepping: self].\\\\n\\\\tself changed! !\\\\n\\\\n!Morph methodsFor: 'stepping and presenter' stamp: 'ar 10/22/2000 16:42'!\\\\nstartSteppingSelector: aSelector\\\\n\\\\t\\\\\\\"Start getting sent the 'step' message.\\\\\\\"\\\\n\\\\tself startStepping: aSelector at: Time millisecondClockValue arguments: nil stepTime: nil.! !\\\\n\\\\n!Morph methodsFor: 'stepping and presenter' stamp: 'ar 10/22/2000 16:36'!\\\\nstartStepping: aSelector at: scheduledTime arguments: args stepTime: stepTime\\\\n\\\\t\\\\\\\"Start stepping the receiver\\\\\\\"\\\\n\\\\t| w |\\\\n\\\\tw _ self world.\\\\n\\\\tw ifNotNil: [\\\\n\\\\t\\\\tw startStepping: self at: scheduledTime selector: aSelector arguments: args stepTime: stepTime.\\\\n\\\\t\\\\tself changed].! !\\\\n\\\\n!Morph methodsFor: 'stepping and presenter' stamp: 'ar 2/12/2001 17:04'!\\\\nstep\\\\n\\\\t\\\\\\\"Do some periodic activity. Use startStepping/stopStepping to start and stop getting sent this message. The time between steps is specified by this morph's answer to the stepTime message.  The generic version dispatches control to the player, if any.  The nasty circumlocation about owner's transformation is necessitated by the flexing problem that the player remains in the properties dictionary both of the flex and the real morph.  In the current architecture, only the top renderer's pointer to the player should actually be honored for the purpose of firing.\\\\\\\"\\\\n! !\\\\n\\\\n!Morph methodsFor: 'stepping and presenter' stamp: 'ar 2/12/2001 18:05'!\\\\nstepAt: millisecondClockValue\\\\n\\\\t\\\\\\\"Do some periodic activity. Use startStepping/stopStepping to start and stop getting sent this message. The time between steps is specified by this morph's answer to the stepTime message.\\\\n\\\\tThe millisecondClockValue parameter gives the value of the millisecond clock at the moment of dispatch.\\\\n\\\\tDefault is to dispatch to the parameterless step method for the morph, but this protocol makes it possible for some morphs to do differing things depending on the clock value\\\\\\\"\\\\n\\\\tself player ifNotNilDo:[:p| p stepAt: millisecondClockValue].\\\\n\\\\tself step\\\\n! !\\\\n\\\\n!Morph methodsFor: 'stepping and presenter'!\\\\nstop\\\\n\\\\t\\\\\\\"Stop running my script. For ordinary morphs, this means stop stepping.\\\\\\\"\\\\n\\\\n\\\\tself stopStepping.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'stepping and presenter' stamp: 'ar 12/15/2000 00:00'!\\\\nstopStepping\\\\n\\\\t\\\\\\\"Stop getting sent the 'step' message.\\\\\\\"\\\\n\\\\n\\\\t| w |\\\\n\\\\tw _ self world.\\\\n\\\\tw ifNotNil: [w stopStepping: self].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'stepping and presenter' stamp: 'ar 12/15/2000 00:00'!\\\\nstopSteppingSelector: aSelector\\\\n\\\\t\\\\\\\"Stop getting sent the given message.\\\\\\\"\\\\n\\\\t| w |\\\\n\\\\tw _ self world.\\\\n\\\\tw ifNotNil: [w stopStepping: self selector: aSelector].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'stepping and presenter' stamp: 'sw 10/11/1999 12:59'!\\\\nstopSteppingSelfAndSubmorphs\\\\n\\\\tself allMorphsDo: [:m | m stopStepping]\\\\n! !\\\\n\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'ar 3/18/2001 00:11'!\\\\nactiveHand\\\\n\\\\t^ActiveHand! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'di 11/13/2000 01:00'!\\\\nallOwners\\\\n\\\\t\\\\\\\"Return the owners of the reciever\\\\\\\"\\\\n\\\\n\\\\t^ Array streamContents: [:strm | self allOwnersDo: [:m | strm nextPut: m]]! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'ar 9/14/2000 16:47'!\\\\nallOwnersDo: aBlock\\\\n\\\\t\\\\\\\"Evaluate aBlock with all owners of the receiver\\\\\\\"\\\\n\\\\towner ifNotNil:[^owner withAllOwnersDo: aBlock].! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'di 11/13/2000 00:48'!\\\\nfirstOwnerSuchThat: conditionBlock\\\\n\\\\n\\\\tself allOwnersDo: [:m | (conditionBlock value: m) ifTrue: [^ m]].\\\\n\\\\t^ nil\\\\n! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'ar 10/3/2000 15:36'!\\\\nhasOwner: aMorph\\\\n\\\\t\\\\\\\"Return true if the receiver has aMorph in its owner chain\\\\\\\"\\\\n\\\\taMorph ifNil:[^true].\\\\n\\\\tself allOwnersDo:[:m| m = aMorph ifTrue:[^true]].\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'dgd 9/1/2004 17:17'!\\\\nisInDockingBar\\\\n\\\\t\\\\\\\"answer if the receiver is in a menu bar\\\\\\\"\\\\n\\\\t^ (owner notNil) and: [owner isDockingBar]! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'dgd 9/18/2004 15:56'!\\\\nisInSystemWindow\\\\n\\\\t\\\\\\\"answer if the receiver is in a system window\\\\\\\"\\\\n\\\\t^ owner isMorph and:[owner isSystemWindow or:[owner isInSystemWindow]]! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'dgd 2/22/2003 19:05'!\\\\nisInWorld\\\\n\\\\t\\\\\\\"Return true if this morph is in a world.\\\\\\\"\\\\n\\\\n\\\\t^self world notNil! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'sw 8/29/2000 14:55'!\\\\nmorphPreceding: aSubmorph\\\\n\\\\t\\\\\\\"Answer the morph immediately preceding aSubmorph, or nil if none\\\\\\\"\\\\n\\\\n\\\\t| anIndex |\\\\n\\\\tanIndex _ submorphs indexOf: aSubmorph ifAbsent: [^ nil].\\\\n\\\\t^ anIndex > 1\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[submorphs at: (anIndex - 1)]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[nil]! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'di 11/12/2000 16:13'!\\\\nnearestOwnerThat: conditionBlock\\\\n\\\\t\\\\\\\"Return the first enclosing morph for which aBlock evaluates to true, or nil if none\\\\\\\"\\\\n\\\\n\\\\t^ self firstOwnerSuchThat: conditionBlock\\\\n! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'di 11/13/2000 00:49'!\\\\norOwnerSuchThat: conditionBlock\\\\n\\\\n\\\\t(conditionBlock value: self) ifTrue: [^ self].\\\\n\\\\tself allOwnersDo: [:m | (conditionBlock value: m) ifTrue: [^ m]].\\\\n\\\\t^ nil\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'di 11/13/2000 00:50'!\\\\noutermostMorphThat: conditionBlock\\\\n\\\\t\\\\\\\"Return the outermost containing morph for which aBlock is true, or nil if none\\\\\\\"\\\\n\\\\n\\\\t| outermost |\\\\n\\\\tself allOwnersDo: [:m | (conditionBlock value: m) ifTrue: [outermost _ m]].\\\\n\\\\t^ outermost! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'ar 3/18/2001 00:12'!\\\\noutermostWorldMorph\\\\n\\\\n\\\\t| outer |\\\\n\\\\tWorld ifNotNil:[^World].\\\\n\\\\tself flag: #arNote. \\\\\\\"stuff below is really only for MVC\\\\\\\"\\\\n\\\\touter _ self outermostMorphThat: [ :x | x isWorldMorph].\\\\n\\\\touter ifNotNil: [^outer].\\\\n\\\\tself isWorldMorph ifTrue: [^self].\\\\n\\\\t^nil! !\\\\n\\\\n!Morph methodsFor: 'structure'!\\\\nowner\\\\n\\\\t\\\\\\\"Returns the owner of this morph, which may be nil.\\\\\\\"\\\\n\\\\n\\\\t^ owner! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'di 11/12/2000 16:18'!\\\\nownerThatIsA: aClass\\\\n\\\\t\\\\\\\"Return the first enclosing morph that is a kind of aClass, or nil if none\\\\\\\"\\\\n\\\\n\\\\t^ self firstOwnerSuchThat: [:m | m isKindOf: aClass]! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'di 11/12/2000 16:20'!\\\\nownerThatIsA: firstClass orA: secondClass\\\\n\\\\t\\\\\\\"Return the first enclosing morph that is a kind of one of the two classes given, or nil if none\\\\\\\"\\\\n\\\\n\\\\t^ self firstOwnerSuchThat: [:m | (m isKindOf: firstClass) or: [m isKindOf: secondClass]]! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'sw 7/1/1998 18:02'!\\\\npasteUpMorph\\\\n\\\\t\\\\\\\"Answer the closest containing morph that is a PasteUp morph\\\\\\\"\\\\n\\\\t^ self ownerThatIsA: PasteUpMorph! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'dgd 8/28/2004 18:43'!\\\\npasteUpMorphHandlingTabAmongFields\\\\n\\\\t\\\\\\\"Answer the nearest PasteUpMorph in my owner chain that has the tabAmongFields property, or nil if none\\\\\\\"\\\\n\\\\n\\\\t| aPasteUp |\\\\n\\\\taPasteUp _ self owner.\\\\n\\\\t[aPasteUp notNil] whileTrue:\\\\n\\\\t\\\\t[aPasteUp tabAmongFields ifTrue:\\\\n\\\\t\\\\t\\\\t[^ aPasteUp].\\\\n\\\\t\\\\taPasteUp _ aPasteUp owner].\\\\n\\\\t^ nil! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'RAA 6/13/2000 15:01'!\\\\nprimaryHand\\\\n\\\\n        | outer |\\\\n        outer _ self outermostWorldMorph ifNil: [^ nil].\\\\n        ^ outer activeHand ifNil: [outer firstHand]! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'dgd 2/22/2003 14:34'!\\\\nrenderedMorph\\\\n\\\\t\\\\\\\"If the receiver is a renderer morph, answer the rendered morph. Otherwise, answer the receiver. A renderer morph with no submorphs answers itself. See the comment in Morph>isRenderer.\\\\\\\"\\\\n\\\\n\\\\tself isRenderer ifFalse: [^self].\\\\n\\\\tsubmorphs isEmpty ifTrue: [^self].\\\\n\\\\t^self firstSubmorph renderedMorph! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'dgd 2/22/2003 14:34'!\\\\nroot\\\\n\\\\t\\\\\\\"Return the root of the composite morph containing the receiver. The owner of the root is either nil, a WorldMorph, or a HandMorph. If the receiver's owner is nil, the root is the receiver itself. This method always returns a morph.\\\\\\\"\\\\n\\\\n\\\\t(owner isNil or: [owner isWorldOrHandMorph]) ifTrue: [^self].\\\\n\\\\t^owner root! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'di 8/4/1999 15:41'!\\\\nrootAt: location\\\\n\\\\t\\\\\\\"Just return myself, unless I am a WorldWindow.\\\\n\\\\tIf so, then return the appropriate root in that world\\\\\\\"\\\\n\\\\n\\\\t^ self! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'sw 8/30/1998 09:47'!\\\\ntopPasteUp\\\\n\\\\t\\\\\\\"If the receiver is in a world, return that; otherwise return the outermost pasteup morph\\\\\\\"\\\\n\\\\t^ self outermostMorphThat: [:m | m isKindOf: PasteUpMorph]! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'dgd 2/22/2003 19:06'!\\\\ntopRendererOrSelf\\\\n\\\\t\\\\\\\"Answer the topmost renderer for this morph, or this morph itself if it has no renderer. See the comment in Morph>isRenderer.\\\\\\\"\\\\n\\\\n\\\\t| top topsOwner |\\\\n\\\\towner ifNil: [^self].\\\\n\\\\tself isWorldMorph ifTrue: [^self].\\\\t\\\\\\\"ignore scaling of this world\\\\\\\"\\\\n\\\\ttop := self.\\\\n\\\\ttopsOwner := top owner.\\\\n\\\\t[topsOwner notNil and: [topsOwner isRenderer]] whileTrue: \\\\n\\\\t\\\\t\\\\t[top := topsOwner.\\\\n\\\\t\\\\t\\\\ttopsOwner := top owner].\\\\n\\\\t^top! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'di 11/13/2000 00:59'!\\\\nwithAllOwners\\\\n\\\\t\\\\\\\"Return the receiver and all its owners\\\\\\\"\\\\n\\\\n\\\\t^ Array streamContents: [:strm | self withAllOwnersDo: [:m | strm nextPut: m]]! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'ar 9/14/2000 16:48'!\\\\nwithAllOwnersDo: aBlock\\\\n\\\\t\\\\\\\"Evaluate aBlock with the receiver and all of its owners\\\\\\\"\\\\n\\\\taBlock value: self.\\\\n\\\\towner ifNotNil:[^owner withAllOwnersDo: aBlock].! !\\\\n\\\\n!Morph methodsFor: 'structure' stamp: 'dgd 2/22/2003 14:36'!\\\\nworld\\\\n\\\\t^owner isNil ifTrue: [nil] ifFalse: [owner world]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'di 11/14/2001 12:50'!\\\\nallKnownNames\\\\n\\\\t\\\\\\\"Return a list of all known names based on the scope of the receiver.  Does not include the name of the receiver itself.  Items in parts bins are excluded.  Reimplementors (q.v.) can extend the list\\\\\\\"\\\\n\\\\n\\\\t^ Array streamContents:\\\\n\\\\t\\\\t[:s | self allSubmorphNamesDo: [:n | s nextPut: n]]\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing'!\\\\nallMorphs\\\\n\\\\t\\\\\\\"Return a collection containing all morphs in this composite morph (including the receiver).\\\\\\\"\\\\n\\\\n\\\\t| all |\\\\n\\\\tall _ OrderedCollection new: 100.\\\\n\\\\tself allMorphsDo: [: m | all add: m].\\\\n\\\\t^ all! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'dgd 2/22/2003 14:27'!\\\\nallMorphsDo: aBlock \\\\n\\\\t\\\\\\\"Evaluate the given block for all morphs in this composite morph (including the receiver).\\\\\\\"\\\\n\\\\n\\\\tsubmorphs do: [:m | m allMorphsDo: aBlock].\\\\n\\\\taBlock value: self! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'sw 10/31/97 20:05'!\\\\nallNonSubmorphMorphs\\\\n\\\\t\\\\\\\"Return a collection containing all morphs in this morph which are not currently in the submorph containment hierarchy (put in primarily for bookmorphs)\\\\\\\"\\\\n\\\\n\\\\t^ OrderedCollection new! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'di 11/14/2001 12:44'!\\\\nallSubmorphNamesDo: nameBlock\\\\n\\\\t\\\\\\\"Return a list of all known names of submorphs and nested submorphs of the receiver, based on the scope of the receiver.  Items in parts bins are excluded\\\\\\\"\\\\n\\\\n\\\\tself isPartsBin ifTrue: [^ self]. \\\\\\\"Don't report names from parts bins\\\\\\\"\\\\n\\\\tself submorphsDo: \\\\n\\\\t\\\\t[:m | m knownName ifNotNilDo: [:n | nameBlock value: n].\\\\n\\\\t\\\\tm allSubmorphNamesDo: nameBlock].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'dgd 8/31/2004 16:53'!\\\\ndockingBars\\\\n\\\\t\\\\\\\"Answer the receiver's dockingBars\\\\\\\"\\\\n\\\\t^ self submorphs\\\\n\\\\t\\\\tselect: [:each | each isDockingBar]\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'rhi 9/10/2000 12:12'!\\\\nfindA: aClass\\\\n\\\\t\\\\\\\"Return the first submorph of the receiver that is descended from the given class. Return nil if there is no such submorph. Clients of this code should always check for a nil return value so that the code will be robust if the user takes the morph apart.\\\\\\\"\\\\n\\\\n\\\\t^self submorphs\\\\n\\\\t\\\\tdetect: [:p | p isKindOf: aClass]\\\\n\\\\t\\\\tifNone: [nil]! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'sw 1/9/2001 12:30'!\\\\nfindDeeplyA: aClass\\\\n\\\\t\\\\\\\"Return a morph in the submorph tree of the receiver that is descended from the given class. Return nil if there is no such morph. Clients of this code should always check for a nil return value so that the code will be robust if the user takes the morph apart.\\\\\\\"\\\\n\\\\n\\\\t^ (self allMorphs copyWithout: self)\\\\n\\\\t\\\\tdetect: [:p | p isKindOf: aClass]\\\\n\\\\t\\\\tifNone: [nil]! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'LC 9/28/1999 19:12'!\\\\nfindDeepSubmorphThat: block1 ifAbsent: block2 \\\\n\\\\tself\\\\n\\\\t\\\\tallMorphsDo: [:m | (block1 value: m)\\\\n\\\\t\\\\t\\\\t\\\\t== true ifTrue: [^ m]].\\\\n\\\\t^ block2 value! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'ar 3/17/2001 15:32'!\\\\nfindSubmorphBinary: aBlock\\\\n\\\\t\\\\\\\"Use binary search for finding a specific submorph of the receiver. Caller must be certain that the ordering holds for the submorphs.\\\\\\\"\\\\n\\\\t^submorphs findBinary: aBlock ifNone:[nil].! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'dgd 2/22/2003 14:31'!\\\\nfirstSubmorph\\\\n\\\\t^submorphs first! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'dgd 2/22/2003 14:32'!\\\\nhasSubmorphs\\\\n\\\\t^submorphs notEmpty! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'sw 7/3/1998 17:11'!\\\\nhasSubmorphWithProperty: aSymbol\\\\n\\\\tsubmorphs detect: [:m | m hasProperty: aSymbol] ifNone: [^ false].\\\\n\\\\t^ true! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'tk 10/31/2000 11:04'!\\\\nindexOfMorphAbove: aPoint\\\\n\\\\t\\\\\\\"Return index of lowest morph whose bottom is above aPoint.\\\\n\\\\tWill return 0 if the first morph is not above aPoint.\\\\\\\"\\\\n\\\\n\\\\tsubmorphs withIndexDo: [:mm :ii | \\\\n\\\\t\\\\tmm fullBounds bottom >= aPoint y ifTrue: [^ ii - 1]].\\\\n\\\\t^ submorphs size! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'dgd 2/22/2003 14:32'!\\\\nlastSubmorph\\\\n\\\\t^submorphs last! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'dgd 9/6/2004 14:17'!\\\\nmainDockingBars\\\\n\\\\t\\\\\\\"Answer the receiver's main dockingBars\\\\\\\"\\\\n\\\\t^ self dockingBars\\\\n\\\\t\\\\tselect: [:each | each hasProperty: #mainDockingBarTimeStamp]! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'ar 10/8/2000 15:40'!\\\\nmorphsAt: aPoint\\\\n\\\\t\\\\\\\"Return a collection of all morphs in this morph structure that contain the given point, possibly including the receiver itself.  The order is deepest embedding first.\\\\\\\"\\\\n\\\\t^self morphsAt: aPoint unlocked: false! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'dgd 2/22/2003 14:32'!\\\\nmorphsAt: aPoint behind: aMorph unlocked: aBool \\\\n\\\\t\\\\\\\"Return all morphs at aPoint that are behind frontMorph; if aBool is true return only unlocked, visible morphs.\\\\\\\"\\\\n\\\\n\\\\t| isBack found all tfm |\\\\n\\\\tall := (aMorph isNil or: [owner isNil]) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"Traverse down\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(self fullBounds containsPoint: aPoint) ifFalse: [^#()].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(aBool and: [self isLocked or: [self visible not]]) ifTrue: [^#()].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnil]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"Traverse up\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttfm := self transformedFrom: owner.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tall := owner \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmorphsAt: (tfm localPointToGlobal: aPoint)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbehind: self\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tunlocked: aBool.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tWriteStream with: all].\\\\n\\\\tisBack := aMorph isNil.\\\\n\\\\tself submorphsDo: \\\\n\\\\t\\\\t\\\\t[:m | \\\\n\\\\t\\\\t\\\\tisBack \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[tfm := m transformedFrom: self.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tfound := m \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmorphsAt: (tfm globalPointToLocal: aPoint)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbehind: nil\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tunlocked: aBool.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tfound notEmpty \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[all ifNil: [all := WriteStream on: #()].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tall nextPutAll: found]].\\\\n\\\\t\\\\t\\\\tm == aMorph ifTrue: [isBack := true]].\\\\n\\\\t(isBack and: [self containsPoint: aPoint]) \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[all ifNil: [^Array with: self].\\\\n\\\\t\\\\t\\\\tall nextPut: self].\\\\n\\\\t^all ifNil: [#()] ifNotNil: [all contents]! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'ar 10/8/2000 15:40'!\\\\nmorphsAt: aPoint unlocked: aBool\\\\n\\\\t\\\\\\\"Return a collection of all morphs in this morph structure that contain the given point, possibly including the receiver itself.  The order is deepest embedding first.\\\\\\\"\\\\n\\\\t| mList |\\\\n\\\\tmList _ WriteStream on: #().\\\\n\\\\tself morphsAt: aPoint unlocked: aBool do:[:m| mList nextPut: m].\\\\n\\\\t^mList contents! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'ar 10/8/2000 15:37'!\\\\nmorphsAt: aPoint unlocked: aBool do: aBlock\\\\n\\\\t\\\\\\\"Evaluate aBlock with all the morphs starting at the receiver which appear at aPoint. If aBool is true take only visible, unlocked morphs into account.\\\\\\\"\\\\n\\\\t| tfm |\\\\n\\\\t(self fullBounds containsPoint: aPoint) ifFalse:[^self].\\\\n\\\\t(aBool and:[self isLocked or:[self visible not]]) ifTrue:[^self].\\\\n\\\\tself submorphsDo:[:m|\\\\n\\\\t\\\\ttfm _ m transformedFrom: self.\\\\n\\\\t\\\\tm morphsAt: (tfm globalPointToLocal: aPoint) unlocked: aBool do: aBlock].\\\\n\\\\t(self containsPoint: aPoint) ifTrue:[aBlock value: self].! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'ar 9/9/2000 17:31'!\\\\nmorphsInFrontOf: someMorph overlapping: aRectangle do: aBlock\\\\n\\\\t\\\\\\\"Evaluate aBlock with all top-level morphs in front of someMorph that overlap with the given rectangle. someMorph is either an immediate child of the receiver or nil (in which case all submorphs of the receiver are enumerated).\\\\\\\"\\\\n\\\\tself submorphsDo:[:m|\\\\n\\\\t\\\\tm == someMorph ifTrue:[\\\\\\\"Try getting out quickly\\\\\\\"\\\\n\\\\t\\\\t\\\\towner ifNil:[^self].\\\\n\\\\t\\\\t\\\\t^owner morphsInFrontOf: self overlapping: aRectangle do: aBlock].\\\\n\\\\t\\\\t(m fullBoundsInWorld intersects: aRectangle)\\\\n\\\\t\\\\t\\\\tifTrue:[aBlock value: m]].\\\\n\\\\towner ifNil:[^self].\\\\n\\\\t^owner morphsInFrontOf: self overlapping: aRectangle do: aBlock.! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'ar 9/9/2000 17:31'!\\\\nmorphsInFrontOverlapping: aRectangle\\\\n\\\\t\\\\\\\"Return all top-level morphs in front of someMorph that overlap with the given rectangle.\\\\\\\"\\\\n\\\\t| morphList |\\\\n\\\\tmorphList _ WriteStream on: Array new.\\\\n\\\\tself morphsInFrontOf: nil overlapping: aRectangle do:[:m | morphList nextPut: m].\\\\n\\\\t^morphList contents! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'ar 9/9/2000 17:31'!\\\\nmorphsInFrontOverlapping: aRectangle do: aBlock\\\\n\\\\t\\\\\\\"Evaluate aBlock with all top-level morphs in front of someMorph that overlap with the given rectangle.\\\\\\\"\\\\n\\\\t^self morphsInFrontOf: nil overlapping: aRectangle do: aBlock! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'ar 8/13/2003 11:32'!\\\\nnoteNewOwner: aMorph\\\\n\\\\t\\\\\\\"I have just been added as a submorph of aMorph\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'RAA 6/11/2000 20:41'!\\\\nrootMorphsAtGlobal: aPoint\\\\n\\\\t\\\\\\\"Return the list of root morphs containing the given point, excluding the receiver.\\\\n\\\\tar 11/8/1999: Moved into morph for an incredibly ugly hack in 3D worlds\\\\\\\"\\\\n\\\\n\\\\t^ self rootMorphsAt: (self pointFromWorld: aPoint)! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'ar 10/8/2000 15:44'!\\\\nrootMorphsAt: aPoint\\\\n\\\\t\\\\\\\"Return the list of root morphs containing the given point, excluding the receiver.\\\\n\\\\tar 11/8/1999: Moved into morph for an incredibly ugly hack in 3D worlds\\\\\\\"\\\\nself flag: #arNote. \\\\\\\"check this at some point\\\\\\\"\\\\n\\\\t^ self submorphs select:\\\\n\\\\t\\\\t[:m | (m fullContainsPoint: aPoint) and: [m isLocked not]]! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'dgd 2/22/2003 14:35'!\\\\nshuffleSubmorphs\\\\n\\\\t\\\\\\\"Randomly shuffle the order of my submorphs.  Don't call this method lightly!!\\\\\\\"\\\\n\\\\n\\\\t| bg |\\\\n\\\\tself invalidRect: self fullBounds.\\\\n\\\\t(submorphs notEmpty and: [submorphs last mustBeBackmost]) \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[bg := submorphs last.\\\\n\\\\t\\\\t\\\\tbg privateDelete].\\\\n\\\\tsubmorphs := submorphs shuffled.\\\\n\\\\tbg ifNotNil: [self addMorphBack: bg].\\\\n\\\\tself layoutChanged! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'tk 10/20/2000 13:12'!\\\\nsubmorphAfter\\\\n\\\\t\\\\\\\"Return the submorph after (behind) me, or nil\\\\\\\"\\\\n\\\\t| ii |\\\\n\\\\towner ifNil: [^ nil].\\\\n\\\\t^ (ii _ owner submorphIndexOf: self) = owner submorphs size \\\\n\\\\t\\\\tifTrue: [nil]\\\\n\\\\t\\\\tifFalse: [owner submorphs at: ii+1].\\\\n\\\\t\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'tk 10/20/2000 13:13'!\\\\nsubmorphBefore\\\\n\\\\t\\\\\\\"Return the submorph after (behind) me, or nil\\\\\\\"\\\\n\\\\t| ii |\\\\n\\\\towner ifNil: [^ nil].\\\\n\\\\t^ (ii _ owner submorphIndexOf: self) = 1 \\\\n\\\\t\\\\tifTrue: [nil]\\\\n\\\\t\\\\tifFalse: [owner submorphs at: ii-1].\\\\n\\\\t\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing'!\\\\nsubmorphCount\\\\n\\\\n\\\\t^ submorphs size! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'sw 4/9/98 14:26'!\\\\nsubmorphNamed: aName\\\\n\\\\t^ self submorphNamed: aName ifNone: [nil]! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'gm 2/22/2003 13:16'!\\\\nsubmorphNamed: aName ifNone: aBlock \\\\n\\\\t\\\\\\\"Find the first submorph with this name, or a button with an action selector of that name\\\\\\\"\\\\n\\\\n\\\\t| sub args |\\\\n\\\\tself submorphs do: [:p | p knownName = aName ifTrue: [^p]].\\\\n\\\\tself submorphs do: \\\\n\\\\t\\\\t\\\\t[:button | \\\\n\\\\t\\\\t\\\\t(button respondsTo: #actionSelector) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [button actionSelector == aName ifTrue: [^button]].\\\\n\\\\t\\\\t\\\\t((button respondsTo: #arguments) and: [(args := button arguments) notNil]) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [(args at: 2 ifAbsent: [nil]) == aName ifTrue: [^button]].\\\\n\\\\t\\\\t\\\\t(button isAlignmentMorph) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [(sub := button submorphNamed: aName ifNone: [nil]) ifNotNil: [^sub]]].\\\\n\\\\t^aBlock value! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'rhi 9/10/2000 12:12'!\\\\nsubmorphOfClass: aClass\\\\n\\\\n\\\\t^self findA: aClass! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'efc 8/6/2005 11:35'!\\\\nsubmorphs\\\\n\\\\t\\\\\\\"This method returns my actual submorphs collection. Modifying the collection directly could be dangerous; make a copy if you need to alter it.\\\\\\\"\\\\n\\\\t^ submorphs ! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'di 11/4/97 14:30'!\\\\nsubmorphsBehind: aMorph do: aBlock\\\\n\\\\t| behind |\\\\n\\\\tbehind _ false.\\\\n\\\\tsubmorphs do:\\\\n\\\\t\\\\t[:m | m == aMorph ifTrue: [behind _ true]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [behind ifTrue: [aBlock value: m]]].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'dgd 2/22/2003 14:35'!\\\\nsubmorphsDo: aBlock \\\\n\\\\tsubmorphs do: aBlock! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'di 11/4/97 14:29'!\\\\nsubmorphsInFrontOf: aMorph do: aBlock\\\\n\\\\t| behind |\\\\n\\\\tbehind _ false.\\\\n\\\\tsubmorphs do:\\\\n\\\\t\\\\t[:m | m == aMorph ifTrue: [behind _ true]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [behind ifFalse: [aBlock value: m]]].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing'!\\\\nsubmorphsReverseDo: aBlock\\\\n\\\\n\\\\tsubmorphs reverseDo: aBlock.! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'sw 8/15/97 22:03'!\\\\nsubmorphsSatisfying: aBlock\\\\n\\\\t^ submorphs select: [:m | (aBlock value: m) == true]! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'sw 10/26/1999 23:42'!\\\\nsubmorphThat: block1 ifNone: block2\\\\n\\\\t^ submorphs detect: [:m | (block1 value: m) == true] ifNone: [block2 value]\\\\n\\\\t! !\\\\n\\\\n!Morph methodsFor: 'submorphs-accessing' stamp: 'sw 7/3/1998 18:47'!\\\\nsubmorphWithProperty: aSymbol\\\\n\\\\t^ submorphs detect: [:aMorph | aMorph hasProperty: aSymbol] ifNone: [nil]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'tk 12/15/1998 14:23'!\\\\nabandon\\\\n\\\\t\\\\\\\"Like delete, but we really intend not to use this morph again.  Clean up a few things.\\\\\\\"\\\\n\\\\n\\\\tself delete! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'sw 9/28/2001 08:39'!\\\\nactWhen\\\\n\\\\t\\\\\\\"Answer when the receiver, probably being used as a button, should have its action triggered\\\\\\\"\\\\n\\\\n\\\\t^ self valueOfProperty: #actWhen ifAbsentPut: [#buttonDown]! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'sw 9/25/2001 10:23'!\\\\nactWhen: aButtonPhase\\\\n\\\\t\\\\\\\"Set the receiver's actWhen trait\\\\\\\"\\\\n\\\\n\\\\tself setProperty: #actWhen toValue: aButtonPhase! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'ar 8/12/2003 23:28'!\\\\naddAllMorphs: aCollection\\\\n\\\\t^self privateAddAllMorphs: aCollection atIndex: submorphs size! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'ar 8/12/2003 23:29'!\\\\naddAllMorphs: aCollection after: anotherMorph\\\\n\\\\t^self privateAddAllMorphs: aCollection \\\\n\\\\t\\\\t\\\\tatIndex: (submorphs indexOf: anotherMorph ifAbsent: [submorphs size])! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'ar 1/31/2001 12:55'!\\\\naddMorphBack: aMorph\\\\n\\\\t^self privateAddMorph: aMorph atIndex: submorphs size+1! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'RAA 12/15/2000 19:34'!\\\\naddMorphCentered: aMorph\\\\n\\\\n\\\\taMorph position: bounds center - (aMorph extent // 2).\\\\n\\\\tself addMorphFront: aMorph.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'ar 12/16/2001 21:08'!\\\\naddMorphFrontFromWorldPosition: aMorph\\\\n\\\\t^self addMorphFront: aMorph fromWorldPosition: aMorph positionInWorld.! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'ar 1/31/2001 12:54'!\\\\naddMorphFront: aMorph\\\\n\\\\t^self privateAddMorph: aMorph atIndex: 1! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'ar 11/15/1998 23:42'!\\\\naddMorphFront: aMorph fromWorldPosition: wp\\\\n\\\\n\\\\tself addMorphFront: aMorph.\\\\n\\\\taMorph position: (self transformFromWorld globalPointToLocal: wp)! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'dgd 2/22/2003 14:26'!\\\\naddMorphNearBack: aMorph \\\\n\\\\t| bg |\\\\n\\\\t(submorphs notEmpty and: [submorphs last mustBeBackmost]) \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[bg := submorphs last.\\\\n\\\\t\\\\t\\\\tbg privateDelete].\\\\n\\\\tself addMorphBack: aMorph.\\\\n\\\\tbg ifNotNil: [self addMorphBack: bg]! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove'!\\\\naddMorph: aMorph\\\\n\\\\n\\\\tself addMorphFront: aMorph.! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'ar 1/31/2001 12:54'!\\\\naddMorph: newMorph after: aMorph\\\\n\\\\t\\\\\\\"Add the given morph as one of my submorphs, inserting it after anotherMorph\\\\\\\"\\\\n\\\\t^self privateAddMorph: newMorph atIndex: (submorphs indexOf: aMorph)+1! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'sw 9/7/2000 08:29'!\\\\naddMorph: aMorph asElementNumber: aNumber\\\\n\\\\t\\\\\\\"Add the given morph so that it becomes the aNumber'th element of my submorph list.  If aMorph is already one of my submorphs, reposition it\\\\\\\"\\\\n\\\\n\\\\t(submorphs includes: aMorph) ifTrue:\\\\n\\\\t\\\\t[aMorph privateDelete].\\\\n\\\\t(aNumber <= submorphs size)\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self addMorph: aMorph inFrontOf: (submorphs at: aNumber)]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self addMorphBack: aMorph]\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'ar 1/31/2001 12:44'!\\\\naddMorph: newMorph behind: aMorph\\\\n\\\\t\\\\\\\"Add a morph to the list of submorphs behind the specified morph\\\\\\\"\\\\n\\\\t^self privateAddMorph: newMorph atIndex: (submorphs indexOf: aMorph) + 1.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'JW 2/1/2001 12:52'!\\\\naddMorph: aMorph fullFrame: aLayoutFrame\\\\n\\\\n\\\\taMorph layoutFrame: aLayoutFrame.\\\\n\\\\taMorph hResizing: #spaceFill; vResizing: #spaceFill.\\\\n\\\\tself addMorph: aMorph.\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'ar 1/31/2001 12:45'!\\\\naddMorph: newMorph inFrontOf: aMorph\\\\n\\\\t\\\\\\\"Add a morph to the list of submorphs in front of the specified morph\\\\\\\"\\\\n\\\\t^self privateAddMorph: newMorph atIndex: ((submorphs indexOf: aMorph) max: 1).! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'dgd 4/4/2006 17:17'!\\\\nallMorphsWithPlayersDo: aTwoArgumentBlock \\\\n\\\\t\\\\\\\"Evaluate the given block for all morphs in this composite morph that have non-nil players.\\\\n\\\\tAlso evaluate the block for the receiver if it has a player.\\\\\\\"\\\\n\\\\n\\\\tsubmorphs do: [:m | m allMorphsWithPlayersDo: aTwoArgumentBlock ].\\\\n\\\\tself playerRepresented ifNotNilDo: [ :p | aTwoArgumentBlock value: self value: p ].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'dgd 2/22/2003 14:30'!\\\\ncomeToFront\\\\n\\\\t| outerMorph |\\\\n\\\\touterMorph := self topRendererOrSelf.\\\\n\\\\t(outerMorph owner isNil or: [outerMorph owner hasSubmorphs not]) \\\\n\\\\t\\\\tifTrue: [^self].\\\\n\\\\touterMorph owner firstSubmorph == outerMorph \\\\n\\\\t\\\\tifFalse: [outerMorph owner addMorphFront: outerMorph]! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'di 10/27/97 23:26'!\\\\ncopyWithoutSubmorph: sub\\\\n\\\\t\\\\\\\"Needed to get a morph to draw without one of its submorphs.\\\\n\\\\tNOTE:  This must be thrown away immediately after use.\\\\\\\"\\\\n\\\\t^ self clone privateSubmorphs: (submorphs copyWithout: sub)! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'dgd 9/10/2004 19:02'!\\\\ndelete\\\\n\\\\t\\\\\\\"Remove the receiver as a submorph of its owner and make its \\\\n\\\\tnew owner be nil.\\\\\\\"\\\\n\\\\n\\\\t| aWorld |\\\\n\\\\tself removeHalo.\\\\n\\\\taWorld := self world ifNil: [World].\\\\n\\\\t\\\\\\\"Terminate genie recognition focus\\\\\\\"\\\\n\\\\t\\\\\\\"I encountered a case where the hand was nil, so I put in a little \\\\n\\\\tprotection - raa \\\\\\\"\\\\n\\\\t\\\\\\\" This happens when we are in an MVC project and open\\\\n\\\\t  a morphic window. - BG \\\\\\\"\\\\n\\\\taWorld ifNotNil:\\\\n\\\\t  [self disableSubmorphFocusForHand: self activeHand.\\\\n\\\\t  self activeHand releaseKeyboardFocus: self;\\\\n\\\\t\\\\t  releaseMouseFocus: self.].\\\\n\\\\towner ifNotNil:[ self privateDelete.\\\\n\\\\t\\\\tself player ifNotNilDo: [ :player |\\\\n\\\\t\\\\t\\\\t\\\\\\\"Player must be notified\\\\\\\"\\\\n\\\\t\\\\t\\\\tplayer noteDeletionOf: self fromWorld: aWorld]].! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'dgd 9/1/2004 16:26'!\\\\ndeleteDockingBars\\\\n\\\\t\\\\\\\"Delete the receiver's docking bars\\\\\\\"\\\\n\\\\tself dockingBars\\\\n\\\\t\\\\tdo: [:each | each delete]! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'sw 7/3/1998 11:02'!\\\\ndeleteSubmorphsWithProperty: aSymbol\\\\n\\\\tsubmorphs copy do:\\\\n\\\\t\\\\t[:m | (m hasProperty: aSymbol) ifTrue: [m delete]]! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'sw 2/2/2006 02:39'!\\\\ndismissViaHalo\\\\n\\\\t\\\\\\\"The user has clicked in the delete halo-handle.  This provides a hook in case some concomitant action should be taken, or if the particular morph is not one which should be put in the trash can, for example.\\\\\\\"\\\\n\\\\n\\\\t| cmd |\\\\n\\\\tself setProperty: #lastPosition toValue: self positionInWorld.\\\\n\\\\tself dismissMorph.\\\\n\\\\tPreferences preserveTrash ifTrue: [ \\\\n\\\\t\\\\tPreferences slideDismissalsToTrash\\\\n\\\\t\\\\t\\\\tifTrue:[self slideToTrash: nil]\\\\n\\\\t\\\\t\\\\tifFalse:[TrashCanMorph moveToTrash: self].\\\\n\\\\t].\\\\n\\\\n\\\\tcmd _ Command new cmdWording: 'dismiss ' translated, self externalName.\\\\n\\\\tcmd undoTarget: ActiveWorld selector: #reintroduceIntoWorld: argument: self.\\\\n\\\\tcmd redoTarget: ActiveWorld selector: #onceAgainDismiss: argument: self.\\\\n\\\\tActiveWorld rememberCommand: cmd! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'sw 4/9/98 22:44'!\\\\ngoBehind\\\\n\\\\n\\\\towner addMorphNearBack: self.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'ar 8/10/2003 18:31'!\\\\nprivateDelete\\\\n\\\\t\\\\\\\"Remove the receiver as a submorph of its owner\\\\\\\"\\\\n\\\\towner ifNotNil:[owner removeMorph: self].! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'nk 10/16/2003 14:08'!\\\\nremoveAllMorphs\\\\n\\\\t| oldMorphs myWorld |\\\\n\\\\tmyWorld _ self world.\\\\n\\\\t(fullBounds notNil or:[myWorld notNil]) ifTrue:[self invalidRect: self fullBounds].\\\\n\\\\tsubmorphs do: [:m | myWorld ifNotNil: [ m outOfWorld: myWorld ]. m privateOwner: nil].\\\\n\\\\toldMorphs _ submorphs.\\\\n\\\\tsubmorphs _ EmptyArray.\\\\n\\\\toldMorphs do: [ :m | self removedMorph: m ].\\\\n\\\\tself layoutChanged.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'nk 10/16/2003 14:02'!\\\\nremoveAllMorphsIn: aCollection\\\\n\\\\t\\\\\\\"greatly speeds up the removal of *lots* of submorphs\\\\\\\"\\\\n\\\\t| set myWorld |\\\\n\\\\tset _ IdentitySet new: aCollection size * 4 // 3.\\\\n\\\\taCollection do: [:each | each owner == self ifTrue: [ set add: each]].\\\\n\\\\tmyWorld _ self world.\\\\n\\\\t(fullBounds notNil or:[myWorld notNil]) ifTrue:[self invalidRect: self fullBounds].\\\\n\\\\tset do: [:m | myWorld ifNotNil: [ m outOfWorld: myWorld ]. m privateOwner: nil].\\\\n\\\\tsubmorphs _ submorphs reject: [ :each | set includes: each].\\\\n\\\\tset do: [ :m | self removedMorph: m ].\\\\n\\\\tself layoutChanged.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'ar 8/12/2003 22:01'!\\\\nremovedMorph: aMorph\\\\n\\\\t\\\\\\\"Notify the receiver that aMorph was just removed from its children\\\\\\\"\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'di 10/18/2004 21:50'!\\\\nremoveMorph: aMorph\\\\n\\\\t\\\\\\\"Remove the given morph from my submorphs\\\\\\\"\\\\n\\\\t| aWorld |\\\\n\\\\taMorph owner == self ifFalse:[^self].\\\\n\\\\taWorld := self world.\\\\n\\\\taWorld ifNotNil:[\\\\n\\\\t\\\\taMorph outOfWorld: aWorld.\\\\n\\\\t\\\\tself privateInvalidateMorph: aMorph.\\\\n\\\\t].\\\\n\\\\tself privateRemove: aMorph.\\\\n\\\\taMorph privateOwner: nil.\\\\n\\\\tself removedMorph: aMorph.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'sw 10/25/1999 23:34'!\\\\nreplaceSubmorph: oldMorph by: newMorph\\\\n\\\\t| index itsPosition w |\\\\n\\\\toldMorph stopStepping.\\\\n\\\\titsPosition _ oldMorph referencePositionInWorld.\\\\n\\\\tindex _ submorphs indexOf: oldMorph.\\\\n\\\\toldMorph privateDelete.\\\\n\\\\tself privateAddMorph: newMorph atIndex: index.\\\\n\\\\tnewMorph referencePositionInWorld: itsPosition.\\\\n\\\\t(w _ newMorph world) ifNotNil:\\\\n\\\\t\\\\t[w startSteppingSubmorphsOf: newMorph]! !\\\\n\\\\n!Morph methodsFor: 'submorphs-add/remove' stamp: 'sw 9/1/2000 10:16'!\\\\nsubmorphIndexOf: aMorph\\\\n\\\\t\\\\\\\"Assuming aMorph to be one of my submorphs, answer where it occurs in my submorph list\\\\\\\"\\\\n\\\\n\\\\t^ submorphs indexOf: aMorph ifAbsent: [nil]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'testing' stamp: 'RAA 12/4/2000 10:44'!\\\\ncanDrawAtHigherResolution\\\\n\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'testing' stamp: 'ar 8/25/2001 19:14'!\\\\ncanDrawBorder: aBorderStyle\\\\n\\\\t\\\\\\\"Return true if the receiver can be drawn with the given border style.\\\\\\\"\\\\n\\\\t^true! !\\\\n\\\\n!Morph methodsFor: 'testing' stamp: 'RAA 10/20/2000 14:47'!\\\\ncompleteModificationHash\\\\n\\\\n\\\\\\\"World completeModificationHash\\\\\\\"\\\\n\\\\n\\\\t| resultSize result here i |\\\\n\\\\tresultSize _ 10.\\\\n\\\\tresult _ ByteArray new: resultSize.\\\\n\\\\tself allMorphsDo: [ :each | \\\\n\\\\t\\\\there _ each modificationHash.\\\\n\\\\t\\\\there withIndexDo: [ :ch :index |\\\\n\\\\t\\\\t\\\\ti _ index \\\\\\\\\\\\\\\\ resultSize + 1.\\\\n\\\\t\\\\t\\\\tresult at: i put: ((result at: i) bitXor: ch asciiValue)\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\t^result! !\\\\n\\\\n!Morph methodsFor: 'testing' stamp: 'sw 3/30/2005 04:17'!\\\\ncouldMakeSibling\\\\n\\\\t\\\\\\\"Answer whether it is appropriate to ask the receiver to make a sibling\\\\\\\"\\\\n\\\\n\\\\t^ true! !\\\\n\\\\n!Morph methodsFor: 'testing' stamp: 'dgd 8/31/2004 15:00'!\\\\nisDockingBar\\\\n\\\\t\\\\\\\"Return true if the receiver is a docking bar\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'testing' stamp: 'ar 9/22/2000 13:44'!\\\\nisFlexed\\\\n\\\\t\\\\\\\"Return true if the receiver is currently flexed\\\\\\\"\\\\n\\\\towner ifNil:[^false].\\\\n\\\\t^owner isFlexMorph! !\\\\n\\\\n!Morph methodsFor: 'testing' stamp: 'dgd 9/20/2004 14:31'!\\\\nisFullOnScreen\\\\n\\\\t\\\\\\\"Answer if the receiver is full contained in the owner visible  \\\\n\\\\tarea.\\\\\\\"\\\\n\\\\towner isInMemory\\\\n\\\\t\\\\tifFalse: [^ true].\\\\n\\\\towner isNil\\\\n\\\\t\\\\tifTrue: [^ true].\\\\n\\\\tself visible\\\\n\\\\t\\\\tifFalse: [^ true].\\\\n\\\\t^ owner clearArea containsRect: self fullBounds! !\\\\n\\\\n!Morph methodsFor: 'testing' stamp: 'nk 10/13/2003 18:36'!\\\\nisLineMorph\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'testing'!\\\\nisMorph\\\\n\\\\n\\\\t^ true! !\\\\n\\\\n!Morph methodsFor: 'testing' stamp: 'nk 6/12/2004 09:17'!\\\\nisSketchMorph\\\\n\\\\t^self class isSketchMorphClass! !\\\\n\\\\n!Morph methodsFor: 'testing' stamp: 'md 2/27/2006 09:59'!\\\\nknownName\\\\n\\\\t\\\\\\\"answer a name by which the receiver is known, or nil if none\\\\\\\"\\\\n\\\\t^ extension ifNotNil: [extension externalName]! !\\\\n\\\\n!Morph methodsFor: 'testing' stamp: 'RAA 10/20/2000 14:47'!\\\\nmodificationHash\\\\n\\\\n\\\\t^String \\\\n\\\\t\\\\tstreamContents: [ :strm |\\\\n\\\\t\\\\t\\\\tself longPrintOn: strm\\\\n\\\\t\\\\t]\\\\n\\\\t\\\\tlimitedTo: 25\\\\n! !\\\\n\\\\n!Morph methodsFor: 'testing' stamp: 'tk 7/28/2005 04:46'!\\\\nrenameInternal: aName \\\\n\\\\t\\\\\\\"Change the internal name (because of a conflict) but leave the external name unchanged.  Change Player class name, but do not change the names that appear in tiles.  When coming in from disk, and have name conflict, References will already have the new name. \\\\\\\"\\\\n\\\\n\\\\tself knownName = aName ifTrue: [^ aName].\\\\n\\\\tself topRendererOrSelf setNameTo: aName.\\\\n\\\\t\\\\n\\\\t\\\\\\\"References dictionary already has key aName\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"If this player has a viewer flap, it will remain present\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Tiles in scripts all stay the same\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Compiled methods for scripts have been fixed up because the same association was reused\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ aName! !\\\\n\\\\n!Morph methodsFor: 'testing' stamp: 'dvf 8/23/2003 11:50'!\\\\nrenameTo: aName \\\\n\\\\t\\\\\\\"Set Player name in costume. Update Viewers. Fix all tiles (old style). fix \\\\n\\\\tReferences. New tiles: recompile, and recreate open scripts. If coming in \\\\n\\\\tfrom disk, and have name conflict, References will already have new \\\\n\\\\tname. \\\\\\\"\\\\n\\\\n\\\\t| aPresenter putInViewer aPasteUp renderer oldKey assoc classes oldName |\\\\n\\\\toldName := self knownName.\\\\n\\\\t(renderer := self topRendererOrSelf) setNameTo: aName.\\\\n\\\\tputInViewer := false.\\\\n\\\\t((aPresenter := self presenter) isNil or: [renderer player isNil]) \\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[putInViewer := aPresenter currentlyViewing: renderer player.\\\\n\\\\t\\\\t\\\\tputInViewer ifTrue: [renderer player viewerFlapTab hibernate]].\\\\n\\\\t\\\\\\\"empty it temporarily\\\\\\\"\\\\n\\\\t(aPasteUp := self topPasteUp) \\\\n\\\\t\\\\tifNotNil: [aPasteUp allTileScriptingElements do: [:m | m bringUpToDate]].\\\\n\\\\t\\\\\\\"Fix References dictionary. See restoreReferences to know why oldKey is  \\\\n\\\\talready aName, but oldName is the old name.\\\\\\\"\\\\n\\\\toldKey := References keyAtIdentityValue: renderer player ifAbsent: [].\\\\n\\\\toldKey ifNotNil: \\\\n\\\\t\\\\t\\\\t[assoc := References associationAt: oldKey.\\\\n\\\\t\\\\t\\\\toldKey = aName \\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"normal rename\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tassoc key: (renderer player uniqueNameForReferenceFrom: aName).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tReferences rehash]].\\\\n\\\\tputInViewer ifTrue: [aPresenter viewMorph: self].\\\\n\\\\t\\\\\\\"recreate my viewer\\\\\\\"\\\\n\\\\toldKey ifNil: [^aName].\\\\n\\\\t\\\\\\\"Force strings in tiles to be remade with new name. New tiles only.\\\\\\\"\\\\n\\\\tPreferences universalTiles ifFalse: [^aName].\\\\n\\\\tclasses := (self systemNavigation allCallsOn: assoc) \\\\n\\\\t\\\\t\\\\t\\\\tcollect: [:each | each classSymbol].\\\\n\\\\tclasses asSet \\\\n\\\\t\\\\tdo: [:clsName | (Smalltalk at: clsName) replaceSilently: oldName to: aName].\\\\n\\\\t\\\\\\\"replace in text body of all methods. Can be wrong!!\\\\\\\"\\\\n\\\\t\\\\\\\"Redo the tiles that are showing. This is also done in caller in \\\\n\\\\tunhibernate. \\\\\\\"\\\\n\\\\taPasteUp ifNotNil: \\\\n\\\\t\\\\t\\\\t[aPasteUp allTileScriptingElements do: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:mm | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"just ScriptEditorMorphs\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnil.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(mm isKindOf: ScriptEditorMorph) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[((mm playerScripted class compiledMethodAt: mm scriptName) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\thasLiteral: assoc) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[mm\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\thibernate;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tunhibernate]]]].\\\\n\\\\t^aName! !\\\\n\\\\n!Morph methodsFor: 'testing' stamp: 'ar 12/3/2001 12:33'!\\\\nshouldDropOnMouseUp\\\\n\\\\t| former |\\\\n\\\\tformer _ self formerPosition ifNil:[^false].\\\\n\\\\t^(former dist: self position) > 10! !\\\\n\\\\n!Morph methodsFor: 'testing' stamp: 'RAA 1/16/2001 17:20'!\\\\nstepTime\\\\n\\\\t\\\\\\\"Answer the desired time between steps in milliseconds. This default implementation requests that the 'step' method be called once every second.\\\\\\\"\\\\n\\\\n\\\\t^ self topRendererOrSelf player ifNotNil: [10] ifNil: [1000]! !\\\\n\\\\n!Morph methodsFor: 'testing' stamp: 'sw 10/24/2004 15:28'!\\\\nwantsSteps\\\\n\\\\t\\\\\\\"Return true if the receiver overrides the default Morph step method.\\\\\\\"\\\\n\\\\t\\\\\\\"Details: Find first class in superclass chain that implements #step and return true if it isn't class Morph.\\\\\\\"\\\\n\\\\n\\\\t| c |\\\\n\\\\tself isPartsDonor ifTrue: [^ false].\\\\n\\\\t(self == self topRendererOrSelf) ifTrue: [self player wantsSteps ifTrue: [^ true]].\\\\n\\\\tc _ self class.\\\\n\\\\t[c includesSelector: #step] whileFalse: [c _ c superclass].\\\\n\\\\t^ c ~= Morph! !\\\\n\\\\n\\\\n!Morph methodsFor: 'text-anchor' stamp: 'ar 12/17/2001 12:45'!\\\\naddTextAnchorMenuItems: topMenu hand: aHand\\\\n\\\\t| aMenu |\\\\n\\\\taMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\taMenu addUpdating: #hasInlineAnchorString action: #changeInlineAnchor.\\\\n\\\\taMenu addUpdating: #hasParagraphAnchorString action: #changeParagraphAnchor.\\\\n\\\\taMenu addUpdating: #hasDocumentAnchorString action: #changeDocumentAnchor.\\\\n\\\\ttopMenu ifNotNil:[topMenu add: 'text anchor' subMenu: aMenu].\\\\n\\\\t^aMenu! !\\\\n\\\\n!Morph methodsFor: 'text-anchor' stamp: 'aoy 2/15/2003 21:47'!\\\\nchangeDocumentAnchor\\\\n\\\\t\\\\\\\"Change the anchor from/to document anchoring\\\\\\\"\\\\n\\\\n\\\\t| newType |\\\\n\\\\tnewType := self textAnchorType == #document \\\\n\\\\t\\\\tifTrue: [#paragraph]\\\\n\\\\t\\\\tifFalse: [ #document].\\\\n\\\\towner isTextMorph \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[owner \\\\n\\\\t\\\\t\\\\t\\\\tanchorMorph: self\\\\n\\\\t\\\\t\\\\t\\\\tat: self position\\\\n\\\\t\\\\t\\\\t\\\\ttype: newType]! !\\\\n\\\\n!Morph methodsFor: 'text-anchor' stamp: 'aoy 2/15/2003 21:48'!\\\\nchangeInlineAnchor\\\\n\\\\t\\\\\\\"Change the anchor from/to line anchoring\\\\\\\"\\\\n\\\\n\\\\t| newType |\\\\n\\\\tnewType := self textAnchorType == #inline \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [#paragraph]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [#inline]. \\\\n\\\\towner isTextMorph \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[owner \\\\n\\\\t\\\\t\\\\t\\\\tanchorMorph: self\\\\n\\\\t\\\\t\\\\t\\\\tat: self position\\\\n\\\\t\\\\t\\\\t\\\\ttype: newType]! !\\\\n\\\\n!Morph methodsFor: 'text-anchor' stamp: 'aoy 2/15/2003 21:48'!\\\\nchangeParagraphAnchor\\\\n\\\\t\\\\\\\"Change the anchor from/to paragraph anchoring\\\\\\\"\\\\n\\\\n\\\\t| newType |\\\\n\\\\tnewType := self textAnchorType == #paragraph \\\\n\\\\t\\\\tifTrue: [#document]\\\\n\\\\t\\\\tifFalse: [#paragraph].\\\\n\\\\towner isTextMorph \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[owner \\\\n\\\\t\\\\t\\\\t\\\\tanchorMorph: self\\\\n\\\\t\\\\t\\\\t\\\\tat: self position\\\\n\\\\t\\\\t\\\\t\\\\ttype: newType]! !\\\\n\\\\n!Morph methodsFor: 'text-anchor' stamp: 'dgd 9/6/2003 18:14'!\\\\nhasDocumentAnchorString\\\\n\\\\t^ (self textAnchorType == #document\\\\n\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\tifFalse: ['<off>'])\\\\n\\\\t\\\\t, 'Document' translated! !\\\\n\\\\n!Morph methodsFor: 'text-anchor' stamp: 'dgd 9/6/2003 18:14'!\\\\nhasInlineAnchorString\\\\n\\\\t^ (self textAnchorType == #inline\\\\n\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\tifFalse: ['<off>'])\\\\n\\\\t\\\\t, 'Inline' translated! !\\\\n\\\\n!Morph methodsFor: 'text-anchor' stamp: 'dgd 9/6/2003 18:14'!\\\\nhasParagraphAnchorString\\\\n\\\\t^ (self textAnchorType == #paragraph\\\\n\\\\t\\\\tifTrue: ['<on>']\\\\n\\\\t\\\\tifFalse: ['<off>'])\\\\n\\\\t\\\\t, 'Paragraph' translated! !\\\\n\\\\n!Morph methodsFor: 'text-anchor' stamp: 'ar 12/16/2001 19:47'!\\\\nrelativeTextAnchorPosition\\\\n\\\\t^self valueOfProperty: #relativeTextAnchorPosition! !\\\\n\\\\n!Morph methodsFor: 'text-anchor' stamp: 'ar 12/16/2001 19:22'!\\\\nrelativeTextAnchorPosition: aPoint\\\\n\\\\t^self setProperty: #relativeTextAnchorPosition toValue: aPoint! !\\\\n\\\\n!Morph methodsFor: 'text-anchor' stamp: 'ar 12/16/2001 18:36'!\\\\ntextAnchorType\\\\n\\\\t^self valueOfProperty: #textAnchorType ifAbsent:[#document]! !\\\\n\\\\n!Morph methodsFor: 'text-anchor' stamp: 'ar 12/16/2001 18:37'!\\\\ntextAnchorType: aSymbol\\\\n\\\\taSymbol == #document\\\\n\\\\t\\\\tifTrue:[^self removeProperty: #textAnchorType]\\\\n\\\\t\\\\tifFalse:[^self setProperty: #textAnchorType toValue: aSymbol].! !\\\\n\\\\n\\\\n!Morph methodsFor: 'thumbnail' stamp: 'sw 10/26/2000 08:32'!\\\\ndemandsThumbnailing\\\\n\\\\t\\\\\\\"Answer whether the receiver, if in a thumbnailable parts bin, wants to be thumbnailed whether or not size requires it\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'thumbnail' stamp: 'dgd 9/12/2004 21:12'!\\\\nicon\\\\n\\\\t\\\\\\\"Answer a form with an icon to represent the receiver\\\\\\\"\\\\n\\\\t^ self valueOfProperty: #icon! !\\\\n\\\\n!Morph methodsFor: 'thumbnail' stamp: 'dgd 9/12/2004 20:33'!\\\\niconOrThumbnail\\\\n\\\\t\\\\\\\"Answer an appropiate form to represent the receiver\\\\\\\"\\\\n\\\\n\\\\t^ self icon\\\\n\\\\t\\\\tifNil: [ | maxExtent fb |maxExtent := 320 @ 240.\\\\n\\\\t\\\\t\\\\tfb := self fullBounds.\\\\n\\\\t\\\\t\\\\tfb area <= (maxExtent x * maxExtent y)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self imageForm]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self imageFormForRectangle: (fb topLeft extent: maxExtent)]\\\\n\\\\t\\\\t]\\\\n! !\\\\n\\\\n!Morph methodsFor: 'thumbnail' stamp: 'dgd 9/13/2004 12:43'!\\\\niconOrThumbnailOfSize: aNumberOrPoint \\\\n\\\\t\\\\\\\"Answer an appropiate form to represent the receiver\\\\\\\"\\\\n\\\\n\\\\t^ self iconOrThumbnail scaledIntoFormOfSize: aNumberOrPoint\\\\n! !\\\\n\\\\n!Morph methodsFor: 'thumbnail' stamp: 'sw 8/16/2000 17:40'!\\\\nmorphRepresented\\\\n\\\\t\\\\\\\"If the receiver is an alias, answer the morph it represents; else answer self\\\\\\\"\\\\n\\\\n\\\\t^ self! !\\\\n\\\\n!Morph methodsFor: 'thumbnail' stamp: 'sw 6/16/1999 11:29'!\\\\npermitsThumbnailing\\\\n\\\\t^ true! !\\\\n\\\\n!Morph methodsFor: 'thumbnail' stamp: 'ar 11/9/2000 20:42'!\\\\nreadoutForField: fieldSym\\\\n\\\\t\\\\\\\"Provide a readout that will show the value of the slot/pseudoslot of the receiver generated by sending fieldSym to the receiver\\\\\\\"\\\\n\\\\n\\\\t| aContainer |\\\\n\\\\t\\\\\\\"still need to get this right\\\\\\\"\\\\n\\\\taContainer _ AlignmentMorph newColumn.\\\\n\\\\taContainer layoutInset: 0; hResizing: #rigid; vResizing: #shrinkWrap.\\\\n\\\\taContainer addMorphBack: (StringMorph new contents: (self perform: fieldSym) asString).\\\\n\\\\t^ aContainer! !\\\\n\\\\n!Morph methodsFor: 'thumbnail' stamp: 'sw 12/6/2000 21:28'!\\\\nrepresentativeNoTallerThan: maxHeight norWiderThan: maxWidth thumbnailHeight: thumbnailHeight\\\\n\\\\t\\\\\\\"Return a morph representing the receiver but which is no taller than aHeight.  If the receiver is already small enough, just return it, else return a MorphThumbnail companioned to the receiver, enforcing the maxWidth.  If the receiver personally *demands* thumbnailing, do it even if there is no size-related reason to do it.\\\\\\\"\\\\n\\\\n\\\\tself demandsThumbnailing ifFalse:\\\\n\\\\t\\\\t[self permitsThumbnailing ifFalse: [^ self].\\\\n\\\\t\\\\t(self fullBounds height <= maxHeight and: [self fullBounds width <= maxWidth]) ifTrue: [^ self]].\\\\n\\\\n\\\\t^ MorphThumbnail new extent: maxWidth @ (thumbnailHeight min: self fullBounds height); morphRepresented: self! !\\\\n\\\\n!Morph methodsFor: 'thumbnail' stamp: 'tk 3/28/2000 11:08'!\\\\nupdateThumbnailUrl\\\\n\\\\t\\\\\\\"If I have a cached thumbnail, then update it's urls.\\\\\\\"\\\\n\\\\t| cachedThumbnail |\\\\n\\\\n\\\\t(cachedThumbnail _ self valueOfProperty: #cachedThumbnail) ifNotNil:\\\\n\\\\t\\\\t[(cachedThumbnail respondsTo: #computeThumbnail) \\\\n\\\\t\\\\t\\\\tifTrue: [cachedThumbnail pageMorph: self url inBook: owner url]\\\\n\\\\t\\\\t\\\\tifFalse: [self removeProperty: #computeThumbnail]].\\\\n\\\\t\\\\t\\\\t\\\\\\\"Test and removal are because the thumbnail is being replaced \\\\n\\\\t\\\\t\\\\tby another Morph.  We don't know why.  Need to fix that at \\\\n\\\\t\\\\t\\\\tthe source.\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'thumbnail' stamp: 'tk 3/28/2000 21:55'!\\\\nupdateThumbnailUrlInBook: bookUrl\\\\n\\\\t\\\\\\\"If I have a cached thumbnail, then update it's urls.\\\\\\\"\\\\n\\\\t| cachedThumbnail |\\\\n\\\\n\\\\t(cachedThumbnail _ self valueOfProperty: #cachedThumbnail) ifNotNil:\\\\n\\\\t\\\\t[(cachedThumbnail respondsTo: #computeThumbnail) \\\\n\\\\t\\\\t\\\\tifTrue: [cachedThumbnail pageMorph: self url inBook: bookUrl]\\\\n\\\\t\\\\t\\\\tifFalse: [self removeProperty: #computeThumbnail]].\\\\n\\\\t\\\\t\\\\t\\\\\\\"Test and removal are because the thumbnail is being replaced \\\\n\\\\t\\\\t\\\\tby another Morph.  We don't know why.  Need to fix that at \\\\n\\\\t\\\\t\\\\tthe source.\\\\\\\"! !\\\\n\\\\n\\\\n!Morph methodsFor: 'undo' stamp: 'ar 8/31/2000 23:15'!\\\\ncommandHistory\\\\n\\\\t\\\\\\\"Return the command history for the receiver\\\\\\\"\\\\n\\\\t| w |\\\\n\\\\t(w _ self world) ifNotNil:[^w commandHistory].\\\\n\\\\t(w _ self currentWorld) ifNotNil:[^w commandHistory].\\\\n\\\\t^CommandHistory new. \\\\\\\"won't really record anything but prevent breaking things\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'undo' stamp: 'md 10/22/2003 15:56'!\\\\nundoMove: cmd redo: redo owner: formerOwner bounds: formerBounds predecessor: formerPredecessor \\\\n\\\\t\\\\\\\"Handle undo and redo of move commands in morphic\\\\\\\"\\\\n\\\\n\\\\tself owner ifNil: [^Beeper beep].\\\\n\\\\tredo \\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"undo sets up the redo state first\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\tcmd \\\\n\\\\t\\\\t\\\\t\\\\tredoTarget: self\\\\n\\\\t\\\\t\\\\t\\\\tselector: #undoMove:redo:owner:bounds:predecessor:\\\\n\\\\t\\\\t\\\\t\\\\targuments: { \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcmd.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttrue.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\towner.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbounds.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\towner morphPreceding: self}].\\\\n\\\\tformerOwner ifNotNil: \\\\n\\\\t\\\\t\\\\t[formerPredecessor ifNil: [formerOwner addMorphFront: self]\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil: [formerOwner addMorph: self after: formerPredecessor]].\\\\n\\\\tself bounds: formerBounds.\\\\n\\\\t(self isSystemWindow) ifTrue: [self activate]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'updating' stamp: 'ar 6/25/2001 19:46'!\\\\nchanged\\\\n\\\\t\\\\\\\"Report that the area occupied by this morph should be redrawn.\\\\\\\"\\\\n\\\\t^fullBounds \\\\n\\\\t\\\\tifNil:[self invalidRect: self outerBounds]\\\\n\\\\t\\\\tifNotNil:[self invalidRect: fullBounds]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'user interface' stamp: 'tak 3/15/2005 17:36'!\\\\nbecomeModal\\\\n\\\\tself currentWorld\\\\n\\\\t\\\\tifNotNil: [self currentWorld modalWindow: self]! !\\\\n\\\\n!Morph methodsFor: 'user interface' stamp: 'sw 5/29/2000 00:41'!\\\\ndefaultLabelForInspector\\\\n\\\\t\\\\\\\"Answer the default label to be used for an Inspector window on the receiver.\\\\\\\"\\\\n\\\\t^ super printString truncateTo: 40! !\\\\n\\\\n!Morph methodsFor: 'user interface' stamp: 'tak 3/15/2005 17:10'!\\\\ndoCancel\\\\n\\\\tself delete! !\\\\n\\\\n!Morph methodsFor: 'user interface' stamp: 'sw 10/2/97 23:08'!\\\\ninitialExtent\\\\n\\\\t| ext |\\\\n\\\\t(ext _ self valueOfProperty: #initialExtent)\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t[^ ext].\\\\n\\\\t^ super initialExtent! !\\\\n\\\\n\\\\n!Morph methodsFor: 'viewer' stamp: 'sw 10/30/1998 14:46'!\\\\nexternalName\\\\n\\\\t^ self knownName ifNil: [self innocuousName]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'visual properties' stamp: 'ar 6/25/1999 11:11'!\\\\ncanHaveFillStyles\\\\n\\\\t\\\\\\\"Return true if the receiver can have general fill styles; not just colors.\\\\n\\\\tThis method is for gradually converting old morphs.\\\\\\\"\\\\n\\\\t^self class == Morph \\\\\\\"no subclasses\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'visual properties' stamp: 'mk 8/7/2005 10:02'!\\\\ncornerStyle\\\\n\\\\t\\\\\\\"Returns one of the following symbols:\\\\n\\\\t\\\\t#square\\\\n\\\\t\\\\t#rounded\\\\n\\\\taccording to the current corner style.\\\\\\\"\\\\n\\\\n\\\\t^ self valueOfProperty: #cornerStyle ifAbsent: [#square]! !\\\\n\\\\n!Morph methodsFor: 'visual properties' stamp: 'nk 8/28/2003 15:56'!\\\\ndefaultBitmapFillForm\\\\n\\\\t^ImageMorph defaultForm.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'visual properties' stamp: 'dgd 2/16/2003 20:02'!\\\\nfillStyle\\\\n\\\\t\\\\\\\"Return the current fillStyle of the receiver.\\\\\\\"\\\\n\\\\t^ self\\\\n\\\\t\\\\tvalueOfProperty: #fillStyle\\\\n\\\\t\\\\tifAbsent: [\\\\\\\"Workaround already converted morphs\\\\\\\"\\\\n\\\\t\\\\t\\\\tcolor\\\\n\\\\t\\\\t\\\\t\\\\tifNil: [self defaultColor]]! !\\\\n\\\\n!Morph methodsFor: 'visual properties' stamp: 'ar 6/18/1999 07:05'!\\\\nfillStyle: aFillStyle\\\\n\\\\t\\\\\\\"Set the current fillStyle of the receiver.\\\\\\\"\\\\n\\\\tself setProperty: #fillStyle toValue: aFillStyle.\\\\n\\\\t\\\\\\\"Workaround for Morphs not yet converted\\\\\\\"\\\\n\\\\tcolor _ aFillStyle asColor.\\\\n\\\\tself changed.! !\\\\n\\\\n!Morph methodsFor: 'visual properties' stamp: 'dgd 1/7/2005 19:31'!\\\\nfillWithRamp: rampSpecsOrColor oriented: aRatio \\\\n\\\\trampSpecsOrColor isColor\\\\n\\\\t\\\\tifTrue: [self color: rampSpecsOrColor\\\\\\\".\\\\n\\\\t\\\\t\\\\tself borderColor: rampSpecsOrColor muchDarker\\\\\\\"]\\\\n\\\\t\\\\tifFalse: [| fill | \\\\n\\\\t\\\\t\\\\tfill := GradientFillStyle ramp: rampSpecsOrColor.\\\\n\\\\t\\\\t\\\\tfill origin: self bounds topLeft.\\\\n\\\\t\\\\t\\\\tfill direction: (self bounds extent * aRatio) truncated.\\\\n\\\\t\\\\t\\\\tfill radial: false.\\\\n\\\\t\\\\t\\\\tself fillStyle: fill.\\\\n\\\\t\\\\t\\\\tself borderColor: (rampSpecsOrColor first value mixed: 0.5 with: rampSpecsOrColor last value) muchDarker]! !\\\\n\\\\n!Morph methodsFor: 'visual properties' stamp: 'nk 8/28/2003 15:57'!\\\\nuseBitmapFill\\\\n\\\\t\\\\\\\"Make receiver use a solid fill style (e.g., a simple color)\\\\\\\"\\\\n\\\\t| fill |\\\\n\\\\tself fillStyle isBitmapFill ifTrue:[^self]. \\\\\\\"Already done\\\\\\\"\\\\n\\\\tfill _ BitmapFillStyle fromForm: self defaultBitmapFillForm.\\\\n\\\\t\\\\\\\"Note: Must fix the origin due to global coordinates\\\\\\\"\\\\n\\\\tfill origin: self bounds origin.\\\\n\\\\tself fillStyle: fill.! !\\\\n\\\\n!Morph methodsFor: 'visual properties' stamp: 'ar 6/25/1999 11:11'!\\\\nuseDefaultFill\\\\n\\\\t\\\\\\\"Make receiver use a solid fill style (e.g., a simple color)\\\\\\\"\\\\n\\\\tself fillStyle: self defaultColor.! !\\\\n\\\\n!Morph methodsFor: 'visual properties' stamp: 'nk 2/27/2003 11:48'!\\\\nuseGradientFill\\\\n\\\\t\\\\\\\"Make receiver use a solid fill style (e.g., a simple color)\\\\\\\"\\\\n\\\\t| fill color1 color2 |\\\\n\\\\tself fillStyle isGradientFill ifTrue:[^self]. \\\\\\\"Already done\\\\\\\"\\\\n\\\\tcolor1 _ self color asColor.\\\\n\\\\tcolor2 _ color1 negated.\\\\n\\\\tfill _ GradientFillStyle ramp: {0.0 -> color1. 1.0 -> color2}.\\\\n\\\\tfill origin: self topLeft.\\\\n\\\\tfill direction: 0 @ self bounds extent y.\\\\n\\\\tfill normal: self bounds extent x @ 0.\\\\n\\\\tfill radial: false.\\\\n\\\\tself fillStyle: fill! !\\\\n\\\\n!Morph methodsFor: 'visual properties' stamp: 'ar 6/18/1999 06:57'!\\\\nuseSolidFill\\\\n\\\\t\\\\\\\"Make receiver use a solid fill style (e.g., a simple color)\\\\\\\"\\\\n\\\\tself fillStyle isSolidFill ifTrue:[^self]. \\\\\\\"Already done\\\\\\\"\\\\n\\\\tself fillStyle: self fillStyle asColor. \\\\\\\"Try minimizing changes\\\\\\\"! !\\\\n\\\\n\\\\n!Morph methodsFor: 'WiW support' stamp: 'RAA 2/16/2001 13:57'!\\\\naddMorphInFrontOfLayer: aMorph\\\\n\\\\n\\\\t| targetLayer layerHere |\\\\n\\\\n\\\\ttargetLayer _ aMorph morphicLayerNumberWithin: self.\\\\n\\\\tsubmorphs do: [ :each |\\\\n\\\\t\\\\teach == aMorph ifTrue: [^self].\\\\n\\\\t\\\\tlayerHere _ each morphicLayerNumberWithin: self.\\\\n\\\\t\\\\t\\\\\\\"the <= is the difference - it insures we go to the front of our layer\\\\\\\"\\\\n\\\\t\\\\ttargetLayer <= layerHere ifTrue: [\\\\n\\\\t\\\\t\\\\t^self addMorph: aMorph inFrontOf: each\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\tself addMorphBack: aMorph.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'WiW support' stamp: 'RAA 6/29/2000 10:49'!\\\\naddMorphInLayer: aMorph\\\\n\\\\n\\\\tsubmorphs do: [ :each |\\\\n\\\\t\\\\teach == aMorph ifTrue: [^self].\\\\n\\\\t\\\\taMorph morphicLayerNumber < each morphicLayerNumber ifTrue: [\\\\n\\\\t\\\\t\\\\t^self addMorph: aMorph inFrontOf: each\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\tself addMorphBack: aMorph\\\\n! !\\\\n\\\\n!Morph methodsFor: 'WiW support' stamp: 'gk 5/24/2004 15:43'!\\\\neToyRejectDropMorph: morphToDrop event: evt\\\\n\\\\n\\\\t| tm am |\\\\n\\\\n\\\\ttm _ TextMorph new \\\\n\\\\t\\\\tbeAllFont: ((TextStyle named: Preferences standardEToysFont familyName) fontOfSize: 24);\\\\n\\\\t\\\\tcontents: 'GOT IT!!'.\\\\n\\\\t(am _ AlignmentMorph new)\\\\n\\\\t\\\\tcolor: Color yellow;\\\\n\\\\t\\\\tlayoutInset: 10;\\\\n\\\\t\\\\tuseRoundedCorners;\\\\n\\\\t\\\\tvResizing: #shrinkWrap;\\\\n\\\\t\\\\thResizing: #shrinkWrap;\\\\n\\\\t\\\\taddMorph: tm;\\\\n\\\\t\\\\tfullBounds;\\\\n\\\\t\\\\tposition: (self bounds center - (am extent // 2));\\\\n\\\\t\\\\topenInWorld: self world.\\\\n\\\\tSoundService default playSoundNamed: 'yum' ifAbsentReadFrom: 'yum.aif'.\\\\n\\\\tmorphToDrop rejectDropMorphEvent: evt.\\\\t\\\\t\\\\\\\"send it back where it came from\\\\\\\"\\\\n\\\\tam delete\\\\n! !\\\\n\\\\n!Morph methodsFor: 'WiW support' stamp: 'RAA 7/19/2000 20:44'!\\\\nmorphicLayerNumber\\\\n\\\\n\\\\t\\\\\\\"helpful for insuring some morphs always appear in front of or behind others.\\\\n\\\\tsmaller numbers are in front\\\\\\\"\\\\n\\\\n\\\\t^(owner isNil or: [owner isWorldMorph]) ifTrue: [\\\\n\\\\t\\\\tself valueOfProperty: #morphicLayerNumber ifAbsent: [100]\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\towner morphicLayerNumber\\\\n\\\\t].\\\\n\\\\n\\\\t\\\\\\\"leave lots of room for special things\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'WiW support' stamp: 'RAA 2/16/2001 13:54'!\\\\nmorphicLayerNumberWithin: anOwner\\\\n\\\\n\\\\t\\\\\\\"helpful for insuring some morphs always appear in front of or behind others.\\\\n\\\\tsmaller numbers are in front\\\\\\\"\\\\n\\\\n\\\\t^(owner isNil or: [owner isWorldMorph or: [anOwner == owner]]) ifTrue: [\\\\n\\\\t\\\\tself valueOfProperty: #morphicLayerNumber ifAbsent: [100]\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\towner morphicLayerNumber\\\\n\\\\t].\\\\n\\\\n\\\\t\\\\\\\"leave lots of room for special things\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'WiW support' stamp: 'RAA 7/16/2000 13:54'!\\\\nrandomBoundsFor: aMorph\\\\n\\\\n\\\\t| trialRect |\\\\n\\\\ttrialRect _ (\\\\n\\\\t\\\\tself topLeft + \\\\n\\\\t\\\\t\\\\t((self width * (15 + 75 atRandom/100)) rounded @\\\\n\\\\t\\\\t\\\\t(self height * (15 + 75 atRandom/100)) rounded)\\\\n\\\\t) extent: aMorph extent.\\\\n\\\\t^trialRect translateBy: (trialRect amountToTranslateWithin: self bounds)\\\\n! !\\\\n\\\\n!Morph methodsFor: 'WiW support' stamp: 'ar 3/18/2001 00:14'!\\\\nshouldGetStepsFrom: aWorld\\\\n\\\\t^self world == aWorld! !\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n!Morph methodsFor: '*eToys-customevents-scripting' stamp: 'nk 9/24/2003 17:31'!\\\\ninstantiatedUserScriptsDo: aBlock\\\\n\\\\tself actorStateOrNil ifNotNilDo: [ :aState | aState instantiatedUserScriptsDictionary do: aBlock]! !\\\\n\\\\n!Morph methodsFor: '*eToys-customevents-scripting' stamp: 'nk 9/25/2003 11:36'!\\\\nremoveAllEventTriggers\\\\n\\\\t\\\\\\\"Remove all the event registrations for my Player.\\\\n\\\\tUser custom events are triggered at the World,\\\\n\\\\twhile system custom events are triggered on individual Morphs.\\\\\\\"\\\\n\\\\n\\\\t| player |\\\\n\\\\t(player _ self player) ifNil: [ ^self ].\\\\n\\\\tself removeAllEventTriggersFor: player.\\\\n\\\\tself currentWorld removeAllEventTriggersFor: player.! !\\\\n\\\\n!Morph methodsFor: '*eToys-customevents-scripting' stamp: 'nk 9/24/2003 17:46'!\\\\nremoveAllEventTriggersFor: aPlayer\\\\n\\\\t\\\\\\\"Remove all the event registrations for aPlayer.\\\\n\\\\tUser custom events are triggered at the World,\\\\n\\\\twhile system custom events are triggered on individual Morphs.\\\\\\\"\\\\n\\\\n\\\\tself removeActionsSatisfying: \\\\n\\\\t\\\\t\\\\t[:action | action receiver == aPlayer and: [(#(#doScript: #triggerScript:) includes: action selector) ]].! !\\\\n\\\\n!Morph methodsFor: '*eToys-customevents-scripting' stamp: 'nk 9/25/2003 11:37'!\\\\nremoveEventTrigger: aSymbol\\\\n\\\\t\\\\\\\"Remove all the event registrations for my Player that are triggered by aSymbol.\\\\n\\\\tUser custom events are triggered at the World,\\\\n\\\\twhile system custom events are triggered on individual Morphs.\\\\\\\"\\\\n\\\\n\\\\t| player |\\\\n\\\\t(player _ self player) ifNil: [ ^self ].\\\\n\\\\tself removeEventTrigger: aSymbol for: player.\\\\n\\\\tself currentWorld removeEventTrigger: aSymbol for: player.! !\\\\n\\\\n!Morph methodsFor: '*eToys-customevents-scripting' stamp: 'nk 9/25/2003 11:24'!\\\\nremoveEventTrigger: aSymbol for: aPlayer \\\\n\\\\t\\\\\\\"Remove all the event registrations for aPlayer that are triggered by \\\\n\\\\taSymbol. User custom events are triggered at the World, \\\\n\\\\twhile system custom events are triggered on individual Morphs.\\\\\\\"\\\\n\\\\tself removeActionsSatisfying: [:action | action receiver == aPlayer\\\\n\\\\t\\\\t\\\\t\\\\tand: [(#(#doScript: #triggerScript: ) includes: action selector)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tand: [action arguments first == aSymbol]]]! !\\\\n\\\\n!Morph methodsFor: '*eToys-customevents-scripting' stamp: 'nk 9/25/2003 11:11'!\\\\nrenameScriptActionsFor: aPlayer from: oldSelector to: newSelector\\\\n\\\\n\\\\tself updateableActionMap keysAndValuesDo: [ :event :sequence |\\\\n\\\\t\\\\tsequence asActionSequence do: [ :action |\\\\n\\\\t\\\\t\\\\t((action receiver == aPlayer)\\\\n\\\\t\\\\t\\\\t\\\\tand: [ (#(doScript: triggerScript:) includes: action selector)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [ action arguments first == oldSelector ]])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [ action arguments at: 1 put: newSelector ]]]\\\\n! !\\\\n\\\\n!Morph methodsFor: '*eToys-customevents-scripting' stamp: 'nk 11/1/2004 11:00'!\\\\ntriggerCustomEvent: aSymbol\\\\n\\\\t\\\\\\\"Trigger whatever scripts may be connected to the custom event named aSymbol\\\\\\\"\\\\n\\\\n\\\\tself currentWorld triggerEtoyEvent: aSymbol from: self! !\\\\n\\\\n!Morph methodsFor: '*eToys-customevents-scripting' stamp: 'nk 11/1/2004 10:54'!\\\\ntriggerEtoyEvent: aSymbol\\\\n\\\\t\\\\\\\"Trigger whatever scripts may be connected to the event named aSymbol.\\\\n\\\\tIf anyone comes back to ask who sent it, return our player.\\\\\\\"\\\\n\\\\n\\\\t[ self triggerEvent: aSymbol ]\\\\n\\\\t\\\\ton: GetTriggeringObjectNotification do: [ :ex |\\\\n\\\\t\\\\t\\\\tex isNested\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [ ex pass ]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [ ex resume: self assuredPlayer ]]\\\\n! !\\\\n\\\\n!Morph methodsFor: '*eToys-customevents-scripting' stamp: 'nk 11/1/2004 10:58'!\\\\ntriggerEtoyEvent: aSymbol from: aMorph\\\\n\\\\t\\\\\\\"Trigger whatever scripts may be connected to the event named aSymbol.\\\\n\\\\tIf anyone comes back to ask who sent it, return aMorph's player.\\\\\\\"\\\\n\\\\n\\\\t[ self triggerEvent: aSymbol ]\\\\n\\\\t\\\\ton: GetTriggeringObjectNotification do: [ :ex |\\\\n\\\\t\\\\t\\\\tex isNested\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [ ex pass ]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [ ex resume: aMorph assuredPlayer ]]\\\\n! !\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n!Morph methodsFor: '*Flash-classification' stamp: 'ar 8/10/1998 18:50'!\\\\nisFlashMorph\\\\n\\\\t^false! !\\\\n\\\\n\\\\n!Morph methodsFor: '*flexibleVocabularies-flexiblevocabularies-scripting' stamp: 'nk 9/11/2004 17:31'!\\\\nunfilteredCategoriesForViewer\\\\n\\\\t\\\\\\\"Answer a list of symbols representing the categories to offer in the viewer, in order of:\\\\n\\\\t- masterOrderingOfCategorySymbols first\\\\n\\\\t- others last in order by translated wording\\\\\\\"\\\\n\\\\t\\\\\\\"\\\\n\\\\tMorph basicNew unfilteredCategoriesForViewer\\\\n\\\\t\\\\\\\"\\\\n\\\\t^self renderedMorph class unfilteredCategoriesForViewer.\\\\n! !\\\\n\\\\n\\\\n!Morph methodsFor: '*MorphicExtras-accessing' stamp: 'dgd 1/7/2005 19:07'!\\\\nhighlightOnlySubmorph: aMorph\\\\n\\\\t\\\\\\\"Distinguish only aMorph with border highlighting (2-pixel wide red); make all my other submorphs have one-pixel-black highlighting.  This is a rather special-purpose and hard-coded highlighting regime, of course.  Later, if someone cared to do it, we could parameterize the widths and colors via properties, or some such.\\\\\\\"\\\\n\\\\n\\\\tself submorphs do:\\\\n\\\\t\\\\t[:m |\\\\n\\\\t\\\\t\\\\tm == aMorph\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [m borderWidth: 1; borderColor: Color red. m firstSubmorph color: Color red]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [m borderWidth: 1; borderColor: Color black. m firstSubmorph color: Color black]\\\\n\\\\t\\\\t].\\\\n! !\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n!Morph methodsFor: '*MorphicExtras-geometry' stamp: 'dgd 8/31/2004 16:22'!\\\\nshiftSubmorphsBy: delta\\\\n\\\\tself shiftSubmorphsOtherThan: (submorphs select: [:m | m wantsToBeTopmost]) by: delta! !\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n!Morph methodsFor: '*MorphicExtras-menus' stamp: 'dgd 4/3/2006 14:18'!\\\\ndismissButton\\\\n\\\\t\\\\\\\"Answer a button whose action would be to dismiss the receiver, and whose action is to send #delete to the receiver\\\\\\\"\\\\n\\\\n\\\\t| aButton |\\\\n\\\\taButton _ SimpleButtonMorph new.\\\\n\\\\taButton\\\\n\\\\t\\\\ttarget: self topRendererOrSelf;\\\\n\\\\t\\\\tcolor: ColorTheme current cancelColor;\\\\n\\\\t\\\\tborderColor: ColorTheme current cancelColor muchDarker;\\\\n\\\\t\\\\tborderWidth: 1;\\\\n\\\\t\\\\tlabel: 'X' font: Preferences standardButtonFont;\\\\n\\\\t\\\\tactionSelector: #delete;\\\\n\\\\t\\\\tsetBalloonText: 'dismiss' translated.\\\\n\\\\t^ aButton! !\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n!Morph methodsFor: '*services-base' stamp: 'rr 6/10/2005 11:30'!\\\\nrequestor\\\\n\\\\t^ owner ifNil: [super requestor] ifNotNil: [owner requestor]! !\\\\n\\\\n\\\\n!Morph methodsFor: '*sound-piano rolls' stamp: 'RAA 12/11/2000 17:29'!\\\\naddMorphsTo: morphList pianoRoll: pianoRoll eventTime: t betweenTime: leftTime and: rightTime\\\\n\\\\n\\\\t\\\\\\\"a hack to allow for abitrary morphs to be dropped into piano roll\\\\\\\"\\\\n\\\\tt > rightTime ifTrue: [^ self].  \\\\n\\\\tt < leftTime ifTrue: [^ self].\\\\n\\\\tmorphList add: (self left: (pianoRoll xForTime: t)).\\\\n! !\\\\n\\\\n!Morph methodsFor: '*sound-piano rolls' stamp: 'RAA 12/11/2000 15:48'!\\\\nencounteredAtTime: ticks inScorePlayer: scorePlayer atIndex: index inEventTrack: track secsPerTick: secsPerTick\\\\n\\\\n\\\\t\\\\\\\"a hack to allow for abitrary morphs to be dropped into piano roll\\\\\\\"\\\\n\\\\tself triggerActionFromPianoRoll.! !\\\\n\\\\n!Morph methodsFor: '*sound-piano rolls' stamp: 'stephaneducasse 2/4/2006 20:40'!\\\\njustDroppedIntoPianoRoll: pianoRoll event: evt\\\\n\\\\t\\\\n\\\\t| ambientEvent startTimeInScore |\\\\n\\\\tstartTimeInScore := pianoRoll timeForX: self left.\\\\n\\\\n\\\\tambientEvent := AmbientEvent new \\\\n\\\\t\\\\tmorph: self;\\\\n\\\\t\\\\ttime: startTimeInScore.\\\\n\\\\n\\\\tpianoRoll score addAmbientEvent: ambientEvent.\\\\n\\\\n\\\\t\\\\\\\"self endTime > pianoRoll scorePlayer durationInTicks ifTrue:\\\\n\\\\t\\\\t[pianoRoll scorePlayer updateDuration]\\\\\\\"\\\\n! !\\\\n\\\\n!Morph methodsFor: '*sound-piano rolls' stamp: 'RAA 12/11/2000 23:21'!\\\\npauseFrom: scorePlayer\\\\n\\\\n\\\\t\\\\\\\"subclasses should take five\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: '*sound-piano rolls' stamp: 'RAA 12/11/2000 23:22'!\\\\nresetFrom: scorePlayer\\\\n\\\\n\\\\t\\\\\\\"subclasses should revert to their initial state\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: '*sound-piano rolls' stamp: 'RAA 12/11/2000 23:21'!\\\\nresumeFrom: scorePlayer\\\\n\\\\n\\\\t\\\\\\\"subclasses should continue from their current position\\\\\\\"\\\\n\\\\t\\\\\\\"a hack to allow for abitrary morphs to be dropped into piano roll\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: '*sound-piano rolls' stamp: 'stephaneducasse 2/4/2006 20:40'!\\\\ntriggerActionFromPianoRoll\\\\n\\\\n\\\\t| evt |\\\\n\\\\t\\\\\\\"a hack to allow for abitrary morphs to be dropped into piano roll\\\\\\\"\\\\n\\\\tself world ifNil: [^self].\\\\n\\\\tevt := MouseEvent new setType: nil position: self center buttons: 0 hand: self world activeHand.\\\\n\\\\tself programmedMouseUp: evt for: self.\\\\n\\\\n! !\\\\n\\\\n\\\\n!Morph methodsFor: 'private' stamp: 'sw 10/25/2000 06:11'!\\\\nmoveWithPenDownBy: delta\\\\n\\\\t\\\\\\\"If this is a costume for a player with its pen down, draw a line.\\\\\\\"\\\\n\\\\n\\\\t| trailMorph tfm start tfmEnd |\\\\n\\\\t(trailMorph _ self trailMorph) ifNotNil:\\\\n\\\\t\\\\t[tfm _ self owner transformFrom: trailMorph.\\\\n\\\\t\\\\tstart _  self referencePosition.\\\\n\\\\t\\\\ttrailMorph batchPenTrails\\\\n\\\\t\\\\t\\\\tifTrue: [trailMorph notePenDown: true\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforPlayer: self player\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tat: (tfm localPointToGlobal: start)]\\\\n\\\\t\\\\t\\\\tifFalse: [trailMorph drawPenTrailFor: self\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfrom: (tfm localPointToGlobal: start)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tto: (tfmEnd _ tfm localPointToGlobal: start + delta).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttrailMorph noteNewLocation: tfmEnd forPlayer: self player]]\\\\n! !\\\\n\\\\n!Morph methodsFor: 'private' stamp: 'nk 10/11/2003 16:08'!\\\\nprivateAddAllMorphs: aCollection atIndex: index\\\\n\\\\t\\\\\\\"Private. Add aCollection of morphs to the receiver\\\\\\\"\\\\n\\\\t| myWorld itsWorld otherSubmorphs |\\\\n\\\\tmyWorld _ self world.\\\\n\\\\totherSubmorphs _ submorphs copyWithoutAll: aCollection.\\\\n\\\\t(index between: 0 and: otherSubmorphs size)\\\\n\\\\t\\\\tifFalse: [^ self error: 'index out of range'].\\\\n\\\\tindex = 0\\\\n\\\\t\\\\tifTrue:[\\\\tsubmorphs _ aCollection asArray, otherSubmorphs]\\\\n\\\\t\\\\tifFalse:[\\\\tindex = otherSubmorphs size\\\\n\\\\t\\\\t\\\\tifTrue:[\\\\tsubmorphs _ otherSubmorphs, aCollection]\\\\n\\\\t\\\\t\\\\tifFalse:[\\\\tsubmorphs _ otherSubmorphs copyReplaceFrom: index + 1 to: index with: aCollection ]].\\\\n\\\\taCollection do: [:m | | itsOwner |\\\\n\\\\t\\\\titsOwner _ m owner.\\\\n\\\\t\\\\titsOwner ifNotNil: [\\\\n\\\\t\\\\t\\\\titsWorld _ m world.\\\\n\\\\t\\\\t\\\\t(itsWorld == myWorld) ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\titsWorld ifNotNil: [self privateInvalidateMorph: m].\\\\n\\\\t\\\\t\\\\t\\\\tm outOfWorld: itsWorld].\\\\n\\\\t\\\\t\\\\t(itsOwner ~~ self) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tm owner privateRemove: m.\\\\n\\\\t\\\\t\\\\t\\\\tm owner removedMorph: m ]].\\\\n\\\\t\\\\tm privateOwner: self.\\\\n\\\\t\\\\tmyWorld ifNotNil: [self privateInvalidateMorph: m].\\\\n\\\\t\\\\t(myWorld == itsWorld) ifFalse: [m intoWorld: myWorld].\\\\n\\\\t\\\\titsOwner == self ifFalse: [\\\\n\\\\t\\\\t\\\\tself addedMorph: m.\\\\n\\\\t\\\\t\\\\tm noteNewOwner: self ].\\\\n\\\\t].\\\\n\\\\tself layoutChanged.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'private' stamp: 'nk 10/11/2003 16:08'!\\\\nprivateAddMorph: aMorph atIndex: index\\\\n\\\\n\\\\t| oldIndex myWorld itsWorld oldOwner |\\\\n\\\\t((index >= 1) and: [index <= (submorphs size + 1)])\\\\n\\\\t\\\\tifFalse: [^ self error: 'index out of range'].\\\\n\\\\tmyWorld _ self world.\\\\n\\\\toldOwner _ aMorph owner.\\\\n\\\\t(oldOwner == self and: [(oldIndex _ submorphs indexOf: aMorph) > 0]) ifTrue:[\\\\n\\\\t\\\\t\\\\\\\"aMorph's position changes within in the submorph chain\\\\\\\"\\\\n\\\\t\\\\toldIndex < index ifTrue:[\\\\n\\\\t\\\\t\\\\t\\\\\\\"moving aMorph to back\\\\\\\"\\\\n\\\\t\\\\t\\\\tsubmorphs replaceFrom: oldIndex to: index-2 with: submorphs startingAt: oldIndex+1.\\\\n\\\\t\\\\t\\\\tsubmorphs at: index-1 put: aMorph.\\\\n\\\\t\\\\t] ifFalse:[\\\\n\\\\t\\\\t\\\\t\\\\\\\"moving aMorph to front\\\\\\\"\\\\n\\\\t\\\\t\\\\toldIndex-1 to: index by: -1 do:[:i|\\\\n\\\\t\\\\t\\\\t\\\\tsubmorphs at: i+1 put: (submorphs at: i)].\\\\n\\\\t\\\\t\\\\tsubmorphs at: index put: aMorph.\\\\n\\\\t\\\\t].\\\\n\\\\t] ifFalse:[\\\\n\\\\t\\\\t\\\\\\\"adding a new morph\\\\\\\"\\\\n\\\\t\\\\toldOwner ifNotNil:[\\\\n\\\\t\\\\t\\\\titsWorld _ aMorph world.\\\\n\\\\t\\\\t\\\\titsWorld ifNotNil: [self privateInvalidateMorph: aMorph].\\\\n\\\\t\\\\t\\\\t(itsWorld == myWorld) ifFalse: [aMorph outOfWorld: itsWorld].\\\\n\\\\t\\\\t\\\\toldOwner privateRemove: aMorph.\\\\n\\\\t\\\\t\\\\toldOwner removedMorph: aMorph.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\taMorph privateOwner: self.\\\\n\\\\t\\\\tsubmorphs _ submorphs copyReplaceFrom: index to: index-1 with: (Array with: aMorph).\\\\n\\\\t\\\\t(itsWorld == myWorld) ifFalse: [aMorph intoWorld: myWorld].\\\\n\\\\t].\\\\n\\\\tmyWorld ifNotNil:[self privateInvalidateMorph: aMorph].\\\\n\\\\tself layoutChanged.\\\\n\\\\toldOwner == self ifFalse: [\\\\n\\\\t\\\\tself addedMorph: aMorph.\\\\n\\\\t\\\\taMorph noteNewOwner: self ].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'private'!\\\\nprivateBounds: boundsRect\\\\n\\\\t\\\\\\\"Private!! Use position: and/or extent: instead.\\\\\\\"\\\\n\\\\n\\\\tfullBounds _ nil.\\\\n\\\\tbounds _ boundsRect.! !\\\\n\\\\n!Morph methodsFor: 'private' stamp: 'jm 5/29/1998 21:28'!\\\\nprivateColor: aColor\\\\n\\\\n\\\\tcolor _ aColor.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'private' stamp: 'RAA 5/23/2000 11:31'!\\\\nprivateDeleteWithAbsolutelyNoSideEffects\\\\n\\\\t\\\\\\\"Private!! Should only be used by methods that maintain the ower/submorph invariant.\\\\\\\"\\\\n\\\\t\\\\\\\"used to delete a morph from an inactive world\\\\\\\"\\\\n\\\\n\\\\towner ifNil: [^self].\\\\n\\\\towner privateRemoveMorphWithAbsolutelyNoSideEffects: self.\\\\n\\\\towner _ nil.\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'private' stamp: 'tk 8/30/1998 09:58'!\\\\nprivateFullBounds: boundsRect\\\\n\\\\t\\\\\\\"Private!! Computed automatically.\\\\\\\"\\\\n\\\\n\\\\tfullBounds _ boundsRect.! !\\\\n\\\\n!Morph methodsFor: 'private' stamp: 'ar 12/16/2001 21:47'!\\\\nprivateFullMoveBy: delta\\\\n\\\\t\\\\\\\"Private!! Relocate me and all of my subMorphs by recursion. Subclasses that implement different coordinate systems may override this method.\\\\\\\"\\\\n\\\\n\\\\tself privateMoveBy: delta.\\\\n\\\\t1 to: submorphs size do: [:i |\\\\n\\\\t\\\\t(submorphs at: i) privateFullMoveBy: delta].\\\\n\\\\towner ifNotNil:[\\\\n\\\\t\\\\towner isTextMorph ifTrue:[owner adjustTextAnchor: self]].! !\\\\n\\\\n!Morph methodsFor: 'private' stamp: 'md 2/27/2006 08:55'!\\\\nprivateMoveBy: delta \\\\n\\\\t\\\\\\\"Private!! Use 'position:' instead.\\\\\\\"\\\\n\\\\t| fill |\\\\n\\\\textension ifNotNil: [extension player\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil: [\\\\\\\"Most cases eliminated fast by above test\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself getPenDown\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"If this is a costume for a player with its \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tpen down, draw a line.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself moveWithPenDownBy: delta]]].\\\\n\\\\tbounds _ bounds translateBy: delta.\\\\n\\\\tfullBounds ifNotNil: [fullBounds _ fullBounds translateBy: delta].\\\\n\\\\tfill _ self fillStyle.\\\\n\\\\tfill isOrientedFill ifTrue: [fill origin: fill origin + delta]! !\\\\n\\\\n!Morph methodsFor: 'private'!\\\\nprivateOwner: aMorph\\\\n\\\\t\\\\\\\"Private!! Should only be used by methods that maintain the ower/submorph invariant.\\\\\\\"\\\\n\\\\n\\\\towner _ aMorph.! !\\\\n\\\\n!Morph methodsFor: 'private' stamp: 'RAA 5/23/2000 11:30'!\\\\nprivateRemoveMorphWithAbsolutelyNoSideEffects: aMorph\\\\n\\\\t\\\\\\\"Private!! Should only be used by methods that maintain the ower/submorph invariant.\\\\\\\"\\\\n\\\\t\\\\\\\"used to delete a morph from an inactive world\\\\\\\"\\\\n\\\\n\\\\tsubmorphs _ submorphs copyWithout: aMorph.\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: 'private' stamp: 'di 10/18/2004 21:49'!\\\\nprivateRemove: aMorph\\\\n\\\\t\\\\\\\"Private!! Should only be used by methods that maintain the ower/submorph invariant.\\\\\\\"\\\\n\\\\n\\\\tsubmorphs _ submorphs copyWithout: aMorph.\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!Morph methodsFor: 'private'!\\\\nprivateSubmorphs\\\\n\\\\t\\\\\\\"Private!! Use 'submorphs' instead.\\\\\\\"\\\\n\\\\n\\\\t^ submorphs! !\\\\n\\\\n!Morph methodsFor: 'private'!\\\\nprivateSubmorphs: aCollection\\\\n\\\\t\\\\\\\"Private!! Should only be used by methods that maintain the ower/submorph invariant.\\\\\\\"\\\\n\\\\n\\\\tsubmorphs _ aCollection.! !\\\\n\\\\n\\\\n!Morph methodsFor: 'accessing-backstop' stamp: 'wiz 2/14/2006 19:02'!\\\\ntarget: aMorph\\\\n\\\\\\\"Morphs with targets will override. This backstop does nothing.\\\\\\\"\\\\n\\\\\\\"This is here because targeting meta-actions are taken at morph level. \\\\nDo not remove.\\\\\\\"! !\\\\n\\\\n\\\\n!Morph methodsFor: 'translation' stamp: 'yo 1/27/2005 23:29'!\\\\naccumlatePlayersInto: aCollection andSelectorsInto: selectorsCollection\\\\n\\\\n\\\\tsubmorphs do: [:tile |\\\\n\\\\t\\\\t(tile isMemberOf: TileMorph) ifTrue: [\\\\n\\\\t\\\\t\\\\t(tile type = #objRef and: [tile actualObject isKindOf: Player]) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\taCollection add: tile actualObject\\\\n\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\t(tile isKindOf: AssignmentTileMorph) ifTrue: [\\\\n\\\\t\\\\t\\\\t(tile type = #operator) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tselectorsCollection add: tile operatorOrExpression\\\\n\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\ttile accumlatePlayersInto: aCollection andSelectorsInto: selectorsCollection\\\\n\\\\t].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'translation' stamp: 'sw 3/7/2004 13:03'!\\\\nisPlayer: aPlayer ofReferencingTile: tile\\\\n\\\\t\\\\\\\"Answer whether the given player is the object referred to by the given tile, or a sibling of that object.  This theoretically is only sent to PhraseTileMorphs, so this version is theoretically never reached\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'translation' stamp: 'yo 1/27/2005 23:33'!\\\\nisTurtleRow\\\\n\\\\n\\\\t| aCollection selectorCollection |\\\\n\\\\taCollection _ Set new.\\\\n\\\\tselectorCollection _ Set new.\\\\n\\\\tself accumlatePlayersInto: aCollection andSelectorsInto: selectorCollection.\\\\n\\\\t#(turtleCount: turtleCount grouped: grouped) do: [:sel |\\\\n\\\\t\\\\t(selectorCollection includes: sel) ifTrue: [^ false].\\\\n\\\\t].\\\\n\\\\n\\\\taCollection do: [:e |\\\\n\\\\t\\\\t(e isKindOf: KedamaExamplerPlayer) ifTrue: [^ true].\\\\n\\\\t].\\\\n\\\\t^ false.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'translation' stamp: 'yo 1/18/2004 10:31'!\\\\ntraverseRowTranslateSlotOld: oldSlotName of: aPlayer to: newSlotName\\\\n\\\\t\\\\\\\"Traverse my submorphs, translating submorphs appropriately given the slot rename\\\\\\\"\\\\n\\\\n\\\\tsubmorphs do: [:tile |\\\\n\\\\t\\\\t(tile isKindOf: AssignmentTileMorph) ifTrue:\\\\n\\\\t\\\\t\\\\t[tile assignmentRoot = oldSlotName ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[(self isPlayer: aPlayer ofReferencingTile: tile) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[tile setRoot: newSlotName]]].\\\\n\\\\t\\\\t(tile isMemberOf: TileMorph) ifTrue:\\\\n\\\\t\\\\t\\\\t[(tile operatorOrExpression = (Utilities getterSelectorFor: oldSlotName)) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[(self isPlayer: aPlayer ofReferencingTile: tile) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[tile setOperator: (Utilities getterSelectorFor: newSlotName)]]].\\\\n\\\\t\\\\ttile traverseRowTranslateSlotOld: oldSlotName of: aPlayer to: newSlotName]! !\\\\n\\\\n!Morph methodsFor: 'translation' stamp: 'yo 1/18/2004 10:32'!\\\\ntraverseRowTranslateSlotOld: oldSlotName to: newSlotName\\\\n\\\\t\\\\\\\"Traverse my submorphs, translating submorphs appropriately given the slot rename\\\\\\\"\\\\n\\\\n\\\\tsubmorphs do: [:tile |\\\\n\\\\t\\\\t(tile isKindOf: AssignmentTileMorph) ifTrue: \\\\n\\\\t\\\\t\\\\t[tile assignmentRoot = oldSlotName ifTrue: [tile setRoot: newSlotName]].\\\\n\\\\t\\\\t(tile isMemberOf: TileMorph) ifTrue:\\\\n\\\\t\\\\t\\\\t[(tile operatorOrExpression = (Utilities getterSelectorFor: oldSlotName)) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[tile setOperator: (Utilities getterSelectorFor: newSlotName)]].\\\\n\\\\t\\\\ttile traverseRowTranslateSlotOld: oldSlotName to: newSlotName]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 2/9/1999 17:43'!\\\\nadaptToWorld: aWorld\\\\n\\\\t\\\\\\\"The receiver finds itself operating in a possibly-different new world.  If any of the receiver's parts are world-dependent (such as a target of a SimpleButtonMorph, etc.), then have them adapt accordingly\\\\\\\"\\\\n\\\\tsubmorphs do: [:m | m adaptToWorld: aWorld].\\\\n\\\\tself eventHandler ifNotNil:\\\\n\\\\t\\\\t[self eventHandler adaptToWorld: aWorld]! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 5/17/2001 12:47'!\\\\nadoptVocabulary: aVocabulary\\\\n\\\\t\\\\\\\"Make aVocabulary be the one used by me and my submorphs\\\\\\\"\\\\n\\\\n\\\\tself submorphsDo: [:m | m adoptVocabulary: aVocabulary]! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'yo 1/9/2004 16:10'!\\\\nallMorphsAndBookPagesInto: aSet\\\\n\\\\t\\\\\\\"Return a set of all submorphs.  Don't forget the hidden ones like BookMorph pages that are not showing.  Consider only objects that are in memory (see allNonSubmorphMorphs).\\\\\\\" \\\\n\\\\n\\\\tsubmorphs do: [:m | m allMorphsAndBookPagesInto: aSet].\\\\n\\\\tself allNonSubmorphMorphs do: [:m | \\\\n\\\\t\\\\t\\\\t(aSet includes: m) ifFalse: [\\\\\\\"Stop infinite recursion\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tm allMorphsAndBookPagesInto: aSet]].\\\\n\\\\taSet add: self.\\\\n\\\\tself player ifNotNil:\\\\n\\\\t\\\\t[self player allScriptEditors do: [:e | e allMorphsAndBookPagesInto: aSet]].\\\\n\\\\t^ aSet! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'RAA 1/13/2001 11:27'!\\\\nappearsToBeSameCostumeAs: aMorph\\\\n\\\\n\\\\t^false\\\\n! !\\\\n\\\\n!Morph methodsFor: 'e-toy support'!\\\\nasNumber: aPointOrNumber\\\\n\\\\t\\\\\\\"Support for e-toy demo.\\\\\\\"\\\\n\\\\n\\\\taPointOrNumber class = Point\\\\n\\\\t\\\\tifTrue: [^ aPointOrNumber r]\\\\n\\\\t\\\\tifFalse: [^ aPointOrNumber].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'nk 1/6/2004 12:37'!\\\\nasWearableCostume\\\\n\\\\t\\\\\\\"Return a wearable costume for some player\\\\\\\"\\\\n\\\\t^(World drawingClass withForm: self imageForm) copyCostumeStateFrom: self! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'mir 6/13/2001 14:34'!\\\\nasWearableCostumeOfExtent: extent\\\\n\\\\t\\\\\\\"Return a wearable costume for some player\\\\\\\"\\\\n\\\\t^self asWearableCostume! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 12/20/1999 17:36'!\\\\nautomaticViewing\\\\n\\\\t\\\\\\\"Backstop, in case this message gets sent to an owner that is not a playfield\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 5/18/2001 11:17'!\\\\nchangeAllBorderColorsFrom: oldColor to: newColor\\\\n\\\\t\\\\\\\"Set any occurrence of oldColor as a border color in my entire submorph tree to be newColor\\\\\\\"\\\\n\\\\n\\\\t(self allMorphs select: [:m | m respondsTo: #borderColor:]) do:\\\\n\\\\t\\\\t[:aMorph | aMorph borderColor = oldColor ifTrue: [aMorph borderColor: newColor]]! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 10/1/97 00:18'!\\\\nconfigureForKids\\\\n\\\\tsubmorphs ifNotNil:\\\\n\\\\t\\\\t[submorphs do: [:m | m configureForKids]]! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 2/6/2001 04:21'!\\\\ncontainingWindow\\\\n\\\\t\\\\\\\"Answer a window or window-with-mvc that contains the receiver\\\\\\\"\\\\n\\\\n\\\\t^ self ownerThatIsA: SystemWindow orA: MVCWiWPasteUpMorph! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'ar 9/23/2000 22:38'!\\\\ncopyCostumeStateFrom: aMorph\\\\n\\\\t\\\\\\\"Copy all state that should be persistant for costumes from aMorph\\\\\\\"\\\\n\\\\tself rotationCenter: aMorph rotationCenter.\\\\n\\\\tself rotationStyle: aMorph rotationStyle.\\\\n\\\\tself referencePosition: aMorph referencePosition.\\\\n\\\\tself forwardDirection: aMorph forwardDirection.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 10/22/1998 20:28'!\\\\ncurrentPlayerDo: aBlock\\\\n\\\\t\\\\\\\"If the receiver is a viewer/scriptor associated with a current Player object, evaluate the given block against that object\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 9/8/2000 16:34'!\\\\ncursor\\\\n\\\\t\\\\\\\"vacuous backstop in case it gets sent to a morph that doesn't know what to do with it\\\\\\\"\\\\n\\\\n\\\\t^ 1! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 9/7/2000 09:28'!\\\\ncursor: aNumber\\\\n\\\\t\\\\\\\"vacuous backstop in case it gets sent to a morph that doesn't know what to do with it\\\\\\\"\\\\n! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 9/13/2002 17:44'!\\\\ndecimalPlacesForGetter: aGetter\\\\n\\\\t\\\\\\\"Answer the decimal places I prefer for showing a slot with the given getter, or nil if none\\\\\\\"\\\\n\\\\n\\\\t| decimalPrefs |\\\\n\\\\tdecimalPrefs _ self renderedMorph valueOfProperty: #decimalPlacePreferences ifAbsent: [^ nil].\\\\n\\\\t^ decimalPrefs at: aGetter ifAbsent: [nil]! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 10/24/2000 05:52'!\\\\ndefaultValueOrNil\\\\n\\\\t\\\\\\\"If the receiver has a property named #defaultValue, return that property's value, else return nil\\\\\\\"\\\\n\\\\n\\\\t^ self valueOfProperty: #defaultValue ifAbsent: [nil]! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sd 3/30/2005 22:04'!\\\\ndefaultVariableName\\\\n\\\\t\\\\\\\"If the receiver is of the sort that wants a variable maintained on its behalf in the 'card' data, then return a variable name to be used for that datum.  What is returned here is only a point of departure in the forthcoming negotiation\\\\\\\"\\\\n\\\\n\\\\t^ Scanner wellFormedInstanceVariableNameFrom: (self valueOfProperty: #variableName ifAbsent: [self externalName])! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'nb 6/17/2003 12:25'!\\\\ndefinePath\\\\n\\\\t| points lastPoint aForm offset currentPoint dwell ownerPosition |\\\\n\\\\tpoints _ OrderedCollection new: 70.\\\\n\\\\tlastPoint _ nil.\\\\n\\\\taForm _ self imageForm.\\\\n\\\\toffset _ aForm extent // 2.\\\\n\\\\townerPosition _ owner position.\\\\n\\\\tCursor move show.\\\\n\\\\tSensor waitButton.\\\\n\\\\t[Sensor anyButtonPressed and: [points size < 100]] whileTrue:\\\\n\\\\t\\\\t[currentPoint _ Sensor cursorPoint.\\\\n\\\\t\\\\tdwell _ 0.\\\\n\\\\t\\\\tcurrentPoint = lastPoint\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[dwell _ dwell + 1.\\\\n\\\\t\\\\t\\\\t\\\\t((dwell \\\\\\\\\\\\\\\\ 1000) = 0) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[Beeper beep]]\\\\n\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[self position: (currentPoint - offset).\\\\n\\\\t\\\\t\\\\t\\\\tself world displayWorld.\\\\n\\\\t\\\\t\\\\t\\\\t(Delay forMilliseconds: 20) wait.\\\\n\\\\t\\\\t\\\\t\\\\tpoints add: currentPoint.\\\\n\\\\t\\\\t\\\\t\\\\tlastPoint _ currentPoint]].\\\\n\\\\tpoints size > 1\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self inform: 'no path obtained']\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[points size = 100 ifTrue: [self playSoundNamed: 'croak'].\\\\n\\\\n\\\\t\\\\t\\\\tTranscript cr; show: 'path defined with\\\\n', points size printString, ' points'.\\\\n\\\\t\\\\t\\\\tself renderedMorph setProperty: #pathPoints toValue: \\\\n\\\\t\\\\t\\\\t\\\\t(points collect: [:p | p - ownerPosition])].\\\\n\\\\n\\\\tCursor normal show\\\\n\\\\t\\\\t! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 1/5/1999 10:05'!\\\\ndeletePath\\\\n\\\\tself removeProperty: #pathPoints! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 10/26/1999 23:32'!\\\\nembeddedInMorphicWindowLabeled: labelString\\\\n\\\\t| window |\\\\n\\\\twindow _ (SystemWindow labelled: labelString) model: nil.\\\\n\\\\twindow setStripeColorsFrom: nil defaultBackgroundColor.\\\\n\\\\twindow addMorph: self frame: (0@0 extent: 1@1).\\\\n\\\\t^ window! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'RAA 5/25/2000 09:06'!\\\\nembedInWindow\\\\n\\\\n\\\\t| window worldToUse |\\\\n\\\\n\\\\tworldToUse _ self world.\\\\t\\\\t\\\\\\\"I'm assuming we are already in a world\\\\\\\"\\\\n\\\\twindow _ (SystemWindow labelled: self defaultLabelForInspector) model: nil.\\\\n\\\\twindow bounds: ((self position - ((0@window labelHeight) + window borderWidth))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: self bottomRight + window borderWidth).\\\\n\\\\twindow addMorph: self frame: (0@0 extent: 1@1).\\\\n\\\\twindow updatePaneColors.\\\\n\\\\tworldToUse addMorph: window.\\\\n\\\\twindow activate! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'dgd 2/22/2003 14:31'!\\\\nenclosingEditor\\\\n\\\\t\\\\\\\"Return the next editor around the receiver\\\\\\\"\\\\n\\\\n\\\\t| tested |\\\\n\\\\ttested := owner.\\\\n\\\\t[tested isNil] whileFalse: \\\\n\\\\t\\\\t\\\\t[tested isTileEditor ifTrue: [^tested].\\\\n\\\\t\\\\t\\\\ttested := tested owner].\\\\n\\\\t^nil! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 2/15/1999 19:38'!\\\\nenforceTileColorPolicy\\\\n\\\\tPreferences coloredTilesEnabled\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self makeAllTilesColored]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self makeAllTilesGreen]! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'RAA 10/4/2000 08:29'!\\\\nfenceEnabled\\\\n\\\\n\\\\t\\\\\\\"in case a non-pasteUp is used as a container\\\\\\\"\\\\n\\\\n\\\\t^Preferences fenceEnabled! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'nb 6/17/2003 12:25'!\\\\nfollowPath\\\\n\\\\t| pathPoints offset |\\\\n\\\\t(pathPoints _ self renderedMorph valueOfProperty: #pathPoints) ifNil: [^ Beeper beep].\\\\n\\\\toffset _ owner position - (self extent // 2).\\\\n\\\\tpathPoints do:\\\\n\\\\t\\\\t[:aPoint |\\\\n\\\\t\\\\t\\\\tself position: aPoint + offset.\\\\n\\\\t\\\\t\\\\tself world displayWorld.\\\\n\\\\t\\\\t\\\\t(Delay forMilliseconds: 20) wait]! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 2/18/2003 02:54'!\\\\ngetCharacters\\\\n\\\\t\\\\\\\"obtain a string value from the receiver.  The default generic response is simply the name of the object.\\\\\\\"\\\\n\\\\n\\\\t^ self externalName! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 9/1/2000 10:15'!\\\\ngetNumericValue\\\\n\\\\t\\\\\\\"Only certain kinds of morphs know how to deal with this frontally; here we provide support for a numeric property of any morph\\\\\\\"\\\\n\\\\n\\\\t^ self valueOfProperty: #numericValue ifAbsent: [0]! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'kfr 9/4/2004 15:22'!\\\\ngridFormOrigin: origin grid: smallGrid background: backColor line: lineColor\\\\n\\\\n\\\\t| bigGrid gridForm gridOrigin |\\\\n\\\\tgridOrigin _ origin \\\\\\\\\\\\\\\\ smallGrid.\\\\n\\\\tbigGrid _ (smallGrid asPoint x) @ (smallGrid asPoint y).\\\\n\\\\tgridForm _ Form extent: bigGrid depth: Display depth.\\\\n\\\\tbackColor ifNotNil: [gridForm fillWithColor: backColor].\\\\n\\\\tgridOrigin x to: gridForm width by: smallGrid x do:\\\\n\\\\t\\\\t[:x | gridForm fill: (x@0 extent: 1@gridForm height) fillColor: lineColor].\\\\n\\\\tgridOrigin y to: gridForm height by: smallGrid y do:\\\\n\\\\t\\\\t[:y | gridForm fill: (0@y extent: gridForm width@1) fillColor: lineColor].\\\\n\\\\t^ InfiniteForm with: gridForm\\\\n! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 4/12/2005 23:07'!\\\\nhandUserASibling\\\\n\\\\t\\\\\\\"Make and hand the user a sibling instance.  Force the creation of a uniclass at this point if one does not already exist for the receiver.\\\\\\\"\\\\n\\\\n\\\\t| topRend |\\\\n\\\\ttopRend _ self topRendererOrSelf.\\\\n\\\\ttopRend couldMakeSibling ifFalse: [^ Beeper beep].\\\\n\\\\n\\\\ttopRend assuredPlayer assureUniClass.\\\\n\\\\t(topRend makeSiblings: 1) first openInHand! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 10/21/1998 15:54'!\\\\nisAViewer\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 6/30/1999 20:29'!\\\\nisCandidateForAutomaticViewing\\\\n\\\\t^ true! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'ar 2/7/2001 17:58'!\\\\nisTileEditor\\\\n\\\\t\\\\\\\"No, I'm not\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 10/9/2000 16:48'!\\\\nlistViewLineForFieldList: aFieldList\\\\n\\\\t\\\\\\\"Answer a ListLineView object which describes the receiver\\\\\\\"\\\\n\\\\n\\\\t| aLine |\\\\n\\\\taLine _ ListViewLine new objectRepresented: self.\\\\n\\\\taFieldList do:\\\\n\\\\t\\\\t[:fieldSym | aLine addMorphBack: (self readoutForField: fieldSym).\\\\n\\\\t\\\\taLine addTransparentSpacerOfSize: (7 @ 0)].\\\\n\\\\t^ aLine! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'dgd 9/6/2003 18:10'!\\\\nmakeGraphPaper\\\\n\\\\t| smallGrid backColor lineColor |\\\\n\\\\tsmallGrid _ Compiler evaluate: (FillInTheBlank request: 'Enter grid size' translated initialAnswer: '16').\\\\n\\\\tsmallGrid ifNil: [^ self].\\\\n\\\\tUtilities informUser: 'Choose a background color' translated during: [backColor _ Color fromUser].\\\\n\\\\tUtilities informUser: 'Choose a line color' translated during: [lineColor _ Color fromUser].\\\\n\\\\tself makeGraphPaperGrid: smallGrid background: backColor line: lineColor.! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'di 9/7/2000 20:44'!\\\\nmakeGraphPaperGrid: smallGrid background: backColor line: lineColor\\\\n\\\\n\\\\t| gridForm |\\\\n\\\\tgridForm _ self gridFormOrigin: 0@0 grid: smallGrid asPoint background: backColor line: lineColor.\\\\n\\\\tself color: gridForm.\\\\n\\\\tself world ifNotNil: [self world fullRepaintNeeded].\\\\n\\\\tself changed: #newColor.  \\\\\\\"propagate to view\\\\\\\"\\\\n! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 4/16/1998 13:46'!\\\\nmustBeBackmost\\\\n\\\\t\\\\\\\"Answer whether the receiver needs to be the backmost morph in its owner's submorph list\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 9/13/2002 17:45'!\\\\nnoteDecimalPlaces: aNumber forGetter: aGetter\\\\n\\\\t\\\\\\\"Make a mental note of the user's preference for a particular number of decimal places to be associated with the slot with the given getter\\\\\\\"\\\\n\\\\n\\\\t(self renderedMorph valueOfProperty: #decimalPlacePreferences ifAbsentPut: [IdentityDictionary new])\\\\n\\\\t\\\\tat: aGetter put: aNumber! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 10/26/2000 11:37'!\\\\nnoteNegotiatedName: uniqueName for: requestedName\\\\n\\\\t\\\\\\\"This works, kind of, for morphs that have a single variable.  Still holding out for generality of morphs being able to have multiple variables, but need a driving example\\\\\\\"\\\\n\\\\n\\\\tself setProperty: #variableName toValue: uniqueName.\\\\n\\\\tself setProperty: #setterSelector toValue: (Utilities setterSelectorFor: uniqueName).\\\\n\\\\tself setNameTo: uniqueName! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 10/9/2000 06:43'!\\\\nobjectViewed\\\\n\\\\t\\\\\\\"Answer the morph associated with the player that the structure the receiver currently finds itself within represents.\\\\\\\"\\\\n\\\\n\\\\t^ (self outermostMorphThat: [:o | o isKindOf: Viewer orOf: ScriptEditorMorph]) objectViewed! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 8/31/2004 14:11'!\\\\npinkXButton\\\\n\\\\t\\\\\\\"Answer a button with the old X on a pink background, targeted to self\\\\\\\"\\\\n\\\\n\\\\t| aButton |\\\\n\\\\taButton _ IconicButton new labelGraphic: (ScriptingSystem formAtKey: #PinkX).\\\\n\\\\taButton color: Color transparent; borderWidth: 0; shedSelvedge; actWhen: #buttonUp.\\\\n\\\\taButton target: self.\\\\n\\\\t^ aButton! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 9/11/2004 16:23'!\\\\nreferencePlayfield\\\\n\\\\t\\\\\\\"Answer the PasteUpMorph to be used for cartesian-coordinate reference\\\\\\\"\\\\n\\\\n\\\\t| former |\\\\n\\\\towner ifNotNil:\\\\n\\\\t\\\\t[(self topRendererOrSelf owner isHandMorph and: [(former _ self formerOwner) notNil])\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[former _ former renderedMorph.\\\\n\\\\t\\\\t\\\\t\\\\t^ former isPlayfieldLike \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [former]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [former referencePlayfield]]].\\\\n\\\\n\\\\tself allOwnersDo: [:o | o isPlayfieldLike ifTrue: [^ o]].\\\\n\\\\t^ ActiveWorld! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'ar 9/23/2000 22:40'!\\\\nrotationStyle\\\\n\\\\t\\\\\\\"Return the 'rotation style' of the receiver\\\\\\\"\\\\n\\\\t^#normal! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'ar 9/23/2000 22:40'!\\\\nrotationStyle: aSymbol\\\\n\\\\t\\\\\\\"Set the 'rotation style' of the receiver; this is ignored for non-sketches\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'RAA 3/9/2001 14:37'!\\\\nsetAsActionInButtonProperties: buttonProperties\\\\n\\\\n\\\\t^false\\\\t\\\\\\\"means I don't know how to be set as a button action\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 9/15/2000 06:26'!\\\\nsetNumericValue: aValue\\\\n\\\\t\\\\\\\"Set the receiver's contents to reflect the given numeric value.  Only certain kinds of morphs know what to do with this, the rest, for now, stash the number in a property, where it may not be visible but at least it won't be lost, and can be retrieved by the companion getter.  This code is never reached under normal circumstances, because the #numericValue slot is not shown in Viewers for most kinds of morphs, and those kinds of morphs that do show it also reimplement this method.  However, this code *could* be reached via a user script which sends #setNumericValue: but whose receiver has been changed, via tile-scripting drag and drop for example, to one that doesn't directly handle numbers\\\\\\\"\\\\n\\\\n\\\\tScriptingSystem informScriptingUser: 'an unusual setNumericValue: call was made'.\\\\n\\\\tself renderedMorph setProperty: #numericValue toValue: aValue\\\\n! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 7/21/1998 21:18'!\\\\nsetStandardTexture\\\\n\\\\t| parms |\\\\n\\\\tparms _ self textureParameters.\\\\n\\\\tself makeGraphPaperGrid: parms first\\\\n\\\\t\\\\tbackground: parms second\\\\n\\\\t\\\\tline: parms third! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 10/27/2000 17:46'!\\\\nslotSpecifications\\\\n\\\\t\\\\\\\"A once and possibly future feature; retained here for backward-compatibility bulletproofing.\\\\\\\"\\\\n\\\\n\\\\t^ #()! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 8/11/1998 16:55'!\\\\nsucceededInRevealing: aPlayer\\\\n\\\\taPlayer == self player ifTrue: [^ true].\\\\n\\\\tsubmorphs do:\\\\n\\\\t\\\\t[:m | (m succeededInRevealing: aPlayer) ifTrue: [^ true]].\\\\n\\\\t^ false! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 8/31/2004 14:06'!\\\\ntanOButton\\\\n\\\\t\\\\\\\"Answer a button with the old O on a tan background, targeted to self\\\\\\\"\\\\n\\\\n\\\\t| aButton |\\\\n\\\\taButton _ IconicButton new labelGraphic: (ScriptingSystem formAtKey: #TanO).\\\\n\\\\taButton color: Color transparent; borderWidth: 0; shedSelvedge; actWhen: #buttonUp.\\\\n\\\\taButton target: self.\\\\n\\\\t^ aButton! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 7/21/1998 21:17'!\\\\ntextureParameters\\\\n\\\\t\\\\\\\"Answer a triplet giving the preferred grid size, background color, and line color.  The choices here are as suggested by Alan, 9/13/97\\\\\\\"\\\\n\\\\n\\\\t^ Array with: 16 with: Color lightYellow with: Color lightGreen lighter lighter! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'dgd 2/22/2003 14:35'!\\\\ntopEditor\\\\n\\\\t\\\\\\\"Return the top-most editor around the receiver\\\\\\\"\\\\n\\\\n\\\\t| found tested |\\\\n\\\\ttested := self.\\\\n\\\\t[tested isNil] whileFalse: \\\\n\\\\t\\\\t\\\\t[tested isTileEditor ifTrue: [found := tested].\\\\n\\\\t\\\\t\\\\ttested := tested owner].\\\\n\\\\t^found! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'dgd 10/8/2003 19:30'!\\\\nunlockOneSubpart\\\\n\\\\t| unlockables aMenu reply |\\\\n\\\\tunlockables _ self submorphs select:\\\\n\\\\t\\\\t[:m | m isLocked].\\\\n\\\\tunlockables size <= 1 ifTrue: [^ self unlockContents].\\\\n\\\\taMenu _ SelectionMenu labelList: (unlockables collect: [:m | m externalName]) selections: unlockables.\\\\n\\\\treply _ aMenu startUpWithCaption: 'Who should be be unlocked?' translated.\\\\n\\\\treply isNil ifTrue: [^ self].\\\\n\\\\treply unlock! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'tk 10/19/1999 07:16'!\\\\nupdateCachedThumbnail\\\\n\\\\t\\\\\\\"If I have a cached thumbnail, then update it.  Copied up from Dan's original version in PasteUpMorph so it can be used by all morphs.\\\\\\\"\\\\n\\\\t| cachedThumbnail |\\\\n\\\\n\\\\t(cachedThumbnail _ self valueOfProperty: #cachedThumbnail) ifNotNil:\\\\n\\\\t\\\\t[(cachedThumbnail respondsTo: #computeThumbnail) \\\\n\\\\t\\\\t\\\\tifTrue: [cachedThumbnail computeThumbnail]\\\\n\\\\t\\\\t\\\\tifFalse: [self removeProperty: #computeThumbnail]].\\\\n\\\\t\\\\t\\\\\\\"Test and removal are because the thumbnail is being replaced by another Morph.  We don't know why.  Need to fix that at the source.\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'sw 11/27/2001 14:52'!\\\\nwantsRecolorHandle\\\\n\\\\t\\\\\\\"Answer whether the receiver would like a recoloring halo handle to be put up.  Since this handle also presently affords access to the property-sheet, it is presently always allowed, even though SketchMorphs don't like regular recoloring\\\\\\\"\\\\n\\\\n\\\\t^ true\\\\n\\\\t\\\\n! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'RAA 2/5/2001 15:35'!\\\\nwrappedInWindowWithTitle: aTitle\\\\n\\\\t| aWindow w2 |\\\\n\\\\taWindow _ (SystemWindow labelled: aTitle) model: Model new.\\\\n\\\\taWindow addMorph: self frame: (0@0 extent: 1@1).\\\\n\\\\tw2 _ aWindow borderWidth * 2.\\\\n\\\\tw2 _ 3.\\\\t\\\\t\\\\\\\"oh, well\\\\\\\"\\\\n\\\\taWindow extent: self fullBounds extent + (0 @ aWindow labelHeight) + (w2 @ w2).\\\\n\\\\t^ aWindow! !\\\\n\\\\n!Morph methodsFor: 'e-toy support' stamp: 'tk 9/3/1999 11:46'!\\\\nwrappedInWindow: aSystemWindow\\\\n\\\\t| aWindow |\\\\n\\\\taWindow _ aSystemWindow model: Model new.\\\\n\\\\taWindow addMorph: self frame: (0@0 extent: 1@1).\\\\n\\\\taWindow extent: self extent.\\\\n\\\\t^ aWindow! !\\\\n\\\\n\\\\n!Morph methodsFor: 'messenger' stamp: 'sw 11/3/2001 12:23'!\\\\naffiliatedSelector\\\\n\\\\t\\\\\\\"Answer a selector affiliated with the receiver for the purposes of launching a messenger.   Reimplement this to plug into the messenger service\\\\\\\"\\\\n\\\\n\\\\t^ nil! !\\\\n\\\\n\\\\n!Morph methodsFor: 'geniestubs' stamp: 'nk 3/10/2004 09:58'!\\\\nallowsGestureStart: evt\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'geniestubs' stamp: 'nk 3/11/2004 17:45'!\\\\nisGestureStart: anEvent\\\\n\\\\t\\\\\\\"This mouse down could be the start of a gesture, or the end of a gesture focus\\\\\\\"\\\\n\\\\n\\\\tanEvent hand isGenieEnabled\\\\n\\\\t\\\\tifFalse: [ ^false ].\\\\n\\\\n\\\\t(self allowsGestureStart: anEvent)\\\\n\\\\t\\\\tifTrue: [^ true ].\\\\t\\\\t\\\\\\\"could be the start of a gesture\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"otherwise, check for whether it's time to disable the Genie auto-focus\\\\\\\"\\\\n\\\\t(anEvent hand isGenieFocused\\\\n\\\\t\\\\tand: [anEvent whichButton ~= anEvent hand focusStartEvent whichButton])\\\\n\\\\t\\\\t\\\\tifTrue: [anEvent hand disableGenieFocus].\\\\n\\\\n\\\\t^false! !\\\\n\\\\n!Morph methodsFor: 'geniestubs' stamp: 'nk 3/11/2004 17:30'!\\\\nmouseStillDownStepRate\\\\n\\\\t\\\\\\\"At what rate do I want to receive #mouseStillDown: notifications?\\\\\\\"\\\\n\\\\t^1! !\\\\n\\\\n!Morph methodsFor: 'geniestubs' stamp: 'nk 3/10/2004 06:38'!\\\\nredButtonGestureDictionaryOrName: aSymbolOrDictionary! !\\\\n\\\\n!Morph methodsFor: 'geniestubs' stamp: 'nk 3/10/2004 06:38'!\\\\nyellowButtonGestureDictionaryOrName: aSymbolOrDictionary! !\\\\n\\\\n\\\\n!Morph methodsFor: '*morphic-Postscript Canvases' stamp: 'di 9/22/1999 08:45'!\\\\nasEPS\\\\n\\\\n\\\\t^ EPSCanvas morphAsPostscript: self rotated: false.\\\\n! !\\\\n\\\\n!Morph methodsFor: '*morphic-Postscript Canvases'!\\\\nasPostscript\\\\n\\\\t^self asEPS.\\\\n! !\\\\n\\\\n!Morph methodsFor: '*morphic-Postscript Canvases' stamp: 'di 9/22/1999 08:45'!\\\\nasPostscriptPrintJob\\\\n\\\\n\\\\t^ DSCPostscriptCanvas morphAsPostscript: self rotated: false.\\\\n! !\\\\n\\\\n!Morph methodsFor: '*morphic-Postscript Canvases' stamp: 'ar 1/16/2001 17:06'!\\\\nclipPostscript\\\\n\\\\t^Clipboard clipboardText: self asPostscript.\\\\n\\\\n! !\\\\n\\\\n!Morph methodsFor: '*morphic-Postscript Canvases' stamp: 'mpw 8/10/1930 05:21'!\\\\ndrawPostscriptOn: aCanvas\\\\n\\\\n\\\\tself drawOn:aCanvas.\\\\n! !\\\\n\\\\n!Morph methodsFor: '*morphic-Postscript Canvases' stamp: 'mpw 8/10/1930 05:25'!\\\\nfullDrawPostscriptOn: aCanvas\\\\n\\\\n\\\\tself fullDrawOn:aCanvas.\\\\n! !\\\\n\\\\n!Morph methodsFor: '*morphic-Postscript Canvases' stamp: 'nk 12/29/2003 10:55'!\\\\nprintPSToFile\\\\n\\\\t\\\\n\\\\tself printPSToFileNamed: self externalName! !\\\\n\\\\n\\\\n!Morph methodsFor: 'player' stamp: 'tk 10/30/2001 12:13'!\\\\nassuredCardPlayer\\\\n\\\\t\\\\\\\"Answer the receiver's player, creating a new one if none currently exists\\\\\\\"\\\\n\\\\n\\\\t| aPlayer |\\\\n\\\\t(aPlayer _ self player) ifNotNil: [\\\\n\\\\t\\\\t(aPlayer isKindOf: CardPlayer) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [^ aPlayer]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self error: 'Must convert to a CardPlayer']\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"later convert using as: and remove the error\\\\\\\"].\\\\n\\\\tself assureExternalName.  \\\\\\\"a default may be given if not named yet\\\\\\\"\\\\n\\\\tself player: (aPlayer _ UnscriptedCardPlayer newUserInstance).\\\\n\\\\t\\\\t\\\\\\\"Force it to be a CardPlayer.  Morph class no longer dictates what kind of player\\\\\\\"\\\\n\\\\taPlayer costume: self.\\\\n\\\\tself presenter ifNotNil: [self presenter flushPlayerListCache].\\\\n\\\\t^ aPlayer! !\\\\n\\\\n!Morph methodsFor: 'player' stamp: 'sw 2/19/1999 09:06'!\\\\nassuredPlayer\\\\n\\\\t\\\\\\\"Answer the receiver's player, creating a new one if none currently exists\\\\\\\"\\\\n\\\\n\\\\t| aPlayer |\\\\n\\\\t(aPlayer _ self player) ifNil:\\\\n\\\\t\\\\t[self assureExternalName.  \\\\\\\"a default may be given if not named yet\\\\\\\"\\\\n\\\\t\\\\tself player: (aPlayer _ self newPlayerInstance).  \\\\n\\\\t\\\\t\\\\t\\\\\\\"Different morphs may demand different player types\\\\\\\"\\\\n\\\\t\\\\taPlayer costume: self.\\\\n\\\\t\\\\tself presenter ifNotNil: [self presenter flushPlayerListCache]].\\\\n\\\\t^ aPlayer! !\\\\n\\\\n!Morph methodsFor: 'player' stamp: 'sw 8/10/2000 00:06'!\\\\nassureExternalName\\\\n\\\\t| aName |\\\\n\\\\t^ (aName _ self knownName) ifNil:\\\\n\\\\t\\\\t[self setNameTo: (aName _ self externalName).\\\\n\\\\t\\\\t^ aName]! !\\\\n\\\\n!Morph methodsFor: 'player' stamp: 'sw 10/27/2000 17:38'!\\\\ncurrentDataValue\\\\n\\\\t\\\\\\\"Answer the data value associated with the receiver.  Useful in conjunction with default-value setting\\\\\\\"\\\\n\\\\n\\\\t^ nil! !\\\\n\\\\n!Morph methodsFor: 'player' stamp: 'sw 9/15/1998 13:33'!\\\\nnewPlayerInstance\\\\n\\\\t^ UnscriptedPlayer newUserInstance! !\\\\n\\\\n!Morph methodsFor: 'player' stamp: 'sw 1/22/2001 14:25'!\\\\nokayToDuplicate\\\\n\\\\t\\\\\\\"Formerly this protocol was used to guard against awkward situations when there were anonymous scripts in the etoy system.  Nowadays we just always allow duplication\\\\\\\"\\\\n\\\\n\\\\t^ true! !\\\\n\\\\n!Morph methodsFor: 'player' stamp: 'mir 6/13/2001 14:45'!\\\\nshouldRememberCostumes\\\\n\\\\t^true! !\\\\n\\\\n!Morph methodsFor: 'player' stamp: 'sw 8/11/1998 16:54'!\\\\nshowPlayerMenu\\\\n\\\\tself player ifNotNil:\\\\n\\\\t\\\\t[self player showPlayerMenu]! !\\\\n\\\\n!Morph methodsFor: 'player' stamp: 'sw 10/6/2000 07:37'!\\\\nvariableDocks\\\\n\\\\t\\\\\\\"Answer a list of VariableDocker objects for docking up my data with an instance held in my containing playfield.  The simple presence of some objects on a Playfield will result in the maintenance of instance data on the corresponding Card.  This is a generalization of the HyperCard 'field' idea.  If there is already a cachedVariableDocks cached, use that.  For this all to work happily, one must be certain to invalidate the #cachedVariableDocks cache when that's appropriate.\\\\\\\"\\\\n\\\\n\\\\t^ self valueOfProperty: #cachedVariableDocks ifAbsent: [#()]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'player commands' stamp: 'nb 6/17/2003 12:25'!\\\\nbeep: soundName\\\\n\\\\n\\\\tself playSoundNamed: soundName\\\\n! !\\\\n\\\\n!Morph methodsFor: 'player commands'!\\\\njumpTo: aPoint\\\\n\\\\t\\\\\\\"Let my owner decide how I move.\\\\\\\"\\\\n\\\\n\\\\towner move: self toPosition: aPoint.\\\\n! !\\\\n\\\\n!Morph methodsFor: 'player commands' stamp: 'sw 2/16/1999 11:33'!\\\\nmakeFenceSound\\\\n\\\\tPreferences soundsEnabled ifTrue:\\\\n\\\\t\\\\t[self playSoundNamed: 'scratch'].\\\\n! !\\\\n\\\\n!Morph methodsFor: 'player commands' stamp: 'gk 2/23/2004 21:08'!\\\\nplaySoundNamed: soundName\\\\n\\\\t\\\\\\\"Play the sound with the given name.\\\\n\\\\tDoes nothing if this image lacks sound playing facilities.\\\\\\\"\\\\n\\\\n\\\\tSoundService default playSoundNamed: soundName asString! !\\\\n\\\\n!Morph methodsFor: 'player commands'!\\\\nset: aPointOrNumber\\\\n\\\\t\\\\\\\"Set my position.\\\\\\\"\\\\n\\\\n\\\\tself jumpTo: aPointOrNumber.\\\\n! !\\\\n\\\\n\\\\n!Morph methodsFor: 'button properties' stamp: 'RAA 3/8/2001 14:45'!\\\\nbuttonProperties\\\\n\\\\n\\\\t^self valueOfProperty: #universalButtonProperties! !\\\\n\\\\n!Morph methodsFor: 'button properties' stamp: 'RAA 3/8/2001 14:45'!\\\\nbuttonProperties: propertiesOrNil\\\\n\\\\n\\\\tpropertiesOrNil ifNil: [\\\\n\\\\t\\\\tself removeProperty: #universalButtonProperties\\\\n\\\\t] ifNotNil: [\\\\n\\\\t\\\\tself setProperty: #universalButtonProperties toValue: propertiesOrNil\\\\n\\\\t].! !\\\\n\\\\n!Morph methodsFor: 'button properties' stamp: 'RAA 3/8/2001 07:49'!\\\\nensuredButtonProperties\\\\n\\\\n\\\\tself hasButtonProperties ifFalse: [\\\\n\\\\t\\\\tself buttonProperties: (ButtonProperties new visibleMorph: self)\\\\n\\\\t].\\\\n\\\\t^self buttonProperties! !\\\\n\\\\n!Morph methodsFor: 'button properties' stamp: 'RAA 3/8/2001 07:18'!\\\\nhasButtonProperties\\\\n\\\\n\\\\t^self hasProperty: #universalButtonProperties! !\\\\n\\\\n\\\\n!Morph methodsFor: '*flexiblevocabularies-scripting' stamp: 'nk 9/11/2004 17:12'!\\\\ncategoriesForViewer\\\\n\\\\t\\\\\\\"Answer a list of symbols representing the categories to offer in the \\\\n\\\\tviewer, in order\\\\\\\"\\\\n\\\\t| dict aList |\\\\n\\\\tdict := Dictionary new.\\\\n\\\\tself unfilteredCategoriesForViewer\\\\n\\\\t\\\\twithIndexDo: [:cat :index | dict at: cat put: index].\\\\n\\\\tself filterViewerCategoryDictionary: dict.\\\\n\\\\taList := SortedCollection\\\\n\\\\t\\\\t\\\\t\\\\tsortBlock: [:a :b | (dict at: a)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t< (dict at: b)].\\\\n\\\\taList addAll: dict keys.\\\\n\\\\t^ aList asArray! !\\\\n\\\\n!Morph methodsFor: '*flexiblevocabularies-scripting' stamp: 'nk 8/29/2004 17:09'!\\\\nselectorsForViewer\\\\n\\\\t\\\\\\\"Answer a list of symbols representing all the selectors available in all my viewer categories\\\\\\\"\\\\n\\\\n\\\\t| aClass aList itsAdditions added addBlock |\\\\n\\\\taClass := self renderedMorph class.\\\\n\\\\taList := OrderedCollection new.\\\\n\\\\tadded := Set new.\\\\n\\\\taddBlock := [ :sym | (added includes: sym) ifFalse: [ added add: sym. aList add: sym ]].\\\\n\\\\n\\\\t[aClass == Morph superclass] whileFalse: \\\\n\\\\t\\\\t\\\\t[(aClass hasAdditionsToViewerCategories) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[itsAdditions := aClass allAdditionsToViewerCategories.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\titsAdditions do: [ :add | add do: [:aSpec |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"the spec list\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taSpec first == #command ifTrue: [ addBlock value: aSpec second].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taSpec first == #slot \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[ addBlock value: (aSpec seventh).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t addBlock value: aSpec ninth]]]].\\\\n\\\\t\\\\t\\\\taClass := aClass superclass].\\\\n\\\\n\\\\t^aList copyWithoutAll: #(#unused #dummy)\\\\n\\\\n\\\\t\\\\\\\"SimpleSliderMorph basicNew selectorsForViewer\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: '*flexiblevocabularies-scripting' stamp: 'nk 8/29/2004 17:14'!\\\\nselectorsForViewerIn: aCollection\\\\n\\\\t\\\\\\\"Answer a list of symbols representing all the selectors available in all my viewer categories, selecting only the ones in aCollection\\\\\\\"\\\\n\\\\n\\\\t| aClass aList itsAdditions added addBlock |\\\\n\\\\taClass := self renderedMorph class.\\\\n\\\\taList := OrderedCollection new.\\\\n\\\\tadded := Set new.\\\\n\\\\taddBlock := [ :sym |\\\\n\\\\t\\\\t(added includes: sym) ifFalse: [ (aCollection includes: sym)\\\\n\\\\t\\\\t\\\\tifTrue: [ added add: sym. aList add: sym ]]].\\\\n\\\\n\\\\t[aClass == Morph superclass] whileFalse: \\\\n\\\\t\\\\t\\\\t[(aClass hasAdditionsToViewerCategories) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[itsAdditions := aClass allAdditionsToViewerCategories.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\titsAdditions do: [ :add | add do: [:aSpec |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"the spec list\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taSpec first == #command ifTrue: [ addBlock value: aSpec second].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taSpec first == #slot \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[ addBlock value: (aSpec seventh).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t addBlock value: aSpec ninth]]]].\\\\n\\\\t\\\\t\\\\taClass := aClass superclass].\\\\n\\\\n\\\\t^aList copyWithoutAll: #(#unused #dummy)\\\\n\\\\n\\\\t\\\\\\\"SimpleSliderMorph basicNew selectorsForViewerIn: \\\\n\\\\t#(setTruncate: getColor setColor: getKnobColor setKnobColor: getWidth setWidth: getHeight setHeight: getDropEnabled setDropEnabled:)\\\\n\\\\t\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: '*flexiblevocabularies-scripting' stamp: 'nk 9/4/2004 11:47'!\\\\nunderstandsBorderVocabulary\\\\n\\\\t\\\\\\\"Replace the 'isKindOf: BorderedMorph' so that (for instance) Connectors can have their border vocabulary visible in viewers.\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n\\\\n!Morph methodsFor: 'object fileIn' stamp: 'dgd 2/22/2003 14:30'!\\\\nconvertAugust1998: varDict using: smartRefStrm \\\\n\\\\t\\\\\\\"These variables are automatically stored into the new instance \\\\n\\\\t('bounds' 'owner' 'submorphs' 'fullBounds' 'color' ). \\\\n\\\\tThis method is for additional changes. Use statements like (foo _ \\\\n\\\\tvarDict at: 'foo').\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Be sure to to fill in ('extension' ) and deal with the information \\\\n\\\\tin ('eventHandler' 'properties' 'costumee' )\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"This method moves all property variables as well as \\\\n\\\\teventHandler, and costumee into a morphicExtension.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Move refs to eventhandler and costumee into extension\\\\\\\"\\\\n\\\\n\\\\t| propVal |\\\\n\\\\t(varDict at: 'eventHandler') isNil \\\\n\\\\t\\\\tifFalse: [self eventHandler: (varDict at: 'eventHandler')].\\\\n\\\\t(varDict at: 'costumee') isNil \\\\n\\\\t\\\\tifFalse: [self player: (varDict at: 'costumee')].\\\\n\\\\t(varDict at: 'properties') isNil \\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[(varDict at: 'properties') keys do: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:key | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Move property extensions into extension\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpropVal := (varDict at: 'properties') at: key.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpropVal ifNotNil: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[key == #possessive \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [propVal == true ifTrue: [self bePossessive]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[key ifNotNil: [self assureExtension convertProperty: key toValue: propVal]]]]]! !\\\\n\\\\n!Morph methodsFor: 'object fileIn' stamp: 'md 2/27/2006 09:56'!\\\\nconvertNovember2000DropShadow: varDict using: smartRefStrm \\\\n\\\\t\\\\\\\"Work hard to eliminate the DropShadow. Inst vars are already  \\\\n\\\\tstored into.\\\\\\\"\\\\n\\\\n\\\\t| rend |\\\\n\\\\tsubmorphs notEmpty \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[rend := submorphs first renderedMorph.\\\\n\\\\t\\\\t\\\\t\\\\\\\"a text?\\\\\\\"\\\\n\\\\t\\\\t\\\\trend setProperty: #hasDropShadow toValue: true.\\\\n\\\\t\\\\t\\\\trend setProperty: #shadowColor toValue: (varDict at: 'color').\\\\n\\\\t\\\\t\\\\trend setProperty: #shadowOffset toValue: (varDict at: 'shadowOffset').\\\\n\\\\t\\\\t\\\\t\\\\\\\"ds owner ifNotNil: [ds owner addAllMorphs: ds  \\\\n\\\\t\\\\t\\\\tsubmorphs]. ^rend does this\\\\\\\"\\\\n\\\\t\\\\t\\\\trend privateOwner: owner.\\\\n\\\\t\\\\t\\\\textension ifNotNil: [\\\\n\\\\t\\\\t\\\\t\\\\textension actorState  ifNotNil: [rend actorState: self extension actorState].\\\\n\\\\t\\\\t\\\\t\\\\textension externalName ifNotNil: [rend setNameTo: self extension externalName].\\\\n\\\\t\\\\t\\\\t\\\\textension player ifNotNil: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trend player: extension player.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\textension player rawCostume: rend]].\\\\n\\\\t\\\\t\\\\t^rend].\\\\n\\\\t(rend := Morph new) color: Color transparent.\\\\n\\\\t^rend! !\\\\n\\\\n\\\\n!Morph methodsFor: 'system primitives' stamp: 'sw 10/27/2000 17:37'!\\\\ncreationStamp\\\\n\\\\t\\\\\\\"Answer the creation stamp stored within the receiver, if any\\\\\\\"\\\\n\\\\n\\\\t^ self valueOfProperty: #creationStamp ifAbsent: [super creationStamp]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'button' stamp: 'sw 2/6/2001 23:09'!\\\\ndoButtonAction\\\\n\\\\t\\\\\\\"If the receiver has a button-action defined, do it now.  The default button action of any morph is, well, to do nothing.  Note that there are several ways -- too many ways -- for morphs to have button-like actions.  This one refers not to the #mouseUpCodeToRun feature, nor does it refer to the Player-scripting mechanism.  Instead it is intended for morph classes whose very nature is to be buttons -- this method provides glue so that arbitrary buttons on the UI can be 'fired' programatticaly from user scripts\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'button' stamp: 'sw 2/6/2001 23:22'!\\\\nfire\\\\n\\\\t\\\\\\\"If the receiver has any kind of button-action defined, fire that action now.   Any morph can have special, personal mouseUpCodeToRun, and that will be triggered by this.  Additionally, some morphs have specific buttonness, and these get sent the #doButtonAction message to carry out their firing.  Finally, some morphs have mouse behaviors associated with one or more Player scripts.\\\\n\\\\tFor the present, we'll try out doing *all* the firings this object can do. \\\\\\\"\\\\n\\\\n\\\\tself firedMouseUpCode.   \\\\t\\\\\\\"This will run the mouseUpCodeToRun, if any\\\\\\\"\\\\n\\\\n\\\\tself player ifNotNil:\\\\t\\\\t\\\\n\\\\t\\\\t[self player fireOnce].  \\\\\\\"Run mouseDown and mouseUp scripts\\\\\\\"\\\\n\\\\n\\\\tself doButtonAction\\\\t\\\\t\\\\t\\\\\\\"Do my native button action, if any\\\\\\\"! !\\\\n\\\\n!Morph methodsFor: 'button' stamp: 'dgd 2/22/2003 14:31'!\\\\nfiredMouseUpCode\\\\n\\\\t\\\\\\\"If the user has special mouseUpCodeToRun, then fire it once right now and return true, else return false\\\\\\\"\\\\n\\\\n\\\\t| evt |\\\\n\\\\t(self world isNil or: [self mouseUpCodeOrNil isNil]) ifTrue: [^false].\\\\n\\\\tevt := MouseEvent new \\\\n\\\\t\\\\t\\\\t\\\\tsetType: nil\\\\n\\\\t\\\\t\\\\t\\\\tposition: self center\\\\n\\\\t\\\\t\\\\t\\\\tbuttons: 0\\\\n\\\\t\\\\t\\\\t\\\\thand: self world activeHand.\\\\n\\\\tself programmedMouseUp: evt for: self.\\\\n\\\\t^true! !\\\\n\\\\n\\\\n!Morph methodsFor: 'event handling-override' stamp: 'nk 3/10/2004 19:47'!\\\\nhandlerForMouseDown: anEvent \\\\n\\\\t\\\\\\\"Return the (prospective) handler for a mouse down event. The handler is temporarily \\\\n\\\\tinstalled and can be used for morphs further down the hierarchy to negotiate whether \\\\n\\\\tthe inner or the outer morph should finally handle the event.\\\\\\\"\\\\n\\\\n\\\\tanEvent blueButtonPressed\\\\n\\\\t\\\\tifTrue: [^ self handlerForBlueButtonDown: anEvent].\\\\n\\\\tanEvent yellowButtonPressed\\\\n\\\\t\\\\tifTrue: [^ self handlerForYellowButtonDown: anEvent].\\\\n\\\\tanEvent controlKeyPressed\\\\n\\\\t\\\\tifTrue: [^ self handlerForMetaMenu: anEvent].\\\\n\\\\t(self handlesMouseDown: anEvent)\\\\n\\\\t\\\\tifFalse: [^ nil].\\\\t\\\\\\\"not interested\\\\\\\"\\\\n\\\\n\\\\tanEvent handler\\\\n\\\\t\\\\tifNil: [^ self ].\\\\t\\\\\\\"Same priority but I am innermost\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Nobody else was interested\\\\\\\"\\\\n\\\\t^self mouseDownPriority >= anEvent handler mouseDownPriority\\\\n\\\\t\\\\tifTrue: [ self]\\\\n\\\\t\\\\tifFalse: [ nil]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'texture support' stamp: 'dgd 2/16/2003 20:02'!\\\\nisValidWonderlandTexture\\\\n\\\\t\\\\\\\"Return true if the receiver is a valid wonderland texture\\\\\\\"\\\\n\\\\t^ self\\\\n\\\\t\\\\tvalueOfProperty: #isValidWonderlandTexture\\\\n\\\\t\\\\tifAbsent: [true]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'model access' stamp: 'nk 3/10/2004 19:51'!\\\\nmodels\\\\n\\\\t\\\\\\\"Answer a collection of whatever models I may have.\\\\\\\"\\\\n\\\\n\\\\tself modelOrNil ifNil: [ ^EmptyArray ].\\\\n\\\\t^Array with: self modelOrNil! !\\\\n\\\\n\\\\n!Morph methodsFor: 'player viewer' stamp: 'wiz 1/1/2006 12:58'!\\\\nopenViewerForArgument\\\\n\\\\t\\\\\\\"Open up a viewer for a player associated with the morph in question. \\\\\\\"\\\\n\\\\tself presenter viewMorph: self! !\\\\n\\\\n!Morph methodsFor: 'player viewer' stamp: 'sw 3/13/98 17:40'!\\\\nupdateLiteralLabel\\\\n\\\\t\\\\\\\"Backstop -- updatingStringMorphs inform their owners with this message when they've changed; some Morphs care, others don't\\\\\\\"! !\\\\n\\\\n\\\\n!Morph methodsFor: 'other' stamp: 'sw 10/30/2001 13:12'!\\\\nremoveAllButFirstSubmorph\\\\n\\\\t\\\\\\\"Remove all of the receiver's submorphs other than the first one.\\\\\\\"\\\\n\\\\n\\\\tself submorphs allButFirst do: [:m | m delete]! !\\\\n\\\\n\\\\n!Morph methodsFor: 'selected object' stamp: 'dgd 8/28/2004 16:30'!\\\\nselectedObject\\\\n\\\\t\\\\\\\"answer the selected object for the hand or nil is none\\\\\\\"\\\\n\\\\t^ self primaryHand selectedObject! !\\\\n\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!Morph class methodsFor: 'class initialization' stamp: 'hg 8/3/2000 16:43'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Morph initialize\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"this empty array object is shared by all morphs with no submorphs:\\\\\\\"\\\\n\\\\tEmptyArray _ Array new.\\\\n\\\\tFileList registerFileReader: self! !\\\\n\\\\n\\\\n!Morph class methodsFor: 'connectors-scripting' stamp: 'nk 9/10/2004 11:34'!\\\\nadditionsToViewerCategoryConnection\\\\n\\\\t\\\\\\\"Answer viewer additions for the 'connection' category\\\\\\\"\\\\n\\\\t\\\\\\\"Vocabulary initialize\\\\\\\"\\\\n\\\\n\\\\t^{\\\\n\\\\t\\\\t#'connections to me'.\\\\n\\\\t\\\\t#(\\\\n\\\\t\\\\t(command tellAllPredecessors: 'Send a message to all graph predecessors' ScriptName)\\\\n\\\\t\\\\t(command tellAllSuccessors: 'Send a message to all graph predecessors' ScriptName)\\\\n\\\\t\\\\t(command tellAllIncomingConnections: 'Send a message to all the connectors whose destination end is connected to me' ScriptName)\\\\n\\\\t\\\\t(command tellAllOutgoingConnections: 'Send a message to all the connectors whose source end is connected to me' ScriptName)\\\\n\\\\t\\\\t(slot incomingConnectionCount 'The number of connectors whose destination end is connected to me' Number readOnly Player getIncomingConnectionCount unused unused)\\\\n\\\\t\\\\t(slot outgoingConnectionCount 'The number of connectors whose source end is connected to me' Number readOnly Player getOutgoingConnectionCount unused unused)\\\\n\\\\t\\\\t)\\\\n\\\\t}\\\\n! !\\\\n\\\\n\\\\n!Morph class methodsFor: 'fileIn/Out' stamp: 'nk 7/16/2003 15:54'!\\\\nfileReaderServicesForFile: fullName suffix: suffix\\\\n\\\\n\\\\t^({ 'morph'. 'morphs'. 'sp'. '*' } includes: suffix)\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t{SimpleServiceEntry \\\\n\\\\t\\\\t\\\\t\\\\tprovider: self \\\\n\\\\t\\\\t\\\\t\\\\tlabel: 'load as morph'\\\\n\\\\t\\\\t\\\\t\\\\tselector: #fromFileName:\\\\n\\\\t\\\\t\\\\t\\\\tdescription: 'load as morph'}]\\\\n\\\\t\\\\tifFalse: [#()]! !\\\\n\\\\n!Morph class methodsFor: 'fileIn/Out' stamp: 'yo 8/7/2003 11:02'!\\\\nfromFileName: fullName\\\\n\\\\t\\\\\\\"Reconstitute a Morph from the file, presumed to be represent a Morph saved\\\\n\\\\tvia the SmartRefStream mechanism, and open it in an appropriate Morphic world\\\\\\\"\\\\n\\\\n \\\\t| aFileStream morphOrList |\\\\n\\\\taFileStream _ (MultiByteBinaryOrTextStream with: ((FileStream readOnlyFileNamed: fullName) binary contentsOfEntireFile)) binary reset.\\\\n\\\\tmorphOrList _ aFileStream fileInObjectAndCode.\\\\n\\\\t(morphOrList isKindOf: SqueakPage) ifTrue: [morphOrList _ morphOrList contentsMorph].\\\\n\\\\tSmalltalk isMorphic\\\\n\\\\t\\\\tifTrue: [ActiveWorld addMorphsAndModel: morphOrList]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[morphOrList isMorph ifFalse: [self inform: 'Can only load a single morph\\\\ninto an mvc project via this mechanism.'].\\\\n\\\\t\\\\t\\\\tmorphOrList openInWorld]! !\\\\n\\\\n!Morph class methodsFor: 'fileIn/Out' stamp: 'sw 2/17/2002 02:43'!\\\\nserviceLoadMorphFromFile\\\\n\\\\t\\\\\\\"Answer a service for loading a .morph file\\\\\\\"\\\\n\\\\n\\\\t^ SimpleServiceEntry \\\\n\\\\t\\\\tprovider: self \\\\n\\\\t\\\\tlabel: 'load as morph'\\\\n\\\\t\\\\tselector: #fromFileName:\\\\n\\\\t\\\\tdescription: 'load as morph'\\\\n\\\\t\\\\tbuttonLabel: 'load'! !\\\\n\\\\n!Morph class methodsFor: 'fileIn/Out' stamp: 'sd 2/1/2002 21:45'!\\\\nservices\\\\n\\\\n\\\\t^ Array with: self serviceLoadMorphFromFile! !\\\\n\\\\n\\\\n!Morph class methodsFor: 'initialize-release' stamp: 'SD 11/15/2001 22:22'!\\\\nunload\\\\n\\\\n\\\\tFileList unregisterFileReader: self ! !\\\\n\\\\n\\\\n!Morph class methodsFor: 'instance creation' stamp: 'efo 5/3/2002 14:59'!\\\\ninitializedInstance\\\\n\\\\t\\\\\\\"Answer an instance of the receiver which in some sense is initialized.  In the case of Morphs, this will yield an instance that can be attached to the Hand after having received the same kind of basic initialization that would be obtained from an instance chosen from the 'new morph' menu.\\\\n\\\\tReturn nil if the receiver is reluctant for some reason to return such a thing\\\\\\\"\\\\n\\\\n\\\\t^ (self class includesSelector: #descriptionForPartsBin)\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self newStandAlone]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self new]! !\\\\n\\\\n!Morph class methodsFor: 'instance creation'!\\\\nnewBounds: bounds\\\\n\\\\n\\\\t^ self new privateBounds: bounds! !\\\\n\\\\n!Morph class methodsFor: 'instance creation' stamp: 'jm 5/29/1998 21:28'!\\\\nnewBounds: bounds color: color\\\\n\\\\n\\\\t^ (self new privateBounds: bounds) privateColor: color\\\\n! !\\\\n\\\\n!Morph class methodsFor: 'instance creation' stamp: 'sw 8/4/97 12:05'!\\\\nnewSticky\\\\n\\\\n\\\\t^ self new beSticky! !\\\\n\\\\n\\\\n!Morph class methodsFor: 'misc' stamp: 'sw 8/4/1998 16:51'!\\\\nmorphsUnknownToTheirOwners\\\\n\\\\t\\\\\\\"Return a list of all morphs (other than HandMorphs) whose owners do not contain them in their submorph lists\\\\\\\"\\\\n\\\\t\\\\\\\"Morph morphsUnknownToTheirOwners\\\\\\\"\\\\n\\\\t| problemMorphs itsOwner |\\\\n\\\\tproblemMorphs _ OrderedCollection new.\\\\n\\\\tself allSubInstances do:\\\\n\\\\t\\\\t[:m | (m isHandMorph not and: [((itsOwner _ m owner) ~~ nil and: [(itsOwner submorphs includes: m) not])])\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[problemMorphs add: m]].\\\\n\\\\t^ problemMorphs! !\\\\n\\\\n\\\\n!Morph class methodsFor: 'new-morph participation' stamp: 'di 6/22/97 09:07'!\\\\nincludeInNewMorphMenu\\\\n\\\\t\\\\\\\"Return true for all classes that can be instantiated from the menu\\\\\\\"\\\\n\\\\t^ true! !\\\\n\\\\n!Morph class methodsFor: 'new-morph participation' stamp: 'sw 6/28/2001 11:33'!\\\\nnewStandAlone\\\\n\\\\t\\\\\\\"Answer an instance capable of standing by itself as a usable morph.\\\\\\\"\\\\n\\\\n\\\\t^ self basicNew initializeToStandAlone! !\\\\n\\\\n!Morph class methodsFor: 'new-morph participation' stamp: 'sw 8/2/2001 12:01'!\\\\npartName: aName categories: aList documentation: aDoc\\\\n\\\\t\\\\\\\"Answer a DescriptionForPartsBin which will represent a launch of a new instance of my class via the #newStandAlone protocol sent to my class. Use the category-list and documentation provided\\\\\\\"\\\\n\\\\n\\\\n\\\\t^ DescriptionForPartsBin new\\\\n\\\\t\\\\tformalName: aName\\\\n\\\\t\\\\tcategoryList: aList\\\\n\\\\t\\\\tdocumentation: aDoc\\\\n\\\\t\\\\tglobalReceiverSymbol: self name\\\\n\\\\t\\\\tnativitySelector: #newStandAlone! !\\\\n\\\\n\\\\n!Morph class methodsFor: 'scripting' stamp: 'sw 7/20/2005 01:20'!\\\\nadditionsToViewerCategoryColorAndBorder\\\\n\\\\t\\\\\\\"Answer viewer additions for the 'color & border' category\\\\\\\"\\\\n\\\\n\\\\t^#(\\\\n\\\\t\\\\t#'color & border' \\\\n\\\\t\\\\t(\\\\n\\\\t\\\\t\\\\t(slot color 'The color of the object' Color readWrite Player getColor  Player  setColor:)\\\\n\\\\t\\\\t\\\\t(slot opacity '0 means completely transparent, 1 means completely opaque' Number readWrite Player getAlpha Player setAlpha:)\\\\n\\\\t\\\\t\\\\t(slot borderStyle 'The style of the object''s border' BorderStyle readWrite Player getBorderStyle player setBorderStyle:)\\\\n\\\\t\\\\t\\\\t(slot borderColor 'The color of the object''s border' Color readWrite Player getBorderColor Player  setBorderColor:)\\\\n\\\\t\\\\t\\\\t(slot borderWidth 'The width of the object''s border' Number readWrite Player getBorderWidth Player setBorderWidth:)\\\\n\\\\t\\\\t\\\\t(slot roundedCorners 'Whether corners should be rounded' Boolean readWrite Player getRoundedCorners Player setRoundedCorners:)\\\\n\\\\n\\\\t\\\\t\\\\t(slot gradientFill 'Whether a gradient fill should be used' Boolean readWrite Player getUseGradientFill Player setUseGradientFill:)\\\\n\\\\t\\\\t\\\\t(slot secondColor 'The second color used when gradientFill is in effect' Color readWrite Player getSecondColor Player setSecondColor:)\\\\n\\\\n\\\\t\\\\t\\\\t(slot radialFill 'Whether the gradient fill, if used, should be radial' Boolean readWrite Player getRadialGradientFill Player setRadialGradientFill:)\\\\n\\\\n\\\\t\\\\t\\\\t(slot dropShadow 'Whether a drop shadow is shown' Boolean readWrite Player getDropShadow Player setDropShadow:)\\\\n\\\\t\\\\t\\\\t(slot shadowColor 'The color of the drop shadow' Color readWrite Player getShadowColor Player setShadowColor:)\\\\n\\\\t\\\\t)\\\\n\\\\t)\\\\n\\\\n! !\\\\n\\\\n!Morph class methodsFor: 'scripting' stamp: 'sw 8/11/97 13:17'!\\\\nauthoringPrototype\\\\n\\\\t\\\\\\\"Answer an instance of the receiver suitable for placing in a parts bin for authors\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ self new markAsPartsDonor! !\\\\n\\\\n!Morph class methodsFor: 'scripting' stamp: 'bf 9/11/2004 17:18'!\\\\nhasAdditionsToViewerCategories\\\\n\\\\t^ self class selectors\\\\n\\\\t\\\\tanySatisfy: [:each | each == #additionsToViewerCategories\\\\n\\\\t\\\\t\\\\t\\\\tor: [(each beginsWith: 'additionsToViewerCategory')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tand: [(each at: 26 ifAbsent: []) ~= $:]]]! !\\\\n\\\\n!Morph class methodsFor: 'scripting' stamp: 'yo 3/15/2005 14:10'!\\\\nhelpContributions\\\\n\\\\t\\\\\\\"Answer a list of pairs of the form (<symbol> <help message> ) to contribute to the system help dictionary\\\\\\\"\\\\n\\\\t\\\\n\\\\\\\"NB: Many of the items here are not needed any more since they're specified as part of command definitions now.  Someone needs to take the time to go through the list and remove items no longer needed.  But who's got that kind of time?\\\\\\\"\\\\n\\\\n\\\\t^ #(\\\\n\\\\t\\\\t(acceptScript:for:\\\\n\\\\t\\\\t\\\\t'submit the contents of the given script editor as the code defining the given selector')\\\\n\\\\t\\\\t(actorState\\\\n\\\\t\\\\t\\\\t'return the ActorState object for the receiver, creating it if necessary')\\\\n\\\\t\\\\t(addInstanceVariable\\\\n\\\\t\\\\t\\\\t'start the interaction for adding a new variable to the object')\\\\n\\\\t\\\\t(addPlayerMenuItemsTo:hand:\\\\n\\\\t\\\\t\\\\t'add player-specific menu items to the given menu, on behalf of the given hand.  At present, these are only commands relating to the turtle')\\\\n\\\\t\\\\t(addYesNoToHand\\\\n\\\\t\\\\t\\\\t'Press here to tear off a  TEST/YES/NO unit which you can drop into your script')\\\\n\\\\t\\\\t(allScriptEditors\\\\n\\\\t\\\\t\\\\t'answer a list off the extant ScriptEditors for the receiver')\\\\n\\\\t\\\\t(amount\\\\n\\\\t\\\\t\\\\t'The amount of displacement')\\\\n\\\\t\\\\t(angle\\\\t\\\\n\\\\t\\\\t\\\\t'The angular displacement')\\\\n\\\\t\\\\t(anonymousScriptEditorFor:\\\\n\\\\t\\\\t\\\\t'answer a new ScriptEditor object to serve as the place for scripting an anonymous (unnamed, unsaved) script for the receiver')\\\\n\\\\t\\\\t(append:\\\\n\\\\t\\\\t\\\\t'add an object to this container')\\\\n\\\\t\\\\t(prepend:\\\\n\\\\t\\\\t\\\\t'add an object to this container')\\\\n\\\\t\\\\t(assignDecrGetter:setter:amt:\\\\n\\\\t\\\\t\\\\t'evaluate the decrement variant of assignment')\\\\n\\\\t\\\\t(assignGetter:setter:amt:\\\\n\\\\t\\\\t\\\\t'evaluate the vanilla variant of assignment')\\\\n\\\\t\\\\t(assignIncrGetter:setter:amt:\\\\n\\\\t\\\\t\\\\t'evalute the increment version of assignment')\\\\n\\\\t\\\\t(assignMultGetter:setter:amt:\\\\n\\\\t\\\\t\\\\t'evaluate the multiplicative version of assignment')\\\\n\\\\t\\\\t(assureEventHandlerRepresentsStatus\\\\n\\\\t\\\\t\\\\t'make certain that the event handler associated with my current costume is set up to conform to my current script-status')\\\\n\\\\t\\\\t(assureExternalName\\\\n\\\\t\\\\t\\\\t'If I do not currently have an external name assigned, get one now')\\\\n\\\\t\\\\t(assureUniClass\\\\n\\\\t\\\\t\\\\t'make certain that I am a member a uniclass (i.e. a unique subclass); if I am not, create one now and become me into an instance of it')\\\\n\\\\t\\\\t(availableCostumeNames\\\\n\\\\t\\\\t\\\\t'answer a list of strings representing the names of all costumes currently available for me')\\\\n\\\\t\\\\t(availableCostumesForArrows\\\\n\\\\t\\\\t\\\\t'answer a list of actual, instantiated costumes for me, which can be cycled through as the user hits a next-costume or previous-costume button in a viewer')\\\\n\\\\t\\\\t(beep:\\\\n\\\\t\\\\t\\\\t'make the specified sound')\\\\n\\\\t\\\\t(borderColor\\\\n\\\\t\\\\t\\\\t'The color of the object''s border')\\\\n\\\\t\\\\t(borderWidth\\\\n\\\\t\\\\t\\\\t'The width of the object''s border')\\\\n\\\\t\\\\t(bottom\\\\n\\\\t\\\\t\\\\t'My bottom edge, measured downward from the top edge of the world')\\\\n\\\\t\\\\t(bounce:\\\\n\\\\t\\\\t\\\\t'If object strayed beyond the boundaries of its container, make it reflect back into it, making the specified noise while doing so.')\\\\n\\\\t\\\\t(bounce\\\\n\\\\t\\\\t\\\\t'If object strayed beyond the boundaries of its container, make it reflect back into it')\\\\n\\\\t\\\\t(chooseTrigger\\\\n'When this script should run.\\\\n\\\\\\\"normal\\\\\\\" means \\\\\\\"only when called\\\\\\\"')\\\\n\\\\t\\\\t(clearTurtleTrails\\\\n\\\\t\\\\t\\\\t'Clear all the pen trails in the interior.')\\\\n\\\\t\\\\t(clearOwnersPenTrails\\\\n\\\\t\\\\t\\\\t'Clear all the pen trails in my container.')\\\\n\\\\t\\\\t(color\\\\t\\\\n\\\\t\\\\t\\\\t'The object''s interior color')\\\\n\\\\t\\\\t(colorSees\\\\n\\\\t\\\\t\\\\t'Whether a given color in the object is over another given color')\\\\n\\\\t\\\\t(colorUnder\\\\n\\\\t\\\\t\\\\t'The color under the center of the object')\\\\n\\\\t\\\\t(copy\\\\n\\\\t\\\\t\\\\t'Return a new object that is very much like this one')\\\\n\\\\t\\\\t(cursor\\\\t\\\\n\\\\t\\\\t\\\\t'The index of the chosen element')\\\\n\\\\t\\\\t(deleteCard\\\\n\\\\t\\\\t\\\\t'Delete the current card.')\\\\n\\\\t\\\\t(dismiss\\\\n\\\\t\\\\t\\\\t'Click here to dismiss me')\\\\n\\\\t\\\\t(doMenuItem:\\\\n\\\\t\\\\t\\\\t'Do a menu item, the same way as if it were chosen manually')\\\\n\\\\t\\\\t(doScript:\\\\n\\\\t\\\\t\\\\t'Perform the given script once, on the next tick.')\\\\n\\\\t\\\\t(elementNumber\\\\n\\\\t\\\\t\\\\t'My element number as seen by my owner')\\\\n\\\\t\\\\t(fire\\\\n\\\\t\\\\t\\\\t'Run any and all button-firing scripts of this object')\\\\n\\\\t\\\\t(firstPage\\\\n\\\\t\\\\t\\\\t'Go to first page of book')\\\\n\\\\t\\\\t(followPath\\\\n\\\\t\\\\t\\\\t\\\\t'Retrace the path the object has memorized, if any.')\\\\n\\\\t\\\\t(forward:\\\\n\\\\t\\\\t\\\\t'Moves the object forward in the direction it is heading') \\\\n\\\\t\\\\t(goto:\\\\n\\\\t\\\\t\\\\t'Go to the specfied book page')\\\\n\\\\t\\\\t(goToNextCardInStack\\\\n\\\\t\\\\t\\\\t'Go to the next card')\\\\n\\\\t\\\\t(goToPreviousCardInStack\\\\n\\\\t\\\\t\\\\t'Go to the previous card.')\\\\n\\\\t\\\\t(goToRightOf:\\\\n\\\\t\\\\t\\\\t'Align the object just to the right of any specified object.')\\\\n\\\\t\\\\t(heading\\\\n\\\\t\\\\t\\\\t'Which direction the object is facing.  0 is straight up') \\\\n\\\\t\\\\t(height\\\\t\\\\n\\\\t\\\\t\\\\t'The distance between the top and bottom edges of the object')\\\\n\\\\t\\\\t(hide\\\\n\\\\t\\\\t\\\\t'Make the object so that it does not display and cannot handle input')\\\\n\\\\t\\\\t(initiatePainting\\\\t\\\\n\\\\t\\\\t\\\\t'Initiate painting of a new object in the standard playfield.')\\\\n\\\\t\\\\t(initiatePaintingIn:\\\\n\\\\t\\\\t\\\\t'Initiate painting of a new object in the given place.')\\\\n\\\\t\\\\t(isOverColor\\\\n\\\\t\\\\t\\\\t'Whether any part of this object is directly over the specified color')\\\\n\\\\t\\\\t(isUnderMouse\\\\n\\\\t\\\\t\\\\t'Whether any part of this object is beneath the current mouse-cursor position')\\\\n\\\\t\\\\t(lastPage\\\\n\\\\t\\\\t\\\\t'Go to the last page of the book.')\\\\n\\\\t\\\\t(left\\\\n\\\\t\\\\t\\\\t'My left edge, measured from the left edge of the World')\\\\n\\\\t\\\\t(leftRight\\\\n\\\\t\\\\t\\\\t'The horizontal displacement')\\\\n\\\\t\\\\t(liftAllPens\\\\n\\\\t\\\\t\\\\t'Lift the pens on all the objects in my interior.')\\\\n\\\\t\\\\t(lowerAllPens\\\\n\\\\t\\\\t\\\\t'Lower the pens on all the objects in my interior.')\\\\n\\\\t\\\\t(mouseX\\\\n\\\\t\\\\t\\\\t'The x coordinate of the mouse pointer')\\\\n\\\\t\\\\t(mouseY\\\\n\\\\t\\\\t\\\\t'The y coordinate of the mouse pointer')\\\\n\\\\t\\\\t(moveToward:\\\\n\\\\t\\\\t\\\\t'Move in the direction of another object.')\\\\n\\\\t\\\\t(insertCard\\\\n\\\\t\\\\t\\\\t'Create a new card.')\\\\n\\\\t\\\\t(nextPage\\\\n\\\\t\\\\t\\\\t'Go to next page.')\\\\n\\\\t\\\\t(numberAtCursor\\\\n\\\\t\\\\t\\\\t'The number held by the object at the chosen element')\\\\n\\\\t\\\\t(objectNameInHalo\\\\n\\\\t\\\\t\\\\t'Object''s name -- To change: click here, edit, hit ENTER')\\\\n\\\\t\\\\t(obtrudes\\\\n\\\\t\\\\t\\\\t'Whether any part of the object sticks out beyond its container''s borders')\\\\n\\\\t\\\\t(offerScriptorMenu\\\\n\\\\t\\\\t\\\\t'The Scriptee.\\\\nPress here to get a menu')\\\\n\\\\t\\\\t(pauseScript:\\\\n\\\\t\\\\t\\\\t'Make a running script become paused.')\\\\n\\\\t\\\\t(penDown\\\\n\\\\t\\\\t\\\\t'Whether the object''s pen is down (true) or up (false)')\\\\n\\\\t\\\\t(penColor\\\\n\\\\t\\\\t\\\\t'The color of the object''s pen')\\\\n\\\\t\\\\t(penSize\\\\t\\\\n\\\\t\\\\t\\\\t'The size of the object''s pen')\\\\n\\\\t\\\\t(clearPenTrails\\\\n\\\\t\\\\t\\\\t'Clear all pen trails in the current playfield')\\\\n\\\\t\\\\t(playerSeeingColorPhrase\\\\n\\\\t\\\\t\\\\t'The player who \\\\\\\"sees\\\\\\\" a given color')\\\\n\\\\t\\\\t(previousPage\\\\n\\\\t\\\\t\\\\t'Go to previous page')\\\\n\\\\n\\\\t\\\\t(show\\\\n\\\\t\\\\t\\\\t'If object was hidden, make it show itself again.')\\\\n\\\\t\\\\t(startScript:\\\\n\\\\t\\\\t\\\\t'Make a script start running.')\\\\n\\\\t\\\\t(stopScript:\\\\n\\\\t\\\\t\\\\t'Make a script stop running.')\\\\n\\\\t\\\\t(top\\\\n\\\\t\\\\t\\\\t'My top edge, measured downward from the top edge of the world')\\\\n\\\\t\\\\t(right\\\\n\\\\t\\\\t\\\\t'My right edge, measured from the left edge of the world')\\\\n\\\\t\\\\t(roundUpStrays\\\\n\\\\t\\\\t\\\\t'Bring all out-of-container subparts back into view.')\\\\n\\\\t\\\\t(scaleFactor\\\\n\\\\t\\\\t\\\\t'The amount by which the object is scaled')\\\\n\\\\t\\\\t(stopScript:\\\\n\\\\t\\\\t\\\\t'make the specified script stop running')\\\\n\\\\t\\\\t(tellAllSiblings:\\\\n\\\\t\\\\t\\\\t'send a message to all of my sibling instances')\\\\n\\\\t\\\\t(try\\\\n\\\\t\\\\t\\\\t'Run this command once.')\\\\n\\\\t\\\\t(tryMe\\\\n\\\\t\\\\t\\\\t'Click here to run this script once; hold button down to run repeatedly')\\\\n\\\\t\\\\t(turn:\\\\t\\\\t\\\\t\\\\t\\\\n\\\\t\\\\t\\\\t'Change the heading of the object by the specified amount')\\\\n\\\\t\\\\t(unhideHiddenObjects\\\\n\\\\t\\\\t\\\\t'Unhide all hidden objects.')\\\\n\\\\t\\\\t(upDown\\\\n\\\\t\\\\t\\\\t'The vertical displacement')\\\\n\\\\t\\\\t(userScript\\\\n\\\\t\\\\t\\\\t'This is a script defined by you.')\\\\n\\\\t\\\\t(userSlot\\\\n\\\\t\\\\t\\\\t'This is a variable defined by you.  Click here to change its type')\\\\n\\\\t\\\\t(valueAtCursor\\\\n\\\\t\\\\t\\\\t'The chosen element')\\\\n\\\\t\\\\t(wearCostumeOf:\\\\n\\\\t\\\\t\\\\t'Wear the same kind of costume as the other object')\\\\n\\\\t\\\\t(width\\\\t\\\\n\\\\t\\\\t\\\\t'The distance between the left and right edges of the object')\\\\n\\\\t\\\\t(wrap\\\\n\\\\t\\\\t\\\\t'If object has strayed beond the boundaries of its container, make it reappear from the opposite edge.')\\\\n\\\\t\\\\t(x\\\\n\\\\t\\\\t\\\\t'The x coordinate, measured from the left of the container')\\\\n\\\\t\\\\t(y\\\\n\\\\t\\\\t\\\\t'The y-coordinate, measured upward from the bottom of the container')\\\\n\\\\n\\\\t\\\\t)\\\\n! !\\\\n\\\\n\\\\n!Morph class methodsFor: 'testing' stamp: 'nk 6/12/2004 09:20'!\\\\nallSketchMorphClasses\\\\n\\\\t\\\\\\\"Morph allSketchMorphClasses\\\\\\\"\\\\n\\\\t^ Array\\\\n\\\\t\\\\tstreamContents: [:s | self\\\\n\\\\t\\\\t\\\\t\\\\twithAllSubclassesDo: [:cls | cls isSketchMorphClass\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [s nextPut: cls ]]]\\\\n! !\\\\n\\\\n!Morph class methodsFor: 'testing' stamp: 'yo 3/17/2005 09:07'!\\\\nallSketchMorphForms\\\\n\\\\t\\\\\\\"Answer a Set of forms of SketchMorph (sub) instances, except those \\\\n\\\\tused as button images, ones being edited, and those with 0 extent.\\\\\\\"\\\\n\\\\n\\\\t| reasonableForms form |\\\\n\\\\treasonableForms := Set new.\\\\n\\\\tMorph allSketchMorphClasses do:\\\\n\\\\t\\\\t[:cls | cls allInstances do:\\\\n\\\\t\\\\t\\\\t[:m | (m owner isKindOf: SketchEditorMorph orOf: IconicButton)\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[form _ m form.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t((form width > 0) and: [form height > 0]) ifTrue: [reasonableForms add: form]]]].\\\\n\\\\t^ reasonableForms! !\\\\n\\\\n!Morph class methodsFor: 'testing' stamp: 'nk 6/12/2004 09:17'!\\\\nisSketchMorphClass\\\\n\\\\t^false! !\\\\n\\\\n\\\\n!Morph class methodsFor: '*eToys-customevents-user events' stamp: 'sw 6/16/2005 01:26'!\\\\nadditionsToViewerCategoryUserEvents\\\\n\\\\t\\\\\\\"Answer further viewer additions relating to user-defined events; these appear in the 'scripting' category\\\\\\\"\\\\n\\\\n\\\\t^ Preferences allowEtoyUserCustomEvents\\\\n\\\\t\\\\tifTrue: [ #(scripting (\\\\n\\\\t\\\\t\\\\t(command triggerCustomEvent: 'trigger a user-defined (global) event' CustomEvents)\\\\n\\\\t\\\\t\\\\t(slot triggeringObject 'the object that is triggering an event, either user-defined or pre-defined' Player readOnly Player getTriggeringObject unused unused)))]\\\\n\\\\t\\\\tifFalse: [#(scripting ())]! !\\\\n\\\\n\\\\n!Morph class methodsFor: '*eToys-new-morph participation' stamp: 'sw 10/24/2001 15:51'!\\\\npartName: aName categories: aList documentation: aDoc sampleImageForm: aForm\\\\n\\\\t\\\\\\\"Answer a DescriptionForPartsBin which will represent a launch of a new instance of my class via the #newStandAlone protocol sent to my class. Use the category-list and documentation provided.  This variant allows an overriding image form to be provided, useful in cases where we don't want to launch a sample instance just to get the form\\\\\\\"\\\\n\\\\n\\\\n\\\\t| descr |\\\\n\\\\tdescr _ DescriptionForPartsBin new\\\\n\\\\t\\\\tformalName: aName\\\\n\\\\t\\\\tcategoryList: aList\\\\n\\\\t\\\\tdocumentation: aDoc\\\\n\\\\t\\\\tglobalReceiverSymbol: self name\\\\n\\\\t\\\\tnativitySelector: #newStandAlone.\\\\n\\\\tdescr sampleImageForm: aForm.\\\\n\\\\t^ descr\\\\n! !\\\\n\\\\n\\\\n!Morph class methodsFor: '*eToys-scripting' stamp: 'sw 9/27/2001 17:40'!\\\\nadditionsToViewerCategoryBasic\\\\n\\\\t\\\\\\\"Answer viewer additions for the 'basic' category\\\\\\\"\\\\n\\\\n\\\\t^#(\\\\n\\\\t\\\\tbasic \\\\n\\\\t\\\\t(\\\\n\\\\t\\\\t\\\\t(slot x 'The x coordinate' Number readWrite Player getX Player setX:)\\\\n\\\\t\\\\t\\\\t(slot y  \\\\t'The y coordinate' Number readWrite Player \\\\tgetY Player setY:)\\\\n\\\\t\\\\t\\\\t(slot heading  'Which direction the object is facing.  0 is straight up' Number readWrite Player getHeading Player setHeading:)\\\\n\\\\t\\\\t\\\\t(command forward: 'Moves the object forward in the direction it is heading' Number)\\\\n\\\\t\\\\t\\\\t(command turn: 'Change the heading of the object by the specified amount' Number)\\\\n\\\\t\\\\t\\\\t(command beep: 'Make the specified sound' Sound)\\\\n\\\\t\\\\t)\\\\n\\\\t)\\\\n! !\\\\n\\\\n!Morph class methodsFor: '*eToys-scripting' stamp: 'sw 4/20/2002 00:47'!\\\\nadditionsToViewerCategoryDragAndDrop\\\\n\\\\t\\\\\\\"Answer viewer additions for the 'drag & drop' category\\\\\\\"\\\\n\\\\n\\\\t^#(\\\\n\\\\t\\\\t#'drag & drop'\\\\n \\\\n\\\\t\\\\t(\\\\n\\\\t\\\\t\\\\t(slot 'drop enabled' 'Whether drop is enabled' Boolean readWrite Player getDropEnabled Player setDropEnabled:)\\\\n\\\\t\\\\t\\\\t(slot 'resist being picked up' 'Whether a simple mouse-drag on this object should allow it to be picked up' Boolean readWrite Player getSticky Player setSticky:)\\\\n\\\\t\\\\t\\\\t(slot 'resist deletion' 'Whether this is resistant to easy removal via the pink X halo handle.' Boolean readWrite Player getResistsRemoval Player setResistsRemoval:)\\\\n\\\\t\\\\t\\\\t(slot 'be locked' 'Whether this object should be blind to all input' Boolean readWrite Player getIsLocked Player setIsLocked:)\\\\n\\\\t\\\\t\\\\n\\\\t\\\\t))! !\\\\n\\\\n!Morph class methodsFor: '*eToys-scripting' stamp: 'sw 9/17/2002 13:58'!\\\\nadditionsToViewerCategoryGeometry\\\\n\\\\t\\\\\\\"answer additions to the geometry viewer category\\\\\\\"\\\\n\\\\n\\\\t^ #(geometry \\\\n\\\\t\\\\t(\\\\n\\\\t\\\\t\\\\t(slot x   'The x coordinate' Number readWrite Player  getX   Player setX:)\\\\n\\\\t\\\\t\\\\t(slot y   'The y coordinate' Number readWrite Player  getY  Player setY:)\\\\n\\\\t\\\\t\\\\t(slot heading  'Which direction the object is facing.  0 is straight up' Number readWrite Player getHeading  Player setHeading:)\\\\n\\\\n\\\\t\\\\t\\\\t(slot  scaleFactor 'The factor by which the object is magnified' Number readWrite Player getScaleFactor Player setScaleFactor:)\\\\n\\\\t\\\\t\\\\t(slot  left   'The left edge' Number readWrite Player getLeft  Player  setLeft:)\\\\n\\\\t\\\\t\\\\t(slot  right  'The right edge' Number readWrite Player getRight  Player  setRight:)\\\\n\\\\t\\\\t\\\\t(slot  top  'The top edge' Number readWrite Player getTop  Player  setTop:) \\\\n\\\\t\\\\t\\\\t(slot  bottom  'The bottom edge' Number readWrite Player getBottom  Player  setBottom:) \\\\n\\\\t\\\\t\\\\t(slot  length  'The length' Number readWrite Player getLength  Player  setLength:) \\\\n\\\\t\\\\t\\\\t(slot  width  'The width' Number readWrite Player getWidth  Player  setWidth:)\\\\n\\\\n\\\\t\\\\t\\\\t(slot headingTheta 'The angle, in degrees, that my heading vector makes with the positive x-axis' Number readWrite Player getHeadingTheta Player setHeadingTheta:)\\\\n\\\\n\\\\t\\\\t\\\\t(slot distance 'The length of the vector connecting the origin to the object''s position' Number readWrite Player getDistance Player setDistance:)\\\\n\\\\t\\\\t\\\\t(slot theta 'The angle between the positive x-axis and the vector connecting the origin to the object''s position' Number readWrite Player getTheta Player setTheta: )\\\\n\\\\t\\\\t)\\\\n\\\\t)\\\\n\\\\n\\\\n! !\\\\n\\\\n!Morph class methodsFor: '*eToys-scripting' stamp: 'sw 11/16/2001 10:21'!\\\\nadditionsToViewerCategoryLayout\\\\n\\\\t\\\\\\\"Answer viewer additions for the 'layout' category\\\\\\\"\\\\n\\\\n\\\\t^#(\\\\n\\\\t\\\\tlayout \\\\n\\\\t\\\\t(\\\\n\\\\t\\\\t\\\\t(slot clipSubmorphs 'Whether or not to clip my submorphs' Boolean readWrite Player getClipSubmorphs Player setClipSubmorphs:)\\\\n\\\\n\\\\t\\\\t))\\\\n! !\\\\n\\\\n!Morph class methodsFor: '*eToys-scripting' stamp: 'sw 7/8/2004 00:20'!\\\\nadditionsToViewerCategoryMiscellaneous\\\\n\\\\t\\\\\\\"Answer viewer additions for the 'miscellaneous' category\\\\\\\"\\\\n\\\\n\\\\t^#(\\\\n\\\\t\\\\tmiscellaneous \\\\n\\\\t\\\\t(\\\\n\\\\t\\\\t\\\\t(command doMenuItem: 'do the menu item' Menu)\\\\n\\\\t\\\\t\\\\t(command show 'make the object visible')\\\\n\\\\t\\\\t\\\\t(command hide 'make the object invisible')\\\\n\\\\t\\\\t\\\\t(command wearCostumeOf: 'wear the costume of...' Player)\\\\n\\\\n\\\\t\\\\t\\\\t(command fire 'trigger any and all of this object''s button actions')\\\\n\\\\t\\\\t\\\\t(slot copy 'returns a copy of this object' Player readOnly Player getNewClone\\\\t unused unused)\\\\n\\\\t\\\\t\\\\t(slot elementNumber 'my index in my container' Number readWrite Player getIndexInOwner Player setIndexInOwner:)\\\\n\\\\t\\\\t\\\\t(slot holder 'the object''s container' Player readOnly Player getHolder Player setHolder:)\\\\n\\\\t\\\\t\\\\t(command stamp 'add my image to the pen trails')\\\\n\\\\t\\\\t\\\\t(command erase 'remove this object from the screen')\\\\n\\\\t\\\\t\\\\t(command stampAndErase 'add my image to the pen trails and go away')\\\\n\\\\t\\\\t)\\\\n\\\\t)\\\\n\\\\n! !\\\\n\\\\n!Morph class methodsFor: '*eToys-scripting' stamp: 'dgd 8/8/2003 22:17'!\\\\nadditionsToViewerCategoryMotion\\\\n\\\\t\\\\\\\"Answer viewer additions for the 'motion' category\\\\\\\"\\\\n\\\\n\\\\t^#(\\\\n\\\\t\\\\tmotion \\\\n\\\\t\\\\t(\\\\n\\\\t\\\\t\\\\t(slot x 'The x coordinate' Number readWrite Player getX Player setX:)\\\\n\\\\t\\\\t\\\\t(slot y  \\\\t'The y coordinate' Number readWrite Player \\\\tgetY Player setY:)\\\\n\\\\t\\\\t\\\\t(slot heading  'Which direction the object is facing.  0 is straight up' Number readWrite Player getHeading Player setHeading:)\\\\n\\\\t\\\\t\\\\t(command forward: 'Moves the object forward in the direction it is heading' Number)\\\\n\\\\t\\\\t\\\\t(slot obtrudes 'whether the object sticks out over its container''s edge' Boolean readOnly Player getObtrudes unused unused) \\\\n\\\\t\\\\t\\\\t(command turnToward: 'turn toward the given object' Player) \\\\n\\\\t\\\\t\\\\t(command moveToward: 'move toward the given object' Player) \\\\n\\\\t\\\\t\\\\t(command turn: 'Change the heading of the object by the specified amount' Number)\\\\n\\\\t\\\\t\\\\t(command bounce: 'bounce off the edge if hit' Sound) \\\\n\\\\t\\\\t\\\\t(command wrap 'wrap off the edge if appropriate') \\\\n\\\\t\\\\t\\\\t(command followPath 'follow the yellow brick road') \\\\n\\\\t\\\\t\\\\t(command goToRightOf: 'place this object to the right of another' Player)\\\\n\\\\t\\\\t)\\\\n\\\\t)\\\\n\\\\n! !\\\\n\\\\n!Morph class methodsFor: '*eToys-scripting' stamp: 'sw 12/9/2001 23:26'!\\\\nadditionsToViewerCategoryObservation\\\\n\\\\t\\\\\\\"Answer viewer additions for the 'observations' category\\\\\\\"\\\\n\\\\n\\\\t^#(\\\\n\\\\t\\\\tobservation\\\\n \\\\n\\\\t\\\\t(\\\\n\\\\t\\\\t\\\\t(slot colorUnder 'The color under the center of the object' Color readOnly Player getColorUnder unused  unused )\\\\n\\\\t\\\\t\\\\t(slot brightnessUnder 'The brightness under the center of the object' Number readOnly Player getBrightnessUnder unused unused)\\\\n\\\\t\\\\t\\\\t(slot luminanceUnder 'The luminance under the center of the object' Number readOnly Player getLuminanceUnder unused unused)\\\\n\\\\t\\\\t\\\\t(slot saturationUnder 'The saturation under the center of the object' Number readOnly Player getSaturationUnder unused unused)\\\\n\\\\t\\\\t\\\\n\\\\t\\\\t))\\\\n! !\\\\n\\\\n!Morph class methodsFor: '*eToys-scripting' stamp: 'sw 4/17/2003 12:05'!\\\\nadditionsToViewerCategoryPenUse\\\\n\\\\t\\\\\\\"Answer viewer additions for the 'pen use' category\\\\\\\"\\\\n\\\\n\\\\t^#(\\\\n\\\\t\\\\t#'pen use' \\\\n\\\\t\\\\t(\\\\n\\\\t\\\\t\\\\t(slot penColor 'the color of ink used by the pen' Color readWrite Player getPenColor Player setPenColor:) \\\\n\\\\t\\\\t\\\\t(slot penSize 'the width of the pen' Number readWrite Player getPenSize Player setPenSize:) \\\\n\\\\t\\\\t\\\\t(slot penDown 'whether the pen is currently down' Boolean readWrite Player getPenDown Player setPenDown:)\\\\n\\\\t\\\\t\\\\t(slot trailStyle 'determines whether lines, arrows, arrowheads, or dots are used when I put down a pen trail' TrailStyle readWrite Player getTrailStyle Player setTrailStyle:)\\\\n\\\\t\\\\t\\\\t(slot dotSize 'diameter of dot to use when trailStyle is dots' Number readWrite Player getDotSize Player setDotSize:)\\\\n\\\\t\\\\t\\\\t(command clearOwnersPenTrails 'clear all pen trails in my containing playfield')\\\\n\\\\t\\\\t)\\\\n\\\\t)\\\\n! !\\\\n\\\\n!Morph class methodsFor: '*eToys-scripting' stamp: 'sw 2/19/2003 18:04'!\\\\nadditionsToViewerCategoryScripting\\\\n\\\\t\\\\\\\"Answer viewer additions for the 'scripting' category\\\\\\\"\\\\n\\\\n\\\\t^#(\\\\n\\\\t\\\\tscripting \\\\n\\\\t\\\\t(\\\\n\\\\n\\\\t\\\\t\\\\t(command startScript: 'start the given script ticking' ScriptName)\\\\n\\\\t\\\\t\\\\t(command pauseScript: 'make the given script be \\\\\\\"paused\\\\\\\"' ScriptName)\\\\n\\\\t\\\\t\\\\t(command stopScript: 'make the given script be \\\\\\\"normal\\\\\\\"' ScriptName)\\\\n\\\\n\\\\t\\\\t\\\\t(command startAll: 'start the given script ticking in the object and all of its siblings.' ScriptName)\\\\n\\\\t\\\\t\\\\t(command pauseAll: 'make the given script be \\\\\\\"paused\\\\\\\" in the object and all of its siblings' ScriptName)\\\\n\\\\t\\\\t\\\\t(command stopAll: 'make the given script be \\\\\\\"normal\\\\\\\" in the object and all of its siblings' ScriptName)\\\\n\\\\n\\\\t\\\\t\\\\t(command doScript: 'run the given script once, on the next tick' ScriptName)\\\\n\\\\t\\\\t\\\\t(command tellSelfAndAllSiblings: 'run the given script in the object and in all of its siblings' ScriptName)\\\\n\\\\t\\\\t\\\\t(command tellAllSiblings: 'send a message to all siblings' ScriptName)))! !\\\\n\\\\n!Morph class methodsFor: '*eToys-scripting' stamp: 'RAA 5/18/2001 12:48'!\\\\nadditionsToViewerCategoryScripts\\\\n\\\\n\\\\t\\\\\\\"note: if you change the thing below you also need to change #tileScriptCommands.\\\\\\\"\\\\n\\\\n\\\\t^#(\\\\n\\\\t\\\\tscripts \\\\n\\\\t\\\\t(\\\\n\\\\t\\\\t\\\\t(command emptyScript 'an empty script')\\\\n\\\\t\\\\t)\\\\n\\\\t)\\\\n\\\\n! !\\\\n\\\\n!Morph class methodsFor: '*eToys-scripting' stamp: 'nk 10/14/2004 10:59'!\\\\nadditionsToViewerCategoryTests\\\\n\\\\t\\\\\\\"Answer viewer additions for the 'tests' category.\\\\\\\"\\\\n\\\\n\\\\\\\"Note:  Because of intractable performance problems in continuously evaluating isOverColor in a Viewer, the isOverColor entry is not given a readout\\\\\\\"\\\\n\\\\n\\\\t^#(\\\\n\\\\t\\\\t#tests \\\\n\\\\t\\\\t(\\\\n\\\\t\\\\t\\\\t(slot isOverColor 'whether any part of the object is over the given color' Boolean\\\\treadOnly Player seesColor: unused unused)\\\\n\\\\t\\\\t\\\\t(slot isUnderMouse 'whether the object is under the current mouse position' Boolean readOnly\\\\tPlayer getIsUnderMouse unused unused)\\\\n\\\\t\\\\t\\\\t(slot colorSees\\\\t'whether the given color sees the given color' Boolean readOnly\\\\tPlayer color:sees:\\\\tunused\\\\tunused)\\\\n\\\\t\\\\t\\\\t(slot overlaps    'whether I overlap a given object' Boolean readOnly Player overlaps: unused unused)\\\\n\\\\t\\\\t\\\\t(slot overlapsAny    'whether I overlap a given object or one of its siblings or similar objects' Boolean readOnly Player overlapsAny: unused unused)\\\\n\\\\t\\\\t\\\\t(slot touchesA\\\\t'whether I overlap any  Sketch that is showing the same picture as a particular prototype.' Boolean readOnly Player touchesA:\\\\tunused\\\\tunused)\\\\n\\\\t\\\\t\\\\t(slot obtrudes 'whether the object sticks out over its container''s edge' Boolean readOnly Player getObtrudes unused unused)\\\\n\\\\t\\\\t)\\\\n\\\\t)\\\\n! !\\\\n\\\\n!Morph class methodsFor: '*eToys-scripting' stamp: 'sw 9/17/2002 10:00'!\\\\nvectorAdditions\\\\n\\\\t\\\\\\\"Answer slot/command definitions for the vector experiment\\\\\\\"\\\\n\\\\n\\\\t^ # (\\\\n(slot x   'The x coordinate' Number readWrite Player  getX   Player setX:)\\\\n(slot y   'The y coordinate' Number readWrite Player  getY  Player setY:)\\\\n(slot heading  'Which direction the object is facing.  0 is straight up' Number readWrite Player getHeading  Player setHeading:)\\\\n(slot distance 'The length of the vector connecting the origin to the object''s position' Number readWrite Player getDistance Player setDistance:)\\\\n(slot theta 'The angle between the positive x-axis and the vector connecting the origin to the object''s position' Number readWrite Player getTheta Player setTheta: )\\\\n(slot headingTheta 'The angle that my heading vector makes with the positive x-axis' Number readWrite Player getHeadingTheta Player setHeadingTheta:)\\\\n\\\\n(command + 'Adds two players together, treating each as a vector from the origin.' Player)\\\\n(command - 'Subtracts one player from another, treating each as a vector from the origin.' Player)\\\\n(command * 'Multiply a player by a Number, treating the Player as a vector from the origin.' Number)\\\\n(command / 'Divide a player by a Number, treating the Player as a vector from the origin.' Number)\\\\n\\\\n(command incr: 'Each Player is a vector from the origin.  Increase one by the amount of the other.' Player)\\\\n(command decr: 'Each Player is a vector from the origin.  Decrease one by the amount of the other.' Player)\\\\n(command multBy: 'A Player is a vector from the origin.  Multiply its length by the factor.' Number)\\\\n(command dividedBy: 'A Player is a vector from the origin.  Divide its length by the factor.' Number)\\\\n\\\\t)! !\\\\n\\\\n\\\\n!Morph class methodsFor: '*flexibleVocabularies-flexiblevocabularies-scripting' stamp: 'nk 10/11/2003 18:17'!\\\\nadditionsToViewerCategories\\\\n\\\\t\\\\\\\"Answer a list of (<categoryName> <list of category specs>) pairs that characterize the\\\\n\\\\tphrases this kind of morph wishes to add to various Viewer categories.\\\\n\\\\n\\\\tThis version factors each category definition into a separate method.\\\\n\\\\n\\\\tSubclasses that have additions can either:\\\\n\\\\t\\\\t- override this method, or\\\\n\\\\t\\\\t- (preferably) define one or more additionToViewerCategory* methods.\\\\n\\\\n\\\\tThe advantage of the latter technique is that class extensions may be added\\\\n\\\\tby external packages without having to re-define additionsToViewerCategories.\\\\n\\\\t\\\\\\\"\\\\n\\\\t^#()! !\\\\n\\\\n!Morph class methodsFor: '*flexibleVocabularies-flexiblevocabularies-scripting' stamp: 'nk 8/29/2004 16:35'!\\\\nadditionsToViewerCategory: aCategoryName\\\\n\\\\t\\\\\\\"Answer a list of viewer specs for items to be added to the given category on behalf of the receiver.  Each class in a morph's superclass chain is given the opportunity to add more things\\\\\\\"\\\\n\\\\n\\\\taCategoryName == #vector ifTrue:\\\\n\\\\t\\\\t[^ self vectorAdditions].\\\\n\\\\t^self allAdditionsToViewerCategories at: aCategoryName ifAbsent: [ #() ].! !\\\\n\\\\n!Morph class methodsFor: '*flexibleVocabularies-flexiblevocabularies-scripting' stamp: 'nk 10/11/2003 18:06'!\\\\nadditionToViewerCategorySelectors\\\\n\\\\t\\\\\\\"Answer the list of my selectors matching additionsToViewerCategory*\\\\\\\"\\\\n\\\\t^self class organization allMethodSelectors select: [ :ea |\\\\n\\\\t\\\\t(ea beginsWith: 'additionsToViewerCategory')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [ (ea at: 26 ifAbsent: []) ~= $: ]]! !\\\\n\\\\n!Morph class methodsFor: '*flexibleVocabularies-flexiblevocabularies-scripting' stamp: 'nk 9/11/2004 16:56'!\\\\nallAdditionsToViewerCategories\\\\n\\\\t\\\\\\\"Answer a Dictionary of (<categoryName> <list of category specs>) that \\\\n\\\\tdefines the phrases this kind of morph wishes to add to various Viewer categories. \\\\n\\\\t \\\\n\\\\tThis version allows each category definition to be defined in one or more separate methods. \\\\n\\\\t \\\\n\\\\tSubclasses that have additions can either:\\\\n\\\\t- override #additionsToViewerCategories, or\\\\n\\\\t- (preferably) define one or more additionToViewerCategory* methods.\\\\n\\\\n\\\\tThe advantage of the latter technique is that class extensions may be added by\\\\n\\\\texternal packages without having to re-define additionsToViewerCategories.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"\\\\n\\\\tMorph allAdditionsToViewerCategories\\\\n\\\\t\\\\\\\"\\\\n\\\\t| dict |\\\\n\\\\tdict := IdentityDictionary new.\\\\n\\\\t(self class includesSelector: #additionsToViewerCategories)\\\\n\\\\t\\\\tifTrue: [self additionsToViewerCategories\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:group | group\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tpairsDo: [:key :list | (dict\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tat: key\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifAbsentPut: [OrderedCollection new])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taddAll: list]]].\\\\n\\\\tself class selectors\\\\n\\\\t\\\\tdo: [:aSelector | ((aSelector beginsWith: 'additionsToViewerCategory')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [(aSelector at: 26 ifAbsent: []) ~= $:])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [(self perform: aSelector)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tpairsDo: [:key :list | (dict\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tat: key\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifAbsentPut: [OrderedCollection new])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taddAll: list]]].\\\\n\\\\t^ dict! !\\\\n\\\\n!Morph class methodsFor: '*flexibleVocabularies-flexiblevocabularies-scripting' stamp: 'stephaneducasse 2/4/2006 20:33'!\\\\nunfilteredCategoriesForViewer\\\\n\\\\t\\\\\\\"Answer a list of symbols representing the categories to offer in the viewer for one of my instances, in order of:\\\\n\\\\t- masterOrderingOfCategorySymbols first\\\\n\\\\t- others last in order by translated wording\\\\\\\"\\\\n\\\\t\\\\\\\"\\\\n\\\\tMorph unfilteredCategoriesForViewer\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t| aClass additions masterOrder |\\\\n\\\\taClass := self.\\\\n\\\\tadditions := OrderedCollection new.\\\\n\\\\t[aClass == Morph superclass ] whileFalse: [\\\\n\\\\t\\\\tadditions addAll: (aClass allAdditionsToViewerCategories keys\\\\n\\\\t\\\\t\\\\tasSortedCollection: [ :a :b | a translated < b translated ]).\\\\n\\\\t\\\\taClass := aClass superclass ]. \\\\n\\\\n\\\\tmasterOrder := EToyVocabulary masterOrderingOfCategorySymbols.\\\\n\\\\n\\\\t^(masterOrder intersection: additions), (additions difference: masterOrder).! !\\\\n\\\\n\\\\n!Morph class methodsFor: '*MorphicExtras-arrow head size'!\\\\ndefaultArrowheadSize\\\\n\\\\t\\\\n\\\\t^ 5 @ 4! !\\\\n\\\\n!Morph class methodsFor: '*MorphicExtras-arrow head size'!\\\\nobtainArrowheadFor: aPrompt defaultValue: defaultPoint\\\\n\\\\t\\\\\\\"Allow the user to supply a point to serve as an arrowhead size.  Answer nil if we fail to get a good point\\\\\\\"\\\\n\\\\n\\\\t| result  |\\\\n\\\\tresult := FillInTheBlank request: aPrompt initialAnswer: defaultPoint asString.\\\\n\\\\tresult isEmptyOrNil ifTrue: [^ nil].\\\\n\\\\t^ [(Point readFrom: (ReadStream on: result))]\\\\n\\\\t\\\\ton: Error do: [:ex |  nil].! !\\\\n\\\\n\\\\n!Morph class methodsFor: '*MorphicExtras-new-morph participation' stamp: 'sw 11/27/2001 13:20'!\\\\naddPartsDescriptorQuadsTo: aList if: aBlock\\\\n\\\\t\\\\\\\"For each of the standard objects to be put into parts bins based on declarations in this class, add a parts-launching quintuplet to aList, provided that the boolean-valued-block-with-one-argument supplied evaluates to true when provided the DescriptionForPartsBin\\\\\\\"\\\\n\\\\n\\\\t| info more |\\\\n\\\\t(self class includesSelector: #descriptionForPartsBin) ifTrue:\\\\n\\\\t\\\\t[info _ self descriptionForPartsBin.\\\\n\\\\t\\\\t(aBlock value: info) ifTrue:\\\\n\\\\t\\\\t\\\\t[aList add:\\\\n\\\\t\\\\t\\\\t\\\\t{info globalReceiverSymbol.\\\\n\\\\t\\\\t\\\\t\\\\tinfo nativitySelector.\\\\n\\\\t\\\\t\\\\t\\\\tinfo formalName.\\\\n\\\\t\\\\t\\\\t\\\\tinfo documentation.\\\\n\\\\t\\\\t\\\\t\\\\tinfo sampleImageFormOrNil}]].\\\\n\\\\n\\\\t(self class includesSelector: #supplementaryPartsDescriptions)\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[more _ self supplementaryPartsDescriptions.\\\\n\\\\t\\\\t\\\\t(more isKindOf: DescriptionForPartsBin) ifTrue: [more _ Array with: more].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"The above being a mild bit of forgiveness, so that in the usual only-one\\\\n\\\\t\\\\t\\\\t\\\\tcase, the user need not return a collection\\\\\\\"\\\\n\\\\t\\\\t\\\\tmore do:\\\\n\\\\t\\\\t\\\\t\\\\t[:aPartsDescription |  (aBlock value: aPartsDescription) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[aList add:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t{aPartsDescription globalReceiverSymbol.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taPartsDescription nativitySelector.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taPartsDescription formalName.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taPartsDescription documentation.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taPartsDescription sampleImageFormOrNil}]]]! !\\\\n\\\\n\\\\n!Morph class methodsFor: '*MorphicExtras-parts bin' stamp: 'sw 8/12/2001 14:26'!\\\\nsupplementaryPartsDescriptions\\\\n\\\\t\\\\\\\"Answer a list of DescriptionForPartsBin objects that characterize objects that this class wishes to contribute to Stationery bins *other* than by the standard default #newStandAlone protocol\\\\\\\"\\\\n\\\\n\\\\t^ {\\\\tDescriptionForPartsBin\\\\n\\\\t\\\\t\\\\tformalName: 'Status'\\\\n\\\\t\\\\t\\\\tcategoryList: #(Scripting)\\\\n\\\\t\\\\t\\\\tdocumentation: 'Buttons to run, stop, or single-step scripts'\\\\n\\\\t\\\\t\\\\tglobalReceiverSymbol: #ScriptingSystem\\\\n\\\\t\\\\t\\\\tnativitySelector: #scriptControlButtons.\\\\n\\\\t\\\\tDescriptionForPartsBin\\\\n\\\\t\\\\t\\\\tformalName: 'Scripting'\\\\n\\\\t\\\\t\\\\tcategoryList: #(Scripting)\\\\n\\\\t\\\\t\\\\tdocumentation: 'A confined place for drawing and scripting, with its own private stop/step/go buttons.'\\\\n\\\\t\\\\t\\\\tglobalReceiverSymbol: #ScriptingSystem\\\\n\\\\t\\\\t\\\\tnativitySelector: #newScriptingSpace.\\\\n\\\\t\\\\tDescriptionForPartsBin\\\\n\\\\t\\\\t\\\\tformalName: 'Random'\\\\n\\\\t\\\\t\\\\tcategoryList: #(Scripting)\\\\n\\\\t\\\\t\\\\tdocumentation: 'A tile that will produce a random number in a given range'\\\\n\\\\t\\\\t\\\\tglobalReceiverSymbol: #RandomNumberTile\\\\n\\\\t\\\\t\\\\tnativitySelector: #new.\\\\n\\\\t\\\\tDescriptionForPartsBin\\\\n\\\\t\\\\t\\\\tformalName: 'ButtonDown?'\\\\n\\\\t\\\\t\\\\tcategoryList: #(Scripting)\\\\n\\\\t\\\\t\\\\tdocumentation: 'Tiles for querying whether the mouse button is down'\\\\n\\\\t\\\\t\\\\tglobalReceiverSymbol: #ScriptingSystem\\\\n\\\\t\\\\t\\\\tnativitySelector: #anyButtonPressedTiles.\\\\n\\\\t\\\\tDescriptionForPartsBin\\\\n\\\\t\\\\t\\\\tformalName: 'ButtonUp?'\\\\n\\\\t\\\\t\\\\tcategoryList: #(Scripting)\\\\n\\\\t\\\\t\\\\tdocumentation: 'Tiles for querying whether the mouse button is up'\\\\n\\\\t\\\\t\\\\tglobalReceiverSymbol: #ScriptingSystem\\\\n\\\\t\\\\t\\\\tnativitySelector: #noButtonPressedTiles.\\\\n\\\\t\\\\tDescriptionForPartsBin\\\\n\\\\t\\\\t\\\\tformalName: 'NextPage'\\\\n\\\\t\\\\t\\\\tcategoryList: #(Presentation)\\\\n\\\\t\\\\t\\\\tdocumentation: 'A button which, when clicked, takes the reader to the next page of a book'\\\\n\\\\t\\\\t\\\\tglobalReceiverSymbol: #BookMorph\\\\n\\\\t\\\\t\\\\tnativitySelector: #nextPageButton.\\\\n\\\\t\\\\tDescriptionForPartsBin\\\\n\\\\t\\\\t\\\\tformalName: 'PreviousPage'\\\\n\\\\t\\\\t\\\\tcategoryList: #(Presentation)\\\\n\\\\t\\\\t\\\\tdocumentation: 'A button which, when clicked, takes the reader to the next page of a book'\\\\n\\\\t\\\\t\\\\tglobalReceiverSymbol: #BookMorph\\\\n\\\\t\\\\t\\\\tnativitySelector: #previousPageButton.},\\\\n\\\\n\\\\t(Flaps quadsDefiningToolsFlap collect:\\\\n\\\\t\\\\t[:aQuad | DescriptionForPartsBin fromQuad: aQuad categoryList: #(Tools)])! !\\\\n\\\\n\\\\n\\\\n!Morph class methodsFor: '*flexibleVocabularies-flexibleVocabularies' stamp: 'al 11/28/2005 16:46'!\\\\nnoteAddedSelector: aSelector meta: isMeta\\\\n\\\\t\\\\\\\"Any change to an additionsToViewer... method can invalidate existing etoy vocabularies.\\\\n\\\\tThe #respondsTo: test is to allow loading the FlexibleVocabularies change set without having to worry about method ordering.\\\\\\\"\\\\n\\\\t(isMeta\\\\n\\\\t\\\\t\\\\tand: [(aSelector beginsWith: 'additionsToViewer')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [self respondsTo: #hasAdditionsToViewerCategories]])\\\\n\\\\t\\\\tifTrue: [Vocabulary changeMadeToViewerAdditions].\\\\n\\\\tsuper noteCompilationOf: aSelector meta: isMeta! !\\\\n\\\\n!Morph class methodsFor: '*flexibleVocabularies-flexibleVocabularies' stamp: 'NS 4/15/2004 12:40'!\\\\nnoteCompilationOf: aSelector meta: isMeta\\\\n\\\\t\\\\\\\"This method does nothing and should be removed!!\\\\\\\"\\\\n\\\\n\\\\t^ super noteCompilationOf: aSelector meta: isMeta! !\\\\nRectangleMorph subclass: #MorphExample\\\\n\\\\tinstanceVariableNames: 'phase ball star'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-Demo'!\\\\n!MorphExample commentStamp: 'kfr 10/26/2003 18:38' prior: 0!\\\\nThis is a example of how to use a morph. It consists of only two \\\\nmethods, initialize and step.\\\\n\\\\nDoIt:\\\\nMorphExample new openInWorld.\\\\n\\\\n\\\\n\\\\n!\\\\n\\\\n\\\\n!MorphExample methodsFor: 'initialization' stamp: 'dgd 2/21/2003 19:59'!\\\\ninitialize\\\\n\\\\t\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\tphase _ 1.\\\\n\\\\tself extent: 200 @ 200.\\\\n\\\\tball _ EllipseMorph new extent: 30 @ 30.\\\\n\\\\tself\\\\n\\\\t\\\\taddMorph: ((star _ StarMorph new extent: 150 @ 150) center: self center)! !\\\\n\\\\n\\\\n!MorphExample methodsFor: 'stepping and presenter' stamp: 'kfr 10/26/2003 18:33'!\\\\nstep\\\\n\\\\tphase _ phase\\\\\\\\\\\\\\\\8 + 1.\\\\n\\\\tphase = 1 ifTrue: [^ ball delete].\\\\n\\\\tphase < 4 ifTrue:[^self].\\\\n\\\\tphase = 4 ifTrue: [self addMorph: ball].\\\\n\\\\tball align: ball center with: (star vertices at: (phase-3*2)).! !\\\\nObject subclass: #MorphExtension\\\\n\\\\tinstanceVariableNames: 'locked visible sticky balloonText balloonTextSelector externalName isPartsDonor actorState player eventHandler otherProperties'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Kernel'!\\\\n!MorphExtension commentStamp: '<historical>' prior: 0!\\\\nMorphExtension provides access to extra instance state that is not required in most simple morphs.  This allows simple morphs to remain relatively lightweight while still admitting more complex structures as necessary.  The otherProperties field takes this policy to the extreme of allowing any number of additional named attributes, albeit at a certain cost in speed and space.!\\\\n\\\\n\\\\n!MorphExtension methodsFor: 'accessing' stamp: 'di 8/10/1998 12:52'!\\\\nballoonText\\\\n\\\\t^ balloonText! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing' stamp: 'di 8/10/1998 12:52'!\\\\nballoonTextSelector\\\\n\\\\t^ balloonTextSelector! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing' stamp: 'dgd 2/16/2003 21:51'!\\\\nballoonTextSelector: aSymbol \\\\n\\\\t\\\\\\\"change the receiver's balloonTextSelector\\\\\\\"\\\\n\\\\tballoonTextSelector _ aSymbol! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing' stamp: 'di 8/10/1998 12:55'!\\\\nballoonText: newValue\\\\n\\\\tballoonText _ newValue! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing' stamp: 'dgd 2/16/2003 21:51'!\\\\neventHandler\\\\n\\\\t\\\\\\\"answer the receiver's eventHandler\\\\\\\"\\\\n\\\\t^ eventHandler ! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing' stamp: 'di 8/10/1998 12:56'!\\\\neventHandler: newValue\\\\n\\\\teventHandler _ newValue! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing' stamp: 'dgd 2/16/2003 21:57'!\\\\nexternalName: aString \\\\n\\\\t\\\\\\\"change the receiver's externalName\\\\\\\"\\\\n\\\\texternalName _ aString! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing' stamp: 'dgd 2/16/2003 21:38'!\\\\nlocked\\\\n\\\\t\\\\\\\"answer whether the receiver is Locked\\\\\\\"\\\\n\\\\t^ locked! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing' stamp: 'dgd 2/16/2003 21:48'!\\\\nlocked: aBoolean \\\\n\\\\t\\\\\\\"change the receiver's locked property\\\\\\\"\\\\n\\\\tlocked _ aBoolean! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing' stamp: 'di 8/14/1998 13:07'!\\\\nsticky\\\\n\\\\t^ sticky! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing' stamp: 'dgd 2/16/2003 21:47'!\\\\nsticky: aBoolean \\\\n\\\\t\\\\\\\"change the receiver's sticky property\\\\\\\"\\\\n\\\\tsticky _ aBoolean! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing' stamp: 'dgd 2/16/2003 21:41'!\\\\nvisible\\\\n\\\\t\\\\\\\"answer whether the receiver is visible\\\\\\\"\\\\n\\\\t^ visible! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing' stamp: 'di 8/10/1998 12:55'!\\\\nvisible: newValue\\\\n\\\\tvisible _ newValue! !\\\\n\\\\n\\\\n!MorphExtension methodsFor: 'accessing - layout properties' stamp: 'ar 11/14/2000 17:17'!\\\\nlayoutFrame\\\\n\\\\t^self valueOfProperty: #layoutFrame ifAbsent:[nil]! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - layout properties' stamp: 'dgd 2/22/2003 13:32'!\\\\nlayoutFrame: aLayoutFrame \\\\n\\\\taLayoutFrame isNil\\\\n\\\\t\\\\tifTrue: [self removeProperty: #layoutFrame]\\\\n\\\\t\\\\tifFalse: [self setProperty: #layoutFrame toValue: aLayoutFrame]! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - layout properties' stamp: 'ar 11/14/2000 17:17'!\\\\nlayoutPolicy\\\\n\\\\t^self valueOfProperty: #layoutPolicy ifAbsent:[nil]! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - layout properties' stamp: 'dgd 2/22/2003 13:32'!\\\\nlayoutPolicy: aLayoutPolicy \\\\n\\\\taLayoutPolicy isNil\\\\n\\\\t\\\\tifTrue: [self removeProperty: #layoutPolicy]\\\\n\\\\t\\\\tifFalse: [self setProperty: #layoutPolicy toValue: aLayoutPolicy]! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - layout properties' stamp: 'ar 11/14/2000 17:18'!\\\\nlayoutProperties\\\\n\\\\t^self valueOfProperty: #layoutProperties ifAbsent:[nil]! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - layout properties' stamp: 'dgd 2/22/2003 13:32'!\\\\nlayoutProperties: newProperties \\\\n\\\\t\\\\\\\"Return the current layout properties associated with the receiver\\\\\\\"\\\\n\\\\n\\\\tnewProperties isNil\\\\n\\\\t\\\\tifTrue: [self removeProperty: #layoutProperties]\\\\n\\\\t\\\\tifFalse: [self setProperty: #layoutProperties toValue: newProperties]! !\\\\n\\\\n\\\\n!MorphExtension methodsFor: 'accessing - other properties' stamp: 'md 2/27/2006 08:41'!\\\\nassureOtherProperties\\\\n\\\\t\\\\\\\"creates an otherProperties for the receiver if needed\\\\\\\"\\\\n\\\\totherProperties ifNil: [self initializeOtherProperties].\\\\n\\\\t^ otherProperties! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - other properties' stamp: 'md 2/27/2006 08:36'!\\\\nhasOtherProperties\\\\n\\\\t\\\\\\\"answer whether the receiver has otherProperties\\\\\\\"\\\\n\\\\t^ otherProperties notNil! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - other properties' stamp: 'md 2/27/2006 08:42'!\\\\nhasProperty: aSymbol \\\\n\\\\t\\\\\\\"Answer whether the receiver has the property named aSymbol\\\\\\\"\\\\n\\\\t| property |\\\\n\\\\totherProperties ifNil: [^ false].\\\\n\\\\tproperty := otherProperties at: aSymbol ifAbsent: [].\\\\n\\\\tproperty isNil ifTrue: [^ false].\\\\n\\\\tproperty == false ifTrue: [^ false].\\\\n\\\\t^ true! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - other properties' stamp: 'md 2/27/2006 08:36'!\\\\ninitializeOtherProperties\\\\n\\\\t\\\\\\\"private - initializes the receiver's otherProperties\\\\\\\"\\\\n\\\\totherProperties :=  IdentityDictionary new! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - other properties' stamp: 'dgd 2/16/2003 21:04'!\\\\notherProperties\\\\n\\\\t\\\\\\\"answer the receiver's otherProperties\\\\\\\"\\\\n\\\\t^ otherProperties! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - other properties' stamp: 'dgd 2/16/2003 21:20'!\\\\nprivateOtherProperties: anIndentityDictionary \\\\n\\\\t\\\\\\\"private - change the receiver's otherProperties\\\\\\\"\\\\n\\\\totherProperties _ anIndentityDictionary ! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - other properties' stamp: 'md 2/27/2006 08:37'!\\\\nremoveOtherProperties\\\\n\\\\t\\\\\\\"Remove the 'other' properties\\\\\\\"\\\\n\\\\totherProperties := nil! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - other properties' stamp: 'md 2/27/2006 08:43'!\\\\nremoveProperty: aSymbol \\\\n\\\\t\\\\\\\"removes the property named aSymbol if it exists\\\\\\\"\\\\n\\\\totherProperties ifNil: [^ self].\\\\n\\\\totherProperties removeKey: aSymbol ifAbsent: [].\\\\n\\\\totherProperties isEmpty ifTrue: [self removeOtherProperties]! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - other properties' stamp: 'dgd 2/16/2003 21:49'!\\\\nsetProperty: aSymbol toValue: abObject \\\\n\\\\t\\\\\\\"change the receiver's property named aSymbol to anObject\\\\\\\"\\\\n\\\\tself assureOtherProperties at: aSymbol put: abObject! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - other properties' stamp: 'md 2/27/2006 08:45'!\\\\nsortedPropertyNames\\\\n\\\\t\\\\\\\"answer the receiver's property names in a sorted way\\\\\\\"\\\\n\\\\n\\\\t| props |\\\\n\\\\tprops := WriteStream on: (Array new: 10).\\\\n\\\\tlocked == true ifTrue: [props nextPut: #locked].\\\\n\\\\tvisible == false ifTrue: [props nextPut: #visible].\\\\n\\\\tsticky == true ifTrue: [props nextPut: #sticky].\\\\n\\\\tballoonText isNil ifFalse: [props nextPut: #balloonText].\\\\n\\\\tballoonTextSelector isNil ifFalse: [props nextPut: #balloonTextSelector].\\\\n\\\\texternalName isNil ifFalse: [props nextPut: #externalName].\\\\n\\\\tisPartsDonor == true ifTrue: [props nextPut: #isPartsDonor].\\\\n\\\\tactorState isNil ifFalse: [props nextPut: #actorState].\\\\n\\\\tplayer isNil ifFalse: [props nextPut: #player].\\\\n\\\\teventHandler isNil ifFalse: [props nextPut: #eventHandler].\\\\n\\\\t otherProperties ifNotNil: [otherProperties associationsDo: [:a | props nextPut: a key]].\\\\n\\\\t^props contents sort: [:s1 :s2 | s1 <= s2]! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - other properties' stamp: 'dgd 2/16/2003 21:00'!\\\\nvalueOfProperty: aSymbol \\\\n\\\\\\\"answer the value of the receiver's property named aSymbol\\\\\\\"\\\\n\\\\t^ self\\\\n\\\\t\\\\tvalueOfProperty: aSymbol\\\\n\\\\t\\\\tifAbsent: []! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - other properties' stamp: 'dgd 2/16/2003 21:28'!\\\\nvalueOfProperty: aSymbol ifAbsentPut: aBlock \\\\n\\\\t\\\\\\\"If the receiver possesses a property of the given name, answer  \\\\n\\\\tits value. If not, then create a property of the given name, give \\\\n\\\\tit the value obtained by evaluating aBlock, then answer that  \\\\n\\\\tvalue\\\\\\\"\\\\n\\\\t^self assureOtherProperties at: aSymbol ifAbsentPut: aBlock! !\\\\n\\\\n!MorphExtension methodsFor: 'accessing - other properties' stamp: 'md 2/27/2006 08:43'!\\\\nvalueOfProperty: aSymbol ifAbsent: aBlock \\\\n\\\\t\\\\\\\"if the receiver possesses a property of the given name, answer  \\\\n\\\\tits value. If not then evaluate aBlock and answer the result of  \\\\n\\\\tthis block evaluation\\\\\\\"\\\\n\\\\totherProperties ifNil: [^ aBlock value].\\\\n\\\\t^ otherProperties at: aSymbol ifAbsent: [^ aBlock value]! !\\\\n\\\\n\\\\n!MorphExtension methodsFor: 'connectors-copying' stamp: 'nk 5/1/2004 17:20'!\\\\ncopyWeakly\\\\n\\\\t\\\\\\\"list of names of properties whose values should be weak-copied when veryDeepCopying a morph.  See DeepCopier.\\\\\\\"\\\\n\\\\n\\\\t^ #(formerOwner newPermanentPlayer logger graphModel gestureDictionaryOrName)\\\\n\\\\t\\\\\\\"add yours to this list\\\\\\\" \\\\n\\\\n\\\\t\\\\\\\"formerOwner should really be nil at the time of the copy, but this will work just fine.\\\\\\\"! !\\\\n\\\\n!MorphExtension methodsFor: 'connectors-copying' stamp: 'nk 5/1/2004 17:23'!\\\\npropertyNamesNotCopied\\\\n\\\\t\\\\\\\"list of names of properties whose values should be deleted when veryDeepCopying a morph.\\\\n\\\\tSee DeepCopier.\\\\\\\"\\\\n\\\\n\\\\t^ #(connectedConstraints connectionHighlights highlightedTargets)\\\\n\\\\t\\\\\\\"add yours to this list\\\\\\\" \\\\n! !\\\\n\\\\n!MorphExtension methodsFor: 'connectors-copying' stamp: 'nk 5/1/2004 17:39'!\\\\nveryDeepFixupWith: deepCopier \\\\n\\\\t\\\\\\\"If target and arguments fields were weakly copied, fix them here.\\\\n\\\\tIf they were in the tree being copied, fix them up, otherwise point to the originals!!!!\\\\\\\"\\\\n\\\\n\\\\tsuper veryDeepFixupWith: deepCopier.\\\\n\\\\totherProperties ifNil: [ ^self ].\\\\n\\\\n\\\\t\\\\\\\"Properties whose values are only copied weakly replace those values if they were copied via another path\\\\\\\"\\\\n\\\\tself copyWeakly do: [ :propertyName |\\\\n\\\\t\\\\totherProperties at: propertyName ifPresent: [ :property |\\\\n\\\\t\\\\t\\\\totherProperties at: propertyName\\\\n\\\\t\\\\t\\\\t\\\\tput: (deepCopier references at: property ifAbsent: [ property ])]].\\\\n! !\\\\n\\\\n!MorphExtension methodsFor: 'connectors-copying' stamp: 'nk 5/1/2004 17:45'!\\\\nveryDeepInner: deepCopier \\\\n\\\\t\\\\\\\"Copy all of my instance variables.\\\\n\\\\tSome otherProperties need to be not copied at all, but shared. Their names are given by copyWeakly.\\\\n\\\\tSome otherProperties should not be copied or shared. Their names are given by propertyNamesNotCopied.\\\\n\\\\tThis is special code for the dictionary. See DeepCopier, and veryDeepFixupWith:.\\\\\\\"\\\\n\\\\n\\\\t| namesOfWeaklyCopiedProperties weaklyCopiedValues |\\\\n\\\\tsuper veryDeepInner: deepCopier.\\\\n\\\\tlocked _ locked veryDeepCopyWith: deepCopier.\\\\n\\\\tvisible _ visible veryDeepCopyWith: deepCopier.\\\\n\\\\tsticky _ sticky veryDeepCopyWith: deepCopier.\\\\n\\\\tballoonText _ balloonText veryDeepCopyWith: deepCopier.\\\\n\\\\tballoonTextSelector _ balloonTextSelector veryDeepCopyWith: deepCopier.\\\\n\\\\texternalName _ externalName veryDeepCopyWith: deepCopier.\\\\n\\\\tisPartsDonor _ isPartsDonor veryDeepCopyWith: deepCopier.\\\\n\\\\tactorState _ actorState veryDeepCopyWith: deepCopier.\\\\n\\\\tplayer _ player veryDeepCopyWith: deepCopier.\\\\t\\\\t\\\\\\\"Do copy the player of this morph\\\\\\\"\\\\n\\\\teventHandler _ eventHandler veryDeepCopyWith: deepCopier. \\\\t\\\\\\\"has its own restrictions\\\\\\\"\\\\n\\\\n\\\\totherProperties ifNil: [ ^self ].\\\\n\\\\n\\\\totherProperties := otherProperties copy.\\\\n\\\\tself propertyNamesNotCopied do: [ :propName | otherProperties removeKey: propName ifAbsent: [] ].\\\\n\\\\n\\\\tnamesOfWeaklyCopiedProperties _ self copyWeakly.\\\\n\\\\tweaklyCopiedValues _ namesOfWeaklyCopiedProperties collect: [  :propName | otherProperties removeKey: propName ifAbsent: [] ].\\\\n\\\\n\\\\t\\\\\\\"Now copy all the others.\\\\\\\"\\\\n\\\\totherProperties := otherProperties veryDeepCopyWith: deepCopier.\\\\n\\\\n\\\\t\\\\\\\"And replace the weak ones.\\\\\\\"\\\\n\\\\tnamesOfWeaklyCopiedProperties with: weaklyCopiedValues do: [ :name :value | value ifNotNil: [ otherProperties at: name put: value ]].\\\\n! !\\\\n\\\\n\\\\n!MorphExtension methodsFor: 'initialization' stamp: 'di 8/16/1998 12:02'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Init all booleans to default values\\\\\\\"\\\\n\\\\tlocked _ false.\\\\n\\\\tvisible _ true.\\\\n\\\\tsticky _ false.\\\\n\\\\tisPartsDonor _ false.\\\\n! !\\\\n\\\\n\\\\n!MorphExtension methodsFor: 'object fileIn' stamp: 'dgd 2/16/2003 21:06'!\\\\nconvertProperty: aSymbol toValue: anObject \\\\n\\\\t\\\\\\\"These special cases move old properties into named fields of the \\\\n\\\\textension\\\\\\\"\\\\n\\\\taSymbol == #locked\\\\n\\\\t\\\\tifTrue: [^ locked _ anObject].\\\\n\\\\taSymbol == #visible\\\\n\\\\t\\\\tifTrue: [^ visible _ anObject].\\\\n\\\\taSymbol == #sticky\\\\n\\\\t\\\\tifTrue: [^ sticky _ anObject].\\\\n\\\\taSymbol == #balloonText\\\\n\\\\t\\\\tifTrue: [^ balloonText _ anObject].\\\\n\\\\taSymbol == #balloonTextSelector\\\\n\\\\t\\\\tifTrue: [^ balloonTextSelector _ anObject].\\\\n\\\\taSymbol == #actorState\\\\n\\\\t\\\\tifTrue: [^ actorState _ anObject].\\\\n\\\\taSymbol == #player\\\\n\\\\t\\\\tifTrue: [^ player _ anObject].\\\\n\\\\taSymbol == #name\\\\n\\\\t\\\\tifTrue: [^ externalName _ anObject].\\\\n\\\\t\\\\\\\"*renamed*\\\\\\\"\\\\n\\\\taSymbol == #partsDonor\\\\n\\\\t\\\\tifTrue: [^ isPartsDonor _ anObject].\\\\n\\\\t\\\\\\\"*renamed*\\\\\\\"\\\\n\\\\tself assureOtherProperties at: aSymbol put: anObject! !\\\\n\\\\n\\\\n!MorphExtension methodsFor: 'objects from disk' stamp: 'tk 4/8/1999 12:45'!\\\\ncomeFullyUpOnReload: smartRefStream\\\\n\\\\t\\\\\\\"inst vars have default booplean values.\\\\\\\"\\\\n\\\\n\\\\tlocked ifNil: [locked _ false].\\\\n\\\\tvisible ifNil: [visible _ true].\\\\n\\\\tsticky ifNil: [sticky _ false].\\\\n\\\\tisPartsDonor ifNil: [isPartsDonor _ false].\\\\n\\\\t^ self! !\\\\n\\\\n\\\\n!MorphExtension methodsFor: 'other' stamp: 'md 2/27/2006 08:39'!\\\\ninspectElement\\\\n\\\\t\\\\\\\"Create and schedule an Inspector on the otherProperties and the \\\\n\\\\tnamed properties.\\\\\\\"\\\\n\\\\t| key obj |\\\\n\\\\tkey _ (SelectionMenu selections: self sortedPropertyNames)\\\\n\\\\t\\\\t\\\\t\\\\tstartUpWithCaption: 'Inspect which property?'.\\\\n\\\\tkey\\\\n\\\\t\\\\tifNil: [^ self].\\\\n\\\\tobj _ otherProperties\\\\n\\\\t\\\\t\\\\t\\\\tat: key\\\\n\\\\t\\\\t\\\\t\\\\tifAbsent: ['nOT a vALuE'].\\\\n\\\\tobj = 'nOT a vALuE'\\\\n\\\\t\\\\tifTrue: [(self perform: key) inspect\\\\n\\\\t\\\\t\\\\t\\\\\\\"named properties\\\\\\\"]\\\\n\\\\t\\\\tifFalse: [obj inspect]! !\\\\n\\\\n!MorphExtension methodsFor: 'other' stamp: 'md 2/27/2006 08:42'!\\\\nisDefault\\\\n\\\\t\\\\\\\"Return true if the receiver is a default and can be omitted\\\\\\\"\\\\n\\\\tlocked == true\\\\n\\\\t\\\\tifTrue: [^ false].\\\\n\\\\tvisible == false\\\\n\\\\t\\\\tifTrue: [^ false].\\\\n\\\\tsticky == true\\\\n\\\\t\\\\tifTrue: [^ false].\\\\n\\\\tballoonText isNil\\\\n\\\\t\\\\tifFalse: [^ false].\\\\n\\\\tballoonTextSelector isNil\\\\n\\\\t\\\\tifFalse: [^ false].\\\\n\\\\texternalName isNil\\\\n\\\\t\\\\tifFalse: [^ false].\\\\n\\\\tisPartsDonor == true\\\\n\\\\t\\\\tifTrue: [^ false].\\\\n\\\\tactorState isNil\\\\n\\\\t\\\\tifFalse: [^ false].\\\\n\\\\tplayer isNil\\\\n\\\\t\\\\tifFalse: [^ false].\\\\n\\\\teventHandler isNil\\\\n\\\\t\\\\tifFalse: [^ false].\\\\n\\\\totherProperties ifNotNil: [otherProperties isEmpty ifFalse: [^ false]].\\\\n\\\\t^ true! !\\\\n\\\\n\\\\n!MorphExtension methodsFor: 'printing' stamp: 'md 2/27/2006 08:45'!\\\\nprintOn: aStream \\\\n\\\\t\\\\\\\"Append to the argument, aStream, a sequence of characters that \\\\n\\\\tidentifies the receiver.\\\\\\\" \\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream nextPutAll: ' ' , self identityHashPrintString.\\\\n\\\\tlocked == true\\\\n\\\\t\\\\tifTrue: [aStream nextPutAll: ' [locked] '].\\\\n\\\\tvisible == false\\\\n\\\\t\\\\tifTrue: [aStream nextPutAll: '[not visible] '].\\\\n\\\\tsticky == true\\\\n\\\\t\\\\tifTrue: [aStream nextPutAll: ' [sticky] '].\\\\n\\\\tballoonText\\\\n\\\\t\\\\tifNotNil: [aStream nextPutAll: ' [balloonText] '].\\\\n\\\\tballoonTextSelector\\\\n\\\\t\\\\tifNotNil: [aStream nextPutAll: ' [balloonTextSelector: ' , balloonTextSelector printString , '] '].\\\\n\\\\texternalName\\\\n\\\\t\\\\tifNotNil: [aStream nextPutAll: ' [externalName = ' , externalName , ' ] '].\\\\n\\\\tisPartsDonor == true\\\\n\\\\t\\\\tifTrue: [aStream nextPutAll: ' [isPartsDonor] '].\\\\n\\\\tplayer\\\\n\\\\t\\\\tifNotNil: [aStream nextPutAll: ' [player = ' , player printString , '] '].\\\\n\\\\teventHandler\\\\n\\\\t\\\\tifNotNil: [aStream nextPutAll: ' [eventHandler = ' , eventHandler printString , '] '].\\\\n\\\\t(otherProperties isNil or: [otherProperties isEmpty ]) ifTrue: [^ self].\\\\n\\\\taStream nextPutAll: ' [other: '.\\\\n\\\\tself otherProperties\\\\n\\\\t\\\\tkeysDo: [:aKey | aStream nextPutAll: ' (' , aKey , ' -> ' , (self otherProperties at: aKey) printString , ')'].\\\\n\\\\taStream nextPut: $]! !\\\\n\\\\n\\\\n!MorphExtension methodsFor: 'viewer' stamp: 'di 8/10/1998 14:47'!\\\\nexternalName\\\\n\\\\t^ externalName! !\\\\n\\\\n\\\\n!MorphExtension methodsFor: '*eToys-accessing' stamp: 'dgd 2/16/2003 21:56'!\\\\nactorState\\\\n\\\\t\\\\\\\"answer the redeiver's actorState\\\\\\\"\\\\n\\\\t^ actorState ! !\\\\n\\\\n!MorphExtension methodsFor: '*eToys-accessing' stamp: 'dgd 2/16/2003 21:53'!\\\\nactorState: anActorState \\\\n\\\\\\\"change the receiver's actorState\\\\\\\"\\\\n\\\\tactorState _ anActorState! !\\\\n\\\\n!MorphExtension methodsFor: '*eToys-accessing' stamp: 'dgd 2/16/2003 21:42'!\\\\nplayer\\\\n\\\\t\\\\\\\"answer the receiver's player\\\\\\\"\\\\n\\\\t^ player! !\\\\n\\\\n!MorphExtension methodsFor: '*eToys-accessing' stamp: 'dgd 2/16/2003 21:53'!\\\\nplayer: anObject \\\\n\\\\t\\\\\\\"change the receiver's player\\\\\\\"\\\\n\\\\tplayer _ anObject ! !\\\\n\\\\n\\\\n!MorphExtension methodsFor: '*MorphicExtras-accessing' stamp: 'dgd 2/16/2003 21:37'!\\\\nisPartsDonor\\\\n\\\\t\\\\\\\"answer whether the receiver is PartsDonor\\\\\\\"\\\\n\\\\t^ isPartsDonor! !\\\\n\\\\n!MorphExtension methodsFor: '*MorphicExtras-accessing' stamp: 'dgd 2/16/2003 21:40'!\\\\nisPartsDonor: aBoolean \\\\n\\\\t\\\\\\\"change the receiver's isPartDonor property\\\\\\\"\\\\n\\\\tisPartsDonor _ aBoolean! !\\\\n\\\\n\\\\n!MorphExtension methodsFor: '*MorphicExtras-copying' stamp: 'md 2/27/2006 08:44'!\\\\nupdateReferencesUsing: aDictionary \\\\n\\\\t\\\\\\\"Update intra-morph references within a composite morph that  \\\\n\\\\thas been copied. For example, if a button refers to morph X in  \\\\n\\\\tthe orginal  \\\\n\\\\tcomposite then the copy of that button in the new composite  \\\\n\\\\tshould refer to  \\\\n\\\\tthe copy of X in new composite, not the original X. This default  \\\\n\\\\timplementation updates the contents of any morph-bearing slot.\\\\\\\"\\\\n\\\\n\\\\t| old |\\\\n\\\\teventHandler isNil \\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[self eventHandler: self eventHandler copy.\\\\n\\\\t\\\\t\\\\t1 to: self eventHandler class instSize\\\\n\\\\t\\\\t\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:i | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\told := eventHandler instVarAt: i.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\told isMorph \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [eventHandler instVarAt: i put: (aDictionary at: old ifAbsent: [old])]]].\\\\n\\\\totherProperties ifNotNil: [otherProperties associationsDo:  [:assn | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tassn value: (aDictionary at: assn value ifAbsent: [assn value])]]! !\\\\nObject subclass: #MorphHierarchy\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Widgets'!\\\\n\\\\n!MorphHierarchy methodsFor: 'private' stamp: 'dgd 9/26/2004 18:28'!\\\\nasMorph\\\\n\\\\t\\\\\\\"Answer the morph version of the receiver\\\\\\\"\\\\n\\\\t| morph |\\\\n\\\\tmorph := MorphHierarchyListMorph\\\\n\\\\t\\\\t\\\\t\\\\ton: self\\\\n\\\\t\\\\t\\\\t\\\\tlist: #roots\\\\n\\\\t\\\\t\\\\t\\\\tselected: nil\\\\n\\\\t\\\\t\\\\t\\\\tchangeSelected: #selected:.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t^ morph inAContainer! !\\\\n\\\\n\\\\n!MorphHierarchy methodsFor: 'accessing' stamp: 'dgd 9/26/2004 18:29'!\\\\nroots\\\\n\\\\t\\\\\\\"Answer the roots for the Object Hierarchy, that means answer the World\\\\\\\"\\\\n\\\\t^ {MorphListItemWrapper with: World}! !\\\\n\\\\n!MorphHierarchy methodsFor: 'accessing' stamp: 'dgd 9/26/2004 18:30'!\\\\nselected: aMorphListItemWrapper \\\\n\\\\t\\\\\\\"Change the selected object\\\\\\\"\\\\n\\\\t| newSelection |\\\\n\\\\taMorphListItemWrapper isNil\\\\n\\\\t\\\\tifTrue: [^ self].\\\\n\\\\tnewSelection := aMorphListItemWrapper withoutListWrapper.\\\\n\\\\tnewSelection == World selectedObject\\\\n\\\\t\\\\tifTrue: [newSelection removeHalo]\\\\n\\\\t\\\\tifFalse: [newSelection addHalo].\\\\n\\\\tself changed: #selected! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMorphHierarchy class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MorphHierarchy class methodsFor: 'opening' stamp: 'dgd 9/25/2004 21:50'!\\\\nopenOrDelete\\\\n\\\\t| oldMorph |\\\\n\\\\toldMorph := World submorphs\\\\n\\\\t\\\\t\\\\t\\\\tdetect: [:each | each hasProperty: #morphHierarchy]\\\\n\\\\t\\\\t\\\\t\\\\tifNone: [| newMorph | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnewMorph := self new asMorph.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnewMorph bottomLeft: ActiveHand position.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnewMorph openInWorld.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnewMorph isFullOnScreen\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [newMorph goHome].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ self].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\toldMorph delete! !\\\\nSimpleHierarchicalListMorph subclass: #MorphHierarchyListMorph\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Widgets'!\\\\n\\\\n!MorphHierarchyListMorph methodsFor: 'private' stamp: 'dgd 9/26/2004 18:57'!\\\\ncreateContainer\\\\n\\\\t\\\\\\\"Private - Create a container\\\\\\\"\\\\n\\\\t| container |\\\\n\\\\tcontainer := BorderedMorph new.\\\\n\\\\tcontainer extent: (World extent * (1 / 4 @ (2 / 3))) rounded.\\\\n\\\\tcontainer layoutPolicy: TableLayout new.\\\\n\\\\tcontainer hResizing: #rigid.\\\\n\\\\tcontainer vResizing: #rigid.\\\\n\\\\tcontainer\\\\n\\\\t\\\\tsetColor: Preferences menuColor\\\\n\\\\t\\\\tborderWidth: Preferences menuBorderWidth\\\\n\\\\t\\\\tborderColor: Preferences menuBorderColor.\\\\n\\\\tcontainer layoutInset: 0.\\\\n\\\\t\\\\\\\"container useRoundedCorners.\\\\\\\"\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tcontainer setProperty: #morphHierarchy toValue: true.\\\\n\\\\tcontainer setNameTo: 'Objects Hierarchy' translated.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t^ container! !\\\\n\\\\n!MorphHierarchyListMorph methodsFor: 'private' stamp: 'dgd 9/26/2004 18:27'!\\\\ninAContainer\\\\n\\\\t\\\\\\\"Answer the receiver contained in a proper container\\\\\\\"\\\\n\\\\t| container |\\\\n\\\\tcontainer := self createContainer.\\\\n\\\\tcontainer addMorphBack: self.\\\\n\\\\t\\\\\\\" \\\\n\\\\tnasty hack to force the scroolbar recreation\\\\\\\"\\\\n\\\\tself extent: container extent - container borderWidth.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t^ container! !\\\\n\\\\n\\\\n!MorphHierarchyListMorph methodsFor: 'initialization' stamp: 'dgd 9/26/2004 18:18'!\\\\non: anObject list: getListSel selected: getSelectionSel changeSelected: setSelectionSel menu: getMenuSel keystroke: keyActionSel \\\\n\\\\tsuper\\\\n\\\\t\\\\ton: anObject\\\\n\\\\t\\\\tlist: getListSel\\\\n\\\\t\\\\tselected: getSelectionSel\\\\n\\\\t\\\\tchangeSelected: setSelectionSel\\\\n\\\\t\\\\tmenu: getMenuSel\\\\n\\\\t\\\\tkeystroke: keyActionSel.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tself borderWidth: 0.\\\\n\\\\tself autoDeselect: false.\\\\n\\\\tself enableDrag: false.\\\\n\\\\tself enableDrop: true.\\\\n\\\\tself hResizing: #spaceFill.\\\\n\\\\tself vResizing: #spaceFill.\\\\nself expandRoots! !\\\\n\\\\n\\\\n!MorphHierarchyListMorph methodsFor: 'selection' stamp: 'dgd 9/25/2004 21:28'!\\\\nsetSelectedMorph: aMorph \\\\n\\\\tsuper setSelectedMorph: aMorph.\\\\nself owner isNil ifFalse:[self owner delete]! !\\\\nListItemWrapper subclass: #MorphListItemWrapper\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Widgets'!\\\\n\\\\n!MorphListItemWrapper methodsFor: 'converting' stamp: 'dgd 9/26/2004 18:26'!\\\\nasString\\\\n\\\\t\\\\\\\"Answer the string representation of the receiver\\\\\\\"\\\\n\\\\t^ item externalName! !\\\\n\\\\n\\\\n!MorphListItemWrapper methodsFor: 'accessing' stamp: 'dgd 1/7/2005 20:01'!\\\\ncontents\\\\n\\\\t\\\\\\\"Answer the receiver's contents\\\\\\\"\\\\n\\\\n\\\\t| tentative submorphs |\\\\n\\\\ttentative := item submorphs\\\\n\\\\t\\\\t\\\\t\\\\tcollect: [:each | each renderedMorph].\\\\n\\\\n\\\\tsubmorphs := Preferences noviceMode\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttentative\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\treject: [:each | \\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\teach isSystemWindow\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tor: [each isDockingBar]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tor: [each isKindOf: HaloMorph]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tor: [each hasProperty: #morphHierarchy]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tor: [each isFlapOrTab]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tor: [each isObjectsTool]]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttentative\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\treject: [:each | each isKindOf: HaloMorph]].\\\\n\\\\n\\\\t^ submorphs\\\\n\\\\t\\\\tcollect: [:each | self class with: each]! !\\\\n\\\\n!MorphListItemWrapper methodsFor: 'accessing' stamp: 'dgd 7/28/2005 13:03'!\\\\nicon\\\\n\\\\t\\\\\\\"Answer a form to be used as icon\\\\\\\"\\\\n\\\\t^ item iconOrThumbnailOfSize: ((Preferences tinyDisplay ifTrue: [16] ifFalse: [28]))! !\\\\nObjectOut subclass: #MorphObjectOut\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-SqueakPage'!\\\\n\\\\n!MorphObjectOut methodsFor: 'as yet unclassified' stamp: 'tk 4/6/1999 10:00'!\\\\ndoesNotUnderstand: aMessage \\\\n\\\\t\\\\\\\"Bring in the object, install, then resend aMessage\\\\\\\"\\\\n\\\\t| aMorph myUrl oldFlag response |\\\\n\\\\t\\\\\\\"Transcript show: thisContext sender selector; cr.\\\\\\\" \\\\\\\"useful for debugging\\\\\\\"\\\\n\\\\toldFlag _ recursionFlag.\\\\n\\\\trecursionFlag _ true.\\\\n\\\\tmyUrl _ url.\\\\t\\\\\\\"can't use inst vars after become\\\\\\\"\\\\n\\\\t\\\\\\\"fetch the object\\\\\\\"\\\\n\\\\taMorph _ self xxxFetch.\\\\t\\\\t\\\\\\\"watch out for the become!!\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\\\\"Now we ARE a MORPH\\\\\\\"\\\\n\\\\toldFlag == true ifTrue: [\\\\n\\\\t\\\\tresponse _ (PopUpMenu labels: 'proceed normally\\\\\\\\debug' withCRs)\\\\n\\\\t\\\\t\\\\tstartUpWithCaption: 'Object being fetched for a second time.\\\\nShould not happen, and needs to be fixed later.'.\\\\n\\\\t\\\\tresponse = 2 ifTrue: [self halt]].\\\\t\\\\\\\"We are already the new object\\\\\\\"\\\\n\\\\n\\\\taMorph setProperty: #SqueakPage toValue: \\\\n\\\\t\\\\t\\\\t(SqueakPageCache pageCache at: myUrl).\\\\n\\\\t\\\\\\\"Can't be a super message, since this is the first message sent to this object\\\\\\\"\\\\n\\\\t^ aMorph perform: aMessage selector withArguments: aMessage arguments\\\\n! !\\\\n\\\\n!MorphObjectOut methodsFor: 'as yet unclassified' stamp: 'tk 10/22/1998 15:43'!\\\\nfullReleaseCachedState\\\\n\\\\t\\\\\\\"do nothing, especially don't bring in my object!!\\\\\\\"! !\\\\n\\\\n!MorphObjectOut methodsFor: 'as yet unclassified' stamp: 'tk 2/24/1999 00:08'!\\\\nsmallThumbnailForPageSorter\\\\n\\\\n\\\\t^ self sqkPage thumbnail! !\\\\n\\\\n!MorphObjectOut methodsFor: 'as yet unclassified' stamp: 'tk 2/24/1999 00:09'!\\\\nthumbnailForPageSorter\\\\n\\\\n\\\\t^ self sqkPage thumbnail! !\\\\nTestCase subclass: #MorphTest\\\\n\\\\tinstanceVariableNames: 'morph world'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicTests-Kernel'!\\\\n!MorphTest commentStamp: '<historical>' prior: 0!\\\\nThis is the unit test for the class Morph. Unit tests are a good way to exercise the functionality of your system in a repeatable and automatic manner. They are therefore recommended if you plan to release anything. For more information, see: \\\\n\\\\t- http://www.c2.com/cgi/wiki?UnitTest\\\\n\\\\t- http://minnow.cc.gatech.edu/squeak/1547\\\\n\\\\t- the sunit class category!\\\\n\\\\n\\\\n!MorphTest methodsFor: 'initialize-release' stamp: 'tak 1/21/2005 11:12'!\\\\ngetWorld\\\\n\\\\t^ world\\\\n\\\\t\\\\tifNil: [world := Project newMorphic world]! !\\\\n\\\\n!MorphTest methodsFor: 'initialize-release' stamp: 'tak 1/21/2005 11:12'!\\\\nsetUp\\\\n\\\\tmorph := Morph new! !\\\\n\\\\n!MorphTest methodsFor: 'initialize-release' stamp: 'tak 1/21/2005 11:12'!\\\\ntearDown\\\\n\\\\tmorph delete.\\\\n\\\\tworld\\\\n\\\\t\\\\tifNotNil: [Project deletingProject: world project]! !\\\\n\\\\n\\\\n!MorphTest methodsFor: 'testing - classification' stamp: 'md 4/16/2003 17:11'!\\\\ntestIsMorph\\\\n\\\\tself assert: (morph isMorph).! !\\\\n\\\\n\\\\n!MorphTest methodsFor: 'testing - etoys' stamp: 'tak 1/21/2005 11:31'!\\\\ntestOverlapAny\\\\n\\\\t\\\\\\\"self debug: #testOverlapAny\\\\\\\"\\\\n\\\\t| p1 p2 |\\\\n\\\\tp1 _ Morph new assuredPlayer.\\\\n\\\\tp2 _ EllipseMorph new assuredPlayer.\\\\n\\\\t\\\\\\\"Same position\\\\\\\"\\\\n\\\\tp1 costume position: 0@0.\\\\n\\\\tp2 costume position: 0@0.\\\\n\\\\tself assert: (p1 overlapsAny: p2).\\\\n\\\\t\\\\\\\"Different position\\\\\\\"\\\\n\\\\tp1 costume position: 0@0.\\\\n\\\\tp2 costume position: 500@0.\\\\n\\\\tself assert: (p1 overlapsAny: p2) not.! !\\\\n\\\\n!MorphTest methodsFor: 'testing - etoys' stamp: 'tak 1/21/2005 11:56'!\\\\ntestOverlapAnyDeletedPlayer\\\\n\\\\t\\\\\\\"self debug: #testOverlapAnyDeletedPlayer\\\\\\\"\\\\n\\\\t| me friend sibling |\\\\n\\\\tme := Morph new assuredPlayer assureUniClass; yourself.\\\\n\\\\tfriend := EllipseMorph new assuredPlayer assureUniClass; yourself.\\\\n\\\\tsibling := friend getNewClone.\\\\n\\\\tsibling costume delete.\\\\n\\\\tself getWorld addMorph: me costume.\\\\n\\\\t\\\\\\\"Same position but deleted\\\\\\\"\\\\n\\\\tme costume position: 0 @ 0.\\\\n\\\\tfriend costume position: 0 @ 0.\\\\n\\\\tsibling costume position: 0 @ 0.\\\\n\\\\tself assert: (me overlapsAny: friend) not.\\\\n\\\\tself assert: (me overlapsAny: sibling) not! !\\\\n\\\\n!MorphTest methodsFor: 'testing - etoys' stamp: 'tak 1/21/2005 11:40'!\\\\ntestOverlapAnyScriptedPlayer\\\\n\\\\t\\\\\\\"self debug: #testOverlapAnyScriptedPlayer\\\\\\\"\\\\n\\\\t| me friend other sibling |\\\\n\\\\tme := Morph new assuredPlayer assureUniClass; yourself.\\\\n\\\\tfriend := EllipseMorph new assuredPlayer assureUniClass; yourself.\\\\n\\\\tsibling := friend getNewClone.\\\\n\\\\tother := EllipseMorph new assuredPlayer assureUniClass; yourself.\\\\n\\\\tself getWorld addMorph: me costume;\\\\n\\\\t\\\\t addMorph: friend costume;\\\\n\\\\t\\\\t addMorph: other costume;\\\\n\\\\t\\\\t addMorph: sibling costume.\\\\n\\\\t\\\\\\\"myself\\\\\\\"\\\\n\\\\tself assert: (me overlapsAny: me) not.\\\\n\\\\t\\\\\\\"Same position with sibling\\\\\\\"\\\\n\\\\tme costume position: 0 @ 0.\\\\n\\\\tfriend costume position: 500 @ 0.\\\\n\\\\tother costume position: 500 @ 0.\\\\n\\\\tsibling costume position: 0@0.\\\\n\\\\tself assert: (me overlapsAny: friend).\\\\n\\\\t\\\\\\\"Different position with sibling but same class\\\\\\\"\\\\n\\\\tme costume position: 0 @ 0.\\\\n\\\\tfriend costume position: 500 @ 0.\\\\n\\\\tsibling costume position: 500@ 0.\\\\n\\\\tother costume position: 0 @ 0.\\\\n\\\\tself assert: (me overlapsAny: friend) not! !\\\\n\\\\n!MorphTest methodsFor: 'testing - etoys' stamp: 'tak 1/21/2005 11:32'!\\\\ntestOverlapAnyUnscriptedPlayer\\\\n\\\\t\\\\\\\"self debug: #testOverlapAnyUnscriptedPlayer\\\\\\\"\\\\n\\\\t| p1 p2 p3 |\\\\n\\\\tp1 := Morph new assuredPlayer.\\\\n\\\\tp2 := EllipseMorph new assuredPlayer.\\\\n\\\\tp3 := EllipseMorph new assuredPlayer.\\\\n\\\\tself getWorld addMorph: p1 costume;\\\\n\\\\t\\\\t addMorph: p2 costume;\\\\n\\\\t\\\\t addMorph: p3 costume.\\\\n\\\\t\\\\\\\"Same class, same position\\\\\\\"\\\\n\\\\tp1 costume position: 0 @ 0.\\\\n\\\\tp2 costume position: 500 @ 0.\\\\n\\\\tp3 costume position: 0 @ 0.\\\\n\\\\tself\\\\n\\\\t\\\\tassert: (p1 overlapsAny: p2).\\\\n\\\\t\\\\\\\"Same class, different position\\\\\\\"\\\\n\\\\tp1 costume position: 0 @ 0.\\\\n\\\\tp2 costume position: 1000 @ 0.\\\\n\\\\tp3 costume position: 500 @ 0.\\\\n\\\\tself assert: (p1 overlapsAny: p2) not.\\\\n! !\\\\n\\\\n\\\\n!MorphTest methodsFor: 'testing - initialization' stamp: 'md 4/16/2003 17:10'!\\\\ntestOpenInWorld\\\\n\\\\tself shouldnt: [morph openInWorld] raise: Error.! !\\\\n\\\\n\\\\n!MorphTest methodsFor: 'testing - into/outOf World' stamp: 'ar 8/4/2003 00:11'!\\\\ntestIntoWorldCollapseOutOfWorld\\\\n\\\\t| m1 m2 collapsed |\\\\n\\\\t\\\\\\\"Create the guys\\\\\\\"\\\\n\\\\tm1 := TestInWorldMorph new.\\\\n\\\\tm2 := TestInWorldMorph new.\\\\n\\\\tself assert: (m1 intoWorldCount = 0).\\\\n\\\\tself assert: (m1 outOfWorldCount = 0).\\\\n\\\\tself assert: (m2 intoWorldCount = 0).\\\\n\\\\tself assert: (m2 outOfWorldCount = 0).\\\\n\\\\n\\\\t\\\\\\\"add them to basic morph\\\\\\\"\\\\n\\\\tmorph addMorphFront: m1.\\\\n\\\\tm1 addMorphFront: m2.\\\\n\\\\tself assert: (m1 intoWorldCount = 0).\\\\n\\\\tself assert: (m1 outOfWorldCount = 0).\\\\n\\\\tself assert: (m2 intoWorldCount = 0).\\\\n\\\\tself assert: (m2 outOfWorldCount = 0).\\\\n\\\\n\\\\t\\\\\\\"open the guy\\\\\\\"\\\\n\\\\tmorph openInWorld.\\\\n\\\\tself assert: (m1 intoWorldCount = 1).\\\\n\\\\tself assert: (m1 outOfWorldCount = 0).\\\\n\\\\tself assert: (m2 intoWorldCount = 1).\\\\n\\\\tself assert: (m2 outOfWorldCount = 0).\\\\n\\\\n\\\\t\\\\\\\"collapse it\\\\\\\"\\\\n\\\\tcollapsed := \\\\tCollapsedMorph new beReplacementFor: morph.\\\\n\\\\tself assert: (m1 intoWorldCount = 1).\\\\n\\\\tself assert: (m1 outOfWorldCount = 1).\\\\n\\\\tself assert: (m2 intoWorldCount = 1).\\\\n\\\\tself assert: (m2 outOfWorldCount = 1).\\\\n\\\\n\\\\t\\\\\\\"expand it\\\\\\\"\\\\n\\\\tcollapsed collapseOrExpand.\\\\n\\\\tself assert: (m1 intoWorldCount = 2).\\\\n\\\\tself assert: (m1 outOfWorldCount = 1).\\\\n\\\\tself assert: (m2 intoWorldCount = 2).\\\\n\\\\tself assert: (m2 outOfWorldCount = 1).\\\\n\\\\n\\\\t\\\\\\\"delete it\\\\\\\"\\\\n\\\\tmorph delete.\\\\n\\\\tself assert: (m1 intoWorldCount = 2).\\\\n\\\\tself assert: (m1 outOfWorldCount = 2).\\\\n\\\\tself assert: (m2 intoWorldCount = 2).\\\\n\\\\tself assert: (m2 outOfWorldCount = 2).\\\\n! !\\\\n\\\\n!MorphTest methodsFor: 'testing - into/outOf World' stamp: 'ar 8/4/2003 00:12'!\\\\ntestIntoWorldDeleteOutOfWorld\\\\n\\\\t| m1 m2 |\\\\n\\\\t\\\\\\\"Create the guys\\\\\\\"\\\\n\\\\tm1 := TestInWorldMorph new.\\\\n\\\\tm2 := TestInWorldMorph new.\\\\n\\\\tself assert: (m1 intoWorldCount = 0).\\\\n\\\\tself assert: (m1 outOfWorldCount = 0).\\\\n\\\\tself assert: (m2 intoWorldCount = 0).\\\\n\\\\tself assert: (m2 outOfWorldCount = 0).\\\\n\\\\n\\\\tmorph addMorphFront: m1.\\\\n\\\\tm1 addMorphFront:  m2.\\\\n\\\\tself assert: (m1 intoWorldCount = 0).\\\\n\\\\tself assert: (m1 outOfWorldCount = 0).\\\\n\\\\tself assert: (m2 intoWorldCount = 0).\\\\n\\\\tself assert: (m2 outOfWorldCount = 0).\\\\n\\\\n\\\\tmorph openInWorld.\\\\n\\\\tself assert: (m1 intoWorldCount = 1).\\\\n\\\\tself assert: (m1 outOfWorldCount = 0).\\\\n\\\\tself assert: (m2 intoWorldCount = 1).\\\\n\\\\tself assert: (m2 outOfWorldCount = 0).\\\\n\\\\n\\\\tmorph delete.\\\\n\\\\tself assert: (m1 intoWorldCount = 1).\\\\n\\\\tself assert: (m1 outOfWorldCount = 1).\\\\n\\\\tself assert: (m2 intoWorldCount = 1).\\\\n\\\\tself assert: (m2 outOfWorldCount = 1).\\\\n\\\\t! !\\\\n\\\\n!MorphTest methodsFor: 'testing - into/outOf World' stamp: 'ar 8/10/2003 18:30'!\\\\ntestIntoWorldTransferToNewGuy\\\\n\\\\t| m1 m2 |\\\\n\\\\t\\\\\\\"Create the guys\\\\\\\"\\\\n\\\\tm1 := TestInWorldMorph new.\\\\n\\\\tm2 := TestInWorldMorph new.\\\\n\\\\tself assert: (m1 intoWorldCount = 0).\\\\n\\\\tself assert: (m1 outOfWorldCount = 0).\\\\n\\\\tself assert: (m2 intoWorldCount = 0).\\\\n\\\\tself assert: (m2 outOfWorldCount = 0).\\\\n\\\\n\\\\tmorph addMorphFront: m1.\\\\n\\\\tm1 addMorphFront:  m2.\\\\n\\\\tself assert: (m1 intoWorldCount = 0).\\\\n\\\\tself assert: (m1 outOfWorldCount = 0).\\\\n\\\\tself assert: (m2 intoWorldCount = 0).\\\\n\\\\tself assert: (m2 outOfWorldCount = 0).\\\\n\\\\n\\\\tmorph openInWorld.\\\\n\\\\tself assert: (m1 intoWorldCount = 1).\\\\n\\\\tself assert: (m1 outOfWorldCount = 0).\\\\n\\\\tself assert: (m2 intoWorldCount = 1).\\\\n\\\\tself assert: (m2 outOfWorldCount = 0).\\\\n\\\\n\\\\tmorph addMorphFront: m2.\\\\n\\\\tself assert: (m1 intoWorldCount = 1).\\\\n\\\\tself assert: (m1 outOfWorldCount = 0).\\\\n\\\\tself assert: (m2 intoWorldCount = 1).\\\\n\\\\tself assert: (m2 outOfWorldCount = 0).\\\\n\\\\n\\\\tmorph addMorphFront: m1.\\\\n\\\\tself assert: (m1 intoWorldCount = 1).\\\\n\\\\tself assert: (m1 outOfWorldCount = 0).\\\\n\\\\tself assert: (m2 intoWorldCount = 1).\\\\n\\\\tself assert: (m2 outOfWorldCount = 0).\\\\n\\\\n\\\\tm2 addMorphFront: m1.\\\\n\\\\tself assert: (m1 intoWorldCount = 1).\\\\n\\\\tself assert: (m1 outOfWorldCount = 0).\\\\n\\\\tself assert: (m2 intoWorldCount = 1).\\\\n\\\\tself assert: (m2 outOfWorldCount = 0).\\\\n\\\\n\\\\tmorph delete.\\\\n\\\\tself assert: (m1 intoWorldCount = 1).\\\\n\\\\tself assert: (m1 outOfWorldCount = 1).\\\\n\\\\tself assert: (m2 intoWorldCount = 1).\\\\n\\\\tself assert: (m2 outOfWorldCount = 1).\\\\n! !\\\\nSketchMorph subclass: #MorphThumbnail\\\\n\\\\tinstanceVariableNames: 'morphRepresented'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-Books'!\\\\n!MorphThumbnail commentStamp: '<historical>' prior: 0!\\\\nA morph whose appearance is a thumbnail of some other morph.!\\\\n\\\\n\\\\n!MorphThumbnail methodsFor: 'as yet unclassified' stamp: 'sw 11/13/1998 09:53'!\\\\ncomputeThumbnail\\\\n\\\\t\\\\\\\"Assumption on entry:\\\\n       The receiver's width represents the maximum width allowable.\\\\n       The receiver's height represents the exact height desired.\\\\\\\"\\\\n\\\\n\\\\t| f scaleX scaleY |\\\\n\\\\tf _ morphRepresented imageForm.\\\\n\\\\tmorphRepresented fullReleaseCachedState.\\\\n\\\\tscaleY _ self height / f height.  \\\\\\\"keep height invariant\\\\\\\"\\\\n\\\\tscaleX _ ((morphRepresented width * scaleY) <= self width)\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[scaleY]  \\\\\\\"the usual case; same scale factor, to preserve aspect ratio\\\\\\\"\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self width / f width].\\\\n\\\\tself form: (f magnify: f boundingBox by: (scaleX @ scaleY) smoothing: 2).\\\\n\\\\tself extent: originalForm extent! !\\\\n\\\\n!MorphThumbnail methodsFor: 'as yet unclassified' stamp: 'sw 7/6/1998 22:08'!\\\\ngrabOriginal\\\\n\\\\tself primaryHand attachMorph: morphRepresented! !\\\\n\\\\n!MorphThumbnail methodsFor: 'as yet unclassified' stamp: 'ar 10/7/2000 15:38'!\\\\nmorphRepresented: aMorph\\\\n\\\\n\\\\tmorphRepresented _ aMorph.\\\\n\\\\tself computeThumbnail.\\\\n! !\\\\n\\\\n!MorphThumbnail methodsFor: 'as yet unclassified' stamp: 'md 10/22/2003 15:24'!\\\\nrevealOriginal\\\\n\\\\t((owner isKindOf: PasteUpMorph) and: [owner alwaysShowThumbnail]) \\\\n\\\\t\\\\tifTrue: [^Beeper beep].\\\\n\\\\tmorphRepresented owner isNil \\\\n\\\\t\\\\tifTrue: [^owner replaceSubmorph: self by: morphRepresented].\\\\n\\\\tBeeper beep! !\\\\n\\\\n!MorphThumbnail methodsFor: 'as yet unclassified' stamp: 'sw 8/10/1998 07:05'!\\\\nsmaller\\\\n\\\\tself form: (self form copy: (0@0 extent: self form extent // 2))! !\\\\n\\\\n\\\\n!MorphThumbnail methodsFor: 'copying' stamp: 'tk 1/8/1999 09:39'!\\\\nveryDeepFixupWith: deepCopier\\\\n\\\\t\\\\\\\"If target and arguments fields were weakly copied, fix them here.  If they were in the tree being copied, fix them up, otherwise point to the originals!!!!\\\\\\\"\\\\n\\\\nsuper veryDeepFixupWith: deepCopier.\\\\nmorphRepresented _ deepCopier references at: morphRepresented \\\\n\\\\t\\\\tifAbsent: [morphRepresented].! !\\\\n\\\\n!MorphThumbnail methodsFor: 'copying' stamp: 'tk 1/8/1999 09:39'!\\\\nveryDeepInner: deepCopier\\\\n\\\\t\\\\\\\"Copy all of my instance variables.  Some need to be not copied at all, but shared.  \\\\tWarning!!!!  Every instance variable defined in this class must be handled.  We must also implement veryDeepFixupWith:.  See DeepCopier class comment.\\\\\\\"\\\\n\\\\nsuper veryDeepInner: deepCopier.\\\\nmorphRepresented _ morphRepresented.\\\\t\\\\t\\\\\\\"Weakly copied\\\\\\\"! !\\\\n\\\\n\\\\n!MorphThumbnail methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:28'!\\\\ndefaultColor\\\\n\\\\t\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color lightGray! !\\\\n\\\\n!MorphThumbnail methodsFor: 'initialization' stamp: 'dgd 2/14/2003 21:51'!\\\\ninitialize\\\\n\\\\t\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\t| f |\\\\n\\\\tsuper initialize.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\n\\\\tf _ Form extent: 60 @ 80 depth: Display depth.\\\\n\\\\tf fill: f boundingBox fillColor: color.\\\\n\\\\tself form: f! !\\\\n\\\\n\\\\n!MorphThumbnail methodsFor: 'menus' stamp: 'dgd 8/30/2003 21:53'!\\\\naddCustomMenuItems: aCustomMenu hand: aHandMorph\\\\n\\\\tsuper addCustomMenuItems: aCustomMenu hand: aHandMorph.\\\\n\\\\taCustomMenu add: 'reveal original morph' translated action: #revealOriginal.\\\\n\\\\taCustomMenu add: 'grab original morph' translated action: #grabOriginal.\\\\n! !\\\\n\\\\n\\\\n!MorphThumbnail methodsFor: 'naming' stamp: 'bf 3/31/1999 12:24'!\\\\ninnocuousName\\\\n\\\\t^ morphRepresented isNil\\\\n\\\\t\\\\tifTrue: [super innocuousName]\\\\n\\\\t\\\\tifFalse: [morphRepresented innocuousName]! !\\\\n\\\\n\\\\n!MorphThumbnail methodsFor: 'parts bin' stamp: 'dgd 2/16/2003 21:37'!\\\\nisPartsDonor\\\\n\\\\t\\\\\\\"answer whether the receiver is PartsDonor\\\\\\\"\\\\n\\\\t^ self partRepresented isPartsDonor! !\\\\n\\\\n!MorphThumbnail methodsFor: 'parts bin' stamp: 'dgd 2/16/2003 21:40'!\\\\nisPartsDonor: aBoolean\\\\n\\\\t\\\\\\\"change the receiver's isPartDonor property\\\\\\\"\\\\n\\\\tself partRepresented isPartsDonor: aBoolean! !\\\\n\\\\n!MorphThumbnail methodsFor: 'parts bin' stamp: 'ar 10/6/2000 22:46'!\\\\npartRepresented\\\\n\\\\t^self morphRepresented! !\\\\n\\\\n\\\\n!MorphThumbnail methodsFor: 'thumbnail' stamp: 'jm 11/17/97 17:30'!\\\\nmorphRepresented\\\\n\\\\n\\\\t^ morphRepresented\\\\n! !\\\\n\\\\n!MorphThumbnail methodsFor: 'thumbnail' stamp: 'bf 3/31/1999 07:54'!\\\\nrepresentativeNoTallerThan: maxHeight norWiderThan: maxWidth thumbnailHeight: thumbnailHeight\\\\n\\\\n\\\\t\\\\\\\"Return a morph representing the receiver but which is no taller than aHeight.  If the receiver is already small enough, just return it, else return a MorphThumbnail companioned to the receiver, enforcing the maxWidth\\\\\\\"\\\\n\\\\n\\\\t(self height <= maxHeight and: [self width <= maxWidth]) ifTrue: [^ self].\\\\n\\\\n\\\\t^ MorphThumbnail new\\\\n\\\\t\\\\textent: maxWidth @ (thumbnailHeight min: self height);\\\\n\\\\t\\\\tmorphRepresented: morphRepresented! !\\\\nListItemWrapper subclass: #MorphWithSubmorphsWrapper\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Explorer'!\\\\n!MorphWithSubmorphsWrapper commentStamp: 'ls 3/1/2004 17:32' prior: 0!\\\\nDisplay a morph in a SimpleHierarchicalListMorph, and arrange to recursively display the morph's submorphs.  The \\\\\\\"item\\\\\\\" that is wrapped is the morph to display.!\\\\n\\\\n\\\\n!MorphWithSubmorphsWrapper methodsFor: 'hierarchy' stamp: 'ls 3/1/2004 17:34'!\\\\ncontents\\\\n\\\\t^item submorphs collect: [ :m |\\\\n\\\\t\\\\tself class with: m ]! !\\\\nController subclass: #MorphWorldController\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-ST80'!\\\\n!MorphWorldController commentStamp: '<historical>' prior: 0!\\\\nI am a controller for SceneViews. I support gestures for scrolling, click-selection, and area selection of scene glyphs. (See the class comment in GestureController for more details about gestures.) I also support construction operations such as inserting new glyphs and merging glyphs to make them share a common point.\\\\n\\\\nThe mapping of gestures to actions is as follows (see GestureController comment for more about gestures):\\\\n\\\\n  Click:\\\\n\\\\tclick on glyph\\\\t\\\\t\\\\t\\\\tselect glyph\\\\n\\\\tshift-click on glyph\\\\t\\\\t\\\\ttoggle selection of that glyph\\\\n\\\\tclick on background\\\\t\\\\t\\\\tclear selection\\\\n  Double click:\\\\n\\\\tdouble-click on glyph\\\\t\\\\t\\\\tinspect glyph\\\\n\\\\tdouble-click on background\\\\t\\\\tselect all\\\\n  Hold/Drag/Sweep:\\\\n\\\\thold (no movement)\\\\t\\\\t\\\\tyellow-button menu\\\\n\\\\tdrag (up/left movement)\\\\t\\\\tscrolling hand\\\\n\\\\tsweep (down/right movement)\\\\tselect glyphs in region\\\\n\\\\tshift-sweep\\\\t\\\\t\\\\t\\\\t\\\\ttoggle selection of glyphs in region\\\\n!\\\\n\\\\n\\\\n!MorphWorldController methodsFor: 'basic control sequence' stamp: 'di 11/26/1999 10:00'!\\\\ncontrolInitialize\\\\n\\\\t\\\\\\\"This window is becoming active.\\\\\\\"\\\\n\\\\n\\\\ttrue ifTrue: [model becomeTheActiveWorldWith: nil].\\\\n\\\\n\\\\tmodel canvas ifNil: [  \\\\\\\"i.e., only on first entry\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"In case of, eg, inspect during balloon help...\\\\\\\"\\\\n\\\\t\\\\tmodel submorphsDo: [:m |  \\\\\\\"delete any existing balloons\\\\\\\"\\\\n\\\\t\\\\t\\\\t(m isKindOf: BalloonMorph) ifTrue: [m delete]].\\\\n\\\\n\\\\t\\\\tmodel handsDo: [:h | h initForEvents].\\\\n\\\\t\\\\tview displayView].  \\\\\\\"initializes the WorldMorph's canvas\\\\\\\"\\\\n! !\\\\n\\\\n!MorphWorldController methodsFor: 'basic control sequence' stamp: 'di 11/16/2001 22:43'!\\\\ncontrolLoop \\\\n\\\\t\\\\\\\"Overridden to keep control active when the hand goes out of the view\\\\\\\"\\\\n\\\\n\\\\t| db |\\\\n\\\\t[self viewHasCursor  \\\\\\\"working in the window\\\\\\\"\\\\n\\\\t\\\\tor: [Sensor noButtonPressed  \\\\\\\"wandering with no button pressed\\\\\\\"\\\\n\\\\t\\\\tor: [model primaryHand submorphs size > 0  \\\\\\\"dragging something outside\\\\\\\"]]]\\\\n\\\\t\\\\twhileTrue:   \\\\\\\"... in other words anything but clicking outside\\\\\\\"\\\\n\\\\t\\\\t\\\\t[self controlActivity.\\\\n\\\\n\\\\t\\\\t\\\\t\\\\\\\"Check for reframing since we hold control here\\\\\\\"\\\\n\\\\t\\\\t\\\\tdb _ view superView displayBox.\\\\n\\\\t\\\\t\\\\tview superView controller checkForReframe.\\\\n\\\\t\\\\t\\\\tdb = view superView displayBox ifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[self controlInitialize \\\\\\\"reframe world if bounds changed\\\\\\\"]].\\\\n! !\\\\n\\\\n!MorphWorldController methodsFor: 'basic control sequence' stamp: 'di 11/16/2001 13:58'!\\\\ncontrolTerminate \\\\n\\\\t\\\\\\\"This window is becoming inactive; restore the normal cursor.\\\\\\\"\\\\n\\\\n\\\\tCursor normal show.\\\\n\\\\tActiveWorld _ ActiveHand _ ActiveEvent _ nil! !\\\\n\\\\n\\\\n!MorphWorldController methodsFor: 'control defaults' stamp: 'jm 2/20/98 13:37'!\\\\ncontrolActivity\\\\n\\\\t\\\\\\\"Do one step of the Morphic interaction loop. Called repeatedly while window is active.\\\\\\\"\\\\n\\\\n\\\\tmodel doOneCycle.\\\\n! !\\\\n\\\\n!MorphWorldController methodsFor: 'control defaults' stamp: 'jm 6/17/97 10:29'!\\\\nisControlActive\\\\n\\\\n\\\\t^ sensor redButtonPressed or: [self viewHasCursor]! !\\\\nView subclass: #MorphWorldView\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: 'FullColorWhenInactive'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-ST80'!\\\\n!MorphWorldView commentStamp: '<historical>' prior: 0!\\\\nI am a view used to display a Scene. I may be scrolled by adjusting my offset. My default controller is SceneController.\\\\n\\\\nSceneViews encapsulate the notion of a changing foreground and a fixed background during interactive updates. During an interaction (such as dragging), some of the glyphs will not change location or appearance. These are part of the \\\\\\\"background\\\\\\\". All glyphs that may change (the \\\\\\\"foreground\\\\\\\" glyphs) are painted against this unchanging backdrop during the interaction.\\\\n\\\\nInstance Variables:\\\\n\\\\toffset\\\\t\\\\t\\\\t\\\\tthe current offset of this view (used for scrolling)\\\\n\\\\tenclosingRect \\\\t\\\\ta rectangle large enough to contain all the objects in the scene, plus a small border (this is a cache that must be recomputed when glyphs are moved, added, or removed from the scene)\\\\n\\\\tbackgroundForm\\\\t\\\\ta <Form> containing the fixed background\\\\n\\\\tvisibleForeground\\\\t\\\\tthe glyphs that are changing but not selected during an interaction\\\\n\\\\tselectedForeground\\\\tthe selected glyphs that are changing during an interaction!\\\\n\\\\n\\\\n!MorphWorldView methodsFor: 'as yet unclassified' stamp: 'md 2/24/2006 21:24'!\\\\nupdateSubWindowExtent\\\\n\\\\t\\\\\\\"If this MorphWorldView represents a single Morphic SystemWindow, then update that window to match the size of the WorldView.\\\\\\\"\\\\n\\\\n\\\\t| numMorphs subWindow |\\\\n\\\\tnumMorphs := model submorphs size.\\\\n\\\\t\\\\\\\"(Allow for the existence of an extra NewHandleMorph (for resizing).)\\\\\\\"\\\\n\\\\t(numMorphs = 0 or: [numMorphs > 2]) ifTrue: [^self].\\\\n\\\\tsubWindow := model submorphs detect: [:ea | ea respondsTo: #label]\\\\n\\\\t\\\\t\\\\t\\\\tifNone: [^self].\\\\n\\\\tsuperView label = subWindow label ifFalse: [^self].\\\\n\\\\tsubWindow position: model position + (0 @ -16).\\\\t\\\\\\\"adjust for WiW changes\\\\\\\"\\\\n\\\\tsubWindow extent: model extent - (0 @ -16).\\\\n\\\\tsubWindow isActive ifFalse: [subWindow activate]! !\\\\n\\\\n\\\\n!MorphWorldView methodsFor: 'controller access'!\\\\ndefaultControllerClass\\\\n\\\\n\\\\t^ MorphWorldController! !\\\\n\\\\n\\\\n!MorphWorldView methodsFor: 'deEmphasizing' stamp: 'RAA 5/24/2000 10:34'!\\\\ndeEmphasizeView \\\\n\\\\t\\\\\\\"This window is becoming inactive.\\\\\\\"\\\\n\\\\n\\\\tCursor normal show.    \\\\\\\"restore the normal cursor\\\\\\\"\\\\n\\\\tmodel deEmphasizeViewMVC: self topView cacheBitsAsTwoTone.\\\\n! !\\\\n\\\\n\\\\n!MorphWorldView methodsFor: 'displaying' stamp: 'dew 11/8/1999 02:01'!\\\\ndisplayView\\\\n\\\\t\\\\\\\"This method is called by the system when the top view is framed or moved.\\\\\\\"\\\\n\\\\t| topView |\\\\n\\\\tmodel viewBox: self insetDisplayBox.\\\\n\\\\tself updateSubWindowExtent.\\\\n\\\\ttopView _ self topView.\\\\n\\\\t(topView == ScheduledControllers scheduledControllers first view\\\\n\\\\t\\\\tor: [topView cacheBitsAsTwoTone not])\\\\n\\\\t\\\\tifTrue: [model displayWorldSafely]\\\\n\\\\t\\\\tifFalse: [model displayWorldAsTwoTone].  \\\\\\\"just restoring the screen\\\\\\\"! !\\\\n\\\\n\\\\n!MorphWorldView methodsFor: 'updating' stamp: 'sw 9/26/97 20:56'!\\\\nupdate: symbol\\\\n\\\\n\\\\t^ symbol == #newColor\\\\n\\\\t\\\\tifTrue: [self topView backgroundColor: model color dominantColor; uncacheBits; display]\\\\n\\\\t\\\\tifFalse: [super update: symbol].\\\\n! !\\\\n\\\\n\\\\n!MorphWorldView methodsFor: 'private' stamp: 'dew 11/8/1999 02:00'!\\\\ncomputeInsetDisplayBox\\\\n\\\\t\\\\\\\"This overrides the same method in View.  (It avoids using displayTransform: because it can return inaccurate results, causing a MorphWorldView's inset display box to creep inward when resized.)\\\\\\\"\\\\n\\\\n\\\\t^superView insetDisplayBox insetBy: borderWidth! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMorphWorldView class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MorphWorldView class methodsFor: 'instance creation' stamp: 'nk 7/30/2004 21:52'!\\\\nconvertToMVCWiWPasteUpMorph\\\\n\\\\t\\\\\\\"\\\\nMorphWorldView convertToMVCWiWPasteUpMorph\\\\n\\\\\\\"\\\\n\\\\n\\\\t| current w newModel topView |\\\\n\\\\tSmalltalk isMorphic ifTrue: [^self inform: 'do this in MVC'].\\\\n\\\\tcurrent := self allInstances \\\\n\\\\t\\\\t\\\\t\\\\tselect: [:each | each model class == PasteUpMorph].\\\\n\\\\tcurrent do: \\\\n\\\\t\\\\t\\\\t[:oldWorldView | \\\\n\\\\t\\\\t\\\\tw := MVCWiWPasteUpMorph newWorldForProject: nil.\\\\n\\\\t\\\\t\\\\tw\\\\n\\\\t\\\\t\\\\t\\\\tcolor: oldWorldView model color;\\\\n\\\\t\\\\t\\\\t\\\\taddAllMorphs: oldWorldView model submorphs.\\\\n\\\\t\\\\t\\\\tnewModel := CautiousModel new initialExtent: 300 @ 300.\\\\n\\\\t\\\\t\\\\ttopView := self fullColorWhenInactive \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [ColorSystemView new]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [StandardSystemView new].\\\\n\\\\t\\\\t\\\\ttopView\\\\n\\\\t\\\\t\\\\t\\\\tmodel: newModel;\\\\n\\\\t\\\\t\\\\t\\\\tlabel: oldWorldView topView label;\\\\n\\\\t\\\\t\\\\t\\\\tborderWidth: 1;\\\\n\\\\t\\\\t\\\\t\\\\taddSubView: (self new model: w);\\\\n\\\\t\\\\t\\\\t\\\\tbackgroundColor: w color.\\\\n\\\\t\\\\t\\\\ttopView controller openNoTerminate.\\\\n\\\\t\\\\t\\\\ttopView reframeTo: (oldWorldView topView expandedFrame \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\texpandBy: (0 @ 0 extent: 0 @ topView labelHeight)).\\\\n\\\\t\\\\t\\\\toldWorldView topView controller closeAndUnscheduleNoTerminate].\\\\n\\\\tScheduledControllers restore.\\\\n\\\\tProcessor terminateActive! !\\\\n\\\\n!MorphWorldView class methodsFor: 'instance creation'!\\\\nfullColorWhenInactive\\\\n\\\\n\\\\tFullColorWhenInactive ifNil: [FullColorWhenInactive _ true].\\\\n\\\\t^ FullColorWhenInactive\\\\n! !\\\\n\\\\n!MorphWorldView class methodsFor: 'instance creation' stamp: 'di 2/26/98 09:17'!\\\\nfullColorWhenInactive: fullColor\\\\n\\\\t\\\\\\\"MorphWorldView fullColorWhenInactive: true\\\\\\\"\\\\n\\\\t\\\\\\\"If FullColorWhenInactive is true then WorldMorphViews will created inside StandardSystemViews that cache their contents in full-color when the window is inactive. If it is false, only a half-tone gray approximation of the colors will be cached to save space.\\\\\\\"\\\\n\\\\n\\\\tFullColorWhenInactive _ fullColor.\\\\n\\\\n\\\\t\\\\\\\"Retroactively convert all extant windows\\\\\\\"\\\\n\\\\t((fullColor ifTrue: [StandardSystemView] ifFalse: [ColorSystemView])\\\\n\\\\t\\\\tallInstances select:\\\\n\\\\t\\\\t\\\\t[:v | v subViews notNil and: [v subViews isEmpty not and: [v firstSubView isKindOf: MorphWorldView]]])\\\\n\\\\t\\\\tdo: [:v | v uncacheBits.\\\\n\\\\t\\\\t\\\\tv controller toggleTwoTone]! !\\\\n\\\\n!MorphWorldView class methodsFor: 'instance creation'!\\\\nopenOn: aMorphWorld\\\\n\\\\t\\\\\\\"Open a view on the given WorldMorph.\\\\\\\"\\\\n\\\\n\\\\tself openOn: aMorphWorld label: 'A Morphic World'.! !\\\\n\\\\n!MorphWorldView class methodsFor: 'instance creation' stamp: 'sw 10/2/97 23:17'!\\\\nopenOn: aWorldMorph label: aString\\\\n\\\\t\\\\\\\"Open a view with the given label on the given WorldMorph.\\\\\\\"\\\\n\\\\t^ self openOn: aWorldMorph label: aString model: (CautiousModel new initialExtent: aWorldMorph initialExtent)! !\\\\n\\\\n!MorphWorldView class methodsFor: 'instance creation' stamp: 'sw 9/21/1998 17:54'!\\\\nopenOn: aWorldMorph label: aString cautionOnClose: aBoolean\\\\n\\\\t\\\\\\\"Open a view with the given label on the given WorldMorph.\\\\\\\"\\\\n\\\\t| aModel |\\\\n\\\\taModel _ aBoolean\\\\n\\\\t\\\\tifTrue:\\\\t\\\\t[CautiousModel new]\\\\n\\\\t\\\\tifFalse:\\\\t\\\\t[WorldViewModel new].\\\\n\\\\t^ self openOn: aWorldMorph label: aString model: (aModel initialExtent: aWorldMorph initialExtent)! !\\\\n\\\\n!MorphWorldView class methodsFor: 'instance creation' stamp: 'jm 1/31/98 20:24'!\\\\nopenOn: aWorldMorph label: aString extent: aPoint\\\\n\\\\t\\\\\\\"Open a view with the given label and extent on the given WorldMorph.\\\\\\\"\\\\n\\\\n\\\\t^ self openOn: aWorldMorph\\\\n\\\\t\\\\tlabel: aString\\\\n\\\\t\\\\tmodel: (CautiousModel new initialExtent: aPoint)\\\\n! !\\\\n\\\\n!MorphWorldView class methodsFor: 'instance creation' stamp: 'nk 7/30/2004 22:37'!\\\\nopenOn: aWorldMorph label: aString model: aModel \\\\n\\\\t\\\\\\\"Open a view with the given label on the given WorldMorph.\\\\\\\"\\\\n\\\\n\\\\t| topView |\\\\n\\\\ttopView := self fullColorWhenInactive \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [topView := ColorSystemView new]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [topView := StandardSystemView new].\\\\n\\\\ttopView\\\\n\\\\t\\\\tmodel: aModel;\\\\n\\\\t\\\\tlabel: aString;\\\\n\\\\t\\\\tborderWidth: 1;\\\\n\\\\t\\\\taddSubView: (self new model: aWorldMorph);\\\\n\\\\t\\\\tbackgroundColor: aWorldMorph color.\\\\n\\\\t\\\\\\\"minimumSize: aWorldMorph extent + (2@2); \\\\\\\"\\\\t\\\\\\\"add border width\\\\\\\"\\\\n\\\\ttopView controller open! !\\\\n\\\\n!MorphWorldView class methodsFor: 'instance creation' stamp: 'di 11/26/1999 11:46'!\\\\nopenWorld\\\\n\\\\n\\\\t| w |\\\\n\\\\t(w _ MVCWiWPasteUpMorph newWorldForProject: nil).\\\\n\\\\tw bounds: (0@0 extent: 400@300).\\\\n\\\\tself openOn: w\\\\n\\\\t\\\\tlabel: 'A Morphic World'\\\\n\\\\t\\\\textent: w fullBounds extent + 2.\\\\n! !\\\\n\\\\n!MorphWorldView class methodsFor: 'instance creation' stamp: 'sma 6/12/2000 14:18'!\\\\nopenWorldWith: aMorph labelled: labelString\\\\n\\\\n\\\\t| w |\\\\n\\\\t(w _ MVCWiWPasteUpMorph newWorldForProject: nil) addMorph: aMorph.\\\\n\\\\tw extent: aMorph fullBounds extent.\\\\n\\\\tw startSteppingSubmorphsOf: aMorph.\\\\n\\\\tself openOn: w\\\\n\\\\t\\\\tlabel: labelString\\\\n\\\\t\\\\textent: w fullBounds extent + 2.\\\\n! !\\\\nMessageSend subclass: #MorphicAlarm\\\\n\\\\tinstanceVariableNames: 'scheduledTime numArgs'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Events'!\\\\n\\\\n!MorphicAlarm methodsFor: 'accessing' stamp: 'ar 9/11/2000 16:44'!\\\\nscheduledTime\\\\n\\\\t\\\\\\\"Return the time (in milliseconds) that the receiver is scheduled to be executed\\\\\\\"\\\\n\\\\t^scheduledTime! !\\\\n\\\\n!MorphicAlarm methodsFor: 'accessing' stamp: 'ar 9/11/2000 16:45'!\\\\nscheduledTime: msecs\\\\n\\\\t\\\\\\\"Set the time (in milliseconds) that the receiver is scheduled to be executed\\\\\\\"\\\\n\\\\tscheduledTime _ msecs! !\\\\n\\\\n\\\\n!MorphicAlarm methodsFor: 'evaluating' stamp: 'ar 10/22/2000 17:36'!\\\\nvalue: anArgument\\\\n\\\\t| nArgs |\\\\n\\\\tnumArgs ifNil:[numArgs _ selector numArgs].\\\\n\\\\tnArgs _ arguments ifNil:[0] ifNotNil:[arguments size].\\\\n\\\\tnArgs = numArgs ifTrue:[\\\\n\\\\t\\\\t\\\\\\\"Ignore extra argument\\\\\\\"\\\\n\\\\t\\\\t^self value].\\\\n\\\\t^arguments isNil\\\\n\\\\t\\\\tifTrue: [receiver perform: selector with: anArgument]\\\\n\\\\t\\\\tifFalse: [receiver perform: selector withArguments: (arguments copyWith: anArgument)]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMorphicAlarm class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MorphicAlarm class methodsFor: 'instance creation' stamp: 'ar 9/11/2000 16:44'!\\\\nscheduledAt: scheduledTime receiver: aTarget selector: aSelector arguments: argArray\\\\n\\\\t^(self receiver: aTarget selector: aSelector arguments: argArray)\\\\n\\\\t\\\\tscheduledTime: scheduledTime.! !\\\\nObject subclass: #MorphicEvent\\\\n\\\\tinstanceVariableNames: 'timeStamp source'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Events'!\\\\n!MorphicEvent commentStamp: '<historical>' prior: 0!\\\\nThis class represents the base for all events.\\\\n\\\\nInstance variables:\\\\n\\\\tstamp\\\\t<Integer>\\\\tThe millisecond clock time stamp (based on Time millisecondClock)\\\\n\\\\tsource\\\\t<Hand | nil>\\\\tIf non-nil the hand that generated the event.!\\\\n\\\\n\\\\n!MorphicEvent methodsFor: 'accessing' stamp: 'ar 10/10/2000 21:28'!\\\\ncursorPoint\\\\n\\\\t\\\\\\\"Backward compatibility. Use #position instead\\\\\\\"\\\\n\\\\t^ self position! !\\\\n\\\\n!MorphicEvent methodsFor: 'accessing' stamp: 'ar 9/13/2000 16:48'!\\\\nhand\\\\n\\\\t\\\\\\\"Return the source that generated the event\\\\\\\"\\\\n\\\\t^source! !\\\\n\\\\n!MorphicEvent methodsFor: 'accessing' stamp: 'wiz 12/8/2004 23:13'!\\\\nposition\\\\n\\\\t\\\\\\\"Since cursorPoint is defined and refers to position it should be defined\\\\n\\\\there as well\\\\\\\"\\\\n\\\\t^ self subclassResponsibility! !\\\\n\\\\n!MorphicEvent methodsFor: 'accessing' stamp: 'ar 9/13/2000 15:29'!\\\\ntimeStamp\\\\n\\\\t\\\\\\\"Return the millisecond clock value at which the event was generated\\\\\\\"\\\\n\\\\t^timeStamp ifNil:[timeStamp _ Time millisecondClockValue]! !\\\\n\\\\n!MorphicEvent methodsFor: 'accessing' stamp: 'ar 9/13/2000 15:34'!\\\\ntype\\\\n\\\\t\\\\\\\"Return a symbol indicating the type this event.\\\\\\\"\\\\n\\\\t^self subclassResponsibility! !\\\\n\\\\n!MorphicEvent methodsFor: 'accessing' stamp: 'ar 10/10/2000 01:19'!\\\\nwasHandled\\\\n\\\\t\\\\\\\"Return true if this event was handled. May be ignored for some types of events.\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n!MorphicEvent methodsFor: 'accessing' stamp: 'ar 10/10/2000 01:20'!\\\\nwasHandled: aBool\\\\n\\\\t\\\\\\\"Determine if this event was handled. May be ignored for some types of events.\\\\\\\"! !\\\\n\\\\n\\\\n!MorphicEvent methodsFor: 'comparing' stamp: 'ar 9/13/2000 15:36'!\\\\n= anEvent\\\\n\\\\tanEvent isMorphicEvent ifFalse:[^false].\\\\n\\\\t^self type = anEvent type! !\\\\n\\\\n!MorphicEvent methodsFor: 'comparing' stamp: 'ar 9/13/2000 15:36'!\\\\nhash\\\\n\\\\t^self type hash! !\\\\n\\\\n\\\\n!MorphicEvent methodsFor: 'dispatching' stamp: 'ar 9/15/2000 21:12'!\\\\nsentTo: anObject\\\\n\\\\t\\\\\\\"Dispatch the receiver into anObject\\\\\\\"\\\\n\\\\t^anObject handleUnknownEvent: self! !\\\\n\\\\n\\\\n!MorphicEvent methodsFor: 'initialize' stamp: 'ar 10/10/2000 01:18'!\\\\ncopyHandlerState: anEvent\\\\n\\\\t\\\\\\\"Copy the handler state from anEvent. Used for quickly transferring handler information between transformed events.\\\\\\\"\\\\n! !\\\\n\\\\n!MorphicEvent methodsFor: 'initialize' stamp: 'ar 10/10/2000 01:18'!\\\\nresetHandlerFields\\\\n\\\\t\\\\\\\"Reset anything that is used to cross-communicate between two eventual handlers during event dispatch\\\\\\\"! !\\\\n\\\\n!MorphicEvent methodsFor: 'initialize' stamp: 'ar 10/24/2000 16:21'!\\\\ntype: eventType readFrom: aStream\\\\n\\\\t\\\\\\\"Read a MorphicEvent from the given stream.\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!MorphicEvent methodsFor: 'object fileIn' stamp: 'RAA 12/20/2000 16:05'!\\\\nconvertOctober2000: varDict using: smartRefStrm\\\\n\\\\t\\\\\\\"ar 10/25/2000: This method is used to convert OLD MorphicEvents into new ones.\\\\\\\"\\\\n\\\\t\\\\\\\"These are going away #('type' 'cursorPoint' 'buttons' 'keyValue' 'sourceHand').  Possibly store their info in another variable?\\\\\\\"\\\\n\\\\t| type cursorPoint buttons keyValue sourceHand |\\\\n\\\\ttype _ varDict at: 'type'.\\\\n\\\\tcursorPoint _ varDict at: 'cursorPoint'.\\\\n\\\\tbuttons _ varDict at: 'buttons'.\\\\n\\\\tkeyValue _ varDict at: 'keyValue'.\\\\n\\\\tsourceHand _ varDict at: 'sourceHand'.\\\\n\\\\ttype == #mouseMove ifTrue:[\\\\n\\\\t\\\\t^MouseMoveEvent new\\\\n\\\\t\\\\t\\\\tsetType: #mouseMove \\\\n\\\\t\\\\t\\\\tstartPoint: cursorPoint\\\\n\\\\t\\\\t\\\\tendPoint: cursorPoint\\\\n\\\\t\\\\t\\\\ttrail: #() \\\\n\\\\t\\\\t\\\\tbuttons: buttons \\\\n\\\\t\\\\t\\\\thand: sourceHand \\\\n\\\\t\\\\t\\\\tstamp: nil].\\\\n\\\\t(type == #mouseDown) | (type == #mouseUp) ifTrue:[\\\\n\\\\t\\\\t\\\\t^MouseButtonEvent new\\\\n\\\\t\\\\t\\\\t\\\\tsetType: type\\\\n\\\\t\\\\t\\\\t\\\\tposition: cursorPoint\\\\n\\\\t\\\\t\\\\t\\\\twhich: 0\\\\n\\\\t\\\\t\\\\t\\\\tbuttons: buttons\\\\n\\\\t\\\\t\\\\t\\\\thand: sourceHand\\\\n\\\\t\\\\t\\\\t\\\\tstamp: nil].\\\\n\\\\t(type == #keystroke) | (type == #keyDown) | (type == #keyUp) ifTrue:[\\\\n\\\\t\\\\t^KeyboardEvent new\\\\n\\\\t\\\\t\\\\tsetType: type\\\\n\\\\t\\\\t\\\\tbuttons: buttons\\\\n\\\\t\\\\t\\\\tposition: cursorPoint\\\\n\\\\t\\\\t\\\\tkeyValue: keyValue\\\\n\\\\t\\\\t\\\\thand: sourceHand\\\\n\\\\t\\\\t\\\\tstamp: nil].\\\\n\\\\t\\\\\\\"All others will be handled there\\\\\\\"\\\\n\\\\t^MorphicUnknownEvent new! !\\\\n\\\\n\\\\n!MorphicEvent methodsFor: 'objects from disk' stamp: 'RAA 12/21/2000 11:35'!\\\\nconvertToCurrentVersion: varDict refStream: smartRefStrm\\\\n\\\\t\\\\n\\\\t| answer |\\\\n\\\\n\\\\t\\\\\\\"ar 10/25/2000: This method is used to convert OLD MorphicEvents into new ones.\\\\\\\"\\\\n\\\\tvarDict at: 'cursorPoint' ifPresent: [ :x | \\\\n\\\\t\\\\tanswer _ self convertOctober2000: varDict using: smartRefStrm.\\\\n\\\\t\\\\tvarDict removeKey: 'cursorPoint'.\\\\t\\\\\\\"avoid doing this again\\\\\\\"\\\\n\\\\t\\\\t^answer\\\\n\\\\t].\\\\n\\\\t^super convertToCurrentVersion: varDict refStream: smartRefStrm.\\\\n\\\\n\\\\n! !\\\\n\\\\n\\\\n!MorphicEvent methodsFor: 'testing' stamp: 'ar 9/22/2000 10:36'!\\\\nisDraggingEvent\\\\n\\\\t^false! !\\\\n\\\\n!MorphicEvent methodsFor: 'testing' stamp: 'ar 9/13/2000 19:17'!\\\\nisDropEvent\\\\n\\\\t^false! !\\\\n\\\\n!MorphicEvent methodsFor: 'testing' stamp: 'ar 9/13/2000 19:19'!\\\\nisKeyboard\\\\n\\\\t^false! !\\\\n\\\\n!MorphicEvent methodsFor: 'testing' stamp: 'ar 10/10/2000 21:27'!\\\\nisKeystroke\\\\n\\\\t^false! !\\\\n\\\\n!MorphicEvent methodsFor: 'testing' stamp: 'ar 9/13/2000 15:37'!\\\\nisMorphicEvent\\\\n\\\\t^true! !\\\\n\\\\n!MorphicEvent methodsFor: 'testing' stamp: 'ar 9/13/2000 19:19'!\\\\nisMouse\\\\n\\\\t^false! !\\\\n\\\\n!MorphicEvent methodsFor: 'testing' stamp: 'ar 9/14/2000 18:21'!\\\\nisMouseOver\\\\n\\\\t^self type == #mouseOver! !\\\\n\\\\n\\\\n!MorphicEvent methodsFor: 'transforming' stamp: 'ar 9/13/2000 15:47'!\\\\ntransformedBy: aMorphicTransform\\\\n\\\\t\\\\\\\"Return the receiver transformed by the given transform into a local coordinate system.\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!MorphicEvent methodsFor: 'private' stamp: 'ar 10/25/2000 21:26'!\\\\nsetHand: aHand\\\\n\\\\tsource _ aHand! !\\\\n\\\\n!MorphicEvent methodsFor: 'private' stamp: 'ar 10/25/2000 20:53'!\\\\nsetTimeStamp: stamp\\\\n\\\\ttimeStamp _ stamp.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMorphicEvent class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MorphicEvent class methodsFor: 'instance creation' stamp: 'ar 10/26/2000 00:44'!\\\\nconvertObsolete: anEvent\\\\n\\\\t\\\\\\\"ar 10/25/2000: This method is used to convert OLD MorphicEvents into new ones.\\\\\\\"\\\\n\\\\t| type cursorPoint buttons keyValue sourceHand |\\\\n\\\\ttype _ anEvent type.\\\\n\\\\tcursorPoint _ anEvent cursorPoint.\\\\n\\\\tbuttons _ anEvent buttons.\\\\n\\\\tkeyValue _ anEvent keyValue.\\\\n\\\\tsourceHand _ anEvent hand.\\\\n\\\\ttype == #mouseMove ifTrue:[\\\\n\\\\t\\\\t^MouseMoveEvent new\\\\n\\\\t\\\\t\\\\tsetType: #mouseMove \\\\n\\\\t\\\\t\\\\tstartPoint: cursorPoint\\\\n\\\\t\\\\t\\\\tendPoint: cursorPoint\\\\n\\\\t\\\\t\\\\ttrail: #() \\\\n\\\\t\\\\t\\\\tbuttons: buttons \\\\n\\\\t\\\\t\\\\thand: sourceHand \\\\n\\\\t\\\\t\\\\tstamp: nil].\\\\n\\\\t(type == #mouseDown) | (type == #mouseUp) ifTrue:[\\\\n\\\\t\\\\t\\\\t^MouseButtonEvent new\\\\n\\\\t\\\\t\\\\t\\\\tsetType: type\\\\n\\\\t\\\\t\\\\t\\\\tposition: cursorPoint\\\\n\\\\t\\\\t\\\\t\\\\twhich: 0\\\\n\\\\t\\\\t\\\\t\\\\tbuttons: buttons\\\\n\\\\t\\\\t\\\\t\\\\thand: sourceHand\\\\n\\\\t\\\\t\\\\t\\\\tstamp: nil].\\\\n\\\\t(type == #keystroke) | (type == #keyDown) | (type == #keyUp) ifTrue:[\\\\n\\\\t\\\\t^KeyboardEvent new\\\\n\\\\t\\\\t\\\\tsetType: type\\\\n\\\\t\\\\t\\\\tbuttons: buttons\\\\n\\\\t\\\\t\\\\tposition: cursorPoint\\\\n\\\\t\\\\t\\\\tkeyValue: keyValue\\\\n\\\\t\\\\t\\\\thand: sourceHand\\\\n\\\\t\\\\t\\\\tstamp: nil].\\\\n\\\\t^nil! !\\\\n\\\\n!MorphicEvent class methodsFor: 'instance creation' stamp: 'ar 10/26/2000 00:49'!\\\\nreadFrom: aStream\\\\n\\\\t\\\\\\\"Read a MorphicEvent from the given stream.\\\\\\\"\\\\n\\\\t| typeString c |\\\\n\\\\ttypeString _ String streamContents:\\\\n\\\\t\\\\t[:s |   [(c _ aStream next) isLetter] whileTrue: [s nextPut: c]].\\\\n\\\\ttypeString = 'mouseMove' ifTrue:[^MouseMoveEvent type: #mouseMove readFrom: aStream].\\\\n\\\\ttypeString = 'mouseDown' ifTrue:[^MouseButtonEvent type: #mouseDown readFrom: aStream].\\\\n\\\\ttypeString = 'mouseUp' ifTrue:[^MouseButtonEvent type: #mouseUp readFrom: aStream].\\\\n\\\\n\\\\ttypeString = 'keystroke' ifTrue:[^KeyboardEvent type: #keystroke readFrom: aStream].\\\\n\\\\ttypeString = 'keyDown' ifTrue:[^KeyboardEvent type: #keyDown readFrom: aStream].\\\\n\\\\ttypeString = 'keyUp' ifTrue:[^KeyboardEvent type: #keyUp readFrom: aStream].\\\\n\\\\n\\\\ttypeString = 'mouseOver' ifTrue:[^MouseEvent type: #mouseOver readFrom: aStream].\\\\n\\\\ttypeString = 'mouseEnter' ifTrue:[^MouseEvent type: #mouseEnter readFrom: aStream].\\\\n\\\\ttypeString = 'mouseLeave' ifTrue:[^MouseEvent type: #mouseLeave readFrom: aStream].\\\\n\\\\n\\\\ttypeString = 'unknown' ifTrue:[^MorphicUnknownEvent type: #unknown readFrom: aStream].\\\\n\\\\n\\\\t^nil\\\\n! !\\\\n\\\\n!MorphicEvent class methodsFor: 'instance creation' stamp: 'ar 10/25/2000 21:58'!\\\\nreadFromObsolete: aStream\\\\n\\\\t\\\\\\\"Read one of those old and now obsolete events from the stream\\\\\\\"\\\\n\\\\t| type x y buttons keyValue typeString c |\\\\n\\\\ttypeString _ String streamContents:\\\\n\\\\t\\\\t[:s |   [(c _ aStream next) isLetter] whileTrue: [s nextPut: c]].\\\\n\\\\ttypeString = 'mouseMove'\\\\n\\\\t\\\\tifTrue: [type _ #mouseMove  \\\\\\\"fast treatment of common case\\\\\\\"]\\\\n\\\\t\\\\tifFalse: [type _ typeString asSymbol].\\\\n\\\\n\\\\tx _ Integer readFrom: aStream.\\\\n\\\\taStream skip: 1.\\\\n\\\\ty _ Integer readFrom: aStream.\\\\n\\\\taStream skip: 1.\\\\n\\\\n\\\\tbuttons _ Integer readFrom: aStream.\\\\n\\\\taStream skip: 1.\\\\n\\\\n\\\\tkeyValue _ Integer readFrom: aStream.\\\\n\\\\n\\\\ttypeString = 'mouseMove' ifTrue:[\\\\n\\\\t\\\\t^MouseMoveEvent new\\\\n\\\\t\\\\t\\\\tsetType: #mouseMove \\\\n\\\\t\\\\t\\\\tstartPoint: x@y \\\\n\\\\t\\\\t\\\\tendPoint: x@y \\\\n\\\\t\\\\t\\\\ttrail: #() \\\\n\\\\t\\\\t\\\\tbuttons: buttons \\\\n\\\\t\\\\t\\\\thand: nil \\\\n\\\\t\\\\t\\\\tstamp: nil].\\\\n\\\\t(typeString = 'mouseDown') | (typeString = 'mouseUp') ifTrue:[\\\\n\\\\t\\\\t\\\\t^MouseButtonEvent new\\\\n\\\\t\\\\t\\\\t\\\\tsetType: type\\\\n\\\\t\\\\t\\\\t\\\\tposition: x@y\\\\n\\\\t\\\\t\\\\t\\\\twhich: 0\\\\n\\\\t\\\\t\\\\t\\\\tbuttons: buttons\\\\n\\\\t\\\\t\\\\t\\\\thand: nil\\\\n\\\\t\\\\t\\\\t\\\\tstamp: nil].\\\\n\\\\t(typeString = 'keystroke') | (typeString = 'keyDown') | (typeString = 'keyUp') ifTrue:[\\\\n\\\\t\\\\t^KeyboardEvent new\\\\n\\\\t\\\\t\\\\tsetType: type\\\\n\\\\t\\\\t\\\\tbuttons: buttons\\\\n\\\\t\\\\t\\\\tposition: x@y\\\\n\\\\t\\\\t\\\\tkeyValue: keyValue\\\\n\\\\t\\\\t\\\\thand: nil\\\\n\\\\t\\\\t\\\\tstamp: nil].\\\\n\\\\n\\\\t^nil! !\\\\n\\\\n!MorphicEvent class methodsFor: 'instance creation' stamp: 'ar 10/24/2000 16:32'!\\\\ntype: eventType readFrom: aStream\\\\n\\\\t^self new type: eventType readFrom: aStream! !\\\\n\\\\n\\\\n!MorphicEvent class methodsFor: '*nebraska-*nebraska-Morphic-Remote' stamp: 'ar 10/25/2000 23:32'!\\\\nfromStringArray: array\\\\n\\\\t\\\\\\\"decode an event that was encoded with encodedAsStringArray\\\\\\\"\\\\n\\\\t| type |\\\\n\\\\ttype := (array at: 1).\\\\n\\\\t(type = 'mouseMove')\\\\n\\\\t\\\\tifTrue:[^MouseMoveEvent new decodeFromStringArray: array].\\\\n\\\\t(type = 'mouseDown' or:[type = 'mouseUp']) \\\\n\\\\t\\\\tifTrue:[^MouseButtonEvent new decodeFromStringArray: array].\\\\n\\\\t(type = 'keystroke' or:[type = 'keyDown' or:[type = 'keyUp']]) \\\\n\\\\t\\\\tifTrue:[^KeyboardEvent new decodeFromStringArray: array].\\\\n\\\\t^nil! !\\\\nObject subclass: #MorphicEventDecoder\\\\n\\\\tinstanceVariableNames: 'connection'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Nebraska-Morphic-Remote'!\\\\n!MorphicEventDecoder commentStamp: '<historical>' prior: 0!\\\\ndecode messages sent via a MorphicEventEncoder.!\\\\n\\\\n\\\\n!MorphicEventDecoder methodsFor: 'handling messages' stamp: 'RAA 11/8/2000 15:15'!\\\\napply: aStringArray to: aHand\\\\n\\\\t\\\\\\\"decode aStringArray, and apply the encoded command to aHand\\\\\\\"\\\\n\\\\n\\\\taStringArray first = 'event' ifTrue: [\\\\n\\\\t\\\\t^self applyEventMessage: aStringArray to: aHand\\\\n\\\\t].\\\\n\\\\taStringArray first = 'viewExtent' ifTrue: [\\\\n\\\\t\\\\t^self applyViewExtentMessage: aStringArray to: aHand\\\\n\\\\t].\\\\n\\\\taStringArray first = 'beginBuffering' ifTrue: [\\\\n\\\\t\\\\t^aHand convertRemoteClientToBuffered\\\\n\\\\t].\\\\n\\\\n\\\\t^self error: 'unknown message type: ', aStringArray first! !\\\\n\\\\n!MorphicEventDecoder methodsFor: 'handling messages' stamp: 'ar 10/26/2000 01:55'!\\\\napplyEventMessage: aStringArray to: aHand\\\\n\\\\t| event |\\\\n\\\\tevent := MorphicEvent fromStringArray: (aStringArray copyFrom: 2 to: aStringArray size).\\\\n\\\\tevent ifNotNil:[aHand queueEvent: event].! !\\\\n\\\\n!MorphicEventDecoder methodsFor: 'handling messages' stamp: 'ls 3/25/2000 16:56'!\\\\napplyMessagesTo: aHand\\\\n\\\\t| msg |\\\\n\\\\t\\\\\\\"apply all queued events to the given hand\\\\\\\"\\\\n\\\\t\\\\\\\"currently, there is no way to extract the rawmessages.  This is simply because I didn't feel like implementing individual classes for each message -lex\\\\\\\"\\\\n\\\\t[ msg := connection nextOrNil.  msg notNil ] whileTrue: [\\\\n\\\\t\\\\tself apply: msg to: aHand ].\\\\n! !\\\\n\\\\n!MorphicEventDecoder methodsFor: 'handling messages' stamp: 'ls 4/11/2000 19:00'!\\\\napplyViewExtentMessage: aStringArray to: aHand\\\\n\\\\t| newViewExtent |\\\\n\\\\tnewViewExtent := CanvasDecoder decodePoint: aStringArray second.\\\\n\\\\n\\\\taHand setViewExtent: newViewExtent! !\\\\n\\\\n!MorphicEventDecoder methodsFor: 'handling messages' stamp: 'ls 3/24/2000 22:54'!\\\\nprocessIO\\\\n\\\\tconnection processIO! !\\\\n\\\\n\\\\n!MorphicEventDecoder methodsFor: 'initialization' stamp: 'ls 3/24/2000 21:42'!\\\\nconnection: aConnection\\\\n\\\\tconnection := aConnection! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMorphicEventDecoder class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MorphicEventDecoder class methodsFor: 'instance creation' stamp: 'ls 3/24/2000 21:43'!\\\\non: aStringArray\\\\n\\\\t^self basicNew connection: aStringArray! !\\\\nObject subclass: #MorphicEventDispatcher\\\\n\\\\tinstanceVariableNames: 'lastType lastDispatch'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Events'!\\\\n!MorphicEventDispatcher commentStamp: '<historical>' prior: 0!\\\\nThe class represents a strategy for dispatching events to some immediate child of a morph. It is used by morphs to delegate the somewhat complex action of dispatching events accurately. !\\\\n\\\\n\\\\n!MorphicEventDispatcher methodsFor: 'dispatching' stamp: 'ar 10/10/2000 01:20'!\\\\ndispatchDefault: anEvent with: aMorph\\\\n\\\\t\\\\\\\"Dispatch the given event. The event will be passed to the front-most visible submorph that contains the position wrt. to the event.\\\\\\\"\\\\n\\\\t| localEvt index child morphs inside |\\\\n\\\\t\\\\\\\"See if we're fully outside aMorphs bounds\\\\\\\"\\\\n\\\\t(aMorph fullBounds containsPoint: anEvent position) ifFalse:[^#rejected]. \\\\\\\"outside\\\\\\\"\\\\n\\\\t\\\\\\\"Traverse children\\\\\\\"\\\\n\\\\tindex _ 1.\\\\n\\\\tmorphs _ aMorph submorphs.\\\\n\\\\tinside _ false.\\\\n\\\\t[index <= morphs size] whileTrue:[\\\\n\\\\t\\\\tchild _ morphs at: index.\\\\n\\\\t\\\\tlocalEvt _ anEvent transformedBy: (child transformedFrom: aMorph).\\\\n\\\\t\\\\t(child processEvent: localEvt using: self) == #rejected ifFalse:[\\\\n\\\\t\\\\t\\\\t\\\\\\\"Not rejected. The event was in some submorph of the receiver\\\\\\\"\\\\n\\\\t\\\\t\\\\tinside _ true.\\\\n\\\\t\\\\t\\\\tlocalEvt wasHandled ifTrue:[anEvent copyHandlerState: localEvt].\\\\n\\\\t\\\\t\\\\tindex _ morphs size. \\\\\\\"break\\\\\\\"\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tindex _ index + 1.\\\\n\\\\t].\\\\n\\\\n\\\\t\\\\\\\"Check for being inside the receiver\\\\\\\"\\\\n\\\\tinside ifFalse:[inside _ aMorph containsPoint: anEvent position event: anEvent].\\\\n\\\\tinside ifTrue:[^aMorph handleEvent: anEvent].\\\\n\\\\t^#rejected\\\\n! !\\\\n\\\\n!MorphicEventDispatcher methodsFor: 'dispatching' stamp: 'ar 10/10/2000 21:13'!\\\\ndispatchDropEvent: anEvent with: aMorph\\\\n\\\\t\\\\\\\"Find the appropriate receiver for the event and let it handle it. The dispatch is similar to the default dispatch with one difference: Morphs are given the chance to reject an entire drop operation. If the operation is rejected, no drop will be executed.\\\\\\\"\\\\n\\\\t| inside index morphs child localEvt |\\\\n\\\\t\\\\\\\"Try to get out quickly\\\\\\\"\\\\n\\\\t(aMorph fullBounds containsPoint: anEvent cursorPoint)\\\\n\\\\t\\\\tifFalse:[^#rejected].\\\\n\\\\t\\\\\\\"Give aMorph a chance to repel the dropping morph\\\\\\\"\\\\n\\\\taMorph rejectDropEvent: anEvent.\\\\n\\\\tanEvent wasHandled ifTrue:[^self].\\\\n\\\\n\\\\t\\\\\\\"Go looking if any of our submorphs wants it\\\\\\\"\\\\n\\\\tindex _ 1.\\\\n\\\\tinside _ false.\\\\n\\\\tmorphs _ aMorph submorphs.\\\\n\\\\t[index <= morphs size] whileTrue:[\\\\n\\\\t\\\\tchild _ morphs at: index.\\\\n\\\\t\\\\tlocalEvt _ anEvent transformedBy: (child transformedFrom: aMorph).\\\\n\\\\t\\\\t(child processEvent: localEvt using: self) == #rejected ifFalse:[\\\\n\\\\t\\\\t\\\\tlocalEvt wasHandled ifTrue:[^anEvent wasHandled: true]. \\\\\\\"done\\\\\\\"\\\\n\\\\t\\\\t\\\\tinside _ true.\\\\n\\\\t\\\\t\\\\tindex _ morphs size]. \\\\\\\"break\\\\\\\"\\\\n\\\\t\\\\tindex _ index + 1.\\\\n\\\\t].\\\\n\\\\n\\\\tinside ifFalse:[inside _ aMorph containsPoint: anEvent cursorPoint event: anEvent].\\\\n\\\\tinside ifTrue:[^aMorph handleEvent: anEvent].\\\\n\\\\t^#rejected! !\\\\n\\\\n!MorphicEventDispatcher methodsFor: 'dispatching' stamp: 'ar 1/10/2001 21:43'!\\\\ndispatchEvent: anEvent with: aMorph\\\\n\\\\t\\\\\\\"Dispatch the given event for a morph that has chosen the receiver to dispatch its events. The method implements a shortcut for repeated dispatches of events using the same dispatcher.\\\\\\\"\\\\n\\\\tanEvent type == lastType ifTrue:[^self perform: lastDispatch with: anEvent with: aMorph].\\\\n\\\\t\\\\\\\"Otherwise classify\\\\\\\"\\\\n\\\\tlastType _ anEvent type.\\\\n\\\\tanEvent isMouse ifTrue:[\\\\n\\\\t\\\\tanEvent isMouseDown ifTrue:[\\\\n\\\\t\\\\t\\\\tlastDispatch _ #dispatchMouseDown:with:.\\\\n\\\\t\\\\t\\\\t^self dispatchMouseDown: anEvent with: aMorph]].\\\\n\\\\tanEvent type == #dropEvent ifTrue:[\\\\n\\\\t\\\\tlastDispatch _ #dispatchDropEvent:with:.\\\\n\\\\t\\\\t^self dispatchDropEvent: anEvent with: aMorph].\\\\n\\\\tlastDispatch _ #dispatchDefault:with:.\\\\n\\\\t^self dispatchDefault: anEvent with: aMorph! !\\\\n\\\\n!MorphicEventDispatcher methodsFor: 'dispatching' stamp: 'ar 10/10/2000 21:14'!\\\\ndispatchMouseDown: anEvent with: aMorph\\\\n\\\\t\\\\\\\"Find the appropriate receiver for the event and let it handle it. Default rules:\\\\n\\\\t* The top-most chain of visible, unlocked morphs containing the event position will get a chance to handle the event.\\\\n\\\\t* When travelling down the hierarchy a prospective handler for the event is installed. This prospective handler can be used by submorphs wishing to handle the mouse down for negotiating who the receiver is.\\\\n\\\\t* When travelling up, the prospective handler is always executed. The handler needs to check if the event was handled before as well as checking if somebody else's handler has been installed.\\\\n\\\\t* If another handler has been installed but the event was not handled it means that somebody up in the hierarchy wants to handle the event.\\\\n\\\\\\\"\\\\n\\\\t| globalPt localEvt index child morphs handler inside lastHandler |\\\\n\\\\t\\\\\\\"Try to get out quickly\\\\\\\"\\\\n\\\\tglobalPt _ anEvent cursorPoint.\\\\n\\\\t(aMorph fullBounds containsPoint: globalPt) ifFalse:[^#rejected].\\\\n\\\\n\\\\t\\\\\\\"Install the prospective handler for the receiver\\\\\\\"\\\\n\\\\tlastHandler _ anEvent handler. \\\\\\\"in case the mouse wasn't even in the receiver\\\\\\\"\\\\n\\\\thandler _ aMorph handlerForMouseDown: anEvent.\\\\n\\\\thandler ifNotNil:[anEvent handler: handler].\\\\n\\\\n\\\\t\\\\\\\"Now give our submorphs a chance to handle the event\\\\\\\"\\\\n\\\\tindex _ 1.\\\\n\\\\tmorphs _ aMorph submorphs.\\\\n\\\\t[index <= morphs size] whileTrue:[\\\\n\\\\t\\\\tchild _ morphs at: index.\\\\n\\\\t\\\\tlocalEvt _ anEvent transformedBy: (child transformedFrom: aMorph).\\\\n\\\\t\\\\t(child processEvent: localEvt using: self) == #rejected ifFalse:[\\\\n\\\\t\\\\t\\\\t\\\\\\\"Some child did contain the point so we're part of the top-most chain.\\\\\\\"\\\\n\\\\t\\\\t\\\\tinside _ false.\\\\n\\\\t\\\\t\\\\tlocalEvt wasHandled ifTrue:[anEvent copyHandlerState: localEvt].\\\\n\\\\t\\\\t\\\\tindex _ morphs size].\\\\n\\\\t\\\\tindex _ index + 1.\\\\n\\\\t].\\\\n\\\\n\\\\t(inside == false or:[aMorph containsPoint: anEvent cursorPoint event: anEvent]) ifTrue:[\\\\n\\\\t\\\\t\\\\\\\"Receiver is in the top-most unlocked, visible chain.\\\\\\\"\\\\n\\\\t\\\\thandler ifNotNil:[handler handleEvent: anEvent].\\\\n\\\\t\\\\t\\\\\\\"Note: Re-installing the handler is not really necessary but good style.\\\\\\\"\\\\n\\\\t\\\\tanEvent handler: lastHandler.\\\\n\\\\t\\\\t^self\\\\n\\\\t].\\\\n\\\\t\\\\\\\"Mouse was not on receiver nor any of its children\\\\\\\"\\\\n\\\\tanEvent handler: lastHandler.\\\\n\\\\t^#rejected! !\\\\nObject subclass: #MorphicEventEncoder\\\\n\\\\tinstanceVariableNames: 'connection lastEventSent'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Nebraska-Morphic-Remote'!\\\\n!MorphicEventEncoder commentStamp: '<historical>' prior: 0!\\\\nA filter which translates MorphEvent's into StringArray's.!\\\\n\\\\n\\\\n!MorphicEventEncoder methodsFor: 'initialization' stamp: 'ls 3/24/2000 21:38'!\\\\nconnection: aConnection\\\\n\\\\tconnection := aConnection! !\\\\n\\\\n\\\\n!MorphicEventEncoder methodsFor: 'network I/O' stamp: 'ls 3/24/2000 21:42'!\\\\nflush\\\\n\\\\tconnection flush! !\\\\n\\\\n!MorphicEventEncoder methodsFor: 'network I/O' stamp: 'ls 3/24/2000 21:38'!\\\\nprocessIO\\\\n\\\\tconnection processIO! !\\\\n\\\\n!MorphicEventEncoder methodsFor: 'network I/O' stamp: 'RAA 12/13/2000 08:19'!\\\\nrequestBufferedConnection\\\\n\\\\t\\\\\\\"request the opposite side to send complete screen updates rather than discrete drawing commands\\\\\\\"\\\\n\\\\t\\\\n\\\\tconnection nextPut: { 'beginBuffering' }\\\\n! !\\\\n\\\\n!MorphicEventEncoder methodsFor: 'network I/O' stamp: 'ls 3/26/2000 01:08'!\\\\nsendEvent: anEvent\\\\n\\\\t(anEvent isMouseMove and: [ anEvent = lastEventSent ]) ifTrue: [\\\\n\\\\t\\\\t\\\\\\\"save on network traffic--don't send duplicate mouse moves\\\\\\\"\\\\n\\\\t\\\\t^self ].\\\\n\\\\tlastEventSent := anEvent.\\\\n\\\\tconnection nextPut: #('event'), anEvent encodedAsStringArray! !\\\\n\\\\n!MorphicEventEncoder methodsFor: 'network I/O' stamp: 'ls 4/11/2000 18:59'!\\\\nsendViewExtent: newExtent\\\\n\\\\t\\\\\\\"inform the opposite side that our view extent has changed\\\\\\\"\\\\n\\\\t\\\\n\\\\tconnection nextPut: { 'viewExtent'. CanvasEncoder encodePoint: newExtent }\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMorphicEventEncoder class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MorphicEventEncoder class methodsFor: 'instance creation' stamp: 'ls 3/24/2000 21:43'!\\\\non: aStringArray\\\\n\\\\t^self basicNew connection: aStringArray! !\\\\nBorderedMorph subclass: #MorphicModel\\\\n\\\\tinstanceVariableNames: 'model slotName open'\\\\n\\\\tclassVariableNames: 'TimeOfError'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Kernel'!\\\\n!MorphicModel commentStamp: '<historical>' prior: 0!\\\\nMorphicModels are used to represent structures with state and behavior as well as graphical structure.  A morphicModel is usually the root of a morphic tree depicting its appearance.  The tree is constructed concretely by adding its consituent morphs to a world.\\\\n\\\\nWhen a part is named in a world, it is given a new slot in the model.  When a part is sensitized, it is named, and a set of mouse-driven methods is also generated in the model.  These may be edited to induce particular behavior.  When a variable is added through the morphic world, it is given a slot in the model, along with a set of access methods.\\\\n\\\\nIn addition for public variables (and this is the default for now), methods are generated and called in any outer model in which this model gets embedded, thus propagating variable changes outward.!\\\\n\\\\n\\\\n!MorphicModel methodsFor: 'access'!\\\\nmodel \\\\n\\\\t^ model! !\\\\n\\\\n!MorphicModel methodsFor: 'access'!\\\\nslotName\\\\n\\\\t^ slotName! !\\\\n\\\\n!MorphicModel methodsFor: 'access' stamp: '6/7/97 10:40 di'!\\\\nwantsSlot\\\\n\\\\t\\\\\\\"Override this default for models that want to be installed in theri model\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!MorphicModel methodsFor: 'accessing' stamp: 'sw 10/23/1999 22:36'!\\\\nmodelOrNil\\\\n\\\\t^ model! !\\\\n\\\\n\\\\n!MorphicModel methodsFor: 'caching' stamp: 'sw 3/6/2001 11:22'!\\\\nreleaseCachedState\\\\n\\\\t\\\\\\\"Release cached state of the receiver\\\\\\\"\\\\n\\\\n\\\\t(model ~~ self and: [model respondsTo: #releaseCachedState]) ifTrue:\\\\n\\\\t\\\\t[model releaseCachedState].\\\\n\\\\tsuper releaseCachedState! !\\\\n\\\\n\\\\n!MorphicModel methodsFor: 'classification' stamp: 'ar 10/5/2000 16:40'!\\\\nisMorphicModel\\\\n\\\\t^true! !\\\\n\\\\n\\\\n!MorphicModel methodsFor: 'compilation'!\\\\naddPartNameLike: className withValue: aMorph\\\\n\\\\t| otherNames i default partName stem |\\\\n\\\\tstem _ className first asLowercase asString , className allButFirst.\\\\n\\\\totherNames _ self class allInstVarNames.\\\\n\\\\ti _ 1.\\\\n\\\\t[otherNames includes: (default _ stem, i printString)]\\\\n\\\\t\\\\twhileTrue: [i _ i + 1].\\\\n\\\\tpartName _ FillInTheBlank\\\\n\\\\t\\\\trequest: 'Please give this part a name'\\\\n\\\\t\\\\tinitialAnswer: default.\\\\n\\\\t(otherNames includes: partName)\\\\n\\\\t\\\\tifTrue: [self inform: 'Sorry, that name is already used'. ^ nil].\\\\n\\\\tself class addInstVarName: partName.\\\\n\\\\tself instVarAt: self class instSize put: aMorph.  \\\\\\\"Assumes added as last field\\\\\\\"\\\\n\\\\t^ partName! !\\\\n\\\\n!MorphicModel methodsFor: 'compilation' stamp: 'tk 4/18/97'!\\\\ncompileAccessForSlot: aSlotName\\\\n\\\\t\\\\\\\"Write the method to get at this inst var.  \\\\\\\"\\\\n\\\\t\\\\\\\"Instead call the right thing to make this happen?\\\\\\\"\\\\n\\\\n\\\\t| s  |\\\\n\\\\ts _ WriteStream on: (String new: 2000).\\\\n\\\\ts nextPutAll: aSlotName; cr; tab; nextPutAll: '^', aSlotName.\\\\n\\\\tself class\\\\n\\\\t\\\\tcompile: s contents\\\\n\\\\t\\\\tclassified: 'public access'\\\\n\\\\t\\\\tnotifying: nil.\\\\n! !\\\\n\\\\n!MorphicModel methodsFor: 'compilation'!\\\\ncompilePropagationMethods\\\\n\\\\t| varName |\\\\n\\\\t(self class organization listAtCategoryNamed: 'private - propagation' asSymbol)\\\\n\\\\t\\\\tdo: [:sel | varName _ sel allButLast.\\\\n\\\\t\\\\t\\\\tmodel class compilePropagationForVarName: varName slotName: slotName]! !\\\\n\\\\n!MorphicModel methodsFor: 'compilation'!\\\\nnameFor: aMorph\\\\n\\\\t\\\\\\\"Return the name of the slot containing the given morph or nil if that morph has not been named.\\\\\\\"\\\\n\\\\n\\\\t| allNames start |\\\\n\\\\tallNames _ self class allInstVarNames.\\\\n\\\\tstart _ MorphicModel allInstVarNames size + 1.\\\\n\\\\tstart to: allNames size do: [:i |\\\\n\\\\t\\\\t(self instVarAt: i) == aMorph ifTrue: [^ allNames at: i]].\\\\n\\\\t^ nil\\\\n! !\\\\n\\\\n!MorphicModel methodsFor: 'compilation'!\\\\npropagate: value as: partStoreSelector\\\\n\\\\tmodel ifNil: [^ self].\\\\n\\\\\\\"\\\\n\\\\tLater we can cache this for more speed as follows...\\\\n\\\\t(partName == cachedPartName and: [slotName == cachedSlotName])\\\\n\\\\t\\\\tifFalse: [cachedPartName _ partName.\\\\n\\\\t\\\\t\\\\t\\\\tcachedSlotName _ slotName.\\\\n\\\\t\\\\t\\\\t\\\\tcachedStoreSelector _ (slotName , partStoreSelector) asSymbol].\\\\n\\\\tmodel perform: cachedStoreSelector with: value].\\\\n\\\\\\\"\\\\n\\\\tmodel perform: (self slotSelectorFor: partStoreSelector) with: value! !\\\\n\\\\n!MorphicModel methodsFor: 'compilation' stamp: 'tk 10/31/97 12:33'!\\\\nremoveAll\\\\n\\\\t\\\\\\\"Clear out all script methods and subpart instance variables in me.  Start over.\\\\\\\"\\\\n\\\\t\\\\\\\"self removeAll\\\\\\\"\\\\n\\\\t\\\\\\\"MorphicModel2 removeAll\\\\\\\"\\\\n\\\\nself class == MorphicModel ifTrue: [^ self].\\\\t\\\\\\\"Must be a subclass!!\\\\\\\"\\\\nself class removeCategory: 'scripts'.\\\\nself class instVarNames do: [:nn | self class removeInstVarName: nn].! !\\\\n\\\\n!MorphicModel methodsFor: 'compilation'!\\\\nslotSelectorFor: selectorBody\\\\n\\\\t| selector |\\\\n\\\\tmodel ifNil: [^ nil].\\\\n\\\\t\\\\\\\"Make up selector from slotname if any\\\\\\\"\\\\n\\\\tselector _ (slotName ifNil: [selectorBody]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifNotNil: [slotName , selectorBody]) asSymbol.\\\\n\\\\t(model canUnderstand: selector) ifFalse:\\\\n\\\\t\\\\t[self halt: 'Compiling a null response for ' , model class name , '>>' , selector].\\\\n\\\\t^ selector! !\\\\n\\\\n!MorphicModel methodsFor: 'compilation'!\\\\nuse: cachedSelector orMakeModelSelectorFor: selectorBody in: selectorBlock\\\\n\\\\t| selector |\\\\n\\\\tmodel ifNil: [^ nil].\\\\n\\\\tcachedSelector ifNil:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"Make up selector from slotname if any\\\\\\\"\\\\n\\\\t\\\\t\\\\tselector _ (slotName ifNil: [selectorBody]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifNotNil: [slotName , selectorBody]) asSymbol.\\\\n\\\\t\\\\t\\\\t(model class canUnderstand: selector) ifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[(self confirm: 'Shall I compile a null response for'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t, Character cr asString\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t, model class name , '>>' , selector)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [self halt].\\\\n\\\\t\\\\t\\\\t\\\\tmodel class compile: (String streamContents:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:s | selector keywords doWithIndex:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:k :i | s nextPutAll: k , ' arg' , i printString].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ts cr; nextPutAll: '\\\\\\\"Automatically generated null response.\\\\\\\"'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ts cr; nextPutAll: '\\\\\\\"Add code below for appropriate behavior...\\\\\\\"'.])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tclassified: 'input events'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnotifying: nil]]\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t[selector _ cachedSelector].\\\\n\\\\t^ selectorBlock value: selector! !\\\\n\\\\n\\\\n!MorphicModel methodsFor: 'debug and other' stamp: '6/7/97 10:43 di'!\\\\ninstallModelIn: aWorld\\\\n\\\\n\\\\tself wantsSlot ifFalse: [^ self].  \\\\\\\"No real need to install\\\\\\\"\\\\n\\\\tslotName _ aWorld model addPartNameLike: self class name withValue: self.\\\\n\\\\tslotName ifNil: [^ self].  \\\\\\\"user chose bad slot name\\\\\\\"\\\\n\\\\tself model: aWorld model slotName: slotName.\\\\n\\\\tself compilePropagationMethods.\\\\n\\\\taWorld model compileAccessForSlot: slotName.\\\\n! !\\\\n\\\\n\\\\n!MorphicModel methodsFor: 'drag and drop' stamp: 'di 6/22/97 23:17'!\\\\nallowSubmorphExtraction\\\\n\\\\t^ self isOpen\\\\n! !\\\\n\\\\n!MorphicModel methodsFor: 'drag and drop' stamp: 'di 6/22/97 23:16'!\\\\nisOpen\\\\n\\\\t\\\\\\\"Support drag/drop and other edits.\\\\\\\"\\\\n\\\\t^ open! !\\\\n\\\\n\\\\n!MorphicModel methodsFor: 'geometry'!\\\\nnewBounds: newBounds\\\\n\\\\tself bounds: newBounds! !\\\\n\\\\n!MorphicModel methodsFor: 'geometry'!\\\\nrecomputeBounds\\\\n\\\\n\\\\t| bnds |\\\\n\\\\tbnds _ submorphs first bounds.\\\\n\\\\tbounds _ bnds origin corner: bnds corner. \\\\\\\"copy it!!\\\\\\\"\\\\n\\\\tfullBounds _ nil.\\\\n\\\\tbounds _ self fullBounds.\\\\n! !\\\\n\\\\n\\\\n!MorphicModel methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:35'!\\\\ndefaultBorderColor\\\\n\\\\t\\\\\\\"answer the default border color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color yellow! !\\\\n\\\\n!MorphicModel methodsFor: 'initialization' stamp: 'dgd 3/7/2003 15:07'!\\\\ndefaultBounds\\\\n\\\\\\\"answer the default bounds for the receiver\\\\\\\"\\\\n\\\\t^ 0 @ 0 corner: 200 @ 100! !\\\\n\\\\n!MorphicModel methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:28'!\\\\ndefaultColor\\\\n\\\\t\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color transparent! !\\\\n\\\\n!MorphicModel methodsFor: 'initialization' stamp: 'tk 4/15/97'!\\\\nduplicate: newGuy from: oldGuy\\\\n\\\\t\\\\\\\"oldGuy has just been duplicated and will stay in this world.  Make sure all the MorphicModel requirements are carried out for the copy.  Ask user to rename it.  \\\\\\\"\\\\n\\\\n\\\\tnewGuy installModelIn: oldGuy world.\\\\n\\\\tnewGuy copySlotMethodsFrom: oldGuy slotName.! !\\\\n\\\\n!MorphicModel methodsFor: 'initialization' stamp: 'dgd 2/14/2003 20:47'!\\\\ninitialize\\\\n\\\\t\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\\\\"\\\\\\\"\\\\n\\\\topen _ false! !\\\\n\\\\n!MorphicModel methodsFor: 'initialization' stamp: 'jm\\\\n 8/20/1998 09:08'!\\\\nmodel: anObject\\\\n\\\\t\\\\\\\"Set my model and make me me a dependent of the given object.\\\\\\\"\\\\n\\\\n\\\\tmodel ifNotNil: [model removeDependent: self].\\\\n\\\\tanObject ifNotNil: [anObject addDependent: self].\\\\n\\\\tmodel _ anObject.\\\\n! !\\\\n\\\\n!MorphicModel methodsFor: 'initialization' stamp: 'di 6/21/97 13:25'!\\\\nmodel: thang slotName: nameOfThisPart\\\\n\\\\tmodel _ thang.\\\\n\\\\tslotName _ nameOfThisPart.\\\\n\\\\topen _ false.! !\\\\n\\\\n\\\\n!MorphicModel methodsFor: 'menu' stamp: 'dgd 8/30/2003 21:53'!\\\\naddCustomMenuItems: aCustomMenu hand: aHandMorph\\\\n\\\\n\\\\tsuper addCustomMenuItems: aCustomMenu hand: aHandMorph.\\\\n\\\\tmodel ifNotNil: [model addModelMenuItemsTo: aCustomMenu forMorph: self hand: aHandMorph].\\\\n\\\\tself isOpen ifTrue: [aCustomMenu add: 'close editing' translated action: #closeToEdits]\\\\n\\\\t\\\\t\\\\tifFalse: [aCustomMenu add: 'open editing' translated action: #openToEdits].\\\\n! !\\\\n\\\\n!MorphicModel methodsFor: 'menu' stamp: 'di 6/20/97 15:36'!\\\\ncloseToEdits\\\\n\\\\t\\\\\\\"Disable this morph's ability to add and remove morphs via drag-n-drop.\\\\\\\"\\\\n\\\\n\\\\topen _ false\\\\n! !\\\\n\\\\n!MorphicModel methodsFor: 'menu' stamp: 'di 6/20/97 15:36'!\\\\nopenToEdits\\\\n\\\\t\\\\\\\"Enable this morph's ability to add and remove morphs via drag-n-drop.\\\\\\\"\\\\n\\\\n\\\\topen _ true\\\\n! !\\\\n\\\\n\\\\n!MorphicModel methodsFor: 'naming' stamp: 'dgd 2/21/2003 23:00'!\\\\nchoosePartName\\\\n\\\\t\\\\\\\"When I am renamed, get a slot, make default methods, move any existing methods.  ** Does not clean up old inst var name or methods**  \\\\\\\"\\\\n\\\\n\\\\t| old |\\\\n\\\\told := slotName.\\\\n\\\\tsuper choosePartName.\\\\n\\\\tslotName ifNil: [^self].\\\\t\\\\\\\"user chose bad slot name\\\\\\\"\\\\n\\\\tself model: self world model slotName: slotName.\\\\n\\\\told isNil\\\\n\\\\t\\\\tifTrue: [self compilePropagationMethods]\\\\n\\\\t\\\\tifFalse: [self copySlotMethodsFrom: old]\\\\n\\\\t\\\\\\\"old ones not erased!!\\\\\\\"! !\\\\n\\\\n\\\\n!MorphicModel methodsFor: 'printing'!\\\\ninitString\\\\n\\\\n\\\\t^ String streamContents:\\\\n\\\\t\\\\t[:s | s nextPutAll: self class name;\\\\n\\\\t\\\\t\\\\tnextPutAll: ' newBounds: (';\\\\n\\\\t\\\\t\\\\tprint: bounds;\\\\n\\\\t\\\\t\\\\tnextPutAll: ') model: self slotName: ';\\\\n\\\\t\\\\t\\\\tprint: slotName]! !\\\\n\\\\n\\\\n!MorphicModel methodsFor: 'submorphs-accessing' stamp: 'dgd 2/22/2003 18:51'!\\\\nallKnownNames\\\\n\\\\t\\\\\\\"Return a list of all known names based on the scope of the receiver.  If the receiver is a member of a uniclass, incorporate the original 1997 logic that queries the known names of the values of all the instance variables.\\\\\\\"\\\\n\\\\n\\\\t| superNames |\\\\n\\\\tsuperNames := super allKnownNames.\\\\t\\\\\\\"gather them from submorph tree\\\\\\\"\\\\n\\\\t^self belongsToUniClass \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[superNames , (self instanceVariableValues \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tselect: [:e | e notNil and: [e knownName notNil]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tthenCollect: [:e | e knownName])]\\\\n\\\\t\\\\tifFalse: [superNames]! !\\\\n\\\\n\\\\n!MorphicModel methodsFor: 'submorphs-add/remove' stamp: 'gm 2/22/2003 12:51'!\\\\ndelete\\\\n\\\\t(model isMorphicModel) ifFalse: [^super delete].\\\\n\\\\tslotName ifNotNil: \\\\n\\\\t\\\\t\\\\t[(PopUpMenu confirm: 'Shall I remove the slot ' , slotName \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t, '\\\\nalong with all associated methods?') \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[(model class selectors select: [:s | s beginsWith: slotName]) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:s | model class removeSelector: s].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(model class instVarNames includes: slotName) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [model class removeInstVarName: slotName]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[(PopUpMenu \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tconfirm: '...but should I at least dismiss this morph?\\\\n[choose no to leave everything unchanged]') \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [^self]]].\\\\n\\\\tsuper delete! !\\\\n\\\\n\\\\n!MorphicModel methodsFor: '*MorphicExtras-compilation'!\\\\ncompileInitMethods\\\\n\\\\t| s nodeDict varNames |\\\\n\\\\tnodeDict _ IdentityDictionary new.\\\\n\\\\ts _ WriteStream on: (String new: 2000).\\\\n\\\\tvarNames _ self class allInstVarNames.\\\\n\\\\ts nextPutAll: 'initMorph'.\\\\n\\\\t3 to: self class instSize do:\\\\n\\\\t\\\\t[:i | (self instVarAt: i) isMorph ifTrue:\\\\n\\\\t\\\\t\\\\t[s cr; tab; nextPutAll: (varNames at: i) , ' _ '.\\\\n\\\\t\\\\t\\\\ts nextPutAll: (self instVarAt: i) initString; nextPutAll: '.'.\\\\n\\\\t\\\\t\\\\tnodeDict at: (self instVarAt: i) put: (varNames at: i)]].\\\\n\\\\tsubmorphs do: \\\\n\\\\t\\\\t[:m | s cr; tab; nextPutAll: 'self addMorph: '.\\\\n\\\\t\\\\tm printConstructorOn: s indent: 1 nodeDict: nodeDict.\\\\n\\\\t\\\\ts nextPutAll: '.'].\\\\n\\\\tself class\\\\n\\\\t\\\\tcompile: s contents\\\\n\\\\t\\\\tclassified: 'initialization'\\\\n\\\\t\\\\tnotifying: nil.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMorphicModel class\\\\n\\\\tinstanceVariableNames: 'prototype'!\\\\n\\\\n!MorphicModel class methodsFor: 'compilation' stamp: 'tk 3/10/98 18:03'!\\\\ncategoryForSubclasses\\\\n\\\\t^ 'Morphic-Models'! !\\\\n\\\\n!MorphicModel class methodsFor: 'compilation' stamp: 'sw 5/23/2001 13:51'!\\\\nchooseNewName\\\\n\\\\t\\\\\\\"Choose a new name for the receiver, persisting until an acceptable name is provided or until the existing name is resubmitted\\\\\\\"\\\\n\\\\n\\\\t| oldName newName |\\\\n\\\\toldName _ self name.\\\\n\\\\t\\\\t[newName _ (FillInTheBlank request: 'Please give this Model a name'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tinitialAnswer: oldName) asSymbol.\\\\n\\\\t\\\\tnewName = oldName ifTrue: [^ self].\\\\n\\\\t\\\\tSmalltalk includesKey: newName]\\\\n\\\\t\\\\twhileTrue:\\\\n\\\\t\\\\t[self inform: 'Sorry, that name is already in use.'].\\\\n\\\\tself rename: newName.! !\\\\n\\\\n!MorphicModel class methodsFor: 'compilation'!\\\\ncompileAccessorsFor: varName\\\\n\\\\tself compile: (\\\\n'&var\\\\n\\\\t\\\\\\\"Return the value of &var\\\\\\\"\\\\n\\\\t^ &var'\\\\n\\\\t\\\\t\\\\tcopyReplaceAll: '&var' with: varName)\\\\n\\\\t\\\\tclassified: 'public access' notifying: nil.\\\\n\\\\tself compile: (\\\\n'&varPut: newValue\\\\n\\\\t\\\\\\\"Assign newValue to &var.\\\\n\\\\tAdd code below to update related graphics appropriately...\\\\\\\"\\\\n\\\\n\\\\t&var _ newValue.'\\\\n\\\\t\\\\t\\\\tcopyReplaceAll: '&var' with: varName)\\\\n\\\\t\\\\tclassified: 'public access' notifying: nil.\\\\n\\\\tself compile: (\\\\n'&var: newValue\\\\n\\\\t\\\\\\\"Assigns newValue to &var and updates owner\\\\\\\"\\\\n\\\\t&var _ newValue.\\\\n\\\\tself propagate: &var as: ''&var:'''\\\\n\\\\t\\\\t\\\\tcopyReplaceAll: '&var' with: varName)\\\\n\\\\t\\\\tclassified: 'private - propagation' notifying: nil.\\\\n! !\\\\n\\\\n!MorphicModel class methodsFor: 'compilation'!\\\\ncompilePropagationForVarName: varName slotName: slotName\\\\n\\\\tself compile: ((\\\\n'&slot&var: newValue\\\\n\\\\t\\\\\\\"The value of &var in &slot has changed to newValue.\\\\n\\\\tThis value can be read elsewhere in code with\\\\n\\\\t\\\\t&slot &var\\\\n\\\\tand it can be stored into with\\\\n\\\\t\\\\t&slot &varPut: someValue\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Add code for appropriate response here...\\\\\\\"'\\\\n\\\\t\\\\t\\\\tcopyReplaceAll: '&var' with: varName)\\\\n\\\\t\\\\t\\\\tcopyReplaceAll: '&slot' with: slotName)\\\\n\\\\t\\\\tclassified: 'input events' notifying: nil.\\\\n! !\\\\n\\\\n\\\\n!MorphicModel class methodsFor: 'compiling' stamp: 'sw 5/13/1998 14:33'!\\\\nacceptsLoggingOfCompilation\\\\n\\\\t\\\\\\\"Dont log sources for my automatically-generated subclasses.  Can easily switch this back when it comes to deal with Versions, etc.\\\\\\\"\\\\n\\\\n\\\\t^ self == MorphicModel or: [(name last isDigit) not]! !\\\\n\\\\n!MorphicModel class methodsFor: 'compiling' stamp: 'sw 8/4/97 17:16'!\\\\nwantsChangeSetLogging\\\\n\\\\t\\\\\\\"Log changes for MorphicModel itself and for things like PlayWithMe2, but not for automatically-created subclasses like MorphicModel1, MorphicModel2, etc.\\\\\\\"\\\\n\\\\n\\\\t^ self == MorphicModel or:\\\\n\\\\t\\\\t[(self class name beginsWith: 'Morphic') not]! !\\\\n\\\\n\\\\n!MorphicModel class methodsFor: 'housekeeping' stamp: 'jm 7/30/97 16:40'!\\\\nremoveUninstantiatedModels\\\\n\\\\t\\\\\\\"With the user's permission, remove the classes of any models that have neither instances nor subclasses.\\\\\\\"\\\\n\\\\t\\\\\\\"MorphicModel removeUninstantiatedModels\\\\\\\"\\\\n\\\\n\\\\t| candidatesForRemoval ok |\\\\n\\\\tSmalltalk garbageCollect.\\\\n\\\\tcandidatesForRemoval _\\\\n\\\\t\\\\tMorphicModel subclasses select: [:c |\\\\n\\\\t\\\\t\\\\t(c instanceCount = 0) and: [c subclasses size = 0]].\\\\n\\\\tcandidatesForRemoval do: [:c |\\\\n\\\\t\\\\tok _ self confirm: 'Are you certain that you\\\\nwant to delete the class ', c name, '?'.\\\\n\\\\t\\\\tok ifTrue: [c removeFromSystem]].\\\\n! !\\\\n\\\\n\\\\n!MorphicModel class methodsFor: 'instance creation' stamp: 'tk 8/13/1998 12:58'!\\\\nnew\\\\n\\\\t\\\\\\\"Return a copy of the prototype, if there is one.\\\\n\\\\tOtherwise create a new instance normally.\\\\\\\"\\\\n\\\\n\\\\tself hasPrototype ifTrue: [^ prototype veryDeepCopy].\\\\n\\\\t^ super new\\\\n! !\\\\n\\\\n!MorphicModel class methodsFor: 'instance creation' stamp: 'di 6/22/97 09:27'!\\\\nnewBounds: bounds model: thang slotName: nameOfThisPart\\\\n\\\\t^ (super new model: thang slotName: nameOfThisPart)\\\\n\\\\t\\\\tnewBounds: bounds! !\\\\n\\\\n\\\\n!MorphicModel class methodsFor: 'new-morph participation' stamp: 'di 2/21/98 11:01'!\\\\nincludeInNewMorphMenu\\\\n\\\\t\\\\\\\"Only include Models that are appropriate\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!MorphicModel class methodsFor: 'prototype access'!\\\\nprototype\\\\n\\\\t\\\\\\\"Return the prototype for this morph.\\\\\\\"\\\\n\\\\n\\\\t^ prototype\\\\n! !\\\\n\\\\n!MorphicModel class methodsFor: 'prototype access' stamp: 'gm 2/22/2003 19:13'!\\\\nprototype: aMorph\\\\n\\\\t\\\\\\\"Store a copy of the given morph as a prototype to be copied to make new instances.\\\\\\\"\\\\n\\\\n\\\\taMorph ifNil: [prototype _ nil. ^ self].\\\\n\\\\n\\\\tprototype _ aMorph veryDeepCopy.\\\\n\\\\t(prototype isMorphicModel) ifTrue: \\\\n\\\\t\\\\t[prototype model: nil slotName: nil].\\\\n! !\\\\n\\\\n\\\\n!MorphicModel class methodsFor: 'queries'!\\\\nhasPrototype\\\\n\\\\t\\\\\\\"Return true if there is a prototype for this morph.\\\\\\\"\\\\n\\\\n\\\\t^ prototype ~~ nil\\\\n! !\\\\n\\\\n\\\\n!MorphicModel class methodsFor: 'subclass creation'!\\\\nnewSubclass\\\\n\\\\t| i className |\\\\n\\\\ti _ 1.\\\\n\\\\t[className _ (self name , i printString) asSymbol.\\\\n\\\\t Smalltalk includesKey: className]\\\\n\\\\t\\\\twhileTrue: [i _ i + 1].\\\\n\\\\n\\\\t^ self subclass: className\\\\n\\\\t\\\\tinstanceVariableNames: ''\\\\n\\\\t\\\\tclassVariableNames: ''\\\\n\\\\t\\\\tpoolDictionaries: ''\\\\n\\\\t\\\\tcategory: 'Morphic-Models'! !\\\\n\\\\n\\\\n!MorphicModel class methodsFor: 'testing' stamp: 'tk 3/15/98 20:13'!\\\\nofficialClass\\\\n\\\\t\\\\\\\"We want to make a new instance of the receiver, which is a subclass of MorphicModel.  Answer who to make a new subclass of.  Also used to tell if a given class is a UniClass, existing only for its single instance.\\\\\\\"\\\\n\\\\n\\\\t^ self name last isDigit ifTrue: [MorphicModel] ifFalse: [self]\\\\n\\\\t\\\\t\\\\\\\"MorphicModel7 can not have subclasses, but Slider and SystemWindow may\\\\\\\"! !\\\\n\\\\n\\\\n!MorphicModel class methodsFor: '*eToys-queries' stamp: 'sw 2/27/2002 14:58'!\\\\nbaseUniclass\\\\n\\\\t\\\\\\\"Answer the uniclass that new instances should be instances of.  This protocol is primarily intended for the Player lineage, but can get sent to a MorphicModel subclass when the project-loading mechanism is scrambling to fix up projects that have naming conflicts with the project being loaded.\\\\\\\"\\\\n\\\\n\\\\t| curr |\\\\n\\\\tcurr _ self.\\\\n\\\\t[curr theNonMetaClass superclass name endsWithDigit]\\\\n\\\\t\\\\twhileTrue:\\\\n\\\\t\\\\t\\\\t[curr _ curr superclass].\\\\n\\\\t^ curr\\\\n\\\\n\\\\\\\"PlayWithMe1 baseUniclass\\\\\\\"! !\\\\nAppRegistry subclass: #MorphicTextEditor\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Applications'!\\\\nToolBuilder subclass: #MorphicToolBuilder\\\\n\\\\tinstanceVariableNames: 'widgets panes parentMenu'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'ToolBuilder-Morphic'!\\\\n!MorphicToolBuilder commentStamp: 'ar 2/11/2005 15:02' prior: 0!\\\\nThe Morphic tool builder.!\\\\n\\\\n\\\\n!MorphicToolBuilder methodsFor: 'opening' stamp: 'ar 6/5/2005 12:40'!\\\\nclose: aWidget\\\\n\\\\t\\\\\\\"Close a previously opened widget\\\\\\\"\\\\n\\\\taWidget delete! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'opening' stamp: 'ar 2/28/2006 17:39'!\\\\nopen: anObject\\\\n\\\\t\\\\\\\"Build and open the object. Answer the widget opened.\\\\\\\"\\\\n\\\\t| morph |\\\\n\\\\tmorph := self build: anObject.\\\\n\\\\t(morph isKindOf: MenuMorph)\\\\n\\\\t\\\\tifTrue:[morph popUpInWorld: World].\\\\n\\\\t(morph isKindOf: SystemWindow)\\\\n\\\\t\\\\tifTrue:[morph openInWorldExtent: morph extent]\\\\n\\\\t\\\\tifFalse:[morph openInWorld].\\\\n\\\\t^morph! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'opening' stamp: 'ar 6/5/2005 12:40'!\\\\nopen: anObject label: aString\\\\n\\\\t\\\\\\\"Build an open the object, labeling it appropriately.  Answer the widget opened.\\\\\\\"\\\\n\\\\t| window |\\\\n\\\\twindow := self open: anObject.\\\\n\\\\twindow setLabel: aString.\\\\n\\\\t^window! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'opening' stamp: 'ar 6/5/2005 12:41'!\\\\nrunModal: aWidget\\\\n\\\\t\\\\\\\"Run the (previously opened) widget modally, e.g., \\\\n\\\\tdo not return control to the sender before the user has responded.\\\\\\\"\\\\n\\\\t[aWidget world notNil] whileTrue: [\\\\n\\\\t\\\\taWidget outermostWorldMorph doOneCycle.\\\\n\\\\t].\\\\n! !\\\\n\\\\n\\\\n!MorphicToolBuilder methodsFor: 'pluggable widgets' stamp: 'ar 2/12/2005 14:22'!\\\\nbuildPluggableActionButton: aSpec\\\\n\\\\t| button |\\\\n\\\\tbutton := self buildPluggableButton: aSpec.\\\\n\\\\tbutton beActionButton.\\\\n\\\\t^button! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'pluggable widgets' stamp: 'ar 7/14/2005 22:27'!\\\\nbuildPluggableButton: aSpec\\\\n\\\\t| widget label state action enabled |\\\\n\\\\tlabel := aSpec label.\\\\n\\\\tstate := aSpec state.\\\\n\\\\taction := aSpec action.\\\\n\\\\twidget := PluggableButtonMorphPlus on: aSpec model\\\\n\\\\t\\\\t\\\\t\\\\tgetState: (state isSymbol ifTrue:[state])\\\\n\\\\t\\\\t\\\\t\\\\taction: nil\\\\n\\\\t\\\\t\\\\t\\\\tlabel: (label isSymbol ifTrue:[label]).\\\\n\\\\tself register: widget id: aSpec name.\\\\n\\\\tenabled := aSpec enabled.\\\\n\\\\tenabled isSymbol\\\\n\\\\t\\\\tifTrue:[widget getEnabledSelector: enabled]\\\\n\\\\t\\\\tifFalse:[widget enabled:enabled].\\\\n\\\\twidget action: action.\\\\n\\\\twidget getColorSelector: aSpec color.\\\\n\\\\twidget offColor: Color transparent.\\\\n\\\\taSpec help ifNotNil:[widget setBalloonText: aSpec help].\\\\n\\\\t(label isSymbol or:[label == nil]) ifFalse:[widget label: label].\\\\n\\\\tself setFrame: aSpec frame in: widget.\\\\n\\\\tparent ifNotNil:[self add: widget to: parent].\\\\n\\\\t^widget! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'pluggable widgets' stamp: 'md 8/15/2005 17:55'!\\\\nbuildPluggableInputField: aSpec\\\\n\\\\t| widget |\\\\n\\\\twidget := self buildPluggableText: aSpec.\\\\n\\\\twidget acceptOnCR: true.\\\\n\\\\twidget hideScrollBarsIndefinitely.\\\\n\\\\t^widget! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'pluggable widgets' stamp: 'ar 7/15/2005 12:07'!\\\\nbuildPluggableList: aSpec\\\\n\\\\t| widget listClass getIndex setIndex |\\\\n\\\\taSpec getSelected ifNil:[\\\\n\\\\t\\\\tlistClass := PluggableListMorphPlus.\\\\n\\\\t\\\\tgetIndex := aSpec getIndex.\\\\n\\\\t\\\\tsetIndex := aSpec setIndex.\\\\n\\\\t] ifNotNil:[\\\\n\\\\t\\\\tlistClass := PluggableListMorphByItemPlus.\\\\n\\\\t\\\\tgetIndex := aSpec getSelected.\\\\n\\\\t\\\\tsetIndex := aSpec setSelected.\\\\n\\\\t].\\\\n\\\\twidget := listClass on: aSpec model\\\\n\\\\t\\\\t\\\\t\\\\tlist: aSpec list\\\\n\\\\t\\\\t\\\\t\\\\tselected: getIndex\\\\n\\\\t\\\\t\\\\t\\\\tchangeSelected: setIndex\\\\n\\\\t\\\\t\\\\t\\\\tmenu: aSpec menu\\\\n\\\\t\\\\t\\\\t\\\\tkeystroke: aSpec keyPress.\\\\n\\\\tself register: widget id: aSpec name.\\\\n\\\\twidget dragItemSelector: aSpec dragItem.\\\\n\\\\twidget dropItemSelector: aSpec dropItem.\\\\n\\\\twidget wantsDropSelector: aSpec dropAccept.\\\\n\\\\twidget autoDeselect: aSpec autoDeselect.\\\\n\\\\tself setFrame: aSpec frame in: widget.\\\\n\\\\tparent ifNotNil:[self add: widget to: parent].\\\\n\\\\tpanes ifNotNil:[\\\\n\\\\t\\\\taSpec list ifNotNil:[panes add: aSpec list].\\\\n\\\\t].\\\\n\\\\t^widget! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'pluggable widgets' stamp: 'ar 7/14/2005 22:27'!\\\\nbuildPluggableMultiSelectionList: aSpec\\\\n\\\\t| widget listClass |\\\\n\\\\taSpec getSelected ifNotNil:[^self error:'There is no PluggableListMorphOfManyByItem'].\\\\n\\\\tlistClass := PluggableListMorphOfMany.\\\\n\\\\twidget := listClass on: aSpec model\\\\n\\\\t\\\\tlist: aSpec list\\\\n\\\\t\\\\tprimarySelection: aSpec getIndex\\\\n\\\\t\\\\tchangePrimarySelection: aSpec setIndex\\\\n\\\\t\\\\tlistSelection: aSpec getSelectionList\\\\n\\\\t\\\\tchangeListSelection: aSpec setSelectionList\\\\n\\\\t\\\\tmenu: aSpec menu.\\\\n\\\\tself register: widget id: aSpec name.\\\\n\\\\twidget keystrokeActionSelector: aSpec keyPress.\\\\n\\\\tself setFrame: aSpec frame in: widget.\\\\n\\\\tparent ifNotNil:[self add: widget to: parent].\\\\n\\\\tpanes ifNotNil:[\\\\n\\\\t\\\\taSpec list ifNotNil:[panes add: aSpec list].\\\\n\\\\t].\\\\n\\\\t^widget! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'pluggable widgets' stamp: 'ar 7/14/2005 22:28'!\\\\nbuildPluggablePanel: aSpec\\\\n\\\\t| widget children |\\\\n\\\\twidget := PluggablePanelMorph new.\\\\n\\\\tself register: widget id: aSpec name.\\\\n\\\\twidget model: aSpec model.\\\\n\\\\twidget color: Color transparent.\\\\n\\\\twidget clipSubmorphs: true.\\\\n\\\\tchildren := aSpec children.\\\\n\\\\tchildren isSymbol ifTrue:[\\\\n\\\\t\\\\twidget getChildrenSelector: children.\\\\n\\\\t\\\\twidget update: children.\\\\n\\\\t\\\\tchildren := #().\\\\n\\\\t].\\\\n\\\\tself buildAll: children in: widget.\\\\n\\\\tself setFrame: aSpec frame in: widget.\\\\n\\\\tparent ifNotNil:[self add: widget to: parent].\\\\n\\\\tself setLayout: aSpec layout in: widget.\\\\n\\\\t^widget! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'pluggable widgets' stamp: 'ar 7/14/2005 22:28'!\\\\nbuildPluggableText: aSpec\\\\n\\\\t| widget |\\\\n\\\\twidget := PluggableTextMorphPlus on: aSpec model\\\\n\\\\t\\\\t\\\\t\\\\ttext: aSpec getText \\\\n\\\\t\\\\t\\\\t\\\\taccept: aSpec setText\\\\n\\\\t\\\\t\\\\t\\\\treadSelection: aSpec selection \\\\n\\\\t\\\\t\\\\t\\\\tmenu: aSpec menu.\\\\n\\\\tself register: widget id: aSpec name.\\\\n\\\\twidget getColorSelector: aSpec color.\\\\n\\\\tself setFrame: aSpec frame in: widget.\\\\n\\\\tparent ifNotNil:[self add: widget to: parent].\\\\n\\\\tpanes ifNotNil:[\\\\n\\\\t\\\\taSpec getText ifNotNil:[panes add: aSpec getText].\\\\n\\\\t].\\\\n\\\\t^widget! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'pluggable widgets' stamp: 'ar 7/15/2005 12:10'!\\\\nbuildPluggableTree: aSpec\\\\n\\\\t| widget |\\\\n\\\\twidget := PluggableTreeMorph new.\\\\n\\\\tself register: widget id: aSpec name.\\\\n\\\\twidget model: aSpec model.\\\\n\\\\twidget getSelectedPathSelector: aSpec getSelectedPath.\\\\n\\\\twidget setSelectedSelector: aSpec setSelected.\\\\n\\\\twidget getChildrenSelector: aSpec getChildren.\\\\n\\\\twidget hasChildrenSelector: aSpec hasChildren.\\\\n\\\\twidget getLabelSelector: aSpec label.\\\\n\\\\twidget getIconSelector: aSpec icon.\\\\n\\\\twidget getHelpSelector: aSpec help.\\\\n\\\\twidget getMenuSelector: aSpec menu.\\\\n\\\\twidget keystrokeActionSelector: aSpec keyPress.\\\\n\\\\twidget getRootsSelector: aSpec roots.\\\\n\\\\twidget autoDeselect: aSpec autoDeselect.\\\\n\\\\twidget dropItemSelector: aSpec dropItem.\\\\n\\\\twidget wantsDropSelector: aSpec dropAccept.\\\\n\\\\tself setFrame: aSpec frame in: widget.\\\\n\\\\tparent ifNotNil:[self add: widget to: parent].\\\\n\\\\tpanes ifNotNil:[\\\\n\\\\t\\\\taSpec roots ifNotNil:[panes add: aSpec roots].\\\\n\\\\t].\\\\n\\\\t^widget! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'pluggable widgets' stamp: 'ar 9/17/2005 21:07'!\\\\nbuildPluggableWindow: aSpec\\\\n\\\\t| widget children label |\\\\n\\\\taSpec layout == #proportional ifFalse:[\\\\n\\\\t\\\\t\\\\\\\"This needs to be implemented - probably by adding a single pane and then the rest\\\\\\\"\\\\n\\\\t\\\\t^self error: 'Not implemented'.\\\\n\\\\t].\\\\n\\\\twidget := PluggableSystemWindow new.\\\\n\\\\tself register: widget id: aSpec name.\\\\n\\\\twidget model: aSpec model.\\\\n\\\\t(label := aSpec label) ifNotNil:[\\\\n\\\\t\\\\tlabel isSymbol \\\\n\\\\t\\\\t\\\\tifTrue:[widget getLabelSelector: label]\\\\n\\\\t\\\\t\\\\tifFalse:[widget setLabel: label]].\\\\n\\\\tchildren := aSpec children.\\\\n\\\\tchildren isSymbol ifTrue:[\\\\n\\\\t\\\\twidget getChildrenSelector: children.\\\\n\\\\t\\\\twidget update: children.\\\\n\\\\t\\\\tchildren := #().\\\\n\\\\t].\\\\n\\\\twidget closeWindowSelector: aSpec closeAction.\\\\n\\\\tpanes := OrderedCollection new.\\\\n\\\\tself buildAll: children in: widget.\\\\n\\\\taSpec extent ifNotNil:[widget extent: aSpec extent].\\\\n\\\\twidget setUpdatablePanesFrom: panes.\\\\n\\\\t^widget! !\\\\n\\\\n\\\\n!MorphicToolBuilder methodsFor: 'private' stamp: 'ar 7/17/2005 00:00'!\\\\nadd: aMorph to: aParent\\\\n\\\\taParent addMorphBack: aMorph.\\\\n\\\\taParent isSystemWindow ifTrue:[\\\\n\\\\t\\\\taParent addPaneMorph: aMorph.\\\\n\\\\t].! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'private' stamp: 'stephaneducasse 2/3/2006 22:35'!\\\\nasFrame: aRectangle\\\\n\\\\t| frame |\\\\n\\\\taRectangle ifNil:[^nil].\\\\n\\\\tframe := LayoutFrame new.\\\\n\\\\tframe \\\\n\\\\t\\\\tleftFraction: aRectangle left; \\\\n\\\\t\\\\trightFraction: aRectangle right; \\\\n\\\\t\\\\ttopFraction: aRectangle top; \\\\n\\\\t\\\\tbottomFraction: aRectangle bottom.\\\\n\\\\t^frame! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'private' stamp: 'ar 7/14/2005 22:28'!\\\\nregister: widget id: id\\\\n\\\\tid ifNil:[^self].\\\\n\\\\twidgets ifNil:[widgets := Dictionary new].\\\\n\\\\twidgets at: id put: widget.! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'private' stamp: 'ar 2/12/2005 19:20'!\\\\nsetFrame: aRectangle in: widget\\\\n\\\\t| frame |\\\\n\\\\taRectangle ifNil:[^nil].\\\\n\\\\tframe := self asFrame: aRectangle.\\\\n\\\\twidget layoutFrame: frame.\\\\n\\\\twidget hResizing: #spaceFill; vResizing: #spaceFill.\\\\n\\\\t(parent isSystemWindow) ifTrue:[\\\\n\\\\t\\\\twidget borderWidth: 2; borderColor: #inset.\\\\n\\\\t].! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'private' stamp: 'ar 2/10/2005 22:28'!\\\\nsetLayout: layout in: widget\\\\n\\\\tlayout == #proportional ifTrue:[\\\\n\\\\t\\\\twidget layoutPolicy: ProportionalLayout new.\\\\n\\\\t\\\\t^self].\\\\n\\\\tlayout == #horizontal ifTrue:[\\\\n\\\\t\\\\twidget layoutPolicy: TableLayout new.\\\\n\\\\t\\\\twidget listDirection: #leftToRight.\\\\n\\\\t\\\\twidget submorphsDo:[:m| m hResizing: #spaceFill; vResizing: #spaceFill].\\\\n\\\\t\\\\t\\\\\\\"and then some...\\\\\\\"\\\\n\\\\t\\\\t^self].\\\\n\\\\tlayout == #vertical ifTrue:[\\\\n\\\\t\\\\twidget layoutPolicy: TableLayout new.\\\\n\\\\t\\\\twidget listDirection: #topToBottom.\\\\n\\\\t\\\\twidget submorphsDo:[:m| m hResizing: #spaceFill; vResizing: #spaceFill].\\\\n\\\\t\\\\t\\\\\\\"and then some...\\\\\\\"\\\\n\\\\t\\\\t^self].\\\\n\\\\t^self error: 'Unknown layout: ', layout.! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'private' stamp: 'ar 7/14/2005 22:30'!\\\\nwidgetAt: id ifAbsent: aBlock\\\\n\\\\twidgets ifNil:[^aBlock value].\\\\n\\\\t^widgets at: id ifAbsent: aBlock! !\\\\n\\\\n\\\\n!MorphicToolBuilder methodsFor: 'building' stamp: 'ar 2/28/2006 17:30'!\\\\nbuildPluggableMenu: menuSpec \\\\n\\\\t| prior menu |\\\\n\\\\tprior := parentMenu.\\\\n\\\\tparentMenu := menu := MenuMorph new.\\\\n\\\\tmenuSpec label ifNotNil:[parentMenu addTitle: menuSpec label].\\\\n\\\\tmenuSpec items do:[:each| each buildWith: self].\\\\n\\\\tparentMenu := prior.\\\\n\\\\t^menu! !\\\\n\\\\n!MorphicToolBuilder methodsFor: 'building' stamp: 'ar 2/28/2006 17:37'!\\\\nbuildPluggableMenuItem: itemSpec\\\\n\\\\t| item action label menu |\\\\n\\\\titem _ MenuItemMorph new.\\\\n\\\\tlabel := itemSpec label.\\\\n\\\\titemSpec checked ifTrue:[label := '<on>', label] ifFalse:[label := '<off>', label].\\\\n\\\\titem contents: label.\\\\n\\\\titem isEnabled: itemSpec enabled.\\\\n\\\\t(action := itemSpec action) ifNotNil:[\\\\n\\\\t\\\\titem \\\\n\\\\t\\\\t\\\\ttarget: action receiver;\\\\n\\\\t\\\\t\\\\tselector: action selector;\\\\n\\\\t\\\\t\\\\targuments: action arguments.\\\\n\\\\t].\\\\n\\\\t(menu := itemSpec subMenu) ifNotNil:[\\\\n\\\\t\\\\titem subMenu: (menu buildWith: self).\\\\n\\\\t].\\\\n\\\\tparentMenu ifNotNil:[parentMenu addMorphBack: item].\\\\n\\\\t^item! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMorphicToolBuilder class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MorphicToolBuilder class methodsFor: 'accessing' stamp: 'ar 2/11/2005 15:24'!\\\\nisActiveBuilder\\\\n\\\\t\\\\\\\"Answer whether I am the currently active builder\\\\\\\"\\\\n\\\\t^Smalltalk isMorphic! !\\\\nToolBuilderTests subclass: #MorphicToolBuilderTests\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'ToolBuilder-Morphic'!\\\\n!MorphicToolBuilderTests commentStamp: 'ar 2/11/2005 15:02' prior: 0!\\\\nTests for the Morphic tool builder.!\\\\n\\\\n\\\\n!MorphicToolBuilderTests methodsFor: 'support' stamp: 'ar 2/11/2005 19:26'!\\\\nacceptWidgetText\\\\n\\\\twidget hasUnacceptedEdits: true.\\\\n\\\\twidget accept.! !\\\\n\\\\n!MorphicToolBuilderTests methodsFor: 'support' stamp: 'ar 6/21/2005 10:35'!\\\\nbuttonWidgetEnabled\\\\n\\\\t\\\\\\\"Answer whether the current widget (a button) is currently enabled\\\\\\\"\\\\n\\\\t^widget enabled! !\\\\n\\\\n!MorphicToolBuilderTests methodsFor: 'support' stamp: 'ar 2/11/2005 19:22'!\\\\nchangeListWidget\\\\n\\\\twidget changeModelSelection: widget getCurrentSelectionIndex + 1.! !\\\\n\\\\n!MorphicToolBuilderTests methodsFor: 'support' stamp: 'ar 2/11/2005 19:15'!\\\\nfireButtonWidget\\\\n\\\\twidget performAction.! !\\\\n\\\\n!MorphicToolBuilderTests methodsFor: 'support' stamp: 'cwp 6/9/2005 00:11'!\\\\nfireMenuItemWidget\\\\n\\\\t(widget itemWithWording: 'Menu Item')\\\\n\\\\t\\\\tifNotNilDo: [:item | item doButtonAction]! !\\\\n\\\\n!MorphicToolBuilderTests methodsFor: 'support' stamp: 'ar 2/11/2005 14:46'!\\\\nsetUp\\\\n\\\\tsuper setUp.\\\\n\\\\tbuilder := MorphicToolBuilder new.! !\\\\n\\\\n!MorphicToolBuilderTests methodsFor: 'support' stamp: 'ar 2/11/2005 21:43'!\\\\nwidgetColor\\\\n\\\\t\\\\\\\"Answer color from widget\\\\\\\"\\\\n\\\\t^widget color! !\\\\n\\\\n\\\\n!MorphicToolBuilderTests methodsFor: 'tests-window' stamp: 'ar 2/13/2005 13:52'!\\\\ntestWindowDynamicLabel\\\\n\\\\tself makeWindow.\\\\n\\\\tself assert: (widget label = 'TestLabel').! !\\\\n\\\\n!MorphicToolBuilderTests methodsFor: 'tests-window' stamp: 'ar 2/13/2005 13:52'!\\\\ntestWindowStaticLabel\\\\n\\\\t| spec |\\\\n\\\\tspec := builder pluggableWindowSpec new.\\\\n\\\\tspec model: self.\\\\n\\\\tspec children: #().\\\\n\\\\tspec label: 'TestLabel'.\\\\n\\\\twidget := builder build: spec.\\\\n\\\\tself assert: (widget label = 'TestLabel').! !\\\\nDisplayTransform subclass: #MorphicTransform\\\\n\\\\tinstanceVariableNames: 'offset angle scale'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Graphics-Transformations'!\\\\n!MorphicTransform commentStamp: '<historical>' prior: 0!\\\\nThis class implements simple translation, scaling and rotation for points, as well as inverse transformations.  These transformations are used in TransformMorphs (clipping scrollers) and TransformationMorphs (general flex-morph wrappers) to map, eg, global mouse coords into local coords, and to invert, eg, local damage rectangles into global damage rectangles.!\\\\n\\\\n\\\\n!MorphicTransform methodsFor: 'accessing'!\\\\nangle\\\\n\\\\t^ angle! !\\\\n\\\\n!MorphicTransform methodsFor: 'accessing' stamp: 'ar 11/9/1998 14:33'!\\\\ninverseTransformation\\\\n\\\\t\\\\\\\"Return the inverse transformation of the receiver\\\\\\\"\\\\n\\\\t^MorphicTransform\\\\n\\\\t\\\\toffset: (self transform: 0@0) - (self transform: offset)\\\\n\\\\t\\\\tangle: angle negated\\\\n\\\\t\\\\tscale: scale reciprocal! !\\\\n\\\\n!MorphicTransform methodsFor: 'accessing'!\\\\noffset\\\\n\\\\t^ offset\\\\n! !\\\\n\\\\n!MorphicTransform methodsFor: 'accessing'!\\\\nscale\\\\n\\\\t^ scale! !\\\\n\\\\n!MorphicTransform methodsFor: 'accessing'!\\\\nwithAngle: a\\\\n\\\\t\\\\\\\"Return a copy of me with a different Angle\\\\\\\"\\\\n\\\\t^ self copy setAngle: a! !\\\\n\\\\n!MorphicTransform methodsFor: 'accessing'!\\\\nwithOffset: a\\\\n\\\\t\\\\\\\"Return a copy of me with a different Offset\\\\\\\"\\\\n\\\\t^ self copy setOffset: a! !\\\\n\\\\n!MorphicTransform methodsFor: 'accessing'!\\\\nwithScale: a\\\\n\\\\t\\\\\\\"Return a copy of me with a different Scale\\\\\\\"\\\\n\\\\t^ self copy setScale: a! !\\\\n\\\\n\\\\n!MorphicTransform methodsFor: 'composing' stamp: 'nk 3/9/2001 13:55'!\\\\ncomposedWithLocal: aTransform\\\\n\\\\taTransform isIdentity ifTrue:[^self].\\\\n\\\\tself isIdentity ifTrue:[^aTransform].\\\\n\\\\taTransform isMorphicTransform ifFalse:[^super composedWithLocal: aTransform].\\\\n\\\\tself isPureTranslation ifTrue:[\\\\n\\\\t\\\\t^aTransform withOffset: aTransform offset + self offset].\\\\n\\\\taTransform isPureTranslation ifTrue:[\\\\n\\\\t\\\\t^self withOffset: (self localPointToGlobal: aTransform offset negated) negated].\\\\n\\\\t^super composedWithLocal: aTransform.! !\\\\n\\\\n\\\\n!MorphicTransform methodsFor: 'converting' stamp: 'ar 11/2/1998 20:14'!\\\\nasMatrixTransform2x3\\\\n\\\\t^((MatrixTransform2x3 withRotation: angle radiansToDegrees negated) composedWithLocal:\\\\n\\\\t\\\\t(MatrixTransform2x3 withScale: scale))\\\\n\\\\t\\\\t\\\\toffset: offset negated! !\\\\n\\\\n!MorphicTransform methodsFor: 'converting' stamp: 'di 10/26/1999 17:03'!\\\\nasMorphicTransform\\\\n\\\\n\\\\t^ self! !\\\\n\\\\n\\\\n!MorphicTransform methodsFor: 'initialize' stamp: 'ar 11/2/1998 20:58'!\\\\nsetIdentiy\\\\n\\\\tscale _ 1.0.\\\\n\\\\toffset _ 0@0.\\\\n\\\\tangle _ 0.0.! !\\\\n\\\\n\\\\n!MorphicTransform methodsFor: 'printing' stamp: 'ar 5/19/1999 18:21'!\\\\nprintOn: aStream\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream nextPut:$(;\\\\n\\\\t\\\\tnextPutAll:'angle = '; print: angle;\\\\n\\\\t\\\\tnextPutAll:'; scale = '; print: scale;\\\\n\\\\t\\\\tnextPutAll:'; offset = '; print: offset;\\\\n\\\\t\\\\tnextPut:$).! !\\\\n\\\\n\\\\n!MorphicTransform methodsFor: 'testing' stamp: 'ar 11/2/1998 20:57'!\\\\nisIdentity\\\\n\\\\t\\\\\\\"Return true if the receiver is the identity transform; that is, if applying to a point returns the point itself.\\\\\\\"\\\\n\\\\n\\\\t^ self isPureTranslation and: [offset = (0@0)]\\\\n! !\\\\n\\\\n!MorphicTransform methodsFor: 'testing' stamp: 'ar 11/2/1998 19:51'!\\\\nisMorphicTransform\\\\n\\\\t^true! !\\\\n\\\\n!MorphicTransform methodsFor: 'testing' stamp: 'ar 11/2/1998 20:57'!\\\\nisPureTranslation\\\\n\\\\t\\\\\\\"Return true if the receiver specifies no rotation or scaling.\\\\\\\"\\\\n\\\\n\\\\t^ angle = 0.0 and: [scale = 1.0]\\\\n! !\\\\n\\\\n\\\\n!MorphicTransform methodsFor: 'transformations' stamp: 'di 3/4/98 19:10'!\\\\ncomposedWith: aTransform\\\\n\\\\t\\\\\\\"Return a new transform that has the effect of transforming points first by the receiver and then by the argument.\\\\\\\"\\\\n\\\\n\\\\tself isIdentity ifTrue: [^ aTransform].\\\\n\\\\taTransform isIdentity ifTrue: [^ self].\\\\n\\\\t^ CompositeTransform new globalTransform: self\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tlocalTransform: aTransform! !\\\\n\\\\n!MorphicTransform methodsFor: 'transformations' stamp: 'di 10/28/1999 09:10'!\\\\ninvert: aPoint\\\\n\\\\t\\\\\\\"Transform the given point from local to global coordinates.\\\\\\\"\\\\n\\\\t| p3 p2 |\\\\n\\\\tself isPureTranslation ifTrue: [^ aPoint - offset].\\\\n\\\\tp3 _  aPoint * scale.\\\\n\\\\tp2 _ ((p3 x * angle cos) + (p3 y * angle sin))\\\\n\\\\t\\\\t@ ((p3 y * angle cos) - (p3 x * angle sin)).\\\\n\\\\t^ (p2 - offset)\\\\n! !\\\\n\\\\n!MorphicTransform methodsFor: 'transformations' stamp: 'di 10/3/1998 00:18'!\\\\ninvertBoundsRect: aRectangle\\\\n\\\\t\\\\\\\"Return a rectangle whose coordinates have been transformed\\\\n\\\\tfrom local back to global coordinates.  NOTE: if the transformation\\\\n\\\\tis not just a translation, then it will compute the bounding box\\\\n\\\\tin global coordinates.\\\\\\\"\\\\n\\\\t| outerRect |\\\\n\\\\tself isPureTranslation\\\\n\\\\tifTrue:\\\\n\\\\t\\\\t[^ (self invert: aRectangle topLeft)\\\\n\\\\t\\\\t\\\\tcorner: (self invert: aRectangle bottomRight)]\\\\n\\\\tifFalse:\\\\n\\\\t\\\\t[outerRect _ Rectangle encompassing:\\\\n\\\\t\\\\t\\\\t(aRectangle innerCorners collect: [:p | self invert: p]).\\\\n\\\\t\\\\t\\\\\\\"Following asymmetry due to likely subsequent truncation\\\\\\\"\\\\n\\\\t\\\\t^ outerRect topLeft - (1@1) corner: outerRect bottomRight + (2@2)]! !\\\\n\\\\n!MorphicTransform methodsFor: 'transformations' stamp: 'di 10/2/1998 08:54'!\\\\ninvertRect: aRectangle\\\\n\\\\n\\\\tself error: 'method name changed to emphasize enclosing bounds'.\\\\n\\\\t^ self invertBoundsRect: aRectangle! !\\\\n\\\\n!MorphicTransform methodsFor: 'transformations' stamp: 'di 10/28/1999 09:05'!\\\\ntransform: aPoint\\\\n\\\\t\\\\\\\"Transform the given point from global to local coordinates.\\\\\\\"\\\\n\\\\t| p2 p3 |\\\\n\\\\tself isPureTranslation ifTrue: [^ aPoint + offset].\\\\n\\\\tp2 _ aPoint + offset.\\\\n\\\\tp3 _ (((p2 x * angle cos) - (p2 y * angle sin))\\\\n\\\\t\\\\t@ ((p2 y * angle cos) + (p2 x * angle sin)))\\\\n\\\\t\\\\t\\\\t/ scale.\\\\n\\\\t^ p3! !\\\\n\\\\n!MorphicTransform methodsFor: 'transformations' stamp: 'di 10/3/1998 00:18'!\\\\ntransformBoundsRect: aRectangle\\\\n\\\\t\\\\\\\"Return a rectangle whose coordinates have been transformed\\\\n\\\\tfrom global to local coordinates.  NOTE: if the transformation\\\\n\\\\tis not just a translation, then it will compute the bounding box\\\\n\\\\tin global coordinates.\\\\\\\"\\\\n\\\\t| outerRect |\\\\n\\\\tself isPureTranslation\\\\n\\\\tifTrue:\\\\n\\\\t\\\\t[^ (self transform: aRectangle topLeft)\\\\n\\\\t\\\\t\\\\tcorner: (self transform: aRectangle bottomRight)]\\\\n\\\\tifFalse:\\\\n\\\\t\\\\t[outerRect _ Rectangle encompassing:\\\\n\\\\t\\\\t\\\\t(aRectangle innerCorners collect: [:p | self transform: p]).\\\\n\\\\t\\\\t\\\\\\\"Following asymmetry due to likely subsequent truncation\\\\\\\"\\\\n\\\\t\\\\t^ outerRect topLeft - (1@1) corner: outerRect bottomRight + (2@2)]! !\\\\n\\\\n\\\\n!MorphicTransform methodsFor: 'transforming points' stamp: 'ar 11/2/1998 16:13'!\\\\nglobalPointToLocal: aPoint\\\\n\\\\t\\\\\\\"Transform aPoint from global coordinates into local coordinates\\\\\\\"\\\\n\\\\t^self transform: aPoint! !\\\\n\\\\n!MorphicTransform methodsFor: 'transforming points' stamp: 'ar 11/2/1998 16:32'!\\\\nlocalPointToGlobal: aPoint\\\\n\\\\t\\\\\\\"Transform aPoint from global coordinates into local coordinates\\\\\\\"\\\\n\\\\t^self invert: aPoint! !\\\\n\\\\n\\\\n!MorphicTransform methodsFor: '*nebraska-*nebraska-Morphic-Remote' stamp: 'ls 10/9/1999 19:06'!\\\\nencodeForRemoteCanvas\\\\n\\\\t\\\\\\\"encode this transform into a string for use by a RemoteCanvas\\\\\\\"\\\\n\\\\t^String streamContents: [ :str |\\\\n\\\\t\\\\tstr nextPutAll: 'Morphic,';\\\\n\\\\t\\\\t\\\\tprint: offset x truncated;\\\\n\\\\t\\\\t\\\\tnextPut: $,;\\\\n\\\\t\\\\t\\\\tprint: offset y truncated;\\\\n\\\\t\\\\t\\\\tnextPut: $,;\\\\n\\\\t\\\\t\\\\tprint: scale;\\\\n\\\\t\\\\t\\\\tnextPut: $,;\\\\n\\\\t\\\\t\\\\tprint: angle\\\\n\\\\t]! !\\\\n\\\\n\\\\n!MorphicTransform methodsFor: 'private'!\\\\nsetAngle: aFloat\\\\n\\\\n\\\\tangle _ aFloat.\\\\n! !\\\\n\\\\n!MorphicTransform methodsFor: 'private'!\\\\nsetOffset: aPoint\\\\n\\\\n\\\\toffset _ aPoint.\\\\n! !\\\\n\\\\n!MorphicTransform methodsFor: 'private'!\\\\nsetOffset: aPoint angle: a scale: s\\\\n\\\\n\\\\toffset _ aPoint.\\\\n\\\\tangle _ a.\\\\n\\\\tscale _ s! !\\\\n\\\\n!MorphicTransform methodsFor: 'private'!\\\\nsetScale: aFloat\\\\n\\\\n\\\\tscale _ aFloat.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMorphicTransform class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MorphicTransform class methodsFor: 'instance creation'!\\\\nidentity\\\\n\\\\n\\\\t^ self offset: 0@0 angle: 0.0 scale: 1.0! !\\\\n\\\\n!MorphicTransform class methodsFor: 'instance creation'!\\\\nnew\\\\n\\\\n\\\\t^ self offset: 0@0\\\\n! !\\\\n\\\\n!MorphicTransform class methodsFor: 'instance creation'!\\\\noffset: aPoint\\\\n\\\\n\\\\t^ self offset: aPoint angle: 0.0 scale: 1.0! !\\\\n\\\\n!MorphicTransform class methodsFor: 'instance creation'!\\\\noffset: aPoint angle: a scale: s\\\\n\\\\n\\\\t^ self basicNew setOffset: aPoint angle: a scale: s! !\\\\n\\\\n\\\\n!MorphicTransform class methodsFor: '*nebraska-instance creation' stamp: 'sd 11/20/2005 21:25'!\\\\nfromRemoteCanvasEncoding: encoded\\\\n\\\\t\\\\\\\"DisplayTransform fromRemoteCanvasEncoding:  'Morphic,-88,-128,1.345165663873898,0.1352584843149221'\\\\\\\"\\\\n\\\\t| type offsetXEnc offsetYEnc scaleEnc angleEnc offsetX offsetY angle scale rs |\\\\n\\\\n\\\\t\\\\\\\"separate the numbers\\\\\\\"\\\\n\\\\trs := ReadStream on: encoded.\\\\n\\\\ttype := rs upTo: $,.\\\\n\\\\toffsetXEnc := rs upTo: $,.\\\\n\\\\toffsetYEnc := rs upTo: $,.\\\\n\\\\tscaleEnc := rs upTo: $,.\\\\n\\\\tangleEnc := rs upToEnd.\\\\n\\\\n\\\\t\\\\\\\"decode the numbers\\\\\\\"\\\\n\\\\toffsetX := Integer readFromString: offsetXEnc.\\\\n\\\\toffsetY := Integer readFromString: offsetYEnc.\\\\n\\\\n\\\\tscale := Number readFromString: scaleEnc.\\\\n\\\\tangle := Number readFromString: angleEnc.\\\\n\\\\n\\\\t\\\\\\\"create an instance\\\\\\\"\\\\n\\\\t^self offset: offsetX@offsetY angle: angle scale: scale! !\\\\nUIManager subclass: #MorphicUIManager\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'ToolBuilder-Morphic'!\\\\n!MorphicUIManager commentStamp: 'ar 2/11/2005 21:52' prior: 0!\\\\nThe Morphic ui manager.!\\\\n\\\\n\\\\n!MorphicUIManager methodsFor: 'ui requests' stamp: 'ar 7/16/2005 19:37'!\\\\nchooseDirectory: label from: dir\\\\n\\\\t\\\\\\\"Let the user choose a directory\\\\\\\"\\\\n\\\\t^FileList2 modalFolderSelector: dir! !\\\\n\\\\n!MorphicUIManager methodsFor: 'ui requests' stamp: 'ar 7/17/2005 00:28'!\\\\nchooseFileMatching: patterns label: aString\\\\n\\\\t\\\\\\\"Let the user choose a file matching the given patterns\\\\\\\"\\\\n\\\\t| result |\\\\n\\\\tresult := FileList2 modalFileSelectorForSuffixes: patterns.\\\\n\\\\t^result ifNotNil:[result fullName]! !\\\\n\\\\n!MorphicUIManager methodsFor: 'ui requests' stamp: 'ar 12/27/2004 10:47'!\\\\nchooseFrom: aList lines: linesArray title: aString\\\\n\\\\t\\\\\\\"Choose an item from the given list. Answer the index of the selected item.\\\\\\\"\\\\n\\\\t| menu |\\\\n\\\\tmenu := PopUpMenu labelArray: aList lines: linesArray.\\\\n\\\\t^aString isEmpty ifTrue:[menu startUp] ifFalse:[menu startUpWithCaption: aString]! !\\\\n\\\\n!MorphicUIManager methodsFor: 'ui requests' stamp: 'ar 7/15/2005 23:44'!\\\\nchooseFrom: labelList values: valueList lines: linesArray title: aString\\\\n\\\\t\\\\\\\"Choose an item from the given list. Answer the selected item.\\\\\\\"\\\\n\\\\t| menu |\\\\n\\\\tmenu := SelectionMenu labels: labelList lines: linesArray selections: valueList.\\\\n\\\\t^aString isEmpty ifTrue:[menu startUp] ifFalse:[menu startUpWithCaption: aString]! !\\\\n\\\\n!MorphicUIManager methodsFor: 'ui requests' stamp: 'ar 12/27/2004 08:45'!\\\\nconfirm: queryString\\\\n\\\\t\\\\\\\"Put up a yes/no menu with caption queryString. Answer true if the \\\\n\\\\tresponse is yes, false if no. This is a modal question--the user must \\\\n\\\\trespond yes or no.\\\\\\\"\\\\n\\\\t^PopUpMenu confirm: queryString! !\\\\n\\\\n!MorphicUIManager methodsFor: 'ui requests' stamp: 'ar 12/27/2004 09:49'!\\\\nconfirm: aString orCancel: cancelBlock\\\\n\\\\t\\\\\\\"Put up a yes/no/cancel menu with caption aString. Answer true if  \\\\n\\\\tthe response is yes, false if no. If cancel is chosen, evaluate  \\\\n\\\\tcancelBlock. This is a modal question--the user must respond yes or no.\\\\\\\"\\\\n\\\\t^PopUpMenu confirm: aString orCancel: cancelBlock! !\\\\n\\\\n!MorphicUIManager methodsFor: 'ui requests' stamp: 'ar 2/28/2005 17:13'!\\\\ndisplayProgress: titleString at: aPoint from: minVal to: maxVal during: workBlock\\\\n\\\\t\\\\\\\"Display titleString as a caption over a progress bar while workBlock is evaluated.\\\\\\\"\\\\n\\\\t^ProgressInitiationException \\\\n\\\\t\\\\tdisplay: titleString\\\\n\\\\t\\\\tat: aPoint \\\\n\\\\t\\\\tfrom: minVal \\\\n\\\\t\\\\tto: maxVal \\\\n\\\\t\\\\tduring: workBlock! !\\\\n\\\\n!MorphicUIManager methodsFor: 'ui requests' stamp: 'ar 7/17/2005 00:27'!\\\\nedit: aText label: labelString accept: anAction\\\\n\\\\t\\\\\\\"Open an editor on the given string/text\\\\\\\"\\\\n\\\\t| window holder text |\\\\n\\\\tholder := StringHolder new.\\\\n\\\\tholder contents: aText.\\\\n\\\\ttext := PluggableTextMorphPlus \\\\n\\\\t\\\\ton: holder \\\\n\\\\t\\\\ttext: #contents \\\\n\\\\t\\\\taccept: #acceptContents: \\\\n\\\\t\\\\treadSelection: nil \\\\n\\\\t\\\\tmenu: nil.\\\\n\\\\ttext acceptAction: anAction.\\\\n\\\\twindow := SystemWindow new.\\\\n\\\\tlabelString ifNotNil:[window setLabel: labelString].\\\\n\\\\twindow addMorph: text frame: (0@0 extent: 1@1).\\\\n\\\\twindow paneColor: Color gray.\\\\n\\\\twindow openInWorld.\\\\n! !\\\\n\\\\n!MorphicUIManager methodsFor: 'ui requests' stamp: 'ar 2/28/2005 17:07'!\\\\ninformUserDuring: aBlock\\\\n\\\\t\\\\\\\"Display a message above (or below if insufficient room) the cursor \\\\n\\\\tduring execution of the given block.\\\\n\\\\t\\\\tUIManager default informUserDuring:[:bar|\\\\n\\\\t\\\\t\\\\t#(one two three) do:[:info|\\\\n\\\\t\\\\t\\\\t\\\\tbar value: info.\\\\n\\\\t\\\\t\\\\t\\\\t(Delay forSeconds: 1) wait]]\\\\\\\"\\\\n\\\\t(MVCMenuMorph from: (SelectionMenu labels: '') title: '\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t')\\\\n\\\\t\\\\tinformUserAt: Sensor cursorPoint during: aBlock.! !\\\\n\\\\n!MorphicUIManager methodsFor: 'ui requests' stamp: 'ar 12/27/2004 08:46'!\\\\ninform: aString\\\\n\\\\t\\\\\\\"Display a message for the user to read and then dismiss\\\\\\\"\\\\n\\\\t^PopUpMenu inform: aString! !\\\\n\\\\n!MorphicUIManager methodsFor: 'ui requests' stamp: 'ar 2/28/2005 17:05'!\\\\nmultiLineRequest: queryString centerAt: aPoint initialAnswer: defaultAnswer answerHeight: answerHeight\\\\n\\\\t\\\\\\\"Create a multi-line instance of me whose question is queryString with\\\\n\\\\tthe given initial answer. Invoke it centered at the given point, and\\\\n\\\\tanswer the string the user accepts.  Answer nil if the user cancels.  An\\\\n\\\\tempty string returned means that the ussr cleared the editing area and\\\\n\\\\tthen hit 'accept'.  Because multiple lines are invited, we ask that the user\\\\n\\\\tuse the ENTER key, or (in morphic anyway) hit the 'accept' button, to \\\\n\\\\tsubmit; that way, the return key can be typed to move to the next line.\\\\\\\"\\\\n\\\\t^FillInTheBlank multiLineRequest: queryString centerAt: aPoint initialAnswer: defaultAnswer answerHeight: answerHeight! !\\\\n\\\\n!MorphicUIManager methodsFor: 'ui requests' stamp: 'ar 12/27/2004 08:47'!\\\\nrequestPassword: queryString\\\\n\\\\t\\\\\\\"Create an instance of me whose question is queryString. Invoke it centered\\\\n\\\\tat the cursor, and answer the string the user accepts. Answer the empty \\\\n\\\\tstring if the user cancels.\\\\\\\"\\\\n\\\\t^FillInTheBlank requestPassword: queryString! !\\\\n\\\\n!MorphicUIManager methodsFor: 'ui requests' stamp: 'ar 12/27/2004 08:46'!\\\\nrequest: queryString initialAnswer: defaultAnswer \\\\n\\\\t\\\\\\\"Create an instance of me whose question is queryString with the given \\\\n\\\\tinitial answer. Invoke it centered at the given point, and answer the \\\\n\\\\tstring the user accepts. Answer the empty string if the user cancels.\\\\\\\"\\\\n\\\\t^FillInTheBlank request: queryString initialAnswer: defaultAnswer ! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMorphicUIManager class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MorphicUIManager class methodsFor: 'accessing' stamp: 'ar 2/11/2005 15:41'!\\\\nisActiveManager\\\\n\\\\t\\\\\\\"Answer whether I should act as the active ui manager\\\\\\\"\\\\n\\\\t^Smalltalk isMorphic! !\\\\nMorphicEvent subclass: #MorphicUnknownEvent\\\\n\\\\tinstanceVariableNames: 'type argument'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: 'EventSensorConstants'\\\\n\\\\tcategory: 'Morphic-Events'!\\\\n\\\\n!MorphicUnknownEvent methodsFor: 'accessing' stamp: 'ar 10/25/2000 20:04'!\\\\nargument\\\\n\\\\t^argument! !\\\\n\\\\n!MorphicUnknownEvent methodsFor: 'accessing' stamp: 'ar 10/25/2000 20:04'!\\\\nargument: arg\\\\n\\\\targument _ arg! !\\\\n\\\\n!MorphicUnknownEvent methodsFor: 'accessing' stamp: 'ar 10/25/2000 19:55'!\\\\nposition\\\\n\\\\t^0@0! !\\\\n\\\\n!MorphicUnknownEvent methodsFor: 'accessing' stamp: 'ar 10/25/2000 19:55'!\\\\ntype\\\\n\\\\t^type! !\\\\n\\\\n\\\\n!MorphicUnknownEvent methodsFor: 'initialize' stamp: 'ar 10/26/2000 01:20'!\\\\ntype: eventType readFrom: aStream\\\\n\\\\t| typeAndArg |\\\\n\\\\ttimeStamp _ Integer readFrom: aStream.\\\\n\\\\taStream skip: 1.\\\\n\\\\ttypeAndArg _ Object readFrom: aStream.\\\\n\\\\ttype _ typeAndArg first.\\\\n\\\\targument _ typeAndArg last.! !\\\\n\\\\n\\\\n!MorphicUnknownEvent methodsFor: 'objects from disk' stamp: 'RAA 12/20/2000 17:48'!\\\\nconvertToCurrentVersion: varDict refStream: smartRefStrm\\\\n\\\\t\\\\n\\\\ttype ifNil: [type _ #startSound].\\\\n\\\\tsource ifNil: [source _ varDict at: 'sourceHand'].\\\\n\\\\targument ifNil: [argument _ varDict at: 'sound' ifAbsent: [nil]].\\\\t\\\\\\\"???\\\\\\\"\\\\n\\\\t^super convertToCurrentVersion: varDict refStream: smartRefStrm.\\\\n\\\\n! !\\\\n\\\\n\\\\n!MorphicUnknownEvent methodsFor: 'printing' stamp: 'ar 10/26/2000 01:19'!\\\\nstoreOn: aStream\\\\n\\\\taStream nextPutAll: 'unknown'.\\\\n\\\\taStream space.\\\\n\\\\tself timeStamp storeOn: aStream.\\\\n\\\\taStream space.\\\\n\\\\t{type. argument} storeOn: aStream.! !\\\\n\\\\n\\\\n!MorphicUnknownEvent methodsFor: 'private' stamp: 'ar 10/25/2000 19:59'!\\\\nsetType: evtType argument: arg\\\\n\\\\ttype _ evtType.\\\\n\\\\targument _ arg.! !\\\\n\\\\n!MorphicUnknownEvent methodsFor: 'private' stamp: 'ar 10/25/2000 19:58'!\\\\nsetType: evtType argument: arg hand: evtHand stamp: stamp\\\\n\\\\ttype _ evtType.\\\\n\\\\targument _ arg.\\\\n\\\\tsource _ evtHand.\\\\n\\\\ttimeStamp _ stamp.! !\\\\nMorph subclass: #MouseActionIndicatorMorph\\\\n\\\\tinstanceVariableNames: 'siblings'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-Widgets'!\\\\n!MouseActionIndicatorMorph commentStamp: '<historical>' prior: 0!\\\\nI am used to highlight morphs which have a special mouseup action!\\\\n\\\\n\\\\n!MouseActionIndicatorMorph methodsFor: 'as yet unclassified' stamp: 'RAA 7/12/2000 10:49'!\\\\ndeleteWithSiblings\\\\n\\\\n\\\\tsiblings do: [ :each | each delete]\\\\n! !\\\\n\\\\n!MouseActionIndicatorMorph methodsFor: 'as yet unclassified' stamp: 'RAA 7/12/2000 10:49'!\\\\nsiblings: aCollection\\\\n\\\\n\\\\tsiblings _ aCollection.\\\\n! !\\\\n\\\\n\\\\n!MouseActionIndicatorMorph methodsFor: 'event handling' stamp: 'RAA 7/12/2000 10:48'!\\\\nhandlesMouseOver: evt\\\\n\\\\n\\\\t^true! !\\\\n\\\\n!MouseActionIndicatorMorph methodsFor: 'event handling' stamp: 'RAA 7/17/2000 09:52'!\\\\nhandlesMouseOverDragging: evt\\\\n\\\\n\\\\t^true! !\\\\n\\\\n!MouseActionIndicatorMorph methodsFor: 'event handling' stamp: 'RAA 7/12/2000 10:50'!\\\\nmouseEnter: evt\\\\n\\\\n\\\\tself deleteWithSiblings\\\\n! !\\\\n\\\\n!MouseActionIndicatorMorph methodsFor: 'event handling' stamp: 'RAA 7/17/2000 09:52'!\\\\nmouseEnterDragging: evt\\\\n\\\\n\\\\tself deleteWithSiblings\\\\n! !\\\\n\\\\n\\\\n!MouseActionIndicatorMorph methodsFor: 'initialization' stamp: 'RAA 7/12/2000 10:48'!\\\\ninitialize\\\\n\\\\n\\\\tsuper initialize.\\\\n\\\\tsiblings _ #().! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMouseActionIndicatorMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MouseActionIndicatorMorph class methodsFor: 'as yet unclassified' stamp: 'RAA 7/12/2000 11:08'!\\\\nworld: aWorld inner: innerRectangle outer: outerRectangle color: aColor\\\\n\\\\n\\\\t| allRects allMorphs |\\\\n\\\\n\\\\tallRects _ outerRectangle areasOutside: innerRectangle.\\\\n\\\\tallMorphs _ allRects collect: [ :each |\\\\n\\\\t\\\\tself new bounds: each; color: aColor\\\\n\\\\t].\\\\n\\\\tallMorphs do: [ :each |\\\\n\\\\t\\\\teach siblings: allMorphs; openInWorld: aWorld\\\\n\\\\t].\\\\n\\\\t^allMorphs\\\\n\\\\n\\\\n! !\\\\nMouseEvent subclass: #MouseButtonEvent\\\\n\\\\tinstanceVariableNames: 'whichButton'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Events'!\\\\n\\\\n!MouseButtonEvent methodsFor: 'accessing' stamp: 'ar 9/15/2000 19:58'!\\\\nblueButtonChanged\\\\n\\\\t\\\\\\\"Answer true if the blue mouse button has changed. This is the third mouse button or cmd+click on the Mac.\\\\\\\"\\\\n\\\\n\\\\t^ whichButton anyMask: 1! !\\\\n\\\\n!MouseButtonEvent methodsFor: 'accessing' stamp: 'ar 9/15/2000 19:58'!\\\\nredButtonChanged\\\\n\\\\t\\\\\\\"Answer true if the red mouse button has changed. This is the first mouse button.\\\\\\\"\\\\n\\\\n\\\\t^ whichButton anyMask: 4! !\\\\n\\\\n!MouseButtonEvent methodsFor: 'accessing' stamp: 'nk 3/11/2004 17:44'!\\\\nwhichButton\\\\n\\\\t^whichButton! !\\\\n\\\\n!MouseButtonEvent methodsFor: 'accessing' stamp: 'ar 9/15/2000 19:59'!\\\\nyellowButtonChanged\\\\n\\\\t\\\\\\\"Answer true if the yellow mouse button has changed. This is the second mouse button or option+click on the Mac.\\\\\\\"\\\\n\\\\n\\\\t^ whichButton anyMask: 2! !\\\\n\\\\n\\\\n!MouseButtonEvent methodsFor: 'dispatching' stamp: 'ar 9/16/2000 13:05'!\\\\nsentTo: anObject\\\\n\\\\t\\\\\\\"Dispatch the receiver into anObject\\\\\\\"\\\\n\\\\ttype == #mouseDown ifTrue:[^anObject handleMouseDown: self].\\\\n\\\\ttype == #mouseUp ifTrue:[^anObject handleMouseUp: self].\\\\n\\\\t^super sentTo: anObject! !\\\\n\\\\n\\\\n!MouseButtonEvent methodsFor: 'initialize' stamp: 'ar 10/24/2000 16:29'!\\\\ntype: eventType readFrom: aStream\\\\n\\\\tsuper type: eventType readFrom: aStream.\\\\n\\\\taStream skip: 1.\\\\n\\\\twhichButton _ Integer readFrom: aStream.! !\\\\n\\\\n\\\\n!MouseButtonEvent methodsFor: 'printing' stamp: 'ar 10/24/2000 16:29'!\\\\nstoreOn: aStream\\\\n\\\\tsuper storeOn: aStream.\\\\n\\\\taStream space.\\\\n\\\\twhichButton storeOn: aStream.! !\\\\n\\\\n\\\\n!MouseButtonEvent methodsFor: '*nebraska-*nebraska-Morphic-Remote' stamp: 'dgd 2/22/2003 19:00'!\\\\ndecodeFromStringArray: array \\\\n\\\\t\\\\\\\"decode the receiver from an array of strings\\\\\\\"\\\\n\\\\n\\\\ttype := array first asSymbol.\\\\n\\\\tposition := CanvasDecoder decodePoint: (array second).\\\\n\\\\tbuttons := CanvasDecoder decodeInteger: (array third).\\\\n\\\\twhichButton := CanvasDecoder decodeInteger: (array fourth)! !\\\\n\\\\n!MouseButtonEvent methodsFor: '*nebraska-*nebraska-Morphic-Remote' stamp: 'ar 10/25/2000 23:24'!\\\\nencodedAsStringArray\\\\n\\\\t\\\\\\\"encode the receiver into an array of strings, such that it can be retrieved via the fromStringArray: class method\\\\\\\"\\\\n\\\\t^{\\\\n\\\\t\\\\ttype.\\\\n\\\\t\\\\tCanvasEncoder encodePoint: position.\\\\n\\\\t\\\\tCanvasEncoder encodeInteger: buttons.\\\\n\\\\t\\\\tCanvasEncoder encodeInteger: whichButton.\\\\n\\\\t}! !\\\\n\\\\n\\\\n!MouseButtonEvent methodsFor: 'private' stamp: 'ar 10/5/2000 23:55'!\\\\nsetType: evtType position: evtPos which: button buttons: evtButtons hand: evtHand stamp: stamp\\\\n\\\\ttype _ evtType.\\\\n\\\\tposition _ evtPos.\\\\n\\\\tbuttons _ evtButtons.\\\\n\\\\tsource _ evtHand.\\\\n\\\\twasHandled _ false.\\\\n\\\\twhichButton _ button.\\\\n\\\\ttimeStamp _ stamp.! !\\\\nObject subclass: #MouseClickState\\\\n\\\\tinstanceVariableNames: 'clickClient clickState firstClickDown firstClickUp firstClickTime clickSelector dblClickSelector dblClickTime dblClickTimeoutSelector dragSelector dragThreshold'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Kernel'!\\\\n!MouseClickState commentStamp: '<historical>' prior: 0!\\\\nMouseClickState is a simple class managing the distinction between clicks, double clicks, and drag operations. It has been factored out of HandMorph due to the many instVars.\\\\n\\\\nInstance variables:\\\\n\\\\tclickClient \\\\t<Morph>\\\\t\\\\tThe client wishing to receive #click:, #dblClick:, or #drag messages\\\\n\\\\tclickState \\\\t<Symbol>\\\\tThe internal state of handling the last event (#firstClickDown, #firstClickUp, #firstClickTimedOut)\\\\n\\\\tfirstClickDown \\\\t<MorphicEvent>\\\\tThe #mouseDown event after which the client wished to receive #click: or similar messages\\\\n\\\\tfirstClickUp \\\\t<MorphicEvent>\\\\tThe first mouse up event which came in before the double click time out was exceeded (it is sent if there is a timout after the first mouse up event occured)\\\\n\\\\tfirstClickTime \\\\t<Integer>\\\\tThe millisecond clock value of the first event\\\\n\\\\tclickSelector \\\\t<Symbol>\\\\tThe selector to use for sending #click: messages\\\\n\\\\tdblClickSelector \\\\t<Symbol>\\\\tThe selector to use for sending #doubleClick: messages\\\\n\\\\tdblClickTime \\\\t<Integer>\\\\tTimout in milliseconds for a double click operation\\\\n\\\\tdragSelector \\\\t<Symbol>\\\\tThe selector to use for sending #drag: messages\\\\n\\\\tdragThreshold \\\\t<Integer>\\\\tThreshold used for determining if a #drag: message is sent (pixels!!)\\\\n!\\\\n\\\\n\\\\n!MouseClickState methodsFor: 'as yet unclassified' stamp: 'nk 7/26/2004 09:13'!\\\\nprintOn: aStream\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream nextPut: $[; print: clickState; nextPut: $]\\\\n! !\\\\n\\\\n\\\\n!MouseClickState methodsFor: 'event handling' stamp: 'jcg 9/21/2001 11:23'!\\\\nclick\\\\n\\\\n\\\\tclickSelector ifNotNil: [clickClient perform: clickSelector with: firstClickDown]! !\\\\n\\\\n!MouseClickState methodsFor: 'event handling' stamp: 'jcg 9/21/2001 11:24'!\\\\ndoubleClick\\\\n\\\\n\\\\tdblClickSelector ifNotNil: [clickClient perform: dblClickSelector with: firstClickDown]! !\\\\n\\\\n!MouseClickState methodsFor: 'event handling' stamp: 'jcg 9/21/2001 13:09'!\\\\ndoubleClickTimeout\\\\n\\\\n\\\\tdblClickTimeoutSelector ifNotNil: [\\\\n\\\\t\\\\tclickClient perform: dblClickTimeoutSelector with: firstClickDown]! !\\\\n\\\\n!MouseClickState methodsFor: 'event handling' stamp: 'jcg 9/21/2001 11:27'!\\\\ndrag: event\\\\n\\\\n\\\\tdragSelector ifNotNil: [clickClient perform: dragSelector with: event]! !\\\\n\\\\n!MouseClickState methodsFor: 'event handling' stamp: 'nk 7/26/2004 10:21'!\\\\nhandleEvent: evt from: aHand\\\\n\\\\t\\\\\\\"Process the given mouse event to detect a click, double-click, or drag.\\\\n\\\\tReturn true if the event should be processed by the sender, false if it shouldn't.\\\\n\\\\tNOTE: This method heavily relies on getting *all* mouse button events.\\\\\\\"\\\\n\\\\t| localEvt timedOut isDrag |\\\\n\\\\ttimedOut _ (evt timeStamp - firstClickTime) > dblClickTime.\\\\n\\\\tlocalEvt _ evt transformedBy: (clickClient transformedFrom: aHand owner).\\\\n\\\\tisDrag _ (localEvt position - firstClickDown position) r > dragThreshold.\\\\n\\\\tclickState == #firstClickDown ifTrue: [\\\\n\\\\t\\\\t\\\\\\\"Careful here - if we had a slow cycle we may have a timedOut mouseUp event\\\\\\\"\\\\n\\\\t\\\\t(timedOut and:[localEvt isMouseUp not]) ifTrue:[\\\\n\\\\t\\\\t\\\\t\\\\\\\"timeout before #mouseUp -> keep waiting for drag if requested\\\\\\\"\\\\n\\\\t\\\\t\\\\tclickState _ #firstClickTimedOut.\\\\n\\\\t\\\\t\\\\tdragSelector ifNil:[\\\\n\\\\t\\\\t\\\\t\\\\taHand resetClickState.\\\\n\\\\t\\\\t\\\\t\\\\tself doubleClickTimeout; click \\\\\\\"***\\\\\\\"].\\\\n\\\\t\\\\t\\\\t^true].\\\\n\\\\t\\\\tlocalEvt isMouseUp ifTrue:[\\\\n\\\\n\\\\t\\\\t\\\\t(timedOut or:[dblClickSelector isNil]) ifTrue:[\\\\n\\\\t\\\\t\\\\t\\\\tself click.\\\\n\\\\t\\\\t\\\\t\\\\taHand resetClickState.\\\\n\\\\t\\\\t\\\\t\\\\t^true].\\\\n\\\\t\\\\t\\\\t\\\\\\\"Otherwise transfer to #firstClickUp\\\\\\\"\\\\n\\\\t\\\\t\\\\tfirstClickUp _ evt copy.\\\\n\\\\t\\\\t\\\\tclickState _ #firstClickUp.\\\\n\\\\t\\\\t\\\\t\\\\\\\"If timedOut or the client's not interested in dbl clicks get outta here\\\\\\\"\\\\n\\\\t\\\\t\\\\tself click.\\\\n\\\\t\\\\t\\\\taHand handleEvent: firstClickUp.\\\\n\\\\t\\\\t\\\\t^false].\\\\n\\\\t\\\\tisDrag ifTrue:[\\\\\\\"drag start\\\\\\\"\\\\n\\\\t\\\\t\\\\tself doubleClickTimeout. \\\\\\\"***\\\\\\\"\\\\n\\\\t\\\\t\\\\taHand resetClickState.\\\\n\\\\t\\\\t\\\\tdragSelector \\\\\\\"If no drag selector send #click instead\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tifNil: [self click]\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil: [self drag: firstClickDown].\\\\n\\\\t\\\\t\\\\t^true].\\\\n\\\\t\\\\t^false].\\\\n\\\\n\\\\tclickState == #firstClickTimedOut ifTrue:[\\\\n\\\\t\\\\tlocalEvt isMouseUp ifTrue:[\\\\\\\"neither drag nor double click\\\\\\\"\\\\n\\\\t\\\\t\\\\taHand resetClickState.\\\\n\\\\t\\\\t\\\\tself doubleClickTimeout; click. \\\\\\\"***\\\\\\\"\\\\n\\\\t\\\\t\\\\t^true].\\\\n\\\\t\\\\tisDrag ifTrue:[\\\\\\\"drag start\\\\\\\"\\\\n\\\\t\\\\t\\\\taHand resetClickState.\\\\n\\\\t\\\\t\\\\tself doubleClickTimeout; drag: firstClickDown. \\\\\\\"***\\\\\\\"\\\\n\\\\t\\\\t\\\\t^true].\\\\n\\\\t\\\\t^false].\\\\n\\\\n\\\\tclickState = #firstClickUp ifTrue:[\\\\n\\\\t\\\\t(timedOut) ifTrue:[\\\\n\\\\t\\\\t\\\\t\\\\\\\"timed out after mouseUp - signal timeout and pass the event\\\\\\\"\\\\n\\\\t\\\\t\\\\taHand resetClickState.\\\\n\\\\t\\\\t\\\\tself doubleClickTimeout. \\\\\\\"***\\\\\\\"\\\\n\\\\t\\\\t\\\\t^true].\\\\n\\\\t\\\\tlocalEvt isMouseDown ifTrue:[\\\\\\\"double click\\\\\\\"\\\\n\\\\t\\\\t\\\\tclickState _ #secondClickDown.\\\\n\\\\t\\\\t\\\\t^false]].\\\\n\\\\n\\\\tclickState == #secondClickDown ifTrue: [\\\\n\\\\t\\\\ttimedOut ifTrue:[\\\\n\\\\t\\\\t\\\\t\\\\\\\"timed out after second mouseDown - pass event after signaling timeout\\\\\\\"\\\\n\\\\t\\\\t\\\\taHand resetClickState.\\\\n\\\\t\\\\t\\\\tself doubleClickTimeout. \\\\\\\"***\\\\\\\"\\\\n\\\\t\\\\t\\\\t^true].\\\\n\\\\t\\\\tisDrag ifTrue: [\\\\\\\"drag start\\\\\\\"\\\\n\\\\t\\\\t\\\\tself doubleClickTimeout. \\\\\\\"***\\\\\\\"\\\\n\\\\t\\\\t\\\\taHand resetClickState.\\\\n\\\\t\\\\t\\\\tdragSelector \\\\\\\"If no drag selector send #click instead\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tifNil: [self click]\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil: [self drag: firstClickDown].\\\\n\\\\t\\\\t\\\\t^true].\\\\n\\\\t\\\\tlocalEvt isMouseUp ifTrue: [\\\\\\\"double click\\\\\\\"\\\\n\\\\t\\\\t\\\\taHand resetClickState.\\\\n\\\\t\\\\t\\\\tself doubleClick.\\\\n\\\\t\\\\t\\\\t^false]\\\\n\\\\t].\\\\n\\\\n\\\\t^true\\\\n! !\\\\n\\\\n\\\\n!MouseClickState methodsFor: 'initialize' stamp: 'jcg 9/21/2001 13:08'!\\\\nclient: aMorph click: aClickSelector dblClick: aDblClickSelector dblClickTime: timeOut dblClickTimeout: aDblClickTimeoutSelector drag: aDragSelector threshold: aNumber event: firstClickEvent\\\\n\\\\tclickClient _ aMorph.\\\\n\\\\tclickSelector _ aClickSelector.\\\\n\\\\tdblClickSelector _ aDblClickSelector.\\\\n\\\\tdblClickTime _ timeOut.\\\\n\\\\tdblClickTimeoutSelector _ aDblClickTimeoutSelector.\\\\n\\\\tdragSelector _ aDragSelector.\\\\n\\\\tdragThreshold _ aNumber.\\\\n\\\\tfirstClickDown _ firstClickEvent.\\\\n\\\\tfirstClickTime _ firstClickEvent timeStamp.\\\\n\\\\tclickState _ #firstClickDown.! !\\\\nUserInputEvent subclass: #MouseEvent\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Events'!\\\\n\\\\n!MouseEvent methodsFor: 'accessing' stamp: 'ar 9/15/2000 22:51'!\\\\ncursorPoint\\\\n\\\\t\\\\\\\"Answer the location of the cursor's hotspot when this event occured.\\\\\\\"\\\\n\\\\n\\\\t^ position! !\\\\n\\\\n\\\\n!MouseEvent methodsFor: 'button state' stamp: 'NS 5/19/2003 15:17'!\\\\nanyButtonPressed\\\\n\\\\t\\\\\\\"Answer true if any mouse button is being pressed.\\\\\\\"\\\\n\\\\n\\\\t^ buttons anyMask: self class anyButton! !\\\\n\\\\n!MouseEvent methodsFor: 'button state' stamp: 'NS 5/19/2003 15:17'!\\\\nblueButtonPressed\\\\n\\\\t\\\\\\\"Answer true if the blue mouse button is being pressed. This is the third mouse button or cmd+click on the Mac.\\\\\\\"\\\\n\\\\n\\\\t^ buttons anyMask: self class blueButton! !\\\\n\\\\n!MouseEvent methodsFor: 'button state' stamp: 'NS 5/19/2003 15:17'!\\\\nredButtonPressed\\\\n\\\\t\\\\\\\"Answer true if the red mouse button is being pressed. This is the first mouse button.\\\\\\\"\\\\n\\\\n\\\\t^ buttons anyMask: self class redButton! !\\\\n\\\\n!MouseEvent methodsFor: 'button state' stamp: 'ar 9/15/2000 22:51'!\\\\ntargetPoint\\\\n\\\\t\\\\\\\"Answer the location of the cursor's hotspot, adjusted by the offset\\\\n\\\\tof the last mouseDown relative to the recipient morph.\\\\\\\"\\\\n\\\\n\\\\t^ position - source targetOffset! !\\\\n\\\\n!MouseEvent methodsFor: 'button state' stamp: 'NS 5/19/2003 15:17'!\\\\nyellowButtonPressed\\\\n\\\\t\\\\\\\"Answer true if the yellow mouse button is being pressed. This is the second mouse button or option+click on the Mac.\\\\\\\"\\\\n\\\\n\\\\t^ buttons anyMask: self class yellowButton! !\\\\n\\\\n\\\\n!MouseEvent methodsFor: 'comparing' stamp: 'ar 9/15/2000 22:50'!\\\\n= aMorphicEvent\\\\n\\\\tsuper = aMorphicEvent ifFalse:[^false].\\\\n\\\\tposition = aMorphicEvent position ifFalse: [^ false].\\\\n\\\\tbuttons = aMorphicEvent buttons ifFalse: [^ false].\\\\n\\\\t^ true\\\\n! !\\\\n\\\\n!MouseEvent methodsFor: 'comparing' stamp: 'ar 9/15/2000 22:47'!\\\\nhash\\\\n\\\\t^ position hash + buttons hash! !\\\\n\\\\n\\\\n!MouseEvent methodsFor: 'converting' stamp: 'ar 10/10/2000 21:17'!\\\\nasMouseEnter\\\\n\\\\t^self clone setType: #mouseEnter! !\\\\n\\\\n!MouseEvent methodsFor: 'converting' stamp: 'ar 10/10/2000 21:17'!\\\\nasMouseLeave\\\\n\\\\t^self clone setType: #mouseLeave! !\\\\n\\\\n!MouseEvent methodsFor: 'converting' stamp: 'ar 10/6/2000 18:59'!\\\\nasMouseMove\\\\n\\\\t\\\\\\\"Convert the receiver into a mouse move\\\\\\\"\\\\n\\\\t^MouseMoveEvent new setType: #mouseMove startPoint: position endPoint: position trail: {position. position} buttons: buttons hand: source stamp: Time millisecondClockValue.! !\\\\n\\\\n!MouseEvent methodsFor: 'converting' stamp: 'ar 9/25/2000 14:29'!\\\\nasMouseOver\\\\n\\\\t\\\\\\\"Convert the receiver into a mouse over event\\\\\\\"\\\\n\\\\t^MouseEvent new setType: #mouseOver position: position buttons: buttons hand: source! !\\\\n\\\\n\\\\n!MouseEvent methodsFor: 'dispatching' stamp: 'ar 10/10/2000 21:15'!\\\\nsentTo: anObject\\\\n\\\\t\\\\\\\"Dispatch the receiver into anObject\\\\\\\"\\\\n\\\\ttype == #mouseOver ifTrue:[^anObject handleMouseOver: self].\\\\n\\\\ttype == #mouseEnter ifTrue:[^anObject handleMouseEnter: self].\\\\n\\\\ttype == #mouseLeave ifTrue:[^anObject handleMouseLeave: self].\\\\n\\\\t^super sentTo: anObject.! !\\\\n\\\\n\\\\n!MouseEvent methodsFor: 'initialize' stamp: 'ar 10/25/2000 22:08'!\\\\ntype: eventType readFrom: aStream\\\\n\\\\t| x y |\\\\n\\\\ttype _ eventType.\\\\n\\\\ttimeStamp _ Integer readFrom: aStream.\\\\n\\\\taStream skip: 1.\\\\n\\\\tx _ Integer readFrom: aStream.\\\\n\\\\taStream skip: 1.\\\\n\\\\ty _ Integer readFrom: aStream.\\\\n\\\\taStream skip: 1.\\\\n\\\\tbuttons _ Integer readFrom: aStream.\\\\n\\\\tposition _ x@y.\\\\n! !\\\\n\\\\n\\\\n!MouseEvent methodsFor: 'printing' stamp: 'ar 10/7/2000 22:01'!\\\\nprintOn: aStream\\\\n\\\\n\\\\taStream nextPut: $[.\\\\n\\\\taStream nextPutAll: self cursorPoint printString; space.\\\\n\\\\taStream nextPutAll: type; space.\\\\n\\\\taStream nextPutAll: self modifierString.\\\\n\\\\taStream nextPutAll: self buttonString.\\\\n\\\\taStream nextPutAll: timeStamp printString.\\\\n\\\\taStream nextPut: $].! !\\\\n\\\\n!MouseEvent methodsFor: 'printing' stamp: 'ar 10/25/2000 22:09'!\\\\nstoreOn: aStream\\\\n\\\\n\\\\taStream nextPutAll: type.\\\\n\\\\taStream space.\\\\n\\\\tself timeStamp storeOn: aStream.\\\\n\\\\taStream space.\\\\n\\\\tposition x storeOn: aStream.\\\\n\\\\taStream space.\\\\n\\\\tposition y storeOn: aStream.\\\\n\\\\taStream space.\\\\n\\\\tbuttons storeOn: aStream.! !\\\\n\\\\n\\\\n!MouseEvent methodsFor: 'testing' stamp: 'ar 10/5/2000 19:43'!\\\\nisDraggingEvent\\\\n\\\\tsource ifNil:[^false].\\\\n\\\\tsource hasSubmorphs ifTrue:[^true].\\\\n\\\\tself anyButtonPressed ifTrue:[^true].\\\\n\\\\t^false! !\\\\n\\\\n!MouseEvent methodsFor: 'testing' stamp: 'ar 9/13/2000 15:30'!\\\\nisMouse\\\\n\\\\t^true! !\\\\n\\\\n!MouseEvent methodsFor: 'testing' stamp: 'ar 9/13/2000 15:32'!\\\\nisMouseDown\\\\n\\\\t^self type == #mouseDown! !\\\\n\\\\n!MouseEvent methodsFor: 'testing' stamp: 'ar 9/13/2000 15:32'!\\\\nisMouseEnter\\\\n\\\\t^self type == #mouseEnter! !\\\\n\\\\n!MouseEvent methodsFor: 'testing' stamp: 'ar 9/13/2000 15:32'!\\\\nisMouseLeave\\\\n\\\\t^self type == #mouseLeave! !\\\\n\\\\n!MouseEvent methodsFor: 'testing' stamp: 'ar 9/13/2000 15:32'!\\\\nisMouseMove\\\\n\\\\t^self type == #mouseMove! !\\\\n\\\\n!MouseEvent methodsFor: 'testing' stamp: 'ar 9/13/2000 15:32'!\\\\nisMouseUp\\\\n\\\\t^self type == #mouseUp! !\\\\n\\\\n!MouseEvent methodsFor: 'testing' stamp: 'ar 9/13/2000 19:29'!\\\\nisMove\\\\n\\\\t^false! !\\\\n\\\\n\\\\n!MouseEvent methodsFor: 'private' stamp: 'ar 10/10/2000 21:15'!\\\\nsetType: aSymbol\\\\n\\\\t\\\\\\\"For quick conversion between event types\\\\\\\"\\\\n\\\\ttype _ aSymbol.! !\\\\n\\\\n!MouseEvent methodsFor: 'private' stamp: 'ar 9/15/2000 22:53'!\\\\nsetType: evtType position: evtPos buttons: evtButtons hand: evtHand\\\\n\\\\ttype _ evtType.\\\\n\\\\tposition _ evtPos.\\\\n\\\\tbuttons _ evtButtons.\\\\n\\\\tsource _ evtHand.\\\\n\\\\twasHandled _ false.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMouseEvent class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MouseEvent class methodsFor: 'constants' stamp: 'NS 5/19/2003 15:16'!\\\\nanyButton\\\\n\\\\t^ 7! !\\\\n\\\\n!MouseEvent class methodsFor: 'constants' stamp: 'NS 5/19/2003 15:16'!\\\\nblueButton\\\\n\\\\t^ 1! !\\\\n\\\\n!MouseEvent class methodsFor: 'constants' stamp: 'NS 5/19/2003 15:16'!\\\\nredButton\\\\n\\\\t^ 4! !\\\\n\\\\n!MouseEvent class methodsFor: 'constants' stamp: 'NS 5/19/2003 15:16'!\\\\nyellowButton\\\\n\\\\t^ 2! !\\\\nController subclass: #MouseMenuController\\\\n\\\\tinstanceVariableNames: 'redButtonMenu redButtonMessages'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'ST80-Kernel-Remnants'!\\\\n!MouseMenuController commentStamp: '<historical>' prior: 0!\\\\nI am a Controller that modifies the scheduling of user activities so that the three mouse buttons can be used to make selections or display menus. The menu items are unary messages to the value of sending my instance the message menuMessageReceiver.!\\\\n\\\\n\\\\n!MouseMenuController methodsFor: 'control defaults' stamp: 'sma 3/11/2000 15:28'!\\\\ncontrolActivity\\\\n\\\\t\\\\\\\"Refer to the comment in Controller|controlActivity.\\\\\\\"\\\\n\\\\t| cursorPoint |\\\\n\\\\tcursorPoint _ sensor cursorPoint.\\\\n\\\\tsuper controlActivity.\\\\n\\\\t(cursorPoint = sensor cursorPoint and: [self viewHasCursor])\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[sensor redButtonPressed ifTrue: [^ self redButtonActivity].\\\\n\\\\t\\\\t\\\\tsensor yellowButtonPressed ifTrue: [^ self yellowButtonActivity].\\\\n\\\\t\\\\t\\\\tsensor blueButtonPressed ifTrue: [^ self blueButtonActivity]]! !\\\\n\\\\n!MouseMenuController methodsFor: 'control defaults' stamp: 'sma 3/11/2000 11:24'!\\\\nisControlActive \\\\n\\\\t\\\\\\\"In contrast to class Controller, only blue button but not yellow button\\\\n\\\\tevents will end the receiver's control loop.\\\\\\\"\\\\n\\\\n\\\\t^ self viewHasCursor and: [sensor blueButtonPressed not]! !\\\\n\\\\n\\\\n!MouseMenuController methodsFor: 'initialize-release' stamp: 'sma 3/11/2000 15:54'!\\\\nrelease\\\\n\\\\tsuper release.\\\\n\\\\tredButtonMenu release! !\\\\n\\\\n!MouseMenuController methodsFor: 'initialize-release' stamp: 'sma 3/11/2000 15:54'!\\\\nreset\\\\n\\\\t\\\\\\\"Eliminate references to all mouse button menus.\\\\\\\"\\\\n\\\\n\\\\tredButtonMenu _ nil.\\\\n\\\\tredButtonMessages _ nil! !\\\\n\\\\n\\\\n!MouseMenuController methodsFor: 'menu messages' stamp: 'sma 3/11/2000 15:01'!\\\\nblueButtonActivity\\\\n\\\\t\\\\\\\"This normally opens the window menu. It is a no-op here\\\\n\\\\tas only the StandardSystemController deals with that kind\\\\n\\\\tof menus.\\\\\\\"! !\\\\n\\\\n!MouseMenuController methodsFor: 'menu messages'!\\\\nperformMenuMessage: aSelector\\\\n\\\\t\\\\\\\"Perform a menu command by sending self the message aSelector.\\\\n\\\\t Default does nothing special.\\\\\\\"\\\\n\\\\n\\\\t^self perform: aSelector! !\\\\n\\\\n!MouseMenuController methodsFor: 'menu messages' stamp: 'sma 3/11/2000 14:56'!\\\\nredButtonActivity\\\\n\\\\t\\\\\\\"Determine which item in the red button pop-up menu is selected. If one \\\\n\\\\tis selected, then send the corresponding message to the object designated \\\\n\\\\tas the menu message receiver.\\\\\\\"\\\\n\\\\n\\\\t| index |\\\\n\\\\tredButtonMenu ~~ nil\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[index _ redButtonMenu startUp.\\\\n\\\\t\\\\t\\\\tindex ~= 0 \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self perform: (redButtonMessages at: index)]]\\\\n\\\\t\\\\tifFalse: [super controlActivity]! !\\\\n\\\\n!MouseMenuController methodsFor: 'menu messages' stamp: 'sma 3/11/2000 14:59'!\\\\nyellowButtonActivity\\\\n\\\\t\\\\\\\"This normally opens a popup menu. Determine the selected\\\\n\\\\titem and, if one is selected, then send the corresponding message\\\\n\\\\tto either the model or the receiver.\\\\\\\"\\\\n\\\\n\\\\t^ self pluggableYellowButtonActivity: sensor leftShiftDown! !\\\\n\\\\n\\\\n!MouseMenuController methodsFor: 'menu setup'!\\\\nredButtonMenu: aSystemMenu redButtonMessages: anArray \\\\n\\\\t\\\\\\\"Initialize the pop-up menu that should appear when the user presses the \\\\n\\\\tred mouse button to be aSystemMenu. The corresponding messages that \\\\n\\\\tshould be sent are listed in the array, anArray.\\\\\\\"\\\\n\\\\n\\\\tredButtonMenu release.\\\\n\\\\tredButtonMenu _ aSystemMenu.\\\\n\\\\tredButtonMessages _ anArray! !\\\\n\\\\n\\\\n!MouseMenuController methodsFor: 'pluggable menus' stamp: 'sma 3/11/2000 12:36'!\\\\ngetPluggableYellowButtonMenu: shiftKeyState\\\\n\\\\t^ view getMenu: shiftKeyState! !\\\\n\\\\n!MouseMenuController methodsFor: 'pluggable menus' stamp: 'sw 2/17/2002 04:35'!\\\\npluggableYellowButtonActivity: shiftKeyState\\\\n\\\\t\\\\\\\"Invoke the model's popup menu.\\\\\\\"\\\\n\\\\n\\\\t| menu |\\\\n\\\\t(menu _ self getPluggableYellowButtonMenu: shiftKeyState)\\\\n\\\\t\\\\tifNil:\\\\n\\\\t\\\\t\\\\t[sensor waitNoButton]\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t[self terminateAndInitializeAround:\\\\n\\\\t\\\\t\\\\t\\\\t[menu invokeOn: model orSendTo: self]]! !\\\\n\\\\n!MouseMenuController methodsFor: 'pluggable menus' stamp: 'sw 3/22/2001 12:03'!\\\\nshiftedTextPaneMenuRequest\\\\n\\\\t\\\\\\\"The user chose the more... branch from the text-pane menu.\\\\\\\"\\\\n\\\\n\\\\t^ self pluggableYellowButtonActivity: true! !\\\\n\\\\n!MouseMenuController methodsFor: 'pluggable menus' stamp: 'sma 3/11/2000 12:37'!\\\\nshiftedYellowButtonActivity\\\\n\\\\t\\\\\\\"Invoke the model's special popup menu.\\\\\\\"\\\\n\\\\n\\\\t^ self pluggableYellowButtonActivity: true! !\\\\n\\\\n!MouseMenuController methodsFor: 'pluggable menus' stamp: 'sma 3/11/2000 12:37'!\\\\nunshiftedYellowButtonActivity\\\\n\\\\t\\\\\\\"Invoke the model's normal popup menu.\\\\\\\"\\\\n\\\\n\\\\t^ self pluggableYellowButtonActivity: false! !\\\\nMouseEvent subclass: #MouseMoveEvent\\\\n\\\\tinstanceVariableNames: 'startPoint trail'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Events'!\\\\n\\\\n!MouseMoveEvent methodsFor: 'accessing' stamp: 'ar 9/15/2000 22:51'!\\\\nendPoint\\\\n\\\\t\\\\\\\"Return the point where the movement ended.\\\\\\\"\\\\n\\\\t^position! !\\\\n\\\\n!MouseMoveEvent methodsFor: 'accessing' stamp: 'ar 9/13/2000 16:25'!\\\\nstartPoint\\\\n\\\\t\\\\\\\"Return the point where the movement started.\\\\\\\"\\\\n\\\\t^startPoint! !\\\\n\\\\n!MouseMoveEvent methodsFor: 'accessing' stamp: 'ar 10/24/2000 16:33'!\\\\ntrail\\\\n\\\\t\\\\\\\"Return any immediate points that have been assembled along the move\\\\\\\"\\\\n\\\\t^trail ifNil:[#()]! !\\\\n\\\\n\\\\n!MouseMoveEvent methodsFor: 'comparing' stamp: 'ar 9/15/2000 22:49'!\\\\n= aMorphicEvent\\\\n\\\\tsuper = aMorphicEvent ifFalse:[^false].\\\\n\\\\tposition = aMorphicEvent position ifFalse: [^ false].\\\\n\\\\tstartPoint = aMorphicEvent startPoint ifFalse: [^ false].\\\\n\\\\tbuttons = aMorphicEvent buttons ifFalse: [^ false].\\\\n\\\\t^ true\\\\n! !\\\\n\\\\n!MouseMoveEvent methodsFor: 'comparing' stamp: 'ar 9/15/2000 22:49'!\\\\nhash\\\\n\\\\t^ position hash + startPoint hash + buttons hash! !\\\\n\\\\n\\\\n!MouseMoveEvent methodsFor: 'dispatching' stamp: 'ar 10/10/2000 21:15'!\\\\nsentTo: anObject\\\\n\\\\t\\\\\\\"Dispatch the receiver into anObject\\\\\\\"\\\\n\\\\ttype == #mouseMove ifTrue:[^anObject handleMouseMove: self].\\\\n\\\\t^super sentTo: anObject.\\\\n! !\\\\n\\\\n\\\\n!MouseMoveEvent methodsFor: 'initialize' stamp: 'ar 10/24/2000 16:31'!\\\\ntype: eventType readFrom: aStream\\\\n\\\\t| x y |\\\\n\\\\tsuper type: eventType readFrom: aStream.\\\\n\\\\taStream skip: 1.\\\\n\\\\tx _ Integer readFrom: aStream.\\\\n\\\\taStream skip: 1.\\\\n\\\\ty _ Integer readFrom: aStream.\\\\n\\\\tstartPoint _ x@y.! !\\\\n\\\\n\\\\n!MouseMoveEvent methodsFor: 'printing' stamp: 'ar 10/7/2000 22:00'!\\\\nprintOn: aStream\\\\n\\\\n\\\\taStream nextPut: $[.\\\\n\\\\taStream nextPutAll: self startPoint printString; space.\\\\n\\\\taStream nextPutAll: self endPoint printString; space.\\\\n\\\\taStream nextPutAll: self type; space.\\\\n\\\\taStream nextPutAll: self modifierString.\\\\n\\\\taStream nextPutAll: self buttonString.\\\\n\\\\taStream nextPutAll: timeStamp printString.\\\\n\\\\taStream nextPut: $].! !\\\\n\\\\n!MouseMoveEvent methodsFor: 'printing' stamp: 'ar 10/24/2000 16:30'!\\\\nstoreOn: aStream\\\\n\\\\tsuper storeOn: aStream.\\\\n\\\\taStream space.\\\\n\\\\tself startPoint x storeOn: aStream.\\\\n\\\\taStream space.\\\\n\\\\tself startPoint y storeOn: aStream.\\\\n\\\\taStream space.\\\\n\\\\t\\\\\\\"trail storeOn: aStream.\\\\\\\"! !\\\\n\\\\n\\\\n!MouseMoveEvent methodsFor: 'testing' stamp: 'ar 9/13/2000 19:29'!\\\\nisMove\\\\n\\\\t^true! !\\\\n\\\\n\\\\n!MouseMoveEvent methodsFor: 'transforming' stamp: 'ar 9/15/2000 22:52'!\\\\ntransformBy: aMorphicTransform\\\\n\\\\t\\\\\\\"Transform the receiver into a local coordinate system.\\\\\\\"\\\\n\\\\tposition _  aMorphicTransform globalPointToLocal: position.\\\\n\\\\tstartPoint _  aMorphicTransform globalPointToLocal: startPoint.! !\\\\n\\\\n!MouseMoveEvent methodsFor: 'transforming' stamp: 'ar 9/15/2000 22:52'!\\\\ntranslateBy: delta\\\\n\\\\t\\\\\\\"add delta to cursorPoint, and return the new event\\\\\\\"\\\\n\\\\tposition _ position + delta.\\\\n\\\\tstartPoint _ startPoint + delta.! !\\\\n\\\\n\\\\n!MouseMoveEvent methodsFor: '*nebraska-*nebraska-Morphic-Remote' stamp: 'dgd 2/22/2003 19:01'!\\\\ndecodeFromStringArray: array \\\\n\\\\t\\\\\\\"decode the receiver from an array of strings\\\\\\\"\\\\n\\\\n\\\\ttype := array first asSymbol.\\\\n\\\\tposition := CanvasDecoder decodePoint: (array second).\\\\n\\\\tbuttons := CanvasDecoder decodeInteger: (array third).\\\\n\\\\tstartPoint := CanvasDecoder decodePoint: (array fourth)! !\\\\n\\\\n!MouseMoveEvent methodsFor: '*nebraska-*nebraska-Morphic-Remote' stamp: 'ar 10/25/2000 23:25'!\\\\nencodedAsStringArray\\\\n\\\\t\\\\\\\"encode the receiver into an array of strings, such that it can be retrieved via the fromStringArray: class method\\\\\\\"\\\\n\\\\t^{\\\\n\\\\t\\\\ttype.\\\\n\\\\t\\\\tCanvasEncoder encodePoint: position.\\\\n\\\\t\\\\tCanvasEncoder encodeInteger: buttons.\\\\n\\\\t\\\\tCanvasEncoder encodePoint: startPoint.\\\\n\\\\t}! !\\\\n\\\\n\\\\n!MouseMoveEvent methodsFor: 'private' stamp: 'ar 10/5/2000 23:55'!\\\\nsetType: evtType startPoint: evtStart endPoint: evtEnd trail: evtTrail buttons: evtButtons hand: evtHand stamp: stamp\\\\n\\\\ttype _ evtType.\\\\n\\\\tstartPoint _ evtStart.\\\\n\\\\tposition _ evtEnd.\\\\n\\\\ttrail _ evtTrail.\\\\n\\\\tbuttons _ evtButtons.\\\\n\\\\tsource _ evtHand.\\\\n\\\\twasHandled _ false.\\\\n\\\\ttimeStamp _ stamp.! !\\\\nObject subclass: #MouseOverHandler\\\\n\\\\tinstanceVariableNames: 'mouseOverMorphs enteredMorphs overMorphs leftMorphs'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Events'!\\\\n\\\\n!MouseOverHandler methodsFor: 'event handling' stamp: 'ar 9/28/2000 18:52'!\\\\nnoticeMouseOver: aMorph event: anEvent\\\\n\\\\t\\\\\\\"Remember that the mouse is currently over some morph\\\\\\\"\\\\n\\\\t(leftMorphs includes: aMorph) \\\\n\\\\t\\\\tifTrue:[leftMorphs remove: aMorph]\\\\n\\\\t\\\\tifFalse:[enteredMorphs nextPut: aMorph].\\\\n\\\\toverMorphs nextPut: aMorph.\\\\n! !\\\\n\\\\n!MouseOverHandler methodsFor: 'event handling' stamp: 'dgd 2/21/2003 23:00'!\\\\nprocessMouseOver: anEvent \\\\n\\\\t\\\\\\\"Re-establish the z-order for all morphs wrt the given event\\\\\\\"\\\\n\\\\n\\\\t| hand localEvt focus evt |\\\\n\\\\thand := anEvent hand.\\\\n\\\\tleftMorphs := mouseOverMorphs asIdentitySet.\\\\n\\\\t\\\\\\\"Assume some coherence for the number of objects in over list\\\\\\\"\\\\n\\\\toverMorphs := WriteStream on: (Array new: leftMorphs size).\\\\n\\\\tenteredMorphs := WriteStream on: #().\\\\n\\\\t\\\\\\\"Now go looking for eventual mouse overs\\\\\\\"\\\\n\\\\thand handleEvent: anEvent asMouseOver.\\\\n\\\\t\\\\\\\"Get out early if there's no change\\\\\\\"\\\\n\\\\t(leftMorphs isEmpty and: [enteredMorphs position = 0]) \\\\n\\\\t\\\\tifTrue: [^leftMorphs := enteredMorphs := overMorphs := nil].\\\\n\\\\tfocus := hand mouseFocus.\\\\n\\\\t\\\\\\\"Send #mouseLeave as appropriate\\\\\\\"\\\\n\\\\tevt := anEvent asMouseLeave.\\\\n\\\\t\\\\\\\"Keep the order of the left morphs by recreating it from the mouseOverMorphs\\\\\\\"\\\\n\\\\tleftMorphs size > 1 \\\\n\\\\t\\\\tifTrue: [leftMorphs := mouseOverMorphs select: [:m | leftMorphs includes: m]].\\\\n\\\\tleftMorphs do: \\\\n\\\\t\\\\t\\\\t[:m | \\\\n\\\\t\\\\t\\\\t(m == focus or: [m hasOwner: focus]) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[localEvt := evt transformedBy: (m transformedFrom: hand).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tm handleEvent: localEvt]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [overMorphs nextPut: m]].\\\\n\\\\t\\\\\\\"Send #mouseEnter as appropriate\\\\\\\"\\\\n\\\\tevt := anEvent asMouseEnter.\\\\n\\\\tenteredMorphs ifNil: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"inform: was called in handleEvent:\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t^leftMorphs := enteredMorphs := overMorphs := nil].\\\\n\\\\tenteredMorphs := enteredMorphs contents.\\\\n\\\\tenteredMorphs reverseDo: \\\\n\\\\t\\\\t\\\\t[:m | \\\\n\\\\t\\\\t\\\\t(m == focus or: [m hasOwner: focus]) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[localEvt := evt transformedBy: (m transformedFrom: hand).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tm handleEvent: localEvt]].\\\\n\\\\t\\\\\\\"And remember the over list\\\\\\\"\\\\n\\\\toverMorphs ifNil: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"inform: was called in handleEvent:\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t^leftMorphs := enteredMorphs := overMorphs := nil].\\\\n\\\\tmouseOverMorphs := overMorphs contents.\\\\n\\\\tleftMorphs := enteredMorphs := overMorphs := nil! !\\\\n\\\\n\\\\n!MouseOverHandler methodsFor: 'initialize-release' stamp: 'ar 9/28/2000 17:08'!\\\\ninitialize\\\\n\\\\tmouseOverMorphs _ #().! !\\\\nMovieClipStartMorph subclass: #MovieClipEndMorph\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Movies-Player'!\\\\n!MovieClipEndMorph commentStamp: '<historical>' prior: 0!\\\\nThe idea is that soon we will show the soundtrack extending between the start cue and the end morph.!\\\\n\\\\n\\\\n!MovieClipEndMorph methodsFor: 'as yet unclassified' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nmovieFileName: movieFileName image: aForm player: aMoviePlayer frameNumber: n\\\\n\\\\n\\\\tmovieClipFileName := movieFileName.\\\\n\\\\tself image: aForm frameNumber: n.\\\\n\\\\tmoviePlayerMorph := movieClipPlayer := aMoviePlayer.\\\\n\\\\tscoreEvent := AmbientEvent new morph: self.\\\\n! !\\\\n\\\\n\\\\n!MovieClipEndMorph methodsFor: 'drawing' stamp: 'di 10/23/2000 10:42'!\\\\nthumbnailHeight\\\\n\\\\n\\\\t^ 30! !\\\\n\\\\n\\\\n!MovieClipEndMorph methodsFor: 'piano rolls' stamp: 'di 10/26/2000 00:25'!\\\\naddMorphsTo: morphList pianoRoll: pianoRoll eventTime: t betweenTime: leftTime and: rightTime\\\\n\\\\n\\\\t\\\\\\\"Ignored -- all display is done by the starting morph -- see superclass\\\\\\\"! !\\\\n\\\\n!MovieClipEndMorph methodsFor: 'piano rolls' stamp: 'di 10/11/2000 23:06'!\\\\nencounteredAtTime: ticks inScorePlayer: scorePlayer atIndex: index inEventTrack: track secsPerTick: secsPerTick\\\\n\\\\n\\\\tmovieClipPlayer ifNotNil:\\\\n\\\\t\\\\t[\\\\\\\"If being shown as a clip, then tell the clipPlayer to stop showing this clip\\\\\\\"\\\\n\\\\t\\\\tmovieClipPlayer stopRunning]! !\\\\n\\\\n!MovieClipEndMorph methodsFor: 'piano rolls' stamp: 'di 10/22/2000 12:43'!\\\\npauseFrom: scorePlayer\\\\n\\\\n\\\\t\\\\\\\"Ignored\\\\\\\"! !\\\\n\\\\n!MovieClipEndMorph methodsFor: 'piano rolls' stamp: 'di 10/22/2000 12:43'!\\\\nresetFrom: scorePlayer\\\\n\\\\n\\\\t\\\\\\\"Ignored\\\\\\\"! !\\\\n\\\\n!MovieClipEndMorph methodsFor: 'piano rolls' stamp: 'di 10/22/2000 12:43'!\\\\nresumeFrom: scorePlayer\\\\n\\\\n\\\\t\\\\\\\"Ignored\\\\\\\"! !\\\\nMovieFrameSyncMorph subclass: #MovieClipStartMorph\\\\n\\\\tinstanceVariableNames: 'movieClipPlayer movieClipFileName soundTrackFileName soundTrackPlayerReady soundTrackMorph soundTrackTimeScale scoreEvent endMorph clipColor colorMorph'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Movies-Player'!\\\\n!MovieClipStartMorph commentStamp: '<historical>' prior: 0!\\\\nThis class and its subclasses act to syncronize movie players with the progress of a MIDI score and further background can be found in the comment for MoviePlayerMorph.\\\\n\\\\nMovieClipStartMorphs are used where you have a movie clip player plex.  You can create such a plex by opening a midi score, spawning a piano roll (by the button of that name), and then choosing 'add movie clip player' from the piano roll menu.  Much simpler, you can open a MoviePlayerMorph as a new morph, and then choose 'make a new movie' from its menu.  This plex then serves as a central editable score for composing movie clips.\\\\n\\\\nTo add a new movie clip to the score, open a movie from the fileList (or as a new morph followed by 'open a movie').  Play or otherwise position the clip to the desired starting position, and then tear off a thumbnail and drop it into the score at the desired time.  The starting thumbnail (MovieClipStartMorph) will appear in the score, tied to an endMorph by a colored stripe.  The ending time will be chosen based on the total length of the clip, a default starting clip length (200 frames), and possible interference with other clips that follow it.\\\\n\\\\nTo reposition a clip, you can pick up its clipStart with halo black handle, and drop it elsewhere.  The rest of the clip will follow as best it can.  To delete a clip, delete its clipStart.  To change the duration of a clip, play the composition up to some point in that clip, and pause it.  Then use the  controls on the central movie player to move forward or backward to the desired ending frame, and choose 'end clip here' from the player menu.!\\\\n\\\\n\\\\n!MovieClipStartMorph methodsFor: 'access' stamp: 'di 10/19/2000 14:27'!\\\\nendMorph\\\\n\\\\n\\\\t^ endMorph! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'access' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nframeNumber: newFrame\\\\n\\\\n\\\\tframeNumber := newFrame! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'access' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nmovieClipPlayer: aMoviePlayerMorph\\\\n\\\\t\\\\\\\"For now, these morphs work both as a sync point in a long movie, and\\\\n\\\\tas a cue point for a short clip in a longer score.\\\\n\\\\tTo a cue point, this method provides a reference to the clip player.\\\\\\\"\\\\n\\\\n\\\\tmovieClipPlayer := aMoviePlayerMorph! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'access' stamp: 'di 10/25/2000 22:02'!\\\\nrelatedPlayer\\\\n \\\\n\\\\t^ movieClipPlayer! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'access' stamp: 'di 10/19/2000 12:24'!\\\\nscoreEvent\\\\n\\\\t^ scoreEvent! !\\\\n\\\\n\\\\n!MovieClipStartMorph methodsFor: 'drawing' stamp: 'di 10/23/2000 10:46'!\\\\ncolorMargin\\\\n\\\\t\\\\\\\"How far the clip span color highlight extends outside the starting clip\\\\\\\"\\\\n\\\\n\\\\t^ 5! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'drawing' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\ncolorMorph\\\\n\\\\tcolorMorph ifNotNil: [^ colorMorph].\\\\n\\\\n\\\\t\\\\\\\"Make up a morph to highlight the span of this clip.\\\\\\\"\\\\n\\\\tColorIndex := (ColorIndex ifNil: [0]) + 2 \\\\\\\\\\\\\\\\ 8 + 1.\\\\n\\\\t^ colorMorph := Morph newBounds: (0@0 extent: 9@9) color: ((Color wheel: 8) at: ColorIndex)\\\\n! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'drawing' stamp: 'di 10/23/2000 10:23'!\\\\nsoundTrackHeight\\\\n\\\\n\\\\t^ 40! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'drawing' stamp: 'di 10/23/2000 10:58'!\\\\nsoundTrackOnBottom  \\\\\\\"a local preference during test\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'drawing' stamp: 'di 10/23/2000 12:32'!\\\\nthumbnailHeight\\\\n\\\\n\\\\t^ 60! !\\\\n\\\\n\\\\n!MovieClipStartMorph methodsFor: 'dropping/grabbing' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\njustDroppedInto: newOwner event: evt\\\\n\\\\t| pianoRoll syncMorph |\\\\n\\\\t\\\\\\\"When dropping this morph into a pianoRoll, add a corresponding\\\\n\\\\tevent to the score so that it will always appear when played,\\\\n\\\\tin addition to possibly triggering other actions\\\\\\\"\\\\n\\\\n\\\\t(newOwner isKindOf: PianoRollScoreMorph)\\\\n\\\\tifTrue:\\\\n\\\\t\\\\t[pianoRoll := newOwner.\\\\n\\\\t\\\\tpianoRoll movieClipPlayer ifNil:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"This PianoRoll is not a clip player -- replace me by a SyncMorph\\\\\\\"\\\\n\\\\t\\\\t\\\\tsyncMorph := MovieFrameSyncMorph new\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\timage: image\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tplayer: moviePlayerMorph\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tframeNumber: frameNumber.\\\\n\\\\t\\\\t\\\\tpianoRoll replaceSubmorph: self by: syncMorph.\\\\n\\\\t\\\\t\\\\t\\\\\\\"rewrite to use justDroppedInto:...\\\\\\\"\\\\n\\\\t\\\\t\\\\tpianoRoll score removeAmbientEventWithMorph: self;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\taddAmbientEvent: (scoreEvent\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmorph: syncMorph;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttime: (pianoRoll timeForX: self left)).\\\\n\\\\t\\\\t\\\\t^ self].\\\\n\\\\n\\\\t\\\\tself movieClipPlayer: pianoRoll movieClipPlayer.\\\\n\\\\t\\\\tself setTimeInScore: pianoRoll score\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnear: (pianoRoll timeForX: self left).\\\\n\\\\t\\\\tself endTime > newOwner scorePlayer durationInTicks ifTrue:\\\\n\\\\t\\\\t\\\\t[newOwner scorePlayer updateDuration]]\\\\n\\\\tifFalse:\\\\n\\\\t\\\\t[\\\\\\\"Dropped it somewhere else -- delete related morphs\\\\\\\"\\\\n\\\\t\\\\tendMorph ifNotNil: [endMorph delete].\\\\n\\\\t\\\\tsoundTrackMorph ifNotNil: [soundTrackMorph delete]].\\\\n\\\\n\\\\tsuper justDroppedInto: newOwner event: evt\\\\n! !\\\\n\\\\n\\\\n!MovieClipStartMorph methodsFor: 'events' stamp: 'di 10/22/2000 20:24'!\\\\nendTime\\\\n\\\\n\\\\t^ endMorph scoreEvent time! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'events' stamp: 'di 10/22/2000 20:27'!\\\\nframeAtTick: time\\\\n\\\\t\\\\\\\"Return the frame number corresponding to the given tick time\\\\\\\"\\\\n\\\\n\\\\t^ frameNumber +\\\\n\\\\t\\\\t((time - self startTime) asFloat\\\\n\\\\t\\\\t\\\\t/ (self endTime - self startTime)\\\\n\\\\t\\\\t\\\\t* (endMorph frameNumber - frameNumber)) asInteger! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'events' stamp: 'di 10/22/2000 20:24'!\\\\nstartTime\\\\n\\\\n\\\\t^ scoreEvent time! !\\\\n\\\\n\\\\n!MovieClipStartMorph methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nimage: aForm frameNumber: n\\\\n\\\\n\\\\tself image: (aForm magnifyBy: self thumbnailHeight asFloat / aForm height).\\\\n\\\\tframeNumber := n.! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nmovieFileName: movieFileName soundTrackFileName: soundFileName\\\\n\\\\t\\\\t\\\\timage: aForm player: aMoviePlayer frameNumber: n\\\\n\\\\tmovieClipFileName := movieFileName.\\\\n\\\\tsoundTrackFileName := soundFileName.\\\\n\\\\tself image: aForm frameNumber: n.\\\\n\\\\tmoviePlayerMorph := aMoviePlayer.\\\\n\\\\tsoundTrackPlayerReady := moviePlayerMorph scorePlayer copy.\\\\n\\\\tscoreEvent := AmbientEvent new morph: self.\\\\n! !\\\\n\\\\n\\\\n!MovieClipStartMorph methodsFor: 'piano rolls' stamp: 'dgd 2/22/2003 14:09'!\\\\naddMorphsTo: morphList pianoRoll: pianoRoll eventTime: t betweenTime: leftTime and: rightTime \\\\n\\\\t\\\\\\\"This code handles both the start and end morphs.\\\\\\\"\\\\n\\\\n\\\\t| startX endX h delta |\\\\n\\\\tself startTime > rightTime \\\\n\\\\t\\\\tifTrue: [^self\\\\t\\\\\\\"Start time has not come into view.\\\\\\\"].\\\\n\\\\tself endTime < leftTime ifTrue: [^self\\\\t\\\\\\\"End time has passed out of view.\\\\\\\"].\\\\n\\\\tstartX := pianoRoll xForTime: self startTime.\\\\n\\\\tendX := pianoRoll xForTime: self endTime.\\\\n\\\\th := self colorMargin.\\\\t\\\\\\\"Height of highlight bar over thumbnails.\\\\\\\"\\\\n\\\\tmorphList add: (self align: self bottomLeft\\\\n\\\\t\\\\t\\\\t\\\\twith: startX @ (pianoRoll bottom - pianoRoll borderWidth - h)).\\\\n\\\\tmorphList \\\\n\\\\t\\\\tadd: (endMorph align: endMorph bounds rightCenter with: endX @ self center y).\\\\n\\\\tmorphList add: (self colorMorph \\\\n\\\\t\\\\t\\\\t\\\\tbounds: (self topLeft - (0 @ h) corner: endMorph right @ (self bottom + h))).\\\\n\\\\t(soundTrackMorph isNil and: [moviePlayerMorph scorePlayer isNil]) \\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"Wants a sound track\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t(soundTrackMorph isNil or: [pianoRoll timeScale ~= soundTrackTimeScale]) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"Needs a new sound track\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself buildSoundTrackMorphFor: pianoRoll].\\\\n\\\\t\\\\t\\\\tmorphList add: (soundTrackMorph align: soundTrackMorph bottomLeft\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twith: colorMorph topLeft).\\\\n\\\\t\\\\t\\\\tself soundTrackOnBottom \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[soundTrackMorph align: soundTrackMorph bottomLeft with: self bottomLeft.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdelta := 0 @ self soundTrackHeight.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself position: self position - delta.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tendMorph position: endMorph position - delta.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcolorMorph position: colorMorph position - delta]]! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'piano rolls' stamp: 'di 10/26/2000 00:09'!\\\\nencounteredAtTime: ticks inScorePlayer: scorePlayer atIndex: index inEventTrack: track secsPerTick: secsPerTick\\\\n\\\\n\\\\t\\\\\\\"If being shown as a clip, then tell the clipPlayer to start showing this clip\\\\\\\"\\\\n\\\\tmovieClipPlayer setCueMorph: self.\\\\n\\\\tmovieClipPlayer openFileNamed: movieClipFileName\\\\n\\\\t\\\\t\\\\twithScorePlayer: soundTrackPlayerReady copy\\\\n\\\\t\\\\t\\\\tandPlayFrom: frameNumber.\\\\n! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'piano rolls' stamp: 'dgd 2/22/2003 14:09'!\\\\nresetFrom: scorePlayer \\\\n\\\\t(movieClipPlayer cueMorph isNil \\\\n\\\\t\\\\tor: [self startTime < movieClipPlayer cueMorph startTime]) \\\\n\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t[movieClipPlayer\\\\n\\\\t\\\\t\\\\t\\\\t\\\\topenFileNamed: movieClipFileName\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twithScorePlayer: soundTrackPlayerReady copy\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tandPlayFrom: frameNumber;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsetCueMorph: self;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstep;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpauseFrom: scorePlayer]! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'piano rolls' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nresumeFrom: scorePlayer\\\\n\\\\n\\\\t| time |\\\\n\\\\t\\\\\\\"New movie clip style of use.\\\\\\\"\\\\n\\\\ttime := scorePlayer ticksSinceStart.\\\\n\\\\ttime < self startTime ifTrue: [^ self].  \\\\\\\"It's not my time yet\\\\\\\"\\\\n\\\\ttime > self endTime ifTrue: [^ self].  \\\\\\\"It's past my time\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"The player is starting in the midst of this clip.\\\\\\\"\\\\n\\\\tmovieClipPlayer openFileNamed: movieClipFileName\\\\n\\\\t\\\\t\\\\t\\\\twithScorePlayer: soundTrackPlayerReady copy\\\\n\\\\t\\\\t\\\\t\\\\tandPlayFrom: (self frameAtTick: time);\\\\n\\\\t\\\\tsetCueMorph: self.\\\\n! !\\\\n\\\\n\\\\n!MovieClipStartMorph methodsFor: 'submorphs-add/remove' stamp: 'di 10/23/2000 10:24'!\\\\ndelete\\\\n\\\\t(owner isKindOf: PianoRollScoreMorph) ifTrue:\\\\n\\\\t\\\\t[owner score removeAmbientEventWithMorph: self.\\\\n\\\\t\\\\tendMorph ifNotNil: [owner score removeAmbientEventWithMorph: endMorph]].\\\\n\\\\tendMorph ifNotNil: [endMorph delete].\\\\n\\\\tsoundTrackMorph ifNotNil: [soundTrackMorph delete].\\\\n\\\\tcolorMorph ifNotNil: [colorMorph delete].\\\\n\\\\tsuper delete.\\\\n! !\\\\n\\\\n\\\\n!MovieClipStartMorph methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nbuildSoundTrackMorphFor: pianoRoll\\\\n\\\\t| stopTime soundTrackForm startTime samplesPerTick samplesPerMs |\\\\n\\\\tsoundTrackTimeScale := pianoRoll timeScale.  \\\\\\\"pixels per tick\\\\\\\"\\\\n\\\\tsamplesPerTick := moviePlayerMorph scorePlayer originalSamplingRate   \\\\\\\"Samples per sec\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t* pianoRoll scorePlayer secsPerTick.  \\\\\\\"secs per tick\\\\\\\"\\\\n\\\\tsamplesPerMs := moviePlayerMorph scorePlayer originalSamplingRate / 1000.0.\\\\n\\\\tstartTime := frameNumber * moviePlayerMorph msPerFrame.  \\\\\\\"ms\\\\\\\"\\\\n\\\\tstopTime := endMorph frameNumber * moviePlayerMorph msPerFrame.\\\\n\\\\tsoundTrackForm := moviePlayerMorph scorePlayer\\\\n\\\\t\\\\tvolumeForm: self soundTrackHeight\\\\n\\\\t\\\\tfrom: (startTime * samplesPerMs) rounded\\\\n\\\\t\\\\tto: (stopTime * samplesPerMs) rounded\\\\n\\\\t\\\\tnSamplesPerPixel: samplesPerTick / soundTrackTimeScale.\\\\n\\\\t^ soundTrackMorph := ImageMorph new image: soundTrackForm! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'private' stamp: 'di 10/29/2000 08:02'!\\\\nsetEndFrameNumber: frame\\\\n\\\\n\\\\tself setEndFrameNumber: frame tickTime: nil! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nsetEndFrameNumber: frameOrNil tickTime: timeOrNil\\\\n\\\\t\\\\\\\"May be called with either time or frame being nil,\\\\n\\\\tin which case the other will br computed.\\\\\\\"\\\\n\\\\n\\\\t| pianoRoll frame time |\\\\n\\\\tpianoRoll := movieClipPlayer pianoRoll.\\\\n\\\\tframe := frameOrNil ifNil:\\\\n\\\\t\\\\t[frameNumber + \\\\n\\\\t\\\\t\\\\t((timeOrNil - self startTime)\\\\n\\\\t\\\\t\\\\t* (pianoRoll scorePlayer secsPerTick*1000.0)\\\\n\\\\t\\\\t\\\\t/ moviePlayerMorph msPerFrame) asInteger - 1].\\\\n\\\\ttime := timeOrNil ifNil:\\\\n\\\\t\\\\t[self startTime +   \\\\\\\"in ticks\\\\\\\"\\\\n\\\\t\\\\t\\\\t(pianoRoll scorePlayer ticksForMSecs:\\\\n\\\\t\\\\t\\\\t(frameOrNil - frameNumber) * moviePlayerMorph msPerFrame)].\\\\n\\\\tendMorph ifNil:\\\\n\\\\t\\\\t[endMorph := MovieClipEndMorph new\\\\n\\\\t\\\\t\\\\tmovieFileName: movieClipFileName\\\\n\\\\t\\\\t\\\\timage: (moviePlayerMorph pageFormForFrame: frame)\\\\n\\\\t\\\\t\\\\tplayer: movieClipPlayer\\\\n\\\\t\\\\t\\\\tframeNumber: frame]\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t[endMorph image: (moviePlayerMorph pageFormForFrame: frame)\\\\n\\\\t\\\\t\\\\tframeNumber: frame].\\\\n\\\\n\\\\tendMorph scoreEvent time: time.\\\\n\\\\tpianoRoll score removeAmbientEventWithMorph: endMorph;\\\\n\\\\t\\\\taddAmbientEvent: endMorph scoreEvent.\\\\n\\\\tsoundTrackMorph := nil.  \\\\\\\"Force it to be recomputed.\\\\\\\"\\\\n\\\\tpianoRoll rebuildFromScore\\\\n! !\\\\n\\\\n!MovieClipStartMorph methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nsetTimeInScore: score near: dropTime\\\\n\\\\t\\\\\\\"Find a time to place this clip that does not overlap other clips.\\\\n\\\\tSo, if I start in the middle of another clip, move me to the end of it,\\\\n\\\\tand if I start very soon after another clip, put me right at the end.\\\\n\\\\tThen, if my end goes beyond the start of another clip, shorten me\\\\n\\\\tso I end right before that clip.\\\\\\\"\\\\n\\\\n\\\\t| startTime endTime delta endFrame |\\\\n\\\\tstartTime := dropTime.\\\\n\\\\tendMorph ifNil: [endFrame := moviePlayerMorph frameCount]\\\\n\\\\t\\\\t\\\\tifNotNil: [endFrame := endMorph frameNumber].\\\\n\\\\tendTime := startTime   \\\\\\\"in ticks\\\\\\\"\\\\n\\\\t\\\\t+ (movieClipPlayer pianoRoll scorePlayer ticksForMSecs:\\\\n\\\\t\\\\t\\\\t(endFrame - frameNumber)\\\\n\\\\t\\\\t\\\\t* moviePlayerMorph msPerFrame).\\\\n\\\\tscore eventMorphsDo:\\\\n\\\\t\\\\t[:m | (m ~~ self and: [m isMemberOf: self class]) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[((startTime between: m startTime and: m endTime)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tor: [startTime between: m endTime and: m endTime+50])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"If I start in the middle of another clip, or a little\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tpast its end, move me exactly to the end of it\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdelta := (m endTime + 1) - startTime.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartTime := startTime + delta.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tendTime := endTime + delta].\\\\n\\\\t\\\\t\\\\t\\\\t(endTime between: m startTime and: m endTime)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"If my end goes overlaps another clip, shorten me so I fit.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tendTime := m startTime - 1].\\\\n\\\\t\\\\t\\\\t\\\\t]].\\\\n\\\\tscoreEvent time: startTime.\\\\n\\\\tscore removeAmbientEventWithMorph: self;\\\\n\\\\t\\\\t\\\\taddAmbientEvent: scoreEvent.\\\\n\\\\tself setEndFrameNumber: endFrame tickTime: endTime.\\\\n! !\\\\nImageMorph subclass: #MovieFrameSyncMorph\\\\n\\\\tinstanceVariableNames: 'moviePlayerMorph frameNumber'\\\\n\\\\tclassVariableNames: 'ColorIndex'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Movies-Player'!\\\\n!MovieFrameSyncMorph commentStamp: '<historical>' prior: 0!\\\\nThis class and its subclasses act to syncronize movie players with the progress of a MIDI score and further background can be found in the comment for MoviePlayerMorph.\\\\n\\\\nThere are two main forms of synchroniztion.\\\\n\\\\nMovieFrameSyncMorphs are used where you have a MIDI score open with a piano roll, and a separate MoviePlayer Morph.  A MovieFrameSyncMorph can be torn off from the MoviePlayer with a shift-drag gesture or menu command, and can then be dropped into a MIDI score.  They are used to start a movie player at a given place in the score, and then to stretch or compress the movie frame rate so that certain frames are synchronized with the corresponding points in the score.\\\\n\\\\nMovieClipStartMorphs (q.v.) and MovieClipEndMorphs are used for the other kind of synchronization, namely where you wish to assemble a number of movie clips in a sequence.!\\\\n\\\\n\\\\n!MovieFrameSyncMorph methodsFor: 'access' stamp: 'di 8/6/1998 14:13'!\\\\nframeNumber\\\\n\\\\t^ frameNumber! !\\\\n\\\\n!MovieFrameSyncMorph methodsFor: 'access' stamp: 'di 10/11/2000 21:39'!\\\\nmoviePlayerMorph\\\\n \\\\n\\\\t^ moviePlayerMorph! !\\\\n\\\\n!MovieFrameSyncMorph methodsFor: 'access' stamp: 'di 10/25/2000 22:02'!\\\\nrelatedPlayer\\\\n \\\\n\\\\t^ moviePlayerMorph! !\\\\n\\\\n\\\\n!MovieFrameSyncMorph methodsFor: 'dropping/grabbing' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\njustDroppedInto: newOwner event: evt \\\\n\\\\t| pianoRoll |\\\\n\\\\t\\\\\\\"When dropping this morph into a pianoRoll, add a corresponding\\\\n\\\\tevent to the score so that it will always appear when played,\\\\n\\\\tin addition to possibly triggering other actions\\\\\\\"\\\\n\\\\n\\\\t(self isMemberOf: MovieFrameSyncMorph) ifFalse:\\\\n\\\\t\\\\t[^ super justDroppedInto: newOwner event: evt].\\\\n\\\\n\\\\t(newOwner isKindOf: PianoRollScoreMorph)\\\\n\\\\tifTrue:\\\\n\\\\t\\\\t[\\\\\\\"Legacy code for existing sync morphs\\\\\\\"\\\\n\\\\t\\\\tpianoRoll := newOwner.\\\\n\\\\t\\\\tpianoRoll score\\\\n\\\\t\\\\t\\\\tremoveAmbientEventWithMorph: self;\\\\n\\\\t\\\\t\\\\taddAmbientEvent: (AmbientEvent new\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmorph: self;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttime: (pianoRoll timeForX: self left))].\\\\n\\\\n\\\\tsuper justDroppedInto: newOwner event: evt\\\\n! !\\\\n\\\\n\\\\n!MovieFrameSyncMorph methodsFor: 'events' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nnextSyncEventAfter: index inTrack: track\\\\n\\\\t| evt |\\\\n\\\\tindex to: track size do:\\\\n\\\\t\\\\t[:i | evt := track at: i.\\\\n\\\\t\\\\t((evt morph isMemberOf: self class)\\\\n\\\\t\\\\t\\\\tand: [evt morph moviePlayerMorph == moviePlayerMorph])\\\\n\\\\t\\\\t\\\\tifTrue: [^ evt]].\\\\n\\\\t^ nil! !\\\\n\\\\n\\\\n!MovieFrameSyncMorph methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nimage: aForm player: aMoviePlayer frameNumber: n\\\\n\\\\tself image: aForm.\\\\n\\\\tmoviePlayerMorph := aMoviePlayer.\\\\n\\\\tframeNumber := n! !\\\\n\\\\n\\\\n!MovieFrameSyncMorph methodsFor: 'piano rolls' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\naddMorphsTo: morphList pianoRoll: pianoRoll eventTime: t betweenTime: leftTime and: rightTime\\\\n\\\\n\\\\t| leftX |\\\\n\\\\tt > rightTime ifTrue: [^ self  \\\\\\\"Start time has not come into view.\\\\\\\"].  \\\\n\\\\tleftX := pianoRoll xForTime: t.\\\\n\\\\t(leftX + self width) < pianoRoll left ifTrue: [^ self  \\\\\\\"End time has passed out of view.\\\\\\\"].\\\\n\\\\tmorphList add: \\\\n\\\\t\\\\t(self align: self bottomLeft\\\\n\\\\t\\\\t\\\\twith: leftX @ (pianoRoll bottom - pianoRoll borderWidth)).\\\\n! !\\\\n\\\\n!MovieFrameSyncMorph methodsFor: 'piano rolls' stamp: 'dgd 2/21/2003 22:58'!\\\\nencounteredAtTime: ticks inScorePlayer: scorePlayer atIndex: index inEventTrack: track secsPerTick: secsPerTick \\\\n\\\\t\\\\\\\"Set frame number and milliseconds since start in case of drift\\\\\\\"\\\\n\\\\n\\\\t| next |\\\\n\\\\tmoviePlayerMorph frameNumber: frameNumber\\\\n\\\\t\\\\tmsSinceStart: scorePlayer millisecondsSinceStart.\\\\n\\\\n\\\\t\\\\\\\"If there is a later sync point, set the appropriate frame rate until then.\\\\\\\"\\\\n\\\\t(next := self nextSyncEventAfter: index inTrack: track) isNil \\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[moviePlayerMorph msPerFrame: (next time - ticks) * secsPerTick * 1000.0 \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t/ (next morph frameNumber - self frameNumber)]! !\\\\n\\\\n!MovieFrameSyncMorph methodsFor: 'piano rolls' stamp: 'RAA 12/11/2000 22:58'!\\\\njustDroppedIntoPianoRoll: pianoRoll event: evt\\\\n\\\\n\\\\t\\\\\\\"since these morphs handle their own dropping, ignore\\\\\\\"! !\\\\n\\\\n!MovieFrameSyncMorph methodsFor: 'piano rolls' stamp: 'di 10/25/2000 22:03'!\\\\npauseFrom: scorePlayer\\\\n\\\\n\\\\tself relatedPlayer pauseFrom: scorePlayer! !\\\\n\\\\n!MovieFrameSyncMorph methodsFor: 'piano rolls' stamp: 'di 10/25/2000 22:02'!\\\\nresetFrom: scorePlayer\\\\n\\\\n\\\\tself relatedPlayer resetFrom: scorePlayer! !\\\\n\\\\n!MovieFrameSyncMorph methodsFor: 'piano rolls' stamp: 'di 10/25/2000 22:03'!\\\\nresumeFrom: scorePlayer\\\\n\\\\n\\\\tself relatedPlayer resumeFrom: scorePlayer! !\\\\nMorph subclass: #MovieMorph\\\\n\\\\tinstanceVariableNames: 'playMode msecsPerFrame rotationDegrees scalePoint frameList currentFrameIndex dwellCount'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Basic'!\\\\n\\\\n!MovieMorph methodsFor: 'accessing'!\\\\nform\\\\n\\\\n\\\\t^ self currentFrame form\\\\n! !\\\\n\\\\n!MovieMorph methodsFor: 'accessing' stamp: 'jm 7/24/97 15:05'!\\\\nscalePoint\\\\n\\\\n\\\\t^ scalePoint\\\\n! !\\\\n\\\\n!MovieMorph methodsFor: 'accessing' stamp: 'jm 7/24/97 15:05'!\\\\nscalePoint: newScalePoint\\\\n\\\\n\\\\t| frame |\\\\n\\\\tnewScalePoint ~= scalePoint ifTrue: [\\\\n\\\\t\\\\tself changed.\\\\n\\\\t\\\\tscalePoint _ newScalePoint.\\\\n\\\\t\\\\tframe _ self currentFrame.\\\\n\\\\t\\\\tframe ifNotNil: [frame scalePoint: newScalePoint].\\\\n\\\\t\\\\tself layoutChanged.\\\\n\\\\t\\\\tself changed].\\\\n! !\\\\n\\\\n\\\\n!MovieMorph methodsFor: 'drawing' stamp: 'dgd 2/22/2003 18:47'!\\\\ndrawOn: aCanvas \\\\n\\\\t| frame |\\\\n\\\\tframe := self currentFrame.\\\\n\\\\tframe notNil \\\\n\\\\t\\\\tifTrue: [^frame drawOn: aCanvas]\\\\n\\\\t\\\\tifFalse: [^super drawOn: aCanvas]! !\\\\n\\\\n\\\\n!MovieMorph methodsFor: 'geometry testing' stamp: 'dgd 2/22/2003 18:48'!\\\\ncontainsPoint: p \\\\n\\\\t| frame |\\\\n\\\\tframe := self currentFrame.\\\\n\\\\t^ (frame notNil and: [playMode = #stop]) \\\\n\\\\t\\\\tifTrue: [frame containsPoint: p]\\\\n\\\\t\\\\tifFalse: [super containsPoint: p]! !\\\\n\\\\n\\\\n!MovieMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:28'!\\\\ndefaultColor\\\\n\\\\t\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color\\\\n\\\\t\\\\tr: 1\\\\n\\\\t\\\\tg: 0\\\\n\\\\t\\\\tb: 1! !\\\\n\\\\n!MovieMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 21:47'!\\\\ninitialize\\\\n\\\\t\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\n\\\\tplayMode _ #stop.\\\\n\\\\t\\\\\\\"#stop, #playOnce, or #loop\\\\\\\"\\\\n\\\\tmsecsPerFrame _ 200.\\\\n\\\\trotationDegrees _ 0.\\\\n\\\\tscalePoint _ 1.0 @ 1.0.\\\\n\\\\tframeList _ EmptyArray.\\\\n\\\\tcurrentFrameIndex _ 1.\\\\n\\\\tdwellCount _ 0! !\\\\n\\\\n\\\\n!MovieMorph methodsFor: 'menu' stamp: 'nk 6/12/2004 09:59'!\\\\naddCustomMenuItems: aCustomMenu hand: aHandMorph\\\\n\\\\n\\\\t| movies subMenu |\\\\n\\\\tsuper addCustomMenuItems: aCustomMenu hand: aHandMorph.\\\\n\\\\taCustomMenu addLine.\\\\n\\\\tsubMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\tframeList size > 1 ifTrue: [\\\\n\\\\t\\\\tsubMenu add: 'repaint' translated action: #editDrawing.\\\\n\\\\t\\\\tsubMenu add: 'set rotation center' translated action: #setRotationCenter.\\\\n\\\\t\\\\tsubMenu add: 'play once' translated action: #playOnce.\\\\n\\\\t\\\\tsubMenu add: 'play loop' translated action: #playLoop.\\\\n\\\\t\\\\tsubMenu add: 'stop playing' translated action: #stopPlaying.\\\\n\\\\t\\\\tcurrentFrameIndex > 1 ifTrue: [\\\\n\\\\t\\\\t\\\\tsubMenu add: 'previous frame' translated action: #previousFrame].\\\\n\\\\t\\\\tcurrentFrameIndex < frameList size ifTrue: [\\\\n\\\\t\\\\t\\\\tsubMenu add: 'next frame' translated action: #nextFrame]].\\\\n\\\\tsubMenu add: 'extract this frame' translated action: #extractFrame:.\\\\n\\\\tmovies _\\\\n\\\\t\\\\t(self world rootMorphsAt: aHandMorph targetOffset)\\\\n\\\\t\\\\t\\\\tselect: [:m | (m isKindOf: MovieMorph) or:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[m isSketchMorph]].\\\\n\\\\t(movies size > 1) ifTrue:\\\\n\\\\t\\\\t[subMenu add: 'insert into movie' translated action: #insertIntoMovie:].\\\\n\\\\taCustomMenu add: 'movie...' translated subMenu: subMenu\\\\n! !\\\\n\\\\n!MovieMorph methodsFor: 'menu'!\\\\nadvanceFrame\\\\n\\\\n\\\\tcurrentFrameIndex < frameList size\\\\n\\\\t\\\\tifTrue: [self setFrame: currentFrameIndex + 1]\\\\n\\\\t\\\\tifFalse: [self setFrame: 1].\\\\n! !\\\\n\\\\n!MovieMorph methodsFor: 'menu' stamp: 'dgd 2/22/2003 18:47'!\\\\neditDrawing\\\\n\\\\t| frame |\\\\n\\\\tframe := self currentFrame.\\\\n\\\\tframe notNil \\\\n\\\\t\\\\tifTrue: [frame editDrawingIn: self pasteUpMorph forBackground: false]! !\\\\n\\\\n!MovieMorph methodsFor: 'menu'!\\\\nextractFrame: evt\\\\n\\\\n\\\\t| f |\\\\n\\\\tf _ self currentFrame.\\\\n\\\\tf ifNil: [^ self].\\\\n\\\\tframeList _ frameList copyWithout: f.\\\\n\\\\tframeList isEmpty\\\\n\\\\t\\\\tifTrue: [self position: f position]\\\\n\\\\t\\\\tifFalse: [self setFrame: currentFrameIndex].\\\\n\\\\tevt hand attachMorph: f.\\\\n! !\\\\n\\\\n!MovieMorph methodsFor: 'menu' stamp: 'nk 6/12/2004 09:59'!\\\\ninsertIntoMovie: evt\\\\n\\\\n\\\\t| movies aTarget |\\\\n\\\\tmovies _\\\\n\\\\t\\\\t(self world rootMorphsAt: evt hand targetOffset)\\\\n\\\\t\\\\t\\\\tselect: [:m | ((m isKindOf: MovieMorph) or:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t [m isSketchMorph]) and: [m ~= self]].\\\\n\\\\tmovies isEmpty ifTrue: [^ self].\\\\n\\\\taTarget _ movies first.\\\\n\\\\t(aTarget isSketchMorph) ifTrue:\\\\n\\\\t\\\\t[aTarget _ aTarget replaceSelfWithMovie].\\\\n\\\\tmovies first insertFrames: frameList.\\\\n\\\\tself delete.\\\\n! !\\\\n\\\\n!MovieMorph methodsFor: 'menu'!\\\\nnextFrame\\\\n\\\\n\\\\tcurrentFrameIndex < frameList size\\\\n\\\\t\\\\tifTrue: [self setFrame: currentFrameIndex + 1].\\\\n! !\\\\n\\\\n!MovieMorph methodsFor: 'menu'!\\\\nplayLoop\\\\n\\\\n\\\\tplayMode _ #loop.\\\\n! !\\\\n\\\\n!MovieMorph methodsFor: 'menu'!\\\\nplayOnce\\\\n\\\\n\\\\tself setFrame: 1.\\\\n\\\\tplayMode _ #playOnce.\\\\n! !\\\\n\\\\n!MovieMorph methodsFor: 'menu'!\\\\npreviousFrame\\\\n\\\\n\\\\tcurrentFrameIndex > 1\\\\n\\\\t\\\\tifTrue: [self setFrame: currentFrameIndex - 1].\\\\n! !\\\\n\\\\n!MovieMorph methodsFor: 'menu'!\\\\nstopPlaying\\\\n\\\\n\\\\tplayMode _ #stop.\\\\n\\\\tself setFrame: 1.\\\\n! !\\\\n\\\\n\\\\n!MovieMorph methodsFor: 'rotate scale and flex'!\\\\nrotationDegrees\\\\n\\\\n\\\\t^ rotationDegrees\\\\n! !\\\\n\\\\n\\\\n!MovieMorph methodsFor: 'stepping and presenter'!\\\\nstep\\\\n\\\\n\\\\tplayMode = #stop ifTrue: [^ self].\\\\n\\\\n\\\\tdwellCount > 0 ifTrue: [\\\\n\\\\t\\\\tdwellCount _ dwellCount - 1.\\\\n\\\\t\\\\t^ self].\\\\n\\\\n\\\\tcurrentFrameIndex < frameList size\\\\n\\\\t\\\\tifTrue: [^ self setFrame: currentFrameIndex + 1].\\\\n\\\\n\\\\tplayMode = #loop\\\\n\\\\t\\\\tifTrue: [self setFrame: 1]\\\\n\\\\t\\\\tifFalse: [playMode _ #stop].\\\\n! !\\\\n\\\\n\\\\n!MovieMorph methodsFor: 'testing'!\\\\nstepTime\\\\n\\\\n\\\\t^ msecsPerFrame\\\\n! !\\\\n\\\\n\\\\n!MovieMorph methodsFor: 'private' stamp: 'jdl 3/28/2003 08:03'!\\\\ncurrentFrame\\\\n\\\\tframeList isEmpty ifTrue: [^nil].\\\\n     currentFrameIndex := currentFrameIndex min: (frameList size).\\\\n     currentFrameIndex := currentFrameIndex max: 1.\\\\n\\\\t^frameList at: currentFrameIndex! !\\\\n\\\\n!MovieMorph methodsFor: 'private'!\\\\ninsertFrames: newFrames\\\\n\\\\t\\\\\\\"Insert the given collection of frames into this movie just after the currentrame.\\\\\\\"\\\\n\\\\n\\\\tframeList isEmpty ifTrue: [\\\\n\\\\t\\\\tframeList _ newFrames asArray copy.\\\\n\\\\t\\\\tself setFrame: 1.\\\\n\\\\t\\\\t^ self].\\\\n\\\\n\\\\tframeList _\\\\n\\\\t\\\\tframeList\\\\n\\\\t\\\\t\\\\tcopyReplaceFrom: currentFrameIndex + 1  \\\\\\\"insert before\\\\\\\"\\\\n\\\\t\\\\t\\\\tto: currentFrameIndex\\\\n\\\\t\\\\t\\\\twith: newFrames.\\\\n! !\\\\n\\\\n!MovieMorph methodsFor: 'private' stamp: 'jdl 3/28/2003 08:08'!\\\\nsetFrame: newFrameIndex \\\\n\\\\t| oldFrame p newFrame |\\\\n\\\\toldFrame := self currentFrame.\\\\n\\\\toldFrame ifNil: [^self].\\\\n\\\\tself changed.\\\\n\\\\tp := oldFrame referencePosition.\\\\n\\\\tcurrentFrameIndex := newFrameIndex.\\\\n     currentFrameIndex :=  currentFrameIndex min: (frameList size). \\\\n\\\\tcurrentFrameIndex := currentFrameIndex max: 1.\\\\n\\\\tnewFrame := frameList at: currentFrameIndex.\\\\n\\\\tnewFrame referencePosition: p.\\\\n\\\\toldFrame delete.\\\\n\\\\tself addMorph: newFrame.\\\\n\\\\tdwellCount := newFrame framesToDwell.\\\\n\\\\tself layoutChanged.\\\\n\\\\tself changed! !\\\\nBookMorph subclass: #MoviePlayerMorph\\\\n\\\\tinstanceVariableNames: 'movieFileName movieFile frameSize frameDepth frameNumber frameCount playDirection msSinceStart msAtStart msAtLastSync frameAtLastSync msPerFrame frameBufferIfScaled soundTrackFileName scorePlayer soundTrackForm soundTrackMorph pianoRoll cueMorph'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Movies-Player'!\\\\n!MoviePlayerMorph commentStamp: '<historical>' prior: 0!\\\\nMoviePlayerMorph plays images from a file using async io.  The file format is simple but non-standard (see below).\\\\n\\\\nThe heart of the play logic is in the step method.  Note that play is driven by a simulated time since start.  For a movie with a sound score, this is the millisecondsSinceStart of the score player, whereas a movie by itself gets this from the millisecondClock minus msAtStart.\\\\n\\\\nMovie players are designed to be used in three ways\\\\n\\\\t1.  Select a movie in the file list, 'open as movie', and play it.\\\\n\\\\t2.  As in (1), but drop thumbnails for various frames into a\\\\n\\\\t\\\\tMIDI piano roll to synchronize video with music.\\\\n\\\\t3.  Open a MoviePlayerMorph as a 'new morph', and choose\\\\n\\\\t\\\\t'make a new movie' from the menu.\\\\n\\\\nIn (1) and (2), a shift-drag is used to 'tear off' a thumbnail reference morph to the currently visible frame of this clips.  The thumbnail can then be dropped in a MIDI score player to either syncronize that frame with what point in the music, or to cause that clip to being playing in the shared player of a SqueakMovie plex.\\\\n\\\\nWhen making a new movie, an empty score and piano roll are linked to the movie player, as a SqueakMovie plex. You can then open another movie as a clip, and drop a thumbnail morph into the score to start that clip playing at that frame in the shared player.  If you pause while playing that clip, you can manually play the clip forward and backward in the current clip.  if you stop at a given frame, you can choose 'end clip here' from the shared player menu to shorten or lengthen the clip.\\\\n\\\\nClips can be moved by picking up the starting thumbnail (use halo black handle), and dropping them elsewhere.  If you try to place one clip in the middle of another, it will slide to the end.  If you position one clip close to the end of another, it will sidle up to make them contiguous.\\\\n\\\\nIf you wish a soundtrack to be included with a clip, make sure it has been opened in the source clip player before tearing off the starting thumbnail.\\\\n\\\\nAbout the .movie file format...\\\\nThe following code was used to convert 27 files into a movie.  They were named\\\\n\\\\t'BalloonDrop10fps003.bmp' through 'BalloonDrop10fps081.bmp'\\\\nincrementing by 003.  Each was known to be a 320x240 image in 32-bit BMP format.\\\\nNote the 27 in the 5th line is the number of frames, = (3 to: 81 by: 3) size.\\\\n\\\\n\\\\t| ps zps f32 out ff |\\\\n\\\\tout _ FileStream newFileNamed: 'BalloonDrop10fps.movie'.\\\\n\\\\tout binary.\\\\n\\\\tff _ Form extent: 320@240 depth: 16.\\\\n\\\\t#(22 320 240 16 27 100000) , (7 to: 32)\\\\n\\\\t\\\\tdo: [:i | out nextInt32Put: i].\\\\n\\\\t\\\\t\\\\n\\\\t3 to: 81 by: 3 do:\\\\n\\\\t\\\\t[:i | ps _ i printString. zps _ ps padded: #left to: 3 with: $0.\\\\n\\\\t\\\\tf32 _ Form fromFileNamed:\\\\n\\\\t\\\\t\\\\t'BalloonDrop10fps' , zps , '.bmp'.\\\\n\\\\t\\\\tf32 displayOn: ff at: 0@0.  \\\\\\\"Convert down to 16 bits\\\\\\\"\\\\n\\\\t\\\\tff display; writeOnMovie: out].\\\\n\\\\tout close.\\\\n!\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'access' stamp: 'di 10/26/2000 00:18'!\\\\ncueMorph\\\\n\\\\t^ cueMorph! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'access' stamp: 'di 10/4/2000 17:19'!\\\\nfileName\\\\n\\\\t^ movieFileName! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'access' stamp: 'di 10/22/2000 10:54'!\\\\nframeCount\\\\n\\\\n\\\\t^ frameCount! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'access' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nframeNumber: n\\\\n\\\\n\\\\tframeNumber := n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'access' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nframeNumber: n msSinceStart: ms\\\\n\\\\t\\\\\\\"Set the current frame number, and save the scorePlayer's simulated time for synchronization.\\\\\\\"\\\\n\\\\n\\\\tframeAtLastSync := n.\\\\n\\\\tmsAtLastSync := ms.\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'access' stamp: 'di 10/19/2000 16:31'!\\\\nmsPerFrame\\\\n\\\\t^ msPerFrame! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'access' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nmsPerFrame: n\\\\n\\\\t\\\\\\\"Set a new frame rate, base on, eg, score synchronization info.\\\\\\\"\\\\n\\\\n\\\\tmsPerFrame := n.\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'access' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\npageFormForFrame: frameNo\\\\n\\\\n\\\\t| f form oldFrame |\\\\noldFrame := frameNumber.\\\\nself goToPage: frameNo.\\\\nform := currentPage image deepCopy.\\\\nself goToPage: oldFrame.\\\\ntrue ifTrue: [^ form].\\\\n\\\\n\\\\tf := FileStream readOnlyFileNamed: movieFileName.\\\\n\\\\tform := Form extent: frameSize depth: frameDepth.\\\\n\\\\n\\\\t\\\\\\\"For some weird reason, the next line does not work...\\\\\\\"\\\\n\\\\tf position: (self filePosForFrameNo: frameNo).\\\\n\\\\t\\\\\\\"... but this line was found empirically to work instead.\\\\\\\"\\\\n\\\\tf position: (128 + ((frameNo-1)*(form bits size*4+4)) + 4).\\\\n\\\\n\\\\tf nextInto: form bits.\\\\n\\\\tf close.\\\\n\\\\t^ form! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'access' stamp: 'di 10/15/2000 19:15'!\\\\nrelativePosition\\\\n\\\\n\\\\t^ frameNumber asFloat / frameCount! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'access' stamp: 'di 10/11/2000 12:13'!\\\\nscorePlayer\\\\n\\\\n\\\\t^ scorePlayer! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'access' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nscorePlayer: aScorePlayer\\\\n\\\\n\\\\tscorePlayer := aScorePlayer! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'access' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nsetCueMorph: aMorph\\\\n\\\\tcueMorph := aMorph\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'access' stamp: 'di 10/13/2000 11:51'!\\\\nsoundTrackFileName\\\\n\\\\t^ soundTrackFileName! !\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'controls and layout' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nshowHideSoundTrack\\\\n\\\\n\\\\tsoundTrackForm ifNotNil:\\\\n\\\\t\\\\t[soundTrackMorph delete.\\\\n\\\\t\\\\t^ soundTrackForm := soundTrackMorph := nil].\\\\n\\\\n\\\\tsoundTrackForm := scorePlayer volumeForm: 20 from: 1 to: scorePlayer samples size nSamplesPerPixel: 250.\\\\n\\\\tsoundTrackMorph := ImageMorph new image: (Form extent: 140 @ soundTrackForm height).\\\\n\\\\tsoundTrackMorph addMorph:\\\\n\\\\t\\\\t(Morph newBounds: (soundTrackMorph bounds topCenter extent: 1@soundTrackMorph height)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcolor: Color red).\\\\n\\\\tself addMorph: soundTrackMorph after: currentPage.\\\\n\\\\tself layoutChanged.\\\\n\\\\tself stepSoundTrack.\\\\n! !\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'copying' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nduplicate\\\\n\\\\t| dup |\\\\n\\\\tplayDirection ~= 0 ifTrue: [self stopPlay].\\\\n\\\\tdup := super duplicate.\\\\n\\\\tdup scorePlayer: scorePlayer copy.  \\\\\\\"Share sound track if any.\\\\\\\"\\\\n\\\\t^ dup duplicateMore startStepping! !\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'event handling' stamp: 'di 10/16/2000 13:27'!\\\\nhandlesMouseDown: evt\\\\n\\\\t\\\\\\\"We use shift drag to 'tear off' a thumbnail\\\\\\\"\\\\n\\\\n\\\\tevt shiftPressed ifTrue: [^ true].\\\\n\\\\t^ super handlesMouseDown: evt! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'event handling' stamp: 'di 10/16/2000 13:32'!\\\\nmouseDown: evt\\\\n\\\\t\\\\\\\"We use shift drag to 'tear off' a thumbnail\\\\\\\"\\\\n\\\\n\\\\tevt shiftPressed ifTrue: [^ self makeThumbnailInHand: evt hand].\\\\n\\\\t^ super mouseDown: evt\\\\n\\\\t\\\\t! !\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'geometry' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nextent: newExtent\\\\n\\\\n\\\\t| tlMargin brMargin pageExtent scale fullSizeImage |\\\\n\\\\tfullSizeImage := frameBufferIfScaled ifNil: [currentPage image].\\\\n\\\\tframeCount ifNil: [^ self].  \\\\\\\"Not yet open\\\\\\\"\\\\n\\\\ttlMargin := currentPage topLeft - self topLeft.\\\\n\\\\tbrMargin := self bottomRight - currentPage bottomRight.\\\\n\\\\tpageExtent := newExtent - brMargin - tlMargin.\\\\n\\\\tscale := pageExtent x asFloat / frameSize x min: pageExtent y asFloat / frameSize y.\\\\n\\\\t(scale := scale max: 0.25) > 0.9 ifTrue: [scale := 1.0].\\\\n\\\\n\\\\tpageExtent := (frameSize * scale) rounded.\\\\n\\\\tpageExtent = frameSize\\\\n\\\\t\\\\tifTrue: [currentPage image: fullSizeImage.\\\\n\\\\t\\\\t\\\\t\\\\tframeBufferIfScaled := nil]\\\\n\\\\t\\\\tifFalse: [currentPage image: (Form extent: pageExtent depth: frameDepth).\\\\n\\\\t\\\\t\\\\t\\\\tframeBufferIfScaled := fullSizeImage.\\\\n\\\\t\\\\t\\\\t\\\\t(WarpBlt current toForm: currentPage image) sourceForm: fullSizeImage;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcombinationRule: 3;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcopyQuad: fullSizeImage boundingBox innerCorners\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttoRect: currentPage image boundingBox].\\\\n\\\\t^ self layoutChanged\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'geometry' stamp: 'dgd 2/22/2003 19:01'!\\\\nposition: newPos \\\\n\\\\tsuper position: newPos.\\\\n\\\\t(currentPage notNil and: [currentPage left odd]) \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"crude word alignment for depth = 16\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\tsuper position: newPos + (1 @ 0)]! !\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:38'!\\\\ndefaultBorderWidth\\\\n\\\\t\\\\\\\"answer the default border width for the receiver\\\\\\\"\\\\n\\\\t^ 2! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:29'!\\\\ndefaultColor\\\\n\\\\t\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color veryLightGray! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nduplicateMore\\\\n\\\\t\\\\\\\"Duplicate dies not replicate Forms, but MoviePlayers need this.\\\\\\\"\\\\n\\\\n\\\\tframeBufferIfScaled := frameBufferIfScaled deepCopy.\\\\n\\\\tcurrentPage image: currentPage image deepCopy.\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'initialization' stamp: 'di 10/8/2000 21:43'!\\\\nopenFileNamed: fName \\\\n\\\\tself pvtOpenFileNamed: fName.\\\\n\\\\tself goToPage: 1! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nopenFileNamed: fName withScorePlayer: playerReady andPlayFrom: frameNo\\\\n\\\\t\\\\\\\"Note: The plan is that the score player (a SampledSound) is already spaced\\\\n\\\\tforward to this frame number so it does not need to be reset as would normally\\\\n\\\\thappen in startRunning.\\\\\\\"\\\\n\\\\n\\\\tself pvtOpenFileNamed: fName.\\\\n\\\\tscorePlayer := playerReady.\\\\n\\\\tframeNumber := frameNo.\\\\n\\\\tframeAtLastSync := frameNo.\\\\n\\\\tmsAtLastSync := frameAtLastSync * msPerFrame.\\\\n\\\\tself playForward.! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nsetInitialState\\\\n\\\\tsuper setInitialState.\\\\n\\\\\\\"\\\\\\\"\\\\n\\\\tself layoutInset: 3.\\\\n\\\\tpageSize := frameSize := 200 @ 200.\\\\n\\\\tframeDepth := 8.\\\\n\\\\tself disableDragNDrop! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'initialization' stamp: 'dgd 2/22/2003 13:22'!\\\\nstopSoundTrackIfAny\\\\n\\\\tscorePlayer isNil ifTrue: [^self].\\\\n\\\\t(scorePlayer isKindOf: SampledSound) \\\\n\\\\t\\\\tifTrue: [scorePlayer endGracefully]\\\\n\\\\t\\\\tifFalse: [scorePlayer := nil]! !\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'menu' stamp: 'dgd 2/22/2003 13:21'!\\\\naddSoundTrack\\\\n\\\\t| fileName |\\\\n\\\\tfileName := Utilities chooseFileWithSuffixFromList: #('.aif' '.wav')\\\\n\\\\t\\\\t\\\\t\\\\twithCaption: 'Choose a sound track file'.\\\\n\\\\tfileName isNil ifTrue: [^self].\\\\n\\\\tsoundTrackFileName := fileName.\\\\n\\\\tself tryToShareScoreFor: soundTrackFileName.\\\\n\\\\tscorePlayer ifNil: \\\\n\\\\t\\\\t\\\\t[('*aif' match: fileName) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [scorePlayer := SampledSound fromAIFFfileNamed: fileName].\\\\n\\\\t\\\\t\\\\t('*wav' match: fileName) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [scorePlayer := SampledSound fromWaveFileNamed: fileName]].\\\\n\\\\tsoundTrackForm ifNotNil: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"Compute new soundTrack if we're showing it.\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\t\\\\tshowHideSoundTrack;\\\\n\\\\t\\\\t\\\\t\\\\tshowHideSoundTrack]! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'menu' stamp: 'di 10/19/2000 17:07'!\\\\nendClipHere\\\\n\\\\t\\\\\\\"Change set the termination time for this clip via the endMorph\\\\\\\"\\\\n\\\\n\\\\tcueMorph ifNil: [^ self].\\\\n\\\\tcueMorph setEndFrameNumber: frameNumber\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'menu' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\ninvokeBookMenu\\\\n\\\\t\\\\\\\"Invoke the book's control panel menu.\\\\\\\"\\\\n\\\\t| aMenu |\\\\n\\\\taMenu := MVCMenuMorph new defaultTarget: self.\\\\n\\\\taMenu add:\\\\t'make a new movie' translated action: #makeAMovie.\\\\n\\\\taMenu add:\\\\t'open movie file' translated action: #openMovieFile.\\\\n\\\\taMenu add:\\\\t'add sound track' translated action: #addSoundTrack.\\\\n\\\\taMenu addLine.\\\\n\\\\tscorePlayer ifNotNil:\\\\n\\\\t\\\\t[soundTrackForm isNil\\\\n\\\\t\\\\t\\\\tifTrue: [aMenu add:\\\\t'show sound track' translated action: #showHideSoundTrack]\\\\n\\\\t\\\\t\\\\tifFalse: [aMenu add:\\\\t'hide sound track' translated action: #showHideSoundTrack]].\\\\n\\\\taMenu add:\\\\t'make thumbnail' translated action: #thumbnailForThisPage.\\\\n\\\\tcueMorph ifNotNil:\\\\n\\\\t\\\\t[\\\\\\\"Should check if piano roll and score already have a start event\\\\n\\\\t\\\\tprior to this time.\\\\\\\"\\\\n\\\\t\\\\taMenu add:\\\\t'end clip here' translated action: #endClipHere].\\\\n\\\\n\\\\taMenu popUpEvent: self world activeHand lastEvent in: self world\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'menu' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nmakeAMovie\\\\n\\\\t| scoreController score |\\\\n\\\\tframeSize := 640@480.  frameDepth := 16.  self makeMyPage; changed.\\\\n\\\\n\\\\t(score := MIDIScore new initialize) \\\\\\\"addAmbientEvent: (AmbientEvent new time: 200*60)\\\\\\\".\\\\n\\\\tscoreController := ScorePlayerMorph new\\\\n\\\\t\\\\t\\\\tonScorePlayer: (ScorePlayer onScore: score) title: 'sMovie'.\\\\n\\\\tpianoRoll := PianoRollScoreMorph new on: scoreController scorePlayer.\\\\n\\\\tself pianoRoll: pianoRoll.  \\\\\\\"back link\\\\\\\"\\\\n\\\\tpianoRoll enableDragNDrop;\\\\n\\\\t\\\\tuseRoundedCorners;\\\\n\\\\t\\\\tmovieClipPlayer: self;\\\\n\\\\t\\\\tborderWidth: 2;\\\\n\\\\t\\\\textent: self width @ 120;\\\\n\\\\t\\\\talign: pianoRoll topLeft with: self bottomLeft - (0@2);\\\\n\\\\t\\\\topenInWorld.\\\\n\\\\tscoreController extent: self width @ scoreController height;\\\\n\\\\t\\\\talign: scoreController topLeft with: pianoRoll bottomLeft - (0@2);\\\\n\\\\t\\\\topenInWorld.\\\\n\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'menu' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nopenMovieFile\\\\n\\\\t| fileName |\\\\n\\\\tfileName := Utilities chooseFileWithSuffixFromList: #('.movie')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\twithCaption: 'Choose a movie file to open'.\\\\n\\\\tfileName ifNotNil:\\\\n\\\\t\\\\t[self openFileNamed: fileName.\\\\n\\\\t\\\\tself showMoreControls]! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'menu' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nscanBySlider\\\\n\\\\t| scrollSlider handle |\\\\n\\\\tscrollSlider := SimpleSliderMorph new extent: 150@10;\\\\n\\\\t\\\\tcolor: color; sliderColor: Color gray;\\\\n\\\\t\\\\ttarget: self; actionSelector: #goToRelativePosition:;\\\\n\\\\t\\\\tadjustToValue: self relativePosition.\\\\n\\\\t(handle := scrollSlider firstSubmorph) on: #mouseUp send: #delete to: scrollSlider.\\\\n\\\\tscrollSlider align: handle center with: self activeHand position.\\\\n\\\\tself world addMorph: scrollSlider.\\\\n\\\\tself activeHand targetOffset: (handle width // 2) @ 0.\\\\n\\\\tself activeHand newMouseFocus: handle! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'menu' stamp: 'di 10/16/2000 13:31'!\\\\nthumbnailForThisPage\\\\n\\\\t\\\\\\\"Overridden to make a MovieFrameSyncMorph\\\\\\\"\\\\n\\\\n\\\\t^ self makeThumbnailInHand: self activeHand\\\\n! !\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'menu commands' stamp: 'di 7/6/1998 19:32'!\\\\nfirstPage\\\\n\\\\tplayDirection = 0 ifFalse: [^ self]. \\\\\\\"No-op during play\\\\\\\"\\\\n\\\\tself goToPage: 1\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'menu commands' stamp: 'di 7/6/1998 14:05'!\\\\ninsertPage\\\\n\\\\t^ self makeMyPage! !\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'movie clip player' stamp: 'di 10/19/2000 22:02'!\\\\npianoRoll\\\\n\\\\t^ pianoRoll! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'movie clip player' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\npianoRoll: aPianoRollScoreMorph\\\\n\\\\t\\\\\\\"Provides access also to the score and scorePlayer\\\\\\\"\\\\n\\\\n\\\\tpianoRoll := aPianoRollScoreMorph\\\\n! !\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'navigation' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\ngoToPage: i\\\\n\\\\tcurrentPage ifNil: [self makeMyPage].\\\\n\\\\tframeNumber := i.\\\\n\\\\tplayDirection := 0.\\\\n\\\\tself startRunning; step.  \\\\\\\"will stop after first step\\\\\\\"\\\\n\\\\tsoundTrackMorph ifNotNilDo: [:m | m image fillWhite].\\\\n\\\\tself stepSoundTrack.\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'navigation' stamp: 'di 7/6/1998 19:29'!\\\\nlastPage\\\\n\\\\tplayDirection = 0 ifFalse: [^ self]. \\\\\\\"No-op during play\\\\\\\"\\\\n\\\\tself goToPage: frameCount\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'navigation' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nnextPage\\\\n\\\\tplayDirection = 0 ifFalse: [^ self]. \\\\\\\"No-op during play\\\\\\\"\\\\n\\\\tself goToPage: (frameNumber := frameNumber + 1 min: frameCount).\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'navigation' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\npreviousPage\\\\n\\\\tplayDirection = 0 ifFalse: [^ self]. \\\\\\\"No-op during play\\\\\\\"\\\\n\\\\tself goToPage: (frameNumber := frameNumber - 1 max: 1).\\\\n! !\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'page controls' stamp: 'di 10/16/2000 13:20'!\\\\nfullControlSpecs\\\\n\\\\t^ #(\\\\t\\\\n\\\\t\\\\t\\\\t( '\\\\U00b7'\\\\t\\\\tinvokeBookMenu 'Invoke menu')\\\\n\\\\t\\\\t\\\\t( '<--'\\\\t\\\\tfirstPage\\\\t\\\\t'Go to first page')\\\\n\\\\t\\\\t\\\\t( '<<'\\\\t\\\\tplayReverse\\\\t\\\\t'Play backward')\\\\n\\\\t\\\\t\\\\t( '<-' \\\\t\\\\tpreviousPage\\\\t'Back one frame')\\\\n\\\\t\\\\t\\\\t( '| |' \\\\t\\\\tstopPlay\\\\t\\\\t'Stop playback')\\\\n\\\\t\\\\t\\\\t( '->'\\\\t\\\\tnextPage\\\\t\\\\t'Forward one frame')\\\\n\\\\t\\\\t\\\\t( '>>'\\\\t\\\\tplayForward\\\\t'Play forward')\\\\n\\\\t\\\\t\\\\t( '-->'\\\\t\\\\tlastPage\\\\t\\\\t\\\\t'Go to final page')\\\\n\\\\t\\\\t\\\\t( '<->'\\\\t\\\\tscanBySlider\\\\t'Scan by slider'  'menu')\\\\n\\\\t\\\\t\\\\\\\"Note extra spec 'menu' causes mousedown activation -- see makePageControlsFrom:\\\\\\\"\\\\n\\\\t)! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'page controls' stamp: 'di 10/24/2000 16:55'!\\\\nshowPageControls\\\\n\\\\tself showPageControls: self fullControlSpecs.\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'page controls' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nshowPageControls: controlSpecs \\\\n\\\\t| pageControls |\\\\n\\\\tself hidePageControls.\\\\n\\\\n\\\\tpageControls := self makePageControlsFrom: controlSpecs.\\\\n\\\\tpageControls borderWidth: 0; layoutInset: 0; extent: pageControls width@14.\\\\n\\\\tpageControls  setProperty: #pageControl toValue: true.\\\\n\\\\tpageControls setNameTo: 'Page Controls'.\\\\n\\\\tpageControls eventHandler: (EventHandler new on: #mouseDown send: #move to: self).\\\\n\\\\tself addMorphBack: pageControls beSticky! !\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'piano rolls' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\npauseFrom: player\\\\n\\\\n\\\\tplayDirection := 0.\\\\n\\\\tself step.! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'piano rolls' stamp: 'di 10/25/2000 22:06'!\\\\nresetFrom: player\\\\n\\\\tself pauseFrom: player.\\\\n\\\\tself firstPage! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'piano rolls' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nresumeFrom: player\\\\n\\\\tplayDirection ~= 0 ifTrue: [^ self].  \\\\\\\"Already running\\\\\\\"\\\\n\\\\tplayDirection := 1.\\\\n\\\\tpianoRoll ifNil:\\\\n\\\\t\\\\t[\\\\\\\"Sync movie to score player if not a clip player\\\\\\\"\\\\n\\\\t\\\\tscorePlayer := player].\\\\n\\\\tself startRunning! !\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'player control' stamp: 'di 10/16/2000 11:02'!\\\\ngoToRelativePosition: newPos\\\\n\\\\n\\\\tmovieFile ifNotNil: [^ self].\\\\n\\\\tself goToPage: ((newPos*frameCount) asInteger min: frameCount max: 1).\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'player control' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nplayForward\\\\n\\\\t(playDirection ~= 0 or: [frameNumber >= frameCount]) ifTrue:\\\\n\\\\t\\\\t[^ self]. \\\\\\\"No-op during play or at end\\\\\\\"\\\\n\\\\tplayDirection := 1.\\\\n\\\\tself startRunning! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'player control' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nplayReverse\\\\n\\\\t(playDirection ~= 0 or: [frameNumber <= 1]) ifTrue:\\\\n\\\\t\\\\t[^ self]. \\\\\\\"No-op during play or at end\\\\\\\"\\\\n\\\\tplayDirection := -1.\\\\n\\\\tself startRunning! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'player control' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nstopPlay\\\\n\\\\n\\\\tplayDirection := 0.\\\\n\\\\tself step! !\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'rounding' stamp: 'di 10/22/2000 23:41'!\\\\nwantsRoundedCorners\\\\n\\\\t^ Preferences roundedWindowCorners or: [super wantsRoundedCorners]! !\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'stepping' stamp: 'di 9/5/2000 23:09'!\\\\nfileByteCountPerFrame\\\\n\\\\t\\\\n\\\\t^ (frameBufferIfScaled ifNil: [currentPage image]) bits size * 4\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'stepping' stamp: 'di 5/27/1999 22:40'!\\\\nfilePosForFrameNo: frameNo\\\\n\\\\t\\\\n\\\\t^ 128 + ((frameNo-1)*(4+self fileByteCountPerFrame)) + 4\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'stepping' stamp: 'dgd 2/22/2003 13:22'!\\\\nstartRunning\\\\n\\\\t| ms |\\\\n\\\\t(frameBufferIfScaled ifNil: [currentPage image]) unhibernate.\\\\n\\\\tmovieFile := AsyncFile new \\\\n\\\\t\\\\t\\\\t\\\\topen: (FileDirectory default fullNameFor: movieFileName)\\\\n\\\\t\\\\t\\\\t\\\\tforWrite: false.\\\\n\\\\tmovieFile \\\\n\\\\t\\\\tprimReadStart: movieFile fileHandle\\\\n\\\\t\\\\tfPosition: (self filePosForFrameNo: frameNumber)\\\\n\\\\t\\\\tcount: self fileByteCountPerFrame.\\\\n\\\\tscorePlayer isNil \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[ms := Time millisecondClockValue.\\\\n\\\\t\\\\t\\\\tmsAtStart := ms - ((frameNumber - 1) * msPerFrame).\\\\n\\\\t\\\\t\\\\tmsAtLastSync := ms - msAtStart]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[(playDirection > 0 and: [scorePlayer isKindOf: SampledSound]) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[scorePlayer\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\treset;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tplaySilentlyUntil: (frameNumber - 1) * msPerFrame / 1000.0;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinitialVolume: 1.0.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[scorePlayer resumePlaying.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmsAtLastSync := scorePlayer millisecondsSinceStart] \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforkAt: Processor userInterruptPriority].\\\\n\\\\t\\\\t\\\\tmsAtLastSync := scorePlayer millisecondsSinceStart].\\\\n\\\\tframeAtLastSync := frameNumber! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'stepping' stamp: 'dgd 2/22/2003 13:22'!\\\\nstep\\\\n\\\\t\\\\\\\"NOTE:  The movie player has two modes of play, depending on whether scorePlayer is nil or not.  If scorePlayer is nil, then play runs according to the millisecond clock.  If scorePlayer is not nil, then the scorePlayer is consulted for synchronization.  If the movie is running ahead, then some calls on step will skip their  action until the right time.  If the movie is running behind, then the frame may advance by more than one to maintain synchronization.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"ALSO: This player operates with overlapped disk i/o.  This means that while one frame is being displayed, the next frame in sequence is being read into a disk buffer.  The value of frameNumber corresponds to the frame currently visible.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"This code may not work right for playing backwards right now.\\\\n\\\\tSingle-step and backwards (dir <= 0) should just run open-loop.\\\\\\\"\\\\n\\\\n\\\\t| byteCount simTime ms nextFrameNumber |\\\\n\\\\tmovieFile isNil ifTrue: [^self].\\\\n\\\\tscorePlayer isNil \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[(ms := Time millisecondClockValue) < msAtStart \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"clock rollover\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmsAtStart := ms - (frameNumber * msPerFrame)].\\\\n\\\\t\\\\t\\\\tsimTime := ms - msAtStart]\\\\n\\\\t\\\\tifFalse: [simTime := scorePlayer millisecondsSinceStart].\\\\n\\\\tplayDirection > 0 \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[nextFrameNumber := frameAtLastSync \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t+ ((simTime - msAtLastSync) // msPerFrame).\\\\n\\\\t\\\\t\\\\tnextFrameNumber = frameNumber \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[((scorePlayer isKindOf: AbstractSound) and: [scorePlayer isPlaying not]) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [^self stopRunning].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^self]]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[nextFrameNumber := playDirection < 0 \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [frameNumber - 1]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [frameNumber]].\\\\n\\\\tbyteCount := self fileByteCountPerFrame.\\\\n\\\\tself stepSoundTrack.\\\\n\\\\tmovieFile waitForCompletion.\\\\n\\\\tmovieFile \\\\n\\\\t\\\\tprimReadResult: movieFile fileHandle\\\\n\\\\t\\\\tintoBuffer: (frameBufferIfScaled ifNil: [currentPage image]) bits\\\\n\\\\t\\\\tat: 1\\\\n\\\\t\\\\tcount: byteCount // 4.\\\\n\\\\tframeBufferIfScaled ifNotNil: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"If this player has been shrunk, then we have to warp to the current page.\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t(WarpBlt current toForm: currentPage image)\\\\n\\\\t\\\\t\\\\t\\\\tsourceForm: frameBufferIfScaled;\\\\n\\\\t\\\\t\\\\t\\\\tcombinationRule: 3;\\\\n\\\\t\\\\t\\\\t\\\\tcellSize: (playDirection = 0 \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"Use smoothing if just stepping\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t2]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [1]);\\\\n\\\\t\\\\t\\\\t\\\\tcopyQuad: frameBufferIfScaled boundingBox innerCorners\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttoRect: currentPage image boundingBox].\\\\n\\\\tcurrentPage changed.\\\\n\\\\tframeNumber := nextFrameNumber.\\\\n\\\\t(playDirection = 0 or: \\\\n\\\\t\\\\t\\\\t[(playDirection > 0 and: [frameNumber >= frameCount]) \\\\n\\\\t\\\\t\\\\t\\\\tor: [playDirection < 0 and: [frameNumber <= 1]]]) \\\\n\\\\t\\\\tifTrue: [^self stopRunning].\\\\n\\\\n\\\\t\\\\\\\"Start the read operation for the next frame...\\\\\\\"\\\\n\\\\tmovieFile \\\\n\\\\t\\\\tprimReadStart: movieFile fileHandle\\\\n\\\\t\\\\tfPosition: (self filePosForFrameNo: frameNumber)\\\\n\\\\t\\\\tcount: byteCount! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'stepping' stamp: 'aoy 2/15/2003 21:45'!\\\\nstepSoundTrack\\\\n\\\\t| x image timeInMillisecs |\\\\n\\\\tscorePlayer ifNil: [^self].\\\\n\\\\tsoundTrackForm ifNil: [^self].\\\\n\\\\ttimeInMillisecs := playDirection = 0 \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"Stepping forward or back\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t (frameNumber - 1) * msPerFrame]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"Driven by sound track\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t scorePlayer millisecondsSinceStart].\\\\n\\\\tx := timeInMillisecs / 1000.0 * scorePlayer originalSamplingRate // 250.\\\\n\\\\timage := soundTrackMorph image.\\\\n\\\\timage \\\\n\\\\t\\\\tcopy: (image boundingBox translateBy: (x - (image width // 2)) @ 0)\\\\n\\\\t\\\\tfrom: soundTrackForm\\\\n\\\\t\\\\tto: 0 @ 0\\\\n\\\\t\\\\trule: Form over.\\\\n\\\\tsoundTrackMorph changed! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'stepping' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nstopRunning\\\\n\\\\t\\\\\\\"Must only be called with no outstanding file read requests...\\\\\\\"\\\\n\\\\tmovieFile ifNotNil: [movieFile close.  movieFile := nil].\\\\n\\\\tplayDirection := 0.\\\\n\\\\tself stopSoundTrackIfAny\\\\n! !\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'testing' stamp: 'di 8/8/1998 11:57'!\\\\nstepTime\\\\n\\\\t^ 0  \\\\\\\"step as fast as possible\\\\\\\"! !\\\\n\\\\n\\\\n!MoviePlayerMorph methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nmakeMyPage\\\\n\\\\n\\\\tcurrentPage ifNotNil:\\\\n\\\\t\\\\t[(currentPage isMemberOf: ImageMorph)\\\\n\\\\t\\\\t\\\\tifTrue: [\\\\\\\"currentPage is already an ImageMorph.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(currentPage image extent = frameSize\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tand: [currentPage image depth = frameDepth])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [^ self  \\\\\\\"page is already properly dimensioned.\\\\\\\"].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ currentPage image: (Form extent: frameSize depth: frameDepth)]\\\\n\\\\t\\\\t\\\\tifFalse: [currentPage releaseCachedState; delete]].\\\\n\\\\tcurrentPage := ImageMorph new image: (Form extent: frameSize depth: frameDepth).\\\\n\\\\tcurrentPage lock.\\\\n\\\\tpages := OrderedCollection with: currentPage.\\\\n\\\\tself addMorphFront: currentPage! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'private' stamp: 'di 10/25/2000 23:01'!\\\\nmakeThumbnailInHand: aHand\\\\n\\\\n\\\\tscorePlayer ifNotNil:\\\\n\\\\t\\\\t[\\\\\\\"Position the soundTrack for this frameNumber\\\\\\\"\\\\n\\\\t\\\\tscorePlayer reset; playSilentlyUntil: frameNumber - 1 * msPerFrame / 1000.0].\\\\n\\\\n\\\\taHand attachMorph:\\\\n\\\\t\\\\t(MovieClipStartMorph new\\\\n\\\\t\\\\t\\\\tmovieFileName: movieFileName\\\\n\\\\t\\\\t\\\\tsoundTrackFileName: soundTrackFileName\\\\n\\\\t\\\\t\\\\timage: currentPage image\\\\n\\\\t\\\\t\\\\tplayer: self\\\\n\\\\t\\\\t\\\\tframeNumber: frameNumber)\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\npvtOpenFileNamed: fName\\\\n\\\\t\\\\\\\"Private - open on the movie file iof the given name\\\\\\\"\\\\n\\\\n\\\\t| f w h d n m |\\\\n\\\\tself stopRunning.\\\\n\\\\tfName = movieFileName ifTrue: [^ self].  \\\\\\\"No reopen necessary on same file\\\\\\\"\\\\n\\\\n\\\\tmovieFileName := fName.\\\\n\\\\t\\\\\\\"Read movie file parameters from 128-byte header...\\\\n\\\\t\\\\t(records follow as {N=int32, N words}*)\\\\\\\"\\\\n\\\\tf := (FileStream oldFileNamed: movieFileName) binary.\\\\n\\\\t\\\\tf nextInt32.\\\\n\\\\t\\\\tw := f nextInt32.\\\\n\\\\t\\\\th := f nextInt32.\\\\n\\\\t\\\\td := f nextInt32.\\\\n\\\\t\\\\tn := f nextInt32.\\\\n\\\\t\\\\tm := f nextInt32.\\\\n\\\\t\\\\tf close.\\\\n\\\\tpageSize := frameSize := w@h.\\\\n\\\\tframeDepth := d.\\\\n\\\\tframeCount := n.\\\\n\\\\tframeNumber := 1.\\\\n\\\\tplayDirection := 0.\\\\n\\\\tmsAtLastSync := 0.\\\\n\\\\tmsPerFrame := m/1000.0.\\\\n\\\\tself makeMyPage.\\\\n\\\\t(SmalltalkImage current platformName = 'Mac OS') ifTrue:[\\\\n\\\\t\\\\t(SmalltalkImage current extraVMMemory < self fileByteCountPerFrame) ifTrue:\\\\n\\\\t\\\\t\\\\t[^ self inform:\\\\n'Playing movies in Squeak requires that extra memory be allocated\\\\nfor asynchronous file IO.  This particular movie requires a buffer of\\\\n' ,\\\\n(self fileByteCountPerFrame printString) , ' bytes, but you only have ' , (SmalltalkImage current extraVMMemory printString) , ' allocated.\\\\nYou can evaluate ''SmalltalkImage current extraVMMemory'' to check your allocation,\\\\nand ''SmalltalkImage current extraVMMemory: 485000'' or the like to increase your allocation.\\\\nNote that raising your allocation in this way only marks your image as\\\\nneeding this much, so you must then save, quit, and start over again\\\\nbefore you can run this movie.  Good luck.']].\\\\n! !\\\\n\\\\n!MoviePlayerMorph methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\ntryToShareScoreFor: fileName\\\\n\\\\n\\\\tscorePlayer := nil.\\\\n\\\\tself class allInstancesDo:\\\\n\\\\t\\\\t[:mp | mp == self ifFalse:\\\\n\\\\t\\\\t\\\\t[mp soundTrackFileName = fileName ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[\\\\\\\"Found this score already open in another player\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t-- return a copy that shares the same sound buffer.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tmp scorePlayer ifNotNil: [^ scorePlayer := mp scorePlayer copy reset]]]]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMoviePlayerMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MoviePlayerMorph class methodsFor: 'class initialization' stamp: 'hg 8/3/2000 16:59'!\\\\ninitialize\\\\n\\\\n\\\\tFileList registerFileReader: self! !\\\\n\\\\n\\\\n!MoviePlayerMorph class methodsFor: 'fileIn/Out' stamp: 'sd 2/6/2002 21:36'!\\\\nfileReaderServicesForFile: fullName suffix: suffix\\\\n\\\\n\\\\t^(suffix = 'movie') | (suffix = '*')\\\\n\\\\t\\\\tifTrue: [ self services]\\\\n\\\\t\\\\tifFalse: [#()]! !\\\\n\\\\n!MoviePlayerMorph class methodsFor: 'fileIn/Out' stamp: 'hg 8/3/2000 17:01'!\\\\nopenAsMovie: fullFileName\\\\n\\\\t\\\\\\\"Open a MoviePlayerMorph on the given file (must be in .movie format).\\\\\\\"\\\\n \\\\n\\\\t(self new openFileNamed: fullFileName) openInWorld! !\\\\n\\\\n!MoviePlayerMorph class methodsFor: 'fileIn/Out' stamp: 'sw 2/17/2002 01:23'!\\\\nserviceOpenAsMovie\\\\n\\\\t\\\\\\\"Answer a service for opening a file as a movie\\\\\\\"\\\\n\\\\n\\\\t^ SimpleServiceEntry \\\\n\\\\t\\\\tprovider: self \\\\n\\\\t\\\\tlabel: 'open as movie'\\\\n\\\\t\\\\tselector: #openAsMovie:\\\\n\\\\t\\\\tdescription: 'open file as movie'\\\\n\\\\t\\\\tbuttonLabel: 'open'! !\\\\n\\\\n!MoviePlayerMorph class methodsFor: 'fileIn/Out' stamp: 'sw 9/7/2004 18:21'!\\\\nservices\\\\n\\\\t\\\\\\\"Formerly: answer a service for opening as a movie.  Nowadays... no services\\\\\\\"\\\\n\\\\n\\\\t^ #().\\\\n\\\\\\\"\\\\n\\\\t^ Array with: self serviceOpenAsMovie\\\\\\\"\\\\n\\\\n\\\\t! !\\\\n\\\\n\\\\n!MoviePlayerMorph class methodsFor: 'initialize-release' stamp: 'SD 11/15/2001 22:22'!\\\\nunload\\\\n\\\\n\\\\tFileList unregisterFileReader: self ! !\\\\nEllipseMorph subclass: #MovingEyeMorph\\\\n\\\\tinstanceVariableNames: 'inner iris'\\\\n\\\\tclassVariableNames: 'IrisSize'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-Demo'!\\\\n\\\\n!MovingEyeMorph methodsFor: 'as yet unclassified' stamp: 'yo 2/15/2001 15:24'!\\\\nirisPos: cp\\\\n\\\\n\\\\t| a b theta x y |\\\\n\\\\ttheta _ (cp - self center) theta.\\\\n\\\\ta _ inner width // 2.\\\\n\\\\tb _ inner height // 2.\\\\n\\\\tx _ a * (theta cos).\\\\n\\\\ty _ b * (theta sin).\\\\n\\\\tiris position: ((x@y) asIntegerPoint) + self center - (iris extent // 2).! !\\\\n\\\\n\\\\n!MovingEyeMorph methodsFor: 'geometry' stamp: 'yo 2/15/2001 15:59'!\\\\nextent: aPoint\\\\n\\\\n\\\\tsuper extent: aPoint.\\\\n\\\\tinner extent: (self extent * ((1.0@1.0)-IrisSize)) asIntegerPoint.\\\\n\\\\tiris extent: (self extent * IrisSize) asIntegerPoint.\\\\n\\\\tinner position: (self center - (inner extent // 2)) asIntegerPoint.\\\\n! !\\\\n\\\\n\\\\n!MovingEyeMorph methodsFor: 'initialization' stamp: 'dgd 3/7/2003 14:42'!\\\\ndefaultColor\\\\n\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color black! !\\\\n\\\\n!MovingEyeMorph methodsFor: 'initialization' stamp: 'dgd 3/7/2003 14:42'!\\\\ninitialize\\\\n\\\\t\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tinner _ EllipseMorph new.\\\\n\\\\tinner color: self color.\\\\n\\\\tinner extent: (self extent * (1.0 @ 1.0 - IrisSize)) asIntegerPoint.\\\\n\\\\tinner borderColor: self color.\\\\n\\\\tinner borderWidth: 0.\\\\n\\\\\\\"\\\\\\\"\\\\n\\\\tiris _ EllipseMorph new.\\\\n\\\\tiris color: Color white.\\\\n\\\\tiris extent: (self extent * IrisSize) asIntegerPoint.\\\\n\\\\\\\"\\\\\\\"\\\\n\\\\tself addMorphCentered: inner.\\\\n\\\\tinner addMorphCentered: iris.\\\\n\\\\\\\"\\\\\\\"\\\\n\\\\tself extent: 26 @ 33! !\\\\n\\\\n\\\\n!MovingEyeMorph methodsFor: 'stepping and presenter' stamp: 'di 2/18/2001 00:10'!\\\\nstep\\\\n\\\\t| cp |\\\\n\\\\tcp _ self globalPointToLocal: World primaryHand position.\\\\n\\\\t(inner containsPoint: cp)\\\\n\\\\t\\\\tifTrue: [iris position: (cp - (iris extent // 2))]\\\\n\\\\t\\\\tifFalse: [self irisPos: cp].\\\\n\\\\tself changed \\\\\\\"cover up gribblies if embedded in Flash\\\\\\\"! !\\\\n\\\\n\\\\n!MovingEyeMorph methodsFor: 'testing' stamp: 'yo 2/15/2001 15:38'!\\\\nstepTime\\\\n\\\\n\\\\t^ 100.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMovingEyeMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MovingEyeMorph class methodsFor: 'class initialization' stamp: 'yo 2/15/2001 16:04'!\\\\ninitialize\\\\n\\\\\\\"\\\\n\\\\tMovingEyeMorph initialize\\\\n\\\\\\\"\\\\n\\\\tIrisSize _ (0.42@0.50).! !\\\\n\\\\n\\\\n!MovingEyeMorph class methodsFor: 'parts bin' stamp: 'sw 8/2/2001 12:51'!\\\\ndescriptionForPartsBin\\\\n\\\\t^ self partName:\\\\t'MovingEye'\\\\n\\\\t\\\\tcategories:\\\\t\\\\t#('Demo')\\\\n\\\\t\\\\tdocumentation:\\\\t'An eye which follows the cursor'! !\\\\nSoundCodec subclass: #MuLawCodec\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: 'DecodingTable'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Sound-Synthesis'!\\\\n!MuLawCodec commentStamp: '<historical>' prior: 0!\\\\nI represent a mu-law (u-law) codec. I compress sound data by a factor of 2:1 by encoding the most significant 12 bits of each 16-bit sample as a signed, exponentially encoded byte. The idea is to use more resolution for smaller lower sample values. This encoding was developed for the North American phone system and a variant of it, a-law, is a European phone standard. It is a popular sound encoding on Unix platforms (.au files).\\\\n!\\\\n\\\\n\\\\n!MuLawCodec methodsFor: 'external access' stamp: 'di 2/8/1999 22:28'!\\\\nuLawDecodeSample: byte\\\\n\\\\t\\\\\\\"Decode a 16-bit signed sample from 8 bits using uLaw decoding\\\\\\\"\\\\n\\\\n\\\\t^ DecodingTable at: byte + 1! !\\\\n\\\\n!MuLawCodec methodsFor: 'external access' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nuLawEncodeSample: sample\\\\n\\\\t\\\\\\\"Encode a 16-bit signed sample into 8 bits using uLaw encoding\\\\\\\"\\\\n\\\\n\\\\t| s |\\\\n\\\\ts := sample // 8.  \\\\\\\"drop 3 least significant bits\\\\\\\"\\\\n\\\\ts < 0 ifTrue: [^ (self uLawEncode12Bits: 0-s) + 16r80]\\\\n\\\\t\\\\tifFalse: [^ (self uLawEncode12Bits: s)].\\\\n! !\\\\n\\\\n\\\\n!MuLawCodec methodsFor: 'subclass responsibility' stamp: 'jm 2/2/1999 09:15'!\\\\nbytesPerEncodedFrame\\\\n\\\\t\\\\\\\"Answer the number of bytes required to hold one frame of compressed sound data. Answer zero if this codec produces encoded frames of variable size.\\\\\\\"\\\\n\\\\n\\\\t^ 1\\\\n! !\\\\n\\\\n!MuLawCodec methodsFor: 'subclass responsibility' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ndecodeFrames: frameCount from: srcByteArray at: srcIndex into: dstSoundBuffer at: dstIndex\\\\n\\\\t\\\\\\\"Decode the given number of monophonic frames starting at the given index in the given ByteArray of compressed sound data and storing the decoded samples into the given SoundBuffer starting at the given destination index. Answer a pair containing the number of bytes of compressed data consumed and the number of decompressed samples produced.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: Assume that the sender has ensured that the given number of frames will not exhaust either the source or destination buffers.\\\\\\\"\\\\n\\\\n\\\\t| dst |\\\\n\\\\tdst := dstIndex.\\\\n\\\\tsrcIndex to: srcIndex + frameCount - 1 do: [:src |\\\\n\\\\t\\\\tdstSoundBuffer at: dst put: (DecodingTable at: (srcByteArray at: src) + 1).\\\\n\\\\t\\\\tdst := dst + 1].\\\\n\\\\t^ Array with: frameCount with: frameCount\\\\n! !\\\\n\\\\n!MuLawCodec methodsFor: 'subclass responsibility' stamp: 'di 2/8/1999 22:25'!\\\\nencodeFrames: frameCount from: srcSoundBuffer at: srcIndex into: dstByteArray at: dstIndex\\\\n\\\\t\\\\\\\"Encode the given number of frames starting at the given index in the given monophonic SoundBuffer and storing the encoded sound data into the given ByteArray starting at the given destination index. Encode only as many complete frames as will fit into the destination. Answer a pair containing the number of samples consumed and the number of bytes of compressed data produced.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: Assume that the sender has ensured that the given number of frames will not exhaust either the source or destination buffers.\\\\\\\"\\\\n\\\\n\\\\tsrcIndex to: srcIndex + frameCount - 1 do: [:i |\\\\n\\\\t\\\\tdstByteArray at: i put: (self uLawEncodeSample: (srcSoundBuffer at: i))].\\\\n\\\\t^ Array with: frameCount with: frameCount\\\\n! !\\\\n\\\\n!MuLawCodec methodsFor: 'subclass responsibility' stamp: 'jm 2/2/1999 09:11'!\\\\nsamplesPerFrame\\\\n\\\\t\\\\\\\"Answer the number of sound samples per compression frame.\\\\\\\"\\\\n\\\\n\\\\t^ 1\\\\n! !\\\\n\\\\n\\\\n!MuLawCodec methodsFor: 'private' stamp: 'di 2/9/1999 13:25'!\\\\nuLawEncode12Bits: s\\\\n\\\\t\\\\\\\"Encode a 12-bit unsigned sample (0-4095) into 7 bits using uLaw encoding.\\\\n\\\\tThis gets called by a method that scales 16-bit signed integers down to a\\\\n\\\\t\\\\t12-bit magnitude, and then ORs in 16r80 if they were negative.\\\\n\\\\tDetail: May get called with s >= 4096, and this works fine.\\\\\\\"\\\\n\\\\n\\\\ts < 496 ifTrue: [\\\\n\\\\t\\\\ts < 112 ifTrue: [\\\\n\\\\t\\\\t\\\\ts < 48 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\ts < 16\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [^ 16r70 bitOr: (15 - s)]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [^ 16r60 bitOr: (15 - ((s - 16) bitShift: -1))]].\\\\n\\\\t\\\\t\\\\t^ 16r50 bitOr: (15 - ((s - 48) bitShift: -2))].\\\\n\\\\t\\\\ts < 240\\\\n\\\\t\\\\t\\\\tifTrue: [^ 16r40 bitOr: (15 - ((s - 112) bitShift: -3))]\\\\n\\\\t\\\\t\\\\tifFalse: [^ 16r30 bitOr: (15 - ((s - 240) bitShift: -4))]].\\\\n\\\\n\\\\ts < 2032 ifTrue: [\\\\n\\\\t\\\\ts < 1008\\\\n\\\\t\\\\t\\\\tifTrue: [^ 16r20 bitOr: (15 - ((s - 496) bitShift: -5))]\\\\n\\\\t\\\\t\\\\tifFalse: [^ 16r10 bitOr: (15 - ((s - 1008) bitShift: -6))]].\\\\n\\\\n\\\\ts < 4080\\\\n\\\\t\\\\tifTrue: [^ 15 - ((s - 2032) bitShift: -7)]\\\\n\\\\t\\\\tifFalse: [^ 0].\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMuLawCodec class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MuLawCodec class methodsFor: 'class initialization' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Build the 256 entry table to be used to decode 8-bit uLaw-encoded samples.\\\\\\\"\\\\n\\\\t\\\\\\\"MuLawCodec initialize\\\\\\\"\\\\n\\\\n\\\\t| encoded codec lastEncodedPos lastEncodedNeg |\\\\n\\\\tDecodingTable := Array new: 256.\\\\n\\\\tcodec := self new.\\\\n\\\\tlastEncodedPos := nil.\\\\n\\\\tlastEncodedNeg := nil.\\\\n\\\\t4095 to: 0 by: -1 do: [:s |\\\\n\\\\t\\\\tencoded := codec uLawEncode12Bits: s.\\\\n\\\\t\\\\tlastEncodedPos = encoded\\\\n\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tDecodingTable at: (encoded + 1) put: (s bitShift: 3).\\\\n\\\\t\\\\t\\\\t\\\\tlastEncodedPos := encoded].\\\\n\\\\t\\\\tencoded := encoded bitOr: 16r80.\\\\n\\\\t\\\\tlastEncodedNeg = encoded\\\\n\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tDecodingTable at: (encoded + 1) put: (s bitShift: 3) negated.\\\\n\\\\t\\\\t\\\\t\\\\tlastEncodedNeg := encoded]].\\\\n! !\\\\nReadWriteStream subclass: #MultiByteBinaryOrTextStream\\\\n\\\\tinstanceVariableNames: 'isBinary converter'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Multilingual-TextConversion'!\\\\n!MultiByteBinaryOrTextStream commentStamp: '<historical>' prior: 0!\\\\nIt is similar to MultiByteFileStream, but works on in memory stream.!\\\\n\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'accessing' stamp: 'yo 11/11/2002 13:16'!\\\\nascii\\\\n\\\\tisBinary _ false\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'accessing' stamp: 'yo 11/11/2002 13:16'!\\\\nbinary\\\\n\\\\tisBinary _ true\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'accessing' stamp: 'nk 8/2/2004 17:02'!\\\\nconverter\\\\n\\\\n\\\\tconverter ifNil: [converter _ self class defaultConverter].\\\\n\\\\t^ converter\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'accessing' stamp: 'yo 8/7/2003 09:12'!\\\\nconverter: aConverter\\\\n\\\\n\\\\tconverter _ aConverter.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'accessing' stamp: 'yo 11/11/2002 13:25'!\\\\nisBinary\\\\n\\\\t^ isBinary! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'accessing' stamp: 'yo 11/11/2002 16:33'!\\\\ntext\\\\n\\\\tisBinary _ false\\\\n! !\\\\n\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'as yet unclassified' stamp: 'yo 3/1/2005 06:10'!\\\\nfileInObjectAndCodeForProject\\\\n\\\\t\\\\\\\"This file may contain:\\\\n1) a fileIn of code  \\\\n2) just an object in SmartReferenceStream format \\\\n3) both code and an object.\\\\n\\\\tFile it in and return the object.  Note that self must be a FileStream or RWBinaryOrTextStream.  Maybe ReadWriteStream incorporate RWBinaryOrTextStream?\\\\\\\"\\\\n\\\\t| refStream object |\\\\n\\\\tself text.\\\\n\\\\tself peek asciiValue = 4\\\\n\\\\t\\\\tifTrue: [  \\\\\\\"pure object file\\\\\\\"\\\\n\\\\t\\\\t\\\\tself binary.\\\\n\\\\t\\\\t\\\\trefStream _ SmartRefStream on: self.\\\\n\\\\t\\\\t\\\\tobject _ refStream nextAndClose]\\\\n\\\\t\\\\tifFalse: [  \\\\\\\"objects mixed with a fileIn\\\\\\\"\\\\n\\\\t\\\\t\\\\tself fileInProject.  \\\\\\\"reads code and objects, then closes the file\\\\\\\"\\\\n\\\\t\\\\t\\\\tself binary.\\\\n\\\\t\\\\t\\\\tobject _ SmartRefStream scannedObject].\\\\t\\\\\\\"set by side effect of one of the chunks\\\\\\\"\\\\n\\\\tSmartRefStream scannedObject: nil.  \\\\\\\"clear scannedObject\\\\\\\"\\\\n\\\\t^ object! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'as yet unclassified' stamp: 'yo 3/1/2005 06:46'!\\\\nfileInProject\\\\n\\\\n\\\\tself setConverterForCodeForProject.\\\\n\\\\tsuper fileIn.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'as yet unclassified' stamp: 'yo 3/1/2005 06:46'!\\\\nsetConverterForCodeForProject\\\\n\\\\n\\\\tself converter: UTF8TextConverter new.\\\\n! !\\\\n\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'converting' stamp: 'yo 11/11/2002 13:16'!\\\\nasBinaryOrTextStream\\\\n\\\\n\\\\t^ self\\\\n! !\\\\n\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'fileIn/Out' stamp: 'yo 8/17/2004 10:02'!\\\\nfileIn\\\\n\\\\n\\\\tself setConverterForCode.\\\\n\\\\tsuper fileIn.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'fileIn/Out' stamp: 'yo 11/11/2002 16:31'!\\\\nfileInObjectAndCode\\\\n\\\\t\\\\\\\"This file may contain:\\\\n1) a fileIn of code  \\\\n2) just an object in SmartReferenceStream format \\\\n3) both code and an object.\\\\n\\\\tFile it in and return the object.  Note that self must be a FileStream or RWBinaryOrTextStream.  Maybe ReadWriteStream incorporate RWBinaryOrTextStream?\\\\\\\"\\\\n\\\\t| refStream object |\\\\n\\\\tself text.\\\\n\\\\tself peek asciiValue = 4\\\\n\\\\t\\\\tifTrue: [  \\\\\\\"pure object file\\\\\\\"\\\\n\\\\t\\\\t\\\\tself binary.\\\\n\\\\t\\\\t\\\\trefStream _ SmartRefStream on: self.\\\\n\\\\t\\\\t\\\\tobject _ refStream nextAndClose]\\\\n\\\\t\\\\tifFalse: [  \\\\\\\"objects mixed with a fileIn\\\\\\\"\\\\n\\\\t\\\\t\\\\tself fileIn.  \\\\\\\"reads code and objects, then closes the file\\\\\\\"\\\\n\\\\t\\\\t\\\\tself binary.\\\\n\\\\t\\\\t\\\\tobject _ SmartRefStream scannedObject].\\\\t\\\\\\\"set by side effect of one of the chunks\\\\\\\"\\\\n\\\\tSmartRefStream scannedObject: nil.  \\\\\\\"clear scannedObject\\\\\\\"\\\\n\\\\t^ object! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'fileIn/Out' stamp: 'tak 1/12/2005 13:47'!\\\\nfileOutClass: extraClass andObject: theObject \\\\n\\\\tUTF8TextConverter writeBOMOn: self.\\\\n\\\\t^ super fileOutClass: extraClass andObject: theObject! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'fileIn/Out' stamp: 'yo 8/18/2004 09:36'!\\\\nsetConverterForCode\\\\n\\\\n\\\\t| current |\\\\n\\\\tcurrent _ converter saveStateOf: self.\\\\n\\\\tself position: 0.\\\\n\\\\tself binary.\\\\n\\\\t((self next: 3) = (ByteArray with: 16rEF with: 16rBB with: 16rBF)) ifTrue: [\\\\n\\\\t\\\\tself converter: UTF8TextConverter new\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tself converter: MacRomanTextConverter new.\\\\n\\\\t].\\\\n\\\\tconverter restoreStateOf: self with: current.\\\\n\\\\tself text.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'fileIn/Out' stamp: 'yo 7/7/2004 09:43'!\\\\nsetEncoderForSourceCodeNamed: streamName\\\\n\\\\n\\\\t| l |\\\\n\\\\tl _ streamName asLowercase.\\\\n\\\\\\\"\\\\t((l endsWith: FileStream multiCs) or: [\\\\n\\\\t\\\\t(l endsWith: FileStream multiSt) or: [\\\\n\\\\t\\\\t\\\\t(l endsWith: (FileStream multiSt, '.gz')) or: [\\\\n\\\\t\\\\t\\\\t\\\\t(l endsWith: (FileStream multiCs, '.gz'))]]]) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself converter: UTF8TextConverter new.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ self.\\\\n\\\\t].\\\\n\\\\\\\"\\\\n\\\\t((l endsWith: FileStream cs) or: [\\\\n\\\\t\\\\t(l endsWith: FileStream st) or: [\\\\n\\\\t\\\\t\\\\t(l endsWith: (FileStream st, '.gz')) or: [\\\\n\\\\t\\\\t\\\\t\\\\t(l endsWith: (FileStream cs, '.gz'))]]]) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself converter: MacRomanTextConverter new.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ self.\\\\n\\\\t].\\\\n\\\\n\\\\tself converter: UTF8TextConverter new.\\\\n! !\\\\n\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'properties-setting' stamp: 'yo 11/14/2002 13:49'!\\\\nsetFileTypeToObject\\\\n\\\\t\\\\\\\"do nothing.  We don't have a file type\\\\\\\"! !\\\\n\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'public' stamp: 'yo 7/30/2004 06:59'!\\\\ncontents\\\\n\\\\n\\\\t| ret state |\\\\n\\\\tstate _ converter saveStateOf: self.\\\\n\\\\tret _ self upToEnd.\\\\n\\\\tconverter restoreStateOf: self with: state.\\\\n\\\\t^ ret.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'public' stamp: 'yo 11/11/2002 16:39'!\\\\nnext\\\\n\\\\n\\\\t| n |\\\\n\\\\tn _ self converter nextFromStream: self.\\\\n\\\\tn ifNil: [^ nil].\\\\n\\\\tisBinary and: [n isCharacter ifTrue: [^ n asciiValue]].\\\\n\\\\t^ n.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'public' stamp: 'ar 4/12/2005 17:34'!\\\\nnext: anInteger \\\\n\\\\n\\\\t| multiString |\\\\n\\\\t\\\\\\\"self halt.\\\\\\\"\\\\n\\\\tself isBinary ifTrue: [^ (super next: anInteger) asByteArray].\\\\n\\\\tmultiString _ WideString new: anInteger.\\\\n\\\\t1 to: anInteger do: [:index |\\\\n\\\\t\\\\t| character |\\\\n\\\\t\\\\t(character _ self next) ifNotNil: [\\\\n\\\\t\\\\t\\\\tmultiString at: index put: character\\\\n\\\\t\\\\t] ifNil: [\\\\n\\\\t\\\\t\\\\tmultiString _ multiString copyFrom: 1 to: index - 1.\\\\n\\\\t\\\\t\\\\t^ multiString\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\t^ multiString.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'public' stamp: 'yo 12/25/2003 16:05'!\\\\nnextDelimited: terminator\\\\n\\\\n\\\\t| out ch pos |\\\\n\\\\tout _ WriteStream on: (String new: 1000).\\\\n\\\\tself atEnd ifTrue: [^ ''].\\\\n\\\\tpos _ self position.\\\\n\\\\tself next = terminator ifFalse: [\\\\n\\\\t\\\\t\\\\\\\"absorb initial terminator\\\\\\\"\\\\n\\\\t\\\\tself position: pos.\\\\n\\\\t].\\\\n\\\\t[(ch _ self next) == nil] whileFalse: [\\\\n\\\\t\\\\t(ch = terminator) ifTrue: [\\\\n\\\\t\\\\t\\\\tself peek = terminator ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tself next.  \\\\\\\"skip doubled terminator\\\\\\\"\\\\n\\\\t\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t^ out contents  \\\\\\\"terminator is not doubled; we're done!!\\\\\\\"\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tout nextPut: ch.\\\\n\\\\t].\\\\n\\\\t^ out contents.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'public' stamp: 'yo 11/11/2002 13:24'!\\\\nnextMatchAll: aColl\\\\n\\\\n    | save |\\\\n    save _ converter saveStateOf: self.\\\\n    aColl do: [:each |\\\\n       (self next) = each ifFalse: [\\\\n            converter restoreStateOf: self with: save.\\\\n            ^ false.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n    ^ true.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'public' stamp: 'yo 11/14/2002 13:54'!\\\\nnextPut: aCharacter\\\\n\\\\n\\\\taCharacter isInteger ifTrue: [^ super nextPut: aCharacter asCharacter].\\\\n\\\\t^ self converter nextPut: aCharacter toStream: self\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'public' stamp: 'yo 11/11/2002 13:24'!\\\\nnextPutAll: aCollection\\\\n\\\\n\\\\tself isBinary ifTrue: [\\\\n\\\\t\\\\t^ super nextPutAll: aCollection.\\\\n\\\\t].\\\\n\\\\taCollection do: [:e | self nextPut: e].\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'public' stamp: 'yo 11/14/2002 13:54'!\\\\npadToEndWith: aChar\\\\n\\\\t\\\\\\\"We don't have pages, so we are at the end, and don't need to pad.\\\\\\\"! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'public' stamp: 'yo 12/25/2003 16:04'!\\\\npeek\\\\n\\\\t\\\\\\\"Answer what would be returned if the message next were sent to the receiver. If the receiver is at the end, answer nil.  \\\\\\\"\\\\n\\\\n\\\\t| next pos |\\\\n\\\\tself atEnd ifTrue: [^ nil].\\\\n\\\\tpos _ self position.\\\\n\\\\tnext _ self next.\\\\n\\\\tself position: pos.\\\\n\\\\t^ next.\\\\n\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'public' stamp: 'yo 11/11/2002 13:25'!\\\\npeekFor: item \\\\n\\\\n\\\\t| next state |\\\\n\\\\t\\\\\\\"self atEnd ifTrue: [^ false]. -- SFStream will give nil\\\\\\\"\\\\n\\\\tstate _ converter saveStateOf: self.\\\\n\\\\t(next _ self next) == nil ifTrue: [^ false].\\\\n\\\\titem = next ifTrue: [^ true].\\\\n\\\\tconverter restoreStateOf: self with: state.\\\\n\\\\t^ false.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'public' stamp: 'nk 7/29/2004 12:02'!\\\\nreset\\\\n\\\\n\\\\tsuper reset.\\\\n\\\\tisBinary ifNil: [isBinary _ false].\\\\n\\\\tcollection class == ByteArray ifTrue: [\\\\\\\"Store as String and convert as needed.\\\\\\\"\\\\n\\\\t\\\\tcollection _ collection asString.\\\\n\\\\t\\\\tisBinary _ true].\\\\n\\\\n\\\\tself converter. \\\\\\\"ensure that we have a converter.\\\\\\\"! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'public' stamp: 'yo 11/11/2002 16:17'!\\\\nskipSeparators\\\\n\\\\n\\\\t[self atEnd] whileFalse: [\\\\n\\\\t\\\\tself basicNext isSeparator ifFalse: [\\\\n\\\\t\\\\t\\\\t^ self position: self position - 1]]\\\\n\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'public' stamp: 'yo 12/25/2003 16:04'!\\\\nskipSeparatorsAndPeekNext\\\\n\\\\n\\\\t\\\\\\\"A special function to make nextChunk fast\\\\\\\"\\\\n\\\\t| peek pos |\\\\n\\\\t[self atEnd] whileFalse: [\\\\n\\\\t\\\\tpos _ self position.\\\\n\\\\t\\\\t(peek _ self next) isSeparator ifFalse: [\\\\n\\\\t\\\\t\\\\tself position: pos.\\\\n\\\\t\\\\t\\\\t^ peek.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'public' stamp: 'yo 11/11/2002 13:24'!\\\\nupTo: delim \\\\n\\\\n\\\\t| out ch |\\\\n\\\\tout _ WriteStream on: (String new: 1000).\\\\n\\\\tself atEnd ifTrue: [^ ''].\\\\n\\\\t[(ch _ self next) isNil] whileFalse: [\\\\n\\\\t\\\\t(ch = delim) ifTrue: [\\\\n\\\\t\\\\t\\\\t^ out contents  \\\\\\\"terminator is not doubled; we're done!!\\\\\\\"\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tout nextPut: ch.\\\\n\\\\t].\\\\n\\\\t^ out contents.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'public' stamp: 'yo 11/11/2002 16:17'!\\\\nupToEnd\\\\n\\\\n\\\\t| newStream element newCollection |\\\\n\\\\tnewCollection _ self isBinary\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [ByteArray new: 100]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [String new: 100].\\\\n\\\\tnewStream _ WriteStream on: newCollection.\\\\n\\\\t[(element _ self next) notNil]\\\\n\\\\t\\\\twhileTrue: [newStream nextPut: element].\\\\n\\\\t^ newStream contents\\\\n! !\\\\n\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'private' stamp: 'nk 8/2/2004 17:01'!\\\\nguessConverter\\\\n\\\\t^ (self originalContents includesSubString: (ByteArray withAll: {27. 36}) asString)\\\\n\\\\t\\\\tifTrue: [CompoundTextConverter new]\\\\n\\\\t\\\\tifFalse: [self class defaultConverter ]! !\\\\n\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'private basic' stamp: 'yo 11/11/2002 16:01'!\\\\nbasicNext\\\\n\\\\n\\\\t^ super next \\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'private basic' stamp: 'md 10/20/2004 15:32'!\\\\nbasicNext: anInteger\\\\n\\\\n\\\\t^ super next: anInteger.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'private basic' stamp: 'yo 11/11/2002 13:21'!\\\\nbasicNext: n into: aString\\\\n\\\\n\\\\t^ super next: n into: aString.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'private basic' stamp: 'yo 11/11/2002 13:21'!\\\\nbasicNextInto: aString\\\\n\\\\n\\\\t^ super nextInto: aString.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'private basic' stamp: 'yo 11/11/2002 13:21'!\\\\nbasicNextPut: char\\\\n\\\\n\\\\t^ super nextPut: char.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'private basic' stamp: 'yo 11/11/2002 13:21'!\\\\nbasicNextPutAll: aString\\\\n\\\\n\\\\t^ super nextPutAll: aString.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'private basic' stamp: 'yo 11/11/2002 13:21'!\\\\nbasicPeek\\\\n\\\\n\\\\t^ super peek\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'private basic' stamp: 'yo 11/11/2002 13:21'!\\\\nbasicPosition\\\\n\\\\n\\\\t^ super position.\\\\n! !\\\\n\\\\n!MultiByteBinaryOrTextStream methodsFor: 'private basic' stamp: 'yo 11/11/2002 13:21'!\\\\nbasicPosition: pos\\\\n\\\\n\\\\t^ super position: pos.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMultiByteBinaryOrTextStream class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MultiByteBinaryOrTextStream class methodsFor: 'defaults' stamp: 'yo 2/25/2005 20:04'!\\\\ndefaultConverter\\\\n\\\\t^ Latin1TextConverter new.\\\\n! !\\\\n\\\\n\\\\n!MultiByteBinaryOrTextStream class methodsFor: 'instance creation' stamp: 'ykoubo 9/28/2003 19:59'!\\\\non: aCollection encoding: encodingName \\\\n\\\\t| aTextConverter |\\\\n\\\\tencodingName isNil\\\\n\\\\t\\\\tifTrue: [aTextConverter _ TextConverter default]\\\\n\\\\t\\\\tifFalse: [aTextConverter _ TextConverter newForEncoding: encodingName].\\\\n\\\\t^ (self on: aCollection)\\\\n\\\\t\\\\tconverter: aTextConverter! !\\\\n\\\\n!MultiByteBinaryOrTextStream class methodsFor: 'instance creation' stamp: 'yo 11/23/2003 20:32'!\\\\nwith: aCollection encoding: encodingName \\\\n\\\\t| aTextConverter |\\\\n\\\\tencodingName isNil\\\\n\\\\t\\\\tifTrue: [aTextConverter _ TextConverter default]\\\\n\\\\t\\\\tifFalse: [aTextConverter _ TextConverter newForEncoding: encodingName].\\\\n\\\\t^ (self with: aCollection)\\\\n\\\\t\\\\tconverter: aTextConverter! !\\\\nStandardFileStream subclass: #MultiByteFileStream\\\\n\\\\tinstanceVariableNames: 'converter lineEndConvention wantsLineEndConversion'\\\\n\\\\tclassVariableNames: 'Cr CrLf Lf LineEndDefault LineEndStrings LookAheadCount'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Multilingual-TextConversion'!\\\\n!MultiByteFileStream commentStamp: '<historical>' prior: 0!\\\\nThe central class to access the external file.  The interface of this object is similar to good old StandardFileStream, but internally it asks the converter, which is a sub-instance of TextConverter, and do the text conversion.\\\\n\\\\n  It also combined the good old CrLfFileStream.  CrLfFileStream class>>new now returns an instance of MultiByteFileStream.\\\\n\\\\n  There are several pitfalls:\\\\n\\\\n  * You always have to be careful about the binary/text distinction.  In #text mode, it usually interpret the bytes.\\\\n  * A few file pointer operations treat the file as uninterpreted byte no matter what.  This means that if you use 'fileStream skip: -1', 'fileStream position: x', etc. in #text mode, the file position can be in the middle of multi byte character.  If you want to implement some function similar to #peek for example, call the saveStateOf: and restoreStateOf: methods to be able to get back to the original state.\\\\n  * #lineEndConvention: and #wantsLineEndConversion: (and #binary) can cause some puzzling situation because the inst var lineEndConvention and wantsLineEndConversion are mutated.  If you have any suggestions to clean up the protocol, please let me know.!\\\\n\\\\n\\\\n!MultiByteFileStream methodsFor: 'accessing' stamp: 'yo 2/21/2004 02:57'!\\\\nascii\\\\n\\\\n\\\\tsuper ascii.\\\\n\\\\tself detectLineEndConvention.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'accessing' stamp: 'yo 2/21/2004 02:57'!\\\\nbinary\\\\n\\\\n\\\\tsuper binary.\\\\n\\\\tlineEndConvention _ nil.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'accessing' stamp: 'yo 8/18/2003 15:11'!\\\\nconverter\\\\n\\\\n\\\\tconverter ifNil: [converter _ TextConverter defaultSystemConverter].\\\\n\\\\t^ converter\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'accessing' stamp: 'yo 8/28/2002 11:09'!\\\\nconverter: aConverter\\\\n\\\\n\\\\tconverter _ aConverter.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'accessing' stamp: 'yo 8/6/2003 11:56'!\\\\nfileInEncodingName: aString\\\\n\\\\n\\\\tself converter: (TextConverter newForEncoding: aString).\\\\n\\\\tsuper fileIn.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'accessing' stamp: 'nk 9/5/2004 12:57'!\\\\nlineEndConvention\\\\n\\\\n\\\\t^lineEndConvention! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'accessing' stamp: 'yo 2/21/2004 02:59'!\\\\nlineEndConvention: aSymbol\\\\n\\\\n\\\\tlineEndConvention _ aSymbol.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'accessing' stamp: 'yo 2/21/2004 04:24'!\\\\nwantsLineEndConversion: aBoolean\\\\n\\\\n\\\\twantsLineEndConversion _ aBoolean.\\\\n\\\\tself detectLineEndConvention.! !\\\\n\\\\n\\\\n!MultiByteFileStream methodsFor: 'crlf private' stamp: 'yo 2/24/2004 13:38'!\\\\nbareNext\\\\n\\\\n\\\\t ^ self converter nextFromStream: self.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'crlf private' stamp: 'yo 2/21/2004 02:56'!\\\\nconvertStringFromCr: aString \\\\n\\\\t| inStream outStream |\\\\n\\\\tlineEndConvention ifNil: [^ aString].\\\\n\\\\tlineEndConvention == #cr ifTrue: [^ aString].\\\\n\\\\tlineEndConvention == #lf ifTrue: [^ aString copy replaceAll: Cr with: Lf].\\\\n\\\\t\\\\\\\"lineEndConvention == #crlf\\\\\\\"\\\\n\\\\tinStream _ ReadStream on: aString.\\\\n\\\\toutStream _ WriteStream on: (String new: aString size).\\\\n\\\\t[inStream atEnd]\\\\n\\\\t\\\\twhileFalse: \\\\n\\\\t\\\\t\\\\t[outStream nextPutAll: (inStream upTo: Cr).\\\\n\\\\t\\\\t\\\\t(inStream atEnd not or: [aString last = Cr])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [outStream nextPutAll: CrLf]].\\\\n\\\\t^ outStream contents! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'crlf private' stamp: 'yo 2/21/2004 02:56'!\\\\nconvertStringToCr: aString \\\\n\\\\t| inStream outStream |\\\\n\\\\tlineEndConvention ifNil: [^ aString].\\\\n\\\\tlineEndConvention == #cr ifTrue: [^ aString].\\\\n\\\\tlineEndConvention == #lf ifTrue: [^ aString copy replaceAll: Lf with: Cr].\\\\n\\\\t\\\\\\\"lineEndConvention == #crlf\\\\\\\"\\\\n\\\\tinStream _ ReadStream on: aString.\\\\n\\\\toutStream _ WriteStream on: (String new: aString size).\\\\n\\\\t[inStream atEnd]\\\\n\\\\t\\\\twhileFalse: \\\\n\\\\t\\\\t\\\\t[outStream nextPutAll: (inStream upTo: Cr).\\\\n\\\\t\\\\t\\\\t(inStream atEnd not or: [aString last = Cr])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[outStream nextPut: Cr.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tinStream peek = Lf ifTrue: [inStream next]]].\\\\n\\\\t^ outStream contents! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'crlf private' stamp: 'nk 9/5/2004 12:50'!\\\\ndetectLineEndConvention\\\\n\\\\t\\\\\\\"Detect the line end convention used in this stream. The result may be either #cr, #lf or #crlf.\\\\\\\"\\\\n\\\\t| char numRead state |\\\\n\\\\tself isBinary ifTrue: [^ self error: 'Line end conventions are not used on binary streams'].\\\\n\\\\tself wantsLineEndConversion ifFalse: [^ lineEndConvention _ nil.].\\\\n\\\\tself closed ifTrue: [^ lineEndConvention _ LineEndDefault.].\\\\n\\\\n\\\\t\\\\\\\"Default if nothing else found\\\\\\\"\\\\n\\\\tnumRead _ 0.\\\\n\\\\tstate _ converter saveStateOf: self.\\\\n\\\\tlineEndConvention _ nil.\\\\n\\\\t[super atEnd not and: [numRead < LookAheadCount]]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[char _ self next.\\\\n\\\\t\\\\t\\\\tchar = Lf\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[converter restoreStateOf: self with: state.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ lineEndConvention _ #lf].\\\\n\\\\t\\\\t\\\\tchar = Cr\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self peek = Lf\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [lineEndConvention _ #crlf]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [lineEndConvention _ #cr].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tconverter restoreStateOf: self with: state.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ lineEndConvention].\\\\n\\\\t\\\\t\\\\tnumRead _ numRead + 1].\\\\n\\\\tconverter restoreStateOf: self with: state.\\\\n\\\\t^ lineEndConvention _ LineEndDefault.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'crlf private' stamp: 'nk 9/5/2004 12:51'!\\\\ndoConversion\\\\n\\\\n\\\\t^self wantsLineEndConversion and: [ lineEndConvention notNil ]! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'crlf private' stamp: 'yo 2/24/2004 13:44'!\\\\nnext: n innerFor: aString\\\\n\\\\n\\\\t| peekChar state |\\\\n\\\\t\\\\\\\"if we just read a CR, and the next character is an LF, then skip the LF\\\\\\\"\\\\n\\\\taString size = 0 ifTrue: [^ aString].\\\\n\\\\t(aString last = Character cr) ifTrue: [\\\\n\\\\t\\\\tstate _ converter saveStateOf: self.\\\\n\\\\t\\\\tpeekChar _ self bareNext.\\\\t\\\\t\\\\\\\"super peek doesn't work because it relies on #next\\\\\\\"\\\\n\\\\t\\\\t(peekChar notNil and: [peekChar ~= Character lf]) ifTrue: [\\\\n\\\\t\\\\t\\\\tconverter restoreStateOf: self with: state.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n \\\\n\\\\t^ aString withSqueakLineEndings.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'crlf private' stamp: 'yo 2/21/2004 03:51'!\\\\nwantsLineEndConversion\\\\n\\\\n\\\\t^ wantsLineEndConversion ifNil: [false].\\\\n! !\\\\n\\\\n\\\\n!MultiByteFileStream methodsFor: 'fileIn/Out' stamp: 'yo 8/17/2004 10:03'!\\\\nfileIn\\\\n\\\\n\\\\tself setConverterForCode.\\\\n\\\\tsuper fileIn.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'fileIn/Out' stamp: 'ar 7/29/2005 22:33'!\\\\nfileInObjectAndCodeForProject\\\\n\\\\t\\\\\\\"This file may contain:\\\\n1) a fileIn of code  \\\\n2) just an object in SmartReferenceStream format \\\\n3) both code and an object.\\\\n\\\\tFile it in and return the object.  Note that self must be a FileStream or RWBinaryOrTextStream.  Maybe ReadWriteStream incorporate RWBinaryOrTextStream?\\\\\\\"\\\\n\\\\t| refStream object |\\\\n\\\\tself text.\\\\n\\\\tself peek asciiValue = 4\\\\n\\\\t\\\\tifTrue: [  \\\\\\\"pure object file\\\\\\\"\\\\n\\\\t\\\\t\\\\tself binary.\\\\n\\\\t\\\\t\\\\trefStream _ SmartRefStream on: self.\\\\n\\\\t\\\\t\\\\tobject _ refStream nextAndClose]\\\\n\\\\t\\\\tifFalse: [  \\\\\\\"objects mixed with a fileIn\\\\\\\"\\\\n\\\\t\\\\t\\\\tself fileInProject.  \\\\\\\"reads code and objects, then closes the file\\\\\\\"\\\\n\\\\t\\\\t\\\\tself binary.\\\\n\\\\t\\\\t\\\\tobject _ SmartRefStream scannedObject].\\\\t\\\\\\\"set by side effect of one of the chunks\\\\\\\"\\\\n\\\\tSmartRefStream scannedObject: nil.  \\\\\\\"clear scannedObject\\\\\\\"\\\\n\\\\t^ object! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'fileIn/Out' stamp: 'ar 7/29/2005 22:33'!\\\\nfileInProject\\\\n\\\\n\\\\tself setConverterForCodeForProject.\\\\n\\\\tsuper fileIn.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'fileIn/Out' stamp: 'tak 1/12/2005 14:48'!\\\\nfileOutClass: extraClass andObject: theObject \\\\n\\\\tself binary.\\\\n\\\\tUTF8TextConverter writeBOMOn: self.\\\\n\\\\tself text.\\\\n\\\\t^ super fileOutClass: extraClass andObject: theObject! !\\\\n\\\\n\\\\n!MultiByteFileStream methodsFor: 'open/close' stamp: 'md 7/20/2006 11:05'!\\\\nopen: fileName forWrite: writeMode \\\\n\\\\t| result |\\\\n\\\\tresult := super open: fileName forWrite: writeMode.\\\\n\\\\tresult ifNotNil: [\\\\n\\\\t\\\\t\\\\tconverter ifNil: [converter := UTF8TextConverter new].\\\\n\\\\t\\\\t\\\\tself detectLineEndConvention].\\\\n\\\\t^result! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'open/close' stamp: 'yo 8/13/2003 13:51'!\\\\nreset\\\\n\\\\n\\\\tsuper reset.\\\\n\\\\tconverter ifNil: [\\\\n\\\\t\\\\tconverter _ UTF8TextConverter new.\\\\n\\\\t].\\\\n! !\\\\n\\\\n\\\\n!MultiByteFileStream methodsFor: 'public' stamp: 'yo 2/24/2004 13:49'!\\\\nnext\\\\n\\\\n\\\\t| char secondChar state |\\\\n\\\\tchar _ self converter nextFromStream: self.\\\\n\\\\tself doConversion ifTrue: [\\\\n\\\\t\\\\tchar == Cr ifTrue: [\\\\n\\\\t\\\\t\\\\tstate _ converter saveStateOf: self.\\\\n\\\\t\\\\t\\\\tsecondChar _ self bareNext.\\\\n\\\\t\\\\t\\\\tsecondChar ifNotNil: [secondChar == Lf ifFalse: [converter restoreStateOf: self with: state]].\\\\n\\\\t\\\\t^Cr].\\\\n\\\\t\\\\tchar == Lf ifTrue: [^Cr].\\\\n\\\\t].\\\\n\\\\t^ char.\\\\n\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'public' stamp: 'yo 7/31/2004 18:03'!\\\\nnext: anInteger \\\\n\\\\n\\\\t| multiString |\\\\n\\\\tself isBinary ifTrue: [^ super next: anInteger].\\\\n\\\\tmultiString _ String new: anInteger.\\\\n\\\\t1 to: anInteger do: [:index |\\\\n\\\\t\\\\t| character |\\\\n\\\\t\\\\t(character _ self next) ifNotNil: [\\\\n\\\\t\\\\t\\\\tmultiString at: index put: character\\\\n\\\\t\\\\t] ifNil: [\\\\n\\\\t\\\\t\\\\tmultiString _ multiString copyFrom: 1 to: index - 1.\\\\n\\\\t\\\\t\\\\tself doConversion ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t^ multiString\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\t^ self next: anInteger innerFor: multiString.\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\tself doConversion ifFalse: [\\\\n\\\\t\\\\t^ multiString\\\\n\\\\t].\\\\n\\\\n\\\\tmultiString _ self next: anInteger innerFor: multiString.\\\\n\\\\t(multiString size = anInteger or: [self atEnd]) ifTrue: [ ^ multiString].\\\\n\\\\t^ multiString, (self next: anInteger - multiString size).\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'public' stamp: 'yo 2/21/2004 03:26'!\\\\nnextDelimited: terminator\\\\n\\\\n\\\\t| out ch save |\\\\n\\\\tout _ WriteStream on: (String new: 1000).\\\\n\\\\tself atEnd ifTrue: [^ ''].\\\\n\\\\tsave _ converter saveStateOf: self.\\\\n\\\\n\\\\tself next = terminator ifFalse: [\\\\n\\\\t\\\\t\\\\\\\"absorb initial terminator\\\\\\\"\\\\n\\\\t\\\\tconverter restoreStateOf: self with: save.\\\\n\\\\t].\\\\n\\\\t[(ch _ self next) == nil] whileFalse: [\\\\n\\\\t\\\\t(ch = terminator) ifTrue: [\\\\n\\\\t\\\\t\\\\tself peek = terminator ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tself next.  \\\\\\\"skip doubled terminator\\\\\\\"\\\\n\\\\t\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t^ out contents  \\\\\\\"terminator is not doubled; we're done!!\\\\\\\"\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tout nextPut: ch.\\\\n\\\\t].\\\\n\\\\t^ out contents.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'public' stamp: 'yo 8/28/2002 11:13'!\\\\nnextMatchAll: aColl\\\\n\\\\n    | save |\\\\n    save _ converter saveStateOf: self.\\\\n    aColl do: [:each |\\\\n       (self next) = each ifFalse: [\\\\n            converter restoreStateOf: self with: save.\\\\n            ^ false.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n    ^ true.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'public' stamp: 'yo 2/21/2004 03:42'!\\\\nnextPut: aCharacter\\\\n\\\\n\\\\taCharacter isInteger ifTrue: [^ super nextPut: aCharacter].\\\\n\\\\tself doConversion ifTrue: [\\\\n\\\\t\\\\taCharacter = Cr ifTrue: [\\\\n\\\\t\\\\t\\\\t(LineEndStrings at: lineEndConvention) do: [:e | converter nextPut: e toStream: self].\\\\n\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\tconverter nextPut: aCharacter toStream: self\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\t^ aCharacter\\\\n\\\\t].\\\\n\\\\t^ self converter nextPut: aCharacter toStream: self\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'public' stamp: 'yo 5/23/2003 09:40'!\\\\nnextPutAll: aCollection\\\\n\\\\n\\\\t(self isBinary or: [aCollection class == ByteArray]) ifTrue: [\\\\n\\\\t\\\\t^ super nextPutAll: aCollection.\\\\n\\\\t].\\\\n\\\\taCollection do: [:e | self nextPut: e].\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'public' stamp: 'yo 2/21/2004 04:00'!\\\\npeek\\\\n\\\\t\\\\\\\"Answer what would be returned if the message next were sent to the receiver. If the receiver is at the end, answer nil.  \\\\\\\"\\\\n\\\\n\\\\t| next save |\\\\n\\\\tself atEnd ifTrue: [^ nil].\\\\n\\\\tsave _ converter saveStateOf: self.\\\\n\\\\tnext _ self next.\\\\n\\\\tconverter restoreStateOf: self with: save.\\\\n\\\\t^ next.\\\\n\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'public' stamp: 'yo 8/28/2002 11:15'!\\\\npeekFor: item \\\\n\\\\n\\\\t| next state |\\\\n\\\\t\\\\\\\"self atEnd ifTrue: [^ false]. -- SFStream will give nil\\\\\\\"\\\\n\\\\tstate _ converter saveStateOf: self.\\\\n\\\\t(next _ self next) == nil ifTrue: [^ false].\\\\n\\\\titem = next ifTrue: [^ true].\\\\n\\\\tconverter restoreStateOf: self with: state.\\\\n\\\\t^ false.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'public' stamp: 'yo 2/24/2004 13:35'!\\\\nskipSeparators\\\\n\\\\n\\\\t| state |\\\\n\\\\t[self atEnd] whileFalse: [\\\\n\\\\t\\\\tstate _ converter saveStateOf: self.\\\\n\\\\t\\\\tself next isSeparator ifFalse: [\\\\n\\\\t\\\\t\\\\t^ converter restoreStateOf: self with: state]]\\\\n\\\\n\\\\n\\\\\\\"\\\\t[self atEnd] whileFalse: [\\\\n\\\\t\\\\tself next isSeparator ifFalse: [\\\\n\\\\t\\\\t\\\\t^ self position: self position - converter currentCharSize.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\\\\"\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'public' stamp: 'yo 2/21/2004 04:01'!\\\\nskipSeparatorsAndPeekNext\\\\n\\\\n\\\\t\\\\\\\"A special function to make nextChunk fast\\\\\\\"\\\\n\\\\t| peek save |\\\\n\\\\t[self atEnd] whileFalse: [\\\\n\\\\t\\\\tsave _ converter saveStateOf: self.\\\\n\\\\t\\\\t(peek _ self next) isSeparator ifFalse: [\\\\n\\\\t\\\\t\\\\tconverter restoreStateOf: self with: save.\\\\n\\\\t\\\\t\\\\t^ peek.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'public' stamp: 'yo 8/28/2002 11:17'!\\\\nupTo: delim \\\\n\\\\n\\\\t| out ch |\\\\n\\\\tout _ WriteStream on: (String new: 1000).\\\\n\\\\tself atEnd ifTrue: [^ ''].\\\\n\\\\t[(ch _ self next) isNil] whileFalse: [\\\\n\\\\t\\\\t(ch = delim) ifTrue: [\\\\n\\\\t\\\\t\\\\t^ out contents  \\\\\\\"terminator is not doubled; we're done!!\\\\\\\"\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tout nextPut: ch.\\\\n\\\\t].\\\\n\\\\t^ out contents.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'public' stamp: 'yo 8/30/2002 16:39'!\\\\nupToEnd\\\\n\\\\n\\\\t| newStream element |\\\\n\\\\tcollection _ self isBinary\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [ByteArray new: 100]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [String new: 100].\\\\n\\\\tnewStream _ WriteStream on: collection.\\\\n\\\\t[(element _ self next) notNil]\\\\n\\\\t\\\\twhileTrue: [newStream nextPut: element].\\\\n\\\\t^ newStream contents\\\\n! !\\\\n\\\\n\\\\n!MultiByteFileStream methodsFor: 'remnant' stamp: 'yo 8/28/2002 11:06'!\\\\naccepts: aSymbol\\\\n\\\\n \\\\t^ converter accepts: aSymbol.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'remnant' stamp: 'yo 8/28/2002 11:09'!\\\\nfilterFor: aFileStream\\\\n\\\\n\\\\t| rw |\\\\n\\\\tname _ aFileStream name.\\\\n\\\\trw _ aFileStream isReadOnly not.\\\\n\\\\taFileStream close.\\\\n\\\\tself open: name forWrite: rw.\\\\n\\\\t^self.\\\\n! !\\\\n\\\\n\\\\n!MultiByteFileStream methodsFor: 'private' stamp: 'mir 8/25/2004 17:27'!\\\\nsetConverterForCode\\\\n\\\\n\\\\t| current |\\\\n\\\\t(SourceFiles at: 2)\\\\n\\\\t\\\\tifNotNil: [self fullName = (SourceFiles at: 2) fullName ifTrue: [^ self]].\\\\n\\\\tcurrent _ self converter saveStateOf: self.\\\\n\\\\tself position: 0.\\\\n\\\\tself binary.\\\\n\\\\t((self next: 3) = (ByteArray with: 16rEF with: 16rBB with: 16rBF)) ifTrue: [\\\\n\\\\t\\\\tself converter: UTF8TextConverter new\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tself converter: MacRomanTextConverter new.\\\\n\\\\t].\\\\n\\\\tconverter restoreStateOf: self with: current.\\\\n\\\\tself text.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'private' stamp: 'ar 7/29/2005 22:33'!\\\\nsetConverterForCodeForProject\\\\n\\\\n\\\\tself converter: UTF8TextConverter new.\\\\n! !\\\\n\\\\n\\\\n!MultiByteFileStream methodsFor: 'private basic' stamp: 'md 10/17/2004 16:09'!\\\\nbasicNext: anInteger\\\\n\\\\n\\\\t^ super next: anInteger.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'private basic' stamp: 'yo 8/28/2002 11:07'!\\\\nbasicNext: n into: aString\\\\n\\\\n\\\\t^ super next: n into: aString.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'private basic' stamp: 'yo 8/28/2002 11:07'!\\\\nbasicNextInto: aString\\\\n\\\\n\\\\t^ super nextInto: aString.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'private basic' stamp: 'yo 8/28/2002 11:07'!\\\\nbasicNextPut: char\\\\n\\\\n\\\\t^ super nextPut: char.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'private basic' stamp: 'yo 8/28/2002 11:07'!\\\\nbasicNextPutAll: aString\\\\n\\\\n\\\\t^ super nextPutAll: aString.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'private basic' stamp: 'yo 8/28/2002 11:07'!\\\\nbasicPeek\\\\n\\\\n\\\\t^ super peek\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'private basic' stamp: 'yo 8/28/2002 11:08'!\\\\nbasicPosition\\\\n\\\\n\\\\t^ super position.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'private basic' stamp: 'yo 8/28/2002 11:08'!\\\\nbasicPosition: pos\\\\n\\\\n\\\\t^ super position: pos.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'private basic' stamp: 'yo 8/28/2002 11:08'!\\\\nbasicReadInto: byteArray startingAt: startIndex count: count\\\\n\\\\n\\\\t^ super readInto: byteArray startingAt: startIndex count: count.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'private basic' stamp: 'yo 8/28/2002 11:08'!\\\\nbasicSetToEnd\\\\n\\\\n\\\\t^ super setToEnd.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'private basic' stamp: 'yo 8/28/2002 11:08'!\\\\nbasicSkip: n\\\\n\\\\n\\\\t^ super skip: n.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'private basic' stamp: 'yo 8/28/2002 11:08'!\\\\nbasicUpTo: delim\\\\n\\\\n\\\\t^ super upTo: delim.\\\\n! !\\\\n\\\\n!MultiByteFileStream methodsFor: 'private basic' stamp: 'yo 8/28/2002 11:09'!\\\\nbasicVerbatim: aString\\\\n\\\\n\\\\t^ super verbatim: aString.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMultiByteFileStream class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MultiByteFileStream class methodsFor: 'class initialization' stamp: 'yo 2/21/2004 02:45'!\\\\ndefaultToCR\\\\n\\\\n\\\\t\\\\\\\"MultiByteFileStream defaultToCR\\\\\\\"\\\\n\\\\tLineEndDefault := #cr.\\\\n! !\\\\n\\\\n!MultiByteFileStream class methodsFor: 'class initialization' stamp: 'yo 2/21/2004 02:45'!\\\\ndefaultToCRLF\\\\n\\\\n\\\\t\\\\\\\"MultiByteFileStream defaultToCRLF\\\\\\\"\\\\n\\\\tLineEndDefault := #crlf.! !\\\\n\\\\n!MultiByteFileStream class methodsFor: 'class initialization' stamp: 'yo 2/21/2004 02:46'!\\\\ndefaultToLF\\\\n\\\\n\\\\t\\\\\\\"MultiByteFileStream defaultToLF\\\\\\\"\\\\n\\\\tLineEndDefault := #lf.\\\\n! !\\\\n\\\\n!MultiByteFileStream class methodsFor: 'class initialization' stamp: 'yo 2/21/2004 02:44'!\\\\nguessDefaultLineEndConvention\\\\n\\\\n\\\\t\\\\\\\"Lets try to guess the line end convention from what we know about the path name delimiter from FileDirectory.\\\\\\\"\\\\n\\\\tFileDirectory pathNameDelimiter = $: ifTrue:[^self defaultToCR].\\\\n\\\\tFileDirectory pathNameDelimiter = $/ ifTrue:[^self defaultToLF].\\\\n\\\\tFileDirectory pathNameDelimiter = $\\\\\\\\ ifTrue:[^self defaultToCRLF].\\\\n\\\\t\\\\\\\"in case we don't know\\\\\\\"\\\\n\\\\t^self defaultToCR.\\\\n! !\\\\n\\\\n!MultiByteFileStream class methodsFor: 'class initialization' stamp: 'yo 2/21/2004 02:44'!\\\\ninitialize\\\\n\\\\n\\\\t\\\\\\\"MultiByteFileStream initialize\\\\\\\"\\\\n\\\\tCr := Character cr.\\\\n\\\\tLf := Character lf.\\\\n\\\\tCrLf := String with: Cr with: Lf.\\\\n\\\\tLineEndStrings := Dictionary new.\\\\n\\\\tLineEndStrings at: #cr put: (String with: Character cr).\\\\n\\\\tLineEndStrings at: #lf put: (String with: Character lf).\\\\n\\\\tLineEndStrings at: #crlf put: (String with: Character cr with: Character lf).\\\\n\\\\tLookAheadCount := 2048.\\\\n\\\\tSmalltalk addToStartUpList: self.\\\\n\\\\tself startUp.\\\\n! !\\\\n\\\\n!MultiByteFileStream class methodsFor: 'class initialization' stamp: 'yo 2/21/2004 02:44'!\\\\nstartUp\\\\n\\\\n\\\\tself guessDefaultLineEndConvention.\\\\n! !\\\\n\\\\n\\\\n!MultiByteFileStream class methodsFor: 'instance creation' stamp: 'yo 8/28/2002 11:43'!\\\\nnewFrom: aFileStream\\\\n\\\\n\\\\t| rw n |\\\\n\\\\tn _ aFileStream name.\\\\n\\\\trw _ aFileStream isReadOnly not.\\\\n\\\\taFileStream close.\\\\n\\\\t^self new open: n forWrite: rw.\\\\n! !\\\\nPluggableCanvas subclass: #MultiCanvas\\\\n\\\\tinstanceVariableNames: 'canvases extent depth'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Support'!\\\\n!MultiCanvas commentStamp: '<historical>' prior: 0!\\\\nA canvas which forwards drawing commands to sub-canvases.!\\\\n\\\\n\\\\n!MultiCanvas methodsFor: 'accessing' stamp: 'ls 3/20/2000 20:48'!\\\\naddCanvas: aCanvas\\\\n\\\\tcanvases add: aCanvas! !\\\\n\\\\n!MultiCanvas methodsFor: 'accessing' stamp: 'RAA 11/7/2000 17:46'!\\\\nclipRect\\\\n\\\\t\\\\n\\\\t^super clipRect ifNil: [\\\\n\\\\t\\\\t0@0 extent: 5000@5000\\\\n\\\\t].! !\\\\n\\\\n!MultiCanvas methodsFor: 'accessing' stamp: 'RAA 8/14/2000 10:27'!\\\\ncontentsOfArea: aRectangle into: aForm\\\\n\\\\n\\\\tself apply: [ :c |\\\\n\\\\t\\\\t(c isKindOf: FormCanvas) ifTrue: [\\\\n\\\\t\\\\t\\\\tc contentsOfArea: aRectangle into: aForm.\\\\n\\\\t\\\\t\\\\t^aForm\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\tself apply: [ :c |\\\\n\\\\t\\\\tc contentsOfArea: aRectangle into: aForm.\\\\n\\\\t\\\\t^aForm.\\\\n\\\\t].\\\\n\\\\t^aForm! !\\\\n\\\\n!MultiCanvas methodsFor: 'accessing' stamp: 'ls 4/8/2000 22:35'!\\\\ndepth\\\\n\\\\t^depth! !\\\\n\\\\n!MultiCanvas methodsFor: 'accessing' stamp: 'ls 4/8/2000 22:35'!\\\\nextent\\\\n\\\\t^extent! !\\\\n\\\\n!MultiCanvas methodsFor: 'accessing' stamp: 'ls 3/20/2000 20:48'!\\\\nremoveCanvas: aCanvas\\\\n\\\\tcanvases remove: aCanvas ifAbsent: []! !\\\\n\\\\n\\\\n!MultiCanvas methodsFor: 'initialization' stamp: 'RAA 8/1/2000 13:50'!\\\\nallocateForm: extentPoint\\\\n\\\\t\\\\\\\"Allocate a new form which is similar to the receiver and can be used for accelerated blts\\\\\\\"\\\\n\\\\t^Form extent: extentPoint depth: self depth! !\\\\n\\\\n!MultiCanvas methodsFor: 'initialization' stamp: 'ls 4/8/2000 22:35'!\\\\ndepth: newDepth\\\\n\\\\t\\\\\\\"set the extent to be used with this canvas\\\\\\\"\\\\n\\\\tdepth := newDepth.! !\\\\n\\\\n!MultiCanvas methodsFor: 'initialization' stamp: 'ls 4/8/2000 22:34'!\\\\nextent: newExtent\\\\n\\\\t\\\\\\\"set the extent to be used with this canvas\\\\\\\"\\\\n\\\\textent := newExtent.! !\\\\n\\\\n!MultiCanvas methodsFor: 'initialization' stamp: 'ls 4/8/2000 22:34'!\\\\ninitialize\\\\n\\\\tcanvases := Set new.\\\\n\\\\textent := 600@400.\\\\n\\\\tdepth := 32. ! !\\\\n\\\\n\\\\n!MultiCanvas methodsFor: 'private' stamp: 'RAA 11/6/2000 14:17'!\\\\napply: aCommand\\\\n\\\\n\\\\tself flag: #roundedRudeness.\\\\t\\\\n\\\\t\\\\\\\"This rudeness is to help get rounded corners to work right on RemoteCanvases. Since the RemoteCanvas has no other way to read its bits, we are grabbing them from Display for now. To support this, we need to see that the Display is written before any RemoteCanvases\\\\\\\"\\\\n\\\\n\\\\tcanvases do: [ :canvas | \\\\n\\\\t\\\\t(canvas isKindOf: FormCanvas) ifTrue: [aCommand value: canvas]\\\\n\\\\t].\\\\n\\\\tcanvases do: [ :canvas | \\\\n\\\\t\\\\t(canvas isKindOf: FormCanvas) ifFalse: [aCommand value: canvas]\\\\n\\\\t].\\\\n! !\\\\nMultiCharacterScanner subclass: #MultiCanvasCharacterScanner\\\\n\\\\tinstanceVariableNames: 'canvas fillBlt foregroundColor runX lineY'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Multilingual-Scanning'!\\\\n\\\\n!MultiCanvasCharacterScanner methodsFor: 'accessing' stamp: 'yo 12/18/2002 13:55'!\\\\ncanvas: aCanvas\\\\n\\\\t\\\\\\\"set the canvas to draw on\\\\\\\"\\\\n\\\\tcanvas ifNotNil: [ self inform: 'initializing twice!!' ].\\\\n\\\\tcanvas _ aCanvas! !\\\\n\\\\n\\\\n!MultiCanvasCharacterScanner methodsFor: 'scanning' stamp: 'yo 12/18/2002 13:55'!\\\\ndisplayLine: textLine  offset: offset  leftInRun: leftInRun\\\\n\\\\t|  nowLeftInRun done startLoc startIndex stopCondition |\\\\n\\\\t\\\\\\\"largely copied from DisplayScanner's routine\\\\\\\"\\\\n\\\\n\\\\tline _ textLine.\\\\n\\\\tforegroundColor ifNil: [ foregroundColor _ Color black ].\\\\n\\\\tleftMargin _ (line leftMarginForAlignment: alignment) + offset x.\\\\n\\\\n\\\\trightMargin _ line rightMargin + offset x.\\\\n\\\\tlineY _ line top + offset y.\\\\n\\\\tlastIndex _ textLine first.\\\\n\\\\tleftInRun <= 0\\\\n\\\\t\\\\tifTrue: [self setStopConditions.  \\\\\\\"also sets the font\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tnowLeftInRun _ text runLengthFor: lastIndex]\\\\n\\\\t\\\\tifFalse: [nowLeftInRun _ leftInRun].\\\\n\\\\trunX _ destX _ leftMargin.\\\\n\\\\n\\\\trunStopIndex _ lastIndex + (nowLeftInRun - 1) min: line last.\\\\n\\\\tspaceCount _ 0.\\\\n\\\\tdone _ false.\\\\n\\\\n\\\\t[done] whileFalse: [\\\\n\\\\t\\\\t\\\\\\\"remember where this portion of the line starts\\\\\\\"\\\\n\\\\t\\\\tstartLoc _ destX@destY.\\\\n\\\\t\\\\tstartIndex _ lastIndex.\\\\n\\\\n\\\\t\\\\t\\\\\\\"find the end of this portion of the line\\\\\\\"\\\\n\\\\t\\\\tstopCondition _ self scanCharactersFrom: lastIndex to: runStopIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tin: text string rightX: rightMargin stopConditions: stopConditions\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tkern: kern \\\\\\\"displaying: false\\\\\\\".\\\\n\\\\n\\\\t\\\\t\\\\\\\"display that portion of the line\\\\\\\"\\\\n\\\\t\\\\tcanvas drawString: text string\\\\n\\\\t\\\\t\\\\tfrom: startIndex to: lastIndex\\\\n\\\\t\\\\t\\\\tat: startLoc\\\\n\\\\t\\\\t\\\\tfont: font\\\\n\\\\t\\\\t\\\\tcolor: foregroundColor.\\\\n\\\\n\\\\t\\\\t\\\\\\\"handle the stop condition\\\\\\\"\\\\n\\\\t\\\\tdone _ self perform: stopCondition\\\\n\\\\t].\\\\n\\\\n\\\\t^runStopIndex - lastIndex! !\\\\n\\\\n\\\\n!MultiCanvasCharacterScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:55'!\\\\ncr\\\\n\\\\t\\\\\\\"When a carriage return is encountered, simply increment the pointer \\\\n\\\\tinto the paragraph.\\\\\\\"\\\\n\\\\n\\\\tlastIndex_ lastIndex + 1.\\\\n\\\\t^false! !\\\\n\\\\n!MultiCanvasCharacterScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:55'!\\\\ncrossedX\\\\n\\\\t\\\\\\\"This condition will sometimes be reached 'legally' during display, when, \\\\n\\\\tfor instance the space that caused the line to wrap actually extends over \\\\n\\\\tthe right boundary. This character is allowed to display, even though it \\\\n\\\\tis technically outside or straddling the clipping ectangle since it is in \\\\n\\\\tthe normal case not visible and is in any case appropriately clipped by \\\\n\\\\tthe scanner.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"self fillLeading.\\\\\\\"\\\\n\\\\t^ true ! !\\\\n\\\\n!MultiCanvasCharacterScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:55'!\\\\nendOfRun\\\\n\\\\t\\\\\\\"The end of a run in the display case either means that there is actually \\\\n\\\\ta change in the style (run code) to be associated with the string or the \\\\n\\\\tend of this line has been reached.\\\\\\\"\\\\n\\\\t| runLength |\\\\n\\\\n\\\\tlastIndex = line last ifTrue: [^true].\\\\n\\\\trunX _ destX.\\\\n\\\\trunLength _ text runLengthFor: (lastIndex _ lastIndex + 1).\\\\n\\\\trunStopIndex _ lastIndex + (runLength - 1) min: line last.\\\\n\\\\tself setStopConditions.\\\\n\\\\t^ false! !\\\\n\\\\n!MultiCanvasCharacterScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:55'!\\\\npaddedSpace\\\\n\\\\t\\\\\\\"Each space is a stop condition when the alignment is right justified. \\\\n\\\\tPadding must be added to the base width of the space according to \\\\n\\\\twhich space in the line this space is and according to the amount of \\\\n\\\\tspace that remained at the end of the line when it was composed.\\\\\\\"\\\\n\\\\n\\\\tdestX _ destX + spaceWidth + (line justifiedPadFor: spaceCount).\\\\n\\\\n\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\t^ false! !\\\\n\\\\n!MultiCanvasCharacterScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:55'!\\\\nsetStopConditions\\\\n\\\\t\\\\\\\"Set the font and the stop conditions for the current run.\\\\\\\"\\\\n\\\\t\\\\n\\\\tself setFont.\\\\n\\\\tself setConditionArray: (textStyle alignment = Justified ifTrue: [#paddedSpace]).\\\\n! !\\\\n\\\\n!MultiCanvasCharacterScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:55'!\\\\ntab\\\\n\\\\n\\\\tdestX _ (alignment == Justified and: [self leadingTab not])\\\\n\\\\t\\\\tifTrue:\\\\t\\\\t\\\\\\\"imbedded tabs in justified text are weird\\\\\\\"\\\\n\\\\t\\\\t\\\\t[destX + (textStyle tabWidth - (line justifiedTabDeltaFor: spaceCount)) max: destX]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[textStyle nextTabXFrom: destX\\\\n\\\\t\\\\t\\\\t\\\\tleftMargin: leftMargin\\\\n\\\\t\\\\t\\\\t\\\\trightMargin: rightMargin].\\\\n\\\\n\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!MultiCanvasCharacterScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:55'!\\\\ndoesDisplaying\\\\n\\\\t^false   \\\\\\\"it doesn't do displaying using copyBits\\\\\\\"! !\\\\n\\\\n!MultiCanvasCharacterScanner methodsFor: 'private' stamp: 'yo 1/6/2005 23:00'!\\\\nsetFont\\\\n\\\\tforegroundColor ifNil: [foregroundColor _ Color black].\\\\n\\\\tsuper setFont.\\\\n\\\\tbaselineY _ lineY + line baseline.\\\\n\\\\tdestY _ baselineY - font ascent.! !\\\\n\\\\n!MultiCanvasCharacterScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:55'!\\\\ntextColor: color\\\\n\\\\tforegroundColor _ color! !\\\\nMultiCharacterScanner subclass: #MultiCharacterBlockScanner\\\\n\\\\tinstanceVariableNames: 'characterPoint characterIndex lastCharacter lastCharacterExtent lastSpaceOrTabExtent nextLeftMargin specialWidth'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Multilingual-Scanning'!\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'scanning' stamp: 'yo 12/18/2002 13:56'!\\\\ncharacterBlockAtPoint: aPoint in: aParagraph\\\\n\\\\t\\\\\\\"Answer a CharacterBlock for character in aParagraph at point aPoint. It \\\\n\\\\tis assumed that aPoint has been transformed into coordinates appropriate \\\\n\\\\tto the text's destination form rectangle and the composition rectangle.\\\\\\\"\\\\n\\\\n\\\\tself initializeFromParagraph: aParagraph clippedBy: aParagraph clippingRectangle.\\\\n\\\\tcharacterPoint _ aPoint.\\\\n\\\\t^self buildCharacterBlockIn: aParagraph! !\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'scanning' stamp: 'nk 11/22/2004 14:36'!\\\\ncharacterBlockAtPoint: aPoint index: index in: textLine\\\\n\\\\t\\\\\\\"This method is the Morphic characterBlock finder.  It combines\\\\n\\\\tMVC's characterBlockAtPoint:, -ForIndex:, and buildCharcterBlock:in:\\\\\\\"\\\\n\\\\t| runLength lineStop done stopCondition |\\\\n\\\\tline := textLine.\\\\n\\\\trightMargin := line rightMargin.\\\\n\\\\tlastIndex := line first.\\\\n\\\\tself setStopConditions.\\\\t\\\\t\\\\\\\"also sets font\\\\\\\"\\\\n\\\\tcharacterIndex := index.  \\\\\\\" == nil means scanning for point\\\\\\\"\\\\n\\\\tcharacterPoint := aPoint.\\\\n\\\\t(characterPoint isNil or: [characterPoint y > line bottom])\\\\n\\\\t\\\\tifTrue: [characterPoint := line bottomRight].\\\\n\\\\t(text isEmpty or: [(characterPoint y < line top or: [characterPoint x < line left])\\\\n\\\\t\\\\t\\\\t\\\\tor: [characterIndex notNil and: [characterIndex < line first]]])\\\\n\\\\t\\\\tifTrue:\\\\t[^ (CharacterBlock new stringIndex: line first text: text\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttopLeft: line leftMargin@line top extent: 0 @ textStyle lineGrid)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttextLine: line].\\\\n\\\\tdestX := leftMargin := line leftMarginForAlignment: alignment.\\\\n\\\\tdestY := line top.\\\\n\\\\trunLength := text runLengthFor: line first.\\\\n\\\\tcharacterIndex\\\\n\\\\t\\\\tifNotNil:\\\\t[lineStop := characterIndex  \\\\\\\"scanning for index\\\\\\\"]\\\\n\\\\t\\\\tifNil:\\\\t[lineStop := line last  \\\\\\\"scanning for point\\\\\\\"].\\\\n\\\\trunStopIndex := lastIndex + (runLength - 1) min: lineStop.\\\\n\\\\tlastCharacterExtent := 0 @ line lineHeight.\\\\n\\\\tspaceCount := 0.\\\\n\\\\n\\\\tdone  := false.\\\\n\\\\t[done] whileFalse:\\\\n\\\\t\\\\t[stopCondition := self scanCharactersFrom: lastIndex to: runStopIndex\\\\n\\\\t\\\\t\\\\tin: text string rightX: characterPoint x\\\\n\\\\t\\\\t\\\\tstopConditions: stopConditions kern: kern.\\\\n\\\\t\\\\t\\\\\\\"see setStopConditions for stopping conditions for character block \\\\toperations.\\\\\\\"\\\\n\\\\t\\\\tself lastCharacterExtentSetX: (specialWidth\\\\n\\\\t\\\\t\\\\tifNil: [font widthOf: (text at: lastIndex)]\\\\n\\\\t\\\\t\\\\tifNotNil: [specialWidth]).\\\\n\\\\t\\\\t(self perform: stopCondition) ifTrue:\\\\n\\\\t\\\\t\\\\t[characterIndex\\\\n\\\\t\\\\t\\\\t\\\\tifNil: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Result for characterBlockAtPoint: \\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(stopCondition ~~ #cr and: [ lastIndex == line last\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tand: [ aPoint x > ((characterPoint x) + (lastCharacterExtent x / 2)) ]])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [ \\\\\\\"Correct for right half of last character in line\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^ (CharacterBlock new stringIndex: lastIndex + 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttext: text\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttopLeft: characterPoint + (lastCharacterExtent x @ 0) + (font descentKern @ 0)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\textent:  0 @ lastCharacterExtent y)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttextLine: line ].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^ (CharacterBlock new stringIndex: lastIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttext: text topLeft: characterPoint + (font descentKern @ 0)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\textent: lastCharacterExtent - (font baseKern @ 0))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttextLine: line]\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil: [\\\\\\\"Result for characterBlockForIndex: \\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^ (CharacterBlock new stringIndex: characterIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttext: text topLeft: characterPoint + ((font descentKern) - kern @ 0)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\textent: lastCharacterExtent)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttextLine: line]]]! !\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'scanning' stamp: 'yo 12/18/2002 13:56'!\\\\ncharacterBlockForIndex: targetIndex in: aParagraph \\\\n\\\\t\\\\\\\"Answer a CharacterBlock for character in aParagraph at targetIndex. The \\\\n\\\\tcoordinates in the CharacterBlock will be appropriate to the intersection \\\\n\\\\tof the destination form rectangle and the composition rectangle.\\\\\\\"\\\\n\\\\n\\\\tself \\\\n\\\\t\\\\tinitializeFromParagraph: aParagraph \\\\n\\\\t\\\\tclippedBy: aParagraph clippingRectangle.\\\\n\\\\tcharacterIndex _ targetIndex.\\\\n\\\\tcharacterPoint _ \\\\n\\\\t\\\\taParagraph rightMarginForDisplay @ \\\\n\\\\t\\\\t\\\\t(aParagraph topAtLineIndex: \\\\n\\\\t\\\\t\\\\t\\\\t(aParagraph lineIndexOfCharacterIndex: characterIndex)).\\\\n\\\\t^self buildCharacterBlockIn: aParagraph! !\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'scanning' stamp: 'yo 12/18/2002 13:56'!\\\\nindentationLevel: anInteger\\\\n\\\\tsuper indentationLevel: anInteger.\\\\n\\\\tnextLeftMargin _ leftMargin.\\\\n\\\\tindentationLevel timesRepeat: [\\\\n\\\\t\\\\tnextLeftMargin _ textStyle nextTabXFrom: nextLeftMargin\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tleftMargin: leftMargin\\\\n\\\\t\\\\t\\\\t\\\\t\\\\trightMargin: rightMargin]! !\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'scanning' stamp: 'yo 12/18/2002 13:56'!\\\\nplaceEmbeddedObject: anchoredMorph\\\\n\\\\t\\\\\\\"Workaround: The following should really use #textAnchorType\\\\\\\"\\\\n\\\\tanchoredMorph relativeTextAnchorPosition ifNotNil:[^true].\\\\n\\\\t(super placeEmbeddedObject: anchoredMorph) ifFalse: [^ false].\\\\n\\\\tspecialWidth _ anchoredMorph width.\\\\n\\\\t^ true! !\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'scanning' stamp: 'yo 8/6/2003 05:55'!\\\\nscanMultiCharactersCombiningFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: kernDelta\\\\n\\\\n\\\\t| encoding f nextDestX maxAscii startEncoding char charValue |\\\\n\\\\tlastIndex _ startIndex.\\\\n\\\\tlastIndex > stopIndex ifTrue: [lastIndex _ stopIndex. ^ stops at: EndOfRun].\\\\n\\\\tstartEncoding _ (sourceString at: startIndex) leadingChar.\\\\n\\\\tfont ifNil: [font _ (TextConstants at: #DefaultMultiStyle) fontArray at: 1].\\\\n\\\\t((font isMemberOf: StrikeFontSet) or: [font isKindOf: TTCFontSet]) ifTrue: [\\\\n\\\\t\\\\t[f _ font fontArray at: startEncoding + 1]\\\\n\\\\t\\\\t\\\\ton: Exception do: [:ex | f _ font fontArray at: 1].\\\\n\\\\t\\\\tf ifNil: [ f _ font fontArray at: 1].\\\\n\\\\t\\\\tmaxAscii _ f maxAscii.\\\\n\\\\t\\\\tspaceWidth _ f widthOf: Space.\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tmaxAscii _ font maxAscii.\\\\n\\\\t].\\\\n\\\\n\\\\t[lastIndex <= stopIndex] whileTrue: [\\\\n\\\\t\\\\tencoding _ (sourceString at: lastIndex) leadingChar.\\\\n\\\\t\\\\tencoding ~= startEncoding ifTrue: [lastIndex _ lastIndex - 1. ^ stops at: EndOfRun].\\\\n\\\\t\\\\tchar _ (sourceString at: lastIndex).\\\\n\\\\t\\\\tcharValue _ char charCode.\\\\n\\\\t\\\\tcharValue > maxAscii ifTrue: [charValue _ maxAscii].\\\\n\\\\t\\\\t(encoding = 0 and: [(stopConditions at: charValue + 1) ~~ nil]) ifTrue: [\\\\n\\\\t\\\\t\\\\t^ stops at: charValue + 1\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tnextDestX _ destX + (self widthOf: char inFont: font).\\\\n\\\\t\\\\tnextDestX > rightX ifTrue: [^ stops at: CrossedX].\\\\n\\\\t\\\\tdestX _ nextDestX + kernDelta.\\\\n\\\\t\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\t].\\\\n\\\\tlastIndex _ stopIndex.\\\\n\\\\t^ stops at: EndOfRun! !\\\\n\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'stop conditions' stamp: 'yo 1/6/2005 22:55'!\\\\ncr \\\\n\\\\t\\\\\\\"Answer a CharacterBlock that specifies the current location of the mouse \\\\n\\\\trelative to a carriage return stop condition that has just been \\\\n\\\\tencountered. The ParagraphEditor convention is to denote selections by \\\\n\\\\tCharacterBlocks, sometimes including the carriage return (cursor is at \\\\n\\\\tthe end) and sometimes not (cursor is in the middle of the text).\\\\\\\"\\\\n\\\\n\\\\t((characterIndex ~= nil\\\\n\\\\t\\\\tand: [characterIndex > text size])\\\\n\\\\t\\\\t\\\\tor: [(line last = text size)\\\\n\\\\t\\\\t\\\\t\\\\tand: [(destY + line lineHeight) < characterPoint y]])\\\\n\\\\t\\\\tifTrue:\\\\t[\\\\\\\"When off end of string, give data for next character\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tdestY _ destY +  line lineHeight.\\\\n\\\\t\\\\t\\\\t\\\\tbaselineY _ line lineHeight.\\\\n\\\\t\\\\t\\\\t\\\\tlastCharacter _ nil.\\\\n\\\\t\\\\t\\\\t\\\\tcharacterPoint _ (nextLeftMargin ifNil: [leftMargin]) @ destY.\\\\n\\\\t\\\\t\\\\t\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\t\\\\t\\\\t\\\\tself lastCharacterExtentSetX: 0.\\\\n\\\\t\\\\t\\\\t\\\\t^ true].\\\\n\\\\t\\\\tlastCharacter _ CR.\\\\n\\\\t\\\\tcharacterPoint _ destX @ destY.\\\\n\\\\t\\\\tself lastCharacterExtentSetX: rightMargin - destX.\\\\n\\\\t\\\\t^true! !\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:56'!\\\\ncrossedX\\\\n\\\\t\\\\\\\"Text display has wrapping. The scanner just found a character past the x \\\\n\\\\tlocation of the cursor. We know that the cursor is pointing at a character \\\\n\\\\tor before one.\\\\\\\"\\\\n\\\\n\\\\t| leadingTab currentX |\\\\n\\\\tcharacterIndex == nil ifFalse: [\\\\n\\\\t\\\\t\\\\\\\"If the last character of the last line is a space,\\\\n\\\\t\\\\tand it crosses the right margin, then locating\\\\n\\\\t\\\\tthe character block after it is impossible without this hack.\\\\\\\"\\\\n\\\\t\\\\tcharacterIndex > text size ifTrue: [\\\\n\\\\t\\\\t\\\\tlastIndex _ characterIndex.\\\\n\\\\t\\\\t\\\\tcharacterPoint _ (nextLeftMargin ifNil: [leftMargin]) @ (destY + line lineHeight).\\\\n\\\\t\\\\t\\\\t^true]].\\\\n\\\\tcharacterPoint x <= (destX + (lastCharacterExtent x // 2))\\\\n\\\\t\\\\tifTrue:\\\\t[lastCharacter _ (text at: lastIndex).\\\\n\\\\t\\\\t\\\\t\\\\tcharacterPoint _ destX @ destY.\\\\n\\\\t\\\\t\\\\t\\\\t^true].\\\\n\\\\tlastIndex >= line last \\\\n\\\\t\\\\tifTrue:\\\\t[lastCharacter _ (text at: line last).\\\\n\\\\t\\\\t\\\\t\\\\tcharacterPoint _ destX @ destY.\\\\n\\\\t\\\\t\\\\t\\\\t^true].\\\\n\\\\n\\\\t\\\\\\\"Pointing past middle of a character, return the next character.\\\\\\\"\\\\n\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\tlastCharacter _ text at: lastIndex.\\\\n\\\\tcurrentX _ destX + lastCharacterExtent x + kern.\\\\n\\\\tself lastCharacterExtentSetX: (font widthOf: lastCharacter).\\\\n\\\\tcharacterPoint _ currentX @ destY.\\\\n\\\\tlastCharacter = Space ifFalse: [^ true].\\\\n\\\\n\\\\t\\\\\\\"Yukky if next character is space or tab.\\\\\\\"\\\\n\\\\talignment = Justified ifTrue:\\\\n\\\\t\\\\t[self lastCharacterExtentSetX:\\\\n\\\\t\\\\t\\\\t(lastCharacterExtent x + \\\\t(line justifiedPadFor: (spaceCount + 1))).\\\\n\\\\t\\\\t^ true].\\\\n\\\\n\\\\ttrue ifTrue: [^ true].\\\\n\\\\t\\\\\\\"NOTE:  I find no value to the following code, and so have defeated it - DI\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"See tabForDisplay for illumination on the following awfulness.\\\\\\\"\\\\n\\\\tleadingTab _ true.\\\\n\\\\tline first to: lastIndex - 1 do:\\\\n\\\\t\\\\t[:index | (text at: index) ~= Tab ifTrue: [leadingTab _ false]].\\\\n\\\\t(alignment ~= Justified or: [leadingTab])\\\\n\\\\t\\\\tifTrue:\\\\t[self lastCharacterExtentSetX: (textStyle nextTabXFrom: currentX\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tleftMargin: leftMargin rightMargin: rightMargin) -\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcurrentX]\\\\n\\\\t\\\\tifFalse:\\\\t[self lastCharacterExtentSetX:  (((currentX + (textStyle tabWidth -\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(line justifiedTabDeltaFor: spaceCount))) -\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcurrentX) max: 0)].\\\\n\\\\t^ true! !\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:56'!\\\\nendOfRun\\\\n\\\\t\\\\\\\"Before arriving at the cursor location, the selection has encountered an \\\\n\\\\tend of run. Answer false if the selection continues, true otherwise. Set \\\\n\\\\tup indexes for building the appropriate CharacterBlock.\\\\\\\"\\\\n\\\\n\\\\t| runLength lineStop |\\\\n\\\\t(((characterIndex ~~ nil and:\\\\n\\\\t\\\\t[runStopIndex < characterIndex and: [runStopIndex < text size]])\\\\n\\\\t\\\\t\\\\tor:\\\\t[characterIndex == nil and: [lastIndex < line last]]) or: [\\\\n\\\\t\\\\t\\\\t\\\\t((lastIndex < line last)\\\\n\\\\t\\\\t\\\\t\\\\tand: [((text at: lastIndex) leadingChar ~= (text at: lastIndex+1) leadingChar)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [lastIndex ~= characterIndex]])])\\\\n\\\\t\\\\tifTrue:\\\\t[\\\\\\\"We're really at the end of a real run.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\trunLength _ (text runLengthFor: (lastIndex _ lastIndex + 1)).\\\\n\\\\t\\\\t\\\\t\\\\tcharacterIndex ~~ nil\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue:\\\\t[lineStop _ characterIndex\\\\t\\\\\\\"scanning for index\\\\\\\"]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse:\\\\t[lineStop _ line last\\\\t\\\\t\\\\t\\\\\\\"scanning for point\\\\\\\"].\\\\n\\\\t\\\\t\\\\t\\\\t(runStopIndex _ lastIndex + (runLength - 1)) > lineStop\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\t[runStopIndex _ lineStop].\\\\n\\\\t\\\\t\\\\t\\\\tself setStopConditions.\\\\n\\\\t\\\\t\\\\t\\\\t^false].\\\\n\\\\n\\\\tlastCharacter _ text at: lastIndex.\\\\n\\\\tcharacterPoint _ destX @ destY.\\\\n\\\\t((lastCharacter = Space and: [alignment = Justified])\\\\n\\\\t\\\\tor: [lastCharacter = Tab and: [lastSpaceOrTabExtent notNil]])\\\\n\\\\t\\\\tifTrue: [lastCharacterExtent _ lastSpaceOrTabExtent].\\\\n\\\\tcharacterIndex ~~ nil\\\\n\\\\t\\\\tifTrue:\\\\t[\\\\\\\"If scanning for an index and we've stopped on that index,\\\\n\\\\t\\\\t\\\\t\\\\tthen we back destX off by the width of the character stopped on\\\\n\\\\t\\\\t\\\\t\\\\t(it will be pointing at the right side of the character) and return\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\trunStopIndex = characterIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue:\\\\t[self characterPointSetX: destX - lastCharacterExtent x.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^true].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"Otherwise the requested index was greater than the length of the\\\\n\\\\t\\\\t\\\\t\\\\tstring.  Return string size + 1 as index, indicate further that off the\\\\n\\\\t\\\\t\\\\t\\\\tstring by setting character to nil and the extent to 0.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tlastIndex _  lastIndex + 1.\\\\n\\\\t\\\\t\\\\t\\\\tlastCharacter _ nil.\\\\n\\\\t\\\\t\\\\t\\\\tself lastCharacterExtentSetX: 0.\\\\n\\\\t\\\\t\\\\t\\\\t^true].\\\\n\\\\n\\\\t\\\\\\\"Scanning for a point and either off the end of the line or off the end of the string.\\\\\\\"\\\\n\\\\trunStopIndex = text size\\\\n\\\\t\\\\tifTrue:\\\\t[\\\\\\\"off end of string\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tlastIndex _  lastIndex + 1.\\\\n\\\\t\\\\t\\\\t\\\\tlastCharacter _ nil.\\\\n\\\\t\\\\t\\\\t\\\\tself lastCharacterExtentSetX: 0.\\\\n\\\\t\\\\t\\\\t\\\\t^true].\\\\n\\\\t\\\\\\\"just off end of line without crossing x\\\\\\\"\\\\n\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\t^true! !\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:56'!\\\\npaddedSpace\\\\n\\\\t\\\\\\\"When the line is justified, the spaces will not be the same as the font's \\\\n\\\\tspace character. A padding of extra space must be considered in trying \\\\n\\\\tto find which character the cursor is pointing at. Answer whether the \\\\n\\\\tscanning has crossed the cursor.\\\\\\\"\\\\n\\\\n\\\\t| pad |\\\\n\\\\tpad _ 0.\\\\n\\\\tspaceCount _ spaceCount + 1.\\\\n\\\\tpad _ line justifiedPadFor: spaceCount.\\\\n\\\\tlastSpaceOrTabExtent _ lastCharacterExtent copy.\\\\n\\\\tself lastSpaceOrTabExtentSetX:  spaceWidth + pad.\\\\n\\\\t(destX + lastSpaceOrTabExtent x)  >= characterPoint x\\\\n\\\\t\\\\tifTrue: [lastCharacterExtent _ lastSpaceOrTabExtent copy.\\\\n\\\\t\\\\t\\\\t\\\\t^self crossedX].\\\\n\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\tdestX _ destX + lastSpaceOrTabExtent x.\\\\n\\\\t^ false\\\\n! !\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:56'!\\\\nsetFont\\\\n\\\\tspecialWidth _ nil.\\\\n\\\\tsuper setFont! !\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'stop conditions' stamp: 'ar 10/18/2004 14:31'!\\\\nsetStopConditions\\\\n\\\\t\\\\\\\"Set the font and the stop conditions for the current run.\\\\\\\"\\\\n\\\\t\\\\n\\\\tself setFont.\\\\n\\\\tself setConditionArray: (alignment = Justified ifTrue: [#paddedSpace]).\\\\n! !\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:56'!\\\\ntab\\\\n\\\\t| currentX |\\\\n\\\\tcurrentX _ (alignment == Justified and: [self leadingTab not])\\\\n\\\\t\\\\tifTrue:\\\\t\\\\t\\\\\\\"imbedded tabs in justified text are weird\\\\\\\"\\\\n\\\\t\\\\t\\\\t[destX + (textStyle tabWidth - (line justifiedTabDeltaFor: spaceCount)) max: destX]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[textStyle\\\\n\\\\t\\\\t\\\\t\\\\tnextTabXFrom: destX\\\\n\\\\t\\\\t\\\\t\\\\tleftMargin: leftMargin\\\\n\\\\t\\\\t\\\\t\\\\trightMargin: rightMargin].\\\\n\\\\tlastSpaceOrTabExtent _ lastCharacterExtent copy.\\\\n\\\\tself lastSpaceOrTabExtentSetX: (currentX - destX max: 0).\\\\n\\\\tcurrentX >= characterPoint x\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[lastCharacterExtent _ lastSpaceOrTabExtent copy.\\\\n\\\\t\\\\t\\\\t^ self crossedX].\\\\n\\\\tdestX _ currentX.\\\\n\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\t^false! !\\\\n\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:56'!\\\\nbuildCharacterBlockIn: para\\\\n\\\\t| lineIndex runLength lineStop done stopCondition |\\\\n\\\\t\\\\\\\"handle nullText\\\\\\\"\\\\n\\\\t(para numberOfLines = 0 or: [text size = 0])\\\\n\\\\t\\\\tifTrue:\\\\t[^ CharacterBlock new stringIndex: 1  \\\\\\\"like being off end of string\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttext: para text\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttopLeft: (para leftMarginForDisplayForLine: 1 alignment: (alignment ifNil:[textStyle alignment]))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t@ para compositionRectangle top\\\\n\\\\t\\\\t\\\\t\\\\t\\\\textent: 0 @ textStyle lineGrid].\\\\n\\\\t\\\\\\\"find the line\\\\\\\"\\\\n\\\\tlineIndex _ para lineIndexOfTop: characterPoint y.\\\\n\\\\tdestY _ para topAtLineIndex: lineIndex.\\\\n\\\\tline _ para lines at: lineIndex.\\\\n\\\\trightMargin _ para rightMarginForDisplay.\\\\n\\\\n\\\\t(lineIndex = para numberOfLines and:\\\\n\\\\t\\\\t[(destY + line lineHeight) < characterPoint y])\\\\n\\\\t\\\\t\\\\tifTrue:\\\\t[\\\\\\\"if beyond lastLine, force search to last character\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself characterPointSetX: rightMargin]\\\\n\\\\t\\\\t\\\\tifFalse:\\\\t[characterPoint y < (para compositionRectangle) top\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"force search to first line\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcharacterPoint _ (para compositionRectangle) topLeft].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcharacterPoint x > rightMargin\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue:\\\\t[self characterPointSetX: rightMargin]].\\\\n\\\\tdestX _ (leftMargin _ para leftMarginForDisplayForLine: lineIndex alignment: (alignment ifNil:[textStyle alignment])).\\\\n\\\\tnextLeftMargin_ para leftMarginForDisplayForLine: lineIndex+1 alignment: (alignment ifNil:[textStyle alignment]).\\\\n\\\\tlastIndex _ line first.\\\\n\\\\n\\\\tself setStopConditions.\\\\t\\\\t\\\\\\\"also sets font\\\\\\\"\\\\n\\\\trunLength _ (text runLengthFor: line first).\\\\n\\\\tcharacterIndex == nil\\\\n\\\\t\\\\tifTrue:\\\\t[lineStop _ line last  \\\\\\\"characterBlockAtPoint\\\\\\\"]\\\\n\\\\t\\\\tifFalse:\\\\t[lineStop _ characterIndex  \\\\\\\"characterBlockForIndex\\\\\\\"].\\\\n\\\\t(runStopIndex _ lastIndex + (runLength - 1)) > lineStop\\\\n\\\\t\\\\tifTrue:\\\\t[runStopIndex _ lineStop].\\\\n\\\\tlastCharacterExtent _ 0 @ line lineHeight.\\\\n\\\\tspaceCount _ 0. done  _ false.\\\\n\\\\tself handleIndentation.\\\\n\\\\n\\\\t[done]\\\\n\\\\twhileFalse:\\\\n\\\\t[stopCondition _ self scanCharactersFrom: lastIndex to: runStopIndex\\\\n\\\\t\\\\t\\\\tin: text string rightX: characterPoint x\\\\n\\\\t\\\\t\\\\tstopConditions: stopConditions kern: kern.\\\\n\\\\n\\\\t\\\\\\\"see setStopConditions for stopping conditions for character block \\\\toperations.\\\\\\\"\\\\n\\\\tself lastCharacterExtentSetX: (font widthOf: (text at: lastIndex)).\\\\n\\\\t(self perform: stopCondition) ifTrue:\\\\n\\\\t\\\\t[characterIndex == nil\\\\n\\\\t\\\\t\\\\tifTrue: [\\\\\\\"characterBlockAtPoint\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ CharacterBlock new stringIndex: lastIndex text: text\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttopLeft: characterPoint + (font descentKern @ 0)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\textent: lastCharacterExtent]\\\\n\\\\t\\\\t\\\\tifFalse: [\\\\\\\"characterBlockForIndex\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ CharacterBlock new stringIndex: lastIndex text: text\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttopLeft: characterPoint + ((font descentKern) - kern @ 0)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\textent: lastCharacterExtent]]]! !\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:56'!\\\\ncharacterPointSetX: xVal\\\\n\\\\tcharacterPoint _ xVal @ characterPoint y! !\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:56'!\\\\nlastCharacterExtentSetX: xVal\\\\n\\\\tlastCharacterExtent _ xVal @ lastCharacterExtent y! !\\\\n\\\\n!MultiCharacterBlockScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:56'!\\\\nlastSpaceOrTabExtentSetX: xVal\\\\n\\\\tlastSpaceOrTabExtent _ xVal @ lastSpaceOrTabExtent y! !\\\\nObject subclass: #MultiCharacterScanner\\\\n\\\\tinstanceVariableNames: 'destX lastIndex xTable destY stopConditions text textStyle alignment leftMargin rightMargin font line runStopIndex spaceCount spaceWidth emphasisCode kern indentationLevel wantsColumnBreaks presentation presentationLine numOfComposition baselineY firstDestX'\\\\n\\\\tclassVariableNames: 'DefaultStopConditions NilCondition PaddedSpaceCondition SpaceCondition'\\\\n\\\\tpoolDictionaries: 'TextConstants'\\\\n\\\\tcategory: 'Multilingual-Scanning'!\\\\n\\\\n!MultiCharacterScanner methodsFor: 'initialize' stamp: 'yo 12/18/2002 13:53'!\\\\ninitialize\\\\n\\\\tdestX _ destY _ leftMargin _ 0.! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'initialize' stamp: 'yo 12/18/2002 13:53'!\\\\ninitializeStringMeasurer\\\\n\\\\tstopConditions _ Array new: 258.\\\\n\\\\tstopConditions at: CrossedX put: #crossedX.\\\\n\\\\tstopConditions at: EndOfRun put: #endOfRun.\\\\n! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'initialize' stamp: 'yo 12/18/2002 13:53'!\\\\nwantsColumnBreaks: aBoolean\\\\n\\\\n\\\\twantsColumnBreaks _ aBoolean! !\\\\n\\\\n\\\\n!MultiCharacterScanner methodsFor: 'multilingual scanning' stamp: 'yo 1/3/2003 12:09'!\\\\naddCharToPresentation: char\\\\n\\\\n! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'multilingual scanning' stamp: 'yo 12/20/2002 16:15'!\\\\nregisterBreakableIndex\\\\n\\\\n\\\\t\\\\\\\"Record left x and character index of the line-wrappable point. \\\\n\\\\tThe default implementation here does nothing.\\\\\\\"\\\\n\\\\n\\\\t^ false.\\\\n! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'multilingual scanning' stamp: 'yo 1/23/2003 14:25'!\\\\nremoveLastCharFromPresentation\\\\n! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'multilingual scanning' stamp: 'yo 1/1/2003 10:43'!\\\\nwidthOf: char inFont: aFont\\\\n\\\\n\\\\t(char isMemberOf: CombinedChar) ifTrue: [\\\\n\\\\t\\\\t^ aFont widthOf: char base.\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\t^ aFont widthOf: char.\\\\n\\\\t].\\\\n\\\\n\\\\n! !\\\\n\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanner methods' stamp: 'yo 12/18/2002 13:53'!\\\\nbasicScanCharactersFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: kernDelta\\\\n\\\\t\\\\\\\"Primitive. This is the inner loop of text display--but see \\\\n\\\\tscanCharactersFrom: to:rightX: which would get the string, \\\\n\\\\tstopConditions and displaying from the instance. March through source \\\\n\\\\tString from startIndex to stopIndex. If any character is flagged with a \\\\n\\\\tnon-nil entry in stops, then return the corresponding value. Determine \\\\n\\\\twidth of each character from xTable, indexed by map. \\\\n\\\\tIf dextX would exceed rightX, then return stops at: 258. \\\\n\\\\tAdvance destX by the width of the character. If stopIndex has been\\\\n\\\\treached, then return stops at: 257. Optional. \\\\n\\\\tSee Object documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\t| ascii nextDestX char |\\\\n\\\\t<primitive: 103>\\\\n\\\\tlastIndex _ startIndex.\\\\n\\\\t[lastIndex <= stopIndex]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[char _ (sourceString at: lastIndex).\\\\n\\\\t\\\\t\\\\tascii _ char asciiValue + 1.\\\\n\\\\t\\\\t\\\\t(stops at: ascii) == nil ifFalse: [^stops at: ascii].\\\\n\\\\t\\\\t\\\\t\\\\\\\"Note: The following is querying the font about the width\\\\n\\\\t\\\\t\\\\tsince the primitive may have failed due to a non-trivial\\\\n\\\\t\\\\t\\\\tmapping of characters to glyphs or a non-existing xTable.\\\\\\\"\\\\n\\\\t\\\\t\\\\tnextDestX _ destX + (font widthOf: char).\\\\n\\\\t\\\\t\\\\tnextDestX > rightX ifTrue: [^stops at: CrossedX].\\\\n\\\\t\\\\t\\\\tdestX _ nextDestX + kernDelta.\\\\n\\\\t\\\\t\\\\tlastIndex _ lastIndex + 1].\\\\n\\\\tlastIndex _ stopIndex.\\\\n\\\\t^stops at: EndOfRun! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanner methods' stamp: 'yo 12/30/2002 22:59'!\\\\ncombinableChar: char for: prevEntity\\\\n\\\\n! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanner methods' stamp: 'yo 12/20/2002 11:46'!\\\\nisBreakableAt: index in: sourceString in: encodingClass\\\\n\\\\n\\\\t^ encodingClass isBreakableAt: index in: sourceString.\\\\n! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanner methods' stamp: 'yo 3/16/2005 19:03'!\\\\nscanJapaneseCharactersFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: kernDelta\\\\n\\\\n\\\\t| ascii encoding f nextDestX maxAscii startEncoding |\\\\n\\\\tlastIndex _ startIndex.\\\\n\\\\tlastIndex > stopIndex ifTrue: [lastIndex _ stopIndex. ^ stops at: EndOfRun].\\\\n\\\\tstartEncoding _ (sourceString at: startIndex) leadingChar.\\\\n\\\\tfont ifNil: [font _ (TextConstants at: #DefaultMultiStyle) fontArray at: 1].\\\\n\\\\t((font isMemberOf: StrikeFontSet) or: [font isKindOf: TTCFontSet]) ifTrue: [\\\\n\\\\t\\\\t[f _ font fontArray at: startEncoding + 1]\\\\n\\\\t\\\\t\\\\ton: Exception do: [:ex | f _ font fontArray at: 1].\\\\n\\\\t\\\\tf ifNil: [ f _ font fontArray at: 1].\\\\n\\\\t\\\\tmaxAscii _ f maxAscii.\\\\n\\\\t\\\\t\\\\\\\"xTable _ f xTable.\\\\n\\\\t\\\\tmaxAscii _ xTable size - 2.\\\\\\\"\\\\n\\\\t\\\\tspaceWidth _ f widthOf: Space.\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\t(font isMemberOf: HostFont) ifTrue: [\\\\n\\\\t\\\\t\\\\tf _ font.\\\\n\\\\t\\\\t\\\\tmaxAscii _ f maxAscii.\\\\n\\\\t\\\\t\\\\tspaceWidth _ f widthOf: Space.\\\\n\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\tmaxAscii _ font maxAscii.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\t[lastIndex <= stopIndex] whileTrue: [\\\\n\\\\t\\\\t\\\\\\\"self halt.\\\\\\\"\\\\n\\\\t\\\\tencoding _ (sourceString at: lastIndex) leadingChar.\\\\n\\\\t\\\\tencoding ~= startEncoding ifTrue: [lastIndex _ lastIndex - 1. ^ stops at: EndOfRun].\\\\n\\\\t\\\\tascii _ (sourceString at: lastIndex) charCode.\\\\n\\\\t\\\\tascii > maxAscii ifTrue: [ascii _ maxAscii].\\\\n\\\\t\\\\t(encoding = 0 and: [(stopConditions at: ascii + 1) ~~ nil]) ifTrue: [^ stops at: ascii + 1].\\\\n\\\\t\\\\t(self isBreakableAt: lastIndex in: sourceString in: (EncodedCharSet charsetAt: encoding)) ifTrue: [\\\\n\\\\t\\\\t\\\\tself registerBreakableIndex.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tnextDestX _ destX + (font widthOf: (sourceString at: lastIndex)).\\\\n\\\\t\\\\tnextDestX > rightX ifTrue: [firstDestX ~= destX ifTrue: [^ stops at: CrossedX]].\\\\n\\\\t\\\\tdestX _ nextDestX + kernDelta.\\\\n\\\\t\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\t].\\\\n\\\\tlastIndex _ stopIndex.\\\\n\\\\t^ stops at: EndOfRun! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanner methods' stamp: 'yo 3/16/2005 19:09'!\\\\nscanMultiCharactersCombiningFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: kernDelta\\\\n\\\\n\\\\t| charCode encoding f maxAscii startEncoding combining combined combiningIndex c |\\\\n\\\\tlastIndex _ startIndex.\\\\n\\\\tlastIndex > stopIndex ifTrue: [lastIndex _ stopIndex. ^ stops at: EndOfRun].\\\\n\\\\tstartEncoding _ (sourceString at: startIndex) leadingChar.\\\\n\\\\tfont ifNil: [font _ (TextConstants at: #DefaultMultiStyle) fontArray at: 1].\\\\n\\\\t((font isMemberOf: StrikeFontSet) or: [font isKindOf: TTCFontSet]) ifTrue: [\\\\n\\\\t\\\\t[f _ font fontArray at: startEncoding + 1]\\\\n\\\\t\\\\t\\\\ton: Exception do: [:ex | f _ font fontArray at: 1].\\\\n\\\\t\\\\tf ifNil: [ f _ font fontArray at: 1].\\\\n\\\\t\\\\tmaxAscii _ f maxAscii.\\\\n\\\\t\\\\tspaceWidth _ font widthOf: Space.\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tmaxAscii _ font maxAscii.\\\\n\\\\t\\\\tspaceWidth _ font widthOf: Space.\\\\n\\\\t].\\\\n\\\\n\\\\tcombining _ nil.\\\\n\\\\t[lastIndex <= stopIndex] whileTrue: [\\\\n\\\\t\\\\tcharCode _ (sourceString at: lastIndex) charCode.\\\\n\\\\t\\\\tc _ (sourceString at: lastIndex).\\\\n\\\\t\\\\tcombining ifNil: [\\\\n\\\\t\\\\t\\\\tcombining _ CombinedChar new.\\\\n\\\\t\\\\t\\\\tcombining add: c.\\\\n\\\\t\\\\t\\\\tcombiningIndex _ lastIndex.\\\\n\\\\t\\\\t\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\t\\\\t] ifNotNil: [\\\\n\\\\t\\\\t\\\\t(combining add: c) ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tself addCharToPresentation: (combined _ combining combined).\\\\n\\\\t\\\\t\\\\t\\\\tcombining _ CombinedChar new.\\\\n\\\\t\\\\t\\\\t\\\\tcombining add: c.\\\\n\\\\t\\\\t\\\\t\\\\tcharCode _ combined charCode.\\\\n\\\\t\\\\t\\\\t\\\\tencoding _ combined leadingChar.\\\\n\\\\t\\\\t\\\\t\\\\tencoding ~= startEncoding ifTrue: [lastIndex _ lastIndex - 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(encoding = 0 and: [(stopConditions at: charCode + 1) ~~ nil]) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^ stops at: charCode + 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t ^ stops at: EndOfRun\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\t\\\\tcharCode > maxAscii ifTrue: [charCode _ maxAscii].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t(encoding = 0 and: [(stopConditions at: charCode + 1) ~~ nil]) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcombining ifNotNil: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself addCharToPresentation: (combining combined).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ stops at: charCode + 1\\\\n\\\\t\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\t\\\\t(self isBreakableAt: lastIndex in: sourceString in: Latin1Environment) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself registerBreakableIndex.\\\\n\\\\t\\\\t\\\\t\\\\t].\\\\t\\\\t\\\\n\\\\t\\\\t\\\\t\\\\tdestX > rightX ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdestX ~= firstDestX ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tlastIndex _ combiningIndex.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself removeLastCharFromPresentation.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^ stops at: CrossedX]].\\\\n\\\\t\\\\t\\\\t\\\\tcombiningIndex _ lastIndex.\\\\n\\\\t\\\\t\\\\t\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\t\\\\t\\\\t] ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\t\\\\t\\\\t\\\\tnumOfComposition _ numOfComposition + 1.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\tlastIndex _ stopIndex.\\\\n\\\\tcombining ifNotNil: [\\\\n\\\\t\\\\tcombined _ combining combined.\\\\n\\\\t\\\\tself addCharToPresentation: combined.\\\\n\\\\t\\\\t\\\\\\\"assuming that there is always enough space for at least one character\\\\\\\".\\\\n\\\\t\\\\tdestX _ destX + (self widthOf: combined inFont: font).\\\\n\\\\t].\\\\n\\\\t^ stops at: EndOfRun! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanner methods' stamp: 'yo 3/16/2005 19:08'!\\\\nscanMultiCharactersFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: kernDelta\\\\n\\\\n\\\\t| ascii encoding f nextDestX maxAscii startEncoding |\\\\n\\\\tlastIndex _ startIndex.\\\\n\\\\tlastIndex > stopIndex ifTrue: [lastIndex _ stopIndex. ^ stops at: EndOfRun].\\\\n\\\\tstartEncoding _ (sourceString at: startIndex) leadingChar.\\\\n\\\\tfont ifNil: [font _ (TextConstants at: #DefaultMultiStyle) fontArray at: 1].\\\\n\\\\t((font isMemberOf: StrikeFontSet) or: [font isKindOf: TTCFontSet]) ifTrue: [\\\\n\\\\t\\\\t[f _ font fontArray at: startEncoding + 1]\\\\n\\\\t\\\\t\\\\ton: Exception do: [:ex | f _ font fontArray at: 1].\\\\n\\\\t\\\\tf ifNil: [ f _ font fontArray at: 1].\\\\n\\\\t\\\\tmaxAscii _ f maxAscii.\\\\n\\\\t\\\\tspaceWidth _ f widthOf: Space.\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tmaxAscii _ font maxAscii.\\\\n\\\\t].\\\\n\\\\n\\\\t[lastIndex <= stopIndex] whileTrue: [\\\\n\\\\t\\\\tencoding _ (sourceString at: lastIndex) leadingChar.\\\\n\\\\t\\\\tencoding ~= startEncoding ifTrue: [lastIndex _ lastIndex - 1. ^ stops at: EndOfRun].\\\\n\\\\t\\\\tascii _ (sourceString at: lastIndex) charCode.\\\\n\\\\t\\\\tascii > maxAscii ifTrue: [ascii _ maxAscii].\\\\n\\\\t\\\\t(encoding = 0 and: [ascii < stopConditions size and: [(stopConditions at: ascii + 1) ~~ nil]]) ifTrue: [^ stops at: ascii + 1].\\\\n\\\\t\\\\t(self isBreakableAt: lastIndex in: sourceString in: Latin1Environment) ifTrue: [\\\\n\\\\t\\\\t\\\\tself registerBreakableIndex.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tnextDestX _ destX + (font widthOf: (sourceString at: lastIndex)).\\\\n\\\\t\\\\tnextDestX > rightX ifTrue: [destX ~= firstDestX ifTrue: [^ stops at: CrossedX]].\\\\n\\\\t\\\\tdestX _ nextDestX + kernDelta.\\\\n\\\\t\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\t].\\\\n\\\\tlastIndex _ stopIndex.\\\\n\\\\t^ stops at: EndOfRun! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanner methods' stamp: 'yo 3/16/2005 19:08'!\\\\nscanMultiCharactersR2LFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: kernDelta\\\\n\\\\n\\\\t\\\\\\\"Note that 'rightX' really means 'endX' in R2L context.  Ie.  rightX is usually smaller than destX.\\\\\\\"\\\\n\\\\t| ascii encoding f nextDestX maxAscii startEncoding |\\\\n\\\\tlastIndex _ startIndex.\\\\n\\\\tlastIndex > stopIndex ifTrue: [lastIndex _ stopIndex. ^ stops at: EndOfRun].\\\\n\\\\tstartEncoding _ (sourceString at: startIndex) leadingChar.\\\\n\\\\tfont ifNil: [font _ (TextConstants at: #DefaultMultiStyle) fontArray at: 1].\\\\n\\\\t((font isMemberOf: StrikeFontSet) or: [font isKindOf: TTCFontSet]) ifTrue: [\\\\n\\\\t\\\\t[f _ font fontArray at: startEncoding + 1]\\\\n\\\\t\\\\t\\\\ton: Exception do: [:ex | f _ font fontArray at: 1].\\\\n\\\\t\\\\tf ifNil: [ f _ font fontArray at: 1].\\\\n\\\\t\\\\tmaxAscii _ f maxAscii.\\\\n\\\\t\\\\tspaceWidth _ f widthOf: Space.\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tmaxAscii _ font maxAscii.\\\\n\\\\t].\\\\n\\\\n\\\\t[lastIndex <= stopIndex] whileTrue: [\\\\n\\\\t\\\\tencoding _ (sourceString at: lastIndex) leadingChar.\\\\n\\\\t\\\\tencoding ~= startEncoding ifTrue: [lastIndex _ lastIndex - 1. ^ stops at: EndOfRun].\\\\n\\\\t\\\\tascii _ (sourceString at: lastIndex) charCode.\\\\n\\\\t\\\\tascii > maxAscii ifTrue: [ascii _ maxAscii].\\\\n\\\\t\\\\t(encoding = 0 and: [(stopConditions at: ascii + 1) ~~ nil]) ifTrue: [^ stops at: ascii + 1].\\\\n\\\\t\\\\t(self isBreakableAt: lastIndex in: sourceString in: Latin1Environment) ifTrue: [\\\\n\\\\t\\\\t\\\\tself registerBreakableIndex.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tnextDestX _ destX - (font widthOf: (sourceString at: lastIndex)).\\\\n\\\\t\\\\tnextDestX < rightX ifTrue: [^ stops at: CrossedX].\\\\n\\\\t\\\\tdestX _ nextDestX - kernDelta.\\\\n\\\\t\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\t].\\\\n\\\\tlastIndex _ stopIndex.\\\\n\\\\t^ stops at: EndOfRun! !\\\\n\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanning' stamp: 'yo 12/18/2002 13:53'!\\\\ncolumnBreak\\\\n\\\\n\\\\t^true! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanning' stamp: 'yo 12/18/2002 13:53'!\\\\nembeddedObject\\\\n\\\\t| savedIndex |\\\\n\\\\tsavedIndex _ lastIndex.\\\\n\\\\ttext attributesAt: lastIndex do:[:attr| \\\\n\\\\t\\\\tattr anchoredMorph ifNotNil:[\\\\n\\\\t\\\\t\\\\t\\\\\\\"Following may look strange but logic gets reversed.\\\\n\\\\t\\\\t\\\\tIf the morph fits on this line we're not done (return false for true) \\\\n\\\\t\\\\t\\\\tand if the morph won't fit we're done (return true for false)\\\\\\\"\\\\n\\\\t\\\\t\\\\t(self placeEmbeddedObject: attr anchoredMorph) ifFalse:[^true]]].\\\\n\\\\tlastIndex _ savedIndex + 1. \\\\\\\"for multiple(!!) embedded morphs\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanning' stamp: 'yo 12/18/2002 13:53'!\\\\nhandleIndentation\\\\n\\\\tself indentationLevel timesRepeat: [\\\\n\\\\t\\\\tself plainTab]! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanning' stamp: 'yo 12/18/2002 13:53'!\\\\nindentationLevel\\\\n\\\\t\\\\\\\"return the number of tabs that are currently being placed at the beginning of each line\\\\\\\"\\\\n\\\\t^indentationLevel ifNil:[0]! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanning' stamp: 'yo 12/18/2002 13:53'!\\\\nindentationLevel: anInteger\\\\n\\\\t\\\\\\\"set the number of tabs to put at the beginning of each line\\\\\\\"\\\\n\\\\tindentationLevel _ anInteger! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanning' stamp: 'yo 12/18/2002 13:53'!\\\\nleadingTab\\\\n\\\\t\\\\\\\"return true if only tabs lie to the left\\\\\\\"\\\\n\\\\tline first to: lastIndex do:\\\\n\\\\t\\\\t[:i | (text at: i) == Tab ifFalse: [^ false]].\\\\n\\\\t^ true! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanning' stamp: 'yo 1/18/2005 08:08'!\\\\nmeasureString: aString inFont: aFont from: startIndex to: stopIndex\\\\n\\\\t\\\\\\\"WARNING: In order to use this method the receiver has to be set up using #initializeStringMeasurer\\\\\\\"\\\\n\\\\tdestX _ destY _ lastIndex _ 0.\\\\n\\\\tbaselineY _ aFont ascent.\\\\n\\\\txTable _ aFont xTable.\\\\n\\\\tfont := aFont.  \\\\\\\" added Dec 03, 2004 \\\\\\\"\\\\n\\\\\\\"\\\\tmap _ aFont characterToGlyphMap.\\\\\\\"\\\\n\\\\tself scanCharactersFrom: startIndex to: stopIndex in: aString rightX: 999999 stopConditions: stopConditions kern: 0.\\\\n\\\\t^destX! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanning' stamp: 'yo 12/18/2002 13:53'!\\\\nplaceEmbeddedObject: anchoredMorph\\\\n\\\\t\\\\\\\"Place the anchoredMorph or return false if it cannot be placed.\\\\n\\\\tIn any event, advance destX by its width.\\\\\\\"\\\\n\\\\t| w |\\\\n\\\\t\\\\\\\"Workaround: The following should really use #textAnchorType\\\\\\\"\\\\n\\\\tanchoredMorph relativeTextAnchorPosition ifNotNil:[^true].\\\\n\\\\tdestX _ destX + (w _ anchoredMorph width).\\\\n\\\\t(destX > rightMargin and: [(leftMargin + w) <= rightMargin])\\\\n\\\\t\\\\tifTrue: [\\\\\\\"Won't fit, but would on next line\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t^ false].\\\\n\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\tself setFont.  \\\\\\\"Force recalculation of emphasis for next run\\\\\\\"\\\\n\\\\t^ true! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanning' stamp: 'yo 12/18/2002 13:53'!\\\\nplainTab\\\\n\\\\t\\\\\\\"This is the basic method of adjusting destX for a tab.\\\\\\\"\\\\n\\\\tdestX _ (alignment == Justified and: [self leadingTab not])\\\\n\\\\t\\\\tifTrue:\\\\t\\\\t\\\\\\\"embedded tabs in justified text are weird\\\\\\\"\\\\n\\\\t\\\\t\\\\t[destX + (textStyle tabWidth - (line justifiedTabDeltaFor: spaceCount)) max: destX]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[textStyle nextTabXFrom: destX\\\\n\\\\t\\\\t\\\\t\\\\tleftMargin: leftMargin\\\\n\\\\t\\\\t\\\\t\\\\trightMargin: rightMargin]! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'scanning' stamp: 'ar 4/12/2005 19:53'!\\\\nscanCharactersFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: kernDelta\\\\n\\\\n\\\\t| startEncoding selector |\\\\n\\\\t(sourceString isByteString) ifTrue: [^ self basicScanCharactersFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: kernDelta.].\\\\n\\\\n\\\\t(sourceString isWideString) ifTrue: [\\\\n\\\\t\\\\tstartIndex > stopIndex ifTrue: [lastIndex _ stopIndex. ^ stops at: EndOfRun].\\\\n\\\\t\\\\tstartEncoding _  (sourceString at: startIndex) leadingChar.\\\\n\\\\t\\\\tselector _ (EncodedCharSet charsetAt: startEncoding) scanSelector.\\\\n\\\\t\\\\t^ self perform: selector withArguments: (Array with: startIndex with: stopIndex with: sourceString with: rightX with: stopConditions with: kernDelta).\\\\n\\\\t].\\\\n\\\\t\\\\n\\\\t^ stops at: EndOfRun\\\\n! !\\\\n\\\\n\\\\n!MultiCharacterScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:53'!\\\\naddEmphasis: code\\\\n\\\\t\\\\\\\"Set the bold-ital-under-strike emphasis.\\\\\\\"\\\\n\\\\temphasisCode _ emphasisCode bitOr: code! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:53'!\\\\naddKern: kernDelta\\\\n\\\\t\\\\\\\"Set the current kern amount.\\\\\\\"\\\\n\\\\tkern _ kern + kernDelta! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:53'!\\\\ninitializeFromParagraph: aParagraph clippedBy: clippingRectangle\\\\n\\\\n\\\\ttext _ aParagraph text.\\\\n\\\\ttextStyle _ aParagraph textStyle. \\\\n! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:53'!\\\\nsetActualFont: aFont\\\\n\\\\t\\\\\\\"Set the basal font to an isolated font reference.\\\\\\\"\\\\n\\\\n\\\\tfont _ aFont! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:53'!\\\\nsetAlignment: style\\\\n\\\\talignment _ style.\\\\n\\\\t! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'private' stamp: 'yo 12/19/2002 02:05'!\\\\nsetConditionArray: aSymbol\\\\n\\\\n\\\\taSymbol == #paddedSpace ifTrue: [^stopConditions _ PaddedSpaceCondition \\\\\\\"copy\\\\\\\"].\\\\n\\\\t\\\\\\\"aSymbol == #space ifTrue: [^stopConditions _ SpaceCondition copy].\\\\\\\"\\\\n\\\\taSymbol == nil ifTrue: [^stopConditions _ NilCondition \\\\\\\"copy\\\\\\\"].\\\\n\\\\tself error: 'undefined stopcondition for space character'.\\\\n! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'private' stamp: 'tak 12/19/2004 15:45'!\\\\nsetFont\\\\n\\\\t| priorFont |\\\\n\\\\t\\\\\\\"Set the font and other emphasis.\\\\\\\"\\\\n\\\\tpriorFont _ font.\\\\n\\\\ttext == nil ifFalse:[\\\\n\\\\t\\\\temphasisCode _ 0.\\\\n\\\\t\\\\tkern _ 0.\\\\n\\\\t\\\\tindentationLevel _ 0.\\\\n\\\\t\\\\talignment _ textStyle alignment.\\\\n\\\\t\\\\tfont _ nil.\\\\n\\\\t\\\\t(text attributesAt: lastIndex forStyle: textStyle)\\\\n\\\\t\\\\t\\\\tdo: [:att | att emphasizeScanner: self]].\\\\n\\\\tfont == nil ifTrue:\\\\n\\\\t\\\\t[self setFont: textStyle defaultFontIndex].\\\\n\\\\tfont _ font emphasized: emphasisCode.\\\\n\\\\tpriorFont ifNotNil: [destX _ destX + priorFont descentKern].\\\\n\\\\tdestX _ destX - font descentKern.\\\\n\\\\t\\\\\\\"NOTE: next statement should be removed when clipping works\\\\\\\"\\\\n\\\\tleftMargin ifNotNil: [destX _ destX max: leftMargin].\\\\n\\\\tkern _ kern - font baseKern.\\\\n\\\\n\\\\t\\\\\\\"Install various parameters from the font.\\\\\\\"\\\\n\\\\tspaceWidth _ font widthOf: Space.\\\\n\\\\txTable _ font xTable.\\\\n\\\\\\\"\\\\tmap _ font characterToGlyphMap.\\\\\\\"\\\\n\\\\tstopConditions _ DefaultStopConditions.! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:53'!\\\\nsetFont: fontNumber\\\\n\\\\t\\\\\\\"Set the font by number from the textStyle.\\\\\\\"\\\\n\\\\n\\\\tself setActualFont: (textStyle fontAt: fontNumber)! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:53'!\\\\ntext: t textStyle: ts\\\\n\\\\ttext _ t.\\\\n\\\\ttextStyle _ ts! !\\\\n\\\\n!MultiCharacterScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:53'!\\\\ntextColor: ignored\\\\n\\\\t\\\\\\\"Overridden in DisplayScanner\\\\\\\"! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMultiCharacterScanner class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MultiCharacterScanner class methodsFor: 'class initialization' stamp: 'yo 12/18/2002 14:09'!\\\\ninitialize\\\\n\\\\\\\"\\\\n\\\\tMultiCharacterScanner initialize\\\\n\\\\\\\"\\\\n\\\\t| a |\\\\n\\\\ta _ Array new: 258.\\\\n\\\\ta at: 1 + 1 put: #embeddedObject.\\\\n\\\\ta at: Tab asciiValue + 1 put: #tab.\\\\n\\\\ta at: CR asciiValue + 1 put: #cr.\\\\n\\\\ta at: EndOfRun put: #endOfRun.\\\\n\\\\ta at: CrossedX put: #crossedX.\\\\n\\\\tNilCondition _ a copy.\\\\n\\\\tDefaultStopConditions _ a copy.\\\\n\\\\n\\\\tPaddedSpaceCondition _ a copy.\\\\n\\\\tPaddedSpaceCondition at: Space asciiValue + 1 put: #paddedSpace.\\\\n\\\\t\\\\n\\\\tSpaceCondition _ a copy.\\\\n\\\\tSpaceCondition at: Space asciiValue + 1 put: #space.\\\\n! !\\\\nMultiCharacterScanner subclass: #MultiCompositionScanner\\\\n\\\\tinstanceVariableNames: 'spaceX lineHeight baseline breakableIndex lineHeightAtBreak baselineAtBreak breakAtSpace lastWidth'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Multilingual-Scanning'!\\\\n\\\\n!MultiCompositionScanner methodsFor: 'accessing' stamp: 'yo 1/3/2003 02:33'!\\\\npresentation\\\\n\\\\n\\\\t^ presentation.\\\\n! !\\\\n\\\\n!MultiCompositionScanner methodsFor: 'accessing' stamp: 'yo 1/3/2003 02:33'!\\\\npresentationLine\\\\n\\\\n\\\\t^ presentationLine.\\\\n! !\\\\n\\\\n!MultiCompositionScanner methodsFor: 'accessing' stamp: 'yo 12/18/2002 14:56'!\\\\nrightX\\\\n\\\\t\\\\\\\"Meaningful only when a line has just been composed -- refers to the \\\\n\\\\tline most recently composed. This is a subtrefuge to allow for easy \\\\n\\\\tresizing of a composition rectangle to the width of the maximum line. \\\\n\\\\tUseful only when there is only one line in the form or when each line \\\\n\\\\tis terminated by a carriage return. Handy for sizing menus and lists.\\\\\\\"\\\\n\\\\n\\\\tbreakAtSpace ifTrue: [^ spaceX].\\\\n\\\\n\\\\t^ destX.\\\\n! !\\\\n\\\\n\\\\n!MultiCompositionScanner methodsFor: 'intialize-release' stamp: 'yo 12/18/2002 13:57'!\\\\nforParagraph: aParagraph\\\\n\\\\t\\\\\\\"Initialize the receiver for scanning the given paragraph.\\\\\\\"\\\\n\\\\n\\\\tself\\\\n\\\\t\\\\tinitializeFromParagraph: aParagraph\\\\n\\\\t\\\\tclippedBy: aParagraph clippingRectangle.\\\\n! !\\\\n\\\\n\\\\n!MultiCompositionScanner methodsFor: 'multilingual scanning' stamp: 'yo 2/10/2004 23:00'!\\\\naddCharToPresentation: char\\\\n\\\\n\\\\tpresentation nextPut: char.\\\\n\\\\tlastWidth _ self widthOf: char inFont: font.\\\\n\\\\tdestX _ destX + lastWidth.\\\\n! !\\\\n\\\\n!MultiCompositionScanner methodsFor: 'multilingual scanning' stamp: 'yo 1/16/2003 17:38'!\\\\ngetPresentation\\\\n\\\\n\\\\t^ presentation contents.\\\\n\\\\n! !\\\\n\\\\n!MultiCompositionScanner methodsFor: 'multilingual scanning' stamp: 'yo 1/16/2003 17:28'!\\\\ngetPresentationLine\\\\n\\\\n\\\\t^ presentationLine.\\\\n! !\\\\n\\\\n!MultiCompositionScanner methodsFor: 'multilingual scanning' stamp: 'yo 12/20/2002 11:51'!\\\\nisBreakableAt: index in: sourceString in: encodingClass\\\\n\\\\n\\\\t^ encodingClass isBreakableAt: index in: sourceString.\\\\n! !\\\\n\\\\n!MultiCompositionScanner methodsFor: 'multilingual scanning' stamp: 'yo 12/20/2002 16:28'!\\\\nregisterBreakableIndex\\\\n\\\\n\\\\t\\\\\\\"Record left x and character index of the line-wrappable point. \\\\n\\\\tUsed for wrap-around. Answer whether the character has crossed the \\\\n\\\\tright edge of the composition rectangle of the paragraph.\\\\\\\"\\\\n\\\\n\\\\t(text at: lastIndex) = Character space ifTrue: [\\\\n\\\\t\\\\tbreakAtSpace _ true.\\\\n\\\\t\\\\tspaceX _ destX.\\\\n\\\\t\\\\tspaceCount _ spaceCount + 1.\\\\n\\\\t\\\\tlineHeightAtBreak _ lineHeight.\\\\n\\\\t\\\\tbaselineAtBreak _ baseline.\\\\n\\\\t\\\\tbreakableIndex _ lastIndex.\\\\n\\\\t\\\\tdestX > rightMargin ifTrue: \\\\t[^self crossedX].\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tbreakAtSpace _ false.\\\\n\\\\t\\\\tlineHeightAtBreak _ lineHeight.\\\\n\\\\t\\\\tbaselineAtBreak _ baseline.\\\\n\\\\t\\\\tbreakableIndex _ lastIndex - 1.\\\\n\\\\t].\\\\n\\\\t^ false.\\\\n! !\\\\n\\\\n!MultiCompositionScanner methodsFor: 'multilingual scanning' stamp: 'yo 2/10/2004 22:59'!\\\\nremoveLastCharFromPresentation\\\\n\\\\n\\\\tpresentation ifNotNil: [\\\\n\\\\t\\\\tpresentation position: presentation position - 1.\\\\n\\\\t].\\\\n\\\\tdestX _ destX - lastWidth.\\\\n! !\\\\n\\\\n\\\\n!MultiCompositionScanner methodsFor: 'scanning' stamp: 'ar 4/12/2005 17:34'!\\\\ncomposeFrom: startIndex inRectangle: lineRectangle\\\\n\\\\tfirstLine: firstLine leftSide: leftSide rightSide: rightSide\\\\n\\\\t\\\\\\\"Answer an instance of TextLineInterval that represents the next line in the paragraph.\\\\\\\"\\\\n\\\\t| runLength done stopCondition |\\\\n\\\\t\\\\\\\"Set up margins\\\\\\\"\\\\n\\\\tleftMargin _ lineRectangle left.\\\\n\\\\tleftSide ifTrue: [leftMargin _ leftMargin +\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(firstLine ifTrue: [textStyle firstIndent]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [textStyle restIndent])].\\\\n\\\\tdestX _ spaceX _ leftMargin.\\\\n\\\\tfirstDestX _ destX.\\\\n\\\\trightMargin _ lineRectangle right.\\\\n\\\\trightSide ifTrue: [rightMargin _ rightMargin - textStyle rightIndent].\\\\n\\\\tlastIndex _ startIndex.\\\\t\\\\\\\"scanning sets last index\\\\\\\"\\\\n\\\\tdestY _ lineRectangle top.\\\\n\\\\tlineHeight _ baseline _ 0.  \\\\\\\"Will be increased by setFont\\\\\\\"\\\\n\\\\tself setStopConditions.\\\\t\\\\\\\"also sets font\\\\\\\"\\\\n\\\\trunLength _ text runLengthFor: startIndex.\\\\n\\\\trunStopIndex _ (lastIndex _ startIndex) + (runLength - 1).\\\\n\\\\tline _ (TextLine start: lastIndex stop: 0 internalSpaces: 0 paddingWidth: 0)\\\\n\\\\t\\\\t\\\\t\\\\trectangle: lineRectangle.\\\\n\\\\tpresentationLine _ (TextLine start: lastIndex stop: 0 internalSpaces: 0 paddingWidth: 0)\\\\n\\\\t\\\\t\\\\t\\\\trectangle: lineRectangle.\\\\n\\\\tnumOfComposition _ 0.\\\\n\\\\tspaceCount _ 0.\\\\n\\\\tself handleIndentation.\\\\n\\\\tleftMargin _ destX.\\\\n\\\\tline leftMargin: leftMargin.\\\\n\\\\tpresentationLine leftMargin: leftMargin.\\\\n\\\\n\\\\tpresentation _ TextStream on: (Text fromString: (WideString new: text size)).\\\\n\\\\n\\\\tdone _ false.\\\\n\\\\t[done]\\\\n\\\\t\\\\twhileFalse: \\\\n\\\\t\\\\t\\\\t[stopCondition _ self scanCharactersFrom: lastIndex to: runStopIndex\\\\n\\\\t\\\\t\\\\t\\\\tin: text string rightX: rightMargin stopConditions: stopConditions\\\\n\\\\t\\\\t\\\\t\\\\tkern: kern.\\\\n\\\\t\\\\t\\\\t\\\\\\\"See setStopConditions for stopping conditions for composing.\\\\\\\"\\\\n\\\\t\\\\t\\\\t(self perform: stopCondition)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [presentationLine lineHeight: lineHeight + textStyle leading\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbaseline: baseline + textStyle leading.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^ line lineHeight: lineHeight + textStyle leading\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbaseline: baseline + textStyle leading]]! !\\\\n\\\\n!MultiCompositionScanner methodsFor: 'scanning' stamp: 'ar 4/12/2005 17:34'!\\\\ncomposeLine: lineIndex fromCharacterIndex: startIndex inParagraph: aParagraph \\\\n\\\\t\\\\\\\"Answer an instance of TextLineInterval that represents the next line in the paragraph.\\\\\\\"\\\\n\\\\t| runLength done stopCondition |\\\\n\\\\tdestX _ spaceX _ leftMargin _ aParagraph leftMarginForCompositionForLine: lineIndex.\\\\n\\\\tdestY _ 0.\\\\n\\\\trightMargin _ aParagraph rightMarginForComposition.\\\\n\\\\tleftMargin >= rightMargin ifTrue: [self error: 'No room between margins to compose'].\\\\n\\\\tlastIndex _ startIndex.\\\\t\\\\\\\"scanning sets last index\\\\\\\"\\\\n\\\\tlineHeight _ textStyle lineGrid.  \\\\\\\"may be increased by setFont:...\\\\\\\"\\\\n\\\\tbaseline _ textStyle baseline.\\\\n\\\\tbaselineY _ destY + baseline.\\\\n\\\\tself setStopConditions.\\\\t\\\\\\\"also sets font\\\\\\\"\\\\n\\\\tself handleIndentation.\\\\n\\\\trunLength _ text runLengthFor: startIndex.\\\\n\\\\trunStopIndex _ (lastIndex _ startIndex) + (runLength - 1).\\\\n\\\\tline _ TextLineInterval\\\\n\\\\t\\\\tstart: lastIndex\\\\n\\\\t\\\\tstop: 0\\\\n\\\\t\\\\tinternalSpaces: 0\\\\n\\\\t\\\\tpaddingWidth: 0.\\\\n\\\\tpresentationLine _ TextLineInterval\\\\n\\\\t\\\\tstart: lastIndex\\\\n\\\\t\\\\tstop: 0\\\\n\\\\t\\\\tinternalSpaces: 0\\\\n\\\\t\\\\tpaddingWidth: 0.\\\\n\\\\tnumOfComposition _ 0.\\\\n\\\\tpresentation _ TextStream on: (Text fromString: (WideString new: text size)).\\\\n\\\\tspaceCount _ 0.\\\\n\\\\tdone _ false.\\\\n\\\\t[done]\\\\n\\\\t\\\\twhileFalse: \\\\n\\\\t\\\\t\\\\t[stopCondition _ self scanCharactersFrom: lastIndex to: runStopIndex\\\\n\\\\t\\\\t\\\\t\\\\tin: text string rightX: rightMargin stopConditions: stopConditions\\\\n\\\\t\\\\t\\\\t\\\\tkern: kern.\\\\n\\\\t\\\\t\\\\t\\\\\\\"See setStopConditions for stopping conditions for composing.\\\\\\\"\\\\n\\\\t\\\\t\\\\t(self perform: stopCondition)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [presentationLine lineHeight: lineHeight + textStyle leading\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbaseline: baseline + textStyle leading.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^line lineHeight: lineHeight + textStyle leading\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbaseline: baseline + textStyle leading]]! !\\\\n\\\\n!MultiCompositionScanner methodsFor: 'scanning' stamp: 'yo 1/3/2003 11:54'!\\\\ncrossedX\\\\n\\\\t\\\\\\\"There is a word that has fallen across the right edge of the composition \\\\n\\\\trectangle. This signals the need for wrapping which is done to the last \\\\n\\\\tspace that was encountered, as recorded by the space stop condition.\\\\\\\"\\\\n\\\\n\\\\t(breakAtSpace) ifTrue: [\\\\n\\\\t\\\\tspaceCount >= 1 ifTrue:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"The common case. First back off to the space at which we wrap.\\\\\\\"\\\\n\\\\t\\\\t\\\\tline stop: breakableIndex.\\\\n\\\\t\\\\t\\\\tpresentationLine stop: breakableIndex - numOfComposition.\\\\n\\\\t\\\\t\\\\tlineHeight _ lineHeightAtBreak.\\\\n\\\\t\\\\t\\\\tbaseline _ baselineAtBreak.\\\\n\\\\t\\\\t\\\\tspaceCount _ spaceCount - 1.\\\\n\\\\t\\\\t\\\\tbreakableIndex _ breakableIndex - 1.\\\\n\\\\n\\\\t\\\\t\\\\t\\\\\\\"Check to see if any spaces preceding the one at which we wrap.\\\\n\\\\t\\\\t\\\\t\\\\tDouble space after punctuation, most likely.\\\\\\\"\\\\n\\\\t\\\\t\\\\t[(spaceCount > 1 and: [(text at: breakableIndex) = Space])]\\\\n\\\\t\\\\t\\\\t\\\\twhileTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[spaceCount _ spaceCount - 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Account for backing over a run which might\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tchange width of space.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tfont _ text fontAt: breakableIndex withStyle: textStyle.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbreakableIndex _ breakableIndex - 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tspaceX _ spaceX - (font widthOf: Space)].\\\\n\\\\t\\\\t\\\\tline paddingWidth: rightMargin - spaceX.\\\\n\\\\t\\\\t\\\\tpresentationLine paddingWidth: rightMargin - spaceX.\\\\n\\\\t\\\\t\\\\tpresentationLine internalSpaces: spaceCount.\\\\n\\\\t\\\\t\\\\tline internalSpaces: spaceCount]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"Neither internal nor trailing spaces -- almost never happens.\\\\\\\"\\\\n\\\\t\\\\t\\\\tlastIndex _ lastIndex - 1.\\\\n\\\\t\\\\t\\\\t[destX <= rightMargin]\\\\n\\\\t\\\\t\\\\t\\\\twhileFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[destX _ destX - (font widthOf: (text at: lastIndex)).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tlastIndex _ lastIndex - 1].\\\\n\\\\t\\\\t\\\\tspaceX _ destX.\\\\n\\\\t\\\\t\\\\tline paddingWidth: rightMargin - destX.\\\\n\\\\t\\\\t\\\\tpresentationLine paddingWidth: rightMargin - destX.\\\\n\\\\t\\\\t\\\\tpresentationLine stop: (lastIndex max: line first).\\\\n\\\\t\\\\t\\\\tline stop: (lastIndex max: line first)].\\\\n\\\\t\\\\t^true\\\\n\\\\t].\\\\n\\\\n\\\\t(breakableIndex isNil or: [breakableIndex < line first]) ifTrue: [\\\\n\\\\t\\\\t\\\\\\\"Any breakable point in this line.  Just wrap last character.\\\\\\\"\\\\n\\\\t\\\\tbreakableIndex _ lastIndex - 1.\\\\n\\\\t\\\\tlineHeightAtBreak _ lineHeight.\\\\n\\\\t\\\\tbaselineAtBreak _ baseline.\\\\n\\\\t].\\\\n\\\\n\\\\t\\\\\\\"It wasn't a space, but anyway this is where we break the line.\\\\\\\"\\\\n\\\\tline stop: breakableIndex.\\\\n\\\\tpresentationLine stop: breakableIndex.\\\\n\\\\tlineHeight _ lineHeightAtBreak.\\\\n\\\\tbaseline _ baselineAtBreak.\\\\n\\\\t^ true.\\\\n! !\\\\n\\\\n!MultiCompositionScanner methodsFor: 'scanning' stamp: 'tak 12/22/2004 00:59'!\\\\nsetActualFont: aFont\\\\n\\\\t\\\\\\\"Keep track of max height and ascent for auto lineheight\\\\\\\"\\\\n\\\\t| descent |\\\\n\\\\tsuper setActualFont: aFont.\\\\n\\\\t\\\\\\\"'   ', lastIndex printString, '   ' displayAt: (lastIndex * 15)@0.\\\\\\\"\\\\n\\\\tlineHeight == nil\\\\n\\\\t\\\\tifTrue: [descent _ font descent.\\\\n\\\\t\\\\t\\\\t\\\\tbaseline _ font ascent.\\\\n\\\\t\\\\t\\\\t\\\\tlineHeight _ baseline + descent]\\\\n\\\\t\\\\tifFalse: [descent _ lineHeight - baseline max: font descent.\\\\n\\\\t\\\\t\\\\t\\\\tbaseline _ baseline max: font ascent.\\\\n\\\\t\\\\t\\\\t\\\\tlineHeight _ lineHeight max: baseline + descent]! !\\\\n\\\\n\\\\n!MultiCompositionScanner methodsFor: 'stop conditions' stamp: 'yo 1/3/2003 11:56'!\\\\ncolumnBreak\\\\n\\\\n\\\\t\\\\\\\"Answer true. Set up values for the text line interval currently being \\\\n\\\\tcomposed.\\\\\\\"\\\\n\\\\n\\\\tline stop: lastIndex.\\\\n\\\\tpresentationLine stop: lastIndex - numOfComposition.\\\\n\\\\tspaceX _ destX.\\\\n\\\\tline paddingWidth: rightMargin - spaceX.\\\\n\\\\tpresentationLine paddingWidth: rightMargin - spaceX.\\\\n\\\\t^true! !\\\\n\\\\n!MultiCompositionScanner methodsFor: 'stop conditions' stamp: 'yo 1/3/2003 11:56'!\\\\ncr\\\\n\\\\t\\\\\\\"Answer true. Set up values for the text line interval currently being \\\\n\\\\tcomposed.\\\\\\\"\\\\n\\\\n\\\\tline stop: lastIndex.\\\\n\\\\tpresentationLine stop: lastIndex - numOfComposition.\\\\n\\\\tspaceX _ destX.\\\\n\\\\tline paddingWidth: rightMargin - spaceX.\\\\n\\\\tpresentationLine paddingWidth: rightMargin - spaceX.\\\\n\\\\t^true! !\\\\n\\\\n!MultiCompositionScanner methodsFor: 'stop conditions' stamp: 'yo 2/10/2004 23:03'!\\\\nendOfRun\\\\n\\\\t\\\\\\\"Answer true if scanning has reached the end of the paragraph. \\\\n\\\\tOtherwise step conditions (mostly install potential new font) and answer \\\\n\\\\tfalse.\\\\\\\"\\\\n\\\\n\\\\t| runLength |\\\\n\\\\tlastIndex = text size\\\\n\\\\tifTrue:\\\\t[line stop: lastIndex.\\\\n\\\\t\\\\t\\\\tpresentationLine stop: lastIndex - numOfComposition.\\\\n\\\\t\\\\t\\\\tspaceX _ destX.\\\\n\\\\t\\\\t\\\\tline paddingWidth: rightMargin - destX.\\\\n\\\\t\\\\t\\\\tpresentationLine paddingWidth: rightMargin - destX.\\\\n\\\\t\\\\t\\\\t^true]\\\\n\\\\tifFalse:\\\\t[\\\\n\\\\t\\\\t\\\\t\\\\\\\"(text at: lastIndex) charCode = 32 ifTrue: [destX _ destX + spaceWidth].\\\\\\\"\\\\n\\\\t\\\\t\\\\trunLength _ (text runLengthFor: (lastIndex _ lastIndex + 1)).\\\\n\\\\t\\\\t\\\\trunStopIndex _ lastIndex + (runLength - 1).\\\\n\\\\t\\\\t\\\\tself setStopConditions.\\\\n\\\\t\\\\t\\\\t^false]\\\\n! !\\\\n\\\\n!MultiCompositionScanner methodsFor: 'stop conditions' stamp: 'yo 1/3/2003 11:56'!\\\\nplaceEmbeddedObject: anchoredMorph\\\\n\\\\t| descent |\\\\n\\\\t\\\\\\\"Workaround: The following should really use #textAnchorType\\\\\\\"\\\\n\\\\tanchoredMorph relativeTextAnchorPosition ifNotNil:[^true].\\\\n\\\\t(super placeEmbeddedObject: anchoredMorph) ifFalse: [\\\\\\\"It doesn't fit\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"But if it's the first character then leave it here\\\\\\\"\\\\n\\\\t\\\\tlastIndex < line first ifFalse:[\\\\n\\\\t\\\\t\\\\tline stop: lastIndex-1.\\\\n\\\\t\\\\t\\\\t^ false]].\\\\n\\\\tdescent _ lineHeight - baseline.\\\\n\\\\tlineHeight _ lineHeight max: anchoredMorph height.\\\\n\\\\tbaseline _ lineHeight - descent.\\\\n\\\\tline stop: lastIndex.\\\\n\\\\tpresentationLine stop: lastIndex - numOfComposition.\\\\n\\\\t^ true! !\\\\n\\\\n!MultiCompositionScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 21:47'!\\\\nsetFont\\\\n\\\\tsuper setFont.\\\\n\\\\tbreakAtSpace _ false.\\\\n\\\\twantsColumnBreaks == true ifTrue: [\\\\n\\\\t\\\\tstopConditions _ stopConditions copy.\\\\n\\\\t\\\\tstopConditions at: TextComposer characterForColumnBreak asciiValue + 1 put: #columnBreak.\\\\n\\\\t].\\\\n! !\\\\n\\\\n!MultiCompositionScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:57'!\\\\nsetStopConditions\\\\n\\\\t\\\\\\\"Set the font and the stop conditions for the current run.\\\\\\\"\\\\n\\\\t\\\\n\\\\tself setFont! !\\\\n\\\\n!MultiCompositionScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:57'!\\\\ntab\\\\n\\\\t\\\\\\\"Advance destination x according to tab settings in the paragraph's \\\\n\\\\ttextStyle. Answer whether the character has crossed the right edge of \\\\n\\\\tthe composition rectangle of the paragraph.\\\\\\\"\\\\n\\\\n\\\\tdestX _ textStyle\\\\n\\\\t\\\\t\\\\t\\\\tnextTabXFrom: destX leftMargin: leftMargin rightMargin: rightMargin.\\\\n\\\\tdestX > rightMargin ifTrue:\\\\t[^self crossedX].\\\\n\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\t^false\\\\n! !\\\\nMultiCharacterScanner subclass: #MultiDisplayScanner\\\\n\\\\tinstanceVariableNames: 'bitBlt lineY runX foregroundColor backgroundColor fillBlt lineHeight paragraph paragraphColor morphicOffset ignoreColorChanges'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Multilingual-Scanning'!\\\\n\\\\n!MultiDisplayScanner methodsFor: 'MVC-compatibility' stamp: 'yo 1/7/2005 12:15'!\\\\ndisplayLines: linesInterval in: aParagraph clippedBy: visibleRectangle\\\\n\\\\t\\\\\\\"The central display routine. The call on the primitive \\\\n\\\\t(scanCharactersFrom:to:in:rightX:) will be interrupted according to an \\\\n\\\\tarray of stop conditions passed to the scanner at which time the code to \\\\n\\\\thandle the stop condition is run and the call on the primitive continued \\\\n\\\\tuntil a stop condition returns true (which means the line has \\\\n\\\\tterminated).\\\\\\\"\\\\n\\\\t| runLength done stopCondition leftInRun startIndex string lastPos |\\\\n\\\\t\\\\\\\"leftInRun is the # of characters left to scan in the current run;\\\\n\\\\t\\\\twhen 0, it is time to call 'self setStopConditions'\\\\\\\"\\\\n\\\\tmorphicOffset _ 0@0.\\\\n\\\\tleftInRun _ 0.\\\\n\\\\tself initializeFromParagraph: aParagraph clippedBy: visibleRectangle.\\\\n\\\\tignoreColorChanges _ false.\\\\n\\\\tparagraph _ aParagraph.\\\\n\\\\tforegroundColor _ paragraphColor _ aParagraph foregroundColor.\\\\n\\\\tbackgroundColor _ aParagraph backgroundColor.\\\\n\\\\taParagraph backgroundColor isTransparent\\\\n\\\\t\\\\tifTrue: [fillBlt _ nil]\\\\n\\\\t\\\\tifFalse: [fillBlt _ bitBlt copy.  \\\\\\\"Blt to fill spaces, tabs, margins\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tfillBlt sourceForm: nil; sourceOrigin: 0@0.\\\\n\\\\t\\\\t\\\\t\\\\tfillBlt fillColor: aParagraph backgroundColor].\\\\n\\\\trightMargin _ aParagraph rightMarginForDisplay.\\\\n\\\\tlineY _ aParagraph topAtLineIndex: linesInterval first.\\\\n\\\\tbitBlt destForm deferUpdatesIn: visibleRectangle while: [\\\\n\\\\t\\\\tlinesInterval do: \\\\n\\\\t\\\\t\\\\t[:lineIndex | \\\\n\\\\t\\\\t\\\\tleftMargin _ aParagraph leftMarginForDisplayForLine: lineIndex alignment: (alignment ifNil:[textStyle alignment]).\\\\n\\\\t\\\\t\\\\tdestX _ (runX _ leftMargin).\\\\n\\\\t\\\\t\\\\tline _ aParagraph lines at: lineIndex.\\\\n\\\\t\\\\t\\\\tlineHeight _ line lineHeight.\\\\n\\\\t\\\\t\\\\tfillBlt == nil ifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[fillBlt destX: visibleRectangle left destY: lineY\\\\n\\\\t\\\\t\\\\t\\\\t\\\\twidth: visibleRectangle width height: lineHeight; copyBits].\\\\n\\\\t\\\\t\\\\tlastIndex _ line first.\\\\n\\\\t\\\\t\\\\tleftInRun <= 0\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self setStopConditions.  \\\\\\\"also sets the font\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tleftInRun _ text runLengthFor: line first].\\\\n\\\\t\\\\t\\\\tbaselineY _ lineY + line baseline.\\\\n\\\\t\\\\t\\\\tdestY _ baselineY - font ascent.  \\\\\\\"Should have happened in setFont\\\\\\\"\\\\n\\\\t\\\\t\\\\trunLength _ leftInRun.\\\\n\\\\t\\\\t\\\\trunStopIndex _ lastIndex + (runLength - 1) min: line last.\\\\n\\\\t\\\\t\\\\tleftInRun _ leftInRun - (runStopIndex - lastIndex + 1).\\\\n\\\\t\\\\t\\\\tspaceCount _ 0.\\\\n\\\\t\\\\t\\\\tdone _ false.\\\\n\\\\t\\\\t\\\\tstring _ text string.\\\\n\\\\t\\\\t\\\\tself handleIndentation.\\\\n\\\\t\\\\t\\\\t[done] whileFalse:[\\\\n\\\\t\\\\t\\\\t\\\\tstartIndex _ lastIndex.\\\\n\\\\t\\\\t\\\\t\\\\tlastPos _ destX@destY.\\\\n\\\\t\\\\t\\\\t\\\\tstopCondition _ self scanCharactersFrom: lastIndex to: runStopIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tin: string rightX: rightMargin stopConditions: stopConditions\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tkern: kern.\\\\n\\\\t\\\\t\\\\t\\\\tlastIndex >= startIndex ifTrue:[\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tfont displayString: string on: bitBlt \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfrom: startIndex to: lastIndex at: lastPos kern: kern baselineY: baselineY].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"see setStopConditions for stopping conditions for displaying.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tdone _ self perform: stopCondition].\\\\n\\\\t\\\\t\\\\tfillBlt == nil ifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[fillBlt destX: destX destY: lineY width: visibleRectangle right-destX height: lineHeight; copyBits].\\\\n\\\\t\\\\t\\\\tlineY _ lineY + lineHeight]]! !\\\\n\\\\n!MultiDisplayScanner methodsFor: 'MVC-compatibility' stamp: 'yo 3/14/2005 06:48'!\\\\ninitializeFromParagraph: aParagraph clippedBy: clippingRectangle\\\\n\\\\n\\\\tsuper initializeFromParagraph: aParagraph clippedBy: clippingRectangle.\\\\n\\\\tbitBlt _ BitBlt asGrafPort toForm: aParagraph destinationForm.\\\\n\\\\tbitBlt sourceX: 0; width: 0.\\\\t\\\\\\\"Init BitBlt so that the first call to a primitive will not fail\\\\\\\"\\\\n\\\\tbitBlt combinationRule: Form paint.\\\\n\\\\tbitBlt colorMap:\\\\n\\\\t\\\\t(Bitmap with: 0      \\\\\\\"Assumes 1-bit deep fonts\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\twith: (bitBlt destForm pixelValueFor: aParagraph foregroundColor)).\\\\n\\\\tbitBlt clipRect: clippingRectangle.\\\\n! !\\\\n\\\\n\\\\n!MultiDisplayScanner methodsFor: 'multilingual scanning' stamp: 'yo 12/20/2002 11:52'!\\\\nisBreakableAt: index in: sourceString in: encodingClass\\\\n\\\\n\\\\t^ false.\\\\n! !\\\\n\\\\n!MultiDisplayScanner methodsFor: 'multilingual scanning' stamp: 'yo 8/6/2003 05:57'!\\\\nscanMultiCharactersCombiningFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: kernDelta\\\\n\\\\n\\\\t| encoding f nextDestX maxAscii startEncoding char charValue |\\\\n\\\\tlastIndex _ startIndex.\\\\n\\\\tlastIndex > stopIndex ifTrue: [lastIndex _ stopIndex. ^ stops at: EndOfRun].\\\\n\\\\tstartEncoding _ (sourceString at: startIndex) leadingChar.\\\\n\\\\tfont ifNil: [font _ (TextConstants at: #DefaultMultiStyle) fontArray at: 1].\\\\n\\\\t((font isMemberOf: StrikeFontSet) or: [font isKindOf: TTCFontSet]) ifTrue: [\\\\n\\\\t\\\\t[f _ font fontArray at: startEncoding + 1]\\\\n\\\\t\\\\t\\\\ton: Exception do: [:ex | f _ font fontArray at: 1].\\\\n\\\\t\\\\tf ifNil: [ f _ font fontArray at: 1].\\\\n\\\\t\\\\tmaxAscii _ f maxAscii.\\\\n\\\\t\\\\tspaceWidth _ f widthOf: Space.\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tmaxAscii _ font maxAscii.\\\\n\\\\t].\\\\n\\\\n\\\\t[lastIndex <= stopIndex] whileTrue: [\\\\n\\\\t\\\\tencoding _ (sourceString at: lastIndex) leadingChar.\\\\n\\\\t\\\\tencoding ~= startEncoding ifTrue: [lastIndex _ lastIndex - 1. ^ stops at: EndOfRun].\\\\n\\\\t\\\\tchar _ (sourceString at: lastIndex).\\\\n\\\\t\\\\tcharValue _ char charCode.\\\\n\\\\t\\\\tcharValue > maxAscii ifTrue: [charValue _ maxAscii].\\\\n\\\\t\\\\t(encoding = 0 and: [(stopConditions at: charValue + 1) ~~ nil]) ifTrue: [\\\\n\\\\t\\\\t\\\\t^ stops at: charValue + 1\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tnextDestX _ destX + (self widthOf: char inFont: font).\\\\n\\\\t\\\\tnextDestX > rightX ifTrue: [^ stops at: CrossedX].\\\\n\\\\t\\\\tdestX _ nextDestX + kernDelta.\\\\n\\\\t\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\t].\\\\n\\\\tlastIndex _ stopIndex.\\\\n\\\\t^ stops at: EndOfRun! !\\\\n\\\\n\\\\n!MultiDisplayScanner methodsFor: 'scanning' stamp: 'yo 1/7/2005 12:15'!\\\\ndisplayLine: textLine offset: offset leftInRun: leftInRun\\\\n\\\\t\\\\\\\"The call on the primitive (scanCharactersFrom:to:in:rightX:) will be interrupted according to an array of stop conditions passed to the scanner at which time the code to handle the stop condition is run and the call on the primitive continued until a stop condition returns true (which means the line has terminated).  leftInRun is the # of characters left to scan in the current run; when 0, it is time to call setStopConditions.\\\\\\\"\\\\n\\\\t| done stopCondition nowLeftInRun startIndex string lastPos |\\\\n\\\\tline _ textLine.\\\\n\\\\tmorphicOffset _ offset.\\\\n\\\\tlineY _ line top + offset y.\\\\n\\\\tlineHeight _ line lineHeight.\\\\n\\\\trightMargin _ line rightMargin + offset x.\\\\n\\\\tlastIndex _ line first.\\\\n\\\\tleftInRun <= 0 ifTrue: [self setStopConditions].\\\\n\\\\tleftMargin _ (line leftMarginForAlignment: alignment) + offset x.\\\\n\\\\tdestX _ runX _ leftMargin.\\\\n\\\\tfillBlt == nil ifFalse:\\\\n\\\\t\\\\t[\\\\\\\"Not right\\\\\\\"\\\\n\\\\t\\\\tfillBlt destX: line left destY: lineY\\\\n\\\\t\\\\t\\\\twidth: line width left height: lineHeight; copyBits].\\\\n\\\\tlastIndex _ line first.\\\\n\\\\tleftInRun <= 0\\\\n\\\\t\\\\tifTrue: [nowLeftInRun _ text runLengthFor: lastIndex]\\\\n\\\\t\\\\tifFalse: [nowLeftInRun _ leftInRun].\\\\n\\\\tbaselineY _ lineY + line baseline.\\\\n\\\\tdestY _ baselineY - font ascent.\\\\n\\\\trunStopIndex _ lastIndex + (nowLeftInRun - 1) min: line last.\\\\n\\\\tspaceCount _ 0.\\\\n\\\\tdone _ false.\\\\n\\\\tstring _ text string.\\\\n\\\\t[done] whileFalse:[\\\\n\\\\t\\\\tstartIndex _ lastIndex.\\\\n\\\\t\\\\tlastPos _ destX@destY.\\\\n\\\\t\\\\tstopCondition _ self scanCharactersFrom: lastIndex to: runStopIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tin: string rightX: rightMargin stopConditions: stopConditions\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tkern: kern.\\\\n\\\\t\\\\tlastIndex >= startIndex ifTrue:[\\\\n\\\\t\\\\t\\\\tfont displayString: string on: bitBlt \\\\n\\\\t\\\\t\\\\t\\\\tfrom: startIndex to: lastIndex at: lastPos kern: kern baselineY: baselineY].\\\\n\\\\t\\\\t\\\\\\\"see setStopConditions for stopping conditions for displaying.\\\\\\\"\\\\n\\\\t\\\\tdone _ self perform: stopCondition.\\\\n\\\\t\\\\t\\\\\\\"lastIndex > runStopIndex ifTrue: [done _ true].\\\\\\\"\\\\n\\\\t].\\\\n\\\\t^ runStopIndex - lastIndex   \\\\\\\"Number of characters remaining in the current run\\\\\\\"! !\\\\n\\\\n!MultiDisplayScanner methodsFor: 'scanning' stamp: 'lr 1/21/2006 16:01'!\\\\nplaceEmbeddedObject: anchoredMorph\\\\n\\\\tanchoredMorph relativeTextAnchorPosition ifNotNil:[\\\\n\\\\t\\\\tanchoredMorph position: \\\\n\\\\t\\\\t\\\\tanchoredMorph relativeTextAnchorPosition +\\\\n\\\\t\\\\t\\\\t(anchoredMorph owner textBounds origin x @ 0)\\\\n\\\\t\\\\t\\\\t- (0@morphicOffset y) + (0@lineY).\\\\n\\\\t\\\\t^true\\\\n\\\\t].\\\\n\\\\t(super placeEmbeddedObject: anchoredMorph) ifFalse: [^ false].\\\\n\\\\tanchoredMorph isMorph ifTrue: [\\\\n\\\\t\\\\tanchoredMorph position: ((destX - anchoredMorph width)@lineY) - morphicOffset\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tdestY _ lineY.\\\\n\\\\t\\\\tbaselineY _ lineY + anchoredMorph height..\\\\n\\\\t\\\\trunX _ destX.\\\\n\\\\t\\\\tanchoredMorph \\\\n\\\\t\\\\t\\\\tdisplayOn: bitBlt destForm \\\\n\\\\t\\\\t\\\\tat: destX - anchoredMorph width @ destY\\\\n\\\\t\\\\t\\\\tclippingBox: bitBlt clipRect\\\\n\\\\t\\\\t\\\\trule: Form blend\\\\n\\\\t\\\\t\\\\tfillColor: Color white \\\\n\\\\t].\\\\n\\\\t^ true! !\\\\n\\\\n\\\\n!MultiDisplayScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:58'!\\\\ncr\\\\n\\\\t\\\\\\\"When a carriage return is encountered, simply increment the pointer \\\\n\\\\tinto the paragraph.\\\\\\\"\\\\n\\\\n\\\\tlastIndex_ lastIndex + 1.\\\\n\\\\t^false! !\\\\n\\\\n!MultiDisplayScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:58'!\\\\ncrossedX\\\\n\\\\t\\\\\\\"This condition will sometimes be reached 'legally' during display, when, \\\\n\\\\tfor instance the space that caused the line to wrap actually extends over \\\\n\\\\tthe right boundary. This character is allowed to display, even though it \\\\n\\\\tis technically outside or straddling the clipping ectangle since it is in \\\\n\\\\tthe normal case not visible and is in any case appropriately clipped by \\\\n\\\\tthe scanner.\\\\\\\"\\\\n\\\\n\\\\t^ true ! !\\\\n\\\\n!MultiDisplayScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:58'!\\\\nendOfRun\\\\n\\\\t\\\\\\\"The end of a run in the display case either means that there is actually \\\\n\\\\ta change in the style (run code) to be associated with the string or the \\\\n\\\\tend of this line has been reached.\\\\\\\"\\\\n\\\\t| runLength |\\\\n\\\\tlastIndex = line last ifTrue: [^true].\\\\n\\\\trunX _ destX.\\\\n\\\\trunLength _ text runLengthFor: (lastIndex _ lastIndex + 1).\\\\n\\\\trunStopIndex _ lastIndex + (runLength - 1) min: line last.\\\\n\\\\tself setStopConditions.\\\\n\\\\t^ false! !\\\\n\\\\n!MultiDisplayScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:58'!\\\\npaddedSpace\\\\n\\\\t\\\\\\\"Each space is a stop condition when the alignment is right justified. \\\\n\\\\tPadding must be added to the base width of the space according to \\\\n\\\\twhich space in the line this space is and according to the amount of \\\\n\\\\tspace that remained at the end of the line when it was composed.\\\\\\\"\\\\n\\\\n\\\\tspaceCount _ spaceCount + 1.\\\\n\\\\tdestX _ destX + spaceWidth + (line justifiedPadFor: spaceCount).\\\\n\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\t^ false! !\\\\n\\\\n!MultiDisplayScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:58'!\\\\nplainTab\\\\n\\\\t| oldX |\\\\n\\\\toldX _ destX.\\\\n\\\\tsuper plainTab.\\\\n\\\\tfillBlt == nil ifFalse:\\\\n\\\\t\\\\t[fillBlt destX: oldX destY: destY width: destX - oldX height: font height; copyBits]! !\\\\n\\\\n!MultiDisplayScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:58'!\\\\nsetStopConditions\\\\n\\\\t\\\\\\\"Set the font and the stop conditions for the current run.\\\\\\\"\\\\n\\\\t\\\\n\\\\tself setFont.\\\\n\\\\tself setConditionArray: (alignment = Justified ifTrue: [#paddedSpace]).\\\\n\\\\n\\\\\\\"\\\\n\\\\talignment = Justified ifTrue: [\\\\n\\\\t\\\\tstopConditions == DefaultStopConditions \\\\n\\\\t\\\\t\\\\tifTrue:[stopConditions _ stopConditions copy].\\\\n\\\\t\\\\tstopConditions at: Space asciiValue + 1 put: #paddedSpace]\\\\n\\\\\\\"! !\\\\n\\\\n!MultiDisplayScanner methodsFor: 'stop conditions' stamp: 'yo 12/18/2002 13:58'!\\\\ntab\\\\n\\\\tself plainTab.\\\\n\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!MultiDisplayScanner methodsFor: 'private' stamp: 'yo 1/23/2003 14:40'!\\\\npresentationText: t\\\\n\\\\n\\\\ttext _ t.\\\\n! !\\\\n\\\\n!MultiDisplayScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:58'!\\\\nsetDestForm: df\\\\n\\\\tbitBlt setDestForm: df.! !\\\\n\\\\n!MultiDisplayScanner methodsFor: 'private' stamp: 'yo 1/6/2005 23:06'!\\\\nsetFont \\\\n\\\\tforegroundColor _ paragraphColor.\\\\n\\\\tsuper setFont.  \\\\\\\"Sets font and emphasis bits, and maybe foregroundColor\\\\\\\"\\\\n\\\\tfont installOn: bitBlt foregroundColor: foregroundColor backgroundColor: Color transparent.\\\\n\\\\ttext ifNotNil:[\\\\n\\\\t\\\\tbaselineY _ lineY + line baseline.\\\\n\\\\t\\\\tdestY _ baselineY - font ascent].\\\\n! !\\\\n\\\\n!MultiDisplayScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:58'!\\\\nsetPort: aBitBlt\\\\n\\\\t\\\\\\\"Install the BitBlt to use\\\\\\\"\\\\n\\\\tbitBlt _ aBitBlt.\\\\n\\\\tbitBlt sourceX: 0; width: 0.\\\\t\\\\\\\"Init BitBlt so that the first call to a primitive will not fail\\\\\\\"\\\\n\\\\tbitBlt sourceForm: nil. \\\\\\\"Make sure font installation won't be confused\\\\\\\"\\\\n! !\\\\n\\\\n!MultiDisplayScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:58'!\\\\ntext: t textStyle: ts foreground: foreColor background: backColor fillBlt: blt ignoreColorChanges: shadowMode\\\\n\\\\ttext _ t.\\\\n\\\\ttextStyle _ ts. \\\\n\\\\tforegroundColor _ paragraphColor _ foreColor.\\\\n\\\\t(backgroundColor _ backColor) isTransparent ifFalse:\\\\n\\\\t\\\\t[fillBlt _ blt.\\\\n\\\\t\\\\tfillBlt fillColor: backgroundColor].\\\\n\\\\tignoreColorChanges _ shadowMode! !\\\\n\\\\n!MultiDisplayScanner methodsFor: 'private' stamp: 'yo 12/18/2002 13:58'!\\\\ntextColor: textColor\\\\n\\\\tignoreColorChanges ifTrue: [^ self].\\\\n\\\\tforegroundColor _ textColor! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMultiDisplayScanner class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MultiDisplayScanner class methodsFor: 'queries' stamp: 'yo 12/18/2002 13:58'!\\\\ndefaultFont\\\\n\\\\t^ TextStyle defaultFont! !\\\\nNewParagraph subclass: #MultiNewParagraph\\\\n\\\\tinstanceVariableNames: 'presentationText presentationLines'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: 'TextConstants'\\\\n\\\\tcategory: 'Multilingual-Scanning'!\\\\n\\\\n!MultiNewParagraph methodsFor: 'as yet unclassified' stamp: 'yo 1/23/2003 16:09'!\\\\ndisplayOn: aCanvas using: displayScanner at: somePosition\\\\n\\\\t\\\\\\\"Send all visible lines to the displayScanner for display\\\\\\\"\\\\n\\\\n\\\\t| visibleRectangle offset leftInRun line |\\\\n\\\\tvisibleRectangle _ aCanvas clipRect.\\\\n\\\\toffset _ somePosition - positionWhenComposed.\\\\n\\\\tleftInRun _ 0.\\\\n\\\\t(self lineIndexForPoint: visibleRectangle topLeft)\\\\n\\\\t\\\\tto: (self lineIndexForPoint: visibleRectangle bottomRight)\\\\n\\\\t\\\\tdo: [:i | line _ lines at: i.\\\\n\\\\t\\\\t\\\\tself displaySelectionInLine: line on: aCanvas.\\\\n\\\\t\\\\t\\\\tline first <= line last ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[leftInRun _ displayScanner displayLine: line\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\toffset: offset leftInRun: leftInRun]].\\\\n! !\\\\n\\\\n!MultiNewParagraph methodsFor: 'as yet unclassified' stamp: 'yo 1/23/2003 22:33'!\\\\ndisplayOnTest: aCanvas using: displayScanner at: somePosition\\\\n\\\\t\\\\\\\"Send all visible lines to the displayScanner for display\\\\\\\"\\\\n\\\\n\\\\t| visibleRectangle offset leftInRun line |\\\\n\\\\t(presentationText isNil or: [presentationLines isNil]) ifTrue: [\\\\n\\\\t\\\\t^ self displayOn: aCanvas using: displayScanner at: somePosition.\\\\n\\\\t].\\\\n\\\\tvisibleRectangle _ aCanvas clipRect.\\\\n\\\\toffset _ somePosition - positionWhenComposed.\\\\n\\\\tleftInRun _ 0.\\\\n\\\\t(self lineIndexForPoint: visibleRectangle topLeft)\\\\n\\\\t\\\\tto: (self lineIndexForPoint: visibleRectangle bottomRight)\\\\n\\\\t\\\\tdo: [:i | line _ presentationLines at: i.\\\\n\\\\t\\\\t\\\\tself displaySelectionInLine: line on: aCanvas.\\\\n\\\\t\\\\t\\\\tline first <= line last ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[leftInRun _ displayScanner displayLine: line\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\toffset: offset leftInRun: leftInRun]].\\\\n! !\\\\n\\\\n!MultiNewParagraph methodsFor: 'as yet unclassified' stamp: 'yo 1/23/2003 12:53'!\\\\nmultiComposeLinesFrom: start to: stop delta: delta into: lineColl priorLines: priorLines\\\\n\\\\tatY: startingY\\\\n\\\\t\\\\\\\"While the section from start to stop has changed, composition may ripple all the way to the end of the text.  However in a rectangular container, if we ever find a line beginning with the same character as before (ie corresponding to delta in the old lines), then we can just copy the old lines from there to the end of the container, with adjusted indices and y-values\\\\\\\"\\\\n\\\\n\\\\t| newResult composer presentationInfo |\\\\n\\\\n\\\\tcomposer _ MultiTextComposer new.\\\\n\\\\tpresentationLines _ nil.\\\\n\\\\tpresentationText _ nil.\\\\n\\\\tnewResult _ composer\\\\n\\\\t\\\\tmultiComposeLinesFrom: start \\\\n\\\\t\\\\tto: stop \\\\n\\\\t\\\\tdelta: delta \\\\n\\\\t\\\\tinto: lineColl \\\\n\\\\t\\\\tpriorLines: priorLines\\\\n\\\\t\\\\tatY: startingY\\\\n\\\\t\\\\ttextStyle: textStyle \\\\n\\\\t\\\\ttext: text \\\\n\\\\t\\\\tcontainer: container\\\\n\\\\t\\\\twantsColumnBreaks: wantsColumnBreaks == true.\\\\n\\\\tlines _ newResult first asArray.\\\\n\\\\tmaxRightX _ newResult second.\\\\n\\\\tpresentationInfo _ composer getPresentationInfo.\\\\n\\\\tpresentationLines _ presentationInfo first asArray.\\\\n\\\\tpresentationText _ presentationInfo second.\\\\n\\\\t\\\\\\\"maxRightX printString displayAt: 0@0.\\\\\\\"\\\\n\\\\t^maxRightX\\\\n! !\\\\n\\\\n!MultiNewParagraph methodsFor: 'as yet unclassified' stamp: 'yo 1/23/2003 17:31'!\\\\npresentationLines\\\\n\\\\n\\\\t^ presentationLines.\\\\n! !\\\\n\\\\n!MultiNewParagraph methodsFor: 'as yet unclassified' stamp: 'yo 1/23/2003 17:31'!\\\\npresentationText\\\\n\\\\n\\\\t^ presentationText.\\\\n! !\\\\nFormCanvas subclass: #MultiResolutionCanvas\\\\n\\\\tinstanceVariableNames: 'deferredMorphs'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-Support'!\\\\n\\\\n!MultiResolutionCanvas methodsFor: 'as yet unclassified' stamp: 'RAA 12/4/2000 12:00'!\\\\ndeferredMorphs\\\\n\\\\n\\\\t^deferredMorphs! !\\\\n\\\\n!MultiResolutionCanvas methodsFor: 'as yet unclassified' stamp: 'RAA 12/4/2000 11:58'!\\\\ndeferredMorphs: aCollection\\\\n\\\\n\\\\tdeferredMorphs _ aCollection! !\\\\n\\\\n!MultiResolutionCanvas methodsFor: 'as yet unclassified' stamp: 'RAA 12/17/2000 13:25'!\\\\ninitializeFrom: aFormCanvas\\\\n\\\\n\\\\torigin _ aFormCanvas origin.\\\\n\\\\tclipRect _ aFormCanvas privateClipRect.\\\\n\\\\tform _ aFormCanvas form.\\\\n\\\\tport _ aFormCanvas privatePort.\\\\n\\\\tshadowColor _ aFormCanvas shadowColor.\\\\n! !\\\\n\\\\n\\\\n!MultiResolutionCanvas methodsFor: 'drawing-general' stamp: 'RAA 12/4/2000 12:00'!\\\\nfullDraw: aMorph\\\\n\\\\n\\\\taMorph canDrawAtHigherResolution ifTrue: [\\\\n\\\\t\\\\tdeferredMorphs ifNil: [deferredMorphs _ OrderedCollection new].\\\\n\\\\t\\\\tdeferredMorphs add: aMorph.\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tsuper fullDraw: aMorph\\\\n\\\\t].! !\\\\nTTCFont subclass: #MultiTTCFont\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Multilingual-Display'!\\\\n\\\\n!MultiTTCFont methodsFor: 'as yet unclassified' stamp: 'yo 12/10/2002 18:08'!\\\\naccess: char at: index\\\\n\\\\n\\\\t| wcache entry |\\\\n\\\\twcache _ self cache.\\\\n\\\\tentry _ wcache at: index.\\\\n\\\\twcache replaceFrom: index to: wcache size - 1 with: wcache startingAt: index + 1.\\\\n\\\\twcache at: wcache size put: entry.\\\\n! !\\\\n\\\\n!MultiTTCFont methodsFor: 'as yet unclassified' stamp: 'yo 12/10/2002 18:09'!\\\\nat: char put: form\\\\n\\\\n\\\\t| wcache |\\\\n\\\\twcache _ self cache.\\\\n\\\\twcache replaceFrom: 1 to: wcache size - 1 with: wcache startingAt: 2.\\\\n\\\\twcache at: wcache size\\\\n\\\\t\\\\tput: (Array with: char asciiValue with: foregroundColor with: form).\\\\n! !\\\\n\\\\n!MultiTTCFont methodsFor: 'as yet unclassified' stamp: 'yo 12/10/2002 18:27'!\\\\nflushCache\\\\n\\\\n\\\\tcache at: 1 put: ((1 to: 128) collect: [:i | Array with: -1 with: nil with: nil]).\\\\n! !\\\\n\\\\n!MultiTTCFont methodsFor: 'as yet unclassified' stamp: 'yo 12/10/2002 21:04'!\\\\nformOf: char\\\\n\\\\n\\\\t| newForm |\\\\n\\\\tself hasCached: char ifTrue: [:form :index |\\\\n\\\\t\\\\tself access: char at: index.\\\\n\\\\t\\\\t^ form.\\\\n\\\\t].\\\\n\\\\n\\\\tnewForm _ self computeForm: char.\\\\n\\\\tself at: char put: newForm.\\\\n\\\\t^ newForm.\\\\n! !\\\\n\\\\n!MultiTTCFont methodsFor: 'as yet unclassified' stamp: 'yo 1/7/2005 11:09'!\\\\nglyphInfoOf: char into: glyphInfoArray\\\\n\\\\n\\\\t| newForm |\\\\n\\\\tself hasCached: char ifTrue: [:form :index |\\\\n\\\\t\\\\tself access: char at: index.\\\\n\\\\t\\\\tglyphInfoArray at: 1 put: form;\\\\n\\\\t\\\\t\\\\tat: 2 put: 0;\\\\n\\\\t\\\\t\\\\tat: 3 put: form width;\\\\n\\\\t\\\\t\\\\tat: 4 put: (self ascentOf: char);\\\\n\\\\t\\\\t\\\\tat: 5 put: self.\\\\n\\\\t\\\\t^ glyphInfoArray.\\\\n\\\\t].\\\\n\\\\n\\\\tnewForm _ self computeForm: char.\\\\n\\\\tself at: char put: newForm.\\\\n\\\\n\\\\tglyphInfoArray at: 1 put: newForm;\\\\n\\\\t\\\\tat: 2 put: 0;\\\\n\\\\t\\\\tat: 3 put: newForm width;\\\\n\\\\t\\\\tat: 4 put: (self ascentOf: char);\\\\n\\\\t\\\\tat: 5 put: self.\\\\n\\\\t^ glyphInfoArray.\\\\n! !\\\\n\\\\n!MultiTTCFont methodsFor: 'as yet unclassified' stamp: 'yo 12/10/2002 18:39'!\\\\nhasCached: char ifTrue: twoArgBlock\\\\n\\\\n\\\\t| value elem |\\\\n\\\\tvalue _ char asciiValue.\\\\n\\\\n\\\\tself cache size to: 1 by: -1 do: [:i |\\\\n\\\\t\\\\telem _ self cache at: i.\\\\n\\\\t\\\\t(elem first = value and: [elem second = foregroundColor]) ifTrue: [\\\\n\\\\t\\\\t\\\\t^ twoArgBlock value: elem third value: i.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\t^ false.\\\\n! !\\\\n\\\\n!MultiTTCFont methodsFor: 'as yet unclassified' stamp: 'yo 12/29/2003 15:01'!\\\\nisTTCFont\\\\n\\\\t^true! !\\\\n\\\\n!MultiTTCFont methodsFor: 'as yet unclassified' stamp: 'yo 12/10/2002 18:30'!\\\\nwidthOf: char\\\\n\\\\n\\\\t\\\\\\\"This method cannot use #formOf: because formOf: discriminates the color and causes unnecessary bitmap creation.\\\\\\\"\\\\n\\\\n\\\\t| newForm |\\\\n\\\\tself hasCached: char ifTrue: [:form :index |\\\\n\\\\t\\\\tself access: char at: index.\\\\n\\\\t\\\\t^ form width.\\\\n\\\\t].\\\\n\\\\n\\\\tnewForm _ self computeForm: char.\\\\n\\\\tself at: char put: newForm.\\\\n\\\\t^ newForm width.\\\\n\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMultiTTCFont class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MultiTTCFont class methodsFor: 'as yet unclassified' stamp: 'yo 12/10/2002 18:34'!\\\\ncacheAllNil\\\\n\\\\\\\"\\\\n\\\\tself cacheAllNil\\\\n\\\\\\\"\\\\n\\\\tself allInstances do: [:inst |\\\\n\\\\t\\\\tinst cache do: [:e |\\\\n\\\\t\\\\t\\\\te third ifNotNil: [^ false].\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\n\\\\t^ true.\\\\n! !\\\\nTextComposer subclass: #MultiTextComposer\\\\n\\\\tinstanceVariableNames: 'presentation presentationLines'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: 'TextConstants'\\\\n\\\\tcategory: 'Multilingual-Scanning'!\\\\n\\\\n!MultiTextComposer methodsFor: 'as yet unclassified' stamp: 'yo 1/23/2003 12:53'!\\\\ncomposeEachRectangleIn: rectangles\\\\n\\\\n\\\\t| myLine lastChar |\\\\n\\\\n\\\\t1 to: rectangles size do: [:i | \\\\n\\\\t\\\\tcurrCharIndex <= theText size ifFalse: [^false].\\\\n\\\\t\\\\tmyLine _ scanner \\\\n\\\\t\\\\t\\\\tcomposeFrom: currCharIndex \\\\n\\\\t\\\\t\\\\tinRectangle: (rectangles at: i)\\\\t\\\\t\\\\t\\\\t\\\\n\\\\t\\\\t\\\\tfirstLine: isFirstLine \\\\n\\\\t\\\\t\\\\tleftSide: i=1 \\\\n\\\\t\\\\t\\\\trightSide: i=rectangles size.\\\\n\\\\t\\\\tlines addLast: myLine.\\\\n\\\\t\\\\tpresentationLines addLast: scanner getPresentationLine.\\\\n\\\\t\\\\tpresentation ifNil: [presentation _ scanner getPresentation]\\\\n\\\\t\\\\t\\\\tifNotNil: [presentation _ presentation, scanner getPresentation].\\\\n\\\\t\\\\tactualHeight _ actualHeight max: myLine lineHeight.  \\\\\\\"includes font changes\\\\\\\"\\\\n\\\\t\\\\tcurrCharIndex _ myLine last + 1.\\\\n\\\\t\\\\tlastChar _ theText at: myLine last.\\\\n\\\\t\\\\tlastChar = Character cr ifTrue: [^#cr].\\\\n\\\\t\\\\twantsColumnBreaks ifTrue: [\\\\n\\\\t\\\\t\\\\tlastChar = TextComposer characterForColumnBreak ifTrue: [^#columnBreak].\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\t^false! !\\\\n\\\\n!MultiTextComposer methodsFor: 'as yet unclassified' stamp: 'yo 1/23/2003 12:53'!\\\\ngetPresentationInfo\\\\n\\\\n\\\\t^ Array with: presentationLines with: presentation.\\\\n! !\\\\n\\\\n!MultiTextComposer methodsFor: 'as yet unclassified' stamp: 'yo 1/16/2003 17:30'!\\\\nmultiComposeLinesFrom: argStart to: argStop delta: argDelta into: argLinesCollection priorLines: argPriorLines atY: argStartY textStyle: argTextStyle text: argText container: argContainer wantsColumnBreaks: argWantsColumnBreaks\\\\n\\\\n\\\\twantsColumnBreaks _ argWantsColumnBreaks.\\\\n\\\\tlines _ argLinesCollection.\\\\n\\\\tpresentationLines _ argLinesCollection copy.\\\\n\\\\ttheTextStyle _ argTextStyle.\\\\n\\\\ttheText _ argText.\\\\n\\\\ttheContainer _ argContainer.\\\\n\\\\tdeltaCharIndex _ argDelta.\\\\n\\\\tcurrCharIndex _ startCharIndex _ argStart.\\\\n\\\\tstopCharIndex _ argStop.\\\\n\\\\tprevLines _ argPriorLines.\\\\n\\\\tcurrentY _ argStartY.\\\\n\\\\tdefaultLineHeight _ theTextStyle lineGrid.\\\\n\\\\tmaxRightX _ theContainer left.\\\\n\\\\tpossibleSlide _ stopCharIndex < theText size and: [theContainer isMemberOf: Rectangle].\\\\n\\\\tnowSliding _ false.\\\\n\\\\tprevIndex _ 1.\\\\n\\\\tscanner _ MultiCompositionScanner new text: theText textStyle: theTextStyle.\\\\n\\\\tscanner wantsColumnBreaks: wantsColumnBreaks.\\\\n\\\\tisFirstLine _ true.\\\\n\\\\tself composeAllLines.\\\\n\\\\tisFirstLine ifTrue: [\\\\\\\"No space in container or empty text\\\\\\\"\\\\n\\\\t\\\\tself \\\\n\\\\t\\\\t\\\\taddNullLineWithIndex: startCharIndex\\\\n\\\\t\\\\t\\\\tandRectangle: (theContainer topLeft extent: 0@defaultLineHeight)\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tself fixupLastLineIfCR\\\\n\\\\t].\\\\n\\\\t^{lines asArray. maxRightX}\\\\n\\\\n! !\\\\nLazyListMorph subclass: #MulticolumnLazyListMorph\\\\n\\\\tinstanceVariableNames: 'columnWidths'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Widgets'!\\\\n!MulticolumnLazyListMorph commentStamp: '<historical>' prior: 0!\\\\nA variant of LazyListMorph that can display multi-column lists.!\\\\n\\\\n\\\\n!MulticolumnLazyListMorph methodsFor: 'as yet unclassified' stamp: 'ls 5/17/2001 21:23'!\\\\ngetListItem: index\\\\n\\\\t^listSource getListRow: index! !\\\\n\\\\n!MulticolumnLazyListMorph methodsFor: 'as yet unclassified' stamp: 'ls 5/18/2001 16:43'!\\\\nlistChanged\\\\n\\\\tcolumnWidths := nil.\\\\n\\\\tsuper listChanged! !\\\\n\\\\n\\\\n!MulticolumnLazyListMorph methodsFor: 'drawing' stamp: 'nk 1/10/2004 16:19'!\\\\ndisplay: items atRow: row on: canvas \\\\n\\\\t\\\\\\\"display the specified item, which is on the specified row; for Multicolumn \\\\n\\\\tlists, items will be a list of strings\\\\\\\"\\\\n\\\\t| drawBounds |\\\\n\\\\tdrawBounds := self drawBoundsForRow: row.\\\\n\\\\tdrawBounds := drawBounds intersect: self bounds.\\\\n\\\\titems\\\\n\\\\t\\\\twith: (1 to: items size)\\\\n\\\\t\\\\tdo: [:item :index | \\\\n\\\\t\\\\t\\\\t\\\\\\\"move the bounds to the right at each step\\\\\\\"\\\\n\\\\t\\\\t\\\\tindex > 1\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [drawBounds := drawBounds left: drawBounds left + 6\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t+ (columnWidths at: index - 1)].\\\\n\\\\t\\\\t\\\\titem isText\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [canvas\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdrawString: item\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tin: drawBounds\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfont: (font\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\temphasized: (item emphasisAt: 1))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcolor: (self colorForRow: row)]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [canvas\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdrawString: item\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tin: drawBounds\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfont: font\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcolor: (self colorForRow: row)]]! !\\\\n\\\\n!MulticolumnLazyListMorph methodsFor: 'drawing' stamp: 'ls 5/17/2001 21:58'!\\\\ndrawOn: aCanvas\\\\n        self getListSize = 0 ifTrue:[ ^self ].\\\\n\\\\n        self setColumnWidthsFor: aCanvas.\\\\n\\\\n        super drawOn: aCanvas! !\\\\n\\\\n!MulticolumnLazyListMorph methodsFor: 'drawing' stamp: 'sps 3/23/2004 15:51'!\\\\nsetColumnWidthsFor: aCanvas\\\\n        | row topRow bottomRow |\\\\n        \\\\\\\"set columnWidths for drawing on the specified canvas\\\\\\\"\\\\n\\\\t\\\\tcolumnWidths ifNil: [\\\\n\\\\t\\\\tcolumnWidths := (self item: 1) collect: [ :ignored | 0 ]. ].\\\\n\\\\ttopRow := (self topVisibleRowForCanvas: aCanvas) max: 1.\\\\n\\\\tbottomRow :=  (self bottomVisibleRowForCanvas: aCanvas) max: 1.\\\\n\\\\ttopRow > bottomRow ifTrue: [ ^ self ].\\\\n\\\\ttopRow to: bottomRow do: [ :rowIndex |\\\\n                row := self item: rowIndex.\\\\n                columnWidths := columnWidths with: row collect: [ :currentWidth :item |\\\\n\\\\t\\\\t\\\\t\\\\t| widthOfItem |\\\\n\\\\t\\\\t\\\\t\\\\twidthOfItem := (font widthOfStringOrText: item).\\\\n\\\\t\\\\t\\\\t\\\\twidthOfItem > currentWidth\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [ self changed.  widthOfItem ]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [ currentWidth ] ] ]! !\\\\n\\\\n\\\\n!MulticolumnLazyListMorph methodsFor: 'scroll range' stamp: 'sps 4/2/2004 12:16'!\\\\nhUnadjustedScrollRange\\\\n\\\\\\\"multi column list morphs don't use hScrollbars\\\\\\\"\\\\n\\\\n\\\\t^0\\\\n\\\\n! !\\\\n\\\\n!MulticolumnLazyListMorph methodsFor: 'scroll range' stamp: 'ls 4/17/2004 12:21'!\\\\nwidthToDisplayItem: item\\\\n\\\\t| widths |\\\\n\\\\twidths := item collect: [ :each | super widthToDisplayItem: each ].\\\\n\\\\t^widths sum + (10 * (widths size - 1))   \\\\\\\"add in space between the columns\\\\\\\"\\\\n! !\\\\nSketchMorph subclass: #MultiuserTinyPaint\\\\n\\\\tinstanceVariableNames: 'drawState'\\\\n\\\\tclassVariableNames: 'LastMouseIndex PenColorIndex PenIndex PenSizeIndex'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-AdditionalWidgets'!\\\\n!MultiuserTinyPaint commentStamp: '<historical>' prior: 0!\\\\nA very simple paint program that handles multiple users (hands).\\\\nEach user has their own brush size and color.\\\\n!\\\\n\\\\n\\\\n!MultiuserTinyPaint methodsFor: 'event handling' stamp: 'jm 11/4/97 07:15'!\\\\nhandlesMouseDown: evt\\\\n\\\\n\\\\t^ true\\\\n! !\\\\n\\\\n!MultiuserTinyPaint methodsFor: 'event handling' stamp: 'jm 11/4/97 07:15'!\\\\nmouseDown: evt\\\\n\\\\n\\\\t| state |\\\\n\\\\t(drawState includesKey: evt hand) ifFalse: [self createDrawStateFor: evt hand].\\\\n\\\\tstate _ drawState at: evt hand.\\\\n\\\\tstate at: LastMouseIndex put: evt cursorPoint.\\\\n! !\\\\n\\\\n!MultiuserTinyPaint methodsFor: 'event handling' stamp: 'jm 11/4/97 07:15'!\\\\nmouseMove: evt\\\\n\\\\n\\\\t| state lastP p pen |\\\\n\\\\tstate _ drawState at: evt hand ifAbsent: [^ self].\\\\n\\\\tlastP _ state at: LastMouseIndex.\\\\n\\\\tp _ evt cursorPoint.\\\\n\\\\tp = lastP ifTrue: [^ self].\\\\n\\\\n\\\\tpen _ state at: PenIndex.\\\\n\\\\tpen drawFrom: lastP - bounds origin to: p - bounds origin.\\\\n\\\\tself invalidRect: (\\\\n\\\\t\\\\t((lastP min: p) - pen sourceForm extent) corner:\\\\n\\\\t\\\\t((lastP max: p) + pen sourceForm extent)).\\\\n\\\\tstate at: LastMouseIndex put: p.\\\\n! !\\\\n\\\\n\\\\n!MultiuserTinyPaint methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:29'!\\\\ndefaultColor\\\\n\\\\t\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color veryVeryLightGray! !\\\\n\\\\n!MultiuserTinyPaint methodsFor: 'initialization' stamp: 'dgd 2/14/2003 21:52'!\\\\ninitialize\\\\n\\\\t\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\n\\\\tdrawState _ IdentityDictionary new.\\\\n\\\\tself clear! !\\\\n\\\\n\\\\n!MultiuserTinyPaint methodsFor: 'menu' stamp: 'dgd 8/30/2003 21:55'!\\\\naddCustomMenuItems: aCustomMenu hand: aHandMorph\\\\n\\\\n\\\\tsuper addCustomMenuItems: aCustomMenu hand: aHandMorph.\\\\n\\\\taCustomMenu add: 'clear' translated action: #clear.\\\\n\\\\taCustomMenu add: 'pen color' translated action: #setPenColor:.\\\\n\\\\taCustomMenu add: 'pen size' translated action: #setPenSize:.\\\\n\\\\\\\"\\\\taCustomMenu add: 'fill' translated action: #fill:.\\\\\\\"\\\\n! !\\\\n\\\\n!MultiuserTinyPaint methodsFor: 'menu' stamp: 'jm 11/4/97 07:15'!\\\\nbrushColor: aColor hand: hand\\\\n\\\\n\\\\t| state |\\\\n\\\\t(drawState includesKey: hand) ifFalse: [self createDrawStateFor: hand].\\\\n\\\\tstate _ drawState at: hand.\\\\n\\\\t(state at: PenIndex) color: aColor.\\\\n\\\\tstate at: PenColorIndex put: aColor.\\\\n! !\\\\n\\\\n!MultiuserTinyPaint methodsFor: 'menu' stamp: 'jm 11/4/97 07:15'!\\\\nclear\\\\n\\\\n\\\\t| newPen |\\\\n\\\\tself form: ((Form extent: 400@300 depth: 8) fillColor: color).\\\\n\\\\tdrawState do: [:state |\\\\n\\\\t\\\\tnewPen _ Pen newOnForm: originalForm.\\\\n\\\\t\\\\tnewPen roundNib: (state at: PenSizeIndex).\\\\n\\\\t\\\\tnewPen color: (state at: PenColorIndex).\\\\n\\\\t\\\\tstate at: PenIndex put: newPen].\\\\n! !\\\\n\\\\n!MultiuserTinyPaint methodsFor: 'menu' stamp: 'bf 1/5/2000 19:12'!\\\\nfill: evt\\\\n\\\\n\\\\t| state fillPt |\\\\n\\\\t(drawState includesKey: evt hand) ifFalse: [self createDrawStateFor: evt hand].\\\\n\\\\tstate _ drawState at: evt hand.\\\\n\\\\n\\\\tCursor blank show.\\\\n\\\\tCursor crossHair showWhile:\\\\n\\\\t\\\\t[fillPt _ Sensor waitButton - self position].\\\\n\\\\toriginalForm shapeFill: (state at: PenColorIndex) interiorPoint: fillPt.\\\\n\\\\tself changed.\\\\n! !\\\\n\\\\n!MultiuserTinyPaint methodsFor: 'menu' stamp: 'jm 9/26/97 14:47'!\\\\npenSize: anInteger hand: hand\\\\n\\\\n\\\\t| state |\\\\n\\\\t(drawState includesKey: hand) ifFalse: [self createDrawStateFor: hand].\\\\n\\\\tstate _ drawState at: hand.\\\\n\\\\tstate at: PenSizeIndex put: anInteger.\\\\n\\\\t(state at: PenIndex) roundNib: anInteger.\\\\n! !\\\\n\\\\n!MultiuserTinyPaint methodsFor: 'menu' stamp: 'ar 10/5/2000 18:52'!\\\\nsetPenColor: evt\\\\n\\\\t| state |\\\\n\\\\t(drawState includesKey: evt hand) ifFalse: [self createDrawStateFor: evt hand].\\\\n\\\\tstate _ drawState at: evt hand.\\\\n\\\\tself changeColorTarget: self selector: #brushColor:hand: originalColor: (state at: PenColorIndex) hand: evt hand! !\\\\n\\\\n!MultiuserTinyPaint methodsFor: 'menu' stamp: 'RAA 6/12/2000 09:07'!\\\\nsetPenSize: evt\\\\n\\\\n\\\\t| menu sizes |\\\\n\\\\tmenu _ MenuMorph new.\\\\n\\\\tsizes _ (0 to: 5), (6 to: 12 by: 2), (15 to: 40 by: 5).\\\\n\\\\tsizes do: [:w |\\\\n\\\\t\\\\tmenu add: w printString\\\\n\\\\t\\\\t\\\\ttarget: self\\\\n\\\\t\\\\t\\\\tselector: #penSize:hand:\\\\n\\\\t\\\\t\\\\targumentList: (Array with: w with: evt hand)].\\\\n\\\\n\\\\tmenu popUpEvent: evt in: self world! !\\\\n\\\\n\\\\n!MultiuserTinyPaint methodsFor: 'private' stamp: 'jm 11/4/97 07:15'!\\\\ncreateDrawStateFor: aHand\\\\n\\\\n\\\\t| pen state |\\\\n\\\\tpen _ Pen newOnForm: originalForm.\\\\n\\\\tstate _ Array new: 4.\\\\n\\\\tstate at: PenIndex put: pen.\\\\n\\\\tstate at: PenSizeIndex put: 3.\\\\n\\\\tstate at: PenColorIndex put: Color red.\\\\n\\\\tstate at: LastMouseIndex put: nil.\\\\n\\\\tdrawState at: aHand put: state.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMultiuserTinyPaint class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MultiuserTinyPaint class methodsFor: 'class initialization' stamp: 'jm 11/4/97 07:15'!\\\\ninitialize\\\\n\\\\t\\\\\\\"MultiuserTinyPaint initialize\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"indices into the state array for a given hand\\\\\\\"\\\\n\\\\tPenIndex _ 1.\\\\n\\\\tPenSizeIndex _ 2.\\\\n\\\\tPenColorIndex _ 3.\\\\n\\\\tLastMouseIndex _ 4.\\\\n! !\\\\nObject subclass: #Mutex\\\\n\\\\tinstanceVariableNames: 'semaphore owner'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Kernel-Processes'!\\\\n!Mutex commentStamp: '<historical>' prior: 0!\\\\nA Mutex is a light-weight MUTual EXclusion object being used when two or more processes need to access a shared resource concurrently. A Mutex grants ownership to a single process and will suspend any other process trying to aquire the mutex while in use. Waiting processes are granted access to the mutex in the order the access was requested.\\\\n\\\\nInstance variables:\\\\n\\\\tsemaphore\\\\t<Semaphore>\\\\t\\\\tThe (primitive) semaphore used for synchronization.\\\\n\\\\towner\\\\t\\\\t<Process>\\\\t\\\\tThe process owning the mutex.!\\\\n\\\\n\\\\n!Mutex methodsFor: 'initialize' stamp: 'das 11/3/2005 22:53'!\\\\ninitialize\\\\n\\\\tsemaphore := Semaphore forMutualExclusion.! !\\\\n\\\\n\\\\n!Mutex methodsFor: 'mutual exclusion' stamp: 'das 11/3/2005 22:53'!\\\\ncritical: aBlock\\\\n\\\\t\\\\\\\"Evaluate aBlock protected by the receiver.\\\\\\\"\\\\n\\\\t| activeProcess |\\\\n\\\\tactiveProcess := Processor activeProcess.\\\\n\\\\tactiveProcess == owner ifTrue:[^aBlock value].\\\\n\\\\t^semaphore critical:[\\\\n\\\\t\\\\towner := activeProcess.\\\\n\\\\t\\\\taBlock ensure:[owner := nil]].! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMutex class\\\\n\\\\tinstanceVariableNames: ''!\\\\nObject subclass: #MutexSet\\\\n\\\\tinstanceVariableNames: 'array'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Kernel-Processes'!\\\\n!MutexSet commentStamp: '<historical>' prior: 0!\\\\nA MutexSet helps with aquiring a set of mutexes.!\\\\n\\\\n\\\\n!MutexSet methodsFor: 'initialize' stamp: 'das 11/3/2005 22:54'!\\\\nwithAll: mutexList\\\\n\\\\tarray := mutexList.! !\\\\n\\\\n\\\\n!MutexSet methodsFor: 'mutual exclusion' stamp: 'das 11/3/2005 22:54'!\\\\ncritical: aBlock\\\\n\\\\t\\\\\\\"Evaluate aBlock aquiring all mutexes\\\\\\\"\\\\n\\\\t^self pvtCritical: aBlock startingAt: 1! !\\\\n\\\\n\\\\n!MutexSet methodsFor: 'private' stamp: 'das 11/3/2005 22:54'!\\\\npvtCritical: aBlock startingAt: index\\\\n\\\\t| mutex |\\\\n\\\\tindex > array size ifTrue:[^aBlock value].\\\\n\\\\tmutex := array at: index.\\\\n\\\\t^mutex critical:[self pvtCritical: aBlock startingAt: index+1].! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nMutexSet class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!MutexSet class methodsFor: 'instance creation' stamp: 'das 11/3/2005 22:54'!\\\\nwithAll: mutexList\\\\n\\\\t^self new withAll: mutexList! !\\\\nAppRegistry subclass: #MvcTextEditor\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Applications'!\\\\n!MvcTextEditor commentStamp: 'tween 8/27/2004 12:24' prior: 0!\\\\nA subclass of AppRegistry which allows the user, or Browser add-ons, to control which class is used when creating the code editing view in mvc Browsers!\\\\n\\\\nError subclass: #MyResumableTestError\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Exceptions-Tests'!\\\\n\\\\n!MyResumableTestError methodsFor: 'exceptionDescription' stamp: 'tfei 6/13/1999 00:46'!\\\\nisResumable\\\\n\\\\n\\\\t^true! !\\\\nError subclass: #MyTestError\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Exceptions-Tests'!\\\\nNotification subclass: #MyTestNotification\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Exceptions-Tests'!\\\\nNetworkError subclass: #NameLookupFailure\\\\n\\\\tinstanceVariableNames: 'hostName'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Network-Kernel'!\\\\n!NameLookupFailure commentStamp: 'mir 5/12/2003 18:16' prior: 0!\\\\nSignals that a name lookup operation failed.\\\\n\\\\n\\\\thostName\\\\thostName for which the name loopup failed\\\\n!\\\\n\\\\n\\\\n!NameLookupFailure methodsFor: 'accessing' stamp: 'rbb 2/18/2005 14:27'!\\\\ndefaultAction\\\\n\\\\t\\\\\\\"Backward compatibility\\\\\\\"\\\\n\\\\t| response |\\\\n\\\\tresponse _ (UIManager default  chooseFrom: #( 'Retry' 'Give Up')\\\\n\\\\t\\\\t\\\\ttitle: self messageText).\\\\n\\\\t^ response = 2\\\\n\\\\t\\\\tifFalse: [self retry]! !\\\\n\\\\n!NameLookupFailure methodsFor: 'accessing' stamp: 'len 12/14/2002 11:57'!\\\\nhostName\\\\n\\\\t^ hostName! !\\\\n\\\\n!NameLookupFailure methodsFor: 'accessing' stamp: 'len 12/14/2002 11:57'!\\\\nhostName: aString\\\\n\\\\thostName _ aString! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nNameLookupFailure class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!NameLookupFailure class methodsFor: 'instance creation' stamp: 'len 12/14/2002 11:57'!\\\\nhostName: aString\\\\n\\\\t^ self new hostName: aString! !\\\\nObject subclass: #NameOfSubclass\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Tests-Bugs'!\\\\nUpdatingStringMorph subclass: #NameStringInHalo\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Widgets'!\\\\n!NameStringInHalo commentStamp: 'kfr 10/27/2003 16:29' prior: 0!\\\\nShows the name of the morph in the halo. !\\\\n\\\\n\\\\n!NameStringInHalo methodsFor: 'accessing' stamp: 'sw 9/17/1999 13:17'!\\\\ninterimContents: aString\\\\n\\\\tself contents: aString.\\\\n\\\\tself placeContents! !\\\\n\\\\n\\\\n!NameStringInHalo methodsFor: 'as yet unclassified' stamp: 'di 11/25/1999 23:40'!\\\\nplaceContents\\\\n\\\\t| namePosition |\\\\n\\\\t(owner notNil and: [owner isInWorld]) ifTrue:\\\\n\\\\t\\\\t[namePosition _ owner basicBox bottomCenter -\\\\n\\\\t\\\\t\\\\t((self width // 2) @ (owner handleSize negated // 2 - 1)).\\\\n\\\\t\\\\tnamePosition _ namePosition min: self world viewBox bottomRight - self extent y + 2.\\\\n\\\\t\\\\tself bounds: (namePosition extent: self extent)]! !\\\\n\\\\n\\\\n!NameStringInHalo methodsFor: 'drawing' stamp: 'sw 9/7/1999 21:27'!\\\\ndrawOn: aCanvas\\\\n\\\\taCanvas fillRectangle: self bounds color: Color white.\\\\n\\\\tsuper drawOn: aCanvas.! !\\\\n\\\\n\\\\n!NameStringInHalo methodsFor: 'editing' stamp: 'sw 9/17/1999 13:41'!\\\\ncancelEdits\\\\n\\\\tself interimContents: target externalName.\\\\n\\\\tsuper cancelEdits! !\\\\nObject subclass: #NaturalLanguageFormTranslator\\\\n\\\\tinstanceVariableNames: 'id generics'\\\\n\\\\tclassVariableNames: 'CachedTranslations'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Localization'!\\\\n\\\\n!NaturalLanguageFormTranslator methodsFor: 'accessing' stamp: 'yo 1/13/2005 11:15'!\\\\ngenerics\\\\n\\\\t^generics ifNil: [generics := Dictionary new]! !\\\\n\\\\n!NaturalLanguageFormTranslator methodsFor: 'accessing' stamp: 'yo 1/13/2005 11:27'!\\\\nlocaleID\\\\n\\\\t^id! !\\\\n\\\\n!NaturalLanguageFormTranslator methodsFor: 'accessing' stamp: 'yo 1/13/2005 11:26'!\\\\nlocaleID: anID\\\\n\\\\tid := anID! !\\\\n\\\\n!NaturalLanguageFormTranslator methodsFor: 'accessing' stamp: 'yo 1/13/2005 11:17'!\\\\nname: formName form: translatedForm \\\\n\\\\tself generics at: formName put: translatedForm.\\\\n! !\\\\n\\\\n\\\\n!NaturalLanguageFormTranslator methodsFor: 'i/o' stamp: 'yo 1/13/2005 14:02'!\\\\nsaveFormsOn: aStream\\\\n\\\\n\\\\t| rr |\\\\n\\\\trr _ ReferenceStream on: aStream.\\\\n\\\\trr nextPut: {id isoString. generics}.\\\\n\\\\trr close.\\\\n! !\\\\n\\\\n\\\\n!NaturalLanguageFormTranslator methodsFor: 'utilities' stamp: 'yo 1/13/2005 11:35'!\\\\ntranslate: aString\\\\n\\\\n\\\\t^ (self generics\\\\n\\\\t\\\\tat: aString ifAbsent: [nil]) deepCopy.\\\\n\\\\n\\\\t\\\\\\\"Do you like to write 'form ifNotNil: [form deepCopy]'?\\\\\\\"\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nNaturalLanguageFormTranslator class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!NaturalLanguageFormTranslator class methodsFor: 'accessing' stamp: 'yo 1/13/2005 11:13'!\\\\ncachedTranslations\\\\n\\\\t\\\\\\\"CachedTranslations := nil\\\\\\\" \\\\n\\\\t^CachedTranslations ifNil: [CachedTranslations := Dictionary new]! !\\\\n\\\\n!NaturalLanguageFormTranslator class methodsFor: 'accessing' stamp: 'yo 1/13/2005 11:13'!\\\\nisoLanguage: isoLanguage\\\\n\\\\t\\\\\\\"Return the generic language translator as there is no information about the country code\\\\\\\"\\\\n\\\\n\\\\t^self isoLanguage: isoLanguage isoCountry: nil! !\\\\n\\\\n!NaturalLanguageFormTranslator class methodsFor: 'accessing' stamp: 'yo 1/13/2005 11:13'!\\\\nisoLanguage: isoLanguage isoCountry: isoCountry\\\\n\\\\t^self localeID: (LocaleID  isoLanguage: isoLanguage isoCountry: isoCountry)! !\\\\n\\\\n!NaturalLanguageFormTranslator class methodsFor: 'accessing' stamp: 'yo 1/13/2005 11:13'!\\\\nlocaleID: localeID \\\\n\\\\t^ self cachedTranslations\\\\n\\\\t\\\\tat: localeID\\\\n\\\\t\\\\tifAbsentPut: [self new localeID: localeID]! !\\\\n\\\\n\\\\n!NaturalLanguageFormTranslator class methodsFor: 'i/o' stamp: 'yo 1/13/2005 14:02'!\\\\nloadFormsFrom: aStream\\\\n\\\\n\\\\t| rr pair inst |\\\\n\\\\trr _ ReferenceStream on: aStream.\\\\n\\\\tpair _ rr next.\\\\n\\\\tinst _ self localeID: (LocaleID isoString: pair first).\\\\n\\\\tpair second associationsDo: [:assoc |\\\\n\\\\t\\\\tinst name: assoc key form: assoc value.\\\\n\\\\t].\\\\n\\\\t^ inst.\\\\n! !\\\\nObject subclass: #NaturalLanguageTranslator\\\\n\\\\tinstanceVariableNames: 'id generics contexts'\\\\n\\\\tclassVariableNames: 'AllKnownPhrases CachedTranslations'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Localization'!\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'accessing' stamp: 'dgd 8/13/2004 21:12'!\\\\ndisplayLanguage\\\\n\\\\t^ id displayLanguage! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'accessing' stamp: 'dgd 10/7/2004 20:50'!\\\\ndisplayName\\\\n\\\\t^ id displayName! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'accessing' stamp: 'mir 7/15/2004 14:41'!\\\\nisoCountry\\\\n\\\\t^self localeID isoCountry! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'accessing' stamp: 'mir 7/15/2004 14:42'!\\\\nisoLanguage\\\\n\\\\t^self localeID isoLanguage! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'accessing' stamp: 'mir 7/15/2004 14:42'!\\\\nlocaleID\\\\n\\\\t^id! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'accessing' stamp: 'mir 7/21/2004 17:00'!\\\\ntranslations\\\\n\\\\t^self generics! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'accessing' stamp: 'mir 7/21/2004 17:03'!\\\\nuntranslated\\\\n\\\\t| translations |\\\\n\\\\ttranslations := self translations.\\\\n\\\\t^self class allKnownPhrases reject: [:each | translations includesKey: each]! !\\\\n\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'fileIn/fileOut' stamp: 'tak 11/16/2004 11:04'!\\\\nfileOutHeader\\\\n\\\\t^ '''Translation dictionary'''! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'fileIn/fileOut' stamp: 'tak 11/28/2004 14:50'!\\\\nfileOutHeaderOn: aStream \\\\n\\\\taStream nextChunkPut: self fileOutHeader;\\\\n\\\\t\\\\t cr.\\\\n\\\\taStream timeStamp; cr.\\\\n\\\\taStream nextPut: $!!.\\\\n\\\\taStream nextChunkPut: '(' , self class name , ' localeID: ' , id storeString , ')'.\\\\n\\\\taStream cr! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'fileIn/fileOut' stamp: 'yo 11/29/2005 11:19'!\\\\nfileOutOn: aStream \\\\n\\\\t\\\\\\\"self current fileOutOn: Transcript. Transcript endEntry\\\\\\\"\\\\n\\\\tself fileOutHeaderOn: aStream.\\\\n\\\\tself fileOutOn: aStream keys: nil! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'fileIn/fileOut' stamp: 'yo 11/29/2005 11:19'!\\\\nfileOutOn: aStream keys: keys \\\\n\\\\t\\\\\\\"self current fileOutOn: Transcript. Transcript endEntry\\\\\\\"\\\\n\\\\t(keys\\\\n\\\\t\\\\tifNil: [generics keys asSortedCollection])\\\\n\\\\t\\\\tdo: [:key | self\\\\n\\\\t\\\\t\\\\t\\\\tnextChunkPut: (generics associationAt: key)\\\\n\\\\t\\\\t\\\\t\\\\ton: aStream].\\\\n\\\\tkeys\\\\n\\\\t\\\\tifNil: [self untranslated\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:each | self nextChunkPut: each -> '' on: aStream]].\\\\n\\\\taStream nextPut: $!!;\\\\n\\\\t\\\\t cr! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'fileIn/fileOut' stamp: 'tak 11/16/2004 09:26'!\\\\nnextChunkPut: anObject on: aStream \\\\n\\\\t| i remainder terminator |\\\\n\\\\tterminator := $!!.\\\\n\\\\tremainder := anObject storeString.\\\\n\\\\t[(i := remainder indexOf: terminator) = 0]\\\\n\\\\t\\\\twhileFalse: [aStream\\\\n\\\\t\\\\t\\\\t\\\\tnextPutAll: (remainder copyFrom: 1 to: i).\\\\n\\\\t\\\\t\\\\taStream nextPut: terminator.\\\\n\\\\t\\\\t\\\\t\\\\\\\"double imbedded terminators\\\\\\\"\\\\n\\\\t\\\\t\\\\tremainder := remainder copyFrom: i + 1 to: remainder size].\\\\n\\\\taStream nextPutAll: remainder.\\\\n\\\\taStream nextPut: terminator; cr.! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'fileIn/fileOut' stamp: 'tak 12/15/2004 16:07'!\\\\nscanFrom: aStream \\\\n\\\\t\\\\\\\"Read a definition of dictionary.  \\\\n\\\\tMake sure current locale corresponds my locale id\\\\\\\"\\\\n\\\\t| aString newTranslations assoc currentPlatform |\\\\n\\\\tnewTranslations := Dictionary new.\\\\n\\\\tcurrentPlatform := Locale currentPlatform.\\\\n\\\\t[Locale\\\\n\\\\t\\\\tcurrentPlatform: (Locale localeID: id).\\\\n\\\\t[aString := aStream nextChunk withSqueakLineEndings.\\\\n\\\\taString size > 0]\\\\n\\\\t\\\\twhileTrue: [assoc := Compiler evaluate: aString.\\\\n\\\\t\\\\t\\\\tassoc value = ''\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self class registerPhrase: assoc key]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [newTranslations add: assoc]]]\\\\n\\\\t\\\\tensure: [Locale currentPlatform: currentPlatform].\\\\n\\\\tself mergeTranslations: newTranslations! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'fileIn/fileOut' stamp: 'yo 2/25/2005 09:37'!\\\\nwriteAsMimeString\\\\n\\\\n\\\\t| fileName fileStream tmpStream s2 gzs |\\\\n\\\\ttmpStream _ MultiByteBinaryOrTextStream on: ''.\\\\n\\\\ttmpStream converter: UTF8TextConverter new.\\\\n\\\\tself fileOutOn: tmpStream.\\\\n\\\\ts2 _ RWBinaryOrTextStream on: ''.\\\\n\\\\tgzs := GZipWriteStream on: s2.\\\\n\\\\ttmpStream reset.\\\\n\\\\tgzs nextPutAll: (tmpStream binary contentsOfEntireFile asString) contents.\\\\n\\\\tgzs close.\\\\n\\\\ts2 reset.\\\\n\\\\n\\\\tfileName _ id isoString, '.translation.gz.mime'.\\\\n\\\\tfileStream _ FileStream newFileNamed: fileName.\\\\n\\\\tfileStream nextPutAll: (Base64MimeConverter mimeEncode: s2) contents.\\\\n\\\\tfileStream close.\\\\n! !\\\\n\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'initialize-release' stamp: 'mir 7/15/2004 14:41'!\\\\nlocaleID: anID\\\\n\\\\tid := anID! !\\\\n\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'printing' stamp: 'nk 8/29/2004 10:51'!\\\\nprintOn: aStream\\\\n\\\\taStream nextPutAll: self class name; nextPut: $(; print: self localeID; nextPut: $)! !\\\\n\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'translation' stamp: 'mir 7/21/2004 18:02'!\\\\ncheckPhrase: phrase translation: translation! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'translation' stamp: 'yo 7/30/2004 13:03'!\\\\nphrase: phraseString translation: translationString \\\\n\\\\tself generics at: phraseString put: translationString asString.\\\\n\\\\tself changed: #translations.\\\\n\\\\tself changed: #untranslated.! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'translation' stamp: 'yo 8/2/2004 12:27'!\\\\nrawPhrase: phraseString translation: translationString \\\\n\\\\tself generics at: phraseString put: translationString asString.\\\\n! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'translation' stamp: 'yo 1/14/2005 16:25'!\\\\nrawRemoveUntranslated: untranslated\\\\n\\\\n\\\\tself class allKnownPhrases removeKey: untranslated ifAbsent: [].\\\\n\\\\tself changed: #untranslated.! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'translation' stamp: 'yo 8/1/2004 01:07'!\\\\nremoveTranslationFor: phraseString\\\\n\\\\tself generics removeKey: phraseString ifAbsent: [].\\\\n\\\\tself changed: #translations.\\\\n\\\\tself changed: #untranslated.! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'translation' stamp: 'yo 1/14/2005 16:25'!\\\\nremoveUntranslated: untranslated\\\\n\\\\n\\\\tself class allKnownPhrases removeKey: untranslated ifAbsent: [].\\\\n! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'translation' stamp: 'em 3/23/2005 12:08'!\\\\ntranslate: aString\\\\n\\\\t^self generics\\\\n\\\\t\\\\tat: aString\\\\n\\\\t\\\\tifAbsent: [self class registeredPhraseFor: aString. \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself changed: #untranslated. \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself localeID hasParent\\\\n\\\\t\\\\t\\\\tifTrue: [(self class localeID: self localeID parent) translate: aString]\\\\n\\\\t\\\\t\\\\tifFalse: [aString]]! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'translation' stamp: 'mir 6/30/2004 20:22'!\\\\ntranslate: aString in: aContext! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'translation' stamp: 'mir 7/15/2004 14:58'!\\\\ntranslationFor: aString\\\\n\\\\t^self translate: aString! !\\\\n\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'user interface' stamp: 'dgd 8/13/2004 21:54'!\\\\ndefaultBackgroundColor\\\\n\\\\t\\\\\\\"answer the receiver's defaultBackgroundColor for views\\\\\\\"\\\\n\\\\t^ Color cyan! !\\\\n\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'private' stamp: 'mir 6/30/2004 20:23'!\\\\ngenerics\\\\n\\\\t^generics ifNil: [generics := Dictionary new]! !\\\\n\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'private store-retrieve' stamp: 'yo 7/30/2004 13:00'!\\\\nloadFromFileNamed: fileNameString \\\\n\\\\t\\\\\\\"Load translations from an external file\\\\\\\"\\\\n\\\\n\\\\t| stream |\\\\n\\\\t[stream := FileStream readOnlyFileNamed: fileNameString.\\\\n\\\\tself loadFromStream: stream]\\\\n\\\\t\\\\tensure: [stream close].\\\\n\\\\tself changed: #translations.\\\\n\\\\tself changed: #untranslated.\\\\n! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'private store-retrieve' stamp: 'tak 11/16/2004 12:37'!\\\\nloadFromRefStream: stream \\\\n\\\\t\\\\\\\"Load translations from an external file\\\\\\\"\\\\n\\\\t| loadedArray refStream |\\\\n\\\\trefStream := ReferenceStream on: stream.\\\\n\\\\t[loadedArray := refStream next]\\\\n\\\\t\\\\tensure: [refStream close].\\\\n\\\\tself processExternalObject: loadedArray ! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'private store-retrieve' stamp: 'em 3/30/2005 14:32'!\\\\nloadFromStream: stream \\\\n\\\\t\\\\\\\"Load translations from an external file\\\\\\\"\\\\n\\\\t| header isFileIn |\\\\n\\\\theader := '''Translation dictionary'''.\\\\n\\\\tisFileIn := (stream next: header size)\\\\n\\\\t\\\\t\\\\t\\\\t= header.\\\\n\\\\tstream reset.\\\\n\\\\tisFileIn\\\\n\\\\t\\\\tifTrue: [stream fileInAnnouncing: 'Loading ' translated, stream localName]\\\\n\\\\t\\\\tifFalse: [self loadFromRefStream: stream]! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'private store-retrieve' stamp: 'yo 8/2/2004 12:27'!\\\\nmergeTranslations: newTranslations\\\\n\\\\t\\\\\\\"Merge a new set of translations into the exiting table.\\\\n\\\\tOverwrites existing entries.\\\\\\\"\\\\n\\\\n\\\\tnewTranslations keysAndValuesDo: [:key :value |\\\\n\\\\t\\\\tself rawPhrase: (self class registeredPhraseFor: key) translation: value].\\\\n\\\\tself changed: #translations.\\\\n\\\\tself changed: #untranslated.! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'private store-retrieve' stamp: 'mir 7/15/2004 20:04'!\\\\nprocessExternalObject: anArray \\\\n\\\\t\\\\\\\"pivate - process the external object\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"new format -> {translations. untranslated}\\\\\\\"\\\\n\\\\n\\\\tanArray second do: [:each | self class registerPhrase: each].\\\\n\\\\n\\\\tself mergeTranslations: anArray first! !\\\\n\\\\n!NaturalLanguageTranslator methodsFor: 'private store-retrieve' stamp: 'yo 2/17/2005 15:45'!\\\\nsaveToFileNamed: fileNameString \\\\n\\\\t\\\\\\\"save the receiver's translations to a file named fileNameString\\\\\\\"\\\\n\\\\t| stream |\\\\n\\\\t\\\\\\\"Set true if you need to save as binary\\\\\\\"\\\\n\\\\tfalse\\\\n\\\\t\\\\tifTrue: [stream := ReferenceStream fileNamed: fileNameString.\\\\n\\\\t\\\\t\\\\tstream nextPut: {self translations. self untranslated}.\\\\n\\\\t\\\\t\\\\tstream close.\\\\n\\\\t\\\\t\\\\t^ self].\\\\n\\\\tstream := FileStream fileNamed: fileNameString.\\\\n\\\\t[self fileOutOn: stream]\\\\n\\\\t\\\\tensure: [stream close]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nNaturalLanguageTranslator class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'accessing' stamp: 'dgd 8/24/2004 20:20'!\\\\navailableLanguageLocaleIDs\\\\n\\\\t\\\\\\\"Return the locale ids for the currently available languages.  \\\\n\\\\tMeaning those which either internally or externally have  \\\\n\\\\ttranslations available.\\\\\\\"\\\\n\\\\t\\\\\\\"NaturalLanguageTranslator availableLanguageLocaleIDs\\\\\\\"\\\\n\\\\t^ CachedTranslations values collect:[:each | each localeID]! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'accessing' stamp: 'dgd 8/24/2004 19:39'!\\\\ncurrent\\\\n\\\\t^ LocaleID current translator\\\\n\\\\n! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'accessing' stamp: 'nk 8/29/2004 14:23'!\\\\ndefault\\\\n\\\\t^self localeID: (LocaleID default)\\\\n! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'accessing' stamp: 'mir 7/15/2004 14:36'!\\\\nisoLanguage: isoLanguage\\\\n\\\\t\\\\\\\"Return the generic language translator as there is no information about the country code\\\\\\\"\\\\n\\\\n\\\\t^self isoLanguage: isoLanguage isoCountry: nil! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'accessing' stamp: 'mir 7/15/2004 14:36'!\\\\nisoLanguage: isoLanguage isoCountry: isoCountry\\\\n\\\\t^self localeID: (LocaleID  isoLanguage: isoLanguage isoCountry: isoCountry)! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'accessing' stamp: 'dgd 8/24/2004 19:18'!\\\\nlocaleID: localeID \\\\n\\\\t^ self cachedTranslations\\\\n\\\\t\\\\tat: localeID\\\\n\\\\t\\\\tifAbsentPut: [self new localeID: localeID]! !\\\\n\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'class initialization' stamp: 'mir 8/11/2004 13:38'!\\\\ninitialize\\\\n\\\\t\\\\\\\"NaturalLanguageTranslator initialize\\\\\\\"\\\\n\\\\n\\\\tFileList registerFileReader: self.\\\\n\\\\tSmalltalk addToStartUpList: NaturalLanguageTranslator after: FileDirectory.\\\\n! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'class initialization' stamp: 'mir 7/15/2004 19:48'!\\\\nresetCaches\\\\n\\\\t\\\\\\\"NaturalLanguageTranslator resetCaches\\\\\\\"\\\\n\\\\n\\\\tCachedTranslations := nil.\\\\n! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'class initialization' stamp: 'mir 8/31/2005 23:37'!\\\\nstartUp: resuming \\\\n\\\\t| defaultID |\\\\n\\\\tresuming\\\\n\\\\t\\\\tifFalse: [^ self].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tdefaultID := LocaleID current.\\\\n\\\\tself cachedTranslations\\\\n\\\\t\\\\tat: defaultID\\\\n\\\\t\\\\tifAbsent: [self localeID: defaultID].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tself loadAvailableExternalLocales! !\\\\n\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'file-services' stamp: 'mir 8/11/2004 10:52'!\\\\nfileReaderServicesForFile: fullName suffix: suffix \\\\n\\\\t\\\\\\\"Answer the file services associated with given file\\\\\\\"\\\\n\\\\t^ (suffix = self translationSuffix) | (suffix = '*')\\\\n\\\\t\\\\tifTrue: [{self serviceMergeLanguageTranslations}]\\\\n\\\\t\\\\tifFalse: [#()]! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'file-services' stamp: 'tak 3/14/2005 15:51'!\\\\nloadForLocaleIsoString: localeString fromGzippedMimeLiteral: mimeString \\\\n\\\\t\\\\\\\"merge the translation from the mime literal.\\\\\\\"\\\\n\\\\t| stream localeID translator gs rbStream s currentPlatform |\\\\n\\\\ts := Base64MimeConverter mimeDecodeToBytes: mimeString readStream.\\\\n\\\\ts reset.\\\\n\\\\tgs := GZipReadStream on: s.\\\\n\\\\trbStream := MultiByteBinaryOrTextStream with: gs contents asString.\\\\n\\\\trbStream converter: UTF8TextConverter new.\\\\n\\\\trbStream reset.\\\\n\\\\tlocaleID := LocaleID isoString: localeString.\\\\n\\\\tcurrentPlatform := Locale currentPlatform.\\\\n\\\\t[Locale\\\\n\\\\t\\\\tcurrentPlatform: (Locale localeID: localeID).\\\\n\\\\tstream := ReadStream on: rbStream contents]\\\\n\\\\t\\\\tensure: [Locale currentPlatform: currentPlatform].\\\\n\\\\ttranslator := self localeID: localeID.\\\\n\\\\ttranslator loadFromStream: stream.\\\\n\\\\tLanguageEnvironment resetKnownEnvironments! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'file-services' stamp: 'yo 2/24/2005 21:04'!\\\\nmergeTranslationFileNamed: fileFullNameString \\\\n\\\\t\\\\\\\"merge the translation in the file named fileFullNameString\\\\\\\"\\\\n\\\\n\\\\t| stream localeID translator |\\\\n\\\\tstream := FileStream readOnlyFileNamed: fileFullNameString.\\\\n\\\\t[localeID := LocaleID isoString: stream localName sansPeriodSuffix.\\\\n\\\\ttranslator := self localeID: localeID.\\\\n\\\\ttranslator loadFromStream: stream]\\\\n\\\\t\\\\tensure: [stream close].\\\\n\\\\tLanguageEnvironment resetKnownEnvironments.\\\\n\\\\n! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'file-services' stamp: 'mir 7/21/2004 13:45'!\\\\nserviceMergeLanguageTranslations\\\\n\\\\t\\\\\\\"Answer a service for merging of translation files\\\\\\\"\\\\n\\\\t^ SimpleServiceEntry\\\\n\\\\t\\\\tprovider: self\\\\n\\\\t\\\\tlabel: 'merge the translation file'\\\\n\\\\t\\\\tselector: #mergeTranslationFileNamed:\\\\n\\\\t\\\\tdescription: 'merge the translation file into the language named like the file'\\\\n\\\\t\\\\tbuttonLabel: 'merge'! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'file-services' stamp: 'mir 7/21/2004 13:45'!\\\\nservices\\\\n\\\\t\\\\\\\"Answer potential file services associated with this class\\\\\\\"\\\\n\\\\t^ {self serviceMergeLanguageTranslations}! !\\\\n\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'private' stamp: 'mir 7/15/2004 19:58'!\\\\nallKnownPhrases\\\\n\\\\t^AllKnownPhrases ifNil: [AllKnownPhrases := Dictionary new: 2051]! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'private' stamp: 'mir 7/13/2004 00:06'!\\\\ncachedTranslations\\\\n\\\\t\\\\\\\"CachedTranslations := nil\\\\\\\" \\\\n\\\\t^CachedTranslations ifNil: [CachedTranslations := Dictionary new]! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'private' stamp: 'mir 8/31/2005 16:55'!\\\\ncleanUpCache\\\\n\\\\t\\\\\\\"NaturalLanguageTranslator cleanUpCache\\\\\\\"\\\\n\\\\n\\\\tself cachedTranslations keys do: [:key |\\\\n\\\\t\\\\tkey isoLanguage size > 2 ifTrue: [self cachedTranslations removeKey: key]]! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'private' stamp: 'mir 7/15/2004 20:02'!\\\\nregisterPhrase: phrase\\\\n\\\\t\\\\\\\"Using a Dictionary so we can lookup existing string instead of creating needless copies when loading a translation.\\\\\\\"\\\\n\\\\tself allKnownPhrases at: phrase put: phrase! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'private' stamp: 'mir 7/21/2004 14:18'!\\\\nregisteredPhraseFor: phrase\\\\n\\\\t\\\\\\\"Using a Dictionary so we can lookup existing string instead of creating needless copies when loading a translation.\\\\\\\"\\\\n\\\\t^self allKnownPhrases at: phrase ifAbsentPut: [phrase]! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'private' stamp: 'mir 8/11/2004 10:52'!\\\\ntranslationSuffix\\\\n\\\\t^'translation'! !\\\\n\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'private loading' stamp: 'nk 8/21/2004 13:03'!\\\\ndirectoryForLanguage: isoLanguage country: isoCountry create: createDir\\\\n\\\\t\\\\\\\"Try to locate the <prefs>/locale/<language>{/<country>} folder.\\\\n\\\\tIf createDir is set, create the path down to country or language, depending on wether it's specified..\\\\n\\\\tReturn the directory for country or language depending on specification.\\\\n\\\\tIf neither exists, nil\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"NaturalLanguageTranslator directoryForLanguage: 'es' country: nil create: true\\\\\\\"\\\\n\\\\t\\\\\\\"NaturalLanguageTranslator directoryForLanguage: 'de' country: 'DE' create: true\\\\\\\"\\\\n\\\\t\\\\\\\"NaturalLanguageTranslator directoryForLanguage: 'en' country: 'US' create: false\\\\\\\"\\\\n\\\\t\\\\\\\"NaturalLanguageTranslator directoryForLanguage: 'en' country: nil create: true\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"If this fails, there is nothing we can do about it here\\\\\\\"\\\\n\\\\t| localeDir  countryDir languageDir |\\\\n\\\\tlocaleDir := self localeDirCreate: createDir.\\\\n\\\\tlocaleDir ifNil: [^nil].\\\\n\\\\n\\\\tisoCountry ifNil: [\\\\n\\\\t\\\\tlanguageDir := localeDir directoryNamed: isoLanguage.\\\\n\\\\t\\\\tcreateDir\\\\n\\\\t\\\\t\\\\tifTrue: [languageDir assureExistence].\\\\n\\\\t\\\\t^languageDir exists\\\\n\\\\t\\\\t\\\\tifTrue: [languageDir]\\\\n\\\\t\\\\t\\\\tifFalse: [nil]].\\\\n\\\\n\\\\tcountryDir := languageDir directoryNamed: isoCountry.\\\\n\\\\tcreateDir\\\\n\\\\t\\\\tifTrue: [countryDir assureExistence].\\\\n\\\\n\\\\t^countryDir exists\\\\n\\\\t\\\\tifTrue: [countryDir]\\\\n\\\\t\\\\tifFalse: [nil]! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'private loading' stamp: 'mir 8/11/2004 10:44'!\\\\ndirectoryForLocaleID: localeID create: createDir\\\\n\\\\t\\\\\\\"Try to locate the <prefs>/locale/<language>{/<country>} folder.\\\\n\\\\tIf createDir is set, create the path down to country or language, depending on locale.\\\\n\\\\tReturn the directory for country or language depending on locale.\\\\n\\\\tIf neither exists, nil\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"NaturalLanguageTranslator directoryForLanguage: 'de' country: nil readOnly: true\\\\\\\"\\\\n\\\\t\\\\\\\"NaturalLanguageTranslator directoryForLanguage: 'de' country: 'DE' readOnly: true\\\\\\\"\\\\n\\\\t\\\\\\\"NaturalLanguageTranslator directoryForLanguage: 'en' country: 'US' readOnly: false\\\\\\\"\\\\n\\\\t\\\\\\\"NaturalLanguageTranslator directoryForLanguage: 'en' country: nil readOnly: true\\\\\\\"\\\\n\\\\n\\\\t^self directoryForLanguage: localeID isoLanguage country: localeID isoCountry create: createDir! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'private loading' stamp: 'mir 8/25/2004 11:57'!\\\\nloadAvailableExternalLocales\\\\n\\\\t\\\\\\\"private - register locales IDs based on the content of the <prefs>/locale/ directory\\\\\\\"\\\\n\\\\t| localeDir |\\\\n\\\\tlocaleDir := self localeDirCreate: false.\\\\n\\\\tlocaleDir ifNil: [^ #()].\\\\n\\\\n\\\\tlocaleDir directoryNames\\\\n\\\\t\\\\tdo: [:langDirName | \\\\n\\\\t\\\\t\\\\t| langDir | \\\\n\\\\t\\\\t\\\\tlangDir := localeDir directoryNamed: langDirName.\\\\n\\\\n\\\\t\\\\t\\\\t(langDir fileNamesMatching: '*.' , self translationSuffix)\\\\n\\\\t\\\\t\\\\t\\\\tifNotEmpty: [self loadTranslatorForIsoLanguage: langDirName isoCountry: nil].\\\\n\\\\n\\\\t\\\\t\\\\tlangDir directoryNames\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:countryDirName | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t| countryDir | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcountryDir := langDirName directoryNamed: countryDirName.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(countryDir fileNamesMatching: '*.' , self translationSuffix)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifNotEmpty: [self loadTranslatorForIsoLanguage: langDirName isoCountry: countryDirName]\\\\n\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t].\\\\n! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'private loading' stamp: 'nk 8/21/2004 13:00'!\\\\nloadExternalTranslationsFor: translator\\\\n\\\\t\\\\\\\"Try to load translations from external external files.\\\\n\\\\tThe files are located in the <prefs>/locale/<language>{/<country>} folder.\\\\n\\\\tThere can be more than one file for each location, so applications can install their own partial translation tables. All files in the specific folder are loaded.\\\\\\\"\\\\n\\\\n\\\\t| translationDir |\\\\n\\\\ttranslationDir := self directoryForLocaleID: translator localeID create: false.\\\\n\\\\ttranslationDir ifNil: [ ^nil ]. \\\\n\\\\t(translationDir fileNamesMatching: '*.' , self translationSuffix)\\\\n\\\\t\\\\tdo: [:fileName | translator loadFromFileNamed: (translationDir fullNameFor: fileName)]! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'private loading' stamp: 'mir 8/25/2004 11:59'!\\\\nloadTranslatorForIsoLanguage: isoLanguage isoCountry: isoCountry \\\\n\\\\t\\\\\\\"private - load the translations from <prefs>/locale/ directory  \\\\n\\\\tthe procedure is to assure the existence of a translator for the  \\\\n\\\\tgiven language/country and then load the external translations for this translator\\\\\\\"\\\\n\\\\n\\\\t| translator |\\\\n\\\\ttranslator := self localeID: (LocaleID isoLanguage: isoLanguage isoCountry: isoCountry).\\\\n\\\\n\\\\tself loadExternalTranslationsFor: translator! !\\\\n\\\\n!NaturalLanguageTranslator class methodsFor: 'private loading' stamp: 'mir 8/25/2004 12:03'!\\\\nlocaleDirCreate: createDir\\\\n\\\\t\\\\\\\"Try to locate the <prefs>/locale/ folder.\\\\n\\\\tIf createDir is set, try to create the path.\\\\n\\\\tIf it doesn't exist, return nil\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"If this fails, there is nothing we can do about it here\\\\\\\"\\\\n\\\\t| prefDir  localeDir |\\\\n\\\\t(createDir not\\\\n\\\\t\\\\t\\\\tand: [ExternalSettings preferenceDirectory isNil])\\\\n\\\\t\\\\tifTrue: [^ nil].\\\\n\\\\n\\\\tprefDir := ExternalSettings assuredPreferenceDirectory.\\\\n\\\\tprefDir exists\\\\n\\\\t\\\\tifFalse: [^nil].\\\\n\\\\n\\\\n\\\\tlocaleDir := prefDir directoryNamed: 'locale'.\\\\n\\\\tcreateDir\\\\n\\\\t\\\\tifTrue: [localeDir assureExistence].\\\\n\\\\t^localeDir exists\\\\n\\\\t\\\\tifTrue: [localeDir]\\\\n\\\\t\\\\tifFalse: [nil]! !\\\\nObject subclass: #NebraskaClient\\\\n\\\\tinstanceVariableNames: 'connection encoder hand canvas'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Nebraska-Morphic-Remote'!\\\\n!NebraskaClient commentStamp: '<historical>' prior: 0!\\\\nA client that has connected to a Nebraska server, seen from the server's point of view.!\\\\n\\\\n\\\\n!NebraskaClient methodsFor: 'as yet unclassified' stamp: 'RAA 7/31/2000 23:59'!\\\\nbacklog\\\\n\\\\n\\\\t^connection backlog! !\\\\n\\\\n!NebraskaClient methodsFor: 'as yet unclassified' stamp: 'RAA 12/13/2000 08:30'!\\\\ncurrentStatusString\\\\n\\\\n\\\\t(connection isNil or: [connection isConnected not]) ifTrue: [^'nada'].\\\\n\\\\t^(NetNameResolver stringFromAddress: connection remoteAddress),\\\\n\\\\t\\\\t' - ',\\\\n\\\\t\\\\t(self backlog // 1024) printString,'k'! !\\\\n\\\\n\\\\n!NebraskaClient methodsFor: 'attributes' stamp: 'ls 3/25/2000 22:27'!\\\\ncanvas\\\\n\\\\t\\\\\\\"return the hand this canvas that should be drawn on for this client\\\\\\\"\\\\n\\\\t^canvas! !\\\\n\\\\n!NebraskaClient methodsFor: 'attributes' stamp: 'ls 3/25/2000 22:27'!\\\\nhand\\\\n\\\\t\\\\\\\"return the hand this client is controlling\\\\\\\"\\\\n\\\\t^hand! !\\\\n\\\\n\\\\n!NebraskaClient methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:25'!\\\\nconvertToBuffered\\\\n\\\\n\\\\tcanvas purgeOutputQueue.\\\\n\\\\tcanvas := canvas asBufferedCanvas.! !\\\\n\\\\n!NebraskaClient methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:25'!\\\\ndestroy\\\\n\\\\thand ifNotNil:[hand world ifNotNil:[hand world removeHand: hand]].\\\\n\\\\tconnection ifNotNil:[connection destroy].\\\\n\\\\tencoder := canvas := hand := connection := nil.! !\\\\n\\\\n!NebraskaClient methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:25'!\\\\ninitialize: aConnection\\\\n\\\\n\\\\t| remoteAddress userPicture |\\\\n\\\\n\\\\tconnection := aConnection.\\\\n\\\\thand := RemoteControlledHandMorph on: (MorphicEventDecoder on: aConnection).\\\\n\\\\thand nebraskaClient: self.\\\\n\\\\tremoteAddress := connection remoteAddress.\\\\n\\\\tremoteAddress ifNotNil: [remoteAddress := NetNameResolver stringFromAddress: remoteAddress].\\\\n\\\\tuserPicture := EToySenderMorph pictureForIPAddress: remoteAddress.\\\\n\\\\thand\\\\n\\\\t\\\\tuserInitials: ((EToySenderMorph nameForIPAddress: remoteAddress) ifNil: ['???'])\\\\n\\\\t\\\\tandPicture: (userPicture ifNotNil: [userPicture scaledToSize: 16@20]).\\\\n\\\\tencoder := CanvasEncoder on: aConnection.\\\\n\\\\tcanvas := RemoteCanvas\\\\n\\\\t\\\\tconnection: encoder\\\\n\\\\t\\\\tclipRect: NebraskaServer extremelyBigRectangle\\\\n\\\\t\\\\ttransform: MorphicTransform identity! !\\\\n\\\\n\\\\n!NebraskaClient methodsFor: 'network' stamp: 'ls 4/9/2000 14:43'!\\\\nextent: newExtent  depth: newDepth\\\\n\\\\tencoder extent: newExtent  depth: newDepth! !\\\\n\\\\n!NebraskaClient methodsFor: 'network' stamp: 'ls 3/25/2000 22:25'!\\\\nisConnected\\\\n\\\\t^connection isConnected! !\\\\n\\\\n!NebraskaClient methodsFor: 'network' stamp: 'ls 3/25/2000 22:25'!\\\\nprocessIO\\\\n\\\\tconnection processIO.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nNebraskaClient class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!NebraskaClient class methodsFor: 'instance creation' stamp: 'ls 3/25/2000 22:28'!\\\\nonConnection: aStringSocket\\\\n\\\\t^self new initialize: aStringSocket! !\\\\nObject subclass: #NebraskaDebug\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: 'DEBUG Details'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Nebraska-Morphic-Remote'!\\\\n!NebraskaDebug commentStamp: '<historical>' prior: 0!\\\\nBufferedCanvas enabled: false.\\\\nBufferedCanvas enabled: true.\\\\n\\\\nNebraskaDebug beginStats\\\\nNebraskaDebug showStats\\\\nNebraskaDebug stopAndShowAll\\\\nNebraskaDebug killStats\\\\nStringSocket showRatesSeen\\\\nStringSocket clearRatesSeen\\\\nNebraskaDebug showAndClearStats: #allStats\\\\nNebraskaDebug showAndClearStats: #queuedbufferSizes\\\\n\\\\n\\\\nCanvasEncoder beginStats\\\\nCanvasEncoder showStats\\\\nCanvasEncoder killStats\\\\nNebraskaDebug showStats: #peerBytesSent\\\\nNebraskaDebug showStats: #soundReductionTime\\\\nNebraskaDebug showStats: #FormEncodeTimes\\\\nNebraskaDebug showStats: #SendReceiveStats\\\\nNebraskaDebug showStats: #sendDeltas\\\\nNebraskaDebug showStats: #bigImage\\\\nNebraskaDebug showStats: #sketch\\\\nNebraskaDebug showStats: #addToOutBuf:\\\\n----\\\\nbuffered off, painting 125kb/s, dragging 400kb/s\\\\nbuffered on, painting 100kb/s, dragging 170kb/s!\\\\n]style[(62 142 14 78 17 3 73 415)f1cblue;,f1cblack;,f1,f1cblack;,f1cred;,f1cblack;,f1cblue;,f1cblack;!\\\\n\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nNebraskaDebug class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!NebraskaDebug class methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:26'!\\\\nat: queueName add: anArray\\\\n\\\\n\\\\t| now |\\\\n\\\\n\\\\tDEBUG ifNil: [\\\\n\\\\t\\\\tqueueName == #sketchZZZ ifFalse: [^self].\\\\n\\\\t\\\\t\\\\\\\"Details := OrderedCollection new.\\\\\\\"\\\\n\\\\t\\\\tself beginStats.\\\\n\\\\t].\\\\n\\\\t(Details notNil and: [Details size < 20]) ifTrue: [\\\\n\\\\t\\\\tDetails add: thisContext longStack\\\\n\\\\t].\\\\n\\\\tnow := Time millisecondClockValue.\\\\n\\\\tDEBUG add: {now},anArray,{queueName}.\\\\n! !\\\\n\\\\n!NebraskaDebug class methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:26'!\\\\nbeginStats\\\\n\\\\n\\\\tDEBUG := OrderedCollection new! !\\\\n\\\\n!NebraskaDebug class methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:26'!\\\\nkillStats\\\\n\\\\n\\\\tDEBUG := nil.\\\\n! !\\\\n\\\\n!NebraskaDebug class methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:26'!\\\\nshowAndClearStats: queueName\\\\n\\\\n\\\\tDEBUG ifNil: [^Beeper beep].\\\\n\\\\tself \\\\n\\\\t\\\\tshowStats: queueName \\\\n\\\\t\\\\tfrom: DEBUG.\\\\n\\\\tDEBUG := nil.! !\\\\n\\\\n!NebraskaDebug class methodsFor: 'as yet unclassified' stamp: 'nb 6/17/2003 12:25'!\\\\nshowStats\\\\n\\\\n\\\\tDEBUG ifNil: [^Beeper beep].\\\\n\\\\tDEBUG explore.! !\\\\n\\\\n!NebraskaDebug class methodsFor: 'as yet unclassified' stamp: 'nb 6/17/2003 12:25'!\\\\nshowStats: queueName\\\\n\\\\n\\\\tDEBUG ifNil: [^Beeper beep].\\\\n\\\\tself \\\\n\\\\t\\\\tshowStats: queueName \\\\n\\\\t\\\\tfrom: DEBUG.\\\\n! !\\\\n\\\\n!NebraskaDebug class methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:26'!\\\\nshowStats: queueName from: aCollection\\\\n\\\\n\\\\t| xx answer prevTime currTime |\\\\n\\\\n\\\\tprevTime := nil.\\\\n\\\\tanswer := String streamContents: [ :s | \\\\n\\\\t\\\\ts nextPutAll: (aCollection last first - aCollection first first) asStringWithCommas,' ms';cr;cr.\\\\n\\\\t\\\\taCollection withIndexDo: [ :each :index | \\\\n\\\\t\\\\t\\\\t(queueName == #allStats or: [queueName == each last]) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tcurrTime := each first.\\\\n\\\\t\\\\t\\\\t\\\\txx := currTime printString.\\\\n\\\\t\\\\t\\\\t\\\\tprevTime ifNil: [prevTime := currTime].\\\\n\\\\t\\\\t\\\\t\\\\ts nextPutAll: index printString,'.  ',\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(xx allButLast: 3),'.',(xx last: 3),' ',(currTime - prevTime) printString,' '.\\\\n\\\\t\\\\t\\\\t\\\\ts nextPutAll: each allButFirst printString; cr.\\\\n\\\\t\\\\t\\\\t\\\\tprevTime := currTime.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\tStringHolder new \\\\n\\\\t\\\\tcontents: answer;\\\\n\\\\t\\\\topenLabel: queueName! !\\\\n\\\\n!NebraskaDebug class methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:26'!\\\\nstopAndShowAll\\\\n\\\\n\\\\t| prev |\\\\n\\\\nself halt.\\\\t\\\\\\\"not updated to new format\\\\\\\"\\\\n\\\\n\\\\tprev := DEBUG.\\\\n\\\\tDEBUG := nil.\\\\n\\\\tprev ifNil: [^Beeper beep].\\\\n\\\\tprev keysAndValuesDo: [ :k :v |\\\\n\\\\t\\\\tself showStats: k from: v\\\\n\\\\t].! !\\\\nProjectNavigationMorph subclass: #NebraskaNavigationMorph\\\\n\\\\tinstanceVariableNames: 'nebraskaBorder nebraskaTerminal'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Nebraska-Morphic-Remote'!\\\\n\\\\n!NebraskaNavigationMorph methodsFor: 'as yet unclassified' stamp: 'RAA 12/13/2000 08:49'!\\\\naddButtons\\\\n\\\\n\\\\tself addARow: {\\\\n\\\\t\\\\tself inAColumn: {self buttonScale}.\\\\n\\\\t\\\\tself inAColumn: {self buttonQuit}.\\\\n\\\\t\\\\tself inAColumn: {self buttonBuffered}.\\\\n\\\\t}.\\\\n! !\\\\n\\\\n!NebraskaNavigationMorph methodsFor: 'as yet unclassified' stamp: 'RAA 12/13/2000 08:26'!\\\\nbufferNebraska\\\\n\\\\n\\\\tnebraskaTerminal requestBufferedConnection\\\\n! !\\\\n\\\\n!NebraskaNavigationMorph methodsFor: 'as yet unclassified' stamp: 'RAA 12/13/2000 08:23'!\\\\nbuttonBuffered\\\\n\\\\n\\\\t^self makeButton: 'B' balloonText: 'Request buffered Nebraska session' for: #bufferNebraska\\\\n! !\\\\n\\\\n!NebraskaNavigationMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/8/2000 11:34'!\\\\nbuttonScale\\\\n\\\\n\\\\t^self makeButton: '1x1' balloonText: 'Switch between 1x1 and scaled view' for: #toggleFullView\\\\n! !\\\\n\\\\n!NebraskaNavigationMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/8/2000 11:47'!\\\\ncurrentNavigatorVersion\\\\n\\\\n\\\\t^1\\\\t\\\\t\\\\\\\"not particularly relevant here\\\\\\\"! !\\\\n\\\\n!NebraskaNavigationMorph methodsFor: 'as yet unclassified' stamp: 'yo 11/4/2002 21:06'!\\\\nfontForButtons\\\\n\\\\n\\\\t^ TextStyle defaultFont.\\\\n\\\\t\\\\\\\"^Preferences standardButtonFont\\\\\\\"! !\\\\n\\\\n!NebraskaNavigationMorph methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:25'!\\\\nnebraskaBorder: aNebraskaBorder\\\\n\\\\n\\\\tnebraskaBorder := aNebraskaBorder! !\\\\n\\\\n!NebraskaNavigationMorph methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:25'!\\\\nnebraskaTerminal: aNebraskaTerminal\\\\n\\\\n\\\\tnebraskaTerminal := aNebraskaTerminal! !\\\\n\\\\n!NebraskaNavigationMorph methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:25'!\\\\npositionVertically\\\\n\\\\n\\\\t| w |\\\\n\\\\tw := self world ifNil: [^self].\\\\n\\\\tself top < w top ifTrue: [self top: w top].\\\\n\\\\tself bottom > w bottom ifTrue: [self bottom: w bottom].! !\\\\n\\\\n!NebraskaNavigationMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/8/2000 11:47'!\\\\nquitNebraska\\\\n\\\\n\\\\tnebraskaBorder ifNotNil: [nebraskaBorder delete].\\\\n\\\\tself delete.! !\\\\n\\\\n!NebraskaNavigationMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/8/2000 11:48'!\\\\ntoggleFullView\\\\n\\\\n\\\\tnebraskaBorder ifNotNil: [nebraskaBorder toggleFullView]! !\\\\n\\\\n\\\\n!NebraskaNavigationMorph methodsFor: 'dropping/grabbing' stamp: 'RAA 11/8/2000 11:42'!\\\\nwantsToBeDroppedInto: aMorph\\\\n\\\\n\\\\t\\\\\\\"avoid difficulties in placement\\\\\\\"\\\\n\\\\t^(aMorph isKindOf: NetworkTerminalMorph) not! !\\\\n\\\\n\\\\n!NebraskaNavigationMorph methodsFor: 'initialization' stamp: 'dgd 2/16/2003 14:11'!\\\\ndefaultColor\\\\n\\\\t\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color yellow ! !\\\\n\\\\n\\\\n!NebraskaNavigationMorph methodsFor: 'stepping and presenter' stamp: 'RAA 11/8/2000 11:37'!\\\\nstep\\\\n\\\\n\\\\tsuper step.\\\\n\\\\t(nebraskaBorder isNil or: [nebraskaBorder world isNil]) ifTrue: [self delete].! !\\\\n\\\\n\\\\n!NebraskaNavigationMorph methodsFor: 'the buttons' stamp: 'RAA 11/8/2000 11:36'!\\\\nbuttonQuit\\\\n\\\\n\\\\t^self makeButton: 'Quit' balloonText: 'Quit this Nebraska session' for: #quitNebraska\\\\n! !\\\\nModel subclass: #NebraskaServer\\\\n\\\\tinstanceVariableNames: 'worldDepth world clients listenQueue'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Nebraska-Morphic-Remote'!\\\\n!NebraskaServer commentStamp: '<historical>' prior: 0!\\\\nA Nebraska server has a private world and some collection of clients.  It associates a RemoteControlledHand for each client.  Redraw events in the world are broadcasted to all connected clients.  A Nebraska server can listen on a TCP/IP port and accept new clients. Current version has been modified so that the server serves the world in which it was launched. Other variations are certainly possible.\\\\n\\\\nTo start a server, execute the following code:\\\\n\\\\tNebraskaServerMorph serveWorld: World\\\\n\\\\nTo start a client, run the following in another image:\\\\n\\\\tNetworkTerminalMorph openAndConnectTo: 'servername'\\\\n\\\\nFill in your server's hostname for 'servername'. At this point, everything should be working!!\\\\n\\\\nBefore starting a server, you can tweak these:\\\\nBufferedCanvas enabled: false.\\\\nBufferedCanvas enabled: true.\\\\n\\\\nAt any time you can do these:\\\\nNebraskaDebug beginStats\\\\nNebraskaDebug showStats\\\\nNebraskaDebug showStats: #delays\\\\nNebraskaDebug showStats: #bigImage\\\\nNebraskaDebug showStats: #FormEncodeTimes\\\\nNebraskaDebug killStats\\\\n\\\\nNOTE: if you want to have a local view of the server, you shouldn't use the TCP connections. The problem is that the server will occasionally do a #flush, and it won't work due to single threading. The better solution is to use a LoopBackStringSocket instead of a regular StringSocket, but there is no handy method for that right now....\\\\n\\\\n\\\\n!\\\\n]style[(266 136 49 39 56 53 96 46 1 62 29 525)f1,f1cred;,f1,f1cblue;,f1,f1cblue;,f1,f1cblue;,f1,f1cred;,f1cblue;,f1!\\\\n\\\\n\\\\n!NebraskaServer methodsFor: 'accessing' stamp: 'ar 10/26/2000 14:23'!\\\\nclients\\\\n\\\\t^clients ifNil:[#()].! !\\\\n\\\\n\\\\n!NebraskaServer methodsFor: 'attributes' stamp: 'ls 4/11/2000 19:48'!\\\\nextent: newExtent  depth: newDepth\\\\n\\\\t\\\\\\\"modify the extent and/or depth of the shared world\\\\\\\"\\\\n\\\\tclients do: [ :client |\\\\n\\\\t\\\\tclient extent: newExtent depth: newDepth ].\\\\n\\\\tworld extent: newExtent.\\\\n\\\\n\\\\tworldDepth := newDepth.! !\\\\n\\\\n!NebraskaServer methodsFor: 'attributes' stamp: 'ls 4/11/2000 18:41'!\\\\nnumClients\\\\n\\\\t\\\\\\\"return the number of connected clients\\\\\\\"\\\\n\\\\t^clients size! !\\\\n\\\\n!NebraskaServer methodsFor: 'attributes' stamp: 'ls 3/25/2000 23:13'!\\\\nsharedWorld\\\\n\\\\t^world! !\\\\n\\\\n\\\\n!NebraskaServer methodsFor: 'initialization' stamp: 'ar 10/26/2000 14:02'!\\\\ndestroy\\\\n\\\\tself stopListening.\\\\n\\\\tclients do:[:each| each destroy].\\\\n\\\\tself breakDependents.! !\\\\n\\\\n!NebraskaServer methodsFor: 'initialization' stamp: 'ar 10/26/2000 14:20'!\\\\ninitialize\\\\n\\\\tclients := IdentitySet new.\\\\n\\\\tself extent: 800@600 depth: 16.! !\\\\n\\\\n!NebraskaServer methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:25'!\\\\ninitializeForWorld: aWorld\\\\n\\\\n\\\\tworld := aWorld.\\\\n\\\\tclients := IdentitySet new.\\\\n\\\\tself extent: world extent depth: Display depth.\\\\n\\\\taWorld remoteServer: self.! !\\\\n\\\\n\\\\n!NebraskaServer methodsFor: 'menus' stamp: 'RAA 7/31/2000 22:28'!\\\\nstep\\\\n\\\\n\\\\tself processIO.\\\\n\\\\n\\\\t\\\\\\\"savedWorld := Processor activeProcess world.\\\\n\\\\tProcessor activeProcess setWorld: world.\\\\\\\"\\\\n\\\\n\\\\tself flag: #bob.\\\\t\\\\t\\\\\\\"in this version, world is THE WORLD, so it steps itself\\\\\\\"\\\\n\\\\t\\\\\\\"world doOneCycle.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Processor activeProcess setWorld: savedWorld.\\\\\\\"\\\\n\\\\n\\\\tclients do: [ :each | each canvas apply: [ :ignore | ]].\\\\t\\\\\\\"for modes that need a little push\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!NebraskaServer methodsFor: 'networking' stamp: 'ls 3/25/2000 22:35'!\\\\nacceptNewConnections\\\\n\\\\t| connection |\\\\n\\\\tlistenQueue ifNil: [ ^self ].\\\\n\\\\t[ clients size > 20 ifTrue: [ \\\\\\\"too many connections!!\\\\\\\" ^self ].\\\\n\\\\t  connection := listenQueue getConnectionOrNil.  \\\\n\\\\t  connection isNil ] \\\\n\\\\twhileFalse: [\\\\n\\\\t  self addClientFromConnection: (StringSocket on: connection) ].! !\\\\n\\\\n!NebraskaServer methodsFor: 'networking' stamp: 'sd 11/20/2005 21:25'!\\\\nacceptNullConnection\\\\n\\\\n\\\\t| twins |\\\\n\\\\n\\\\ttwins := LoopbackStringSocket newPair.\\\\n\\\\tself addClientFromConnection: twins first.\\\\n\\\\t(NullTerminalMorph new connection: twins second) openInWorld.\\\\n! !\\\\n\\\\n!NebraskaServer methodsFor: 'networking' stamp: 'sd 11/20/2005 21:25'!\\\\nacceptPhonyConnection\\\\n\\\\n\\\\t| twins |\\\\n\\\\n\\\\ttwins := LoopbackStringSocket newPair.\\\\n\\\\tself addClientFromConnection: twins first.\\\\n\\\\t(NetworkTerminalMorph new connection: twins second) inspect \\\\\\\"openInWorld\\\\\\\".\\\\n! !\\\\n\\\\n!NebraskaServer methodsFor: 'networking' stamp: 'RAA 7/20/2000 10:03'!\\\\naddClientFromConnection: connection\\\\n\\\\t| client |\\\\n\\\\n\\\\tclient := NebraskaClient onConnection: connection.\\\\n\\\\tclients add: client.\\\\n\\\\tclient extent: world extent  depth: worldDepth.\\\\n\\\\tworld addRemoteClient: client.\\\\n\\\\tself changed: #numClients.! !\\\\n\\\\n!NebraskaServer methodsFor: 'networking' stamp: 'RAA 8/1/2000 00:01'!\\\\nbacklog\\\\n\\\\n\\\\t^clients inject: 0 into: [ :max :each | max max: each backlog]! !\\\\n\\\\n!NebraskaServer methodsFor: 'networking' stamp: 'ls 3/25/2000 22:36'!\\\\nprocessIO\\\\n\\\\tself pruneDeadConnections.\\\\n\\\\tself acceptNewConnections.! !\\\\n\\\\n!NebraskaServer methodsFor: 'networking' stamp: 'ar 10/26/2000 14:20'!\\\\npruneDeadConnections\\\\n\\\\t| deadConnections |\\\\n\\\\tdeadConnections := clients select: [ :client | client isConnected not ].\\\\n\\\\tdeadConnections do: [ :client |\\\\n\\\\t\\\\tworld removeRemoteClient: client].\\\\n\\\\n\\\\tdeadConnections isEmpty ifTrue:[ ^self ].\\\\n\\\\n\\\\tclients removeAll: deadConnections.\\\\n\\\\tself changed: #numClients.! !\\\\n\\\\n!NebraskaServer methodsFor: 'networking' stamp: 'ls 3/25/2000 22:31'!\\\\nstartListeningOnPort: portNumber\\\\n\\\\tSocket initializeNetwork.\\\\n\\\\tself stopListening.\\\\n\\\\tlistenQueue := ConnectionQueue portNumber: portNumber  queueLength: 5.! !\\\\n\\\\n!NebraskaServer methodsFor: 'networking' stamp: 'ls 3/25/2000 22:32'!\\\\nstopListening\\\\n\\\\tlistenQueue ifNil: [ ^self ].\\\\n\\\\tlistenQueue destroy.\\\\n\\\\tlistenQueue := nil.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nNebraskaServer class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!NebraskaServer class methodsFor: 'as yet unclassified' stamp: 'RAA 7/24/2000 12:06'!\\\\ndefaultPort\\\\n\\\\n\\\\t^9091! !\\\\n\\\\n!NebraskaServer class methodsFor: 'as yet unclassified' stamp: 'RAA 11/8/2000 14:59'!\\\\nextremelyBigRectangle\\\\n\\\\n\\\\t^(0@0 extent: 5000@5000)! !\\\\n\\\\n\\\\n!NebraskaServer class methodsFor: 'instance creation' stamp: 'mu 11/28/2003 19:38'!\\\\nnewForWorld: aWorld\\\\n\\\\n\\\\t^self basicNew initializeForWorld: aWorld! !\\\\n\\\\n!NebraskaServer class methodsFor: 'instance creation' stamp: 'ar 10/26/2000 14:00'!\\\\nserveWorld: aWorld\\\\n\\\\n\\\\t^self serveWorld: aWorld onPort: self defaultPort! !\\\\n\\\\n!NebraskaServer class methodsFor: 'instance creation' stamp: 'sd 11/20/2005 21:26'!\\\\nserveWorld: aWorld onPort: aPortNumber\\\\n\\\\n\\\\t| server |\\\\n\\\\n\\\\tUtilities authorName.\\\\t\\\\\\\"since we will need it later\\\\\\\"\\\\n\\\\n\\\\tserver := self newForWorld: aWorld.\\\\n\\\\tserver startListeningOnPort: aPortNumber.\\\\n\\\\t^server\\\\n\\\\t\\\\\\\"server acceptNullConnection\\\\\\\"\\\\t\\\\t\\\\\\\"server acceptPhonyConnection.\\\\\\\"\\\\n! !\\\\nAlignmentMorphBob1 subclass: #NebraskaServerMorph\\\\n\\\\tinstanceVariableNames: 'server slowCounter previousBacklog lastFullUpdateTime currentStatusString fullDisplay previousClients currentBacklogString'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Nebraska-Morphic-Remote'!\\\\n!NebraskaServerMorph commentStamp: '<historical>' prior: 0!\\\\nA cheezy morph that simply steps a Nebraska server instance over and over.!\\\\n\\\\n\\\\n!NebraskaServerMorph methodsFor: 'accessing' stamp: 'RAA 5/31/2001 15:03'!\\\\ncurrentBacklogString\\\\n\\\\n\\\\t^currentBacklogString! !\\\\n\\\\n!NebraskaServerMorph methodsFor: 'accessing' stamp: 'RAA 11/8/2000 16:07'!\\\\ncurrentStatusString\\\\n\\\\n\\\\t^currentStatusString! !\\\\n\\\\n!NebraskaServerMorph methodsFor: 'accessing' stamp: 'ar 10/26/2000 14:05'!\\\\nserver\\\\n\\\\t^self world remoteServer! !\\\\n\\\\n\\\\n!NebraskaServerMorph methodsFor: 'drawing' stamp: 'sd 11/20/2005 21:25'!\\\\nupdateCurrentStatusString\\\\n\\\\n\\\\tself server ifNil:[\\\\n\\\\t\\\\tcurrentStatusString := '<Nebraska not active>' translated.\\\\n\\\\t\\\\tcurrentBacklogString := ''.\\\\n\\\\t] ifNotNil:[\\\\n\\\\t\\\\tcurrentStatusString := \\\\n\\\\t\\\\t\\\\t' Nebraska: ' translated, \\\\n\\\\t\\\\t\\\\tself server numClients printString, \\\\n\\\\t\\\\t\\\\t' clients' translated.\\\\n\\\\t\\\\tcurrentBacklogString := 'backlog: ' translated,\\\\n\\\\t\\\\t\\\\t\\\\t((previousBacklog := self server backlog) // 1024) printString,'k'\\\\n\\\\t].\\\\n! !\\\\n\\\\n\\\\n!NebraskaServerMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:29'!\\\\ndefaultColor\\\\n\\\\t\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color white! !\\\\n\\\\n!NebraskaServerMorph methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:25'!\\\\ninitialize\\\\n\\\\t\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tfullDisplay := false.\\\\n\\\\t\\\\n\\\\tlastFullUpdateTime := 0.\\\\n\\\\tself listDirection: #topToBottom;\\\\n\\\\t\\\\t hResizing: #shrinkWrap;\\\\n\\\\t\\\\t vResizing: #shrinkWrap! !\\\\n\\\\n!NebraskaServerMorph methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:25'!\\\\nrebuild\\\\n\\\\n\\\\t| myServer toggle closeBox font |\\\\n\\\\n\\\\tfont := StrikeFont familyName: #Palatino size: 14.\\\\n\\\\tself removeAllMorphs.\\\\n\\\\tself setColorsAndBorder.\\\\n\\\\tself updateCurrentStatusString.\\\\n\\\\ttoggle := SimpleHierarchicalListMorph new perform: (\\\\n\\\\t\\\\tfullDisplay ifTrue: [#expandedForm] ifFalse: [#notExpandedForm]\\\\n\\\\t).\\\\n\\\\tcloseBox := SimpleButtonMorph new borderWidth: 0;\\\\n\\\\t\\\\t\\\\tlabel: 'X' font: Preferences standardButtonFont; color: Color transparent;\\\\n\\\\t\\\\t\\\\tactionSelector: #delete; target: self; extent: 14@14;\\\\n\\\\t\\\\t\\\\tsetBalloonText: 'End Nebrasks session'.\\\\n\\\\n\\\\tself addARow: {\\\\n\\\\t\\\\tself inAColumn: {closeBox}.\\\\n\\\\t\\\\tself inAColumn: {\\\\n\\\\t\\\\t\\\\tUpdatingStringMorph new\\\\n\\\\t\\\\t\\\\t\\\\tuseStringFormat;\\\\n\\\\t\\\\t\\\\t\\\\ttarget:  self;\\\\n\\\\t\\\\t\\\\t\\\\tfont: font;\\\\n\\\\t\\\\t\\\\t\\\\tgetSelector: #currentStatusString;\\\\n\\\\t\\\\t\\\\t\\\\tcontents: self currentStatusString;\\\\n\\\\t\\\\t\\\\t\\\\tstepTime: 2000;\\\\n\\\\t\\\\t\\\\t\\\\tlock.\\\\n\\\\t\\\\t}.\\\\n\\\\t\\\\tself inAColumn: {\\\\n\\\\t\\\\t\\\\ttoggle asMorph\\\\n\\\\t\\\\t\\\\t\\\\ton: #mouseUp send: #toggleFull to: self;\\\\n\\\\t\\\\t\\\\t\\\\tsetBalloonText: 'Show more or less of Nebraska Status'\\\\n\\\\t\\\\t}.\\\\n\\\\t}.\\\\n\\\\tmyServer := self server.\\\\n\\\\t(myServer isNil or: [fullDisplay not]) ifTrue: [\\\\n\\\\t\\\\t^World startSteppingSubmorphsOf: self\\\\n\\\\t].\\\\n\\\\t\\\\\\\"--- the expanded display ---\\\\\\\"\\\\n\\\\tself addARow: {\\\\n\\\\t\\\\tself inAColumn: {\\\\n\\\\t\\\\t\\\\tUpdatingStringMorph new\\\\n\\\\t\\\\t\\\\t\\\\tuseStringFormat;\\\\n\\\\t\\\\t\\\\t\\\\ttarget:  self;\\\\n\\\\t\\\\t\\\\t\\\\tfont: font;\\\\n\\\\t\\\\t\\\\t\\\\tgetSelector: #currentBacklogString;\\\\n\\\\t\\\\t\\\\t\\\\tcontents: self currentBacklogString;\\\\n\\\\t\\\\t\\\\t\\\\tstepTime: 2000;\\\\n\\\\t\\\\t\\\\t\\\\tlock.\\\\n\\\\t\\\\t}.\\\\n\\\\t}.\\\\n\\\\n\\\\tself addARow: {\\\\n\\\\t\\\\tself inAColumn: {\\\\n\\\\t\\\\t\\\\t(StringMorph contents: '--clients--' translated) lock; font: font.\\\\n\\\\t\\\\t}.\\\\n\\\\t}.\\\\n\\\\n\\\\tmyServer clients do: [ :each |\\\\n\\\\t\\\\tself addARow: {\\\\n\\\\t\\\\t\\\\tUpdatingStringMorph new\\\\n\\\\t\\\\t\\\\t\\\\tuseStringFormat;\\\\n\\\\t\\\\t\\\\t\\\\ttarget: each;\\\\n\\\\t\\\\t\\\\t\\\\tfont: font;\\\\n\\\\t\\\\t\\\\t\\\\tgetSelector: #currentStatusString;\\\\n\\\\t\\\\t\\\\t\\\\tcontents: each currentStatusString;\\\\n\\\\t\\\\t\\\\t\\\\tstepTime: 2000;\\\\n\\\\t\\\\t\\\\t\\\\tlock.\\\\n\\\\t\\\\t}\\\\n\\\\t].\\\\n\\\\tWorld startSteppingSubmorphsOf: self.! !\\\\n\\\\n!NebraskaServerMorph methodsFor: 'initialization' stamp: 'aoy 2/15/2003 21:35'!\\\\nsetColorsAndBorder\\\\n\\\\t| worldColor c |\\\\n\\\\tc := ((Preferences menuColorFromWorld and: [Display depth > 4]) \\\\n\\\\t\\\\t\\\\t\\\\tand: [(worldColor := self currentWorld color) isColor]) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[worldColor luminance > 0.7 \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [worldColor mixed: 0.8 with: Color black]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [worldColor mixed: 0.4 with: Color white]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [Preferences menuColor]. \\\\n\\\\tself color: c.\\\\n\\\\tself borderColor: #raised.\\\\n\\\\tself borderWidth: Preferences menuBorderWidth.\\\\n\\\\tself useRoundedCorners! !\\\\n\\\\n!NebraskaServerMorph methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:25'!\\\\ntoggleFull\\\\n\\\\n\\\\tfullDisplay := fullDisplay not.\\\\n\\\\tself rebuild.\\\\n! !\\\\n\\\\n\\\\n!NebraskaServerMorph methodsFor: 'stepping and presenter' stamp: 'sd 11/20/2005 21:25'!\\\\nstep\\\\n\\\\n\\\\t| now |\\\\n\\\\n\\\\tself server ifNil: [ ^self ].\\\\n\\\\tself server step.\\\\n\\\\tnow := Time millisecondClockValue.\\\\n\\\\t(now - lastFullUpdateTime) abs > 5000 ifTrue: [\\\\n\\\\t\\\\tlastFullUpdateTime := now.\\\\n\\\\t\\\\t(previousBacklog = self server backlog and: [self server clients = previousClients]) ifFalse: [\\\\n\\\\t\\\\t\\\\tpreviousClients := self server clients copy.\\\\n\\\\t\\\\t\\\\tself rebuild\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n! !\\\\n\\\\n\\\\n!NebraskaServerMorph methodsFor: 'submorphs-add/remove' stamp: 'ar 10/26/2000 14:07'!\\\\ndelete\\\\n\\\\tself server ifNotNil:[\\\\n\\\\t\\\\t(self confirm:'Shutdown the server?') \\\\n\\\\t\\\\t\\\\tifTrue:[self world remoteServer: nil]].\\\\n\\\\tsuper delete.! !\\\\n\\\\n\\\\n!NebraskaServerMorph methodsFor: 'testing' stamp: 'RAA 11/8/2000 15:57'!\\\\nstepTime\\\\n\\\\n\\\\t^10! !\\\\n\\\\n\\\\n!NebraskaServerMorph methodsFor: 'updating' stamp: 'RAA 11/8/2000 16:03'!\\\\nupdate: aSymbol\\\\n\\\\n\\\\tself rebuild.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nNebraskaServerMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!NebraskaServerMorph class methodsFor: 'as yet unclassified' stamp: 'RAA 8/15/2000 14:49'!\\\\nkillOldServers\\\\n\\\\n\\\\tNebraskaServerMorph allInstances do: [ :each |\\\\n\\\\t\\\\teach delete.\\\\n\\\\t].\\\\n\\\\tNebraskaServer allInstances do: [ :each |\\\\n\\\\t\\\\teach stopListening.\\\\n\\\\t\\\\tDependentsFields removeKey: each ifAbsent: [].\\\\n\\\\t].\\\\n! !\\\\n\\\\n!NebraskaServerMorph class methodsFor: 'as yet unclassified' stamp: 'yo 12/17/2005 23:06'!\\\\nserveWorld\\\\n\\\\n\\\\t^ self serveWorld: ActiveWorld.\\\\n! !\\\\n\\\\n!NebraskaServerMorph class methodsFor: 'as yet unclassified' stamp: 'yo 12/17/2005 23:07'!\\\\nserveWorldButton\\\\n\\\\n\\\\t| button |\\\\n\\\\tbutton _ ScriptableButton new.\\\\n\\\\tbutton target: NebraskaServerMorph.\\\\n\\\\tbutton actionSelector: #serveWorld.\\\\n\\\\tbutton arguments: #().\\\\n\\\\tbutton label: 'Share'.\\\\n\\\\tbutton color: Color yellow.\\\\n\\\\t^ button.\\\\n! !\\\\n\\\\n!NebraskaServerMorph class methodsFor: 'as yet unclassified' stamp: 'wiz 1/9/2005 15:12'!\\\\nserveWorld: aWorld\\\\n\\\\t\\\\\\\"Check to make sure things won't crash. See Mantis #0000519\\\\\\\"\\\\n\\\\taWorld isSafeToServe ifTrue:[\\\\n\\\\t\\\\t^self serveWorld: aWorld onPort: NebraskaServer defaultPort]\\\\n\\\\t! !\\\\n\\\\n!NebraskaServerMorph class methodsFor: 'as yet unclassified' stamp: 'ar 10/26/2000 14:05'!\\\\nserveWorld: aWorld onPort: aPortNumber\\\\n\\\\n\\\\t| server |\\\\n\\\\tserver := NebraskaServer serveWorld: aWorld onPort: aPortNumber.\\\\n\\\\t(self new) openInWorld: aWorld.\\\\n\\\\n\\\\t\\\\\\\"server acceptNullConnection\\\\\\\"\\\\t\\\\t\\\\\\\"server acceptPhonyConnection.\\\\\\\"\\\\n! !\\\\n\\\\n!NebraskaServerMorph class methodsFor: 'as yet unclassified' stamp: 'yo 12/17/2005 23:08'!\\\\nsupplementaryPartsDescriptions\\\\n\\\\t^ {DescriptionForPartsBin\\\\n\\\\t\\\\tformalName: 'NebraskaServer'\\\\n\\\\t\\\\tcategoryList: #('Collaborative')\\\\n\\\\t\\\\tdocumentation: 'A button to start the Nebraska desktop sharing server' translated\\\\n\\\\t\\\\tglobalReceiverSymbol: #NebraskaServerMorph\\\\n\\\\t\\\\tnativitySelector: #serveWorldButton\\\\n\\\\t}! !\\\\nObject subclass: #NetNameResolver\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: 'DefaultHostName HaveNetwork ResolverBusy ResolverError ResolverMutex ResolverReady ResolverSemaphore ResolverUninitialized'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Network-Kernel'!\\\\n!NetNameResolver commentStamp: '<historical>' prior: 0!\\\\nThis class implements TCP/IP style network name lookup and translation facilities.\\\\n\\\\nAttempt to keep track of whether there is a network available.\\\\nHaveNetwork\\\\ttrue if last attempt to contact the network was successful.\\\\nLastContact\\\\t\\\\tTime of that contact (totalSeconds).\\\\nhaveNetwork\\\\treturns true, false, or #expired.  True means there was contact in the last 30 minutes.  False means contact failed or was false last time we asked.  Get out of false state by making contact with a server in some way (FileList or updates).!\\\\n\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nNetNameResolver class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!NetNameResolver class methodsFor: 'address string utils' stamp: 'jm 9/15/97 06:19'!\\\\naddressFromString: addressString\\\\n\\\\t\\\\\\\"Return the internet address represented by the given string. The string should contain four positive decimal integers delimited by periods, commas, or spaces, where each integer represents one address byte. Return nil if the string is not a host address in an acceptable format.\\\\\\\"\\\\n\\\\t\\\\\\\"NetNameResolver addressFromString: '1.2.3.4'\\\\\\\"\\\\n\\\\t\\\\\\\"NetNameResolver addressFromString: '1,2,3,4'\\\\\\\"\\\\n\\\\t\\\\\\\"NetNameResolver addressFromString: '1 2 3 4'\\\\\\\"\\\\n\\\\n\\\\t| newAddr s byte delimiter |\\\\n\\\\tnewAddr _ ByteArray new: 4.\\\\n\\\\ts _ ReadStream on: addressString.\\\\n\\\\ts skipSeparators.\\\\n\\\\t1 to: 4 do: [:i |\\\\n\\\\t\\\\tbyte _ self readDecimalByteFrom: s.\\\\n\\\\t\\\\tbyte = nil ifTrue: [^ nil].\\\\n\\\\t\\\\tnewAddr at: i put: byte.\\\\n\\\\t\\\\ti < 4 ifTrue: [\\\\n\\\\t\\\\t\\\\tdelimiter _ s next.\\\\n\\\\t\\\\t\\\\t((delimiter = $.) or: [(delimiter = $,) or: [delimiter = $ ]])\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [^ nil]]].\\\\n\\\\t^ newAddr\\\\n! !\\\\n\\\\n!NetNameResolver class methodsFor: 'address string utils' stamp: 'jm 9/15/97 16:52'!\\\\nstringFromAddress: addr\\\\n\\\\t\\\\\\\"Return a string representing the given host address as four decimal bytes delimited with decimal points.\\\\\\\"\\\\n\\\\t\\\\\\\"NetNameResolver stringFromAddress: NetNameResolver localHostAddress\\\\\\\"\\\\n\\\\n\\\\t| s |\\\\n\\\\ts _ WriteStream on: ''.\\\\n\\\\t1 to: 3 do: [ :i | (addr at: i) printOn: s. s nextPut: $.].\\\\n\\\\t(addr at: 4) printOn: s.\\\\n\\\\t^ s contents\\\\n! !\\\\n\\\\n\\\\n!NetNameResolver class methodsFor: 'class initialization' stamp: 'jm 9/17/97 16:18'!\\\\ninitialize\\\\n\\\\t\\\\\\\"NetNameResolver initialize\\\\\\\"\\\\n\\\\t\\\\\\\"Note: On the Mac, the name resolver is asynchronous (i.e., Squeak can do other things while it is working), but can only handle one request at a time. On other platforms, such as Unix, the resolver is synchronous; a call to, say, the name lookup primitive will block all Squeak processes until it returns.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Resolver Status Values\\\\\\\"\\\\n\\\\tResolverUninitialized _ 0.\\\\t\\\\\\\"network is not initialized\\\\\\\"\\\\n\\\\tResolverReady _ 1.\\\\t\\\\t\\\\t\\\\\\\"resolver idle, last request succeeded\\\\\\\"\\\\n\\\\tResolverBusy _ 2.\\\\t\\\\t\\\\t\\\\\\\"lookup in progress\\\\\\\"\\\\n\\\\tResolverError _ 3.\\\\t\\\\t\\\\t\\\\\\\"resolver idle, last request failed\\\\\\\"\\\\n\\\\n\\\\tDefaultHostName _ ''.\\\\n! !\\\\n\\\\n\\\\n!NetNameResolver class methodsFor: 'lookups' stamp: 'ls 9/5/1998 01:14'!\\\\naddressForName: aString\\\\n\\\\t^self addressForName: aString timeout: 60! !\\\\n\\\\n!NetNameResolver class methodsFor: 'lookups' stamp: 'mu 9/7/2003 22:53'!\\\\naddressForName: hostName timeout: secs\\\\n\\\\t\\\\\\\"Look up the given host name and return its address. Return nil if the address is not found in the given number of seconds.\\\\\\\"\\\\n\\\\t\\\\\\\"NetNameResolver addressForName: 'create.ucsb.edu' timeout: 30\\\\\\\"\\\\n\\\\t\\\\\\\"NetNameResolver addressForName: '100000jobs.de' timeout: 30\\\\\\\"\\\\n\\\\t\\\\\\\"NetNameResolver addressForName: '1.7.6.4' timeout: 30\\\\\\\"\\\\n\\\\t\\\\\\\"NetNameResolver addressForName: '' timeout: 30 (This seems to return nil?)\\\\\\\"\\\\n\\\\n\\\\t| deadline result |\\\\n\\\\tself initializeNetwork.\\\\n\\\\t\\\\\\\"check if this is a valid numeric host address (e.g. 1.2.3.4)\\\\\\\"\\\\n\\\\tresult _ self addressFromString: hostName.\\\\n\\\\tresult isNil ifFalse: [^result].\\\\n\\\\n\\\\t\\\\\\\"Look up a host name, including ones that start with a digit (e.g. 100000jobs.de or squeak.org)\\\\\\\"\\\\n\\\\tdeadline _ Time millisecondClockValue + (secs * 1000).\\\\n\\\\t\\\\\\\"Protect the execution of this block, as the ResolverSemaphore is used for both parts of the transaction.\\\\\\\"\\\\n\\\\tself resolverMutex\\\\n\\\\t\\\\tcritical: [\\\\n\\\\t\\\\t\\\\t(self waitForResolverReadyUntil: deadline)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself primStartLookupOfName: hostName.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(self waitForCompletionUntil: deadline)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [result _ self primNameLookupResult]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [(NameLookupFailure hostName: hostName) signal: 'Could not resolve the server named: ', hostName]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [(NameLookupFailure hostName: hostName) signal: 'Could not resolve the server named: ', hostName]].\\\\n\\\\t^result! !\\\\n\\\\n!NetNameResolver class methodsFor: 'lookups' stamp: 'jm 9/15/97 16:52'!\\\\nlocalAddressString\\\\n\\\\t\\\\\\\"Return a string representing the local host address as four decimal bytes delimited with decimal points.\\\\\\\"\\\\n\\\\t\\\\\\\"NetNameResolver localAddressString\\\\\\\"\\\\n\\\\n\\\\t^ NetNameResolver stringFromAddress: NetNameResolver localHostAddress\\\\n! !\\\\n\\\\n!NetNameResolver class methodsFor: 'lookups' stamp: 'mir 2/22/2002 15:50'!\\\\nlocalHostAddress\\\\n\\\\t\\\\\\\"Return the local address of this host.\\\\\\\"\\\\n\\\\t\\\\\\\"NetNameResolver localHostAddress\\\\\\\"\\\\n\\\\n\\\\tself initializeNetwork.\\\\n\\\\t^ self primLocalAddress\\\\n! !\\\\n\\\\n!NetNameResolver class methodsFor: 'lookups' stamp: 'mir 2/22/2002 15:12'!\\\\nlocalHostName\\\\n\\\\t\\\\\\\"Return the local name of this host.\\\\\\\"\\\\n\\\\t\\\\\\\"NetNameResolver localHostName\\\\\\\"\\\\n\\\\n\\\\t| hostName |\\\\n\\\\thostName _ NetNameResolver\\\\n\\\\t\\\\tnameForAddress: self localHostAddress\\\\n\\\\t\\\\ttimeout: 5.\\\\n\\\\t^hostName\\\\n\\\\t\\\\tifNil: [self localAddressString]\\\\n\\\\t\\\\tifNotNil: [hostName]! !\\\\n\\\\n!NetNameResolver class methodsFor: 'lookups' stamp: 'nk 6/27/2003 10:51'!\\\\nnameForAddress: hostAddress timeout: secs\\\\n\\\\t\\\\\\\"Look up the given host address and return its name. Return nil if the lookup fails or is not completed in the given number of seconds. Depends on the given host address being known to the gateway, which may not be the case for dynamically allocated addresses.\\\\\\\"\\\\n\\\\t\\\\\\\"NetNameResolver\\\\n\\\\t\\\\tnameForAddress: (NetNameResolver addressFromString: '128.111.92.2')\\\\n\\\\t\\\\ttimeout: 30\\\\\\\"\\\\n\\\\n\\\\t| deadline result |\\\\n\\\\tself initializeNetwork.\\\\n\\\\tdeadline _ Time millisecondClockValue + (secs * 1000).\\\\n\\\\t\\\\\\\"Protect the execution of this block, as the ResolverSemaphore is used for both parts of the transaction.\\\\\\\"\\\\n\\\\tself resolverMutex\\\\n\\\\t\\\\tcritical: [\\\\n\\\\t\\\\t\\\\tresult _ (self waitForResolverReadyUntil: deadline)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself primStartLookupOfAddress: hostAddress.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(self waitForCompletionUntil: deadline)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self primAddressLookupResult]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [nil]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [nil]].\\\\n\\\\t^result\\\\n! !\\\\n\\\\n!NetNameResolver class methodsFor: 'lookups' stamp: 'jm 9/17/97 16:26'!\\\\npromptUserForHostAddress\\\\n\\\\t\\\\\\\"Ask the user for a host name and return its address.\\\\\\\"\\\\n\\\\t\\\\\\\"NetNameResolver promptUserForHostAddress\\\\\\\"\\\\n\\\\n\\\\t^ NetNameResolver promptUserForHostAddressDefault: ''\\\\n! !\\\\n\\\\n!NetNameResolver class methodsFor: 'lookups' stamp: 'rbb 3/1/2005 11:01'!\\\\npromptUserForHostAddressDefault: defaultName\\\\n\\\\t\\\\\\\"Ask the user for a host name and return its address. If the default name is the empty string, use the last host name as the default.\\\\\\\"\\\\n\\\\t\\\\\\\"NetNameResolver promptUserForHostAddressDefault: ''\\\\\\\"\\\\n\\\\n\\\\t| default hostName serverAddr |\\\\n\\\\tdefaultName isEmpty\\\\n\\\\t\\\\tifTrue: [default := DefaultHostName]\\\\n\\\\t\\\\tifFalse: [default := defaultName].\\\\n\\\\thostName := UIManager default\\\\n\\\\t\\\\trequest: 'Host name or address?'\\\\n\\\\t\\\\tinitialAnswer: default.\\\\n\\\\thostName isEmpty ifTrue: [^ 0].\\\\n\\\\tserverAddr := NetNameResolver addressForName: hostName timeout: 15.\\\\n\\\\thostName size > 0 ifTrue: [DefaultHostName := hostName].\\\\n\\\\t^ serverAddr! !\\\\n\\\\n!NetNameResolver class methodsFor: 'lookups' stamp: 'JMM 5/3/2000 11:25'!\\\\nresolverError\\\\n\\\\t^self primNameResolverError\\\\n! !\\\\n\\\\n!NetNameResolver class methodsFor: 'lookups' stamp: 'JMM 5/3/2000 11:25'!\\\\nresolverStatus\\\\n\\\\t^self primNameResolverStatus\\\\n! !\\\\n\\\\n\\\\n!NetNameResolver class methodsFor: 'network initialization' stamp: 'mir 2/22/2002 15:03'!\\\\ninitializeNetwork\\\\n\\\\t\\\\\\\"Initialize the network drivers and record the semaphore to be used by the resolver. Do nothing if the network is already initialized. Evaluate the given block if network initialization fails.\\\\\\\"\\\\n\\\\t\\\\\\\"NetNameResolver initializeNetwork\\\\\\\"\\\\n\\\\n\\\\t| semaIndex |\\\\n\\\\tself resolverStatus = ResolverUninitialized\\\\n\\\\t\\\\tifFalse: [^HaveNetwork _ true].  \\\\\\\"network is already initialized\\\\\\\"\\\\n\\\\n\\\\tHaveNetwork _ false.\\\\t\\\\\\\"in case abort\\\\\\\"\\\\n\\\\tResolverSemaphore _ Semaphore new.\\\\n\\\\tsemaIndex _ Smalltalk registerExternalObject: ResolverSemaphore.\\\\n\\\\n\\\\t\\\\\\\"result is nil if network initialization failed, self if it succeeds\\\\\\\"\\\\n\\\\t(self primInitializeNetwork: semaIndex)\\\\n\\\\t\\\\tifNil: [NoNetworkError signal: 'failed network initialization']\\\\n\\\\t\\\\tifNotNil: [HaveNetwork _ true].\\\\n! !\\\\n\\\\n!NetNameResolver class methodsFor: 'network initialization' stamp: 'ar 2/2/2001 15:09'!\\\\nprimInitializeNetwork: resolverSemaIndex\\\\n\\\\t\\\\\\\"Initialize the network drivers on platforms that need it, such as the Macintosh, and return nil if network initialization failed or the reciever if it succeeds. Since mobile computers may not always be connected to a network, this method should NOT be called automatically at startup time; rather, it should be called when first starting a networking application. It is a noop if the network driver has already been initialized. If non-zero, resolverSemaIndex is the index of a VM semaphore to be associated with the network name resolver. This semaphore will be signalled when the resolver status changes, such as when a name lookup query is completed.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: some platforms (e.g., Mac) only allow only one name lookup query at a time, so a manager process should be used to serialize resolver lookup requests.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveInitializeNetwork' module: 'SocketPlugin'>\\\\n\\\\t^ nil  \\\\\\\"return nil if primitive fails\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!NetNameResolver class methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimAbortLookup\\\\n\\\\t\\\\\\\"Abort the current lookup operation, freeing the name resolver for the next query.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveResolverAbortLookup' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!NetNameResolver class methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimAddressLookupResult\\\\n\\\\t\\\\\\\"Return the host name found by the last host address lookup. Returns nil if the last lookup was unsuccessful.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveResolverAddressLookupResult' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!NetNameResolver class methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimLocalAddress\\\\n\\\\t\\\\\\\"Return the local address of this host.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveResolverLocalAddress' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!NetNameResolver class methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimNameLookupResult\\\\n\\\\t\\\\\\\"Return the host address found by the last host name lookup. Returns nil if the last lookup was unsuccessful.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveResolverNameLookupResult' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!NetNameResolver class methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimNameResolverError\\\\n\\\\t\\\\\\\"Return an integer reflecting the error status of the last network name resolver request. Zero means no error.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveResolverError' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!NetNameResolver class methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimNameResolverStatus\\\\n\\\\t\\\\\\\"Return an integer reflecting the status of the network name resolver. For a list of possible values, see the comment in the 'initialize' method of this class.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveResolverStatus' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!NetNameResolver class methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimStartLookupOfAddress: hostAddr\\\\n\\\\t\\\\\\\"Look up the given host address in the Domain Name Server to find its name. This call is asynchronous. To get the results, wait for it to complete or time out and then use primAddressLookupResult.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveResolverStartAddressLookup' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!NetNameResolver class methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimStartLookupOfName: hostName\\\\n\\\\t\\\\\\\"Look up the given host name in the Domain Name Server to find its address. This call is asynchronous. To get the results, wait for it to complete or time out and then use primNameLookupResult.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveResolverStartNameLookup' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n\\\\n!NetNameResolver class methodsFor: 'private' stamp: 'JMM 5/3/2000 13:57'!\\\\nreadDecimalByteFrom: aStream\\\\n\\\\t\\\\\\\"Read a positive, decimal integer from the given stream. Stop when a non-digit or end-of-stream is encountered. Return nil if stream is not positioned at a decimal digit or if the integer value read exceeds 255.\\\\nJMM - 000503 fixed didn't work correctly\\\\\\\"\\\\n\\\\n\\\\t| digitSeen value digit |\\\\n\\\\tdigitSeen _ false.\\\\n\\\\tvalue _ 0.\\\\n\\\\t[aStream atEnd] whileFalse: \\\\n\\\\t\\\\t[digit _ aStream next digitValue.\\\\n\\\\t\\\\t(digit < 0 or: [digit > 9]) ifTrue: [\\\\n\\\\t\\\\t\\\\taStream skip: -1.\\\\n\\\\t\\\\t\\\\t(digitSeen not or: [value > 255]) ifTrue: [^ nil].\\\\n\\\\t\\\\t\\\\t^ value].\\\\n\\\\t\\\\tdigitSeen _ true.\\\\n\\\\t\\\\tvalue _ (value * 10) + digit].\\\\n\\\\t(digitSeen not or: [value > 255]) ifTrue: [^ nil].\\\\n\\\\t^ value\\\\n! !\\\\n\\\\n!NetNameResolver class methodsFor: 'private' stamp: 'mir 6/18/2001 21:05'!\\\\nresolverMutex\\\\n\\\\tResolverMutex ifNil: [ResolverMutex _ Semaphore forMutualExclusion].\\\\n\\\\t^ResolverMutex! !\\\\n\\\\n!NetNameResolver class methodsFor: 'private' stamp: 'JMM 5/3/2000 11:35'!\\\\nwaitForCompletionUntil: deadline\\\\n\\\\t\\\\\\\"Wait up to the given number of seconds for the resolver to be ready to accept a new request. Return true if the resolver is ready, false if the network is not initialized or the resolver does not become free within the given time period.\\\\\\\"\\\\n\\\\n\\\\t| status |\\\\n\\\\tstatus _ self resolverStatus.\\\\n\\\\t[(status = ResolverBusy) and:\\\\n\\\\t [Time millisecondClockValue < deadline]]\\\\n\\\\t\\\\twhileTrue: [\\\\n\\\\t\\\\t\\\\t\\\\\\\"wait for resolver to be available\\\\\\\"\\\\n\\\\t\\\\t\\\\tResolverSemaphore waitTimeoutMSecs: (deadline - Time millisecondClockValue).\\\\n\\\\t\\\\t\\\\tstatus _ self resolverStatus].\\\\n\\\\n\\\\tstatus = ResolverReady\\\\n\\\\t\\\\tifTrue: [^ true]\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\tstatus = ResolverBusy ifTrue: [self primAbortLookup].\\\\n\\\\t\\\\t\\\\t^ false].\\\\n! !\\\\n\\\\n!NetNameResolver class methodsFor: 'private' stamp: 'JMM 5/3/2000 11:36'!\\\\nwaitForResolverReadyUntil: deadline\\\\n\\\\t\\\\\\\"Wait up to the given number of seconds for the resolver to be ready to accept a new request. Return true if the resolver is not busy, false if the network is not initialized or the resolver does not become free within the given time period.\\\\\\\"\\\\n\\\\n\\\\t| status |\\\\n\\\\tstatus _ self resolverStatus.\\\\n\\\\tstatus = ResolverUninitialized ifTrue: [^ false].\\\\n\\\\n\\\\t[(status = ResolverBusy) and:\\\\n\\\\t [Time millisecondClockValue < deadline]]\\\\n\\\\t\\\\twhileTrue: [\\\\n\\\\t\\\\t\\\\t\\\\\\\"wait for resolver to be available\\\\\\\"\\\\n\\\\t\\\\t\\\\tResolverSemaphore waitTimeoutMSecs: (deadline - Time millisecondClockValue).\\\\n\\\\t\\\\t\\\\tstatus _ self resolverStatus].\\\\n\\\\n\\\\t^ status ~= ResolverBusy\\\\n! !\\\\nError subclass: #NetworkError\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Network-Kernel'!\\\\n!NetworkError commentStamp: 'mir 5/12/2003 18:12' prior: 0!\\\\nAbstract super class for all network related exceptions.!\\\\n\\\\nEmbeddedWorldBorderMorph subclass: #NetworkTerminalBorderMorph\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Nebraska-Morphic-Remote'!\\\\n\\\\n!NetworkTerminalBorderMorph methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:25'!\\\\ntoggleFullView\\\\n\\\\t\\\\\\\"Toggle the full view for network terminal\\\\\\\"\\\\n\\\\t| fullExtent priorExtent |\\\\n\\\\tfullExtent := self worldIEnclose extent + (2 * self borderWidth).\\\\n\\\\tpriorExtent := self valueOfProperty: #priorExtent.\\\\n\\\\tpriorExtent ifNil:[\\\\n\\\\t\\\\tself setProperty: #priorExtent toValue: self extent.\\\\n\\\\t\\\\tself extent: fullExtent.\\\\n\\\\t\\\\tself position: self position + self borderWidth asPoint negated.\\\\n\\\\t] ifNotNil:[\\\\n\\\\t\\\\tself removeProperty: #priorExtent.\\\\n\\\\t\\\\tself extent: priorExtent.\\\\n\\\\t\\\\tself position: (self position max: 0@0).\\\\n\\\\t].! !\\\\n\\\\n\\\\n!NetworkTerminalBorderMorph methodsFor: 'boxes' stamp: 'RAA 8/15/2000 12:21'!\\\\nboxesAndColorsAndSelectors\\\\n\\\\n\\\\t^#()! !\\\\n\\\\n\\\\n!NetworkTerminalBorderMorph methodsFor: 'initialization' stamp: 'RAA 12/14/2000 14:12'!\\\\ninitialize\\\\n\\\\n\\\\tsuper initialize.\\\\n\\\\tself setBalloonText: nil.\\\\t\\\\t\\\\\\\"'I am a view on another Squeak'.\\\\\\\"\\\\n\\\\tself layoutInset: 0.\\\\n! !\\\\nMorph subclass: #NetworkTerminalMorph\\\\n\\\\tinstanceVariableNames: 'connection decoder eventEncoder backgroundForm enteringHand'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Nebraska-Morphic-Remote'!\\\\n!NetworkTerminalMorph commentStamp: '<historical>' prior: 0!\\\\nA morph used to communicate with a remote image.  It sends all mouse/keyboard events to the remote side, and it displays canvas commands that are sent back.!\\\\n\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'as yet unclassified' stamp: 'RAA 8/29/2000 12:13'!\\\\naddScalingMenuItems: menu hand: aHandMorph\\\\n\\\\n\\\\t\\\\\\\"for comaptibility when in scaled frame\\\\\\\"! !\\\\n\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'drawing' stamp: 'RAA 7/25/2000 13:00'!\\\\nareasRemainingToFill: aRectangle\\\\n\\\\t\\\\\\\"I assume that we are opaque\\\\\\\"\\\\n\\\\n\\\\t^ aRectangle areasOutside: self bounds! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'drawing' stamp: 'RAA 7/24/2000 11:43'!\\\\ndrawOn: aCanvas\\\\n\\\\n\\\\tbackgroundForm ifNotNil: [\\\\n\\\\t\\\\taCanvas clipBy: bounds during: [ :c |\\\\n\\\\t\\\\t\\\\tc drawImage: backgroundForm at: bounds topLeft\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'drawing' stamp: 'sd 11/20/2005 21:25'!\\\\nforceToFront: aRegion\\\\n\\\\t| highQuality |\\\\n\\\\t\\\\\\\"force the given region from the drawing form onto the background form\\\\\\\"\\\\n\\\\n\\\\thighQuality := false.\\\\t\\\\t\\\\\\\"highQuality is slower\\\\\\\"\\\\n\\\\n\\\\tself updateBackgroundForm.\\\\n\\\\tbackgroundForm\\\\n\\\\t\\\\tcopy: aRegion\\\\n\\\\t\\\\tfrom: aRegion topLeft\\\\n\\\\t\\\\tin: decoder drawingForm\\\\n\\\\t\\\\trule: Form over.\\\\n\\\\tself invalidRect: (\\\\n\\\\t\\\\thighQuality ifTrue: [\\\\n\\\\t\\\\t\\\\tbounds\\\\n\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\t(aRegion expandBy: 4) translateBy: bounds topLeft\\\\t\\\\\\\"try to remove gribblys\\\\\\\"\\\\n\\\\t\\\\t]\\\\n\\\\t)\\\\n! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'drawing' stamp: 'sd 11/20/2005 21:26'!\\\\nupdateBackgroundForm\\\\n\\\\t\\\\\\\"make sure that our background form matches what the server has most recently requested\\\\\\\"\\\\n\\\\n\\\\t| drawingForm |\\\\n\\\\n\\\\tdrawingForm := decoder drawingForm.\\\\n\\\\t(drawingForm extent = backgroundForm extent and: [\\\\n\\\\t\\\\tdrawingForm depth = backgroundForm depth ]) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\\\\"they match just fine\\\\\\\"\\\\n\\\\t\\\\t\\\\t^self ].\\\\n\\\\n\\\\tbackgroundForm := drawingForm deepCopy.\\\\t\\\\t\\\\\\\"need copy to capture the moment\\\\\\\"\\\\n\\\\tself extent: backgroundForm extent.! !\\\\n\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'dropping/grabbing' stamp: 'RAA 11/5/2000 13:26'!\\\\nwantsDroppedMorph: aMorph event: evt\\\\n\\\\n\\\\t^true.! !\\\\n\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'event handling' stamp: 'RAA 11/5/2000 13:23'!\\\\ncommResult: anArrayOfAssociations\\\\n\\\\n\\\\t\\\\\\\"ignore for now\\\\\\\"! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'event handling' stamp: 'ar 10/26/2000 15:25'!\\\\nhandlesMouseOver: evt\\\\n\\\\t^true! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'event handling' stamp: 'ar 10/26/2000 15:24'!\\\\nmouseEnter: evt\\\\n\\\\tevt hand newKeyboardFocus: self.\\\\n\\\\tevt hand needsToBeDrawn ifTrue:[Cursor blank show].! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'event handling' stamp: 'ar 10/26/2000 15:25'!\\\\nmouseLeave: evt\\\\n\\\\n\\\\tevt hand needsToBeDrawn ifTrue:[Cursor normal show].! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'event handling' stamp: 'RAA 8/15/2000 11:34'!\\\\nsendEvent: evt\\\\n\\\\n\\\\tself sendEventAsIs: (evt translatedBy: bounds topLeft negated).! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'event handling' stamp: 'RAA 8/15/2000 11:33'!\\\\nsendEventAsIs: evt\\\\n\\\\n\\\\teventEncoder ifNil: [ ^self ].\\\\n\\\\teventEncoder sendEvent: evt.! !\\\\n\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'events-processing' stamp: 'ar 10/24/2000 18:02'!\\\\nhandleKeyDown: anEvent\\\\n\\\\tanEvent wasHandled ifTrue:[^self].\\\\n\\\\t(self handlesKeyboard: anEvent) ifFalse:[^self].\\\\n\\\\tanEvent wasHandled: true.\\\\n\\\\tself sendEventAsIs: anEvent.! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'events-processing' stamp: 'ar 10/24/2000 18:02'!\\\\nhandleKeyUp: anEvent\\\\n\\\\tanEvent wasHandled ifTrue:[^self].\\\\n\\\\t(self handlesKeyboard: anEvent) ifFalse:[^self].\\\\n\\\\tanEvent wasHandled: true.\\\\n\\\\tself sendEventAsIs: anEvent.! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'events-processing' stamp: 'ar 10/24/2000 18:11'!\\\\nhandleKeystroke: anEvent\\\\n\\\\tanEvent wasHandled ifTrue:[^self].\\\\n\\\\tanEvent wasHandled: true.\\\\n\\\\tself sendEventAsIs: anEvent.! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'events-processing' stamp: 'ar 10/24/2000 18:03'!\\\\nhandleMouseDown: anEvent\\\\n\\\\tanEvent wasHandled ifTrue:[^self].\\\\n\\\\tanEvent hand removePendingBalloonFor: self.\\\\n\\\\tanEvent hand removePendingHaloFor: self.\\\\n\\\\tanEvent wasHandled: true.\\\\n\\\\tanEvent hand newMouseFocus: self event: anEvent.\\\\n\\\\tanEvent hand removeHaloFromClick: anEvent on: self.\\\\n\\\\tself sendEventAsIs: anEvent.! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'events-processing' stamp: 'ar 10/24/2000 18:04'!\\\\nhandleMouseMove: anEvent\\\\n\\\\tanEvent wasHandled ifTrue:[^self]. \\\\\\\"not interested\\\\\\\"\\\\n\\\\t(anEvent hand hasSubmorphs) ifTrue:[^self].\\\\n\\\\t(anEvent anyButtonPressed and:[anEvent hand mouseFocus ~~ self]) ifTrue:[^self].\\\\n\\\\tanEvent wasHandled: true.\\\\n\\\\tself sendEventAsIs: anEvent.! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'events-processing' stamp: 'ar 10/24/2000 18:03'!\\\\nhandleMouseUp: anEvent\\\\n\\\\tanEvent wasHandled ifTrue:[^self]. \\\\\\\"not interested\\\\\\\"\\\\n\\\\tanEvent hand mouseFocus == self ifFalse:[^self]. \\\\\\\"Not interested in other parties\\\\\\\"\\\\n\\\\tanEvent hand releaseMouseFocus: self.\\\\n\\\\tanEvent wasHandled: true.\\\\n\\\\tself sendEventAsIs: anEvent.! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'events-processing' stamp: 'ar 10/24/2000 18:06'!\\\\nhandlerForMouseDown: anEvent\\\\n\\\\t^self! !\\\\n\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'geometry' stamp: 'RAA 7/24/2000 11:35'!\\\\nextent: newExtent\\\\n\\\\n\\\\tsuper extent: newExtent.\\\\n\\\\teventEncoder sendViewExtent: self extent! !\\\\n\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'initialization' stamp: 'RAA 8/15/2000 12:06'!\\\\nconnection: aConnection\\\\n\\\\n\\\\tconnection := aConnection.\\\\n\\\\tdecoder := CanvasDecoder connection: aConnection.\\\\n\\\\teventEncoder := MorphicEventEncoder on: aConnection.! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:26'!\\\\ninitialize\\\\n\\\\tsuper initialize.\\\\n\\\\tbackgroundForm := (\\\\n\\\\t\\\\t(StringMorph contents: '......' font: (TextStyle default fontOfSize: 24))\\\\n\\\\t\\\\t\\\\tcolor: Color white\\\\n\\\\t) imageForm.\\\\n\\\\tbounds := backgroundForm boundingBox.\\\\n! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'initialization' stamp: 'RAA 8/15/2000 10:45'!\\\\nopenInStyle: aSymbol\\\\n\\\\n\\\\taSymbol == #naked ifTrue: [\\\\n\\\\t\\\\tself openInWorld.\\\\n\\\\t].\\\\n\\\\taSymbol == #scaled ifTrue: [\\\\n\\\\t\\\\tself openScaled.\\\\n\\\\t].\\\\n\\\\taSymbol == #bordered ifTrue: [\\\\n\\\\t\\\\tAlignmentMorph newColumn\\\\n\\\\t\\\\t\\\\thResizing: \\\\t#shrinkWrap;\\\\n\\\\t\\\\t\\\\tvResizing: \\\\t#shrinkWrap;\\\\n\\\\t\\\\t\\\\tborderWidth: 8;\\\\n\\\\t\\\\t\\\\tborderColor: Color blue;\\\\n\\\\t\\\\t\\\\taddMorph: self;\\\\n\\\\t\\\\t\\\\topenInWorld.\\\\n\\\\t].\\\\n\\\\n\\\\t[\\\\n\\\\t\\\\t[self world isNil] whileFalse: [(Delay forSeconds: 2) wait].\\\\n\\\\t\\\\tself disconnect.\\\\n\\\\t] fork.\\\\n\\\\n! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:26'!\\\\nopenScaled\\\\n\\\\n\\\\t| window tm |\\\\n\\\\twindow := NetworkTerminalBorderMorph new\\\\n\\\\t\\\\tminWidth: 100;\\\\n\\\\t\\\\tminHeight: 100;\\\\n\\\\t\\\\tborderWidth: 8;\\\\n\\\\t\\\\tborderColor: Color orange;\\\\n\\\\t\\\\tbounds: (0@0 extent: Display extent * 3 // 4).\\\\n\\\\ttm := BOBTransformationMorph new.\\\\n\\\\ttm useRegularWarpBlt: true.\\\\t\\\\t\\\\\\\"try to reduce memory used\\\\\\\"\\\\n\\\\twindow addMorphBack: tm.\\\\n\\\\ttm addMorph: self.\\\\n\\\\twindow openInWorld.\\\\n\\\\tNebraskaNavigationMorph new \\\\n\\\\t\\\\tnebraskaBorder: window;\\\\n\\\\t\\\\tnebraskaTerminal: self;\\\\n\\\\t\\\\topenInWorld.! !\\\\n\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'layout' stamp: 'sd 11/20/2005 21:25'!\\\\nacceptDroppingMorph: morphToDrop event: evt\\\\n\\\\n\\\\t| myCopy outData null |\\\\n\\\\n\\\\t(morphToDrop isKindOf: NewHandleMorph) ifTrue: [\\\\t\\\\t\\\\t\\\\\\\"don't send these\\\\\\\"\\\\n\\\\t\\\\t^morphToDrop rejectDropMorphEvent: evt.\\\\n\\\\t].\\\\n\\\\tself eToyRejectDropMorph: morphToDrop event: evt.\\\\t\\\\t\\\\\\\"we don't really want it\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"7 mar 2001 - remove #veryDeepCopy\\\\\\\"\\\\n\\\\tmyCopy := morphToDrop.\\\\t\\\\\\\"gradient fills require doing this second\\\\\\\"\\\\n\\\\tmyCopy setProperty: #positionInOriginatingWorld toValue: morphToDrop position.\\\\n\\\\n\\\\toutData := myCopy eToyStreamedRepresentationNotifying: nil.\\\\n\\\\tnull := String with: 0 asCharacter.\\\\n\\\\tEToyPeerToPeer new \\\\n\\\\t\\\\tsendSomeData: {\\\\n\\\\t\\\\t\\\\tEToyIncomingMessage typeMorph,null. \\\\n\\\\t\\\\t\\\\tPreferences defaultAuthorName,null.\\\\n\\\\t\\\\t\\\\toutData\\\\n\\\\t\\\\t}\\\\n\\\\t\\\\tto: (NetNameResolver stringFromAddress: connection remoteAddress)\\\\n\\\\t\\\\tfor: self.\\\\n! !\\\\n\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'shutting down' stamp: 'ls 4/11/2000 18:36'!\\\\ndisconnect\\\\n\\\\tconnection ifNotNil: [ connection destroy ].\\\\n\\\\teventEncoder := connection := decoder := nil.! !\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'shutting down' stamp: 'RAA 12/13/2000 08:21'!\\\\nrequestBufferedConnection\\\\n\\\\n\\\\teventEncoder ifNotNil: [eventEncoder requestBufferedConnection].\\\\n! !\\\\n\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'stepping and presenter' stamp: 'ar 10/25/2000 23:19'!\\\\nstep\\\\n\\\\n\\\\tdecoder ifNil: [ ^self ].\\\\n\\\\tdecoder processIOOnForce: [ :rectangle | self forceToFront: rectangle ].! !\\\\n\\\\n\\\\n!NetworkTerminalMorph methodsFor: 'testing' stamp: 'ls 3/25/2000 16:58'!\\\\nstepTime\\\\n\\\\t^10! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nNetworkTerminalMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!NetworkTerminalMorph class methodsFor: 'instance creation' stamp: 'RAA 8/4/2000 15:13'!\\\\nconnectTo: serverHost\\\\n\\\\n\\\\t^self connectTo: serverHost port: NebraskaServer defaultPort\\\\n\\\\n! !\\\\n\\\\n!NetworkTerminalMorph class methodsFor: 'instance creation' stamp: 'sd 11/20/2005 21:26'!\\\\nconnectTo: serverHost port: serverPort\\\\n\\\\n\\\\t| stringSock |\\\\n\\\\n\\\\tstringSock := self socketConnectedTo: serverHost port: serverPort.\\\\n\\\\t^self new connection: stringSock\\\\n! !\\\\n\\\\n!NetworkTerminalMorph class methodsFor: 'instance creation' stamp: 'RAA 7/24/2000 12:08'!\\\\nopenAndConnectTo: serverHost\\\\n\\\\n\\\\t^self openAndConnectTo: serverHost port: NebraskaServer defaultPort\\\\n\\\\n! !\\\\n\\\\n!NetworkTerminalMorph class methodsFor: 'instance creation' stamp: 'sd 11/20/2005 21:26'!\\\\nopenAndConnectTo: serverHost port: serverPort\\\\n\\\\n\\\\t| stringSock me |\\\\n\\\\n\\\\tstringSock := self socketConnectedTo: serverHost port: serverPort.\\\\n\\\\tme := self new connection: stringSock.\\\\n\\\\t^me openInStyle: #naked\\\\n! !\\\\n\\\\n!NetworkTerminalMorph class methodsFor: 'instance creation' stamp: 'sd 11/20/2005 21:26'!\\\\nsocketConnectedTo: serverHost  port: serverPort\\\\n\\\\n\\\\t| sock |\\\\n\\\\n\\\\tSocket initializeNetwork.\\\\n\\\\tsock := Socket new.\\\\n\\\\t[sock connectTo: (NetNameResolver addressForName: serverHost) port: serverPort]\\\\n\\\\t\\\\ton: ConnectionTimedOut\\\\n\\\\t\\\\tdo: [:ex | self error: 'could not connect to server' ].\\\\n\\\\t^StringSocket on: sock\\\\n\\\\n! !\\\\nHandleMorph subclass: #NewHandleMorph\\\\n\\\\tinstanceVariableNames: 'hand offset waitingForClickInside'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Widgets'!\\\\n\\\\n!NewHandleMorph methodsFor: 'all' stamp: 'di 5/18/1998 15:27'!\\\\nfollowHand: aHand forEachPointDo: block1 lastPointDo: block2\\\\n\\\\thand _ aHand.\\\\n\\\\tpointBlock _ block1.\\\\n\\\\tlastPointBlock _ block2.\\\\n\\\\tself position: hand lastEvent cursorPoint - (self extent // 2)! !\\\\n\\\\n!NewHandleMorph methodsFor: 'all' stamp: 'ar 8/16/2001 15:48'!\\\\nfollowHand: aHand forEachPointDo: block1 lastPointDo: block2 withCursor: aCursor\\\\n\\\\thand _ aHand.\\\\n\\\\thand showTemporaryCursor: aCursor \\\\\\\"hotSpotOffset: aCursor offset negated\\\\\\\".\\\\n\\\\tborderWidth _ 0.\\\\n\\\\tcolor _ Color transparent.\\\\n\\\\tpointBlock _ block1.\\\\n\\\\tlastPointBlock _ block2.\\\\n\\\\tself position: hand lastEvent cursorPoint - (self extent // 2)! !\\\\n\\\\n!NewHandleMorph methodsFor: 'all' stamp: 'RAA 4/19/2001 11:36'!\\\\nsensorMode\\\\n\\\\n\\\\t\\\\\\\"If our client is still addressing the Sensor directly, we need to do so as well\\\\\\\"\\\\n\\\\t^self valueOfProperty: #sensorMode ifAbsent: [false].\\\\n! !\\\\n\\\\n!NewHandleMorph methodsFor: 'all' stamp: 'RAA 4/19/2001 11:36'!\\\\nsensorMode: aBoolean\\\\n\\\\n\\\\t\\\\\\\"If our client is still addressing the Sensor directly, we need to do so as well\\\\\\\"\\\\n\\\\tself setProperty: #sensorMode toValue: aBoolean.\\\\n! !\\\\n\\\\n\\\\n!NewHandleMorph methodsFor: 'dropping/grabbing' stamp: 'di 4/30/1999 14:06'!\\\\njustDroppedInto: aMorph event: anEvent\\\\n\\\\t\\\\\\\"No dropping behavior because stepping will delete me.\\\\n\\\\tMoreover it needs to be done that way to evaluate lastPointBlock\\\\\\\"\\\\n! !\\\\n\\\\n!NewHandleMorph methodsFor: 'dropping/grabbing' stamp: 'ar 10/5/2000 18:16'!\\\\nundoGrabCommand\\\\n\\\\t^nil! !\\\\n\\\\n\\\\n!NewHandleMorph methodsFor: 'initialization' stamp: 'dgd 3/7/2003 14:29'!\\\\ninitialize\\\\n\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\n\\\\tsuper initialize.\\\\n\\\\\\\"\\\\\\\"\\\\n\\\\twaitingForClickInside _ true.\\\\n\\\\tPreferences noviceMode\\\\n\\\\t\\\\tifTrue: [self setBalloonText: 'stretch']! !\\\\n\\\\n\\\\n!NewHandleMorph methodsFor: 'stepping and presenter' stamp: 'RAA 4/19/2001 11:37'!\\\\nstep\\\\n\\\\t| eventSource |\\\\n\\\\n\\\\teventSource _ self sensorMode ifTrue: [\\\\n\\\\t\\\\tSensor\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\thand lastEvent\\\\n\\\\t].\\\\n\\\\teventSource anyButtonPressed\\\\n\\\\t\\\\tifTrue: [waitingForClickInside _ false.\\\\n\\\\t\\\\t\\\\t\\\\tself position: eventSource cursorPoint - (self extent // 2).\\\\n\\\\t\\\\t\\\\t\\\\tpointBlock value: self center]\\\\n\\\\t\\\\tifFalse: [waitingForClickInside\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [(self containsPoint: eventSource cursorPoint)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\\\\"mouse wandered out before clicked\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^ self delete]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [lastPointBlock value: self center.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^ self delete]]! !\\\\n\\\\n\\\\n!NewHandleMorph methodsFor: 'submorphs-add/remove' stamp: 'ar 8/16/2001 15:38'!\\\\ndelete\\\\n\\\\thand ifNotNil:[\\\\n\\\\t\\\\thand showTemporaryCursor: nil.\\\\n\\\\t].\\\\n\\\\tsuper delete.! !\\\\n\\\\n\\\\n!NewHandleMorph methodsFor: 'WiW support' stamp: 'RAA 1/10/2001 10:15'!\\\\nmorphicLayerNumber\\\\n\\\\n\\\\t^1\\\\t\\\\t\\\\\\\"handles are very front-like - e.g. the spawn reframe logic actually asks if the first submorph of the world is one of us before deciding to create one\\\\\\\"! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nNewHandleMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!NewHandleMorph class methodsFor: 'new-morph participation' stamp: 'di 5/3/1998 10:08'!\\\\nincludeInNewMorphMenu\\\\n\\\\t^ false! !\\\\nObject subclass: #NewParagraph\\\\n\\\\tinstanceVariableNames: 'text textStyle firstCharacterIndex container lines positionWhenComposed offsetToEnd maxRightX selectionStart selectionStop wantsColumnBreaks focused'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Text Support'!\\\\n!NewParagraph commentStamp: '<historical>' prior: 0!\\\\nA Paragraph represents text that has been laid out, or composed, in some container.\\\\n\\\\ttext \\\\t\\\\tA Text with encoded per-character emphasis.\\\\n\\\\ttextStyle\\\\tA TextStyle with font set, line height and horizontal alignment.\\\\n\\\\tfirstCharacterIndex    The starting index in text for this paragraph, allowing\\\\n\\\\t\\\\t\\\\t\\\\tcomposition of a long text into a number of containers.\\\\n\\\\tcontainer\\\\tA Rectangle or TextContainer that determines where text can go.\\\\n\\\\tlines\\\\t\\\\tAn Array of TextLines comprising the final layout of the text\\\\n\\\\t\\\\t\\\\t\\\\tafter it has been composed within its container.\\\\n\\\\tpositionWhenComposed   As its name implies.  Allows display at new locations\\\\n\\\\t\\\\t\\\\t\\\\twithout the need to recompose the text.\\\\nLines are ordered vertically.  However, for a given y, there may be several lines in left to right order.  Lines must never be empty, even if text is empty.\\\\n\\\\nNotes on yet another hack - 5 Feb 2001\\\\n\\\\nWe really need to clean up #composeLinesFrom:to:delta:into:priorLines:atY:!!!!!!\\\\n\\\\nI added one more habdful of code to correct:\\\\n\\\\nThis is an annoying bug that's been around for a couple of years, but I finally figured out how to duplicate the problem, so I figured I'd just report it now.  (It doesn't necessarily have to be fixed for 3.0 if it looks messy, but if it's a simple fix, it would be worth it.)\\\\n\\\\nIn Morphic, if you have the following text in a workspace:\\\\n\\\\nThis is line 1\\\\nThis is line 2\\\\n\\\\n**and** you have a return character after line 2, you will normally be able to click the mouse two times below line 2 in order to select all the text.  If you edit line 2 (e.g. so that it reads \\\\\\\"line number 2\\\\\\\"), you can still select all the text by clicking below the second line.  However, if you edit line 1, you will not be able to select all the text from the bottom in the same way.  Things get messed up such that the last return character seems to be gone.  In this state, if you position the cursor immediately after the 2, and press the right arrow, the cursor jumps to the beginning of line 2... oof. (report by Doug Way)\\\\n\\\\nWhile I don't have a very deep understanding of the above mentioned method, I was able to determine that text ending in a CR worked better in the editor when the last entry in <lines> had a start of text size + 1 and a stop of text size. I have accordingly added code near the end to ensure this. It seems to have fixed the problem, but we do need to clean this baby up some day. - Bob\\\\n!\\\\n]style[(830 38 127 1000 388)f1,f2cblue;,f1,f1cred;,f1!\\\\n\\\\n\\\\n!NewParagraph methodsFor: 'access' stamp: 'di 11/16/97 09:02'!\\\\nadjustedFirstCharacterIndex\\\\n\\\\t\\\\\\\"Return the index in the text where this paragraph WOULD begin if nothing had changed, except the size of the text -- ie if there have only been an insertion of deletion in the preceding morphs\\\\\\\"\\\\n\\\\toffsetToEnd ifNil: [^ -1].\\\\n\\\\t^ text size - offsetToEnd! !\\\\n\\\\n!NewParagraph methodsFor: 'access' stamp: 'di 10/24/97 17:38'!\\\\nextent\\\\n\\\\t^ container width @ (lines last bottom - lines first top)! !\\\\n\\\\n!NewParagraph methodsFor: 'access' stamp: 'di 11/8/97 15:41'!\\\\nfirstCharacterIndex\\\\n\\\\t^ firstCharacterIndex! !\\\\n\\\\n!NewParagraph methodsFor: 'access' stamp: 'rr 3/22/2004 12:42'!\\\\nfocused\\\\n\\\\tfocused ifNil: [focused := false].\\\\n\\\\t^ focused! !\\\\n\\\\n!NewParagraph methodsFor: 'access' stamp: 'rr 3/22/2004 12:41'!\\\\nfocused: aBoolean\\\\n\\\\tfocused := aBoolean! !\\\\n\\\\n!NewParagraph methodsFor: 'access' stamp: 'di 10/23/97 21:01'!\\\\nlastCharacterIndex\\\\n\\\\t^ lines last last! !\\\\n\\\\n!NewParagraph methodsFor: 'access' stamp: 'sbw 10/13/1999 22:31'!\\\\nnumberOfLines\\\\n\\\\n\\\\t^lines size! !\\\\n\\\\n!NewParagraph methodsFor: 'access' stamp: 'sw 1/13/98 21:31'!\\\\nstring\\\\n\\\\t^ text string! !\\\\n\\\\n!NewParagraph methodsFor: 'access' stamp: 'di 10/21/97 14:39'!\\\\ntext\\\\n\\\\t^ text! !\\\\n\\\\n!NewParagraph methodsFor: 'access' stamp: 'jm 11/19/97 20:27'!\\\\ntextOwner: ignored  \\\\\\\"See TextOnCurve\\\\\\\"! !\\\\n\\\\n!NewParagraph methodsFor: 'access' stamp: 'di 10/21/97 14:39'!\\\\ntextStyle\\\\n\\\\t^ textStyle! !\\\\n\\\\n!NewParagraph methodsFor: 'access' stamp: 'di 10/23/97 19:33'!\\\\ntextStyle: aTextStyle \\\\n\\\\t\\\\\\\"Set the style by which the receiver should display its text.\\\\\\\"\\\\n\\\\ttextStyle _ aTextStyle! !\\\\n\\\\n!NewParagraph methodsFor: 'access' stamp: 'RAA 5/6/2001 15:04'!\\\\nwantsColumnBreaks\\\\n\\\\n\\\\t^wantsColumnBreaks! !\\\\n\\\\n!NewParagraph methodsFor: 'access' stamp: 'RAA 5/6/2001 15:03'!\\\\nwantsColumnBreaks: aBoolean\\\\n\\\\n\\\\twantsColumnBreaks _ aBoolean! !\\\\n\\\\n\\\\n!NewParagraph methodsFor: 'alignment' stamp: 'di 10/25/97 19:26'!\\\\ncentered \\\\n\\\\ttextStyle centered! !\\\\n\\\\n!NewParagraph methodsFor: 'alignment' stamp: 'di 10/25/97 19:26'!\\\\njustified \\\\n\\\\ttextStyle justified! !\\\\n\\\\n!NewParagraph methodsFor: 'alignment' stamp: 'di 10/25/97 19:26'!\\\\nleftFlush \\\\n\\\\ttextStyle leftFlush! !\\\\n\\\\n!NewParagraph methodsFor: 'alignment' stamp: 'di 10/25/97 19:26'!\\\\nrightFlush \\\\n\\\\ttextStyle rightFlush! !\\\\n\\\\n\\\\n!NewParagraph methodsFor: 'composition' stamp: 'jm 2/25/2003 16:20'!\\\\nOLDcomposeLinesFrom: start to: stop delta: delta into: lineColl priorLines: priorLines atY: startingY \\\\n\\\\t\\\\\\\"While the section from start to stop has changed, composition may ripple all the way to the end of the text.  However in a rectangular container, if we ever find a line beginning with the same character as before (ie corresponding to delta in the old lines), then we can just copy the old lines from there to the end of the container, with adjusted indices and y-values\\\\\\\"\\\\n\\\\n\\\\t| charIndex lineY lineHeight scanner line row firstLine lineHeightGuess saveCharIndex hitCR maybeSlide sliding bottom priorIndex priorLine |\\\\n\\\\tcharIndex := start.\\\\n\\\\tlines := lineColl.\\\\n\\\\tlineY := startingY.\\\\n\\\\tlineHeightGuess := textStyle lineGrid.\\\\n\\\\tmaxRightX := container left.\\\\n\\\\tmaybeSlide := stop < text size and: [container isMemberOf: Rectangle].\\\\n\\\\tsliding := false.\\\\n\\\\tpriorIndex := 1.\\\\n\\\\tbottom := container bottom.\\\\n\\\\tscanner := CompositionScanner new text: text textStyle: textStyle.\\\\n\\\\tfirstLine := true.\\\\n\\\\t[charIndex <= text size and: [lineY + lineHeightGuess <= bottom]] \\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[sliding \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"Having detected the end of rippling recoposition, we are only sliding old lines\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpriorIndex < priorLines size \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"Adjust and re-use previously composed line\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tpriorIndex := priorIndex + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tpriorLine := (priorLines at: priorIndex) slideIndexBy: delta\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tandMoveTopTo: lineY.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tlineColl addLast: priorLine.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tlineY := priorLine bottom.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcharIndex := priorLine last + 1]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"There are no more priorLines to slide.\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsliding := maybeSlide := false]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[lineHeight := lineHeightGuess.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsaveCharIndex := charIndex.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\thitCR := false.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\trow := container rectanglesAt: lineY height: lineHeight.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t1 to: row size\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:i | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(charIndex <= text size and: [hitCR not]) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[line := scanner \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcomposeFrom: charIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinRectangle: (row at: i)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfirstLine: firstLine\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tleftSide: i = 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trightSide: i = row size.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tlines addLast: line.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(text at: line last) = Character cr ifTrue: [hitCR := true].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tlineHeight := lineHeight max: line lineHeight.\\\\t\\\\\\\"includes font changes\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcharIndex := line last + 1]].\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tlineY := lineY + lineHeight.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\trow notEmpty \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[lineY > bottom \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"Oops -- the line is really too high to fit -- back out\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcharIndex := saveCharIndex.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trow do: [:r | lines removeLast]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"It's OK -- the line still fits.\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmaxRightX := maxRightX max: scanner rightX.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t1 to: row size - 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:i | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Adjust heights across row if necess\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(lines at: lines size - row size + i) lineHeight: lines last lineHeight\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbaseline: lines last baseline].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcharIndex > text size \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"end of text\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\thitCR \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"If text ends with CR, add a null line at the end\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tlineY + lineHeightGuess <= container bottom \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[row := container rectanglesAt: lineY height: lineHeightGuess.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trow notEmpty \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[line := (TextLine \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstart: charIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstop: charIndex - 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinternalSpaces: 0\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tpaddingWidth: 0)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trectangle: row first;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tlineHeight: lineHeightGuess baseline: textStyle baseline.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tlines addLast: line]]].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tlines := lines asArray.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^maxRightX].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfirstLine := false]].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(maybeSlide and: [charIndex > stop]) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"Check whether we are now in sync with previously composed lines\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[priorIndex < priorLines size \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tand: [(priorLines at: priorIndex) first < (charIndex - delta)]] \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twhileTrue: [priorIndex := priorIndex + 1].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(priorLines at: priorIndex) first = (charIndex - delta) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"Yes -- next line will have same start as prior line.\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tpriorIndex := priorIndex - 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmaybeSlide := false.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsliding := true]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[priorIndex = priorLines size \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"Weve reached the end of priorLines,\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tso no use to keep looking for lines to slide.\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmaybeSlide := false]]]]].\\\\n\\\\tfirstLine \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"No space in container or empty text\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\tline := (TextLine \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstart: start\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstop: start - 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinternalSpaces: 0\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tpaddingWidth: 0)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trectangle: (container topLeft extent: 0 @ lineHeightGuess);\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tlineHeight: lineHeightGuess baseline: textStyle baseline.\\\\n\\\\t\\\\t\\\\tlines := Array with: line]\\\\n\\\\t\\\\tifFalse: [self fixLastWithHeight: lineHeightGuess].\\\\n\\\\t\\\\\\\"end of container\\\\\\\"\\\\n\\\\tlines := lines asArray.\\\\n\\\\t^maxRightX! !\\\\n\\\\n!NewParagraph methodsFor: 'composition' stamp: 'di 11/8/97 15:31'!\\\\ncompose: t style: ts from: startingIndex in: textContainer\\\\n\\\\ttext _ t.\\\\n\\\\ttextStyle _ ts.\\\\n\\\\tfirstCharacterIndex _ startingIndex.\\\\n\\\\toffsetToEnd _ text size - firstCharacterIndex.\\\\n\\\\tcontainer _ textContainer.\\\\n\\\\tself composeAll! !\\\\n\\\\n!NewParagraph methodsFor: 'composition' stamp: 'yo 12/20/2002 16:18'!\\\\ncomposeAll\\\\n\\\\ttext string isOctetString ifTrue: [\\\\n\\\\t\\\\t^ self composeLinesFrom: firstCharacterIndex to: text size delta: 0\\\\n\\\\t\\\\t\\\\tinto: OrderedCollection new priorLines: Array new atY: container top.\\\\n\\\\t].\\\\n\\\\n\\\\t^ self multiComposeLinesFrom: firstCharacterIndex to: text size delta: 0\\\\n\\\\t\\\\tinto: OrderedCollection new priorLines: Array new atY: container top.\\\\n! !\\\\n\\\\n!NewParagraph methodsFor: 'composition' stamp: 'di 11/15/97 09:21'!\\\\ncomposeAllStartingAt: characterIndex\\\\n\\\\tfirstCharacterIndex _ characterIndex.\\\\n\\\\toffsetToEnd _ text size - firstCharacterIndex.\\\\n\\\\tself composeAll! !\\\\n\\\\n!NewParagraph methodsFor: 'composition' stamp: 'RAA 5/7/2001 10:58'!\\\\ncomposeLinesFrom: start to: stop delta: delta into: lineColl priorLines: priorLines\\\\n\\\\tatY: startingY\\\\n\\\\t\\\\\\\"While the section from start to stop has changed, composition may ripple all the way to the end of the text.  However in a rectangular container, if we ever find a line beginning with the same character as before (ie corresponding to delta in the old lines), then we can just copy the old lines from there to the end of the container, with adjusted indices and y-values\\\\\\\"\\\\n\\\\n\\\\t| newResult |\\\\n\\\\n\\\\tnewResult _ TextComposer new\\\\n\\\\t\\\\tcomposeLinesFrom: start \\\\n\\\\t\\\\tto: stop \\\\n\\\\t\\\\tdelta: delta \\\\n\\\\t\\\\tinto: lineColl \\\\n\\\\t\\\\tpriorLines: priorLines\\\\n\\\\t\\\\tatY: startingY\\\\n\\\\t\\\\ttextStyle: textStyle \\\\n\\\\t\\\\ttext: text \\\\n\\\\t\\\\tcontainer: container\\\\n\\\\t\\\\twantsColumnBreaks: wantsColumnBreaks == true.\\\\n\\\\tlines _ newResult first asArray.\\\\n\\\\tmaxRightX _ newResult second.\\\\n\\\\t^maxRightX\\\\n! !\\\\n\\\\n!NewParagraph methodsFor: 'composition' stamp: 'di 10/22/97 11:13'!\\\\ncompositionRectangle\\\\n\\\\t^ container! !\\\\n\\\\n!NewParagraph methodsFor: 'composition' stamp: 'RAA 2/25/2001 15:02'!\\\\nfixLastWithHeight: lineHeightGuess\\\\n\\\\\\\"This awful bit is to ensure that if we have scanned all the text and the last character is a CR that there is a null line at the end of lines. Sometimes this was not happening which caused anomalous selections when selecting all the text. This is implemented as a post-composition fixup because I coul;dn't figure out where to put it in the main logic.\\\\\\\"\\\\n\\\\n\\\\t| oldLastLine newRectangle line |\\\\n\\\\n\\\\t(text size > 1 and: [text last = Character cr]) ifFalse: [^self].\\\\n\\\\n\\\\toldLastLine _ lines last.\\\\n\\\\toldLastLine last - oldLastLine first >= 0 ifFalse: [^self].\\\\n\\\\toldLastLine last = text size ifFalse: [^self].\\\\n\\\\n\\\\tnewRectangle _ oldLastLine left @ oldLastLine bottom \\\\n\\\\t\\\\t\\\\t\\\\textent: 0@(oldLastLine bottom - oldLastLine top).\\\\n\\\\t\\\\\\\"Even though we may be below the bottom of the container,\\\\n\\\\tit is still necessary to compose the last line for consistency...\\\\\\\"\\\\n\\\\n\\\\tline _ TextLine start: text size+1 stop: text size internalSpaces: 0 paddingWidth: 0.\\\\n\\\\tline rectangle: newRectangle.\\\\n\\\\tline lineHeight: lineHeightGuess baseline: textStyle baseline.\\\\n\\\\tlines _ lines, (Array with: line).\\\\n! !\\\\n\\\\n!NewParagraph methodsFor: 'composition' stamp: 'yo 1/3/2003 12:17'!\\\\nmultiComposeLinesFrom: start to: stop delta: delta into: lineColl priorLines: priorLines\\\\n\\\\tatY: startingY\\\\n\\\\t\\\\\\\"While the section from start to stop has changed, composition may ripple all the way to the end of the text.  However in a rectangular container, if we ever find a line beginning with the same character as before (ie corresponding to delta in the old lines), then we can just copy the old lines from there to the end of the container, with adjusted indices and y-values\\\\\\\"\\\\n\\\\n\\\\t| newResult |\\\\n\\\\n\\\\tnewResult _ MultiTextComposer new\\\\n\\\\t\\\\tmultiComposeLinesFrom: start \\\\n\\\\t\\\\tto: stop \\\\n\\\\t\\\\tdelta: delta \\\\n\\\\t\\\\tinto: lineColl \\\\n\\\\t\\\\tpriorLines: priorLines\\\\n\\\\t\\\\tatY: startingY\\\\n\\\\t\\\\ttextStyle: textStyle \\\\n\\\\t\\\\ttext: text \\\\n\\\\t\\\\tcontainer: container\\\\n\\\\t\\\\twantsColumnBreaks: wantsColumnBreaks == true.\\\\n\\\\tlines _ newResult first asArray.\\\\n\\\\tmaxRightX _ newResult second.\\\\n\\\\t\\\\\\\"maxRightX printString displayAt: 0@0.\\\\\\\"\\\\n\\\\t^maxRightX\\\\n! !\\\\n\\\\n!NewParagraph methodsFor: 'composition' stamp: 'yo 12/20/2002 16:18'!\\\\nrecomposeFrom: start to: stop delta: delta\\\\n\\\\t\\\\\\\"Recompose this paragraph.  The altered portion is between start and stop.\\\\n\\\\tRecomposition may continue to the end of the text, due to a ripple effect.\\\\n\\\\tDelta is the amount by which the current text is longer than it was\\\\n\\\\twhen its current lines were composed.\\\\\\\"\\\\n\\\\t| startLine newLines |\\\\n\\\\t\\\\\\\"Have to recompose line above in case a word-break was affected.\\\\\\\"\\\\n\\\\tstartLine _ (self lineIndexForCharacter: start) - 1 max: 1.\\\\n\\\\t[startLine > 1 and: [(lines at: startLine-1) top = (lines at: startLine) top]]\\\\n\\\\t\\\\twhileTrue: [startLine _ startLine - 1].  \\\\\\\"Find leftmost of line pieces\\\\\\\"\\\\n\\\\tnewLines _ OrderedCollection new: lines size + 1.\\\\n\\\\t1 to: startLine-1 do: [:i | newLines addLast: (lines at: i)].\\\\n\\\\ttext string isOctetString ifTrue: [\\\\n\\\\t\\\\t^ self composeLinesFrom: (lines at: startLine) first to: stop delta: delta\\\\n\\\\t\\\\t\\\\tinto: newLines priorLines: lines\\\\n\\\\t\\\\t\\\\tatY: (lines at: startLine) top.\\\\n\\\\t].\\\\n\\\\tself multiComposeLinesFrom: (lines at: startLine) first to: stop delta: delta\\\\n\\\\t\\\\tinto: newLines priorLines: lines\\\\n\\\\t\\\\tatY: (lines at: startLine) top.\\\\n! !\\\\n\\\\n!NewParagraph methodsFor: 'composition' stamp: 'RAA 5/6/2001 15:09'!\\\\ntestNewComposeAll\\\\n\\\\t| newResult |\\\\n\\\\tself \\\\n\\\\t\\\\tOLDcomposeLinesFrom: firstCharacterIndex \\\\n\\\\t\\\\tto: text size \\\\n\\\\t\\\\tdelta: 0\\\\n\\\\t\\\\tinto: OrderedCollection new \\\\n\\\\t\\\\tpriorLines: Array new \\\\n\\\\t\\\\tatY: container top.\\\\n\\\\tnewResult _ TextComposer new\\\\n\\\\t\\\\tcomposeLinesFrom: firstCharacterIndex \\\\n\\\\t\\\\tto: text size \\\\n\\\\t\\\\tdelta: 0\\\\n\\\\t\\\\tinto: OrderedCollection new \\\\n\\\\t\\\\tpriorLines: Array new \\\\n\\\\t\\\\tatY: container top\\\\n\\\\t\\\\ttextStyle: textStyle \\\\n\\\\t\\\\ttext: text \\\\n\\\\t\\\\tcontainer: container\\\\n\\\\t\\\\twantsColumnBreaks: false.\\\\n\\\\tnewResult first with: lines do: [ :e1 :e2 |\\\\n\\\\t\\\\te1 longPrintString = e2 longPrintString ifFalse: [self halt].\\\\n\\\\t].\\\\n\\\\tnewResult second = maxRightX ifFalse: [self halt].\\\\n\\\\t^{newResult. {lines. maxRightX}}\\\\n! !\\\\n\\\\n!NewParagraph methodsFor: 'composition' stamp: 'yo 12/17/2002 14:48'!\\\\ntestNewComposeAll2\\\\n\\\\t| newResult |\\\\n\\\\tnewResult _ TextComposer new\\\\n\\\\t\\\\tcomposeLinesFrom: firstCharacterIndex \\\\n\\\\t\\\\tto: text size \\\\n\\\\t\\\\tdelta: 0\\\\n\\\\t\\\\tinto: OrderedCollection new \\\\n\\\\t\\\\tpriorLines: Array new \\\\n\\\\t\\\\tatY: container top\\\\n\\\\t\\\\ttextStyle: textStyle \\\\n\\\\t\\\\ttext: text \\\\n\\\\t\\\\tcontainer: container\\\\n\\\\t\\\\twantsColumnBreaks: false.\\\\n\\\\t^{newResult. {lines. maxRightX}}\\\\n! !\\\\n\\\\n!NewParagraph methodsFor: 'composition' stamp: 'yo 12/18/2002 15:00'!\\\\ntestNewComposeAll3\\\\n\\\\t| newResult |\\\\n\\\\tnewResult _ TextComposer new\\\\n\\\\t\\\\tmultiComposeLinesFrom: firstCharacterIndex \\\\n\\\\t\\\\tto: text size \\\\n\\\\t\\\\tdelta: 0\\\\n\\\\t\\\\tinto: OrderedCollection new \\\\n\\\\t\\\\tpriorLines: Array new \\\\n\\\\t\\\\tatY: container top\\\\n\\\\t\\\\ttextStyle: textStyle \\\\n\\\\t\\\\ttext: text \\\\n\\\\t\\\\tcontainer: (0@0 extent: 31@60)\\\\n\\\\t\\\\twantsColumnBreaks: false.\\\\n\\\\t^{newResult. {lines. maxRightX}}\\\\n! !\\\\n\\\\n\\\\n!NewParagraph methodsFor: 'copying' stamp: 'di 5/21/1998 21:45'!\\\\ndeepCopy\\\\n\\\\t\\\\\\\"Don't want to copy the container (etc) or fonts in the TextStyle.\\\\\\\"\\\\n\\\\t| new |\\\\n\\\\tnew _ self copy.\\\\n\\\\tnew textStyle: textStyle copy\\\\n\\\\t\\\\tlines: lines copy\\\\n\\\\t\\\\ttext: text deepCopy.\\\\n\\\\t^ new! !\\\\n\\\\n\\\\n!NewParagraph methodsFor: 'display' stamp: 'di 8/13/2000 12:27'!\\\\nasParagraphForPostscript\\\\n\\\\n\\\\t^ self! !\\\\n\\\\n!NewParagraph methodsFor: 'display' stamp: 'lr 7/12/2006 09:27'!\\\\ncaretWidth\\\\n\\\\t^ Preferences caretWidth! !\\\\n\\\\n!NewParagraph methodsFor: 'display' stamp: 'nk 8/31/2004 11:10'!\\\\ndisplaySelectionInLine: line on: aCanvas \\\\n\\\\t| leftX rightX w caretColor |\\\\n\\\\tselectionStart ifNil: [^self].\\\\t\\\\\\\"No selection\\\\\\\"\\\\n\\\\taCanvas isShadowDrawing ifTrue: [ ^self ].\\\\t\\\\\\\"don't draw selection with shadow\\\\\\\"\\\\n\\\\tselectionStart = selectionStop \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"Only show caret on line where clicked\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\tselectionStart textLine ~= line ifTrue: [^self]]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"Test entire selection before or after here\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t(selectionStop stringIndex < line first \\\\n\\\\t\\\\t\\\\t\\\\tor: [selectionStart stringIndex > (line last + 1)]) ifTrue: [^self].\\\\t\\\\\\\"No selection on this line\\\\\\\"\\\\n\\\\t\\\\t\\\\t(selectionStop stringIndex = line first \\\\n\\\\t\\\\t\\\\t\\\\tand: [selectionStop textLine ~= line]) ifTrue: [^self].\\\\t\\\\\\\"Selection ends on line above\\\\\\\"\\\\n\\\\t\\\\t\\\\t(selectionStart stringIndex = (line last + 1) \\\\n\\\\t\\\\t\\\\t\\\\tand: [selectionStop textLine ~= line]) ifTrue: [^self]].\\\\t\\\\\\\"Selection begins on line below\\\\\\\"\\\\n\\\\tleftX := (selectionStart stringIndex < line first \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [line ]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [selectionStart ])left.\\\\n\\\\trightX := (selectionStop stringIndex > (line last + 1) or: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[selectionStop stringIndex = (line last + 1) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tand: [selectionStop textLine ~= line]]) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [line right]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [selectionStop left].\\\\n\\\\tselectionStart = selectionStop \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[rightX := rightX + 1.\\\\n\\\\t\\\\t\\\\tw := self caretWidth.\\\\n\\\\t\\\\t\\\\tcaretColor := self insertionPointColor.\\\\n\\\\t\\\\t\\\\t1 to: w\\\\n\\\\t\\\\t\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:i | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Draw caret triangles at top and bottom\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\taCanvas fillRectangle: ((leftX - w + i - 1) @ (line top + i - 1) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\textent: ((w - i) * 2 + 3) @ 1)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcolor: caretColor.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\taCanvas fillRectangle: ((leftX - w + i - 1) @ (line bottom - i) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\textent: ((w - i) * 2 + 3) @ 1)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcolor: caretColor].\\\\n\\\\t\\\\t\\\\taCanvas fillRectangle: (leftX @ line top corner: rightX @ line bottom)\\\\n\\\\t\\\\t\\\\t\\\\tcolor: caretColor]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[aCanvas fillRectangle: (leftX @ line top corner: rightX @ line bottom)\\\\n\\\\t\\\\t\\\\t\\\\tcolor: self selectionColor]! !\\\\n\\\\n!NewParagraph methodsFor: 'display' stamp: 'rr 3/22/2004 19:56'!\\\\ninsertionPointColor\\\\n\\\\tself focused ifFalse: [^ Color transparent].\\\\n\\\\t^ Display depth <= 2\\\\n\\\\t\\\\tifTrue: [Color black]\\\\n\\\\t\\\\tifFalse: [Preferences insertionPointColor]! !\\\\n\\\\n!NewParagraph methodsFor: 'display' stamp: 'rr 3/23/2004 19:52'!\\\\nselectionColor\\\\n\\\\t| color |\\\\n\\\\tDisplay depth = 1 ifTrue: [^ Color veryLightGray].\\\\n\\\\tDisplay depth = 2 ifTrue: [^ Color gray].\\\\n\\\\tcolor := Preferences textHighlightColor.\\\\n\\\\tself focused ifFalse: [color := color alphaMixed: 0.2 with: Color veryVeryLightGray].\\\\n\\\\t^ color! !\\\\n\\\\n\\\\n!NewParagraph methodsFor: 'editing' stamp: 'mk 5/28/2005 11:15'!\\\\nclickAt: clickPoint for: model controller: editor\\\\n\\\\t\\\\\\\"Give sensitive text a chance to fire.  Display flash: (100@100 extent: 100@100).\\\\\\\"\\\\n\\\\t| startBlock action target range boxes box |\\\\n\\\\taction _ false.\\\\n\\\\tstartBlock _ self characterBlockAtPoint: clickPoint.\\\\n\\\\t(text attributesAt: startBlock stringIndex forStyle: textStyle) \\\\n\\\\t\\\\tdo: [:att | att mayActOnClick ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[(target _ model) ifNil: [target _ editor morph].\\\\n\\\\t\\\\t\\\\t\\\\trange _ text rangeOf: att startingAt: startBlock stringIndex.\\\\n\\\\t\\\\t\\\\t\\\\tboxes _ self selectionRectsFrom: (self characterBlockForIndex: range first) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tto: (self characterBlockForIndex: range last+1).\\\\n\\\\t\\\\t\\\\t\\\\tbox _ boxes detect: [:each | each containsPoint: clickPoint] ifNone: [nil].\\\\n\\\\t\\\\t\\\\t\\\\tbox ifNotNil:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[ box _ (editor transformFrom: nil) invertBoundsRect: box.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\teditor morph allOwnersDo: [ :m | box _ box intersect: (m boundsInWorld) ].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tUtilities awaitMouseUpIn: box\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trepeating: []\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifSucceed: [(att actOnClickFor: target in: self at: clickPoint editor: editor) ifTrue: [action _ true]].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tCursor currentCursor == Cursor webLink ifTrue:[Cursor normal show].\\\\n\\\\t\\\\t\\\\t\\\\t]]].\\\\n\\\\t^ action! !\\\\n\\\\n!NewParagraph methodsFor: 'editing' stamp: 'di 4/28/1999 10:14'!\\\\nreplaceFrom: start to: stop with: aText displaying: displayBoolean \\\\n\\\\t\\\\\\\"Edit the text, and then recompose the lines.\\\\\\\" \\\\n\\\\ttext replaceFrom: start to: stop with: aText.\\\\n\\\\tself recomposeFrom: start to: start + aText size - 1 delta: aText size - (stop-start+1)! !\\\\n\\\\n\\\\n!NewParagraph methodsFor: 'fonts-display' stamp: 'nk 3/20/2004 11:13'!\\\\ndisplayOn: aCanvas using: displayScanner at: somePosition\\\\n\\\\t\\\\\\\"Send all visible lines to the displayScanner for display\\\\\\\"\\\\n\\\\t| visibleRectangle offset leftInRun line |\\\\n\\\\tvisibleRectangle _ aCanvas clipRect.\\\\n\\\\toffset _ (somePosition - positionWhenComposed) truncated.\\\\n\\\\tleftInRun _ 0.\\\\n\\\\t(self lineIndexForPoint: visibleRectangle topLeft)\\\\n\\\\t\\\\tto: (self lineIndexForPoint: visibleRectangle bottomRight)\\\\n\\\\t\\\\tdo: [:i | line _ lines at: i.\\\\n\\\\t\\\\t\\\\tself displaySelectionInLine: line on: aCanvas.\\\\n\\\\t\\\\t\\\\tline first <= line last ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[leftInRun _ displayScanner displayLine: line\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\toffset: offset leftInRun: leftInRun]].\\\\n! !\\\\n\\\\n\\\\n!NewParagraph methodsFor: 'initialize-release' stamp: 'tak 12/21/2004 13:29'!\\\\ninitialize\\\\n\\\\tself positionWhenComposed: 0 @ 0! !\\\\n\\\\n\\\\n!NewParagraph methodsFor: 'selection' stamp: 'ar 4/12/2005 19:53'!\\\\ncharacterBlockAtPoint: aPoint \\\\n\\\\t\\\\\\\"Answer a CharacterBlock for the character in the text at aPoint.\\\\\\\"\\\\n\\\\t| line |\\\\n\\\\tline _ lines at: (self lineIndexForPoint: aPoint).\\\\n\\\\t^ ((text string isWideString) ifTrue: [\\\\n\\\\t\\\\tMultiCharacterBlockScanner new text: text textStyle: textStyle\\\\n\\\\t] ifFalse: [CharacterBlockScanner new text: text textStyle: textStyle])\\\\n\\\\t\\\\tcharacterBlockAtPoint: aPoint index: nil\\\\n\\\\t\\\\tin: line! !\\\\n\\\\n!NewParagraph methodsFor: 'selection' stamp: 'ar 4/12/2005 19:53'!\\\\ncharacterBlockForIndex: index \\\\n\\\\t\\\\\\\"Answer a CharacterBlock for the character in text at index.\\\\\\\"\\\\n\\\\t| line |\\\\n\\\\tline _ lines at: (self lineIndexForCharacter: index).\\\\n\\\\t^ ((text string isWideString) ifTrue: [\\\\n\\\\t\\\\tMultiCharacterBlockScanner new text: text textStyle: textStyle\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tCharacterBlockScanner new text: text textStyle: textStyle\\\\n\\\\t])\\\\n\\\\t\\\\tcharacterBlockAtPoint: nil index: ((index max: line first) min: text size+1)\\\\n\\\\t\\\\tin: line! !\\\\n\\\\n!NewParagraph methodsFor: 'selection' stamp: 'jm 11/19/97 22:56'!\\\\ncontainsPoint: aPoint\\\\n\\\\t^ (lines at: (self lineIndexForPoint: aPoint)) rectangle\\\\n\\\\t\\\\tcontainsPoint: aPoint! !\\\\n\\\\n!NewParagraph methodsFor: 'selection' stamp: 'di 10/5/1998 12:59'!\\\\ndefaultCharacterBlock\\\\n\\\\t^ (CharacterBlock new stringIndex: firstCharacterIndex text: text\\\\n\\\\t\\\\t\\\\ttopLeft: lines first topLeft extent: 0 @ 0)\\\\n\\\\t\\\\ttextLine: lines first! !\\\\n\\\\n!NewParagraph methodsFor: 'selection' stamp: 'di 11/30/97 12:10'!\\\\nselectionRects\\\\n\\\\t\\\\\\\"Return an array of rectangles representing the selection region.\\\\\\\"\\\\n\\\\tselectionStart ifNil: [^ Array new].\\\\n\\\\t^ self selectionRectsFrom: selectionStart to: selectionStop! !\\\\n\\\\n!NewParagraph methodsFor: 'selection' stamp: 'ls 11/2/2001 23:10'!\\\\nselectionRectsFrom: characterBlock1 to: characterBlock2 \\\\n\\\\t\\\\\\\"Return an array of rectangles representing the area between the two character blocks given as arguments.\\\\\\\"\\\\n\\\\t| line1 line2 rects cb1 cb2 w |\\\\n\\\\tcharacterBlock1 <= characterBlock2\\\\n\\\\t\\\\tifTrue: [cb1 _ characterBlock1.  cb2 _ characterBlock2]\\\\n\\\\t\\\\tifFalse: [cb2 _ characterBlock1.  cb1 _ characterBlock2].\\\\n\\\\tcb1 = cb2 ifTrue:\\\\n\\\\t\\\\t[w _ self caretWidth.\\\\n\\\\t\\\\t^ Array with: (cb1 topLeft - (w@0) corner: cb1 bottomLeft + ((w+1)@0))].\\\\n\\\\tline1 _ self lineIndexForCharacter: cb1 stringIndex.\\\\n\\\\tline2 _ self lineIndexForCharacter: cb2 stringIndex.\\\\n\\\\tline1 = line2 ifTrue:\\\\n\\\\t\\\\t[^ Array with: (cb1 topLeft corner: cb2 bottomRight)].\\\\n\\\\trects _ OrderedCollection new.\\\\n\\\\trects addLast: (cb1 topLeft corner: (lines at: line1) bottomRight).\\\\n\\\\tline1+1 to: line2-1 do: [ :i |\\\\n\\\\t\\\\t| line |\\\\n\\\\t\\\\tline := lines at: i.\\\\n\\\\t\\\\t(line left = rects last left and: [ line right = rects last right ])\\\\n\\\\t\\\\t\\\\tifTrue: [ \\\\\\\"new line has same margins as old one -- merge them, so that the caller gets as few rectangles as possible\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t| lastRect |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tlastRect := rects removeLast.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\trects add: (lastRect bottom: line bottom) ]\\\\n\\\\t\\\\t\\\\tifFalse: [ \\\\\\\"differing margins; cannot merge\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\trects add: line rectangle ] ].\\\\n\\\\n\\\\trects addLast: ((lines at: line2) topLeft corner: cb2 bottomLeft).\\\\n\\\\t^ rects! !\\\\n\\\\n!NewParagraph methodsFor: 'selection' stamp: 'di 12/2/97 19:57'!\\\\nselectionStart: startBlock selectionStop: stopBlock\\\\n\\\\tselectionStart _ startBlock.\\\\n\\\\tselectionStop _ stopBlock.! !\\\\n\\\\n\\\\n!NewParagraph methodsFor: 'private' stamp: 'di 11/8/97 15:47'!\\\\nadjustLineIndicesBy: delta\\\\n\\\\tfirstCharacterIndex _ firstCharacterIndex + delta.\\\\n\\\\tlines do: [:line | line slide: delta].\\\\n! !\\\\n\\\\n!NewParagraph methodsFor: 'private' stamp: 'di 10/26/97 15:57'!\\\\nadjustRightX\\\\n\\\\t| shrink |\\\\n\\\\tshrink _ container right - maxRightX.\\\\n\\\\tlines do: [:line | line paddingWidth: (line paddingWidth - shrink)].\\\\n\\\\tcontainer _ container withRight: maxRightX! !\\\\n\\\\n!NewParagraph methodsFor: 'private' stamp: 'di 4/14/98 13:17'!\\\\nfastFindFirstLineSuchThat: lineBlock\\\\n\\\\t\\\\\\\"Perform a binary search of the lines array and return the index\\\\n\\\\tof the first element for which lineBlock evaluates as true.\\\\n\\\\tThis assumes the condition is one that goes from false to true for\\\\n\\\\tincreasing line numbers (as, eg, yval > somey or start char > somex).\\\\n\\\\tIf lineBlock is not true for any element, return size+1.\\\\\\\"\\\\n\\\\t| index low high |\\\\n\\\\tlow _ 1.\\\\n\\\\thigh _ lines size.\\\\n\\\\t[index _ high + low // 2.\\\\n\\\\tlow > high]\\\\n\\\\t\\\\twhileFalse: \\\\n\\\\t\\\\t\\\\t[(lineBlock value: (lines at: index))\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [high _ index - 1]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [low _ index + 1]].\\\\n\\\\t^ low! !\\\\n\\\\n!NewParagraph methodsFor: 'private' stamp: 'RAA 8/30/1998 15:30'!\\\\nindentationOfLineIndex: lineIndex ifBlank: aBlock\\\\n\\\\t\\\\\\\"Answer the number of leading tabs in the line at lineIndex.  If there are\\\\n\\\\t no visible characters, pass the number of tabs to aBlock and return its value.\\\\n\\\\t If the line is word-wrap overflow, back up a line and recur.\\\\\\\"\\\\n\\\\n\\\\t| arrayIndex first last cr |\\\\n\\\\tcr _ Character cr.\\\\n\\\\tarrayIndex _ lineIndex.\\\\n\\\\t[first _ (lines at: arrayIndex) first.\\\\n\\\\t first > 1 and: [(text string at: first - 1) ~~ cr]] whileTrue: \\\\\\\"word wrap\\\\\\\"\\\\n\\\\t\\\\t[arrayIndex _ arrayIndex - 1].\\\\n\\\\tlast _ (lines at: arrayIndex) last.\\\\n\\\\t\\\\n\\\\t^(text string copyFrom: first to: last) indentationIfBlank: aBlock.\\\\n! !\\\\n\\\\n!NewParagraph methodsFor: 'private' stamp: 'di 4/14/98 13:11'!\\\\nlineIndexForCharacter: index\\\\n\\\\t\\\\\\\"Answer the index of the line in which to select the character at index.\\\\\\\"\\\\n\\\\t^ (self fastFindFirstLineSuchThat: [:line | line first > index]) - 1 max: 1! !\\\\n\\\\n!NewParagraph methodsFor: 'private' stamp: 'di 4/14/98 13:13'!\\\\nlineIndexForPoint: aPoint\\\\n\\\\t\\\\\\\"Answer the index of the line in which to select the character nearest to aPoint.\\\\\\\"\\\\n\\\\t| i py |\\\\n\\\\tpy _ aPoint y truncated.\\\\n\\\\n\\\\t\\\\\\\"Find the first line at this y-value\\\\\\\"\\\\n\\\\ti _ (self fastFindFirstLineSuchThat: [:line | line bottom > py]) min: lines size.\\\\n\\\\n\\\\t\\\\\\\"Now find the first line at this x-value\\\\\\\"\\\\n\\\\t[i < lines size and: [(lines at: i+1) top = (lines at: i) top\\\\n\\\\t\\\\t\\\\t\\\\tand: [aPoint x >= (lines at: i+1) left]]]\\\\n\\\\t\\\\twhileTrue: [i _ i + 1].\\\\n\\\\t^ i! !\\\\n\\\\n!NewParagraph methodsFor: 'private' stamp: 'RAA 8/30/1998 15:04'!\\\\nlineIndexOfCharacterIndex: characterIndex \\\\n\\\\t\\\\\\\"Answer the line index for a given characterIndex.\\\\\\\"\\\\n\\\\t\\\\\\\"apparently the selector changed with NewParagraph\\\\\\\"\\\\n\\\\n\\\\t^self lineIndexForCharacter: characterIndex \\\\n! !\\\\n\\\\n!NewParagraph methodsFor: 'private' stamp: 'di 10/24/97 17:40'!\\\\nlines\\\\n\\\\t^ lines! !\\\\n\\\\n!NewParagraph methodsFor: 'private' stamp: 'edc 6/18/2004 09:10'!\\\\nmoveBy: delta\\\\n\\\\tlines do: [:line | line moveBy: delta].\\\\n\\\\tpositionWhenComposed ifNotNil:[\\\\n\\\\tpositionWhenComposed _ positionWhenComposed + delta].\\\\n\\\\tcontainer _ container translateBy: delta! !\\\\n\\\\n!NewParagraph methodsFor: 'private' stamp: 'di 10/21/97 21:36'!\\\\npositionWhenComposed: pos\\\\n\\\\tpositionWhenComposed _ pos! !\\\\n\\\\n!NewParagraph methodsFor: 'private' stamp: 'di 5/21/1998 21:47'!\\\\ntextStyle: ts lines: l text: t\\\\n\\\\t\\\\\\\"Private -- just a service for deepCopy\\\\\\\"\\\\n\\\\ttextStyle _ ts.\\\\n\\\\tlines _ l.\\\\n\\\\ttext _ t.! !\\\\nSystemWindow subclass: #NewWorldWindow\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-AdditionalWorlds'!\\\\n\\\\n!NewWorldWindow methodsFor: 'color' stamp: 'nb 6/17/2003 12:25'!\\\\nsetWindowColor: incomingColor\\\\n\\\\t| existingColor aColor |\\\\n\\\\n\\\\tincomingColor ifNil: [^ self].  \\\\\\\"it happens\\\\\\\"\\\\n\\\\taColor _ incomingColor asNontranslucentColor.\\\\n\\\\t(aColor = ColorPickerMorph perniciousBorderColor \\\\n\\\\t\\\\tor: [aColor = Color black]) ifTrue: [^ self].\\\\n\\\\texistingColor _ self paneColorToUse.\\\\n\\\\texistingColor ifNil: [^ Beeper beep].\\\\n\\\\tself setStripeColorsFrom: aColor\\\\n\\\\t\\\\t\\\\n! !\\\\n\\\\n\\\\n!NewWorldWindow methodsFor: 'initialization' stamp: 'ar 5/11/2001 23:48'!\\\\nopenInWorld: aWorld\\\\n\\\\t| xxx |\\\\n\\\\t\\\\\\\"This msg and its callees result in the window being activeOnlyOnTop\\\\\\\"\\\\n\\\\n\\\\txxx _ RealEstateAgent initialFrameFor: self world: aWorld.\\\\n\\\\n\\\\t\\\\\\\"Bob say: 'opening in ',xxx printString,' out of ',aWorld bounds printString.\\\\n\\\\t6 timesRepeat: [Display flash: xxx andWait: 300].\\\\\\\"\\\\n\\\\n\\\\tself bounds: xxx.\\\\n\\\\t^self openAsIsIn: aWorld.! !\\\\n\\\\n\\\\n!NewWorldWindow methodsFor: 'label' stamp: 'sw 5/19/2001 10:44'!\\\\nsetStripeColorsFrom: paneColor\\\\n\\\\t\\\\\\\"Since our world may be *any* color, try to avoid really dark colors so title will show\\\\\\\"\\\\n\\\\n\\\\t| revisedColor |\\\\n\\\\tstripes ifNil: [^ self].\\\\n\\\\trevisedColor _ paneColor atLeastAsLuminentAs: 0.1 .\\\\n\\\\tself isActive ifTrue:\\\\n\\\\t\\\\t[stripes second \\\\n\\\\t\\\\t\\\\tcolor: revisedColor; \\\\n\\\\t\\\\t\\\\tborderColor: stripes second color darker.\\\\n\\\\t\\\\tstripes first \\\\n\\\\t\\\\t\\\\tcolor: stripes second borderColor darker;\\\\n\\\\t\\\\t\\\\tborderColor: stripes first color darker.\\\\n\\\\t\\\\t^ self].\\\\n\\\\t\\\\\\\"This could be much faster\\\\\\\"\\\\n\\\\tstripes second \\\\n\\\\t\\\\tcolor: revisedColor; \\\\n\\\\t\\\\tborderColor: revisedColor.\\\\n\\\\tstripes first \\\\n\\\\t\\\\tcolor: revisedColor; \\\\n\\\\t\\\\tborderColor: revisedColor! !\\\\n\\\\n\\\\n!NewWorldWindow methodsFor: 'panes' stamp: 'ar 11/9/2000 01:31'!\\\\naddMorph: aMorph frame: relFrame\\\\n\\\\t| cc |\\\\n\\\\tcc _ aMorph color.\\\\n\\\\tsuper addMorph: aMorph frame: relFrame.\\\\n\\\\taMorph color: cc.! !\\\\n\\\\n!NewWorldWindow methodsFor: 'panes' stamp: 'RAA 6/1/2000 18:21'!\\\\nupdatePaneColors\\\\n\\\\t\\\\\\\"Useful when changing from monochrome to color display\\\\\\\"\\\\n\\\\n\\\\tself setStripeColorsFrom: self paneColorToUse.\\\\n\\\\n\\\\t\\\\\\\"paneMorphs do: [:p | p color: self paneColorToUse].\\\\\\\"\\\\t\\\\\\\"since pane is a world, skip this\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!NewWorldWindow methodsFor: 'stepping' stamp: 'RAA 6/1/2000 18:30'!\\\\namendSteppingStatus! !\\\\n\\\\n\\\\n!NewWorldWindow methodsFor: 'testing' stamp: 'RAA 6/1/2000 18:33'!\\\\nwantsSteps\\\\n\\\\t\\\\n\\\\t^true! !\\\\nController subclass: #NoController\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'ST80-Framework'!\\\\n!NoController commentStamp: '<historical>' prior: 0!\\\\nI represent a controller that never wants control. I am the controller for views that are non-interactive.!\\\\n\\\\n\\\\n!NoController methodsFor: 'basic control sequence'!\\\\nstartUp\\\\n\\\\t\\\\\\\"I do nothing.\\\\\\\"\\\\n\\\\n\\\\t^self! !\\\\n\\\\n\\\\n!NoController methodsFor: 'control defaults'!\\\\nisControlActive \\\\n\\\\t\\\\\\\"Refer to the comment in Controller|isControlActive.\\\\\\\"\\\\n\\\\n\\\\t^false! !\\\\n\\\\n!NoController methodsFor: 'control defaults'!\\\\nisControlWanted \\\\n\\\\t\\\\\\\"Refer to the comment in Controller|isControlWanted.\\\\\\\"\\\\n\\\\n\\\\t^false! !\\\\nClipboardInterpreter subclass: #NoConversionClipboardInterpreter\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Multilingual-TextConversion'!\\\\n\\\\n!NoConversionClipboardInterpreter methodsFor: 'as yet unclassified' stamp: 'yo 8/11/2003 19:03'!\\\\nfromSystemClipboard: aString\\\\n\\\\n\\\\t^ aString.\\\\n! !\\\\n\\\\n!NoConversionClipboardInterpreter methodsFor: 'as yet unclassified' stamp: 'yo 8/11/2003 21:06'!\\\\ntoSystemClipboard: aString\\\\n\\\\n\\\\t| result |\\\\n\\\\taString isOctetString ifTrue: [^ aString asOctetString].\\\\n\\\\n\\\\tresult _ WriteStream on: (String new: aString size).\\\\n\\\\taString do: [:each | each value < 256 ifTrue: [result nextPut: each]].\\\\n\\\\t^ result contents.\\\\n! !\\\\nKeyboardInputInterpreter subclass: #NoInputInterpreter\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Multilingual-TextConversion'!\\\\n\\\\n!NoInputInterpreter methodsFor: 'as yet unclassified' stamp: 'yo 7/25/2003 14:59'!\\\\nnextCharFrom: sensor firstEvt: evtBuf\\\\n\\\\n\\\\n\\\\n\\\\t| keyValue |\\\\n\\\\n\\\\tkeyValue := evtBuf third.\\\\n\\\\n\\\\t^ keyValue asCharacter.\\\\n\\\\n! !\\\\nNetworkError subclass: #NoNetworkError\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Network-Kernel'!\\\\n!NoNetworkError commentStamp: 'mir 5/12/2003 18:17' prior: 0!\\\\nSignals that no network was found. This could happen, e.g., on dial-up connection when no connection was established when Squeak tried to access it.\\\\n\\\\n!\\\\n\\\\nError subclass: #NonBooleanReceiver\\\\n\\\\tinstanceVariableNames: 'object'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Exceptions-Kernel'!\\\\n\\\\n!NonBooleanReceiver methodsFor: 'accessing' stamp: 'hmm 7/29/2001 21:30'!\\\\nobject\\\\n\\\\t^object! !\\\\n\\\\n!NonBooleanReceiver methodsFor: 'accessing' stamp: 'hmm 7/29/2001 21:30'!\\\\nobject: anObject\\\\n\\\\tobject _ anObject! !\\\\n\\\\n\\\\n!NonBooleanReceiver methodsFor: 'signaledException' stamp: 'hmm 7/29/2001 21:37'!\\\\nisResumable\\\\n\\\\n\\\\t^true! !\\\\nAbstractScoreEvent subclass: #NoteEvent\\\\n\\\\tinstanceVariableNames: 'duration midiKey velocity channel'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Sound-Scores'!\\\\n!NoteEvent commentStamp: '<historical>' prior: 0!\\\\nRepresents a note on or off event in a MIDI score.\\\\n!\\\\n\\\\n\\\\n!NoteEvent methodsFor: 'accessing' stamp: 'jm 12/30/97 22:02'!\\\\nchannel\\\\n\\\\n\\\\t^ channel\\\\n! !\\\\n\\\\n!NoteEvent methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nchannel: midiChannel\\\\n\\\\n\\\\tchannel := midiChannel.\\\\n! !\\\\n\\\\n!NoteEvent methodsFor: 'accessing' stamp: 'jm 12/18/97 19:10'!\\\\nduration\\\\n\\\\n\\\\t^ duration\\\\n! !\\\\n\\\\n!NoteEvent methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nduration: aNumber\\\\n\\\\n\\\\tduration := aNumber.\\\\n! !\\\\n\\\\n!NoteEvent methodsFor: 'accessing' stamp: 'jm 8/27/1998 16:38'!\\\\nendTime\\\\n\\\\n\\\\t^ time + duration\\\\n! !\\\\n\\\\n!NoteEvent methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nkey: midiKeyNum velocity: midiVelocity channel: midiChannel\\\\n\\\\n\\\\tmidiKey := midiKeyNum.\\\\n\\\\tvelocity := midiVelocity.\\\\n\\\\tchannel := midiChannel.\\\\n! !\\\\n\\\\n!NoteEvent methodsFor: 'accessing' stamp: 'jm 12/18/97 20:58'!\\\\nmidiKey\\\\n\\\\n\\\\t^ midiKey\\\\n! !\\\\n\\\\n!NoteEvent methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nmidiKey: midiKeyNum\\\\n\\\\n\\\\tmidiKey := midiKeyNum.\\\\n! !\\\\n\\\\n!NoteEvent methodsFor: 'accessing' stamp: 'jm 8/3/1998 17:06'!\\\\npitch\\\\n\\\\t\\\\\\\"Convert my MIDI key number to a pitch and return it.\\\\\\\"\\\\n\\\\n\\\\t^ AbstractSound pitchForMIDIKey: midiKey\\\\n! !\\\\n\\\\n!NoteEvent methodsFor: 'accessing' stamp: 'jm 12/30/97 09:32'!\\\\nvelocity\\\\n\\\\n\\\\t^ velocity\\\\n! !\\\\n\\\\n!NoteEvent methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nvelocity: midiVelocity\\\\n\\\\n\\\\tvelocity := midiVelocity.\\\\n! !\\\\n\\\\n\\\\n!NoteEvent methodsFor: 'classification' stamp: 'jm 12/31/97 11:48'!\\\\nisNoteEvent\\\\n\\\\n\\\\t^ true\\\\n! !\\\\n\\\\n\\\\n!NoteEvent methodsFor: 'midi' stamp: 'jm 9/10/1998 15:58'!\\\\nendNoteOnMidiPort: aMidiPort\\\\n\\\\t\\\\\\\"Output a noteOff event to the given MIDI port. (Actually, output a noteOff event with zero velocity. This does the same thing, but allows running status to be used when sending a mixture of note on and off commands.)\\\\\\\"\\\\n\\\\n\\\\taMidiPort\\\\n\\\\t\\\\tmidiCmd: 16r90\\\\n\\\\t\\\\tchannel: channel\\\\n\\\\t\\\\tbyte: midiKey\\\\n\\\\t\\\\tbyte: 0.\\\\n! !\\\\n\\\\n!NoteEvent methodsFor: 'midi' stamp: 'jm 9/10/1998 15:56'!\\\\nstartNoteOnMidiPort: aMidiPort\\\\n\\\\t\\\\\\\"Output a noteOn event to the given MIDI port.\\\\\\\"\\\\n\\\\n\\\\taMidiPort\\\\n\\\\t\\\\tmidiCmd: 16r90\\\\n\\\\t\\\\tchannel: channel\\\\n\\\\t\\\\tbyte: midiKey\\\\n\\\\t\\\\tbyte: velocity.\\\\n! !\\\\n\\\\n\\\\n!NoteEvent methodsFor: 'printing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nkeyName\\\\n\\\\t\\\\\\\"Return a note name for my pitch.\\\\\\\"\\\\n\\\\n\\\\t| pitchName octave |\\\\n\\\\tpitchName := #(c cs d ef e f fs g af a bf b) at: (midiKey \\\\\\\\\\\\\\\\ 12) + 1.\\\\n\\\\toctave := (#(-1 0 1 2 3 4 5 6 7 8 9) at: (midiKey // 12) + 1) printString.\\\\n\\\\t^ pitchName, octave\\\\n! !\\\\n\\\\n!NoteEvent methodsFor: 'printing' stamp: 'jm 1/3/98 08:59'!\\\\nprintOn: aStream\\\\n\\\\n\\\\taStream nextPut: $(.\\\\n\\\\ttime printOn: aStream.\\\\n\\\\taStream nextPutAll: ': '.\\\\n\\\\taStream nextPutAll: self keyName.\\\\n\\\\taStream space.\\\\n\\\\tduration printOn: aStream.\\\\n\\\\taStream nextPut: $).\\\\n! !\\\\nException subclass: #Notification\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Exceptions-Kernel'!\\\\n!Notification commentStamp: '<historical>' prior: 0!\\\\nA Notification is an indication that something interesting has occurred.  If it is not handled, it will pass by without effect.!\\\\n\\\\n\\\\n!Notification methodsFor: 'exceptionDescription' stamp: 'pnm 8/16/2000 15:04'!\\\\ndefaultAction\\\\n\\\\t\\\\\\\"No action is taken. The value nil is returned as the value of the message that signaled the exception.\\\\\\\"\\\\n\\\\n\\\\t^nil! !\\\\n\\\\n!Notification methodsFor: 'exceptionDescription' stamp: 'tfei 6/4/1999 18:17'!\\\\nisResumable\\\\n\\\\t\\\\\\\"Answer true. Notification exceptions by default are specified to be resumable.\\\\\\\"\\\\n\\\\n\\\\t^true! !\\\\nPluggableCanvas subclass: #NullCanvas\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Support'!\\\\n!NullCanvas commentStamp: '<historical>' prior: 0!\\\\nA canvas which ignores all drawing commands.!\\\\n\\\\n\\\\n!NullCanvas methodsFor: 'accessing' stamp: 'ls 3/20/2000 21:11'!\\\\nclipRect\\\\n\\\\t^1@1 extent: 99@99! !\\\\n\\\\n!NullCanvas methodsFor: 'accessing' stamp: 'ls 3/20/2000 21:11'!\\\\nextent\\\\n\\\\t^100@100! !\\\\n\\\\n!NullCanvas methodsFor: 'accessing' stamp: 'ls 3/20/2000 21:12'!\\\\nform\\\\n\\\\t^Form extent: self extent! !\\\\n\\\\n!NullCanvas methodsFor: 'accessing' stamp: 'ls 3/20/2000 21:13'!\\\\norigin\\\\n\\\\t^0@0! !\\\\n\\\\n\\\\n!NullCanvas methodsFor: 'copying' stamp: 'ls 3/20/2000 21:26'!\\\\ncopyClipRect: clipRect\\\\n\\\\t\\\\\\\"who cares what the clipping rectangle is?\\\\\\\"\\\\n\\\\t^self! !\\\\n\\\\n\\\\n!NullCanvas methodsFor: 'drawing-support' stamp: 'ls 3/27/2000 21:41'!\\\\nclipBy: region during: aBlock\\\\n\\\\t\\\\\\\"do this in order that timing runs work better\\\\\\\"\\\\n\\\\taBlock value: self! !\\\\n\\\\n!NullCanvas methodsFor: 'drawing-support' stamp: 'ls 3/27/2000 21:39'!\\\\ntransformBy: aDisplayTransform clippingTo: aClipRect during: aBlock smoothing: cellSize\\\\n\\\\t\\\\\\\"do this in order that timing runs work better\\\\\\\"\\\\n\\\\taBlock value: self! !\\\\n\\\\n!NullCanvas methodsFor: 'drawing-support' stamp: 'ls 3/27/2000 21:40'!\\\\ntranslateBy: delta during: aBlock\\\\n\\\\t\\\\\\\"do this in order that timing runs work better\\\\\\\"\\\\n\\\\taBlock value: self! !\\\\nObject subclass: #NullEncoder\\\\n\\\\tinstanceVariableNames: 'target filterSelector'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Support'!\\\\n\\\\n!NullEncoder methodsFor: 'accessing' stamp: 'RAA 9/17/2000 11:53'!\\\\nclose\\\\n\\\\n\\\\t^target close.\\\\n! !\\\\n\\\\n!NullEncoder methodsFor: 'accessing' stamp: 'MPW 1/1/1901 00:56'!\\\\ncontents\\\\n\\\\t^target contents.\\\\n! !\\\\n\\\\n!NullEncoder methodsFor: 'accessing' stamp: 'MPW 1/1/1901 00:16'!\\\\ntarget\\\\n\\\\t^target.! !\\\\n\\\\n\\\\n!NullEncoder methodsFor: 'initialization' stamp: 'MPW 1/1/1901 00:04'!\\\\ninitWithTarget:aTarget\\\\n\\\\ttarget _ aTarget.\\\\n\\\\tfilterSelector _ self class filterSelector.\\\\n\\\\t^self.\\\\n! !\\\\n\\\\n\\\\n!NullEncoder methodsFor: 'processing' stamp: 'MPW 1/1/1901 01:19'!\\\\nprocess:anObject\\\\n\\\\tself write:anObject.\\\\n\\\\t^self contents.! !\\\\n\\\\n\\\\n!NullEncoder methodsFor: 'writing' stamp: 'MPW 1/1/1901 01:17'!\\\\nforward:anObject\\\\n\\\\tanObject ~= nil ifTrue:[target write:anObject].\\\\n! !\\\\n\\\\n!NullEncoder methodsFor: 'writing' stamp: 'mpw 8/13/1999 10:54'!\\\\nwrite:anObject\\\\n\\\\tfilterSelector  ifNil:[filterSelector_self class filterSelector].\\\\n\\\\tanObject ifNotNil: [anObject perform:filterSelector with:self].\\\\n! !\\\\n\\\\n!NullEncoder methodsFor: 'writing' stamp: 'MPW 1/1/1901 01:16'!\\\\nwriteObject:anObject\\\\n\\\\t^self forward:anObject.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nNullEncoder class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!NullEncoder class methodsFor: 'configuring' stamp: 'MPW 1/1/1901 00:02'!\\\\ndefaultTarget\\\\n\\\\t^OrderedCollection new.\\\\n! !\\\\n\\\\n!NullEncoder class methodsFor: 'configuring' stamp: 'MPW 1/1/1901 00:02'!\\\\nfilterSelector\\\\n\\\\t^#writeOnFilterStream:\\\\n! !\\\\n\\\\n\\\\n!NullEncoder class methodsFor: 'creation' stamp: 'MPW 1/1/1901 00:55'!\\\\nstream\\\\n\\\\t^self streamOn:self defaultTarget. \\\\n! !\\\\n\\\\n!NullEncoder class methodsFor: 'creation' stamp: 'MPW 1/1/1901 00:05'!\\\\nstream:newTarget\\\\n\\\\t^self new initWithTarget:newTarget.\\\\n! !\\\\n\\\\n!NullEncoder class methodsFor: 'creation' stamp: 'MPW 1/1/1901 01:15'!\\\\nstreamOn:newTargetCollection\\\\n\\\\t^self new initWithTarget:newTargetCollection.\\\\n! !\\\\n\\\\n!NullEncoder class methodsFor: 'creation' stamp: 'MPW 1/1/1901 02:20'!\\\\nstreamOnFile:fileName\\\\n\\\\t^self new initWithTarget:(FileStream newFileNamed: fileName).\\\\n! !\\\\n\\\\n\\\\n!NullEncoder class methodsFor: 'processing' stamp: 'MPW 1/1/1901 01:20'!\\\\nprocess:anObject\\\\n\\\\t^self stream process:anObject.\\\\n\\\\n! !\\\\nNetworkTerminalMorph subclass: #NullTerminalMorph\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Nebraska-Morphic-Remote'!\\\\n\\\\n!NullTerminalMorph methodsFor: 'drawing' stamp: 'RAA 7/22/2000 07:20'!\\\\ndrawOn: aCanvas\\\\n\\\\n\\\\taCanvas fillRectangle: self bounds fillStyle: Color orange.\\\\n\\\\taCanvas frameRectangle: self bounds color: Color black! !\\\\n\\\\n!NullTerminalMorph methodsFor: 'drawing' stamp: 'RAA 7/22/2000 07:22'!\\\\nforceToFront: aRegion\\\\n\\\\t\\\\\\\"force the given region from the drawing form onto the background form\\\\\\\"\\\\n\\\\tself updateBackgroundForm.\\\\n\\\\n! !\\\\n\\\\n\\\\n!NullTerminalMorph methodsFor: 'geometry' stamp: 'sd 11/20/2005 21:26'!\\\\nextent: newExtent\\\\n\\\\n\\\\t| aPoint |\\\\n\\\\taPoint := 50@50.\\\\n\\\\tbounds extent = aPoint ifFalse: [\\\\n\\\\t\\\\tself changed.\\\\n\\\\t\\\\tbounds := bounds topLeft extent: aPoint.\\\\n\\\\t\\\\tself layoutChanged.\\\\n\\\\t\\\\tself changed\\\\n\\\\t].\\\\n\\\\teventEncoder sendViewExtent: newExtent! !\\\\nMagnitude subclass: #Number\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Kernel-Numbers'!\\\\n!Number commentStamp: '<historical>' prior: 0!\\\\nClass Number holds the most general methods for dealing with numbers. Subclasses Float, Fraction, and Integer, and their subclasses, provide concrete representations of a numeric quantity.\\\\n\\\\nAll of Number's subclasses participate in a simple type coercion mechanism that supports mixed-mode arithmetic and comparisons.  It works as follows:  If\\\\n\\\\tself<typeA> op: arg<typeB>\\\\nfails because of incompatible types, then it is retried in the following guise:\\\\n\\\\t(arg adaptTypeA: self) op: arg adaptToTypeA.\\\\nThis gives the arg of typeB an opportunity to resolve the incompatibility, knowing exactly what two types are involved.  If self is more general, then arg will be converted, and viceVersa.  This mechanism is extensible to any new number classes that one might wish to add to Squeak.  The only requirement is that every subclass of Number must support a pair of conversion methods specific to each of the other subclasses of Number.!\\\\n\\\\n\\\\n!Number methodsFor: 'arithmetic'!\\\\n* aNumber \\\\n\\\\t\\\\\\\"Answer the result of multiplying the receiver by aNumber.\\\\\\\"\\\\n\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n!Number methodsFor: 'arithmetic'!\\\\n+ aNumber \\\\n\\\\t\\\\\\\"Answer the sum of the receiver and aNumber.\\\\\\\"\\\\n\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n!Number methodsFor: 'arithmetic'!\\\\n- aNumber \\\\n\\\\t\\\\\\\"Answer the difference between the receiver and aNumber.\\\\\\\"\\\\n\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n!Number methodsFor: 'arithmetic'!\\\\n/ aNumber \\\\n\\\\t\\\\\\\"Answer the result of dividing the receiver by aNumber.\\\\\\\"\\\\n\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n!Number methodsFor: 'arithmetic'!\\\\n// aNumber \\\\n\\\\t\\\\\\\"Integer quotient defined by division with truncation toward negative \\\\n\\\\tinfinity. 9//4 = 2, -9//4 = -3. -0.9//0.4 = -3. \\\\\\\\\\\\\\\\ answers the remainder \\\\n\\\\tfrom this division.\\\\\\\"\\\\n\\\\n\\\\t^(self / aNumber) floor! !\\\\n\\\\n!Number methodsFor: 'arithmetic'!\\\\n\\\\\\\\\\\\\\\\ aNumber \\\\n\\\\t\\\\\\\"modulo. Remainder defined in terms of //. Answer a Number with the \\\\n\\\\tsame sign as aNumber. e.g. 9\\\\\\\\\\\\\\\\4 = 1, -9\\\\\\\\\\\\\\\\4 = 3, 9\\\\\\\\\\\\\\\\-4 = -3, 0.9\\\\\\\\\\\\\\\\0.4 = 0.1.\\\\\\\"\\\\n\\\\n\\\\t^self - (self // aNumber * aNumber)! !\\\\n\\\\n!Number methodsFor: 'arithmetic'!\\\\nabs\\\\n\\\\t\\\\\\\"Answer a Number that is the absolute value (positive magnitude) of the \\\\n\\\\treceiver.\\\\\\\"\\\\n\\\\n\\\\tself < 0\\\\n\\\\t\\\\tifTrue: [^self negated]\\\\n\\\\t\\\\tifFalse: [^self]! !\\\\n\\\\n!Number methodsFor: 'arithmetic' stamp: 'mk 10/27/2003 21:00'!\\\\narg\\\\n\\\\t\\\\\\\"Answer the argument of the receiver (see Complex | arg).\\\\\\\"\\\\n\\\\t\\\\n\\\\tself isZero ifTrue: [self error: 'Zero (0 + 0 i) does not have an argument.'].\\\\n\\\\t0 < self\\\\n\\\\t\\\\tifTrue: [^ 0]\\\\n\\\\t\\\\tifFalse: [^ Float pi]! !\\\\n\\\\n!Number methodsFor: 'arithmetic'!\\\\nnegated\\\\n\\\\t\\\\\\\"Answer a Number that is the negation of the receiver.\\\\\\\"\\\\n\\\\n\\\\t^0 - self! !\\\\n\\\\n!Number methodsFor: 'arithmetic'!\\\\nquo: aNumber \\\\n\\\\t\\\\\\\"Integer quotient defined by division with truncation toward zero. -9 quo: \\\\n\\\\t4 = -2, -0.9 quo: 0.4 = -2. rem: answers the remainder from this division.\\\\\\\"\\\\n\\\\n\\\\t^(self / aNumber) truncated! !\\\\n\\\\n!Number methodsFor: 'arithmetic' stamp: 'RAH 4/25/2000 19:49'!\\\\nreciprocal\\\\n\\\\t\\\\\\\"Answer 1 divided by the receiver. Create an error notification if the \\\\n\\\\treceiver is 0.\\\\\\\"\\\\n\\\\t#Numeric.\\\\n\\\\t\\\\\\\"Changed 200/01/19 For ANSI <number> support.\\\\\\\"\\\\n\\\\tself = 0 ifTrue: [^ (ZeroDivide dividend: self) signal\\\\\\\"<- Chg\\\\\\\"].\\\\n\\\\t^ 1 / self! !\\\\n\\\\n!Number methodsFor: 'arithmetic'!\\\\nrem: aNumber \\\\n\\\\t\\\\\\\"Remainder defined in terms of quo:. Answer a Number with the same \\\\n\\\\tsign as self. e.g. 9 rem: 4 = 1, -9 rem: 4 = -1. 0.9 rem: 0.4 = 0.1.\\\\\\\"\\\\n\\\\n\\\\t^self - ((self quo: aNumber) * aNumber)! !\\\\n\\\\n\\\\n!Number methodsFor: 'comparing' stamp: 'tk 4/16/1999 18:26'!\\\\ncloseTo: num\\\\n\\\\t\\\\\\\"are these two numbers close?\\\\\\\"\\\\n\\\\n\\\\t| ans |\\\\n\\\\tnum isFloat ifTrue: [^ num closeTo: self asFloat].\\\\n\\\\t[ans _ self = num] ifError: [:aString :aReceiver | ^ false].\\\\n\\\\t^ ans! !\\\\n\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'avi 9/6/2005 22:07'!\\\\nprintShowingDecimalPlaces: placesDesired\\\\n\\\\t\\\\\\\"Print the receiver showing precisely the given number of places desired .  If the placesDesired provided is positive, a decimal point and that many digits after the decimal point will always be shown.  If the placesDesired is zero, a whole number will be shown, without a decimal point.  This method could probably be greatly optimized -- improvements welcomed.\\\\\\\"\\\\n\\\\n\\\\t| precision rounded integerString fractionString |\\\\n\\\\tplacesDesired <= 0 ifTrue: [^ self rounded printString].\\\\n\\\\tprecision _ Utilities floatPrecisionForDecimalPlaces: placesDesired.\\\\n\\\\trounded _ self roundTo: precision.\\\\n\\\\tintegerString _ rounded integerPart asInteger asString.\\\\n\\\\tfractionString _ (rounded fractionPart abs / precision) asInteger asString.\\\\n\\\\t^ String streamContents:\\\\n\\\\t\\\\t[:s |\\\\n\\\\t\\\\ts nextPutAll: integerString.\\\\n\\\\t\\\\ts nextPut: $..\\\\n\\\\t\\\\t(placesDesired - fractionString size) timesRepeat: [s nextPut: $0].\\\\n\\\\t\\\\ts nextPutAll: fractionString]\\\\n\\\\\\\"\\\\n23 printShowingDecimalPlaces: 2\\\\n23.5698 printShowingDecimalPlaces: 2\\\\n-234.567 printShowingDecimalPlaces: 5\\\\n23.4567 printShowingDecimalPlaces: 0\\\\n100000000 printShowingDecimalPlaces: 1\\\\n\\\\\\\"! !\\\\n\\\\n!Number methodsFor: 'converting'!\\\\n@ y \\\\n\\\\t\\\\\\\"Primitive. Answer a Point whose x value is the receiver and whose y \\\\n\\\\tvalue is the argument. Optional. No Lookup. See Object documentation \\\\n\\\\twhatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 18>\\\\n\\\\t^Point x: self y: y! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'di 11/6/1998 13:43'!\\\\nadaptToCollection: rcvr andSend: selector\\\\n\\\\t\\\\\\\"If I am involved in arithmetic with a Collection, return a Collection of\\\\n\\\\tthe results of each element combined with me in that expression.\\\\\\\"\\\\n\\\\n\\\\t^ rcvr collect: [:element | element perform: selector with: self]! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'di 11/6/1998 13:21'!\\\\nadaptToFloat: rcvr andSend: selector \\\\n\\\\t\\\\\\\"If I am involved in arithmetic with a Float, convert me to a Float.\\\\\\\"\\\\n\\\\t^ rcvr perform: selector with: self asFloat! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'di 11/6/1998 13:44'!\\\\nadaptToFraction: rcvr andSend: selector\\\\n\\\\t\\\\\\\"If I am involved in arithmetic with a Fraction, convert us and evaluate exprBlock.\\\\\\\"\\\\n\\\\t^ self subclassResponsibility! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'di 11/6/1998 13:44'!\\\\nadaptToInteger: rcvr andSend: selector\\\\n\\\\t\\\\\\\"If I am involved in arithmetic with a Integer, convert us and evaluate exprBlock.\\\\\\\"\\\\n\\\\t^ self subclassResponsibility! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'di 11/6/1998 13:44'!\\\\nadaptToPoint: rcvr andSend: selector\\\\n\\\\t\\\\\\\"If I am involved in arithmetic with a Point, convert me to a Point.\\\\\\\"\\\\n\\\\t^ rcvr perform: selector with: self@self! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'RAH 4/25/2000 19:49'!\\\\nadaptToScaledDecimal: receiverScaledDecimal andSend: arithmeticOpSelector \\\\n\\\\t\\\\\\\"Do any required conversion and then the arithmetic. \\\\n\\\\treceiverScaledDecimal arithmeticOpSelector self.\\\\\\\"\\\\n\\\\t#Numeric.\\\\n\\\\t\\\\\\\"add 200/01/19 For ScaledDecimal support.\\\\\\\"\\\\n\\\\t^ self subclassResponsibility! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'di 11/6/1998 13:45'!\\\\nadaptToString: rcvr andSend: selector\\\\n\\\\t\\\\\\\"If I am involved in arithmetic with a String, convert it to a Number.\\\\\\\"\\\\n\\\\t^ rcvr asNumber perform: selector with: self! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'ar 5/20/2001 01:40'!\\\\nasB3DVector3\\\\n\\\\t^self@self@self! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'brp 5/13/2003 10:13'!\\\\nasDuration\\\\n\\\\n\\\\n\\\\n\\\\t^ Duration nanoSeconds: self asInteger\\\\n\\\\n! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'RAH 4/25/2000 19:49'!\\\\nasFloatD\\\\n\\\\t\\\\\\\"Answer a d precision floating-point number approximating the receiver.\\\\\\\"\\\\n\\\\t#Numeric.\\\\n\\\\t\\\\\\\"add 200/01/19 For ANSI <number> protocol.\\\\\\\"\\\\n\\\\t^ self asFloat! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'RAH 4/25/2000 19:49'!\\\\nasFloatE\\\\n\\\\t\\\\\\\"Answer a floating-point number approximating the receiver.\\\\\\\"\\\\n\\\\t#Numeric.\\\\n\\\\t\\\\\\\"add 200/01/19 For ANSI <number> protocol.\\\\\\\"\\\\n\\\\t^ self asFloat! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'RAH 4/25/2000 19:49'!\\\\nasFloatQ\\\\n\\\\t\\\\\\\"Answer a floating-point number approximating the receiver.\\\\\\\"\\\\n\\\\t#Numeric.\\\\n\\\\t\\\\\\\"add 200/01/19 For ANSI <number> protocol.\\\\\\\"\\\\n\\\\t^ self asFloat! !\\\\n\\\\n!Number methodsFor: 'converting'!\\\\nasInteger\\\\n\\\\t\\\\\\\"Answer an Integer nearest the receiver toward zero.\\\\\\\"\\\\n\\\\n\\\\t^self truncated! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'sw 2/16/1999 18:15'!\\\\nasNumber\\\\n\\\\t^ self! !\\\\n\\\\n!Number methodsFor: 'converting'!\\\\nasPoint\\\\n\\\\t\\\\\\\"Answer a Point with the receiver as both coordinates; often used to \\\\n\\\\tsupply the same value in two dimensions, as with symmetrical gridding \\\\n\\\\tor scaling.\\\\\\\"\\\\n\\\\n\\\\t^self @ self! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'dtl 9/25/2004 11:47'!\\\\nasScaledDecimal\\\\n\\\\t\\\\\\\"Answer a scaled decimal number approximating the receiver.\\\\\\\"\\\\n\\\\t#Numeric.\\\\n\\\\n\\\\t^ self asScaledDecimal: 8\\\\n! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'RAH 4/25/2000 19:49'!\\\\nasScaledDecimal: scale \\\\n\\\\t\\\\\\\"Answer a scaled decimal number, with a fractional precision of scale, \\\\n\\\\tapproximating the receiver.\\\\\\\"\\\\n\\\\t#Numeric.\\\\n\\\\t\\\\\\\"add 200/01/19 For number protocol.\\\\\\\"\\\\n\\\\t^ ScaledDecimal newFromNumber: self scale: scale! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'sw 9/8/97 16:30'!\\\\nasSmallAngleDegrees\\\\n\\\\t\\\\\\\"Return the receiver normalized to lie within the range (-180, 180)\\\\\\\"\\\\n\\\\n\\\\t| pos |\\\\n\\\\tpos _ self \\\\\\\\\\\\\\\\ 360.\\\\n\\\\tpos > 180 ifTrue: [pos _ pos - 360].\\\\n\\\\t^ pos\\\\n\\\\n\\\\\\\"#(-500 -300 -150 -5 0 5 150 300 500 1200) collect: [:n | n asSmallAngleDegrees]\\\\\\\"! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'sw 10/7/1999 12:24'!\\\\nasSmallPositiveDegrees\\\\n\\\\t\\\\\\\"Return the receiver normalized to lie within the range (0, 360)\\\\\\\"\\\\n\\\\n\\\\t| result |\\\\n\\\\tresult _ self.\\\\n\\\\t[result < 0] whileTrue: [result _ result + 360].\\\\n\\\\t^ result \\\\\\\\\\\\\\\\ 360\\\\n\\\\n\\\\\\\"#(-500 -300 -150 -5 0 5 150 300 500 1200) collect: [:n | n asSmallPositiveDegrees]\\\\\\\"! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'brp 1/9/2004 06:12'!\\\\nday\\\\n\\\\n\\\\n\\\\n\\\\t^ self sign days! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'brp 5/16/2003 07:56'!\\\\ndays\\\\n\\\\n\\\\n\\\\n\\\\t^ Duration days: self! !\\\\n\\\\n!Number methodsFor: 'converting'!\\\\ndegreesToRadians\\\\n\\\\t\\\\\\\"The receiver is assumed to represent degrees. Answer the conversion to \\\\n\\\\tradians.\\\\\\\"\\\\n\\\\n\\\\t^self asFloat degreesToRadians! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'brp 1/9/2004 06:28'!\\\\nhour\\\\n\\\\n\\\\n\\\\n\\\\t^ self sign hours\\\\n\\\\n! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'brp 5/16/2003 07:56'!\\\\nhours\\\\n\\\\n\\\\n\\\\n\\\\t^ Duration hours: self! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'mk 10/27/2003 18:17'!\\\\ni\\\\n\\\\t^ Complex real: 0 imaginary: self! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'brp 1/9/2004 06:26'!\\\\nmilliSecond\\\\n\\\\n\\\\n\\\\n\\\\t^ self sign milliSeconds\\\\n\\\\n! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'brp 9/25/2003 13:16'!\\\\nmilliSeconds\\\\n\\\\n\\\\n\\\\n\\\\t^ Duration milliSeconds: self\\\\n\\\\n! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'brp 1/9/2004 06:16'!\\\\nminute\\\\n\\\\n\\\\n\\\\n\\\\t^ self sign minutes\\\\n\\\\n! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'brp 5/16/2003 07:56'!\\\\nminutes\\\\n\\\\n\\\\n\\\\n\\\\t^ Duration minutes: self! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'brp 1/9/2004 06:27'!\\\\nnanoSecond\\\\n\\\\n\\\\n\\\\n\\\\t^ self sign nanoSeconds\\\\n\\\\n! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'brp 5/16/2003 08:52'!\\\\nnanoSeconds\\\\n\\\\n\\\\n\\\\n\\\\t^ Duration nanoSeconds: self.! !\\\\n\\\\n!Number methodsFor: 'converting'!\\\\nradiansToDegrees\\\\n\\\\t\\\\\\\"The receiver is assumed to represent radians. Answer the conversion to \\\\n\\\\tdegrees.\\\\\\\"\\\\n\\\\n\\\\t^self asFloat radiansToDegrees! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'brp 1/9/2004 06:17'!\\\\nsecond\\\\n\\\\n\\\\n\\\\n\\\\t^ self sign seconds\\\\n\\\\n! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'brp 5/16/2003 07:57'!\\\\nseconds\\\\n\\\\n\\\\n\\\\n\\\\t^ Duration seconds: self! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'brp 5/21/2003 08:20'!\\\\nsign: aNumber\\\\n\\\\n\\\\t\\\\\\\"Return a Number with the same sign as aNumber\\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\t^ aNumber positive ifTrue: [self abs] ifFalse: [self abs negated].! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'brp 1/9/2004 06:19'!\\\\nweek\\\\n\\\\n\\\\n\\\\n\\\\t^ self sign weeks\\\\n\\\\n! !\\\\n\\\\n!Number methodsFor: 'converting' stamp: 'brp 5/16/2003 07:57'!\\\\nweeks\\\\n\\\\n\\\\n\\\\n\\\\t^ Duration weeks: self! !\\\\n\\\\n\\\\n!Number methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 00:07'!\\\\nbyteEncode:aStream\\\\n\\\\t^aStream writeNumber:self.\\\\n! !\\\\n\\\\n\\\\n!Number methodsFor: 'intervals'!\\\\nto: stop\\\\n\\\\t\\\\\\\"Answer an Interval from the receiver up to the argument, stop, \\\\n\\\\tincrementing by 1.\\\\\\\"\\\\n\\\\n\\\\t^Interval from: self to: stop by: 1! !\\\\n\\\\n!Number methodsFor: 'intervals'!\\\\nto: stop by: step\\\\n\\\\t\\\\\\\"Answer an Interval from the receiver up to the argument, stop, \\\\n\\\\tincrementing by step.\\\\\\\"\\\\n\\\\n\\\\t^Interval from: self to: stop by: step! !\\\\n\\\\n!Number methodsFor: 'intervals' stamp: 'tao 1/30/1999 08:58'!\\\\nto: stop by: step do: aBlock \\\\n\\\\t\\\\\\\"Normally compiled in-line, and therefore not overridable.\\\\n\\\\tEvaluate aBlock for each element of the interval (self to: stop by: \\\\nstep).\\\\\\\"\\\\n\\\\t| nextValue |\\\\n\\\\tnextValue _ self.\\\\n\\\\tstep = 0 ifTrue: [self error: 'step must be non-zero'].\\\\n\\\\tstep < 0\\\\n\\\\t\\\\tifTrue: [[stop <= nextValue]\\\\n\\\\t\\\\t\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[aBlock value: nextValue.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnextValue _ nextValue + step]]\\\\n\\\\t\\\\tifFalse: [[stop >= nextValue]\\\\n\\\\t\\\\t\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[aBlock value: nextValue.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnextValue _ nextValue + step]]! !\\\\n\\\\n!Number methodsFor: 'intervals'!\\\\nto: stop do: aBlock \\\\n\\\\t\\\\\\\"Normally compiled in-line, and therefore not overridable.\\\\n\\\\tEvaluate aBlock for each element of the interval (self to: stop by: 1).\\\\\\\"\\\\n\\\\t| nextValue |\\\\n\\\\tnextValue _ self.\\\\n\\\\t[nextValue <= stop]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[aBlock value: nextValue.\\\\n\\\\t\\\\t\\\\tnextValue _ nextValue + 1]! !\\\\n\\\\n\\\\n!Number methodsFor: 'mathematical functions'!\\\\narcCos \\\\n\\\\t\\\\\\\"The receiver is the cosine of an angle. Answer the angle measured in \\\\n\\\\tradians.\\\\\\\"\\\\n\\\\n\\\\t^self asFloat arcCos! !\\\\n\\\\n!Number methodsFor: 'mathematical functions'!\\\\narcSin\\\\n\\\\t\\\\\\\"The receiver is the sine of an angle. Answer the angle measured in \\\\n\\\\tradians.\\\\\\\"\\\\n\\\\n\\\\t^self asFloat arcSin! !\\\\n\\\\n!Number methodsFor: 'mathematical functions'!\\\\narcTan\\\\n\\\\t\\\\\\\"The receiver is the tangent of an angle. Answer the angle measured in \\\\n\\\\tradians.\\\\\\\"\\\\n\\\\n\\\\t^self asFloat arcTan! !\\\\n\\\\n!Number methodsFor: 'mathematical functions' stamp: 'jsp 2/24/1999 15:20'!\\\\narcTan: denominator\\\\n\\\\t\\\\\\\"The receiver is the tangent of an angle. Answer the angle measured in \\\\n\\\\tradians.\\\\\\\"\\\\n\\\\n\\\\t^(self asFloat) arcTan: denominator.! !\\\\n\\\\n!Number methodsFor: 'mathematical functions'!\\\\ncos\\\\n\\\\t\\\\\\\"The receiver represents an angle measured in radians. Answer its cosine.\\\\\\\"\\\\n\\\\n\\\\t^self asFloat cos! !\\\\n\\\\n!Number methodsFor: 'mathematical functions' stamp: 'sd 3/5/2004 10:04'!\\\\ndegreeCos\\\\n\\\\t\\\\\\\"Answer the cosine of the receiver taken as an angle in degrees.\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ (90 + self) degreeSin! !\\\\n\\\\n!Number methodsFor: 'mathematical functions' stamp: 'sd 3/5/2004 10:04'!\\\\ndegreeSin\\\\n\\\\t\\\\\\\"Answer the sine of the receiver taken as an angle in degrees.\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ self asFloat degreesToRadians sin! !\\\\n\\\\n!Number methodsFor: 'mathematical functions'!\\\\nexp\\\\n\\\\t\\\\\\\"Answer the exponential of the receiver as a floating point number.\\\\\\\"\\\\n\\\\n\\\\t^self asFloat exp! !\\\\n\\\\n!Number methodsFor: 'mathematical functions' stamp: 'jm 3/27/98 06:16'!\\\\nfloorLog: radix\\\\n\\\\t\\\\\\\"Answer the floor of the log base radix of the receiver.\\\\\\\"\\\\n\\\\n\\\\t^ self asFloat floorLog: radix\\\\n! !\\\\n\\\\n!Number methodsFor: 'mathematical functions' stamp: 'ar 8/31/2000 20:05'!\\\\ninterpolateTo: aNumber at: param\\\\n\\\\t^self + (aNumber - self * param)! !\\\\n\\\\n!Number methodsFor: 'mathematical functions'!\\\\nln\\\\n\\\\t\\\\\\\"Answer the natural log of the receiver.\\\\\\\"\\\\n\\\\n\\\\t^self asFloat ln! !\\\\n\\\\n!Number methodsFor: 'mathematical functions' stamp: 'di 9/8/1998 17:10'!\\\\nlog\\\\n\\\\t\\\\\\\"Answer the base-10 log of the receiver.\\\\\\\"\\\\n\\\\n\\\\t^self asFloat log! !\\\\n\\\\n!Number methodsFor: 'mathematical functions'!\\\\nlog: aNumber \\\\n\\\\t\\\\\\\"Answer the log base aNumber of the receiver.\\\\\\\"\\\\n\\\\n\\\\t^self ln / aNumber ln! !\\\\n\\\\n!Number methodsFor: 'mathematical functions' stamp: 'RJ 3/15/1999 19:35'!\\\\nraisedTo: aNumber \\\\n\\\\t\\\\\\\"Answer the receiver raised to aNumber.\\\\\\\"\\\\n\\\\n\\\\taNumber isInteger ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"Do the special case of integer power\\\\\\\"\\\\n\\\\t\\\\t^ self raisedToInteger: aNumber].\\\\n\\\\tself < 0 ifTrue:\\\\n\\\\t\\\\t[ self error: self printString, ' raised to a non-integer power' ].\\\\n\\\\taNumber = 0 ifTrue: [^ 1].\\\\t\\\\t\\\\\\\"Special case of exponent=0\\\\\\\"\\\\n\\\\t(self = 0) | (aNumber = 1) ifTrue:\\\\n\\\\t\\\\t[^ self].\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Special case of exponent=1\\\\\\\"\\\\n\\\\t^ (aNumber * self ln) exp\\\\t\\\\t\\\\\\\"Otherwise use logarithms\\\\\\\"! !\\\\n\\\\n!Number methodsFor: 'mathematical functions' stamp: 'RAH 4/25/2000 19:49'!\\\\nraisedToInteger: operand \\\\n\\\\t\\\\\\\"Answer the receiver raised to the power operand, an Integer.\\\\\\\"\\\\n\\\\t| count result |\\\\n\\\\t#Numeric.\\\\n\\\\t\\\\\\\"Changed 200/01/19 For ANSI <number> support.\\\\\\\"\\\\n\\\\toperand isInteger ifFalse: [^ ArithmeticError signal: 'parameter is not an Integer'\\\\\\\"<- Chg\\\\\\\"].\\\\n\\\\toperand = 0 ifTrue: [^ self class one].\\\\n\\\\toperand = 1 ifTrue: [^ self].\\\\n\\\\toperand < 0 ifTrue: [^ (self raisedToInteger: operand negated) reciprocal].\\\\n\\\\tcount := 1.\\\\n\\\\t[(count := count + count) < operand] whileTrue.\\\\n\\\\tresult := self class one.\\\\n\\\\t[count > 0]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[result := result * result.\\\\n\\\\t\\\\t\\\\t(operand bitAnd: count)\\\\n\\\\t\\\\t\\\\t\\\\t= 0 ifFalse: [result := result * self].\\\\n\\\\t\\\\t\\\\tcount := count bitShift: -1].\\\\n\\\\t^ result! !\\\\n\\\\n!Number methodsFor: 'mathematical functions'!\\\\nsin\\\\n\\\\t\\\\\\\"The receiver represents an angle measured in radians. Answer its sine.\\\\\\\"\\\\n\\\\n\\\\t^self asFloat sin! !\\\\n\\\\n!Number methodsFor: 'mathematical functions'!\\\\nsqrt\\\\n\\\\t\\\\\\\"Answer the square root of the receiver.\\\\\\\"\\\\n\\\\n\\\\t^self asFloat sqrt! !\\\\n\\\\n!Number methodsFor: 'mathematical functions'!\\\\nsquared\\\\n\\\\t\\\\\\\"Answer the receiver multipled by itself.\\\\\\\"\\\\n\\\\n\\\\t^self * self! !\\\\n\\\\n!Number methodsFor: 'mathematical functions'!\\\\ntan\\\\n\\\\t\\\\\\\"The receiver represents an angle measured in radians. Answer its \\\\n\\\\ttangent.\\\\\\\"\\\\n\\\\n\\\\t^self asFloat tan! !\\\\n\\\\n\\\\n!Number methodsFor: 'printing'!\\\\ndefaultLabelForInspector\\\\n\\\\t\\\\\\\"Answer the default label to be used for an Inspector window on the receiver.\\\\\\\"\\\\n\\\\n\\\\t^ super defaultLabelForInspector, ': ', self printString! !\\\\n\\\\n!Number methodsFor: 'printing' stamp: 'sw 6/29/1999 21:10'!\\\\nisOrAreStringWith: aNoun\\\\n\\\\t| result |\\\\n\\\\tresult _ self = 1\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[' is one ']\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self = 0\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[' are no ']\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[' are ', self printString, ' ']].\\\\n\\\\tresult _ result, aNoun.\\\\n\\\\tself = 1 ifFalse: [result _ result, 's'].\\\\n\\\\t^ result\\\\n\\\\n\\\\\\\"#(0 1 2 98.6) do:\\\\n\\\\t[:num | Transcript cr; show: 'There', (num isOrAreStringWith: 'way'), ' to skin a cat']\\\\\\\"! !\\\\n\\\\n!Number methodsFor: 'printing' stamp: 'laza 3/29/2004 12:53'!\\\\nprintOn: aStream\\\\n\\\\tself printOn: aStream base: 10! !\\\\n\\\\n!Number methodsFor: 'printing' stamp: 'laza 3/29/2004 12:55'!\\\\nprintOn: aStream base: base\\\\n\\\\t^self subclassResponsibility! !\\\\n\\\\n!Number methodsFor: 'printing' stamp: 'laza 3/30/2004 10:50'!\\\\nprintString\\\\n\\\\t^self printStringBase: 10! !\\\\n\\\\n!Number methodsFor: 'printing'!\\\\nprintStringBase: base\\\\n\\\\t^ String streamContents:\\\\n\\\\t\\\\t[:strm | self printOn: strm base: base]! !\\\\n\\\\n!Number methodsFor: 'printing' stamp: 'laza 3/29/2004 12:50'!\\\\nstoreOn: aStream \\\\n\\\\tself printOn: aStream! !\\\\n\\\\n!Number methodsFor: 'printing' stamp: 'laza 3/29/2004 12:59'!\\\\nstoreOn: aStream base: base\\\\n\\\\tself printOn: aStream base: base! !\\\\n\\\\n!Number methodsFor: 'printing'!\\\\nstoreStringBase: base\\\\n\\\\t^ String streamContents: [:strm | self storeOn: strm base: base]! !\\\\n\\\\n!Number methodsFor: 'printing' stamp: 'sw 7/1/1998 12:33'!\\\\nstringForReadout\\\\n\\\\t^ self rounded printString! !\\\\n\\\\n\\\\n!Number methodsFor: 'testing' stamp: 'sw 9/27/2001 17:26'!\\\\nbasicType\\\\n\\\\t\\\\\\\"Answer a symbol representing the inherent type of the receiver\\\\\\\"\\\\n\\\\n\\\\t^ #Number! !\\\\n\\\\n!Number methodsFor: 'testing'!\\\\neven\\\\n\\\\t\\\\\\\"Answer whether the receiver is an even number.\\\\\\\"\\\\n\\\\n\\\\t^self \\\\\\\\\\\\\\\\ 2 = 0! !\\\\n\\\\n!Number methodsFor: 'testing' stamp: 'sw 12/30/1998 13:21'!\\\\nisDivisibleBy: aNumber\\\\n\\\\taNumber = 0 ifTrue: [^ false].\\\\n\\\\taNumber isInteger ifFalse: [^ false].\\\\n\\\\t^ (self \\\\\\\\\\\\\\\\ aNumber) = 0! !\\\\n\\\\n!Number methodsFor: 'testing' stamp: 'tao 10/10/97 16:36'!\\\\nisInf\\\\n\\\\t^ false! !\\\\n\\\\n!Number methodsFor: 'testing' stamp: 'tao 4/19/98 23:33'!\\\\nisInfinite\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Number methodsFor: 'testing' stamp: 'tao 10/10/97 16:36'!\\\\nisNaN\\\\n\\\\t^ false! !\\\\n\\\\n!Number methodsFor: 'testing'!\\\\nisNumber\\\\n\\\\t^ true! !\\\\n\\\\n!Number methodsFor: 'testing'!\\\\nisZero\\\\n\\\\t^self = 0! !\\\\n\\\\n!Number methodsFor: 'testing' stamp: 'di 4/23/1998 11:18'!\\\\nnegative\\\\n\\\\t\\\\\\\"Answer whether the receiver is mathematically negative.\\\\\\\"\\\\n\\\\n\\\\t^ self < 0! !\\\\n\\\\n!Number methodsFor: 'testing'!\\\\nodd\\\\n\\\\t\\\\\\\"Answer whether the receiver is an odd number.\\\\\\\"\\\\n\\\\n\\\\t^self even == false! !\\\\n\\\\n!Number methodsFor: 'testing' stamp: 'di 4/23/1998 11:17'!\\\\npositive\\\\n\\\\t\\\\\\\"Answer whether the receiver is positive or equal to 0. (ST-80 protocol).\\\\n\\\\tSee also strictlyPositive\\\\\\\"\\\\n\\\\n\\\\t^ self >= 0! !\\\\n\\\\n!Number methodsFor: 'testing'!\\\\nsign\\\\n\\\\t\\\\\\\"Answer 1 if the receiver is greater than 0, -1 if less than 0, else 0.\\\\\\\"\\\\n\\\\n\\\\tself > 0 ifTrue: [^1].\\\\n\\\\tself < 0 ifTrue: [^-1].\\\\n\\\\t^0! !\\\\n\\\\n!Number methodsFor: 'testing' stamp: 'di 4/23/1998 11:02'!\\\\nstrictlyPositive\\\\n\\\\t\\\\\\\"Answer whether the receiver is mathematically positive.\\\\\\\"\\\\n\\\\n\\\\t^ self > 0! !\\\\n\\\\n\\\\n!Number methodsFor: 'truncation and round off'!\\\\nceiling\\\\n\\\\t\\\\\\\"Answer the integer nearest the receiver toward positive infinity.\\\\\\\"\\\\n\\\\n\\\\tself <= 0.0\\\\n\\\\t\\\\tifTrue: [^self truncated]\\\\n\\\\t\\\\tifFalse: [^self negated floor negated]! !\\\\n\\\\n!Number methodsFor: 'truncation and round off' stamp: 'di 2/19/98 21:58'!\\\\ndetentBy: detent atMultiplesOf: grid snap: snap\\\\n\\\\t\\\\\\\"Map all values that are within detent/2 of any multiple of grid to that multiple.  Otherwise, if snap is true, return self, meaning that the values in the dead zone will never be returned.  If snap is false, then expand the range between dead zones so that it covers the range between multiples of the grid, and scale the value by that factor.\\\\\\\"\\\\n\\\\t| r1 r2 |\\\\n\\\\tr1 _ self roundTo: grid.  \\\\\\\"Nearest multiple of grid\\\\\\\"\\\\n\\\\t(self roundTo: detent) = r1 ifTrue: [^ r1].  \\\\\\\"Snap to that multiple...\\\\\\\"\\\\n\\\\tsnap ifTrue: [^ self].  \\\\\\\"...or return self\\\\\\\"\\\\n\\\\n\\\\tr2 _ self < r1  \\\\\\\"Nearest end of dead zone\\\\\\\"\\\\n\\\\t\\\\tifTrue: [r1 - (detent asFloat/2)]\\\\n\\\\t\\\\tifFalse: [r1 + (detent asFloat/2)].\\\\n\\\\t\\\\\\\"Scale values between dead zones to fill range between multiples\\\\\\\"\\\\n\\\\t^ r1 + ((self - r2) * grid asFloat / (grid - detent))\\\\n\\\\\\\"\\\\n\\\\t(170 to: 190 by: 2) collect: [:a | a detentBy: 10 atMultiplesOf: 90 snap: true] \\\\t(170 to: 190 by: 2) collect: [:a | a detentBy: 10 atMultiplesOf: 90 snap: false]\\\\n\\\\t(3.9 to: 4.1 by: 0.02) collect: [:a | a detentBy: 0.1 atMultiplesOf: 1.0 snap: true] \\\\t(-3.9 to: -4.1 by: -0.02) collect: [:a | a detentBy: 0.1 atMultiplesOf: 1.0 snap: false]\\\\n\\\\\\\"! !\\\\n\\\\n!Number methodsFor: 'truncation and round off'!\\\\nfloor\\\\n\\\\t\\\\\\\"Answer the integer nearest the receiver toward negative infinity.\\\\\\\"\\\\n\\\\n\\\\t| truncation |\\\\n\\\\ttruncation _ self truncated.\\\\n\\\\tself >= 0 ifTrue: [^truncation].\\\\n\\\\tself = truncation\\\\n\\\\t\\\\tifTrue: [^truncation]\\\\n\\\\t\\\\tifFalse: [^truncation - 1]! !\\\\n\\\\n!Number methodsFor: 'truncation and round off' stamp: 'RAH 4/25/2000 19:49'!\\\\nfractionPart\\\\n\\\\t\\\\\\\"Answer the fractional part of the receiver.\\\\\\\"\\\\n\\\\t#Numeric.\\\\n\\\\t\\\\\\\"2000/03/04  Harmon R. Added ANSI <number> protocol\\\\\\\"\\\\n\\\\t^ self - self truncated! !\\\\n\\\\n!Number methodsFor: 'truncation and round off' stamp: 'RAH 4/25/2000 19:49'!\\\\nintegerPart\\\\n\\\\t\\\\\\\"Answer the integer part of the receiver.\\\\\\\"\\\\n\\\\t#Numeric.\\\\n\\\\t\\\\\\\"2000/03/04  Harmon R. Added ANSI <number> protocol\\\\\\\"\\\\n\\\\t^ self truncated! !\\\\n\\\\n!Number methodsFor: 'truncation and round off'!\\\\nreduce\\\\n    \\\\\\\"If self is close to an integer, return that integer\\\\\\\"\\\\n    ^ self! !\\\\n\\\\n!Number methodsFor: 'truncation and round off' stamp: 'di 10/4/1999 08:08'!\\\\nroundTo: quantum \\\\n\\\\t\\\\\\\"Answer the nearest number that is a multiple of quantum.\\\\\\\"\\\\n\\\\n\\\\t^(self / quantum) rounded * quantum! !\\\\n\\\\n!Number methodsFor: 'truncation and round off'!\\\\nroundUpTo: aNumber \\\\n\\\\t\\\\\\\"Answer the next multiple of aNumber toward infinity that is nearest the \\\\n\\\\treceiver.\\\\\\\"\\\\n\\\\n\\\\t^(self/aNumber) ceiling * aNumber! !\\\\n\\\\n!Number methodsFor: 'truncation and round off'!\\\\nrounded\\\\n\\\\t\\\\\\\"Answer the integer nearest the receiver.\\\\\\\"\\\\n\\\\n\\\\t^(self + (self sign / 2)) truncated! !\\\\n\\\\n!Number methodsFor: 'truncation and round off'!\\\\ntruncateTo: aNumber \\\\n\\\\t\\\\\\\"Answer the next multiple of aNumber toward zero that is nearest the \\\\n\\\\treceiver.\\\\\\\"\\\\n\\\\n\\\\t^(self quo: aNumber)\\\\n\\\\t\\\\t* aNumber! !\\\\n\\\\n!Number methodsFor: 'truncation and round off'!\\\\ntruncated\\\\n\\\\t\\\\\\\"Answer an integer nearest the receiver toward zero.\\\\\\\"\\\\n\\\\n\\\\t^self quo: 1! !\\\\n\\\\n\\\\n!Number methodsFor: '*eToys-printing' stamp: 'sw 10/31/97 13:54'!\\\\nnewTileMorphRepresentative\\\\n\\\\t^ TileMorph new addArrows; setLiteral: self; addSuffixIfCan\\\\n! !\\\\n\\\\n\\\\n!Number methodsFor: '*eToys-vocabulary' stamp: 'sw 8/3/2001 13:43'!\\\\nvocabularyDemanded\\\\n\\\\t\\\\\\\"Answer the vocabulary normally preferred by this object\\\\\\\"\\\\n\\\\n\\\\t^ Vocabulary numberVocabulary! !\\\\n\\\\n\\\\n!Number methodsFor: '*Morphic-NewCurve-testing' stamp: 'jmv 2/21/2006 13:15'!\\\\nisNonZero\\\\n\\\\t\\\\\\\"Return true for numbers not zero and false for all other\\\\n\\\\tobjects \\\\\\\"\\\\n\\\\t^ self isZero not! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nNumber class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!Number class methodsFor: 'instance creation' stamp: 'nice 5/1/2006 21:46'!\\\\nreadExactlyFrom: stringOrStream \\\\n\\\\t\\\\\\\"Answer a number as described on aStream. The number may\\\\n\\\\tinclude a leading radix specification, as in 16rFADE\\\\\\\"\\\\n\\\\t\\\\n\\\\t^(SqNumberParser on: stringOrStream) nextNumber! !\\\\n\\\\n!Number class methodsFor: 'instance creation' stamp: 'yo 8/28/2002 22:40'!\\\\nreadFrom: stringOrStream \\\\n\\\\t\\\\\\\"Answer a number as described on aStream.  The number may\\\\n\\\\tinclude a leading radix specification, as in 16rFADE\\\\\\\"\\\\n\\\\t| value base aStream sign |\\\\n\\\\taStream _ (stringOrStream isString)\\\\n\\\\t\\\\tifTrue: [ReadStream on: stringOrStream]\\\\n\\\\t\\\\tifFalse: [stringOrStream].\\\\n\\\\t(aStream nextMatchAll: 'NaN') ifTrue: [^ Float nan].\\\\n\\\\tsign _ (aStream peekFor: $-) ifTrue: [-1] ifFalse: [1].\\\\n\\\\t(aStream nextMatchAll: 'Infinity') ifTrue: [^ Float infinity * sign].\\\\n\\\\tbase _ 10.\\\\n\\\\tvalue _ Integer readFrom: aStream base: base.\\\\n\\\\t(aStream peekFor: $r)\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"<base>r<integer>\\\\\\\"\\\\n\\\\t\\\\t\\\\t(base _ value) < 2 ifTrue: [^self error: 'Invalid radix'].\\\\n\\\\t\\\\t\\\\t(aStream peekFor: $-) ifTrue: [sign _ sign negated].\\\\n\\\\t\\\\t\\\\tvalue _ Integer readFrom: aStream base: base].\\\\n\\\\t^ self readRemainderOf: value from: aStream base: base withSign: sign.! !\\\\n\\\\n!Number class methodsFor: 'instance creation' stamp: 'yo 8/28/2002 22:41'!\\\\nreadFrom: stringOrStream base: base\\\\n\\\\t\\\\\\\"Answer a number as described on aStream in the given number base.\\\\\\\"\\\\n\\\\n\\\\t| aStream sign |\\\\n\\\\taStream _ (stringOrStream isString)\\\\n\\\\t\\\\tifTrue: [ReadStream on: stringOrStream]\\\\n\\\\t\\\\tifFalse: [stringOrStream].\\\\n\\\\t(aStream nextMatchAll: 'NaN') ifTrue: [^ Float nan].\\\\n\\\\tsign _ (aStream peekFor: $-) ifTrue: [-1] ifFalse: [1].\\\\n\\\\t(aStream nextMatchAll: 'Infinity') ifTrue: [^ Float infinity * sign].\\\\n\\\\t^ self readRemainderOf: (Integer readFrom: aStream base: base)\\\\n\\\\t\\\\t\\\\tfrom: aStream base: base withSign: sign! !\\\\n\\\\n\\\\n!Number class methodsFor: 'private' stamp: 'dtl 7/3/2006 17:41'!\\\\nreadExponent: baseValue base: base from: aStream\\\\n\\\\t\\\\\\\"Complete creation of a number, reading exponent from aStream. Answer the\\\\n\\\\tnumber, or nil if parsing fails.\\\\n\\\\t<number>(e|d|q)<exponent>>\\\\\\\"\\\\n\\\\n\\\\t| sign exp value |\\\\n\\\\t('edq' includes: aStream next) ifFalse: [^ nil].\\\\n\\\\tsign := ((aStream peek) == $-)\\\\n\\\\t\\\\tifTrue: [aStream next. -1]\\\\n\\\\t\\\\tifFalse: [1].\\\\n\\\\t(aStream atEnd or: [(aStream peek digitValue between: 0 and: 9) not])\\\\n\\\\t\\\\tifTrue: [^ nil]. \\\\\\\"Avoid throwing an error\\\\\\\"\\\\n\\\\texp := (Integer readFrom: aStream base: 10) * sign.\\\\n\\\\tvalue := baseValue * (base raisedTo: exp).\\\\n\\\\t^ value\\\\n! !\\\\n\\\\n!Number class methodsFor: 'private' stamp: 'dtl 7/4/2006 08:32'!\\\\nreadRemainderOf: integerPart from: aStream base: base withSign: sign \\\\n\\\\t\\\\\\\"Read optional fractional part and exponent or decimal scale, and return the final result\\\\\\\"\\\\n\\\\t\\\\\\\"Changed 200/01/19 For ANSI Numeric Literals support.\\\\\\\"\\\\n\\\\t\\\\\\\"Number readFrom: '3r-22.2'\\\\\\\"\\\\n\\\\n\\\\t| value fractionDigits fracpos fractionPart fraction pos v foundDecimal |\\\\n\\\\t#Numeric.\\\\n\\\\tvalue := integerPart.\\\\n\\\\tfractionDigits := 0.\\\\n\\\\tfoundDecimal := false.\\\\n\\\\t(aStream peekFor: $.)\\\\n\\\\t\\\\tifTrue: [\\\\\\\"<integer>.<fraction>\\\\\\\"\\\\n\\\\t\\\\t\\\\tfoundDecimal := true.\\\\n\\\\t\\\\t\\\\t(aStream atEnd not\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [aStream peek digitValue between: 0 and: base - 1])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [fracpos := aStream position.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tfractionPart := Integer readFrom: aStream base: base.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tfraction := fractionPart asFloat\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t/ (base raisedTo: aStream position - fracpos).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tfractionDigits := aStream position - fracpos.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tvalue := value asFloat + fraction]].\\\\n\\\\n\\\\tpos := aStream position.\\\\n\\\\t(v := self readScaledDecimal: integerPart\\\\n\\\\t\\\\t\\\\tfractionPart: fractionPart\\\\n\\\\t\\\\t\\\\tdigits: fractionDigits\\\\n\\\\t\\\\t\\\\tbase: base\\\\n\\\\t\\\\t\\\\tsign: sign\\\\n\\\\t\\\\t\\\\tfrom: aStream)\\\\n\\\\t\\\\tifNil: [aStream position: pos]\\\\n\\\\t\\\\tifNotNil: [^ v \\\\\\\"<number>s<scale>>\\\\\\\"].\\\\n\\\\n\\\\tpos := aStream position.\\\\n\\\\t(v := self readExponent: value base: base from: aStream)\\\\n\\\\t\\\\tifNil: [aStream position: pos.\\\\n\\\\t\\\\t\\\\t(foundDecimal and: [fractionDigits = 0])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"oops - just <integer>.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taStream skip: -1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"un-gobble the period\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^ value * sign]]\\\\n\\\\t\\\\tifNotNil: [value := v \\\\\\\"<number>(e|d|q)<exponent>>\\\\\\\"].\\\\n\\\\n\\\\t(value isFloat\\\\n\\\\t\\\\t\\\\tand: [value = 0.0\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [sign = -1]])\\\\n\\\\t\\\\tifTrue: [^ Float negativeZero]\\\\n\\\\t\\\\tifFalse: [^ value * sign]! !\\\\n\\\\n!Number class methodsFor: 'private' stamp: 'md 7/15/2006 18:00'!\\\\nreadScaledDecimal: integerPart fractionPart: fractionPart digits: fractionDigits base: base sign: sign from: aStream \\\\n\\\\t\\\\\\\"Complete creation of a ScaledDecimal, reading scale from aStream. Answer\\\\n\\\\ta ScaledDecimal, or nil if parsing fails.\\\\n\\\\t<number>s[<scale>]\\\\\\\"\\\\n\\\\n\\\\t| scale decimalMultiplier decimalFraction |\\\\n\\\\taStream atEnd ifTrue: [^ nil].\\\\n\\\\t(aStream next == $s) ifFalse: [^ nil].\\\\n\\\\t\\\\\\\"<number>s<scale>\\\\\\\"\\\\n\\\\t(aStream atEnd not and: [aStream peek digitValue between: 0 and: 9])\\\\n\\\\t\\\\tifTrue: [scale := Integer readFrom: aStream]\\\\n\\\\t\\\\tifFalse: [^ nil].\\\\n\\\\tscale isNil\\\\n\\\\t\\\\tifTrue: [\\\\\\\"<number>s\\\\\\\"\\\\n\\\\t\\\\t\\\\tfractionDigits = 0\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"<integer>s\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tscale := 0]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\\\\"<integer>.<fraction>s\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tscale := fractionDigits]].\\\\n\\\\tfractionPart isNil\\\\n\\\\t\\\\tifTrue: [^ ScaledDecimal newFromNumber: integerPart * sign scale: scale]\\\\n\\\\t\\\\tifFalse: [decimalMultiplier := base raisedTo: fractionDigits.\\\\n\\\\t\\\\t\\\\tdecimalFraction := integerPart * decimalMultiplier + fractionPart * sign / decimalMultiplier.\\\\n\\\\t\\\\t\\\\t^ ScaledDecimal newFromNumber: decimalFraction scale: scale]! !\\\\nTestCase subclass: #NumberParsingTest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'KernelTests-Numbers'!\\\\n!NumberParsingTest commentStamp: 'dtl 11/24/2004 15:35' prior: 0!\\\\nTests to verify parsing of numbers from streams and strings.\\\\n\\\\nNote: ScaledDecimalTest contains related tests for parsing ScaledDecimal.!\\\\n\\\\n\\\\n!NumberParsingTest methodsFor: 'tests - Float' stamp: 'dtl 11/24/2004 14:29'!\\\\ntestFloatFromStreamAsNumber\\\\n\\\\t\\\\\\\"This covers parsing in Number>>readFrom:\\\\\\\"\\\\n\\\\n\\\\t| rs aFloat |\\\\n\\\\trs _ '10r-12.3456' readStream.\\\\n\\\\taFloat _ Number readFrom: rs.\\\\n\\\\tself assert: -12.3456 = aFloat.\\\\n\\\\tself assert: rs atEnd.\\\\n\\\\n\\\\trs _ '10r-12.3456e2' readStream.\\\\n\\\\taFloat _ Number readFrom: rs.\\\\n\\\\tself assert: -1234.56 = aFloat.\\\\n\\\\tself assert: rs atEnd.\\\\n\\\\n\\\\trs _ '10r-12.3456e2e2' readStream.\\\\n\\\\taFloat _ Number readFrom: rs.\\\\n\\\\tself assert: -1234.56 = aFloat.\\\\n\\\\tself assert: rs upToEnd = 'e2'.\\\\n\\\\n\\\\trs _ '10r-12.3456d2' readStream.\\\\n\\\\taFloat _ Number readFrom: rs.\\\\n\\\\tself assert: -1234.56 = aFloat.\\\\n\\\\tself assert: rs atEnd.\\\\n\\\\n\\\\trs _ '10r-12.3456q2' readStream.\\\\n\\\\taFloat _ Number readFrom: rs.\\\\n\\\\tself assert: -1234.56 = aFloat.\\\\n\\\\tself assert: rs atEnd.\\\\n\\\\n\\\\trs _ '-12.3456q2' readStream.\\\\n\\\\taFloat _ Number readFrom: rs.\\\\n\\\\tself assert: -1234.56 = aFloat.\\\\n\\\\tself assert: rs atEnd.\\\\n\\\\n\\\\trs _ '12.3456q2' readStream.\\\\n\\\\taFloat _ Number readFrom: rs.\\\\n\\\\tself assert: 1234.56 = aFloat.\\\\n\\\\tself assert: rs atEnd.\\\\n\\\\n\\\\trs _ '12.3456z2' readStream.\\\\n\\\\taFloat _ Number readFrom: rs.\\\\n\\\\tself assert: 12.3456 = aFloat.\\\\n\\\\tself assert: rs upToEnd = 'z2'.\\\\n! !\\\\n\\\\n!NumberParsingTest methodsFor: 'tests - Float' stamp: 'nice 4/28/2006 01:20'!\\\\ntestFloatFromStreamWithExponent\\\\n\\\\t\\\\\\\"This covers parsing in Number>>readFrom:\\\\\\\"\\\\n\\\\n\\\\t| rs aFloat |\\\\n\\\\trs _ '1.0e-14' readStream.\\\\n\\\\taFloat _ Number readFrom: rs.\\\\n\\\\tself assert: 1.0e-14 = aFloat.\\\\n\\\\tself assert: rs atEnd.\\\\n\\\\n\\\\trs _ '1.0e-14 1' readStream.\\\\n\\\\taFloat _ Number readFrom: rs.\\\\n\\\\tself assert: 1.0e-14 = aFloat.\\\\n\\\\tself assert: rs upToEnd = ' 1'.\\\\n\\\\n\\\\trs _ '1.0e-14eee' readStream.\\\\n\\\\taFloat _ Number readFrom: rs.\\\\n\\\\tself assert: 1.0e-14 = aFloat.\\\\n\\\\tself assert: rs upToEnd = 'eee'.\\\\n\\\\n\\\\trs _ '1.0e14e10' readStream.\\\\n\\\\taFloat _ Number readFrom: rs.\\\\n\\\\tself assert: 1.0e14 = aFloat.\\\\n\\\\tself assert: rs upToEnd = 'e10'.\\\\n\\\\n\\\\trs _ '1.0e+14e' readStream. \\\\\\\"Plus sign is not parseable\\\\\\\"\\\\n\\\\taFloat _ Number readFrom: rs.\\\\n\\\\tself assert: 1.0 = aFloat.\\\\n\\\\tself assert: rs upToEnd = 'e+14e'.\\\\n\\\\n\\\\trs _ '1.0e' readStream.\\\\n\\\\taFloat _ Number readFrom: rs.\\\\n\\\\tself assert: 1.0 = aFloat.\\\\n\\\\tself assert: rs upToEnd = 'e'.! !\\\\n\\\\n!NumberParsingTest methodsFor: 'tests - Float' stamp: 'dtl 11/24/2004 14:07'!\\\\ntestFloatFromStringAsNumber\\\\n\\\\t\\\\\\\"This covers parsing in Number>>readFrom:\\\\\\\"\\\\n\\\\n\\\\t| aFloat |\\\\n\\\\taFloat _ '10r-12.3456' asNumber.\\\\n\\\\tself assert: -12.3456 = aFloat.\\\\n\\\\taFloat _ '10r-12.3456e2' asNumber.\\\\n\\\\tself assert: -1234.56 = aFloat.\\\\n\\\\taFloat _ '10r-12.3456d2' asNumber.\\\\n\\\\tself assert: -1234.56 = aFloat.\\\\n\\\\taFloat _ '10r-12.3456q2' asNumber.\\\\n\\\\tself assert: -1234.56 = aFloat.\\\\n\\\\taFloat _ '-12.3456q2' asNumber.\\\\n\\\\tself assert: -1234.56 = aFloat.\\\\n\\\\taFloat _ '12.3456q2' asNumber.\\\\n\\\\tself assert: 1234.56 = aFloat.\\\\n! !\\\\n\\\\n!NumberParsingTest methodsFor: 'tests - Float' stamp: 'dtl 11/24/2004 14:12'!\\\\ntestFloatFromStringWithExponent\\\\n\\\\t\\\\\\\"This covers parsing in Number>>readFrom:\\\\\\\"\\\\n\\\\n\\\\t| aFloat |\\\\n\\\\taFloat _ '1.0e-14' asNumber.\\\\n\\\\tself assert: 1.0e-14 = aFloat.\\\\n\\\\taFloat _ '1.0e-14 1' asNumber.\\\\n\\\\tself assert: 1.0e-14 = aFloat.\\\\n\\\\taFloat _ '1.0e-14e' asNumber.\\\\n\\\\tself assert: 1.0e-14 = aFloat.\\\\n\\\\taFloat _ '1.0e14e' asNumber.\\\\n\\\\tself assert: 1.0e14 = aFloat.\\\\n\\\\taFloat _ '1.0e+14e' asNumber. \\\\\\\"Plus sign is not parseable\\\\\\\"\\\\n\\\\tself assert: 1.0 = aFloat.\\\\n! !\\\\n\\\\n!NumberParsingTest methodsFor: 'tests - Float' stamp: 'nice 4/28/2006 01:39'!\\\\ntestFloatReadError\\\\n\\\\t\\\\\\\"This covers parsing in Number>>readFrom:\\\\\\\"\\\\n\\\\n\\\\t| rs num |\\\\n\\\\trs := '1e' readStream.\\\\n\\\\tnum := Number readFrom: rs.\\\\n\\\\tself assert: 1 = num.\\\\n\\\\tself assert: rs upToEnd = 'e'.\\\\n\\\\t\\\\n\\\\trs := '1s' readStream.\\\\n\\\\tnum := Number readFrom: rs.\\\\n\\\\tself assert: 1 = num.\\\\n\\\\tself assert: rs upToEnd = 's'.\\\\n\\\\n\\\\trs := '1.' readStream.\\\\n\\\\tnum := Number readFrom: rs.\\\\n\\\\tself assert: 1 = num.\\\\n\\\\tself assert: num isInteger.\\\\n\\\\tself assert: rs upToEnd = '.'.\\\\n\\\\t\\\\n\\\\trs := '' readStream.\\\\n\\\\tself should: [Number readFrom: rs] raise: Error.\\\\n\\\\t\\\\n\\\\trs := 'foo' readStream.\\\\n\\\\tself should: [Number readFrom: rs] raise: Error.\\\\n\\\\n\\\\trs := 'radix' readStream.\\\\n\\\\tself should: [Number readFrom: rs] raise: Error.\\\\n\\\\t\\\\n\\\\trs := '.e0' readStream.\\\\n\\\\tself should: [Number readFrom: rs] raise: Error.\\\\n\\\\t\\\\n\\\\trs := '-.e0' readStream.\\\\n\\\\tself should: [Number readFrom: rs] raise: Error.\\\\n\\\\t\\\\n\\\\trs := '--1' readStream.\\\\n\\\\tself should: [Number readFrom: rs] raise: Error.! !\\\\n\\\\n!NumberParsingTest methodsFor: 'tests - Float' stamp: 'dtl 11/24/2004 18:16'!\\\\ntestFloatReadWithRadix\\\\n\\\\t\\\\\\\"This covers parsing in Number>>readFrom:\\\\n\\\\tNote: In most Smalltalk dialects, the radix notation is not used for numbers\\\\n\\\\twith exponents. In Squeak, a string with radix and exponent can be parsed,\\\\n\\\\tand the exponent is always treated as base 10 (not the base indicated in the\\\\n\\\\tradix prefix). I am not sure if this is a feature, a bug, or both, but the\\\\n\\\\tSqueak behavior is documented in this test. -dtl\\\\\\\"\\\\n\\\\n\\\\t| aNumber rs |\\\\n\\\\taNumber _ '2r1.0101e9' asNumber.\\\\n\\\\tself assert: 672.0 = aNumber.\\\\n\\\\tself assert: (Number readFrom: '2r1.0101e9') = (1.3125 * (2 raisedTo: 9)).\\\\n\\\\trs _ ReadStream on: '2r1.0101e9e9'.\\\\n\\\\tself assert: (Number readFrom: rs) = 672.0.\\\\n\\\\tself assert: rs upToEnd = 'e9'\\\\n! !\\\\n\\\\n\\\\n!NumberParsingTest methodsFor: 'tests - Integer' stamp: 'dtl 11/24/2004 14:05'!\\\\ntestIntegerFromString\\\\n\\\\t\\\\\\\"This covers parsing in Number>>readFrom:\\\\n\\\\tTrailing decimal points should be ignored.\\\\\\\"\\\\n\\\\n\\\\tself assert: ('123' asNumber == 123).\\\\n\\\\tself assert: ('-123' asNumber == -123).\\\\n\\\\tself assert: ('123.' asNumber == 123).\\\\n\\\\tself assert: ('-123.' asNumber == -123).\\\\n\\\\tself assert: ('123This is not to be read' asNumber == 123).\\\\n\\\\tself assert: ('123s could be confused with a ScaledDecimal' asNumber == 123).\\\\n\\\\tself assert: ('123e could be confused with a Float' asNumber == 123).\\\\n! !\\\\n\\\\n!NumberParsingTest methodsFor: 'tests - Integer' stamp: 'tween 7/8/2006 12:31'!\\\\ntestIntegerReadFrom\\\\n\\\\t\\\\\\\"Ensure remaining characters in a stream are not lost when parsing an integer.\\\\\\\"\\\\n\\\\n\\\\t| rs i s |\\\\n\\\\trs _ ReadStream on: '123s could be confused with a ScaledDecimal'.\\\\n\\\\ti _ Number readFrom: rs.\\\\n\\\\tself assert: i == 123.\\\\n\\\\ts _ rs upToEnd.\\\\n\\\\tself assert: 's could be confused with a ScaledDecimal' = s.\\\\n\\\\trs _ ReadStream on: '123.s could be confused with a ScaledDecimal'.\\\\n\\\\ti _ Number readFrom: rs.\\\\n\\\\tself assert: i == 123.\\\\n\\\\ts _ rs upToEnd.\\\\n\\\\tself assert: '.s could be confused with a ScaledDecimal' = s.\\\\n\\\\trs _ ReadStream on: '123sA has unary message sA'.\\\\n\\\\ti _ Number readFrom: rs.\\\\n\\\\tself assert: i == 123.\\\\n\\\\ts _ rs upToEnd.\\\\n\\\\tself assert: 'sA has unary message sA' = s.\\\\t\\\\n\\\\trs _ ReadStream on: '123sB has unary message sB'.\\\\n\\\\ti _ Number readFrom: rs.\\\\n\\\\tself assert: i == 123.\\\\n\\\\ts _ rs upToEnd.\\\\n\\\\tself assert: 'sB has unary message sB' = s.\\\\n! !\\\\n\\\\n!NumberParsingTest methodsFor: 'tests - Integer' stamp: 'dtl 11/24/2004 18:18'!\\\\ntestIntegerReadWithRadix\\\\n\\\\t\\\\\\\"This covers parsing in Number>>readFrom:\\\\n\\\\tNote: In most Smalltalk dialects, the radix notation is not used for numbers\\\\n\\\\twith exponents. In Squeak, a string with radix and exponent can be parsed,\\\\n\\\\tand the exponent is always treated as base 10 (not the base indicated in the\\\\n\\\\tradix prefix). I am not sure if this is a feature, a bug, or both, but the\\\\n\\\\tSqueak behavior is documented in this test. -dtl\\\\\\\"\\\\n\\\\n\\\\t| aNumber rs |\\\\n\\\\taNumber _ '2r1e26' asNumber.\\\\n\\\\tself assert: 67108864 = aNumber.\\\\n\\\\tself assert: (Number readFrom: '2r1e26') = (2 raisedTo: 26).\\\\n\\\\trs _ '2r1e26eee' readStream.\\\\n\\\\tself assert: (Number readFrom: rs) = 67108864.\\\\n\\\\tself assert: rs upToEnd = 'eee'\\\\n! !\\\\nClassTestCase subclass: #NumberTest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'KernelTests-Numbers'!\\\\n\\\\n!NumberTest methodsFor: 'tests' stamp: 'fbs 3/8/2006 11:24'!\\\\ntestPrintShowingDecimalPlaces\\\\n\\\\n\\\\tself assert: (111.2 printShowingDecimalPlaces: 2) = '111.20'.\\\\n\\\\tself assert: (111.2 printShowingDecimalPlaces: 0) = '111'.\\\\n\\\\tself assert: (111 printShowingDecimalPlaces: 0) = '111'.\\\\n\\\\tself assert: (111111111111111 printShowingDecimalPlaces: 2) = '111111111111111.00'.\\\\n\\\\tself assert: (10 printShowingDecimalPlaces: 20) ='10.00000000000000000000'.\\\\n! !\\\\n\\\\n!NumberTest methodsFor: 'tests' stamp: 'sd 6/5/2005 08:56'!\\\\ntestReadFrom\\\\n\\\\t\\\\n\\\\tself assert: 1.0e-14\\\\t= (Number readFrom: '1.0e-14').\\\\n\\\\tself assert: 2r1e26\\\\t= (Number readFrom: '2r1e26').! !\\\\nDataType subclass: #NumberType\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Protocols-Type Vocabularies'!\\\\n!NumberType commentStamp: 'sw 10/3/2002 02:18' prior: 0!\\\\nNumberType is a data type representing a numeric value.!\\\\n\\\\n\\\\n!NumberType methodsFor: 'initial value' stamp: 'sw 9/27/2001 17:29'!\\\\ninitialValueForASlotFor: aPlayer\\\\n\\\\t\\\\\\\"Answer the value to give initially to a newly created slot of the given type in the given player\\\\\\\"\\\\n\\\\n\\\\t^ (1 to: 9) atRandom! !\\\\n\\\\n\\\\n!NumberType methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:39'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Initialize the receiver (automatically called when instances are created via 'new')\\\\\\\"\\\\n\\\\n\\\\t| aMethodCategory aMethodInterface |\\\\n\\\\tsuper initialize.\\\\n\\\\t\\\\\\\"Vocabulary replaceNumberVocabulary\\\\\\\"\\\\n\\\\t\\\\\\\"Vocabulary addVocabulary: Vocabulary newNumberVocabulary\\\\\\\"\\\\n\\\\n\\\\tself vocabularyName: #Number.\\\\n\\\\tself documentation: 'Numbers are things that can do arithmetic, have their magnitudes compared, etc.'.\\\\n\\\\n#((comparing\\\\t\\\\t\\\\t\\\\t'Determining which of two numbers is larger'\\\\n\\\\t\\\\t(= < > <= >= ~= ~~))\\\\n(arithmetic \\\\t\\\\t\\\\t\\\\t'Basic numeric operation'\\\\n\\\\t\\\\t(* + - / // \\\\\\\\\\\\\\\\ abs negated quo: rem:))\\\\n(testing \\\\t\\\\t\\\\t\\\\t\\\\t'Testing a number'\\\\n\\\\t\\\\t(even isDivisibleBy: negative odd positive sign))\\\\n(#'mathematical functions'\\\\t'Trigonometric and exponential functions'\\\\n\\\\t\\\\t(cos exp ln log log: raisedTo: sin sqrt squared tan raisedToInteger:))\\\\n(converting \\\\t\\\\t\\\\t\\\\t'Converting a number to another form'\\\\n\\\\t\\\\t(@ asInteger asPoint degreesToRadians radiansToDegrees asSmallAngleDegrees asSmallPositiveDegrees))\\\\n(#'truncation and round off' 'Making a real number (with a decimal point) into an integer'\\\\n\\\\t\\\\t(ceiling floor roundTo: roundUpTo: rounded truncateTo: truncated))\\\\n) do:\\\\n\\\\n\\\\t\\\\t[:item | \\\\n\\\\t\\\\t\\\\taMethodCategory := ElementCategory new categoryName: item first.\\\\n\\\\t\\\\t\\\\taMethodCategory documentation: item second.\\\\n\\\\t\\\\t\\\\titem third do:\\\\n\\\\t\\\\t\\\\t\\\\t[:aSelector | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\taMethodInterface := MethodInterface new conjuredUpFor: aSelector class: (Number whichClassIncludesSelector: aSelector).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\taMethodInterface argumentVariables do:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:var | var variableType: #Number].\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(#(* + - / // \\\\\\\\\\\\\\\\ abs negated quo: rem:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcos exp ln log log: raisedTo: sin sqrt squared tan raisedToInteger:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tasInteger degreesToRadians radiansToDegrees asSmallAngleDegrees asSmallPositiveDegrees)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tincludes: aSelector) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[aMethodInterface resultType: #Number].\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(#( @  asPoint ) includes: aSelector) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[aMethodInterface resultType: #Point].\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(#(= < > <= >= ~= ~~ even isDivisibleBy: negative odd positive) includes: aSelector) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[aMethodInterface resultType: #Boolean].\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\taMethodInterface setNotToRefresh.  \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself atKey: aSelector putMethodInterface: aMethodInterface.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\taMethodCategory elementAt: aSelector put: aMethodInterface].\\\\n\\\\t\\\\t\\\\tself addCategory: aMethodCategory].\\\\n\\\\n\\\\\\\"\\\\n(('truncation and round off' ceiling detentBy:atMultiplesOf:snap: floor roundTo: roundUpTo: rounded truncateTo: truncated)\\\\n('testing' basicType even isDivisibleBy: isInf isInfinite isNaN isNumber isZero negative odd positive sign strictlyPositive)\\\\n('converting' @ adaptToCollection:andSend: adaptToFloat:andSend: adaptToFraction:andSend: adaptToInteger:andSend: adaptToPoint:andSend: adaptToString:andSend: asInteger asNumber asPoint asSmallAngleDegrees asSmallPositiveDegrees degreesToRadians radiansToDegrees)\\\\n('intervals' to: to:by: to:by:do: to:do:)\\\\n('printing' defaultLabelForInspector isOrAreStringWith: newTileMorphRepresentative printOn: printStringBase: storeOn: storeOn:base: storeStringBase: stringForReadout)\\\\n('comparing' closeTo:)\\\\n('filter streaming' byteEncode:)\\\\n('as yet unclassified' reduce)\\\\\\\"\\\\n\\\\n\\\\n\\\\n! !\\\\n\\\\n\\\\n!NumberType methodsFor: '*eToys-color' stamp: 'sw 9/27/2001 17:21'!\\\\ntypeColor\\\\n\\\\t\\\\\\\"Answer the color for tiles to be associated with objects of this type\\\\\\\"\\\\n\\\\n\\\\t^ self subduedColorFromTriplet: #(0.8 0.4 0.2)! !\\\\n\\\\n\\\\n!NumberType methodsFor: '*eToys-tiles' stamp: 'dgd 9/6/2003 20:30'!\\\\naddExtraItemsToMenu: aMenu forSlotSymbol: slotSym\\\\n\\\\t\\\\\\\"If the receiver has extra menu items to add to the slot menu, here is its chance to do it.  The defaultTarget of the menu is the player concerned.\\\\\\\"\\\\n\\\\n\\\\taMenu add: 'decimal places...' translated selector: #setPrecisionFor: argument: slotSym.\\\\n\\\\taMenu balloonTextForLastItem: 'Lets you choose how many decimal places should be shown in readouts for this variable' translated! !\\\\n\\\\n!NumberType methodsFor: '*eToys-tiles' stamp: 'sw 9/15/2002 16:50'!\\\\naddUserSlotItemsTo: aMenu slotSymbol: slotSym\\\\n\\\\t\\\\\\\"Optionally add items to the menu that pertain to a user-defined slot of the given symbol\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"aMenu add: 'decimal places...' selector: #setPrecisionFor: argument: slotSym\\\\n\\\\tNB: This item is now generically added for system as well as user slots, so the addition is now done in NubmerType.addExtraItemsToMenu:forSlotSymbol:\\\\\\\"! !\\\\n\\\\n!NumberType methodsFor: '*eToys-tiles' stamp: 'sw 9/27/2001 02:53'!\\\\ncomparatorForSampleBoolean\\\\n\\\\t\\\\\\\"Answer the comparator to use in tile coercions involving the receiver; normally, the equality comparator is used but NumberType overrides\\\\\\\"\\\\n\\\\n\\\\t^ #<! !\\\\n\\\\n!NumberType methodsFor: '*eToys-tiles' stamp: 'sw 9/27/2001 17:30'!\\\\ndefaultArgumentTile\\\\n\\\\t\\\\\\\"Answer a tile to represent the type\\\\\\\"\\\\n\\\\n\\\\t^ 5 newTileMorphRepresentative typeColor: self typeColor! !\\\\n\\\\n!NumberType methodsFor: '*eToys-tiles' stamp: 'sw 9/27/2001 17:37'!\\\\nnewReadoutTile\\\\n\\\\t\\\\\\\"Answer a tile that can serve as a readout for data of this type\\\\\\\"\\\\n\\\\n\\\\t^ NumericReadoutTile new typeColor: Color lightGray lighter! !\\\\n\\\\n!NumberType methodsFor: '*eToys-tiles' stamp: 'sw 9/26/2001 03:11'!\\\\nwantsAssignmentTileVariants\\\\n\\\\t\\\\\\\"Answer whether an assignment tile for a variable of this type should show variants to increase-by, decrease-by, multiply-by.\\\\\\\"\\\\n\\\\n\\\\t^ true! !\\\\n\\\\n!NumberType methodsFor: '*eToys-tiles' stamp: 'sw 9/26/2001 03:18'!\\\\nwantsSuffixArrow\\\\n\\\\t\\\\\\\"Answer whether a tile showing data of this type would like to have a suffix arrow\\\\\\\"\\\\n\\\\n\\\\t^ true! !\\\\nTileMorph subclass: #NumericReadoutTile\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'EToys-Scripting Tiles'!\\\\n\\\\n!NumericReadoutTile methodsFor: 'accessing' stamp: 'ar 9/15/2000 23:27'!\\\\nabandonLabelFocus\\\\n\\\\t| aLabel |\\\\n\\\\t\\\\\\\"If the receiver's label has editing focus, abandon it\\\\\\\"\\\\n\\\\tself flag: #arNote. \\\\\\\"Probably unnecessary\\\\\\\"\\\\n\\\\t(aLabel _ self labelMorph) ifNotNil:\\\\n\\\\t\\\\t[aLabel hasFocus ifTrue:\\\\n\\\\t\\\\t\\\\t[aLabel contents: aLabel readFromTarget.\\\\n\\\\t\\\\t\\\\taLabel handsWithMeForKeyboardFocus do:\\\\n\\\\t\\\\t\\\\t\\\\t[:aHand | aHand releaseKeyboardFocus]]]! !\\\\n\\\\n!NumericReadoutTile methodsFor: 'accessing' stamp: 'tak 12/6/2004 01:53'!\\\\nliteralFromContents\\\\n\\\\t| label |\\\\n\\\\tlabel _ self labelMorph\\\\n\\\\t\\\\t\\\\t\\\\tifNil: [^ super literal].\\\\n\\\\tlabel step.\\\\n\\\\t^ literal _ label valueFromContents! !\\\\n\\\\n!NumericReadoutTile methodsFor: 'accessing' stamp: 'tak 4/6/2005 14:10'!\\\\nliteral: anObject \\\\n\\\\tliteral := anObject.\\\\n\\\\tself updateLiteralLabel.\\\\n\\\\tself labelMorph\\\\n\\\\t\\\\tifNotNilDo: [:label | label informTarget]! !\\\\n\\\\n\\\\n!NumericReadoutTile methodsFor: 'literal' stamp: 'sw 9/15/1999 15:14'!\\\\nsetLiteralTo: anObject width: w\\\\n\\\\t\\\\\\\"like literal:width: but does not inform the target\\\\\\\"\\\\n\\\\tliteral _ anObject.\\\\n\\\\tself updateLiteralLabel.\\\\n\\\\tsubmorphs last setWidth: w.\\\\n\\\\tself updateLiteralLabel! !\\\\n\\\\n\\\\n!NumericReadoutTile methodsFor: 'misc' stamp: 'sw 9/17/1999 08:01'!\\\\nbasicWidth\\\\n\\\\t^ 26! !\\\\n\\\\n!NumericReadoutTile methodsFor: 'misc' stamp: 'sw 9/17/1999 08:18'!\\\\nminimumWidth\\\\n\\\\t^ 40! !\\\\n\\\\n\\\\n!NumericReadoutTile methodsFor: 'mouse' stamp: 'ar 10/25/2000 18:07'!\\\\nhandlesMouseMove: evt\\\\n\\\\t^true! !\\\\n\\\\n\\\\n!NumericReadoutTile methodsFor: 'parts bin' stamp: 'sw 11/15/2001 20:22'!\\\\ninitializeToStandAlone\\\\n\\\\t\\\\\\\"Enclose my prototype in a SyntaxMorph.  For the ObjectTool\\\\\\\"\\\\n\\\\n\\\\t| aWatcher aTile aLine aColor ms slotMsg |\\\\n\\\\n\\\\tsuper initializeToStandAlone.\\\\n\\\\taColor _ Color r: 0.387 g: 0.581 b: 1.0.\\\\n\\\\taTile _ self typeColor: aColor.\\\\n\\\\taWatcher _ UpdatingStringMorph new.\\\\n\\\\taWatcher growable: true;\\\\n\\\\t\\\\tgetSelector: nil;\\\\n\\\\t\\\\tputSelector: nil;\\\\n\\\\t\\\\tsetToAllowTextEdit.\\\\n\\\\taWatcher target: nil.\\\\n\\\\taTile addMorphBack: aWatcher.\\\\n\\\\taTile addArrows.\\\\n\\\\taTile setLiteralTo: 5 width: 30.\\\\n\\\\n\\\\tms _ MessageSend receiver: nil selector: #aNumber arguments: #().\\\\n\\\\tslotMsg _ ms asTilesIn: Player globalNames: false.\\\\n\\\\t\\\\t\\\\\\\"For CardPlayers, use 'aPlayer'.  For others, name it, and use its name.\\\\\\\"\\\\n\\\\tms _ MessageSend receiver: 3 selector: #= asSymbol arguments: #(5).\\\\n\\\\taLine _ ms asTilesIn: Player globalNames: false.\\\\n\\\\taLine firstSubmorph delete.\\\\t\\\\t\\\\\\\"A little over-complicated?  Yes?\\\\\\\"\\\\n\\\\taLine addMorphFront: (slotMsg submorphs second) firstSubmorph.\\\\n\\\\taLine addMorphFront: (Morph new transparentSpacerOfSize: 3@3).\\\\n\\\\taLine lastSubmorph delete.\\\\n\\\\taLine lastSubmorph delete.\\\\n\\\\taLine color: aColor.\\\\n\\\\taLine addMorphBack: (Morph new transparentSpacerOfSize: 3@3).\\\\n\\\\taLine addMorphBack: aTile.\\\\n\\\\taLine cellPositioning: #leftCenter.\\\\n\\\\taWatcher step; fitContents.\\\\n\\\\t^ aLine markAsPartsDonor.! !\\\\n\\\\n\\\\n!NumericReadoutTile methodsFor: 'testing' stamp: 'tk 11/1/2001 12:41'!\\\\nbasicType\\\\n\\\\t\\\\\\\"Answer a symbol representing the inherent type I hold\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Number String Boolean player collection sound color etc\\\\\\\"\\\\n\\\\t^ #Number! !\\\\n\\\\n\\\\n!NumericReadoutTile methodsFor: 'event handling' stamp: 'tak 8/2/2005 23:36'!\\\\nmouseStillDown: evt \\\\n\\\\t(self labelMorph notNil\\\\n\\\\t\\\\t\\\\tand: [self labelMorph containsPoint: evt cursorPoint])\\\\n\\\\t\\\\tifTrue: [^ self labelMorph mouseDown: evt].\\\\n\\\\t^ super mouseStillDown: evt! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nNumericReadoutTile class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!NumericReadoutTile class methodsFor: 'instance creation' stamp: 'tk 12/14/2001 19:32'!\\\\nborderedPrototype\\\\n\\\\t\\\\\\\"Just number and up/down arrows\\\\\\\"\\\\n\\\\n\\\\t| aWatcher aTile |\\\\n\\\\n\\\\taTile _ self new typeColor: (Color r: 0.387 g: 0.581 b: 1.0).\\\\n\\\\taWatcher _ UpdatingStringMorph new.\\\\n\\\\taWatcher growable: true; setNameTo: 'value'.\\\\n\\\\taTile addMorphBack: aWatcher.\\\\n\\\\taTile addArrows; setNameTo: 'Number (mid)'.\\\\n\\\\taTile setLiteralTo: 5 width: 30.\\\\n\\\\taWatcher step; fitContents; setToAllowTextEdit.\\\\n\\\\t^ aTile extent: 30@24; markAsPartsDonor! !\\\\n\\\\n!NumericReadoutTile class methodsFor: 'instance creation' stamp: 'tk 12/14/2001 19:29'!\\\\nsimplePrototype\\\\n\\\\t\\\\\\\"Bare number readout.  Will keep up to data with a number once it has target, getterSelector, setterSelector.\\\\\\\"\\\\n\\\\n\\\\t^ (UpdatingStringMorph new) contents: '5'; growable: true; setToAllowTextEdit; \\\\n\\\\t\\\\tstep; fitContents; setNameTo: 'Number (bare)'; markAsPartsDonor! !\\\\n\\\\n!NumericReadoutTile class methodsFor: 'instance creation' stamp: 'nk 8/23/2004 18:11'!\\\\nsupplementaryPartsDescriptions\\\\n\\\\t\\\\\\\"Answer additional items for the parts bin\\\\\\\"\\\\n\\\\n\\\\tPreferences universalTiles ifFalse: [^ #()].\\\\n\\\\n\\\\t^ {DescriptionForPartsBin\\\\n\\\\t\\\\tformalName: 'Number (fancy)'\\\\n\\\\t\\\\tcategoryList: #('Basic')\\\\n\\\\t\\\\tdocumentation: 'A number readout for a Stack.  Shows current value.  Click and type the value.  Shift-click on title to edit.'\\\\n\\\\t\\\\tglobalReceiverSymbol: #NumericReadoutTile\\\\n\\\\t\\\\tnativitySelector: #authoringPrototype.\\\\n\\\\n\\\\t   DescriptionForPartsBin\\\\n\\\\t\\\\tformalName: 'Number (bare)'\\\\n\\\\t\\\\tcategoryList: #('Basic')\\\\n\\\\t\\\\tdocumentation: 'A number readout for a Stack.  Shows current value.  Click and type the value.'\\\\n\\\\t\\\\tglobalReceiverSymbol: #NumericReadoutTile\\\\n\\\\t\\\\tnativitySelector: #simplePrototype.\\\\n\\\\n\\\\t   DescriptionForPartsBin\\\\n\\\\t\\\\tformalName: 'Number (mid)'\\\\n\\\\t\\\\tcategoryList: #('Basic')\\\\n\\\\t\\\\tdocumentation: 'A number readout for a Stack.  Shows current value.  Click and type the value.'\\\\n\\\\t\\\\tglobalReceiverSymbol: #NumericReadoutTile\\\\n\\\\t\\\\tnativitySelector: #borderedPrototype}! !\\\\n\\\\n\\\\n!NumericReadoutTile class methodsFor: 'scripting' stamp: 'tk 12/14/2001 19:30'!\\\\nauthoringPrototype\\\\n\\\\t\\\\\\\"Enclose my prototype in a SyntaxMorph.\\\\\\\"\\\\n\\\\n\\\\t| aWatcher aTile aLine aColor ms slotMsg |\\\\n\\\\n\\\\taColor _ Color r: 0.387 g: 0.581 b: 1.0.\\\\n\\\\taTile _ self new typeColor: aColor.\\\\n\\\\taWatcher _ UpdatingStringMorph new.\\\\n\\\\taWatcher growable: true;\\\\n\\\\t\\\\tsetToAllowTextEdit;\\\\n\\\\t\\\\tgetSelector: nil;\\\\n\\\\t\\\\tputSelector: nil.\\\\n\\\\taWatcher target: nil.\\\\n\\\\taTile addMorphBack: aWatcher.\\\\n\\\\taTile addArrows.\\\\n\\\\taTile setLiteralTo: 5 width: 30.\\\\n\\\\n\\\\t\\\\\\\"This is the long way around to do this...\\\\\\\"\\\\n\\\\tms _ MessageSend receiver: nil selector: #aNumber arguments: #().\\\\n\\\\tslotMsg _ ms asTilesIn: Player globalNames: false.\\\\n\\\\t\\\\t\\\\\\\"For CardPlayers, use 'aPlayer'.  For others, name it, and use its name.\\\\\\\"\\\\n\\\\tms _ MessageSend receiver: 3 selector: #= asSymbol arguments: #(5).\\\\n\\\\taLine _ ms asTilesIn: Player globalNames: false.\\\\n\\\\taLine firstSubmorph delete.\\\\t\\\\n\\\\taLine addMorphFront: (slotMsg submorphs second) firstSubmorph.\\\\n\\\\taLine firstSubmorph setNameTo: 'label'.\\\\n\\\\taLine addMorphFront: (Morph new transparentSpacerOfSize: 3@3).\\\\n\\\\taLine lastSubmorph delete.\\\\n\\\\taLine lastSubmorph delete.\\\\n\\\\taLine color: aColor; setNameTo: 'Number (fancy)'.\\\\n\\\\taLine addMorphBack: (Morph new transparentSpacerOfSize: 3@3).\\\\n\\\\taLine addMorphBack: aTile.\\\\n\\\\taLine readOut setNameTo: 'value'.\\\\n\\\\taLine cellPositioning: #leftCenter.\\\\n\\\\taWatcher step; fitContents.\\\\n\\\\t^ aLine markAsPartsDonor.! !\\\\nOBAnnouncement subclass: #OBAboutToChange\\\\n\\\\tinstanceVariableNames: 'veto'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Announcements'!\\\\n\\\\n!OBAboutToChange methodsFor: 'vetos' stamp: 'cwp 4/17/2006 22:18'!\\\\nisVetoed\\\\n\\\\t^ veto notNil! !\\\\n\\\\n!OBAboutToChange methodsFor: 'vetos' stamp: 'cwp 4/17/2006 19:45'!\\\\nveto\\\\n\\\\tveto _ true! !\\\\nMessageSend subclass: #OBAction\\\\n\\\\tinstanceVariableNames: 'announcer dispatcher label buttonLabel keystroke icon'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Services'!\\\\n!OBAction commentStamp: 'cwp 3/4/2004 20:52' prior: 0!\\\\nActions represent commands for manipulating the graph domain. They can be made available through menus or buttons in the browser. They carry information on how they should be presented to the user, and are responsible for handling exceptions generated when they are triggered. Actions are created by Actors.\\\\n\\\\niVars: \\\\n\\\\nlabel \\\\t\\\\ta string which describes the action for the user.\\\\nmonitor  \\\\twhen the action is triggered, any notifications raised \\\\n\\\\t\\\\t\\\\twill be passed to this object for processing!\\\\n\\\\n\\\\n!OBAction methodsFor: 'accessing' stamp: 'cwp 6/4/2006 00:25'!\\\\nannouncer\\\\n\\\\t^ announcer! !\\\\n\\\\n!OBAction methodsFor: 'accessing' stamp: 'cwp 6/4/2006 00:25'!\\\\nannouncer: anAnnouncer\\\\n\\\\tannouncer _ anAnnouncer! !\\\\n\\\\n!OBAction methodsFor: 'accessing' stamp: 'cwp 3/10/2004 23:35'!\\\\nbuttonLabel\\\\n\\\\t^ buttonLabel! !\\\\n\\\\n!OBAction methodsFor: 'accessing' stamp: 'cwp 3/10/2004 23:35'!\\\\nbuttonLabel: aString\\\\n\\\\tbuttonLabel _ aString\\\\n\\\\t! !\\\\n\\\\n!OBAction methodsFor: 'accessing' stamp: 'hpt 5/17/2004 16:42'!\\\\nicon\\\\n\\\\t^icon! !\\\\n\\\\n!OBAction methodsFor: 'accessing' stamp: 'hpt 5/17/2004 16:42'!\\\\nicon: anIcon\\\\n\\\\ticon _ anIcon! !\\\\n\\\\n!OBAction methodsFor: 'accessing' stamp: 'hpt 5/17/2004 14:16'!\\\\nkeystroke\\\\n\\\\t^keystroke! !\\\\n\\\\n!OBAction methodsFor: 'accessing' stamp: 'hpt 5/17/2004 14:16'!\\\\nkeystroke: aChar\\\\n\\\\tkeystroke _ aChar! !\\\\n\\\\n!OBAction methodsFor: 'accessing' stamp: 'cwp 1/7/2004 09:11'!\\\\nlabel\\\\n\\\\t^ label! !\\\\n\\\\n!OBAction methodsFor: 'accessing' stamp: 'cwp 1/7/2004 09:12'!\\\\nlabel: aString\\\\n\\\\tlabel _ aString! !\\\\n\\\\n!OBAction methodsFor: 'accessing' stamp: 'cwp 3/10/2004 23:40'!\\\\nwantsButton\\\\n\\\\t^ buttonLabel notNil! !\\\\n\\\\n\\\\n!OBAction methodsFor: 'evaluating' stamp: 'cwp 1/7/2004 18:22'!\\\\nperform: aSelector orSendTo: anObject\\\\n\\\\t^ self perform: aSelector! !\\\\n\\\\n!OBAction methodsFor: 'evaluating' stamp: 'cwp 6/4/2006 00:58'!\\\\ntrigger\\\\n\\\\t[self value]\\\\n\\\\t\\\\ton: OBAnnouncerRequest\\\\n\\\\t\\\\tdo: [:notification | notification resume: announcer].! !\\\\n\\\\n\\\\n!OBAction methodsFor: 'morphic' stamp: 'hpt 5/17/2004 17:00'!\\\\naddItemToMenu: aMenu\\\\n\\\\taMenu\\\\n\\\\t\\\\tadd: self labelWithKeystroke\\\\n\\\\t\\\\ttarget: self \\\\n\\\\t\\\\tselector: #trigger.\\\\n\\\\tPreferences menuWithIcons & self icon notNil\\\\n\\\\t\\\\tifTrue: [aMenu lastItem icon: self icon].\\\\n\\\\taMenu addBlankIconsIfNecessary: MenuIcons blankIcon.! !\\\\n\\\\n!OBAction methodsFor: 'morphic' stamp: 'cwp 7/8/2006 12:55'!\\\\nbuttonLabelMorph\\\\n\\\\t^ StringMorph \\\\n\\\\t\\\\tcontents: self buttonLabel \\\\n\\\\t\\\\tfont: Preferences standardButtonFont! !\\\\n\\\\n!OBAction methodsFor: 'morphic' stamp: 'cwp 7/8/2006 12:54'!\\\\nbuttonMorph\\\\n\\\\t^ (PluggableButtonMorph\\\\n\\\\t\\\\ton: self\\\\n\\\\t\\\\tgetState: nil\\\\n\\\\t\\\\taction: #trigger\\\\n\\\\t\\\\tlabel: #buttonLabelMorph)\\\\t\\\\n\\\\t\\\\t\\\\tonColor: Color lightGray lighter offColor: Color lightGray twiceLighter;\\\\n\\\\t\\\\t\\\\tborderWidth: 2;\\\\n\\\\t\\\\t\\\\tborderRaised;\\\\n\\\\t\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\t\\\\tvResizing: #spaceFill;\\\\n\\\\t\\\\t\\\\tsetBalloonText: label! !\\\\n\\\\n!OBAction methodsFor: 'morphic' stamp: 'hpt 5/17/2004 14:17'!\\\\nlabelWithKeystroke\\\\n\\\\t^keystroke\\\\n\\\\t\\\\tifNil: [label]\\\\n\\\\t\\\\tifNotNil: [label, ' (', keystroke asString, ')']! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBAction class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBAction class methodsFor: 'instance creation' stamp: 'cwp 3/10/2004 23:36'!\\\\nlabel: aString buttonLabel: aString2 receiver: anObject selector: aSelector arguments: anArray\\\\n\\\\t^ (self receiver: anObject selector: aSelector arguments: anArray) \\\\n\\\\t\\\\tlabel: aString;\\\\n\\\\t\\\\tbuttonLabel: aString2! !\\\\n\\\\n!OBAction class methodsFor: 'instance creation' stamp: 'cwp 12/5/2004 18:49'!\\\\nlabel: aString buttonLabel: aString2 receiver: anObject selector: aSelector \\\\narguments: anArray keystroke: aChar icon: anIcon\\\\n\\\\t^ (self receiver: anObject selector: aSelector arguments: anArray) \\\\n\\\\t\\\\tlabel: aString;\\\\n\\\\t\\\\tbuttonLabel: aString2;\\\\n\\\\t\\\\tkeystroke: aChar;\\\\n\\\\t\\\\ticon: anIcon! !\\\\n\\\\n!OBAction class methodsFor: 'instance creation' stamp: 'cwp 1/7/2004 09:20'!\\\\nlabel: aString receiver: anObject selector: aSelector arguments: anArray\\\\n\\\\t^ (self receiver: anObject selector: aSelector arguments: anArray) label: aString! !\\\\n\\\\n!OBAction class methodsFor: 'instance creation' stamp: 'hpt 5/17/2004 16:50'!\\\\nlabel: aString receiver: anObject selector: aSelector arguments: anArray icon: anIcon\\\\n\\\\t^ (self receiver: anObject selector: aSelector arguments: anArray) \\\\n\\\\t\\\\tlabel: aString;\\\\n\\\\t\\\\ticon: anIcon! !\\\\n\\\\n!OBAction class methodsFor: 'instance creation' stamp: 'hpt 5/17/2004 14:16'!\\\\nlabel: aString receiver: anObject selector: aSelector arguments: anArray keystroke: aChar\\\\n\\\\t^ (self receiver: anObject selector: aSelector arguments: anArray) \\\\n\\\\t\\\\tlabel: aString;\\\\n\\\\t\\\\tkeystroke: aChar! !\\\\n\\\\n!OBAction class methodsFor: 'instance creation' stamp: 'hpt 5/17/2004 16:50'!\\\\nlabel: aString receiver: anObject selector: aSelector arguments: anArray keystroke: aChar icon: anIcon\\\\n\\\\t^ (self receiver: anObject selector: aSelector arguments: anArray) \\\\n\\\\t\\\\tlabel: aString;\\\\n\\\\t\\\\tkeystroke: aChar;\\\\n\\\\t\\\\ticon: anIcon! !\\\\nObject subclass: #OBActor\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Services'!\\\\n!OBActor commentStamp: 'cwp 1/7/2005 23:14' prior: 0!\\\\nActors provide the basic units of domain-related functionality. They are attached to metanodes, and supply the Actions used to build context menus and buttons in the browser. Actors can be proxies for functionality supplied by other classes, as in OBFileRegistryActor, or they may supply the funtionality them selves. \\\\n\\\\nOBActor is an abstract class which defines the protocol Actors must implement. Actors need not be subclasses of OBActor, however.!\\\\n\\\\n\\\\n!OBActor methodsFor: 'accessing' stamp: 'cwp 9/16/2004 23:25'!\\\\nactionWithLabel: aString selector: aSymbol \\\\n\\\\tself shouldBeImplemented! !\\\\n\\\\n\\\\n!OBActor methodsFor: 'public' stamp: 'cwp 2/4/2004 15:25'!\\\\nactionsForNode: aNode\\\\n\\\\t^#()! !\\\\n\\\\n!OBActor methodsFor: 'public' stamp: 'cwp 2/5/2004 20:12'!\\\\nactionsForParent: aNode\\\\n\\\\t^#()! !\\\\n\\\\n\\\\n!OBActor methodsFor: 'icons' stamp: 'cwp 7/10/2006 22:30'!\\\\ndeleteIcon\\\\n\\\\t^ MenuIcons tryIcons: #(deleteIcon smallDeleteIcon)! !\\\\n\\\\n!OBActor methodsFor: 'icons' stamp: 'cwp 7/10/2006 22:31'!\\\\nfindIcon\\\\n\\\\t^ MenuIcons tryIcons: #(findIcon smallFindIcon)! !\\\\n\\\\n!OBActor methodsFor: 'icons' stamp: 'cwp 7/10/2006 22:31'!\\\\nnewIcon\\\\n\\\\t^ MenuIcons tryIcons: #(newIcon smallNewIcon)! !\\\\nOBMethodCategoryNode subclass: #OBAllMethodCategoryNode\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBAllMethodCategoryNode commentStamp: 'cwp 1/8/2005 12:31' prior: 0!\\\\nOBAllMethodCategory implements the synthetic '-- all --' category, which contains all the methods in a class.!\\\\n\\\\n\\\\n!OBAllMethodCategoryNode methodsFor: 'accessing'!\\\\ncategory\\\\n\\\\t^ 'as yet unclassified'! !\\\\n\\\\n!OBAllMethodCategoryNode methodsFor: 'accessing'!\\\\nmethodReferences\\\\n\\\\t^ self theClass selectors asSortedArray \\\\n\\\\t\\\\tcollect: [:ea | MethodReference new setStandardClass: self theClass methodSymbol: ea]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBAllMethodCategoryNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBAllMethodCategoryNode class methodsFor: 'as yet unclassified'!\\\\non: className\\\\n\\\\t^ self on: '-- all --' inClass: className! !\\\\nObject subclass: #OBAnnouncement\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Announcements'!\\\\nObject subclass: #OBAnnouncer\\\\n\\\\tinstanceVariableNames: 'subscriptions'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Announcements'!\\\\n\\\\n!OBAnnouncer methodsFor: 'subscription' stamp: 'cwp 6/5/2006 00:39'!\\\\nannounce: anObject\\\\n\\\\n\\\\t| ann |\\\\n\\\\tann _ anObject asAnnouncement.\\\\n\\\\tsubscriptions keysAndValuesDo:\\\\n\\\\t\\\\t[:class :action |\\\\n\\\\t\\\\t(ann isKindOf: class) ifTrue: [action valueWithArguments: {ann}]].\\\\n\\\\t^ ann! !\\\\n\\\\n!OBAnnouncer methodsFor: 'subscription' stamp: 'cwp 6/3/2006 21:21'!\\\\nobserve: aClass do: aValuable \\\\n\\\\t| actions |\\\\n\\\\tactions _ subscriptions at: aClass ifAbsent: [ActionSequence new].\\\\n\\\\tsubscriptions at: aClass put: (actions copyWith: aValuable).! !\\\\n\\\\n!OBAnnouncer methodsFor: 'subscription' stamp: 'cwp 6/3/2006 23:31'!\\\\nobserve: aClass send: aSelector to: anObject\\\\n\\\\tself\\\\n\\\\t\\\\tobserve: aClass\\\\n\\\\t\\\\tdo: (MessageSend receiver: anObject selector: aSelector)! !\\\\n\\\\n!OBAnnouncer methodsFor: 'subscription' stamp: 'cwp 6/10/2006 00:40'!\\\\nunsubscribe: anObject\\\\n\\\\tsubscriptions keysAndValuesDo:\\\\n\\\\t\\\\t[:class :actions |\\\\n\\\\t\\\\tsubscriptions at: class put: (actions reject: [:ea | ea receiver == anObject])].\\\\n\\\\tsubscriptions keysAndValuesRemove: [:key :value | value isEmpty]! !\\\\n\\\\n\\\\n!OBAnnouncer methodsFor: 'initialize-release' stamp: 'cwp 4/17/2006 11:51'!\\\\ninitialize\\\\n\\\\tsubscriptions _ IdentityDictionary new.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBAnnouncer class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBAnnouncer class methodsFor: 'instance creation' stamp: 'cwp 6/4/2006 00:55'!\\\\ncurrent\\\\n\\\\t^ OBAnnouncerRequest signal! !\\\\n\\\\n!OBAnnouncer class methodsFor: 'instance creation' stamp: 'cwp 4/17/2006 11:50'!\\\\nnew\\\\n\\\\t^ self basicNew initialize! !\\\\nNotification subclass: #OBAnnouncerRequest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Notifications'!\\\\nOBInteractionRequest subclass: #OBBrowseRequest\\\\n\\\\tinstanceVariableNames: 'browser'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Notifications'!\\\\n!OBBrowseRequest commentStamp: 'cwp 12/7/2004 00:10' prior: 0!\\\\nThis notification is raised whenever a browser needs to be opened. The default action is to open a SystemWindow in Morphic, but it can be caught in situations where that's not appropriate. The OB test suite uses this extensively. !\\\\n\\\\n\\\\n!OBBrowseRequest methodsFor: 'accessing' stamp: 'cwp 10/17/2004 18:45'!\\\\nbrowser\\\\n\\\\t^ browser! !\\\\n\\\\n!OBBrowseRequest methodsFor: 'accessing' stamp: 'cwp 10/17/2004 18:45'!\\\\nbrowser: aBrowser\\\\n\\\\tbrowser _ aBrowser! !\\\\n\\\\n!OBBrowseRequest methodsFor: 'accessing' stamp: 'cwp 10/17/2004 21:27'!\\\\ndefaultAction\\\\n\\\\t^ browser openInMorphic! !\\\\n\\\\n\\\\n!OBBrowseRequest methodsFor: 'testing' stamp: 'cwp 10/17/2004 19:32'!\\\\nisBrowseRequest\\\\n\\\\t^ true! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBBrowseRequest class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBBrowseRequest class methodsFor: 'as yet unclassified' stamp: 'cwp 10/17/2004 18:45'!\\\\nsignal: aBrowser\\\\n\\\\t^ (self new browser: aBrowser) signal! !\\\\nObject subclass: #OBBrowser\\\\n\\\\tinstanceVariableNames: 'panels announcer'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Kernel'!\\\\n!OBBrowser commentStamp: 'cwp 1/7/2005 23:17' prior: 0!\\\\nOBBrowser is the core of OmniBrower. It's the root object for each browser and the model for the SystemWindows which display them. Its main responsibily is managing panels, particularly passing update messages between them.\\\\n\\\\nOn the class side, OBBrowser provides some default settings for creating and opening browsers. Subclasses can override these settings to acheive customized behavior.\\\\n\\\\niVars:\\\\n\\\\npanels\\\\t- A collection of objects which manage submorphs of the browser's SystemWindow.\\\\n\\\\ncVars:\\\\n\\\\nMetaGraphs - A dictionary matching names to metagraphs!\\\\n\\\\n\\\\n!OBBrowser methodsFor: 'accessing' stamp: 'cwp 6/4/2006 00:36'!\\\\naddPanel: aPanel\\\\n\\\\tpanels add: aPanel.\\\\n\\\\taPanel browser: self.\\\\n! !\\\\n\\\\n!OBBrowser methodsFor: 'accessing' stamp: 'cwp 4/17/2006 15:42'!\\\\nannouncer\\\\n\\\\t^ announcer! !\\\\n\\\\n!OBBrowser methodsFor: 'accessing' stamp: 'cwp 11/20/2004 21:00'!\\\\ncurrentNode\\\\n\\\\t^self navigationPanel currentNode! !\\\\n\\\\n!OBBrowser methodsFor: 'accessing' stamp: 'cwp 11/20/2004 21:00'!\\\\ncurrentOrRootNode\\\\n\\\\t^self navigationPanel currentOrRootNode! !\\\\n\\\\n!OBBrowser methodsFor: 'accessing' stamp: 'cwp 8/31/2004 13:04'!\\\\ndefaultLabel\\\\n\\\\t^ self class titleForRoot: self root! !\\\\n\\\\n!OBBrowser methodsFor: 'accessing' stamp: 'cwp 12/5/2004 16:25'!\\\\nnavigationPanel\\\\n\\\\t^ panels \\\\n\\\\t\\\\tdetect: [:ea | ea isNavigation] \\\\n\\\\t\\\\tifNone: [self error: 'No navigation panel configured']! !\\\\n\\\\n!OBBrowser methodsFor: 'accessing' stamp: 'cwp 9/17/2004 00:53'!\\\\npanels\\\\n\\\\t^ panels! !\\\\n\\\\n!OBBrowser methodsFor: 'accessing' stamp: 'cwp 6/28/2006 00:44'!\\\\nrequestor\\\\n\\\\t^ OBRequestor for: self! !\\\\n\\\\n!OBBrowser methodsFor: 'accessing' stamp: 'dvf 9/5/2005 17:30'!\\\\nselectionPath\\\\n\\\\t^self navigationPanel selectionPath! !\\\\n\\\\n\\\\n!OBBrowser methodsFor: 'callbacks' stamp: 'cwp 11/20/2004 21:05'!\\\\nlabelString\\\\n\\\\t| label |\\\\n\\\\tlabel := self navigationPanel labelString.\\\\n\\\\t^label \\\\n\\\\t\\\\tifNil: [self defaultLabel]\\\\n\\\\t\\\\tifNotNil: [self defaultLabel , ': ' , label]! !\\\\n\\\\n!OBBrowser methodsFor: 'callbacks' stamp: 'cwp 4/17/2006 19:52'!\\\\nokToChange\\\\n\\\\t^ (self announcer announce: OBAboutToChange) isVetoed not! !\\\\n\\\\n\\\\n!OBBrowser methodsFor: 'initializing' stamp: 'cwp 6/4/2006 14:09'!\\\\ninitialize\\\\n\\\\tpanels _ OrderedCollection new.\\\\n\\\\tannouncer _ OBAnnouncer new.\\\\n\\\\tself subscribe! !\\\\n\\\\n!OBBrowser methodsFor: 'initializing' stamp: 'cwp 12/5/2004 16:24'!\\\\nsetMetaNode: aMetaNode node: aNode \\\\n\\\\tself navigationPanel setMetaNode: aMetaNode node: aNode! !\\\\n\\\\n\\\\n!OBBrowser methodsFor: 'morphic' stamp: 'cwp 11/27/2004 22:21'!\\\\ndefaultBackgroundColor\\\\n\\\\t^ Color gray veryMuchLighter! !\\\\n\\\\n!OBBrowser methodsFor: 'morphic' stamp: 'cwp 12/5/2004 14:23'!\\\\nmorph\\\\n\\\\t| window |\\\\n\\\\twindow := SystemWindow labelled: self defaultLabel.\\\\n\\\\twindow model: self.\\\\n\\\\tpanels isEmpty ifFalse: [self morphicPanelLayout addMorphsTo: window].\\\\n\\\\t^window! !\\\\n\\\\n!OBBrowser methodsFor: 'morphic' stamp: 'cwp 11/21/2004 00:31'!\\\\nmorphicPanelLayout\\\\n\\\\t^ OBMorphicPanelLayout for: panels! !\\\\n\\\\n!OBBrowser methodsFor: 'morphic' stamp: 'cwp 11/21/2004 00:30'!\\\\nopenInMorphic\\\\n\\\\t^ self morph openInWorld! !\\\\n\\\\n\\\\n!OBBrowser methodsFor: 'navigating' stamp: 'cwp 11/20/2004 21:00'!\\\\njumpToRoot\\\\n\\\\t^self navigationPanel jumpToRoot! !\\\\n\\\\n!OBBrowser methodsFor: 'navigating' stamp: 'cwp 11/20/2004 21:00'!\\\\njumpTo: aNode \\\\n\\\\tself navigationPanel jumpTo: aNode! !\\\\n\\\\n!OBBrowser methodsFor: 'navigating' stamp: 'cwp 9/17/2005 17:48'!\\\\nroot\\\\n\\\\t^self navigationPanel root! !\\\\n\\\\n\\\\n!OBBrowser methodsFor: 'opening' stamp: 'cwp 10/17/2004 21:31'!\\\\nopen\\\\n\\\\t^ OBBrowseRequest signal: self! !\\\\n\\\\n\\\\n!OBBrowser methodsFor: 'updating' stamp: 'cwp 6/9/2006 23:29'!\\\\ndontTranscribe\\\\n\\\\tself announcer unsubscribe: self.\\\\n\\\\tself subscribe.! !\\\\n\\\\n!OBBrowser methodsFor: 'updating' stamp: 'cwp 4/24/2006 15:10'!\\\\nrelabel: ann\\\\n\\\\tself changed: #relabel.\\\\n! !\\\\n\\\\n!OBBrowser methodsFor: 'updating' stamp: 'cwp 6/4/2006 18:50'!\\\\nsignalRefresh\\\\n\\\\tself announcer announce: OBRefreshRequired! !\\\\n\\\\n!OBBrowser methodsFor: 'updating' stamp: 'cwp 6/6/2006 00:25'!\\\\nsubscribe\\\\n\\\\tself announcer \\\\n\\\\t\\\\tobserve: OBSelectionChanged send: #relabel: to: self! !\\\\n\\\\n!OBBrowser methodsFor: 'updating' stamp: 'cwp 6/6/2006 00:26'!\\\\ntranscribe\\\\n\\\\tself announcer observe: OBAnnouncement do: [:ann | Transcript cr; show: ann].! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBBrowser class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBBrowser class methodsFor: 'auto opening' stamp: 'cwp 12/6/2004 23:22'!\\\\nopen\\\\n\\\\t^ self new open! !\\\\n\\\\n!OBBrowser class methodsFor: 'auto opening' stamp: 'cwp 12/5/2004 17:03'!\\\\nopenRoot: rootNode selection: selectedNode\\\\n\\\\t^ (self root: rootNode selection: selectedNode) open! !\\\\n\\\\n\\\\n!OBBrowser class methodsFor: 'configuration' stamp: 'avi 9/17/2005 01:10'!\\\\ndefaultMetaNode\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n!OBBrowser class methodsFor: 'configuration' stamp: 'cwp 12/6/2004 23:20'!\\\\ndefaultRootNode\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n!OBBrowser class methodsFor: 'configuration' stamp: 'cwp 8/31/2004 11:10'!\\\\ndefinitionPanel\\\\n\\\\t^ OBDefinitionPanel new! !\\\\n\\\\n!OBBrowser class methodsFor: 'configuration' stamp: 'cwp 8/31/2004 11:01'!\\\\nmaxPanes\\\\n\\\\t^ self paneCount! !\\\\n\\\\n!OBBrowser class methodsFor: 'configuration' stamp: 'cwp 8/31/2004 11:00'!\\\\nminPanes\\\\n\\\\t^ self paneCount! !\\\\n\\\\n!OBBrowser class methodsFor: 'configuration' stamp: 'cwp 12/5/2004 16:55'!\\\\nnavigationPanel\\\\n\\\\t^ OBColumnPanel minPanes: self minPanes maxPanes: self maxPanes! !\\\\n\\\\n!OBBrowser class methodsFor: 'configuration' stamp: 'cwp 11/26/2004 22:27'!\\\\noptionalButtonPanel\\\\n\\\\t| labels panel |\\\\n\\\\tlabels _ self optionalButtons.\\\\n\\\\t(Preferences optionalButtons and: [labels isEmpty not]) ifTrue: \\\\n\\\\t\\\\t[panel _ OBFixedButtonPanel new.\\\\n\\\\t\\\\tlabels do: [:ea | panel addButtonWithLabel: ea]].\\\\n\\\\t^ panel! !\\\\n\\\\n!OBBrowser class methodsFor: 'configuration' stamp: 'cwp 8/31/2004 11:07'!\\\\noptionalButtons\\\\n\\\\t^ #()! !\\\\n\\\\n!OBBrowser class methodsFor: 'configuration' stamp: 'cwp 8/31/2004 11:01'!\\\\npaneCount\\\\n\\\\t^ 4! !\\\\n\\\\n!OBBrowser class methodsFor: 'configuration' stamp: 'cwp 12/5/2004 15:06'!\\\\npanels\\\\n\\\\t^ {self navigationPanel. self optionalButtonPanel. self definitionPanel} \\\\n\\\\t\\\\treject: [:ea | ea isNil]! !\\\\n\\\\n!OBBrowser class methodsFor: 'configuration' stamp: 'cwp 8/31/2004 11:32'!\\\\ntitle\\\\n\\\\t^ 'OmniBrowser'! !\\\\n\\\\n!OBBrowser class methodsFor: 'configuration' stamp: 'cwp 8/31/2004 13:02'!\\\\ntitleForRoot: aNode\\\\n\\\\t^ self title! !\\\\n\\\\n\\\\n!OBBrowser class methodsFor: 'instance creation' stamp: 'cwp 12/5/2004 18:12'!\\\\nmetaNode: metaNode node: rootNode \\\\n\\\\t^ self metaNode: metaNode root: rootNode selection: nil panels: self panels! !\\\\n\\\\n!OBBrowser class methodsFor: 'instance creation' stamp: 'avi 9/17/2005 01:16'!\\\\nmetaNode: metaNode root: rootNode selection: selectedNode\\\\n\\\\t^ self metaNode: metaNode root: rootNode selection: selectedNode panels: self panels! !\\\\n\\\\n!OBBrowser class methodsFor: 'instance creation' stamp: 'cwp 12/6/2004 21:59'!\\\\nmetaNode: metaNode root: rootNode selection: selectedNode panels: panels\\\\n\\\\t| browser |\\\\n\\\\tbrowser _ self basicNew initialize.\\\\n\\\\tpanels do: [:ea | browser addPanel: ea].\\\\n\\\\tbrowser setMetaNode: metaNode node: rootNode.\\\\n\\\\tselectedNode ifNotNil: [browser jumpTo: selectedNode].\\\\n\\\\t^ browser! !\\\\n\\\\n!OBBrowser class methodsFor: 'instance creation' stamp: 'avi 9/16/2005 23:25'!\\\\nnew\\\\n\\\\t^ self \\\\n\\\\t\\\\tmetaNode: self defaultMetaNode\\\\n\\\\t\\\\troot: self defaultRootNode\\\\n\\\\t\\\\tselection: nil\\\\n\\\\t\\\\tpanels: self panels! !\\\\n\\\\n!OBBrowser class methodsFor: 'instance creation' stamp: 'cwp 12/5/2004 15:26'!\\\\nroot: aNode \\\\n\\\\t^ self root: aNode selection: nil! !\\\\n\\\\n!OBBrowser class methodsFor: 'instance creation' stamp: 'avi 9/16/2005 23:25'!\\\\nroot: rootNode selection: selectedNode\\\\n\\\\t^ self metaNode: self defaultMetaNode root: rootNode selection: selectedNode panels: self panels! !\\\\n\\\\n!OBBrowser class methodsFor: 'instance creation' stamp: 'cwp 12/6/2004 22:04'!\\\\nselection: selectedNode\\\\n\\\\t^ self root: self defaultRootNode selection: selectedNode! !\\\\n\\\\nObject subclass: #OBButtonModel\\\\n\\\\tinstanceVariableNames: 'bar label'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Morphic'!\\\\n!OBButtonModel commentStamp: 'cwp 3/5/2004 12:15' prior: 0!\\\\nAn OBButtonModel serves as a model for PluggableButtonMorphs used OBRadioButtonBar. OBRadioButtonBar cannot be a direct model for its PBMs, since it can contain a variable number of buttons.\\\\n\\\\niVars:\\\\n\\\\nbar\\\\t\\\\t- the OBRadioButton bar to which this button belongs\\\\nlabel\\\\t- the label of the button!\\\\n\\\\n\\\\n!OBButtonModel methodsFor: 'accessing' stamp: 'cwp 2/24/2004 18:29'!\\\\nbar: aRadioButtonBar\\\\n\\\\tbar _ aRadioButtonBar! !\\\\n\\\\n!OBButtonModel methodsFor: 'accessing' stamp: 'cwp 3/2/2004 21:46'!\\\\nlabel\\\\n\\\\t^ label! !\\\\n\\\\n!OBButtonModel methodsFor: 'accessing' stamp: 'cwp 2/24/2004 18:29'!\\\\nlabel: aString\\\\n\\\\tlabel _ aString! !\\\\n\\\\n!OBButtonModel methodsFor: 'accessing' stamp: 'cwp 11/27/2004 00:50'!\\\\nselectionChanged\\\\n\\\\tself changed: #isSelected.\\\\n\\\\tself changed: #labelMorph! !\\\\n\\\\n\\\\n!OBButtonModel methodsFor: 'callbacks' stamp: 'cwp 2/24/2004 18:42'!\\\\nisSelected\\\\n\\\\t^ bar isSelected: self! !\\\\n\\\\n!OBButtonModel methodsFor: 'callbacks' stamp: 'cwp 2/28/2006 10:45'!\\\\nlabelMorph\\\\n\\\\t^ (StringMorph \\\\n\\\\t\\\\tcontents: self label \\\\n\\\\t\\\\tfont: TextStyle defaultFont)\\\\n\\\\t\\\\t\\\\tcolor: (self isEnabled ifTrue: [Color black] ifFalse: [Color gray]);\\\\n\\\\t\\\\t\\\\tyourself! !\\\\n\\\\n!OBButtonModel methodsFor: 'callbacks' stamp: 'cwp 2/24/2004 19:30'!\\\\npush\\\\n\\\\tbar push: self.! !\\\\n\\\\n\\\\n!OBButtonModel methodsFor: 'morphs' stamp: 'lr 3/23/2006 18:08'!\\\\nmorph\\\\n\\\\t| morph |\\\\n\\\\tmorph := PluggableButtonMorph\\\\n\\\\t\\\\ton: self\\\\n\\\\t\\\\tgetState: #isSelected\\\\n\\\\t\\\\taction: #push\\\\n\\\\t\\\\tlabel: #labelMorph.\\\\n\\\\tmorph \\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tvResizing: #spaceFill.\\\\n\\\\t^ morph! !\\\\n\\\\n\\\\n!OBButtonModel methodsFor: 'testing' stamp: 'cwp 11/27/2004 19:09'!\\\\nisEnabled\\\\n\\\\t^ bar isEnabled: self! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBButtonModel class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBButtonModel class methodsFor: 'as yet unclassified' stamp: 'cwp 8/29/2004 13:31'!\\\\noffColor\\\\n\\\\t^ Color lightGray twiceLighter! !\\\\n\\\\n!OBButtonModel class methodsFor: 'as yet unclassified' stamp: 'cwp 8/29/2004 13:30'!\\\\nonColor\\\\n\\\\t^ Color lightGray lighter! !\\\\n\\\\n!OBButtonModel class methodsFor: 'as yet unclassified' stamp: 'cwp 2/24/2004 18:35'!\\\\nwithLabel: aString inBar: aRadioButtonBar\\\\n\\\\t^ self new label: aString; bar: aRadioButtonBar! !\\\\nOBActor subclass: #OBCategoryActor\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Services'!\\\\n!OBCategoryActor commentStamp: 'cwp 1/7/2005 23:43' prior: 0!\\\\nOBCategory actor implements a number of actions useful for manipulating both class and method categories.!\\\\n\\\\n\\\\n!OBCategoryActor methodsFor: 'public' stamp: 'cwp 7/10/2006 21:33'!\\\\nactionsForNode: aNode\\\\n\\\\t^ Array\\\\n\\\\t\\\\twith: (OBAction\\\\n\\\\t\\\\t\\\\t\\\\tlabel: 'remove'\\\\n\\\\t\\\\t\\\\t\\\\treceiver: self\\\\n\\\\t\\\\t\\\\t\\\\tselector: #remove:\\\\n\\\\t\\\\t\\\\t\\\\targuments: {aNode}\\\\n\\\\t\\\\t\\\\t\\\\tkeystroke: $x\\\\n\\\\t\\\\t\\\\t\\\\ticon: self deleteIcon)\\\\n\\\\t\\\\twith: (OBAction\\\\n\\\\t\\\\t\\\\t\\\\tlabel: 'rename...'\\\\n\\\\t\\\\t\\\\t\\\\treceiver: self\\\\n\\\\t\\\\t\\\\t\\\\tselector: #rename:\\\\n\\\\t\\\\t\\\\t\\\\targuments: {aNode})! !\\\\n\\\\n!OBCategoryActor methodsFor: 'public' stamp: 'cwp 1/9/2005 11:30'!\\\\nactionsForParent: aNode\\\\n\\\\t| actions |\\\\n\\\\tactions _ self stdActionsForParent: aNode.\\\\n\\\\taNode organization \\\\n\\\\t\\\\t\\\\tisClassOrganizer ifTrue: [actions _ actions copyWith: (self categorizeActionFor: aNode)].\\\\n\\\\t^ actions! !\\\\n\\\\n\\\\n!OBCategoryActor methodsFor: 'actions' stamp: 'cwp 9/18/2005 19:20'!\\\\nalphabetizeCategoriesIn: aNode \\\\n\\\\taNode organization sortCategories.\\\\n\\\\taNode signalChildrenChanged! !\\\\n\\\\n!OBCategoryActor methodsFor: 'actions' stamp: 'cwp 9/18/2004 22:53'!\\\\ncategorizeIn: aClassOrganizer \\\\n\\\\t\\\\\\\"Categorize methods by looking in parent classes for a method category.\\\\\\\"\\\\n\\\\t| organizers |\\\\n\\\\torganizers := aClassOrganizer subject withAllSuperclasses collect: [:ea | ea organization].\\\\n\\\\t(aClassOrganizer listAtCategoryNamed: ClassOrganizer default) do: [:sel | | found |\\\\n\\\\t\\\\tfound := (organizers collect: [ :org | org categoryOfElement: sel])\\\\n\\\\t\\\\t\\\\tdetect: [:ea | ea ~= ClassOrganizer default and: [ ea ~= nil]]\\\\n\\\\t\\\\t\\\\tifNone: [].\\\\n\\\\t\\\\tfound ifNotNil: [aClassOrganizer classify: sel under: found]]! !\\\\n\\\\n!OBCategoryActor methodsFor: 'actions' stamp: 'cwp 9/20/2005 08:40'!\\\\ncreateIn: aNode\\\\n\\\\t| catName organization |\\\\n\\\\torganization := aNode organization.\\\\n\\\\tcatName := OBTextRequest \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tprompt: 'Please type new category name' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttemplate: (self categoryTemplateFor: organization).\\\\n\\\\tcatName ifNotNil:\\\\t[organization addCategory: catName.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(aNode categoryNodeNamed: catName) signalSelection].! !\\\\n\\\\n!OBCategoryActor methodsFor: 'actions' stamp: 'cwp 9/18/2004 21:55'!\\\\nremoveEmptyCategoriesIn: anOrganizer \\\\n\\\\tanOrganizer removeEmptyCategories! !\\\\n\\\\n!OBCategoryActor methodsFor: 'actions' stamp: 'cwp 9/19/2004 00:11'!\\\\nremove: aNode\\\\n\\\\t| list choice |\\\\n\\\\tlist := aNode container organization listAtCategoryNamed: aNode name.\\\\n\\\\tlist isEmpty ifTrue: [^ aNode remove].\\\\n\\\\tchoice := OBConfirmationRequest prompt: 'Are you sure you want to\\\\nremove this category \\\\nand all its elements?' confirm: 'Remove'.\\\\n\\\\tchoice ifTrue: [^ aNode remove]! !\\\\n\\\\n!OBCategoryActor methodsFor: 'actions' stamp: 'cwp 9/18/2005 18:51'!\\\\nrename: aNode\\\\n\\\\t| category |\\\\n\\\\tcategory := OBTextRequest\\\\n\\\\t\\\\t\\\\t\\\\tprompt: 'Please type new category name' \\\\n\\\\t\\\\t\\\\t\\\\ttemplate: aNode name.\\\\n\\\\tcategory ifNotNil:\\\\t\\\\n\\\\t\\\\t[aNode container organization renameCategory: aNode name toBe: category.\\\\n\\\\t\\\\taNode signalChanged]! !\\\\n\\\\n!OBCategoryActor methodsFor: 'actions' stamp: 'cwp 6/4/2006 18:56'!\\\\nreorganizeCategoriesIn: anOrganizer\\\\n\\\\t| definition |\\\\n\\\\tdefinition _ OBOrganizationDefinition on: anOrganizer.\\\\n\\\\tdefinition signalChange.! !\\\\n\\\\n\\\\n!OBCategoryActor methodsFor: 'private' stamp: 'cwp 9/18/2004 23:52'!\\\\ncategorizeActionFor: aNode\\\\n\\\\t^ OBAction\\\\n\\\\t\\\\tlabel: 'categorize automatically'\\\\n\\\\t\\\\treceiver: self\\\\n\\\\t\\\\tselector: #categorizeIn:\\\\n\\\\t\\\\targuments: (Array with: aNode organization)! !\\\\n\\\\n!OBCategoryActor methodsFor: 'private' stamp: 'cwp 6/25/2006 17:36'!\\\\ncategoryTemplateFor: anOrganization\\\\n\\\\t^ anOrganization isClassOrganizer\\\\n\\\\t\\\\tifTrue: ['category name']\\\\n\\\\t\\\\tifFalse: ['Category-Name']! !\\\\n\\\\n!OBCategoryActor methodsFor: 'private' stamp: 'cwp 7/10/2006 21:49'!\\\\nstdActionsForParent: aNode\\\\n\\\\t^ Array\\\\n\\\\t\\\\twith: (OBAction \\\\n\\\\t\\\\t\\\\t\\\\tlabel: 'create category...'\\\\n\\\\t\\\\t\\\\t\\\\treceiver: self\\\\n\\\\t\\\\t\\\\t\\\\tselector: #createIn:\\\\n\\\\t\\\\t\\\\t\\\\targuments: (Array with: aNode)\\\\n\\\\t\\\\t\\\\t\\\\ticon: self newIcon)\\\\n\\\\t\\\\twith: (OBAction\\\\n\\\\t\\\\t\\\\t\\\\tlabel: 'alphabetize categories'\\\\n\\\\t\\\\t\\\\t\\\\treceiver: self\\\\n\\\\t\\\\t\\\\t\\\\tselector: #alphabetizeCategoriesIn:\\\\n\\\\t\\\\t\\\\t\\\\targuments: (Array with: aNode))\\\\n\\\\t\\\\twith: (OBAction\\\\n\\\\t\\\\t\\\\t\\\\tlabel: 'remove empty categories'\\\\n\\\\t\\\\t\\\\t\\\\treceiver: self\\\\n\\\\t\\\\t\\\\t\\\\tselector: #removeEmptyCategoriesIn:\\\\n\\\\t\\\\t\\\\t\\\\targuments: (Array with: aNode organization))\\\\n\\\\t\\\\twith: (OBAction\\\\n\\\\t\\\\t\\\\t\\\\tlabel: 'reorganize categories'\\\\n\\\\t\\\\t\\\\t\\\\treceiver: self\\\\n\\\\t\\\\t\\\\t\\\\tselector: #reorganizeCategoriesIn:\\\\n\\\\t\\\\t\\\\t\\\\targuments: (Array with: aNode organization))\\\\n! !\\\\nObject subclass: #OBCategoryServant\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Services'!\\\\n\\\\n!OBCategoryServant methodsFor: 'private' stamp: 'cwp 6/25/2006 17:32'!\\\\ncategoryTemplateFor: anOrganization\\\\n\\\\t^ anOrganization isClassOrganizer\\\\n\\\\t\\\\tifTrue: ['category name']\\\\n\\\\t\\\\tifFalse: ['Category-Name']! !\\\\n\\\\n\\\\n!OBCategoryServant methodsFor: 'actions' stamp: 'cwp 6/29/2006 00:13'!\\\\ncreateCategory: aRequestor\\\\n\\\\t| catName organization node |\\\\n\\\\tnode _ aRequestor requestCurrentNode.\\\\n\\\\torganization _ node organization.\\\\n\\\\tcatName _ OBTextRequest \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tprompt: 'Please type new category name' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttemplate: (self categoryTemplateFor: organization).\\\\n\\\\tcatName ifNotNil:\\\\t[organization addCategory: catName.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taRequestor select: (node categoryNodeNamed: catName)].! !\\\\n\\\\n\\\\n!OBCategoryServant methodsFor: 'accessing' stamp: 'cwp 6/25/2006 17:25'!\\\\nservices\\\\n\\\\t| selectors |\\\\n\\\\tselectors _ self class organization listAtCategoryNamed: 'services'.\\\\n\\\\t^ selectors collect: [:ea | self perform: ea].\\\\n\\\\t! !\\\\n\\\\n\\\\n!OBCategoryServant methodsFor: 'services' stamp: 'cwp 6/30/2006 00:51'!\\\\nsvcCreateCategory\\\\n\\\\t^ (OBService action: (MessageSend receiver: self selector: #createCategory:))\\\\n\\\\t\\\\tcondition: [:req | req requestNode hasOrganization];\\\\n\\\\t\\\\tlabel: 'create category...'! !\\\\nOBAnnouncement subclass: #OBChildrenChanged\\\\n\\\\tinstanceVariableNames: 'node'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Announcements'!\\\\n\\\\n!OBChildrenChanged methodsFor: 'as yet unclassified' stamp: 'cwp 6/5/2006 00:49'!\\\\nnode\\\\n\\\\t^ node! !\\\\n\\\\n!OBChildrenChanged methodsFor: 'as yet unclassified' stamp: 'cwp 6/5/2006 00:49'!\\\\nnode: aNode\\\\n\\\\tnode _ aNode! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBChildrenChanged class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBChildrenChanged class methodsFor: 'as yet unclassified' stamp: 'cwp 6/5/2006 00:49'!\\\\nnode: aNode\\\\n\\\\t^ self new node: aNode! !\\\\nOBInteractionRequest subclass: #OBChoiceRequest\\\\n\\\\tinstanceVariableNames: 'prompt labels values lines'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Notifications'!\\\\n!OBChoiceRequest commentStamp: 'cwp 3/5/2004 12:26' prior: 0!\\\\nThis notification is used to ask the user for to choose from a list of alternatives. Its defaultAction is to open a PopUpMenu. Test cases an intercept the notification and respond programmatically.\\\\n\\\\nprompt\\\\t- A string describing the choice the user is asked to make.\\\\nlabels\\\\t- A list of strings describing the alternatives.\\\\nvalues\\\\t- When the user chooses an alternative, the corresponding item from this list is returned!\\\\n\\\\n\\\\n!OBChoiceRequest methodsFor: 'initializing' stamp: 'cwp 7/9/2006 00:05'!\\\\nsetPrompt: aString labels: labelArray values: valueArray lines: lineArray\\\\n\\\\tprompt _ aString.\\\\n\\\\tlabels _ labelArray.\\\\n\\\\tvalues _ valueArray.\\\\n\\\\tlines _ lineArray.! !\\\\n\\\\n\\\\n!OBChoiceRequest methodsFor: 'signaling' stamp: 'cwp 7/9/2006 00:09'!\\\\ndefaultAction\\\\n\\\\t^ values \\\\n\\\\t\\\\tat: ((PopUpMenu labelArray: labels lines: lines) startUpWithCaption: prompt)\\\\n\\\\t\\\\tifAbsent: [nil]! !\\\\n\\\\n\\\\n!OBChoiceRequest methodsFor: 'accessing' stamp: 'cwp 7/8/2006 23:45'!\\\\nlabels\\\\n\\\\t^ labels! !\\\\n\\\\n!OBChoiceRequest methodsFor: 'accessing' stamp: 'cwp 7/9/2006 00:11'!\\\\nlines\\\\n\\\\t^ lines! !\\\\n\\\\n!OBChoiceRequest methodsFor: 'accessing' stamp: 'cwp 7/8/2006 23:45'!\\\\nprompt\\\\n\\\\t^ prompt! !\\\\n\\\\n!OBChoiceRequest methodsFor: 'accessing' stamp: 'cwp 7/8/2006 23:45'!\\\\nvalues\\\\n\\\\t^ values! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBChoiceRequest class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBChoiceRequest class methodsFor: 'signalling' stamp: 'cwp 7/9/2006 00:07'!\\\\nlabels: anArray\\\\n\\\\t^ self\\\\n\\\\t\\\\tprompt: nil\\\\n\\\\t\\\\tlabels: anArray\\\\n\\\\t\\\\tvalues: anArray\\\\n\\\\t\\\\tlines: #()! !\\\\n\\\\n!OBChoiceRequest class methodsFor: 'signalling' stamp: 'cwp 7/9/2006 00:08'!\\\\nlabels: labelArray lines: lineArray\\\\n\\\\t^ self\\\\n\\\\t\\\\tprompt: nil\\\\n\\\\t\\\\tlabels: labelArray\\\\n\\\\t\\\\tvalues: labelArray\\\\n\\\\t\\\\tlines: lineArray! !\\\\n\\\\n!OBChoiceRequest class methodsFor: 'signalling' stamp: 'cwp 7/9/2006 00:06'!\\\\nprompt: aString labels: labelArray values: valueArray\\\\n\\\\t^ self\\\\n\\\\t\\\\tprompt: aString\\\\n\\\\t\\\\tlabels: labelArray\\\\n\\\\t\\\\t values: valueArray\\\\n\\\\t\\\\tlines: #()! !\\\\n\\\\n!OBChoiceRequest class methodsFor: 'signalling' stamp: 'cwp 7/9/2006 00:05'!\\\\nprompt: aString labels: labelArray values: valueArray lines: lineArray\\\\n\\\\t^ (self new \\\\n\\\\t\\\\tsetPrompt: aString \\\\n\\\\t\\\\tlabels: labelArray \\\\n\\\\t\\\\tvalues: valueArray \\\\n\\\\t\\\\tlines: lineArray) \\\\n\\\\t\\\\t\\\\tsignal! !\\\\nOBActor subclass: #OBClassActor\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Services'!\\\\n!OBClassActor commentStamp: 'cwp 1/7/2005 23:44' prior: 0!\\\\nOBClassActor provides basic actions for manipulating classes.!\\\\n\\\\n\\\\n!OBClassActor methodsFor: 'querying' stamp: 'cwp 7/10/2006 22:35'!\\\\nactionsForNode: aClassNode\\\\n\\\\t^ {OBAction\\\\n\\\\t\\\\t\\\\tlabel: 'remove' \\\\n\\\\t\\\\t\\\\treceiver: self\\\\n\\\\t\\\\t\\\\tselector: #remove:\\\\n\\\\t\\\\t\\\\targuments: {aClassNode}\\\\n\\\\t\\\\t\\\\tkeystroke: $x \\\\n\\\\t\\\\t\\\\ticon: self deleteIcon.\\\\n\\\\t\\\\tOBAction\\\\n\\\\t\\\\t\\\\tlabel: 'rename...' \\\\n\\\\t\\\\t\\\\treceiver: self\\\\n\\\\t\\\\t\\\\tselector: #rename:\\\\n\\\\t\\\\t\\\\targuments: {aClassNode}.\\\\n\\\\t\\\\tOBAction\\\\n\\\\t\\\\t\\\\tlabel: 'copy...' \\\\n\\\\t\\\\t\\\\treceiver: self\\\\n\\\\t\\\\t\\\\tselector: #copy:\\\\n\\\\t\\\\t\\\\targuments: {aClassNode}.\\\\n\\\\t\\\\tOBAction\\\\n\\\\t\\\\t\\\\tlabel: 'subclass template'\\\\n\\\\t\\\\t\\\\treceiver: self\\\\n\\\\t\\\\t\\\\tselector: #subclassTemplate:\\\\n\\\\t\\\\t\\\\targuments: {aClassNode}.\\\\n\\\\t\\\\tOBAction\\\\n\\\\t\\\\t\\\\tlabel: 'browse references'\\\\n\\\\t\\\\t\\\\treceiver: self\\\\n\\\\t\\\\t\\\\tselector: #browseReferences:\\\\n\\\\t\\\\t\\\\targuments: {aClassNode}\\\\n\\\\t}! !\\\\n\\\\n\\\\n!OBClassActor methodsFor: 'private' stamp: 'lr 3/28/2006 12:05'!\\\\nbrowseObsoleteRefs: aClassNode as: oldName \\\\n\\\\t| binding |\\\\n\\\\tbinding := aClassNode theNonMetaClass environment \\\\n\\\\t\\\\t\\\\t\\\\tassociationAt: aClassNode theNonMetaClass name.\\\\n\\\\t(SystemNavigation default allCallsOn: binding) isEmpty \\\\n\\\\t\\\\tifFalse: [OBReferencesBrowser\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbrowseRoot: aClassNode\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttitle: 'Obsolete references to']! !\\\\n\\\\n!OBClassActor methodsFor: 'private' stamp: 'cwp 7/8/2006 13:59'!\\\\ncopyClass: oldClass as: newName\\\\n\\\\t| oldDefinition newDefinition newClass |\\\\n\\\\t(oldClass environment hasClassNamed: newName)\\\\n\\\\t\\\\tifTrue: [^self error: newName, ' already exists'].\\\\n\\\\toldDefinition := oldClass definition.\\\\n\\\\tnewDefinition := oldDefinition \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcopyReplaceAll: '#' , oldClass name asString \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twith: '#' , newName asString.\\\\n\\\\tCursor wait \\\\n\\\\t\\\\tshowWhile: [newClass := Compiler evaluate: newDefinition logged: true.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnewClass copyAllCategoriesFrom: oldClass.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnewClass class copyAllCategoriesFrom: oldClass class].\\\\n\\\\t^ newClass! !\\\\n\\\\n\\\\n!OBClassActor methodsFor: 'actions' stamp: 'lr 3/28/2006 12:10'!\\\\nbrowseReferences: aClassNode \\\\n\\\\tOBReferencesBrowser browseRoot: aClassNode theNonMetaClass asNode! !\\\\n\\\\n!OBClassActor methodsFor: 'actions' stamp: 'dvf 8/31/2005 13:11'!\\\\ncopy: aClassNode\\\\n\\\\t| newName newClass |\\\\n\\\\tnewName := OBTextRequest\\\\n\\\\t\\\\t\\\\tprompt: 'Please type new class name'\\\\n\\\\t\\\\t\\\\ttemplate: aClassNode theNonMetaClassName asString.\\\\n\\\\tnewName ifNotNil:\\\\t[newClass := self\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcopyClass: aClassNode theNonMetaClass \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tas: newName asSymbol.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(newClass asNode) signalSelection].! !\\\\n\\\\n!OBClassActor methodsFor: 'actions' stamp: 'lr 3/28/2006 12:04'!\\\\nremove: aClassNode\\\\n\\\\t(OBConfirmationRequest\\\\n\\\\t\\\\tprompt: 'Are you certain that you \\\\nwant to REMOVE the class ', aClassNode theNonMetaClassName, ' from the system?'\\\\n\\\\t\\\\tconfirm: 'Remove')\\\\n\\\\t\\\\t\\\\tifTrue: [aClassNode theNonMetaClass removeFromSystem.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\taClassNode signalDeletion]! !\\\\n\\\\n!OBClassActor methodsFor: 'actions' stamp: 'lr 3/28/2006 12:05'!\\\\nrename: aClassNode\\\\n\\\\t| newName |\\\\n\\\\tnewName := OBTextRequest\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tprompt: 'Please type new class name' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttemplate: aClassNode theNonMetaClassName asString.\\\\n\\\\tnewName ifNotNil:\\\\t[ | oldName |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\toldName := aClassNode theNonMetaClass name.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taClassNode theNonMetaClass environment \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trenameClassNamed: oldName\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tas: newName asSymbol.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself browseObsoleteRefs: aClassNode as: oldName].\\\\n\\\\t! !\\\\n\\\\n!OBClassActor methodsFor: 'actions' stamp: 'cwp 6/4/2006 18:53'!\\\\nsubclassTemplate: aClassNode \\\\n\\\\t| class definition |\\\\n\\\\tclass _ aClassNode theNonMetaClass.\\\\n\\\\tdefinition _ (OBClassDefinition \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tenvironment: class environment \\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttemplate: (Class \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttemplateForSubclassOf: class \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcategory: class category)).\\\\n\\\\tdefinition signalChange.! !\\\\nOBCodeNode subclass: #OBClassAwareNode\\\\n\\\\tinstanceVariableNames: 'theClass superior'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBClassAwareNode commentStamp: 'cwp 1/8/2005 11:23' prior: 0!\\\\nOBClassAware node models program elements that are part of a class. It provides methods for manipulating the class, as well as methods relating to sorting according to class hierarchy.\\\\n\\\\niVars\\\\n\\\\ntheClass \\\\t- the class that this node is part of\\\\nsuperior \\\\t- during hierarchical sorting this refers to the nearest superclass\\\\n\\\\t\\\\t\\\\t  that belongs to the group being sorted!\\\\n\\\\n\\\\n!OBClassAwareNode methodsFor: 'superiors' stamp: 'cwp 12/11/2004 22:04'!\\\\nadoptSuperior: other \\\\n\\\\t| descent |\\\\n\\\\tdescent := self theClass allSuperclasses reversed.\\\\n\\\\t(descent indexOf: other theClass) > (descent indexOf: self superiorClass) \\\\n\\\\t\\\\tifTrue: [superior := other]! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'superiors' stamp: 'cwp 12/11/2004 22:04'!\\\\nsortsBefore: aClassNode\\\\n\\\\t| own other |\\\\n\\\\town := self withSuperiors.\\\\n\\\\tother := aClassNode withSuperiors.\\\\n\\\\t1 \\\\tto: (own size min: other size)\\\\n\\\\t\\\\tdo: [:i | (own at: i) == (other at: i) ifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t[^ (own at: i) theClassName <= (other at: i) theClassName]].\\\\n\\\\t^ other includes: self\\\\n\\\\t! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'superiors' stamp: 'cwp 12/11/2004 22:03'!\\\\nsuperior\\\\n\\\\t^ superior! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'superiors' stamp: 'cwp 12/11/2004 22:03'!\\\\nsuperiorClass\\\\n\\\\t^superior ifNotNil: [superior theClass]! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'superiors' stamp: 'cwp 12/11/2004 22:03'!\\\\nsuperiors\\\\n\\\\t| result |\\\\n\\\\tresult := OrderedCollection new.\\\\n\\\\tself superiorsDo: [:ea | result add: ea].\\\\n\\\\t^ result asArray reversed! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'superiors' stamp: 'cwp 12/11/2004 22:03'!\\\\nsuperiorsDo: aBlock\\\\n\\\\t| cursor |\\\\n\\\\tcursor := superior.\\\\n\\\\t[cursor isNil] whileFalse:\\\\n\\\\t\\\\t[aBlock value: cursor.\\\\n\\\\t\\\\tcursor := cursor superior]! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'superiors' stamp: 'dvf 8/16/2005 17:23'!\\\\nsuperior: other \\\\n\\\\tsuperior := other! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'superiors' stamp: 'cwp 12/11/2004 22:03'!\\\\nwithSuperiors\\\\n\\\\t| result |\\\\n\\\\tresult := OrderedCollection new.\\\\n\\\\tresult add: self.\\\\n\\\\tself superiorsDo: [:ea | result add: ea].\\\\n\\\\t^ result asArray reversed! !\\\\n\\\\n\\\\n!OBClassAwareNode methodsFor: 'actions' stamp: 'lr 3/6/2006 19:24'!\\\\nbrowse\\\\n\\\\tOBSystemBrowser openOnClass: self theNonMetaClass! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'actions' stamp: 'lr 3/6/2006 19:22'!\\\\nbrowseHierarchically\\\\n\\\\tOBHierarchyBrowser openOnClass: self theNonMetaClass! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'actions' stamp: 'cwp 12/15/2004 23:10'!\\\\nbrowseHierarchyAction\\\\n\\\\t^ self \\\\n\\\\t\\\\taction: #browseHierarchically \\\\n\\\\t\\\\tbuttonLabel: 'hierarchy' \\\\n\\\\t\\\\tmenuLabel: 'browse hierarchy'.\\\\n! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'actions' stamp: 'avi 9/17/2005 01:34'!\\\\nchaseVars\\\\n\\\\tOBVariablesBrowser browseRoot: self classNode! !\\\\n\\\\n\\\\n!OBClassAwareNode methodsFor: 'nodes' stamp: 'dvf 8/31/2005 13:11'!\\\\nclassNode\\\\n\\\\t^self theClass asNode! !\\\\n\\\\n\\\\n!OBClassAwareNode methodsFor: 'displaying' stamp: 'dvf 8/17/2005 14:59'!\\\\nindent\\\\n\\\\t| size indent |\\\\n\\\\tsize := 0.\\\\n\\\\tself superiorsDo: [:ea | size := size + 1].\\\\n\\\\tindent := Text new: size * 2.\\\\n\\\\tindent atAllPut: $ .\\\\n\\\\t^ indent! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'displaying' stamp: 'cwp 1/7/2005 22:21'!\\\\nindentedName\\\\n\\\\t^ self indent, self name! !\\\\n\\\\n\\\\n!OBClassAwareNode methodsFor: 'ancestry' stamp: 'cwp 12/5/2004 12:56'!\\\\nisDescendantOfClassCat: aClassCategoryNode\\\\n\\\\n\\\\t\\\\\\\"optimized version: sending #category to the class is slow\\\\\\\"\\\\n\\\\t^ (self theNonMetaClass environment organization \\\\n\\\\t\\\\tlistAtCategoryNamed: aClassCategoryNode name)\\\\n\\\\t\\\\t\\\\tincludes: self theNonMetaClassName\\\\n\\\\n! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'ancestry'!\\\\nisDescendantOfClass: aClassNode\\\\n\\\\t^ self theClassName = aClassNode theClassName! !\\\\n\\\\n\\\\n!OBClassAwareNode methodsFor: 'accessing'!\\\\ntheClass\\\\n\\\\t^ theClass! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'accessing'!\\\\ntheClassName\\\\n\\\\t^ self theClass name! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'accessing'!\\\\ntheClass: aClass\\\\n\\\\ttheClass := aClass! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'accessing'!\\\\ntheMetaClass\\\\n\\\\t^ self theClass theMetaClass! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'accessing'!\\\\ntheNonMetaClass\\\\n\\\\t^ self theClass theNonMetaClass! !\\\\n\\\\n!OBClassAwareNode methodsFor: 'accessing'!\\\\ntheNonMetaClassName\\\\n\\\\t^ self theNonMetaClass name! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBClassAwareNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBClassAwareNode class methodsFor: 'sorting' stamp: 'cwp 12/12/2004 22:13'!\\\\nsortHierarchically: nodes\\\\n\\\\tnodes do: [:a | nodes do: [:b | a adoptSuperior: b]].\\\\n\\\\tnodes sort: [:a : b | a sortsBefore: b].\\\\n\\\\t^ nodes! !\\\\nOBCodeNode subclass: #OBClassCategoryNode\\\\n\\\\tinstanceVariableNames: 'environment name'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBClassCategoryNode commentStamp: 'cwp 1/8/2005 12:58' prior: 0!\\\\nOBClassCategory represents a system category in the image's SystemOrganization.!\\\\n\\\\n\\\\n!OBClassCategoryNode methodsFor: 'actions' stamp: 'cwp 12/15/2004 22:40'!\\\\nactions\\\\n\\\\t^ {\\\\n\\\\t\\\\tself action: #fileOut withLabel: 'file out'.\\\\n\\\\t\\\\tself browseAction.\\\\n\\\\t}\\\\n! !\\\\n\\\\n!OBClassCategoryNode methodsFor: 'actions' stamp: 'cwp 12/15/2004 21:44'!\\\\nbrowse\\\\n\\\\tOBSystemBrowser openOnEnvironment: environment category: name! !\\\\n\\\\n!OBClassCategoryNode methodsFor: 'actions'!\\\\nfileOut\\\\n\\\\tenvironment organization fileOutCategory: name.! !\\\\n\\\\n!OBClassCategoryNode methodsFor: 'actions'!\\\\nprintOut\\\\n\\\\tenvironment organization fileOutCategory: name asHtml: true! !\\\\n\\\\n!OBClassCategoryNode methodsFor: 'actions' stamp: 'cwp 9/19/2004 00:11'!\\\\nremove\\\\n\\\\tenvironment organization removeSystemCategory: name.\\\\n\\\\tself signalDeletion! !\\\\n\\\\n\\\\n!OBClassCategoryNode methodsFor: 'ancestry'!\\\\nancestrySelector\\\\n\\\\t^ #isDescendantOfClassCat:! !\\\\n\\\\n!OBClassCategoryNode methodsFor: 'ancestry'!\\\\nisDescendantOfClassCat: other\\\\n\\\\t^ other name = name! !\\\\n\\\\n\\\\n!OBClassCategoryNode methodsFor: 'navigating' stamp: 'dvf 8/15/2005 17:31'!\\\\nclasses\\\\n\\\\t^ self classNames collect: [:ea | (environment at: ea) asNode]! !\\\\n\\\\n!OBClassCategoryNode methodsFor: 'navigating' stamp: 'cwp 12/12/2004 22:12'!\\\\nclassesHierarchically\\\\n\\\\t^ OBClassAwareNode sortHierarchically: self classes! !\\\\n\\\\n!OBClassCategoryNode methodsFor: 'navigating' stamp: 'dvf 8/17/2005 17:25'!\\\\ncomments\\\\n\\\\t^ self classNames collect: [:ea | (environment at: ea) asCommentNode ]! !\\\\n\\\\n!OBClassCategoryNode methodsFor: 'navigating' stamp: 'cwp 12/12/2004 22:19'!\\\\ncommentsHierarchically\\\\n\\\\t^ OBClassAwareNode sortHierarchically: self comments! !\\\\n\\\\n!OBClassCategoryNode methodsFor: 'navigating' stamp: 'dvf 8/15/2005 17:52'!\\\\nmetaclasses\\\\n\\\\t^self classNames collect: [:ea | (environment at: ea) asClassSideNode]! !\\\\n\\\\n!OBClassCategoryNode methodsFor: 'navigating' stamp: 'cwp 12/12/2004 22:19'!\\\\nmetaclassesHierarchically\\\\n\\\\t^ OBClassAwareNode sortHierarchically: self metaclasses! !\\\\n\\\\n\\\\n!OBClassCategoryNode methodsFor: 'private'!\\\\nclassNames\\\\n\\\\t^ environment organization listAtCategoryNamed: name! !\\\\n\\\\n\\\\n!OBClassCategoryNode methodsFor: 'accessing' stamp: 'cwp 9/22/2004 22:13'!\\\\ncontainer\\\\n\\\\t^ environment! !\\\\n\\\\n\\\\n!OBClassCategoryNode methodsFor: 'displaying'!\\\\ndefinition\\\\n\\\\t^ OBClassDefinition \\\\n\\\\t\\\\tenvironment: environment \\\\n\\\\t\\\\ttemplate: ((environment at: #Class) template: name)! !\\\\n\\\\n!OBClassCategoryNode methodsFor: 'displaying'!\\\\nname\\\\n\\\\t^ name! !\\\\n\\\\n!OBClassCategoryNode methodsFor: 'displaying'!\\\\ntext\\\\n\\\\t^ 'Object subclass: #NameOfSubclass\\\\n\\\\tinstanceVariableNames: ''''\\\\n\\\\tclassVariableNames: ''''\\\\n\\\\tpoolDictionaries: ''''\\\\n\\\\tcategory: ''', self name, ''''! !\\\\n\\\\n\\\\n!OBClassCategoryNode methodsFor: 'drag and drop'!\\\\ndropSelector\\\\n\\\\t^ #dropOnClassCategory:! !\\\\n\\\\n\\\\n!OBClassCategoryNode methodsFor: 'class creation'!\\\\nisRedefinedBy: definition\\\\n\\\\t\\\\\\\"No class is selected, so the definition can't be a redefinition.\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!OBClassCategoryNode methodsFor: 'initializing'!\\\\nsetName: aString\\\\n\\\\tself setName: aString environment: self class environment! !\\\\n\\\\n!OBClassCategoryNode methodsFor: 'initializing'!\\\\nsetName: aString environment: anEnvironment\\\\n\\\\tname := aString asSymbol.\\\\n\\\\tenvironment := anEnvironment! !\\\\n\\\\n\\\\n!OBClassCategoryNode methodsFor: 'testing' stamp: 'cwp 6/30/2006 00:42'!\\\\nhasOrganization\\\\n\\\\t^ true! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBClassCategoryNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBClassCategoryNode class methodsFor: 'actions'!\\\\nactionsForParent: aNode\\\\n\\\\t^ Array with: (OBAction\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tlabel: 'find class...'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\treceiver: self\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tselector: #findClassIn:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\targuments: (Array with: aNode environment)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tkeystroke: $f)\\\\n! !\\\\n\\\\n!OBClassCategoryNode class methodsFor: 'actions' stamp: 'dvf 8/31/2005 11:33'!\\\\nfindClassIn: anEnvironment\\\\n\\\\t| pattern class |\\\\n\\\\tpattern := OBTextRequest \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tprompt: 'Please type the name or fragment to look for' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttemplate: ''.\\\\n\\\\tpattern ifNil: [^self].\\\\n\\\\tclass := self findClassIn: anEnvironment pattern: pattern.\\\\n\\\\tclass ifNotNil: [(class asNode) signalSelection].! !\\\\n\\\\n!OBClassCategoryNode class methodsFor: 'actions' stamp: 'cwp 7/14/2006 14:37'!\\\\nfindClassIn: anEnvironment pattern: pattern\\\\n\\\\t| classNames className toMatch potentialClassNames |\\\\n\\\\ttoMatch := (pattern copyWithout: $.) asLowercase.\\\\n\\\\tpotentialClassNames := (anEnvironment classNames , anEnvironment traitNames) asArray.\\\\n\\\\tclassNames := (pattern endsWith: '.')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [potentialClassNames\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tselect: [:nm | nm asLowercase = toMatch]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [potentialClassNames\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tselect: [:n | n includesSubstring: toMatch caseSensitive: false]].\\\\n\\\\tclassNames size = 0 ifTrue: [^ nil].\\\\n\\\\tclassNames size = 1 ifTrue: [^ anEnvironment at: classNames first asSymbol].\\\\n\\\\tclassName := self userSelectionOf: classNames for: toMatch.\\\\n\\\\t^ className ifNotNil: [anEnvironment at: className asSymbol]\\\\n! !\\\\n\\\\n!OBClassCategoryNode class methodsFor: 'actions' stamp: 'cwp 7/9/2006 00:10'!\\\\nuserSelectionOf: classNames for: toMatch \\\\n\\\\t| exactMatch labels lines |\\\\n\\\\texactMatch := classNames detect: [:ea | ea asLowercase = toMatch] ifNone: [nil].\\\\n\\\\texactMatch \\\\n\\\\t\\\\tifNil: [labels _ classNames. lines _ #()]\\\\n\\\\t\\\\tifNotNil: [labels _ classNames copyWithFirst: exactMatch. lines _ #(1)].\\\\n\\\\t^ OBChoiceRequest labels: labels lines: lines.! !\\\\n\\\\n\\\\n!OBClassCategoryNode class methodsFor: 'instance creation'!\\\\non: aString\\\\n\\\\t^ self new setName: aString! !\\\\n\\\\n!OBClassCategoryNode class methodsFor: 'instance creation'!\\\\non: aString inEnvironment: anEnvironment\\\\n\\\\t^ self new setName: aString environment: anEnvironment! !\\\\nOBClassAwareNode subclass: #OBClassCommentNode\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBClassCommentNode commentStamp: 'cwp 1/8/2005 11:24' prior: 0!\\\\nOBClassCommentNode represents the comment attached to a particular class. !\\\\n\\\\n\\\\n!OBClassCommentNode methodsFor: 'actions' stamp: 'cwp 12/15/2004 23:03'!\\\\nactions\\\\n\\\\t^ {\\\\n\\\\t\\\\tself browseAction.\\\\n\\\\t\\\\tself browseHierarchyAction.\\\\n\\\\t\\\\tself action: #chaseVars buttonLabel: 'variables' menuLabel: 'chase variables'\\\\n\\\\t}! !\\\\n\\\\n\\\\n!OBClassCommentNode methodsFor: 'public' stamp: 'cwp 12/13/2004 00:51'!\\\\nname\\\\n\\\\t^ self theClass name! !\\\\n\\\\n\\\\n!OBClassCommentNode methodsFor: 'initializing'!\\\\nsetClass: aClass\\\\n\\\\tself theClass: aClass! !\\\\n\\\\n\\\\n!OBClassCommentNode methodsFor: 'definition'!\\\\ntext\\\\n\\\\t^ self theClass comment! !\\\\n\\\\n!OBClassCommentNode methodsFor: 'definition'!\\\\ntext: aText\\\\n\\\\tself theClass comment: aText stamp: Utilities changeStamp.\\\\n\\\\t^ true! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBClassCommentNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBClassCommentNode class methodsFor: 'as yet unclassified'!\\\\non: classRef\\\\n\\\\t^ self new setClass: classRef! !\\\\nOBDefinition subclass: #OBClassDefinition\\\\n\\\\tinstanceVariableNames: 'environment template'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Definitions'!\\\\n!OBClassDefinition commentStamp: 'cwp 1/8/2005 13:13' prior: 0!\\\\nOBClassDefinition presents a textual interface for examining, modifying and creating classes. Given a class, it knows how to display the definition expression that reflects it's current state, and knows how to create or modify a class given a definition expression.\\\\n\\\\nOBClassDefinition implements a number of safety checks when defining or redefining classes, to ensure that existing classes are not accidentally overwritten.!\\\\n\\\\n\\\\n!OBClassDefinition methodsFor: 'callbacks'!\\\\naccept: aText notifying: aController\\\\n\\\\t^ self defineClass: aText notifying: aController! !\\\\n\\\\n!OBClassDefinition methodsFor: 'callbacks'!\\\\nselection\\\\n\\\\t^ 1 to: 0! !\\\\n\\\\n!OBClassDefinition methodsFor: 'callbacks'!\\\\ntext\\\\n\\\\t^ template! !\\\\n\\\\n\\\\n!OBClassDefinition methodsFor: 'confirmation'!\\\\nconfirmDefinition: definition\\\\n\\\\t\\\\\\\"Check to make sure the user isn't accidentally over-writing an existing class.\\\\\\\"\\\\n\\\\t\\\\n\\\\t(((self isRedefinition: definition) not) and: [self definedClassExists: definition])\\\\n\\\\t\\\\tifTrue: [^ self confirmRedefinition: definition]\\\\n\\\\t\\\\tifFalse: [^ true]! !\\\\n\\\\n!OBClassDefinition methodsFor: 'confirmation'!\\\\nconfirmRedefinition: definition\\\\n\\\\t| newName prompt |\\\\n\\\\tnewName := self nameOfClassDefinedBy: definition.\\\\n\\\\tprompt := (newName, ' is an existing class in this system.\\\\nRedefining it might cause serious problems.\\\\nIs this really what you want to do?') asText.\\\\n\\\\t^ OBConfirmationRequest\\\\n\\\\t\\\\tprompt: prompt\\\\n\\\\t\\\\tconfirm: 'Redefine'! !\\\\n\\\\n!OBClassDefinition methodsFor: 'confirmation'!\\\\ndefinedClassExists: definition\\\\n\\\\t^ environment hasClassNamed: (self nameOfClassDefinedBy: definition)! !\\\\n\\\\n!OBClassDefinition methodsFor: 'confirmation'!\\\\nisRedefinition: aDefinition\\\\n\\\\t^ (self nameOfClassDefinedBy: aDefinition) = (self nameOfClassDefinedBy: template)! !\\\\n\\\\n!OBClassDefinition methodsFor: 'confirmation'!\\\\nnameOfClassDefinedBy: definition\\\\n\\\\t^ (Scanner new scanTokens: definition) third! !\\\\n\\\\n!OBClassDefinition methodsFor: 'confirmation' stamp: 'cwp 10/18/2004 00:13'!\\\\nselectedClass\\\\n\\\\t^ environment at: (self nameOfClassDefinedBy: template) ifAbsent: [nil]! !\\\\n\\\\n\\\\n!OBClassDefinition methodsFor: 'class definition'!\\\\ndefineClass: definition notifying: aController\\\\n\\\\t| evaluator newClass |\\\\n\\\\t(self confirmDefinition: definition) ifFalse: [^ false].\\\\n\\\\tevaluator := self evaluatorForDefinition: definition.\\\\n\\\\tnewClass := evaluator\\\\n\\\\t\\\\t\\\\t\\\\tevaluate: definition\\\\n\\\\t\\\\t\\\\t\\\\tnotifying: aController\\\\n\\\\t\\\\t\\\\t\\\\tlogged: true.\\\\n\\\\tnewClass ifNil: [^ false].\\\\n\\\\tself signalSelectionOf: newClass.\\\\n\\\\t^ true\\\\n! !\\\\n\\\\n!OBClassDefinition methodsFor: 'class definition'!\\\\nevaluatorForDefinition: definition\\\\n\\\\t| tokens |\\\\n\\\\ttokens := Scanner new scanTokens: definition.\\\\n\\\\t^ (environment at: tokens first ifAbsent: [nil]) subclassDefinerClass! !\\\\n\\\\n!OBClassDefinition methodsFor: 'class definition' stamp: 'cwp 10/23/2005 14:42'!\\\\nsignalSelectionOf: aClass\\\\n\\\\taClass asNode demandSelection! !\\\\n\\\\n\\\\n!OBClassDefinition methodsFor: 'initializing'!\\\\nsetEnvironment: anEnvironment template: aText\\\\n\\\\tenvironment := anEnvironment.\\\\n\\\\ttemplate := aText.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBClassDefinition class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBClassDefinition class methodsFor: 'instance creation'!\\\\nenvironment: anEnvironment template: aString \\\\n\\\\t^ self new setEnvironment: anEnvironment template: aString! !\\\\nOBClassAwareNode subclass: #OBClassNode\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBClassNode commentStamp: 'cwp 1/8/2005 11:27' prior: 0!\\\\nOBClassNode wraps a class for display in various types of code browsers. It provides many navigation methods for the different types of browsers where classes may appear.!\\\\n\\\\n\\\\n!OBClassNode methodsFor: 'actions' stamp: 'cwp 7/10/2006 22:33'!\\\\nactions\\\\n\\\\t^ {\\\\n\\\\t\\\\tself action: #findMethod \\\\n\\\\t\\\\t\\\\twithLabel: 'find method...' \\\\n\\\\t\\\\t\\\\twithKeystroke: $f \\\\n\\\\t\\\\t\\\\twithIcon: (MenuIcons tryIcons: #(findIcon smallFindIcon)).\\\\n\\\\t\\\\tself action: #fileOut withLabel: 'file out'.\\\\n\\\\t\\\\tself browseAction.\\\\n\\\\t\\\\tself browseHierarchyAction.\\\\n\\\\t\\\\tself action: #chaseVars buttonLabel: 'variables' menuLabel: 'chase variables'.\\\\n\\\\t\\\\tself action: #inspectInstances withLabel: 'inspect instances'.\\\\n\\\\t\\\\tself action: #inspectSubInstances withLabel: 'inspect subinstances'\\\\n\\\\t}! !\\\\n\\\\n!OBClassNode methodsFor: 'actions' stamp: 'cwp 10/26/2004 00:49'!\\\\nfileOut\\\\n\\\\tself theNonMetaClass fileOut! !\\\\n\\\\n!OBClassNode methodsFor: 'actions'!\\\\nfindMethod\\\\n\\\\t| selectors selection |\\\\n\\\\tselectors := self theClass selectors asSortedArray.\\\\n\\\\tselectors isEmpty ifTrue: [^nil].\\\\n\\\\tselection := OBChoiceRequest labels: selectors.\\\\n\\\\tselection ifNotNil: [(OBMethodNode \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ton: selection\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinClass: self theClass) signalSelection].! !\\\\n\\\\n!OBClassNode methodsFor: 'actions'!\\\\ninspectInstances\\\\n\\\\tself theNonMetaClass inspectAllInstances! !\\\\n\\\\n!OBClassNode methodsFor: 'actions'!\\\\ninspectSubInstances\\\\n\\\\tself theNonMetaClass inspectSubInstances! !\\\\n\\\\n\\\\n!OBClassNode methodsFor: 'navigating' stamp: 'cwp 1/7/2005 23:05'!\\\\nallCategory\\\\n\\\\t^ Array with: (OBAllMethodCategoryNode on: self theClass)! !\\\\n\\\\n!OBClassNode methodsFor: 'navigating' stamp: 'cwp 1/7/2005 23:06'!\\\\ncategories\\\\n\\\\t^ self theClass organization categories\\\\n\\\\t\\\\tcollect: [:cat | OBMethodCategoryNode on: cat inClass: self theClass]\\\\n\\\\t\\\\t\\\\t! !\\\\n\\\\n!OBClassNode methodsFor: 'navigating' stamp: 'cwp 12/12/2004 23:31'!\\\\nclassHierarchy\\\\n\\\\t^ self nodeHierarchyWithClass: OBClassNode! !\\\\n\\\\n!OBClassNode methodsFor: 'navigating'!\\\\nclassVariables\\\\n\\\\t^ self theClass allClassVarNames asArray sort\\\\n\\\\t\\\\tcollect: [:ea | OBClassVariableNode on: ea inClass: self theClass]! !\\\\n\\\\n!OBClassNode methodsFor: 'navigating' stamp: 'cwp 12/12/2004 23:31'!\\\\ncommentHierarchy\\\\n\\\\t^ self nodeHierarchyWithClass: OBClassCommentNode! !\\\\n\\\\n!OBClassNode methodsFor: 'navigating'!\\\\ninstanceVariables\\\\n\\\\t^ self theClass allInstVarNames asArray sort\\\\n\\\\t\\\\tcollect: [:ea | OBInstanceVariableNode on: ea inClass: self theClass]! !\\\\n\\\\n!OBClassNode methodsFor: 'navigating' stamp: 'cwp 12/12/2004 23:30'!\\\\nmetaclassHierarchy\\\\n\\\\t^ self nodeHierarchyWithClass: OBMetaclassNode! !\\\\n\\\\n!OBClassNode methodsFor: 'navigating' stamp: 'cwp 12/12/2004 23:30'!\\\\nnodeHierarchyWithClass: aClass\\\\n\\\\t^ OBClassAwareNode sortHierarchically: \\\\n\\\\t\\\\t(self surroundingHierarchy collect: [:ea | aClass on: ea])! !\\\\n\\\\n!OBClassNode methodsFor: 'navigating' stamp: 'cwp 12/8/2004 23:45'!\\\\nusers\\\\n\\\\t^ (SystemNavigation default allCallsOn: (theClass environment associationAt: theClass name))\\\\n\\\\t\\\\tcollect: [:ref | OBClassRefNode on: self name inMethod: ref]! !\\\\n\\\\n\\\\n!OBClassNode methodsFor: 'ancestry'!\\\\nancestrySelector\\\\n\\\\t^ #isDescendantOfClass:! !\\\\n\\\\n\\\\n!OBClassNode methodsFor: 'nodes' stamp: 'cwp 9/20/2005 08:42'!\\\\ncategoryNodeNamed: aString \\\\n\\\\t^ OBMethodCategoryNode on: aString inClass: theClass! !\\\\n\\\\n!OBClassNode methodsFor: 'nodes'!\\\\nclassCategoryNode\\\\n\\\\t^ OBClassCategoryNode \\\\n\\\\t\\\\ton: self theNonMetaClass category\\\\n\\\\t\\\\tinEnvironment: self theClass environment! !\\\\n\\\\n\\\\n!OBClassNode methodsFor: 'accessing'!\\\\ndefinition\\\\n\\\\t^ OBClassDefinition \\\\n\\\\t\\\\tenvironment: self theClass environment \\\\n\\\\t\\\\ttemplate: self theClass definition! !\\\\n\\\\n!OBClassNode methodsFor: 'accessing'!\\\\norganization\\\\n\\\\t^ self theClass organization! !\\\\n\\\\n!OBClassNode methodsFor: 'accessing' stamp: 'cwp 12/12/2004 23:27'!\\\\nsurroundingHierarchy\\\\n\\\\t ^ (self theClass withAllSuperclasses union: self theClass allSubclasses)\\\\n\\\\t\\\\tasArray! !\\\\n\\\\n!OBClassNode methodsFor: 'accessing' stamp: 'cwp 12/12/2004 22:45'!\\\\n= other\\\\n\\\\tself species = other species ifFalse: [^ false].\\\\n\\\\t^ self theClass = other theClass! !\\\\n\\\\n\\\\n!OBClassNode methodsFor: 'drag and drop' stamp: 'lr 3/28/2006 18:29'!\\\\ndropOnClassCategory: aNode\\\\n\\\\tself theNonMetaClass category: aNode name.\\\\n\\\\tself signalSelection.\\\\n\\\\t^ true! !\\\\n\\\\n!OBClassNode methodsFor: 'drag and drop' stamp: 'lr 4/6/2006 11:31'!\\\\ndropSelector\\\\n\\\\t^ #dropOnClass:! !\\\\n\\\\n\\\\n!OBClassNode methodsFor: 'displaying' stamp: 'cwp 12/13/2004 00:51'!\\\\nname\\\\n\\\\t^ self theClass name! !\\\\n\\\\n!OBClassNode methodsFor: 'displaying'!\\\\ntitle\\\\n\\\\t^ self name! !\\\\n\\\\n\\\\n!OBClassNode methodsFor: 'printing' stamp: 'cwp 12/10/2004 23:53'!\\\\nprintOn: aStream\\\\n\\\\taStream\\\\n\\\\t\\\\tprint: self class;\\\\n\\\\t\\\\tnextPut: $<;\\\\n\\\\t\\\\tprint: self theClass;\\\\n\\\\t\\\\tnextPut: $>! !\\\\n\\\\n\\\\n!OBClassNode methodsFor: 'initializing'!\\\\nsetClass: aClass\\\\n\\\\tself theClass: aClass! !\\\\n\\\\n\\\\n!OBClassNode methodsFor: 'testing' stamp: 'cwp 6/30/2006 00:57'!\\\\nhasOrganization\\\\n\\\\t^ true! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBClassNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBClassNode class methodsFor: 'instance creation' stamp: 'cwp 11/30/2004 21:06'!\\\\non: aClass \\\\n\\\\t^ self new setClass: aClass ! !\\\\nOBMethodNode subclass: #OBClassRefNode\\\\n\\\\tinstanceVariableNames: 'className'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBClassRefNode commentStamp: 'cwp 1/8/2005 12:38' prior: 0!\\\\nEach instance of OBClassRefNode refers to a reference to a particular class from the source code of a method. It's used in the OBListBrowser created by the 'browse references' class action.!\\\\n\\\\n\\\\n!OBClassRefNode methodsFor: 'accessing' stamp: 'cwp 12/8/2004 22:14'!\\\\nname\\\\n\\\\t^ className! !\\\\n\\\\n!OBClassRefNode methodsFor: 'accessing' stamp: 'cwp 12/1/2004 01:16'!\\\\nselection\\\\n\\\\t| start parser |\\\\n\\\\t(parser _ Compiler parserClass new) parseSelector: self source.\\\\n\\\\tstart := parser endOfLastToken.\\\\n\\\\tstart := (self source asString findString: className startingAt: start).\\\\n\\\\t^ start to: start + className size - 1! !\\\\n\\\\n\\\\n!OBClassRefNode methodsFor: 'initialize-release' stamp: 'cwp 12/1/2004 01:10'!\\\\nsetClassName: theName reference: aMethodRef\\\\n\\\\tself setReference: aMethodRef.\\\\n\\\\tclassName := theName.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBClassRefNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBClassRefNode class methodsFor: 'as yet unclassified' stamp: 'cwp 12/1/2004 00:50'!\\\\non: aClassName inMethod: aMethodRef\\\\n\\\\t^ self new setClassName: aClassName reference: aMethodRef! !\\\\nObject subclass: #OBClassReference\\\\n\\\\tinstanceVariableNames: 'name isMeta'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Utilities'!\\\\n!OBClassReference commentStamp: 'cwp 1/8/2005 13:15' prior: 0!\\\\nOBClassReference provides a way to refer to classes that may or may not be loaded into the image. It refers to the class indirectly, via name, rather than with a direct pointer to the class object. It also provides a number of convenience methods, which makes it more convenient than using the class name directly.!\\\\n\\\\n\\\\n!OBClassReference methodsFor: 'accessing'!\\\\nbeMeta\\\\n\\\\tisMeta := true! !\\\\n\\\\n!OBClassReference methodsFor: 'accessing'!\\\\nbeNonMeta\\\\n\\\\tisMeta := false! !\\\\n\\\\n!OBClassReference methodsFor: 'accessing'!\\\\nname\\\\n\\\\t^ isMeta\\\\n\\\\t\\\\tifTrue: [name, ' class']\\\\n\\\\t\\\\tifFalse: [name]! !\\\\n\\\\n!OBClassReference methodsFor: 'accessing'!\\\\ntheClass\\\\n\\\\t| theClass |\\\\n\\\\ttheClass := self theNonMetaClass ifNil: [^ nil].\\\\n\\\\t^ isMeta\\\\n\\\\t\\\\tifFalse: [theClass]\\\\n\\\\t\\\\tifTrue: [theClass class]! !\\\\n\\\\n!OBClassReference methodsFor: 'accessing'!\\\\ntheNonMetaClass\\\\n\\\\t^ Smalltalk at: name ifAbsent: [].! !\\\\n\\\\n!OBClassReference methodsFor: 'accessing'!\\\\ntheNonMetaName\\\\n\\\\t^ name! !\\\\n\\\\n!OBClassReference methodsFor: 'accessing'!\\\\ntheNonMetaName: aSymbol\\\\n\\\\tname := aSymbol! !\\\\n\\\\n\\\\n!OBClassReference methodsFor: 'comparing'!\\\\nhash\\\\n\\\\t^ isMeta\\\\n\\\\t\\\\tifTrue: [name hash bitInvert]\\\\n\\\\t\\\\tifFalse: [name hash]! !\\\\n\\\\n!OBClassReference methodsFor: 'comparing'!\\\\n<= other\\\\n\\\\t^ self name <= other name! !\\\\n\\\\n!OBClassReference methodsFor: 'comparing'!\\\\n= other\\\\n\\\\t^ (other isKindOf: self class) \\\\n\\\\t\\\\tand: [name = other theNonMetaName] \\\\n\\\\t\\\\tand: [isMeta = other isMeta]! !\\\\n\\\\n\\\\n!OBClassReference methodsFor: 'testing'!\\\\nisMeta\\\\n\\\\t^ isMeta! !\\\\n\\\\n\\\\n!OBClassReference methodsFor: 'printing'!\\\\nprintOn: aStream\\\\n\\\\taStream nextPutAll: 'OBClassReference'.\\\\n\\\\taStream nextPut: $<.\\\\n\\\\taStream nextPutAll: name.\\\\n\\\\tisMeta ifTrue: [aStream nextPutAll: ' class'].\\\\n\\\\taStream nextPut: $>.! !\\\\n\\\\n\\\\n!OBClassReference methodsFor: 'converting'!\\\\nreferenceToMethod: aSelector\\\\n\\\\t| ref |\\\\n\\\\tref := MethodReference new.\\\\n\\\\tref setClassSymbol: name classIsMeta: isMeta  methodSymbol: aSelector stringVersion: ''.\\\\n\\\\t^ ref! !\\\\n\\\\n\\\\n!OBClassReference methodsFor: 'initializing'!\\\\nsetName: aSymbol\\\\n\\\\tname := (aSymbol copyUpTo: $ ) asSymbol.\\\\n\\\\tisMeta := aSymbol endsWith: ' class'.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBClassReference class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBClassReference class methodsFor: 'instance creation'!\\\\nmetaNamed: aSymbol\\\\n\\\\t^ (self named: aSymbol) beMeta! !\\\\n\\\\n!OBClassReference class methodsFor: 'instance creation'!\\\\nnamed: aSymbol\\\\n\\\\t^ self new setName: aSymbol! !\\\\n\\\\n!OBClassReference class methodsFor: 'instance creation'!\\\\nto: aClass\\\\n\\\\t^ self named: aClass name! !\\\\nOBVariableNode subclass: #OBClassVariableNode\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBClassVariableNode commentStamp: 'cwp 1/8/2005 12:51' prior: 0!\\\\nOBClassVariable provides a method for finding methods which refer to a shared variable, ie, by searching for an association in the literal frame rather than for bytecodes refering to an instance variable.!\\\\n\\\\n\\\\n!OBClassVariableNode methodsFor: 'navigating' stamp: 'cwp 12/8/2004 23:47'!\\\\naccessors\\\\n\\\\t| literal |\\\\n\\\\tliteral := (self theClass withAllSuperclasses \\\\n\\\\t\\\\t\\\\t\\\\tgather: [:ea | ea classPool associations])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdetect: [:ea | ea key = name].\\\\n\\\\t^ ((self systemNavigation allCallsOn: literal) asArray sort)\\\\n\\\\t\\\\tcollect: [:ref | OBMethodNode on: ref]! !\\\\nOBBrowser subclass: #OBCodeBrowser\\\\n\\\\tinstanceVariableNames: 'hasChanges'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Browsers'!\\\\n!OBCodeBrowser commentStamp: 'cwp 1/7/2005 23:45' prior: 0!\\\\nOBCodeBrowser is a superclass for all browsers which active code in the image. It provides methods for registering with the SystemChangeNotifier and updating it's display when it receives notification of system changes.!\\\\n\\\\n\\\\n!OBCodeBrowser methodsFor: 'morphic' stamp: 'cwp 1/8/2005 21:55'!\\\\naddModelItemsToWindowMenu: aMenu\\\\n\\\\tSmalltalk \\\\n\\\\t\\\\tat: #SystemBrowser \\\\n\\\\t\\\\tifPresent: [:class | class \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taddRegistryMenuItemsTo: aMenu \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinAccountOf: OBSystemBrowserAdaptor new].! !\\\\n\\\\n!OBCodeBrowser methodsFor: 'morphic'!\\\\ninitialExtent\\\\n\\\\thasChanges := false.\\\\n\\\\tself register.\\\\n\\\\t^ super initialExtent! !\\\\n\\\\n!OBCodeBrowser methodsFor: 'morphic' stamp: 'cwp 6/4/2006 18:51'!\\\\nstepAt: milliseconds in: aSystemWindow\\\\n\\\\thasChanges ifTrue: [self signalRefresh].\\\\n\\\\tself clearChanges! !\\\\n\\\\n!OBCodeBrowser methodsFor: 'morphic'!\\\\nwantsStepsIn: aSystemWindow\\\\n\\\\t^ true! !\\\\n\\\\n!OBCodeBrowser methodsFor: 'morphic'!\\\\nwindowIsClosing\\\\n\\\\tself unregister! !\\\\n\\\\n\\\\n!OBCodeBrowser methodsFor: 'updating' stamp: 'cwp 1/7/2005 23:47'!\\\\nclearChanges\\\\n\\\\thasChanges := false! !\\\\n\\\\n!OBCodeBrowser methodsFor: 'updating'!\\\\nevent: anEvent\\\\n\\\\thasChanges := true! !\\\\n\\\\n!OBCodeBrowser methodsFor: 'updating' stamp: 'cwp 3/1/2006 19:48'!\\\\nregister\\\\n\\\\tSystemChangeNotifier uniqueInstance notify: self ofAllSystemChangesUsing: #event:! !\\\\n\\\\n!OBCodeBrowser methodsFor: 'updating' stamp: 'cwp 3/1/2006 19:48'!\\\\nunregister\\\\n\\\\tSystemChangeNotifier uniqueInstance noMoreNotificationsFor: self! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBCodeBrowser class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBCodeBrowser class methodsFor: 'configuration' stamp: 'lr 3/28/2006 12:00'!\\\\naddTo: root class: classSel comment: commentSel metaclass: metaclassSel \\\\n\\\\t| class metaclass comment methodCategory method allMethodCategory |\\\\n\\\\tclass := OBMetaNode named: 'Class'.\\\\n\\\\tcomment := OBMetaNode named: 'ClassComment'.\\\\n\\\\tmetaclass := OBMetaNode named: 'Metaclass'.\\\\n\\\\tallMethodCategory := OBMetaNode named: 'AllMethodCategory'.\\\\n\\\\tmethodCategory := OBMetaNode named: 'MethodCategory'.\\\\n\\\\tmethod := OBMetaNode named: 'Method'.\\\\n\\\\troot\\\\n\\\\t\\\\tchildAt: classSel\\\\n\\\\t\\\\t\\\\tlabeled: 'instance'\\\\n\\\\t\\\\t\\\\tput: class;\\\\n\\\\t\\\\tchildAt: commentSel\\\\n\\\\t\\\\t\\\\tlabeled: '?'\\\\n\\\\t\\\\t\\\\tput: comment;\\\\n\\\\t\\\\tchildAt: metaclassSel\\\\n\\\\t\\\\t\\\\tlabeled: 'class'\\\\n\\\\t\\\\t\\\\tput: metaclass;\\\\n\\\\t\\\\taddActor: (OBNodeActor onNodeClass: OBClassCategoryNode);\\\\n\\\\t\\\\taddActor: OBCategoryActor new;\\\\n\\\\t\\\\tfilterClass: OBModalFilter.\\\\n\\\\tclass\\\\n\\\\t\\\\tdisplaySelector: #indentedName;\\\\n\\\\t\\\\tchildAt: #allCategory put: allMethodCategory;\\\\n\\\\t\\\\tchildAt: #categories put: methodCategory;\\\\n\\\\t\\\\taddActor: OBNodeActor new;\\\\n\\\\t\\\\taddActor: OBClassActor new.\\\\n\\\\tcomment \\\\n\\\\t\\\\tdisplaySelector: #indentedName;\\\\n\\\\t\\\\taddActor: OBNodeActor new.\\\\n\\\\tmetaclass\\\\n\\\\t\\\\tdisplaySelector: #indentedName;\\\\n\\\\t\\\\tchildAt: #allCategory put: allMethodCategory;\\\\n\\\\t\\\\tchildAt: #categories put: methodCategory;\\\\n\\\\t\\\\taddActor: OBNodeActor new;\\\\n\\\\t\\\\taddActor: OBClassActor new.\\\\n\\\\tallMethodCategory\\\\n\\\\t\\\\tchildAt: #methods put: method;\\\\n\\\\t\\\\taddActor: (OBNodeActor onNodeClass: OBMethodCategoryNode).\\\\n\\\\tmethodCategory\\\\n\\\\t\\\\tchildAt: #methods put: method;\\\\n\\\\t\\\\taddActor: OBCategoryActor new;\\\\n\\\\t\\\\taddActor: (OBNodeActor onNodeClass: OBMethodCategoryNode).\\\\n\\\\tmethod addActor: OBNodeActor new.\\\\n\\\\t^ root! !\\\\n\\\\n!OBCodeBrowser class methodsFor: 'configuration' stamp: 'cwp 12/15/2004 22:52'!\\\\noptionalButtons\\\\n\\\\t^ #('browse' 'variables' 'hierarchy' 'inheritance' 'senders' 'implementors' 'versions')! !\\\\nOBNode subclass: #OBCodeNode\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBCodeNode commentStamp: 'cwp 1/8/2005 11:12' prior: 0!\\\\nOBCodeNode is an abstract superclass for node classes that represent program elements active in the image. Though it provides little functionality, it exists for structural purposes.!\\\\n\\\\n\\\\n!OBCodeNode methodsFor: 'actions' stamp: 'cwp 7/14/2006 14:24'!\\\\nbrowseAction\\\\n\\\\t^ self \\\\n\\\\t\\\\taction: #browse\\\\n\\\\t\\\\twithMenuLabel: 'browse'\\\\n\\\\t\\\\twithButtonLabel: 'browse'\\\\n\\\\t\\\\twithKeystroke: $b\\\\n\\\\t\\\\twithIcon: (MenuIcons tryIcons: #(windowIcon smallWindowIcon)).\\\\n! !\\\\n\\\\n\\\\n!OBCodeNode methodsFor: 'testing' stamp: 'cwp 6/30/2006 00:37'!\\\\nhasOrganization\\\\n\\\\t^ false! !\\\\nOBNode subclass: #OBCollectionNode\\\\n\\\\tinstanceVariableNames: 'collection'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Nodes'!\\\\n!OBCollectionNode commentStamp: 'cwp 1/7/2005 23:31' prior: 0!\\\\nOBCollectionNode is a trivial wrapper for a collection of nodes. It is typically used as an artificial root node for metagraphs that have no natural root.!\\\\n\\\\n\\\\n!OBCollectionNode methodsFor: 'displaying' stamp: 'cwp 3/15/2004 23:19'!\\\\nname\\\\n\\\\t^ collection species name! !\\\\n\\\\n\\\\n!OBCollectionNode methodsFor: 'initalizing' stamp: 'cwp 3/15/2004 23:18'!\\\\nsetCollection: aCollection\\\\n\\\\tcollection _ aCollection! !\\\\n\\\\n\\\\n!OBCollectionNode methodsFor: 'navigating' stamp: 'cwp 3/15/2004 23:19'!\\\\nchildren\\\\n\\\\t^ collection! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBCollectionNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBCollectionNode class methodsFor: 'as yet unclassified' stamp: 'cwp 3/15/2004 23:17'!\\\\non: aCollection\\\\n\\\\t^ self new setCollection: aCollection! !\\\\nObject subclass: #OBColumn\\\\n\\\\tinstanceVariableNames: 'panel filter children selection'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Kernel'!\\\\n!OBColumn commentStamp: 'cwp 1/7/2005 23:19' prior: 0!\\\\nAn OBColumn manages a list of nodes, which it displays in a PluggableListMorph in the pane scroller at the top of the browser. All instances of OBColumn belong to an OBColumnPanel. It's main responsibility is keeping its list - and those of its neighbours - up to date. Each column has a MetaNode, which provides the list contents. It uses a filter to meditate between its self and the MetaNode.\\\\n\\\\niVars:\\\\n\\\\npanel\\\\t\\\\t- the panel which owns the column\\\\nfilter\\\\t\\\\t- the filter which manages the column's MetaNode.\\\\nparent\\\\t\\\\t- the node selected in the column to the left of this column\\\\nchildren \\\\t- the nodes which make up this column's list\\\\nselection \\\\t- the index of the node selected by the user!\\\\n\\\\n\\\\n!OBColumn methodsFor: 'accessing' stamp: 'cwp 4/17/2006 15:52'!\\\\nannouncer\\\\n\\\\t^ panel announcer! !\\\\n\\\\n!OBColumn methodsFor: 'accessing' stamp: 'cwp 11/16/2004 21:49'!\\\\nbasicNext\\\\n\\\\t^panel columnAfter: self! !\\\\n\\\\n!OBColumn methodsFor: 'accessing' stamp: 'cwp 11/17/2004 00:18'!\\\\nbrowser\\\\n\\\\t^ panel browser! !\\\\n\\\\n!OBColumn methodsFor: 'accessing' stamp: 'cwp 2/9/2004 20:58'!\\\\nfilter\\\\n\\\\t^ filter! !\\\\n\\\\n!OBColumn methodsFor: 'accessing' stamp: 'cwp 2/12/2004 18:47'!\\\\nfilter: aFilter\\\\n\\\\tfilter _ aFilter monitor: self.\\\\n\\\\tself changed: #filter.! !\\\\n\\\\n!OBColumn methodsFor: 'accessing' stamp: 'cwp 2/28/2006 08:27'!\\\\nisEmpty\\\\n\\\\t^ children isEmpty! !\\\\n\\\\n!OBColumn methodsFor: 'accessing' stamp: 'cwp 2/9/2004 20:59'!\\\\nmetaNode\\\\n\\\\t^ self filter metaNode! !\\\\n\\\\n!OBColumn methodsFor: 'accessing' stamp: 'cwp 2/12/2004 20:50'!\\\\nnext\\\\n\\\\t^ self basicNext\\\\n\\\\t\\\\tifNil: [(self hasSelection and: [self shouldBeLast not])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self createNext]]\\\\n\\\\t! !\\\\n\\\\n!OBColumn methodsFor: 'accessing' stamp: 'cwp 9/24/2005 22:45'!\\\\nparent\\\\n\\\\t^ panel parentNodeForColumn: self! !\\\\n\\\\n!OBColumn methodsFor: 'accessing' stamp: 'cwp 6/8/2006 01:32'!\\\\nparent: aNode\\\\n\\\\t\\\\n\\\\tself filter: aNode metaNode filter.\\\\n\\\\tself getChildren.\\\\n\\\\tself clearSelection.\\\\n\\\\tself changed: #list.\\\\n\\\\tpanel clearAfter: self! !\\\\n\\\\n!OBColumn methodsFor: 'accessing' stamp: 'cwp 6/28/2006 00:53'!\\\\nrequestor\\\\n\\\\t^ self browser requestor node: (self selectedNode ifNil: [self parent])! !\\\\n\\\\n\\\\n!OBColumn methodsFor: 'actions' stamp: 'cwp 9/24/2005 22:23'!\\\\nactionSetsForParentNode\\\\n\\\\t^ self filter children gather: [:child | child actionSetsForParent: self parent].\\\\t! !\\\\n\\\\n!OBColumn methodsFor: 'actions' stamp: 'cwp 9/14/2004 19:08'!\\\\nactionSetsForSelectedNode\\\\n\\\\t| node |\\\\n\\\\tnode _ self selectedNode ifNil: [^ #()].\\\\n\\\\t^ node metaNode actionSetsForNode: node\\\\t! !\\\\n\\\\n!OBColumn methodsFor: 'actions' stamp: 'hpt 5/17/2004 14:19'!\\\\nactionsForKeystroke: aChar\\\\n\\\\t^self actionsForParentNode, self actionsForSelectedNode\\\\n\\\\t\\\\tselect: [:anAction | anAction keystroke == aChar]! !\\\\n\\\\n!OBColumn methodsFor: 'actions' stamp: 'cwp 9/24/2005 22:23'!\\\\nactionsForParentNode\\\\n\\\\t^ self filter children gather: [:child | child actionsForParent: self parent].\\\\t! !\\\\n\\\\n!OBColumn methodsFor: 'actions' stamp: 'avi 3/6/2004 16:26'!\\\\nactionsForSelectedNode\\\\n\\\\t| node |\\\\n\\\\tnode _ self selectedNode ifNil: [^ #()].\\\\n\\\\t^ node metaNode actionsForNode: node\\\\t! !\\\\n\\\\n!OBColumn methodsFor: 'actions' stamp: 'cwp 6/25/2006 00:22'!\\\\naddActionsToMenu: aMenu\\\\n\\\\tself actionSetsForParentNode, self actionSetsForSelectedNode\\\\n\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t[:set \\\\n\\\\t\\\\t\\\\t|set do: \\\\n\\\\t\\\\t\\\\t\\\\t[:action | \\\\n\\\\t\\\\t\\\\t\\\\taction announcer: self announcer.\\\\n\\\\t\\\\t\\\\t\\\\taction addItemToMenu: aMenu]]\\\\n\\\\t\\\\tseparatedBy: [aMenu addLine]! !\\\\n\\\\n!OBColumn methodsFor: 'actions' stamp: 'cwp 6/28/2006 00:24'!\\\\naddServicesToMenu: aMenu\\\\n\\\\t| scan |\\\\n\\\\tscan _ self announcer announce: OBServiceScan.\\\\n\\\\taMenu \\\\n\\\\t\\\\taddServices: scan services\\\\n\\\\t\\\\tfor: self requestor\\\\n\\\\t\\\\textraLines: #().\\\\n\\\\t! !\\\\n\\\\n!OBColumn methodsFor: 'actions' stamp: 'cwp 6/25/2006 13:55'!\\\\nservicesForKeystroke: aChar\\\\n\\\\t| scan |\\\\n\\\\tscan _ self announcer announce: OBServiceScan.\\\\n\\\\t^ scan services select: [:ea | ea keystroke == aChar]! !\\\\n\\\\n\\\\n!OBColumn methodsFor: 'callbacks' stamp: 'cwp 6/28/2006 00:50'!\\\\nkeystroke: aChar from: aMorph\\\\n\\\\tself isEmpty ifTrue: [^ self].\\\\n\\\\t(self actionsForKeystroke: aChar)\\\\n\\\\t\\\\tdo: [:action | \\\\n\\\\t\\\\t\\\\taction announcer: self announcer.\\\\n\\\\t\\\\t\\\\taction trigger].\\\\n\\\\t(self servicesForKeystroke: aChar)\\\\n\\\\t\\\\tdo: [:service | service condExecuteFor: self requestor]! !\\\\n\\\\n!OBColumn methodsFor: 'callbacks' stamp: 'cwp 12/8/2004 21:21'!\\\\nlist\\\\n\\\\t^ children \\\\n\\\\t\\\\tifNil: [#()]\\\\n\\\\t\\\\tifNotNil: [children collect: [:ea | ea displayString]]! !\\\\n\\\\n!OBColumn methodsFor: 'callbacks' stamp: 'cwp 12/8/2004 21:22'!\\\\nlistAt: index\\\\n\\\\t^ (children at: index ifAbsent: [^ '']) displayString! !\\\\n\\\\n!OBColumn methodsFor: 'callbacks' stamp: 'cwp 2/29/2004 21:48'!\\\\nlistSize\\\\n\\\\t^ children\\\\n\\\\t\\\\tifNil: [0]\\\\n\\\\t\\\\tifNotNil: [children size]! !\\\\n\\\\n!OBColumn methodsFor: 'callbacks' stamp: 'cwp 6/25/2006 00:24'!\\\\nmenu: aMenu\\\\n\\\\tself isEmpty ifFalse:\\\\n\\\\t\\\\t[self addActionsToMenu: aMenu.\\\\n\\\\t\\\\tself addServicesToMenu: aMenu].\\\\n\\\\t^ aMenu! !\\\\n\\\\n!OBColumn methodsFor: 'callbacks' stamp: 'cwp 4/18/2006 00:25'!\\\\nokToChange\\\\n\\\\t^ (self announcer announce: OBAboutToChange) isVetoed not! !\\\\n\\\\n!OBColumn methodsFor: 'callbacks' stamp: 'cwp 11/5/2003 19:01'!\\\\nselection\\\\n\\\\t^ selection ifNil: [0]! !\\\\n\\\\n!OBColumn methodsFor: 'callbacks' stamp: 'cwp 6/5/2006 23:37'!\\\\nselection: anInteger\\\\n\\\\tselection _ anInteger.\\\\n\\\\tself signalSelectionChanged.\\\\n\\\\tself changed: #selection.\\\\n! !\\\\n\\\\n\\\\n!OBColumn methodsFor: 'drag and drop' stamp: 'cwp 6/4/2006 00:37'!\\\\nacceptDroppingMorph: transferMorph event: evt inMorph: listMorph\\\\n\\\\t^ [(self nodeForDroppedMorph: transferMorph event: evt inMorph: listMorph)\\\\n\\\\t\\\\tacceptDroppedNode: transferMorph passenger]\\\\n\\\\t\\\\t\\\\ton: OBAnnouncerRequest\\\\n\\\\t\\\\t\\\\tdo: [:notification | notification resume: self announcer]\\\\n! !\\\\n\\\\n!OBColumn methodsFor: 'drag and drop' stamp: 'avi 2/20/2004 13:45'!\\\\ndragEnabled\\\\n\\\\t^ true! !\\\\n\\\\n!OBColumn methodsFor: 'drag and drop' stamp: 'avi 2/20/2004 14:35'!\\\\ndragPassengerFor: item inMorph: listMorph\\\\n\\\\t^ self nodeForItem: item inMorph: listMorph! !\\\\n\\\\n!OBColumn methodsFor: 'drag and drop' stamp: 'avi 2/20/2004 14:37'!\\\\ndragTransferType\\\\n\\\\t^ #OmniBrowser! !\\\\n\\\\n!OBColumn methodsFor: 'drag and drop' stamp: 'avi 2/20/2004 14:36'!\\\\ndragTransferTypeForMorph: listMorph\\\\n\\\\t^ self dragTransferType! !\\\\n\\\\n!OBColumn methodsFor: 'drag and drop' stamp: 'avi 2/20/2004 14:30'!\\\\ndropEnabled\\\\n\\\\t^ true! !\\\\n\\\\n!OBColumn methodsFor: 'drag and drop' stamp: 'cwp 3/3/2004 02:23'!\\\\nnodeForDroppedMorph: transferMorph event: evt inMorph: pluggableListMorph\\\\n\\\\t| index item |\\\\n\\\\tindex _ pluggableListMorph rowAtLocation: evt position.\\\\n\\\\tindex = 0 ifTrue: [^ nil].\\\\n\\\\titem _ pluggableListMorph listMorph item: index.\\\\n\\\\t^ self nodeForItem: item inMorph: pluggableListMorph! !\\\\n\\\\n!OBColumn methodsFor: 'drag and drop' stamp: 'cwp 6/10/2006 21:59'!\\\\nnodeForItem: item inMorph: pluggableListMorph\\\\n\\\\t^ children \\\\n\\\\t\\\\tdetect: [:child | child displayString = item contents asString]\\\\n\\\\t\\\\tifNone: [item contents]! !\\\\n\\\\n!OBColumn methodsFor: 'drag and drop' stamp: 'cwp 2/25/2004 21:26'!\\\\nwantsDroppedMorph: transferMorph event: evt inMorph: listMorph\\\\n\\\\t| node |\\\\n\\\\t(transferMorph isKindOf: TransferMorph) ifFalse: [^ false].\\\\n\\\\ttransferMorph dragTransferType == self dragTransferType ifFalse: [^ false].\\\\n\\\\tnode _ self nodeForDroppedMorph: transferMorph event: evt inMorph: listMorph.\\\\n\\\\t^ node notNil and: [node wantsDroppedNode: transferMorph passenger]! !\\\\n\\\\n\\\\n!OBColumn methodsFor: 'initializing' stamp: 'cwp 6/3/2006 23:38'!\\\\nsetPanel: aPanel \\\\n\\\\tpanel := aPanel.\\\\n\\\\tself subscribe.\\\\n\\\\tchildren := #().\\\\n\\\\tself clearSelection! !\\\\n\\\\n!OBColumn methodsFor: 'initializing' stamp: 'cwp 6/3/2006 23:39'!\\\\nsetPanel: aPanel metaNode: aMetaNode node: aNode \\\\n\\\\tpanel := aPanel.\\\\n\\\\tself subscribe.\\\\n\\\\tfilter := aMetaNode filter monitor: self.\\\\n\\\\tchildren _ self filter nodesForParent: aNode.\\\\n\\\\tself clearSelection! !\\\\n\\\\n\\\\n!OBColumn methodsFor: 'morphic' stamp: 'cwp 12/14/2003 22:15'!\\\\nbuttonHeight\\\\n\\\\t^ 20! !\\\\n\\\\n!OBColumn methodsFor: 'morphic' stamp: 'cwp 2/9/2004 21:06'!\\\\ncolumnWithHeader\\\\n\\\\t| col bh |\\\\n\\\\tcol _ BorderedMorph new\\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tvResizing: #spaceFill;\\\\n\\\\t\\\\tclipSubmorphs: true;\\\\n\\\\t\\\\tcolor: Color transparent;\\\\n\\\\t\\\\tcellInset: 0;\\\\n\\\\t\\\\tborderWidth: 0;\\\\n\\\\t\\\\tlayoutPolicy: ProportionalLayout new.\\\\n\\\\t\\\\n\\\\tbh _ self buttonHeight negated.\\\\n\\\\tcol\\\\n\\\\t\\\\taddMorph: self listMorph\\\\n\\\\t\\\\tfullFrame: (LayoutFrame fractions: (0@0 corner: 1@1) offsets: (0@0 corner: 0@bh)).\\\\n\\\\tcol\\\\n\\\\t\\\\taddMorph: self filter buttonMorph\\\\n\\\\t\\\\tfullFrame: (LayoutFrame fractions: (0@1 corner: 1@1) offsets: (0@bh corner: 0@0)).\\\\n\\\\t\\\\t\\\\n\\\\n\\\\t^ col! !\\\\n\\\\n!OBColumn methodsFor: 'morphic' stamp: 'cwp 2/28/2006 08:37'!\\\\nlistMorph\\\\n\\\\t^ (PluggableListMorph\\\\n\\\\t\\\\ton: self\\\\n\\\\t\\\\tlist: #list\\\\n\\\\t\\\\tselected: #selection\\\\n\\\\t\\\\tchangeSelected: #selection:\\\\n\\\\t\\\\tmenu: #menu:\\\\n\\\\t\\\\tkeystroke: #keystroke:from:)\\\\n\\\\t\\\\t\\\\tgetListElementSelector: #listAt:;\\\\n\\\\t\\\\t\\\\tgetListSizeSelector: #listSize;\\\\n\\\\t\\\\t\\\\tdragEnabled: self dragEnabled;\\\\n\\\\t\\\\t\\\\tdropEnabled: self dropEnabled;\\\\n\\\\t\\\\t\\\\tborderWidth: 0;\\\\n\\\\t\\\\t\\\\tautoDeselect: false;\\\\n\\\\t\\\\t\\\\tadoptPaneColor: panel defaultBackgroundColor;\\\\n\\\\t\\\\t\\\\tyourself! !\\\\n\\\\n!OBColumn methodsFor: 'morphic' stamp: 'cwp 2/12/2004 19:17'!\\\\nmorph\\\\n\\\\t^ self isEmpty \\\\n\\\\t\\\\tifTrue: [self simplePane]\\\\n\\\\t\\\\tifFalse: [self filter wantsButton\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self paneWithHeader]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [self simplePane]]! !\\\\n\\\\n!OBColumn methodsFor: 'morphic' stamp: 'cwp 2/12/2004 18:11'!\\\\npaneWithHeader\\\\n\\\\t^ OBPane forColumn: self withFilter: self filter! !\\\\n\\\\n!OBColumn methodsFor: 'morphic' stamp: 'cwp 2/12/2004 18:10'!\\\\nsimplePane\\\\n\\\\t^ OBPane forColumn: self! !\\\\n\\\\n\\\\n!OBColumn methodsFor: 'nodes' stamp: 'cwp 9/24/2005 22:29'!\\\\ngetChildren\\\\n\\\\tchildren _ self filter nodesForParent: self parent.\\\\n\\\\t^ children! !\\\\n\\\\n!OBColumn methodsFor: 'nodes' stamp: 'cwp 3/3/2004 00:11'!\\\\nnextMetaNode\\\\n\\\\t^ self selectedNode metaNode! !\\\\n\\\\n!OBColumn methodsFor: 'nodes' stamp: 'cwp 9/26/2005 00:14'!\\\\nselectAncestorOf: aNode\\\\n\\\\t| ancestor |\\\\n\\\\tancestor _ self filter selectAncestorOf: aNode withParent: self parent.\\\\n\\\\tancestor ifNotNil:\\\\n\\\\t\\\\t[self \\\\n\\\\t\\\\t\\\\tgetChildren; \\\\n\\\\t\\\\t\\\\tchanged: #list;\\\\n\\\\t\\\\t\\\\tselect: ancestor.\\\\n\\\\t\\\\tpanel selected: self].\\\\n\\\\t^ ancestor! !\\\\n\\\\n\\\\n!OBColumn methodsFor: 'printing' stamp: 'avi 3/6/2004 16:23'!\\\\ndescriptor\\\\n\\\\tself isEmpty ifTrue: [^ 'empty'].\\\\n\\\\tself hasSelection ifTrue: [^ self selectedNode name].\\\\n\\\\t^ ''! !\\\\n\\\\n!OBColumn methodsFor: 'printing' stamp: 'cwp 2/11/2004 23:31'!\\\\nprintOn: aStream\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream nextPut: $(.\\\\n\\\\taStream nextPutAll: self descriptor.\\\\n\\\\taStream nextPut: $)! !\\\\n\\\\n\\\\n!OBColumn methodsFor: 'selecting' stamp: 'avi 3/6/2004 18:05'!\\\\nclearSelection\\\\n\\\\tselection _ 0! !\\\\n\\\\n!OBColumn methodsFor: 'selecting' stamp: 'cwp 2/2/2004 21:54'!\\\\nselectedNode\\\\n\\\\t^ children at: self selection ifAbsent: [].! !\\\\n\\\\n!OBColumn methodsFor: 'selecting' stamp: 'cwp 7/14/2006 12:50'!\\\\nselectSilently: aNode\\\\n\\\\t| match |\\\\n\\\\taNode ifNil: [selection := 0. ^ self].\\\\n\\\\tmatch := children \\\\n\\\\t\\\\t\\\\t\\\\tdetect: [:ea | ea correspondsWith: aNode] \\\\n\\\\t\\\\t\\\\t\\\\tifNone: [selection := 0. ^ self].\\\\n\\\\tselection _ children indexOf: match.! !\\\\n\\\\n!OBColumn methodsFor: 'selecting' stamp: 'cwp 12/8/2004 22:10'!\\\\nselect: aNode\\\\n\\\\tself selection: (children indexOf: (children detect: [:ea | ea = aNode] ifNone: []))! !\\\\n\\\\n\\\\n!OBColumn methodsFor: 'testing' stamp: 'avi 3/6/2004 23:07'!\\\\nhasSelection\\\\n\\\\t^ self selection > 0! !\\\\n\\\\n!OBColumn methodsFor: 'testing' stamp: 'cwp 12/20/2004 22:09'!\\\\nincludesNode: aNode\\\\n\\\\t^ children includes: aNode! !\\\\n\\\\n!OBColumn methodsFor: 'testing' stamp: 'avi 3/6/2004 16:27'!\\\\nshouldBeLast\\\\n\\\\t^ self hasSelection not or: [self nextMetaNode hasChildren not]! !\\\\n\\\\n!OBColumn methodsFor: 'testing' stamp: 'cwp 2/12/2004 20:18'!\\\\nwantsButton\\\\n\\\\t^ self filter notNil and: [self filter wantsButton]! !\\\\n\\\\n\\\\n!OBColumn methodsFor: 'updating' stamp: 'cwp 6/9/2006 22:35'!\\\\nchildrenChanged: announcement\\\\n\\\\t(self parent = announcement node) ifTrue:\\\\n\\\\t\\\\t[self refresh]! !\\\\n\\\\n!OBColumn methodsFor: 'updating' stamp: 'cwp 9/25/2005 23:56'!\\\\nclear\\\\n\\\\tfilter _ nil.\\\\n\\\\tchildren _ #().\\\\n\\\\tself clearSelection.\\\\n\\\\tself changed: #list.\\\\n\\\\tself changed: #selection.\\\\n\\\\tself changed: #filter.! !\\\\n\\\\n!OBColumn methodsFor: 'updating' stamp: 'cwp 9/24/2005 22:56'!\\\\ncreateNext\\\\n\\\\t| nextMetaNode created |\\\\n\\\\tnextMetaNode := self nextMetaNode.\\\\n\\\\tcreated := nextMetaNode columnInPanel: panel node: self selectedNode.\\\\n\\\\tpanel pushColumn: created.\\\\n\\\\t^created! !\\\\n\\\\n!OBColumn methodsFor: 'updating' stamp: 'cwp 6/9/2006 23:17'!\\\\nlistChanged\\\\n\\\\tself refreshAndSignal: true! !\\\\n\\\\n!OBColumn methodsFor: 'updating' stamp: 'cwp 6/9/2006 23:19'!\\\\nnodeChanged: ann\\\\n\\\\t(children includes: ann node) ifTrue: [self changed: #list]! !\\\\n\\\\n!OBColumn methodsFor: 'updating' stamp: 'cwp 6/4/2006 12:03'!\\\\nnodeDeleted: announcement \\\\n\\\\t\\\\\\\"This gets called if an action causes the currently selected node to be deleted.\\\\\\\"\\\\n\\\\n\\\\tself selectedNode = announcement node\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[self getChildren.\\\\n\\\\t\\\\t\\\\tself changed: #list.\\\\n\\\\t\\\\t\\\\tself selection: 0]! !\\\\n\\\\n!OBColumn methodsFor: 'updating' stamp: 'cwp 6/9/2006 23:08'!\\\\nrefresh\\\\n\\\\tself refreshAndSignal: false! !\\\\n\\\\n!OBColumn methodsFor: 'updating' stamp: 'cwp 6/9/2006 23:08'!\\\\nrefresh: ann\\\\n\\\\tself refreshAndSignal: false! !\\\\n\\\\n!OBColumn methodsFor: 'updating' stamp: 'cwp 6/9/2006 23:08'!\\\\nrefreshAndSignal: aBoolean\\\\n\\\\t| node oldChildren shouldSignal |\\\\n\\\\tshouldSignal _ aBoolean.\\\\n\\\\tself isEmpty ifTrue: [^self].\\\\n\\\\tnode := self selectedNode.\\\\n\\\\toldChildren := children.\\\\n\\\\tself getChildren.\\\\n\\\\tchildren = oldChildren ifFalse: \\\\n\\\\t\\\\t[self selectSilently: node.\\\\n\\\\t\\\\tself hasSelection ifFalse: \\\\n\\\\t\\\\t\\\\t[shouldSignal _ true]].\\\\n\\\\tshouldSignal ifTrue: [self signalSelectionChanged].\\\\n\\\\tself changed: #list! !\\\\n\\\\n!OBColumn methodsFor: 'updating' stamp: 'cwp 6/8/2006 00:27'!\\\\nselectionChanged: ann\\\\n\\\\t! !\\\\n\\\\n!OBColumn methodsFor: 'updating' stamp: 'cwp 6/5/2006 23:31'!\\\\nsignalSelectionChanged\\\\n\\\\tself announcer announce: (OBSelectionChanged column: self)! !\\\\n\\\\n!OBColumn methodsFor: 'updating' stamp: 'cwp 6/10/2006 00:18'!\\\\nsubscribe\\\\n\\\\tself announcer \\\\n\\\\t\\\\tobserve: OBRefreshRequired send: #refresh: to: self;\\\\n\\\\t\\\\tobserve: OBNodeChanged send: #nodeChanged: to: self;\\\\n\\\\t\\\\tobserve: OBNodeDeleted send: #nodeDeleted: to: self;\\\\n\\\\t\\\\tobserve: OBChildrenChanged send: #childrenChanged: to: self;\\\\n\\\\t\\\\tobserve: OBSelectionChanged send: #selectionChanged: to: self.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBColumn class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBColumn class methodsFor: 'instance creation' stamp: 'cwp 9/18/2005 13:26'!\\\\ninPanel: aBrowser\\\\n\\\\t^ self new setPanel: aBrowser! !\\\\n\\\\n!OBColumn class methodsFor: 'instance creation' stamp: 'cwp 9/18/2005 13:25'!\\\\ninPanel: aPanel metaNode: aMetaNode node: aNode\\\\n\\\\t^ self new\\\\n\\\\t\\\\t\\\\tsetPanel: aPanel\\\\n\\\\t\\\\t\\\\tmetaNode: aMetaNode\\\\n\\\\t\\\\t\\\\tnode: aNode! !\\\\nOBPanel subclass: #OBColumnPanel\\\\n\\\\tinstanceVariableNames: 'root columns minPanes maxPanes'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Panels'!\\\\n!OBColumnPanel commentStamp: 'cwp 12/6/2004 23:50' prior: 0!\\\\nOBColumnPanel handles navigation around the nodes of the object graph. It maintains a list of columns, which track the user's path through the node tree. As nodes are selected, additional columns are added to the list, which appear as panes on the right of the panel. \\\\n\\\\niVars:\\\\n\\\\ncolumns\\\\t- A collection of OBColumns, each of which manages a single pane in the scroller.\\\\nminPanes - The minimum number of panes that should ever be visible.\\\\nmaxPanes - The maximum number of panes that should ever be visible.\\\\n!\\\\n\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing' stamp: 'cwp 11/16/2004 21:46'!\\\\ncolumns\\\\n\\\\t^columns! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing' stamp: 'cwp 11/16/2004 21:46'!\\\\ncolumns: anObject\\\\n\\\\tcolumns := anObject! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing' stamp: 'cwp 11/16/2004 22:22'!\\\\ncurrentNode\\\\n\\\\t^ self currentColumn ifNotNilDo: [:column | column selectedNode]! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing' stamp: 'cwp 11/16/2004 22:23'!\\\\ncurrentOrRootNode\\\\n\\\\t^(self columns reversed detect: [:ea | ea hasSelection]\\\\n\\\\t\\\\tifNone: [^self columns first parent]) selectedNode! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing' stamp: 'cwp 6/5/2006 23:10'!\\\\nhasSelection\\\\n\\\\t^ false! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing' stamp: 'cwp 11/16/2004 23:51'!\\\\nlabelString\\\\n\\\\t| label |\\\\n\\\\tself columns reversed do: \\\\n\\\\t\\\\t[:ea | \\\\n\\\\t\\\\tlabel := ea selectedNode ifNotNilDo: [:node | node title].\\\\n\\\\t\\\\tlabel ifNotNil: [^ label]].\\\\n\\\\t^ nil\\\\n! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing' stamp: 'cwp 11/16/2004 23:29'!\\\\nmaxPanes\\\\n\\\\t^maxPanes! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing' stamp: 'cwp 11/16/2004 22:54'!\\\\nminPanes\\\\n\\\\t^ minPanes! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing' stamp: 'cwp 2/28/2006 09:59'!\\\\nparentNodeForColumn: aColumn\\\\n\\\\t^ [(columns before: aColumn) selectedNode]\\\\n\\\\t\\\\ton: Error\\\\n\\\\t\\\\tdo: [:err | ^ root]! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing' stamp: 'dvf 9/5/2005 18:08'!\\\\nselectionPath\\\\n\\\\t^(self columns \\\\n\\\\t\\\\tcollect: [:e | e parent] \\\\n\\\\t\\\\tthenSelect: [:e | e notNil]) allButFirst! !\\\\n\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing columns' stamp: 'cwp 9/25/2005 23:58'!\\\\nclearAfter: aColumn \\\\n\\\\t| start |\\\\n\\\\tstart _ (columns indexOf: aColumn) + 1.\\\\n\\\\tstart to: columns size do: [:i | (columns at: i) clear]! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing columns' stamp: 'cwp 2/28/2006 18:12'!\\\\ncolumnAfter: aColumn \\\\n\\\\t^ [self columns after: aColumn]\\\\n\\\\t\\\\ton: Error\\\\n\\\\t\\\\tdo: [:err | nil]\\\\n! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing columns' stamp: 'cwp 2/28/2006 19:07'!\\\\ncolumnBefore: aColumn \\\\n\\\\t^ self columnBefore: aColumn ifAbsent: [nil]\\\\n\\\\n! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing columns' stamp: 'cwp 2/28/2006 19:07'!\\\\ncolumnBefore: aColumn ifAbsent: aBlock\\\\n\\\\t^ [self columns before: aColumn]\\\\n\\\\t\\\\ton: Error\\\\n\\\\t\\\\tdo: [:err | aBlock value]\\\\n\\\\n\\\\n! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing columns' stamp: 'cwp 11/16/2004 22:22'!\\\\ncurrentColumn\\\\n\\\\t^self columns reversed detect: [:ea | ea hasSelection] ifNone: []! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing columns' stamp: 'cwp 11/16/2004 23:01'!\\\\nemptyColumn\\\\n\\\\t^ OBColumn inPanel: self! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing columns' stamp: 'cwp 6/4/2006 00:39'!\\\\npopColumn\\\\n\\\\tself announcer unsubscribe: self columns removeLast.\\\\n! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing columns' stamp: 'cwp 6/4/2006 00:40'!\\\\npushColumn: aColumn \\\\n\\\\tself columns addLast: aColumn.\\\\n\\\\tself changed: #panes.\\\\n! !\\\\n\\\\n!OBColumnPanel methodsFor: 'accessing columns' stamp: 'cwp 6/8/2006 01:35'!\\\\nselected: aColumn \\\\n\\\\taColumn next ifNotNilDo: \\\\n\\\\t\\\\t[:next | \\\\n\\\\t\\\\tnext parent: aColumn selectedNode].! !\\\\n\\\\n\\\\n!OBColumnPanel methodsFor: 'callbacks' stamp: 'cwp 11/26/2004 21:55'!\\\\ndefaultBackgroundColor\\\\n\\\\t^ browser defaultBackgroundColor! !\\\\n\\\\n!OBColumnPanel methodsFor: 'callbacks' stamp: 'cwp 11/23/2004 00:52'!\\\\nokToReclaimPane\\\\n\\\\tcolumns size > minPanes ifFalse: [^ false].\\\\n\\\\t^ columns last isEmpty or: [(columns at: columns size - 1) shouldBeLast].\\\\n! !\\\\n\\\\n!OBColumnPanel methodsFor: 'callbacks' stamp: 'cwp 11/17/2004 22:48'!\\\\npanes\\\\n\\\\t^ columns collect: [:ea | ea morph]! !\\\\n\\\\n!OBColumnPanel methodsFor: 'callbacks' stamp: 'cwp 9/18/2005 11:49'!\\\\nreclaimPanes\\\\n\\\\t| old |\\\\n\\\\told := columns size.\\\\n\\\\t[self okToReclaimPane] whileTrue: [self popColumn].\\\\n\\\\t^ old - columns size! !\\\\n\\\\n!OBColumnPanel methodsFor: 'callbacks' stamp: 'cwp 11/18/2004 00:00'!\\\\nsizing\\\\n\\\\t^ (columns size max: minPanes) min: maxPanes! !\\\\n\\\\n\\\\n!OBColumnPanel methodsFor: 'constructing' stamp: 'cwp 11/17/2004 23:24'!\\\\nbuildScroller\\\\n\\\\t^ (OBPaneScroller withModel: self)\\\\n\\\\t\\\\tname: 'scroller';\\\\n\\\\t\\\\tyourself! !\\\\n\\\\n!OBColumnPanel methodsFor: 'constructing' stamp: 'cwp 11/20/2004 22:22'!\\\\nmorph\\\\n\\\\t^ (OBPaneScroller withModel: self)\\\\n\\\\t\\\\tname: 'scroller';\\\\n\\\\t\\\\tyourself! !\\\\n\\\\n!OBColumnPanel methodsFor: 'constructing' stamp: 'cwp 11/20/2004 22:26'!\\\\nmorphHeight\\\\n\\\\t^ 0! !\\\\n\\\\n\\\\n!OBColumnPanel methodsFor: 'initializing' stamp: 'cwp 9/24/2005 22:45'!\\\\nsetMetaNode: aMetaNode node: aNode \\\\n\\\\troot _ aNode.\\\\n\\\\troot metaNode: aMetaNode.\\\\n\\\\tself pushColumn: (aMetaNode columnInPanel: self node: root).\\\\n\\\\tminPanes - self columns size \\\\n\\\\t\\\\ttimesRepeat: [self pushColumn: self emptyColumn]! !\\\\n\\\\n!OBColumnPanel methodsFor: 'initializing' stamp: 'cwp 12/5/2004 16:54'!\\\\nsetMinPanes: min maxPanes: max\\\\n\\\\tcolumns _ OrderedCollection new.\\\\n\\\\tminPanes _ min.\\\\n\\\\tmaxPanes _ max! !\\\\n\\\\n\\\\n!OBColumnPanel methodsFor: 'navigating' stamp: 'cwp 6/9/2006 23:18'!\\\\nhopTo: aNode \\\\n\\\\t| column |\\\\n\\\\tcolumn := self columns last.\\\\n\\\\t[column refreshAndSignal: false; includesNode: aNode]\\\\n\\\\t\\\\twhileFalse: [column := self \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcolumnBefore: column \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifAbsent: [^ self jumpTo: aNode]].\\\\n\\\\tcolumn select: aNode! !\\\\n\\\\n!OBColumnPanel methodsFor: 'navigating' stamp: 'cwp 11/16/2004 23:34'!\\\\njumpToRoot\\\\n\\\\t^ self columns first selection: 0! !\\\\n\\\\n!OBColumnPanel methodsFor: 'navigating' stamp: 'cwp 6/10/2006 00:11'!\\\\njumpTo: aNode \\\\n\\\\t| column ancestor |\\\\n\\\\tcolumn := self columns first.\\\\n\\\\t\\\\n\\\\t[ancestor := column selectAncestorOf: aNode.\\\\n\\\\tancestor = aNode or: [ancestor isNil]] whileFalse:\\\\n\\\\t\\\\t[column := self columns after: column].\\\\n\\\\t\\\\n\\\\tself announcer announce: (OBSelectionChanged column: column)! !\\\\n\\\\n!OBColumnPanel methodsFor: 'navigating' stamp: 'cwp 9/24/2005 22:47'!\\\\nroot\\\\n\\\\t^ root! !\\\\n\\\\n\\\\n!OBColumnPanel methodsFor: 'testing' stamp: 'cwp 11/20/2004 21:10'!\\\\nisNavigation\\\\n\\\\t^ true! !\\\\n\\\\n\\\\n!OBColumnPanel methodsFor: 'updating' stamp: 'cwp 6/5/2006 23:52'!\\\\nnodeDeleted: ann\\\\n\\\\tann node = self root \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[self columns first clear.\\\\n\\\\t\\\\t\\\\tself announcer announce: (OBSelectionChanged column: self)]! !\\\\n\\\\n!OBColumnPanel methodsFor: 'updating' stamp: 'cwp 6/4/2006 01:03'!\\\\nselectNode: announcement\\\\n\\\\t^ self hopTo: announcement node! !\\\\n\\\\n!OBColumnPanel methodsFor: 'updating' stamp: 'cwp 6/5/2006 01:33'!\\\\nselectionChanged: ann\\\\n\\\\tann column hasSelection\\\\n\\\\t\\\\tifTrue: [self selected: ann column]\\\\n\\\\t\\\\tifFalse: [self clearAfter: ann column]\\\\n! !\\\\n\\\\n!OBColumnPanel methodsFor: 'updating' stamp: 'cwp 6/5/2006 01:32'!\\\\nsubscribe\\\\n\\\\tself announcer\\\\n\\\\t\\\\tobserve: OBSelectingNode send: #selectNode: to: self;\\\\n\\\\t\\\\tobserve: OBSelectionChanged send: #selectionChanged: to: self;\\\\n\\\\t\\\\tobserve: OBNodeCreated send: #selectNode: to: self;\\\\n\\\\t\\\\tobserve: OBNodeDeleted send: #nodeDeleted: to: self.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBColumnPanel class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBColumnPanel class methodsFor: 'instance creation' stamp: 'cwp 12/5/2004 16:56'!\\\\nminPanes: min maxPanes: max\\\\n\\\\t^ self basicNew setMinPanes: min maxPanes: max! !\\\\n\\\\n!OBColumnPanel class methodsFor: 'instance creation' stamp: 'cwp 12/5/2004 16:56'!\\\\nnew\\\\n\\\\t^ self minPanes: 1 maxPanes: 1! !\\\\nOBInteractionRequest subclass: #OBConfirmationRequest\\\\n\\\\tinstanceVariableNames: 'prompt confirm cancel'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Notifications'!\\\\n!OBConfirmationRequest commentStamp: 'cwp 3/5/2004 12:30' prior: 0!\\\\nThis notification is used to ask the user to confirm some kind potentially dangerous operation. Its default action is to open a PopUpMenu.\\\\n\\\\niVars:\\\\n\\\\nprompt\\\\t\\\\t- a string describing the situation the user is asked to confirm\\\\nconfirm\\\\t\\\\t- a string describing the action that will be taken if the user confirms\\\\ncancel\\\\t\\\\t- a string describing the action that will be taken if the user does not confirm!\\\\n\\\\n\\\\n!OBConfirmationRequest methodsFor: 'initalizing' stamp: 'cwp 2/28/2004 12:00'!\\\\nsetPrompt: promptString confirm: confirmString cancel: cancelString\\\\n\\\\tprompt _ promptString.\\\\n\\\\tconfirm _ confirmString.\\\\n\\\\tcancel _ cancelString! !\\\\n\\\\n\\\\n!OBConfirmationRequest methodsFor: 'responding' stamp: 'cwp 2/28/2004 12:11'!\\\\ncancel\\\\n\\\\tself resume: false! !\\\\n\\\\n!OBConfirmationRequest methodsFor: 'responding' stamp: 'cwp 2/28/2004 12:11'!\\\\nok\\\\n\\\\tself resume: true! !\\\\n\\\\n\\\\n!OBConfirmationRequest methodsFor: 'user interaction' stamp: 'cwp 6/4/2006 14:17'!\\\\ndefaultAction\\\\n\\\\t(prompt beginsWith: 'BogusD') ifTrue: [self halt].\\\\n\\\\t^ PopUpMenu confirm: prompt trueChoice: confirm falseChoice: cancel! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBConfirmationRequest class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBConfirmationRequest class methodsFor: 'as yet unclassified' stamp: 'cwp 2/28/2004 12:09'!\\\\nnewPrompt: prompt confirm: confirm cancel: cancel\\\\n\\\\t^ self new setPrompt: prompt confirm: confirm cancel: cancel! !\\\\n\\\\n!OBConfirmationRequest class methodsFor: 'as yet unclassified' stamp: 'cwp 2/28/2004 12:13'!\\\\nprompt: prompt\\\\n\\\\t^ self prompt: prompt confirm: 'Ok'! !\\\\n\\\\n!OBConfirmationRequest class methodsFor: 'as yet unclassified' stamp: 'cwp 2/28/2004 12:12'!\\\\nprompt: prompt confirm: confirm\\\\n\\\\t^ self prompt: prompt confirm: confirm cancel: 'Cancel'! !\\\\n\\\\n!OBConfirmationRequest class methodsFor: 'as yet unclassified' stamp: 'cwp 2/28/2004 12:02'!\\\\nprompt: prompt confirm: confirm cancel: cancel\\\\n\\\\t^ (self newPrompt: prompt confirm: confirm cancel: cancel) signal! !\\\\nObject subclass: #OBDefinition\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Utilities'!\\\\n!OBDefinition commentStamp: 'cwp 1/7/2005 23:38' prior: 0!\\\\nThe responsibility of a definition is to express a node's composition textually and respond to changes in the text by updating the node it represents. For example,a file browser might use a file definition to allow editing of a files contents.!\\\\n\\\\n\\\\n\\\\n!OBDefinition methodsFor: 'callbacks' stamp: 'cwp 3/22/2004 20:51'!\\\\naccept: aText notifying: aController\\\\n\\\\t^ self text: aText! !\\\\n\\\\n!OBDefinition methodsFor: 'callbacks' stamp: 'cwp 3/23/2004 00:08'!\\\\ndoItContext\\\\n\\\\t^ nil! !\\\\n\\\\n!OBDefinition methodsFor: 'callbacks' stamp: 'cwp 2/28/2005 23:23'!\\\\ndoItReceiver\\\\n\\\\t| class |\\\\n\\\\tclass _ self selectedClass.\\\\n\\\\t^ class\\\\n\\\\t\\\\tifNotNil: [class theNonMetaClass]\\\\n\\\\t\\\\tifNil: [FakeClassPool new]! !\\\\n\\\\n!OBDefinition methodsFor: 'callbacks' stamp: 'cwp 3/23/2004 22:16'!\\\\nselection\\\\n\\\\t^ 1 to: 0! !\\\\n\\\\n!OBDefinition methodsFor: 'callbacks' stamp: 'cwp 3/22/2004 20:52'!\\\\ntext\\\\n\\\\t^ ''! !\\\\n\\\\n!OBDefinition methodsFor: 'callbacks' stamp: 'cwp 3/23/2004 22:16'!\\\\ntextSelection\\\\n\\\\t^ self selection! !\\\\n\\\\n!OBDefinition methodsFor: 'callbacks' stamp: 'cwp 3/22/2004 20:52'!\\\\ntext: aText\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!OBDefinition methodsFor: 'updating' stamp: 'cwp 6/4/2006 18:53'!\\\\nsignalChange\\\\n\\\\tOBAnnouncer current announce: (OBDefinitionChanged definition: self)! !\\\\nOBAnnouncement subclass: #OBDefinitionChanged\\\\n\\\\tinstanceVariableNames: 'definition node'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Announcements'!\\\\n\\\\n!OBDefinitionChanged methodsFor: 'as yet unclassified' stamp: 'cwp 6/4/2006 11:25'!\\\\ndefinition\\\\n\\\\t^ definition! !\\\\n\\\\n!OBDefinitionChanged methodsFor: 'as yet unclassified' stamp: 'cwp 6/4/2006 11:26'!\\\\ndefinition: aDefinition\\\\n\\\\tdefinition _ aDefinition! !\\\\n\\\\n!OBDefinitionChanged methodsFor: 'as yet unclassified' stamp: 'cwp 6/5/2006 00:47'!\\\\nnode\\\\n\\\\t^ node! !\\\\n\\\\n!OBDefinitionChanged methodsFor: 'as yet unclassified' stamp: 'cwp 6/5/2006 00:47'!\\\\nnode: aNode\\\\n\\\\tnode _ aNode! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBDefinitionChanged class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBDefinitionChanged class methodsFor: 'as yet unclassified' stamp: 'cwp 6/4/2006 11:28'!\\\\ndefinition: aDefinition\\\\n\\\\t^ self new\\\\n\\\\t\\\\tdefinition: aDefinition;\\\\n\\\\t\\\\tyourself! !\\\\n\\\\n!OBDefinitionChanged class methodsFor: 'as yet unclassified' stamp: 'cwp 6/4/2006 11:27'!\\\\nnode: aNode definition: aDefinition\\\\n\\\\t^ self new\\\\n\\\\t\\\\tnode: aNode;\\\\n\\\\t\\\\tdefinition: aDefinition;\\\\n\\\\t\\\\tyourself! !\\\\nOBPanel subclass: #OBDefinitionPanel\\\\n\\\\tinstanceVariableNames: 'definition'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Panels'!\\\\n!OBDefinitionPanel commentStamp: 'cwp 1/7/2005 23:35' prior: 0!\\\\nOBDefinition serves as the model for the text pane of a typical browser. It's main responsibility is to act as a relay between a PluggableTextMorph and a Definition supplied by the currently selected node.\\\\n\\\\niVars:\\\\n\\\\nbrowser - The browser of which this panel is a part.\\\\n!\\\\n\\\\n\\\\n!OBDefinitionPanel methodsFor: 'accessing' stamp: 'cwp 9/17/2004 00:56'!\\\\ndefinition: aDefinition\\\\n\\\\tdefinition _ aDefinition.\\\\n\\\\tself changed: #text! !\\\\n\\\\n!OBDefinitionPanel methodsFor: 'accessing' stamp: 'cwp 3/22/2004 20:06'!\\\\ngetDefinition\\\\n\\\\t^ browser currentNode ifNotNilDo: [:node | node definition]! !\\\\n\\\\n!OBDefinitionPanel methodsFor: 'accessing' stamp: 'cwp 3/22/2004 20:41'!\\\\nwithDefinitionDo: workBlock ifNil: nilBlock\\\\n\\\\tdefinition ifNil: [ ^ nilBlock value].\\\\n\\\\t^ workBlock value: definition! !\\\\n\\\\n\\\\n!OBDefinitionPanel methodsFor: 'callbacks' stamp: 'cwp 6/4/2006 00:41'!\\\\naccept: aText notifying: aController\\\\n\\\\t^ self \\\\n\\\\t\\\\twithDefinitionDo: [:def | [def accept: aText notifying: aController]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ton: OBAnnouncerRequest\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:notification | notification resume: self announcer]]\\\\n\\\\t\\\\tifNil: [true]! !\\\\n\\\\n!OBDefinitionPanel methodsFor: 'callbacks' stamp: 'cwp 3/23/2004 00:23'!\\\\ndoItContext\\\\n\\\\t^ self \\\\n\\\\t\\\\twithDefinitionDo: [:def | (def respondsTo: #doItContext) ifTrue: [def doItContext]]\\\\n\\\\t\\\\tifNil: [nil]! !\\\\n\\\\n!OBDefinitionPanel methodsFor: 'callbacks' stamp: 'cwp 3/23/2004 00:23'!\\\\ndoItReceiver\\\\n\\\\t^ self \\\\n\\\\t\\\\twithDefinitionDo: [:def | (def respondsTo: #doItReceiver) ifTrue: [def doItReceiver]]\\\\n\\\\t\\\\tifNil: [nil]! !\\\\n\\\\n!OBDefinitionPanel methodsFor: 'callbacks' stamp: 'cwp 10/24/2004 09:16'!\\\\nmenu: aMenu shifted: aBoolean\\\\n\\\\t| items |\\\\n\\\\titems _  aBoolean \\\\n\\\\t\\\\tifTrue: [self shiftedYellowButtonMenu] \\\\n\\\\t\\\\tifFalse: [self yellowButtonMenu].\\\\n\\\\titems do: [:ea |\\\\n\\\\t\\\\t\\\\t  ea = #-\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [aMenu add: ea first action: ea second]\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [aMenu addLine]].\\\\n\\\\t^ aMenu ! !\\\\n\\\\n!OBDefinitionPanel methodsFor: 'callbacks' stamp: 'cwp 10/24/2004 09:27'!\\\\nperform: aSelector orSendTo: anObject\\\\n\\\\t| receiver |\\\\n\\\\treceiver  _ (self respondsTo: aSelector) ifTrue: [self] ifFalse: [anObject].\\\\n\\\\treceiver perform: aSelector! !\\\\n\\\\n!OBDefinitionPanel methodsFor: 'callbacks' stamp: 'cwp 3/23/2004 00:22'!\\\\nselectedClass\\\\n\\\\t^ self \\\\n\\\\t\\\\twithDefinitionDo: [:def | (def respondsTo: #selectedClass) ifTrue: [def selectedClass]] \\\\n\\\\t\\\\tifNil: [nil]! !\\\\n\\\\n!OBDefinitionPanel methodsFor: 'callbacks' stamp: 'cwp 3/22/2004 21:15'!\\\\nselection\\\\n\\\\t^ self withDefinitionDo: [:def | def textSelection] ifNil: [1 to: 0]! !\\\\n\\\\n!OBDefinitionPanel methodsFor: 'callbacks' stamp: 'cwp 3/22/2004 20:42'!\\\\ntext\\\\n\\\\t^ self withDefinitionDo: [:def | def text] ifNil: ['']! !\\\\n\\\\n\\\\n!OBDefinitionPanel methodsFor: 'constructing' stamp: 'cwp 10/30/2004 22:03'!\\\\nmorph\\\\n\\\\t^ (OBPluggableTextMorph\\\\n\\\\t\\\\ton: self\\\\n\\\\t\\\\ttext: #text\\\\n\\\\t\\\\taccept: #accept:notifying:\\\\n\\\\t\\\\treadSelection: #selection\\\\n\\\\t\\\\tmenu: #menu:shifted:)\\\\n\\\\t\\\\t\\\\tfont: Preferences standardCodeFont;\\\\n\\\\t\\\\t\\\\tyourself\\\\n\\\\t\\\\t\\\\t\\\\n\\\\t\\\\\\\"see CodeHolder>>buildMorphicCodePaneWith:\\\\\\\"! !\\\\n\\\\n!OBDefinitionPanel methodsFor: 'constructing' stamp: 'cwp 3/9/2004 21:35'!\\\\nmorphHeight\\\\n\\\\t^ 0! !\\\\n\\\\n!OBDefinitionPanel methodsFor: 'constructing' stamp: 'cwp 7/14/2006 01:17'!\\\\nshiftedYellowButtonMenu\\\\n\\\\t^ {\\\\n\\\\t\\\\t{'explain' translated.\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t#explain}.\\\\n\\\\t\\\\t#-.\\\\n\\\\t\\\\t{'selectors containing it (W)' translated.\\\\t\\\\t#methodNamesContainingIt}.\\\\n\\\\t\\\\t{'method strings with it (E)' translated.\\\\t\\\\t#methodStringsContainingit}.\\\\n\\\\t\\\\t{'method source with it' translated.\\\\t\\\\t\\\\t#methodSourceContainingIt}.\\\\n\\\\t\\\\t{'class names containing it' translated.\\\\t\\\\t#classNamesContainingIt}.\\\\n\\\\t\\\\t{'class comments with it' translated.\\\\t\\\\t\\\\t#classCommentsContainingIt}.\\\\n\\\\t\\\\t{'change sets with it' translated.\\\\t\\\\t\\\\t\\\\t#browseChangeSetsWithSelector}.\\\\n\\\\t\\\\t#-.\\\\n\\\\t\\\\t{'save contents to file...' translated.\\\\t\\\\t\\\\t#saveContentsInFile}.\\\\n\\\\t\\\\t#-.\\\\n\\\\t\\\\t{'more...' translated.\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t#yellowButtonActivity}.\\\\n\\\\t}\\\\n! !\\\\n\\\\n!OBDefinitionPanel methodsFor: 'constructing' stamp: 'cwp 10/24/2004 23:28'!\\\\nyellowButtonMenu\\\\n\\\\t^ {\\\\n\\\\t\\\\t{'find...(f)' translated.\\\\t\\\\t\\\\t\\\\t#find}.\\\\t\\\\t\\\\t     \\\\n\\\\t\\\\t{'find again (g)' translated.\\\\t\\\\t\\\\t#findAgain}.\\\\t\\\\t     \\\\n\\\\t\\\\t{'set search string (h)' translated.\\\\t#setSearchString}.\\\\n\\\\t\\\\t#-.\\\\t     \\\\n\\\\t\\\\t{'do again (j)' translated.\\\\t\\\\t\\\\t#again}.\\\\t\\\\t     \\\\n\\\\t\\\\t{'undo (z)' translated.\\\\t\\\\t\\\\t\\\\t#undo}.\\\\t\\\\t\\\\t     \\\\n\\\\t\\\\t#-.\\\\t     \\\\n\\\\t\\\\t{'copy (c)' translated.\\\\t\\\\t\\\\t\\\\t#copySelection}.\\\\t     \\\\n\\\\t\\\\t{'cut (x)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#cut}.\\\\t\\\\t\\\\t     \\\\n\\\\t\\\\t{'paste (v)' translated.\\\\t\\\\t\\\\t\\\\t#paste}.\\\\t\\\\t     \\\\n\\\\t\\\\t{'paste...' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#pasteRecent}.\\\\t\\\\t     \\\\n\\\\t\\\\t#-.\\\\t     \\\\n\\\\t\\\\t{'accept (s)' translated.\\\\t\\\\t\\\\t\\\\t#accept}.\\\\t\\\\t     \\\\n\\\\t\\\\t{'cancel (l)' translated.\\\\t\\\\t\\\\t\\\\t#cancel}.\\\\t\\\\t     \\\\n\\\\t\\\\t#-.\\\\t     \\\\n\\\\t\\\\t{'do it (d)' translated.\\\\t\\\\t\\\\t\\\\t#doIt}.\\\\t\\\\t\\\\t     \\\\n\\\\t\\\\t{'print it (p)' translated.\\\\t\\\\t\\\\t\\\\t#printIt}.\\\\t\\\\t     \\\\n\\\\t\\\\t{'inspect it (i)' translated.\\\\t\\\\t\\\\t#inspectIt}.\\\\t\\\\t     \\\\n\\\\t\\\\t{'explore it (I)' translated.\\\\t\\\\t\\\\t#exploreIt}.\\\\t\\\\t     \\\\n\\\\t\\\\t{'debug it' translated.\\\\t\\\\t\\\\t\\\\t#debugIt}.\\\\t\\\\t     \\\\n\\\\t\\\\t#-.\\\\t     \\\\n\\\\t\\\\t{'browse it (b)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#browseIt}.\\\\n\\\\t\\\\t{'senders of it (n)' translated.\\\\t\\\\t\\\\t\\\\t#sendersOfIt}.\\\\n\\\\t\\\\t{'implementors of it (m)' translated.\\\\t\\\\t\\\\t#implementorsOfIt}.\\\\n\\\\t\\\\t{'references to it (N)' translated.\\\\t\\\\t\\\\t\\\\t#referencesToIt}.\\\\n\\\\t\\\\t#-.\\\\n\\\\t\\\\t{'more...' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#shiftedTextPaneMenuRequest}.\\\\n\\\\t}\\\\n! !\\\\n\\\\n\\\\n\\\\n!OBDefinitionPanel methodsFor: 'updating' stamp: 'cwp 4/18/2006 21:31'!\\\\naboutToChange: ann\\\\n\\\\t| ok |\\\\n\\\\tself canDiscardEdits ifTrue: [^ true].\\\\n\\\\tok _ OBConfirmationRequest\\\\n\\\\t\\\\t\\\\tprompt: 'Changes have not been saved.\\\\nIs it OK to discard those changes?'\\\\n\\\\t\\\\t\\\\tconfirm: 'Discard changes'.\\\\n\\\\tok\\\\n\\\\t\\\\tifTrue: [self changed: #clearUserEdits]\\\\n\\\\t\\\\tifFalse: [ann veto]! !\\\\n\\\\n!OBDefinitionPanel methodsFor: 'updating' stamp: 'cwp 6/4/2006 11:31'!\\\\ndefinitionChanged: ann\\\\n\\\\tdefinition _ ann definition.\\\\n\\\\tself changed: #text! !\\\\n\\\\n!OBDefinitionPanel methodsFor: 'updating' stamp: 'cwp 6/3/2006 21:55'!\\\\nrefresh: announcement\\\\n\\\\t| oldDefinition |\\\\n\\\\tdefinition ifNil: [^ self].\\\\n\\\\toldDefinition _ definition.\\\\n\\\\tdefinition _ self getDefinition.\\\\n\\\\tdefinition text = oldDefinition text ifTrue: [^ self].\\\\n\\\\tself canDiscardEdits\\\\n\\\\t\\\\t\\\\tifTrue: [self changed: #text]\\\\n\\\\t\\\\t\\\\tifFalse: [self changed: #codeChangedElsewhere]! !\\\\n\\\\n!OBDefinitionPanel methodsFor: 'updating' stamp: 'cwp 4/24/2006 16:06'!\\\\nselectionChanged: ann\\\\n\\\\tself definition: self getDefinition! !\\\\n\\\\n!OBDefinitionPanel methodsFor: 'updating' stamp: 'cwp 6/4/2006 11:30'!\\\\nsubscribe\\\\n\\\\tself announcer \\\\n\\\\t\\\\tobserve: OBAboutToChange\\\\n\\\\t\\\\tsend: #aboutToChange:\\\\n\\\\t\\\\tto: self;\\\\n\\\\t\\\\t\\\\n\\\\t\\\\tobserve: OBSelectionChanged\\\\n\\\\t\\\\tsend: #selectionChanged:\\\\n\\\\t\\\\tto: self;\\\\n\\\\t\\\\t\\\\n\\\\t\\\\tobserve: OBRefreshRequired\\\\n\\\\t\\\\tsend: #refresh:\\\\n\\\\t\\\\tto: self;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\n\\\\t\\\\tobserve: OBDefinitionChanged\\\\n\\\\t\\\\tsend: #definitionChanged: \\\\n\\\\t\\\\tto: self.! !\\\\n\\\\n\\\\n!OBDefinitionPanel methodsFor: '*ob-standard-cmds' stamp: 'pmm 7/6/2006 20:49'!\\\\nbrowseIt: aSymbol\\\\n\\\\t| entry |\\\\n\\\\tentry := self selectedClass environment at: aSymbol ifAbsent: [nil].\\\\n\\\\tentry ifNil: [^ self implementorsOfIt: aSymbol].\\\\n\\\\t(entry isBehavior or: [entry isTrait ])\\\\n\\\\t\\\\tifFalse: [entry := entry class].\\\\n\\\\tOBSystemBrowser openOnClass: entry.\\\\n\\\\t^ true\\\\n\\\\t! !\\\\n\\\\n!OBDefinitionPanel methodsFor: '*ob-standard-cmds' stamp: 'avi 9/17/2005 01:36'!\\\\nimplementorsOfIt: aSelector \\\\n\\\\tOBImplementorsBrowser browseRoot: (OBSelectorNode on: aSelector).\\\\n\\\\t^true! !\\\\n\\\\n!OBDefinitionPanel methodsFor: '*ob-standard-cmds' stamp: 'avi 9/17/2005 01:36'!\\\\nreferencesToIt: aClassName \\\\n\\\\t| class |\\\\n\\\\tclass := self selectedClass environment at: aClassName ifAbsent: [^false].\\\\n\\\\tclass isBehavior ifFalse: [^false].\\\\n\\\\tOBReferencesBrowser browseRoot: (OBClassNode on: class).\\\\n\\\\t^true! !\\\\n\\\\n!OBDefinitionPanel methodsFor: '*ob-standard-cmds' stamp: 'avi 9/17/2005 01:36'!\\\\nsendersOfIt: aSelector \\\\n\\\\tOBSendersBrowser browseRoot: (OBSelectorNode on: aSelector).\\\\n\\\\t^true! !\\\\nNotification subclass: #OBDispatcherRequest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Notifications'!\\\\nOBCodeNode subclass: #OBEnvironmentNode\\\\n\\\\tinstanceVariableNames: 'environment'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBEnvironmentNode commentStamp: 'cwp 1/8/2005 13:01' prior: 0!\\\\nOBEnvironmentNode wraps an instance of SystemDictionary. In current Squeak images, there is only one such instance, but OB-Standard is coded so as to use rely on this assumption as little as possible. Thus OBEnvironmentNode typically serves as the root of the standard browser, and passes its environment on to other nodes in the tree.!\\\\n\\\\n\\\\n!OBEnvironmentNode methodsFor: 'navigating'!\\\\ncategories\\\\n\\\\t^ environment organization categories collect: [:cat | OBClassCategoryNode \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ton: cat\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinEnvironment: environment]! !\\\\n\\\\n!OBEnvironmentNode methodsFor: 'navigating' stamp: 'cwp 9/20/2005 08:43'!\\\\ncategoryNodeNamed: aString \\\\n\\\\t^ OBClassCategoryNode on: aString! !\\\\n\\\\n\\\\n!OBEnvironmentNode methodsFor: 'accessing'!\\\\nenvironment\\\\n\\\\t^ environment! !\\\\n\\\\n!OBEnvironmentNode methodsFor: 'accessing'!\\\\norganization\\\\n\\\\t^ self environment organization! !\\\\n\\\\n\\\\n!OBEnvironmentNode methodsFor: 'displaying'!\\\\nname \\\\n\\\\t^ 'Squeak'! !\\\\n\\\\n\\\\n!OBEnvironmentNode methodsFor: 'initializing'!\\\\nsetEnvironment: anEnvironment\\\\n\\\\tenvironment := anEnvironment! !\\\\n\\\\n\\\\n!OBEnvironmentNode methodsFor: 'testing' stamp: 'cwp 6/30/2006 00:54'!\\\\nhasOrganization\\\\n\\\\t^ true! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBEnvironmentNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBEnvironmentNode class methodsFor: 'as yet unclassified'!\\\\nforImage\\\\n\\\\t^ self on: Smalltalk! !\\\\n\\\\n!OBEnvironmentNode class methodsFor: 'as yet unclassified'!\\\\non: anEnvironment\\\\n\\\\t^ self new setEnvironment: anEnvironment! !\\\\nObject subclass: #OBFilter\\\\n\\\\tinstanceVariableNames: 'metaNode monitor'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Kernel'!\\\\n!OBFilter commentStamp: 'cwp 3/4/2004 21:53' prior: 0!\\\\nA browser's metagraph defines the way in which the user may traverse the graph of objects which make up the browser's domain. But it's not always desirable to have all the nodes made available by the metagraph to be visible in the browser. An filter provides a strategy for filtering out some of the nodes from the display. \\\\n\\\\nOBFilter provides a \\\\\\\"null\\\\\\\" filter - one that does no filtering at all - and serves as a superclass for other filters. !\\\\n\\\\n\\\\n!OBFilter methodsFor: 'accessing' stamp: 'cwp 2/11/2004 23:48'!\\\\nmetaNode\\\\n\\\\t^ metaNode! !\\\\n\\\\n!OBFilter methodsFor: 'accessing' stamp: 'cwp 2/9/2004 20:56'!\\\\nmonitor: aMonitor\\\\n\\\\tmonitor _ aMonitor! !\\\\n\\\\n\\\\n!OBFilter methodsFor: 'initalizing' stamp: 'cwp 2/9/2004 20:54'!\\\\nsetMetaNode: aMetaNode\\\\n\\\\tmetaNode _ aMetaNode! !\\\\n\\\\n\\\\n!OBFilter methodsFor: 'public' stamp: 'cwp 2/9/2004 20:50'!\\\\nchildren\\\\n\\\\t^ metaNode children! !\\\\n\\\\n!OBFilter methodsFor: 'public' stamp: 'cwp 2/9/2004 20:52'!\\\\nnodesForParent: aNode\\\\n\\\\t^ metaNode nodesForParent: aNode! !\\\\n\\\\n!OBFilter methodsFor: 'public' stamp: 'cwp 2/29/2004 14:34'!\\\\nselectAncestorOf: aNode withParent: parentNode\\\\n\\\\t^ (metaNode nodesForParent: parentNode)\\\\n\\\\t\\\\tdetect: [:child | child isAncestorOf: aNode] \\\\n\\\\t\\\\tifNone: [nil]! !\\\\n\\\\n\\\\n!OBFilter methodsFor: 'queries' stamp: 'cwp 2/9/2004 21:06'!\\\\nwantsButton\\\\n\\\\t^ false! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBFilter class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBFilter class methodsFor: 'as yet unclassified' stamp: 'cwp 2/9/2004 20:54'!\\\\nforMetaNode: aMetaNode\\\\n\\\\t^ self new setMetaNode: aMetaNode! !\\\\nOBPanel subclass: #OBFixedButtonPanel\\\\n\\\\tinstanceVariableNames: 'models actions'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Panels'!\\\\n!OBFixedButtonPanel commentStamp: 'cwp 1/7/2005 23:35' prior: 0!\\\\nOBFixedButtonPanel displays a horizontal row of buttons. In contrast to OBVarButtonPanel, the buttons do not change as nodes are selected in the navigation panel; instead they are enabled and disabled according to whether the actions they represent are applicable to the selected node.!\\\\n\\\\n\\\\n!OBFixedButtonPanel methodsFor: 'accessing' stamp: 'cwp 11/26/2004 22:53'!\\\\nbuttonModels\\\\n\\\\t^ models! !\\\\n\\\\n\\\\n!OBFixedButtonPanel methodsFor: 'callbacks' stamp: 'cwp 11/27/2004 19:20'!\\\\nisEnabled: aModel\\\\n\\\\t^ (actions at: aModel) notNil! !\\\\n\\\\n!OBFixedButtonPanel methodsFor: 'callbacks' stamp: 'cwp 11/27/2004 19:20'!\\\\nisSelected: aModel\\\\n\\\\t^ true! !\\\\n\\\\n!OBFixedButtonPanel methodsFor: 'callbacks' stamp: 'cwp 8/29/2004 11:28'!\\\\npush: aModel\\\\n\\\\t(actions at: aModel) ifNotNilDo: [:action | action trigger]! !\\\\n\\\\n!OBFixedButtonPanel methodsFor: 'callbacks' stamp: 'cwp 6/3/2006 22:15'!\\\\nselectionChanged: ann\\\\n\\\\t| node nodeActions |\\\\n\\\\tnode _ browser currentNode ifNil: [^ self].\\\\n\\\\tnodeActions _ (node metaNode actionsForNode: node) select: [:ea | ea wantsButton].\\\\n\\\\tactions keys do: \\\\n\\\\t\\\\t[:model | \\\\n\\\\t\\\\tactions at: model put: nil.\\\\n\\\\t\\\\tnodeActions do: \\\\n\\\\t\\\\t\\\\t[:action | model label = action buttonLabel ifTrue: [actions at: model put: action]]].\\\\n\\\\tactions keys do: [:ea | ea selectionChanged].! !\\\\n\\\\n!OBFixedButtonPanel methodsFor: 'callbacks' stamp: 'cwp 6/3/2006 22:14'!\\\\nsubscribe\\\\n\\\\tself announcer\\\\n\\\\t\\\\tobserve: OBSelectionChanged\\\\n\\\\t\\\\tsend: #selectionChanged:\\\\n\\\\t\\\\tto: self! !\\\\n\\\\n\\\\n!OBFixedButtonPanel methodsFor: 'constructing' stamp: 'lr 3/23/2006 18:14'!\\\\ncreateMorph\\\\n\\\\t^(RectangleMorph new)\\\\n\\\\t\\\\tlayoutPolicy: TableLayout new;\\\\n\\\\t\\\\tlistDirection: #leftToRight;\\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tvResizing: #spaceFill;\\\\n\\\\t\\\\tborderWidth: 0;\\\\n\\\\t\\\\twrapCentering: #center;\\\\n\\\\t\\\\tcellPositioning: #leftCenter;\\\\n\\\\t\\\\trubberBandCells: true;\\\\n\\\\t\\\\tlayoutInset: 2;\\\\n\\\\t\\\\tcellInset: 2;\\\\n\\\\t\\\\tyourself! !\\\\n\\\\n!OBFixedButtonPanel methodsFor: 'constructing' stamp: 'cwp 11/27/2004 21:24'!\\\\nmorph\\\\n\\\\t| morph |\\\\n\\\\tmorph := self createMorph.\\\\n\\\\tself buttonModels do: [:ea | morph addMorphBack: (self morphForModel: ea)].\\\\n\\\\t^morph! !\\\\n\\\\n!OBFixedButtonPanel methodsFor: 'constructing' stamp: 'cwp 11/27/2004 21:25'!\\\\nmorphForModel: aModel\\\\n\\\\t| morph paneColor |\\\\n\\\\tmorph _ aModel morph.\\\\n\\\\tpaneColor _ browser defaultBackgroundColor.\\\\n\\\\tmorph onColor: paneColor darker offColor: paneColor lighter.\\\\n\\\\t^ morph! !\\\\n\\\\n!OBFixedButtonPanel methodsFor: 'constructing' stamp: 'lr 3/23/2006 18:15'!\\\\nmorphHeight\\\\n\\\\t^ 30! !\\\\n\\\\n\\\\n!OBFixedButtonPanel methodsFor: 'initializing' stamp: 'cwp 11/26/2004 22:53'!\\\\ninitialize\\\\n\\\\tmodels _ OrderedCollection new.\\\\n\\\\tactions _ Dictionary new.! !\\\\n\\\\n\\\\n!OBFixedButtonPanel methodsFor: 'public' stamp: 'cwp 11/26/2004 22:52'!\\\\naddButtonWithLabel: label\\\\n\\\\t| model |\\\\n\\\\tmodel _ OBButtonModel withLabel: label inBar: self.\\\\n\\\\tmodels add: model.\\\\n\\\\tactions at: model put: nil! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBFixedButtonPanel class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBFixedButtonPanel class methodsFor: 'as yet unclassified' stamp: 'cwp 2/28/2006 10:41'!\\\\nnew\\\\n\\\\t^ self basicNew initialize! !\\\\nOBCodeBrowser subclass: #OBHierarchyBrowser\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Browsers'!\\\\n!OBHierarchyBrowser commentStamp: 'cwp 1/7/2005 23:50' prior: 0!\\\\nOBHierarchyBrowser provides a three-pane browers that displays a class within it's surrounding hierarchy - both superclasses and subclasses!\\\\n\\\\n\\\\n!OBHierarchyBrowser methodsFor: 'as yet unclassified' stamp: 'cwp 12/13/2004 00:40'!\\\\ndefaultBackgroundColor\\\\n\\\\t^ Color lightGreen! !\\\\n\\\\n!OBHierarchyBrowser methodsFor: 'as yet unclassified' stamp: 'cwp 12/13/2004 01:00'!\\\\ndefaultLabel\\\\n\\\\t^ self root name, ' Hierarchy'! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBHierarchyBrowser class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBHierarchyBrowser class methodsFor: 'configuration' stamp: 'avi 9/17/2005 01:06'!\\\\ndefaultMetaNode\\\\n\\\\t^ self \\\\n\\\\t\\\\taddTo: (OBMetaNode named: 'RootClass')\\\\n\\\\t\\\\tclass: #classHierarchy \\\\n\\\\t\\\\tcomment: #commentHierarchy \\\\n\\\\t\\\\tmetaclass: #metaclassHierarchy.\\\\n! !\\\\n\\\\n!OBHierarchyBrowser class methodsFor: 'configuration' stamp: 'cwp 12/13/2004 00:37'!\\\\npaneCount\\\\n\\\\t^ 3! !\\\\n\\\\n!OBHierarchyBrowser class methodsFor: 'configuration' stamp: 'cwp 12/13/2004 01:00'!\\\\ntitleForRoot: aNode\\\\n\\\\t^ aNode name, ' Hierarchy'! !\\\\n\\\\n\\\\n!OBHierarchyBrowser class methodsFor: 'instance creation' stamp: 'lr 3/6/2006 19:28'!\\\\nonClass: aClass \\\\n\\\\t^self root: aClass asNode selection: aClass asNode! !\\\\n\\\\n\\\\n!OBHierarchyBrowser class methodsFor: 'opening' stamp: 'cwp 12/15/2004 22:49'!\\\\nopenOnClass: aClass\\\\n\\\\t^ (self onClass: aClass) open! !\\\\nOBListBrowser subclass: #OBImplementorsBrowser\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Browsers'!\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBImplementorsBrowser class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBImplementorsBrowser class methodsFor: 'as yet unclassified' stamp: 'cwp 3/2/2006 15:35'!\\\\nchaseImplementorsNav: navSelector\\\\n\\\\t| message implementor |\\\\n\\\\tmessage := OBMetaNode named: 'Message'.\\\\n\\\\timplementor := OBMetaNode named: 'Implementor'.\\\\n\\\\timplementor\\\\n\\\\t\\\\tdisplaySelector: #indentedFullName;\\\\n\\\\t\\\\tchildAt: #messages put: message;\\\\n\\\\t\\\\taddActor: OBNodeActor new.\\\\n\\\\tmessage\\\\n\\\\t\\\\tchildAt: navSelector labeled: 'implementors' put: implementor;\\\\n\\\\t\\\\taddActor: OBNodeActor new.\\\\n\\\\t^ implementor! !\\\\n\\\\n!OBImplementorsBrowser class methodsFor: 'as yet unclassified' stamp: 'avi 9/17/2005 01:24'!\\\\ndefaultMetaNode\\\\n\\\\t^ self hierarchicalImplementors! !\\\\n\\\\n!OBImplementorsBrowser class methodsFor: 'as yet unclassified' stamp: 'avi 9/17/2005 01:24'!\\\\nhierarchicalImplementors\\\\n\\\\t^ self implementorsNav: #implementorsHierarchically! !\\\\n\\\\n!OBImplementorsBrowser class methodsFor: 'as yet unclassified' stamp: 'avi 9/17/2005 01:24'!\\\\nimplementorsNav: navSelector\\\\n\\\\t| selector implementors |\\\\n\\\\tselector := OBMetaNode named: 'Selector'.\\\\n\\\\timplementors := OBMetaNode named: 'Implementors'.\\\\n\\\\t\\\\n\\\\tselector \\\\n\\\\t\\\\tchildAt: navSelector labeled: 'list' put: implementors;\\\\n\\\\t\\\\tchildAt: navSelector labeled: 'chase' put: (self chaseImplementorsNav: navSelector);\\\\n\\\\t\\\\tfilterClass: OBModalFilter.\\\\n\\\\timplementors \\\\n\\\\t\\\\tdisplaySelector: #indentedFullName;\\\\n\\\\t\\\\taddActor: OBNodeActor new.\\\\n\\\\n\\\\t^ selector! !\\\\n\\\\n!OBImplementorsBrowser class methodsFor: 'as yet unclassified' stamp: 'avi 9/17/2005 01:36'!\\\\ntitle\\\\n\\\\t^ 'Implementors of'! !\\\\nOBActor subclass: #OBImplementorsViewActor\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Services'!\\\\n\\\\n!OBImplementorsViewActor methodsFor: 'as yet unclassified' stamp: 'cwp 7/14/2006 14:28'!\\\\nactionsForParent: aNode\\\\n\\\\t^{OBAction\\\\n\\\\t\\\\t\\\\tlabel: 'add implementor' \\\\n\\\\t\\\\t\\\\treceiver: self\\\\n\\\\t\\\\t\\\\tselector: #addImplementor:\\\\n\\\\t\\\\t\\\\targuments: {aNode}\\\\n\\\\t\\\\t\\\\tkeystroke: $a\\\\n\\\\t\\\\t\\\\ticon: self newIcon}! !\\\\n\\\\n!OBImplementorsViewActor methodsFor: 'as yet unclassified' stamp: 'dvf 9/12/2005 16:34'!\\\\naddImplementor: aNode \\\\n\\\\t| class sel |\\\\n\\\\tsel := aNode selector.\\\\n\\\\tclass := self getClassForNewImplementationOf: sel.\\\\n\\\\tclass ifNil: [^self].\\\\n\\\\t(class selectors includes: sel) \\\\n\\\\t\\\\tifTrue: [^self inform: class name , ' already implements #' , sel].\\\\n\\\\tclass compile: aNode selector , '\\\\n\\\\tself shouldBeImplemented'.\\\\n\\\\t(OBMethodNode on: sel inClass: class) signalSelection! !\\\\n\\\\n!OBImplementorsViewActor methodsFor: 'as yet unclassified' stamp: 'dvf 9/12/2005 16:14'!\\\\ngetClassForNewImplementationOf: sel \\\\n\\\\t| className |\\\\n\\\\tclassName := (OBTextRequest \\\\n\\\\t\\\\t\\\\t\\\\tprompt: 'Please type class name in which to implement ' , sel\\\\n\\\\t\\\\t\\\\t\\\\ttemplate: '') ifNil: [''].\\\\n\\\\t^(Smalltalk classNamed: className withBlanksTrimmed) ifNil: \\\\n\\\\t\\\\t\\\\t[self inform: 'Class ' , className , ' not found'.\\\\n\\\\t\\\\t\\\\tnil]! !\\\\nOBCodeBrowser subclass: #OBInheritanceBrowser\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Browsers'!\\\\n!OBInheritanceBrowser commentStamp: 'cwp 1/7/2005 23:51' prior: 0!\\\\nOBInheritanceBrowser shows the inheritance hierarchy of a method, both superclass implementations which it overrides, and subclass implementations which override it.!\\\\n\\\\n\\\\n!OBInheritanceBrowser methodsFor: 'morphic' stamp: 'avi 11/29/2004 21:52'!\\\\ndefaultBackgroundColor\\\\n\\\\t^ Color lightGreen! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBInheritanceBrowser class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBInheritanceBrowser class methodsFor: 'configuration' stamp: 'avi 9/17/2005 01:08'!\\\\ndefaultMetaNode\\\\n\\\\t| method root |\\\\n\\\\tmethod := OBMetaNode named: 'Method'.\\\\n\\\\troot := OBMetaNode named: 'Root'.\\\\n\\\\troot\\\\n\\\\t\\\\tchildAt: #children put: method.\\\\n\\\\tmethod\\\\n\\\\t\\\\tdisplaySelector: #fullName;\\\\n\\\\t\\\\tchildAt: #overrides put: method;\\\\n\\\\t\\\\taddActor: OBNodeActor new.\\\\n\\\\t^ root! !\\\\n\\\\n!OBInheritanceBrowser class methodsFor: 'configuration'!\\\\ntitle\\\\n\\\\t^ 'Inheritance'! !\\\\n\\\\n!OBInheritanceBrowser class methodsFor: 'configuration' stamp: 'cwp 11/25/2004 22:05'!\\\\ntitleForRoot: aCollectionNode\\\\n\\\\t^ 'Inheritance of ', aCollectionNode children first selector printString! !\\\\nOBVariableNode subclass: #OBInstanceVariableNode\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBInstanceVariableNode commentStamp: 'cwp 1/8/2005 12:50' prior: 0!\\\\nOBClassVariable provides a method for finding methods which refer to an instance, ie, by searching for instance variable access bytecodes rather than for an association in the literal frame.!\\\\n\\\\n\\\\n!OBInstanceVariableNode methodsFor: 'navigating' stamp: 'cwp 12/8/2004 23:48'!\\\\naccessors\\\\n\\\\t| accessors |\\\\n\\\\taccessors := OrderedCollection new.\\\\n\\\\tself theClass withAllSubAndSuperclassesDo: [:class |\\\\n\\\\t\\\\t(class whichSelectorsAccess: name) asSortedCollection\\\\n\\\\t\\\\t\\\\tdo: [:ea | ea = #DoIt ifFalse: [accessors add: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(self referenceForMethod: ea ofClass: class name)]]].\\\\n\\\\t^ accessors asArray\\\\tcollect: [:ref | OBMethodNode on: ref]! !\\\\nNotification subclass: #OBInteractionRequest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Notifications'!\\\\n!OBInteractionRequest commentStamp: 'cwp 12/7/2004 00:13' prior: 0!\\\\nOBInteractionRequest is an abstract superclass for notifications that request some interaction with the user. It's useful for catching such notifications in an exception handler, while allowing other notifications to operate normally.!\\\\n\\\\n\\\\n!OBInteractionRequest methodsFor: 'as yet unclassified' stamp: 'cwp 10/17/2004 19:31'!\\\\nisBrowseRequest\\\\n\\\\t^ false! !\\\\nOBCodeBrowser subclass: #OBListBrowser\\\\n\\\\tinstanceVariableNames: 'labelPrefix'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Browsers'!\\\\n!OBListBrowser commentStamp: 'cwp 1/7/2005 23:53' prior: 0!\\\\nOBListBrowsers are used to display simple lists of methods, such as senders or implementors.!\\\\n\\\\n\\\\n!OBListBrowser methodsFor: 'morphic' stamp: 'avi 11/29/2004 21:58'!\\\\ndefaultBackgroundColor\\\\n\\\\t^ Color lightBlue! !\\\\n\\\\n\\\\n!OBListBrowser methodsFor: 'accessing' stamp: 'cwp 11/25/2004 22:21'!\\\\ndefaultLabel\\\\n\\\\t^ self labelPrefix, ' ', self root name printString! !\\\\n\\\\n!OBListBrowser methodsFor: 'accessing' stamp: 'cwp 11/25/2004 22:18'!\\\\nlabelPrefix\\\\n\\\\t^ labelPrefix ifNil: [labelPrefix _ self root metaNode edges first label capitalized, ' of']! !\\\\n\\\\n!OBListBrowser methodsFor: 'accessing' stamp: 'cwp 10/17/2004 20:54'!\\\\nlabelPrefix: aString\\\\n\\\\tlabelPrefix _ aString! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBListBrowser class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBListBrowser class methodsFor: 'opening' stamp: 'avi 9/17/2005 01:34'!\\\\nbrowseRoot: aNode\\\\n\\\\tself browseRoot: aNode title: self title! !\\\\n\\\\n!OBListBrowser class methodsFor: 'opening' stamp: 'avi 9/17/2005 01:21'!\\\\nbrowseRoot: aNode title: aString \\\\n\\\\t(self metaNode: self defaultMetaNode root: aNode selection: nil)\\\\n\\\\t\\\\tlabelPrefix: aString;\\\\n\\\\t\\\\topen\\\\n\\\\t! !\\\\n\\\\n\\\\n!OBListBrowser class methodsFor: 'configuration' stamp: 'cwp 12/5/2004 17:54'!\\\\nmaxPanes\\\\n\\\\t^ 2! !\\\\n\\\\n!OBListBrowser class methodsFor: 'configuration' stamp: 'cwp 12/5/2004 17:54'!\\\\nminPanes\\\\n\\\\t^ 1! !\\\\nOBMethodNode subclass: #OBMessageNode\\\\n\\\\tinstanceVariableNames: 'message'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBMessageNode commentStamp: 'cwp 1/8/2005 12:40' prior: 0!\\\\nAn OBMessageNode refers to a message send in the source code of a method. They are typically used in the 'senders' browser.!\\\\n\\\\n\\\\n!OBMessageNode methodsFor: 'navigating'!\\\\nimplementors\\\\n\\\\t^ self implementorsOf: message! !\\\\n\\\\n!OBMessageNode methodsFor: 'navigating'!\\\\nsendersOfMessage\\\\n\\\\t^ self sendersOf: message! !\\\\n\\\\n\\\\n!OBMessageNode methodsFor: 'displaying' stamp: 'cwp 12/8/2004 21:26'!\\\\nname\\\\n\\\\t^ message! !\\\\n\\\\n\\\\n!OBMessageNode methodsFor: 'accessing'!\\\\nselection\\\\n\\\\t| methodNode assoc |\\\\n\\\\tmethodNode := Parser new \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tparse: self source\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tclass: self theClass.\\\\n\\\\tassoc := (methodNode encoder rawSourceRanges) \\\\n\\\\t\\\\t\\\\tassociations detect: [:ea | ea key isMessage: message receiver: nil arguments: nil]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifNone: [nil -> (1 to: 0)].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Some messages are generated by the compiler.\\\\\\\"\\\\n\\\\t^ assoc value! !\\\\n\\\\n\\\\n!OBMessageNode methodsFor: 'initializing'!\\\\nsetMessage: aSelector selector: aSelector2 class: aClass\\\\n\\\\tmessage := aSelector.\\\\n\\\\tselector := aSelector2.\\\\n\\\\tself theClass: aClass! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBMessageNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBMessageNode class methodsFor: 'instance creation'!\\\\nfromMethodNode: aMethodNode\\\\n\\\\t^ self new \\\\n\\\\t\\\\tsetMessage: aMethodNode selector\\\\n\\\\t\\\\tselector: aMethodNode selector\\\\n\\\\t\\\\tclass: aMethodNode theClass! !\\\\n\\\\n!OBMessageNode class methodsFor: 'instance creation'!\\\\non: aSelector inMethodNode: aNode\\\\n\\\\t^ self \\\\n\\\\t\\\\ton: aSelector \\\\n\\\\t\\\\tinMethod: aNode selector \\\\n\\\\t\\\\tinClass: aNode theClass! !\\\\n\\\\n!OBMessageNode class methodsFor: 'instance creation' stamp: 'cwp 12/8/2004 23:46'!\\\\non: aSelector inMethodReference: ref\\\\n\\\\t^ self \\\\n\\\\t\\\\ton: aSelector \\\\n\\\\t\\\\tinMethod: ref methodSymbol\\\\n\\\\t\\\\tinClass: ref actualClass! !\\\\n\\\\n!OBMessageNode class methodsFor: 'instance creation'!\\\\non: aSelector inMethod: aSelector2 inClass: classRef\\\\n\\\\t^ self new setMessage: aSelector selector: aSelector2 class: classRef! !\\\\nObject subclass: #OBMetaEdge\\\\n\\\\tinstanceVariableNames: 'label selector metaNode'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Kernel'!\\\\n!OBMetaEdge commentStamp: 'cwp 1/7/2005 23:20' prior: 0!\\\\nAn OBMetaEdge is an edge in the browser's metagraph. It represents a message sent to a node to obtain further nodes. It is refered to by the \\\\\\\"parent\\\\\\\" metanode, and refers to the \\\\\\\"child\\\\\\\" metanode.\\\\n\\\\niVars:\\\\n\\\\nlabel \\\\t\\\\t-  a string describing the metaNode, for filters which allow the user \\\\n\\\\t\\\\t\\\\t   to choose which edges to follow\\\\nselector\\\\t- when a node is selected by the user, this message will be \\\\n\\\\t\\\\t\\\\t  sent to it to obtain its children\\\\nmetaNode \\\\t- a MetaNode corresponding to the nodes answered by the above message\\\\n\\\\t\\\\t!\\\\n\\\\n\\\\n!OBMetaEdge methodsFor: 'accessing' stamp: 'cwp 2/7/2004 22:40'!\\\\nlabel\\\\n\\\\t^ label! !\\\\n\\\\n!OBMetaEdge methodsFor: 'accessing' stamp: 'cwp 2/7/2004 22:40'!\\\\nmetaNode\\\\n\\\\t^ metaNode! !\\\\n\\\\n!OBMetaEdge methodsFor: 'accessing' stamp: 'cwp 3/3/2004 00:12'!\\\\nnodesForParent: aNode\\\\n\\\\t^ (aNode perform: selector) do: [:ea | ea metaNode: metaNode]\\\\n! !\\\\n\\\\n!OBMetaEdge methodsFor: 'accessing' stamp: 'cwp 2/7/2004 22:40'!\\\\nselector\\\\n\\\\t^ selector! !\\\\n\\\\n\\\\n!OBMetaEdge methodsFor: 'initializing' stamp: 'cwp 2/7/2004 22:36'!\\\\nsetLabel: aString selector: aSelector metaNode: aMetaNode\\\\n\\\\tlabel _ aString.\\\\n\\\\tselector _ aSelector.\\\\n\\\\tmetaNode _ aMetaNode! !\\\\n\\\\n\\\\n!OBMetaEdge methodsFor: 'printing' stamp: 'dvf 8/16/2005 10:03'!\\\\nprintOn: aStream\\\\n\\\\taStream nextPutAll: selector printString, '->'. \\\\n\\\\tmetaNode shortPrintOn: aStream.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBMetaEdge class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBMetaEdge class methodsFor: 'as yet unclassified' stamp: 'cwp 2/7/2004 22:35'!\\\\nlabel: aString selector: aSelector metaNode: aMetaNode\\\\n\\\\t^ self new setLabel: aString selector: aSelector metaNode: aMetaNode! !\\\\n\\\\n!OBMetaEdge class methodsFor: 'as yet unclassified' stamp: 'cwp 2/9/2004 22:32'!\\\\nselector: aSelector metaNode: aMetaNode\\\\n\\\\t^ self new setLabel: aSelector asString selector: aSelector metaNode: aMetaNode! !\\\\nObject subclass: #OBMetaNode\\\\n\\\\tinstanceVariableNames: 'name filterClass columnClass edges actors displaySelector'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Kernel'!\\\\n!OBMetaNode commentStamp: 'cwp 1/7/2005 23:23' prior: 0!\\\\nA MetaNode represents a hypothetical node in the browser's domain graph.\\\\n\\\\niVars:\\\\n\\\\nfilterClass\\\\t\\\\t\\\\t- the class used to filter this hypothetical node's children\\\\ncolumnClass\\\\t\\\\t- the class of column used to display this node's children\\\\nedges\\\\t\\\\t\\\\t\\\\t- messages that could be sent to the node to obtain children\\\\nactors\\\\t\\\\t\\\\t\\\\t- providers of functionality for manipulating the node\\\\ndisplaySelector\\\\t\\\\t- the message used to retreive a nodes display name!\\\\n\\\\n\\\\n!OBMetaNode methodsFor: 'accessing' stamp: 'cwp 12/8/2004 21:41'!\\\\ndisplaySelector\\\\n\\\\t^ displaySelector ifNil: [displaySelector _ #name]! !\\\\n\\\\n!OBMetaNode methodsFor: 'accessing' stamp: 'cwp 12/8/2004 21:42'!\\\\ndisplaySelector: aSelector\\\\n\\\\tdisplaySelector _ aSelector! !\\\\n\\\\n!OBMetaNode methodsFor: 'accessing' stamp: 'cwp 3/6/2004 21:54'!\\\\nname\\\\n\\\\t^ name ifNil: ['MetaNode']! !\\\\n\\\\n!OBMetaNode methodsFor: 'accessing' stamp: 'cwp 3/6/2004 21:05'!\\\\nname: aString\\\\n\\\\tname _ aString! !\\\\n\\\\n\\\\n!OBMetaNode methodsFor: 'actors' stamp: 'cwp 9/14/2004 18:59'!\\\\nactionSetsForNode: aNode\\\\n\\\\t^ actors collect: [:actor | actor actionsForNode: aNode]! !\\\\n\\\\n!OBMetaNode methodsFor: 'actors' stamp: 'cwp 9/14/2004 19:01'!\\\\nactionSetsForParent: aNode\\\\n\\\\t^ actors collect: [:actor | actor actionsForParent: aNode]! !\\\\n\\\\n!OBMetaNode methodsFor: 'actors' stamp: 'cwp 9/14/2004 19:00'!\\\\nactionsForNode: aNode\\\\n\\\\t^ (self actionSetsForNode: aNode) gather: [:ea | ea]! !\\\\n\\\\n!OBMetaNode methodsFor: 'actors' stamp: 'cwp 9/14/2004 19:02'!\\\\nactionsForParent: aNode\\\\n\\\\t^ (self actionSetsForParent: aNode) gather: [:ea | ea]! !\\\\n\\\\n!OBMetaNode methodsFor: 'actors' stamp: 'cwp 3/3/2004 22:48'!\\\\naddActor: anActor\\\\n\\\\tactors add: anActor.! !\\\\n\\\\n\\\\n!OBMetaNode methodsFor: 'children' stamp: 'cwp 2/9/2004 20:28'!\\\\nchildAt: aSelector labeled: aString put: aMetaNode\\\\n\\\\tedges add: (OBMetaEdge label: aString selector: aSelector metaNode: aMetaNode)! !\\\\n\\\\n!OBMetaNode methodsFor: 'children' stamp: 'cwp 2/7/2004 22:35'!\\\\nchildAt: aSelector put: aMetaNode\\\\n\\\\tedges add: (OBMetaEdge selector: aSelector metaNode: aMetaNode)! !\\\\n\\\\n!OBMetaNode methodsFor: 'children' stamp: 'cwp 2/7/2004 22:44'!\\\\nchildren\\\\n\\\\t^ edges collect: [:edge | edge metaNode]! !\\\\n\\\\n!OBMetaNode methodsFor: 'children' stamp: 'cwp 2/7/2004 22:38'!\\\\nhasChildren\\\\n\\\\t^ edges isEmpty not! !\\\\n\\\\n\\\\n!OBMetaNode methodsFor: 'columns' stamp: 'avi 3/4/2004 03:11'!\\\\ncolumnClass: aClass\\\\n\\\\tcolumnClass _ aClass! !\\\\n\\\\n!OBMetaNode methodsFor: 'columns' stamp: 'cwp 11/16/2004 22:03'!\\\\ncolumnInPanel: aBrowser node: aNode\\\\n\\\\tcolumnClass ifNil: [columnClass _ OBColumn].\\\\n\\\\t^ columnClass\\\\n\\\\t\\\\tinPanel: aBrowser\\\\n\\\\t\\\\tmetaNode: self\\\\n\\\\t\\\\tnode: aNode! !\\\\n\\\\n\\\\n!OBMetaNode methodsFor: 'filtering' stamp: 'cwp 2/9/2004 21:26'!\\\\nfilter\\\\n\\\\tfilterClass ifNil: [filterClass _ OBFilter].\\\\n\\\\t^ filterClass forMetaNode: self! !\\\\n\\\\n!OBMetaNode methodsFor: 'filtering' stamp: 'cwp 2/9/2004 21:02'!\\\\nfilterClass: aClass\\\\n\\\\tfilterClass _ aClass! !\\\\n\\\\n!OBMetaNode methodsFor: 'filtering' stamp: 'cwp 2/9/2004 21:00'!\\\\nmetaNode\\\\n\\\\t^ self! !\\\\n\\\\n\\\\n!OBMetaNode methodsFor: 'initializing' stamp: 'cwp 12/8/2004 20:06'!\\\\ninitialize\\\\n\\\\tedges _ OrderedCollection new.\\\\n\\\\tactors _ OrderedCollection new.! !\\\\n\\\\n\\\\n!OBMetaNode methodsFor: 'metagraph' stamp: 'cwp 2/9/2004 21:12'!\\\\nedges\\\\n\\\\t^ edges! !\\\\n\\\\n\\\\n!OBMetaNode methodsFor: 'nodes' stamp: 'cwp 3/3/2004 00:22'!\\\\nnodesForParent: aNode\\\\n\\\\t^ edges gather: [:edge | edge nodesForParent: aNode]! !\\\\n\\\\n\\\\n!OBMetaNode methodsFor: 'printing' stamp: 'dvf 8/16/2005 10:01'!\\\\nprintOn: aStream\\\\n\\\\taStream nextPutAll: self name;cr.\\\\n\\\\tedges do: [:e | e printOn: aStream. aStream cr].! !\\\\n\\\\n!OBMetaNode methodsFor: 'printing' stamp: 'dvf 8/16/2005 10:01'!\\\\nshortPrintOn: aStream\\\\n\\\\taStream nextPutAll: self name.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBMetaNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBMetaNode class methodsFor: 'instance creation' stamp: 'cwp 3/6/2004 21:06'!\\\\nnamed: aString\\\\n\\\\t^ self new name: aString! !\\\\n\\\\n!OBMetaNode class methodsFor: 'instance creation' stamp: 'cwp 3/3/2004 23:08'!\\\\nnew\\\\n\\\\t^ self basicNew initialize! !\\\\nOBClassNode subclass: #OBMetaclassNode\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBMetaclassNode commentStamp: 'cwp 1/8/2005 11:29' prior: 0!\\\\nOBMetaclassNode is essentially the same as an OBClassNode, but overrides a few methods to work properly with metaclasses.!\\\\n\\\\n\\\\n!OBMetaclassNode methodsFor: 'actions' stamp: 'cwp 12/15/2004 21:57'!\\\\nbrowse\\\\n\\\\t^ OBSystemBrowser openOnClass: self theNonMetaClass ! !\\\\n\\\\n\\\\n!OBMetaclassNode methodsFor: 'displaying' stamp: 'cwp 12/13/2004 00:56'!\\\\nname \\\\n\\\\t^ self nonMetaName! !\\\\n\\\\n!OBMetaclassNode methodsFor: 'displaying'!\\\\nnonMetaName\\\\n\\\\t^ self theNonMetaClass name! !\\\\n\\\\n\\\\n!OBMetaclassNode methodsFor: 'initializing'!\\\\nsetClass: aClass\\\\n\\\\tsuper setClass: aClass theMetaClass\\\\n\\\\t\\\\t! !\\\\nOBClassAwareNode subclass: #OBMethodCategoryNode\\\\n\\\\tinstanceVariableNames: 'name'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBMethodCategoryNode commentStamp: 'cwp 1/8/2005 12:29' prior: 0!\\\\nOBMethodCategory represents a category within a ClassOrganization. Instead of an organization definition, OBMethodCategory presents a MethodDefinition with the class' default method template.!\\\\n\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'actions' stamp: 'cwp 12/15/2004 23:04'!\\\\nactions\\\\n\\\\t^ {\\\\n\\\\t\\\\tself action: #fileOut withLabel: 'file out'.\\\\n\\\\t\\\\tself browseAction.\\\\n\\\\t\\\\tself browseHierarchyAction.\\\\n\\\\t\\\\tself action: #chaseVars buttonLabel: 'variables' menuLabel: 'chase variables'\\\\n\\\\t}\\\\n! !\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'actions' stamp: 'cwp 12/15/2004 21:50'!\\\\nbrowse\\\\n\\\\tOBSystemBrowser openOnClass: self theClass category: name! !\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'actions'!\\\\nfileOut\\\\n\\\\tself theClass fileOutCategory: name! !\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'actions' stamp: 'cwp 9/19/2004 00:11'!\\\\nremove\\\\n\\\\tself theClass removeCategory: name.\\\\n\\\\tself signalDeletion! !\\\\n\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'ancestry'!\\\\nancestrySelector\\\\n\\\\t^ #isDescendantOfMethodCat:! !\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'ancestry'!\\\\nisDescendantOfMethodCat: other\\\\n\\\\t^ (other theClassName = self theClassName) and: [other name = name]! !\\\\n\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'accessing'!\\\\ncategory\\\\n\\\\t^ name! !\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'accessing'!\\\\ncontainer\\\\n\\\\t^ self theClass! !\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'accessing' stamp: 'cwp 9/14/2005 09:06'!\\\\nmethodReferences\\\\n\\\\t^ (self theClass organization listAtCategoryNamed: name)\\\\n\\\\t\\\\tcollect: [:ea | MethodReference new\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsetClassSymbol: self theNonMetaClassName\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tclassIsMeta: self theClass isMeta\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmethodSymbol: ea\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstringVersion: '']\\\\n! !\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'accessing' stamp: 'dvf 8/16/2005 17:47'!\\\\nprintOn: aStream\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream nextPut: $<.\\\\n\\\\tself name printOn: aStream.\\\\n\\\\taStream nextPut: $>.! !\\\\n\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'public'!\\\\ndefinition\\\\n\\\\t^ OBMethodDefinition inCategory: self category inClass: self theClass! !\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'public'!\\\\nname\\\\n\\\\t^ name! !\\\\n\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'drag and drop' stamp: 'lr 4/6/2006 11:46'!\\\\ndropOnClass: aNode\\\\n\\\\tself methods do: [ :each | each dropOnClass: aNode ].\\\\n\\\\taNode signalChildrenChanged.\\\\n\\\\t^ true! !\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'drag and drop'!\\\\ndropSelector\\\\n\\\\t^ #dropOnMethodCategory:! !\\\\n\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'comparing' stamp: 'cwp 12/20/2004 00:53'!\\\\nhash\\\\n\\\\t^ self name hash! !\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'comparing' stamp: 'cwp 12/20/2004 00:50'!\\\\n= other\\\\n\\\\tself species = other species ifFalse: [^ false].\\\\t\\\\n\\\\tself theClass = other theClass ifFalse: [^ false].\\\\n\\\\t^ self name = other name! !\\\\n\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'navigating' stamp: 'dvf 8/19/2005 17:16'!\\\\nmethods\\\\n\\\\t^ self methodReferences collect: [:ref | ref asNode]! !\\\\n\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'initializing'!\\\\nsetName: aString class: aClass\\\\n\\\\tname := aString.\\\\n\\\\tself theClass: aClass! !\\\\n\\\\n\\\\n!OBMethodCategoryNode methodsFor: 'testing' stamp: 'cwp 6/30/2006 00:48'!\\\\nhasOrganization\\\\n\\\\t^ true! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBMethodCategoryNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBMethodCategoryNode class methodsFor: 'actions' stamp: 'cwp 9/18/2004 22:58'!\\\\nactionsForParent: aNode\\\\n\\\\t^ #()! !\\\\n\\\\n\\\\n!OBMethodCategoryNode class methodsFor: 'instance creation'!\\\\non: aString inClass: aClassReference\\\\n\\\\t^ self new setName: aString class: aClassReference! !\\\\nOBDefinition subclass: #OBMethodDefinition\\\\n\\\\tinstanceVariableNames: 'theClass category source selection callback'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Definitions'!\\\\n!OBMethodDefinition commentStamp: 'cwp 1/8/2005 13:20' prior: 0!\\\\nOBMethodDefinition knows how to present method source in the browser's text pane and compile a new CompiledMethod when the source changes. It implements several safety checks to ensure that methods are not accidentally overwritten.!\\\\n\\\\n\\\\n!OBMethodDefinition methodsFor: 'callbacks' stamp: 'cwp 9/18/2005 14:53'!\\\\naccept: aText notifying: aController\\\\n\\\\t| newSelector |\\\\n\\\\tnewSelector := self compileMethod: aText notifying: aController.\\\\n\\\\tnewSelector ifNil: [^ false].\\\\n\\\\t(self nodeFor: newSelector) demandSelection.\\\\n\\\\t^ true! !\\\\n\\\\n!OBMethodDefinition methodsFor: 'callbacks' stamp: 'cwp 10/17/2004 23:16'!\\\\nredefineSource: aText selector: newSelector\\\\n\\\\tnewSelector = self selector \\\\n\\\\t\\\\tifTrue: [source := aText]\\\\n\\\\t\\\\tifFalse: [(self methodNodeFor: newSelector) signalSelection].\\\\n! !\\\\n\\\\n!OBMethodDefinition methodsFor: 'callbacks'!\\\\nselectedClass\\\\n\\\\t^ self theClass! !\\\\n\\\\n!OBMethodDefinition methodsFor: 'callbacks'!\\\\nselection\\\\n\\\\t^ selection ifNil: [1 to: (source ifNil: [self text size] ifNotNil: [0])]! !\\\\n\\\\n!OBMethodDefinition methodsFor: 'callbacks' stamp: 'cwp 11/29/2004 21:21'!\\\\ntext\\\\n\\\\t^ source \\\\n\\\\t\\\\tifNotNil: [source asText makeSelectorBold]\\\\n\\\\t\\\\tifNil: [self theClass sourceCodeTemplate]! !\\\\n\\\\n\\\\n!OBMethodDefinition methodsFor: 'accessing' stamp: 'cwp 10/17/2004 23:36'!\\\\ncallback: aBlockContext \\\\n\\\\tcallback _ aBlockContext! !\\\\n\\\\n!OBMethodDefinition methodsFor: 'accessing'!\\\\ncategory\\\\n\\\\t^ category ifNil: [category := self theClass whichCategoryIncludesSelector: self selector]! !\\\\n\\\\n!OBMethodDefinition methodsFor: 'accessing'!\\\\nselector\\\\n\\\\t^ source ifNotNil: [Parser new parseSelector: source]! !\\\\n\\\\n!OBMethodDefinition methodsFor: 'accessing'!\\\\ntheClass\\\\n\\\\t^ theClass! !\\\\n\\\\n\\\\n!OBMethodDefinition methodsFor: 'compiling'!\\\\ncompileMethod: aText notifying: aController\\\\n\\\\t^ (self confirmMethod: aText)\\\\n\\\\t\\\\tifTrue: [self theClass \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcompile: aText \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tclassified: self category \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnotifying: aController]\\\\n\\\\t\\\\tifFalse: [nil]! !\\\\n\\\\n!OBMethodDefinition methodsFor: 'compiling' stamp: 'cwp 10/17/2004 23:33'!\\\\nnodeFor: aSelector\\\\n\\\\t^ callback value: aSelector! !\\\\n\\\\n\\\\n!OBMethodDefinition methodsFor: 'confirming' stamp: 'cwp 10/17/2004 22:42'!\\\\nconfirmMethod: aText\\\\n\\\\t| sel |\\\\n\\\\tsel _ Parser new parseSelector: aText.\\\\n\\\\t^ (self theClass isMeta \\\\n\\\\t\\\\t\\\\tand: [(self selectorAlreadyDefined: sel) not] \\\\n\\\\t\\\\t\\\\tand: [Metaclass isScarySelector: sel])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self confirmScarySelector: sel]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [^ true]! !\\\\n\\\\n!OBMethodDefinition methodsFor: 'confirming'!\\\\nconfirmScarySelector: aSelector\\\\n\\\\t| prompt |\\\\n\\\\tprompt := aSelector, ' is used in the existing class system.\\\\nOverriding it could cause serious problems.\\\\nIs this really what you want to do?'.\\\\n\\\\n\\\\t^ OBConfirmationRequest\\\\n\\\\t\\\\tprompt: prompt\\\\n\\\\t\\\\tconfirm: 'Override'! !\\\\n\\\\n!OBMethodDefinition methodsFor: 'confirming'!\\\\nselectorAlreadyDefined: aSelector\\\\n\\\\t^ self theClass selectors includes: aSelector! !\\\\n\\\\n\\\\n!OBMethodDefinition methodsFor: 'initializing' stamp: 'cwp 10/17/2004 23:33'!\\\\nsetClass: aClass category: aString source: aText selection: anInterval\\\\n\\\\ttheClass := aClass.\\\\n\\\\tcategory := aString.\\\\n\\\\tsource := aText.\\\\n\\\\tselection := anInterval.\\\\n\\\\tcallback := [:sel | OBMethodNode on: sel inClass: theClass]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBMethodDefinition class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBMethodDefinition class methodsFor: 'instance creation' stamp: 'cwp 10/17/2004 23:07'!\\\\ninCategory: aString inClass: aClass\\\\n\\\\t^ self \\\\n\\\\t\\\\tselection: nil\\\\n\\\\t\\\\tsource: nil\\\\n\\\\t\\\\tinCategory: aString\\\\n\\\\t\\\\tinClass: aClass! !\\\\n\\\\n!OBMethodDefinition class methodsFor: 'instance creation' stamp: 'cwp 10/17/2004 23:07'!\\\\nselection: anInterval source: aText inCategory: aCategory inClass: aClass\\\\n\\\\t^ self new\\\\n\\\\t\\\\tsetClass: aClass\\\\n\\\\t\\\\tcategory: aCategory\\\\n\\\\t\\\\tsource: aText\\\\n\\\\t\\\\tselection: anInterval! !\\\\n\\\\n!OBMethodDefinition class methodsFor: 'instance creation' stamp: 'cwp 10/17/2004 23:07'!\\\\nselection: anInterval source: aText inClass: aClass\\\\n\\\\t^ self \\\\n\\\\t\\\\tselection: anInterval\\\\n\\\\t\\\\tsource: aText\\\\n\\\\t\\\\tinCategory: nil\\\\n\\\\t\\\\tinClass: aClass\\\\t! !\\\\n\\\\n!OBMethodDefinition class methodsFor: 'instance creation' stamp: 'cwp 10/17/2004 23:03'!\\\\nsource: aText inClass: aClass\\\\n\\\\t^ self \\\\n\\\\t\\\\tselection: nil\\\\n\\\\t\\\\tsource: aText\\\\n\\\\t\\\\tinCategory: nil\\\\n\\\\t\\\\tinClass: aClass! !\\\\nOBClassAwareNode subclass: #OBMethodNode\\\\n\\\\tinstanceVariableNames: 'selector'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBMethodNode commentStamp: 'cwp 1/8/2005 12:37' prior: 0!\\\\nOBMethodNode wraps a method in a particular class. It supplies an OBMethodDefinition for displaying and editing the source code of the method, and various actions for manipulating the method. It has two roles: first it appears in the right most pane of a standard system browser. Second, it often serves as the root node for an OBListBrowser, and has navigation methods for senders, implementors etc.\\\\n\\\\nOBMethodNode also serves as the superclass for nodes that represent *parts* of a method, such as sends of a particular message, references to a class, accesses to a instance variable, etc.!\\\\n\\\\n\\\\n!OBMethodNode methodsFor: 'actions' stamp: 'cwp 7/12/2006 15:36'!\\\\nactions\\\\n\\\\t^{ \\\\n\\\\t\\\\tself action: #fileOut withLabel: 'file out'.\\\\n\\\\t\\\\tself browseAction.\\\\n\\\\t\\\\tself browseHierarchyAction.\\\\n\\\\t\\\\tself \\\\n\\\\t\\\\t\\\\taction: #browseSenders\\\\n\\\\t\\\\t\\\\twithMenuLabel: 'senders'\\\\n\\\\t\\\\t\\\\twithButtonLabel: 'senders'\\\\n\\\\t\\\\t\\\\twithKeystroke: $n\\\\n\\\\t\\\\t\\\\twithIcon: (MenuIcons tryIcons: #(findIcon smallFindIcon)).\\\\n\\\\t\\\\tself \\\\n\\\\t\\\\t\\\\taction: #browseImplementors\\\\n\\\\t\\\\t\\\\twithMenuLabel: 'implementors'\\\\n\\\\t\\\\t\\\\twithButtonLabel: 'implementors'\\\\n\\\\t\\\\t\\\\twithKeystroke: $m\\\\n\\\\t\\\\t\\\\twithIcon: (MenuIcons tryIcons: #(findIcon smallFindIcon)).\\\\n\\\\t\\\\tself \\\\n\\\\t\\\\t\\\\taction: #browseVersions\\\\n\\\\t\\\\t\\\\tbuttonLabel: 'versions'\\\\n\\\\t\\\\t\\\\tmenuLabel: 'versions'.\\\\n\\\\t\\\\tself \\\\n\\\\t\\\\t\\\\taction: #browseInheritance\\\\n\\\\t\\\\t\\\\tbuttonLabel: 'inheritance'\\\\n\\\\t\\\\t\\\\tmenuLabel: 'inheritance'.\\\\n\\\\t\\\\tself \\\\n\\\\t\\\\t\\\\taction: #chaseVars\\\\n\\\\t\\\\t\\\\tbuttonLabel: 'variables'\\\\n\\\\t\\\\t\\\\tmenuLabel: 'chase variables'.\\\\n\\\\t\\\\tself \\\\n\\\\t\\\\t\\\\taction: #remove\\\\n\\\\t\\\\t\\\\twithLabel: 'remove'\\\\n\\\\t\\\\t\\\\twithKeystroke: $x\\\\n\\\\t\\\\t\\\\twithIcon: (MenuIcons tryIcons: #(deleteIcon smallDeleteIcon)).\\\\n\\\\t\\\\tself moveToPackageAction\\\\n\\\\t}\\\\n! !\\\\n\\\\n!OBMethodNode methodsFor: 'actions' stamp: 'cwp 12/5/2004 18:35'!\\\\nbrowse\\\\n\\\\tOBSystemBrowser openOnClass: self theClass selector: selector! !\\\\n\\\\n!OBMethodNode methodsFor: 'actions' stamp: 'avi 9/17/2005 01:29'!\\\\nbrowseClass: aClass\\\\n\\\\taClass browseRoot: self copy! !\\\\n\\\\n!OBMethodNode methodsFor: 'actions' stamp: 'avi 9/17/2005 01:28'!\\\\nbrowseImplementors\\\\n\\\\tself browseClass: OBImplementorsBrowser! !\\\\n\\\\n!OBMethodNode methodsFor: 'actions' stamp: 'cwp 12/5/2004 18:03'!\\\\nbrowseInheritance\\\\n\\\\tOBInheritanceBrowser openRoot: self inheritanceRoot selection: self! !\\\\n\\\\n!OBMethodNode methodsFor: 'actions' stamp: 'avi 9/17/2005 01:28'!\\\\nbrowseSenders\\\\n\\\\tself browseClass: OBSendersBrowser! !\\\\n\\\\n!OBMethodNode methodsFor: 'actions' stamp: 'cwp 12/5/2004 15:42'!\\\\nbrowseVersions\\\\n\\\\tOBVersionBrowser openOn: self copy! !\\\\n\\\\n!OBMethodNode methodsFor: 'actions'!\\\\nfileOut\\\\n\\\\tself theClass fileOutMethod: selector! !\\\\n\\\\n!OBMethodNode methodsFor: 'actions' stamp: 'cwp 7/11/2006 02:43'!\\\\nmoveToPackage\\\\n\\\\t| packagesNames selection packages |\\\\n\\\\tpackages := PackageOrganizer default packages \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tasSortedCollection: [:a :b | a packageName <= b packageName].\\\\n\\\\tpackagesNames := packages collect: [:ea | ea packageName].\\\\n\\\\tselection := OBChoiceRequest prompt: nil labels: packagesNames values: packages.\\\\n\\\\tselection ifNotNil: [selection addMethod: self reference].! !\\\\n\\\\n!OBMethodNode methodsFor: 'actions' stamp: 'cwp 7/12/2006 15:37'!\\\\nmoveToPackageAction\\\\n\\\\t^ self \\\\n\\\\t\\\\taction: #moveToPackage\\\\n\\\\t\\\\twithMenuLabel: 'move to package...'\\\\n\\\\t\\\\twithButtonLabel: 'move method'\\\\n\\\\t\\\\twithKeystroke: $p\\\\n\\\\t\\\\twithIcon: (MenuIcons tryIcons: #(windowIcon smallWindowIcon)).\\\\n! !\\\\n\\\\n!OBMethodNode methodsFor: 'actions' stamp: 'cwp 10/18/2004 00:30'!\\\\nremove\\\\n\\\\t| senders choice |\\\\n\\\\tsenders _ SystemNavigation default allCallsOn: self selector.\\\\n\\\\tsenders isEmpty ifTrue: [^ self doRemove].\\\\n\\\\tchoice _ OBChoiceRequest\\\\n\\\\t\\\\t\\\\t\\\\tprompt: 'This message has ', senders size asString, ' senders.'\\\\n\\\\t\\\\t\\\\t\\\\tlabels: #('Remove it' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Remove, then browse senders' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Don''t remove, but show me those senders' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Forget it -- do nothing -- sorry I asked')\\\\n\\\\t\\\\t\\\\t\\\\tvalues: #(doRemove removeAndBrowse simpleBrowseSenders nil).\\\\n\\\\tchoice ifNotNil: [^ self perform: choice]\\\\n! !\\\\n\\\\n!OBMethodNode methodsFor: 'actions'!\\\\nselectMessage\\\\n\\\\t| messages sel |\\\\n\\\\tmessages := self messageSelectors copyWithFirst: selector.\\\\n\\\\tsel := (OBChoiceRequest labels: messages).\\\\n\\\\t^ sel ifNotNil: [OBMessageNode on: sel inMethodNode: self]! !\\\\n\\\\n!OBMethodNode methodsFor: 'actions' stamp: 'cwp 12/1/2004 00:36'!\\\\nsource\\\\n\\\\t^ (self theClass sourceCodeAt: self selector ifAbsent: [^ '']) \\\\n\\\\t\\\\tasText makeSelectorBold! !\\\\n\\\\n\\\\n!OBMethodNode methodsFor: 'private'!\\\\naddOverridersOf: aSelector inClass: aClass to: aCollection\\\\n\\\\taClass subclasses do: \\\\n\\\\t\\\\t[:ea | (ea includesSelector: aSelector)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [aCollection add: ea]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [self addOverridersOf: aSelector inClass: ea to: aCollection]]! !\\\\n\\\\n!OBMethodNode methodsFor: 'private' stamp: 'cwp 10/18/2004 00:29'!\\\\ndoRemove\\\\n\\\\tself theClass removeSelector: self selector.\\\\n\\\\tself signalDeletion! !\\\\n\\\\n!OBMethodNode methodsFor: 'private' stamp: 'cwp 12/8/2004 23:48'!\\\\nimplementorsOf: aSelector\\\\n\\\\t^ (SystemNavigation default allImplementorsOf: aSelector) asSortedArray\\\\n\\\\t\\\\t\\\\tcollect: [:ref | OBMethodNode on: ref]! !\\\\n\\\\n!OBMethodNode methodsFor: 'private' stamp: 'cwp 12/8/2004 23:49'!\\\\ninheritanceRoot\\\\n\\\\t| rootClass |\\\\n\\\\trootClass := (self theClass withAllSuperclasses asArray\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tselect: [:ea | ea includesSelector: self selector]) last.\\\\n\\\\t^ OBCollectionNode on: {OBMethodNode \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ton: self selector \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinClass: rootClass}! !\\\\n\\\\n!OBMethodNode methodsFor: 'private'!\\\\nmessageSelectors\\\\n\\\\t^ ((self theClass compiledMethodAt: self selector ifAbsent: [^ #()]) messages) asSortedArray! !\\\\n\\\\n!OBMethodNode methodsFor: 'private'!\\\\nremoveAndBrowse\\\\n\\\\tself simpleBrowseSenders.\\\\n\\\\tself theClass removeSelector: self selector.\\\\n\\\\tself signalDeletion! !\\\\n\\\\n!OBMethodNode methodsFor: 'private'!\\\\nsendersOf: aSelector\\\\n\\\\t^ (SystemNavigation default allCallsOn: aSelector) asSortedArray\\\\n\\\\t\\\\t\\\\tcollect: [:ref | OBMessageNode on: aSelector inMethodReference: ref]! !\\\\n\\\\n!OBMethodNode methodsFor: 'private' stamp: 'avi 9/17/2005 01:29'!\\\\nsimpleBrowseSenders\\\\n\\\\tOBSendersBrowser browseRoot: self! !\\\\n\\\\n!OBMethodNode methodsFor: 'private'!\\\\nsourcePointer\\\\n\\\\t^ (self theClass compiledMethodAt: self selector) sourcePointer! !\\\\n\\\\n\\\\n!OBMethodNode methodsFor: 'ancestry'!\\\\nancestrySelector\\\\n\\\\t^ #isDescendantOfMethod: ! !\\\\n\\\\n!OBMethodNode methodsFor: 'ancestry' stamp: 'cwp 12/2/2004 23:28'!\\\\nisDescendantOfMethodCat: aMethodCatNode\\\\n\\\\t^ (self theClass organization categoryOfElement: self selector) = aMethodCatNode name! !\\\\n\\\\n!OBMethodNode methodsFor: 'ancestry' stamp: 'cwp 10/17/2004 23:55'!\\\\nisDescendantOfMethodVersion: anOBMethodVersionNode \\\\n\\\\t^ false! !\\\\n\\\\n!OBMethodNode methodsFor: 'ancestry' stamp: 'cwp 11/28/2004 10:37'!\\\\nisDescendantOfMethod: other\\\\n\\\\t^ other selector = selector\\\\n\\\\t\\\\tand: [self theClass withAllSuperclasses includes: other theClass].\\\\n\\\\t! !\\\\n\\\\n\\\\n!OBMethodNode methodsFor: 'accessing' stamp: 'cwp 12/1/2004 00:36'!\\\\ndefinition\\\\n\\\\t^ OBMethodDefinition\\\\n\\\\t\\\\tselection: self selection\\\\n\\\\t\\\\tsource: self source\\\\n\\\\t\\\\tinClass: self theClass! !\\\\n\\\\n!OBMethodNode methodsFor: 'accessing'!\\\\nreference\\\\n\\\\t^ self referenceForMethod: selector ofClass: self theClassName! !\\\\n\\\\n!OBMethodNode methodsFor: 'accessing' stamp: 'cwp 12/1/2004 00:37'!\\\\nselection\\\\n\\\\t^ 1 to: 0! !\\\\n\\\\n!OBMethodNode methodsFor: 'accessing'!\\\\nselector\\\\n\\\\t^ selector! !\\\\n\\\\n!OBMethodNode methodsFor: 'accessing'!\\\\nsourceFiles\\\\n\\\\t^ OBSourceFilesRequest signal! !\\\\n\\\\n\\\\n!OBMethodNode methodsFor: 'drag and drop' stamp: 'lr 4/18/2006 08:55'!\\\\ndropOnClass: aNode\\\\n\\\\taNode theClass \\\\n\\\\t\\\\tcompile: self source\\\\n\\\\t\\\\tclassified: (self theClass organization \\\\n\\\\t\\\\t\\\\tcategoryOfElement: self selector).\\\\n\\\\tInputSensor default shiftPressed\\\\n\\\\t\\\\tifFalse: [ self theClass removeSelector: self selector ].\\\\n\\\\taNode signalChildrenChanged.\\\\n\\\\t^ true! !\\\\n\\\\n!OBMethodNode methodsFor: 'drag and drop' stamp: 'cwp 9/18/2005 19:01'!\\\\ndropOnMethodCategory: aNode\\\\n\\\\n\\\\t\\\\\\\"We don't support dropping on another class yet.\\\\\\\"\\\\n\\\\taNode theClass = self theClass ifFalse: [^ false].\\\\n\\\\t\\\\n\\\\tself theClass organization classify: self selector under: aNode name.\\\\n\\\\taNode signalChildrenChanged.\\\\n\\\\t\\\\n\\\\t^ true! !\\\\n\\\\n\\\\n!OBMethodNode methodsFor: 'displaying' stamp: 'lr 3/29/2006 12:08'!\\\\ndisplayString\\\\n\\\\t^ (self theClass respondsTo: #includesLocalSelector:) \\\\n\\\\t\\\\tifFalse: [ super displayString ]\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t(self theClass includesLocalSelector: selector)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [ super displayString  ]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsuper displayString asText \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taddAttribute: TextEmphasis italic ] ]! !\\\\n\\\\n!OBMethodNode methodsFor: 'displaying' stamp: 'cwp 12/8/2004 21:08'!\\\\nfullName\\\\n\\\\t^ self theClassName, '>>', selector! !\\\\n\\\\n!OBMethodNode methodsFor: 'displaying' stamp: 'cwp 12/20/2004 23:13'!\\\\nindentedFullName\\\\n\\\\t^ self indent, self fullName! !\\\\n\\\\n!OBMethodNode methodsFor: 'displaying' stamp: 'cwp 12/8/2004 21:08'!\\\\nname\\\\n\\\\t^ selector! !\\\\n\\\\n\\\\n!OBMethodNode methodsFor: 'comparing' stamp: 'cwp 12/8/2004 22:07'!\\\\nhash\\\\n\\\\t^ theClass hash bitXor: selector hash! !\\\\n\\\\n!OBMethodNode methodsFor: 'comparing' stamp: 'cwp 12/8/2004 22:07'!\\\\n= other\\\\n\\\\t^ (self species = other species)\\\\n\\\\t\\\\tand: [self theClass = other theClass] \\\\n\\\\t\\\\tand: [self selector = other selector]! !\\\\n\\\\n\\\\n!OBMethodNode methodsFor: 'navigating' stamp: 'cwp 1/2/2005 23:12'!\\\\nimplementors\\\\n\\\\t^ self implementorsOf: selector! !\\\\n\\\\n!OBMethodNode methodsFor: 'navigating' stamp: 'cwp 1/7/2005 22:35'!\\\\nimplementorsHierarchically\\\\n\\\\t^ OBClassAwareNode sortHierarchically: self implementors! !\\\\n\\\\n!OBMethodNode methodsFor: 'navigating'!\\\\nmessages\\\\n\\\\t^ (((self theClass\\\\n\\\\t\\\\t\\\\t\\\\tcompiledMethodAt: self selector \\\\n\\\\t\\\\t\\\\t\\\\tifAbsent: [^ #()]) messages) asSortedArray)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcollect: [:sel | OBMessageNode \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ton: sel \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinMethod: selector \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinClass: self theClass]! !\\\\n\\\\n!OBMethodNode methodsFor: 'navigating' stamp: 'cwp 12/8/2004 23:49'!\\\\noverrides\\\\n\\\\t| classes |\\\\n\\\\tclasses := OrderedCollection new.\\\\n\\\\tself addOverridersOf: self selector inClass: self theClass to: classes.\\\\n\\\\t^ classes collect: [:ea | OBMethodNode on: selector inClass: ea] ! !\\\\n\\\\n!OBMethodNode methodsFor: 'navigating'!\\\\nselectorAndMessages\\\\n\\\\t^ self messages copyWithFirst: self messageNode! !\\\\n\\\\n!OBMethodNode methodsFor: 'navigating'!\\\\nsenders\\\\n\\\\t^ self sendersOf: selector! !\\\\n\\\\n!OBMethodNode methodsFor: 'navigating'!\\\\nversions\\\\n\\\\t^ (OBMethodVersion scan: self sourceFiles from: self sourcePointer)\\\\n\\\\t\\\\tcollect: [:ea | OBMethodVersionNode on: ea]! !\\\\n\\\\n\\\\n!OBMethodNode methodsFor: 'nodes'!\\\\nmessageNode\\\\n\\\\t^ OBMessageNode fromMethodNode: self! !\\\\n\\\\n\\\\n!OBMethodNode methodsFor: 'printing' stamp: 'cwp 12/8/2004 21:59'!\\\\nprintOn: aStream\\\\n\\\\taStream\\\\n\\\\t\\\\tnextPutAll: self class name;\\\\n\\\\t\\\\tnextPut: $<;\\\\n\\\\t\\\\tnextPutAll: self theClass name;\\\\n\\\\t\\\\tnextPut: $#;\\\\n\\\\t\\\\tnextPutAll: self selector;\\\\n\\\\t\\\\tnextPut: $>! !\\\\n\\\\n\\\\n!OBMethodNode methodsFor: 'initializing'!\\\\nsetReference: aMethodReference\\\\n\\\\tself \\\\n\\\\t\\\\tsetSelector: aMethodReference methodSymbol\\\\n\\\\t\\\\tclass: (aMethodReference actualClass)! !\\\\n\\\\n!OBMethodNode methodsFor: 'initializing'!\\\\nsetSelector: aSelector class: aClass\\\\n\\\\tselector := aSelector.\\\\n\\\\tself theClass: aClass\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBMethodNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBMethodNode class methodsFor: 'instance creation'!\\\\non: aMethodReference\\\\n\\\\t^ self new setReference: aMethodReference! !\\\\n\\\\n!OBMethodNode class methodsFor: 'instance creation'!\\\\non: aSelector inClass: aClassReference\\\\n\\\\t^ self new setSelector: aSelector class: aClassReference! !\\\\nObject subclass: #OBMethodVersion\\\\n\\\\tinstanceVariableNames: 'sources pointer classRef className category stamp prior selector'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Utilities'!\\\\n!OBMethodVersion commentStamp: 'cwp 1/8/2005 13:25' prior: 0!\\\\nOBMethodVerison represents a version of a method found in the .sources or .changes files. It provides methods for parsing the method definition referenced by a source pointer, and for filing in the source to replace the current version of the method.!\\\\n\\\\n\\\\n!OBMethodVersion methodsFor: 'accessing'!\\\\ncategory\\\\n\\\\t^ category! !\\\\n\\\\n!OBMethodVersion methodsFor: 'accessing'!\\\\nclassSymbol\\\\n\\\\t^ classRef name! !\\\\n\\\\n!OBMethodVersion methodsFor: 'accessing' stamp: 'cwp 10/17/2004 23:51'!\\\\nlatest\\\\n\\\\t^ self class \\\\n\\\\t\\\\t\\\\tfromSources: sources \\\\n\\\\t\\\\t\\\\tandPointer: (classRef theClass compiledMethodAt: selector) sourcePointer! !\\\\n\\\\n!OBMethodVersion methodsFor: 'accessing' stamp: 'cwp 10/17/2004 23:42'!\\\\npointer\\\\n\\\\t^ pointer! !\\\\n\\\\n!OBMethodVersion methodsFor: 'accessing'!\\\\nselector\\\\n\\\\t^ selector ifNil: [self setSelector]! !\\\\n\\\\n!OBMethodVersion methodsFor: 'accessing'!\\\\nsource\\\\n\\\\t| file |\\\\n\\\\tfile := sources at: (sources fileIndexFromSourcePointer: pointer).\\\\n\\\\tfile position: (sources filePositionFromSourcePointer: pointer).\\\\n\\\\t^ file nextChunk asText makeSelectorBold! !\\\\n\\\\n!OBMethodVersion methodsFor: 'accessing'!\\\\nstamp\\\\n\\\\t^ stamp! !\\\\n\\\\n!OBMethodVersion methodsFor: 'accessing'!\\\\ntheClass\\\\n\\\\t^ classRef theClass! !\\\\n\\\\n!OBMethodVersion methodsFor: 'accessing'!\\\\ntheClassName\\\\n\\\\t^ classRef name! !\\\\n\\\\n\\\\n!OBMethodVersion methodsFor: 'compiling'!\\\\nfileIn\\\\n\\\\t(self theClass) ifNotNilDo: [:class | class\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t \\\\t\\\\t\\\\t\\\\tcompile: self source \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tclassified: self category \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twithStamp: self stamp \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnotifying: nil]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t! !\\\\n\\\\n\\\\n!OBMethodVersion methodsFor: 'comparing' stamp: 'cwp 10/17/2004 23:45'!\\\\nhash\\\\n\\\\t^ pointer hash! !\\\\n\\\\n!OBMethodVersion methodsFor: 'comparing' stamp: 'cwp 10/17/2004 23:45'!\\\\n= other\\\\n\\\\t^ self species = other species and: [self pointer = other pointer]! !\\\\n\\\\n\\\\n!OBMethodVersion methodsFor: 'initializing' stamp: 'cwp 11/6/2004 23:14'!\\\\nparseChunk: aString\\\\n\\\\t| tokens |\\\\n\\\\ttokens := Scanner new scanTokens: aString.\\\\n\\\\tclassRef := OBClassReference named: tokens first.\\\\n\\\\ttokens second = #class\\\\n\\\\t\\\\tifTrue: [classRef beMeta.\\\\n\\\\t\\\\t\\\\t\\\\tcategory := tokens fourth.\\\\n\\\\t\\\\t\\\\t\\\\tstamp := tokens sixth]\\\\n\\\\t\\\\tifFalse: [category := tokens third.\\\\n\\\\t\\\\t\\\\t\\\\ttokens size > 3 ifTrue: [stamp := tokens fifth]].\\\\n\\\\ttokens size > 6 ifTrue: [prior := tokens last].! !\\\\n\\\\n!OBMethodVersion methodsFor: 'initializing'!\\\\nparseSource\\\\n\\\\t| file position chunk |\\\\n\\\\tfile := sources at: (sources fileIndexFromSourcePointer: pointer).\\\\n\\\\tposition := sources filePositionFromSourcePointer: pointer.\\\\n\\\\tposition > file size ifTrue: [self error: 'Invalid source pointer'].\\\\n\\\\t\\\\n\\\\tfile position: (0 max: position-150).  \\\\t\\\\\\\"Skip back to before the preamble\\\\\\\"\\\\n\\\\t\\\\t[file position < (position-1)]  \\\\t\\\\\\\"then pick it up from the front\\\\\\\"\\\\n\\\\t\\\\t\\\\twhileTrue: [chunk := file nextChunk].\\\\n\\\\t\\\\n\\\\tself parseChunk: chunk.! !\\\\n\\\\n!OBMethodVersion methodsFor: 'initializing'!\\\\nprevious\\\\n\\\\t^ prior ifNotNil: [self class fromSources: sources andPointer: prior]! !\\\\n\\\\n!OBMethodVersion methodsFor: 'initializing'!\\\\nsetSelector\\\\n\\\\t| file |\\\\n\\\\tfile := sources at: (sources fileIndexFromSourcePointer: pointer).\\\\n\\\\tfile position: (sources filePositionFromSourcePointer: pointer).\\\\n\\\\t^ selector := Parser new parseSelector: file nextChunk.! !\\\\n\\\\n!OBMethodVersion methodsFor: 'initializing'!\\\\nsetSources: aSourceFileArray pointer: aSourcePointer\\\\n\\\\tsources := aSourceFileArray.\\\\n\\\\tpointer := aSourcePointer.\\\\n\\\\tself parseSource.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBMethodVersion class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBMethodVersion class methodsFor: 'instance creation'!\\\\nfromSources: sources andPointer: pointer\\\\n\\\\t^ self new setSources: sources pointer: pointer! !\\\\n\\\\n\\\\n!OBMethodVersion class methodsFor: 'scanning'!\\\\nscan: sources from: pointer \\\\n\\\\t| versions current |\\\\n\\\\t\\\\n\\\\tversions := OrderedCollection new.\\\\n\\\\tcurrent := OBMethodVersion fromSources: sources andPointer: pointer.\\\\n\\\\t[current notNil]\\\\n\\\\t\\\\twhileTrue: [versions add: current.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcurrent := current previous].\\\\n\\\\t^ versions! !\\\\n\\\\n!OBMethodVersion class methodsFor: 'scanning'!\\\\nversionsOfMethod: methodReference \\\\n\\\\t| class selector |\\\\n\\\\tclass := methodReference actualClass.\\\\n\\\\tselector := methodReference methodSymbol.\\\\n\\\\t^ self scan: SourceFiles from: (class compiledMethodAt: selector) sourcePointer! !\\\\nOBClassAwareNode subclass: #OBMethodVersionNode\\\\n\\\\tinstanceVariableNames: 'version'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBMethodVersionNode commentStamp: 'cwp 1/8/2005 12:41' prior: 0!\\\\nOBMethodVersions refer to OBMethodVersions, and are used by the VersionBrowser.!\\\\n\\\\n\\\\n!OBMethodVersionNode methodsFor: 'actions' stamp: 'cwp 12/15/2004 22:38'!\\\\nactions\\\\n\\\\t^ {\\\\n\\\\t\\\\tself browseAction.\\\\n\\\\t  \\\\tself action: #revert buttonLabel: 'revert' menuLabel: 'revert to selected version'\\\\n\\\\t}! !\\\\n\\\\n!OBMethodVersionNode methodsFor: 'actions' stamp: 'cwp 12/15/2004 21:51'!\\\\nbrowse\\\\n\\\\tOBSystemBrowser openOnClass: self theClass selector: version selector! !\\\\n\\\\n!OBMethodVersionNode methodsFor: 'actions'!\\\\nrevert\\\\n\\\\tversion fileIn! !\\\\n\\\\n\\\\n!OBMethodVersionNode methodsFor: 'ancestry' stamp: 'cwp 10/17/2004 23:41'!\\\\nancestrySelector\\\\n\\\\t^ #isDescendantOfMethodVersion:! !\\\\n\\\\n!OBMethodVersionNode methodsFor: 'ancestry' stamp: 'cwp 10/17/2004 23:43'!\\\\nisDescendantOfMethodVersion: aNode\\\\n\\\\t^ (version = aNode version)! !\\\\n\\\\n\\\\n!OBMethodVersionNode methodsFor: 'accessing' stamp: 'cwp 10/17/2004 23:57'!\\\\ncategory\\\\n\\\\t^ self theClass organization categoryOfElement: version selector! !\\\\n\\\\n!OBMethodVersionNode methodsFor: 'accessing'!\\\\nreference\\\\n\\\\t^ self referenceForMethod: version selector ofClass: self theClassName.! !\\\\n\\\\n!OBMethodVersionNode methodsFor: 'accessing' stamp: 'cwp 10/17/2004 23:44'!\\\\nversion\\\\n\\\\t^ version! !\\\\n\\\\n\\\\n!OBMethodVersionNode methodsFor: 'compiling' stamp: 'cwp 10/17/2004 23:53'!\\\\ndefinition\\\\n\\\\t^ (OBMethodDefinition source: version source inClass: self theClass)\\\\n\\\\t\\\\tcallback: [:sel | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tversion selector = sel\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self class on: version latest]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [OBMethodNode on: sel inClass: self theClass]]! !\\\\n\\\\n\\\\n!OBMethodVersionNode methodsFor: 'displaying' stamp: 'cwp 11/27/2004 21:38'!\\\\nname\\\\n\\\\t| stamp |\\\\n\\\\tstamp := version stamp ifNil: ['<timestamp missing>'].\\\\n\\\\t^ version theClassName, '>>', version selector, ' ', stamp! !\\\\n\\\\n\\\\n!OBMethodVersionNode methodsFor: 'initializing'!\\\\nsetVersion: aMethodVersion\\\\n\\\\tversion := aMethodVersion.\\\\n\\\\tself theClass: version theClass! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBMethodVersionNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBMethodVersionNode class methodsFor: 'instance creation'!\\\\non: aMethodVersion \\\\n\\\\t^ self new setVersion: aMethodVersion! !\\\\nOBFilter subclass: #OBModalFilter\\\\n\\\\tinstanceVariableNames: 'selection'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Utilities'!\\\\n!OBModalFilter commentStamp: 'cwp 1/7/2005 23:39' prior: 0!\\\\nOBModalFilter is used to implement the 'instance/?/class' buttons in a standard class browser. In functional terms it filters the nodes of a column according to the edge of the metagraph that they correspond to. OBModalFilter displays an OBRadioButtonBar in its column's pane, with one button per edge. Only nodes from the currently selected edge are allowed in the column.\\\\n\\\\niVars:\\\\n\\\\nselection\\\\t- the currently selected edge!\\\\n\\\\n\\\\n!OBModalFilter methodsFor: 'callbacks' stamp: 'cwp 2/25/2004 00:28'!\\\\nlist\\\\n\\\\t^ metaNode edges collect: [:edge | edge label]! !\\\\n\\\\n!OBModalFilter methodsFor: 'callbacks' stamp: 'cwp 2/9/2004 21:10'!\\\\nselection\\\\n\\\\t^ selection ifNil: [selection _ 1]! !\\\\n\\\\n!OBModalFilter methodsFor: 'callbacks' stamp: 'cwp 6/6/2006 00:20'!\\\\nselection: anInteger\\\\n\\\\tselection _ anInteger.\\\\n\\\\tself changed: #selection.\\\\n\\\\tmonitor listChanged.\\\\n! !\\\\n\\\\n\\\\n!OBModalFilter methodsFor: 'morphs' stamp: 'cwp 11/27/2004 18:01'!\\\\nbuttonMorph\\\\n\\\\t^ OBRadioButtonBar\\\\n\\\\t\\\\ton: self\\\\n\\\\t\\\\tlist: #list\\\\n\\\\t\\\\tselected: #selection\\\\n\\\\t\\\\tchangeSelected: #selection:! !\\\\n\\\\n\\\\n!OBModalFilter methodsFor: 'public' stamp: 'cwp 3/3/2004 00:23'!\\\\nnodesForParent: aNode\\\\n\\\\t^ self selectedEdge nodesForParent: aNode! !\\\\n\\\\n!OBModalFilter methodsFor: 'public' stamp: 'cwp 2/29/2004 14:35'!\\\\nselectAncestorOf: aNode withParent: parentNode\\\\n\\\\t| ancestor |\\\\n\\\\t1 \\\\tto: metaNode edges size \\\\n\\\\t  \\\\tdo: [:i | selection _ i.\\\\n\\\\t\\\\t\\\\tancestor _ (self nodesForParent: parentNode)\\\\n\\\\t\\\\t\\\\t\\\\tdetect: [:child | child isAncestorOf: aNode] \\\\n\\\\t\\\\t\\\\t\\\\tifNone: [nil].\\\\n\\\\t\\\\t\\\\tancestor ifNotNil: [self changed: #selection. ^ ancestor]].\\\\n\\\\t^ nil! !\\\\n\\\\n\\\\n!OBModalFilter methodsFor: 'queries' stamp: 'cwp 2/9/2004 21:08'!\\\\nwantsButton\\\\n\\\\t^ true! !\\\\n\\\\n\\\\n!OBModalFilter methodsFor: 'selection' stamp: 'cwp 2/9/2004 21:11'!\\\\nincrementSelection\\\\n\\\\tselection _ selection + 1.\\\\n\\\\t(selection > metaNode edges size) ifTrue: [selection _ 1].! !\\\\n\\\\n!OBModalFilter methodsFor: 'selection' stamp: 'cwp 2/9/2004 21:11'!\\\\nselectedEdge\\\\n\\\\t^ metaNode edges at: self selection ! !\\\\nObject subclass: #OBMorphicPanelLayout\\\\n\\\\tinstanceVariableNames: 'panels'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Morphic'!\\\\n!OBMorphicPanelLayout commentStamp: 'cwp 1/7/2005 23:42' prior: 0!\\\\nOBMorphicPanelLayout implements a somewhat hairy algorithm for layoung out panels in a morphic SystemWindow. It is the default layout strategy used by OBBrowser. Subclasses of OBBrowser may use other layout strategies to customize their appearance.!\\\\n\\\\n\\\\n!OBMorphicPanelLayout methodsFor: 'initializing' stamp: 'cwp 11/21/2004 00:23'!\\\\nsetPanels: aCollection \\\\n\\\\tpanels := aCollection! !\\\\n\\\\n\\\\n!OBMorphicPanelLayout methodsFor: 'public' stamp: 'cwp 11/21/2004 00:26'!\\\\naddMorphsTo: aMorph\\\\n\\\\tself addNavMorphTo: aMorph.\\\\n\\\\t(panels size > 1) ifTrue: [self addOtherMorphsTo: aMorph].\\\\n\\\\t! !\\\\n\\\\n\\\\n!OBMorphicPanelLayout methodsFor: 'private' stamp: 'cwp 11/21/2004 00:25'!\\\\naddNavMorphTo: aMorph\\\\n\\\\taMorph \\\\n\\\\t\\\\taddMorph: self navigationPanel buildScroller\\\\n\\\\t\\\\tfullFrame: (LayoutFrame fractions: (0 @ 0 extent: 1 @ self columnProportion)).\\\\n! !\\\\n\\\\n!OBMorphicPanelLayout methodsFor: 'private' stamp: 'cwp 11/21/2004 00:37'!\\\\naddOtherMorphsTo: aMorph\\\\n\\\\t| heights variableCount fraction offset vExtent h nonNavPanels |\\\\n\\\\tnonNavPanels := panels reject: [:ea | ea isNavigation].\\\\n\\\\tnonNavPanels isEmpty ifTrue: [^ self].\\\\n\\\\theights _ nonNavPanels collect: [:ea | ea morphHeight].\\\\n\\\\tvariableCount _ heights \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinject: 0 \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinto: [:count :ea | ea = 0 ifTrue: [count + 1] ifFalse: [count]].\\\\n\\\\tfraction _ self columnProportion.\\\\n\\\\toffset _ 0.\\\\n\\\\tvExtent _  1- fraction / variableCount.\\\\n\\\\tnonNavPanels with: heights do:  [:panel :height | \\\\n\\\\t\\\\th _ height = 0 ifTrue: [vExtent] ifFalse: [0].\\\\n\\\\t\\\\taMorph \\\\n\\\\t\\\\t\\\\taddMorph: panel morph\\\\n\\\\t\\\\t\\\\tfullFrame: (LayoutFrame\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfractions: (0@fraction extent: 1@h)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\toffsets: (0@offset corner: 0@height)).\\\\n\\\\t\\\\theight = 0 \\\\n\\\\t\\\\t\\\\tifTrue: \\\\t[offset _ 0.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tfraction _ fraction + vExtent]\\\\n\\\\t\\\\t\\\\tifFalse: \\\\t[offset _ offset + height]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\n\\\\t\\\\t\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t! !\\\\n\\\\n!OBMorphicPanelLayout methodsFor: 'private' stamp: 'cwp 11/21/2004 00:26'!\\\\ncolumnProportion\\\\n\\\\t^ panels size = 1\\\\n\\\\t\\\\tifTrue: [1]\\\\n\\\\t\\\\tifFalse: [0.4]! !\\\\n\\\\n!OBMorphicPanelLayout methodsFor: 'private' stamp: 'cwp 11/21/2004 00:28'!\\\\nnavigationPanel\\\\n\\\\t^ panels detect: [:ea | ea isNavigation]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBMorphicPanelLayout class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBMorphicPanelLayout class methodsFor: 'intance creation' stamp: 'cwp 11/20/2004 23:32'!\\\\nfor: aCollection\\\\n\\\\t^ self new setPanels: aCollection! !\\\\nObject subclass: #OBNode\\\\n\\\\tinstanceVariableNames: 'metaNode'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Kernel'!\\\\n!OBNode commentStamp: 'cwp 3/4/2004 22:20' prior: 0!\\\\nA node is a wrapper for an object in the browser's domain graph. OBNode is an abstract superclass for concrete nodes which might appear in the browser.\\\\n\\\\niVars:\\\\n\\\\nmetaNode - the MetaNode which produced this node!\\\\n\\\\n\\\\n!OBNode methodsFor: 'accessing' stamp: 'cwp 3/3/2004 23:24'!\\\\nmetaNode\\\\n\\\\t^ metaNode! !\\\\n\\\\n!OBNode methodsFor: 'accessing' stamp: 'cwp 3/3/2004 23:24'!\\\\nmetaNode: aMetaNode\\\\n\\\\tmetaNode _ aMetaNode! !\\\\n\\\\n\\\\n!OBNode methodsFor: 'ancestry' stamp: 'cwp 3/3/2004 00:44'!\\\\nancestrySelector\\\\n\\\\t^ #isDescendantOf: ! !\\\\n\\\\n!OBNode methodsFor: 'ancestry' stamp: 'cwp 3/3/2004 01:47'!\\\\nisAncestorOf: aNode\\\\n\\\\t^ aNode perform: self ancestrySelector with: self! !\\\\n\\\\n!OBNode methodsFor: 'ancestry' stamp: 'cwp 3/3/2004 00:44'!\\\\nisDescendantOf: aNode\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!OBNode methodsFor: 'comparing' stamp: 'cwp 7/14/2006 12:37'!\\\\ncorrespondsWith: aNode\\\\n\\\\t^ self displayString = aNode displayString! !\\\\n\\\\n!OBNode methodsFor: 'comparing' stamp: 'cwp 1/31/2004 14:57'!\\\\nhash\\\\n\\\\t^ self name hash! !\\\\n\\\\n!OBNode methodsFor: 'comparing' stamp: 'cwp 1/31/2004 14:57'!\\\\n= other\\\\n\\\\t^ self class = other class and: [self name = other name]! !\\\\n\\\\n\\\\n!OBNode methodsFor: 'displaying' stamp: 'cwp 12/8/2004 21:36'!\\\\ndisplayString\\\\n\\\\t^ self perform: metaNode displaySelector! !\\\\n\\\\n!OBNode methodsFor: 'displaying' stamp: 'cwp 8/28/2004 00:14'!\\\\ntitle\\\\n\\\\t^ nil! !\\\\n\\\\n\\\\n!OBNode methodsFor: 'drag and drop' stamp: 'cwp 3/2/2004 21:28'!\\\\nacceptDroppedNode: aNode\\\\n \\\\t^ aNode perform: self dropSelector with: self\\\\n! !\\\\n\\\\n!OBNode methodsFor: 'drag and drop' stamp: 'avi 2/20/2004 14:00'!\\\\nasDraggableMorph\\\\n\\\\t^(StringMorph contents: self name)\\\\n\\\\t\\\\tcolor: Color white;\\\\n\\\\t\\\\tyourself! !\\\\n\\\\n!OBNode methodsFor: 'drag and drop' stamp: 'cwp 3/2/2004 21:29'!\\\\ndropSelector\\\\n\\\\t\\\\\\\"Override in subclasses\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ #dropOnNode: ! !\\\\n\\\\n!OBNode methodsFor: 'drag and drop' stamp: 'cwp 3/2/2004 21:28'!\\\\nwantsDroppedNode: aNode\\\\n\\\\t^ aNode respondsTo: self dropSelector! !\\\\n\\\\n\\\\n\\\\n!OBNode methodsFor: 'public' stamp: 'cwp 2/29/2004 13:49'!\\\\naccept: aText notifying: aController\\\\n\\\\t^ self text: aText! !\\\\n\\\\n!OBNode methodsFor: 'public' stamp: 'cwp 1/7/2004 09:25'!\\\\nactions\\\\n\\\\t^ #()! !\\\\n\\\\n!OBNode methodsFor: 'public' stamp: 'cwp 3/22/2004 20:48'!\\\\ndefinition\\\\n\\\\t^ self! !\\\\n\\\\n!OBNode methodsFor: 'public' stamp: 'dvf 8/17/2005 13:57'!\\\\ndisplayName\\\\n\\\\t\\\\\\\"expected to return a decorated text (rather than string) version of name\\\\\\\"\\\\n\\\\t^self name asText! !\\\\n\\\\n!OBNode methodsFor: 'public' stamp: 'cwp 12/10/2003 22:27'!\\\\nname\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n!OBNode methodsFor: 'public' stamp: 'cwp 12/7/2003 19:27'!\\\\ntext\\\\n\\\\t^ ''! !\\\\n\\\\n!OBNode methodsFor: 'public' stamp: 'cwp 2/29/2004 18:30'!\\\\ntextSelection\\\\n\\\\t^ 1 to: 0! !\\\\n\\\\n!OBNode methodsFor: 'public' stamp: 'cwp 3/14/2004 14:09'!\\\\ntext: aText\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!OBNode methodsFor: 'utility' stamp: 'cwp 3/10/2004 00:29'!\\\\naction: aSelector buttonLabel: buttonString menuLabel: menuString\\\\n\\\\t^ OBAction\\\\n\\\\t\\\\tlabel: menuString\\\\n\\\\t\\\\tbuttonLabel: buttonString\\\\n\\\\t\\\\treceiver: self\\\\n\\\\t\\\\tselector: aSelector\\\\n\\\\t\\\\targuments: #()! !\\\\n\\\\n!OBNode methodsFor: 'utility' stamp: 'cwp 2/3/2004 22:29'!\\\\naction: aSelector withLabel: aString\\\\n\\\\t^ OBAction\\\\n\\\\t\\\\tlabel: aString\\\\n\\\\t\\\\treceiver: self\\\\n\\\\t\\\\tselector: aSelector\\\\n\\\\t\\\\targuments: #()! !\\\\n\\\\n!OBNode methodsFor: 'utility' stamp: 'hpt 5/17/2004 16:51'!\\\\naction: aSelector withLabel: aString withIcon: anIcon\\\\n\\\\t^ OBAction\\\\n\\\\t\\\\tlabel: aString\\\\n\\\\t\\\\treceiver: self\\\\n\\\\t\\\\tselector: aSelector\\\\n\\\\t\\\\targuments: #()\\\\n\\\\t\\\\ticon: anIcon! !\\\\n\\\\n!OBNode methodsFor: 'utility' stamp: 'hpt 5/17/2004 14:28'!\\\\naction: aSelector withLabel: aString withKeystroke: aChar\\\\n\\\\t^ OBAction\\\\n\\\\t\\\\tlabel: aString\\\\n\\\\t\\\\treceiver: self\\\\n\\\\t\\\\tselector: aSelector\\\\n\\\\t\\\\targuments: #()\\\\n\\\\t\\\\tkeystroke: aChar! !\\\\n\\\\n!OBNode methodsFor: 'utility' stamp: 'hpt 5/17/2004 16:51'!\\\\naction: aSelector withLabel: aString withKeystroke: aChar withIcon: anIcon\\\\n\\\\t^ OBAction\\\\n\\\\t\\\\tlabel: aString\\\\n\\\\t\\\\treceiver: self\\\\n\\\\t\\\\tselector: aSelector\\\\n\\\\t\\\\targuments: #()\\\\n\\\\t\\\\tkeystroke: aChar\\\\n\\\\t\\\\ticon: anIcon! !\\\\n\\\\n!OBNode methodsFor: 'utility' stamp: 'cwp 12/5/2004 20:11'!\\\\naction: aSelector withMenuLabel: aString withButtonLabel: aString2 withKeystroke: aChar withIcon: anIcon \\\\n\\\\t^OBAction \\\\n\\\\t\\\\tlabel: aString\\\\n\\\\t\\\\tbuttonLabel: aString2\\\\n\\\\t\\\\treceiver: self\\\\n\\\\t\\\\tselector: aSelector\\\\n\\\\t\\\\targuments: #()\\\\n\\\\t\\\\tkeystroke: aChar\\\\n\\\\t\\\\ticon: anIcon! !\\\\n\\\\n!OBNode methodsFor: 'utility' stamp: 'cwp 2/7/2004 21:29'!\\\\nreferenceForMethod: selector ofClass: className\\\\n\\\\t| classIsMeta symbol |\\\\n\\\\tclassIsMeta _ className endsWith: ' class'.\\\\n\\\\tsymbol _ classIsMeta ifTrue: [(className allButLast: 6) asSymbol] ifFalse: [className].\\\\n\\\\t^ MethodReference new \\\\n\\\\t\\\\tsetClassSymbol: symbol\\\\n\\\\t\\\\tclassIsMeta: classIsMeta\\\\n\\\\t\\\\tmethodSymbol: selector\\\\n\\\\t\\\\tstringVersion: symbol, '>>', selector! !\\\\n\\\\n\\\\n!OBNode methodsFor: 'updating' stamp: 'cwp 6/4/2006 12:18'!\\\\nannounce: anObject\\\\n\\\\t^ OBAnnouncer current ifNotNilDo: [:announcer | announcer announce: anObject]! !\\\\n\\\\n!OBNode methodsFor: 'updating' stamp: 'cwp 6/4/2006 01:06'!\\\\ndemandSelection\\\\n\\\\t^ OBAnnouncer current announce: (OBNodeCreated node: self)! !\\\\n\\\\n!OBNode methodsFor: 'updating' stamp: 'cwp 6/4/2006 12:15'!\\\\nsignalChanged\\\\n\\\\tself announce: (OBNodeChanged node: self)! !\\\\n\\\\n!OBNode methodsFor: 'updating' stamp: 'cwp 6/4/2006 12:15'!\\\\nsignalChildrenChanged\\\\n\\\\tself announce: (OBChildrenChanged node: self)! !\\\\n\\\\n!OBNode methodsFor: 'updating' stamp: 'cwp 6/4/2006 12:15'!\\\\nsignalDeletion\\\\n\\\\tself announce: (OBNodeDeleted node: self)\\\\n! !\\\\n\\\\n!OBNode methodsFor: 'updating' stamp: 'cwp 6/4/2006 13:59'!\\\\nsignalSelection\\\\n\\\\t(self announce: OBAboutToChange)\\\\n\\\\t\\\\tisVetoed ifFalse: [self announce: (OBSelectingNode node: self)]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBNode class methodsFor: 'as yet unclassified' stamp: 'cwp 2/5/2004 20:25'!\\\\nactionsForParent: aNode\\\\n\\\\t^ #()! !\\\\n\\\\n!OBNode class methodsFor: 'as yet unclassified' stamp: 'cwp 12/18/2003 22:11'!\\\\nfromAssociation: anAssociationNode\\\\n\\\\t^ self on: anAssociationNode value! !\\\\nOBActor subclass: #OBNodeActor\\\\n\\\\tinstanceVariableNames: 'nodeClass'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Actors'!\\\\n!OBNodeActor commentStamp: 'cwp 3/5/2004 12:23' prior: 0!\\\\nFor simplicity, many actions are implemented by the nodes themselves. When the contextual menu for a node is displayed, this Actor gathers those actions and makes them available in to the user.\\\\n\\\\nIf a node class is specified, the OBNodeActor will also make available any class side actions provided by the node class. This is convenient for the user, since it makes it possible to invoke an action without first selecting a node. Many 'create' actions are implemented in this way.\\\\n\\\\niVars:\\\\n\\\\nnodeClass - if not nil, this class's class-side actions will be available to the user as well.!\\\\n\\\\n\\\\n!OBNodeActor methodsFor: 'public' stamp: 'cwp 1/23/2004 23:24'!\\\\nactionsForNode: aNode\\\\n\\\\t^ aNode actions! !\\\\n\\\\n!OBNodeActor methodsFor: 'public' stamp: 'cwp 3/3/2004 22:46'!\\\\nactionsForParent: aNode\\\\n\\\\t^ nodeClass \\\\n\\\\t\\\\tifNotNil: [nodeClass actionsForParent: aNode]\\\\n\\\\t\\\\tifNil: [#()]! !\\\\n\\\\n!OBNodeActor methodsFor: 'public' stamp: 'cwp 3/3/2004 22:42'!\\\\nnodeClass: aClass\\\\n\\\\tnodeClass _ aClass! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBNodeActor class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBNodeActor class methodsFor: 'as yet unclassified' stamp: 'cwp 3/3/2004 22:51'!\\\\nonNodeClass: aClass\\\\n\\\\t^ self new nodeClass: aClass! !\\\\nOBAnnouncement subclass: #OBNodeChanged\\\\n\\\\tinstanceVariableNames: 'node'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Announcements'!\\\\n\\\\n!OBNodeChanged methodsFor: 'as yet unclassified' stamp: 'cwp 6/4/2006 11:17'!\\\\nnode\\\\n\\\\t^ node! !\\\\n\\\\n!OBNodeChanged methodsFor: 'as yet unclassified' stamp: 'cwp 6/4/2006 11:17'!\\\\nnode: aNode\\\\n\\\\tnode _ aNode! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBNodeChanged class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBNodeChanged class methodsFor: 'as yet unclassified' stamp: 'cwp 6/4/2006 11:17'!\\\\nnode: aNode\\\\n\\\\t^ self new node: aNode! !\\\\nOBAnnouncement subclass: #OBNodeCreated\\\\n\\\\tinstanceVariableNames: 'node'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Announcements'!\\\\n\\\\n!OBNodeCreated methodsFor: 'as yet unclassified' stamp: 'cwp 6/4/2006 00:53'!\\\\nnode\\\\n\\\\t^ node! !\\\\n\\\\n!OBNodeCreated methodsFor: 'as yet unclassified' stamp: 'cwp 6/4/2006 00:53'!\\\\nnode: aNode\\\\n\\\\tnode _ aNode! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBNodeCreated class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBNodeCreated class methodsFor: 'as yet unclassified' stamp: 'cwp 6/4/2006 01:09'!\\\\nnode: aNode\\\\n\\\\t^ self new node: aNode! !\\\\nOBAnnouncement subclass: #OBNodeDeleted\\\\n\\\\tinstanceVariableNames: 'node'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Announcements'!\\\\n\\\\n!OBNodeDeleted methodsFor: 'as yet unclassified' stamp: 'cwp 6/4/2006 11:56'!\\\\nnode\\\\n\\\\t^ node! !\\\\n\\\\n!OBNodeDeleted methodsFor: 'as yet unclassified' stamp: 'cwp 6/4/2006 11:56'!\\\\nnode: aNode\\\\n\\\\tnode _ aNode! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBNodeDeleted class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBNodeDeleted class methodsFor: 'as yet unclassified' stamp: 'cwp 6/4/2006 11:56'!\\\\nnode: aNode\\\\n\\\\t^ self new node: aNode! !\\\\nOBDefinition subclass: #OBOrganizationDefinition\\\\n\\\\tinstanceVariableNames: 'organizer'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Definitions'!\\\\n!OBOrganizationDefinition commentStamp: 'cwp 1/8/2005 13:31' prior: 0!\\\\nOBOrganizationDefinition knows how to display and edit the organization of classes or methods by a Categorizer.!\\\\n\\\\n\\\\n!OBOrganizationDefinition methodsFor: 'as yet unclassified' stamp: 'cwp 9/22/2004 21:21'!\\\\norganizer: anOrganizer\\\\n\\\\torganizer _ anOrganizer! !\\\\n\\\\n!OBOrganizationDefinition methodsFor: 'as yet unclassified' stamp: 'cwp 9/22/2004 21:18'!\\\\ntext\\\\n\\\\t^ organizer asString! !\\\\n\\\\n!OBOrganizationDefinition methodsFor: 'as yet unclassified' stamp: 'cwp 1/9/2005 11:45'!\\\\ntext: aText\\\\n\\\\torganizer changeFromString: aText asString.\\\\n\\\\t^ true! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBOrganizationDefinition class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBOrganizationDefinition class methodsFor: 'as yet unclassified' stamp: 'cwp 9/22/2004 21:20'!\\\\non: anOrganizer\\\\n\\\\t^ self new organizer: anOrganizer! !\\\\nRectangleMorph subclass: #OBPane\\\\n\\\\tinstanceVariableNames: 'model list button'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Morphic'!\\\\n!OBPane commentStamp: 'cwp 1/7/2005 23:24' prior: 0!\\\\nAn OBPane is the visual representation of a column in a browser. It contains a morph to display nodes (typically a PluggableListMorph) and (optionally) a morph for communicating with the column's filter. It's main responsibility is to lay out its submorphs as the filter controls are added and removed.\\\\n\\\\niVars:\\\\n\\\\nmodel\\\\t- the OBColumn that controls the node list displayed in this pane\\\\nlist\\\\t\\\\t- the morph which displays the node list, usually a PluggableListMorph\\\\nbutton\\\\t- the morph which controls the column's filter, usually an OBRadioButtonBar.!\\\\n\\\\n\\\\n!OBPane methodsFor: 'constructing' stamp: 'cwp 11/2/2004 00:57'!\\\\nbuttonHeight\\\\n\\\\t^ self hasButton\\\\n\\\\t\\\\tifTrue: [button height]\\\\n\\\\t\\\\tifFalse: [self defaultButtonHeight]\\\\n! !\\\\n\\\\n!OBPane methodsFor: 'constructing' stamp: 'cwp 11/2/2004 01:10'!\\\\ndefaultButtonHeight\\\\n\\\\t^ 23! !\\\\n\\\\n!OBPane methodsFor: 'constructing' stamp: 'cwp 11/27/2004 21:19'!\\\\nnoteNewOwner: aMorph\\\\n\\\\tself containingWindow ifNotNilDo: [:window | self adoptPaneColor: window paneColor]! !\\\\n\\\\n\\\\n!OBPane methodsFor: 'geometry' stamp: 'cwp 2/12/2004 18:32'!\\\\nbounds: aRectangle\\\\n\\\\tsuper bounds: aRectangle.\\\\n\\\\tself adjustList.\\\\n\\\\tself adjustButton.! !\\\\n\\\\n\\\\n!OBPane methodsFor: 'initialization' stamp: 'cwp 2/12/2004 18:26'!\\\\ninitGeometry\\\\n\\\\tself\\\\t\\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tvResizing: #spaceFill;\\\\n\\\\t\\\\tclipSubmorphs: true;\\\\n\\\\t\\\\tcolor: Color transparent;\\\\n\\\\t\\\\tcellInset: 0;\\\\n\\\\t\\\\tborderWidth: 0;\\\\n\\\\t\\\\tlayoutPolicy: ProportionalLayout new.\\\\n\\\\t\\\\t\\\\n\\\\tself addMorph: list.\\\\n\\\\tlist bounds: self innerBounds.\\\\n\\\\t\\\\t! !\\\\n\\\\n!OBPane methodsFor: 'initialization' stamp: 'cwp 2/12/2004 18:44'!\\\\nmodel: anObject\\\\n\\\\t\\\\\\\"Set my model and make me me a dependent of the given object.\\\\\\\"\\\\n\\\\n\\\\tmodel ifNotNil: [model removeDependent: self].\\\\n\\\\tanObject ifNotNil: [anObject addDependent: self].\\\\n\\\\tmodel _ anObject.\\\\n! !\\\\n\\\\n!OBPane methodsFor: 'initialization' stamp: 'cwp 2/12/2004 19:17'!\\\\nsetColumn: aColumn filter: aFilter\\\\n\\\\tself model: aColumn.\\\\n\\\\tlist _ aColumn listMorph.\\\\n\\\\tself initGeometry.\\\\n\\\\taFilter ifNotNil: [self addButton: aFilter buttonMorph].! !\\\\n\\\\n\\\\n!OBPane methodsFor: 'testing' stamp: 'cwp 2/12/2004 18:35'!\\\\nhasButton\\\\n\\\\t^ button notNil! !\\\\n\\\\n\\\\n!OBPane methodsFor: 'updating' stamp: 'cwp 11/2/2004 00:53'!\\\\naddButton: aButton\\\\n\\\\tself hasButton ifTrue: [self removeMorph: button].\\\\n\\\\tbutton _ aButton.\\\\n\\\\tbutton height: self defaultButtonHeight.\\\\n\\\\tself \\\\n\\\\t\\\\taddMorph: button;\\\\n\\\\t\\\\tadjustList;\\\\n\\\\t\\\\tadjustButton! !\\\\n\\\\n!OBPane methodsFor: 'updating' stamp: 'cwp 11/2/2004 00:50'!\\\\nadjustButton\\\\n\\\\t| inner |\\\\n\\\\tself hasButton ifTrue: \\\\n\\\\t\\\\t[inner _ self innerBounds.\\\\n\\\\t\\\\tbutton bounds: (inner withTop: inner bottom - self buttonHeight)]! !\\\\n\\\\n!OBPane methodsFor: 'updating' stamp: 'cwp 2/12/2004 18:35'!\\\\nadjustList\\\\n\\\\tself hasButton\\\\n\\\\t\\\\t\\\\tifFalse: [list bounds: self innerBounds]\\\\n\\\\t\\\\t\\\\tifTrue: [list bounds: (self innerBounds withHeight: (self height - self buttonHeight))]! !\\\\n\\\\n!OBPane methodsFor: 'updating' stamp: 'cwp 2/12/2004 20:29'!\\\\nremoveButton\\\\n\\\\tself hasButton \\\\n\\\\t\\\\tifTrue: [self removeMorph: button.\\\\n\\\\t\\\\t\\\\t\\\\tbutton _ nil.\\\\n\\\\t\\\\t\\\\t\\\\tself adjustList]! !\\\\n\\\\n!OBPane methodsFor: 'updating' stamp: 'cwp 2/12/2004 20:23'!\\\\nupdate: aSelector\\\\n\\\\taSelector = #filter ifFalse: [^ self].\\\\n\\\\t(model wantsButton)\\\\n\\\\t\\\\t\\\\tifTrue: [self addButton: model filter buttonMorph]\\\\n\\\\t\\\\t\\\\tifFalse: [self removeButton]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBPane class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBPane class methodsFor: 'instance creation' stamp: 'cwp 2/12/2004 18:11'!\\\\nforColumn: aColumn\\\\n\\\\t^ self forColumn: aColumn withFilter: nil! !\\\\n\\\\n!OBPane class methodsFor: 'instance creation' stamp: 'cwp 2/12/2004 18:12'!\\\\nforColumn: aColumn withFilter: aFilter\\\\n\\\\t^ self new setColumn: aColumn filter: aFilter! !\\\\nRectangleMorph subclass: #OBPaneScroller\\\\n\\\\tinstanceVariableNames: 'model sizing panes transform scrollBar'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Morphic'!\\\\n!OBPaneScroller commentStamp: 'cwp 3/5/2004 12:13' prior: 0!\\\\nInstances of OBPaneScroller contain the panes which represent columns in a browser. Their primary responsibilities are laying out panes to fit the space available and scrolling them horizontally when there isn't sufficient space. \\\\n\\\\niVars:\\\\n\\\\nsizing\\\\t\\\\t- The number of panes which should exactly fit the available space.\\\\n\\\\t\\\\t   \\\\t   During layout, the  width of the panes is determined accordingly.\\\\ntransform\\\\t- A TransformMorph used for scrolling\\\\nscrollBar\\\\t- An OBHorizontalScrollBar used for scrolling!\\\\n\\\\n\\\\n!OBPaneScroller methodsFor: 'accessing' stamp: 'cwp 11/17/2004 22:03'!\\\\nmodel\\\\n\\\\t^model! !\\\\n\\\\n!OBPaneScroller methodsFor: 'accessing' stamp: 'cwp 11/17/2004 22:11'!\\\\nmodel: anObject\\\\n\\\\tmodel ifNotNil: [model removeDependent: self].\\\\n\\\\tanObject ifNotNil: [anObject addDependent: self].\\\\n\\\\tmodel := anObject! !\\\\n\\\\n!OBPaneScroller methodsFor: 'accessing' stamp: 'cwp 11/17/2004 23:09'!\\\\npanes\\\\n\\\\t^ panes ifNil: [self updatePanes. panes]! !\\\\n\\\\n!OBPaneScroller methodsFor: 'accessing' stamp: 'cwp 11/22/2004 23:19'!\\\\nsizing\\\\n\\\\t^ sizing ifNil: [self updateSizing]! !\\\\n\\\\n\\\\n!OBPaneScroller methodsFor: 'defaults' stamp: 'cwp 8/24/2003 15:13'!\\\\nseparatorWidth\\\\n\\\\t^ 4! !\\\\n\\\\n\\\\n!OBPaneScroller methodsFor: 'initialization' stamp: 'cwp 11/23/2004 01:28'!\\\\ninitialize\\\\n\\\\tsuper initialize.\\\\n\\\\tself \\\\n\\\\t\\\\tcolor: Color red;\\\\n\\\\t\\\\tborderWidth: 0;\\\\n\\\\t\\\\tvResizing: #spaceFill;\\\\n\\\\t\\\\thResizing: #spaceFill.\\\\n\\\\tself \\\\n\\\\t\\\\tinitializeTransform;\\\\n\\\\t\\\\tinitializeScrollbar.\\\\n\\\\tself startStepping.! !\\\\n\\\\n!OBPaneScroller methodsFor: 'initialization' stamp: 'cwp 2/8/2004 11:01'!\\\\ninitializeScrollbar\\\\n\\\\tscrollBar _ OBScrollBar new model: self slotName: 'scrollBar'.\\\\n\\\\tscrollBar \\\\n\\\\t\\\\tborderWidth: 0;\\\\n\\\\t\\\\tborderColor: #inset;\\\\n\\\\t\\\\theight: self scrollBarHeight.\\\\n\\\\tself resizeScrollBar.\\\\n! !\\\\n\\\\n!OBPaneScroller methodsFor: 'initialization' stamp: 'cwp 2/8/2004 10:52'!\\\\ninitializeTransform\\\\n\\\\ttransform _ TransformMorph new.\\\\n\\\\ttransform\\\\n\\\\t\\\\tcolor: Color transparent;\\\\n\\\\t\\\\tborderWidth: 0;\\\\n\\\\t\\\\tvResizing: #spaceFill;\\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tdisableTableLayout;\\\\n\\\\t\\\\tbounds: super innerBounds.\\\\n\\\\tself addMorphBack: transform.\\\\n! !\\\\n\\\\n\\\\n!OBPaneScroller methodsFor: 'layout' stamp: 'cwp 2/8/2004 11:10'!\\\\nadjustPaneHeight\\\\n\\\\t\\\\\\\"This gets called after the scrollbar has been shown or hidden, to move the bottom\\\\n\\\\tof the panes to the right place.\\\\\\\"\\\\n\\\\t\\\\n\\\\ttransform bounds: self innerBounds.\\\\n\\\\ttransform submorphsDo: [:m | m bounds: (m bounds withHeight: self paneHeight)]\\\\n\\\\t\\\\t! !\\\\n\\\\n!OBPaneScroller methodsFor: 'layout' stamp: 'cwp 11/21/2004 23:45'!\\\\nbounds: aRectangle\\\\n\\\\tsuper bounds: aRectangle.\\\\n\\\\tself layoutWidgets.\\\\n\\\\tself layoutPanes.\\\\n\\\\tself setScrollDeltas.\\\\n! !\\\\n\\\\n!OBPaneScroller methodsFor: 'layout' stamp: 'cwp 2/26/2004 23:14'!\\\\ncomputeMorphWidths\\\\n\\\\t| paneWidths widths |\\\\n\\\\tpaneWidths _ self paneWidthsToFit: self totalPaneWidth.\\\\n\\\\twidths _ OrderedCollection new.\\\\n\\\\tpaneWidths do: [:w | widths add: w] separatedBy: [widths add: self separatorWidth].\\\\n\\\\t^ widths asArray\\\\n! !\\\\n\\\\n!OBPaneScroller methodsFor: 'layout' stamp: 'cwp 2/8/2004 11:06'!\\\\ndoLayout\\\\n\\\\tself layoutWidgets.\\\\n\\\\tself layoutPanes.\\\\n\\\\tself hideOrShowScrollBar.\\\\n\\\\tself setScrollDeltas.\\\\n\\\\tself scrollToRight.! !\\\\n\\\\n!OBPaneScroller methodsFor: 'layout' stamp: 'cwp 2/8/2004 10:54'!\\\\ninnerBounds\\\\n\\\\t| rect |\\\\n\\\\trect _ super innerBounds.\\\\n\\\\t^ self scrollBarIsVisible\\\\n\\\\t\\\\tifTrue: [rect withHeight: rect height - self scrollBarHeight - 1]\\\\n\\\\t\\\\tifFalse: [rect]! !\\\\n\\\\n!OBPaneScroller methodsFor: 'layout' stamp: 'cwp 2/8/2004 01:22'!\\\\nlayoutPanes\\\\n\\\\t| widths rect |\\\\n\\\\twidths _ self computeMorphWidths.\\\\n\\\\trect _ 0@0 extent: (0 @ self paneHeight).\\\\n\\\\ttransform submorphs \\\\n\\\\t\\\\t\\\\t\\\\t\\\\twith: widths \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:m :w | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trect _ rect withWidth: w.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tm bounds: rect.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trect _ rect translateBy: (w@0)]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\n! !\\\\n\\\\n!OBPaneScroller methodsFor: 'layout' stamp: 'cwp 8/25/2003 22:13'!\\\\nlayoutWidgets\\\\n\\\\t| inner outer |\\\\n\\\\touter _ super innerBounds.\\\\n\\\\tinner _ self innerBounds.\\\\n\\\\ttransform bounds: inner.\\\\n\\\\tscrollBar bounds: ((inner left @ inner bottom + 1)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: outer bottomRight)! !\\\\n\\\\n!OBPaneScroller methodsFor: 'layout' stamp: 'cwp 11/17/2004 23:09'!\\\\npaneCount\\\\n\\\\t^ self panes size! !\\\\n\\\\n!OBPaneScroller methodsFor: 'layout' stamp: 'cwp 12/6/2003 17:08'!\\\\npaneHeight\\\\n\\\\t^ transform bounds height! !\\\\n\\\\n!OBPaneScroller methodsFor: 'layout' stamp: 'cwp 2/26/2004 23:14'!\\\\npaneWidthsToFit: limit\\\\n\\\\t| padded |\\\\n\\\\tpadded _ Array new: self paneCount.\\\\n\\\\tpadded atAllPut: (limit / self sizing) floor.\\\\n\\\\t(1 to: limit - padded sum) do: [:i | padded at: i put: (padded at: i) + 1].\\\\n\\\\t^ padded\\\\n\\\\t\\\\n\\\\t! !\\\\n\\\\n!OBPaneScroller methodsFor: 'layout' stamp: 'cwp 2/8/2004 11:03'!\\\\nresizeScrollBar\\\\n\\\\t| inner outer |\\\\n\\\\touter _ super innerBounds.\\\\n\\\\tinner _ outer withHeight: outer height - self scrollBarHeight - 1.\\\\n\\\\tscrollBar bounds: ((inner left @ inner bottom + 1)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: outer bottomRight)! !\\\\n\\\\n!OBPaneScroller methodsFor: 'layout' stamp: 'cwp 8/24/2003 14:29'!\\\\nscrollBarHeight\\\\n\\\\t^ 12! !\\\\n\\\\n!OBPaneScroller methodsFor: 'layout' stamp: 'cwp 2/25/2004 20:23'!\\\\ntotalPaneWidth\\\\n\\\\t^ self innerBounds width - ((self sizing - 1) * self separatorWidth)! !\\\\n\\\\n\\\\n!OBPaneScroller methodsFor: 'panes' stamp: 'cwp 12/6/2003 17:06'!\\\\nclearPanes\\\\n\\\\ttransform removeAllMorphs! !\\\\n\\\\n!OBPaneScroller methodsFor: 'panes' stamp: 'cwp 11/23/2004 01:22'!\\\\npopPanes: count\\\\n\\\\tcount * 2 timesRepeat: [transform removeMorph: transform lastSubmorph].\\\\n\\\\tpanes removeLast: count! !\\\\n\\\\n!OBPaneScroller methodsFor: 'panes' stamp: 'cwp 11/17/2004 22:46'!\\\\npushPane: aMorph\\\\n\\\\taMorph \\\\n\\\\t\\\\tborderWidth: 0;\\\\n\\\\t\\\\thResizing: #rigid;\\\\n\\\\t\\\\tvResizing: #rigid;\\\\n\\\\t\\\\tlayoutInset: 0.\\\\n\\\\ttransform hasSubmorphs ifTrue: [transform addMorphBack: self separator].\\\\n\\\\ttransform addMorphBack: aMorph.\\\\n! !\\\\n\\\\n!OBPaneScroller methodsFor: 'panes' stamp: 'cwp 11/27/2004 01:03'!\\\\nseparator\\\\n\\\\t^ BorderedSubpaneDividerMorph vertical \\\\n\\\\t\\\\tborderWidth: self separatorWidth / 2;\\\\n\\\\t\\\\tcolor: model defaultBackgroundColor duller;\\\\n\\\\t\\\\tborderRaised.! !\\\\n\\\\n\\\\n!OBPaneScroller methodsFor: 'scrolling' stamp: 'cwp 2/8/2004 10:44'!\\\\nhideOrShowScrollBar\\\\n\\\\tself isScrollable ifTrue: [self showScrollBar] ifFalse: [self hideScrollBar]! !\\\\n\\\\n!OBPaneScroller methodsFor: 'scrolling' stamp: 'cwp 2/8/2004 11:10'!\\\\nhideScrollBar\\\\n\\\\tself removeMorph: scrollBar.\\\\n\\\\tself adjustPaneHeight.! !\\\\n\\\\n!OBPaneScroller methodsFor: 'scrolling' stamp: 'cwp 2/8/2004 10:42'!\\\\nisScrollable\\\\n\\\\t^ self leftoverScrollRange > 0! !\\\\n\\\\n!OBPaneScroller methodsFor: 'scrolling' stamp: 'cwp 8/25/2003 21:04'!\\\\nleftoverScrollRange\\\\n\\\\t^ (self totalScrollRange - self innerBounds width roundTo: self scrollDeltaWidth) max: 0\\\\n! !\\\\n\\\\n!OBPaneScroller methodsFor: 'scrolling' stamp: 'cwp 2/8/2004 10:56'!\\\\nscrollBarIsVisible\\\\n\\\\t^ submorphs includes: scrollBar! !\\\\n\\\\n!OBPaneScroller methodsFor: 'scrolling' stamp: 'cwp 8/23/2003 16:21'!\\\\nscrollDeltaWidth\\\\n\\\\t^ 1! !\\\\n\\\\n!OBPaneScroller methodsFor: 'scrolling' stamp: 'cwp 12/8/2003 21:42'!\\\\nscrollToRight\\\\n\\\\t^ scrollBar setValue: 1.! !\\\\n\\\\n!OBPaneScroller methodsFor: 'scrolling' stamp: 'cwp 8/25/2003 21:14'!\\\\nsetScrollDeltas\\\\n\\\\t| range interval value |\\\\n\\\\ttransform hasSubmorphs ifFalse: [scrollBar interval: 1.0. ^ self].\\\\n\\\\trange _ self leftoverScrollRange.\\\\n\\\\trange = 0 ifTrue: [^ scrollBar interval: 1.0; setValue: 0].\\\\n\\\\tinterval _ ((self innerBounds width) / self totalScrollRange) asFloat.\\\\n\\\\tvalue _ (transform offset x / range min: 1.0) asFloat.\\\\n\\\\tscrollBar interval: interval.\\\\n\\\\tscrollBar setValue: value.! !\\\\n\\\\n!OBPaneScroller methodsFor: 'scrolling' stamp: 'cwp 2/8/2004 11:11'!\\\\nshowScrollBar\\\\n\\\\tself scrollBarIsVisible ifTrue: [^ self].\\\\n\\\\tself resizeScrollBar.\\\\n\\\\tself addMorphFront: scrollBar.\\\\n\\\\tself adjustPaneHeight.\\\\n\\\\t! !\\\\n\\\\n!OBPaneScroller methodsFor: 'scrolling' stamp: 'cwp 8/25/2003 19:27'!\\\\ntotalScrollRange\\\\n\\\\t| submorphBounds |\\\\n\\\\tsubmorphBounds := transform localSubmorphBounds ifNil: [^ 0].\\\\n\\\\t^ submorphBounds width\\\\n! !\\\\n\\\\n\\\\n!OBPaneScroller methodsFor: 'stepping' stamp: 'cwp 11/21/2004 15:38'!\\\\nstep\\\\n\\\\tself reclaimPanes! !\\\\n\\\\n!OBPaneScroller methodsFor: 'stepping' stamp: 'cwp 11/24/2004 22:29'!\\\\nstepTime\\\\n\\\\t^ 250! !\\\\n\\\\n\\\\n!OBPaneScroller methodsFor: 'updating' stamp: 'cwp 11/23/2004 01:23'!\\\\nreclaimPanes\\\\n\\\\t| reclaimed |\\\\n\\\\treclaimed := model reclaimPanes.\\\\n\\\\treclaimed isZero\\\\tifFalse: \\\\n\\\\t\\\\t[self \\\\n\\\\t\\\\t \\\\tpopPanes: reclaimed;\\\\n\\\\t\\\\t\\\\tbasicUpdateSizing;\\\\n\\\\t\\\\t\\\\tlayoutPanes;\\\\n\\\\t\\\\t\\\\thideOrShowScrollBar;\\\\n\\\\t\\\\t\\\\tsetScrollDeltas]! !\\\\n\\\\n!OBPaneScroller methodsFor: 'updating' stamp: 'cwp 11/21/2004 13:51'!\\\\nscrollBarValue: value\\\\n\\\\ttransform hasSubmorphs ifFalse: [^ self].\\\\n\\\\ttransform offset: (self leftoverScrollRange * value) rounded @ 0.! !\\\\n\\\\n!OBPaneScroller methodsFor: 'updating' stamp: 'cwp 11/23/2004 01:34'!\\\\nupdatePanes\\\\n\\\\t| count |\\\\n\\\\tmodel ifNil: [panes := Array new. ^ self].\\\\n\\\\tcount := panes ifNotNil: [panes size] ifNil: [0].\\\\n\\\\tself basicUpdatePanes.\\\\n\\\\tself basicUpdateSizing.\\\\t\\\\n\\\\tself layoutPanes.\\\\n\\\\tpanes size = count\\\\n\\\\t\\\\tifFalse: [self hideOrShowScrollBar.\\\\n\\\\t\\\\t\\\\t\\\\tself setScrollDeltas].\\\\n\\\\tpanes size > count ifTrue: [self scrollToRight].\\\\n\\\\t^ panes! !\\\\n\\\\n!OBPaneScroller methodsFor: 'updating' stamp: 'cwp 11/23/2004 01:14'!\\\\nupdateSizing\\\\n\\\\t| old |\\\\n\\\\told := sizing.\\\\n\\\\tself basicUpdateSizing.\\\\n\\\\tsizing = old ifFalse: [self layoutPanes].\\\\n\\\\t^sizing! !\\\\n\\\\n!OBPaneScroller methodsFor: 'updating' stamp: 'cwp 11/17/2004 22:40'!\\\\nupdate: aSymbol\\\\n\\\\taSymbol = #sizing ifTrue: [^ self updateSizing].\\\\n\\\\taSymbol = #panes ifTrue: [^ self updatePanes].! !\\\\n\\\\n\\\\n!OBPaneScroller methodsFor: 'private' stamp: 'cwp 11/23/2004 01:31'!\\\\nbasicUpdatePanes\\\\n\\\\tpanes := model ifNotNil: [model panes] ifNil: [Array new].\\\\t\\\\t\\\\n\\\\tself clearPanes.\\\\n\\\\tpanes do: [:ea | self pushPane: ea].\\\\n! !\\\\n\\\\n!OBPaneScroller methodsFor: 'private' stamp: 'cwp 11/23/2004 01:14'!\\\\nbasicUpdateSizing\\\\n\\\\tmodel ifNil: [sizing := 1] ifNotNil: [sizing := model sizing]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBPaneScroller class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBPaneScroller class methodsFor: 'as yet unclassified' stamp: 'cwp 11/17/2004 22:01'!\\\\nwithModel: aModel\\\\n\\\\t^ self new model: aModel! !\\\\nObject subclass: #OBPanel\\\\n\\\\tinstanceVariableNames: 'browser'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Kernel'!\\\\n!OBPanel commentStamp: 'cwp 1/7/2005 23:23' prior: 0!\\\\nA panel is an object that manages part of the browser's window. It provides a protocol for receiving notifications when the current domain node changes, and reacts to these changes.!\\\\n\\\\n\\\\n!OBPanel methodsFor: 'accessing' stamp: 'cwp 4/17/2006 15:52'!\\\\nannouncer\\\\n\\\\t^ browser announcer! !\\\\n\\\\n!OBPanel methodsFor: 'accessing' stamp: 'cwp 11/16/2004 21:58'!\\\\nbrowser\\\\n\\\\t^ browser! !\\\\n\\\\n!OBPanel methodsFor: 'accessing' stamp: 'cwp 4/17/2006 22:17'!\\\\nbrowser: aBrowser\\\\n\\\\tbrowser _ aBrowser.\\\\n\\\\tself subscribe! !\\\\n\\\\n\\\\n!OBPanel methodsFor: 'testing' stamp: 'cwp 11/20/2004 21:09'!\\\\nisNavigation\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!OBPanel methodsFor: 'updating' stamp: 'cwp 4/17/2006 19:36'!\\\\nsubscribe! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBPanel class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBPanel class methodsFor: 'instance creation' stamp: 'cwp 8/31/2004 10:46'!\\\\ninBrowser: aBrowser\\\\n\\\\t^ self new browser: aBrowser! !\\\\nPluggableTextMorph subclass: #OBPluggableTextMorph\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Morphic'!\\\\n!OBPluggableTextMorph commentStamp: 'cwp 12/7/2004 00:04' prior: 0!\\\\nThis is a trivial subclass of PluggableTextMorph. It overrides initialization methods to use an OBTextMorph rather than a regular TextMorph!\\\\n\\\\n\\\\n!OBPluggableTextMorph methodsFor: 'event handling' stamp: 'cwp 10/30/2004 23:07'!\\\\nkeyStroke: evt\\\\n\\\\t^ textMorph keyStroke: evt! !\\\\n\\\\n\\\\n!OBPluggableTextMorph methodsFor: 'model access' stamp: 'cwp 10/30/2004 22:57'!\\\\nsetText: aText\\\\n\\\\tscrollBar setValue: 0.0.\\\\n\\\\ttextMorph\\\\n\\\\t\\\\tifNil: [textMorph _ OBTextMorph new\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcontents: aText wrappedTo: self innerBounds width-6.\\\\n\\\\t\\\\t\\\\t\\\\ttextMorph setEditView: self.\\\\n\\\\t\\\\t\\\\t\\\\tscroller addMorph: textMorph]\\\\n\\\\t\\\\tifNotNil: [textMorph newContents: aText].\\\\n\\\\tself hasUnacceptedEdits: false.\\\\n\\\\tself setScrollDeltas.! !\\\\nRectangleMorph subclass: #OBRadioButtonBar\\\\n\\\\tinstanceVariableNames: 'model buttons selection getListSelector getSelectionSelector setSelectionSelector'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Morphic'!\\\\n!OBRadioButtonBar commentStamp: 'cwp 1/7/2005 23:27' prior: 0!\\\\nAn OBRadioButtonBar is similar to a PluggableListMorph except that it displays a row of buttons rather than a vertical list. Clicking on a button selects it.\\\\n\\\\nmodel\\\\t\\\\t\\\\t\\\\t- the model for this button bar\\\\nbuttons\\\\t\\\\t\\\\t- a collection of OBButtonModels, which are derived from the model's list\\\\nselection\\\\t\\\\t\\\\t- the index of the currently selected button\\\\ngetListSelector\\\\t \\\\t- the message for getting the list of labels for the buttons\\\\ngetSelectionSelector\\\\t- the message for getting the index of the currently selected item\\\\nsetSelectionSelector\\\\t- the message for informing the model that a button has been clicked!\\\\n\\\\n\\\\n!OBRadioButtonBar methodsFor: 'accessing' stamp: 'cwp 11/27/2004 02:09'!\\\\nlist\\\\n\\\\tbuttons ifNil: \\\\n\\\\t\\\\t\\\\t[| labels |\\\\n\\\\t\\\\t\\\\tlabels := model perform: getListSelector.\\\\n\\\\t\\\\t\\\\tbuttons := Array new: labels size.\\\\n\\\\t\\\\t\\\\tlabels withIndexDo: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:label :index | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbuttons at: index put: (OBButtonModel withLabel: label inBar: self)].\\\\n\\\\t\\\\t\\\\tselection := self getSelectionIndex.\\\\n\\\\t\\\\t\\\\tself].\\\\n\\\\t^buttons collect: [:b | b label]! !\\\\n\\\\n\\\\n!OBRadioButtonBar methodsFor: 'callbacks' stamp: 'cwp 11/27/2004 19:18'!\\\\nisEnabled: aButton\\\\n\\\\t^ true! !\\\\n\\\\n!OBRadioButtonBar methodsFor: 'callbacks' stamp: 'cwp 2/24/2004 18:54'!\\\\nisSelected: aButton\\\\n\\\\t^ (buttons at: selection ifAbsent: [^ false]) == aButton! !\\\\n\\\\n!OBRadioButtonBar methodsFor: 'callbacks' stamp: 'cwp 2/24/2004 18:47'!\\\\npush: aButton\\\\n\\\\t| index |\\\\n\\\\tindex _ buttons indexOf: aButton.\\\\n\\\\tmodel perform: setSelectionSelector with: index.! !\\\\n\\\\n\\\\n!OBRadioButtonBar methodsFor: 'constructing' stamp: 'cwp 11/27/2004 20:58'!\\\\nadoptPaneColor: aColor\\\\n\\\\tself submorphs do: [:ea | ea onColor: aColor darker offColor: aColor lighter]! !\\\\n\\\\n!OBRadioButtonBar methodsFor: 'constructing' stamp: 'cwp 11/27/2004 21:02'!\\\\nnoteNewOwner: aMorph\\\\n\\\\t| window |\\\\n\\\\twindow := aMorph containingWindow.\\\\n\\\\twindow ifNotNil: [self adoptPaneColor: window paneColor]! !\\\\n\\\\n\\\\n!OBRadioButtonBar methodsFor: 'initialize-release' stamp: 'lr 3/23/2006 18:10'!\\\\ninitGeometry\\\\n\\\\tself\\\\n\\\\t\\\\tlayoutPolicy: TableLayout new;\\\\n\\\\t\\\\tlistDirection: #leftToRight;\\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tvResizing: #spaceFill;\\\\n\\\\t\\\\trubberBandCells: true;\\\\n\\\\t\\\\tcolor: Color transparent;\\\\n\\\\t\\\\tborderWidth: 0;\\\\n\\\\t\\\\tlayoutInset: 2;\\\\n\\\\t\\\\tcellInset: 2\\\\n! !\\\\n\\\\n!OBRadioButtonBar methodsFor: 'initialize-release' stamp: 'cwp 2/22/2004 16:51'!\\\\nmodel: aModel\\\\n\\\\tmodel ifNotNil: [model removeDependent: self].\\\\n\\\\tmodel _ aModel.\\\\n\\\\tmodel addDependent: self.! !\\\\n\\\\n!OBRadioButtonBar methodsFor: 'initialize-release' stamp: 'cwp 2/25/2004 00:36'!\\\\non: aModel list: listSelector selected: selectionGetter changeSelected: selectionSetter \\\\n\\\\tself model: aModel.\\\\n\\\\tselection _ 0.\\\\n\\\\tgetListSelector _ listSelector.\\\\n\\\\tgetSelectionSelector _ selectionGetter.\\\\n\\\\tsetSelectionSelector _ selectionSetter.\\\\n\\\\tself initGeometry.\\\\n\\\\tself updateList.! !\\\\n\\\\n\\\\n!OBRadioButtonBar methodsFor: 'updating' stamp: 'cwp 2/24/2004 18:53'!\\\\ngetSelectionIndex\\\\n\\\\t^ model perform: getSelectionSelector! !\\\\n\\\\n!OBRadioButtonBar methodsFor: 'updating' stamp: 'cwp 11/27/2004 17:58'!\\\\nupdateButtons\\\\n\\\\t| labels |\\\\n\\\\tlabels := model perform: getListSelector.\\\\n\\\\tbuttons := Array new: labels size.\\\\n\\\\tlabels withIndexDo: \\\\n\\\\t\\\\t\\\\t[:label :index | \\\\n\\\\t\\\\t\\\\tbuttons at: index put: (OBButtonModel withLabel: label inBar: self)].\\\\n\\\\tselection := self getSelectionIndex! !\\\\n\\\\n!OBRadioButtonBar methodsFor: 'updating' stamp: 'cwp 11/27/2004 17:58'!\\\\nupdateList\\\\n\\\\tself \\\\n\\\\t\\\\tupdateButtons; \\\\n\\\\t\\\\tupdateMorphs! !\\\\n\\\\n!OBRadioButtonBar methodsFor: 'updating' stamp: 'cwp 11/2/2004 01:09'!\\\\nupdateMorphs\\\\n\\\\tself removeAllMorphs.\\\\n\\\\tbuttons do: [:button | self addMorphBack: button morph].\\\\n\\\\tself bounds: (self bounds withHeight: submorphs first height)! !\\\\n\\\\n!OBRadioButtonBar methodsFor: 'updating' stamp: 'cwp 2/24/2004 19:39'!\\\\nupdateSelection\\\\n\\\\t| oldSelection |\\\\n\\\\toldSelection _ selection.\\\\n\\\\tselection _ self getSelectionIndex.\\\\n\\\\tself withButtonAt: oldSelection do: [:button | button selectionChanged].\\\\n\\\\tself withSelectedButtonDo: [:button | button selectionChanged]! !\\\\n\\\\n!OBRadioButtonBar methodsFor: 'updating' stamp: 'cwp 2/25/2004 00:35'!\\\\nupdate: aSymbol\\\\n\\\\taSymbol = getListSelector ifTrue: [self updateList. ^ self].\\\\n\\\\taSymbol = getSelectionSelector ifTrue: [self updateSelection]! !\\\\n\\\\n!OBRadioButtonBar methodsFor: 'updating' stamp: 'cwp 2/24/2004 19:38'!\\\\nwithButtonAt: index do: aBlock\\\\n\\\\t^ (buttons at: index ifAbsent: [nil]) ifNotNilDo: aBlock! !\\\\n\\\\n!OBRadioButtonBar methodsFor: 'updating' stamp: 'cwp 2/24/2004 19:38'!\\\\nwithSelectedButtonDo: aBlock\\\\n\\\\t^ self withButtonAt: selection do: aBlock! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBRadioButtonBar class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBRadioButtonBar class methodsFor: 'as yet unclassified' stamp: 'cwp 2/22/2004 16:44'!\\\\non: aModel list: listSelector selected: selectionSelector changeSelected: changedSelector \\\\n\\\\t^ self new\\\\n\\\\t\\\\t\\\\ton: aModel\\\\n\\\\t\\\\t\\\\tlist: listSelector\\\\n\\\\t\\\\t\\\\tselected: selectionSelector\\\\n\\\\t\\\\t\\\\tchangeSelected: changedSelector! !\\\\nOBListBrowser subclass: #OBReferencesBrowser\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Browsers'!\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBReferencesBrowser class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBReferencesBrowser class methodsFor: 'as yet unclassified' stamp: 'avi 9/17/2005 01:22'!\\\\ndefaultMetaNode\\\\n\\\\t| class method |\\\\n\\\\tclass := OBMetaNode named: 'Class'.\\\\n\\\\tmethod := OBMetaNode named: 'References'.\\\\n\\\\t\\\\n\\\\tclass\\\\n\\\\t\\\\tchildAt: #users put: method;\\\\n\\\\t\\\\taddActor: OBNodeActor new.\\\\n\\\\tmethod\\\\n\\\\t\\\\tdisplaySelector: #fullName;\\\\n\\\\t\\\\taddActor: OBNodeActor new.\\\\n\\\\t\\\\t\\\\n\\\\t^ class! !\\\\n\\\\n!OBReferencesBrowser class methodsFor: 'as yet unclassified' stamp: 'avi 9/17/2005 01:34'!\\\\ntitle\\\\n\\\\t^ 'References to'! !\\\\nOBAnnouncement subclass: #OBRefreshRequired\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Announcements'!\\\\nObject subclass: #OBRequestor\\\\n\\\\tinstanceVariableNames: 'node browser'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Services'!\\\\n\\\\n!OBRequestor methodsFor: 'as yet unclassified' stamp: 'cwp 6/29/2006 00:12'!\\\\nannounce: anObject\\\\n\\\\t^ browser announcer announce: anObject! !\\\\n\\\\n!OBRequestor methodsFor: 'as yet unclassified' stamp: 'cwp 6/28/2006 00:41'!\\\\nbrowser: aBrowser\\\\n\\\\tbrowser _ aBrowser! !\\\\n\\\\n!OBRequestor methodsFor: 'as yet unclassified' stamp: 'cwp 6/28/2006 00:43'!\\\\ndoesNotUnderstand: aMessage\\\\n\\\\t^ aMessage sendTo: browser! !\\\\n\\\\n!OBRequestor methodsFor: 'as yet unclassified' stamp: 'cwp 6/28/2006 00:43'!\\\\nnode: aNode\\\\n\\\\tnode _ aNode! !\\\\n\\\\n!OBRequestor methodsFor: 'as yet unclassified' stamp: 'cwp 6/28/2006 00:38'!\\\\nrequestNode\\\\n\\\\t^ node! !\\\\n\\\\n!OBRequestor methodsFor: 'as yet unclassified' stamp: 'cwp 6/29/2006 00:12'!\\\\nselect: aNode\\\\n\\\\t(self announce: OBAboutToChange)\\\\n\\\\t\\\\tisVetoed ifFalse: [self announce: (OBSelectingNode node: aNode)]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBRequestor class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBRequestor class methodsFor: 'as yet unclassified' stamp: 'cwp 6/28/2006 00:40'!\\\\nfor: aBrowser\\\\n\\\\t^ self new browser: aBrowser! !\\\\nSlider subclass: #OBScrollBar\\\\n\\\\tinstanceVariableNames: 'upButton downButton pagingArea scrollDelta pageDelta interval menuSelector timeOfMouseDown timeOfLastScroll nextPageDirection currentScrollDelay'\\\\n\\\\tclassVariableNames: 'CachedImages UpArrow UpArrow8Bit'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Morphic'!\\\\n!OBScrollBar commentStamp: 'cwp 3/5/2004 12:01' prior: 0!\\\\nThis class is a relic. It was originally created to work around bugs in ScrollBar which prevented it from working correctly in horizontal orientation. At some point the bugs should be fixed, and ScrollBar should be used instead.!\\\\n\\\\n\\\\n!OBScrollBar methodsFor: 'access' stamp: 'cwp 11/23/2003 18:06'!\\\\ninterval: d\\\\n\\\\t\\\\\\\"Supply an optional floating fraction so slider can expand to indicate range\\\\\\\"\\\\n\\\\tinterval _ d min: 1.0.\\\\n\\\\tself expandSlider.\\\\n\\\\tself computeSlider.! !\\\\n\\\\n!OBScrollBar methodsFor: 'access' stamp: 'cwp 11/23/2003 18:06'!\\\\npagingArea\\\\n\\\\t^pagingArea! !\\\\n\\\\n!OBScrollBar methodsFor: 'access' stamp: 'md 2/24/2006 21:25'!\\\\nroundedScrollbarLook\\\\n\\\\t\\\\\\\"Rounded look currently only shows up in flop-out mode\\\\\\\"\\\\n\\\\t^false and: [self class alwaysShowFlatScrollbarForAlternativeLook not]\\\\n! !\\\\n\\\\n!OBScrollBar methodsFor: 'access' stamp: 'cwp 11/23/2003 18:06'!\\\\nscrollDelta\\\\n\\\\t^ scrollDelta! !\\\\n\\\\n!OBScrollBar methodsFor: 'access' stamp: 'cwp 11/23/2003 18:06'!\\\\nscrollDelta: d1 pageDelta: d2\\\\n\\\\t\\\\\\\"Supply optional increments for better scrolling of, eg, text\\\\\\\"\\\\n\\\\tscrollDelta _ d1.\\\\n\\\\tpageDelta _ d2.! !\\\\n\\\\n!OBScrollBar methodsFor: 'access' stamp: 'md 2/24/2006 16:26'!\\\\nsliderColor: aColor\\\\n\\\\t\\\\\\\"Change the color of the scrollbar to go with aColor.\\\\\\\"\\\\n\\\\t| buttonColor |\\\\n\\\\tsuper sliderColor: aColor.\\\\n\\\\tbuttonColor _ self thumbColor.\\\\n\\\\tupButton color: buttonColor.\\\\n\\\\tdownButton color: buttonColor.\\\\n\\\\tslider color: buttonColor.\\\\n\\\\tself roundedScrollbarLook\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[self color: Color transparent.\\\\n\\\\t\\\\t\\\\t\\\\tpagingArea color: aColor muchLighter.\\\\n\\\\t\\\\t\\\\t\\\\tself borderStyle style == #simple \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue:[self borderColor: aColor darker darker]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse:[self borderStyle baseColor: aColor]]\\\\n\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[pagingArea color: (aColor alphaMixed: 0.3 with: Color white).\\\\n\\\\t\\\\t\\\\t\\\\tself borderWidth: 0]\\\\n! !\\\\n\\\\n!OBScrollBar methodsFor: 'access' stamp: 'cwp 11/23/2003 18:06'!\\\\nsliderShadowColor\\\\n\\\\t^ self roundedScrollbarLook\\\\n\\\\t\\\\tifTrue: [self sliderColor darker]\\\\n\\\\t\\\\tifFalse: [super sliderShadowColor]\\\\n! !\\\\n\\\\n!OBScrollBar methodsFor: 'access' stamp: 'md 2/24/2006 16:27'!\\\\nthumbColor\\\\n\\\\t\\\\\\\"Problem: Part of the ScrollBar/Slider code uses 'slider' to mean the entire scrollbar/slider widget, and part of it uses 'slider' to mean only the draggable 'thumb'.  This should be cleaned up so that 'thumb' is used instead of 'slider' where appropriate.  For now, the meaning of thumbColor is clear, at least.\\\\\\\"\\\\n\\\\n\\\\t^self sliderColor alphaMixed: 0.7 with: (Color gray: 0.95).! !\\\\n\\\\n\\\\n!OBScrollBar methodsFor: 'accessing' stamp: 'md 2/24/2006 16:12'!\\\\nadoptPaneColor: aColor\\\\n\\\\t\\\\\\\"Adopt the given pane color\\\\\\\"\\\\n\\\\taColor ifNil:[^self].\\\\n\\\\tself sliderColor: aColor.! !\\\\n\\\\n!OBScrollBar methodsFor: 'accessing' stamp: 'cwp 11/23/2003 18:06'!\\\\ncachedImageAt: aKey ifAbsentPut: aBlock\\\\n\\\\n\\\\tCachedImages ifNil: [CachedImages _ Dictionary new].\\\\n\\\\t^CachedImages at: aKey ifAbsentPut: aBlock! !\\\\n\\\\n\\\\n!OBScrollBar methodsFor: 'geometry' stamp: 'cwp 11/23/2003 18:06'!\\\\nbuttonExtent\\\\n\\\\t^ bounds isWide\\\\n\\\\t\\\\tifTrue: [11 @ self innerBounds height]\\\\n\\\\t\\\\tifFalse: [self innerBounds width @ 11]! !\\\\n\\\\n!OBScrollBar methodsFor: 'geometry' stamp: 'cwp 11/23/2003 18:06'!\\\\nexpandSlider\\\\n\\\\t\\\\\\\"Compute the new size of the slider (use the old sliderThickness as a minimum).\\\\\\\"\\\\n\\\\t| r |\\\\n\\\\tr _ self totalSliderArea.\\\\n\\\\tslider extent: (bounds isWide\\\\n\\\\t\\\\tifTrue: [((r width * interval) asInteger max: self sliderThickness) @ slider height]\\\\n\\\\t\\\\tifFalse: [slider width @ ((r height * interval) asInteger max: self sliderThickness)])! !\\\\n\\\\n!OBScrollBar methodsFor: 'geometry' stamp: 'cwp 11/23/2003 18:06'!\\\\nextent: p\\\\n        p x > p y\\\\n                ifTrue: [super extent: (p max: 42@8)]\\\\n                ifFalse: [super extent: (p max: 8@42)]! !\\\\n\\\\n!OBScrollBar methodsFor: 'geometry' stamp: 'cwp 11/23/2003 18:06'!\\\\nsliderExtent\\\\n\\\\t\\\\\\\"The sliderExtent is now stored in the slider itself, not hardcoded as it is in the superclass.\\\\\\\"\\\\n\\\\t^slider extent! !\\\\n\\\\n!OBScrollBar methodsFor: 'geometry' stamp: 'cwp 11/23/2003 18:07'!\\\\nsliderThickness\\\\n\\\\t^ self roundedScrollbarLook ifTrue:[15] ifFalse:[super sliderThickness]! !\\\\n\\\\n!OBScrollBar methodsFor: 'geometry' stamp: 'cwp 11/23/2003 18:07'!\\\\ntotalSliderArea\\\\n\\\\t| upperBoundsButton |\\\\n\\\\tupperBoundsButton _ upButton.\\\\n\\\\tupButton bottom > upperBoundsButton bottom\\\\n\\\\t\\\\tifTrue: [upperBoundsButton _ upButton].\\\\n\\\\t^ bounds isWide\\\\n\\\\t\\\\tifTrue: [upperBoundsButton bounds topRight corner: downButton bounds bottomLeft]\\\\n\\\\t\\\\tifFalse: [upperBoundsButton bounds bottomLeft corner: downButton bounds topRight].\\\\n! !\\\\n\\\\n\\\\n!OBScrollBar methodsFor: 'initialization' stamp: 'cwp 11/23/2003 18:07'!\\\\ninitialize\\\\n\\\\tsuper initialize.\\\\n\\\\tscrollDelta _ 0.02.\\\\n\\\\tpageDelta _ 0.2.\\\\n\\\\tself roundedScrollbarLook ifTrue:[\\\\n\\\\t\\\\tself borderStyle: ((BorderStyle complexFramed width: 2) \\\\\\\"baseColor: Color gray\\\\\\\")].! !\\\\n\\\\n\\\\n!OBScrollBar methodsFor: 'initialize' stamp: 'cwp 11/23/2003 18:06'!\\\\ninitializeDownButton\\\\n\\\\tdownButton := RectangleMorph\\\\n\\\\t\\\\tnewBounds: (self innerBounds bottomRight - self buttonExtent extent: self buttonExtent)\\\\n\\\\t\\\\tcolor: self thumbColor.\\\\n\\\\tdownButton on: #mouseDown send: #scrollDownInit to: self.\\\\n\\\\tdownButton on: #mouseUp send: #finishedScrolling to: self.\\\\n\\\\tdownButton addMorphCentered: (ImageMorph new image: \\\\n\\\\t\\\\t(self \\\\n\\\\t\\\\t\\\\tcachedImageAt: (bounds isWide ifTrue: ['right'] ifFalse: ['down']) \\\\n\\\\t\\\\t\\\\tifAbsentPut: [\\\\n\\\\t\\\\t\\\\t\\\\tself upArrow8Bit\\\\n\\\\t\\\\t\\\\t\\\\t\\\\trotateBy: (bounds isWide ifTrue: [#right] ifFalse: [#pi])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcenterAt: 0@0\\\\n\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t)\\\\n\\\\t).\\\\n\\\\tself roundedScrollbarLook ifTrue:[\\\\n\\\\t\\\\tdownButton color: Color veryLightGray.\\\\n\\\\t\\\\tdownButton borderStyle: (BorderStyle complexRaised width: 3).\\\\n\\\\t] ifFalse:[\\\\n\\\\t\\\\tdownButton setBorderWidth: 1 borderColor: #raised.\\\\n\\\\t].\\\\n\\\\tself addMorph: downButton.\\\\n! !\\\\n\\\\n!OBScrollBar methodsFor: 'initialize' stamp: 'cwp 11/23/2003 18:06'!\\\\ninitializeEmbedded: aBool\\\\n\\\\t\\\\\\\"aBool == true => inboard scrollbar\\\\n\\\\taBool == false => flop-out scrollbar\\\\\\\"\\\\n\\\\tself roundedScrollbarLook ifFalse:[^self].\\\\n\\\\taBool ifTrue:[\\\\n\\\\t\\\\tself borderStyle: (BorderStyle inset width: 2).\\\\n\\\\t\\\\tself cornerStyle: #square.\\\\n\\\\t] ifFalse:[\\\\n\\\\t\\\\tself borderStyle: (BorderStyle width: 1 color: Color black).\\\\n\\\\t\\\\tself cornerStyle: #rounded.\\\\n\\\\t].\\\\n\\\\tself removeAllMorphs.\\\\n\\\\tself initializeSlider.! !\\\\n\\\\n!OBScrollBar methodsFor: 'initialize' stamp: 'cwp 11/23/2003 18:06'!\\\\ninitializePagingArea\\\\n\\\\tpagingArea := RectangleMorph newBounds: self totalSliderArea\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcolor: (Color r: 0.6 g: 0.6 b: 0.8).\\\\n\\\\tpagingArea borderWidth: 0.\\\\n\\\\tpagingArea on: #mouseDown send: #scrollPageInit: to: self.\\\\n\\\\tpagingArea on: #mouseUp send: #finishedScrolling to: self.\\\\n\\\\tself addMorph: pagingArea.\\\\n\\\\tself roundedScrollbarLook \\\\n\\\\t\\\\tifTrue:[pagingArea color: (Color gray: 0.9)].! !\\\\n\\\\n!OBScrollBar methodsFor: 'initialize' stamp: 'cwp 11/23/2003 18:06'!\\\\ninitializeSlider\\\\n\\\\tself roundedScrollbarLook ifTrue:[\\\\n\\\\t\\\\tself \\\\n\\\\t\\\\t\\\\tinitializeUpButton;\\\\n\\\\t\\\\t\\\\tinitializeDownButton;\\\\n\\\\t\\\\t\\\\tinitializePagingArea.\\\\n\\\\t] ifFalse:[\\\\n\\\\t\\\\tself initializeUpButton; \\\\n\\\\t\\\\t\\\\tinitializeDownButton; \\\\n\\\\t\\\\t\\\\tinitializePagingArea.\\\\n\\\\t].\\\\n\\\\tsuper initializeSlider.\\\\n\\\\tself roundedScrollbarLook ifTrue:[\\\\n\\\\t\\\\tslider cornerStyle: #rounded.\\\\n\\\\t\\\\tslider borderStyle: (BorderStyle complexRaised width: 3).\\\\n\\\\t\\\\tsliderShadow cornerStyle: #rounded.\\\\n\\\\t].\\\\n\\\\tself sliderColor: self sliderColor.! !\\\\n\\\\n!OBScrollBar methodsFor: 'initialize' stamp: 'cwp 11/23/2003 18:06'!\\\\ninitializeUpButton\\\\n\\\\tupButton := self roundedScrollbarLook \\\\n\\\\t\\\\t\\\\t\\\\tifTrue:  \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[RectangleMorph \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnewBounds: (self innerBounds topLeft extent: self buttonExtent)]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[RectangleMorph \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnewBounds: ((self innerBounds topLeft) extent: self buttonExtent)].\\\\n\\\\tupButton color: self thumbColor.\\\\n\\\\tupButton \\\\n\\\\t\\\\ton: #mouseDown\\\\n\\\\t\\\\tsend: #scrollUpInit\\\\n\\\\t\\\\tto: self.\\\\n\\\\tupButton \\\\n\\\\t\\\\ton: #mouseUp\\\\n\\\\t\\\\tsend: #finishedScrolling\\\\n\\\\t\\\\tto: self.\\\\n\\\\tupButton \\\\n\\\\t\\\\taddMorphCentered: (ImageMorph new image: (self \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcachedImageAt: (bounds isWide ifTrue: ['left'] ifFalse: ['up'])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifAbsentPut: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[bounds isWide \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self upArrow8Bit rotateBy: #left centerAt: 0 @ 0]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [self upArrow8Bit]])).\\\\n\\\\tself roundedScrollbarLook \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[upButton color: Color veryLightGray.\\\\n\\\\t\\\\t\\\\tupButton borderStyle: (BorderStyle complexRaised width: 3)]\\\\n\\\\t\\\\tifFalse: [upButton setBorderWidth: 1 borderColor: #raised].\\\\n\\\\tself addMorph: upButton! !\\\\n\\\\n!OBScrollBar methodsFor: 'initialize' stamp: 'cwp 11/23/2003 18:06'!\\\\nupArrow8Bit\\\\n\\\\n\\\\t\\\\\\\"convert to 8-bit and convert white to transparent to avoid gratuitous conversion every time we put one in an ImageMorph\\\\\\\"\\\\n\\\\n\\\\t^UpArrow8Bit ifNil: [\\\\n\\\\t\\\\tUpArrow8Bit _ (ColorForm mappingWhiteToTransparentFrom: UpArrow) asFormOfDepth: 8\\\\n\\\\t]! !\\\\n\\\\n\\\\n!OBScrollBar methodsFor: 'model access' stamp: 'cwp 11/23/2003 18:06'!\\\\nsetValue: newValue\\\\n\\\\t\\\\\\\"Using roundTo: instead of truncateTo: ensures that scrollUp will scroll the same distance as scrollDown.\\\\\\\"\\\\n\\\\t^ super setValue: (newValue roundTo: scrollDelta)! !\\\\n\\\\n\\\\n!OBScrollBar methodsFor: 'other events' stamp: 'cwp 11/23/2003 18:06'!\\\\nmenuButtonMouseDown: event\\\\n\\\\tevent hand showTemporaryCursor: nil.\\\\n\\\\tself use: menuSelector orMakeModelSelectorFor: 'MenuButtonPressed:'\\\\n\\\\t\\\\tin: [:sel | menuSelector _ sel.  model perform: sel with: event]! !\\\\n\\\\n!OBScrollBar methodsFor: 'other events' stamp: 'cwp 11/23/2003 18:06'!\\\\nmouseDownInSlider: event\\\\n\\\\tinterval = 1.0 ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"make the entire scrollable area visible if a full scrollbar is clicked on\\\\\\\"\\\\n\\\\t\\\\tself setValue: 0.\\\\n\\\\t\\\\tself model hideOrShowScrollBar].\\\\n\\\\tsuper mouseDownInSlider: event! !\\\\n\\\\n\\\\n!OBScrollBar methodsFor: 'scroll timing' stamp: 'cwp 11/23/2003 18:07'!\\\\nresetTimer\\\\n\\\\ttimeOfMouseDown _ Time millisecondClockValue.\\\\n\\\\ttimeOfLastScroll _ timeOfMouseDown - 1000 max: 0.\\\\n\\\\tnextPageDirection _ nil.\\\\n\\\\tcurrentScrollDelay _ nil! !\\\\n\\\\n!OBScrollBar methodsFor: 'scroll timing' stamp: 'cwp 11/23/2003 18:07'!\\\\nwaitForDelay1: delay1 delay2: delay2 \\\\n\\\\t\\\\\\\"Return true if an appropriate delay has passed since the last scroll operation.\\\\n\\\\tThe delay decreases exponentially from delay1 to delay2.\\\\\\\"\\\\n\\\\n\\\\t| now scrollDelay |\\\\n\\\\ttimeOfLastScroll isNil ifTrue: [self resetTimer].\\\\t\\\\\\\"Only needed for old instances\\\\\\\"\\\\n\\\\tnow := Time millisecondClockValue.\\\\n\\\\t(scrollDelay := currentScrollDelay) isNil \\\\n\\\\t\\\\tifTrue: [scrollDelay := delay1\\\\t\\\\\\\"initial delay\\\\\\\"].\\\\n\\\\tcurrentScrollDelay := scrollDelay * 9 // 10 max: delay2.\\\\t\\\\\\\"decrease the delay\\\\\\\"\\\\n\\\\ttimeOfLastScroll := now.\\\\n\\\\t^true! !\\\\n\\\\n\\\\n!OBScrollBar methodsFor: 'scrolling' stamp: 'cwp 11/23/2003 18:06'!\\\\ndoScrollByPage\\\\n\\\\t\\\\\\\"Scroll automatically while mouse is down\\\\\\\"\\\\n\\\\t(self waitForDelay1: 300 delay2: 100) ifFalse: [^ self].\\\\n\\\\tnextPageDirection\\\\n\\\\t\\\\tifTrue: [self setValue: (value + pageDelta min: 1.0)]\\\\n\\\\t\\\\tifFalse: [self setValue: (value - pageDelta max: 0.0)]\\\\n! !\\\\n\\\\n!OBScrollBar methodsFor: 'scrolling' stamp: 'cwp 11/23/2003 18:06'!\\\\ndoScrollDown\\\\n\\\\t\\\\\\\"Scroll automatically while mouse is down\\\\\\\"\\\\n\\\\t(self waitForDelay1: 200 delay2: 40) ifFalse: [^ self].\\\\n\\\\tself setValue: (value + scrollDelta + 0.000001 min: 1.0)! !\\\\n\\\\n!OBScrollBar methodsFor: 'scrolling' stamp: 'cwp 11/23/2003 18:06'!\\\\ndoScrollUp\\\\n\\\\t\\\\\\\"Scroll automatically while mouse is down\\\\\\\"\\\\n\\\\t(self waitForDelay1: 200 delay2: 40) ifFalse: [^ self].\\\\n\\\\tself setValue: (value - scrollDelta - 0.000001 max: 0.0)! !\\\\n\\\\n!OBScrollBar methodsFor: 'scrolling' stamp: 'cwp 11/23/2003 18:06'!\\\\nfinishedScrolling\\\\n\\\\tself stopStepping.\\\\n\\\\tself scrollBarAction: nil.\\\\n\\\\tself roundedScrollbarLook ifTrue:[\\\\n\\\\t\\\\tupButton borderStyle: (BorderStyle complexRaised width: upButton borderWidth).\\\\n\\\\t\\\\tdownButton borderStyle: (BorderStyle complexRaised width: downButton borderWidth).\\\\n\\\\t] ifFalse:[\\\\n\\\\t\\\\tdownButton borderRaised.\\\\n\\\\t\\\\tupButton borderRaised.\\\\n\\\\t].\\\\n\\\\n! !\\\\n\\\\n!OBScrollBar methodsFor: 'scrolling' stamp: 'cwp 11/23/2003 18:06'!\\\\nscrollBarAction\\\\n\\\\t^self valueOfProperty: #scrollBarAction! !\\\\n\\\\n!OBScrollBar methodsFor: 'scrolling' stamp: 'cwp 11/23/2003 18:06'!\\\\nscrollBarAction: aSymbol\\\\n\\\\tself setProperty: #scrollBarAction toValue: aSymbol! !\\\\n\\\\n!OBScrollBar methodsFor: 'scrolling' stamp: 'cwp 11/23/2003 18:06'!\\\\nscrollDown\\\\n\\\\tself flag: #obsolete.\\\\n\\\\tdownButton eventHandler: nil.\\\\n\\\\tdownButton on: #mouseDown send: #scrollDownInit to: self.\\\\n\\\\tdownButton on: #mouseUp send: #finishedScrolling to: self.\\\\n\\\\t^self scrollDownInit! !\\\\n\\\\n!OBScrollBar methodsFor: 'scrolling' stamp: 'cwp 11/23/2003 18:06'!\\\\nscrollDownInit\\\\n\\\\tdownButton borderInset.\\\\n\\\\tself resetTimer.\\\\n\\\\tself scrollBarAction: #doScrollDown.\\\\n\\\\tself startStepping.! !\\\\n\\\\n!OBScrollBar methodsFor: 'scrolling' stamp: 'cwp 11/23/2003 18:06'!\\\\nscrollDown: count\\\\n\\\\tself setValue: (value + (scrollDelta * count) + 0.000001 min: 1.0)! !\\\\n\\\\n!OBScrollBar methodsFor: 'scrolling' stamp: 'cwp 11/23/2003 18:06'!\\\\nscrollPageInit: evt\\\\n\\\\tself resetTimer.\\\\n\\\\tself setNextDirectionFromEvent: evt.\\\\n\\\\tself scrollBarAction: #doScrollByPage.\\\\n\\\\tself startStepping.! !\\\\n\\\\n!OBScrollBar methodsFor: 'scrolling' stamp: 'cwp 11/23/2003 18:06'!\\\\nscrollUp\\\\n\\\\tself flag: #obsolete.\\\\n\\\\tupButton eventHandler: nil.\\\\n\\\\tupButton on: #mouseDown send: #scrollUpInit to: self.\\\\n\\\\tupButton on: #mouseUp send: #finishedScrolling to: self.\\\\n\\\\t^self scrollUpInit! !\\\\n\\\\n!OBScrollBar methodsFor: 'scrolling' stamp: 'cwp 11/23/2003 18:06'!\\\\nscrollUpInit\\\\n\\\\tupButton borderInset.\\\\n\\\\tself resetTimer.\\\\n\\\\tself scrollBarAction: #doScrollUp.\\\\n\\\\tself startStepping.! !\\\\n\\\\n!OBScrollBar methodsFor: 'scrolling' stamp: 'cwp 11/23/2003 18:06'!\\\\nscrollUp: count\\\\n\\\\tself setValue: (value - (scrollDelta * count) - 0.000001 max: 0.0)! !\\\\n\\\\n!OBScrollBar methodsFor: 'scrolling' stamp: 'cwp 11/23/2003 18:06'!\\\\nsetNextDirectionFromEvent: event\\\\n\\\\n\\\\tnextPageDirection _ bounds isWide ifTrue: [\\\\n\\\\t\\\\tevent cursorPoint x >= slider center x\\\\n\\\\t]\\\\n\\\\tifFalse: [\\\\n\\\\t\\\\tevent cursorPoint y >= slider center y\\\\n\\\\t]\\\\n\\\\n! !\\\\n\\\\n\\\\n!OBScrollBar methodsFor: 'stepping and presenter' stamp: 'cwp 11/23/2003 18:07'!\\\\nstep\\\\n\\\\t| action |\\\\n\\\\taction _ self scrollBarAction.\\\\n\\\\taction ifNotNil:[self perform: action].! !\\\\n\\\\n\\\\n!OBScrollBar methodsFor: 'testing' stamp: 'cwp 11/23/2003 18:06'!\\\\nstepTime\\\\n\\\\t^ currentScrollDelay ifNil: [300]! !\\\\n\\\\n!OBScrollBar methodsFor: 'testing' stamp: 'cwp 11/23/2003 18:06'!\\\\nwantsSteps\\\\n\\\\t^self scrollBarAction notNil! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBScrollBar class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBScrollBar class methodsFor: 'as yet unclassified' stamp: 'cwp 11/23/2003 18:07'!\\\\nalwaysShowFlatScrollbarForAlternativeLook\\\\n\\\\t\\\\\\\"Set this value to true, if you want to see the flat scrollbar look in flop-out mode as well as inboard.  Otherwise the flop-out scrollbar will be rounded and inboard will be flat.\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!OBScrollBar class methodsFor: 'class initialization' stamp: 'cwp 11/23/2003 18:07'!\\\\ninitialize \\\\\\\"ScrollBar initialize\\\\\\\"\\\\n\\\\n\\\\tUpArrow _ Form\\\\n\\\\t\\\\textent: 6@3\\\\n\\\\t\\\\tfromArray: #(2r11e28 2r1111e27 2r111111e26)\\\\n\\\\t\\\\toffset: 0@0.! !\\\\nOBAnnouncement subclass: #OBSelectingNode\\\\n\\\\tinstanceVariableNames: 'node'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Announcements'!\\\\n\\\\n!OBSelectingNode methodsFor: 'as yet unclassified' stamp: 'cwp 6/4/2006 13:58'!\\\\nnode\\\\n\\\\t^ node! !\\\\n\\\\n!OBSelectingNode methodsFor: 'as yet unclassified' stamp: 'cwp 6/4/2006 13:58'!\\\\nnode: aNode\\\\n\\\\tnode _ aNode! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBSelectingNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBSelectingNode class methodsFor: 'as yet unclassified' stamp: 'cwp 6/4/2006 13:58'!\\\\nnode: aNode\\\\n\\\\t^ self new node: aNode! !\\\\nOBAnnouncement subclass: #OBSelectionChanged\\\\n\\\\tinstanceVariableNames: 'node column'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Announcements'!\\\\n\\\\n!OBSelectionChanged methodsFor: 'accessing' stamp: 'cwp 4/19/2006 00:53'!\\\\ncolumn\\\\n\\\\t^ column! !\\\\n\\\\n!OBSelectionChanged methodsFor: 'accessing' stamp: 'cwp 4/19/2006 00:52'!\\\\ncolumn: aColumn\\\\n\\\\tcolumn _ aColumn! !\\\\n\\\\n!OBSelectionChanged methodsFor: 'accessing' stamp: 'cwp 6/4/2006 12:19'!\\\\nnode\\\\n\\\\t^ column \\\\n\\\\t\\\\tifNil: [node]\\\\n\\\\t\\\\tifNotNil: [column selectedNode]! !\\\\n\\\\n!OBSelectionChanged methodsFor: 'accessing' stamp: 'cwp 6/4/2006 12:20'!\\\\nnode: aNode\\\\n\\\\tnode _ aNode! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBSelectionChanged class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBSelectionChanged class methodsFor: 'instance creation' stamp: 'cwp 4/19/2006 00:51'!\\\\ncolumn: aColumn \\\\n\\\\t^ self new column: aColumn! !\\\\n\\\\n\\\\n!OBSelectionChanged class methodsFor: 'as yet unclassified' stamp: 'cwp 4/19/2006 00:31'!\\\\nnode: aNode\\\\n\\\\t^ self new node: aNode! !\\\\nOBCodeNode subclass: #OBSelectorNode\\\\n\\\\tinstanceVariableNames: 'selector'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBSelectorNode commentStamp: 'cwp 1/8/2005 13:03' prior: 0!\\\\nOBSelectorNode wraps an instance of Symbol. It typically serves as the root of a senders or implementors OBListBrowser, and is used when cmd-n or cmd-m is invoke from the definition panel, and so no OBMethodNode is available.!\\\\n\\\\n\\\\n!OBSelectorNode methodsFor: 'navigating' stamp: 'cwp 12/8/2004 23:48'!\\\\nimplementors\\\\n\\\\t^ (SystemNavigation default allImplementorsOf: self selector) asSortedArray\\\\n\\\\t\\\\t\\\\tcollect: [:ref | OBMethodNode on: ref]! !\\\\n\\\\n!OBSelectorNode methodsFor: 'navigating' stamp: 'cwp 1/7/2005 22:35'!\\\\nimplementorsHierarchically\\\\n\\\\t^ OBClassAwareNode sortHierarchically: self implementors! !\\\\n\\\\n!OBSelectorNode methodsFor: 'navigating' stamp: 'cwp 10/31/2004 01:12'!\\\\nname\\\\n\\\\t^ selector printString! !\\\\n\\\\n!OBSelectorNode methodsFor: 'navigating' stamp: 'cwp 10/31/2004 01:12'!\\\\nselectorAndMessages\\\\n\\\\t^ Array with: self! !\\\\n\\\\n!OBSelectorNode methodsFor: 'navigating' stamp: 'cwp 11/1/2004 02:22'!\\\\nsenders\\\\n\\\\t^ (SystemNavigation default allCallsOn: self selector) asSortedArray\\\\n\\\\t\\\\t\\\\tcollect: [:ref | OBMessageNode on: self selector inMethodReference: ref]! !\\\\n\\\\n!OBSelectorNode methodsFor: 'navigating' stamp: 'cwp 10/31/2004 01:48'!\\\\nsendersOfMessage\\\\n\\\\t^ (SystemNavigation default allCallsOn: self selector) asSortedArray\\\\n\\\\t\\\\t\\\\tcollect: [:ref | OBMessageNode on: self selector inMethodReference: ref]! !\\\\n\\\\n\\\\n!OBSelectorNode methodsFor: 'accessing' stamp: 'cwp 10/31/2004 01:11'!\\\\nselector\\\\n\\\\t^ selector! !\\\\n\\\\n!OBSelectorNode methodsFor: 'accessing' stamp: 'cwp 10/31/2004 01:10'!\\\\nselector: aSelector\\\\n\\\\tselector := aSelector! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBSelectorNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBSelectorNode class methodsFor: 'instance creation' stamp: 'cwp 10/31/2004 01:11'!\\\\non: aSelector\\\\n\\\\t^ self new selector: aSelector! !\\\\nOBListBrowser subclass: #OBSendersBrowser\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Browsers'!\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBSendersBrowser class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBSendersBrowser class methodsFor: 'as yet unclassified' stamp: 'cwp 3/2/2006 15:31'!\\\\ndefaultMetaNode\\\\n\\\\t| selector list chase |\\\\n\\\\tlist := OBMetaNode named: 'Senders'.\\\\n\\\\tlist \\\\n\\\\t\\\\tdisplaySelector: #fullName;\\\\n\\\\t\\\\taddActor: OBNodeActor new.\\\\n\\\\n\\\\tchase := OBMetaNode named: 'Send'.\\\\n\\\\tchase\\\\n\\\\t\\\\tdisplaySelector: #fullName;\\\\n\\\\t\\\\tchildAt: #senders put: chase;\\\\n\\\\t\\\\taddActor: OBNodeActor new.\\\\n\\\\n\\\\tselector := OBMetaNode named: 'Selector'.\\\\t\\\\n\\\\tselector \\\\n\\\\t\\\\tchildAt: #senders labeled: 'list' put: list;\\\\n\\\\t\\\\tchildAt: #senders labeled: 'chase' put: chase;\\\\n\\\\t\\\\tfilterClass: OBModalFilter.\\\\n\\\\n\\\\t^ selector! !\\\\n\\\\n!OBSendersBrowser class methodsFor: 'as yet unclassified' stamp: 'avi 9/17/2005 01:36'!\\\\ntitle\\\\n\\\\t^ 'Senders of'! !\\\\nObject subclass: #OBService\\\\n\\\\tinstanceVariableNames: 'action condition announcer label keystroke icon buttonLabel'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Services'!\\\\n\\\\n!OBService methodsFor: 'accessing' stamp: 'cwp 6/18/2006 18:53'!\\\\naction\\\\n\\\\t^ action! !\\\\n\\\\n!OBService methodsFor: 'accessing' stamp: 'cwp 6/18/2006 18:53'!\\\\naction: aValuable\\\\n\\\\taction _ aValuable! !\\\\n\\\\n!OBService methodsFor: 'accessing' stamp: 'cwp 6/24/2006 15:34'!\\\\nannouncer\\\\n\\\\t^ announcer! !\\\\n\\\\n!OBService methodsFor: 'accessing' stamp: 'cwp 6/24/2006 15:33'!\\\\nannouncer: anAnnouncer\\\\n\\\\tannouncer _ anAnnouncer! !\\\\n\\\\n!OBService methodsFor: 'accessing' stamp: 'cwp 6/24/2006 19:38'!\\\\nbuttonLabel\\\\n\\\\t^ buttonLabel! !\\\\n\\\\n!OBService methodsFor: 'accessing' stamp: 'cwp 6/24/2006 19:39'!\\\\nbuttonLabel: aString\\\\n\\\\tbuttonLabel _ aString! !\\\\n\\\\n!OBService methodsFor: 'accessing' stamp: 'cwp 6/24/2006 15:40'!\\\\ncondition\\\\n\\\\t^ condition! !\\\\n\\\\n!OBService methodsFor: 'accessing' stamp: 'cwp 6/24/2006 15:40'!\\\\ncondition: aValuable\\\\n\\\\tcondition _ aValuable! !\\\\n\\\\n!OBService methodsFor: 'accessing' stamp: 'cwp 6/25/2006 00:41'!\\\\ndescription\\\\n\\\\t^ 'description'! !\\\\n\\\\n!OBService methodsFor: 'accessing' stamp: 'cwp 6/24/2006 19:24'!\\\\nicon\\\\n\\\\t^ icon! !\\\\n\\\\n!OBService methodsFor: 'accessing' stamp: 'cwp 6/24/2006 19:24'!\\\\nicon: anIcon\\\\n\\\\ticon _ anIcon! !\\\\n\\\\n!OBService methodsFor: 'accessing' stamp: 'cwp 6/24/2006 19:04'!\\\\nkeystroke\\\\n\\\\t^ keystroke! !\\\\n\\\\n!OBService methodsFor: 'accessing' stamp: 'cwp 6/24/2006 19:04'!\\\\nkeystroke: aCharacter\\\\n\\\\tkeystroke _ aCharacter! !\\\\n\\\\n!OBService methodsFor: 'accessing' stamp: 'cwp 6/24/2006 19:04'!\\\\nlabel\\\\n\\\\t^ label! !\\\\n\\\\n!OBService methodsFor: 'accessing' stamp: 'cwp 6/24/2006 18:58'!\\\\nlabel: aString\\\\n\\\\tlabel _ aString! !\\\\n\\\\n\\\\n!OBService methodsFor: 'morphic' stamp: 'cwp 6/24/2006 18:46'!\\\\naddServiceFor: aRequestor toMenu: aMenu\\\\n\\\\taMenu\\\\n\\\\t\\\\tadd: self labelWithKeystroke\\\\n\\\\t\\\\ttarget: self \\\\n\\\\t\\\\tselector: #executeFor:\\\\n\\\\t\\\\targument: aRequestor.\\\\n\\\\taMenu lastItem isEnabled: self isEnabled.\\\\n\\\\tPreferences menuWithIcons & self icon notNil\\\\n\\\\t\\\\tifTrue: [aMenu lastItem icon: self icon].\\\\n\\\\taMenu addBlankIconsIfNecessary: MenuIcons blankIcon.! !\\\\n\\\\n!OBService methodsFor: 'morphic' stamp: 'cwp 6/24/2006 19:41'!\\\\nbuttonLabelMorph\\\\n\\\\t^ StringMorph \\\\n\\\\t\\\\tcontents: self buttonLabel \\\\n\\\\t\\\\tfont: Preferences standardButtonFont! !\\\\n\\\\n!OBService methodsFor: 'morphic' stamp: 'cwp 6/24/2006 19:41'!\\\\nbuttonMorph\\\\n\\\\t^ (PluggableButtonMorph\\\\n\\\\t\\\\ton: self\\\\n\\\\t\\\\tgetState: nil\\\\n\\\\t\\\\taction: #trigger\\\\n\\\\t\\\\tlabel: #buttonLabelMorph)\\\\t\\\\n\\\\t\\\\t\\\\tonColor: Color lightGray lighter offColor: Color lightGray twiceLighter;\\\\n\\\\t\\\\t\\\\tborderWidth: 2;\\\\n\\\\t\\\\t\\\\tborderRaised;\\\\n\\\\t\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\t\\\\tvResizing: #spaceFill;\\\\n\\\\t\\\\t\\\\tsetBalloonText: label! !\\\\n\\\\n!OBService methodsFor: 'morphic' stamp: 'cwp 6/24/2006 19:05'!\\\\nlabelWithKeystroke\\\\n\\\\t^keystroke\\\\n\\\\t\\\\tifNil: [label]\\\\n\\\\t\\\\tifNotNil: [label, ' (', keystroke asString, ')']! !\\\\n\\\\n\\\\n!OBService methodsFor: 'execute' stamp: 'cwp 6/29/2006 01:12'!\\\\ncondExecuteFor: aRequestor\\\\n\\\\t^ (self isEnabledFor: aRequestor)\\\\n\\\\t\\\\t ifTrue: [self executeFor: aRequestor]! !\\\\n\\\\n!OBService methodsFor: 'execute' stamp: 'cwp 6/24/2006 18:15'!\\\\nexecute\\\\n\\\\t^ self executeFor: nil! !\\\\n\\\\n!OBService methodsFor: 'execute' stamp: 'cwp 6/24/2006 18:13'!\\\\nexecuteFor: aRequestor\\\\n\\\\taction valueWithPossibleArgs: {aRequestor}! !\\\\n\\\\n!OBService methodsFor: 'execute' stamp: 'cwp 6/24/2006 15:42'!\\\\ntrigger\\\\n\\\\t^ self isEnabled ifTrue: [self execute]! !\\\\n\\\\n\\\\n!OBService methodsFor: 'initialize-release' stamp: 'cwp 6/24/2006 19:05'!\\\\ninitialize\\\\n\\\\taction _ [].\\\\n\\\\tcondition _ [true].\\\\n\\\\tlabel _ 'a service'.! !\\\\n\\\\n\\\\n!OBService methodsFor: 'testing' stamp: 'cwp 6/29/2006 01:11'!\\\\nisEnabled\\\\n\\\\t^ self isEnabledFor: nil! !\\\\n\\\\n!OBService methodsFor: 'testing' stamp: 'cwp 6/29/2006 01:07'!\\\\nisEnabledFor: aRequestor\\\\n\\\\t^ condition valueWithPossibleArgs: {aRequestor}! !\\\\n\\\\n!OBService methodsFor: 'testing' stamp: 'cwp 6/25/2006 00:43'!\\\\nuseLineAfter\\\\n\\\\t^ false! !\\\\n\\\\n!OBService methodsFor: 'testing' stamp: 'cwp 6/24/2006 19:46'!\\\\nwantsButton\\\\n\\\\t^ self buttonLabel notNil! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBService class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBService class methodsFor: 'as yet unclassified' stamp: 'cwp 6/18/2006 18:53'!\\\\naction: aValuable\\\\n\\\\t^ self new action: aValuable! !\\\\n\\\\n!OBService class methodsFor: 'as yet unclassified' stamp: 'cwp 6/24/2006 15:40'!\\\\naction: aValuable condition: cValuable\\\\n\\\\t^ self new \\\\n\\\\t\\\\taction: aValuable;\\\\n\\\\t\\\\tcondition: cValuable;\\\\n\\\\t\\\\tyourself! !\\\\n\\\\n!OBService class methodsFor: 'as yet unclassified' stamp: 'cwp 6/24/2006 15:43'!\\\\nnew\\\\n\\\\t^ self basicNew initialize! !\\\\nOBAnnouncement subclass: #OBServiceScan\\\\n\\\\tinstanceVariableNames: 'services'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Announcements'!\\\\n\\\\n!OBServiceScan methodsFor: 'as yet unclassified' stamp: 'cwp 6/25/2006 00:31'!\\\\naddService: aService\\\\n\\\\tservices add: aService! !\\\\n\\\\n!OBServiceScan methodsFor: 'as yet unclassified' stamp: 'cwp 6/25/2006 00:31'!\\\\ninitialize\\\\n\\\\tservices _ OrderedCollection new! !\\\\n\\\\n!OBServiceScan methodsFor: 'as yet unclassified' stamp: 'cwp 6/25/2006 00:30'!\\\\nservices\\\\n\\\\t^ services! !\\\\nNotification subclass: #OBSourceFilesRequest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Utilities'!\\\\n!OBSourceFilesRequest commentStamp: 'cwp 1/8/2005 13:09' prior: 0!\\\\nOBSourceFilesRequest is used to work around the fact that Squeak's source files are stored in a global array called SourceFiles. When testing OBMethodVersion and OBVersionBrowser, we don't want to use the real source files, as they are too unpredictable. Instead the test cases supply a source file array with known contents.\\\\n\\\\nTherefore, OBMethodVersion never refers directly to the SourceFiles global. Instead it raises an OBSourceFiles request. If this occurs during a test, the test catches the notification and resumes using the test source files. Otherwise, the default action resumes using the global source file array.!\\\\n\\\\n\\\\n!OBSourceFilesRequest methodsFor: 'exceptionDescription'!\\\\ndefaultAction\\\\n\\\\t^ SourceFiles! !\\\\n\\\\n!OBSourceFilesRequest methodsFor: 'exceptionDescription' stamp: 'cwp 11/27/2004 22:49'!\\\\nisBrowseRequest\\\\n\\\\t^ false! !\\\\nOBCodeBrowser subclass: #OBSystemBrowser\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Browsers'!\\\\n!OBSystemBrowser commentStamp: 'cwp 1/7/2005 23:56' prior: 0!\\\\nThis is the basic system browser that is the work-horse of Smalltalk development tools. It presents four panes showing class categories, classes, method categories and methods.!\\\\n\\\\n\\\\n!OBSystemBrowser methodsFor: 'morphic' stamp: 'avi 11/29/2004 21:52'!\\\\ndefaultBackgroundColor\\\\n\\\\t^ Color lightGreen\\\\n\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBSystemBrowser class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBSystemBrowser class methodsFor: 'configuration' stamp: 'avi 9/17/2005 01:13'!\\\\nalphabeticalMetaNode\\\\n\\\\t^ self\\\\n\\\\t\\\\timageClass: #classes\\\\n\\\\t\\\\tcomment: #comments\\\\n\\\\t\\\\tmetaclass: #metaclasses\\\\n! !\\\\n\\\\n!OBSystemBrowser class methodsFor: 'configuration' stamp: 'avi 9/17/2005 01:54'!\\\\ndefaultMetaNode\\\\n\\\\t^self hierarchicalMetaNode! !\\\\n\\\\n!OBSystemBrowser class methodsFor: 'configuration' stamp: 'cwp 12/6/2004 22:02'!\\\\ndefaultRootNode\\\\n\\\\t^ OBEnvironmentNode forImage! !\\\\n\\\\n!OBSystemBrowser class methodsFor: 'configuration' stamp: 'avi 9/17/2005 01:54'!\\\\nhierarchicalMetaNode\\\\n\\\\t^self \\\\n\\\\t\\\\timageClass: #classesHierarchically\\\\n\\\\t\\\\tcomment: #commentsHierarchically\\\\n\\\\t\\\\tmetaclass: #metaclassesHierarchically! !\\\\n\\\\n!OBSystemBrowser class methodsFor: 'configuration' stamp: 'avi 9/17/2005 01:09'!\\\\nimageClass: classSel comment: commentSel metaclass: metaclassSel \\\\n\\\\t| env classCategory |\\\\n\\\\tenv := OBMetaNode named: 'Environment'.\\\\n\\\\tclassCategory := OBMetaNode named: 'ClassCategory'.\\\\n\\\\tenv childAt: #categories put: classCategory.\\\\n\\\\tself addTo: classCategory class: classSel comment: commentSel metaclass: metaclassSel.\\\\n\\\\t^env! !\\\\n\\\\n!OBSystemBrowser class methodsFor: 'configuration'!\\\\ntitle\\\\n\\\\t^ 'System Browser'! !\\\\n\\\\n\\\\n!OBSystemBrowser class methodsFor: 'initializing'!\\\\ninitialize\\\\n\\\\tself registerInOpenMenu! !\\\\n\\\\n!OBSystemBrowser class methodsFor: 'initializing'!\\\\nregisterInOpenMenu\\\\n\\\\tTheWorldMenu registerOpenCommand: {'Image Browser'. {self. #open}}.\\\\n! !\\\\n\\\\n\\\\n!OBSystemBrowser class methodsFor: 'instance creation' stamp: 'dvf 8/31/2005 13:17'!\\\\nonClass: aClass \\\\n\\\\t^self selection: aClass asNode! !\\\\n\\\\n!OBSystemBrowser class methodsFor: 'instance creation' stamp: 'cwp 12/15/2004 21:42'!\\\\nonClass: aClass category: aSymbol\\\\n\\\\t^ self selection: (OBMethodCategoryNode on: aSymbol inClass: aClass)! !\\\\n\\\\n!OBSystemBrowser class methodsFor: 'instance creation' stamp: 'cwp 12/5/2004 17:38'!\\\\nonClass: aClass selector: aSelector\\\\n\\\\t^ self selection: (OBMethodNode on: aSelector inClass: aClass)! !\\\\n\\\\n!OBSystemBrowser class methodsFor: 'instance creation' stamp: 'cwp 12/15/2004 21:45'!\\\\nonEnvironment: anEnvironment category: aSymbol\\\\n\\\\t^ self selection: (OBClassCategoryNode \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ton: aSymbol \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinEnvironment: anEnvironment)! !\\\\n\\\\n\\\\n!OBSystemBrowser class methodsFor: 'opening' stamp: 'cwp 12/5/2004 18:32'!\\\\nopenOnClass: aClass\\\\n\\\\t^ (self onClass: aClass) open! !\\\\n\\\\n!OBSystemBrowser class methodsFor: 'opening' stamp: 'cwp 12/15/2004 21:47'!\\\\nopenOnClass: aClass category: aSymbol\\\\n\\\\t^ (self onClass: aClass category: aSymbol) open! !\\\\n\\\\n!OBSystemBrowser class methodsFor: 'opening' stamp: 'cwp 12/5/2004 17:38'!\\\\nopenOnClass: aClass selector: aSelector\\\\n\\\\t^ (self onClass: aClass selector: aSelector) open! !\\\\n\\\\n!OBSystemBrowser class methodsFor: 'opening' stamp: 'cwp 12/15/2004 21:54'!\\\\nopenOnEnvironment: anEnvironment category: aSymbol\\\\n\\\\t^ (self onEnvironment: anEnvironment category: aSymbol) open! !\\\\nObject subclass: #OBSystemBrowserAdaptor\\\\n\\\\tinstanceVariableNames: 'class selector'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Utilities'!\\\\n!OBSystemBrowserAdaptor commentStamp: 'cwp 1/8/2005 13:35' prior: 0!\\\\nOBSystemBrowserAdaptor implements the protocol expected by the SystemBrowser app registry, and thus allows OmniBrowser to be chosen as the default system browser. \\\\n\\\\nCaveat: because the required protocol is a little ...odd.... it can't be implemented well by OBSystemBrowser directly. OBSystemBrowserAdaptor does this reasonably well, but it has no way to provide a more natural name than its class name to the app registry menu.!\\\\n\\\\n\\\\n!OBSystemBrowserAdaptor methodsFor: 'registry protocol' stamp: 'cwp 12/5/2004 21:50'!\\\\nlabelString\\\\n\\\\t^ 'System Browser'! !\\\\n\\\\n!OBSystemBrowserAdaptor methodsFor: 'registry protocol' stamp: 'cwp 12/5/2004 21:49'!\\\\nopenEditString: anUndefinedObject \\\\n\\\\t^ self! !\\\\n\\\\n!OBSystemBrowserAdaptor methodsFor: 'registry protocol' stamp: 'cwp 12/5/2004 21:49'!\\\\nsetClass: aClass selector: aSelector \\\\n\\\\tclass _ aClass.\\\\n\\\\tselector _ aSelector! !\\\\n\\\\n\\\\n!OBSystemBrowserAdaptor methodsFor: 'accessing' stamp: 'cwp 12/5/2004 21:55'!\\\\nselector\\\\n\\\\t^ selector! !\\\\n\\\\n!OBSystemBrowserAdaptor methodsFor: 'accessing' stamp: 'cwp 12/5/2004 21:55'!\\\\ntargetClass\\\\n\\\\t^ class! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBSystemBrowserAdaptor class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBSystemBrowserAdaptor class methodsFor: 'initializing' stamp: 'cwp 12/5/2004 22:01'!\\\\ninitialize\\\\n\\\\tself register! !\\\\n\\\\n!OBSystemBrowserAdaptor class methodsFor: 'initializing' stamp: 'cwp 1/8/2005 21:52'!\\\\nregister\\\\n\\\\tSmalltalk at: #SystemBrowser ifPresent: [:class | class register: self]! !\\\\n\\\\n!OBSystemBrowserAdaptor class methodsFor: 'initializing' stamp: 'cwp 1/8/2005 21:53'!\\\\nunregister\\\\n\\\\tSmalltalk at: #SystemBrowser ifPresent: [:class | class unregister: self]! !\\\\n\\\\n\\\\n!OBSystemBrowserAdaptor class methodsFor: 'registry protocol' stamp: 'lr 4/20/2006 08:48'!\\\\nfullOnClass: aClass selector: aSelector\\\\n\\\\t^ OBSystemBrowser \\\\n\\\\t\\\\topenOnClass: aClass\\\\n\\\\t\\\\tselector: aSelector! !\\\\n\\\\n!OBSystemBrowserAdaptor class methodsFor: 'registry protocol' stamp: 'lr 3/28/2006 09:10'!\\\\nopen\\\\n\\\\tOBSystemBrowser open! !\\\\n\\\\n!OBSystemBrowserAdaptor class methodsFor: 'registry protocol' stamp: 'cwp 12/5/2004 21:59'!\\\\nopenBrowser\\\\n\\\\tOBSystemBrowser open! !\\\\n\\\\n!OBSystemBrowserAdaptor class methodsFor: 'registry protocol' stamp: 'cwp 12/5/2004 21:56'!\\\\nopenBrowserView: adaptor label: ignored \\\\n\\\\t^ OBSystemBrowser \\\\n\\\\t\\\\topenOnClass: adaptor targetClass \\\\n\\\\t\\\\tselector: adaptor selector! !\\\\nTextMorphForEditView subclass: #OBTextMorph\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Morphic'!\\\\n!OBTextMorph commentStamp: 'cwp 12/7/2004 00:07' prior: 0!\\\\nThis is a trivial subclass of TextMorph. It overrides editor creation to use OBTextMorphEditor rather than a regular TextMorphEditor.!\\\\n\\\\n\\\\n!OBTextMorph methodsFor: 'private' stamp: 'cwp 10/30/2004 23:06'!\\\\ninstallEditorToReplace: priorEditor\\\\n\\\\t\\\\\\\"Install an editor for my paragraph.  This constitutes 'hasFocus'.\\\\n\\\\tIf priorEditor is not nil, then initialize the new editor from its state.\\\\n\\\\tWe may want to rework this so it actually uses the prior editor.\\\\\\\"\\\\n\\\\n\\\\t| stateArray |\\\\n\\\\tpriorEditor ifNotNil: [stateArray _ priorEditor stateArray].\\\\n\\\\teditor _ OBTextMorphEditor new morph: self.\\\\n\\\\teditor changeParagraph: self paragraph.\\\\n\\\\tpriorEditor ifNotNil: [editor stateArrayPut: stateArray].\\\\n\\\\tself selectionChanged.\\\\n\\\\t^ editor! !\\\\nTextMorphEditor subclass: #OBTextMorphEditor\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Morphic'!\\\\n!OBTextMorphEditor commentStamp: 'cwp 1/7/2005 23:27' prior: 0!\\\\nOBTextMorphEditor overrides the TextMorphEditors handling of command keys, passing them along to its model for processing, rather than hard-coding their implementations.!\\\\n\\\\n\\\\n!OBTextMorphEditor methodsFor: 'actions' stamp: 'cwp 10/31/2004 01:52'!\\\\nbrowseIt\\\\n\\\\t| symbol |\\\\n\\\\tself lineSelectAndEmptyCheck: [^ self].\\\\n\\\\t(symbol _ self selectedSymbol) isNil ifTrue: [^ view flash].\\\\n\\\\n\\\\tself send: #browseIt: toModelWith: {symbol} orDo: [super browseIt]! !\\\\n\\\\n!OBTextMorphEditor methodsFor: 'actions' stamp: 'cwp 10/31/2004 00:40'!\\\\nimplementorsOfIt\\\\n\\\\t\\\\\\\"Open a senders browser on the selected selector\\\\\\\"\\\\n\\\\n\\\\t| selector |\\\\n\\\\tself lineSelectAndEmptyCheck: [^ self].\\\\n\\\\t(selector _ self selectedSelector) == nil ifTrue: [^ view flash].\\\\n\\\\tself send: #implementorsOfIt: toModelWith: {selector} orDo: [super sendersOfIt]! !\\\\n\\\\n!OBTextMorphEditor methodsFor: 'actions' stamp: 'cwp 10/31/2004 01:10'!\\\\nreferencesToIt\\\\n\\\\n\\\\t| selector |\\\\n\\\\tself lineSelectAndEmptyCheck: [^ self].\\\\n\\\\t(selector _ self selectedSelector) == nil ifTrue: [^ view flash].\\\\n\\\\tself send: #referencesToIt: toModelWith: {selector} orDo: [super referencesToIt]! !\\\\n\\\\n!OBTextMorphEditor methodsFor: 'actions' stamp: 'cwp 10/31/2004 00:26'!\\\\nsendersOfIt\\\\n\\\\t\\\\\\\"Open a senders browser on the selected selector\\\\\\\"\\\\n\\\\n\\\\t| selector |\\\\n\\\\tself lineSelectAndEmptyCheck: [^ self].\\\\n\\\\t(selector _ self selectedSelector) == nil ifTrue: [^ view flash].\\\\n\\\\tself send: #sendersOfIt: toModelWith: {selector} orDo: [super sendersOfIt]! !\\\\n\\\\n\\\\n!OBTextMorphEditor methodsFor: 'model access' stamp: 'cwp 10/31/2004 00:24'!\\\\nsend: aSelector toModelWith: args orDo: aBlock\\\\n\\\\tself terminateAndInitializeAround:\\\\n\\\\t\\\\t[(model respondsTo: aSelector)\\\\n\\\\t\\\\t\\\\tifTrue: [(model perform: aSelector withArguments: args)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [view flash]]\\\\n\\\\t\\\\t\\\\tifFalse: aBlock]! !\\\\nOBInteractionRequest subclass: #OBTextRequest\\\\n\\\\tinstanceVariableNames: 'prompt template'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Notifications'!\\\\n!OBTextRequest commentStamp: 'cwp 3/5/2004 12:35' prior: 0!\\\\nThis notification is used to ask the user to supply a short piece of text. Its defaultAction is to open a FillInTheBlank.\\\\n\\\\niVars:\\\\n\\\\nprompt\\\\t\\\\t- a string describing the text the user is asked to supply\\\\ntemplate\\\\t- a default reply !\\\\n\\\\n\\\\n!OBTextRequest methodsFor: 'accessing' stamp: 'cwp 2/2/2004 21:24'!\\\\nprompt\\\\n\\\\t^ prompt! !\\\\n\\\\n!OBTextRequest methodsFor: 'accessing' stamp: 'cwp 2/2/2004 21:23'!\\\\nprompt: aString\\\\n\\\\tprompt _ aString! !\\\\n\\\\n!OBTextRequest methodsFor: 'accessing' stamp: 'cwp 2/2/2004 21:00'!\\\\ntemplate\\\\n\\\\t^ template! !\\\\n\\\\n!OBTextRequest methodsFor: 'accessing' stamp: 'cwp 2/2/2004 20:59'!\\\\ntemplate: aString\\\\n\\\\ttemplate _ aString! !\\\\n\\\\n\\\\n!OBTextRequest methodsFor: 'user interaction' stamp: 'cwp 2/2/2004 21:27'!\\\\ndefaultAction\\\\n\\\\tself resume: self requestText! !\\\\n\\\\n!OBTextRequest methodsFor: 'user interaction' stamp: 'cwp 2/2/2004 21:27'!\\\\nrequestText\\\\n\\\\t^ FillInTheBlankMorph \\\\n\\\\t\\\\trequest: prompt\\\\n\\\\t\\\\tinitialAnswer: template\\\\n\\\\t\\\\tcenterAt: Sensor cursorPoint\\\\n\\\\t\\\\tinWorld: World\\\\n\\\\t\\\\tonCancelReturn: nil\\\\n\\\\t\\\\tacceptOnCR: true! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBTextRequest class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBTextRequest class methodsFor: 'as yet unclassified' stamp: 'cwp 2/2/2004 21:30'!\\\\nprompt: aString\\\\n\\\\t^ self new prompt: aString; template: ''! !\\\\n\\\\n!OBTextRequest class methodsFor: 'as yet unclassified' stamp: 'cwp 2/5/2004 20:31'!\\\\nprompt: promptString template: templateString\\\\n\\\\t^ (self new prompt: promptString; template: templateString) signal! !\\\\nOBPanel subclass: #OBVarButtonPanel\\\\n\\\\tinstanceVariableNames: 'morph'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OmniBrowser-Panels'!\\\\n!OBVarButtonPanel commentStamp: 'cwp 12/7/2004 00:21' prior: 0!\\\\nOBVarButtonPanel displays a horizontal row of buttons. In contrast to OBFixedButtonPanel, the buttons on display are updated to reflect the actions appropriate to the currently selected node.!\\\\n\\\\n\\\\n!OBVarButtonPanel methodsFor: 'constructing' stamp: 'cwp 11/27/2004 18:16'!\\\\nmorph\\\\n\\\\t^ morph _ (RectangleMorph new)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tlayoutPolicy: TableLayout new;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tlistDirection: #leftToRight;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tvResizing: #spaceFill;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tborderWidth: 0;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\twrapCentering: #center;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcellPositioning: #leftCenter;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\trubberBandCells: true;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tyourself! !\\\\n\\\\n!OBVarButtonPanel methodsFor: 'constructing' stamp: 'cwp 11/26/2004 22:41'!\\\\nmorphHeight\\\\n\\\\t^ 25! !\\\\n\\\\n\\\\n!OBVarButtonPanel methodsFor: 'updating' stamp: 'cwp 7/8/2006 12:54'!\\\\nselectionChanged: ann\\\\n\\\\t| node actions |\\\\n\\\\tmorph removeAllMorphs.\\\\n\\\\tnode _ browser currentNode ifNil: [^ self].\\\\n\\\\tactions _ (node metaNode actionsForNode: node) select: [:ea | ea wantsButton].\\\\n\\\\tactions do: [:ea | morph addMorphBack: ea buttonMorph]! !\\\\n\\\\n!OBVarButtonPanel methodsFor: 'updating' stamp: 'cwp 6/3/2006 22:30'!\\\\nsubscribe\\\\n\\\\tself announcer\\\\n\\\\t\\\\tobserve: OBSelectionChanged\\\\n\\\\t\\\\tsend: #selectionChanged:\\\\n\\\\t\\\\tto: self! !\\\\nOBClassAwareNode subclass: #OBVariableNode\\\\n\\\\tinstanceVariableNames: 'name'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Nodes'!\\\\n!OBVariableNode commentStamp: 'cwp 1/8/2005 12:46' prior: 0!\\\\nOBVariableNode is an abstract superclass for the two types of variables a class can contain - class variables and instance variables. The only difference between the two subclasses is how they search for methods that refer to them.!\\\\n\\\\n\\\\n!OBVariableNode methodsFor: 'actions' stamp: 'cwp 12/15/2004 22:38'!\\\\nactions\\\\n\\\\t^ {self browseAction}! !\\\\n\\\\n\\\\n!OBVariableNode methodsFor: 'displaying'!\\\\nname\\\\n\\\\t^ name! !\\\\n\\\\n\\\\n!OBVariableNode methodsFor: 'initializing'!\\\\nsetName: aString class: aClass\\\\n\\\\tname := aString.\\\\n\\\\tself theClass: aClass! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBVariableNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBVariableNode class methodsFor: 'instance creation'!\\\\non: instVarName inClass: aClassReference \\\\n\\\\t^ self new setName: instVarName class: aClassReference! !\\\\nOBListBrowser subclass: #OBVariablesBrowser\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Browsers'!\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBVariablesBrowser class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBVariablesBrowser class methodsFor: 'as yet unclassified' stamp: 'avi 9/17/2005 01:22'!\\\\ndefaultMetaNode\\\\n\\\\t| class method message var |\\\\n\\\\tclass := OBMetaNode named: 'Class'.\\\\n\\\\tvar := OBMetaNode named: 'Variable'.\\\\n\\\\tmethod := OBMetaNode named: 'Method'.\\\\n\\\\tmessage := OBMetaNode named: 'Message'.\\\\n\\\\tclass\\\\n\\\\t\\\\taddActor: OBNodeActor new;\\\\n\\\\t\\\\tchildAt: #instanceVariables labeled: 'instance' put: var;\\\\n\\\\t\\\\tchildAt: #classVariables labeled: 'class' put: var;\\\\n\\\\t\\\\tfilterClass: OBModalFilter.\\\\n\\\\tvar\\\\n\\\\t\\\\tchildAt: #accessors put: method;\\\\n\\\\t\\\\taddActor: OBNodeActor new;\\\\n\\\\t\\\\tfilterClass: OBModalFilter.\\\\n\\\\tmethod\\\\n\\\\t\\\\tdisplaySelector: #fullName;\\\\n\\\\t\\\\taddActor: OBNodeActor new;\\\\n\\\\t\\\\tchildAt: #senders put: message;\\\\n\\\\t\\\\tfilterClass: OBModalFilter.\\\\n\\\\tmessage\\\\n\\\\t\\\\tdisplaySelector: #fullName;\\\\n\\\\t\\\\taddActor: OBNodeActor new;\\\\n\\\\t\\\\tchildAt: #senders put: message;\\\\n\\\\t\\\\tfilterClass: OBModalFilter.\\\\n\\\\t\\\\n\\\\t^ class! !\\\\n\\\\n!OBVariablesBrowser class methodsFor: 'as yet unclassified' stamp: 'avi 9/17/2005 01:35'!\\\\ntitle\\\\n\\\\t^ 'Variables of'! !\\\\nOBCodeBrowser subclass: #OBVersionBrowser\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'OB-Standard-Browsers'!\\\\n!OBVersionBrowser commentStamp: 'cwp 1/7/2005 23:58' prior: 0!\\\\nOBVersionBrowser displays a list of OBMethodVersions, which represent versions of a method present in the source or changes files. !\\\\n\\\\n\\\\n!OBVersionBrowser methodsFor: 'morphic' stamp: 'avi 11/29/2004 21:52'!\\\\ndefaultBackgroundColor\\\\n\\\\t^ Color lightMagenta! !\\\\n\\\\n\\\\n!OBVersionBrowser methodsFor: 'accessing' stamp: 'cwp 11/27/2004 22:28'!\\\\ndefaultLabel\\\\n\\\\t^ 'Versions of ', self root name printString! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOBVersionBrowser class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OBVersionBrowser class methodsFor: 'configuration' stamp: 'avi 9/17/2005 01:09'!\\\\ndefaultMetaNode\\\\n\\\\t| version |\\\\n\\\\tversion := OBMetaNode named: 'Version'.\\\\n\\\\tversion addActor: OBNodeActor new.\\\\n\\\\t^ (OBMetaNode named: 'Method') \\\\n\\\\t\\\\tchildAt: #versions put: version.! !\\\\n\\\\n!OBVersionBrowser class methodsFor: 'configuration' stamp: 'cwp 11/27/2004 22:32'!\\\\nmaxPanes\\\\n\\\\t^ 1! !\\\\n\\\\n!OBVersionBrowser class methodsFor: 'configuration' stamp: 'cwp 11/27/2004 22:32'!\\\\nminPanes\\\\n\\\\t^ 1! !\\\\n\\\\n!OBVersionBrowser class methodsFor: 'configuration' stamp: 'cwp 11/27/2004 22:34'!\\\\noptionalButtons\\\\n\\\\t^ #('browse' 'revert')! !\\\\n\\\\n\\\\n!OBVersionBrowser class methodsFor: 'opening' stamp: 'cwp 12/5/2004 15:42'!\\\\nopenOn: aMethodVersionNode\\\\n\\\\t^ (self root: aMethodVersionNode) open! !\\\\nProtoObject subclass: #Object\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: 'DependentsFields'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Kernel-Objects'!\\\\n!Object commentStamp: '<historical>' prior: 0!\\\\nObject is the root class for almost all of the other classes in the class hierarchy. The exceptions are ProtoObject (the superclass of Object) and its subclasses.\\\\n\\\\nClass Object provides default behavior common to all normal objects, such as access, copying, comparison, error handling, message sending, and reflection. Also utility messages that all objects should respond to are defined here.\\\\n\\\\nObject has no instance variables, nor should any be added. This is due to several classes of objects that inherit from Object that have special implementations (SmallInteger and UndefinedObject for example) or the VM knows about and depends on the structure and layout of certain standard classes.\\\\n\\\\nClass Variables:\\\\n\\\\tDependentsFields\\\\t\\\\tan IdentityDictionary\\\\n\\\\t\\\\tProvides a virtual 'dependents' field so that any object may have one\\\\n\\\\t\\\\tor more dependent views, synchronized by the changed:/update: protocol.\\\\n\\\\t\\\\tNote that class Model has a real slot for its dependents, and overrides\\\\n\\\\t\\\\tthe associated protocol with more efficient implementations.\\\\n\\\\tEventsFields\\\\t\\\\t\\\\tan IdentityDictionary that maps each object to its dependents.\\\\n\\\\t\\\\tRegisters a message send (consisting of a selector and a receiver object)\\\\n\\\\t\\\\twhich should be performed when anEventSymbol is triggered by the receiver.\\\\n\\\\t\\\\tPart of a new event notification framework which could eventually replace\\\\n\\\\t\\\\tthe existing changed/update mechanism.  It is intended to be compatible\\\\n\\\\t\\\\twith Dolphin Smalltalk and VSE as much as possible.\\\\n\\\\nBecause Object is the root of the inheritance tree, methods are often defined in Object to give all objects special behaviors needed by certain subsystems or applications, or to respond to certain general test messages such as isMorph.!\\\\n\\\\n\\\\n!Object methodsFor: 'accessing' stamp: 'sw 4/30/1998 12:18'!\\\\naddInstanceVarNamed: aName withValue: aValue\\\\n\\\\t\\\\\\\"Add an instance variable named aName and give it value aValue\\\\\\\"\\\\n\\\\tself class addInstVarName: aName asString.\\\\n\\\\tself instVarAt: self class instSize put: aValue! !\\\\n\\\\n!Object methodsFor: 'accessing' stamp: 'yo 6/29/2004 11:39'!\\\\nat: index \\\\n\\\\t\\\\\\\"Primitive. Assumes receiver is indexable. Answer the value of an \\\\n\\\\tindexable element in the receiver. Fail if the argument index is not an \\\\n\\\\tInteger or is out of bounds. Essential. See Object documentation \\\\n\\\\twhatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 60>\\\\n\\\\tindex isInteger ifTrue:\\\\n\\\\t\\\\t[self class isVariable\\\\n\\\\t\\\\t\\\\tifTrue: [self errorSubscriptBounds: index]\\\\n\\\\t\\\\t\\\\tifFalse: [self errorNotIndexable]].\\\\n\\\\tindex isNumber\\\\n\\\\t\\\\tifTrue: [^self at: index asInteger]\\\\n\\\\t\\\\tifFalse: [self errorNonIntegerIndex]! !\\\\n\\\\n!Object methodsFor: 'accessing'!\\\\nat: index modify: aBlock\\\\n\\\\t\\\\\\\"Replace the element of the collection with itself transformed by the block\\\\\\\"\\\\n\\\\t^ self at: index put: (aBlock value: (self at: index))! !\\\\n\\\\n!Object methodsFor: 'accessing' stamp: 'yo 6/29/2004 13:08'!\\\\nat: index put: value \\\\n\\\\t\\\\\\\"Primitive. Assumes receiver is indexable. Store the argument value in \\\\n\\\\tthe indexable element of the receiver indicated by index. Fail if the \\\\n\\\\tindex is not an Integer or is out of bounds. Or fail if the value is not of \\\\n\\\\tthe right type for this kind of collection. Answer the value that was \\\\n\\\\tstored. Essential. See Object documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 61>\\\\n\\\\tindex isInteger ifTrue:\\\\n\\\\t\\\\t[self class isVariable\\\\n\\\\t\\\\t\\\\tifTrue: [(index >= 1 and: [index <= self size])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self errorImproperStore]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [self errorSubscriptBounds: index]]\\\\n\\\\t\\\\t\\\\tifFalse: [self errorNotIndexable]].\\\\n\\\\tindex isNumber\\\\n\\\\t\\\\tifTrue: [^self at: index asInteger put: value]\\\\n\\\\t\\\\tifFalse: [self errorNonIntegerIndex]! !\\\\n\\\\n!Object methodsFor: 'accessing' stamp: 'yo 9/20/2004 10:22'!\\\\nbasicAddInstanceVarNamed: aName withValue: aValue\\\\n\\\\t\\\\\\\"Add an instance variable named aName and give it value aValue\\\\\\\"\\\\n\\\\tself class addInstVarName: aName asString.\\\\n\\\\tself instVarAt: self class instSize put: aValue! !\\\\n\\\\n!Object methodsFor: 'accessing'!\\\\nbasicAt: index \\\\n\\\\t\\\\\\\"Primitive. Assumes receiver is indexable. Answer the value of an \\\\n\\\\tindexable element in the receiver. Fail if the argument index is not an \\\\n\\\\tInteger or is out of bounds. Essential. Do not override in a subclass. See \\\\n\\\\tObject documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 60>\\\\n\\\\tindex isInteger ifTrue: [self errorSubscriptBounds: index].\\\\n\\\\tindex isNumber\\\\n\\\\t\\\\tifTrue: [^self basicAt: index asInteger]\\\\n\\\\t\\\\tifFalse: [self errorNonIntegerIndex]! !\\\\n\\\\n!Object methodsFor: 'accessing'!\\\\nbasicAt: index put: value \\\\n\\\\t\\\\\\\"Primitive. Assumes receiver is indexable. Store the second argument \\\\n\\\\tvalue in the indexable element of the receiver indicated by index. Fail \\\\n\\\\tif the index is not an Integer or is out of bounds. Or fail if the value is \\\\n\\\\tnot of the right type for this kind of collection. Answer the value that \\\\n\\\\twas stored. Essential. Do not override in a subclass. See Object \\\\n\\\\tdocumentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 61>\\\\n\\\\tindex isInteger\\\\n\\\\t\\\\tifTrue: [(index >= 1 and: [index <= self size])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self errorImproperStore]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [self errorSubscriptBounds: index]].\\\\n\\\\tindex isNumber\\\\n\\\\t\\\\tifTrue: [^self basicAt: index asInteger put: value]\\\\n\\\\t\\\\tifFalse: [self errorNonIntegerIndex]! !\\\\n\\\\n!Object methodsFor: 'accessing'!\\\\nbasicSize\\\\n\\\\t\\\\\\\"Primitive. Answer the number of indexable variables in the receiver. \\\\n\\\\tThis value is the same as the largest legal subscript. Essential. Do not \\\\n\\\\toverride in any subclass. See Object documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 62>\\\\n\\\\t\\\\\\\"The number of indexable fields of fixed-length objects is 0\\\\\\\"\\\\n\\\\t^0\\\\t! !\\\\n\\\\n!Object methodsFor: 'accessing'!\\\\nbindWithTemp: aBlock\\\\n\\\\t^ aBlock value: self value: nil! !\\\\n\\\\n!Object methodsFor: 'accessing' stamp: 'md 10/7/2004 15:43'!\\\\nifNil: nilBlock ifNotNilDo: aBlock \\\\n\\\\t\\\\\\\"Evaluate aBlock with the receiver as its argument.\\\\\\\"\\\\n\\\\n\\\\t^ aBlock value: self\\\\n! !\\\\n\\\\n!Object methodsFor: 'accessing' stamp: 'di 11/8/2000 21:04'!\\\\nifNotNilDo: aBlock\\\\n\\\\t\\\\\\\"Evaluate the given block with the receiver as its argument.\\\\\\\"\\\\n\\\\n\\\\t^ aBlock value: self\\\\n! !\\\\n\\\\n!Object methodsFor: 'accessing' stamp: 'md 10/7/2004 15:43'!\\\\nifNotNilDo: aBlock ifNil: nilBlock\\\\n\\\\t\\\\\\\"Evaluate aBlock with the receiver as its argument.\\\\\\\"\\\\n\\\\n\\\\t^ aBlock value: self\\\\n! !\\\\n\\\\n!Object methodsFor: 'accessing' stamp: 'ajh 1/21/2003 12:59'!\\\\nin: aBlock\\\\n\\\\t\\\\\\\"Evaluate the given block with the receiver as its argument.\\\\\\\"\\\\n\\\\n\\\\t^ aBlock value: self\\\\n! !\\\\n\\\\n!Object methodsFor: 'accessing' stamp: 'sw 10/17/2000 11:15'!\\\\npresenter\\\\n\\\\t\\\\\\\"Answer the presenter object associated with the receiver.  For morphs, there is in effect a clear containment hierarchy of presenters (accessed via their association with PasteUpMorphs); for arbitrary objects the hook is simply via the current world, at least at present.\\\\\\\"\\\\n\\\\n\\\\t^ self currentWorld presenter! !\\\\n\\\\n!Object methodsFor: 'accessing'!\\\\nreadFromString: aString\\\\n\\\\t\\\\\\\"Create an object based on the contents of aString.\\\\\\\"\\\\n\\\\n\\\\t^self readFrom: (ReadStream on: aString)! !\\\\n\\\\n!Object methodsFor: 'accessing' stamp: 'di 3/29/1999 13:10'!\\\\nsize\\\\n\\\\t\\\\\\\"Primitive. Answer the number of indexable variables in the receiver. \\\\n\\\\tThis value is the same as the largest legal subscript. Essential. See Object \\\\n\\\\tdocumentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 62>\\\\n\\\\tself class isVariable ifFalse: [self errorNotIndexable].\\\\n\\\\t^ 0! !\\\\n\\\\n!Object methodsFor: 'accessing' stamp: 'md 5/16/2006 12:34'!\\\\nyourself\\\\n\\\\t\\\\\\\"Answer self.\\\\\\\"\\\\n\\\\t^self! !\\\\n\\\\n\\\\n!Object methodsFor: 'associating' stamp: 'md 7/22/2005 16:03'!\\\\n-> anObject\\\\n\\\\t\\\\\\\"Answer an Association between self and anObject\\\\\\\"\\\\n\\\\n\\\\t^Association basicNew key: self value: anObject! !\\\\n\\\\n\\\\n\\\\n!Object methodsFor: 'binding'!\\\\nbindingOf: aString\\\\n\\\\t^nil! !\\\\n\\\\n\\\\n!Object methodsFor: 'casing'!\\\\ncaseOf: aBlockAssociationCollection\\\\n\\\\t\\\\\\\"The elements of aBlockAssociationCollection are associations between blocks.\\\\n\\\\t Answer the evaluated value of the first association in aBlockAssociationCollection\\\\n\\\\t whose evaluated key equals the receiver.  If no match is found, report an error.\\\\\\\"\\\\n\\\\n\\\\t^ self caseOf: aBlockAssociationCollection otherwise: [self caseError]\\\\n\\\\n\\\\\\\"| z | z _ {[#a]->[1+1]. ['b' asSymbol]->[2+2]. [#c]->[3+3]}. #b caseOf: z\\\\\\\"\\\\n\\\\\\\"| z | z _ {[#a]->[1+1]. ['d' asSymbol]->[2+2]. [#c]->[3+3]}. #b caseOf: z\\\\\\\"\\\\n\\\\\\\"The following are compiled in-line:\\\\\\\"\\\\n\\\\\\\"#b caseOf: {[#a]->[1+1]. ['b' asSymbol]->[2+2]. [#c]->[3+3]}\\\\\\\"\\\\n\\\\\\\"#b caseOf: {[#a]->[1+1]. ['d' asSymbol]->[2+2]. [#c]->[3+3]}\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'casing'!\\\\ncaseOf: aBlockAssociationCollection otherwise: aBlock\\\\n\\\\t\\\\\\\"The elements of aBlockAssociationCollection are associations between blocks.\\\\n\\\\t Answer the evaluated value of the first association in aBlockAssociationCollection\\\\n\\\\t whose evaluated key equals the receiver.  If no match is found, answer the result\\\\n\\\\t of evaluating aBlock.\\\\\\\"\\\\n\\\\n\\\\taBlockAssociationCollection associationsDo:\\\\n\\\\t\\\\t[:assoc | (assoc key value = self) ifTrue: [^assoc value value]].\\\\n\\\\t^ aBlock value\\\\n\\\\n\\\\\\\"| z | z _ {[#a]->[1+1]. ['b' asSymbol]->[2+2]. [#c]->[3+3]}. #b caseOf: z otherwise: [0]\\\\\\\"\\\\n\\\\\\\"| z | z _ {[#a]->[1+1]. ['d' asSymbol]->[2+2]. [#c]->[3+3]}. #b caseOf: z otherwise: [0]\\\\\\\"\\\\n\\\\\\\"The following are compiled in-line:\\\\\\\"\\\\n\\\\\\\"#b caseOf: {[#a]->[1+1]. ['b' asSymbol]->[2+2]. [#c]->[3+3]} otherwise: [0]\\\\\\\"\\\\n\\\\\\\"#b caseOf: {[#a]->[1+1]. ['d' asSymbol]->[2+2]. [#c]->[3+3]} otherwise: [0]\\\\\\\"! !\\\\n\\\\n\\\\n!Object methodsFor: 'class membership'!\\\\nclass\\\\n\\\\t\\\\\\\"Primitive. Answer the object which is the receiver's class. Essential. See \\\\n\\\\tObject documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 111>\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!Object methodsFor: 'class membership' stamp: 'sw 9/27/2001 15:51'!\\\\ninheritsFromAnyIn: aList\\\\n\\\\t\\\\\\\"Answer whether the receiver inherits from any class represented by any element in the list.  The elements of the list can be classes, class name symbols, or strings representing possible class names.  This allows speculative membership tests to be made even when some of the classes may not be known to the current image, and even when their names are not interned symbols.\\\\\\\"\\\\n\\\\n\\\\t| aClass |\\\\n\\\\taList do:\\\\n\\\\t\\\\t[:elem | Symbol hasInterned: elem asString ifTrue: \\\\n\\\\t\\\\t\\\\t[:elemSymbol | (((aClass _ Smalltalk at: elemSymbol ifAbsent: [nil]) isKindOf: Class)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tand: [self isKindOf: aClass])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[^ true]]].\\\\n\\\\t^ false\\\\n\\\\n\\\\n\\\\\\\"\\\\n{3.  true. 'olive'} do:\\\\n\\\\t[:token |\\\\n\\\\t\\\\t {{#Number. #Boolean}. {Number.  Boolean }.  {'Number'. 'Boolean'}} do:\\\\n\\\\t\\\\t\\\\t[:list |\\\\n\\\\t\\\\t\\\\t\\\\tTranscript cr; show: token asString, ' list element provided as a ', list first class name, ' - ', (token inheritsFromAnyIn: list) asString]]\\\\n\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'class membership'!\\\\nisKindOf: aClass \\\\n\\\\t\\\\\\\"Answer whether the class, aClass, is a superclass or class of the receiver.\\\\\\\"\\\\n\\\\n\\\\tself class == aClass\\\\n\\\\t\\\\tifTrue: [^true]\\\\n\\\\t\\\\tifFalse: [^self class inheritsFrom: aClass]! !\\\\n\\\\n!Object methodsFor: 'class membership' stamp: 'sw 2/16/98 02:08'!\\\\nisKindOf: aClass orOf: anotherClass\\\\n\\\\t\\\\\\\"Answer whether either of the classes, aClass or anotherClass,, is a superclass or class of the receiver.  A convenience; could be somewhat optimized\\\\\\\"\\\\n\\\\t^ (self isKindOf: aClass) or: [self isKindOf: anotherClass]! !\\\\n\\\\n!Object methodsFor: 'class membership'!\\\\nisMemberOf: aClass \\\\n\\\\t\\\\\\\"Answer whether the receiver is an instance of the class, aClass.\\\\\\\"\\\\n\\\\n\\\\t^self class == aClass! !\\\\n\\\\n!Object methodsFor: 'class membership'!\\\\nrespondsTo: aSymbol \\\\n\\\\t\\\\\\\"Answer whether the method dictionary of the receiver's class contains \\\\n\\\\taSymbol as a message selector.\\\\\\\"\\\\n\\\\n\\\\t^self class canUnderstand: aSymbol! !\\\\n\\\\n!Object methodsFor: 'class membership' stamp: 'tk 10/21/1998 12:38'!\\\\nxxxClass\\\\n\\\\t\\\\\\\"For subclasses of nil, such as ObjectOut\\\\\\\"\\\\n\\\\t^ self class! !\\\\n\\\\n\\\\n!Object methodsFor: 'comparing' stamp: 'tk 4/16/1999 18:26'!\\\\ncloseTo: anObject\\\\n\\\\t\\\\\\\"Answer whether the receiver and the argument represent the same\\\\n\\\\tobject. If = is redefined in any subclass, consider also redefining the\\\\n\\\\tmessage hash.\\\\\\\"\\\\n\\\\n\\\\t| ans |\\\\n\\\\t[ans _ self = anObject] ifError: [:aString :aReceiver | ^ false].\\\\n\\\\t^ ans! !\\\\n\\\\n!Object methodsFor: 'comparing'!\\\\nhash\\\\n\\\\t\\\\\\\"Answer a SmallInteger whose value is related to the receiver's identity.\\\\n\\\\tMay be overridden, and should be overridden in any classes that define = \\\\\\\"\\\\n\\\\n\\\\t^ self identityHash! !\\\\n\\\\n!Object methodsFor: 'comparing' stamp: 'pm 9/23/97 09:36'!\\\\nhashMappedBy: map\\\\n\\\\t\\\\\\\"Answer what my hash would be if oops changed according to map.\\\\\\\"\\\\n\\\\n\\\\t^map newHashFor: self! !\\\\n\\\\n!Object methodsFor: 'comparing' stamp: 'di 9/27/97 20:23'!\\\\nidentityHashMappedBy: map\\\\n\\\\t\\\\\\\"Answer what my hash would be if oops changed according to map.\\\\\\\"\\\\n\\\\n\\\\t^map newHashFor: self! !\\\\n\\\\n!Object methodsFor: 'comparing' stamp: 'sw 8/20/1998 12:34'!\\\\nidentityHashPrintString\\\\n\\\\t\\\\\\\"'fred' identityHashPrintString\\\\\\\"\\\\n\\\\n\\\\t^ '(', self identityHash printString, ')'! !\\\\n\\\\n!Object methodsFor: 'comparing' stamp: 'ajh 2/2/2002 15:02'!\\\\nliteralEqual: other\\\\n\\\\n\\\\t^ self class == other class and: [self = other]! !\\\\n\\\\n!Object methodsFor: 'comparing'!\\\\n= anObject \\\\n\\\\t\\\\\\\"Answer whether the receiver and the argument represent the same \\\\n\\\\tobject. If = is redefined in any subclass, consider also redefining the \\\\n\\\\tmessage hash.\\\\\\\"\\\\n\\\\n\\\\t^self == anObject! !\\\\n\\\\n!Object methodsFor: 'comparing'!\\\\n~= anObject \\\\n\\\\t\\\\\\\"Answer whether the receiver and the argument do not represent the \\\\n\\\\tsame object.\\\\\\\"\\\\n\\\\n\\\\t^self = anObject == false! !\\\\n\\\\n\\\\n!Object methodsFor: 'converting' stamp: 'di 11/9/1998 12:15'!\\\\nadaptToFloat: rcvr andSend: selector\\\\n\\\\t\\\\\\\"If no method has been provided for adapting an object to a Float,\\\\n\\\\tthen it may be adequate to simply adapt it to a number.\\\\\\\"\\\\n\\\\t^ self adaptToNumber: rcvr andSend: selector! !\\\\n\\\\n!Object methodsFor: 'converting' stamp: 'di 11/9/1998 12:14'!\\\\nadaptToFraction: rcvr andSend: selector\\\\n\\\\t\\\\\\\"If no method has been provided for adapting an object to a Fraction,\\\\n\\\\tthen it may be adequate to simply adapt it to a number.\\\\\\\"\\\\n\\\\t^ self adaptToNumber: rcvr andSend: selector! !\\\\n\\\\n!Object methodsFor: 'converting' stamp: 'di 11/9/1998 12:15'!\\\\nadaptToInteger: rcvr andSend: selector\\\\n\\\\t\\\\\\\"If no method has been provided for adapting an object to a Integer,\\\\n\\\\tthen it may be adequate to simply adapt it to a number.\\\\\\\"\\\\n\\\\t^ self adaptToNumber: rcvr andSend: selector! !\\\\n\\\\n!Object methodsFor: 'converting' stamp: 'rw 4/27/2002 07:48'!\\\\nasActionSequence\\\\n\\\\n\\\\t^WeakActionSequence with: self! !\\\\n\\\\n!Object methodsFor: 'converting' stamp: 'rw 7/20/2003 16:03'!\\\\nasActionSequenceTrappingErrors\\\\n\\\\n\\\\t^WeakActionSequenceTrappingErrors with: self! !\\\\n\\\\n!Object methodsFor: 'converting' stamp: 'svp 5/16/2000 18:14'!\\\\nasDraggableMorph\\\\n\\\\t^(StringMorph contents: self printString)\\\\n\\\\t\\\\tcolor: Color white;\\\\n\\\\t\\\\tyourself! !\\\\n\\\\n!Object methodsFor: 'converting' stamp: 'sma 5/12/2000 17:39'!\\\\nasOrderedCollection\\\\n\\\\t\\\\\\\"Answer an OrderedCollection with the receiver as its only element.\\\\\\\"\\\\n\\\\n\\\\t^ OrderedCollection with: self! !\\\\n\\\\n!Object methodsFor: 'converting'!\\\\nasString\\\\n\\\\t\\\\\\\"Answer a string that represents the receiver.\\\\\\\"\\\\n\\\\n\\\\t^ self printString ! !\\\\n\\\\n!Object methodsFor: 'converting' stamp: 'ajh 3/11/2003 10:27'!\\\\nasStringOrText\\\\n\\\\t\\\\\\\"Answer a string that represents the receiver.\\\\\\\"\\\\n\\\\n\\\\t^ self printString ! !\\\\n\\\\n!Object methodsFor: 'converting'!\\\\nas: aSimilarClass\\\\n\\\\t\\\\\\\"Create an object of class aSimilarClass that has similar contents to the receiver.\\\\\\\"\\\\n\\\\n\\\\t^ aSimilarClass newFrom: self! !\\\\n\\\\n!Object methodsFor: 'converting' stamp: 'RAA 8/2/1999 12:41'!\\\\ncomplexContents\\\\n\\\\n\\\\t^self! !\\\\n\\\\n!Object methodsFor: 'converting' stamp: 'ajh 7/6/2003 20:37'!\\\\nmustBeBoolean\\\\n\\\\t\\\\\\\"Catches attempts to test truth of non-Booleans.  This message is sent from the VM.  The sending context is rewound to just before the jump causing this exception.\\\\\\\"\\\\n\\\\n\\\\t^ self mustBeBooleanIn: thisContext sender! !\\\\n\\\\n!Object methodsFor: 'converting' stamp: 'ajh 7/6/2003 20:40'!\\\\nmustBeBooleanIn: context\\\\n\\\\t\\\\\\\"context is the where the non-boolean error occurred. Rewind context to before jump then raise error.\\\\\\\"\\\\n\\\\n\\\\t| proceedValue |\\\\n\\\\tcontext skipBackBeforeJump.\\\\n\\\\tproceedValue _ NonBooleanReceiver new\\\\n\\\\t\\\\tobject: self;\\\\n\\\\t\\\\tsignal: 'proceed for truth.'.\\\\n\\\\t^ proceedValue ~~ false! !\\\\n\\\\n!Object methodsFor: 'converting' stamp: 'sw 3/26/2001 12:12'!\\\\nprintDirectlyToDisplay\\\\n\\\\t\\\\\\\"For debugging: write the receiver's printString directly to the display at (0, 100); senders of this are detected by the check-for-slips mechanism.\\\\\\\"\\\\n\\\\n\\\\tself asString displayAt: 0@100\\\\n\\\\n\\\\\\\"StringMorph someInstance printDirectlyToDisplay\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'converting' stamp: 'RAA 3/31/1999 12:13'!\\\\nwithoutListWrapper\\\\n\\\\n\\\\t^self! !\\\\n\\\\n\\\\n!Object methodsFor: 'copying'!\\\\nclone\\\\n\\\\n\\\\t<primitive: 148>\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!Object methodsFor: 'copying' stamp: 'ajh 8/18/2001 21:25'!\\\\ncopy\\\\n\\\\t\\\\\\\"Answer another instance just like the receiver. Subclasses typically override postCopy; they typically do not override shallowCopy.\\\\\\\"\\\\n\\\\n\\\\t^self shallowCopy postCopy! !\\\\n\\\\n!Object methodsFor: 'copying' stamp: 'tk 8/20/1998 16:01'!\\\\ncopyAddedStateFrom: anotherObject\\\\n\\\\t\\\\\\\"Copy over the values of instance variables added by the receiver's class from anotherObject to the receiver.  These will be remapped in mapUniClasses, if needed.\\\\\\\"\\\\n\\\\n\\\\tself class superclass instSize + 1 to: self class instSize do:\\\\n\\\\t\\\\t[:index | self instVarAt: index put: (anotherObject instVarAt: index)]! !\\\\n\\\\n!Object methodsFor: 'copying' stamp: 'tpr 2/14/2004 21:53'!\\\\ncopyFrom: anotherObject\\\\n\\\\t\\\\\\\"Copy to myself all instance variables I have in common with anotherObject.  This is dangerous because it ignores an object's control over its own inst vars.  \\\\\\\"\\\\n\\\\n\\\\t| mine his |\\\\n\\\\t<primitive: 168>\\\\n\\\\tmine _ self class allInstVarNames.\\\\n\\\\this _ anotherObject class allInstVarNames.\\\\n\\\\t1 to: (mine size min: his size) do: [:ind |\\\\n\\\\t\\\\t(mine at: ind) = (his at: ind) ifTrue: [\\\\n\\\\t\\\\t\\\\tself instVarAt: ind put: (anotherObject instVarAt: ind)]].\\\\n\\\\tself class isVariable & anotherObject class isVariable ifTrue: [\\\\n\\\\t\\\\t1 to: (self basicSize min: anotherObject basicSize) do: [:ind |\\\\n\\\\t\\\\t\\\\tself basicAt: ind put: (anotherObject basicAt: ind)]].! !\\\\n\\\\n!Object methodsFor: 'copying' stamp: 'ajh 5/23/2002 00:38'!\\\\ncopySameFrom: otherObject\\\\n\\\\t\\\\\\\"Copy to myself all instance variables named the same in otherObject.\\\\n\\\\tThis ignores otherObject's control over its own inst vars.\\\\\\\"\\\\n\\\\n\\\\t| myInstVars otherInstVars match |\\\\n\\\\tmyInstVars _ self class allInstVarNames.\\\\n\\\\totherInstVars _ otherObject class allInstVarNames.\\\\n\\\\tmyInstVars doWithIndex: [:each :index |\\\\n\\\\t\\\\t(match _ otherInstVars indexOf: each) > 0 ifTrue:\\\\n\\\\t\\\\t\\\\t[self instVarAt: index put: (otherObject instVarAt: match)]].\\\\n\\\\t1 to: (self basicSize min: otherObject basicSize) do: [:i |\\\\n\\\\t\\\\tself basicAt: i put: (otherObject basicAt: i)].\\\\n! !\\\\n\\\\n!Object methodsFor: 'copying' stamp: 'tk 4/20/1999 14:44'!\\\\ncopyTwoLevel\\\\n\\\\t\\\\\\\"one more level than a shallowCopy\\\\\\\"\\\\n\\\\n\\\\t| newObject class index |\\\\n\\\\tclass _ self class.\\\\n\\\\tnewObject _ self clone.\\\\n\\\\tnewObject == self ifTrue: [^ self].\\\\n\\\\tclass isVariable\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[index _ self basicSize.\\\\n\\\\t\\\\t\\\\t[index > 0]\\\\n\\\\t\\\\t\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[newObject basicAt: index put: (self basicAt: index) shallowCopy.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tindex _ index - 1]].\\\\n\\\\tindex _ class instSize.\\\\n\\\\t[index > 0]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[newObject instVarAt: index put: (self instVarAt: index) shallowCopy.\\\\n\\\\t\\\\t\\\\tindex _ index - 1].\\\\n\\\\t^newObject! !\\\\n\\\\n!Object methodsFor: 'copying'!\\\\ndeepCopy\\\\n\\\\t\\\\\\\"Answer a copy of the receiver with its own copy of each instance \\\\n\\\\tvariable.\\\\\\\"\\\\n\\\\n\\\\t| newObject class index |\\\\n\\\\tclass _ self class.\\\\n\\\\t(class == Object) ifTrue: [^self].\\\\n\\\\tclass isVariable\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[index _ self basicSize.\\\\n\\\\t\\\\t\\\\tnewObject _ class basicNew: index.\\\\n\\\\t\\\\t\\\\t[index > 0]\\\\n\\\\t\\\\t\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[newObject basicAt: index put: (self basicAt: index) deepCopy.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tindex _ index - 1]]\\\\n\\\\t\\\\tifFalse: [newObject _ class basicNew].\\\\n\\\\tindex _ class instSize.\\\\n\\\\t[index > 0]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[newObject instVarAt: index put: (self instVarAt: index) deepCopy.\\\\n\\\\t\\\\t\\\\tindex _ index - 1].\\\\n\\\\t^newObject! !\\\\n\\\\n!Object methodsFor: 'copying' stamp: 'hg 11/23/1999 13:43'!\\\\ninitialDeepCopierSize\\\\n\\\\t\\\\\\\"default value is 4096; other classes may override this, esp. for smaller (=faster) sizes\\\\\\\"\\\\n\\\\n\\\\t^4096! !\\\\n\\\\n!Object methodsFor: 'copying' stamp: 'ajh 1/27/2003 18:45'!\\\\npostCopy\\\\n\\\\t\\\\\\\"self is a shallow copy, subclasses should copy fields as necessary to complete the full copy\\\\\\\"\\\\n\\\\n\\\\t^ self! !\\\\n\\\\n!Object methodsFor: 'copying' stamp: 'jm 11/14/97 11:08'!\\\\nshallowCopy\\\\n\\\\t\\\\\\\"Answer a copy of the receiver which shares the receiver's instance variables.\\\\\\\"\\\\n\\\\t| class newObject index |\\\\n\\\\t<primitive: 148>\\\\n\\\\tclass _ self class.\\\\n\\\\tclass isVariable\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[index _ self basicSize.\\\\n\\\\t\\\\t\\\\tnewObject _ class basicNew: index.\\\\n\\\\t\\\\t\\\\t[index > 0]\\\\n\\\\t\\\\t\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[newObject basicAt: index put: (self basicAt: index).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tindex _ index - 1]]\\\\n\\\\t\\\\tifFalse: [newObject _ class basicNew].\\\\n\\\\tindex _ class instSize.\\\\n\\\\t[index > 0]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[newObject instVarAt: index put: (self instVarAt: index).\\\\n\\\\t\\\\t\\\\tindex _ index - 1].\\\\n\\\\t^ newObject! !\\\\n\\\\n!Object methodsFor: 'copying' stamp: 'tk 3/11/2003 13:58'!\\\\nveryDeepCopy\\\\n\\\\t\\\\\\\"Do a complete tree copy using a dictionary.  An object in the tree twice is only copied once.  All references to the object in the copy of the tree will point to the new copy.\\\\\\\"\\\\n\\\\n\\\\t| copier new |\\\\n\\\\tcopier _ DeepCopier new initialize: self initialDeepCopierSize.\\\\n\\\\tnew _ self veryDeepCopyWith: copier.\\\\n\\\\tcopier mapUniClasses.\\\\n\\\\tcopier references associationsDo: [:assoc | \\\\n\\\\t\\\\tassoc value veryDeepFixupWith: copier].\\\\n\\\\tcopier fixDependents.\\\\n\\\\t^ new! !\\\\n\\\\n!Object methodsFor: 'copying' stamp: 'tk 3/11/2003 13:58'!\\\\nveryDeepCopySibling\\\\n\\\\t\\\\\\\"Do a complete tree copy using a dictionary.  Substitute a clone of oldPlayer for the root.  Normally, a Player or non systemDefined object would have a new class.  We do not want one this time.  An object in the tree twice, is only copied once.  All references to the object in the copy of the tree will point to the new copy.\\\\\\\"\\\\n\\\\n\\\\t| copier new |\\\\n\\\\tcopier _ DeepCopier new initialize: self initialDeepCopierSize.\\\\n\\\\tcopier newUniClasses: false.\\\\n\\\\tnew _ self veryDeepCopyWith: copier.\\\\n\\\\tcopier mapUniClasses.\\\\n\\\\tcopier references associationsDo: [:assoc | \\\\n\\\\t\\\\tassoc value veryDeepFixupWith: copier].\\\\n\\\\tcopier fixDependents.\\\\n\\\\t^ new! !\\\\n\\\\n!Object methodsFor: 'copying' stamp: 'tk 5/13/2003 19:39'!\\\\nveryDeepCopyUsing: copier\\\\n\\\\t\\\\\\\"Do a complete tree copy using a dictionary.  An object in the tree twice is only copied once.  All references to the object in the copy of the tree will point to the new copy.\\\\n\\\\tSame as veryDeepCopy except copier (with dictionary) is supplied.\\\\n\\\\t** do not delete this method, even if it has no callers **\\\\\\\"\\\\n\\\\n\\\\t| new refs newDep newModel |\\\\n\\\\tnew _ self veryDeepCopyWith: copier.\\\\n\\\\tcopier mapUniClasses.\\\\n\\\\tcopier references associationsDo: [:assoc | \\\\n\\\\t\\\\tassoc value veryDeepFixupWith: copier].\\\\n\\\\t\\\\\\\"Fix dependents\\\\\\\"\\\\n\\\\trefs _ copier references.\\\\n\\\\tDependentsFields associationsDo: [:pair |\\\\n\\\\t\\\\tpair value do: [:dep | \\\\n\\\\t\\\\t\\\\t(newDep _ refs at: dep ifAbsent: [nil]) ifNotNil: [\\\\n\\\\t\\\\t\\\\t\\\\tnewModel _ refs at: pair key ifAbsent: [pair key].\\\\n\\\\t\\\\t\\\\t\\\\tnewModel addDependent: newDep]]].\\\\n\\\\t^ new! !\\\\n\\\\n!Object methodsFor: 'copying' stamp: 'tk 3/11/2003 14:12'!\\\\nveryDeepCopyWith: deepCopier\\\\n\\\\t\\\\\\\"Copy me and the entire tree of objects I point to.  An object in the tree twice is copied once, and both references point to him.  deepCopier holds a dictionary of objects we have seen.  Some classes refuse to be copied.  Some classes are picky about which fields get deep copied.\\\\\\\"\\\\n\\\\t| class index sub subAss new uc sup has mine |\\\\n\\\\tdeepCopier references at: self ifPresent: [:newer | ^ newer]. \\\\t\\\\\\\"already did him\\\\\\\"\\\\n\\\\tclass _ self class.\\\\n\\\\tclass isMeta ifTrue: [^ self].\\\\t\\\\t\\\\\\\"a class\\\\\\\"\\\\n\\\\tnew _ self clone.\\\\n\\\\t(class isSystemDefined not and: [deepCopier newUniClasses \\\\\\\"allowed\\\\\\\"]) ifTrue: [\\\\n\\\\t\\\\tuc _ deepCopier uniClasses at: class ifAbsent: [nil].\\\\n\\\\t\\\\tuc ifNil: [\\\\n\\\\t\\\\t\\\\tdeepCopier uniClasses at: class put: (uc _ self copyUniClassWith: deepCopier).\\\\n\\\\t\\\\t\\\\tdeepCopier references at: class put: uc].\\\\t\\\\\\\"remember\\\\\\\"\\\\n\\\\t\\\\tnew _ uc new.\\\\n\\\\t\\\\tnew copyFrom: self].\\\\t\\\\\\\"copy inst vars in case any are weak\\\\\\\"\\\\n\\\\tdeepCopier references at: self put: new.\\\\t\\\\\\\"remember\\\\\\\"\\\\n\\\\t(class isVariable and: [class isPointers]) ifTrue: \\\\n\\\\t\\\\t[index _ self basicSize.\\\\n\\\\t\\\\t[index > 0] whileTrue: \\\\n\\\\t\\\\t\\\\t[sub _ self basicAt: index.\\\\n\\\\t\\\\t\\\\t(subAss _ deepCopier references associationAt: sub ifAbsent: [nil])\\\\n\\\\t\\\\t\\\\t\\\\tifNil: [new basicAt: index put: (sub veryDeepCopyWith: deepCopier)]\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil: [new basicAt: index put: subAss value].\\\\n\\\\t\\\\t\\\\tindex _ index - 1]].\\\\n\\\\t\\\\\\\"Ask each superclass if it wants to share (weak copy) any inst vars\\\\\\\"\\\\n\\\\tnew veryDeepInner: deepCopier.\\\\t\\\\t\\\\\\\"does super a lot\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"other superclasses want all inst vars deep copied\\\\\\\"\\\\n\\\\tsup _ class.  index _ class instSize.\\\\n\\\\t[has _ sup compiledMethodAt: #veryDeepInner: ifAbsent: [nil].\\\\n\\\\thas _ has ifNil: [class isSystemDefined not \\\\\\\"is a uniClass\\\\\\\"] ifNotNil: [true].\\\\n\\\\tmine _ sup instVarNames.\\\\n\\\\thas ifTrue: [index _ index - mine size]\\\\t\\\\\\\"skip inst vars\\\\\\\"\\\\n\\\\t\\\\tifFalse: [1 to: mine size do: [:xx |\\\\n\\\\t\\\\t\\\\t\\\\tsub _ self instVarAt: index.\\\\n\\\\t\\\\t\\\\t\\\\t(subAss _ deepCopier references associationAt: sub ifAbsent: [nil])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"use association, not value, so nil is an exceptional value\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifNil: [new instVarAt: index put: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(sub veryDeepCopyWith: deepCopier)]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifNotNil: [new instVarAt: index put: subAss value].\\\\n\\\\t\\\\t\\\\t\\\\tindex _ index - 1]].\\\\n\\\\t(sup _ sup superclass) == nil] whileFalse.\\\\n\\\\tnew rehash.\\\\t\\\\\\\"force Sets and Dictionaries to rehash\\\\\\\"\\\\n\\\\t^ new\\\\n! !\\\\n\\\\n!Object methodsFor: 'copying' stamp: 'tk 1/6/1999 17:39'!\\\\nveryDeepFixupWith: deepCopier\\\\n\\\\t\\\\\\\"I have no fields and no superclass.  Catch the super call.\\\\\\\"\\\\n! !\\\\n\\\\n!Object methodsFor: 'copying' stamp: 'tk 9/4/2001 10:30'!\\\\nveryDeepInner: deepCopier\\\\n\\\\t\\\\\\\"No special treatment for inst vars of my superclasses.  Override when some need to be weakly copied.  Object>>veryDeepCopyWith: will veryDeepCopy any inst var whose class does not actually define veryDeepInner:\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!Object methodsFor: 'creation' stamp: 'nk 2/26/2004 13:33'!\\\\nasMorph\\\\n\\\\t\\\\\\\"Open a morph, as best one can, on the receiver\\\\\\\"\\\\n\\\\n\\\\t^ self asStringMorph\\\\n\\\\n\\\\t\\\\\\\"\\\\n234 asMorph\\\\n(ScriptingSystem formAtKey: #TinyMenu) asMorph\\\\n'fred' asMorph\\\\n\\\\\\\"\\\\n\\\\n! !\\\\n\\\\n!Object methodsFor: 'creation' stamp: 'nk 2/26/2004 13:35'!\\\\nasStringMorph\\\\n\\\\t\\\\\\\"Open a StringMorph, as best one can, on the receiver\\\\\\\"\\\\n\\\\n\\\\t^ self asStringOrText asStringMorph\\\\n! !\\\\n\\\\n!Object methodsFor: 'creation' stamp: 'nk 2/26/2004 13:35'!\\\\nasTextMorph\\\\n\\\\t\\\\\\\"Open a TextMorph, as best one can, on the receiver\\\\\\\"\\\\n\\\\n\\\\t^ TextMorph new contentsAsIs: self asStringOrText\\\\n! !\\\\n\\\\n!Object methodsFor: 'creation' stamp: 'sw 1/29/2002 21:45'!\\\\nopenAsMorph\\\\n\\\\t\\\\\\\"Open a morph, as best one can, on the receiver\\\\\\\"\\\\n\\\\n\\\\t^ self asMorph openInHand\\\\n\\\\n\\\\\\\"\\\\n234 openAsMorph\\\\n(ScriptingSystem formAtKey: #TinyMenu) openAsMorph\\\\n'fred' openAsMorph\\\\n\\\\\\\"! !\\\\n\\\\n\\\\n!Object methodsFor: 'debugging' stamp: 'md 11/24/2004 11:45'!\\\\nhaltIf: condition\\\\n\\\\t\\\\\\\"This is the typical message to use for inserting breakpoints during \\\\n\\\\tdebugging.  Param can be a block or expression, halt if true.\\\\n\\\\tIf the Block has one arg, the receiver is bound to that.\\\\n \\\\tIf the condition is a selector, we look up in the callchain. Halt if\\\\n      any method's selector equals selector.\\\\\\\"\\\\n\\\\t| cntxt |\\\\n\\\\n\\\\tcondition isSymbol ifTrue:[\\\\n\\\\t\\\\t\\\\\\\"only halt if a method with selector symbol is in callchain\\\\\\\"\\\\n\\\\t\\\\tcntxt := thisContext.\\\\n\\\\t\\\\t[cntxt sender isNil] whileFalse: [\\\\n\\\\t\\\\t\\\\tcntxt := cntxt sender. \\\\n\\\\t\\\\t\\\\t(cntxt selector = condition) ifTrue: [Halt signal].\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t^self.\\\\n\\\\t].\\\\n\\\\t(condition isBlock \\\\n\\\\t\\\\t\\\\tifTrue: [condition valueWithPossibleArgument: self] \\\\n\\\\t\\\\t\\\\tifFalse: [condition] \\\\n\\\\t) ifTrue: [\\\\n\\\\t\\\\tHalt signal\\\\n\\\\t].! !\\\\n\\\\n!Object methodsFor: 'debugging'!\\\\nneedsWork! !\\\\n\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 6/2/2004 08:26'!\\\\ncheckHaltCountExpired\\\\n\\\\t| counter |\\\\n\\\\tcounter _ Smalltalk at: #HaltCount ifAbsent: [0].\\\\n\\\\t^counter = 0! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 5/19/2004 19:04'!\\\\nclearHaltOnce\\\\n\\\\t\\\\\\\"Turn on the halt once flag.\\\\\\\"\\\\n\\\\tSmalltalk at: #HaltOnce put: false! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 6/2/2004 08:30'!\\\\ndecrementAndCheckHaltCount\\\\n\\\\tself decrementHaltCount.\\\\n\\\\t^self checkHaltCountExpired! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 6/2/2004 08:28'!\\\\ndecrementHaltCount\\\\n\\\\t| counter |\\\\n\\\\tcounter := Smalltalk\\\\n\\\\t\\\\t\\\\t\\\\tat: #HaltCount\\\\n\\\\t\\\\t\\\\t\\\\tifAbsent: [0].\\\\n\\\\tcounter > 0 ifTrue: [\\\\n\\\\t\\\\tcounter _ counter - 1.\\\\n\\\\t\\\\tself setHaltCountTo: counter]! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 6/2/2004 08:42'!\\\\ndoExpiredHaltCount\\\\n\\\\tself clearHaltOnce.\\\\n\\\\tself removeHaltCount.\\\\n\\\\tself halt! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 6/2/2004 08:44'!\\\\ndoExpiredHaltCount: aString\\\\n\\\\tself clearHaltOnce.\\\\n\\\\tself removeHaltCount.\\\\n\\\\tself halt: aString! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 6/2/2004 08:45'!\\\\ndoExpiredInspectCount\\\\n\\\\tself clearHaltOnce.\\\\n\\\\tself removeHaltCount.\\\\n\\\\tself inspect! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 6/2/2004 08:43'!\\\\nhaltOnCount: int \\\\n\\\\tself haltOnceEnabled\\\\n\\\\t\\\\tifTrue: [self hasHaltCount\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self decrementAndCheckHaltCount\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self doExpiredHaltCount]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [int = 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self doExpiredHaltCount]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [self setHaltCountTo: int - 1]]]! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 5/19/2004 19:05'!\\\\nhaltOnce\\\\n\\\\t\\\\\\\"Halt unless we have already done it once.\\\\\\\"\\\\n\\\\tself haltOnceEnabled\\\\n\\\\t\\\\tifTrue: [self clearHaltOnce.\\\\n\\\\t\\\\t\\\\t^ self halt]! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 5/19/2004 19:04'!\\\\nhaltOnceEnabled\\\\n\\\\t^ Smalltalk\\\\n\\\\t\\\\tat: #HaltOnce\\\\n\\\\t\\\\tifAbsent: [false]! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 5/19/2004 19:05'!\\\\nhaltOnce: aString \\\\n\\\\t\\\\\\\"Halt unless we have already done it once.\\\\\\\"\\\\n\\\\tself haltOnceEnabled\\\\n\\\\t\\\\tifTrue: [self clearHaltOnce.\\\\n\\\\t\\\\t\\\\t^ self halt: aString]! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 6/2/2004 08:45'!\\\\nhalt: aString onCount: int \\\\n\\\\tself haltOnceEnabled\\\\n\\\\t\\\\tifTrue: [self hasHaltCount\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self decrementAndCheckHaltCount\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self doExpiredHaltCount: aString]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [int = 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self doExpiredHaltCount: aString]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [self setHaltCountTo: int - 1]]]! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 6/2/2004 08:36'!\\\\nhasHaltCount\\\\n\\\\t^Smalltalk\\\\n\\\\t\\\\t\\\\t\\\\tincludesKey: #HaltCount! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 6/2/2004 08:46'!\\\\ninspectOnCount: int \\\\n\\\\tself haltOnceEnabled\\\\n\\\\t\\\\tifTrue: [self hasHaltCount\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self decrementAndCheckHaltCount\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self doExpiredInspectCount]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [int = 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self doExpiredInspectCount]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [self setHaltCountTo: int - 1]]]! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 5/19/2004 19:05'!\\\\ninspectOnce\\\\n\\\\t\\\\\\\"Inspect unless we have already done it once.\\\\\\\"\\\\n\\\\tself haltOnceEnabled\\\\n\\\\t\\\\tifTrue: [self clearHaltOnce.\\\\n\\\\t\\\\t\\\\t^ self inspect]! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 6/2/2004 13:20'!\\\\ninspectUntilCount: int \\\\n\\\\tself haltOnceEnabled\\\\n\\\\t\\\\tifTrue: [self hasHaltCount\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self decrementAndCheckHaltCount\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self doExpiredInspectCount]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [self inspect]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [int = 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self doExpiredInspectCount]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [self setHaltCountTo: int - 1]]]! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 6/2/2004 08:49'!\\\\nremoveHaltCount\\\\n\\\\t(Smalltalk includesKey: #HaltCount) ifTrue: [\\\\n\\\\t\\\\tSmalltalk removeKey: #HaltCount]! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 6/2/2004 08:25'!\\\\nsetHaltCountTo: int\\\\n\\\\tSmalltalk at: #HaltCount put: int! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 5/19/2004 19:04'!\\\\nsetHaltOnce\\\\n\\\\t\\\\\\\"Turn on the halt once flag.\\\\\\\"\\\\n\\\\tSmalltalk at: #HaltOnce put: true! !\\\\n\\\\n!Object methodsFor: 'debugging-haltOnce' stamp: 'sbw 5/19/2004 19:04'!\\\\ntoggleHaltOnce\\\\n\\\\tself haltOnceEnabled\\\\n\\\\t\\\\tifTrue: [self clearHaltOnce]\\\\n\\\\t\\\\tifFalse: [self setHaltOnce]! !\\\\n\\\\n\\\\n!Object methodsFor: 'dependents access' stamp: 'ar 2/11/2001 01:55'!\\\\naddDependent: anObject\\\\n\\\\t\\\\\\\"Make the given object one of the receiver's dependents.\\\\\\\"\\\\n\\\\n\\\\t| dependents |\\\\n\\\\tdependents _ self dependents.\\\\n\\\\t(dependents includes: anObject) ifFalse:\\\\n\\\\t\\\\t[self myDependents: (dependents copyWithDependent: anObject)].\\\\n\\\\t^ anObject! !\\\\n\\\\n!Object methodsFor: 'dependents access' stamp: 'sma 2/29/2000 19:53'!\\\\nbreakDependents\\\\n\\\\t\\\\\\\"Remove all of the receiver's dependents.\\\\\\\"\\\\n\\\\n\\\\tself myDependents: nil! !\\\\n\\\\n!Object methodsFor: 'dependents access' stamp: 'sma 2/29/2000 19:26'!\\\\ncanDiscardEdits\\\\n\\\\t\\\\\\\"Answer true if none of the views on this model has unaccepted edits that matter.\\\\\\\"\\\\n\\\\n\\\\tself dependents\\\\n\\\\t\\\\tdo: [:each | each canDiscardEdits ifFalse: [^ false]]\\\\n\\\\t\\\\twithout: self.\\\\n\\\\t^ true! !\\\\n\\\\n!Object methodsFor: 'dependents access' stamp: 'sma 2/29/2000 19:58'!\\\\ndependents\\\\n\\\\t\\\\\\\"Answer a collection of objects that are 'dependent' on the receiver;\\\\n\\\\t that is, all objects that should be notified if the receiver changes.\\\\\\\"\\\\n\\\\n\\\\t^ self myDependents ifNil: [#()]! !\\\\n\\\\n!Object methodsFor: 'dependents access'!\\\\nevaluate: actionBlock wheneverChangeIn: aspectBlock\\\\n\\\\t| viewerThenObject objectThenViewer |\\\\n\\\\tobjectThenViewer _ self.\\\\n\\\\tviewerThenObject _ ObjectViewer on: objectThenViewer.\\\\n\\\\tobjectThenViewer become: viewerThenObject.\\\\n\\\\t\\\\\\\"--- Then ---\\\\\\\"\\\\n\\\\tobjectThenViewer xxxViewedObject: viewerThenObject\\\\n\\\\t\\\\t\\\\tevaluate: actionBlock\\\\n\\\\t\\\\t\\\\twheneverChangeIn: aspectBlock! !\\\\n\\\\n!Object methodsFor: 'dependents access' stamp: 'sma 2/29/2000 19:59'!\\\\nhasUnacceptedEdits\\\\n\\\\t\\\\\\\"Answer true if any of the views on this object has unaccepted edits.\\\\\\\"\\\\n\\\\n\\\\tself dependents\\\\n\\\\t\\\\tdo: [:each | each hasUnacceptedEdits ifTrue: [^ true]]\\\\n\\\\t\\\\twithout: self.\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'dependents access' stamp: 'sma 2/29/2000 19:55'!\\\\nmyDependents\\\\n\\\\t\\\\\\\"Private. Answer a list of all the receiver's dependents.\\\\\\\"\\\\n\\\\n\\\\t^ DependentsFields at: self ifAbsent: []! !\\\\n\\\\n!Object methodsFor: 'dependents access' stamp: 'sma 2/29/2000 19:52'!\\\\nmyDependents: aCollectionOrNil\\\\n\\\\t\\\\\\\"Private. Set (or remove) the receiver's dependents list.\\\\\\\"\\\\n\\\\n\\\\taCollectionOrNil\\\\n\\\\t\\\\tifNil: [DependentsFields removeKey: self ifAbsent: []]\\\\n\\\\t\\\\tifNotNil: [DependentsFields at: self put: aCollectionOrNil]! !\\\\n\\\\n!Object methodsFor: 'dependents access' stamp: 'reThink 2/18/2001 17:06'!\\\\nrelease\\\\n\\\\t\\\\\\\"Remove references to objects that may refer to the receiver. This message \\\\n\\\\tshould be overridden by subclasses with any cycles, in which case the \\\\n\\\\tsubclass should also include the expression super release.\\\\\\\"\\\\n\\\\n\\\\tself releaseActionMap! !\\\\n\\\\n!Object methodsFor: 'dependents access' stamp: 'sma 2/29/2000 20:23'!\\\\nremoveDependent: anObject\\\\n\\\\t\\\\\\\"Remove the given object as one of the receiver's dependents.\\\\\\\"\\\\n\\\\n\\\\t| dependents |\\\\n\\\\tdependents _ self dependents reject: [:each | each == anObject].\\\\n\\\\tself myDependents: (dependents isEmpty ifFalse: [dependents]).\\\\n\\\\t^ anObject! !\\\\n\\\\n\\\\n!Object methodsFor: 'drag and drop' stamp: 'bh 9/16/2001 18:10'!\\\\nacceptDroppingMorph: transferMorph event: evt inMorph: dstListMorph \\\\n\\\\t\\\\n\\\\t^false.! !\\\\n\\\\n!Object methodsFor: 'drag and drop' stamp: 'mir 5/16/2000 11:35'!\\\\ndragAnimationFor: item transferMorph: transferMorph \\\\n\\\\t\\\\\\\"Default do nothing\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'drag and drop' stamp: 'panda 4/28/2000 16:20'!\\\\ndragPassengerFor: item inMorph: dragSource \\\\n\\\\t^item! !\\\\n\\\\n!Object methodsFor: 'drag and drop' stamp: 'panda 4/28/2000 16:11'!\\\\ndragTransferType\\\\n\\\\t^nil! !\\\\n\\\\n!Object methodsFor: 'drag and drop' stamp: 'panda 4/28/2000 16:05'!\\\\ndragTransferTypeForMorph: dragSource \\\\n\\\\t^nil! !\\\\n\\\\n!Object methodsFor: 'drag and drop' stamp: 'mir 5/8/2000 17:19'!\\\\nwantsDroppedMorph: aMorph event: anEvent inMorph: destinationLM \\\\n\\\\t^false! !\\\\n\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'sma 5/6/2000 19:35'!\\\\nassert: aBlock\\\\n\\\\t\\\\\\\"Throw an assertion error if aBlock does not evaluates to true.\\\\\\\"\\\\n\\\\n\\\\taBlock value ifFalse: [AssertionFailure signal: 'Assertion failed']! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'nk 1/15/2004 10:54'!\\\\nassert: aBlock descriptionBlock: descriptionBlock\\\\n\\\\t\\\\\\\"Throw an assertion error if aBlock does not evaluate to true.\\\\\\\"\\\\n\\\\n\\\\taBlock value ifFalse: [AssertionFailure signal: descriptionBlock value asString ]! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'nk 10/25/2003 16:47'!\\\\nassert: aBlock description: aString\\\\n\\\\t\\\\\\\"Throw an assertion error if aBlock does not evaluates to true.\\\\\\\"\\\\n\\\\n\\\\taBlock value ifFalse: [AssertionFailure signal: aString ]! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'md 10/13/2004 15:59'!\\\\nbackwardCompatibilityOnly: anExplanationString\\\\n\\\\t\\\\\\\"Warn that the sending method has been deprecated. Methods that are tagt with #backwardCompatibility:\\\\n\\\\t are kept for compatibility.\\\\\\\"\\\\n\\\\n\\\\tPreferences showDeprecationWarnings ifTrue:\\\\n\\\\t\\\\t[Deprecation signal: thisContext sender printString, ' has been deprecated (but will be kept for compatibility). ', anExplanationString]! !\\\\n\\\\n!Object methodsFor: 'error handling'!\\\\ncaseError\\\\n\\\\t\\\\\\\"Report an error from an in-line or explicit case statement.\\\\\\\"\\\\n\\\\n\\\\tself error: 'Case not found, and no otherwise clause'! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'rbb 3/1/2005 09:26'!\\\\nconfirm: queryString\\\\n\\\\t\\\\\\\"Put up a yes/no menu with caption queryString. Answer true if the \\\\n\\\\tresponse is yes, false if no. This is a modal question--the user must \\\\n\\\\trespond yes or no.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"nil confirm: 'Are you hungry?'\\\\\\\"\\\\n\\\\n\\\\t^ UIManager default confirm: queryString! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'rbb 3/1/2005 09:27'!\\\\nconfirm: aString orCancel: cancelBlock\\\\n\\\\t\\\\\\\"Put up a yes/no/cancel menu with caption aString. Answer true if  \\\\n\\\\tthe response is yes, false if no. If cancel is chosen, evaluate  \\\\n\\\\tcancelBlock. This is a modal question--the user must respond yes or no.\\\\\\\"\\\\n\\\\n\\\\t^ UIManager default confirm: aString orCancel: cancelBlock! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'dew 10/6/2003 18:20'!\\\\ndeprecated: anExplanationString\\\\n\\\\t\\\\\\\"Warn that the sending method has been deprecated.\\\\\\\"\\\\n\\\\n\\\\tPreferences showDeprecationWarnings ifTrue:\\\\n\\\\t\\\\t[Deprecation signal: thisContext sender printString, ' has been deprecated. ', anExplanationString]! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'dew 10/7/2003 00:26'!\\\\ndeprecated: anExplanationString block: aBlock \\\\n\\\\t \\\\\\\"Warn that the sender has been deprecated.  Answer the value of aBlock on resumption.  (Note that #deprecated: is usually the preferred method.)\\\\\\\"\\\\n\\\\n\\\\tPreferences showDeprecationWarnings ifTrue:\\\\n\\\\t\\\\t[Deprecation\\\\n\\\\t\\\\t\\\\tsignal: thisContext sender printString, ' has been deprecated. ', anExplanationString].\\\\n\\\\t^ aBlock value.\\\\n! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'md 2/22/2006 21:21'!\\\\ndoesNotUnderstand: aMessage \\\\n\\\\t \\\\\\\"Handle the fact that there was an attempt to send the given message to the receiver but the receiver does not understand this message (typically sent from the machine when a message is sent to the receiver and no method is defined for that selector).\\\\\\\"\\\\n\\\\t\\\\\\\"Testing: (3 activeProcess)\\\\\\\"\\\\n\\\\n\\\\tMessageNotUnderstood new \\\\n\\\\t\\\\tmessage: aMessage;\\\\n\\\\t\\\\treceiver: self;\\\\n\\\\t\\\\tsignal.\\\\n\\\\t^ aMessage sentTo: self.\\\\n! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'TRee 11/4/2003 16:47'!\\\\ndpsTrace: reportObject  \\\\n\\\\tTranscript myDependents isNil ifTrue: [^self].\\\\n\\\\tself dpsTrace: reportObject levels: 1 withContext: thisContext\\\\n\\\\t\\\\t\\\\n\\\\\\\" nil dpsTrace: 'sludder'. \\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'TRee 11/4/2003 16:49'!\\\\ndpsTrace: reportObject levels: anInt\\\\n\\\\tself dpsTrace: reportObject levels: anInt withContext: thisContext\\\\n\\\\n\\\\\\\"(1 to: 3) do: [:int | nil dpsTrace: int levels: 5.]\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'TRee 11/4/2003 17:02'!\\\\ndpsTrace: reportObject levels: anInt withContext: currentContext\\\\n\\\\t| reportString context displayCount |\\\\n\\\\treportString := (reportObject respondsTo: #asString) \\\\n\\\\t\\\\t\\\\tifTrue: [reportObject asString] ifFalse: [reportObject printString].\\\\n\\\\t(Smalltalk at: #Decompiler ifAbsent: [nil]) \\\\n\\\\tifNil: \\\\n\\\\t\\\\t[Transcript cr; show: reportString]\\\\n\\\\tifNotNil:\\\\n\\\\t\\\\t[context := currentContext.\\\\n\\\\t\\\\tdisplayCount := anInt > 1.\\\\n\\\\t\\\\t1 to: anInt do:\\\\n\\\\t\\\\t\\\\t[:count |\\\\n\\\\t\\\\t\\\\tTranscript cr.\\\\n\\\\t\\\\t\\\\tdisplayCount\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [Transcript show: count printString, ': '].\\\\n\\\\t\\\\t\\\\t\\\\n\\\\t\\\\t\\\\treportString notNil\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[Transcript show: context home class name \\\\n\\\\t\\\\t\\\\t, '/' , context sender selector,  ' (' , reportString , ')'.\\\\n\\\\t\\\\t\\\\t\\\\tcontext := context sender.\\\\n\\\\t\\\\t\\\\t\\\\treportString := nil]\\\\n\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[(context notNil and: [(context := context sender) notNil])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [Transcript show: context receiver class name , '/' , context selector]]].\\\\n\\\\t\\\\t\\\\\\\"Transcript cr\\\\\\\"].! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'md 8/2/2005 22:17'!\\\\nerror\\\\n\\\\t\\\\\\\"Throw a generic Error exception.\\\\\\\"\\\\n\\\\n\\\\t^self error: 'Error!!'.! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'tfei 4/12/1999 12:55'!\\\\nerror: aString \\\\n\\\\t\\\\\\\"Throw a generic Error exception.\\\\\\\"\\\\n\\\\n\\\\t^Error new signal: aString! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'al 9/16/2005 14:12'!\\\\nexplicitRequirement\\\\n\\\\tself error: 'Explicitly required method'! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'al 2/13/2006 22:20'!\\\\nhalt\\\\n\\\\t\\\\\\\"This is the typical message to use for inserting breakpoints during \\\\n\\\\tdebugging. It behaves like halt:, but does not call on halt: in order to \\\\n\\\\tavoid putting this message on the stack. Halt is especially useful when \\\\n\\\\tthe breakpoint message is an arbitrary one.\\\\\\\"\\\\n\\\\n\\\\tHalt signal! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'tfei 4/12/1999 12:59'!\\\\nhalt: aString \\\\n\\\\t\\\\\\\"This is the typical message to use for inserting breakpoints during \\\\n\\\\tdebugging. It creates and schedules a Notifier with the argument, \\\\n\\\\taString, as the label.\\\\\\\"\\\\n\\\\t\\\\n\\\\tHalt new signal: aString! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'md 1/20/2006 16:24'!\\\\nhandles: exception\\\\n\\\\t\\\\\\\"This method exists in case a non exception class is the first arg in an on:do: (for instance using a exception class that is not loaded). We prefer this to raising an error during error handling itself. Also, semantically it makes sense that the exception handler is not active if its exception class is not loaded\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'ar 9/27/2005 20:24'!\\\\nnotifyWithLabel: aString \\\\n\\\\t\\\\\\\"Create and schedule a Notifier with aString as the window label as well as the contents of the window, in  order to request confirmation before a process can proceed.\\\\\\\"\\\\n\\\\n\\\\tToolSet\\\\n\\\\t\\\\tdebugContext: thisContext\\\\n\\\\t\\\\tlabel: aString\\\\n\\\\t\\\\tcontents: aString\\\\n\\\\n\\\\t\\\\\\\"nil notifyWithLabel: 'let us see if this works'\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'hg 10/2/2001 20:49'!\\\\nnotify: aString \\\\n\\\\t\\\\\\\"Create and schedule a Notifier with the argument as the message in \\\\n\\\\torder to request confirmation before a process can proceed.\\\\\\\"\\\\n\\\\n\\\\tWarning signal: aString\\\\n\\\\n\\\\t\\\\\\\"nil notify: 'confirmation message'\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'error handling'!\\\\nnotify: aString at: location\\\\n\\\\t\\\\\\\"Create and schedule a Notifier with the argument as the message in \\\\n\\\\torder to request confirmation before a process can proceed. Subclasses can\\\\n\\\\toverride this and insert an error message at location within aString.\\\\\\\"\\\\n\\\\n\\\\tself notify: aString\\\\n\\\\n\\\\t\\\\\\\"nil notify: 'confirmation message' at: 12\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'error handling'!\\\\nprimitiveFailed\\\\n\\\\t\\\\\\\"Announce that a primitive has failed and there is no appropriate \\\\n\\\\tSmalltalk code to run.\\\\\\\"\\\\n\\\\n\\\\tself error: 'a primitive has failed'! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'al 9/16/2005 14:12'!\\\\nrequirement\\\\n\\\\tself error: 'Implicitly required method'! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'AFi 2/8/2003 22:52'!\\\\nshouldBeImplemented\\\\n\\\\t\\\\\\\"Announce that this message should be implemented\\\\\\\"\\\\n\\\\n\\\\tself error: 'This message should be implemented'! !\\\\n\\\\n!Object methodsFor: 'error handling'!\\\\nshouldNotImplement\\\\n\\\\t\\\\\\\"Announce that, although the receiver inherits this message, it should \\\\n\\\\tnot implement it.\\\\\\\"\\\\n\\\\n\\\\tself error: 'This message is not appropriate for this object'! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'md 2/17/2006 12:02'!\\\\nsubclassResponsibility\\\\n\\\\t\\\\\\\"This message sets up a framework for the behavior of the class' subclasses.\\\\n\\\\tAnnounce that the subclass should have implemented this message.\\\\\\\"\\\\n\\\\n\\\\tself error: 'My subclass should have overridden ', thisContext sender selector printString! !\\\\n\\\\n!Object methodsFor: 'error handling' stamp: 'al 12/16/2003 16:16'!\\\\ntraitConflict\\\\n\\\\tself error: 'A class or trait does not properly resolve a conflict between multiple traits it uses.'! !\\\\n\\\\n\\\\n!Object methodsFor: 'evaluating' stamp: 'reThink 3/12/2001 18:14'!\\\\nvalue\\\\n\\\\n\\\\t^self! !\\\\n\\\\n!Object methodsFor: 'evaluating' stamp: 'reThink 2/18/2001 15:23'!\\\\nvalueWithArguments: aSequenceOfArguments\\\\n\\\\n\\\\t^self! !\\\\n\\\\n\\\\n!Object methodsFor: 'events-accessing' stamp: 'nk 12/20/2002 17:48'!\\\\nactionForEvent: anEventSelector\\\\n    \\\\\\\"Answer the action to be evaluated when <anEventSelector> has been triggered.\\\\\\\"\\\\n\\\\n\\\\t| actions |\\\\n\\\\tactions := self actionMap\\\\n\\\\t\\\\tat: anEventSelector asSymbol\\\\n\\\\t\\\\tifAbsent: [nil].\\\\n\\\\tactions ifNil: [^nil].\\\\n\\\\t^ actions asMinimalRepresentation! !\\\\n\\\\n!Object methodsFor: 'events-accessing' stamp: 'nk 12/20/2002 17:48'!\\\\nactionForEvent: anEventSelector\\\\nifAbsent: anExceptionBlock\\\\n    \\\\\\\"Answer the action to be evaluated when <anEventSelector> has been triggered.\\\\\\\"\\\\n\\\\n\\\\t| actions |\\\\n\\\\tactions := self actionMap\\\\n\\\\t\\\\tat: anEventSelector asSymbol\\\\n\\\\t\\\\tifAbsent: [nil].\\\\n\\\\tactions ifNil: [^anExceptionBlock value].\\\\n\\\\t^ actions asMinimalRepresentation! !\\\\n\\\\n!Object methodsFor: 'events-accessing' stamp: 'reThink 2/18/2001 14:43'!\\\\nactionMap\\\\n\\\\n\\\\t^EventManager actionMapFor: self! !\\\\n\\\\n!Object methodsFor: 'events-accessing' stamp: 'rw 4/27/2002 08:35'!\\\\nactionSequenceForEvent: anEventSelector\\\\n\\\\n    ^(self actionMap\\\\n        at: anEventSelector asSymbol\\\\n        ifAbsent: [^WeakActionSequence new])\\\\n            asActionSequence! !\\\\n\\\\n!Object methodsFor: 'events-accessing' stamp: 'SqR 6/28/2001 13:19'!\\\\nactionsDo: aBlock\\\\n\\\\n\\\\tself actionMap do: aBlock! !\\\\n\\\\n!Object methodsFor: 'events-accessing' stamp: 'rw 2/10/2002 13:05'!\\\\ncreateActionMap\\\\n\\\\n\\\\t^IdentityDictionary new! !\\\\n\\\\n!Object methodsFor: 'events-accessing' stamp: 'SqR 2/19/2001 14:04'!\\\\nhasActionForEvent: anEventSelector\\\\n    \\\\\\\"Answer true if there is an action associated with anEventSelector\\\\\\\"\\\\n\\\\n    ^(self actionForEvent: anEventSelector) notNil! !\\\\n\\\\n!Object methodsFor: 'events-accessing' stamp: 'reThink 2/18/2001 15:29'!\\\\nsetActionSequence: actionSequence\\\\nforEvent: anEventSelector\\\\n\\\\n    | action |\\\\n    action := actionSequence asMinimalRepresentation.\\\\n    action == nil\\\\n        ifTrue:\\\\n            [self removeActionsForEvent: anEventSelector]\\\\n        ifFalse:\\\\n            [self updateableActionMap\\\\n                at: anEventSelector asSymbol\\\\n                put: action]! !\\\\n\\\\n!Object methodsFor: 'events-accessing' stamp: 'reThink 2/25/2001 08:50'!\\\\nupdateableActionMap\\\\n\\\\n\\\\t^EventManager updateableActionMapFor: self! !\\\\n\\\\n\\\\n!Object methodsFor: 'events-registering' stamp: 'reThink 2/18/2001 15:04'!\\\\nwhen: anEventSelector evaluate: anAction \\\\n\\\\n\\\\t| actions |\\\\n\\\\tactions := self actionSequenceForEvent: anEventSelector.\\\\n\\\\t(actions includes: anAction)\\\\n\\\\t\\\\tifTrue: [^ self].\\\\n\\\\tself \\\\n\\\\t\\\\tsetActionSequence: (actions copyWith: anAction)\\\\n\\\\t\\\\tforEvent: anEventSelector! !\\\\n\\\\n!Object methodsFor: 'events-registering' stamp: 'rww 12/30/2002 10:37'!\\\\nwhen: anEventSelector\\\\nsend: aMessageSelector\\\\nto: anObject\\\\n \\\\n    self\\\\n        when: anEventSelector\\\\n        evaluate: (WeakMessageSend\\\\n            receiver: anObject\\\\n            selector: aMessageSelector)! !\\\\n\\\\n!Object methodsFor: 'events-registering' stamp: 'rww 12/30/2002 10:37'!\\\\nwhen: anEventSelector\\\\nsend: aMessageSelector\\\\nto: anObject\\\\nwithArguments: anArgArray\\\\n \\\\n    self\\\\n        when: anEventSelector\\\\n        evaluate: (WeakMessageSend\\\\n            receiver: anObject\\\\n            selector: aMessageSelector\\\\n\\\\t\\\\targuments: anArgArray)! !\\\\n\\\\n!Object methodsFor: 'events-registering' stamp: 'rww 12/30/2002 10:37'!\\\\nwhen: anEventSelector\\\\nsend: aMessageSelector\\\\nto: anObject\\\\nwith: anArg\\\\n \\\\n    self\\\\n        when: anEventSelector\\\\n        evaluate: (WeakMessageSend\\\\n            receiver: anObject\\\\n            selector: aMessageSelector\\\\n\\\\t\\\\targuments: (Array with: anArg))! !\\\\n\\\\n\\\\n!Object methodsFor: 'events-removing' stamp: 'reThink 2/18/2001 15:33'!\\\\nreleaseActionMap\\\\n\\\\n\\\\tEventManager releaseActionMapFor: self! !\\\\n\\\\n!Object methodsFor: 'events-removing' stamp: 'reThink 2/18/2001 15:33'!\\\\nremoveActionsForEvent: anEventSelector\\\\n\\\\n    | map |\\\\n    map := self actionMap.\\\\n    map removeKey: anEventSelector asSymbol ifAbsent: [].\\\\n    map isEmpty\\\\n        ifTrue: [self releaseActionMap]! !\\\\n\\\\n!Object methodsFor: 'events-removing' stamp: 'nk 8/25/2003 21:46'!\\\\nremoveActionsSatisfying: aBlock\\\\n\\\\n\\\\tself actionMap keys do:\\\\n\\\\t\\\\t[:eachEventSelector |\\\\n\\\\t\\\\t\\\\tself\\\\n   \\\\t\\\\t\\\\t\\\\tremoveActionsSatisfying: aBlock\\\\n\\\\t\\\\t\\\\t\\\\tforEvent: eachEventSelector\\\\n\\\\t\\\\t]! !\\\\n\\\\n!Object methodsFor: 'events-removing' stamp: 'reThink 2/18/2001 15:31'!\\\\nremoveActionsSatisfying: aOneArgBlock \\\\nforEvent: anEventSelector\\\\n\\\\n    self\\\\n        setActionSequence:\\\\n            ((self actionSequenceForEvent: anEventSelector)\\\\n                reject: [:anAction | aOneArgBlock value: anAction])\\\\n        forEvent: anEventSelector! !\\\\n\\\\n!Object methodsFor: 'events-removing' stamp: 'rw 7/29/2003 17:18'!\\\\nremoveActionsWithReceiver: anObject\\\\n\\\\n\\\\tself actionMap copy keysDo:\\\\n\\\\t\\\\t[:eachEventSelector |\\\\n\\\\t\\\\t\\\\tself\\\\n   \\\\t\\\\t\\\\t\\\\tremoveActionsSatisfying: [:anAction | anAction receiver == anObject]\\\\n\\\\t\\\\t\\\\t\\\\tforEvent: eachEventSelector\\\\n\\\\t\\\\t]! !\\\\n\\\\n!Object methodsFor: 'events-removing' stamp: 'reThink 2/18/2001 15:36'!\\\\nremoveActionsWithReceiver: anObject\\\\nforEvent: anEventSelector\\\\n\\\\n    self\\\\n        removeActionsSatisfying:\\\\n            [:anAction |\\\\n            anAction receiver == anObject]\\\\n        forEvent: anEventSelector! !\\\\n\\\\n!Object methodsFor: 'events-removing' stamp: 'reThink 2/18/2001 15:31'!\\\\nremoveAction: anAction\\\\nforEvent: anEventSelector\\\\n\\\\n    self\\\\n        removeActionsSatisfying: [:action | action = anAction]\\\\n        forEvent: anEventSelector! !\\\\n\\\\n\\\\n!Object methodsFor: 'events-triggering' stamp: 'reThink 2/18/2001 15:22'!\\\\ntriggerEvent: anEventSelector\\\\n\\\\t\\\\\\\"Evaluate all actions registered for <anEventSelector>. Return the value of the last registered action.\\\\\\\"\\\\n\\\\n    ^(self actionForEvent: anEventSelector) value! !\\\\n\\\\n!Object methodsFor: 'events-triggering' stamp: 'reThink 2/18/2001 17:09'!\\\\ntriggerEvent: anEventSelector\\\\nifNotHandled: anExceptionBlock\\\\n\\\\t\\\\\\\"Evaluate all actions registered for <anEventSelector>. Return the value of the last registered action.\\\\\\\"\\\\n\\\\n    ^(self \\\\n\\\\t\\\\tactionForEvent: anEventSelector\\\\n\\\\t\\\\tifAbsent: [^anExceptionBlock value]) value\\\\n! !\\\\n\\\\n!Object methodsFor: 'events-triggering' stamp: 'reThink 2/18/2001 15:21'!\\\\ntriggerEvent: anEventSelector\\\\nwithArguments: anArgumentList\\\\n\\\\n    ^(self actionForEvent: anEventSelector)\\\\n        valueWithArguments: anArgumentList! !\\\\n\\\\n!Object methodsFor: 'events-triggering' stamp: 'reThink 2/18/2001 15:21'!\\\\ntriggerEvent: anEventSelector\\\\nwithArguments: anArgumentList\\\\nifNotHandled: anExceptionBlock\\\\n\\\\n    ^(self \\\\n\\\\t\\\\tactionForEvent: anEventSelector\\\\n\\\\t\\\\tifAbsent: [^anExceptionBlock value])\\\\n        valueWithArguments: anArgumentList! !\\\\n\\\\n!Object methodsFor: 'events-triggering' stamp: 'reThink 2/18/2001 14:59'!\\\\ntriggerEvent: anEventSelector\\\\nwith: anObject\\\\n\\\\n    ^self \\\\n\\\\t\\\\ttriggerEvent: anEventSelector\\\\n\\\\t\\\\twithArguments: (Array with: anObject)! !\\\\n\\\\n!Object methodsFor: 'events-triggering' stamp: 'reThink 2/18/2001 14:59'!\\\\ntriggerEvent: anEventSelector\\\\nwith: anObject\\\\nifNotHandled: anExceptionBlock\\\\n\\\\n    ^self \\\\n\\\\t\\\\ttriggerEvent: anEventSelector\\\\n\\\\t\\\\twithArguments: (Array with: anObject)\\\\n\\\\t\\\\tifNotHandled: anExceptionBlock! !\\\\n\\\\n\\\\n!Object methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 00:42'!\\\\nbyteEncode:aStream\\\\n\\\\tself flattenOnStream:aStream.\\\\n! !\\\\n\\\\n!Object methodsFor: 'filter streaming'!\\\\ndrawOnCanvas:aStream\\\\n\\\\tself flattenOnStream:aStream.\\\\n! !\\\\n\\\\n!Object methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 01:31'!\\\\nelementSeparator\\\\n\\\\t^nil.! !\\\\n\\\\n!Object methodsFor: 'filter streaming'!\\\\nencodePostscriptOn:aStream\\\\n\\\\tself byteEncode:aStream.\\\\n! !\\\\n\\\\n!Object methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 00:07'!\\\\nflattenOnStream:aStream\\\\n\\\\tself writeOnFilterStream:aStream.\\\\n! !\\\\n\\\\n!Object methodsFor: 'filter streaming' stamp: 'mpw 6/22/1930 22:56'!\\\\nfullDrawPostscriptOn:aStream\\\\n\\\\t^aStream fullDraw:self.\\\\n! !\\\\n\\\\n!Object methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 01:51'!\\\\nprintOnStream:aStream\\\\n\\\\tself byteEncode:aStream.\\\\n! !\\\\n\\\\n!Object methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 00:49'!\\\\nputOn:aStream\\\\n\\\\t^aStream nextPut:self.\\\\n! !\\\\n\\\\n!Object methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 01:53'!\\\\nstoreOnStream:aStream\\\\n\\\\tself printOnStream:aStream.\\\\n! !\\\\n\\\\n!Object methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 00:06'!\\\\nwriteOnFilterStream:aStream\\\\n\\\\taStream writeObject:self.\\\\n! !\\\\n\\\\n\\\\n!Object methodsFor: 'finalization' stamp: 'ar 3/21/98 16:26'!\\\\nactAsExecutor\\\\n\\\\t\\\\\\\"Prepare the receiver to act as executor for any resources associated with it\\\\\\\"\\\\n\\\\tself breakDependents! !\\\\n\\\\n!Object methodsFor: 'finalization' stamp: 'ar 3/20/98 22:19'!\\\\nexecutor\\\\n\\\\t\\\\\\\"Return an object which can act as executor for finalization of the receiver\\\\\\\"\\\\n\\\\t^self shallowCopy actAsExecutor! !\\\\n\\\\n!Object methodsFor: 'finalization' stamp: 'ar 5/19/2003 20:10'!\\\\nfinalizationRegistry\\\\n\\\\t\\\\\\\"Answer the finalization registry associated with the receiver.\\\\\\\"\\\\n\\\\t^WeakRegistry default! !\\\\n\\\\n!Object methodsFor: 'finalization' stamp: 'ar 3/21/98 16:27'!\\\\nfinalize\\\\n\\\\t\\\\\\\"Finalize the resource associated with the receiver. This message should only be sent during the finalization process. There is NO garantuee that the resource associated with the receiver hasn't been free'd before so take care that you don't run into trouble - this all may happen with interrupt priority.\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'finalization' stamp: 'ar 3/21/98 18:38'!\\\\nretryWithGC: execBlock until: testBlock\\\\n\\\\t\\\\\\\"Retry execBlock as long as testBlock returns false. Do an incremental GC after the first try, a full GC after the second try.\\\\\\\"\\\\n\\\\t| blockValue |\\\\n\\\\tblockValue := execBlock value.\\\\n\\\\t(testBlock value: blockValue) ifTrue:[^blockValue].\\\\n\\\\tSmalltalk garbageCollectMost.\\\\n\\\\tblockValue := execBlock value.\\\\n\\\\t(testBlock value: blockValue) ifTrue:[^blockValue].\\\\n\\\\tSmalltalk garbageCollect.\\\\n\\\\t^execBlock value.! !\\\\n\\\\n!Object methodsFor: 'finalization' stamp: 'ar 5/19/2003 20:14'!\\\\ntoFinalizeSend: aSelector to: aFinalizer with: aResourceHandle\\\\n\\\\t\\\\\\\"When I am finalized (e.g., garbage collected) close the associated resource handle by sending aSelector to the appropriate finalizer (the guy who knows how to get rid of the resource).\\\\n\\\\tWARNING: Neither the finalizer nor the resource handle are allowed to reference me. If they do, then I will NEVER be garbage collected. Since this cannot be validated here, it is up to the client to make sure this invariant is not broken.\\\\\\\"\\\\n\\\\tself == aFinalizer ifTrue:[self error: 'I cannot finalize myself'].\\\\n\\\\tself == aResourceHandle ifTrue:[self error: 'I cannot finalize myself'].\\\\n\\\\t^self finalizationRegistry add: self executor:\\\\n\\\\t\\\\t(ObjectFinalizer new\\\\n\\\\t\\\\t\\\\treceiver: aFinalizer\\\\n\\\\t\\\\t\\\\tselector: aSelector\\\\n\\\\t\\\\t\\\\targument: aResourceHandle)! !\\\\n\\\\n\\\\n!Object methodsFor: 'flagging' stamp: 'sw 8/4/97 16:49'!\\\\nisThisEverCalled\\\\n\\\\t^ self isThisEverCalled: thisContext sender printString! !\\\\n\\\\n!Object methodsFor: 'flagging'!\\\\nisThisEverCalled: msg\\\\n\\\\t\\\\\\\"Send this message, with some useful printable argument, from methods or branches of methods which you believe are never reached.  2/5/96 sw\\\\\\\"\\\\n\\\\n\\\\tself halt: 'This is indeed called: ', msg printString! !\\\\n\\\\n!Object methodsFor: 'flagging' stamp: 'jm 3/18/98 17:23'!\\\\nlogEntry\\\\n\\\\n\\\\tTranscript show: 'Entered ', thisContext sender printString; cr.\\\\n! !\\\\n\\\\n!Object methodsFor: 'flagging' stamp: 'jm 3/18/98 17:23'!\\\\nlogExecution\\\\n\\\\n\\\\tTranscript show: 'Executing ', thisContext sender printString; cr.\\\\n! !\\\\n\\\\n!Object methodsFor: 'flagging' stamp: 'jm 3/18/98 17:22'!\\\\nlogExit\\\\n\\\\n\\\\tTranscript show:  'Exited ', thisContext sender printString; cr.\\\\n! !\\\\n\\\\n\\\\n!Object methodsFor: 'graph model' stamp: 'dgd 9/18/2004 15:07'!\\\\naddModelYellowButtonMenuItemsTo: aCustomMenu forMorph: aMorph hand: aHandMorph \\\\n\\\\t\\\\\\\"The receiver serves as the model for aMorph; a menu is being constructed for the morph, and here the receiver is able to add its own items\\\\\\\"\\\\n\\\\tPreferences cmdGesturesEnabled ifTrue: [ \\\\\\\"build mode\\\\\\\"\\\\n\\\\t\\\\taCustomMenu add: 'inspect model' translated target: self action: #inspect.\\\\n\\\\t].\\\\n\\\\n\\\\t^aCustomMenu\\\\n! !\\\\n\\\\n!Object methodsFor: 'graph model' stamp: 'nk 1/23/2004 14:35'!\\\\nhasModelYellowButtonMenuItems\\\\n\\\\t^Preferences cmdGesturesEnabled! !\\\\n\\\\n\\\\n!Object methodsFor: 'locales' stamp: 'tak 8/4/2005 14:55'!\\\\nlocaleChanged\\\\n\\\\tself shouldBeImplemented! !\\\\n\\\\n\\\\n!Object methodsFor: 'macpal' stamp: 'sw 5/7/1998 23:00'!\\\\ncodeStrippedOut: messageString\\\\n\\\\t\\\\\\\"When a method is stripped out for external release, it is replaced by a method that calls this\\\\\\\"\\\\n\\\\n\\\\tself halt: 'Code stripped out -- ', messageString, '-- do not proceed.'! !\\\\n\\\\n!Object methodsFor: 'macpal' stamp: 'sw 1/28/1999 17:31'!\\\\ncontentsChanged\\\\n\\\\tself changed: #contents! !\\\\n\\\\n!Object methodsFor: 'macpal' stamp: 'ar 3/18/2001 00:03'!\\\\ncurrentEvent\\\\n\\\\t\\\\\\\"Answer the current Morphic event.  This method never returns nil.\\\\\\\"\\\\n\\\\t^ActiveEvent ifNil:[self currentHand lastEvent]! !\\\\n\\\\n!Object methodsFor: 'macpal' stamp: 'nk 9/1/2004 10:41'!\\\\ncurrentHand\\\\n\\\\t\\\\\\\"Return a usable HandMorph -- the one associated with the object's current environment.  This method will always return a hand, even if it has to conjure one up as a last resort.  If a particular hand is actually handling events at the moment (such as a remote hand or a ghost hand), it will be returned.\\\\\\\"\\\\n\\\\n\\\\t^ActiveHand ifNil: [ self currentWorld primaryHand ]! !\\\\n\\\\n!Object methodsFor: 'macpal' stamp: 'sw 5/17/2001 12:08'!\\\\ncurrentVocabulary\\\\n\\\\t\\\\\\\"Answer the currently-prevailing default vocabulary.\\\\\\\"\\\\n\\\\n\\\\t^ Smalltalk isMorphic ifTrue:\\\\n\\\\t\\\\t\\\\t[ActiveWorld currentVocabulary]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[Vocabulary fullVocabulary]! !\\\\n\\\\n!Object methodsFor: 'macpal' stamp: 'ar 3/18/2001 00:08'!\\\\ncurrentWorld\\\\n\\\\t\\\\\\\"Answer a morphic world that is the current UI focus.\\\\n\\\\t\\\\tIf in an embedded world, it's that world.\\\\n\\\\t\\\\tIf in a morphic project, it's that project's world.  \\\\n\\\\t\\\\tIf in an mvc project, it is the topmost morphic-mvc-window's worldMorph. \\\\n\\\\t\\\\tIf in an mvc project that has no morphic-mvc-windows, then it's just some existing worldmorph instance.\\\\n\\\\t\\\\tIf in an mvc project in a Squeak that has NO WorldMorph instances, one is created.\\\\n\\\\n\\\\tThis method will never return nil, it will always return its best effort at returning a relevant world morph, but if need be -- if there are no worlds anywhere, it will create a new one.\\\\\\\"\\\\n\\\\n\\\\t| aView aSubview |\\\\n\\\\tActiveWorld ifNotNil:[^ActiveWorld].\\\\n\\\\tWorld ifNotNil:[^World].\\\\n\\\\taView _ ScheduledControllers controllerSatisfying:\\\\n\\\\t\\\\t[:ctrl | (aSubview _ ctrl view firstSubView) notNil and:\\\\n\\\\t\\\\t\\\\t[aSubview model isMorph and: [aSubview model isWorldMorph]]].\\\\n\\\\t^aView\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t[aSubview model]\\\\n\\\\t\\\\tifNil:\\\\n\\\\t\\\\t\\\\t[MVCWiWPasteUpMorph newWorldForProject: nil].! !\\\\n\\\\n!Object methodsFor: 'macpal' stamp: 'jm 5/6/1998 22:35'!\\\\nflash\\\\n\\\\t\\\\\\\"Do nothing.\\\\\\\"\\\\n! !\\\\n\\\\n!Object methodsFor: 'macpal' stamp: 'sw 6/16/1998 15:07'!\\\\ninstanceVariableValues\\\\n\\\\t\\\\\\\"Answer a collection whose elements are the values of those instance variables of the receiver which were added by the receiver's class\\\\\\\"\\\\n\\\\t| c |\\\\n\\\\tc _ OrderedCollection new.\\\\n\\\\tself class superclass instSize + 1 to: self class instSize do:\\\\n\\\\t\\\\t[:i | c add: (self instVarAt: i)].\\\\n\\\\t^ c! !\\\\n\\\\n!Object methodsFor: 'macpal' stamp: 'sw 3/20/2001 13:29'!\\\\nisUniversalTiles\\\\n\\\\t\\\\\\\"Return true if I (my world) uses universal tiles.  This message can be called in places where the current World is not known, such as when writing out a project.  For more information about the project-writing subtlety addressed by this protocol, kindly contact Ted Kaehler.\\\\\\\"\\\\n\\\\n\\\\t^ Preferences universalTiles! !\\\\n\\\\n!Object methodsFor: 'macpal' stamp: 'sw 10/24/2000 07:04'!\\\\nobjectRepresented\\\\n\\\\t\\\\\\\"most objects represent themselves; this provides a hook for aliases to grab on to\\\\\\\"\\\\n\\\\n\\\\t^ self! !\\\\n\\\\n!Object methodsFor: 'macpal' stamp: 'sw 5/22/2001 18:31'!\\\\nrefusesToAcceptCode\\\\n\\\\t\\\\\\\"Answer whether the receiver is a code-bearing instrument which at the moment refuses to allow its contents to be submitted\\\\\\\"\\\\n\\\\n\\\\t^ false\\\\n\\\\t! !\\\\n\\\\n!Object methodsFor: 'macpal' stamp: 'jm 2/24/1999 12:40'!\\\\nscriptPerformer\\\\n\\\\n\\\\t^ self\\\\n! !\\\\n\\\\n!Object methodsFor: 'macpal' stamp: 'sw 3/20/2001 13:40'!\\\\nslotInfo\\\\n\\\\t\\\\\\\"Answer a list of slot-information objects.  Initally only provides useful info for players\\\\\\\"\\\\n\\\\n\\\\t^ Dictionary new! !\\\\n\\\\n\\\\n!Object methodsFor: 'message handling' stamp: 'md 1/20/2006 16:28'!\\\\nexecuteMethod: compiledMethod\\\\n\\\\t\\\\\\\"Execute compiledMethod against the receiver with no args\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"<primitive: 189>\\\\\\\" \\\\\\\"uncomment once prim 189 is in VM\\\\\\\"\\\\n\\\\t^ self withArgs: #() executeMethod: compiledMethod! !\\\\n\\\\n!Object methodsFor: 'message handling' stamp: 'di 3/26/1999 07:52'!\\\\nperform: aSymbol \\\\n\\\\t\\\\\\\"Send the unary selector, aSymbol, to the receiver.\\\\n\\\\tFail if the number of arguments expected by the selector is not zero.\\\\n\\\\tPrimitive. Optional. See Object documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 83>\\\\n\\\\t^ self perform: aSymbol withArguments: (Array new: 0)! !\\\\n\\\\n!Object methodsFor: 'message handling' stamp: 'sw 10/30/1998 18:27'!\\\\nperform: selector orSendTo: otherTarget\\\\n\\\\t\\\\\\\"If I wish to intercept and handle selector myself, do it; else send it to otherTarget\\\\\\\"\\\\n\\\\t^ otherTarget perform: selector! !\\\\n\\\\n!Object methodsFor: 'message handling' stamp: 'di 3/26/1999 07:55'!\\\\nperform: selector withArguments: argArray \\\\n\\\\t\\\\\\\"Send the selector, aSymbol, to the receiver with arguments in argArray.\\\\n\\\\tFail if the number of arguments expected by the selector \\\\n\\\\tdoes not match the size of argArray.\\\\n\\\\tPrimitive. Optional. See Object documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 84>\\\\n\\\\t^ self perform: selector withArguments: argArray inSuperclass: self class! !\\\\n\\\\n!Object methodsFor: 'message handling' stamp: 'ar 4/25/2005 13:35'!\\\\nperform: selector withArguments: argArray inSuperclass: lookupClass\\\\n\\\\t\\\\\\\"NOTE:  This is just like perform:withArguments:, except that\\\\n\\\\tthe message lookup process begins, not with the receivers's class,\\\\n\\\\tbut with the supplied superclass instead.  It will fail if lookupClass\\\\n\\\\tcannot be found among the receiver's superclasses.\\\\n\\\\tPrimitive. Essential. See Object documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 100>\\\\n\\\\t(selector isSymbol)\\\\n\\\\t\\\\tifFalse: [^ self error: 'selector argument must be a Symbol'].\\\\n\\\\t(selector numArgs = argArray size)\\\\n\\\\t\\\\tifFalse: [^ self error: 'incorrect number of arguments'].\\\\n\\\\t(self class == lookupClass or: [self class inheritsFrom: lookupClass])\\\\n\\\\t\\\\tifFalse: [^ self error: 'lookupClass is not in my inheritance chain'].\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!Object methodsFor: 'message handling' stamp: 'nk 4/11/2002 14:13'!\\\\nperform: selector withEnoughArguments: anArray\\\\n\\\\t\\\\\\\"Send the selector, aSymbol, to the receiver with arguments in argArray.\\\\n\\\\tOnly use enough arguments for the arity of the selector; supply nils for missing ones.\\\\\\\"\\\\n\\\\t| numArgs args |\\\\n\\\\tnumArgs _ selector numArgs.\\\\n\\\\tanArray size == numArgs\\\\n\\\\t\\\\tifTrue: [ ^self perform: selector withArguments: anArray asArray ].\\\\n\\\\n\\\\targs _ Array new: numArgs.\\\\n\\\\targs replaceFrom: 1\\\\n\\\\t\\\\tto: (anArray size min: args size)\\\\n\\\\t\\\\twith: anArray\\\\n\\\\t\\\\tstartingAt: 1.\\\\n\\\\n\\\\t^ self perform: selector withArguments: args! !\\\\n\\\\n!Object methodsFor: 'message handling' stamp: 'di 3/26/1999 07:52'!\\\\nperform: aSymbol with: anObject \\\\n\\\\t\\\\\\\"Send the selector, aSymbol, to the receiver with anObject as its argument.\\\\n\\\\tFail if the number of arguments expected by the selector is not one.\\\\n\\\\tPrimitive. Optional. See Object documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 83>\\\\n\\\\t^ self perform: aSymbol withArguments: (Array with: anObject)! !\\\\n\\\\n!Object methodsFor: 'message handling' stamp: 'di 3/26/1999 07:52'!\\\\nperform: aSymbol with: firstObject with: secondObject \\\\n\\\\t\\\\\\\"Send the selector, aSymbol, to the receiver with the given arguments.\\\\n\\\\tFail if the number of arguments expected by the selector is not two.\\\\n\\\\tPrimitive. Optional. See Object documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 83>\\\\n\\\\t^ self perform: aSymbol withArguments: (Array with: firstObject with: secondObject)! !\\\\n\\\\n!Object methodsFor: 'message handling' stamp: 'di 3/26/1999 07:51'!\\\\nperform: aSymbol with: firstObject with: secondObject with: thirdObject \\\\n\\\\t\\\\\\\"Send the selector, aSymbol, to the receiver with the given arguments.\\\\n\\\\tFail if the number of arguments expected by the selector is not three.\\\\n\\\\tPrimitive. Optional. See Object documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 83>\\\\n\\\\t^ self perform: aSymbol\\\\n\\\\t\\\\twithArguments: (Array with: firstObject with: secondObject with: thirdObject)! !\\\\n\\\\n!Object methodsFor: 'message handling' stamp: 'NS 1/28/2004 11:19'!\\\\nwithArgs: argArray executeMethod: compiledMethod\\\\n\\\\t\\\\\\\"Execute compiledMethod against the receiver and args in argArray\\\\\\\"\\\\n\\\\n\\\\t| selector |\\\\n\\\\t<primitive: 188>\\\\n\\\\tselector _ Symbol new.\\\\n\\\\tself class addSelectorSilently: selector withMethod: compiledMethod.\\\\n\\\\t^ [self perform: selector withArguments: argArray]\\\\n\\\\t\\\\tensure: [self class basicRemoveSelector: selector]! !\\\\n\\\\n!Object methodsFor: 'message handling' stamp: 'md 1/20/2006 16:28'!\\\\nwith: arg1 executeMethod: compiledMethod\\\\n\\\\t\\\\\\\"Execute compiledMethod against the receiver and arg1\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"<primitive: 189>\\\\\\\" \\\\\\\"uncomment once prim 189 is in VM\\\\\\\"\\\\n\\\\t^ self withArgs: {arg1} executeMethod: compiledMethod! !\\\\n\\\\n!Object methodsFor: 'message handling' stamp: 'md 1/20/2006 16:28'!\\\\nwith: arg1 with: arg2 executeMethod: compiledMethod\\\\n\\\\t\\\\\\\"Execute compiledMethod against the receiver and arg1 & arg2\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"<primitive: 189>\\\\\\\" \\\\\\\"uncomment once prim 189 is in VM\\\\\\\"\\\\n\\\\t^ self withArgs: {arg1. arg2} executeMethod: compiledMethod! !\\\\n\\\\n!Object methodsFor: 'message handling' stamp: 'md 1/20/2006 16:28'!\\\\nwith: arg1 with: arg2 with: arg3 executeMethod: compiledMethod\\\\n\\\\t\\\\\\\"Execute compiledMethod against the receiver and arg1, arg2, & arg3\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"<primitive: 189>\\\\\\\" \\\\\\\"uncomment once prim 189 is in VM\\\\\\\"\\\\n\\\\t^ self withArgs: {arg1. arg2. arg3} executeMethod: compiledMethod! !\\\\n\\\\n!Object methodsFor: 'message handling' stamp: 'md 1/20/2006 16:28'!\\\\nwith: arg1 with: arg2 with: arg3 with: arg4 executeMethod: compiledMethod\\\\n\\\\t\\\\\\\"Execute compiledMethod against the receiver and arg1, arg2, arg3, & arg4\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"<primitive: 189>\\\\\\\" \\\\\\\"uncomment once prim 189 is in VM\\\\\\\"\\\\n\\\\t^ self withArgs: {arg1. arg2. arg3. arg4} executeMethod: compiledMethod! !\\\\n\\\\n\\\\n!Object methodsFor: 'objects from disk' stamp: 'tk 4/8/1999 12:46'!\\\\ncomeFullyUpOnReload: smartRefStream\\\\n\\\\t\\\\\\\"Normally this read-in object is exactly what we want to store. 7/26/96 tk\\\\\\\"\\\\n\\\\n\\\\t^ self! !\\\\n\\\\n!Object methodsFor: 'objects from disk' stamp: 'RAA 12/20/2000 16:51'!\\\\nconvertToCurrentVersion: varDict refStream: smartRefStrm\\\\n\\\\n\\\\t\\\\\\\"subclasses should implement if they wish to convert old instances to modern ones\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'objects from disk' stamp: 'tk 11/29/2004 15:04'!\\\\nfixUponLoad: aProject seg: anImageSegment\\\\n\\\\n\\\\t\\\\\\\"change the object due to conventions that have changed on\\\\n\\\\nthe project level.  (sent to all objects in the incoming project).\\\\n\\\\nSpecific classes should reimplement this.\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'objects from disk' stamp: 'RAA 1/10/2001 14:02'!\\\\nindexIfCompact\\\\n\\\\n\\\\t^0\\\\t\\\\t\\\\\\\"helps avoid a #respondsTo: in publishing\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'objects from disk' stamp: 'tk 2/24/1999 11:08'!\\\\nobjectForDataStream: refStrm\\\\n    \\\\\\\"Return an object to store on an external data stream.\\\\\\\"\\\\n\\\\n    ^ self! !\\\\n\\\\n!Object methodsFor: 'objects from disk' stamp: 'tk 4/8/1999 12:05'!\\\\nreadDataFrom: aDataStream size: varsOnDisk\\\\n\\\\t\\\\\\\"Fill in the fields of self based on the contents of aDataStream.  Return self.\\\\n\\\\t Read in the instance-variables written by Object>>storeDataOn:.\\\\n\\\\t NOTE: This method must send beginReference: before reading any objects from aDataStream that might reference it.\\\\n\\\\t Allow aDataStream to have fewer inst vars.  See SmartRefStream.\\\\\\\"\\\\n\\\\t| cntInstVars cntIndexedVars |\\\\n\\\\n\\\\tcntInstVars _ self class instSize.\\\\n\\\\tself class isVariable\\\\n\\\\t\\\\tifTrue: [cntIndexedVars _ varsOnDisk - cntInstVars.\\\\n\\\\t\\\\t\\\\t\\\\tcntIndexedVars < 0 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself error: 'Class has changed too much.  Define a convertxxx method']]\\\\n\\\\t\\\\tifFalse: [cntIndexedVars _ 0.\\\\n\\\\t\\\\t\\\\t\\\\tcntInstVars _ varsOnDisk]. \\\\t\\\\\\\"OK if fewer than now\\\\\\\"\\\\n\\\\n\\\\taDataStream beginReference: self.\\\\n\\\\t1 to: cntInstVars do:\\\\n\\\\t\\\\t[:i | self instVarAt: i put: aDataStream next].\\\\n\\\\t1 to: cntIndexedVars do:\\\\n\\\\t\\\\t[:i | self basicAt: i put: aDataStream next].\\\\n\\\\t\\\\\\\"Total number read MUST be equal to varsOnDisk!!\\\\\\\"\\\\n\\\\t^ self\\\\t\\\\\\\"If we ever return something other than self, fix calls \\\\n\\\\t\\\\t\\\\ton (super readDataFrom: aDataStream size: anInteger)\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'objects from disk' stamp: 'CdG 10/17/2005 20:32'!\\\\nsaveOnFile\\\\n\\\\t\\\\\\\"Ask the user for a filename and save myself on a SmartReferenceStream file.  Writes out the version and class structure.  The file is fileIn-able.  Does not file out the class of the object.  tk 6/26/97 13:48\\\\\\\"\\\\n\\\\n\\\\t| aFileName fileStream |\\\\n\\\\taFileName := self class name asFileName.\\\\t\\\\\\\"do better?\\\\\\\"\\\\n\\\\taFileName := UIManager default \\\\n\\\\t\\\\t\\\\t\\\\trequest: 'File name?' translated initialAnswer: aFileName.\\\\n\\\\taFileName size == 0 ifTrue: [^ Beeper beep].\\\\n\\\\n\\\\tfileStream := FileStream newFileNamed: aFileName asFileName.\\\\n\\\\tfileStream fileOutClass: nil andObject: self.! !\\\\n\\\\n!Object methodsFor: 'objects from disk' stamp: 'tk 8/9/2001 15:40'!\\\\nstoreDataOn: aDataStream\\\\n\\\\t\\\\\\\"Store myself on a DataStream.  Answer self.  This is a low-level DataStream/ReferenceStream method. See also objectToStoreOnDataStream.  NOTE: This method must send 'aDataStream beginInstance:size:' and then (nextPut:/nextPutWeak:) its subobjects.  readDataFrom:size: reads back what we write here.\\\\\\\"\\\\n\\\\t| cntInstVars cntIndexedVars |\\\\n\\\\n\\\\tcntInstVars _ self class instSize.\\\\n\\\\tcntIndexedVars _ self basicSize.\\\\n\\\\taDataStream\\\\n\\\\t\\\\tbeginInstance: self class\\\\n\\\\t\\\\tsize: cntInstVars + cntIndexedVars.\\\\n\\\\t1 to: cntInstVars do:\\\\n\\\\t\\\\t[:i | aDataStream nextPut: (self instVarAt: i)].\\\\n\\\\n\\\\t\\\\\\\"Write fields of a variable length object.  When writing to a dummy \\\\n\\\\t\\\\tstream, don't bother to write the bytes\\\\\\\"\\\\n\\\\t((aDataStream byteStream class == DummyStream) and: [self class isBits]) ifFalse: [\\\\n\\\\t\\\\t1 to: cntIndexedVars do:\\\\n\\\\t\\\\t\\\\t[:i | aDataStream nextPut: (self basicAt: i)]].\\\\n! !\\\\n\\\\n\\\\n!Object methodsFor: 'parts bin' stamp: 'sw 10/24/2001 16:34'!\\\\ndescriptionForPartsBin\\\\n\\\\t\\\\\\\"If the receiver is a member of a class that would like to be represented in a parts bin, answer the name by which it should be known, and a documentation string to be provided, for example, as balloon help.  When the 'nativitySelector' is sent to the 'globalReceiver', it is expected that some kind of Morph will result.  The parameters used in the implementation below are for documentation purposes only!!\\\\\\\"\\\\n\\\\n\\\\t^ DescriptionForPartsBin\\\\n\\\\t\\\\tformalName: 'PutFormalNameHere'\\\\n\\\\t\\\\tcategoryList: #(PutACategoryHere MaybePutAnotherCategoryHere)\\\\n\\\\t\\\\tdocumentation: 'Put the balloon help here'\\\\n\\\\t\\\\tglobalReceiverSymbol: #PutAGlobalHere\\\\n\\\\t\\\\tnativitySelector: #PutASelectorHere! !\\\\n\\\\n\\\\n!Object methodsFor: 'printing' stamp: 'di 6/20/97 08:57'!\\\\nfullPrintString\\\\n\\\\t\\\\\\\"Answer a String whose characters are a description of the receiver.\\\\\\\"\\\\n\\\\n\\\\t^ String streamContents: [:s | self printOn: s]! !\\\\n\\\\n!Object methodsFor: 'printing'!\\\\nisLiteral\\\\n\\\\t\\\\\\\"Answer whether the receiver has a literal text form recognized by the \\\\n\\\\tcompiler.\\\\\\\"\\\\n\\\\n\\\\t^false! !\\\\n\\\\n!Object methodsFor: 'printing' stamp: 'sma 6/1/2000 09:28'!\\\\nlongPrintOn: aStream\\\\n\\\\t\\\\\\\"Append to the argument, aStream, the names and values of all \\\\n\\\\tof the receiver's instance variables.\\\\\\\"\\\\n\\\\n\\\\tself class allInstVarNames doWithIndex:\\\\n\\\\t\\\\t[:title :index |\\\\n\\\\t\\\\taStream nextPutAll: title;\\\\n\\\\t\\\\t nextPut: $:;\\\\n\\\\t\\\\t space;\\\\n\\\\t\\\\t tab;\\\\n\\\\t\\\\t print: (self instVarAt: index);\\\\n\\\\t\\\\t cr]! !\\\\n\\\\n!Object methodsFor: 'printing' stamp: 'tk 10/19/2001 11:18'!\\\\nlongPrintOn: aStream limitedTo: sizeLimit indent: indent\\\\n\\\\t\\\\\\\"Append to the argument, aStream, the names and values of all of the receiver's instance variables.  Limit is the length limit for each inst var.\\\\\\\"\\\\n\\\\n\\\\tself class allInstVarNames doWithIndex:\\\\n\\\\t\\\\t[:title :index |\\\\n\\\\t\\\\tindent timesRepeat: [aStream tab].\\\\n\\\\t\\\\taStream nextPutAll: title;\\\\n\\\\t\\\\t nextPut: $:;\\\\n\\\\t\\\\t space;\\\\n\\\\t\\\\t tab;\\\\n\\\\t\\\\t nextPutAll: \\\\n\\\\t\\\\t\\\\t((self instVarAt: index) printStringLimitedTo: (sizeLimit -3 -title size max: 1));\\\\n\\\\t\\\\t cr]! !\\\\n\\\\n!Object methodsFor: 'printing' stamp: 'tk 10/16/2001 19:41'!\\\\nlongPrintString\\\\n\\\\t\\\\\\\"Answer a String whose characters are a description of the receiver.\\\\\\\"\\\\n\\\\t\\\\n\\\\t| str |\\\\n\\\\tstr _ String streamContents: [:aStream | self longPrintOn: aStream].\\\\n\\\\t\\\\\\\"Objects without inst vars should return something\\\\\\\"\\\\n\\\\t^ str isEmpty ifTrue: [self printString, String cr] ifFalse: [str]! !\\\\n\\\\n!Object methodsFor: 'printing' stamp: 'BG 11/7/2004 13:39'!\\\\nlongPrintStringLimitedTo: aLimitValue\\\\n\\\\t\\\\\\\"Answer a String whose characters are a description of the receiver.\\\\\\\"\\\\n\\\\t\\\\n\\\\t| str |\\\\n\\\\tstr _ String streamContents: [:aStream | self longPrintOn: aStream limitedTo: aLimitValue indent: 0].\\\\n\\\\t\\\\\\\"Objects without inst vars should return something\\\\\\\"\\\\n\\\\t^ str isEmpty ifTrue: [self printString, String cr] ifFalse: [str]! !\\\\n\\\\n!Object methodsFor: 'printing' stamp: 'sw 3/7/2001 13:14'!\\\\nnominallyUnsent: aSelectorSymbol\\\\n\\\\t\\\\\\\"From within the body of a method which is not formally sent within the system, but which you intend to have remain in the system (for potential manual invocation, or for documentation, or perhaps because it's sent by commented-out-code that you anticipate uncommenting out someday, send this message, with the selector itself as the argument.\\\\n\\\\nThis will serve two purposes:\\\\n\\\\n\\\\t(1)  The method will not be returned by searches for unsent selectors (because it, in a manner of speaking, sends itself).\\\\n\\\\t(2)\\\\tYou can locate all such methods by browsing senders of #nominallyUnsent:\\\\\\\"\\\\n\\\\n\\\\tfalse ifTrue: [self flag: #nominallyUnsent:]    \\\\\\\"So that this method itself will appear to be sent\\\\\\\"\\\\n! !\\\\n\\\\n!Object methodsFor: 'printing' stamp: 'sma 6/1/2000 09:31'!\\\\nprintOn: aStream\\\\n\\\\t\\\\\\\"Append to the argument, aStream, a sequence of characters that  \\\\n\\\\tidentifies the receiver.\\\\\\\"\\\\n\\\\n\\\\t| title |\\\\n\\\\ttitle _ self class name.\\\\n\\\\taStream\\\\n\\\\t\\\\tnextPutAll: (title first isVowel ifTrue: ['an '] ifFalse: ['a ']);\\\\n\\\\t\\\\tnextPutAll: title! !\\\\n\\\\n!Object methodsFor: 'printing' stamp: 'sma 6/1/2000 09:22'!\\\\nprintString\\\\n\\\\t\\\\\\\"Answer a String whose characters are a description of the receiver. \\\\n\\\\tIf you want to print without a character limit, use fullPrintString.\\\\\\\"\\\\n\\\\n\\\\t^ self printStringLimitedTo: 50000! !\\\\n\\\\n!Object methodsFor: 'printing' stamp: 'tk 5/7/1999 16:20'!\\\\nprintStringLimitedTo: limit\\\\n\\\\t\\\\\\\"Answer a String whose characters are a description of the receiver.\\\\n\\\\tIf you want to print without a character limit, use fullPrintString.\\\\\\\"\\\\n\\\\t| limitedString |\\\\n\\\\tlimitedString _ String streamContents: [:s | self printOn: s] limitedTo: limit.\\\\n\\\\tlimitedString size < limit ifTrue: [^ limitedString].\\\\n\\\\t^ limitedString , '...etc...'! !\\\\n\\\\n!Object methodsFor: 'printing' stamp: 'MPW 1/1/1901 00:30'!\\\\npropertyList\\\\n\\\\t\\\\\\\"Answer a String whose characters are a property-list description of the receiver.\\\\\\\"\\\\n\\\\n\\\\t^ PropertyListEncoder process:self.\\\\n! !\\\\n\\\\n!Object methodsFor: 'printing' stamp: 'sw 10/17/2000 11:16'!\\\\nreportableSize\\\\n\\\\t\\\\\\\"Answer a string that reports the size of the receiver -- useful for showing in a list view, for example\\\\\\\"\\\\n\\\\n\\\\t^ (self basicSize + self class instSize) printString! !\\\\n\\\\n!Object methodsFor: 'printing'!\\\\nstoreOn: aStream \\\\n\\\\t\\\\\\\"Append to the argument aStream a sequence of characters that is an \\\\n\\\\texpression whose evaluation creates an object similar to the receiver.\\\\\\\"\\\\n\\\\n\\\\taStream nextPut: $(.\\\\n\\\\tself class isVariable\\\\n\\\\t\\\\tifTrue: [aStream nextPutAll: '(', self class name, ' basicNew: ';\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstore: self basicSize;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnextPutAll: ') ']\\\\n\\\\t\\\\tifFalse: [aStream nextPutAll: self class name, ' basicNew'].\\\\n\\\\t1 to: self class instSize do:\\\\n\\\\t\\\\t[:i |\\\\n\\\\t\\\\taStream nextPutAll: ' instVarAt: ';\\\\n\\\\t\\\\t\\\\tstore: i;\\\\n\\\\t\\\\t\\\\tnextPutAll: ' put: ';\\\\n\\\\t\\\\t\\\\tstore: (self instVarAt: i);\\\\n\\\\t\\\\t\\\\tnextPut: $;].\\\\n\\\\t1 to: self basicSize do:\\\\n\\\\t\\\\t[:i |\\\\n\\\\t\\\\taStream nextPutAll: ' basicAt: ';\\\\n\\\\t\\\\t\\\\tstore: i;\\\\n\\\\t\\\\t\\\\tnextPutAll: ' put: ';\\\\n\\\\t\\\\t\\\\tstore: (self basicAt: i);\\\\n\\\\t\\\\t\\\\tnextPut: $;].\\\\n\\\\taStream nextPutAll: ' yourself)'\\\\n! !\\\\n\\\\n!Object methodsFor: 'printing' stamp: 'di 6/20/97 09:12'!\\\\nstoreString\\\\n\\\\t\\\\\\\"Answer a String representation of the receiver from which the receiver \\\\n\\\\tcan be reconstructed.\\\\\\\"\\\\n\\\\n\\\\t^ String streamContents: [:s | self storeOn: s]! !\\\\n\\\\n!Object methodsFor: 'printing' stamp: 'sw 5/2/1998 13:55'!\\\\nstringForReadout\\\\n\\\\t^ self stringRepresentation! !\\\\n\\\\n!Object methodsFor: 'printing'!\\\\nstringRepresentation\\\\n\\\\t\\\\\\\"Answer a string that represents the receiver.  For most objects this is simply its printString, but for strings themselves, it's themselves.  6/12/96 sw\\\\\\\"\\\\n\\\\n\\\\t^ self printString ! !\\\\n\\\\n\\\\n!Object methodsFor: 'scripting' stamp: 'ar 3/17/2001 20:11'!\\\\nadaptedToWorld: aWorld\\\\n\\\\t\\\\\\\"If I refer to a world or a hand, return the corresponding items in the new world.\\\\\\\"\\\\n\\\\t^self! !\\\\n\\\\n!Object methodsFor: 'scripting' stamp: 'sw 3/10/2000 13:57'!\\\\ndefaultFloatPrecisionFor: aGetSelector\\\\n\\\\t\\\\\\\"Answer a number indicating the default float precision to be used in a numeric readout for which the receiver is the model.\\\\\\\"\\\\n\\\\n\\\\t^ 1! !\\\\n\\\\n!Object methodsFor: 'scripting' stamp: 'RAA 3/9/2001 17:08'!\\\\nevaluateUnloggedForSelf: aCodeString\\\\n\\\\n\\\\t^Compiler evaluate:\\\\n\\\\t\\\\taCodeString\\\\n\\\\t\\\\tfor: self\\\\n\\\\t\\\\tlogged: false! !\\\\n\\\\n!Object methodsFor: 'scripting' stamp: 'yo 12/25/2003 16:43'!\\\\nmethodInterfacesForCategory: aCategorySymbol inVocabulary: aVocabulary limitClass: aLimitClass\\\\n\\\\t\\\\\\\"Return a list of methodInterfaces for the receiver in the given category, given a vocabulary.  aCategorySymbol is the inherent category symbol, not necessarily the wording as expressed in the vocabulary.\\\\\\\"\\\\n\\\\n\\\\t| categorySymbol |\\\\n\\\\tcategorySymbol _ aCategorySymbol asSymbol.\\\\n\\\\n\\\\t(categorySymbol == ScriptingSystem nameForInstanceVariablesCategory) ifTrue: [\\\\n\\\\t\\\\t\\\\\\\"user-defined instance variables\\\\\\\"\\\\n\\\\t\\\\t^ self methodInterfacesForInstanceVariablesCategoryIn: aVocabulary].\\\\n\\\\t(categorySymbol == ScriptingSystem nameForScriptsCategory) ifTrue: [\\\\n\\\\t\\\\t\\\\\\\"user-defined scripts\\\\\\\"\\\\n\\\\t\\\\t^ self methodInterfacesForScriptsCategoryIn: aVocabulary].\\\\n\\\\t\\\\\\\"all others\\\\\\\"\\\\n\\\\t^ self usableMethodInterfacesIn: (aVocabulary methodInterfacesInCategory: categorySymbol\\\\n\\\\t\\\\tforInstance: self\\\\n\\\\t\\\\tofClass: self class\\\\n\\\\t\\\\tlimitClass: aLimitClass)\\\\n! !\\\\n\\\\n!Object methodsFor: 'scripting' stamp: 'sw 8/3/2001 13:54'!\\\\nmethodInterfacesForInstanceVariablesCategoryIn: aVocabulary\\\\n\\\\t\\\\\\\"Return a collection of methodInterfaces for the instance-variables category.  The vocabulary parameter, at present anyway, is not used.  And for non-players, the method is at present vacuous in any case\\\\\\\"\\\\n\\\\n\\\\t^  OrderedCollection new! !\\\\n\\\\n!Object methodsFor: 'scripting' stamp: 'sw 8/3/2001 13:53'!\\\\nmethodInterfacesForScriptsCategoryIn: aVocabulary\\\\n\\\\t\\\\\\\"Answer a list of method interfaces for the category #scripts, as seen in a viewer or other tool.  The vocabulary argument is not presently used.  Also, at present, only Players really do anyting interesting here.\\\\\\\"\\\\n\\\\n\\\\t^ OrderedCollection new! !\\\\n\\\\n!Object methodsFor: 'scripting' stamp: 'RAA 2/16/2001 19:37'!\\\\nselfWrittenAsIll\\\\n\\\\n\\\\t^self! !\\\\n\\\\n!Object methodsFor: 'scripting' stamp: 'RAA 2/16/2001 19:38'!\\\\nselfWrittenAsIm\\\\n\\\\n\\\\t^self! !\\\\n\\\\n!Object methodsFor: 'scripting' stamp: 'RAA 2/16/2001 19:37'!\\\\nselfWrittenAsMe\\\\n\\\\n\\\\t^self! !\\\\n\\\\n!Object methodsFor: 'scripting' stamp: 'RAA 2/16/2001 19:37'!\\\\nselfWrittenAsMy\\\\n\\\\n\\\\t^self! !\\\\n\\\\n!Object methodsFor: 'scripting' stamp: 'RAA 2/16/2001 19:38'!\\\\nselfWrittenAsThis\\\\n\\\\n\\\\t^self! !\\\\n\\\\n\\\\n!Object methodsFor: 'self evaluating' stamp: 'sd 7/31/2005 21:47'!\\\\nisSelfEvaluating\\\\n\\\\t^ self isLiteral! !\\\\n\\\\n\\\\n!Object methodsFor: 'system primitives'!\\\\nasOop\\\\n\\\\t\\\\\\\"Primitive. Answer a SmallInteger whose value is half of the receiver's \\\\n\\\\tobject pointer (interpreting object pointers as 16-bit signed quantities). \\\\n\\\\tFail if the receiver is a SmallInteger. Essential. See Object documentation \\\\n\\\\twhatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 75>\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!Object methodsFor: 'system primitives' stamp: 'di 1/9/1999 15:19'!\\\\nbecomeForward: otherObject \\\\n\\\\t\\\\\\\"Primitive. All variables in the entire system that used to point\\\\n\\\\tto the receiver now point to the argument.\\\\n\\\\tFails if either argument is a SmallInteger.\\\\\\\"\\\\n\\\\n\\\\t(Array with: self)\\\\n\\\\t\\\\telementsForwardIdentityTo:\\\\n\\\\t\\\\t\\\\t(Array with: otherObject)! !\\\\n\\\\n!Object methodsFor: 'system primitives' stamp: 'zz 3/3/2004 23:53'!\\\\nbecomeForward: otherObject copyHash: copyHash\\\\n\\\\t\\\\\\\"Primitive. All variables in the entire system that used to point to the receiver now point to the argument.\\\\n\\\\tIf copyHash is true, the argument's identity hash bits will be set to those of the receiver.\\\\n\\\\tFails if either argument is a SmallInteger.\\\\\\\"\\\\n\\\\n\\\\t(Array with: self)\\\\n\\\\t\\\\telementsForwardIdentityTo:\\\\n\\\\t\\\\t\\\\t(Array with: otherObject)\\\\n\\\\t\\\\t\\\\t\\\\tcopyHash: copyHash! !\\\\n\\\\n!Object methodsFor: 'system primitives' stamp: 'sw 10/16/2000 10:59'!\\\\nclassName\\\\n\\\\t\\\\\\\"Answer a string characterizing the receiver's class, for use in list views for example\\\\\\\"\\\\n\\\\n\\\\t^ self class name asString! !\\\\n\\\\n!Object methodsFor: 'system primitives' stamp: 'sw 10/16/2000 11:04'!\\\\ncreationStamp\\\\n\\\\t\\\\\\\"Answer a string which reports the creation particulars of the receiver.  Intended perhaps for list views, but this is presently a feature not easily accessible\\\\\\\"\\\\n\\\\n\\\\t^ '<no creation stamp>'! !\\\\n\\\\n!Object methodsFor: 'system primitives'!\\\\ninstVarAt: index \\\\n\\\\t\\\\\\\"Primitive. Answer a fixed variable in an object. The numbering of the \\\\n\\\\tvariables corresponds to the named instance variables. Fail if the index \\\\n\\\\tis not an Integer or is not the index of a fixed variable. Essential. See \\\\n\\\\tObject documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 73>\\\\n\\\\t\\\\\\\"Access beyond fixed variables.\\\\\\\"\\\\n\\\\t^self basicAt: index - self class instSize\\\\t\\\\t! !\\\\n\\\\n!Object methodsFor: 'system primitives'!\\\\ninstVarAt: anInteger put: anObject \\\\n\\\\t\\\\\\\"Primitive. Store a value into a fixed variable in the receiver. The \\\\n\\\\tnumbering of the variables corresponds to the named instance variables. \\\\n\\\\tFail if the index is not an Integer or is not the index of a fixed variable. \\\\n\\\\tAnswer the value stored as the result. Using this message violates the \\\\n\\\\tprinciple that each object has sovereign control over the storing of \\\\n\\\\tvalues into its instance variables. Essential. See Object documentation \\\\n\\\\twhatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 74>\\\\n\\\\t\\\\\\\"Access beyond fixed fields\\\\\\\"\\\\n\\\\t^self basicAt: anInteger - self class instSize put: anObject! !\\\\n\\\\n!Object methodsFor: 'system primitives' stamp: 'sw 10/16/2000 11:09'!\\\\ninstVarNamed: aString\\\\n\\\\t\\\\\\\"Return the value of the instance variable in me with that name.  Slow and unclean, but very useful. \\\\\\\"\\\\n\\\\n\\\\t^ self instVarAt: (self class allInstVarNames indexOf: aString asString)\\\\n\\\\n\\\\n! !\\\\n\\\\n!Object methodsFor: 'system primitives' stamp: 'sw 10/16/2000 11:10'!\\\\ninstVarNamed: aString put: aValue\\\\n\\\\t\\\\\\\"Store into the value of the instance variable in me of that name.  Slow and unclean, but very useful. \\\\\\\"\\\\n\\\\n\\\\t^ self instVarAt: (self class allInstVarNames indexOf: aString asString) put: aValue\\\\n! !\\\\n\\\\n!Object methodsFor: 'system primitives' stamp: 'sw 10/17/2000 11:12'!\\\\noopString\\\\n\\\\t\\\\\\\"Answer a string that represents the oop of the receiver\\\\\\\"\\\\n\\\\n\\\\t^ self asOop printString! !\\\\n\\\\n!Object methodsFor: 'system primitives' stamp: 'ar 3/2/2001 01:34'!\\\\nprimitiveChangeClassTo: anObject\\\\n\\\\t\\\\\\\"Primitive. Change the class of the receiver into the class of the argument given that the format of the receiver matches the format of the argument's class. Fail if receiver or argument are SmallIntegers, or the receiver is an instance of a compact class and the argument isn't, or when the argument's class is compact and the receiver isn't, or when the format of the receiver is different from the format of the argument's class, or when the arguments class is fixed and the receiver's size differs from the size that an instance of the argument's class should have.\\\\n\\\\tNote: The primitive will fail in most cases that you think might work. This is mostly because of a) the difference between compact and non-compact classes, and b) because of differences in the format. As an example, '(Array new: 3) primitiveChangeClassTo: Morph basicNew' would fail for three of the reasons mentioned above. Array is compact, Morph is not (failure #1). Array is variable and Morph is fixed (different format - failure #2). Morph is a fixed-field-only object and the array is too short (failure #3).\\\\n\\\\tThe facility is really provided for certain, very specific applications (mostly related to classes changing shape) and not for casual use.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 115>\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!Object methodsFor: 'system primitives' stamp: 'di 3/27/1999 12:21'!\\\\nrootStubInImageSegment: imageSegment\\\\n\\\\n\\\\t^ ImageSegmentRootStub new\\\\n\\\\t\\\\txxSuperclass: nil\\\\n\\\\t\\\\tformat: nil\\\\n\\\\t\\\\tsegment: imageSegment! !\\\\n\\\\n!Object methodsFor: 'system primitives'!\\\\nsomeObject\\\\n\\\\t\\\\\\\"Primitive. Answer the first object in the enumeration of all\\\\n\\\\t objects.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 138>\\\\n\\\\tself primitiveFailed.! !\\\\n\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 9/26/2001 11:58'!\\\\nbasicType\\\\n\\\\t\\\\\\\"Answer a symbol representing the inherent type of the receiver\\\\\\\"\\\\n\\\\n\\\\t^ #Object! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 5/3/2001 16:19'!\\\\nbeViewed\\\\n\\\\t\\\\\\\"Open up a viewer on the receiver.  The Presenter is invited to decide just how to present this viewer\\\\\\\"\\\\n\\\\n\\\\tself uniqueNameForReference.  \\\\\\\"So the viewer will have something nice to refer to\\\\\\\"\\\\n\\\\tself presenter viewObject: self! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 10/16/2000 11:01'!\\\\ncostumes\\\\n\\\\t\\\\\\\"Answer a list of costumes associated with the receiver.  The appearance of this method in class Object serves only as a backstop, probably only transitionally\\\\\\\"\\\\n\\\\n\\\\t^ nil! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 1/12/98 18:09'!\\\\nhaltIfNil! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'md 1/20/2006 17:09'!\\\\nhasLiteralSuchThat: testBlock\\\\n\\\\t\\\\\\\"This is the end of the imbedded structure path so return false.\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'md 1/20/2006 17:10'!\\\\nhasLiteralThorough: literal\\\\n\\\\t\\\\\\\"Answer true if literal is identical to any literal in this array, even if imbedded in further structures.  This is the end of the imbedded structure path so return false.\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 1/30/2001 22:24'!\\\\nhaveFullProtocolBrowsed\\\\n\\\\t\\\\\\\"Open up a Lexicon on the receiver\\\\\\\"\\\\n\\\\n\\\\t^ self haveFullProtocolBrowsedShowingSelector: nil\\\\n\\\\n\\\\t\\\\\\\"(2@3) haveFullProtocolBrowsed\\\\\\\"\\\\n! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'ar 9/27/2005 21:04'!\\\\nhaveFullProtocolBrowsedShowingSelector: aSelector\\\\n\\\\t\\\\\\\"Open up a Lexicon on the receiver, having it open up showing aSelector, which may be nil\\\\\\\"\\\\n\\\\n\\\\t| aBrowser |\\\\n\\\\taBrowser := (Smalltalk at: #InstanceBrowser ifAbsent:[^nil]) new useVocabulary: Vocabulary fullVocabulary.\\\\n\\\\taBrowser openOnObject: self inWorld: ActiveWorld showingSelector: aSelector\\\\n\\\\n\\\\t\\\\\\\"(2@3) haveFullProtocolBrowsed\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'md 7/30/2005 21:21'!\\\\nisArray\\\\n\\\\t^false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'ar 7/9/1999 18:18'!\\\\nisBehavior\\\\n\\\\t\\\\\\\"Return true if the receiver is a behavior.\\\\n\\\\tNote: Do not override in any class except behavior.\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'ajh 1/21/2003 13:15'!\\\\nisBlock\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'md 11/21/2003 12:14'!\\\\nisBlockClosure\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'yo 8/28/2002 13:41'!\\\\nisCharacter\\\\n\\\\n\\\\t^ false.\\\\n! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'ar 8/17/1999 19:43'!\\\\nisCollection\\\\n\\\\t\\\\\\\"Return true if the receiver is some sort of Collection and responds to basic collection messages such as #size and #do:\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n!Object methodsFor: 'testing'!\\\\nisColor\\\\n\\\\t\\\\\\\"Answer true if receiver is a Color. False by default.\\\\\\\"\\\\n\\\\n\\\\t^ false\\\\n! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'nk 4/17/2004 19:43'!\\\\nisColorForm\\\\n\\\\t^false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'md 11/21/2003 12:14'!\\\\nisCompiledMethod\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'mk 10/27/2003 17:33'!\\\\nisComplex\\\\n\\\\t\\\\\\\"Answer true if receiver is a Complex number. False by default.\\\\\\\"\\\\n\\\\n\\\\t^ false\\\\n! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'md 8/11/2005 16:45'!\\\\nisDictionary\\\\n\\\\t^false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'di 11/9/1998 09:38'!\\\\nisFloat\\\\n\\\\t\\\\\\\"Overridden to return true in Float, natch\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'ar 10/30/2000 23:22'!\\\\nisForm\\\\n\\\\t^false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'len 1/13/98 21:18'!\\\\nisFraction\\\\n\\\\t\\\\\\\"Answer true if the receiver is a Fraction.\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'rhi 8/14/2003 08:51'!\\\\nisHeap\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing'!\\\\nisInteger\\\\n\\\\t\\\\\\\"Overridden to return true in Integer.\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'rhi 8/12/2003 09:52'!\\\\nisInterval\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'nk 4/25/2002 08:04'!\\\\nisMessageSend\\\\n\\\\t^false\\\\n! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'md 2/19/2006 11:24'!\\\\nisMethodProperties\\\\n\\\\t^false! !\\\\n\\\\n!Object methodsFor: 'testing'!\\\\nisMorph\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'ar 9/13/2000 15:37'!\\\\nisMorphicEvent\\\\n\\\\t^false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'gm 2/22/2003 12:56'!\\\\nisMorphicModel\\\\n\\\\t\\\\\\\"Return true if the receiver is a morphic model\\\\\\\"\\\\n\\\\t^false\\\\n! !\\\\n\\\\n!Object methodsFor: 'testing'!\\\\nisNumber\\\\n\\\\t\\\\\\\"Overridden to return true in Number, natch\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'di 11/6/1998 08:04'!\\\\nisPoint\\\\n\\\\t\\\\\\\"Overridden to return true in Point.\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'ikp 9/26/97 14:45'!\\\\nisPseudoContext\\\\n\\\\t^false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'md 10/2/2005 21:52'!\\\\nisRectangle\\\\n\\\\t^false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'nk 6/14/2004 16:49'!\\\\nisSketchMorph\\\\n\\\\t^false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'ar 12/23/1999 15:43'!\\\\nisStream\\\\n\\\\t\\\\\\\"Return true if the receiver responds to the stream protocol\\\\\\\"\\\\n\\\\t^false\\\\n! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sma 6/15/2000 15:48'!\\\\nisString\\\\n\\\\t\\\\\\\"Overridden to return true in String, natch\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'md 4/30/2003 15:30'!\\\\nisSymbol\\\\n\\\\t^ false ! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'jam 3/9/2003 15:10'!\\\\nisSystemWindow\\\\n\\\\\\\"answer whatever the receiver is a SystemWindow\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing'!\\\\nisText\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'pmm 7/6/2006 20:46'!\\\\nisTrait\\\\n\\\\t\\\\\\\"Return true if the receiver is a trait.\\\\n\\\\tNote: Do not override in any class except TraitBehavior.\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'tk 10/21/97 12:45'!\\\\nisTransparent\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'ar 8/14/2001 23:19'!\\\\nisVariableBinding\\\\n\\\\t\\\\\\\"Return true if I represent a literal variable binding\\\\\\\"\\\\n\\\\t^false\\\\n\\\\t! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'ls 7/14/1998 21:45'!\\\\nisWebBrowser\\\\n\\\\t\\\\\\\"whether this object is a web browser.  See class: Scamper\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 10/27/2000 06:58'!\\\\nknownName\\\\n\\\\t\\\\\\\"If a formal name has been handed out for this object, answer it, else nil\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ Preferences capitalizedReferences\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[References keyAtValue: self ifAbsent: [nil]]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[nil]! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 9/27/96'!\\\\nname\\\\n\\\\t\\\\\\\"Answer a name for the receiver.  This is used generically in the title of certain inspectors, such as the referred-to inspector, and specificially by various subsystems.  By default, we let the object just print itself out..  \\\\\\\"\\\\n\\\\n\\\\t^ self printString! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 11/19/2001 13:28'!\\\\nnameForViewer\\\\n\\\\t\\\\\\\"Answer a name to be shown in a Viewer that is viewing the receiver\\\\\\\"\\\\n\\\\n\\\\t| aName |\\\\n\\\\t(aName _ self uniqueNameForReferenceOrNil) ifNotNil: [^ aName].\\\\n\\\\t(aName _ self knownName) ifNotNil: [^ aName].\\\\n\\\\n\\\\t^ [(self asString copyWithout: Character cr) truncateTo:  27] ifError:\\\\n\\\\t\\\\t[:msg :rcvr | ^ self class name printString]! !\\\\n\\\\n!Object methodsFor: 'testing'!\\\\nnotNil\\\\n\\\\t\\\\\\\"Coerces nil to false and everything else to true.\\\\\\\"\\\\n\\\\n\\\\t^true! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'tk 9/6/2001 19:15'!\\\\nopenInstanceBrowserWithTiles\\\\n\\\\t\\\\\\\"Open up an instance browser on me with tiles as the code type, and with the search level as desired.\\\\\\\"\\\\n\\\\n\\\\t| aBrowser |\\\\n\\\\taBrowser _ InstanceBrowser new.\\\\n\\\\taBrowser useVocabulary: Vocabulary fullVocabulary.\\\\n\\\\taBrowser limitClass: self class.\\\\n\\\\taBrowser contentsSymbol: #tiles.\\\\t\\\\t\\\\\\\"preset it to make extra buttons (tile menus)\\\\\\\"\\\\n\\\\taBrowser openOnObject: self inWorld: ActiveWorld showingSelector: nil.\\\\n\\\\taBrowser contentsSymbol: #source.\\\\n\\\\taBrowser toggleShowingTiles.\\\\n\\\\n\\\\t\\\\\\\"\\\\n(2@3) openInstanceBrowserWithTiles.\\\\nWatchMorph new openInstanceBrowserWithTiles\\\\n\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'tk 7/28/2005 04:50'!\\\\nrenameInternal: newName \\\\n\\\\t\\\\\\\"Change the internal name (because of a conflict) but leave the external name unchanged.  Change Player class name, but do not change the names that appear in tiles.  Any object that might be pointed to in the References dictionary might get this message sent to it upon reload\\\\\\\"\\\\n\\\\n\\\\t^ nil\\\\t\\\\\\\"caller will renameTo:.  new name may be different\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 2/27/2002 14:55'!\\\\nrenameTo: newName\\\\n\\\\t\\\\\\\"If the receiver has an inherent idea about its own name, it should take action here.  Any object that might be pointed to in the References dictionary might get this message sent to it upon reload\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 1/18/2001 13:43'!\\\\nshowDiffs\\\\n\\\\t\\\\\\\"Answer whether the receiver, serving as the model of a text-bearing entity, is 'showing differences' -- if it is, the editor may wish to show special feedback\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 10/20/1999 14:52'!\\\\nstepAt: millisecondClockValue in: aWindow\\\\n\\\\n\\\\t^ self stepIn: aWindow! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 10/19/1999 08:16'!\\\\nstepIn: aWindow\\\\n\\\\n\\\\t^ self step! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 10/19/1999 08:21'!\\\\nstepTime\\\\n\\\\t\\\\n\\\\t^ 1000 \\\\\\\"milliseconds -- default backstop for objects serving as models of system windows\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 10/19/1999 08:22'!\\\\nstepTimeIn: aSystemWindow\\\\n\\\\t\\\\n\\\\t^ 1000 \\\\\\\"milliseconds -- default backstop for objects serving as models of system windows\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 5/3/2001 18:22'!\\\\nvocabularyDemanded\\\\n\\\\t\\\\\\\"Answer a vocabulary that the receiver insists be used when it is looked at in a Viewer.  This allows specific classes to insist on specific custom vocabularies\\\\\\\"\\\\n\\\\n\\\\t^ nil! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 11/13/2001 07:26'!\\\\nwantsDiffFeedback\\\\n\\\\t\\\\\\\"Answer whether the receiver, serving as the model of a text-bearing entity, would like for 'diffs' green pane-border feedback to be shown\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'di 1/8/1999 15:04'!\\\\nwantsSteps\\\\n\\\\t\\\\\\\"Overridden by morphic classes whose instances want to be stepped,\\\\n\\\\tor by model classes who want their morphic views to be stepped.\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'testing' stamp: 'sw 10/19/1999 08:26'!\\\\nwantsStepsIn: aSystemWindow\\\\n\\\\t\\\\n\\\\t^ self wantsSteps! !\\\\n\\\\n\\\\n!Object methodsFor: 'translation support'!\\\\ninline: inlineFlag\\\\n\\\\t\\\\\\\"For translation only; noop when running in Smalltalk.\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'translation support'!\\\\nvar: varSymbol declareC: declString\\\\n\\\\t\\\\\\\"For translation only; noop when running in Smalltalk.\\\\\\\"! !\\\\n\\\\n\\\\n!Object methodsFor: 'undo' stamp: 'di 9/11/2000 20:32'!\\\\ncapturedState\\\\n\\\\t\\\\\\\"May be overridden in subclasses.\\\\\\\"\\\\n\\\\n\\\\t^ self shallowCopy\\\\n! !\\\\n\\\\n!Object methodsFor: 'undo' stamp: 'di 9/11/2000 20:29'!\\\\ncommandHistory\\\\n\\\\t\\\\\\\"Return the command history for the receiver\\\\\\\"\\\\n\\\\t| w |\\\\n\\\\t(w _ self currentWorld) ifNotNil: [^ w commandHistory].\\\\n\\\\t^ CommandHistory new. \\\\\\\"won't really record anything but prevent breaking things\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'undo' stamp: 'di 12/12/2000 15:01'!\\\\npurgeAllCommands\\\\n\\\\t\\\\\\\"Purge all commands for this object\\\\\\\"\\\\n\\\\tPreferences useUndo ifFalse: [^ self]. \\\\\\\"get out quickly\\\\\\\"\\\\n\\\\tself commandHistory purgeAllCommandsSuchThat: [:cmd | cmd undoTarget == self].\\\\n! !\\\\n\\\\n!Object methodsFor: 'undo' stamp: 'di 9/12/2000 08:15'!\\\\nredoFromCapturedState: st \\\\n\\\\t\\\\\\\"May be overridden in subclasses.  See also capturedState\\\\\\\"\\\\n\\\\n\\\\tself undoFromCapturedState: st  \\\\\\\"Simple cases are symmetric\\\\\\\"\\\\n! !\\\\n\\\\n!Object methodsFor: 'undo' stamp: 'sw 11/16/2000 14:42'!\\\\nrefineRedoTarget: target selector: aSymbol arguments: arguments in: refineBlock \\\\n\\\\t\\\\\\\"Any object can override this method to refine its redo specification\\\\\\\"\\\\n\\\\n\\\\t^ refineBlock\\\\n\\\\t\\\\tvalue: target\\\\n\\\\t\\\\tvalue: aSymbol\\\\n\\\\t\\\\tvalue: arguments! !\\\\n\\\\n!Object methodsFor: 'undo' stamp: 'sw 11/16/2000 14:42'!\\\\nrefineUndoTarget: target selector: aSymbol arguments: arguments in: refineBlock \\\\n\\\\t\\\\\\\"Any object can override this method to refine its undo specification\\\\\\\"\\\\n\\\\n\\\\t^ refineBlock\\\\n\\\\t\\\\tvalue: target\\\\n\\\\t\\\\tvalue: aSymbol\\\\n\\\\t\\\\tvalue: arguments! !\\\\n\\\\n!Object methodsFor: 'undo' stamp: 'di 9/11/2000 20:30'!\\\\nrememberCommand: aCommand\\\\n\\\\t\\\\\\\"Remember the given command for undo\\\\\\\"\\\\n\\\\tPreferences useUndo ifFalse: [^ self]. \\\\\\\"get out quickly\\\\\\\"\\\\n\\\\t^ self commandHistory rememberCommand: aCommand! !\\\\n\\\\n!Object methodsFor: 'undo' stamp: 'di 9/11/2000 20:30'!\\\\nrememberUndoableAction: actionBlock named: caption\\\\n\\\\t| cmd result |\\\\n\\\\tcmd _ Command new cmdWording: caption.\\\\n\\\\tcmd undoTarget: self selector: #undoFromCapturedState: argument: self capturedState.\\\\n\\\\tresult _ actionBlock value.\\\\n\\\\tcmd redoTarget: self selector: #redoFromCapturedState: argument: self capturedState.\\\\n\\\\tself rememberCommand: cmd.\\\\n\\\\t^ result! !\\\\n\\\\n!Object methodsFor: 'undo' stamp: 'di 9/11/2000 20:32'!\\\\nundoFromCapturedState: st \\\\n\\\\t\\\\\\\"May be overridden in subclasses.  See also capturedState\\\\\\\"\\\\n\\\\n\\\\tself copyFrom: st\\\\n! !\\\\n\\\\n\\\\n!Object methodsFor: 'updating'!\\\\nchanged\\\\n\\\\t\\\\\\\"Receiver changed in a general way; inform all the dependents by \\\\n\\\\tsending each dependent an update: message.\\\\\\\"\\\\n\\\\n\\\\tself changed: self! !\\\\n\\\\n!Object methodsFor: 'updating'!\\\\nchanged: aParameter \\\\n\\\\t\\\\\\\"Receiver changed. The change is denoted by the argument aParameter. \\\\n\\\\tUsually the argument is a Symbol that is part of the dependent's change \\\\n\\\\tprotocol. Inform all of the dependents.\\\\\\\"\\\\n\\\\n\\\\tself dependents do: [:aDependent | aDependent update: aParameter]! !\\\\n\\\\n!Object methodsFor: 'updating' stamp: 'nk 2/17/2004 11:12'!\\\\nchanged: anAspect with: anObject\\\\n\\\\t\\\\\\\"Receiver changed. The change is denoted by the argument anAspect. \\\\n\\\\tUsually the argument is a Symbol that is part of the dependent's change \\\\n\\\\tprotocol. Inform all of the dependents. Also pass anObject for additional information.\\\\\\\"\\\\n\\\\n\\\\tself dependents do: [:aDependent | aDependent update: anAspect with: anObject]! !\\\\n\\\\n!Object methodsFor: 'updating' stamp: 'sw 10/12/1999 18:15'!\\\\nhandledListVerification\\\\n\\\\t\\\\\\\"When a self-updating PluggableListMorph lazily checks to see the state of affairs, it first gives its model an opportunity to handle the list verification itself (this is appropriate for some models, such as VersionsBrowser); if a list's model has indeed handled things itself, it returns true here\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'updating' stamp: 'sw 10/31/1999 00:15'!\\\\nnoteSelectionIndex: anInteger for: aSymbol\\\\n\\\\t\\\\\\\"backstop\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'updating'!\\\\nokToChange\\\\n\\\\t\\\\\\\"Allows a controller to ask this of any model\\\\\\\"\\\\n\\\\t^ true! !\\\\n\\\\n!Object methodsFor: 'updating' stamp: 'sw 10/19/1999 14:39'!\\\\nupdateListsAndCodeIn: aWindow\\\\n\\\\tself canDiscardEdits ifFalse: [^ self].\\\\n\\\\taWindow updatablePanes do: [:aPane | aPane verifyContents]! !\\\\n\\\\n!Object methodsFor: 'updating' stamp: 'sma 2/29/2000 20:05'!\\\\nupdate: aParameter \\\\n\\\\t\\\\\\\"Receive a change notice from an object of whom the receiver is a \\\\n\\\\tdependent. The default behavior is to do nothing; a subclass might want \\\\n\\\\tto change itself in some way.\\\\\\\"\\\\n\\\\n\\\\t^ self! !\\\\n\\\\n!Object methodsFor: 'updating' stamp: 'nk 2/17/2004 11:13'!\\\\nupdate: anAspect with: anObject\\\\n\\\\t\\\\\\\"Receive a change notice from an object of whom the receiver is a \\\\n\\\\tdependent. The default behavior is to call update:,\\\\n\\\\twhich by default does nothing; a subclass might want \\\\n\\\\tto change itself in some way.\\\\\\\"\\\\n\\\\n\\\\t^ self update: anAspect! !\\\\n\\\\n!Object methodsFor: 'updating' stamp: 'jm 8/20/1998 18:26'!\\\\nwindowIsClosing\\\\n\\\\t\\\\\\\"This message is used to inform a models that its window is closing. Most models do nothing, but some, such as the Debugger, must do some cleanup. Note that this mechanism must be used with care by models that support multiple views, since one view may be closed while others left open.\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'sw 10/4/1999 08:13'!\\\\naddModelItemsToWindowMenu: aMenu\\\\n\\\\t\\\\\\\"aMenu is being constructed to be presented to the user in response to the user's pressing on the menu widget in the title bar of a morphic window.  Here, the model is given the opportunity to add any model-specific items to the menu, whose default target is the SystemWindow itself.\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'sw 10/5/1998 14:39'!\\\\naddModelMenuItemsTo: aCustomMenu forMorph: aMorph hand: aHandMorph \\\\n\\\\t\\\\\\\"The receiver serves as the model for aMorph; a menu is being constructed for the morph, and here the receiver is able to add its own items\\\\\\\"\\\\n! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'sma 11/12/2000 11:43'!\\\\nasExplorerString\\\\n\\\\t^ self printString! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'sw 7/13/1999 15:53'!\\\\ndefaultBackgroundColor\\\\n\\\\t\\\\\\\"Answer the color to be used as the base window color for a window whose model is an object of the receiver's class\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ Preferences windowColorFor: self class name! !\\\\n\\\\n!Object methodsFor: 'user interface'!\\\\ndefaultLabelForInspector\\\\n\\\\t\\\\\\\"Answer the default label to be used for an Inspector window on the receiver.\\\\\\\"\\\\n\\\\n\\\\t^ self class name! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'RAA 7/10/2000 08:11'!\\\\neToyStreamedRepresentationNotifying: aWidget\\\\n\\\\n\\\\t| outData |\\\\n\\\\t[ outData _ SmartRefStream streamedRepresentationOf: self ] \\\\n\\\\t\\\\ton: ProgressInitiationException\\\\n\\\\t\\\\tdo: [ :ex | \\\\n\\\\t\\\\t\\\\tex sendNotificationsTo: [ :min :max :curr |\\\\n\\\\t\\\\t\\\\t\\\\taWidget ifNotNil: [aWidget flashIndicator: #working].\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t].\\\\n\\\\t^outData\\\\n! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'ar 9/27/2005 20:29'!\\\\nexplore\\\\n\\\\t^ToolSet explore: self! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'sw 8/15/97 17:25'!\\\\nfullScreenSize\\\\n\\\\t\\\\\\\"Answer the size to which a window displaying the receiver should be set\\\\\\\"\\\\n\\\\t| adj |\\\\n\\\\tadj _ (3 * Preferences scrollBarWidth) @ 0.\\\\n\\\\t^ Rectangle origin: adj extent: (DisplayScreen actualScreenSize - adj)! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'RAA 6/21/1999 11:27'!\\\\nhasContentsInExplorer\\\\n\\\\n\\\\t^self basicSize > 0 or: [self class allInstVarNames isEmpty not]\\\\n! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'rbb 3/1/2005 09:28'!\\\\ninform: aString\\\\n\\\\t\\\\\\\"Display a message for the user to read and then dismiss. 6/9/96 sw\\\\\\\"\\\\n\\\\n\\\\taString isEmptyOrNil ifFalse: [UIManager default inform: aString]! !\\\\n\\\\n!Object methodsFor: 'user interface'!\\\\ninitialExtent\\\\n\\\\t\\\\\\\"Answer the desired extent for the receiver when a view on it is first opened on the screen. \\\\n\\\\t5/22/96 sw: in the absence of any override, obtain from RealEstateAgent\\\\\\\"\\\\n\\\\n\\\\t^ RealEstateAgent standardWindowExtent! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'ar 9/27/2005 20:30'!\\\\ninspectWithLabel: aLabel\\\\n\\\\t\\\\\\\"Create and schedule an Inspector in which the user can examine the receiver's variables.\\\\\\\"\\\\n\\\\t^ToolSet inspect: self label: aLabel! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'sw 6/12/2001 11:09'!\\\\nlaunchPartVia: aSelector\\\\n\\\\t\\\\\\\"Obtain a morph by sending aSelector to self, and attach it to the morphic hand.  This provides a general protocol for parts bins\\\\\\\"\\\\n\\\\n\\\\t| aMorph |\\\\n\\\\taMorph _ self perform: aSelector.\\\\n\\\\taMorph setProperty: #beFullyVisibleAfterDrop toValue: true.\\\\n\\\\taMorph openInHand! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'sw 6/17/2004 01:47'!\\\\nlaunchPartVia: aSelector label: aString\\\\n\\\\t\\\\\\\"Obtain a morph by sending aSelector to self, and attach it to the morphic hand.  This provides a general protocol for parts bins\\\\\\\"\\\\n\\\\n\\\\t| aMorph |\\\\n\\\\taMorph _ self perform: aSelector.\\\\n\\\\taMorph setNameTo: (ActiveWorld unusedMorphNameLike: aString).\\\\n\\\\taMorph setProperty: #beFullyVisibleAfterDrop toValue: true.\\\\n\\\\taMorph openInHand! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'sw 10/16/2000 11:11'!\\\\nlaunchTileToRefer\\\\n\\\\t\\\\\\\"Create a tile to reference the receiver, and attach it to the hand\\\\\\\"\\\\n\\\\n\\\\tself currentHand attachMorph: self tileToRefer! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'di 5/11/1999 22:26'!\\\\nmodelSleep\\\\n\\\\t\\\\\\\"A window with me as model is being exited or collapsed or closed.\\\\n\\\\tDefault response is no-op\\\\\\\" ! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'di 5/11/1999 22:01'!\\\\nmodelWakeUp\\\\n\\\\t\\\\\\\"A window with me as model is being entered or expanded.  Default response is no-op\\\\\\\" ! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'sw 10/16/1999 22:45'!\\\\nmodelWakeUpIn: aWindow\\\\n\\\\t\\\\\\\"A window with me as model is being entered or expanded.  Default response is no-op\\\\\\\" \\\\n\\\\tself modelWakeUp! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'sw 3/8/1999 15:27'!\\\\nmouseUpBalk: evt\\\\n\\\\t\\\\\\\"A button I own got a mouseDown, but the user moved out before letting up.  Certain kinds of objects (so-called 'radio buttons', for example, and other structures that must always have some selection, e.g. PaintBoxMorph) wish to take special action in this case; this default does nothing.\\\\\\\"\\\\n! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'sw 8/22/97 13:14'!\\\\nnewTileMorphRepresentative\\\\n\\\\t^ TileMorph new setLiteral: self! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'jcg 11/1/2001 13:13'!\\\\nnotYetImplemented\\\\n\\\\tself inform: 'Not yet implemented (', thisContext sender printString, ')'! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'di 6/10/1998 15:06'!\\\\nwindowActiveOnFirstClick\\\\n\\\\t\\\\\\\"Return true if my window should be active on first click.\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'user interface' stamp: 'di 6/10/1998 15:06'!\\\\nwindowReqNewLabel: labelString\\\\n\\\\t\\\\\\\"My window's title has been edited.\\\\n\\\\tReturn true if this is OK, and override for further behavior.\\\\\\\"\\\\n\\\\n\\\\t^ true! !\\\\n\\\\n\\\\n!Object methodsFor: 'world hacking' stamp: 'ar 3/17/2001 23:45'!\\\\ncouldOpenInMorphic\\\\n\\\\n        \\\\\\\"is there an obvious morphic world in which to open a new morph?\\\\\\\"\\\\n\\\\n        ^World notNil or: [ActiveWorld notNil]! !\\\\n\\\\n\\\\n!Object methodsFor: '*39Deprecated' stamp: 'gk 2/24/2004 08:49'!\\\\nbeep\\\\n\\\\t\\\\\\\"Deprecated.\\\\\\\"\\\\n\\\\t\\\\n\\\\tself deprecated: 'Use Beeper class>>beep instead.'.\\\\n\\\\tBeeper beep! !\\\\n\\\\n!Object methodsFor: '*39Deprecated' stamp: 'gk 2/24/2004 08:50'!\\\\nbeepPrimitive\\\\n\\\\t\\\\\\\"Deprecated. Beep in the absence of sound support.\\\\\\\"\\\\n\\\\t\\\\n\\\\tself deprecated: 'Use Beeper class>>beep or Beeper class>>beepPrimitive instead.'.\\\\n\\\\tBeeper beepPrimitive! !\\\\n\\\\n!Object methodsFor: '*39Deprecated' stamp: 'md 12/12/2003 17:02'!\\\\nbeep: soundName\\\\n\\\\t\\\\\\\"Make the given sound, unless the making of sound is disabled in Preferences.\\\\\\\"\\\\n\\\\n\\\\tself deprecated: 'Use SampledSound>>playSoundNamed: instead.'.\\\\n\\\\tPreferences soundsEnabled\\\\n\\\\t\\\\tifTrue: [self playSoundNamed: soundName]\\\\n! !\\\\n\\\\n!Object methodsFor: '*39Deprecated' stamp: 'sd 11/19/2004 16:57'!\\\\ncontentsGetz: x\\\\n\\\\tself deprecated: 'there is no method named contents in object and in addition only one sender in a method not called'. \\\\n\\\\tself contents: x! !\\\\n\\\\n!Object methodsFor: '*39Deprecated' stamp: 'sd 11/13/2003 21:10'!\\\\ndeprecatedExplanation: aString\\\\n     \\\\\\\"This method is OBSOLETE.  Use #deprecated: instead.\\\\\\\"\\\\n\\\\tself deprecated: 'Use Object>>deprecated: instead of deprecatedExplanation:.'.\\\\n\\\\n\\\\tPreferences showDeprecationWarnings ifTrue:\\\\n\\\\t\\\\t[Deprecation signal: ('{1} has been deprecated. {2}' translated format: {thisContext sender printString. aString})]! !\\\\n\\\\n!Object methodsFor: '*39Deprecated' stamp: 'sd 11/13/2003 21:11'!\\\\ndeprecated: aBlock explanation: aString \\\\n\\\\t \\\\\\\"This method is OBSOLETE.  Use #deprecated:block: instead.\\\\\\\"\\\\n\\\\tself deprecated: 'Use Object>>deprecated:block: instead of deprecated:explanation:.'.\\\\n\\\\n\\\\tPreferences showDeprecationWarnings ifTrue:\\\\n\\\\t\\\\t[Deprecation\\\\n\\\\t\\\\t\\\\tsignal: ('{1} has been deprecated. {2}' translated format: {thisContext sender printString. aString})].\\\\n\\\\t^ aBlock value.\\\\n! !\\\\n\\\\n!Object methodsFor: '*39Deprecated' stamp: 'md 12/12/2003 16:25'!\\\\ndoIfNotNil: aBlock\\\\n\\\\tself deprecated: 'use ifNotNilDo:'.\\\\n\\\\t^ self ifNotNilDo: aBlock\\\\n! !\\\\n\\\\n!Object methodsFor: '*39Deprecated' stamp: 'md 11/27/2004 12:20'!\\\\nifKindOf: aClass thenDo: aBlock\\\\n\\\\tself deprecated: 'Deprecated. Just use #isKindOf:'.\\\\n\\\\t^ (self isKindOf: aClass) ifTrue: [aBlock value: self]! !\\\\n\\\\n!Object methodsFor: '*39Deprecated' stamp: 'gk 2/23/2004 20:51'!\\\\nplaySoundNamed: soundName\\\\n\\\\t\\\\\\\"Deprecated.\\\\n\\\\tPlay the sound with the given name.\\\\\\\"\\\\n\\\\n\\\\tself deprecated: 'Use \\\\\\\"SoundService default playSoundNamed: aName\\\\\\\" instead.'.\\\\n\\\\tSoundService default playSoundNamed: soundName! !\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n!Object methodsFor: '*monticello' stamp: 'dvf 8/10/2004 23:25'!\\\\nisConflict\\\\n\\\\t^false! !\\\\n\\\\n\\\\n!Object methodsFor: '*services-base' stamp: 'rr 3/21/2006 11:54'!\\\\nrequestor\\\\n\\\\t\\\\\\\"returns the focused window's requestor\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"SystemWindow focusedWindow ifNotNilDo: [:w | ^ w requestor].\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"triggers an infinite loop\\\\\\\"\\\\n\\\\n\\\\t^ Requestor default! !\\\\n\\\\n\\\\n!Object methodsFor: '*system-support' stamp: 'dvf 8/23/2003 12:27'!\\\\nsystemNavigation\\\\n\\\\n\\\\t^ SystemNavigation default! !\\\\n\\\\n\\\\n!Object methodsFor: '*Tools-Explorer' stamp: 'stephaneducasse 9/17/2005 21:52'!\\\\nexploreAndYourself\\\\n\\\\t\\\\\\\"i.e. explore; yourself. Thisway i can peek w/o typing all the parentheses\\\\\\\"\\\\n\\\\tself explore. \\\\n     ^self! !\\\\n\\\\n!Object methodsFor: '*Tools-Explorer' stamp: 'stephaneducasse 9/17/2005 21:48'!\\\\nexploreWithLabel: label\\\\n\\\\n\\\\t^ ObjectExplorer new openExplorerFor: self withLabel:\\\\nlabel! !\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n!Object methodsFor: '*tools-browser' stamp: 'mu 3/6/2004 15:13'!\\\\nbrowse\\\\n\\\\tself systemNavigation browseClass: self class! !\\\\n\\\\n!Object methodsFor: '*tools-browser' stamp: 'mu 3/11/2004 16:00'!\\\\nbrowseHierarchy\\\\n\\\\tself systemNavigation browseHierarchy: self class! !\\\\n\\\\n\\\\n!Object methodsFor: 'private'!\\\\nerrorImproperStore\\\\n\\\\t\\\\\\\"Create an error notification that an improper store was attempted.\\\\\\\"\\\\n\\\\n\\\\tself error: 'Improper store into indexable object'! !\\\\n\\\\n!Object methodsFor: 'private'!\\\\nerrorNonIntegerIndex\\\\n\\\\t\\\\\\\"Create an error notification that an improper object was used as an index.\\\\\\\"\\\\n\\\\n\\\\tself error: 'only integers should be used as indices'! !\\\\n\\\\n!Object methodsFor: 'private' stamp: 'yo 6/29/2004 11:37'!\\\\nerrorNotIndexable\\\\n\\\\t\\\\\\\"Create an error notification that the receiver is not indexable.\\\\\\\"\\\\n\\\\n\\\\tself error: ('Instances of {1} are not indexable' translated format: {self class name})! !\\\\n\\\\n!Object methodsFor: 'private'!\\\\nerrorSubscriptBounds: index \\\\n\\\\t\\\\\\\"Create an error notification that an improper integer was used as an index.\\\\\\\"\\\\n\\\\n\\\\tself error: 'subscript is out of bounds: ' , index printString! !\\\\n\\\\n!Object methodsFor: 'private' stamp: 'ar 2/6/2004 14:47'!\\\\nprimitiveError: aString \\\\n\\\\t\\\\\\\"This method is called when the error handling results in a recursion in \\\\n\\\\tcalling on error: or halt or halt:.\\\\\\\"\\\\n\\\\n\\\\t| context |\\\\n\\\\t(String\\\\n\\\\t\\\\tstreamContents: \\\\n\\\\t\\\\t\\\\t[:s |\\\\n\\\\t\\\\t\\\\ts nextPutAll: '***System error handling failed***'.\\\\n\\\\t\\\\t\\\\ts cr; nextPutAll: aString.\\\\n\\\\t\\\\t\\\\tcontext _ thisContext sender sender.\\\\n\\\\t\\\\t\\\\t20 timesRepeat: [context == nil ifFalse: [s cr; print: (context _ context sender)]].\\\\n\\\\t\\\\t\\\\ts cr; nextPutAll: '-------------------------------'.\\\\n\\\\t\\\\t\\\\ts cr; nextPutAll: 'Type CR to enter an emergency evaluator.'.\\\\n\\\\t\\\\t\\\\ts cr; nextPutAll: 'Type any other character to restart.'])\\\\n\\\\t\\\\tdisplayAt: 0 @ 0.\\\\n\\\\t[Sensor keyboardPressed] whileFalse.\\\\n\\\\tSensor keyboard = Character cr ifTrue: [Transcripter emergencyEvaluator].\\\\n\\\\tSmalltalk isMorphic\\\\n\\\\t\\\\tifTrue: [World install \\\\\\\"init hands and redisplay\\\\\\\"]\\\\n\\\\t\\\\tifFalse: [ScheduledControllers searchForActiveController]! !\\\\n\\\\n!Object methodsFor: 'private'!\\\\nspecies\\\\n\\\\t\\\\\\\"Answer the preferred class for reconstructing the receiver.  For example, \\\\n\\\\tcollections create new collections whenever enumeration messages such as \\\\n\\\\tcollect: or select: are invoked.  The new kind of collection is determined by \\\\n\\\\tthe species of the original collection.  Species and class are not always the \\\\n\\\\tsame.  For example, the species of Interval is Array.\\\\\\\"\\\\n\\\\n\\\\t^self class! !\\\\n\\\\n!Object methodsFor: 'private'!\\\\nstoreAt: offset inTempFrame: aContext\\\\n\\\\t\\\\\\\"This message had to get sent to an expression already on the stack\\\\n\\\\tas a Block argument being accessed by the debugger.\\\\n\\\\tJust re-route it to the temp frame.\\\\\\\"\\\\n\\\\t^ aContext tempAt: offset put: self! !\\\\n\\\\n\\\\n!Object methodsFor: '*Morphic-NewCurve-testing''' stamp: 'wiz 12/31/2005 21:31'!\\\\nisNonZero\\\\n\\\\\\\"Overriden in Number. This returns the backstop answer for non-numbers\\\\\\\"\\\\n^false.! !\\\\n\\\\n\\\\n!Object methodsFor: 'events' stamp: 'nk 8/27/2003 16:23'!\\\\nactionsWithReceiver: anObject forEvent: anEventSelector\\\\n\\\\n\\\\t^(self actionSequenceForEvent: anEventSelector)\\\\n                select: [:anAction | anAction receiver == anObject ]! !\\\\n\\\\n!Object methodsFor: 'events' stamp: 'nk 8/27/2003 17:45'!\\\\nrenameActionsWithReceiver: anObject forEvent: anEventSelector toEvent: newEvent\\\\n\\\\n\\\\t| oldActions newActions |\\\\n\\\\toldActions _ Set new.\\\\n\\\\tnewActions _ Set new.\\\\n\\\\t(self actionSequenceForEvent: anEventSelector) do: [ :action |\\\\n\\\\t\\\\taction receiver == anObject\\\\n\\\\t\\\\t\\\\tifTrue: [ oldActions add: anObject ]\\\\n\\\\t\\\\t\\\\tifFalse: [ newActions add: anObject ]].\\\\n\\\\tself setActionSequence: (ActionSequence withAll: newActions) forEvent: anEventSelector.\\\\n\\\\toldActions do: [ :act | self when: newEvent evaluate: act ].! !\\\\n\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 10/16/2000 10:35'!\\\\nassureUniClass\\\\n\\\\t\\\\\\\"If the receiver is not yet an instance of a uniclass, create a uniclass for it and make the receiver become an instance of that class.\\\\\\\"\\\\n\\\\n\\\\t| anInstance |\\\\n\\\\tself belongsToUniClass ifTrue: [^ self].\\\\n\\\\tanInstance _ self class instanceOfUniqueClass.\\\\n\\\\tself become: (self as: anInstance class).\\\\n\\\\t^ anInstance! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 10/16/2000 10:41'!\\\\nbelongsToUniClass\\\\n\\\\t\\\\\\\"Answer whether the receiver belongs to a uniclass.  For the moment (this is not entirely satisfactory) this is precisely equated with the classname ending in a digit\\\\\\\"\\\\n\\\\n\\\\t^ self class name endsWithDigit! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 12/11/2000 15:37'!\\\\nbrowseOwnClassSubProtocol\\\\n\\\\t\\\\\\\"Open up a ProtocolBrowser on the subprotocol of the receiver\\\\\\\"\\\\n\\\\n\\\\tProtocolBrowser openSubProtocolForClass: self class\\\\n! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 8/4/2001 00:51'!\\\\ncategoriesForViewer: aViewer\\\\n\\\\t\\\\\\\"Answer a list of categories to offer in the given viewer\\\\\\\"\\\\n\\\\n\\\\t^ aViewer currentVocabulary categoryListForInstance: self ofClass: self class limitClass: aViewer limitClass! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 8/3/2001 22:08'!\\\\ncategoriesForVocabulary: aVocabulary limitClass: aLimitClass\\\\n\\\\t\\\\\\\"Answer a list of categories of methods for the receiver when using the given vocabulary, given that one considers only methods that are implemented not further away than aLimitClass\\\\\\\"\\\\n\\\\n\\\\t^ aVocabulary categoryListForInstance: self ofClass: self class limitClass: aLimitClass! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 10/25/2000 07:20'!\\\\nchooseNewNameForReference\\\\n\\\\t\\\\\\\"Offer an opportunity for the receiver, presumed already to be known in the References registry, to be renamed\\\\\\\"\\\\n\\\\n\\\\t|  nameSym current newName |\\\\n\\\\tcurrent _ References keyAtValue: self ifAbsent: [^ self error: 'not found in References'].\\\\n\\\\n\\\\tnewName _ FillInTheBlank request: 'Please enter new name' initialAnswer: current.\\\\n\\\\t\\\\\\\"Want to user some better way of determining the validity of the chosen identifier, and also want to give more precise diagnostic if the string the user types in is not acceptable.  Work to be done here.\\\\\\\"\\\\n\\\\n\\\\tnewName isEmpty ifTrue: [^ nil].\\\\n\\\\t((Scanner isLiteralSymbol: newName) and: [(newName includes: $:) not])\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[nameSym _ newName capitalized asSymbol.\\\\n\\\\t\\\\t\\\\t(((References includesKey:  nameSym) not and:\\\\n\\\\t\\\\t\\\\t\\\\t[(Smalltalk includesKey: nameSym) not]) and:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[(ScriptingSystem allKnownClassVariableNames includes: nameSym) not])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[(References associationAt: current) key: nameSym.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tReferences rehash.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^ nameSym]].\\\\n\\\\tself inform: 'Sorry, that name is not available.'.\\\\n\\\\t^ nil! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 8/3/2001 21:22'!\\\\ndefaultLimitClassForVocabulary: aVocabulary\\\\n\\\\t\\\\\\\"Answer the class to use, by default, as the limit class on a protocol browser or viewer opened up on the receiver, within the purview of the Vocabulary provided\\\\\\\"\\\\n\\\\n\\\\t^ (aVocabulary isKindOf: FullVocabulary)\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t [self class superclass == Object\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self class]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self class superclass]]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[ProtoObject]! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 2/14/2000 14:24'!\\\\ndefaultNameStemForInstances\\\\n\\\\t\\\\\\\"Answer a basis for names of default instances of the receiver.  The default is to let the class specify, but certain instances will want to override.  (PasteUpMorphs serving as Worlds come to mind\\\\\\\"\\\\n\\\\n\\\\t^ self class defaultNameStemForInstances! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 5/22/2001 16:53'!\\\\nelementTypeFor: aStringOrSymbol vocabulary: aVocabulary\\\\n\\\\t\\\\\\\"Answer a symbol characterizing what kind of element aStringOrSymbol represents.  Realistically, at present, this always just returns #systemScript; a prototyped but not-incorporated architecture supported use of a leading colon to characterize an inst var of a system class, and for the moment we still see its remnant here.\\\\\\\"\\\\n\\\\n\\\\tself flag: #deferred.  \\\\\\\"a loose end in the non-player case\\\\\\\"\\\\n\\\\t^ #systemScript! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 5/4/2001 07:04'!\\\\nexternalName\\\\n\\\\t\\\\\\\"Answer an external name by which the receiver is known.  Generic implementation here is a transitional backstop. probably\\\\\\\"\\\\n\\\\n\\\\t^ self nameForViewer! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 5/4/2001 07:06'!\\\\ngraphicForViewerTab\\\\n\\\\t\\\\\\\"When a Viewer is open on the receiver, its tab needs some graphic to show to the user.  Answer a form or a morph to serve that purpose.  A generic image is used for arbitrary objects, but note my reimplementors\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ ScriptingSystem formAtKey: 'Image'! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 5/4/2001 07:08'!\\\\nhasUserDefinedSlots\\\\n\\\\t\\\\\\\"Answer whether the receiver has any user-defined slots, in the omniuser sense of the term.  This is needed to allow Viewers to look at any object, not just at Players.\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 8/22/2002 14:07'!\\\\ninfoFor: anElement inViewer: aViewer\\\\n\\\\t\\\\\\\"The user made a gesture asking for info/menu relating to me.  Some of the messages dispatched here are not yet available in this image\\\\\\\"\\\\n\\\\n\\\\t| aMenu elementType |\\\\n\\\\telementType _ self elementTypeFor: anElement vocabulary: aViewer currentVocabulary.\\\\n\\\\t((elementType = #systemSlot) | (elementType == #userSlot))\\\\n\\\\t\\\\tifTrue:\\\\t[^ self slotInfoButtonHitFor: anElement inViewer: aViewer].\\\\n\\\\tself flag: #deferred.  \\\\\\\"Use a traditional MenuMorph, and reinstate the pacify thing\\\\\\\"\\\\n\\\\taMenu _ MenuMorph new defaultTarget: aViewer.\\\\n\\\\t#(\\\\t('implementors'\\\\t\\\\t\\\\tbrowseImplementorsOf:)\\\\n\\\\t\\\\t('senders'\\\\t\\\\t\\\\t\\\\tbrowseSendersOf:)\\\\n\\\\t\\\\t('versions'\\\\t\\\\t\\\\t\\\\tbrowseVersionsOf:)\\\\n\\\\t\\\\t-\\\\n\\\\t\\\\t('browse full'\\\\t\\\\t\\\\tbrowseMethodFull:)\\\\n\\\\t\\\\t('inheritance'\\\\t\\\\t\\\\tbrowseMethodInheritance:)\\\\n\\\\t\\\\t-\\\\n\\\\t\\\\t('about this method'\\\\t\\\\taboutMethod:)) do:\\\\n\\\\n\\\\t\\\\t\\\\t[:pair |\\\\n\\\\t\\\\t\\\\t\\\\tpair = '-'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[aMenu addLine]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[aMenu add: pair first target: aViewer selector: pair second argument: anElement]].\\\\n\\\\taMenu addLine.\\\\n\\\\taMenu defaultTarget: self.\\\\n\\\\t#(\\\\t('destroy script'\\\\t\\\\tremoveScript:)\\\\n\\\\t\\\\t('rename script'\\\\t\\\\trenameScript:)\\\\n\\\\t\\\\t('pacify script'\\\\t\\\\tpacifyScript:)) do:\\\\n\\\\t\\\\t\\\\t[:pair |\\\\n\\\\t\\\\t\\\\t\\\\taMenu add: pair first target: self selector: pair second argument: anElement].\\\\n\\\\n\\\\taMenu addLine.\\\\n\\\\taMenu  add: 'show categories....' target: aViewer selector: #showCategoriesFor: argument: anElement.\\\\n\\\\taMenu items size == 0 ifTrue:  \\\\\\\"won't happen at the moment a/c the above\\\\\\\"\\\\n\\\\t\\\\t[aMenu add: 'ok' action: nil].  \\\\\\\"in case it was a slot -- weird, transitional\\\\\\\"\\\\n\\\\n\\\\taMenu addTitle: anElement asString, ' (', elementType, ')'.\\\\n\\\\n\\\\taMenu popUpInWorld: self currentWorld.\\\\n ! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 9/26/2001 11:58'!\\\\ninitialTypeForSlotNamed: aName\\\\n\\\\t\\\\\\\"Answer the initial type to be ascribed to the given instance variable\\\\\\\"\\\\n\\\\n\\\\t^ #Object! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'ar 5/26/2001 16:13'!\\\\nisPlayerLike\\\\n\\\\t\\\\\\\"Return true if the receiver is a player-like object\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'nk 9/11/2004 16:53'!\\\\nmethodInterfacesInPresentationOrderFrom: interfaceList forCategory: aCategory \\\\n\\\\t\\\\\\\"Answer the interface list sorted in desired presentation order, using a \\\\n\\\\tstatic master-ordering list, q.v. The category parameter allows an \\\\n\\\\tescape in case one wants to apply different order strategies in different \\\\n\\\\tcategories, but for now a single master-priority-ordering is used -- see \\\\n\\\\tthe comment in method EToyVocabulary.masterOrderingOfPhraseSymbols\\\\\\\"\\\\n\\\\n\\\\t| masterOrder ordered unordered index |\\\\n\\\\tmasterOrder := Vocabulary eToyVocabulary masterOrderingOfPhraseSymbols.\\\\n\\\\tordered := SortedCollection sortBlock: [:a :b | a key < b key].\\\\n\\\\tunordered := SortedCollection sortBlock: [:a :b | a wording < b wording].\\\\n\\\\n\\\\tinterfaceList do: [:interface | \\\\n\\\\t\\\\tindex := masterOrder indexOf: interface elementSymbol.\\\\n\\\\t\\\\tindex isZero\\\\n\\\\t\\\\t\\\\tifTrue: [unordered add: interface]\\\\n\\\\t\\\\t\\\\tifFalse: [ordered add: index -> interface]].\\\\n\\\\n\\\\t^ Array\\\\n\\\\t\\\\tstreamContents: [:stream | \\\\n\\\\t\\\\t\\\\tordered do: [:assoc | stream nextPut: assoc value].\\\\n\\\\t\\\\t\\\\tstream nextPutAll: unordered]! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 10/24/2000 11:36'!\\\\nnewScriptorAround: aPhraseTileMorph\\\\n\\\\t\\\\\\\"Sprout a scriptor around aPhraseTileMorph, thus making a new script.  This is where generalized scriptors will be threaded in\\\\\\\"\\\\n\\\\n\\\\t^ nil! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 10/25/2000 17:42'!\\\\nofferViewerMenuForEvt: anEvent morph: aMorph\\\\n\\\\t\\\\\\\"Offer the viewer's primary menu to the user.  aMorph is some morph within the viewer itself, the one within which a mousedown triggered the need for this menu, and it is used only to retrieve the Viewer itself\\\\\\\"\\\\n\\\\n\\\\tself offerViewerMenuFor: (aMorph ownerThatIsA: StandardViewer) event: anEvent! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 8/11/2002 02:03'!\\\\nofferViewerMenuFor: aViewer event: evt\\\\n\\\\t\\\\\\\"Offer the primary Viewer menu to the user.  Copied up from Player code, but most of the functions suggested here don't work for non-Player objects, many aren't even defined, some relate to exploratory sw work not yet reflected in the current corpus.  We are early in the life cycle of this method...\\\\\\\"\\\\n\\\\n\\\\t| aMenu |\\\\n\\\\taMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\taMenu addStayUpItem.\\\\n\\\\taMenu title: '**CAUTION -- UNDER CONSTRUCTION!!**\\\\nMany things may not work!!\\\\n', self nameForViewer.\\\\n\\\\t(aViewer affordsUniclass and: [self belongsToUniClass not]) ifTrue:\\\\n\\\\t\\\\t[aMenu add: 'give me a Uniclass' action: #assureUniClass.\\\\n\\\\t\\\\taMenu addLine].\\\\n\\\\taMenu add: 'choose vocabulary...' target: aViewer action: #chooseVocabulary.\\\\n\\\\taMenu add: 'choose limit class...' target: aViewer action: #chooseLimitClass.\\\\n\\\\taMenu add: 'add search pane' target: aViewer action: #addSearchPane.\\\\n\\\\taMenu balloonTextForLastItem: 'Specify which class should be the most generic one to have its methods shown in this Viewer'.\\\\n\\\\taMenu addLine.\\\\n\\\\n\\\\tself belongsToUniClass ifTrue:\\\\n\\\\t\\\\t[aMenu add: 'add a new instance variable' target: self selector: #addInstanceVariableIn: argument: aViewer.\\\\n\\\\t\\\\taMenu add: 'add a new script' target: aViewer selector: #newPermanentScriptIn: argument: aViewer.\\\\n\\\\t\\\\taMenu addLine.\\\\n\\\\t\\\\taMenu add: 'make my class be first-class' target: self selector: #makeFirstClassClassIn: argument: aViewer.\\\\n\\\\t\\\\taMenu add: 'move my changes up to my superclass' target: self action: #promoteChangesToSuperclass.\\\\n\\\\t\\\\taMenu addLine].\\\\n\\\\n\\\\taMenu add: 'tear off a tile' target: self selector: #launchTileToRefer.\\\\n\\\\taMenu addLine.\\\\n\\\\n\\\\taMenu add: 'inspect me' target: self selector: #inspect.\\\\n\\\\taMenu add: 'inspect my class' target: self class action: #inspect.\\\\n\\\\taMenu addLine.\\\\n\\\\n\\\\taMenu add: 'browse vocabulary' action: #haveFullProtocolBrowsed.\\\\n\\\\taMenu add: 'inspect this Viewer' target: aViewer action: #inspect.\\\\n\\\\n\\\\taMenu popUpEvent: evt in: aViewer currentWorld\\\\n\\\\n\\\\\\\"\\\\n\\\\taMenu add: 'references to me' target: aViewer action: #browseReferencesToObject.\\\\n\\\\taMenu add: 'toggle scratch pane' target: aViewer selector: #toggleScratchPane.\\\\n\\\\taMenu add: 'make a nascent script for me' target: aViewer selector: #makeNascentScript.\\\\n\\\\taMenu add: 'rename me' target: aViewer selector: #chooseNewNameForReference.\\\\n\\\\taMenu add: 'browse full' action: #browseOwnClassFull.\\\\n\\\\taMenu add: 'browse hierarchy' action: #browseOwnClassHierarchy.\\\\n\\\\taMenu add: 'set user level...' target: aViewer action: #setUserLevel.\\\\n\\\\taMenu add: 'browse sub-protocol' action: #browseOwnClassSubProtocol.\\\\n\\\\taMenu addLine.\\\\n\\\\n\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 1/22/2001 15:20'!\\\\nrenameScript: oldSelector\\\\n\\\\t\\\\\\\"prompt the user for a new selector and apply it.  Presently only works for players\\\\\\\"\\\\n\\\\n\\\\tself notYetImplemented! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 8/10/2004 11:53'!\\\\ntilePhrasesForCategory: aCategorySymbol inViewer: aViewer\\\\n\\\\t\\\\\\\"Return a collection of phrases for the category.\\\\\\\"\\\\n\\\\n\\\\t| interfaces |\\\\n\\\\tinterfaces _ self methodInterfacesForCategory: aCategorySymbol inVocabulary: aViewer currentVocabulary limitClass: aViewer limitClass.\\\\n\\\\tinterfaces _ self methodInterfacesInPresentationOrderFrom: interfaces forCategory: aCategorySymbol.\\\\n\\\\t^ self tilePhrasesForMethodInterfaces: interfaces inViewer: aViewer! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 8/10/2004 11:53'!\\\\ntilePhrasesForMethodInterfaces: methodInterfaceList inViewer: aViewer\\\\n\\\\t\\\\\\\"Return a collection of ViewerLine objects corresponding to the method-interface list provided.   The resulting list will be in the same order as the incoming list, but may be smaller if the viewer's vocbulary suppresses some of the methods, or if, in classic tiles mode, the selector requires more arguments than can be handled.\\\\\\\"\\\\n\\\\n\\\\t| toSuppress interfaces resultType itsSelector |\\\\n\\\\ttoSuppress _ aViewer currentVocabulary phraseSymbolsToSuppress.\\\\n\\\\tinterfaces _ methodInterfaceList reject: [:int | toSuppress includes: int selector].\\\\n\\\\tPreferences universalTiles ifFalse:  \\\\\\\"Classic tiles have their limitations...\\\\\\\"\\\\n\\\\t\\\\t[interfaces _ interfaces select:\\\\n\\\\t\\\\t\\\\t[:int |\\\\n\\\\t\\\\t\\\\t\\\\titsSelector _ int selector.\\\\n\\\\t\\\\t\\\\t\\\\titsSelector numArgs < 2 or:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"The lone two-arg loophole in classic tiles\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[#(color:sees:) includes: itsSelector]]].\\\\n\\\\n\\\\t^ interfaces collect:\\\\n\\\\t\\\\t[:aMethodInterface |\\\\n\\\\t\\\\t\\\\t((resultType _ aMethodInterface resultType) notNil and: [resultType ~~ #unknown]) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[aViewer phraseForVariableFrom: aMethodInterface]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[aViewer phraseForCommandFrom: aMethodInterface]]! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 8/10/2004 12:23'!\\\\ntilePhrasesForSelectorList: aList inViewer: aViewer\\\\n\\\\t\\\\\\\"Particular to the search facility in viewers.  Answer a list, in appropriate order, of ViewerLine objects to put into the viewer.\\\\\\\"\\\\n\\\\n\\\\t| interfaces aVocab |\\\\n\\\\taVocab _ aViewer currentVocabulary.\\\\n\\\\tinterfaces _ self\\\\n\\\\t\\\\tmethodInterfacesInPresentationOrderFrom:\\\\n\\\\t\\\\t\\\\t(aList collect: [:aSel | aVocab methodInterfaceForSelector: aSel class: self class])\\\\n\\\\t\\\\tforCategory: #search.\\\\n\\\\t^ self tilePhrasesForMethodInterfaces: interfaces inViewer: aViewer! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 5/4/2001 04:51'!\\\\ntileToRefer\\\\n\\\\t\\\\\\\"Answer a reference tile that comprises an alias to me\\\\\\\"\\\\n\\\\n\\\\t^ TileMorph new setToReferTo: self! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sd 3/30/2005 22:04'!\\\\nuniqueInstanceVariableNameLike: aString excluding: takenNames\\\\n\\\\t\\\\\\\"Answer a nice instance-variable name to be added to the receiver which resembles aString, making sure it does not coincide with any element in takenNames\\\\\\\"\\\\n\\\\n\\\\t| okBase uniqueName usedNames |\\\\n\\\\tusedNames _ self class allInstVarNamesEverywhere.\\\\n\\\\tusedNames removeAllFoundIn: self class instVarNames.\\\\n\\\\tusedNames addAll: takenNames.\\\\n\\\\tokBase _ Scanner wellFormedInstanceVariableNameFrom: aString.\\\\n\\\\n\\\\tuniqueName _ Utilities keyLike: okBase satisfying: \\\\n\\\\t\\\\t[:aKey | (usedNames includes: aKey) not].\\\\n\\\\n\\\\t^ uniqueName! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 11/21/2001 15:16'!\\\\nuniqueNameForReference\\\\n\\\\t\\\\\\\"Answer a nice name by which the receiver can be referred to by other objects.  At present this uses a global References dictionary to hold the database of references, but in due course this will need to acquire some locality\\\\\\\"\\\\n\\\\n\\\\t| aName nameSym stem knownClassVars |\\\\n\\\\t(aName _ self uniqueNameForReferenceOrNil) ifNotNil: [^ aName].\\\\n\\\\t(stem _ self knownName) ifNil:\\\\n\\\\t\\\\t[stem _ self defaultNameStemForInstances asString].\\\\n\\\\tstem _ stem select: [:ch | ch isLetter or: [ch isDigit]].\\\\n\\\\tstem size == 0 ifTrue: [stem _ 'A'].\\\\n\\\\tstem first isLetter ifFalse:\\\\n\\\\t\\\\t[stem _ 'A', stem].\\\\n\\\\tstem _ stem capitalized.\\\\n\\\\tknownClassVars _ ScriptingSystem allKnownClassVariableNames.\\\\n\\\\taName _ Utilities keyLike:  stem satisfying:\\\\n\\\\t\\\\t[:jinaLake |\\\\n\\\\t\\\\t\\\\tnameSym _ jinaLake asSymbol.\\\\n\\\\t\\\\t\\\\t ((References includesKey:  nameSym) not and:\\\\n\\\\t\\\\t\\\\t\\\\t[(Smalltalk includesKey: nameSym) not]) and:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[(knownClassVars includes: nameSym) not]].\\\\n\\\\n\\\\tReferences at: (aName _ aName asSymbol) put: self.\\\\n\\\\t^ aName! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'md 1/17/2006 17:58'!\\\\nuniqueNameForReferenceFrom: proposedName\\\\n\\\\t\\\\\\\"Answer a satisfactory symbol, similar to the proposedName but obeying the rules, to represent the receiver\\\\\\\"\\\\n\\\\n\\\\t| aName nameSym stem okay |\\\\n\\\\tproposedName = self uniqueNameForReferenceOrNil \\\\n\\\\t\\\\tifTrue: [^ proposedName].  \\\\\\\"No change\\\\\\\"\\\\n\\\\n\\\\tstem _ proposedName select: [:ch | ch isLetter or: [ch isDigit]].\\\\n\\\\tstem size == 0 ifTrue: [stem _ 'A'].\\\\n\\\\tstem first isLetter ifFalse:\\\\n\\\\t\\\\t[stem _ 'A', stem].\\\\n\\\\tstem _ stem capitalized.\\\\n\\\\taName _ Utilities keyLike: stem satisfying:\\\\n\\\\t\\\\t[:jinaLake |\\\\n\\\\t\\\\t\\\\tnameSym _ jinaLake asSymbol.\\\\n\\\\t\\\\t\\\\tokay _ true.\\\\n\\\\t\\\\t\\\\t(self class bindingOf: nameSym) ifNotNil: [okay _ false \\\\\\\"don't use it\\\\\\\"].\\\\n\\\\t\\\\t\\\\tokay].\\\\n\\\\t^ aName asSymbol! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 3/15/2004 23:01'!\\\\nuniqueNameForReferenceOrNil\\\\n\\\\t\\\\\\\"If the receiver has a unique name for reference, return it here, else return nil\\\\\\\"\\\\n\\\\n\\\\t^ References keyAtValue: self ifAbsent: [nil]! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'ar 5/16/2001 01:40'!\\\\nupdateThresholdForGraphicInViewerTab\\\\n\\\\t\\\\\\\"When a Viewer is open on the receiver, its tab needs some graphic to show to the user. Computing this graphic can take quite some time so we want to make the update frequency depending on how long it takes to compute the thumbnail. The threshold returned by this method defines that the viewer will update at most every 'threshold * timeItTakesToDraw' milliseconds. Thus, if the time for computing the receiver's thumbnail is 200 msecs and the the threshold is 10, the viewer will update at most every two seconds.\\\\\\\"\\\\n\\\\t^20 \\\\\\\"seems to be a pretty good general choice\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'viewer' stamp: 'sw 3/9/2001 13:48'!\\\\nusableMethodInterfacesIn: aListOfMethodInterfaces\\\\n\\\\t\\\\\\\"Filter aList, returning a subset list of apt phrases\\\\\\\"\\\\n\\\\n\\\\t^ aListOfMethodInterfaces\\\\n! !\\\\n\\\\n\\\\n!Object methodsFor: 'inspecting' stamp: 'ar 9/27/2005 18:31'!\\\\nbasicInspect\\\\n\\\\t\\\\\\\"Create and schedule an Inspector in which the user can examine the \\\\n\\\\treceiver's variables. This method should not be overriden.\\\\\\\"\\\\n\\\\t^ToolSet basicInspect: self! !\\\\n\\\\n!Object methodsFor: 'inspecting' stamp: 'md 1/18/2006 19:09'!\\\\ninspect\\\\n\\\\t\\\\\\\"Create and schedule an Inspector in which the user can examine the receiver's variables.\\\\\\\"\\\\n\\\\tToolSet inspect: self! !\\\\n\\\\n!Object methodsFor: 'inspecting' stamp: 'apb 7/14/2004 12:19'!\\\\ninspectorClass\\\\n\\\\t\\\\\\\"Answer the class of the inspector to be used on the receiver.  Called by inspect; \\\\n\\\\tuse basicInspect to get a normal (less useful) type of inspector.\\\\\\\"\\\\n\\\\n\\\\t^ Inspector! !\\\\n\\\\n\\\\n!Object methodsFor: 'thumbnail' stamp: 'dgd 9/25/2004 23:17'!\\\\niconOrThumbnailOfSize: aNumberOrPoint \\\\n\\\\t\\\\\\\"Answer an appropiate form to represent the receiver\\\\\\\"\\\\n\\\\t^ nil! !\\\\n\\\\n\\\\n!Object methodsFor: 'scripts-kernel' stamp: 'nk 10/14/2004 10:55'!\\\\nuniversalTilesForGetterOf: aMethodInterface\\\\n\\\\t\\\\\\\"Return universal tiles for a getter on the given method interface.\\\\\\\"\\\\n\\\\n\\\\t| ms argTile argArray itsSelector |\\\\n\\\\titsSelector _ aMethodInterface selector.\\\\n\\\\targArray _ #().\\\\n\\\\n\\\\t\\\\\\\"Four gratuituous special cases...\\\\\\\"\\\\n\\\\n\\\\t(itsSelector == #color:sees:) ifTrue:\\\\n\\\\t\\\\t[argTile _ ScriptingSystem tileForArgType: #Color.\\\\n\\\\t\\\\targArray _ Array with: argTile colorSwatch color with: argTile colorSwatch color copy].\\\\n\\\\n\\\\titsSelector == #seesColor: ifTrue:\\\\n\\\\t\\\\t[argTile _ ScriptingSystem tileForArgType: #Color.\\\\n\\\\t\\\\targArray _  Array with: argTile colorSwatch color].\\\\n\\\\n\\\\t(#(touchesA: overlaps: overlapsAny:) includes: itsSelector) ifTrue:\\\\n\\\\t\\\\t[argTile _ ScriptingSystem tileForArgType: #Player.\\\\n\\\\t\\\\targArray _ Array with: argTile actualObject].\\\\n\\\\n\\\\tms _ MessageSend receiver: self selector: itsSelector arguments: argArray.\\\\n\\\\t^ ms asTilesIn: self class globalNames: (self class officialClass ~~ CardPlayer)\\\\n\\\\t\\\\t\\\\t\\\\\\\"For CardPlayers, use 'self'.  For others, name it, and use its name.\\\\\\\"! !\\\\n\\\\n!Object methodsFor: 'scripts-kernel' stamp: 'tk 9/28/2001 13:30'!\\\\nuniversalTilesForInterface: aMethodInterface\\\\n\\\\t\\\\\\\"Return universal tiles for the given method interface.  Record who self is.\\\\\\\"\\\\n\\\\n\\\\t| ms argTile itsSelector aType argList |\\\\n\\\\titsSelector _ aMethodInterface selector.\\\\n\\\\targList _ OrderedCollection new.\\\\n\\\\taMethodInterface argumentVariables doWithIndex:\\\\n\\\\t\\\\t[:anArgumentVariable :anIndex | \\\\n\\\\t\\\\t\\\\targTile _ ScriptingSystem tileForArgType: (aType _ aMethodInterface typeForArgumentNumber: anIndex).\\\\n\\\\t\\\\t\\\\targList add: (aType == #Player \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [argTile actualObject]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [argTile literal]).\\\\t\\\\\\\"default value for each type\\\\\\\"].\\\\n\\\\n\\\\tms _ MessageSend receiver: self selector: itsSelector arguments: argList asArray.\\\\n\\\\t^ ms asTilesIn: self class globalNames: (self class officialClass ~~ CardPlayer)\\\\n\\\\t\\\\t\\\\t\\\\\\\"For CardPlayers, use 'self'.  For others, name it, and use its name.\\\\\\\"! !\\\\n\\\\n\\\\n!Object methodsFor: 'breakpoint' stamp: 'bkv 7/1/2003 12:33'!\\\\nbreak\\\\n\\\\t\\\\\\\"This is a simple message to use for inserting breakpoints during debugging.\\\\n\\\\tThe debugger is opened by sending a signal. This gives a chance to restore\\\\n\\\\tinvariants related to multiple processes.\\\\\\\"\\\\n\\\\n\\\\tBreakPoint signal.\\\\n\\\\n\\\\t\\\\\\\"nil break.\\\\\\\"! !\\\\n\\\\n\\\\n\\\\n!Object methodsFor: '*omnibrowser-converting' stamp: 'cwp 4/17/2006 12:16'!\\\\nasAnnouncement\\\\n\\\\t^ self! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nObject class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!Object class methodsFor: 'class initialization' stamp: 'ar 2/11/2001 02:00'!\\\\nflushDependents\\\\n\\\\tDependentsFields keysAndValuesDo:[:key :dep|\\\\n\\\\t\\\\tkey ifNotNil:[key removeDependent: nil].\\\\n\\\\t].\\\\n\\\\tDependentsFields finalizeValues.! !\\\\n\\\\n!Object class methodsFor: 'class initialization' stamp: 'rw 2/10/2002 13:09'!\\\\nflushEvents\\\\n\\\\t\\\\\\\"Object flushEvents\\\\\\\"\\\\n\\\\n\\\\tEventManager flushEvents. ! !\\\\n\\\\n!Object class methodsFor: 'class initialization' stamp: 'rww 10/2/2001 07:35'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Object initialize\\\\\\\"\\\\n\\\\tDependentsFields ifNil:[self initializeDependentsFields].! !\\\\n\\\\n!Object class methodsFor: 'class initialization' stamp: 'ar 2/11/2001 01:41'!\\\\ninitializeDependentsFields\\\\n\\\\t\\\\\\\"Object initialize\\\\\\\"\\\\n\\\\tDependentsFields _ WeakIdentityKeyDictionary new.\\\\n! !\\\\n\\\\n!Object class methodsFor: 'class initialization' stamp: 'ar 2/11/2001 01:45'!\\\\nreInitializeDependentsFields\\\\n\\\\t\\\\\\\"Object reInitializeDependentsFields\\\\\\\"\\\\n\\\\t| oldFields |\\\\n\\\\toldFields _ DependentsFields.\\\\n\\\\tDependentsFields _ WeakIdentityKeyDictionary new.\\\\n\\\\toldFields keysAndValuesDo:[:obj :deps|\\\\n\\\\t\\\\tdeps do:[:d| obj addDependent: d]].\\\\n! !\\\\n\\\\n\\\\n!Object class methodsFor: 'documentation'!\\\\nhowToModifyPrimitives\\\\n\\\\t\\\\\\\"You are allowed to write methods which specify primitives, but please use \\\\n\\\\tcaution.  If you make a subclass of a class which contains a primitive method, \\\\n\\\\tthe subclass inherits the primitive.  The message which is implemented \\\\n\\\\tprimitively may be overridden in the subclass (E.g., see at:put: in String's \\\\n\\\\tsubclass Symbol).  The primitive behavior can be invoked using super (see \\\\n\\\\tSymbol string:). \\\\n\\\\t \\\\n\\\\tA class which attempts to mimic the behavior of another class without being \\\\n\\\\tits subclass may or may not be able to use the primitives of the original class.  \\\\n\\\\tIn general, if the instance variables read or written by a primitive have the \\\\n\\\\tsame meanings and are in the same fields in both classes, the primitive will \\\\n\\\\twork.  \\\\n\\\\n\\\\tFor certain frequently used 'special selectors', the compiler emits a \\\\n\\\\tsend-special-selector bytecode instead of a send-message bytecode.  \\\\n\\\\tSpecial selectors were created because they offer two advantages.  Code \\\\n\\\\twhich sends special selectors compiles into fewer bytes than normal.  For \\\\n\\\\tsome pairs of receiver classes and special selectors, the interpreter jumps \\\\n\\\\tdirectly to a primitive routine without looking up the method in the class.  \\\\n\\\\tThis is much faster than a normal message lookup. \\\\n\\\\t \\\\n\\\\tA selector which is a special selector solely in order to save space has a \\\\n\\\\tnormal behavior.  Methods whose selectors are special in order to \\\\n\\\\tgain speed contain the comment, 'No Lookup'.  When the interpreter \\\\n\\\\tencounters a send-special-selector bytecode, it checks the class of the \\\\n\\\\treceiver and the selector.  If the class-selector pair is a no-lookup pair, \\\\n\\\\tthen the interpreter swiftly jumps to the routine which implements the \\\\n\\\\tcorresponding primitive.  (A special selector whose receiver is not of the \\\\n\\\\tright class to make a no-lookup pair, is looked up normally).  The pairs are \\\\n\\\\tlisted below.  No-lookup methods contain a primitive number specification, \\\\n\\\\t<primitive: xx>, which is redundant.  Since the method is not normally looked \\\\n\\\\tup, deleting the primitive number specification cannot prevent this \\\\n\\\\tprimitive from running.  If a no-lookup primitive fails, the method is looked \\\\n\\\\tup normally, and the expressions in it are executed. \\\\n\\\\t \\\\n\\\\tNo Lookup pairs of (class, selector) \\\\n\\\\t \\\\n\\\\tSmallInteger with any of\\\\t\\\\t+ - * /  \\\\\\\\\\\\\\\\  bitOr: bitShift: bitAnd:  // \\\\n\\\\tSmallInteger with any of\\\\t\\\\t=  ~=  >  <  >=  <= \\\\n\\\\tAny class with\\\\t\\\\t\\\\t\\\\t\\\\t== \\\\n\\\\tAny class with \\\\t\\\\t\\\\t\\\\t\\\\t@ \\\\n\\\\tPoint with either of\\\\t\\\\t\\\\t\\\\tx y \\\\n\\\\tContextPart with\\\\t\\\\t\\\\t\\\\t\\\\tblockCopy: \\\\n\\\\tBlockContext with either of \\\\t\\\\tvalue value:\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\tself error: 'comment only'! !\\\\n\\\\n!Object class methodsFor: 'documentation'!\\\\nwhatIsAPrimitive\\\\n\\\\t\\\\\\\"Some messages in the system are responded to primitively. A primitive   \\\\n\\\\tresponse is performed directly by the interpreter rather than by evaluating   \\\\n\\\\texpressions in a method. The methods for these messages indicate the   \\\\n\\\\tpresence of a primitive response by including <primitive: xx> before the   \\\\n\\\\tfirst expression in the method.   \\\\n\\\\t  \\\\n\\\\tPrimitives exist for several reasons. Certain basic or 'primitive' \\\\n\\\\toperations cannot be performed in any other way. Smalltalk without \\\\n\\\\tprimitives can move values from one variable to another, but cannot add two \\\\n\\\\tSmallIntegers together. Many methods for arithmetic and comparison \\\\n\\\\tbetween numbers are primitives. Some primitives allow Smalltalk to \\\\n\\\\tcommunicate with I/O devices such as the disk, the display, and the keyboard. \\\\n\\\\tSome primitives exist only to make the system run faster; each does the same \\\\n\\\\tthing as a certain Smalltalk method, and its implementation as a primitive is \\\\n\\\\toptional.  \\\\n\\\\t  \\\\n\\\\tWhen the Smalltalk interpreter begins to execute a method which specifies a \\\\n\\\\tprimitive response, it tries to perform the primitive action and to return a \\\\n\\\\tresult. If the routine in the interpreter for this primitive is successful, \\\\n\\\\tit will return a value and the expressions in the method will not be evaluated. \\\\n\\\\tIf the primitive routine is not successful, the primitive 'fails', and the \\\\n\\\\tSmalltalk expressions in the method are executed instead. These \\\\n\\\\texpressions are evaluated as though the primitive routine had not been \\\\n\\\\tcalled.  \\\\n\\\\t  \\\\n\\\\tThe Smalltalk code that is evaluated when a primitive fails usually \\\\n\\\\tanticipates why that primitive might fail. If the primitive is optional, the \\\\n\\\\texpressions in the method do exactly what the primitive would have done (See \\\\n\\\\tNumber @). If the primitive only works on certain classes of arguments, the \\\\n\\\\tSmalltalk code tries to coerce the argument or appeals to a superclass to find \\\\n\\\\ta more general way of doing the operation (see SmallInteger +). If the \\\\n\\\\tprimitive is never supposed to fail, the expressions signal an error (see \\\\n\\\\tSmallInteger asFloat).  \\\\n\\\\t  \\\\n\\\\tEach method that specifies a primitive has a comment in it. If the primitive is \\\\n\\\\toptional, the comment will say 'Optional'. An optional primitive that is not \\\\n\\\\timplemented always fails, and the Smalltalk expressions do the work \\\\n\\\\tinstead.  \\\\n\\\\t \\\\n\\\\tIf a primitive is not optional, the comment will say, 'Essential'. Some \\\\n\\\\tmethods will have the comment, 'No Lookup'. See Object \\\\n\\\\thowToModifyPrimitives for an explanation of special selectors which are \\\\n\\\\tnot looked up.  \\\\n\\\\t  \\\\n\\\\tFor the primitives for +, -, *, and bitShift: in SmallInteger, and truncated \\\\n\\\\tin Float, the primitive constructs and returns a 16-bit \\\\n\\\\tLargePositiveInteger when the result warrants it. Returning 16-bit \\\\n\\\\tLargePositiveIntegers from these primitives instead of failing is \\\\n\\\\toptional in the same sense that the LargePositiveInteger arithmetic \\\\n\\\\tprimitives are optional. The comments in the SmallInteger primitives say, \\\\n\\\\t'Fails if result is not a SmallInteger', even though the implementor has the \\\\n\\\\toption to construct a LargePositiveInteger. For further information on \\\\n\\\\tprimitives, see the 'Primitive Methods' part of the chapter on the formal \\\\n\\\\tspecification of the interpreter in the Smalltalk book.\\\\\\\"\\\\n\\\\n\\\\tself error: 'comment only'! !\\\\n\\\\n\\\\n!Object class methodsFor: 'file list services' stamp: 'nk 6/12/2004 11:41'!\\\\nfileReaderServicesForDirectory: aFileDirectory\\\\n\\\\t\\\\\\\"Backstop\\\\\\\"\\\\n\\\\t^#()! !\\\\n\\\\n!Object class methodsFor: 'file list services' stamp: 'nk 6/12/2004 11:30'!\\\\nfileReaderServicesForFile: fullName suffix: suffix\\\\n\\\\t\\\\\\\"Backstop\\\\\\\"\\\\n\\\\t^#()! !\\\\n\\\\n!Object class methodsFor: 'file list services' stamp: 'md 2/15/2006 17:20'!\\\\nservices\\\\n\\\\t\\\\\\\"Backstop\\\\\\\"\\\\n\\\\t^#()! !\\\\n\\\\n\\\\n!Object class methodsFor: 'instance creation' stamp: 'sw 1/23/2003 09:45'!\\\\ncategoryForUniclasses\\\\n\\\\n\\\\t\\\\\\\"Answer the default system category into which to place unique-class instances\\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\t^ 'UserObjects'! !\\\\n\\\\n!Object class methodsFor: 'instance creation' stamp: 'sw 7/28/97 15:56'!\\\\nchooseUniqueClassName\\\\n\\\\t| i className |\\\\n\\\\ti _ 1.\\\\n\\\\t[className _ (self name , i printString) asSymbol.\\\\n\\\\t Smalltalk includesKey: className]\\\\n\\\\t\\\\twhileTrue: [i _ i + 1].\\\\n\\\\t^ className! !\\\\n\\\\n!Object class methodsFor: 'instance creation' stamp: 'tk 8/22/1998 08:22'!\\\\ninitialInstance\\\\n\\\\t\\\\\\\"Answer the first instance of the receiver, generate an error if there is one already\\\\\\\"\\\\n\\\\t\\\\\\\"self instanceCount > 0 ifTrue: [self error: 'instance(s) already exist.'].\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"Debugging test that is very slow\\\\\\\"\\\\n\\\\t^ self new! !\\\\n\\\\n!Object class methodsFor: 'instance creation' stamp: 'sw 5/5/2000 09:30'!\\\\ninitializedInstance\\\\n\\\\t^ self new! !\\\\n\\\\n!Object class methodsFor: 'instance creation' stamp: 'sw 10/16/2000 10:58'!\\\\ninstanceOfUniqueClass\\\\n\\\\t\\\\\\\"Answer an instance of a unique subclass of the receiver\\\\\\\"\\\\n\\\\n\\\\t^ self instanceOfUniqueClassWithInstVarString: '' andClassInstVarString: ''! !\\\\n\\\\n!Object class methodsFor: 'instance creation' stamp: 'tk 8/22/1998 08:27'!\\\\ninstanceOfUniqueClassWithInstVarString: instVarString andClassInstVarString: classInstVarString\\\\n\\\\t\\\\\\\"Create a unique class for the receiver, and answer an instance of it\\\\\\\"\\\\n\\\\n\\\\t^ (self newUniqueClassInstVars: instVarString \\\\n\\\\t\\\\tclassInstVars: classInstVarString) initialInstance! !\\\\n\\\\n!Object class methodsFor: 'instance creation' stamp: 'sw 10/23/1999 22:51'!\\\\nisUniClass\\\\n\\\\t^ false! !\\\\n\\\\n!Object class methodsFor: 'instance creation' stamp: 'ajh 5/23/2002 00:35'!\\\\nnewFrom: aSimilarObject\\\\n\\\\t\\\\\\\"Create an object that has similar contents to aSimilarObject.\\\\n\\\\tIf the classes have any instance varaibles with the same names, copy them across.\\\\n\\\\tIf this is bad for a class, override this method.\\\\\\\"\\\\n\\\\n\\\\t^ (self isVariable\\\\n\\\\t\\\\tifTrue: [self basicNew: aSimilarObject basicSize]\\\\n\\\\t\\\\tifFalse: [self basicNew]\\\\n\\\\t  ) copySameFrom: aSimilarObject! !\\\\n\\\\n!Object class methodsFor: 'instance creation' stamp: 'tk 6/29/1998 12:11'!\\\\nnewUniqueClassInstVars: instVarString classInstVars: classInstVarString\\\\n\\\\t\\\\\\\"Create a unique class for the receiver\\\\\\\"\\\\n\\\\n\\\\t| aName aClass |\\\\n\\\\tself isSystemDefined ifFalse:\\\\n\\\\t\\\\t[^ superclass newUniqueClassInstVars: instVarString classInstVars: classInstVarString].\\\\n\\\\taName _ self chooseUniqueClassName.\\\\n\\\\taClass _ self subclass: aName instanceVariableNames: instVarString \\\\n\\\\t\\\\tclassVariableNames: '' poolDictionaries: '' category: self categoryForUniclasses.\\\\n\\\\tclassInstVarString size > 0 ifTrue:\\\\n\\\\t\\\\t[aClass class instanceVariableNames: classInstVarString].\\\\n\\\\t^ aClass! !\\\\n\\\\n!Object class methodsFor: 'instance creation' stamp: 'sw 7/28/97 15:56'!\\\\nnewUserInstance\\\\n\\\\t\\\\\\\"Answer an instance of an appropriate class to serve as a user object in the containment hierarchy\\\\\\\"\\\\n\\\\n\\\\t^ self instanceOfUniqueClass! !\\\\n\\\\n!Object class methodsFor: 'instance creation' stamp: 'nk 8/30/2004 07:57'!\\\\nreadCarefullyFrom: textStringOrStream\\\\n\\\\t\\\\\\\"Create an object based on the contents of textStringOrStream.  Return an error instead of putting up a SyntaxError window.\\\\\\\"\\\\n\\\\n\\\\t| object |\\\\n\\\\t(Compiler couldEvaluate: textStringOrStream)\\\\n\\\\t\\\\tifFalse: [^ self error: 'expected String, Stream, or Text'].\\\\n\\\\tobject _ Compiler evaluate: textStringOrStream for: nil \\\\n\\\\t\\\\t\\\\t\\\\tnotifying: #error: \\\\\\\"signal we want errors\\\\\\\" logged: false.\\\\n\\\\t(object isKindOf: self) ifFalse: [self error: self name, ' expected'].\\\\n\\\\t^object! !\\\\n\\\\n!Object class methodsFor: 'instance creation' stamp: 'nk 8/30/2004 07:57'!\\\\nreadFrom: textStringOrStream\\\\n\\\\t\\\\\\\"Create an object based on the contents of textStringOrStream.\\\\\\\"\\\\n\\\\n\\\\t| object |\\\\n\\\\t(Compiler couldEvaluate: textStringOrStream)\\\\n\\\\t\\\\tifFalse: [^ self error: 'expected String, Stream, or Text'].\\\\n\\\\tobject _ Compiler evaluate: textStringOrStream.\\\\n\\\\t(object isKindOf: self) ifFalse: [self error: self name, ' expected'].\\\\n\\\\t^object! !\\\\n\\\\n\\\\n!Object class methodsFor: 'objects from disk' stamp: 'tk 1/8/97'!\\\\ncreateFrom: aSmartRefStream size: varsOnDisk version: instVarList\\\\n\\\\t\\\\\\\"Create an instance of me so objects on the disk can be read in.  Tricky part is computing the size if variable.  Inst vars will be filled in later.  \\\\\\\"\\\\n\\\\n\\\\t^ self isVariable\\\\n\\\\t\\\\tifFalse: [self basicNew]\\\\n\\\\t\\\\tifTrue: [\\\\\\\"instVarList is names of old class's inst vars plus a version number\\\\\\\" \\\\n\\\\t\\\\t\\\\t\\\\tself basicNew: (varsOnDisk - (instVarList size - 1))]\\\\n! !\\\\n\\\\n\\\\n!Object class methodsFor: 'window color' stamp: 'nk 6/10/2004 08:10'!\\\\nwindowColorSpecification\\\\n\\\\t\\\\\\\"Answer a WindowColorSpec object that declares my preference.\\\\n\\\\tThis is a backstop for classes that don't otherwise define a preference.\\\\\\\"\\\\n\\\\n\\\\t^ WindowColorSpec classSymbol: self name\\\\n\\\\t\\\\twording: 'Default' brightColor: #white\\\\n\\\\t\\\\tpastelColor: #white\\\\n\\\\t\\\\thelpMessage: 'Other windows without color preferences.'! !\\\\n\\\\n\\\\n!Object class methodsFor: 'private' stamp: 'mir 8/22/2001 15:20'!\\\\nreleaseExternalSettings\\\\n\\\\t\\\\\\\"Do nothing as a default\\\\\\\"! !\\\\nAbstractHierarchicalList subclass: #ObjectExplorer\\\\n\\\\tinstanceVariableNames: 'rootObject inspector monitorList'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Tools-Explorer'!\\\\n!ObjectExplorer commentStamp: '<historical>' prior: 0!\\\\nObjectExplorer provides a hierarchical alternative to #inspect. Simply evaluate an expression like:\\\\n\\\\nWorld explore\\\\n\\\\nand enjoy.!\\\\n]style[(101 13 12)f1,f3cblue;,f1!\\\\n\\\\n\\\\n!ObjectExplorer methodsFor: 'accessing' stamp: 'RAA 9/23/1999 13:11'!\\\\ncontentsSelection\\\\n\\\\t\\\\\\\"Return the interval of text in the code pane to select when I set the pane's contents\\\\\\\"\\\\n\\\\n\\\\t^ 1 to: 0  \\\\\\\"null selection\\\\\\\"! !\\\\n\\\\n!ObjectExplorer methodsFor: 'accessing' stamp: 'RAA 9/23/1999 13:15'!\\\\ndoItContext\\\\n\\\\t\\\\\\\"Answer the context in which a text selection can be evaluated.\\\\\\\"\\\\n\\\\n\\\\t^nil! !\\\\n\\\\n!ObjectExplorer methodsFor: 'accessing' stamp: 'RAA 9/23/1999 13:19'!\\\\ndoItReceiver\\\\n\\\\t\\\\\\\"Answer the object that should be informed of the result of evaluating a\\\\n\\\\ttext selection.\\\\\\\"\\\\n\\\\n\\\\tcurrentSelection ifNil: [^rootObject].\\\\n\\\\t^currentSelection withoutListWrapper\\\\n! !\\\\n\\\\n!ObjectExplorer methodsFor: 'accessing' stamp: 'sd 11/20/2005 21:27'!\\\\nexplorerFor: anObject\\\\n\\\\t| window listMorph |\\\\n\\\\trootObject := anObject.\\\\n\\\\twindow := (SystemWindow labelled: self label) model: self.\\\\n\\\\twindow addMorph: (listMorph := SimpleHierarchicalListMorph \\\\n\\\\t\\\\t\\\\ton: self\\\\n\\\\t\\\\t\\\\tlist: #getList\\\\n\\\\t\\\\t\\\\tselected: #getCurrentSelection\\\\n\\\\t\\\\t\\\\tchangeSelected: #noteNewSelection:\\\\n\\\\t\\\\t\\\\tmenu: #genericMenu:\\\\n\\\\t\\\\t\\\\tkeystroke: #explorerKey:from:)\\\\n\\\\t\\\\tframe: (0@0 corner: 1@0.8).\\\\n\\\\twindow addMorph: ((PluggableTextMorph on: self text: #trash accept: #trash:\\\\n\\\\t\\\\t\\\\t\\\\treadSelection: #contentsSelection menu: #codePaneMenu:shifted:)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\taskBeforeDiscardingEdits: false)\\\\n\\\\t\\\\tframe: (0@0.8 corner: 1@1).\\\\n\\\\tlistMorph\\\\n\\\\t\\\\tautoDeselect: false.\\\\n     ^ window! !\\\\n\\\\n!ObjectExplorer methodsFor: 'accessing' stamp: 'nk 7/24/2003 09:16'!\\\\ngetList\\\\n\\\\n\\\\t^Array with: (ObjectExplorerWrapper with: rootObject name: 'root' model: self parent: nil)\\\\n! !\\\\n\\\\n!ObjectExplorer methodsFor: 'accessing' stamp: 'hg 9/7/2001 12:12'!\\\\nlabel\\\\n\\\\n\\\\t^ rootObject printStringLimitedTo: 32! !\\\\n\\\\n!ObjectExplorer methodsFor: 'accessing' stamp: 'nk 7/24/2003 09:43'!\\\\nobject\\\\n\\\\t^currentSelection ifNotNilDo: [ :cs | cs withoutListWrapper ]! !\\\\n\\\\n!ObjectExplorer methodsFor: 'accessing' stamp: 'nk 7/24/2003 10:02'!\\\\nparentObject\\\\n\\\\tcurrentSelection ifNil: [ ^nil ].\\\\n\\\\tcurrentSelection parent ifNil: [ ^rootObject ].\\\\n\\\\t^currentSelection parent withoutListWrapper! !\\\\n\\\\n!ObjectExplorer methodsFor: 'accessing' stamp: 'nk 7/24/2003 09:47'!\\\\nselector\\\\n\\\\t^currentSelection ifNotNilDo: [ :cs | cs selector ]! !\\\\n\\\\n\\\\n!ObjectExplorer methodsFor: 'error handling' stamp: 'nk 7/24/2003 09:29'!\\\\ndoesNotUnderstand: aMessage\\\\n\\\\tinspector ifNotNil: [ (inspector respondsTo: aMessage selector) ifTrue: [ ^inspector perform: aMessage selector withArguments: aMessage arguments ]].\\\\n\\\\t^super doesNotUnderstand: aMessage! !\\\\n\\\\n\\\\n!ObjectExplorer methodsFor: 'menus' stamp: 'sd 11/20/2005 21:27'!\\\\nchasePointers\\\\n\\\\t\\\\\\\"Open a PointerFinder on the selected item\\\\\\\"\\\\n\\\\t| path sel savedRoot saved |\\\\n\\\\tpath := OrderedCollection new.\\\\n\\\\tsel := currentSelection.\\\\n\\\\t[ sel isNil ] whileFalse: [ path addFirst: sel asString. sel := sel parent ].\\\\n\\\\tpath addFirst: #openPath.\\\\n\\\\tpath := path asArray.\\\\n\\\\tsavedRoot := rootObject.\\\\n\\\\tsaved := self object.\\\\n\\\\t[ rootObject := nil.\\\\n\\\\tself changed: #getList.\\\\n\\\\t(Smalltalk includesKey: #PointerFinder)\\\\n\\\\t\\\\tifTrue: [PointerFinder on: saved]\\\\n\\\\t\\\\tifFalse: [self objectReferencesToSelection ]]\\\\n\\\\t\\\\tensure: [ rootObject := savedRoot.\\\\n\\\\t\\\\t\\\\tself changed: #getList.\\\\n\\\\t\\\\t\\\\tself changed: path.\\\\n\\\\t\\\\t]! !\\\\n\\\\n!ObjectExplorer methodsFor: 'menus' stamp: 'RAA 9/23/1999 13:22'!\\\\ncodePaneMenu: aMenu shifted: shifted\\\\n\\\\t\\\\\\\"Note that unless we override perform:orSendTo:, PluggableTextController will respond to all menu items\\\\\\\"\\\\n\\\\t^ StringHolder basicNew codePaneMenu: aMenu shifted: shifted\\\\n! !\\\\n\\\\n!ObjectExplorer methodsFor: 'menus' stamp: 'sd 11/20/2005 21:27'!\\\\ndefsOfSelection\\\\n\\\\t\\\\\\\"Open a browser on all defining references to the selected instance variable, if that's what's currently selected.\\\\\\\"\\\\n\\\\t| aClass sel |\\\\n\\\\n\\\\t(aClass := self parentObject class) isVariable ifTrue: [^ self changed: #flash].\\\\n\\\\tsel := self selector.\\\\n\\\\tself systemNavigation  browseAllStoresInto: sel from: aClass! !\\\\n\\\\n!ObjectExplorer methodsFor: 'menus' stamp: 'sd 11/20/2005 21:27'!\\\\nexplorerKey: aChar from: view\\\\n\\\\n\\\\t\\\\\\\"Similar to #genericMenu:...\\\\\\\"\\\\n\\\\t| insideObject parentObject |\\\\n\\\\tcurrentSelection ifNotNil: [\\\\n\\\\t\\\\tinsideObject := self object.\\\\n\\\\t\\\\tparentObject := self parentObject.\\\\n\\\\t\\\\tinspector ifNil: [inspector := Inspector new].\\\\n\\\\t\\\\tinspector\\\\n\\\\t\\\\t\\\\tinspect: parentObject;\\\\n\\\\t\\\\t\\\\tobject: insideObject.\\\\n\\\\n\\\\t\\\\taChar == $i ifTrue: [^ self inspectSelection].\\\\n\\\\t\\\\taChar == $I ifTrue: [^ self exploreSelection].\\\\n\\\\n\\\\t\\\\taChar == $b ifTrue:\\\\t[^ inspector browseMethodFull].\\\\n\\\\t\\\\taChar == $h ifTrue:\\\\t[^ inspector classHierarchy].\\\\n\\\\t\\\\taChar == $c ifTrue: [^ inspector copyName].\\\\n\\\\t\\\\taChar == $p ifTrue: [^ inspector browseFullProtocol].\\\\n\\\\t\\\\taChar == $N ifTrue: [^ inspector browseClassRefs].\\\\n\\\\t\\\\taChar == $t ifTrue: [^ inspector tearOffTile].\\\\n\\\\t\\\\taChar == $v ifTrue: [^ inspector viewerForValue]].\\\\n\\\\n\\\\t^ self arrowKey: aChar from: view! !\\\\n\\\\n!ObjectExplorer methodsFor: 'menus' stamp: 'nk 7/24/2003 10:26'!\\\\nexploreSelection\\\\n\\\\t\\\\\\\"Open an ObjectExplorer on the current selection\\\\\\\"\\\\n\\\\tself object explore! !\\\\n\\\\n!ObjectExplorer methodsFor: 'menus' stamp: 'sd 11/20/2005 21:27'!\\\\ngenericMenu: aMenu \\\\n\\\\t\\\\\\\"Borrow a menu from my inspector\\\\\\\"\\\\n\\\\t| insideObject menu parentObject |\\\\n\\\\tcurrentSelection\\\\n\\\\t\\\\tifNil: [menu := aMenu.\\\\n\\\\t\\\\t\\\\tmenu\\\\n\\\\t\\\\t\\\\t\\\\tadd: '*nothing selected*'\\\\n\\\\t\\\\t\\\\t\\\\ttarget: self\\\\n\\\\t\\\\t\\\\t\\\\tselector: #yourself]\\\\n\\\\t\\\\tifNotNil: [insideObject := self object.\\\\n\\\\t\\\\t\\\\tparentObject := self parentObject.\\\\n\\\\t\\\\t\\\\tinspector\\\\n\\\\t\\\\t\\\\t\\\\tifNil: [inspector := Inspector new].\\\\n\\\\t\\\\t\\\\tinspector inspect: parentObject;\\\\n\\\\t\\\\t\\\\t\\\\t object: insideObject.\\\\n\\\\t\\\\t\\\\taMenu defaultTarget: inspector.\\\\n\\\\t\\\\t\\\\tinspector fieldListMenu: aMenu.\\\\n\\\\t\\\\t\\\\taMenu items\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:i | (#(#inspectSelection #exploreSelection #referencesToSelection #defsOfSelection #objectReferencesToSelection #chasePointers ) includes: i selector)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [i target: self]].\\\\n\\\\t\\\\t\\\\taMenu addLine;\\\\n\\\\t\\\\t\\\\t\\\\tadd: 'monitor changes'\\\\n\\\\t\\\\t\\\\t\\\\ttarget: self\\\\n\\\\t\\\\t\\\\t\\\\tselector: #monitor:\\\\n\\\\t\\\\t\\\\t\\\\targument: currentSelection].\\\\n\\\\tmonitorList isEmptyOrNil\\\\n\\\\t\\\\tifFalse: [aMenu addLine;\\\\n\\\\t\\\\t\\\\t\\\\tadd: 'stop monitoring all'\\\\n\\\\t\\\\t\\\\t\\\\ttarget: self\\\\n\\\\t\\\\t\\\\t\\\\tselector: #stopMonitoring].\\\\n\\\\t^ aMenu! !\\\\n\\\\n!ObjectExplorer methodsFor: 'menus' stamp: 'nk 7/24/2003 10:26'!\\\\ninspectSelection\\\\n\\\\t\\\\\\\"Open an Inspector on the current selection\\\\\\\"\\\\n\\\\tself object inspect! !\\\\n\\\\n!ObjectExplorer methodsFor: 'menus' stamp: 'nk 7/24/2003 10:00'!\\\\nobjectReferencesToSelection\\\\n\\\\t\\\\\\\"Open a browser on all references to the selected instance variable, if that's what currently selected. \\\\\\\"\\\\n\\\\tself systemNavigation\\\\n\\\\t\\\\tbrowseAllObjectReferencesTo: self object\\\\n\\\\t\\\\texcept: (Array with: self parentObject with: currentSelection with: inspector)\\\\n\\\\t\\\\tifNone: [:obj | self changed: #flash].\\\\n! !\\\\n\\\\n!ObjectExplorer methodsFor: 'menus' stamp: 'sd 11/20/2005 21:27'!\\\\nreferencesToSelection\\\\n\\\\t\\\\\\\"Open a browser on all references to the selected instance variable, if that's what's currently selected.\\\\\\\"\\\\n\\\\t| aClass sel |\\\\n\\\\n\\\\t(aClass := self parentObject class) isVariable ifTrue: [^ self changed: #flash].\\\\n\\\\tsel := self selector.\\\\n\\\\tself systemNavigation browseAllAccessesTo: sel from: aClass! !\\\\n\\\\n!ObjectExplorer methodsFor: 'menus' stamp: 'RAA 9/23/1999 13:19'!\\\\nselectedClass\\\\n\\\\t\\\\\\\"Answer the class of the receiver's current selection\\\\\\\"\\\\n\\\\n\\\\t^self doItReceiver class\\\\n! !\\\\n\\\\n!ObjectExplorer methodsFor: 'menus' stamp: 'RAA 9/23/1999 13:10'!\\\\ntrash\\\\n\\\\t\\\\\\\"What goes in the bottom pane\\\\\\\"\\\\n\\\\t^ ''! !\\\\n\\\\n!ObjectExplorer methodsFor: 'menus' stamp: 'RAA 9/23/1999 13:10'!\\\\ntrash: newText\\\\n\\\\t\\\\\\\"Don't save it\\\\\\\"\\\\n\\\\t^ true! !\\\\n\\\\n\\\\n!ObjectExplorer methodsFor: 'monitoring' stamp: 'sd 11/20/2005 21:27'!\\\\nmonitorList\\\\n\\\\t^monitorList ifNil: [ monitorList := WeakIdentityKeyDictionary new ].! !\\\\n\\\\n!ObjectExplorer methodsFor: 'monitoring' stamp: 'nk 7/31/2004 15:02'!\\\\nmonitor: anObjectExplorerWrapper\\\\n\\\\t\\\\\\\"Start stepping and watching the given wrapper for changes.\\\\\\\"\\\\n\\\\tanObjectExplorerWrapper ifNil: [ ^self ].\\\\n\\\\tself world ifNil: [ ^self ].\\\\n\\\\tself monitorList at: anObjectExplorerWrapper put: anObjectExplorerWrapper asString.\\\\n\\\\tself world startStepping: self at: Time millisecondClockValue selector: #step arguments: #() stepTime: 200.! !\\\\n\\\\n!ObjectExplorer methodsFor: 'monitoring' stamp: 'nk 7/31/2004 15:01'!\\\\nrelease\\\\n\\\\tself world ifNotNil: [ self world stopStepping: self selector: #step ].\\\\n\\\\tsuper release.! !\\\\n\\\\n!ObjectExplorer methodsFor: 'monitoring' stamp: 'nk 7/12/2003 17:55'!\\\\nshouldGetStepsFrom: aWorld\\\\n\\\\t^self monitorList notEmpty! !\\\\n\\\\n!ObjectExplorer methodsFor: 'monitoring' stamp: 'sd 11/20/2005 21:27'!\\\\nstep\\\\n\\\\t\\\\\\\"If there's anything in my monitor list, see if the strings have changed.\\\\\\\"\\\\n\\\\t| string changes |\\\\n\\\\tchanges := false.\\\\n\\\\tself monitorList keysAndValuesDo: [ :k :v |\\\\n\\\\t\\\\tk ifNotNil: [\\\\n\\\\t\\\\t\\\\tk refresh.\\\\n\\\\t\\\\t\\\\t(string := k asString) ~= v ifTrue: [ self monitorList at: k put: string. changes := true ].\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\tchanges ifTrue: [ | sel |\\\\n\\\\t\\\\tsel := currentSelection.\\\\n\\\\t\\\\tself changed: #getList.\\\\n\\\\t\\\\tself noteNewSelection: sel.\\\\n\\\\t].\\\\n\\\\tself monitorList isEmpty ifTrue: [ ActiveWorld stopStepping: self selector: #step ].! !\\\\n\\\\n!ObjectExplorer methodsFor: 'monitoring' stamp: 'sd 11/20/2005 21:27'!\\\\nstopMonitoring\\\\n\\\\tmonitorList := nil.\\\\n\\\\tself world stopStepping: self selector: #step! !\\\\n\\\\n!ObjectExplorer methodsFor: 'monitoring' stamp: 'nk 7/31/2004 15:01'!\\\\nworld\\\\n\\\\t^ActiveWorld! !\\\\n\\\\n\\\\n!ObjectExplorer methodsFor: 'user interface' stamp: 'stephaneducasse 9/17/2005 21:50'!\\\\nexplorerFor: anObject withLabel: label \\\\n\\\\t| window listMorph |\\\\n\\\\trootObject := anObject.\\\\n\\\\twindow := (SystemWindow labelled: label) \\\\n\\\\t\\\\t\\\\t\\\\tmodel: self.\\\\n\\\\twindow\\\\n\\\\t\\\\taddMorph: (listMorph := SimpleHierarchicalListMorph\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ton: self\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tlist: #getList\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tselected: #getCurrentSelection\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tchangeSelected: #noteNewSelection:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmenu: #genericMenu:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tkeystroke: nil)\\\\n\\\\t\\\\tframe: (0 @ 0 corner: 1 @ 0.8).\\\\n\\\\twindow\\\\n\\\\t\\\\taddMorph: ((PluggableTextMorph\\\\n\\\\t\\\\t\\\\t\\\\ton: self\\\\n\\\\t\\\\t\\\\t\\\\ttext: #trash\\\\n\\\\t\\\\t\\\\t\\\\taccept: #trash:\\\\n\\\\t\\\\t\\\\t\\\\treadSelection: #contentsSelection\\\\n\\\\t\\\\t\\\\t\\\\tmenu: #codePaneMenu:shifted:)\\\\n\\\\t\\\\t\\\\t\\\\taskBeforeDiscardingEdits: false)\\\\n\\\\t\\\\tframe: (0 @ 0.8 corner: 1 @ 1).\\\\n\\\\tlistMorph autoDeselect: false.\\\\n\\\\t^ window! !\\\\n\\\\n!ObjectExplorer methodsFor: 'user interface' stamp: 'RAA 6/2/2000 16:23'!\\\\ninitialExtent\\\\n\\\\n\\\\t^300@500! !\\\\n\\\\n!ObjectExplorer methodsFor: 'user interface' stamp: 'ar 9/27/2005 20:31'!\\\\nopenBrowser: aClass\\\\n\\\\n\\\\tToolSet browse: aClass selector: nil! !\\\\n\\\\n!ObjectExplorer methodsFor: 'user interface' stamp: 'RAA 6/2/2000 16:24'!\\\\nopenExplorerFor: anObject\\\\n\\\\\\\"\\\\nObjectExplorer new openExplorerFor: Smalltalk\\\\n\\\\\\\"\\\\n\\\\n    (self explorerFor: anObject) openInWorld.\\\\n    ^ self\\\\n! !\\\\n\\\\n!ObjectExplorer methodsFor: 'user interface' stamp: 'stephaneducasse 9/17/2005 21:51'!\\\\nopenExplorerFor: anObject withLabel: label \\\\n     \\\\\\\"ObjectExplorer new openExplorerFor: Smalltalk withLabel: 'Smalltalk'\\\\\\\"\\\\n\\\\n\\\\t(self explorerFor: anObject withLabel: label)\\\\nopenInWorld! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nObjectExplorer class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!ObjectExplorer class methodsFor: 'as yet unclassified' stamp: 'RAA 6/21/1999 15:55'!\\\\nabout\\\\n\\\\n\\\\tStringHolder new textContents: self comment; openLabel: 'about ',self asString! !\\\\nListItemWrapper subclass: #ObjectExplorerWrapper\\\\n\\\\tinstanceVariableNames: 'itemName parent'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Explorer'!\\\\n!ObjectExplorerWrapper commentStamp: '<historical>' prior: 0!\\\\nContributed by Bob Arning as part of the ObjectExplorer package.\\\\n!\\\\n\\\\n\\\\n!ObjectExplorerWrapper methodsFor: 'as yet unclassified' stamp: 'RAA 6/21/1999 15:48'!\\\\ncanBeDragged\\\\n\\\\n\\\\t^false! !\\\\n\\\\n!ObjectExplorerWrapper methodsFor: 'as yet unclassified' stamp: 'nk 7/24/2003 09:14'!\\\\nparent\\\\n\\\\t^parent! !\\\\n\\\\n!ObjectExplorerWrapper methodsFor: 'as yet unclassified' stamp: 'nk 7/24/2003 09:14'!\\\\nparent: anObject\\\\n\\\\tparent _ anObject! !\\\\n\\\\n!ObjectExplorerWrapper methodsFor: 'as yet unclassified' stamp: 'nk 7/24/2003 09:49'!\\\\nselector\\\\n\\\\tparent ifNil: [ ^nil ].\\\\n\\\\t^(parent withoutListWrapper class allInstVarNames includes: itemName) ifTrue: [ itemName asSymbol ]! !\\\\n\\\\n!ObjectExplorerWrapper methodsFor: 'as yet unclassified' stamp: 'RAA 6/21/1999 10:49'!\\\\nsetItem: anObject name: aString model: aModel\\\\n\\\\n\\\\titem _ anObject.\\\\n\\\\tmodel _ aModel.\\\\n\\\\titemName _ aString.! !\\\\n\\\\n!ObjectExplorerWrapper methodsFor: 'as yet unclassified' stamp: 'nk 7/24/2003 09:14'!\\\\nsetItem: anObject name: aString model: aModel parent: itemParent\\\\n\\\\tparent _ itemParent.\\\\n\\\\tself setItem: anObject name: aString model: aModel! !\\\\n\\\\n\\\\n!ObjectExplorerWrapper methodsFor: 'converting' stamp: 'edt 5/26/2003 12:36'!\\\\nasString\\\\n\\\\t| explorerString string |\\\\n\\\\texplorerString _ \\\\n\\\\t\\\\t[item asExplorerString]\\\\n\\\\t\\\\t\\\\ton: Error \\\\n\\\\t\\\\t\\\\tdo: ['<error: ', item class name, ' in asExplorerString: evaluate \\\\\\\"' , itemName , ' asExplorerString\\\\\\\" to debug>'].\\\\n\\\\tstring _ (itemName ifNotNil: [itemName , ': '] ifNil: ['']) , explorerString.\\\\n\\\\t(string includes: Character cr)\\\\n\\\\t\\\\tifTrue: [^ string withSeparatorsCompacted].\\\\n\\\\t^ string! !\\\\n\\\\n!ObjectExplorerWrapper methodsFor: 'converting' stamp: 'nk 7/24/2003 10:16'!\\\\nitemName\\\\n\\\\t^itemName! !\\\\n\\\\n\\\\n!ObjectExplorerWrapper methodsFor: 'monitoring' stamp: 'nk 7/12/2003 18:28'!\\\\nrefresh\\\\n\\\\t\\\\\\\"hack to refresh item given an object and a string that is either an index or an instance variable name.\\\\\\\"\\\\n\\\\t[ | index |\\\\n\\\\t\\\\t(model class allInstVarNames includes: itemName)\\\\n\\\\t\\\\t\\\\tifTrue: [ item _ model instVarNamed: itemName ]\\\\n\\\\t\\\\t\\\\tifFalse: [ index _ itemName asNumber.\\\\n\\\\t\\\\t\\\\t\\\\t(index between: 1 and: model basicSize) ifTrue: [ item _ model basicAt: index]]\\\\n\\\\t] on: Error do: [ :ex | item _ nil ]! !\\\\n\\\\n\\\\n!ObjectExplorerWrapper methodsFor: 'accessing' stamp: 'nk 7/24/2003 09:17'!\\\\ncontents\\\\n\\\\n\\\\t(item respondsTo: #explorerContents) ifTrue: [^item explorerContents].\\\\n\\\\t\\\\\\\"For all others, show named vars first, then indexed vars\\\\\\\"\\\\n\\\\t^(item class allInstVarNames asOrderedCollection withIndexCollect: [:each :index |\\\\n\\\\t\\\\tself class\\\\n\\\\t\\\\t\\\\twith: (item instVarAt: index)\\\\n\\\\t\\\\t\\\\tname: each\\\\n\\\\t\\\\t\\\\tmodel: item\\\\n\\\\t\\\\t\\\\tparent: self]) ,\\\\n\\\\t((1 to: item basicSize) collect: [:index |\\\\n\\\\t\\\\tself class\\\\n\\\\t\\\\t\\\\twith: (item basicAt: index)\\\\n\\\\t\\\\t\\\\tname: index printString\\\\n\\\\t\\\\t\\\\tmodel: item\\\\n\\\\t\\\\t\\\\tparent: self])! !\\\\n\\\\n!ObjectExplorerWrapper methodsFor: 'accessing' stamp: 'RAA 6/21/1999 11:27'!\\\\nhasContents\\\\n\\\\n\\\\t^item hasContentsInExplorer\\\\n\\\\t\\\\n! !\\\\n\\\\n!ObjectExplorerWrapper methodsFor: 'accessing' stamp: 'dgd 9/26/2004 18:34'!\\\\nicon\\\\n\\\\t\\\\\\\"Answer a form to be used as icon\\\\\\\"\\\\n\\\\t^ Preferences visualExplorer\\\\n\\\\t\\\\tifTrue: [item iconOrThumbnailOfSize: 16]\\\\n\\\\t\\\\tifFalse: [nil]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nObjectExplorerWrapper class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!ObjectExplorerWrapper class methodsFor: 'as yet unclassified' stamp: 'RAA 6/21/1999 10:50'!\\\\nwith: anObject name: aString model: aModel\\\\n\\\\n\\\\t^self new \\\\n\\\\t\\\\tsetItem: anObject name: aString model: aModel! !\\\\n\\\\n!ObjectExplorerWrapper class methodsFor: 'as yet unclassified' stamp: 'nk 7/24/2003 09:16'!\\\\nwith: anObject name: aString model: aModel parent: aParent\\\\n\\\\n\\\\t^self new \\\\n\\\\t\\\\tsetItem: anObject name: aString model: aModel parent: aParent\\\\n! !\\\\nObject subclass: #ObjectFinalizer\\\\n\\\\tinstanceVariableNames: 'receiver selector arguments'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Finalization'!\\\\n\\\\n!ObjectFinalizer methodsFor: 'finalization' stamp: 'ar 5/19/2003 20:13'!\\\\nfinalize\\\\n\\\\t\\\\\\\"Finalize the resource associated with the receiver. This message should only be sent during the finalization process. There is NO garantuee that the resource associated with the receiver hasn't been free'd before so take care that you don't run into trouble - this all may happen with interrupt priority.\\\\\\\"\\\\n\\\\t[receiver perform: selector withArguments: arguments] \\\\n\\\\t\\\\ton: Error do:[:ex| ex return].\\\\n! !\\\\n\\\\n\\\\n!ObjectFinalizer methodsFor: 'initialize' stamp: 'ar 5/19/2003 20:12'!\\\\nreceiver: aReceiver selector: aSelector argument: anObject\\\\n\\\\treceiver := aReceiver.\\\\n\\\\tselector := aSelector.\\\\n\\\\targuments := Array with: anObject! !\\\\nTestCase subclass: #ObjectFinalizerTests\\\\n\\\\tinstanceVariableNames: 'log'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Finalization'!\\\\n\\\\n!ObjectFinalizerTests methodsFor: 'finalization handling' stamp: 'apb 9/14/2005 08:33'!\\\\nfinalize: anObject\\\\n\\\\tlog addLast: anObject asString, ' ', 'finalized'.! !\\\\n\\\\n\\\\n!ObjectFinalizerTests methodsFor: 'running' stamp: 'apb 9/14/2005 08:39'!\\\\nsetUp\\\\n\\\\tsuper setUp.\\\\n\\\\tlog := OrderedCollection new.! !\\\\n\\\\n\\\\n!ObjectFinalizerTests methodsFor: 'tests' stamp: 'stephaneducasse 10/28/2005 21:15'!\\\\ntestFinalization\\\\n\\\\t\\\\\\\"self run: #testFinalization\\\\\\\"\\\\n\\\\t\\\\n\\\\t| repetitions |\\\\n\\\\trepetitions := 100.\\\\n\\\\t1 to: repetitions\\\\n\\\\t\\\\tdo: [:i | \\\\n\\\\t\\\\t\\\\tlog addLast: 'o' , i asString , ' created'.\\\\n\\\\t\\\\t\\\\tObject new\\\\n\\\\t\\\\t\\\\t\\\\ttoFinalizeSend: #finalize:\\\\n\\\\t\\\\t\\\\t\\\\tto: self\\\\n\\\\t\\\\t\\\\t\\\\twith: 'o' , i asString].\\\\n\\\\tSmalltalk garbageCollect.\\\\n\\\\tself finalizationRegistry finalizeValues.\\\\n\\\\t1 to: repetitions\\\\n\\\\t\\\\tdo: [:i | \\\\n\\\\t\\\\t\\\\tself assert: (log includes: 'o' , i asString , ' created').\\\\n\\\\t\\\\t\\\\tself assert: (log includes: 'o' , i asString , ' finalized')]! !\\\\n\\\\n!ObjectFinalizerTests methodsFor: 'tests' stamp: 'stephaneducasse 10/28/2005 21:15'!\\\\ntestFinalizationOfEquals\\\\n\\\\t\\\\\\\"self run: #testFinalizationOfEquals\\\\\\\"\\\\n\\\\t\\\\n\\\\t| bag o |\\\\n\\\\tbag := IdentityBag new.\\\\n\\\\t1 to: 5 do: [:n | o := n asString copy. bag add: n. o toFinalizeSend: #remove: to: bag with: n].\\\\n\\\\t1 to: 5 do: [:n | o := n asString copy. bag add: n. o toFinalizeSend: #remove: to: bag with: n].\\\\n\\\\tSmalltalk garbageCollect.\\\\n\\\\t1 to: 5 do: [:n | self deny: (bag includes: n)]\\\\n! !\\\\nProtoObject subclass: #ObjectOut\\\\n\\\\tinstanceVariableNames: 'url page recursionFlag'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Kernel-Objects'!\\\\n!ObjectOut commentStamp: '<historical>' prior: 0!\\\\nI am a stand-in for an object that is out on the disk.  The object that is out on the disk is the head of a tree of objects that are out.  See SqueakPage.\\\\n\\\\nWhen any message is sent to me, I don't understand it, and bring in my true object.  I become myself with the objects and resend the message.  \\\\n\\\\nI may not represent the object nil.  \\\\nThe file is represented as a url, and that url may point at any file on the net.  \\\\n\\\\npage is a SqueakPage.\\\\nIf the cache already has an object, widely in use, that claims to be the object for my url, what do I do?  I can't become him, since others believe that he is the true object.  Run through memory and replace refs to me with refs to him.  Be careful not to trigger a fault.  Become me to a string, then find pointers and replace?\\\\n\\\\n[[[They don't want to end up holding an ObjectOut.  (would oscillate back and forth)  This is a problem.  A user could bring in two trees that both refer to a 3rd url.  (check with cache before installing any new ObjectOut) Two trees could be written to the same url.\\\\nOr, I remain an ObjectOut, and keep getting notUnderstood, and keep returning the other guy.\\\\nOr I smash the cache, and install MY page and object.  Other guy is a copy -- still in, but with no place in the cache.  When we both write to the same url, there will be trouble.]  No -- search and replace.]]]\\\\n!\\\\n\\\\n\\\\n!ObjectOut methodsFor: 'access' stamp: 'tk 1/15/1999 11:43'!\\\\nurl: aString\\\\n\\\\n\\\\turl _ aString! !\\\\n\\\\n!ObjectOut methodsFor: 'access' stamp: 'tk 12/18/1998 21:29'!\\\\nxxxReset\\\\n\\\\t\\\\\\\"mark as never brought in\\\\\\\"\\\\n\\\\trecursionFlag _ nil! !\\\\n\\\\n\\\\n!ObjectOut methodsFor: 'basics' stamp: 'tk 10/30/1998 15:11'!\\\\nisInMemory\\\\n\\\\t\\\\\\\"We are a place holder for an object that is out.\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n!ObjectOut methodsFor: 'basics' stamp: 'tk 10/21/1998 12:28'!\\\\nxxxClass\\\\n\\\\t\\\\\\\"Primitive. Answer the object which is the receiver's class. Essential. See \\\\n\\\\tObject documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 111>\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!ObjectOut methodsFor: 'basics' stamp: 'tk 10/22/1998 15:31'!\\\\nxxxClone\\\\n\\\\n\\\\t<primitive: 148>\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!ObjectOut methodsFor: 'basics' stamp: 'tk 10/22/1998 15:19'!\\\\nxxxInstVarAt: index \\\\n\\\\t\\\\\\\"Primitive. Answer a fixed variable in an object. The numbering of the \\\\n\\\\tvariables corresponds to the named instance variables. Fail if the index \\\\n\\\\tis not an Integer or is not the index of a fixed variable. Essential. See \\\\n\\\\tObject documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 73>\\\\n\\\\tself primitiveFailed ! !\\\\n\\\\n!ObjectOut methodsFor: 'basics' stamp: 'tk 10/22/1998 14:39'!\\\\nxxxInstVarAt: anInteger put: anObject \\\\n\\\\t\\\\\\\"Primitive. Store a value into a fixed variable in the receiver. The \\\\n\\\\tnumbering of the variables corresponds to the named instance variables. \\\\n\\\\tFail if the index is not an Integer or is not the index of a fixed variable. \\\\n\\\\tAnswer the value stored as the result. Using this message violates the \\\\n\\\\tprinciple that each object has sovereign control over the storing of \\\\n\\\\tvalues into its instance variables. Essential. See Object documentation \\\\n\\\\twhatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 74>\\\\n\\\\tself primitiveFailed ! !\\\\n\\\\n\\\\n!ObjectOut methodsFor: 'fetch from disk' stamp: 'rbb 2/18/2005 14:55'!\\\\ndoesNotUnderstand: aMessage \\\\n\\\\t\\\\\\\"Bring in the object, install, then resend aMessage\\\\\\\"\\\\n\\\\t| realObject oldFlag response |\\\\n\\\\toldFlag _ recursionFlag.\\\\n\\\\trecursionFlag _ true.\\\\n\\\\t\\\\\\\"fetch the object\\\\\\\"\\\\n\\\\trealObject _ self xxxFetch.\\\\t\\\\t\\\\\\\"watch out for the become!!\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\\\\"Now we ARE the realObject\\\\\\\"\\\\n\\\\toldFlag == true ifTrue: [\\\\n\\\\t\\\\tresponse _ (UIManager default chooseFrom: #('proceed normally' 'debug')\\\\n\\\\t\\\\t\\\\ttitle: 'Object being fetched for a second time.\\\\nShould not happen, and needs to be fixed later.').\\\\n\\\\t\\\\tresponse = 2 ifTrue: [self halt]].\\\\t\\\\\\\"We are already the new object\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Can't be a super message, since this is the first message sent to this object\\\\\\\"\\\\n\\\\t^ realObject perform: aMessage selector withArguments: aMessage arguments! !\\\\n\\\\n!ObjectOut methodsFor: 'fetch from disk' stamp: 'tk 11/16/1998 09:57'!\\\\nxxxFetch\\\\n\\\\t\\\\\\\"Bring in my object and replace all references to me with references to him.  First try looking up my url in the pageCache.  Then try the page (and install it, under its url).  Then start from scratch with the url.\\\\\\\"\\\\n\\\\n\\\\t| truePage object existing |\\\\n\\\\texisting _ SqueakPageCache pageCache at: url ifAbsent: [nil].\\\\n\\\\texisting ifNotNil: [existing isContentsInMemory\\\\n\\\\t\\\\tifTrue: [page _ truePage _ existing]].\\\\t\\\\\\\"This url already has an object in this image\\\\\\\"\\\\n\\\\ttruePage ifNil: [\\\\n\\\\t\\\\ttruePage _ SqueakPageCache atURL: url oldPage: page].\\\\n\\\\tobject _ truePage isContentsInMemory \\\\n\\\\t\\\\tifTrue: [truePage contentsMorph]\\\\n\\\\t\\\\tifFalse: [truePage fetchInformIfError].\\\\t\\\\\\\"contents, not the page\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\\\\"Later, collect pointers to object and fix them up.  Not scan memory\\\\\\\"\\\\n\\\\tobject ifNil: [^ 'Object could not be fetched.'].\\\\n\\\\t\\\\\\\"recursionFlag _ false.\\\\\\\"  \\\\t\\\\\\\"while I still have a pointer to myself\\\\\\\"\\\\n\\\\ttruePage contentsMorph: object.\\\\n\\\\tpage _ truePage.\\\\n\\\\tself xxxFixup.\\\\n\\\\t^ object\\\\t\\\\\\\"the final object!!\\\\\\\"\\\\n ! !\\\\n\\\\n!ObjectOut methodsFor: 'fetch from disk' stamp: 'ar 9/27/2005 18:03'!\\\\nxxxFixup\\\\n\\\\t\\\\\\\"There is already an object in memory for my url.  All pointers to me need to be pointers to him.  Can't use become, because other pointers to him must stay valid.\\\\\\\"\\\\n\\\\n\\\\t| real temp list |\\\\n\\\\treal := page contentsMorph.\\\\n\\\\treal == self ifTrue: [page error: 'should be converted by now'].\\\\n\\\\ttemp := self.\\\\n\\\\tlist := (Utilities pointersTo: temp) asOrderedCollection.\\\\n\\\\tlist add: thisContext.  list add: thisContext sender.\\\\n\\\\tlist do: [:holder |\\\\n\\\\t\\\\t1 to: holder class instSize do:\\\\n\\\\t\\\\t\\\\t[:i | (holder instVarAt: i) == temp ifTrue: [holder instVarAt: i put: real]].\\\\n\\\\t\\\\t1 to: holder basicSize do:\\\\n\\\\t\\\\t\\\\t[:i | (holder basicAt: i) == temp ifTrue: [holder basicAt: i put: real]].\\\\n\\\\t\\\\t].\\\\n\\\\t^ real! !\\\\n\\\\n!ObjectOut methodsFor: 'fetch from disk' stamp: 'tk 10/21/1998 13:01'!\\\\nxxxSetUrl: aString page: aSqkPage\\\\n\\\\n\\\\turl _ aString.\\\\n\\\\tpage _ aSqkPage.! !\\\\n\\\\n\\\\n!ObjectOut methodsFor: 'object storage' stamp: 'tk 2/17/2000 22:21'!\\\\ncomeFullyUpOnReload: smartRefStream\\\\n\\\\t\\\\\\\"Normally this read-in object is exactly what we want to store.  Try to dock first.  If it is here already, use that one.\\\\\\\"\\\\n\\\\n\\\\t| sp |\\\\n\\\\t\\\\\\\"Transcript show: 'has ref to: ', url; cr.\\\\\\\"\\\\n\\\\t(sp _ SqueakPageCache pageCache at: page ifAbsent: [nil]) ifNotNil: [\\\\n\\\\t\\\\tsp isContentsInMemory ifTrue: [^ sp contentsMorph]].\\\\n\\\\t^ self! !\\\\n\\\\n!ObjectOut methodsFor: 'object storage' stamp: 'tk 2/24/1999 11:14'!\\\\nobjectForDataStream: refStrm\\\\n    \\\\\\\"Return an object to store on a data stream (externalize myself).\\\\\\\"\\\\n\\\\n    ^ self! !\\\\n\\\\n!ObjectOut methodsFor: 'object storage' stamp: 'tk 10/22/1998 14:37'!\\\\nreadDataFrom: aDataStream size: varsOnDisk\\\\n\\\\t\\\\\\\"Make self be an object based on the contents of aDataStream, which was generated by the object's storeDataOn: method. Return self.\\\\\\\"\\\\n\\\\t| cntInstVars |\\\\n\\\\tcntInstVars _ self xxxClass instSize.\\\\n\\\\tself xxxClass isVariable\\\\n\\\\t\\\\tifTrue: [self xxxClass error: 'needs updating']\\\\t\\\\\\\"assume no variable subclasses\\\\\\\"\\\\n\\\\t\\\\tifFalse: [cntInstVars _ varsOnDisk].\\\\n\\\\n\\\\taDataStream beginReference: self.\\\\n\\\\t1 to: cntInstVars do:\\\\n\\\\t\\\\t[:i | self xxxInstVarAt: i put: aDataStream next].\\\\n\\\\\\\"\\\\t1 to: cntIndexedVars do:\\\\n\\\\t\\\\t[:i | self basicAt: i put: aDataStream next].\\\\n\\\\\\\"\\\\n\\\\t^ self! !\\\\n\\\\n!ObjectOut methodsFor: 'object storage' stamp: 'tk 10/22/1998 15:18'!\\\\nstoreDataOn: aDataStream\\\\n\\\\t\\\\\\\"Store myself on a DataStream. See also objectToStoreOnDataStream.\\\\n\\\\tmust send 'aDataStream beginInstance:size:'\\\\\\\"\\\\n\\\\t| cntInstVars |\\\\n\\\\n\\\\tcntInstVars _ self class instSize.\\\\n\\\\t\\\\\\\"cntIndexedVars _ self basicSize.\\\\\\\"\\\\n\\\\taDataStream\\\\n\\\\t\\\\tbeginInstance: self xxxClass\\\\n\\\\t\\\\tsize: cntInstVars \\\\\\\"+ cntIndexedVars\\\\\\\".\\\\n\\\\t1 to: cntInstVars do:\\\\n\\\\t\\\\t[:i | aDataStream nextPut: (self xxxInstVarAt: i)].\\\\n\\\\\\\"\\\\t1 to: cntIndexedVars do:\\\\n\\\\t\\\\t[:i | aDataStream nextPut: (self basicAt: i)]\\\\n\\\\\\\"! !\\\\n\\\\n!ObjectOut methodsFor: 'object storage' stamp: 'tk 10/22/1998 15:29'!\\\\nveryDeepCopyWith: deepCopier\\\\n\\\\t\\\\\\\"Copy me and the entire tree of objects I point to.  An object in the tree twice is copied once, and both references point to him.  deepCopier holds a dictionary of objects we have seen.  Some classes refuse to be copied.  Some classes are picky about which fields get deep copied.\\\\\\\"\\\\n\\\\t| class index sub subAss new absent |\\\\n\\\\tnew _ deepCopier references at: self ifAbsent: [absent _ true].\\\\n\\\\tabsent ifNil: [^ new].\\\\t\\\\\\\"already done\\\\\\\"\\\\n\\\\tclass _ self xxxClass.\\\\n\\\\tclass isMeta ifTrue: [^ self].\\\\t\\\\t\\\\\\\"a class\\\\\\\"\\\\n\\\\tnew _ self xxxClone.\\\\n\\\\t\\\\\\\"not a uniClass\\\\\\\"\\\\n\\\\tdeepCopier references at: self put: new.\\\\t\\\\\\\"remember\\\\\\\"\\\\n\\\\t\\\\\\\"class is not variable\\\\\\\"\\\\n\\\\tindex _ class instSize.\\\\n\\\\t[index > 0] whileTrue: \\\\n\\\\t\\\\t[sub _ self xxxInstVarAt: index.\\\\n\\\\t\\\\t(subAss _ deepCopier references associationAt: sub ifAbsent: [nil])\\\\n\\\\t\\\\t\\\\tifNil: [new xxxInstVarAt: index put: (sub veryDeepCopyWith: deepCopier)]\\\\n\\\\t\\\\t\\\\tifNotNil: [new xxxInstVarAt: index put: subAss value].\\\\n\\\\t\\\\tindex _ index - 1].\\\\n\\\\tnew rehash.\\\\t\\\\\\\"force Sets and Dictionaries to rehash\\\\\\\"\\\\n\\\\t^ new\\\\n! !\\\\n\\\\n\\\\n!ObjectOut methodsFor: '*MorphicExtras-access' stamp: 'tk 12/4/1998 13:01'!\\\\nsqkPage\\\\n\\\\t^ page! !\\\\n\\\\n!ObjectOut methodsFor: '*MorphicExtras-access' stamp: 'tk 12/4/1998 13:01'!\\\\nurl\\\\n\\\\t^ url! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nObjectOut class\\\\n\\\\tinstanceVariableNames: ''!\\\\nGenericPropertiesMorph subclass: #ObjectPropertiesMorph\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'EToys-Experimental'!\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 3/8/2001 18:04'!\\\\nadjustTargetBorderWidth: aFractionalPoint\\\\n\\\\n\\\\t| n |\\\\n\\\\n\\\\tmyTarget borderWidth: (n _ (aFractionalPoint x * 10) rounded max: 0).\\\\n\\\\tself showSliderFeedback: n.! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 3/8/2001 18:02'!\\\\nadjustTargetGradientDirection: aFractionalPoint\\\\n\\\\n\\\\t| fs p |\\\\n\\\\n\\\\t(fs _ myTarget fillStyle) isGradientFill ifFalse: [^self].\\\\n\\\\tfs direction: (p _ (aFractionalPoint * myTarget extent) rounded).\\\\n\\\\tself showSliderFeedback: p.\\\\n\\\\tmyTarget changed.\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 3/8/2001 18:05'!\\\\nadjustTargetGradientOrigin: aFractionalPoint\\\\n\\\\n\\\\t| fs p |\\\\n\\\\n\\\\t(fs _ myTarget fillStyle) isGradientFill ifFalse: [^self].\\\\n\\\\tfs origin: (p _ myTarget topLeft + (aFractionalPoint * myTarget extent) rounded).\\\\n\\\\tself showSliderFeedback: p.\\\\n\\\\tmyTarget changed.\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 3/8/2001 18:03'!\\\\nadjustTargetShadowOffset: aFractionalPoint\\\\n\\\\n\\\\t| n |\\\\n\\\\n\\\\tmyTarget changed; layoutChanged.\\\\n\\\\tmyTarget shadowOffset: (n _ (aFractionalPoint * 4) rounded).\\\\n\\\\tself showSliderFeedback: n.\\\\n\\\\tmyTarget changed; layoutChanged.\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 3/8/2001 18:03'!\\\\ndoEnables\\\\n\\\\n\\\\t| itsName fs |\\\\n\\\\n\\\\tfs _ myTarget fillStyle.\\\\n\\\\tself allMorphsDo: [ :each |\\\\n\\\\t\\\\titsName _ each knownName.\\\\n\\\\t\\\\titsName == #pickerForColor ifTrue: [\\\\n\\\\t\\\\t\\\\tself enable: each when: fs isSolidFill | fs isGradientFill\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\titsName == #pickerForBorderColor ifTrue: [\\\\n\\\\t\\\\t\\\\tself enable: each when: (myTarget respondsTo: #borderColor:)\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\titsName == #pickerForShadowColor ifTrue: [\\\\n\\\\t\\\\t\\\\tself enable: each when: myTarget hasDropShadow\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\titsName == #pickerFor2ndGradientColor ifTrue: [\\\\n\\\\t\\\\t\\\\tself enable: each when: fs isGradientFill\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 3/8/2001 18:03'!\\\\nmakeTargetGradientFill\\\\n\\\\n\\\\tmyTarget useGradientFill! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 3/8/2001 18:02'!\\\\nmakeTargetSolidFill\\\\n\\\\n\\\\tmyTarget useSolidFill! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 3/8/2001 18:04'!\\\\nnumberOneColor\\\\n\\\\n\\\\tmyTarget fillStyle isGradientFill ifFalse: [^myTarget color].\\\\n\\\\t^myTarget fillStyle colorRamp first value\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'gm 2/16/2003 20:36'!\\\\nnumberOneColor: aColor \\\\n\\\\tmyTarget fillStyle isGradientFill \\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[^(myTarget isSystemWindow) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [myTarget setWindowColor: aColor]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [myTarget fillStyle: aColor]].\\\\n\\\\tmyTarget fillStyle \\\\n\\\\t\\\\tfirstColor: aColor\\\\n\\\\t\\\\tforMorph: myTarget\\\\n\\\\t\\\\thand: nil! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'dgd 10/8/2003 19:35'!\\\\nrebuild\\\\n\\\\n\\\\tself removeAllMorphs.\\\\n\\\\tself addARow: {\\\\n\\\\t\\\\tself lockedString: ('Properties for {1}' translated format: {myTarget name}).\\\\n\\\\t}.\\\\n\\\\tself addARow: {\\\\n\\\\t\\\\tself inAColumn: {\\\\n\\\\t\\\\t\\\\tself paneForCornerRoundingToggle.\\\\n\\\\t\\\\t\\\\tself paneForStickinessToggle.\\\\n\\\\t\\\\t\\\\tself paneForLockedToggle.\\\\n\\\\t\\\\t}.\\\\n\\\\t}.\\\\n\\\\n\\\\tself addARow: {\\\\n\\\\t\\\\tself paneForMainColorPicker.\\\\n\\\\t\\\\tself paneFor2ndGradientColorPicker.\\\\n\\\\t}.\\\\n\\\\tself addARow: {\\\\n\\\\t\\\\tself paneForBorderColorPicker.\\\\n\\\\t\\\\tself paneForShadowColorPicker.\\\\n\\\\t}.\\\\n\\\\n\\\\tself addARow: {\\\\n\\\\t\\\\tself \\\\n\\\\t\\\\t\\\\tbuttonNamed: 'Accept' translated action: #doAccept color: color lighter \\\\n\\\\t\\\\t\\\\thelp: 'keep changes made and close panel' translated.\\\\n\\\\t\\\\tself \\\\n\\\\t\\\\t\\\\tbuttonNamed: 'Cancel' translated action: #doCancel color: color lighter \\\\n\\\\t\\\\t\\\\thelp: 'cancel changes made and close panel' translated.\\\\n\\\\t}, self rebuildOptionalButtons.\\\\n\\\\n\\\\tthingsToRevert _ Dictionary new.\\\\n\\\\t\\\\\\\"thingsToRevert at: #fillStyle: put: myTarget fillStyle.\\\\\\\"\\\\n\\\\tmyTarget isSystemWindow ifTrue: [\\\\n\\\\t\\\\tthingsToRevert at: #setWindowColor: put: myTarget paneColorToUse\\\\n\\\\t].\\\\n\\\\tthingsToRevert at: #hasDropShadow: put: myTarget hasDropShadow.\\\\n\\\\tthingsToRevert at: #shadowColor: put: myTarget shadowColor.\\\\n\\\\t(myTarget respondsTo: #borderColor:) ifTrue: [\\\\n\\\\t\\\\tthingsToRevert at: #borderColor: put: myTarget borderColor.\\\\n\\\\t].\\\\n\\\\n\\\\tthingsToRevert at: #borderWidth: put: myTarget borderWidth.\\\\n\\\\tthingsToRevert at: #cornerStyle: put: myTarget cornerStyle.\\\\n\\\\tthingsToRevert at: #sticky: put: myTarget isSticky.\\\\n\\\\tthingsToRevert at: #lock: put: myTarget isLocked.\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'wiz 9/21/2005 22:42'!\\\\nrebuildOptionalButtons\\\\n\\\\n\\\\t| answer |\\\\n\\\\n\\\\tanswer _ #() .\\\\n\\\\t\\\\n\\\\tmyTarget isTextMorph ifTrue: [\\\\n\\\\t\\\\tanswer _ answer, {\\\\n\\\\t\\\\t\\\\tself \\\\n\\\\t\\\\t\\\\t\\\\tbuttonNamed: 'Text' translated action: #doTextProperties color: color lighter \\\\n\\\\t\\\\t\\\\t\\\\thelp: 'open a text properties panel for the morph' translated.\\\\n\\\\t\\\\t}.\\\\n\\\\t].\\\\n\\\\t^answer! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'ar 8/25/2001 18:30'!\\\\ntargetBorderColor\\\\n\\\\t^myTarget borderStyle baseColor! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'ar 11/26/2001 15:29'!\\\\ntargetBorderColor: aColor\\\\n\\\\t\\\\\\\"Need to replace the borderStyle or BorderedMorph will not 'feel' the change\\\\\\\"\\\\n\\\\tmyTarget borderStyle: (myTarget borderStyle copy baseColor: aColor).! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 3/8/2001 18:04'!\\\\ntargetHasGradientFill\\\\n\\\\n\\\\t^myTarget fillStyle isGradientFill! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 3/8/2001 18:01'!\\\\ntargetHasSolidFill\\\\n\\\\n\\\\t^myTarget fillStyle isSolidFill! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 3/8/2001 18:03'!\\\\ntargetRadial\\\\n\\\\n\\\\tmyTarget fillStyle isGradientFill ifFalse: [^false].\\\\n\\\\t^myTarget fillStyle radial! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 3/8/2001 18:03'!\\\\ntgt2ndGradientColor\\\\n\\\\n\\\\tmyTarget fillStyle isGradientFill ifFalse: [^Color black].\\\\n\\\\t^myTarget fillStyle colorRamp last value! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 3/8/2001 18:03'!\\\\ntgt2ndGradientColor: aColor\\\\n\\\\n\\\\tmyTarget fillStyle lastColor: aColor forMorph: myTarget hand: nil\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 2/20/2001 17:45'!\\\\ntoggleTargetGradientFill\\\\n\\\\n\\\\tself targetHasGradientFill ifTrue: [\\\\n\\\\t\\\\tself makeTargetSolidFill\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tself makeTargetGradientFill\\\\n\\\\t].\\\\n\\\\tself doEnables! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 3/8/2001 18:02'!\\\\ntoggleTargetRadial\\\\n\\\\n\\\\t| fs |\\\\n\\\\n\\\\t(fs _ myTarget fillStyle) isGradientFill ifFalse: [^self].\\\\n\\\\tfs radial: fs radial not.\\\\n\\\\tmyTarget changed.\\\\n\\\\tself doEnables.! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'as yet unclassified' stamp: 'RAA 2/20/2001 17:48'!\\\\ntoggleTargetSolidFill\\\\n\\\\n\\\\tself targetHasSolidFill ifTrue: [\\\\n\\\\t\\\\tself makeTargetGradientFill\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tself makeTargetSolidFill\\\\n\\\\t].\\\\n\\\\tself doEnables! !\\\\n\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'initialization' stamp: 'dgd 3/7/2003 14:44'!\\\\ndefaultBorderColor\\\\n\\\\\\\"answer the default border color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ self defaultColor darker! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'initialization' stamp: 'dgd 3/7/2003 14:44'!\\\\ndefaultColor\\\\n\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color\\\\n\\\\t\\\\tr: 0.548\\\\n\\\\t\\\\tg: 0.839\\\\n\\\\t\\\\tb: 0.452! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'initialization' stamp: 'dgd 3/7/2003 14:44'!\\\\ninitialize\\\\n\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\\\\"\\\\\\\"\\\\n\\\\tmyTarget\\\\n\\\\t\\\\tifNil: [myTarget _ RectangleMorph new openInWorld].\\\\n\\\\tself rebuild! !\\\\n\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'sd 11/13/2003 21:03'!\\\\nborderPrototype: aBorderStyle help: helpString\\\\n\\\\t| selector proto |\\\\n\\\\tselector _ BorderedMorph new.\\\\n\\\\tselector borderWidth: 0.\\\\n\\\\tselector color: Color transparent.\\\\n\\\\tproto _ Morph new extent: 16@16.\\\\n\\\\tproto color:  Color transparent.\\\\n\\\\tproto borderStyle: aBorderStyle.\\\\n\\\\tselector extent: proto extent + 4.\\\\n\\\\tselector addMorphCentered: proto.\\\\n\\\\t(myTarget canDrawBorder: aBorderStyle) ifTrue:[\\\\n\\\\t\\\\tselector setBalloonText: helpString.\\\\n\\\\t\\\\tselector on: #mouseDown send: #toggleBorderStyle:with:from: to: self withValue: proto.\\\\n\\\\t\\\\t(myTarget borderStyle species == aBorderStyle species and:[\\\\n\\\\t\\\\t\\\\tmyTarget borderStyle style == aBorderStyle style]) ifTrue:[selector borderWidth: 1].\\\\n\\\\t] ifFalse:[\\\\n\\\\t\\\\tselector setBalloonText: 'This border style cannot be used here' translated.\\\\n\\\\t\\\\tselector on: #mouseDown send: #beep to: Beeper.\\\\n\\\\t\\\\tselector addMorphCentered: ((Morph new) color: (Color black alpha: 0.5); extent: selector extent).\\\\n\\\\t].\\\\n\\\\t^selector! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'dgd 8/31/2003 21:21'!\\\\npaneFor2ndGradientColorPicker\\\\n\\\\n\\\\t^self \\\\n\\\\t\\\\tinAColumn: {\\\\n\\\\t\\\\t\\\\t(self inAColumn: {\\\\n\\\\t\\\\t\\\\t\\\\tself colorPickerFor: self getter: #tgt2ndGradientColor setter: #tgt2ndGradientColor:.\\\\n\\\\t\\\\t\\\\t\\\\tself lockedString: '2nd gradient color' translated.\\\\n\\\\t\\\\t\\\\t\\\\tself paneForRadialGradientToggle hResizing: #shrinkWrap.\\\\n\\\\t\\\\t\\\\t\\\\t(\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself inARow: {self paneForGradientOrigin. self paneForGradientDirection}\\\\n\\\\t\\\\t\\\\t\\\\t) hResizing: #shrinkWrap.\\\\n\\\\t\\\\t\\\\t}\\\\n\\\\t\\\\t\\\\tnamed: #pickerFor2ndGradientColor) layoutInset: 0.\\\\n\\\\t\\\\t\\\\tself paneForGradientFillToggle hResizing: #shrinkWrap \\\\n\\\\t\\\\t}\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'dgd 8/31/2003 21:23'!\\\\npaneForBorderColorPicker\\\\n\\\\n\\\\t^self \\\\n\\\\t\\\\tinAColumn: {\\\\n\\\\t\\\\t\\\\tself \\\\n\\\\t\\\\t\\\\t\\\\tcolorPickerFor: self\\\\n\\\\t\\\\t\\\\t\\\\tgetter: #targetBorderColor\\\\n\\\\t\\\\t\\\\t\\\\tsetter: #targetBorderColor:.\\\\n\\\\t\\\\t\\\\tself lockedString: 'Border Color' translated.\\\\n\\\\t\\\\t\\\\t(self paneForBorderStyle) hResizing: #shrinkWrap; layoutInset: 5.\\\\n\\\\t\\\\t\\\\tself lockedString: 'Border style' translated.\\\\n\\\\t\\\\t\\\\tself paneForBorderWidth.\\\\n\\\\t\\\\t} \\\\n\\\\t\\\\tnamed: #pickerForBorderColor.\\\\n\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'dgd 8/31/2003 21:25'!\\\\npaneForBorderStyle\\\\n\\\\n\\\\t^self inARow: {\\\\n\\\\t\\\\tself borderPrototype: (BorderStyle width: 4 color: Color black)\\\\n\\\\t\\\\t\\\\thelp:'Click to select a simple colored border' translated.\\\\n\\\\t\\\\tself borderPrototype: (BorderStyle raised width: 4)\\\\n\\\\t\\\\t\\\\thelp:'Click to select a simple raised border' translated.\\\\n\\\\t\\\\tself borderPrototype: (BorderStyle inset width: 4)\\\\n\\\\t\\\\t\\\\thelp:'Click to select a simple inset border' translated.\\\\n\\\\t\\\\tself borderPrototype: (BorderStyle complexFramed width: 4)\\\\n\\\\t\\\\t\\\\thelp:'Click to select a complex framed border' translated.\\\\n\\\\t\\\\tself borderPrototype: (BorderStyle complexRaised width: 4)\\\\n\\\\t\\\\t\\\\thelp:'Click to select a complex raised border' translated.\\\\n\\\\t\\\\tself borderPrototype: (BorderStyle complexInset width: 4)\\\\n\\\\t\\\\t\\\\thelp:'Click to select a complex inset border' translated.\\\\n\\\\t\\\\tself borderPrototype: (BorderStyle complexAltFramed width: 4)\\\\n\\\\t\\\\t\\\\thelp:'Click to select a complex framed border' translated.\\\\n\\\\t\\\\tself borderPrototype: (BorderStyle complexAltRaised width: 4)\\\\n\\\\t\\\\t\\\\thelp:'Click to select a complex raised border' translated.\\\\n\\\\t\\\\tself borderPrototype: (BorderStyle complexAltInset width: 4)\\\\n\\\\t\\\\t\\\\thelp:'Click to select a complex inset border' translated.\\\\n\\\\t}\\\\n\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'dgd 8/31/2003 21:29'!\\\\npaneForBorderWidth\\\\n\\\\n\\\\t^(self inARow: {\\\\n\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\tbuildFakeSlider: 'Border width' translated\\\\n\\\\t\\\\t\\\\tselector: #adjustTargetBorderWidth:\\\\n\\\\t\\\\t\\\\thelp: 'Drag in here to change the border width' translated\\\\n\\\\t}) hResizing: #shrinkWrap\\\\n\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'dgd 8/31/2003 21:18'!\\\\npaneForCornerRoundingToggle\\\\n\\\\n\\\\t^self inARow: {\\\\n\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\tdirectToggleButtonFor: myTarget \\\\n\\\\t\\\\t\\\\tgetter: #wantsRoundedCorners setter: #toggleCornerRounding\\\\n\\\\t\\\\t\\\\thelp: 'Turn rounded corners on or off' translated.\\\\n\\\\t\\\\tself lockedString: ' Rounded corners' translated.\\\\n\\\\t}\\\\n\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'dgd 8/31/2003 21:40'!\\\\npaneForDropShadowToggle\\\\n\\\\n\\\\t^self inARow: {\\\\n\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\tdirectToggleButtonFor: myTarget \\\\n\\\\t\\\\t\\\\tgetter: #hasDropShadow setter: #toggleDropShadow\\\\n\\\\t\\\\t\\\\thelp: 'Turn drop shadows on or off' translated.\\\\n\\\\t\\\\tself lockedString: ' Drop shadow color' translated.\\\\n\\\\t}\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'dgd 8/31/2003 21:22'!\\\\npaneForGradientDirection\\\\n\\\\n\\\\t^(self inARow: {\\\\n\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\tbuildFakeSlider: 'Direction' translated\\\\n\\\\t\\\\t\\\\tselector: #adjustTargetGradientDirection:\\\\n\\\\t\\\\t\\\\thelp: 'Drag in here to change the direction of the gradient' translated\\\\n\\\\t}) hResizing: #shrinkWrap\\\\n\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'dgd 8/31/2003 21:22'!\\\\npaneForGradientFillToggle\\\\n\\\\n\\\\t^self inARow: {\\\\n\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\tdirectToggleButtonFor: self \\\\n\\\\t\\\\t\\\\tgetter: #targetHasGradientFill\\\\n\\\\t\\\\t\\\\tsetter: #toggleTargetGradientFill\\\\n\\\\t\\\\t\\\\thelp: 'Turn gradient fill on or off' translated.\\\\n\\\\t\\\\tself lockedString: ' Gradient fill' translated.\\\\n\\\\t}\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'dgd 8/31/2003 21:21'!\\\\npaneForGradientOrigin\\\\n\\\\n\\\\t^(self inARow: {\\\\n\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\tbuildFakeSlider: 'Origin' translated\\\\n\\\\t\\\\t\\\\tselector: #adjustTargetGradientOrigin:\\\\n\\\\t\\\\t\\\\thelp: 'Drag in here to change the origin of the gradient' translated\\\\n\\\\t}) hResizing: #shrinkWrap\\\\n\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'dgd 8/31/2003 21:19'!\\\\npaneForLockedToggle\\\\n\\\\n\\\\t^self inARow: {\\\\n\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\tdirectToggleButtonFor: myTarget \\\\n\\\\t\\\\t\\\\tgetter: #isLocked setter: #toggleLocked\\\\n\\\\t\\\\t\\\\thelp: 'Turn lock on or off' translated.\\\\n\\\\t\\\\tself lockedString: ' Lock' translated.\\\\n\\\\t}\\\\n\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'dgd 8/31/2003 21:20'!\\\\npaneForMainColorPicker\\\\n\\\\n\\\\t^self \\\\n\\\\t\\\\tinAColumn: {\\\\n\\\\t\\\\t\\\\tself \\\\n\\\\t\\\\t\\\\t\\\\tcolorPickerFor: self \\\\n\\\\t\\\\t\\\\t\\\\tgetter: #numberOneColor \\\\n\\\\t\\\\t\\\\t\\\\tsetter: #numberOneColor:.\\\\n\\\\t\\\\t\\\\tself lockedString: 'Color' translated.\\\\n\\\\t\\\\t\\\\t(self paneForSolidFillToggle)  hResizing: #shrinkWrap.\\\\n\\\\t\\\\t} \\\\n\\\\t\\\\tnamed: #pickerForColor.\\\\n\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'dgd 8/31/2003 21:21'!\\\\npaneForRadialGradientToggle\\\\n\\\\n\\\\t^self inARow: {\\\\n\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\tdirectToggleButtonFor: self \\\\n\\\\t\\\\t\\\\tgetter: #targetRadial setter: #toggleTargetRadial\\\\n\\\\t\\\\t\\\\thelp: 'Turn radial gradient on or off' translated.\\\\n\\\\t\\\\tself lockedString: ' Radial gradient' translated.\\\\n\\\\t}\\\\n\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'RAA 3/8/2001 18:03'!\\\\npaneForShadowColorPicker\\\\n\\\\n\\\\t^self \\\\n\\\\t\\\\tinAColumn: {\\\\n\\\\t\\\\t\\\\t(self inAColumn: {\\\\n\\\\t\\\\t\\\\t\\\\tself colorPickerFor: myTarget getter: #shadowColor setter: #shadowColor:.\\\\n\\\\t\\\\t\\\\t\\\\tself paneForShadowOffset.\\\\n\\\\t\\\\t\\\\t}\\\\n\\\\t\\\\t\\\\tnamed: #pickerForShadowColor) layoutInset: 0.\\\\n\\\\t\\\\t\\\\tself paneForDropShadowToggle hResizing: #shrinkWrap.\\\\n\\\\t\\\\t}\\\\n\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'dgd 8/31/2003 21:36'!\\\\npaneForShadowOffset\\\\n\\\\n\\\\t^(self inARow: {\\\\n\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\tbuildFakeSlider: 'Offset' translated\\\\n\\\\t\\\\t\\\\tselector: #adjustTargetShadowOffset:\\\\n\\\\t\\\\t\\\\thelp: 'Drag in here to change the offset of the shadow' translated\\\\n\\\\t}) hResizing: #shrinkWrap\\\\n\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'dgd 8/31/2003 21:20'!\\\\npaneForSolidFillToggle\\\\n\\\\n\\\\t^self inARow: {\\\\n\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\tdirectToggleButtonFor: self \\\\n\\\\t\\\\t\\\\tgetter: #targetHasSolidFill\\\\n\\\\t\\\\t\\\\tsetter: #toggleTargetSolidFill\\\\n\\\\t\\\\t\\\\thelp: 'Turn solid fill on or off' translated.\\\\n\\\\t\\\\tself lockedString: ' Solid fill' translated.\\\\n\\\\t}\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'dgd 8/31/2003 21:18'!\\\\npaneForStickinessToggle\\\\n\\\\n\\\\t^self inARow: {\\\\n\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\tdirectToggleButtonFor: myTarget \\\\n\\\\t\\\\t\\\\tgetter: #isSticky setter: #toggleStickiness\\\\n\\\\t\\\\t\\\\thelp: 'Turn stickiness on or off' translated.\\\\n\\\\t\\\\tself lockedString: ' Sticky' translated.\\\\n\\\\t}\\\\n\\\\n! !\\\\n\\\\n!ObjectPropertiesMorph methodsFor: 'panes' stamp: 'ar 8/25/2001 18:35'!\\\\ntoggleBorderStyle: provider with: arg1 from: arg2\\\\n\\\\t| oldStyle newStyle |\\\\n\\\\toldStyle _ myTarget borderStyle.\\\\n\\\\tnewStyle _ provider borderStyle copy.\\\\n\\\\toldStyle width = 0 \\\\n\\\\t\\\\tifTrue:[newStyle width: 2]\\\\n\\\\t\\\\tifFalse:[newStyle width: oldStyle width].\\\\n\\\\tnewStyle baseColor: oldStyle baseColor.\\\\n\\\\tmyTarget borderStyle: newStyle.\\\\n\\\\tprovider owner owner submorphsDo:[:m| m borderWidth: 0].\\\\n\\\\tprovider owner borderWidth: 1.! !\\\\nAlignmentMorph subclass: #ObjectRepresentativeMorph\\\\n\\\\tinstanceVariableNames: 'objectRepresented'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'EToys-Scripting'!\\\\n\\\\n!ObjectRepresentativeMorph methodsFor: 'as yet unclassified' stamp: 'ar 11/1/2000 15:55'!\\\\nobjectRepresented: anObject\\\\n\\\\t\\\\\\\"Set the receiver's representee.  This clears out any preexisting state in the receiver\\\\\\\"\\\\n\\\\n\\\\tobjectRepresented _ anObject.\\\\n\\\\tself removeAllMorphs.\\\\n\\\\tself hResizing: #shrinkWrap.  \\\\n\\\\tself vResizing: #shrinkWrap.\\\\n\\\\tself addMorphBack: (StringMorph new contents: anObject name asString).\\\\n\\\\tself setNameTo: anObject name\\\\n\\\\t! !\\\\n\\\\n!ObjectRepresentativeMorph methodsFor: 'as yet unclassified' stamp: 'ar 11/1/2000 15:55'!\\\\nobjectRepresented: anObject labelString: aLabel\\\\n\\\\t\\\\\\\"Set the receiver's representee as indicated, and use the given label to tag it\\\\\\\"\\\\n\\\\n\\\\tobjectRepresented _ anObject.\\\\n\\\\tself removeAllMorphs.\\\\n\\\\tself hResizing: #shrinkWrap.  \\\\n\\\\tself vResizing: #shrinkWrap.\\\\n\\\\tself addMorphBack: (StringMorph new contents: aLabel asString).\\\\n\\\\tself setNameTo: aLabel asString\\\\n\\\\t! !\\\\n\\\\n\\\\n!ObjectRepresentativeMorph methodsFor: 'macpal' stamp: 'sw 10/17/2000 11:42'!\\\\nobjectRepresented\\\\n\\\\t\\\\\\\"Answer the object represented by the receiver\\\\\\\"\\\\n\\\\n\\\\t^ objectRepresented! !\\\\n\\\\n\\\\n!ObjectRepresentativeMorph methodsFor: 'naming' stamp: 'sw 10/31/2000 09:22'!\\\\nnameOfObjectRepresented\\\\n\\\\t\\\\\\\"Answer the external name of the object represented\\\\\\\"\\\\n\\\\n\\\\t^ objectRepresented externalName! !\\\\n\\\\n\\\\n!ObjectRepresentativeMorph methodsFor: 'scripting' stamp: 'sw 10/17/2000 11:35'!\\\\ncategoriesForViewer\\\\n\\\\t\\\\\\\"Answer a list of symbols representing the categories to offer in the viewer, in order\\\\\\\"\\\\n\\\\n\\\\t^ objectRepresented class organization categories\\\\n! !\\\\nObject subclass: #ObjectScanner\\\\n\\\\tinstanceVariableNames: 'pvt3SmartRefStrm'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Object Storage'!\\\\n!ObjectScanner commentStamp: '<historical>' prior: 0!\\\\nAn instance of this class is the compiler's context for filing in a SmartRefStream containing instance-specific classes.  When the old name of a new object's class conflicts with an existing class name, install a class var in me.  It has the old name but points at the new class.  The compiler uses it when compiling the code in the fileIn.  Fill the SmartRefStream's renamed class dictionary.\\\\n\\\\nAn object fileout:\\\\n!!ObjectScanner new initialize!!      \\\\\\\"allow me to take control with scanFrom:\\\\\\\"\\\\n\\\\nPlayer subclass: Player23 instanceVariableNames: 'foo' classVariableNames: '' \\\\n\\\\tpoolDictionaries: nil category: 'Instance Specific'!!\\\\n\\\\t\\\\\\\"I prescan this and (self rename: #Player23 toBe: #Player30)\\\\\\\"\\\\n\\\\n!!Player23 methodsFor: 'all' stamp: 'tk 3/9/98 18:58'!!\\\\t\\\\\\\"actually sent to Player30\\\\\\\"\\\\nfoo\\\\n\\\\t^ foo!! !!\\\\n\\\\n!!self smartRefStream!!<binary representation of the objects>!!\\\\n\\\\n\\\\n!\\\\n\\\\n\\\\n!ObjectScanner methodsFor: 'accessing' stamp: 'tk 3/15/98 19:33'!\\\\nsmartRefStream\\\\n\\\\n\\\\t^ pvt3SmartRefStrm! !\\\\n\\\\n\\\\n!ObjectScanner methodsFor: 'initialize-release' stamp: 'tk 3/15/98 20:17'!\\\\nclear\\\\n\\\\t\\\\\\\"remove all old class vars.  They were UniClasses being remapped to aviod a name conflict.\\\\\\\"\\\\n\\\\n\\\\tself class classPool keys do: [:key |\\\\n\\\\t\\\\tself class classPool removeKey: key].\\\\t\\\\\\\"brute force\\\\\\\"! !\\\\n\\\\n!ObjectScanner methodsFor: 'initialize-release' stamp: 'tk 8/15/1998 15:26'!\\\\ninitialize\\\\n\\\\t\\\\\\\"remove all old class vars that are not instance-specific classes being renamed\\\\\\\"\\\\n\\\\n\\\\tself clear.\\\\n\\\\t\\\\\\\"Most importantly, return self, so a fileIn will let ObjectScanner seize control.  So UniClasses can be remapped.  See the transfer of control where ReadWriteStream fileIn calls scanFrom:\\\\\\\"! !\\\\n\\\\n\\\\n!ObjectScanner methodsFor: 'scanning' stamp: 'yo 11/11/2002 10:27'!\\\\nlookAhead: aChunk\\\\n\\\\t\\\\\\\"See if this chunk is a class Definition, and if the new class name already exists and is instance-specific.  Modify the chunk, and record the rename in the SmartRefStream and in me.\\\\\\\"\\\\n\\\\n\\\\t| pieces sup oldName existing newName newDefn |\\\\n\\\\taChunk size < 90 ifTrue: [^ aChunk].\\\\t\\\\t\\\\\\\"class defn is big!!\\\\\\\"\\\\n\\\\t(aChunk at: 1) == $!! ifTrue: [^ aChunk].\\\\t\\\\\\\"method def, fast exit\\\\\\\"\\\\n\\\\tpieces _ (aChunk copyFrom: 1 to: (300 min: aChunk size)) findTokens: ' #\\\\t\\\\\\\\' withCRs.\\\\n\\\\tpieces size < 3 ifTrue: [^ aChunk].\\\\t\\\\\\\"really bigger, but just took front\\\\\\\"\\\\n\\\\t(pieces at: 2) = 'subclass:' ifFalse: [^ aChunk].\\\\n\\\\tsup _ Smalltalk at: (pieces at: 1) asSymbol ifAbsent: [^ aChunk].\\\\n\\\\tsup class class == Metaclass ifFalse: [^ aChunk].\\\\n\\\\t((oldName _ pieces at: 3) at: 1) canBeGlobalVarInitial ifFalse: [^ aChunk].\\\\n\\\\toldName _ oldName asSymbol.\\\\n\\\\t(Smalltalk includesKey: oldName) ifFalse: [^ aChunk].\\\\t\\\\\\\"no conflict\\\\\\\"\\\\n\\\\texisting _ Smalltalk at: oldName.\\\\n\\\\t(existing isKindOf: Class) ifFalse: [^ aChunk].\\\\t\\\\\\\"Write over non-class global\\\\\\\"\\\\n\\\\texisting isSystemDefined ifTrue: [^ aChunk].\\\\t\\\\\\\"Go ahead and redefine it!!\\\\\\\"\\\\n\\\\t\\\\\\\"Is a UniClass\\\\\\\"\\\\n\\\\tnewName _ sup chooseUniqueClassName.\\\\n\\\\tnewDefn _ aChunk copyReplaceAll: oldName with: newName.\\\\n\\\\tCompiler evaluate: newDefn for: self logged: true.\\\\t\\\\\\\"Create the new class\\\\\\\"\\\\n\\\\tself rename: oldName toBe: newName.\\\\n\\\\t^ newName asString\\\\t\\\\t\\\\\\\"to be evaluated\\\\\\\"\\\\n! !\\\\n\\\\n!ObjectScanner methodsFor: 'scanning' stamp: 'tk 3/15/98 20:22'!\\\\nscanFrom: aByteStream\\\\n\\\\t\\\\\\\"Sieze control of the fileIn.  Put myself in as the context.  If any UniClasses (for just one instance) are defined, they will do it through me, and I will look for conflicting class names.  If so, install the old name as a class var of me, so the compile will work.  Tell my SmartRefStream about renaming the class.\\\\\\\"\\\\n\\\\n\\\\t| valWithOddName47 scannerNamed53 chunkNamed117 |\\\\n\\\\tpvt3SmartRefStrm _ SmartRefStream on: aByteStream.\\\\n\\\\taByteStream ascii.\\\\n\\\\t[aByteStream atEnd] whileFalse:\\\\n\\\\t\\\\t[aByteStream skipSeparators.\\\\n\\\\t\\\\tvalWithOddName47 _ (aByteStream peekFor: $!!)\\\\n\\\\t\\\\t\\\\tifTrue: [chunkNamed117 _ aByteStream nextChunk.\\\\t\\\\\\\"debug\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tscannerNamed53 _ Compiler evaluate: chunkNamed117\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfor: self logged: false.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tscannerNamed53 class == self class \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"I already am the scanner for this file\\\\\\\"]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [scannerNamed53 scanFrom: aByteStream]]\\\\n\\\\t\\\\t\\\\tifFalse: [chunkNamed117 _ aByteStream nextChunk.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tchunkNamed117 _ self lookAhead: chunkNamed117.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tCompiler evaluate: chunkNamed117 for: self logged: true].\\\\n\\\\t\\\\taByteStream skipStyleChunk].\\\\n\\\\t^ valWithOddName47! !\\\\n\\\\n\\\\n!ObjectScanner methodsFor: 'utilities' stamp: 'tk 3/15/98 20:21'!\\\\nrename: existingName toBe: newName\\\\n\\\\t\\\\\\\"See if there is a conflict between what the fileIn wants to call the new UniClass (Player23) and what already exists for another unique instance.  If conflict, make a class variable to intercept the existingName and direct it to class newName.\\\\\\\"\\\\n\\\\n\\\\texistingName = newName ifFalse: [\\\\n\\\\t\\\\tself class ensureClassPool.\\\\t\\\\\\\"create the dictionary\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"can't use addClassVarName: because it checks for conflicts with Smalltalk\\\\\\\"\\\\n\\\\t\\\\t(self class classPool includesKey: existingName) ifFalse: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"Pick up any refs in Undeclared\\\\\\\"\\\\n\\\\t\\\\t\\\\tself class classPool declare: existingName from: Undeclared].\\\\n\\\\t\\\\tself class classPool at: existingName put: (Smalltalk at: newName).\\\\n\\\\t\\\\tpvt3SmartRefStrm renamed at: existingName put: newName]! !\\\\nStream subclass: #ObjectSocket\\\\n\\\\tinstanceVariableNames: 'socket outBuf outBufIndex outBufSize inBuf inBufIndex inBufLastIndex outObjects inObjects'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Nebraska-Network-ObjectSocket'!\\\\n!ObjectSocket commentStamp: 'ls 2/10/2005 21:27' prior: 0!\\\\nThis is a socket which exchanges medium-level packets instead of low-level bytes.  This class is abstract; see the subclasses for particular kinds of medium-level packets which can be used.!\\\\n\\\\n\\\\n!ObjectSocket methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:26'!\\\\ndestroy\\\\n\\\\tsocket destroy.\\\\n\\\\tsocket := nil.! !\\\\n\\\\n!ObjectSocket methodsFor: 'as yet unclassified' stamp: 'RAA 7/20/2000 15:10'!\\\\nisConnected\\\\n\\\\n\\\\t^socket notNil and: [socket isConnected]! !\\\\n\\\\n!ObjectSocket methodsFor: 'as yet unclassified' stamp: 'ls 1/8/1999 16:14'!\\\\nprocessIO\\\\n\\\\t\\\\\\\"do some as much network IO as possible\\\\\\\"\\\\n\\\\n\\\\tself processOutput.\\\\n\\\\tself processInput.! !\\\\n\\\\n!ObjectSocket methodsFor: 'as yet unclassified' stamp: 'RAA 8/4/2000 15:38'!\\\\nremoteAddress\\\\n\\\\n\\\\tself isConnected ifFalse: [^nil].\\\\n\\\\t^socket remoteAddress! !\\\\n\\\\n\\\\n!ObjectSocket methodsFor: 'encoding/decoding' stamp: 'sd 11/20/2005 21:26'!\\\\naddToInBuf: aString\\\\n\\\\n\\\\t| newAlloc |\\\\n\\\\tnewAlloc := aString size * 2 max: 8000.\\\\n\\\\tinBuf ifNil: [\\\\n\\\\t\\\\tinBuf := String new: newAlloc.\\\\n\\\\t\\\\tinBufIndex := 1.\\\\n\\\\t\\\\tinBufLastIndex := 0.\\\\n\\\\t].\\\\n\\\\taString size > (inBuf size - inBufLastIndex) ifTrue: [\\\\n\\\\t\\\\tinBuf := inBuf , (String new: newAlloc)\\\\n\\\\t].\\\\n\\\\tinBuf \\\\n\\\\t\\\\treplaceFrom: inBufLastIndex + 1 \\\\n\\\\t\\\\tto: inBufLastIndex + aString size\\\\n\\\\t\\\\twith: aString \\\\n\\\\t\\\\tstartingAt: 1.\\\\n\\\\tinBufLastIndex := inBufLastIndex + aString size.\\\\n! !\\\\n\\\\n!ObjectSocket methodsFor: 'encoding/decoding' stamp: 'sd 11/20/2005 21:26'!\\\\nprocessOutput\\\\n\\\\t\\\\\\\"loop sending data as long as there is data to send, and the socket is ready to receive more data\\\\\\\"\\\\n\\\\t[ socket sendDone and: [ outBuf notNil or: [ outObjects isEmpty not ] ] ] whileTrue: [\\\\n\\\\t\\\\t| amountSent |\\\\n\\\\n\\\\t\\\\toutBuf isNil ifTrue: [\\\\n\\\\t\\\\t\\\\t| nextSize |\\\\n\\\\t\\\\t\\\\t\\\\\\\"no data in the current buffer; make a new buffer and encode some more\\\\\\\"\\\\n\\\\t\\\\t\\\\toutBuf := String new: ((self spaceToEncode: outObjects first) max: 8000).\\\\n\\\\t\\\\t\\\\toutBufIndex := 1.\\\\n\\\\t\\\\t\\\\toutBufSize := 0.\\\\n\\\\n\\\\t\\\\t\\\\t[\\\\toutObjects isEmpty not and: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnextSize := self spaceToEncode: outObjects first.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnextSize <= (outBuf size - outBufSize + 1) ]\\\\n\\\\t\\\\t\\\\t] whileTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tself encodeObject: outObjects first into: outBuf startingAt: outBufSize+1.\\\\n\\\\t\\\\t\\\\t\\\\toutBufSize := outBufSize + nextSize.\\\\n\\\\t\\\\t\\\\t\\\\toutObjects removeFirst ] ].\\\\n\\\\n\\\\t\\\\t\\\\\\\"at this point, the buffer definitely has data in it to send.  Send some\\\\\\\"\\\\n\\\\t\\\\tamountSent := socket sendSomeData: outBuf startIndex: outBufIndex count: (outBufSize - outBufIndex + 1).\\\\n\\\\t\\\\toutBufIndex := outBufIndex + amountSent.\\\\n\\\\t\\\\toutBufIndex > outBufSize ifTrue: [ outBuf := nil ]  ].\\\\n\\\\n! !\\\\n\\\\n!ObjectSocket methodsFor: 'encoding/decoding' stamp: 'sd 11/20/2005 21:26'!\\\\nshrinkInBuf\\\\n\\\\n\\\\tinBuf ifNil: [^self].\\\\n\\\\tinBufLastIndex < inBufIndex ifTrue: [\\\\n\\\\t\\\\tinBufLastIndex := 0.\\\\n\\\\t\\\\tinBufIndex := 1.\\\\n\\\\t\\\\tinBuf size > 20000 ifTrue: [inBuf := nil].\\\\t\\\\\\\"if really big, kill it\\\\\\\"\\\\n\\\\t\\\\t^self\\\\n\\\\t].\\\\n\\\\tinBuf := inBuf copyFrom: inBufIndex to: inBufLastIndex.\\\\n\\\\tinBufLastIndex := inBuf size.\\\\n\\\\tinBufIndex := 1.\\\\n\\\\n! !\\\\n\\\\n\\\\n!ObjectSocket methodsFor: 'stream protocol' stamp: 'ls 4/25/2000 18:48'!\\\\nnext\\\\n\\\\t^inObjects removeFirst\\\\t! !\\\\n\\\\n!ObjectSocket methodsFor: 'stream protocol' stamp: 'ls 4/25/2000 18:48'!\\\\nnextOrNil\\\\n\\\\tinObjects isEmpty\\\\n\\\\t\\\\tifTrue: [ ^nil ]\\\\n\\\\t\\\\tifFalse: [ ^inObjects removeFirst ]! !\\\\n\\\\n!ObjectSocket methodsFor: 'stream protocol' stamp: 'ls 4/25/2000 18:48'!\\\\nnextPut: anObject\\\\n\\\\toutObjects addLast: anObject! !\\\\n\\\\n\\\\n!ObjectSocket methodsFor: 'private-initialization' stamp: 'sd 11/20/2005 21:26'!\\\\ninitialize: aSocket\\\\n\\\\tsocket := aSocket.\\\\n\\\\tinBuf := String new: 1000.\\\\n\\\\tinBufIndex := 1.\\\\n\\\\tinBufLastIndex := 0.\\\\n\\\\n\\\\toutBuf := nil.\\\\n\\\\n\\\\tinObjects := OrderedCollection new.\\\\n\\\\toutObjects := OrderedCollection new.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nObjectSocket class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!ObjectSocket class methodsFor: 'as yet unclassified' stamp: 'RAA 7/20/2000 15:47'!\\\\non: aSocket\\\\n\\\\n\\\\t^self basicNew initialize: aSocket! !\\\\nClassTestCase subclass: #ObjectTest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'KernelTests-Objects'!\\\\n\\\\n!ObjectTest methodsFor: 'tests' stamp: 'md 11/26/2004 16:37'!\\\\ntestBecome\\\\n\\\\t\\\\\\\"self debug: #testBecome\\\\\\\"\\\\n\\\\t\\\\\\\"this test should that all the variables pointing to an object are pointing now to another one, and all\\\\n      object pointing to the other are pointing to the object\\\\\\\"\\\\n\\\\n\\\\t| pt1 pt2 pt3 |\\\\n\\\\tpt1 := 0@0.\\\\n\\\\tpt2 := pt1.\\\\n\\\\tpt3 := 100@100.\\\\n\\\\n\\\\tpt1 become: pt3.\\\\n\\\\tself assert: pt2 = (100@100).\\\\n\\\\tself assert: pt3 = (0@0).\\\\n\\\\tself assert: pt1 = (100@100).! !\\\\n\\\\n!ObjectTest methodsFor: 'tests' stamp: 'md 11/26/2004 16:36'!\\\\ntestBecomeForward\\\\n\\\\t\\\\\\\"self debug: #testBecomeForward\\\\\\\"\\\\n\\\\t\\\\\\\"this test should that all the variables pointing to an object are pointing now to another one.\\\\n\\\\tNot that this inverse is not true. This kind of become is called oneWayBecome in VW\\\\\\\"\\\\n\\\\n\\\\t| pt1 pt2 pt3 |\\\\n\\\\tpt1 := 0@0.\\\\n\\\\tpt2 := pt1.\\\\n\\\\tpt3 := 100@100.\\\\n\\\\tpt1 becomeForward: pt3.\\\\n\\\\tself assert: pt2 = (100@100).\\\\n\\\\tself assert: pt3 == pt2.\\\\n\\\\tself assert: pt1 = (100@100)! !\\\\n\\\\n\\\\n!ObjectTest methodsFor: 'tests - debugging' stamp: 'sd 6/5/2005 09:05'!\\\\ntestAssert\\\\n\\\\n\\\\tself shouldnt: [Object assert: [true]] raise: Error.\\\\n\\\\tself shouldnt: [Object assert: true] raise: Error.\\\\n\\\\tself should: [Object assert: [false]] raise: AssertionFailure.\\\\n\\\\tself should: [Object assert: false] raise: AssertionFailure.! !\\\\n\\\\n!ObjectTest methodsFor: 'tests - debugging' stamp: 'sd 6/5/2005 09:05'!\\\\ntestHaltIf\\\\n\\\\n\\\\tself should: [self haltIf: true] raise: Halt.\\\\n\\\\tself shouldnt: [self haltIf: false] raise: Halt.\\\\n\\\\n\\\\tself should: [self haltIf: [true]] raise: Halt.\\\\n\\\\tself shouldnt: [self haltIf: [false]] raise: Halt.\\\\n\\\\n\\\\tself should: [self haltIf: #testHaltIf.] raise: Halt.\\\\n\\\\tself shouldnt: [self haltIf: #teadfasdfltIf.] raise: Halt.\\\\n\\\\n\\\\tself should: [self a] raise: Halt.\\\\n\\\\tself shouldnt: [self a1] raise: Halt.\\\\n\\\\n\\\\tself should: [self haltIf: [:o | o class = self class]] raise: Halt.\\\\n\\\\tself shouldnt: [self haltIf: [:o | o class ~= self class]] raise: Halt.\\\\n! !\\\\n\\\\n\\\\n!ObjectTest methodsFor: 'private' stamp: 'md 10/15/2004 13:45'!\\\\na\\\\n\\\\tself b.! !\\\\n\\\\n!ObjectTest methodsFor: 'private' stamp: 'md 10/15/2004 13:46'!\\\\na1\\\\n\\\\tself b1.! !\\\\n\\\\n!ObjectTest methodsFor: 'private' stamp: 'md 10/15/2004 13:45'!\\\\nb\\\\n\\\\tself haltIf: #testHaltIf.! !\\\\n\\\\n!ObjectTest methodsFor: 'private' stamp: 'md 10/15/2004 13:46'!\\\\nb1\\\\n\\\\tself haltIf: #testasdasdfHaltIf.! !\\\\nProtoObject subclass: #ObjectTracer\\\\n\\\\tinstanceVariableNames: 'tracedObject recursionFlag'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Kernel-Objects'.\\\\nObjectTracer superclass: nil!\\\\n!ObjectTracer commentStamp: '<historical>' prior: 0!\\\\nAn ObjectTracer can be wrapped around another object, and then give you a chance to inspect it whenever it receives messages from the outside.  For instance...\\\\n\\\\t(ObjectTracer on: Display) flash: (50@50 extent: 50@50)\\\\nwill give control to a debugger just before the message flash is sent.\\\\nObviously this facility can be embellished in many useful ways.\\\\nSee also the even more perverse subclass, ObjectViewer, and its example.\\\\n!\\\\n\\\\n\\\\n!ObjectTracer methodsFor: 'very few messages' stamp: 'ar 9/27/2005 20:24'!\\\\ndoesNotUnderstand: aMessage \\\\n\\\\t\\\\\\\"All external messages (those not caused by the re-send) get trapped here\\\\\\\"\\\\n\\\\t\\\\\\\"Present a dubugger before proceeding to re-send the message\\\\\\\"\\\\n\\\\n\\\\tToolSet debugContext: thisContext\\\\n\\\\t\\\\t\\\\t\\\\tlabel: 'About to perform: ', aMessage selector\\\\n\\\\t\\\\t\\\\t\\\\tcontents: nil.\\\\n\\\\t^ aMessage sentTo: tracedObject.\\\\n! !\\\\n\\\\n!ObjectTracer methodsFor: 'very few messages'!\\\\nxxxUnTrace\\\\n\\\\n\\\\ttracedObject become: self! !\\\\n\\\\n!ObjectTracer methodsFor: 'very few messages'!\\\\nxxxViewedObject\\\\n\\\\t\\\\\\\"This message name must not clash with any other (natch).\\\\\\\"\\\\n\\\\t^ tracedObject! !\\\\n\\\\n!ObjectTracer methodsFor: 'very few messages'!\\\\nxxxViewedObject: anObject\\\\n\\\\t\\\\\\\"This message name must not clash with any other (natch).\\\\\\\"\\\\n\\\\ttracedObject _ anObject! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nObjectTracer class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!ObjectTracer class methodsFor: 'instance creation'!\\\\non: anObject\\\\n\\\\t^ self new xxxViewedObject: anObject! !\\\\nObjectTracer subclass: #ObjectViewer\\\\n\\\\tinstanceVariableNames: 'valueBlock lastValue changeBlock'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Kernel-Objects'!\\\\n!ObjectViewer commentStamp: '<historical>' prior: 0!\\\\nObjectViewers offers the same kind of interception of messages (via doesnotUnderstand:) as ObjectTracers, but instead of just being wrappers, they actually replace the object being viewed.  This makes them a lot more dangerous to use, but one can do amazing things.  For instance, the example below actually intercepts the InputSensor object, and prints the mouse coordinates asynchronously, every time they change:\\\\n\\\\tSensor evaluate: [Sensor cursorPoint printString displayAt: 0@0]\\\\n\\\\t\\\\twheneverChangeIn: [Sensor cursorPoint].\\\\nTo exit from this example, execute:\\\\n\\\\tSensor xxxUnTrace\\\\n!\\\\n\\\\n\\\\n!ObjectViewer methodsFor: 'very few messages'!\\\\ndoesNotUnderstand: aMessage \\\\n\\\\t\\\\\\\"Check for change after sending aMessage\\\\\\\"\\\\n\\\\t| returnValue newValue |\\\\n\\\\trecursionFlag ifTrue: [^ aMessage sentTo: tracedObject].\\\\n\\\\trecursionFlag _ true.\\\\n\\\\treturnValue _ aMessage sentTo: tracedObject.\\\\n\\\\tnewValue _ valueBlock value.\\\\n\\\\tnewValue = lastValue ifFalse:\\\\n\\\\t\\\\t[changeBlock value.\\\\n\\\\t\\\\tlastValue _ newValue].\\\\n\\\\trecursionFlag _ false.\\\\n\\\\t^ returnValue! !\\\\n\\\\n!ObjectViewer methodsFor: 'very few messages'!\\\\nxxxViewedObject: viewedObject evaluate: block1 wheneverChangeIn: block2\\\\n\\\\t\\\\\\\"This message name must not clash with any other (natch).\\\\\\\"\\\\n\\\\ttracedObject _ viewedObject.\\\\n\\\\tvalueBlock _ block2.\\\\n\\\\tchangeBlock _ block1.\\\\n\\\\trecursionFlag _ false! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nObjectViewer class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!ObjectViewer class methodsFor: 'instance creation'!\\\\non: viewedObject evaluate: block1 wheneverChangeIn: block2\\\\n\\\\t^ self new xxxViewedObject: viewedObject evaluate: block1 wheneverChangeIn: block2! !\\\\nObject subclass: #ObjectWithDocumentation\\\\n\\\\tinstanceVariableNames: 'authoringStamp properties elementSymbol naturalLanguageTranslations'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Protocols-Kernel'!\\\\n!ObjectWithDocumentation commentStamp: '<historical>' prior: 0!\\\\nObjectWithDocumentation - an abstract superclass for objects that allows maintenance of an authoring stamp, a body of documentation, and a properties dictionary.\\\\nThe Properties implementation has not happened yet -- it would closely mirror the implemenation of properties in the MorphExtension, for example.!\\\\n\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'accessing' stamp: 'mir 7/12/2004 21:21'!\\\\ndocumentation\\\\n\\\\t\\\\\\\"Answer the receiver's documentation\\\\\\\"\\\\n\\\\n\\\\t^self helpMessage! !\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'accessing' stamp: 'mir 7/12/2004 19:33'!\\\\ndocumentation: somethingUsefulHopefully\\\\n\\\\t\\\\\\\"Set the receiver's documentation, in the current langauge\\\\\\\"\\\\n\\\\n\\\\tself helpMessage: somethingUsefulHopefully! !\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'accessing' stamp: 'sw 8/18/2004 20:23'!\\\\nhelpMessage\\\\n\\\\t\\\\\\\"Check if there is a getterSetterHelpMessage. \\\\n\\\\tOtherwise try the normal help message or return nil.\\\\\\\"\\\\n\\\\n\\\\t^ self getterSetterHelpMessage\\\\n\\\\t\\\\tifNil: [(self propertyAt: #helpMessage ifAbsent:\\\\n\\\\t\\\\t\\\\t[self legacyHelpMessage ifNil: [^ nil]]) translated]! !\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'accessing' stamp: 'mir 7/12/2004 19:32'!\\\\nhelpMessage: somethingUsefulHopefully\\\\n\\\\t\\\\\\\"Set the receiver's documentation, in the current langauge\\\\\\\"\\\\n\\\\n\\\\tself propertyAt: #helpMessage put: somethingUsefulHopefully! !\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:39'!\\\\nlegacyHelpMessage\\\\n\\\\t\\\\\\\"If I have a help message stashed in my legacy naturalTranslations slot, answer its translated rendition, else answer nil.  If I *do* come across a legacy help message, transfer it to my properties dictionary.\\\\\\\"\\\\n\\\\n\\\\t| untranslated |\\\\n\\\\tnaturalLanguageTranslations isEmptyOrNil  \\\\\\\"only in legacy (pre-3.8) projects\\\\\\\"\\\\n\\\\t\\\\tifTrue: [^ nil].\\\\n\\\\tuntranslated := naturalLanguageTranslations first helpMessage ifNil: [^ nil].\\\\n\\\\tself propertyAt: #helpMessage put: untranslated.\\\\n\\\\tnaturalLanguageTranslations removeFirst.\\\\n\\\\tnaturalLanguageTranslations isEmpty ifTrue: [naturalLanguageTranslations := nil].\\\\n\\\\t^ untranslated translated! !\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'accessing' stamp: 'mir 7/12/2004 23:57'!\\\\nuntranslatedHelpMessage\\\\n\\\\t\\\\\\\"Check if there is a getterSetterHelpMessage. \\\\n\\\\tOtherwise try the normal help message or return nil.\\\\\\\"\\\\n\\\\n\\\\t^(self propertyAt: #getterSetterHelpMessage ifAbsent: [nil])\\\\n\\\\t\\\\tifNil: [(self propertyAt: #helpMessage ifAbsent: [nil])]! !\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'accessing' stamp: 'mir 7/12/2004 23:56'!\\\\nuntranslatedWording\\\\n\\\\t\\\\\\\"Answer the receiver's wording\\\\\\\"\\\\n\\\\n\\\\t^self propertyAt: #wording ifAbsent: [nil]! !\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'accessing' stamp: 'mir 7/12/2004 21:34'!\\\\nwording\\\\n\\\\t\\\\\\\"Answer the receiver's wording\\\\\\\"\\\\n\\\\n\\\\t| wording |\\\\n\\\\t(wording := self propertyAt: #wording ifAbsent: [nil])\\\\n\\\\t\\\\tifNotNil: [^wording translated].\\\\n\\\\n\\\\tself initWordingAndDocumentation.\\\\n\\\\t^self propertyAt: #wording ifAbsent: ['']! !\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'accessing' stamp: 'mir 7/12/2004 21:39'!\\\\nwording: aString\\\\n\\\\t\\\\\\\"Set the receiver's wording, in the current langauge\\\\\\\"\\\\n\\\\n\\\\tself propertyAt: #wording put: aString! !\\\\n\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'documentation' stamp: 'rbb 3/1/2005 11:02'!\\\\neditDescription\\\\n\\\\t\\\\\\\"Allow the user to see and edit the documentation for this object\\\\\\\"\\\\n\\\\t| reply helpMessage |\\\\n\\\\thelpMessage := self documentation isNil\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [String new]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self documentation].\\\\n\\\\treply := UIManager default\\\\n\\\\t\\\\t\\\\t\\\\tmultiLineRequest: 'Kindly edit the description' translated\\\\n\\\\t\\\\t\\\\t\\\\tcenterAt: Sensor cursorPoint\\\\n\\\\t\\\\t\\\\t\\\\tinitialAnswer: helpMessage\\\\n\\\\t\\\\t\\\\t\\\\tanswerHeight: 200.\\\\n\\\\treply isEmptyOrNil\\\\n\\\\t\\\\tifFalse: [self documentation: reply]! !\\\\n\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:39'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Initialize the receiver (automatically called when instances are created via 'new')\\\\\\\"\\\\n\\\\n\\\\tauthoringStamp := Utilities changeStampPerSe\\\\n! !\\\\n\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'migration' stamp: 'mir 7/12/2004 23:45'!\\\\nmigrateWordAndHelpMessage\\\\n\\\\t\\\\\\\"Migrate the English wording and help message to the new structure\\\\\\\"\\\\n\\\\n\\\\t| englishElement |\\\\n\\\\tself initWordingAndDocumentation.\\\\n\\\\t(self properties includes: #wording)\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\tenglishElement := self naturalLanguageTranslations\\\\n\\\\t\\\\t\\\\t\\\\tdetect: [:each | each language == #English] ifNone: [^nil].\\\\n\\\\t\\\\t\\\\tself wording: englishElement wording.\\\\n\\\\t\\\\t\\\\tself helpMessage: englishElement helpMessage]! !\\\\n\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'miscellaneous' stamp: 'sw 9/12/2001 23:03'!\\\\nelementSymbol\\\\n\\\\t\\\\\\\"Answer the receiver's element symbol\\\\\\\"\\\\n\\\\n\\\\t^ elementSymbol! !\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'miscellaneous' stamp: 'mir 7/12/2004 23:20'!\\\\nnaturalLanguageTranslations\\\\n\\\\t^naturalLanguageTranslations ifNil: [OrderedCollection new]! !\\\\n\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'private' stamp: 'mir 7/12/2004 21:28'!\\\\ngetterSetterHelpMessage\\\\n\\\\t\\\\\\\"Returns a helpMessage that has been computed previously and needs to be translated and then formatted with the elementSymbol.\\\\n\\\\t'get value of {1}' translated format: {elSym}\\\\\\\"\\\\n\\\\n\\\\t^(self propertyAt: #getterSetterHelpMessage ifAbsent: [^nil])\\\\n\\\\t\\\\ttranslated format: {self elementSymbol}! !\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'private' stamp: 'mir 7/12/2004 21:29'!\\\\ngetterSetterHelpMessage: aString\\\\n\\\\t\\\\\\\"Sets a helpMessage that needs to be translated and then formatted with the elementSymbol.\\\\n\\\\t'get value of {1}' translated format: {elSym}\\\\\\\"\\\\n\\\\n\\\\tself propertyAt: #getterSetterHelpMessage put: aString! !\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'private' stamp: 'mir 7/12/2004 21:31'!\\\\ninitWordingAndDocumentation\\\\n\\\\t\\\\\\\"Initialize wording and documentation (helpMessage) for getters and setters\\\\\\\"\\\\n\\\\n\\\\t| elSym |\\\\n\\\\telSym := self elementSymbol.\\\\n\\\\telSym\\\\n\\\\t\\\\tifNil: [^self].\\\\n\\\\n\\\\t((elSym beginsWith: 'get')\\\\n\\\\t\\\\tand: [elSym size > 3])\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\tself wording: (elSym allButFirst: 3) withFirstCharacterDownshifted.\\\\n\\\\t\\\\t\\\\tself getterSetterHelpMessage: 'get value of {1}']\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t((elSym beginsWith: 'set')\\\\n\\\\t\\\\t\\\\t\\\\tand: [elSym size > 4])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself wording: (elSym allButFirst: 3) withFirstCharacterDownshifted.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself getterSetterHelpMessage: 'set value of {1}']]! !\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'private' stamp: 'mir 7/12/2004 19:30'!\\\\nproperties\\\\n\\\\t^properties ifNil: [properties := Dictionary new]! !\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'private' stamp: 'mir 7/12/2004 19:30'!\\\\npropertyAt: key\\\\n\\\\t^self propertyAt: key ifAbsent: [nil]! !\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'private' stamp: 'mir 7/12/2004 19:29'!\\\\npropertyAt: key ifAbsent: aBlock\\\\n\\\\t^properties\\\\n\\\\t\\\\tifNil: aBlock\\\\n\\\\t\\\\tifNotNil: [properties at: key ifAbsent: aBlock]! !\\\\n\\\\n!ObjectWithDocumentation methodsFor: 'private' stamp: 'mir 7/12/2004 19:29'!\\\\npropertyAt: key put: aValue\\\\n\\\\tself properties at: key put: aValue! !\\\\nAbstractObjectsAsMethod subclass: #ObjectsAsMethodsExample\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Tests-ObjectsAsMethods'!\\\\n\\\\n!ObjectsAsMethodsExample methodsFor: 'as yet unclassified' stamp: 'ar 5/17/2003 20:16'!\\\\nadd: a with: b\\\\n\\\\t^a + b! !\\\\n\\\\n!ObjectsAsMethodsExample methodsFor: 'as yet unclassified' stamp: 'ar 5/17/2003 20:16'!\\\\nanswer42\\\\n\\\\t^42! !\\\\n\\\\n!ObjectsAsMethodsExample methodsFor: 'as yet unclassified' stamp: 'md 3/1/2006 19:37'!\\\\nrun: oldSelector with: arguments in: aReceiver\\\\n\\\\t^self perform: oldSelector withArguments: arguments! !\\\\nAlignmentMorph subclass: #ObjectsTool\\\\n\\\\tinstanceVariableNames: 'searchString modeSymbol'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-PartsBin'!\\\\n!ObjectsTool commentStamp: '<historical>' prior: 0!\\\\nI am a Master Parts Bin that allows the user to drag out a new Morph from a voluminous iconic list.\\\\n\\\\nChoose \\\\\\\"objects\\\\\\\" from the world menu, or type Alt-o (Cmd-o on the Mac).\\\\n\\\\nTo add a new kinds of Morphs:\\\\nIn the class of the Morph, implement the message:\\\\n\\\\ndescriptionForPartsBin\\\\n\\\\t^ self partName:\\\\t'Rectangle'\\\\n\\\\t\\\\tcategories:\\\\t\\\\t#('Graphics' ' Basic 1 ')\\\\n\\\\t\\\\tdocumentation:\\\\t'A rectangular shape, with border and fill style'\\\\n\\\\nThe partName is the title that will show in the lower pane of the Object Tool.\\\\nWhen is categories mode, an object can be seen in more than one category.  The list above tells which ones.\\\\nDocumentation is what will show in the balloon help for each object thumbnail.\\\\nThe message #initializeToStandAlone creates the actual instance.\\\\n\\\\nTo make a second variant object prototype coming from the same class, implement #supplementaryPartsDescriptions.  In it, you get to specify the nativitySelector.  It is sent to the class to get the variant objects.  Often it is #authoringPrototype.  (A class may supply supplementaryPartsDescriptions without implementing descriptionForPartsBin.  This gives you better control.)\\\\n\\\\n!\\\\n\\\\n\\\\n!ObjectsTool methodsFor: 'alphabetic' stamp: 'dgd 4/4/2006 16:43'!\\\\nalphabeticTabs\\\\n\\\\t\\\\\\\"Answer a list of buttons which, when hit, will trigger the choice of a morphic category\\\\\\\"\\\\n\\\\n\\\\t| buttonList aButton tabLabels |\\\\n\\\\n\\\\tself flag: #todo. \\\\\\\"includes non-english characters\\\\\\\"\\\\n\\\\ttabLabels _ (($a to: $z) collect: [:ch | ch asString]) asOrderedCollection.\\\\n\\\\n\\\\tbuttonList _ tabLabels collect:\\\\n\\\\t\\\\t[:catName |\\\\n\\\\t\\\\t\\\\taButton _ SimpleButtonMorph new label: catName.\\\\n\\\\t\\\\t\\\\taButton actWhen: #buttonDown.\\\\n\\\\t\\\\t\\\\taButton target: self; actionSelector: #showAlphabeticCategory:fromButton:; arguments: {catName. aButton}].\\\\n\\\\t^ buttonList\\\\n\\\\n\\\\\\\"ObjectsTool new tabsForMorphicCategories\\\\\\\"! !\\\\n\\\\n!ObjectsTool methodsFor: 'alphabetic' stamp: 'nk 9/3/2004 13:47'!\\\\ninstallQuads: quads fromButton: aButton\\\\n\\\\t\\\\\\\"Install items in the bottom pane that correspond to the given set of quads, as triggered from the given button\\\\\\\"\\\\n\\\\n\\\\t| aPartsBin sortedQuads oldResizing |\\\\n\\\\taPartsBin _ self partsBin.\\\\n\\\\toldResizing := aPartsBin vResizing.\\\\n\\\\taPartsBin removeAllMorphs.\\\\n\\\\tsortedQuads _ (PartsBin translatedQuads: quads)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tasSortedCollection: [:a :b | a third < b third].\\\\n\\\\taPartsBin listDirection: #leftToRight quadList: sortedQuads.\\\\n\\\\taButton ifNotNil: [self tabsPane highlightOnlySubmorph: aButton].\\\\n\\\\taPartsBin vResizing: oldResizing.\\\\n\\\\taPartsBin layoutChanged; fullBounds.\\\\n\\\\tself isFlap ifFalse: [ self minimizePartsBinSize ].! !\\\\n\\\\n!ObjectsTool methodsFor: 'alphabetic' stamp: 'nk 9/3/2004 12:13'!\\\\nshowAlphabeticTabs\\\\n\\\\t\\\\\\\"Switch to the mode of showing alphabetic tabs\\\\\\\"\\\\n\\\\n\\\\tmodeSymbol == #alphabetic ifTrue: [ ^self ].\\\\n\\\\tself partsBin removeAllMorphs.\\\\n\\\\tself initializeWithTabs: self alphabeticTabs.\\\\n\\\\tself modeSymbol: #alphabetic.\\\\n\\\\tself tabsPane submorphs first doButtonAction! !\\\\n\\\\n\\\\n!ObjectsTool methodsFor: 'categories' stamp: 'nk 9/3/2004 13:43'!\\\\nshowCategories\\\\n\\\\t\\\\\\\"Set the receiver up so that it shows tabs for each of the standard categories\\\\\\\"\\\\n\\\\n\\\\tmodeSymbol == #categories ifTrue: [ ^self ].\\\\n\\\\n\\\\tself partsBin removeAllMorphs.\\\\n\\\\tself initializeWithTabs: self tabsForCategories.\\\\n\\\\tself modeSymbol: #categories.\\\\n\\\\tself tabsPane submorphs first doButtonAction.\\\\n! !\\\\n\\\\n!ObjectsTool methodsFor: 'categories' stamp: 'nk 9/3/2004 13:51'!\\\\nshowCategory: aCategoryName fromButton: aButton \\\\n\\\\t\\\\\\\"Project items from the given category into my lower pane\\\\\\\"\\\\n\\\\t| quads |\\\\n\\\\tself partsBin removeAllMorphs.\\\\n\\\\tCursor wait\\\\n\\\\t\\\\tshowWhile: [quads := OrderedCollection new.\\\\n\\\\t\\\\t\\\\tMorph withAllSubclasses\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:aClass | aClass theNonMetaClass\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taddPartsDescriptorQuadsTo: quads\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tif: [:aDescription | aDescription translatedCategories includes: aCategoryName]].\\\\n\\\\t\\\\t\\\\tquads := quads\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tasSortedCollection: [:q1 :q2 | q1 third <= q2 third].\\\\n\\\\t\\\\t\\\\tself installQuads: quads fromButton: aButton]! !\\\\n\\\\n!ObjectsTool methodsFor: 'categories' stamp: 'nk 8/23/2004 18:18'!\\\\ntabsForCategories\\\\n\\\\t\\\\\\\"Answer a list of buttons which, when hit, will trigger the choice of a category\\\\\\\"\\\\n\\\\n\\\\t| buttonList aButton classes categoryList basic |\\\\n\\\\tclasses _ Morph withAllSubclasses.\\\\n\\\\tcategoryList _ Set new.\\\\n\\\\tclasses do: [:aClass |\\\\n\\\\t\\\\t(aClass class includesSelector: #descriptionForPartsBin) ifTrue:\\\\n\\\\t\\\\t\\\\t[categoryList addAll: aClass descriptionForPartsBin translatedCategories].\\\\n\\\\t\\\\t(aClass class includesSelector: #supplementaryPartsDescriptions) ifTrue:\\\\n\\\\t\\\\t\\\\t[aClass supplementaryPartsDescriptions do:\\\\n\\\\t\\\\t\\\\t\\\\t[:aDescription | categoryList addAll: aDescription translatedCategories]]].\\\\n\\\\n\\\\tcategoryList _ OrderedCollection withAll: (categoryList asSortedArray).\\\\n\\\\t\\\\n\\\\tbasic := categoryList remove: ' Basic' translated ifAbsent: [ ].\\\\n\\\\tbasic ifNotNil: [ categoryList addFirst: basic ].\\\\n\\\\n\\\\tbasic := categoryList remove: 'Basic' translated ifAbsent: [ ].\\\\n\\\\tbasic ifNotNil: [ categoryList addFirst: basic ].\\\\n\\\\n\\\\tbuttonList _ categoryList collect:\\\\n\\\\t\\\\t[:catName |\\\\n\\\\t\\\\t\\\\taButton _ SimpleButtonMorph new label: catName.\\\\n\\\\t\\\\t\\\\taButton actWhen: #buttonDown.\\\\n\\\\t\\\\t\\\\taButton target: self; actionSelector: #showCategory:fromButton:; arguments: {catName. aButton}].\\\\n\\\\t^ buttonList\\\\n\\\\n\\\\\\\"ObjectsTool new tabsForCategories\\\\\\\"! !\\\\n\\\\n\\\\n!ObjectsTool methodsFor: 'initialization' stamp: 'nk 9/3/2004 13:46'!\\\\ninitializeForFlap\\\\n\\\\t\\\\\\\"Initialize the receiver to operate in a flap at the top of the screen.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"\\\\n\\\\tFlaps newObjectsFlap openInWorld\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t| buttonPane aBin aColor heights tabsPane |\\\\n\\\\tself basicInitialize.\\\\n\\\\n\\\\tself layoutInset: 0;\\\\n\\\\t\\\\tlayoutPolicy: ProportionalLayout new;\\\\n\\\\t\\\\thResizing: #shrinkWrap;\\\\n\\\\t\\\\tvResizing: #rigid;\\\\n\\\\t\\\\tborderWidth: 2; borderColor: Color darkGray;\\\\n\\\\t\\\\textent: (self minimumWidth @ self minimumHeight).\\\\n\\\\n\\\\t\\\\\\\"mode buttons\\\\\\\"\\\\n\\\\tbuttonPane := self paneForTabs: self modeTabs.\\\\n\\\\tbuttonPane\\\\n\\\\t\\\\tvResizing: #shrinkWrap;\\\\n\\\\t\\\\tsetNameTo: 'ButtonPane';\\\\n\\\\t\\\\tcolor: (aColor := buttonPane color) darker;\\\\n\\\\t\\\\tlayoutInset: 6;\\\\n\\\\t\\\\twrapDirection: nil;\\\\n\\\\t\\\\twidth: self width;\\\\n\\\\t\\\\tlayoutChanged; fullBounds.\\\\n\\\\n\\\\t\\\\\\\"Place holder for a tabs or text pane\\\\\\\"\\\\n\\\\ttabsPane := Morph new\\\\n\\\\t\\\\tsetNameTo: 'TabPane';\\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tyourself.\\\\n\\\\n\\\\theights := { buttonPane height. 40 }.\\\\n\\\\n\\\\tbuttonPane vResizing: #spaceFill.\\\\n\\\\tself\\\\n\\\\t\\\\taddMorph: buttonPane\\\\n\\\\t\\\\tfullFrame: (LayoutFrame\\\\n\\\\t\\\\t\\\\t\\\\tfractions: (0 @ 0 corner: 1 @ 0)\\\\n\\\\t\\\\t\\\\t\\\\toffsets: (0 @ 0 corner: 0 @ heights first)).\\\\n\\\\n\\\\tself\\\\n\\\\t\\\\taddMorph: tabsPane\\\\n\\\\t\\\\tfullFrame: (LayoutFrame\\\\n\\\\t\\\\t\\\\t\\\\tfractions: (0 @ 0 corner: 1 @ 0)\\\\n\\\\t\\\\t\\\\t\\\\toffsets: (0 @ heights first corner: 0 @ (heights first + heights second))).\\\\n\\\\n\\\\taBin := (PartsBin newPartsBinWithOrientation: #leftToRight from: #())\\\\n\\\\t\\\\tlistDirection: #leftToRight;\\\\n\\\\t\\\\twrapDirection: #topToBottom;\\\\n\\\\t\\\\tcolor: aColor lighter lighter;\\\\n\\\\t\\\\tsetNameTo: 'Parts';\\\\n\\\\t\\\\tdropEnabled: false;\\\\n\\\\t\\\\tvResizing: #spaceFill;\\\\n\\\\t\\\\tyourself.\\\\n\\\\n\\\\tself\\\\n\\\\t\\\\taddMorph: aBin\\\\n\\\\t\\\\tfullFrame: (LayoutFrame\\\\n\\\\t\\\\t\\\\t\\\\tfractions: (0 @ 0 corner: 1 @ 1)\\\\n\\\\t\\\\t\\\\t\\\\toffsets: (0 @ (heights first + heights second) corner: 0 @ 0)).\\\\n\\\\n\\\\taBin color: (Color orange muchLighter);\\\\n\\\\t\\\\tsetNameTo: 'Objects' translated.\\\\n\\\\n\\\\tself color: (Color orange muchLighter);\\\\n\\\\t\\\\tsetNameTo: 'Objects' translated.\\\\n! !\\\\n\\\\n!ObjectsTool methodsFor: 'initialization' stamp: 'dgd 4/4/2006 16:47'!\\\\ninitializeToStandAlone\\\\n\\\\t\\\\\\\"Initialize the receiver so that it can live as a stand-alone morph\\\\\\\"\\\\n\\\\t| buttonPane aBin aColor heights tabsPane |\\\\n\\\\tself basicInitialize.\\\\n\\\\n\\\\tself layoutInset: 0;\\\\n\\\\t\\\\tlayoutPolicy: ProportionalLayout new;\\\\n\\\\t\\\\tuseRoundedCorners;\\\\n\\\\t\\\\thResizing: #rigid;\\\\n\\\\t\\\\tvResizing: #rigid;\\\\n\\\\t\\\\textent: (self minimumWidth @ self minimumHeight).\\\\n\\\\n\\\\t\\\\\\\"mode buttons\\\\\\\"\\\\n\\\\tbuttonPane := self paneForTabs: self modeTabs.\\\\n\\\\tbuttonPane color: ColorTheme current dialogColor.\\\\n\\\\tbuttonPane\\\\n\\\\t\\\\tvResizing: #shrinkWrap;\\\\n\\\\t\\\\tsetNameTo: 'ButtonPane';\\\\n\\\\t\\\\taddMorphFront: self dismissButton;\\\\n\\\\t\\\\taddMorphBack: self helpButton;\\\\n\\\\t\\\\tcolor: (aColor := buttonPane color) darker;\\\\n\\\\t\\\\tlayoutInset: 5;\\\\n\\\\t\\\\twrapDirection: nil;\\\\n\\\\t\\\\twidth: self width;\\\\n\\\\t\\\\tlayoutChanged; fullBounds.\\\\n\\\\n\\\\t\\\\\\\"Place holder for a tabs or text pane\\\\\\\"\\\\n\\\\ttabsPane := Morph new.\\\\n\\\\ttabsPane\\\\n\\\\t\\\\tcolor: ColorTheme current dialogColor;\\\\n\\\\t\\\\tsetNameTo: 'TabPane';\\\\n\\\\t\\\\thResizing: #spaceFill.\\\\n\\\\n\\\\theights := { buttonPane height. 40 }.\\\\n\\\\n\\\\tbuttonPane vResizing: #spaceFill.\\\\n\\\\tself\\\\n\\\\t\\\\taddMorph: buttonPane\\\\n\\\\t\\\\tfullFrame: (LayoutFrame\\\\n\\\\t\\\\t\\\\t\\\\tfractions: (0 @ 0 corner: 1 @ 0)\\\\n\\\\t\\\\t\\\\t\\\\toffsets: (0 @ 0 corner: 0 @ heights first)).\\\\n\\\\n\\\\tself\\\\n\\\\t\\\\taddMorph: tabsPane\\\\n\\\\t\\\\tfullFrame: (LayoutFrame\\\\n\\\\t\\\\t\\\\t\\\\tfractions: (0 @ 0 corner: 1 @ 0)\\\\n\\\\t\\\\t\\\\t\\\\toffsets: (0 @ heights first corner: 0 @ (heights first + heights second))).\\\\n\\\\n\\\\taBin := (PartsBin newPartsBinWithOrientation: #leftToRight from: #())\\\\n\\\\t\\\\tlistDirection: #leftToRight;\\\\n\\\\t\\\\twrapDirection: #topToBottom;\\\\n\\\\t\\\\tcolor: aColor lighter lighter;\\\\n\\\\t\\\\tsetNameTo: 'Parts';\\\\n\\\\t\\\\tdropEnabled: false;\\\\n\\\\t\\\\tvResizing: #spaceFill;\\\\n\\\\t\\\\tyourself.\\\\n\\\\n\\\\tself\\\\n\\\\t\\\\taddMorph: aBin\\\\n\\\\t\\\\tfullFrame: (LayoutFrame\\\\n\\\\t\\\\t\\\\t\\\\tfractions: (0 @ 0 corner: 1 @ 1)\\\\n\\\\t\\\\t\\\\t\\\\toffsets: (0 @ (heights first + heights second) corner: 0 @ 0)).\\\\n\\\\n\\\\tself\\\\n\\\\t\\\\tborderWidth: ColorTheme current dialogBorderWidth;\\\\n\\\\t\\\\tborderColor: ColorTheme current dialogBorderColor;\\\\n\\\\t\\\\tcolor: ColorTheme current dialogColor;\\\\n\\\\t\\\\tsetNameTo: 'Objects' translated;\\\\n\\\\t\\\\tshowCategories.\\\\n! !\\\\n\\\\n!ObjectsTool methodsFor: 'initialization' stamp: 'dgd 4/4/2006 16:45'!\\\\ntweakAppearanceAfterModeShift\\\\n\\\\t\\\\\\\"After the receiver has been put into a given mode, make an initial selection of category, if appropriate, and highlight the mode button.\\\\\\\"\\\\n\\\\n\\\\tself buttonPane submorphs do:\\\\n\\\\t\\\\t[:aButton | \\\\n\\\\t\\\\t\\\\t| aColor |\\\\n\\\\t\\\\t\\\\t\\\\\\\"aButton borderWidth: 1.\\\\\\\"\\\\n\\\\t\\\\t\\\\taColor := (aButton valueOfProperty: #modeSymbol) = modeSymbol\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [Color red]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [Color black].\\\\n\\\\n\\\\t\\\\t\\\\taButton firstSubmorph color: aColor.\\\\n\\\\t\\\\t\\\\taButton borderColor: aColor.\\\\n\\\\t\\\\t].! !\\\\n\\\\n\\\\n!ObjectsTool methodsFor: 'layout' stamp: 'nk 9/3/2004 12:35'!\\\\nextent: anExtent\\\\n\\\\t\\\\\\\"The user has dragged the grow box such that the receiver's extent would be anExtent.  Do what's needed\\\\\\\"\\\\n\\\\tself extent = anExtent ifTrue: [ ^self ].\\\\n\\\\tsuper extent: anExtent.\\\\n\\\\tself fixLayoutFrames.! !\\\\n\\\\n!ObjectsTool methodsFor: 'layout' stamp: 'nk 9/3/2004 13:44'!\\\\nfixLayoutFrames\\\\n\\\\t\\\\\\\"Adjust the boundary between the tabs or search pane and the parts bin, giving preference to the tabs.\\\\\\\"\\\\n\\\\n\\\\t| oldY newY tp tpHeight |\\\\n\\\\toldY := ((tp := self tabsPane\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifNil: [self searchPane])\\\\n\\\\t\\\\t\\\\t\\\\tifNil: [^ self]) layoutFrame bottomOffset.\\\\n\\\\ttpHeight := tp hasSubmorphs\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [(tp submorphBounds outsetBy: tp layoutInset) height]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [tp height].\\\\n\\\\tnewY := (self buttonPane\\\\n\\\\t\\\\t\\\\t\\\\tifNil: [^ self]) height + tpHeight.\\\\n\\\\toldY = newY\\\\n\\\\t\\\\tifTrue: [^ self].\\\\n\\\\ttp layoutFrame bottomOffset: newY.\\\\n\\\\t(self partsBin\\\\n\\\\t\\\\tifNil: [^ self]) layoutFrame topOffset: newY.\\\\n\\\\tsubmorphs\\\\n\\\\t\\\\tdo: [:m | m layoutChanged ]! !\\\\n\\\\n!ObjectsTool methodsFor: 'layout' stamp: 'nk 9/3/2004 13:47'!\\\\nminimizePartsBinSize\\\\n\\\\tself layoutChanged; fullBounds.\\\\n\\\\tself fixLayoutFrames.\\\\n\\\\tself setExtentFromHalo: (self minimumWidth @ self minimumHeight) ! !\\\\n\\\\n!ObjectsTool methodsFor: 'layout' stamp: 'nk 9/3/2004 10:35'!\\\\nminimumBottom\\\\n\\\\t| iconsBottom partsBin |\\\\n\\\\tpartsBin := self partsBin ifNil: [ ^self bottom ].\\\\n\\\\ticonsBottom := partsBin submorphs isEmpty\\\\n\\\\t\\\\tifTrue: [ partsBin top + 60 ]\\\\n\\\\t\\\\tifFalse: [ partsBin submorphBounds bottom + partsBin layoutInset ].\\\\n\\\\n\\\\t^iconsBottom + self layoutInset + self borderWidth! !\\\\n\\\\n!ObjectsTool methodsFor: 'layout' stamp: 'nk 9/3/2004 11:53'!\\\\nminimumHeight\\\\n\\\\t^(self minimumBottom - self top) max: 280! !\\\\n\\\\n!ObjectsTool methodsFor: 'layout' stamp: 'nk 9/3/2004 12:06'!\\\\nminimumWidth\\\\n\\\\t\\\\\\\"Answer a width that assures that the alphabet fits in two rows\\\\\\\"\\\\n\\\\n\\\\t^ 300! !\\\\n\\\\n!ObjectsTool methodsFor: 'layout' stamp: 'nk 9/3/2004 12:40'!\\\\nposition: aPoint\\\\n\\\\t\\\\\\\"The user has dragged the grow box such that the receiver's extent would be anExtent.  Do what's needed\\\\\\\"\\\\n\\\\tself position = aPoint ifTrue: [ ^self ].\\\\n\\\\tsuper position: aPoint.\\\\n\\\\tself fixLayoutFrames.! !\\\\n\\\\n!ObjectsTool methodsFor: 'layout' stamp: 'nk 9/3/2004 12:44'!\\\\nsetExtentFromHalo: anExtent\\\\n\\\\t\\\\\\\"The user has dragged the grow box such that the receiver's extent would be anExtent.  Do what's needed\\\\\\\"\\\\n\\\\tsuper setExtentFromHalo: ((anExtent x max: self minimumWidth) @ (anExtent y max: self minimumHeight)).\\\\n! !\\\\n\\\\n\\\\n!ObjectsTool methodsFor: 'major modes' stamp: 'sw 8/12/2001 16:30'!\\\\nmodeSymbol\\\\n\\\\t\\\\\\\"Answer the modeSymbol\\\\\\\"\\\\n\\\\n\\\\t^ modeSymbol! !\\\\n\\\\n!ObjectsTool methodsFor: 'major modes' stamp: 'nk 9/3/2004 13:32'!\\\\nmodeSymbol: aSymbol\\\\n\\\\t\\\\\\\"Set the receiver's modeSymbol as indicated\\\\\\\"\\\\n\\\\n\\\\tmodeSymbol _ aSymbol.\\\\n\\\\tself tweakAppearanceAfterModeShift.\\\\n! !\\\\n\\\\n!ObjectsTool methodsFor: 'major modes' stamp: 'dgd 4/4/2006 16:47'!\\\\nmodeTabs\\\\n\\\\t\\\\\\\"Answer a list of buttons which, when hit, will trigger the choice of mode of the receiver\\\\\\\"\\\\n\\\\n\\\\t| buttonList aButton tupleList |\\\\n\\\\ttupleList _  #(\\\\n\\\\t\\\\t('alphabetic'\\\\t\\\\talphabetic\\\\tshowAlphabeticTabs\\\\t'A separate tab for each letter of the alphabet')\\\\n\\\\t\\\\t('find'\\\\t\\\\t\\\\t\\\\tsearch\\\\t\\\\t\\\\tshowSearchPane\\\\t\\\\t\\\\t'Provides a type-in pane allowing you to match')\\\\n\\\\t\\\\t('categories'\\\\t\\\\tcategories\\\\tshowCategories\\\\t\\\\t\\\\t'Grouped by category')\\\\n\\\\n\\\\t\\\\t\\\\\\\"('standard'\\\\t\\\\tstandard\\\\t\\\\tshowStandardPane\\\\t\\\\t'Standard Squeak tools supplies for building')\\\\\\\"\\\\n\\\\t).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\n\\\\tbuttonList _ tupleList collect:\\\\n\\\\t\\\\t[:tuple |\\\\n\\\\t\\\\t\\\\taButton _ SimpleButtonMorph new label: tuple first translated.\\\\n\\\\t\\\\t\\\\taButton actWhen: #buttonUp.\\\\n\\\\t\\\\t\\\\taButton setProperty: #modeSymbol toValue: tuple second.\\\\n\\\\t\\\\t\\\\taButton target: self; actionSelector: tuple third.\\\\n\\\\t\\\\t\\\\taButton setBalloonText: tuple fourth translated.\\\\n\\\\t\\\\t\\\\taButton borderWidth: 0.\\\\n\\\\t\\\\t\\\\taButton].\\\\n\\\\t^ buttonList\\\\n\\\\n\\\\\\\"ObjectsTool new modeTabs\\\\\\\"! !\\\\n\\\\n\\\\n!ObjectsTool methodsFor: 'menu' stamp: 'dgd 8/30/2003 16:22'!\\\\naddCustomMenuItems: aMenu hand: aHand\\\\n\\\\t\\\\\\\"Add items to the given halo-menu, given a hand\\\\\\\"\\\\n\\\\n\\\\tsuper addCustomMenuItems: aMenu hand: aHand.\\\\n\\\\taMenu addLine.\\\\n\\\\taMenu add: 'alphabetic' translated target: self selector: #showAlphabeticTabs.\\\\n\\\\taMenu add: 'find' translated target: self selector: #showSearchPane.\\\\n\\\\taMenu add: 'categories' translated target: self selector: #showCategories.\\\\n\\\\taMenu addLine.\\\\n\\\\taMenu add: 'reset thumbnails' translated target: self selector: #resetThumbnails.! !\\\\n\\\\n!ObjectsTool methodsFor: 'menu' stamp: 'nk 9/7/2003 07:42'!\\\\nresetThumbnails\\\\n\\\\t\\\\\\\"Reset the thumbnail cache\\\\\\\"\\\\n\\\\n\\\\tPartsBin clearThumbnailCache.\\\\n\\\\tmodeSymbol == #categories ifTrue: [self showCategories] ifFalse: [self showAlphabeticTabs]! !\\\\n\\\\n\\\\n!ObjectsTool methodsFor: 'search' stamp: 'nk 9/3/2004 11:20'!\\\\nnewSearchPane\\\\n\\\\t\\\\\\\"Answer a type-in pane for searches\\\\\\\"\\\\n\\\\n\\\\t| aTextMorph |\\\\n\\\\taTextMorph _ TextMorph new\\\\n\\\\t\\\\tsetProperty: #defaultContents toValue: ('' asText allBold addAttribute: (TextFontChange font3));\\\\n\\\\t\\\\tsetTextStyle: (TextStyle fontArray: { Preferences standardEToysFont });\\\\n\\\\t\\\\tsetDefaultContentsIfNil;\\\\n\\\\t\\\\ton: #keyStroke send: #searchPaneCharacter: to: self;\\\\n\\\\t\\\\tsetNameTo: 'SearchPane';\\\\n\\\\t\\\\tsetBalloonText: 'Type here and all entries that match will be shown.' translated;\\\\n\\\\t\\\\tvResizing: #shrinkWrap;\\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tmargins: 4@6;\\\\n\\\\t\\\\tbackgroundColor: Color white.\\\\n\\\\t^ aTextMorph! !\\\\n\\\\n!ObjectsTool methodsFor: 'search' stamp: 'sw 6/30/2001 14:26'!\\\\nsearchPaneCharacter: evt\\\\n\\\\t\\\\\\\"A character represented by the event handed in was typed in the search pane by the user\\\\\\\"\\\\n\\\\n\\\\t^ self showMorphsMatchingSearchString\\\\n\\\\n\\\\\\\"\\\\t| char |  *** The variant below only does a new search if RETURN or ENTER is hit ***\\\\n\\\\tchar _ evt keyCharacter.\\\\n\\\\t(char == Character enter or: [char == Character cr]) ifTrue:\\\\n\\\\t\\\\t[self showMorphsMatchingSearchString]\\\\\\\"! !\\\\n\\\\n!ObjectsTool methodsFor: 'search' stamp: 'nk 9/3/2004 10:39'!\\\\nsetSearchStringFromSearchPane\\\\n\\\\t\\\\\\\"Set the search string by obtaining its contents from the search pane, and doing a certain amount of munging\\\\\\\"\\\\n\\\\n\\\\tsearchString _ self searchPane text string asLowercase withBlanksTrimmed.\\\\n\\\\tsearchString _ searchString copyWithoutAll: {Character enter. Character cr}! !\\\\n\\\\n!ObjectsTool methodsFor: 'search' stamp: 'nk 9/3/2004 13:51'!\\\\nshowMorphsMatchingSearchString\\\\n\\\\t\\\\\\\"Put items matching the search string into my lower pane\\\\\\\"\\\\n\\\\t| quads |\\\\n\\\\tself setSearchStringFromSearchPane.\\\\n\\\\tself partsBin removeAllMorphs.\\\\n\\\\tCursor wait\\\\n\\\\t\\\\tshowWhile: [quads := OrderedCollection new.\\\\n\\\\t\\\\t\\\\tMorph withAllSubclasses\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:aClass | aClass\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taddPartsDescriptorQuadsTo: quads\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tif: [:info | info formalName translated includesSubstring: searchString caseSensitive: false]].\\\\n\\\\t\\\\t\\\\tself installQuads: quads fromButton: nil]! !\\\\n\\\\n!ObjectsTool methodsFor: 'search' stamp: 'nk 9/3/2004 12:13'!\\\\nshowSearchPane\\\\n\\\\t\\\\\\\"Set the receiver up so that it shows the search pane\\\\\\\"\\\\n\\\\n\\\\t| tabsPane aPane frame |\\\\n\\\\tmodeSymbol == #search ifTrue: [ ^self ].\\\\n\\\\n\\\\tself partsBin removeAllMorphs.\\\\n\\\\n\\\\ttabsPane := self tabsPane.\\\\n\\\\taPane _ self newSearchPane.\\\\n\\\\taPane layoutChanged; fullBounds.\\\\n\\\\n\\\\taPane layoutFrame: (frame := tabsPane layoutFrame copy).\\\\n\\\\tframe bottomOffset: (frame topOffset + aPane height).\\\\n\\\\tself replaceSubmorph: tabsPane by: aPane.\\\\n\\\\tself partsBin layoutFrame topOffset: frame bottomOffset.\\\\n\\\\n\\\\tself modeSymbol: #search.\\\\n\\\\tself showMorphsMatchingSearchString.\\\\n\\\\tActiveHand newKeyboardFocus: aPane! !\\\\n\\\\n\\\\n!ObjectsTool methodsFor: 'submorph access' stamp: 'nk 9/3/2004 08:06'!\\\\nbuttonPane\\\\n\\\\t\\\\\\\"Answer the receiver's button pane, nil if none\\\\\\\"\\\\n\\\\n\\\\t^ self submorphNamed: 'ButtonPane' ifNone: [].! !\\\\n\\\\n!ObjectsTool methodsFor: 'submorph access' stamp: 'nk 9/3/2004 08:09'!\\\\npartsBin\\\\n\\\\t^self findDeeplyA: PartsBin.! !\\\\n\\\\n!ObjectsTool methodsFor: 'submorph access' stamp: 'nk 9/3/2004 10:40'!\\\\nsearchPane\\\\n\\\\t\\\\\\\"Answer the receiver's search pane, nil if none\\\\\\\"\\\\n\\\\n\\\\t^ self submorphNamed: 'SearchPane' ifNone: [].! !\\\\n\\\\n!ObjectsTool methodsFor: 'submorph access' stamp: 'nk 9/3/2004 13:51'!\\\\nshowAlphabeticCategory: aString fromButton: aButton \\\\n\\\\t\\\\\\\"Blast items beginning with a given letter into my lower pane\\\\\\\"\\\\n\\\\t| eligibleClasses quads uc |\\\\n\\\\tself partsBin removeAllMorphs.\\\\n\\\\tuc := aString asUppercase asCharacter.\\\\n\\\\tCursor wait\\\\n\\\\t\\\\tshowWhile: [eligibleClasses := Morph withAllSubclasses.\\\\n\\\\t\\\\t\\\\tquads := OrderedCollection new.\\\\n\\\\t\\\\t\\\\teligibleClasses\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:aClass | aClass theNonMetaClass\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taddPartsDescriptorQuadsTo: quads\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tif: [:info | info formalName translated asUppercase first = uc]].\\\\n\\\\t\\\\t\\\\tself installQuads: quads fromButton: aButton]! !\\\\n\\\\n!ObjectsTool methodsFor: 'submorph access' stamp: 'nk 9/3/2004 08:06'!\\\\ntabsPane\\\\n\\\\t\\\\\\\"Answer the receiver's tabs pane, nil if none\\\\\\\"\\\\n\\\\n\\\\t^ self submorphNamed: 'TabPane' ifNone: [].! !\\\\n\\\\n\\\\n!ObjectsTool methodsFor: 'tabs' stamp: 'nk 9/3/2004 13:47'!\\\\ninitializeWithTabs: tabList\\\\n\\\\t\\\\\\\"Initialize the receiver to have the given tabs\\\\\\\"\\\\n\\\\t| oldPane newPane |\\\\n\\\\toldPane := self tabsPane ifNil: [ self searchPane ].\\\\n\\\\tnewPane := (self paneForTabs: tabList)\\\\n\\\\t\\\\tsetNameTo: 'TabPane';\\\\n\\\\t\\\\tyourself.\\\\n\\\\tnewPane layoutFrame: oldPane layoutFrame.\\\\n\\\\tself replaceSubmorph: oldPane by: newPane.\\\\n\\\\tnewPane layoutChanged; fullBounds.\\\\n\\\\tself fixLayoutFrames.\\\\n\\\\n! !\\\\n\\\\n!ObjectsTool methodsFor: 'tabs' stamp: 'dgd 4/4/2006 16:44'!\\\\npaneForTabs: tabList \\\\n\\\\t\\\\\\\"Answer a pane bearing tabs for the given list\\\\\\\"\\\\n\\\\t| aPane |\\\\n\\\\ttabList do: [:t |\\\\n\\\\t\\\\t\\\\tt color: Color transparent.\\\\n\\\\t\\\\t\\\\tt borderWidth: 1;\\\\n\\\\t\\\\t\\\\t\\\\tborderColor: Color black].\\\\n\\\\n\\\\taPane := AlignmentMorph newRow\\\\n\\\\t\\\\t\\\\t\\\\tcolor: ColorTheme current dialogColor;\\\\n\\\\t\\\\t\\\\t\\\\tlistDirection: #leftToRight;\\\\n\\\\t\\\\t\\\\t\\\\twrapDirection: #topToBottom;\\\\n\\\\t\\\\t\\\\t\\\\tvResizing: #spaceFill;\\\\n\\\\t\\\\t\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\t\\\\t\\\\tcellInset: 6;\\\\n\\\\t\\\\t\\\\t\\\\tlayoutInset: 4;\\\\n\\\\t\\\\t\\\\t\\\\tlistCentering: #center;\\\\n\\\\t\\\\t\\\\t\\\\tlistSpacing: #equal;\\\\n\\\\t\\\\t\\\\t\\\\taddAllMorphs: tabList;\\\\n\\\\t\\\\t\\\\t\\\\tyourself.\\\\n\\\\n\\\\taPane width: self layoutBounds width.\\\\n\\\\n\\\\t^ aPane! !\\\\n\\\\n!ObjectsTool methodsFor: 'tabs' stamp: 'dgd 8/30/2003 16:09'!\\\\npresentHelp\\\\n\\\\t\\\\\\\"Sent when a Help button is hit; provide the user with some form of help for the tool at hand\\\\\\\"\\\\n\\\\n'The Objects tool allows you to browse through, and obtain copies of, many kinds of objects.  \\\\n\\\\nYou can obtain an Objects tool by choosing \\\\\\\"Objects\\\\\\\" from the world menu, or by the shortcut of typing alt-o (cmd-o) any time the cursor is over the desktop.\\\\n\\\\nThere are three ways to use Objects, corresponding to the three tabs seen at the top:\\\\n\\\\nalphabetic - gives you separate tabs for a, b, c, etc.  Click any tab, and you will see the icons of all the objects whose names begin with that letter\\\\n\\\\nsearch - gives you a type-in pane for a search string.  Type any letters there, and icons of all the objects whose names match what you have typed will appear in the bottom pane.\\\\n\\\\ncategories - provides tabs representing categories of related items.  Click on any tab to see the icons of all the objects in the category.\\\\n\\\\nWhen the cursor lingers over the icon of any object, you will get balloon help for the item.\\\\n\\\\nWhen you drag an icon from Objects, it will result in a new copy of it in your hand; the new object will be deposited wherever you next click.' translated\\\\n\\\\n\\\\topenInWorkspaceWithTitle: 'About Objects' translated! !\\\\n\\\\n\\\\n!ObjectsTool methodsFor: 'thumbnail' stamp: 'dgd 9/22/2004 19:28'!\\\\nicon\\\\n\\\\t\\\\\\\"Answer a form with an icon to represent the receiver\\\\\\\"\\\\n\\\\t^ MenuIcons objectCatalogIcon! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nObjectsTool class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!ObjectsTool class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 10:45'!\\\\ninitialize\\\\n\\\\n\\\\tself registerInFlapsRegistry.\\\\t! !\\\\n\\\\n!ObjectsTool class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 10:47'!\\\\nregisterInFlapsRegistry\\\\n\\\\t\\\\\\\"Register the receiver in the system's flaps registry\\\\\\\"\\\\n\\\\tself environment\\\\n\\\\t\\\\tat: #Flaps\\\\n\\\\t\\\\tifPresent: [:cl | cl registerQuad: #(ObjectsTool\\\\t\\\\t\\\\tnewStandAlone\\\\t\\\\t\\\\t\\\\t'Object Catalog'\\\\t\\\\t'A tool that lets you browse the catalog of objects')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'PlugIn Supplies'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcl registerQuad: #(ObjectsTool\\\\t\\\\tnewStandAlone\\\\t\\\\t\\\\t\\\\t'Object Catalog'\\\\t\\\\t'A tool that lets you browse the catalog of objects')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'Widgets'.]! !\\\\n\\\\n!ObjectsTool class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 12:37'!\\\\nunload\\\\n\\\\t\\\\\\\"Unload the receiver from global registries\\\\\\\"\\\\n\\\\n\\\\tself environment at: #Flaps ifPresent: [:cl |\\\\n\\\\tcl unregisterQuadsWithReceiver: self] ! !\\\\n\\\\n\\\\n!ObjectsTool class methodsFor: 'parts bin' stamp: 'sw 8/11/2001 20:16'!\\\\ndescriptionForPartsBin\\\\n\\\\t^ self partName:\\\\t'Objects'\\\\n\\\\t\\\\tcategories:\\\\t\\\\t#('Useful')\\\\n\\\\t\\\\tdocumentation:\\\\t'A place to obtain many kinds of objects'! !\\\\nOldSocket subclass: #OldSimpleClientSocket\\\\n\\\\tinstanceVariableNames: 'buffer bufferPos'\\\\n\\\\tclassVariableNames: 'CR CrLf LF'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Network-Kernel'!\\\\n!OldSimpleClientSocket commentStamp: '<historical>' prior: 0!\\\\nThis class supports client for simple network protocols based on sending textual commands and responses. Examples of such protocols include POP3 (mail retrieval), SMTP (mail posting), HTTP (web browsing), and NTTP (network news). Some simple examples are presented as class methods, but a full-service client of some service should be implemented as a subclass.\\\\n\\\\nThe basic services provided by this class are:\\\\n\\\\tsendCommand:\\\\t\\\\t\\\\t-- sends a command line terminate with <CR><LF>\\\\n\\\\tgetResponse\\\\t\\\\t\\\\t\\\\t-- gets a single-line response to a command\\\\n\\\\tgetMultilineResponse\\\\t-- gets a multiple line response terminated by a period\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t-- on a line by itself\\\\n\\\\nThere are variants of the getResponse commands that display lines on the screen as they are being received. Linefeeds are stripped out of all responses.\\\\n\\\\nThe 'get' commands above make use of an internal buffer.  So intermixing these two commands and regular Socket recieve commands can cause problems.!\\\\n\\\\n\\\\n!OldSimpleClientSocket methodsFor: 'as yet unclassified' stamp: 'di 4/13/1999 14:43'!\\\\ndisplayString: aString\\\\n\\\\t\\\\\\\"Display the given string on the Display. Used for testing.\\\\\\\"\\\\n\\\\n\\\\t| s |\\\\n\\\\taString isEmpty ifTrue: [^ self].\\\\n\\\\taString size > 60\\\\n\\\\t\\\\tifTrue: [s _ aString copyFrom: 1 to: 60]  \\\\\\\"limit to 60 characters\\\\\\\"\\\\n\\\\t\\\\tifFalse: [s _ aString].\\\\n\\\\n\\\\ts displayOn: Display.\\\\n! !\\\\n\\\\n!OldSimpleClientSocket methodsFor: 'as yet unclassified' stamp: 'jm 9/15/97 15:43'!\\\\ngetMultilineResponse\\\\n\\\\t\\\\\\\"Get a multiple line response to the last command, filtering out LF characters. A multiple line response ends with a line containing only a single period (.) character.\\\\\\\"\\\\n\\\\n\\\\t^ self getMultilineResponseShowing: false.\\\\n! !\\\\n\\\\n!OldSimpleClientSocket methodsFor: 'as yet unclassified' stamp: 'ls 9/11/1998 03:34'!\\\\ngetMultilineResponseShowing: showFlag\\\\n\\\\t\\\\\\\"Get a multiple line response to the last command. A multiple line response ends with a line containing only a single period (.) character. Linefeed characters are filtered out. If showFlag is true, each line is shown in the upper-left corner of the Display as it is received.\\\\\\\"\\\\n\\\\n\\\\t| response done chunk |\\\\n\\\\tresponse _ WriteStream on: ''.\\\\n\\\\tdone _ false.\\\\n\\\\t[done] whileFalse: [\\\\n\\\\t\\\\tshowFlag\\\\n\\\\t\\\\t\\\\tifTrue: [chunk _ self getResponseShowing: true]\\\\n\\\\t\\\\t\\\\tifFalse: [chunk _ self getResponse].\\\\n\\\\t\\\\t(chunk beginsWith: '.')\\\\n\\\\t\\\\t\\\\tifTrue: [ response nextPutAll: (chunk copyFrom: 2 to: chunk size) ]\\\\n\\\\t\\\\t\\\\tifFalse: [ response nextPutAll: chunk ].\\\\n\\\\t\\\\tdone _ (chunk = ('.', String cr)) ].\\\\n\\\\n\\\\t^ response contents\\\\n! !\\\\n\\\\n!OldSimpleClientSocket methodsFor: 'as yet unclassified' stamp: 'ls 9/11/1998 02:10'!\\\\ngetResponse\\\\n\\\\t\\\\\\\"Get a one-line response from the server.  The final LF is removed from the line, but the CR is left, so that the line is in Squeak's text format\\\\\\\"\\\\n\\\\n\\\\t^ self getResponseShowing: false\\\\n! !\\\\n\\\\n!OldSimpleClientSocket methodsFor: 'as yet unclassified' stamp: 'ls 9/11/1998 03:27'!\\\\ngetResponseShowing: showFlag\\\\n\\\\n\\\\t| line idx |\\\\n\\\\tline _ WriteStream on: String new.\\\\n\\\\n\\\\tbuffer ifNil: [\\\\n\\\\t\\\\tbuffer _ String new.\\\\n\\\\t\\\\tbufferPos _ 0 ].\\\\n\\\\n\\\\t[\\\\n\\\\t\\\\t\\\\\\\"look for a LF in the buffer\\\\\\\"\\\\n\\\\t\\\\tidx _ buffer indexOf: Character lf startingAt: bufferPos+1 ifAbsent: [ 0 ].\\\\n\\\\t\\\\tidx > 0 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\\\\"found it!! we have a line\\\\\\\"\\\\n\\\\t\\\\t\\\\tline nextPutAll: (buffer copyFrom: bufferPos+1 to: idx-1).\\\\n\\\\t\\\\t\\\\tbufferPos _ idx.\\\\n\\\\t\\\\t\\\\t^line contents ].\\\\n\\\\t\\\\t\\\\n\\\\t\\\\t\\\\\\\"didn't find it.  add the whole buffer to the line, and retrieve some more data\\\\\\\"\\\\n\\\\t\\\\tline nextPutAll: (buffer copyFrom: bufferPos+1 to: buffer size).\\\\n\\\\t\\\\tbufferPos _ 0.\\\\n\\\\t\\\\tbuffer _ String new.\\\\n\\\\t\\\\tself waitForDataQueryingUserEvery: 30.\\\\n\\\\t\\\\tbuffer _ self getData.\\\\n\\\\n\\\\t\\\\ttrue\\\\n\\\\t] whileTrue.! !\\\\n\\\\n!OldSimpleClientSocket methodsFor: 'as yet unclassified' stamp: 'jm 9/17/97 16:00'!\\\\nsendCommand: commandString\\\\n\\\\t\\\\\\\"Send the given command as a single line followed by a <CR><LF> terminator.\\\\\\\"\\\\n\\\\n\\\\tself sendData: commandString, CrLf.\\\\n! !\\\\n\\\\n!OldSimpleClientSocket methodsFor: 'as yet unclassified' stamp: 'jm 9/16/1998 14:37'!\\\\nwaitForDataQueryingUserEvery: seconds\\\\n\\\\t\\\\\\\"Wait for data to arrive, asking the user periodically if they wish to keep waiting. If they don't wish to keep waiting, destroy the socket and raise an error.\\\\\\\"\\\\n\\\\n\\\\t| gotData |\\\\n\\\\tgotData _ false.\\\\n\\\\t[gotData]\\\\n\\\\t\\\\twhileFalse: [\\\\n\\\\t\\\\t\\\\tgotData _ self waitForDataUntil: (Socket deadlineSecs: seconds).\\\\n\\\\t\\\\t\\\\tgotData ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tself isConnected ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself destroy.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself error: 'server closed connection'].\\\\n\\\\t\\\\t\\\\t\\\\t(self confirm: 'server not responding; keep trying?')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself destroy.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself error: 'no response from server']]].\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOldSimpleClientSocket class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'class initialization' stamp: 'jm 9/15/97 11:42'!\\\\ninitialize\\\\n\\\\t\\\\\\\"SimpleClientSocket initialize\\\\\\\"\\\\n\\\\n\\\\tCR _ Character cr.\\\\n\\\\tLF _ Character linefeed.\\\\n\\\\n\\\\t\\\\\\\"string for command line termination:\\\\\\\"\\\\n\\\\tCrLf _ String with: CR with: LF.\\\\n! !\\\\n\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'net news example' stamp: 'mir 5/13/2003 10:45'!\\\\nnntpTest\\\\n\\\\t\\\\\\\"SimpleClientSocket nntpTest\\\\\\\"\\\\n\\\\n\\\\t| addr s headers msgs header allNewsGroups |\\\\n\\\\taddr _ NetNameResolver promptUserForHostAddress.\\\\n\\\\ts _ OldSimpleClientSocket new.\\\\n\\\\tTranscript show: '---------- Connecting ----------'; cr.\\\\n\\\\ts connectTo: addr port: 119.  \\\\\\\"119 is the NNTP port number\\\\\\\"\\\\n\\\\ts waitForConnectionUntil: self standardDeadline.\\\\n\\\\tTranscript show: s getResponse.\\\\n\\\\ts sendCommand: 'group comp.lang.smalltalk'.\\\\n\\\\tTranscript show: s getResponse.\\\\n\\\\n\\\\t\\\\\\\"get all the message headers for the current newsgroup\\\\\\\"\\\\n\\\\ts sendCommand: 'xover 1-1000000'.\\\\n\\\\theaders _ s getMultilineResponseShowing: true.\\\\n\\\\n\\\\t\\\\\\\"print the headers of the first 10 messages of comp.lang.smalltalk\\\\\\\"\\\\n\\\\ts sendCommand: 'listgroup comp.lang.smalltalk'.\\\\n\\\\tmsgs _ self parseIntegerList: s getMultilineResponse.\\\\n\\\\tmsgs ifNotNil: [\\\\n\\\\t\\\\t1 to: 5 do: [:i |\\\\n\\\\t\\\\t\\\\ts sendCommand: 'head ', (msgs at: i) printString.\\\\n\\\\t\\\\t\\\\theader _ s getMultilineResponse.\\\\n\\\\t\\\\t\\\\tTranscript show: (self extractDateFromAndSubjectFromHeader: header); cr]].\\\\n\\\\n\\\\t\\\\\\\"get a full list of usenet newsgroups\\\\\\\"\\\\n\\\\ts sendCommand: 'newgroups 010101 000000'.\\\\n\\\\tallNewsGroups _ s getMultilineResponse.\\\\n\\\\tTranscript show: allNewsGroups size printString, ' bytes in full newsgroup list'; cr.\\\\n\\\\n\\\\tTranscript show: 'Sending quit...'; cr.\\\\n\\\\ts sendCommand: 'QUIT'.\\\\n\\\\tTranscript show: s getResponse.\\\\n\\\\ts closeAndDestroy.\\\\n\\\\tTranscript show: '---------- Connection Closed ----------'; cr; endEntry.\\\\n\\\\n\\\\t(headers ~~ nil and:\\\\n\\\\t [self confirm: 'show article headers from comp.lang.smalltalk?'])\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t(StringHolder new contents: (self parseHeaderList: headers))\\\\n\\\\t\\\\t\\\\t\\\\topenLabel: 'Newsgroup Headers'].\\\\n\\\\n\\\\t(allNewsGroups ~~ nil and:\\\\n\\\\t [self confirm: 'show list of all newsgroups available on your server?'])\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t(StringHolder new contents: allNewsGroups)\\\\n\\\\t\\\\t\\\\t\\\\topenLabel: 'All Usenet Newsgroups'].\\\\n! !\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'net news example' stamp: 'jm 9/15/97 13:25'!\\\\nparseHeaderList: aString\\\\n\\\\t\\\\\\\"Parse a list of newsgroup headers.\\\\\\\"\\\\n\\\\n\\\\t| results s lineStart |\\\\n\\\\tresults _ WriteStream on: (String new: aString size).\\\\n\\\\ts _ ReadStream on: aString.\\\\n\\\\t[s atEnd]\\\\n\\\\t\\\\twhileFalse: [\\\\n\\\\t\\\\t\\\\tlineStart _ s position + 1.\\\\n\\\\t\\\\t\\\\t3 timesRepeat: [s skipTo: Character tab].  \\\\\\\"find fourth tab\\\\\\\"\\\\n\\\\t\\\\t\\\\tlineStart to: s position - 1 do: [:i | results nextPut: (aString at: i)].\\\\n\\\\t\\\\t\\\\tresults cr.\\\\n\\\\t\\\\t\\\\ts skipTo: Character cr].\\\\n\\\\t^ results contents\\\\n! !\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'net news example' stamp: 'jm 9/15/97 13:26'!\\\\nparseIntegerList: aString\\\\n\\\\t\\\\\\\"Parse a list of integers, each on a line by itself.\\\\\\\"\\\\n\\\\n\\\\t| s out |\\\\n\\\\ts _ ReadStream on: aString.\\\\n\\\\ts skipTo: Character cr.  \\\\\\\"skip the first line\\\\\\\"\\\\n\\\\tout _ OrderedCollection new.\\\\n\\\\t[s atEnd]\\\\n\\\\t\\\\twhileFalse: [\\\\n\\\\t\\\\t\\\\tout addLast: (Integer readFrom: s).\\\\n\\\\t\\\\t\\\\ts skipTo: Character cr].\\\\n\\\\t^ out asArray\\\\n! !\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'net news example' stamp: 'jm 9/15/97 13:26'!\\\\nparseNTTPMsgList: aString\\\\n\\\\t\\\\\\\"Parse a list of integers, each on a line by itself.\\\\\\\"\\\\n\\\\n\\\\t| s out |\\\\n\\\\ts _ ReadStream on: aString.\\\\n\\\\ts skipTo: Character cr.  \\\\\\\"skip the first line\\\\\\\"\\\\n\\\\tout _ OrderedCollection new.\\\\n\\\\t[s atEnd]\\\\n\\\\t\\\\twhileFalse: [\\\\n\\\\t\\\\t\\\\tout addLast: (Integer readFrom: s).\\\\n\\\\t\\\\t\\\\ts skipTo: Character cr].\\\\n\\\\t^ out asArray\\\\n! !\\\\n\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'other examples' stamp: 'mir 5/13/2003 10:45'!\\\\nfinger: userName\\\\n\\\\t\\\\\\\"OldSimpleClientSocket finger: 'stp'\\\\\\\"\\\\n\\\\n\\\\t| addr s |\\\\n\\\\taddr _ NetNameResolver promptUserForHostAddress.\\\\n\\\\ts _ OldSimpleClientSocket new.\\\\n\\\\tTranscript show: '---------- Connecting ----------'; cr.\\\\n\\\\ts connectTo: addr port: 79.  \\\\\\\"finger port number\\\\\\\"\\\\n\\\\ts waitForConnectionUntil: self standardDeadline.\\\\n\\\\ts sendCommand: userName.\\\\n\\\\tTranscript show: s getResponse.\\\\n\\\\ts closeAndDestroy.\\\\n\\\\tTranscript show: '---------- Connection Closed ----------'; cr; endEntry.\\\\n! !\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'other examples' stamp: 'mir 5/13/2003 10:45'!\\\\nhttpTestHost: hostName port: port url: url\\\\n\\\\t\\\\\\\"This test fetches a URL from the given host and port.\\\\\\\"\\\\n\\\\t\\\\\\\"SimpleClientSocket httpTestHost: 'www.disney.com' port: 80 url: '/'\\\\\\\"\\\\n\\\\t\\\\\\\"Tests URL fetch through a local HTTP proxie server:\\\\n\\\\t\\\\t(SimpleClientSocket\\\\n\\\\t\\\\t\\\\thttpTestHost: '127.0.0.1'\\\\n\\\\t\\\\t\\\\tport: 8080\\\\n\\\\t\\\\t\\\\turl: 'HTTP://www.exploratorium.edu/index.html')\\\\\\\"\\\\n\\\\n\\\\t| hostAddr s result buf bytes totalBytes t |\\\\n\\\\tTranscript cr; show: 'starting http test'; cr.\\\\n\\\\tSocket initializeNetwork.\\\\n\\\\thostAddr _ NetNameResolver addressForName: hostName timeout: 10.\\\\n\\\\thostAddr = nil ifTrue: [^ self inform: 'Could not find an address for ', hostName].\\\\n\\\\n\\\\ts _ OldSimpleClientSocket new.\\\\n\\\\tTranscript show: '---------- Connecting ----------'; cr.\\\\n\\\\ts connectTo: hostAddr port: port.\\\\n\\\\ts waitForConnectionUntil: \\\\\\\"self standardDeadline\\\\\\\" (Socket deadlineSecs: 10).\\\\n\\\\t(s isConnected) ifFalse: [\\\\n\\\\t\\\\ts destroy.\\\\n\\\\t\\\\t^ self inform: 'could not connect'].\\\\n\\\\tTranscript show: 'connection open; waiting for data'; cr.\\\\n\\\\n\\\\ts sendCommand: 'GET ', url, ' HTTP/1.0'.\\\\n\\\\ts sendCommand: 'User-Agent: Squeak 1.19'.\\\\n\\\\ts sendCommand: 'ACCEPT: text/html'.\\\\t\\\\\\\"always accept plain text\\\\\\\"\\\\n\\\\ts sendCommand: 'ACCEPT: application/octet-stream'.  \\\\\\\"also accept binary data\\\\\\\"\\\\n\\\\ts sendCommand: ''.  \\\\\\\"blank line\\\\\\\"\\\\n\\\\n\\\\tresult _ WriteStream on: (String new: 10000).\\\\n\\\\tbuf _ String new: 10000.\\\\n\\\\ttotalBytes _ 0.\\\\n\\\\tt _ Time millisecondsToRun: [\\\\n\\\\t\\\\t[s isConnected] whileTrue: [\\\\n\\\\t\\\\t\\\\ts waitForDataUntil: (Socket deadlineSecs: 5).\\\\n\\\\t\\\\t\\\\tbytes _ s receiveDataInto: buf.\\\\n\\\\t\\\\t\\\\t1 to: bytes do: [:i | result nextPut: (buf at: i)].\\\\n\\\\t\\\\t\\\\ttotalBytes _ totalBytes + bytes.\\\\n\\\\t\\\\t\\\\tTranscript show: totalBytes printString, ' bytes received'; cr]].\\\\n\\\\n\\\\ts destroy.\\\\n\\\\tTranscript show: '---------- Connection Closed ----------'; cr; endEntry.\\\\n\\\\tTranscript show: 'http test done; ', totalBytes printString, ' bytes read in '.\\\\n\\\\tTranscript show: ((t / 1000.0) roundTo: 0.01) printString, ' seconds'; cr.\\\\n\\\\tTranscript show: ((totalBytes asFloat / t) roundTo: 0.01) printString, ' kBytes/sec'; cr.\\\\n\\\\tTranscript endEntry.\\\\n\\\\t(StringHolder new contents: (result contents))\\\\n\\\\t\\\\topenLabel: 'HTTP Test Result: URL Contents'.\\\\n! !\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'other examples' stamp: 'mir 5/13/2003 10:45'!\\\\ntimeTest\\\\n\\\\t\\\\\\\"SimpleClientSocket timeTest\\\\\\\"\\\\n\\\\n\\\\t| addr s |\\\\n\\\\taddr _ NetNameResolver promptUserForHostAddress.\\\\n\\\\ts _ OldSimpleClientSocket new.\\\\n\\\\tTranscript show: '---------- Connecting ----------'; cr.\\\\n\\\\ts connectTo: addr port: 13.  \\\\\\\"time port number\\\\\\\"\\\\n\\\\ts waitForConnectionUntil: self standardDeadline.\\\\n\\\\tTranscript show: s getResponse.\\\\n\\\\ts closeAndDestroy.\\\\n\\\\tTranscript show: '---------- Connection Closed ----------'; cr; endEntry.\\\\n! !\\\\n\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'POP mail example' stamp: 'jm 9/15/97 14:47'!\\\\nextractDateFromAndSubjectFromHeader: headerString\\\\n\\\\n\\\\t| date from subject s lineBuf c line i |\\\\n\\\\tdate _ from _ subject _ ''.\\\\n\\\\ts _ ReadStream on: headerString.\\\\n\\\\tlineBuf _ WriteStream on: ''.\\\\n\\\\t[s atEnd] whileFalse: [\\\\n\\\\t\\\\tc _ s next.\\\\n\\\\t\\\\tc = CR\\\\n\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tline _ lineBuf contents.\\\\n\\\\t\\\\t\\\\t\\\\t(line beginsWith: 'Date: ')\\\\tifTrue: [date _ line copyFrom: 7 to: line size].\\\\n\\\\t\\\\t\\\\t\\\\t(line beginsWith: 'From: ')\\\\tifTrue: [from _ line copyFrom: 7 to: line size].\\\\n\\\\t\\\\t\\\\t\\\\t(line beginsWith: 'Subject: ')\\\\tifTrue: [subject _ line copyFrom: 10 to: line size].\\\\n\\\\t\\\\t\\\\t\\\\tlineBuf _ WriteStream on: '']\\\\n\\\\t\\\\t\\\\tifFalse: [lineBuf nextPut: c]].\\\\n\\\\n\\\\ti _ date indexOf: $' ifAbsent: [0].\\\\n\\\\tdate _ date copyFrom: i + 1 to: date size.\\\\n\\\\t^ (self simpleDateString: date), ', ', from, ':\\\\n  ', subject\\\\n! !\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'POP mail example' stamp: 'rbb 3/1/2005 11:02'!\\\\npopTest\\\\n\\\\t\\\\\\\"SimpleClientSocket popTest\\\\\\\"\\\\n\\\\n\\\\t| addr userName userPassword s msgs header |\\\\n\\\\taddr := NetNameResolver promptUserForHostAddress.\\\\n\\\\tuserName := UIManager default\\\\n\\\\t\\\\trequest: 'What is your email name?'\\\\n\\\\t\\\\tinitialAnswer: 'johnm'.\\\\n\\\\tuserPassword := UIManager default\\\\n\\\\t\\\\trequest: 'What is your email password?'.\\\\n\\\\n\\\\ts := OldSimpleClientSocket new.\\\\n\\\\tTranscript show: '---------- Connecting ----------'; cr.\\\\n\\\\ts connectTo: addr port: 110.  \\\\\\\"110 is the POP3 port number\\\\\\\"\\\\n\\\\ts waitForConnectionUntil: self standardDeadline.\\\\n\\\\tTranscript show: s getResponse.\\\\n\\\\ts sendCommand: 'USER ', userName.\\\\n\\\\tTranscript show: s getResponse.\\\\n\\\\ts sendCommand: 'PASS ', userPassword.\\\\n\\\\tTranscript show: s getResponse.\\\\n\\\\ts sendCommand: 'LIST'.\\\\n\\\\n\\\\t\\\\\\\"the following should be tweaked to handle an empy mailbox:\\\\\\\"\\\\n\\\\tmsgs := self parseIntegerList: s getMultilineResponse.\\\\n\\\\n\\\\t1 to: (msgs size min: 5) do: [ :i |\\\\n\\\\t\\\\ts sendCommand: 'TOP ', (msgs at: i) printString, ' 0'.\\\\n\\\\t\\\\theader := s getMultilineResponse.\\\\n\\\\t\\\\tTranscript show: (self extractDateFromAndSubjectFromHeader: header); cr].\\\\n\\\\n\\\\tmsgs size > 0 ifTrue: [\\\\n\\\\t\\\\t\\\\\\\"get the first message\\\\\\\"\\\\n\\\\t\\\\ts sendCommand: 'RETR 1'.\\\\n\\\\t\\\\tTranscript show: s getMultilineResponse].\\\\n\\\\n\\\\tTranscript show: 'closing connection'; cr.\\\\n\\\\ts sendCommand: 'QUIT'.\\\\n\\\\ts closeAndDestroy.\\\\n\\\\tTranscript show: '---------- Connection Closed ----------'; cr; endEntry.\\\\n! !\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'POP mail example' stamp: 'tk 4/10/1998 06:47'!\\\\nsimpleDateString: dateString\\\\n\\\\n\\\\t| s |\\\\n\\\\ts _ ReadStream on: dateString.\\\\n\\\\ts skipTo: $,.  \\\\\\\"scan thru first comma\\\\\\\"\\\\n\\\\ts atEnd ifTrue: [s reset].  \\\\\\\"no comma found; reset s\\\\\\\"\\\\n\\\\ts skipSeparators.\\\\n\\\\t^ (Date readFrom: s) mmddyyyy\\\\n! !\\\\n\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'queries' stamp: 'jm 2/26/98 09:50'!\\\\ncrLf\\\\n\\\\n\\\\t^ CrLf\\\\n! !\\\\n\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'remote cursor example' stamp: 'mir 5/13/2003 10:45'!\\\\nforkingRemoteCursorSender\\\\n\\\\t\\\\\\\"This is the client side of a test that sends samples of the local input sensor state to the server, which may be running on a local or remote host. This method opens the connection, then forks a process to send the cursor data. Data is sent continuously until the user clicks in a 20x20 pixel square at the top-left corner of the display. The server should be started first. Note the server's address, since this method will prompt you for it.\\\\\\\"\\\\n\\\\t\\\\\\\"SimpleClientSocket forkingRemoteCursorSender\\\\\\\"\\\\n\\\\n\\\\t| sock addr stopRect |\\\\n\\\\tTranscript show: 'starting remote cursor sender'; cr.\\\\n\\\\tTranscript show: 'initializing network'; cr.\\\\n\\\\tSocket initializeNetwork.\\\\n\\\\taddr _ NetNameResolver promptUserForHostAddress.\\\\n\\\\tTranscript show: 'opening connection'; cr.\\\\n\\\\tsock _ OldSimpleClientSocket new.\\\\n\\\\tsock connectTo: addr port: 54323.\\\\n\\\\tsock waitForConnectionUntil: self standardDeadline.\\\\n\\\\t(sock isConnected) ifFalse: [self error: 'sock not connected'].\\\\n\\\\tTranscript show: 'connection established'; cr.\\\\n\\\\n\\\\tstopRect _ 0@0 corner: 20@20.  \\\\\\\"click in this rectangle to stop sending\\\\\\\"\\\\n\\\\tDisplay reverse: stopRect.\\\\n\\\\t[\\\\\\\"the sending process\\\\\\\"\\\\n\\\\t\\\\t[(stopRect containsPoint: Sensor cursorPoint) and:\\\\n\\\\t\\\\t [Sensor anyButtonPressed]]\\\\n\\\\t\\\\t\\\\twhileFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tsock sendCommand: self sensorStateString.\\\\n\\\\t\\\\t\\\\t\\\\t(Delay forMilliseconds: 20) wait].\\\\n\\\\n\\\\t\\\\tsock waitForSendDoneUntil: self standardDeadline.\\\\n\\\\t\\\\tsock destroy.\\\\n\\\\t\\\\tTranscript show: 'remote cursor sender done'; cr.\\\\n\\\\t\\\\tDisplay reverse: stopRect.\\\\n\\\\t] fork.\\\\n! !\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'remote cursor example' stamp: 'jm 9/15/97 14:49'!\\\\nparseSensorStateString: aString\\\\n\\\\t\\\\\\\"Parse the given sensor stat string and return an array whose first element is the cursor point and whose second is the cursor button state.\\\\\\\"\\\\n\\\\t\\\\\\\"SimpleClientSocket parseSensorStateString: SimpleClientSocket sensorStateString\\\\\\\"\\\\n\\\\n\\\\t| s buttons x y |\\\\n\\\\ts _ ReadStream on: aString.\\\\n\\\\tx _ Integer readFrom: s.\\\\n\\\\ts skipSeparators.\\\\n\\\\ty _ Integer readFrom: s.\\\\n\\\\ts skipSeparators.\\\\n\\\\tbuttons _ Integer readFrom: s.\\\\n\\\\t^ Array with: x@y with: buttons\\\\n! !\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'remote cursor example' stamp: 'mir 5/13/2003 10:45'!\\\\nremoteCursorReceiver\\\\n\\\\t\\\\\\\"Wait for a connection, then display data sent by the client until the client closes the stream. This server process is usually started first (optionally in a forked process), then the sender process is started (optionally on another machine). Note this machine's address, which is printed in the transcript, since the sender process will ask for it.\\\\\\\"\\\\n\\\\t\\\\\\\"[SimpleClientSocket remoteCursorReceiver] fork\\\\\\\"\\\\n\\\\n\\\\t| sock response |\\\\n\\\\tTranscript show: 'starting remote cursor receiver'; cr.\\\\n\\\\tTranscript show: 'initializing network'; cr.\\\\n\\\\tSocket initializeNetwork.\\\\n\\\\tTranscript show: 'my address is ', NetNameResolver localAddressString; cr.\\\\n\\\\tTranscript show: 'opening connection'; cr.\\\\n\\\\tsock _ OldSimpleClientSocket new.\\\\n\\\\tsock listenOn: 54323.\\\\n\\\\tsock waitForConnectionUntil: (Socket deadlineSecs: 60).\\\\n\\\\tsock isConnected\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t sock destroy.\\\\n\\\\t\\\\t\\\\tTranscript show: 'remote cursor receiver did not receive a connection in 60 seconds; aborting.'.\\\\n\\\\t\\\\t\\\\t^ self].\\\\n\\\\tTranscript show: 'connection established'; cr.\\\\n\\\\n\\\\t[sock isConnected]\\\\n\\\\t\\\\twhileTrue: [\\\\n\\\\t\\\\t\\\\tsock dataAvailable\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tresponse _ sock getResponse.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tresponse displayOn: Display at: 10@10]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"if no data available, let other processes run for a while\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(Delay forMilliseconds: 20) wait]].\\\\n\\\\n\\\\tsock destroy.\\\\n\\\\tTranscript show: 'remote cursor receiver done'; cr.\\\\n! !\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'remote cursor example' stamp: 'mir 5/13/2003 10:45'!\\\\nremoteCursorTest\\\\n\\\\t\\\\\\\"This version of the remote cursor test runs both the client and the server code in the same loop.\\\\\\\"\\\\n\\\\t\\\\\\\"SimpleClientSocket remoteCursorTest\\\\\\\"\\\\n\\\\n\\\\t| sock1 sock2 samplesToSend samplesSent done t |\\\\n\\\\tTranscript show: 'starting remote cursor test'; cr.\\\\n\\\\tTranscript show: 'initializing network'; cr.\\\\n\\\\tSocket initializeNetwork.\\\\n\\\\tTranscript show: 'opening connection'; cr.\\\\n\\\\tsock1 _ OldSimpleClientSocket new.\\\\n\\\\tsock2 _ OldSimpleClientSocket new.\\\\n\\\\tsock1 listenOn: 54321.\\\\n\\\\tsock2 connectTo: (NetNameResolver localHostAddress) port: 54321.\\\\n\\\\tsock1 waitForConnectionUntil: self standardDeadline.\\\\n\\\\tsock2 waitForConnectionUntil: self standardDeadline.\\\\n\\\\t(sock1 isConnected) ifFalse: [self error: 'sock1 not connected'].\\\\n\\\\t(sock2 isConnected) ifFalse: [self error: 'sock2 not connected'].\\\\n\\\\tTranscript show: 'connection established'; cr.\\\\n\\\\n\\\\tsamplesToSend _ 100.\\\\n\\\\tt _ Time millisecondsToRun: [\\\\n\\\\t\\\\tsamplesSent _ 0.\\\\n\\\\t\\\\tdone _ false.\\\\n\\\\t\\\\t[done]\\\\n\\\\t\\\\t\\\\twhileFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t(sock1 sendDone and: [samplesSent < samplesToSend]) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsock1 sendCommand: self sensorStateString.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsamplesSent _ samplesSent + 1].\\\\n\\\\t\\\\t\\\\t\\\\tsock2 dataAvailable ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsock2 getResponse displayOn: Display at: 10@10].\\\\n\\\\t\\\\t\\\\t\\\\tdone _ samplesSent = samplesToSend]].\\\\n\\\\tsock1 destroy.\\\\n\\\\tsock2 destroy.\\\\n\\\\tTranscript show: 'remote cursor test done'; cr.\\\\n\\\\tTranscript show:\\\\n\\\\t\\\\tsamplesSent printString, ' samples sent in ',\\\\n\\\\t\\\\tt printString, ' milliseconds'; cr.\\\\n\\\\tTranscript show: ((samplesSent * 1000) // t) printString, ' samples/sec'; cr.\\\\n! !\\\\n\\\\n!OldSimpleClientSocket class methodsFor: 'remote cursor example' stamp: 'jm 9/15/97 13:11'!\\\\nsensorStateString\\\\n\\\\t\\\\\\\"SimpleClientSocket sensorStateString\\\\\\\"\\\\n\\\\n\\\\t| pt buttons s |\\\\n\\\\tpt _ Sensor cursorPoint.\\\\n\\\\tbuttons _ Sensor primMouseButtons.\\\\n\\\\ts _ WriteStream on: (String new: 100).\\\\n\\\\ts nextPutAll: pt x printString.\\\\n\\\\ts space.\\\\n\\\\ts nextPutAll: pt y printString.\\\\n\\\\ts space.\\\\n\\\\ts nextPutAll: buttons printString.\\\\n\\\\t^ s contents\\\\n! !\\\\nObject subclass: #OldSocket\\\\n\\\\tinstanceVariableNames: 'semaphore socketHandle readSemaphore writeSemaphore primitiveOnlySupportsOneSemaphore'\\\\n\\\\tclassVariableNames: 'Connected DeadServer InvalidSocket OtherEndClosed Registry RegistryThreshold TCPSocketType ThisEndClosed UDPSocketType Unconnected WaitingForConnection'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Network-Kernel'!\\\\n!OldSocket commentStamp: '<historical>' prior: 0!\\\\nA Socket represents a network connection point. Current sockets are designed to support the TCP/IP and UDP protocols\\\\n\\\\nSubclasses of socket provide support for network protocols such as POP, NNTP, HTTP, and FTP. Sockets also allow you to implement your own custom services and may be used to support Remote Procedure Call or Remote Method Invocation some day.\\\\n\\\\nJMM June 2nd 2000 Macintosh UDP support was added if you run open transport.\\\\n!\\\\n]style[(196 4 6 3 228)f1,f1LHTTPSocket Comment;,f1,f1LFTPSocket Comment;,f1!\\\\n\\\\n\\\\n!OldSocket methodsFor: 'accessing' stamp: 'ar 4/30/1999 04:25'!\\\\naddress\\\\n\\\\t\\\\\\\"Shortcut\\\\\\\"\\\\n\\\\t^self localAddress! !\\\\n\\\\n!OldSocket methodsFor: 'accessing' stamp: 'nk 2/24/2005 14:37'!\\\\nlocalAddress\\\\n\\\\tself waitForConnectionUntil: self class standardDeadline.\\\\n\\\\tself isConnected ifFalse: [^ByteArray new: 4].\\\\n\\\\t^self primSocketLocalAddress: socketHandle! !\\\\n\\\\n!OldSocket methodsFor: 'accessing' stamp: 'nk 2/24/2005 14:37'!\\\\nlocalPort\\\\n\\\\tself waitForConnectionUntil: self class standardDeadline.\\\\n\\\\tself isConnected ifFalse: [^0].\\\\n\\\\t^self primSocketLocalPort: socketHandle! !\\\\n\\\\n!OldSocket methodsFor: 'accessing' stamp: 'jm 3/13/98 12:11'!\\\\npeerName\\\\n\\\\t\\\\\\\"Return the name of the host I'm connected to, or nil if its name isn't known to the domain name server or the request times out.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: Slow. Calls the domain name server, taking up to 20 seconds to time out. Even when sucessful, delays of up to 13 seconds have been observed during periods of high network load.\\\\\\\" \\\\n\\\\n\\\\t^ NetNameResolver\\\\n\\\\t\\\\tnameForAddress: self remoteAddress\\\\n\\\\t\\\\ttimeout: 20\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'accessing' stamp: 'ar 4/30/1999 04:25'!\\\\nport\\\\n\\\\t\\\\\\\"Shortcut\\\\\\\"\\\\n\\\\t^self localPort! !\\\\n\\\\n!OldSocket methodsFor: 'accessing' stamp: 'JMM 6/5/2000 10:12'!\\\\nprimitiveOnlySupportsOneSemaphore\\\\n\\\\t^primitiveOnlySupportsOneSemaphore! !\\\\n\\\\n!OldSocket methodsFor: 'accessing' stamp: 'JMM 5/22/2000 22:49'!\\\\nreadSemaphore\\\\n\\\\tprimitiveOnlySupportsOneSemaphore ifTrue: [^semaphore].\\\\n\\\\t^readSemaphore! !\\\\n\\\\n!OldSocket methodsFor: 'accessing' stamp: 'jm 9/17/97 14:34'!\\\\nremoteAddress\\\\n\\\\n\\\\t^ self primSocketRemoteAddress: socketHandle\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'accessing' stamp: 'jm 9/17/97 14:34'!\\\\nremotePort\\\\n\\\\n\\\\t^ self primSocketRemotePort: socketHandle\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'accessing' stamp: 'JMM 5/9/2000 15:32'!\\\\nsemaphore\\\\n\\\\t^semaphore! !\\\\n\\\\n!OldSocket methodsFor: 'accessing' stamp: 'ar 7/16/1999 17:22'!\\\\nsocketHandle\\\\n\\\\t^socketHandle! !\\\\n\\\\n!OldSocket methodsFor: 'accessing' stamp: 'JMM 5/22/2000 22:49'!\\\\nwriteSemaphore\\\\n\\\\tprimitiveOnlySupportsOneSemaphore ifTrue: [^semaphore].\\\\n\\\\t^writeSemaphore! !\\\\n\\\\n\\\\n!OldSocket methodsFor: 'connection open/close' stamp: 'nk 2/24/2005 14:37'!\\\\naccept\\\\n\\\\t\\\\\\\"Accept a connection from the receiver socket.\\\\n\\\\tReturn a new socket that is connected to the client\\\\\\\"\\\\n\\\\n\\\\t^self class acceptFrom: self! !\\\\n\\\\n!OldSocket methodsFor: 'connection open/close' stamp: 'jm 9/11/97 20:29'!\\\\nclose\\\\n\\\\t\\\\\\\"Close this connection gracefully. For TCP, this sends a close request, but the stream remains open until the other side also closes it.\\\\\\\"\\\\n\\\\n\\\\tself primSocketCloseConnection: socketHandle.  \\\\\\\"close this end\\\\\\\"\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'connection open/close' stamp: 'jm 11/4/97 07:15'!\\\\ncloseAndDestroy\\\\n\\\\t\\\\\\\"First, try to close this connection gracefully. If the close attempt fails or times out, abort the connection. In either case, destroy the socket. Do nothing if the socket has already been destroyed (i.e., if its socketHandle is nil).\\\\\\\"\\\\n\\\\n\\\\tself closeAndDestroy: 20.\\\\n\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'connection open/close' stamp: 'nk 2/24/2005 14:37'!\\\\ncloseAndDestroy: timeoutSeconds \\\\n\\\\t\\\\\\\"First, try to close this connection gracefully. If the close attempt fails or times out, abort the connection. In either case, destroy the socket. Do nothing if the socket has already been destroyed (i.e., if its socketHandle is nil).\\\\\\\"\\\\n\\\\n\\\\tsocketHandle = nil \\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[self isConnected \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self close.\\\\t\\\\\\\"close this end\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(self waitForDisconnectionUntil: (self class deadlineSecs: timeoutSeconds)) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"if the other end doesn't close soon, just abort the connection\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself primSocketAbortConnection: socketHandle]].\\\\n\\\\t\\\\t\\\\tself destroy]! !\\\\n\\\\n!OldSocket methodsFor: 'connection open/close'!\\\\nconnectTo: hostAddress port: port\\\\n\\\\t\\\\\\\"Initiate a connection to the given port at the given host address. This operation will return immediately; follow it with waitForConnectionUntil: to wait until the connection is established.\\\\\\\"\\\\n\\\\n\\\\t| status |\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\t(status == Unconnected)\\\\n\\\\t\\\\tifFalse: [self error: 'Socket status must Unconnected before opening a new connection'].\\\\n\\\\n\\\\tself primSocket: socketHandle connectTo: hostAddress port: port.\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'connection open/close' stamp: 'jm 3/10/98 11:56'!\\\\ndisconnect\\\\n\\\\t\\\\\\\"Break this connection, no matter what state it is in. Data that has been sent but not received will be lost.\\\\\\\"\\\\n\\\\n\\\\tself primSocketAbortConnection: socketHandle.\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'connection open/close'!\\\\nlistenOn: port\\\\n\\\\t\\\\\\\"Listen for a connection on the given port. This operation will return immediately; follow it with waitForConnectionUntil: to wait until a connection is established.\\\\\\\"\\\\n\\\\n\\\\t| status |\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\t(status == Unconnected)\\\\n\\\\t\\\\tifFalse: [self error: 'Socket status must Unconnected before listening for a new connection'].\\\\n\\\\n\\\\tself primSocket: socketHandle listenOn: port.\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'connection open/close' stamp: 'ar 7/16/1999 18:26'!\\\\nlistenOn: portNumber backlogSize: backlog\\\\n\\\\t\\\\\\\"Listen for a connection on the given port.\\\\n\\\\tIf this method succeeds, #accept may be used to establish a new connection\\\\\\\"\\\\n\\\\t| status |\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\t(status == Unconnected)\\\\n\\\\t\\\\tifFalse: [self error: 'Socket status must Unconnected before listening for a new connection'].\\\\n\\\\tself primSocket: socketHandle listenOn: portNumber backlogSize: backlog.\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'connection open/close' stamp: 'ikp 9/1/2003 20:47'!\\\\nlistenOn: portNumber backlogSize: backlog interface: ifAddr\\\\n\\\\t\\\\\\\"Listen for a connection on the given port.\\\\n\\\\tIf this method succeeds, #accept may be used to establish a new connection\\\\\\\"\\\\n\\\\t| status |\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\t(status == Unconnected)\\\\n\\\\t\\\\tifFalse: [self error: 'Socket status must Unconnected before listening for a new connection'].\\\\n\\\\tself primSocket: socketHandle listenOn: portNumber backlogSize: backlog interface: ifAddr.\\\\n! !\\\\n\\\\n\\\\n!OldSocket methodsFor: 'datagrams' stamp: 'JMM 6/7/2000 14:58'!\\\\nreceiveDataInto: aStringOrByteArray fromHost: hostAddress port: portNumber\\\\n\\\\t| datagram |\\\\n\\\\t\\\\\\\"Receive a UDP packet from the given hostAddress/portNumber, storing the data in the given buffer, and return the number of bytes received. Note the given buffer may be only partially filled by the received data.\\\\\\\"\\\\n\\\\n\\\\tprimitiveOnlySupportsOneSemaphore ifTrue:\\\\n\\\\t\\\\t[self setPeer: hostAddress port: portNumber.\\\\n\\\\t\\\\t^self receiveDataInto: aStringOrByteArray].\\\\n\\\\t[true] whileTrue: \\\\n\\\\t\\\\t[datagram _ self receiveUDPDataInto: aStringOrByteArray.\\\\n\\\\t\\\\t((datagram at: 2) = hostAddress and: [(datagram at: 3) = portNumber]) \\\\n\\\\t\\\\t\\\\tifTrue: [^datagram at: 1]\\\\n\\\\t\\\\t\\\\tifFalse: [^0]]! !\\\\n\\\\n!OldSocket methodsFor: 'datagrams' stamp: 'JMM 6/3/2000 21:54'!\\\\nreceiveUDPDataInto: aStringOrByteArray\\\\n\\\\t\\\\\\\"Receive UDP data into the given buffer and return the number of bytes received. Note the given buffer may be only partially filled by the received data. What is returned is an array, the first element is the bytes read, the second the sending bytearray address, the third the senders port, the fourth, true if more of the datagram awaits reading\\\\\\\"\\\\n\\\\n\\\\t^ self primSocket: socketHandle\\\\n\\\\t\\\\treceiveUDPDataInto: aStringOrByteArray\\\\n\\\\t\\\\tstartingAt: 1\\\\n\\\\t\\\\tcount: aStringOrByteArray size\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'datagrams' stamp: 'JMM 5/25/2000 00:05'!\\\\nsendData: aStringOrByteArray toHost: hostAddress port: portNumber\\\\n\\\\t\\\\\\\"Send a UDP packet containing the given data to the specified host/port.\\\\\\\"\\\\n\\\\n\\\\tprimitiveOnlySupportsOneSemaphore ifTrue:\\\\n\\\\t\\\\t[self setPeer: hostAddress port: portNumber.\\\\n\\\\t\\\\t^self sendData: aStringOrByteArray].\\\\n\\\\t^self sendUDPData: aStringOrByteArray toHost: hostAddress port: portNumber! !\\\\n\\\\n!OldSocket methodsFor: 'datagrams' stamp: 'nk 2/24/2005 14:37'!\\\\nsendUDPData: aStringOrByteArray toHost: hostAddress port: portNumber \\\\n\\\\t\\\\\\\"Send a UDP packet containing the given data to the specified host/port.\\\\\\\"\\\\n\\\\n\\\\t| bytesToSend bytesSent count |\\\\n\\\\tbytesToSend := aStringOrByteArray size.\\\\n\\\\tbytesSent := 0.\\\\n\\\\t[bytesSent < bytesToSend] whileTrue: \\\\n\\\\t\\\\t\\\\t[(self waitForSendDoneUntil: (self class deadlineSecs: 20)) \\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self error: 'send data timeout; data not sent'].\\\\n\\\\t\\\\t\\\\tcount := self \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tprimSocket: socketHandle\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsendUDPData: aStringOrByteArray\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttoHost: hostAddress\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tport: portNumber\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartIndex: bytesSent + 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcount: bytesToSend - bytesSent.\\\\n\\\\t\\\\t\\\\tbytesSent := bytesSent + count].\\\\n\\\\t^bytesSent! !\\\\n\\\\n!OldSocket methodsFor: 'datagrams' stamp: 'ar 4/30/1999 04:29'!\\\\nsetPeer: hostAddress port: port\\\\n\\\\t\\\\\\\"Set the default send/recv address.\\\\\\\"\\\\n\\\\n\\\\tself primSocket: socketHandle connectTo: hostAddress port: port.\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'datagrams' stamp: 'ar 4/30/1999 04:29'!\\\\nsetPort: port\\\\n\\\\t\\\\\\\"Associate a local port number with a UDP socket.  Not applicable to TCP sockets.\\\\\\\"\\\\n\\\\n\\\\tself primSocket: socketHandle setPort: port.\\\\n! !\\\\n\\\\n\\\\n!OldSocket methodsFor: 'finalization' stamp: 'JMM 5/22/2000 22:52'!\\\\nfinalize\\\\n\\\\tself primSocketDestroyGently: socketHandle.\\\\n\\\\tSmalltalk unregisterExternalObject: semaphore.\\\\n\\\\tSmalltalk unregisterExternalObject: readSemaphore.\\\\n\\\\tSmalltalk unregisterExternalObject: writeSemaphore.\\\\n! !\\\\n\\\\n\\\\n!OldSocket methodsFor: 'initialize-destroy' stamp: 'JMM 5/22/2000 22:47'!\\\\nacceptFrom: aSocket\\\\n\\\\t\\\\\\\"Initialize a new socket handle from an accept call\\\\\\\"\\\\n\\\\t| semaIndex readSemaIndex writeSemaIndex |\\\\n\\\\n\\\\tprimitiveOnlySupportsOneSemaphore _ false.\\\\n\\\\tsemaphore _ Semaphore new.\\\\n\\\\treadSemaphore _ Semaphore new.\\\\n\\\\twriteSemaphore _ Semaphore new.\\\\n\\\\tsemaIndex _ Smalltalk registerExternalObject: semaphore.\\\\n\\\\treadSemaIndex _ Smalltalk registerExternalObject: readSemaphore.\\\\n\\\\twriteSemaIndex _ Smalltalk registerExternalObject: writeSemaphore.\\\\n\\\\tsocketHandle _ self primAcceptFrom: aSocket socketHandle\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\treceiveBufferSize: 8000\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsendBufSize: 8000\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsemaIndex: semaIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\treadSemaIndex: readSemaIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twriteSemaIndex: writeSemaIndex.\\\\n\\\\tsocketHandle = nil ifTrue: [  \\\\\\\"socket creation failed\\\\\\\"\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: semaphore.\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: readSemaphore.\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: writeSemaphore.\\\\n\\\\t\\\\treadSemaphore _ writeSemaphore _ semaphore _ nil\\\\n\\\\t] ifFalse:[self register].\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'initialize-destroy' stamp: 'JMM 5/22/2000 22:54'!\\\\ndestroy\\\\n\\\\t\\\\\\\"Destroy this socket. Its connection, if any, is aborted and its resources are freed. Do nothing if the socket has already been destroyed (i.e., if its socketHandle is nil).\\\\\\\"\\\\n\\\\n\\\\tsocketHandle = nil ifFalse: \\\\n\\\\t\\\\t[self isValid ifTrue: [self primSocketDestroy: socketHandle].\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: semaphore.\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: readSemaphore.\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: writeSemaphore.\\\\n\\\\t\\\\tsocketHandle _ nil.\\\\n\\\\t\\\\treadSemaphore _ writeSemaphore _ semaphore _ nil.\\\\n\\\\t\\\\tself unregister].\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'initialize-destroy' stamp: 'JMM 5/22/2000 23:04'!\\\\ninitialize: socketType\\\\n\\\\t\\\\\\\"Initialize a new socket handle. If socket creation fails, socketHandle will be set to nil.\\\\\\\"\\\\n\\\\t| semaIndex readSemaIndex writeSemaIndex |\\\\n\\\\n\\\\tprimitiveOnlySupportsOneSemaphore _ false.\\\\n\\\\tsemaphore _ Semaphore new.\\\\n\\\\treadSemaphore _ Semaphore new.\\\\n\\\\twriteSemaphore _ Semaphore new.\\\\n\\\\tsemaIndex _ Smalltalk registerExternalObject: semaphore.\\\\n\\\\treadSemaIndex _ Smalltalk registerExternalObject: readSemaphore.\\\\n\\\\twriteSemaIndex _ Smalltalk registerExternalObject: writeSemaphore.\\\\n\\\\tsocketHandle _\\\\n\\\\t\\\\tself primSocketCreateNetwork: 0\\\\n\\\\t\\\\t\\\\ttype: socketType\\\\n\\\\t\\\\t\\\\treceiveBufferSize: 8000\\\\n\\\\t\\\\t\\\\tsendBufSize: 8000\\\\n\\\\t\\\\t\\\\tsemaIndex: semaIndex\\\\n\\\\t\\\\t\\\\treadSemaIndex: readSemaIndex\\\\n\\\\t\\\\t\\\\twriteSemaIndex: writeSemaIndex.\\\\n\\\\n\\\\tsocketHandle = nil ifTrue: [  \\\\\\\"socket creation failed\\\\\\\"\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: semaphore.\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: readSemaphore.\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: writeSemaphore.\\\\n\\\\t\\\\treadSemaphore _ writeSemaphore _ semaphore _ nil\\\\n\\\\t] ifFalse:[self register].\\\\n! !\\\\n\\\\n\\\\n!OldSocket methodsFor: 'other' stamp: 'JMM 6/3/2000 19:39'!\\\\ngetOption: aName \\\\n\\\\t\\\\\\\"Get options on this socket, see Unix man pages for values for \\\\n\\\\tsockets, IP, TCP, UDP. IE SO_KEEPALIVE\\\\n\\\\treturns an array, element one is an status number (0 ok, -1 read only option)\\\\n\\\\telement two is the resulting of the requested option\\\\\\\"\\\\n\\\\n\\\\t(socketHandle == nil or: [self isValid not])\\\\n\\\\t\\\\tifTrue: [self error: 'Socket status must valid before getting an option'].\\\\n\\\\t^self primSocket: socketHandle getOption: aName\\\\n\\\\n\\\\\\\"| foo options |\\\\nSocket initializeNetwork.\\\\nfoo _ Socket newTCP.\\\\nfoo connectTo: (NetNameResolver addressFromString: '192.168.1.1') port: 80.\\\\nfoo waitForConnectionUntil: (Socket standardDeadline).\\\\n\\\\noptions _ {\\\\n'SO_DEBUG'. 'SO_REUSEADDR'. 'SO_REUSEPORT'. 'SO_DONTROUTE'.\\\\n'SO_BROADCAST'. 'SO_SNDBUF'. 'SO_RCVBUF'. 'SO_KEEPALIVE'.\\\\n'SO_OOBINLINE'. 'SO_PRIORITY'. 'SO_LINGER'. 'SO_RCVLOWAT'.\\\\n'SO_SNDLOWAT'. 'IP_TTL'. 'IP_HDRINCL'. 'IP_RCVOPTS'.\\\\n'IP_RCVDSTADDR'. 'IP_MULTICAST_IF'. 'IP_MULTICAST_TTL'.\\\\n'IP_MULTICAST_LOOP'. 'UDP_CHECKSUM'. 'TCP_MAXSEG'.\\\\n'TCP_NODELAY'. 'TCP_ABORT_THRESHOLD'. 'TCP_CONN_NOTIFY_THRESHOLD'. \\\\n'TCP_CONN_ABORT_THRESHOLD'. 'TCP_NOTIFY_THRESHOLD'.\\\\n'TCP_URGENT_PTR_TYPE'}.\\\\n\\\\n1 to: options size do: [:i | | fum |\\\\n\\\\tfum _foo getOption: (options at: i).\\\\n\\\\tTranscript show: (options at: i),fum printString;cr].\\\\n\\\\nfoo _ Socket newUDP.\\\\nfoo setPeer: (NetNameResolver addressFromString: '192.168.1.9') port: 7.\\\\nfoo waitForConnectionUntil: (Socket standardDeadline).\\\\n\\\\n1 to: options size do: [:i | | fum |\\\\n\\\\tfum _foo getOption: (options at: i).\\\\n\\\\tTranscript show: (options at: i),fum printString;cr].\\\\n\\\\\\\"! !\\\\n\\\\n!OldSocket methodsFor: 'other' stamp: 'nk 2/24/2005 14:37'!\\\\ngetResponseNoLF\\\\n\\\\t\\\\\\\"Get the response to the last command.\\\\\\\"\\\\n\\\\n\\\\t| buf response bytesRead c lf |\\\\n\\\\t(self waitForDataUntil: (self class deadlineSecs: 20)) \\\\n\\\\t\\\\tifFalse: [self error: 'getResponse timeout'].\\\\n\\\\tlf := Character lf.\\\\n\\\\tbuf := String new: 1000.\\\\n\\\\tresponse := WriteStream on: ''.\\\\n\\\\t[self dataAvailable] whileTrue: \\\\n\\\\t\\\\t\\\\t[bytesRead := self \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tprimSocket: socketHandle\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\treceiveDataInto: buf\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcount: buf size.\\\\n\\\\t\\\\t\\\\t1 to: bytesRead\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:i | (c := buf at: i) ~= lf ifTrue: [response nextPut: c]]].\\\\n\\\\t^response contents! !\\\\n\\\\n!OldSocket methodsFor: 'other' stamp: 'JMM 6/3/2000 19:39'!\\\\nsetOption: aName value: aValue \\\\n\\\\t| value |\\\\n\\\\t\\\\\\\"setup options on this socket, see Unix man pages for values for \\\\n\\\\tsockets, IP, TCP, UDP. IE SO_KEEPALIVE\\\\n\\\\treturns an array, element one is the error number\\\\n\\\\telement two is the resulting of the negotiated value.\\\\n\\\\tSee getOption for list of keys\\\\\\\"\\\\n\\\\n\\\\t(socketHandle == nil or: [self isValid not])\\\\n\\\\t\\\\tifTrue: [self error: 'Socket status must valid before setting an option'].\\\\n\\\\tvalue _ aValue asString.\\\\n\\\\taValue == true ifTrue: [value _ '1'].\\\\n\\\\taValue == false ifTrue: [value _ '0'].\\\\n\\\\t^ self primSocket: socketHandle setOption: aName value: value! !\\\\n\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimAcceptFrom: aHandle receiveBufferSize: rcvBufSize sendBufSize: sndBufSize semaIndex: semaIndex\\\\n\\\\t\\\\\\\"Create and return a new socket handle based on accepting the connection from the given listening socket\\\\\\\"\\\\n\\\\t<primitive: 'primitiveSocketAccept' module: 'SocketPlugin'>\\\\n\\\\t^self primitiveFailed! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'JMM 5/22/2000 22:55'!\\\\nprimAcceptFrom: aHandle receiveBufferSize: rcvBufSize sendBufSize: sndBufSize semaIndex: semaIndex readSemaIndex: aReadSema writeSemaIndex: aWriteSema\\\\n\\\\t\\\\\\\"Create and return a new socket handle based on accepting the connection from the given listening socket\\\\\\\"\\\\n\\\\t<primitive: 'primitiveSocketAccept3Semaphores' module: 'SocketPlugin'>\\\\n\\\\tprimitiveOnlySupportsOneSemaphore _ true.\\\\n\\\\t^self primAcceptFrom: aHandle receiveBufferSize: rcvBufSize sendBufSize: sndBufSize semaIndex: semaIndex ! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocket: socketID connectTo: hostAddress port: port\\\\n\\\\t\\\\\\\"Attempt to establish a connection to the given port of the given host. This is an asynchronous call; query the socket status to discover if and when the connection is actually completed.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketConnectToPort' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'JMM 5/25/2000 21:48'!\\\\nprimSocket: socketID getOption: aString \\\\n\\\\t\\\\\\\"Get some option information on this socket. Refer to the UNIX \\\\n\\\\tman pages for valid SO, TCP, IP, UDP options. In case of doubt\\\\n\\\\trefer to the source code.\\\\n\\\\tTCP_NODELAY, SO_KEEPALIVE are valid options for example\\\\n\\\\treturns an array containing the error code and the option value\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketGetOptions' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocket: socketID listenOn: port\\\\n\\\\t\\\\\\\"Listen for a connection on the given port. This is an asynchronous call; query the socket status to discover if and when the connection is actually completed.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketListenWithOrWithoutBacklog' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocket: aHandle listenOn: portNumber backlogSize: backlog\\\\n\\\\t\\\\\\\"Primitive. Set up the socket to listen on the given port.\\\\n\\\\tWill be used in conjunction with #accept only.\\\\\\\"\\\\n\\\\t<primitive: 'primitiveSocketListenWithOrWithoutBacklog' module: 'SocketPlugin'>\\\\n\\\\tself destroy. \\\\\\\"Accept not supported so clean up\\\\\\\"! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ikp 9/1/2003 20:55'!\\\\nprimSocket: aHandle listenOn: portNumber backlogSize: backlog interface: ifAddr\\\\n\\\\t\\\\\\\"Primitive. Set up the socket to listen on the given port.\\\\n\\\\tWill be used in conjunction with #accept only.\\\\\\\"\\\\n\\\\t<primitive: 'primitiveSocketListenOnPortBacklogInterface' module: 'SocketPlugin'>\\\\n\\\\tself destroy. \\\\\\\"Accept not supported so clean up\\\\\\\"! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocket: socketID receiveDataInto: aStringOrByteArray startingAt: startIndex count: count\\\\n\\\\t\\\\\\\"Receive data from the given socket into the given array starting at the given index. Return the number of bytes read or zero if no data is available.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketReceiveDataBufCount' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'JMM 5/24/2000 17:19'!\\\\nprimSocket: socketID receiveUDPDataInto: aStringOrByteArray startingAt: startIndex count: count\\\\n\\\\t\\\\\\\"Receive data from the given socket into the given array starting at the given index. \\\\n\\\\tReturn an Array containing the amount read, the host address byte array, the host port, and the more flag\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketReceiveUDPDataBufCount' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocket: socketID sendData: aStringOrByteArray startIndex: startIndex count: count\\\\n\\\\t\\\\\\\"Send data to the remote host through the given socket starting with the given byte index of the given byte array. The data sent is 'pushed' immediately. Return the number of bytes of data actually sent; any remaining data should be re-submitted for sending after the current send operation has completed.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: In general, it many take several sendData calls to transmit a large data array since the data is sent in send-buffer-sized chunks. The size of the send buffer is determined when the socket is created.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketSendDataBufCount' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'JMM 5/25/2000 00:08'!\\\\nprimSocket: socketID sendUDPData: aStringOrByteArray toHost: hostAddress  port: portNumber startIndex: startIndex count: count\\\\n\\\\t\\\\\\\"Send data to the remote host through the given socket starting with the given byte index of the given byte array. The data sent is 'pushed' immediately. Return the number of bytes of data actually sent; any remaining data should be re-submitted for sending after the current send operation has completed.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: In general, it many take several sendData calls to transmit a large data array since the data is sent in send-buffer-sized chunks. The size of the send buffer is determined when the socket is created.\\\\\\\"\\\\n\\\\n\\\\t<primitive:  'primitiveSocketSendUDPDataBufCount' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 7/18/2000 11:42'!\\\\nprimSocket: socketID setOption: aString value: aStringValue\\\\n\\\\t\\\\\\\"Set some option information on this socket. Refer to the UNIX \\\\n\\\\tman pages for valid SO, TCP, IP, UDP options. In case of doubt\\\\n\\\\trefer to the source code.\\\\n\\\\tTCP_NODELAY, SO_KEEPALIVE are valid options for example\\\\n\\\\treturns an array containing the error code and the negotiated value\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketSetOptions' module: 'SocketPlugin'>\\\\n\\\\t^nil! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocket: socketID setPort: port\\\\n\\\\t\\\\\\\"Set the local port associated with a UDP socket.\\\\n\\\\tNote: this primitive is overloaded.  The primitive will not fail on a TCP socket, but\\\\n\\\\tthe effects will not be what was desired.  Best solution would be to split Socket into\\\\n\\\\ttwo subclasses, TCPSocket and UDPSocket.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketListenWithOrWithoutBacklog' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketAbortConnection: socketID\\\\n\\\\t\\\\\\\"Terminate the connection on the given port immediately without going through the normal close sequence. This is an asynchronous call; query the socket status to discover if and when the connection is actually terminated.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketAbortConnection' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketCloseConnection: socketID\\\\n\\\\t\\\\\\\"Close the connection on the given port. The remote end is informed that this end has closed and will do no further sends. This is an asynchronous call; query the socket status to discover if and when the connection is actually closed.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketCloseConnection' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketConnectionStatus: socketID\\\\n\\\\t\\\\\\\"Return an integer reflecting the connection status of this socket. For a list of possible values, see the comment in the 'initialize' method of this class. If the primitive fails, return a status indicating that the socket handle is no longer valid, perhaps because the Squeak image was saved and restored since the socket was created. (Sockets do not survive snapshots.)\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketConnectionStatus' module: 'SocketPlugin'>\\\\n\\\\t^ InvalidSocket\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketCreateNetwork: netType type: socketType receiveBufferSize: rcvBufSize sendBufSize: sendBufSize semaIndex: semaIndex\\\\n\\\\t\\\\\\\"Return a new socket handle for a socket of the given type and buffer sizes. Return nil if socket creation fails.\\\\n\\\\tThe netType parameter is platform dependent and can be used to encode both the protocol type (IP, Xerox XNS, etc.) and/or the physical network interface to use if this host is connected to multiple networks. A zero netType means to use IP protocols and the primary (or only) network interface.\\\\n\\\\tThe socketType parameter specifies:\\\\n\\\\t\\\\t0\\\\treliable stream socket (TCP if the protocol is IP)\\\\n\\\\t\\\\t1\\\\tunreliable datagram socket (UDP if the protocol is IP)\\\\n\\\\tThe buffer size parameters allow performance to be tuned to the application. For example, a larger receive buffer should be used when the application expects to be receiving large amounts of data, especially from a host that is far away. These values are considered requests only; the underlying implementation will ensure that the buffer sizes actually used are within allowable bounds. Note that memory may be limited, so an application that keeps many sockets open should use smaller buffer sizes. Note the macintosh implementation ignores this buffer size. Also see setOption to get/set socket buffer sizes which allows you to set/get the current buffer sizes for reading and writing.\\\\n \\\\tIf semaIndex is > 0, it is taken to be the index of a Semaphore in the external objects array to be associated with this socket. This semaphore will be signalled when the socket status changes, such as when data arrives or a send completes. All processes waiting on the semaphore will be awoken for each such event; each process must then query the socket state to figure out if the conditions they are waiting for have been met. For example, a process waiting to send some data can see if the last send has completed.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketCreate' module: 'SocketPlugin'>\\\\n\\\\t^ nil  \\\\\\\"socket creation failed\\\\\\\"\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'JMM 5/22/2000 22:48'!\\\\nprimSocketCreateNetwork: netType type: socketType receiveBufferSize: rcvBufSize sendBufSize: sendBufSize semaIndex: semaIndex readSemaIndex: aReadSema writeSemaIndex: aWriteSema\\\\n\\\\t\\\\\\\"See comment in primSocketCreateNetwork: with one semaIndex. However you should know that some implementations\\\\n\\\\tignore the buffer size and this interface supports three semaphores,  one for open/close/listen and the other two for\\\\n\\\\treading and writing\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketCreate3Semaphores' module: 'SocketPlugin'>\\\\n\\\\tprimitiveOnlySupportsOneSemaphore _ true.\\\\n\\\\t^ self primSocketCreateNetwork: netType\\\\n\\\\t\\\\t\\\\ttype: socketType\\\\n\\\\t\\\\t\\\\treceiveBufferSize: rcvBufSize\\\\n\\\\t\\\\t\\\\tsendBufSize: sendBufSize\\\\n\\\\t\\\\t\\\\tsemaIndex: semaIndex! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketDestroy: socketID\\\\n\\\\t\\\\\\\"Release the resources associated with this socket. If a connection is open, it is aborted.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketDestroy' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketDestroyGently: socketID\\\\n\\\\t\\\\\\\"Release the resources associated with this socket. If a connection is open, it is aborted.\\\\n\\\\tDo not fail if the receiver is already closed.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketDestroy' module: 'SocketPlugin'>\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketError: socketID\\\\n\\\\t\\\\\\\"Return an integer encoding the most recent error on this socket. Zero means no error.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketError' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketLocalAddress: socketID\\\\n\\\\t\\\\\\\"Return the local host address for this socket.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketLocalAddress' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketLocalPort: socketID\\\\n\\\\t\\\\\\\"Return the local port for this socket, or zero if no port has yet been assigned.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketLocalPort' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketReceiveDataAvailable: socketID\\\\n\\\\t\\\\\\\"Return true if data may be available for reading from the current socket.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketReceiveDataAvailable' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketRemoteAddress: socketID\\\\n\\\\t\\\\\\\"Return the remote host address for this socket, or zero if no connection has been made.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketRemoteAddress' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketRemotePort: socketID\\\\n\\\\t\\\\\\\"Return the remote port for this socket, or zero if no connection has been made.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketRemotePort' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketSendDone: socketID\\\\n\\\\t\\\\\\\"Return true if there is no send in progress on the current socket.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketSendDone' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n\\\\n!OldSocket methodsFor: 'printing' stamp: 'jm 11/23/1998 11:57'!\\\\nprintOn: aStream\\\\n\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream nextPutAll: '[', self statusString, ']'.\\\\n! !\\\\n\\\\n\\\\n!OldSocket methodsFor: 'queries' stamp: 'jm 2/25/1999 13:52'!\\\\ndataAvailable\\\\n\\\\t\\\\\\\"Return true if this socket has unread received data.\\\\\\\"\\\\n\\\\n\\\\tsocketHandle == nil ifTrue: [^ false].\\\\n\\\\t^ self primSocketReceiveDataAvailable: socketHandle\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'queries' stamp: 'jm 2/25/1999 13:52'!\\\\nisConnected\\\\n\\\\t\\\\\\\"Return true if this socket is connected.\\\\\\\"\\\\n\\\\n\\\\tsocketHandle == nil ifTrue: [^ false].\\\\n\\\\t^ (self primSocketConnectionStatus: socketHandle) == Connected\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'queries' stamp: 'JMM 5/5/2000 12:15'!\\\\nisOtherEndClosed\\\\n\\\\t\\\\\\\"Return true if this socket had the other end closed.\\\\\\\"\\\\n\\\\n\\\\tsocketHandle == nil ifTrue: [^ false].\\\\n\\\\t^ (self primSocketConnectionStatus: socketHandle) == OtherEndClosed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'queries' stamp: 'JMM 5/5/2000 12:17'!\\\\nisThisEndClosed\\\\n\\\\t\\\\\\\"Return true if this socket had the this end closed.\\\\\\\"\\\\n\\\\n\\\\tsocketHandle == nil ifTrue: [^ false].\\\\n\\\\t^ (self primSocketConnectionStatus: socketHandle) == ThisEndClosed\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'queries' stamp: 'jm 2/25/1999 13:54'!\\\\nisUnconnected\\\\n\\\\t\\\\\\\"Return true if this socket's state is Unconnected.\\\\\\\"\\\\n\\\\n\\\\tsocketHandle == nil ifTrue: [^ false].\\\\n\\\\t^ (self primSocketConnectionStatus: socketHandle) == Unconnected\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'queries' stamp: 'jm 2/25/1999 13:54'!\\\\nisUnconnectedOrInvalid\\\\n\\\\t\\\\\\\"Return true if this socket is completely disconnected or is invalid.\\\\\\\"\\\\n\\\\n\\\\t| status |\\\\n\\\\tsocketHandle == nil ifTrue: [^ true].\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\t^ (status = Unconnected) | (status = InvalidSocket)\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'queries' stamp: 'jm 2/25/1999 13:51'!\\\\nisValid\\\\n\\\\t\\\\\\\"Return true if this socket contains a valid, non-nil socket handle.\\\\\\\"\\\\n\\\\n\\\\t| status |\\\\n\\\\tsocketHandle == nil ifTrue: [^ false].\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\t^ status ~= InvalidSocket\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'queries' stamp: 'jm 2/25/1999 13:54'!\\\\nisWaitingForConnection\\\\n\\\\t\\\\\\\"Return true if this socket is waiting for a connection.\\\\\\\"\\\\n\\\\n\\\\tsocketHandle == nil ifTrue: [^ false].\\\\n\\\\t^ (self primSocketConnectionStatus: socketHandle) == WaitingForConnection\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'queries' stamp: 'jm 2/25/1999 13:54'!\\\\nsendDone\\\\n\\\\t\\\\\\\"Return true if the most recent send operation on this socket has completed.\\\\\\\"\\\\n\\\\n\\\\tsocketHandle == nil ifTrue: [^ false].\\\\n\\\\t^ self primSocketSendDone: socketHandle\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'queries' stamp: 'JMM 5/8/2000 23:24'!\\\\nsocketError\\\\n\\\\t^self primSocketError: socketHandle! !\\\\n\\\\n!OldSocket methodsFor: 'queries' stamp: 'jm 2/25/1999 13:56'!\\\\nstatusString\\\\n\\\\t\\\\\\\"Return a string describing the status of this socket.\\\\\\\"\\\\n\\\\n\\\\t| status |\\\\n\\\\tsocketHandle == nil ifTrue: [^ 'destroyed'].\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\tstatus = InvalidSocket ifTrue: [^ 'invalidSocketHandle'].\\\\n\\\\tstatus = Unconnected ifTrue: [^ 'unconnected'].\\\\n\\\\tstatus = WaitingForConnection ifTrue: [^ 'waitingForConnection'].\\\\n\\\\tstatus = Connected ifTrue: [^ 'connected'].\\\\n\\\\tstatus = OtherEndClosed ifTrue: [^ 'otherEndClosedButNotThisEnd'].\\\\n\\\\tstatus = ThisEndClosed ifTrue: [^ 'thisEndClosedButNotOtherEnd'].\\\\n\\\\t^ 'unknown socket status'\\\\n! !\\\\n\\\\n\\\\n!OldSocket methodsFor: 'registry' stamp: 'ar 3/21/98 17:40'!\\\\nregister\\\\n\\\\t^self class register: self! !\\\\n\\\\n!OldSocket methodsFor: 'registry' stamp: 'ar 3/21/98 17:41'!\\\\nunregister\\\\n\\\\t^self class unregister: self! !\\\\n\\\\n\\\\n!OldSocket methodsFor: 'sending-receiving' stamp: 'jm 9/15/97 12:22'!\\\\ndiscardReceivedData\\\\n\\\\t\\\\\\\"Discard any data received up until now, and return the number of bytes discarded.\\\\\\\"\\\\n\\\\n\\\\t| buf totalBytesDiscarded |\\\\n\\\\tbuf _ String new: 10000.\\\\n\\\\ttotalBytesDiscarded _ 0.\\\\n\\\\t[self isConnected and: [self dataAvailable]] whileTrue: [\\\\n\\\\t\\\\ttotalBytesDiscarded _\\\\n\\\\t\\\\t\\\\ttotalBytesDiscarded + (self receiveDataInto: buf)].\\\\n\\\\t^ totalBytesDiscarded\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'sending-receiving' stamp: 'nk 2/24/2005 14:37'!\\\\ngetData\\\\n\\\\t\\\\\\\"Get some data\\\\\\\"\\\\n\\\\n\\\\t| buf bytesRead |\\\\n\\\\t(self waitForDataUntil: self class standardDeadline) \\\\n\\\\t\\\\tifFalse: [self error: 'getData timeout'].\\\\n\\\\tbuf := String new: 4000.\\\\n\\\\tbytesRead := self \\\\n\\\\t\\\\t\\\\t\\\\tprimSocket: socketHandle\\\\n\\\\t\\\\t\\\\t\\\\treceiveDataInto: buf\\\\n\\\\t\\\\t\\\\t\\\\tstartingAt: 1\\\\n\\\\t\\\\t\\\\t\\\\tcount: buf size.\\\\n\\\\t^buf copyFrom: 1 to: bytesRead! !\\\\n\\\\n!OldSocket methodsFor: 'sending-receiving' stamp: 'nk 2/24/2005 14:37'!\\\\nreadInto: aStringOrByteArray startingAt: aNumber \\\\n\\\\t\\\\\\\"Read data into the given buffer starting at the given index and return the number of bytes received. Note the given buffer may be only partially filled by the received data.\\\\\\\"\\\\n\\\\n\\\\t(self waitForDataUntil: self class standardDeadline) \\\\n\\\\t\\\\tifFalse: [self error: 'receive timeout'].\\\\n\\\\t^self \\\\n\\\\t\\\\tprimSocket: socketHandle\\\\n\\\\t\\\\treceiveDataInto: aStringOrByteArray\\\\n\\\\t\\\\tstartingAt: aNumber\\\\n\\\\t\\\\tcount: aStringOrByteArray size - aNumber + 1! !\\\\n\\\\n!OldSocket methodsFor: 'sending-receiving' stamp: 'jm 9/15/97 12:21'!\\\\nreceiveDataInto: aStringOrByteArray\\\\n\\\\t\\\\\\\"Receive data into the given buffer and return the number of bytes received. Note the given buffer may be only partially filled by the received data.\\\\\\\"\\\\n\\\\n\\\\t^ self primSocket: socketHandle\\\\n\\\\t\\\\treceiveDataInto: aStringOrByteArray\\\\n\\\\t\\\\tstartingAt: 1\\\\n\\\\t\\\\tcount: aStringOrByteArray size\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'sending-receiving' stamp: 'tak 3/16/2005 16:51'!\\\\nsendData: aStringOrByteArray\\\\n\\\\t\\\\\\\"Send all of the data in the given array, even if it requires multiple calls to send it all. Return the number of bytes sent.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"An experimental version use on slow lines: Longer timeout and smaller writes to try to avoid spurious timeouts.\\\\\\\"\\\\n\\\\n\\\\t| bytesSent bytesToSend count |\\\\n\\\\tbytesToSend _ aStringOrByteArray size.\\\\n\\\\tbytesSent _ 0.\\\\n\\\\t[bytesSent < bytesToSend] whileTrue: [\\\\n\\\\t\\\\t(self waitForSendDoneUntil: (Socket deadlineSecs: 60))\\\\n\\\\t\\\\t\\\\tifFalse: [ConnectionTimedOut signal: 'send data timeout; data not sent'].\\\\n\\\\t\\\\tcount _ self primSocket: socketHandle\\\\n\\\\t\\\\t\\\\tsendData: aStringOrByteArray\\\\n\\\\t\\\\t\\\\tstartIndex: bytesSent + 1\\\\n\\\\t\\\\t\\\\tcount: (bytesToSend - bytesSent min: 5000).\\\\n\\\\t\\\\tbytesSent _ bytesSent + count].\\\\n\\\\n\\\\t^ bytesSent\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'sending-receiving' stamp: 'ar 7/20/1999 17:23'!\\\\nsendData: buffer count: n\\\\n\\\\t\\\\\\\"Send the amount of data from the given buffer\\\\\\\"\\\\n\\\\t| sent |\\\\n\\\\tsent _ 0.\\\\n\\\\t[sent < n] whileTrue:[\\\\n\\\\t\\\\tsent _ sent + (self sendSomeData: buffer startIndex: sent+1 count: (n-sent))].! !\\\\n\\\\n!OldSocket methodsFor: 'sending-receiving' stamp: 'ls 1/5/1999 15:05'!\\\\nsendSomeData: aStringOrByteArray\\\\n\\\\t\\\\\\\"Send as much of the given data as possible and answer the number of bytes actually sent.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: This operation may have to be repeated multiple times to send a large amount of data.\\\\\\\"\\\\n\\\\n\\\\t^ self\\\\n\\\\t\\\\tsendSomeData: aStringOrByteArray\\\\n\\\\t\\\\tstartIndex: 1\\\\n\\\\t\\\\tcount: aStringOrByteArray size! !\\\\n\\\\n!OldSocket methodsFor: 'sending-receiving' stamp: 'ls 3/3/1999 18:59'!\\\\nsendSomeData: aStringOrByteArray startIndex: startIndex\\\\n\\\\t\\\\\\\"Send as much of the given data as possible starting at the given index. Answer the number of bytes actually sent.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: This operation may have to be repeated multiple times to send a large amount of data.\\\\\\\"\\\\n\\\\n\\\\t^ self\\\\n\\\\t\\\\tsendSomeData: aStringOrByteArray\\\\n\\\\t\\\\tstartIndex: startIndex\\\\n\\\\t\\\\tcount: (aStringOrByteArray size - startIndex + 1)! !\\\\n\\\\n!OldSocket methodsFor: 'sending-receiving' stamp: 'nk 2/24/2005 14:37'!\\\\nsendSomeData: aStringOrByteArray startIndex: startIndex count: count \\\\n\\\\t\\\\\\\"Send up to count bytes of the given data starting at the given index. Answer the number of bytes actually sent.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Note: This operation may have to be repeated multiple times to send a large amount of data.\\\\\\\"\\\\n\\\\n\\\\t| bytesSent |\\\\n\\\\t(self waitForSendDoneUntil: (self class deadlineSecs: 20)) \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[bytesSent := self \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tprimSocket: socketHandle\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsendData: aStringOrByteArray\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartIndex: startIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcount: count]\\\\n\\\\t\\\\tifFalse: [self error: 'send data timeout; data not sent'].\\\\n\\\\t^bytesSent! !\\\\n\\\\n\\\\n!OldSocket methodsFor: 'waiting' stamp: 'ar 7/20/1999 17:21'!\\\\nwaitForAcceptUntil: deadLine\\\\n\\\\t\\\\\\\"Wait and accept an incoming connection\\\\\\\"\\\\n\\\\tself waitForConnectionUntil: deadLine.\\\\n\\\\t^self isConnected\\\\n\\\\t\\\\tifTrue:[self accept]\\\\n\\\\t\\\\tifFalse:[nil]! !\\\\n\\\\n!OldSocket methodsFor: 'waiting' stamp: 'jm 3/2/98 18:15'!\\\\nwaitForConnectionUntil: deadline\\\\n\\\\t\\\\\\\"Wait up until the given deadline for a connection to be established. Return true if it is established by the deadline, false if not.\\\\\\\"\\\\n\\\\n\\\\t| status |\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\t[(status = WaitingForConnection) and: [Time millisecondClockValue < deadline]]\\\\n\\\\t\\\\twhileTrue: [\\\\n\\\\t\\\\t\\\\tsemaphore waitTimeoutMSecs: (deadline - Time millisecondClockValue).\\\\n\\\\t\\\\t\\\\tstatus _ self primSocketConnectionStatus: socketHandle].\\\\n\\\\n\\\\t^ status = Connected\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'waiting' stamp: 'JMM 5/22/2000 22:04'!\\\\nwaitForDataUntil: deadline\\\\n\\\\t\\\\\\\"Wait up until the given deadline for data to arrive. Return true if data arrives by the deadline, false if not.\\\\\\\"\\\\n\\\\n\\\\t| dataArrived |\\\\n\\\\t[self isConnected & \\\\n\\\\t (dataArrived _ self primSocketReceiveDataAvailable: socketHandle) not\\\\n\\\\t\\\\t\\\\t\\\\\\\"Connection end and final data can happen fast, so test in this order\\\\\\\"\\\\n\\\\t\\\\tand: [Time millisecondClockValue < deadline]] whileTrue: [\\\\n\\\\t\\\\t\\\\tself readSemaphore waitTimeoutMSecs: (deadline - Time millisecondClockValue)].\\\\n\\\\n\\\\t^ dataArrived\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'waiting' stamp: 'JMM 5/17/2000 14:52'!\\\\nwaitForDisconnectionUntil: deadline\\\\n\\\\t\\\\\\\"Wait up until the given deadline for the the connection to be broken. Return true if it is broken by the deadline, false if not.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: The client should know the the connect is really going to be closed (e.g., because he has called 'close' to send a close request to the other end) before calling this method.\\\\nJMM 00/5/17 note that other end can close which will terminate wait\\\\\\\"\\\\n\\\\n\\\\t| extraBytes status |\\\\n\\\\textraBytes _ 0.\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\t[((status = Connected) or: [(status = ThisEndClosed)]) and:\\\\n\\\\t [Time millisecondClockValue < deadline]] whileTrue: [\\\\n\\\\t\\\\tself dataAvailable\\\\n\\\\t\\\\t\\\\tifTrue: [extraBytes _ extraBytes + self discardReceivedData].\\\\n\\\\t\\\\tsemaphore waitTimeoutMSecs: (deadline - Time millisecondClockValue).\\\\n\\\\t\\\\tstatus _ self primSocketConnectionStatus: socketHandle].\\\\n\\\\n\\\\textraBytes > 0\\\\n\\\\t\\\\tifTrue: [self inform: 'Discarded ', extraBytes printString, ' bytes while closing connection.'].\\\\n\\\\n\\\\t^ status ~= Connected\\\\n! !\\\\n\\\\n!OldSocket methodsFor: 'waiting' stamp: 'JMM 5/22/2000 22:05'!\\\\nwaitForSendDoneUntil: deadline\\\\n\\\\t\\\\\\\"Wait up until the given deadline for the current send operation to complete. Return true if it completes by the deadline, false if not.\\\\\\\"\\\\n\\\\n\\\\t| sendDone |\\\\n\\\\t[self isConnected & (sendDone _ self primSocketSendDone: socketHandle) not\\\\n\\\\t\\\\t\\\\t\\\\\\\"Connection end and final data can happen fast, so test in this order\\\\\\\"\\\\n\\\\t\\\\tand: [Time millisecondClockValue < deadline]] whileTrue: [\\\\n\\\\t\\\\t\\\\tself writeSemaphore waitTimeoutMSecs: (deadline - Time millisecondClockValue)].\\\\n\\\\n\\\\t^ sendDone! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOldSocket class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OldSocket class methodsFor: 'class initialization' stamp: 'ar 12/12/2001 19:12'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Socket initialize\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Socket Types\\\\\\\"\\\\n\\\\tTCPSocketType _ 0.\\\\n\\\\tUDPSocketType _ 1.\\\\n\\\\n\\\\t\\\\\\\"Socket Status Values\\\\\\\"\\\\n\\\\tInvalidSocket _ -1.\\\\n\\\\tUnconnected _ 0.\\\\n\\\\tWaitingForConnection _ 1.\\\\n\\\\tConnected _ 2.\\\\n\\\\tOtherEndClosed _ 3.\\\\n\\\\tThisEndClosed _ 4.\\\\n\\\\n\\\\tRegistryThreshold _ 100. \\\\\\\"# of sockets\\\\\\\"! !\\\\n\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'nk 2/24/2005 14:38'!\\\\nclientServerTestUDP\\\\n\\\\t\\\\\\\"Socket clientServerTestUDP\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Performa 6400/200, Linux-PPC 2.1.24:\\\\n\\\\t\\\\tclient/server UDP test done; time = 2820\\\\n\\\\t\\\\t2500 packets, 10000000 bytes sent (3546 kBytes/sec)\\\\n\\\\t\\\\t2500 packets, 10000000 bytes received (3546 kBytes/sec)\\\\n\\\\t\\\\t4000 bytes/packet, 886 packets/sec, 0 packets dropped\\\\\\\"\\\\n\\\\n\\\\t| sock1 sock2 bytesToSend sendBuf receiveBuf done bytesSent bytesReceived packetsSent packetsReceived t |\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'starting client/server UDP test';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetworkIfFail: [^Transcript show: 'failed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'creating endpoints';\\\\n\\\\t\\\\tcr.\\\\n\\\\tsock1 := self newUDP.\\\\t\\\\\\\"the sender\\\\\\\"\\\\n\\\\tsock2 := self newUDP.\\\\t\\\\\\\"the recipient\\\\\\\"\\\\n\\\\tsock2 setPort: 54321.\\\\n\\\\tsock1 setPeer: NetNameResolver localHostAddress port: sock2 port.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'endpoints created';\\\\n\\\\t\\\\tcr.\\\\n\\\\tbytesToSend := 10000000.\\\\n\\\\tsendBuf := String new: 4000 withAll: $x.\\\\n\\\\treceiveBuf := String new: 50000.\\\\n\\\\tdone := false.\\\\n\\\\tbytesSent := bytesReceived := packetsSent := packetsReceived := 0.\\\\n\\\\tt := Time millisecondsToRun: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[[done] whileFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[(sock1 sendDone and: [bytesSent < bytesToSend]) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[packetsSent := packetsSent + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbytesSent := bytesSent + (sock1 sendData: sendBuf)].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsock2 dataAvailable \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[packetsReceived := packetsReceived + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbytesReceived := bytesReceived + (sock2 receiveDataInto: receiveBuf)].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdone := bytesSent >= bytesToSend].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsock1 waitForSendDoneUntil: self standardDeadline.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbytesReceived := bytesReceived + sock2 discardReceivedData].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'closing endpoints';\\\\n\\\\t\\\\tcr.\\\\n\\\\tsock1 close.\\\\n\\\\tsock2 close.\\\\n\\\\tsock1 destroy.\\\\n\\\\tsock2 destroy.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'client/server UDP test done; time = ' , t printString;\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: packetsSent printString , ' packets, ' , bytesSent printString \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, ' bytes sent (' , (bytesSent * 1000 // t) printString \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, ' Bytes/sec)';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: packetsReceived printString , ' packets, ' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, bytesReceived printString , ' bytes received (' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, (bytesReceived * 1000 // t) printString , ' Bytes/sec)';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: (bytesSent // packetsSent) printString , ' bytes/packet, ' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, (packetsReceived * 1000 // t) printString , ' packets/sec, ' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, (packetsSent - packetsReceived) printString , ' packets dropped';\\\\n\\\\t\\\\tcr! !\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'nk 2/24/2005 14:38'!\\\\nclientServerTestUDP2\\\\n\\\\t\\\\\\\"Socket clientServerTestUDP2\\\\\\\"\\\\n\\\\n\\\\t| sock1 sock2 bytesToSend sendBuf receiveBuf done bytesSent bytesReceived packetsSent packetsReceived t datagramInfo |\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'starting client/server UDP test';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetworkIfFail: [^Transcript show: 'failed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'creating endpoints';\\\\n\\\\t\\\\tcr.\\\\n\\\\tsock1 := self newUDP.\\\\t\\\\\\\"the sender\\\\\\\"\\\\n\\\\tsock2 := self newUDP.\\\\t\\\\\\\"the recipient\\\\\\\"\\\\n\\\\tsock2 setPort: 54321.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'endpoints created';\\\\n\\\\t\\\\tcr.\\\\n\\\\tbytesToSend := 100000000.\\\\n\\\\tsendBuf := String new: 4000 withAll: $x.\\\\n\\\\treceiveBuf := String new: 2000.\\\\n\\\\tdone := false.\\\\n\\\\tbytesSent := bytesReceived := packetsSent := packetsReceived := 0.\\\\n\\\\tt := Time millisecondsToRun: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[[done] whileFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[(sock1 sendDone and: [bytesSent < bytesToSend]) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[packetsSent := packetsSent + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbytesSent := bytesSent + (sock1 \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsendData: sendBuf\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttoHost: NetNameResolver localHostAddress\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tport: sock2 port)].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsock2 dataAvailable \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[packetsReceived := packetsReceived + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdatagramInfo := sock2 receiveUDPDataInto: receiveBuf.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbytesReceived := bytesReceived + (datagramInfo at: 1)].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdone := bytesSent >= bytesToSend].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsock1 waitForSendDoneUntil: self standardDeadline.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbytesReceived := bytesReceived + sock2 discardReceivedData].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'closing endpoints';\\\\n\\\\t\\\\tcr.\\\\n\\\\tsock1 close.\\\\n\\\\tsock2 close.\\\\n\\\\tsock1 destroy.\\\\n\\\\tsock2 destroy.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'client/server UDP test done; time = ' , t printString;\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: packetsSent printString , ' packets, ' , bytesSent printString \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, ' bytes sent (' , (bytesSent * 1000 // t) printString \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, ' Bytes/sec)';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: packetsReceived printString , ' packets, ' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, bytesReceived printString , ' bytes received (' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, (bytesReceived * 1000 // t) printString , ' Bytes/sec)';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: (bytesSent // packetsSent) printString , ' bytes/packet, ' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, (packetsReceived * 1000 // t) printString , ' packets/sec, ' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, (packetsSent - packetsReceived) printString , ' packets dropped';\\\\n\\\\t\\\\tcr! !\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'rbb 3/1/2005 11:02'!\\\\nremoteTestClientTCP\\\\n\\\\t\\\\\\\"FIRST start up another image, and execute: Socket remoteTestServerTCP.\\\\n\\\\tTHEN come back to this image and execute:\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Socket remoteTestClientTCP\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Performa 6400/200, Linux-PPC 2.1.24, both images on same CPU:\\\\n\\\\t\\\\tremoteClient TCP test done; time = 5680\\\\n\\\\t\\\\t250 packets, 1000000 bytes sent (176 kBytes/sec)\\\\n\\\\t\\\\t60 packets, 1000000 bytes received (176 kBytes/sec)\\\\\\\"\\\\n\\\\n\\\\t| socket bytesToSend sendBuf receiveBuf done bytesSent bytesReceived packetsSent packetsReceived t serverName |\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'starting client/server TCP test';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetworkIfFail: [^Transcript show: 'failed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tsocket := self newTCP.\\\\n\\\\tserverName := UIManager default request: 'What is your remote Test Server?'\\\\n\\\\t\\\\t\\\\t\\\\tinitialAnswer: ''.\\\\n\\\\tsocket connectTo: (NetNameResolver addressFromString: serverName)\\\\n\\\\t\\\\tport: 54321.\\\\n\\\\tsocket waitForConnectionUntil: self standardDeadline.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'client endpoint created';\\\\n\\\\t\\\\tcr.\\\\n\\\\tbytesToSend := 1000000.\\\\n\\\\tsendBuf := String new: 4000 withAll: $x.\\\\n\\\\treceiveBuf := String new: 50000.\\\\n\\\\tdone := false.\\\\n\\\\tbytesSent := bytesReceived := packetsSent := packetsReceived := 0.\\\\n\\\\tt := Time millisecondsToRun: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[[done] whileFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[(socket sendDone and: [bytesSent < bytesToSend]) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[packetsSent := packetsSent + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbytesSent := bytesSent + (socket sendData: sendBuf)].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsocket dataAvailable \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[packetsReceived := packetsReceived + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbytesReceived := bytesReceived + (socket receiveDataInto: receiveBuf)].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdone := bytesSent >= bytesToSend].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[bytesReceived < bytesToSend] whileTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[socket dataAvailable \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[packetsReceived := packetsReceived + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbytesReceived := bytesReceived + (socket receiveDataInto: receiveBuf)]]].\\\\n\\\\tsocket closeAndDestroy.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'remoteClient TCP test done; time = ' , t printString;\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: packetsSent printString , ' packets, ' , bytesSent printString \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, ' bytes sent (' , (bytesSent * 1000 // t) printString \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, ' bytes/sec)';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: packetsReceived printString , ' packets, ' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, bytesReceived printString , ' bytes received (' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, (bytesReceived * 1000 // t) printString , ' bytes/sec)';\\\\n\\\\t\\\\tcr! !\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'rbb 3/1/2005 11:02'!\\\\nremoteTestClientTCPOpenClose1000\\\\n\\\\t\\\\\\\"Socket remoteTestClientTCPOpenClose1000\\\\\\\"\\\\n\\\\n\\\\t| number t1 socket serverName |\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'starting client/server TCP test';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetworkIfFail: [^Transcript show: 'failed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tnumber := 1000.\\\\n\\\\tserverName := UIManager default request: 'What is your remote Test Server?'\\\\n\\\\t\\\\t\\\\t\\\\tinitialAnswer: ''.\\\\n\\\\tt1 := Time millisecondsToRun: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[number timesRepeat: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[socket := self newTCP.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsocket connectTo: (NetNameResolver addressFromString: serverName)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tport: 54321.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsocket waitForConnectionUntil: self standardDeadline.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsocket closeAndDestroy]].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tcr;\\\\n\\\\t\\\\tshow: 'connects/close per second ' , (number / t1 * 1000.0) printString;\\\\n\\\\t\\\\tcr! !\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'rbb 3/1/2005 11:03'!\\\\nremoteTestClientTCPOpenClosePutGet\\\\n\\\\t\\\\\\\"Socket remoteTestClientTCPOpenClosePutGet\\\\\\\"\\\\n\\\\n\\\\t| checkLength number bytesExpected sendBuf receiveBuf t1 socket bytesReceived serverName |\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'starting client/server TCP test';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetworkIfFail: [^Transcript show: 'failed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tserverName := UIManager default request: 'What is your remote Test Server?'\\\\n\\\\t\\\\t\\\\t\\\\tinitialAnswer: ''.\\\\n\\\\tnumber := 1000.\\\\n\\\\tbytesExpected := 20000.\\\\n\\\\tsendBuf := String new: 80 withAll: $x.\\\\n\\\\treceiveBuf := String new: 50000.\\\\n\\\\tt1 := Time millisecondsToRun: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[number timesRepeat: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[socket := self newTCP.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsocket connectTo: (NetNameResolver addressFromString: serverName)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tport: 54321.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsocket waitForConnectionUntil: self standardDeadline.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsocket sendData: sendBuf.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsocket waitForSendDoneUntil: (self deadlineSecs: 5).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsocket waitForDataUntil: (self deadlineSecs: 5).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbytesReceived := 0.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[bytesReceived < bytesExpected] whileTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[checkLength := socket receiveDataInto: receiveBuf.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbytesReceived := bytesReceived + checkLength].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsocket closeAndDestroy]].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tcr;\\\\n\\\\t\\\\tshow: 'connects/get/put/close per second ' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, (number / t1 * 1000.0) printString;\\\\n\\\\t\\\\tcr! !\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'rbb 3/1/2005 11:03'!\\\\nremoteTestClientUDP\\\\n\\\\t\\\\\\\"FIRST start up another image, and execute: Socket remoteTestServerUDP.\\\\n\\\\tTHEN come back to this image and execute:\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Socket remoteTestClientUDP\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Performa 6400/200, Linux-PPC 2.1.24:\\\\n\\\\t\\\\tremoteClient UDP test done; time = 4580\\\\n\\\\t\\\\t2500 packets, 10000000 bytes sent (2183 kBytes/sec)\\\\n\\\\t\\\\t180 packets, 720000 bytes received (157 kBytes/sec)\\\\n\\\\t\\\\t4000 bytes/packet, 39 packets/sec, 2320 packets dropped\\\\\\\"\\\\n\\\\n\\\\t| socket bytesToSend sendBuf receiveBuf done bytesSent bytesReceived packetsSent packetsReceived t serverName |\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'starting client/server UDP test';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetworkIfFail: [^Transcript show: 'failed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tserverName := UIManager default request: 'What is your remote Test Server?'\\\\n\\\\t\\\\t\\\\t\\\\tinitialAnswer: ''.\\\\n\\\\tsocket := self newUDP.\\\\n\\\\tsocket setPeer: (NetNameResolver addressFromString: serverName) port: 54321.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'client endpoint created';\\\\n\\\\t\\\\tcr.\\\\n\\\\tbytesToSend := 10000000.\\\\n\\\\tsendBuf := String new: 4000 withAll: $x.\\\\n\\\\treceiveBuf := String new: 4000.\\\\n\\\\tdone := false.\\\\n\\\\tbytesSent := bytesReceived := packetsSent := packetsReceived := 0.\\\\n\\\\tt := Time millisecondsToRun: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[[done] whileFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[(socket sendDone and: [bytesSent < bytesToSend]) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[packetsSent := packetsSent + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbytesSent := bytesSent + (socket sendData: sendBuf)].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsocket dataAvailable \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[packetsReceived := packetsReceived + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbytesReceived := bytesReceived + (socket receiveDataInto: receiveBuf)].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdone := bytesSent >= bytesToSend].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[socket waitForDataUntil: (self deadlineSecs: 1).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsocket dataAvailable] \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[packetsReceived := packetsReceived + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbytesReceived := bytesReceived + (socket receiveDataInto: receiveBuf)]].\\\\n\\\\tsocket closeAndDestroy.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'remoteClient UDP test done; time = ' , t printString;\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: packetsSent printString , ' packets, ' , bytesSent printString \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, ' bytes sent (' , (bytesSent * 1000 // t) printString \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, ' bytes/sec)';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: packetsReceived printString , ' packets, ' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, bytesReceived printString , ' bytes received (' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, (bytesReceived * 1000 // t) printString , ' bytes/sec)';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: (bytesSent // packetsSent) printString , ' bytes/packet, ' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, (packetsReceived * 1000 // t) printString , ' packets/sec, ' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, (packetsSent - packetsReceived) printString , ' packets dropped';\\\\n\\\\t\\\\tcr! !\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'nk 2/24/2005 14:38'!\\\\nremoteTestServerTCP\\\\n\\\\t\\\\\\\"See remoteTestClientTCP for instructions on running this method.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"OldSocket remoteTestServerTCP\\\\\\\"\\\\n\\\\n\\\\t| socket client buffer n |\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetwork.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tsocket := OldSocket newTCP.\\\\n\\\\tsocket \\\\n\\\\t\\\\tlistenOn: 54321\\\\n\\\\t\\\\tbacklogSize: 5\\\\n\\\\t\\\\tinterface: (NetNameResolver addressFromString: '127.0.0.1').\\\\t\\\\\\\"or: 0.0.0.0\\\\\\\"\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'server endpoint created -- run client test in other image';\\\\n\\\\t\\\\tcr.\\\\n\\\\tbuffer := String new: 4000.\\\\n\\\\tsocket waitForConnectionUntil: self standardDeadline.\\\\n\\\\tclient := socket accept.\\\\n\\\\t[client isConnected] whileTrue: \\\\n\\\\t\\\\t\\\\t[client dataAvailable \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[n := client receiveDataInto: buffer.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tclient sendData: buffer count: n]].\\\\n\\\\tclient closeAndDestroy.\\\\n\\\\tsocket closeAndDestroy.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tcr;\\\\n\\\\t\\\\tshow: 'server endpoint destroyed';\\\\n\\\\t\\\\tcr.\\\\n\\\\t^socket! !\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'nk 2/24/2005 14:38'!\\\\nremoteTestServerTCPOpenClose1000\\\\n\\\\t\\\\\\\"The version of #remoteTestServerTCPOpenClose1000 using the BSD style accept() mechanism.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Socket remoteTestServerTCPOpenClose1000\\\\\\\"\\\\n\\\\n\\\\t| socket server |\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetworkIfFail: [^Transcript show: 'failed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tserver := self newTCP.\\\\n\\\\tserver listenOn: 54321 backlogSize: 20.\\\\n\\\\tserver isValid ifFalse: [self error: 'Accept() is not supported'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'server endpoint created -- run client test in other image';\\\\n\\\\t\\\\tcr.\\\\n\\\\t1000 timesRepeat: \\\\n\\\\t\\\\t\\\\t[socket := server waitForAcceptUntil: (self deadlineSecs: 300).\\\\n\\\\t\\\\t\\\\tsocket closeAndDestroy].\\\\n\\\\tserver closeAndDestroy.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tcr;\\\\n\\\\t\\\\tshow: 'server endpoint destroyed';\\\\n\\\\t\\\\tcr! !\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'nk 2/24/2005 14:38'!\\\\nremoteTestServerTCPOpenClosePutGet\\\\n\\\\t\\\\\\\"The version of #remoteTestServerTCPOpenClosePutGet using the BSD style accept() mechanism.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Socket remoteTestServerTCPOpenClosePutGet\\\\\\\"\\\\n\\\\n\\\\t| socket server bytesIWantToSend bytesExpected receiveBuf sendBuf checkLength |\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetworkIfFail: [^Transcript show: 'failed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tserver := self newTCP.\\\\n\\\\tserver listenOn: 54321 backlogSize: 20.\\\\n\\\\tserver isValid ifFalse: [self error: 'Accept() is not supported'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'server endpoint created -- run client test in other image';\\\\n\\\\t\\\\tcr.\\\\n\\\\tbytesIWantToSend := 20000.\\\\n\\\\tbytesExpected := 80.\\\\n\\\\treceiveBuf := String new: 40000.\\\\n\\\\tsendBuf := String new: bytesIWantToSend withAll: $x.\\\\n\\\\t1000 timesRepeat: \\\\n\\\\t\\\\t\\\\t[socket := server waitForAcceptUntil: (self deadlineSecs: 300).\\\\n\\\\t\\\\t\\\\tsocket waitForDataUntil: (self deadlineSecs: 5).\\\\n\\\\t\\\\t\\\\tcheckLength := socket receiveDataInto: receiveBuf.\\\\n\\\\t\\\\t\\\\tcheckLength ~= bytesExpected ifTrue: [self halt].\\\\n\\\\t\\\\t\\\\tsocket sendData: sendBuf.\\\\n\\\\t\\\\t\\\\tsocket waitForSendDoneUntil: (self deadlineSecs: 5).\\\\n\\\\t\\\\t\\\\tsocket closeAndDestroy].\\\\n\\\\tserver closeAndDestroy.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tcr;\\\\n\\\\t\\\\tshow: 'server endpoint destroyed';\\\\n\\\\t\\\\tcr! !\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'nk 2/24/2005 14:38'!\\\\nremoteTestServerTCPUsingAccept\\\\n\\\\t\\\\\\\"The version of #remoteTestServer using the BSD style accept() mechanism.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Socket remoteTestServerTCPUsingAccept\\\\\\\"\\\\n\\\\n\\\\t| socket buffer n server |\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetworkIfFail: [^Transcript show: 'failed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tserver := self newTCP.\\\\n\\\\tserver listenOn: 54321 backlogSize: 4.\\\\n\\\\tserver isValid ifFalse: [self error: 'Accept() is not supported'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'server endpoint created -- run client test in other image';\\\\n\\\\t\\\\tcr.\\\\n\\\\tbuffer := String new: 40000.\\\\n\\\\t10 timesRepeat: \\\\n\\\\t\\\\t\\\\t[socket := server waitForAcceptUntil: (self deadlineSecs: 300).\\\\n\\\\t\\\\t\\\\t[socket isConnected] whileTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[socket dataAvailable \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[n := socket receiveDataInto: buffer.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsocket sendData: buffer count: n]]].\\\\n\\\\tsocket closeAndDestroy.\\\\n\\\\tserver closeAndDestroy.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tcr;\\\\n\\\\t\\\\tshow: 'server endpoint destroyed';\\\\n\\\\t\\\\tcr! !\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'nk 2/24/2005 14:38'!\\\\nremoteTestServerUDP\\\\n\\\\t\\\\\\\"See remoteTestClientUDP for instructions on running this method.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Socket remoteTestServerUDP\\\\\\\"\\\\n\\\\n\\\\t| socket buffer n |\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetworkIfFail: [^Transcript show: 'failed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tsocket := self newUDP.\\\\n\\\\tsocket setPort: 54321.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'server endpoint created -- run client test in other image';\\\\n\\\\t\\\\tcr.\\\\n\\\\tbuffer := String new: 4000.\\\\n\\\\t[true] whileTrue: \\\\n\\\\t\\\\t\\\\t[socket dataAvailable \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[n := socket receiveDataInto: buffer.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsocket sendData: buffer count: n]]! !\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'nk 2/24/2005 14:38'!\\\\nremoteTestServerUDP2\\\\n\\\\t\\\\\\\"See remoteTestClientUDP for instructions on running this method.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Socket remoteTestServerUDP2\\\\\\\"\\\\n\\\\n\\\\t| socket buffer datagramInfo |\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetworkIfFail: [^Transcript show: 'failed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tsocket := self newUDP.\\\\n\\\\tsocket setPort: 54321.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'server endpoint created -- run client test in other image';\\\\n\\\\t\\\\tcr.\\\\n\\\\tbuffer := String new: 65000.\\\\n\\\\t[true] whileTrue: \\\\n\\\\t\\\\t\\\\t[socket dataAvailable \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[datagramInfo := socket receiveUDPDataInto: buffer.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tTranscript\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tshow: datagramInfo printString;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcr.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsocket sendData: buffer count: (datagramInfo at: 1)]]! !\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'nk 2/24/2005 14:38'!\\\\nremoteTestSinkTCP\\\\n\\\\t\\\\\\\"See sendTest for instructions on running this method.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Socket remoteTestSinkTCP\\\\\\\"\\\\n\\\\n\\\\t| socket buffer n |\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetworkIfFail: [^Transcript show: 'failed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tsocket := self newTCP.\\\\n\\\\tsocket listenOn: 9.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'server endpoint created -- run client test in other image';\\\\n\\\\t\\\\tcr.\\\\n\\\\tbuffer := String new: 64000.\\\\n\\\\tsocket waitForConnectionUntil: self standardDeadline.\\\\n\\\\t[socket isConnected] whileTrue: \\\\n\\\\t\\\\t\\\\t[socket dataAvailable ifTrue: [n := socket receiveDataInto: buffer]].\\\\n\\\\tsocket closeAndDestroy.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tcr;\\\\n\\\\t\\\\tshow: 'sink endpoint destroyed';\\\\n\\\\t\\\\tcr! !\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'rbb 3/1/2005 11:03'!\\\\ntimeTest\\\\n\\\\t\\\\\\\"OldSocket timeTest\\\\\\\"\\\\n\\\\n\\\\t| serverName serverAddr s |\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetworkIfFail: [^Transcript show: 'failed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tserverName := UIManager default request: 'What is your time server?'\\\\n\\\\t\\\\t\\\\t\\\\tinitialAnswer: 'localhost'.\\\\n\\\\tserverName isEmpty \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[^Transcript\\\\n\\\\t\\\\t\\\\t\\\\tshow: 'never mind';\\\\n\\\\t\\\\t\\\\t\\\\tcr].\\\\n\\\\tserverAddr := NetNameResolver addressForName: serverName timeout: 10.\\\\n\\\\tserverAddr = nil \\\\n\\\\t\\\\tifTrue: [self error: 'Could not find the address for ' , serverName].\\\\n\\\\ts := self new.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: '---------- Connecting ----------';\\\\n\\\\t\\\\tcr.\\\\n\\\\ts connectTo: serverAddr port: 13.\\\\t\\\\\\\"13 is the 'daytime' port number\\\\\\\"\\\\n\\\\ts waitForConnectionUntil: (self deadlineSecs: 1).\\\\n\\\\tTranscript show: 'the time server reports: ' , s getResponseNoLF.\\\\n\\\\ts closeAndDestroy.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: '---------- Connection Closed ----------';\\\\n\\\\t\\\\tcr! !\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'rbb 3/1/2005 11:03'!\\\\ntimeTestUDP\\\\n\\\\t\\\\\\\"Socket timeTestUDP\\\\\\\"\\\\n\\\\n\\\\t| serverName serverAddr s |\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetworkIfFail: [^Transcript show: 'failed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tserverName := UIManager default request: 'What is your time server?'\\\\n\\\\t\\\\t\\\\t\\\\tinitialAnswer: 'localhost'.\\\\n\\\\tserverName isEmpty \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[^Transcript\\\\n\\\\t\\\\t\\\\t\\\\tshow: 'never mind';\\\\n\\\\t\\\\t\\\\t\\\\tcr].\\\\n\\\\tserverAddr := NetNameResolver addressForName: serverName timeout: 10.\\\\n\\\\tserverAddr = nil \\\\n\\\\t\\\\tifTrue: [self error: 'Could not find the address for ' , serverName].\\\\n\\\\ts := self newUDP.\\\\t\\\\\\\"a 'random' port number will be allocated by the system\\\\\\\"\\\\n\\\\t\\\\\\\"Send a packet to the daytime port and it will reply with the current date.\\\\\\\"\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: '---------- Sending datagram from port ' , s port printString \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, ' ----------';\\\\n\\\\t\\\\tcr.\\\\n\\\\ts \\\\n\\\\t\\\\tsendData: '!!'\\\\n\\\\t\\\\ttoHost: serverAddr\\\\n\\\\t\\\\tport: 13.\\\\t\\\\\\\"13 is the daytime service\\\\\\\"\\\\n\\\\tTranscript show: 'the time server reports: ' , s getResponseNoLF.\\\\n\\\\ts closeAndDestroy.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: '---------- Socket closed ----------';\\\\n\\\\t\\\\tcr! !\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'rbb 3/1/2005 11:03'!\\\\ntimeTestUDP2\\\\n\\\\t\\\\\\\"Socket timeTestUDP2\\\\\\\"\\\\n\\\\n\\\\t| serverName serverAddr s |\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetworkIfFail: [^Transcript show: 'failed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tserverName := UIManager default request: 'What is your time server?'\\\\n\\\\t\\\\t\\\\t\\\\tinitialAnswer: 'localhost'.\\\\n\\\\tserverName isEmpty \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[^Transcript\\\\n\\\\t\\\\t\\\\t\\\\tshow: 'never mind';\\\\n\\\\t\\\\t\\\\t\\\\tcr].\\\\n\\\\tserverAddr := NetNameResolver addressForName: serverName timeout: 10.\\\\n\\\\tserverAddr = nil \\\\n\\\\t\\\\tifTrue: [self error: 'Could not find the address for ' , serverName].\\\\n\\\\ts := self newUDP.\\\\n\\\\t\\\\\\\"The following associates a port with the UDP socket, but does NOT create a connectable endpoint\\\\\\\"\\\\n\\\\ts setPort: 54321.\\\\n\\\\t\\\\\\\"Send a packet to the daytime port and it will reply with the current date.\\\\\\\"\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: '---------- Sending datagram from port ' , s port printString \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, ' ----------';\\\\n\\\\t\\\\tcr.\\\\n\\\\ts \\\\n\\\\t\\\\tsendData: '!!'\\\\n\\\\t\\\\ttoHost: serverAddr\\\\n\\\\t\\\\tport: 13.\\\\n\\\\tTranscript show: 'the time server reports: ' , s getResponseNoLF.\\\\n\\\\ts closeAndDestroy.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: '---------- Socket closed ----------';\\\\n\\\\t\\\\tcr! !\\\\n\\\\n!OldSocket class methodsFor: 'examples' stamp: 'rbb 3/1/2005 11:03'!\\\\ntimeTestUDP3\\\\n\\\\t\\\\\\\"Socket timeTestUDP3\\\\\\\"\\\\n\\\\n\\\\t| serverName serverAddr s |\\\\n\\\\tTranscript show: 'initializing network ... '.\\\\n\\\\tself initializeNetworkIfFail: [^Transcript show: 'failed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'ok';\\\\n\\\\t\\\\tcr.\\\\n\\\\tserverName := UIManager default request: 'What is your time server?'\\\\n\\\\t\\\\t\\\\t\\\\tinitialAnswer: 'localhost'.\\\\n\\\\tserverName isEmpty \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[^Transcript\\\\n\\\\t\\\\t\\\\t\\\\tshow: 'never mind';\\\\n\\\\t\\\\t\\\\t\\\\tcr].\\\\n\\\\tserverAddr := NetNameResolver addressForName: serverName timeout: 10.\\\\n\\\\tserverAddr = nil \\\\n\\\\t\\\\tifTrue: [self error: 'Could not find the address for ' , serverName].\\\\n\\\\ts := self newUDP.\\\\n\\\\t\\\\\\\"The following associates a port with the UDP socket, but does NOT create a connectable endpoint\\\\\\\"\\\\n\\\\ts setPort: self wildcardPort.\\\\t\\\\\\\"explicitly request a default port number\\\\\\\"\\\\n\\\\t\\\\\\\"Send a packet to the daytime port and it will reply with the current date.\\\\\\\"\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: '---------- Sending datagram from port ' , s port printString \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, ' ----------';\\\\n\\\\t\\\\tcr.\\\\n\\\\ts \\\\n\\\\t\\\\tsendData: '!!'\\\\n\\\\t\\\\ttoHost: serverAddr\\\\n\\\\t\\\\tport: 13.\\\\n\\\\tTranscript show: 'the time server reports: ' , s getResponseNoLF.\\\\n\\\\ts closeAndDestroy.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: '---------- Socket closed ----------';\\\\n\\\\t\\\\tcr! !\\\\n\\\\n\\\\n!OldSocket class methodsFor: 'instance creation' stamp: 'ls 9/24/1999 09:45'!\\\\nacceptFrom: aSocket\\\\n\\\\t^[ super new acceptFrom: aSocket ]\\\\n\\\\t\\\\trepeatWithGCIf: [ :sock | sock isValid not ]! !\\\\n\\\\n!OldSocket class methodsFor: 'instance creation' stamp: 'ar 4/30/1999 04:15'!\\\\ncreateIfFail: failBlock\\\\n\\\\t\\\\\\\"Attempt to create a new socket. If successful, return the new socket. Otherwise, return the result of evaluating the given block. Socket creation can fail if the network isn't available or if there are not sufficient resources available to create another socket.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: The default creates a TCP socket\\\\\\\"\\\\n\\\\t^self tcpCreateIfFail: failBlock! !\\\\n\\\\n!OldSocket class methodsFor: 'instance creation' stamp: 'ar 4/30/1999 04:13'!\\\\nnew\\\\n\\\\t\\\\\\\"Return a new, unconnected Socket. Note that since socket creation may fail, it is safer to use the method createIfFail: to handle such failures gracefully; this method is primarily for backward compatibility and may be disallowed in a future release.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: The default creates a TCP socket - this is also backward compatibility.\\\\\\\"\\\\n\\\\t^self newTCP! !\\\\n\\\\n!OldSocket class methodsFor: 'instance creation' stamp: 'ls 9/24/1999 10:19'!\\\\nnewTCP\\\\n\\\\t\\\\\\\"Create a socket and initialise it for TCP\\\\\\\"\\\\n\\\\t^[ super new initialize: TCPSocketType ]\\\\n\\\\t\\\\trepeatWithGCIf: [ :socket | socket isValid not ]! !\\\\n\\\\n!OldSocket class methodsFor: 'instance creation' stamp: 'ls 9/24/1999 09:44'!\\\\nnewUDP\\\\n\\\\t\\\\\\\"Create a socket and initialise it for UDP\\\\\\\"\\\\n\\\\t^[ super new initialize: UDPSocketType ]\\\\n\\\\t\\\\trepeatWithGCIf: [ :socket | socket isValid not ]! !\\\\n\\\\n!OldSocket class methodsFor: 'instance creation' stamp: 'ar 4/30/1999 04:14'!\\\\ntcpCreateIfFail: failBlock\\\\n\\\\t\\\\\\\"Attempt to create a new socket. If successful, return the new socket. Otherwise, return the result of evaluating the given block. Socket creation can fail if the network isn't available or if there are not sufficient resources available to create another socket.\\\\\\\"\\\\n\\\\n\\\\t| sock |\\\\n\\\\tsock _ super new initialize: TCPSocketType.\\\\n\\\\tsock isValid ifFalse: [^ failBlock value].\\\\n\\\\t^ sock\\\\n! !\\\\n\\\\n!OldSocket class methodsFor: 'instance creation' stamp: 'ar 4/30/1999 04:14'!\\\\nudpCreateIfFail: failBlock\\\\n\\\\t\\\\\\\"Attempt to create a new socket. If successful, return the new socket. Otherwise, return the result of evaluating the given block. Socket creation can fail if the network isn't available or if there are not sufficient resources available to create another socket.\\\\\\\"\\\\n\\\\n\\\\t| sock |\\\\n\\\\tsock _ super new initialize: UDPSocketType.\\\\n\\\\tsock isValid ifFalse: [^ failBlock value].\\\\n\\\\t^ sock\\\\n! !\\\\n\\\\n\\\\n!OldSocket class methodsFor: 'network initialization' stamp: 'nk 2/24/2005 14:38'!\\\\nensureNetworkConnected\\\\n\\\\t\\\\\\\"Try to ensure that an intermittent network connection, such as a dialup or ISDN line, is actually connected. This is necessary to make sure a server is visible in order to accept an incoming connection.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Socket ensureNetworkConnected\\\\\\\"\\\\n\\\\n\\\\tself initializeNetwork.\\\\n\\\\tUtilities informUser: 'Contacting domain name server...'\\\\n\\\\t\\\\tduring: \\\\n\\\\t\\\\t\\\\t[NetNameResolver addressForName: 'bogusNameToForceDNSToBeConsulted.org'\\\\n\\\\t\\\\t\\\\t\\\\ttimeout: 30]! !\\\\n\\\\n!OldSocket class methodsFor: 'network initialization' stamp: 'mir 11/14/2002 19:36'!\\\\ninitializeNetwork\\\\n\\\\t\\\\\\\"Initialize the network drivers and the NetNameResolver. Do nothing if the network is already initialized.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: The network must be re-initialized every time Squeak starts up, so applications that persist across snapshots should be prepared to re-initialize the network as needed. Such applications should call 'Socket initializeNetwork' before every network transaction. \\\\\\\"\\\\n\\\\n\\\\tNetNameResolver initializeNetwork! !\\\\n\\\\n!OldSocket class methodsFor: 'network initialization' stamp: 'mir 11/14/2002 19:36'!\\\\ninitializeNetworkIfFail: failBlock\\\\n\\\\t\\\\\\\"Initialize the network drivers. Do nothing if the network is already initialized. Evaluate the given block if network initialization fails, perhaps because this computer isn't currently connected to a network.\\\\\\\"\\\\n\\\\n\\\\tNetNameResolver initializeNetwork! !\\\\n\\\\n\\\\n!OldSocket class methodsFor: 'registry' stamp: 'ar 10/7/1998 14:40'!\\\\nregister: anObject\\\\n\\\\tWeakArray isFinalizationSupported ifFalse:[^anObject].\\\\n\\\\tself registry add: anObject! !\\\\n\\\\n!OldSocket class methodsFor: 'registry' stamp: 'ar 10/7/1998 14:40'!\\\\nregistry\\\\n\\\\tWeakArray isFinalizationSupported ifFalse:[^nil].\\\\n\\\\t^Registry isNil\\\\n\\\\t\\\\tifTrue:[Registry := WeakRegistry new]\\\\n\\\\t\\\\tifFalse:[Registry].! !\\\\n\\\\n!OldSocket class methodsFor: 'registry' stamp: 'ar 12/12/2001 19:12'!\\\\nregistryThreshold\\\\n\\\\t\\\\\\\"Return the registry threshold above which socket creation may fail due to too many already open sockets. If the threshold is reached, a full GC will be issued if the creation of a socket fails.\\\\\\\"\\\\n\\\\t^RegistryThreshold! !\\\\n\\\\n!OldSocket class methodsFor: 'registry' stamp: 'ar 12/12/2001 19:12'!\\\\nregistryThreshold: aNumber\\\\n\\\\t\\\\\\\"Return the registry threshold above which socket creation may fail due to too many already open sockets. If the threshold is reached, a full GC will be issued if the creation of a socket fails.\\\\\\\"\\\\n\\\\tRegistryThreshold _ aNumber! !\\\\n\\\\n!OldSocket class methodsFor: 'registry' stamp: 'ar 10/7/1998 15:22'!\\\\nunregister: anObject\\\\n\\\\tWeakArray isFinalizationSupported ifFalse:[^anObject].\\\\n\\\\tself registry remove: anObject ifAbsent:[]! !\\\\n\\\\n\\\\n\\\\n!OldSocket class methodsFor: 'utilities' stamp: 'tk 4/9/98 15:54'!\\\\ndeadServer\\\\n\\\\n\\\\t^ DeadServer! !\\\\n\\\\n!OldSocket class methodsFor: 'utilities' stamp: 'tk 4/9/98 15:56'!\\\\ndeadServer: aStringOrNil\\\\n\\\\t\\\\\\\"Keep the machine name of the most recently encoutered non-responding machine.  Next time the user can move it to the last in a list of servers to try.\\\\\\\"\\\\n\\\\n\\\\tDeadServer _ aStringOrNil! !\\\\n\\\\n!OldSocket class methodsFor: 'utilities' stamp: 'jm 9/15/97 06:56'!\\\\ndeadlineSecs: secs\\\\n\\\\t\\\\\\\"Return a deadline time the given number of seconds from now.\\\\\\\"\\\\n\\\\n\\\\t^ Time millisecondClockValue + (secs * 1000)\\\\n! !\\\\n\\\\n!OldSocket class methodsFor: 'utilities' stamp: 'jm 1/14/1999 12:13'!\\\\nnameForWellKnownTCPPort: portNum\\\\n\\\\t\\\\\\\"Answer the name for the given well-known TCP port number. Answer a string containing the port number if it isn't well-known.\\\\\\\"\\\\n\\\\n\\\\t| portList entry |\\\\n\\\\tportList _ #(\\\\n\\\\t\\\\t(7 'echo') (9 'discard') (13 'time') (19 'characterGenerator')\\\\n\\\\t\\\\t(21 'ftp') (23 'telnet') (25 'smtp')\\\\n\\\\t\\\\t(80 'http') (110 'pop3') (119 'nntp')).\\\\n\\\\tentry _ portList detect: [:pair | pair first = portNum] ifNone: [^ 'port-', portNum printString].\\\\n\\\\t^ entry last\\\\n! !\\\\n\\\\n!OldSocket class methodsFor: 'utilities' stamp: 'nk 2/24/2005 14:38'!\\\\nping: hostName \\\\n\\\\t\\\\\\\"Ping the given host. Useful for checking network connectivity. The host must be running a TCP echo server.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Socket ping: 'squeak.cs.uiuc.edu'\\\\\\\"\\\\n\\\\n\\\\t| tcpPort sock serverAddr startTime echoTime |\\\\n\\\\ttcpPort := 7.\\\\t\\\\\\\"7 = echo port, 13 = time port, 19 = character generator port\\\\\\\"\\\\n\\\\tself initializeNetwork.\\\\n\\\\tserverAddr := NetNameResolver addressForName: hostName timeout: 10.\\\\n\\\\tserverAddr = nil \\\\n\\\\t\\\\tifTrue: [^self inform: 'Could not find an address for ' , hostName].\\\\n\\\\tsock := self new.\\\\n\\\\tsock connectTo: serverAddr port: tcpPort.\\\\n\\\\t\\\\n\\\\t[sock waitForConnectionUntil: (self deadlineSecs: 10).\\\\n\\\\tsock isConnected] \\\\n\\\\t\\\\t\\\\twhileFalse: \\\\n\\\\t\\\\t\\\\t\\\\t[(self confirm: 'Continue to wait for connection to ' , hostName , '?') \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[sock destroy.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^self]].\\\\n\\\\tsock sendData: 'echo!!'.\\\\n\\\\tstartTime := Time millisecondClockValue.\\\\n\\\\t\\\\n\\\\t[sock waitForDataUntil: (self deadlineSecs: 15).\\\\n\\\\tsock dataAvailable] \\\\n\\\\t\\\\t\\\\twhileFalse: \\\\n\\\\t\\\\t\\\\t\\\\t[(self confirm: 'Packet sent but no echo yet; keep waiting?') \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[sock destroy.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^self]].\\\\n\\\\techoTime := Time millisecondClockValue - startTime.\\\\n\\\\tsock destroy.\\\\n\\\\tself inform: hostName , ' responded in ' , echoTime printString \\\\n\\\\t\\\\t\\\\t\\\\t, ' milliseconds'! !\\\\n\\\\n!OldSocket class methodsFor: 'utilities' stamp: 'nk 2/24/2005 14:38'!\\\\npingPorts: portList on: hostName timeOutSecs: timeOutSecs \\\\n\\\\t\\\\\\\"Attempt to connect to each of the given sockets on the given host. Wait at most timeOutSecs for the connections to be established. Answer an array of strings indicating the available ports.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Socket pingPorts: #(7 13 19 21 23 25 80 110 119) on: 'squeak.cs.uiuc.edu' timeOutSecs: 15\\\\\\\"\\\\n\\\\n\\\\t| serverAddr sockets sock deadline done unconnectedCount connectedCount waitingCount result |\\\\n\\\\tself initializeNetwork.\\\\n\\\\tserverAddr := NetNameResolver addressForName: hostName timeout: 10.\\\\n\\\\tserverAddr = nil \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[self inform: 'Could not find an address for ' , hostName.\\\\n\\\\t\\\\t\\\\t^#()].\\\\n\\\\tsockets := portList collect: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:portNum | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsock := self new.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsock connectTo: serverAddr port: portNum].\\\\n\\\\tdeadline := self deadlineSecs: timeOutSecs.\\\\n\\\\tdone := false.\\\\n\\\\t[done] whileFalse: \\\\n\\\\t\\\\t\\\\t[unconnectedCount := 0.\\\\n\\\\t\\\\t\\\\tconnectedCount := 0.\\\\n\\\\t\\\\t\\\\twaitingCount := 0.\\\\n\\\\t\\\\t\\\\tsockets do: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:s | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\ts isUnconnectedOrInvalid \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [unconnectedCount := unconnectedCount + 1]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[s isConnected ifTrue: [connectedCount := connectedCount + 1].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ts isWaitingForConnection ifTrue: [waitingCount := waitingCount + 1]]].\\\\n\\\\t\\\\t\\\\twaitingCount = 0 ifTrue: [done := true].\\\\n\\\\t\\\\t\\\\tconnectedCount = sockets size ifTrue: [done := true].\\\\n\\\\t\\\\t\\\\tTime millisecondClockValue > deadline ifTrue: [done := true]].\\\\n\\\\tresult := (sockets select: [:s | s isConnected]) \\\\n\\\\t\\\\t\\\\t\\\\tcollect: [:s | self nameForWellKnownTCPPort: s remotePort].\\\\n\\\\tsockets do: [:s | s destroy].\\\\n\\\\t^result! !\\\\n\\\\n!OldSocket class methodsFor: 'utilities' stamp: 'nk 2/24/2005 14:38'!\\\\npingPortsOn: hostName \\\\n\\\\t\\\\\\\"Attempt to connect to a set of well-known sockets on the given host, and answer the names of the available ports.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Socket pingPortsOn: 'www.disney.com'\\\\\\\"\\\\n\\\\n\\\\t^self \\\\n\\\\t\\\\tpingPorts: #(7 13 19 21 23 25 80 110 119)\\\\n\\\\t\\\\ton: hostName\\\\n\\\\t\\\\ttimeOutSecs: 20! !\\\\n\\\\n!OldSocket class methodsFor: 'utilities' stamp: 'jm 9/15/97 06:56'!\\\\nstandardDeadline\\\\n\\\\t\\\\\\\"Return a default deadline time some seconds into the future.\\\\\\\"\\\\n\\\\n\\\\t^ self deadlineSecs: 45\\\\n! !\\\\n\\\\n!OldSocket class methodsFor: 'utilities' stamp: 'ar 4/30/1999 04:21'!\\\\nwildcardAddress\\\\n\\\\t\\\\\\\"Answer a don't-care address for use with UDP sockets.\\\\\\\"\\\\n\\\\n\\\\t^ByteArray new: 4\\\\t\\\\t\\\\\\\"0.0.0.0\\\\\\\"! !\\\\n\\\\n!OldSocket class methodsFor: 'utilities' stamp: 'ar 4/30/1999 04:21'!\\\\nwildcardPort\\\\n\\\\t\\\\\\\"Answer a don't-care port for use with UDP sockets.  (The system will allocate an\\\\n\\\\tunused port number to the socket.)\\\\\\\"\\\\n\\\\n\\\\t^0! !\\\\nSwitch subclass: #OneOnSwitch\\\\n\\\\tinstanceVariableNames: 'connection'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'ST80-Menus'!\\\\n!OneOnSwitch commentStamp: '<historical>' prior: 0!\\\\nI am a kind of Switch that can be connected to some related object, typically to a collection of my instances. When my instance is created, its connection is set to a particular object. When the object changes because an Switch it refers to is turned on, an update message is broadcasted. All the connected OneOnSwitches, except the changed one, turn off. This allows OneOnSwitches to maintain the constraint that at most one of them will be on at any time. OneOnSwitches can thus be made to act like \\\\\\\"car radio\\\\\\\" switches.!\\\\n\\\\n\\\\n!OneOnSwitch methodsFor: 'connection'!\\\\nconnection\\\\n\\\\t\\\\\\\"Answer the object that connects the receiver to other Switches.\\\\\\\"\\\\n\\\\n\\\\t^connection! !\\\\n\\\\n!OneOnSwitch methodsFor: 'connection'!\\\\nconnection: anObject \\\\n\\\\t\\\\\\\"Set anObject to be the connection among two or more Switches. Make the \\\\n\\\\treceiver a dependent of the argument, anObject.\\\\\\\"\\\\n\\\\n\\\\tconnection _ anObject.\\\\n\\\\tconnection addDependent: self! !\\\\n\\\\n!OneOnSwitch methodsFor: 'connection'!\\\\nisConnectionSet\\\\n\\\\t\\\\\\\"Answer whether the receiver is connected to an object that coordinates \\\\n\\\\tupdates among switches.\\\\\\\"\\\\n\\\\n\\\\tconnection == nil\\\\n\\\\t\\\\tifTrue: [^false]\\\\n\\\\t\\\\tifFalse: [^true]! !\\\\n\\\\n!OneOnSwitch methodsFor: 'connection'!\\\\nnotifyConnection\\\\n\\\\t\\\\\\\"Send the receiver's connection (if it exists) the message 'changed: self' in \\\\n\\\\torder for the connection to broadcast the change to other objects \\\\n\\\\tconnected by the connection.\\\\\\\"\\\\n\\\\t\\\\n\\\\tself isConnectionSet ifTrue: [self connection changed: self]! !\\\\n\\\\n\\\\n!OneOnSwitch methodsFor: 'initialize-release'!\\\\nrelease\\\\n\\\\n\\\\tsuper release.\\\\n\\\\tself isConnectionSet ifTrue: [connection removeDependent: self]! !\\\\n\\\\n\\\\n!OneOnSwitch methodsFor: 'state'!\\\\nturnOn\\\\n\\\\t\\\\\\\"Does nothing if it is already on. If it is not, it is set to 'on', its\\\\n\\\\tdependents are \\\\tnotified of the change, its connection is notified, and\\\\n\\\\tits action is executed.\\\\\\\"\\\\n\\\\n\\\\tself isOff\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[on _ true.\\\\n\\\\t\\\\t\\\\tself changed.\\\\n\\\\t\\\\t\\\\tself notifyConnection.\\\\n\\\\t\\\\t\\\\tself doAction: onAction]! !\\\\n\\\\n\\\\n!OneOnSwitch methodsFor: 'updating'!\\\\nupdate: aOneOnSwitch \\\\n\\\\t\\\\\\\"Does nothing if aOneOnSwitch is identical to this object. If it is not, this \\\\n\\\\tobject is turned off. This message is sent by the connection (an Object)\\\\n\\\\twhen some related OneOnSwitch (possibly this one) has changed. This\\\\n\\\\tallows a group of related OneOnSwitches to maintain the constraint that\\\\n\\\\tat most one will be on at any time.\\\\\\\"\\\\n\\\\n\\\\tself ~~ aOneOnSwitch ifTrue: [self turnOff]! !\\\\nURI subclass: #OpaqueURI\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Network-URI'!\\\\n\\\\n!OpaqueURI methodsFor: 'testing' stamp: 'mir 2/20/2002 16:55'!\\\\nisOpaque\\\\n\\\\t^true! !\\\\nSmallLandColorTheme subclass: #OrangeSmallLandColorTheme\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Support'!\\\\n\\\\n!OrangeSmallLandColorTheme methodsFor: 'initialization' stamp: 'dgd 3/12/2006 13:25'!\\\\nbaseColors\\\\n\\\\\\\"\\\\nOrangeSmallLandColorTheme apply.\\\\n\\\\\\\"\\\\n\\\\t^ Array\\\\n\\\\t\\\\twith: (Color fromArray: #(0.8 0.4 0.0 ))\\\\n\\\\t\\\\twith: (Color fromArray: #(1.0 0.8 0.0 ))\\\\n\\\\t\\\\twith: (Color fromArray: #(1.0 1.0 0.8 ))! !\\\\nSequenceableCollection subclass: #OrderedCollection\\\\n\\\\tinstanceVariableNames: 'array firstIndex lastIndex'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Collections-Sequenceable'!\\\\n!OrderedCollection commentStamp: '<historical>' prior: 0!\\\\nI represent a collection of objects ordered by the collector.!\\\\n\\\\n\\\\n!OrderedCollection methodsFor: 'accessing'!\\\\nat: anInteger \\\\n\\\\t\\\\\\\"Answer my element at index anInteger. at: is used by a knowledgeable\\\\n\\\\tclient to access an existing element\\\\\\\"\\\\n\\\\n\\\\t(anInteger < 1 or: [anInteger + firstIndex - 1 > lastIndex])\\\\n\\\\t\\\\tifTrue: [self errorNoSuchElement]\\\\n\\\\t\\\\tifFalse: [^ array at: anInteger + firstIndex - 1]! !\\\\n\\\\n!OrderedCollection methodsFor: 'accessing'!\\\\nat: anInteger put: anObject \\\\n\\\\t\\\\\\\"Put anObject at element index anInteger. at:put: cannot be used to\\\\n\\\\tappend, front or back, to an ordered collection; it is used by a\\\\n\\\\tknowledgeable client to replace an element.\\\\\\\"\\\\n\\\\n\\\\t| index |\\\\n\\\\tindex _ anInteger asInteger.\\\\n\\\\t(index < 1 or: [index + firstIndex - 1 > lastIndex])\\\\n\\\\t\\\\tifTrue: [self errorNoSuchElement]\\\\n\\\\t\\\\tifFalse: [^array at: index + firstIndex - 1 put: anObject]! !\\\\n\\\\n!OrderedCollection methodsFor: 'accessing' stamp: 'sma 5/12/2000 11:42'!\\\\ncapacity\\\\n\\\\t\\\\\\\"Answer the current capacity of the receiver.\\\\\\\"\\\\n\\\\n\\\\t^ array size! !\\\\n\\\\n!OrderedCollection methodsFor: 'accessing' stamp: 'sma 5/12/2000 11:39'!\\\\nsize\\\\n\\\\t\\\\\\\"Answer how many elements the receiver contains.\\\\\\\"\\\\n\\\\n\\\\t^ lastIndex - firstIndex + 1! !\\\\n\\\\n\\\\n!OrderedCollection methodsFor: 'adding'!\\\\nadd: newObject\\\\n\\\\n\\\\t^self addLast: newObject! !\\\\n\\\\n!OrderedCollection methodsFor: 'adding'!\\\\nadd: newObject after: oldObject \\\\n\\\\t\\\\\\\"Add the argument, newObject, as an element of the receiver. Put it in \\\\n\\\\tthe sequence just succeeding oldObject. Answer newObject.\\\\\\\"\\\\n\\\\t\\\\n\\\\t| index |\\\\n\\\\tindex _ self find: oldObject.\\\\n\\\\tself insert: newObject before: index + 1.\\\\n\\\\t^newObject! !\\\\n\\\\n!OrderedCollection methodsFor: 'adding' stamp: 'di 3/15/1999 14:01'!\\\\nadd: newObject afterIndex: index \\\\n\\\\t\\\\\\\"Add the argument, newObject, as an element of the receiver. Put it in \\\\n\\\\tthe sequence just after index. Answer newObject.\\\\\\\"\\\\n\\\\n\\\\tself insert: newObject before: firstIndex + index.\\\\n\\\\t^ newObject! !\\\\n\\\\n!OrderedCollection methodsFor: 'adding'!\\\\nadd: newObject before: oldObject \\\\n\\\\t\\\\\\\"Add the argument, newObject, as an element of the receiver. Put it in \\\\n\\\\tthe sequence just preceding oldObject. Answer newObject.\\\\\\\"\\\\n\\\\t\\\\n\\\\t| index |\\\\n\\\\tindex _ self find: oldObject.\\\\n\\\\tself insert: newObject before: index.\\\\n\\\\t^newObject! !\\\\n\\\\n!OrderedCollection methodsFor: 'adding' stamp: 'BG 1/9/2004 12:30'!\\\\nadd: newObject beforeIndex: index \\\\n \\\\\\\"Add the argument, newObject, as an element of the receiver. Put it in \\\\n the sequence just before index. Answer newObject.\\\\\\\"\\\\n\\\\n self add: newObject afterIndex: index - 1.\\\\n ^ newObject! !\\\\n\\\\n!OrderedCollection methodsFor: 'adding' stamp: 'sma 5/12/2000 11:26'!\\\\naddAll: aCollection \\\\n\\\\t\\\\\\\"Add each element of aCollection at my end. Answer\\\\taCollection.\\\\\\\"\\\\n\\\\n\\\\t^ self addAllLast: aCollection! !\\\\n\\\\n!OrderedCollection methodsFor: 'adding'!\\\\naddAllFirst: anOrderedCollection \\\\n\\\\t\\\\\\\"Add each element of anOrderedCollection at the beginning of the \\\\n\\\\treceiver. Answer anOrderedCollection.\\\\\\\"\\\\n\\\\n\\\\tanOrderedCollection reverseDo: [:each | self addFirst: each].\\\\n\\\\t^anOrderedCollection! !\\\\n\\\\n!OrderedCollection methodsFor: 'adding' stamp: 'sw 3/1/2001 11:03'!\\\\naddAllFirstUnlessAlreadyPresent: anOrderedCollection \\\\n\\\\t\\\\\\\"Add each element of anOrderedCollection at the beginning of the receiver, preserving the order, but do not add any items that are already in the receiver.  Answer anOrderedCollection.\\\\\\\"\\\\n\\\\n\\\\tanOrderedCollection reverseDo:\\\\n\\\\t\\\\t[:each | (self includes: each) ifFalse: [self addFirst: each]].\\\\n\\\\t^ anOrderedCollection! !\\\\n\\\\n!OrderedCollection methodsFor: 'adding'!\\\\naddAllLast: anOrderedCollection \\\\n\\\\t\\\\\\\"Add each element of anOrderedCollection at the end of the receiver. \\\\n\\\\tAnswer anOrderedCollection.\\\\\\\"\\\\n\\\\n\\\\tanOrderedCollection do: [:each | self addLast: each].\\\\n\\\\t^anOrderedCollection! !\\\\n\\\\n!OrderedCollection methodsFor: 'adding'!\\\\naddFirst: newObject \\\\n\\\\t\\\\\\\"Add newObject to the beginning of the receiver. Answer newObject.\\\\\\\"\\\\n\\\\n\\\\tfirstIndex = 1 ifTrue: [self makeRoomAtFirst].\\\\n\\\\tfirstIndex _ firstIndex - 1.\\\\n\\\\tarray at: firstIndex put: newObject.\\\\n\\\\t^ newObject! !\\\\n\\\\n!OrderedCollection methodsFor: 'adding'!\\\\naddLast: newObject \\\\n\\\\t\\\\\\\"Add newObject to the end of the receiver. Answer newObject.\\\\\\\"\\\\n\\\\n\\\\tlastIndex = array size ifTrue: [self makeRoomAtLast].\\\\n\\\\tlastIndex _ lastIndex + 1.\\\\n\\\\tarray at: lastIndex put: newObject.\\\\n\\\\t^ newObject! !\\\\n\\\\n!OrderedCollection methodsFor: 'adding' stamp: 'ajh 5/22/2003 12:03'!\\\\nat: index ifAbsentPut: block\\\\n\\\\t\\\\\\\"Return value at index, however, if value does not exist (nil or out of bounds) then add block's value at index (growing self if necessary)\\\\\\\"\\\\n\\\\n\\\\t| v |\\\\n\\\\tindex <= self size ifTrue: [\\\\n\\\\t\\\\t^ (v _ self at: index)\\\\n\\\\t\\\\t\\\\tifNotNil: [v]\\\\n\\\\t\\\\t\\\\tifNil: [self at: index put: block value]\\\\n\\\\t].\\\\n\\\\t[self size < index] whileTrue: [self add: nil].\\\\n\\\\t^ self at: index put: block value! !\\\\n\\\\n!OrderedCollection methodsFor: 'adding'!\\\\ngrow\\\\n\\\\t\\\\\\\"Become larger. Typically, a subclass has to override this if the subclass\\\\n\\\\tadds instance variables.\\\\\\\"\\\\n\\\\t| newArray |\\\\n\\\\tnewArray _ Array new: self size + self growSize.\\\\n\\\\tnewArray replaceFrom: 1 to: array size with: array startingAt: 1.\\\\n\\\\tarray _ newArray! !\\\\n\\\\n!OrderedCollection methodsFor: 'adding'!\\\\ngrowSize\\\\n\\\\t^ array size max: 2! !\\\\n\\\\n\\\\n!OrderedCollection methodsFor: 'copying'!\\\\ncopyEmpty\\\\n\\\\t\\\\\\\"Answer a copy of the receiver that contains no elements.\\\\\\\"\\\\n\\\\n\\\\t^self species new! !\\\\n\\\\n!OrderedCollection methodsFor: 'copying' stamp: 'di 12/12/2000 10:15'!\\\\ncopyFrom: startIndex to: endIndex \\\\n\\\\t\\\\\\\"Answer a copy of the receiver that contains elements from position\\\\n\\\\tstartIndex to endIndex.\\\\\\\"\\\\n\\\\n\\\\t| targetCollection |\\\\n\\\\tendIndex < startIndex ifTrue: [^self species new: 0].\\\\n\\\\ttargetCollection _ self species new: endIndex + 1 - startIndex.\\\\n\\\\tstartIndex to: endIndex do: [:index | targetCollection addLast: (self at: index)].\\\\n\\\\t^ targetCollection! !\\\\n\\\\n!OrderedCollection methodsFor: 'copying'!\\\\ncopyReplaceFrom: start to: stop with: replacementCollection \\\\n\\\\t\\\\\\\"Answer a copy of the receiver with replacementCollection's elements in\\\\n\\\\tplace of the receiver's start'th to stop'th elements. This does not expect\\\\n\\\\ta 1-1 map from replacementCollection to the start to stop elements, so it\\\\n\\\\twill do an insert or append.\\\\\\\"\\\\n\\\\n\\\\t| newOrderedCollection delta startIndex stopIndex |\\\\n\\\\t\\\\\\\"if start is less than 1, ignore stop and assume this is inserting at the front. \\\\n\\\\tif start greater than self size, ignore stop and assume this is appending. \\\\n\\\\totherwise, it is replacing part of me and start and stop have to be within my \\\\n\\\\tbounds. \\\\\\\"\\\\n\\\\tdelta _ 0.\\\\n\\\\tstartIndex _ start.\\\\n\\\\tstopIndex _ stop.\\\\n\\\\tstart < 1\\\\n\\\\t\\\\tifTrue: [startIndex _ stopIndex _ 0]\\\\n\\\\t\\\\tifFalse: [startIndex > self size\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [startIndex _ stopIndex _ self size + 1]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[(stopIndex < (startIndex - 1) or: [stopIndex > self size])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self errorOutOfBounds].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdelta _ stopIndex - startIndex + 1]].\\\\n\\\\tnewOrderedCollection _ \\\\n\\\\t\\\\tself species new: self size + replacementCollection size - delta.\\\\n\\\\t1 to: startIndex - 1 do: [:index | newOrderedCollection add: (self at: index)].\\\\n\\\\t1 to: replacementCollection size do: \\\\n\\\\t\\\\t[:index | newOrderedCollection add: (replacementCollection at: index)].\\\\n\\\\tstopIndex + 1 to: self size do: [:index | newOrderedCollection add: (self at: index)].\\\\n\\\\t^newOrderedCollection! !\\\\n\\\\n!OrderedCollection methodsFor: 'copying'!\\\\ncopyWith: newElement \\\\n\\\\t\\\\\\\"Answer a copy of the receiver that is 1 bigger than the receiver and \\\\n\\\\tincludes the argument, newElement, at the end.\\\\\\\"\\\\n\\\\n\\\\t| newCollection |\\\\n\\\\tnewCollection _ self copy.\\\\n\\\\tnewCollection add: newElement.\\\\n\\\\t^newCollection! !\\\\n\\\\n!OrderedCollection methodsFor: 'copying' stamp: 'sw 1/26/96'!\\\\nreversed\\\\n\\\\t\\\\\\\"Answer a copy of the receiver with element order reversed.  \\\\\\\"\\\\n\\\\t| newCol |\\\\n\\\\tnewCol _ self species new.\\\\n\\\\tself reverseDo:\\\\n\\\\t\\\\t[:elem | newCol addLast: elem].\\\\n\\\\t^ newCol\\\\n\\\\n\\\\\\\"#(2 3 4 'fred') reversed\\\\\\\"! !\\\\n\\\\n\\\\n!OrderedCollection methodsFor: 'enumerating' stamp: 'sma 2/5/2000 15:22'!\\\\ncollect: aBlock \\\\n\\\\t\\\\\\\"Evaluate aBlock with each of my elements as the argument. Collect the \\\\n\\\\tresulting values into a collection that is like me. Answer the new \\\\n\\\\tcollection. Override superclass in order to use addLast:, not at:put:.\\\\\\\"\\\\n\\\\n\\\\t| newCollection |\\\\n\\\\tnewCollection _ self species new: self size.\\\\n\\\\tfirstIndex to: lastIndex do:\\\\n\\\\t\\\\t[:index |\\\\n\\\\t\\\\tnewCollection addLast: (aBlock value: (array at: index))].\\\\n\\\\t^ newCollection! !\\\\n\\\\n!OrderedCollection methodsFor: 'enumerating' stamp: 'bf 5/18/2000 17:34'!\\\\ncollect: aBlock from: fromIndex to: toIndex\\\\n\\\\t\\\\\\\"Override superclass in order to use addLast:, not at:put:.\\\\\\\"\\\\n\\\\t| result |\\\\n\\\\t(fromIndex < 1 or:[toIndex + firstIndex - 1 > lastIndex])\\\\n\\\\t\\\\tifTrue: [^self errorNoSuchElement].\\\\n\\\\tresult _ self species new: toIndex - fromIndex + 1.\\\\n\\\\tfirstIndex + fromIndex - 1 to: firstIndex + toIndex - 1 do:\\\\n\\\\t\\\\t[:index | result addLast: (aBlock value: (array at: index))].\\\\n\\\\t^ result\\\\n! !\\\\n\\\\n!OrderedCollection methodsFor: 'enumerating'!\\\\ndo: aBlock \\\\n\\\\t\\\\\\\"Override the superclass for performance reasons.\\\\\\\"\\\\n\\\\t| index |\\\\n\\\\tindex _ firstIndex.\\\\n\\\\t[index <= lastIndex]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[aBlock value: (array at: index).\\\\n\\\\t\\\\t\\\\tindex _ index + 1]! !\\\\n\\\\n!OrderedCollection methodsFor: 'enumerating'!\\\\nreverseDo: aBlock \\\\n\\\\t\\\\\\\"Override the superclass for performance reasons.\\\\\\\"\\\\n\\\\t| index |\\\\n\\\\tindex _ lastIndex.\\\\n\\\\t[index >= firstIndex]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[aBlock value: (array at: index).\\\\n\\\\t\\\\t\\\\tindex _ index - 1]! !\\\\n\\\\n!OrderedCollection methodsFor: 'enumerating' stamp: 'sma 2/5/2000 15:13'!\\\\nselect: aBlock \\\\n\\\\t\\\\\\\"Evaluate aBlock with each of my elements as the argument. Collect into\\\\n\\\\ta new collection like the receiver, only those elements for which aBlock\\\\n\\\\tevaluates to true.\\\\\\\"\\\\n\\\\n\\\\t| newCollection element |\\\\n\\\\tnewCollection _ self copyEmpty.\\\\n\\\\tfirstIndex to: lastIndex do:\\\\n\\\\t\\\\t[:index |\\\\n\\\\t\\\\t(aBlock value: (element _ array at: index))\\\\n\\\\t\\\\t\\\\tifTrue: [newCollection addLast: element]].\\\\n\\\\t^ newCollection! !\\\\n\\\\n!OrderedCollection methodsFor: 'enumerating' stamp: 'di 8/31/1999 13:13'!\\\\nwith: otherCollection collect: twoArgBlock \\\\n\\\\t\\\\\\\"Collect and return the result of evaluating twoArgBlock with \\\\n\\\\tcorresponding elements from this collection and otherCollection.\\\\\\\"\\\\n\\\\t| result |\\\\n\\\\totherCollection size = self size ifFalse: [self error: 'otherCollection must be the same size'].\\\\n\\\\tresult _ self species new: self size.\\\\n\\\\t1 to: self size do:\\\\n\\\\t\\\\t[:index | result addLast: (twoArgBlock value: (self at: index)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tvalue: (otherCollection at: index))].\\\\n\\\\t^ result! !\\\\n\\\\n!OrderedCollection methodsFor: 'enumerating' stamp: 'bf 5/16/2000 16:30'!\\\\nwithIndexCollect: elementAndIndexBlock \\\\n\\\\t\\\\\\\"Just like with:collect: except that the iteration index supplies the second argument to the block. Override superclass in order to use addLast:, not at:put:.\\\\\\\"\\\\n\\\\n\\\\t| newCollection |\\\\n\\\\tnewCollection _ self species new: self size.\\\\n\\\\tfirstIndex to: lastIndex do:\\\\n\\\\t\\\\t[:index |\\\\n\\\\t\\\\tnewCollection addLast: (elementAndIndexBlock\\\\n\\\\t\\\\t\\\\tvalue: (array at: index)\\\\n\\\\t\\\\t\\\\tvalue: index - firstIndex + 1)].\\\\n\\\\t^ newCollection! !\\\\n\\\\n\\\\n!OrderedCollection methodsFor: 'removing'!\\\\nremove: oldObject ifAbsent: absentBlock\\\\n\\\\n\\\\t| index |\\\\n\\\\tindex _ firstIndex.\\\\n\\\\t[index <= lastIndex]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[oldObject = (array at: index)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self removeIndex: index.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ oldObject]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [index _ index + 1]].\\\\n\\\\t^ absentBlock value! !\\\\n\\\\n!OrderedCollection methodsFor: 'removing' stamp: 'raok 4/27/2001 15:35'!\\\\nremoveAllSuchThat: aBlock \\\\n\\\\t\\\\\\\"Remove each element of the receiver for which aBlock evaluates to true.\\\\n\\\\tThe method in Collection is O(N^2), this is O(N).\\\\\\\"\\\\n\\\\n\\\\t| n |\\\\n\\\\tn _ firstIndex.\\\\n\\\\tfirstIndex to: lastIndex do: [:index |\\\\n\\\\t    (aBlock value: (array at: index)) ifFalse: [\\\\n\\\\t\\\\t\\\\tarray at: n put: (array at: index).\\\\n\\\\t\\\\t\\\\tn _ n + 1]].\\\\n\\\\tn to: lastIndex do: [:index | array at: index put: nil].\\\\n\\\\tlastIndex _ n - 1! !\\\\n\\\\n!OrderedCollection methodsFor: 'removing' stamp: 'ar 5/22/2000 12:19'!\\\\nremoveAt: index\\\\n\\\\t| removed |\\\\n\\\\tremoved _ self at: index.\\\\n\\\\tself removeIndex: index + firstIndex - 1.\\\\n\\\\t^removed! !\\\\n\\\\n!OrderedCollection methodsFor: 'removing'!\\\\nremoveFirst\\\\n\\\\t\\\\\\\"Remove the first element of the receiver and answer it. If the receiver is \\\\n\\\\tempty, create an error notification.\\\\\\\"\\\\n\\\\t| firstObject |\\\\n\\\\tself emptyCheck.\\\\n\\\\tfirstObject _ array at: firstIndex.\\\\n\\\\tarray at: firstIndex put: nil.\\\\n\\\\tfirstIndex _ firstIndex + 1.\\\\n\\\\t^ firstObject! !\\\\n\\\\n!OrderedCollection methodsFor: 'removing' stamp: 'ajh 6/22/2003 14:37'!\\\\nremoveFirst: n\\\\n\\\\t\\\\\\\"Remove first n object into an array\\\\\\\"\\\\n\\\\n\\\\t| list |\\\\n\\\\tlist _ Array new: n.\\\\n\\\\t1 to: n do: [:i |\\\\n\\\\t\\\\tlist at: i put: self removeFirst].\\\\n\\\\t^ list! !\\\\n\\\\n!OrderedCollection methodsFor: 'removing'!\\\\nremoveLast\\\\n\\\\t\\\\\\\"Remove the last element of the receiver and answer it. If the receiver is \\\\n\\\\tempty, create an error notification.\\\\\\\"\\\\n\\\\t| lastObject |\\\\n\\\\tself emptyCheck.\\\\n\\\\tlastObject _ array at: lastIndex.\\\\n\\\\tarray at: lastIndex put: nil.\\\\n\\\\tlastIndex _ lastIndex - 1.\\\\n\\\\t^ lastObject! !\\\\n\\\\n!OrderedCollection methodsFor: 'removing' stamp: 'ajh 6/22/2003 14:36'!\\\\nremoveLast: n\\\\n\\\\t\\\\\\\"Remove last n object into an array with last in last position\\\\\\\"\\\\n\\\\n\\\\t| list |\\\\n\\\\tlist _ Array new: n.\\\\n\\\\tn to: 1 by: -1 do: [:i |\\\\n\\\\t\\\\tlist at: i put: self removeLast].\\\\n\\\\t^ list! !\\\\n\\\\n\\\\n!OrderedCollection methodsFor: 'testing' stamp: 'bf 8/20/1999 15:08'!\\\\nhasContentsInExplorer\\\\n\\\\n\\\\t^self isEmpty not! !\\\\n\\\\n\\\\n!OrderedCollection methodsFor: '*Tools-Inspector' stamp: 'ar 9/27/2005 18:33'!\\\\ninspectorClass \\\\n\\\\t\\\\\\\"Answer the class of the inspector to be used on the receiver.  Called by inspect; \\\\n\\\\tuse basicInspect to get a normal (less useful) type of inspector.\\\\\\\"\\\\n\\\\n\\\\t^OrderedCollectionInspector! !\\\\n\\\\n\\\\n!OrderedCollection methodsFor: 'private'!\\\\ncollector  \\\\\\\"Private\\\\\\\"\\\\n\\\\t^ array! !\\\\n\\\\n!OrderedCollection methodsFor: 'private'!\\\\nerrorConditionNotSatisfied\\\\n\\\\n\\\\tself error: 'no element satisfies condition'! !\\\\n\\\\n!OrderedCollection methodsFor: 'private'!\\\\nerrorNoSuchElement\\\\n\\\\n\\\\tself error: 'attempt to index non-existent element in an ordered collection'! !\\\\n\\\\n!OrderedCollection methodsFor: 'private' stamp: 'BG 1/9/2004 12:26'!\\\\nfind: oldObject\\\\n  \\\\\\\"  This method answers an index in the range firstIndex .. lastIndex, which is meant for internal use only.\\\\n     Never use this method in your code, the methods for public use are:\\\\n        #indexOf:\\\\n        #indexOf:ifAbsent: \\\\\\\"\\\\n\\\\n\\\\t| index |\\\\n\\\\tindex _ firstIndex.\\\\n\\\\t[index <= lastIndex]\\\\n\\\\t\\\\twhileTrue:\\\\n\\\\t\\\\t\\\\t[(array at: index) = oldObject ifTrue: [^ index].\\\\n\\\\t\\\\t\\\\tindex _ index + 1].\\\\n\\\\tself errorNotFound: oldObject! !\\\\n\\\\n!OrderedCollection methodsFor: 'private' stamp: 'BG 1/9/2004 12:29'!\\\\ninsert: anObject before: spot\\\\n\\\\n  \\\\\\\"  spot is an index in the range firstIndex .. lastIndex, such an index is not known from outside the collection. \\\\n     Never use this method in your code, it is meant for private use by OrderedCollection only.\\\\n     The methods for use are:\\\\n        #add:before:   to insert an object before another object\\\\n        #add:beforeIndex:   to insert an object before a given position. \\\\\\\"\\\\n\\\\t| \\\\\\\"index\\\\\\\" delta spotIndex|\\\\n\\\\tspotIndex _ spot.\\\\n\\\\tdelta _ spotIndex - firstIndex.\\\\n\\\\tfirstIndex = 1\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[self makeRoomAtFirst.\\\\n\\\\t\\\\t\\\\tspotIndex _ firstIndex + delta].\\\\n\\\\tfirstIndex _ firstIndex - 1.\\\\n\\\\tarray\\\\n\\\\t\\\\treplaceFrom: firstIndex\\\\n\\\\t\\\\tto: spotIndex - 2\\\\n\\\\t\\\\twith: array\\\\n\\\\t\\\\tstartingAt: firstIndex + 1.\\\\n\\\\tarray at: spotIndex - 1 put: anObject.\\\\n\\\\\\\"\\\\tindex _ firstIndex _ firstIndex - 1.\\\\n\\\\t[index < (spotIndex - 1)]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[array at: index put: (array at: index + 1).\\\\n\\\\t\\\\t\\\\tindex _ index + 1].\\\\n\\\\tarray at: index put: anObject.\\\\\\\"\\\\n\\\\t^ anObject! !\\\\n\\\\n!OrderedCollection methodsFor: 'private'!\\\\nmakeRoomAtFirst\\\\n\\\\t| delta index |\\\\n\\\\tdelta _ array size - self size.\\\\n\\\\tdelta = 0 ifTrue: \\\\n\\\\t\\\\t\\\\t[self grow.\\\\n\\\\t\\\\t\\\\tdelta _ array size - self size].\\\\n\\\\tlastIndex = array size ifTrue: [^ self]. \\\\\\\"just in case we got lucky\\\\\\\"\\\\n\\\\tindex _ array size.\\\\n\\\\t[index > delta]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[array at: index put: (array at: index - delta + firstIndex - 1).\\\\n\\\\t\\\\t\\\\tarray at: index - delta + firstIndex - 1 put: nil.\\\\n\\\\t\\\\t\\\\tindex _ index - 1].\\\\n\\\\tfirstIndex _ delta + 1.\\\\n\\\\tlastIndex _ array size! !\\\\n\\\\n!OrderedCollection methodsFor: 'private'!\\\\nmakeRoomAtLast\\\\n\\\\t| newLast delta |\\\\n\\\\tnewLast _ self size.\\\\n\\\\tarray size - self size = 0 ifTrue: [self grow].\\\\n\\\\t(delta _ firstIndex - 1) = 0 ifTrue: [^ self].\\\\n\\\\t\\\\\\\"we might be here under false premises or grow did the job for us\\\\\\\"\\\\n\\\\t1 to: newLast do:\\\\n\\\\t\\\\t[:index |\\\\n\\\\t\\\\tarray at: index put: (array at: index + delta).\\\\n\\\\t\\\\tarray at: index + delta put: nil].\\\\n\\\\tfirstIndex _ 1.\\\\n\\\\tlastIndex _ newLast! !\\\\n\\\\n!OrderedCollection methodsFor: 'private' stamp: 'BG 1/9/2004 12:28'!\\\\nremoveIndex: removedIndex\\\\n  \\\\\\\"  removedIndex is an index in the range firstIndex .. lastIndex, such an index is not known from outside the collection.\\\\n    Never use this method in your code, it is meant for private use by OrderedCollection only.\\\\n     The method for public use is:\\\\n        #removeAt: \\\\\\\"\\\\n\\\\n\\\\tarray \\\\n\\\\t\\\\treplaceFrom: removedIndex \\\\n\\\\t\\\\tto: lastIndex - 1 \\\\n\\\\t\\\\twith: array \\\\n\\\\t\\\\tstartingAt: removedIndex+1.\\\\n\\\\tarray at: lastIndex put: nil.\\\\n\\\\tlastIndex _ lastIndex - 1.! !\\\\n\\\\n!OrderedCollection methodsFor: 'private' stamp: 'di 11/14/97 12:54'!\\\\nreset\\\\n\\\\tfirstIndex _ array size // 3 max: 1.\\\\n\\\\tlastIndex _ firstIndex - 1! !\\\\n\\\\n!OrderedCollection methodsFor: 'private' stamp: 'ar 4/16/1999 07:59'!\\\\nresetTo: index\\\\n\\\\tfirstIndex _ index.\\\\n\\\\tlastIndex _ firstIndex - 1! !\\\\n\\\\n!OrderedCollection methodsFor: 'private' stamp: 'di 11/14/97 12:54'!\\\\nsetCollection: anArray\\\\n\\\\tarray _ anArray.\\\\n\\\\tself reset! !\\\\n\\\\n!OrderedCollection methodsFor: 'private' stamp: 'apb 10/15/2000 18:10'!\\\\nsetContents: anArray\\\\n\\\\tarray _ anArray.\\\\n\\\\tfirstIndex _ 1.\\\\n\\\\tlastIndex _ array size.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nOrderedCollection class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!OrderedCollection class methodsFor: 'instance creation' stamp: 'sma 5/12/2000 17:41'!\\\\nnew\\\\n\\\\t^ self new: 10! !\\\\n\\\\n!OrderedCollection class methodsFor: 'instance creation' stamp: 'md 7/5/2005 15:16'!\\\\nnew: anInteger \\\\n\\\\t^ super basicNew setCollection: (Array new: anInteger)! !\\\\n\\\\n!OrderedCollection class methodsFor: 'instance creation'!\\\\nnewFrom: aCollection \\\\n\\\\t\\\\\\\"Answer an instance of me containing the same elements as aCollection.\\\\\\\"\\\\n\\\\n\\\\t| newCollection |\\\\n\\\\tnewCollection _ self new: aCollection size.\\\\n\\\\tnewCollection addAll: aCollection.\\\\n\\\\t^newCollection\\\\n\\\\n\\\\\\\"\\\\tOrderedCollection newFrom: {1. 2. 3}\\\\n\\\\t{1. 2. 3} as: OrderedCollection\\\\n\\\\t{4. 2. 7} as: SortedCollection\\\\n\\\\\\\"! !\\\\n\\\\n!OrderedCollection class methodsFor: 'instance creation' stamp: 'apb 10/15/2000 22:02'!\\\\nofSize: n\\\\n\\\\t\\\\\\\"Create a new collection of size n with nil as its elements.\\\\n\\\\tThis method exists because OrderedCollection new: n creates an\\\\n\\\\tempty collection,  not one of size n.\\\\\\\"\\\\n\\\\t| collection |\\\\n\\\\tcollection _ self new: n.\\\\n\\\\tcollection setContents: (collection collector).\\\\n\\\\t^ collection\\\\n! !\\\\nInspector subclass: #OrderedCollectionInspector\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Tools-Inspector'!\\\\n\\\\n!OrderedCollectionInspector methodsFor: 'as yet unclassified' stamp: 'dew 9/19/2001 03:27'!\\\\nfieldList\\\\n\\\\tobject ifNil: [ ^ OrderedCollection new].\\\\n\\\\t^ self baseFieldList ,\\\\n\\\\t\\\\t(object size <= (self i1 + self i2)\\\\n\\\\t\\\\t\\\\tifTrue: [(1 to: object size)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcollect: [:i | i printString]]\\\\n\\\\t\\\\t\\\\tifFalse: [(1 to: self i1) , (object size-(self i2-1) to: object size)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcollect: [:i | i printString]])\\\\n\\\\\\\"\\\\nOrderedCollection new inspect\\\\n(OrderedCollection newFrom: #(3 5 7 123)) inspect\\\\n(OrderedCollection newFrom: (1 to: 1000)) inspect\\\\n\\\\\\\"! !\\\\n\\\\n!OrderedCollectionInspector methodsFor: 'as yet unclassified' stamp: 'sw 9/16/97 22:38'!\\\\nreplaceSelectionValue: anObject \\\\n\\\\t\\\\\\\"The receiver has a list of variables of its inspected object. One of these \\\\n\\\\tis selected. The value of the selected variable is set to the value, anObject.\\\\\\\"\\\\n\\\\n\\\\t(selectionIndex - 2) <= object class instSize\\\\n\\\\t\\\\tifTrue: [^ super replaceSelectionValue: anObject].\\\\n\\\\tobject at: self selectedObjectIndex put: anObject! !\\\\n\\\\n!OrderedCollectionInspector methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:27'!\\\\nselectedObjectIndex\\\\n\\\\t\\\\\\\"Answer the index of the inspectee's collection that the current selection refers to.\\\\\\\"\\\\n\\\\n\\\\t| basicIndex |\\\\n\\\\tbasicIndex := selectionIndex - 2 - object class instSize.\\\\n\\\\t^ (object size <= (self i1 + self i2)  or: [basicIndex <= self i1])\\\\n\\\\t\\\\tifTrue: [basicIndex]\\\\n\\\\t\\\\tifFalse: [object size - (self i1 + self i2) + basicIndex]! !\\\\n\\\\n!OrderedCollectionInspector methodsFor: 'as yet unclassified' stamp: 'sw 9/16/97 22:39'!\\\\nselection\\\\n\\\\t\\\\\\\"The receiver has a list of variables of its inspected object.\\\\n\\\\tOne of these is selected. Answer the value of the selected variable.\\\\\\\"\\\\n\\\\n\\\\t(selectionIndex - 2) <= object class instSize\\\\n\\\\t\\\\tifTrue: [^ super selection].\\\\n\\\\t^ object at: self selectedObjectIndex! !\\\\nClassTestCase subclass: #OrderedCollectionTest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'CollectionsTests-Sequenceable'!\\\\n!OrderedCollectionTest commentStamp: 'BG 1/10/2004 22:07' prior: 0!\\\\nThese test cases demonstrate addition of items into an OrderedCollection as well as item removal.\\\\n\\\\nSome of the assertions are quite complicated and use a lot of collection protocol. Such methods do not test one single method, but protocol in general.!\\\\n\\\\n\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAdding' stamp: 'zz 12/7/2005 19:00'!\\\\ntestAdd\\\\n\\\\t| l |\\\\n\\\\tl := #(1 2 3 4) asOrderedCollection.\\\\n\\\\tl add: 88.\\\\n\\\\tself assert: (l =  #(1 2 3 4 88) asOrderedCollection).\\\\n\\\\tl add: 99.\\\\n\\\\tself assert: (l =  #(1 2 3 4 88 99) asOrderedCollection). \\\\n\\\\n! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAdding' stamp: 'zz 12/7/2005 18:52'!\\\\ntestAddAfter\\\\n\\\\n\\\\t| l |\\\\n\\\\tl := #(1 2 3 4) asOrderedCollection.\\\\n\\\\tl add: 88 after: 1.\\\\n\\\\tself assert: (l =  #(1 88 2 3 4) asOrderedCollection).\\\\n\\\\tl add: 99 after: 2.\\\\n\\\\tself assert: (l =  #(1 88 2 99 3 4) asOrderedCollection). \\\\n\\\\n! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAdding' stamp: 'zz 12/7/2005 18:56'!\\\\ntestAddAfterIndex\\\\n\\\\n\\\\t| l |\\\\n\\\\tl := #(1 2 3 4) asOrderedCollection.\\\\n\\\\tl add: 88 afterIndex: 1.\\\\n\\\\tself assert: (l =  #(1 88 2 3 4) asOrderedCollection).\\\\n\\\\tl add: 99 afterIndex: 2.\\\\n\\\\tself assert: (l =  #(1 88 99 2 3 4) asOrderedCollection). \\\\n\\\\n! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAdding' stamp: 'sd 3/21/2006 22:36'!\\\\ntestAddAll\\\\n\\\\t\\\\\\\"Allows one to add each element of an orderedCollection at the end of another\\\\n\\\\torderedCollection \\\\\\\"\\\\n\\\\t\\\\\\\"self run:#testAddAll\\\\\\\" \\\\n\\\\t\\\\n\\\\t| c1 c2 |\\\\n\\\\tc1 := #(1 2 3 4 ) asOrderedCollection.\\\\n\\\\tc2 := #(5 6 7 8 9 ) asOrderedCollection.\\\\n\\\\tc1 addAll: c2.\\\\n\\\\tself assert: c1 = #(1 2 3 4 5 6 7 8 9) asOrderedCollection! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAdding' stamp: 'sd 3/21/2006 22:36'!\\\\ntestAddAllFirst\\\\n\\\\t\\\\\\\"Allows one to add each element of an orderedCollection at the beginning of another\\\\n\\\\torderedCollection \\\\\\\"\\\\n\\\\t\\\\\\\"self run:#testAddAllFirst\\\\\\\" \\\\n\\\\t\\\\n\\\\t| c1 c2 |\\\\n\\\\tc1 := #(1 2 3 4 ) asOrderedCollection.\\\\n\\\\tc2 := #(5 6 7 8 9 ) asOrderedCollection.\\\\n\\\\tc2 addAllFirst: c1.\\\\n\\\\tself assert: c2 = #(1 2 3 4 5 6 7 8 9) asOrderedCollection! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAdding' stamp: 'sd 3/21/2006 22:36'!\\\\ntestAddAllFirstUnlessAlreadyPresent\\\\n\\\\t\\\\\\\"Allows one to add each element of an orderedCollection at the beginning of\\\\n\\\\tanother orderedCollection preserving the order but no duplicate element\\\\\\\"\\\\n\\\\t\\\\\\\"self run:#testAddAllFirstUnlessAlreadyPresent\\\\\\\" \\\\n\\\\t\\\\n\\\\t| c1 c2 c3 |\\\\n\\\\tc1 := #(1 2 3 4 ) asOrderedCollection.\\\\n\\\\tc2 := #(5 6 7 8 9 ) asOrderedCollection.\\\\n\\\\tc3 := #(0 1 ) asOrderedCollection.\\\\n\\\\tc2 addAllFirstUnlessAlreadyPresent: c1.\\\\n\\\\tself assert: c2 = #(1 2 3 4 5 6 7 8 9 ) asOrderedCollection.\\\\n\\\\tc1 addAllFirstUnlessAlreadyPresent: c3.\\\\n\\\\tself deny: c1 = #(0 1 1 2 3 4 ) asOrderedCollection.\\\\n\\\\tself assert: c1 = #(0 1 2 3 4 ) asOrderedCollection.\\\\n\\\\t! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAdding' stamp: 'sd 3/21/2006 22:36'!\\\\ntestAddAllLast\\\\n\\\\t\\\\\\\"Allows one to add each element of an orderedCollection at the beginning of another\\\\n\\\\torderedCollection \\\\\\\"\\\\n\\\\t\\\\\\\"self run:#testAddAllLast\\\\\\\" \\\\n\\\\t\\\\n\\\\t| c1 c2 |\\\\n\\\\tc1 := #(1 2 3 4 ) asOrderedCollection.\\\\n\\\\tc2 := #(5 6 7 8 9 ) asOrderedCollection.\\\\n\\\\tc1 addAllLast: c2.\\\\n\\\\tself assert: c1 = #(1 2 3 4 5 6 7 8 9) asOrderedCollection! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAdding' stamp: 'zz 12/7/2005 18:57'!\\\\ntestAddBefore\\\\n\\\\n\\\\t| l |\\\\n\\\\tl := #(1 2 3 4) asOrderedCollection.\\\\n\\\\tl add: 88 before: 1.\\\\n\\\\tself assert: (l =  #(88 1 2 3 4) asOrderedCollection).\\\\n\\\\tl add: 99 before: 2.\\\\n\\\\tself assert: (l =  #(88 1 99 2 3 4) asOrderedCollection). \\\\n\\\\n! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAdding' stamp: 'zz 12/7/2005 13:42'!\\\\ntestAddBeforeAndRemove\\\\n\\\\n\\\\t| l initialCollection |\\\\n\\\\tl := #(1 2 3 4) asOrderedCollection.\\\\n\\\\tinitialCollection := l shallowCopy.\\\\n\\\\tl add: 88 before: 1.\\\\n\\\\tself assert: (l =  #(88 1 2 3 4) asOrderedCollection).\\\\n\\\\tl add: 99 before: 2.\\\\n\\\\tself assert: (l =  #(88 1 99 2 3 4) asOrderedCollection). \\\\n\\\\tl remove: 99.\\\\n\\\\tl remove: 88.\\\\n\\\\tself assert: l = initialCollection.\\\\n\\\\n! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAdding' stamp: 'zz 12/7/2005 18:57'!\\\\ntestAddBeforeIndex\\\\n\\\\n\\\\t| l |\\\\n\\\\tl := #(1 2 3 4) asOrderedCollection.\\\\n\\\\tl add: 88 beforeIndex: 1.\\\\n\\\\tself assert: (l =  #(88 1 2 3 4) asOrderedCollection).\\\\n\\\\tl add: 99 beforeIndex: 2.\\\\n\\\\tself assert: (l =  #(88 99 1 2 3 4) asOrderedCollection). \\\\n\\\\n! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAdding' stamp: 'zz 12/7/2005 13:43'!\\\\ntestAddDuplicateItem1\\\\n\\\\t| collection |\\\\n\\\\tcollection := #('Jim' 'Mary' 'John' 'Andrew' ) asOrderedCollection.\\\\n\\\\tcollection add: 'John' before: 'John'.\\\\n\\\\tself\\\\n\\\\t\\\\tassert: ((collection asBag occurrencesOf: 'John')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t= 2\\\\n\\\\t\\\\t\\\\t\\\\tand: [(collection at: (collection indexOf: 'John')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t+ 1)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t= (collection\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tat: (collection indexOf: 'John'))])! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAdding' stamp: 'zz 12/7/2005 18:58'!\\\\ntestAddFirst\\\\n\\\\t| l |\\\\n\\\\tl := #(1 2 3 4) asOrderedCollection.\\\\n\\\\tl addFirst: 88.\\\\n\\\\tself assert: (l =  #(88 1 2 3 4) asOrderedCollection).\\\\n\\\\tl addFirst: 99.\\\\n\\\\tself assert: (l =  #(99 88 1 2 3 4) asOrderedCollection). \\\\n\\\\n! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAdding' stamp: 'sd 6/5/2005 09:21'!\\\\ntestAddItem1\\\\n\\\\n   | collection size |\\\\n   collection := #('Jim' 'Mary' 'John' 'Andrew' ) asOrderedCollection.\\\\n   size := collection size.\\\\n   collection add: 'James' before: 'Jim'.\\\\n   collection add: 'Margaret' before: 'Andrew'.\\\\n   self assert: size + 2 = collection size.\\\\n! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAdding' stamp: 'zz 12/7/2005 19:07'!\\\\ntestAddItem2\\\\n\\\\t| collection |\\\\n\\\\tcollection := #('Jim' 'Mary' 'John' 'Andrew' ) asOrderedCollection.\\\\n\\\\tcollection add: 'James' before: 'Jim'.\\\\n\\\\tcollection add: 'Margaret' before: 'Andrew'.\\\\n\\\\tself assert: (collection indexOf: 'James')\\\\n\\\\t\\\\t\\\\t+ 1\\\\n\\\\t\\\\t\\\\t= (collection indexOf: 'Jim').\\\\n\\\\tself assert: (collection indexOf: 'Margaret')\\\\n\\\\t\\\\t\\\\t+ 1\\\\n\\\\t\\\\t\\\\t= (collection indexOf: 'Andrew')! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAdding' stamp: 'zz 12/7/2005 18:59'!\\\\ntestAddLast\\\\n\\\\t| l |\\\\n\\\\tl := #(1 2 3 4) asOrderedCollection.\\\\n\\\\tl addLast: 88.\\\\n\\\\tself assert: (l =  #(1 2 3 4 88) asOrderedCollection).\\\\n\\\\tl addLast: 99.\\\\n\\\\tself assert: (l =  #(1 2 3 4 88 99) asOrderedCollection). \\\\n\\\\n! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAdding' stamp: 'sd 3/21/2006 22:37'!\\\\ntestAtIfAbsentPut\\\\n\\\\t\\\\\\\"Allows one to add an element at an index if no element exist at this index\\\\\\\"\\\\n\\\\t\\\\\\\"self run:#testAtIfAbsentPut\\\\\\\" \\\\n\\\\t\\\\n\\\\t| c |\\\\n\\\\tc := #(1 2 3 4 ) asOrderedCollection.\\\\n\\\\tself\\\\n\\\\t\\\\tshouldnt: [c at: 2 ifAbsentPut: [5]]\\\\n\\\\t\\\\traise: Error.\\\\n\\\\tself assert: c = #(1 2 3 4 ) asOrderedCollection.\\\\n\\\\tc at: 5 ifAbsentPut: [5].\\\\n\\\\tself assert: c = #(1 2 3 4 5 ) asOrderedCollection.\\\\n\\\\tc at: 7 ifAbsentPut: [7].\\\\n\\\\tself assert: c = #(1 2 3 4 5 nil 7 ) asOrderedCollection! !\\\\n\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAccessing' stamp: 'zz 12/7/2005 18:50'!\\\\ntestAt\\\\n\\\\t| collection |\\\\n\\\\tcollection := #('Jim' 'Mary' 'John' 'Andrew' ) asOrderedCollection.\\\\n\\\\tself assert: (collection at:1) = 'Jim'.\\\\n\\\\tself assert: (collection at:2) = 'Mary'! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAccessing' stamp: 'sd 3/21/2006 22:38'!\\\\ntestAtPut\\\\n\\\\t\\\\\\\"Allows one to replace an element but not at an off range index\\\\\\\"\\\\n\\\\t\\\\\\\"self run:#testAtPut\\\\\\\"\\\\n\\\\t| c |\\\\n\\\\tc := #(1 2 3 4 ) asOrderedCollection.\\\\n\\\\tc at: 2 put: 5.\\\\n\\\\tself assert: c = #(1 5 3 4 ) asOrderedCollection.\\\\n\\\\tself\\\\n\\\\t\\\\tshould: [c at: 5 put: 8]\\\\n\\\\t\\\\traise: Error.\\\\n\\\\tself deny: c = #(1 5 3 4 8 ) asOrderedCollection! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAccessing' stamp: 'sd 3/21/2006 22:39'!\\\\ntestCapacity\\\\n\\\\t\\\\\\\"Allows one to check the current capacity of an Ordered collection\\\\\\\"\\\\n\\\\t\\\\\\\"self run:#testCapacity\\\\\\\"\\\\n\\\\t\\\\n\\\\t| c1 c2 c3 |\\\\n\\\\tc1 := #(1 2 ) asOrderedCollection.\\\\n\\\\tself assert: (c1 capacity =  2).\\\\n\\\\tc2 := OrderedCollection new: 10.\\\\n\\\\tc2 add: 3.\\\\n\\\\tself assert: (c2 capacity = 10).\\\\t\\\\n\\\\tc3 := OrderedCollection new.\\\\n\\\\tself deny: (c3 capacity =  0).\\\\n\\\\t! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsAccessing' stamp: 'sd 3/21/2006 22:38'!\\\\ntestSize\\\\n\\\\t\\\\\\\"Allows one to check the size of an Ordered collection\\\\\\\"\\\\n\\\\t\\\\\\\"self run:#testSize\\\\\\\"\\\\n\\\\t\\\\n\\\\t| c1 c2 |\\\\n\\\\tc1 := #(1 2 ) asOrderedCollection.\\\\n\\\\tself assert: (c1 size =  2).\\\\n\\\\t\\\\n\\\\tc2 := OrderedCollection new.\\\\n\\\\tself assert: (c2 size = 0)\\\\n\\\\t! !\\\\n\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsEnumerating' stamp: 'sd 3/21/2006 22:41'!\\\\ntestCollect\\\\n\\\\t\\\\\\\"Allows one to collect some element of a collection into another collection\\\\\\\"\\\\n\\\\t\\\\\\\"self run: #testCollect\\\\\\\"\\\\n\\\\t \\\\n\\\\t| c1 c2 res |\\\\n\\\\tc1 := #(-1 2 -3 4) asOrderedCollection.\\\\n\\\\tc2 := #(1 2 3 4) asOrderedCollection.\\\\n\\\\tres := c1 collect: [:each | each abs].\\\\n\\\\tself assert: (c2 = res).! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsEnumerating' stamp: 'cm 3/8/2006 09:09'!\\\\ntestCollectFromTo\\\\n\\\\t\\\\\\\"Allows one to collect some element of a collection into another collection between a first index and an end index for the collect\\\\\\\"\\\\n\\\\t\\\\\\\"self run: #testCollectFromTo\\\\\\\"\\\\n\\\\t\\\\n\\\\t| c1 res |\\\\n\\\\tc1 := #(-1 2 -3 4 -5 6 -7 8) asOrderedCollection.\\\\n\\\\tres := c1 collect: [:each | each abs] from: 1 to: 3.\\\\n\\\\tself assert: (res = #(1 2 3) asOrderedCollection).\\\\n\\\\tself should: [c1 collect: [:each | each abs] from: 10 to: 13] raise: Error.\\\\n\\\\tself should: [c1 collect: [:each | each abs] from: 5 to: 2] raise: Error.! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsEnumerating' stamp: 'zz 12/7/2005 19:06'!\\\\ntestIndexOf\\\\n\\\\t| collection indices |\\\\n\\\\tcollection := #('Jim' 'Mary' 'John' 'Andrew' ) asOrderedCollection.\\\\n\\\\tindices := collection\\\\n\\\\t\\\\t\\\\t\\\\tcollect: [:item | collection indexOf: item].\\\\n\\\\tself assert: (1 to: 4) asOrderedCollection = indices! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsEnumerating' stamp: 'sd 6/5/2005 09:21'!\\\\ntestIndexOfWithDuplicates\\\\n\\\\n   | collection indices bagOfIndices |\\\\n   collection := #('Jim' 'Mary' 'John' 'Andrew' 'Mary' 'John' 'Jim' 'Micheal') asOrderedCollection.\\\\n   indices := collection collect: [:item | collection indexOf: item].\\\\n   self assert: indices asSet size = collection asSet size.\\\\n   bagOfIndices := indices asBag.\\\\n   self assert: (indices asSet \\\\n                    allSatisfy: [:index | (bagOfIndices occurrencesOf: index)\\\\n\\\\t                                       = (collection occurrencesOf: (collection at: index))]).\\\\n\\\\n  \\\\\\\"  indexOf:  returns the index of the first occurrence of an item.\\\\n     For an item with n occurrences, the index of its first occurrence\\\\n     is found  n  times. \\\\\\\"! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsEnumerating' stamp: 'cm 3/8/2006 10:02'!\\\\ntestWithCollect\\\\n\\\\t\\\\\\\"Allows one to collect some element of two collections into another collection with element corresponding to the condition in the blocks\\\\\\\"\\\\n\\\\t\\\\\\\"self run: #testWithCollect\\\\\\\"\\\\n\\\\t\\\\n\\\\t| c1 c2 res |\\\\n\\\\tc1 := #(-1 2 -3 4 -5 6 -7 8) asOrderedCollection.\\\\n\\\\tc2 := #(-9 10 -11 12 -13 14 -15 16) asOrderedCollection.\\\\n\\\\tres := c1 with: c2 collect: [:each1 :each2 | each1 < each2\\\\n\\\\t\\\\tifTrue: [each1]\\\\n\\\\t\\\\tifFalse: [each2]].\\\\n\\\\tself assert: (res = #(-9 2 -11 4 -13 6 -15 8) asOrderedCollection).\\\\n\\\\t! !\\\\n\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsCopying' stamp: 'sd 3/21/2006 22:40'!\\\\ntestCopyEmpty\\\\n\\\\t\\\\\\\"Allows one to create a copy of the receiver that contains no elements\\\\\\\"\\\\n\\\\t\\\\\\\"self run:#testCopyEmpty\\\\\\\"\\\\n\\\\t\\\\n\\\\t| c1 c2 |\\\\n\\\\tc1 := #(1 2 3 4 ) asOrderedCollection.\\\\n\\\\tc2 := c1 copyEmpty.\\\\n\\\\tself assert: (c2 size = 0).! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsCopying' stamp: 'sd 3/21/2006 22:41'!\\\\ntestCopyFromTo\\\\n\\\\t\\\\\\\"Allows one to create a copy of the receiver that contains elements from position start to end\\\\\\\"\\\\n\\\\t\\\\\\\"self run: #testCopyFromTo\\\\\\\"\\\\n\\\\t\\\\n\\\\t| c1 c2 c3 | \\\\n\\\\tc1 := #(1 2 3 4) asOrderedCollection.\\\\n\\\\tc2 := (c1 copyFrom: 1 to: 2).\\\\n\\\\tself assert: c2 = #(1 2) asOrderedCollection.\\\\n\\\\tself should: [c1 copyFrom: 10 to: 20] raise: Error.\\\\n\\\\t\\\\n\\\\tc3 := c1 copyFrom: 4 to: 2.\\\\n\\\\tself assert: c3 isEmpty.\\\\n\\\\t\\\\n\\\\tself should: [c1 copyFrom: 4 to: 5 ] raise: Error.\\\\n\\\\t\\\\n\\\\t\\\\n\\\\t\\\\n! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsCopying' stamp: 'sd 3/21/2006 22:41'!\\\\ntestCopyReplaceFromToWith\\\\n\\\\t\\\\\\\"Allows one to create a copy from the receiver which elements between start and end of the \\\\treceiver being replace by \\\\telement of the collection after with:\\\\\\\"\\\\n\\\\t\\\\\\\"self run:#testCopyReplaceFromToWith\\\\\\\"\\\\n\\\\n\\\\t| c1 c2 c3 c4 |\\\\n\\\\tc1 := #(1 2 3 4) asOrderedCollection.\\\\n\\\\tc2 := #(5 6 7 8 9) asOrderedCollection.\\\\n\\\\tc3 := (c2 copyReplaceFrom: 1 to: 2 with: c1).\\\\n\\\\tself assert: c3 = #(1 2 3 4 7 8 9) asOrderedCollection.\\\\n\\\\tself should: [c2 copyReplaceFrom: 3 to: 1 with: c1] raise: Error.\\\\n\\\\t\\\\n\\\\tc4 := (c2 copyReplaceFrom: 10 to: 25 with: c1).\\\\n\\\\tself assert: c4 = #(5 6 7 8 9 1 2 3 4) asOrderedCollection.\\\\n\\\\t\\\\n\\\\t! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsCopying' stamp: 'sd 3/21/2006 22:41'!\\\\ntestCopyWith\\\\n\\\\t\\\\\\\"Allows one to create a copy of the receiver that contains the new element at the end\\\\\\\"\\\\n\\\\t\\\\\\\"self run: #testCopyWith\\\\\\\"\\\\n\\\\t\\\\n\\\\t| c1 | \\\\n\\\\tc1 := #(1 2 3 4) asOrderedCollection.\\\\n\\\\tc1 := c1 copyWith: 6.\\\\n\\\\tself assert: c1 = #(1 2 3 4 6) asOrderedCollection.\\\\n\\\\t\\\\n\\\\t\\\\n\\\\n\\\\t\\\\n\\\\t\\\\n\\\\t\\\\n! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsCopying' stamp: 'zz 12/7/2005 13:47'!\\\\ntestReversed\\\\n\\\\t| collection1 collection2 |\\\\n\\\\tcollection1 := #('Jim' 'Mary' 'John' 'Andrew' ) asOrderedCollection.\\\\n\\\\tcollection2 := collection1 reversed.\\\\n\\\\tself assert: collection2 first = 'Andrew'.\\\\n\\\\tself assert: collection2 last = 'Jim'! !\\\\n\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsRemoving' stamp: 'zz 12/7/2005 19:05'!\\\\ntestRemoveAllSuchThat\\\\n\\\\t| collection |\\\\n\\\\tcollection := (1 to: 10) asOrderedCollection.\\\\n\\\\tcollection\\\\n\\\\t\\\\tremoveAllSuchThat: [:e | e even].\\\\n\\\\tself assert: collection = (1 to: 10 by: 2) asOrderedCollection! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsRemoving' stamp: 'sd 3/21/2006 22:39'!\\\\ntestRemoveAt\\\\n\\\\t\\\\\\\"Allows one to remove an element from a collection at an index\\\\\\\"\\\\n\\\\t\\\\\\\"self run:#testRemoveAt\\\\\\\" \\\\n\\\\t\\\\n\\\\t| c1 |\\\\n\\\\tc1 := #(2 3 4 6) asOrderedCollection.\\\\n\\\\tc1 removeAt: 2.\\\\n\\\\tself assert: (c1 = #(2 4 6) asOrderedCollection).\\\\n\\\\tself should: [c1 removeAt: 10] raise: Error.\\\\n\\\\tself should: [c1 removeAt: -1] raise: Error.\\\\n\\\\t! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsRemoving' stamp: 'sd 3/21/2006 22:39'!\\\\ntestRemoveFirst\\\\n\\\\t\\\\\\\"Allows one to remove n element of a collection at the first\\\\\\\"\\\\n\\\\t\\\\\\\"self run:#testRemoveFirst\\\\\\\" \\\\n\\\\t\\\\n\\\\t| c1 |\\\\n\\\\tc1 := #(2 3 4 6) asOrderedCollection.\\\\n\\\\tc1 removeFirst: 1.\\\\n\\\\tself assert: (c1 = #(3 4 6) asOrderedCollection).\\\\n\\\\tc1 removeFirst: 2.\\\\n\\\\tself assert: (c1 = #(6) asOrderedCollection).\\\\n\\\\tself should: [c1 removeFirst: 10] raise: Error.\\\\n\\\\t\\\\n\\\\t! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsRemoving' stamp: 'sd 3/21/2006 22:39'!\\\\ntestRemoveIfAbsent\\\\n\\\\t\\\\\\\"Allows one to remove an element from a collection and to copy it in another collection.\\\\\\\"\\\\n\\\\t\\\\\\\"If the element isn't in the first collection, the second collection copy the element after ifAbsent\\\\\\\"\\\\n\\\\t\\\\\\\"self run:#testRemoveIfAbsent\\\\\\\"\\\\n\\\\t\\\\n\\\\t| c1 c2 |\\\\n\\\\tc1 := #(1 2 3 4) asOrderedCollection.\\\\n\\\\tc2 := OrderedCollection new.\\\\n\\\\t\\\\n\\\\tc2 add: (c1 remove: 2 ifAbsent: [6]).\\\\n\\\\tself assert: (c1 = #(1 3 4) asOrderedCollection).\\\\n\\\\tself assert: (c2 = #(2) asOrderedCollection).\\\\n\\\\t\\\\n\\\\tc2 add: (c1 remove: 18 ifAbsent: [6]).\\\\n\\\\tself assert: (c1 = #(1 3 4) asOrderedCollection).\\\\n\\\\tself assert: (c2 = #(2 6) asOrderedCollection).! !\\\\n\\\\n!OrderedCollectionTest methodsFor: 'testsRemoving' stamp: 'sd 3/21/2006 22:39'!\\\\ntestRemoveLast\\\\n\\\\t\\\\\\\"Allows one to remove n element of a collection at the end\\\\\\\"\\\\n\\\\t\\\\\\\"self run:#testRemoveLast\\\\\\\" \\\\n\\\\t\\\\n\\\\t| c1 |\\\\n\\\\tc1 := #(2 3 4 6) asOrderedCollection.\\\\n\\\\tc1 removeLast: 1.\\\\n\\\\tself assert: (c1 = #(2 3 4) asOrderedCollection).\\\\n\\\\tc1 removeLast: 2.\\\\n\\\\tself assert: (c1 = #(2) asOrderedCollection).\\\\n\\\\tself should: [c1 removeLast: 10] raise: Error.! !\\\\nFillStyle subclass: #OrientedFillStyle\\\\n\\\\tinstanceVariableNames: 'origin direction normal'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Balloon-Fills'!\\\\n!OrientedFillStyle commentStamp: '<historical>' prior: 0!\\\\nOrientedFill is an abstract superclass for fills which can be aligned appropriately.\\\\n\\\\nInstance variables:\\\\n\\\\torigin\\\\t<Point>\\\\tThe point at which to align the fill.\\\\n\\\\tdirection <Point>\\\\tThe direction in which the fill is defined\\\\n\\\\tnormal\\\\t<Point>\\\\tTypically, just the direction rotated by 90 degrees.!\\\\n\\\\n\\\\n!OrientedFillStyle methodsFor: 'accessing' stamp: 'ar 8/25/2001 17:03'!\\\\ndirection\\\\n\\\\t^direction ifNil:[direction := normal y @ normal x negated]! !\\\\n\\\\n!OrientedFillStyle methodsFor: 'accessing' stamp: 'ar 11/11/1998 22:37'!\\\\ndirection: aPoint\\\\n\\\\tdirection := aPoint! !\\\\n\\\\n!OrientedFillStyle methodsFor: 'accessing' stamp: 'ar 11/14/1998 23:31'!\\\\nnormal\\\\n\\\\t^normal ifNil:[normal := direction y negated @ direction x]! !\\\\n\\\\n!OrientedFillStyle methodsFor: 'accessing' stamp: 'ar 11/11/1998 22:37'!\\\\nnormal: aPoint\\\\n\\\\tnormal := aPoint! !\\\\n\\\\n!OrientedFillStyle methodsFor: 'accessing' stamp: 'ar 11/11/1998 22:38'!\\\\norigin\\\\n\\\\t^origin! !\\\\n\\\\n!OrientedFillStyle methodsFor: 'accessing' stamp: 'ar 11/11/1998 22:38'!\\\\norigin: aPoint\\\\n\\\\torigin := aPoint.! !\\\\n\\\\n\\\\n!OrientedFillStyle methodsFor: 'testing' stamp: 'ar 6/18/1999 07:57'!\\\\nisOrientedFill\\\\n\\\\t\\\\\\\"Return true if the receiver keeps an orientation (e.g., origin, direction, and normal)\\\\\\\"\\\\n\\\\t^true! !\\\\n\\\\n\\\\n!OrientedFillStyle methodsFor: '*Morphic-Balloon' stamp: 'dgd 10/17/2003 22:35'!\\\\naddFillStyleMenuItems: aMenu hand: aHand from: aMorph\\\\n\\\\t\\\\\\\"Add the items for changing the current fill style of the receiver\\\\\\\"\\\\n\\\\taMenu add: 'change origin' translated target: self selector: #changeOriginIn:event: argument: aMorph.\\\\n\\\\taMenu add: 'change orientation' translated target: self selector: #changeOrientationIn:event: argument: aMorph.! !\\\\n\\\\n!OrientedFillStyle methodsFor: '*Morphic-Balloon' stamp: 'ar 6/18/1999 07:41'!\\\\nchangeOrientationIn: aMorph event: evt\\\\n\\\\t\\\\\\\"Interactively change the origin of the receiver\\\\\\\"\\\\n\\\\t| handle |\\\\n\\\\thandle _ HandleMorph new forEachPointDo:[:pt|\\\\n\\\\t\\\\tself direction: pt - self origin.\\\\n\\\\t\\\\tself normal: nil.\\\\n\\\\t\\\\taMorph changed].\\\\n\\\\tevt hand attachMorph: handle.\\\\n\\\\thandle startStepping.! !\\\\n\\\\n!OrientedFillStyle methodsFor: '*Morphic-Balloon' stamp: 'ar 6/18/1999 07:28'!\\\\nchangeOriginIn: aMorph event: evt\\\\n\\\\t\\\\\\\"Interactively change the origin of the receiver\\\\\\\"\\\\n\\\\t| handle |\\\\n\\\\thandle _ HandleMorph new forEachPointDo:[:pt|\\\\n\\\\t\\\\tself origin: pt.\\\\n\\\\t\\\\taMorph changed].\\\\n\\\\tevt hand attachMorph: handle.\\\\n\\\\thandle startStepping.! !\\\\nNotification subclass: #OutOfScopeNotification\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Exceptions-Kernel'!\\\\n\\\\n!OutOfScopeNotification methodsFor: 'as yet unclassified' stamp: 'RAA 2/5/2001 10:41'!\\\\ndefaultAction\\\\n\\\\n\\\\tself resume: false! !\\\\nPBPreferenceView subclass: #PBBooleanPreferenceView\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'PreferenceBrowser'!\\\\n!PBBooleanPreferenceView commentStamp: '<historical>' prior: 0!\\\\nI am responsible for building the visual representation of a preference that accepts true and false values. This view is aimed to be used inside a PreferenceBrowser panel.!\\\\n\\\\n\\\\n!PBBooleanPreferenceView methodsFor: 'user interface' stamp: 'hpt 9/26/2004 00:23'!\\\\nenabledButton\\\\n\\\\t| aButton aLabel |\\\\n\\\\taButton := UpdatingThreePhaseButtonMorph checkBox\\\\n\\\\t\\\\ttarget: self preference;\\\\n\\\\t\\\\tactionSelector: #togglePreferenceValue;\\\\n\\\\t\\\\tgetSelector: #preferenceValue;\\\\n\\\\t\\\\tyourself.\\\\n\\\\taLabel := (StringMorph contents: 'enabled' translated\\\\n\\\\t\\\\t\\\\t\\\\tfont: (StrikeFont familyName: TextStyle defaultFont familyName\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsize: TextStyle defaultFont pointSize - 1)).\\\\n\\\\t^self horizontalPanel\\\\n\\\\t\\\\taddMorphBack: aButton;\\\\n\\\\t\\\\taddMorphBack: aLabel;\\\\n\\\\t\\\\tyourself.! !\\\\n\\\\n!PBBooleanPreferenceView methodsFor: 'user interface' stamp: 'hpt 9/26/2004 00:27'!\\\\nlocalToProjectButton\\\\n\\\\t| aButton aLabel |\\\\n\\\\taButton := UpdatingThreePhaseButtonMorph checkBox\\\\n\\\\t\\\\ttarget: self preference;\\\\n\\\\t\\\\tactionSelector: #toggleProjectLocalness;\\\\n\\\\t\\\\tgetSelector: #localToProject;\\\\n\\\\t\\\\tyourself.\\\\n\\\\taLabel := (StringMorph contents: 'local' translated\\\\n\\\\t\\\\t\\\\t\\\\tfont: (StrikeFont familyName: TextStyle defaultFont familyName\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsize: TextStyle defaultFont pointSize - 1)).\\\\t\\\\t\\\\n\\\\t^self horizontalPanel\\\\n\\\\t\\\\taddMorphBack: aButton;\\\\n\\\\t\\\\taddMorphBack: aLabel;\\\\n\\\\t\\\\tyourself.! !\\\\n\\\\n!PBBooleanPreferenceView methodsFor: 'user interface' stamp: 'hpt 9/26/2004 00:25'!\\\\nrepresentativeButtonWithColor: aColor inPanel: aPreferencesPanel\\\\n\\\\t^self horizontalPanel\\\\n\\\\t\\\\tlayoutInset: 2;\\\\n\\\\t\\\\tcellInset: 7;\\\\n\\\\t\\\\tcolor: aColor;\\\\n\\\\t\\\\taddMorphBack: (StringMorph contents: self preference name);\\\\n\\\\t\\\\taddMorphBack: self horizontalFiller; \\\\n\\\\t\\\\taddMorphBack: self enabledButton;\\\\n\\\\t\\\\taddMorphBack: self localToProjectButton;\\\\n\\\\t\\\\tyourself.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPBBooleanPreferenceView class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PBBooleanPreferenceView class methodsFor: 'class initialization' stamp: 'hpt 9/26/2004 15:47'!\\\\ninitialize\\\\n\\\\tPreferenceViewRegistry ofBooleanPreferences register: self.\\\\n! !\\\\n\\\\n!PBBooleanPreferenceView class methodsFor: 'class initialization' stamp: 'hpt 9/26/2004 15:47'!\\\\nunload\\\\n\\\\tPreferenceViewRegistry ofBooleanPreferences unregister: self.! !\\\\nPBPreferenceView subclass: #PBColorPreferenceView\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'PreferenceBrowser'!\\\\n\\\\n!PBColorPreferenceView methodsFor: 'user interface' stamp: 'hpt 12/6/2004 21:24'!\\\\ncolorSwatch\\\\n\\\\t^UpdatingRectangleMorph new\\\\n\\\\t\\\\ttarget: self preference;\\\\n\\\\t\\\\tgetSelector: #preferenceValue;\\\\n\\\\t\\\\tputSelector: #preferenceValue:;\\\\n\\\\t\\\\textent: 22@22;\\\\n\\\\t\\\\tsetBalloonText: 'click here to change the color' translated;\\\\n\\\\t\\\\tyourself.! !\\\\n\\\\n!PBColorPreferenceView methodsFor: 'user interface' stamp: 'hpt 12/6/2004 21:12'!\\\\nrepresentativeButtonWithColor: aColor inPanel: aPreferenceBrowser\\\\n\\\\t^self horizontalPanel\\\\n\\\\t\\\\tlayoutInset: 2;\\\\n\\\\t\\\\tcolor: aColor;\\\\n\\\\t\\\\tcellInset: 20;\\\\n\\\\t\\\\tcellPositioning: #center;\\\\n\\\\t\\\\taddMorphBack: (StringMorph contents: self preference name);\\\\n\\\\t\\\\taddMorphBack: self horizontalFiller;\\\\n\\\\t\\\\taddMorphBack: self colorSwatch;\\\\n\\\\t\\\\tyourself! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPBColorPreferenceView class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PBColorPreferenceView class methodsFor: 'class initialization' stamp: 'hpt 12/6/2004 20:49'!\\\\ninitialize\\\\n\\\\tPreferenceViewRegistry ofColorPreferences register: self.! !\\\\n\\\\n!PBColorPreferenceView class methodsFor: 'class initialization' stamp: 'hpt 12/6/2004 20:49'!\\\\nunload\\\\n\\\\tPreferenceViewRegistry ofColorPreferences unregister: self.! !\\\\nPBPreferenceView subclass: #PBHaloThemePreferenceView\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'PreferenceBrowser'!\\\\n!PBHaloThemePreferenceView commentStamp: '<historical>' prior: 0!\\\\nI am responsible for building the button for the Halo Theme preference!\\\\n\\\\n\\\\n!PBHaloThemePreferenceView methodsFor: 'initialization' stamp: 'hpt 12/8/2004 18:12'!\\\\ninitialize\\\\n\\\\tself addActionTitled: 'edit custom halos' \\\\n\\\\t\\\\ttarget: Preferences \\\\n\\\\t\\\\tselector:  #editCustomHalos \\\\n\\\\t\\\\targuments: {} \\\\n\\\\t\\\\tballoonText: 'Click here to edit the method that defines the custom halos' translated.! !\\\\n\\\\n\\\\n!PBHaloThemePreferenceView methodsFor: 'user interface' stamp: 'hpt 12/8/2004 18:18'!\\\\nhaloThemeRadioButtons\\\\n\\\\t\\\\\\\"Answer a column of butons representing the choices of halo theme\\\\\\\"\\\\n\\\\n\\\\t| buttonColumn aRow aRadioButton aLabel |\\\\n\\\\tbuttonColumn := self verticalPanel.\\\\n\\\\t#(\\\\t(iconicHaloSpecifications iconic iconicHalosInForce\\\\t'circular halos with icons inside')\\\\n\\\\t\\\\t(classicHaloSpecs\\\\tclassic\\\\tclassicHalosInForce\\\\t\\\\t'plain circular halos')\\\\n\\\\t\\\\t(simpleFullHaloSpecifications\\\\t\\\\tsimple\\\\tsimpleHalosInForce\\\\t'fewer, larger halos')\\\\n\\\\t\\\\t(customHaloSpecs\\\\tcustom\\\\tcustomHalosInForce\\\\t\\\\t'customizable halos')) do:\\\\n\\\\n\\\\t\\\\t[:quad |\\\\n\\\\t\\\\t\\\\taRadioButton := UpdatingThreePhaseButtonMorph radioButton\\\\n\\\\t\\\\t\\\\t\\\\ttarget: Preferences;\\\\n\\\\t\\\\t\\\\t\\\\tsetBalloonText: quad fourth;\\\\n\\\\t\\\\t\\\\t\\\\tactionSelector: #installHaloTheme:;\\\\n\\\\t\\\\t\\\\t\\\\tgetSelector: quad third;\\\\n\\\\t\\\\t\\\\t\\\\targuments: (Array with: quad first);\\\\n\\\\t\\\\t\\\\t\\\\tyourself.\\\\n\\\\t\\\\t\\\\taLabel := (StringMorph contents: quad second asString)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsetBalloonText: quad fourth;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tyourself.\\\\n\\\\t\\\\t\\\\taRow := self horizontalPanel\\\\n\\\\t\\\\t\\\\t\\\\tcellInset: 4;\\\\n\\\\t\\\\t\\\\t\\\\taddMorphBack: aRadioButton;\\\\n\\\\t\\\\t\\\\t\\\\taddMorphBack: aLabel.\\\\n\\\\t\\\\t\\\\tbuttonColumn addMorphBack: aRow].\\\\n\\\\t^ buttonColumn\\\\n\\\\n\\\\t\\\\\\\"(Preferences preferenceAt: #haloTheme) view tearOffButton\\\\\\\"! !\\\\n\\\\n!PBHaloThemePreferenceView methodsFor: 'user interface' stamp: 'hpt 9/26/2004 00:45'!\\\\nrepresentativeButtonWithColor: aColor inPanel: aPreferencesPanel\\\\n\\\\t| innerPanel |\\\\n\\\\tinnerPanel := self horizontalPanel\\\\n\\\\t\\\\taddMorphBack: (self blankSpaceOf: 10@0);\\\\n\\\\t\\\\taddMorphBack: self haloThemeRadioButtons;\\\\n\\\\t\\\\tyourself.\\\\n\\\\t^self verticalPanel\\\\n\\\\t\\\\tcolor: aColor;\\\\n\\\\t\\\\tlayoutInset: 2;\\\\n\\\\t\\\\taddMorphBack: (StringMorph contents: self preference name);\\\\n\\\\t\\\\taddMorphBack: innerPanel.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPBHaloThemePreferenceView class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PBHaloThemePreferenceView class methodsFor: 'class initialization' stamp: 'hpt 9/26/2004 15:48'!\\\\ninitialize\\\\n\\\\tPreferenceViewRegistry ofHaloThemePreferences register: self.! !\\\\n\\\\n!PBHaloThemePreferenceView class methodsFor: 'class initialization' stamp: 'hpt 9/26/2004 15:48'!\\\\nunload\\\\n\\\\tPreferenceViewRegistry ofHaloThemePreferences unregister: self.! !\\\\nPBPreferenceView subclass: #PBNumericPreferenceView\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'PreferenceBrowser'!\\\\n\\\\n!PBNumericPreferenceView methodsFor: 'user interface' stamp: 'hpt 12/9/2004 22:23'!\\\\npreferenceValue\\\\n\\\\t^self preference preferenceValue asString! !\\\\n\\\\n!PBNumericPreferenceView methodsFor: 'user interface' stamp: 'hpt 12/10/2004 22:53'!\\\\npreferenceValue: aTextOrString\\\\n\\\\t(aTextOrString notEmpty and: [aTextOrString asString isAllDigits])\\\\n\\\\t\\\\tifFalse: [^false].\\\\n\\\\tself preference preferenceValue: aTextOrString asNumber.\\\\n\\\\t^true.! !\\\\n\\\\n!PBNumericPreferenceView methodsFor: 'user interface' stamp: 'hpt 12/9/2004 22:19'!\\\\nrepresentativeButtonWithColor: aColor inPanel: aPreferenceBrowser\\\\n\\\\t^self horizontalPanel\\\\n\\\\t\\\\tlayoutInset: 2;\\\\n\\\\t\\\\tcolor: aColor;\\\\n\\\\t\\\\tcellInset: 20;\\\\n\\\\t\\\\tcellPositioning: #center;\\\\n\\\\t\\\\taddMorphBack: (StringMorph contents: self preference name);\\\\n\\\\t\\\\taddMorphBack: self textField;\\\\n\\\\t\\\\tyourself.! !\\\\n\\\\n!PBNumericPreferenceView methodsFor: 'user interface' stamp: 'hpt 12/9/2004 22:19'!\\\\ntextField\\\\n\\\\t^(PluggableTextMorph\\\\n\\\\t\\\\ton: self\\\\n\\\\t\\\\ttext: #preferenceValue\\\\n\\\\t\\\\taccept: #preferenceValue:)\\\\n\\\\t\\\\t\\\\thideVScrollBarIndefinitely: true;\\\\n\\\\t\\\\t\\\\tborderColor: #inset;\\\\n\\\\t\\\\t\\\\tacceptOnCR: true;\\\\n\\\\t\\\\t\\\\tcolor: Color gray veryMuchLighter;\\\\n\\\\t\\\\t\\\\tvResizing: #rigid;\\\\n\\\\t\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\t\\\\theight: TextStyle defaultFont height + 6;\\\\n\\\\t\\\\t\\\\tyourself.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPBNumericPreferenceView class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PBNumericPreferenceView class methodsFor: 'class initialization' stamp: 'hpt 12/9/2004 22:21'!\\\\ninitialize\\\\n\\\\tPreferenceViewRegistry ofNumericPreferences register: self.! !\\\\n\\\\n!PBNumericPreferenceView class methodsFor: 'class initialization' stamp: 'hpt 12/9/2004 22:21'!\\\\nunload\\\\n\\\\tPreferenceViewRegistry ofNumericPreferences unregister: self.! !\\\\nMorph subclass: #PBPreferenceButtonMorph\\\\n\\\\tinstanceVariableNames: 'moreButton model preference preferenceMorphicView preferenceView'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'PreferenceBrowser'!\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'accessing' stamp: 'hpt 12/8/2004 15:34'!\\\\nmodel\\\\n\\\\t^model! !\\\\n\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'extra controls' stamp: 'hpt 12/8/2004 18:15'!\\\\nactionButtons\\\\n\\\\t^self preferenceView actions collect: [:aTuple |\\\\n\\\\t\\\\tself basicButton\\\\n\\\\t\\\\t\\\\t\\\\tlabel: aTuple first;\\\\n\\\\t\\\\t\\\\t\\\\ttarget: aTuple second;\\\\n\\\\t\\\\t\\\\t\\\\tactionSelector: aTuple third;\\\\n\\\\t\\\\t\\\\t\\\\targuments: aTuple fourth;\\\\n\\\\t\\\\t\\\\t\\\\tsetBalloonText: aTuple fifth ]! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'extra controls' stamp: 'hpt 8/24/2005 20:33'!\\\\naddExtraControls\\\\n\\\\t| m |\\\\n\\\\tm := self horizontalPanel\\\\n\\\\t\\\\tcellInset: 3;\\\\n\\\\t\\\\taddAllMorphs: self actionButtons;\\\\n\\\\t\\\\taddMorphBack: self horizontalFiller;\\\\n\\\\t\\\\taddMorphBack: self moreButton;\\\\n\\\\t\\\\tyourself.\\\\n\\\\tself \\\\n\\\\t\\\\taddMorphBack: (self blankSpaceOf: 2@2);\\\\n\\\\t\\\\taddMorphBack: self preferenceHelpTextMorph;\\\\n\\\\t\\\\tfullBounds; \\\\\\\"to force a layout compute needed by the textMorphs's autoFit\\\\\\\"\\\\n\\\\t\\\\taddMorphBack: m\\\\n! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'extra controls' stamp: 'hpt 12/8/2004 17:16'!\\\\nadvancedOptionsSelected\\\\n\\\\tself preferenceView offerPreferenceNameMenu: self model! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'extra controls' stamp: 'hpt 12/8/2004 18:17'!\\\\nmoreButton\\\\n\\\\t^moreButton ifNil: \\\\n\\\\t\\\\t[moreButton := self basicButton \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tlabel: 'more' translated; \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsetBalloonText: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'Click here for advanced options'translated;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tactionSelector: #advancedOptionsSelected]! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'extra controls' stamp: 'stephaneducasse 2/4/2006 20:39'!\\\\npreferenceHelpTextMorph\\\\n\\\\t| text tm |\\\\n\\\\ttext := self preferenceHelpText.\\\\n\\\\ttm := TextMorph new\\\\n\\\\t\\\\tcontents: text;\\\\n\\\\t\\\\twrapOnOff;\\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tvResizing: #shrinkWrap;\\\\n\\\\t\\\\tlock: true;\\\\n\\\\t\\\\tvisible: text notEmpty;\\\\n\\\\t\\\\tyourself. \\\\\\\"we don't want an empty textmorph showing\\\\\\\"\\\\n\\\\ttm isAutoFit\\\\n\\\\t\\\\tifFalse: [tm autoFitOnOff].\\\\n\\\\t^tm.! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'extra controls' stamp: 'hpt 12/8/2004 16:40'!\\\\nremoveExtraControls\\\\n\\\\tself submorphs copyWithoutFirst do: [:ea | ea delete]! !\\\\n\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'highlighting' stamp: 'hpt 12/8/2004 15:55'!\\\\nhighlightOff\\\\n\\\\tself beTransparent.\\\\n\\\\tself label color: Color black.\\\\n\\\\tself removeExtraControls.! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'highlighting' stamp: 'hpt 12/8/2004 17:25'!\\\\nhighlightOn\\\\n\\\\tself color: (Color gray alpha: 0.1).\\\\n\\\\tself label color: Color red.\\\\n\\\\tself addExtraControls.! !\\\\n\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'initialization' stamp: 'hpt 12/8/2004 15:38'!\\\\ninitializeLayout\\\\n\\\\tself layoutPolicy: TableLayout new;\\\\n\\\\t\\\\tbeTransparent;\\\\n\\\\t\\\\tlayoutInset: 0;\\\\n\\\\t\\\\tcellInset: 0;\\\\n\\\\t\\\\tlistCentering: #topLeft;\\\\n\\\\t\\\\tcellPositioning: #topLeft;\\\\n\\\\t\\\\tlistDirection: #topToBottom;\\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tvResizing: #shrinkWrap.\\\\t\\\\t! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'initialization' stamp: 'hpt 12/8/2004 15:38'!\\\\ninitializeWithPreference: aPreference model: aModel\\\\n\\\\tpreference := aPreference.\\\\n\\\\tmodel := aModel.\\\\n\\\\tself initializeLayout.\\\\n\\\\tself addMorphBack: self preferenceMorphicView.\\\\n\\\\tself highlightOff.! !\\\\n\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'preference accessing' stamp: 'hpt 12/8/2004 15:42'!\\\\nlabel\\\\n\\\\t^self preferenceMorphicView firstSubmorph! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'preference accessing' stamp: 'hpt 12/8/2004 15:13'!\\\\npreference\\\\n\\\\t^preference! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'preference accessing' stamp: 'hpt 12/8/2004 15:56'!\\\\npreferenceHelp\\\\n\\\\t| help name |\\\\n\\\\thelp := self preference helpString withBlanksTrimmed.\\\\n\\\\tname := self preference name.\\\\n\\\\t(self caseInsensitiveBeginsWith: name  in: help)\\\\n\\\\t\\\\tifTrue: [help := help allButFirst: name size].\\\\n\\\\t(help notEmpty and: [help first = $:])\\\\n\\\\t\\\\tifTrue: [help := help allButFirst].\\\\n\\\\t^help withBlanksTrimmed.\\\\n! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'preference accessing' stamp: 'hpt 12/8/2004 15:25'!\\\\npreferenceHelpText\\\\n\\\\t^self preferenceHelp asText\\\\n\\\\t\\\\taddAttribute: TextEmphasis italic;\\\\n\\\\t\\\\tyourself.! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'preference accessing' stamp: 'hpt 12/8/2004 15:48'!\\\\npreferenceMorphicView\\\\n\\\\t^preferenceMorphicView\\\\n\\\\t\\\\tifNil: \\\\n\\\\t\\\\t\\\\t[preferenceMorphicView := self preferenceView\\\\n\\\\t\\\\t\\\\t\\\\trepresentativeButtonWithColor: Color transparent inPanel: self model.\\\\n\\\\t\\\\t\\\\tpreferenceMorphicView hResizing: #spaceFill.\\\\n\\\\t\\\\t\\\\t^preferenceMorphicView]! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'preference accessing' stamp: 'stephaneducasse 2/4/2006 20:39'!\\\\npreferenceView\\\\n\\\\t^preferenceView\\\\n\\\\t\\\\tifNil: [preferenceView := self preference viewForPanel: self model.]! !\\\\n\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'utility methods' stamp: 'hpt 12/8/2004 17:06'!\\\\nbasicButton\\\\n\\\\t| button |\\\\n\\\\tbutton := SimpleButtonMorph new.\\\\n\\\\tbutton\\\\n\\\\t\\\\tborderWidth: 1;\\\\n\\\\t\\\\tborderColor: self paneColor;\\\\n\\\\t\\\\ton: #mouseEnter send: #value to: [button borderWidth: 2];\\\\n\\\\t\\\\ton: #mouseLeave send: #value to: [button borderWidth: 1];\\\\n\\\\t\\\\tvResizing: #rigid;\\\\n\\\\t\\\\theight: (TextStyle defaultFont height + 4);\\\\n\\\\t\\\\tuseSquareCorners;\\\\n\\\\t\\\\tclipSubmorphs: true;\\\\n\\\\t\\\\tcolor: self paneColor muchLighter;\\\\n\\\\t\\\\ttarget: self.\\\\n\\\\t^button! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'utility methods' stamp: 'hpt 12/8/2004 15:59'!\\\\nbasicPanel\\\\n\\\\t^BorderedMorph new\\\\n\\\\t\\\\tbeTransparent;\\\\n\\\\t\\\\textent: 0@0;\\\\n\\\\t\\\\tborderWidth: 0;\\\\n\\\\t\\\\tlayoutInset: 0;\\\\n\\\\t\\\\tcellInset: 0;\\\\n\\\\t\\\\tlayoutPolicy: TableLayout new;\\\\n\\\\t\\\\tlistCentering: #topLeft;\\\\n\\\\t\\\\tcellPositioning: #center;\\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tvResizing: #shrinkWrap;\\\\n\\\\t\\\\tyourself! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'utility methods' stamp: 'hpt 12/8/2004 15:29'!\\\\nblankSpaceOf: aPoint\\\\n\\\\t^Morph new \\\\n\\\\t\\\\tbeTransparent;\\\\n\\\\t\\\\textent: aPoint; \\\\n\\\\t\\\\tyourself! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'utility methods' stamp: 'hpt 12/8/2004 15:43'!\\\\ncaseInsensitiveBeginsWith: prefix in: string\\\\n\\\\t^(string findString: prefix startingAt: 1 caseSensitive: false) = 1! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'utility methods' stamp: 'hpt 12/8/2004 16:42'!\\\\nhorizontalFiller\\\\n\\\\t^self horizontalPanel\\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tyourself.! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'utility methods' stamp: 'hpt 12/8/2004 16:42'!\\\\nhorizontalPanel\\\\n\\\\t^self basicPanel\\\\n\\\\t\\\\tcellPositioning: #center;\\\\n\\\\t\\\\tlistDirection: #leftToRight;\\\\n\\\\t\\\\tyourself.! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'utility methods' stamp: 'stephaneducasse 2/4/2006 20:39'!\\\\npaneColor\\\\n\\\\t| browser |\\\\n\\\\tbrowser := (self ownerChain \\\\n\\\\t\\\\tdetect: [:ea | ea isKindOf: PreferenceBrowserMorph] \\\\n\\\\t\\\\tifNone: [^Color black]) .\\\\n\\\\t^browser paneColor! !\\\\n\\\\n!PBPreferenceButtonMorph methodsFor: 'utility methods' stamp: 'hpt 12/8/2004 15:27'!\\\\nverticalPanel\\\\n\\\\t^self basicPanel\\\\n\\\\t\\\\tcellPositioning: #topLeft;\\\\n\\\\t\\\\tlistDirection: #topToBottom;\\\\n\\\\t\\\\tyourself.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPBPreferenceButtonMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PBPreferenceButtonMorph class methodsFor: 'instance creation' stamp: 'hpt 12/8/2004 15:20'!\\\\npreference: aPreference\\\\n\\\\t^self preference: aPreference model: nil! !\\\\n\\\\n!PBPreferenceButtonMorph class methodsFor: 'instance creation' stamp: 'hpt 12/8/2004 15:19'!\\\\npreference: aPreference model: aModel\\\\n\\\\t^self new\\\\n\\\\t\\\\tinitializeWithPreference: aPreference model: aModel;\\\\n\\\\t\\\\tyourself.! !\\\\nPreferenceView subclass: #PBPreferenceView\\\\n\\\\tinstanceVariableNames: 'actions'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'PreferenceBrowser'!\\\\n!PBPreferenceView commentStamp: '<historical>' prior: 0!\\\\nI am just a refactor of all the common method of the PreferenceBrowser preference views!\\\\n\\\\n\\\\n!PBPreferenceView methodsFor: 'actions' stamp: 'stephaneducasse 2/4/2006 20:39'!\\\\nactions\\\\n\\\\t^actions ifNil: [actions := OrderedCollection new.]! !\\\\n\\\\n!PBPreferenceView methodsFor: 'actions' stamp: 'hpt 12/8/2004 18:13'!\\\\naddActionTitled: aTitle target: aTarget selector: aSelector arguments: aCollection balloonText: aText\\\\n\\\\tself actions add: { aTitle. aTarget. aSelector. aCollection. aText }! !\\\\n\\\\n\\\\n!PBPreferenceView methodsFor: 'user interface' stamp: 'hpt 9/26/2004 11:42'!\\\\nbasicPanel\\\\n\\\\t^BorderedMorph new\\\\n\\\\t\\\\tbeTransparent;\\\\n\\\\t\\\\textent: 0@0;\\\\n\\\\t\\\\tborderWidth: 0;\\\\n\\\\t\\\\tlayoutInset: 0;\\\\n\\\\t\\\\tcellInset: 2;\\\\n\\\\t\\\\tlayoutPolicy: TableLayout new;\\\\n\\\\t\\\\tlistCentering: #topLeft;\\\\n\\\\t\\\\tcellPositioning: #center;\\\\n\\\\t\\\\thResizing: #shrinkWrap;\\\\n\\\\t\\\\tvResizing: #shrinkWrap;\\\\n\\\\t\\\\tyourself! !\\\\n\\\\n!PBPreferenceView methodsFor: 'user interface' stamp: 'hpt 9/26/2004 00:15'!\\\\nblankSpaceOf: aPoint\\\\n\\\\t^Morph new \\\\n\\\\t\\\\tbeTransparent;\\\\n\\\\t\\\\textent: aPoint; \\\\n\\\\t\\\\tyourself! !\\\\n\\\\n!PBPreferenceView methodsFor: 'user interface' stamp: 'hpt 9/26/2004 00:13'!\\\\nhorizontalFiller\\\\n\\\\t^self horizontalPanel\\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tyourself.! !\\\\n\\\\n!PBPreferenceView methodsFor: 'user interface' stamp: 'hpt 9/26/2004 11:43'!\\\\nhorizontalPanel\\\\n\\\\t^self basicPanel\\\\n\\\\t\\\\tcellPositioning: #center;\\\\n\\\\t\\\\tlistDirection: #leftToRight;\\\\n\\\\t\\\\tyourself.! !\\\\n\\\\n!PBPreferenceView methodsFor: 'user interface' stamp: 'hpt 9/26/2004 00:48'!\\\\nofferPreferenceNameMenu: aPreferenceBrowser\\\\n\\\\t\\\\\\\"the user clicked on a preference name -- put up a menu\\\\\\\"\\\\n\\\\n\\\\t| aMenu |\\\\t\\\\t\\\\t\\\\n\\\\taMenu := MenuMorph new \\\\n\\\\t\\\\tdefaultTarget: self preference;\\\\n\\\\t\\\\taddTitle: self preference name.\\\\n\\\\n\\\\t(Preferences okayToChangeProjectLocalnessOf: self preference name) ifTrue:\\\\n\\\\t\\\\t[aMenu addUpdating: #isProjectLocalString target: self preference action: #toggleProjectLocalness.\\\\n\\\\t\\\\taMenu balloonTextForLastItem: 'Some preferences are best applied uniformly to all projects, and others are best set by each individual project.  If this item is checked, then this preference will be printed in bold and will have a separate value for each project'].\\\\n\\\\n\\\\taMenu add: 'browse senders' translated target: self systemNavigation selector: #browseAllCallsOn: argument: self preference name.\\\\n\\\\taMenu balloonTextForLastItem: 'This will open a method-list browser on all methods that the send the preference \\\\\\\"', self preference name, '\\\\\\\".'. \\\\n\\\\taMenu add: 'show category...' target: aPreferenceBrowser selector: #findCategoryFromPreference: argument: self preference name.\\\\n\\\\taMenu balloonTextForLastItem: 'Allows you to find out which category, or categories, this preference belongs to.'.\\\\n\\\\n\\\\tSmalltalk isMorphic ifTrue:\\\\n\\\\t\\\\t[aMenu add: 'hand me a button for this preference' target: self selector: #tearOffButton.\\\\n\\\\t\\\\taMenu balloonTextForLastItem: 'Will give you a button that governs this preference, which you may deposit wherever you wish'].\\\\n\\\\n\\\\taMenu add: 'copy this name to clipboard' target: self preference selector: #copyName.\\\\n\\\\taMenu balloonTextForLastItem: 'Copy the name of the preference to the text clipboard, so that you can paste into code somewhere'.\\\\n\\\\n\\\\taMenu popUpInWorld! !\\\\n\\\\n!PBPreferenceView methodsFor: 'user interface' stamp: 'hpt 9/26/2004 11:43'!\\\\nverticalPanel\\\\n\\\\t^self basicPanel\\\\n\\\\t\\\\tcellPositioning: #topLeft;\\\\n\\\\t\\\\tlistDirection: #topToBottom;\\\\n\\\\t\\\\tyourself.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPBPreferenceView class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PBPreferenceView class methodsFor: 'view registry' stamp: 'hpt 9/26/2004 16:09'!\\\\nhandlesPanel: aPreferencePanel\\\\n\\\\t^aPreferencePanel isKindOf: PreferenceBrowser! !\\\\nPBPreferenceView subclass: #PBTextPreferenceView\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'PreferenceBrowser'!\\\\n\\\\n!PBTextPreferenceView methodsFor: 'user interface' stamp: 'hpt 12/10/2004 22:46'!\\\\npreferenceValue\\\\n\\\\t^self preference preferenceValue ifNil: ['']! !\\\\n\\\\n!PBTextPreferenceView methodsFor: 'user interface' stamp: 'hpt 9/26/2004 11:38'!\\\\npreferenceValue: aTextOrString\\\\n\\\\tself preference preferenceValue: aTextOrString asString.\\\\n\\\\t^true.! !\\\\n\\\\n!PBTextPreferenceView methodsFor: 'user interface' stamp: 'hpt 9/26/2004 11:41'!\\\\nrepresentativeButtonWithColor: aColor inPanel: aPreferenceBrowser\\\\n\\\\t^self horizontalPanel\\\\n\\\\t\\\\tlayoutInset: 2;\\\\n\\\\t\\\\tcolor: aColor;\\\\n\\\\t\\\\tcellInset: 20;\\\\n\\\\t\\\\tcellPositioning: #center;\\\\n\\\\t\\\\taddMorphBack: (StringMorph contents: self preference name);\\\\n\\\\t\\\\taddMorphBack: self textField;\\\\n\\\\t\\\\tyourself.! !\\\\n\\\\n!PBTextPreferenceView methodsFor: 'user interface' stamp: 'hpt 9/26/2004 11:41'!\\\\ntextField\\\\n\\\\t^(PluggableTextMorph\\\\n\\\\t\\\\ton: self\\\\n\\\\t\\\\ttext: #preferenceValue\\\\n\\\\t\\\\taccept: #preferenceValue:)\\\\n\\\\t\\\\t\\\\thideVScrollBarIndefinitely: true;\\\\n\\\\t\\\\t\\\\tborderColor: #inset;\\\\n\\\\t\\\\t\\\\tacceptOnCR: true;\\\\n\\\\t\\\\t\\\\tcolor: Color gray veryMuchLighter;\\\\n\\\\t\\\\t\\\\tvResizing: #rigid;\\\\n\\\\t\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\t\\\\theight: TextStyle defaultFont height + 6;\\\\n\\\\t\\\\t\\\\tyourself.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPBTextPreferenceView class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PBTextPreferenceView class methodsFor: 'class initialization' stamp: 'hpt 9/26/2004 17:01'!\\\\ninitialize\\\\n\\\\tPreferenceViewRegistry ofTextPreferences register: self.! !\\\\n\\\\n!PBTextPreferenceView class methodsFor: 'class initialization' stamp: 'hpt 9/26/2004 17:01'!\\\\nunload\\\\n\\\\tPreferenceViewRegistry ofTextPreferences unregister: self.! !\\\\nPBColorPreferenceView subclass: #PBWindowColorPreferenceView\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'PreferenceBrowser'!\\\\n\\\\n!PBWindowColorPreferenceView methodsFor: 'initialization' stamp: 'hpt 12/8/2004 18:38'!\\\\ninitialize\\\\n\\\\tsuper initialize.\\\\n\\\\tself addActionTitled: 'Bright' target: Preferences selector: #installBrightWindowColors arguments: {} balloonText: 'Use standard bright colors for all windows' translated.\\\\n\\\\tself addActionTitled: 'Pastel' target: Preferences selector: #installPastelWindowColors arguments: {} balloonText: 'Use standard pastel colors for all windows' translated.\\\\t\\\\n\\\\tself addActionTitled: 'White' target: Preferences selector: #installUniformWindowColors arguments: {} balloonText: 'Use white backgrounds for all standard windows' translated.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPBWindowColorPreferenceView class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PBWindowColorPreferenceView class methodsFor: 'class initialization' stamp: 'hpt 12/8/2004 18:40'!\\\\ninitialize\\\\n\\\\tself viewRegistry register: self.! !\\\\n\\\\n!PBWindowColorPreferenceView class methodsFor: 'class initialization' stamp: 'hpt 12/8/2004 18:40'!\\\\nunload\\\\n\\\\tself viewRegistry unregister: self.! !\\\\n\\\\n!PBWindowColorPreferenceView class methodsFor: 'class initialization' stamp: 'hpt 12/8/2004 18:40'!\\\\nviewRegistry\\\\n\\\\t^(PreferenceViewRegistry registryOf: #windowColorPreferences)\\\\n\\\\t\\\\tviewOrder: 6;\\\\n\\\\t\\\\tyourself.! !\\\\nPrimCallControllerAbstract subclass: #PCCByCompilation\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Tests-PrimCallController'!\\\\n!PCCByCompilation commentStamp: 'sr 6/16/2004 09:00' prior: 0!\\\\nThis class is for switching external prim calls (primitiveExternalCall) on and off.\\\\n\\\\nIt is best suited for permanently switching plugin calls off while preserving the possibility to switch them on later. For plugin testing purposes you probably should use PCCByLiterals for temporarily switch on/off them instead.\\\\n\\\\nIt works on a source code basis by compilation:\\\\n\\\\tDisabling works by putting an enabled prim call into a special comment followed by a recompile to transform it into a disabled one.\\\\n\\\\tEnabling works by pulling the disabled prim call out of the special comment followed by a recompile to transform it into an enabled one.\\\\n\\\\nAs a consequence, enabling of prims only works with method sources containing the mentioned special comment, which normally has been generated by this tool for disabling the corresponding prim.\\\\n\\\\nPlease look into superclass PrimCallControllerAbstract for more info and the user interface.\\\\n\\\\nStructure:\\\\n No instVars here: look into superclass.\\\\n\\\\nImplementation note:\\\\nTo harden it for sunit testing purposes some special accessing of the source code has been necessary: to avoid accessing different processes a sources file at once, followed by generating garbage, the process priority of actions leading to these accesses has been increased (sunit tests run in the background). A better solution would be to introduce a source file locking mechanism.!\\\\n]style[(107 11 138 13 5 11 62 14 3 9 124 8 245 9 36 9 26 28 26 93 20 384)f2FAccuny#12,f2FAccuny#12i,f2FAccuny#12,f2LPCCByLiterals Comment;,f2FAccuny#12,f2FAccuny#12i,f2FAccuny#12,f2FAccuny#12b,f2FAccuny#12,f2FAccuny#12i,f2FAccuny#12,f2FAccuny#12i,f2FAccuny#12,f2,f2FAccuny#12,f3FAccuny#12,f2FAccuny#12,f2,f2LPrimCallControllerAbstract Comment;,f2,FAccuny#15uf2,f2!\\\\n\\\\n\\\\n!PCCByCompilation methodsFor: 'string constants' stamp: 'sr 6/7/2004 03:30'!\\\\ncomment\\\\n\\\\t^ '{prim disabled by ', self className, '} '! !\\\\n\\\\n!PCCByCompilation methodsFor: 'string constants' stamp: 'sr 6/7/2004 03:31'!\\\\ndisabledPrimStartString\\\\n\\\\t^ '\\\\\\\"', self comment, self enabledPrimStartString! !\\\\n\\\\n!PCCByCompilation methodsFor: 'string constants' stamp: 'sr 6/7/2004 03:31'!\\\\ndisabledPrimStopChar\\\\n\\\\t\\\\\\\"end of disabling comment\\\\\\\"\\\\n\\\\t^ $\\\\\\\"! !\\\\n\\\\n!PCCByCompilation methodsFor: 'string constants' stamp: 'sr 6/7/2004 03:31'!\\\\nenabledPrimStartString\\\\n\\\\t^ '<primitive:'! !\\\\n\\\\n!PCCByCompilation methodsFor: 'string constants' stamp: 'sr 6/7/2004 03:31'!\\\\nenabledPrimStopChar\\\\n\\\\t^ $>! !\\\\n\\\\n\\\\n!PCCByCompilation methodsFor: 'ui querying' stamp: 'sr 6/11/2004 06:33'!\\\\nextractCallModuleNames: aMethodRef \\\\n\\\\t^ (self existsCompiledCallIn: aMethodRef)\\\\n\\\\t\\\\tifTrue: [self extractCallModuleNamesFromLiterals: aMethodRef]\\\\n\\\\t\\\\tifFalse: [| src | \\\\n\\\\t\\\\t\\\\t\\\\\\\"try source\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\\\\"higher priority to avoid source file accessing errors\\\\\\\"\\\\n\\\\t\\\\t\\\\t[src := aMethodRef sourceString]\\\\n\\\\t\\\\t\\\\t\\\\tvalueAt: self higherPriority.\\\\n\\\\t\\\\t\\\\tself extractCallNamesFromPrimString: ((self extractDisabledPrimStringFrom: src)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifNil: [\\\\\\\"no disabled prim string found\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^ nil]) first]! !\\\\n\\\\n!PCCByCompilation methodsFor: 'ui querying' stamp: 'sr 6/14/2004 21:38'!\\\\nmethodsWithCall\\\\n\\\\t\\\\\\\"Expensive!! For just querying the system unaffected by an instance of \\\\n\\\\tthis class use PCCByLiterals instead.\\\\\\\"\\\\n\\\\t^ self methodsWithCompiledCall , self methodsWithDisabledCall! !\\\\n\\\\n!PCCByCompilation methodsFor: 'ui querying' stamp: 'md 8/27/2005 17:17'!\\\\nmethodsWithDisabledCall\\\\n\\\\t\\\\\\\"Answer a SortedCollection of all the methods that contain, in source  \\\\n\\\\tcode, the substring indicating a disabled prim.\\\\\\\"\\\\n\\\\t\\\\\\\"The alternative implementation  \\\\n\\\\t\\\\t^ SystemNavigation new allMethodsWithSourceString: self disabledPrimStartString\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmatchCase: true  \\\\n\\\\talso searches in class comments.\\\\\\\"\\\\n\\\\t| list classCount string |\\\\n\\\\tstring := self disabledPrimStartString.\\\\n\\\\tlist := Set new.\\\\n\\\\t'Searching all method source code...'\\\\n\\\\t\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\tfrom: 0\\\\n\\\\t\\\\tto: Smalltalk classNames size * 2 \\\\\\\"classes with their metaclasses\\\\\\\"\\\\n\\\\t\\\\tduring: [:bar |\\\\n\\\\t\\\\t\\\\tclassCount := 0.\\\\n\\\\t\\\\t\\\\tSystemNavigation default\\\\n\\\\t\\\\t\\\\t\\\\tallBehaviorsDo: [:class | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbar value: (classCount := classCount + 1).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tclass\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tselectorsDo: [:sel | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t| src | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"higher priority to avoid source file accessing  \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\terrors\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[src := class sourceCodeAt: sel]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tvalueAt: self higherPriority.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(src\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfindString: string\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcaseSensitive: true) > 0\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [sel isDoIt ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tlist add: (MethodReference new setStandardClass: class methodSymbol: sel)]]]]].\\\\n\\\\t^ list asSortedCollection! !\\\\n\\\\n\\\\n!PCCByCompilation methodsFor: 'ui testing' stamp: 'sr 6/11/2004 07:26'!\\\\nexistsCallIn: aMethodRef \\\\n\\\\t\\\\\\\"Here existsCompiledCallIn: (see also comment there) is sufficient to \\\\n\\\\tquery for enabled and failed, but not for disabled prim calls: so check \\\\n\\\\tfor disabled ones in sources, too.\\\\\\\"\\\\n\\\\t^ (self existsCompiledCallIn: aMethodRef)\\\\n\\\\t\\\\tor: [self existsDisabledCallIn: aMethodRef]! !\\\\n\\\\n!PCCByCompilation methodsFor: 'ui testing' stamp: 'sr 6/11/2004 07:07'!\\\\nexistsDisabledCallIn: aMethodRef \\\\n\\\\t| src |\\\\n\\\\t^ (self existsCompiledCallIn: aMethodRef) not\\\\n\\\\t\\\\tand: [\\\\\\\"higher priority to avoid source file accessing errors\\\\\\\"\\\\n\\\\t\\\\t\\\\t[src := aMethodRef sourceString]\\\\n\\\\t\\\\t\\\\t\\\\tvalueAt: self higherPriority.\\\\n\\\\t\\\\t\\\\tself methodSourceContainsDisabledCall: src]! !\\\\n\\\\n\\\\n!PCCByCompilation methodsFor: 'private' stamp: 'sr 6/7/2004 03:26'!\\\\ndisabled2EnabledPrimMethodString: aSourceString \\\\n\\\\t| start stop primString extract |\\\\n\\\\textract := self extractDisabledPrimStringFrom: aSourceString.\\\\n\\\\tprimString := extract at: 1.\\\\n\\\\tstart := extract at: 2.\\\\n\\\\tstop := start + primString size - 1.\\\\n\\\\t^ aSourceString\\\\n\\\\t\\\\tcopyReplaceFrom: start\\\\n\\\\t\\\\tto: stop\\\\n\\\\t\\\\twith: (self disabled2EnabledPrimString: primString)! !\\\\n\\\\n!PCCByCompilation methodsFor: 'private' stamp: 'sr 6/7/2004 03:26'!\\\\ndisabled2EnabledPrimString: aDisabledPrimString\\\\n\\\\t\\\\\\\"remove comment quotes and comment after first comment quote\\\\\\\"\\\\n\\\\t| enabledPrimString |\\\\n\\\\tenabledPrimString := aDisabledPrimString copyFrom: self comment size + 2 to: aDisabledPrimString size - 1.\\\\n\\\\t^ enabledPrimString! !\\\\n\\\\n!PCCByCompilation methodsFor: 'private' stamp: 'sr 6/7/2004 03:28'!\\\\nenabled2DisabledPrimMethodString: aSourceString \\\\n\\\\t| start stop primString extract |\\\\n\\\\textract := self extractEnabledPrimStringFrom: aSourceString.\\\\n\\\\tprimString := extract at: 1.\\\\n\\\\tstart := extract at: 2.\\\\n\\\\tstop := start + primString size - 1.\\\\n\\\\t^ aSourceString\\\\n\\\\t\\\\tcopyReplaceFrom: start\\\\n\\\\t\\\\tto: stop\\\\n\\\\t\\\\twith: (self enabled2DisabledPrimString: primString)! !\\\\n\\\\n!PCCByCompilation methodsFor: 'private' stamp: 'sr 6/7/2004 03:28'!\\\\nenabled2DisabledPrimString: anEnabledPrimString \\\\n\\\\t| disabledPrimString |\\\\n\\\\tdisabledPrimString := '\\\\\\\"' , self comment , anEnabledPrimString , '\\\\\\\"'.\\\\n\\\\t^ disabledPrimString! !\\\\n\\\\n!PCCByCompilation methodsFor: 'private' stamp: 'stephaneducasse 2/3/2006 22:39'!\\\\nextractCallNamesFromPrimString: aString\\\\n\\\\t\\\\\\\"method works for both enabled and disabled prim strings\\\\\\\"\\\\n\\\\t\\\\\\\"<primitive: 'doSomething' module:'ModuleFoo'\\\\\\\"\\\\n\\\\t| tokens |\\\\n\\\\ttokens := aString findTokens: ''''.\\\\n\\\\t^ (tokens at: 2) -> (tokens at: 4 ifAbsent: [nil])! !\\\\n\\\\n!PCCByCompilation methodsFor: 'private' stamp: 'sr 6/11/2004 07:10'!\\\\nextractDisabledPrimStringFrom: aSourceString \\\\n\\\\t| startString start stop |\\\\n\\\\tstartString := self disabledPrimStartString.\\\\n\\\\tstart := aSourceString findString: startString.\\\\n\\\\tstart = 0\\\\n\\\\t\\\\tifTrue: [^ nil].\\\\n\\\\tstop := aSourceString indexOf: self disabledPrimStopChar startingAt: start + startString size.\\\\n\\\\tstop = 0\\\\n\\\\t\\\\tifTrue: [^ nil].\\\\n\\\\t^ {aSourceString copyFrom: start to: stop. start}! !\\\\n\\\\n!PCCByCompilation methodsFor: 'private' stamp: 'sr 6/7/2004 03:29'!\\\\nextractEnabledPrimStringFrom: aSourceString \\\\n\\\\t| startString start stop |\\\\n\\\\tstartString := self enabledPrimStartString.\\\\n\\\\tstart := aSourceString findString: startString.\\\\n\\\\tstart = 0\\\\n\\\\t\\\\tifTrue: [^ nil].\\\\n\\\\tstop := aSourceString indexOf: self enabledPrimStopChar startingAt: start + startString size.\\\\n\\\\tstop = 0\\\\n\\\\t\\\\tifTrue: [^ nil].\\\\n\\\\t^ {aSourceString copyFrom: start to: stop. start}! !\\\\n\\\\n!PCCByCompilation methodsFor: 'private' stamp: 'sr 6/7/2004 03:29'!\\\\nhigherPriority\\\\n\\\\t\\\\\\\"this priority seems to be necessary to avoid source file accessing errors\\\\\\\"\\\\n\\\\t^ Processor userSchedulingPriority + 1! !\\\\n\\\\n!PCCByCompilation methodsFor: 'private' stamp: 'sr 6/11/2004 07:06'!\\\\nmethodSourceContainsDisabledCall: methodSource \\\\n\\\\t^ (methodSource findString: self disabledPrimStartString)\\\\n\\\\t\\\\t~= 0! !\\\\n\\\\n\\\\n!PCCByCompilation methodsFor: 'private user interface' stamp: 'sr 6/14/2004 01:37'!\\\\nprivateDisableCallIn: aMethodRef \\\\n\\\\t\\\\\\\"Disables enabled or failed external prim call by recompiling method \\\\n\\\\twith prim call commented out, will be called by superclass.\\\\\\\"\\\\n\\\\t| src newMethodSource |\\\\n\\\\t\\\\\\\"higher priority to avoid source file accessing errors\\\\\\\"\\\\n\\\\t[src := aMethodRef sourceString]\\\\n\\\\t\\\\tvalueAt: self higherPriority.\\\\n\\\\tnewMethodSource := self enabled2DisabledPrimMethodString: src.\\\\n\\\\t\\\\\\\"higher priority to avoid source file accessing errors\\\\\\\"\\\\n\\\\t[aMethodRef actualClass\\\\n\\\\t\\\\tcompile: newMethodSource\\\\n\\\\t\\\\tclassified: (aMethodRef actualClass whichCategoryIncludesSelector: aMethodRef methodSymbol)\\\\n\\\\t\\\\tnotifying: nil]\\\\n\\\\t\\\\tvalueAt: self higherPriority! !\\\\n\\\\n!PCCByCompilation methodsFor: 'private user interface' stamp: 'sr 6/14/2004 02:10'!\\\\nprivateEnableCallIn: aMethodRef \\\\n\\\\t\\\\\\\"Enables disabled external prim call by recompiling method with prim  \\\\n\\\\tcall taken from disabling comment, will be called by superclass.\\\\\\\"\\\\n\\\\t| src newMethodSource |\\\\n\\\\t\\\\\\\"higher priority to avoid source file accessing errors\\\\\\\"\\\\n\\\\t[src := aMethodRef sourceString]\\\\n\\\\t\\\\tvalueAt: self higherPriority.\\\\n\\\\tnewMethodSource := self disabled2EnabledPrimMethodString: src.\\\\n\\\\t\\\\\\\"higher priority to avoid source file accessing errors\\\\\\\"\\\\n\\\\t[aMethodRef actualClass\\\\n\\\\t\\\\tcompile: newMethodSource\\\\n\\\\t\\\\tclassified: (aMethodRef actualClass whichCategoryIncludesSelector: aMethodRef methodSymbol)\\\\n\\\\t\\\\tnotifying: nil]\\\\n\\\\t\\\\tvalueAt: self higherPriority! !\\\\nPrimCallControllerAbstractTest subclass: #PCCByCompilationTest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Tests-PrimCallController'!\\\\n!PCCByCompilationTest commentStamp: 'sr 6/14/2004 22:05' prior: 0!\\\\nPCCByCompilation tests.\\\\n\\\\nTests are in the superclass and inherited from there.!\\\\n\\\\n\\\\n!PCCByCompilationTest methodsFor: 'constants' stamp: 'sr 6/11/2004 05:22'!\\\\nclassToBeTested\\\\n\\\\t^ PCCByCompilation! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'constants' stamp: 'sr 6/7/2004 10:36'!\\\\ndisabledCallSelectors\\\\n\\\\t^ #(#cDisabledRealExternalCall #cDisabledRealExternalCallNaked #cDisabledRealExternalCallOrPrimitiveFailed #cDisabledExternalCallWithoutModule )! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'constants' stamp: 'sr 6/7/2004 10:34'!\\\\nenabledCallSelectors\\\\n\\\\t^ #(#cRealExternalCall #cRealExternalCallNaked #cRealExternalCallOrPrimitiveFailed #cExternalCallWithoutModule )! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'constants' stamp: 'sr 6/7/2004 08:44'!\\\\nexampleModuleName\\\\n\\\\t^ 'CPCCT'! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'constants' stamp: 'sr 6/15/2004 02:42'!\\\\nfailModuleName\\\\n\\\\t^ 'CFailModule'! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'constants' stamp: 'sr 6/14/2004 00:14'!\\\\nfailedCallSelector\\\\n\\\\t^ #cFailedCall! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'constants' stamp: 'sr 6/7/2004 08:40'!\\\\nmethodSelectorsToExampleModule\\\\n\\\\t^ #(#cExternalCall1 #cExternalCall2 )! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'constants' stamp: 'sr 6/7/2004 08:47'!\\\\nmoduleNameNotWithSingularCallName\\\\n\\\\t^ 'CNotOne'! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'constants' stamp: 'sr 6/7/2004 08:47'!\\\\nmoduleNameWithSingularCallName\\\\n\\\\t^ 'COne'! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'constants' stamp: 'sr 6/7/2004 09:52'!\\\\nnoExternalCallSelector\\\\n\\\\t^ #cNoExternalCall! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'constants' stamp: 'sr 6/7/2004 10:28'!\\\\nrealExternalCallOrPrimitiveFailedSelector\\\\n\\\\t^ #cRealExternalCallOrPrimitiveFailed! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'constants' stamp: 'sr 6/7/2004 10:54'!\\\\nsingularCallName\\\\n\\\\t\\\\\\\"occurrs exactly once as prim call name in >>cSingularExternalCall\\\\\\\"\\\\n\\\\t^ 'cSingularExternalCall'! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'constants' stamp: 'sr 6/14/2004 23:33'!\\\\nsingularCallSelector\\\\n\\\\t^ #cSingularExternalCall! !\\\\n\\\\n\\\\n!PCCByCompilationTest methodsFor: 'example module' stamp: 'md 9/6/2005 19:39'!\\\\ncExternalCall1\\\\n\\\\t<primitive: 'prim1' module: 'CPCCT'>\\\\n! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'example module' stamp: 'md 9/6/2005 19:39'!\\\\ncExternalCall2\\\\n\\\\t\\\\t<primitive:'prim2'module:'CPCCT'>\\\\n\\\\t\\\\tself primitiveFailed! !\\\\n\\\\n\\\\n!PCCByCompilationTest methodsFor: 'test methods' stamp: 'sr 6/11/2004 05:36'!\\\\ncDisabledExternalCallWithoutModule\\\\n\\\\t\\\\\\\"{prim disabled by PCCByCompilation} <primitive: 'primGetModuleName'>\\\\\\\"\\\\n\\\\t^ 'Hello World!!'! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'test methods' stamp: 'sr 6/13/2004 23:54'!\\\\ncDisabledRealExternalCall\\\\n\\\\t\\\\\\\"{prim disabled by PCCByCompilation} <primitive: 'primGetModuleName' module:'LargeIntegers'>\\\\\\\"\\\\n\\\\t^ 'Hello World!!'! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'test methods' stamp: 'sr 6/13/2004 23:54'!\\\\ncDisabledRealExternalCallNaked\\\\n\\\\t\\\\\\\"{prim disabled by PCCByCompilation} <primitive: 'primGetModuleName' module:'LargeIntegers'>\\\\\\\"! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'test methods' stamp: 'sr 6/13/2004 23:54'!\\\\ncDisabledRealExternalCallOrPrimitiveFailed\\\\n\\\\t\\\\\\\"{prim disabled by PCCByCompilation} <primitive: 'primGetModuleName' module:'LargeIntegers'>\\\\\\\"\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'test methods' stamp: 'sr 6/7/2004 09:48'!\\\\ncExternalCallWithoutModule\\\\n\\\\t<primitive: 'primGetModuleName'>\\\\n\\\\t^ 'Hello World!!'! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'test methods' stamp: 'md 9/6/2005 19:39'!\\\\ncFailedCall\\\\n\\\\t<primitive: 'primGetModuleName' module:'CFailModule'>\\\\n\\\\t^ 'failed call'! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'test methods' stamp: 'sr 6/7/2004 09:48'!\\\\ncNoExternalCall\\\\n\\\\t^ 'Hello World!!'! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'test methods' stamp: 'sr 6/13/2004 21:14'!\\\\ncRealExternalCall\\\\n\\\\t<primitive: 'primGetModuleName' module:'LargeIntegers'>\\\\n\\\\t^ 'Hello World!!'! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'test methods' stamp: 'sr 6/13/2004 21:14'!\\\\ncRealExternalCallNaked\\\\n\\\\t<primitive: 'primGetModuleName' module:'LargeIntegers'>! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'test methods' stamp: 'md 9/6/2005 19:39'!\\\\ncRealExternalCallOrPrimitiveFailed\\\\n\\\\t<primitive: 'primGetModuleName' module:'LargeIntegers'>\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!PCCByCompilationTest methodsFor: 'test methods' stamp: 'sr 6/15/2004 04:35'!\\\\ncSingularExternalCall\\\\n\\\\t<primitive: 'cSingularExternalCall' module:'COne'>\\\\n\\\\t^ 'Hello World!!'! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPCCByCompilationTest class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PCCByCompilationTest class methodsFor: 'Testing' stamp: 'sr 6/7/2004 12:01'!\\\\nisAbstract\\\\n\\\\t^ false! !\\\\nPrimCallControllerAbstract subclass: #PCCByLiterals\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Tests-PrimCallController'!\\\\n!PCCByLiterals commentStamp: 'sr 6/16/2004 09:14' prior: 0!\\\\nThis class is for switching external prim calls (primitiveExternalCall) on and off.\\\\n\\\\nIt is best suited for plugin testing purposes with temporarily switching plugin calls off and on. For permanently switching plugin calls off while preserving the possibility to switch them on later, you should use PCCByCompilation instead.\\\\n\\\\nIt works by manipulating literals in the CompiledMethods:\\\\n\\\\tDisabling works by changing the function index in the first literal of the CompiledMethod to a negative value (-2). This leads to a fast fail (value -2 is used for disabling to make a difference to the standard failed value of -1).\\\\n\\\\tEnabling works by changing the function index in the first literal of the CompiledMethod to 0, followed by flushing the method cache. This enforces a fresh lookup.\\\\n\\\\nPlease look into superclass PrimCallControllerAbstract for more info and the user interface.\\\\n\\\\nStructure:\\\\n No instVars here: look into superclass.!\\\\n]style[(136 11 40 11 101 16 10 1 9 2 14 8 26 9 224 8 157 28 26 91)f2FAccuny#12,f2FAccuny#12i,f2FAccuny#12,f2FAccuny#12i,f2FAccuny#12,f2LPCCByCompilation Comment;,f2FAccuny#12,f2,f2FAccuny#12,f2FAccuny#12b,f2FAccuny#12,f2FAccuny#12b,f2FAccuny#12,f2FAccuny#12i,f2FAccuny#12,f2FAccuny#12i,f2FAccuny#12,f2,f2LPrimCallControllerAbstract Comment;,f2!\\\\n\\\\n\\\\n!PCCByLiterals methodsFor: 'ui querying' stamp: 'sr 6/11/2004 07:04'!\\\\nextractCallModuleNames: aMethodRef \\\\n\\\\t^ (self existsCallIn: aMethodRef)\\\\n\\\\t\\\\tifTrue: [self extractCallModuleNamesFromLiterals: aMethodRef]! !\\\\n\\\\n!PCCByLiterals methodsFor: 'ui querying' stamp: 'sr 6/11/2004 07:05'!\\\\nmethodsWithCall\\\\n\\\\t^ self methodsWithCompiledCall! !\\\\n\\\\n!PCCByLiterals methodsFor: 'ui querying' stamp: 'sr 6/14/2004 21:24'!\\\\nmethodsWithDisabledCall\\\\n\\\\t^ self methodsWithCompiledCall\\\\n\\\\t\\\\tselect: [:mRef | (mRef compiledMethod literals first at: 4)\\\\n\\\\t\\\\t\\\\t\\\\t= -2]! !\\\\n\\\\n\\\\n!PCCByLiterals methodsFor: 'ui testing' stamp: 'sr 6/11/2004 07:04'!\\\\nexistsCallIn: aMethodRef \\\\n\\\\t\\\\\\\"Here >>existsCompiledCallIn: (see also comment there) is sufficient to \\\\n\\\\tquery for all enabled, failed and disabled prim calls; for the by \\\\n\\\\tcompiler version it is not sufficient for disabled ones.\\\\\\\"\\\\n\\\\t^ self existsCompiledCallIn: aMethodRef! !\\\\n\\\\n!PCCByLiterals methodsFor: 'ui testing' stamp: 'sr 6/11/2004 07:30'!\\\\nexistsDisabledCallIn: aMethodRef \\\\n\\\\t^ (self existsCompiledCallIn: aMethodRef)\\\\n\\\\t\\\\tand: [(aMethodRef compiledMethod literals first at: 4)\\\\n\\\\t\\\\t\\\\t\\\\t= -2]! !\\\\n\\\\n\\\\n!PCCByLiterals methodsFor: 'private user interface' stamp: 'sr 6/14/2004 01:35'!\\\\nprivateDisableCallIn: aMethodRef \\\\n\\\\t\\\\\\\"Disables enabled or failed external prim call by filling function ref \\\\n\\\\tliteral with special fail value, will be called by superclass.\\\\\\\"\\\\n\\\\taMethodRef compiledMethod literals first at: 4 put: -2! !\\\\n\\\\n!PCCByLiterals methodsFor: 'private user interface' stamp: 'sr 6/14/2004 02:07'!\\\\nprivateEnableCallIn: aMethodRef\\\\n\\\\t\\\\\\\"Enables disabled external prim call.\\\\\\\"\\\\n\\\\tself privateEnableViaLiteralIn: aMethodRef! !\\\\nPrimCallControllerAbstractTest subclass: #PCCByLiteralsTest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Tests-PrimCallController'!\\\\n!PCCByLiteralsTest commentStamp: 'sr 6/14/2004 22:05' prior: 0!\\\\nPCCByLiterals tests.\\\\n\\\\nTests are in the superclass and inherited from there.!\\\\n\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'constants' stamp: 'sr 6/11/2004 05:23'!\\\\nclassToBeTested\\\\n\\\\t^ PCCByLiterals! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'constants' stamp: 'sr 6/7/2004 10:37'!\\\\ndisabledCallSelectors\\\\n\\\\t^ #(#lDisabledRealExternalCall #lDisabledRealExternalCallNaked #lDisabledRealExternalCallOrPrimitiveFailed #lDisabledExternalCallWithoutModule )! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'constants' stamp: 'sr 6/7/2004 10:34'!\\\\nenabledCallSelectors\\\\n\\\\t^ #(#lRealExternalCall #lRealExternalCallNaked #lRealExternalCallOrPrimitiveFailed #lExternalCallWithoutModule )! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'constants' stamp: 'sr 6/7/2004 08:45'!\\\\nexampleModuleName\\\\n\\\\t^ 'LPCCT'! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'constants' stamp: 'sr 6/15/2004 02:42'!\\\\nfailModuleName\\\\n\\\\t^ 'LFailModule'! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'constants' stamp: 'sr 6/14/2004 00:12'!\\\\nfailedCallSelector\\\\n\\\\t^ #lFailedCall! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'constants' stamp: 'sr 6/7/2004 08:41'!\\\\nmethodSelectorsToExampleModule\\\\n\\\\t^ #(#lExternalCall1 #lExternalCall2 )! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'constants' stamp: 'sr 6/7/2004 08:47'!\\\\nmoduleNameNotWithSingularCallName\\\\n\\\\t^ 'LNotOne'! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'constants' stamp: 'sr 6/7/2004 08:47'!\\\\nmoduleNameWithSingularCallName\\\\n\\\\t^ 'LOne'! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'constants' stamp: 'sr 6/7/2004 10:16'!\\\\nnoExternalCallSelector\\\\n\\\\t^ #lNoExternalCall! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'constants' stamp: 'sr 6/7/2004 10:29'!\\\\nrealExternalCallOrPrimitiveFailedSelector\\\\n\\\\t^ #lRealExternalCallOrPrimitiveFailed! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'constants' stamp: 'sr 6/7/2004 10:54'!\\\\nsingularCallName\\\\n\\\\t\\\\\\\"occurrs exactly once as prim call name in >>lSingularExternalCall\\\\\\\"\\\\n\\\\t^ 'lSingularExternalCall'! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'constants' stamp: 'sr 6/14/2004 23:32'!\\\\nsingularCallSelector\\\\n\\\\t^ #lSingularExternalCall! !\\\\n\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'example module' stamp: 'sr 6/7/2004 08:39'!\\\\nlExternalCall1\\\\n\\\\t<primitive: 'prim1' module: 'LPCCT'>\\\\n! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'example module' stamp: 'sr 6/7/2004 08:39'!\\\\nlExternalCall2\\\\n\\\\t\\\\t<primitive:'prim2'module:'LPCCT'>\\\\n\\\\t\\\\tself primitiveFailed! !\\\\n\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'test methods' stamp: 'sr 6/7/2004 08:51'!\\\\nlDisabledExternalCallWithoutModule\\\\n\\\\t<primitive: 'primGetModuleName'>\\\\n\\\\t^ 'Hello World!!'! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'test methods' stamp: 'sr 6/13/2004 21:14'!\\\\nlDisabledRealExternalCall\\\\n\\\\t<primitive: 'primGetModuleName' module:'LargeIntegers'>\\\\n\\\\t^ 'Hello World!!'! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'test methods' stamp: 'sr 6/13/2004 21:14'!\\\\nlDisabledRealExternalCallNaked\\\\n\\\\t<primitive: 'primGetModuleName' module:'LargeIntegers'>! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'test methods' stamp: 'sr 6/13/2004 21:14'!\\\\nlDisabledRealExternalCallOrPrimitiveFailed\\\\n\\\\t<primitive: 'primGetModuleName' module:'LargeIntegers'> \\\\\\\"primitiveExternalCall\\\\\\\" \\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'test methods' stamp: 'sr 6/7/2004 09:59'!\\\\nlExternalCallWithoutModule\\\\n\\\\t<primitive: 'primGetModuleName'> \\\\\\\"primitiveExternalCall\\\\\\\" \\\\n\\\\t^ 'Hello World!!'! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'test methods' stamp: 'sr 6/15/2004 02:41'!\\\\nlFailedCall\\\\n\\\\t<primitive: 'primGetModuleName' module:'LFailModule'>\\\\n\\\\t^ 'failed call'! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'test methods' stamp: 'sr 6/7/2004 09:57'!\\\\nlNoExternalCall\\\\n\\\\t^ 'Hello World!!'! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'test methods' stamp: 'sr 6/13/2004 21:14'!\\\\nlRealExternalCall\\\\n\\\\t<primitive: 'primGetModuleName' module:'LargeIntegers'>\\\\n\\\\t^ 'Hello World!!'! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'test methods' stamp: 'sr 6/13/2004 21:14'!\\\\nlRealExternalCallNaked\\\\n\\\\t<primitive: 'primGetModuleName' module:'LargeIntegers'>! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'test methods' stamp: 'sr 6/13/2004 21:14'!\\\\nlRealExternalCallOrPrimitiveFailed\\\\n\\\\t<primitive: 'primGetModuleName' module:'LargeIntegers'>\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'test methods' stamp: 'sr 6/7/2004 10:52'!\\\\nlSingularExternalCall\\\\n\\\\t<primitive: 'lSingularExternalCall' module:'LOne'>\\\\n\\\\t^ 'Hello World!!'! !\\\\n\\\\n\\\\n!PCCByLiteralsTest methodsFor: 'tests' stamp: 'sr 6/7/2004 11:30'!\\\\nsetUp\\\\n\\\\tsuper setUp.\\\\n\\\\t\\\\\\\"disable external calls\\\\\\\"\\\\n\\\\t(self class selectors\\\\n\\\\t\\\\tselect: [:sel | sel beginsWith: 'lDisabled'])\\\\n\\\\t\\\\tdo: [:sel | (self class >> sel) literals first at: 4 put: -2]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPCCByLiteralsTest class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PCCByLiteralsTest class methodsFor: 'Testing' stamp: 'sr 6/7/2004 12:01'!\\\\nisAbstract\\\\n\\\\t^ false! !\\\\nImageReadWriter subclass: #PCXReadWriter\\\\n\\\\tinstanceVariableNames: 'version encoding colorPlanes isGrayScale width height bitsPerPixel colorPalette rowByteSize'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Graphics-Files'!\\\\n\\\\n!PCXReadWriter methodsFor: 'accessing' stamp: 'tao 10/6/97 10:11'!\\\\nnextImage\\\\n\\\\t\\\\\\\"Read in the next PCX image from the stream.\\\\\\\"\\\\n\\\\n\\\\t| bytes form |\\\\n\\\\tself readHeader.\\\\n\\\\tbytes _ self readBody.\\\\n\\\\tcolorPalette _ self readPalette.\\\\n\\\\tself close.\\\\n\\\\tform _ ColorForm extent: width@height depth: bitsPerPixel.\\\\n\\\\t(Form new hackBits: bytes) displayOn: (Form new hackBits: form bits).\\\\n\\\\tform colors: colorPalette.\\\\n\\\\t^ form\\\\n! !\\\\n\\\\n\\\\n!PCXReadWriter methodsFor: 'private-decoding' stamp: 'tao 10/6/97 08:38'!\\\\nnextWord\\\\n\\\\t^self next + (self next bitShift: 8)! !\\\\n\\\\n!PCXReadWriter methodsFor: 'private-decoding' stamp: 'tao 10/6/97 10:07'!\\\\nreadBody\\\\n\\\\n\\\\t| array scanLine rowBytes position byte count pad |\\\\n\\\\tpad _ #(0 3 2 1) at: (width \\\\\\\\\\\\\\\\ 4 + 1).\\\\n\\\\tarray _ ByteArray new: ((width + pad) * height * bitsPerPixel) // 8.\\\\n\\\\tscanLine _ ByteArray new: rowByteSize.\\\\n\\\\tposition _ 1.\\\\n\\\\t1 to: height do:\\\\n\\\\t\\\\t[:line |\\\\n\\\\t\\\\trowBytes _ 0.\\\\n\\\\t\\\\t[rowBytes < rowByteSize] whileTrue:\\\\n\\\\t\\\\t\\\\t[byte _ self next.\\\\n\\\\t\\\\t\\\\tbyte < 16rC0\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[rowBytes _ rowBytes + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tscanLine at: rowBytes put: byte]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[count _ byte - 16rC0.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbyte _ self next.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t1 to: count do: [:i | scanLine at: rowBytes + i put: byte].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\trowBytes _ rowBytes + count]].\\\\n\\\\t\\\\tarray\\\\n\\\\t\\\\t\\\\treplaceFrom: position\\\\n\\\\t\\\\t\\\\tto: position + width - 1\\\\n\\\\t\\\\t\\\\twith: scanLine\\\\n\\\\t\\\\t\\\\tstartingAt: 1.\\\\n\\\\t\\\\tposition _ position + width + pad].\\\\n\\\\t^ array\\\\n! !\\\\n\\\\n!PCXReadWriter methodsFor: 'private-decoding' stamp: 'md 11/14/2003 16:51'!\\\\nreadHeader\\\\n\\\\n\\\\t| xMin xMax yMin yMax |\\\\n\\\\tself next.\\\\t\\\\\\\"skip over manufacturer field\\\\\\\"\\\\n\\\\tversion _ self next.\\\\n\\\\tencoding _ self next.\\\\n\\\\tbitsPerPixel _ self next.\\\\n\\\\txMin _ self nextWord.\\\\n\\\\tyMin _ self nextWord.\\\\n\\\\txMax _ self nextWord.\\\\n\\\\tyMax _ self nextWord.\\\\n\\\\twidth _ xMax - xMin + 1.\\\\n\\\\theight _ yMax - yMin + 1.\\\\n\\\\tself next: 4. \\\\\\\"skip over device resolution\\\\\\\"\\\\n\\\\tself next: 49. \\\\\\\"skip over EGA color palette\\\\\\\"\\\\n\\\\tcolorPlanes _ self next.\\\\n\\\\trowByteSize _ self nextWord.\\\\n\\\\tisGrayScale _ (self next: 2) = 2.\\\\n\\\\tself next: 58. \\\\\\\"skip over filler\\\\\\\"\\\\n\\\\n\\\\n\\\\n! !\\\\n\\\\n!PCXReadWriter methodsFor: 'private-decoding' stamp: 'tao 10/6/97 08:29'!\\\\nreadPalette\\\\n\\\\n\\\\t| r g b array |\\\\n\\\\tself next = 12 ifFalse: [self error: 'no Color Palette!!'].\\\\n\\\\tarray _ Array new: (1 bitShift: bitsPerPixel).\\\\n\\\\t1 to: array size do:\\\\n\\\\t\\\\t[:i |\\\\n\\\\t\\\\tr _ self next.  g _ self next.  b _ self next.\\\\n\\\\t\\\\tarray at: i put: (Color r: r g: g b: b range: 255)].\\\\n\\\\t^ array.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPCXReadWriter class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PCXReadWriter class methodsFor: 'image reading/writing' stamp: 'nk 7/16/2003 17:57'!\\\\ntypicalFileExtensions\\\\n\\\\t\\\\\\\"Answer a collection of file extensions (lowercase) which files that I can read might commonly have\\\\\\\"\\\\n\\\\t^#('pcx')! !\\\\nObject subclass: #PHOReader\\\\n\\\\tinstanceVariableNames: 'stream phonemes events pitches time'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Speech-Support'!\\\\n!PHOReader commentStamp: '<historical>' prior: 0!\\\\nMy instances read PHO files with lines of the form 'phoneme duration time0 pitch0 time1 pitch1 ...'. Time is in milliseconds, and pitch is in hertz. Files on this format are used as inputs for the MBROLA synthesizer, and there are lots of them available on the web. Here's an example:\\\\n\\\\n_  120 0 105\\\\nm  60 33 105\\\\nE  70 42 102\\\\nr  50 20 108\\\\nI  50 20 125 100 142\\\\nk  100\\\\nr  50 80 137\\\\nI  50 80 121\\\\ns  70\\\\nm  50\\\\n@  90 33 111 88 108\\\\ns  90\\\\n!\\\\n\\\\n\\\\n!PHOReader methodsFor: 'accessing' stamp: 'stephaneducasse 2/3/2006 22:22'!\\\\naddPitches\\\\n\\\\t| offset |\\\\n\\\\toffset := 0.0.\\\\n\\\\tevents do: [ :each |\\\\n\\\\t\\\\teach pitchPoints: (self pitchesBetween: offset and: offset + each duration).\\\\n\\\\t\\\\toffset := offset + each duration].! !\\\\n\\\\n!PHOReader methodsFor: 'accessing' stamp: 'len 8/29/1999 02:16'!\\\\nevents\\\\n\\\\t^ CompositeEvent new addAll: events; yourself! !\\\\n\\\\n!PHOReader methodsFor: 'accessing' stamp: 'stephaneducasse 2/3/2006 22:22'!\\\\nnextEvent\\\\n\\\\t| line phonemeName phoneme duration answer ptime pitch |\\\\n\\\\tline := ReadStream on: stream nextLine.\\\\n\\\\tphonemeName := line upTo: Character space.\\\\n\\\\tphoneme := phonemes at: phonemeName.\\\\n\\\\t[line peek isSeparator] whileTrue: [line next].\\\\n\\\\tduration := (line upTo: Character space) asNumber / 1000.0.\\\\n\\\\tanswer := PhoneticEvent new phoneme: phoneme; duration: duration; loudness: 1.0.\\\\n\\\\t[line atEnd]\\\\n\\\\t\\\\twhileFalse: [ptime := (line upTo: Character space) asNumber * duration / 100.0.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpitch := (line upTo: Character space) asNumber asFloat.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpitches add: time + ptime @ pitch].\\\\n\\\\ttime := time + duration.\\\\n\\\\t^ answer! !\\\\n\\\\n!PHOReader methodsFor: 'accessing' stamp: 'stephaneducasse 2/3/2006 22:22'!\\\\npitchAt: t\\\\n\\\\t\\\\\\\"Answer the pitch of the receiver at a given time. (Do linear interpolation.)\\\\\\\"\\\\n\\\\t| xVal count x1 x2 y1 y2 |\\\\n\\\\txVal := pitches first x.\\\\n\\\\tcount := 1.\\\\n\\\\t[xVal < t]\\\\n\\\\t\\\\twhileTrue: [count := count + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcount > pitches size ifTrue: [^ pitches last y].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\txVal := (pitches at: count) x].\\\\n\\\\txVal = t ifTrue: [^ (pitches at: count) y].\\\\n\\\\tcount = 1 ifTrue: [^ pitches first y].\\\\n\\\\tx1 := (pitches at: count - 1) x.\\\\n\\\\tx2 := (pitches at: count) x.\\\\n\\\\ty1 := (pitches at: count - 1) y.\\\\n\\\\ty2 := (pitches at: count) y.\\\\n\\\\t^ (t - x1) / (x2 - x1) * (y2 - y1) + y1! !\\\\n\\\\n!PHOReader methodsFor: 'accessing' stamp: 'stephaneducasse 2/3/2006 22:22'!\\\\npitchesBetween: t1 and: t2\\\\n\\\\t| step |\\\\n\\\\tstep := (t2 - t1 / 0.035) asInteger + 1. \\\\\\\"step small enough\\\\\\\"\\\\n\\\\t^ (t1 to: t2 by: t2 - t1 / step) collect: [ :each | each - t1 @ (self pitchAt: each)]! !\\\\n\\\\n!PHOReader methodsFor: 'accessing' stamp: 'len 6/17/1999 01:45'!\\\\nplotPitch\\\\n\\\\tUtilities plot: ((0 to: time by: 0.050) collect: [ :each | self pitchAt: each])! !\\\\n\\\\n!PHOReader methodsFor: 'accessing' stamp: 'len 6/15/1999 00:40'!\\\\nread\\\\n\\\\tstream reset.\\\\n\\\\t[stream atEnd] whileFalse: [events add: self nextEvent].\\\\n\\\\tself addPitches! !\\\\n\\\\n!PHOReader methodsFor: 'accessing' stamp: 'stephaneducasse 2/3/2006 22:22'!\\\\nstream: aStream\\\\n\\\\tstream := aStream! !\\\\n\\\\n\\\\n!PHOReader methodsFor: 'initialization' stamp: 'stephaneducasse 2/3/2006 22:22'!\\\\ninitialize\\\\n\\\\tevents := OrderedCollection new.\\\\n\\\\tpitches := OrderedCollection new.\\\\n\\\\ttime := 0.0.\\\\n\\\\tphonemes := PhonemeSet sampaToArpabet! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPHOReader class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PHOReader class methodsFor: 'examples' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\naliceExample\\\\n\\\\t| events |\\\\n\\\\tevents := self eventsFromString: self aliceExampleString.\\\\n\\\\tevents do: [ :each | each pitchBy: 0.63489].\\\\n\\\\t^ events! !\\\\n\\\\n!PHOReader class methodsFor: 'examples' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\naliceExampleFemale\\\\n\\\\t| events |\\\\n\\\\tevents := self eventsFromString: self aliceExampleString.\\\\n\\\\tevents do: [ :each | each pitchBy: 1.3].\\\\n\\\\t^ events! !\\\\n\\\\n!PHOReader class methodsFor: 'examples' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\naliceExampleMale\\\\n\\\\t| events |\\\\n\\\\tevents := self eventsFromString: self aliceExampleString.\\\\n\\\\tevents do: [ :each | each pitchBy: 0.63489].\\\\n\\\\t^ events! !\\\\n\\\\n!PHOReader class methodsFor: 'examples' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\naliceShortExample\\\\n\\\\t| events |\\\\n\\\\tevents := self eventsFromString: self aliceShortExampleString.\\\\n\\\\tevents do: [ :each | each pitchBy: 1.3].\\\\n\\\\t^ events! !\\\\n\\\\n!PHOReader class methodsFor: 'examples' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\naliceShortExampleMale\\\\n\\\\t| events |\\\\n\\\\tevents := self eventsFromString: self aliceShortExampleString.\\\\n\\\\tevents do: [ :each | each pitchBy: 0.4].\\\\n\\\\t^ events! !\\\\n\\\\n!PHOReader class methodsFor: 'examples' stamp: 'len 7/27/1999 01:47'!\\\\nmbrolaExample\\\\n\\\\t^ self eventsFromString:\\\\n'_ 50\\\\nE 40 0 102\\\\nm 50\\\\nb 50\\\\nr 30\\\\n@U 80 5 119 35 126 70 140\\\\nl 50\\\\n@ 50 50 173\\\\nw 100 75 133\\\\nV 30 85 114\\\\nz 60 75 101\\\\nd 60\\\\n@ 40\\\\nv 40 85 105\\\\nE 60 75 121\\\\nl 50 70 121\\\\n@ 60 60 150\\\\np 50\\\\nd 70\\\\nb 70 0 90\\\\nAI 130 85 101\\\\nT 70\\\\nj 50 0 180\\\\nE 120 0 185 95 131\\\\nr 40\\\\ni 90 85 135\\\\nd 80 60 134\\\\n@ 50 0 119 50 114\\\\nt 70\\\\nw 70 10 117 65 127 85 115\\\\nA 180 0 102 55 91 95 85\\\\n_ 100\\\\n_ 100\\\\nI 80 18 111\\\\nt 80\\\\ns 50\\\\n@ 30\\\\ns 70\\\\np 80\\\\ni 80 25 171 85 200\\\\ntS 110\\\\ns 70\\\\nI 30 35 112\\\\nn 40\\\\nT 80\\\\n@ 40 85 108\\\\ns 80\\\\nAI 130 80 115\\\\nz 70 90 125\\\\nr= 120 75 111\\\\nb 80\\\\nEI 80 95 133\\\\nz 70\\\\nd 50\\\\nA 40\\\\nn 30\\\\nD 60\\\\n@ 30 65 121\\\\nk 90\\\\nA 30\\\\nn 30 100 140\\\\nk 80\\\\n{ 70 5 170\\\\nt 70\\\\n@ 40 50 186\\\\nn 40 75 163\\\\nEI 100 90 173\\\\nS 130\\\\n@ 40\\\\nn 30 65 153\\\\nV 40\\\\nv 70 0 148\\\\nd 60\\\\nAI 130 5 112 80 109\\\\nf 110\\\\n@U 160 87 88\\\\nn 70\\\\nz 210 88 82\\\\n_ 80\\\\n_ 100\\\\nI 40 0 140\\\\nt 50\\\\nt 100\\\\nEI 60 50 221\\\\nk 70\\\\ns 80\\\\n@ 30 0 190\\\\nl 50\\\\nI 30 65 180\\\\ns 110\\\\nt 70\\\\nV 50 20 171\\\\nv 50\\\\nf 90\\\\n@U 140 25 157\\\\nn 30\\\\ni 60 66 160\\\\nm 50 60 130\\\\nz 80\\\\n@ 40 62 78\\\\nz 80\\\\nI 70 78 134\\\\nn 50 70 163\\\\np 120\\\\nU 90 15 119 75 98\\\\nt 90\\\\n_ 140\\\\n_ 100\\\\nt 60 0 111\\\\nu 50 80 119\\\\ng 70\\\\nE 50 90 145\\\\nD 50\\\\nr= 50 40 139 90 163\\\\nw 90\\\\nI 30 15 114\\\\nD 50\\\\n_ 40\\\\np 50\\\\nr 30 0 102\\\\n@ 30 65 110\\\\ns 120\\\\nA 50 90 148\\\\nd 80\\\\nI 50 50 178\\\\nk 80\\\\nI 50 66 167\\\\nn 60\\\\nf 50\\\\nr= 50 90 125\\\\nm 50\\\\nEI 140 95 96\\\\nS 140\\\\n@ 80 35 168\\\\nn 100 95 142\\\\n_ 190\\\\n{ 90 0 133\\\\nn 30\\\\nd 30\\\\np 80\\\\nr 40\\\\n@ 40 0 97 65 103\\\\nd 70\\\\nj 20\\\\nu 60 65 150\\\\ns 90\\\\nI 30 50 210\\\\nz 50\\\\ns 140\\\\np 70\\\\ni 130 0 138 95 98\\\\ntS 160\\\\n{ 70 0 127\\\\nt 50\\\\nD 50\\\\n@ 30 15 93\\\\ns 140\\\\n{ 30 35 127\\\\nm 50\\\\np 70\\\\nl 50\\\\nI 30 35 184\\\\nN 70\\\\nf 70\\\\nr 60\\\\ni 90 30 125\\\\nk 40\\\\nw 30\\\\n@ 30 15 185\\\\nn 30\\\\ns 100\\\\ni 50 20 148 70 142\\\\nV 30 5 148\\\\nv 40\\\\nD 80\\\\n@ 40 25 106\\\\nd 80\\\\nAI 150 95 115\\\\nf 90\\\\n@U 130 95 114\\\\nn 70\\\\nd 80\\\\nEI 80 80 137\\\\n4 50\\\\n@ 30\\\\nb 100\\\\nEI 120 95 78\\\\ns 210\\\\n_ 80'! !\\\\n\\\\n!PHOReader class methodsFor: 'examples' stamp: 'len 7/27/1999 01:48'!\\\\npushExample\\\\n\\\\t^ self eventsFromString:\\\\n'_  60 0 137\\\\np  50 100 137\\\\nu  110 90 137\\\\nS  100 10 121\\\\nD  90\\\\n@  70 57 114 100 102\\\\ns  70\\\\nt  50\\\\nA 100 57 121 64 121\\\\nr 40\\\\nt  50\\\\nb  110\\\\nV  140 21 117 57 100 92 100\\\\n_ 3\\\\nn  130 25 102 50 105\\\\nt  60\\\\nu  70 28 129 71 111\\\\nb  70\\\\ni  70 50 102\\\\ng  20 10 100 80 102\\\\ni  130 25 117 66 114\\\\nn  260 3 111 23 105 42 97 61 93 73 93\\\\n_  140 92 93 100 100'! !\\\\n\\\\n!PHOReader class methodsFor: 'examples' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\npushExampleFemale\\\\n\\\\t| events |\\\\n\\\\tevents := self pushExample.\\\\n\\\\tevents do: [ :each | each pitchBy: 1.93489].\\\\n\\\\t^ events! !\\\\n\\\\n!PHOReader class methodsFor: 'examples' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\npushShortExample\\\\n\\\\t^ self eventsFromString:\\\\n'i  70 50 102\\\\ng  20 10 100 80 102\\\\ni  130 25 117 66 114\\\\nn  260 3 111 23 105 42 97 61 93 73 93'.\\\\n\\\\\\\"\\\\n':= 3\\\\nn  130 25 102 50 105\\\\nt  60\\\\nu  70 28 129 71 111\\\\nb  70\\\\ni  70 50 102\\\\ng  20 10 100 80 102\\\\ni  130 25 117 66 114\\\\nn  260 3 111 23 105 42 97 61 93 73 93\\\\n:=  140 92 93 100 100'\\\\\\\"! !\\\\n\\\\n!PHOReader class methodsFor: 'examples' stamp: 'len 7/27/1999 01:48'!\\\\nxmasExample\\\\n\\\\t^ self eventsFromString:\\\\n'_  120 0 105\\\\nm  60 33 105\\\\nE  70 42 102\\\\nr  50 20 108\\\\nI  50 20 125 100 142\\\\nk  100\\\\nr  50 80 137\\\\nI  50 80 121\\\\ns  70\\\\nm  50\\\\n@  90 33 111 88 108\\\\ns  90\\\\n{  70\\\\nn  100 50 105 100 97\\\\nd  50 80 93\\\\nh  50 20 93\\\\n{  50 20 102 60 114\\\\np  50\\\\ni  50 100 125\\\\nn  60 83 121\\\\nu 100\\\\nj  130 7 121 23 121 100 108\\\\nr=  250 41 102 83 97\\\\n_  210 95 86 100 100'\\\\n! !\\\\n\\\\n!PHOReader class methodsFor: 'examples' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\nxmasKidExample\\\\n\\\\t| events |\\\\n\\\\tevents := self xmasExample.\\\\n\\\\tevents do: [ :each | each pitchBy: 1.6].\\\\n\\\\t^ events! !\\\\n\\\\n\\\\n!PHOReader class methodsFor: 'examples-private' stamp: 'len 7/27/1999 01:45'!\\\\naliceExampleString\\\\n\\\\t^ '_ 48 0 222\\\\n{ 80 40 222 90 235\\\\nl 72 44 250 66 250\\\\nI 80\\\\ns 88\\\\nw 40 80 235\\\\n@ 40 80 210\\\\nz 64 12 210 50 181 75 181\\\\nb 72 33 173 88 181\\\\nI 56 71 181\\\\ng 56 28 153 100 166\\\\nI 64 62 160\\\\nn 40 60 160\\\\nI 88 27 166\\\\nN 40 100 166\\\\nt 80 20 160\\\\nU 40 40 181 80 166\\\\ng 48 100 166\\\\nE 104 38 153 76 137\\\\nt 56\\\\nv 48\\\\nE 72 11 166 66 153\\\\nr 88 18 160 63 166\\\\ni 112.8 14 166 49 173 77 173\\\\nt 104.8 98 137\\\\nAI 178.4 21 148 70 148 92 137\\\\nr= 108 25 137 62 133 98 129\\\\nd 49\\\\n@ 59.2 6 137 73 133\\\\nv 46\\\\ns 89\\\\nI 40 40 173\\\\nt 40 40 166\\\\nI 64 62 166\\\\nN 72 22 160 77 153\\\\nb 40 40 142 100 153\\\\nAI 136 29 142\\\\nh 80 30 142 100 148\\\\nr= 64 62 153 100 153\\\\ns 125\\\\nI 64 37 210 100 190\\\\ns 72 11 190\\\\nt 72\\\\nr= 104 30 160 69 142\\\\nO 72\\\\nn 40 40 142\\\\nD 40 40 153\\\\n@ 40 40 160\\\\nb 40 40 153 100 160\\\\n{ 216 18 166 51 166 70 153 88 137 100 133\\\\nn 40\\\\nk 56\\\\n_ 144 94 129 100 100\\\\n_ 100 0 137\\\\n{ 40\\\\nn 88 9 137 36 137 72 142\\\\nt 40 40 137 60 133\\\\n@ 48 16 148 100 148\\\\nh 40 100 142\\\\n{ 48 83 148\\\\nv 48 16 142\\\\nI 56 14 148 85 137\\\\nN 56 71 137\\\\nn 64 37 137 100 142\\\\nO 96 41 137 83 153 100 153\\\\nT 64\\\\nI 56 42 166\\\\nN 64 12 160 75 153\\\\nt 80 30 142\\\\n@ 56 28 166 100 148\\\\nd 56 71 137\\\\nu 160 15 160 45 160 70 153 95 142\\\\nw 136 23 137 58 137 88 148\\\\nA 112 21 153 57 160 92 173\\\\nn 64 50 166 62 153\\\\ns 56\\\\nO 48 50 153\\\\nr 40 40 142 100 133\\\\nt 130\\\\nw 56 57 166\\\\nAI 168 9 173 33 166 57 153 80 148 100 148\\\\ns 88\\\\n_ 300\\\\nS 92\\\\ni 48 50 235\\\\nh 40 40 235 100 250\\\\n@ 40 60 210 100 210\\\\nd 40\\\\np 40\\\\ni 150\\\\nk 56\\\\nd 56\\\\nI 72 44 222 100 210\\\\nn 40 80 210\\\\nt 56\\\\n@ 48 83 181\\\\nD 40 39 173 99 173\\\\n@ 39.2 100 160\\\\nb 104 30 153 100 153\\\\nU 112 35 153 85 153 100 153\\\\nk 72\\\\nh 56\\\\nr= 48 50 200\\\\ns 136 5 181\\\\nI 64 25 166 87 142\\\\ns 56 14 137\\\\nt 56\\\\nr= 56 28 173 100 173\\\\nw 56 71 166\\\\n@ 56 42 181\\\\nz 48 16 181 50 173\\\\nr 120 73 181\\\\ni 104 7 190 69 190 100 181\\\\nd 40\\\\nI 112 7 166 50 137 85 129\\\\nN 80 30 114 50 111\\\\n_ 56 83 111 100 100\\\\n_ 140 0 153\\\\nb 40 60 153 100 153\\\\nU 64 75 148\\\\n4 40 80 148 100 142\\\\nI 40\\\\nt 40 40 148\\\\nh 40 40 142\\\\n{ 48 33 137\\\\nd 136 5 133 11 129 88 148\\\\nn 48 66 148\\\\n@U 144 16 160 44 173 72 190 100 210\\\\np 80\\\\nI 96 75 190 100 181\\\\nk 56\\\\ntS 96\\\\nr= 104 30 190 69 181\\\\nz 72 11 181 33 173\\\\nO 40 60 173\\\\nr 64 37 160 100 153\\\\nk 72 11 153\\\\nO 152 63 190 89 200\\\\nn 40 60 181\\\\nv 40 60 166\\\\nr= 40 60 160\\\\ns 104 15 142\\\\nEI 120 20 190 53 190 86 210\\\\nS 104 7 210\\\\n@ 56 28 181 100 160\\\\nn 64 62 153 100 137\\\\nz 40\\\\nI 56 14 148 85 133\\\\nn 40 100 133\\\\nI 96 41 129 83 125\\\\nt 80\\\\n_ 64 85 125 100 100\\\\n_ 140 0 222\\\\n{ 56 14 222 28 220 42 235 85 235 100 220\\\\nn 96 33 222 75 235 100 235\\\\nw 48 33 222 66 250\\\\nO 90\\\\n4 48 50 222 66 252\\\\nI 48 33 250\\\\nz 64 12 235 62 210\\\\nD 56\\\\n@ 56 71 190\\\\nj 104 23 166 61 166 100 181\\\\nu 112 35 190 42 210 71 210 100 210\\\\ns 150\\\\n@ 56 42 200\\\\nv 40 20 160 60 148\\\\n@ 64 25 153 87 142\\\\nb 136 23 133 47 137\\\\nU 96 8 160 50 173 91 181 100 181\\\\nk 56\\\\n_ 56\\\\nT 56\\\\nO 119.2 20 166 53 142 80 137\\\\n4 40 20 133\\\\n{ 136 5 137 35 129 64 125\\\\nl 48 16 125 100 133\\\\nI 80 50 153 100 181\\\\ns 120\\\\n_ 40\\\\n_ 40\\\\nw 88 9 166 54 142\\\\nI 40 40 142\\\\nD 40 40 137\\\\naU 62.4 38 137 63 133\\\\nt 80\\\\np 55\\\\nI 72 16 210 38 210\\\\nk 40\\\\ntS 75.2 99 173\\\\nr= 136 29 160 64 160 76 166\\\\nz 48\\\\nO 44 90 185\\\\nr 60 6 198 46 200 72 190\\\\nk 40\\\\nO 81.6 12 148 61 133\\\\nn 40 20 133\\\\nv 48 33 133\\\\nr= 56 28 181 100 181\\\\ns 120 6 173\\\\nEI 136 11 222 41 210 94 210\\\\nS 120\\\\n@ 128 12 190 43 148 75 137\\\\nn 64 12 129 50 125\\\\n_ 80 88 125 100 100'! !\\\\n\\\\n!PHOReader class methodsFor: 'examples-private' stamp: 'len 7/27/1999 01:46'!\\\\naliceShortExampleString\\\\n\\\\t^ '_ 48 0 222\\\\n{ 80 40 222 90 235\\\\nl 72 44 250 66 250\\\\nI 80\\\\ns 88\\\\nw 40 80 235\\\\n@ 40 80 210\\\\nz 64 12 210 50 181 75 181\\\\nb 72 33 173 88 181\\\\nI 56 71 181\\\\ng 56 28 153 100 166\\\\nI 64 62 160\\\\nn 40 60 160\\\\nI 88 27 166\\\\nN 40 100 166\\\\nt 80 20 160\\\\nU 40 40 181 80 166\\\\ng 48 100 166\\\\nE 104 38 153 76 137\\\\nt 56\\\\nv 48\\\\nE 72 11 166 66 153\\\\nr 88 18 160 63 166\\\\ni 112.8 14 166 49 173 77 173\\\\nt 104.8 98 137\\\\nAI 178.4 21 148 70 148 92 137\\\\nr= 108 25 137 62 133 98 129\\\\nd 49\\\\n@ 59.2 6 137 73 133\\\\nv 46\\\\ns 89\\\\nI 40 40 173\\\\nt 40 40 166\\\\nI 64 62 166\\\\nN 72 22 160 77 153\\\\nb 40 40 142 100 153\\\\nAI 136 29 142\\\\nh 80 30 142 100 148\\\\n@ 60 50 150\\\\nr= 64 62 153 100 153\\\\ns 125\\\\nI 64 37 210 100 190\\\\ns 72 11 190\\\\nt 72\\\\nr= 104 30 160 69 142\\\\nO 72\\\\nn 40 40 142\\\\nD 40 40 153\\\\n@ 40 40 160\\\\nb 40 40 153 100 160\\\\n{ 216 18 166 51 166 70 153 88 137 100 133\\\\nn 40\\\\nk 56\\\\n_ 144 94 129 100 100'! !\\\\n\\\\n\\\\n!PHOReader class methodsFor: 'instance creation' stamp: 'len 6/15/1999 00:48'!\\\\neventsFromStream: aStream\\\\n\\\\t^ self new stream: aStream; read; events! !\\\\n\\\\n!PHOReader class methodsFor: 'instance creation' stamp: 'len 6/15/1999 00:49'!\\\\neventsFromString: aString\\\\n\\\\t^ self eventsFromStream: (ReadStream on: aString)! !\\\\n\\\\n!PHOReader class methodsFor: 'instance creation' stamp: 'len 6/17/1999 01:47'!\\\\nplotPitchFromStream: aStream\\\\n\\\\t^ self new stream: aStream; read; plotPitch! !\\\\n\\\\n!PHOReader class methodsFor: 'instance creation' stamp: 'len 6/17/1999 01:47'!\\\\nplotPitchFromString: aString\\\\n\\\\t^ self plotPitchFromStream: (ReadStream on: aString)! !\\\\nImageReadWriter subclass: #PNGReadWriter\\\\n\\\\tinstanceVariableNames: 'chunk form width height depth backColor bitsPerChannel colorType interlaceMethod bitsPerPixel bytesPerScanline thisScanline prevScanline rowSize globalDataChunk unknownChunks palette transparentPixelValue filtersSeen swizzleMap cachedDecoderMap bigEndian'\\\\n\\\\tclassVariableNames: 'BPP BlockHeight BlockWidth Debugging StandardColors StandardSwizzleMaps'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Graphics-Files'!\\\\n!PNGReadWriter commentStamp: '<historical>' prior: 0!\\\\nI am a subclass of ImageReadWriter that decodes Portable Network Graphics\\\\n(PNG) images.\\\\n\\\\nSubmitted by Duane Maxwell!\\\\n\\\\n\\\\n!PNGReadWriter methodsFor: 'accessing' stamp: 'RAA 11/7/2000 09:20'!\\\\ndebugging\\\\n\\\\n\\\\t^Debugging == true! !\\\\n\\\\n!PNGReadWriter methodsFor: 'accessing' stamp: 'nk 7/30/2004 17:51'!\\\\nnextImage\\\\n\\\\tbigEndian := SmalltalkImage current isBigEndian.\\\\n\\\\tfiltersSeen := Bag new.\\\\n\\\\tglobalDataChunk := nil.\\\\n\\\\ttransparentPixelValue := nil.\\\\n\\\\tunknownChunks := Set new.\\\\n\\\\tstream reset.\\\\n\\\\tstream binary.\\\\n\\\\tstream skip: 8.\\\\n\\\\t[stream atEnd] whileFalse: [self processNextChunk].\\\\n\\\\t\\\\\\\"Set up our form\\\\\\\"\\\\n\\\\tpalette ifNotNil: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"Dump the palette if it's the same as our standard palette\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\tpalette = (StandardColors copyFrom: 1 to: palette size) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [palette := nil]].\\\\n\\\\t(depth <= 8 and: [palette notNil]) \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[form := ColorForm extent: width @ height depth: depth.\\\\n\\\\t\\\\t\\\\tform colors: palette]\\\\n\\\\t\\\\tifFalse: [form := Form extent: width @ height depth: depth].\\\\n\\\\tbackColor ifNotNil: [form fillColor: backColor].\\\\n\\\\tchunk := globalDataChunk ifNil: [self error: 'image data is missing'].\\\\n\\\\tchunk ifNotNil: [self processIDATChunk].\\\\n\\\\tunknownChunks isEmpty \\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"Transcript show: ' ',unknownChunks asSortedCollection asArray printString.\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\tself debugging \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[Transcript\\\\n\\\\t\\\\t\\\\t\\\\tcr;\\\\n\\\\t\\\\t\\\\t\\\\tshow: 'form = ' , form printString.\\\\n\\\\t\\\\t\\\\tTranscript\\\\n\\\\t\\\\t\\\\t\\\\tcr;\\\\n\\\\t\\\\t\\\\t\\\\tshow: 'colorType = ' , colorType printString.\\\\n\\\\t\\\\t\\\\tTranscript\\\\n\\\\t\\\\t\\\\t\\\\tcr;\\\\n\\\\t\\\\t\\\\t\\\\tshow: 'interlaceMethod = ' , interlaceMethod printString.\\\\n\\\\t\\\\t\\\\tTranscript\\\\n\\\\t\\\\t\\\\t\\\\tcr;\\\\n\\\\t\\\\t\\\\t\\\\tshow: 'filters = ' , filtersSeen sortedCounts asArray printString].\\\\n\\\\t^form! !\\\\n\\\\n!PNGReadWriter methodsFor: 'accessing' stamp: 'DSM 3/24/2000 01:12'!\\\\nunderstandsImageFormat\\\\n\\\\t#(137 80 78 71 13 10 26 10) do: [ :byte |\\\\n\\\\t\\\\tstream next = byte ifFalse: [^ false]].\\\\n\\\\t^ true\\\\n! !\\\\n\\\\n\\\\n!PNGReadWriter methodsFor: 'chunks' stamp: 'ar 2/10/2004 23:55'!\\\\nprocessBackgroundChunk\\\\n\\\\n\\\\t| val red green blue max |\\\\n\\\\n\\\\t\\\\\\\"Transcript show: '  BACKGROUND: ',chunk printString.\\\\\\\"\\\\n\\\\tcolorType = 3 ifTrue: [\\\\n\\\\t\\\\tbackColor := palette at: chunk first + 1.\\\\n\\\\t\\\\t^self\\\\n\\\\t].\\\\n\\\\tmax _ (2 raisedTo: bitsPerChannel) - 1.\\\\n\\\\t(colorType = 0 or: [colorType = 4]) ifTrue: [\\\\n\\\\t\\\\tval _ chunk unsignedShortAt: 1 bigEndian: true.\\\\n\\\\t\\\\tbackColor := Color gray: val / max.\\\\n\\\\t\\\\t^self\\\\n\\\\t].\\\\n\\\\t(colorType = 2 or: [colorType = 6]) ifTrue: [\\\\n\\\\t\\\\tred _ chunk unsignedShortAt: 1 bigEndian: true.\\\\n\\\\t\\\\tgreen _ chunk unsignedShortAt: 3 bigEndian: true.\\\\n\\\\t\\\\tblue _ chunk unsignedShortAt: 5 bigEndian: true.\\\\n\\\\t\\\\tbackColor := Color r: red/max g: green/max b: blue/max.\\\\n\\\\t\\\\t^self\\\\n\\\\t].\\\\n\\\\\\\"self halt.\\\\\\\"\\\\n\\\\n\\\\\\\"====\\\\nThe bKGD chunk specifies a default background color to present the image against. Note that viewers are not bound to honor this chunk; a viewer can choose to use a different background. \\\\n\\\\nFor color type 3 (indexed color), the bKGD chunk contains: \\\\n\\\\n\\\\n   Palette index:  1 byte\\\\n\\\\nThe value is the palette index of the color to be used as background. \\\\n\\\\nFor color types 0 and 4 (grayscale, with or without alpha), bKGD contains: \\\\n\\\\n\\\\n   Gray:  2 bytes, range 0 .. (2^bitdepth)-1\\\\n\\\\n(For consistency, 2 bytes are used regardless of the image bit depth.) The value is the gray level to be used as background. \\\\n\\\\nFor color types 2 and 6 (truecolor, with or without alpha), bKGD contains: \\\\n\\\\n\\\\n   Red:   2 bytes, range 0 .. (2^bitdepth)-1\\\\n   Green: 2 bytes, range 0 .. (2^bitdepth)-1\\\\n   Blue:  2 bytes, range 0 .. (2^bitdepth)-1\\\\n\\\\n(For consistency, 2 bytes per sample are used regardless of the image bit depth.) This is the RGB color to be used as background. \\\\n\\\\nWhen present, the bKGD chunk must precede the first IDAT chunk, and must follow the PLTE chunk, if any. \\\\n===\\\\\\\"\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'chunks' stamp: 'RAA 11/4/2000 17:00'!\\\\nprocessIDATChunk\\\\n\\\\n\\\\tinterlaceMethod = 0\\\\n\\\\t\\\\tifTrue: [ self processNonInterlaced ]\\\\n\\\\t\\\\tifFalse: [ self processInterlaced ]\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'chunks' stamp: 'ar 2/10/2004 23:55'!\\\\nprocessIHDRChunk\\\\n\\\\twidth _ chunk longAt: 1 bigEndian: true.\\\\n\\\\theight _ chunk longAt: 5 bigEndian: true.\\\\n\\\\tbitsPerChannel _ chunk at: 9.\\\\n\\\\tcolorType _ chunk at: 10.\\\\n\\\\t\\\\\\\"compression _ chunk at: 11.\\\\\\\" \\\\\\\"TODO - validate compression\\\\\\\"\\\\n\\\\t\\\\\\\"filterMethod _ chunk at: 12.\\\\\\\" \\\\\\\"TODO - validate filterMethod\\\\\\\"\\\\n\\\\tinterlaceMethod _ chunk at: 13. \\\\\\\"TODO - validate interlace method\\\\\\\"\\\\n\\\\t(#(2 4 6) includes: colorType)\\\\n\\\\t\\\\tifTrue: [depth _ 32].\\\\n\\\\t(#(0 3) includes: colorType) ifTrue: [\\\\n\\\\t\\\\tdepth _ bitsPerChannel min: 8.\\\\n\\\\t\\\\tcolorType = 0 ifTrue: [ \\\\\\\"grayscale\\\\\\\"\\\\n\\\\t\\\\t\\\\tpalette := self grayColorsFor: depth.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\tbitsPerPixel _ (BPP at: colorType+1) at: bitsPerChannel highBit.\\\\n\\\\tbytesPerScanline _ width * bitsPerPixel + 7 // 8.\\\\n\\\\trowSize _ width * depth + 31 >> 5.\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'chunks' stamp: 'ar 2/29/2004 04:19'!\\\\nprocessInterlaced\\\\n\\\\t| z filter bytesPerPass startingCol colIncrement rowIncrement startingRow cx sc temp |\\\\n\\\\tstartingCol _ #(0 4 0 2 0 1 0 ).\\\\n\\\\tcolIncrement _ #(8 8 4 4 2 2 1 ).\\\\n\\\\trowIncrement _ #(8 8 8 4 4 2 2 ).\\\\n\\\\tstartingRow _ #(0 0 4 0 2 0 1 ).\\\\n\\\\tz _ ZLibReadStream on: chunk from: 1 to: chunk size.\\\\n\\\\t1 to: 7 do: [:pass |\\\\n\\\\t\\\\t(self doPass: pass)\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[cx _ colIncrement at: pass.\\\\n\\\\t\\\\t\\\\t\\\\tsc _ startingCol at: pass.\\\\n\\\\t\\\\t\\\\t\\\\tbytesPerPass _ width - sc + cx - 1 // cx * bitsPerPixel + 7 // 8.\\\\n\\\\t\\\\t\\\\t\\\\tprevScanline _ ByteArray new: bytesPerPass.\\\\n\\\\t\\\\t\\\\t\\\\tthisScanline _ ByteArray new: bytesPerScanline.\\\\n\\\\t\\\\t\\\\t\\\\t(startingRow at: pass)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tto: height - 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tby: (rowIncrement at: pass)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:y |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfilter _ z next.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfiltersSeen add: filter.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(filter isNil or: [(filter between: 0 and: 4) not])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [^ self].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tthisScanline _ z next: bytesPerPass into: thisScanline startingAt: 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself filterScanline: filter count: bytesPerPass.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself copyPixels: y at: sc by: cx.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttemp := prevScanline.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tprevScanline := thisScanline.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tthisScanline := temp.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\tz atEnd ifFalse:[self error:'Unexpected data'].! !\\\\n\\\\n!PNGReadWriter methodsFor: 'chunks' stamp: 'ar 2/11/2004 12:14'!\\\\nprocessNextChunk\\\\n\\\\n\\\\t| length chunkType crc chunkCrc |\\\\n\\\\n\\\\tlength _ self nextLong.\\\\n\\\\n\\\\tchunkType _ (self next: 4) asString.\\\\n\\\\tchunk _ self next: length.\\\\n\\\\tchunkCrc := self nextLong bitXor: 16rFFFFFFFF.\\\\n\\\\tcrc := self updateCrc: 16rFFFFFFFF from: 1 to: 4 in: chunkType.\\\\n\\\\tcrc := self updateCrc: crc from: 1 to: length in: chunk.\\\\n\\\\tcrc = chunkCrc ifFalse:[\\\\n\\\\t\\\\tself error: 'PNGReadWriter crc error in chunk ', chunkType.\\\\n\\\\t].\\\\n\\\\n\\\\tchunkType = 'IEND' ifTrue: [^self\\\\t\\\\\\\"*should* be the last chunk\\\\\\\"].\\\\n\\\\tchunkType = 'sBIT' ifTrue: [^self processSBITChunk \\\\\\\"could indicate unusual sample depth in original\\\\\\\"].\\\\n\\\\tchunkType = 'gAMA' ifTrue: [^self \\\\t\\\\\\\"indicates gamma correction value\\\\\\\"].\\\\n\\\\tchunkType = 'bKGD' ifTrue: [^self processBackgroundChunk].\\\\n\\\\tchunkType = 'pHYs' ifTrue: [^self processPhysicalPixelChunk].\\\\n\\\\tchunkType = 'tRNS' ifTrue: [^self processTransparencyChunk].\\\\n\\\\n\\\\tchunkType = 'IHDR' ifTrue: [^self processIHDRChunk].\\\\n\\\\tchunkType = 'PLTE' ifTrue: [^self processPLTEChunk].\\\\n\\\\tchunkType = 'IDAT' ifTrue: [\\\\n\\\\t\\\\t\\\\\\\"---since the compressed data can span multiple\\\\n\\\\t\\\\tchunks, stitch them all together first. later,\\\\n\\\\t\\\\tif memory is an issue, we need to figure out how\\\\n\\\\t\\\\tto do this on the fly---\\\\\\\"\\\\n\\\\t\\\\tglobalDataChunk _ globalDataChunk ifNil: [chunk] ifNotNil:\\\\n\\\\t\\\\t\\\\t[globalDataChunk,chunk].\\\\n\\\\t\\\\t^self\\\\n\\\\t].\\\\n\\\\tunknownChunks add: chunkType.\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'chunks' stamp: 'ar 2/29/2004 04:19'!\\\\nprocessNonInterlaced\\\\n\\\\t| z filter temp copyMethod debug |\\\\n\\\\tdebug := self debugging.\\\\n\\\\tcopyMethod _ #(copyPixelsGray: nil copyPixelsRGB: copyPixelsIndexed:\\\\n\\\\t\\\\t  copyPixelsGrayAlpha: nil copyPixelsRGBA:) at: colorType+1.\\\\n\\\\tdebug ifTrue: [ Transcript cr; nextPutAll: 'NI chunk size='; print: chunk size ].\\\\n\\\\tz _ ZLibReadStream on: chunk from: 1 to: chunk size.\\\\n\\\\tprevScanline _ ByteArray new: bytesPerScanline.\\\\n\\\\tthisScanline := ByteArray new: bytesPerScanline.\\\\n\\\\t0 to: height-1 do: [ :y |\\\\n\\\\t\\\\tfilter _ (z next: 1) first.\\\\n\\\\t\\\\tdebug ifTrue:[filtersSeen add: filter].\\\\n\\\\t\\\\tthisScanline _ z next: bytesPerScanline into: thisScanline startingAt: 1.\\\\n\\\\t\\\\t(debug and: [ thisScanline size < bytesPerScanline ]) ifTrue: [ Transcript nextPutAll: ('wanted {1} but only got {2}' format: { bytesPerScanline. thisScanline size }); cr ].\\\\n\\\\t\\\\tfilter = 0 ifFalse:[self filterScanline: filter count: bytesPerScanline].\\\\n\\\\t\\\\tself perform: copyMethod with: y.\\\\n\\\\t\\\\ttemp := prevScanline.\\\\n\\\\t\\\\tprevScanline := thisScanline.\\\\n\\\\t\\\\tthisScanline := temp.\\\\n\\\\t\\\\t].\\\\n\\\\tz atEnd ifFalse:[self error:'Unexpected data'].\\\\n\\\\tdebug ifTrue: [Transcript  nextPutAll: ' compressed size='; print: z position  ].\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'chunks' stamp: 'ar 2/11/2004 01:02'!\\\\nprocessPLTEChunk\\\\n\\\\n\\\\t| colorCount i |\\\\n\\\\n\\\\tcolorCount _ chunk size // 3. \\\\\\\"TODO - validate colorCount against depth\\\\\\\"\\\\n\\\\tpalette _ Array new: colorCount.\\\\n\\\\t0 to: colorCount-1 do: [ :index |\\\\n\\\\t\\\\ti _ index * 3 + 1.\\\\n\\\\t\\\\tpalette at: index+1 put:\\\\n\\\\t\\\\t\\\\t(Color r: (chunk at: i)/255.0 g: (chunk at: i+1)/255.0 b: (chunk at: i+2)/255.0)\\\\n\\\\t\\\\t].! !\\\\n\\\\n!PNGReadWriter methodsFor: 'chunks' stamp: 'RAA 11/5/2000 11:24'!\\\\nprocessPhysicalPixelChunk\\\\n\\\\n\\\\t\\\\\\\"Transcript show: '  PHYSICAL: ',chunk printString.\\\\\\\"\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'chunks' stamp: 'ar 12/12/2003 18:33'!\\\\nprocessSBITChunk\\\\n\\\\t| rBits gBits bBits aBits |\\\\n\\\\tcolorType = 6 ifFalse:[^self].\\\\n\\\\trBits := chunk at: 1.\\\\n\\\\tgBits := chunk at: 2.\\\\n\\\\tbBits := chunk at: 3.\\\\n\\\\taBits := chunk at: 4.\\\\n\\\\t(rBits = 5 and:[gBits = 5 and:[bBits = 5 and:[aBits = 1]]]) ifTrue:[\\\\n\\\\t\\\\tdepth := 16.\\\\n\\\\t].! !\\\\n\\\\n!PNGReadWriter methodsFor: 'chunks' stamp: 'RAA 11/4/2000 16:22'!\\\\nprocessTransparencyChunk\\\\n\\\\n\\\\t| red green blue |\\\\n\\\\n\\\\t\\\\\\\"Transcript show: '  TRANSPARENCY ',chunk printString.\\\\\\\"\\\\n\\\\tcolorType = 0 ifTrue: [\\\\n\\\\t\\\\ttransparentPixelValue _ chunk unsignedShortAt: 1 bigEndian: true.\\\\n\\\\t\\\\t^self\\\\n\\\\t].\\\\n\\\\tcolorType = 2 ifTrue: [\\\\n\\\\t\\\\tred _ chunk at: 2.\\\\n\\\\t\\\\tgreen _ chunk at: 2.\\\\n\\\\t\\\\tblue _ chunk at: 2.\\\\n\\\\t\\\\ttransparentPixelValue _ 16rFF00 + red << 8 + green << 8 + blue.\\\\n\\\\t\\\\t^self\\\\n\\\\t].\\\\n\\\\tcolorType = 3 ifTrue: [\\\\n\\\\t\\\\tchunk withIndexDo: [ :alpha :index |\\\\n\\\\t\\\\t\\\\tpalette at: index put: ((palette at: index) alpha: alpha/255)\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\t^self\\\\n\\\\t].\\\\n! !\\\\n\\\\n\\\\n!PNGReadWriter methodsFor: 'filtering' stamp: 'RAA 11/7/2000 09:43'!\\\\nfilterAverage: count\\\\n\\\\t\\\\\\\"Use the average of the pixel to the left and the pixel above as a predictor\\\\\\\"\\\\n\\\\n\\\\t| delta |\\\\n\\\\tdelta _ bitsPerPixel // 8 max: 1.\\\\n\\\\t1 to: delta do: [:i |\\\\n\\\\t\\\\tthisScanline at: i put: ((thisScanline at: i) + ((prevScanline at: i) // 2) bitAnd: 255)].\\\\n\\\\tdelta + 1 to: count do: [:i |\\\\n\\\\t\\\\tthisScanline at: i put:\\\\n\\\\t\\\\t\\\\t((thisScanline at: i)\\\\n\\\\t\\\\t\\\\t+ ((prevScanline at: i)\\\\n\\\\t\\\\t\\\\t+ (thisScanline at: i - delta) // 2) bitAnd: 255)]! !\\\\n\\\\n!PNGReadWriter methodsFor: 'filtering' stamp: 'DSM 3/25/2000 17:54'!\\\\nfilterHorizontal: count\\\\n\\\\t\\\\\\\"Use the pixel to the left as a predictor\\\\\\\"\\\\n\\\\n\\\\t| delta |\\\\n\\\\tdelta _ bitsPerPixel // 8 max: 1.\\\\n\\\\tdelta+1 to: count do: [ :i |\\\\n\\\\t\\\\tthisScanline at: i put: (((thisScanline at: i) +\\\\n(thisScanline at: i-delta)) bitAnd: 255) ]\\\\n\\\\n\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'filtering' stamp: 'DSM 3/25/2000 17:55'!\\\\nfilterNone: count\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'filtering' stamp: 'RAA 11/7/2000 09:45'!\\\\nfilterPaeth: count\\\\n\\\\t\\\\\\\"Select one of (the pixel to the left, the pixel above and the pixel to above left) to\\\\n\\\\tpredict the value of this pixel\\\\\\\"\\\\n\\\\n\\\\t| delta |\\\\n\\\\tdelta _ bitsPerPixel // 8 max: 1.\\\\n\\\\t1 to: delta do: [ :i |\\\\n\\\\t\\\\tthisScanline at: i put:\\\\n\\\\t\\\\t\\\\t(((thisScanline at: i) + (prevScanline at: i)) bitAnd: 255)].\\\\n\\\\tdelta+1 to: count do: [ :i |\\\\n\\\\t\\\\tthisScanline\\\\n\\\\t\\\\t\\\\tat: i\\\\n\\\\t\\\\t\\\\tput: (((thisScanline at: i) + (self\\\\n\\\\t\\\\t\\\\t\\\\tpaethPredictLeft: (thisScanline at: i-delta)\\\\n\\\\t\\\\t\\\\t\\\\tabove: (prevScanline at: i)\\\\n\\\\t\\\\t\\\\t\\\\taboveLeft: (prevScanline at: i-delta)))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbitAnd: 255)]\\\\n\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'filtering' stamp: 'eat 9/11/2000 20:08'!\\\\nfilterScanline: filterType count: count\\\\n\\\\n\\\\tself\\\\n\\\\t\\\\tperform: (\\\\n\\\\t\\\\t\\\\t#(filterNone: filterHorizontal: filterVertical: filterAverage: filterPaeth:)\\\\n\\\\t\\\\t\\\\t\\\\tat: filterType+1)\\\\n\\\\t\\\\twith: count.\\\\n\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'filtering' stamp: 'DSM 3/25/2000 17:54'!\\\\nfilterVertical: count\\\\n\\\\t\\\\\\\"Use the pixel above as a predictor\\\\\\\"\\\\n\\\\n\\\\t1 to: count do: [ :i |\\\\n\\\\t\\\\tthisScanline at: i put: (((thisScanline at: i) +\\\\n(prevScanline at: i)) bitAnd: 255) ]\\\\n\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'filtering' stamp: 'eat 9/11/2000 20:05'!\\\\npaethPredictLeft: a above: b aboveLeft: c\\\\n\\\\t\\\\\\\"Predicts the value of a pixel based on nearby pixels, based on\\\\nPaeth (GG II, 1991)\\\\\\\"\\\\n\\\\n\\\\t| pa pb pc |\\\\n\\\\tpa _ b > c ifTrue: [b - c] ifFalse: [c - b].\\\\n\\\\tpb _ a > c ifTrue: [a - c] ifFalse: [c - a].\\\\n\\\\tpc _ a + b - c - c.\\\\n\\\\tpc < 0 ifTrue: [\\\\n\\\\t\\\\tpc := pc * -1].\\\\n\\\\t((pa <= pb) and: [pa <= pc]) ifTrue: [^ a].\\\\n\\\\t(pb <= pc) ifTrue: [^ b].\\\\n\\\\t^ c\\\\n! !\\\\n\\\\n\\\\n!PNGReadWriter methodsFor: 'miscellaneous' stamp: 'DSM 4/27/2000 13:09'!\\\\ndoPass: pass\\\\n\\\\t\\\\\\\"Certain interlace passes are skipped with certain small image\\\\ndimensions\\\\\\\"\\\\n\\\\n\\\\tpass = 1 ifTrue: [ ^ true ].\\\\n\\\\t((width = 1) and: [height = 1]) ifTrue: [ ^ false ].\\\\n\\\\tpass = 2 ifTrue: [ ^ width >= 5 ].\\\\n\\\\tpass = 3 ifTrue: [ ^ height >= 5 ].\\\\n\\\\tpass = 4 ifTrue: [ ^ (width >=3 ) or: [height >= 5] ].\\\\n\\\\tpass = 5 ifTrue: [ ^ height >=3 ].\\\\n\\\\tpass = 6 ifTrue: [ ^ width >=2 ].\\\\n\\\\tpass = 7 ifTrue: [ ^ height >=2 ].\\\\n\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'miscellaneous' stamp: 'ar 2/11/2004 01:27'!\\\\ngrayColorsFor: d\\\\n\\\\t\\\\\\\"return a color table for a gray image\\\\\\\"\\\\n\\\\n\\\\tpalette _ Array new: 1<<d.\\\\n\\\\td = 1 ifTrue: [\\\\n\\\\t\\\\tpalette at: 1 put: Color black.\\\\n\\\\t\\\\tpalette at: 2 put: Color white.\\\\n\\\\t\\\\t^ palette,{Color transparent}\\\\n\\\\t\\\\t].\\\\n\\\\td = 2 ifTrue: [\\\\n\\\\t\\\\tpalette at: 1 put: Color black.\\\\n\\\\t\\\\tpalette at: 2 put: (Color gray: 85.0 / 255.0).\\\\n\\\\t\\\\tpalette at: 3 put: (Color gray: 170.0 / 255.0).\\\\n\\\\t\\\\tpalette at: 4 put: Color white.\\\\n\\\\t\\\\t^ palette,{Color transparent}.\\\\n\\\\t\\\\t].\\\\n\\\\td = 4 ifTrue: [\\\\n\\\\t\\\\t0 to: 15 do: [ :g |\\\\n\\\\t\\\\t\\\\tpalette at: g+1 put: (Color gray: (g/15) asFloat) ].\\\\n\\\\t\\\\t^ palette,{Color transparent}\\\\n\\\\t\\\\t].\\\\n\\\\td = 8 ifTrue: [\\\\n\\\\t\\\\t0 to: 255 do: [ :g |\\\\n\\\\t\\\\t\\\\tpalette at: g+1 put: (Color gray: (g/255) asFloat) ].\\\\n\\\\t\\\\t^ palette\\\\t\\\\t\\\\\\\"??transparent??\\\\\\\"\\\\n\\\\t\\\\t].\\\\n! !\\\\n\\\\n\\\\n!PNGReadWriter methodsFor: 'pixel copies' stamp: 'DSM 3/26/2000 21:32'!\\\\ncopyPixels: y\\\\n\\\\t\\\\\\\"Handle non-interlaced pixels of supported colorTypes\\\\\\\"\\\\n\\\\n\\\\t| s |\\\\n\\\\ts _ #(copyPixelsGray: nil copyPixelsRGB: copyPixelsIndexed:\\\\n\\\\t\\\\t  copyPixelsGrayAlpha: nil copyPixelsRGBA:) at: colorType+1.\\\\n\\\\tself perform: s asSymbol with: y\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'pixel copies' stamp: 'RAA 11/4/2000 16:08'!\\\\ncopyPixels: y at: startX by: incX\\\\n\\\\t\\\\\\\"Handle interlaced pixels of supported colorTypes\\\\\\\"\\\\n\\\\n\\\\t| s |\\\\n\\\\ts _ #(copyPixelsGray:at:by: nil copyPixelsRGB:at:by: copyPixelsIndexed:at:by:\\\\n\\\\t\\\\t  copyPixelsGrayAlpha:at:by: nil copyPixelsRGBA:at:by:) at: colorType+1.\\\\n\\\\tself perform: s asSymbol with: y with: startX with: incX\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'pixel copies' stamp: 'RAA 11/4/2000 16:12'!\\\\ncopyPixelsGray: y \\\\n\\\\t\\\\\\\"Handle non-interlaced grayscale color mode (colorType = 0)\\\\\\\"\\\\n\\\\t| blitter pixPerByte mask shifts pixelNumber rawByte pixel transparentIndex |\\\\n\\\\tblitter _ BitBlt current bitPokerToForm: form.\\\\n\\\\ttransparentIndex _ form colors size.\\\\n\\\\tbitsPerChannel = 16\\\\n\\\\t\\\\tifTrue: [0\\\\n\\\\t\\\\t\\\\t\\\\tto: width - 1\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:x | blitter pixelAt: x @ y put: 255\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t- (thisScanline at: x << 1 + 1)].\\\\n\\\\t\\\\t\\\\t^ self]\\\\n\\\\t\\\\tifFalse: [bitsPerChannel = 8\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tto: width\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:x | blitter\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tpixelAt: x - 1 @ y\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tput: (thisScanline at: x)].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ self].\\\\n\\\\t\\\\t\\\\tbitsPerChannel = 1\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [pixPerByte _ 8.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmask _ 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tshifts _ #(7 6 5 4 3 2 1 0 )].\\\\n\\\\t\\\\t\\\\tbitsPerChannel = 2\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [pixPerByte _ 4.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmask _ 3.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tshifts _ #(6 4 2 0 )].\\\\n\\\\t\\\\t\\\\tbitsPerChannel = 4\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [pixPerByte _ 2.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmask _ 15.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tshifts _ #(4 0 )].\\\\n\\\\t\\\\t\\\\tpixelNumber _ 0.\\\\n\\\\t\\\\t\\\\t0 to: width - 1 do: [:x | \\\\n\\\\t\\\\t\\\\t\\\\trawByte _ thisScanline at: pixelNumber // pixPerByte + 1.\\\\n\\\\t\\\\t\\\\t\\\\tpixel _ rawByte\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t>> (shifts at: pixelNumber \\\\\\\\\\\\\\\\ pixPerByte + 1) bitAnd: mask.\\\\n\\\\t\\\\t\\\\t\\\\tpixel = transparentPixelValue ifTrue: [pixel _ transparentIndex].\\\\n\\\\t\\\\t\\\\t\\\\tblitter pixelAt: x @ y put: pixel.\\\\n\\\\t\\\\t\\\\t\\\\tpixelNumber _ pixelNumber + 1\\\\n\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t]! !\\\\n\\\\n!PNGReadWriter methodsFor: 'pixel copies' stamp: 'RAA 11/4/2000 16:09'!\\\\ncopyPixelsGray: y at: startX by: incX\\\\n\\\\t\\\\\\\"Handle interlaced grayscale color mode (colorType = 0)\\\\\\\"\\\\n\\\\n\\\\t| b offset bits w pixel mask blitter pixelNumber pixPerByte rawByte\\\\nshifts |\\\\n\\\\tbitsPerChannel = 16\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\tb _ BitBlt current bitPokerToForm: form.\\\\n\\\\t\\\\t\\\\tstartX to: width-1 by: incX do: [ :x |\\\\n\\\\t\\\\t\\\\t\\\\tb pixelAt: x@y put: 255 - (thisScanline at: (x//incX<<1)+1).\\\\n\\\\t\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\t^ self\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\toffset _ y*rowSize+1.\\\\n\\\\tbits _ form bits.\\\\n\\\\tbitsPerChannel = 8 ifTrue: [\\\\n\\\\t\\\\tstartX to: width-1 by: incX do: [ :x |\\\\n\\\\t\\\\t\\\\tw _ offset + (x>>2).\\\\n\\\\t\\\\t\\\\tb _ 3- (x \\\\\\\\\\\\\\\\ 4) * 8.\\\\n\\\\t\\\\t\\\\tpixel _ (thisScanline at: x // incX + 1)<<b.\\\\n\\\\t\\\\t\\\\tmask _ (255<<b) bitInvert32.\\\\n\\\\t\\\\t\\\\tbits at: w put: (((bits at: w) bitAnd: mask) bitOr: pixel)\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\t^ self\\\\n\\\\t].\\\\n\\\\tbitsPerChannel = 1 ifTrue: [\\\\n\\\\t\\\\tpixPerByte _ 8.\\\\n\\\\t\\\\tmask _ 1.\\\\n\\\\t\\\\tshifts _ #(7 6 5 4 3 2 1 0).\\\\n\\\\t].\\\\n\\\\tbitsPerChannel = 2 ifTrue: [\\\\n\\\\t\\\\tpixPerByte _ 4.\\\\n\\\\t\\\\tmask _ 3.\\\\n\\\\t\\\\tshifts _ #(6 4 2 0).\\\\n\\\\t].\\\\n\\\\tbitsPerChannel = 4 ifTrue: [\\\\n\\\\t\\\\tpixPerByte _ 2.\\\\n\\\\t\\\\tmask _ 15.\\\\n\\\\t\\\\tshifts _ #(4 0).\\\\n\\\\t].\\\\n\\\\n\\\\tblitter _ BitBlt current bitPokerToForm: form.\\\\n\\\\tpixelNumber _ 0.\\\\n\\\\tstartX to: width-1 by: incX do: [ :x |\\\\n\\\\t\\\\trawByte _ thisScanline at: (pixelNumber // pixPerByte) + 1.\\\\n\\\\t\\\\tpixel _ (rawByte >> (shifts at: (pixelNumber \\\\\\\\\\\\\\\\ pixPerByte) + 1)) bitAnd: mask.\\\\n\\\\t\\\\tblitter pixelAt: (x@y) put: pixel.\\\\n\\\\t\\\\tpixelNumber _ pixelNumber + 1.\\\\n\\\\t].\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'pixel copies' stamp: 'RAA 11/4/2000 16:09'!\\\\ncopyPixelsGrayAlpha: y\\\\n\\\\t\\\\\\\"Handle non-interlaced grayscale with alpha color mode (colorType = 4)\\\\\\\"\\\\n\\\\n\\\\t| i pixel gray b |\\\\n\\\\tb _ BitBlt current bitPokerToForm: form.\\\\n\\\\tbitsPerChannel = 8\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t0 to: width-1 do: [ :x |\\\\n\\\\t\\\\t\\\\t\\\\ti _ (x << 1) + 1.\\\\n\\\\t\\\\t\\\\t\\\\tgray _ thisScanline at: i.\\\\n\\\\t\\\\t\\\\t\\\\tpixel _ ((thisScanline at: i+1)<<24) + (gray<<16) + (gray<<8) + gray.\\\\n\\\\t\\\\t\\\\t\\\\tb pixelAt: x@y put: pixel.\\\\n\\\\t\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t0 to: width-1 do: [ :x |\\\\n\\\\t\\\\t\\\\t\\\\ti _ (x << 2) + 1.\\\\n\\\\t\\\\t\\\\t\\\\tgray _ thisScanline at: i.\\\\n\\\\t\\\\t\\\\t\\\\tpixel _ ((thisScanline at: i+2)<<24) + (gray<<16) + (gray<<8) + gray.\\\\n\\\\t\\\\t\\\\t\\\\tb pixelAt: x@y put: pixel.\\\\n\\\\t\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t\\\\t]\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'pixel copies' stamp: 'RAA 11/4/2000 16:09'!\\\\ncopyPixelsGrayAlpha: y at: startX by: incX\\\\n\\\\t\\\\\\\"Handle interlaced grayscale with alpha color mode (colorType = 4)\\\\\\\"\\\\n\\\\n\\\\t| i pixel gray b |\\\\n\\\\tb _ BitBlt current bitPokerToForm: form.\\\\n\\\\tbitsPerChannel = 8\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\tstartX to: width-1 by: incX do: [ :x |\\\\n\\\\t\\\\t\\\\t\\\\ti _ (x // incX << 1) + 1.\\\\n\\\\t\\\\t\\\\t\\\\tgray _ thisScanline at: i.\\\\n\\\\t\\\\t\\\\t\\\\tpixel _ ((thisScanline at: i+1)<<24) + (gray<<16) + (gray<<8) + gray.\\\\n\\\\t\\\\t\\\\t\\\\tb pixelAt: x@y put: pixel.\\\\n\\\\t\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\tstartX to: width-1 by: incX do: [ :x |\\\\n\\\\t\\\\t\\\\t\\\\ti _ (x // incX << 2) + 1.\\\\n\\\\t\\\\t\\\\t\\\\tgray _ thisScanline at: i.\\\\n\\\\t\\\\t\\\\t\\\\tpixel _ ((thisScanline at: i+2)<<24) + (gray<<16) + (gray<<8) + gray.\\\\n\\\\t\\\\t\\\\t\\\\tb pixelAt: x@y put: pixel.\\\\n\\\\t\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t\\\\t]\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'pixel copies' stamp: 'ar 1/1/1970 21:00'!\\\\ncopyPixelsIndexed: y\\\\n\\\\t\\\\\\\"Handle non-interlaced indexed color mode (colorType = 3)\\\\\\\"\\\\n\\\\t| hack hackBlt swizzleHack swizzleBlt scanline hackDepth |\\\\n\\\\tscanline := ByteArray new: bytesPerScanline + 3 // 4 * 4.\\\\n\\\\tscanline replaceFrom: 1 to: thisScanline size with: thisScanline startingAt: 1.\\\\n\\\\thackDepth := bigEndian ifTrue:[form depth] ifFalse:[form depth negated].\\\\n\\\\thack := Form extent: width@1 depth: hackDepth bits: scanline.\\\\n\\\\thackBlt := BitBlt toForm: form.\\\\n\\\\thackBlt sourceForm: hack.\\\\n\\\\thackBlt combinationRule: Form over.\\\\n\\\\thackBlt destOrigin: 0@y.\\\\n\\\\thackBlt width: width; height: 1.\\\\n\\\\n\\\\t(form depth < 8 and:[bigEndian not]) ifTrue:[\\\\n\\\\t\\\\tswizzleHack := Form new hackBits: scanline.\\\\n\\\\t\\\\tswizzleBlt := BitBlt toForm: swizzleHack.\\\\n\\\\t\\\\tswizzleBlt sourceForm: swizzleHack.\\\\n\\\\t\\\\tswizzleBlt combinationRule: Form over.\\\\n\\\\t\\\\tswizzleBlt colorMap: (StandardSwizzleMaps at: form depth).\\\\n\\\\t\\\\tswizzleBlt copyBits.\\\\n\\\\t].\\\\n\\\\n\\\\thackBlt copyBits.! !\\\\n\\\\n!PNGReadWriter methodsFor: 'pixel copies' stamp: 'RAA 11/4/2000 16:23'!\\\\ncopyPixelsIndexed: y at: startX by: incX\\\\n\\\\t\\\\\\\"Handle interlaced indexed color mode (colorType = 3)\\\\\\\"\\\\n\\\\n\\\\t| offset b bits w pixel mask pixPerByte shifts blitter pixelNumber rawByte |\\\\n\\\\toffset _ y*rowSize+1.\\\\n\\\\tbits _ form bits.\\\\n\\\\tbitsPerChannel = 8\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\tstartX to: width-1 by: incX do: [ :x |\\\\n\\\\t\\\\t\\\\t\\\\tw _ offset + (x>>2).\\\\n\\\\t\\\\t\\\\t\\\\tb _ 3 - (x \\\\\\\\\\\\\\\\ 4) * 8.\\\\n\\\\t\\\\t\\\\t\\\\tpixel _ (thisScanline at: x // incX + 1)<<b.\\\\n\\\\t\\\\t\\\\t\\\\tmask _ (255<<b) bitInvert32.\\\\n\\\\t\\\\t\\\\t\\\\tbits at: w put: (((bits at: w) bitAnd: mask) bitOr: pixel)].\\\\n\\\\t\\\\t\\\\t^ self ].\\\\n\\\\tbitsPerChannel = 1 ifTrue: [\\\\n\\\\t\\\\tpixPerByte _ 8.\\\\n\\\\t\\\\tmask _ 1.\\\\n\\\\t\\\\tshifts _ #(7 6 5 4 3 2 1 0).\\\\n\\\\t].\\\\n\\\\tbitsPerChannel = 2 ifTrue: [\\\\n\\\\t\\\\tpixPerByte _ 4.\\\\n\\\\t\\\\tmask _ 3.\\\\n\\\\t\\\\tshifts _ #(6 4 2 0).\\\\n\\\\t].\\\\n\\\\tbitsPerChannel = 4 ifTrue: [\\\\n\\\\t\\\\tpixPerByte _ 2.\\\\n\\\\t\\\\tmask _ 15.\\\\n\\\\t\\\\tshifts _ #(4 0).\\\\n\\\\t].\\\\n\\\\n\\\\tblitter _ BitBlt current bitPokerToForm: form.\\\\n\\\\tpixelNumber _ 0.\\\\n\\\\tstartX to: width-1 by: incX do: [ :x |\\\\n\\\\t\\\\trawByte _ thisScanline at: (pixelNumber // pixPerByte) + 1.\\\\n\\\\t\\\\tpixel _ (rawByte >> (shifts at: (pixelNumber \\\\\\\\\\\\\\\\ pixPerByte) + 1)) bitAnd: mask.\\\\n\\\\t\\\\tblitter pixelAt: (x@y) put: pixel.\\\\n\\\\t\\\\tpixelNumber _ pixelNumber + 1.\\\\n\\\\t].\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'pixel copies' stamp: 'RAA 11/7/2000 09:30'!\\\\ncopyPixelsRGB: y\\\\n\\\\t\\\\\\\"Handle non-interlaced RGB color mode (colorType = 2)\\\\\\\"\\\\n\\\\n\\\\t| i pixel tempForm tempBits |\\\\n\\\\n\\\\ttempForm _ Form extent: width@1 depth: 32.\\\\n\\\\ttempBits _ tempForm bits.\\\\n\\\\tpixel := LargePositiveInteger new: 4.\\\\n\\\\tpixel at: 4 put: 16rFF.\\\\n\\\\tbitsPerChannel = 8 ifTrue: [\\\\n\\\\t\\\\ti := 1.\\\\n\\\\t\\\\t1 to: width do: [ :x |\\\\n\\\\t\\\\t\\\\tpixel\\\\n\\\\t\\\\t\\\\t\\\\tat: 3 put: (thisScanline at: i);\\\\n\\\\t\\\\t\\\\t\\\\tat: 2 put: (thisScanline at: i+1);\\\\n\\\\t\\\\t\\\\t\\\\tat: 1 put: (thisScanline at: i+2).\\\\n\\\\t\\\\t\\\\ttempBits at: x put: pixel.\\\\n\\\\t\\\\t\\\\ti _ i + 3.\\\\n\\\\t\\\\t]\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\ti := 1.\\\\n\\\\t\\\\t1 to: width do: [ :x |\\\\n\\\\t\\\\t\\\\tpixel\\\\n\\\\t\\\\t\\\\t\\\\tat: 3 put: (thisScanline at: i);\\\\n\\\\t\\\\t\\\\t\\\\tat: 2 put: (thisScanline at: i+2);\\\\n\\\\t\\\\t\\\\t\\\\tat: 1 put: (thisScanline at: i+4).\\\\n\\\\t\\\\t\\\\ttempBits at: x put: pixel.\\\\n\\\\t\\\\t\\\\ti _ i + 6.\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\ttransparentPixelValue ifNotNil: [\\\\n\\\\t\\\\t1 to: width do: [ :x |\\\\n\\\\t\\\\t\\\\t(tempBits at: x) = transparentPixelValue ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\ttempBits at: x put: 0.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\ttempForm displayOn: form at: 0@y rule: Form paint.\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'pixel copies' stamp: 'nk 7/27/2004 17:18'!\\\\ncopyPixelsRGB: y at: startX by: incX\\\\n\\\\t\\\\\\\"Handle interlaced RGB color mode (colorType = 2)\\\\\\\"\\\\n\\\\n\\\\t| i pixel tempForm tempBits xx loopsToDo |\\\\n\\\\n\\\\ttempForm _ Form extent: width@1 depth: 32.\\\\n\\\\ttempBits _ tempForm bits.\\\\n\\\\tpixel := LargePositiveInteger new: 4.\\\\n\\\\tpixel at: 4 put: 16rFF.\\\\n\\\\tloopsToDo _ width - startX + incX - 1 // incX.\\\\n\\\\tbitsPerChannel = 8 ifTrue: [\\\\n\\\\t\\\\ti _ (startX // incX * 3) + 1.\\\\n\\\\t\\\\txx _ startX+1.\\\\n\\\\t\\\\t1 to: loopsToDo do: [ :j |\\\\n\\\\t\\\\t\\\\tpixel\\\\n\\\\t\\\\t\\\\t\\\\tat: 3 put: (thisScanline at: i);\\\\n\\\\t\\\\t\\\\t\\\\tat: 2 put: (thisScanline at: i+1);\\\\n\\\\t\\\\t\\\\t\\\\tat: 1 put: (thisScanline at: i+2).\\\\n\\\\t\\\\t\\\\ttempBits at: xx put: pixel.\\\\n\\\\t\\\\t\\\\ti _ i + 3.\\\\n\\\\t\\\\t\\\\txx _ xx + incX.\\\\n\\\\t\\\\t]\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\ti _ (startX // incX * 6) + 1.\\\\n\\\\t\\\\txx _ startX+1.\\\\n\\\\t\\\\t1 to: loopsToDo do: [ :j |\\\\n\\\\t\\\\t\\\\tpixel\\\\n\\\\t\\\\t\\\\t\\\\tat: 3 put: (thisScanline at: i);\\\\n\\\\t\\\\t\\\\t\\\\tat: 2 put: (thisScanline at: i+2);\\\\n\\\\t\\\\t\\\\t\\\\tat: 1 put: (thisScanline at: i+4).\\\\n\\\\t\\\\t\\\\ttempBits at: xx put: pixel.\\\\n\\\\t\\\\t\\\\ti _ i + 6.\\\\n\\\\t\\\\t\\\\txx _ xx + incX.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\ttransparentPixelValue ifNotNil: [\\\\n\\\\t\\\\tstartX to: width-1 by: incX do: [ :x |\\\\n\\\\t\\\\t\\\\t(tempBits at: x+1) = transparentPixelValue ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\ttempBits at: x+1 put: 0.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\ttempForm displayOn: form at: 0@y rule: Form paint.\\\\n\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'pixel copies' stamp: 'ar 2/18/2004 23:58'!\\\\ncopyPixelsRGBA: y\\\\n\\\\t\\\\\\\"Handle non-interlaced RGBA color modes (colorType = 6)\\\\\\\"\\\\n\\\\n\\\\t| i pixel tempForm tempBits ff |\\\\n\\\\tbitsPerChannel = 8 ifTrue: [\\\\n\\\\t\\\\tff := Form extent: width@1 depth: 32 bits: thisScanline.\\\\n\\\\t\\\\tcachedDecoderMap \\\\n\\\\t\\\\t\\\\tifNil:[cachedDecoderMap := self rgbaDecoderMapForDepth: depth].\\\\n\\\\t\\\\t(BitBlt toForm: form)\\\\n\\\\t\\\\t\\\\tsourceForm: ff;\\\\n\\\\t\\\\t\\\\tdestOrigin: 0@y;\\\\n\\\\t\\\\t\\\\tcombinationRule: Form over;\\\\n\\\\t\\\\t\\\\tcolorMap: cachedDecoderMap;\\\\n\\\\t\\\\t\\\\tcopyBits.\\\\n\\\\t\\\\t^self.\\\\n\\\\t].\\\\n\\\\ttempForm _ Form extent: width@1 depth: 32.\\\\n\\\\ttempBits _ tempForm bits.\\\\n\\\\tpixel := LargePositiveInteger new: 4.\\\\n\\\\ti := -7.\\\\n\\\\t0 to: width-1 do: [ :x |\\\\n\\\\t\\\\t\\\\ti := i + 8.\\\\n\\\\t\\\\t\\\\tpixel at: 4 put: (thisScanline at: i+6);\\\\n\\\\t\\\\t\\\\t\\\\tat: 3 put: (thisScanline at: i);\\\\n\\\\t\\\\t\\\\t\\\\tat: 2 put: (thisScanline at: i+2);\\\\n\\\\t\\\\t\\\\t\\\\tat: 1 put: (thisScanline at: i+4).\\\\n\\\\t\\\\t\\\\ttempBits at: x+1 put: pixel.\\\\n\\\\t].\\\\n\\\\ttempForm displayOn: form at: 0@y rule: Form over.\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'pixel copies' stamp: 'nk 7/27/2004 17:57'!\\\\ncopyPixelsRGBA: y at: startX by: incX\\\\n\\\\t\\\\\\\"Handle interlaced RGBA color modes (colorType = 6)\\\\\\\"\\\\n\\\\n\\\\t| i pixel tempForm tempBits |\\\\n\\\\n\\\\ttempForm _ Form extent: width@1 depth: 32.\\\\n\\\\ttempBits _ tempForm bits.\\\\n\\\\tpixel := LargePositiveInteger new: 4.\\\\n\\\\tbitsPerChannel = 8 ifTrue: [\\\\n\\\\t\\\\ti _ (startX // incX << 2) + 1.\\\\n\\\\t\\\\tstartX to: width-1 by: incX do: [ :x |\\\\n\\\\t\\\\t\\\\tpixel at: 4 put: (thisScanline at: i+3);\\\\n\\\\t\\\\t\\\\t\\\\tat: 3 put: (thisScanline at: i);\\\\n\\\\t\\\\t\\\\t\\\\tat: 2 put: (thisScanline at: i+1);\\\\n\\\\t\\\\t\\\\t\\\\tat: 1 put: (thisScanline at: i+2).\\\\n\\\\t\\\\t\\\\ttempBits at: x+1 put: pixel.\\\\n\\\\t\\\\t\\\\ti _ i + 4.\\\\n\\\\t\\\\t]\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\ti _ (startX // incX << 3) +1.\\\\n\\\\t\\\\tstartX to: width-1 by: incX do: [ :x |\\\\n\\\\t\\\\t\\\\tpixel at: 4 put: (thisScanline at: i+6);\\\\n\\\\t\\\\t\\\\t\\\\tat: 3 put: (thisScanline at: i);\\\\n\\\\t\\\\t\\\\t\\\\tat: 2 put: (thisScanline at: i+2);\\\\n\\\\t\\\\t\\\\t\\\\tat: 1 put: (thisScanline at: i+4).\\\\n\\\\t\\\\t\\\\ttempBits at: x+1 put: pixel.\\\\n\\\\t\\\\t\\\\ti _ i + 8.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\ttempForm displayOn: form at: 0@y rule: Form paintAlpha.\\\\n\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'pixel copies' stamp: 'ar 2/19/2004 00:10'!\\\\nrgbaDecoderMapForDepth: decoderDepth\\\\n\\\\tbigEndian ifTrue:[\\\\n\\\\t\\\\tdepth = 16 ifTrue:[\\\\n\\\\t\\\\t\\\\t\\\\\\\"Big endian, 32 -> 16 color mapping.\\\\\\\"\\\\n\\\\t\\\\t\\\\t^ColorMap\\\\n\\\\t\\\\t\\\\t\\\\tshifts: #(-17 -14 -11 0)\\\\n\\\\t\\\\t\\\\t\\\\tmasks: #(16rF8000000 16rF80000 16rF800 16r00)\\\\n\\\\t\\\\t] ifFalse:[\\\\n\\\\t\\\\t\\\\t\\\\\\\"Big endian, 32 -> 32 color mapping\\\\\\\"\\\\n\\\\t\\\\t\\\\t^ColorMap \\\\n\\\\t\\\\t\\\\t\\\\tshifts: #(-8 -8 -8 24) \\\\n\\\\t\\\\t\\\\t\\\\tmasks: #(16rFF000000 16rFF0000 16rFF00 16rFF).\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\tdepth = 16 ifTrue:[\\\\n\\\\t\\\\t\\\\\\\"Little endian, 32 -> 16 color mapping.\\\\\\\"\\\\n\\\\t\\\\t^ColorMap\\\\n\\\\t\\\\t\\\\tshifts: #(7 -6 -19 0)\\\\n\\\\t\\\\t\\\\tmasks: #(16rF8 16rF800 16rF80000 0)\\\\n\\\\t] ifFalse:[\\\\n\\\\t\\\\t\\\\\\\"Little endian, 32 -> 32 color mapping\\\\\\\"\\\\n\\\\t\\\\t^ColorMap \\\\n\\\\t\\\\t\\\\tshifts: #(-16 0 16 0) \\\\n\\\\t\\\\t\\\\tmasks: #(16rFF0000 16rFF00 16rFF 16rFF000000).\\\\n\\\\t].! !\\\\n\\\\n\\\\n!PNGReadWriter methodsFor: 'writing' stamp: 'ar 12/12/2003 16:37'!\\\\nnextPutImage: aForm\\\\n\\\\t\\\\\\\"Write out the given form. We're keeping it simple here, no interlacing, no filters.\\\\\\\"\\\\n\\\\t^self nextPutImage: aForm interlace: 0 filter: 0. \\\\\\\"no filtering\\\\\\\"! !\\\\n\\\\n!PNGReadWriter methodsFor: 'writing' stamp: 'nk 7/30/2004 17:51'!\\\\nnextPutImage: aForm interlace: aMethod filter: aFilterType \\\\n\\\\t\\\\\\\"Note: For now we keep it simple - interlace and filtering are simply ignored\\\\\\\"\\\\n\\\\n\\\\t| crcStream |\\\\n\\\\tbigEndian := SmalltalkImage current isBigEndian.\\\\n\\\\tform := aForm.\\\\n\\\\twidth := aForm width.\\\\n\\\\theight := aForm height.\\\\n\\\\taForm depth <= 8 \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[bitsPerChannel := aForm depth.\\\\n\\\\t\\\\t\\\\tcolorType := 3.\\\\n\\\\t\\\\t\\\\tbytesPerScanline := (width * aForm depth + 7) // 8]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[bitsPerChannel := 8.\\\\n\\\\t\\\\t\\\\tcolorType := 6.\\\\n\\\\t\\\\t\\\\tbytesPerScanline := width * 4].\\\\n\\\\tself writeFileSignature.\\\\n\\\\tcrcStream := WriteStream on: (ByteArray new: 1000).\\\\n\\\\tcrcStream resetToStart.\\\\n\\\\tself writeIHDRChunkOn: crcStream.\\\\n\\\\tself writeChunk: crcStream.\\\\n\\\\tform depth <= 8 \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[crcStream resetToStart.\\\\n\\\\t\\\\t\\\\tself writePLTEChunkOn: crcStream.\\\\n\\\\t\\\\t\\\\tself writeChunk: crcStream.\\\\n\\\\t\\\\t\\\\tform isColorForm \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[crcStream resetToStart.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself writeTRNSChunkOn: crcStream.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself writeChunk: crcStream]].\\\\n\\\\tform depth = 16 \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[crcStream resetToStart.\\\\n\\\\t\\\\t\\\\tself writeSBITChunkOn: crcStream.\\\\n\\\\t\\\\t\\\\tself writeChunk: crcStream].\\\\n\\\\tcrcStream resetToStart.\\\\n\\\\tself writeIDATChunkOn: crcStream.\\\\n\\\\tself writeChunk: crcStream.\\\\n\\\\tcrcStream resetToStart.\\\\n\\\\tself writeIENDChunkOn: crcStream.\\\\n\\\\tself writeChunk: crcStream! !\\\\n\\\\n!PNGReadWriter methodsFor: 'writing' stamp: 'nk 2/17/2004 16:51'!\\\\nupdateCrc: oldCrc from: start to: stop in: aCollection\\\\n\\\\t^ZipWriteStream updateCrc: oldCrc from: start to: stop in: aCollection! !\\\\n\\\\n!PNGReadWriter methodsFor: 'writing' stamp: 'BG 3/16/2005 08:26'!\\\\nwriteChunk: crcStream\\\\n\\\\t| bytes length crc debug |\\\\n\\\\tdebug _ self debugging.\\\\n\\\\tbytes := crcStream originalContents.\\\\n\\\\tlength := crcStream position.\\\\n\\\\tcrc := self updateCrc: 16rFFFFFFFF from: 1 to: length in: bytes.\\\\n\\\\tcrc := crc bitXor: 16rFFFFFFFF.\\\\n\\\\tdebug ifTrue: [ Transcript cr;\\\\n\\\\t\\\\tprint: stream position; space;\\\\n\\\\t\\\\tnextPutAll: (bytes copyFrom: 1 to: 4) asString;\\\\n\\\\t\\\\tnextPutAll: ' len='; print: length;\\\\n\\\\t\\\\tnextPutAll: ' crc=0x'; nextPutAll: crc printStringHex  ].\\\\n\\\\tstream nextNumber: 4 put: length-4. \\\\\\\"exclude chunk name\\\\\\\"\\\\n\\\\tstream next: length putAll: bytes startingAt: 1.\\\\n\\\\tstream nextNumber: 4 put: crc.\\\\n\\\\tdebug ifTrue: [ Transcript nextPutAll: ' afterPos='; print: stream position ].\\\\n\\\\tcrcStream resetToStart.! !\\\\n\\\\n!PNGReadWriter methodsFor: 'writing' stamp: 'ar 12/12/2003 16:40'!\\\\nwriteFileSignature\\\\n\\\\tstream nextPutAll: #(16r89 16r50 16r4E  16r47 16r0D 16r0A 16r1A 16r0A) asByteArray! !\\\\n\\\\n!PNGReadWriter methodsFor: 'writing' stamp: 'nk 2/17/2004 14:57'!\\\\nwriteIDATChunkOn: aStream\\\\n\\\\t\\\\\\\"Write the IDAT chunk\\\\\\\"\\\\n\\\\t| z |\\\\n\\\\taStream nextPutAll: 'IDAT' asByteArray.\\\\n\\\\tz _ ZLibWriteStream on: aStream.\\\\n\\\\tform depth <= 8 \\\\n\\\\t\\\\tifTrue:[self writeType3DataOn: z]\\\\n\\\\t\\\\tifFalse:[ self writeType6DataOn: z].\\\\n\\\\tself debugging ifTrue: [\\\\n\\\\t\\\\tTranscript cr;\\\\n\\\\t\\\\t\\\\tnextPutAll: 'compressed size=';\\\\n\\\\t\\\\t\\\\tprint: aStream position;\\\\n\\\\t\\\\t\\\\tnextPutAll: ' uncompressed size=';\\\\n\\\\t\\\\t\\\\tprint: z position  ]\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'writing' stamp: 'ar 12/12/2003 17:08'!\\\\nwriteIENDChunkOn: aStream\\\\n\\\\t\\\\\\\"Write the IEND chunk\\\\\\\"\\\\n\\\\taStream nextPutAll: 'IEND' asByteArray.! !\\\\n\\\\n!PNGReadWriter methodsFor: 'writing' stamp: 'ar 12/12/2003 17:21'!\\\\nwriteIHDRChunkOn: aStream\\\\n\\\\t\\\\\\\"Write the IHDR chunk\\\\\\\"\\\\n\\\\taStream nextPutAll: 'IHDR' asByteArray.\\\\n\\\\taStream nextInt32Put: width.\\\\n\\\\taStream nextInt32Put: height.\\\\n\\\\taStream nextNumber: 1 put: bitsPerChannel.\\\\n\\\\taStream nextNumber: 1 put: colorType.\\\\n\\\\taStream nextNumber: 1 put: 0. \\\\\\\"compression\\\\\\\"\\\\n\\\\taStream nextNumber: 1 put: 0. \\\\\\\"filter method\\\\\\\"\\\\n\\\\taStream nextNumber: 1 put: 0. \\\\\\\"interlace method\\\\\\\"\\\\n! !\\\\n\\\\n!PNGReadWriter methodsFor: 'writing' stamp: 'nk 4/17/2004 19:44'!\\\\nwritePLTEChunkOn: aStream\\\\n\\\\t\\\\\\\"Write the PLTE chunk\\\\\\\"\\\\n\\\\t| r g b colors |\\\\n\\\\taStream nextPutAll: 'PLTE' asByteArray.\\\\n\\\\t(form isColorForm) \\\\n\\\\t\\\\tifTrue:[colors := form colors]\\\\n\\\\t\\\\tifFalse:[colors := Color indexedColors copyFrom: 1 to: (1 bitShift: form depth)].\\\\n\\\\tcolors do:[:aColor|\\\\n\\\\t\\\\tr := (aColor red * 255) truncated.\\\\n\\\\t\\\\tg := (aColor green * 255) truncated.\\\\n\\\\t\\\\tb := (aColor blue * 255) truncated.\\\\n\\\\t\\\\taStream nextPut: r; nextPut: g; nextPut: b.\\\\n\\\\t].! !\\\\n\\\\n!PNGReadWriter methodsFor: 'writing' stamp: 'ar 12/12/2003 18:29'!\\\\nwriteSBITChunkOn: aStream\\\\n\\\\t\\\\\\\"Write the IDAT chunk\\\\\\\"\\\\n\\\\taStream nextPutAll: 'sBIT' asByteArray.\\\\n\\\\tform depth = 16 ifFalse:[self error: 'Unimplemented feature'].\\\\n\\\\taStream nextPut: 5.\\\\n\\\\taStream nextPut: 5.\\\\n\\\\taStream nextPut: 5.\\\\n\\\\taStream nextPut: 1.! !\\\\n\\\\n!PNGReadWriter methodsFor: 'writing' stamp: 'ar 12/12/2003 17:34'!\\\\nwriteTRNSChunkOn: aStream\\\\n\\\\t\\\\\\\"Write out tRNS chunk\\\\\\\"\\\\n\\\\taStream nextPutAll: 'tRNS' asByteArray.\\\\n\\\\tform colors do:[:aColor|\\\\n\\\\t\\\\taStream nextPut: (aColor alpha * 255) truncated.\\\\n\\\\t].! !\\\\n\\\\n!PNGReadWriter methodsFor: 'writing' stamp: 'ar 1/1/1970 20:58'!\\\\nwriteType3DataOn: zStream\\\\n\\\\t\\\\\\\"Write color indexed data.\\\\\\\"\\\\n\\\\t| scanline hack hackBlt swizzleBlt swizzleHack hackDepth |\\\\n\\\\tscanline := ByteArray new: bytesPerScanline + 3 // 4 * 4.\\\\n\\\\thackDepth := bigEndian ifTrue:[form depth] ifFalse:[form depth negated].\\\\n\\\\thack := Form extent: width@1 depth: hackDepth bits: scanline.\\\\n\\\\thackBlt := BitBlt toForm: hack.\\\\n\\\\thackBlt sourceForm: form.\\\\n\\\\thackBlt combinationRule: Form over.\\\\n\\\\thackBlt destOrigin: 0@0.\\\\n\\\\thackBlt width: width; height: 1.\\\\n\\\\t(form depth < 8 and:[bigEndian not]) ifTrue:[\\\\n\\\\t\\\\tswizzleHack := Form new hackBits: scanline.\\\\n\\\\t\\\\tswizzleBlt := BitBlt toForm: swizzleHack.\\\\n\\\\t\\\\tswizzleBlt sourceForm: swizzleHack.\\\\n\\\\t\\\\tswizzleBlt combinationRule: Form over.\\\\n\\\\t\\\\tswizzleBlt colorMap: (StandardSwizzleMaps at: form depth).\\\\n\\\\t].\\\\n\\\\t0 to: height-1 do:[:i|\\\\n\\\\t\\\\thackBlt sourceOrigin: 0@i; copyBits.\\\\n\\\\t\\\\tswizzleBlt ifNotNil:[swizzleBlt copyBits].\\\\n\\\\t\\\\tzStream nextPut: 0. \\\\\\\"filterType\\\\\\\"\\\\n\\\\t\\\\tzStream next: bytesPerScanline putAll: scanline startingAt: 1.\\\\n\\\\t].\\\\n\\\\tzStream close.! !\\\\n\\\\n!PNGReadWriter methodsFor: 'writing' stamp: 'ar 2/19/2004 00:10'!\\\\nwriteType6DataOn: zStream\\\\n\\\\t\\\\\\\"Write RGBA data.\\\\\\\"\\\\n\\\\t| scanline hack hackBlt cm miscBlt |\\\\n\\\\tscanline := ByteArray new: bytesPerScanline.\\\\n\\\\thack := Form extent: width@1 depth: 32 bits: scanline.\\\\n\\\\tform depth = 16 ifTrue:[\\\\n\\\\t\\\\t\\\\\\\"Expand 16 -> 32\\\\\\\"\\\\n\\\\t\\\\tmiscBlt := BitBlt toForm: hack.\\\\n\\\\t\\\\tmiscBlt sourceForm: form.\\\\n\\\\t\\\\tmiscBlt combinationRule: Form over.\\\\n\\\\t\\\\tmiscBlt destOrigin: 0@0.\\\\n\\\\t\\\\tmiscBlt width: width; height: 1.\\\\n\\\\t].\\\\n\\\\thackBlt := BitBlt toForm: hack.\\\\n\\\\thackBlt sourceForm: (miscBlt ifNil:[form] ifNotNil:[hack]).\\\\n\\\\thackBlt combinationRule: Form over.\\\\n\\\\thackBlt destOrigin: 0@0.\\\\n\\\\thackBlt width: width; height: 1.\\\\n\\\\tbigEndian ifTrue:[\\\\n\\\\t\\\\tcm := ColorMap \\\\n\\\\t\\\\t\\\\tshifts: #(8 8 8 -24) \\\\n\\\\t\\\\t\\\\tmasks: #(16rFF0000 16rFF00 16rFF 16rFF000000).\\\\n\\\\t] ifFalse:[\\\\n\\\\t\\\\tcm := ColorMap \\\\n\\\\t\\\\t\\\\tshifts: #(-16 0 16 0) \\\\n\\\\t\\\\t\\\\tmasks: #(16rFF0000 16rFF00 16rFF 16rFF000000).\\\\n\\\\t].\\\\n\\\\thackBlt colorMap: cm.\\\\n\\\\t0 to: height-1 do:[:i|\\\\n\\\\t\\\\tmiscBlt ifNil:[\\\\n\\\\t\\\\t\\\\thackBlt sourceOrigin: 0@i; copyBits.\\\\n\\\\t\\\\t] ifNotNil:[\\\\n\\\\t\\\\t\\\\tmiscBlt sourceOrigin: 0@i; copyBits.\\\\n\\\\t\\\\t\\\\thack fixAlpha.\\\\n\\\\t\\\\t\\\\thackBlt copyBits.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tzStream nextPut: 0. \\\\\\\"filterType\\\\\\\"\\\\n\\\\t\\\\tzStream nextPutAll: scanline.\\\\n\\\\t].\\\\n\\\\tzStream close.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPNGReadWriter class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PNGReadWriter class methodsFor: 'as yet unclassified' stamp: 'ar 2/11/2004 00:54'!\\\\ncomputeSwizzleMapForDepth: depth\\\\n\\\\t\\\\\\\"Answer a map that maps pixels in a word to their opposite location. Used for 'middle-endian' forms where the byte-order is different from the bit order (good joke, eh?).\\\\\\\"\\\\n\\\\t| map swizzled |\\\\n\\\\tmap := Bitmap new: 256.\\\\n\\\\tdepth = 4 ifTrue:[\\\\n\\\\t\\\\t0 to: 255 do:[:pix|\\\\n\\\\t\\\\t\\\\tswizzled := 0.\\\\n\\\\t\\\\t\\\\tswizzled := swizzled bitOr: (((pix bitShift: 0) bitAnd: 15) bitShift: 4).\\\\n\\\\t\\\\t\\\\tswizzled := swizzled bitOr: (((pix bitShift: -4) bitAnd: 15) bitShift: 0).\\\\n\\\\t\\\\t\\\\tmap at: pix+1 put: swizzled.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\t^ColorMap colors: map\\\\n\\\\t].\\\\n\\\\n\\\\tdepth = 2 ifTrue:[\\\\n\\\\t\\\\t0 to: 255 do:[:pix|\\\\n\\\\t\\\\t\\\\tswizzled := 0.\\\\n\\\\t\\\\t\\\\tswizzled := swizzled bitOr: (((pix bitShift: 0) bitAnd: 3) bitShift: 6).\\\\n\\\\t\\\\t\\\\tswizzled := swizzled bitOr: (((pix bitShift: -2) bitAnd: 3) bitShift: 4).\\\\n\\\\t\\\\t\\\\tswizzled := swizzled bitOr: (((pix bitShift: -4) bitAnd: 3) bitShift: 2).\\\\n\\\\t\\\\t\\\\tswizzled := swizzled bitOr: (((pix bitShift: -6) bitAnd: 3) bitShift: 0).\\\\n\\\\t\\\\t\\\\tmap at: pix+1 put: swizzled.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\t^ColorMap colors: map\\\\n\\\\t].\\\\n\\\\n\\\\tdepth = 1 ifTrue:[\\\\n\\\\t\\\\t0 to: 255 do:[:pix|\\\\n\\\\t\\\\t\\\\tswizzled := 0.\\\\n\\\\t\\\\t\\\\tswizzled := swizzled bitOr: (((pix bitShift: 0) bitAnd: 1) bitShift: 7).\\\\n\\\\t\\\\t\\\\tswizzled := swizzled bitOr: (((pix bitShift: -1) bitAnd: 1) bitShift: 6).\\\\n\\\\t\\\\t\\\\tswizzled := swizzled bitOr: (((pix bitShift: -2) bitAnd: 1) bitShift: 5).\\\\n\\\\t\\\\t\\\\tswizzled := swizzled bitOr: (((pix bitShift: -3) bitAnd: 1) bitShift: 4).\\\\n\\\\t\\\\t\\\\tswizzled := swizzled bitOr: (((pix bitShift: -4) bitAnd: 1) bitShift: 3).\\\\n\\\\t\\\\t\\\\tswizzled := swizzled bitOr: (((pix bitShift: -5) bitAnd: 1) bitShift: 2).\\\\n\\\\t\\\\t\\\\tswizzled := swizzled bitOr: (((pix bitShift: -6) bitAnd: 1) bitShift: 1).\\\\n\\\\t\\\\t\\\\tswizzled := swizzled bitOr: (((pix bitShift: -7) bitAnd: 1) bitShift: 0).\\\\n\\\\t\\\\t\\\\tmap at: pix+1 put: swizzled.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\t^ColorMap colors: map\\\\n\\\\t].\\\\n\\\\tself error: 'Unrecognized depth'! !\\\\n\\\\n!PNGReadWriter class methodsFor: 'as yet unclassified' stamp: 'RAA 11/7/2000 09:22'!\\\\ncreateAFormFrom: data\\\\n\\\\n\\\\t| error f |\\\\n\\\\n\\\\terror _ ''.\\\\n\\\\tf _ [\\\\n\\\\t\\\\tself formFromStream: (RWBinaryOrTextStream with: data)\\\\n\\\\t] ifError: [ :a :b |\\\\n\\\\t\\\\terror _ a printString,'  ',b printString.\\\\n\\\\t\\\\t(StringMorph contents: error) color: Color red; imageForm\\\\n\\\\t].\\\\n\\\\t^{f. error}! !\\\\n\\\\n!PNGReadWriter class methodsFor: 'as yet unclassified' stamp: 'RAA 11/7/2000 09:20'!\\\\ndebugging: aBoolean\\\\n\\\\n\\\\tDebugging _ aBoolean! !\\\\n\\\\n!PNGReadWriter class methodsFor: 'as yet unclassified' stamp: 'ar 2/11/2004 00:55'!\\\\ninitialize\\\\n\\\\t\\\\\\\"\\\\n\\\\tPNGReadWriter initialize\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\tBPP _ {\\\\t#(1 2 4 8 16).\\\\n\\\\t\\\\t\\\\t#(0 0 0 0 0).\\\\n\\\\t\\\\t\\\\t#(0 0 0 24 48).\\\\n\\\\t\\\\t\\\\t#(1 2 4 8 0).\\\\n\\\\t\\\\t\\\\t#(0 0 0 16 32).\\\\n\\\\t\\\\t\\\\t#(0 0 0 0 0).\\\\n\\\\t\\\\t\\\\t#(0 0 0 32 64).\\\\n\\\\t\\\\t\\\\t#(0 0 0 0 0) }.\\\\n\\\\n\\\\tBlockHeight _ #(8 8 4 4 2 2 1).\\\\n\\\\tBlockWidth _ #(8 4 4 2 2 1 1).\\\\n\\\\n\\\\tStandardColors := Color indexedColors collect:[:aColor|\\\\n\\\\t\\\\tColor \\\\n\\\\t\\\\t\\\\tr: (aColor red * 255) truncated / 255\\\\n\\\\t\\\\t\\\\tg: (aColor green * 255) truncated / 255\\\\n\\\\t\\\\t\\\\tb: (aColor blue * 255) truncated / 255.\\\\n\\\\t].\\\\n\\\\n\\\\tStandardSwizzleMaps := Array new: 4.\\\\n\\\\t#(1 2 4) do:[:i| StandardSwizzleMaps at: i put: (self computeSwizzleMapForDepth: i)].! !\\\\n\\\\n!PNGReadWriter class methodsFor: 'as yet unclassified' stamp: 'RAA 11/7/2000 09:15'!\\\\ninsertMorph: aMorph named: aString into: aBook\\\\n\\\\n\\\\t| newPage |\\\\n\\\\n\\\\taBook ifNil: [^self].\\\\n\\\\tnewPage _ aBook insertPageLabel: aString morphs: {aMorph}.\\\\n\\\\tnewPage color: Color lightYellow.\\\\n\\\\tnewPage extent: (\\\\n\\\\t\\\\tnewPage submorphs inject: 10@10 into: [ :ex :m |\\\\n\\\\t\\\\t\\\\tm left: 10.\\\\n\\\\t\\\\t\\\\tex max: m width @ m bottom\\\\n\\\\t\\\\t]\\\\n\\\\t) + (20@20).\\\\n! !\\\\n\\\\n!PNGReadWriter class methodsFor: 'as yet unclassified' stamp: 'RAA 12/10/2000 10:11'!\\\\ntest1\\\\n\\\\\\\"PNGReadWriter test1\\\\\\\"\\\\n\\\\t| data t error d0 d1 f fileInfo book result d2 |\\\\n\\\\n\\\\tDebugging _ true.\\\\n\\\\t1 = 1 ifTrue: [\\\\n\\\\t\\\\tbook _ BookMorph new.\\\\n\\\\t\\\\tbook setProperty: #transitionSpec toValue: {'silence'. #none. #none}.\\\\n\\\\t].\\\\n\\\\td0 _ FileDirectory default.\\\\n\\\\td1 _ d0 directoryNamed: 'PngSuite Folder'.\\\\n\\\\td2 _ d0 directoryNamed: 'BIG PNG'.\\\\n\\\\t{d0. d1. d2}.\\\\t\\\\t\\\\\\\"keep compiler quiet\\\\\\\"\\\\n\\\\\\\"==\\\\ncitrus_none_sub.png\\\\ncitrus_adm7_adap.png\\\\ncitrus_adm7_aver.png\\\\ncitrus_adm7_non.png\\\\ncitrus_adm7_paeth.png\\\\npngs-img-ie5mac.png\\\\n==\\\\\\\"\\\\n\\\\tfileInfo _ {\\\\n\\\\t\\\\td2. {'citrus_adm7_adap.png'}.\\\\n\\\\t\\\\t\\\\\\\"d1. d1 fileNames.\\\\\\\"\\\\n\\\\t}.\\\\n\\\\tfileInfo pairsDo: [ :dir :fileNames |\\\\n\\\\t\\\\tfileNames do: [ :each |\\\\n\\\\t\\\\t\\\\tTranscript cr; show: each.\\\\n\\\\t\\\\t\\\\tdata _ (dir fileNamed: each) contentsOfEntireFile.\\\\n\\\\t\\\\t\\\\terror _ ''.\\\\n\\\\t\\\\t\\\\tMessageTally spyOn: [\\\\n\\\\t\\\\t\\\\t\\\\tt _ [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tresult _ self createAFormFrom: data.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tf_ result first.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\terror _ result second.\\\\n\\\\t\\\\t\\\\t\\\\t] timeToRun.].\\\\n\\\\t\\\\t\\\\tself insertMorph: f asMorph named: each into: book.\\\\n\\\\t\\\\t\\\\tTranscript show: each,'  ',data size printString,' = ',t printString,' ms',error; cr.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\tbook ifNotNil: [book openInWorld].\\\\n\\\\tDebugging _ false.! !\\\\n\\\\n\\\\n!PNGReadWriter class methodsFor: 'image reading/writing' stamp: 'nk 7/16/2003 17:57'!\\\\ntypicalFileExtensions\\\\n\\\\t\\\\\\\"Answer a collection of file extensions (lowercase) which files that I can read might commonly have\\\\\\\"\\\\n\\\\t^#('png')! !\\\\nTestCase subclass: #PNGReadWriterTest\\\\n\\\\tinstanceVariableNames: 'fileName'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'GraphicsTests-Files'!\\\\n\\\\n!PNGReadWriterTest methodsFor: 'helpers' stamp: 'ar 2/11/2004 00:42'!\\\\ndrawStuffOn: aForm\\\\n\\\\t\\\\\\\"Draw stuff on aForm. Avoid any symmetry.\\\\\\\"\\\\n\\\\t| canvas |\\\\n\\\\tcanvas := FormCanvas on: aForm.\\\\n\\\\tcanvas frameAndFillRectangle: (1@1 corner: aForm extent - 15) fillColor: Color red borderWidth: 3 borderColor: Color green.\\\\n\\\\tcanvas fillOval: (aForm boundingBox topRight - (15@-5) extent: 20@20) color: Color blue borderWidth: 1 borderColor: Color white.\\\\n\\\\t^aForm\\\\n\\\\t\\\\\\\"(PNGReadWriterTest new drawStuffOn: (Form extent: 32@32 depth: 16)) display\\\\\\\"! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'helpers' stamp: 'ar 2/11/2004 00:42'!\\\\ndrawTransparentStuffOn: aForm\\\\n\\\\t\\\\\\\"Draw stuff on aForm. Avoid any symmetry.\\\\\\\"\\\\n\\\\t| canvas |\\\\n\\\\tcanvas := FormCanvas on: aForm.\\\\n\\\\tcanvas frameAndFillRectangle: (1@1 corner: aForm extent - 15) fillColor: (Color red alpha: 0.25) borderWidth: 3 borderColor: (Color green alpha: 0.5).\\\\n\\\\tcanvas fillOval: (aForm boundingBox topRight - (15@-5) extent: 20@20) color: (Color white alpha: 0.75) borderWidth: 1 borderColor: Color blue.\\\\n\\\\t^aForm\\\\n\\\\t\\\\\\\"(PNGReadWriterTest new drawStuffOn: (Form extent: 32@32 depth: 16)) display\\\\\\\"! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'helpers' stamp: 'nk 4/17/2004 19:45'!\\\\nencodeAndDecode: original\\\\n\\\\t\\\\\\\"Make sure that the given form is encoded and decoded correctly\\\\\\\"\\\\n\\\\t| stream bytes decoded maxErr |\\\\n\\\\t\\\\\\\"encode\\\\\\\"\\\\n\\\\tstream := ByteArray new writeStream.\\\\n\\\\t(PNGReadWriter on: stream) nextPutImage: original; close.\\\\n\\\\tbytes := stream contents.\\\\n\\\\n\\\\tself writeEncoded: bytes.\\\\n\\\\n\\\\t\\\\\\\"decode\\\\\\\"\\\\n\\\\tstream := self readEncoded: bytes.\\\\n\\\\tdecoded := (PNGReadWriter new on: stream) nextImage.\\\\n\\\\tdecoded display.\\\\n\\\\n\\\\t\\\\\\\"compare\\\\\\\"\\\\n\\\\tself assert: original width = decoded width.\\\\n\\\\tself assert: original height = decoded height.\\\\n\\\\tself assert: original depth = decoded depth.\\\\n\\\\tself assert: original bits = decoded bits.\\\\n\\\\tself assert: original class == decoded class.\\\\n\\\\t(original isColorForm) ifTrue:[\\\\n\\\\t\\\\toriginal colors with: decoded colors do:[:c1 :c2|\\\\n\\\\t\\\\t\\\\t\\\\\\\"we must round here due to encoding errors\\\\\\\"\\\\n\\\\t\\\\t\\\\tmaxErr := 1. \\\\\\\"max. error for 8bit rgb component\\\\\\\"\\\\n\\\\t\\\\t\\\\tself assert: ((c1 red * 255) truncated - (c2 red * 255) truncated) abs <= maxErr.\\\\n\\\\t\\\\t\\\\tself assert: ((c1 green * 255) truncated - (c2 green * 255) truncated) abs <= maxErr.\\\\n\\\\t\\\\t\\\\tself assert: ((c1 blue * 255) truncated - (c2 blue * 255) truncated) abs <= maxErr.\\\\n\\\\t\\\\t\\\\tself assert: ((c1 alpha * 255) truncated - (c2 alpha * 255) truncated) abs <= maxErr.\\\\n\\\\t\\\\t].\\\\n\\\\t].! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'helpers' stamp: 'ar 2/12/2004 22:49'!\\\\nencodeAndDecodeAlpha: original\\\\n\\\\tfileName := 'testAlpha', original depth printString,'.png'.\\\\n\\\\tself encodeAndDecode: original.! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'helpers' stamp: 'ar 2/18/2004 23:49'!\\\\nencodeAndDecodeColor: aColor depth: aDepth\\\\n\\\\t| aForm |\\\\n\\\\tfileName := 'testColor', aColor name, aDepth printString,'.png'.\\\\n\\\\taForm := Form extent: 32@32 depth: aDepth.\\\\n\\\\taForm fillColor: aColor.\\\\n\\\\tself encodeAndDecode: aForm.\\\\n! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'helpers' stamp: 'nk 2/17/2004 11:02'!\\\\nencodeAndDecodeDisplay: depth\\\\n\\\\t| form |\\\\n\\\\tfileName := 'testDisplay', depth printString,'.png'.\\\\n\\\\tform := Form extent: (Display extent min: 560@560) depth: depth.\\\\n\\\\tSmalltalk isMorphic \\\\n\\\\t\\\\tifTrue:[World fullDrawOn: form getCanvas]\\\\n\\\\t\\\\tifFalse:[Display displayOn: form].\\\\n\\\\tself encodeAndDecode: form.! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'helpers' stamp: 'ar 2/12/2004 22:50'!\\\\nencodeAndDecodeForm: original\\\\n\\\\tfileName := 'testForm', original depth printString,'.png'.\\\\n\\\\tself encodeAndDecode: original.! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'helpers' stamp: 'nk 4/17/2004 19:45'!\\\\nencodeAndDecodeReverse: original\\\\n\\\\t\\\\\\\"Make sure that the given form is encoded and decoded correctly\\\\\\\"\\\\n\\\\t| stream bytes decoded maxErr reversed |\\\\n\\\\tfileName := 'testReverse', original depth printString,'.png'.\\\\n\\\\tself assert: original class == Form. \\\\\\\"won't work with ColorForm\\\\\\\"\\\\n\\\\t\\\\\\\"Switch pixel order\\\\\\\"\\\\n\\\\treversed := Form extent: original extent depth: original depth negated.\\\\n\\\\toriginal displayOn: reversed.\\\\n\\\\tself assert: original width = reversed width.\\\\n\\\\tself assert: original height = reversed height.\\\\n\\\\tself assert: original depth = reversed depth.\\\\n\\\\tself deny: original nativeDepth = reversed nativeDepth.\\\\n\\\\toriginal depth = 32\\\\n\\\\t\\\\tifTrue:[self assert: original bits = reversed bits]\\\\n\\\\t\\\\tifFalse:[self deny: original bits = reversed bits].\\\\n\\\\n\\\\t\\\\\\\"encode\\\\\\\"\\\\n\\\\tstream := ByteArray new writeStream.\\\\n\\\\t(PNGReadWriter on: stream) nextPutImage: reversed; close.\\\\n\\\\tbytes := stream contents.\\\\n\\\\tself writeEncoded: bytes.\\\\n\\\\n\\\\t\\\\\\\"decode\\\\\\\"\\\\n\\\\tstream := bytes readStream.\\\\n\\\\tdecoded := (PNGReadWriter new on: stream) nextImage.\\\\n\\\\tdecoded display.\\\\n\\\\n\\\\t\\\\\\\"compare\\\\\\\"\\\\n\\\\tself assert: original width = decoded width.\\\\n\\\\tself assert: original height = decoded height.\\\\n\\\\tself assert: original depth = decoded depth.\\\\n\\\\tself assert: original bits = decoded bits.\\\\n\\\\tself assert: original class == decoded class.\\\\n\\\\t(original isColorForm) ifTrue:[\\\\n\\\\t\\\\toriginal colors with: decoded colors do:[:c1 :c2|\\\\n\\\\t\\\\t\\\\t\\\\\\\"we must round here due to encoding errors\\\\\\\"\\\\n\\\\t\\\\t\\\\tmaxErr := 1. \\\\\\\"max. error for 8bit rgb component\\\\\\\"\\\\n\\\\t\\\\t\\\\tself assert: ((c1 red * 255) truncated - (c2 red * 255) truncated) abs <= maxErr.\\\\n\\\\t\\\\t\\\\tself assert: ((c1 green * 255) truncated - (c2 green * 255) truncated) abs <= maxErr.\\\\n\\\\t\\\\t\\\\tself assert: ((c1 blue * 255) truncated - (c2 blue * 255) truncated) abs <= maxErr.\\\\n\\\\t\\\\t\\\\tself assert: ((c1 alpha * 255) truncated - (c2 alpha * 255) truncated) abs <= maxErr.\\\\n\\\\t\\\\t].\\\\n\\\\t].! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'helpers' stamp: 'nk 2/17/2004 18:18'!\\\\nencodeAndDecodeStream: file\\\\n\\\\t| aForm |\\\\n\\\\tfile reset.\\\\n\\\\t(PNGReadWriter new on: file) understandsImageFormat ifFalse:[^self error: 'don''t understand format!!' ].\\\\n\\\\tfile reset.\\\\n\\\\taForm := (PNGReadWriter new on: file) nextImage.\\\\n\\\\taForm ifNil:[^self error: 'nil form' ].\\\\n\\\\taForm display.\\\\n\\\\tself encodeAndDecode: aForm.\\\\n! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'helpers' stamp: 'ar 2/12/2004 22:36'!\\\\nencodeAndDecodeWithColors: aColorForm\\\\n\\\\t\\\\\\\"Screw around with aColorForm colors\\\\\\\"\\\\n\\\\t| colors nColors indexedColors max myRandom |\\\\n\\\\tfileName := 'testColors', aColorForm depth printString,'.png'.\\\\n\\\\tindexedColors := Color indexedColors.\\\\n\\\\tnColors := 1 bitShift: aColorForm depth.\\\\n\\\\tcolors := WriteStream on: Array new.\\\\n\\\\n\\\\t\\\\\\\"Make first half translucent\\\\\\\"\\\\n\\\\tmax := nColors // 2.\\\\n\\\\t1 to: max do:[:i|\\\\n\\\\t\\\\tcolors nextPut: ((indexedColors at: i) alpha: i / max asFloat).\\\\n\\\\t].\\\\n\\\\n\\\\t\\\\\\\"Make random choices for second half\\\\\\\"\\\\n\\\\tmyRandom := Random seed: 42315.\\\\n\\\\tmax to: nColors do:[:i|\\\\n\\\\t\\\\tcolors nextPut: (indexedColors atRandom: myRandom).\\\\n\\\\t].\\\\n! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'helpers' stamp: 'ar 2/29/2004 03:55'!\\\\nencodeAndDecodeWithError: aStream\\\\n\\\\tself should:[self encodeAndDecodeStream: aStream] raise: Error! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'helpers' stamp: 'nk 2/17/2004 11:10'!\\\\nreadEncoded: bytes\\\\n\\\\t\\\\\\\"Answer a ReadStream on the file named by fileName, if possible; else a ReadStream on bytes\\\\\\\"\\\\n\\\\n\\\\tfileName ifNil:[^ bytes readStream ].\\\\n\\\\t^(FileStream oldFileOrNoneNamed: fileName) ifNil: [ \\\\n\\\\t\\\\tTranscript nextPutAll: 'can''t open ', fileName; cr.\\\\n\\\\t\\\\tbytes readStream ].\\\\n! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'helpers' stamp: 'ar 2/12/2004 22:45'!\\\\nsetUp\\\\n\\\\tfileName := nil.! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'helpers' stamp: 'nk 2/17/2004 11:29'!\\\\ntearDown\\\\n\\\\tWorld changed.! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'helpers' stamp: 'ar 2/12/2004 22:51'!\\\\nwriteEncoded: bytes\\\\n\\\\t| file |\\\\n\\\\tfileName ifNil:[^self].\\\\n\\\\tfalse ifTrue:[^self].\\\\n\\\\tfile := FileStream forceNewFileNamed: fileName.\\\\n\\\\t[file nextPutAll: bytes] ensure:[file close].! !\\\\n\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/12/2004 22:50'!\\\\ntest16Bit\\\\n\\\\tself encodeAndDecodeForm: (self drawStuffOn: (Form extent: 33@33 depth: 16))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/11/2004 00:39'!\\\\ntest16BitDisplay\\\\n\\\\tself encodeAndDecodeDisplay: 16! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/11/2004 01:57'!\\\\ntest16BitReversed\\\\n\\\\tself encodeAndDecodeReverse: (self drawStuffOn: (Form extent: 33@33 depth: 16))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/12/2004 22:50'!\\\\ntest1Bit\\\\n\\\\tself encodeAndDecodeForm: (self drawStuffOn: (Form extent: 33@33 depth: 1))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/11/2004 00:43'!\\\\ntest1BitColors\\\\n\\\\tself encodeAndDecodeWithColors: (self drawStuffOn: (Form extent: 33@33 depth: 1))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/11/2004 00:39'!\\\\ntest1BitDisplay\\\\n\\\\tself encodeAndDecodeDisplay: 1! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/11/2004 01:56'!\\\\ntest1BitReversed\\\\n\\\\tself encodeAndDecodeReverse: (self drawStuffOn: (Form extent: 33@33 depth: 1))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/12/2004 22:50'!\\\\ntest2Bit\\\\n\\\\tself encodeAndDecodeForm: (self drawStuffOn: (Form extent: 33@33 depth: 2))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/11/2004 00:43'!\\\\ntest2BitColors\\\\n\\\\tself encodeAndDecodeWithColors: (self drawStuffOn: (Form extent: 33@33 depth: 2))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/11/2004 00:39'!\\\\ntest2BitDisplay\\\\n\\\\tself encodeAndDecodeDisplay: 2! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/11/2004 01:56'!\\\\ntest2BitReversed\\\\n\\\\tself encodeAndDecodeReverse: (self drawStuffOn: (Form extent: 33@33 depth: 2))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/12/2004 22:50'!\\\\ntest32Bit\\\\n\\\\tself encodeAndDecodeForm: (self drawStuffOn: (Form extent: 33@33 depth: 32))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/11/2004 00:39'!\\\\ntest32BitDisplay\\\\n\\\\tself encodeAndDecodeDisplay: 32! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/11/2004 01:57'!\\\\ntest32BitReversed\\\\n\\\\tself encodeAndDecodeReverse: (self drawStuffOn: (Form extent: 33@33 depth: 32))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/12/2004 22:50'!\\\\ntest4Bit\\\\n\\\\tself encodeAndDecodeForm: (self drawStuffOn: (Form extent: 33@33 depth: 4))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/11/2004 00:44'!\\\\ntest4BitColors\\\\n\\\\tself encodeAndDecodeWithColors: (self drawStuffOn: (Form extent: 33@33 depth: 4))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/11/2004 00:39'!\\\\ntest4BitDisplay\\\\n\\\\tself encodeAndDecodeDisplay: 4! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/11/2004 01:56'!\\\\ntest4BitReversed\\\\n\\\\tself encodeAndDecodeReverse: (self drawStuffOn: (Form extent: 33@33 depth: 4))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/12/2004 22:50'!\\\\ntest8Bit\\\\n\\\\tself encodeAndDecodeForm: (self drawStuffOn: (Form extent: 33@33 depth: 8))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/11/2004 00:44'!\\\\ntest8BitColors\\\\n\\\\tself encodeAndDecodeWithColors: (self drawStuffOn: (Form extent: 33@33 depth: 8))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/11/2004 00:39'!\\\\ntest8BitDisplay\\\\n\\\\tself encodeAndDecodeDisplay: 8! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/11/2004 01:57'!\\\\ntest8BitReversed\\\\n\\\\tself encodeAndDecodeReverse: (self drawStuffOn: (Form extent: 33@33 depth: 8))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/12/2004 22:49'!\\\\ntestAlphaCoding\\\\n\\\\tself encodeAndDecodeAlpha: (self drawTransparentStuffOn: (Form extent: 33@33 depth: 32))! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - bits' stamp: 'ar 2/29/2004 03:55'!\\\\ntestPngSuite\\\\n\\\\t\\\\\\\"Requires the suite from \\\\n\\\\t\\\\tftp://swrinde.nde.swri.edu/pub/png/images/suite/PngSuite.zip\\\\n\\\\tto be present as PngSuite.zip\\\\\\\"\\\\n\\\\t| file zip entries |\\\\n\\\\t[file := FileStream readOnlyFileNamed: 'PngSuite.zip'] on: Error do:[:ex| ex return].\\\\n\\\\tfile ifNil:[^self].\\\\n\\\\t[zip := ZipArchive new readFrom: file.\\\\n\\\\tentries := zip members select:[:mbr| mbr fileName asLowercase endsWith: '.png'].\\\\n\\\\tentries do:[:mbr| \\\\n\\\\t\\\\t(mbr fileName asLowercase first = $x)\\\\n\\\\t\\\\t\\\\tifTrue: [self encodeAndDecodeWithError: mbr contentStream ]\\\\n\\\\t\\\\t\\\\tifFalse: [self encodeAndDecodeStream: mbr contentStream ] ].\\\\n\\\\t] ensure:[file close].! !\\\\n\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - colors' stamp: 'ar 2/18/2004 23:50'!\\\\ntestBlack16\\\\n\\\\tself encodeAndDecodeColor: Color blue depth: 16! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - colors' stamp: 'ar 2/18/2004 23:50'!\\\\ntestBlack32\\\\n\\\\tself encodeAndDecodeColor: Color blue depth: 32! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - colors' stamp: 'ar 2/18/2004 23:50'!\\\\ntestBlack8\\\\n\\\\tself encodeAndDecodeColor: Color blue depth: 8! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - colors' stamp: 'ar 2/18/2004 23:50'!\\\\ntestBlue16\\\\n\\\\tself encodeAndDecodeColor: Color blue depth: 16! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - colors' stamp: 'ar 2/18/2004 23:50'!\\\\ntestBlue32\\\\n\\\\tself encodeAndDecodeColor: Color blue depth: 32! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - colors' stamp: 'ar 2/18/2004 23:50'!\\\\ntestBlue8\\\\n\\\\tself encodeAndDecodeColor: Color blue depth: 8! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - colors' stamp: 'ar 2/18/2004 23:50'!\\\\ntestGreen16\\\\n\\\\tself encodeAndDecodeColor: Color green depth: 16! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - colors' stamp: 'ar 2/18/2004 23:50'!\\\\ntestGreen32\\\\n\\\\tself encodeAndDecodeColor: Color green depth: 32! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - colors' stamp: 'ar 2/18/2004 23:49'!\\\\ntestGreen8\\\\n\\\\tself encodeAndDecodeColor: Color green depth: 8! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - colors' stamp: 'ar 2/18/2004 23:49'!\\\\ntestRed16\\\\n\\\\tself encodeAndDecodeColor: Color red depth: 16! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - colors' stamp: 'ar 2/18/2004 23:48'!\\\\ntestRed32\\\\n\\\\tself encodeAndDecodeColor: Color red depth: 32! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - colors' stamp: 'ar 2/18/2004 23:49'!\\\\ntestRed8\\\\n\\\\tself encodeAndDecodeColor: Color red depth: 8! !\\\\n\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - decoding' stamp: 'ar 2/19/2004 00:25'!\\\\ncoloredFiles16\\\\n\\\\t\\\\\\\"Created by\\\\n\\\\t\\\\t{Color red. Color green. Color blue. Color black} collect:[:fillC|\\\\n\\\\t\\\\t\\\\t| ff bytes |\\\\n\\\\t\\\\t\\\\tff := Form extent: 32@32 depth: 16.\\\\n\\\\t\\\\t\\\\tff fillColor: fillC.\\\\n\\\\t\\\\t\\\\tbytes := WriteStream on: ByteArray new.\\\\n\\\\t\\\\t\\\\tPNGReadWriter putForm: ff onStream: bytes.\\\\n\\\\t\\\\t\\\\tfillC ->\\\\n\\\\t\\\\t\\\\t\\\\t(Base64MimeConverter mimeEncode: (bytes contents readStream)) contents\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\\\\"\\\\n\\\\t^{Color red-> \\\\n'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQFBQUBSsjp7wAAADZJ\\\\nREFUeF7lziEBAAAMAjD6J8b9MRAT80uT65Af8AN+wA/4AT/gB/yAH/ADfsAP+AE/4AfmgQdc\\\\nz9xqBS2pdAAAAABJRU5ErkJggg=='.\\\\n\\\\tColor green->\\\\n'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQFBQUBSsjp7wAAADVJ\\\\nREFUeF7lziEBAAAMAjD6J77jMRAT80sunfIDfsAP+AE/4Af8gB/wA37AD/gBP+AH/MA68HyT\\\\n3Gqf2I6NAAAAAElFTkSuQmCC'.\\\\n\\\\t\\\\tColor blue->\\\\n'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQFBQUBSsjp7wAAADVJ\\\\nREFUeF7lziEBAAAMAjD6J77jMRAT80ty3fIDfsAP+AE/4Af8gB/wA37AD/gBP+AH/MA48JxX\\\\n3GpYhihrAAAAAElFTkSuQmCC'.\\\\n\\\\tColor black->\\\\n'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQFBQUBSsjp7wAAADVJ\\\\nREFUeF7lziEBAAAMAjDk+xfmMRAT80ty3fIDfsAP+AE/4Af8gB/wA37AD/gBP+AH/MA48LbT\\\\nHD3MKH3GAAAAAElFTkSuQmCC'\\\\n}! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - decoding' stamp: 'ar 2/19/2004 00:24'!\\\\ncoloredFiles32\\\\n\\\\t\\\\\\\"Created by\\\\n\\\\t\\\\t{Color red. Color green. Color blue. Color black} collect:[:fillC|\\\\n\\\\t\\\\t\\\\t| ff bytes |\\\\n\\\\t\\\\t\\\\tff := Form extent: 32@32 depth: 32.\\\\n\\\\t\\\\t\\\\tff fillColor: fillC.\\\\n\\\\t\\\\t\\\\tbytes := WriteStream on: ByteArray new.\\\\n\\\\t\\\\t\\\\tPNGReadWriter putForm: ff onStream: bytes.\\\\n\\\\t\\\\t\\\\tfillC ->\\\\n\\\\t\\\\t\\\\t\\\\t(Base64MimeConverter mimeEncode: (bytes contents readStream)) contents\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\\\\"\\\\n\\\\t^{\\\\n\\\\t\\\\tColor red -> 'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAANUlEQVR4XuXOIQEAAAwEoe9f\\\\n+hZjAoFnbfVo+QE/4Af8gB/wA37AD/gBP+AH/IAf8AN+4DlwVA34ajP6EEoAAAAASUVORK5C\\\\nYII='.\\\\n\\\\t\\\\tColor green -> 'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAM0lEQVR4XuXOMQ0AAAACIPuX\\\\n1hgejAIkPfMDfsAP+AE/4Af8gB/wA37AD/gBP+AH/MA7MFfR+Grvv2BdAAAAAElFTkSuQmCC'.\\\\n\\\\n\\\\tColor blue->\\\\n'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAANElEQVR4XuXOIQEAAAACIP+f\\\\n1hkGAp0k7Zcf8AN+wA/4AT/gB/yAH/ADfsAP+AE/4AfOgQFblfhqnnPWHAAAAABJRU5ErkJg\\\\ngg=='.\\\\n\\\\t\\\\tColor black -> 'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAANUlEQVR4XuXOMQEAAAwCINc/\\\\ntIvhwcFPkuuWH/ADfsAP+AE/4Af8gB/wA37AD/gBP+AHxoEH95UAPU59TTMAAAAASUVORK5C\\\\nYII='\\\\n}! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - decoding' stamp: 'ar 2/19/2004 00:19'!\\\\ncoloredFiles8\\\\n\\\\t\\\\\\\"Created by\\\\n\\\\t\\\\t{Color red. Color green. Color blue. Color black} collect:[:fillC|\\\\n\\\\t\\\\t\\\\t| ff bytes |\\\\n\\\\t\\\\t\\\\tff := Form extent: 32@32 depth: 8.\\\\n\\\\t\\\\t\\\\tff fillColor: fillC.\\\\n\\\\t\\\\t\\\\tbytes := WriteStream on: ByteArray new.\\\\n\\\\t\\\\t\\\\tPNGReadWriter putForm: ff onStream: bytes.\\\\n\\\\t\\\\t\\\\tfillC ->\\\\n\\\\t\\\\t\\\\t\\\\t(Base64MimeConverter mimeEncode: (bytes contents readStream)) contents\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\\\\"\\\\n\\\\t^{Color red->\\\\n'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAADAFBMVEX///8AAAD///9/f3//\\\\nAAAA/wAAAP8A/////wD/AP8fHx8/Pz9fX1+fn5+/v7/f398HBwcPDw8XFxcnJycvLy83NzdH\\\\nR0dPT09XV1dnZ2dvb293d3eHh4ePj4+Xl5enp6evr6+3t7fHx8fPz8/X19fn5+fv7+/39/cA\\\\nAAAAMgAAZQAAmAAAywAA/wAAADIAMjIAZTIAmDIAyzIA/zIAAGUAMmUAZWUAmGUAy2UA/2UA\\\\nAJgAMpgAZZgAmJgAy5gA/5gAAMsAMssAZcsAmMsAy8sA/8sAAP8AMv8AZf8AmP8Ay/8A//8y\\\\nAAAyMgAyZQAymAAyywAy/wAyADIyMjIyZTIymDIyyzIy/zIyAGUyMmUyZWUymGUyy2Uy/2Uy\\\\nAJgyMpgyZZgymJgyy5gy/5gyAMsyMssyZcsymMsyy8sy/8syAP8yMv8yZf8ymP8yy/8y//9l\\\\nAABlMgBlZQBlmABlywBl/wBlADJlMjJlZTJlmDJlyzJl/zJlAGVlMmVlZWVlmGVly2Vl/2Vl\\\\nAJhlMphlZZhlmJhly5hl/5hlAMtlMstlZctlmMtly8tl/8tlAP9lMv9lZf9lmP9ly/9l//+Y\\\\nAACYMgCYZQCYmACYywCY/wCYADKYMjKYZTKYmDKYyzKY/zKYAGWYMmWYZWWYmGWYy2WY/2WY\\\\nAJiYMpiYZZiYmJiYy5iY/5iYAMuYMsuYZcuYmMuYy8uY/8uYAP+YMv+YZf+YmP+Yy/+Y///L\\\\nAADLMgDLZQDLmADLywDL/wDLADLLMjLLZTLLmDLLyzLL/zLLAGXLMmXLZWXLmGXLy2XL/2XL\\\\nAJjLMpjLZZjLmJjLy5jL/5jLAMvLMsvLZcvLmMvLy8vL/8vLAP/LMv/LZf/LmP/Ly//L////\\\\nAAD/MgD/ZQD/mAD/ywD//wD/ADL/MjL/ZTL/mDL/yzL//zL/AGX/MmX/ZWX/mGX/y2X//2X/\\\\nAJj/Mpj/ZZj/mJj/y5j//5j/AMv/Msv/Zcv/mMv/y8v//8v/AP//Mv//Zf//mP//y/////9E\\\\nCiHUAAAAGklEQVR4XmO4cwc/YLgz8hWMfAUjX8EIVQAAbnlwLukXXkcAAAAASUVORK5CYII='.\\\\n\\\\n\\\\tColor green->\\\\n'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAADAFBMVEX///8AAAD///9/f3//\\\\nAAAA/wAAAP8A/////wD/AP8fHx8/Pz9fX1+fn5+/v7/f398HBwcPDw8XFxcnJycvLy83NzdH\\\\nR0dPT09XV1dnZ2dvb293d3eHh4ePj4+Xl5enp6evr6+3t7fHx8fPz8/X19fn5+fv7+/39/cA\\\\nAAAAMgAAZQAAmAAAywAA/wAAADIAMjIAZTIAmDIAyzIA/zIAAGUAMmUAZWUAmGUAy2UA/2UA\\\\nAJgAMpgAZZgAmJgAy5gA/5gAAMsAMssAZcsAmMsAy8sA/8sAAP8AMv8AZf8AmP8Ay/8A//8y\\\\nAAAyMgAyZQAymAAyywAy/wAyADIyMjIyZTIymDIyyzIy/zIyAGUyMmUyZWUymGUyy2Uy/2Uy\\\\nAJgyMpgyZZgymJgyy5gy/5gyAMsyMssyZcsymMsyy8sy/8syAP8yMv8yZf8ymP8yy/8y//9l\\\\nAABlMgBlZQBlmABlywBl/wBlADJlMjJlZTJlmDJlyzJl/zJlAGVlMmVlZWVlmGVly2Vl/2Vl\\\\nAJhlMphlZZhlmJhly5hl/5hlAMtlMstlZctlmMtly8tl/8tlAP9lMv9lZf9lmP9ly/9l//+Y\\\\nAACYMgCYZQCYmACYywCY/wCYADKYMjKYZTKYmDKYyzKY/zKYAGWYMmWYZWWYmGWYy2WY/2WY\\\\nAJiYMpiYZZiYmJiYy5iY/5iYAMuYMsuYZcuYmMuYy8uY/8uYAP+YMv+YZf+YmP+Yy/+Y///L\\\\nAADLMgDLZQDLmADLywDL/wDLADLLMjLLZTLLmDLLyzLL/zLLAGXLMmXLZWXLmGXLy2XL/2XL\\\\nAJjLMpjLZZjLmJjLy5jL/5jLAMvLMsvLZcvLmMvLy8vL/8vLAP/LMv/LZf/LmP/Ly//L////\\\\nAAD/MgD/ZQD/mAD/ywD//wD/ADL/MjL/ZTL/mDL/yzL//zL/AGX/MmX/ZWX/mGX/y2X//2X/\\\\nAJj/Mpj/ZZj/mJj/y5j//5j/AMv/Msv/Zcv/mMv/y8v//8v/AP//Mv//Zf//mP//y/////9E\\\\nCiHUAAAAGUlEQVR4XmPQ1cUPGHRHvoKRr2DkKxihCgBZ3bQBCq5u/AAAAABJRU5ErkJggg=='.\\\\n\\\\n\\\\tColor blue->\\\\n'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAADAFBMVEX///8AAAD///9/f3//\\\\nAAAA/wAAAP8A/////wD/AP8fHx8/Pz9fX1+fn5+/v7/f398HBwcPDw8XFxcnJycvLy83NzdH\\\\nR0dPT09XV1dnZ2dvb293d3eHh4ePj4+Xl5enp6evr6+3t7fHx8fPz8/X19fn5+fv7+/39/cA\\\\nAAAAMgAAZQAAmAAAywAA/wAAADIAMjIAZTIAmDIAyzIA/zIAAGUAMmUAZWUAmGUAy2UA/2UA\\\\nAJgAMpgAZZgAmJgAy5gA/5gAAMsAMssAZcsAmMsAy8sA/8sAAP8AMv8AZf8AmP8Ay/8A//8y\\\\nAAAyMgAyZQAymAAyywAy/wAyADIyMjIyZTIymDIyyzIy/zIyAGUyMmUyZWUymGUyy2Uy/2Uy\\\\nAJgyMpgyZZgymJgyy5gy/5gyAMsyMssyZcsymMsyy8sy/8syAP8yMv8yZf8ymP8yy/8y//9l\\\\nAABlMgBlZQBlmABlywBl/wBlADJlMjJlZTJlmDJlyzJl/zJlAGVlMmVlZWVlmGVly2Vl/2Vl\\\\nAJhlMphlZZhlmJhly5hl/5hlAMtlMstlZctlmMtly8tl/8tlAP9lMv9lZf9lmP9ly/9l//+Y\\\\nAACYMgCYZQCYmACYywCY/wCYADKYMjKYZTKYmDKYyzKY/zKYAGWYMmWYZWWYmGWYy2WY/2WY\\\\nAJiYMpiYZZiYmJiYy5iY/5iYAMuYMsuYZcuYmMuYy8uY/8uYAP+YMv+YZf+YmP+Yy/+Y///L\\\\nAADLMgDLZQDLmADLywDL/wDLADLLMjLLZTLLmDLLyzLL/zLLAGXLMmXLZWXLmGXLy2XL/2XL\\\\nAJjLMpjLZZjLmJjLy5jL/5jLAMvLMsvLZcvLmMvLy8vL/8vLAP/LMv/LZf/LmP/Ly//L////\\\\nAAD/MgD/ZQD/mAD/ywD//wD/ADL/MjL/ZTL/mDL/yzL//zL/AGX/MmX/ZWX/mGX/y2X//2X/\\\\nAJj/Mpj/ZZj/mJj/y5j//5j/AMv/Msv/Zcv/mMv/y8v//8v/AP//Mv//Zf//mP//y/////9E\\\\nCiHUAAAAGUlEQVR4XmNwc8MPGNxGvoKRr2DkKxihCgCl7xgQRbPxcwAAAABJRU5ErkJggg=='.\\\\n\\\\n\\\\tColor black->\\\\n'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAADAFBMVEX///8AAAD///9/f3//\\\\nAAAA/wAAAP8A/////wD/AP8fHx8/Pz9fX1+fn5+/v7/f398HBwcPDw8XFxcnJycvLy83NzdH\\\\nR0dPT09XV1dnZ2dvb293d3eHh4ePj4+Xl5enp6evr6+3t7fHx8fPz8/X19fn5+fv7+/39/cA\\\\nAAAAMgAAZQAAmAAAywAA/wAAADIAMjIAZTIAmDIAyzIA/zIAAGUAMmUAZWUAmGUAy2UA/2UA\\\\nAJgAMpgAZZgAmJgAy5gA/5gAAMsAMssAZcsAmMsAy8sA/8sAAP8AMv8AZf8AmP8Ay/8A//8y\\\\nAAAyMgAyZQAymAAyywAy/wAyADIyMjIyZTIymDIyyzIy/zIyAGUyMmUyZWUymGUyy2Uy/2Uy\\\\nAJgyMpgyZZgymJgyy5gy/5gyAMsyMssyZcsymMsyy8sy/8syAP8yMv8yZf8ymP8yy/8y//9l\\\\nAABlMgBlZQBlmABlywBl/wBlADJlMjJlZTJlmDJlyzJl/zJlAGVlMmVlZWVlmGVly2Vl/2Vl\\\\nAJhlMphlZZhlmJhly5hl/5hlAMtlMstlZctlmMtly8tl/8tlAP9lMv9lZf9lmP9ly/9l//+Y\\\\nAACYMgCYZQCYmACYywCY/wCYADKYMjKYZTKYmDKYyzKY/zKYAGWYMmWYZWWYmGWYy2WY/2WY\\\\nAJiYMpiYZZiYmJiYy5iY/5iYAMuYMsuYZcuYmMuYy8uY/8uYAP+YMv+YZf+YmP+Yy/+Y///L\\\\nAADLMgDLZQDLmADLywDL/wDLADLLMjLLZTLLmDLLyzLL/zLLAGXLMmXLZWXLmGXLy2XL/2XL\\\\nAJjLMpjLZZjLmJjLy5jL/5jLAMvLMsvLZcvLmMvLy8vL/8vLAP/LMv/LZf/LmP/Ly//L////\\\\nAAD/MgD/ZQD/mAD/ywD//wD/ADL/MjL/ZTL/mDL/yzL//zL/AGX/MmX/ZWX/mGX/y2X//2X/\\\\nAJj/Mpj/ZZj/mJj/y5j//5j/AMv/Msv/Zcv/mMv/y8v//8v/AP//Mv//Zf//mP//y/////9E\\\\nCiHUAAAAGUlEQVR4XmNgZMQPGBhHvoKRr2DkKxihCgBEmAQBphO0cAAAAABJRU5ErkJggg=='\\\\n}! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - decoding' stamp: 'ar 2/19/2004 00:25'!\\\\ndecodeColors: colorsAndFiles depth: requiredDepth\\\\n\\\\t| color bytes form |\\\\n\\\\tcolorsAndFiles do:[:assoc|\\\\n\\\\t\\\\tcolor := assoc key.\\\\n\\\\t\\\\tbytes := Base64MimeConverter mimeDecodeToBytes: assoc value readStream.\\\\n\\\\t\\\\tform := PNGReadWriter formFromStream: bytes.\\\\n\\\\t\\\\tself assert: form depth = requiredDepth.\\\\n\\\\t\\\\tself assert: (form pixelValueAt: 1@1) = (color pixelValueForDepth: requiredDepth).\\\\n\\\\t].! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - decoding' stamp: 'ar 2/19/2004 00:30'!\\\\nencodeColors: colorsAndFiles depth: requiredDepth\\\\n\\\\t| color original ff encoded |\\\\n\\\\tcolorsAndFiles do:[:assoc|\\\\n\\\\t\\\\tcolor := assoc key.\\\\n\\\\t\\\\toriginal := Base64MimeConverter mimeDecodeToBytes: assoc value readStream.\\\\n\\\\t\\\\tff := Form extent: 32@32 depth: requiredDepth.\\\\n\\\\t\\\\tff fillColor: color.\\\\n\\\\t\\\\tencoded := WriteStream on: ByteArray new.\\\\n\\\\t\\\\tPNGReadWriter putForm: ff onStream: encoded.\\\\n\\\\t\\\\tself assert: (encoded contents = original contents).\\\\n\\\\t].! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - decoding' stamp: 'ar 2/19/2004 00:20'!\\\\ntestPngDecodingColors16\\\\n\\\\tself decodeColors: self coloredFiles16 depth: 16.! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - decoding' stamp: 'ar 2/19/2004 00:20'!\\\\ntestPngDecodingColors32\\\\n\\\\tself decodeColors: self coloredFiles32 depth: 32.! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - decoding' stamp: 'ar 2/19/2004 00:20'!\\\\ntestPngDecodingColors8\\\\n\\\\tself decodeColors: self coloredFiles8 depth: 8.! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - decoding' stamp: 'ar 2/19/2004 00:28'!\\\\ntestPngEncodingColors16\\\\n\\\\tself encodeColors: self coloredFiles16 depth: 16.! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - decoding' stamp: 'ar 2/19/2004 00:28'!\\\\ntestPngEncodingColors32\\\\n\\\\tself encodeColors: self coloredFiles32 depth: 32.! !\\\\n\\\\n!PNGReadWriterTest methodsFor: 'tests - decoding' stamp: 'ar 2/19/2004 00:28'!\\\\ntestPngEncodingColors8\\\\n\\\\tself encodeColors: self coloredFiles8 depth: 8.! !\\\\nImageReadWriter subclass: #PNMReadWriter\\\\n\\\\tinstanceVariableNames: 'first type origin cols rows depth maxValue tupleType pragma'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Graphics-Files'!\\\\n!PNMReadWriter commentStamp: 'jdr 10/20/2003 17:08' prior: 0!\\\\nI am a subclass of ImageReadWriter that decodes portable anymap file formats\\\\n(pbm, pgm, ppm and  pam) images.\\\\n\\\\nI accept the #origin pragma for SE files as described in:\\\\nAlgoritms For Image Processing And Computer Vision. J. R. Parker\\\\n\\\\nDon't work with 2 bytes samples (16 bit grays, > 32 bits color, etc...), \\\\npam files preliminary support.\\\\n\\\\nf _ ImageReadWriter formFromFileNamed: 'Tools:Squeak3.4:Carmen.ppm'.\\\\nf morphEdit\\\\n\\\\nSubmitted by Javier Diaz Reinoso, Oct/2003!\\\\n]style[(361 18 2 26 3 11 1 43)f1,cblack;f1,f1b,f1,f1b,f1,f1b,f1!\\\\n\\\\n\\\\n!PNMReadWriter methodsFor: 'accessing' stamp: 'jdr 10/16/2003 14:52'!\\\\norigin\\\\n\\\\t^origin! !\\\\n\\\\n!PNMReadWriter methodsFor: 'accessing' stamp: 'jdr 10/15/2003 15:35'!\\\\npragma: s\\\\n\\\\tpragma _ s! !\\\\n\\\\n!PNMReadWriter methodsFor: 'accessing' stamp: 'jdr 10/10/2003 18:04'!\\\\nstream: s\\\\n\\\\tstream _ s! !\\\\n\\\\n!PNMReadWriter methodsFor: 'accessing' stamp: 'jdr 10/16/2003 14:53'!\\\\ntupleType\\\\n\\\\t^tupleType! !\\\\n\\\\n\\\\n!PNMReadWriter methodsFor: 'reading' stamp: 'jdr 10/16/2003 17:19'!\\\\ncleanLine\\\\n\\\\t\\\\\\\"upTo LF or CR, tab as space\\\\\\\"\\\\n\\\\n\\\\t| line loop b |\\\\n\\\\tline _ WriteStream with: ''.\\\\n\\\\tloop _ true.\\\\n\\\\t[loop] whileTrue: [\\\\n\\\\t\\\\tb _ stream next.\\\\n\\\\t\\\\tb ifNil:[\\\\n\\\\t\\\\t\\\\tloop _ false\\\\t\\\\t\\\\\\\"EOS\\\\\\\"\\\\n\\\\t\\\\t]\\\\n\\\\t\\\\tifNotNil: [\\\\n\\\\t\\\\t\\\\t(b = (Character cr) or:[b = Character lf]) ifTrue:[\\\\n\\\\t\\\\t\\\\t\\\\tloop _ false.\\\\n\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t\\\\tifFalse:[\\\\n\\\\t\\\\t\\\\t\\\\tb = (Character tab) ifTrue:[b _ Character space].\\\\n\\\\t\\\\t\\\\t\\\\tline nextPut: b.\\\\n\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\t^line contents! !\\\\n\\\\n!PNMReadWriter methodsFor: 'reading' stamp: 'jdr 10/15/2003 12:20'!\\\\ngetTokenPbm: aCollection\\\\n\\\\t\\\\\\\"get a number, return rest of collection\\\\\\\"\\\\n\\\\t| line tokens token |\\\\n\\\\ttokens _ aCollection.\\\\n\\\\ttokens size = 0 ifTrue:[\\\\n\\\\t\\\\t[\\\\n\\\\t\\\\t\\\\tline _ self pbmGetLine.\\\\n\\\\t\\\\t\\\\tline ifNil:[^{nil . nil}].\\\\n\\\\t\\\\t\\\\ttokens _ line findTokens: ' '.\\\\n\\\\t\\\\t\\\\ttokens size = 0\\\\n\\\\t\\\\t] whileTrue:[].\\\\n\\\\t].\\\\n\\\\t\\\\\\\"Transcript cr; show: tokens asString.\\\\\\\"\\\\n\\\\ttoken _ tokens removeFirst.\\\\n\\\\t^{token asInteger . tokens}\\\\n! !\\\\n\\\\n!PNMReadWriter methodsFor: 'reading' stamp: 'jdr 10/16/2003 16:39'!\\\\nnextImage\\\\n\\\\t\\\\\\\"read one image\\\\\\\"\\\\n\\\\t| data p |\\\\n\\\\tfirst ifNil:[\\\\n\\\\t\\\\tfirst _ false.\\\\n\\\\t\\\\tdata _ stream contentsOfEntireFile.\\\\n\\\\t\\\\tstream _ (RWBinaryOrTextStream with: data) reset.\\\\n\\\\t]\\\\n\\\\tifNotNil:[\\\\n\\\\t\\\\ttype < 4 ifTrue:[\\\\n\\\\t\\\\t\\\\tself error:'Plain PBM, PGM or PPM have only one image'\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\tstream ascii.\\\\n\\\\tp _ stream next.\\\\n\\\\ttype _ (stream next) asInteger - 48.\\\\n\\\\t(p = $P and:[type > 0 and:[type < 8]]) ifFalse:[\\\\n\\\\t\\\\tself error:'Not a PNM file'\\\\n\\\\t].\\\\n\\\\ttype = 7 ifTrue:[\\\\n\\\\t\\\\tself readHeaderPAM\\\\n\\\\t]\\\\n\\\\tifFalse: [\\\\n\\\\t\\\\tself readHeader\\\\n\\\\t].\\\\n\\\\ttype caseOf: {\\\\n\\\\t\\\\t[1] \\\\t->\\\\t[^self readPlainBW].\\\\n\\\\t\\\\t[2] \\\\t->\\\\t[^self readPlainGray].\\\\n\\\\t\\\\t[3] \\\\t->\\\\t[^self readPlainRGB].\\\\n\\\\t\\\\t[4] \\\\t->\\\\t[^self readBWreverse: false].\\\\n\\\\t\\\\t[5] \\\\t->\\\\t[^self readGray].\\\\n\\\\t\\\\t[6] \\\\t->\\\\t[^self readRGB].\\\\n\\\\t\\\\t[7] \\\\t->\\\\t[\\\\t\\\\\\\"PAM\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(tupleType asUppercase) caseOf: {\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t['BLACKANDWHITE'] \\\\t\\\\t-> [^self readBWreverse: true].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t['GRAYSCALE'] \\\\t\\\\t\\\\t-> [^self readGray].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t['RGB'] \\\\t\\\\t\\\\t\\\\t\\\\t-> [^self readRGB].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t['RGB_ALPHA'] \\\\t\\\\t\\\\t-> [^self error:'Not implemented'].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t['GRAYSCALE_ALPHA'] \\\\t-> [^self error:'Not implemented'].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t} otherwise: [^self readData].\\\\n\\\\t\\\\t\\\\t\\\\t]\\\\n\\\\t}! !\\\\n\\\\n!PNMReadWriter methodsFor: 'reading' stamp: 'jdr 10/10/2003 15:09'!\\\\npbmGetLine\\\\n\\\\t\\\\\\\"Get the next non-comment line from the PBM stream\\\\n\\\\tLook for 'pragmas' - commands hidden in the comments\\\\\\\"\\\\n\\\\t\\\\n \\\\t| line |\\\\n\\\\t[\\\\n\\\\t\\\\tline _ self cleanLine.\\\\n\\\\t\\\\tline ifNil: [^nil].\\\\n\\\\t\\\\t(line size > 0 and:[(line at: 1) = $#]) ifTrue:[\\\\n\\\\t\\\\t\\\\tself pbmParam: line.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\t(line size = 0) or:[(line at: 1) = $#]\\\\n\\\\t]\\\\n \\\\twhileTrue: [].\\\\n\\\\t^line! !\\\\n\\\\n!PNMReadWriter methodsFor: 'reading' stamp: 'jdr 10/10/2003 15:11'!\\\\npbmParam: line\\\\n\\\\t\\\\\\\"Look for a parameter hidden in a comment\\\\\\\"\\\\n\\\\t| key tokens |\\\\n\\\\ttokens _ line findTokens: ' '.\\\\n\\\\tkey _ (tokens at: 1) asLowercase.\\\\n\\\\t(key = '#origin' and:[tokens size = 3]) ifTrue:[\\\\t\\\\\\\"ORIGIN key word\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"This is for SE files as described in:\\\\n\\\\t\\\\tAlgoritms For Image Processing And Computer Vision. J. R. Parker\\\\\\\"\\\\n\\\\t\\\\torigin _ ((tokens at: 2) asInteger) @ ((tokens at: 3) asInteger)\\\\n\\\\t].\\\\n! !\\\\n\\\\n!PNMReadWriter methodsFor: 'reading' stamp: 'jdr 7/18/2005 17:02'!\\\\nr: r g: g b: b for: aDepth\\\\n\\\\t\\\\\\\"integer value according depth\\\\\\\"\\\\n\\\\t| val |\\\\n\\\\taDepth = 16 ifTrue: [\\\\n\\\\t\\\\tval := (1 << 15) + (r << 10) + (g << 5) + b.\\\\n\\\\t]\\\\n\\\\tifFalse:[\\\\n\\\\t\\\\tval := (16rFF << 24) + (r << 16) + (g << 8) + b.\\\\n\\\\t].\\\\n\\\\t^val\\\\n! !\\\\n\\\\n!PNMReadWriter methodsFor: 'reading' stamp: 'jdr 10/16/2003 15:49'!\\\\nreadBWreverse: flagXor\\\\n\\\\t\\\\\\\"B&W for PAM\\\\\\\"\\\\n\\\\t| val form bytesRow nBytes |\\\\n\\\\tstream binary.\\\\n\\\\tform _ Form extent: cols@rows depth: 1.\\\\n\\\\tnBytes _ (cols/8) ceiling.\\\\n\\\\tbytesRow _ (cols/32) ceiling * 4.\\\\n\\\\t0 to: rows-1 do: [:y | | i |\\\\n\\\\t\\\\ti _ 1 + (bytesRow*y).\\\\n\\\\t\\\\t0 to: nBytes-1 do: [:x |\\\\n\\\\t\\\\t\\\\tval _ stream next.\\\\n\\\\t\\\\t\\\\tflagXor ifTrue:[val _ val bitXor: 16rFF].\\\\n\\\\t\\\\t\\\\tform bits byteAt: i put: val.\\\\n\\\\t\\\\t\\\\ti _ i+1.\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\t^form\\\\n! !\\\\n\\\\n!PNMReadWriter methodsFor: 'reading' stamp: 'md 10/20/2004 15:45'!\\\\nreadData\\\\n\\\\t\\\\\\\"generic data\\\\\\\"\\\\n\\\\t| data nBits nBytes val sample |\\\\n\\\\tstream binary.\\\\n\\\\tdata _ OrderedCollection new.\\\\n\\\\tnBits _ maxValue floorLog:2.\\\\n\\\\tnBytes _ (nBits+1) >> 3.\\\\n\\\\t(nBits+1 rem: 8) > 0 ifTrue:[nBytes _ nBytes+1].\\\\n\\\\n\\\\t0 to: rows-1 do: [:y |\\\\n\\\\t\\\\t0 to: cols-1 do: [:x |\\\\n\\\\t\\\\t\\\\tval _ 0.\\\\n\\\\t\\\\t\\\\t1 to: nBytes do: [:n |\\\\n\\\\t\\\\t\\\\t\\\\tsample _ stream next.\\\\n\\\\t\\\\t\\\\t\\\\tval _ val << 8 + sample.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\tdata add: val.\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\t^data\\\\n\\\\n! !\\\\n\\\\n!PNMReadWriter methodsFor: 'reading' stamp: 'jdr 10/16/2003 15:44'!\\\\nreadGray\\\\n\\\\t\\\\\\\"gray form\\\\\\\"\\\\n\\\\t| val form poker |\\\\n\\\\tmaxValue > 255 ifTrue:[self error:'Gray value > 8 bits not supported in Squeak'].\\\\n\\\\tstream binary.\\\\n\\\\tform _ Form extent: cols@rows depth: depth.\\\\n\\\\tpoker _ BitBlt current bitPokerToForm: form.\\\\n\\\\t0 to: rows-1 do: [:y |\\\\n\\\\t\\\\t0 to: cols-1 do: [:x |\\\\n\\\\t\\\\t\\\\tval _ stream next.\\\\n\\\\t\\\\t\\\\tpoker pixelAt: x@y put: val.\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\t^form\\\\n! !\\\\n\\\\n!PNMReadWriter methodsFor: 'reading' stamp: 'jdr 10/15/2003 15:44'!\\\\nreadHeader\\\\n\\\\t\\\\\\\"read header for pbm, pgm or ppm\\\\\\\"\\\\n\\\\t| tokens aux d c  |\\\\n\\\\ttokens _ OrderedCollection new.\\\\n\\\\taux _ self getTokenPbm: tokens.\\\\n\\\\tcols _ aux at: 1. tokens _ aux at: 2.\\\\n\\\\taux _ self getTokenPbm: tokens.\\\\n\\\\trows _ aux at: 1. tokens _ aux at: 2.\\\\n\\\\n\\\\t(type = 1 or:[type = 4]) ifTrue:[\\\\n\\\\t\\\\tmaxValue _ 1\\\\n\\\\t]\\\\n\\\\tifFalse: [\\\\n\\\\t\\\\taux _ self getTokenPbm: tokens.\\\\n\\\\t\\\\tmaxValue _ aux at: 1. tokens _ aux at: 2.\\\\n\\\\t].\\\\n\\\\td _ {1 . 2 . 4 . \\\\t8 . \\\\t\\\\t16 . 32}.\\\\n\\\\tc _ {2 . 4 . 16 . 256 . 32768 . 16777216}. \\\\n\\\\t(type = 3 or:[type = 6]) ifTrue: [\\\\n\\\\t\\\\tmaxValue >= 65536 ifTrue:[\\\\n\\\\t\\\\t\\\\tself error:'Pixmap > 48 bits not supported in PPM'\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tmaxValue >= 256 ifTrue:[\\\\n\\\\t\\\\t\\\\tself error:'Pixmap > 32 bits are not supported in Squeak'\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tmaxValue < 32 ifTrue:[depth _ 16] ifFalse:[depth _ 32].\\\\n\\\\t]\\\\n\\\\tifFalse: [\\\\n\\\\t\\\\tdepth _ nil.\\\\n\\\\t\\\\t1 to: c size do:[:i| ((c at: i) > maxValue and:[depth = nil]) ifTrue:[depth_d at: i]].\\\\n\\\\t].\\\\n\\\\tTranscript cr; show: 'PBM file class ', type asString, ' size ', cols asString, ' x ', \\\\n\\\\t\\\\trows asString, ' maxValue =', maxValue asString, ' depth=', depth asString.\\\\n! !\\\\n\\\\n!PNMReadWriter methodsFor: 'reading' stamp: 'jdr 10/15/2003 12:35'!\\\\nreadHeaderPAM\\\\n\\\\t\\\\\\\"read pam header, not tested\\\\\\\"\\\\n\\\\t| loop line tokens key val |\\\\n\\\\ttupleType _ ''.\\\\n\\\\tloop _ true.\\\\n\\\\tloop whileTrue:[\\\\n\\\\t\\\\tline _ self pbmGetLine.\\\\n\\\\t\\\\ttokens _ line findTokens: ' '.\\\\n\\\\t\\\\ttokens size = 2 ifTrue:[\\\\n\\\\t\\\\t\\\\tkey _ tokens at: 1 asUppercase.\\\\n\\\\t\\\\t\\\\tval _ tokens at: 2.\\\\n\\\\t\\\\t\\\\tkey caseOf: {\\\\n\\\\t\\\\t\\\\t\\\\t['WIDTH'] \\\\t\\\\t-> [cols _ val asInteger].\\\\n\\\\t\\\\t\\\\t\\\\t['HEIGHT'] \\\\t\\\\t-> [rows _ val asInteger].\\\\n\\\\t\\\\t\\\\t\\\\t['DEPTH'] \\\\t\\\\t-> [depth _ val asInteger].\\\\n\\\\t\\\\t\\\\t\\\\t['MAXVAL']\\\\t\\\\t-> [maxValue _ val asInteger].\\\\n\\\\t\\\\t\\\\t\\\\t['TUPLETYPE']\\\\t-> [tupleType _ tupleType, ' ', val].\\\\n\\\\t\\\\t\\\\t\\\\t['ENDHDR']\\\\t\\\\t-> [loop _ false].\\\\n\\\\t\\\\t\\\\t}\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\tTranscript cr; show: 'PAM file class ', type asString, ' size ', cols asString, ' x ', \\\\n\\\\t\\\\trows asString, ' maxValue =', maxValue asString, ' depth=', depth asString.\\\\n! !\\\\n\\\\n!PNMReadWriter methodsFor: 'reading' stamp: 'jdr 10/16/2003 16:03'!\\\\nreadPlainBW\\\\n\\\\t\\\\\\\"plain BW\\\\\\\"\\\\n\\\\t| val form poker |\\\\n\\\\tform _ Form extent: cols@rows depth: depth.\\\\n\\\\tpoker _ BitBlt current bitPokerToForm: form.\\\\n\\\\t0 to: rows-1 do: [:y |\\\\n\\\\t\\\\t0 to: cols-1 do: [:x |\\\\n\\\\t\\\\t\\\\t[val _ stream next. (val = $0 or:[val = $1])] whileFalse:[\\\\n\\\\t\\\\t\\\\t\\\\tval ifNil:[self error:'End of file reading PBM'].\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\tpoker pixelAt: x@y put: (val asInteger).\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\t^form\\\\n! !\\\\n\\\\n!PNMReadWriter methodsFor: 'reading' stamp: 'jdr 10/16/2003 15:44'!\\\\nreadPlainGray\\\\n\\\\t\\\\\\\"plain gray\\\\\\\"\\\\n\\\\t| val form poker aux tokens |\\\\n\\\\tform _ Form extent: cols@rows depth: depth.\\\\n\\\\tpoker _ BitBlt current bitPokerToForm: form.\\\\n\\\\ttokens _ OrderedCollection new.\\\\n\\\\t0 to: rows-1 do: [:y |\\\\n\\\\t\\\\t0 to: cols-1 do: [:x |\\\\n\\\\t\\\\t\\\\taux _ self getTokenPbm: tokens.\\\\n\\\\t\\\\t\\\\tval _ aux at: 1. tokens _ aux at: 2.\\\\n\\\\t\\\\t\\\\tpoker pixelAt: x@y put: val.\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\t^form\\\\n! !\\\\n\\\\n!PNMReadWriter methodsFor: 'reading' stamp: 'jdr 10/15/2003 12:49'!\\\\nreadPlainRGB\\\\n\\\\t\\\\\\\"RGB form, use 32 bits\\\\\\\"\\\\n\\\\t| val form poker tokens aux |\\\\n\\\\tmaxValue > 255 ifTrue:[self error:'RGB value > 32 bits not supported in Squeak'].\\\\n\\\\tform _ Form extent: cols@rows depth: 32.\\\\n\\\\tpoker _ BitBlt current bitPokerToForm: form.\\\\n\\\\ttokens _ OrderedCollection new.\\\\n\\\\t0 to: rows-1 do: [:y |\\\\n\\\\t\\\\t0 to: cols-1 do: [:x | | r g b|\\\\n\\\\t\\\\t\\\\taux _ self getTokenPbm: tokens. r _ aux at: 1. tokens _ aux at: 2.\\\\n\\\\t\\\\t\\\\taux _ self getTokenPbm: tokens. g _ aux at: 1. tokens _ aux at: 2.\\\\n\\\\t\\\\t\\\\taux _ self getTokenPbm: tokens. b _ aux at: 1. tokens _ aux at: 2.\\\\n\\\\t\\\\t\\\\tval _ self r: r g: g b: b for: depth.\\\\n\\\\t\\\\t\\\\tpoker pixelAt: x@y put: val.\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\t^form\\\\n! !\\\\n\\\\n!PNMReadWriter methodsFor: 'reading' stamp: 'jdr 7/18/2005 16:58'!\\\\nreadRGB\\\\n\\\\t\\\\\\\"RGB form, use 16/32 bits\\\\\\\"\\\\n\\\\t| val form poker sample shift |\\\\n\\\\tmaxValue > 255 ifTrue:[self error:'RGB value > 32 bits not supported in Squeak'].\\\\n\\\\tstream binary.\\\\n\\\\tform := Form extent: cols@rows depth: depth.\\\\n\\\\tpoker := BitBlt current bitPokerToForm: form.\\\\n\\\\tdepth = 32 ifTrue:[shift := 8] ifFalse:[shift := 5].\\\\n\\\\t0 to: rows-1 do: [:y |\\\\n\\\\t\\\\t0 to: cols-1 do: [:x |\\\\n\\\\t\\\\t\\\\tval := 16rFF.\\\\t\\\\\\\"no transparency\\\\\\\"\\\\n\\\\t\\\\t\\\\t1 to: 3 do: [:i |\\\\n\\\\t\\\\t\\\\t\\\\tsample := stream next.\\\\n\\\\t\\\\t\\\\t\\\\tval := val << shift + sample.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\tpoker pixelAt: x@y put: val.\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\t^form\\\\n! !\\\\n\\\\n\\\\n!PNMReadWriter methodsFor: 'testing' stamp: 'jdr 10/11/2003 14:52'!\\\\nunderstandsImageFormat\\\\n\\\\t\\\\\\\"P1 to P7\\\\\\\"\\\\n\\\\t| p  |\\\\n\\\\tp _ stream next asCharacter.\\\\n\\\\ttype _ stream next - 48.\\\\n\\\\t^(p = $P and:[type > 0 and:[type < 8]])\\\\n\\\\t! !\\\\n\\\\n\\\\n!PNMReadWriter methodsFor: 'writing' stamp: 'jdr 10/16/2003 16:08'!\\\\nnextPutBW: aForm reverse: flagXor\\\\n\\\\t| myType val nBytes bytesRow |\\\\n\\\\tcols _ aForm width.\\\\n\\\\trows _ aForm height.\\\\n\\\\tdepth _ aForm depth.\\\\n\\\\t\\\\\\\"stream position: 0.\\\\\\\"\\\\n\\\\taForm depth = 1 ifTrue:[myType _ $4] ifFalse:[myType _ $5].\\\\n\\\\tself writeHeader: myType.\\\\n\\\\tstream binary.\\\\n\\\\tnBytes _ (cols/8) ceiling.\\\\n\\\\tbytesRow _ (cols/32) ceiling * 4.\\\\n\\\\t0 to: rows-1 do: [:y | | i |\\\\n\\\\t\\\\ti _ 1 + (bytesRow*y).\\\\n\\\\t\\\\t0 to: nBytes-1 do: [:x |\\\\n\\\\t\\\\t\\\\tval _ aForm bits byteAt: i.\\\\n\\\\t\\\\t\\\\tflagXor ifTrue:[val _ val bitXor: 16rFF].\\\\n\\\\t\\\\t\\\\tstream nextPut: val.\\\\n\\\\t\\\\t\\\\ti _ i+1.\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n! !\\\\n\\\\n!PNMReadWriter methodsFor: 'writing' stamp: 'jdr 10/16/2003 16:08'!\\\\nnextPutGray: aForm\\\\n\\\\t| myType peeker val |\\\\n\\\\tcols _ aForm width.\\\\n\\\\trows _ aForm height.\\\\n\\\\tdepth _ aForm depth.\\\\n\\\\t\\\\\\\"stream position: 0.\\\\\\\"\\\\n\\\\taForm depth = 1 ifTrue:[myType _ $4] ifFalse:[myType _ $5].\\\\n\\\\tself writeHeader: myType.\\\\n\\\\tpeeker _ BitBlt current bitPeekerFromForm: aForm.\\\\n\\\\t0 to: rows-1 do: [:y |\\\\n\\\\t\\\\t0 to: cols-1 do: [:x |\\\\n\\\\t\\\\t\\\\tval _ peeker pixelAt: x@y.\\\\n\\\\t\\\\t\\\\tstream nextPut: val.\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n! !\\\\n\\\\n!PNMReadWriter methodsFor: 'writing' stamp: 'jdr 10/16/2003 14:22'!\\\\nnextPutImage: aForm\\\\n\\\\taForm unhibernate.\\\\n\\\\taForm depth\\\\t caseOf: {\\\\n\\\\t\\\\t[1] \\\\t\\\\t-> [self nextPutBW: aForm reverse: false].\\\\n\\\\t\\\\t[16] \\\\t-> [self nextPutRGB: aForm].\\\\n\\\\t\\\\t[32] \\\\t-> [self nextPutRGB: aForm].\\\\n\\\\t} otherwise: [\\\\n\\\\t\\\\t(aForm respondsTo: #colors) ifTrue:[\\\\n\\\\t\\\\t\\\\taForm colors ifNil: [\\\\n\\\\t\\\\t\\\\t\\\\tself nextPutGray: aForm\\\\n\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t\\\\tifNotNil: [\\\\n\\\\t\\\\t\\\\t\\\\tself nextPutRGB: aForm\\\\n\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t]\\\\n\\\\t\\\\tifFalse:[\\\\n\\\\t\\\\t\\\\tself nextPutGray: aForm\\\\n\\\\t\\\\t]\\\\n\\\\t]! !\\\\n\\\\n!PNMReadWriter methodsFor: 'writing' stamp: 'jdr 10/16/2003 16:08'!\\\\nnextPutRGB: aForm\\\\n\\\\t| myType peeker f shift mask |\\\\n\\\\tcols _ aForm width.\\\\n\\\\trows _ aForm height.\\\\n\\\\tdepth _ aForm depth.\\\\n\\\\tf _ aForm.\\\\n\\\\tdepth < 16 ifTrue:[\\\\n\\\\t\\\\tf _ aForm asFormOfDepth: 32.\\\\n\\\\t\\\\tdepth _ 32.\\\\n\\\\t].\\\\n\\\\tmyType _ $6.\\\\n\\\\t\\\\\\\"stream position: 0.\\\\\\\"\\\\n\\\\tself writeHeader: myType.\\\\n\\\\tdepth = 32 ifTrue:[shift _ 8. mask _ 16rFF] ifFalse:[shift _ 5. mask _ 16r1F].\\\\n\\\\tpeeker _ BitBlt current bitPeekerFromForm: f.\\\\n\\\\t0 to: rows-1 do: [:y |\\\\n\\\\t\\\\t0 to: cols-1 do: [:x | | p r g b |\\\\n\\\\t\\\\t\\\\tp _ peeker pixelAt: x@y.\\\\n\\\\t\\\\t\\\\tb _ p bitAnd: mask. p _ p >> shift.\\\\n\\\\t\\\\t\\\\tg _ p bitAnd: mask. p _ p >> shift.\\\\n\\\\t\\\\t\\\\tr _ p bitAnd: mask.\\\\n\\\\t\\\\t\\\\tstream nextPut: r.\\\\n\\\\t\\\\t\\\\tstream nextPut: g.\\\\n\\\\t\\\\t\\\\tstream nextPut: b.\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n! !\\\\n\\\\n!PNMReadWriter methodsFor: 'writing' stamp: 'jdr 10/15/2003 15:48'!\\\\nwriteHeader: myType\\\\n\\\\t\\\\\\\"this is ascii\\\\\\\"\\\\n\\\\tstream nextPut: ($P asciiValue).\\\\n\\\\tstream nextPut: (myType asciiValue).\\\\n\\\\tstream nextPut: 10.\\\\t\\\\t\\\\\\\"nl\\\\\\\"\\\\n\\\\tpragma ifNotNil:[\\\\n\\\\t\\\\tstream nextPutAll: (pragma asByteArray).\\\\n\\\\t].\\\\n\\\\tstream nextPutAll: (cols printString) asByteArray.\\\\n\\\\tstream nextPut: 32.\\\\t\\\\t\\\\\\\" \\\\\\\"\\\\n\\\\tstream nextPutAll: (rows printString) asByteArray.\\\\n\\\\tstream nextPut: 10.\\\\t\\\\t\\\\\\\"nl\\\\\\\"\\\\n\\\\tdepth > 1 ifTrue: [| d c maxV |\\\\n\\\\t\\\\td _ {1 . 2 . 4  . 8   . 16 . 32}.\\\\n\\\\t\\\\tc _ {1 . 3 . 15 . 255 . 31 . 255}. \\\\n\\\\t\\\\tmaxV _ nil.\\\\n\\\\t\\\\t1 to: d size do:[:i| ((d at: i) = depth and:[maxV = nil]) ifTrue:[maxV _ c at: i]].\\\\n\\\\t\\\\tstream nextPutAll: (maxV printString) asByteArray.\\\\n\\\\t\\\\tstream nextPut: 10.\\\\t\\\\t\\\\\\\"nl\\\\\\\"\\\\n\\\\t]\\\\n\\\\t! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPNMReadWriter class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PNMReadWriter class methodsFor: 'image reading/writing' stamp: 'jdr 7/18/2005 16:25'!\\\\ntypicalFileExtensions\\\\n\\\\t\\\\\\\"Answer a collection of file extensions (lowercase) which files that I can read might commonly have\\\\\\\"\\\\n\\\\t^#('pbm' 'pnm' 'ppm' 'pam')! !\\\\n\\\\n\\\\n!PNMReadWriter class methodsFor: 'testing' stamp: 'jdr 10/11/2003 14:49'!\\\\ntestFromSEFile: filename\\\\n\\\\t\\\\\\\"read SE file, check origin\\\\n\\\\t\\\\tPNMReadWriter testFromSEFile: 'Tools:Squeak3.4:eliseSE.pbm'.\\\\n\\\\t\\\\\\\"\\\\n\\\\t| prw f |\\\\n\\\\tprw _ self new.\\\\n\\\\tprw stream: (FileStream readOnlyFileNamed: filename).\\\\n\\\\tf _ prw nextImage.\\\\n\\\\tf morphEdit.\\\\n\\\\tprw inspect! !\\\\n\\\\n!PNMReadWriter class methodsFor: 'testing' stamp: 'jdr 10/16/2003 17:22'!\\\\ntestFromString\\\\n\\\\t\\\\\\\"read SE file from string\\\\n\\\\t\\\\tPNMReadWriter testFromString\\\\n\\\\t\\\\\\\"\\\\n\\\\t| prw f s |\\\\n\\\\tprw _ self new.\\\\n\\\\ts _ \\\\n'P1\\\\n#origin 1 0\\\\n3 1\\\\n1\\\\t01'.\\\\n\\\\tprw stream: (ReadStream on: s from: 1 to: (s size)).\\\\n\\\\tf _ prw nextImage.\\\\n\\\\tf morphEdit.\\\\n\\\\tTranscript cr;show:'Origin=', prw origin asString; cr.! !\\\\n\\\\n!PNMReadWriter class methodsFor: 'testing' stamp: 'jdr 7/18/2005 17:03'!\\\\ntestMultiFile: filename\\\\n\\\\t\\\\\\\"write two files from user, then read\\\\n\\\\t\\\\tPNMReadWriter testMultiFile: 'Tools:Squeak3.6:outMulti.pbm'.\\\\n\\\\t\\\\\\\"\\\\n\\\\t| prw f |\\\\n\\\\tprw := self new.\\\\n\\\\tprw stream: ((FileStream newFileNamed: filename) binary).\\\\n\\\\tprw pragma: '#Squeak test', String lf.\\\\n\\\\tf := Form fromUser. prw nextPutImage: f. \\\\n\\\\tf := Form fromUser.prw nextPutImage: f.\\\\t\\\\n\\\\tprw close.\\\\n\\\\tprw stream: (StandardFileStream readOnlyFileNamed: filename).\\\\n\\\\tf := prw nextImage. (SketchMorph withForm: f) openInWorld.\\\\n\\\\tf := prw nextImage. (SketchMorph withForm: f) openInWorld.\\\\n! !\\\\n\\\\n!PNMReadWriter class methodsFor: 'testing' stamp: 'jdr 10/15/2003 15:43'!\\\\ntestToSEFile: filename\\\\n\\\\t\\\\\\\"write SE file with origin\\\\n\\\\t\\\\tPNMReadWriter testToSEFile: 'Tools:Squeak3.4:outSE.pbm'.\\\\n\\\\t\\\\\\\"\\\\n\\\\t| prw f |\\\\n\\\\tprw _ self new.\\\\n\\\\tprw stream: ((FileStream newFileNamed: filename) binary).\\\\n\\\\tprw pragma: '#origin 10 10', String lf.\\\\n\\\\tf _ Form fromUser.\\\\n\\\\tprw nextPutImage: f! !\\\\nProtocolClient subclass: #POP3Client\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Network-Protocols'!\\\\n!POP3Client commentStamp: 'mir 5/12/2003 17:57' prior: 0!\\\\nThis class implements POP3 (Post Office Protocol 3) as specified in RFC 1939.  (see http://www.ietf.org/rfc.html)\\\\n\\\\nYou can use it to download email from the mail server to your personal mail program.\\\\n\\\\nTo see an example of it's use, see POPSocket class>>example.!\\\\n\\\\n\\\\n!POP3Client methodsFor: 'public protocol' stamp: 'mir 3/7/2002 14:58'!\\\\napopLoginUser: userName password: password\\\\n\\\\n\\\\tself loginUser: userName password: password loginMethod: #APOP! !\\\\n\\\\n!POP3Client methodsFor: 'public protocol' stamp: 'mir 3/7/2002 14:35'!\\\\ndeleteMessage: num\\\\n\\\\t\\\\\\\"delete the numbered message\\\\\\\"\\\\n\\\\n\\\\tself ensureConnection.\\\\n\\\\tself sendCommand: 'DELE ', num printString.\\\\n\\\\tself checkResponse.\\\\n\\\\tself logProgress: self lastResponse! !\\\\n\\\\n!POP3Client methodsFor: 'public protocol' stamp: 'mir 3/7/2002 14:57'!\\\\nloginUser: userName password: password\\\\n\\\\n\\\\tself loginUser: userName password: password loginMethod: #clearText! !\\\\n\\\\n!POP3Client methodsFor: 'public protocol' stamp: 'mir 3/8/2002 11:40'!\\\\nloginUser: userName password: password loginMethod: aLoginMethod\\\\n\\\\n\\\\tself user: userName.\\\\n\\\\tself password: password.\\\\n\\\\tself loginMethod: aLoginMethod.\\\\n\\\\tself login! !\\\\n\\\\n!POP3Client methodsFor: 'public protocol' stamp: 'mir 4/7/2003 17:17'!\\\\nmessageCount\\\\n\\\\t\\\\\\\"Query the server and answer the number of messages that are in the user's mailbox.\\\\\\\"\\\\n\\\\n\\\\t| answerString numMessages |\\\\n\\\\tself ensureConnection.\\\\n\\\\tself sendCommand: 'STAT'.\\\\n\\\\tself checkResponse.\\\\n\\\\tself logProgress: self lastResponse.\\\\n\\\\n\\\\t[answerString _ (self lastResponse findTokens: Character separators) second.\\\\n\\\\tnumMessages _ answerString asNumber asInteger]\\\\n\\\\t\\\\ton: Error\\\\n\\\\t\\\\tdo: [:ex | (ProtocolClientError protocolInstance: self) signal: 'Invalid STAT response.'].\\\\n\\\\t^numMessages! !\\\\n\\\\n!POP3Client methodsFor: 'public protocol' stamp: 'len 12/14/2002 17:50'!\\\\nquit\\\\n\\\\t\\\\\\\"QUIT <CRLF>\\\\\\\"\\\\n\\\\n\\\\tself sendCommand: 'QUIT'.\\\\n\\\\tself checkResponse.! !\\\\n\\\\n!POP3Client methodsFor: 'public protocol' stamp: 'mir 3/7/2002 14:35'!\\\\nretrieveMessage: number\\\\n\\\\t\\\\\\\"retrieve the numbered message\\\\\\\"\\\\n\\\\n\\\\tself ensureConnection.\\\\n\\\\tself sendCommand: 'RETR ', number printString.\\\\n\\\\tself checkResponse.\\\\n\\\\tself logProgress: self lastResponse.\\\\n\\\\n\\\\t^self getMultilineResponse! !\\\\n\\\\n\\\\n!POP3Client methodsFor: 'private' stamp: 'mir 11/11/2002 16:20'!\\\\nloginMethod\\\\n\\\\t^self connectionInfo at: #loginMethod ifAbsent: [nil]! !\\\\n\\\\n!POP3Client methodsFor: 'private' stamp: 'mir 3/8/2002 11:41'!\\\\nloginMethod: aSymbol\\\\n\\\\t^self connectionInfo at: #loginMethod put: aSymbol! !\\\\n\\\\n\\\\n!POP3Client methodsFor: 'private protocol' stamp: 'BG 3/16/2005 08:27'!\\\\napopLogin\\\\n\\\\n\\\\t\\\\\\\"Attempt to authenticate ourselves to the server without sending the password as cleartext.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"For secure authentication, we look for a timestamp in the initial response string we get from the server, and then try the APOP command as specified in RFC 1939.  If the initial response from the server is\\\\n\\\\t+OK POP3 server ready <1896.697170952@dbc.mtview.ca.us>\\\\nwe extract the timestamp\\\\n\\\\t<1896.697170952@dbc.mtview.ca.us>\\\\nthen form a string of the form\\\\n\\\\t<1896.697170952@dbc.mtview.ca.us>USERPASSWORD\\\\nand then send only the MD5 hash of that to the server.  Thus the password never hits the wire\\\\\\\"\\\\n\\\\n\\\\t| timestamp hash |\\\\n\\\\n\\\\t[\\\\n\\\\t\\\\\\\"Look for a timestamp in the response we received from the server\\\\\\\"\\\\n\\\\ttimestamp _ self lastResponse findTokens: '<>' includes: '@'.\\\\n\\\\ttimestamp\\\\n\\\\t\\\\tifNil: [(POP3LoginError protocolInstance: self) signal: 'APOP not supported.'].\\\\n\\\\n\\\\t(Smalltalk includesKey: #MD5)\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\thash _ ((Smalltalk at: #MD5) hashMessage: ('<', timestamp, '>', self password)) storeStringHex asLowercase.\\\\n\\\\t\\\\t\\\\t\\\\\\\"trim starting 16r and zero pad it to 32 characters if needed\\\\\\\"\\\\n\\\\t\\\\t\\\\thash _ hash  padded: #left to: 32 with: $0]\\\\n\\\\t\\\\tifFalse: [(POP3LoginError protocolInstance: self) signal: 'APOP (MD5) not supported.'].\\\\n\\\\n\\\\tself sendCommand: 'APOP ', self user, ' ', hash.\\\\n\\\\tself checkResponse.\\\\n\\\\tself logProgress: self lastResponse]\\\\n\\\\t\\\\ton: ProtocolClientError\\\\n\\\\t\\\\tdo: [:ex |\\\\n\\\\t\\\\t\\\\tself close.\\\\n\\\\t\\\\t\\\\t(LoginFailedException protocolInstance: self) signal: 'Login failed.']! !\\\\n\\\\n!POP3Client methodsFor: 'private protocol' stamp: 'mir 4/7/2003 17:38'!\\\\nclearTextLogin\\\\n\\\\n\\\\t[self sendCommand: 'USER ', self user.\\\\n\\\\tself checkResponse.\\\\n\\\\tself logProgress: self lastResponse.\\\\n\\\\n\\\\tself sendCommand: 'PASS ', self password.\\\\n\\\\tself checkResponse.\\\\n\\\\tself logProgress: self lastResponse]\\\\n\\\\t\\\\ton: TelnetProtocolError\\\\n\\\\t\\\\tdo: [:ex |\\\\n\\\\t\\\\t\\\\t\\\\\\\"Neither authentication worked.  Indicate an error and close up\\\\\\\"\\\\n\\\\t\\\\t\\\\tself close.\\\\n\\\\t\\\\t\\\\tex resignalAs: ((LoginFailedException protocolInstance: self) signal: 'Login failed.')]! !\\\\n\\\\n!POP3Client methodsFor: 'private protocol' stamp: 'mir 11/14/2002 17:40'!\\\\ngetMultilineResponse\\\\n\\\\t\\\\\\\"Get a multiple line response to the last command, filtering out LF characters. A multiple line response ends with a line containing only a single period (.) character.\\\\\\\"\\\\n\\\\n\\\\t| response done chunk |\\\\n\\\\tresponse _ WriteStream on: ''.\\\\n\\\\tdone _ false.\\\\n\\\\t[done] whileFalse: [\\\\n\\\\t\\\\tchunk _ self stream nextLine.\\\\n\\\\t\\\\t(chunk beginsWith: '.')\\\\n\\\\t\\\\t\\\\tifTrue: [response nextPutAll: (chunk copyFrom: 2 to: chunk size); cr ]\\\\n\\\\t\\\\t\\\\tifFalse: [response nextPutAll: chunk; cr ].\\\\n\\\\t\\\\tdone _ (chunk = '.') ].\\\\n\\\\n\\\\t^ response contents\\\\n! !\\\\n\\\\n!POP3Client methodsFor: 'private protocol' stamp: 'mir 4/7/2003 17:39'!\\\\nlogin\\\\n\\\\tself loginMethod\\\\n\\\\t\\\\tifNil: [^self].\\\\n\\\\tself loginMethod == #clearText\\\\n\\\\t\\\\tifTrue: [^self clearTextLogin].\\\\n\\\\tself loginMethod == #APOP\\\\n\\\\t\\\\tifTrue: [^self apopLogin].\\\\n\\\\t(POP3LoginError protocolInstance: self) signal: 'Unsupported login procedure.'! !\\\\n\\\\n\\\\n!POP3Client methodsFor: 'private testing' stamp: 'mir 3/7/2002 13:43'!\\\\nresponseIsError\\\\n\\\\t^self lastResponse beginsWith: '-'! !\\\\n\\\\n!POP3Client methodsFor: 'private testing' stamp: 'mir 11/11/2002 15:44'!\\\\nresponseIsWarning\\\\n\\\\t^self lastResponse beginsWith: '-'! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPOP3Client class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!POP3Client class methodsFor: 'accessing' stamp: 'mir 3/7/2002 12:51'!\\\\ndefaultPortNumber\\\\n\\\\t^110! !\\\\n\\\\n!POP3Client class methodsFor: 'accessing' stamp: 'mir 3/7/2002 12:52'!\\\\nlogFlag\\\\n\\\\t^#pop! !\\\\n\\\\n\\\\n!POP3Client class methodsFor: 'example' stamp: 'rbb 3/1/2005 11:05'!\\\\nexample\\\\n\\\\t\\\\\\\"POP3Client example\\\\\\\"\\\\n\\\\t\\\\\\\"download a user's messages into an OrderedCollection and inspect the OrderedCollection\\\\\\\"\\\\n\\\\n\\\\t| ps messages userName password |\\\\n\\\\tuserName := (UIManager default request: 'POP username').\\\\n\\\\tpassword := (UIManager default request: 'POP password').\\\\n\\\\tps := POP3Client openOnHostNamed: (UIManager default request: 'POP server').\\\\n\\\\t[\\\\n\\\\tps loginUser: userName password: password.\\\\n\\\\tps logProgressToTranscript.\\\\n\\\\n\\\\tmessages := OrderedCollection new.\\\\n\\\\t1 to: ps messageCount do: [ :messageNr |\\\\n\\\\t\\\\tmessages add: (ps retrieveMessage: messageNr) ]]\\\\n\\\\t\\\\tensure: [ps close].\\\\n\\\\n\\\\tmessages inspect.! !\\\\nProtocolClientError subclass: #POP3LoginError\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Network-Protocols'!\\\\n!POP3LoginError commentStamp: 'mir 5/12/2003 17:58' prior: 0!\\\\nException for signaling POP3 login failures.!\\\\n\\\\nObject subclass: #PRServerDirectory\\\\n\\\\tinstanceVariableNames: 'server directories'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Network-RemoteDirectory'!\\\\n!PRServerDirectory commentStamp: 'md 1/26/2004 12:40' prior: 0!\\\\nAdd support to publish or download projects from Small-Land Project\\\\nRepository (SLPR).\\\\n\\\\nThe SLPR has virtual folders where the projects appears.  The SLPR can\\\\nbe acceded from the FileList or from the web interface at\\\\nhttp://repository.small-land.org:8080\\\\n\\\\nBasically it's a type of superswiki (but better ;)).\\\\n\\\\nThe features in SMPR not present in SuperSwiki are:\\\\n\\\\n- Both the web interface and the squeak-side interface are full\\\\ntranslatable.   The server has translations for English and Spanish just\\\\nnow, but it's almost trivial to include other translations... Stef?\\\\nMarcus? ;)\\\\n\\\\n- The projects are categorized in \\\\\\\"virtual\\\\\\\" folder.  These folders (By\\\\nCategory, By Author, By Language, Alphabetical, etc) give us good\\\\nsearching behaviour just using the FileList and mouse clicks.\\\\n\\\\n- The web interface (also full translatable) has a search a la google.\\\\n\\\\n- All the urls to query the web interface are \\\\\\\"clean enough\\\\\\\" so google\\\\ncan make a good job indexing our content in .pr files.\\\\n\\\\n\\\\nIt's planned to add \\\\\\\"editing\\\\\\\" features to the web interface to\\\\nre-categorize, remove, etc projects.\\\\n\\\\n\\\\nEnjoy it,\\\\n\\\\n-- \\\\nDiego Gomez Deck\\\\nhttp://www.small-land.org!\\\\n\\\\n\\\\n!PRServerDirectory methodsFor: 'accessing' stamp: 'dgd 12/22/2003 07:35'!\\\\ndirectories\\\\n\\\\t\\\\\\\"answer the receiver's directories\\\\\\\"\\\\n\\\\t^ directories! !\\\\n\\\\n!PRServerDirectory methodsFor: 'accessing' stamp: 'dgd 12/22/2003 20:44'!\\\\ndirectory\\\\n\\\\t\\\\\\\"answer the receiver's directory\\\\\\\"\\\\n\\\\t| result |\\\\n\\\\tresult := String new writeStream.\\\\n\\\\tself directories\\\\n\\\\t\\\\tdo: [:each | result nextPutAll: each]\\\\n\\\\t\\\\tseparatedBy: [result nextPutAll: self slash].\\\\n\\\\t^ result contents! !\\\\n\\\\n!PRServerDirectory methodsFor: 'accessing' stamp: 'dgd 12/22/2003 21:01'!\\\\ndirectoryWrapperClass\\\\n\\\\t\\\\\\\"answer the class to be used as a wrapper in FileList2\\\\\\\"\\\\n\\\\t^ FileDirectoryWrapper! !\\\\n\\\\n!PRServerDirectory methodsFor: 'accessing' stamp: 'dgd 12/22/2003 20:44'!\\\\ndownloadUrl\\\\n\\\\t\\\\\\\"The url under which files will be accessible.\\\\\\\"\\\\n\\\\t^ (self urlFromServer: self server directories: {'programmatic'})\\\\n\\\\t\\\\t, self slash! !\\\\n\\\\n!PRServerDirectory methodsFor: 'accessing' stamp: 'dgd 12/27/2003 11:06'!\\\\nmoniker\\\\n\\\\t\\\\\\\"a plain language name for this directory\\\\\\\"\\\\n\\\\t^ self server! !\\\\n\\\\n!PRServerDirectory methodsFor: 'accessing' stamp: 'dgd 12/22/2003 20:53'!\\\\nrealUrl\\\\n\\\\t\\\\\\\"a fully expanded version of the url we represent.\\\\\\\"\\\\n\\\\t^self urlFromServer: self server directories: self directories! !\\\\n\\\\n!PRServerDirectory methodsFor: 'accessing' stamp: 'dgd 12/22/2003 07:40'!\\\\nserver\\\\n\\\\t\\\\\\\"answer the receiver's server\\\\\\\"\\\\n\\\\t^ server! !\\\\n\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/22/2003 20:25'!\\\\ncreateDirectory: localName \\\\n\\\\t\\\\\\\"Create a new sub directory within the current one\\\\\\\"\\\\n\\\\t^ self inform: 'operation not supported' translated! !\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/22/2003 20:24'!\\\\ndeleteFileNamed: localFileName \\\\n\\\\t\\\\\\\"Delete the file with the given name in this directory.\\\\\\\"\\\\n\\\\t^ self inform: 'operation not supported' translated! !\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/22/2003 20:45'!\\\\ndirectoryNamed: aString \\\\n\\\\t\\\\\\\"Return the subdirectory of this directory with the given name.\\\\\\\"\\\\n\\\\t^ self class server: self server directory: self directory , self slash, aString! !\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/22/2003 21:30'!\\\\ndirectoryNames\\\\n\\\\t\\\\\\\"Return a collection of names for the subdirectories of this \\\\n\\\\tdirectory. \\\\\\\"\\\\n\\\\t^ self entries\\\\n\\\\t\\\\tselect: [:entry | entry isDirectory]\\\\n\\\\t\\\\tthenCollect: [:entry | entry name]! !\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/22/2003 20:40'!\\\\nentries\\\\n\\\\t\\\\\\\"Return a collection of directory entries for the files and \\\\n\\\\tdirectories in this directory.\\\\\\\"\\\\n\\\\t| lines |\\\\n\\\\tlines := self getLines.\\\\n\\\\t^ lines isNil\\\\n\\\\t\\\\tifTrue: [#()] ifFalse:[\\\\n\\\\t\\\\n\\\\tself parseLines: lines]! !\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/22/2003 21:30'!\\\\nfileNames\\\\n\\\\t\\\\\\\"Return a collection of names for the files (but not directories) in this directory.\\\\\\\"\\\\n\\\\t^ self entries\\\\n\\\\t\\\\tselect: [:entry | entry isDirectory not]\\\\n\\\\t\\\\tthenCollect: [:entry | entry name]! !\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/22/2003 20:30'!\\\\nfullNameFor: aString \\\\n\\\\\\\"Return a corrected, fully-qualified name for the given file name.\\\\\\\"\\\\n\\\\t^ self urlFromServer: self server directories: self directories , {aString}! !\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/27/2003 12:36'!\\\\ngetOnly: numberOfBytes from: fileNameOnServer \\\\n\\\\t\\\\\\\"Just capture the first numberOfBytes of the file.  \\\\n\\\\t \\\\n\\\\tGoes faster for long files. Return the contents, not a stream.\\\\\\\"\\\\n\\\\t| fileName |\\\\n\\\\tself flag: #todo.\\\\n\\\\t\\\\\\\"use LRUCache\\\\\\\"\\\\n\\\\tfileName := fileNameOnServer\\\\n\\\\t\\\\t\\\\t\\\\tallButFirst: (fileNameOnServer lastIndexOf: self pathNameDelimiter).\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t^ self getOnly: numberOfBytes ofProjectContents: fileName! !\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/22/2003 20:33'!\\\\noldFileNamed: aName \\\\\\\"Open the existing file with the given name in this directory.\\\\\\\"\\\\n\\\\t^ self oldFileOrNoneNamed: aName! !\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/27/2003 11:35'!\\\\noldFileOrNoneNamed: fullName \\\\n\\\\t\\\\\\\"If the file exists, answer a read-only FileStream on it. If it  \\\\n\\\\tdoesn't, answer nil.\\\\\\\"\\\\n\\\\t| fileName contents |\\\\n\\\\tfileName := fullName\\\\n\\\\t\\\\t\\\\t\\\\tallButFirst: (fullName lastIndexOf: self pathNameDelimiter).\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tcontents := self getFullProjectContents: fileName.\\\\n\\\\tcontents isNil\\\\n\\\\t\\\\tifTrue: [^ nil].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t^ (SwikiPseudoFileStream with: contents) directory: self;\\\\n\\\\t\\\\t localName: fileName;\\\\n\\\\t\\\\t reset;\\\\n\\\\t\\\\t yourself! !\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/22/2003 07:58'!\\\\non: fullName \\\\n\\\\t\\\\\\\"Answer another ServerDirectory on the partial path name.  \\\\n\\\\tfullName is directory path, and does include the name of the  \\\\n\\\\tserver.\\\\\\\"\\\\n\\\\t^ self class fullPath: fullName!\\\\n]style[(4 8 3 133 4 4 17 8)f3b,f3cblue;b,f3,f3c146044000,f3,f3cmagenta;,f3,f3cblue;i! !\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/22/2003 20:39'!\\\\npathName\\\\\\\"Path name as used in reading the file. \\\\\\\"\\\\n\\\\t^ self urlFromServer: self server directories: self directories! !\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/22/2003 08:08'!\\\\npathParts\\\\n\\\\t\\\\\\\"Return the path from the root of the file system to this  \\\\n\\\\tdirectory as an array of directory names. On a remote server.\\\\\\\"\\\\n\\\\t^ (OrderedCollection with: self server) addAll: self directories;\\\\n\\\\t\\\\t yourself! !\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/22/2003 20:34'!\\\\nreadOnlyFileNamed: aName \\\\n\\\\\\\"Open the existing file with the given name in this directory for read-only access.\\\\\\\"\\\\n\\\\t^ self oldFileNamed: aName! !\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/22/2003 20:26'!\\\\nrename: fullName toBe: newName \\\\n\\\\t\\\\\\\"Rename a remote file. fullName is just be a fileName, or can \\\\n\\\\tbe directory path that includes name of the server. newName \\\\n\\\\tis just a fileName\\\\\\\"\\\\n\\\\t^ self inform: 'operation not supported' translated! !\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/22/2003 20:37'!\\\\nsleep\\\\\\\"Leave the FileList window. Do nothing. \\\\\\\"\\\\n\\\\t^ self! !\\\\n\\\\n!PRServerDirectory methodsFor: 'file directory' stamp: 'dgd 12/22/2003 20:32'!\\\\nwakeUp\\\\\\\"Entering a FileList window. Do nothing.\\\\\\\"\\\\n\\\\t^ self! !\\\\n\\\\n\\\\n!PRServerDirectory methodsFor: 'initialization' stamp: 'dgd 12/22/2003 20:46'!\\\\ninitializeServer: serverString directories: directoriesCollection \\\\n\\\\t\\\\\\\"initialize the receiver's server and directories\\\\\\\"\\\\n\\\\tserver := serverString withBlanksTrimmed.\\\\n\\\\tserver last = self pathNameDelimiter\\\\n\\\\t\\\\tifTrue: [server := server allButLast withBlanksTrimmed].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tdirectories := directoriesCollection! !\\\\n\\\\n\\\\n!PRServerDirectory methodsFor: 'path access' stamp: 'dgd 12/22/2003 20:41'!\\\\npathNameDelimiter\\\\\\\"Return the delimiter character for this kind of directory.\\\\\\\"\\\\n\\\\t^ $/! !\\\\n\\\\n!PRServerDirectory methodsFor: 'path access' stamp: 'dgd 12/22/2003 20:44'!\\\\nslash\\\\n\\\\\\\"answer the recevier 'slash'\\\\\\\"\\\\n\\\\t^ self pathNameDelimiter asString! !\\\\n\\\\n\\\\n!PRServerDirectory methodsFor: 'squeaklets' stamp: 'dgd 3/8/2006 17:38'!\\\\nwriteProject: aProject inFileNamed: fileNameString fromDirectory: localDirectory \\\\n\\\\t\\\\\\\"write aProject (a file version can be found in the file named  \\\\n\\\\tfileNameString in localDirectory)\\\\\\\"\\\\n\\\\t| url arguments answer string |\\\\n\\\\turl := self urlFromServer: self server directories: {'programmatic'. 'uploadproject'}.\\\\n\\\\targuments := self\\\\n\\\\t\\\\t\\\\t\\\\tgetPostArgsFromProject: aProject\\\\n\\\\t\\\\t\\\\t\\\\tfileNamed: fileNameString\\\\n\\\\t\\\\t\\\\t\\\\tfromDirectory: localDirectory.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tCursor read\\\\n\\\\t\\\\tshowWhile: [\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\tanswer := HTTPClient httpPostDocument: url args: arguments.\\\\n\\\\t\\\\t\\\\t\\\\\\\"answer := HTTPSocket httpGetDocument: url args: arguments.\\\\\\\"\\\\n\\\\t\\\\t\\\\tstring := answer contents.\\\\n\\\\t\\\\t\\\\t(string beginsWith: '--OK--')\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [^ true]].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tself\\\\n\\\\t\\\\tinform: ('Server responded: {1}' translated format: {string}).\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!PRServerDirectory methodsFor: 'testing' stamp: 'dgd 12/22/2003 20:39'!\\\\nacceptsUploads\\\\n\\\\t\\\\\\\"answer whatever the receiver accepts uploads\\\\\\\"\\\\n\\\\t^ true! !\\\\n\\\\n!PRServerDirectory methodsFor: 'testing' stamp: 'dgd 12/22/2003 00:42'!\\\\nisProjectSwiki\\\\n\\\\t\\\\\\\"answer whatever the receiver is a project swiki\\\\\\\"\\\\n\\\\t^ true! !\\\\n\\\\n!PRServerDirectory methodsFor: 'testing' stamp: 'dgd 12/27/2003 11:04'!\\\\nisRemoteDirectory\\\\n\\\\t\\\\\\\"answer whatever the receiver is a remote directory\\\\\\\"\\\\n\\\\t^ true! !\\\\n\\\\n!PRServerDirectory methodsFor: 'testing' stamp: 'dgd 12/21/2003 23:31'!\\\\nisSearchable\\\\n\\\\t\\\\\\\"answer whatever the receiver is searchable\\\\\\\"\\\\n\\\\t^ true! !\\\\n\\\\n!PRServerDirectory methodsFor: 'testing' stamp: 'dgd 8/17/2004 22:14'!\\\\nqueryProjectsAndShow: thingsToSearchForCollection \\\\n\\\\t\\\\\\\"query the server for all the projects that match  \\\\n\\\\tthingsToSearchForCollection\\\\\\\"\\\\n\\\\t| url arguments answer string |\\\\n\\\\turl := self urlFromServer: self server directories: {'programmatic'. 'queryprojects'}.\\\\n\\\\targuments := self getPostArgsFromThingsToSearchFor: thingsToSearchForCollection.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tCursor read\\\\n\\\\t\\\\tshowWhile: [\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\\\\"answer := HTTPClient httpPostDocument: url args:  \\\\n\\\\t\\\\t\\\\targs.\\\\\\\"\\\\n\\\\t\\\\t\\\\tanswer := HTTPSocket httpGetDocument: url args: arguments.\\\\n\\\\t\\\\t\\\\tstring := answer contents.\\\\n\\\\t\\\\t\\\\t(string beginsWith: '--OK--')\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [^ true]].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tself\\\\n\\\\t\\\\tinform: ('Server responded: {1}' translated format: {string}).\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!PRServerDirectory methodsFor: 'private' stamp: 'dgd 12/27/2003 11:34'!\\\\ngetFullProjectContents: aString \\\\n\\\\t\\\\\\\"private - get the project content from the server\\\\\\\"\\\\n\\\\t^ self getOnly: nil ofProjectContents: aString! !\\\\n\\\\n!PRServerDirectory methodsFor: 'private' stamp: 'dgd 8/17/2004 22:23'!\\\\ngetLines\\\\n\\\\t\\\\\\\"private - answer a collection of lines with the server response\\\\\\\"\\\\n\\\\t| url answer string lines |\\\\n\\\\turl := self urlFromServer: self server directories: {'programmatic'} , self directories.\\\\n\\\\turl := url , self slash.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tCursor read\\\\n\\\\t\\\\tshowWhile: [\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\tanswer := HTTPClient httpGetDocument: url.\\\\n\\\\t\\\\t\\\\tstring := answer contents.\\\\n\\\\t\\\\t\\\\t(string beginsWith: '--OK--')\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [^ nil]].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tlines := OrderedCollection new.\\\\n\\\\t(string allButFirst: 6)\\\\n\\\\t\\\\tlinesDo: [:line | lines add: line squeakToIso].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t^ lines! !\\\\n\\\\n!PRServerDirectory methodsFor: 'private' stamp: 'dgd 12/27/2003 12:37'!\\\\ngetOnly: numberOfBytes ofProjectContents: aString \\\\n\\\\t\\\\\\\"private - get numberOfBytes of the project contents\\\\\\\"\\\\n\\\\t| url answer contents args |\\\\n\\\\tself flag: #todo.\\\\n\\\\t\\\\\\\"use an LRUCache\\\\\\\"\\\\n\\\\turl := self urlFromServer: self server directories: {'programmatic'. aString}.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\targs := numberOfBytes isNil\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: ['numberOfBytes=' , numberOfBytes asString].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tCursor read\\\\n\\\\t\\\\tshowWhile: [\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\tanswer := HTTPSocket httpGetDocument: url args: args.\\\\n\\\\t\\\\t\\\\tcontents := answer contents].\\\\\\\"\\\\\\\"\\\\n\\\\t(contents beginsWith: '--OK--')\\\\n\\\\t\\\\tifFalse: [^ nil].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t^ contents allButFirst: 6! !\\\\n\\\\n!PRServerDirectory methodsFor: 'private' stamp: 'dgd 4/3/2006 13:27'!\\\\ngetPostArgsFromProject: aProject fileNamed: fileNameString fromDirectory: localDirectory \\\\n\\\\t| args thumbnail uploader |\\\\n\\\\targs := Dictionary new.\\\\n\\\\n\\\\t\\\\\\\"args at: 'contents' put: {(localDirectory oldFileNamed: fileNameString) contentsOfEntireFile}.\\\\\\\"\\\\n\\\\targs at: 'contents' put: {(StandardFileStream\\\\n\\\\t\\\\t\\\\treadOnlyFileNamed: (localDirectory fullNameFor: fileNameString)) contentsOfEntireFile}.\\\\n\\\\n\\\\targs at: 'name' put: {aProject name isoToSqueak}.\\\\n\\\\targs at: 'version' put: {(Project parseProjectFileName: fileNameString) second asString}.\\\\n\\\\targs at: 'language' put: {aProject naturalLanguage asString}.\\\\n\\\\n\\\\tuploader := Utilities authorNamePerSe.\\\\n\\\\tuploader isEmptyOrNil\\\\n\\\\t\\\\tifTrue: [uploader := Utilities authorInitialsPerSe].\\\\n\\\\tuploader isEmptyOrNil\\\\n\\\\t\\\\tifFalse: [args at: 'uploader' put: {uploader}].\\\\n\\\\n\\\\tself putSmalltalkInfoInto: args.\\\\n\\\\n\\\\tthumbnail := self getProjectThumbnail: aProject.\\\\n\\\\tthumbnail isNil\\\\n\\\\t\\\\tifFalse: [args at: 'thumbnailcontents' put: {thumbnail}].\\\\n\\\\n\\\\tself putProjectDetailsFrom: aProject to: args.\\\\n\\\\n\\\\t^ args! !\\\\n\\\\n!PRServerDirectory methodsFor: 'private' stamp: 'dgd 8/17/2004 22:14'!\\\\ngetPostArgsFromThingsToSearchFor: thingsToSearchForCollection \\\\n\\\\t| args |\\\\n\\\\targs := Dictionary new.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tthingsToSearchForCollection\\\\n\\\\t\\\\tdo: [:each | \\\\n\\\\t\\\\t\\\\t| pos | \\\\n\\\\t\\\\t\\\\tpos := each indexOf: $:.\\\\n\\\\t\\\\t\\\\tpos isZero\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [| key value | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tkey := (each first: pos - 1) withBlanksTrimmed.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tvalue := (each allButFirst: pos) withBlanksTrimmed.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(value beginsWith: '*')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [value := value allButFirst].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(value endsWith: '*')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [value := value allButLast].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\targs at: key put: {value}]].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t^ args! !\\\\n\\\\n!PRServerDirectory methodsFor: 'private' stamp: 'dgd 12/24/2003 11:33'!\\\\ngetProjectThumbnail: aProject \\\\n\\\\t\\\\\\\"private - answer a stream with the aProject's thumbnail or nil if none\\\\\\\"\\\\n\\\\t| form stream |\\\\n\\\\tform := aProject thumbnail.\\\\n\\\\tform isNil\\\\n\\\\t\\\\tifTrue: [^ nil].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tform unhibernate.\\\\n\\\\tform := form colorReduced.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tself flag: #todo.\\\\n\\\\t\\\\\\\"use a better image format than GIF\\\\\\\"\\\\n\\\\tstream := RWBinaryOrTextStream on: String new.\\\\n\\\\tGIFReadWriter putForm: form onStream: stream.\\\\n\\\\tstream reset.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t^ stream contents asString! !\\\\n\\\\n!PRServerDirectory methodsFor: 'private' stamp: 'dgd 12/22/2003 20:34'!\\\\nparseLine: aString \\\\n\\\\\\\"private - parse a line from a server response\\\\\\\"\\\\n\\\\t| tokens |\\\\n\\\\ttokens := aString findTokens: '|'.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t^ tokens first = 'D'\\\\n\\\\t\\\\tifTrue: [\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\tDirectoryEntry\\\\n\\\\t\\\\t\\\\t\\\\tname: tokens second\\\\n\\\\t\\\\t\\\\t\\\\tcreationTime: 0\\\\n\\\\t\\\\t\\\\t\\\\tmodificationTime: 0\\\\n\\\\t\\\\t\\\\t\\\\tisDirectory: true\\\\n\\\\t\\\\t\\\\t\\\\tfileSize: 0]\\\\n\\\\t\\\\tifFalse: [\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\tDirectoryEntry\\\\n\\\\t\\\\t\\\\t\\\\tname: tokens second\\\\n\\\\t\\\\t\\\\t\\\\tcreationTime: tokens third asInteger\\\\n\\\\t\\\\t\\\\t\\\\tmodificationTime: tokens fourth asInteger\\\\n\\\\t\\\\t\\\\t\\\\tisDirectory: false\\\\n\\\\t\\\\t\\\\t\\\\tfileSize: tokens fifth asInteger]! !\\\\n\\\\n!PRServerDirectory methodsFor: 'private' stamp: 'dgd 12/22/2003 20:38'!\\\\nparseLines: aCollection \\\\n\\\\\\\"private - parse aCollection of lines from a server response\\\\\\\"\\\\n\\\\t^ aCollection\\\\n\\\\t\\\\tcollect: [:each | self parseLine: each]! !\\\\n\\\\n!PRServerDirectory methodsFor: 'private' stamp: 'dgd 9/7/2004 12:16'!\\\\nputProjectDetailsFrom: aProject to: args \\\\n\\\\t| projectDetails |\\\\n\\\\tprojectDetails := aProject world\\\\n\\\\t\\\\t\\\\t\\\\tvalueOfProperty: #ProjectDetails\\\\n\\\\t\\\\t\\\\t\\\\tifAbsent: [^ self].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tself flag: #todo.\\\\n\\\\t\\\\\\\"projectname ?\\\\\\\"\\\\n\\\\tprojectDetails\\\\n\\\\t\\\\tat: 'projectdescription'\\\\n\\\\t\\\\tifPresent: [:value | args at: 'description' put: {value isoToSqueak}].\\\\n\\\\tprojectDetails\\\\n\\\\t\\\\tat: 'projectauthor'\\\\n\\\\t\\\\tifPresent: [:value | args at: 'author' put: {value isoToSqueak}].\\\\n\\\\tprojectDetails\\\\n\\\\t\\\\tat: 'projectcategory'\\\\n\\\\t\\\\tifPresent: [:value | args at: 'category' put: {value isoToSqueak}].\\\\n\\\\tprojectDetails\\\\n\\\\t\\\\tat: 'projectsubcategory'\\\\n\\\\t\\\\tifPresent: [:value | args at: 'subcategory' put: {value isoToSqueak}].\\\\n\\\\tprojectDetails\\\\n\\\\t\\\\tat: 'projectkeywords'\\\\n\\\\t\\\\tifPresent: [:value | args at: 'keywords' put: {value isoToSqueak}]! !\\\\n\\\\n!PRServerDirectory methodsFor: 'private' stamp: 'dgd 9/7/2004 12:13'!\\\\nputSmalltalkInfoInto: args \\\\n\\\\t\\\\\\\"private - fills args with information from Smalltalk\\\\\\\"\\\\n\\\\tself flag: #todo.\\\\n\\\\t\\\\\\\" \\\\n\\\\tlastest small-land changeset / small-land version  \\\\n\\\\t\\\\\\\"\\\\n\\\\t#(#datedVersion #osVersion #platformName #platformSubtype #vmPath #vmVersion #imageName #changesName #sourcesName #listBuiltinModules #listLoadedModules #getVMParameters )\\\\n\\\\t\\\\tdo: [:each | \\\\n\\\\t\\\\t\\\\t| value | \\\\n\\\\t\\\\t\\\\tvalue := SmalltalkImage current perform: each.\\\\n\\\\t\\\\t\\\\targs at: 'extra-' , each asString put: {value asString isoToSqueak}]! !\\\\n\\\\n!PRServerDirectory methodsFor: 'private' stamp: 'dgd 12/22/2003 20:47'!\\\\nurlFromServer: serverString directories: aCollection \\\\n\\\\t\\\\\\\"private - builds an url for server/directories\\\\\\\"\\\\n\\\\t| result |\\\\n\\\\tresult := String new writeStream.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t{serverString} , aCollection\\\\n\\\\t\\\\tdo: [:each | \\\\\\\"\\\\\\\"\\\\n\\\\t\\\\t\\\\tresult\\\\n\\\\t\\\\t\\\\t\\\\tnextPutAll: (each copyReplaceAll: ' ' with: '+')]\\\\n\\\\t\\\\tseparatedBy: [result nextPutAll: self slash].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t^ result contents! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPRServerDirectory class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PRServerDirectory class methodsFor: 'instance creation' stamp: 'dgd 12/22/2003 20:43'!\\\\nfullPath: fullNameString\\\\n\\\\t\\\\\\\"answer an instance of the receiver on fullName\\\\\\\"\\\\n\\\\t| pathParts |\\\\n\\\\tpathParts := self pathParts: fullNameString.\\\\n\\\\t^ self server: pathParts first directories: pathParts allButFirst! !\\\\n\\\\n!PRServerDirectory class methodsFor: 'instance creation' stamp: 'dgd 12/22/2003 20:43'!\\\\npathParts: fullName \\\\n\\\\t\\\\\\\"private - parse fullName in server and directory\\\\\\\"\\\\n\\\\t| url slashPos server directory |\\\\n\\\\turl := fullName.\\\\n\\\\t(url beginsWith: 'http://')\\\\n\\\\t\\\\tifTrue: [url := url allButFirst: 7].\\\\n\\\\turl last = $/\\\\n\\\\t\\\\tifTrue: [url := url allButLast].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tslashPos := url indexOf: $/.\\\\n\\\\tslashPos isZero\\\\n\\\\t\\\\tifTrue: [^ {'http://' , url}].\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tserver := url first: slashPos - 1.\\\\n\\\\tdirectory := url allButFirst: slashPos.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t^ {'http://' , server. directory}! !\\\\n\\\\n!PRServerDirectory class methodsFor: 'instance creation' stamp: 'dgd 12/22/2003 07:57'!\\\\nserver: serverString \\\\n\\\\t\\\\\\\"answer a new instance of the receiver on server aString\\\\\\\"\\\\n\\\\t^ self server: serverString directories: #()! !\\\\n\\\\n!PRServerDirectory class methodsFor: 'instance creation' stamp: 'dgd 12/22/2003 07:56'!\\\\nserver: serverString directories: aCollection \\\\n\\\\t\\\\\\\"answer a new instance of the receiver on server aString\\\\\\\"\\\\n\\\\t^ self new initializeServer: serverString directories: aCollection! !\\\\n\\\\n!PRServerDirectory class methodsFor: 'instance creation' stamp: 'dgd 12/22/2003 07:58'!\\\\nserver: serverString directory: directoryString \\\\n\\\\t\\\\\\\"answer a new instance of the receiver on server aString\\\\\\\"\\\\n\\\\t^ self new\\\\n\\\\t\\\\tinitializeServer: serverString\\\\n\\\\t\\\\tdirectories: (directoryString findTokens: '/')!\\\\n]style[(8 12 12 15 3 57 4 4 25 12 17 15 13 3 1)f3b,f3cblue;b,f3b,f3cblue;b,f3,f3c146044000,f3,f3cmagenta;,f3,f3cblue;i,f3,f3cblue;i,f3,f3c255146000b,f3! !\\\\nObject subclass: #PackageInfo\\\\n\\\\tinstanceVariableNames: 'packageName methodCategoryPrefix'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'PackageInfo-Base'!\\\\n!PackageInfo commentStamp: '<historical>' prior: 0!\\\\nSubclass this class to create new Packages.!\\\\n\\\\n\\\\n!PackageInfo methodsFor: 'comparing' stamp: 'avi 10/11/2003 14:20'!\\\\nhash\\\\n\\\\t^ packageName hash! !\\\\n\\\\n!PackageInfo methodsFor: 'comparing' stamp: 'avi 10/11/2003 00:09'!\\\\n= other\\\\n\\\\t^ other species = self species and: [other packageName = self packageName]! !\\\\n\\\\n\\\\n!PackageInfo methodsFor: 'dependencies' stamp: 'ab 11/18/2002 01:16'!\\\\nexternalCallers\\\\n\\\\t^ self \\\\n\\\\t\\\\texternalRefsSelect: [:literal | literal isKindOf: Symbol] \\\\n\\\\t\\\\tthenCollect: [:l | l].! !\\\\n\\\\n!PackageInfo methodsFor: 'dependencies' stamp: 'stephaneducasse 2/4/2006 20:40'!\\\\nexternalClasses\\\\n\\\\t| myClasses |\\\\n\\\\tmyClasses := self classesAndMetaClasses.\\\\n\\\\t^ Array streamContents:\\\\n\\\\t\\\\t[:s |\\\\n\\\\t\\\\tProtoObject withAllSubclassesDo:\\\\n\\\\t\\\\t\\\\t[:class |\\\\n\\\\t\\\\t\\\\t(myClasses includes: class) ifFalse: [s nextPut: class]]]! !\\\\n\\\\n!PackageInfo methodsFor: 'dependencies' stamp: 'stephaneducasse 2/4/2006 20:40'!\\\\nexternalRefsSelect: selBlock thenCollect: colBlock\\\\n\\\\t| pkgMethods dependents refs extMethods otherClasses otherMethods classNames |\\\\n\\\\n\\\\tclassNames := self classes collect: [:c | c name].\\\\n\\\\textMethods := self extensionMethods collect: [:mr | mr methodSymbol].\\\\n\\\\totherClasses := self externalClasses difference: self externalSubclasses.\\\\n\\\\totherMethods :=  otherClasses gather: [:c | c selectors].\\\\n\\\\tpkgMethods := self methods asSet collect: [:mr | mr methodSymbol].\\\\n\\\\tpkgMethods removeAllFoundIn: otherMethods.\\\\n\\\\n\\\\tdependents := Set new.\\\\n\\\\totherClasses do: [:c |\\\\n\\\\t\\\\tc selectorsAndMethodsDo:\\\\n\\\\t\\\\t\\\\t[:sel :compiled |\\\\n\\\\t\\\\t\\\\t(extMethods includes: sel) ifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t[refs := compiled literals select: selBlock thenCollect: colBlock.\\\\n\\\\t\\\\t\\\\t\\\\trefs do: [:ea |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t((classNames includes: ea) or: [pkgMethods includes: ea])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [dependents add: (self referenceForMethod: sel ofClass: c) -> ea]]]]].\\\\n\\\\t^ dependents! !\\\\n\\\\n!PackageInfo methodsFor: 'dependencies' stamp: 'stephaneducasse 2/4/2006 20:40'!\\\\nexternalSubclasses\\\\n\\\\t| pkgClasses subClasses |\\\\n\\\\tpkgClasses := self classes.\\\\n\\\\tsubClasses := Set new.\\\\n\\\\tpkgClasses do: [:c | subClasses addAll: (c allSubclasses)].\\\\n\\\\t^ subClasses difference: pkgClasses\\\\n! !\\\\n\\\\n!PackageInfo methodsFor: 'dependencies' stamp: 'ab 11/18/2002 01:15'!\\\\nexternalUsers\\\\n\\\\t^ self \\\\n\\\\t\\\\texternalRefsSelect: [:literal | literal isVariableBinding] \\\\n\\\\t\\\\tthenCollect: [:l | l key]! !\\\\n\\\\n\\\\n!PackageInfo methodsFor: 'listing' stamp: 'ac 5/14/2003 16:23'!\\\\nclasses\\\\n\\\\t^(self systemCategories gather:\\\\n\\\\t\\\\t[:cat |\\\\n\\\\t\\\\t(SystemOrganization listAtCategoryNamed: cat)\\\\n\\\\t\\\\t\\\\tcollect: [:className | Smalltalk at: className]])\\\\n\\\\t\\\\t\\\\t\\\\tsortBy: [:a :b | a className <= b className]! !\\\\n\\\\n!PackageInfo methodsFor: 'listing' stamp: 'al 12/14/2005 18:06'!\\\\nclassesAndMetaClasses\\\\n\\\\t| baseClasses |\\\\n\\\\tbaseClasses := self classes.\\\\n\\\\t^baseClasses , (baseClasses collect: [:c | c classSide])! !\\\\n\\\\n!PackageInfo methodsFor: 'listing' stamp: 'ab 11/13/2002 01:23'!\\\\ncoreMethods\\\\n\\\\t^ self classesAndMetaClasses gather: [:class | self coreMethodsForClass: class]! !\\\\n\\\\n!PackageInfo methodsFor: 'listing' stamp: 'al 3/1/2006 21:51'!\\\\nextensionClasses\\\\n\\\\t^ self externalBehaviors reject: [:classOrTrait | (self extensionCategoriesForClass: classOrTrait) isEmpty]! !\\\\n\\\\n!PackageInfo methodsFor: 'listing' stamp: 'al 3/1/2006 21:51'!\\\\nextensionMethods\\\\n\\\\t^ self externalBehaviors gather: [:classOrTrait | self extensionMethodsForClass: classOrTrait]! !\\\\n\\\\n!PackageInfo methodsFor: 'listing' stamp: 'stephaneducasse 2/4/2006 20:40'!\\\\nforeignClasses\\\\n\\\\t| s |\\\\n\\\\ts := IdentitySet new.\\\\n\\\\tself foreignSystemCategories\\\\n\\\\t\\\\tdo: [:c | (SystemOrganization listAtCategoryNamed: c)\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:cl | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t| cls | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcls := Smalltalk at: cl. \\\\n\\\\t\\\\t\\\\t\\\\t\\\\ts add: cls;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t  add: cls class]].\\\\n\\\\t^ s! !\\\\n\\\\n!PackageInfo methodsFor: 'listing' stamp: 'ab 12/3/2002 14:34'!\\\\nforeignSystemCategories\\\\n\\\\t^ SystemOrganization categories\\\\n\\\\t\\\\treject: [:cat | self includesSystemCategory: cat] ! !\\\\n\\\\n!PackageInfo methodsFor: 'listing' stamp: 'al 10/9/2005 20:00'!\\\\nmethods\\\\n\\\\t^ (self extensionMethods, self coreMethods) select: [:method |\\\\n\\\\t\\\\tmethod isValid\\\\n\\\\t\\\\t\\\\tand: [method isLocalSelector]\\\\n\\\\t\\\\t\\\\tand: [method methodSymbol isDoIt not]]! !\\\\n\\\\n!PackageInfo methodsFor: 'listing' stamp: 'avi 11/10/2003 15:35'!\\\\noverrideMethods\\\\n\\\\t^ self extensionMethods select: [:ea | self isOvverideMethod: ea]! !\\\\n\\\\n!PackageInfo methodsFor: 'listing' stamp: 'ab 11/14/2002 18:39'!\\\\nselectors\\\\n\\\\t^ self methods collect: [:ea | ea methodSymbol]! !\\\\n\\\\n!PackageInfo methodsFor: 'listing' stamp: 'ab 11/11/2002 21:51'!\\\\nsystemCategories\\\\n\\\\t^ SystemOrganization categories select: [:cat | self includesSystemCategory: cat]! !\\\\n\\\\n\\\\n!PackageInfo methodsFor: 'modifying' stamp: 'stephaneducasse 2/4/2006 20:40'!\\\\naddCoreMethod: aMethodReference\\\\n\\\\t| category |\\\\n\\\\tcategory := self baseCategoryOfMethod: aMethodReference.\\\\n\\\\taMethodReference actualClass organization\\\\n\\\\t\\\\tclassify: aMethodReference methodSymbol\\\\n\\\\t\\\\tunder: category\\\\n\\\\t\\\\tsuppressIfDefault: false! !\\\\n\\\\n!PackageInfo methodsFor: 'modifying' stamp: 'stephaneducasse 2/4/2006 20:40'!\\\\naddExtensionMethod: aMethodReference\\\\n\\\\t| category |\\\\n\\\\tcategory := self baseCategoryOfMethod: aMethodReference.\\\\n\\\\taMethodReference actualClass organization\\\\n\\\\t\\\\tclassify: aMethodReference methodSymbol\\\\n\\\\t\\\\tunder: self methodCategoryPrefix, '-', category! !\\\\n\\\\n!PackageInfo methodsFor: 'modifying' stamp: 'avi 10/11/2003 15:16'!\\\\naddMethod: aMethodReference\\\\n\\\\t(self includesClass: aMethodReference class)\\\\n\\\\t\\\\tifTrue: [self addCoreMethod: aMethodReference]\\\\n\\\\t\\\\tifFalse: [self addExtensionMethod: aMethodReference]! !\\\\n\\\\n!PackageInfo methodsFor: 'modifying' stamp: 'stephaneducasse 2/4/2006 20:40'!\\\\nbaseCategoryOfMethod: aMethodReference\\\\n\\\\t| oldCat oldPrefix tokens | \\\\n\\\\toldCat := aMethodReference category.\\\\n\\\\t({ 'as yet unclassified'. 'all' } includes: oldCat) ifTrue: [ oldCat := '' ].\\\\n\\\\ttokens := oldCat findTokens: '*-' keep: '*'.\\\\n\\\\n\\\\t\\\\\\\"Strip off any old prefixes\\\\\\\"\\\\n\\\\t((tokens at: 1 ifAbsent: [ '' ]) = '*') ifTrue: [\\\\n\\\\t\\\\t[ ((tokens at: 1 ifAbsent: [ '' ]) = '*') ]\\\\n\\\\t\\\\t\\\\twhileTrue: [ tokens removeFirst ].\\\\n\\\\t\\\\toldPrefix := tokens removeFirst asLowercase.\\\\n\\\\t\\\\t[ (tokens at: 1 ifAbsent: [ '' ]) asLowercase = oldPrefix ]\\\\n\\\\t\\\\t\\\\twhileTrue: [ tokens removeFirst ].\\\\n\\\\t].\\\\n\\\\n\\\\ttokens isEmpty ifTrue: [^ 'as yet unclassified'].\\\\n\\\\t^ String streamContents:\\\\n\\\\t\\\\t[ :s |\\\\n\\\\t\\\\ttokens\\\\n\\\\t\\\\t\\\\tdo: [ :tok | s nextPutAll: tok ]\\\\n\\\\t\\\\t\\\\tseparatedBy: [ s nextPut: $- ]]! !\\\\n\\\\n!PackageInfo methodsFor: 'modifying' stamp: 'al 3/1/2006 21:42'!\\\\nexternalBehaviors\\\\n\\\\t^self externalClasses , self externalTraits! !\\\\n\\\\n!PackageInfo methodsFor: 'modifying' stamp: 'al 3/1/2006 22:08'!\\\\nexternalTraits\\\\n\\\\t| behaviors |\\\\n\\\\t\\\\n\\\\t^ Array streamContents: [:s |\\\\n\\\\t\\\\tbehaviors := self classesAndMetaClasses.\\\\n\\\\t\\\\tSmalltalk allTraits do: [:trait |\\\\n\\\\t\\\\t\\\\t(behaviors includes: trait) ifFalse: [s nextPut: trait].\\\\n\\\\t\\\\t\\\\t(behaviors includes: trait classSide) ifFalse: [s nextPut: trait classSide]]].\\\\t\\\\t\\\\t! !\\\\n\\\\n!PackageInfo methodsFor: 'modifying' stamp: 'avi 10/11/2003 15:14'!\\\\nremoveMethod: aMethodReference! !\\\\n\\\\n\\\\n!PackageInfo methodsFor: 'naming' stamp: 'stephaneducasse 2/4/2006 20:40'!\\\\ncategoryName\\\\n\\\\t|category|\\\\n\\\\tcategory := self class category.\\\\n\\\\t^ (category endsWith: '-Info')\\\\n\\\\t\\\\tifTrue: [category copyUpToLast: $-]\\\\n\\\\t\\\\tifFalse: [category]! !\\\\n\\\\n!PackageInfo methodsFor: 'naming' stamp: 'ab 10/16/2002 21:22'!\\\\nexternalName\\\\n\\\\t^ self packageName! !\\\\n\\\\n!PackageInfo methodsFor: 'naming' stamp: 'stephaneducasse 2/4/2006 20:40'!\\\\nmethodCategoryPrefix\\\\n\\\\t^ methodCategoryPrefix ifNil: [methodCategoryPrefix := '*', self packageName asLowercase]! !\\\\n\\\\n!PackageInfo methodsFor: 'naming' stamp: 'stephaneducasse 2/4/2006 20:40'!\\\\npackageName\\\\n\\\\t^ packageName ifNil: [packageName := self categoryName]! !\\\\n\\\\n!PackageInfo methodsFor: 'naming' stamp: 'stephaneducasse 2/4/2006 20:40'!\\\\npackageName: aString\\\\n\\\\tpackageName := aString! !\\\\n\\\\n!PackageInfo methodsFor: 'naming' stamp: 'ab 10/28/2002 10:38'!\\\\nsystemCategoryPrefix\\\\n\\\\t^ self packageName! !\\\\n\\\\n\\\\n!PackageInfo methodsFor: 'registering' stamp: 'avi 11/12/2003 23:12'!\\\\nregister\\\\n\\\\tPackageOrganizer default registerPackage: self! !\\\\n\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'avi 3/9/2004 15:53'!\\\\ncategory: categoryName matches: prefix\\\\n\\\\t^ categoryName notNil and: [categoryName = prefix or: [categoryName beginsWith: prefix, '-']]! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'ab 11/13/2002 01:18'!\\\\ncoreCategoriesForClass: aClass\\\\n\\\\t^ aClass organization categories select: [:cat | (self isForeignClassExtension: cat) not]! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'ab 11/13/2002 01:22'!\\\\ncoreMethodsForClass: aClass\\\\n\\\\t^ (aClass selectors difference:\\\\n\\\\t\\\\t((self foreignExtensionMethodsForClass: aClass) collect: [:r | r methodSymbol]))\\\\n\\\\t\\\\t\\\\tasArray collect: [:sel | self referenceForMethod: sel ofClass: aClass]! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'ab 11/13/2002 01:20'!\\\\nextensionCategoriesForClass: aClass\\\\n\\\\t^ aClass organization categories select: [:cat | self isYourClassExtension: cat]! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'avi 4/6/2004 15:16'!\\\\nextensionMethodsForClass: aClass\\\\n\\\\t^ (self extensionCategoriesForClass: aClass)\\\\n\\\\t\\\\tgather: [:cat | ((aClass organization listAtCategoryNamed: cat) ifNil: [#()])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcollect: [:sel | self referenceForMethod: sel ofClass: aClass]]! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'dvf 10/18/2002 23:22'!\\\\nextensionMethodsFromClasses: classes\\\\n\\\\t^classes\\\\n\\\\t\\\\tgather: [:class | self extensionMethodsForClass: class]! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'ab 11/13/2002 01:22'!\\\\nforeignExtensionCategoriesForClass: aClass\\\\n\\\\t^ aClass organization categories select: [:cat | self isForeignClassExtension: cat]! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'ab 11/13/2002 01:23'!\\\\nforeignExtensionMethodsForClass: aClass\\\\n\\\\t^ (self foreignExtensionCategoriesForClass: aClass)\\\\n\\\\t\\\\tgather: [:cat | (aClass organization listAtCategoryNamed: cat)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t  collect: [:sel | self referenceForMethod: sel ofClass: aClass]]! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'dvf 7/23/2003 14:08'!\\\\nincludesClassNamed: aClassName\\\\n\\\\t^ self includesSystemCategory: ((SystemOrganization categoryOfElement: aClassName) ifNil: [^false])! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'ab 11/13/2002 01:23'!\\\\nincludesClass: aClass\\\\n\\\\t^ self includesSystemCategory: aClass theNonMetaClass category! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'dvf 7/23/2003 14:06'!\\\\nincludesMethodCategory: categoryName ofClassNamed: aClass\\\\n\\\\t^ (self isYourClassExtension: categoryName)\\\\n\\\\t\\\\tor: [(self includesClassNamed: aClass)\\\\n\\\\t\\\\t\\\\t\\\\tand: [(self isForeignClassExtension: categoryName) not]]! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'dvf 9/17/2002 00:18'!\\\\nincludesMethodCategory: categoryName ofClass: aClass\\\\n\\\\t^ (self isYourClassExtension: categoryName)\\\\n\\\\t\\\\tor: [(self includesClass: aClass)\\\\n\\\\t\\\\t\\\\t\\\\tand: [(self isForeignClassExtension: categoryName) not]]! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'ab 11/14/2002 18:06'!\\\\nincludesMethodReference: aMethodRef\\\\n\\\\t^ self includesMethod: aMethodRef methodSymbol ofClass: aMethodRef actualClass! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'ab 12/5/2002 00:16'!\\\\nincludesMethod: aSymbol ofClass: aClass\\\\n\\\\taClass ifNil: [^ false].\\\\n\\\\t^ self\\\\n\\\\t\\\\tincludesMethodCategory: ((aClass organization categoryOfElement: aSymbol)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifNil: [' '])\\\\n\\\\t\\\\tofClass: aClass! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'ab 11/13/2002 01:23'!\\\\nincludesSystemCategory: categoryName\\\\n\\\\t^ self category: categoryName matches: self systemCategoryPrefix! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'ab 11/13/2002 01:23'!\\\\nisForeignClassExtension: categoryName\\\\n\\\\t^ categoryName first = $* and: [(self isYourClassExtension: categoryName) not]! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'avi 11/10/2003 15:42'!\\\\nisOverrideMethod: aMethodReference\\\\n\\\\t^ aMethodReference category endsWith: '-override'! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'avi 3/10/2004 12:37'!\\\\nisYourClassExtension: categoryName\\\\n\\\\t^ categoryName notNil and: [self category: categoryName asLowercase matches: self methodCategoryPrefix]! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'dvf 10/18/2002 23:22'!\\\\noutsideClasses\\\\n\\\\t^ProtoObject withAllSubclasses difference: self classesAndMetaClasses! !\\\\n\\\\n!PackageInfo methodsFor: 'testing' stamp: 'ab 11/13/2002 01:25'!\\\\nreferenceForMethod: aSymbol ofClass: aClass\\\\n\\\\t^ MethodReference new setStandardClass: aClass methodSymbol: aSymbol! !\\\\n\\\\n\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPackageInfo class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PackageInfo class methodsFor: 'class initialization' stamp: 'avi 2/18/2004 00:46'!\\\\ninitialize\\\\n\\\\tself allSubclassesDo: [:ea | ea new register]! !\\\\n\\\\n\\\\n!PackageInfo class methodsFor: 'compatibility' stamp: 'avi 3/9/2004 16:28'!\\\\ndefault\\\\n\\\\t^ self allPackages detect: [:ea | ea class = self] ifNone: [self new register]! !\\\\n\\\\n\\\\n!PackageInfo class methodsFor: 'packages access' stamp: 'nk 3/9/2004 10:49'!\\\\nallPackages\\\\n\\\\t^PackageOrganizer default packages! !\\\\n\\\\n!PackageInfo class methodsFor: 'packages access' stamp: 'avi 11/12/2003 23:00'!\\\\nnamed: aString\\\\n\\\\t^ PackageOrganizer default packageNamed: aString ifAbsent: [(self new packageName: aString) register]! !\\\\n\\\\n!PackageInfo class methodsFor: 'packages access' stamp: 'avi 11/11/2003 17:19'!\\\\nregisterPackageName: aString\\\\n\\\\t^ PackageOrganizer default registerPackageNamed: aString! !\\\\nObject subclass: #PackageOrganizer\\\\n\\\\tinstanceVariableNames: 'packages'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'PackageInfo-Base'!\\\\n\\\\n!PackageOrganizer methodsFor: 'accessing' stamp: 'avi 11/12/2003 23:01'!\\\\npackageNames\\\\n\\\\t^ packages keys! !\\\\n\\\\n!PackageOrganizer methodsFor: 'accessing' stamp: 'avi 11/12/2003 23:01'!\\\\npackages\\\\n\\\\t^ packages values! !\\\\n\\\\n\\\\n!PackageOrganizer methodsFor: 'initializing' stamp: 'stephaneducasse 2/4/2006 20:40'!\\\\ninitialize\\\\n\\\\tpackages := Dictionary new! !\\\\n\\\\n\\\\n!PackageOrganizer methodsFor: 'registering' stamp: 'avi 11/12/2003 23:01'!\\\\nregisterPackage: aPackageInfo\\\\n\\\\tpackages at: aPackageInfo packageName put: aPackageInfo.\\\\n\\\\tself changed: #packages; changed: #packageNames.\\\\n! !\\\\n\\\\n!PackageOrganizer methodsFor: 'registering' stamp: 'avi 11/12/2003 21:08'!\\\\nregisterPackageNamed: aString\\\\n\\\\t^ self registerPackage: (PackageInfo named: aString)! !\\\\n\\\\n!PackageOrganizer methodsFor: 'registering' stamp: 'avi 11/12/2003 23:08'!\\\\nunregisterPackage: aPackageInfo\\\\n\\\\tpackages removeKey: aPackageInfo packageName ifAbsent: [].\\\\t\\\\n\\\\tself changed: #packages; changed: #packageNames.\\\\n! !\\\\n\\\\n!PackageOrganizer methodsFor: 'registering' stamp: 'avi 11/12/2003 21:10'!\\\\nunregisterPackageNamed: aString\\\\n\\\\tself unregisterPackage: (self packageNamed: aString ifAbsent: [^ self])! !\\\\n\\\\n\\\\n!PackageOrganizer methodsFor: 'searching' stamp: 'avi 10/11/2003 14:21'!\\\\nnoPackageFound\\\\n\\\\tself error: 'No package found'! !\\\\n\\\\n!PackageOrganizer methodsFor: 'searching' stamp: 'avi 11/12/2003 23:08'!\\\\npackageNamed: aString ifAbsent: errorBlock\\\\n\\\\t^ packages at: aString ifAbsent: errorBlock! !\\\\n\\\\n!PackageOrganizer methodsFor: 'searching' stamp: 'avi 10/11/2003 14:21'!\\\\npackageOfClass: aClass\\\\n\\\\t^ self packageOfClass: aClass ifNone: [self noPackageFound]! !\\\\n\\\\n!PackageOrganizer methodsFor: 'searching' stamp: 'avi 10/11/2003 14:22'!\\\\npackageOfClass: aClass ifNone: errorBlock\\\\n\\\\t^ self packages detect: [:ea | ea includesClass: aClass] ifNone: errorBlock! !\\\\n\\\\n!PackageOrganizer methodsFor: 'searching' stamp: 'avi 10/11/2003 14:21'!\\\\npackageOfMethod: aMethodReference\\\\n\\\\t^ self packageOfMethod: aMethodReference ifNone: [self noPackageFound]! !\\\\n\\\\n!PackageOrganizer methodsFor: 'searching' stamp: 'avi 10/11/2003 14:22'!\\\\npackageOfMethod: aMethodReference ifNone: errorBlock\\\\n\\\\t^ self packages detect: [:ea | ea includesMethodReference: aMethodReference] ifNone: errorBlock! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPackageOrganizer class\\\\n\\\\tinstanceVariableNames: 'default'!\\\\n\\\\n!PackageOrganizer class methodsFor: 'as yet unclassified' stamp: 'stephaneducasse 2/4/2006 20:40'!\\\\ndefault\\\\n\\\\t^ default ifNil: [default := self new]! !\\\\n\\\\n!PackageOrganizer class methodsFor: 'as yet unclassified' stamp: 'avi 10/13/2003 15:25'!\\\\nnew\\\\n\\\\t^ self basicNew initialize! !\\\\nBrowser subclass: #PackagePaneBrowser\\\\n\\\\tinstanceVariableNames: 'package packageListIndex packageList'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Tools-Browser'!\\\\n!PackagePaneBrowser commentStamp: '<historical>' prior: 0!\\\\nA package browser represents a hierarchical query path through an organization of class and method information.   It parses class categories into a two-level hierarchy on the first '-' character, giving \\\\\\\"packages\\\\\\\" (e.g.,  Magnitude, Collections, Graphics, etc.), and \\\\\\\"categories\\\\\\\" (e.g., Magnitude-General and Magnitude-Number).\\\\n\\\\nInstance Variables:\\\\n\\\\tpackage  <Symbol> the \\\\\\\"category header,\\\\\\\" e.g., #Magnitudes or #Collections\\\\n\\\\tpackageListIndex <Integer> The index in the package list\\\\n\\\\tpackageList  <OrderedCollection of String> the list of package names\\\\n!\\\\n\\\\n\\\\n!PackagePaneBrowser methodsFor: 'class list' stamp: 'JF 7/30/2003 12:26'!\\\\nclassList\\\\n\\\\t\\\\\\\"Answer an array of the class names of the selected category. Answer an \\\\n\\\\tempty array if no selection exists.\\\\\\\"\\\\n\\\\n\\\\t^ self hasSystemCategorySelected \\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self packageClasses]\\\\n\\\\t\\\\tifTrue: [systemOrganizer listAtCategoryNumber:\\\\n\\\\t\\\\t\\\\t(systemOrganizer categories indexOf: self selectedSystemCategoryName asSymbol)]! !\\\\n\\\\n!PackagePaneBrowser methodsFor: 'class list' stamp: 'JF 7/30/2003 12:36'!\\\\npackageClasses\\\\n\\\\t^ self categoryExistsForPackage\\\\n\\\\t\\\\tifFalse: [Array new]\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[systemOrganizer listAtCategoryNumber:\\\\n\\\\t\\\\t\\\\t\\\\t(systemOrganizer categories indexOf: self package asSymbol)]! !\\\\n\\\\n!PackagePaneBrowser methodsFor: 'class list' stamp: 'md 3/3/2006 11:04'!\\\\nselectedClass\\\\n\\\\t\\\\\\\"Answer the class that is currently selected. Answer nil if no selection \\\\n\\\\texists.\\\\\\\"\\\\n\\\\n\\\\t| name envt |\\\\n\\\\t(name := self selectedClassName) ifNil: [^ nil].\\\\n\\\\t\\\\\\\"(envt := self selectedEnvironment) ifNil: [^ nil].\\\\\\\"\\\\n\\\\tenvt:= Smalltalk.\\\\n\\\\t^ envt at: name! !\\\\n\\\\n\\\\n!PackagePaneBrowser methodsFor: 'dragNDrop' stamp: 'sd 11/20/2005 21:27'!\\\\nchangeCategoryForClass: class srcSystemCategory: srcSystemCategorySel atListMorph: dstListMorph internal: internal copy: copyFlag \\\\n\\\\t\\\\\\\"only move semantic\\\\\\\"\\\\n\\\\t| newClassCategory success |\\\\n\\\\tself flag: #stringSymbolProblem.\\\\n\\\\tsuccess := copyFlag not ifFalse: [^ false].\\\\n\\\\tnewClassCategory := self dstCategoryDstListMorph: dstListMorph internal: internal.\\\\n\\\\t(success := newClassCategory notNil & (newClassCategory ~= class category))\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[class category: newClassCategory.\\\\n\\\\t\\\\t\\\\tself changed: #classList.\\\\n\\\\t\\\\t\\\\tinternal ifFalse: [self selectClass: class]].\\\\n\\\\t^ success! !\\\\n\\\\n\\\\n!PackagePaneBrowser methodsFor: 'dragNDrop util' stamp: 'sd 11/20/2005 21:27'!\\\\ndstCategoryDstListMorph: dstListMorph internal: internal \\\\n\\\\t| dropItem |\\\\n\\\\t^ internal & (dstListMorph getListSelector == #systemCategoryList)\\\\n\\\\t\\\\tifTrue: [(dropItem := dstListMorph potentialDropItem) ifNotNil: [(self package , '-' , dropItem) asSymbol]]\\\\n\\\\t\\\\tifFalse: [self selectedSystemCategoryName]! !\\\\n\\\\n\\\\n!PackagePaneBrowser methodsFor: 'initialize-release' stamp: 'sw 1/13/2000 16:45'!\\\\ndefaultBrowserTitle\\\\n\\\\t^ 'Package Browser'! !\\\\n\\\\n!PackagePaneBrowser methodsFor: 'initialize-release' stamp: 'sd 11/20/2005 21:27'!\\\\nopenAsMorphEditing: editString \\\\n\\\\t\\\\\\\"Create a pluggable version of all the views for a Browser, including \\\\n\\\\tviews and controllers.\\\\\\\"\\\\n\\\\t\\\\\\\"PackagePaneBrowser openBrowser\\\\\\\"\\\\n\\\\n\\\\t| listHeight window |\\\\n\\\\tlistHeight := 0.4.\\\\n\\\\t(window := SystemWindow labelled: 'later') model: self.\\\\n\\\\twindow\\\\n\\\\t\\\\taddMorph: (PluggableListMorph\\\\n\\\\t\\\\t\\\\t\\\\ton: self\\\\n\\\\t\\\\t\\\\t\\\\tlist: #packageList\\\\n\\\\t\\\\t\\\\t\\\\tselected: #packageListIndex\\\\n\\\\t\\\\t\\\\t\\\\tchangeSelected: #packageListIndex:\\\\n\\\\t\\\\t\\\\t\\\\tmenu: #packageMenu:\\\\n\\\\t\\\\t\\\\t\\\\tkeystroke: #packageListKey:from:)\\\\n\\\\t\\\\tframe: (0 @ 0 extent: 0.15 @ listHeight).\\\\n\\\\twindow\\\\n\\\\t\\\\taddMorph: self buildMorphicSystemCatList\\\\n\\\\t\\\\tframe: (0.15 @ 0 extent: 0.2 @ listHeight).\\\\n\\\\tself\\\\n\\\\t\\\\taddClassAndSwitchesTo: window\\\\n\\\\t\\\\tat: (0.35 @ 0 extent: 0.25 @ listHeight)\\\\n\\\\t\\\\tplus: 0.\\\\n\\\\twindow\\\\n\\\\t\\\\taddMorph: self buildMorphicMessageCatList\\\\n\\\\t\\\\tframe: (0.6 @ 0 extent: 0.15 @ listHeight).\\\\n\\\\twindow\\\\n\\\\t\\\\taddMorph: self buildMorphicMessageList\\\\n\\\\t\\\\tframe: (0.75 @ 0 extent: 0.25 @ listHeight).\\\\n\\\\tself\\\\n\\\\t\\\\taddLowerPanesTo: window\\\\n\\\\t\\\\tat: (0 @ listHeight corner: 1 @ 1)\\\\n\\\\t\\\\twith: editString.\\\\n\\\\twindow setUpdatablePanesFrom: #(#packageList #systemCategoryList #classList #messageCategoryList #messageList ).\\\\n\\\\t^ window! !\\\\n\\\\n!PackagePaneBrowser methodsFor: 'initialize-release' stamp: 'stp 10/06/1998 22:02'!\\\\nsystemOrganizer: aSystemOrganizer \\\\n\\\\t\\\\\\\"Initialize the receiver as a perspective on the system organizer, \\\\n\\\\taSystemOrganizer. Typically there is only one--the system variable \\\\n\\\\tSystemOrganization.\\\\\\\"\\\\n\\\\n\\\\tsuper systemOrganizer: aSystemOrganizer .\\\\n\\\\tpackageListIndex := 0! !\\\\n\\\\n\\\\n!PackagePaneBrowser methodsFor: 'package list' stamp: 'JF 7/30/2003 12:35'!\\\\ncategoryExistsForPackage\\\\n\\\\t^ self hasPackageSelected\\\\n\\\\t\\\\tand: [(systemOrganizer categories indexOf: self package asSymbol) ~= 0]\\\\n! !\\\\n\\\\n!PackagePaneBrowser methodsFor: 'package list' stamp: 'JF 7/30/2003 12:24'!\\\\nhasPackageSelected\\\\n\\\\n\\\\t^ packageListIndex ~= 0! !\\\\n\\\\n!PackagePaneBrowser methodsFor: 'package list' stamp: 'sd 11/20/2005 21:27'!\\\\nopenEditString: aString\\\\n\\\\t\\\\\\\"Create a pluggable version of all the views for a Browser, including views and controllers.\\\\\\\"\\\\n\\\\t\\\\\\\"PackageBrowser openBrowser\\\\\\\"\\\\n\\\\n\\\\t| packageListView systemCategoryListView classListView messageCategoryListView\\\\n\\\\t  messageListView browserCodeView topView switchView annotationPane underPane y optionalButtonsView |\\\\n\\\\n\\\\tself couldOpenInMorphic ifTrue: [^ self openAsMorphEditing: aString].\\\\n\\\\n\\\\ttopView := StandardSystemView new model: self.\\\\n\\\\ttopView borderWidth: 1.  \\\\\\\"label and minSize taken care of by caller\\\\\\\"\\\\n\\\\n\\\\tpackageListView := PluggableListView on: self\\\\n\\\\t\\\\tlist: #packageList\\\\n\\\\t\\\\tselected: #packageListIndex\\\\n\\\\t\\\\tchangeSelected: #packageListIndex:\\\\n\\\\t\\\\tmenu: #packageMenu:.\\\\n\\\\tpackageListView window: (0 @ 0 extent: 20 @ 70).\\\\n\\\\ttopView addSubView: packageListView.\\\\n\\\\n\\\\tsystemCategoryListView := PluggableListView on: self\\\\n\\\\t\\\\tlist: #systemCategoryList\\\\n\\\\t\\\\tselected: #systemCategoryListIndex\\\\n\\\\t\\\\tchangeSelected: #systemCategoryListIndex:\\\\n\\\\t\\\\tmenu: #systemCategoryMenu:.\\\\n\\\\tsystemCategoryListView window: (20 @ 0 extent: 30 @ 70).\\\\n\\\\ttopView addSubView: systemCategoryListView.\\\\n\\\\n\\\\tclassListView := PluggableListView on: self\\\\n\\\\t\\\\tlist: #classList\\\\n\\\\t\\\\tselected: #classListIndex\\\\n\\\\t\\\\tchangeSelected: #classListIndex:\\\\n\\\\t\\\\tmenu: #classListMenu:shifted:.\\\\n\\\\tclassListView window: (0 @ 0 extent: 50 @ 62).\\\\n\\\\ttopView addSubView: classListView toRightOf: systemCategoryListView.\\\\n\\\\n\\\\tswitchView := self buildInstanceClassSwitchView.\\\\n\\\\tswitchView borderWidth: 1.\\\\n\\\\ttopView addSubView: switchView below: classListView.\\\\n\\\\n\\\\tmessageCategoryListView := PluggableListView on: self\\\\n\\\\t\\\\tlist: #messageCategoryList\\\\n\\\\t\\\\tselected: #messageCategoryListIndex\\\\n\\\\t\\\\tchangeSelected: #messageCategoryListIndex:\\\\n\\\\t\\\\tmenu: #messageCategoryMenu:.\\\\n\\\\tmessageCategoryListView window: (0 @ 0 extent: 50 @ 70).\\\\n\\\\ttopView addSubView: messageCategoryListView toRightOf: classListView.\\\\n\\\\n\\\\tmessageListView := PluggableListView on: self\\\\n\\\\t\\\\tlist: #messageList\\\\n\\\\t\\\\tselected: #messageListIndex\\\\n\\\\t\\\\tchangeSelected: #messageListIndex:\\\\n\\\\t\\\\tmenu: #messageListMenu:shifted:\\\\n\\\\t\\\\tkeystroke: #messageListKey:from:.\\\\n\\\\tmessageListView window: (0 @ 0 extent: 50 @ 70).\\\\n\\\\ttopView addSubView: messageListView toRightOf: messageCategoryListView.\\\\n\\\\n\\\\tself wantsAnnotationPane\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[annotationPane := PluggableTextView on: self\\\\n\\\\t\\\\t\\\\t\\\\ttext: #annotation accept: nil\\\\n\\\\t\\\\t\\\\t\\\\treadSelection: nil menu: nil.\\\\n\\\\t\\\\t\\\\tannotationPane window: (0@0 extent: 200@self optionalAnnotationHeight).\\\\n\\\\t\\\\t\\\\ttopView addSubView: annotationPane below: packageListView.\\\\n\\\\t\\\\t\\\\tunderPane := annotationPane.\\\\n\\\\t\\\\t\\\\ty := 110 - self optionalAnnotationHeight]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[underPane := packageListView.\\\\n\\\\t\\\\t\\\\ty := 110].\\\\n\\\\n\\\\tself wantsOptionalButtons ifTrue:\\\\n\\\\t\\\\t[optionalButtonsView := self buildOptionalButtonsView.\\\\n\\\\t\\\\toptionalButtonsView borderWidth: 1.\\\\n\\\\t\\\\ttopView addSubView: optionalButtonsView below: underPane.\\\\n\\\\t\\\\tunderPane := optionalButtonsView.\\\\n\\\\t\\\\ty := y - self optionalButtonHeight].\\\\n\\\\n\\\\tbrowserCodeView := MvcTextEditor default on: self \\\\n\\\\t\\\\t\\\\ttext: #contents accept: #contents:notifying:\\\\n\\\\t\\\\t\\\\treadSelection: #contentsSelection menu: #codePaneMenu:shifted:.\\\\n\\\\tbrowserCodeView window: (0@0 extent: 200@y).\\\\n\\\\ttopView addSubView: browserCodeView below: underPane.\\\\n\\\\taString ifNotNil: [browserCodeView editString: aString.\\\\n\\\\t\\\\t\\\\tbrowserCodeView hasUnacceptedEdits: true].\\\\n\\\\t^ topView! !\\\\n\\\\n!PackagePaneBrowser methodsFor: 'package list' stamp: 'JF 7/30/2003 12:25'!\\\\npackage\\\\n\\\\t\\\\\\\"Answer the receiver's 'package'.\\\\\\\"\\\\n\\\\n\\\\t^ self hasPackageSelected\\\\n\\\\t\\\\tifFalse: [nil]\\\\n\\\\t\\\\tifTrue: [self packageList at: packageListIndex]\\\\n! !\\\\n\\\\n!PackagePaneBrowser methodsFor: 'package list' stamp: 'stp 10/05/1998 20:36'!\\\\npackageList\\\\n\\\\t\\\\\\\"Answer a list of the packages in the current system organization.\\\\\\\"\\\\n\\\\n\\\\t| str cats stream |\\\\n\\\\tstr := Set new: 100.\\\\n\\\\tstream := WriteStream on: (Array new: 100).\\\\n\\\\tsystemOrganizer categories do:\\\\n\\\\t\\\\t[ :categ | \\\\n\\\\t\\\\tcats := categ asString copyUpTo: $-.\\\\n\\\\t\\\\t(str includes: cats) ifFalse: \\\\n\\\\t\\\\t\\\\t[str add: cats.\\\\n\\\\t\\\\t\\\\tstream nextPut: cats]].\\\\n\\\\t^stream contents! !\\\\n\\\\n!PackagePaneBrowser methodsFor: 'package list' stamp: 'stp 10/05/1998 19:48'!\\\\npackageListIndex\\\\n\\\\t\\\\\\\"Answer the index of the current package selection.\\\\\\\"\\\\n\\\\n\\\\t^packageListIndex! !\\\\n\\\\n!PackagePaneBrowser methodsFor: 'package list' stamp: 'stp 12/01/1998 02:46'!\\\\npackageListIndex: anInteger \\\\n\\\\t\\\\\\\"Set anInteger to be the index of the current package selection.\\\\\\\"\\\\n\\\\n\\\\tpackageListIndex := anInteger.\\\\n\\\\tanInteger = 0\\\\n\\\\t\\\\tifFalse: [package := self packageList at: packageListIndex].\\\\n\\\\tmessageCategoryListIndex := 0.\\\\n\\\\tsystemCategoryListIndex := 0.\\\\n\\\\tmessageListIndex := 0.\\\\n\\\\tclassListIndex := 0.\\\\n\\\\tself setClassOrganizer.\\\\n\\\\tself changed: #packageSelectionChanged.\\\\n\\\\tself changed: #packageListIndex.\\\\t\\\\\\\"update my selection\\\\\\\"\\\\n\\\\tself changed: #systemCategoryList.\\\\t\\\\\\\"update the category list\\\\\\\"\\\\n\\\\tself systemCategoryListIndex: 0.\\\\t\\\\\\\"update category list selection\\\\\\\"\\\\n! !\\\\n\\\\n!PackagePaneBrowser methodsFor: 'package list' stamp: 'stp 10/06/1998 19:59'!\\\\npackageMenu: aMenu\\\\n\\\\t\\\\\\\"Answer a Menu of operations on class packages to be \\\\n\\\\tdisplayed when the operate menu button is pressed.\\\\\\\"\\\\n\\\\n\\\\t^aMenu\\\\n\\\\t\\\\t\\\\tlabels: 'find class...\\\\\\\\recent classes...\\\\\\\\reorganize\\\\\\\\update' withCRs\\\\n\\\\t\\\\t\\\\tlines: #(2)\\\\n\\\\t\\\\t\\\\tselections: #(#findClass #recent #editSystemCategories #updatePackages)! !\\\\n\\\\n!PackagePaneBrowser methodsFor: 'package list' stamp: 'nk 2/14/2004 15:09'!\\\\nupdatePackages\\\\n\\\\t\\\\\\\"Update the contents of the package list.\\\\\\\"\\\\n\\\\n\\\\tself editSelection: #none.\\\\n\\\\tself changed: #packageList.\\\\n\\\\tself changed: #package.\\\\n\\\\tself packageListIndex: 0 ! !\\\\n\\\\n\\\\n!PackagePaneBrowser methodsFor: 'system category list' stamp: 'JF 7/30/2003 12:23'!\\\\nhasSystemCategorySelected\\\\n\\\\t^ systemCategoryListIndex ~= 0! !\\\\n\\\\n!PackagePaneBrowser methodsFor: 'system category list' stamp: 'stp 01/13/2000 12:59'!\\\\nselectCategoryForClass: theClass\\\\n\\\\t\\\\\\\"Set the package and category lists to display the given class.\\\\\\\"\\\\n\\\\n\\\\t| cat |\\\\n\\\\tcat := theClass category.\\\\n\\\\tself packageListIndex: (self packageList indexOf: (cat copyUpTo: $-)).\\\\t\\\\n\\\\tself systemCategoryListIndex: (self systemCategoryList indexOf: \\\\n\\\\t\\\\t\\\\t(cat copyFrom: ((cat indexOf: $- ifAbsent: [0]) + 1) to: cat size)).! !\\\\n\\\\n!PackagePaneBrowser methodsFor: 'system category list' stamp: 'di 12/20/1999 20:16'!\\\\nselectedSystemCategoryName\\\\n\\\\t\\\\\\\"Answer the name of the selected system category or nil.\\\\\\\"\\\\n\\\\n\\\\tsystemCategoryListIndex = 0\\\\n\\\\t\\\\tifTrue: [^nil].\\\\n\\\\tpackageListIndex = 0\\\\n\\\\t\\\\tifTrue: [^ self systemCategoryList at: systemCategoryListIndex].\\\\n\\\\t^ self package , '-' , (self systemCategoryList at: systemCategoryListIndex)! !\\\\n\\\\n!PackagePaneBrowser methodsFor: 'system category list' stamp: 'di 12/16/1999 16:14'!\\\\nsystemCategoryList\\\\n\\\\t\\\\\\\"Answer the sequenceable collection containing the class categories that \\\\n\\\\tthe receiver accesses.\\\\\\\"\\\\n\\\\n\\\\t| prefix |\\\\n\\\\tpackageListIndex = 0 ifTrue: [^ systemOrganizer categories].\\\\n\\\\tprefix := self package, '-'.\\\\n\\\\t^ Array streamContents:\\\\n\\\\t\\\\t[:strm |\\\\n\\\\t\\\\tsystemOrganizer categories do: \\\\n\\\\t\\\\t\\\\t[ :cat | (cat beginsWith: prefix) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[strm nextPut: (cat copyFrom: prefix size + 1 to: cat size)]]]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPackagePaneBrowser class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PackagePaneBrowser class methodsFor: 'class initialization' stamp: 'hpt 8/5/2004 20:12'!\\\\nregisterInAppRegistry\\\\n\\\\t\\\\\\\"Register the receiver in the SystemBrowser AppRegistry\\\\\\\"\\\\n\\\\tSystemBrowser register: self.! !\\\\n\\\\n\\\\n!PackagePaneBrowser class methodsFor: 'instance creation' stamp: 'sd 11/20/2005 21:28'!\\\\nprototypicalToolWindow\\\\n\\\\t\\\\\\\"Answer an example of myself seen in a tool window, for the benefit of parts-launching tools\\\\\\\"\\\\n\\\\n\\\\t| aWindow |\\\\n\\\\taWindow := self new openAsMorphEditing: nil.\\\\n\\\\taWindow setLabel: 'Package Browser'.\\\\n\\\\taWindow applyModelExtent.\\\\n\\\\t^ aWindow\\\\n! !\\\\n\\\\n\\\\n!PackagePaneBrowser class methodsFor: 'window color' stamp: 'sw 2/26/2002 14:39'!\\\\nwindowColorSpecification\\\\n\\\\t\\\\\\\"Answer a WindowColorSpec object that declares my preference\\\\\\\"\\\\n\\\\n\\\\t^ WindowColorSpec classSymbol: self name wording: 'Package Browser' brightColor: #(1.0 1.0 0.6)\\\\t pastelColor: #(0.976 0.976 0.835) helpMessage: 'A system browser with an extra pane at top-left for module.'! !\\\\n\\\\n\\\\n!PackagePaneBrowser class methodsFor: '*MorphicExtras-class initialization' stamp: 'hpt 8/5/2004 20:12'!\\\\ninitialize\\\\n\\\\n\\\\tself registerInFlapsRegistry;\\\\n\\\\t\\\\tregisterInAppRegistry.! !\\\\n\\\\n!PackagePaneBrowser class methodsFor: '*MorphicExtras-class initialization' stamp: 'asm 4/10/2003 13:15'!\\\\nregisterInFlapsRegistry\\\\n\\\\t\\\\\\\"Register the receiver in the system's flaps registry\\\\\\\"\\\\n\\\\tself environment\\\\n\\\\t\\\\tat: #Flaps\\\\n\\\\t\\\\tifPresent: [:cl | cl registerQuad: #(PackagePaneBrowser\\\\tprototypicalToolWindow\\\\t\\\\t'Packages'\\\\t\\\\t\\\\t'Package Browser:  like a System Browser, except that if has extra level of categorization in the top-left pane, such that class-categories are further organized into groups called \\\\\\\"packages\\\\\\\"') \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'Tools']! !\\\\n\\\\n!PackagePaneBrowser class methodsFor: '*MorphicExtras-class initialization' stamp: 'hpt 8/5/2004 20:12'!\\\\nunload\\\\n\\\\t\\\\\\\"Unload the receiver from global registries\\\\\\\"\\\\n\\\\n\\\\tself environment at: #Flaps ifPresent: [:cl |\\\\n\\\\tcl unregisterQuadsWithReceiver: self].\\\\n\\\\tSystemBrowser unregister: self.! !\\\\nObject subclass: #PackageServices\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: 'ServiceClasses'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'PackageInfo-Base'!\\\\n\\\\n!PackageServices methodsFor: 'as yet unclassified' stamp: 'avi 10/11/2003 14:06'!\\\\nseeClassSide! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPackageServices class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PackageServices class methodsFor: 'as yet unclassified' stamp: 'avi 10/11/2003 13:01'!\\\\nallServices\\\\n\\\\t^ ServiceClasses gather: [:ea | ea services]! !\\\\n\\\\n!PackageServices class methodsFor: 'as yet unclassified' stamp: 'stephaneducasse 2/4/2006 20:40'!\\\\ninitialize\\\\n\\\\tServiceClasses := Set new! !\\\\n\\\\n!PackageServices class methodsFor: 'as yet unclassified' stamp: 'avi 10/11/2003 12:59'!\\\\nregister: aClass\\\\n\\\\tServiceClasses add: aClass! !\\\\n\\\\n!PackageServices class methodsFor: 'as yet unclassified' stamp: 'avi 10/11/2003 12:59'!\\\\nunregister: aClass\\\\n\\\\tServiceClasses remove: aClass! !\\\\nImageMorph subclass: #PaintBoxColorPicker\\\\n\\\\tinstanceVariableNames: 'currentColor locOfCurrent'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-Support'!\\\\n!PaintBoxColorPicker commentStamp: 'JMM 9/13/2004 07:37' prior: 0!\\\\nA pop-up, 32-bit color palette used as part of a PaintBoxMorph.\\\\n!\\\\n\\\\n\\\\n!PaintBoxColorPicker methodsFor: 'accessing' stamp: 'jm 4/29/1998 20:07'!\\\\ncurrentColor\\\\n\\\\n\\\\t^ currentColor\\\\n! !\\\\n\\\\n!PaintBoxColorPicker methodsFor: 'accessing' stamp: 'jm 4/29/1998 20:18'!\\\\ncurrentColor: aColor\\\\n\\\\t\\\\\\\"Force me to select the given color.\\\\\\\"\\\\n\\\\n\\\\tcurrentColor _ aColor.\\\\n\\\\tlocOfCurrent _ nil.  \\\\\\\"remove the marker\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!PaintBoxColorPicker methodsFor: 'drawing' stamp: 'jm 4/29/1998 20:00'!\\\\ndrawOn: aCanvas\\\\n\\\\t\\\\\\\"Image plus circles for currently selected color.\\\\\\\"\\\\n\\\\n\\\\t| c |\\\\n\\\\tsuper drawOn: aCanvas.\\\\n\\\\tlocOfCurrent ifNotNil: [\\\\n\\\\t\\\\tc _ self ringColor.\\\\n\\\\t\\\\taCanvas\\\\n\\\\t\\\\t\\\\tfillOval: (Rectangle center: locOfCurrent + self topLeft extent: 9@9)\\\\n\\\\t\\\\t\\\\tcolor: Color transparent\\\\n\\\\t\\\\t\\\\tborderWidth: 1\\\\n\\\\t\\\\t\\\\tborderColor: c].\\\\n! !\\\\n\\\\n!PaintBoxColorPicker methodsFor: 'drawing' stamp: 'jm 4/29/1998 20:00'!\\\\nringColor\\\\n\\\\t\\\\\\\"Choose a color that contrasts with my current color. If that color isn't redish, return red. Otherwise, return green\\\\\\\"\\\\n\\\\n\\\\tcurrentColor isTransparent ifTrue: [^ Color red].\\\\n\\\\tcurrentColor red < 0.5 ifTrue: [^ Color red].\\\\n\\\\tcurrentColor red > (currentColor green + (currentColor blue * 0.5))\\\\n\\\\t\\\\tifTrue: [^ Color green]\\\\n\\\\t\\\\tifFalse: [^ Color red].\\\\n! !\\\\n\\\\n\\\\n!PaintBoxColorPicker methodsFor: 'event handling' stamp: 'ar 10/5/2000 16:01'!\\\\nendColorSelection: evt\\\\n\\\\t\\\\\\\"Update current color and report it to paint box.\\\\\\\"\\\\n\\\\n\\\\tself selectColor: evt.\\\\n\\\\t\\\\\\\"restore mouseLeave handling\\\\\\\"\\\\n\\\\tself on: #mouseLeave send: #delete to: self.\\\\n! !\\\\n\\\\n!PaintBoxColorPicker methodsFor: 'event handling' stamp: 'ar 10/25/2000 17:49'!\\\\ninitMouseHandlers\\\\n\\\\n\\\\tself on: #mouseDown send: #startColorSelection: to: self.\\\\n\\\\tself on: #mouseMove send: #selectColor: to: self.\\\\n\\\\tself on: #mouseUp send: #endColorSelection: to: self.\\\\n\\\\tself on: #mouseLeave send: #delete to: self.\\\\n! !\\\\n\\\\n!PaintBoxColorPicker methodsFor: 'event handling' stamp: 'JMM 9/13/2004 09:08'!\\\\nselectColor: evt \\\\n\\\\t\\\\\\\"Update the receiver from the given event. Constrain locOfCurrent's center to lie within the color selection area. If it is partially in the transparent area, snap it entirely into it vertically.\\\\\\\"\\\\n\\\\n\\\\t| r |\\\\n\\\\n\\\\tlocOfCurrent := evt cursorPoint - self topLeft.\\\\n\\\\tr := Rectangle center: locOfCurrent extent: 9 @ 9.\\\\n\\\\tlocOfCurrent := locOfCurrent \\\\n\\\\t\\\\t\\\\t\\\\t+ (r amountToTranslateWithin: (8 @ 11 corner: (self image width-6) @ (self image height-6))).\\\\n\\\\tlocOfCurrent x > (self image width-(12+7))  ifTrue: [locOfCurrent := (self image width - 12) @ locOfCurrent y].\\\\t\\\\\\\"snap into grayscale\\\\\\\"\\\\n\\\\tcurrentColor := locOfCurrent y < 19\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:  \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[locOfCurrent := locOfCurrent x @ 11.\\\\t\\\\\\\"snap into transparent\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tColor transparent]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [image colorAt: locOfCurrent].\\\\n\\\\t(owner isKindOf: PaintBoxMorph) \\\\n\\\\t\\\\tifTrue: [owner takeColorEvt: evt from: self].\\\\n\\\\tself changed! !\\\\n\\\\n!PaintBoxColorPicker methodsFor: 'event handling' stamp: 'jm 4/29/1998 21:21'!\\\\nstartColorSelection: evt\\\\n\\\\t\\\\\\\"Start color selection. Make me stay up as long as the mouse is down.\\\\\\\"\\\\n\\\\n\\\\tself on: #mouseLeave send: nil to: nil.\\\\n\\\\tself selectColor: evt.\\\\n! !\\\\n\\\\n\\\\n!PaintBoxColorPicker methodsFor: 'initialization' stamp: 'RAA 8/15/2000 14:57'!\\\\nbeStatic\\\\n\\\\n\\\\t\\\\\\\"an aid for Nebraska: make the color chart a static image to reduce traffic\\\\\\\"\\\\n\\\\timage isStatic ifFalse: [\\\\n\\\\t\\\\timage _ image as: StaticForm\\\\n\\\\t].! !\\\\n\\\\n!PaintBoxColorPicker methodsFor: 'initialization' stamp: 'jm 4/29/1998 21:24'!\\\\ninitialize\\\\n\\\\n\\\\tsuper initialize.\\\\n\\\\tcurrentColor _ Color black.\\\\n\\\\tlocOfCurrent _ nil.\\\\n\\\\tself initMouseHandlers.\\\\n! !\\\\nImageMorph subclass: #PaintBoxMorph\\\\n\\\\tinstanceVariableNames: 'action tool currentCursor thumbnail currentColor currentBrush colorMemory colorPatch stampHolder rotationTabForm scaleTabForm colorMemoryThin brushes focusMorph weakDependents recentColors'\\\\n\\\\tclassVariableNames: 'AllOffImage AllOnImage AllPressedImage ColorChart OriginalBounds Prototype RecentColors'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-Support'!\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'laza 3/24/2000 17:58'!\\\\naction\\\\n\\\\t^ action\\\\t! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'RAA 8/16/2000 13:35'!\\\\nactionCursor\\\\n\\\\t\\\\\\\"Return the cursor to use with this painting action/tool. Offset of the form must be set.\\\\\\\"\\\\n\\\\n\\\\t^self\\\\n\\\\t\\\\tcursorFor: action\\\\n\\\\t\\\\toldCursor: currentCursor\\\\n\\\\t\\\\tcurrentNib: self getNib\\\\n\\\\t\\\\tcolor: currentColor\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'dgd 2/22/2003 19:03'!\\\\nbrush: brushButton action: aSelector nib: aMask evt: evt \\\\n\\\\t\\\\\\\"Set the current tool and action for the paintBox.  \\\\\\\"\\\\n\\\\n\\\\tcurrentBrush \\\\n\\\\t\\\\tifNotNil: [currentBrush == brushButton ifFalse: [currentBrush state: #off]].\\\\n\\\\tcurrentBrush := brushButton.\\\\t\\\\\\\"A ThreePhaseButtonMorph\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"currentBrush state: #on.\\\\talready done\\\\\\\"\\\\n\\\\t\\\\\\\"aSelector is like brush3:.  Don't save it.  Can always say (currentBrush arguments at: 2)\\\\n\\\\taMask is the brush shape.  Don't save it.  Can always say (currentBrush arguments at: 3)\\\\\\\"\\\\n\\\\tself notifyWeakDependentsWith: { \\\\n\\\\t\\\\t\\\\t\\\\t#currentNib.\\\\n\\\\t\\\\t\\\\t\\\\tevt.\\\\n\\\\t\\\\t\\\\t\\\\tcurrentBrush arguments third}.\\\\n\\\\tself brushable ifFalse: [self setAction: #paint: evt: evt]\\\\t\\\\\\\"User now thinking of painting\\\\\\\"! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'tk 10/19/97 11:12'!\\\\nbrushable\\\\n\\\\t\\\\\\\"Return true if the current tool uses a brush.\\\\\\\"\\\\n\\\\t^ (#(\\\\\\\"non-brushable\\\\\\\" eyedropper: fill: pickup: stamp:) indexOf: action) = 0! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'RAA 8/16/2000 01:34'!\\\\nclear: clearButton with: clearSelector evt: evt\\\\n\\\\n\\\\t| ss |\\\\n\\\\t(ss _ self focusMorph) \\\\n\\\\t\\\\tifNotNil: [ss clearPainting: self]\\\\n\\\\t\\\\tifNil: [self notCurrentlyPainting].\\\\n\\\\tclearButton state: #off.! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'tk 7/15/97 13:35'!\\\\ncolorable\\\\n\\\\t\\\\\\\"Return true if the current tool uses a color.\\\\\\\"\\\\n\\\\t^ (#(\\\\\\\"These use no color\\\\\\\" erase: eyedropper: \\\\\\\"fill: does\\\\\\\" pickup: stamp:) indexOf: action) = 0! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'RAA 8/17/2000 17:06'!\\\\ncurrentColor: aColor evt: evt\\\\n\\\\t\\\\\\\"Accept a color from the outside.  (my colorMemoryMorph must call takeColorEvt: evt from: colorPicker instead)\\\\\\\"\\\\n\\\\n\\\\tcurrentColor _ aColor.\\\\n\\\\tcolorMemory currentColor: aColor.\\\\n\\\\tself notifyWeakDependentsWith: {#currentColor. evt. currentColor}.\\\\n\\\\tself showColor.\\\\n\\\\tself colorable ifFalse: [self setAction: #paint: evt: evt].\\\\t\\\\\\\"User now thinking of painting\\\\\\\"! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'RAA 8/16/2000 13:37'!\\\\ncursorFor: anAction oldCursor: oldCursor currentNib: aNibForm color: aColor \\\\n\\\\t\\\\\\\"Return the cursor to use with this painting action/tool. Offset of the \\\\n\\\\tform must be set.\\\\\\\"\\\\n\\\\n\\\\t| ff width co larger c box |\\\\n\\\\n\\\\tanAction == #paint:\\\\n\\\\t\\\\tifTrue: [\\\\\\\"Make a cursor from the brush and the color\\\\\\\"\\\\n\\\\t\\\\t\\\\twidth _ aNibForm width.\\\\n\\\\t\\\\t\\\\tc _ self ringColorFor: aColor.\\\\n\\\\t\\\\t\\\\tco _ oldCursor offset - (width // 4 @ 34 - (width // 6)) min: 0 @ 0.\\\\n\\\\t\\\\t\\\\tlarger _ width negated + 10 @ 0 extent: oldCursor extent + (width @ width).\\\\n\\\\t\\\\t\\\\tff _ oldCursor copy: larger.\\\\n\\\\t\\\\t\\\\tff colors at: 1 put: Color transparent.\\\\n\\\\t\\\\t\\\\tff colors at: 2 put: Color transparent.\\\\n\\\\t\\\\t\\\\tff offset: co - (width @ width // 2).\\\\n\\\\t\\\\t\\\\tff getCanvas\\\\n\\\\t\\\\t\\\\t\\\\tfillOval: (Rectangle center: ff offset negated extent: width @ width)\\\\n\\\\t\\\\t\\\\t\\\\tcolor: Color transparent\\\\n\\\\t\\\\t\\\\t\\\\tborderWidth: 1\\\\n\\\\t\\\\t\\\\t\\\\tborderColor: c.\\\\n\\\\t\\\\t\\\\t^ ff].\\\\n\\\\tanAction == #erase:\\\\n\\\\t\\\\tifTrue: [\\\\\\\"Make a cursor from the cursor and the color\\\\\\\"\\\\n\\\\t\\\\t\\\\twidth _ aNibForm width.\\\\n\\\\t\\\\t\\\\tco _ oldCursor offset + (width // 2 @ 4) min: 0 @ 0.\\\\n\\\\t\\\\t\\\\tlarger _ 0 @ 0 extent: oldCursor extent + (width @ width).\\\\n\\\\t\\\\t\\\\tff _ oldCursor copy: larger.\\\\n\\\\t\\\\t\\\\tff offset: co - (width @ width // 2).\\\\n\\\\t\\\\t\\\\tff\\\\n\\\\t\\\\t\\\\t\\\\tfill: (box _ co negated extent: width @ width)\\\\n\\\\t\\\\t\\\\t\\\\tfillColor: (Color r: 0.5 g: 0.5 b: 1.0).\\\\n\\\\t\\\\t\\\\tff\\\\n\\\\t\\\\t\\\\t\\\\tfill: (box insetBy: 1 @ 1)\\\\n\\\\t\\\\t\\\\t\\\\tfillColor: Color transparent.\\\\n\\\\t\\\\t\\\\t^ ff].\\\\n\\\\t^ oldCursor! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'dgd 2/22/2003 19:03'!\\\\ndeleteCurrentStamp: evt \\\\n\\\\t\\\\\\\"The trash is telling us to delete the currently selected stamp\\\\\\\"\\\\n\\\\n\\\\t(tool arguments second) == #stamp: \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[stampHolder remove: tool.\\\\n\\\\t\\\\t\\\\tself setAction: #paint: evt: evt]\\\\t\\\\\\\"no use stamping with a blank stamp\\\\\\\"! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'JMM 9/13/2004 09:47'!\\\\neyedropper: aButton action: aSelector cursor: aCursor evt: evt \\\\n\\\\t\\\\\\\"Take total control and pick up a color!!!!\\\\\\\"\\\\n\\\\n\\\\t| pt feedbackColor delay |\\\\n\\\\tdelay _ Delay forMilliseconds: 10.\\\\n\\\\taButton state: #on.\\\\n\\\\ttool ifNotNil: [tool state: #off].\\\\n\\\\tcurrentCursor := aCursor.\\\\n\\\\tevt hand showTemporaryCursor: currentCursor\\\\n\\\\t\\\\thotSpotOffset: 6 negated @ 4 negated.\\\\n\\\\t\\\\\\\"<<<< the form was changed a bit??\\\\\\\"\\\\n\\\\tfeedbackColor := Display colorAt: Sensor cursorPoint.\\\\n\\\\tcolorMemory align: colorMemory bounds topRight\\\\n\\\\t\\\\twith: colorMemoryThin bounds topRight.\\\\n\\\\tself addMorphFront: colorMemory.\\\\n\\\\n\\\\t\\\\\\\"Full color picker\\\\\\\"\\\\n\\\\t[Sensor anyButtonPressed] whileFalse: \\\\n\\\\t\\\\t\\\\t[pt := Sensor cursorPoint.\\\\n\\\\t\\\\t\\\\t\\\\\\\"deal with the fact that 32 bit displays may have garbage in the \\\\n\\\\t\\\\t\\\\talpha bits\\\\\\\"\\\\n\\\\t\\\\t\\\\tfeedbackColor := Display depth = 32 \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[Color colorFromPixelValue: ((Display pixelValueAt: pt) bitOr: 4278190080)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdepth: 32]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [Display colorAt: pt].\\\\n\\\\t\\\\t\\\\t\\\\\\\"the hand needs to be drawn\\\\\\\"\\\\n\\\\t\\\\t\\\\tevt hand position: pt.\\\\n\\\\t\\\\t\\\\tcurrentColor ~= feedbackColor ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tcurrentColor _ feedbackColor.\\\\n\\\\t\\\\t\\\\t\\\\tself showColor ].\\\\n\\\\t\\\\t\\\\tself world displayWorldSafely.\\\\n\\\\t\\\\t\\\\tdelay wait].\\\\n\\\\n\\\\t\\\\\\\"Now wait for the button to be released.\\\\\\\"\\\\n\\\\t[Sensor anyButtonPressed] whileTrue:\\\\n\\\\t\\\\t[ pt := Sensor cursorPoint.\\\\n\\\\t\\\\t\\\\\\\"the hand needs to be drawn\\\\\\\"\\\\n\\\\t\\\\tevt hand position: pt.\\\\n\\\\t\\\\tself world displayWorldSafely.\\\\n\\\\t\\\\tdelay wait].\\\\n\\\\n\\\\tevt hand showTemporaryCursor: nil hotSpotOffset: 0 @ 0.\\\\n\\\\tself currentColor: feedbackColor evt: evt.\\\\n\\\\tcolorMemory delete.\\\\n\\\\ttool ifNotNil: \\\\n\\\\t\\\\t\\\\t[tool state: #on.\\\\n\\\\t\\\\t\\\\tcurrentCursor := tool arguments third].\\\\n\\\\taButton state: #off\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'tk 7/1/97 12:52'!\\\\ngetColor\\\\n\\\\t^ currentColor! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'dgd 2/22/2003 19:03'!\\\\ngetNib\\\\n\\\\t^currentBrush arguments third! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'tk 7/1/97 13:02'!\\\\ngetSpecial\\\\n\\\\t^ action\\\\t\\\\t\\\\\\\"a selector like #paint:\\\\\\\"! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'dgd 2/21/2003 23:17'!\\\\ngrabFromScreen: evt \\\\n\\\\t\\\\\\\"Allow the user to grab a picture from the screen OUTSIDE THE PAINTING AREA and install it in a blank stamp.  To get a stamp in the painting area, click on the stamp tool in a blank stamp.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"scroll to blank stamp\\\\\\\"\\\\n\\\\n\\\\t| stampButton form |\\\\n\\\\tstampButton := stampHolder stampButtons first.\\\\n\\\\t[(stampHolder stampFormFor: stampButton) isNil] \\\\n\\\\t\\\\twhileFalse: [stampHolder scroll: 1].\\\\n\\\\tform := Form fromUser.\\\\n\\\\ttool state: #off.\\\\n\\\\ttool := stampHolder otherButtonFor: stampButton.\\\\n\\\\tstampHolder stampForm: form for: tool.\\\\t\\\\\\\"install it\\\\\\\"\\\\n\\\\tstampButton state: #on.\\\\n\\\\tstampButton doButtonAction: evt.\\\\n\\\\tevt hand showTemporaryCursor: (focusMorph getCursorFor: evt)! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'sw 8/29/2000 15:31'!\\\\nindicateColorUnderMouse\\\\n\\\\t\\\\\\\"Track the mouse with the special eyedropper cursor, and accept whatever color is under the mouse as the currently-chosen color; reflect that choice in the feedback box, and return that color.\\\\\\\"\\\\n\\\\n\\\\t| pt feedbackColor |\\\\n\\\\tpt _ Sensor cursorPoint.\\\\n\\\\t\\\\\\\"deal with the fact that 32 bit displays may have garbage in the alpha bits\\\\\\\"\\\\n\\\\tfeedbackColor _ Display depth = 32\\\\n\\\\t\\\\tifTrue: [ Color colorFromPixelValue: ((Display pixelValueAt: pt) bitOr: 16rFF000000) depth: 32] \\\\t\\\\tifFalse: [Display colorAt: pt].\\\\n\\\\n\\\\tself activeHand position: pt.\\\\n\\\\tself world displayWorldSafely.\\\\n\\\\tDisplay fill: colorPatch bounds fillColor: feedbackColor.\\\\n\\\\t^ feedbackColor\\\\t! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'RAA 8/16/2000 01:48'!\\\\nkeep: keepButton with: keepSelector evt: evt\\\\n\\\\t\\\\\\\"Showing of the corrent palette (viewer or noPalette) is done by the block submitted to the SketchMorphEditor, see (EToyHand makeNewDrawing) and (SketchMorph editDrawingInWorld:forBackground:).\\\\\\\"\\\\n\\\\t| ss |\\\\n\\\\towner ifNil: [^ self].\\\\n\\\\tkeepButton ifNotNil: [keepButton state: #off].\\\\n\\\\t(ss _ self focusMorph) \\\\n\\\\t\\\\tifNotNil: [ss savePainting: self evt: evt]\\\\n\\\\t\\\\tifNil:\\\\n\\\\t\\\\t[keepSelector == #silent ifTrue: [^ self].\\\\n\\\\t\\\\tself notCurrentlyPainting].! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'sw 5/3/1998 18:22'!\\\\nnotCurrentlyPainting\\\\n\\\\tself inform: 'You are not currently painting'! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'dgd 2/22/2003 19:04'!\\\\npickup: actionButton action: aSelector cursor: aCursor evt: evt \\\\n\\\\t\\\\\\\"Special version for pickup: and stamp:, because of these tests\\\\\\\"\\\\n\\\\n\\\\t| ss picker old map stamper |\\\\n\\\\tself \\\\n\\\\t\\\\ttool: actionButton\\\\n\\\\t\\\\taction: aSelector\\\\n\\\\t\\\\tcursor: aCursor\\\\n\\\\t\\\\tevt: evt.\\\\n\\\\taSelector == #stamp: \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[(stampHolder pickupButtons includes: actionButton) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[stamper := stampHolder otherButtonFor: actionButton.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^self \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tpickup: stamper\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taction: #stamp:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcursor: (stamper arguments third)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tevt: evt].\\\\n\\\\t\\\\t\\\\t(stampHolder stampFormFor: actionButton) ifNil: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"If not stamp there, go to pickup mode\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpicker := stampHolder otherButtonFor: actionButton.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpicker state: #on.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^self \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tpickup: picker\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taction: #pickup:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcursor: (picker arguments third)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tevt: evt]\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[old := stampHolder stampFormFor: actionButton.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcurrentCursor := ColorForm extent: old extent depth: 8.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\told displayOn: currentCursor.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmap := Color indexedColors copy.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmap at: 1 put: Color transparent.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcurrentCursor colors: map.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcurrentCursor offset: currentCursor extent // -2.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Emphisize the stamp button\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tactionButton owner borderColor: (Color \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tr: 0.65\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tg: 0.599\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tb: 0.8)\\\\t\\\\\\\"layoutMorph\\\\\\\"\\\\t\\\\\\\"color: (Color r: 1.0 g: 0.645 b: 0.419);\\\\\\\"]].\\\\n\\\\taSelector == #pickup: \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[ss := self focusMorph.\\\\n\\\\t\\\\t\\\\tss ifNotNil: [currentCursor := aCursor]\\\\n\\\\t\\\\t\\\\t\\\\tifNil: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self notCurrentlyPainting.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself setAction: #paint: evt: evt]]! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'tk 7/2/97 22:13'!\\\\npickupForm: stampForm\\\\n\\\\t\\\\\\\"Install the new picture in this stamp\\\\\\\"\\\\n\\\\n\\\\t| stampButton |\\\\n\\\\tstampHolder stampForm: stampForm for: tool.\\\\n\\\\tstampButton _ action == #pickup: \\\\n\\\\t\\\\tifTrue: [stampHolder otherButtonFor: tool]\\\\n\\\\t\\\\tifFalse: [tool].\\\\t\\\\\\\"was a nil stampForm\\\\\\\"\\\\n\\\\tstampButton state: #on.\\\\n\\\\tstampButton doButtonAction.! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'RAA 8/17/2000 14:59'!\\\\npickupForm: stampForm evt: evt\\\\n\\\\t\\\\\\\"Install the new picture in this stamp\\\\\\\"\\\\n\\\\n\\\\t| stampButton |\\\\n\\\\tstampHolder stampForm: stampForm for: tool.\\\\n\\\\tstampButton _ action == #pickup: \\\\n\\\\t\\\\tifTrue: [stampHolder otherButtonFor: tool]\\\\n\\\\t\\\\tifFalse: [tool].\\\\t\\\\\\\"was a nil stampForm\\\\\\\"\\\\n\\\\tstampButton state: #on.\\\\n\\\\tstampButton doButtonAction: evt.! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'RAA 8/16/2000 13:40'!\\\\nplainCursor\\\\n\\\\t\\\\\\\"Return the cursor to use with this painting action/tool. Offset of the form must be set.\\\\\\\"\\\\n\\\\n\\\\t^currentCursor\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'ar 10/10/2000 16:38'!\\\\nplainCursor: aCursor event: anEvent\\\\n\\\\t\\\\\\\"Set the cursor to use with this painting action/tool. Offset of the form must be set.\\\\\\\"\\\\n\\\\n\\\\tcurrentCursor _ aCursor.\\\\n\\\\tanEvent hand showTemporaryCursor: aCursor.\\\\n\\\\tself notifyWeakDependentsWith: {#currentCursor. anEvent. currentCursor}.! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'RAA 8/16/2000 13:30'!\\\\nringColor\\\\n\\\\t\\\\\\\"Choose a color that contrasts with my current color. If that color isn't redish, return red. Otherwise, return green\\\\\\\"\\\\n\\\\n\\\\t^self ringColorFor: currentColor\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'RAA 8/16/2000 13:29'!\\\\nringColorFor: aColor\\\\n\\\\t\\\\\\\"Choose a color that contrasts with my current color. If that color isn't redish, return red. Otherwise, return green\\\\\\\"\\\\n\\\\n\\\\taColor isTransparent ifTrue: [^ Color red].\\\\n\\\\taColor red < 0.5 ifTrue: [^ Color red].\\\\n\\\\taColor red > (aColor green + (aColor blue * 0.5))\\\\n\\\\t\\\\tifTrue: [^ Color green]\\\\n\\\\t\\\\tifFalse: [^ Color red].\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'RAA 8/16/2000 01:44'!\\\\nscrollStamps: actionButton action: aSelector evt: evt\\\\n\\\\t\\\\\\\"Move the stamps over\\\\\\\"\\\\n\\\\n\\\\taSelector == #prevStamp:\\\\n\\\\t\\\\tifTrue: [stampHolder scroll: -1]\\\\n\\\\t\\\\tifFalse: [stampHolder scroll: 1].\\\\n\\\\tactionButton state: #off.\\\\n\\\\taction == #stamp: ifTrue: [\\\\\\\"reselect the stamp and compute the cursor\\\\\\\"\\\\n\\\\t\\\\tself stampForm \\\\n\\\\t\\\\t\\\\tifNil: [self setAction: #paint: evt: evt]\\\\n\\\\t\\\\t\\\\tifNotNil: [tool doButtonAction: evt]].\\\\n\\\\t\\\\t! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'tk 8/22/2000 11:57'!\\\\nsetAction: aSelector evt: evt\\\\n\\\\t\\\\\\\"Find this button and turn it on.  Does not work for stamps or pickups\\\\\\\"\\\\n\\\\n\\\\t| button |\\\\n\\\\tbutton _ self submorphNamed: aSelector.\\\\n \\\\n\\\\tbutton ifNotNil: [\\\\n\\\\t\\\\tbutton state: #on.\\\\n\\\\t\\\\tbutton doButtonAction: evt].\\\\t\\\\\\\"select it!!\\\\\\\"! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'dgd 2/22/2003 19:04'!\\\\nshowColor\\\\n\\\\t\\\\\\\"Display the current color in all brushes, both on and off.\\\\\\\"\\\\n\\\\n\\\\t| offIndex onIndex center |\\\\n\\\\tcurrentColor ifNil: [^self].\\\\n\\\\t\\\\\\\"colorPatch color: currentColor.\\\\tMay delete later\\\\\\\"\\\\n\\\\t(brushes isNil or: [brushes first owner ~~ self]) \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[brushes := OrderedCollection new.\\\\n\\\\t\\\\t\\\\t#(#brush1: #brush2: #brush3: #brush4: #brush5: #brush6:) \\\\n\\\\t\\\\t\\\\t\\\\tdo: [:sel | brushes addLast: (self submorphNamed: sel)]].\\\\n\\\\tcenter := (brushes sixth) offImage extent // 2.\\\\n\\\\toffIndex := (brushes sixth) offImage pixelValueAt: center.\\\\n\\\\tonIndex := (brushes sixth) onImage pixelValueAt: center.\\\\n\\\\tbrushes do: \\\\n\\\\t\\\\t\\\\t[:bb | \\\\n\\\\t\\\\t\\\\tbb offImage colors at: offIndex + 1 put: currentColor.\\\\n\\\\t\\\\t\\\\tbb offImage clearColormapCache.\\\\n\\\\t\\\\t\\\\tbb onImage colors at: onIndex + 1 put: currentColor.\\\\n\\\\t\\\\t\\\\tbb onImage clearColormapCache.\\\\n\\\\t\\\\t\\\\tbb invalidRect: bb bounds].\\\\n\\\\tself invalidRect: (brushes first topLeft rect: brushes last bottomRight)! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'ar 12/19/2000 19:16'!\\\\nshowColorPalette: evt\\\\n\\\\n\\\\t| w box |\\\\n\\\\tself comeToFront.\\\\n\\\\tcolorMemory align: colorMemory bounds topRight \\\\n\\\\t\\\\t\\\\twith: colorMemoryThin bounds topRight.\\\\n\\\\t\\\\\\\"make sure color memory fits or else align with left\\\\\\\"\\\\n\\\\tw _ self world.\\\\n\\\\tbox _ self bounds: colorMemory fullBounds in: w.\\\\n\\\\tbox left < 0 ifTrue:[\\\\n\\\\t\\\\tcolorMemory align: colorMemory bounds topLeft\\\\n\\\\t\\\\t\\\\twith: colorMemoryThin bounds topLeft].\\\\n\\\\tself addMorphFront: colorMemory.! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'tk 8/22/2000 11:58'!\\\\nstampCursorBeCursorFor: anAction\\\\n\\\\t\\\\\\\"User just chose a stamp.  Take that stamp picture and make it be the cursor for the tool named.\\\\\\\"\\\\n\\\\t\\\\\\\"self stampCursorBeCursorFor: #star:.\\\\n\\\\tcurrentCursor offset: -9@-3.\\\\t\\\\t\\\\tHas side effect on the saved cursor.\\\\\\\"\\\\n\\\\n\\\\t(self submorphNamed: anAction) arguments at: 3 put: currentCursor.\\\\n\\\\t\\\\t\\\\\\\"Already converted to 8 bits and in the right form\\\\\\\"! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'di 5/6/1998 21:08'!\\\\nstampDeEmphasize\\\\n\\\\t\\\\\\\"Turn off an emphasized stamp.  Was turned on in pickup:action:cursor:\\\\\\\"\\\\n\\\\n\\\\ttool owner class == AlignmentMorph ifTrue: [\\\\n\\\\t\\\\ttool \\\\\\\"actionButton\\\\\\\" owner \\\\\\\"layoutMorph\\\\\\\" color: Color transparent; \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tborderColor: Color transparent].! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'tk 7/2/97 14:02'!\\\\nstampForm\\\\n\\\\t\\\\\\\"Return the selected stamp\\\\\\\"\\\\n\\\\n\\\\t^ stampHolder stampFormFor: tool.\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'tk 7/17/97 11:47'!\\\\nstampHolder\\\\n\\\\n\\\\t^ stampHolder! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'tk 7/17/97 11:48'!\\\\nstampHolder: newOne\\\\n\\\\n\\\\tstampHolder _ newOne! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'ar 9/23/2000 20:00'!\\\\ntakeColor: aColor event: evt\\\\n\\\\t\\\\\\\"Accept the given color programmatically\\\\\\\"\\\\n\\\\tcurrentColor _ aColor.\\\\n\\\\tself notifyWeakDependentsWith: {#currentColor. evt. currentColor}.\\\\n\\\\tself showColor.\\\\n\\\\tself colorable ifFalse: [self setAction: #paint: evt: evt].\\\\t\\\\\\\"User now thinking of painting\\\\\\\"! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'ar 9/23/2000 20:39'!\\\\ntakeColorEvt: evt from: colorPicker\\\\n\\\\t\\\\\\\"Accept a new color from the colorMemory.  Programs use currentColor: instead.  Do not do this before the picker has a chance to set its own color!!\\\\\\\"\\\\n\\\\t^self takeColor: colorPicker currentColor event: evt! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'tk 8/21/2000 16:06'!\\\\ntoggleShapes\\\\n\\\\t| tab sh stamps |\\\\n\\\\t\\\\\\\"The sub panel that has the shape tools on it.  Rect, line...\\\\\\\"\\\\n\\\\tstamps _ self submorphNamed: 'stamps'.\\\\n\\\\ttab _ self submorphNamed: 'shapeTab'.\\\\n\\\\t(sh _ self submorphNamed: 'shapes') visible\\\\n\\\\t\\\\tifTrue: [sh hide.  tab top: stamps bottom-1]\\\\n\\\\t\\\\tifFalse: [sh comeToFront.  sh top: stamps bottom-9.  \\\\n\\\\t\\\\t\\\\t\\\\tsh show.  tab top: sh bottom - tab height + 10].\\\\n\\\\tself layoutChanged.\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'tk 8/21/2000 15:57'!\\\\ntoggleStamps\\\\n\\\\t| tab otherTab st shapes |\\\\n\\\\t\\\\\\\"The sub panel that has the stamps in it.  For saving and moving parts of an image.\\\\\\\"\\\\n\\\\tshapes _ self submorphNamed: 'shapes'.\\\\n\\\\totherTab _ self submorphNamed: 'shapeTab'.\\\\n\\\\ttab _ self submorphNamed: 'stampTab'.\\\\n\\\\t(st _ self submorphNamed: 'stamps') visible\\\\n\\\\t\\\\tifTrue: [st hide.  st bottom: self bottom.  tab top: self bottom-1.\\\\n\\\\t\\\\t\\\\t\\\\tshapes top: self bottom-9.\\\\n\\\\t\\\\t\\\\t\\\\totherTab top: (shapes visible ifTrue: [shapes bottom - otherTab height + 10] \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [self bottom-1])]\\\\n\\\\t\\\\tifFalse: [st top: self bottom-10.  st show.  tab top: st bottom-0.\\\\n\\\\t\\\\t\\\\t\\\\tshapes top: st bottom-9.\\\\n\\\\t\\\\t\\\\t\\\\totherTab top: (shapes visible ifTrue: [shapes bottom - otherTab height + 10] \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [st bottom-0])].\\\\n\\\\tself layoutChanged.! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'tk 7/1/97 12:09'!\\\\ntool\\\\n\\\\t^ tool! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'RAA 8/16/2000 12:38'!\\\\ntool: actionButton action: aSelector cursor: aCursor evt: evt\\\\n\\\\t\\\\\\\"Set the current tool and action for the paintBox.  \\\\\\\"\\\\n\\\\n\\\\ttool ifNotNil: [\\\\n\\\\t\\\\ttool == actionButton ifFalse: [\\\\n\\\\t\\\\t\\\\ttool state: #off.\\\\n\\\\t\\\\t\\\\taction == #stamp: ifTrue: [self stampDeEmphasize]]].\\\\n\\\\ttool _ actionButton.\\\\t\\\\t\\\\\\\"A ThreePhaseButtonMorph\\\\\\\"\\\\n\\\\t\\\\\\\"tool state: #on.\\\\talready done\\\\\\\"\\\\n\\\\taction _ aSelector.\\\\t\\\\t\\\\\\\"paint:\\\\\\\"\\\\n\\\\tcurrentCursor _ aCursor.\\\\n\\\\tself notifyWeakDependentsWith: {#action. evt. action}.\\\\n\\\\tself notifyWeakDependentsWith: {#currentCursor. evt. currentCursor}.\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'RAA 8/16/2000 01:45'!\\\\ntoss: cancelButton with: cancelSelector evt: evt\\\\n\\\\t\\\\\\\"Reject the painting.  Showing noPalette is done by the block submitted to the SketchEditorMorph\\\\\\\"\\\\n\\\\n\\\\t| focus |\\\\n\\\\towner ifNil: [\\\\\\\"it happens\\\\\\\"  ^ self].\\\\n\\\\t(focus _ self focusMorph) \\\\n\\\\t\\\\tifNotNil: [focus cancelPainting: self evt: evt]\\\\n\\\\t\\\\tifNil:\\\\n\\\\t\\\\t\\\\t[self delete].\\\\n\\\\tcancelButton state: #off.\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'actions' stamp: 'RAA 8/16/2000 11:15'!\\\\nundo: undoButton with: undoSelector evt: evt\\\\n\\\\t| ss |\\\\n\\\\t(ss _ self focusMorph) \\\\n\\\\t\\\\tifNotNil: [ss undoPainting: self evt: evt]\\\\n\\\\t\\\\tifNil: [self notCurrentlyPainting].\\\\n\\\\tundoButton state: #off.! !\\\\n\\\\n\\\\n!PaintBoxMorph methodsFor: 'copying' stamp: 'di 10/14/97 10:13'!\\\\nupdateReferencesUsing: aDictionary\\\\n\\\\t\\\\\\\"Fix up stampHolder which is a ScrollingToolHolder, which is not a Morph\\\\\\\"\\\\n\\\\n\\\\tsuper updateReferencesUsing: aDictionary.\\\\n\\\\tstampHolder updateReferencesUsing: aDictionary.\\\\n\\\\tcolorMemory updateReferencesUsing: aDictionary.! !\\\\n\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'RAA 8/15/2000 16:47'!\\\\naddWeakDependent: anObject\\\\n\\\\n\\\\tweakDependents ifNil: [^weakDependents _ WeakArray with: anObject].\\\\n\\\\tweakDependents _ weakDependents,{anObject} reject: [ :each | each isNil].! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'RAA 8/15/2000 14:59'!\\\\nbeStatic\\\\n\\\\n\\\\tcolorMemory ifNotNil: [colorMemory beStatic].! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'sw 5/23/2001 13:53'!\\\\ncreateButtons\\\\n\\\\t\\\\\\\"Create buttons one at a time and let the user place them over the background.  Later can move them again by turning on AuthorModeOwner in ThreePhaseButtonMorph.\\\\n\\\\tself createButtons.\\\\t\\\\\\\"\\\\n\\\\n\\\\t| rect button nib |\\\\n\\\\t#(erase: eyedropper: fill: paint: rect: ellipse: polygon: line: star: pickup: \\\\\\\"pickup: pickup: pickup:\\\\\\\" stamp: \\\\\\\"stamp: stamp: stamp:\\\\\\\" undo: keep: toss: prevStamp: nextStamp:) do: [:sel |\\\\n\\\\t\\\\t(self submorphNamed: sel) ifNil:\\\\n\\\\t\\\\t\\\\t[self inform: 'Rectangle for ',sel.\\\\n\\\\t\\\\t\\\\trect _ Rectangle fromUser.\\\\n\\\\t\\\\t\\\\tbutton _ ThreePhaseButtonMorph new.\\\\n\\\\t\\\\t\\\\tbutton onImage: nil; bounds: rect.\\\\n\\\\t\\\\t\\\\tself addMorph: button.\\\\n\\\\t\\\\t\\\\tbutton actionSelector: #tool:action:cursor:evt:; arguments: (Array with: button with: sel with: nil).\\\\n\\\\t\\\\t\\\\tbutton actWhen: #buttonUp; target: self]].\\\\n\\\\t#(brush1: brush2: brush3: brush4: brush5: brush6: ) doWithIndex: [:sel :ind |\\\\n\\\\t\\\\t(self submorphNamed: sel) ifNil:\\\\n\\\\t\\\\t\\\\t[self inform: 'Rectangle for ',sel.\\\\n\\\\t\\\\t\\\\trect _ Rectangle fromUser.\\\\n\\\\t\\\\t\\\\tbutton _ ThreePhaseButtonMorph new.\\\\n\\\\t\\\\t\\\\tbutton onImage: nil; bounds: rect.\\\\n\\\\t\\\\t\\\\tself addMorph: button.\\\\n\\\\t\\\\t\\\\tnib _ Form dotOfSize: (#(1 2 3 6 11 26) at: ind).\\\\n\\\\t\\\\t\\\\tbutton actionSelector: #brush:action:nib:evt:; \\\\n\\\\t\\\\t\\\\t\\\\t\\\\targuments: (Array with: button with: sel with: nib).\\\\n\\\\t\\\\t\\\\tbutton actWhen: #buttonUp; target: self]].\\\\n\\\\t\\\\\\\"stamp:  Stamps are held in a ScrollingToolHolder.  Pickups and stamps and brushes are id-ed by the button == with item from a list.\\\\\\\"\\\\n\\\\n\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'dgd 2/22/2003 19:39'!\\\\nfixupButtons\\\\n\\\\t| changes answer newSelector |\\\\n\\\\tchanges := Dictionary new.\\\\n\\\\tchanges\\\\n\\\\t\\\\tat: #brush:action:nib: put: #brush:action:nib:evt:;\\\\n\\\\t\\\\tat: #tool:action:cursor: put: #tool:action:cursor:evt:;\\\\n\\\\t\\\\tat: #pickup:action:cursor: put: #pickup:action:cursor:evt:;\\\\n\\\\t\\\\tat: #keep:with: put: #keep:with:evt:;\\\\n\\\\t\\\\tat: #undo:with: put: #undo:with:evt:;\\\\n\\\\t\\\\tat: #scrollStamps:action: put: #scrollStamps:action:evt:;\\\\n\\\\t\\\\tat: #toss:with: put: #toss:with:evt:;\\\\n\\\\t\\\\tat: #eyedropper:action:cursor: put: #eyedropper:action:cursor:evt:;\\\\n\\\\t\\\\tat: #clear:with: put: #clear:with:evt:.\\\\n\\\\tanswer := WriteStream on: String new.\\\\n\\\\tself allMorphsDo: \\\\n\\\\t\\\\t\\\\t[:each | \\\\n\\\\t\\\\t\\\\t(each isKindOf: ThreePhaseButtonMorph) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[answer nextPutAll: each actionSelector.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(changes includesKey: each actionSelector) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[each actionSelector: (newSelector := changes at: each actionSelector).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tanswer nextPutAll: ' <-- ' , newSelector].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tanswer cr]].\\\\n\\\\t^answer contents\\\\n\\\\t\\\\\\\"StringHolder new\\\\n\\\\t\\\\tcontents: answer contents;\\\\n\\\\t\\\\topenLabel: 'button fixups'\\\\\\\"! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'dgd 2/22/2003 19:03'!\\\\ninit3\\\\n\\\\t\\\\\\\"Just a record of how we loaded in the latest paintbox button images\\\\\\\"\\\\n\\\\n\\\\t| bb rect lay pic16Bit aa blt on thin |\\\\n\\\\tself loadoffImage: 'etoy_default.gif'.\\\\n\\\\tself allMorphsDo: \\\\n\\\\t\\\\t\\\\t[:button | \\\\n\\\\t\\\\t\\\\t(button isKindOf: ThreePhaseButtonMorph) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [button offImage: nil]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [button position: button position + (100 @ 0)]].\\\\n\\\\t(bb := self submorphNamed: #keep:) position: bb position + (100 @ 0).\\\\n\\\\t(bb := self submorphNamed: #toss:) position: bb position + (100 @ 0).\\\\n\\\\t(bb := self submorphNamed: #undo:) position: bb position + (100 @ 0).\\\\n\\\\t\\\\\\\"Transparent is (Color r: 1.0 g: 0 b: 1.0)\\\\\\\"\\\\n\\\\tself moveButtons.\\\\n\\\\tself loadOnImage: 'etoy_in.gif'.\\\\n\\\\tAllOnImage := nil.\\\\n\\\\t'save space'.\\\\n\\\\tself loadPressedImage: 'etoy_in.gif'.\\\\n\\\\tAllPressedImage := nil.\\\\n\\\\t'save space'.\\\\n\\\\tself loadCursors.\\\\n\\\\n\\\\t\\\\\\\"position the stamp buttons\\\\\\\"\\\\n\\\\tstampHolder stampButtons owner last delete.\\\\n\\\\tstampHolder pickupButtons last delete.\\\\n\\\\tstampHolder stampButtons: (stampHolder stampButtons copyFrom: 1 to: 3).\\\\n\\\\tstampHolder pickupButtons: (stampHolder pickupButtons copyFrom: 1 to: 3).\\\\n\\\\t\\\\\\\"| rect |\\\\\\\"\\\\n\\\\tstampHolder pickupButtons do: \\\\n\\\\t\\\\t\\\\t[:button | \\\\n\\\\t\\\\t\\\\t\\\\\\\"PopUpMenu notify: 'Rectangle for ',sel.\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\trect := Rectangle fromUser.\\\\n\\\\t\\\\t\\\\tbutton bounds: rect\\\\t\\\\\\\"image is nil\\\\\\\"].\\\\n\\\\t\\\\\\\"| rect lay |\\\\\\\"\\\\n\\\\tstampHolder clear.\\\\n\\\\tstampHolder stampButtons do: \\\\n\\\\t\\\\t\\\\t[:button | \\\\n\\\\t\\\\t\\\\tbutton\\\\n\\\\t\\\\t\\\\t\\\\toffImage: nil;\\\\n\\\\t\\\\t\\\\t\\\\tpressedImage: nil.\\\\n\\\\t\\\\t\\\\tlay := button owner.\\\\n\\\\t\\\\t\\\\t\\\\\\\"PopUpMenu notify: 'Rectangle for ',sel.\\\\\\\"\\\\n\\\\t\\\\t\\\\trect := Rectangle fromUser.\\\\n\\\\t\\\\t\\\\tbutton image: (Form fromDisplay: (rect insetBy: 2)).\\\\n\\\\t\\\\t\\\\tlay borderWidth: 2.\\\\n\\\\t\\\\t\\\\tlay bounds: rect\\\\t\\\\\\\"image is nil\\\\\\\"].\\\\n\\\\t\\\\\\\"| pic16Bit blt aa on |\\\\\\\"\\\\n\\\\tpic16Bit := GIFReadWriter formFromFileNamed: 'etoy_in.gif'.\\\\t\\\\\\\"really 8\\\\\\\"\\\\n\\\\taa := Form extent: OriginalBounds extent depth: 8.\\\\n\\\\tblt := BitBlt current toForm: aa.\\\\n\\\\tblt\\\\n\\\\t\\\\tsourceForm: pic16Bit;\\\\n\\\\t\\\\tcombinationRule: Form over;\\\\n\\\\t\\\\tsourceRect: OriginalBounds;\\\\n\\\\t\\\\tdestOrigin: 0 @ 0;\\\\n\\\\t\\\\tcopyBits.\\\\n\\\\t\\\\\\\"Collect all the images for the buttons in the on state\\\\\\\"\\\\n\\\\tstampHolder pickupButtons do: \\\\n\\\\t\\\\t\\\\t[:button | \\\\n\\\\t\\\\t\\\\ton := ColorForm extent: button extent depth: 8.\\\\n\\\\t\\\\t\\\\ton colors: pic16Bit colors.\\\\n\\\\t\\\\t\\\\ton \\\\n\\\\t\\\\t\\\\t\\\\tcopy: (0 @ 0 extent: button extent)\\\\n\\\\t\\\\t\\\\t\\\\tfrom: button topLeft - self topLeft\\\\n\\\\t\\\\t\\\\t\\\\tin: aa\\\\n\\\\t\\\\t\\\\t\\\\trule: Form over.\\\\n\\\\t\\\\t\\\\tbutton\\\\n\\\\t\\\\t\\\\t\\\\timage: on;\\\\n\\\\t\\\\t\\\\t\\\\tpressedImage: on;\\\\n\\\\t\\\\t\\\\t\\\\toffImage: nil].\\\\n\\\\tself invalidRect: bounds.\\\\n\\\\t((self submorphNamed: #erase:) arguments third) offset: 12 @ 35.\\\\n\\\\t((self submorphNamed: #eyedropper:) arguments third) offset: 0 @ 0.\\\\n\\\\t((self submorphNamed: #fill:) arguments third) offset: 10 @ 44.\\\\n\\\\t((self submorphNamed: #paint:) arguments third) offset: 3 @ 3.\\\\t\\\\\\\"unused\\\\\\\"\\\\n\\\\t((self submorphNamed: #rect:) arguments third) offset: 6 @ 17.\\\\n\\\\t((self submorphNamed: #ellipse:) arguments third) offset: 5 @ 4.\\\\n\\\\t((self submorphNamed: #polygon:) arguments third) offset: 5 @ 4.\\\\n\\\\t((self submorphNamed: #line:) arguments third) offset: 5 @ 17.\\\\n\\\\t((self submorphNamed: #star:) arguments third) offset: 2 @ 5.\\\\n\\\\tthumbnail delete.\\\\n\\\\tthumbnail := nil.\\\\n\\\\t(submorphs select: [:e | e class == RectangleMorph]) first \\\\n\\\\t\\\\tbounds: Rectangle fromUser.\\\\n\\\\t((submorphs select: [:e | e class == RectangleMorph]) first)\\\\n\\\\t\\\\tborderWidth: 1;\\\\n\\\\t\\\\tborderColor: Color black.\\\\n\\\\t\\\\\\\"| thin |\\\\\\\"\\\\n\\\\tsubmorphs do: [:ss | ss class == ImageMorph ifTrue: [thin := ss\\\\t\\\\\\\"first\\\\\\\"]].\\\\n\\\\tcolorMemoryThin := thin! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'tk 8/22/2000 11:56'!\\\\ninit4\\\\n\\\\t\\\\\\\"Just a record of how Ted loaded in the paintbox button images, Feb 98\\\\\\\"\\\\n| bb im pp newImage pic24Bit picNewBit blt |\\\\n\\\\n\\\\\\\"self loadoffImage: 'roundedPalette3.bmp'.\\\\\\\"\\\\npic24Bit _ GIFReadWriter formFromServerFile: 'updates/137roundedPalette3.bmp'.\\\\npicNewBit _ Form extent: pic24Bit extent depth: 16.\\\\npic24Bit displayOn: picNewBit.\\\\nOriginalBounds _ picNewBit boundingBox.\\\\nAllOffImage _ Form extent: OriginalBounds extent depth: 16.\\\\nblt _ BitBlt current toForm: AllOffImage.\\\\nblt sourceForm: picNewBit; combinationRule: Form over;\\\\n\\\\t\\\\tsourceRect: OriginalBounds; destOrigin: 0@0; copyBits.\\\\n\\\\nAllOffImage mapColor: Color transparent to: Color black.\\\\nself image: AllOffImage.\\\\nself invalidRect: bounds.\\\\n\\\\nself submorphsDo: [:button | button position: button position + (10@10)].\\\\n(im _ submorphs at: 28) class == ImageMorph ifTrue: [\\\\n\\\\tim position: im position + (2@0)].\\\\t\\\\\\\"color picker\\\\\\\"\\\\n\\\\\\\"exercise it once\\\\\\\"\\\\n\\\\n(bb _ self submorphNamed: #keep:) position: bb position + (0@25).\\\\n(bb _ self submorphNamed: #toss:) position: bb position + (0@25).\\\\n(bb _ self submorphNamed: #undo:) position: bb position + (0@-25).\\\\n(bb _ self submorphNamed: #clear:) position: bb position + (0@-25).\\\\n(bb _ self submorphNamed: #undo:) position: bb position + (0@-69).\\\\n(bb _ self submorphNamed: #clear:) position: bb position + (0@-69).\\\\nself submorphsDo: [:button | \\\\n\\\\tbutton class == AlignmentMorph ifTrue: [\\\\n\\\\t\\\\tbutton position: button position + (0@25)].\\\\n\\\\t(button printString includesSubString: 'stamp:') ifTrue: [\\\\n\\\\t\\\\tbutton position: button position + (0@25)]].\\\\n(bb _ self submorphNamed: #prevStamp:) position: bb position + (0@25).\\\\n(bb _ self submorphNamed: #nextStamp:) position: bb position + (0@25).\\\\n\\\\nbb _ self submorphNamed: #keep:.\\\\nnewImage _ bb pressedImage copy: (0@4 corner: (bb pressedImage boundingBox extent)).\\\\nbb onImage: newImage.  bb pressedImage: newImage.  bb extent: newImage extent.\\\\nbb position: bb position + (4@1).\\\\n\\\\npp _ (bb _ self submorphNamed: #toss:) pressedImage.\\\\nnewImage _ pp copy: (0@4 corner: (bb pressedImage extent - (3@0))).\\\\nbb onImage: newImage.  bb pressedImage: newImage.  \\\\nbb extent: newImage extent.\\\\nbb position: bb position + (3@1).\\\\n\\\\npp _ (bb _ self submorphNamed: #undo:) pressedImage.\\\\nnewImage _ pp copy: (0@0 corner: (bb pressedImage extent - (3@5))).\\\\nbb onImage: newImage.  bb pressedImage: newImage.  \\\\nbb extent: newImage extent.\\\\nbb position: bb position + (3@-1).\\\\n\\\\npp _ (bb _ self submorphNamed: #clear:) pressedImage.\\\\nnewImage _ pp copy: (0@0 corner: (bb pressedImage extent - (0@5))).\\\\nbb onImage: newImage.  bb pressedImage: newImage.  \\\\nbb extent: newImage extent.\\\\nbb position: bb position + (3@-1).\\\\n\\\\npic24Bit _ GIFReadWriter formFromServerFile: 'updates/137pencil.bmp'.\\\\npicNewBit _ Form extent: pic24Bit extent depth: 16.\\\\npic24Bit displayOn: picNewBit.\\\\nnewImage _ picNewBit as8BitColorForm.\\\\nnewImage transparentColor: (Color r: 0 g: 0 b: 0).\\\\n(bb _ self submorphNamed: #erase:) pressedImage: newImage; onImage: newImage;\\\\n\\\\textent: newImage extent.\\\\n\\\\nbb position: bb position + (-11@-1).\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'tk 7/28/2000 23:26'!\\\\ninitialize\\\\n\\\\tsuper initialize.\\\\n\\\\tcolorMemory ifNotNil: [colorMemory on: #mouseDown send: #takeColorEvt:from: to: self].! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'jm 6/18/1999 18:58'!\\\\nloadColorChooser\\\\n\\\\t\\\\\\\"Load Forms for ColorMemoryMorph.\\\\\\\"\\\\n\\\\n\\\\t| doc closedForm openForm |\\\\n\\\\tdoc _ Utilities objectStrmFromUpdates: 'colorPalClosed.obj'.\\\\n\\\\tclosedForm _ doc fileInObjectAndCode mapColor: Color transparent to: Color black.\\\\n\\\\tdoc _ Utilities objectStrmFromUpdates: 'colorPalOpen.obj'.\\\\n\\\\topenForm _ doc fileInObjectAndCode mapColor: Color transparent to: Color black.\\\\n\\\\n\\\\tcolorMemoryThin image: closedForm.\\\\n\\\\tcolorMemoryThin position: self position + (0@140).\\\\n\\\\n\\\\tcolorMemory delete.\\\\t\\\\\\\"delete old one\\\\\\\"\\\\n\\\\tcolorMemory _ PaintBoxColorPicker new image: openForm.\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'sw 5/23/2001 13:54'!\\\\nloadCursors\\\\n\\\\t\\\\\\\"Display the form containing the cursors.  Transparent is (Color r: 1.0 g: 0 b: 1.0).  Grab the forms one at a time, and they are stored away.\\\\n\\\\tself loadCursors.\\\\t\\\\\\\"\\\\n\\\\n\\\\t| button transp cursor map |\\\\n\\\\ttransp _ Color r: 1.0 g: 0 b: 1.0.\\\\n\\\\tmap _ Color indexedColors copy.\\\\t\\\\\\\"just in case\\\\\\\"\\\\n\\\\t1 to: 256 do: [:ind | (map at: ind) = transp ifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t[map at: ind put: Color transparent]].\\\\n\\\\n\\\\t#(erase: eyedropper: fill: paint: rect: ellipse: polygon: line: star: ) do: [:sel |\\\\n\\\\t\\\\tself inform: 'Rectangle for ',sel.\\\\n\\\\t\\\\tcursor _ ColorForm fromUser.\\\\n\\\\t\\\\tcursor colors: map.\\\\t\\\\\\\"share it\\\\\\\"\\\\n\\\\t\\\\tbutton _ self submorphNamed: sel.\\\\n\\\\t\\\\tbutton arguments at: 3 put: cursor].\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'yo 1/13/2005 12:20'!\\\\nloadJapanesePaintBoxBitmaps\\\\n\\\\\\\"\\\\n\\\\tPaintBoxMorph new loadJapanesePaintBoxBitmaps.\\\\n\\\\\\\"\\\\n\\\\n\\\\t| formTranslator form bb |\\\\n\\\\tself position: 0@0.\\\\n\\\\tformTranslator _ NaturalLanguageFormTranslator localeID: (LocaleID isoString: 'ja').\\\\n\\\\tform _ Form fromFileNamed: 'offPaletteJapanese(children).form'.\\\\n\\\\n\\\\t#('keep:' 'undo:' 'clear:' 'toss:') with: #('KEEP' 'UNDO' 'CLEAR' 'TOSS') do: [:extName :label |\\\\n\\\\t\\\\tbb _ (self submorphs detect: [:e | e externalName = extName]) bounds.\\\\n\\\\t\\\\tformTranslator name: label, '-off' form: (form copy: bb)\\\\n\\\\t].\\\\n\\\\n\\\\n\\\\tform _ Form fromFileNamed: 'pressedPaletteJapanese(children).form'.\\\\n\\\\t#('keep:' 'undo:' 'clear:' 'toss:') with: #('KEEP' 'UNDO' 'CLEAR' 'TOSS') do: [:extName :label |\\\\n\\\\t\\\\tbb _ (self submorphs detect: [:e | e externalName = extName]) bounds.\\\\n\\\\t\\\\tformTranslator name: label, '-pressed' form: (form copy: bb)\\\\n\\\\t].\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'yo 11/4/2002 21:20'!\\\\nloadOffForm: pic16Bit \\\\n\\\\t\\\\\\\"Prototype loadOffForm: (Smalltalk imageImports at: #offPaletteJapanese)\\\\\\\"\\\\n\\\\n\\\\t| blt |\\\\n\\\\tOriginalBounds _ pic16Bit boundingBox.\\\\n\\\\tAllOffImage _ Form extent: OriginalBounds extent depth: 16.\\\\n\\\\tblt _ BitBlt current toForm: AllOffImage.\\\\n\\\\tblt sourceForm: pic16Bit;\\\\n\\\\t\\\\t combinationRule: Form over;\\\\n\\\\t\\\\t sourceRect: OriginalBounds;\\\\n\\\\t\\\\t destOrigin: 0 @ 0;\\\\n\\\\t\\\\t copyBits.\\\\n\\\\tAllOffImage mapColor: Color blue to: Color transparent.\\\\n\\\\tself image: AllOffImage.\\\\n\\\\tAllOffImage _ nil.\\\\n\\\\tself invalidRect: bounds\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'ar 5/28/2000 12:10'!\\\\nloadOnImage: fileName\\\\n\\\\t\\\\\\\"Read in and convert the image for the paintBox with the buttons\\\\non.  A .bmp 24-bit image.  For each button, cut that chunk out and save it.\\\\\\\"\\\\n\\\\t\\\\\\\"\\\\tself loadOnImage: 'NoSh_on.bmp'.\\\\n\\\\t\\\\tAllOnImage _ nil.\\\\t'save space'.\\\\t\\\\\\\"\\\\n\\\\n\\\\t| pic16Bit blt aa on type |\\\\n\\\\ttype _ 'gif'.  \\\\\\\"   gif or bmp  \\\\\\\"\\\\ntype = 'gif' ifTrue: [\\\\n\\\\tpic16Bit \\\\\\\"really 8\\\\\\\" _ GIFReadWriter formFromFileNamed: fileName.\\\\n\\\\tpic16Bit display.\\\\n\\\\taa _ AllOnImage _ Form extent: OriginalBounds extent depth: 8.\\\\n\\\\tblt _ BitBlt current toForm: aa.\\\\n\\\\tblt sourceForm: pic16Bit; combinationRule: Form over;\\\\n\\\\t\\\\tsourceRect: OriginalBounds; destOrigin: 0@0; copyBits.\\\\n\\\\t].\\\\ntype = 'bmp' ifTrue: [\\\\n\\\\tpic16Bit _ (Form fromBMPFileNamed: fileName) asFormOfDepth: 16.\\\\n\\\\tpic16Bit display.\\\\n\\\\taa _ AllOnImage _ Form extent: OriginalBounds extent depth: 16.\\\\n\\\\tblt _ BitBlt current toForm: aa.\\\\n\\\\tblt sourceForm: pic16Bit; combinationRule: Form over;\\\\n\\\\t\\\\tsourceRect: OriginalBounds; destOrigin: 0@0; copyBits.\\\\n\\\\taa mapColor: Color transparent to: Color black.\\\\n\\\\t].\\\\n\\\\t\\\\\\\"Collect all the images for the buttons in the on state\\\\\\\"\\\\n\\\\tself allMorphsDo: [:button |\\\\n\\\\t\\\\t(button isKindOf: ThreePhaseButtonMorph) ifTrue: [\\\\n\\\\t\\\\t\\\\ttype = 'gif' ifTrue: [on _ ColorForm extent: button extent depth: 8.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t on colors: pic16Bit colors]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [on _ Form extent: button extent depth: 16].\\\\n\\\\t\\\\t\\\\ton copy: (0@0 extent: button extent)\\\\n\\\\t\\\\t\\\\t\\\\tfrom: (button topLeft - self topLeft) in: aa rule: Form over.\\\\n\\\\t\\\\t\\\\tbutton onImage: on]].\\\\n\\\\tself invalidRect: bounds.\\\\n\\\\n\\\\t! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'yo 11/4/2002 21:20'!\\\\nloadPressedForm: pic16Bit \\\\n\\\\t\\\\\\\"Prototype loadPressedForm: (Smalltalk imageImports at: #pressedPaletteJapanese)\\\\\\\"\\\\n\\\\n\\\\t| blt on |\\\\n\\\\tAllPressedImage _ AllPressedImage _ Form extent: OriginalBounds extent depth: 16.\\\\n\\\\tblt _ BitBlt current toForm: AllPressedImage.\\\\n\\\\tblt sourceForm: pic16Bit;\\\\n\\\\t\\\\t combinationRule: Form over;\\\\n\\\\t\\\\t sourceRect: OriginalBounds;\\\\n\\\\t\\\\t destOrigin: 0 @ 0;\\\\n\\\\t\\\\t copyBits.\\\\n\\\\tAllPressedImage mapColor: Color black to: Color transparent.\\\\n\\\\tself\\\\n\\\\t\\\\tallMorphsDo: [:button | (button isKindOf: ThreePhaseButtonMorph)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [on _ Form extent: button extent depth: 16.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ton\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcopy: (0 @ 0 extent: button extent)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfrom: button topLeft - self topLeft\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tin: AllPressedImage\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trule: Form over.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbutton pressedImage: on]].\\\\n\\\\tAllPressedImage _ nil.\\\\n\\\\tself invalidRect: bounds\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'ar 5/28/2000 12:10'!\\\\nloadPressedImage: fileName\\\\n\\\\t\\\\\\\"Read in and convert the image for the paintBox with the buttons\\\\non.  A .bmp 24-bit image.  For each button, cut that chunk out and save it.\\\\\\\"\\\\n\\\\t\\\\\\\"\\\\tself loadPressedImage: 'NoSh_on.bmp'.\\\\n\\\\t\\\\tAllPressedImage _ nil.\\\\t'save space'.\\\\t\\\\\\\"\\\\n\\\\n\\\\t| pic16Bit blt aa on type |\\\\n\\\\ttype _ 'gif'.  \\\\\\\"   gif or bmp  \\\\\\\"\\\\ntype = 'gif' ifTrue: [\\\\n\\\\tpic16Bit \\\\\\\"really 8\\\\\\\" _ GIFReadWriter formFromFileNamed: fileName.\\\\n\\\\tpic16Bit display.\\\\n\\\\taa _ AllPressedImage _ Form extent: OriginalBounds extent depth: 8.\\\\n\\\\tblt _ BitBlt current toForm: aa.\\\\n\\\\tblt sourceForm: pic16Bit; combinationRule: Form over;\\\\n\\\\t\\\\tsourceRect: OriginalBounds; destOrigin: 0@0; copyBits.\\\\n\\\\t].\\\\ntype = 'bmp' ifTrue: [\\\\n\\\\tpic16Bit _ (Form fromBMPFileNamed: fileName) asFormOfDepth: 16.\\\\n\\\\tpic16Bit display.\\\\n\\\\taa _ AllPressedImage _ Form extent: OriginalBounds extent depth: 16.\\\\n\\\\tblt _ BitBlt current toForm: aa.\\\\n\\\\tblt sourceForm: pic16Bit; combinationRule: Form over;\\\\n\\\\t\\\\tsourceRect: OriginalBounds; destOrigin: 0@0; copyBits.\\\\n\\\\taa mapColor: Color transparent to: Color black.\\\\n\\\\t].\\\\n\\\\t\\\\\\\"Collect all the images for the buttons in the on state\\\\\\\"\\\\n\\\\tself allMorphsDo: [:button |\\\\n\\\\t\\\\t(button isKindOf: ThreePhaseButtonMorph) ifTrue: [\\\\n\\\\t\\\\t\\\\ttype = 'gif' ifTrue: [on _ ColorForm extent: button extent depth: 8.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t on colors: pic16Bit colors]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [on _ Form extent: button extent depth: 16].\\\\n\\\\t\\\\t\\\\ton copy: (0@0 extent: button extent)\\\\n\\\\t\\\\t\\\\t\\\\tfrom: (button topLeft - self topLeft) in: aa rule: Form over.\\\\n\\\\t\\\\t\\\\tbutton pressedImage: on]].\\\\n\\\\tself invalidRect: bounds.\\\\n\\\\n\\\\t! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'md 11/14/2003 16:52'!\\\\nloadoffImage: fileName\\\\n\\\\t\\\\\\\"Read in and convert the background image for the paintBox.  All\\\\nbuttons off.  A .bmp 24-bit image.\\\\\\\"\\\\n\\\\t\\\\\\\"\\\\tPrototype loadoffImage: 'roundedPalette3.bmp'\\\\t\\\\\\\"\\\\n\\\\n\\\\t| pic16Bit blt type getBounds |\\\\n\\\\ttype _ 'bmp'.  \\\\\\\" gif or bmp  \\\\\\\"\\\\n\\\\tgetBounds _ 'fromPic'.\\\\t\\\\\\\"fromUser = draw out rect of paintbox on image\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"fromOB = just read in new bits, keep same size and place as last time.\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"fromPic = picture is just the PaintBox, use its bounds\\\\\\\"\\\\ntype = 'gif' ifTrue: [\\\\n\\\\tpic16Bit \\\\\\\"really 8\\\\\\\" _ GIFReadWriter formFromFileNamed: fileName.\\\\n\\\\tgetBounds = 'fromUser' ifTrue: [\\\\\\\"Just first time, collect the bounds\\\\\\\"\\\\n\\\\t\\\\t\\\\tpic16Bit display.\\\\n\\\\t\\\\t\\\\tOriginalBounds _ Rectangle fromUser].\\\\n\\\\tgetBounds = 'fromPic' ifTrue: [OriginalBounds _ pic16Bit boundingBox].\\\\n\\\\t].\\\\n\\\\t\\\\t\\\\\\\"Use OriginalBounds as it was last time\\\\\\\"\\\\ntype = 'bmp' ifTrue: [\\\\n\\\\tpic16Bit _ (Form fromBMPFileNamed: fileName) asFormOfDepth: 16.\\\\n\\\\tgetBounds = 'fromUser' ifTrue: [\\\\\\\"Just first time, collect the bounds\\\\\\\"\\\\n\\\\t\\\\t\\\\tpic16Bit display.\\\\n\\\\t\\\\t\\\\tOriginalBounds _ Rectangle fromUser].\\\\n\\\\t\\\\t\\\\\\\"Use OriginalBounds as it was last time\\\\\\\"\\\\n\\\\t(getBounds = 'fromPic') ifTrue: [OriginalBounds _ pic16Bit boundingBox].\\\\n\\\\tAllOffImage _ Form extent: OriginalBounds extent depth: 16.\\\\n\\\\t].\\\\n\\\\ntype = 'gif' ifTrue: [\\\\n\\\\tAllOffImage _ ColorForm extent: OriginalBounds extent depth: 8.\\\\n\\\\tAllOffImage colors: pic16Bit colors].\\\\n\\\\n\\\\tblt _ BitBlt current toForm: AllOffImage.\\\\n\\\\tblt sourceForm: pic16Bit; combinationRule: Form over;\\\\n\\\\t\\\\tsourceRect: OriginalBounds; destOrigin: 0@0; copyBits.\\\\n\\\\ntype = 'bmp' ifTrue: [AllOffImage mapColor: Color transparent to: Color black].\\\\n\\\\tself image: AllOffImage.\\\\n\\\\tself invalidRect: bounds.\\\\n\\\\n\\\\t! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'sw 5/23/2001 13:54'!\\\\nmoveButtons\\\\n\\\\t\\\\\\\"Move buttons one at a time and let the user place them over the background.  Later can move them again by turning on AuthorModeOwner in ThreePhaseButtonMorph.\\\\n\\\\tself createButtons.\\\\t\\\\\\\"\\\\n\\\\n\\\\t| rect button |\\\\n\\\\t#(erase: eyedropper: fill: paint: rect: ellipse: polygon: line: star: \\\\\\\"pickup: pickup: pickup: pickup:\\\\\\\" \\\\\\\"stamp: stamp: stamp: stamp:\\\\\\\" undo: keep: toss: prevStamp: nextStamp:) do: [:sel |\\\\n\\\\t\\\\t\\\\tself inform: 'Rectangle for ',sel.\\\\n\\\\t\\\\t\\\\trect _ Rectangle fromUser.\\\\n\\\\t\\\\t\\\\tbutton _ self submorphNamed: sel.\\\\n\\\\t\\\\t\\\\tbutton bounds: rect.\\\\t\\\\\\\"image is nil\\\\\\\"].\\\\n\\\\t#(brush1: brush2: brush3: brush4: brush5: brush6: ) doWithIndex: [:sel :ind |\\\\n\\\\t\\\\t\\\\tself inform: 'Rectangle for ',sel.\\\\n\\\\t\\\\t\\\\trect _ Rectangle fromUser.\\\\n\\\\t\\\\t\\\\tbutton _ self submorphNamed: sel.\\\\n\\\\t\\\\t\\\\tbutton bounds: rect.\\\\t\\\\\\\"image is nil\\\\\\\"].\\\\n\\\\t\\\\\\\"stamp:  Stamps are held in a ScrollingToolHolder.  Pickups and stamps and brushes are id-ed by the button == with item from a list.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"\\\\n\\\\t\\\\\\\"\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'tk 8/22/97 15:57'!\\\\nnoVeneer\\\\n\\\\t\\\\\\\"For a palette with a background (off) image, clear that image.\\\\nBut first, for each button, cut that chunk out and save it in the offImage\\\\npart.\\\\\\\"\\\\n\\\\t\\\\\\\"\\\\tself noVeneer.\\\\n\\\\t\\\\tAllOffImage _ nil.\\\\t'save space.  irreversible'.\\\\t\\\\\\\"\\\\n\\\\n\\\\t| aa on |\\\\n\\\\tAllOffImage ifNil: [AllOffImage _ image].\\\\n\\\\taa _ AllOffImage.\\\\n\\\\t\\\\\\\"Collect all the images for the buttons in the on state\\\\\\\"\\\\n\\\\tself allMorphsDo: [:button |\\\\n\\\\t\\\\t(button isKindOf: ThreePhaseButtonMorph) ifTrue: [\\\\n\\\\t\\\\t\\\\ton _ Form extent: button extent depth: 16.\\\\n\\\\t\\\\t\\\\ton copy: (0@0 extent: button extent)\\\\n\\\\t\\\\t\\\\t\\\\tfrom: (button topLeft - self topLeft) in:\\\\naa rule: Form over.\\\\n\\\\t\\\\t\\\\tbutton offImage: on]].\\\\n\\\\tself image: (Form extent: AllOffImage extent depth: 1).\\\\n\\\\tself invalidRect: bounds.\\\\n\\\\n\\\\n\\\\t! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'initialization' stamp: 'RAA 8/16/2000 11:12'!\\\\nnotifyWeakDependentsWith: arguments\\\\n\\\\n\\\\tweakDependents ifNil: [^self].\\\\n\\\\tweakDependents do: [ :each |\\\\n\\\\t\\\\teach ifNotNil: [\\\\n\\\\t\\\\t\\\\teach paintBoxChanged: arguments.\\\\n\\\\t\\\\t\\\\teach paintBoxChanged: {#changed. arguments second. true}.\\\\n\\\\t\\\\t].\\\\n\\\\t].! !\\\\n\\\\n\\\\n!PaintBoxMorph methodsFor: 'other' stamp: 'dgd 8/30/2003 21:55'!\\\\naddCustomMenuItems: aCustomMenu hand: aHandMorph\\\\n\\\\n\\\\t\\\\\\\"super addCustomMenuItems: aCustomMenu hand: aHandMorph.\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"don't want the ones from ImageMorph\\\\\\\"\\\\n\\\\taCustomMenu add: 'grab stamp from screen' translated action: #grabFromScreen:.\\\\n\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'other' stamp: 'yo 1/13/2005 14:08'!\\\\naddGraphicLabels\\\\n\\\\t\\\\\\\"translate button labels\\\\\\\"\\\\n\\\\n\\\\t| formTranslator ext pos newForm |\\\\n\\\\tformTranslator _ NaturalLanguageFormTranslator localeID: (Locale current localeID).\\\\n\\\\n\\\\t#('KEEP' 'UNDO' 'CLEAR' 'TOSS') do: [:label |\\\\n\\\\t\\\\t(formTranslator translate: label, '-off') ifNil: [^ false].\\\\n\\\\t\\\\t(formTranslator translate: label, '-pressed') ifNil: [^ false].\\\\n\\\\t].\\\\n\\\\t\\\\n\\\\t#('keep:' 'undo:' 'clear:' 'toss:') with: #('KEEP' 'UNDO' 'CLEAR' 'TOSS') do: [:extName :label |\\\\n\\\\t\\\\t| button |\\\\n\\\\t\\\\tbutton _ submorphs detect: [:m | m externalName = extName] ifNone: [nil].\\\\n\\\\t\\\\tbutton ifNotNil: [\\\\n\\\\t\\\\t\\\\tbutton removeAllMorphs.\\\\n\\\\t\\\\t\\\\text _ button extent.\\\\n\\\\t\\\\t\\\\tpos _ button position.\\\\n\\\\t\\\\t\\\\t(newForm _ formTranslator translate: label, '-off') ifNotNil: [\\\\n\\\\t\\\\t\\\\t\\\\tbutton offImage: newForm.\\\\n\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\t(newForm _ formTranslator translate: label, '-pressed') ifNotNil: [\\\\n\\\\t\\\\t\\\\t\\\\tbutton pressedImage: newForm.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\tbutton extent: ext.\\\\n\\\\t\\\\t\\\\tbutton position: pos.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\n\\\\t^ true.\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'other' stamp: 'yo 1/13/2005 14:08'!\\\\naddLabels\\\\n\\\\n\\\\tPreferences useFormsInPaintBox ifFalse: [\\\\n\\\\t\\\\tself addTextualLabels.\\\\n\\\\t] ifTrue: [\\\\n\\\\t\\\\tself addGraphicLabels ifFalse: [self addTextualLabels].\\\\n\\\\t].\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'other' stamp: 'yo 1/13/2005 11:06'!\\\\naddTextualLabels\\\\n\\\\t\\\\\\\"translate button labels\\\\\\\"\\\\n\\\\n\\\\t#('keep:' 'undo:' 'clear:' 'toss:') with: #('KEEP' 'UNDO' 'CLEAR' 'TOSS') do: [:extName :label |\\\\n\\\\t\\\\t| button |\\\\n\\\\t\\\\tbutton _ submorphs detect: [:m | m externalName = extName] ifNone: [nil].\\\\n\\\\t\\\\tbutton ifNotNil: [\\\\n\\\\t\\\\t\\\\tbutton removeAllMorphs.\\\\n\\\\t\\\\t\\\\tbutton addMorph: (TextMorph new \\\\n\\\\t\\\\t\\\\t\\\\tcontentsWrapped: (Text string: label translated\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tattributes: {\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tTextAlignment centered. \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tTextEmphasis bold.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tTextFontReference toFont:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(Preferences standardPaintBoxButtonFont)});\\\\n\\\\t\\\\t\\\\t\\\\tbounds: (button bounds translateBy: 0@3);\\\\n\\\\t\\\\t\\\\t\\\\tlock)]]! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'other' stamp: 'tk 10/31/97 13:38'!\\\\ncolorMemory\\\\n\\\\n\\\\t^ colorMemory! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'other' stamp: 'di 10/14/97 10:15'!\\\\ncolorMemory: aMorph\\\\n\\\\n\\\\tcolorMemory _ aMorph! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'other' stamp: 'tk 10/31/97 13:35'!\\\\ncolorPatch\\\\n\\\\t^ colorPatch! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'other' stamp: 'ar 3/23/2000 14:18'!\\\\nfocusMorph\\\\n\\\\t\\\\\\\"Note: For backward compatibility we search the world for a SketchEditorMorph if the current focus morph is nil\\\\\\\"\\\\n\\\\t^focusMorph ifNil:[focusMorph _ self world findA: SketchEditorMorph]! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'other' stamp: 'ar 3/23/2000 14:20'!\\\\nfocusMorph: newFocus\\\\n\\\\t\\\\\\\"Set the new focus morph\\\\\\\"\\\\n\\\\tfocusMorph ifNotNil:[focusMorph paletteDetached: self]. \\\\\\\"In case the morph is interested\\\\\\\"\\\\n\\\\tfocusMorph _ newFocus.\\\\n\\\\tfocusMorph ifNotNil:[focusMorph paletteAttached: self]. \\\\\\\"In case the morph is interested\\\\\\\"! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'other' stamp: 'tk 8/22/2000 11:57'!\\\\nmaxBounds\\\\n\\\\t| rr |\\\\n\\\\t\\\\\\\"fullBounds if all flop-out parts of the paintBox were showing.\\\\\\\"\\\\n\\\\n\\\\trr _ bounds merge: colorMemory bounds.\\\\n\\\\trr _ rr merge: (self submorphNamed: 'stamps') bounds.\\\\n\\\\trr _ rr origin corner: rr corner + (0@ (self submorphNamed: 'shapes') height \\\\n\\\\t\\\\t\\\\t\\\\t+ 10 \\\\\\\"what is showing of (self submorphNamed: #toggleShapes) height\\\\\\\").\\\\n\\\\t^ rr! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'other' stamp: 'tk 8/22/2000 23:48'!\\\\noffsetFromMaxBounds\\\\n\\\\t\\\\\\\"location of normal PaintBox within maxBounds.\\\\\\\"\\\\n\\\\n\\\\t^ self left - colorMemory left @ 0! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'other' stamp: 'tk 7/17/97 16:26'!\\\\nrotationTabForm\\\\n\\\\t^ rotationTabForm! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'other' stamp: 'tk 7/17/97 16:26'!\\\\nscaleTabForm\\\\n\\\\t^ scaleTabForm! !\\\\n\\\\n\\\\n!PaintBoxMorph methodsFor: 'recent colors' stamp: 'ar 7/8/2006 20:33'!\\\\nfixUpColorPicker\\\\n\\\\t| chart picker |\\\\n\\\\tchart _ ColorChart ifNil:[Cursor wait showWhile:[ColorChart _ (ColorPickerMorph colorPaletteForDepth: 16 extent: 120@89)]].\\\\n\\\\tchart getCanvas frameRectangle: chart boundingBox color: Color black.\\\\n\\\\tpicker _ Form extent: (chart extent + (14@12)) depth: 16.\\\\n\\\\tpicker fillWhite.\\\\n\\\\t\\\\\\\"top\\\\\\\"\\\\n\\\\tpicker copy: (0@0 extent: picker width@6)\\\\n\\\\t\\\\t\\\\tfrom: (colorMemory image width - picker width)@0 \\\\n\\\\t\\\\t\\\\tin: colorMemory image rule: Form over.\\\\n\\\\t\\\\\\\"bottom\\\\\\\"\\\\n\\\\tpicker copy: (0@ (picker height-6) extent: picker width@6) \\\\n\\\\t\\\\t\\\\tfrom: (colorMemory image width - picker width)@(colorMemory image height - 7)\\\\n\\\\t\\\\t\\\\tin: colorMemory image rule: Form over.\\\\n\\\\t\\\\\\\"left\\\\\\\"\\\\n\\\\tpicker copy: (0@6 corner: 8@(picker height - 6))\\\\n\\\\t\\\\t\\\\tfrom: (colorMemory image boundingBox topLeft + (0@6)) \\\\n\\\\t\\\\t\\\\tin: colorMemory image rule: Form over.\\\\n\\\\t\\\\\\\"right\\\\\\\"\\\\n\\\\tpicker copy: (picker width-6@6 corner: picker width@(picker height - 6))\\\\n\\\\t\\\\t\\\\tfrom: (colorMemory image boundingBox topRight - (6@-6)) \\\\n\\\\t\\\\t\\\\tin: colorMemory image rule: Form over.\\\\n\\\\tchart displayOn: picker at: 8@6.\\\\n\\\\tpicker getCanvas frameRectangle: picker boundingBox color: Color black.\\\\n\\\\tcolorMemory image: picker.\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'recent colors' stamp: 'dgd 2/21/2003 23:17'!\\\\nfixUpRecentColors\\\\n\\\\t| inner outer border box form newImage canvas morph |\\\\n\\\\tself fixUpColorPicker.\\\\n\\\\trecentColors := WriteStream on: Array new.\\\\n\\\\tform := image.\\\\n\\\\tnewImage := Form extent: form extent + (0 @ 41) depth: form depth.\\\\n\\\\tform displayOn: newImage.\\\\n\\\\tnewImage \\\\n\\\\t\\\\tcopy: (0 @ (form height - 10) \\\\n\\\\t\\\\t\\\\t\\\\textent: form width @ (newImage height - form height + 10))\\\\n\\\\t\\\\tfrom: 0 @ (form height - (newImage height - form height + 10))\\\\n\\\\t\\\\tin: form\\\\n\\\\t\\\\trule: Form over.\\\\n\\\\tcanvas := newImage getCanvas.\\\\n\\\\tcanvas \\\\n\\\\t\\\\tline: 12 @ (form height - 10)\\\\n\\\\t\\\\tto: 92 @ (form height - 10)\\\\n\\\\t\\\\twidth: 1\\\\n\\\\t\\\\tcolor: Color black.\\\\n\\\\tcanvas := canvas copyOffset: 12 @ (form height - 9).\\\\n\\\\tinner := Color \\\\n\\\\t\\\\t\\\\t\\\\tr: 0.677\\\\n\\\\t\\\\t\\\\t\\\\tg: 0.71\\\\n\\\\t\\\\t\\\\t\\\\tb: 0.968.\\\\n\\\\touter := inner darker darker.\\\\n\\\\tborder := Color \\\\n\\\\t\\\\t\\\\t\\\\tr: 0.194\\\\n\\\\t\\\\t\\\\t\\\\tg: 0.258\\\\n\\\\t\\\\t\\\\t\\\\tb: 0.194.\\\\n\\\\t0 to: 1\\\\n\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t[:y | \\\\n\\\\t\\\\t\\\\t0 to: 3\\\\n\\\\t\\\\t\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:x | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbox := (x * 20) @ (y * 20) extent: 20 @ 20.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmorph := BorderedMorph new \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbounds: ((box insetBy: 1) translateBy: canvas origin + bounds origin).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmorph\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tborderWidth: 1;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tborderColor: border.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmorph color: Color white.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmorph \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ton: #mouseDown\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsend: #mouseDownRecent:with:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tto: self.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmorph \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ton: #mouseMove\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsend: #mouseStillDownRecent:with:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tto: self.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmorph \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ton: #mouseUp\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsend: #mouseUpRecent:with:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tto: self.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself addMorphFront: morph.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\trecentColors nextPut: morph.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcanvas fillRectangle: box color: Color white.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcanvas frameRectangle: (box insetBy: 1) color: border.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcanvas frameRectangle: box color: inner.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbox := box insetBy: 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcanvas \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tline: box topRight\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tto: box bottomRight\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twidth: 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcolor: outer.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcanvas \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tline: box bottomLeft\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tto: box bottomRight\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twidth: 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcolor: outer]].\\\\n\\\\trecentColors := recentColors contents.\\\\n\\\\t(RecentColors isNil or: [RecentColors size ~= recentColors size]) \\\\n\\\\t\\\\tifTrue: [RecentColors := recentColors collect: [:each | each color]]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[RecentColors \\\\n\\\\t\\\\t\\\\t\\\\tkeysAndValuesDo: [:idx :aColor | (recentColors at: idx) color: aColor]].\\\\n\\\\tself image: newImage.\\\\n\\\\tself toggleStamps.\\\\n\\\\tself toggleStamps! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'recent colors' stamp: 'ar 9/23/2000 19:54'!\\\\nmouseDownRecent: evt with: aMorph\\\\n\\\\taMorph borderColor: Color white.\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'recent colors' stamp: 'ar 9/23/2000 20:01'!\\\\nmouseStillDownRecent: evt with: aMorph\\\\n\\\\t(aMorph containsPoint: evt cursorPoint)\\\\n\\\\t\\\\tifTrue:[aMorph borderColor: Color white]\\\\n\\\\t\\\\tifFalse:[aMorph borderColor: (Color r: 0.194 g: 0.258 b: 0.194)]\\\\n! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'recent colors' stamp: 'ar 9/23/2000 19:59'!\\\\nmouseUpRecent: evt with: aMorph\\\\n\\\\taMorph borderColor: (Color r: 0.194 g: 0.258 b: 0.194).\\\\n\\\\t(aMorph containsPoint: evt cursorPoint) ifTrue:[\\\\n\\\\t\\\\tself takeColor: aMorph color event: evt.\\\\n\\\\t].! !\\\\n\\\\n!PaintBoxMorph methodsFor: 'recent colors' stamp: 'dgd 2/21/2003 23:17'!\\\\nrecentColor: aColor \\\\n\\\\t\\\\\\\"Remember the color as one of our recent colors\\\\\\\"\\\\n\\\\n\\\\t(recentColors anySatisfy: [:any | any color = aColor]) ifTrue: [^self].\\\\t\\\\\\\"already remembered\\\\\\\"\\\\n\\\\trecentColors size to: 2\\\\n\\\\t\\\\tby: -1\\\\n\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t[:i | \\\\n\\\\t\\\\t\\\\t(recentColors at: i) color: (recentColors at: i - 1) color.\\\\n\\\\t\\\\t\\\\tRecentColors at: i put: (RecentColors at: i - 1)].\\\\n\\\\t(recentColors first) color: aColor.\\\\n\\\\tRecentColors at: 1 put: aColor! !\\\\n\\\\n\\\\n!PaintBoxMorph methodsFor: 'user interface' stamp: 'tk 7/2/97 08:10'!\\\\nmouseUpBalk: evt\\\\n\\\\t\\\\\\\"A button I own got a mouseDown, but the user moved out before letting up.  Prevent this for the current tool.  Some tool must stay selected.\\\\\\\"\\\\n\\\\n\\\\ttool state: #on.\\\\t\\\\\\\"keep current one, even if user balked on it\\\\\\\"\\\\n\\\\tcurrentBrush ifNotNil: [currentBrush state: #on].! !\\\\n\\\\n\\\\n!PaintBoxMorph methodsFor: '*eToys-e-toy support' stamp: 'sw 6/30/1999 20:33'!\\\\nisCandidateForAutomaticViewing\\\\n\\\\t^ false! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPaintBoxMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PaintBoxMorph class methodsFor: 'as yet unclassified' stamp: 'tk 8/21/2000 12:52'!\\\\nfixUpPrototype\\\\n\\\\t\\\\\\\"PaintBoxMorph fixUpPrototype\\\\\\\"\\\\nself error: 'who uses this?'.\\\\n\\\\tPrototype eventHandler: nil! !\\\\n\\\\n!PaintBoxMorph class methodsFor: 'as yet unclassified' stamp: 'ar 7/8/2006 20:33'!\\\\ninitializeColorChart\\\\n\\\\t\\\\\\\"PaintBoxMorph initializeColorChart\\\\\\\"\\\\n\\\\tColorChart _ (ColorPickerMorph colorPaletteForDepth: 32 extent: (360+10)@(180+10))! !\\\\n\\\\n!PaintBoxMorph class methodsFor: 'as yet unclassified' stamp: 'tk 10/12/97 11:01'!\\\\nprototype\\\\n\\\\t\\\\\\\"Later we will be a subclass of Model, and it will have a general version of this\\\\\\\"\\\\n\\\\t^ Prototype! !\\\\n\\\\n\\\\n!PaintBoxMorph class methodsFor: 'class initialization' stamp: 'tk 8/21/2000 12:58'!\\\\ninitialize\\\\n\\\\t\\\\\\\"PaintBoxMorph initialize\\\\\\\"\\\\n\\\\n\\\\tPrototype eventHandler: nil.\\\\n\\\\tPrototype focusMorph: nil.\\\\n\\\\tPrototype stampHolder clear.  \\\\\\\"clear stamps\\\\\\\"\\\\n\\\\tPrototype delete.  \\\\\\\"break link to world, if any\\\\\\\"\\\\n\\\\n\\\\tAllOnImage _ AllOffImage _ AllPressedImage _ nil.\\\\n\\\\tOriginalBounds _ nil.\\\\n\\\\n! !\\\\n\\\\n\\\\n!PaintBoxMorph class methodsFor: 'instance creation' stamp: 'bf 10/11/2004 13:37'!\\\\nnew\\\\n\\\\n\\\\t| pb button dualUse formCanvas rect |\\\\n\\\\tpb _ Prototype veryDeepCopy.\\\\n\\\\t\\\\t\\\\\\\"Assume that the PaintBox does not contain any scripted Players!!\\\\\\\"\\\\n\\\\tpb stampHolder normalize.\\\\t\\\\\\\"Get the stamps to show\\\\\\\"\\\\n\\\\t\\\\\\\"Get my own copies of the brushes so I can modify them\\\\\\\"\\\\n\\\\t#(brush1: brush2: brush3: brush4: brush5: brush6:) do: [:sel |\\\\n\\\\t\\\\tbutton _ pb submorphNamed: sel.\\\\n\\\\t\\\\tbutton offImage: button offImage deepCopy.\\\\n\\\\t\\\\tdualUse _ button onImage == button pressedImage.\\\\t\\\\\\\"sometimes shared\\\\\\\"\\\\n\\\\t\\\\tbutton onImage: button onImage deepCopy.\\\\n\\\\t\\\\tdualUse\\\\n\\\\t\\\\t\\\\tifTrue: [button pressedImage: button onImage]\\\\n\\\\t\\\\t\\\\tifFalse: [button pressedImage: button pressedImage deepCopy].\\\\n\\\\t\\\\t\\\\\\\"force color maps for later mapping\\\\\\\"\\\\n\\\\t\\\\tbutton offImage.\\\\n\\\\t\\\\tbutton onImage.\\\\n\\\\t\\\\tbutton pressedImage.\\\\n\\\\t\\\\tformCanvas _ button onImage getCanvas.\\\\n\\\\t\\\\tformCanvas _ formCanvas\\\\n\\\\t\\\\t\\\\tcopyOrigin: 0@0\\\\n\\\\t\\\\t\\\\tclipRect: (rect _ 0@0 extent: button onImage extent).\\\\n\\\\t\\\\t(#(brush1: brush3:) includes: sel) ifTrue: [\\\\n\\\\t\\\\t\\\\trect _ rect origin corner: rect corner - (2@2)].\\\\n\\\\t\\\\t(#brush2: == sel) ifTrue: [\\\\n\\\\t\\\\t\\\\trect _ rect origin corner: rect corner - (2@4)].\\\\n\\\\t\\\\tformCanvas frameAndFillRectangle: rect fillColor: Color transparent\\\\n\\\\t\\\\t\\\\tborderWidth: 2 borderColor: (Color r: 0.599 g: 0.8 b: 1.0).\\\\n\\\\t\\\\t].\\\\n\\\\tpb showColor.\\\\n\\\\tpb fixUpRecentColors.\\\\n\\\\tpb addLabels.\\\\n\\\\t^ pb! !\\\\n\\\\n\\\\n!PaintBoxMorph class methodsFor: 'notification' stamp: 'ar 7/8/2006 20:33'!\\\\nlocaleChanged\\\\n\\\\t| caption |\\\\n\\\\tcaption := ColorPickerMorph noColorCaption.\\\\n\\\\tcaption displayOn: ColorChart at: ColorChart boundingBox topCenter - (caption width // 2 @ 0)! !\\\\nImageMorph subclass: #PaintInvokingMorph\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-Widgets'!\\\\n!PaintInvokingMorph commentStamp: '<historical>' prior: 0!\\\\nWhen this is dropped inside some appropriate place, then painting is invoked for that place.!\\\\n\\\\n\\\\n!PaintInvokingMorph methodsFor: 'dropping/grabbing' stamp: 'dgd 4/3/2006 14:19'!\\\\njustDroppedInto: aPasteUpMorph event: anEvent\\\\n\\\\t\\\\\\\"This message is sent to a dropped morph after it has been dropped on--and been accepted by--a drop-sensitive morph\\\\\\\"\\\\n\\\\taPasteUpMorph isPartsBin ifFalse:[\\\\n\\\\t\\\\tself removeHalo.\\\\n\\\\t\\\\tself delete.\\\\n\\\\t\\\\t^aPasteUpMorph makeNewDrawing: anEvent].\\\\n\\\\t^super justDroppedInto: aPasteUpMorph event: anEvent! !\\\\n\\\\n!PaintInvokingMorph methodsFor: 'dropping/grabbing' stamp: 'ar 3/3/2001 20:40'!\\\\nwantsToBeDroppedInto: aMorph\\\\n\\\\t\\\\\\\"Only into PasteUps that are not part bins\\\\\\\"\\\\n\\\\t^aMorph isPlayfieldLike! !\\\\n\\\\n\\\\n!PaintInvokingMorph methodsFor: 'initialization' stamp: 'sw 7/16/1998 00:02'!\\\\ninitialize\\\\n\\\\tsuper initialize.\\\\n\\\\tself image: (ScriptingSystem formAtKey: 'Painting')! !\\\\n\\\\n\\\\n!PaintInvokingMorph methodsFor: 'parts bin' stamp: 'sw 8/12/2001 17:19'!\\\\ninitializeToStandAlone\\\\n\\\\tsuper initializeToStandAlone.\\\\n\\\\tself image: (ScriptingSystem formAtKey: 'Painting')! !\\\\n\\\\n\\\\n!PaintInvokingMorph methodsFor: '*eToys-e-toy support' stamp: 'sw 6/30/1999 20:31'!\\\\nisCandidateForAutomaticViewing\\\\n\\\\t^ self isPartsDonor not! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nPaintInvokingMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!PaintInvokingMorph class methodsFor: 'class initialization' stamp: 'asm 4/10/2003 13:16'!\\\\ninitialize\\\\n\\\\n\\\\tself registerInFlapsRegistry.! !\\\\n\\\\n!PaintInvokingMorph class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 10:09'!\\\\nregisterInFlapsRegistry\\\\n\\\\t\\\\\\\"Register the receiver in the system's flaps registry\\\\\\\"\\\\n\\\\tself environment\\\\n\\\\t\\\\tat: #Flaps\\\\n\\\\t\\\\tifPresent: [:cl | cl registerQuad: #(PaintInvokingMorph\\\\tnew\\\\t'Paint'\\\\t'Drop this into an area to start making a fresh painting there')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'PlugIn Supplies'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcl registerQuad: #(PaintInvokingMorph\\\\tnew\\\\t'Paint'\\\\t'Drop this into an area to start making a fresh painting there')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'Widgets'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcl registerQuad: #(PaintInvokingMorph\\\\tnew\\\\t'Paint'\\\\t'Drop this into an area to start making a fresh painting there')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'Scripting']! !\\\\n\\\\n!PaintInvokingMorph class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 12:38'!\\\\nunload\\\\n\\\\t\\\\\\\"Unload the receiver from global registries\\\\\\\"\\\\n\\\\n\\\\tself environment at: #Flaps ifPresent: [:cl |\\\\n\\\\tcl unregisterQuadsWithReceiver: self] ! !\\\\n\\\\n\\\\n!PaintInvokingMorph class methodsFor: 'parts bin' stamp: 'nk 8/23/2004 18:11'!\\\\ndescriptionForPartsBin\\\\n\\\\t^ self partName:\\\\t'Paint'\\\\n\\\\t\\\\tcategories:\\\\t\\\\t#('Basic' 'Graphics')\\\\n\\\\t\\\\tdocumentation:\\\\t'Drop this icon to start painting a new object.'! !\\\\n\\\\n\\\\n!PaintInvokingMorph class methodsFor: 'scripting' stamp: 'sw 5/6/2000 02:28'!\\\\nauthoringPrototype\\\\n\\\\t^ self new image: (ScriptingSystem formAtKey: 'Painting'); markAsPartsDonor; setBalloonText: 'drop this into any playfield or book page to make a new painting there'; yourself! !\\\\nCompositeStub subclass: #PanelStub\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'ToolBuilder-SUnit'!\\\\nDisplayText subclass: #Paragraph\\\\n\\\\tinstanceVariableNames: 'clippingRectangle compositionRectangle destinationForm rule mask marginTabsLevel lines lastLine'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: 'TextConstants'\\\\n\\\\tcategory: 'ST80-Support'!\\\\n!Paragraph commentStamp: '<historical>' prior: 0!\\\\nI represent displayable text that has been decoraged with margin alignment, line leading, and tab settings.!\\\\n\\\\n\\\\n!Paragraph methodsFor: 'accessing'!\\\\nbackgroundColor\\\\n\\\\tbackColor == nil ifTrue: [^ Color white].\\\\n\\\\t^ backColor! !\\\\n\\\\n!Paragraph methodsFor: 'accessing'!\\\\nclippingRectangle \\\\n\\\\t\\\\\\\"Answer the rectangle, defined in absolute coordinates, whose \\\\n\\\\tintersection with the destinationForm is the area in which the characters \\\\n\\\\tare constrained to display.\\\\\\\"\\\\n\\\\n\\\\t^clippingRectangle! !\\\\n\\\\n!Paragraph methodsFor: 'accessing' stamp: 'di 10/5/97 15:33'!\\\\nclippingRectangle: clipRect \\\\n\\\\tclippingRectangle _ clipRect! !\\\\n\\\\n!Paragraph methodsFor: 'accessing'!\\\\ncompositionRectangle\\\\n\\\\t\\\\\\\"Answer the rectangle whose width is the dimension, modified by \\\\n\\\\tindents and tabsLevels, against which line wraparound is measured. The \\\\n\\\\theight of the compositionRectangle is reset each time recomposition is \\\\n\\\\trequired.\\\\\\\"\\\\n\\\\n\\\\t^compositionRectangle! !\\\\n\\\\n!Paragraph methodsFor: 'accessing'!\\\\ncompositionRectangle: compRectangle \\\\n\\\\t\\\\\\\"Set the rectangle whose width is the dimension, modified by indents and \\\\n\\\\ttabsLevels, against which line wraparound is measured.\\\\\\\"\\\\n\\\\n\\\\tcompositionRectangle _ compRectangle.\\\\n\\\\tself composeAll! !\\\\n\\\\n!Paragraph methodsFor: 'accessing'!\\\\ndestinationForm \\\\n\\\\t \\\\\\\"Answer the Form into which the characters are scanned.\\\\\\\"\\\\n\\\\n\\\\t^destinationForm! !\\\\n\\\\n!Paragraph methodsFor: 'accessing'!\\\\nfillColor \\\\n\\\\t\\\\\\\"Answer the Form with which each character is combined by the scanner \\\\n\\\\tbefore applying the rule for display.\\\\\\\"\\\\n\\\\n\\\\t^mask! !\\\\n\\\\n!Paragraph methodsFor: 'accessing'!\\\\nfillColor: maskForm \\\\n\\\\t\\\\\\\"Set the argument, maskForm, to be the form with which each character \\\\n\\\\tis combined by the scanner before applying the rule for display.\\\\\\\"\\\\n\\\\n\\\\tmask _ maskForm! !\\\\n\\\\n!Paragraph methodsFor: 'accessing'!\\\\nheight \\\\n\\\\t\\\\\\\"Answer the height of the composition rectangle.\\\\\\\"\\\\n\\\\n\\\\t^compositionRectangle height! !\\\\n\\\\n!Paragraph methodsFor: 'accessing'!\\\\nindentationOfLineIndex: lineIndex ifBlank: aBlock\\\\n\\\\t\\\\\\\"Answer the number of leading tabs in the line at lineIndex.  If there are\\\\n\\\\t no visible characters, pass the number of tabs to aBlock and return its value.\\\\n\\\\t If the line is word-wrap overflow, back up a line and recur.\\\\\\\"\\\\n\\\\n\\\\t| arrayIndex first last reader leadingTabs lastSeparator cr tab ch |\\\\n\\\\tcr _ Character cr.\\\\n\\\\ttab _ Character tab.\\\\n\\\\tarrayIndex _ lineIndex.\\\\n\\\\t[first _ (lines at: arrayIndex) first.\\\\n\\\\t first > 1 and: [(text string at: first - 1) ~~ cr]] whileTrue: \\\\\\\"word wrap\\\\\\\"\\\\n\\\\t\\\\t[arrayIndex _ arrayIndex - 1].\\\\n\\\\tlast _ (lines at: lastLine) last.\\\\n\\\\treader _ ReadStream on: text string from: first to: last.\\\\n\\\\tleadingTabs _ 0.\\\\n\\\\t[reader atEnd not and: [(ch _ reader next) == tab]]\\\\n\\\\t\\\\twhileTrue: [leadingTabs _ leadingTabs + 1].\\\\n\\\\tlastSeparator _ first - 1 + leadingTabs.\\\\n\\\\t[reader atEnd not and: [ch isSeparator and: [ch ~~ cr]]]\\\\n\\\\t\\\\twhileTrue: [lastSeparator _ lastSeparator + 1. ch _ reader next].\\\\n\\\\tlastSeparator = last | (ch == cr)\\\\n\\\\t\\\\tifTrue: [^aBlock value: leadingTabs].\\\\n\\\\t^leadingTabs! !\\\\n\\\\n!Paragraph methodsFor: 'accessing'!\\\\nmask \\\\n\\\\t\\\\\\\"Answer the Form with which each character is combined by the scanner \\\\n\\\\tbefore applying the rule for display.\\\\\\\"\\\\n\\\\n\\\\t^mask! !\\\\n\\\\n!Paragraph methodsFor: 'accessing'!\\\\nnumberOfLines \\\\n\\\\t\\\\\\\"Answer the number of lines of text in the receiver.\\\\\\\"\\\\n\\\\n\\\\t^lastLine! !\\\\n\\\\n!Paragraph methodsFor: 'accessing' stamp: 'ar 5/18/2000 18:34'!\\\\nreplaceFrom: start to: stop with: aText displaying: displayBoolean\\\\n\\\\t\\\\\\\"Replace the receiver's text starting at position start, stopping at stop, by \\\\n\\\\tthe characters in aText. It is expected that most requirements for \\\\n\\\\tmodifications to the receiver will call this code. Certainly all cut's or \\\\n\\\\tpaste's.\\\\\\\" \\\\n\\\\n\\\\t| compositionScanner obsoleteLines obsoleteLastLine firstLineIndex lastLineIndex\\\\n\\\\tstartLine stopLine replacementRange visibleRectangle startIndex newLine done\\\\n\\\\tnewStop obsoleteY newY moveRectangle |\\\\n\\\\n\\\\ttext replaceFrom: start to: stop with: aText.\\\\t\\\\t\\\\\\\"Update the text.\\\\\\\"\\\\n\\\\tlastLine = 0 ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"if lines have never been set up, measure them and display\\\\n\\\\t\\\\tall the lines falling in the visibleRectangle\\\\\\\"\\\\n\\\\t\\\\tself composeAll.\\\\n\\\\t\\\\tdisplayBoolean ifTrue: [^ self displayLines: (1 to: lastLine)]].\\\\n\\\\n\\\\t\\\\\\\"save -- things get pretty mashed as we go along\\\\\\\"\\\\n\\\\tobsoleteLines _ lines copy.\\\\n\\\\tobsoleteLastLine _ lastLine.\\\\n\\\\n\\\\t\\\\\\\"find the starting and stopping lines\\\\\\\"\\\\n\\\\tfirstLineIndex _ startLine _ self lineIndexOfCharacterIndex: start.\\\\n\\\\tstopLine _ self lineIndexOfCharacterIndex: stop.\\\\n\\\\n\\\\t\\\\\\\"how many characters being inserted or deleted\\\\n\\\\t\\\\t-- negative if aText size is < characterInterval size.\\\\\\\"\\\\n\\\\treplacementRange _ aText size - (stop - start + 1).\\\\n\\\\t\\\\\\\"Give ourselves plenty of elbow room.\\\\\\\"\\\\n\\\\tcompositionRectangle _ compositionRectangle withHeight: (textStyle lineGrid * 9999).\\\\n\\\\t\\\\\\\"build a boundingBox of the actual screen space in question -- we'll need it later\\\\\\\"\\\\n\\\\tvisibleRectangle _ (clippingRectangle intersect: compositionRectangle)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: destinationForm boundingBox.\\\\n\\\\tcompositionScanner _ CompositionScanner new forParagraph: self.\\\\t\\\\t\\\\\\\"Initialize a scanner.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"If the starting line is not also the first line, then measuring must commence from line preceding the one in which characterInterval start appears.  For example, deleting a line with only a carriage return may move characters following the deleted portion of text into the line preceding the deleted line.\\\\\\\"\\\\n\\\\tstartIndex _ (lines at: firstLineIndex) first.\\\\n\\\\tstartLine > 1\\\\n\\\\t\\\\tifTrue: \\\\t[newLine _ compositionScanner composeLine: startLine - 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfromCharacterIndex: (lines at: startLine - 1) first\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinParagraph: self.\\\\n\\\\t\\\\t\\\\t\\\\t(lines at: startLine - 1) = newLine\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse:\\\\t[\\\\\\\"start in line preceding the one with the starting character\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartLine _ startLine - 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself lineAt: startLine put: newLine.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartIndex _ newLine last + 1]].\\\\n\\\\tstartIndex > text size ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"nil lines after a deletion -- remeasure last line below\\\\\\\"\\\\n\\\\t\\\\tself trimLinesTo: (firstLineIndex - 1 max: 0).\\\\n\\\\t\\\\ttext size = 0 ifTrue:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"entire text deleted -- clear visibleRectangle and return.\\\\\\\"\\\\n\\\\t\\\\t\\\\tdisplayBoolean ifTrue: [destinationForm fill: visibleRectangle rule: rule fillColor: self backgroundColor].\\\\n\\\\t\\\\t\\\\tself updateCompositionHeight.\\\\n\\\\t\\\\t\\\\t^self]].\\\\n\\\\n\\\\t\\\\\\\"Now we really get to it.\\\\\\\"\\\\n\\\\tdone _ false.\\\\n\\\\tlastLineIndex _ stopLine.\\\\n\\\\t[done or: [startIndex > text size]]\\\\n\\\\t\\\\twhileFalse: \\\\n\\\\t\\\\t[self lineAt: firstLineIndex put:\\\\n\\\\t\\\\t\\\\t(newLine _ compositionScanner composeLine: firstLineIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfromCharacterIndex: startIndex inParagraph: self).\\\\n\\\\t\\\\t[(lastLineIndex > obsoleteLastLine\\\\n\\\\t\\\\t\\\\tor: [\\\\\\\"no more old lines to compare with?\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tnewLine last <\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(newStop _ (obsoleteLines at: lastLineIndex) last + replacementRange)])\\\\n\\\\t\\\\t\\\\t  \\\\tor: [done]]\\\\n\\\\t\\\\t\\\\twhileFalse: \\\\n\\\\t\\\\t\\\\t[newStop = newLine last\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\t[\\\\\\\"got the match\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"get source and dest y's for moving the unchanged lines\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tobsoleteY _ self topAtLineIndex: lastLineIndex + 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tusing: obsoleteLines and: obsoleteLastLine.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnewY _ self topAtLineIndex: firstLineIndex + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstopLine _ firstLineIndex.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdone _ true.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Fill in the new line vector with the old unchanged lines.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tUpdate their starting and stopping indices on the way.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t((lastLineIndex _ lastLineIndex + 1) to: obsoleteLastLine) do:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:upDatedIndex | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself lineAt: (firstLineIndex _ firstLineIndex + 1) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tput: ((obsoleteLines at: upDatedIndex)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t  \\\\t\\\\tslide: replacementRange)].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"trim off obsolete lines, if any\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself trimLinesTo: firstLineIndex]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\t[lastLineIndex _ lastLineIndex + 1]].\\\\n\\\\t\\\\tstartIndex _ newLine last + 1.\\\\n\\\\t\\\\tfirstLineIndex _ firstLineIndex + 1].\\\\n\\\\n\\\\t\\\\\\\"Now the lines are up to date -- Whew!!.  What remains is to move\\\\n\\\\tthe 'unchanged' lines and display those which have changed.\\\\\\\"\\\\n\\\\tdisplayBoolean   \\\\\\\"Not much to do if not displaying\\\\\\\"\\\\n\\\\t\\\\tifFalse: [^ self updateCompositionHeight].\\\\n\\\\tstartIndex > text size ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"If at the end of previous lines simply display lines from the line in\\\\n\\\\t\\\\twhich the first character of the replacement occured through the\\\\n\\\\t\\\\tend of the paragraph.\\\\\\\"\\\\n\\\\t\\\\tself updateCompositionHeight.\\\\n\\\\t\\\\tself displayLines:\\\\n\\\\t\\\\t\\\\t(startLine to: (stopLine _ firstLineIndex min: lastLine)).\\\\n\\\\t\\\\tdestinationForm  \\\\\\\"Clear out area at the bottom\\\\\\\"\\\\n\\\\t\\\\t\\\\tfill: ((visibleRectangle left @ (self topAtLineIndex: lastLine + 1)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\textent: visibleRectangle extent)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle)\\\\n\\\\t\\\\t\\\\trule: rule fillColor: self backgroundColor]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t[newY ~= obsoleteY ifTrue:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"Otherwise first move the unchanged lines within\\\\n\\\\t\\\\t\\\\tthe visibleRectangle with a good old bitblt.\\\\\\\"\\\\n\\\\t\\\\t\\\\tmoveRectangle _\\\\n\\\\t\\\\t\\\\t\\\\tvisibleRectangle left @ (obsoleteY max: visibleRectangle top)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcorner: visibleRectangle corner.\\\\n\\\\t\\\\t\\\\tdestinationForm copyBits: moveRectangle from: destinationForm\\\\n\\\\t\\\\t\\\\t\\\\tat: moveRectangle origin + (0 @ (newY-obsoleteY))\\\\n\\\\t\\\\t\\\\t\\\\tclippingBox: visibleRectangle\\\\n\\\\t\\\\t\\\\t\\\\trule: Form over fillColor: nil].\\\\n\\\\n\\\\t\\\\t\\\\\\\"Then display the altered lines.\\\\\\\"\\\\n\\\\t\\\\tself displayLines: (startLine to: stopLine).\\\\n\\\\n\\\\t\\\\tnewY < obsoleteY\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[(self topAtLineIndex: obsoleteLastLine+1 using: obsoleteLines and: obsoleteLastLine) > visibleRectangle bottom\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[\\\\\\\"A deletion may have 'pulled' previously undisplayed lines\\\\n\\\\t\\\\t\\\\t\\\\tinto the visibleRectangle.  If so, display them.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tself displayLines:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t((self lineIndexOfTop: visibleRectangle bottom - (obsoleteY - newY))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tto: (self lineIndexOfTop: visibleRectangle bottom))].\\\\n\\\\t\\\\t\\\\t\\\\\\\"Clear out obsolete material at the bottom of the visibleRectangle.\\\\\\\"\\\\n\\\\t\\\\t\\\\tdestinationForm\\\\n\\\\t\\\\t\\\\t\\\\tfill: ((visibleRectangle left @ ((self bottomAtLineIndex: lastLine) + 1)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\textent: visibleRectangle extent)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle)  \\\\\\\"How about just corner: ??\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\trule: rule fillColor: self backgroundColor].\\\\n\\\\n\\\\t\\\\t(newY > obsoleteY and: [obsoleteY < visibleRectangle top])\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[\\\\\\\"An insertion may have 'pushed' previously undisplayed lines\\\\n\\\\t\\\\t\\\\t\\\\tinto the visibleRectangle.  If so, display them.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tself displayLines:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t((self lineIndexOfTop: visibleRectangle top)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tto: (self lineIndexOfTop: visibleRectangle top + (newY-obsoleteY)))].\\\\n\\\\n\\\\t\\\\tself updateCompositionHeight]! !\\\\n\\\\n!Paragraph methodsFor: 'accessing'!\\\\nrule \\\\n\\\\t\\\\\\\"Answer the rule according to which character display behaves. For \\\\n\\\\texample, rule may equal over, under, reverse.\\\\\\\"\\\\n\\\\n\\\\t^rule! !\\\\n\\\\n!Paragraph methodsFor: 'accessing'!\\\\nrule: ruleInteger \\\\n\\\\t\\\\\\\"Set the rule according to which character display behaves.\\\\\\\"\\\\n\\\\n\\\\trule _ ruleInteger! !\\\\n\\\\n!Paragraph methodsFor: 'accessing' stamp: 'sw 10/29/1999 18:11'!\\\\nstringAtLineNumber: aNumber\\\\n\\\\t(aNumber > lastLine or: [aNumber < 1]) ifTrue: [^ nil].\\\\n\\\\t^ (text string copyFrom: (lines at: aNumber) first to: (lines at: aNumber) last) copyWithout: Character cr! !\\\\n\\\\n!Paragraph methodsFor: 'accessing'!\\\\ntext: aText \\\\n\\\\t\\\\\\\"Set the argument, aText, to be the text for the receiver.\\\\\\\"\\\\n\\\\n\\\\ttext _ aText.\\\\n\\\\tself composeAll! !\\\\n\\\\n\\\\n!Paragraph methodsFor: 'alignment'!\\\\ncentered \\\\n\\\\t\\\\\\\"Set the alignment for the style with which the receiver displays its text \\\\n\\\\tso that text is centered in the composition rectangle.\\\\\\\"\\\\n\\\\n\\\\ttextStyle alignment: Centered! !\\\\n\\\\n!Paragraph methodsFor: 'alignment'!\\\\njustified \\\\n\\\\t\\\\\\\"Set the alignment for the style with which the receiver displays its text \\\\n\\\\tso that the characters in each of text end on an even border in the \\\\n\\\\tcomposition rectangle.\\\\\\\"\\\\n\\\\n\\\\ttextStyle alignment: Justified! !\\\\n\\\\n!Paragraph methodsFor: 'alignment'!\\\\nleftFlush \\\\n\\\\t\\\\\\\"Set the alignment for the style with which the receiver displays its text \\\\n\\\\tso that the characters in each of text begin on an even border in the \\\\n\\\\tcomposition rectangle. This is also known as ragged-right.\\\\\\\"\\\\n\\\\n\\\\ttextStyle alignment: LeftFlush! !\\\\n\\\\n!Paragraph methodsFor: 'alignment'!\\\\nrightFlush \\\\n\\\\t\\\\\\\"Set the alignment for the style with which the receiver displays its text \\\\n\\\\tso that the characters in each of text end on an even border in the \\\\n\\\\tcomposition rectangle but the beginning of each line does not. This is \\\\n\\\\talso known as ragged-left.\\\\\\\"\\\\n\\\\n\\\\ttextStyle alignment: RightFlush! !\\\\n\\\\n!Paragraph methodsFor: 'alignment'!\\\\ntoggleAlignment \\\\n\\\\t\\\\\\\"Set the alignment for the style with which the receiver displays its text \\\\n\\\\tso that it moves from centered to justified to leftFlush to rightFlush and \\\\n\\\\tback to centered again.\\\\\\\"\\\\n\\\\n\\\\ttextStyle alignment: textStyle alignment + 1! !\\\\n\\\\n\\\\n!Paragraph methodsFor: 'character location' stamp: 'ar 5/18/2000 18:33'!\\\\ncharacterBlockAtPoint: aPoint \\\\n\\\\t\\\\\\\"Answer a CharacterBlock for characters in the text at point aPoint. It is \\\\n\\\\tassumed that aPoint has been transformed into coordinates appropriate to \\\\n\\\\tthe receiver's destinationForm rectangle and the compositionRectangle.\\\\\\\"\\\\n\\\\n\\\\t^CharacterBlockScanner new characterBlockAtPoint: aPoint in: self! !\\\\n\\\\n!Paragraph methodsFor: 'character location' stamp: 'ar 5/18/2000 18:33'!\\\\ncharacterBlockForIndex: targetIndex \\\\n\\\\t\\\\\\\"Answer a CharacterBlock for character in the text at targetIndex. The \\\\n\\\\tcoordinates in the CharacterBlock will be appropriate to the intersection \\\\n\\\\tof the destinationForm rectangle and the compositionRectangle.\\\\\\\"\\\\n\\\\n\\\\t^CharacterBlockScanner new characterBlockForIndex: targetIndex in: self! !\\\\n\\\\n!Paragraph methodsFor: 'character location' stamp: 'di 10/5/1998 12:59'!\\\\ndefaultCharacterBlock\\\\n\\\\t^ CharacterBlock new stringIndex: 1 text: text\\\\n\\\\t\\\\t\\\\ttopLeft: compositionRectangle topLeft extent: 0 @ 0! !\\\\n\\\\n\\\\n!Paragraph methodsFor: 'composition' stamp: 'yo 1/23/2003 22:47'!\\\\ncomposeAll\\\\n\\\\t\\\\\\\"Compose a collection of characters into a collection of lines.\\\\\\\"\\\\n\\\\n\\\\t| startIndex stopIndex lineIndex maximumRightX compositionScanner |\\\\n\\\\tlines _ Array new: 32.\\\\n\\\\tlastLine _ 0.\\\\n\\\\tmaximumRightX _ 0.\\\\n\\\\ttext size = 0\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[compositionRectangle _ compositionRectangle withHeight: 0.\\\\n\\\\t\\\\t\\\\t^maximumRightX].\\\\n\\\\tstartIndex _ lineIndex _ 1.\\\\n\\\\tstopIndex _ text size.\\\\n\\\\tcompositionScanner _ MultiCompositionScanner new forParagraph: self.\\\\n\\\\t[startIndex > stopIndex] whileFalse: \\\\n\\\\t\\\\t[self lineAt: lineIndex \\\\n\\\\t\\\\t\\\\t\\\\tput: (compositionScanner composeLine: lineIndex \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfromCharacterIndex: startIndex \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinParagraph: self).\\\\n\\\\t\\\\t maximumRightX _ compositionScanner rightX max: maximumRightX.\\\\n\\\\t\\\\t startIndex _ (lines at: lineIndex) last + 1.\\\\n\\\\t\\\\t lineIndex _ lineIndex + 1].\\\\n\\\\tself updateCompositionHeight.\\\\n\\\\tself trimLinesTo: lineIndex - 1.\\\\n\\\\t^ maximumRightX! !\\\\n\\\\n!Paragraph methodsFor: 'composition'!\\\\nwrappingBox: compositionRect clippingBox: clippingRect \\\\n\\\\t\\\\\\\"Set the composition rectangle for the receiver so that the lines wrap \\\\n\\\\twithin the rectangle, compositionRect, and the display of the text is \\\\n\\\\tclipped by the rectangle, clippingRect.\\\\\\\"\\\\n\\\\n\\\\tself compositionRectangle: compositionRect copy\\\\n\\\\t\\\\t\\\\t\\\\ttext: text\\\\n\\\\t\\\\t\\\\t\\\\tstyle: textStyle\\\\n\\\\t\\\\t\\\\t\\\\toffset: offset.\\\\n\\\\tclippingRectangle _ clippingRect copy! !\\\\n\\\\n\\\\n!Paragraph methodsFor: 'converting' stamp: 'yo 6/23/2003 19:05'!\\\\nasForm\\\\n\\\\t\\\\\\\"Answer a Form made up of the bits that represent the receiver's displayable text.\\\\\\\"\\\\n\\\\t| theForm oldBackColor oldForeColor |\\\\n\\\\ttextStyle isTTCStyle ifTrue: [\\\\n\\\\t\\\\ttheForm _  (Form extent: compositionRectangle extent depth: 32)\\\\n\\\\t\\\\toffset: offset.\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\ttheForm _ (ColorForm extent: compositionRectangle extent)\\\\n\\\\t\\\\t\\\\toffset: offset;\\\\n\\\\t\\\\t\\\\tcolors: (Array\\\\n\\\\t\\\\t\\\\t\\\\twith: (backColor == nil ifTrue: [Color transparent] ifFalse: [backColor])\\\\n\\\\t\\\\t\\\\t\\\\twith: (foreColor == nil ifTrue: [Color black] ifFalse: [foreColor])).\\\\n\\\\t].\\\\n\\\\toldBackColor _ backColor.\\\\n\\\\toldForeColor _ foreColor.\\\\n\\\\tbackColor _ Color white.\\\\n\\\\tforeColor _ Color black.\\\\n\\\\tself displayOn: theForm\\\\n\\\\t\\\\tat: 0@0\\\\n\\\\t\\\\tclippingBox: theForm boundingBox\\\\n\\\\t\\\\trule: Form over\\\\n\\\\t\\\\tfillColor: nil.\\\\n\\\\tbackColor _ oldBackColor.\\\\n\\\\tforeColor _ oldForeColor.\\\\n\\\\t^ theForm\\\\n\\\\n\\\\\\\"Example:\\\\n| p |\\\\np _ 'Abc' asParagraph.\\\\np foregroundColor: Color red backgroundColor: Color black.\\\\np asForm displayOn: Display at: 30@30 rule: Form over\\\\\\\"\\\\n! !\\\\n\\\\n!Paragraph methodsFor: 'converting'!\\\\nasString\\\\n\\\\t\\\\\\\"Answer the string of characters of the receiver's text.\\\\\\\"\\\\n\\\\n\\\\t^text string! !\\\\n\\\\n!Paragraph methodsFor: 'converting'!\\\\nasText\\\\n\\\\t\\\\\\\"Answer the receiver's text.\\\\\\\"\\\\n\\\\n\\\\t^text! !\\\\n\\\\n\\\\n!Paragraph methodsFor: 'display box access'!\\\\nboundingBox\\\\n\\\\n\\\\t^offset extent: compositionRectangle extent! !\\\\n\\\\n!Paragraph methodsFor: 'display box access'!\\\\ncomputeBoundingBox\\\\n\\\\n\\\\t^offset extent: compositionRectangle extent! !\\\\n\\\\n\\\\n!Paragraph methodsFor: 'displaying'!\\\\ndisplayOn: aDisplayMedium\\\\n\\\\t\\\\\\\"Because Paragraphs cache so much information, computation is avoided\\\\n\\\\tand displayAt: 0@0 is not appropriate here.\\\\\\\"\\\\n\\\\n\\\\tself displayOn: aDisplayMedium\\\\n\\\\t\\\\tat: compositionRectangle topLeft\\\\n\\\\t\\\\tclippingBox: clippingRectangle\\\\n\\\\t\\\\trule: rule\\\\n\\\\t\\\\tfillColor: mask! !\\\\n\\\\n!Paragraph methodsFor: 'displaying'!\\\\ndisplayOn: aDisplayMedium at: aPoint\\\\n\\\\t\\\\\\\"Use internal clippingRect; destination cliping is done during actual display.\\\\\\\"\\\\n\\\\n\\\\tself displayOn: aDisplayMedium at: aPoint\\\\n\\\\t\\\\tclippingBox: (clippingRectangle translateBy: aPoint - compositionRectangle topLeft)\\\\n\\\\t\\\\trule: rule fillColor: mask! !\\\\n\\\\n!Paragraph methodsFor: 'displaying'!\\\\ndisplayOn: aDisplayMedium at: aDisplayPoint clippingBox: clipRectangle rule: ruleInteger fillColor: aForm\\\\n\\\\t\\\\\\\"Default display message when aDisplayPoint is in absolute screen\\\\n\\\\tcoordinates.\\\\\\\"\\\\n\\\\n\\\\trule _ ruleInteger.\\\\n\\\\tmask _ aForm.\\\\n\\\\tclippingRectangle _ clipRectangle.\\\\n\\\\tcompositionRectangle _ aDisplayPoint extent: compositionRectangle extent.\\\\n\\\\t(lastLine == nil or: [lastLine < 1]) ifTrue: [self composeAll].\\\\n\\\\tself displayOn: aDisplayMedium lines: (1 to: lastLine)! !\\\\n\\\\n!Paragraph methodsFor: 'displaying'!\\\\ndisplayOn: aDisplayMedium transformation: displayTransformation clippingBox: clipRectangle align: alignmentPoint with: relativePoint rule: ruleInteger fillColor: aForm \\\\n\\\\n\\\\tself\\\\t\\\\t\\\\t\\\\t\\\\\\\"Assumes offset has been set!!!!!!!!!!\\\\\\\"\\\\n\\\\t  displayOn: aDisplayMedium\\\\n\\\\t  at: (offset \\\\n\\\\t\\\\t\\\\t+ (displayTransformation applyTo: relativePoint) \\\\n\\\\t\\\\t\\\\t- alignmentPoint) rounded\\\\n\\\\t  clippingBox: clipRectangle\\\\n\\\\t  rule: ruleInteger\\\\n\\\\t  fillColor: aForm.\\\\n\\\\t! !\\\\n\\\\n\\\\n!Paragraph methodsFor: 'indicating'!\\\\nflash \\\\n\\\\t\\\\\\\"Complement twice the visible area in which the receiver displays.\\\\\\\"\\\\n\\\\n\\\\tDisplay flash: clippingRectangle! !\\\\n\\\\n!Paragraph methodsFor: 'indicating'!\\\\noutline \\\\n\\\\t\\\\\\\"Display a border around the visible area in which the receiver presents \\\\n\\\\tits text.\\\\\\\"\\\\n\\\\n\\\\tclippingRectangle bottom <= compositionRectangle bottom\\\\n\\\\t  ifTrue: [Display \\\\n\\\\t\\\\t\\\\t\\\\tborder: (clippingRectangle intersect: compositionRectangle) \\\\n\\\\t\\\\t\\\\t\\\\twidth: 2]\\\\n\\\\t  ifFalse: [Display \\\\n\\\\t\\\\t\\\\t\\\\tborder: (clippingRectangle intersect: destinationForm boundingBox)\\\\n\\\\t\\\\t\\\\t\\\\twidth: 2].\\\\n\\\\t! !\\\\n\\\\n\\\\n!Paragraph methodsFor: 'scrolling'!\\\\nscrollBy: heightToMove \\\\n\\\\t^ self scrollBy: heightToMove withSelectionFrom: nil to: nil! !\\\\n\\\\n!Paragraph methodsFor: 'scrolling' stamp: 'hmm 9/16/2000 21:30'!\\\\nscrollBy: heightToMove withSelectionFrom: startBlock to: stopBlock \\\\n\\\\t\\\\\\\"Translate the composition rectangle up (dy<0) by heightToMove.\\\\n\\\\tRepainting text as necessary, and selection if blocks not nil.\\\\n\\\\tReturn true unless scrolling limits have been reached.\\\\\\\"\\\\n\\\\t| max min amount |\\\\n\\\\tmax _ 0 max: \\\\\\\"cant scroll up more than dist to (top of) bottom line\\\\\\\"\\\\n\\\\t\\\\tcompositionRectangle bottom - textStyle lineGrid - clippingRectangle top.\\\\n\\\\tmin _ 0 min: \\\\\\\"cant scroll down more than top is above clipRect\\\\\\\"\\\\n\\\\t\\\\tcompositionRectangle top - clippingRectangle top.\\\\n\\\\tamount _ ((heightToMove truncateTo: textStyle lineGrid) min: max) max: min.\\\\n\\\\tamount ~= 0\\\\n\\\\t\\\\tifTrue: [destinationForm deferUpdatesIn: clippingRectangle while: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself scrollUncheckedBy: amount\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twithSelectionFrom: startBlock to: stopBlock].\\\\n\\\\t\\\\t\\\\t\\\\t^ true]\\\\n\\\\t\\\\tifFalse: [^ false]! !\\\\n\\\\n!Paragraph methodsFor: 'scrolling'!\\\\nscrollDelta\\\\n\\\\t\\\\\\\"By comparing this before and after, you know if scrolling happened\\\\\\\"\\\\n\\\\t^ clippingRectangle top - compositionRectangle top! !\\\\n\\\\n!Paragraph methodsFor: 'scrolling'!\\\\nscrollUncheckedBy: heightToMove withSelectionFrom: startBlock to: stopBlock \\\\n\\\\t\\\\\\\"Scroll by the given amount.  Copy bits where possible, display the rest.\\\\n\\\\tIf selection blocks are not nil, then select the newly visible text as well.\\\\\\\"\\\\n\\\\t| savedClippingRectangle delta |\\\\n\\\\tdelta _ 0 @ (0 - heightToMove).\\\\n\\\\tcompositionRectangle _ compositionRectangle translateBy: delta.\\\\n\\\\tstartBlock == nil ifFalse:\\\\n\\\\t\\\\t[startBlock moveBy: delta.\\\\n\\\\t\\\\tstopBlock moveBy: delta].\\\\n\\\\tsavedClippingRectangle _ clippingRectangle.\\\\n\\\\tclippingRectangle _ clippingRectangle intersect: Display boundingBox.\\\\n\\\\theightToMove abs >= clippingRectangle height\\\\n\\\\t  ifTrue: \\\\n\\\\t\\\\t[\\\\\\\"Entire visible region must be repainted\\\\\\\"\\\\n\\\\t\\\\tself displayLines: (1 to: lastLine) affectedRectangle: clippingRectangle]\\\\n\\\\t  ifFalse:\\\\n\\\\t\\\\t[\\\\\\\"Copy bits where possible / display the rest\\\\\\\"\\\\n\\\\t\\\\tdestinationForm\\\\n\\\\t\\\\t\\\\tcopyBits: clippingRectangle from: destinationForm\\\\n\\\\t\\\\t\\\\tat: clippingRectangle topLeft + delta\\\\n\\\\t\\\\t\\\\tclippingBox: clippingRectangle\\\\n\\\\t\\\\t\\\\trule: Form over fillColor: nil.\\\\n\\\\t\\\\t\\\\\\\"Set clippingRectangle to 'vacated' area for lines 'pulled' into view.\\\\\\\"\\\\n\\\\t\\\\tclippingRectangle _ heightToMove < 0\\\\n\\\\t\\\\t\\\\tifTrue:  \\\\\\\"On the top\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t[clippingRectangle topLeft corner: clippingRectangle topRight + delta]\\\\n\\\\t\\\\t\\\\tifFalse:  \\\\\\\"At the bottom\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t[clippingRectangle bottomLeft + delta corner: clippingRectangle bottomRight].\\\\n\\\\t\\\\tself displayLines: (1 to: lastLine)   \\\\\\\"Refresh vacated region\\\\\\\"\\\\n\\\\t\\\\t\\\\taffectedRectangle: clippingRectangle].\\\\n\\\\tstartBlock == nil ifFalse:\\\\n\\\\t\\\\t[self reverseFrom: startBlock to: stopBlock].\\\\n\\\\t\\\\\\\"And restore the clippingRectangle to its original value. \\\\\\\"\\\\n\\\\tclippingRectangle _ savedClippingRectangle! !\\\\n\\\\n\\\\n!Paragraph methodsFor: 'selecting' stamp: 'ar 5/28/2000 12:10'!\\\\ncaretFormForDepth: depth\\\\n\\\\t\\\\\\\"Return a caret form for the given depth.\\\\\\\"\\\\n\\\\t\\\\\\\"(Paragraph new caretFormForDepth: Display depth) displayOn: Display at: 0@0 rule: Form reverse\\\\\\\"\\\\n\\\\n\\\\t| box f bb map |\\\\n\\\\tbox _ CaretForm boundingBox.\\\\n\\\\tf _ Form extent: box extent depth: depth.\\\\n\\\\tmap _ (Color cachedColormapFrom: CaretForm depth to: depth) copy.\\\\n\\\\tmap at: 1 put: (Color transparent pixelValueForDepth: depth).\\\\n\\\\tmap at: 2 put: (Color quickHighLight: depth) first.  \\\\\\\"pixel value for reversing\\\\\\\"\\\\n\\\\tbb _ BitBlt current toForm: f.\\\\n\\\\tbb\\\\n\\\\t\\\\tsourceForm: CaretForm;\\\\n\\\\t\\\\tsourceRect: box;\\\\n\\\\t\\\\tdestOrigin: 0@0;\\\\n\\\\t\\\\tcolorMap: map;\\\\n \\\\t\\\\tcombinationRule: Form over;\\\\n\\\\t\\\\tcopyBits.\\\\n\\\\t^ f! !\\\\n\\\\n!Paragraph methodsFor: 'selecting' stamp: 'dvf 10/1/2003 13:28'!\\\\nclickAt: clickPoint for: model controller: aController\\\\n\\\\t\\\\\\\"Give sensitive text a chance to fire.  Display flash: (100@100 extent: 100@100).\\\\\\\"\\\\n\\\\t| startBlock action range box boxes |\\\\n\\\\taction _ false.\\\\n\\\\tstartBlock _ self characterBlockAtPoint: clickPoint.\\\\n\\\\t(text attributesAt: startBlock stringIndex forStyle: textStyle) \\\\n\\\\t\\\\tdo: [:att | att mayActOnClick ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[range _ text rangeOf: att startingAt: startBlock stringIndex.\\\\n\\\\t\\\\t\\\\t\\\\tboxes _ self selectionRectsFrom: (self characterBlockForIndex: range first) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tto: (self characterBlockForIndex: range last+1).\\\\n\\\\t\\\\t\\\\t\\\\tbox _ boxes detect: [:each | each containsPoint: clickPoint]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifNone: [^ action].\\\\n\\\\t\\\\t\\\\t\\\\tUtilities awaitMouseUpIn: box repeating: []\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifSucceed: [aController terminateAndInitializeAround:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[(att actOnClickFor: model in: self at: clickPoint editor: aController) ifTrue: [action _ true]]]]].\\\\n\\\\t^ action! !\\\\n\\\\n!Paragraph methodsFor: 'selecting'!\\\\nextendSelectionAt: beginBlock endBlock: endBlock \\\\n\\\\t\\\\\\\"Answer with an Array of two CharacterBlocks that represent the text \\\\n\\\\tselection that the user makes.\\\\\\\"\\\\n\\\\t\\\\n\\\\t(self characterBlockAtPoint: Sensor cursorPoint) <= beginBlock\\\\n\\\\t\\\\tifTrue: [^self mouseMovedFrom: beginBlock \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpivotBlock: endBlock\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tshowingCaret: (beginBlock = endBlock)]\\\\n\\\\t\\\\tifFalse: [^self mouseMovedFrom: endBlock \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpivotBlock: beginBlock\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tshowingCaret: (beginBlock = endBlock)]\\\\n! !\\\\n\\\\n!Paragraph methodsFor: 'selecting' stamp: 'th 9/19/2002 17:27'!\\\\nextendSelectionMark: markBlock pointBlock: pointBlock \\\\n\\\\t\\\\\\\"Answer with an Array of two CharacterBlocks that represent the text \\\\n\\\\tselection that the user makes.\\\\\\\"\\\\n\\\\ttrue \\\\n\\\\t\\\\tifTrue:[^self mouseMovedFrom: pointBlock\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpivotBlock: markBlock\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tshowingCaret:(pointBlock = markBlock)]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t[\\\\t| beginBlock endBlock |\\\\n\\\\t\\\\t\\\\tbeginBlock _ markBlock min: pointBlock.\\\\n\\\\t\\\\t\\\\tendBlock _ markBlock max: endBlock.\\\\n\\\\t\\\\n\\\\t\\\\t\\\\t(self characterBlockAtPoint: Sensor cursorPoint) <= beginBlock\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [^self mouseMovedFrom: beginBlock \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tpivotBlock: endBlock\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tshowingCaret: (beginBlock = endBlock)]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [^self mouseMovedFrom: endBlock \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tpivotBlock: beginBlock\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tshowingCaret: (beginBlock = endBlock)]\\\\n\\\\t\\\\t]\\\\n! !\\\\n\\\\n!Paragraph methodsFor: 'selecting' stamp: 'jm 7/1/1999 12:31'!\\\\nhiliteRect: rect\\\\n\\\\n\\\\t| highlightColor |\\\\n\\\\thighlightColor _ Color quickHighLight: destinationForm depth.\\\\n\\\\trect ifNotNil: [\\\\n\\\\t\\\\tdestinationForm\\\\n\\\\t\\\\t\\\\tfill: rect\\\\n\\\\t\\\\t\\\\trule: Form reverse\\\\n\\\\t\\\\t\\\\tfillColor: highlightColor.\\\\n\\\\t\\\\t\\\\\\\"destinationForm\\\\n\\\\t\\\\t\\\\tfill: (rect translateBy: 1@1)\\\\n\\\\t\\\\t\\\\trule: Form reverse\\\\n\\\\t\\\\t\\\\tfillColor: highlightColor\\\\\\\" ].\\\\n! !\\\\n\\\\n!Paragraph methodsFor: 'selecting' stamp: 'jm 7/8/97 12:25'!\\\\nmouseMovedFrom: beginBlock pivotBlock: pivotBlock showingCaret: caretOn \\\\n\\\\t| startBlock stopBlock showingCaret |\\\\n\\\\tstopBlock _ startBlock _ beginBlock.\\\\n\\\\tshowingCaret _ caretOn.\\\\n\\\\t[Sensor redButtonPressed]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[stopBlock _ self characterBlockAtPoint: Sensor cursorPoint.\\\\n\\\\t\\\\t\\\\tstopBlock = startBlock\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[showingCaret\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[showingCaret _ false.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself reverseFrom: pivotBlock to: pivotBlock].\\\\n\\\\t\\\\t\\\\t((startBlock >= pivotBlock and: [stopBlock >= pivotBlock])\\\\n\\\\t\\\\t\\\\t\\\\tor: [startBlock <= pivotBlock and: [stopBlock <= pivotBlock]])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self reverseFrom: startBlock to: stopBlock.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstartBlock _ stopBlock]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self reverseFrom: startBlock to: pivotBlock.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself reverseFrom: pivotBlock to: stopBlock.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstartBlock _ stopBlock].\\\\n\\\\t\\\\t\\\\t(clippingRectangle containsRect: stopBlock) ifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[stopBlock top < clippingRectangle top\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self scrollBy: stopBlock top - clippingRectangle top\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twithSelectionFrom: pivotBlock to: stopBlock]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self scrollBy: stopBlock bottom + textStyle lineGrid - clippingRectangle bottom\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twithSelectionFrom: pivotBlock to: stopBlock]]]].\\\\n\\\\tpivotBlock = stopBlock ifTrue:\\\\n\\\\t\\\\t[showingCaret ifFalse:  \\\\\\\"restore caret\\\\\\\"\\\\n\\\\t\\\\t\\\\t[self reverseFrom: pivotBlock to: pivotBlock]].\\\\n\\\\t^ Array with: pivotBlock with: stopBlock! !\\\\n\\\\n!Paragraph methodsFor: 'selecting'!\\\\nmouseSelect\\\\n\\\\t\\\\\\\"Answer with an Array of two CharacterBlocks that represent the text \\\\n\\\\tselection that the user makes.  Return quickly if the button is noticed up\\\\n\\\\tto make double-click more responsive.\\\\\\\"\\\\n\\\\n\\\\t| pivotBlock startBlock stopBlock origPoint stillDown |\\\\n\\\\tstillDown _ Sensor redButtonPressed.\\\\n\\\\tpivotBlock _ startBlock _ stopBlock _\\\\n\\\\t\\\\tself characterBlockAtPoint: (origPoint _ Sensor cursorPoint).\\\\n\\\\tstillDown _ stillDown and: [Sensor redButtonPressed].\\\\n\\\\tself reverseFrom: startBlock to: startBlock.\\\\n\\\\t[stillDown and: [Sensor cursorPoint = origPoint]] whileTrue:\\\\n\\\\t\\\\t[stillDown _ Sensor redButtonPressed].\\\\n\\\\t(stillDown and: [clippingRectangle containsPoint: Sensor cursorPoint])\\\\n\\\\t\\\\tifFalse: [^Array with: pivotBlock with: stopBlock].\\\\n\\\\t^ self mouseMovedFrom: startBlock \\\\n\\\\t\\\\tpivotBlock: pivotBlock\\\\n\\\\t\\\\tshowingCaret: true! !\\\\n\\\\n!Paragraph methodsFor: 'selecting'!\\\\nmouseSelect: clickPoint \\\\n\\\\t\\\\\\\"Track text selection and answer with an Array of two CharacterBlocks.\\\\\\\"\\\\n\\\\t| startBlock |\\\\n\\\\tstartBlock _ self characterBlockAtPoint: clickPoint.\\\\n\\\\tself reverseFrom: startBlock to: startBlock.\\\\n\\\\t^ self mouseMovedFrom: startBlock \\\\n\\\\t\\\\tpivotBlock: startBlock\\\\n\\\\t\\\\tshowingCaret: true! !\\\\n\\\\n!Paragraph methodsFor: 'selecting'!\\\\nreverseFrom: characterBlock1 to: characterBlock2 \\\\n\\\\t\\\\\\\"Reverse area between the two character blocks given as arguments.\\\\\\\"\\\\n\\\\t| visibleRectangle initialRectangle interiorRectangle finalRectangle lineNo baseline caret |\\\\n\\\\tcharacterBlock1 = characterBlock2 ifTrue:\\\\n\\\\t\\\\t[lineNo _ self lineIndexOfCharacterIndex: characterBlock1 stringIndex.\\\\n\\\\t\\\\tbaseline _ lineNo = 0 ifTrue: [textStyle baseline]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [(lines at: lineNo) baseline].\\\\n\\\\t\\\\tcaret _ self caretFormForDepth: Display depth.\\\\n\\\\t\\\\t^ caret  \\\\\\\"Use a caret to indicate null selection\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tdisplayOn: destinationForm\\\\n\\\\t\\\\t\\\\t\\\\tat: characterBlock1 topLeft + (-3 @ baseline)\\\\n\\\\t\\\\t\\\\t\\\\tclippingBox: clippingRectangle\\\\n\\\\t\\\\t\\\\t\\\\trule: (false \\\\\\\"Display depth>8\\\\\\\" ifTrue: [9 \\\\\\\"not-reverse\\\\\\\"]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [Form reverse])\\\\n\\\\t\\\\t\\\\t\\\\tfillColor: nil].\\\\n\\\\tvisibleRectangle _ \\\\n\\\\t\\\\t(clippingRectangle intersect: compositionRectangle)\\\\n\\\\t\\\\t\\\\t\\\\\\\"intersect: destinationForm boundingBox\\\\\\\" \\\\\\\"not necessary\\\\\\\".\\\\n\\\\tcharacterBlock1 top = characterBlock2 top\\\\n\\\\t\\\\tifTrue: [characterBlock1 left < characterBlock2 left\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[initialRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(characterBlock1 topLeft corner: characterBlock2 bottomLeft)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[initialRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(characterBlock2 topLeft corner: characterBlock1 bottomLeft)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle]]\\\\n\\\\t\\\\tifFalse: [characterBlock1 top < characterBlock2 top\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[initialRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(characterBlock1 topLeft \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: visibleRectangle right @ characterBlock1 bottom)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcharacterBlock1 bottom = characterBlock2 top\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[finalRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(visibleRectangle left @ characterBlock2 top \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: characterBlock2 bottomLeft)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[interiorRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(visibleRectangle left @ characterBlock1 bottom\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: visibleRectangle right \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t@ characterBlock2 top)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfinalRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(visibleRectangle left @ characterBlock2 top \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: characterBlock2 bottomLeft)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[initialRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(visibleRectangle left @ characterBlock1 top \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: characterBlock1 bottomLeft)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcharacterBlock1 top = characterBlock2 bottom\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[finalRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(characterBlock2 topLeft \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: visibleRectangle right \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t@ characterBlock2 bottom)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[interiorRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(visibleRectangle left @ characterBlock2 bottom \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: visibleRectangle right @ characterBlock1 top)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfinalRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(characterBlock2 topLeft \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: visibleRectangle right \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t@ characterBlock2 bottom)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle]]].\\\\n\\\\tself hiliteRect: initialRectangle.\\\\n\\\\tself hiliteRect: interiorRectangle.\\\\n\\\\tself hiliteRect: finalRectangle.! !\\\\n\\\\n!Paragraph methodsFor: 'selecting' stamp: 'di 12/1/97 04:43'!\\\\nselectionRectsFrom: characterBlock1 to: characterBlock2 \\\\n\\\\t\\\\\\\"Return an array of rectangles representing the area between the two character blocks given as arguments.\\\\\\\"\\\\n\\\\t| visibleRectangle initialRectangle interiorRectangle finalRectangle lineNo baseline |\\\\n\\\\tcharacterBlock1 = characterBlock2 ifTrue:\\\\n\\\\t\\\\t[lineNo _ self lineIndexOfCharacterIndex: characterBlock1 stringIndex.\\\\n\\\\t\\\\tbaseline _ lineNo = 0 ifTrue: [textStyle baseline]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [(lines at: lineNo) baseline].\\\\n\\\\t\\\\t^ Array with: (characterBlock1 topLeft extent: 1 @ baseline)].\\\\n\\\\tvisibleRectangle _ clippingRectangle intersect: compositionRectangle.\\\\n\\\\tcharacterBlock1 top = characterBlock2 top\\\\n\\\\t\\\\tifTrue: [characterBlock1 left < characterBlock2 left\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[initialRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(characterBlock1 topLeft corner: characterBlock2 bottomLeft)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[initialRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(characterBlock2 topLeft corner: characterBlock1 bottomLeft)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle]]\\\\n\\\\t\\\\tifFalse: [characterBlock1 top < characterBlock2 top\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[initialRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(characterBlock1 topLeft \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: visibleRectangle right @ characterBlock1 bottom)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcharacterBlock1 bottom = characterBlock2 top\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[finalRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(visibleRectangle left @ characterBlock2 top \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: characterBlock2 bottomLeft)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[interiorRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(visibleRectangle left @ characterBlock1 bottom\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: visibleRectangle right \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t@ characterBlock2 top)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfinalRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(visibleRectangle left @ characterBlock2 top \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: characterBlock2 bottomLeft)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[initialRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(visibleRectangle left @ characterBlock1 top \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: characterBlock1 bottomLeft)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcharacterBlock1 top = characterBlock2 bottom\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[finalRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(characterBlock2 topLeft \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: visibleRectangle right \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t@ characterBlock2 bottom)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[interiorRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(visibleRectangle left @ characterBlock2 bottom \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: visibleRectangle right @ characterBlock1 top)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfinalRectangle _ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(characterBlock2 topLeft \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcorner: visibleRectangle right \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t@ characterBlock2 bottom)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: visibleRectangle]]].\\\\n\\\\t^ (Array with: initialRectangle with: interiorRectangle with: finalRectangle)\\\\n\\\\t\\\\t\\\\tselect: [:rect | rect notNil]! !\\\\n\\\\n\\\\n!Paragraph methodsFor: 'utilities'!\\\\nclearVisibleRectangle \\\\n\\\\t\\\\\\\"Display the area in which the receiver presents its text so that the area \\\\n\\\\tis all one tone--in this case, all white.\\\\\\\"\\\\n\\\\n\\\\tdestinationForm\\\\n\\\\t  fill: clippingRectangle\\\\n\\\\t  rule: rule\\\\n\\\\t  fillColor: self backgroundColor! !\\\\n\\\\n!Paragraph methodsFor: 'utilities'!\\\\ndeepCopy\\\\n\\\\t\\\\\\\"Don't want to copy the destForm (Display) or fonts in the TextStyle.  9/13/96 tk\\\\\\\"\\\\n\\\\n\\\\t| new |\\\\n\\\\tnew _ self copy.\\\\n\\\\tnew textStyle: textStyle copy.\\\\n\\\\tnew destinationForm: destinationForm.\\\\n\\\\tnew lines: lines copy.\\\\n\\\\tnew text: text deepCopy.\\\\n\\\\t^ new! !\\\\n\\\\n!Paragraph methodsFor: 'utilities'!\\\\ndestinationForm: destForm\\\\n\\\\tdestinationForm _ destForm! !\\\\n\\\\n!Paragraph methodsFor: 'utilities'!\\\\nfit\\\\n\\\\t\\\\\\\"Make the bounding rectangle of the receiver contain all the text without \\\\n\\\\tchanging the width of the receiver's composition rectangle.\\\\\\\"\\\\n\\\\n\\\\t[(self lineIndexOfTop: clippingRectangle top) = 1]\\\\n\\\\t\\\\twhileFalse: [self scrollBy: (0-1)*textStyle lineGrid].\\\\n\\\\tself updateCompositionHeight.\\\\n\\\\tclippingRectangle _ clippingRectangle withBottom: compositionRectangle bottom! !\\\\n\\\\n!Paragraph methodsFor: 'utilities'!\\\\nlines: lineArray\\\\n\\\\tlines _ lineArray! !\\\\n\\\\n!Paragraph methodsFor: 'utilities'!\\\\nvisibleRectangle \\\\n\\\\t\\\\\\\"May be less than the clippingRectangle if text ends part way down.\\\\n\\\\tAlso some fearful history includes Display intersection;\\\\n\\\\tit shouldn't be necessary\\\\\\\"\\\\n\\\\n\\\\t^ (clippingRectangle intersect: compositionRectangle)\\\\n\\\\t\\\\tintersect: destinationForm boundingBox! !\\\\n\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\nbottomAtLineIndex: lineIndex \\\\n\\\\t\\\\\\\"Answer the bottom y of given line.\\\\\\\"\\\\n\\\\t| y |\\\\n\\\\ty _ compositionRectangle top.\\\\n\\\\tlastLine = 0 ifTrue: [^ y + textStyle lineGrid].\\\\n\\\\t1 to: (lineIndex min: lastLine) do:\\\\n\\\\t\\\\t[:i | y _ y + (lines at: i) lineHeight].\\\\n\\\\t^ y\\\\n! !\\\\n\\\\n!Paragraph methodsFor: 'private' stamp: 'tk 9/30/96'!\\\\ncompositionRectangle: compositionRect text: aText style: aTextStyle offset: aPoint\\\\n\\\\n\\\\tcompositionRectangle _ compositionRect copy.\\\\n\\\\ttext _ aText.\\\\n\\\\ttextStyle _ aTextStyle.\\\\n\\\\trule _ DefaultRule.\\\\n\\\\tmask _ nil.\\\\t\\\\t\\\\\\\"was DefaultMask \\\\\\\"\\\\n\\\\tmarginTabsLevel _ 0.\\\\n\\\\tdestinationForm _ Display.\\\\n\\\\toffset _ aPoint.\\\\n\\\\t^self composeAll! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\ncompositionRectangleDelta\\\\n\\\\t\\\\\\\"A handy number -- mostly for scrolling.\\\\\\\"\\\\n\\\\n\\\\t^compositionRectangle top - clippingRectangle top! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\ndisplayLines: linesInterval \\\\n\\\\t^ self displayLines: linesInterval\\\\n\\\\t\\\\taffectedRectangle: self visibleRectangle! !\\\\n\\\\n!Paragraph methodsFor: 'private' stamp: 'yo 1/23/2003 22:48'!\\\\ndisplayLines: linesInterval affectedRectangle: affectedRectangle\\\\n\\\\t\\\\\\\"This is the first level workhorse in the display portion of the TextForm routines.\\\\n\\\\tIt checks to see which lines in the interval are actually visible, has the\\\\n\\\\tCharacterScanner display only those, clears out the areas in which display will\\\\n\\\\toccur, and clears any space remaining in the visibleRectangle following the space\\\\n\\\\toccupied by lastLine.\\\\\\\"\\\\n\\\\n\\\\t| lineGrid topY firstLineIndex lastLineIndex lastLineIndexBottom |\\\\n\\\\n\\\\t\\\\\\\"Save some time by only displaying visible lines\\\\\\\"\\\\n\\\\tfirstLineIndex _ self lineIndexOfTop: affectedRectangle top.\\\\n\\\\tfirstLineIndex < linesInterval first ifTrue: [firstLineIndex _ linesInterval first].\\\\n\\\\tlastLineIndex _ self lineIndexOfTop: affectedRectangle bottom - 1.\\\\n\\\\tlastLineIndex > linesInterval last ifTrue:\\\\n\\\\t\\\\t\\\\t[linesInterval last > lastLine\\\\n\\\\t\\\\t \\\\t\\\\tifTrue: [lastLineIndex _ lastLine]\\\\n\\\\t\\\\t  \\\\t\\\\tifFalse: [lastLineIndex _ linesInterval last]].\\\\n\\\\tlastLineIndexBottom _ (self bottomAtLineIndex: lastLineIndex).\\\\n\\\\t((Rectangle \\\\n\\\\t\\\\torigin: affectedRectangle left @ (topY _ self topAtLineIndex: firstLineIndex) \\\\n\\\\t\\\\tcorner: affectedRectangle right @ lastLineIndexBottom)\\\\n\\\\t  intersects: affectedRectangle)\\\\n\\\\t\\\\tifTrue: [ \\\\\\\" . . . (skip to clear-below if no lines displayed)\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tMultiDisplayScanner new\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdisplayLines: (firstLineIndex to: lastLineIndex)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tin: self clippedBy: affectedRectangle].\\\\n\\\\tlastLineIndex = lastLine ifTrue: \\\\n\\\\t\\\\t [destinationForm  \\\\\\\"Clear out white space below last line\\\\\\\"\\\\n\\\\t\\\\t \\\\tfill: (affectedRectangle left @ (lastLineIndexBottom max: affectedRectangle top)\\\\n\\\\t\\\\t\\\\t\\\\tcorner: affectedRectangle bottomRight)\\\\n\\\\t\\\\t \\\\trule: rule fillColor: self backgroundColor]! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\ndisplayOn: aDisplayMedium lines: lineInterval\\\\n\\\\n\\\\t| saveDestinationForm |\\\\n\\\\tsaveDestinationForm _ destinationForm.\\\\n\\\\tdestinationForm _ aDisplayMedium.\\\\n\\\\tself displayLines: lineInterval.\\\\n\\\\tdestinationForm _ saveDestinationForm! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\nleftMarginForCompositionForLine: lineIndex \\\\n\\\\t\\\\\\\"Build the left margin for composition of a line. Depends upon\\\\n\\\\tmarginTabsLevel and the indent.\\\\\\\"\\\\n\\\\n\\\\t| indent |\\\\n\\\\tlineIndex = 1\\\\n\\\\t\\\\tifTrue: [indent _ textStyle firstIndent]\\\\n\\\\t\\\\tifFalse: [indent _ textStyle restIndent].\\\\n\\\\t^indent + (textStyle leftMarginTabAt: marginTabsLevel)! !\\\\n\\\\n!Paragraph methodsFor: 'private' stamp: 'ar 12/15/2001 23:29'!\\\\nleftMarginForDisplayForLine: lineIndex alignment: alignment\\\\n\\\\t\\\\\\\"Build the left margin for display of a line. Depends upon\\\\n\\\\tleftMarginForComposition, compositionRectangle left and the alignment.\\\\\\\"\\\\n\\\\n\\\\t| pad |\\\\n\\\\t(alignment = LeftFlush or: [alignment = Justified])\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[^compositionRectangle left \\\\n\\\\t\\\\t\\\\t\\\\t+ (self leftMarginForCompositionForLine: lineIndex)].\\\\n\\\\t\\\\\\\"When called from character location code and entire string has been cut,\\\\n\\\\tthere are no valid lines, hence following nil check.\\\\\\\"\\\\n\\\\t(lineIndex <= lines size and: [(lines at: lineIndex) notNil])\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[pad _ (lines at: lineIndex) paddingWidth]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[pad _ \\\\n\\\\t\\\\t\\\\t\\\\tcompositionRectangle width - textStyle firstIndent - textStyle rightIndent].\\\\n\\\\talignment = Centered \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[^compositionRectangle left \\\\n\\\\t\\\\t\\\\t\\\\t+ (self leftMarginForCompositionForLine: lineIndex) + (pad // 2)].\\\\n\\\\talignment = RightFlush \\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[^compositionRectangle left \\\\n\\\\t\\\\t\\\\t\\\\t+ (self leftMarginForCompositionForLine: lineIndex) + pad].\\\\n\\\\tself error: ['no such alignment']! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\nlineAt: indexInteger put: aTextLineInterval \\\\n\\\\t\\\\\\\"Store a line, track last, and grow lines if necessary.\\\\\\\"\\\\n\\\\tindexInteger > lastLine ifTrue: [lastLine _ indexInteger].\\\\n\\\\tlastLine > lines size ifTrue: [lines _ lines , (Array new: lines size)].\\\\n\\\\t^lines at: indexInteger put: aTextLineInterval! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\nlineIndexOfCharacterIndex: characterIndex \\\\n\\\\t\\\\\\\"Answer the line index for a given characterIndex.\\\\\\\"\\\\n\\\\n\\\\t1 to: lastLine do: \\\\n\\\\t\\\\t[:lineIndex | \\\\n\\\\t\\\\t(lines at: lineIndex) last >= characterIndex ifTrue: [^lineIndex]].\\\\n\\\\t^lastLine! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\nlineIndexOfTop: top \\\\n\\\\t\\\\\\\"Answer the line index at a given top y.\\\\\\\"\\\\n\\\\t| y line |\\\\n\\\\tlastLine = 0 ifTrue: [^ 1].\\\\n\\\\ty _ compositionRectangle top.\\\\n\\\\t1 to: lastLine do:\\\\n\\\\t\\\\t[:i | line _ lines at: i.\\\\n\\\\t\\\\t(y _ y + line lineHeight) > top ifTrue: [^ i]].\\\\n\\\\t^ lastLine\\\\n! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\nlines\\\\n\\\\n\\\\t^lines! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\nmoveBy: delta\\\\n\\\\tcompositionRectangle _ compositionRectangle translateBy: delta.\\\\n\\\\tclippingRectangle _ clippingRectangle translateBy: delta.\\\\n! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\nrightMarginForComposition\\\\n\\\\t\\\\\\\"Build the right margin for a line. Depends upon compositionRectangle\\\\n\\\\twidth, marginTabsLevel, and right indent.\\\\\\\"\\\\n\\\\n\\\\t^compositionRectangle width \\\\n\\\\t\\\\t- (textStyle rightMarginTabAt: marginTabsLevel) \\\\n\\\\t\\\\t- textStyle rightIndent! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\nrightMarginForDisplay \\\\n\\\\t\\\\\\\"Build the right margin for a line. Depends upon compositionRectangle\\\\n\\\\trightSide, marginTabsLevel, and right indent.\\\\\\\"\\\\n\\\\n\\\\t^compositionRectangle right - \\\\n\\\\t\\\\ttextStyle rightIndent - (textStyle rightMarginTabAt: marginTabsLevel)! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\nsetWithText: aText style: aTextStyle \\\\n\\\\t\\\\\\\"Set text and adjust bounding rectangles to fit.\\\\\\\"\\\\n\\\\n\\\\t| shrink compositionWidth unbounded |\\\\n\\\\tunbounded _ Rectangle origin: 0 @ 0 extent: 9999@9999.\\\\n\\\\tcompositionWidth _ self\\\\n\\\\t\\\\tsetWithText: aText style: aTextStyle compositionRectangle: unbounded clippingRectangle: unbounded.\\\\n\\\\tcompositionRectangle _ compositionRectangle withWidth: compositionWidth.\\\\n\\\\tclippingRectangle _ compositionRectangle copy.\\\\n\\\\tshrink _ unbounded width - compositionWidth.\\\\n\\\\t\\\\\\\"Shrink padding widths accordingly\\\\\\\"\\\\n\\\\t1 to: lastLine do:\\\\n\\\\t\\\\t[:i | (lines at: i) paddingWidth: (lines at: i) paddingWidth - shrink]! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\nsetWithText: aText style: aTextStyle compositionRectangle: compRect clippingRectangle: clipRect \\\\n\\\\t\\\\\\\"Set text and using supplied parameters. Answer max composition width.\\\\\\\"\\\\n\\\\n\\\\tclippingRectangle _ clipRect copy.\\\\n\\\\t^self\\\\n\\\\t\\\\tcompositionRectangle: compRect\\\\n\\\\t\\\\ttext: aText\\\\n\\\\t\\\\tstyle: aTextStyle\\\\n\\\\t\\\\toffset: 0 @ 0! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\nsetWithText: aText style: aTextStyle compositionRectangle: compRect clippingRectangle: clipRect foreColor: cf backColor: cb\\\\n\\\\t\\\\\\\"Set text and using supplied parameters. Answer max composition width.\\\\\\\"\\\\n\\\\n\\\\tclippingRectangle _ clipRect copy.\\\\n\\\\tself foregroundColor: cf backgroundColor: cb.\\\\n\\\\t^ self\\\\n\\\\t\\\\tcompositionRectangle: compRect\\\\n\\\\t\\\\ttext: aText\\\\n\\\\t\\\\tstyle: aTextStyle\\\\n\\\\t\\\\toffset: 0 @ 0! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\ntopAtLineIndex: lineIndex \\\\n\\\\t\\\\\\\"Answer the top y of given line.\\\\\\\"\\\\n\\\\t| y |\\\\n\\\\ty _ compositionRectangle top.\\\\n\\\\tlastLine = 0 ifTrue: [lineIndex > 0 ifTrue: [^ y + textStyle lineGrid]. ^ y].\\\\n\\\\t1 to: (lineIndex-1 min: lastLine) do:\\\\n\\\\t\\\\t[:i | y _ y + (lines at: i) lineHeight].\\\\n\\\\t^ y\\\\n! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\ntopAtLineIndex: lineIndex using: otherLines and: otherLastLine\\\\n\\\\t\\\\\\\"Answer the top y of given line.\\\\\\\"\\\\n\\\\t| y |\\\\n\\\\ty _ compositionRectangle top.\\\\n\\\\totherLastLine = 0 ifTrue: [^ y].\\\\n\\\\t1 to: (lineIndex-1 min: otherLastLine) do:\\\\n\\\\t\\\\t[:i | y _ y + (otherLines at: i) lineHeight].\\\\n\\\\t^ y\\\\n! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\ntrimLinesTo: lastLineInteger\\\\n\\\\n\\\\t(lastLineInteger + 1 to: lastLine) do: [:i | lines at: i put: nil].\\\\n\\\\t(lastLine _ lastLineInteger) < (lines size // 2) \\\\n\\\\t\\\\tifTrue: [lines _ lines copyFrom: 1 to: lines size - (lines size // 2)]! !\\\\n\\\\n!Paragraph methodsFor: 'private'!\\\\nupdateCompositionHeight\\\\n\\\\t\\\\\\\"Mainly used to insure that intersections with compositionRectangle work.\\\\\\\" \\\\n\\\\n\\\\tcompositionRectangle _ compositionRectangle withHeight:\\\\n\\\\t\\\\t(self bottomAtLineIndex: lastLine) - compositionRectangle top.\\\\n\\\\t(text size ~= 0 and: [(text at: text size) = CR])\\\\n\\\\t\\\\tifTrue: [compositionRectangle _ compositionRectangle withHeight:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcompositionRectangle height + (lines at: lastLine) lineHeight]! !\\\\n\\\\n!Paragraph methodsFor: 'private' stamp: 'di 8/30/97 11:14'!\\\\nwithClippingRectangle: clipRect do: aBlock\\\\n\\\\t| saveClip |\\\\n\\\\tsaveClip _ clippingRectangle.\\\\n\\\\tclippingRectangle _ clipRect.\\\\n\\\\t\\\\taBlock value.\\\\n\\\\tclippingRectangle _ saveClip! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nParagraph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!Paragraph class methodsFor: 'examples' stamp: 'tk 9/30/96'!\\\\nexample\\\\n\\\\t\\\\\\\"This simple example illustrates how to display a few lines of text on the screen at the current cursor point.  \\\\n\\\\tFixed. \\\\\\\"\\\\n\\\\n\\\\t| para point |\\\\n\\\\tpoint _ Sensor waitButton.\\\\n\\\\tpara _ 'This is the first line of characters\\\\nand this is the second line.' asParagraph.\\\\n\\\\tpara displayOn: Display at: point.\\\\n\\\\n\\\\t\\\\\\\"Paragraph example\\\\\\\"! !\\\\n\\\\n\\\\n!Paragraph class methodsFor: 'instance creation'!\\\\nnew\\\\n\\\\t\\\\\\\"Do not allow an uninitialized view. Create with text that has no\\\\n\\\\tcharacters.\\\\\\\"\\\\n\\\\n\\\\t^self withText: '' asText! !\\\\n\\\\n!Paragraph class methodsFor: 'instance creation'!\\\\nwithText: aText \\\\n\\\\t\\\\\\\"Answer an instance of me with text set to aText and style set to the \\\\n\\\\tsystem's default text style.\\\\\\\"\\\\n\\\\n\\\\t^self withText: aText style: DefaultTextStyle copy! !\\\\n\\\\n!Paragraph class methodsFor: 'instance creation'!\\\\nwithText: aText style: aTextStyle \\\\n\\\\t\\\\\\\"Answer an instance of me with text set to aText and style set to \\\\n\\\\taTextStyle.\\\\\\\"\\\\n\\\\n\\\\t^super new setWithText: aText style: aTextStyle! !\\\\n\\\\n!Paragraph class methodsFor: 'instance creation'!\\\\nwithText: aText style: aTextStyle compositionRectangle: compRect clippingRectangle: clipRect foreColor: c1 backColor: c2\\\\n\\\\t\\\\\\\"Answer an instance of me with text set to aText and style set to \\\\n\\\\taTextStyle, composition rectangle is compRect and the clipping rectangle \\\\n\\\\tis clipRect.\\\\\\\"\\\\n\\\\t| para |\\\\n\\\\tpara _ super new.\\\\n\\\\tpara setWithText: aText\\\\n\\\\t\\\\tstyle: aTextStyle\\\\n\\\\t\\\\tcompositionRectangle: compRect\\\\n\\\\t\\\\tclippingRectangle: clipRect\\\\n\\\\t\\\\tforeColor: c1 backColor: c2.\\\\n\\\\t^para! !\\\\nScrollController subclass: #ParagraphEditor\\\\n\\\\tinstanceVariableNames: 'paragraph startBlock stopBlock beginTypeInBlock emphasisHere initialText selectionShowing otherInterval lastParentLocation'\\\\n\\\\tclassVariableNames: 'ChangeText CmdActions FindText Keyboard ShiftCmdActions UndoInterval UndoMessage UndoParagraph UndoSelection Undone'\\\\n\\\\tpoolDictionaries: 'TextConstants'\\\\n\\\\tcategory: 'Kernel-ST80 Remnants'!\\\\n!ParagraphEditor commentStamp: '<historical>' prior: 0!\\\\nI am a Controller for editing a Paragraph. I am a kind of ScrollController, so that more text can be created for the Paragraph than can be viewed on the screen. Editing messages are sent by issuing commands from a yellow button menu or from keys on the keyboard. My instances keep control as long as the cursor is within the view when the red or yellow mouse button is pressed; they give up control if the blue button is pressed.!\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing' stamp: 'tk 4/21/1998 09:55'!\\\\ninitialText\\\\n\\\\t^ initialText! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing'!\\\\nreplace: oldInterval with: newText and: selectingBlock \\\\n\\\\t\\\\\\\"Replace the text in oldInterval with newText and execute selectingBlock to establish the new selection.  Create an undoAndReselect:redoAndReselect: undoer to allow perfect undoing.\\\\\\\"\\\\n\\\\n\\\\t| undoInterval |\\\\n\\\\tundoInterval _ self selectionInterval.\\\\n\\\\tundoInterval = oldInterval ifFalse: [self selectInterval: oldInterval].\\\\n\\\\tUndoSelection _ self selection.\\\\n\\\\tself zapSelectionWith: newText.\\\\n\\\\tselectingBlock value.\\\\n\\\\totherInterval _ self selectionInterval.\\\\n\\\\tself undoer: #undoAndReselect:redoAndReselect: with: undoInterval with: otherInterval! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing'!\\\\nreplaceSelectionWith: aText\\\\n\\\\t\\\\\\\"Remember the selection text in UndoSelection.\\\\n\\\\t Deselect, and replace the selection text by aText.\\\\n\\\\t Remember the resulting selectionInterval in UndoInterval and PriorInterval.\\\\n\\\\t Set up undo to use UndoReplace.\\\\\\\"\\\\n\\\\n\\\\tbeginTypeInBlock ~~ nil ifTrue: [^self zapSelectionWith: aText]. \\\\\\\"called from old code\\\\\\\"\\\\n\\\\tUndoSelection _ self selection.\\\\n\\\\tself zapSelectionWith: aText.\\\\n\\\\tself undoer: #undoReplace! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing'!\\\\nsetSearch: aString\\\\n\\\\t\\\\\\\"Set the FindText and ChangeText to seek aString; except if already seeking aString, leave ChangeText alone so again will repeat last replacement.\\\\\\\"\\\\n\\\\n\\\\tFindText string = aString\\\\n\\\\t\\\\tifFalse: [FindText _ ChangeText _ aString asText]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing'!\\\\ntext\\\\n\\\\t\\\\\\\"Answer the text of the paragraph being edited.\\\\\\\"\\\\n\\\\n\\\\t^paragraph text! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing' stamp: 'jm 3/18/98 20:38'!\\\\nuserHasEdited\\\\n\\\\t\\\\\\\"Note that the user has edited my text. Here it is just a noop so that the Character Recognizer won't fail when used with a vanilla ParagrahEditor.\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/19/2002 18:22'!\\\\nhasCaret\\\\n\\\\t^self markBlock = self pointBlock! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/19/2002 18:22'!\\\\nhasSelection\\\\n\\\\t^self hasCaret not! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/17/2002 16:13'!\\\\nmark\\\\n\\\\t^ self markBlock stringIndex! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 10/21/2003 15:49'!\\\\nmarkBlock\\\\n\\\\t^ stopBlock! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 10/21/2003 15:49'!\\\\nmarkBlock: aCharacterBlock\\\\n\\\\tstopBlock _ aCharacterBlock.\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/18/2002 12:31'!\\\\nmarkIndex\\\\n\\\\t^ self markBlock stringIndex! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 10/21/2003 15:49'!\\\\npointBlock\\\\n\\\\t^ startBlock! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 10/21/2003 15:49'!\\\\npointBlock: aCharacterBlock\\\\n\\\\tstartBlock _ aCharacterBlock.\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/18/2002 12:31'!\\\\npointIndex\\\\n\\\\t^ self pointBlock stringIndex! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'yo 7/31/2004 16:27'!\\\\nselection\\\\n\\\\t\\\\\\\"Answer the text in the paragraph that is currently selected.\\\\\\\"\\\\n\\\\n\\\\t| t |\\\\n\\\\tt _ paragraph text copyFrom: self startIndex to: self stopIndex - 1.\\\\n\\\\tt string isOctetString ifTrue: [t asOctetStringText].\\\\n\\\\t^ t.\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/19/2002 18:10'!\\\\nselectionAsStream\\\\n\\\\t\\\\\\\"Answer a ReadStream on the text in the paragraph that is currently \\\\n\\\\tselected.\\\\\\\"\\\\n\\\\n\\\\t^ReadWriteStream\\\\n\\\\t\\\\ton: paragraph string\\\\n\\\\t\\\\tfrom: self startIndex\\\\n\\\\t\\\\tto: self stopIndex - 1! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/18/2002 16:18'!\\\\nselectionInterval\\\\n\\\\t\\\\\\\"Answer the interval that is currently selected.\\\\\\\"\\\\n\\\\n\\\\t^self startIndex to: self stopIndex - 1 ! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/17/2002 13:02'!\\\\nsetMark: anIndex\\\\n\\\\tself markBlock: (paragraph characterBlockForIndex: anIndex)\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/17/2002 13:02'!\\\\nsetPoint: anIndex\\\\n\\\\tself pointBlock: (paragraph characterBlockForIndex: anIndex)\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/17/2002 16:10'!\\\\nstartBlock\\\\n\\\\t^ self pointBlock min: self markBlock! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/17/2002 13:10'!\\\\nstartBlock: aCharacterBlock\\\\n\\\\tself markBlock: aCharacterBlock! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/18/2002 14:27'!\\\\nstartIndex\\\\n\\\\t^ self startBlock stringIndex! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/17/2002 16:14'!\\\\nstopBlock\\\\n\\\\t^ self pointBlock max: self markBlock! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/17/2002 13:10'!\\\\nstopBlock: aCharacterBlock\\\\n\\\\tself pointBlock: aCharacterBlock! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/18/2002 14:27'!\\\\nstopIndex\\\\n\\\\t^ self stopBlock stringIndex! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/17/2002 16:23'!\\\\nunselect\\\\n\\\\tself markBlock: self pointBlock copy.! !\\\\n\\\\n!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/19/2002 18:12'!\\\\nzapSelectionWith: aText\\\\n\\\\t\\\\\\\"Deselect, and replace the selection text by aText.\\\\n\\\\t Remember the resulting selectionInterval in UndoInterval and otherInterval.\\\\n\\\\t Do not set up for undo.\\\\\\\"\\\\n\\\\n\\\\t| start stop |\\\\n\\\\tself deselect.\\\\n\\\\tstart _ self startIndex.\\\\n\\\\tstop _ self stopIndex.\\\\n\\\\t(aText isEmpty and: [stop > start]) ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"If deleting, then set emphasisHere from 1st character of the deletion\\\\\\\"\\\\n\\\\t\\\\temphasisHere _ (paragraph text attributesAt: start forStyle: paragraph textStyle)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tselect: [:att | att mayBeExtended]].\\\\n\\\\t(start = stop and: [aText size = 0]) ifFalse:\\\\n\\\\t\\\\t[paragraph\\\\n\\\\t\\\\t\\\\treplaceFrom: start\\\\n\\\\t\\\\t\\\\tto: stop - 1\\\\n\\\\t\\\\t\\\\twith: aText\\\\n\\\\t\\\\t\\\\tdisplaying: true.\\\\n\\\\t\\\\tself computeIntervalFrom: start to: start + aText size - 1.\\\\n\\\\t\\\\tUndoInterval _ otherInterval _ self selectionInterval]! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'as yet unclassified' stamp: 'dvf 7/28/2003 14:54'!\\\\nactivateTextActions\\\\n\\\\t(paragraph text attributesAt: startBlock stringIndex) \\\\n\\\\t\\\\tdo: [:att | att actOnClickFor: model in: paragraph]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'as yet unclassified' stamp: 'BG 6/1/2003 09:43'!\\\\nofferMenuFromEsc: aStream\\\\n   sensor keyboard. \\\\\\\" consume the character \\\\\\\"\\\\n   self yellowButtonActivity.\\\\n  ^true \\\\\\\"tell the caller that the character was processed \\\\\\\"! !\\\\n\\\\n!ParagraphEditor methodsFor: 'as yet unclassified' stamp: 'sbw 10/13/1999 22:40'!\\\\ntotalTextHeight\\\\n\\\\n\\\\t^paragraph boundingBox height! !\\\\n\\\\n!ParagraphEditor methodsFor: 'as yet unclassified' stamp: 'sbw 10/13/1999 22:33'!\\\\nvisibleHeight\\\\n\\\\n\\\\t^paragraph clippingRectangle height! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'controlling'!\\\\ncontrolInitialize\\\\n\\\\n\\\\tsuper controlInitialize.\\\\n\\\\tself recomputeInterval.\\\\n\\\\tself initializeSelection.\\\\n\\\\tbeginTypeInBlock _ nil! !\\\\n\\\\n!ParagraphEditor methodsFor: 'controlling'!\\\\ncontrolTerminate\\\\n\\\\n\\\\tself closeTypeIn.  \\\\\\\"Must call to establish UndoInterval\\\\\\\"\\\\n\\\\tsuper controlTerminate.\\\\n\\\\tself deselect! !\\\\n\\\\n!ParagraphEditor methodsFor: 'controlling' stamp: 'sma 3/11/2000 15:17'!\\\\nnormalActivity\\\\n\\\\tself processKeyboard.\\\\n\\\\tself processMouseButtons! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'current selection'!\\\\ndeselect\\\\n\\\\t\\\\\\\"If the text selection is visible on the screen, reverse its highlight.\\\\\\\"\\\\n\\\\n\\\\tselectionShowing ifTrue: [self reverseSelection]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'current selection'!\\\\ninitializeSelection\\\\n\\\\t\\\\\\\"Do the initial activity when starting up the receiver. For example, in the \\\\n\\\\tParagraphEditor highlight the current selection.\\\\\\\"\\\\n\\\\n\\\\tself select! !\\\\n\\\\n!ParagraphEditor methodsFor: 'current selection' stamp: 'th 9/20/2002 11:41'!\\\\nrecomputeInterval\\\\n\\\\t\\\\\\\"The same characters are selected but their coordinates may have changed.\\\\\\\"\\\\n\\\\n\\\\tself computeIntervalFrom: self mark to: self pointIndex - 1! !\\\\n\\\\n!ParagraphEditor methodsFor: 'current selection'!\\\\nrecomputeSelection\\\\n\\\\t\\\\\\\"Redetermine the selection according to the start and stop block indices; \\\\n\\\\tdo not highlight.\\\\\\\"\\\\n\\\\n\\\\tself deselect; recomputeInterval! !\\\\n\\\\n!ParagraphEditor methodsFor: 'current selection' stamp: 'BG 12/12/2003 12:50'!\\\\nreverseSelection\\\\n\\\\t\\\\\\\"Reverse the valence of the current selection highlighting.\\\\\\\"\\\\n\\\\tselectionShowing _ selectionShowing not.\\\\n\\\\tparagraph reverseFrom: self pointBlock to: self markBlock! !\\\\n\\\\n!ParagraphEditor methodsFor: 'current selection'!\\\\nselect\\\\n\\\\t\\\\\\\"If the text selection is visible on the screen, highlight it.\\\\\\\"\\\\n\\\\n\\\\tselectionShowing ifFalse: [self reverseSelection]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'current selection' stamp: 'th 9/19/2002 18:47'!\\\\nselectAndScroll\\\\n\\\\t\\\\\\\"Scroll until the selection is in the view and then highlight it.\\\\\\\"\\\\n\\\\t| lineHeight deltaY clippingRectangle endBlock |\\\\n\\\\tself select.\\\\n\\\\tendBlock _ self stopBlock.\\\\n\\\\tlineHeight _ paragraph textStyle lineGrid.\\\\n\\\\tclippingRectangle _ paragraph clippingRectangle.\\\\n\\\\tdeltaY _ endBlock top - clippingRectangle top.\\\\n\\\\tdeltaY >= 0 \\\\n\\\\t\\\\tifTrue: [deltaY _ endBlock bottom - clippingRectangle bottom max: 0].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"check if stopIndex below bottom of clippingRectangle\\\\\\\"\\\\n\\\\tdeltaY ~= 0 \\\\n\\\\t\\\\tifTrue: [self scrollBy: (deltaY abs + lineHeight - 1 truncateTo: lineHeight)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t* deltaY sign]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'current selection' stamp: 'th 9/19/2002 18:48'!\\\\nselectAndScrollToTop\\\\n\\\\t\\\\\\\"Scroll until the selection is in the view and then highlight it.\\\\\\\"\\\\n\\\\t| lineHeight deltaY clippingRectangle |\\\\n\\\\tself select.\\\\n\\\\tlineHeight _ paragraph textStyle lineGrid.\\\\n\\\\tclippingRectangle _ paragraph clippingRectangle.\\\\n\\\\tdeltaY _ self stopBlock top - clippingRectangle top.\\\\n\\\\tdeltaY ~= 0 \\\\n\\\\t\\\\tifTrue: [self scrollBy: (deltaY abs + lineHeight - 1 truncateTo: lineHeight)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t* deltaY sign]! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'displaying'!\\\\ndisplay\\\\n\\\\t\\\\\\\"Redisplay the paragraph.\\\\\\\"\\\\n\\\\n\\\\t| selectionState |\\\\n\\\\tselectionState _ selectionShowing.\\\\n\\\\tself deselect.\\\\n\\\\tparagraph foregroundColor: view foregroundColor\\\\n\\\\t\\\\t\\\\tbackgroundColor: view backgroundColor;\\\\n\\\\t\\\\t\\\\tdisplayOn: Display.\\\\n\\\\tselectionState ifTrue: [self select]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'displaying'!\\\\nflash\\\\n\\\\t\\\\\\\"Causes the view of the paragraph to complement twice in succession.\\\\\\\"\\\\n\\\\n\\\\tparagraph flash! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'do-its' stamp: 'md 2/13/2006 14:36'!\\\\ncompileSelectionFor: anObject in: evalContext\\\\n\\\\n\\\\t| methodNode method |\\\\n\\\\tmethodNode _ [Compiler new\\\\n\\\\t\\\\tcompileNoPattern: self selectionAsStream\\\\n\\\\t\\\\tin: anObject class\\\\n\\\\t\\\\tcontext: evalContext\\\\n\\\\t\\\\tnotifying: self\\\\n\\\\t\\\\tifFail: [^nil]]\\\\n\\\\t\\\\t\\\\ton: OutOfScopeNotification\\\\n\\\\t\\\\t\\\\tdo: [:ex | ex resume: true].\\\\n\\\\tmethod _ methodNode generate.\\\\n\\\\t^method copyWithTempNames: methodNode tempNames! !\\\\n\\\\n!ParagraphEditor methodsFor: 'do-its' stamp: 'di 5/10/1998 21:38'!\\\\ndoIt\\\\n\\\\t\\\\\\\"Set the context to include pool vars of the model.  Then evaluate.\\\\\\\"\\\\n\\\\t^ self evaluateSelection.\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'do-its' stamp: 'gk 3/3/2004 17:15'!\\\\nevaluateSelection\\\\n\\\\t\\\\\\\"Treat the current selection as an expression; evaluate it and return the result\\\\\\\"\\\\n\\\\t| result rcvr ctxt |\\\\n\\\\tself lineSelectAndEmptyCheck: [^ ''].\\\\n\\\\n\\\\t(model respondsTo: #doItReceiver) \\\\n\\\\t\\\\tifTrue: [FakeClassPool adopt: model selectedClass.  \\\\\\\"Include model pool vars if any\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\trcvr _ model doItReceiver.\\\\n\\\\t\\\\t\\\\t\\\\tctxt _ model doItContext]\\\\n\\\\t\\\\tifFalse: [rcvr _ ctxt _ nil].\\\\n\\\\tresult _ [\\\\n\\\\t\\\\trcvr class evaluatorClass new \\\\n\\\\t\\\\t\\\\tevaluate: self selectionAsStream\\\\n\\\\t\\\\t\\\\tin: ctxt\\\\n\\\\t\\\\t\\\\tto: rcvr\\\\n\\\\t\\\\t\\\\tnotifying: self\\\\n\\\\t\\\\t\\\\tifFail: [FakeClassPool adopt: nil. ^ #failedDoit]\\\\n\\\\t\\\\t\\\\tlogged: true.\\\\n\\\\t] \\\\n\\\\t\\\\ton: OutOfScopeNotification \\\\n\\\\t\\\\tdo: [ :ex | ex resume: true].\\\\n\\\\tFakeClassPool adopt: nil.\\\\n\\\\t^ result! !\\\\n\\\\n!ParagraphEditor methodsFor: 'do-its' stamp: 'acg 12/7/1999 07:53'!\\\\nexploreIt\\\\n\\\\t| result |\\\\n\\\\tresult _ self evaluateSelection.\\\\n\\\\t((result isKindOf: FakeClassPool) or: [result == #failedDoit])\\\\n\\\\t\\\\t\\\\tifTrue: [view flash]\\\\n\\\\t\\\\t\\\\tifFalse: [result explore].\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'do-its' stamp: 'di 9/7/1999 11:25'!\\\\ninspectIt\\\\n\\\\t\\\\\\\"1/13/96 sw: minor fixup\\\\\\\"\\\\n\\\\t| result |\\\\n\\\\tresult _ self evaluateSelection.\\\\n\\\\t((result isKindOf: FakeClassPool) or: [result == #failedDoit])\\\\n\\\\t\\\\t\\\\tifTrue: [view flash]\\\\n\\\\t\\\\t\\\\tifFalse: [result inspect].\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'do-its' stamp: 'sd 4/16/2003 11:41'!\\\\nobjectsReferencingIt\\\\n\\\\t\\\\\\\"Open a list inspector on all objects that reference the object that results when the current selection is evaluated.  \\\\\\\"\\\\n\\\\t| result |\\\\n\\\\tself terminateAndInitializeAround: [\\\\n\\\\tresult _ self evaluateSelection.\\\\n\\\\t((result isKindOf: FakeClassPool) or: [result == #failedDoit])\\\\n\\\\t\\\\tifTrue: [view flash]\\\\n\\\\t\\\\tifFalse: [self systemNavigation\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbrowseAllObjectReferencesTo: result\\\\n\\\\t\\\\t\\\\t\\\\t\\\\texcept: #()\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifNone: [:obj | view topView flash]].\\\\n\\\\t]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'do-its' stamp: 'di 5/10/1998 21:52'!\\\\nprintIt\\\\n\\\\t\\\\\\\"Treat the current text selection as an expression; evaluate it. Insert the \\\\n\\\\tdescription of the result of evaluation after the selection and then make \\\\n\\\\tthis description the new text selection.\\\\\\\"\\\\n\\\\t| result |\\\\n\\\\tresult _ self evaluateSelection.\\\\n\\\\t((result isKindOf: FakeClassPool) or: [result == #failedDoit])\\\\n\\\\t\\\\t\\\\tifTrue: [view flash]\\\\n\\\\t\\\\t\\\\tifFalse: [self afterSelectionInsertAndSelect: result printString]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'do-its' stamp: 'ab 3/23/2005 16:49'!\\\\ntallyIt\\\\n\\\\n\\\\t^ self tallySelection! !\\\\n\\\\n!ParagraphEditor methodsFor: 'do-its' stamp: 'ab 3/23/2005 16:49'!\\\\ntallySelection\\\\n\\\\t\\\\\\\"Treat the current selection as an expression; evaluate it and return the time took for this evaluation\\\\\\\"\\\\n\\\\t| result rcvr ctxt cm v valueAsString |\\\\n\\\\tself lineSelectAndEmptyCheck: [^ -1].\\\\n\\\\n\\\\t(model respondsTo: #doItReceiver) \\\\n\\\\t\\\\tifTrue: [FakeClassPool adopt: model selectedClass.  \\\\\\\"Include model pool vars if any\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\trcvr _ model doItReceiver.\\\\n\\\\t\\\\t\\\\t\\\\tctxt _ model doItContext]\\\\n\\\\t\\\\tifFalse: [rcvr _ ctxt _ nil].\\\\n\\\\tresult _ [\\\\n\\\\t\\\\tcm := rcvr class evaluatorClass new \\\\n\\\\t\\\\t\\\\tcompiledMethodFor: self selectionAsStream\\\\n\\\\t\\\\t\\\\tin: ctxt\\\\n\\\\t\\\\t\\\\tto: rcvr\\\\n\\\\t\\\\t\\\\tnotifying: self\\\\n\\\\t\\\\t\\\\tifFail: [FakeClassPool adopt: nil. ^ #failedDoit]\\\\n\\\\t\\\\t\\\\tlogged: false.\\\\n\\\\t\\\\tTime millisecondsToRun: \\\\n\\\\t\\\\t\\\\t[v := cm valueWithReceiver: rcvr arguments: (Array with: ctxt)].\\\\n\\\\t] \\\\n\\\\t\\\\ton: OutOfScopeNotification \\\\n\\\\t\\\\tdo: [ :ex | ex resume: true].\\\\n\\\\tFakeClassPool adopt: nil.\\\\n\\\\n\\\\t\\\\\\\"We do not want to have large result displayed\\\\\\\"\\\\n\\\\tvalueAsString := v printString.\\\\n\\\\t(valueAsString size > 30) ifTrue: [valueAsString := (valueAsString copyFrom: 1 to: 30), '...'].\\\\n\\\\tPopUpMenu \\\\n\\\\t\\\\tinform: 'Time to compile and execute: ', result printString, 'ms res: ', valueAsString.\\\\n! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys'!\\\\nalign: characterStream \\\\n\\\\t\\\\\\\"Triggered by Cmd-u;  cycle through alignment alternatives.  8/11/96 sw\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself align.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'hpt 8/5/2004 20:21'!\\\\nbrowseIt: characterStream \\\\n\\\\t\\\\\\\"Triggered by Cmd-B; browse the thing represented by the current selection, if plausible.  1/18/96 sw\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself browseIt.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys'!\\\\nbrowseItHere: characterStream \\\\n\\\\t\\\\\\\"Triggered by Cmd-shift-B; browse the thing represented by the current selection, if plausible, in the receiver's own window.  3/1/96 sw\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself browseItHere.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'di 9/7/1999 08:40'!\\\\ncancel: characterStream \\\\n\\\\t\\\\\\\"Cancel unsubmitted changes.  Flushes typeahead.  1/12/96 sw\\\\n\\\\t 1/22/96 sw: put in control terminate/init\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\n\\\\tself terminateAndInitializeAround: [self cancel].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'dgd 4/4/2006 15:46'!\\\\nchangeEmphasis: characterStream \\\\n\\\\t\\\\\\\"Change the emphasis of the current selection or prepare to\\\\n\\\\taccept characters with the change in emphasis. Emphasis\\\\n\\\\tchange amounts to a font change. Keeps typeahead.\\\\\\\"\\\\n\\\\t\\\\n\\\\t| keyCode attribute oldAttributes index thisSel colors extras |\\\\n\\\\n\\\\t\\\\\\\"control 0..9 -> 0..9\\\\\\\"\\\\n\\\\tkeyCode := ('0123456789-=' indexOf: sensor keyboard ifAbsent: [1]) - 1.\\\\n\\\\n\\\\toldAttributes := paragraph text attributesAt: self pointIndex forStyle: paragraph textStyle.\\\\n\\\\tthisSel := self selection.\\\\n\\\\n\\\\t\\\\\\\"Decipher keyCodes for Command 0-9...\\\\\\\"\\\\n\\\\t(keyCode between: 1 and: 5) ifTrue: [\\\\n\\\\t\\\\tattribute := TextFontChange fontNumber: keyCode\\\\n\\\\t].\\\\n\\\\n\\\\tkeyCode = 6 ifTrue: [\\\\n\\\\t\\\\t| labels lines | \\\\n\\\\t\\\\tcolors := #(#black #magenta #red #yellow #green #blue #cyan #white ).\\\\n\\\\t\\\\textras := (self class name = #TextMorphEditor and: [(self morph isKindOf: TextMorphForEditView) not])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"not a system window\\\\\\\" #()]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [#('Link to comment of class' 'Link to definition of class' 'Link to hierarchy of class' 'Link to method' )].\\\\n\\\\n\\\\t\\\\tPreferences noviceMode ifTrue: [\\\\n\\\\t\\\\t\\\\tlabels := colors , #('choose color...' ).\\\\n\\\\t\\\\t\\\\tlines := #()\\\\n\\\\t\\\\t]\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\tlabels := colors , #('choose color...' 'Do it' 'Print it' ) , extras , #('be a web URL link' 'Edit hidden info' 'Copy hidden info' ).\\\\n\\\\t\\\\t\\\\tlines := Array with: colors size + 1\\\\n\\\\t\\\\t].\\\\n\\\\n\\\\t\\\\t\\\\\\\"index _ (PopUpMenu labelArray: labels lines: lines) startUp. \\\\\\\"\\\\n\\\\t\\\\tindex := UIManager default chooseFrom: labels lines: lines.\\\\n\\\\t\\\\tindex = 0\\\\n\\\\t\\\\t\\\\tifTrue: [ ^ true].\\\\n\\\\t\\\\t\\\\t\\\\n\\\\t\\\\tindex <= colors size ifTrue: [\\\\n\\\\t\\\\t\\\\tattribute := TextColor color: (Color perform: (colors at: index))\\\\n\\\\t\\\\t]\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\tindex := index - colors size - 1. \\\\\\\"Re-number!!!!!!\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\tindex = 0 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tattribute := self chooseColor\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\n\\\\t\\\\t\\\\tindex = 1 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tattribute := TextDoIt new.\\\\n\\\\t\\\\t\\\\t\\\\tthisSel := attribute analyze: self selection asString\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\n\\\\t\\\\t\\\\tindex = 2 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tattribute := TextPrintIt new.\\\\n\\\\t\\\\t\\\\t\\\\tthisSel := attribute analyze: self selection asString\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\n\\\\t\\\\t\\\\textras size = 0 & (index > 2) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tindex := index + 4 \\\\\\\"skip those\\\\\\\"\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\n\\\\t\\\\t\\\\tindex = 3 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tattribute := TextLink new.\\\\n\\\\t\\\\t\\\\t\\\\tthisSel := attribute analyze: self selection asString with: 'Comment'\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\n\\\\t\\\\t\\\\tindex = 4 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tattribute := TextLink new.\\\\n\\\\t\\\\t\\\\t\\\\tthisSel := attribute analyze: self selection asString with: 'Definition'\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\n\\\\t\\\\t\\\\tindex = 5 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tattribute := TextLink new.\\\\n\\\\t\\\\t\\\\t\\\\tthisSel := attribute analyze: self selection asString with: 'Hierarchy'\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\n\\\\t\\\\t\\\\tindex = 6 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tattribute := TextLink new.\\\\n\\\\t\\\\t\\\\t\\\\tthisSel := attribute analyze: self selection asString\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\n\\\\t\\\\t\\\\tindex = 7 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tattribute := TextURL new.\\\\n\\\\t\\\\t\\\\t\\\\tthisSel := attribute analyze: self selection asString\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\n\\\\t\\\\t\\\\tindex = 8 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"Edit hidden info\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tthisSel := self hiddenInfo. \\\\\\\"includes selection\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tattribute := TextEmphasis normal\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\n\\\\t\\\\t\\\\tindex = 9 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"Copy hidden info\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tself copyHiddenInfo.\\\\n\\\\t\\\\t\\\\t\\\\t^ true\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\n\\\\t\\\\t\\\\t\\\\\\\"no other action\\\\\\\"\\\\n\\\\t\\\\t\\\\tthisSel\\\\n\\\\t\\\\t\\\\t\\\\tifNil: [ ^ true ]\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\n\\\\t(keyCode between: 7 and: 11) ifTrue: [\\\\n\\\\t\\\\tsensor leftShiftDown ifTrue: [\\\\n\\\\t\\\\t\\\\tkeyCode = 10 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tattribute := TextKern kern: -1\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\tkeyCode = 11 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tattribute := TextKern kern: 1\\\\n\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t]\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\tattribute := TextEmphasis perform: (#(#bold #italic #narrow #underlined #struckOut ) at: keyCode - 6).\\\\n\\\\t\\\\t\\\\toldAttributes\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:att | (att dominates: attribute) ifTrue: [attribute turnOff]]\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\n\\\\tkeyCode = 0\\\\n\\\\t\\\\tifTrue: [attribute := TextEmphasis normal].\\\\n\\\\n\\\\tbeginTypeInBlock ~~ nil ifTrue: [\\\\n\\\\t\\\\t\\\\\\\"only change emphasisHere while typing\\\\\\\"\\\\n\\\\t\\\\tself insertTypeAhead: characterStream.\\\\n\\\\t\\\\temphasisHere := Text addAttribute: attribute toArray: oldAttributes.\\\\n\\\\t\\\\t^ true\\\\n\\\\t].\\\\n\\\\n\\\\tself\\\\n\\\\t\\\\treplaceSelectionWith: (thisSel asText addAttribute: attribute).\\\\n\\\\t\\\\t\\\\n\\\\t^ true\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'di 5/28/1998 11:58'!\\\\nchangeLfToCr: characterStream \\\\n\\\\t\\\\\\\"Replace all LFs by CRs.\\\\n\\\\tTriggered by Cmd-U -- useful when getting code from FTP sites\\\\\\\"\\\\n\\\\t| cr lf |\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush the triggering cmd-key character\\\\\\\"\\\\n\\\\tcr _ Character cr.  lf _ Character linefeed.\\\\n\\\\tself replaceSelectionWith: (Text fromString:\\\\n\\\\t\\\\t\\\\t(self selection string collect: [:c | c = lf ifTrue: [cr] ifFalse: [c]])).\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'tk 5/7/2001 09:11'!\\\\nchooseColor\\\\n\\\\t\\\\\\\"Make a new Text Color Attribute, let the user pick a color, and return the attribute.  This is the non-Morphic version.\\\\\\\"\\\\n\\\\n\\\\t^ TextColor color: (Color fromUser)! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'di 9/7/1999 08:31'!\\\\ncompareToClipboard: characterStream \\\\n\\\\t\\\\\\\"Compare the receiver to the text on the clipboard.  Flushes typeahead.  5/1/96 sw\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\n\\\\tself terminateAndInitializeAround: [self compareToClipboard].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'tk 5/7/2001 08:47'!\\\\ncopyHiddenInfo\\\\n\\\\t\\\\\\\"In TextLinks, TextDoits, TextColor, and TextURLs, there is hidden\\\\ninfo.  Copy that to the clipboard.  You can paste it and see what it is.\\\\nUsually enclosed in <>.\\\\\\\"\\\\n\\\\n\\\\t^ self clipboardTextPut: self hiddenInfo asText! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys'!\\\\ncopySelection: characterStream \\\\n\\\\t\\\\\\\"Copy the current text selection.  Flushes typeahead.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself copySelection.\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys'!\\\\ncut: characterStream \\\\n\\\\t\\\\\\\"Cut out the current text selection.  Flushes typeahead.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself cut.\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'di 9/7/1999 08:23'!\\\\ndoIt: characterStream \\\\n\\\\t\\\\\\\"Called when user hits cmd-d.  Select the current line, if relevant, then evaluate and execute.  2/1/96 sw.\\\\n\\\\t2/29/96 sw: don't call selectLine; it's done by doIt now\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\n\\\\tself terminateAndInitializeAround: [self doIt].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'th 9/20/2002 11:41'!\\\\nduplicate: characterStream\\\\n\\\\t\\\\\\\"Paste the current selection over the prior selection, if it is non-overlapping and\\\\n\\\\t legal.  Flushes typeahead.  Undoer & Redoer: undoAndReselect.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\n\\\\tself closeTypeIn.\\\\n\\\\t(self hasSelection and: [self isDisjointFrom: otherInterval])\\\\n\\\\t\\\\tifTrue: \\\\\\\"Something to duplicate\\\\\\\"\\\\n\\\\t\\\\t\\\\t[self replace: otherInterval with: self selection and:\\\\n\\\\t\\\\t\\\\t\\\\t[self selectAt: self pointIndex]]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[view flash].\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'th 9/19/2002 18:01'!\\\\nenclose: characterStream\\\\n\\\\t\\\\\\\"Insert or remove bracket characters around the current selection.\\\\n\\\\t Flushes typeahead.\\\\\\\"\\\\n\\\\n\\\\t| char left right startIndex stopIndex oldSelection which text |\\\\n\\\\tchar _ sensor keyboard.\\\\n\\\\tself closeTypeIn.\\\\n\\\\tstartIndex _ self startIndex.\\\\n\\\\tstopIndex _ self stopIndex.\\\\n\\\\toldSelection _ self selection.\\\\n\\\\twhich _ '([<{\\\\\\\"''' indexOf: char ifAbsent: [ ^true ].\\\\n\\\\tleft _ '([<{\\\\\\\"''' at: which.\\\\n\\\\tright _ ')]>}\\\\\\\"''' at: which.\\\\n\\\\ttext _ paragraph text.\\\\n\\\\t((startIndex > 1 and: [stopIndex <= text size])\\\\n\\\\t\\\\tand:\\\\n\\\\t\\\\t[(text at: startIndex-1) = left and: [(text at: stopIndex) = right]])\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"already enclosed; strip off brackets\\\\\\\"\\\\n\\\\t\\\\t\\\\tself selectFrom: startIndex-1 to: stopIndex.\\\\n\\\\t\\\\t\\\\tself replaceSelectionWith: oldSelection]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"not enclosed; enclose by matching brackets\\\\\\\"\\\\n\\\\t\\\\t\\\\tself replaceSelectionWith:\\\\n\\\\t\\\\t\\\\t\\\\t(Text string: (String with: left), oldSelection string ,(String with: right)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\temphasis: emphasisHere).\\\\n\\\\t\\\\t\\\\tself selectFrom: startIndex+1 to: stopIndex].\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys'!\\\\nexchange: characterStream\\\\n\\\\t\\\\\\\"Exchange the current and prior selections.  Keeps typeahead.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t \\\\\\\"Flush character\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself exchange.\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'acg 12/7/1999 07:56'!\\\\nexploreIt: characterStream \\\\n\\\\t\\\\\\\"Explore the selection -- invoked via cmd-shift-I.  If there is no current selection, use the current line.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself terminateAndInitializeAround: [self exploreIt].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'sw 4/24/2001 12:28'!\\\\nfileItIn: characterStream \\\\n\\\\t\\\\\\\"File in the selection; invoked via a keyboard shortcut, -- for now, cmd-shift-G.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself terminateAndInitializeAround: [self fileItIn].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'th 9/18/2002 16:31'!\\\\nhiddenInfo\\\\n\\\\t\\\\\\\"In TextLinks, TextDoits, TextColor, and TextURLs, there is hidden info.  Return the entire string that was used by Cmd-6 to create this text attribute.  Usually enclosed in < >.\\\\\\\"\\\\n\\\\n\\\\t| attrList |\\\\n\\\\tattrList _ paragraph text attributesAt: (self pointIndex +\\\\nself markIndex)//2 forStyle: paragraph textStyle.\\\\n\\\\tattrList do: [:attr |\\\\n\\\\t\\\\t(attr isKindOf: TextAction) ifTrue:\\\\n\\\\t\\\\t\\\\t[^ self selection asString, '<', attr info, '>']].\\\\n\\\\t\\\\\\\"If none of the above\\\\\\\"\\\\n\\\\tattrList do: [:attr |\\\\n\\\\t\\\\tattr class == TextColor ifTrue:\\\\n\\\\t\\\\t\\\\t[^ self selection asString, '<', attr color printString, '>']].\\\\n\\\\t^ self selection asString, '[No hidden info]'! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys'!\\\\nimplementorsOfIt: characterStream \\\\n\\\\t\\\\\\\"Triggered by Cmd-m; browse implementors of the selector represented by the current selection, if plausible. 2/1/96 sw\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself implementorsOfIt.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'pk 9/10/2005 22:53'!\\\\ninOutdent: characterStream delta: delta\\\\n\\\\t\\\\\\\"Add/remove a tab at the front of every line occupied by the selection. Flushes typeahead.  Derived from work by Larry Tesler back in December 1985.  Now triggered by Cmd-L and Cmd-R.  2/29/96 sw\\\\\\\"\\\\n\\\\n\\\\t| cr realStart realStop lines startLine stopLine start stop adjustStart indentation size numLines inStream newString outStream |\\\\n\\\\t\\\\n\\\\tsensor keyboard.  \\\\\\\"Flush typeahead\\\\\\\"\\\\n\\\\tcr := Character cr.\\\\n\\\\n\\\\t\\\\\\\"Operate on entire lines, but remember the real selection for re-highlighting later\\\\\\\"\\\\n\\\\trealStart := self startIndex.\\\\n\\\\trealStop := self stopIndex - 1.\\\\n\\\\n\\\\t\\\\\\\"Special case a caret on a line of its own, including weird case at end of paragraph\\\\\\\"\\\\n\\\\t(realStart > realStop and:\\\\n\\\\t\\\\t\\\\t\\\\t[realStart < 2 or: [(paragraph string at: realStart - 1) == cr]])\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[delta < 0\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[view flash]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self replaceSelectionWith: Character tab asSymbol asText.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself selectAt: realStart + 1].\\\\n\\\\t\\\\t\\\\t^ true].\\\\n\\\\n\\\\tlines := paragraph lines.\\\\n\\\\tstartLine := paragraph lineIndexOfCharacterIndex: realStart.\\\\n\\\\tstopLine := paragraph lineIndexOfCharacterIndex: (realStart max: realStop).\\\\n\\\\tstart := (lines at: startLine) first.\\\\n\\\\tstop := (lines at: stopLine) last.\\\\n\\\\t\\\\n\\\\t\\\\\\\"Pin the start of highlighting unless the selection starts a line\\\\\\\"\\\\n\\\\tadjustStart := realStart > start.\\\\n\\\\n\\\\t\\\\\\\"Find the indentation of the least-indented non-blank line; never outdent more\\\\\\\"\\\\n\\\\tindentation := (startLine to: stopLine) inject: 1000 into:\\\\n\\\\t\\\\t[:m :l |\\\\n\\\\t\\\\tm := m min: (paragraph indentationOfLineIndex: l ifBlank: [:tabs | 1000])].\\\\t\\\\t\\\\t\\\\n\\\\n\\\\tsize :=  stop + 1 - start.\\\\n\\\\tnumLines := stopLine + 1 - startLine.\\\\n\\\\tinStream := ReadStream on: paragraph string from: start to: stop.\\\\n\\\\n\\\\tnewString := WideString new: size + ((numLines * delta) max: 0).\\\\n\\\\toutStream := ReadWriteStream on: newString.\\\\n\\\\n\\\\t\\\\\\\"This subroutine does the actual work\\\\\\\"\\\\n\\\\tself indent: delta fromStream: inStream toStream: outStream.\\\\n\\\\n\\\\t\\\\\\\"Adjust the range that will be highlighted later\\\\\\\"\\\\n\\\\tadjustStart ifTrue: [realStart := (realStart + delta) max: start].\\\\n\\\\trealStop := realStop + outStream position - size.\\\\n\\\\n\\\\t\\\\\\\"Prepare for another iteration\\\\\\\"\\\\n\\\\tindentation := indentation + delta.\\\\n\\\\tsize := outStream position.\\\\n\\\\tinStream := outStream setFrom: 1 to: size.\\\\n\\\\n\\\\toutStream == nil\\\\n\\\\t\\\\tifTrue: \\\\t\\\\\\\"tried to outdent but some line(s) were already left flush\\\\\\\"\\\\n\\\\t\\\\t\\\\t[view flash]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self selectInvisiblyFrom: start to: stop.\\\\n\\\\t\\\\t\\\\tsize = newString size ifFalse: [newString _ outStream contents].\\\\n\\\\t\\\\t\\\\tself replaceSelectionWith: newString asText].\\\\n\\\\tself selectFrom: realStart to: realStop. \\\\t\\\\\\\"highlight only the original range\\\\\\\"\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys'!\\\\nindent: characterStream\\\\n\\\\t\\\\\\\"Add a tab at the front of every line occupied by the selection. Flushes typeahead.  Invoked from keyboard via cmd-shift-R.  2/29/96 sw\\\\\\\"\\\\n\\\\n\\\\t^ self inOutdent: characterStream delta: 1! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'di 9/7/1999 08:25'!\\\\ninspectIt: characterStream \\\\n\\\\t\\\\\\\"Inspect the selection -- invoked via cmd-i.  If there is no current selection, use the current line.  1/17/96 sw\\\\n\\\\t 2/29/96 sw: don't call selectLine; it's done by inspectIt now\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself terminateAndInitializeAround: [self inspectIt].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'md 1/18/2006 23:42'!\\\\nmakeCapitalized: characterStream \\\\n\\\\t\\\\\\\"Force the current selection to be capitalized. Triggered by Cmd-Z.\\\\\\\"\\\\n\\\\t| prev |\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"Flush the triggering cmd-key character\\\\\\\"\\\\n\\\\tprev _ $-.  \\\\\\\"not a letter\\\\\\\"\\\\n\\\\tself replaceSelectionWith: (Text fromString:\\\\n\\\\t\\\\t\\\\t(self selection string collect:\\\\n\\\\t\\\\t\\\\t\\\\t[:c | prev _ prev isLetter ifTrue: [c asLowercase] ifFalse: [c asUppercase]])).\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'di 5/28/1998 12:00'!\\\\nmakeLowercase: characterStream \\\\n\\\\t\\\\\\\"Force the current selection to lowercase.  Triggered by Cmd-X.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush the triggering cmd-key character\\\\\\\"\\\\n\\\\tself replaceSelectionWith: (Text fromString: (self selection string asLowercase)).\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'th 9/18/2002 16:21'!\\\\nmakeProjectLink: characterStream \\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\n\\\\t| attribute oldAttributes thisSel |\\\\n\\\\t\\\\n\\\\tsensor keyboard.\\\\n\\\\toldAttributes _ paragraph text attributesAt: self pointIndex forStyle: paragraph textStyle.\\\\n\\\\tthisSel _ self selection.\\\\n\\\\n\\\\tattribute _ TextSqkProjectLink new. \\\\n\\\\tthisSel _ attribute analyze: self selection asString.\\\\n\\\\n\\\\tthisSel ifNil: [^ true].\\\\n\\\\tbeginTypeInBlock ~~ nil\\\\n\\\\t\\\\tifTrue:  \\\\\\\"only change emphasisHere while typing\\\\\\\"\\\\n\\\\t\\\\t\\\\t[self insertTypeAhead: characterStream.\\\\n\\\\t\\\\t\\\\temphasisHere _ Text addAttribute: attribute toArray: oldAttributes.\\\\n\\\\t\\\\t\\\\t^ true].\\\\n\\\\tself replaceSelectionWith: (thisSel asText addAttribute: attribute).\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'ls 11/10/2002 12:11'!\\\\nmakeUppercase: characterStream \\\\n\\\\t\\\\\\\"Force the current selection to uppercase.  Triggered by Cmd-Y.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush the triggering cmd-key character\\\\\\\"\\\\n\\\\tself replaceSelectionWith: (Text fromString: (self selection string asUppercase)).\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'sw 8/1/97 15:18'!\\\\nmethodNamesContainingIt: characterStream \\\\n\\\\t\\\\\\\"Browse methods whose selectors containing the selection in their names\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself methodNamesContainingIt.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'sw 9/9/97 16:44'!\\\\nmethodStringsContainingIt: characterStream \\\\n\\\\t\\\\\\\"Invoked from cmd-E -- open a browser on all methods holding string constants containing it.  Flushes typeahead. \\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\n\\\\tself methodStringsContainingit.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys'!\\\\nnoop: characterStream \\\\n\\\\t\\\\\\\"Unimplemented keyboard command; just ignore it.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t  \\\\\\\"flush character\\\\\\\"\\\\n\\\\t^ true\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'sw 1/19/2000 11:14'!\\\\nofferFontMenu\\\\n\\\\t\\\\\\\"Present a menu of available fonts, and if one is chosen, apply it to the current selection.  \\\\n\\\\tUse only names of Fonts of this paragraph  \\\\\\\"\\\\n\\\\n\\\\t| aList reply |\\\\n\\\\taList _ paragraph textStyle fontNamesWithPointSizes.\\\\n\\\\treply _ (SelectionMenu labelList: aList selections: aList) startUp.\\\\n\\\\treply ~~ nil ifTrue:\\\\n\\\\t\\\\t[self replaceSelectionWith:\\\\n\\\\t\\\\t\\\\t(Text string: self selection asString \\\\n\\\\t\\\\t\\\\t\\\\tattribute: (TextFontChange fontNumber: (aList indexOf: reply)))] ! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys'!\\\\nofferFontMenu: characterStream \\\\n\\\\t\\\\\\\"The user typed the command key that requests a font change; Offer the font menu.  5/27/96 sw\\\\n\\\\t Keeps typeahead.  (?? should flush?)\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself offerFontMenu.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys'!\\\\noutdent: characterStream\\\\n\\\\t\\\\\\\"Remove a tab from the front of every line occupied by the selection. Flushes typeahead.  Invoked from keyboard via cmd-shift-L.  2/29/96 sw\\\\\\\"\\\\n\\\\n\\\\t^ self inOutdent: characterStream delta: -1! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys'!\\\\npaste: characterStream \\\\n\\\\t\\\\\\\"Replace the current text selection by the text in the shared buffer.\\\\n\\\\t Keeps typeahead.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself paste.\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'th 9/19/2002 18:48'!\\\\npasteInitials: characterStream \\\\n\\\\t\\\\\\\"Replace the current text selection by an authorship name/date stamp; invoked by cmd-shift-v, easy way to put an authorship stamp in the comments of an editor.\\\\n\\\\t Keeps typeahead.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself replace: self selectionInterval with: (Text fromString: Utilities changeStamp) and: [self selectAt: self stopIndex].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'di 9/7/1999 08:25'!\\\\nprintIt: characterStream \\\\n\\\\t\\\\\\\"Print the results of evaluting the selection -- invoked via cmd-p.  If there is no current selection, use the current line.  1/17/96 sw\\\\n\\\\t 2/29/96 sw: don't call selectLine now, since it's called by doIt\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself terminateAndInitializeAround: [self printIt].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys'!\\\\nreferencesToIt: characterStream \\\\n\\\\t\\\\\\\"Triggered by Cmd-N; browse references to the current selection\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself referencesToIt.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'di 9/7/1999 08:43'!\\\\nsave: characterStream\\\\n\\\\t\\\\\\\"Submit the current text.  Equivalent to 'accept' 1/18/96 sw\\\\n\\\\t Keeps typeahead.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself terminateAndInitializeAround: [self accept].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys'!\\\\nsendersOfIt: characterStream \\\\n\\\\t\\\\\\\"Triggered by Cmd-n; browse implementors of the selector represented by the current selection, if plausible. 2/1/96 sw\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself sendersOfIt.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'yo 5/27/2004 13:56'!\\\\nsetEmphasis: emphasisSymbol\\\\n\\\\t\\\\\\\"Change the emphasis of the current selection.\\\\\\\"\\\\n\\\\n\\\\t| oldAttributes attribute |\\\\n\\\\toldAttributes _ paragraph text attributesAt: self selectionInterval first forStyle: paragraph textStyle.\\\\n\\\\n\\\\tattribute _ TextEmphasis perform: emphasisSymbol.\\\\n\\\\t(emphasisSymbol == #normal) \\\\n\\\\t\\\\tifFalse:\\\\t[oldAttributes do:\\\\t\\\\n\\\\t\\\\t\\\\t[:att | (att dominates: attribute) ifTrue: [attribute turnOff]]].\\\\n\\\\tself replaceSelectionWith: (self selection addAttribute: attribute)! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'th 9/18/2002 16:20'!\\\\nshiftEnclose: characterStream\\\\n\\\\t\\\\\\\"Insert or remove bracket characters around the current selection.\\\\n\\\\t Flushes typeahead.\\\\\\\"\\\\n\\\\n\\\\t| char left right startIndex stopIndex oldSelection which text |\\\\n\\\\tchar _ sensor keyboard.\\\\n\\\\tchar = $9 ifTrue: [ char _ $( ].\\\\n\\\\tchar = $, ifTrue: [ char _ $< ].\\\\n\\\\tchar = $[ ifTrue: [ char _ ${ ].\\\\n\\\\tchar = $' ifTrue: [ char _ $\\\\\\\" ].\\\\n\\\\tchar asciiValue = 27 ifTrue: [ char _ ${ ].\\\\t\\\\\\\"ctrl-[\\\\\\\"\\\\n\\\\n\\\\tself closeTypeIn.\\\\n\\\\tstartIndex _ self startIndex.\\\\n\\\\tstopIndex _ self stopIndex.\\\\n\\\\toldSelection _ self selection.\\\\n\\\\twhich _ '([<{\\\\\\\"''' indexOf: char ifAbsent: [1].\\\\n\\\\tleft _ '([<{\\\\\\\"''' at: which.\\\\n\\\\tright _ ')]>}\\\\\\\"''' at: which.\\\\n\\\\ttext _ paragraph text.\\\\n\\\\t((startIndex > 1 and: [stopIndex <= text size])\\\\n\\\\t\\\\tand:\\\\n\\\\t\\\\t[(text at: startIndex-1) = left and: [(text at: stopIndex) = right]])\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"already enclosed; strip off brackets\\\\\\\"\\\\n\\\\t\\\\t\\\\tself selectFrom: startIndex-1 to: stopIndex.\\\\n\\\\t\\\\t\\\\tself replaceSelectionWith: oldSelection]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"not enclosed; enclose by matching brackets\\\\\\\"\\\\n\\\\t\\\\t\\\\tself replaceSelectionWith:\\\\n\\\\t\\\\t\\\\t\\\\t(Text string: (String with: left), oldSelection string ,(String with: right)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\temphasis: emphasisHere).\\\\n\\\\t\\\\t\\\\tself selectFrom: startIndex+1 to: stopIndex].\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'di 9/7/1999 08:43'!\\\\nspawnIt: characterStream\\\\n\\\\t\\\\\\\"Triggered by Cmd-o; spawn a new code window, if it makes sense.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\n\\\\tself terminateAndInitializeAround: [self spawn].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'th 9/19/2002 18:00'!\\\\nswapChars: characterStream \\\\n\\\\t\\\\\\\"Triggered byCmd-Y;.  Swap two characters, either those straddling the insertion point, or the two that comprise the selection.  Suggested by Ted Kaehler.  \\\\\\\"\\\\n\\\\n\\\\t| currentSelection aString chars |\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush the triggering cmd-key character\\\\\\\"\\\\n\\\\t(chars _ self selection) size == 0\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[currentSelection _ self pointIndex.\\\\n\\\\t\\\\t\\\\tself selectMark: currentSelection - 1 point: currentSelection]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[chars size == 2\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[view flash.  ^ true]\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[currentSelection _ self pointIndex - 1]].\\\\n\\\\taString _ self selection string.\\\\n\\\\tself replaceSelectionWith: (Text string: aString reversed emphasis: emphasisHere).\\\\n\\\\tself selectAt: currentSelection + 1.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'sw 11/2/1998 15:50'!\\\\ntempCommand: characterStream \\\\n\\\\t\\\\\\\"Experimental.  Triggered by Cmd-t; put trial cmd-key commands here to see how they work, before hanging them on their own cmd accelerators.\\\\\\\"\\\\n\\\\tSensor keyboard.\\\\n\\\\tself experimentalCommand.\\\\n\\\\t^ true\\\\n\\\\n\\\\t\\\\\\\"sensor keyboard.\\\\n\\\\tself spawnWorkspace.\\\\n\\\\t^ true\\\\\\\"! !\\\\n\\\\n!ParagraphEditor methodsFor: 'editing keys'!\\\\nundo: characterStream \\\\n\\\\t\\\\\\\"Undo the last edit.  Keeps typeahead, so undo twice is a full redo.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard. \\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself undo.\\\\n\\\\t^true! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'explain' stamp: 'nk 6/26/2003 22:02'!\\\\nexplainAnySel: symbol \\\\n\\\\t\\\\\\\"Is this any message selector?\\\\\\\"\\\\n\\\\n\\\\t| list reply |\\\\n\\\\tlist _ self systemNavigation allClassesImplementing: symbol.\\\\n\\\\tlist size = 0 ifTrue: [^nil].\\\\n\\\\tlist size < 12\\\\n\\\\t\\\\tifTrue: [reply _ ' is a message selector which is defined in these classes ' , list printString]\\\\n\\\\t\\\\tifFalse: [reply _ ' is a message selector which is defined in many classes'].\\\\n\\\\t^'\\\\\\\"' , symbol , reply , '.\\\\\\\"' , '\\\\\\\\' withCRs, 'SystemNavigation new browseAllImplementorsOf: #' , symbol! !\\\\n\\\\n!ParagraphEditor methodsFor: 'explain' stamp: 'di 1/30/2002 21:09'!\\\\nexplainChar: string\\\\n\\\\t\\\\\\\"Does string start with a special character?\\\\\\\"\\\\n\\\\n\\\\t| char |\\\\n\\\\tchar _ string at: 1.\\\\n\\\\tchar = $. ifTrue: [^'\\\\\\\"Period marks the end of a Smalltalk statement.  A period in the middle of a number means a decimal point.  (The number is an instance of class Float).\\\\\\\"'].\\\\n\\\\tchar = $' ifTrue: [^'\\\\\\\"The characters between two single quotes are made into an instance of class String\\\\\\\"'].\\\\n\\\\tchar = $\\\\\\\" ifTrue: [^'\\\\\\\"Double quotes enclose a comment.  Smalltalk ignores everything between double quotes.\\\\\\\"'].\\\\n\\\\tchar = $# ifTrue: [^'\\\\\\\"The characters following a hash mark are made into an instance of class Symbol.  If parenthesis follow a hash mark, an instance of class Array is made.  It contains literal constants.\\\\\\\"'].\\\\n\\\\t(char = $( or: [char = $)]) ifTrue: [^'\\\\\\\"Expressions enclosed in parenthesis are evaluated first\\\\\\\"'].\\\\n\\\\t(char = $[ or: [char = $]]) ifTrue: [^'\\\\\\\"The code inside square brackets is an unevaluated block of code.  It becomes an instance of BlockContext and is usually passed as an argument.\\\\\\\"'].\\\\n\\\\t(char = ${ or: [char = $}]) ifTrue: [^ '\\\\\\\"A sequence of expressions separated by periods, when enclosed in curly braces, are evaluated to yield the elements of a new Array\\\\\\\"'].\\\\n\\\\t(char = $< or: [char = $>]) ifTrue: [^'\\\\\\\"<primitive: xx> means that this method is usually preformed directly by the virtual machine.  If this method is primitive, its Smalltalk code is executed only when the primitive fails.\\\\\\\"'].\\\\n\\\\tchar = $^ ifTrue: [^'\\\\\\\"Uparrow means return from this method.  The value returned is the expression following the ^\\\\\\\"'].\\\\n\\\\tchar = $| ifTrue: [^'\\\\\\\"Vertical bars enclose the names of the temporary variables used in this method.  In a block, the vertical bar separates the argument names from the rest of the code.\\\\\\\"'].\\\\n\\\\tchar = $_ ifTrue: [^'\\\\\\\"Left arrow means assignment.  The value of the expression after the left arrow is stored into the variable before it.\\\\\\\"'].\\\\n\\\\tchar = $; ifTrue: [^'\\\\\\\"Semicolon means cascading.  The message after the semicolon is sent to the same object which received the message before the semicolon.\\\\\\\"'].\\\\n\\\\tchar = $: ifTrue: [^'\\\\\\\"A colon at the end of a keyword means that an argument is expected to follow.  Methods which take more than one argument have selectors with more than one keyword.  (One keyword, ending with a colon, appears before each argument).', '\\\\\\\\\\\\\\\\' withCRs, 'A colon before a variable name just inside a block means that the block takes an agrument.  (When the block is evaluated, the argument will be assigned to the variable whose name appears after the colon).\\\\\\\"'].\\\\n\\\\tchar = $$ ifTrue: [^'\\\\\\\"The single character following a dollar sign is made into an instance of class Character\\\\\\\"'].\\\\n\\\\tchar = $- ifTrue: [^'\\\\\\\"A minus sign in front of a number means a negative number.\\\\\\\"'].\\\\n\\\\tchar = $e ifTrue: [^'\\\\\\\"An e in the middle of a number means that the exponent follows.\\\\\\\"'].\\\\n\\\\tchar = $r ifTrue: [^'\\\\\\\"An r in the middle of a bunch of digits is an instance of Integer expressed in a certain radix.  The digits before the r denote the base and the digits after it express a number in that base.\\\\\\\"'].\\\\n\\\\tchar = Character space ifTrue: [^'\\\\\\\"the space Character\\\\\\\"'].\\\\n\\\\tchar = Character tab ifTrue: [^'\\\\\\\"the tab Character\\\\\\\"'].\\\\n\\\\tchar = Character cr ifTrue: [^'\\\\\\\"the carriage return Character\\\\\\\"'].\\\\n\\\\t^nil! !\\\\n\\\\n!ParagraphEditor methodsFor: 'explain' stamp: 'nk 6/10/2004 07:02'!\\\\nexplainClass: symbol \\\\n\\\\t\\\\\\\"Is symbol a class variable or a pool variable?\\\\\\\"\\\\n\\\\t| class reply classes |\\\\n\\\\t(model respondsTo: #selectedClassOrMetaClass)\\\\n\\\\t\\\\tifFalse: [^ nil].\\\\n\\\\t(class _ model selectedClassOrMetaClass) ifNil: [^ nil].\\\\n\\\\t\\\\\\\"no class is selected\\\\\\\"\\\\n\\\\t(class isKindOf: Metaclass)\\\\n\\\\t\\\\tifTrue: [class _ class soleInstance].\\\\n\\\\tclasses _ (Array with: class)\\\\n\\\\t\\\\t\\\\t\\\\t, class allSuperclasses.\\\\n\\\\t\\\\\\\"class variables\\\\\\\"\\\\n\\\\treply _ classes detect: [:each | (each classVarNames detect: [:name | symbol = name]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifNone: [])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t~~ nil]\\\\n\\\\t\\\\t\\\\t\\\\tifNone: [].\\\\n\\\\treply == nil ifFalse: [^ '\\\\\\\"is a class variable, defined in class ' , reply printString , '\\\\\\\"\\\\\\\\' withCRs , 'SystemNavigation new browseAllCallsOn: (' , reply printString , ' classPool associationAt: #' , symbol , ').'].\\\\n\\\\t\\\\\\\"pool variables\\\\\\\"\\\\n\\\\tclasses do: [:each | (each sharedPools\\\\n\\\\t\\\\t\\\\tdetect: [:pool | (pool includesKey: symbol)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[reply _ pool.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttrue]]\\\\n\\\\t\\\\t\\\\tifNone: [])\\\\n\\\\t\\\\t\\\\t~~ nil].\\\\n\\\\treply\\\\n\\\\t\\\\tifNil: [(Undeclared includesKey: symbol)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [^ '\\\\\\\"is an undeclared variable.' , '\\\\\\\"\\\\\\\\' withCRs , 'SystemNavigation new browseAllCallsOn: (Undeclared associationAt: #' , symbol , ').']]\\\\n\\\\t\\\\tifNotNil: \\\\n\\\\t\\\\t\\\\t[classes _ WriteStream on: Array new.\\\\n\\\\t\\\\t\\\\tself systemNavigation\\\\n\\\\t\\\\t\\\\t\\\\tallBehaviorsDo: [:each | (each sharedPools\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdetect: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:pool | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tpool == reply]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifNone: [])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t~~ nil ifTrue: [classes nextPut: each]].\\\\n\\\\t\\\\t\\\\t\\\\\\\"Perhaps not print whole list of classes if too long. (unlikely)\\\\\\\"\\\\n\\\\t\\\\t\\\\t^ '\\\\\\\"is a pool variable from the pool ' , (Smalltalk keyAtIdentityValue: reply) asString , ', which is used by the following classes ' , classes contents printString , '\\\\\\\"\\\\\\\\' withCRs , 'SystemNavigation new browseAllCallsOn: (' , (Smalltalk keyAtIdentityValue: reply) asString , ' bindingOf: #' , symbol , ').'].\\\\n\\\\t^ nil! !\\\\n\\\\n!ParagraphEditor methodsFor: 'explain' stamp: 'sw 5/3/1998 14:32'!\\\\nexplainCtxt: symbol \\\\n\\\\t\\\\\\\"Is symbol a context variable?\\\\\\\"\\\\n\\\\n\\\\t| reply classes text cls |\\\\n\\\\tsymbol = #nil ifTrue: [reply _ '\\\\\\\"is a constant.  It is the only instance of class UndefinedObject.  nil is the initial value of all variables.\\\\\\\"'].\\\\n\\\\tsymbol = #true ifTrue: [reply _ '\\\\\\\"is a constant.  It is the only instance of class True and is the receiver of many control messages.\\\\\\\"'].\\\\n\\\\tsymbol = #false ifTrue: [reply _ '\\\\\\\"is a constant.  It is the only instance of class False and is the receiver of many control messages.\\\\\\\"'].\\\\n\\\\tsymbol = #thisContext ifTrue: [reply _ '\\\\\\\"is a context variable.  Its value is always the MethodContext which is executing this method.\\\\\\\"'].\\\\n\\\\t(model respondsTo: #selectedClassOrMetaClass) ifTrue: [\\\\n\\\\t\\\\tcls _ model selectedClassOrMetaClass].\\\\n\\\\tcls ifNil: [^ reply].\\\\t  \\\\\\\"no class known\\\\\\\"\\\\n\\\\tsymbol = #self ifTrue: \\\\n\\\\t\\\\t\\\\t[classes _ cls withAllSubclasses.\\\\n\\\\t\\\\t\\\\tclasses size > 12\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [text _ cls printString , ' or a subclass']\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[classes _ classes printString.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttext _ 'one of these classes' , (classes copyFrom: 4 to: classes size)].\\\\n\\\\t\\\\t\\\\treply _ '\\\\\\\"is the receiver of this message; an instance of ' , text , '\\\\\\\"'].\\\\n\\\\tsymbol = #super ifTrue: [reply _ '\\\\\\\"is just like self.  Messages to super are looked up in the superclass (' , cls superclass printString , ')\\\\\\\"'].\\\\n\\\\t^reply! !\\\\n\\\\n!ParagraphEditor methodsFor: 'explain' stamp: 'tpr 5/29/2003 20:07'!\\\\nexplainGlobal: symbol \\\\n\\\\t\\\\\\\"Is symbol a global variable?\\\\\\\"\\\\n\\\\t| reply classes |\\\\n\\\\treply _ Smalltalk at: symbol ifAbsent: [^nil].\\\\n\\\\t(reply class == Dictionary or:[reply isKindOf: SharedPool class])\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[classes _ Set new.\\\\n\\\\t\\\\t\\\\tself systemNavigation allBehaviorsDo: [:each | (each sharedPools detect: [:pool | pool == reply]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifNone: [])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t~~ nil ifTrue: [classes add: each]].\\\\n\\\\t\\\\t\\\\tclasses _ classes printString.\\\\n\\\\t\\\\t\\\\t^'\\\\\\\"is a global variable.  It is a pool which is used by the following classes ' , (classes allButFirst: 5) , '\\\\\\\"'].\\\\n\\\\t(reply isKindOf: Behavior)\\\\n\\\\t\\\\tifTrue: [^'\\\\\\\"is a global variable.  ' , symbol , ' is a class in category ', reply category,\\\\n\\\\t\\\\t\\\\t'.\\\\\\\"', '\\\\\\\\' withCRs, 'Browser newOnClass: ' , symbol , '.'].\\\\n\\\\tsymbol == #Smalltalk ifTrue: [^'\\\\\\\"is a global.  Smalltalk is the only instance of SystemDictionary and holds all global variables.\\\\\\\"'].\\\\n\\\\t^'\\\\\\\"is a global variable.  ' , symbol , ' is ' , reply printString , '\\\\\\\"'! !\\\\n\\\\n!ParagraphEditor methodsFor: 'explain' stamp: 'tpr 5/12/2004 16:22'!\\\\nexplainInst: string \\\\n\\\\t\\\\\\\"Is string an instance variable of this class?\\\\\\\"\\\\n\\\\t| classes cls |\\\\n\\\\n\\\\t(model respondsTo: #selectedClassOrMetaClass) ifTrue: [\\\\n\\\\t\\\\tcls _ model selectedClassOrMetaClass].\\\\n\\\\tcls ifNil: [^ nil].\\\\t  \\\\\\\"no class known\\\\\\\"\\\\n\\\\tclasses _ (Array with: cls)\\\\n\\\\t\\\\t\\\\t\\\\t, cls allSuperclasses.\\\\n\\\\tclasses _ classes detect: [:each | (each instVarNames\\\\n\\\\t\\\\t\\\\tdetect: [:name | name = string] ifNone: [])\\\\n\\\\t\\\\t\\\\t~~ nil] ifNone: [^nil].\\\\n\\\\tclasses _ classes printString.\\\\n\\\\t^ '\\\\\\\"is an instance variable of the receiver; defined in class ' , classes , \\\\n\\\\t\\\\t'\\\\\\\"\\\\\\\\' withCRs , classes , ' systemNavigation browseAllAccessesTo: ''' , string , ''' from: ', classes, '.'! !\\\\n\\\\n!ParagraphEditor methodsFor: 'explain' stamp: 'nb 5/6/2003 16:54'!\\\\nexplainMySel: symbol \\\\n\\\\t\\\\\\\"Is symbol the selector of this method?  Is it sent by this method?  If \\\\n\\\\tnot, then expalin will call (explainPartSel:) to see if it is a fragment of a \\\\n\\\\tselector sent here.  If not, explain will call (explainAnySel:) to catch any \\\\n\\\\tselector. \\\\\\\"\\\\n\\\\n\\\\t| lits classes msg |\\\\n\\\\t(model respondsTo: #selectedMessageName) ifFalse: [^ nil].\\\\n\\\\t(msg _ model selectedMessageName) ifNil: [^nil].\\\\t\\\\\\\"not in a message\\\\\\\"\\\\n\\\\tclasses _ self systemNavigation allClassesImplementing: symbol.\\\\n\\\\tclasses size > 12\\\\n\\\\t\\\\tifTrue: [classes _ 'many classes']\\\\n\\\\t\\\\tifFalse: [classes _ 'these classes ' , classes printString].\\\\n\\\\tmsg = symbol\\\\n\\\\t\\\\tifTrue: [^ '\\\\\\\"' , symbol , ' is the selector of this very method!!  It is defined in ',\\\\n\\\\t\\\\t\\\\tclasses , '.  To see the other definitions, go to the message list pane, get the menu from the top of the scroll bar, and select ''implementors of...''.\\\\\\\"']\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[lits _ (model selectedClassOrMetaClass compiledMethodAt:\\\\n\\\\t\\\\t\\\\t\\\\tmsg) messages.\\\\n\\\\t\\\\t\\\\t(lits detect: [:each | each == symbol]\\\\n\\\\t\\\\t\\\\t\\\\tifNone: [])\\\\n\\\\t\\\\t\\\\t\\\\t== nil ifTrue: [^nil].\\\\n\\\\t\\\\t\\\\t^ '\\\\\\\"' , symbol , ' is a message selector which is defined in ', classes , '.  To see the definitions, go to the message list pane, get the menu from the top of the scroll bar, and select ''implementors of...''.\\\\\\\"'].! !\\\\n\\\\n!ParagraphEditor methodsFor: 'explain' stamp: 'apb 1/5/2000 16:56'!\\\\nexplainNumber: string \\\\n\\\\t\\\\\\\"Is string a Number?\\\\\\\"\\\\n\\\\n\\\\t| strm c |\\\\n\\\\t(c _ string at: 1) isDigit ifFalse: [(c = $- and: [string size > 1 and: [(string at: 2) isDigit]])\\\\n\\\\t\\\\t\\\\tifFalse: [^nil]].\\\\n\\\\tstrm _ ReadStream on: string.\\\\n\\\\tc _ Number readFrom: strm.\\\\n\\\\tstrm atEnd ifFalse: [^nil].\\\\n\\\\tc printString = string\\\\n\\\\t\\\\tifTrue: [^'\\\\\\\"' , string , ' is a ' , c class name , '\\\\\\\"']\\\\n\\\\t\\\\tifFalse: [^'\\\\\\\"' , string , ' (= ' , c printString , ') is a ' , c class name , '\\\\\\\"']! !\\\\n\\\\n!ParagraphEditor methodsFor: 'explain' stamp: 'nb 5/6/2003 16:54'!\\\\nexplainPartSel: string \\\\n\\\\t\\\\\\\"Is this a fragment of a multiple-argument selector sent in this method?\\\\\\\"\\\\n\\\\t| lits whole reply classes s msg |\\\\n\\\\n\\\\t(model respondsTo: #selectedMessageName) ifFalse: [^ nil].\\\\n\\\\t(msg _ model selectedMessageName) ifNil: [^ nil].  \\\\\\\"not in a message\\\\\\\"\\\\n\\\\tstring last == $: ifFalse: [^ nil].\\\\n\\\\t\\\\\\\"Name of this method\\\\\\\"\\\\n\\\\tlits _ Array with: msg.\\\\n\\\\t(whole _ lits detect: [:each | (each keywords detect: [:frag | frag = string]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifNone: []) ~~ nil]\\\\n\\\\t\\\\t\\\\t\\\\tifNone: []) ~~ nil\\\\n\\\\t\\\\tifTrue: [reply _ ', which is the selector of this very method!!'.\\\\n\\\\t\\\\t\\\\ts _ '.  To see the other definitions, go to the message list pane, get the menu from the top of the scroll bar, and select ''implementors of...''.\\\\\\\"']\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"Selectors called from this method\\\\\\\"\\\\n\\\\t\\\\t\\\\tlits _ (model selectedClassOrMetaClass compiledMethodAt:\\\\n\\\\t\\\\t\\\\t\\\\tmsg) messages.\\\\n\\\\t\\\\t\\\\t(whole _ lits detect: [:each | (each keywords detect: [:frag | frag = string]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifNone: []) ~~ nil]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifNone: []) ~~ nil\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [string = 'primitive:'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [^self explainChar: '<']\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [^nil]].\\\\n\\\\t\\\\t\\\\treply _ '.'.\\\\n\\\\t\\\\t\\\\ts _ '.  To see the definitions, go to the message list pane, get the menu from the top of the scroll bar, and select ''implementors of...''.\\\\\\\"'].\\\\n\\\\tclasses _ self systemNavigation allClassesImplementing: whole.\\\\n\\\\tclasses size > 12\\\\n\\\\t\\\\tifTrue: [classes _ 'many classes']\\\\n\\\\t\\\\tifFalse: [classes _ 'these classes ' , classes printString].\\\\n\\\\t^ '\\\\\\\"' , string , ' is one part of the message selector ' , whole, reply , '  It is defined in ' , classes , s! !\\\\n\\\\n!ParagraphEditor methodsFor: 'explain'!\\\\nexplainScan: string \\\\n\\\\t\\\\\\\"Remove beginning and trailing space, tab, cr.\\\\n\\\\t 1/15/96 sw: copied intact from BrowserCodeController\\\\\\\"\\\\n\\\\n\\\\t| c beg end |\\\\n\\\\tbeg _ 1.\\\\n\\\\tend _ string size.\\\\n\\\\t\\\\n\\\\t[beg = end ifTrue: [^string copyFrom: 1 to: 1].\\\\n\\\\t\\\\\\\"if all blank, tell about the first\\\\\\\"\\\\n\\\\tc _ string at: beg.\\\\n\\\\tc = Character space or: [c = Character tab or: [c = Character cr]]]\\\\n\\\\t\\\\twhileTrue: [beg _ beg + 1].\\\\n\\\\t\\\\n\\\\t[c _ string at: end.\\\\n\\\\tc = Character space or: [c = Character tab or: [c = Character cr]]]\\\\n\\\\t\\\\twhileTrue: [end _ end - 1].\\\\n\\\\t^string copyFrom: beg to: end\\\\t\\\\\\\"Return purely visible characters\\\\\\\"! !\\\\n\\\\n!ParagraphEditor methodsFor: 'explain' stamp: 'tk 4/1/98 14:19'!\\\\nexplainTemp: string \\\\n\\\\t\\\\\\\"Is string the name of a temporary variable (or block argument variable)?\\\\\\\"\\\\n\\\\n\\\\t| selectedClass tempNames i reply methodNode method msg |\\\\n\\\\t(model respondsTo: #selectedMessageName) ifFalse: [^ nil].\\\\n\\\\t(msg _ model selectedMessageName) ifNil: [^nil].\\\\t\\\\\\\"not in a message\\\\\\\"\\\\n\\\\tselectedClass _ model selectedClassOrMetaClass.\\\\n\\\\ttempNames _ selectedClass parserClass new \\\\n\\\\t\\\\t\\\\tparseArgsAndTemps: model selectedMessage notifying: nil.\\\\n\\\\tmethod _ selectedClass compiledMethodAt: msg.\\\\n\\\\t(i _ tempNames findFirst: [:each | each = string]) = 0 ifTrue: [\\\\n\\\\t\\\\t(method numTemps > tempNames size)\\\\n\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t[\\\\\\\"It must be an undeclared block argument temporary\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tmethodNode _ selectedClass compilerClass new\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tparse: model selectedMessage\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tin: selectedClass\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnotifying: nil.\\\\n\\\\t\\\\t\\\\t\\\\ttempNames _ methodNode tempNames]\\\\n\\\\t\\\\t\\\\tifFalse: [^nil]].\\\\n\\\\t(i _ tempNames findFirst: [:each | each = string]) > 0 ifTrue: [i > method numArgs\\\\n\\\\t\\\\t\\\\tifTrue: [reply _ '\\\\\\\"is a temporary variable in this method\\\\\\\"']\\\\n\\\\t\\\\t\\\\tifFalse: [reply _ '\\\\\\\"is an argument to this method\\\\\\\"']].\\\\n\\\\t^reply! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'initialize-release'!\\\\nchangeParagraph: aParagraph \\\\n\\\\t\\\\\\\"Install aParagraph as the one to be edited by the receiver.\\\\\\\"\\\\n\\\\n\\\\tUndoParagraph == paragraph ifTrue: [UndoParagraph _ nil].\\\\n\\\\tparagraph _ aParagraph.\\\\n\\\\tself resetState! !\\\\n\\\\n!ParagraphEditor methodsFor: 'initialize-release' stamp: 'th 10/21/2003 15:49'!\\\\nresetState \\\\n\\\\t\\\\\\\"Establish the initial conditions for editing the paragraph: place caret \\\\n\\\\tbefore first character, set the emphasis to that of the first character,\\\\n\\\\tand save the paragraph for purposes of canceling.\\\\\\\"\\\\n\\\\n\\\\tstopBlock _ paragraph defaultCharacterBlock.\\\\n\\\\tself pointBlock: stopBlock copy.\\\\n\\\\tbeginTypeInBlock _ nil.\\\\n\\\\tUndoInterval _ otherInterval _ 1 to: 0.\\\\n\\\\tself setEmphasisHere.\\\\n\\\\tselectionShowing _ false.\\\\n\\\\tinitialText _ paragraph text copy! !\\\\n\\\\n!ParagraphEditor methodsFor: 'initialize-release' stamp: 'di 5/15/2000 13:51'!\\\\nstateArray\\\\n\\\\t^ {ChangeText.\\\\n\\\\t\\\\tFindText.\\\\n\\\\t\\\\tUndoInterval.\\\\n\\\\t\\\\tUndoMessage.\\\\n\\\\t\\\\tUndoParagraph.\\\\n\\\\t\\\\tUndoSelection.\\\\n\\\\t\\\\tUndone.\\\\n\\\\t\\\\tself selectionInterval.\\\\n\\\\t\\\\tself startOfTyping.\\\\n\\\\t\\\\temphasisHere}! !\\\\n\\\\n!ParagraphEditor methodsFor: 'initialize-release' stamp: 'di 10/5/1998 17:03'!\\\\nstateArrayPut: stateArray\\\\n\\\\t| sel |\\\\n\\\\tChangeText _ stateArray at: 1.\\\\n\\\\tFindText _ stateArray at: 2.\\\\n\\\\tUndoInterval _ stateArray at: 3.\\\\n\\\\tUndoMessage _ stateArray at: 4.\\\\n\\\\tUndoParagraph _ stateArray at: 5.\\\\n\\\\tUndoSelection _ stateArray at: 6.\\\\n\\\\tUndone _ stateArray at: 7.\\\\n\\\\tsel _ stateArray at: 8.\\\\n\\\\tself selectFrom: sel first to: sel last.\\\\n\\\\tbeginTypeInBlock _ stateArray at: 9.\\\\n\\\\temphasisHere _ stateArray at: 10.! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'jm 5/3/1998 19:19'!\\\\naccept\\\\n\\\\t\\\\\\\"Save the current text of the text being edited as the current acceptable version for purposes of canceling.\\\\\\\"\\\\n\\\\n\\\\tinitialText _ paragraph text copy.\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages'!\\\\nagain\\\\n\\\\t\\\\\\\"Text substitution. If the left shift key is down, the substitution is made \\\\n\\\\tthroughout the entire Paragraph. Otherwise, only the next possible \\\\n\\\\tsubstitution is made.\\\\n\\\\tUndoer & Redoer: #undoAgain:andReselect:typedKey:.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"If last command was also 'again', use same keys as before\\\\\\\"\\\\n\\\\tself againOrSame: (UndoMessage sends: #undoAgain:andReselect:typedKey:)! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages'!\\\\nalign\\\\n\\\\t\\\\\\\"Align text according to the next greater alignment value--cycling among \\\\n\\\\tleft flush, right flush, center, justified.  No effect on the undoability of the pre\\\\n\\\\tpreceding command.\\\\\\\"\\\\n\\\\n\\\\tparagraph toggleAlignment.\\\\n\\\\tparagraph displayOn: Display.\\\\n\\\\tself recomputeInterval! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'md 8/2/2005 20:53'!\\\\nbrowseClassFromIt\\\\n\\\\t\\\\\\\"Launch a browser for the class indicated by the current selection. \\\\n\\\\tIf multiple classes matching the selection exist, let the user choose among them.\\\\\\\"\\\\n\\\\t| aBrow aClass |\\\\n\\\\tself\\\\n\\\\t\\\\tlineSelectAndEmptyCheck: [^ self].\\\\n\\\\taClass := Utilities\\\\n\\\\t\\\\t\\\\t\\\\tclassFromPattern: (self selection string copyWithout: Character cr)\\\\n\\\\t\\\\t\\\\t\\\\twithCaption: 'choose a class to browse...'.\\\\n\\\\taClass\\\\n\\\\t\\\\tifNil: [^ view flash].\\\\n\\\\tself\\\\n\\\\t\\\\tterminateAndInitializeAround: \\\\n\\\\t\\\\t\\\\t[aBrow := SystemBrowser default new.\\\\n\\\\t\\\\t\\\\taBrow setClass: aClass selector: nil.\\\\n\\\\t\\\\t\\\\taBrow class\\\\n\\\\t\\\\t\\\\t\\\\topenBrowserView: (aBrow openEditString: nil) label: 'System Browser'].! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'pmm 7/6/2006 20:50'!\\\\nbrowseIt\\\\n\\\\t\\\\\\\"Launch a browser for the current selection, if appropriate\\\\\\\"\\\\n\\\\n\\\\t| aSymbol anEntry |\\\\n\\\\tself flag: #yoCharCases.\\\\n\\\\n\\\\tPreferences alternativeBrowseIt ifTrue: [^ self browseClassFromIt].\\\\n\\\\n\\\\tself lineSelectAndEmptyCheck: [^ self].\\\\n\\\\t(aSymbol _ self selectedSymbol) isNil ifTrue: [^ view flash].\\\\n\\\\n\\\\tself terminateAndInitializeAround:\\\\n\\\\t\\\\t[aSymbol first isUppercase\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[anEntry _ (Smalltalk\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tat: aSymbol\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifAbsent:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[ self systemNavigation browseAllImplementorsOf: aSymbol.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^ nil]).\\\\n\\\\t\\\\t\\\\t\\\\tanEntry isNil ifTrue: [^ view flash].\\\\n\\\\t\\\\t\\\\t\\\\t(anEntry isBehavior or: [ anEntry isTrait ])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [ anEntry := anEntry class ].\\\\n\\\\t\\\\t\\\\t\\\\tToolSet browse: anEntry selector: nil.\\\\n\\\\t\\\\t] ifFalse:[ self systemNavigation browseAllImplementorsOf: aSymbol]]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'sw 1/15/98 12:57'!\\\\ncancel \\\\n\\\\t\\\\\\\"Restore the text of the paragraph to be the text saved since initialization \\\\n\\\\tor the last accept.  Undoer & Redoer: undoAndReselect:redoAndReselect:.\\\\n\\\\tThis used to call controlTerminate and controlInitialize but this seemed illogical.\\\\n\\\\tSure enough, nobody overrode them who had cancel in the menu, and if\\\\n\\\\tanybody really cared they could override cancel.\\\\\\\"\\\\n\\\\n\\\\tUndoSelection _ paragraph text.\\\\n\\\\tself undoer: #undoAndReselect:redoAndReselect: with: self selectionInterval with: (1 to: 0).\\\\n\\\\tview ifNotNil: [view clearInside].\\\\n\\\\tself changeParagraph: (paragraph text: initialText).\\\\n\\\\tUndoParagraph _ paragraph.\\\\n\\\\totherInterval _ UndoInterval _ 1 to: initialText size. \\\\\\\"so undo will replace all\\\\\\\"\\\\n\\\\tparagraph displayOn: Display.\\\\n\\\\tself selectAt: 1.\\\\n\\\\tself scrollToTop\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'yo 2/17/2005 17:53'!\\\\nchangeAlignment\\\\n\\\\t| aList reply  |\\\\n\\\\taList _ #(leftFlush centered justified rightFlush).\\\\n\\\\treply _ (SelectionMenu labelList: (aList collect: [:t | t translated]) selections: aList) startUp.\\\\n\\\\treply ifNil:[^self].\\\\n\\\\tself setAlignment: reply.\\\\n\\\\tparagraph composeAll.\\\\n\\\\tself recomputeSelection.\\\\n\\\\tself mvcRedisplay.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'yo 3/14/2005 13:03'!\\\\nchangeEmphasis\\\\n\\\\t| aList reply  |\\\\n\\\\taList _ #(normal bold italic narrow underlined struckOut).\\\\n\\\\treply _ (SelectionMenu labelList: (aList collect: [:t | t translated]) selections: aList) startUp.\\\\n\\\\treply ~~ nil ifTrue:\\\\n\\\\t\\\\t[self setEmphasis: reply.\\\\n\\\\t\\\\tparagraph composeAll.\\\\n\\\\t\\\\tself recomputeSelection.\\\\n\\\\t\\\\tself mvcRedisplay].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'fc 2/19/2004 22:09'!\\\\nchangeEmphasisOrAlignment\\\\n\\\\t| aList reply  |\\\\n\\\\taList _ #(normal bold italic narrow underlined struckOut leftFlush centered rightFlush justified).\\\\n\\\\treply _ (SelectionMenu labelList: aList lines: #(6) selections: aList) startUp.\\\\n\\\\treply ~~ nil ifTrue:\\\\n\\\\t\\\\t[(#(leftFlush centered rightFlush justified) includes: reply)\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[paragraph perform: reply.\\\\n\\\\t\\\\t\\\\t\\\\tself recomputeInterval]\\\\n\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[self setEmphasis: reply.\\\\n\\\\t\\\\t\\\\t\\\\tparagraph composeAll.\\\\n\\\\t\\\\t\\\\t\\\\tself recomputeSelection.\\\\n\\\\t\\\\t\\\\t\\\\tself mvcRedisplay]].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'md 10/22/2003 15:27'!\\\\nchangeStyle\\\\n\\\\t\\\\\\\"Let user change styles for the current text pane  \\\\n\\\\t Moved from experimentalCommand to its own method  \\\\\\\"\\\\n\\\\n\\\\t| aList reply style |\\\\n\\\\taList _ StrikeFont actualFamilyNames.\\\\n\\\\taList addFirst: 'DefaultTextStyle'.\\\\n\\\\treply _ (SelectionMenu labelList: aList lines: #(1) selections: aList) startUp.\\\\n\\\\treply ifNotNil:\\\\n\\\\t\\\\t[(style _ TextStyle named: reply) ifNil: [Beeper beep. ^ true].\\\\n\\\\t\\\\tparagraph textStyle: style copy.\\\\n\\\\t\\\\tparagraph composeAll.\\\\n\\\\t\\\\tself recomputeSelection.\\\\n\\\\t\\\\tself mvcRedisplay].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'RAA 3/15/2001 12:10'!\\\\nchangeStyleTo: aNewStyle\\\\n\\\\n\\\\tparagraph textStyle: aNewStyle.\\\\n\\\\tparagraph composeAll.\\\\n\\\\tself recomputeSelection.\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'sw 9/27/1999 11:54'!\\\\nchooseAlignment\\\\n\\\\tself changeAlignment! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'sd 4/15/2003 22:40'!\\\\nclassCommentsContainingIt\\\\n\\\\t\\\\\\\"Open a browser class comments which contain the current selection somewhere in them.\\\\\\\"\\\\n\\\\n\\\\tself lineSelectAndEmptyCheck: [^ self].\\\\n\\\\tself terminateAndInitializeAround: [\\\\n\\\\t\\\\tself systemNavigation browseClassCommentsWithString: self selection string]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'dvf 8/23/2003 11:51'!\\\\nclassNamesContainingIt\\\\n\\\\t\\\\\\\"Open a browser on classes whose names contain the selected string\\\\\\\"\\\\n\\\\n\\\\tself lineSelectAndEmptyCheck: [^self].\\\\n\\\\tself systemNavigation \\\\n\\\\t\\\\tbrowseClassesWithNamesContaining: self selection string\\\\n\\\\t\\\\tcaseSensitive: Sensor leftShiftDown! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'ar 1/15/2001 18:37'!\\\\nclipboardText\\\\n\\\\n\\\\t^ Clipboard clipboardText! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'ar 1/15/2001 18:38'!\\\\nclipboardText: text\\\\n\\\\n\\\\t^ Clipboard clipboardText: text! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'ar 1/15/2001 18:38'!\\\\nclipboardTextPut: text\\\\n\\\\n\\\\t^ Clipboard clipboardText: text! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'di 11/23/1998 15:21'!\\\\ncompareToClipboard\\\\n\\\\t\\\\\\\"Check to see if whether the receiver's text is the same as the text currently on the clipboard, and inform the user.\\\\\\\"\\\\n\\\\t| s1 s2 |\\\\n\\\\ts1 _ self clipboardText string.\\\\n\\\\ts2 _ paragraph text string.\\\\n\\\\ts1 = s2 ifTrue: [^ self inform: 'Exact match'].\\\\n\\\\n\\\\t(StringHolder new textContents:\\\\n\\\\t\\\\t(TextDiffBuilder buildDisplayPatchFrom: s1 to: s2))\\\\n\\\\t\\\\topenLabel: 'Comparison to Clipboard Text'! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'sw 8/1/97 15:09'!\\\\ncopySelection\\\\n\\\\t\\\\\\\"Copy the current selection and store it in the paste buffer, unless a caret.  Undoer & Redoer: undoCutCopy\\\\\\\"\\\\n\\\\n\\\\tself lineSelectAndEmptyCheck: [^ self].\\\\n\\\\n\\\\t\\\\\\\"Simulate 'substitute: self selection' without locking the controller\\\\\\\"\\\\n\\\\tUndoSelection _ self selection.\\\\n\\\\tself undoer: #undoCutCopy: with: self clipboardText.\\\\n\\\\tUndoInterval _ self selectionInterval.\\\\n\\\\tself clipboardTextPut: UndoSelection! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'sw 8/1/97 16:33'!\\\\ncut\\\\n\\\\t\\\\\\\"Cut out the current selection and redisplay the paragraph if necessary.  Undoer & Redoer: undoCutCopy:\\\\\\\"\\\\n\\\\n\\\\tself lineSelectAndEmptyCheck: [^ self].\\\\n\\\\n\\\\tself replaceSelectionWith: self nullText. \\\\n\\\\tself undoer: #undoCutCopy: with: self clipboardText.\\\\n\\\\tself clipboardTextPut: UndoSelection! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages'!\\\\nexchange\\\\n\\\\t\\\\\\\"See comment in exchangeWith:\\\\\\\"\\\\n\\\\n\\\\tself exchangeWith: otherInterval! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'sma 5/28/2000 09:34'!\\\\nexperimentalCommand\\\\n\\\\t\\\\\\\"Use for experimental command-key implementation.  Using this, \\\\n\\\\tyou can try things out without forever needing to reinitialize the \\\\n\\\\tParagraphEditor.\\\\\\\"\\\\n\\\\n\\\\tself prettyPrint.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'ls 10/10/1999\\\\n11:36'!\\\\nexplain\\\\n\\\\t\\\\\\\"Try to shed some light on what kind of entity the current selection\\\\nis. \\\\n\\\\tThe selection must be a single token or construct. Insert the answer\\\\nafter \\\\n\\\\tthe selection. Send private messages whose names begin with 'explain' \\\\n\\\\tthat return a string if they recognize the selection, else nil.\\\\\\\"\\\\n\\\\n\\\\t| string tiVars cgVars selectors delimitors numbers sorry reply symbol\\\\n|\\\\nCursor execute showWhile: \\\\n\\\\t\\\\t\\\\t[sorry _ '\\\\\\\"Sorry, I can''t explain that.  Please select a single\\\\ntoken, construct, or special character.'.\\\\n\\\\t\\\\t\\\\tsorry _ sorry , (view canDiscardEdits\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: ['  Also, please cancel or accept.\\\\\\\"']\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: ['\\\\\\\"']).\\\\n\\\\t\\\\t\\\\t(string _ self selection asString) isEmpty\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [reply _ '']\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [string _ self explainScan: string.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Remove space, tab, cr\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Temps and Instance vars need only test strings that are all\\\\nletters\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(string detect: [:char | (char isLetter or: [char isDigit]) not]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifNone: []) ifNil: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[tiVars _ self explainTemp: string.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttiVars == nil ifTrue: [tiVars _ self explainInst: string]].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(tiVars == nil and: [model respondsTo: #explainSpecial:])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [tiVars _ model explainSpecial: string].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttiVars == nil\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [tiVars _ '']\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [tiVars _ tiVars , '\\\\\\\\' withCRs].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Context, Class, Pool, and Global vars, and Selectors need \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tonly test symbols\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(Symbol hasInterned: string ifTrue: [:s | symbol _ s])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [cgVars _ self explainCtxt: symbol.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcgVars == nil\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [cgVars _ self explainClass: symbol.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcgVars == nil ifTrue: [cgVars _ self explainGlobal: symbol]].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"See if it is a Selector (sent here or not)\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tselectors _ self explainMySel: symbol.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tselectors == nil\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[selectors _ self explainPartSel: string.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tselectors == nil ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tselectors _ self explainAnySel: symbol]]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [selectors _ self explainPartSel: string].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcgVars == nil\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [cgVars _ '']\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [cgVars _ cgVars , '\\\\\\\\' withCRs].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tselectors == nil\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [selectors _ '']\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [selectors _ selectors , '\\\\\\\\' withCRs].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstring size = 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"single special characters\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdelimitors _ self explainChar: string]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\\\\"matched delimitors\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdelimitors _ self explainDelimitor: string].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnumbers _ self explainNumber: string.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnumbers == nil ifTrue: [numbers _ ''].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdelimitors == nil ifTrue: [delimitors _ ''].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\treply _ tiVars , cgVars , selectors , delimitors , numbers].\\\\n\\\\t\\\\t\\\\treply size = 0 ifTrue: [reply _ sorry].\\\\n\\\\t\\\\t\\\\tself afterSelectionInsertAndSelect: reply]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'di 9/7/1999 08:41'!\\\\nfileItIn\\\\n\\\\t\\\\\\\"Make a Stream on the text selection and fileIn it.\\\\n\\\\t 1/24/96 sw: moved here from FileController; this function can be useful from any text window that shows stuff in chunk format\\\\\\\"\\\\n\\\\n\\\\t| selection |\\\\n\\\\tselection _ self selection.\\\\n\\\\tself terminateAndInitializeAround:\\\\n\\\\t\\\\t[(ReadWriteStream on: selection string from: 1 to: selection size) fileIn].\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'CdG 10/17/2005 20:49'!\\\\nfind\\\\n\\\\t\\\\\\\"Prompt the user for a string to search for, and search the receiver from the current selection onward for it.  1/26/96 sw\\\\\\\"\\\\n\\\\n\\\\t| reply |\\\\n\\\\treply := UIManager default request: 'Find what? ' translated initialAnswer: ''.\\\\n\\\\treply size == 0 ifTrue: [^ self].\\\\n\\\\tself setSearch: reply.\\\\n\\\\tChangeText := FindText.  \\\\\\\"Implies no replacement to againOnce: method\\\\\\\"\\\\n\\\\tself againOrSame: true\\\\n\\\\t\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages'!\\\\nfindAgain\\\\n\\\\t\\\\\\\"Find the text-to-find again.  1/24/96 sw\\\\\\\"\\\\n\\\\n\\\\tself againOrSame: true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages'!\\\\nfit\\\\n\\\\t\\\\\\\"Make the bounding rectangle of the paragraph contain all the text while \\\\n\\\\t not changing the width of the view of the paragraph.  No effect on undoability\\\\n\\\\t of the preceding command.\\\\\\\"\\\\n\\\\n\\\\tparagraph clearVisibleRectangle.\\\\n\\\\tparagraph fit.\\\\n\\\\tparagraph displayOn: Display; outline.\\\\n\\\\tself recomputeInterval! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'sd 4/16/2003 09:42'!\\\\nimplementorsOfIt\\\\n\\\\t\\\\\\\"Open an implementors browser on the selected selector\\\\\\\"\\\\n\\\\n\\\\t| aSelector |\\\\n\\\\tself lineSelectAndEmptyCheck: [^ self].\\\\n\\\\t(aSelector _ self selectedSelector) == nil ifTrue: [^ view flash].\\\\n\\\\tself terminateAndInitializeAround: [ self systemNavigation browseAllImplementorsOf: aSelector]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'th 9/19/2002 18:12'!\\\\nlineSelectAndEmptyCheck: returnBlock\\\\n\\\\t\\\\\\\"If the current selection is an insertion point, expand it to be the entire current line; if after that's done the selection is still empty, then evaluate the returnBlock, which will typically consist of '[^ self]' in the caller -- check senders of this method to understand this.\\\\\\\"\\\\n\\\\n\\\\tself selectLine.  \\\\\\\"if current selection is an insertion point, then first select the entire line in which occurs before proceeding\\\\\\\"\\\\n\\\\tself hasSelection ifFalse: [self flash.  ^ returnBlock value]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'dgd 11/25/2004 18:03'!\\\\nmakeProjectLink\\\\n\\\\t\\\\n\\\\t| attribute thisSel |\\\\n\\\\t\\\\n\\\\tthisSel := self selection.\\\\n\\\\n\\\\tattribute := TextSqkProjectLink new. \\\\n\\\\tthisSel := attribute analyze: self selection asString.\\\\n\\\\n\\\\tthisSel ifNil: [^ true].\\\\n\\\\tself replaceSelectionWith: (thisSel asText addAttribute: attribute).\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'sd 4/16/2003 19:31'!\\\\nmethodNamesContainingIt\\\\n\\\\t\\\\\\\"Open a browser on methods names containing the selected string\\\\\\\"\\\\n\\\\n\\\\tself lineSelectAndEmptyCheck: [^ self].\\\\n\\\\tCursor wait showWhile:\\\\n\\\\t\\\\t[self terminateAndInitializeAround: [self systemNavigation browseMethodsWhoseNamesContain: self selection string withBlanksTrimmed]].\\\\n\\\\tCursor normal show! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'md 9/6/2005 18:45'!\\\\nmethodSourceContainingIt\\\\n\\\\t\\\\\\\"Open a browser on methods which contain the current selection in their source (case-sensitive full-text search of source). Slow!!\\\\\\\"\\\\n\\\\n\\\\tself lineSelectAndEmptyCheck: [^ self].\\\\n\\\\tself systemNavigation browseMethodsWithSourceString: self selection string! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'sd 4/16/2003 19:28'!\\\\nmethodStringsContainingit\\\\n\\\\t\\\\\\\"Open a browser on methods which contain the current selection as part of a string constant.\\\\\\\"\\\\n\\\\n\\\\tself lineSelectAndEmptyCheck: [^ self].\\\\n\\\\tself terminateAndInitializeAround: [self systemNavigation browseMethodsWithString: self selection string]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'di 10/2/97 11:34'!\\\\nmvcRedisplay\\\\n\\\\t\\\\\\\"Overridable by subclasses that do their own display\\\\\\\"\\\\n\\\\tDisplay fill: paragraph clippingRectangle \\\\n\\\\t\\\\t\\\\tfillColor: view backgroundColor.\\\\t\\\\\\\"very brute force\\\\\\\"\\\\n\\\\tself display! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'th 9/20/2002 11:21'!\\\\npaste\\\\n\\\\t\\\\\\\"Paste the text from the shared buffer over the current selection and \\\\n\\\\tredisplay if necessary.  Undoer & Redoer: undoAndReselect.\\\\\\\"\\\\n\\\\n\\\\tself replace: self selectionInterval with: self clipboardText and:\\\\n\\\\t\\\\t[self selectAt: self pointIndex]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'ar 1/15/2001 18:36'!\\\\npasteRecent\\\\n\\\\t\\\\\\\"Paste an item chose from RecentClippings.\\\\\\\"\\\\n\\\\n\\\\t| clipping |\\\\n\\\\t(clipping _ Clipboard chooseRecentClipping) ifNil: [^ self].\\\\n\\\\tClipboard clipboardText: clipping.\\\\n\\\\t^ self paste! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages'!\\\\nperformMenuMessage: aSelector\\\\n\\\\t\\\\\\\"If a menu command is invoked, typeIn must be closed first, the selection\\\\n\\\\t must be unhighlighted before and rehighlighted after, and the marker\\\\n\\\\t must be updated.\\\\\\\"\\\\n\\\\n\\\\tself closeTypeIn.\\\\n\\\\tself deselect.\\\\n\\\\tsuper performMenuMessage: aSelector.\\\\n\\\\tself selectAndScroll.\\\\n\\\\tself updateMarker! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'rbb 2/16/2005 16:49'!\\\\npresentSpecialMenu\\\\n\\\\t\\\\\\\"Present a list of expressions, and if the user chooses one, evaluate it in the context of the receiver, a ParagraphEditor.  Primarily for debugging, this provides a convenient way to talk to the various views, controllers, and models associated with any text pane\\\\\\\"\\\\n\\\\n\\\\t| reply items |\\\\n\\\\tself terminateAndInitializeAround:\\\\n\\\\t\\\\t[reply _ (UIManager default chooseFrom: (items _ self specialMenuItems) lines: #()).\\\\n\\\\t\\\\treply = 0 ifTrue: [^ self].\\\\n\\\\t\\\\tCompiler new evaluate: (items at: reply) in: [] to: self]\\\\n\\\\t! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'sma 5/28/2000 09:40'!\\\\nprettyPrint\\\\n\\\\tself prettyPrint: false! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'md 7/13/2006 16:00'!\\\\nprettyPrint: decorated\\\\n\\\\t\\\\\\\"Reformat the contents of the receiver's view (a Browser).\\\\\\\"\\\\n\\\\n\\\\t| selectedClass newText |\\\\n\\\\tmodel selectedMessageCategoryName ifNil: [^ view flash].\\\\n\\\\tselectedClass _ model selectedClassOrMetaClass.\\\\n\\\\tnewText _ selectedClass prettyPrinterClass\\\\n\\\\t\\\\tformat: self text\\\\n\\\\t\\\\tin: selectedClass\\\\n\\\\t\\\\tnotifying: self\\\\n\\\\t\\\\tdecorated: decorated.\\\\n\\\\tnewText ifNotNil:\\\\n\\\\t\\\\t[self deselect; selectInvisiblyFrom: 1 to: paragraph text size.\\\\n\\\\t\\\\tself replaceSelectionWith: (newText asText makeSelectorBoldIn: selectedClass).\\\\n\\\\t\\\\tself selectAt: 1]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'sma 5/28/2000 09:40'!\\\\nprettyPrintWithColor\\\\n\\\\tself prettyPrint: true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'dew 3/7/2000 21:06'!\\\\nprinterSetup\\\\n\\\\t\\\\n\\\\tTextPrinter defaultTextPrinter inspect\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'sd 4/16/2003 11:47'!\\\\nreferencesToIt\\\\n\\\\t\\\\\\\"Open a references browser on the selected symbol\\\\\\\"\\\\n\\\\n\\\\t| aSymbol |\\\\n\\\\tself selectLine.\\\\n\\\\t((aSymbol _ self selectedSymbol) == nil or:\\\\n\\\\t\\\\t[(Smalltalk includesKey: aSymbol) not])\\\\n\\\\t\\\\t\\\\tifTrue: [^ view flash].\\\\n\\\\n\\\\tself terminateAndInitializeAround: [self systemNavigation browseAllCallsOn: (Smalltalk associationAt: self selectedSymbol)]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'CdG 10/17/2005 20:47'!\\\\nsaveContentsInFile\\\\n\\\\t\\\\\\\"Save the receiver's contents string to a file, prompting the user for a file-name.  Suggest a reasonable file-name.\\\\\\\"\\\\n\\\\n\\\\t| fileName stringToSave parentWindow labelToUse suggestedName lastIndex |\\\\n\\\\tstringToSave := paragraph text string.\\\\n\\\\tstringToSave size == 0 ifTrue: [^ self inform: 'nothing to save.'].\\\\n\\\\tparentWindow := self model dependents\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdetect: [:dep | dep isKindOf: SystemWindow orOf: StandardSystemView]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifNone: [nil].\\\\n\\\\tlabelToUse := parentWindow\\\\n\\\\t\\\\tifNil: \\\\t\\\\t['Untitled']\\\\n\\\\t\\\\tifNotNil: \\\\t[parentWindow label].\\\\n\\\\tsuggestedName := nil.\\\\n\\\\t#(('Decompressed contents of: '\\\\t\\\\t'.gz')) do:  \\\\\\\"can add more here...\\\\\\\"\\\\n\\\\t\\\\t[:leaderTrailer |\\\\n\\\\t\\\\t\\\\t(labelToUse beginsWith: leaderTrailer first) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[suggestedName := labelToUse copyFrom: leaderTrailer first size + 1 to: labelToUse size.\\\\n\\\\t\\\\t\\\\t\\\\t(labelToUse endsWith: leaderTrailer last)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[suggestedName := suggestedName copyFrom: 1 to: suggestedName size - leaderTrailer last size]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[lastIndex := suggestedName lastIndexOf: $. ifAbsent: [0].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(lastIndex = 0 or: [lastIndex = 1]) ifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[suggestedName := suggestedName copyFrom: 1 to: lastIndex - 1]]]].\\\\n\\\\n\\\\tsuggestedName ifNil:\\\\n\\\\t\\\\t[suggestedName := labelToUse, '.text'].\\\\n\\\\t\\\\t\\\\t\\\\n\\\\tfileName := UIManager default request: 'File name?' translated\\\\n\\\\t\\\\t\\\\tinitialAnswer: suggestedName.\\\\n\\\\tfileName isEmptyOrNil ifFalse:\\\\n\\\\t\\\\t[(FileStream newFileNamed: fileName) nextPutAll: stringToSave; close]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'bf 10/13/1999 09:09'!\\\\nselectedSelector\\\\n\\\\t\\\\\\\"Try to make a selector out of the current text selection\\\\\\\"\\\\n\\\\t^self selection string findSelector! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'yo 7/5/2004 16:38'!\\\\nselectedSymbol\\\\n\\\\t\\\\\\\"Return the currently selected symbol, or nil if none.  Spaces, tabs and returns are ignored\\\\\\\"\\\\n\\\\n\\\\t| aString |\\\\n\\\\tself hasCaret ifTrue: [^ nil].\\\\n\\\\taString _ self selection string.\\\\n\\\\taString isOctetString ifTrue: [aString _ aString asOctetString].\\\\n\\\\taString _ aString copyWithoutAll:\\\\n\\\\t\\\\t{Character space.  Character cr.  Character tab}.\\\\n\\\\taString size == 0 ifTrue: [^ nil].\\\\n\\\\tSymbol hasInterned: aString  ifTrue: [:sym | ^ sym].\\\\n\\\\n\\\\t^ nil! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'di 2/23/2001 09:26'!\\\\nselectionAsTiles\\\\n\\\\t\\\\\\\"Try to make new universal tiles from the selected text\\\\\\\"\\\\n\\\\t| selection tiles |\\\\n\\\\n\\\\tselection _ self selection.\\\\n\\\\tself terminateAndInitializeAround:\\\\n\\\\t\\\\t[self currentHand attachMorph: (tiles _ Player tilesFrom: selection).\\\\n\\\\t\\\\tPreferences tileTranslucentDrag\\\\n\\\\t\\\\t\\\\tifTrue: [tiles lookTranslucent]\\\\n\\\\t\\\\t\\\\tifFalse: [tiles align: tiles topLeft \\\\n\\\\t\\\\t\\\\t \\\\t\\\\t\\\\twith: self currentHand position + tiles cursorBaseOffset]].! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'gm 2/16/2003 20:38'!\\\\nsendContentsToPrinter\\\\n\\\\t| textToPrint printer parentWindow |\\\\n\\\\ttextToPrint := paragraph text.\\\\n\\\\ttextToPrint size == 0 ifTrue: [^self inform: 'nothing to print.'].\\\\n\\\\tprinter := TextPrinter defaultTextPrinter.\\\\n\\\\tparentWindow := self model dependents \\\\n\\\\t\\\\t\\\\t\\\\tdetect: [:dep | dep isSystemWindow]\\\\n\\\\t\\\\t\\\\t\\\\tifNone: [nil].\\\\n\\\\tparentWindow isNil \\\\n\\\\t\\\\tifTrue: [printer documentTitle: 'Untitled']\\\\n\\\\t\\\\tifFalse: [printer documentTitle: parentWindow label].\\\\n\\\\tprinter printText: textToPrint! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'sd 4/16/2003 19:30'!\\\\nsendersOfIt\\\\n\\\\t\\\\\\\"Open a senders browser on the selected selector\\\\\\\"\\\\n\\\\n\\\\t| aSelector |\\\\n\\\\tself lineSelectAndEmptyCheck: [^ self].\\\\n\\\\t(aSelector _ self selectedSelector) == nil ifTrue: [^ view flash].\\\\n\\\\tself terminateAndInitializeAround: [self systemNavigation browseAllCallsOn: aSelector]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'th 9/18/2002 17:28'!\\\\nsetAlignment: aSymbol\\\\n\\\\t| attr interval |\\\\n\\\\tattr _ TextAlignment perform: aSymbol.\\\\n\\\\tinterval _ self encompassLine: self selectionInterval.\\\\n\\\\tparagraph replaceFrom: interval first to: interval last with:\\\\n\\\\t\\\\t((paragraph text copyFrom: interval first to: interval last) addAttribute: attr) displaying: true.\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'th 9/19/2002 18:27'!\\\\nsetSearchString\\\\n\\\\t\\\\\\\"Make the current selection, if any, be the current search string.\\\\\\\"\\\\n\\\\tself hasCaret ifTrue: [view flash. ^ self].\\\\n\\\\tself setSearch:  self selection string! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'dgd 8/28/2004 13:59'!\\\\nspawn\\\\n\\\\t\\\\\\\"Create and schedule a message browser for the code of the model's \\\\n\\\\tselected message. Retain any edits that have not yet been accepted.\\\\\\\"\\\\n\\\\t| code |\\\\n\\\\tcode _ paragraph text string.\\\\n\\\\tself cancel.\\\\n\\\\tmodel notNil ifTrue:[model spawn: code].\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'di 9/7/1999 08:44'!\\\\nspawnWorkspace\\\\n\\\\t| toUse |\\\\n\\\\tself selectLine.\\\\n\\\\ttoUse _ self selection asString.\\\\n\\\\ttoUse size > 0 ifFalse:\\\\n\\\\t\\\\t[toUse _ paragraph text string.\\\\n\\\\t\\\\ttoUse size > 0 ifFalse: [^ self flash]].\\\\n\\\\t\\\\\\\"NB: BrowserCodeController's version does a cancel here\\\\\\\"\\\\n\\\\tself terminateAndInitializeAround:\\\\n\\\\t\\\\t[Utilities openScratchWorkspaceLabeled: 'Untitled' contents: toUse]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'sw 4/29/96'!\\\\nspecialMenuItems\\\\n\\\\t\\\\\\\"Refer to comment under #presentSpecialMenu.  .\\\\n\\\\t : added objectsReferencingIt,\\\\\\\"\\\\n\\\\n\\\\t^ #(\\\\t'Transcript cr; show: ''testing'''\\\\n\\\\t\\\\t\\\\t'view superView model inspect'\\\\n\\\\t\\\\t\\\\t'view superView model browseObjClass'\\\\n\\\\t\\\\t\\\\t'view display'\\\\n\\\\t\\\\t\\\\t'self inspect'\\\\n\\\\t\\\\t\\\\t'view backgroundColor: Color fromUser'\\\\n\\\\t\\\\t\\\\t'view topView inspect'\\\\n\\\\t\\\\t\\\\t'self compareToClipboard'\\\\n\\\\t\\\\t\\\\t'view insideColor: Form white'\\\\n\\\\t\\\\t\\\\t'self objectsReferencingIt'\\\\n\\\\t\\\\t) ! !\\\\n\\\\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'SqR 11/14/2000 12:15'!\\\\nundo\\\\n\\\\t\\\\\\\"Reset the state of the paragraph prior to the previous edit.\\\\n\\\\t If another ParagraphEditor instance did that edit, UndoInterval is invalid;\\\\n\\\\t just recover the contents of the undo-buffer at the start of the paragraph.\\\\\\\"\\\\n\\\\n\\\\tsensor flushKeyboard. \\\\\\\"a way to flush stuck keys\\\\\\\"\\\\n\\\\tself closeTypeIn.\\\\n\\\\n\\\\tUndoParagraph == paragraph ifFalse: \\\\\\\"Can't undo another paragraph's edit\\\\\\\"\\\\n\\\\t\\\\t[UndoMessage _ Message selector: #undoReplace.\\\\n\\\\t\\\\tUndoInterval _ 1 to: 0.\\\\n\\\\t\\\\tUndone _ true].\\\\n\\\\tUndoInterval ~= self selectionInterval ifTrue: \\\\\\\"blink the actual target\\\\\\\"\\\\n\\\\t\\\\t[self selectInterval: UndoInterval; deselect].\\\\n\\\\n\\\\t\\\\\\\"Leave a signal of which phase is in progress\\\\\\\"\\\\n\\\\tUndoParagraph _ Undone ifTrue: [#redoing] ifFalse: [#undoing].\\\\n\\\\tUndoMessage sentTo: self.\\\\n\\\\tUndoParagraph _ paragraph! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection' stamp: 'th 9/18/2002 14:37'!\\\\nadjustSelection: directionBlock\\\\n\\\\t\\\\\\\"Helper function for Cursor movement. Always moves point thus allowing selections to shrink. \\\\\\\"\\\\n\\\\t\\\\\\\"See also expandSelection:\\\\\\\"\\\\n\\\\t\\\\\\\"Accepts a one argument Block that computes the new postion given an old one.\\\\\\\"\\\\n\\\\t| newPosition |\\\\n\\\\tnewPosition _ directionBlock value: self pointIndex.\\\\n\\\\tself selectMark: self markIndex point: newPosition.\\\\n\\\\t^true.! !\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection' stamp: 'th 10/28/2003 12:11'!\\\\nafterSelectionInsertAndSelect: aString\\\\n\\\\n\\\\tself insertAndSelect: aString at: self stopIndex ! !\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection' stamp: 'th 9/17/2002 16:11'!\\\\ncomputeIntervalFrom: start to: stop\\\\n\\\\t\\\\\\\"Select the designated characters, inclusive.  Make no visual changes.\\\\\\\"\\\\n\\\\n\\\\tself setMark: start.\\\\n\\\\tself setPoint: stop + 1.! !\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection' stamp: 'di 5/6/1998 15:21'!\\\\ncorrectFrom: start to: stop with: aString\\\\n\\\\t\\\\\\\"Make a correction in the model that the user has authorised from somewhere else in the system (such as from the compilier).  The user's selection is not changed, only corrected.\\\\\\\"\\\\n\\\\t| wasShowing userSelection delta loc |\\\\n\\\\taString = '#insert period' ifTrue:\\\\n\\\\t\\\\t[loc _ start.\\\\n\\\\t\\\\t[(loc _ loc-1)>0 and: [(paragraph text string at: loc) isSeparator]]\\\\n\\\\t\\\\t\\\\twhileTrue: [loc _ loc-1].\\\\n\\\\t\\\\t^ self correctFrom: loc+1 to: loc with: '.'].\\\\n\\\\t(wasShowing _ selectionShowing) ifTrue: [ self reverseSelection ].\\\\n\\\\tuserSelection _ self selectionInterval.\\\\n\\\\n\\\\tself selectInvisiblyFrom: start to: stop.\\\\n\\\\tself replaceSelectionWith: aString asText.\\\\n\\\\n\\\\tdelta _ aString size - (stop - start + 1).\\\\n\\\\tself selectInvisiblyFrom:\\\\n\\\\t\\\\tuserSelection first + (userSelection first > start ifFalse: [ 0 ] ifTrue: [ delta ])\\\\n\\\\t\\\\tto: userSelection last + (userSelection last > start ifFalse: [ 0 ] ifTrue: [ delta ]).\\\\n\\\\twasShowing ifTrue: [ self reverseSelection ].\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection' stamp: 'th 9/19/2002 17:21'!\\\\nencompassLine: anInterval\\\\n\\\\t\\\\\\\"Return an interval that encompasses the entire line\\\\\\\"\\\\n\\\\t| string left right |\\\\n\\\\tstring _ paragraph text string.\\\\n\\\\tleft _ (string lastIndexOf: Character cr startingAt: anInterval first - 1 ifAbsent:[0]) + 1.\\\\n\\\\tright _ (string indexOf: Character cr startingAt: anInterval last + 1 ifAbsent: [string size + 1]) - 1.\\\\n\\\\t^left to: right! !\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection' stamp: 'di 12/17/1998 09:41'!\\\\ninsertAndSelect: aString at: anInteger\\\\n\\\\n\\\\tself replace: (anInteger to: anInteger - 1)\\\\n\\\\t\\\\twith: (Text string: (' ' , aString)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tattributes: emphasisHere)\\\\n\\\\t\\\\tand: [self selectAndScroll]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection' stamp: 'di 5/6/1998 15:25'!\\\\nnextTokenFrom: start direction: dir\\\\n\\\\t\\\\\\\"simple token-finder for compiler automated corrections\\\\\\\"\\\\n\\\\t| loc str |\\\\n\\\\tloc _ start + dir.\\\\n\\\\tstr _ paragraph text string.\\\\n\\\\t[(loc between: 1 and: str size) and: [(str at: loc) isSeparator]]\\\\n\\\\t\\\\twhileTrue: [loc _ loc + dir].\\\\n\\\\t^ loc! !\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection' stamp: 'di 5/20/1998 08:31'!\\\\nnotify: aString at: anInteger in: aStream \\\\n\\\\t\\\\\\\"The compilation of text failed. The syntax error is noted as the argument, \\\\n\\\\taString. Insert it in the text at starting character position anInteger.\\\\\\\"\\\\n\\\\n\\\\tself insertAndSelect: aString at: (anInteger max: 1)! !\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection'!\\\\nselectAt: characterIndex \\\\n\\\\t\\\\\\\"Deselect, then place the caret before the character at characterIndex.\\\\n\\\\t Be sure it is in view.\\\\\\\"\\\\n\\\\n\\\\tself selectFrom: characterIndex to: characterIndex - 1! !\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection' stamp: 'th 9/18/2002 16:50'!\\\\nselectFrom: start to: stop\\\\n\\\\t\\\\\\\"Deselect, then select the specified characters inclusive.\\\\n\\\\t Be sure the selection is in view.\\\\\\\"\\\\n\\\\n\\\\t(start = self startIndex and: [stop + 1 = self stopIndex]) ifFalse:\\\\n\\\\t\\\\t[self deselect.\\\\n\\\\t\\\\tself selectInvisiblyFrom: start to: stop].\\\\n\\\\tself selectAndScroll! !\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection'!\\\\nselectInterval: anInterval\\\\n\\\\t\\\\\\\"Deselect, then select the specified characters inclusive.\\\\n\\\\t Be sure the selection is in view.\\\\\\\"\\\\n\\\\n\\\\tself selectFrom: anInterval first to: anInterval last! !\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection' stamp: 'di 5/9/1998 20:59'!\\\\nselectInvisiblyFrom: start to: stop\\\\n\\\\t\\\\\\\"Select the designated characters, inclusive.  Make no visual changes.\\\\\\\"\\\\n\\\\n\\\\t^ self computeIntervalFrom: start to: stop! !\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection' stamp: 'th 9/18/2002 14:17'!\\\\nselectInvisiblyMark: mark point: point\\\\n\\\\t\\\\\\\"Select the designated characters, inclusive.  Make no visual changes.\\\\\\\"\\\\n\\\\n\\\\t^ self computeIntervalFrom: mark to: point! !\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection' stamp: 'th 9/19/2002 17:17'!\\\\nselectLine\\\\n\\\\t\\\\\\\"Make the receiver's selection, if it currently consists of an insertion point only, encompass the current line.\\\\\\\"\\\\n\\\\tself hasSelection ifTrue:[^self].\\\\n\\\\tself selectInterval: (self encompassLine: self selectionInterval)! !\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection' stamp: 'th 9/18/2002 14:18'!\\\\nselectMark: mark point: point\\\\n\\\\t\\\\\\\"Deselect, then select the specified characters inclusive.\\\\n\\\\t Be sure the selection is in view.\\\\\\\"\\\\n\\\\n\\\\t(mark =  self markIndex and: [point + 1 = self pointIndex]) ifFalse:\\\\n\\\\t\\\\t[self deselect.\\\\n\\\\t\\\\tself selectInvisiblyMark: mark point: point].\\\\n\\\\tself selectAndScroll! !\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection' stamp: 'th 9/19/2002 18:49'!\\\\nselectPrecedingIdentifier\\\\n\\\\t\\\\\\\"Invisibly select the identifier that ends at the end of the selection, if any.\\\\\\\"\\\\n\\\\n\\\\t| string sep stop tok |\\\\n\\\\ttok _ false.\\\\n\\\\tstring _ paragraph text string.\\\\n\\\\tstop _ self stopIndex - 1.\\\\n\\\\t[stop > 0 and: [(string at: stop) isSeparator]] whileTrue: [stop _ stop - 1].\\\\n\\\\tsep _ stop.\\\\n\\\\t[sep > 0 and: [(string at: sep) tokenish]] whileTrue: [tok _ true. sep _ sep - 1].\\\\n\\\\ttok ifTrue: [self selectInvisiblyFrom: sep + 1 to: stop]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'new selection' stamp: 'th 9/18/2002 16:51'!\\\\nselectWord\\\\n\\\\t\\\\\\\"Select delimited text or word--the result of double-clicking.\\\\\\\"\\\\n\\\\n\\\\t| openDelimiter closeDelimiter direction match level leftDelimiters rightDelimiters\\\\n\\\\tstring here hereChar start stop |\\\\n\\\\tstring _ paragraph text string.\\\\n\\\\there _ self pointIndex.\\\\n\\\\t(here between: 2 and: string size)\\\\n\\\\t\\\\tifFalse: [\\\\\\\"if at beginning or end, select entire string\\\\\\\"\\\\n\\\\t\\\\t\\\\t^self selectFrom: 1 to: string size].\\\\n\\\\tleftDelimiters _ '([{<''\\\\\\\"\\\\n'.\\\\n\\\\trightDelimiters _ ')]}>''\\\\\\\"\\\\n'.\\\\n\\\\topenDelimiter _ string at: here - 1.\\\\n\\\\tmatch _ leftDelimiters indexOf: openDelimiter.\\\\n\\\\tmatch > 0\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"delimiter is on left -- match to the right\\\\\\\"\\\\n\\\\t\\\\t\\\\tstart _ here.\\\\n\\\\t\\\\t\\\\tdirection _ 1.\\\\n\\\\t\\\\t\\\\there _ here - 1.\\\\n\\\\t\\\\t\\\\tcloseDelimiter _ rightDelimiters at: match]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[openDelimiter _ string at: here.\\\\n\\\\t\\\\t\\\\tmatch _ rightDelimiters indexOf: openDelimiter.\\\\n\\\\t\\\\t\\\\tmatch > 0\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"delimiter is on right -- match to the left\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstop _ here - 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdirection _ -1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcloseDelimiter _ leftDelimiters at: match]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\\\\"no delimiters -- select a token\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdirection _ -1]].\\\\n\\\\tlevel _ 1.\\\\n\\\\t[level > 0 and: [direction > 0\\\\n\\\\t\\\\t\\\\tifTrue: [here < string size]\\\\n\\\\t\\\\t\\\\tifFalse: [here > 1]]]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[hereChar _ string at: (here _ here + direction).\\\\n\\\\t\\\\t\\\\tmatch = 0\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"token scan goes left, then right\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\thereChar tokenish\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [here = 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[start _ 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"go right if hit string start\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdirection _ 1]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [direction < 0\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[start _ here + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"go right if hit non-token\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdirection _ 1]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [level _ 0]]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\\\\"bracket match just counts nesting level\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\thereChar = closeDelimiter\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [level _ level - 1\\\\\\\"leaving nest\\\\\\\"]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [hereChar = openDelimiter \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [level _ level + 1\\\\\\\"entering deeper nest\\\\\\\"]]]].\\\\n\\\\n\\\\tlevel > 0 ifTrue: [\\\\\\\"in case ran off string end\\\\\\\"\\\\there _ here + direction].\\\\n\\\\tdirection > 0\\\\n\\\\t\\\\tifTrue: [self selectFrom: start to: here - 1]\\\\n\\\\t\\\\tifFalse: [self selectFrom: here + 1 to: stop]! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 1/21/2000 18:51'!\\\\ncomment\\\\n\\\\t\\\\\\\"All key actions that are neither editing nor typing actions have to\\\\n\\\\tsend closeTypeIn at first. See comment in openTypeIn closeTypeIn\\\\\\\"! !\\\\n\\\\n!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 11/18/2002 17:08'!\\\\ncursorDown: characterStream \\\\n\\\\n\\\\t\\\\\\\"Private - Move cursor from position in current line to same position in\\\\n\\\\tnext line. If next line too short, put at end. If shift key down,\\\\n\\\\tselect.\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself \\\\n\\\\t\\\\tmoveCursor:[:position | self\\\\n\\\\t\\\\t\\\\t\\\\tsameColumn: position\\\\n\\\\t\\\\t\\\\t\\\\tnewLine:[:line | line + 1]\\\\n\\\\t\\\\t\\\\t\\\\tforward: true]\\\\n\\\\t\\\\tforward: true\\\\n\\\\t\\\\tspecialBlock:[:dummy | dummy].\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 10/28/2003 10:47'!\\\\ncursorEnd: characterStream \\\\n\\\\n\\\\t\\\\\\\"Private - Move cursor end of current line.\\\\\\\"\\\\n\\\\t| string |\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tstring _ paragraph text string.\\\\n\\\\tself\\\\n\\\\t\\\\tmoveCursor:\\\\n\\\\t\\\\t\\\\t[:position | Preferences wordStyleCursorMovement\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:[| targetLine |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttargetLine _ paragraph lines at:(paragraph lineIndexOfCharacterIndex: position).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttargetLine = paragraph lines last\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue:[targetLine last + 1]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse:[targetLine last]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:[\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstring\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tindexOf: Character cr\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: position\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifAbsent:[string size + 1]]]\\\\n\\\\t\\\\tforward: true\\\\n\\\\t\\\\tspecialBlock:[:dummy | string size + 1].\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 9/20/2002 12:14'!\\\\ncursorHome: characterStream \\\\n\\\\n\\\\t\\\\\\\"Private - Move cursor from position in current line to beginning of\\\\n\\\\tcurrent line. If control key is pressed put cursor at beginning of text\\\\\\\"\\\\n\\\\n\\\\t| string |\\\\n\\\\n\\\\tstring _ paragraph text string.\\\\n\\\\tself\\\\n\\\\t\\\\tmoveCursor: [ :position | Preferences wordStyleCursorMovement\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:[\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(paragraph lines at:(paragraph lineIndexOfCharacterIndex: position)) first]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:[\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(string\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tlastIndexOf: Character cr\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: position - 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifAbsent:[0]) + 1]]\\\\n\\\\t\\\\tforward: false\\\\n\\\\t\\\\tspecialBlock: [:dummy | 1].\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 9/19/2002 20:07'!\\\\ncursorLeft: characterStream \\\\n\\\\t\\\\\\\"Private - Move cursor left one character if nothing selected, otherwise \\\\n\\\\tmove cursor to beginning of selection. If the shift key is down, start \\\\n\\\\tselecting or extending current selection. Don't allow cursor past \\\\n\\\\tbeginning of text\\\\\\\"\\\\n\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself\\\\n\\\\t\\\\tmoveCursor:[:position | position - 1 max: 1]\\\\n\\\\t\\\\tforward: false\\\\n\\\\t\\\\tspecialBlock:[:position | self previousWord: position].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 11/18/2002 17:09'!\\\\ncursorPageDown: characterStream \\\\n\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself \\\\n\\\\t\\\\tmoveCursor: [:position |\\\\n\\\\t\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\t\\\\tsameColumn: position\\\\n\\\\t\\\\t\\\\t\\\\tnewLine:[:lineNo | lineNo + self pageHeight]\\\\n\\\\t\\\\t\\\\t\\\\tforward: true]\\\\n\\\\t\\\\tforward: true\\\\n\\\\t\\\\tspecialBlock:[:dummy | dummy].\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 11/18/2002 17:09'!\\\\ncursorPageUp: characterStream \\\\n\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself \\\\n\\\\t\\\\tmoveCursor: [:position |\\\\n\\\\t\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\t\\\\tsameColumn: position\\\\n\\\\t\\\\t\\\\t\\\\tnewLine:[:lineNo | lineNo - self pageHeight]\\\\n\\\\t\\\\t\\\\t\\\\tforward: false]\\\\n\\\\t\\\\tforward: false\\\\n\\\\t\\\\tspecialBlock:[:dummy | dummy].\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 9/19/2002 20:01'!\\\\ncursorRight: characterStream \\\\n\\\\t\\\\\\\"Private - Move cursor right one character if nothing selected, \\\\n\\\\totherwise move cursor to end of selection. If the shift key is down, \\\\n\\\\tstart selecting characters or extending already selected characters. \\\\n\\\\tDon't allow cursor past end of text\\\\\\\"\\\\n\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself\\\\n\\\\t\\\\tmoveCursor: [:position | position + 1]\\\\n\\\\t\\\\tforward: true\\\\n\\\\t\\\\tspecialBlock:[:position | self nextWord: position].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 11/18/2002 17:15'!\\\\ncursorUp: characterStream \\\\n\\\\n\\\\\\\"Private - Move cursor from position in current line to same position in\\\\nprior line. If prior line too short, put at end\\\\\\\"\\\\n\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself\\\\n\\\\t\\\\tmoveCursor: [:position | self\\\\n\\\\t\\\\t\\\\t\\\\tsameColumn: position\\\\n\\\\t\\\\t\\\\t\\\\tnewLine:[:line | line - 1]\\\\n\\\\t\\\\t\\\\t\\\\tforward: false]\\\\n\\\\t\\\\tforward: false\\\\n\\\\t\\\\tspecialBlock:[:dummy | dummy].\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'di 12/3/2001 21:49'!\\\\nescapeToDesktop: characterStream \\\\n\\\\t\\\\\\\"Pop up a morph to field keyboard input in the context of the desktop\\\\\\\"\\\\n\\\\n\\\\tSmalltalk isMorphic ifTrue: [ActiveWorld putUpWorldMenuFromEscapeKey].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'dvf 12/8/2001 00:46'!\\\\nraiseContextMenu: characterStream \\\\n\\\\t\\\\\\\"AFAIK, this is never called in morphic, because a subclass overrides it. Which is good, because a ParagraphEditor doesn't know about Morphic and thus duplicates the text-editing actions that really belong in the specific application, not the controller. So the context menu this would raise is likely to be out of date.\\\\\\\"\\\\n\\\\tself yellowButtonActivity.\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 1/21/2000 18:55'!\\\\nselectCurrentTypeIn: characterStream \\\\n\\\\t\\\\\\\"Select what would be replaced by an undo (e.g., the last typeIn).\\\\\\\"\\\\n\\\\n\\\\t| prior |\\\\n\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tprior _ otherInterval.\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself selectInterval: UndoInterval.\\\\n\\\\totherInterval _ prior.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'sma 12/15/1999 11:46'!\\\\nselectWord: characterStream\\\\n\\\\tsensor keyboard.\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself selectWord.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 1/21/2000 18:55'!\\\\nsetSearchString: characterStream\\\\n\\\\t\\\\\\\"Establish the current selection as the current search string.\\\\\\\"\\\\n\\\\n\\\\t| aString |\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tsensor keyboard.\\\\n\\\\tself lineSelectAndEmptyCheck: [^ true].\\\\n\\\\taString _  self selection string.\\\\n\\\\taString size == 0\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self flash]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self setSearch: aString].\\\\n\\\\t^ true! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'parenblinking' stamp: 'mir 8/3/2004 13:31'!\\\\nblinkParenAt: parenLocation \\\\n\\\\tself text\\\\n\\\\t\\\\taddAttribute: TextEmphasis bold\\\\n\\\\t\\\\tfrom: parenLocation\\\\n\\\\t\\\\tto: parenLocation.\\\\n\\\\tlastParentLocation _ parenLocation.! !\\\\n\\\\n!ParagraphEditor methodsFor: 'parenblinking' stamp: 'AB 1/7/2002 04:03'!\\\\nblinkPrevParen\\\\n\\\\t| openDelimiter closeDelimiter level string here hereChar |\\\\n\\\\tstring _ paragraph text string.\\\\n\\\\there _ startBlock stringIndex.\\\\n\\\\topenDelimiter _ sensor keyboardPeek.\\\\n\\\\tcloseDelimiter _ '([{' at: (')]}' indexOf: openDelimiter).\\\\n\\\\tlevel _ 1.\\\\n\\\\t[level > 0 and: [here > 2]]\\\\n\\\\t\\\\twhileTrue:\\\\n\\\\t\\\\t\\\\t[hereChar _ string at: (here _ here - 1).\\\\n\\\\t\\\\t\\\\thereChar = closeDelimiter\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[level _ level - 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tlevel = 0\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [^ self blinkParenAt: here]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[hereChar = openDelimiter\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [level _ level + 1]]].! !\\\\n\\\\n!ParagraphEditor methodsFor: 'parenblinking' stamp: 'mir 8/3/2004 13:31'!\\\\nclearParens\\\\n\\\\tlastParentLocation ifNotNil:\\\\n\\\\t\\\\t[self text string size >= lastParentLocation ifTrue: [\\\\n\\\\t\\\\t\\\\tself text\\\\n\\\\t\\\\t\\\\t\\\\tremoveAttribute: TextEmphasis bold\\\\n\\\\t\\\\t\\\\t\\\\tfrom: lastParentLocation\\\\n\\\\t\\\\t\\\\t\\\\tto: lastParentLocation]]\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'parenblinking' stamp: 'mikki 1/5/2005 14:10'!\\\\ndispatchOnCharacter: char with: typeAheadStream\\\\n\\\\t\\\\\\\"Carry out the action associated with this character, if any.\\\\n\\\\tType-ahead is passed so some routines can flush or use it.\\\\\\\"\\\\n\\\\n\\\\t| honorCommandKeys |\\\\n\\\\tself clearParens.\\\\n  \\\\n\\\\t\\\\\\\"mikki 1/3/2005 21:31 Preference for auto-indent on return added.\\\\\\\"\\\\n\\\\tchar asciiValue = 13 ifTrue: [\\\\n\\\\t\\\\t^Preferences autoIndent \\\\n\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tsensor controlKeyPressed\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self normalCharacter: typeAheadStream]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [self crWithIndent: typeAheadStream]]\\\\n\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tsensor controlKeyPressed\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self crWithIndent: typeAheadStream]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [self normalCharacter: typeAheadStream]]].\\\\n\\\\n\\\\t((honorCommandKeys _ Preferences cmdKeysInText) and: [char = Character enter])\\\\n\\\\t\\\\tifTrue: [^ self dispatchOnEnterWith: typeAheadStream].\\\\n\\\\t\\\\t\\\\n\\\\t\\\\\\\"Special keys overwrite crtl+key combinations - at least on Windows. To resolve this\\\\n\\\\tconflict, assume that keys other than cursor keys aren't used together with Crtl.\\\\\\\" \\\\n\\\\t((self class specialShiftCmdKeys includes: char asciiValue) and: [char asciiValue < 27])\\\\n\\\\t\\\\tifTrue: [^ sensor controlKeyPressed\\\\n\\\\t\\\\t\\\\tifTrue: [self perform: (ShiftCmdActions at: char asciiValue + 1) with: typeAheadStream]\\\\n\\\\t\\\\t\\\\tifFalse: [self perform: (CmdActions at: char asciiValue + 1) with: typeAheadStream]].\\\\n\\\\n\\\\t\\\\\\\"backspace, and escape keys (ascii 8 and 27) are command keys\\\\\\\"\\\\n\\\\t((honorCommandKeys and: [sensor commandKeyPressed]) or: [self class specialShiftCmdKeys includes: char asciiValue]) ifTrue:\\\\n\\\\t\\\\t[^ sensor leftShiftDown\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[self perform: (ShiftCmdActions at: char asciiValue + 1) with: typeAheadStream]\\\\n\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[self perform: (CmdActions at: char asciiValue + 1) with: typeAheadStream]].\\\\n\\\\n\\\\t\\\\\\\"the control key can be used to invoke shift-cmd shortcuts\\\\\\\"\\\\n\\\\t(honorCommandKeys and: [sensor controlKeyPressed])\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[^ self perform: (ShiftCmdActions at: char asciiValue + 1) with: typeAheadStream].\\\\n\\\\n\\\\t(')]}' includes: char)\\\\n\\\\t\\\\tifTrue: [self blinkPrevParen].\\\\n\\\\n\\\\t^ self perform: #normalCharacter: with: typeAheadStream! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'scrolling'!\\\\ncomputeMarkerRegion \\\\n\\\\t\\\\\\\"Refer to the comment in ScrollController|computeMarkerRegion.\\\\\\\"\\\\n\\\\n\\\\tparagraph compositionRectangle height = 0\\\\n\\\\t\\\\tifTrue:\\\\t[^0@0 extent: Preferences scrollBarWidth @ scrollBar inside height]\\\\n\\\\t\\\\tifFalse:\\\\t[^0@0 extent:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tPreferences scrollBarWidth \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t@ ((paragraph clippingRectangle height asFloat /\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself scrollRectangleHeight * scrollBar inside height) rounded\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmin: scrollBar inside height)]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'scrolling'!\\\\nmarkerDelta\\\\n\\\\n\\\\t^marker top - scrollBar top - ((paragraph clippingRectangle top -\\\\n\\\\t\\\\tparagraph compositionRectangle top) asFloat /\\\\n\\\\t\\\\t\\\\t(self scrollRectangleHeight max: 1) asFloat *\\\\n\\\\t\\\\t\\\\t\\\\tscrollBar height asFloat) rounded! !\\\\n\\\\n!ParagraphEditor methodsFor: 'scrolling'!\\\\nscrollAmount \\\\n\\\\t\\\\\\\"Refer to the comment in ScrollController|scrollAmount.\\\\\\\"\\\\n\\\\n\\\\t^sensor cursorPoint y - scrollBar top! !\\\\n\\\\n!ParagraphEditor methodsFor: 'scrolling'!\\\\nscrollBar\\\\n\\\\t^ scrollBar! !\\\\n\\\\n!ParagraphEditor methodsFor: 'scrolling' stamp: 'BG 12/12/2003 15:31'!\\\\nscrollBy: heightToMove\\\\n\\\\t\\\\\\\"Move the paragraph by heightToMove, and reset the text selection.\\\\\\\"\\\\n\\\\t^ paragraph scrollBy: heightToMove withSelectionFrom: self pointBlock to: self markBlock! !\\\\n\\\\n!ParagraphEditor methodsFor: 'scrolling'!\\\\nscrollRectangleHeight\\\\n\\\\n\\\\t^paragraph compositionRectangle height \\\\n\\\\t\\\\t+ paragraph lineGrid! !\\\\n\\\\n!ParagraphEditor methodsFor: 'scrolling'!\\\\nscrollToBottom\\\\n\\\\t\\\\\\\"Scroll so that the tail end of the text is visible in the view.  5/6/96 sw\\\\\\\"\\\\n\\\\n\\\\tself scrollView: (paragraph clippingRectangle bottom \\\\n\\\\t\\\\t- paragraph compositionRectangle bottom)! !\\\\n\\\\n!ParagraphEditor methodsFor: 'scrolling'!\\\\nscrollToTop\\\\n\\\\t\\\\\\\"Scroll so that the paragraph is at the top of the view.\\\\\\\"\\\\n\\\\n\\\\tself scrollView: (paragraph clippingRectangle top \\\\n\\\\t\\\\t- paragraph compositionRectangle top)! !\\\\n\\\\n!ParagraphEditor methodsFor: 'scrolling'!\\\\nscrollView: anInteger \\\\n\\\\t\\\\\\\"Paragraph scrolling uses opposite polarity\\\\\\\"\\\\n\\\\t^ self scrollBy: anInteger negated! !\\\\n\\\\n!ParagraphEditor methodsFor: 'scrolling'!\\\\nupdateMarker\\\\n\\\\t\\\\\\\"A variation of computeMarkerRegion--only redisplay the marker in the scrollbar if an actual change has occurred in the positioning of the paragraph.\\\\\\\"\\\\n\\\\tself moveMarkerTo: self computeMarkerRegion! !\\\\n\\\\n!ParagraphEditor methodsFor: 'scrolling'!\\\\nviewDelta \\\\n\\\\t\\\\\\\"Refer to the comment in ScrollController|viewDelta.\\\\\\\"\\\\n\\\\n\\\\t^paragraph clippingRectangle top \\\\n\\\\t\\\\t- paragraph compositionRectangle top \\\\n\\\\t\\\\t- ((marker top - scrollBar inside top) asFloat \\\\n\\\\t\\\\t\\\\t\\\\t/ scrollBar inside height asFloat * self scrollRectangleHeight asFloat)\\\\n\\\\t\\\\t\\\\troundTo: paragraph lineGrid! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'sensor access'!\\\\nprocessBlueButton\\\\n\\\\t\\\\\\\"The user pressed the blue button on the mouse. Determine what action \\\\n\\\\tto take.\\\\\\\"\\\\n\\\\n\\\\t^self! !\\\\n\\\\n!ParagraphEditor methodsFor: 'sensor access'!\\\\nprocessKeyboard\\\\n\\\\t\\\\\\\"Determine whether the user pressed the keyboard. If so, read the keys.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboardPressed ifTrue: [self readKeyboard]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'sensor access'!\\\\nprocessMouseButtons\\\\n\\\\t\\\\\\\"Determine whether the user pressed any mouse button. For each possible \\\\n\\\\tbutton, determine what actions to take.\\\\\\\"\\\\n\\\\n\\\\tsensor redButtonPressed ifTrue: [self processRedButton].\\\\n\\\\tsensor yellowButtonPressed ifTrue: [self processYellowButton].\\\\n\\\\tsensor blueButtonPressed ifTrue: [self processBlueButton]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'sensor access' stamp: 'th 9/19/2002 18:24'!\\\\nprocessRedButton\\\\n\\\\t\\\\\\\"The user pressed a red mouse button, meaning create a new text \\\\n\\\\tselection. Highlighting the selection is carried out by the paragraph \\\\n\\\\titself. Double clicking causes a selection of the area between the nearest \\\\n\\\\tenclosing delimitors.\\\\\\\"\\\\n\\\\n\\\\t|  selectionBlocks clickPoint oldDelta oldInterval previousMarkBlock previousPointBlock |\\\\n\\\\n\\\\tclickPoint _ sensor cursorPoint.\\\\n\\\\t(view containsPoint: clickPoint) ifFalse: [^ self].\\\\n\\\\t(paragraph clickAt: clickPoint for: model controller: self) ifTrue: [^ self].\\\\n\\\\toldInterval _ self selectionInterval.\\\\n\\\\tpreviousMarkBlock _ self markBlock.\\\\n\\\\tpreviousPointBlock _ self pointBlock.\\\\n\\\\toldDelta _ paragraph scrollDelta.\\\\n\\\\tsensor leftShiftDown\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self deselect.\\\\n\\\\t\\\\t\\\\tself closeTypeIn.\\\\n\\\\t\\\\t\\\\tselectionBlocks _ paragraph mouseSelect: clickPoint]\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[selectionBlocks _ paragraph extendSelectionMark: self markBlock pointBlock: self pointBlock.\\\\n\\\\t\\\\t\\\\tself closeTypeIn].\\\\n\\\\tselectionShowing _ true.\\\\n\\\\tself markBlock: (selectionBlocks at: 1).\\\\n\\\\tself pointBlock: (selectionBlocks at: 2).\\\\n\\\\t(self hasCaret\\\\n\\\\t\\\\tand: [previousMarkBlock = self markBlock and: [previousPointBlock = self pointBlock]])\\\\n\\\\t\\\\tifTrue: [self selectWord].\\\\n\\\\toldDelta ~= paragraph scrollDelta \\\\\\\"case of autoscroll\\\\\\\"\\\\n\\\\t\\\\t\\\\tifTrue: [self updateMarker].\\\\n\\\\tself setEmphasisHere.\\\\n\\\\t(self isDisjointFrom: oldInterval) ifTrue:\\\\n\\\\t\\\\t[otherInterval _ oldInterval]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'sensor access'!\\\\nprocessYellowButton\\\\n\\\\t\\\\\\\"User pressed the yellow button on the mouse. Determine what actions to \\\\n\\\\ttake.\\\\\\\"\\\\n\\\\n\\\\tself yellowButtonActivity! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'typing support' stamp: 'yo 3/16/2004 13:05'!\\\\nbackTo: startIndex\\\\n\\\\t\\\\\\\"During typing, backspace to startIndex.  Deleted characters fall into three\\\\n\\\\t clusters, from left to right in the text: (1) preexisting characters that were\\\\n\\\\t backed over; (2) newly typed characters that were backed over (excluding\\\\n\\\\t typeahead, which never even appears); (3) preexisting characters that\\\\n\\\\t were highlighted before typing began.  If typing has not yet been opened,\\\\n\\\\t open it and watch for the first and third cluster.  If typing has been opened,\\\\n\\\\t watch for the first and second cluster.  Save characters from the first and third\\\\n\\\\t cluster in UndoSelection.  Tally characters from the first cluster in UndoMessage's parameter.\\\\n\\\\t Delete all the clusters.  Do not alter Undoer or UndoInterval (except via\\\\n\\\\t openTypeIn).  The code is shorter than the comment.\\\\\\\"\\\\n\\\\n\\\\t| saveLimit newBackovers |\\\\n\\\\tsaveLimit _ beginTypeInBlock == nil\\\\n\\\\t\\\\tifTrue: [self openTypeIn. UndoSelection _ self nullText. self stopIndex]\\\\n\\\\t\\\\tifFalse: [self startOfTyping].\\\\n\\\\tself setMark: startIndex.\\\\n\\\\tstartIndex < saveLimit ifTrue:\\\\n\\\\t\\\\t[newBackovers _ self startOfTyping - startIndex.\\\\n\\\\t\\\\tbeginTypeInBlock _ self startIndex.\\\\n\\\\t\\\\tUndoSelection replaceFrom: 1 to: 0 with:\\\\n\\\\t\\\\t\\\\t(paragraph text copyFrom: startIndex to: saveLimit - 1).\\\\n\\\\t\\\\tUndoMessage argument: (UndoMessage argument ifNil: [1]) + newBackovers].\\\\n\\\\tself zapSelectionWith: self nullText.\\\\n\\\\tself unselect! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing support' stamp: 'th 9/19/2002 17:40'!\\\\ncloseTypeIn\\\\n\\\\t\\\\\\\"See comment in openTypeIn.  It is important to call closeTypeIn before executing\\\\n\\\\t any non-typing key, making a new selection, etc.  It is called automatically for\\\\n\\\\t menu commands.\\\\n\\\\t Typing commands can call 'closeTypeIn: aCharacterStream' instead of this to\\\\n\\\\t save typeahead.  Undoer & Redoer: undoAndReselect:redoAndReselect:.\\\\\\\"\\\\n\\\\n\\\\t| begin stop |\\\\n\\\\tbeginTypeInBlock == nil ifFalse:\\\\n\\\\t\\\\t[(UndoMessage sends: #noUndoer) ifTrue: \\\\\\\"should always be true, but just in case...\\\\\\\"\\\\n\\\\t\\\\t\\\\t[begin _ self startOfTyping.\\\\n\\\\t\\\\t\\\\tstop _ self stopIndex.\\\\n\\\\t\\\\t\\\\tself undoer: #undoAndReselect:redoAndReselect:\\\\n\\\\t\\\\t\\\\t\\\\twith: (begin + UndoMessage argument to: begin + UndoSelection size - 1)\\\\n\\\\t\\\\t\\\\t\\\\twith: (stop to: stop - 1).\\\\n\\\\t\\\\t\\\\tUndoInterval _ begin to: stop - 1].\\\\n\\\\t\\\\tbeginTypeInBlock _ nil]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing support'!\\\\ncloseTypeIn: characterStream\\\\n\\\\t\\\\\\\"Call instead of closeTypeIn when you want typeahead to be inserted before the\\\\n\\\\t control character is executed, e.g., from Ctrl-V.\\\\\\\"\\\\n\\\\n\\\\tself insertTypeAhead: characterStream.\\\\n\\\\tself closeTypeIn! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing support' stamp: 'di 9/7/1999 11:26'!\\\\ndispatchOnEnterWith: typeAheadStream\\\\n\\\\t\\\\\\\"Enter key hit.  Treat is as an 'accept', viz a synonym for cmd-s.  If cmd key is down, treat is as a synonym for print-it. \\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.  \\\\\\\"consume enter key\\\\\\\"\\\\n\\\\tself terminateAndInitializeAround: [\\\\n\\\\tsensor commandKeyPressed\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self printIt.]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[self closeTypeIn: typeAheadStream.\\\\n\\\\t\\\\t\\\\tself accept].\\\\n\\\\t].\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing support' stamp: 'di 6/14/1998 13:08'!\\\\ndoneTyping\\\\n\\\\tbeginTypeInBlock _ nil! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing support' stamp: 'th 9/17/2002 16:23'!\\\\ninsertTypeAhead: typeAhead\\\\n\\\\ttypeAhead position = 0 ifFalse:\\\\n\\\\t\\\\t[self zapSelectionWith: (Text string: typeAhead contents emphasis: emphasisHere).\\\\n\\\\t\\\\ttypeAhead reset.\\\\n\\\\t\\\\tself unselect]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing support' stamp: 'th 9/18/2002 16:48'!\\\\nopenTypeIn\\\\n\\\\t\\\\\\\"Set up UndoSelection to null text (to be added to by readKeyboard and backTo:),\\\\n\\\\t beginTypeInBlock to keep track of the leftmost backspace, and UndoParameter to tally\\\\n\\\\t how many deleted characters were backspaced over rather than 'cut'.\\\\n\\\\t You can't undo typing until after closeTypeIn.\\\\\\\"\\\\n\\\\n\\\\tbeginTypeInBlock == nil ifTrue:\\\\n\\\\t\\\\t[UndoSelection _ self nullText.\\\\n\\\\t\\\\tself undoer: #noUndoer with: 0.\\\\n\\\\t\\\\tbeginTypeInBlock _ self startIndex]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing support' stamp: 'th 9/19/2002 18:26'!\\\\nreadKeyboard\\\\n\\\\t\\\\\\\"Key struck on the keyboard. Find out which one and, if special, carry \\\\n\\\\tout the associated special action. Otherwise, add the character to the \\\\n\\\\tstream of characters.  Undoer & Redoer: see closeTypeIn.\\\\\\\"\\\\n\\\\n\\\\t| typeAhead char |\\\\n\\\\ttypeAhead _ WriteStream on: (String new: 128).\\\\n\\\\t[sensor keyboardPressed] whileTrue: \\\\n\\\\t\\\\t[self deselect.\\\\n\\\\t\\\\t [sensor keyboardPressed] whileTrue: \\\\n\\\\t\\\\t\\\\t[char _ sensor keyboardPeek.\\\\n\\\\t\\\\t\\\\t(self dispatchOnCharacter: char with: typeAhead) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[self doneTyping.\\\\n\\\\t\\\\t\\\\t\\\\tself setEmphasisHere.\\\\n\\\\t\\\\t\\\\t\\\\t^self selectAndScroll; updateMarker].\\\\n\\\\t\\\\t\\\\tself openTypeIn].\\\\n\\\\t\\\\tself hasSelection ifTrue: \\\\\\\"save highlighted characters\\\\\\\"\\\\n\\\\t\\\\t\\\\t[UndoSelection _ self selection]. \\\\n\\\\t\\\\tself zapSelectionWith: \\\\n\\\\t\\\\t\\\\t(Text string: typeAhead contents emphasis: emphasisHere).\\\\n\\\\t\\\\ttypeAhead reset.\\\\n\\\\t\\\\tself unselect.\\\\n\\\\t\\\\tsensor keyboardPressed ifFalse: \\\\n\\\\t\\\\t\\\\t[self selectAndScroll.\\\\n\\\\t\\\\t\\\\tsensor keyboardPressed\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self updateMarker]]]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing support' stamp: 'th 9/18/2002 16:49'!\\\\nsetEmphasisHere\\\\n\\\\n\\\\temphasisHere _ (paragraph text attributesAt: (self pointIndex - 1 max: 1) forStyle: paragraph textStyle)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tselect: [:att | att mayBeExtended]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing support' stamp: 'th 9/17/2002 16:23'!\\\\nsimulatedKeystroke: char\\\\n\\\\t\\\\\\\"Accept char as if it were struck on the keyboard.  This version does not yet deal with command keys, and achieves update in the receiver's typically inactive window via the sledge-hammer of uncache-bits.\\\\\\\"\\\\n\\\\n\\\\tself deselect.\\\\n\\\\tself openTypeIn.\\\\n\\\\tself markBlock = self pointBlock ifFalse: [UndoSelection _ self selection].\\\\n\\\\tself zapSelectionWith:\\\\n\\\\t\\\\t(Text string: char asString emphasis: emphasisHere).\\\\n\\\\tself userHasEdited.\\\\n\\\\tself unselect.\\\\n\\\\tself selectAndScroll.\\\\n\\\\tself updateMarker.\\\\n\\\\tview ifNotNil:\\\\n\\\\t\\\\t[view topView uncacheBits\\\\n\\\\t\\\\t\\\\\\\"in mvc, this makes sure the recognized character shows up in the pane right now; in morphic, a different mechanism is used for the same effect -- see TextMorphEditor method #recognizeCharactersWhileMouseIn:\\\\\\\"]\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing support' stamp: 'di 10/6/1998 08:45'!\\\\nstartOfTyping\\\\n\\\\t\\\\\\\"Compatibility during change from characterBlock to integer\\\\\\\"\\\\n\\\\tbeginTypeInBlock == nil ifTrue: [^ nil].\\\\n\\\\tbeginTypeInBlock isNumber ifTrue: [^ beginTypeInBlock].\\\\n\\\\t\\\\\\\"Last line for compatibility during change from CharacterBlock to Integer.\\\\\\\"\\\\n\\\\t^ beginTypeInBlock stringIndex\\\\n\\\\t! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys' stamp: 'th 9/20/2002 11:22'!\\\\nargAdvance: characterStream\\\\n\\\\t\\\\\\\"Invoked by Ctrl-a.  Useful after Ctrl-q.\\\\n\\\\t Search forward from the end of the selection for a colon followed by\\\\n\\\\t\\\\ta space.  Place the caret after the space.  If none are found, place the\\\\n\\\\t\\\\tcaret at the end of the text.  Does not affect the undoability of the \\\\n\\\\t \\\\tprevious command.\\\\\\\"\\\\n\\\\n\\\\t| start |\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tstart _ paragraph text findString: ': ' startingAt: self stopIndex.\\\\n\\\\tstart = 0 ifTrue: [start _ paragraph text size + 1].\\\\n\\\\tself selectAt: start + 2.\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys' stamp: 'th 10/21/2003 15:46'!\\\\nbackWord: characterStream \\\\n\\\\t\\\\\\\"If the selection is not a caret, delete it and leave it in the backspace buffer.\\\\n\\\\t Else if there is typeahead, delete it.\\\\n\\\\t Else, delete the word before the caret.\\\\\\\"\\\\n\\\\n\\\\t| startIndex |\\\\n\\\\tsensor keyboard.\\\\n\\\\tcharacterStream isEmpty\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self hasCaret\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\\\\"a caret, delete at least one character\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[startIndex _ 1 max: self markIndex - 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[startIndex > 1 and:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[(paragraph text at: startIndex - 1) asCharacter tokenish]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twhileTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[startIndex _ startIndex - 1]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\\\\"a non-caret, just delete it\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[startIndex _ self markIndex].\\\\n\\\\t\\\\t\\\\tself backTo: startIndex]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[characterStream reset].\\\\n\\\\t^false! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys' stamp: 'th 9/19/2002 18:23'!\\\\nbackspace: characterStream \\\\n\\\\t\\\\\\\"Backspace over the last character.\\\\\\\"\\\\n\\\\n\\\\t| startIndex |\\\\n\\\\tsensor leftShiftDown ifTrue: [^ self backWord: characterStream].\\\\n\\\\tcharacterStream isEmpty\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[startIndex _ self markIndex +\\\\n\\\\t\\\\t\\\\t\\\\t(self hasCaret ifTrue: [0] ifFalse: [1]).\\\\n\\\\t\\\\t\\\\t[sensor keyboardPressed and:\\\\n\\\\t\\\\t\\\\t [sensor keyboardPeek asciiValue = 8]] whileTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"process multiple backspaces\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tsensor keyboard.\\\\n\\\\t\\\\t\\\\t\\\\tstartIndex _ 1 max: startIndex - 1.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\tself backTo: startIndex]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[sensor keyboard.\\\\n\\\\t\\\\t\\\\tcharacterStream skip: -1].\\\\n\\\\t^false! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys'!\\\\nchangeStyle: characterStream \\\\n\\\\t\\\\\\\"Put up the style-change menu\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself changeStyle.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys' stamp: 'th 9/20/2002 11:25'!\\\\ncrWithIndent: characterStream \\\\n\\\\t\\\\\\\"Replace the current text selection with CR followed by as many tabs\\\\n\\\\tas on the current line (+/- bracket count) -- initiated by Shift-Return.\\\\\\\"\\\\n\\\\t| char s i tabCount |\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\ts _ paragraph string.\\\\n\\\\ti _ self stopIndex.\\\\n\\\\ttabCount _ 0.\\\\n\\\\t[(i _ i-1) > 0 and: [(char _ s at: i) ~= Character cr]]\\\\n\\\\t\\\\twhileTrue:  \\\\\\\"Count tabs and brackets (but not a leading bracket)\\\\\\\"\\\\n\\\\t\\\\t[(char = Character tab and: [i < s size and: [(s at: i+1) ~= $[ ]]) ifTrue: [tabCount _ tabCount + 1].\\\\n\\\\t\\\\tchar = $[ ifTrue: [tabCount _ tabCount + 1].\\\\n\\\\t\\\\tchar = $] ifTrue: [tabCount _ tabCount - 1]].\\\\n\\\\tcharacterStream crtab: tabCount.  \\\\\\\"Now inject CR with tabCount tabs\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys' stamp: 'sw 4/30/2001 21:20'!\\\\ncursorTopHome: characterStream \\\\n\\\\t\\\\\\\"Put cursor at beginning of text -- invoked from cmd-H shortcut, useful for keyboards that have no home key.\\\\\\\"\\\\n\\\\t\\\\n\\\\tsensor keyboard.\\\\n\\\\tself selectAt: 1.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys'!\\\\ndisplayIfFalse: characterStream \\\\n\\\\t\\\\\\\"Replace the current text selection with the text 'ifFalse:'--initiated by \\\\n\\\\tctrl-f.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tcharacterStream nextPutAll: 'ifFalse:'.\\\\n\\\\t^false! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys'!\\\\ndisplayIfTrue: characterStream \\\\n\\\\t\\\\\\\"Replace the current text selection with the text 'ifTrue:'--initiated by \\\\n\\\\tctrl-t.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tcharacterStream nextPutAll: 'ifTrue:'.\\\\n\\\\t^false! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys'!\\\\ndoAgainMany: characterStream \\\\n\\\\t\\\\\\\"Do the previous thing again repeatedly. 1/26/96 sw\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself againOrSame: (UndoMessage sends: #undoAgain:andReselect:typedKey:) many: true.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys'!\\\\ndoAgainOnce: characterStream \\\\n\\\\t\\\\\\\"Do the previous thing again once. 1/26/96 sw\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself again.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys'!\\\\nfind: characterStream\\\\n\\\\t\\\\\\\"Prompt the user for what to find, then find it, searching from the current selection onward.  1/24/96 sw\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself find.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys'!\\\\nfindAgain: characterStream \\\\n\\\\t\\\\\\\"Find the desired text again.  1/24/96 sw\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself findAgain.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys' stamp: 'th 9/18/2002 11:39'!\\\\nforwardDelete: characterStream\\\\n\\\\t\\\\\\\"Delete forward over the next character.\\\\n\\\\t  Make Undo work on the whole type-in, not just the one char.\\\\n\\\\twod 11/3/1998: If there was a selection use #zapSelectionWith: rather than #backspace: which was 'one off' in deleting the selection. Handling of things like undo or typeIn area were not fully considered.\\\\\\\"\\\\n\\\\t| startIndex usel upara uinterval ind stopIndex |\\\\n\\\\tstartIndex _ self mark.\\\\n\\\\tstartIndex > paragraph text size ifTrue:\\\\n\\\\t\\\\t[sensor keyboard.\\\\n\\\\t\\\\t^ false].\\\\n\\\\tself hasSelection ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"there was a selection\\\\\\\"\\\\n\\\\t\\\\tsensor keyboard.\\\\n\\\\t\\\\tself zapSelectionWith: self nullText.\\\\n\\\\t\\\\t^ false].\\\\n\\\\t\\\\\\\"Null selection - do the delete forward\\\\\\\"\\\\n\\\\tbeginTypeInBlock == nil\\\\t\\\\\\\"no previous typing.  openTypeIn\\\\\\\"\\\\n\\\\t\\\\tifTrue: [self openTypeIn. UndoSelection _ self nullText].\\\\n\\\\tuinterval _ UndoInterval deepCopy.\\\\n\\\\tupara _ UndoParagraph deepCopy.\\\\n\\\\tstopIndex := startIndex.\\\\n\\\\t(sensor keyboard asciiValue = 127 and: [sensor leftShiftDown])\\\\n\\\\t\\\\tifTrue: [stopIndex := (self nextWord: stopIndex) - 1].\\\\n\\\\tself selectFrom: startIndex to: stopIndex.\\\\n\\\\tself replaceSelectionWith: self nullText.\\\\n\\\\tself selectFrom: startIndex to: startIndex-1.\\\\n\\\\tUndoParagraph _ upara.  UndoInterval _ uinterval.\\\\n\\\\tUndoMessage selector == #noUndoer ifTrue: [\\\\n\\\\t\\\\t(UndoSelection isText) ifTrue: [\\\\n\\\\t\\\\t\\\\tusel _ UndoSelection.\\\\n\\\\t\\\\t\\\\tind _ startIndex. \\\\\\\"UndoInterval startIndex\\\\\\\"\\\\n\\\\t\\\\t\\\\tusel replaceFrom: usel size + 1 to: usel size with:\\\\n\\\\t\\\\t\\\\t\\\\t(UndoParagraph text copyFrom: ind to: ind).\\\\n\\\\t\\\\t\\\\tUndoParagraph text replaceFrom: ind to: ind with:\\\\nself nullText]].\\\\n\\\\t^false! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys'!\\\\nnormalCharacter: characterStream \\\\n\\\\t\\\\\\\"A nonspecial character is to be added to the stream of characters.\\\\\\\"\\\\n\\\\n\\\\tcharacterStream nextPut: sensor keyboard.\\\\n\\\\t^false! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys' stamp: 'th 9/19/2002 18:25'!\\\\nquerySymbol: characterStream\\\\n\\\\t\\\\\\\"Invoked by Ctrl-q to query the Symbol table and display alternate symbols.\\\\n\\\\t See comment in completeSymbol:lastOffering: for details.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\t\\\\\\\"keep typeahead\\\\\\\"\\\\n\\\\tself hasCaret\\\\n\\\\t\\\\tifTrue: \\\\\\\"Ctrl-q typed when a caret\\\\\\\"\\\\n\\\\t\\\\t\\\\t[self perform: #completeSymbol:lastOffering: withArguments:\\\\n\\\\t\\\\t\\\\t\\\\t((UndoParagraph == paragraph and: [UndoMessage sends: #undoQuery:lastOffering:])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [UndoMessage arguments] \\\\\\\"repeated Ctrl-q\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [Array with: nil with: nil])] \\\\\\\"initial Ctrl-q\\\\\\\"\\\\n\\\\t\\\\tifFalse: \\\\\\\"Ctrl-q typed when statements were highlighted\\\\\\\"\\\\n\\\\t\\\\t\\\\t[view flash].\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys'!\\\\nsearch: characterStream\\\\n\\\\t\\\\\\\"Invoked by Ctrl-S.  Same as 'again', but always uses the existing FindText\\\\n\\\\t and ChangeText regardless of the last edit.\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself againOrSame: true. \\\\\\\"true means use same keys\\\\\\\"\\\\n\\\\t^true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys' stamp: 'sw 8/29/2000 14:58'!\\\\nselectAll\\\\n\\\\t\\\\\\\"Make the selection be all the characters of the receiver\\\\\\\"\\\\n\\\\n\\\\tself selectFrom: 1 to: paragraph text string size! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys'!\\\\nselectAll: characterStream \\\\n\\\\t\\\\\\\"select everything, invoked by cmd-a.  1/17/96 sw\\\\\\\"\\\\n\\\\n\\\\tsensor keyboard.\\\\t\\\\t\\\\\\\"flush character\\\\\\\"\\\\n\\\\tself closeTypeIn: characterStream.\\\\n\\\\tself selectFrom: 1 to: paragraph text string size.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'typing/selecting keys' stamp: 'th 9/19/2002 17:34'!\\\\nsimulatedBackspace\\\\n\\\\t\\\\\\\"Backspace over the last character, derived from hand-char recognition.  2/5/96 sw\\\\\\\"\\\\n\\\\n\\\\t| startIndex |\\\\n\\\\tstartIndex _ self markIndex + (self hasSelection ifTrue: [1] ifFalse: [0]).\\\\n\\\\n\\\\tstartIndex _ 1 max: startIndex - 1.\\\\n\\\\tself backTo: startIndex.\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'undo support'!\\\\nisDoing\\\\n\\\\t\\\\\\\"Call from a doer/undoer/redoer any time to see which it is.\\\\\\\"\\\\n\\\\n\\\\t^(self isUndoing | self isRedoing) not! !\\\\n\\\\n!ParagraphEditor methodsFor: 'undo support'!\\\\nisRedoing\\\\n\\\\t\\\\\\\"Call from a doer/undoer/redoer any time to see which it is.\\\\\\\"\\\\n\\\\n\\\\t^UndoParagraph == #redoing! !\\\\n\\\\n!ParagraphEditor methodsFor: 'undo support'!\\\\nisUndoing\\\\n\\\\t\\\\\\\"Call from a doer/undoer/redoer any time to see which it is.\\\\\\\"\\\\n\\\\n\\\\t^UndoParagraph == #undoing! !\\\\n\\\\n!ParagraphEditor methodsFor: 'undo support'!\\\\nnoUndoer\\\\n\\\\t\\\\\\\"The Undoer to use when the command can not be undone.  Checked for\\\\n\\\\t specially by readKeyboard.\\\\\\\"\\\\n\\\\n\\\\tUndoMessage _ Message selector: #noUndoer! !\\\\n\\\\n!ParagraphEditor methodsFor: 'undo support'!\\\\nundoMessage: aMessage forRedo: aBoolean\\\\n\\\\t\\\\\\\"Call this from an undoer/redoer to set up UndoMessage as the\\\\n\\\\t corresponding redoer/undoer.  Also set up UndoParagraph, as well\\\\n\\\\t as the state variable Undone.  It is assumed that UndoInterval has been\\\\n\\\\t established (generally by zapSelectionWith:) and that UndoSelection has been\\\\n\\\\t saved (generally by replaceSelectionWith: or replace:With:and:).\\\\\\\"\\\\n\\\\n\\\\tself isDoing ifTrue: [UndoParagraph _ paragraph].\\\\n\\\\tUndoMessage _ aMessage.\\\\n\\\\tUndone _ aBoolean! !\\\\n\\\\n!ParagraphEditor methodsFor: 'undo support'!\\\\nundoer: aSelector\\\\n\\\\t\\\\\\\"See comment in undoMessage:.  Use this version when aSelector has no arguments, and you are doing or redoing and want to prepare for undoing.\\\\\\\"\\\\n\\\\n\\\\tself undoMessage: (Message selector: aSelector) forRedo: false! !\\\\n\\\\n!ParagraphEditor methodsFor: 'undo support'!\\\\nundoer: aSelector with: arg1\\\\n\\\\t\\\\\\\"See comment in undoMessage:.  Use this version when aSelector has one argument, and you are doing or redoing and want to prepare for undoing.\\\\\\\"\\\\n\\\\n\\\\tself undoMessage: (Message selector: aSelector argument: arg1) forRedo: false! !\\\\n\\\\n!ParagraphEditor methodsFor: 'undo support'!\\\\nundoer: aSelector with: arg1 with: arg2\\\\n\\\\t\\\\\\\"See comment in undoMessage:.  Use this version when aSelector has two arguments, and you are doing or redoing and want to prepare for undoing.\\\\\\\"\\\\n\\\\n\\\\tself undoMessage: (Message selector: aSelector arguments: (Array with: arg1 with: arg2)) forRedo: false! !\\\\n\\\\n!ParagraphEditor methodsFor: 'undo support'!\\\\nundoer: aSelector with: arg1 with: arg2 with: arg3\\\\n\\\\t\\\\\\\"See comment in undoMessage:.  Use this version when aSelector has three arguments, and you are doing or redoing and want to prepare for undoing.\\\\\\\"\\\\n\\\\n\\\\tself undoMessage: (Message selector: aSelector arguments: (Array with: arg1 with: arg2 with: arg3)) forRedo: false! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'undoers'!\\\\nundoAgain: indices andReselect: home typedKey: wasTypedKey\\\\n\\\\t\\\\\\\"The last command was again.  Undo it. Redoer: itself.\\\\\\\"\\\\n\\\\n\\\\t| findSize substText index subject |\\\\n\\\\t(self isRedoing & wasTypedKey) ifTrue: \\\\\\\"redelete search key\\\\\\\"\\\\n\\\\t\\\\t[self selectInterval: home.\\\\n\\\\t\\\\tself zapSelectionWith: self nullText].\\\\n\\\\n\\\\tfindSize _ (self isRedoing ifTrue: [FindText] ifFalse: [ChangeText]) size.\\\\n\\\\tsubstText _ self isUndoing ifTrue: [FindText] ifFalse: [ChangeText].\\\\n\\\\t(self isUndoing ifTrue: [indices size to: 1 by: -1] ifFalse: [1 to: indices size]) do:\\\\n\\\\t\\\\t[:i |\\\\n\\\\t\\\\tindex _ indices at: i.\\\\n\\\\t\\\\t(subject _ index to: index + findSize - 1) = self selectionInterval ifFalse:\\\\n\\\\t\\\\t\\\\t[self selectInterval: subject].\\\\n\\\\t\\\\tFindText == ChangeText ifFalse: [self zapSelectionWith: substText]].\\\\n\\\\n\\\\tself isUndoing\\\\n\\\\t\\\\tifTrue:  \\\\\\\"restore selection to where it was when 'again' was invoked\\\\\\\"\\\\n\\\\t\\\\t\\\\t[wasTypedKey\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\\\\"search started by typing key at a caret; restore it\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self selectAt: home first.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself zapSelectionWith: FindText.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself selectAt: home last + 1]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self selectInterval: home]].\\\\n\\\\n\\\\tself undoMessage: UndoMessage forRedo: self isUndoing! !\\\\n\\\\n!ParagraphEditor methodsFor: 'undoers'!\\\\nundoAndReselect: undoHighlight redoAndReselect: redoHighlight\\\\n\\\\t\\\\\\\"Undo typing, cancel, paste, and other operations that are like replaces\\\\n\\\\t but the selection is not the whole restored text after undo, redo, or both.\\\\n\\\\t undoHighlight is selected after this phase and redoHighlight after the next phase.\\\\n\\\\tRedoer: itself.\\\\\\\"\\\\n\\\\n\\\\tself replace: self selectionInterval with: UndoSelection and:\\\\n\\\\t\\\\t[self selectInterval: undoHighlight].\\\\n\\\\tself undoMessage: (UndoMessage argument: redoHighlight) forRedo: self isUndoing\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'undoers'!\\\\nundoCutCopy: oldPasteBuffer\\\\n\\\\t\\\\\\\"Undo of a cut, copy, or any edit that changed CurrentSelection.  Be sure\\\\n\\\\t undo-copy does not lock the model.  Redoer: itself, so never isRedoing.\\\\\\\"\\\\n\\\\n\\\\t| recentCut |\\\\n\\\\trecentCut _ self clipboardText.\\\\t\\\\n\\\\tUndoSelection size = UndoInterval size\\\\n\\\\t\\\\tifFalse: [self replaceSelectionWith: UndoSelection].\\\\n\\\\tself clipboardTextPut: oldPasteBuffer.\\\\n\\\\tself undoer: #undoCutCopy: with: recentCut! !\\\\n\\\\n!ParagraphEditor methodsFor: 'undoers' stamp: 'th 9/19/2002 18:46'!\\\\nundoQuery: hintText lastOffering: selectorOrNil\\\\n\\\\t\\\\\\\"Undo ctrl-q.  selectorOrNil (if not nil) is the previously offered selector.\\\\n\\\\t hintText is the original hint.  Redoer: completeSymbol.\\\\\\\"\\\\n\\\\n\\\\tself zapSelectionWith: UndoSelection.\\\\n\\\\tself undoMessage: (Message selector: #completeSymbol:lastOffering: arguments: UndoMessage arguments) forRedo: true.\\\\n\\\\tself selectAt: self stopIndex! !\\\\n\\\\n!ParagraphEditor methodsFor: 'undoers'!\\\\nundoReplace\\\\n\\\\t\\\\\\\"Undo of any command that replaced a selection by other text that it left\\\\n\\\\t highlighted, and that is undone and redone by simple reversal of the\\\\n\\\\t operation.  This is the most common Undoer; call replaceSelectionWith:\\\\n\\\\t to get this setup.  Redoer: itself, so never isRedoing.\\\\\\\"\\\\n\\\\n\\\\tself replaceSelectionWith: UndoSelection! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nbrowseChangeSetsWithSelector\\\\n\\\\t\\\\\\\"Determine which, if any, change sets have at least one change for the selected selector, independent of class\\\\\\\"\\\\n\\\\n\\\\t| aSelector |\\\\n\\\\tself lineSelectAndEmptyCheck: [^ self].\\\\n\\\\t(aSelector := self selectedSelector) == nil ifTrue: [^ view flash].\\\\n\\\\tself terminateAndInitializeAround: [ChangeSorter browseChangeSetsWithSelector: aSelector]! !\\\\n\\\\n!ParagraphEditor methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nbrowseItHere\\\\n\\\\t\\\\\\\"Retarget the receiver's window to look at the selected class, if appropriate.  3/1/96 sw\\\\\\\"\\\\n\\\\t| aSymbol foundClass b |\\\\n\\\\t(((b := model) isKindOf: Browser) and: [b couldBrowseAnyClass])\\\\n\\\\t\\\\tifFalse: [^ view flash].\\\\n\\\\tmodel okToChange ifFalse: [^ view flash].\\\\n\\\\tself selectionInterval isEmpty ifTrue: [self selectWord].\\\\n\\\\t(aSymbol := self selectedSymbol) isNil ifTrue: [^ view flash].\\\\n\\\\n\\\\tself terminateAndInitializeAround:\\\\n\\\\t\\\\t[foundClass := (Smalltalk at: aSymbol ifAbsent: [nil]).\\\\n\\\\t\\\\t\\\\tfoundClass isNil ifTrue: [^ view flash].\\\\n\\\\t\\\\t\\\\t(foundClass isKindOf: Class)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[model systemCategoryListIndex: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(model systemCategoryList indexOf: foundClass category).\\\\n\\\\t\\\\tmodel classListIndex: (model classList indexOf: foundClass name)]]! !\\\\n\\\\n!ParagraphEditor methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\ndebugIt\\\\n\\\\n\\\\t| method receiver context |\\\\n\\\\t(model respondsTo: #doItReceiver) \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[FakeClassPool adopt: model selectedClass.\\\\n\\\\t\\\\t\\\\treceiver := model doItReceiver.\\\\n\\\\t\\\\t\\\\tcontext := model doItContext]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[receiver := context := nil].\\\\n\\\\tself lineSelectAndEmptyCheck: [^self].\\\\n\\\\tmethod := self compileSelectionFor: receiver in: context.\\\\n\\\\tmethod notNil ifTrue:\\\\n\\\\t\\\\t[self debug: method receiver: receiver in: context].\\\\n\\\\tFakeClassPool adopt: nil! !\\\\n\\\\n!ParagraphEditor methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\ndebug: aCompiledMethod receiver: anObject in: evalContext\\\\n\\\\n\\\\t| selector guineaPig debugger context |\\\\n\\\\tselector := evalContext isNil ifTrue: [#DoIt] ifFalse: [#DoItIn:].\\\\n\\\\tanObject class addSelectorSilently: selector withMethod: aCompiledMethod.\\\\n\\\\tguineaPig := evalContext isNil\\\\n\\\\t\\\\tifTrue: [[anObject DoIt] newProcess]\\\\n\\\\t\\\\tifFalse: [[anObject DoItIn: evalContext] newProcess].\\\\n\\\\tcontext := guineaPig suspendedContext.\\\\n\\\\tdebugger := Debugger new\\\\n\\\\t\\\\tprocess: guineaPig\\\\n\\\\t\\\\tcontroller: ((Smalltalk isMorphic not and: [ScheduledControllers inActiveControllerProcess])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [ScheduledControllers activeController]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [nil])\\\\n\\\\t\\\\tcontext: context\\\\n\\\\t\\\\tisolationHead: nil.\\\\n\\\\tdebugger openFullNoSuspendLabel: 'Debug it'.\\\\n\\\\t[debugger interruptedContext method == aCompiledMethod]\\\\n\\\\t\\\\twhileFalse: [debugger send].\\\\n\\\\tanObject class basicRemoveSelector: selector! !\\\\n\\\\n\\\\n!ParagraphEditor methodsFor: 'private' stamp: 'th 9/19/2002 18:48'!\\\\nagainOnce: indices\\\\n\\\\t\\\\\\\"Find the next occurrence of FindText.  If none, answer false.\\\\n\\\\tAppend the start index of the occurrence to the stream indices, and, if\\\\n\\\\tChangeText is not the same object as FindText, replace the occurrence by it.\\\\n\\\\tNote that the search is case-sensitive for replacements, otherwise not.\\\\\\\"\\\\n\\\\n\\\\t| where |\\\\n\\\\twhere _ paragraph text findString: FindText startingAt: self stopIndex\\\\n\\\\t\\\\t\\\\t\\\\tcaseSensitive: ((ChangeText ~~ FindText) or: [Preferences caseSensitiveFinds]).\\\\n\\\\twhere = 0 ifTrue: [^ false].\\\\n\\\\tself deselect; selectInvisiblyFrom: where to: where + FindText size - 1.\\\\n\\\\tChangeText ~~ FindText ifTrue: [self zapSelectionWith: ChangeText].\\\\n\\\\tindices nextPut: where.\\\\n\\\\tself selectAndScroll.\\\\n\\\\t^ true! !\\\\n\\\\n!ParagraphEditor methodsFor: 'private'!\\\\nagainOrSame: useOldKeys\\\\n\\\\t\\\\\\\"Subroutine of search: and again.  If useOldKeys, use same FindText and ChangeText as before.\\\\n\\\\t 1/26/96 sw: real worked moved to againOrSame:many:\\\\\\\"\\\\n\\\\n\\\\t^ self againOrSame: useOldKeys many: sensor leftShiftDown! !\\\\n\\\\n!ParagraphEditor methodsFor: 'private' stamp: 'th 9/18/2002 16:53'!\\\\nagainOrSame: useOldKeys many: many\\\\n\\\\t\\\\\\\"Subroutine of search: and again.  If useOldKeys, use same FindText and ChangeText as before.  If many is true, do it repeatedly.  Created 1/26/96 sw by adding the many argument to #againOrSame.\\\\\\\"\\\\n\\\\n\\\\t|  home indices wasTypedKey |\\\\n\\\\n\\\\thome _ self selectionInterval.  \\\\\\\"what was selected when 'again' was invoked\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"If new keys are to be picked...\\\\\\\"\\\\n\\\\tuseOldKeys ifFalse: \\\\\\\"Choose as FindText...\\\\\\\"\\\\n\\\\t\\\\t[FindText _ UndoSelection.  \\\\\\\"... the last thing replaced.\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"If the last command was in another paragraph, ChangeText is set...\\\\\\\"\\\\n\\\\t\\\\tparagraph == UndoParagraph ifTrue: \\\\\\\"... else set it now as follows.\\\\\\\"\\\\n\\\\t\\\\t\\\\t[UndoInterval ~= home ifTrue: [self selectInterval: UndoInterval]. \\\\\\\"blink\\\\\\\"\\\\n\\\\t\\\\t\\\\tChangeText _ ((UndoMessage sends: #undoCutCopy:) and: [self hasSelection])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [FindText] \\\\\\\"== objects signal no model-locking by 'undo copy'\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self selection]]]. \\\\\\\"otherwise, change text is last-replaced text\\\\\\\"\\\\n\\\\n\\\\t(wasTypedKey _ FindText size = 0)\\\\n\\\\t\\\\tifTrue: \\\\\\\"just inserted at a caret\\\\\\\"\\\\n\\\\t\\\\t\\\\t[home _ self selectionInterval.\\\\n\\\\t\\\\t\\\\tself replaceSelectionWith: self nullText.  \\\\\\\"delete search key...\\\\\\\"\\\\n\\\\t\\\\t\\\\tFindText _ ChangeText] \\\\\\\"... and search for it, without replacing\\\\\\\"\\\\n\\\\t\\\\tifFalse: \\\\\\\"Show where the search will start\\\\\\\"\\\\n\\\\t\\\\t\\\\t[home last = self selectionInterval last ifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[self selectInterval: home]].\\\\n\\\\n\\\\t\\\\\\\"Find and Change, recording start indices in the array\\\\\\\"\\\\n\\\\tindices _ WriteStream on: (Array new: 20). \\\\\\\"an array to store change locs\\\\\\\"\\\\n\\\\t[(self againOnce: indices) & many] whileTrue. \\\\\\\"<-- this does the work\\\\\\\"\\\\n\\\\tindices isEmpty ifTrue:  \\\\\\\"none found\\\\\\\"\\\\n\\\\t\\\\t[self flash.\\\\n\\\\t\\\\twasTypedKey ifFalse: [^self]].\\\\n\\\\n\\\\t(many | wasTypedKey) ifFalse: \\\\\\\"after undo, select this replacement\\\\\\\"\\\\n\\\\t\\\\t[home _ self startIndex to:\\\\n\\\\t\\\\t\\\\tself startIndex + UndoSelection size - 1].\\\\n\\\\n\\\\tself undoer: #undoAgain:andReselect:typedKey: with: indices contents with: home with: wasTypedKey! !\\\\n\\\\n!ParagraphEditor methodsFor: 'private' stamp: 'th 9/19/2002 18:16'!\\\\ncompleteSymbol: hintText lastOffering: selectorOrNil\\\\n\\\\t\\\\\\\"Invoked by Ctrl-q when there is only a caret.\\\\n\\\\t\\\\tDo selector-completion, i.e., try to replace the preceding identifier by a\\\\n\\\\t\\\\tselector that begins with those characters & has as many keywords as possible.\\\\n\\\\t \\\\tLeave two spaces after each colon (only one after the last) as space for\\\\n\\\\t\\\\targuments.  Put the caret after the space after the first keyword.  If the\\\\n\\\\t\\\\tuser types Ctrl-q again immediately, choose a different selector.\\\\n\\\\t Undoer: #undoQuery:lastOffering:; Redoer: itself.\\\\n\\\\tIf redoing, just redisplay the last offering, selector[OrNil].\\\\\\\"\\\\n\\\\n\\\\t| firstTime input prior caret newStart sym kwds outStream |\\\\n\\\\tfirstTime _ self isRedoing\\\\n\\\\t\\\\tifTrue: [prior _ sym _ selectorOrNil. true]\\\\n\\\\t\\\\tifFalse: [hintText isNil].\\\\n\\\\tfirstTime\\\\n\\\\t\\\\tifTrue: \\\\\\\"Initial Ctrl-q (or redo)\\\\\\\"\\\\t\\\\t\\\\t\\\\t\\\\t\\\\n\\\\t\\\\t\\\\t[caret _ self startIndex.\\\\n\\\\t\\\\t\\\\tself selectPrecedingIdentifier.\\\\n\\\\t\\\\t\\\\tinput _ self selection]\\\\n\\\\t\\\\tifFalse: \\\\\\\"Repeated Ctrl-q\\\\\\\"\\\\n\\\\t\\\\t\\\\t[caret _ UndoInterval first + hintText size.\\\\n\\\\t\\\\t\\\\tself selectInvisiblyFrom: UndoInterval first to: UndoInterval last.\\\\n\\\\t\\\\t\\\\tinput _ hintText.\\\\n\\\\t\\\\t\\\\tprior _ selectorOrNil].\\\\n\\\\t(input size ~= 0 and: [sym ~~ nil or:\\\\n\\\\t\\\\t\\\\t[(sym _ Symbol thatStarts: input string skipping: prior) ~~ nil]])\\\\n\\\\t\\\\tifTrue: \\\\\\\"found something to offer\\\\\\\"\\\\n\\\\t\\\\t\\\\t[newStart _ self startIndex.\\\\n\\\\t\\\\t\\\\toutStream _ WriteStream on: (String new: 2 * sym size).\\\\n\\\\t\\\\t\\\\t1 to: (kwds _ sym keywords) size do:\\\\n\\\\t\\\\t\\\\t\\\\t[:i |\\\\n\\\\t\\\\t\\\\t\\\\toutStream nextPutAll: (kwds at: i).\\\\n\\\\t\\\\t\\\\t\\\\ti = 1 ifTrue: [caret _ newStart + outStream contents size + 1].\\\\n\\\\t\\\\t\\\\t\\\\toutStream nextPutAll:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(i < kwds size ifTrue: ['  '] ifFalse: [' '])].\\\\n\\\\t\\\\t\\\\tUndoSelection _ input.\\\\n\\\\t\\\\t\\\\tself deselect; zapSelectionWith: outStream contents asText.\\\\n\\\\t\\\\t\\\\tself undoer: #undoQuery:lastOffering: with: input with: sym]\\\\n\\\\t\\\\tifFalse: \\\\\\\"no more matches\\\\\\\"\\\\n\\\\t\\\\t\\\\t[firstTime ifFalse: \\\\\\\"restore original text & set up for a redo\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t[UndoSelection _ self selection.\\\\n\\\\t\\\\t\\\\t\\\\tself deselect; zapSelectionWith: input.\\\\n\\\\t\\\\t\\\\t\\\\tself undoer: #completeSymbol:lastOffering: with: input with: prior.\\\\n\\\\t\\\\t\\\\t\\\\tUndone _ true].\\\\n\\\\t\\\\t\\\\tview flash].\\\\n\\\\tself selectAt: caret! !\\\\n\\\\n!ParagraphEditor methodsFor: 'private' stamp: 'th 9/18/2002 16:49'!\\\\nexchangeWith: prior\\\\n\\\\t\\\\\\\"If the prior selection is non-overlapping and legal, exchange the text of\\\\n\\\\t it with the current selection and leave the currently selected text selected\\\\n\\\\t in the location of the prior selection (or leave a caret after a non-caret if it was\\\\n\\\\t exchanged with a caret).  If both selections are carets, flash & do nothing.\\\\n\\\\t Don't affect the paste buffer.  Undoer: itself; Redoer: Undoer.\\\\\\\"\\\\n\\\\n\\\\t| start stop before selection priorSelection delta altInterval |\\\\n\\\\tstart _ self startIndex.\\\\n\\\\tstop _ self stopIndex - 1.\\\\n\\\\t((prior first <= prior last) | (start <= stop) \\\\\\\"Something to exchange\\\\\\\" and:\\\\n\\\\t\\\\t\\\\t[self isDisjointFrom: prior])\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[before _ prior last < start.\\\\n\\\\t\\\\t\\\\tselection _ self selection.\\\\n\\\\t\\\\t\\\\tpriorSelection _ paragraph text copyFrom: prior first to: prior last.\\\\n\\\\n\\\\t\\\\t\\\\tdelta _ before ifTrue: [0] ifFalse: [priorSelection size - selection size].\\\\n\\\\t\\\\t\\\\tself zapSelectionWith: priorSelection.\\\\n\\\\t\\\\t\\\\tself selectFrom: prior first + delta to: prior last + delta.\\\\n\\\\n\\\\t\\\\t\\\\tdelta _ before ifTrue: [stop - prior last] ifFalse: [start - prior first].\\\\n\\\\t\\\\t\\\\tself zapSelectionWith: selection.\\\\n\\\\t\\\\t\\\\taltInterval _ prior first + delta to: prior last + delta.\\\\n\\\\t\\\\t\\\\tself undoer: #exchangeWith: with: altInterval.\\\\n\\\\t\\\\t\\\\t\\\\\\\"If one was a caret, make it otherInterval & leave the caret after the other\\\\\\\"\\\\n\\\\t\\\\t\\\\tprior first > prior last ifTrue: [self selectAt: UndoInterval last + 1].\\\\n\\\\t\\\\t\\\\totherInterval _ start > stop\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self selectAt: altInterval last + 1. UndoInterval]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [altInterval]]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[view flash]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'private' stamp: 'raok 11/15/2001 14:01'!\\\\nexplainDelimitor: string\\\\n\\\\t\\\\\\\"Is string enclosed in delimitors?\\\\\\\"\\\\n\\\\n\\\\t| str |\\\\n\\\\t(string at: 1) isLetter ifTrue: [^nil].  \\\\\\\"only special chars\\\\\\\"\\\\n\\\\t(string first = string last) ifTrue:\\\\n\\\\t\\\\t\\\\t[^ self explainChar: (String with: string first)]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[(string first = $( and: [string last = $)]) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[^ self explainChar: (String with: string first)].\\\\n\\\\t\\\\t\\\\t(string first = $[ and: [string last = $]]) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[^ self explainChar: (String with: string first)].\\\\n\\\\t\\\\t\\\\t(string first = ${ and: [string last = $}]) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[^ self explainChar: (String with: string first)].\\\\n\\\\t\\\\t\\\\t(string first = $< and: [string last = $>]) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[^ self explainChar: (String with: string first)].\\\\n\\\\t\\\\t\\\\t(string first = $# and: [string last = $)]) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[^'\\\\\\\"An instance of class Array.  The Numbers, Characters, or Symbols between the parenthesis are the elements of the Array.\\\\\\\"'].\\\\n\\\\t\\\\t\\\\tstring first = $# ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[^'\\\\\\\"An instance of class Symbol.\\\\\\\"'].\\\\n\\\\t\\\\t\\\\t(string first = $$ and: [string size = 2]) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[^'\\\\\\\"An instance of class Character.  This one is the character ', (String with: string last), '.\\\\\\\"'].\\\\n\\\\t\\\\t\\\\t(string first = $:) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[str _ string allButFirst.\\\\n\\\\t\\\\t\\\\t\\\\t(self explainTemp: str) ~~ nil ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[^'\\\\\\\"An argument to this block will be bound to the temporary variable ',\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstr, '.\\\\\\\"']]].\\\\n\\\\t^ nil! !\\\\n\\\\n!ParagraphEditor methodsFor: 'private' stamp: 'tk 7/14/2000 12:15'!\\\\ngetPluggableYellowButtonMenu: shiftKeyState\\\\n\\\\t| customMenu |\\\\n\\\\t^ ((view ~~ nil) and: [(customMenu _ view getMenu: shiftKeyState) notNil])\\\\n\\\\t\\\\tifTrue: [customMenu]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[shiftKeyState\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self class shiftedYellowButtonMenu]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self class yellowButtonMenu]]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'private'!\\\\nindent: delta fromStream: inStream toStream: outStream\\\\n\\\\t\\\\\\\"Append the contents of inStream to outStream, adding or deleting delta or -delta\\\\n\\\\t tabs at the beginning, and after every CR except a final CR.  Do not add tabs\\\\n\\\\t to totally empty lines, and be sure nothing but tabs are removed from lines.\\\\\\\"\\\\n\\\\n\\\\t| ch skip cr tab prev atEnd |\\\\n\\\\tcr _ Character cr.\\\\n\\\\ttab _ Character tab.\\\\n\\\\tdelta > 0\\\\n\\\\t\\\\tifTrue: \\\\\\\"shift right\\\\\\\"\\\\n\\\\t\\\\t\\\\t[prev _ cr.\\\\n\\\\t\\\\t\\\\t [ch _ (atEnd _ inStream atEnd) ifTrue: [cr] ifFalse: [inStream next].\\\\n\\\\t\\\\t\\\\t  (prev == cr and: [ch ~~ cr]) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[delta timesRepeat: [outStream nextPut: tab]].\\\\n\\\\t\\\\t\\\\t  atEnd]\\\\n\\\\t\\\\t\\\\t\\\\twhileFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[outStream nextPut: ch.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tprev _ ch]]\\\\n\\\\t\\\\tifFalse: \\\\\\\"shift left\\\\\\\"\\\\n\\\\t\\\\t\\\\t[skip _ delta. \\\\\\\"a negative number\\\\\\\"\\\\n\\\\t\\\\t\\\\t [inStream atEnd] whileFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[((ch _ inStream next) == tab and: [skip < 0]) ifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[outStream nextPut: ch].\\\\n\\\\t\\\\t\\\\t\\\\tskip _ ch == cr ifTrue: [delta] ifFalse: [skip + 1]]]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'private' stamp: 'cmm 4/9/2004 14:00'!\\\\nisDisjointFrom: anInterval\\\\n\\\\t\\\\\\\"Answer true if anInterval is a caret not touching or within the current\\\\n\\\\t interval, or if anInterval is a non-caret that does not overlap the current\\\\n\\\\t selection.\\\\\\\"\\\\n\\\\n\\\\t| fudge |\\\\n\\\\tfudge _ anInterval size = 0 ifTrue: [1] ifFalse: [0].\\\\n\\\\t^(anInterval last + fudge < self startIndex or:\\\\n\\\\t\\\\t\\\\t[anInterval first - fudge >= self stopIndex])\\\\n! !\\\\n\\\\n!ParagraphEditor methodsFor: 'private' stamp: 'th 11/24/2002 17:13'!\\\\nlines\\\\n\\\\t\\\\\\\"Other than my member paragraph i compute lines based on logical\\\\n\\\\tline breaks, not optical (which may change due to line wrapping of the editor)\\\\\\\"\\\\n\\\\t| lines string index lineIndex stringSize |\\\\n\\\\tstring _ paragraph text string.\\\\n\\\\t\\\\\\\"Empty strings have no lines at all. Think of something.\\\\\\\"\\\\n\\\\tstring isEmpty ifTrue:[^{#(1 0 0)}].\\\\n\\\\tstringSize _ string size.\\\\n\\\\tlines _ OrderedCollection new: (string size // 15).\\\\n\\\\tindex _ 0.\\\\n\\\\tlineIndex _ 0.\\\\n\\\\tstring linesDo:[:line |\\\\n\\\\t\\\\tlines addLast: (Array\\\\n\\\\t\\\\t\\\\twith: (index _ index + 1)\\\\n\\\\t\\\\t\\\\twith: (lineIndex _ lineIndex + 1)\\\\n\\\\t\\\\t\\\\twith: (index _ index + line size min: stringSize))].\\\\n\\\\t\\\\\\\"Special workaround for last line empty.\\\\\\\"\\\\n\\\\tstring last == Character cr\\\\n\\\\t\\\\\\\"lines last last < stringSize\\\\\\\" ifTrue:[lines addLast:{stringSize +1. lineIndex+1. stringSize}].\\\\n\\\\t^lines! !\\\\n\\\\n!ParagraphEditor methodsFor: 'private' stamp: 'th 9/19/2002 19:57'!\\\\nmoveCursor: directionBlock forward: forward specialBlock: specialBlock\\\\n\\\\t\\\\\\\"Private - Move cursor.\\\\n\\\\tdirectionBlock is a one argument Block that computes the new Position from a given one.\\\\n\\\\tspecialBlock is a one argumentBlock that computes the new position from a given one under the alternate semantics.\\\\n\\\\tNote that directionBlock always is evaluated first.\\\\\\\"\\\\n\\\\t| shift indices newPosition |\\\\n\\\\tshift _ sensor leftShiftDown.\\\\n\\\\tindices _ self setIndices: shift forward: forward.\\\\n\\\\tnewPosition _ directionBlock value: (indices at: #moving).\\\\n\\\\t(sensor commandKeyPressed or:[sensor controlKeyPressed])\\\\n\\\\t\\\\tifTrue: [newPosition _ specialBlock value: newPosition].\\\\n\\\\tsensor keyboard.\\\\n\\\\tshift\\\\n\\\\t\\\\tifTrue: [self selectMark: (indices at: #fixed) point: newPosition - 1]\\\\n\\\\t\\\\tifFalse: [self selectAt: newPosition]! !\\\\n\\\\n!ParagraphEditor methodsFor: 'private' stamp: 'sma 12/15/1999 11:32'!\\\\nnextWord: position\\\\n\\\\t| string index |\\\\n\\\\tstring _ paragraph text string.\\\\n\\\\tindex _ position.\\\\n\\\\t[(index between: 1 and: string size) and: [(string at: index) isAlphaNumeric]]\\\\n\\\\t\\\\twhileTrue: [index _ index + 1].\\\\n\\\\t[(index between: 1 and: string size) and: [(string at: index) isAlphaNumeric not]]\\\\n\\\\t\\\\twhileTrue: [index _ index + 1].\\\\n\\\\t^ index! !\\\\n\\\\n!ParagraphEditor methodsFor: 'private'!\\\\nnullText\\\\n\\\\n\\\\t^Text string: '' emphasis: emphasisHere! !\\\\n\\\\n!ParagraphEditor methodsFor: 'private' stamp: 'th 9/20/2002 11:09'!\\\\npageHeight\\\\n\\\\t| howManyLines visibleHeight totalHeight ratio |\\\\n\\\\thowManyLines _ paragraph numberOfLines.\\\\n\\\\tvisibleHeight _ self visibleHeight.\\\\n\\\\ttotalHeight _ self totalTextHeight.\\\\n\\\\tratio _ visibleHeight / totalHeight.\\\\n\\\\t^(ratio * howManyLines) rounded - 2! !\\\\n\\\\n!ParagraphEditor methodsFor: 'private' stamp: 'sma 12/15/1999 11:33'!\\\\npreviousWord: position\\\\n\\\\t| string index |\\\\n\\\\tstring _ paragraph text string.\\\\n\\\\tindex _ position.\\\\n\\\\t[(index between: 1 and: string size) and: [(string at: index) isAlphaNumeric not]]\\\\n\\\\t\\\\twhileTrue: [index _ index - 1].\\\\n\\\\t[(index between: 1 and: string size) and: [(string at: index) isAlphaNumeric]]\\\\n\\\\t\\\\twhileTrue: [index _ index - 1].\\\\n\\\\t^ index + 1! !\\\\n\\\\n!ParagraphEditor methodsFor: 'private' stamp: 'BG 4/29/2004 11:19'!\\\\nsameColumn: start newLine: lineBlock forward: isForward\\\\n\\\\t\\\\\\\"Private - Compute the index in my text\\\\n\\\\twith the line number derived from lineBlock,\\\\\\\"\\\\n\\\\t\\\\\\\" a one argument block accepting the old line number.\\\\n\\\\tThe position inside the line will be preserved as good as possible\\\\\\\"\\\\n\\\\t\\\\\\\"The boolean isForward is used in the border case to determine if\\\\n\\\\twe should move to the beginning or the end of the line.\\\\\\\"\\\\n\\\\t| wordStyle column currentLine offsetAtTargetLine targetEOL lines numberOfLines currentLineNumber targetLineNumber |\\\\n\\\\twordStyle _ Preferences wordStyleCursorMovement.\\\\n\\\\twordStyle\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\tlines _ paragraph lines.\\\\n\\\\t\\\\t\\\\tnumberOfLines := paragraph numberOfLines.\\\\n\\\\t\\\\t\\\\tcurrentLineNumber  _ paragraph lineIndexOfCharacterIndex: start.\\\\n\\\\t\\\\t\\\\tcurrentLine _ lines at: currentLineNumber]\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\tlines _ self lines.\\\\n\\\\t\\\\t\\\\tnumberOfLines := lines size.\\\\n\\\\t\\\\t\\\\tcurrentLine _ lines\\\\n\\\\t\\\\t\\\\t\\\\tdetect:[:lineInterval | lineInterval last >= start]\\\\n\\\\t\\\\t\\\\t\\\\tifNone:[lines last].\\\\n\\\\t\\\\t\\\\tcurrentLineNumber _ currentLine second].\\\\n\\\\tcolumn _ start - currentLine first.\\\\n\\\\ttargetLineNumber _ ((lineBlock value: currentLineNumber) max: 1) min: numberOfLines.\\\\n\\\\toffsetAtTargetLine _ (lines at: targetLineNumber) first.\\\\n\\\\ttargetEOL _ (lines at: targetLineNumber) last + (targetLineNumber == numberOfLines ifTrue:[1]ifFalse:[0]).\\\\n\\\\ttargetLineNumber == currentLineNumber\\\\n\\\\t\\\\\\\"No movement or movement failed. Move to beginning or end of line.\\\\\\\"\\\\n\\\\t\\\\tifTrue:[^isForward\\\\n\\\\t\\\\t\\\\tifTrue:[targetEOL]\\\\n\\\\t\\\\t\\\\tifFalse:[offsetAtTargetLine]].\\\\n\\\\t^offsetAtTargetLine + column min: targetEOL.! !\\\\n\\\\n!ParagraphEditor methodsFor: 'private' stamp: 'md 2/22/2006 21:17'!\\\\nsetIndices: shiftPressed forward: forward\\\\n\\\\t\\\\\\\"Little helper method that sets the moving and fixed indices according to some flags.\\\\\\\"\\\\n\\\\t| indices |\\\\n\\\\tindices _ Dictionary new.\\\\n\\\\tshiftPressed ifTrue: [\\\\n\\\\t\\\\t\\\\tindices at: #moving put: self pointIndex.\\\\n\\\\t\\\\t\\\\tindices at: #fixed put: self markIndex\\\\n\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\tforward\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:[\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tindices at: #moving put: self stopIndex.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tindices at: #fixed put: self startIndex.\\\\n\\\\t\\\\t\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tindices at: #moving put: self startIndex.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tindices at: #fixed put: self stopIndex.\\\\n\\\\t\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t].\\\\n\\\\t^indices! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nParagraphEditor class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!ParagraphEditor class methodsFor: 'class initialization' stamp: 'sw 5/27/2000 00:03'!\\\\nabandonChangeText\\\\n\\\\t\\\\\\\"Call this to get out of the maddening situation in which the system keeps aggressively trying to do a replacement that you no longer wish to make, every time you make choose a new method in a list.\\\\\\\"\\\\n\\\\tChangeText _ FindText\\\\n\\\\n\\\\t\\\\\\\"ParagraphEditor abandonChangeText\\\\\\\"\\\\n! !\\\\n\\\\n!ParagraphEditor class methodsFor: 'class initialization' stamp: 'dgd 10/1/2004 11:00'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Initialize the keyboard shortcut maps and the shared buffers \\\\n\\\\tfor copying text across views and managing again and undo. \\\\n\\\\tMarked this method changed to trigger reinit\\\\\\\"\\\\n\\\\t\\\\\\\"ParagraphEditor initialize\\\\\\\"\\\\n\\\\tUndoSelection := FindText := ChangeText := Text new.\\\\n\\\\tUndoMessage := Message selector: #halt.\\\\n\\\\tself initializeCmdKeyShortcuts.\\\\n\\\\tself initializeShiftCmdKeyShortcuts.! !\\\\n\\\\n!ParagraphEditor class methodsFor: 'class initialization' stamp: 'dgd 4/4/2006 16:07'!\\\\nshiftedYellowButtonMenu\\\\n\\\\t\\\\\\\"Answer the menu to be presented when the yellow button is pressed while the shift key is down\\\\\\\"\\\\n\\\\n\\\\t^ MenuMorph fromArray: {\\\\n\\\\t\\\\t{'explain' translated.\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t#explain}.\\\\n\\\\t\\\\t{'pretty print' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#prettyPrint}.\\\\n\\\\t\\\\t{'pretty print with color' translated.\\\\t\\\\t#prettyPrintWithColor}.\\\\n\\\\t\\\\t{'file it in (G)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#fileItIn}.\\\\n\\\\t\\\\t{'tiles from it' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#selectionAsTiles}.\\\\n\\\\t\\\\t{'spawn (o)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t#spawn}.\\\\n\\\\t\\\\t#-.\\\\n\\\\t\\\\t{'browse it (b)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#browseIt}.\\\\n\\\\t\\\\t{'senders of it (n)' translated.\\\\t\\\\t\\\\t\\\\t#sendersOfIt}.\\\\n\\\\t\\\\t{'implementors of it (m)' translated.\\\\t\\\\t#implementorsOfIt}.\\\\n\\\\t\\\\t{'references to it (N)' translated.\\\\t\\\\t\\\\t#referencesToIt}.\\\\n\\\\t\\\\t#-.\\\\n\\\\t\\\\t{'selectors containing it (W)' translated.\\\\t#methodNamesContainingIt}.\\\\n\\\\t\\\\t{'method strings with it (E)' translated.\\\\t#methodStringsContainingit}.\\\\n\\\\t\\\\t{'method source with it' translated.\\\\t\\\\t#methodSourceContainingIt}.\\\\n\\\\t\\\\t{'class names containing it' translated.\\\\t#classNamesContainingIt}.\\\\n\\\\t\\\\t{'class comments with it' translated.\\\\t\\\\t#classCommentsContainingIt}.\\\\n\\\\t\\\\t{'change sets with it' translated.\\\\t\\\\t\\\\t#browseChangeSetsWithSelector}.\\\\n\\\\t\\\\t#-.\\\\n\\\\t\\\\t{'save contents to file...' translated.\\\\t\\\\t#saveContentsInFile}.\\\\n\\\\t\\\\t{'send contents to printer' translated.\\\\t#sendContentsToPrinter}.\\\\n\\\\t\\\\t{'printer setup' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#printerSetup}.\\\\n\\\\t\\\\t#-.\\\\n\\\\t\\\\t{'special menu...' translated.\\\\t\\\\t\\\\t\\\\t#presentSpecialMenu}.\\\\n\\\\t\\\\t{'more...' translated.\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t#yellowButtonActivity}.\\\\n\\\\t}\\\\n! !\\\\n\\\\n!ParagraphEditor class methodsFor: 'class initialization' stamp: 'dgd 9/1/2005 12:35'!\\\\nyellowButtonExpertMenu\\\\n\\\\n\\\\t^ MenuMorph fromArray: {\\\\n\\\\t\\\\t\\\\t{'set font... (k)' translated.\\\\t\\\\t\\\\t\\\\t#offerFontMenu}.\\\\n\\\\t\\\\t\\\\t{'set style... (K)' translated.\\\\t\\\\t\\\\t\\\\t#changeStyle}.\\\\n\\\\t\\\\t\\\\t{'set alignment... (u)' translated.\\\\t\\\\t#chooseAlignment}.\\\\n\\\\t\\\\t\\\\t#-.\\\\n\\\\t\\\\t\\\\t{'make project link (P)' translated.\\\\t#makeProjectLink}.\\\\n\\\\t\\\\t\\\\t#-.\\\\n\\\\t\\\\t\\\\t{'find...(f)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#find}.\\\\n\\\\t\\\\t\\\\t{'find again (g)' translated.\\\\t\\\\t\\\\t\\\\t#findAgain}.\\\\n\\\\t\\\\t\\\\t{'set search string (h)' translated.\\\\t\\\\t#setSearchString}.\\\\n\\\\t\\\\t\\\\t#-.\\\\n\\\\t\\\\t\\\\t{'do again (j)' translated.\\\\t\\\\t\\\\t\\\\t#again}.\\\\n\\\\t\\\\t\\\\t{'undo (z)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#undo}.\\\\n\\\\t\\\\t\\\\t#-.\\\\n\\\\t\\\\t\\\\t{'copy (c)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#copySelection}.\\\\n\\\\t\\\\t\\\\t{'cut (x)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t#cut}.\\\\n\\\\t\\\\t\\\\t{'paste (v)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#paste}.\\\\n\\\\t\\\\t\\\\t{'paste...' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#pasteRecent}.\\\\n\\\\t\\\\t\\\\t#-.\\\\n\\\\t\\\\t\\\\t{'do it (d)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#doIt}.\\\\n\\\\t\\\\t\\\\t{'print it (p)' translated.\\\\t\\\\t\\\\t\\\\t#printIt}.\\\\n\\\\t\\\\t\\\\t{'inspect it (i)' translated.\\\\t\\\\t\\\\t\\\\t#inspectIt}.\\\\n\\\\t\\\\t\\\\t{'explore it (I)' translated.\\\\t\\\\t\\\\t\\\\t#exploreIt}.\\\\n\\\\t\\\\t\\\\t{'debug it' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#debugIt}.\\\\n\\\\t\\\\t\\\\t#-.\\\\n\\\\t\\\\t\\\\t{'accept (s)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#accept}.\\\\n\\\\t\\\\t\\\\t{'cancel (l)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#cancel}.\\\\n\\\\t\\\\t\\\\t#-.\\\\n\\\\t\\\\t\\\\t{'show bytecodes' translated.\\\\t\\\\t\\\\t#showBytecodes}.\\\\n\\\\t\\\\t\\\\t#-.\\\\n\\\\t\\\\t\\\\t{'copy html' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#copyHtml}.\\\\n\\\\t\\\\t\\\\t#-.\\\\n\\\\t\\\\t\\\\t{'more...' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#shiftedTextPaneMenuRequest}.\\\\n\\\\t\\\\t}.\\\\n! !\\\\n\\\\n!ParagraphEditor class methodsFor: 'class initialization' stamp: 'dgd 10/1/2004 10:59'!\\\\nyellowButtonMenu\\\\n\\\\n\\\\t^ Preferences noviceMode\\\\n\\\\t\\\\t\\\\tifTrue: [self yellowButtonNoviceMenu]\\\\n\\\\t\\\\t\\\\tifFalse: [self yellowButtonExpertMenu]\\\\n! !\\\\n\\\\n!ParagraphEditor class methodsFor: 'class initialization' stamp: 'dgd 11/25/2004 17:33'!\\\\nyellowButtonNoviceMenu\\\\n\\\\n\\\\t^ MenuMorph fromArray: {\\\\n\\\\t\\\\t\\\\t{'set font... (k)' translated.\\\\t\\\\t\\\\t\\\\t#offerFontMenu}.\\\\n\\\\t\\\\t\\\\t{'set style... (K)' translated.\\\\t\\\\t\\\\t\\\\t#changeStyle}.\\\\n\\\\t\\\\t\\\\t{'set alignment... (u)' translated.\\\\t\\\\t#chooseAlignment}.\\\\n\\\\t\\\\t\\\\t#-.\\\\n\\\\t\\\\t\\\\t{'make project link (P)' translated.\\\\t#makeProjectLink}.\\\\n\\\\t\\\\t\\\\t#-.\\\\n\\\\t\\\\t\\\\t{'find...(f)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#find}.\\\\n\\\\t\\\\t\\\\t{'find again (g)' translated.\\\\t\\\\t\\\\t\\\\t#findAgain}.\\\\n\\\\t\\\\t\\\\t{'set search string (h)' translated.\\\\t\\\\t#setSearchString}.\\\\n\\\\t\\\\t\\\\t#-.\\\\n\\\\t\\\\t\\\\t{'do again (j)' translated.\\\\t\\\\t\\\\t\\\\t#again}.\\\\n\\\\t\\\\t\\\\t{'undo (z)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#undo}.\\\\n\\\\t\\\\t\\\\t#-.\\\\n\\\\t\\\\t\\\\t{'copy (c)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#copySelection}.\\\\n\\\\t\\\\t\\\\t{'cut (x)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t#cut}.\\\\n\\\\t\\\\t\\\\t{'paste (v)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#paste}.\\\\n\\\\t\\\\t\\\\t{'paste...' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#pasteRecent}.\\\\n\\\\t\\\\t\\\\t#-.\\\\n\\\\t\\\\t\\\\t{'accept (s)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#accept}.\\\\n\\\\t\\\\t\\\\t{'cancel (l)' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#cancel}.\\\\n\\\\t\\\\t}.\\\\n! !\\\\n\\\\n\\\\n!ParagraphEditor class methodsFor: 'instance creation' stamp: 'nk 9/3/2004 14:10'!\\\\nnew\\\\n\\\\t\\\\\\\"Answer a new instance of me with a null Paragraph to be edited.\\\\\\\"\\\\n\\\\n\\\\t| aParagraphEditor |\\\\n\\\\taParagraphEditor _ super new.\\\\n\\\\taParagraphEditor changeParagraph: '' asParagraph.\\\\n\\\\t^aParagraphEditor! !\\\\n\\\\n!ParagraphEditor class methodsFor: 'instance creation'!\\\\nnewParagraph: aParagraph \\\\n\\\\t\\\\\\\"Answer an instance of me with aParagraph as the text to be edited.\\\\\\\"\\\\n\\\\n\\\\t| aParagraphEditor |\\\\n\\\\taParagraphEditor _ super new.\\\\n\\\\taParagraphEditor initialize.\\\\n\\\\taParagraphEditor changeParagraph: aParagraph.\\\\n\\\\t^aParagraphEditor! !\\\\n\\\\n\\\\n!ParagraphEditor class methodsFor: 'keyboard shortcut tables' stamp: 'dgd 4/4/2006 16:04'!\\\\ninitializeCmdKeyShortcuts\\\\n\\\\t\\\\\\\"Initialize the (unshifted) command-key (or alt-key) shortcut table.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"NOTE: if you don't know what your keyboard generates, use Sensor kbdTest\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"ParagraphEditor initialize\\\\\\\"\\\\n\\\\n\\\\t| cmdMap |\\\\n\\\\n\\\\tcmdMap := Array new: 256 withAll: #noop:.\\\\t\\\\\\\"use temp in case of a crash\\\\\\\"\\\\n\\\\n\\\\tcmdMap at: 1 + 1 put: #cursorHome:.\\\\t\\\\t\\\\t\\\\\\\"home key\\\\\\\"\\\\n\\\\tcmdMap at: 4 + 1 put: #cursorEnd:.\\\\t\\\\t\\\\t\\\\t\\\\\\\"end key\\\\\\\"\\\\n\\\\tcmdMap at: 8 + 1 put: #backspace:.\\\\t\\\\t\\\\t\\\\t\\\\\\\"ctrl-H or delete key\\\\\\\"\\\\n\\\\tcmdMap at: 11 + 1 put: #cursorPageUp:.\\\\t\\\\t\\\\\\\"page up key\\\\\\\"\\\\n\\\\tcmdMap at: 12 + 1 put: #cursorPageDown:.\\\\t\\\\\\\"page down key\\\\\\\"\\\\n\\\\tcmdMap at: 13 + 1 put: #crWithIndent:.\\\\t\\\\t\\\\t\\\\\\\"cmd-Return\\\\\\\"\\\\n\\\\tcmdMap at: 27 + 1 put: #offerMenuFromEsc:.\\\\t\\\\\\\"escape key\\\\\\\"\\\\n\\\\tcmdMap at: 28 + 1 put: #cursorLeft:.\\\\t\\\\t\\\\t\\\\\\\"left arrow key\\\\\\\"\\\\n\\\\tcmdMap at: 29 + 1 put: #cursorRight:.\\\\t\\\\t\\\\t\\\\\\\"right arrow key\\\\\\\"\\\\n\\\\tcmdMap at: 30 + 1 put: #cursorUp:.\\\\t\\\\t\\\\t\\\\t\\\\\\\"up arrow key\\\\\\\"\\\\n\\\\tcmdMap at: 31 + 1 put: #cursorDown:.\\\\t\\\\t\\\\t\\\\\\\"down arrow key\\\\\\\"\\\\n\\\\tcmdMap at: 32 + 1 put: #selectWord:.\\\\t\\\\t\\\\t\\\\\\\"space bar key\\\\\\\"\\\\n\\\\tcmdMap at: 127 + 1 put: #forwardDelete:.\\\\t\\\\t\\\\\\\"del key\\\\\\\"\\\\n\\\\n\\\\t'0123456789-=' \\\\n\\\\t\\\\tdo: [:char | cmdMap at: char asciiValue + 1 put: #changeEmphasis:].\\\\n\\\\n\\\\t'([{''\\\\\\\"<' do: [:char | cmdMap at: char asciiValue + 1 put: #enclose:].\\\\n\\\\n\\\\tcmdMap at: $, asciiValue + 1 put: #shiftEnclose:.\\\\n\\\\n\\\\t\\\\\\\"triplet = {character. comment selector. novice appropiated}\\\\\\\"\\\\n\\\\t#(\\\\n\\\\t\\\\t($a\\\\t\\\\t#selectAll:\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($b\\\\t\\\\t#browseIt:\\\\t\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($c\\\\t\\\\t#copySelection:\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($d\\\\t\\\\t#doIt:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($e\\\\t\\\\t#exchange:\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($f\\\\t\\\\t#find:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($g\\\\t\\\\t#findAgain:\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($h\\\\t\\\\t#setSearchString:\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($i\\\\t\\\\t#inspectIt:\\\\t\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($j\\\\t\\\\t#doAgainOnce:\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($k\\\\t\\\\t#offerFontMenu:\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($l\\\\t\\\\t#cancel:\\\\t\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($m\\\\t#implementorsOfIt:\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($n\\\\t\\\\t#sendersOfIt:\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($o\\\\t\\\\t#spawnIt:\\\\t\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($p\\\\t\\\\t#printIt:\\\\t\\\\t\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($q\\\\t\\\\t#querySymbol:\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($s\\\\t\\\\t#save:\\\\t\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($t\\\\t\\\\t#tempCommand:\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($u\\\\t\\\\t#align:\\\\t\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($v\\\\t\\\\t#paste:\\\\t\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($w\\\\t#backWord:\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($x\\\\t\\\\t#cut:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($y\\\\t\\\\t#swapChars:\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($z\\\\t\\\\t#undo:\\\\t\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t)\\\\n\\\\t\\\\tselect:[:triplet | Preferences noviceMode not or:[triplet third]]\\\\n\\\\t\\\\tthenDo:[:triplet | cmdMap at: triplet first asciiValue + 1 put: triplet second].\\\\n\\\\n\\\\tCmdActions := cmdMap.\\\\n! !\\\\n\\\\n!ParagraphEditor class methodsFor: 'keyboard shortcut tables' stamp: 'dgd 10/4/2004 13:53'!\\\\ninitializeShiftCmdKeyShortcuts \\\\n\\\\t\\\\\\\"Initialize the shift-command-key (or control-key) shortcut table.\\\\\\\"\\\\n\\\\t\\\\\\\"NOTE: if you don't know what your keyboard generates, use Sensor kbdTest\\\\\\\"\\\\n\\\\t\\\\\\\"wod 11/3/1998: Fix setting of cmdMap for shifted keys to actually use the \\\\n\\\\tcapitalized versions of the letters.\\\\n\\\\tTPR 2/18/99: add the plain ascii values back in for those VMs that don't return the shifted values.\\\\\\\"\\\\n\\\\n\\\\t| cmdMap |\\\\n\\\\n\\\\t\\\\\\\"shift-command and control shortcuts\\\\\\\"\\\\n\\\\tcmdMap _ Array new: 256 withAll: #noop:.  \\\\\\\"use temp in case of a crash\\\\\\\"\\\\n\\\\n\\\\tcmdMap at: ( 1 + 1) put: #cursorHome:.\\\\t\\\\t\\\\t\\\\t\\\\\\\"home key\\\\\\\"\\\\n\\\\tcmdMap at: ( 4 + 1) put: #cursorEnd:.\\\\t\\\\t\\\\t\\\\t\\\\\\\"end key\\\\\\\"\\\\n\\\\tcmdMap at: ( 8 + 1) put: #forwardDelete:.\\\\t\\\\t\\\\t\\\\\\\"ctrl-H or delete key\\\\\\\"\\\\n\\\\tcmdMap at: (11 + 1) put: #cursorPageUp:.\\\\t\\\\t\\\\t\\\\\\\"page up key\\\\\\\"\\\\n\\\\tcmdMap at: (12 + 1) put: #cursorPageDown:.\\\\t\\\\t\\\\\\\"page down key\\\\\\\"\\\\n\\\\tcmdMap at: (13 + 1) put: #crWithIndent:.\\\\t\\\\t\\\\t\\\\\\\"ctrl-Return\\\\\\\"\\\\n\\\\tcmdMap at: (27 + 1) put: #offerMenuFromEsc:.\\\\t\\\\\\\"escape key\\\\\\\"\\\\n\\\\tcmdMap at: (28 + 1) put: #cursorLeft:.\\\\t\\\\t\\\\t\\\\t\\\\\\\"left arrow key\\\\\\\"\\\\n\\\\tcmdMap at: (29 + 1) put: #cursorRight:.\\\\t\\\\t\\\\t\\\\t\\\\\\\"right arrow key\\\\\\\"\\\\n\\\\tcmdMap at: (30 + 1) put: #cursorUp:.\\\\t\\\\t\\\\t\\\\t\\\\\\\"up arrow key\\\\\\\"\\\\n\\\\tcmdMap at: (31 + 1) put: #cursorDown:.\\\\t\\\\t\\\\t\\\\\\\"down arrow key\\\\\\\"\\\\n\\\\tcmdMap at: (32 + 1) put: #selectWord:.\\\\t\\\\t\\\\t\\\\t\\\\\\\"space bar key\\\\\\\"\\\\n\\\\tcmdMap at: (45 + 1) put: #changeEmphasis:.\\\\t\\\\t\\\\\\\"cmd-sh-minus\\\\\\\"\\\\n\\\\tcmdMap at: (61 + 1) put: #changeEmphasis:.\\\\t\\\\t\\\\\\\"cmd-sh-plus\\\\\\\"\\\\n\\\\tcmdMap at: (127 + 1) put: #forwardDelete:.\\\\t\\\\t\\\\\\\"del key\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Note: Command key overrides shift key, so, for example, cmd-shift-9 produces $9 not $(\\\\\\\"\\\\n\\\\t'9[,''' do: [ :char | cmdMap at: (char asciiValue + 1) put: #shiftEnclose: ].\\\\t\\\\\\\"({< and double-quote\\\\\\\"\\\\n\\\\t\\\\\\\"Note: Must use cmd-9 or ctrl-9 to get '()' since cmd-shift-9 is a Mac FKey command.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"NB: sw 12/9/2001 commented out the idiosyncratic line just below, which was grabbing shift-esc in the text editor and hence which argued with the wish to have shift-esc be a universal gesture for escaping the local context and calling up the desktop menu.\\\\\\\"  \\\\n\\\\t\\\\\\\"cmdMap at: (27 + 1) put: #shiftEnclose:.\\\\\\\" \\\\t\\\\\\\"ctrl-[\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"'\\\\\\\"\\\\\\\"''(' do: [ :char | cmdMap at: (char asciiValue + 1) put: #enclose:].\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"triplet = {character. comment selector. novice appropiated}\\\\\\\"\\\\n\\\\t#(\\\\n\\\\t\\\\t($a\\\\t\\\\targAdvance:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($b\\\\t\\\\tbrowseItHere:\\\\t\\\\t\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($c\\\\t\\\\tcompareToClipboard:\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($d\\\\t\\\\tduplicate:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($e\\\\t\\\\tmethodStringsContainingIt:\\\\tfalse)\\\\n\\\\t\\\\t($f\\\\t\\\\tdisplayIfFalse:\\\\t\\\\t\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($g\\\\t\\\\tfileItIn:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($h\\\\t\\\\tcursorTopHome:\\\\t\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($i\\\\t\\\\texploreIt:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($j\\\\t\\\\tdoAgainMany:\\\\t\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($k\\\\t\\\\tchangeStyle:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($l\\\\t\\\\toutdent:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($m\\\\tselectCurrentTypeIn:\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($n\\\\t\\\\treferencesToIt:\\\\t\\\\t\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($p\\\\t\\\\tmakeProjectLink:\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($r\\\\t\\\\tindent:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($s\\\\t\\\\tsearch:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($t\\\\t\\\\tdisplayIfTrue:\\\\t\\\\t\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($u\\\\t\\\\tchangeLfToCr:\\\\t\\\\t\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($v\\\\t\\\\tpasteInitials:\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfalse)\\\\n\\\\t\\\\t($w\\\\tmethodNamesContainingIt:\\\\tfalse)\\\\n\\\\t\\\\t($x\\\\t\\\\tmakeLowercase:\\\\t\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($y\\\\t\\\\tmakeUppercase:\\\\t\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t\\\\t($z\\\\t\\\\tmakeCapitalized:\\\\t\\\\t\\\\t\\\\ttrue)\\\\n\\\\t)\\\\n\\\\t\\\\tselect:[:triplet | Preferences noviceMode not or:[triplet third]]\\\\n\\\\t\\\\tthenDo:[:triplet |\\\\n\\\\t\\\\t\\\\tcmdMap at: (triplet first asciiValue         + 1) put: triplet second.\\\\t\\\\t\\\\\\\"plain keys\\\\\\\"\\\\n\\\\t\\\\t\\\\tcmdMap at: (triplet first asciiValue - 32 + 1) put: triplet second.\\\\t\\\\t\\\\\\\"shifted keys\\\\\\\"\\\\n\\\\t\\\\t\\\\tcmdMap at: (triplet first asciiValue - 96 + 1) put: triplet second.\\\\t\\\\t\\\\\\\"ctrl keys\\\\\\\"\\\\n\\\\t\\\\t].\\\\n\\\\n\\\\tShiftCmdActions _ cmdMap! !\\\\n\\\\n!ParagraphEditor class methodsFor: 'keyboard shortcut tables' stamp: 'sps 7/24/2003 17:25'!\\\\nmultiRedoOverride\\\\n\\\\\\\"Call this to set meta-r to perform the multilevel redo (or tweak the code below to have it bound to some other key sequence).\\\\\\\"\\\\n\\\\n\\\\\\\"\\\\nParagraphEditor multiRedoOverride.\\\\n\\\\\\\"\\\\n\\\\tCmdActions at: $r asciiValue + 1 put: #multiRedo: \\\\n! !\\\\n\\\\n!ParagraphEditor class methodsFor: 'keyboard shortcut tables' stamp: 'sbw 10/8/1999 21:42'!\\\\nspecialShiftCmdKeys\\\\n\\\\n\\\\\\\"Private - return array of key codes that represent single keys acting\\\\nas if shift-command were also being pressed\\\\\\\"\\\\n\\\\n^#(\\\\n\\\\t1\\\\t\\\\\\\"home\\\\\\\"\\\\n\\\\t3\\\\t\\\\\\\"enter\\\\\\\"\\\\n\\\\t4\\\\t\\\\\\\"end\\\\\\\"\\\\n\\\\t8\\\\t\\\\\\\"backspace\\\\\\\"\\\\n\\\\t11\\\\t\\\\\\\"page up\\\\\\\"\\\\n\\\\t12\\\\t\\\\\\\"page down\\\\\\\"\\\\n\\\\t27\\\\t\\\\\\\"escape\\\\\\\"\\\\n\\\\t28\\\\t\\\\\\\"left arrow\\\\\\\"\\\\n\\\\t29\\\\t\\\\\\\"right arrow\\\\\\\"\\\\n\\\\t30\\\\t\\\\\\\"up arrow\\\\\\\"\\\\n\\\\t31\\\\t\\\\\\\"down arrow\\\\\\\"\\\\n\\\\t127\\\\t\\\\\\\"delete\\\\\\\"\\\\n\\\\t)! !\\\\nTileMorph subclass: #ParameterTile\\\\n\\\\tinstanceVariableNames: 'scriptEditor'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'EToys-Scripting Tiles'!\\\\n!ParameterTile commentStamp: '<historical>' prior: 0!\\\\nRepresents a parameter in a user-defined script in \\\\\\\"classic\\\\\\\" tile-scripting.  The type of a script's parameter is declared in the ScriptEditor for the script, and a parameter tile gets its type from the script.  But because the user can change the parameter type *after* having created parameter tiles, we can later have type mismatches.  Which however we at least deal with reasonably cleverly.!\\\\n\\\\n\\\\n!ParameterTile methodsFor: 'access' stamp: 'sw 3/15/2005 21:45'!\\\\nisBoolean \\\\n\\\\t\\\\\\\"Answer whether the receiver's type is inherently boolean\\\\\\\"\\\\n\\\\n\\\\t^ self scriptEditor typeForParameter == #Boolean! !\\\\n\\\\n!ParameterTile methodsFor: 'access' stamp: 'sw 3/15/2005 22:36'!\\\\nrowOfRightTypeFor: aLayoutMorph forActor: aPlayer\\\\n\\\\t\\\\\\\"Answer a phrase of the right type for the putative container\\\\\\\"\\\\n\\\\n\\\\t| aTemporaryViewer aPhrase |\\\\n\\\\taLayoutMorph demandsBoolean ifTrue:\\\\n\\\\t\\\\t[aTemporaryViewer _ CategoryViewer new invisiblySetPlayer: aPlayer.\\\\n\\\\t\\\\taPhrase _ aTemporaryViewer booleanPhraseFromPhrase: self.\\\\n\\\\t\\\\taPhrase justGrabbedFromViewer: false.\\\\n\\\\t\\\\t^ aPhrase].\\\\n\\\\t^ self! !\\\\n\\\\n!ParameterTile methodsFor: 'access' stamp: 'sw 1/18/2004 22:12'!\\\\nscriptEditor\\\\n\\\\t\\\\\\\"Answer the receiver's script editor.  The slightly strange code here is in order to contend with the unusual situation where a parameter tile obtained from one script editor is later dropped into a different script editor.  As long as the parameter tile is *in* a script editor, that containing scriptEditor is the one; if it is *not*, then we use the last known one\\\\\\\"\\\\n\\\\n\\\\t| aScriptEditor |\\\\n\\\\t^ (aScriptEditor _ self outermostMorphThat: [:m | m isKindOf: ScriptEditorMorph])\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t[scriptEditor _ aScriptEditor]\\\\n\\\\t\\\\tifNil:\\\\n\\\\t\\\\t\\\\t[scriptEditor]! !\\\\n\\\\n\\\\n!ParameterTile methodsFor: 'accessing' stamp: 'sw 7/18/2002 02:45'!\\\\nresultType\\\\n\\\\t\\\\\\\"Answer the result type of the receiver\\\\\\\"\\\\n\\\\n\\\\t^ self scriptEditor typeForParameter! !\\\\n\\\\n\\\\n!ParameterTile methodsFor: 'code generation' stamp: 'yo 12/20/2003 02:49'!\\\\nstoreCodeOn: aStream indent: tabCount\\\\n\\\\t\\\\\\\"Store code on the stream\\\\\\\"\\\\n \\\\n\\\\t| myTypeString |\\\\n\\\\tmyTypeString _ self resultType.\\\\n\\\\t(self scriptEditor hasParameter and: [self scriptEditor typeForParameter = myTypeString])\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[aStream nextPutAll: 'parameter']\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"This script no longer bears a parameter, yet there's an orphaned Parameter tile in it\\\\\\\"\\\\n\\\\t\\\\t\\\\taStream nextPutAll: '(self defaultValueOfType: #', myTypeString, ')']! !\\\\n\\\\n\\\\n!ParameterTile methodsFor: 'initialization' stamp: 'yo 3/14/2005 08:01'!\\\\nforScriptEditor: aScriptEditor\\\\n\\\\t\\\\\\\"Make the receiver be associated with the given script editor\\\\\\\"\\\\n\\\\n\\\\tscriptEditor _ aScriptEditor.\\\\n\\\\tself line1: aScriptEditor typeForParameter translated.! !\\\\n\\\\n!ParameterTile methodsFor: 'initialization' stamp: 'dgd 3/7/2003 15:45'!\\\\ninitialize\\\\n\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\\\\"\\\\\\\"\\\\n\\\\tself typeColor: Color red! !\\\\n\\\\n\\\\n!ParameterTile methodsFor: 'miscellaneous' stamp: 'sw 3/15/2005 21:55'!\\\\nassociatedPlayer\\\\n\\\\t\\\\\\\"Answer the player with which the receiver is associated\\\\\\\"\\\\n\\\\n\\\\t^ self scriptEditor playerScripted! !\\\\n\\\\n!ParameterTile methodsFor: 'miscellaneous' stamp: 'sw 3/15/2005 22:37'!\\\\nbooleanComparatorPhrase\\\\n\\\\t\\\\\\\"Answer a boolean-valued phrase derived from a retriever (e.g. 'car's heading'); this is in order to assure that tiles laid down in a TEST area will indeed produce a boolean result\\\\\\\"\\\\n\\\\n\\\\t| outerPhrase rel retrieverType |\\\\n\\\\tretrieverType _ self resultType.\\\\n\\\\n\\\\trel _ (Vocabulary vocabularyForType: retrieverType) comparatorForSampleBoolean.\\\\n\\\\touterPhrase _ PhraseTileMorph new setOperator: rel type: #Boolean rcvrType: retrieverType argType: retrieverType.\\\\n\\\\touterPhrase firstSubmorph addMorph: self.\\\\n\\\\touterPhrase submorphs last addMorph: (ScriptingSystem tileForArgType: retrieverType).\\\\n\\\\n\\\\touterPhrase submorphs second submorphs last setBalloonText: (ScriptingSystem helpStringForOperator: rel).    \\\\n\\\\t^ outerPhrase! !\\\\n\\\\n!ParameterTile methodsFor: 'miscellaneous' stamp: 'sw 3/15/2005 22:41'!\\\\ntileRows\\\\n\\\\t\\\\\\\"Answer a list of tile rows -- in this case exactly one row -- representing the receiver.\\\\\\\"\\\\n\\\\n\\\\t^ Array with: (Array with: self)! !\\\\n\\\\n\\\\n!ParameterTile methodsFor: 'type' stamp: 'sw 7/22/2002 17:48'!\\\\nassureTypeStillValid\\\\n\\\\t\\\\\\\"Consider the possibility that the parameter type of my surrounding method has changed and that hence I no longer represent a possible value for the parameter of the script.  If this condition obtains, then banish me in favor of a default literal tile of the correct type\\\\\\\"\\\\n\\\\n\\\\t(self ownerThatIsA: TilePadMorph) ifNotNilDo:\\\\n\\\\t\\\\t[:aPad | aPad type = self scriptEditor typeForParameter ifFalse:\\\\n\\\\t\\\\t\\\\t[aPad setToBearDefaultLiteral]]! !\\\\nObject subclass: #ParseNode\\\\n\\\\tinstanceVariableNames: 'comment pc'\\\\n\\\\tclassVariableNames: 'Bfp BtpLong CodeBases CodeLimits DblExtDoAll Dup EndMethod EndRemote Jmp JmpLimit JmpLong LdFalse LdInstLong LdInstType LdLitIndType LdLitType LdMinus1 LdNil LdSelf LdSuper LdTempType LdThisContext LdTrue LoadLong LongLongDoAll NodeFalse NodeNil NodeSelf NodeSuper NodeThisContext NodeTrue Pop Send SendLimit SendLong SendLong2 SendPlus SendType ShortStoP StdLiterals StdSelectors StdVariables Store StorePop'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Compiler-ParseNodes'!\\\\n!ParseNode commentStamp: '<historical>' prior: 0!\\\\nThis superclass of most compiler/decompiler classes declares common class variables, default messages, and the code emitters for jumps. Some of the class variables are initialized here; the rest are initialized in class VariableNode.!\\\\n\\\\n\\\\n!ParseNode methodsFor: 'code generation'!\\\\nemitBranchOn:\\\\ncondition dist: dist pop: stack on: strm\\\\n\\\\tstack pop: 1.\\\\n\\\\tdist = 0 ifTrue: [^ strm nextPut: Pop].\\\\n\\\\tcondition\\\\n\\\\t\\\\tifTrue: [self emitLong: dist code: BtpLong on: strm]\\\\n\\\\t\\\\tifFalse: [self emitShortOrLong: dist code: Bfp on: strm]! !\\\\n\\\\n!ParseNode methodsFor: 'code generation'!\\\\nemitForEffect: stack on: strm\\\\n\\\\n\\\\tself emitForValue: stack on: strm.\\\\n\\\\tstrm nextPut: Pop.\\\\n\\\\tstack pop: 1! !\\\\n\\\\n!ParseNode methodsFor: 'code generation'!\\\\nemitForReturn: stack on: strm\\\\n\\\\n\\\\tself emitForValue: stack on: strm.\\\\n\\\\tstrm nextPut: EndMethod! !\\\\n\\\\n!ParseNode methodsFor: 'code generation'!\\\\nemitJump: dist on: strm\\\\n\\\\n\\\\tdist = 0 ifFalse: [self emitShortOrLong: dist code: Jmp on: strm]! !\\\\n\\\\n!ParseNode methodsFor: 'code generation'!\\\\nemitLong: dist code: longCode on: aStream \\\\n\\\\t\\\\\\\"Force a two-byte jump.\\\\\\\"\\\\n\\\\t| code distance |\\\\n\\\\tcode _ longCode.\\\\n\\\\tdistance _ dist.\\\\n\\\\tdistance < 0\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[distance _ distance + 1024.\\\\n\\\\t\\\\t\\\\tcode _ code - 4]\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[distance > 1023 ifTrue: [distance _ -1]].\\\\n\\\\tdistance < 0\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[self error: 'A block compiles more than 1K bytes of code']\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[aStream nextPut: distance // 256 + code.\\\\n\\\\t\\\\t\\\\taStream nextPut: distance \\\\\\\\\\\\\\\\ 256]! !\\\\n\\\\n!ParseNode methodsFor: 'code generation'!\\\\nemitShortOrLong: dist code: shortCode on: strm\\\\n\\\\t(1 <= dist and: [dist <= JmpLimit])\\\\n\\\\t\\\\tifTrue: [strm nextPut: shortCode + dist - 1]\\\\n\\\\t\\\\tifFalse: [self emitLong: dist code: shortCode + (JmpLong-Jmp) on: strm]! !\\\\n\\\\n!ParseNode methodsFor: 'code generation' stamp: 'nk 7/10/2004 10:04'!\\\\npc\\\\n\\\\t\\\\\\\"Used by encoder source mapping.\\\\\\\"\\\\n\\\\n\\\\t^pc ifNil: [ 0 ]\\\\n! !\\\\n\\\\n!ParseNode methodsFor: 'code generation'!\\\\nsizeBranchOn: condition dist: dist\\\\n\\\\tdist = 0 ifTrue: [^1].\\\\n\\\\t^ condition\\\\n\\\\t\\\\tifTrue: [2]  \\\\\\\"Branch on true is always 2 bytes\\\\\\\"\\\\n\\\\t\\\\tifFalse: [self sizeShortOrLong: dist]! !\\\\n\\\\n!ParseNode methodsFor: 'code generation'!\\\\nsizeForEffect: encoder\\\\n\\\\n\\\\t^(self sizeForValue: encoder) + 1! !\\\\n\\\\n!ParseNode methodsFor: 'code generation'!\\\\nsizeForReturn: encoder\\\\n\\\\n\\\\t^(self sizeForValue: encoder) + 1! !\\\\n\\\\n!ParseNode methodsFor: 'code generation'!\\\\nsizeJump: dist\\\\n\\\\n\\\\tdist = 0 ifTrue: [^0].\\\\n\\\\t^self sizeShortOrLong: dist! !\\\\n\\\\n!ParseNode methodsFor: 'code generation'!\\\\nsizeShortOrLong: dist\\\\n\\\\n\\\\t(1 <= dist and: [dist <= JmpLimit])\\\\n\\\\t\\\\tifTrue: [^1].\\\\n\\\\t^2! !\\\\n\\\\n\\\\n!ParseNode methodsFor: 'comment'!\\\\ncomment\\\\n\\\\n\\\\t^comment! !\\\\n\\\\n!ParseNode methodsFor: 'comment'!\\\\ncomment: newComment\\\\n\\\\n\\\\tcomment _ newComment! !\\\\n\\\\n\\\\n!ParseNode methodsFor: 'converting'!\\\\nasReturnNode\\\\n\\\\n\\\\t^ReturnNode new expr: self! !\\\\n\\\\n\\\\n!ParseNode methodsFor: 'encoding'!\\\\nencodeSelector: selector\\\\n\\\\n\\\\t^nil! !\\\\n\\\\n\\\\n!ParseNode methodsFor: 'printing' stamp: 'tk 10/16/2000 13:57'!\\\\nnodePrintOn: aStrm indent: nn\\\\n\\\\t| var aaStrm myLine |\\\\n\\\\t\\\\\\\"Show just the sub nodes and the code.\\\\\\\"\\\\n\\\\n\\\\t(aaStrm _ aStrm) ifNil: [aaStrm _ WriteStream on: (String new: 500)].\\\\n\\\\tnn timesRepeat: [aaStrm tab].\\\\n\\\\taaStrm nextPutAll: self class name; space.\\\\n\\\\tmyLine _ self printString copyWithout: Character cr.\\\\n\\\\tmyLine _ myLine copyFrom: 1 to: (myLine size min: 70).\\\\n\\\\taaStrm nextPutAll: myLine; cr.\\\\n\\\\t1 to: self class instSize do: [:ii | \\\\n\\\\t\\\\tvar _ self instVarAt: ii.\\\\n\\\\t\\\\t(var respondsTo: #asReturnNode) ifTrue: [var nodePrintOn: aaStrm indent: nn+1]].\\\\n\\\\t1 to: self class instSize do: [:ii | \\\\n\\\\t\\\\tvar _ self instVarAt: ii.\\\\n\\\\t\\\\t(var isKindOf: SequenceableCollection) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tvar do: [:aNode | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(aNode respondsTo: #asReturnNode) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taNode nodePrintOn: aaStrm indent: nn+1]]]].\\\\n\\\\t^ aaStrm\\\\n! !\\\\n\\\\n!ParseNode methodsFor: 'printing' stamp: 'ab 7/13/2004 13:46'!\\\\nprintCommentOn: aStream indent: indent \\\\n\\\\t| thisComment |\\\\n\\\\tself comment == nil ifTrue: [^ self].\\\\n\\\\taStream withStyleFor: #comment\\\\n\\\\t\\\\tdo: [1 to: self comment size do: \\\\n\\\\t\\\\t\\\\t\\\\t[:index | \\\\n\\\\t\\\\t\\\\t\\\\tindex > 1 ifTrue: [aStream crtab: indent].\\\\n\\\\t\\\\t\\\\t\\\\taStream nextPut: $\\\\\\\".\\\\n\\\\t\\\\t\\\\t\\\\tthisComment _ self comment at: index.\\\\n\\\\t\\\\t\\\\t\\\\tself printSingleComment: thisComment\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ton: aStream\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tindent: indent.\\\\n\\\\t\\\\t\\\\t\\\\taStream nextPut: $\\\\\\\"]].\\\\n\\\\tself comment: nil! !\\\\n\\\\n!ParseNode methodsFor: 'printing' stamp: 'md 8/15/2005 11:02'!\\\\nprintOn: aStream \\\\n\\\\t\\\\\\\"Refer to the comment in Object|printOn:.\\\\\\\"\\\\n\\\\n\\\\taStream nextPutAll: '{'.\\\\n\\\\taStream nextPutAll: ((ColoredCodeStream contents: [:strm | self printOn: strm indent: 0])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tasString).\\\\n\\\\taStream nextPutAll: '}'! !\\\\n\\\\n!ParseNode methodsFor: 'printing'!\\\\nprintOn: aStream indent: anInteger \\\\n\\\\t\\\\\\\"If control gets here, avoid recursion loop.\\\\\\\"\\\\n\\\\n\\\\tsuper printOn: aStream! !\\\\n\\\\n!ParseNode methodsFor: 'printing'!\\\\nprintOn: aStream indent: level precedence: p\\\\n\\\\n\\\\tself printOn: aStream indent: level! !\\\\n\\\\n!ParseNode methodsFor: 'printing' stamp: 'ms 8/1/2006 16:47'!\\\\nshortPrintOn: aStream \\\\n\\\\tself printOn: aStream indent: 0! !\\\\n\\\\n\\\\n!ParseNode methodsFor: 'testing'!\\\\nassignmentCheck: encoder at: location\\\\n\\\\t\\\\\\\"For messageNodes masquerading as variables for the debugger.\\\\n\\\\tFor now we let this through - ie we allow stores ev\\\\n\\\\tinto args.  Should check against numArgs, though.\\\\\\\"\\\\n\\\\t^ -1! !\\\\n\\\\n!ParseNode methodsFor: 'testing'!\\\\ncanBeSpecialArgument\\\\n\\\\t\\\\\\\"Can I be an argument of (e.g.) ifTrue:?\\\\\\\"\\\\n\\\\n\\\\t^false! !\\\\n\\\\n!ParseNode methodsFor: 'testing'!\\\\ncanCascade\\\\n\\\\n\\\\t^false! !\\\\n\\\\n!ParseNode methodsFor: 'testing'!\\\\nisArg\\\\n\\\\n\\\\t^false! !\\\\n\\\\n!ParseNode methodsFor: 'testing'!\\\\nisComplex\\\\n\\\\t\\\\\\\"Used for pretty printing to determine whether to start a new line\\\\\\\"\\\\n\\\\n\\\\t^false! !\\\\n\\\\n!ParseNode methodsFor: 'testing'!\\\\nisConstantNumber  \\\\\\\"Overridden in LiteralNode\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n!ParseNode methodsFor: 'testing' stamp: 'md 1/20/2006 16:22'!\\\\nisDoIt\\\\n\\\\t\\\\\\\"polymorphic with RBNodes; called by debugger\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!ParseNode methodsFor: 'testing' stamp: 'ls 1/29/2004 21:11'!\\\\nisJust: node\\\\n\\\\t^false! !\\\\n\\\\n!ParseNode methodsFor: 'testing' stamp: 'di 4/5/2000 11:14'!\\\\nisLiteral\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!ParseNode methodsFor: 'testing' stamp: 'md 7/27/2006 19:14'!\\\\nisMessage\\\\n\\\\t^false! !\\\\n\\\\n!ParseNode methodsFor: 'testing'!\\\\nisMessage: selSymbol receiver: rcvrPred arguments: argsPred\\\\n\\\\t\\\\\\\"See comment in MessageNode.\\\\\\\"\\\\n\\\\n\\\\t^false! !\\\\n\\\\n!ParseNode methodsFor: 'testing'!\\\\nisReturnSelf\\\\n\\\\n\\\\t^false! !\\\\n\\\\n!ParseNode methodsFor: 'testing'!\\\\nisReturningIf\\\\n\\\\n\\\\t^false! !\\\\n\\\\n!ParseNode methodsFor: 'testing' stamp: 'tk 8/2/1999 18:39'!\\\\nisSelfPseudoVariable\\\\t\\\\n\\\\t\\\\\\\"Overridden in VariableNode.\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n!ParseNode methodsFor: 'testing'!\\\\nisSpecialConstant\\\\n\\\\t^ false! !\\\\n\\\\n!ParseNode methodsFor: 'testing' stamp: 'di 10/12/1999 15:28'!\\\\nisTemp\\\\n\\\\t^ false! !\\\\n\\\\n!ParseNode methodsFor: 'testing'!\\\\nisUndefTemp\\\\n\\\\t^ false! !\\\\n\\\\n!ParseNode methodsFor: 'testing'!\\\\nisUnusedTemp\\\\n\\\\t^ false! !\\\\n\\\\n!ParseNode methodsFor: 'testing'!\\\\nisVariableReference\\\\n\\\\n\\\\t^false! !\\\\n\\\\n!ParseNode methodsFor: 'testing'!\\\\nnowHasDef  \\\\\\\"Ignored in all but VariableNode\\\\\\\"! !\\\\n\\\\n!ParseNode methodsFor: 'testing'!\\\\nnowHasRef  \\\\\\\"Ignored in all but VariableNode\\\\\\\"! !\\\\n\\\\n!ParseNode methodsFor: 'testing'!\\\\ntoDoIncrement: ignored\\\\n\\\\t\\\\\\\"Only meant for Messages or Assignments - else return nil\\\\\\\"\\\\n\\\\t^ nil! !\\\\n\\\\n\\\\n!ParseNode methodsFor: '*eToys-tiles' stamp: 'ab 7/13/2004 13:47'!\\\\naddCommentToMorph: aMorph\\\\n\\\\t| row |\\\\n\\\\t(self comment isNil or: [self comment isEmpty]) ifTrue: [^ self].\\\\n\\\\trow _ aMorph addTextRow:\\\\n\\\\t\\\\t(String streamContents: [:strm | self printCommentOn: strm indent: 1]).\\\\n\\\\trow firstSubmorph color: (SyntaxMorph translateColor: #comment).\\\\n\\\\trow parseNode: (self as: CommentNode).\\\\n! !\\\\n\\\\n!ParseNode methodsFor: '*eToys-tiles' stamp: 'RAA 8/24/1999 12:24'!\\\\nasMorphicSyntaxIn: parent\\\\n\\\\n\\\\t| morph |\\\\n\\\\t\\\\\\\"Default for missing implementations\\\\\\\"\\\\n\\\\n\\\\tmorph _ parent addColumn: #error on: self.\\\\n\\\\tmorph addTextRow: self class printString.\\\\n\\\\t^morph\\\\n\\\\t\\\\n\\\\n! !\\\\n\\\\n!ParseNode methodsFor: '*eToys-tiles' stamp: 'RAA 8/24/1999 13:06'!\\\\ncurrentValueIn: aContext\\\\n\\\\n\\\\t^nil! !\\\\n\\\\n!ParseNode methodsFor: '*eToys-tiles' stamp: 'RAA 8/24/1999 18:18'!\\\\nexplanation\\\\n\\\\n\\\\t^self class printString! !\\\\n\\\\n\\\\n!ParseNode methodsFor: 'private' stamp: 'ls 1/29/2004 21:17'!\\\\nifNilReceiver\\\\n\\\\t\\\\\\\"assuming this object is the receiver of an ifNil:, what object is being asked about?\\\\\\\"\\\\n\\\\t^self! !\\\\n\\\\n!ParseNode methodsFor: 'private' stamp: 'sma 5/28/2000 10:47'!\\\\nnextWordFrom: aStream setCharacter: aBlock\\\\n\\\\t| outStream char |\\\\n\\\\toutStream _ WriteStream on: (String new: 16).\\\\n\\\\t[(aStream peekFor: Character space) \\\\n\\\\t\\\\tor: [aStream peekFor: Character tab]] whileTrue.\\\\n\\\\t[aStream atEnd\\\\n\\\\t\\\\tor:\\\\n\\\\t\\\\t\\\\t[char _ aStream next.\\\\n\\\\t\\\\t\\\\tchar = Character cr or: [char = Character space]]]\\\\n\\\\t\\\\twhileFalse: [outStream nextPut: char].\\\\n\\\\taBlock value: char.\\\\n\\\\t^ outStream contents! !\\\\n\\\\n!ParseNode methodsFor: 'private' stamp: 'nk 7/11/2004 13:39'!\\\\nprintSingleComment: aString on: aStream indent: indent \\\\n\\\\t\\\\\\\"Print the comment string, assuming it has been indented indent tabs.\\\\n\\\\tBreak the string at word breaks, given the widths in the default\\\\n\\\\tfont, at 450 points.\\\\\\\"\\\\n\\\\n\\\\t| readStream word position lineBreak font wordWidth tabWidth spaceWidth lastChar |\\\\n\\\\treadStream _ ReadStream on: aString.\\\\n\\\\tfont _ TextStyle default defaultFont.\\\\n\\\\ttabWidth _ TextConstants at: #DefaultTab.\\\\n\\\\tspaceWidth _ font widthOf: Character space.\\\\n\\\\tposition _ indent * tabWidth.\\\\n\\\\tlineBreak _ 450.\\\\n\\\\t[readStream atEnd]\\\\n\\\\t\\\\twhileFalse: \\\\n\\\\t\\\\t\\\\t[word _ self nextWordFrom: readStream setCharacter: [:lc | lastChar _ lc].\\\\n\\\\t\\\\t\\\\twordWidth _ word inject: 0 into: [:width :char | width + (font widthOf: char)].\\\\n\\\\t\\\\t\\\\tposition _ position + wordWidth.\\\\n\\\\t\\\\t\\\\tposition > lineBreak\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[aStream skip: -1; crtab: indent.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tposition _ indent * tabWidth + wordWidth + spaceWidth.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tlastChar = Character cr\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [[readStream peekFor: Character tab] whileTrue].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tword isEmpty ifFalse: [aStream nextPutAll: word; space]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[aStream nextPutAll: word.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\treadStream atEnd\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[position _ position + spaceWidth.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taStream space].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tlastChar = Character cr\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[aStream skip: -1; crtab: indent.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tposition _ indent * tabWidth.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[readStream peekFor: Character tab] whileTrue]]]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nParseNode class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!ParseNode class methodsFor: 'class initialization' stamp: 'ajh 8/12/2002 11:10'!\\\\nblockReturnCode\\\\n\\\\n\\\\t^ EndRemote! !\\\\n\\\\n!ParseNode class methodsFor: 'class initialization'!\\\\ninitialize\\\\n\\\\t\\\\\\\"ParseNode initialize. VariableNode initialize\\\\\\\"\\\\n\\\\tLdInstType _ 1.\\\\n\\\\tLdTempType _ 2.\\\\n\\\\tLdLitType _ 3.\\\\n\\\\tLdLitIndType _ 4.\\\\n\\\\tSendType _ 5.\\\\n\\\\tCodeBases _ #(0 16 32 64 208 ).\\\\n\\\\tCodeLimits _ #(16 16 32 32 16 ).\\\\n\\\\tLdSelf _ 112.\\\\n\\\\tLdTrue _ 113.\\\\n\\\\tLdFalse _ 114.\\\\n\\\\tLdNil _ 115.\\\\n\\\\tLdMinus1 _ 116.\\\\n\\\\tLoadLong _ 128.\\\\n\\\\tStore _ 129.\\\\n\\\\tStorePop _ 130.\\\\n\\\\tShortStoP _ 96.\\\\n\\\\tSendLong _ 131.\\\\n\\\\tDblExtDoAll _ 132.\\\\n\\\\tSendLong2 _ 134.\\\\n\\\\tLdSuper _ 133.\\\\n\\\\tPop _ 135.\\\\n\\\\tDup _ 136.\\\\n\\\\tLdThisContext _ 137.\\\\n\\\\tEndMethod _ 124.\\\\n\\\\tEndRemote _ 125.\\\\n\\\\tJmp _ 144.\\\\n\\\\tBfp _ 152.\\\\n\\\\tJmpLimit _ 8.\\\\n\\\\tJmpLong _ 164.  \\\\\\\"code for jmp 0\\\\\\\"\\\\n\\\\tBtpLong _ 168.\\\\n\\\\tSendPlus _ 176.\\\\n\\\\tSend _ 208.\\\\n\\\\tSendLimit _ 16! !\\\\n\\\\n!ParseNode class methodsFor: 'class initialization' stamp: 'ajh 8/6/2002 12:04'!\\\\npopCode\\\\n\\\\n\\\\t^ Pop! !\\\\nObject subclass: #ParseStack\\\\n\\\\tinstanceVariableNames: 'position length'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Compiler-Support'!\\\\n!ParseStack commentStamp: '<historical>' prior: 0!\\\\nI keep track of the current and high position of the stack that will be needed by code being compiled.!\\\\n\\\\n\\\\n!ParseStack methodsFor: 'accessing'!\\\\npop: n\\\\n\\\\n\\\\t(position _ position - n) < 0 \\\\n\\\\t\\\\tifTrue: [self error: 'Parse stack underflow']! !\\\\n\\\\n!ParseStack methodsFor: 'accessing'!\\\\npush: n\\\\n\\\\n\\\\t(position _ position + n) > length \\\\n\\\\t\\\\tifTrue: [length _ position]! !\\\\n\\\\n!ParseStack methodsFor: 'accessing'!\\\\nsize\\\\n\\\\n\\\\t^length! !\\\\n\\\\n\\\\n!ParseStack methodsFor: 'initialize-release'!\\\\ninit\\\\n\\\\n\\\\tlength _ position _ 0! !\\\\n\\\\n\\\\n!ParseStack methodsFor: 'printing'!\\\\nprintOn: aStream\\\\n\\\\t\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream nextPutAll: ' at '; print: position; nextPutAll: ' of '; print: length! !\\\\n\\\\n\\\\n!ParseStack methodsFor: 'results'!\\\\nposition\\\\n\\\\n\\\\t^position! !\\\\nScanner subclass: #Parser\\\\n\\\\tinstanceVariableNames: 'here hereType hereMark hereEnd prevMark prevEnd encoder requestor parseNode failBlock requestorOffset tempsMark doitFlag properties category'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Compiler-Kernel'!\\\\n!Parser commentStamp: '<historical>' prior: 0!\\\\nI parse Smalltalk syntax and create a MethodNode that is the root of the parse tree. I look one token ahead.!\\\\n\\\\n\\\\n!Parser methodsFor: 'error correction' stamp: 'rbb 2/18/2005 11:01'!\\\\ncorrectSelector: proposedKeyword wordIntervals: spots exprInterval: expInt ifAbort: abortAction\\\\n\\\\t\\\\\\\"Correct the proposedKeyword to some selector symbol, correcting the original text if such action is indicated.  abortAction is invoked if the proposedKeyword couldn't be converted into a valid selector.  Spots is an ordered collection of intervals within the test stream of the for each of the keyword parts.\\\\\\\"\\\\n\\\\n\\\\t| alternatives aStream choice correctSelector userSelection lines firstLine |\\\\n\\\\t\\\\\\\"If we can't ask the user, assume that the keyword will be defined later\\\\\\\"\\\\n\\\\tself interactive ifFalse: [ ^ proposedKeyword asSymbol ].\\\\n\\\\n\\\\tuserSelection _ requestor selectionInterval.\\\\n\\\\trequestor selectFrom: spots first first to: spots last last.\\\\n\\\\trequestor select.\\\\n\\\\talternatives _ Symbol possibleSelectorsFor: proposedKeyword.\\\\n\\\\tself flag: #toBeFixed.\\\\n\\\\t\\\\\\\"alternatives addAll: (MultiSymbol possibleSelectorsFor: proposedKeyword).\\\\\\\"\\\\n\\\\n\\\\taStream _ WriteStream on: (String new: 200).\\\\n\\\\taStream nextPutAll: (proposedKeyword contractTo: 35); cr.\\\\n\\\\tfirstLine _ 1.\\\\n \\\\talternatives do:\\\\n\\\\t\\\\t[:sel | aStream nextPutAll: (sel contractTo: 35); nextPut: Character cr].\\\\n\\\\taStream nextPutAll: 'cancel'.\\\\n\\\\tlines _ Array with: firstLine with: (alternatives size + firstLine).\\\\n\\\\t\\\\n\\\\tchoice _ (UIManager default \\\\n\\\\t\\\\t\\\\tchooseFrom: (aStream contents substrings)\\\\n\\\\t\\\\t\\\\tlines: lines\\\\n\\\\t\\\\t\\\\ttitle: 'Unknown selector, please\\\\\\\\confirm, correct, or cancel' withCRs).\\\\n\\\\n\\\\t(choice = 0) | (choice > (lines at: 2))\\\\n\\\\t\\\\tifTrue: [ ^ abortAction value ].\\\\n\\\\n\\\\trequestor deselect.\\\\n\\\\trequestor selectInvisiblyFrom: userSelection first to: userSelection last.\\\\n\\\\n\\\\tchoice = 1 ifTrue: [ ^ proposedKeyword asSymbol ].\\\\n\\\\tcorrectSelector _ alternatives at: choice - 1.\\\\n\\\\tself substituteSelector: correctSelector keywords wordIntervals: spots.\\\\n\\\\t((proposedKeyword last ~= $:) and: [correctSelector last == $:]) ifTrue: [\\\\n\\\\t\\\\t^ abortAction value].\\\\n\\\\t^ correctSelector.\\\\n! !\\\\n\\\\n!Parser methodsFor: 'error correction' stamp: 'rbb 2/18/2005 09:01'!\\\\ncorrectVariable: proposedVariable interval: spot\\\\n\\\\t\\\\\\\"Correct the proposedVariable to a known variable, or declare it as a new\\\\n\\\\tvariable if such action is requested.  We support declaring lowercase\\\\n\\\\tvariables as temps or inst-vars, and uppercase variables as Globals or \\\\n\\\\tClassVars, depending on whether the context is nil (class=UndefinedObject).\\\\n\\\\tSpot is the interval within the test stream of the variable.\\\\n\\\\trr 3/4/2004 10:26 : adds the option to define a new class. \\\\\\\"\\\\n\\\\n\\\\t| tempIvar labels actions lines alternatives binding userSelection choice action |\\\\n\\\\n\\\\t\\\\\\\"Check if this is an i-var, that has been corrected already (ugly)\\\\\\\"\\\\n\\\\t(encoder classEncoding allInstVarNames includes: proposedVariable) ifTrue: [\\\\n\\\\t\\\\t^LiteralVariableNode new \\\\n\\\\t\\\\t\\\\tname: proposedVariable index: (encoder classEncoding allInstVarNames indexOf: proposedVariable) - 1 type: 1;\\\\n\\\\t\\\\t\\\\tyourself ].\\\\n\\\\n\\\\t\\\\\\\"If we can't ask the user for correction, make it undeclared\\\\\\\"\\\\n\\\\tself interactive \\\\n\\\\t\\\\tifFalse: [ ^encoder undeclared: proposedVariable ].\\\\n\\\\n\\\\t\\\\\\\"First check to see if the requestor knows anything about the variable\\\\\\\"\\\\n\\\\ttempIvar _ proposedVariable first canBeNonGlobalVarInitial.\\\\n\\\\t(tempIvar and: [ (binding _ requestor bindingOf: proposedVariable) notNil ])\\\\n\\\\t\\\\tifTrue: [ ^encoder global: binding name: proposedVariable ].\\\\n\\\\tuserSelection _ requestor selectionInterval.\\\\n\\\\trequestor selectFrom: spot first to: spot last.\\\\n\\\\trequestor select.\\\\n\\\\n\\\\t\\\\\\\"Build the menu with alternatives\\\\\\\"\\\\n\\\\tlabels _ OrderedCollection new. actions _ OrderedCollection new. lines _ OrderedCollection new.\\\\n\\\\talternatives _ encoder possibleVariablesFor: proposedVariable.\\\\n\\\\ttempIvar \\\\n\\\\t\\\\tifTrue: [ \\\\n\\\\t\\\\t\\\\tlabels add: 'declare temp'. \\\\n\\\\t\\\\t\\\\tactions add: [ self declareTempAndPaste: proposedVariable ].\\\\n\\\\t\\\\t\\\\tlabels add: 'declare instance'.\\\\n\\\\t\\\\t\\\\tactions add: [ self declareInstVar: proposedVariable ] ]\\\\n\\\\t\\\\tifFalse: [ \\\\n\\\\t\\\\t\\\\tlabels add: 'define new class'.\\\\n\\\\t\\\\t\\\\tactions add: [self defineClass: proposedVariable].\\\\n\\\\t\\\\t\\\\tlabels add: 'declare global'.\\\\n\\\\t\\\\t\\\\tactions add: [ self declareGlobal: proposedVariable ].\\\\n\\\\t\\\\t\\\\tencoder classEncoding == UndefinedObject ifFalse: [ \\\\n\\\\t\\\\t\\\\t\\\\tlabels add: 'declare class variable'.\\\\n\\\\t\\\\t\\\\t\\\\tactions add: [ self declareClassVar: proposedVariable ] ] ].\\\\n\\\\tlines add: labels size.\\\\n\\\\talternatives do: [ :each | \\\\n\\\\t\\\\tlabels add: each.\\\\n\\\\t\\\\tactions add: [ \\\\n\\\\t\\\\t\\\\tself substituteWord: each wordInterval: spot offset: 0.\\\\n\\\\t\\\\t\\\\tencoder encodeVariable: each ] fixTemps ].\\\\n\\\\tlines add: labels size.\\\\n\\\\tlabels add: 'cancel'.\\\\n\\\\n\\\\t\\\\\\\"Display the pop-up menu\\\\\\\"\\\\n\\\\tchoice _ (UIManager default chooseFrom: labels asArray lines: lines asArray\\\\n\\\\t\\\\ttitle:  'Unknown variable: ', proposedVariable, ' please correct, or cancel:').\\\\n\\\\taction _ actions at: choice ifAbsent: [ ^self fail ].\\\\n\\\\n\\\\t\\\\\\\"Execute the selected action\\\\\\\"\\\\n\\\\trequestor deselect.\\\\n\\\\trequestor selectInvisiblyFrom: userSelection first to: userSelection last.\\\\n\\\\t^action value! !\\\\n\\\\n!Parser methodsFor: 'error correction'!\\\\ndeclareClassVar: name\\\\n\\\\t| sym class |\\\\n\\\\tsym _ name asSymbol.\\\\n\\\\tclass _ encoder classEncoding.\\\\n\\\\tclass _ class theNonMetaClass.\\\\t\\\\t\\\\\\\"not the metaclass\\\\\\\"\\\\n\\\\tclass addClassVarName: name.\\\\n\\\\t^ encoder global: (class classPool associationAt: sym)\\\\n\\\\t\\\\t\\\\tname: sym! !\\\\n\\\\n!Parser methodsFor: 'error correction'!\\\\ndeclareGlobal: name\\\\n\\\\t| sym |\\\\n\\\\tsym _ name asSymbol.\\\\n\\\\tSmalltalk at: sym put: nil.\\\\n\\\\t^ encoder global: (Smalltalk associationAt: sym) name: sym! !\\\\n\\\\n!Parser methodsFor: 'error correction' stamp: 'rr 3/6/2004 16:07'!\\\\ndeclareInstVar: name\\\\n\\\\t\\\\\\\" rr 3/6/2004 16:06 : adds the line to correctly compute the index. uncommented the option in \\\\n\\\\tthe caller.\\\\\\\"\\\\n\\\\t| index |\\\\n\\\\tencoder classEncoding addInstVarName: name.\\\\n\\\\tindex _ encoder classEncoding instVarNames indexOf: name.\\\\n\\\\tencoder classEncoding allSuperclassesDo: [:cls | index := index + cls instVarNames size].\\\\n\\\\t^LiteralVariableNode new\\\\n\\\\t\\\\tname: name index: index - 1 type: 1;\\\\n\\\\t\\\\tyourself\\\\n\\\\t\\\\t! !\\\\n\\\\n!Parser methodsFor: 'error correction' stamp: 'RAA 6/5/2001 11:57'!\\\\ndeclareTempAndPaste: name\\\\n\\\\t| insertion delta theTextString characterBeforeMark |\\\\n\\\\n\\\\ttheTextString _ requestor text string.\\\\n\\\\tcharacterBeforeMark _ theTextString at: tempsMark-1 ifAbsent: [$ ].\\\\n\\\\t(theTextString at: tempsMark) = $| ifTrue: [\\\\n  \\\\t\\\\t\\\\\\\"Paste it before the second vertical bar\\\\\\\"\\\\n\\\\t\\\\tinsertion _ name, ' '.\\\\n\\\\t\\\\tcharacterBeforeMark isSeparator ifFalse: [\\\\finsertion _ ' ', insertion].\\\\n\\\\t\\\\tdelta _ 0.\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\\\\"No bars - insert some with CR, tab\\\\\\\"\\\\n\\\\t\\\\tinsertion _ '| ' , name , ' |',String cr.\\\\n\\\\t\\\\tdelta _ 2.\\\\t\\\\\\\"the bar and CR\\\\\\\"\\\\n\\\\t\\\\tcharacterBeforeMark = Character tab ifTrue: [\\\\n\\\\t\\\\t\\\\tinsertion _ insertion , String tab.\\\\n\\\\t\\\\t\\\\tdelta _ delta + 1.\\\\t\\\\\\\"the tab\\\\\\\"\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\ttempsMark _ tempsMark +\\\\n\\\\t\\\\t(self substituteWord: insertion\\\\n\\\\t\\\\t\\\\twordInterval: (tempsMark to: tempsMark-1)\\\\n\\\\t\\\\t\\\\toffset: 0) - delta.\\\\n\\\\t^ encoder bindAndJuggle: name! !\\\\n\\\\n!Parser methodsFor: 'error correction' stamp: 'DF 4/28/2006 14:31'!\\\\ndefineClass: className \\\\n\\\\t\\\\\\\"prompts the user to define a new class,  \\\\n\\\\tasks for it's category, and lets the users edit further  \\\\n\\\\tthe definition\\\\\\\"\\\\n\\\\t| sym cat def d2 |\\\\n\\\\tsym := className asSymbol.\\\\n\\\\tcat := UIManager default request: 'Enter class category : ' initialAnswer: self encoder classEncoding theNonMetaClass category.\\\\n\\\\tcat\\\\n\\\\t\\\\tifEmpty: [cat := 'Unknown'].\\\\n\\\\tdef := 'Object subclass: #' , sym , '\\\\n\\\\t\\\\tinstanceVariableNames: '''' \\\\n\\\\t\\\\tclassVariableNames: ''''\\\\n\\\\t\\\\tpoolDictionaries: ''''\\\\n\\\\t\\\\tcategory: ''' , cat , ''''.\\\\n\\\\td2 := UIManager default request: 'Edit class definition : ' initialAnswer: def.\\\\n\\\\td2\\\\n\\\\t\\\\tifEmpty: [d2 := def].\\\\n\\\\tCompiler evaluate: d2.\\\\n\\\\t^ encoder\\\\n\\\\t\\\\tglobal: (Smalltalk associationAt: sym)\\\\n\\\\t\\\\tname: sym! !\\\\n\\\\n!Parser methodsFor: 'error correction' stamp: 'rbb 2/18/2005 09:10'!\\\\nqueryUndefined\\\\n\\\\t| varStart varName | \\\\n\\\\tvarName _ parseNode key.\\\\n\\\\tvarStart _ self endOfLastToken + requestorOffset - varName size + 1.\\\\n\\\\trequestor selectFrom: varStart to: varStart + varName size - 1; select.\\\\n\\\\t((UIManager default \\\\n\\\\t\\\\tchooseFrom: #('yes' 'no') \\\\n\\\\t\\\\ttitle: ((varName , ' appears to be\\\\\\\\undefined at this point.Proceed anyway?') \\\\n\\\\t\\\\t\\\\t\\\\twithCRs asText makeBoldFrom: 1 to: varName size))\\\\n\\\\t\\\\t= 1) ifFalse: [^ self fail]! !\\\\n\\\\n!Parser methodsFor: 'error correction' stamp: 'rbb 2/18/2005 09:08'!\\\\nremoveUnusedTemps\\\\n\\\\t\\\\\\\"Scan for unused temp names, and prompt the user about the prospect of removing each one found\\\\\\\"\\\\n\\\\n\\\\t| str end start madeChanges | \\\\n\\\\tmadeChanges _ false.\\\\n\\\\tstr _ requestor text string.\\\\n\\\\t((tempsMark between: 1 and: str size)\\\\n\\\\t\\\\tand: [(str at: tempsMark) = $|]) ifFalse: [^ self].\\\\n\\\\tencoder unusedTempNames do:\\\\n\\\\t\\\\t[:temp |\\\\n\\\\t\\\\t((UIManager default \\\\n\\\\t\\\\t\\\\t\\\\tchooseFrom: #('yes' 'no') \\\\n\\\\t\\\\t\\\\t\\\\ttitle: ((temp , ' appears to be\\\\\\\\unused in this method.\\\\\\\\OK to remove it?') \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twithCRs asText makeBoldFrom: 1 to: temp size)) = 1)\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t[(encoder encodeVariable: temp) isUndefTemp\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[end _ tempsMark.\\\\n\\\\t\\\\t\\\\t[\\\\\\\"Beginning at right temp marker...\\\\\\\"\\\\n\\\\t\\\\t\\\\tstart _ end - temp size + 1.\\\\n\\\\t\\\\t\\\\tend < temp size or: [temp = (str copyFrom: start to: end)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [(str at: start-1) isAlphaNumeric not & (str at: end+1) isAlphaNumeric not]]]\\\\n\\\\t\\\\t\\\\twhileFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[\\\\\\\"Search left for the unused temp\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tend _ requestor nextTokenFrom: end direction: -1].\\\\n\\\\t\\\\t\\\\tend < temp size ifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[(str at: start-1) = $  ifTrue: [start _ start-1].\\\\n\\\\t\\\\t\\\\t\\\\trequestor correctFrom: start to: end with: ''.\\\\n\\\\t\\\\t\\\\t\\\\tstr _ str copyReplaceFrom: start to: end with: ''. \\\\n\\\\t\\\\t\\\\t\\\\tmadeChanges _ true.\\\\n\\\\t\\\\t\\\\t\\\\ttempsMark _ tempsMark - (end-start+1)]]\\\\n\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self inform:\\\\n'You''ll first have to remove the\\\\nstatement where it''s stored into']]].\\\\n\\\\tmadeChanges ifTrue: [ParserRemovedUnusedTemps signal]! !\\\\n\\\\n!Parser methodsFor: 'error correction'!\\\\nsubstituteSelector: selectorParts wordIntervals: spots\\\\n\\\\t\\\\\\\"Substitute the correctSelector into the (presuamed interactive) receiver.\\\\\\\"\\\\n\\\\t| offset |\\\\n\\\\toffset _ 0.\\\\n\\\\tselectorParts with: spots do:\\\\n\\\\t\\\\t[ :word :interval |\\\\n\\\\t\\\\toffset _ self substituteWord: word wordInterval: interval offset: offset ]\\\\n! !\\\\n\\\\n!Parser methodsFor: 'error correction'!\\\\nsubstituteWord: correctWord wordInterval: spot offset: o\\\\n\\\\t\\\\\\\"Substitute the correctSelector into the (presuamed interactive) receiver.\\\\\\\"\\\\n\\\\n\\\\trequestor correctFrom: (spot first + o)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tto: (spot last + o)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\twith: correctWord.\\\\n\\\\n\\\\trequestorOffset _ requestorOffset + correctWord size - spot size.\\\\n\\\\t^ o + correctWord size - spot size! !\\\\n\\\\n\\\\n!Parser methodsFor: 'error handling' stamp: 'hmm 7/18/2001 21:45'!\\\\nexpected: aString \\\\n\\\\t\\\\\\\"Notify a problem at token 'here'.\\\\\\\"\\\\n\\\\n\\\\ttokenType == #doIt ifTrue: [hereMark _ hereMark + 1].\\\\n\\\\thereType == #doIt ifTrue: [hereMark _ hereMark + 1].\\\\n\\\\t^ self notify: aString , ' expected' at: hereMark + requestorOffset! !\\\\n\\\\n!Parser methodsFor: 'error handling'!\\\\nfail\\\\n\\\\n\\\\t| exitBlock |\\\\n\\\\tencoder == nil\\\\n\\\\t\\\\tifFalse: [encoder release. encoder _ nil]. \\\\\\\"break cycle\\\\\\\"\\\\n\\\\texitBlock _ failBlock.\\\\n\\\\tfailBlock _ nil.\\\\n\\\\t^exitBlock value! !\\\\n\\\\n!Parser methodsFor: 'error handling' stamp: 'stephaneducassse 11/5/2005 16:39'!\\\\ninteractive\\\\n\\\\t\\\\\\\"this version of the method is necessary to load code from MC else the interactive mode is one. \\\\n\\\\tThis method is really bad since it links the compiler package with the Tools\\\\n\\\\tone. The solution would be to have a real SyntaxError exception belonging to the \\\\n\\\\tcompiler package and not a subclass of StringHolder - sd Nov 2005\\\\\\\"\\\\n\\\\t\\\\\\\"the code submitted by PlusTools is ideally the one that should be used\\\\n\\\\tinteractive\\\\n\\\\n\\\\t      ^requestor ~~ nil \\\\\\\"\\\\n\\\\t\\\\n\\\\t^ (requestor == nil or: [requestor isKindOf: SyntaxError]) not! !\\\\n\\\\n!Parser methodsFor: 'error handling'!\\\\nnotify: aString \\\\n\\\\t\\\\\\\"Notify problem at token before 'here'.\\\\\\\"\\\\n\\\\n\\\\t^self notify: aString at: prevMark + requestorOffset! !\\\\n\\\\n!Parser methodsFor: 'error handling' stamp: 'KLC 11/28/2005 18:01'!\\\\nnotify: string at: location\\\\n\\\\trequestor isNil\\\\n\\\\t\\\\tifTrue: [(encoder == self or: [encoder isNil]) ifTrue: [^ self fail  \\\\\\\"failure setting up syntax error\\\\\\\"].\\\\n\\\\t\\\\t\\\\t\\\\tSyntaxErrorNotification\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tinClass: encoder classEncoding\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcategory: encoder classEncoding category\\\\n\\\\t\\\\t\\\\t\\\\t\\\\twithCode: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(source contents\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcopyReplaceFrom: location\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tto: location - 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twith: string , ' ->')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdoitFlag: doitFlag]\\\\n\\\\t\\\\tifFalse: [requestor\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnotify: string , ' ->'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tat: location\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tin: source].\\\\n\\\\t^self fail! !\\\\n\\\\n!Parser methodsFor: 'error handling' stamp: 'di 2/9/1999 15:43'!\\\\noffEnd: aString \\\\n\\\\t\\\\\\\"Notify a problem beyond 'here' (in lookAhead token). Don't be offEnded!!\\\\\\\"\\\\n\\\\n\\\\trequestorOffset == nil\\\\n\\\\t\\\\tifTrue: [^ self notify: aString at: mark]\\\\n\\\\t\\\\tifFalse: [^ self notify: aString at: mark + requestorOffset]\\\\n! !\\\\n\\\\n\\\\n!Parser methodsFor: 'expression types'!\\\\nargumentName\\\\n\\\\n\\\\thereType == #word\\\\n\\\\t\\\\tifFalse: [^self expected: 'Argument name'].\\\\n\\\\t^self advance! !\\\\n\\\\n!Parser methodsFor: 'expression types' stamp: 'hmm 7/16/2001 18:47'!\\\\nassignment: varNode\\\\n\\\\t\\\\\\\" var '_' expression => AssignmentNode.\\\\\\\"\\\\n\\\\t| loc start |\\\\n\\\\t(loc _ varNode assignmentCheck: encoder at: prevMark + requestorOffset) >= 0\\\\n\\\\t\\\\tifTrue: [^self notify: 'Cannot store into' at: loc].\\\\n\\\\tstart _ self startOfNextToken.\\\\n\\\\tvarNode nowHasDef.\\\\n\\\\tself advance.\\\\n\\\\tself expression ifFalse: [^self expected: 'Expression'].\\\\n\\\\tparseNode _ AssignmentNode new\\\\n\\\\t\\\\t\\\\t\\\\tvariable: varNode\\\\n\\\\t\\\\t\\\\t\\\\tvalue: parseNode\\\\n\\\\t\\\\t\\\\t\\\\tfrom: encoder\\\\n\\\\t\\\\t\\\\t\\\\tsourceRange: (start to: self endOfLastToken).\\\\n\\\\t^true! !\\\\n\\\\n!Parser methodsFor: 'expression types' stamp: 'hmm 7/17/2001 21:03'!\\\\nblockExpression\\\\n\\\\t\\\\\\\"[ ({:var} |) (| {temps} |) (statements) ] => BlockNode.\\\\\\\"\\\\n\\\\n\\\\t| variableNodes temporaryBlockVariables start |\\\\n\\\\n\\\\tvariableNodes _ OrderedCollection new.\\\\n\\\\tstart _ prevMark + requestorOffset.\\\\n\\\\t\\\\\\\"Gather parameters.\\\\\\\"\\\\n\\\\t[self match: #colon] whileTrue: [variableNodes addLast: (encoder autoBind: self argumentName)].\\\\n\\\\t(variableNodes size > 0 & (hereType ~~ #rightBracket) and: [(self match: #verticalBar) not]) ifTrue: [^self expected: 'Vertical bar'].\\\\n\\\\n\\\\ttemporaryBlockVariables _ self temporaryBlockVariables.\\\\n\\\\tself statements: variableNodes innerBlock: true.\\\\n\\\\tparseNode temporaries: temporaryBlockVariables.\\\\n\\\\n\\\\t(self match: #rightBracket) ifFalse: [^self expected: 'Period or right bracket'].\\\\n\\\\n\\\\tencoder noteSourceRange: (self endOfLastToken to: self endOfLastToken) forNode: parseNode.\\\\n\\\\n\\\\t\\\\\\\"The scope of the parameters and temporary block variables is no longer active.\\\\\\\"\\\\n\\\\ttemporaryBlockVariables do: [:variable | variable scope: -1].\\\\n\\\\tvariableNodes do: [:variable | variable scope: -1]! !\\\\n\\\\n!Parser methodsFor: 'expression types' stamp: 'di 3/8/2000 09:36'!\\\\nbraceExpression\\\\n\\\\t\\\\\\\" { elements } => BraceNode.\\\\\\\"\\\\n\\\\n\\\\t| elements locations loc more |\\\\n\\\\telements _ OrderedCollection new.\\\\n\\\\tlocations _ OrderedCollection new.\\\\n\\\\tself advance.\\\\n\\\\tmore _ hereType ~~ #rightBrace.\\\\n\\\\t[more]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[loc _ hereMark + requestorOffset.\\\\n\\\\t\\\\t\\\\tself expression\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[elements addLast: parseNode.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tlocations addLast: loc]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[^self expected: 'Variable or expression'].\\\\n\\\\t\\\\t\\\\t(self match: #period)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [more _ hereType ~~ #rightBrace]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [more _ false]].\\\\n\\\\tparseNode _ BraceNode new elements: elements sourceLocations: locations.\\\\n\\\\t(self match: #rightBrace)\\\\n\\\\t\\\\tifFalse: [^self expected: 'Period or right brace'].\\\\n\\\\t^true! !\\\\n\\\\n!Parser methodsFor: 'expression types'!\\\\ncascade\\\\n\\\\t\\\\\\\" {; message} => CascadeNode.\\\\\\\"\\\\n\\\\n\\\\t| rcvr msgs |\\\\n\\\\tparseNode canCascade\\\\n\\\\t\\\\tifFalse: [^self expected: 'Cascading not'].\\\\n\\\\trcvr _ parseNode cascadeReceiver.\\\\n\\\\tmsgs _ OrderedCollection with: parseNode.\\\\n\\\\t[self match: #semicolon]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t[parseNode _ rcvr.\\\\n\\\\t\\\\t\\\\t(self messagePart: 3 repeat: false)\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [^self expected: 'Cascade'].\\\\n\\\\t\\\\t\\\\tparseNode canCascade\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [^self expected: '<- No special messages'].\\\\n\\\\t\\\\t\\\\tparseNode cascadeReceiver.\\\\n\\\\t\\\\t\\\\tmsgs addLast: parseNode].\\\\n\\\\tparseNode _ CascadeNode new receiver: rcvr messages: msgs! !\\\\n\\\\n!Parser methodsFor: 'expression types' stamp: 'di 11/19/1999 07:43'!\\\\nexpression\\\\n\\\\n\\\\t(hereType == #word and: [tokenType == #leftArrow])\\\\n\\\\t\\\\tifTrue: [^ self assignment: self variable].\\\\n\\\\thereType == #leftBrace\\\\n\\\\t\\\\tifTrue: [self braceExpression]\\\\n\\\\t\\\\tifFalse: [self primaryExpression ifFalse: [^ false]].\\\\n\\\\t(self messagePart: 3 repeat: true)\\\\n\\\\t\\\\tifTrue: [hereType == #semicolon ifTrue: [self cascade]].\\\\n\\\\t^ true! !\\\\n\\\\n!Parser methodsFor: 'expression types' stamp: 'di 4/5/2000 08:27'!\\\\nkeylessMessagePartTest: level repeat: repeat\\\\n! !\\\\n\\\\n!Parser methodsFor: 'expression types' stamp: 'yo 8/30/2002 14:41'!\\\\nmessagePart: level repeat: repeat\\\\n\\\\n\\\\t| start receiver selector args precedence words keywordStart |\\\\n\\\\t[receiver _ parseNode.\\\\n\\\\t(hereType == #keyword and: [level >= 3])\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[start _ self startOfNextToken.\\\\n\\\\t\\\\t\\\\tselector _ WriteStream on: (String new: 32).\\\\n\\\\t\\\\t\\\\targs _ OrderedCollection new.\\\\n\\\\t\\\\t\\\\twords _ OrderedCollection new.\\\\n\\\\t\\\\t\\\\t[hereType == #keyword]\\\\n\\\\t\\\\t\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[keywordStart _ self startOfNextToken + requestorOffset.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tselector nextPutAll: self advance.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\twords addLast: (keywordStart to: self endOfLastToken + requestorOffset).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself primaryExpression ifFalse: [^self expected: 'Argument'].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself messagePart: 2 repeat: true.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\targs addLast: parseNode].\\\\n\\\\t\\\\t\\\\t(Symbol hasInterned: selector contents ifTrue: [ :sym | selector _ sym])\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [ selector _ self correctSelector: selector contents\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twordIntervals: words\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\texprInterval: (start to: self endOfLastToken)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifAbort: [ ^ self fail ] ].\\\\n\\\\t\\\\t\\\\tprecedence _ 3]\\\\n\\\\t\\\\tifFalse: [((hereType == #binary or: [hereType == #verticalBar])\\\\n\\\\t\\\\t\\\\t\\\\tand: [level >= 2])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[start _ self startOfNextToken.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tselector _ self advance asOctetString asSymbol.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself primaryExpression ifFalse: [^self expected: 'Argument'].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself messagePart: 1 repeat: true.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\targs _ Array with: parseNode.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tprecedence _ 2]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [hereType == #word\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[start _ self startOfNextToken.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tselector _ self advance.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\targs _ #().\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twords _ OrderedCollection with: (start  + requestorOffset to: self endOfLastToken + requestorOffset).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(Symbol hasInterned: selector ifTrue: [ :sym | selector _ sym])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [ selector _ self correctSelector: selector\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twordIntervals: words\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\texprInterval: (start to: self endOfLastToken)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifAbort: [ ^ self fail ] ].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tprecedence _ 1]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [^args notNil]]].\\\\n\\\\tparseNode _ MessageNode new\\\\n\\\\t\\\\t\\\\t\\\\treceiver: receiver\\\\n\\\\t\\\\t\\\\t\\\\tselector: selector\\\\n\\\\t\\\\t\\\\t\\\\targuments: args\\\\n\\\\t\\\\t\\\\t\\\\tprecedence: precedence\\\\n\\\\t\\\\t\\\\t\\\\tfrom: encoder\\\\n\\\\t\\\\t\\\\t\\\\tsourceRange: (start to: self endOfLastToken).\\\\n\\\\trepeat]\\\\n\\\\t\\\\twhileTrue: [].\\\\n\\\\t^true! !\\\\n\\\\n!Parser methodsFor: 'expression types' stamp: 'lr 7/3/2006 14:37'!\\\\nmethod: doit context: ctxt encoder: encoderToUse\\\\n\\\\t\\\\\\\" pattern [ | temporaries ] block => MethodNode.\\\\\\\"\\\\n\\\\n\\\\t| sap blk prim temps messageComment methodNode |\\\\n\\\\tencoder _ encoderToUse.\\\\n\\\\tsap _ self pattern: doit inContext: ctxt.\\\\n\\\\t\\\\\\\"sap={selector, arguments, precedence}\\\\\\\"\\\\n\\\\t(sap at: 2) do: [:argNode | argNode isArg: true].\\\\n\\\\tdoit ifFalse: [ self pragmaSequence ].\\\\n\\\\ttemps _ self temporariesIn: (sap at: 1)..\\\\n\\\\tmessageComment _ currentComment.\\\\n\\\\tcurrentComment _ nil.\\\\n\\\\tdoit ifFalse: [ self pragmaSequence ].\\\\n\\\\tprim := self pragmaPrimitives.\\\\n\\\\tself statements: #() innerBlock: doit.\\\\n\\\\tblk _ parseNode.\\\\n\\\\tdoit ifTrue: [blk returnLast]\\\\n\\\\t\\\\tifFalse: [blk returnSelfIfNoOther].\\\\n\\\\thereType == #doIt ifFalse: [^self expected: 'Nothing more'].\\\\n\\\\tself interactive ifTrue: [self removeUnusedTemps].\\\\n\\\\tmethodNode _ self newMethodNode comment: messageComment.\\\\n\\\\t^ methodNode\\\\n\\\\t\\\\tselector: (sap at: 1)\\\\n\\\\t\\\\targuments: (sap at: 2)\\\\n\\\\t\\\\tprecedence: (sap at: 3)\\\\n\\\\t\\\\ttemporaries: temps\\\\n\\\\t\\\\tblock: blk\\\\n\\\\t\\\\tencoder: encoder\\\\n\\\\t\\\\tprimitive: prim\\\\n\\\\t\\\\tproperties: properties! !\\\\n\\\\n!Parser methodsFor: 'expression types' stamp: 'di 5/30/2000 21:59'!\\\\nnewMethodNode\\\\n\\\\n\\\\t^ MethodNode new! !\\\\n\\\\n!Parser methodsFor: 'expression types' stamp: 'ar 1/2/2002 14:31'!\\\\npattern: fromDoit inContext: ctxt \\\\n\\\\t\\\\\\\" unarySelector | binarySelector arg | keyword arg {keyword arg} =>  \\\\n\\\\t{selector, arguments, precedence}.\\\\\\\"\\\\n\\\\t| args selector |\\\\n\\\\tdoitFlag _ fromDoit.\\\\n\\\\tfromDoit ifTrue:\\\\n\\\\t\\\\t\\\\t[ctxt == nil\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [^ {#DoIt. {}. 1}]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [^ {#DoItIn:. {encoder encodeVariable: 'homeContext'}. 3}]].\\\\n\\\\n\\\\thereType == #word ifTrue: [^ {self advance asSymbol. {}. 1}].\\\\n\\\\n\\\\t(hereType == #binary or: [hereType == #verticalBar])\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[selector _ self advance asSymbol.\\\\n\\\\t\\\\t\\\\targs _ Array with: (encoder bindArg: self argumentName).\\\\n\\\\t\\\\t\\\\t^ {selector. args. 2}].\\\\n\\\\n\\\\thereType == #keyword\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[selector _ WriteStream on: (String new: 32).\\\\n\\\\t\\\\t\\\\targs _ OrderedCollection new.\\\\n\\\\t\\\\t\\\\t[hereType == #keyword] whileTrue:[\\\\n\\\\t\\\\t\\\\t\\\\tselector nextPutAll: self advance.\\\\n\\\\t\\\\t\\\\t\\\\targs addLast: (encoder bindArg: self argumentName).\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\t^ {selector contents asSymbol. args. 3}].\\\\n\\\\n\\\\t^ self expected: 'Message pattern'! !\\\\n\\\\n!Parser methodsFor: 'expression types'!\\\\nprimaryExpression \\\\n\\\\thereType == #word \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[parseNode _ self variable.\\\\n\\\\t\\\\t\\\\t(parseNode isUndefTemp and: [self interactive])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self queryUndefined].\\\\n\\\\t\\\\t\\\\tparseNode nowHasRef.\\\\n\\\\t\\\\t\\\\t^ true].\\\\n\\\\thereType == #leftBracket\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[self advance.\\\\n\\\\t\\\\t\\\\tself blockExpression.\\\\n\\\\t\\\\t\\\\t^true].\\\\n\\\\thereType == #leftBrace\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[self braceExpression.\\\\n\\\\t\\\\t\\\\t^true].\\\\n\\\\thereType == #leftParenthesis\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[self advance.\\\\n\\\\t\\\\t\\\\tself expression ifFalse: [^self expected: 'expression'].\\\\n\\\\t\\\\t\\\\t(self match: #rightParenthesis)\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [^self expected: 'right parenthesis'].\\\\n\\\\t\\\\t\\\\t^true].\\\\n\\\\t(hereType == #string or: [hereType == #number or: [hereType == #literal]])\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[parseNode _ encoder encodeLiteral: self advance.\\\\n\\\\t\\\\t\\\\t^true].\\\\n\\\\t(here == #- and: [tokenType == #number])\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[self advance.\\\\n\\\\t\\\\t\\\\tparseNode _ encoder encodeLiteral: self advance negated.\\\\n\\\\t\\\\t\\\\t^true].\\\\n\\\\t^false! !\\\\n\\\\n!Parser methodsFor: 'expression types' stamp: 'di 6/7/2000 08:45'!\\\\nstatements: argNodes innerBlock: inner\\\\n\\\\n\\\\t| stmts returns start more blockComment |\\\\n\\\\tstmts _ OrderedCollection new.\\\\n\\\\t\\\\\\\"give initial comment to block, since others trail statements\\\\\\\"\\\\n\\\\tblockComment _ currentComment.\\\\n\\\\tcurrentComment _ nil.\\\\n\\\\treturns _ false.\\\\n\\\\tmore _ hereType ~~ #rightBracket.\\\\n\\\\t[more]\\\\n\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t[start _ self startOfNextToken.\\\\n\\\\t\\\\t(returns _ self matchReturn)\\\\n\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t[self expression\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [^self expected: 'Expression to return'].\\\\n\\\\t\\\\t\\\\t\\\\tself addComment.\\\\n\\\\t\\\\t\\\\t\\\\tstmts addLast: (parseNode isReturningIf\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [parseNode]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [ReturnNode new\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\texpr: parseNode\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tencoder: encoder\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsourceRange: (start to: self endOfLastToken)])]\\\\n\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t[self expression\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[self addComment.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstmts addLast: parseNode]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[self addComment.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstmts size = 0\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[stmts addLast: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(encoder encodeVariable:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(inner ifTrue: ['nil'] ifFalse: ['self']))]]].\\\\n\\\\t\\\\treturns \\\\n\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t[self match: #period.\\\\n\\\\t\\\\t\\\\t\\\\t(hereType == #rightBracket or: [hereType == #doIt])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [^self expected: 'End of block']].\\\\n\\\\t\\\\tmore _ returns not and: [self match: #period]].\\\\n\\\\tparseNode _ BlockNode new\\\\n\\\\t\\\\t\\\\t\\\\targuments: argNodes\\\\n\\\\t\\\\t\\\\t\\\\tstatements: stmts\\\\n\\\\t\\\\t\\\\t\\\\treturns: returns\\\\n\\\\t\\\\t\\\\t\\\\tfrom: encoder.\\\\n\\\\tparseNode comment: blockComment.\\\\n\\\\t^ true! !\\\\n\\\\n!Parser methodsFor: 'expression types' stamp: 'ar 1/4/2002 00:23'!\\\\ntemporaries\\\\n\\\\t\\\\\\\" [ '|' (variable)* '|' ]\\\\\\\"\\\\n\\\\t| vars theActualText |\\\\n\\\\t(self match: #verticalBar) ifFalse: \\\\n\\\\t\\\\t[\\\\\\\"no temps\\\\\\\"\\\\n\\\\t\\\\tdoitFlag ifTrue: [self interactive\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [tempsMark _ 1]\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [tempsMark _ requestor selectionInterval first].\\\\n\\\\t\\\\t\\\\t^ #()].\\\\n\\\\t\\\\ttempsMark _ (prevEnd ifNil: [0]) + 1.\\\\n\\\\t\\\\ttempsMark _ hereMark\\\\t\\\\\\\"formerly --> prevMark + prevToken\\\\\\\".\\\\n\\\\n\\\\t\\\\ttempsMark > 0 ifTrue:\\\\n\\\\t\\\\t\\\\t[theActualText _ source contents.\\\\n\\\\t\\\\t\\\\t[tempsMark < theActualText size and: [(theActualText at: tempsMark) isSeparator]]\\\\n\\\\t\\\\t\\\\t\\\\twhileTrue: [tempsMark _ tempsMark + 1]].\\\\n\\\\t\\\\t\\\\t^ #()].\\\\n\\\\tvars _ OrderedCollection new.\\\\n\\\\t[hereType == #word]\\\\n\\\\t\\\\twhileTrue: [vars addLast: (encoder bindTemp: self advance)].\\\\n\\\\t(self match: #verticalBar) ifTrue: \\\\n\\\\t\\\\t[tempsMark _ prevMark.\\\\n\\\\t\\\\t^ vars].\\\\n\\\\t^ self expected: 'Vertical bar'\\\\n! !\\\\n\\\\n!Parser methodsFor: 'expression types' stamp: 'mir 1/17/2004 12:27'!\\\\ntemporariesIn: methodSelector\\\\n\\\\t\\\\\\\" [ '|' (variable)* '|' ]\\\\\\\"\\\\n\\\\t| vars theActualText |\\\\n\\\\t(self match: #verticalBar) ifFalse: \\\\n\\\\t\\\\t[\\\\\\\"no temps\\\\\\\"\\\\n\\\\t\\\\tdoitFlag ifTrue: [requestor\\\\n\\\\t\\\\t\\\\t\\\\tifNil: [tempsMark _ 1]\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil: [tempsMark _ requestor selectionInterval first].\\\\n\\\\t\\\\t\\\\t^ #()].\\\\n\\\\t\\\\ttempsMark _ (prevEnd ifNil: [0]) + 1.\\\\n\\\\t\\\\ttempsMark _ hereMark\\\\t\\\\\\\"formerly --> prevMark + prevToken\\\\\\\".\\\\n\\\\n\\\\t\\\\ttempsMark > 0 ifTrue:\\\\n\\\\t\\\\t\\\\t[theActualText _ source contents.\\\\n\\\\t\\\\t\\\\t[tempsMark < theActualText size and: [(theActualText at: tempsMark) isSeparator]]\\\\n\\\\t\\\\t\\\\t\\\\twhileTrue: [tempsMark _ tempsMark + 1]].\\\\n\\\\t\\\\t\\\\t^ #()].\\\\n\\\\tvars _ OrderedCollection new.\\\\n\\\\t[hereType == #word]\\\\n\\\\t\\\\twhileTrue: [vars addLast: (encoder bindTemp: self advance in: methodSelector)].\\\\n\\\\t(self match: #verticalBar) ifTrue: \\\\n\\\\t\\\\t[tempsMark _ prevMark.\\\\n\\\\t\\\\t^ vars].\\\\n\\\\t^ self expected: 'Vertical bar'! !\\\\n\\\\n!Parser methodsFor: 'expression types' stamp: 'crl 2/26/1999 12:22'!\\\\ntemporaryBlockVariables\\\\n\\\\t\\\\\\\"Scan and answer temporary block variables.\\\\\\\"\\\\n\\\\n\\\\t| variables |\\\\n\\\\n\\\\t(self match: #verticalBar) ifFalse: [\\\\n\\\\t\\\\t\\\\\\\"There are't any temporary variables.\\\\\\\"\\\\n\\\\t\\\\t^#()].\\\\n\\\\n\\\\tvariables _ OrderedCollection new.\\\\n\\\\t[hereType == #word] whileTrue: [variables addLast: (encoder bindBlockTemp: self advance)].\\\\n\\\\t(self match: #verticalBar) ifTrue: [^variables].\\\\n\\\\t^self expected: 'Vertical bar'! !\\\\n\\\\n!Parser methodsFor: 'expression types' stamp: 'di 12/4/1999 21:04'!\\\\nvariable\\\\n\\\\n\\\\t| varName varStart varEnd |\\\\n\\\\tvarStart _ self startOfNextToken + requestorOffset.\\\\n\\\\tvarName _ self advance.\\\\n\\\\tvarEnd _ self endOfLastToken + requestorOffset.\\\\n\\\\t^ encoder encodeVariable: varName\\\\n\\\\t\\\\tsourceRange: (varStart to: varEnd)\\\\n\\\\t\\\\tifUnknown: [self correctVariable: varName interval: (varStart to: varEnd)]! !\\\\n\\\\n\\\\n!Parser methodsFor: 'pragmas' stamp: 'lr 2/6/2006 20:50'!\\\\naddPragma: aPragma\\\\n\\\\tself properties addPragma: aPragma.! !\\\\n\\\\n!Parser methodsFor: 'pragmas' stamp: 'lr 2/6/2006 21:02'!\\\\npragmaLiteral\\\\n\\\\t\\\\\\\"Read a pragma literal.\\\\\\\"\\\\n\\\\n\\\\t(hereType == #string or: [ hereType == #literal or: [ hereType == #number ] ])\\\\n\\\\t\\\\tifTrue: [ ^ self advance ].\\\\n\\\\t(here == $# and: [ tokenType == #word ])\\\\n\\\\t\\\\tifTrue: [ ^ self advance ].\\\\n\\\\t(here == #- and: [ tokenType == #number ])\\\\n\\\\t\\\\tifTrue: [ ^ (self advance; advance) negated ].\\\\n\\\\t(here = 'true' or: [ here = 'false' or: [ here = 'nil' or: [ Smalltalk hasClassNamed: here ] ] ])\\\\n\\\\t\\\\tifTrue: [ ^ Compiler evaluate: self advance ].\\\\n\\\\t^ self expected: 'Literal constant'.! !\\\\n\\\\n!Parser methodsFor: 'pragmas' stamp: 'lr 2/6/2006 20:23'!\\\\npragmaPrimitives\\\\n\\\\t| primitives |\\\\n\\\\tprimitives := self properties pragmas select: [ :each | \\\\n\\\\t\\\\t#( primitive: primitive:module: ) \\\\n\\\\t\\\\t\\\\tincludes: each keyword ].\\\\n\\\\tprimitives isEmpty \\\\n\\\\t\\\\tifTrue: [ ^ 0 ].\\\\n\\\\tprimitives size = 1 \\\\n\\\\t\\\\tifFalse: [ ^ self notify: 'Ambigous primitives' ].\\\\n\\\\t^ primitives first message sendTo: self.! !\\\\n\\\\n!Parser methodsFor: 'pragmas' stamp: 'lr 2/6/2006 20:23'!\\\\npragmaSequence\\\\n\\\\t\\\\\\\"Parse a sequence of method pragmas.\\\\\\\"\\\\n\\\\t\\\\n\\\\t[ true ] whileTrue: [\\\\n\\\\t\\\\t(self matchToken: #<)\\\\n\\\\t\\\\t\\\\tifFalse: [ ^ self ].\\\\n\\\\t\\\\tself pragmaStatement.\\\\n\\\\t\\\\t(self matchToken: \\\";\\n            r = \\\"{7689049, 2109470}\\\";\\n            s = 1;\\n        },\\n                {\\n            l = \\\"instance or #class> <selector name>), and with a string to be produced as part of the error msg if any of the methods affected is reached\\\\\\\"\\\\n\\\\n\\\\t| aClass sel keywords codeString |\\\\n\\\\ttripletList do:\\\\n\\\\t\\\\t[:triplet |  \\\\n\\\\t\\\\t\\\\t(aClass _ (Smalltalk at: triplet first ifAbsent: [nil])) notNil ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[triplet second == #class ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[aClass _ aClass class].\\\\n\\\\t\\\\t\\\\t\\\\tsel _ triplet third.\\\\n\\\\t\\\\t\\\\t\\\\tkeywords _ sel keywords.\\\\n\\\\t\\\\t\\\\t\\\\t(keywords size == 1 and: [keywords first asSymbol isKeyword not])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[codeString _ keywords first asString]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[codeString _ ''.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tkeywords withIndexDo:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:kwd :index |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcodeString _ codeString, ' ', (keywords at: index), ' ',\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t'arg', index printString]].\\\\n\\\\t\\\\t\\\\t\\\\tcodeString _ codeString, '\\\\n\\\\tself codeStrippedOut: ', (messageString surroundedBySingleQuotes).\\\\n\\\\n\\\\t\\\\t\\\\t\\\\taClass compile: codeString classified: 'stripped']]! !\\\\n\\\\n\\\\n!SmalltalkImage methodsFor: 'vm parameters' stamp: 'sd 6/27/2003 23:27'!\\\\nextraVMMemory\\\\n\\\\t\\\\\\\"Answer the current setting of the 'extraVMMemory' VM parameter. See the comment in extraVMMemory: for details.\\\\\\\"\\\\n\\\\n\\\\t^ self vmParameterAt: 23\\\\n! !\\\\n\\\\n!SmalltalkImage methodsFor: 'vm parameters' stamp: 'sd 6/27/2003 23:27'!\\\\nextraVMMemory: extraBytesToReserve\\\\n\\\\t\\\\\\\"Request that the given amount of extra memory be reserved for use by the virtual machine to leave extra C heap space available for things like plugins, network and file buffers, and so on. This request is stored when the image is saved and honored when the image is next started up. Answer the previous value of this parameter.\\\\\\\"\\\\n\\\\n\\\\textraBytesToReserve < 0\\\\n\\\\t\\\\tifTrue: [self error: 'VM memory reservation must be non-negative'].\\\\n\\\\t^ self vmParameterAt: 23 put: extraBytesToReserve\\\\n! !\\\\n\\\\n!SmalltalkImage methodsFor: 'vm parameters' stamp: 'sd 6/27/2003 23:47'!\\\\ngetVMParameters\\\\t\\\\n\\\\t\\\\\\\"Answer an Array containing the current values of the VM's internal\\\\n\\\\tparameter/metric registers.  Each value is stored in the array at the\\\\n\\\\tindex corresponding to its VM register.  (See #vmParameterAt: and\\\\n\\\\t#vmParameterAt:put:.)\\\\\\\"\\\\n\\\\t\\\\\\\"SmalltalkImage current getVMParameters\\\\\\\"\\\\n\\\\t\\\\n\\\\t<primitive: 254>\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!SmalltalkImage methodsFor: 'vm parameters' stamp: 'tpr 4/27/2005 11:03'!\\\\nvmParameterAt: parameterIndex\\\\n\\\\t\\\\\\\"parameterIndex is a positive integer corresponding to one of the VM's internal\\\\n\\\\tparameter/metric registers.  Answer with the current value of that register.\\\\n\\\\tFail if parameterIndex has no corresponding register.\\\\n\\\\tVM parameters are numbered as follows:\\\\n\\\\t\\\\t1\\\\tend of old-space (0-based, read-only)\\\\n\\\\t\\\\t2\\\\tend of young-space (read-only)\\\\n\\\\t\\\\t3\\\\tend of memory (read-only)\\\\n\\\\t\\\\t4\\\\tallocationCount (read-only)\\\\n\\\\t\\\\t5\\\\tallocations between GCs (read-write)\\\\n\\\\t\\\\t6\\\\tsurvivor count tenuring threshold (read-write)\\\\n\\\\t\\\\t7\\\\tfull GCs since startup (read-only)\\\\n\\\\t\\\\t8\\\\ttotal milliseconds in full GCs since startup (read-only)\\\\n\\\\t\\\\t9\\\\tincremental GCs since startup (read-only)\\\\n\\\\t\\\\t10\\\\ttotal milliseconds in incremental GCs since startup (read-only)\\\\n\\\\t\\\\t11\\\\ttenures of surving objects since startup (read-only)\\\\n\\\\t\\\\t12-20 specific to the translating VM\\\\n\\\\t\\\\t21\\\\troot table size (read-only)\\\\n\\\\t\\\\t22\\\\troot table overflows since startup (read-only)\\\\n\\\\t\\\\t23\\\\tbytes of extra memory to reserve for VM buffers, plugins, etc.\\\\n\\\\n\\\\t\\\\t24\\\\tmemory threshold above which shrinking object memory (rw)\\\\n\\\\t\\\\t25\\\\tmemory headroom when growing object memory (rw)\\\\n\\\\t\\\\t26  interruptChecksEveryNms - force an ioProcessEvents every N milliseconds, in case the image  is not calling getNextEvent often (rw)\\\\n\\\\t\\\\t27\\\\tnumber of times mark loop iterated for current IGC/FGC (read-only) includes ALL marking\\\\n\\\\t\\\\t28\\\\tnumber of times sweep loop iterated  for current IGC/FGC (read-only)\\\\n\\\\t\\\\t29\\\\tnumber of times make forward loop iterated for current IGC/FGC (read-only)\\\\n\\\\t\\\\t30\\\\tnumber of times compact move loop iterated for current IGC/FGC (read-only)\\\\n\\\\t\\\\t31\\\\tnumber of grow memory requests (read-only)\\\\n\\\\t\\\\t32\\\\tnumber of shrink memory requests (read-only)\\\\n\\\\t\\\\t33\\\\tnumber of root table entries used for current IGC/FGC (read-only)\\\\n\\\\t\\\\t34\\\\tnumber of allocations done before current IGC/FGC (read-only)\\\\n\\\\t\\\\t35\\\\tnumber of survivor objects after current IGC/FGC (read-only)\\\\n\\\\t\\\\t36  millisecond clock when current IGC/FGC completed (read-only)\\\\n\\\\t\\\\t37  number of marked objects for Roots of the world, not including Root Table entries for current IGC/FGC (read-only)\\\\n\\\\t\\\\t38  milliseconds taken by current IGC  (read-only)\\\\n\\\\t\\\\t39  Number of finalization signals for Weak Objects pending when current IGC/FGC completed (read-only)\\\\n\\\\t\\\\t40  VM word size - 4 or 8 (read-only)\\\\\\\"\\\\n\\\\n\\\\t<primitive: 254>\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!SmalltalkImage methodsFor: 'vm parameters' stamp: 'sd 6/27/2003 23:27'!\\\\nvmParameterAt: parameterIndex put: newValue\\\\n\\\\t\\\\\\\"parameterIndex is a positive integer corresponding to one of the VM's internal\\\\n\\\\tparameter/metric registers.  Store newValue (a positive integer) into that\\\\n\\\\tregister and answer with the previous value that was stored there.\\\\n\\\\tFail if newValue is out of range, if parameterIndex has no corresponding\\\\n\\\\tregister, or if the corresponding register is read-only.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 254>\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n\\\\n!SmalltalkImage methodsFor: 'vm profiling' stamp: 'sd 9/24/2003 11:54'!\\\\nclearProfile\\\\n\\\\t\\\\\\\"Clear the profile database.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 250>\\\\n! !\\\\n\\\\n!SmalltalkImage methodsFor: 'vm profiling' stamp: 'sd 9/24/2003 11:54'!\\\\ndumpProfile\\\\n\\\\t\\\\\\\"Dump the profile database to a file.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 251>\\\\n! !\\\\n\\\\n!SmalltalkImage methodsFor: 'vm profiling' stamp: 'sd 9/24/2003 11:54'!\\\\nprofile: aBlock\\\\n\\\\t\\\\\\\"Make a virtual machine profile of the given block.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: Profiling support is provided so that VM implementors\\\\n\\\\t can better understand and improve the efficiency of the virtual\\\\n\\\\t machine. To use it, you must be running a version of the\\\\n\\\\t virtual machine compiled with profiling enabled (which\\\\n\\\\t makes it much slower than normal even when not profiling).\\\\n\\\\t You will also need the CodeWarrior profile reader application.\\\\\\\"\\\\n\\\\n\\\\tself stopProfiling.\\\\n\\\\tself clearProfile.\\\\n\\\\tself startProfiling.\\\\n\\\\taBlock value.\\\\n\\\\tself stopProfiling.\\\\n\\\\tself dumpProfile.! !\\\\n\\\\n!SmalltalkImage methodsFor: 'vm profiling' stamp: 'sd 9/24/2003 11:55'!\\\\nstartProfiling\\\\n\\\\t\\\\\\\"Start profiling the virtual machine.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 252>\\\\n! !\\\\n\\\\n!SmalltalkImage methodsFor: 'vm profiling' stamp: 'sd 9/24/2003 11:55'!\\\\nstopProfiling\\\\n\\\\t\\\\\\\"Stop profiling the virtual machine.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 253>\\\\n! !\\\\n\\\\n\\\\n!SmalltalkImage methodsFor: 'vm statistics' stamp: 'sd 7/2/2003 21:45'!\\\\ntextMarkerForShortReport\\\\n\\\\n\\\\t^  'Since last view\\\\t'! !\\\\n\\\\n!SmalltalkImage methodsFor: 'vm statistics' stamp: 'sd 9/30/2003 13:53'!\\\\nvmStatisticsReportString\\\\n\\\\t\\\\\\\"StringHolderView open: (StringHolder new contents:\\\\n\\\\t\\\\tSmalltalkImage current vmStatisticsReportString) label: 'VM Statistics'\\\\\\\"\\\\n\\\\n\\\\t| params oldSpaceEnd youngSpaceEnd memoryEnd fullGCs fullGCTime incrGCs incrGCTime tenureCount mcMisses mcHits icHits upTime sendCount tms tmSize upTime2 fullGCs2 fullGCTime2 incrGCs2 incrGCTime2 tenureCount2 str |\\\\n\\\\tparams _ self getVMParameters.\\\\n\\\\toldSpaceEnd\\\\t\\\\t\\\\t_ params at: 1.\\\\n\\\\tyoungSpaceEnd\\\\t\\\\t_ params at: 2.\\\\n\\\\tmemoryEnd\\\\t\\\\t\\\\t_ params at: 3.\\\\n\\\\tfullGCs\\\\t\\\\t\\\\t\\\\t_ params at: 7.\\\\n\\\\tfullGCTime\\\\t\\\\t\\\\t_ params at: 8.\\\\n\\\\tincrGCs\\\\t\\\\t\\\\t\\\\t_ params at: 9.\\\\n\\\\tincrGCTime\\\\t\\\\t\\\\t_ params at: 10.\\\\n\\\\ttenureCount\\\\t\\\\t\\\\t_ params at: 11.\\\\n\\\\tmcMisses\\\\t\\\\t\\\\t_ params at: 15.\\\\n\\\\tmcHits\\\\t\\\\t\\\\t\\\\t_ params at: 16.\\\\n\\\\ticHits\\\\t\\\\t\\\\t\\\\t_ params at: 17.\\\\n\\\\tupTime _ Time millisecondClockValue.\\\\n\\\\tsendCount _ mcMisses + mcHits + icHits.\\\\n\\\\ttms _ TranslatedMethod allSubInstances.\\\\n\\\\ttmSize _ tms inject: 0 into: [:sum :tm | sum + (tm size * 4)].\\\\n\\\\n\\\\tstr _ WriteStream on: (String new: 1000).\\\\n\\\\tstr\\\\tnextPutAll: 'uptime\\\\t\\\\t\\\\t';\\\\n\\\\t\\\\tprint: (upTime / 1000 / 60 // 60); nextPut: $h;\\\\n\\\\t\\\\tprint: (upTime / 1000 / 60 \\\\\\\\\\\\\\\\ 60) asInteger; nextPut: $m;\\\\n\\\\t\\\\tprint: (upTime / 1000 \\\\\\\\\\\\\\\\ 60) asInteger; nextPut: $s; cr.\\\\n\\\\n\\\\tstr\\\\tnextPutAll: 'memory\\\\t\\\\t\\\\t';\\\\n\\\\t\\\\tnextPutAll: memoryEnd asStringWithCommas; nextPutAll: ' bytes'; cr.\\\\n\\\\tstr\\\\tnextPutAll:\\\\t'\\\\told\\\\t\\\\t\\\\t';\\\\n\\\\t\\\\tnextPutAll: oldSpaceEnd asStringWithCommas; nextPutAll: ' bytes (';\\\\n\\\\t\\\\tprint: ((oldSpaceEnd / memoryEnd * 100) roundTo: 0.1); nextPutAll: '%)'; cr.\\\\n\\\\tstr\\\\tnextPutAll: '\\\\tyoung\\\\t\\\\t';\\\\n\\\\t\\\\tnextPutAll: (youngSpaceEnd - oldSpaceEnd) asStringWithCommas; nextPutAll: ' bytes (';\\\\n\\\\t\\\\tprint: ((youngSpaceEnd - oldSpaceEnd / memoryEnd * 100) roundTo: 0.1); nextPutAll: '%)'; cr.\\\\n\\\\tstr\\\\tnextPutAll: '\\\\tused\\\\t\\\\t';\\\\n\\\\t\\\\tnextPutAll: youngSpaceEnd asStringWithCommas; nextPutAll: ' bytes (';\\\\n\\\\t\\\\tprint: ((youngSpaceEnd / memoryEnd * 100) roundTo: 0.1); nextPutAll: '%)'; cr.\\\\n\\\\tstr\\\\tnextPutAll: '\\\\tfree\\\\t\\\\t';\\\\n\\\\t\\\\tnextPutAll: (memoryEnd - youngSpaceEnd) asStringWithCommas; nextPutAll: ' bytes (';\\\\n\\\\t\\\\tprint: ((memoryEnd - youngSpaceEnd / memoryEnd * 100) roundTo: 0.1); nextPutAll: '%)'; cr.\\\\n\\\\n\\\\tstr\\\\tnextPutAll: 'GCs\\\\t\\\\t\\\\t\\\\t';\\\\n\\\\t\\\\tnextPutAll: (fullGCs + incrGCs) asStringWithCommas.\\\\n\\\\tfullGCs + incrGCs > 0 ifTrue: [\\\\n\\\\t\\\\tstr\\\\n\\\\t\\\\t\\\\tnextPutAll: ' ('; \\\\n\\\\t\\\\t\\\\tprint: ((upTime / (fullGCs + incrGCs)) roundTo: 1); \\\\n\\\\t\\\\t\\\\tnextPutAll: 'ms between GCs)'\\\\n\\\\t].\\\\n\\\\tstr cr.\\\\n\\\\tstr\\\\tnextPutAll: '\\\\tfull\\\\t\\\\t\\\\t';\\\\n\\\\t\\\\tprint: fullGCs; nextPutAll: ' totalling '; nextPutAll: fullGCTime asStringWithCommas; nextPutAll: 'ms (';\\\\n\\\\t\\\\tprint: ((fullGCTime / upTime * 100) roundTo: 1.0);\\\\n\\\\t\\\\tnextPutAll: '% uptime)'.\\\\n\\\\tfullGCs = 0 ifFalse:\\\\n\\\\t\\\\t[str\\\\tnextPutAll: ', avg '; print: ((fullGCTime / fullGCs) roundTo: 1.0); nextPutAll: 'ms'].\\\\n\\\\tstr\\\\tcr.\\\\n\\\\tstr\\\\tnextPutAll: '\\\\tincr\\\\t\\\\t';\\\\n\\\\t\\\\tprint: incrGCs; nextPutAll: ' totalling '; nextPutAll: incrGCTime asStringWithCommas; nextPutAll: 'ms (';\\\\n\\\\t\\\\tprint: ((incrGCTime / upTime * 100) roundTo: 1.0);\\\\n\\\\t\\\\tnextPutAll: '% uptime), avg '; print: ((incrGCTime / incrGCs) roundTo: 1.0); nextPutAll: 'ms'; cr.\\\\n\\\\tstr\\\\tnextPutAll: '\\\\ttenures\\\\t\\\\t';\\\\n\\\\t\\\\tnextPutAll: tenureCount asStringWithCommas.\\\\n\\\\ttenureCount = 0 ifFalse:\\\\n\\\\t\\\\t[str nextPutAll: ' (avg '; print: (incrGCs / tenureCount) asInteger; nextPutAll: ' GCs/tenure)'].\\\\n\\\\tstr\\\\tcr.\\\\n\\\\nLastStats ifNil: [LastStats _ Array new: 6]\\\\nifNotNil: [\\\\n\\\\tupTime2 _ upTime - (LastStats at: 1).\\\\n\\\\tfullGCs2 _ fullGCs - (LastStats at: 2).\\\\n\\\\tfullGCTime2 _ fullGCTime - (LastStats at: 3).\\\\n\\\\tincrGCs2 _ incrGCs - (LastStats at: 4).\\\\n\\\\tincrGCTime2 _ incrGCTime - (LastStats at: 5).\\\\n\\\\ttenureCount2 _ tenureCount - (LastStats at: 6).\\\\n\\\\n\\\\tstr\\\\tnextPutAll: self textMarkerForShortReport ;\\\\n\\\\t\\\\tnextPutAll: (fullGCs2 + incrGCs2) asStringWithCommas.\\\\n\\\\tfullGCs2 + incrGCs2 > 0 ifTrue: [\\\\n\\\\t\\\\tstr\\\\n\\\\t\\\\t\\\\tnextPutAll: ' ('; \\\\n\\\\t\\\\t\\\\tprint: ((upTime2 / (fullGCs2 + incrGCs2)) roundTo: 1); \\\\n\\\\t\\\\t\\\\tnextPutAll: 'ms between GCs)'.\\\\n\\\\t].\\\\n\\\\tstr cr.\\\\n\\\\tstr\\\\tnextPutAll: '\\\\tuptime\\\\t\\\\t'; print: ((upTime2 / 1000.0) roundTo: 0.1); nextPutAll: 's'; cr.\\\\n\\\\tstr\\\\tnextPutAll: '\\\\tfull\\\\t\\\\t\\\\t';\\\\n\\\\t\\\\tprint: fullGCs2; nextPutAll: ' totalling '; nextPutAll: fullGCTime2 asStringWithCommas; nextPutAll: 'ms (';\\\\n\\\\t\\\\tprint: ((fullGCTime2 / upTime2 * 100) roundTo: 1.0);\\\\n\\\\t\\\\tnextPutAll: '% uptime)'.\\\\n\\\\tfullGCs2 = 0 ifFalse:\\\\n\\\\t\\\\t[str\\\\tnextPutAll: ', avg '; print: ((fullGCTime2 / fullGCs2) roundTo: 1.0); nextPutAll: 'ms'].\\\\n\\\\tstr\\\\tcr.\\\\n\\\\tstr\\\\tnextPutAll: '\\\\tincr\\\\t\\\\t';\\\\n\\\\t\\\\tprint: incrGCs2; nextPutAll: ' totalling '; nextPutAll: incrGCTime2 asStringWithCommas; nextPutAll: 'ms (';\\\\n\\\\t\\\\tprint: ((incrGCTime2 / upTime2 * 100) roundTo: 1.0);\\\\n\\\\t\\\\tnextPutAll: '% uptime), avg '.\\\\n\\\\tincrGCs2 > 0 ifTrue: [\\\\n\\\\t\\\\t str print: ((incrGCTime2 / incrGCs2) roundTo: 1.0); nextPutAll: 'ms'\\\\n\\\\t].\\\\n\\\\tstr cr.\\\\n\\\\tstr\\\\tnextPutAll: '\\\\ttenures\\\\t\\\\t';\\\\n\\\\t\\\\tnextPutAll: tenureCount2 asStringWithCommas.\\\\n\\\\ttenureCount2 = 0 ifFalse:\\\\n\\\\t\\\\t[str nextPutAll: ' (avg '; print: (incrGCs2 / tenureCount2) asInteger; nextPutAll: ' GCs/tenure)'].\\\\n\\\\tstr\\\\tcr.\\\\n].\\\\n\\\\tLastStats at: 1 put: upTime.\\\\n\\\\tLastStats at: 2 put: fullGCs.\\\\n\\\\tLastStats at: 3 put: fullGCTime.\\\\n\\\\tLastStats at: 4 put: incrGCs.\\\\n\\\\tLastStats at: 5 put: incrGCTime.\\\\n\\\\tLastStats at: 6 put: tenureCount.\\\\n\\\\n\\\\tsendCount > 0 ifTrue: [\\\\n\\\\t\\\\tstr\\\\tnextPutAll: 'sends\\\\t\\\\t\\\\t';\\\\n\\\\t\\\\t\\\\tnextPutAll: sendCount asStringWithCommas; cr.\\\\n\\\\t\\\\tstr\\\\tnextPutAll: '\\\\tfull\\\\t\\\\t\\\\t';\\\\n\\\\t\\\\t\\\\tnextPutAll: mcMisses asStringWithCommas;\\\\n\\\\t\\\\t\\\\tnextPutAll: ' ('; print: ((mcMisses / sendCount * 100) roundTo: 0.1); nextPutAll: '%)'; cr.\\\\n\\\\t\\\\tstr\\\\tnextPutAll: '\\\\tm-cache\\\\t';\\\\n\\\\t\\\\t\\\\tnextPutAll: mcHits asStringWithCommas;\\\\n\\\\t\\\\t\\\\tnextPutAll: ' ('; print: ((mcHits / sendCount * 100) roundTo: 0.1); nextPutAll: '%)'; cr.\\\\n\\\\t\\\\tstr\\\\tnextPutAll: '\\\\ti-cache\\\\t\\\\t';\\\\n\\\\t\\\\t\\\\tnextPutAll: icHits asStringWithCommas;\\\\n\\\\t\\\\t\\\\tnextPutAll: ' ('; print: ((icHits / sendCount * 100) roundTo: 0.1); nextPutAll: '%)'; cr].\\\\n\\\\n\\\\ticHits > 0 ifTrue: [\\\\n\\\\t\\\\tstr\\\\tnextPutAll: 'methods\\\\t\\\\t\\\\t';\\\\n\\\\t\\\\t\\\\tnextPutAll: tms size asStringWithCommas; nextPutAll: ' translated'; cr.\\\\n\\\\t\\\\tstr\\\\tnextPutAll: '\\\\tsize\\\\t\\\\t\\\\t';\\\\n\\\\t\\\\t\\\\tnextPutAll: tmSize asStringWithCommas; nextPutAll: ' bytes, avg ';\\\\n\\\\t\\\\t\\\\tprint: ((tmSize / tms size) roundTo: 0.1); nextPutAll: ' bytes/method'; cr.\\\\n\\\\t\\\\tstr\\\\tnextPutAll: '\\\\tmemory\\\\t\\\\t';\\\\n\\\\t\\\\t\\\\tprint: ((tmSize / youngSpaceEnd * 100) roundTo: 0.1); nextPutAll: '% of used, ';\\\\n\\\\t\\\\t\\\\tprint: ((tmSize / memoryEnd * 100) roundTo: 0.1); nextPutAll: '% of available'; cr].\\\\n\\\\n\\\\t^ str contents\\\\n! !\\\\n\\\\n!SmalltalkImage methodsFor: 'vm statistics' stamp: 'sd 9/30/2003 13:54'!\\\\nvmStatisticsShortString\\\\n\\\\t\\\\\\\"Convenience item for access to recent statistics only\\\\\\\"\\\\n\\\\t\\\\\\\"StringHolderView open: (StringHolder new contents: SmalltalkImage current vmStatisticsShortString)\\\\n\\\\t\\\\tlabel: 'VM Recent Statistics'\\\\\\\"\\\\n\\\\n\\\\t^ (ReadStream on: self vmStatisticsReportString) upToAll: 'Since'; upTo: Character cr; upToEnd\\\\n! !\\\\n\\\\n\\\\n!SmalltalkImage methodsFor: 'private source file' stamp: 'sd 9/24/2003 12:42'!\\\\nsourceFileVersionString: aString\\\\n\\\\n\\\\tSourceFileVersionString := aString! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSmalltalkImage class\\\\n\\\\tinstanceVariableNames: 'current'!\\\\n\\\\n!SmalltalkImage class methodsFor: 'class initialization' stamp: 'yo 2/18/2004 18:26'!\\\\ninitialize\\\\n\\\\\\\"\\\\n\\\\tself initialize\\\\n\\\\\\\"\\\\n\\\\tSmalltalk addToStartUpList: SmalltalkImage.\\\\n\\\\tSmalltalkImage startUp.\\\\n! !\\\\n\\\\n!SmalltalkImage class methodsFor: 'class initialization' stamp: 'yo 2/18/2004 18:25'!\\\\nstartUp\\\\n\\\\n\\\\tEndianCache _ nil.\\\\n! !\\\\n\\\\n\\\\n!SmalltalkImage class methodsFor: 'instance creation' stamp: 'sd 9/30/2003 14:28'!\\\\ncurrent\\\\n\\\\t\\\\\\\"Note that this could be implemented differently to avoid the test\\\\\\\"\\\\n\\\\n\\\\tcurrent isNil\\\\n\\\\t\\\\tifTrue: [current := self basicNew].\\\\n\\\\t^ current! !\\\\n\\\\n!SmalltalkImage class methodsFor: 'instance creation' stamp: 'sd 9/30/2003 13:39'!\\\\nnew\\\\n\\\\n\\\\tself error: 'Use current'.! !\\\\nReferenceStream subclass: #SmartRefStream\\\\n\\\\tinstanceVariableNames: 'structures steady reshaped renamed renamedConv superclasses progressBar objCount classInstVars'\\\\n\\\\tclassVariableNames: 'ScannedObject'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Object Storage'!\\\\n!SmartRefStream commentStamp: '<historical>' prior: 0!\\\\nOrdinary ReferenceStreams assume that the names and order of instance variables is exactly the same when an object file is written and read.  \\\\n\\\\tSmartRefStream allows object files to be read even after instance variables have changed or the entire class has been renamed.\\\\n\\\\nWhen an object file is written, no one knows how the classes will change in the future.  Therefore, all conversion must be done when the file is read.  The key is to store enough information in the file about the names of the instance variables of all outgoing classes.  \\\\n\\\\nSmartRefStream works best with only one tree of objects per file.  You can nextPut: more than once, but each object tree gets its own class structure description, which is big.  \\\\n\\\\nConversion of old objects is done by a method in each class called (convertToCurrentVersion: varDict refStream: smartRefStrm).  At fileOut time, ChangeSet>>checkForConversionMethods creates a prototype of this method (if Preference #conversionMethodsAtFileOut is true).  The programmer must edit this method to (1) test if the incoming object needs conversion, (2) put non-nil values into any new inst vars that need them, and (3) save the data of any inst vars that are being deleted. \\\\n\\\\nDetermining which old version is represented by the incoming object can be done in several ways: noticing that a current inst var is nil when it should have data, noticing that there is an older inst var name in the variable dictionary (varDict), checking kinds of objects in one or more inst vars, or retrieving the classVersion of the incoming object from the ref stream.  \\\\n\\\\nIf a class is renamed, a method goes into SmartRefStream telling the new name.  The conversion method of the new class must be prepared to accept instances of the old class also.  If no inst var names have changed, the conversion method does nothing.\\\\n\\\\nAn example:  \\\\n\\\\tSuppose we change the representation of class Rectangle from ('origin' 'corner') to ('origin' 'extent').  Suppose lots of Rectangle instances are already out on files (in .pr project files, especially).  \\\\n\\\\tThe programmer changes the class definition, modifies all the methods, and filesOut.  A series of dialogs appear, asking if instances Rectangle might be in an object file, if 'extent' needs to be non-nil (yes), and if the info in 'corner' needs to be preserved (yes).  This method appears:\\\\n\\\\nRectangle >> convertToCurrentVersion: varDict refStream: smartRefStrm\\\\n\\\\t\\\\\\\"These variables are automatically stored into the new instance: #('origin').\\\\n\\\\tTest for this particular conversion.  Get values using expressions like (varDict at: 'foo').\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"New variables: #('extent').  If a non-nil value is needed, please assign it.\\\\\\\"\\\\n\\\\t\\\\\\\"These are going away #('corner').  Possibly store their info in some other variable?\\\\\\\"\\\\n\\\\t\\\\\\\"Move your code above the ^ super...  Delete extra comments.\\\\\\\"\\\\n\\\\t^ super convertToCurrentVersion: varDict refStream: smartRefStrm\\\\n\\\\nThe programmer modifies it to be:\\\\n\\\\nRectangle >> convertToCurrentVersion: varDict refStream: smartRefStrm\\\\n\\\\n(varDict includesKey: 'extent') ifFalse: [\\\\\\\"old version!!\\\\\\\"\\\\n\\\\t\\\\\\\"Create the new extent, and preserve the info from the old corner\\\\\\\"\\\\n\\\\textent _ (varDict at: 'corner') - origin.\\\\n\\\\t].\\\\n^ super convertToCurrentVersion: varDict refStream: smartRefStrm\\\\n\\\\n\\\\tThis conversion method stays in the system and is ready to convert the old format of Rectangle whenever one is encountered in an object file.  Note that the subclasses of Rectangle, (B3DViewport, CharacterBlock, and Quadrangle) do not need conversion methods.  Their instances will be converted by the code in Rectangle.  \\\\n\\\\n\\\\tFiles written by SmartRefStream are in standard fileout format.  You can mix raw objects with code to be filed in.  The file starts out in the normal fileOut format.  Definitions of new classes on the front.\\\\n\\\\nstructures \\\\tDictionary of (#Rectangle -> #(<classVersionInteger> 'origin' 'corner')).  Inst \\\\n\\\\t\\\\t\\\\t\\\\tvar names are strings.\\\\nsteady \\\\t\\\\tSet of Classes who have the same structure now as on the incoming file.\\\\n\\\\t\\\\t\\\\t\\\\tIncludes classes with same inst vars except for new ones added on the end.\\\\nreshaped \\\\tDictionary of Classes who have a different structure now from the incoming file.  \\\\n\\\\t\\\\t\\\\t\\\\tIncludes those with same inst vars but new version number.\\\\n\\\\t\\\\t\\\\t\\\\t(old class name -> method selector to fill in data for version to version)\\\\nrenamed\\\\tDictionary of Classes who have a different name.  Make an instance of the new\\\\n\\\\t\\\\t\\\\tclass, and send it the conversion call.\\\\n\\\\t\\\\t\\\\t\\\\t(old class name symbol -> new class name).  \\\\nrenamedConv\\\\tDictionary of conversion selector for Classes who have a different name.\\\\n\\\\t\\\\t\\\\t\\\\t(old class name symbol -> conversion selector).  \\\\ntopCall\\\\t\\\\tTells if next or nextPut: are working on the top object in the tree.  \\\\n\\\\t\\\\t\\\\tnil if outside, the top object if deep inside.\\\\n\\\\nSee DataStream.typeIDFor: for where the tangle of objects is clipped, so the whole system will not be written on the file.\\\\n\\\\nNo object that is written on the file is ever a class.  All class definitions are filed in.  A class may be stored inside an ImageSegment that itself is stored in a SmartRefStream.\\\\n\\\\nUniClasses are classes for the instance specific behavior of just one instance.  Subclasses of Player are an example.  When a UniClass is read in, and a class of the same name already exists, the incoming one is renamed.  ObjectScanner converts the filed-in code.\\\\n\\\\nValues in instance variables of UniClasses are stored in the array that tells the class structure.  It is the fourth of the four top level objects.  #(version (class-structure) the-object ((#Player25 scripts slotInfo costumeDictionary) (#Player26 scripts slotInfo costumeDictionary))).\\\\n\\\\nThere is a separate subclass for doing veryDeepCopy (in memory).  Currently, any object for which objectToStoreOnDataStream return an object other than self, does this:  The new object (a DiskProxy) is traced.  When it comes time to go through the fields of the old object, they are not found as keys in references (DiskProxies are there instead).  So the old field value is left in the new object.  That is OK for StrikeFont, Class, MetaClass, DisplayScreen.  But the DiskProxies are evaluated, which takes a lot of time.\\\\n\\\\nSome metaclasses are put into the structures table.  This is for when a block has a receiver that is a class.  See checkFatalReshape:.\\\\n\\\\nImageSegments:\\\\n\\\\tA ReferenceStream is used to enumerate objects to put inside an ImageSegment.  If an instance of a UniClass is seen, the class is put in also.\\\\n\\\\tA SmartRefStream is used to store the ImageSegment.  Roots are nil, and the segment is a wordArray.  We are encoding the outPointers.  Structures contains all classes from both places.  Must filter out UniClasses for some things, and do include them for putting source code at end of file.  Do not write any class inst vars in file.\\\\n\\\\n--Ted Kaehler and Bob Arning.\\\\n!\\\\n\\\\n\\\\n!SmartRefStream methodsFor: 'accessing' stamp: 'tk 5/19/1999 15:47'!\\\\nstructures: anObject\\\\n\\\\tstructures _ anObject! !\\\\n\\\\n!SmartRefStream methodsFor: 'accessing' stamp: 'tk 5/19/1999 15:47'!\\\\nsuperclasses: anObject\\\\n\\\\tsuperclasses _ anObject! !\\\\n\\\\n\\\\n!SmartRefStream methodsFor: 'class changed shape' stamp: 'tk 1/7/97'!\\\\ncatalogValues: instVarList size: varsOnDisk\\\\n\\\\t\\\\\\\"Create a dictionary of (name -> value) for the inst vars of this reshaped object.  Indexed vars as (1 -> val) etc.  \\\\\\\"\\\\n\\\\n\\\\t| dict sz |\\\\n\\\\tdict _ Dictionary new.\\\\n\\\\t2 to: instVarList size do: [:ind |\\\\n\\\\t\\\\tdict at: (instVarList at: ind) put: self next].\\\\n\\\\tsz _ varsOnDisk - (instVarList size - 1).\\\\n\\\\t1 to: sz do: [:ii | \\\\n\\\\t\\\\tdict at: ii put: self next].\\\\n\\\\t\\\\\\\"Total number read MUST be equal to varsOnDisk!!\\\\\\\"\\\\n\\\\tsz > 0 ifTrue: [dict at: #SizeOfVariablePart put: sz].\\\\n\\\\t^ dict! !\\\\n\\\\n!SmartRefStream methodsFor: 'class changed shape' stamp: 'ar 9/27/2005 22:41'!\\\\nconversionMethodsFor: classList\\\\n\\\\t| oldStruct newStruct list |\\\\n\\\\t\\\\\\\"Each of these needs a conversion method.  Hard part is the comment in it.  Return a MessageSet.\\\\\\\"\\\\n\\\\n\\\\tlist _ OrderedCollection new.\\\\n\\\\tclassList do: [:cls |\\\\n\\\\t\\\\toldStruct _ structures at: cls name ifAbsent: [#()].\\\\n\\\\t\\\\tnewStruct _ (Array with: cls classVersion), (cls allInstVarNames).\\\\n\\\\t\\\\tself writeConversionMethodIn: cls fromInstVars: oldStruct to: newStruct \\\\n\\\\t\\\\t\\\\t\\\\trenamedFrom: nil.\\\\n\\\\t\\\\tlist add: cls name, ' convertToCurrentVersion:refStream:'.\\\\n\\\\t\\\\t].\\\\n\\\\n\\\\t^list.! !\\\\n\\\\n!SmartRefStream methodsFor: 'class changed shape' stamp: 'tk 5/26/97'!\\\\nstoreInstVarsIn: anObject from: dict\\\\n\\\\t\\\\\\\"For instance variables with the same names, store them in the new instance.  Values in variable-length part also.  This is NOT the normal inst var transfer!!  See Object.readDataFrom:size:.  This is for when inst var names have changed and some additional conversion is needed.  Here we handle the unchanged vars.  \\\\\\\"\\\\n\\\\n\\\\t(anObject class allInstVarNames) doWithIndex: [:varName :index |\\\\n\\\\t\\\\t(dict includesKey: varName) ifTrue: [\\\\n\\\\t\\\\t\\\\tanObject instVarAt: index put: (dict at: varName)]].\\\\n\\\\t\\\\\\\"variable part\\\\\\\"\\\\n\\\\t(dict includesKey: #SizeOfVariablePart) ifFalse: [^ anObject].\\\\n\\\\t1 to: (dict at: #SizeOfVariablePart) do: [:index | \\\\n\\\\t\\\\tanObject basicAt: index put: (dict at: index)].\\\\n\\\\t^ anObject! !\\\\n\\\\n!SmartRefStream methodsFor: 'class changed shape' stamp: 'tk 6/8/2001 09:57'!\\\\nwriteClassRename: newName was: oldName\\\\n\\\\t\\\\\\\"Write a method that tells which modern class to map instances to.\\\\\\\"\\\\n\\\\t| oldVer sel code |\\\\n\\\\n\\\\toldVer _ self versionSymbol: (structures at: oldName).\\\\n\\\\tsel _ oldName asString.\\\\n\\\\tsel at: 1 put: (sel at: 1) asLowercase.\\\\n\\\\tsel _ sel, oldVer.\\\\t\\\\\\\"i.e. #rectangleoc4\\\\\\\"\\\\n\\\\n\\\\tcode _ WriteStream on: (String new: 500).\\\\n\\\\tcode nextPutAll: sel; cr.\\\\n\\\\tcode cr; tab; nextPutAll: '^ ', newName.\\\\t\\\\\\\"Return new class\\\\\\\"\\\\n\\\\n\\\\tself class compile: code contents classified: 'conversion'.\\\\n\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'class changed shape' stamp: 'CdG 10/17/2005 21:01'!\\\\nwriteClassRenameMethod: sel was: oldName fromInstVars: oldList\\\\n\\\\t\\\\\\\"The class coming is unknown.  Ask the user for the existing class it maps to.  If got one, write a method, and restart the obj fileIn.  If none, write a dummy method and get the user to complete it later.  \\\\\\\"\\\\n\\\\n| tell choice  newName answ code |\\\\n\\\\n\\\\tself flag: #bobconv.\\\\t\\\\n\\\\n\\\\ntell := 'Reading an instance of ', oldName, '.\\\\nWhich modern class should it translate to?'.\\\\nansw := (UIManager default \\\\n\\\\t\\\\tchooseFrom: #('Let me type the name now' 'Let me think about it'\\\\n'Let me find a conversion file on the disk') \\\\n\\\\t\\\\ttitle: tell). \\\\n\\\\nansw = 1 ifTrue: [\\\\n\\\\ttell := 'Name of the modern class {1} should translate to:' translated format: {oldName}.\\\\n\\\\tchoice := UIManager default request: tell.\\\\t\\\\t\\\\\\\"class name\\\\\\\"\\\\n\\\\t(choice size = 0) \\\\n\\\\t\\\\tifTrue: [answ := 'conversion method needed']\\\\n\\\\t\\\\tifFalse: [newName := choice.\\\\n\\\\t\\\\t\\\\tansw := Smalltalk at: newName asSymbol \\\\n\\\\t\\\\t\\\\t\\\\tifAbsent: ['conversion method needed'].\\\\n\\\\t\\\\t\\\\tansw isString ifFalse: [renamed at: oldName asSymbol put: answ name]]].\\\\n(answ = 3) | (answ = 0) ifTrue: [self close.\\\\n\\\\t\\\\t^ 'conversion method needed'].\\\\nansw = 2 ifTrue: [answ := 'conversion method needed'].\\\\nansw = 'conversion method needed' ifTrue: [\\\\n\\\\t\\\\tself close.  \\\\n\\\\t\\\\tnewName := 'PutNewClassHere'].\\\\n\\\\ncode := WriteStream on: (String new: 500).\\\\ncode nextPutAll: sel; cr.\\\\ncode cr; tab; nextPutAll: '^ ', newName.\\\\t\\\\\\\"Return new class\\\\\\\"\\\\n\\\\nself class compile: code contents classified: 'conversion'.\\\\n\\\\nnewName = 'PutNewClassHere' ifTrue: [\\\\n\\\\tself inform: 'Please complete the following method and \\\\nthen read-in the object file again.'.\\\\n\\\\tSystemNavigation default browseAllImplementorsOf: sel asSymbol]. \\\\n\\\\n\\\\t\\\\\\\"The class version number only needs to change under one specific circumstance.  That is when the first letters of the instance variables have stayed the same, but their meaning has changed.  A conversion method is needed, but this system does not know it.  \\\\n\\\\tIf this is true for class Foo, define classVersion in Foo class.  \\\\n\\\\tBeware of previous object fileouts already written after the change in meaning, but before bumping the version number.  They have the old (wrong) version number, say 2.  If this is true, your method must be able to test the data and successfully read files that say version 2 but are really 3.\\\\\\\"\\\\n\\\\n\\\\t^ answ! !\\\\n\\\\n!SmartRefStream methodsFor: 'class changed shape' stamp: 'tk 6/7/2001 13:02'!\\\\nwriteConversionMethod: sel class: newClass was: oldName fromInstVars: oldList to: newList\\\\n\\\\t\\\\\\\"The method convertToCurrentVersion:refStream: was not found in newClass.  Write a default conversion method for the author to modify.\\\\\\\"\\\\n\\\\n\\\\t| code newOthers oldOthers copied |\\\\n\\\\n\\\\tcode _ WriteStream on: (String new: 500).\\\\n\\\\tcode nextPutAll: 'convertToCurrentVersion: varDict refStream: smartRefStrm'; cr; tab.\\\\n\\\\tnewOthers _ newList asOrderedCollection \\\\\\\"copy\\\\\\\".\\\\n\\\\toldOthers _ oldList asOrderedCollection \\\\\\\"copy\\\\\\\".\\\\n\\\\tcopied _ OrderedCollection new.\\\\n\\\\tnewList do: [:instVar |\\\\n\\\\t\\\\t(oldList includes: instVar) ifTrue: [\\\\n\\\\t\\\\t\\\\tinstVar isInteger ifFalse: [copied add: instVar].\\\\n\\\\t\\\\t\\\\tnewOthers remove: instVar.\\\\n\\\\t\\\\t\\\\toldOthers remove: instVar]].\\\\n\\\\tcode nextPutAll: '\\\\\\\"These variables are automatically stored into the new instance '.\\\\n\\\\tcode nextPutAll: copied asArray printString; nextPut: $. .\\\\n\\\\tcode cr; tab; nextPutAll: 'This method is for additional changes.'; \\\\n\\\\t\\\\tnextPutAll: ' Use statements like (foo _ varDict at: ''foo'').\\\\\\\"'; cr; cr; tab.\\\\n\\\\t(newOthers size = 0) & (oldOthers size = 0) ifTrue: [^ self].\\\\n\\\\t\\\\t\\\\\\\"Instance variables are the same.  Only the order changed.  No conversion needed.\\\\\\\"\\\\n\\\\t(newOthers size > 0) ifTrue: [code nextPutAll: '\\\\\\\"New variables: ', newOthers asArray printString, '  If a non-nil value is needed, please assign it.\\\\\\\"\\\\\\\\' withCRs].\\\\n\\\\t(oldOthers size > 0) ifTrue: [code nextPutAll: '\\\\t\\\\\\\"These are going away ', oldOthers asArray printString, '.  Possibly store their info in some other variable?\\\\\\\"'].\\\\n\\\\n\\\\tcode cr; tab.\\\\n\\\\tcode nextPutAll: '^ super convertToCurrentVersion: varDict refStream: smartRefStrm'.\\\\n\\\\tnewClass compile: code contents classified: 'object fileIn'.\\\\n\\\\n\\\\n\\\\t\\\\\\\"If you write a conversion method beware that the class may need a version number change.  This only happens when two conversion methods in the same class have the same selector name.  (A) The inst var lists of the new and old versions intials as some older set of new and old inst var lists.  or (B) Twice in a row, the class needs a conversion method, but the inst vars stay the same the whole time.  (For an internal format change.)\\\\n\\\\tIf either is the case, fileouts already written with the old (wrong) version number, say 2.  Your method must be able to read files that say version 2 but are really 3, until you expunge the erroneous version 2 files from the universe.\\\\\\\"\\\\n\\\\n ! !\\\\n\\\\n!SmartRefStream methodsFor: 'class changed shape' stamp: 'nk 7/29/2004 10:10'!\\\\nwriteConversionMethodIn: newClass fromInstVars: oldList to: newList renamedFrom: oldName\\\\n\\\\t\\\\\\\"The method convertToCurrentVersion:refStream: was not found in newClass.  Write a default conversion method for the author to modify.  If method exists, append new info into the end.\\\\\\\"\\\\n\\\\n\\\\t| code newOthers oldOthers copied newCode |\\\\n\\\\n\\\\tnewOthers _ newList asOrderedCollection \\\\\\\"copy\\\\\\\".\\\\n\\\\toldOthers _ oldList asOrderedCollection \\\\\\\"copy\\\\\\\".\\\\n\\\\tcopied _ OrderedCollection new.\\\\n\\\\tnewList do: [:instVar |\\\\n\\\\t\\\\t(oldList includes: instVar) ifTrue: [\\\\n\\\\t\\\\t\\\\tinstVar isInteger ifFalse: [copied add: instVar].\\\\n\\\\t\\\\t\\\\tnewOthers remove: instVar.\\\\n\\\\t\\\\t\\\\toldOthers remove: instVar]].\\\\n\\\\tcode _ WriteStream on: (String new: 500).\\\\n\\\\tcode cr; cr; tab; nextPutAll: '\\\\\\\"From ', SystemVersion current version, ' [', SmalltalkImage current lastUpdateString;\\\\n\\\\t\\\\t\\\\tnextPutAll: '] on ', Date today printString, '\\\\\\\"'; cr.\\\\n\\\\tcode tab; nextPutAll: '\\\\\\\"These variables are automatically stored into the new instance: '.\\\\n\\\\tcode nextPutAll: copied asArray printString; nextPut: $.; cr.\\\\n\\\\tcode tab; nextPutAll: 'Test for this particular conversion.'; \\\\n\\\\t\\\\tnextPutAll: '  Get values using expressions like (varDict at: ''foo'').\\\\\\\"'; cr; cr.\\\\n\\\\t(newOthers size = 0) & (oldOthers size = 0) & (oldName == nil) ifTrue: [^ self].\\\\n\\\\t\\\\t\\\\\\\"Instance variables are the same.  Only the order changed.  No conversion needed.\\\\\\\"\\\\n\\\\t(newOthers size > 0) ifTrue: [\\\\n\\\\t\\\\tcode tab; nextPutAll: '\\\\\\\"New variables: ', newOthers asArray printString, \\\\n\\\\t\\\\t\\\\t'.  If a non-nil value is needed, please assign it.\\\\\\\"'; cr].\\\\n\\\\t(oldOthers size > 0) ifTrue: [\\\\n\\\\t\\\\tcode tab; nextPutAll: '\\\\\\\"These are going away ', oldOthers asArray printString, \\\\n\\\\t\\\\t\\\\t'.  Possibly store their info in some other variable?\\\\\\\"'; cr].\\\\n\\\\toldName ifNotNil: [\\\\n\\\\t\\\\tcode tab; nextPutAll: '\\\\\\\"Test for instances of class ', oldName, '.'; cr.\\\\n\\\\t\\\\tcode tab; nextPutAll: 'Instance vars with the same name have been moved here.\\\\\\\"'; cr.\\\\n\\\\t\\\\t].\\\\n\\\\tcode tab; nextPutAll: '\\\\\\\"Move your code above the ^ super...  Delete extra comments.\\\\\\\"'; cr. \\\\n\\\\n\\\\t(newClass includesSelector: #convertToCurrentVersion:refStream:) \\\\n\\\\t\\\\tifTrue: [\\\\\\\"append to old methods\\\\\\\"\\\\n\\\\t\\\\t\\\\tnewCode _ (newClass sourceCodeAt: #convertToCurrentVersion:refStream:),\\\\n\\\\t\\\\t\\\\t\\\\tcode contents]\\\\n\\\\t\\\\tifFalse: [\\\\\\\"new method\\\\\\\"\\\\n\\\\t\\\\t\\\\tnewCode _ 'convertToCurrentVersion: varDict refStream: smartRefStrm',\\\\n\\\\t\\\\t\\\\t\\\\tcode contents, \\\\n\\\\t\\\\t\\\\t\\\\t'\\\\t^ super convertToCurrentVersion: varDict refStream: smartRefStrm'].\\\\n\\\\tnewClass compile: newCode classified: 'object fileIn'.\\\\n\\\\n\\\\n\\\\t\\\\\\\"If you write a conversion method beware that the class may need a version number change.  This only happens when two conversion methods in the same class have the same selector name.  (A) The inst var lists of the new and old versions intials as some older set of new and old inst var lists.  or (B) Twice in a row, the class needs a conversion method, but the inst vars stay the same the whole time.  (For an internal format change.)\\\\n\\\\tIf either is the case, fileouts already written with the old (wrong) version number, say 2.  Your method must be able to read files that say version 2 but are really 3, until you expunge the erroneous version 2 files from the universe.\\\\\\\"\\\\n\\\\n ! !\\\\n\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'ar 4/10/2005 15:44'!\\\\nabstractStringx0\\\\n\\\\n\\\\t^ String! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'ar 7/29/2005 18:41'!\\\\nalansTextPlusMorphbosfcebbmsopssrsggshtt0\\\\n\\\\n\\\\t^ TextPlusMorph! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'jm 5/21/1998 06:44'!\\\\nbookPageMorphbosfcepcbbfgcc0\\\\n\\\\t\\\\\\\"BookPageMorph->PasteUpMorph. For reading in old BookMorphs.\\\\\\\"\\\\n\\\\n\\\\t^ PasteUpMorph\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'di 5/22/1998 15:03'!\\\\nclippingMorphbosfcep0\\\\n\\\\t^ PasteUpMorph! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'jm 5/21/1998 06:44'!\\\\nclippingMorphbosfcepc0\\\\n\\\\t\\\\\\\"ClippingMorph->PasteUpMorph. For reading in old BookMorphs.\\\\\\\"\\\\n\\\\n\\\\t^ PasteUpMorph! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'tk 11/3/2000 18:47'!\\\\ndropShadowMorphbosfces0\\\\n\\\\n\\\\t^ Morph ! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'jm 11/13/97 10:32'!\\\\ngradientFillbosfcepbbfgcc0\\\\n\\\\t^ GradientFillMorph! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'di 5/21/1998 19:24'!\\\\nlayoutMorphbosfcepbbochvimol0\\\\n\\\\t^ AlignmentMorph! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'tk 5/12/1998 16:18'!\\\\nlayoutMorphbosfcepcbbochvimol0\\\\n\\\\t^ AlignmentMorph! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'ar 10/26/2000 01:55'!\\\\nmorphicEventtcbks0\\\\n\\\\t^ MorphicEvent! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'ar 10/26/2000 00:48'!\\\\nmorphicSoundEventtcbkss0\\\\n\\\\t^ MorphicUnknownEvent! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'ar 4/12/2005 17:38'!\\\\nmultiStringx0\\\\n\\\\n\\\\t^ WideString! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'ar 4/12/2005 17:38'!\\\\nmultiSymbolx0\\\\n\\\\n\\\\t^ WideSymbol! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'ar 7/8/2001 17:11'!\\\\nmyMorphbosfce0\\\\n\\\\n\\\\treshaped at: #MyMorph put: #convertbosfce0:bosfce0:.\\\\n\\\\t\\\\t\\\\\\\"Be sure to define that conversion method in class Morph\\\\\\\"\\\\n\\\\t^ Morph! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'RAA 10/26/2000 09:43'!\\\\nnewMorphicEventts0\\\\n\\\\n\\\\t^ MorphicEvent! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'mir 7/12/2002 18:03'!\\\\nscrollControllermvslrrsmsms0\\\\n\\\\n\\\\t^ MouseMenuController! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'tk 1/14/1999 13:16'!\\\\ntransparentColorrcc0\\\\n\\\\t^ TranslucentColor! !\\\\n\\\\n!SmartRefStream methodsFor: 'conversion' stamp: 'di 8/16/2000 16:37'!\\\\nworldMorphbosfcebbfgccpmcpbttloiairfidcuwhavcdsll0\\\\n\\\\t^ 'PutNewClassHere'  \\\\\\\" <-- Replace this by a class name (no string quotes)\\\\\\\"! !\\\\n\\\\n\\\\n!SmartRefStream methodsFor: 'import image segment' stamp: 'tk\\\\n\\\\n11/26/2004 05:53'!\\\\napplyConversionMethodsTo: objectIn className: className varMap: varMap\\\\n\\\\n\\\\t\\\\\\\"Modify the object's instance vars to have the proper values\\\\n\\\\nfor its new shape.  Mostly, fill in defaut values of new inst vars.\\\\n\\\\nCan substitute an object of a different class.  (Beware: if\\\\n\\\\nsubstituted, varMap will not be correct when the new object is asked\\\\n\\\\nto convert.)\\\\\\\"\\\\n\\\\n\\\\t| anObject prevObject |\\\\n\\\\n\\\\n\\\\n\\\\tself flag: #bobconv.\\\\n\\\\n\\\\n\\\\n\\\\tanObject _ objectIn.\\\\n\\\\n\\\\t[\\\\n\\\\n\\\\t\\\\tprevObject _ anObject.\\\\n\\\\n\\\\t\\\\tanObject _ anObject convertToCurrentVersion: varMap\\\\n\\\\nrefStream: self.\\\\n\\\\n\\\\t\\\\tprevObject == anObject\\\\n\\\\n\\\\t] whileFalse.\\\\n\\\\n\\\\t^anObject\\\\n\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'import image segment' stamp: 'RAA 12/20/2000 11:08'!\\\\ncheckFatalReshape: setOfClasses\\\\n\\\\t| suspects oldInstVars newInstVars bad className |\\\\n\\\\t\\\\\\\"Inform the user if any of these classes were reshaped.  A block has a method from the old system whose receiver is of this class.  The method's inst var references might be wrong.  OK if inst vars were only added.\\\\\\\"\\\\n\\\\n\\\\tself flag: #bobconv.\\\\t\\\\n\\\\n\\\\tsetOfClasses isEmpty ifTrue: [^ self].\\\\n\\\\tsuspects _ OrderedCollection new.\\\\n\\\\tsetOfClasses do: [:aClass |\\\\n\\\\t\\\\tclassName _ renamed keyAtValue: aClass name ifAbsent: [aClass name].\\\\n\\\\t\\\\toldInstVars _ (structures at: className ifAbsent: [#(0)]) allButFirst.\\\\t\\\\t\\\\\\\"should be there\\\\\\\"\\\\n\\\\t\\\\tnewInstVars _ aClass allInstVarNames.\\\\n\\\\t\\\\toldInstVars size > newInstVars size ifTrue: [bad _ true].\\\\n\\\\t\\\\toldInstVars size = newInstVars size ifTrue: [\\\\n\\\\t\\\\t\\\\tbad _ oldInstVars ~= newInstVars].\\\\n\\\\t\\\\toldInstVars size < newInstVars size ifTrue: [\\\\n\\\\t\\\\t\\\\tbad _ oldInstVars ~= (newInstVars copyFrom: 1 to: oldInstVars size)].\\\\n\\\\t\\\\tbad ifTrue: [suspects add: aClass]].\\\\n\\\\n\\\\tsuspects isEmpty ifFalse: [\\\\n\\\\t\\\\tself inform: ('Imported foreign methods will run on instances of:\\\\\\\\',\\\\n\\\\t\\\\t\\\\tsuspects asArray printString, \\\\n\\\\t\\\\t\\\\t'\\\\\\\\whose shape has changed.  Errors may occur.') withCRs].! !\\\\n\\\\n!SmartRefStream methodsFor: 'import image segment' stamp: 'RAA 12/20/2000 11:06'!\\\\nconvert1: misShapenInst to: goodClass allVarMaps: allVarMaps\\\\n\\\\t\\\\\\\"Go through the normal instance conversion process and return a modern object.\\\\\\\"\\\\n\\\\n\\\\t| className oldInstVars anObject varMap |\\\\n\\\\n\\\\tself flag: #bobconv.\\\\t\\\\n\\\\n\\\\tgoodClass isVariable ifTrue: [\\\\n\\\\t\\\\tgoodClass error: 'shape change for variable class not implemented yet'\\\\n\\\\t].\\\\n\\\\t(misShapenInst class name beginsWith: 'Fake37') ifFalse: [self error: 'why mapping?'].\\\\n\\\\tclassName _ (misShapenInst class name allButFirst: 6) asSymbol.\\\\n\\\\toldInstVars _ structures at: className.\\\\n\\\\tanObject _ goodClass basicNew.\\\\n\\\\n\\\\tvarMap _ Dictionary new.\\\\t\\\\\\\"later, indexed vars as (1 -> val) etc.\\\\\\\"\\\\n\\\\t2 to: oldInstVars size do: [:ind |\\\\n\\\\t\\\\tvarMap at: (oldInstVars at: ind) put: (misShapenInst instVarAt: ind-1)].\\\\n\\\\tvarMap at: #ClassName put: className.\\\\t\\\\\\\"original\\\\\\\"\\\\n\\\\tvarMap at: #NewClassName put: goodClass name.\\\\t\\\\\\\"new\\\\\\\"\\\\n\\\\tself storeInstVarsIn: anObject from: varMap. \\\\t\\\\\\\"ones with the same names\\\\\\\"\\\\n\\\\tallVarMaps at: misShapenInst put: varMap.\\\\n\\\\t^ anObject\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'import image segment' stamp: 'RAA 12/20/2000 17:15'!\\\\nconvert2: partiallyCorrectInst allVarMaps: allVarMaps\\\\n\\\\t\\\\\\\"Go through the normal instance conversion process and return a modern object.\\\\\\\"\\\\n\\\\n\\\\t| className varMap |\\\\n\\\\n\\\\tself flag: #bobconv.\\\\t\\\\n\\\\n\\\\tvarMap _ allVarMaps at: partiallyCorrectInst.\\\\n\\\\tclassName _ varMap at: #ClassName.\\\\t\\\\\\\"original\\\\\\\"\\\\n\\\\t^self applyConversionMethodsTo: partiallyCorrectInst className: className varMap: varMap.\\\\n\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'import image segment' stamp: 'ar 4/12/2005 18:06'!\\\\nmapClass: newClass origName: originalName\\\\n\\\\t\\\\\\\"See if instances changed shape.  If so, make a fake class for the old shape and return it.  Remember the original class name.\\\\\\\"\\\\n\\\\n\\\\t| newName oldInstVars fakeClass |\\\\n\\\\tnewClass isMeta ifTrue: [^ newClass].\\\\n\\\\tnewName _ newClass name.\\\\n\\\\t(steady includes: newClass) & (newName == originalName) ifTrue: [^ newClass].\\\\n\\\\t\\\\t\\\\\\\"instances in the segment have the right shape\\\\\\\"\\\\n\\\\toldInstVars _ structures at: originalName ifAbsent: [\\\\n\\\\t\\\\t\\\\tself error: 'class is not in structures list'].\\\\t\\\\\\\"Missing in object file\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Allow mapping from old to new string names\\\\\\\"\\\\n\\\\t(newName == #ByteString and:[originalName == #String]) ifTrue:[^newClass].\\\\n\\\\t(newName == #WideString and:[originalName == #MultiString]) ifTrue:[^newClass].\\\\n\\\\t(newName == #WideSymbol and:[originalName == #MultiSymbol]) ifTrue:[^newClass].\\\\n\\\\n\\\\tfakeClass _ Object subclass: ('Fake37', originalName) asSymbol\\\\n\\\\t\\\\tinstanceVariableNames: oldInstVars allButFirst\\\\n\\\\t\\\\tclassVariableNames: ''\\\\n\\\\t\\\\tpoolDictionaries: ''\\\\n\\\\t\\\\tcategory: 'Obsolete'.\\\\n\\\\tChangeSet current removeClassChanges: fakeClass name.\\\\t\\\\\\\"reduce clutter\\\\\\\"\\\\n\\\\t^ fakeClass\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'import image segment' stamp: 'RAA 12/20/2000 11:09'!\\\\nreshapedClassesIn: outPointers\\\\n\\\\t\\\\\\\"Look for classes in the outPointer array that have changed shape.  Make a fake class for the old shape.  Return a dictionary mapping Fake classes to Real classes.  Substitute fake classes for real ones in outPointers.\\\\\\\"\\\\n\\\\n\\\\t| mapFakeClassesToReal fakeCls originalName |\\\\n\\\\n\\\\tself flag: #bobconv.\\\\t\\\\n\\\\n\\\\n\\\\tmapFakeClassesToReal _ IdentityDictionary new.\\\\n\\\\toutPointers withIndexDo: [:outp :ind | \\\\n\\\\t\\\\toutp isBehavior ifTrue: [\\\\n\\\\t\\\\t\\\\toriginalName _ renamedConv at: ind ifAbsent: [outp name].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"in DiskProxy>>comeFullyUpOnReload: we saved the name at the index\\\\\\\"\\\\n\\\\t\\\\t\\\\tfakeCls _ self mapClass: outp origName: originalName.\\\\n\\\\t\\\\t\\\\tfakeCls == outp ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tmapFakeClassesToReal at: fakeCls put: outp.\\\\n\\\\t\\\\t\\\\t\\\\toutPointers at: ind put: fakeCls]]].\\\\n\\\\t^ mapFakeClassesToReal! !\\\\n\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 3/15/98 20:28'!\\\\nappendClassDefns\\\\n\\\\t\\\\\\\"Make this a fileOut format file.  For each UniClass mentioned, prepend its source code to the file.  Class name conflicts during reading will be resolved then.  Assume instVarInfo: has already been done.\\\\\\\"\\\\n\\\\nbyteStream ascii.\\\\nbyteStream position = 0 ifTrue: [\\\\n\\\\tbyteStream setFileTypeToObject.\\\\n\\\\t\\\\t\\\\\\\"Type and Creator not to be text, so can attach correctly to an email msg\\\\\\\"\\\\n\\\\tbyteStream header; timeStamp].\\\\n\\\\nbyteStream cr; nextPutAll: '!!ObjectScanner new initialize!!'; cr; cr.\\\\nself uniClasesDo: [:class | class\\\\n\\\\t\\\\tclass sharedPools size > 0 ifTrue:  \\\\\\\"This never happens\\\\\\\"\\\\n\\\\t\\\\t\\\\t[class shouldFileOutPools\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [class fileOutSharedPoolsOn: self]].\\\\n\\\\t\\\\tclass fileOutOn: byteStream moveSource: false toFile: 0].\\\\t\\\\n\\\\t\\\\t\\\\\\\"UniClasses are filed out normally, no special format.\\\\\\\"\\\\n\\\\n\\\\tbyteStream trailer.\\\\t\\\\\\\"Does nothing for normal files.  \\\\n\\\\t\\\\tHTML streams will have trouble with object data\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Append the object's raw data\\\\\\\"\\\\n\\\\tbyteStream cr; cr; nextPutAll: '!!self smartRefStream!!'.\\\\n\\\\tbyteStream binary.\\\\t\\\\t\\\\\\\"get ready for objects\\\\\\\"\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 6/19/2000 21:22'!\\\\ncheckCrLf\\\\n\\\\t| save isCrLf cc prev loneLf |\\\\n\\\\t\\\\\\\"Watch for a file that has had all of its Cr's converted to CrLf's.  Some unpacking programs like Stuffit 5.0 do this by default!!\\\\\\\"\\\\n\\\\n\\\\tsave _ byteStream position.\\\\n\\\\tisCrLf _ false.  loneLf _ false.\\\\n\\\\tcc _ 0.\\\\n\\\\t350 timesRepeat: [\\\\n\\\\t\\\\tprev _ cc.\\\\n\\\\t\\\\t(cc _ byteStream next) = 16r0A \\\\\\\"Lf\\\\\\\" ifTrue: [\\\\n\\\\t\\\\t\\\\tprev = 16r0D \\\\\\\"Cr\\\\\\\" ifTrue: [isCrLf _ true] ifFalse: [loneLf _ true]].\\\\n\\\\t\\\\t].\\\\n\\\\tisCrLf & (loneLf not) ifTrue: [\\\\n\\\\t\\\\tself inform: 'Carriage Returns in this file were converted to CrLfs \\\\nby an evil unpacking utility.  Please set the preferences in \\\\nStuffIt Expander to \\\\\\\"do not convert file formats\\\\\\\"'].\\\\n\\\\tbyteStream position: save.\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'mir 9/12/2002 10:59'!\\\\ninitKnownRenames\\\\n\\\\trenamed\\\\n\\\\t\\\\tat: #FlasherMorph put: #Flasher;\\\\n\\\\t\\\\tyourself! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'ar 4/10/2005 19:27'!\\\\ninitShapeDicts\\\\n\\\\t\\\\\\\"Initialize me. \\\\\\\"\\\\n\\\\n\\\\tself flag: #bobconv.\\\\t\\\\n\\\\n\\\\t\\\\\\\"These must stay constant.  When structures read in, then things can change.\\\\\\\"\\\\n\\\\tsteady _ {Array. Dictionary. Association. ByteString. SmallInteger} asSet.\\\\n\\\\n\\\\trenamed ifNil: [\\\\n\\\\t\\\\trenamed _ Dictionary new.  \\\\\\\"(old class name symbol -> new class name)\\\\\\\"\\\\n\\\\t\\\\trenamedConv _ Dictionary new \\\\\\\"(oldClassNameSymbol -> conversionSelectorInNewClass)\\\\\\\"\\\\n\\\\t].\\\\n\\\\tself initKnownRenames! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 3/7/2001 18:17'!\\\\ninstVarInfo: anObject\\\\n\\\\t\\\\\\\"Return the object to write on the outgoing file that contains the structure of each class we are about to write out.  Must be an Array whose first element is 'class structure'.  Its second element is a Dictionary of pairs of the form #Rectangle -> #(<classVersion> 'origin' 'corner').  \\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Make a pass through the objects, not writing, but recording the classes.  Construct a database of their inst vars and any version info (classVersion).\\\\\\\"\\\\n\\\\n\\\\t| dummy refs cls newSupers |\\\\n\\\\tstructures _ Dictionary new.\\\\n\\\\tsuperclasses _ Dictionary new.\\\\n\\\\tdummy _ ReferenceStream on: (DummyStream on: nil).\\\\n\\\\t\\\\t\\\\\\\"Write to a fake Stream, not a file\\\\\\\"\\\\n\\\\t\\\\\\\"Collect all objects\\\\\\\"\\\\n\\\\tdummy rootObject: anObject.\\\\t\\\\\\\"inform him about the root\\\\\\\"\\\\n\\\\tdummy nextPut: anObject.\\\\n\\\\trefs _ dummy references.\\\\n\\\\tobjCount _ refs size.\\\\t\\\\t\\\\\\\"for progress bar\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"Note that Dictionary must not change its implementation!!  If it does, how do we read this reading information?\\\\\\\"\\\\n\\\\t(refs includesKey: #AnImageSegment) \\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\tself uniClassInstVarsRefs: dummy.\\\\t\\\\\\\"catalog the extra objects in UniClass inst vars\\\\\\\"\\\\n\\\\t\\\\t\\\\trefs keysDo: [:each | \\\\n\\\\t\\\\t\\\\t\\\\tcls _ each class.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"cls isObsolete ifTrue: [self error: 'Trying to write ', cls name].\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t(cls class ~~ Metaclass) & (cls isObsolete not) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstructures at: cls name put: false]]]\\\\n\\\\t\\\\tifTrue: [self recordImageSegment: refs].\\\\n\\\\t\\\\\\\"Save work by only computing inst vars once for each class\\\\\\\"\\\\n\\\\tnewSupers _ Set new.\\\\n\\\\tstructures at: #Point put: false.\\\\t\\\\\\\"writeRectangle: does not put out class pointer\\\\\\\"\\\\n\\\\tstructures at: #Rectangle put: false.\\\\n\\\\tstructures at: #LargePositiveInteger put: false.\\\\t\\\\\\\"used in slow case of WordArray\\\\\\\"\\\\n\\\\tstructures keysDo: [:nm | \\\\n\\\\t\\\\tcls _ (nm endsWith: ' class') \\\\n\\\\t\\\\t\\\\tifFalse: [Smalltalk at: nm]\\\\n\\\\t\\\\t\\\\tifTrue: [(Smalltalk at: nm substrings first asSymbol) class].\\\\n\\\\t\\\\tcls allSuperclasses do: [:aSuper |\\\\n\\\\t\\\\t\\\\tstructures at: aSuper name ifAbsent: [newSupers add: aSuper name]]].\\\\n\\\\t\\\\t\\\\t\\\\\\\"Don't modify structures during iteration\\\\\\\"\\\\n\\\\tnewSupers do: [:nm | structures at: nm put: 3].\\\\t\\\\\\\"Get all superclasses into list\\\\\\\"\\\\n\\\\tstructures keysDo: [:nm | \\\\\\\"Nothing added to classes during loop\\\\\\\"\\\\n\\\\t\\\\tcls _ (nm endsWith: ' class') \\\\n\\\\t\\\\t\\\\tifFalse: [Smalltalk at: nm]\\\\n\\\\t\\\\t\\\\tifTrue: [(Smalltalk at: nm substrings first asSymbol) class].\\\\n\\\\t\\\\tstructures at: nm put: \\\\n\\\\t\\\\t\\\\t((Array with: cls classVersion), (cls allInstVarNames)).\\\\n\\\\t\\\\tsuperclasses at: nm ifAbsent: [\\\\n\\\\t\\\\t\\\\t\\\\tsuperclasses at: nm put: cls superclass name]].\\\\n\\\\t(refs includesKey: #AnImageSegment) \\\\n\\\\t\\\\tifTrue: [classInstVars _ #()]\\\\n\\\\t\\\\tifFalse: [self saveClassInstVars].\\\\t\\\\\\\"of UniClassses\\\\\\\"\\\\n\\\\t^ (Array with: 'class structure' with: structures with: 'superclasses' with: superclasses)! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'ar 4/10/2005 18:52'!\\\\nmapClass: incoming\\\\n\\\\t\\\\\\\"See if the old class named nm exists.  If so, return it.  If not, map it to a new class, and save the mapping in renamed.  \\\\\\\"\\\\n\\\\n\\\\t| cls oldVer sel nm |\\\\n\\\\n\\\\tself flag: #bobconv.\\\\t\\\\n\\\\n\\\\n\\\\tnm _ renamed at: incoming ifAbsent: [incoming].\\\\t\\\\\\\"allow pre-mapping around collisions\\\\\\\"\\\\n\\\\t(nm endsWith: ' class') \\\\n\\\\t\\\\tifFalse: [cls _ Smalltalk at: nm ifAbsent: [nil].\\\\n\\\\t\\\\t\\\\tcls ifNotNil: [^ cls]]  \\\\t\\\\\\\"Known class.  It will know how to translate the instance.\\\\\\\"\\\\n\\\\t\\\\tifTrue: [cls _ Smalltalk at: nm substrings first asSymbol ifAbsent: [nil].\\\\n\\\\t\\\\t\\\\tcls ifNotNil: [^ cls class]]. \\\\t\\\\\\\"Known class.  It will know how to translate the instance.\\\\\\\"\\\\n\\\\toldVer _ self versionSymbol: (structures at: nm).\\\\n\\\\tsel _ nm asString.\\\\n\\\\tsel at: 1 put: (sel at: 1) asLowercase.\\\\n\\\\tsel _ sel, oldVer.\\\\t\\\\\\\"i.e. #rectangleoc4\\\\\\\"\\\\n\\\\tSymbol hasInterned: sel ifTrue: [:symb | \\\\n\\\\t\\\\t(self class canUnderstand: sel asSymbol) ifTrue: [\\\\n\\\\t\\\\t\\\\treshaped ifNil: [reshaped _ Dictionary new].\\\\n\\\\t\\\\t\\\\tcls _ self perform: sel asSymbol]].\\\\t\\\\\\\"This class will take responsibility\\\\\\\"\\\\n\\\\tcls ifNil: [cls _ self writeClassRenameMethod: sel was: nm\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tfromInstVars: (structures at: nm).\\\\n\\\\t\\\\t\\\\t   cls isString ifTrue: [cls _ nil]].\\\\n\\\\tcls ifNotNil: [renamed at: nm put: cls name].\\\\n\\\\t^ cls\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 5/26/1998 15:09'!\\\\nmoreObjects\\\\n\\\\t\\\\\\\"Return true if there appears to be another object following this one on the file.\\\\\\\"\\\\n\\\\n\\\\t| byte |\\\\n\\\\tbyteStream atEnd ifTrue: [^ false].\\\\t\\\\\\\"off end of file\\\\\\\"\\\\n\\\\t(byte _ byteStream peek) ifNil: [^ false].\\\\t\\\\\\\"off end of file\\\\\\\"\\\\n\\\\tbyte = 33 \\\\\\\"$!! asciiValue\\\\\\\" ifTrue: [^ false].\\\\n\\\\tbyte = 0 ifTrue: [^ false].\\\\n\\\\t^ byte <= RefTypes size\\\\t\\\\t\\\\\\\"between 1 and 16\\\\\\\"! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 6/19/2000 17:06'!\\\\nnext\\\\n\\\\t\\\\\\\"Really write three objects: (version, class structure, object). But only when called from the outside.  \\\\\\\"\\\\n\\\\n\\\\t| version ss object |\\\\n\\\\t^ topCall == nil \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[topCall _ #marked.\\\\n\\\\t\\\\t\\\\tversion _ super next.\\\\n\\\\t\\\\t\\\\tversion class == SmallInteger ifFalse: [^ version].\\\\t\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"version number, else just a regular object, not in our format, \\\\\\\"\\\\n\\\\t\\\\t\\\\tself checkCrLf.\\\\n\\\\t\\\\t\\\\tss _ super next.\\\\n\\\\t\\\\t\\\\tss class == Array ifFalse: [^ ss].  \\\\\\\"just a regular object\\\\\\\"\\\\n\\\\t\\\\t\\\\t(ss at: 1) = 'class structure' ifFalse: [^ ss].\\\\n\\\\t\\\\t\\\\tstructures _ ss at: 2.\\\\n\\\\t\\\\t\\\\tsuperclasses _ (ss size > 3 and: [(ss at: 3) = 'superclasses']) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [ss at: 4]\\\\t\\\\t\\\\\\\"class name -> superclass name\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [Dictionary new].\\\\n\\\\t\\\\t\\\\t(self verifyStructure = 'conversion method needed') ifTrue: [^ nil].\\\\n\\\\t\\\\t\\\\tobject _ super next.\\\\t\\\\\\\"all the action here\\\\\\\"\\\\n\\\\t\\\\t\\\\tself restoreClassInstVars.\\\\t\\\\t\\\\\\\"for UniClasses. version 4\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\ttopCall _ nil.\\\\t\\\\\\\"reset it\\\\\\\"\\\\n\\\\t\\\\t\\\\tobject]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[super next]\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 3/5/2002 09:52'!\\\\nnextAndClose\\\\n\\\\t\\\\\\\"Speedy way to grab one object.  Only use when we are inside an object binary file.  If used for the start of a SmartRefStream mixed code-and-object file, tell the user and then do the right thing.\\\\\\\"\\\\n\\\\n\\\\t| obj |\\\\n\\\\tbyteStream peek = ReferenceStream versionCode \\\\\\\"4\\\\\\\" ifFalse: [\\\\n\\\\t\\\\t\\\\\\\"OK it is a fileIn afterall...\\\\\\\"\\\\n\\\\t\\\\tself inform: 'Should be using fileInObjectAndCode'.\\\\n\\\\t\\\\tbyteStream ascii.\\\\n\\\\t\\\\tbyteStream fileIn.\\\\n\\\\t\\\\tobj _ SmartRefStream scannedObject.\\\\n\\\\t\\\\tSmartRefStream scannedObject: nil.\\\\n\\\\t\\\\t^ obj].\\\\n\\\\n\\\\tobj _ self next.\\\\n\\\\tself close.\\\\n\\\\t^ obj! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'md 2/24/2006 19:52'!\\\\nnextPut: anObject\\\\n\\\\t\\\\\\\"Really write three objects: (version, class structure, object).  But only when called from the outside.  If any instance-specific classes are present, prepend their source code.  byteStream will be in fileOut format.\\\\n\\\\tYou can see an analysis of which objects are written out by doing: \\\\n\\\\t(SmartRefStream statsOfSubObjects: anObject)\\\\n\\\\t(SmartRefStream tallyOfSubObjects: anObject)\\\\n\\\\t(SmartRefStream subObjects: anObject ofClass: aClass)\\\\\\\"\\\\n\\\\n| info |\\\\ntopCall == nil \\\\n\\\\tifTrue:\\\\n\\\\t\\\\t[topCall _ anObject.\\\\n\\\\t\\\\t'Please wait while objects are counted' \\\\n\\\\t\\\\t\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\t\\\\tfrom: 0 to: 10\\\\n\\\\t\\\\t\\\\tduring: [:bar | info _ self instVarInfo: anObject].\\\\n\\\\t\\\\tself appendClassDefns.\\\\t\\\\\\\"For instance-specific classes\\\\\\\"\\\\n\\\\t\\\\t'Writing an object file' displayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\t\\\\tfrom: 0 to: objCount*4\\\\t\\\\\\\"estimate\\\\\\\"\\\\n\\\\t\\\\t\\\\tduring: [:bar |\\\\n\\\\t\\\\t\\\\t\\\\tobjCount _ 0.\\\\n\\\\t\\\\t\\\\t\\\\tprogressBar _ bar.\\\\n\\\\t\\\\t\\\\t\\\\tself setStream: byteStream reading: false.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"set basePos, but keep any class renames\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tsuper nextPut: ReferenceStream versionCode.\\\\n\\\\t\\\\t\\\\t\\\\tsuper nextPut: info.\\\\n\\\\t\\\\t\\\\t\\\\tsuper nextPut: anObject.\\\\t\\\\t\\\\\\\"<- the real writing\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tclassInstVars size > 0 ifTrue: [super nextPut: classInstVars]].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Note: the terminator, $!!, is not doubled inside object data\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"references is an IDict of every object that got written\\\\\\\"\\\\n\\\\t\\\\tbyteStream ascii.\\\\n\\\\t\\\\tbyteStream nextPutAll: '!!'; cr; cr.\\\\n\\\\t\\\\tbyteStream padToEndWith: $ .\\\\t\\\\\\\"really want to truncate file, but can't\\\\\\\"\\\\n\\\\t\\\\ttopCall _ progressBar _ nil]\\\\t\\\\\\\"reset it\\\\\\\"\\\\n\\\\tifFalse:\\\\n\\\\t\\\\t[super nextPut: anObject.\\\\n\\\\t\\\\tprogressBar ifNotNil: [progressBar value: (objCount _ objCount + 1)]].\\\\n\\\\t\\\\t\\\\\\\"return the argument - added by kwl\\\\\\\"\\\\n\\\\t^ anObject\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 6/23/1998 11:00'!\\\\nnextPutObjOnly: anObject\\\\n\\\\t\\\\\\\"Really write three objects: (version, class structure, object).  But only when called from the outside.  Not in fileOut format.  No class definitions will be written for instance-specific classes.  Error if find one.  (Use nextPut: instead)\\\\\\\"\\\\n\\\\n\\\\t| info |\\\\n\\\\ttopCall == nil \\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[topCall _ anObject.\\\\n\\\\t\\\\t\\\\tsuper nextPut: ReferenceStream versionCode.\\\\n\\\\t\\\\t\\\\t'Please wait while objects are counted' displayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\t\\\\t\\\\tfrom: 0 to: 10\\\\n\\\\t\\\\t\\\\t\\\\tduring: [:bar |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tinfo _ self instVarInfo: anObject].\\\\n\\\\t\\\\t\\\\tself uniClasesDo: [:cls | cls error: 'Class defn not written out.  Proceed?'].\\\\n\\\\t\\\\t\\\\t'Writing an object file' displayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\t\\\\t\\\\tfrom: 0 to: objCount*4\\\\t\\\\\\\"estimate\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tduring: [:bar |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tobjCount _ 0.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tprogressBar _ bar.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsuper nextPut: info.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsuper nextPut: anObject.\\\\t\\\\\\\"<- the real writing\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Class inst vars not written here!!\\\\\\\"].\\\\n\\\\t\\\\t\\\\t\\\\\\\"references is an IDict of every object that got written\\\\n\\\\t\\\\t\\\\t(in case you want to take statistics)\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\\\\"Transcript cr; show: structures keys printString.\\\\\\\"\\\\t\\\\t\\\\\\\"debug\\\\\\\"\\\\n\\\\t\\\\t\\\\ttopCall _ progressBar _ nil]\\\\t\\\\\\\"reset it\\\\\\\"\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[super nextPut: anObject.\\\\n\\\\t\\\\t\\\\tprogressBar ifNotNil: [progressBar value: (objCount _ objCount + 1)]].! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 6/23/1998 11:13'!\\\\nnoHeader\\\\n\\\\t\\\\\\\"Signal that we've already dealt with the version and structure array, and are now reading objects.\\\\\\\"\\\\n\\\\n\\\\ttopCall _ #marked.\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 11/3/2000 17:59'!\\\\nreadInstance\\\\n\\\\t\\\\\\\"Read the contents of an arbitrary instance.\\\\n\\\\t ASSUMES: readDataFrom:size: sends me beginReference: after it\\\\n\\\\t   instantiates the new object but before reading nested objects.\\\\n\\\\t NOTE: We must restore the current reference position after\\\\n\\\\t   recursive calls to next.\\\\nThree cases for files from older versions of the system:\\\\n1) Class has not changed shape, read it straight.\\\\n2) Class has changed instance variables (or needs fixup).  Call a particular method to do it.\\\\n3) There is a new class instead.  Find it, call a particular method to read.\\\\n\\\\tAll classes used to construct the structures dictionary *itself* need to be in 'steady' and they must not change!!  See setStream:\\\\\\\"\\\\n\\\\t| instSize className refPosn |\\\\n\\\\n\\\\tinstSize _ (byteStream nextNumber: 4) - 1.\\\\n\\\\trefPosn _ self getCurrentReference.\\\\n\\\\tclassName _ self next asSymbol.\\\\n\\\\t^ self readInstanceSize: instSize clsname: className refPosn: refPosn\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'yo 1/21/2006 19:27'!\\\\nreadInstanceSize: instSize clsname: className refPosn: refPosn\\\\n\\\\t\\\\\\\"The common code to read the contents of an arbitrary instance.\\\\n\\\\t ASSUMES: readDataFrom:size: sends me beginReference: after it\\\\n\\\\t   instantiates the new object but before reading nested objects.\\\\n\\\\t NOTE: We must restore the current reference position after\\\\n\\\\t   recursive calls to next.\\\\nThree cases for files from older versions of the system:\\\\n1) Class has not changed shape, read it straight.\\\\n2) Class has changed instance variables (or needs fixup).  Call a particular method to do it.\\\\n3) There is a new class instead.  Find it, call a particular method to read.\\\\n\\\\tAll classes used to construct the structures dictionary *itself* need to be in 'steady' and they must not change!!  See setStream:\\\\\\\"\\\\n\\\\t| anObject newName newClass dict oldInstVars isMultiSymbol |\\\\n\\\\n\\\\tself flag: #bobconv.\\\\t\\\\n\\\\n\\\\tself setCurrentReference: refPosn.  \\\\\\\"remember pos before readDataFrom:size:\\\\\\\"\\\\n\\\\tnewName _ renamed at: className ifAbsent: [className].\\\\n\\\\tisMultiSymbol _ newName = #MultiSymbol or: [newName = #WideSymbol].\\\\n\\\\t\\\\\\\"isMultiSymbol ifTrue: [self halt].\\\\\\\"\\\\n\\\\tnewClass _ Smalltalk at: newName asSymbol.\\\\n\\\\t(steady includes: newClass) & (newName == className) ifTrue: [\\\\n\\\\t \\\\tanObject _ newClass isVariable \\\\\\\"Create it here\\\\\\\"\\\\n\\\\t\\\\t\\\\tifFalse: [newClass basicNew]\\\\n\\\\t\\\\t\\\\tifTrue: [newClass basicNew: instSize - (newClass instSize)].\\\\n\\\\n\\\\t\\\\tanObject _ anObject readDataFrom: self size: instSize.\\\\n\\\\t\\\\tself setCurrentReference: refPosn.  \\\\\\\"before returning to next\\\\\\\"\\\\n\\\\t\\\\tisMultiSymbol ifTrue: [^ Symbol intern: anObject asString].\\\\n\\\\t\\\\t^ anObject].\\\\n\\\\toldInstVars _ structures at: className ifAbsent: [\\\\n\\\\t\\\\t\\\\tself error: 'class is not in structures list'].\\\\t\\\\\\\"Missing in object file\\\\\\\"\\\\n\\\\tanObject _ newClass createFrom: self size: instSize version: oldInstVars.\\\\n\\\\t\\\\t\\\\\\\"only create the instance\\\\\\\"\\\\n\\\\tself beginReference: anObject.\\\\n\\\\tdict _ self catalogValues: oldInstVars size: instSize.\\\\n\\\\t\\\\t\\\\\\\"indexed vars as (1 -> val) etc.\\\\\\\"\\\\n\\\\tdict at: #ClassName put: className.\\\\t\\\\\\\"so conversion method can know it\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Give each superclass a chance to make its changes\\\\\\\"\\\\n\\\\tself storeInstVarsIn: anObject from: dict.\\\\t\\\\\\\"ones with the same names\\\\\\\"\\\\n\\\\n\\\\tanObject _ self applyConversionMethodsTo: anObject className: className varMap: dict.\\\\n\\\\n\\\\tself setCurrentReference: refPosn.  \\\\\\\"before returning to next\\\\\\\"\\\\n\\\\tisMultiSymbol ifTrue: [^ Symbol intern: anObject asString].\\\\n\\\\t^ anObject! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 11/3/2000 18:04'!\\\\nreadShortInst\\\\n\\\\t\\\\\\\"Instance has just one byte of size.  Class symbol is encoded in two bytes of file position.  See readInstance.\\\\\\\"\\\\n\\\\t| instSize className refPosn |\\\\n\\\\n\\\\tinstSize _ (byteStream next) - 1.\\\\t\\\\\\\"one byte of size\\\\\\\"\\\\n\\\\trefPosn _ self getCurrentReference.\\\\n\\\\tclassName _ self readShortRef.\\\\t\\\\\\\"class symbol in two bytes of file pos\\\\\\\"\\\\n\\\\t^ self readInstanceSize: instSize clsname: className refPosn: refPosn\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'ar 7/25/2005 21:30'!\\\\nreadWordLike\\\\n\\\\t| refPosn newClass anObject className |\\\\n\\\\t\\\\\\\"Can be used by any class that is bits and not bytes (WordArray, Bitmap, SoundBuffer, etc).\\\\\\\"\\\\n\\\\n\\\\trefPosn _ self getCurrentReference.\\\\n\\\\tclassName _ self next asSymbol.\\\\n\\\\tclassName _ renamed at: className ifAbsent: [className].\\\\n\\\\tnewClass _ Smalltalk at: className.\\\\n\\\\tanObject _ newClass newFromStream: byteStream.\\\\n\\\\t\\\\\\\"Size is number of long words.\\\\\\\"\\\\n\\\\tself setCurrentReference: refPosn.  \\\\\\\"before returning to next\\\\\\\"\\\\n\\\\t^ anObject\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 10/10/2000 13:36'!\\\\nrecordImageSegment: refs\\\\n\\\\t\\\\\\\"Besides the objects being written out, record the structure of instances inside the image segment we are writing out.\\\\\\\"\\\\n\\\\n\\\\t| cls list |\\\\n\\\\t\\\\\\\"Do not record Player class inst vars.  They are in the segement.\\\\\\\"\\\\n\\\\trefs keysDo: [:each | \\\\n\\\\t\\\\tcls _ each class.\\\\n\\\\t\\\\tcls isObsolete ifTrue: [self error: 'Trying to write ', cls name].\\\\n\\\\t\\\\tcls class == Metaclass \\\\n\\\\t\\\\t\\\\tifFalse: [structures at: cls name put: false.\\\\n\\\\t\\\\t\\\\t\\\\t(each isKindOf: ImageSegment) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\teach outPointers do: [:out |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(out isKindOf: Class) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstructures at: out theNonMetaClass name put: false].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tout class == DiskProxy ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tout simpleGlobalOrNil ifNotNil: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(out simpleGlobalOrNil isKindOf: Class) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstructures at: out simpleGlobalOrNil name put: false]]]].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"each arrayOfRoots do: [:rr | (rr isKindOf: Class) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstructures at: rr theNonMetaClass name put: false]].\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t \\\\t\\\\\\\"all classes in roots are local to seg\\\\\\\"]]].\\\\n\\\\tlist _ refs at: #BlockReceiverClasses ifAbsent: [^ self].\\\\n\\\\tlist do: [:meta | structures at: meta name put: false].\\\\n\\\\t\\\\t\\\\\\\"Just the metaclasses whose instances are block receivers.  Otherwise metaclasses are not allowed.\\\\\\\"! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'RAA 12/20/2000 11:08'!\\\\nrenamed\\\\n\\\\n\\\\tself flag: #bobconv.\\\\t\\\\n\\\\n\\\\n\\\\t^ renamed! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'RAA 12/20/2000 11:10'!\\\\nrenamedConv\\\\n\\\\tself flag: #bobconv.\\\\t\\\\n\\\\n\\\\n\\\\t^ renamedConv! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'RAA 12/22/2000 15:14'!\\\\nrestoreClassInstVars\\\\n\\\\t\\\\\\\"Install the values of the class instance variables of UniClasses\\\\n(i.e. scripts slotInfo).  classInstVars is ((#Player25 scripts slotInfo)\\\\n...).  Thank you Mark Wai for the bug fix.\\\\\\\"\\\\n\\\\n\\\\t| normal aName newName newCls trans rList start |\\\\n\\\\n\\\\tself flag: #bobconv.\\\\t\\\\n\\\\n\\\\n\\\\tself moreObjects ifFalse: [^ self]. \\\\t\\\\\\\"are no UniClasses with class inst vars\\\\\\\"\\\\n\\\\tclassInstVars _ super next.\\\\t\\\\\\\"Array of arrays\\\\\\\"\\\\n\\\\tnormal _ Object class instSize.\\\\t\\\\\\\"might give trouble if Player class superclass changes size\\\\\\\"\\\\n\\\\t(structures at: #Player ifAbsent: [#()]) = #(0 'dependents' 'costume') ifTrue:\\\\n\\\\t\\\\t[trans _ 1].\\\\t\\\\\\\"now (0 costume costumes).  Do the conversion of Player class\\\\n\\\\t\\\\t\\\\tinst vars in Update 509.\\\\\\\"\\\\n\\\\tclassInstVars do: [:list |\\\\n\\\\t\\\\taName _ (list at: 1) asSymbol.\\\\n\\\\t\\\\trList _ list.\\\\n\\\\t\\\\tnewName _ renamed at: aName ifAbsent: [aName].\\\\n\\\\t\\\\tnewCls _ Smalltalk at: newName\\\\n\\\\t\\\\t\\\\t\\\\tifAbsent: [self error: 'UniClass definition missing'].\\\\n\\\\t\\\\t(\\\\\\\"old conversion\\\\\\\" trans == 1 and: [newCls inheritsFrom: Player]) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\\\\"remove costumeDictionary from Player class inst vars\\\\\\\"\\\\n\\\\t\\\\t\\\\trList _ rList asOrderedCollection.\\\\n\\\\t\\\\t\\\\trList removeAt: 4].\\\\t\\\\\\\"costumeDictionary's value\\\\\\\"\\\\n\\\\t\\\\tstart _ list second = 'Update to read classPool' ifTrue: [4] ifFalse: [2].\\\\n\\\\t\\\\tnewCls class instSize = (normal + (rList size) - start + 1) ifFalse:\\\\n\\\\t\\\\t\\\\t[self error: 'UniClass superclass class has changed size'].\\\\n\\\\t\\\\t\\\\t\\\\\\\"Need to install a conversion method mechanism\\\\\\\"\\\\n\\\\t\\\\tstart = 4 ifTrue: [newCls instVarAt: normal - 1 \\\\\\\"classPool\\\\\\\" put: (list at: 3)].\\\\n\\\\t\\\\tstart to: rList size do: [:ii |\\\\n\\\\t\\\\t\\\\tnewCls instVarAt: normal + ii - start + 1 put: (rList at: ii)]].\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 3/6/2000 18:17'!\\\\nsaveClassInstVars\\\\n\\\\t\\\\\\\"Install the values of the instance variables of UniClasses.\\\\nclassInstVars is an array of arrays (#Player3 (Player3 class's inst var\\\\nscripts) (Player3 class's inst var slotInfo) ...) \\\\\\\"\\\\n\\\\n\\\\t| normal mySize list clsPoolIndex |\\\\n\\\\tclassInstVars _ OrderedCollection new: 100.\\\\n\\\\tnormal _ Object class instSize.\\\\n\\\\tclsPoolIndex _ Object class allInstVarNames indexOf: 'classPool'.\\\\n\\\\tself uniClasesDo: [:aUniClass |\\\\n\\\\t\\\\tlist _ OrderedCollection new.\\\\n\\\\t\\\\tmySize _ aUniClass class instSize.\\\\n\\\\t\\\\tmySize = normal ifFalse:\\\\n\\\\t\\\\t\\\\t[list add: aUniClass name.\\\\t\\\\\\\"a symbol\\\\\\\"\\\\n\\\\t\\\\t\\\\tlist add: 'Update to read classPool'.\\\\t\\\\\\\"new\\\\nconvention for saving the classPool\\\\\\\"\\\\n\\\\t\\\\t\\\\tlist add: (aUniClass instVarAt: clsPoolIndex)\\\\n\\\\\\\"classPool\\\\\\\".\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"write actual value of nil\\\\ninstead of Dictionary()\\\\\\\"\\\\n\\\\t\\\\t\\\\tnormal + 1 to: mySize do: [:ii |\\\\n\\\\t\\\\t\\\\t\\\\tlist addLast: (aUniClass instVarAt: ii)].\\\\n\\\\t\\\\t\\\\tclassInstVars add: list asArray]].\\\\n\\\\tclassInstVars _ classInstVars asArray.\\\\n\\\\t! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 8/18/1998 09:02'!\\\\nscanFrom: aByteStream\\\\n\\\\t\\\\\\\"During a code fileIn, we need to read in an object, and stash it in ScannedObject.  \\\\\\\"\\\\n\\\\n\\\\tself setStream: aByteStream reading: true.\\\\n\\\\tScannedObject _ self next.\\\\n\\\\tbyteStream ascii.\\\\n\\\\tbyteStream next == $!! ifFalse: [\\\\n\\\\t\\\\tbyteStream close.\\\\n\\\\t\\\\tself error: 'Object did not end correctly']. \\\\n\\\\t\\\\\\\"caller will close the byteStream\\\\\\\"\\\\n\\\\t\\\\\\\"HandMorph.readMorphFile will retrieve the ScannedObject\\\\\\\"! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'RAA 12/20/2000 16:57'!\\\\nsetStream: aStream\\\\n\\\\t\\\\\\\"Initialize me. \\\\\\\"\\\\n\\\\n\\\\tself flag: #bobconv.\\\\t\\\\n\\\\n\\\\tsuper setStream: aStream.\\\\n\\\\tself initShapeDicts.\\\\n\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'RAA 12/20/2000 16:57'!\\\\nsetStream: aStream reading: isReading\\\\n\\\\t\\\\\\\"Initialize me. \\\\\\\"\\\\n\\\\n\\\\tself flag: #bobconv.\\\\t\\\\n\\\\n\\\\tsuper setStream: aStream reading: isReading.\\\\n\\\\tisReading ifFalse: [^ false].\\\\n\\\\tself initShapeDicts.\\\\n\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write'!\\\\nstructures\\\\n\\\\t^ structures! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 9/28/97 11:17'!\\\\nsuperclasses\\\\n\\\\t^superclasses! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 3/6/2000 17:15'!\\\\nuniClasesDo: aBlock\\\\n\\\\t\\\\\\\"Examine structures and execute the block with each instance-specific class\\\\\\\"\\\\n\\\\n\\\\t| cls |\\\\n\\\\tstructures keysDo: [:clsName | \\\\n\\\\t\\\\t(clsName endsWith: ' class') ifFalse: [\\\\n\\\\t\\\\t\\\\t(cls _ Smalltalk at: clsName) isSystemDefined ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\taBlock value: cls]]]! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 1/18/2001 15:54'!\\\\nuniClassInstVarsRefs: dummy\\\\n\\\\t\\\\\\\"If some of the objects seen so far are instances UniClasses, check the UniClasses for extra class inst vars, and send them to the steam also.  The new objects get added to (dummy references), where they will be noticed by the caller.  They will wind up in the structures array and will be written on the disk by class.\\\\n\\\\tReturn all classes seen.\\\\\\\" \\\\n| uniClasses normal more aUniClass mySize allClasses |\\\\n\\\\n\\\\\\\"Note: Any classes used in the structure of classInstVars must be written out also!!\\\\\\\"\\\\nuniClasses _ Set new.\\\\nallClasses _ IdentitySet new.\\\\nnormal _ Object class instSize.\\\\nmore _ true.\\\\n[more] whileTrue: [\\\\n\\\\tmore _ false.\\\\n\\\\tdummy references keysDo: [:each | \\\\\\\"any faster way to do this?\\\\\\\"\\\\n\\\\t\\\\t(aUniClass _ each class) isSystemDefined ifFalse: [\\\\n\\\\t\\\\t\\\\t(uniClasses includes: aUniClass name) ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tmySize _ aUniClass class instSize.\\\\n\\\\t\\\\t\\\\t\\\\tnormal+1 to: mySize do: [:ii | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmore _ true.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdummy nextPut: (aUniClass instVarAt: ii)].\\\\n\\\\t\\\\t\\\\t\\\\tuniClasses add: aUniClass name]].\\\\n\\\\t\\\\teach class class isMeta ifFalse: [\\\\\\\"it is a class\\\\\\\" allClasses add: each]]].\\\\n\\\\\\\"References dictionary is modified as the loop proceeds, but we will catch any we missed on the next cycle.\\\\\\\"\\\\n\\\\n^ allClasses! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'ar 4/10/2005 18:52'!\\\\nverifyStructure\\\\n\\\\t\\\\\\\"Compare the incoming inst var name lists with the existing classes.  Prepare tables that will help to restructure those who need it (renamed, reshaped, steady).    If all superclasses are recorded in the file, only compare inst vars of this class, not of superclasses.  They will get their turn.  \\\\\\\"\\\\n\\\\n\\\\n\\\\t| newClass newList oldList converting |\\\\n\\\\n\\\\tself flag: #bobconv.\\\\t\\\\n\\\\n\\\\tconverting _ OrderedCollection new.\\\\n\\\\tstructures keysDo: [:nm \\\\\\\"an old className (symbol)\\\\\\\" |\\\\n\\\\t\\\\t\\\\\\\"For missing classes, there needs to be a method in SmartRefStream like \\\\n\\\\t\\\\t\\\\t#rectangleoc2 that returns the new class.\\\\\\\"\\\\n\\\\t\\\\tnewClass _ self mapClass: nm.\\\\t   \\\\\\\"does (renamed at: nm put: newClass name)\\\\\\\"\\\\n\\\\t\\\\tnewClass isString ifTrue: [^ newClass].  \\\\\\\"error, fileIn needed\\\\\\\"\\\\n\\\\t\\\\tnewList _ (Array with: newClass classVersion), (newClass allInstVarNames).\\\\n\\\\t\\\\toldList _ structures at: nm.\\\\n\\\\t\\\\tnewList = oldList \\\\n\\\\t\\\\t\\\\tifTrue: [steady add: newClass]  \\\\\\\"read it in as written\\\\\\\"\\\\n\\\\t\\\\t\\\\tifFalse: [converting add: newClass name]\\\\n\\\\t].\\\\n\\\\tfalse & converting isEmpty not ifTrue: [\\\\\\\"debug\\\\\\\" \\\\n\\\\t\\\\t\\\\tself inform: 'These classes are being converted from existing methods:\\\\\\\\' withCRs,\\\\n\\\\t\\\\t\\\\t\\\\tconverting asArray printString].\\\\n! !\\\\n\\\\n!SmartRefStream methodsFor: 'read write' stamp: 'tk 1/7/97'!\\\\nversionSymbol: instVarList\\\\n\\\\t\\\\\\\"Create the symbolic code (like a version number) for this class in some older version.  First initials of all the inst vars, followed by the class version number.  Returns a string, caller makes it into a compound selector.  \\\\\\\"\\\\n\\\\n\\\\t| str |\\\\n\\\\tstr _ instVarList size = 1 ifFalse: [''] ifTrue: ['x'].\\\\t\\\\t\\\\\\\"at least one letter\\\\\\\"\\\\n\\\\t2 to: instVarList size do: [:ind |\\\\n\\\\t\\\\tstr _ str, (instVarList at: ind) first asString].\\\\n\\\\tstr _ str, instVarList first printString.\\\\t\\\\\\\"the number\\\\\\\"\\\\n\\\\t^ str\\\\n\\\\n\\\\\\\" | list | list _ (Array with: Paragraph classVersion), (Paragraph alistInstVarNames).\\\\n(SmartRefStream  on: (DummyStream on: nil)) versionSymbol: list\\\\n\\\\\\\"! !\\\\n\\\\n\\\\n!SmartRefStream methodsFor: '*starSqueak-*starSqueak' stamp: 'RAA 5/16/2001 18:35'!\\\\nstarLogoAntColonybosfcedppplppppttwssdlgrstta0\\\\n\\\\n\\\\t^ StarSqueakAntColony! !\\\\n\\\\n!SmartRefStream methodsFor: '*starSqueak-*starSqueak' stamp: 'RAA 5/16/2001 18:31'!\\\\nstarLogoMorphbosfcedppplppppttwssdlgrstt0\\\\n\\\\n\\\\t^ StarSqueakMorph! !\\\\n\\\\n!SmartRefStream methodsFor: '*starSqueak-*starSqueak' stamp: 'RAA 5/16/2001 18:32'!\\\\nstarLogoTreesbosfcedppplppppttwssdlgrsttdt0\\\\n\\\\n\\\\t^ StarSqueakTrees! !\\\\n\\\\n!SmartRefStream methodsFor: '*starSqueak-*starSqueak' stamp: 'RAA 5/16/2001 18:32'!\\\\nstarLogoTurtlewwxywwhcpn0\\\\n\\\\n\\\\t^ StarSqueakTurtle! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSmartRefStream class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SmartRefStream class methodsFor: 'accessing' stamp: 'tk 5/20/97'!\\\\nscannedObject\\\\n\\\\t\\\\\\\"The most recently read in object.  Watch out for read-in that is interrupted and resumed.  May want to make this a dictionary?  \\\\\\\"\\\\n\\\\n\\\\t^ ScannedObject! !\\\\n\\\\n!SmartRefStream class methodsFor: 'accessing' stamp: 'tk 5/20/97'!\\\\nscannedObject: objOrNil\\\\n\\\\t\\\\\\\"Used to free up the last object stashed here.  \\\\\\\"\\\\n\\\\n\\\\tScannedObject _ objOrNil! !\\\\n\\\\n!SmartRefStream class methodsFor: 'accessing' stamp: 'tk 3/11/98 09:45'!\\\\nsubObjects: anObject ofClass: aClass\\\\n\\\\t\\\\\\\"Return a collection of all instances of aClass that would be written out with anObject.  Does not actually write on the disk.  Inspect the result and ask for 'references to this object'.\\\\\\\"\\\\n\\\\n\\\\t| dummy coll |\\\\n\\\\tdummy _ ReferenceStream on: (DummyStream on: nil).\\\\n\\\\t\\\\t\\\\\\\"Write to a fake Stream, not a file\\\\\\\"\\\\n\\\\t\\\\\\\"Collect all objects\\\\\\\"\\\\n\\\\tdummy rootObject: anObject.\\\\t\\\\\\\"inform him about the root\\\\\\\"\\\\n\\\\tdummy nextPut: anObject.\\\\n\\\\tcoll _ OrderedCollection new.\\\\n\\\\tdummy references keysDo: [:each |\\\\n\\\\t\\\\teach class == aClass ifTrue: [coll add: each]].\\\\n\\\\t^ coll! !\\\\n\\\\n\\\\n!SmartRefStream class methodsFor: 'initialize-release' stamp: 'dvf 8/23/2003 12:18'!\\\\ncleanUpCategories\\\\n\\\\t| list valid removed newList newVers |\\\\n\\\\t\\\\\\\"Look for all conversion methods that can't be used any longer.  Delete them.\\\\\\\"\\\\n\\\\t\\\\\\\" SmartRefStream cleanUpCategories \\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Two part selectors that begin with convert and end with a digit.\\\\\\\"\\\\n\\\\t\\\\\\\"convertasossfe0: varDict asossfeu0: smartRefStrm\\\\\\\"\\\\n\\\\tlist _ Symbol selectorsContaining: 'convert'.\\\\n\\\\tlist _ list select: [:symb | (symb beginsWith: 'convert') & (symb allButLast last isDigit)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [(symb numArgs = 2)]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [false]].\\\\n\\\\tvalid _ 0.  removed _ 0.\\\\n\\\\tlist do: [:symb |\\\\n\\\\t\\\\t(self systemNavigation allClassesImplementing: symb) do: [:newClass |\\\\n\\\\t\\\\t\\\\tnewList _ (Array with: newClass classVersion), (newClass allInstVarNames).\\\\n\\\\t\\\\t\\\\tnewVers _ self new versionSymbol: newList.\\\\n\\\\t\\\\t\\\\t(symb endsWith: (':',newVers,':')) \\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"method is useless because can't convert to current shape\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnewClass removeSelector: symb.\\\\t\\\\\\\"get rid of it\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tremoved _ removed + 1]\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [valid _ valid + 1]]].\\\\n\\\\tTranscript cr; show: 'Removed: '; print: removed; \\\\n\\\\t\\\\tshow: '\\\\t\\\\tKept: '; print: valid; show: ' '.! !\\\\n\\\\n\\\\n!SmartRefStream class methodsFor: 'i/o' stamp: 'RAA 7/9/2000 05:48'!\\\\nobjectFromStreamedRepresentation: someBytes\\\\n\\\\n\\\\t| file |\\\\n\\\\n\\\\tfile _ RWBinaryOrTextStream with: someBytes.\\\\n\\\\tfile reset.\\\\n\\\\t^file fileInObjectAndCode! !\\\\n\\\\n!SmartRefStream class methodsFor: 'i/o' stamp: 'tk 12/9/97 21:31'!\\\\nread: aByteStream withClasses: structureArray\\\\n\\\\t\\\\\\\"Read an object off the stream, but first check structureArray against the current system.\\\\\\\"\\\\n\\\\n\\\\t| me |\\\\n\\\\tme _ self on: aByteStream.\\\\n\\\\tme noHeader.\\\\n\\\\tme structures: (structureArray at: 2).\\\\n\\\\tme superclasses: (structureArray at: 4).\\\\n\\\\t(me verifyStructure = 'conversion method needed') ifTrue: [^ nil].\\\\n\\\\t^ super next\\\\n! !\\\\n\\\\n!SmartRefStream class methodsFor: 'i/o' stamp: 'tk 5/20/97'!\\\\nscanFrom: aByteStream\\\\n\\\\t\\\\\\\"During a code fileIn, we need to read in an object, and stash it in ScannedObject.  \\\\\\\"\\\\n\\\\n\\\\t| me |\\\\n\\\\tme _ self on: aByteStream.\\\\n\\\\tScannedObject _ me next.\\\\n\\\\taByteStream ascii.\\\\n\\\\taByteStream next == $!! ifFalse: [\\\\n\\\\t\\\\taByteStream close.\\\\n\\\\t\\\\tself error: 'Object did not end correctly']. \\\\n\\\\t\\\\\\\"caller will close the byteStream\\\\\\\"\\\\n\\\\t\\\\\\\"HandMorph.readMorphFile will retrieve the ScannedObject\\\\\\\"! !\\\\n\\\\n\\\\n!SmartRefStream class methodsFor: 'utilities' stamp: 'tk 5/4/1998 17:34'!\\\\nstatsOfSubObjects: anObject\\\\n\\\\t\\\\\\\"Open a window with statistics on what objects would be written out with anObject.  Does not actually write on the disk.  Stats in the form:\\\\n\\\\tScriptEditorMorph 51\\\\n\\\\t\\\\tSortedCollection (21->LayoutMorph 15->SimpleButtonMorph 9->Array 4->CompoundTileMorph 2->StringMorph )\\\\\\\"\\\\n\\\\n\\\\t| dummy printOut |\\\\n\\\\tdummy _ ReferenceStream on: (DummyStream on: nil).\\\\n\\\\t\\\\t\\\\\\\"Write to a fake Stream, not a file\\\\\\\"\\\\n\\\\t\\\\\\\"Collect all objects\\\\\\\"\\\\n\\\\tdummy rootObject: anObject.\\\\t\\\\\\\"inform him about the root\\\\\\\"\\\\n\\\\tdummy nextPut: anObject.\\\\n\\\\t\\\\\\\"(dummy references) is the raw data\\\\\\\"\\\\n\\\\tprintOut _ dummy statisticsOfRefs.\\\\n\\\\t(StringHolder new contents: printOut) \\\\n\\\\t\\\\topenLabel: 'ReferenceStream statistics'.! !\\\\n\\\\n!SmartRefStream class methodsFor: 'utilities' stamp: 'RAA 7/9/2000 05:35'!\\\\nstreamedRepresentationOf: anObject\\\\n\\\\n\\\\t| file |\\\\n\\\\tfile _ (RWBinaryOrTextStream on: (ByteArray new: 5000)).\\\\n\\\\tfile binary.\\\\n\\\\t(self on: file) nextPut: anObject.\\\\n\\\\tfile close.\\\\n\\\\t^file contents! !\\\\n\\\\n!SmartRefStream class methodsFor: 'utilities' stamp: 'tk 5/4/1998 17:34'!\\\\ntallyOfSubObjects: anObject\\\\n\\\\t\\\\\\\"Open a window with statistics on what objects would be written out with anObject.  Does not actually write on the disk.  Stats are simply the number of instances of each class:\\\\n\\\\t1450->Point   835->Rectangle   549->Array   300->String\\\\\\\"\\\\n\\\\n\\\\t| dummy bag |\\\\n\\\\tdummy _ ReferenceStream on: (DummyStream on: nil).\\\\n\\\\t\\\\t\\\\\\\"Write to a fake Stream, not a file\\\\\\\"\\\\n\\\\t\\\\\\\"Collect all objects\\\\\\\"\\\\n\\\\tdummy rootObject: anObject.\\\\t\\\\\\\"inform him about the root\\\\\\\"\\\\n\\\\tdummy nextPut: anObject.\\\\n\\\\tbag _ Bag new.\\\\n\\\\tdummy references keysDo: [:key | bag add: key class name].\\\\n\\\\t\\\\\\\"(bag sortedCounts) is the SortedCollection\\\\\\\"\\\\n\\\\t(StringHolder new contents: bag sortedCounts printString) \\\\n\\\\t\\\\topenLabel: 'ReferenceStream statistics'.! !\\\\nObject subclass: #Socket\\\\n\\\\tinstanceVariableNames: 'semaphore socketHandle readSemaphore writeSemaphore primitiveOnlySupportsOneSemaphore'\\\\n\\\\tclassVariableNames: 'Connected DeadServer InvalidSocket OtherEndClosed Registry RegistryThreshold TCPSocketType ThisEndClosed UDPSocketType Unconnected WaitingForConnection'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Network-Kernel'!\\\\n!Socket commentStamp: 'gk 12/13/2005 00:43' prior: 0!\\\\nA Socket represents a network connection point. Current sockets are designed to support the TCP/IP and UDP protocols. Sockets are the lowest level of networking object in Squeak and are not normally used directly. SocketStream is a higher level object wrapping a Socket in a stream like protocol.\\\\n\\\\nProtocolClient and subclasses are in turn wrappers around a SocketStream to provide support for specific network protocols such as POP, NNTP, HTTP, and FTP.!\\\\n\\\\n\\\\n!Socket methodsFor: 'accessing' stamp: 'ar 4/30/1999 04:25'!\\\\naddress\\\\n\\\\t\\\\\\\"Shortcut\\\\\\\"\\\\n\\\\t^self localAddress! !\\\\n\\\\n!Socket methodsFor: 'accessing' stamp: 'MU 11/26/2003 16:53'!\\\\nlocalAddress\\\\n\\\\tself isWaitingForConnection\\\\n\\\\t\\\\tifFalse: [[self waitForConnectionFor: Socket standardTimeout]\\\\n\\\\t\\\\t\\\\t\\\\ton: ConnectionTimedOut\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:ex | ^ ByteArray new: 4]].\\\\n\\\\t^ self primSocketLocalAddress: socketHandle! !\\\\n\\\\n!Socket methodsFor: 'accessing' stamp: 'MU 11/26/2003 16:53'!\\\\nlocalPort\\\\n\\\\tself isWaitingForConnection\\\\n\\\\t\\\\tifFalse: [[self waitForConnectionFor: Socket standardTimeout]\\\\n\\\\t\\\\t\\\\t\\\\ton: ConnectionTimedOut\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:ex | ^ 0]].\\\\n\\\\t^ self primSocketLocalPort: socketHandle! !\\\\n\\\\n!Socket methodsFor: 'accessing' stamp: 'jm 3/13/98 12:11'!\\\\npeerName\\\\n\\\\t\\\\\\\"Return the name of the host I'm connected to, or nil if its name isn't known to the domain name server or the request times out.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: Slow. Calls the domain name server, taking up to 20 seconds to time out. Even when sucessful, delays of up to 13 seconds have been observed during periods of high network load.\\\\\\\" \\\\n\\\\n\\\\t^ NetNameResolver\\\\n\\\\t\\\\tnameForAddress: self remoteAddress\\\\n\\\\t\\\\ttimeout: 20\\\\n! !\\\\n\\\\n!Socket methodsFor: 'accessing' stamp: 'ar 4/30/1999 04:25'!\\\\nport\\\\n\\\\t\\\\\\\"Shortcut\\\\\\\"\\\\n\\\\t^self localPort! !\\\\n\\\\n!Socket methodsFor: 'accessing' stamp: 'JMM 6/5/2000 10:12'!\\\\nprimitiveOnlySupportsOneSemaphore\\\\n\\\\t^primitiveOnlySupportsOneSemaphore! !\\\\n\\\\n!Socket methodsFor: 'accessing' stamp: 'JMM 5/22/2000 22:49'!\\\\nreadSemaphore\\\\n\\\\tprimitiveOnlySupportsOneSemaphore ifTrue: [^semaphore].\\\\n\\\\t^readSemaphore! !\\\\n\\\\n!Socket methodsFor: 'accessing' stamp: 'jm 9/17/97 14:34'!\\\\nremoteAddress\\\\n\\\\n\\\\t^ self primSocketRemoteAddress: socketHandle\\\\n! !\\\\n\\\\n!Socket methodsFor: 'accessing' stamp: 'jm 9/17/97 14:34'!\\\\nremotePort\\\\n\\\\n\\\\t^ self primSocketRemotePort: socketHandle\\\\n! !\\\\n\\\\n!Socket methodsFor: 'accessing' stamp: 'JMM 5/9/2000 15:32'!\\\\nsemaphore\\\\n\\\\t^semaphore! !\\\\n\\\\n!Socket methodsFor: 'accessing' stamp: 'ar 7/16/1999 17:22'!\\\\nsocketHandle\\\\n\\\\t^socketHandle! !\\\\n\\\\n!Socket methodsFor: 'accessing' stamp: 'JMM 5/22/2000 22:49'!\\\\nwriteSemaphore\\\\n\\\\tprimitiveOnlySupportsOneSemaphore ifTrue: [^semaphore].\\\\n\\\\t^writeSemaphore! !\\\\n\\\\n\\\\n!Socket methodsFor: 'connection open/close' stamp: 'bolot 7/16/1999 14:36'!\\\\naccept\\\\n\\\\t\\\\\\\"Accept a connection from the receiver socket.\\\\n\\\\tReturn a new socket that is connected to the client\\\\\\\"\\\\n\\\\t^Socket acceptFrom: self.! !\\\\n\\\\n!Socket methodsFor: 'connection open/close' stamp: 'jm 9/11/97 20:29'!\\\\nclose\\\\n\\\\t\\\\\\\"Close this connection gracefully. For TCP, this sends a close request, but the stream remains open until the other side also closes it.\\\\\\\"\\\\n\\\\n\\\\tself primSocketCloseConnection: socketHandle.  \\\\\\\"close this end\\\\\\\"\\\\n! !\\\\n\\\\n!Socket methodsFor: 'connection open/close' stamp: 'jm 11/4/97 07:15'!\\\\ncloseAndDestroy\\\\n\\\\t\\\\\\\"First, try to close this connection gracefully. If the close attempt fails or times out, abort the connection. In either case, destroy the socket. Do nothing if the socket has already been destroyed (i.e., if its socketHandle is nil).\\\\\\\"\\\\n\\\\n\\\\tself closeAndDestroy: 20.\\\\n\\\\n! !\\\\n\\\\n!Socket methodsFor: 'connection open/close' stamp: 'gk 12/13/2005 00:05'!\\\\ncloseAndDestroy: timeoutSeconds\\\\n\\\\t\\\\\\\"First, try to close this connection gracefully. If the close attempt fails or times out, abort the connection. In either case, destroy the socket. Do nothing if the socket has already been destroyed (i.e., if its socketHandle is nil).\\\\\\\"\\\\n\\\\n\\\\tsocketHandle = nil\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\tself isConnected ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tself close.  \\\\\\\"close this end\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t(self waitForDisconnectionFor: timeoutSeconds)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"The other end didn't close so we just abort the connection\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself primSocketAbortConnection: socketHandle]].\\\\n\\\\t\\\\t\\\\tself destroy].\\\\n! !\\\\n\\\\n!Socket methodsFor: 'connection open/close' stamp: 'mir 5/9/2003 18:13'!\\\\nconnectNonBlockingTo: hostAddress port: port\\\\n\\\\t\\\\\\\"Initiate a connection to the given port at the given host address. This operation will return immediately; follow it with waitForConnectionUntil: to wait until the connection is established.\\\\\\\"\\\\n\\\\n\\\\t| status |\\\\n\\\\tself initializeNetwork.\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\t(status == Unconnected)\\\\n\\\\t\\\\tifFalse: [InvalidSocketStatusException signal: 'Socket status must Unconnected before opening a new connection'].\\\\n\\\\n\\\\tself primSocket: socketHandle connectTo: hostAddress port: port.\\\\n! !\\\\n\\\\n!Socket methodsFor: 'connection open/close' stamp: 'mir 5/15/2003 18:29'!\\\\nconnectTo: hostAddress port: port\\\\n\\\\t\\\\\\\"Initiate a connection to the given port at the given host address.\\\\n\\\\tWaits until the connection is established or time outs.\\\\\\\"\\\\n\\\\n\\\\tself connectTo: hostAddress port: port waitForConnectionFor: Socket standardTimeout! !\\\\n\\\\n!Socket methodsFor: 'connection open/close' stamp: 'mu 8/14/2003 15:15'!\\\\nconnectTo: hostAddress port: port waitForConnectionFor: timeout \\\\n\\\\t\\\\\\\"Initiate a connection to the given port at the given host \\\\n\\\\taddress. Waits until the connection is established or time outs.\\\\\\\"\\\\n\\\\tself connectNonBlockingTo: hostAddress port: port.\\\\n\\\\tself\\\\n\\\\t\\\\twaitForConnectionFor: timeout\\\\n\\\\t\\\\tifTimedOut: [ConnectionTimedOut signal: 'Cannot connect to '\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, (NetNameResolver stringFromAddress: hostAddress) , ':' , port asString]! !\\\\n\\\\n!Socket methodsFor: 'connection open/close' stamp: 'mir 5/8/2003 16:03'!\\\\nconnectToHostNamed: hostName port: portNumber\\\\n\\\\t| serverIP |\\\\n\\\\tserverIP _ NetNameResolver addressForName: hostName timeout: 20.\\\\n\\\\t^self connectTo: serverIP port: portNumber\\\\n! !\\\\n\\\\n!Socket methodsFor: 'connection open/close' stamp: 'jm 3/10/98 11:56'!\\\\ndisconnect\\\\n\\\\t\\\\\\\"Break this connection, no matter what state it is in. Data that has been sent but not received will be lost.\\\\\\\"\\\\n\\\\n\\\\tself primSocketAbortConnection: socketHandle.\\\\n! !\\\\n\\\\n!Socket methodsFor: 'connection open/close' stamp: 'mir 2/22/2002 16:25'!\\\\nlistenOn: port\\\\n\\\\t\\\\\\\"Listen for a connection on the given port. This operation will return immediately; follow it with waitForConnectionUntil: to wait until a connection is established.\\\\\\\"\\\\n\\\\n\\\\t| status |\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\t(status == Unconnected)\\\\n\\\\t\\\\tifFalse: [InvalidSocketStatusException signal: 'Socket status must Unconnected before listening for a new connection'].\\\\n\\\\n\\\\tself primSocket: socketHandle listenOn: port.\\\\n! !\\\\n\\\\n!Socket methodsFor: 'connection open/close' stamp: 'mir 2/22/2002 16:25'!\\\\nlistenOn: portNumber backlogSize: backlog\\\\n\\\\t\\\\\\\"Listen for a connection on the given port.\\\\n\\\\tIf this method succeeds, #accept may be used to establish a new connection\\\\\\\"\\\\n\\\\t| status |\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\t(status == Unconnected)\\\\n\\\\t\\\\tifFalse: [InvalidSocketStatusException signal: 'Socket status must Unconnected before listening for a new connection'].\\\\n\\\\tself primSocket: socketHandle listenOn: portNumber backlogSize: backlog.\\\\n! !\\\\n\\\\n!Socket methodsFor: 'connection open/close' stamp: 'ikp 9/1/2003 20:32'!\\\\nlistenOn: portNumber backlogSize: backlog interface: ifAddr\\\\n\\\\t\\\\\\\"Listen for a connection on the given port.\\\\n\\\\tIf this method succeeds, #accept may be used to establish a new connection\\\\\\\"\\\\n\\\\t| status |\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\t(status == Unconnected)\\\\n\\\\t\\\\tifFalse: [InvalidSocketStatusException signal: 'Socket status must Unconnected before listening for a new connection'].\\\\n\\\\tself primSocket: socketHandle listenOn: portNumber backlogSize: backlog interface: ifAddr.\\\\n! !\\\\n\\\\n\\\\n!Socket methodsFor: 'datagrams' stamp: 'JMM 6/7/2000 14:58'!\\\\nreceiveDataInto: aStringOrByteArray fromHost: hostAddress port: portNumber\\\\n\\\\t| datagram |\\\\n\\\\t\\\\\\\"Receive a UDP packet from the given hostAddress/portNumber, storing the data in the given buffer, and return the number of bytes received. Note the given buffer may be only partially filled by the received data.\\\\\\\"\\\\n\\\\n\\\\tprimitiveOnlySupportsOneSemaphore ifTrue:\\\\n\\\\t\\\\t[self setPeer: hostAddress port: portNumber.\\\\n\\\\t\\\\t^self receiveDataInto: aStringOrByteArray].\\\\n\\\\t[true] whileTrue: \\\\n\\\\t\\\\t[datagram _ self receiveUDPDataInto: aStringOrByteArray.\\\\n\\\\t\\\\t((datagram at: 2) = hostAddress and: [(datagram at: 3) = portNumber]) \\\\n\\\\t\\\\t\\\\tifTrue: [^datagram at: 1]\\\\n\\\\t\\\\t\\\\tifFalse: [^0]]! !\\\\n\\\\n!Socket methodsFor: 'datagrams' stamp: 'JMM 6/3/2000 21:54'!\\\\nreceiveUDPDataInto: aStringOrByteArray\\\\n\\\\t\\\\\\\"Receive UDP data into the given buffer and return the number of bytes received. Note the given buffer may be only partially filled by the received data. What is returned is an array, the first element is the bytes read, the second the sending bytearray address, the third the senders port, the fourth, true if more of the datagram awaits reading\\\\\\\"\\\\n\\\\n\\\\t^ self primSocket: socketHandle\\\\n\\\\t\\\\treceiveUDPDataInto: aStringOrByteArray\\\\n\\\\t\\\\tstartingAt: 1\\\\n\\\\t\\\\tcount: aStringOrByteArray size\\\\n! !\\\\n\\\\n!Socket methodsFor: 'datagrams' stamp: 'JMM 5/25/2000 00:05'!\\\\nsendData: aStringOrByteArray toHost: hostAddress port: portNumber\\\\n\\\\t\\\\\\\"Send a UDP packet containing the given data to the specified host/port.\\\\\\\"\\\\n\\\\n\\\\tprimitiveOnlySupportsOneSemaphore ifTrue:\\\\n\\\\t\\\\t[self setPeer: hostAddress port: portNumber.\\\\n\\\\t\\\\t^self sendData: aStringOrByteArray].\\\\n\\\\t^self sendUDPData: aStringOrByteArray toHost: hostAddress port: portNumber! !\\\\n\\\\n!Socket methodsFor: 'datagrams' stamp: 'mir 5/15/2003 18:34'!\\\\nsendUDPData: aStringOrByteArray toHost: hostAddress port: portNumber\\\\n\\\\t\\\\\\\"Send a UDP packet containing the given data to the specified host/port.\\\\\\\"\\\\n\\\\t| bytesToSend bytesSent count |\\\\n\\\\n\\\\tbytesToSend _ aStringOrByteArray size.\\\\n\\\\tbytesSent _ 0.\\\\n\\\\t[bytesSent < bytesToSend] whileTrue: [\\\\n\\\\t\\\\t(self waitForSendDoneFor: 20)\\\\n\\\\t\\\\t\\\\tifFalse: [ConnectionTimedOut signal: 'send data timeout; data not sent'].\\\\n\\\\t\\\\tcount _ self primSocket: socketHandle\\\\n\\\\t\\\\t\\\\tsendUDPData: aStringOrByteArray\\\\n\\\\t\\\\t\\\\ttoHost: hostAddress\\\\n\\\\t\\\\t\\\\tport: portNumber\\\\n\\\\t\\\\t\\\\tstartIndex: bytesSent + 1\\\\n\\\\t\\\\t\\\\tcount: bytesToSend - bytesSent.\\\\n\\\\t\\\\tbytesSent _ bytesSent + count].\\\\n\\\\n\\\\t^ bytesSent\\\\n! !\\\\n\\\\n!Socket methodsFor: 'datagrams' stamp: 'ar 4/30/1999 04:29'!\\\\nsetPeer: hostAddress port: port\\\\n\\\\t\\\\\\\"Set the default send/recv address.\\\\\\\"\\\\n\\\\n\\\\tself primSocket: socketHandle connectTo: hostAddress port: port.\\\\n! !\\\\n\\\\n!Socket methodsFor: 'datagrams' stamp: 'ar 4/30/1999 04:29'!\\\\nsetPort: port\\\\n\\\\t\\\\\\\"Associate a local port number with a UDP socket.  Not applicable to TCP sockets.\\\\\\\"\\\\n\\\\n\\\\tself primSocket: socketHandle setPort: port.\\\\n! !\\\\n\\\\n\\\\n!Socket methodsFor: 'finalization' stamp: 'JMM 5/22/2000 22:52'!\\\\nfinalize\\\\n\\\\tself primSocketDestroyGently: socketHandle.\\\\n\\\\tSmalltalk unregisterExternalObject: semaphore.\\\\n\\\\tSmalltalk unregisterExternalObject: readSemaphore.\\\\n\\\\tSmalltalk unregisterExternalObject: writeSemaphore.\\\\n! !\\\\n\\\\n\\\\n!Socket methodsFor: 'initialize-destroy' stamp: 'JMM 5/22/2000 22:47'!\\\\nacceptFrom: aSocket\\\\n\\\\t\\\\\\\"Initialize a new socket handle from an accept call\\\\\\\"\\\\n\\\\t| semaIndex readSemaIndex writeSemaIndex |\\\\n\\\\n\\\\tprimitiveOnlySupportsOneSemaphore _ false.\\\\n\\\\tsemaphore _ Semaphore new.\\\\n\\\\treadSemaphore _ Semaphore new.\\\\n\\\\twriteSemaphore _ Semaphore new.\\\\n\\\\tsemaIndex _ Smalltalk registerExternalObject: semaphore.\\\\n\\\\treadSemaIndex _ Smalltalk registerExternalObject: readSemaphore.\\\\n\\\\twriteSemaIndex _ Smalltalk registerExternalObject: writeSemaphore.\\\\n\\\\tsocketHandle _ self primAcceptFrom: aSocket socketHandle\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\treceiveBufferSize: 8000\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsendBufSize: 8000\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsemaIndex: semaIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\treadSemaIndex: readSemaIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twriteSemaIndex: writeSemaIndex.\\\\n\\\\tsocketHandle = nil ifTrue: [  \\\\\\\"socket creation failed\\\\\\\"\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: semaphore.\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: readSemaphore.\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: writeSemaphore.\\\\n\\\\t\\\\treadSemaphore _ writeSemaphore _ semaphore _ nil\\\\n\\\\t] ifFalse:[self register].\\\\n! !\\\\n\\\\n!Socket methodsFor: 'initialize-destroy' stamp: 'JMM 5/22/2000 22:54'!\\\\ndestroy\\\\n\\\\t\\\\\\\"Destroy this socket. Its connection, if any, is aborted and its resources are freed. Do nothing if the socket has already been destroyed (i.e., if its socketHandle is nil).\\\\\\\"\\\\n\\\\n\\\\tsocketHandle = nil ifFalse: \\\\n\\\\t\\\\t[self isValid ifTrue: [self primSocketDestroy: socketHandle].\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: semaphore.\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: readSemaphore.\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: writeSemaphore.\\\\n\\\\t\\\\tsocketHandle _ nil.\\\\n\\\\t\\\\treadSemaphore _ writeSemaphore _ semaphore _ nil.\\\\n\\\\t\\\\tself unregister].\\\\n! !\\\\n\\\\n!Socket methodsFor: 'initialize-destroy' stamp: 'JMM 5/22/2000 23:04'!\\\\ninitialize: socketType\\\\n\\\\t\\\\\\\"Initialize a new socket handle. If socket creation fails, socketHandle will be set to nil.\\\\\\\"\\\\n\\\\t| semaIndex readSemaIndex writeSemaIndex |\\\\n\\\\n\\\\tprimitiveOnlySupportsOneSemaphore _ false.\\\\n\\\\tsemaphore _ Semaphore new.\\\\n\\\\treadSemaphore _ Semaphore new.\\\\n\\\\twriteSemaphore _ Semaphore new.\\\\n\\\\tsemaIndex _ Smalltalk registerExternalObject: semaphore.\\\\n\\\\treadSemaIndex _ Smalltalk registerExternalObject: readSemaphore.\\\\n\\\\twriteSemaIndex _ Smalltalk registerExternalObject: writeSemaphore.\\\\n\\\\tsocketHandle _\\\\n\\\\t\\\\tself primSocketCreateNetwork: 0\\\\n\\\\t\\\\t\\\\ttype: socketType\\\\n\\\\t\\\\t\\\\treceiveBufferSize: 8000\\\\n\\\\t\\\\t\\\\tsendBufSize: 8000\\\\n\\\\t\\\\t\\\\tsemaIndex: semaIndex\\\\n\\\\t\\\\t\\\\treadSemaIndex: readSemaIndex\\\\n\\\\t\\\\t\\\\twriteSemaIndex: writeSemaIndex.\\\\n\\\\n\\\\tsocketHandle = nil ifTrue: [  \\\\\\\"socket creation failed\\\\\\\"\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: semaphore.\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: readSemaphore.\\\\n\\\\t\\\\tSmalltalk unregisterExternalObject: writeSemaphore.\\\\n\\\\t\\\\treadSemaphore _ writeSemaphore _ semaphore _ nil\\\\n\\\\t] ifFalse:[self register].\\\\n! !\\\\n\\\\n!Socket methodsFor: 'initialize-destroy' stamp: 'mir 2/22/2002 15:48'!\\\\ninitializeNetwork\\\\n\\\\tself class initializeNetwork! !\\\\n\\\\n\\\\n!Socket methodsFor: 'other' stamp: 'mir 2/22/2002 16:25'!\\\\ngetOption: aName \\\\n\\\\t\\\\\\\"Get options on this socket, see Unix man pages for values for \\\\n\\\\tsockets, IP, TCP, UDP. IE SO_KEEPALIVE\\\\n\\\\treturns an array, element one is an status number (0 ok, -1 read only option)\\\\n\\\\telement two is the resulting of the requested option\\\\\\\"\\\\n\\\\n\\\\t(socketHandle == nil or: [self isValid not])\\\\n\\\\t\\\\tifTrue: [InvalidSocketStatusException signal: 'Socket status must valid before getting an option'].\\\\n\\\\t^self primSocket: socketHandle getOption: aName\\\\n\\\\n\\\\\\\"| foo options |\\\\nSocket initializeNetwork.\\\\nfoo _ Socket newTCP.\\\\nfoo connectTo: (NetNameResolver addressFromString: '192.168.1.1') port: 80.\\\\nfoo waitForConnectionUntil: (Socket standardDeadline).\\\\n\\\\noptions _ {\\\\n'SO_DEBUG'. 'SO_REUSEADDR'. 'SO_REUSEPORT'. 'SO_DONTROUTE'.\\\\n'SO_BROADCAST'. 'SO_SNDBUF'. 'SO_RCVBUF'. 'SO_KEEPALIVE'.\\\\n'SO_OOBINLINE'. 'SO_PRIORITY'. 'SO_LINGER'. 'SO_RCVLOWAT'.\\\\n'SO_SNDLOWAT'. 'IP_TTL'. 'IP_HDRINCL'. 'IP_RCVOPTS'.\\\\n'IP_RCVDSTADDR'. 'IP_MULTICAST_IF'. 'IP_MULTICAST_TTL'.\\\\n'IP_MULTICAST_LOOP'. 'UDP_CHECKSUM'. 'TCP_MAXSEG'.\\\\n'TCP_NODELAY'. 'TCP_ABORT_THRESHOLD'. 'TCP_CONN_NOTIFY_THRESHOLD'. \\\\n'TCP_CONN_ABORT_THRESHOLD'. 'TCP_NOTIFY_THRESHOLD'.\\\\n'TCP_URGENT_PTR_TYPE'}.\\\\n\\\\n1 to: options size do: [:i | | fum |\\\\n\\\\tfum _foo getOption: (options at: i).\\\\n\\\\tTranscript show: (options at: i),fum printString;cr].\\\\n\\\\nfoo _ Socket newUDP.\\\\nfoo setPeer: (NetNameResolver addressFromString: '192.168.1.9') port: 7.\\\\nfoo waitForConnectionUntil: (Socket standardDeadline).\\\\n\\\\n1 to: options size do: [:i | | fum |\\\\n\\\\tfum _foo getOption: (options at: i).\\\\n\\\\tTranscript show: (options at: i),fum printString;cr].\\\\n\\\\\\\"! !\\\\n\\\\n!Socket methodsFor: 'other' stamp: 'mir 2/22/2002 16:30'!\\\\nsetOption: aName value: aValue \\\\n\\\\t| value |\\\\n\\\\t\\\\\\\"setup options on this socket, see Unix man pages for values for \\\\n\\\\tsockets, IP, TCP, UDP. IE SO_KEEPALIVE\\\\n\\\\treturns an array, element one is the error number\\\\n\\\\telement two is the resulting of the negotiated value.\\\\n\\\\tSee getOption for list of keys\\\\\\\"\\\\n\\\\n\\\\t(socketHandle == nil or: [self isValid not])\\\\n\\\\t\\\\tifTrue: [InvalidSocketStatusException signal: 'Socket status must valid before setting an option'].\\\\n\\\\tvalue _ aValue asString.\\\\n\\\\taValue == true ifTrue: [value _ '1'].\\\\n\\\\taValue == false ifTrue: [value _ '0'].\\\\n\\\\t^ self primSocket: socketHandle setOption: aName value: value! !\\\\n\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimAcceptFrom: aHandle receiveBufferSize: rcvBufSize sendBufSize: sndBufSize semaIndex: semaIndex\\\\n\\\\t\\\\\\\"Create and return a new socket handle based on accepting the connection from the given listening socket\\\\\\\"\\\\n\\\\t<primitive: 'primitiveSocketAccept' module: 'SocketPlugin'>\\\\n\\\\t^self primitiveFailed! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'JMM 5/22/2000 22:55'!\\\\nprimAcceptFrom: aHandle receiveBufferSize: rcvBufSize sendBufSize: sndBufSize semaIndex: semaIndex readSemaIndex: aReadSema writeSemaIndex: aWriteSema\\\\n\\\\t\\\\\\\"Create and return a new socket handle based on accepting the connection from the given listening socket\\\\\\\"\\\\n\\\\t<primitive: 'primitiveSocketAccept3Semaphores' module: 'SocketPlugin'>\\\\n\\\\tprimitiveOnlySupportsOneSemaphore _ true.\\\\n\\\\t^self primAcceptFrom: aHandle receiveBufferSize: rcvBufSize sendBufSize: sndBufSize semaIndex: semaIndex ! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocket: socketID connectTo: hostAddress port: port\\\\n\\\\t\\\\\\\"Attempt to establish a connection to the given port of the given host. This is an asynchronous call; query the socket status to discover if and when the connection is actually completed.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketConnectToPort' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'JMM 5/25/2000 21:48'!\\\\nprimSocket: socketID getOption: aString \\\\n\\\\t\\\\\\\"Get some option information on this socket. Refer to the UNIX \\\\n\\\\tman pages for valid SO, TCP, IP, UDP options. In case of doubt\\\\n\\\\trefer to the source code.\\\\n\\\\tTCP_NODELAY, SO_KEEPALIVE are valid options for example\\\\n\\\\treturns an array containing the error code and the option value\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketGetOptions' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocket: socketID listenOn: port\\\\n\\\\t\\\\\\\"Listen for a connection on the given port. This is an asynchronous call; query the socket status to discover if and when the connection is actually completed.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketListenWithOrWithoutBacklog' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocket: aHandle listenOn: portNumber backlogSize: backlog\\\\n\\\\t\\\\\\\"Primitive. Set up the socket to listen on the given port.\\\\n\\\\tWill be used in conjunction with #accept only.\\\\\\\"\\\\n\\\\t<primitive: 'primitiveSocketListenWithOrWithoutBacklog' module: 'SocketPlugin'>\\\\n\\\\tself destroy. \\\\\\\"Accept not supported so clean up\\\\\\\"! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ikp 9/1/2003 20:33'!\\\\nprimSocket: aHandle listenOn: portNumber backlogSize: backlog interface: ifAddr\\\\n\\\\t\\\\\\\"Primitive. Set up the socket to listen on the given port.\\\\n\\\\tWill be used in conjunction with #accept only.\\\\\\\"\\\\n\\\\t<primitive: 'primitiveSocketListenOnPortBacklogInterface' module: 'SocketPlugin'>\\\\n\\\\tself destroy. \\\\\\\"Accept not supported so clean up\\\\\\\"! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocket: socketID receiveDataInto: aStringOrByteArray startingAt: startIndex count: count\\\\n\\\\t\\\\\\\"Receive data from the given socket into the given array starting at the given index. Return the number of bytes read or zero if no data is available.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketReceiveDataBufCount' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'JMM 5/24/2000 17:19'!\\\\nprimSocket: socketID receiveUDPDataInto: aStringOrByteArray startingAt: startIndex count: count\\\\n\\\\t\\\\\\\"Receive data from the given socket into the given array starting at the given index. \\\\n\\\\tReturn an Array containing the amount read, the host address byte array, the host port, and the more flag\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketReceiveUDPDataBufCount' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocket: socketID sendData: aStringOrByteArray startIndex: startIndex count: count\\\\n\\\\t\\\\\\\"Send data to the remote host through the given socket starting with the given byte index of the given byte array. The data sent is 'pushed' immediately. Return the number of bytes of data actually sent; any remaining data should be re-submitted for sending after the current send operation has completed.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: In general, it many take several sendData calls to transmit a large data array since the data is sent in send-buffer-sized chunks. The size of the send buffer is determined when the socket is created.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketSendDataBufCount' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'JMM 5/25/2000 00:08'!\\\\nprimSocket: socketID sendUDPData: aStringOrByteArray toHost: hostAddress  port: portNumber startIndex: startIndex count: count\\\\n\\\\t\\\\\\\"Send data to the remote host through the given socket starting with the given byte index of the given byte array. The data sent is 'pushed' immediately. Return the number of bytes of data actually sent; any remaining data should be re-submitted for sending after the current send operation has completed.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: In general, it many take several sendData calls to transmit a large data array since the data is sent in send-buffer-sized chunks. The size of the send buffer is determined when the socket is created.\\\\\\\"\\\\n\\\\n\\\\t<primitive:  'primitiveSocketSendUDPDataBufCount' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 7/18/2000 11:42'!\\\\nprimSocket: socketID setOption: aString value: aStringValue\\\\n\\\\t\\\\\\\"Set some option information on this socket. Refer to the UNIX \\\\n\\\\tman pages for valid SO, TCP, IP, UDP options. In case of doubt\\\\n\\\\trefer to the source code.\\\\n\\\\tTCP_NODELAY, SO_KEEPALIVE are valid options for example\\\\n\\\\treturns an array containing the error code and the negotiated value\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketSetOptions' module: 'SocketPlugin'>\\\\n\\\\t^nil! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocket: socketID setPort: port\\\\n\\\\t\\\\\\\"Set the local port associated with a UDP socket.\\\\n\\\\tNote: this primitive is overloaded.  The primitive will not fail on a TCP socket, but\\\\n\\\\tthe effects will not be what was desired.  Best solution would be to split Socket into\\\\n\\\\ttwo subclasses, TCPSocket and UDPSocket.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketListenWithOrWithoutBacklog' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketAbortConnection: socketID\\\\n\\\\t\\\\\\\"Terminate the connection on the given port immediately without going through the normal close sequence. This is an asynchronous call; query the socket status to discover if and when the connection is actually terminated.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketAbortConnection' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketCloseConnection: socketID\\\\n\\\\t\\\\\\\"Close the connection on the given port. The remote end is informed that this end has closed and will do no further sends. This is an asynchronous call; query the socket status to discover if and when the connection is actually closed.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketCloseConnection' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketConnectionStatus: socketID\\\\n\\\\t\\\\\\\"Return an integer reflecting the connection status of this socket. For a list of possible values, see the comment in the 'initialize' method of this class. If the primitive fails, return a status indicating that the socket handle is no longer valid, perhaps because the Squeak image was saved and restored since the socket was created. (Sockets do not survive snapshots.)\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketConnectionStatus' module: 'SocketPlugin'>\\\\n\\\\t^ InvalidSocket\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketCreateNetwork: netType type: socketType receiveBufferSize: rcvBufSize sendBufSize: sendBufSize semaIndex: semaIndex\\\\n\\\\t\\\\\\\"Return a new socket handle for a socket of the given type and buffer sizes. Return nil if socket creation fails.\\\\n\\\\tThe netType parameter is platform dependent and can be used to encode both the protocol type (IP, Xerox XNS, etc.) and/or the physical network interface to use if this host is connected to multiple networks. A zero netType means to use IP protocols and the primary (or only) network interface.\\\\n\\\\tThe socketType parameter specifies:\\\\n\\\\t\\\\t0\\\\treliable stream socket (TCP if the protocol is IP)\\\\n\\\\t\\\\t1\\\\tunreliable datagram socket (UDP if the protocol is IP)\\\\n\\\\tThe buffer size parameters allow performance to be tuned to the application. For example, a larger receive buffer should be used when the application expects to be receiving large amounts of data, especially from a host that is far away. These values are considered requests only; the underlying implementation will ensure that the buffer sizes actually used are within allowable bounds. Note that memory may be limited, so an application that keeps many sockets open should use smaller buffer sizes. Note the macintosh implementation ignores this buffer size. Also see setOption to get/set socket buffer sizes which allows you to set/get the current buffer sizes for reading and writing.\\\\n \\\\tIf semaIndex is > 0, it is taken to be the index of a Semaphore in the external objects array to be associated with this socket. This semaphore will be signalled when the socket status changes, such as when data arrives or a send completes. All processes waiting on the semaphore will be awoken for each such event; each process must then query the socket state to figure out if the conditions they are waiting for have been met. For example, a process waiting to send some data can see if the last send has completed.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketCreate' module: 'SocketPlugin'>\\\\n\\\\t^ nil  \\\\\\\"socket creation failed\\\\\\\"\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'JMM 5/22/2000 22:48'!\\\\nprimSocketCreateNetwork: netType type: socketType receiveBufferSize: rcvBufSize sendBufSize: sendBufSize semaIndex: semaIndex readSemaIndex: aReadSema writeSemaIndex: aWriteSema\\\\n\\\\t\\\\\\\"See comment in primSocketCreateNetwork: with one semaIndex. However you should know that some implementations\\\\n\\\\tignore the buffer size and this interface supports three semaphores,  one for open/close/listen and the other two for\\\\n\\\\treading and writing\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketCreate3Semaphores' module: 'SocketPlugin'>\\\\n\\\\tprimitiveOnlySupportsOneSemaphore _ true.\\\\n\\\\t^ self primSocketCreateNetwork: netType\\\\n\\\\t\\\\t\\\\ttype: socketType\\\\n\\\\t\\\\t\\\\treceiveBufferSize: rcvBufSize\\\\n\\\\t\\\\t\\\\tsendBufSize: sendBufSize\\\\n\\\\t\\\\t\\\\tsemaIndex: semaIndex! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketDestroy: socketID\\\\n\\\\t\\\\\\\"Release the resources associated with this socket. If a connection is open, it is aborted.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketDestroy' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketDestroyGently: socketID\\\\n\\\\t\\\\\\\"Release the resources associated with this socket. If a connection is open, it is aborted.\\\\n\\\\tDo not fail if the receiver is already closed.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketDestroy' module: 'SocketPlugin'>\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketError: socketID\\\\n\\\\t\\\\\\\"Return an integer encoding the most recent error on this socket. Zero means no error.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketError' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketLocalAddress: socketID\\\\n\\\\t\\\\\\\"Return the local host address for this socket.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketLocalAddress' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketLocalPort: socketID\\\\n\\\\t\\\\\\\"Return the local port for this socket, or zero if no port has yet been assigned.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketLocalPort' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketReceiveDataAvailable: socketID\\\\n\\\\t\\\\\\\"Return true if data may be available for reading from the current socket.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketReceiveDataAvailable' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketRemoteAddress: socketID\\\\n\\\\t\\\\\\\"Return the remote host address for this socket, or zero if no connection has been made.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketRemoteAddress' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketRemotePort: socketID\\\\n\\\\t\\\\\\\"Return the remote port for this socket, or zero if no connection has been made.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketRemotePort' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSocketSendDone: socketID\\\\n\\\\t\\\\\\\"Return true if there is no send in progress on the current socket.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSocketSendDone' module: 'SocketPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n\\\\n!Socket methodsFor: 'printing' stamp: 'jm 11/23/1998 11:57'!\\\\nprintOn: aStream\\\\n\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream nextPutAll: '[', self statusString, ']'.\\\\n! !\\\\n\\\\n\\\\n!Socket methodsFor: 'queries' stamp: 'jm 2/25/1999 13:52'!\\\\ndataAvailable\\\\n\\\\t\\\\\\\"Return true if this socket has unread received data.\\\\\\\"\\\\n\\\\n\\\\tsocketHandle == nil ifTrue: [^ false].\\\\n\\\\t^ self primSocketReceiveDataAvailable: socketHandle\\\\n! !\\\\n\\\\n!Socket methodsFor: 'queries' stamp: 'jm 2/25/1999 13:52'!\\\\nisConnected\\\\n\\\\t\\\\\\\"Return true if this socket is connected.\\\\\\\"\\\\n\\\\n\\\\tsocketHandle == nil ifTrue: [^ false].\\\\n\\\\t^ (self primSocketConnectionStatus: socketHandle) == Connected\\\\n! !\\\\n\\\\n!Socket methodsFor: 'queries' stamp: 'JMM 5/5/2000 12:15'!\\\\nisOtherEndClosed\\\\n\\\\t\\\\\\\"Return true if this socket had the other end closed.\\\\\\\"\\\\n\\\\n\\\\tsocketHandle == nil ifTrue: [^ false].\\\\n\\\\t^ (self primSocketConnectionStatus: socketHandle) == OtherEndClosed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'queries' stamp: 'JMM 5/5/2000 12:17'!\\\\nisThisEndClosed\\\\n\\\\t\\\\\\\"Return true if this socket had the this end closed.\\\\\\\"\\\\n\\\\n\\\\tsocketHandle == nil ifTrue: [^ false].\\\\n\\\\t^ (self primSocketConnectionStatus: socketHandle) == ThisEndClosed\\\\n! !\\\\n\\\\n!Socket methodsFor: 'queries' stamp: 'jm 2/25/1999 13:54'!\\\\nisUnconnected\\\\n\\\\t\\\\\\\"Return true if this socket's state is Unconnected.\\\\\\\"\\\\n\\\\n\\\\tsocketHandle == nil ifTrue: [^ false].\\\\n\\\\t^ (self primSocketConnectionStatus: socketHandle) == Unconnected\\\\n! !\\\\n\\\\n!Socket methodsFor: 'queries' stamp: 'jm 2/25/1999 13:54'!\\\\nisUnconnectedOrInvalid\\\\n\\\\t\\\\\\\"Return true if this socket is completely disconnected or is invalid.\\\\\\\"\\\\n\\\\n\\\\t| status |\\\\n\\\\tsocketHandle == nil ifTrue: [^ true].\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\t^ (status = Unconnected) | (status = InvalidSocket)\\\\n! !\\\\n\\\\n!Socket methodsFor: 'queries' stamp: 'jm 2/25/1999 13:51'!\\\\nisValid\\\\n\\\\t\\\\\\\"Return true if this socket contains a valid, non-nil socket handle.\\\\\\\"\\\\n\\\\n\\\\t| status |\\\\n\\\\tsocketHandle == nil ifTrue: [^ false].\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\t^ status ~= InvalidSocket\\\\n! !\\\\n\\\\n!Socket methodsFor: 'queries' stamp: 'jm 2/25/1999 13:54'!\\\\nisWaitingForConnection\\\\n\\\\t\\\\\\\"Return true if this socket is waiting for a connection.\\\\\\\"\\\\n\\\\n\\\\tsocketHandle == nil ifTrue: [^ false].\\\\n\\\\t^ (self primSocketConnectionStatus: socketHandle) == WaitingForConnection\\\\n! !\\\\n\\\\n!Socket methodsFor: 'queries' stamp: 'jm 2/25/1999 13:54'!\\\\nsendDone\\\\n\\\\t\\\\\\\"Return true if the most recent send operation on this socket has completed.\\\\\\\"\\\\n\\\\n\\\\tsocketHandle == nil ifTrue: [^ false].\\\\n\\\\t^ self primSocketSendDone: socketHandle\\\\n! !\\\\n\\\\n!Socket methodsFor: 'queries' stamp: 'JMM 5/8/2000 23:24'!\\\\nsocketError\\\\n\\\\t^self primSocketError: socketHandle! !\\\\n\\\\n!Socket methodsFor: 'queries' stamp: 'jm 2/25/1999 13:56'!\\\\nstatusString\\\\n\\\\t\\\\\\\"Return a string describing the status of this socket.\\\\\\\"\\\\n\\\\n\\\\t| status |\\\\n\\\\tsocketHandle == nil ifTrue: [^ 'destroyed'].\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\tstatus = InvalidSocket ifTrue: [^ 'invalidSocketHandle'].\\\\n\\\\tstatus = Unconnected ifTrue: [^ 'unconnected'].\\\\n\\\\tstatus = WaitingForConnection ifTrue: [^ 'waitingForConnection'].\\\\n\\\\tstatus = Connected ifTrue: [^ 'connected'].\\\\n\\\\tstatus = OtherEndClosed ifTrue: [^ 'otherEndClosedButNotThisEnd'].\\\\n\\\\tstatus = ThisEndClosed ifTrue: [^ 'thisEndClosedButNotOtherEnd'].\\\\n\\\\t^ 'unknown socket status'\\\\n! !\\\\n\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'gk 12/14/2005 10:02'!\\\\ndiscardReceivedData\\\\n\\\\t\\\\\\\"Discard any data received up until now, and return the number of bytes discarded.\\\\\\\"\\\\n\\\\n\\\\t| buf totalBytesDiscarded |\\\\n\\\\tbuf _ String new: 10000.\\\\n\\\\ttotalBytesDiscarded _ 0.\\\\n\\\\t[self isConnected] whileTrue: [\\\\n\\\\t\\\\ttotalBytesDiscarded _\\\\n\\\\t\\\\t\\\\ttotalBytesDiscarded + (self receiveDataInto: buf)].\\\\n\\\\t^ totalBytesDiscarded\\\\n! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'mir 5/15/2003 13:52'!\\\\nreceiveAvailableData\\\\n\\\\t\\\\\\\"Receive all available data (if any). Do not wait.\\\\\\\"\\\\n \\\\n\\\\t| buffer bytesRead |\\\\n\\\\tbuffer _ String new: 2000.\\\\n\\\\tbytesRead _ self receiveAvailableDataInto: buffer.\\\\n\\\\t^buffer copyFrom: 1 to: bytesRead! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'yo 10/10/2005 18:47'!\\\\nreceiveAvailableDataIntoBuffer: buffer\\\\n\\\\t\\\\\\\"Receive all available data (if any). Do not wait.\\\\\\\"\\\\n \\\\n\\\\t| bytesRead |\\\\n\\\\tbytesRead _ self receiveAvailableDataInto: buffer.\\\\n\\\\t^buffer copyFrom: 1 to: bytesRead! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'mir 5/15/2003 13:52'!\\\\nreceiveAvailableDataInto: buffer\\\\n\\\\t\\\\\\\"Receive all available data into the given buffer and return the number of bytes received.\\\\n\\\\tNote the given buffer may be only partially filled by the received data.\\\\n\\\\tDo not wait for data.\\\\\\\"\\\\n\\\\n\\\\t^self receiveAvailableDataInto: buffer startingAt: 1! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'mu 8/9/2003 18:04'!\\\\nreceiveAvailableDataInto: buffer startingAt: startIndex\\\\n\\\\t\\\\\\\"Receive all available data into the given buffer and return the number of bytes received.\\\\n\\\\tNote the given buffer may be only partially filled by the received data.\\\\n\\\\tDo not wait for data.\\\\\\\"\\\\n\\\\n\\\\t| bufferPos bytesRead |\\\\n\\\\tbufferPos := startIndex.\\\\n\\\\t[self dataAvailable\\\\n\\\\t\\\\tand: [bufferPos-1 < buffer size]] \\\\n\\\\t\\\\twhileTrue: [\\\\n\\\\t\\\\t\\\\tbytesRead := self receiveSomeDataInto: buffer startingAt: bufferPos.\\\\n\\\\t\\\\t\\\\tbufferPos := bufferPos + bytesRead].\\\\n\\\\t^bufferPos - startIndex! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'mir 5/15/2003 16:05'!\\\\nreceiveData\\\\n\\\\t\\\\\\\"Receive data into the given buffer and return the number of bytes received. \\\\n\\\\tNote the given buffer may be only partially filled by the received data.\\\\n\\\\tWaits for data once.\\\\n\\\\tEither returns data or signals a time out or connection close.\\\\\\\"\\\\n\\\\n\\\\t| buffer bytesRead |\\\\n\\\\tbuffer _ String new: 2000.\\\\n\\\\tbytesRead _ self receiveDataInto: buffer.\\\\n\\\\t^buffer copyFrom: 1 to: bytesRead! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'mir 5/15/2003 16:05'!\\\\nreceiveDataInto: aStringOrByteArray\\\\n\\\\t\\\\\\\"Receive data into the given buffer and return the number of bytes received. \\\\n\\\\tNote the given buffer may be only partially filled by the received data.\\\\n\\\\tWaits for data once.\\\\n\\\\tEither returns data or signals a time out or connection close.\\\\\\\"\\\\n\\\\n\\\\t^self receiveDataInto: aStringOrByteArray startingAt: 1! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'svp 9/23/2003 00:12'!\\\\nreceiveDataInto: aStringOrByteArray startingAt: aNumber\\\\n\\\\t\\\\\\\"Receive data into the given buffer and return the number of bytes received. \\\\n\\\\tNote the given buffer may be only partially filled by the received data.\\\\n\\\\tWaits for data once.  The answer may be zero (indicating that no data was \\\\n\\\\tavailable before the socket closed).\\\\\\\"\\\\n\\\\n\\\\t| bytesRead closed |\\\\n\\\\tbytesRead := 0.\\\\n\\\\tclosed := false.\\\\n\\\\t[closed not and: [bytesRead == 0]]\\\\n\\\\t\\\\twhileTrue: [\\\\n\\\\t\\\\t\\\\tself waitForDataIfClosed: [closed := true].\\\\n\\\\t\\\\t\\\\tbytesRead := self primSocket: socketHandle\\\\n\\\\t\\\\t\\\\t\\\\treceiveDataInto: aStringOrByteArray\\\\n\\\\t\\\\t\\\\t\\\\tstartingAt: aNumber\\\\n\\\\t\\\\t\\\\t\\\\tcount: aStringOrByteArray size-aNumber+1].\\\\n\\\\t^bytesRead\\\\n! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'gk 2/9/2005 12:33'!\\\\nreceiveDataSignallingClosedInto: aStringOrByteArray startingAt: aNumber\\\\n\\\\t\\\\\\\"Receive data into the given buffer and return the number of bytes received. \\\\n\\\\tNote the given buffer may be only partially filled by the received data.\\\\n\\\\tWaits for data until something is read or the socket is closed, upon which\\\\n\\\\twe signal.\\\\\\\"\\\\n\\\\n\\\\t| bytesRead |\\\\n\\\\tbytesRead := 0.\\\\n\\\\t[bytesRead == 0]\\\\n\\\\t\\\\twhileTrue: [\\\\n\\\\t\\\\t\\\\tself waitForData.\\\\n\\\\t\\\\t\\\\tbytesRead := self primSocket: socketHandle\\\\n\\\\t\\\\t\\\\t\\\\treceiveDataInto: aStringOrByteArray\\\\n\\\\t\\\\t\\\\t\\\\tstartingAt: aNumber\\\\n\\\\t\\\\t\\\\t\\\\tcount: aStringOrByteArray size-aNumber+1].\\\\n\\\\t^bytesRead\\\\n! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'gk 2/9/2005 12:24'!\\\\nreceiveDataSignallingTimeout: timeout into: aStringOrByteArray startingAt: aNumber\\\\n\\\\t\\\\\\\"Receive data into the given buffer and return the number of bytes received. \\\\n\\\\tNote the given buffer may be only partially filled by the received data.\\\\n\\\\tWait for data once for the specified nr of seconds.  This method will\\\\n\\\\tthrow exceptions on timeout or the socket closing.\\\\\\\"\\\\n\\\\n\\\\tself waitForDataFor: timeout.\\\\n\\\\t^self primSocket: socketHandle\\\\n\\\\t\\\\treceiveDataInto: aStringOrByteArray\\\\n\\\\t\\\\tstartingAt: aNumber\\\\n\\\\t\\\\tcount: aStringOrByteArray size-aNumber+1\\\\n! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'svp 9/23/2003 00:03'!\\\\nreceiveDataTimeout: timeout\\\\n\\\\t\\\\\\\"Receive data into the given buffer and return the number of bytes received. \\\\n\\\\tNote the given buffer may be only partially filled by the received data.\\\\n\\\\tWaits for data once.\\\\\\\"\\\\n\\\\n\\\\t| buffer bytesRead |\\\\n\\\\tbuffer _ String new: 2000.\\\\n\\\\tbytesRead _ self receiveDataTimeout: timeout into: buffer.\\\\n\\\\t^buffer copyFrom: 1 to: bytesRead! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'svp 9/23/2003 00:01'!\\\\nreceiveDataTimeout: timeout into: aStringOrByteArray \\\\n\\\\t\\\\\\\"Receive data into the given buffer and return the number of bytes received. \\\\n\\\\tNote the given buffer may be only partially filled by the received data.\\\\n\\\\tWaits for data once.\\\\\\\"\\\\n\\\\n\\\\t^self receiveDataTimeout: timeout into: aStringOrByteArray startingAt: 1! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'svp 9/22/2003 23:58'!\\\\nreceiveDataTimeout: timeout into: aStringOrByteArray startingAt: aNumber\\\\n\\\\t\\\\\\\"Receive data into the given buffer and return the number of bytes received. \\\\n\\\\tNote the given buffer may be only partially filled by the received data.\\\\n\\\\tWait for data once for the specified nr of seconds.  The answer may be \\\\n\\\\tzero (indicating that there was no data available within the given timeout).\\\\\\\"\\\\n\\\\n\\\\tself waitForDataFor: timeout ifClosed: [] ifTimedOut: [].\\\\n\\\\t^self primSocket: socketHandle\\\\n\\\\t\\\\treceiveDataInto: aStringOrByteArray\\\\n\\\\t\\\\tstartingAt: aNumber\\\\n\\\\t\\\\tcount: aStringOrByteArray size-aNumber+1\\\\n! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'mir 5/15/2003 16:18'!\\\\nreceiveDataWithTimeout\\\\n\\\\t\\\\\\\"Receive data into the given buffer and return the number of bytes received. \\\\n\\\\tNote the given buffer may be only partially filled by the received data.\\\\n\\\\tWaits for data once.\\\\n\\\\tEither returns data or signals a time out or connection close.\\\\\\\"\\\\n\\\\n\\\\t| buffer bytesRead |\\\\n\\\\tbuffer _ String new: 2000.\\\\n\\\\tbytesRead _ self receiveDataWithTimeoutInto: buffer.\\\\n\\\\t^buffer copyFrom: 1 to: bytesRead! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'mir 5/15/2003 16:18'!\\\\nreceiveDataWithTimeoutInto: aStringOrByteArray\\\\n\\\\t\\\\\\\"Receive data into the given buffer and return the number of bytes received. \\\\n\\\\tNote the given buffer may be only partially filled by the received data.\\\\n\\\\tWaits for data once.\\\\n\\\\tEither returns data or signals a time out or connection close.\\\\\\\"\\\\n\\\\n\\\\t^self receiveDataWithTimeoutInto: aStringOrByteArray startingAt: 1! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'svp 9/23/2003 00:01'!\\\\nreceiveDataWithTimeoutInto: aStringOrByteArray startingAt: aNumber\\\\n\\\\t\\\\\\\"Receive data into the given buffer and return the number of bytes received. \\\\n\\\\tNote the given buffer may be only partially filled by the received data.\\\\n\\\\tWaits for data once.\\\\\\\"\\\\n\\\\n\\\\t^self receiveDataTimeout: Socket standardTimeout into: aStringOrByteArray startingAt: aNumber \\\\n! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'mir 5/15/2003 13:46'!\\\\nreceiveSomeData\\\\n\\\\t\\\\\\\"Receive currently available data (if any). Do not wait.\\\\\\\"\\\\n \\\\n\\\\t| buffer bytesRead |\\\\n\\\\tbuffer _ String new: 2000.\\\\n\\\\tbytesRead _ self receiveSomeDataInto: buffer.\\\\n\\\\t^buffer copyFrom: 1 to: bytesRead! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'mir 5/15/2003 13:46'!\\\\nreceiveSomeDataInto: aStringOrByteArray\\\\n\\\\t\\\\\\\"Receive data into the given buffer and return the number of bytes received. Note the given buffer may be only partially filled by the received data.\\\\\\\"\\\\n\\\\n\\\\t^self receiveSomeDataInto: aStringOrByteArray startingAt: 1! !\\\\n\\\\n!Socket methodsFor: 'receiving' stamp: 'mir 5/15/2003 13:46'!\\\\nreceiveSomeDataInto: aStringOrByteArray startingAt: aNumber\\\\n\\\\t\\\\\\\"Receive data into the given buffer and return the number of bytes received. Note the given buffer may be only partially filled by the received data.\\\\\\\"\\\\n\\\\n\\\\t^ self primSocket: socketHandle\\\\n\\\\t\\\\treceiveDataInto: aStringOrByteArray\\\\n\\\\t\\\\tstartingAt: aNumber\\\\n\\\\t\\\\tcount: aStringOrByteArray size-aNumber+1\\\\n! !\\\\n\\\\n\\\\n!Socket methodsFor: 'registry' stamp: 'ar 3/21/98 17:40'!\\\\nregister\\\\n\\\\t^self class register: self! !\\\\n\\\\n!Socket methodsFor: 'registry' stamp: 'ar 3/21/98 17:41'!\\\\nunregister\\\\n\\\\t^self class unregister: self! !\\\\n\\\\n\\\\n!Socket methodsFor: 'sending' stamp: 'mir 5/15/2003 18:33'!\\\\nsendData: aStringOrByteArray\\\\n\\\\t\\\\\\\"Send all of the data in the given array, even if it requires multiple calls to send it all. Return the number of bytes sent.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"An experimental version use on slow lines: Longer timeout and smaller writes to try to avoid spurious timeouts.\\\\\\\"\\\\n\\\\n\\\\t| bytesSent bytesToSend count |\\\\n\\\\tbytesToSend _ aStringOrByteArray size.\\\\n\\\\tbytesSent _ 0.\\\\n\\\\t[bytesSent < bytesToSend] whileTrue: [\\\\n\\\\t\\\\t(self waitForSendDoneFor: 60)\\\\n\\\\t\\\\t\\\\tifFalse: [ConnectionTimedOut signal: 'send data timeout; data not sent'].\\\\n\\\\t\\\\tcount _ self primSocket: socketHandle\\\\n\\\\t\\\\t\\\\tsendData: aStringOrByteArray\\\\n\\\\t\\\\t\\\\tstartIndex: bytesSent + 1\\\\n\\\\t\\\\t\\\\tcount: (bytesToSend - bytesSent min: 5000).\\\\n\\\\t\\\\tbytesSent _ bytesSent + count].\\\\n\\\\n\\\\t^ bytesSent\\\\n! !\\\\n\\\\n!Socket methodsFor: 'sending' stamp: 'ar 7/20/1999 17:23'!\\\\nsendData: buffer count: n\\\\n\\\\t\\\\\\\"Send the amount of data from the given buffer\\\\\\\"\\\\n\\\\t| sent |\\\\n\\\\tsent _ 0.\\\\n\\\\t[sent < n] whileTrue:[\\\\n\\\\t\\\\tsent _ sent + (self sendSomeData: buffer startIndex: sent+1 count: (n-sent))].! !\\\\n\\\\n!Socket methodsFor: 'sending' stamp: 'ls 1/5/1999 15:05'!\\\\nsendSomeData: aStringOrByteArray\\\\n\\\\t\\\\\\\"Send as much of the given data as possible and answer the number of bytes actually sent.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: This operation may have to be repeated multiple times to send a large amount of data.\\\\\\\"\\\\n\\\\n\\\\t^ self\\\\n\\\\t\\\\tsendSomeData: aStringOrByteArray\\\\n\\\\t\\\\tstartIndex: 1\\\\n\\\\t\\\\tcount: aStringOrByteArray size! !\\\\n\\\\n!Socket methodsFor: 'sending' stamp: 'ls 3/3/1999 18:59'!\\\\nsendSomeData: aStringOrByteArray startIndex: startIndex\\\\n\\\\t\\\\\\\"Send as much of the given data as possible starting at the given index. Answer the number of bytes actually sent.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: This operation may have to be repeated multiple times to send a large amount of data.\\\\\\\"\\\\n\\\\n\\\\t^ self\\\\n\\\\t\\\\tsendSomeData: aStringOrByteArray\\\\n\\\\t\\\\tstartIndex: startIndex\\\\n\\\\t\\\\tcount: (aStringOrByteArray size - startIndex + 1)! !\\\\n\\\\n!Socket methodsFor: 'sending' stamp: 'mir 5/15/2003 18:34'!\\\\nsendSomeData: aStringOrByteArray startIndex: startIndex count: count\\\\n\\\\t\\\\\\\"Send up to count bytes of the given data starting at the given index. Answer the number of bytes actually sent.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: This operation may have to be repeated multiple times to send a large amount of data.\\\\\\\"\\\\n\\\\n\\\\t| bytesSent |\\\\n\\\\t(self waitForSendDoneFor: 20)\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\tbytesSent _ self primSocket: socketHandle\\\\n\\\\t\\\\t\\\\t\\\\tsendData: aStringOrByteArray\\\\n\\\\t\\\\t\\\\t\\\\tstartIndex: startIndex\\\\n\\\\t\\\\t\\\\t\\\\tcount: count]\\\\n\\\\t\\\\tifFalse: [ConnectionTimedOut signal: 'send data timeout; data not sent'].\\\\n\\\\t^ bytesSent\\\\n! !\\\\n\\\\n!Socket methodsFor: 'sending' stamp: 'mir 2/19/2002 18:33'!\\\\nsendStreamContents: stream\\\\n\\\\t\\\\\\\"Send the data in the stream. Close the stream.\\\\n\\\\tUsefull for directly sending contents of a file without reading into memory first.\\\\\\\"\\\\n\\\\n\\\\tself sendStreamContents: stream checkBlock: [true]! !\\\\n\\\\n!Socket methodsFor: 'sending' stamp: 'mir 2/19/2002 18:31'!\\\\nsendStreamContents: stream checkBlock: checkBlock\\\\n\\\\t\\\\\\\"Send the data in the stream. Close the stream after you are done. After each block of data evaluate checkBlock and abort if it returns false.\\\\n\\\\tUsefull for directly sending contents of a file without reading into memory first.\\\\\\\"\\\\n\\\\n\\\\t| chunkSize buffer |\\\\n\\\\tchunkSize _ 5000.\\\\n\\\\tbuffer _ ByteArray new: chunkSize.\\\\n\\\\tstream binary.\\\\n\\\\t[[stream atEnd and: [checkBlock value]]\\\\n\\\\t\\\\twhileFalse: [\\\\n\\\\t\\\\t\\\\tbuffer _ stream next: chunkSize into: buffer.\\\\n\\\\t\\\\t\\\\tself sendData: buffer]]\\\\n\\\\t\\\\tensure: [stream close]! !\\\\n\\\\n\\\\n!Socket methodsFor: 'waiting' stamp: 'mu 8/9/2003 15:17'!\\\\nwaitForAcceptFor: timeout\\\\n\\\\t\\\\\\\"Wait and accept an incoming connection. Return nil if it falis\\\\\\\"\\\\n\\\\t[self waitForConnectionFor: timeout] on: ConnectionTimedOut do: [:ex | ^nil].\\\\n\\\\t^self isConnected\\\\n\\\\t\\\\tifTrue:[self accept]\\\\n\\\\t\\\\t! !\\\\n\\\\n!Socket methodsFor: 'waiting' stamp: 'svp 7/27/2003 00:23'!\\\\nwaitForAcceptFor: timeout ifTimedOut: timeoutBlock\\\\n\\\\t\\\\\\\"Wait and accept an incoming connection\\\\\\\"\\\\n\\\\tself waitForConnectionFor: timeout ifTimedOut: [^timeoutBlock value].\\\\n\\\\t^self accept! !\\\\n\\\\n!Socket methodsFor: 'waiting' stamp: 'mu 8/19/2003 02:57'!\\\\nwaitForConnectionFor: timeout\\\\n\\\\t\\\\\\\"Wait up until the given deadline for a connection to be established. Return true if it is established by the deadline, false if not.\\\\\\\"\\\\n\\\\n\\\\t^self \\\\n\\\\t\\\\twaitForConnectionFor: timeout \\\\n\\\\t\\\\tifTimedOut: [ConnectionTimedOut signal: 'Failed to connect in ', timeout asString, ' seconds']\\\\n! !\\\\n\\\\n!Socket methodsFor: 'waiting' stamp: 'gk 12/15/2005 01:09'!\\\\nwaitForConnectionFor: timeout ifTimedOut: timeoutBlock\\\\n\\\\t\\\\\\\"Wait up until the given deadline for a connection to be established. Return true if it is established by the deadline, false if not.\\\\\\\"\\\\n\\\\n\\\\t| status deadline |\\\\n\\\\tdeadline := Socket deadlineSecs: timeout.\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\t[(status = WaitingForConnection) and: [Time millisecondClockValue < deadline]]\\\\n\\\\t\\\\twhileTrue: [\\\\n\\\\t\\\\t\\\\tsemaphore waitTimeoutMSecs: (deadline - Time millisecondClockValue).\\\\n\\\\t\\\\t\\\\tstatus _ self primSocketConnectionStatus: socketHandle].\\\\n\\\\n\\\\tstatus = Connected ifFalse: [^timeoutBlock value]\\\\n! !\\\\n\\\\n!Socket methodsFor: 'waiting' stamp: 'svp 9/23/2003 00:09'!\\\\nwaitForData\\\\n\\\\t\\\\\\\"Wait for data to arrive.  This method will block until\\\\n\\\\tdata is available or the socket is closed.  If the socket is closed\\\\n\\\\ta ConnectionClosed exception will be signaled.\\\\\\\"\\\\n\\\\n\\\\t^self waitForDataIfClosed:\\\\n\\\\t\\\\t[ConnectionClosed signal: 'Connection close while waiting for data.']! !\\\\n\\\\n!Socket methodsFor: 'waiting' stamp: 'svp 7/27/2003 00:18'!\\\\nwaitForDataFor: timeout\\\\n\\\\t\\\\\\\"Wait for the given nr of seconds for data to arrive.\\\\n\\\\tSignal a time out or connection close exception if either happens before data becomes available.\\\\\\\"\\\\n\\\\n\\\\t^self\\\\n\\\\t\\\\twaitForDataFor: timeout\\\\n\\\\t\\\\tifClosed: [ConnectionClosed signal: 'Connection closed while waiting for data.']\\\\n\\\\t\\\\tifTimedOut: [ConnectionTimedOut signal: 'Data receive timed out.']\\\\n! !\\\\n\\\\n!Socket methodsFor: 'waiting' stamp: 'svp 7/27/2003 00:16'!\\\\nwaitForDataFor: timeout ifClosed: closedBlock ifTimedOut: timedOutBlock\\\\n\\\\t\\\\\\\"Wait for the given nr of seconds for data to arrive.\\\\\\\"\\\\n\\\\n\\\\t| deadline |\\\\n\\\\tdeadline := Socket deadlineSecs: timeout.\\\\n\\\\n\\\\t[Time millisecondClockValue < deadline]\\\\n\\\\t\\\\twhileTrue: [\\\\n\\\\t\\\\t\\\\t(self primSocketReceiveDataAvailable: socketHandle)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [^self].\\\\n\\\\t\\\\t\\\\tself isConnected\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [^closedBlock value].\\\\n\\\\t\\\\t\\\\tself readSemaphore waitTimeoutMSecs: (deadline - Time millisecondClockValue)].\\\\n\\\\n\\\\t(self primSocketReceiveDataAvailable: socketHandle)\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\tself isConnected\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [^timedOutBlock value]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [^closedBlock value]]! !\\\\n\\\\n!Socket methodsFor: 'waiting' stamp: 'svp 9/23/2003 00:08'!\\\\nwaitForDataIfClosed: closedBlock\\\\n\\\\t\\\\\\\"Wait indefinitely for data to arrive.  This method will block until\\\\n\\\\tdata is available or the socket is closed.\\\\\\\"\\\\n\\\\n\\\\t[true]\\\\n\\\\t\\\\twhileTrue: [\\\\n\\\\t\\\\t\\\\t(self primSocketReceiveDataAvailable: socketHandle)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [^self].\\\\n\\\\t\\\\t\\\\tself isConnected\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [^closedBlock value].\\\\n\\\\t\\\\t\\\\tself readSemaphore wait].\\\\n! !\\\\n\\\\n!Socket methodsFor: 'waiting' stamp: 'gk 12/14/2005 09:59'!\\\\nwaitForDisconnectionFor: timeout\\\\n\\\\t\\\\\\\"Wait for the given nr of seconds for the connection to be broken.\\\\n\\\\tReturn true if it is broken by the deadline, false if not.\\\\n\\\\tThe client should know the connection is really going to be closed\\\\n\\\\t(e.g., because he has called 'close' to send a close request to the other end)\\\\n\\\\tbefore calling this method.\\\\\\\"\\\\n\\\\n\\\\t| status deadline |\\\\n\\\\tstatus _ self primSocketConnectionStatus: socketHandle.\\\\n\\\\tdeadline := Socket deadlineSecs: timeout.\\\\n\\\\t[((status == Connected) or: [(status == ThisEndClosed)]) and:\\\\n\\\\t [Time millisecondClockValue < deadline]] whileTrue: [\\\\n\\\\t\\\\tself discardReceivedData.\\\\n\\\\t\\\\tself readSemaphore waitTimeoutMSecs: (deadline - Time millisecondClockValue).\\\\n\\\\t\\\\tstatus _ self primSocketConnectionStatus: socketHandle].\\\\n\\\\n\\\\t^ status ~= Connected\\\\n! !\\\\n\\\\n!Socket methodsFor: 'waiting' stamp: 'mir 5/15/2003 18:33'!\\\\nwaitForSendDoneFor: timeout\\\\n\\\\t\\\\\\\"Wait up until the given deadline for the current send operation to complete. Return true if it completes by the deadline, false if not.\\\\\\\"\\\\n\\\\n\\\\t| sendDone deadline |\\\\n\\\\tdeadline := Socket deadlineSecs: timeout.\\\\n\\\\t[self isConnected & (sendDone _ self primSocketSendDone: socketHandle) not\\\\n\\\\t\\\\t\\\\t\\\\\\\"Connection end and final data can happen fast, so test in this order\\\\\\\"\\\\n\\\\t\\\\tand: [Time millisecondClockValue < deadline]] whileTrue: [\\\\n\\\\t\\\\t\\\\tself writeSemaphore waitTimeoutMSecs: (deadline - Time millisecondClockValue)].\\\\n\\\\n\\\\t^ sendDone! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSocket class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!Socket class methodsFor: 'class initialization' stamp: 'ar 12/12/2001 19:12'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Socket initialize\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Socket Types\\\\\\\"\\\\n\\\\tTCPSocketType _ 0.\\\\n\\\\tUDPSocketType _ 1.\\\\n\\\\n\\\\t\\\\\\\"Socket Status Values\\\\\\\"\\\\n\\\\tInvalidSocket _ -1.\\\\n\\\\tUnconnected _ 0.\\\\n\\\\tWaitingForConnection _ 1.\\\\n\\\\tConnected _ 2.\\\\n\\\\tOtherEndClosed _ 3.\\\\n\\\\tThisEndClosed _ 4.\\\\n\\\\n\\\\tRegistryThreshold _ 100. \\\\\\\"# of sockets\\\\\\\"! !\\\\n\\\\n\\\\n!Socket class methodsFor: 'instance creation' stamp: 'ls 9/24/1999 09:45'!\\\\nacceptFrom: aSocket\\\\n\\\\t^[ super new acceptFrom: aSocket ]\\\\n\\\\t\\\\trepeatWithGCIf: [ :sock | sock isValid not ]! !\\\\n\\\\n!Socket class methodsFor: 'instance creation' stamp: 'ar 4/30/1999 04:15'!\\\\ncreateIfFail: failBlock\\\\n\\\\t\\\\\\\"Attempt to create a new socket. If successful, return the new socket. Otherwise, return the result of evaluating the given block. Socket creation can fail if the network isn't available or if there are not sufficient resources available to create another socket.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: The default creates a TCP socket\\\\\\\"\\\\n\\\\t^self tcpCreateIfFail: failBlock! !\\\\n\\\\n!Socket class methodsFor: 'instance creation' stamp: 'ar 4/30/1999 04:13'!\\\\nnew\\\\n\\\\t\\\\\\\"Return a new, unconnected Socket. Note that since socket creation may fail, it is safer to use the method createIfFail: to handle such failures gracefully; this method is primarily for backward compatibility and may be disallowed in a future release.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: The default creates a TCP socket - this is also backward compatibility.\\\\\\\"\\\\n\\\\t^self newTCP! !\\\\n\\\\n!Socket class methodsFor: 'instance creation' stamp: 'mir 2/22/2002 15:48'!\\\\nnewTCP\\\\n\\\\t\\\\\\\"Create a socket and initialise it for TCP\\\\\\\"\\\\n\\\\tself initializeNetwork.\\\\n\\\\t^[ super new initialize: TCPSocketType ]\\\\n\\\\t\\\\trepeatWithGCIf: [ :socket | socket isValid not ]! !\\\\n\\\\n!Socket class methodsFor: 'instance creation' stamp: 'mir 2/22/2002 15:49'!\\\\nnewUDP\\\\n\\\\t\\\\\\\"Create a socket and initialise it for UDP\\\\\\\"\\\\n\\\\tself initializeNetwork.\\\\n\\\\t^[ super new initialize: UDPSocketType ]\\\\n\\\\t\\\\trepeatWithGCIf: [ :socket | socket isValid not ]! !\\\\n\\\\n!Socket class methodsFor: 'instance creation' stamp: 'mir 2/22/2002 15:49'!\\\\ntcpCreateIfFail: failBlock\\\\n\\\\t\\\\\\\"Attempt to create a new socket. If successful, return the new socket. Otherwise, return the result of evaluating the given block. Socket creation can fail if the network isn't available or if there are not sufficient resources available to create another socket.\\\\\\\"\\\\n\\\\n\\\\t| sock |\\\\n\\\\tself initializeNetwork.\\\\n\\\\tsock _ super new initialize: TCPSocketType.\\\\n\\\\tsock isValid ifFalse: [^ failBlock value].\\\\n\\\\t^ sock\\\\n! !\\\\n\\\\n!Socket class methodsFor: 'instance creation' stamp: 'mir 2/22/2002 15:49'!\\\\nudpCreateIfFail: failBlock\\\\n\\\\t\\\\\\\"Attempt to create a new socket. If successful, return the new socket. Otherwise, return the result of evaluating the given block. Socket creation can fail if the network isn't available or if there are not sufficient resources available to create another socket.\\\\\\\"\\\\n\\\\n\\\\t| sock |\\\\n\\\\tself initializeNetwork.\\\\n\\\\tsock _ super new initialize: UDPSocketType.\\\\n\\\\tsock isValid ifFalse: [^ failBlock value].\\\\n\\\\t^ sock\\\\n! !\\\\n\\\\n\\\\n!Socket class methodsFor: 'network initialization' stamp: 'mir 2/22/2002 15:01'!\\\\ninitializeNetwork\\\\n\\\\t\\\\\\\"Initialize the network drivers and the NetNameResolver. Do nothing if the network is already initialized.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: The network must be re-initialized every time Squeak starts up, so applications that persist across snapshots should be prepared to re-initialize the network as needed. Such applications should call 'Socket initializeNetwork' before every network transaction. \\\\\\\"\\\\n\\\\n\\\\tNetNameResolver initializeNetwork! !\\\\n\\\\n!Socket class methodsFor: 'network initialization' stamp: 'mir 2/22/2002 14:59'!\\\\nprimInitializeNetwork: resolverSemaIndex\\\\n\\\\t\\\\\\\"Initialize the network drivers on platforms that need it, such as the Macintosh, and return nil if network initialization failed or the reciever if it succeeds. Since mobile computers may not always be connected to a network, this method should NOT be called automatically at startup time; rather, it should be called when first starting a networking application. It is a noop if the network driver has already been initialized. If non-zero, resolverSemaIndex is the index of a VM semaphore to be associated with the network name resolver. This semaphore will be signalled when the resolver status changes, such as when a name lookup query is completed.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: some platforms (e.g., Mac) only allow only one name lookup query at a time, so a manager process should be used to serialize resolver lookup requests.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveInitializeNetwork' module: 'SocketPlugin'>\\\\n\\\\t^ nil  \\\\\\\"return nil if primitive fails\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!Socket class methodsFor: 'registry' stamp: 'ar 10/7/1998 14:40'!\\\\nregister: anObject\\\\n\\\\tWeakArray isFinalizationSupported ifFalse:[^anObject].\\\\n\\\\tself registry add: anObject! !\\\\n\\\\n!Socket class methodsFor: 'registry' stamp: 'ar 10/7/1998 14:40'!\\\\nregistry\\\\n\\\\tWeakArray isFinalizationSupported ifFalse:[^nil].\\\\n\\\\t^Registry isNil\\\\n\\\\t\\\\tifTrue:[Registry := WeakRegistry new]\\\\n\\\\t\\\\tifFalse:[Registry].! !\\\\n\\\\n!Socket class methodsFor: 'registry' stamp: 'ar 12/12/2001 19:12'!\\\\nregistryThreshold\\\\n\\\\t\\\\\\\"Return the registry threshold above which socket creation may fail due to too many already open sockets. If the threshold is reached, a full GC will be issued if the creation of a socket fails.\\\\\\\"\\\\n\\\\t^RegistryThreshold! !\\\\n\\\\n!Socket class methodsFor: 'registry' stamp: 'ar 12/12/2001 19:12'!\\\\nregistryThreshold: aNumber\\\\n\\\\t\\\\\\\"Return the registry threshold above which socket creation may fail due to too many already open sockets. If the threshold is reached, a full GC will be issued if the creation of a socket fails.\\\\\\\"\\\\n\\\\tRegistryThreshold _ aNumber! !\\\\n\\\\n!Socket class methodsFor: 'registry' stamp: 'ar 10/7/1998 15:22'!\\\\nunregister: anObject\\\\n\\\\tWeakArray isFinalizationSupported ifFalse:[^anObject].\\\\n\\\\tself registry remove: anObject ifAbsent:[]! !\\\\n\\\\n\\\\n!Socket class methodsFor: 'utilities' stamp: 'tk 4/9/98 15:54'!\\\\ndeadServer\\\\n\\\\n\\\\t^ DeadServer! !\\\\n\\\\n!Socket class methodsFor: 'utilities' stamp: 'tk 4/9/98 15:56'!\\\\ndeadServer: aStringOrNil\\\\n\\\\t\\\\\\\"Keep the machine name of the most recently encoutered non-responding machine.  Next time the user can move it to the last in a list of servers to try.\\\\\\\"\\\\n\\\\n\\\\tDeadServer _ aStringOrNil! !\\\\n\\\\n!Socket class methodsFor: 'utilities' stamp: 'mir 5/15/2003 18:28'!\\\\ndeadlineSecs: secs\\\\n\\\\t\\\\\\\"Return a deadline time the given number of seconds from now.\\\\\\\"\\\\n\\\\n\\\\t^ Time millisecondClockValue + (secs * 1000) truncated\\\\n! !\\\\n\\\\n!Socket class methodsFor: 'utilities' stamp: 'jm 1/14/1999 12:13'!\\\\nnameForWellKnownTCPPort: portNum\\\\n\\\\t\\\\\\\"Answer the name for the given well-known TCP port number. Answer a string containing the port number if it isn't well-known.\\\\\\\"\\\\n\\\\n\\\\t| portList entry |\\\\n\\\\tportList _ #(\\\\n\\\\t\\\\t(7 'echo') (9 'discard') (13 'time') (19 'characterGenerator')\\\\n\\\\t\\\\t(21 'ftp') (23 'telnet') (25 'smtp')\\\\n\\\\t\\\\t(80 'http') (110 'pop3') (119 'nntp')).\\\\n\\\\tentry _ portList detect: [:pair | pair first = portNum] ifNone: [^ 'port-', portNum printString].\\\\n\\\\t^ entry last\\\\n! !\\\\n\\\\n!Socket class methodsFor: 'utilities' stamp: 'mir 5/15/2003 18:30'!\\\\nping: hostName\\\\n\\\\t\\\\\\\"Ping the given host. Useful for checking network connectivity. The host must be running a TCP echo server.\\\\\\\"\\\\n\\\\t\\\\\\\"Socket ping: 'squeak.cs.uiuc.edu'\\\\\\\"\\\\n\\\\n\\\\t| tcpPort sock serverAddr startTime echoTime |\\\\n\\\\ttcpPort _ 7.  \\\\\\\"7 = echo port, 13 = time port, 19 = character generator port\\\\\\\"\\\\n\\\\n\\\\tserverAddr _ NetNameResolver addressForName: hostName timeout: 10.\\\\n\\\\tserverAddr = nil ifTrue: [\\\\n\\\\t\\\\t^ self inform: 'Could not find an address for ', hostName].\\\\n\\\\n\\\\tsock _ Socket new.\\\\n\\\\tsock connectNonBlockingTo: serverAddr port: tcpPort.\\\\n\\\\t[sock waitForConnectionFor: 10]\\\\n\\\\t\\\\ton: ConnectionTimedOut\\\\n\\\\t\\\\tdo: [:ex |\\\\n\\\\t\\\\t\\\\t(self confirm: 'Continue to wait for connection to ', hostName, '?')\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [ex retry]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsock destroy.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ self]].\\\\n\\\\n\\\\tsock sendData: 'echo!!'.\\\\n\\\\tstartTime _ Time millisecondClockValue.\\\\n\\\\t[sock waitForDataFor: 15]\\\\n\\\\t\\\\ton: ConnectionTimedOut\\\\n\\\\t\\\\tdo: [:ex | (self confirm: 'Packet sent but no echo yet; keep waiting?')\\\\n\\\\t\\\\t\\\\tifTrue: [ex retry]].\\\\n\\\\techoTime _ Time millisecondClockValue - startTime.\\\\n\\\\n\\\\tsock destroy.\\\\n\\\\tself inform: hostName, ' responded in ', echoTime printString, ' milliseconds'.\\\\n! !\\\\n\\\\n!Socket class methodsFor: 'utilities' stamp: 'mir 2/22/2002 15:49'!\\\\npingPorts: portList on: hostName timeOutSecs: timeOutSecs\\\\n\\\\t\\\\\\\"Attempt to connect to each of the given sockets on the given host. Wait at most timeOutSecs for the connections to be established. Answer an array of strings indicating the available ports.\\\\\\\"\\\\n\\\\t\\\\\\\"Socket pingPorts: #(7 13 19 21 23 25 80 110 119) on: 'squeak.cs.uiuc.edu' timeOutSecs: 15\\\\\\\"\\\\n\\\\n\\\\t| serverAddr sockets sock deadline done unconnectedCount connectedCount waitingCount result |\\\\n\\\\tserverAddr _ NetNameResolver addressForName: hostName timeout: 10.\\\\n\\\\tserverAddr = nil ifTrue: [\\\\n\\\\t\\\\tself inform: 'Could not find an address for ', hostName.\\\\n\\\\t\\\\t^ #()].\\\\n\\\\n\\\\tsockets _ portList collect: [:portNum |\\\\n\\\\t\\\\tsock _ Socket new.\\\\n\\\\t\\\\tsock connectTo: serverAddr port: portNum].\\\\n\\\\n\\\\tdeadline _ self deadlineSecs: timeOutSecs.\\\\n\\\\tdone _ false.\\\\n\\\\t[done] whileFalse: [\\\\n\\\\t\\\\tunconnectedCount _ 0.\\\\n\\\\t\\\\tconnectedCount _ 0.\\\\n\\\\t\\\\twaitingCount _ 0.\\\\n\\\\t\\\\tsockets do: [:s |\\\\n\\\\t\\\\t\\\\ts isUnconnectedOrInvalid\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [unconnectedCount _ unconnectedCount + 1]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ts isConnected ifTrue: [connectedCount _ connectedCount + 1].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ts isWaitingForConnection ifTrue: [waitingCount _ waitingCount + 1]]].\\\\n\\\\t\\\\twaitingCount = 0 ifTrue: [done _ true].\\\\n\\\\t\\\\tconnectedCount = sockets size ifTrue: [done _ true].\\\\n\\\\t\\\\tTime millisecondClockValue > deadline ifTrue: [done _ true]].\\\\n\\\\n\\\\tresult _ (sockets select: [:s | s isConnected])\\\\n\\\\t\\\\tcollect: [:s | self nameForWellKnownTCPPort: s remotePort].\\\\n\\\\tsockets do: [:s | s destroy].\\\\n\\\\t^ result\\\\n! !\\\\n\\\\n!Socket class methodsFor: 'utilities' stamp: 'jm 1/14/1999 17:25'!\\\\npingPortsOn: hostName\\\\n\\\\t\\\\\\\"Attempt to connect to a set of well-known sockets on the given host, and answer the names of the available ports.\\\\\\\"\\\\n\\\\t\\\\\\\"Socket pingPortsOn: 'www.disney.com'\\\\\\\"\\\\n\\\\n\\\\t^ Socket\\\\n\\\\t\\\\tpingPorts: #(7 13 19 21 23 25 80 110 119)\\\\n\\\\t\\\\ton: hostName\\\\n\\\\t\\\\ttimeOutSecs: 20\\\\n! !\\\\n\\\\n!Socket class methodsFor: 'utilities' stamp: 'mir 5/15/2003 16:17'!\\\\nstandardDeadline\\\\n\\\\t\\\\\\\"Return a default deadline time some seconds into the future.\\\\\\\"\\\\n\\\\n\\\\t^ self deadlineSecs: self standardTimeout\\\\n! !\\\\n\\\\n!Socket class methodsFor: 'utilities' stamp: 'mir 5/15/2003 16:16'!\\\\nstandardTimeout\\\\n\\\\n\\\\t^45\\\\n! !\\\\n\\\\n!Socket class methodsFor: 'utilities' stamp: 'ar 4/30/1999 04:21'!\\\\nwildcardAddress\\\\n\\\\t\\\\\\\"Answer a don't-care address for use with UDP sockets.\\\\\\\"\\\\n\\\\n\\\\t^ByteArray new: 4\\\\t\\\\t\\\\\\\"0.0.0.0\\\\\\\"! !\\\\n\\\\n!Socket class methodsFor: 'utilities' stamp: 'ar 4/30/1999 04:21'!\\\\nwildcardPort\\\\n\\\\t\\\\\\\"Answer a don't-care port for use with UDP sockets.  (The system will allocate an\\\\n\\\\tunused port number to the socket.)\\\\\\\"\\\\n\\\\n\\\\t^0! !\\\\n\\\\n\\\\n!Socket class methodsFor: 'tests' stamp: 'gk 12/15/2005 01:18'!\\\\nloopbackTest\\\\n\\\\t\\\\\\\"Send data from one socket to another on the local machine.\\\\n\\\\tTests most of the socket primitives.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"100 timesRepeat: [Socket loopbackTest]\\\\\\\"\\\\n\\\\n\\\\t| sock1 sock2 bytesToSend sendBuf receiveBuf done bytesSent bytesReceived t extraBytes packetsSent packetsRead |\\\\n\\\\tTranscript\\\\n\\\\t\\\\tcr;\\\\n\\\\t\\\\tshow: 'starting loopback test';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: '---------- Connecting ----------';\\\\n\\\\t\\\\tcr.\\\\n\\\\tself initializeNetwork.\\\\n\\\\tsock1 := self new.\\\\n\\\\tsock2 := self new.\\\\n\\\\tsock1 listenOn: 54321.\\\\n\\\\tsock2 connectTo: NetNameResolver localHostAddress port: 54321.\\\\n\\\\tsock1 waitForConnectionFor: self standardTimeout.\\\\n\\\\tsock2 waitForConnectionFor: self standardTimeout.\\\\n\\\\tsock1 isConnected ifFalse: [self error: 'sock1 not connected'].\\\\n\\\\tsock2 isConnected ifFalse: [self error: 'sock2 not connected'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'connection established';\\\\n\\\\t\\\\tcr.\\\\n\\\\tbytesToSend := 5000000.\\\\n\\\\tsendBuf := String new: 5000 withAll: $x.\\\\n\\\\treceiveBuf := String new: 50000.\\\\n\\\\tdone := false.\\\\n\\\\tpacketsSent := packetsRead := bytesSent := bytesReceived := 0.\\\\n\\\\tt := Time millisecondsToRun: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[[done] whileFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[(sock1 sendDone and: [bytesSent < bytesToSend]) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[packetsSent := packetsSent + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbytesSent := bytesSent + (sock1 sendSomeData: sendBuf)].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsock2 dataAvailable \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[packetsRead := packetsRead + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbytesReceived := bytesReceived + (sock2 receiveDataInto: receiveBuf)].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdone := bytesSent >= bytesToSend and: [bytesReceived = bytesSent]]].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'closing connection';\\\\n\\\\t\\\\tcr.\\\\n\\\\tsock1 waitForSendDoneFor: self standardTimeout.\\\\n\\\\tsock1 close.\\\\n\\\\tsock2 waitForDisconnectionFor: self standardTimeout.\\\\n\\\\textraBytes := sock2 discardReceivedData.\\\\n\\\\textraBytes > 0 \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[Transcript\\\\n\\\\t\\\\t\\\\t\\\\tshow: ' *** received ' , extraBytes size printString , ' extra bytes ***';\\\\n\\\\t\\\\t\\\\t\\\\tcr].\\\\n\\\\tsock2 close.\\\\n\\\\tsock1 waitForDisconnectionFor: self standardTimeout.\\\\n\\\\tsock1 isUnconnectedOrInvalid ifFalse: [self error: 'sock1 not closed'].\\\\n\\\\tsock2 isUnconnectedOrInvalid ifFalse: [self error: 'sock2 not closed'].\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: '---------- Connection Closed ----------';\\\\n\\\\t\\\\tcr.\\\\n\\\\tsock1 destroy.\\\\n\\\\tsock2 destroy.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: 'loopback test done; time = ' , t printString;\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript\\\\n\\\\t\\\\tshow: (bytesToSend asFloat / t roundTo: 0.01) printString \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t, '* 1000 bytes/sec';\\\\n\\\\t\\\\tcr.\\\\n\\\\tTranscript endEntry! !\\\\n\\\\n!Socket class methodsFor: 'tests' stamp: 'gk 12/15/2005 01:03'!\\\\nnewAcceptCheck\\\\n\\\\t\\\\\\\"Check if the platform has support for the BSD style accept().\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Socket newAcceptCheck\\\\\\\"\\\\n\\\\t\\\\n\\\\t| socket |\\\\n\\\\tself initializeNetwork.\\\\n\\\\tsocket _ self newTCP.\\\\n\\\\tsocket listenOn: 44444 backlogSize: 4.\\\\n\\\\tsocket isValid ifTrue: [\\\\n\\\\t\\\\tself inform: 'Everything looks OK for the BSD style accept()'\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tself inform: 'It appears that you DO NOT have support for the BSD style accept()'].\\\\n\\\\tsocket destroy! !\\\\n\\\\n!Socket class methodsFor: 'tests' stamp: 'gk 12/15/2005 01:10'!\\\\nsendTest\\\\n\\\\t\\\\\\\"Send data to the 'discard' socket of the given host.\\\\n\\\\tTests the speed of one-way data transfers across the\\\\n\\\\tnetwork to the given host. Note that most hosts\\\\n\\\\tdo not run a discard server.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Socket sendTest\\\\\\\"\\\\n\\\\n\\\\t| sock bytesToSend sendBuf bytesSent t serverName serverAddr |\\\\n\\\\tTranscript cr; show: 'starting send test'; cr.\\\\n\\\\tself initializeNetwork.\\\\n\\\\tserverName := UIManager default request: 'What is the destination server?' initialAnswer: 'create.ucsb.edu'.\\\\n\\\\tserverAddr := NetNameResolver addressForName: serverName timeout: 10.\\\\n\\\\tserverAddr = nil \\\\n\\\\t\\\\tifTrue: [^self inform: 'Could not find an address for ' , serverName].\\\\n\\\\tsock := self new.\\\\n\\\\tTranscript show: '---------- Connecting ----------';cr.\\\\n\\\\tsock connectTo: serverAddr port: 9.\\\\n\\\\tsock isConnected ifFalse: [\\\\n\\\\t\\\\tsock destroy.\\\\n\\\\t\\\\t^self inform: 'could not connect'].\\\\n\\\\tTranscript show: 'connection established; sending data'; cr.\\\\n\\\\tbytesToSend := 1000000.\\\\n\\\\tsendBuf := String new: 64 * 1024 withAll: $x.\\\\n\\\\tbytesSent := 0.\\\\n\\\\tt := Time millisecondsToRun: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[[bytesSent < bytesToSend] whileTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[sock sendDone \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [bytesSent := bytesSent + (sock sendSomeData: sendBuf)]]].\\\\n\\\\tsock waitForSendDoneFor: self standardTimeout.\\\\n\\\\tsock destroy.\\\\n\\\\tTranscript show: '---------- Connection Closed ----------'; cr;\\\\n\\\\t\\\\tshow: 'send test done; time = ' , t printString; cr;\\\\n\\\\t\\\\tshow: (bytesToSend asFloat / t roundTo: 0.01) printString, ' * 1000 bytes/sec';cr;endEntry! !\\\\nObject subclass: #SocketStream\\\\n\\\\tinstanceVariableNames: 'recentlyRead socket inBuffer outBuffer inNextToWrite outNextToWrite lastRead timeout autoFlush bufferSize binary shouldSignal'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Network-Kernel'!\\\\n!SocketStream commentStamp: 'md 7/14/2006 16:32' prior: 0!\\\\nSocketStream is a wrapper for class Socket making it easy to write networking code by giving the programmer a stream-like protocol. A Socket is a two way communication link with two logically separate channels - input and output. The Socket class is the lowest level in Squeak for network communication and using it directly can be difficult and bug prone.\\\\n\\\\nA SocketStream can be in binary or ascii mode, ascii is the default which means you are transmitting and receiving Strings. Most Internet protocols are in clear text ascii, like for example HTTP. Another setting is what timeout you want to use - default is the standardTimeout from Socket. More settings can be found in the method category 'configuration'.\\\\n\\\\nSimplest example of connecting, sending/receiving and closing:\\\\n\\\\n| stream result |\\\\nstream := SocketStream openConnectionToHostNamed: 'www.squeak.org' port: 80.\\\\n[[stream nextPutAll: 'GET / HTTP/1.0'; crlf; crlf; flush.\\\\nresult := stream upToEnd. \\\\\\\"Give us all data until the socket is closed.\\\\\\\"\\\\nTranscript show: result; cr.]\\\\n\\\\tensure: [stream close]]\\\\n\\\\t\\\\ton: ConnectionTimedOut\\\\n\\\\t\\\\tdo: [:ex | Transcript show: ex asString;cr. ex resume]\\\\n\\\\nThere are two important things to note above:\\\\n\\\\t- The methods in category \\\\\\\"stream in\\\\\\\" can signal two exceptions (unless turned off with #shouldSignal:):\\\\n\\\\t\\\\tConnectionClosed and ConnectionTimedOut\\\\n\\\\t- We close the stream using #ensure:, that is to make sure it isn't left opened.\\\\n\\\\t- We use #on:do: to catch any signal. In this case we do not need to catch ConnectionClosed since #upToEnd does that for us intrinsically.\\\\n\\\\n----------------\\\\nSocketStream (below called SS) is a reimplementation of 'Old'-SocketStream (below called OSS) - the class that originates from the original Comanche implementation but now is included in standard Squeak. SS has the same protocol as OSS and is meant to replace it. SS is faster, more flexible, is better documented and adds a few features:\\\\n\\\\n1. #shouldSignal:, which decides if SS should signal low level Socket exceptions (true) or if it should swallow them like original OSS did. Default is true. The only reason I added this is for backwards compatibility - not signalling causes problems - see bug 4 below.\\\\n\\\\n2. #nextAllInBuffer, #nextInBuffer:, #skip:, #receiveData:, #nextPutAllFlush: and #recentlyRead are new additions to the public protocol.\\\\n\\\\n\\\\nIt also fixes various bugs:\\\\n\\\\n1. #isDataAvailable could theoretically answer false, when there actually is some in the buffer in OSS. If #receiveDataIfAvailable reads the last byte then the following \\\\\\\"socket dataAvailable\\\\\\\" would answer false. So the last byte would be sitting in the inStream missed.\\\\n\\\\n2. #upToAll: in OSS has several problems, for example - #positionOfSubCollection:ifAbsent: which was introduced answers one position too low. This was compensated in upToAll:, but only in the pushBack: call, not the actual result being returned which was cut short 1 byte. Amusingly this makes KomHttpServer not use \\\\\\\"Keep-Alive\\\\\\\" since the last $e in 'Alive' was cut short. :)\\\\n\\\\n3. SS doesn't inherit from PositionableStream since that just breaks various inherited messages, like for example #skip:. OSS should IMHO be changed to inherit from Object - or of course, replaced in full with SS. :)\\\\n\\\\n4. Since SocketStream by default signals closes and timeouts the SocketStreamTest now passes. The reason for SocketStream to fail is that while it does timeout on a low level (#SocketStream>>receiveData doesn't hang forever) - the callers of #receiveData sometimes loop - like in #next:, and thus eliminates the timeout. SS warns about some methods (in their method comments) not honouring timeouts if shouldSignal is false, I really don't know what they should do in that case:\\\\n\\\\t#next:, #upTo:, #upToAll: and #upToEnd (and #receiveData:)\\\\n\\\\n\\\\nThe primary reason for the SS implementation is optimal performance. The main differences in implementation with the old OSS are:\\\\n\\\\n1. SS uses two buffers directly (inBuffer and outBuffer) with pointers marking start and stop within the buffer. OSS instead uses two regular streams, a ReadStream and a WriteStream. Using internal buffers makes it possible to avoid copying and reallocation in various ways, it also makes SS be able to have specialized growing/buffer moving behaviour.\\\\n\\\\n2. #upTo:, #upToAll: and #peekForAll: uses selectged String messages that in turn uses fast primitives for searching. OSS used other messages that fell back on byte per byte reading.\\\\n\\\\n3. #receiveData in OSS creates a temporary buffer stream for each call!! During a long read operation, like say #upToAll: (which for example is used when uploading files using HTTP POST forms), this is devastating - especially since the default size is only 2000 bytes - and leads to a very high number of low level read operations on the Socket, typically 100 times more calls than with OSS. The buffer in OSS is held in an instvar (not recreated for each call), is larger from the start and above all - grows dynamically by doubling. OSS can also avoid a grow/reallocation by doing a \\\\\\\"move down\\\\\\\" if data has been read from the SS as it comes in and through that making room in the lower part of the inBuffer. The net result is that upToAll: for large files is about 10 times faster.\\\\n\\\\n4. The implementation of upTo: and upToAll: tries to avoid doing unnecessary find operations in the buffer and is greedy by default, which means it favors reading more data - if available - before searching for the stop sequence. If we had #findString:startingAt:stoppingAt: this wouldn't have to be greedy and we wouldn't be needlessly scanning dead buffer area. VM hackers? Also, while you are at it - make it work for ByteArrays too. :)\\\\n\\\\n\\\\nSS can not be run unbuffered, since that seems unneeded. The option to autoFlush is still available, with it set to true SocketStream (just like OSS) will flush on its own on each nextPut:/nextPutAll:, otherwise flushing it will have to be done manually but is done on close.\\\\n\\\\nThe first performance tests shows that, as noted above, receiving large amounts of data using #upToAll: is greatly improved - factor of 10. Serving HTTP with small payloads seemed at first not be faster at all - but this is due to the high overhead of Socket connect/close and other things. Increasing payloads show a difference and especially with keep alive on - where the new SS roughly doubles the throughput!!!\\\\n\\\\n\\\\n!SocketStream methodsFor: 'configuration' stamp: 'gk 2/9/2005 22:37'!\\\\nascii\\\\n\\\\t\\\\\\\"Tell the SocketStream to send data\\\\n\\\\tas Strings instead of ByteArrays.\\\\n\\\\tThis is default.\\\\\\\"\\\\n\\\\n\\\\tbinary := false.\\\\n\\\\tself resetBuffers! !\\\\n\\\\n!SocketStream methodsFor: 'configuration' stamp: 'gk 2/9/2005 22:26'!\\\\nautoFlush\\\\n\\\\t\\\\\\\"If autoFlush is enabled data will be sent through\\\\n\\\\tthe socket (flushed) when the bufferSize is reached\\\\n\\\\tor the SocketStream is closed. Otherwise the user\\\\n\\\\twill have to send #flush manually.\\\\n\\\\tClose will always flush. Default is false.\\\\\\\"\\\\n\\\\n\\\\t^autoFlush! !\\\\n\\\\n!SocketStream methodsFor: 'configuration' stamp: 'gk 2/9/2005 22:27'!\\\\nautoFlush: aBoolean\\\\n\\\\t\\\\\\\"If autoFlush is enabled data will be sent through\\\\n\\\\tthe socket (flushed) when the bufferSize is reached\\\\n\\\\tor the SocketStream is closed. Otherwise the user\\\\n\\\\twill have to send #flush manually.\\\\n\\\\tClose will always flush. Default is false.\\\\\\\"\\\\n\\\\n\\\\tautoFlush := aBoolean! !\\\\n\\\\n!SocketStream methodsFor: 'configuration' stamp: 'gk 2/9/2005 22:37'!\\\\nbinary\\\\n\\\\t\\\\\\\"Tell the SocketStream to send data\\\\n\\\\tas ByteArrays instead of Strings.\\\\n\\\\tDefault is ascii.\\\\\\\"\\\\n\\\\n\\\\tbinary := true.\\\\n\\\\tself resetBuffers! !\\\\n\\\\n!SocketStream methodsFor: 'configuration' stamp: 'gk 2/9/2005 22:28'!\\\\nbufferSize\\\\n\\\\t\\\\\\\"Default buffer size is 4kb.\\\\n\\\\tincreased from earlier 2000 bytes.\\\\\\\"\\\\n\\\\t\\\\n\\\\t^bufferSize! !\\\\n\\\\n!SocketStream methodsFor: 'configuration' stamp: 'gk 2/9/2005 22:28'!\\\\nbufferSize: anInt\\\\n\\\\t\\\\\\\"Default buffer size is 4kb.\\\\n\\\\tincreased from earlier 2000 bytes.\\\\\\\"\\\\n\\\\n\\\\tbufferSize := anInt! !\\\\n\\\\n!SocketStream methodsFor: 'configuration' stamp: 'gk 2/10/2005 17:58'!\\\\ninBufferSize\\\\n\\\\t\\\\\\\"Answers the current size of data in the inBuffer.\\\\\\\"\\\\n\\\\n\\\\t^inNextToWrite - lastRead - 1! !\\\\n\\\\n!SocketStream methodsFor: 'configuration' stamp: 'gk 2/10/2005 17:59'!\\\\nnoTimeout\\\\n\\\\t\\\\\\\"Do not use timeout.\\\\\\\"\\\\n\\\\n\\\\ttimeout := 0! !\\\\n\\\\n!SocketStream methodsFor: 'configuration' stamp: 'gk 2/10/2005 17:59'!\\\\noutBufferSize\\\\n\\\\t\\\\\\\"Answers the current size of data in the outBuffer.\\\\\\\"\\\\n\\\\n\\\\t^outNextToWrite - 1! !\\\\n\\\\n!SocketStream methodsFor: 'configuration' stamp: 'gk 2/10/2005 18:00'!\\\\nshouldSignal\\\\n\\\\t\\\\\\\"If shouldSignal is enabled the Socket Exceptions\\\\n\\\\tConnectionClosed and ConnectionTimedOut\\\\n\\\\twill not be swallowed. Default is true.\\\\n\\\\tFor more info, see #shouldSignal:\\\\\\\"\\\\n\\\\n\\\\t^shouldSignal! !\\\\n\\\\n!SocketStream methodsFor: 'configuration' stamp: 'gk 2/10/2005 18:03'!\\\\nshouldSignal: aBoolean\\\\n\\\\t\\\\\\\"If shouldSignal is enabled the Socket Exceptions\\\\n\\\\tConnectionClosed and ConnectionTimedOut will not be swallowed.\\\\n\\\\tDefault is true. And please - don't set it to false - it is better to\\\\n\\\\tuse an exception handler (see below)  and several methods\\\\n\\\\tin this class will not honour timeouts (says so in their method comments).\\\\n\\\\tAlso, it is quite hard to understand what for example #upToEnd\\\\n\\\\tshould return to indicate a timeout.\\\\n\\\\t\\\\n\\\\tWrap your use of SocketStream with a handler like:\\\\n\\\\t\\\\n\\\\t[stuff _ mySocketStream next: 10]\\\\n\\\\t\\\\ton: ConnectionClosed, ConnectionTimedOut\\\\n\\\\t\\\\tdo: [:ex |\\\\n\\\\t\\\\t\\\\tTranscript show: 'Oops!! Did not get my ten bytes!!;cr]\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\tshouldSignal := aBoolean! !\\\\n\\\\n!SocketStream methodsFor: 'configuration' stamp: 'gk 2/3/2005 20:35'!\\\\nsocket\\\\n\\\\t^socket! !\\\\n\\\\n!SocketStream methodsFor: 'configuration' stamp: 'gk 2/3/2005 20:35'!\\\\nsocket: aSocket\\\\n\\\\tsocket _ aSocket! !\\\\n\\\\n!SocketStream methodsFor: 'configuration' stamp: 'gk 2/7/2005 08:41'!\\\\ntimeout\\\\n\\\\t\\\\\\\"Lazily initialized unless it has been set explicitly.\\\\\\\"\\\\n\\\\n\\\\ttimeout ifNil: [timeout := Socket standardTimeout].\\\\n\\\\t^timeout! !\\\\n\\\\n!SocketStream methodsFor: 'configuration' stamp: 'gk 2/3/2005 20:35'!\\\\ntimeout: seconds\\\\n\\\\ttimeout := seconds! !\\\\n\\\\n\\\\n!SocketStream methodsFor: 'control' stamp: 'gk 2/24/2005 11:55'!\\\\nclose\\\\n\\\\t\\\\\\\"Flush any data still not sent\\\\n\\\\tand take care of the socket.\\\\\\\"\\\\n\\\\n\\\\tself flush.\\\\n\\\\tsocket closeAndDestroy: 30! !\\\\n\\\\n!SocketStream methodsFor: 'control' stamp: 'gk 9/9/2005 09:33'!\\\\nflush\\\\n\\\\t\\\\\\\"If the other end is connected and we have something\\\\n\\\\tto send, then we send it and reset the outBuffer.\\\\\\\"\\\\n\\\\n\\\\t((outNextToWrite > 1) and: [socket isOtherEndClosed not])\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t[socket sendData: outBuffer count: outNextToWrite - 1]\\\\n\\\\t\\\\t\\\\t\\\\ton: ConnectionTimedOut\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:ex | shouldSignal ifFalse: [\\\\\\\"swallow\\\\\\\"]].\\\\n\\\\t\\\\t\\\\toutNextToWrite _ 1]! !\\\\n\\\\n!SocketStream methodsFor: 'control' stamp: 'gk 4/14/2005 09:49'!\\\\nreceiveData: nBytes\\\\n\\\\t\\\\\\\"Keep reading the socket until we have nBytes\\\\n\\\\tin the inBuffer or we reach the end. This method\\\\n\\\\tdoes not return data, but can be used to make sure\\\\n\\\\tdata has been read into the buffer from the Socket\\\\n\\\\tbefore actually reading it from the FastSocketStream.\\\\n\\\\tMainly used internally. We could also adjust the buffer\\\\n\\\\tto the expected amount of data and avoiding several\\\\n\\\\tincremental grow operations.\\\\n\\\\n\\\\tNOTE: This method doesn't honor timeouts if shouldSignal\\\\n\\\\tis false!! And frankly, I am not sure how to handle that\\\\n\\\\tcase or if I care - I think we should always signal.\\\\\\\"\\\\n\\\\n\\\\t[self atEnd not and: [nBytes > self inBufferSize]]\\\\n\\\\t\\\\twhileTrue: [self receiveData]! !\\\\n\\\\n!SocketStream methodsFor: 'control' stamp: 'gk 2/9/2005 23:08'!\\\\nrecentlyRead\\\\n\\\\t\\\\\\\"Return the number of bytes read\\\\n\\\\tduring the last socket operation.\\\\\\\"\\\\n\\\\t\\\\n\\\\t^recentlyRead! !\\\\n\\\\n\\\\n!SocketStream methodsFor: 'initialize-release' stamp: 'gk 2/25/2005 14:20'!\\\\ninitialize\\\\n\\\\tautoFlush _ true.\\\\n\\\\tshouldSignal _ true.\\\\n\\\\trecentlyRead _ 0.\\\\n\\\\tbufferSize _ 4096.\\\\n\\\\tself ascii! !\\\\n\\\\n\\\\n!SocketStream methodsFor: 'printing' stamp: 'gk 2/25/2005 14:19'!\\\\ndebug\\\\n\\\\t\\\\\\\"Display debug info.\\\\\\\"\\\\n\\\\n\\\\t| data |\\\\n\\\\tdata _ self inBufferSize.\\\\n\\\\t^String streamContents: [:s |\\\\n\\\\t\\\\ts\\\\n\\\\t\\\\t\\\\tnextPutAll: 'Buffer size: ', inBuffer size asString;cr;\\\\n\\\\t\\\\t\\\\tnextPutAll: 'InBuffer data size: ', data asString; cr;\\\\n\\\\t\\\\t\\\\tnextPutAll: 'In data (20):', (inBuffer copyFrom: lastRead + 1 to: lastRead + (data min: 20)); cr;\\\\n\\\\t\\\\t\\\\tnextPutAll: 'OutBuffer data size: ', (outNextToWrite - 1) asString; cr;\\\\n\\\\t\\\\t\\\\tnextPutAll: 'Out data (20):', (outBuffer copyFrom: 1 to: ((outNextToWrite - 1) min: 20)); cr]! !\\\\n\\\\n!SocketStream methodsFor: 'printing' stamp: 'md 7/14/2006 12:28'!\\\\nprint: anObject\\\\n\\\\tanObject printOn: self! !\\\\n\\\\n!SocketStream methodsFor: 'printing' stamp: 'gk 2/10/2005 11:44'!\\\\nprintOn: aStream\\\\n\\\\t\\\\\\\"Display buffer sizes.\\\\\\\"\\\\n\\\\n\\\\taStream nextPutAll: self class name.\\\\n\\\\tinBuffer ifNotNil: [\\\\n\\\\t\\\\taStream nextPutAll: '[inbuf:',\\\\n\\\\t\\\\t(inBuffer size / 1024) rounded asString, 'kb/outbuf:',\\\\n\\\\t\\\\t(outBuffer size / 1024) rounded asString, 'kb]']! !\\\\n\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 2/7/2005 13:33'!\\\\nnext\\\\n\\\\t\\\\\\\"Return next byte, if inBuffer is empty\\\\n\\\\twe recieve some more data and try again.\\\\\\\"\\\\n\\\\n\\\\tself atEnd ifTrue: [^nil].\\\\n\\\\tself isInBufferEmpty ifTrue:\\\\n\\\\t\\\\t[self receiveData.\\\\n\\\\t\\\\tself atEnd ifTrue: [^nil]].\\\\n\\\\tlastRead _ lastRead + 1.\\\\n\\\\t^inBuffer at: lastRead! !\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 2/7/2005 21:26'!\\\\nnextAllInBuffer\\\\n\\\\t\\\\\\\"Return all data currently in the inBuffer,\\\\\\\"\\\\n\\\\n\\\\t^self nextInBuffer: inNextToWrite - lastRead - 1! !\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 2/7/2005 12:51'!\\\\nnextInBuffer: anInteger\\\\n\\\\t\\\\\\\"Answer anInteger bytes of data at most,\\\\n\\\\tbut only from the inBuffer.\\\\\\\"\\\\n\\\\n\\\\t| start amount |\\\\n\\\\tamount _ anInteger min: (inNextToWrite - lastRead - 1).\\\\n\\\\tstart _ lastRead + 1.\\\\n\\\\tlastRead _ lastRead + amount.\\\\n\\\\t^inBuffer copyFrom: start to: lastRead! !\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 2/15/2005 14:17'!\\\\nnext: anInteger\\\\n\\\\t\\\\\\\"Answer anInteger bytes of data.\\\\n\\\\n\\\\tNOTE: This method doesn't honor timeouts if shouldSignal is false!!\\\\\\\"\\\\n\\\\n\\\\t| start |\\\\n\\\\tself receiveData: anInteger.\\\\n\\\\tstart _ lastRead + 1.\\\\n\\\\tlastRead _ (lastRead + anInteger) min: inNextToWrite - 1.\\\\n\\\\t^inBuffer copyFrom: start to: lastRead! !\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 2/7/2005 13:47'!\\\\nnextAvailable\\\\n\\\\t\\\\\\\"Answer all the data currently available,\\\\n\\\\tin buffer or in socket.\\\\\\\"\\\\n\\\\n\\\\tself isInBufferEmpty ifFalse: [^self nextAllInBuffer].\\\\n\\\\tself isDataAvailable ifTrue: [self receiveData].\\\\n\\\\t^self nextAllInBuffer! !\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 2/7/2005 13:02'!\\\\nnextAvailable: howMany\\\\n\\\\t\\\\\\\"Answer all the data currently available,\\\\n\\\\tin buffer or in socket - but limited to <howMany>.\\\\\\\"\\\\n\\\\n\\\\tself isInBufferEmpty ifFalse: [^self nextInBuffer: howMany].\\\\n\\\\tself isDataAvailable ifTrue: [self receiveData].\\\\n\\\\t^self nextInBuffer: howMany! !\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 2/3/2005 20:35'!\\\\nnextLine\\\\n\\\\t^self nextLineCrLf! !\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 2/24/2005 12:01'!\\\\nnextLineCrLf\\\\n\\\\t^self upToAll: String crlf! !\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 2/15/2005 14:16'!\\\\nnextLineLf\\\\n\\\\t| nextLine |\\\\n\\\\tnextLine := self upToAll: String lf.\\\\n\\\\t^nextLine! !\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 2/15/2005 14:09'!\\\\npeek\\\\n\\\\t\\\\\\\"Return next byte, if inBuffer is empty\\\\n\\\\twe recieve some more data and try again.\\\\n\\\\tDo not consume the byte.\\\\\\\"\\\\n\\\\n\\\\tself atEnd ifTrue: [^nil].\\\\n\\\\tself isInBufferEmpty ifTrue:\\\\n\\\\t\\\\t[self receiveData.\\\\n\\\\t\\\\tself atEnd ifTrue: [^nil]].\\\\n\\\\t^inBuffer at: lastRead! !\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 2/7/2005 14:04'!\\\\npeekFor: aCharacterOrByte\\\\n\\\\t\\\\\\\"Read and return next character or byte\\\\n\\\\tif it is equal to the argument.\\\\n\\\\tOtherwise return false.\\\\\\\"\\\\n\\\\n\\\\t| nextObject |\\\\n\\\\tself atEnd ifTrue: [^false].\\\\n\\\\tself isInBufferEmpty ifTrue: \\\\n\\\\t\\\\t[self receiveData.\\\\n\\\\t\\\\tself atEnd ifTrue: [^false]].\\\\n\\\\tnextObject _ inBuffer at: lastRead.\\\\n\\\\tnextObject = aCharacterOrByte ifTrue: [\\\\n\\\\t\\\\tlastRead _ lastRead + 1.\\\\n\\\\t\\\\t^true].\\\\n\\\\t^false\\\\n! !\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 2/15/2005 14:16'!\\\\npeekForAll: aString\\\\n\\\\t\\\\\\\"Answer whether or not the next string of characters in the receiver\\\\n\\\\tmatches aString. If a match is made, advance over that string in the receiver and\\\\n\\\\tanswer true. If no match, then leave the receiver alone and answer false.\\\\n\\\\tWe use findString:startingAt: to avoid copying.\\\\n\\\\n\\\\tNOTE: This method doesn't honor timeouts if shouldSignal is false!!\\\\\\\"\\\\n\\\\n\\\\t| sz start |\\\\n\\\\tsz _ aString size.\\\\n\\\\tself receiveData: sz.\\\\n\\\\t(inNextToWrite - lastRead - 1) < sz ifTrue: [^false].\\\\n\\\\tstart _ lastRead + 1.\\\\n\\\\t(inBuffer findString: aString startingAt: start) = start\\\\n\\\\t\\\\tifFalse: [^false].\\\\n\\\\tlastRead _ lastRead + sz.\\\\n\\\\t^true! !\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 2/15/2005 14:16'!\\\\npeek: anInteger\\\\n\\\\t\\\\\\\"Answer anInteger bytes of data.\\\\n\\\\tDo not consume data.\\\\n\\\\n\\\\tNOTE: This method doesn't honor timeouts if shouldSignal is false!!\\\\\\\"\\\\n\\\\n\\\\t| start |\\\\n\\\\tself receiveData: anInteger.\\\\n\\\\tstart _ lastRead + 1.\\\\n\\\\t^inBuffer copyFrom: start to: ((lastRead + anInteger) min: inNextToWrite - 1).! !\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 2/15/2005 14:15'!\\\\nskip: anInteger\\\\n\\\\t\\\\\\\"Skip a number of bytes.\\\\n\\\\tThis is faster than #next: since it does not\\\\n\\\\thave to copy and return a new String or ByteArray.\\\\n\\\\n\\\\tNOTE: This method doesn't honor timeouts if shouldSignal is false!!\\\\\\\"\\\\n\\\\n\\\\tself receiveData: anInteger.\\\\n\\\\tlastRead _ (lastRead + anInteger) min: inNextToWrite - 1! !\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 9/9/2005 02:57'!\\\\nupTo: aCharacterOrByte\\\\n\\\\t\\\\\\\"Return data up to, but not including given character or byte.\\\\n\\\\t\\\\n\\\\tNOTE: Does not honour timeouts if shouldSignal is false!!\\\\n\\\\t\\\\n\\\\tThis method looks a bit complicated, and this is mainly because there is no fast search method\\\\n\\\\tin String that takes a stoppingAt: argument. This means we need to ignore getting hits in the\\\\n\\\\tdead buffer area above inNextToWrite.\\\\n\\\\tAnother measure is that this implementation is greedy and will load data into the buffer\\\\n\\\\tuntil there is nothing more available, or it has loaded 100kb - and not until then we search the buffer.\\\\n\\\\n\\\\tA totally non greedy variant would search on every loop.\\\\\\\"\\\\n\\\\n\\\\t| index result lastRecentlyRead searchedSoFar |\\\\n\\\\tsearchedSoFar _ 0.\\\\n\\\\tlastRecentlyRead _ 0.\\\\n\\\\tindex _ 0.\\\\n\\\\t[self atEnd not and: [\\\\n\\\\t\\\\t((lastRecentlyRead = 0 and: [self isInBufferEmpty not]) or: [self inBufferSize > 100000]) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\\\\"Data begins at lastRead + 1, we add searchedSoFar as offset.\\\\\\\"\\\\n\\\\t\\\\t\\\\tindex _ inBuffer indexOf: aCharacterOrByte startingAt: lastRead + searchedSoFar + 1.\\\\n\\\\t\\\\t\\\\tsearchedSoFar _ self inBufferSize.\\\\n\\\\t\\\\t\\\\t(index > 0 and: [(index + 1) > inNextToWrite]) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"Oops, hit in dead buffer area.\\\\n\\\\t\\\\t\\\\t\\\\tThis is probably due to old data, so we ignore it.\\\\n\\\\t\\\\t\\\\t\\\\tNo point in cleaning the dead area to avoid hits - it will still search it.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tindex _ 0]].\\\\n\\\\t\\\\tindex = 0]]\\\\n\\\\t\\\\t\\\\t\\\\twhileTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\trecentlyRead = 0\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"blocking call for now, we don't want to poll\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself receiveData]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself receiveAvailableData].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tlastRecentlyRead _ recentlyRead].\\\\n\\\\tindex > 0\\\\n\\\\t\\\\tifTrue: [\\\\\\\"found it\\\\\\\"\\\\n\\\\t\\\\t\\\\tresult _ self nextInBuffer: index - lastRead - 1.\\\\n\\\\t\\\\t\\\\tself skip: 1.\\\\n\\\\t\\\\t\\\\t^ result]\\\\n\\\\t\\\\tifFalse: [\\\\\\\"atEnd\\\\\\\"\\\\n\\\\t\\\\t\\\\t^ self nextAllInBuffer]! !\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 9/9/2005 02:55'!\\\\nupToAll: aStringOrByteArray\\\\n\\\\t\\\\\\\"Answer a subcollection from the current access position to the occurrence (if any, but not\\\\n\\\\tinclusive) of aStringOrByteArray. If aCollection is not in the stream, answer the entire rest of\\\\n\\\\tthe stream.\\\\n\\\\t\\\\n\\\\tNOTE: Does not honour timeouts if shouldSignal is false!!\\\\n\\\\t\\\\n\\\\tThis method looks a bit complicated, and this is mainly because there is no fast search method\\\\n\\\\tin String that takes a stoppingAt: argument. This means we need to ignore getting hits in the\\\\n\\\\tdead buffer area above inNextToWrite.\\\\n\\\\tAnother measure is that this implementation is greedy and will load data into the buffer\\\\n\\\\tuntil there is nothing more available, or it has loaded 100kb - and not until then we search the buffer.\\\\n\\\\n\\\\tA totally non greedy variant would search on every loop.\\\\\\\"\\\\n\\\\n\\\\t| index sz result lastRecentlyRead searchedSoFar |\\\\n\\\\tsz _ aStringOrByteArray size.\\\\n\\\\tsearchedSoFar _ 0.\\\\n\\\\tlastRecentlyRead _ 0.\\\\n\\\\tindex _ 0.\\\\n\\\\t[self atEnd not and: [\\\\n\\\\t\\\\t((lastRecentlyRead = 0 and: [self isInBufferEmpty not]) or: [self inBufferSize > 100000]) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\\\\"Data begins at lastRead + 1, we add searchedSoFar as offset and backs up sz - 1\\\\n\\\\t\\\\t\\\\tso that we can catch any borderline hits.\\\\\\\"\\\\n\\\\t\\\\t\\\\tindex _ inBuffer indexOfSubCollection: aStringOrByteArray\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: lastRead + searchedSoFar - sz + 2.\\\\n\\\\t\\\\t\\\\tsearchedSoFar _ self inBufferSize.\\\\n\\\\t\\\\t\\\\t(index > 0 and: [(index + sz) > inNextToWrite]) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"Oops, hit partially or completely in dead buffer area.\\\\n\\\\t\\\\t\\\\t\\\\tThis is probably due to old data, so we ignore it.\\\\n\\\\t\\\\t\\\\t\\\\tNo point in cleaning the dead area to avoid hits - it will still search it.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tindex _ 0]].\\\\n\\\\t\\\\tindex = 0]]\\\\n\\\\t\\\\t\\\\t\\\\twhileTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\trecentlyRead = 0\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"blocking call for now, we don't want to poll\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself receiveData]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself receiveAvailableData].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tlastRecentlyRead _ recentlyRead].\\\\n\\\\tindex > 0\\\\n\\\\t\\\\tifTrue: [\\\\\\\"found it\\\\\\\"\\\\n\\\\t\\\\t\\\\tresult _ self nextInBuffer: index - lastRead - 1.\\\\n\\\\t\\\\t\\\\tself skip: sz.\\\\n\\\\t\\\\t\\\\t^ result]\\\\n\\\\t\\\\tifFalse: [\\\\\\\"atEnd\\\\\\\"\\\\n\\\\t\\\\t\\\\t^ self nextAllInBuffer]! !\\\\n\\\\n!SocketStream methodsFor: 'stream in' stamp: 'gk 2/15/2005 14:14'!\\\\nupToEnd\\\\n\\\\t\\\\\\\"Answer all data coming in on the socket until the socket\\\\n\\\\tis closed by the other end, or we get a timeout.\\\\n\\\\tThis means this method catches ConnectionClosed by itself.\\\\n\\\\t\\\\n\\\\tNOTE: Does not honour timeouts if shouldSignal is false!!\\\\\\\"\\\\n\\\\n\\\\t[[self atEnd] whileFalse: [self receiveData]]\\\\n\\\\t\\\\ton: ConnectionClosed\\\\n\\\\t\\\\tdo: [:ex | \\\\\\\"swallow it\\\\\\\"]. \\\\n\\\\t^self nextAllInBuffer! !\\\\n\\\\n\\\\n!SocketStream methodsFor: 'stream out' stamp: 'gk 2/3/2005 20:35'!\\\\ncr\\\\n\\\\tself nextPutAll: String cr! !\\\\n\\\\n!SocketStream methodsFor: 'stream out' stamp: 'gk 2/3/2005 20:35'!\\\\ncrlf\\\\n\\\\tself nextPutAll: String crlf! !\\\\n\\\\n!SocketStream methodsFor: 'stream out' stamp: 'gk 2/10/2005 11:14'!\\\\nnextPutAllFlush: aCollection\\\\n\\\\t\\\\\\\"Put a String or a ByteArray onto the stream.\\\\n\\\\tYou can use this if you have very large data - it avoids\\\\n\\\\tcopying into the buffer (and avoids buffer growing)\\\\n\\\\tand also flushes any other pending data first.\\\\\\\"\\\\n\\\\n\\\\t| toPut |\\\\n\\\\ttoPut _ binary ifTrue: [aCollection asByteArray] ifFalse: [aCollection asString].\\\\n\\\\tself flush. \\\\\\\"first flush pending stuff, then directly send\\\\\\\"\\\\n\\\\tsocket isOtherEndClosed ifFalse: [\\\\n\\\\t\\\\t[socket sendData: toPut count: toPut size]\\\\n\\\\t\\\\t\\\\ton: ConnectionTimedOut\\\\n\\\\t\\\\t\\\\tdo: [:ex | shouldSignal ifFalse: [\\\\\\\"swallow\\\\\\\"]]]! !\\\\n\\\\n!SocketStream methodsFor: 'stream out' stamp: 'md 2/24/2006 19:51'!\\\\nnextPut: char\\\\n\\\\t\\\\\\\"Put a single Character or byte onto the stream.\\\\\\\"\\\\n\\\\n\\\\t| toPut |\\\\n\\\\ttoPut _ binary ifTrue: [char asInteger] ifFalse: [char asCharacter].\\\\n\\\\tself adjustOutBuffer: 1.\\\\n\\\\toutBuffer at: outNextToWrite put: toPut.\\\\n\\\\toutNextToWrite _ outNextToWrite + 1.\\\\n\\\\tself checkFlush.\\\\n\\\\t\\\\\\\"return the argument - added by kwl\\\\\\\"\\\\n\\\\t^ char! !\\\\n\\\\n!SocketStream methodsFor: 'stream out' stamp: 'gk 2/7/2005 22:51'!\\\\nnextPutAll: aCollection\\\\n\\\\t\\\\\\\"Put a String or a ByteArray onto the stream.\\\\n\\\\tCurrently a large collection will allocate a large buffer.\\\\\\\"\\\\n\\\\n\\\\t| toPut |\\\\n\\\\ttoPut _ binary ifTrue: [aCollection asByteArray] ifFalse: [aCollection asString].\\\\n\\\\tself adjustOutBuffer: toPut size.\\\\n\\\\toutBuffer replaceFrom: outNextToWrite to: outNextToWrite + toPut size - 1 with: toPut startingAt: 1.\\\\n\\\\toutNextToWrite _ outNextToWrite + toPut size.\\\\n\\\\tself checkFlush! !\\\\n\\\\n!SocketStream methodsFor: 'stream out' stamp: 'gk 9/9/2005 09:32'!\\\\nsendCommand: aString\\\\n\\\\t\\\\\\\"Sends a String ending it with CR LF and then flush\\\\n\\\\tcausing it to block until sent.\\\\\\\"\\\\n\\\\n\\\\tself nextPutAll: aString, String crlf; flush! !\\\\n\\\\n!SocketStream methodsFor: 'stream out' stamp: 'gk 2/3/2005 20:35'!\\\\nspace\\\\n\\\\tself nextPut: Character space! !\\\\n\\\\n\\\\n!SocketStream methodsFor: 'testing' stamp: 'gk 2/25/2005 14:23'!\\\\natEnd\\\\n\\\\t\\\\\\\"There is nothing more to read when\\\\n\\\\tthere is no more data in our inBuffer, the socket\\\\n\\\\tis disconnected and there is none available on the socket.\\\\n\\\\tNote that we need to check isConnected before isDataAvailable,\\\\n\\\\totherwise data may sneak in in the meantime. But we check the\\\\n\\\\tbuffer first, because it is faster.\\\\\\\"\\\\n\\\\n\\\\tself isInBufferEmpty ifFalse: [^false].\\\\n\\\\t^self isConnected not\\\\n\\\\t\\\\tand: [self isDataAvailable not]! !\\\\n\\\\n!SocketStream methodsFor: 'testing' stamp: 'gk 2/3/2005 20:35'!\\\\nisBinary\\\\n\\\\t^binary! !\\\\n\\\\n!SocketStream methodsFor: 'testing' stamp: 'gk 2/7/2005 12:24'!\\\\nisConnected\\\\n\\\\t\\\\\\\"The stream is connected if the socket is.\\\\\\\"\\\\n\\\\n\\\\t^socket isConnected! !\\\\n\\\\n!SocketStream methodsFor: 'testing' stamp: 'gk 2/24/2005 12:23'!\\\\nisDataAvailable\\\\n\\\\t\\\\\\\"It the inbuffer is empty, we check the socket for data.\\\\n\\\\tIf it claims to have data available to read, we try to read\\\\n\\\\tsome once and recursively call this method again.\\\\n\\\\tIf something really was available it is now in the inBuffer.\\\\n\\\\tThis is because there has been spurious\\\\n\\\\tdataAvailable when there really is no data to get.\\\\\\\"\\\\n \\\\n\\\\tself isInBufferEmpty ifFalse: [^true].\\\\n\\\\t^socket dataAvailable\\\\n\\\\t\\\\tifFalse: [false]\\\\n\\\\t\\\\tifTrue: [self receiveDataIfAvailable; isDataAvailable]! !\\\\n\\\\n!SocketStream methodsFor: 'testing' stamp: 'gk 2/7/2005 13:02'!\\\\nisEmpty\\\\n\\\\t\\\\\\\"Test if there are more data to read.\\U0005\\\\\\\"\\\\n\\\\n\\\\t^self isInBufferEmpty and: [self isDataAvailable not]! !\\\\n\\\\n!SocketStream methodsFor: 'testing' stamp: 'gk 2/7/2005 13:02'!\\\\nisInBufferEmpty\\\\n\\\\t\\\\\\\"Any data in the buffer?\\\\\\\"\\\\n \\\\n\\\\t^lastRead + 1 = inNextToWrite! !\\\\n\\\\n!SocketStream methodsFor: 'testing' stamp: 'gk 2/7/2005 08:59'!\\\\nisOtherEndConnected\\\\n\\\\t^socket isOtherEndClosed not! !\\\\n\\\\n!SocketStream methodsFor: 'testing' stamp: 'gk 2/3/2005 20:35'!\\\\nshouldTimeout\\\\n\\\\t^self timeout > 0! !\\\\n\\\\n\\\\n!SocketStream methodsFor: 'private' stamp: 'gk 2/9/2005 22:44'!\\\\nadjustInBuffer: bytesRead\\\\n\\\\t\\\\\\\"Adjust markers and possibly grow inBuffer or move data down.\\\\n\\\\tCurrently grows through doubling when less than 1024 bytes are left.\\\\n\\\\tNever shrinks. Returns the position in the buffer where any new\\\\n\\\\tdata can be found.\\\\\\\"\\\\n\\\\n\\\\t| old |\\\\n\\\\tbytesRead = 0 ifTrue: [^inNextToWrite].\\\\n\\\\told _ inNextToWrite.\\\\n\\\\tinNextToWrite _ inNextToWrite + bytesRead.\\\\n\\\\t(inBuffer size - inNextToWrite) < 1024\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\\\\"Hit the roof, move data down (if enough has been read) or do we grow?\\\\\\\"\\\\n\\\\t\\\\t\\\\t(lastRead > 512)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [^old - self moveInBufferDown]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self growInBuffer]].\\\\n\\\\t^old! !\\\\n\\\\n!SocketStream methodsFor: 'private' stamp: 'gk 2/9/2005 22:42'!\\\\nadjustOutBuffer: bytesToWrite\\\\n\\\\t\\\\\\\"Possibly grow outBuffer to accommodate the new data.\\\\n\\\\tCurrently grows through doubling when less\\\\n\\\\tthan 1024 bytes are left. If bytesToWrite is even\\\\n\\\\tlarger we double that instead. Never shrinks.\\\\\\\"\\\\n\\\\n\\\\t(outBuffer size - outNextToWrite - bytesToWrite) < 1024 ifTrue: [\\\\n\\\\t\\\\toutBuffer _ (self streamBuffer: ((outBuffer size max: bytesToWrite) * 2))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\treplaceFrom: 1 to: outBuffer size with: outBuffer startingAt: 1]! !\\\\n\\\\n!SocketStream methodsFor: 'private' stamp: 'gk 2/7/2005 13:09'!\\\\ncheckFlush\\\\n\\\\t\\\\\\\"If autoFlush is true we flush if\\\\n\\\\twe have reached the bufferSize\\\\n\\\\tof data in the outBuffer.\\\\\\\"\\\\n\\\\n\\\\t(autoFlush and: [outNextToWrite > bufferSize])\\\\n\\\\t\\\\tifTrue: [self flush]! !\\\\n\\\\n!SocketStream methodsFor: 'private' stamp: 'gk 2/7/2005 23:05'!\\\\ngrowInBuffer\\\\n\\\\t\\\\\\\"Grows through doubling.\\\\\\\"\\\\n\\\\n\\\\tself resizeInBuffer: inBuffer size * 2! !\\\\n\\\\n!SocketStream methodsFor: 'private' stamp: 'gk 2/8/2005 22:15'!\\\\nmoveInBufferDown\\\\n\\\\t\\\\\\\"Move down contents of inBuffer to the start.\\\\n\\\\tReturn distance moved.\\\\\\\"\\\\n\\\\n\\\\t| sz distanceMoved |\\\\n\\\\tsz _ inNextToWrite - lastRead - 1.\\\\n\\\\tinBuffer replaceFrom: 1 to: sz with: inBuffer startingAt: lastRead + 1.\\\\n\\\\tdistanceMoved _ lastRead.\\\\n\\\\tlastRead _ 0.\\\\n\\\\tinNextToWrite _ sz + 1.\\\\n\\\\t^distanceMoved\\\\n! !\\\\n\\\\n!SocketStream methodsFor: 'private' stamp: 'gk 2/9/2005 22:36'!\\\\nresetBuffers\\\\n\\\\t\\\\\\\"Recreate the buffers with default start sizes.\\\\\\\"\\\\n\\\\n\\\\tinBuffer _ self streamBuffer: bufferSize.\\\\n\\\\tlastRead _ 0.\\\\n\\\\tinNextToWrite _ 1.\\\\n\\\\toutBuffer _ self streamBuffer: bufferSize.\\\\n\\\\toutNextToWrite _ 1! !\\\\n\\\\n!SocketStream methodsFor: 'private' stamp: 'gk 9/9/2005 02:29'!\\\\nresizeInBuffer: newSize\\\\n\\\\t\\\\\\\"Resize the inBuffer by recreating it.\\\\n\\\\tThis also has the effect of getting rid of\\\\n\\\\tdead data above inNextToWrite.\\\\n\\\\t<newSize> must >= inBuffer size!!\\\\\\\"\\\\n\\\\n\\\\tinBuffer _ (self streamBuffer: newSize)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\treplaceFrom: 1 to: inNextToWrite - 1 with: inBuffer startingAt: 1! !\\\\n\\\\n!SocketStream methodsFor: 'private' stamp: 'gk 2/9/2005 22:35'!\\\\nstreamBuffer: size\\\\n\\\\t\\\\\\\"Create a buffer of the correct class and given size.\\\\\\\"\\\\n\\\\n\\\\t^(self isBinary\\\\n\\\\t\\\\tifTrue: [ByteArray]\\\\n\\\\t\\\\tifFalse: [String]) new: size! !\\\\n\\\\n\\\\n!SocketStream methodsFor: 'private-socket' stamp: 'gk 2/25/2005 14:20'!\\\\nreceiveAvailableData\\\\n\\\\t\\\\\\\"Receive available data (as much as fits in the inBuffer)\\\\n\\\\tbut not waiting for more to arrive.\\\\n\\\\tReturn the position in the buffer where the\\\\n\\\\tnew data starts, regardless if anything\\\\n\\\\twas read, see #adjustInBuffer.\\\\\\\"\\\\n\\\\t\\\\n\\\\trecentlyRead _ socket receiveAvailableDataInto: inBuffer startingAt: inNextToWrite.\\\\n\\\\t^self adjustInBuffer: recentlyRead! !\\\\n\\\\n!SocketStream methodsFor: 'private-socket' stamp: 'gk 2/25/2005 14:20'!\\\\nreceiveData\\\\n\\\\t\\\\\\\"Receive data with timeout if it has been set.\\\\n\\\\tIf shouldSignal is false we use the Socket methods\\\\n\\\\tthat swallow those Exceptions, if it is true the\\\\n\\\\tcaller will have to handle those Exceptions.\\\\n\\\\tReturn the position in the buffer where the\\\\n\\\\tnew data starts, regardless if anything\\\\n\\\\twas read, see #adjustInBuffer.\\\\\\\"\\\\n\\\\t\\\\n\\\\trecentlyRead := shouldSignal ifTrue: [\\\\n\\\\t\\\\tself shouldTimeout ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tsocket receiveDataSignallingTimeout: timeout\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tinto: inBuffer startingAt: inNextToWrite]\\\\n\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tsocket receiveDataSignallingClosedInto: inBuffer\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: inNextToWrite]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\tself shouldTimeout ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\\\\"This case is tricky, if it times out and is swallowed\\\\n\\\\t\\\\t\\\\thow does other methods calling this method repeatedly\\\\n\\\\t\\\\t\\\\tget to know that? And what should they do?\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tsocket receiveDataTimeout: timeout\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tinto: inBuffer startingAt: inNextToWrite]\\\\n\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tsocket receiveDataInto: inBuffer\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: inNextToWrite]].\\\\n\\\\t^self adjustInBuffer: recentlyRead! !\\\\n\\\\n!SocketStream methodsFor: 'private-socket' stamp: 'gk 2/9/2005 22:53'!\\\\nreceiveDataIfAvailable\\\\n\\\\t\\\\\\\"Only used to check that there really is data to read\\\\n\\\\tfrom the socket after it signals dataAvailable.\\\\n\\\\tIt has been known to signal true and then still\\\\n\\\\tnot have anything to read. See also isDataAvailable.\\\\n\\\\tReturn the position in the buffer where the\\\\n\\\\tnew data starts, regardless if anything\\\\n\\\\twas read, see #adjustInBuffer.\\\\\\\"\\\\n\\\\n\\\\trecentlyRead _ socket receiveSomeDataInto: inBuffer startingAt: inNextToWrite.\\\\n\\\\t^self adjustInBuffer: recentlyRead! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSocketStream class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SocketStream class methodsFor: 'example' stamp: 'md 8/14/2005 18:25'!\\\\nfinger: userName\\\\n\\\\t\\\\\\\"SocketStream finger: 'stp'\\\\\\\"\\\\n\\\\n\\\\t| addr s |\\\\n\\\\taddr _ NetNameResolver promptUserForHostAddress.\\\\n\\\\ts _ SocketStream openConnectionToHost: addr port: 79.  \\\\\\\"finger port number\\\\\\\"\\\\n\\\\tTranscript show: '---------- Connecting ----------'; cr.\\\\n\\\\ts sendCommand: userName.\\\\n\\\\tTranscript show: s getLine.\\\\n\\\\ts close.\\\\n\\\\tTranscript show: '---------- Connection Closed ----------'; cr; endEntry.\\\\n! !\\\\n\\\\n\\\\n!SocketStream class methodsFor: 'instance creation' stamp: 'gk 2/3/2005 22:19'!\\\\non: socket\\\\n\\\\t\\\\\\\"Create a socket stream on a connected server socket.\\\\\\\"\\\\n\\\\n\\\\t^self basicNew initialize socket: socket! !\\\\n\\\\n!SocketStream class methodsFor: 'instance creation' stamp: 'gk 2/3/2005 20:35'!\\\\nopenConnectionToHost: hostIP port: portNumber\\\\n\\\\t| socket |\\\\n\\\\tsocket _ Socket new.\\\\n\\\\tsocket connectTo: hostIP port: portNumber.\\\\n\\\\t^self on: socket! !\\\\n\\\\n!SocketStream class methodsFor: 'instance creation' stamp: 'gk 2/3/2005 20:35'!\\\\nopenConnectionToHostNamed: hostName port: portNumber\\\\n\\\\t| hostIP |\\\\n\\\\thostIP _ NetNameResolver addressForName: hostName timeout: 20.\\\\n\\\\t^self openConnectionToHost: hostIP port: portNumber! !\\\\nSocket subclass: #SocksSocket\\\\n\\\\tinstanceVariableNames: 'vers method socksIP socksPort dstPort dstIP dstName'\\\\n\\\\tclassVariableNames: 'DefaultSocksVersion'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Network-Kernel'!\\\\n!SocksSocket commentStamp: '<historical>' prior: 0!\\\\nThis class implements the socks 4 and partially socks 5 connection protocol.\\\\nFor backward compatibility the socks protocol is disabled by default, so subclasses still work.\\\\nFor further documentation check out:\\\\n\\\\nSocks4: http://spiderman.socks.nec.com/protocol/socks4.protocol\\\\n\\\\nSocks5: http://spiderman.socks.nec.com/rfc/rfc1928.txt!\\\\n\\\\n\\\\n!SocksSocket methodsFor: 'connection open/close' stamp: 'mir 2/22/2002 15:49'!\\\\nconnectTo: hostAddress port: port\\\\n\\\\tself initializeNetwork.\\\\n\\\\tself shouldUseSocks\\\\n\\\\t\\\\tifFalse: [^super connectTo: hostAddress port: port].\\\\n\\\\tsuper connectTo: socksIP port: socksPort.\\\\n\\\\tself waitForConnectionUntil: Socket standardDeadline.\\\\n\\\\tdstIP _ hostAddress.\\\\n\\\\tdstPort _ port.\\\\n\\\\tvers == 4\\\\n\\\\t\\\\tifTrue: [self connectSocks4]\\\\n\\\\t\\\\tifFalse: [self connectSocks5]\\\\n\\\\t! !\\\\n\\\\n!SocksSocket methodsFor: 'connection open/close' stamp: 'mir 3/6/2000 15:17'!\\\\nconnectToHostNamed: hostName port: port\\\\n\\\\tsuper connectTo: socksIP port: socksPort.\\\\n\\\\tself waitForConnectionUntil: Socket standardDeadline.\\\\n\\\\tdstName _ hostName.\\\\n\\\\tdstPort _ port.\\\\n\\\\tvers == 4\\\\n\\\\t\\\\tifTrue: [self connectSocks4]\\\\n\\\\t\\\\tifFalse: [self connectSocks5]\\\\n\\\\t! !\\\\n\\\\n\\\\n!SocksSocket methodsFor: 'initialize' stamp: 'mir 9/26/2000 00:05'!\\\\nsocks4\\\\n\\\\tvers _ 4.\\\\n\\\\tmethod _ nil.\\\\n\\\\tsocksIP _ self class defaultSocksHostAddress.\\\\n\\\\tsocksPort _ self class defaultSocksPort! !\\\\n\\\\n!SocksSocket methodsFor: 'initialize' stamp: 'mir 9/26/2000 00:05'!\\\\nsocks5\\\\n\\\\tvers _ 5.\\\\n\\\\tmethod _ self class noAutorizationMethod.\\\\n\\\\tsocksIP _ self class defaultSocksHostAddress.\\\\n\\\\tsocksPort _ self class defaultSocksPort! !\\\\n\\\\n\\\\n!SocksSocket methodsFor: 'methods' stamp: 'mir 3/6/2000 13:24'!\\\\nnoAutorizationMethod\\\\n\\\\t^0! !\\\\n\\\\n\\\\n!SocksSocket methodsFor: 'socks4' stamp: 'mir 3/6/2000 15:07'!\\\\nconnectSocks4\\\\n\\\\tself\\\\n\\\\t\\\\tsendSocks4ConnectionRequestUserId: '';\\\\n\\\\t\\\\twaitForSocks4ConnectionReply.\\\\n! !\\\\n\\\\n!SocksSocket methodsFor: 'socks4' stamp: 'mir 2/22/2002 15:49'!\\\\nsendSocks4ConnectionRequestUserId: userId\\\\n\\\\t\\\\\\\"The client connects to the SOCKS server and sends a CONNECT request when\\\\nit wants to establish a connection to an application server. The client\\\\nincludes in the request packet the IP address and the port number of the\\\\ndestination host, and userid, in the following format.\\\\n\\\\n\\\\t+----+----+----+----+----+----+----+----+----+----+....+----+\\\\n\\\\t| VN | CD | DSTPORT |      DSTIP        | USERID       |NULL|\\\\n\\\\t+----+----+----+----+----+----+----+----+----+----+....+----+\\\\n\\\\t   1    1      2              4           variable       1\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t| requestString |\\\\n\\\\trequestString _ WriteStream on: ByteArray new.\\\\n\\\\tdstIP\\\\n\\\\t\\\\tifNil: [dstIP _ NetNameResolver addressForName: dstName].\\\\n\\\\trequestString\\\\n\\\\t\\\\tnextPut: 4;\\\\n\\\\t\\\\tnextPut: self connectCommandCode;\\\\n\\\\t\\\\tnextWordPut: dstPort;\\\\n\\\\t\\\\tnextPutAll: self dstIP;\\\\n\\\\t\\\\tnextPutAll: userId asByteArray;\\\\n\\\\t\\\\tnextPut: 0.\\\\n\\\\tself sendData: requestString contents! !\\\\n\\\\n!SocksSocket methodsFor: 'socks4' stamp: 'mir 3/6/2000 15:11'!\\\\nwaitForSocks4ConnectionReply\\\\n\\\\n\\\\t| response |\\\\n\\\\tresponse _ self waitForReply: 8 for: self defaultTimeOutDuration.\\\\n\\\\n\\\\t(response at: 2) = self requestGrantedCode\\\\n\\\\t\\\\tifFalse: [^self socksError: 'Connection failed: ' , (response at: 2) printString].! !\\\\n\\\\n\\\\n!SocksSocket methodsFor: 'socks5' stamp: 'mir 3/6/2000 17:42'!\\\\nconnectSocks5\\\\n\\\\tself\\\\n\\\\t\\\\tsocks5MethodSelection;\\\\n\\\\t\\\\tsendSocks5ConnectionRequest;\\\\n\\\\t\\\\tsocks5RequestReply\\\\n! !\\\\n\\\\n!SocksSocket methodsFor: 'socks5' stamp: 'mir 3/6/2000 17:29'!\\\\nhostIP6Code\\\\n\\\\t^4! !\\\\n\\\\n!SocksSocket methodsFor: 'socks5' stamp: 'mir 3/6/2000 15:20'!\\\\nhostIPCode\\\\n\\\\t^1! !\\\\n\\\\n!SocksSocket methodsFor: 'socks5' stamp: 'mir 3/6/2000 15:15'!\\\\nqualifiedHostNameCode\\\\n\\\\t^3! !\\\\n\\\\n!SocksSocket methodsFor: 'socks5' stamp: 'mir 3/6/2000 17:25'!\\\\nsendSocks5ConnectionRequest\\\\n\\\\t\\\\\\\"Once the method-dependent subnegotiation has completed, the client\\\\n   sends the request details.\\\\\\\"\\\\n\\\\n\\\\t| requestString |\\\\n\\\\trequestString _ WriteStream on: ByteArray new.\\\\n\\\\trequestString\\\\n\\\\t\\\\tnextPut: 5;\\\\n\\\\t\\\\tnextPut: self connectCommandCode;\\\\n\\\\t\\\\tnextPut: 0. \\\\\\\"Reserved slot\\\\\\\"\\\\n\\\\tdstName isNil\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\trequestString\\\\n\\\\t\\\\t\\\\t\\\\tnextPutAll: self hostIPCode;\\\\n\\\\t\\\\t\\\\t\\\\tnextPutAll: dstIP]\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\trequestString\\\\n\\\\t\\\\t\\\\t\\\\tnextPut: self qualifiedHostNameCode;\\\\n\\\\t\\\\t\\\\t\\\\tnextPut: dstName size;\\\\n\\\\t\\\\t\\\\t\\\\tnextPutAll: dstName asByteArray].\\\\n\\\\trequestString nextWordPut: dstPort.\\\\n\\\\tself sendData: requestString contents! !\\\\n\\\\n!SocksSocket methodsFor: 'socks5' stamp: 'mir 3/6/2000 17:35'!\\\\nskipQualifiedHostName\\\\n\\\\n\\\\t| startTime response bytesRead |\\\\n\\\\tstartTime _ Time millisecondClockValue.\\\\n\\\\tresponse _ ByteArray new: 1.\\\\n\\\\n\\\\t[(bytesRead _ self receiveDataInto: response) < 1\\\\n\\\\t\\\\tand: [(Time millisecondClockValue - startTime) < self defaultTimeOutDuration]] whileTrue.\\\\n\\\\n\\\\tbytesRead < 1\\\\n\\\\t\\\\tifTrue: [self socksError: 'Time out reading data'].\\\\n\\\\n\\\\tself waitForReply: (response at: 1) + 2 for: self defaultTimeOutDuration! !\\\\n\\\\n!SocksSocket methodsFor: 'socks5' stamp: 'mir 3/6/2000 15:16'!\\\\nsocks5MethodSelection\\\\n\\\\t\\\\\\\"The client connects to the server, and sends a version\\\\n   identifier/method selection message.\\\\n\\\\tThe server selects from one of the methods given in METHODS, and\\\\n   sends a METHOD selection message.\\\\\\\"\\\\n\\\\n\\\\t| requestString response |\\\\n\\\\trequestString _ WriteStream on: ByteArray new.\\\\n\\\\trequestString\\\\n\\\\t\\\\tnextPut: 5;\\\\n\\\\t\\\\tnextPut: 1;\\\\n\\\\t\\\\tnextPut: 0.\\\\n\\\\tself sendData: requestString contents.\\\\n\\\\n\\\\tresponse _ self waitForReply: 2 for: self defaultTimeOutDuration.\\\\n\\\\t(response at: 2) == 16rFF\\\\n\\\\t\\\\tifTrue: [self socksError: 'No acceptable methods.']\\\\n\\\\t\\\\tifFalse: [method _ response at: 2]! !\\\\n\\\\n!SocksSocket methodsFor: 'socks5' stamp: 'mir 3/6/2000 17:28'!\\\\nsocks5RequestReply\\\\n\\\\n\\\\t| response |\\\\n\\\\tresponse _ self waitForReply: 4 for: self defaultTimeOutDuration.\\\\n\\\\t\\\\\\\"Skip rest for now.\\\\\\\"\\\\n\\\\t(response at: 4) = self hostIPCode\\\\n\\\\t\\\\tifTrue: [self waitForReply: 6 for: self defaultTimeOutDuration].\\\\n\\\\t(response at: 4) = self qualifiedHostNameCode\\\\n\\\\t\\\\tifTrue: [self skipQualifiedHostName].\\\\n\\\\t(response at: 4) = self hostIP6Code\\\\n\\\\t\\\\tifTrue: [self waitForReply: 18 for: self defaultTimeOutDuration].\\\\n\\\\t(response at: 2) ~= 0\\\\n\\\\t\\\\tifTrue: [^self socksError: 'Connection failed: ', (response at: 2) printString].\\\\n! !\\\\n\\\\n\\\\n!SocksSocket methodsFor: 'private' stamp: 'mir 3/6/2000 13:34'!\\\\nconnectCommandCode\\\\n\\\\t^1! !\\\\n\\\\n!SocksSocket methodsFor: 'private' stamp: 'mir 3/6/2000 15:07'!\\\\ndefaultTimeOutDuration\\\\n\\\\t^20000! !\\\\n\\\\n!SocksSocket methodsFor: 'private' stamp: 'mir 3/6/2000 15:29'!\\\\ndstIP\\\\n\\\\t^dstIP! !\\\\n\\\\n!SocksSocket methodsFor: 'private' stamp: 'mir 2/22/2002 16:23'!\\\\ndstPort\\\\n\\\\t^dstPort! !\\\\n\\\\n!SocksSocket methodsFor: 'private' stamp: 'mir 3/6/2000 14:03'!\\\\nrequestGrantedCode\\\\n\\\\t^90! !\\\\n\\\\n!SocksSocket methodsFor: 'private' stamp: 'mir 9/26/2000 11:23'!\\\\nshouldUseSocks\\\\n\\\\t^vers notNil! !\\\\n\\\\n!SocksSocket methodsFor: 'private' stamp: 'mir 3/6/2000 15:11'!\\\\nsocksError: errorString\\\\n\\\\tself close; destroy.\\\\n\\\\tself error: errorString! !\\\\n\\\\n!SocksSocket methodsFor: 'private' stamp: 'len 12/14/2002 11:39'!\\\\nwaitForReply: replySize for: timeOutDuration\\\\n\\\\t| startTime response delay bytesRead |\\\\n\\\\tstartTime _ Time millisecondClockValue.\\\\n\\\\tresponse _ ByteArray new: replySize.\\\\n\\\\tbytesRead _ 0.\\\\n\\\\tdelay _ Delay forMilliseconds: 500.\\\\n\\\\t[bytesRead < replySize\\\\n\\\\t\\\\tand: [(Time millisecondClockValue - startTime) < timeOutDuration]] whileTrue: [\\\\n\\\\t\\\\tbytesRead _ bytesRead + (self receiveDataInto: response).\\\\n\\\\t\\\\tdelay wait.\\\\n\\\\t\\\\tTranscript show: '.'].\\\\n\\\\tbytesRead < replySize\\\\n\\\\t\\\\tifTrue: [self close; destroy.\\\\n\\\\t\\\\t\\\\t\\\\t^ (ConnectionRefused host: self dstIP port: self dstPort) signal].\\\\n\\\\t^response! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSocksSocket class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SocksSocket class methodsFor: 'accessing' stamp: 'nk 7/6/2003 07:30'!\\\\ndefaultSocksHostAddress\\\\n\\\\n\\\\t^NetNameResolver addressForName: HTTPSocket httpProxyServer! !\\\\n\\\\n!SocksSocket class methodsFor: 'accessing' stamp: 'nk 7/6/2003 07:30'!\\\\ndefaultSocksPort\\\\n\\\\t^HTTPSocket httpProxyPort! !\\\\n\\\\n!SocksSocket class methodsFor: 'accessing' stamp: 'mir 9/26/2000 00:06'!\\\\ndefaultSocksVersion\\\\n\\\\t\\\\\\\"nil means no socks\\\\\\\"\\\\n\\\\t^DefaultSocksVersion! !\\\\n\\\\n!SocksSocket class methodsFor: 'accessing' stamp: 'mir 9/26/2000 00:07'!\\\\ndefaultSocksVersion: anInteger\\\\n\\\\t\\\\\\\"nil means no socks\\\\\\\"\\\\n\\\\tDefaultSocksVersion _ anInteger! !\\\\nFillStyle subclass: #SolidFillStyle\\\\n\\\\tinstanceVariableNames: 'color pixelValue32'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Balloon-Fills'!\\\\n!SolidFillStyle commentStamp: '<historical>' prior: 0!\\\\nSolidFillStyle is a fill which represents a color for the BalloonEngine.\\\\n\\\\nInstance variables:\\\\n\\\\tcolor\\\\t<Color>\\\\tThe color to use.\\\\n\\\\tpixelValue32 <Integer>\\\\tThe cached pixel value to use.!\\\\n\\\\n\\\\n!SolidFillStyle methodsFor: 'accessing' stamp: 'ar 1/14/1999 15:24'!\\\\ncolor: aColor\\\\n\\\\tcolor := aColor.\\\\n\\\\tpixelValue32 := aColor scaledPixelValue32! !\\\\n\\\\n!SolidFillStyle methodsFor: 'accessing' stamp: 'ar 11/9/1998 03:29'!\\\\ndisplay\\\\n\\\\t^color display! !\\\\n\\\\n!SolidFillStyle methodsFor: 'accessing' stamp: 'ar 1/14/1999 15:25'!\\\\nscaledPixelValue32\\\\n\\\\t\\\\\\\"Return the alpha scaled pixel value for depth 32\\\\\\\"\\\\n\\\\t^pixelValue32! !\\\\n\\\\n\\\\n!SolidFillStyle methodsFor: 'converting' stamp: 'ar 11/9/1998 13:55'!\\\\nasColor\\\\n\\\\t^color! !\\\\n\\\\n\\\\n!SolidFillStyle methodsFor: 'printing' stamp: 'ar 11/17/1998 00:29'!\\\\nprintOn: aStream\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream nextPut:$(; print: color; nextPut:$).! !\\\\n\\\\n\\\\n!SolidFillStyle methodsFor: 'testing' stamp: 'ar 11/8/1998 18:34'!\\\\nisSolidFill\\\\n\\\\t^true! !\\\\n\\\\n!SolidFillStyle methodsFor: 'testing' stamp: 'ar 9/2/1999 14:30'!\\\\nisTranslucent\\\\n\\\\t^color isTranslucent! !\\\\n\\\\n!SolidFillStyle methodsFor: 'testing' stamp: 'ar 10/26/2000 19:25'!\\\\nisTransparent\\\\n\\\\t^color isTransparent! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSolidFillStyle class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SolidFillStyle class methodsFor: 'instance creation' stamp: 'ar 11/8/1998 18:31'!\\\\ncolor: aColor\\\\n\\\\t^self new color: aColor! !\\\\nImageMorph subclass: #Sonogram\\\\n\\\\tinstanceVariableNames: 'lastX scrollDelta columnForm minVal maxVal pixValMap'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Sound-Synthesis'!\\\\n!Sonogram commentStamp: '<historical>' prior: 0!\\\\nSonograms are imageMorphs that will repeatedly plot arrays of values as black on white columns moving to the right in time and scrolling left as necessary.!\\\\n\\\\n\\\\n!Sonogram methodsFor: 'all' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nextent: extent minVal: min maxVal: max scrollDelta: d\\\\n\\\\tminVal := min.\\\\n\\\\tmaxVal := max.\\\\n\\\\tscrollDelta := d.\\\\n\\\\tself extent: extent.\\\\n\\\\n\\\\\\\" try following with scrolldelta = 1, 20, 200\\\\n\\\\t| s data |\\\\n\\\\ts := Sonogram new extent: 200@50\\\\n\\\\t\\\\t\\\\t\\\\tminVal: 0.0 maxVal: 1.0 scrollDelta: 20.\\\\n\\\\tWorld addMorph: s.\\\\n\\\\tdata := (1 to: 133) collect: [:i | 0.0].\\\\n\\\\t1 to: 300 do:\\\\n\\\\t\\\\t[:i | data at: (i\\\\\\\\\\\\\\\\133)+1 put: 1.0.\\\\n\\\\t\\\\ts plotColumn: data.\\\\n\\\\t\\\\tdata at: (i\\\\\\\\\\\\\\\\133)+1 put: 0.0.\\\\n\\\\t\\\\tWorld doOneCycleNow].\\\\n\\\\ts delete\\\\t\\\\n\\\\\\\"! !\\\\n\\\\n!Sonogram methodsFor: 'all' stamp: 'jdl 3/28/2003 09:30'!\\\\nplotColumn: dataArray \\\\n\\\\t| chm1 i normVal r |\\\\n\\\\tcolumnForm unhibernate.\\\\n\\\\tchm1 := columnForm height - 1.\\\\n\\\\t0 to: chm1\\\\n\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t[:y | \\\\n\\\\t\\\\t\\\\ti := y * (dataArray size - 1) // chm1 + 1.\\\\n\\\\t\\\\t\\\\tnormVal := ((dataArray at: i) - minVal) / (maxVal - minVal).\\\\n\\\\t\\\\t\\\\tnormVal := normVal max: 0.0.\\\\n\\\\t\\\\t\\\\tnormVal := normVal min: 1.0.\\\\n\\\\t\\\\t\\\\tcolumnForm bits at: chm1 - y + 1\\\\n\\\\t\\\\t\\\\t\\\\tput: (pixValMap at: (normVal * 255.0) truncated + 1)].\\\\n\\\\t(lastX := lastX + 1) > (image width - 1) ifTrue: [self scroll].\\\\n\\\\timage \\\\n\\\\t\\\\tcopy: (r := lastX @ 0 extent: 1 @ image height)\\\\n\\\\t\\\\tfrom: (32 // image depth - 1) @ 0\\\\n\\\\t\\\\tin: columnForm\\\\n\\\\t\\\\trule: Form over.\\\\n\\\\t\\\\\\\"self changed.\\\\\\\"\\\\n\\\\tself invalidRect: (r translateBy: self position)! !\\\\n\\\\n!Sonogram methodsFor: 'all' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nscroll\\\\n\\\\timage copy: (scrollDelta@0 extent: (image width-scrollDelta)@image height)\\\\n\\\\t\\\\t\\\\tfrom: image to: 0@0 rule: Form over.\\\\n\\\\tlastX := lastX - scrollDelta.\\\\n\\\\tself changed! !\\\\n\\\\n\\\\n!Sonogram methodsFor: 'geometry' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nextent: newExtent\\\\n\\\\tsuper image: (Form extent: newExtent depth: Display depth).\\\\n\\\\tlastX := -1.\\\\n\\\\tcolumnForm := Form extent: (32//image depth)@(image height) depth: image depth.\\\\n\\\\tpixValMap := ((1 to: 256) collect:\\\\n\\\\t\\\\t\\\\t[:i | columnForm pixelValueFor: (Color gray: (256-i)/255.0)])\\\\n\\\\t\\\\tas: Bitmap.\\\\n! !\\\\nOrderedCollection subclass: #SortedCollection\\\\n\\\\tinstanceVariableNames: 'sortBlock'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Collections-Sequenceable'!\\\\n!SortedCollection commentStamp: '<historical>' prior: 0!\\\\nI represent a collection of objects ordered by some property of the objects themselves. The ordering is specified in a BlockContext.!\\\\n\\\\n\\\\n!SortedCollection methodsFor: 'accessing' stamp: 'sma 4/28/2000 17:47'!\\\\nat: anInteger put: anObject\\\\n\\\\tself shouldNotImplement! !\\\\n\\\\n!SortedCollection methodsFor: 'accessing' stamp: 'tk 3/28/1999 22:55'!\\\\nmedian\\\\n\\\\t\\\\\\\"Return the middle element, or as close as we can get.\\\\\\\"\\\\n\\\\n\\\\t^ self at: self size + 1 // 2! !\\\\n\\\\n!SortedCollection methodsFor: 'accessing'!\\\\nsortBlock\\\\n\\\\t\\\\\\\"Answer the blockContext which is the criterion for sorting elements of \\\\n\\\\tthe receiver.\\\\\\\"\\\\n\\\\n\\\\t^sortBlock! !\\\\n\\\\n!SortedCollection methodsFor: 'accessing' stamp: 'stp 12/05/1999 07:09'!\\\\nsortBlock: aBlock \\\\n\\\\t\\\\\\\"Make the argument, aBlock, be the criterion for ordering elements of the \\\\n\\\\treceiver.\\\\\\\"\\\\n\\\\n\\\\taBlock\\\\n\\\\t\\\\tifNotNil: [sortBlock := aBlock fixTemps]\\\\n\\\\t\\\\tifNil: [sortBlock := aBlock].\\\\n\\\\t\\\\\\\"The sortBlock must copy its home context, so as to avoid circularities!!\\\\\\\"\\\\n\\\\t\\\\\\\"Therefore sortBlocks with side effects may not work right\\\\\\\"\\\\n\\\\tself size > 0 ifTrue: [self reSort]! !\\\\n\\\\n\\\\n!SortedCollection methodsFor: 'adding' stamp: 'go 4/27/2000 13:19'!\\\\nadd: newObject\\\\n\\\\t^ super insert: newObject before: (self indexForInserting: newObject)! !\\\\n\\\\n!SortedCollection methodsFor: 'adding' stamp: 'sma 4/28/2000 18:35'!\\\\naddAll: aCollection\\\\n\\\\taCollection size > (self size // 3)\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[aCollection do: [:each | self addLast: each].\\\\n\\\\t\\\\t\\\\tself reSort]\\\\n\\\\t\\\\tifFalse: [aCollection do: [:each | self add: each]].\\\\n\\\\t^ aCollection! !\\\\n\\\\n!SortedCollection methodsFor: 'adding' stamp: 'go 4/26/2000 17:26'!\\\\naddFirst: newObject\\\\n\\\\tself shouldNotImplement! !\\\\n\\\\n!SortedCollection methodsFor: 'adding' stamp: 'MPH 10/23/2000 13:31'!\\\\ncopyEmpty\\\\n\\\\t\\\\\\\"Answer a copy of the receiver without any of the receiver's elements.\\\\\\\"\\\\n\\\\n\\\\t^self species sortBlock: sortBlock! !\\\\n\\\\n\\\\n!SortedCollection methodsFor: 'comparing'!\\\\n= aSortedCollection\\\\n\\\\t\\\\\\\"Answer true if my and aSortedCollection's species are the same,\\\\n\\\\tand if our blocks are the same, and if our elements are the same.\\\\\\\"\\\\n\\\\n\\\\tself species = aSortedCollection species ifFalse: [^ false].\\\\n\\\\tsortBlock = aSortedCollection sortBlock\\\\n\\\\t\\\\tifTrue: [^ super = aSortedCollection]\\\\n\\\\t\\\\tifFalse: [^ false]! !\\\\n\\\\n\\\\n!SortedCollection methodsFor: 'copying'!\\\\ncopy\\\\n\\\\n\\\\t| newCollection |\\\\n\\\\tnewCollection _ self species sortBlock: sortBlock.\\\\n\\\\tnewCollection addAll: self.\\\\n\\\\t^newCollection! !\\\\n\\\\n\\\\n!SortedCollection methodsFor: 'enumerating' stamp: 'sma 2/5/2000 15:22'!\\\\ncollect: aBlock \\\\n\\\\t\\\\\\\"Evaluate aBlock with each of my elements as the argument. Collect the \\\\n\\\\tresulting values into an OrderedCollection. Answer the new collection. \\\\n\\\\tOverride the superclass in order to produce an OrderedCollection instead\\\\n\\\\tof a SortedCollection.\\\\\\\"\\\\n\\\\n\\\\t| newCollection | \\\\n\\\\tnewCollection _ OrderedCollection new: self size.\\\\n\\\\tself do: [:each | newCollection addLast: (aBlock value: each)].\\\\n\\\\t^ newCollection! !\\\\n\\\\n\\\\n!SortedCollection methodsFor: 'topological sort' stamp: 'hg 1/2/2002 13:34'!\\\\nsortTopologically\\\\n\\\\t\\\\\\\"Plenty of room for increased efficiency in this one.\\\\\\\"\\\\n\\\\n\\\\t| remaining result pick |\\\\n\\\\tremaining _ self asOrderedCollection.\\\\n\\\\tresult _ OrderedCollection new.\\\\n\\\\t[remaining isEmpty] whileFalse: [\\\\n\\\\t\\\\tpick _ remaining select: [:item |\\\\n\\\\t\\\\t\\\\tremaining allSatisfy: [:anotherItem |\\\\n\\\\t\\\\t\\\\t\\\\titem == anotherItem or: [self should: item precede: anotherItem]]].\\\\n\\\\t\\\\tpick isEmpty ifTrue: [self error: 'bad topological ordering'].\\\\n\\\\t\\\\tresult addAll: pick.\\\\n\\\\t\\\\tremaining removeAll: pick].\\\\n\\\\t^self copySameFrom: result! !\\\\n\\\\n\\\\n!SortedCollection methodsFor: 'private' stamp: 'stp 04/23/1999 05:36'!\\\\nindexForInserting: newObject\\\\n\\\\n\\\\t| index low high |\\\\n\\\\tlow _ firstIndex.\\\\n\\\\thigh _ lastIndex.\\\\n\\\\tsortBlock isNil\\\\n\\\\t\\\\tifTrue: [[index _ high + low // 2.  low > high]\\\\n\\\\t\\\\t\\\\twhileFalse: \\\\n\\\\t\\\\t\\\\t\\\\t[((array at: index) <= newObject)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [low _ index + 1]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [high _ index - 1]]]\\\\n\\\\t\\\\tifFalse: [[index _ high + low // 2.  low > high]\\\\n\\\\t\\\\t\\\\twhileFalse: \\\\n\\\\t\\\\t\\\\t\\\\t[(sortBlock value: (array at: index) value: newObject)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [low _ index + 1]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [high _ index - 1]]].\\\\n\\\\t^low! !\\\\n\\\\n!SortedCollection methodsFor: 'private' stamp: 'go 4/26/2000 17:17'!\\\\ninsert: anObject before: spot\\\\n\\\\tself shouldNotImplement! !\\\\n\\\\n!SortedCollection methodsFor: 'private' stamp: 'sma 4/28/2000 17:46'!\\\\nreSort\\\\n\\\\tself sort: firstIndex to: lastIndex! !\\\\n\\\\n!SortedCollection methodsFor: 'private' stamp: 'hg 12/17/2001 19:30'!\\\\nshould: a precede: b\\\\n\\\\n\\\\t^sortBlock ifNil: [a <= b] ifNotNil: [sortBlock value: a value: b]\\\\n! !\\\\n\\\\n!SortedCollection methodsFor: 'private' stamp: 'hg 12/17/2001 20:22'!\\\\nsort: i to: j \\\\n\\\\t\\\\\\\"Sort elements i through j of self to be nondescending according to\\\\n\\\\tsortBlock.\\\\\\\"\\\\n\\\\n\\\\t| di dij dj tt ij k l n |\\\\n\\\\t\\\\\\\"The prefix d means the data at that index.\\\\\\\"\\\\n\\\\t(n _ j + 1  - i) <= 1 ifTrue: [^self].\\\\t\\\\\\\"Nothing to sort.\\\\\\\" \\\\n\\\\t \\\\\\\"Sort di,dj.\\\\\\\"\\\\n\\\\tdi _ array at: i.\\\\n\\\\tdj _ array at: j.\\\\n\\\\t(self should: di precede: dj)\\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[array swap: i with: j.\\\\n\\\\t\\\\t\\\\t tt _ di.\\\\n\\\\t\\\\t\\\\t di _ dj.\\\\n\\\\t\\\\t\\\\t dj _ tt].\\\\n\\\\tn > 2\\\\n\\\\t\\\\tifTrue:  \\\\\\\"More than two elements.\\\\\\\"\\\\n\\\\t\\\\t\\\\t[ij _ (i + j) // 2.  \\\\\\\"ij is the midpoint of i and j.\\\\\\\"\\\\n\\\\t\\\\t\\\\t dij _ array at: ij.  \\\\\\\"Sort di,dij,dj.  Make dij be their median.\\\\\\\"\\\\n\\\\t\\\\t\\\\t (self should: di precede: dij)\\\\n\\\\t\\\\t\\\\t   ifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t[(self should: dij precede: dj)\\\\n\\\\t\\\\t\\\\t\\\\t  ifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[array swap: j with: ij.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t dij _ dj]]\\\\n\\\\t\\\\t\\\\t   ifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[array swap: i with: ij.\\\\n\\\\t\\\\t\\\\t\\\\t dij _ di].\\\\n\\\\t\\\\t\\\\tn > 3\\\\n\\\\t\\\\t\\\\t  ifTrue:  \\\\\\\"More than three elements.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t[\\\\\\\"Find k>i and l<j such that dk,dij,dl are in reverse order.\\\\n\\\\t\\\\t\\\\t\\\\tSwap k and l.  Repeat this procedure until k and l pass each other.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t k _ i.\\\\n\\\\t\\\\t\\\\t\\\\t l _ j.\\\\n\\\\t\\\\t\\\\t\\\\t [[l _ l - 1.  k <= l and: [self should: dij precede: (array at: l)]]\\\\n\\\\t\\\\t\\\\t\\\\t   whileTrue.  \\\\\\\"i.e. while dl succeeds dij\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t  [k _ k + 1.  k <= l and: [self should: (array at: k) precede: dij]]\\\\n\\\\t\\\\t\\\\t\\\\t   whileTrue.  \\\\\\\"i.e. while dij succeeds dk\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t  k <= l]\\\\n\\\\t\\\\t\\\\t\\\\t   whileTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[array swap: k with: l]. \\\\n\\\\t\\\\\\\"Now l<k (either 1 or 2 less), and di through dl are all less than or equal to dk\\\\n\\\\tthrough dj.  Sort those two segments.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tself sort: i to: l.\\\\n\\\\t\\\\t\\\\t\\\\tself sort: k to: j]]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSortedCollection class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SortedCollection class methodsFor: 'instance creation' stamp: 'stp 04/23/1999 05:34'!\\\\nnew: anInteger \\\\n\\\\t\\\\\\\"The default sorting function is a <= comparison on elements.\\\\\\\"\\\\n\\\\n\\\\t^(super new: anInteger) \\\\\\\"sortBlock: [:x :y | x <= y]\\\\\\\" \\\\t\\\\t\\\\\\\"nil sortBlock OK\\\\\\\"! !\\\\n\\\\n!SortedCollection class methodsFor: 'instance creation'!\\\\nsortBlock: aBlock \\\\n\\\\t\\\\\\\"Answer an instance of me such that its elements are sorted according to \\\\n\\\\tthe criterion specified in aBlock.\\\\\\\"\\\\n\\\\n\\\\t^(super new: 10) sortBlock: aBlock! !\\\\nTestCase subclass: #SortedCollectionTest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'CollectionsTests-Unordered'!\\\\n\\\\n!SortedCollectionTest methodsFor: 'basic' stamp: 'DM 3/16/2006 11:27'!\\\\ntestAdd\\\\n\\\\t\\\\\\\"self run: #testAdd\\\\\\\"\\\\n\\\\t\\\\\\\"self debug: #testAdd\\\\\\\"\\\\n\\\\t\\\\n\\\\t| collection |\\\\n\\\\tcollection := #(10 9 8 7 5 4 4 2) asSortedCollection.\\\\n\\\\tself assert: collection first = 2.\\\\n\\\\tself assert: collection last = 10.\\\\n\\\\tself assert: (collection size = 8).\\\\n\\\\tcollection add:1.\\\\n\\\\tself assert: (collection size = 9).\\\\n\\\\tcollection add: 6.\\\\n\\\\tself assert: ((collection at: 5) = 5).\\\\n\\\\tself assert: (collection size = 10).\\\\n\\\\tcollection add: 3.\\\\n\\\\t! !\\\\n\\\\n!SortedCollectionTest methodsFor: 'basic' stamp: 'DM 3/16/2006 11:30'!\\\\ntestAddAll\\\\n\\\\t\\\\\\\"self run: #testAddAll\\\\\\\"\\\\n\\\\t\\\\\\\"self debug: #testAddAll\\\\\\\"\\\\n\\\\t\\\\n\\\\t| sorted2 sorted|\\\\n\\\\tsorted2 := SortedCollection new.\\\\n\\\\tsorted2 add: 'brochet'; add:'truitelle'.\\\\n\\\\tsorted := SortedCollection new.\\\\n\\\\tsorted addAll: sorted2.\\\\n\\\\tself assert: (sorted hasEqualElements: sorted2).\\\\n\\\\t ! !\\\\n\\\\n!SortedCollectionTest methodsFor: 'basic' stamp: 'DM 3/16/2006 11:32'!\\\\ntestAddAll2\\\\n\\\\t\\\\\\\"self run: #testAddAll2\\\\\\\"\\\\n\\\\t\\\\\\\"self debug: #testAddAll2\\\\\\\"\\\\n\\\\t\\\\n\\\\t| sorted2 sorted|\\\\n\\\\tsorted2 := SortedCollection new.\\\\n\\\\tsorted2 add: 'brochet'; add:'truitelle'.\\\\n\\\\tsorted := SortedCollection new.\\\\n\\\\tsorted add: 'perche'.\\\\n\\\\tsorted addAll: sorted2.\\\\n\\\\tself assert: (sorted size = (sorted2 size + 1)).\\\\n\\\\tsorted2 do: \\\\n\\\\t\\\\t\\\\t[ :each | self assert: (sorted includes: each)]\\\\n\\\\t ! !\\\\n\\\\n!SortedCollectionTest methodsFor: 'basic' stamp: 'DM 3/16/2006 11:33'!\\\\ntestCollect\\\\n\\\\t\\\\\\\"self run: #testCollect\\\\\\\"\\\\n\\\\t\\\\n\\\\t|result aSortedCollection|\\\\n\\\\taSortedCollection := SortedCollection new.\\\\n\\\\tresult := OrderedCollection new.\\\\n\\\\tresult add:true ; add: true ; add: true ;add: false ; add: false.\\\\n\\\\taSortedCollection := (1 to: 5) asSortedCollection.\\\\n\\\\tself assert: (result = (aSortedCollection collect: [:each | each < 4])).\\\\n\\\\t! !\\\\n\\\\n!SortedCollectionTest methodsFor: 'basic' stamp: 'DM 3/16/2006 11:39'!\\\\ntestCopy\\\\n\\\\t\\\\\\\"self run: #testCopy\\\\\\\"\\\\n\\\\t\\\\\\\"self debug: #testCopy\\\\\\\"\\\\n\\\\t\\\\n\\\\t|aSortedCollection copySorted|\\\\n\\\\taSortedCollection := SortedCollection new.\\\\n\\\\taSortedCollection sortBlock: [:a :b | a < b].\\\\n\\\\taSortedCollection add: 'truite' ; add: 'brochet'.\\\\n\\\\tself assert: aSortedCollection first = 'brochet'.\\\\n\\\\t\\\\n\\\\tcopySorted := aSortedCollection copy.\\\\n\\\\t\\\\n\\\\tself assert: (copySorted  hasEqualElements: aSortedCollection).\\\\n\\\\tself assert: (copySorted  species = aSortedCollection species).\\\\n\\\\tself assert: (copySorted  sortBlock = aSortedCollection sortBlock).\\\\n\\\\tself assert: copySorted first = 'brochet'.! !\\\\n\\\\n!SortedCollectionTest methodsFor: 'basic' stamp: 'DM 3/16/2006 11:30'!\\\\ntestCreation\\\\n\\\\t\\\\\\\"self run: #testCreation\\\\\\\"\\\\n\\\\t\\\\\\\"self debug: #testCreation\\\\\\\"\\\\n\\\\t\\\\n\\\\t| collection |\\\\n\\\\tcollection := #(10 9 3 6 1 8 7 5 4 2) asSortedCollection.\\\\n\\\\tself assert: collection = (1 to: 10) asSortedCollection.\\\\n\\\\t! !\\\\n\\\\n!SortedCollectionTest methodsFor: 'basic' stamp: 'DM 3/16/2006 11:42'!\\\\ntestEquals\\\\n\\\\t\\\\\\\"self run: #testEquals\\\\\\\"\\\\n\\\\t\\\\\\\"self debug: #testEquals\\\\\\\"\\\\n\\\\t\\\\n\\\\t|aSortedCollection|\\\\n\\\\taSortedCollection := SortedCollection new.\\\\n\\\\taSortedCollection add:'truite' ; add: 'brochet'.\\\\n\\\\tself assert: aSortedCollection copy = aSortedCollection.! !\\\\n\\\\n!SortedCollectionTest methodsFor: 'basic' stamp: 'DM 3/16/2006 11:43'!\\\\ntestMedian\\\\n\\\\t\\\\\\\"self run: #testMedian\\\\\\\"\\\\n\\\\t\\\\\\\"self debug: #testMedian\\\\\\\"\\\\n\\\\t\\\\n\\\\t|aSortedCollection|\\\\n\\\\taSortedCollection := (1 to: 10) asSortedCollection.\\\\n\\\\tself assert: aSortedCollection median=5.\\\\n\\\\t\\\\n\\\\taSortedCollection := SortedCollection new.\\\\n\\\\taSortedCollection add:'truite' ; add:'porcinet' ; add:'carpe'.\\\\n\\\\tself assert: (aSortedCollection median = 'porcinet').\\\\n\\\\t! !\\\\n\\\\n!SortedCollectionTest methodsFor: 'basic' stamp: 'DM 3/16/2006 11:46'!\\\\ntestShouldPrecede\\\\n\\\\t\\\\\\\"self run: #testShouldPrecede\\\\\\\"\\\\n\\\\t\\\\n\\\\t|aSortedCollection|\\\\n\\\\taSortedCollection := SortedCollection new.\\\\n\\\\tself assert: (aSortedCollection should: 'za' precede: 'zb').\\\\n\\\\tself assert: (aSortedCollection isEmpty).\\\\n\\\\tself assert: (aSortedCollection should: 1 precede: 2).\\\\n\\\\t\\\\n\\\\taSortedCollection sortBlock: [:a :b | a > b].\\\\n\\\\taSortedCollection reSort.\\\\n\\\\tself assert: (aSortedCollection should: 'zb' precede: 'za').\\\\n\\\\tself assert: (aSortedCollection isEmpty).\\\\n\\\\tself assert: (aSortedCollection should: 2 precede: 1).\\\\n\\\\t\\\\t! !\\\\n\\\\n!SortedCollectionTest methodsFor: 'basic' stamp: 'DM 3/16/2006 11:38'!\\\\ntestSortBlock\\\\n\\\\t\\\\\\\"self run: #testSortBlock\\\\\\\"\\\\n\\\\t\\\\\\\"self debug: #testSortBlock\\\\\\\"\\\\n\\\\t\\\\n\\\\t|aSortedCollection|\\\\n\\\\taSortedCollection := SortedCollection new.\\\\n\\\\taSortedCollection sortBlock: [:a :b | a < b].\\\\n\\\\taSortedCollection add: 'truite' ; add: 'brochet' ; add: 'tortue'.\\\\n\\\\tself assert: aSortedCollection first = 'brochet'.\\\\n\\\\t\\\\n\\\\taSortedCollection := SortedCollection new.\\\\n\\\\taSortedCollection sortBlock: [:a :b | a >b].\\\\n\\\\taSortedCollection add: 'truite' ; add: 'brochet' ; add: 'tortue'.\\\\n\\\\tself assert: aSortedCollection first = 'truite'.\\\\n\\\\t\\\\n\\\\t\\\\n\\\\t! !\\\\nBorderedMorph subclass: #SorterTokenMorph\\\\n\\\\tinstanceVariableNames: 'morphRepresented'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-Palettes'!\\\\n\\\\n!SorterTokenMorph methodsFor: 'as yet unclassified' stamp: 'sw 12/1/1998 12:38'!\\\\nfitContents\\\\n\\\\tsubmorphs size == 1 ifTrue: [self bounds: (submorphs first bounds insetBy: (-1 @ -1))]! !\\\\n\\\\n!SorterTokenMorph methodsFor: 'as yet unclassified' stamp: 'dgd 2/21/2003 23:16'!\\\\nforMorph: aMorph \\\\n\\\\t| it |\\\\n\\\\tmorphRepresented := aMorph.\\\\n\\\\taMorph submorphs notEmpty \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[self addMorphBack: (it := aMorph submorphs first veryDeepCopy).\\\\n\\\\t\\\\t\\\\tit position: self position + (1 @ 1).\\\\n\\\\t\\\\t\\\\tit lock].\\\\n\\\\tself fitContents! !\\\\n\\\\n\\\\n!SorterTokenMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:35'!\\\\ndefaultBorderColor\\\\n\\\\t\\\\\\\"answer the default border color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color blue! !\\\\n\\\\n!SorterTokenMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:40'!\\\\ndefaultBorderWidth\\\\n\\\\t\\\\\\\"answer the default border width for the receiver\\\\\\\"\\\\n\\\\t^ 1! !\\\\n\\\\n!SorterTokenMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:31'!\\\\ndefaultColor\\\\n\\\\t\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color transparent! !\\\\n\\\\n\\\\n!SorterTokenMorph methodsFor: 'thumbnail' stamp: 'sw 12/1/1998 12:27'!\\\\nmorphRepresented\\\\n\\\\t^ morphRepresented! !\\\\nArrayedCollection variableWordSubclass: #SoundBuffer\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: 'SineTable'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Sound-Synthesis'!\\\\n!SoundBuffer commentStamp: '<historical>' prior: 0!\\\\nSoundBuffers store 16 bit unsigned quantities.  !\\\\n\\\\n\\\\n!SoundBuffer methodsFor: 'accessing' stamp: 'tk 3/13/2000 14:46'!\\\\nbytesPerElement\\\\n\\\\t\\\\\\\"Number of bytes in each item.  This multiplied by (self size)*8 gives the number of bits stored.\\\\\\\"\\\\n\\\\t^ 2! !\\\\n\\\\n!SoundBuffer methodsFor: 'accessing' stamp: 'jm 9/17/97 13:00'!\\\\nmonoSampleCount\\\\n\\\\t\\\\\\\"Return the number of monaural 16-bit samples that fit into this SoundBuffer.\\\\\\\"\\\\n\\\\n\\\\t^ super size * 2\\\\n! !\\\\n\\\\n!SoundBuffer methodsFor: 'accessing' stamp: 'jm 9/17/97 13:28'!\\\\nsize\\\\n\\\\t\\\\\\\"Return the number of 16-bit sound samples that fit in this sound buffer. To avoid confusion, it is better to get the size of SoundBuffer using monoSampleCount or stereoSampleCount.\\\\\\\"\\\\n\\\\n\\\\t^ self monoSampleCount\\\\n! !\\\\n\\\\n!SoundBuffer methodsFor: 'accessing' stamp: 'jm 9/17/97 13:01'!\\\\nstereoSampleCount\\\\n\\\\t\\\\\\\"Return the number of stereo slices that fit into this SoundBuffer. A stereo 'slice' consists of two 16-bit samples, one for each channel.\\\\\\\"\\\\n\\\\n\\\\t^ super size\\\\n! !\\\\n\\\\n\\\\n!SoundBuffer methodsFor: 'as yet unclassified' stamp: 'RAA 7/11/2000 11:31'!\\\\nwriteOnGZIPByteStream: aStream \\\\n\\\\t\\\\n\\\\taStream nextPutAllWordArray: self! !\\\\n\\\\n\\\\n!SoundBuffer methodsFor: 'objects from disk' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nrestoreEndianness\\\\n\\\\t\\\\\\\"This word object was just read in from a stream.  It was stored in Big Endian (Mac) format.  Swap each pair of bytes (16-bit word), if the current machine is Little Endian.\\\\n\\\\tWhy is this the right thing to do?  We are using memory as a byteStream.  High and low bytes are reversed in each 16-bit word, but the stream of words ascends through memory.  Different from a Bitmap.\\\\\\\"\\\\n\\\\n\\\\t| hack blt |\\\\n\\\\tSmalltalkImage current  isLittleEndian ifTrue: [\\\\n\\\\t\\\\t\\\\\\\"The implementation is a hack, but fast for large ranges\\\\\\\"\\\\n\\\\t\\\\thack := Form new hackBits: self.\\\\n\\\\t\\\\tblt := (BitBlt toForm: hack) sourceForm: hack.\\\\n\\\\t\\\\tblt combinationRule: Form reverse.  \\\\\\\"XOR\\\\\\\"\\\\n\\\\t\\\\tblt sourceY: 0; destY: 0; height: self size; width: 1.\\\\n\\\\t\\\\tblt sourceX: 0; destX: 1; copyBits.  \\\\\\\"Exchange bytes 0 and 1\\\\\\\"\\\\n\\\\t\\\\tblt sourceX: 1; destX: 0; copyBits.\\\\n\\\\t\\\\tblt sourceX: 0; destX: 1; copyBits.\\\\n\\\\t\\\\tblt sourceX: 2; destX: 3; copyBits.  \\\\\\\"Exchange bytes 2 and 3\\\\\\\"\\\\n\\\\t\\\\tblt sourceX: 3; destX: 2; copyBits.\\\\n\\\\t\\\\tblt sourceX: 2; destX: 3; copyBits].\\\\n\\\\n! !\\\\n\\\\n!SoundBuffer methodsFor: 'objects from disk' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nreverseEndianness\\\\n\\\\t\\\\\\\"Swap the bytes of each 16-bit word, using a fast BitBlt hack.\\\\\\\"\\\\n\\\\n\\\\t| hack blt |\\\\n\\\\thack := Form new hackBits: self.\\\\n\\\\tblt := (BitBlt toForm: hack) sourceForm: hack.\\\\n\\\\tblt combinationRule: Form reverse.  \\\\\\\"XOR\\\\\\\"\\\\n\\\\tblt sourceY: 0; destY: 0; height: self size; width: 1.\\\\n\\\\tblt sourceX: 0; destX: 1; copyBits.  \\\\\\\"Exchange bytes 0 and 1\\\\\\\"\\\\n\\\\tblt sourceX: 1; destX: 0; copyBits.\\\\n\\\\tblt sourceX: 0; destX: 1; copyBits.\\\\n\\\\tblt sourceX: 2; destX: 3; copyBits.  \\\\\\\"Exchange bytes 2 and 3\\\\\\\"\\\\n\\\\tblt sourceX: 3; destX: 2; copyBits.\\\\n\\\\tblt sourceX: 2; destX: 3; copyBits.\\\\n! !\\\\n\\\\n\\\\n!SoundBuffer methodsFor: 'primitives' stamp: 'jm 9/17/97 13:03'!\\\\nat: index\\\\n\\\\t\\\\\\\"Return the 16-bit integer value at the given index of the receiver.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 143>\\\\n\\\\tindex isInteger ifTrue: [self errorSubscriptBounds: index].\\\\n\\\\tindex isNumber ifTrue: [^ self at: index truncated].\\\\n\\\\tself errorNonIntegerIndex.\\\\n! !\\\\n\\\\n!SoundBuffer methodsFor: 'primitives' stamp: 'jm 9/17/97 13:03'!\\\\nat: index put: value\\\\n\\\\t\\\\\\\"Store the given 16-bit integer at the given index in the receiver.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 144>\\\\n\\\\tindex isInteger\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t(index >= 1 and: [index <= self size])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self errorImproperStore]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self errorSubscriptBounds: index]].\\\\n\\\\tindex isNumber ifTrue: [^ self at: index truncated put: value].\\\\n\\\\tself errorNonIntegerIndex.\\\\n! !\\\\n\\\\n!SoundBuffer methodsFor: 'primitives' stamp: 'jm 9/2/97 16:07'!\\\\nprimFill: aPositiveInteger\\\\n\\\\t\\\\\\\"Fill the receiver, an indexable bytes or words object, with the given positive integer. The range of possible fill values is [0..255] for byte arrays and [0..(2^32 - 1)] for word arrays.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: Since 16-bit word arrays are not built into the virtual machine, this primitive fills by 32-bit words.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 145>\\\\n\\\\tself errorImproperStore.\\\\n! !\\\\n\\\\n\\\\n!SoundBuffer methodsFor: 'utilities' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nasByteArray\\\\n\\\\t\\\\\\\"Answer a ByteArray containing my sample data serialized in most-significant byte first order.\\\\\\\"\\\\n\\\\n\\\\t| sampleCount bytes dst s |\\\\n\\\\tsampleCount := self monoSampleCount.\\\\n\\\\tbytes := ByteArray new: 2 * sampleCount.\\\\n\\\\tdst := 0.\\\\n\\\\t1 to: sampleCount do: [:src |\\\\n\\\\t\\\\ts := self at: src.\\\\n\\\\t\\\\tbytes at: (dst := dst + 1) put: ((s bitShift: -8) bitAnd: 255).\\\\n\\\\t\\\\tbytes at: (dst := dst + 1) put: (s bitAnd: 255)].\\\\n\\\\t^ bytes\\\\n\\\\n\\\\t! !\\\\n\\\\n!SoundBuffer methodsFor: 'utilities' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\naverageEvery: nSamples from: anotherBuffer upTo: inCount\\\\n\\\\n\\\\t| fromIndex sum |\\\\n\\\\n\\\\tfromIndex := 1.\\\\n\\\\t1 to: inCount // nSamples do: [ :i |\\\\n\\\\t\\\\tsum := 0.\\\\n\\\\t\\\\tnSamples timesRepeat: [\\\\n\\\\t\\\\t\\\\tsum := sum + (anotherBuffer at: fromIndex).\\\\n\\\\t\\\\t\\\\tfromIndex := fromIndex + 1.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tself at: i put: sum // nSamples.\\\\n\\\\t].\\\\n! !\\\\n\\\\n!SoundBuffer methodsFor: 'utilities' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ndownSampledLowPassFiltering: doFiltering\\\\n\\\\t\\\\\\\"Answer a new SoundBuffer half the size of the receiver consisting of every other sample. If doFiltering is true, a simple low-pass filter is applied to avoid aliasing of high frequencies. Assume that receiver is monophonic.\\\\\\\"\\\\n\\\\t\\\\\\\"Details: The simple low-pass filter in the current implementation could be improved, at some additional cost.\\\\\\\"\\\\n\\\\n\\\\t| n resultBuf j |\\\\n\\\\tn := self monoSampleCount.\\\\n\\\\tresultBuf := SoundBuffer newMonoSampleCount: n // 2.\\\\n\\\\tj := 0.\\\\n\\\\tdoFiltering\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t1 to: n by: 2 do: [:i |\\\\n\\\\t\\\\t\\\\t\\\\tresultBuf at: (j := j + 1) put:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(((self at: i) + (self at: i + 1)) bitShift: -1)]]\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t1 to: n by: 2 do: [:i |\\\\n\\\\t\\\\t\\\\t\\\\tresultBuf at: (j := j + 1) put: (self at: i)]].\\\\n\\\\n\\\\t^ resultBuf! !\\\\n\\\\n!SoundBuffer methodsFor: 'utilities' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nextractLeftChannel\\\\n\\\\t\\\\\\\"Answer a new SoundBuffer half the size of the receiver consisting of only the left channel of the receiver, which is assumed to contain stereo sound data.\\\\\\\"\\\\n\\\\n\\\\t| n resultBuf j |\\\\n\\\\tn := self monoSampleCount.\\\\n\\\\tresultBuf := SoundBuffer newMonoSampleCount: n // 2.\\\\n\\\\tj := 0.\\\\n\\\\t1 to: n by: 2 do: [:i | resultBuf at: (j := j + 1) put: (self at: i)].\\\\n\\\\t^ resultBuf! !\\\\n\\\\n!SoundBuffer methodsFor: 'utilities' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nextractRightChannel\\\\n\\\\t\\\\\\\"Answer a new SoundBuffer half the size of the receiver consisting of only the right channel of the receiver, which is assumed to contain stereo sound data.\\\\\\\"\\\\n\\\\n\\\\t| n resultBuf j |\\\\n\\\\tn := self monoSampleCount.\\\\n\\\\tresultBuf := SoundBuffer newMonoSampleCount: n // 2.\\\\n\\\\tj := 0.\\\\n\\\\t2 to: n by: 2 do: [:i | resultBuf at: (j := j + 1) put: (self at: i)].\\\\n\\\\t^ resultBuf! !\\\\n\\\\n!SoundBuffer methodsFor: 'utilities' stamp: 'jhm 10/15/97 15:13'!\\\\nindexOfFirstSampleOver: threshold\\\\n\\\\t\\\\\\\"Return the index of the first sample whose absolute value is over the given threshold value. Return an index one greater than my size if no sample is over the threshold.\\\\\\\"\\\\n\\\\n\\\\t1 to: self size do: [:i |\\\\n\\\\t\\\\t(self at: i) abs > threshold ifTrue: [^ i]].\\\\n\\\\t^ self size + 1! !\\\\n\\\\n!SoundBuffer methodsFor: 'utilities' stamp: 'jhm 10/15/97 15:13'!\\\\nindexOfLastSampleOver: threshold\\\\n\\\\t\\\\\\\"Return the index of the last sample whose absolute value is over the given threshold value. Return zero if no sample is over the threshold.\\\\\\\"\\\\n\\\\n\\\\tself size to: 1 by: -1 do: [:i |\\\\n\\\\t\\\\t(self at: i) abs > threshold ifTrue: [^ i]].\\\\n\\\\t^ 0\\\\n! !\\\\n\\\\n!SoundBuffer methodsFor: 'utilities' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nlowPassFiltered\\\\n\\\\t\\\\\\\"Answer a simple low-pass filtered copy of this buffer. Assume it is monophonic.\\\\\\\"\\\\n\\\\n\\\\t| sz out last this |\\\\n\\\\tsz := self monoSampleCount.\\\\n\\\\tout := self clone.\\\\n\\\\tlast := self at: 1.\\\\n\\\\t2 to: sz do: [:i |\\\\n\\\\t\\\\tthis := self at: i.\\\\n\\\\t\\\\tout at: i put: (this + last) // 2.\\\\n\\\\t\\\\tlast := this].\\\\n\\\\t^ out\\\\n! !\\\\n\\\\n!SoundBuffer methodsFor: 'utilities' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nmergeStereo\\\\n\\\\t\\\\\\\"Answer a new SoundBuffer half the size of the receiver that mixes the left and right stereo channels of the receiver, which is assumed to contain stereo sound data.\\\\\\\"\\\\n\\\\n\\\\t| n resultBuf j |\\\\n\\\\tn := self monoSampleCount.\\\\n\\\\tresultBuf := SoundBuffer newMonoSampleCount: n // 2.\\\\n\\\\tj := 0.\\\\n\\\\t1 to: n by: 2 do: [:i | resultBuf at: (j := j + 1) put: (((self at: i) + (self at: i + 1)) // 2)].\\\\n\\\\t^ resultBuf\\\\n! !\\\\n\\\\n!SoundBuffer methodsFor: 'utilities' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nnormalized: percentOfFullVolume\\\\n\\\\t\\\\\\\"Increase my amplitudes so that the highest peak is the given percent of full volume. For example 's normalized: 50' would normalize to half of full volume.\\\\\\\"\\\\n\\\\n\\\\t| peak s mult |\\\\n\\\\tpeak := 0.\\\\n\\\\t1 to: self size do: [:i |\\\\n\\\\t\\\\ts := (self at: i) abs.\\\\n\\\\t\\\\ts > peak ifTrue: [peak := s]].\\\\n\\\\tmult := (32767.0 * percentOfFullVolume) / (100.0 * peak).\\\\n\\\\t1 to: self size do: [:i | self at: i put: (mult * (self at: i)) asInteger].\\\\n! !\\\\n\\\\n!SoundBuffer methodsFor: 'utilities' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nsaveAsAIFFFileSamplingRate: rate on: aBinaryStream\\\\n\\\\t\\\\\\\"Store this mono sound buffer in AIFF file format with the given sampling rate on the given stream.\\\\\\\"\\\\n\\\\n\\\\t| sampleCount s swapBytes |\\\\n\\\\tsampleCount := self monoSampleCount.\\\\n\\\\taBinaryStream nextPutAll: 'FORM' asByteArray.\\\\n\\\\taBinaryStream nextInt32Put: (2 * sampleCount) + ((7 * 4) + 18).\\\\n\\\\taBinaryStream nextPutAll: 'AIFF' asByteArray.\\\\n\\\\taBinaryStream nextPutAll: 'COMM' asByteArray.\\\\n\\\\taBinaryStream nextInt32Put: 18.\\\\n\\\\taBinaryStream nextNumber: 2 put: 1.  \\\\\\\"channels\\\\\\\"\\\\n\\\\taBinaryStream nextInt32Put: sampleCount.\\\\n\\\\taBinaryStream nextNumber: 2 put: 16.  \\\\\\\"bits/sample\\\\\\\"\\\\n\\\\tself storeExtendedFloat: rate on: aBinaryStream.\\\\n\\\\taBinaryStream nextPutAll: 'SSND' asByteArray.\\\\n\\\\taBinaryStream nextInt32Put: (2 * sampleCount) + 8.\\\\n\\\\taBinaryStream nextInt32Put: 0.\\\\n\\\\taBinaryStream nextInt32Put: 0.\\\\n\\\\n\\\\t(aBinaryStream isKindOf: StandardFileStream) ifTrue: [\\\\n\\\\t\\\\t\\\\\\\"optimization: write sound buffer directly to file\\\\\\\"\\\\n\\\\t\\\\tswapBytes := SmalltalkImage current  isLittleEndian.\\\\n\\\\t\\\\tswapBytes ifTrue: [self reverseEndianness].  \\\\\\\"make big endian\\\\\\\"\\\\n\\\\t\\\\taBinaryStream next: (self size // 2) putAll: self startingAt: 1.  \\\\\\\"size in words\\\\\\\"\\\\n\\\\t\\\\tswapBytes ifTrue: [self reverseEndianness].  \\\\\\\"revert to little endian\\\\\\\"\\\\n\\\\t\\\\t^ self].\\\\n\\\\n\\\\t1 to: sampleCount do: [:i |\\\\n\\\\t\\\\ts := self at: i.\\\\n\\\\t\\\\taBinaryStream nextPut: ((s bitShift: -8) bitAnd: 16rFF).\\\\n\\\\t\\\\taBinaryStream nextPut: (s bitAnd: 16rFF)].\\\\n! !\\\\n\\\\n!SoundBuffer methodsFor: 'utilities' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nsplitStereo\\\\n\\\\t\\\\\\\"Answer an array of two SoundBuffers half the size of the receiver consisting of the left and right channels of the receiver (which is assumed to contain stereo sound data).\\\\\\\"\\\\n\\\\n\\\\t| n leftBuf rightBuf leftIndex rightIndex |\\\\n\\\\tn := self monoSampleCount.\\\\n\\\\tleftBuf := SoundBuffer newMonoSampleCount: n // 2.\\\\n\\\\trightBuf := SoundBuffer newMonoSampleCount: n // 2.\\\\n\\\\tleftIndex := rightIndex := 0.\\\\n\\\\t1 to: n by: 2 do: [:i |\\\\n\\\\t\\\\tleftBuf at: (leftIndex := leftIndex + 1) put: (self at: i).\\\\n\\\\t\\\\trightBuf at: (rightIndex := rightIndex + 1) put: (self at: i + 1)].\\\\n\\\\t^ Array with: leftBuf with: rightBuf\\\\n! !\\\\n\\\\n!SoundBuffer methodsFor: 'utilities' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nstoreExtendedFloat: aNumber on: aBinaryStream\\\\n\\\\t\\\\\\\"Store an Apple extended-precision 80-bit floating point number on the given stream.\\\\\\\"\\\\n\\\\t\\\\\\\"Details: I could not find the specification for this format, so constants were determined empirically based on assumption of 1-bit sign, 15-bit exponent, 64-bit mantissa. This format does not seem to have an implicit one before the mantissa as some float formats do.\\\\\\\"\\\\n\\\\n\\\\t| n isNeg exp mantissa |\\\\n\\\\tn := aNumber asFloat.\\\\n\\\\tisNeg := false.\\\\n\\\\tn < 0.0 ifTrue: [\\\\n\\\\t\\\\tn := 0.0 - n.\\\\n\\\\t\\\\tisNeg := true].\\\\n\\\\texp := (n log: 2.0) ceiling.\\\\n\\\\tmantissa := (n * (2 raisedTo: 64 - exp)) truncated.\\\\n\\\\texp := exp + 16r4000 - 2.  \\\\\\\"not sure why the -2 is needed...\\\\\\\"\\\\n\\\\tisNeg ifTrue: [exp := exp bitOr: 16r8000].  \\\\\\\"set sign bit\\\\\\\"\\\\n\\\\taBinaryStream nextPut: ((exp bitShift: -8) bitAnd: 16rFF).\\\\n\\\\taBinaryStream nextPut: (exp bitAnd: 16rFF).\\\\n\\\\t8 to: 1 by: -1 do: [:i | aBinaryStream nextPut: (mantissa digitAt: i)].! !\\\\n\\\\n!SoundBuffer methodsFor: 'utilities' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ntrimmedThreshold: threshold\\\\n\\\\n\\\\t| start end |\\\\n\\\\tstart := self indexOfFirstSampleOver: threshold.\\\\n\\\\tend :=  self indexOfLastSampleOver: threshold.\\\\n\\\\tstart > end ifTrue: [^ SoundBuffer new].\\\\n\\\\tstart := (start - 200) max: 1.\\\\n\\\\tend := (end + 200) min: self size.\\\\n\\\\t^ self copyFrom: start to: end\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSoundBuffer class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SoundBuffer class methodsFor: 'class initialization' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Build a sine wave table.\\\\\\\"\\\\n\\\\t\\\\\\\"SoundBuffer initialize\\\\\\\"\\\\n\\\\n\\\\t| tableSize radiansPerStep peak |\\\\n\\\\ttableSize := 4000.\\\\n\\\\tSineTable := self newMonoSampleCount: tableSize.\\\\n\\\\tradiansPerStep := (2.0 * Float pi) / tableSize asFloat.\\\\n\\\\tpeak := ((1 bitShift: 15) - 1) asFloat.  \\\\\\\"range is +/- (2^15 - 1)\\\\\\\"\\\\n\\\\t1 to: tableSize do: [:i |\\\\n\\\\t\\\\tSineTable at: i put: (peak * (radiansPerStep * (i - 1)) sin) rounded].\\\\n! !\\\\n\\\\n!SoundBuffer class methodsFor: 'class initialization' stamp: 'ads 7/31/2003 11:13'!\\\\nsineTable\\\\n\\\\t\\\\\\\"Answer a SoundBuffer containing one complete cycle of a sine wave.\\\\\\\"\\\\n\\\\n\\\\t^ SineTable\\\\n! !\\\\n\\\\n\\\\n!SoundBuffer class methodsFor: 'instance creation' stamp: 'RAA 12/30/2000 18:20'!\\\\naverageEvery: nSamples from: anotherBuffer upTo: inCount\\\\n\\\\n\\\\t^(self newMonoSampleCount: inCount // nSamples)\\\\n\\\\t\\\\taverageEvery: nSamples \\\\n\\\\t\\\\tfrom: anotherBuffer \\\\n\\\\t\\\\tupTo: inCount! !\\\\n\\\\n!SoundBuffer class methodsFor: 'instance creation' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nfromArray: anArray\\\\n\\\\t\\\\\\\"Return a new SoundBuffer whose contents are copied from the given Array or ByteArray.\\\\\\\"\\\\n\\\\n\\\\t| new |\\\\n\\\\tnew := SoundBuffer newMonoSampleCount: anArray size.\\\\n\\\\t1 to: anArray size do: [:i | new at: i put: (anArray at: i)].\\\\n\\\\t^ new\\\\n! !\\\\n\\\\n!SoundBuffer class methodsFor: 'instance creation' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nfromByteArray: aByteArray\\\\n\\\\t\\\\\\\"Convert the given ByteArray (stored with the most significant byte first) into 16-bit sample buffer.\\\\\\\"\\\\n\\\\n\\\\t| n buf src w |\\\\n\\\\tn := aByteArray size // 2.\\\\n\\\\tbuf := SoundBuffer newMonoSampleCount: n.\\\\n\\\\tsrc := 1.\\\\n\\\\t1 to: n do: [:i |\\\\n\\\\t\\\\tw := ((aByteArray at: src) bitShift: 8) + (aByteArray at: src + 1).\\\\n\\\\t\\\\tw > 32767 ifTrue: [w := w - 65536].\\\\n\\\\t\\\\tbuf at: i put: w.\\\\n\\\\t\\\\tsrc := src + 2].\\\\n\\\\t^ buf\\\\n! !\\\\n\\\\n!SoundBuffer class methodsFor: 'instance creation' stamp: 'jm 9/17/97 13:25'!\\\\nnew: anInteger\\\\n\\\\t\\\\\\\"See the comment in newMonoSampleCount:. To avoid confusion, it is best to create new instances using newMonoSampleCount: or newStereoSampleCount:.\\\\\\\"\\\\n\\\\n\\\\t^ self newMonoSampleCount: anInteger\\\\n! !\\\\n\\\\n!SoundBuffer class methodsFor: 'instance creation' stamp: 'jm 9/17/97 12:44'!\\\\nnewMonoSampleCount: anInteger\\\\n\\\\t\\\\\\\"Return a SoundBuffer large enough to hold the given number of monaural samples (i.e., 16-bit words).\\\\\\\"\\\\n\\\\t\\\\\\\"Details: The size is rounded up to an even number, since the underlying representation is in terms of 32-bit words.\\\\\\\"\\\\n\\\\n\\\\t^ self basicNew: (anInteger + 1) // 2\\\\n! !\\\\n\\\\n!SoundBuffer class methodsFor: 'instance creation' stamp: 'jm 9/17/97 12:52'!\\\\nnewStereoSampleCount: anInteger\\\\n\\\\t\\\\\\\"Return a SoundBuffer large enough to hold the given number of stereo slices. A stereo 'slice' consists of two 16-bit samples, one for each channel.\\\\\\\"\\\\n\\\\n\\\\t^ self basicNew: anInteger\\\\n! !\\\\n\\\\n\\\\n!SoundBuffer class methodsFor: 'objects from disk' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nstartUp\\\\n\\\\t\\\\\\\"Check if the word order has changed from the last save.\\\\\\\"\\\\n\\\\n\\\\t| la |\\\\n\\\\tla := ShortIntegerArray classPool at: #LastSaveOrder.\\\\n\\\\t((la at: 2) = 42 and: [(la at: 1) = 13]) \\\\n\\\\t\\\\tifTrue: [^self swapHalves]. \\\\\\\"Reverse the two 16-bit halves.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"Another reversal happened automatically which reversed the bytes.\\\\\\\"\\\\n! !\\\\n\\\\n!SoundBuffer class methodsFor: 'objects from disk' stamp: 'nk 2/22/2005 15:29'!\\\\nstartUpFrom: anImageSegment \\\\n\\\\t\\\\\\\"In this case, do we need to swap word halves when reading this segment?\\\\\\\"\\\\n\\\\n\\\\t^SmalltalkImage current endianness ~~ anImageSegment endianness \\\\n\\\\t\\\\tifTrue: [Message selector: #swapHalves\\\\t\\\\\\\"will be run on each instance\\\\\\\"]\\\\n\\\\t\\\\tifFalse: [nil]! !\\\\nObject subclass: #SoundCodec\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Sound-Synthesis'!\\\\n!SoundCodec commentStamp: '<historical>' prior: 0!\\\\nI am an abstract class that describes the protocol for sound codecs. Each codec (the name stems from \\\\\\\"COder/DECoder\\\\\\\") describes a particular algorithm for compressing and decompressing sound data. Most sound codecs are called 'lossy' because they lose information; the decompressed sound data is not exactly the same as the original data.\\\\n!\\\\n\\\\n\\\\n!SoundCodec methodsFor: 'compress/decompress' stamp: 'jm 2/2/1999 16:01'!\\\\ncompressAndDecompress: aSound\\\\n\\\\t\\\\\\\"Compress and decompress the given sound. Useful for testing.\\\\\\\"\\\\n\\\\t\\\\\\\"(MuLawCodec new compressAndDecompress: (SampledSound soundNamed: 'camera')) play\\\\\\\"\\\\n\\\\n\\\\t^ (self compressSound: aSound) asSound\\\\n! !\\\\n\\\\n!SoundCodec methodsFor: 'compress/decompress' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ncompressSound: aSound\\\\n\\\\t\\\\\\\"Compress the entirety of the given sound with this codec. Answer a CompressedSoundData.\\\\\\\"\\\\n\\\\n\\\\t| compressed channels |\\\\n\\\\tcompressed := CompressedSoundData new\\\\n\\\\t\\\\tcodecName: self class name;\\\\n\\\\t\\\\tsoundClassName: aSound class name.\\\\n\\\\t(aSound isKindOf: SampledSound) ifTrue: [\\\\n\\\\t\\\\tchannels := Array new: 1.\\\\n\\\\t\\\\tchannels at: 1 put: (self encodeSoundBuffer: aSound samples).\\\\n\\\\t\\\\tcompressed\\\\n\\\\t\\\\t\\\\tchannels: channels;\\\\n\\\\t\\\\t\\\\tsamplingRate: aSound originalSamplingRate;\\\\n\\\\t\\\\t\\\\tfirstSample: 1;\\\\n\\\\t\\\\t\\\\tloopEnd: aSound samples size;\\\\n\\\\t\\\\t\\\\tloopLength: 0.0;\\\\n\\\\t\\\\t\\\\tperceivedPitch: 100.0;\\\\n\\\\t\\\\t\\\\tgain: aSound loudness.\\\\n\\\\t\\\\t^ compressed].\\\\n\\\\t(aSound isKindOf: LoopedSampledSound) ifTrue: [\\\\n\\\\t\\\\taSound isStereo\\\\n\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tchannels := Array new: 2.\\\\n\\\\t\\\\t\\\\t\\\\tchannels at: 1 put: (self encodeSoundBuffer: aSound leftSamples).\\\\n\\\\t\\\\t\\\\t\\\\tchannels at: 2 put: (self encodeSoundBuffer: aSound rightSamples)]\\\\n\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tchannels := Array new: 1.\\\\n\\\\t\\\\t\\\\t\\\\tchannels at: 1 put: (self encodeSoundBuffer: aSound leftSamples)].\\\\n\\\\t\\\\tcompressed\\\\n\\\\t\\\\t\\\\tchannels: channels;\\\\n\\\\t\\\\t\\\\tsamplingRate: aSound originalSamplingRate;\\\\n\\\\t\\\\t\\\\tfirstSample: aSound firstSample;\\\\n\\\\t\\\\t\\\\tloopEnd: aSound loopEnd;\\\\n\\\\t\\\\t\\\\tloopLength: aSound loopLength;\\\\n\\\\t\\\\t\\\\tperceivedPitch: aSound perceivedPitch;\\\\n\\\\t\\\\t\\\\tgain: aSound gain.\\\\n\\\\t\\\\t^ compressed].\\\\n\\\\tself error: 'you can only compress sampled sounds'.\\\\n! !\\\\n\\\\n!SoundCodec methodsFor: 'compress/decompress' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ncompressSound: aSound atRate: desiredSampleRate\\\\n\\\\t\\\\\\\"Compress the entirety of the given sound with this codec. Answer a CompressedSoundData.\\\\\\\"\\\\n\\\\n\\\\t| compressed channels samples newRate ratio buffer |\\\\n\\\\n\\\\tcompressed := CompressedSoundData new\\\\n\\\\t\\\\tcodecName: self class name;\\\\n\\\\t\\\\tsoundClassName: aSound class name.\\\\n\\\\t(aSound isKindOf: SampledSound) ifTrue: [\\\\n\\\\t\\\\t(desiredSampleRate isNil or: \\\\n\\\\t\\\\t\\\\t\\\\t[(ratio := aSound originalSamplingRate // desiredSampleRate) <= 1]) ifTrue: [\\\\n\\\\t\\\\t\\\\tsamples := aSound samples.\\\\n\\\\t\\\\t\\\\tnewRate := aSound originalSamplingRate.\\\\n\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\tbuffer := aSound samples.\\\\n\\\\t\\\\t\\\\tsamples := SoundBuffer \\\\n\\\\t\\\\t\\\\t\\\\taverageEvery: ratio \\\\n\\\\t\\\\t\\\\t\\\\tfrom: buffer \\\\n\\\\t\\\\t\\\\t\\\\tupTo: buffer monoSampleCount.\\\\n\\\\t\\\\t\\\\tnewRate := aSound originalSamplingRate / ratio.\\\\n\\\\t\\\\t].\\\\n\\\\n\\\\t\\\\tchannels := Array new: 1.\\\\n\\\\t\\\\tchannels at: 1 put: (self encodeSoundBuffer: samples).\\\\n\\\\t\\\\tcompressed\\\\n\\\\t\\\\t\\\\tchannels: channels;\\\\n\\\\t\\\\t\\\\tsamplingRate: newRate;\\\\n\\\\t\\\\t\\\\tfirstSample: 1;\\\\n\\\\t\\\\t\\\\tloopEnd: samples size;\\\\n\\\\t\\\\t\\\\tloopLength: 0.0;\\\\n\\\\t\\\\t\\\\tperceivedPitch: 100.0;\\\\n\\\\t\\\\t\\\\tgain: aSound loudness.\\\\n\\\\t\\\\t^ compressed].\\\\n\\\\t(aSound isKindOf: LoopedSampledSound) ifTrue: [\\\\n\\\\t\\\\taSound isStereo\\\\n\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tchannels := Array new: 2.\\\\n\\\\t\\\\t\\\\t\\\\tchannels at: 1 put: (self encodeSoundBuffer: aSound leftSamples).\\\\n\\\\t\\\\t\\\\t\\\\tchannels at: 2 put: (self encodeSoundBuffer: aSound rightSamples)]\\\\n\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tchannels := Array new: 1.\\\\n\\\\t\\\\t\\\\t\\\\tchannels at: 1 put: (self encodeSoundBuffer: aSound leftSamples)].\\\\n\\\\t\\\\tcompressed\\\\n\\\\t\\\\t\\\\tchannels: channels;\\\\n\\\\t\\\\t\\\\tsamplingRate: aSound originalSamplingRate;\\\\n\\\\t\\\\t\\\\tfirstSample: aSound firstSample;\\\\n\\\\t\\\\t\\\\tloopEnd: aSound loopEnd;\\\\n\\\\t\\\\t\\\\tloopLength: aSound loopLength;\\\\n\\\\t\\\\t\\\\tperceivedPitch: aSound perceivedPitch;\\\\n\\\\t\\\\t\\\\tgain: aSound gain.\\\\n\\\\t\\\\t^ compressed].\\\\n\\\\tself error: 'you can only compress sampled sounds'.\\\\n! !\\\\n\\\\n!SoundCodec methodsFor: 'compress/decompress' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ndecompressSound: aCompressedSound\\\\n\\\\t\\\\\\\"Decompress the entirety of the given compressed sound with this codec and answer the resulting sound.\\\\\\\"\\\\n\\\\n\\\\t| channels sound |\\\\n\\\\tchannels := aCompressedSound channels\\\\n\\\\t\\\\tcollect: [:compressed | self decodeCompressedData: compressed].\\\\n\\\\t'SampledSound' = aCompressedSound soundClassName ifTrue: [\\\\n\\\\t\\\\tsound := SampledSound\\\\n\\\\t\\\\t\\\\tsamples: channels first\\\\n\\\\t\\\\t\\\\tsamplingRate: (aCompressedSound samplingRate).\\\\n\\\\t\\\\tsound loudness: aCompressedSound gain.\\\\n\\\\t\\\\t^ sound].\\\\n\\\\t'LoopedSampledSound' = aCompressedSound soundClassName ifTrue: [\\\\n\\\\t\\\\taCompressedSound loopLength = 0\\\\n\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tsound := LoopedSampledSound\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tunloopedSamples: channels first\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpitch: aCompressedSound perceivedPitch\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsamplingRate: aCompressedSound samplingRate]\\\\n\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tsound := LoopedSampledSound\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsamples: channels first\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tloopEnd: aCompressedSound loopEnd\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tloopLength: aCompressedSound loopLength\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpitch: aCompressedSound perceivedPitch\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsamplingRate: aCompressedSound samplingRate].\\\\n\\\\t\\\\tchannels size > 1 ifTrue: [sound rightSamples: channels last].\\\\n\\\\t\\\\tsound\\\\n\\\\t\\\\t\\\\tfirstSample: aCompressedSound firstSample;\\\\n\\\\t\\\\t\\\\tgain: aCompressedSound gain.\\\\n\\\\t\\\\tsound\\\\n\\\\t\\\\t\\\\tsetPitch: 100.0\\\\n\\\\t\\\\t\\\\tdur: (channels first size / aCompressedSound samplingRate)\\\\n\\\\t\\\\t\\\\tloudness: 1.0.\\\\n\\\\t\\\\t^ sound].\\\\n\\\\tself error: 'unknown sound class'.\\\\n! !\\\\n\\\\n\\\\n!SoundCodec methodsFor: 'subclass responsibilities' stamp: 'di 2/8/1999 14:23'!\\\\nbytesPerEncodedFrame\\\\n\\\\t\\\\\\\"Answer the number of bytes required to hold one frame of compressed sound data. Answer zero if this codec produces encoded frames of variable size.\\\\\\\"\\\\n\\\\n\\\\tself subclassResponsibility.\\\\n! !\\\\n\\\\n!SoundCodec methodsFor: 'subclass responsibilities' stamp: 'jm 2/2/1999 15:38'!\\\\ndecodeFrames: frameCount from: srcByteArray at: srcIndex into: dstSoundBuffer at: dstIndex\\\\n\\\\t\\\\\\\"Decode the given number of monophonic frames starting at the given index in the given ByteArray of compressed sound data and storing the decoded samples into the given SoundBuffer starting at the given destination index. Answer a pair containing the number of bytes of compressed data consumed and the number of decompressed samples produced.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: Assume that the sender has ensured that the given number of frames will not exhaust either the source or destination buffers.\\\\\\\"\\\\n\\\\n\\\\tself subclassResponsibility.\\\\n! !\\\\n\\\\n!SoundCodec methodsFor: 'subclass responsibilities' stamp: 'jm 2/2/1999 15:39'!\\\\nencodeFrames: frameCount from: srcSoundBuffer at: srcIndex into: dstByteArray at: dstIndex\\\\n\\\\t\\\\\\\"Encode the given number of frames starting at the given index in the given monophonic SoundBuffer and storing the encoded sound data into the given ByteArray starting at the given destination index. Encode only as many complete frames as will fit into the destination. Answer a pair containing the number of samples consumed and the number of bytes of compressed data produced.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: Assume that the sender has ensured that the given number of frames will not exhaust either the source or destination buffers.\\\\\\\"\\\\n\\\\n\\\\tself subclassResponsibility.\\\\n! !\\\\n\\\\n!SoundCodec methodsFor: 'subclass responsibilities' stamp: 'jm 2/4/1999 11:30'!\\\\nreset\\\\n\\\\t\\\\\\\"Reset my encoding and decoding state. Optional. This default implementation does nothing.\\\\\\\"\\\\n! !\\\\n\\\\n!SoundCodec methodsFor: 'subclass responsibilities' stamp: 'jm 2/2/1999 15:45'!\\\\nsamplesPerFrame\\\\n\\\\t\\\\\\\"Answer the number of sound samples per compression frame.\\\\\\\"\\\\n\\\\n\\\\tself subclassResponsibility.\\\\n! !\\\\n\\\\n\\\\n!SoundCodec methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ndecodeCompressedData: aByteArray\\\\n\\\\t\\\\\\\"Decode the entirety of the given encoded data buffer with this codec. Answer a monophonic SoundBuffer containing the uncompressed samples.\\\\\\\"\\\\n\\\\n\\\\t| frameCount result increments |\\\\n\\\\tframeCount := self frameCount: aByteArray.\\\\n\\\\tresult := SoundBuffer newMonoSampleCount: frameCount * self samplesPerFrame.\\\\n\\\\tself reset.\\\\n\\\\tincrements := self decodeFrames: frameCount from: aByteArray at: 1 into: result at: 1.\\\\n\\\\t((increments first = aByteArray size) and: [increments last = result size]) ifFalse: [\\\\n\\\\t\\\\tself error: 'implementation problem; increment sizes should match buffer sizes'].\\\\n\\\\t^ result\\\\n! !\\\\n\\\\n!SoundCodec methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nencodeSoundBuffer: aSoundBuffer\\\\n\\\\t\\\\\\\"Encode the entirety of the given monophonic SoundBuffer with this codec. Answer a ByteArray containing the compressed sound data.\\\\\\\"\\\\n\\\\n\\\\t| codeFrameSize frameSize fullFrameCount lastFrameSamples result increments finalFrame i lastIncs |\\\\n\\\\tframeSize := self samplesPerFrame.\\\\n\\\\tfullFrameCount := aSoundBuffer monoSampleCount // frameSize.\\\\n\\\\tlastFrameSamples := aSoundBuffer monoSampleCount - (fullFrameCount * frameSize).\\\\n\\\\tcodeFrameSize := self bytesPerEncodedFrame.\\\\n\\\\tcodeFrameSize = 0 ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"Allow room for 1 byte per sample for variable-length compression\\\\\\\"\\\\n\\\\t\\\\tcodeFrameSize := frameSize].\\\\n\\\\tlastFrameSamples > 0\\\\n\\\\t\\\\tifTrue: [result := ByteArray new: (fullFrameCount + 1) * codeFrameSize]\\\\n\\\\t\\\\tifFalse: [result := ByteArray new: fullFrameCount * codeFrameSize].\\\\n\\\\tself reset.\\\\n\\\\tincrements := self encodeFrames: fullFrameCount from: aSoundBuffer at: 1 into: result at: 1.\\\\n\\\\tlastFrameSamples > 0 ifTrue: [\\\\n\\\\t\\\\tfinalFrame := SoundBuffer newMonoSampleCount: frameSize.\\\\n\\\\t\\\\ti := fullFrameCount * frameSize.\\\\n\\\\t\\\\t1 to: lastFrameSamples do: [:j |\\\\n\\\\t\\\\t\\\\tfinalFrame at: j put: (aSoundBuffer at: (i := i + 1))].\\\\n\\\\t\\\\tlastIncs := self encodeFrames: 1 from: finalFrame at: 1 into: result at: 1 + increments second.\\\\n\\\\t\\\\tincrements := Array with: increments first + lastIncs first\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twith: increments second + lastIncs second].\\\\n\\\\tincrements second < result size\\\\n\\\\t\\\\tifTrue: [^ result copyFrom: 1 to: increments second]\\\\n\\\\t\\\\tifFalse: [^ result]\\\\n! !\\\\n\\\\n!SoundCodec methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nframeCount: aByteArray\\\\n\\\\t\\\\\\\"Compute the frame count for this byteArray.  This default computation will have to be overridden by codecs with variable frame sizes.\\\\\\\"\\\\n\\\\n\\\\t| codeFrameSize |\\\\n\\\\tcodeFrameSize := self bytesPerEncodedFrame.\\\\n\\\\t(aByteArray size \\\\\\\\\\\\\\\\ codeFrameSize) = 0 ifFalse:\\\\n\\\\t\\\\t[self error: 'encoded buffer is not an even multiple of the encoded frame size'].\\\\n\\\\t^ aByteArray size // codeFrameSize! !\\\\nAlignmentMorph subclass: #SoundDemoMorph\\\\n\\\\tinstanceVariableNames: 'soundColumn'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-SoundInterface'!\\\\n\\\\n!SoundDemoMorph methodsFor: 'as yet unclassified' stamp: 'tk 2/19/2001 17:49'!\\\\nmakeControls\\\\n\\\\n\\\\t| bb r cc |\\\\n\\\\tcc _ Color black.\\\\n\\\\tr _ AlignmentMorph newRow.\\\\n\\\\tr color: cc; borderWidth: 0; layoutInset: 0.\\\\n\\\\tr hResizing: #shrinkWrap; vResizing: #shrinkWrap; extent: 5@5.\\\\n\\\\tbb _ SimpleButtonMorph new target: self; borderColor: cc.\\\\n\\\\tr addMorphBack: (bb label: 'V1';\\\\t\\\\t\\\\tactionSelector: #playV1).\\\\n\\\\tbb _ SimpleButtonMorph new target: self; borderColor: cc.\\\\n\\\\tr addMorphBack: (bb label: 'V2';\\\\t\\\\t\\\\tactionSelector: #playV2).\\\\n\\\\tbb _ SimpleButtonMorph new target: self; borderColor: cc.\\\\n\\\\tr addMorphBack: (bb label: 'V3';\\\\t\\\\t\\\\tactionSelector: #playV3).\\\\n\\\\tbb _ SimpleButtonMorph new target: self; borderColor: cc.\\\\n\\\\tr addMorphBack: (bb label: 'All';\\\\t\\\\t\\\\tactionSelector: #playAll).\\\\n\\\\tbb _ SimpleButtonMorph new target: self; borderColor: cc.\\\\n\\\\tr addMorphBack: (bb label: 'Stop';\\\\t\\\\tactionSelector: #stopSound).\\\\n\\\\t^ r\\\\n! !\\\\n\\\\n!SoundDemoMorph methodsFor: 'as yet unclassified' stamp: 'dgd 2/22/2003 13:34'!\\\\nplayAll\\\\n\\\\t| snd |\\\\n\\\\tsoundColumn submorphs isEmpty\\\\n\\\\t\\\\tifTrue: [^ self].\\\\n\\\\tself setTimbreFromTile: soundColumn submorphs first.\\\\n\\\\tsnd _ SampledSound bachFugueVoice1On: SampledSound new.\\\\n\\\\tsoundColumn submorphs size >= 2\\\\n\\\\t\\\\tifTrue: [\\\\\\\"\\\\\\\"self setTimbreFromTile: soundColumn submorphs second.\\\\n\\\\t\\\\t\\\\tsnd _ snd\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t+ (AbstractSound bachFugueVoice2On: SampledSound new)].\\\\n\\\\tsoundColumn submorphs size >= 3\\\\n\\\\t\\\\tifTrue: [\\\\\\\"\\\\\\\"self setTimbreFromTile: soundColumn submorphs third.\\\\n\\\\t\\\\t\\\\tsnd _ snd\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t+ (AbstractSound bachFugueVoice3On: SampledSound new)].\\\\n\\\\tsnd play! !\\\\n\\\\n!SoundDemoMorph methodsFor: 'as yet unclassified' stamp: 'dgd 2/22/2003 13:35'!\\\\nplayV1\\\\n\\\\tsoundColumn submorphs isEmpty\\\\n\\\\t\\\\tifTrue: [^ self].\\\\n\\\\tself\\\\n\\\\t\\\\tsetTimbreFromTile: (soundColumn submorphs first).\\\\n\\\\t(SampledSound bachFugueVoice1On: SampledSound new) play! !\\\\n\\\\n!SoundDemoMorph methodsFor: 'as yet unclassified' stamp: 'dgd 2/22/2003 13:35'!\\\\nplayV2\\\\n\\\\tsoundColumn submorphs size < 2\\\\n\\\\t\\\\tifTrue: [^ self].\\\\n\\\\tself\\\\n\\\\t\\\\tsetTimbreFromTile: (soundColumn submorphs second).\\\\n\\\\t(SampledSound bachFugueVoice2On: SampledSound new) playSilentlyUntil: 4.8;\\\\n\\\\t\\\\t resumePlaying! !\\\\n\\\\n!SoundDemoMorph methodsFor: 'as yet unclassified' stamp: 'dgd 2/22/2003 13:35'!\\\\nplayV3\\\\n\\\\tsoundColumn submorphs size < 3\\\\n\\\\t\\\\tifTrue: [^ self].\\\\n\\\\tself\\\\n\\\\t\\\\tsetTimbreFromTile: (soundColumn submorphs third).\\\\n\\\\t(AbstractSound bachFugueVoice3On: SampledSound new) playSilentlyUntil: 14.4;\\\\n\\\\t\\\\t resumePlaying! !\\\\n\\\\n!SoundDemoMorph methodsFor: 'as yet unclassified' stamp: 'jm 11/14/97 11:09'!\\\\nsetTimbreFromTile: aSoundTile\\\\n\\\\n\\\\tSampledSound defaultSampleTable: aSoundTile sound samples.\\\\n\\\\tSampledSound nominalSamplePitch: 400.\\\\n! !\\\\n\\\\n!SoundDemoMorph methodsFor: 'as yet unclassified' stamp: 'jm 11/14/97 11:09'!\\\\nstopSound\\\\n\\\\n\\\\tSoundPlayer shutDown.\\\\n! !\\\\n\\\\n\\\\n!SoundDemoMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:40'!\\\\ndefaultBorderWidth\\\\n\\\\t\\\\\\\"answer the default border width for the receiver\\\\\\\"\\\\n\\\\t^ 2! !\\\\n\\\\n!SoundDemoMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:31'!\\\\ndefaultColor\\\\n\\\\t\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color lightGray! !\\\\n\\\\n!SoundDemoMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 21:04'!\\\\ninitialize\\\\n\\\\t\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tself listDirection: #topToBottom;\\\\n\\\\t\\\\t wrapCentering: #center;\\\\n\\\\t\\\\t cellPositioning: #topCenter;\\\\n\\\\t\\\\t hResizing: #spaceFill;\\\\n\\\\t\\\\t vResizing: #spaceFill;\\\\n\\\\t\\\\t layoutInset: 3;\\\\n\\\\t\\\\t addMorph: self makeControls;\\\\n\\\\tinitializeSoundColumn.\\\\n\\\\tself extent: 118 @ 150! !\\\\n\\\\n!SoundDemoMorph methodsFor: 'initialization' stamp: 'jam 3/9/2003 17:52'!\\\\ninitializeSoundColumn\\\\n\\\\\\\"initialize the receiver's soundColumn\\\\\\\"\\\\n\\\\tsoundColumn _ AlignmentMorph newColumn.\\\\n\\\\tsoundColumn enableDragNDrop.\\\\n\\\\tself addMorphBack: soundColumn! !\\\\nAbstractMediaEventMorph subclass: #SoundEventMorph\\\\n\\\\tinstanceVariableNames: 'sound'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-SoundInterface'!\\\\n\\\\n!SoundEventMorph methodsFor: 'as yet unclassified' stamp: 'RAA 12/7/2000 13:01'!\\\\nsound: aSound\\\\n\\\\n\\\\tsound _ aSound.\\\\n\\\\tself setBalloonText: 'a sound of duration ',(sound duration roundTo: 0.1) printString,' seconds'.! !\\\\n\\\\n\\\\n!SoundEventMorph methodsFor: 'caching' stamp: 'RAA 12/8/2000 09:52'!\\\\nreleaseCachedState\\\\n\\\\n\\\\tsuper releaseCachedState.\\\\n\\\\tsound _ sound compressWith: GSMCodec.\\\\n! !\\\\n\\\\n\\\\n!SoundEventMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:31'!\\\\ndefaultColor\\\\n\\\\t\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color lightGreen! !\\\\n\\\\n!SoundEventMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 21:39'!\\\\ninitialize\\\\n\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\\\\"\\\\\\\"\\\\n\\\\tself height: 10! !\\\\n\\\\n\\\\n!SoundEventMorph methodsFor: 'piano rolls' stamp: 'RAA 12/7/2000 12:36'!\\\\naddMorphsTo: morphList pianoRoll: pianoRoll eventTime: t betweenTime: leftTime and: rightTime\\\\n\\\\n\\\\t| startX lengthInTicks endX |\\\\n\\\\n\\\\tstartTimeInScore > rightTime ifTrue: [^ self].  \\\\n\\\\tlengthInTicks _ pianoRoll scorePlayer ticksForMSecs: sound duration * 1000.0.\\\\n\\\\tstartTimeInScore + lengthInTicks < leftTime ifTrue: [^ self].\\\\n\\\\tstartX _ pianoRoll xForTime: startTimeInScore.\\\\n\\\\tendX _ pianoRoll xForTime: startTimeInScore + lengthInTicks.\\\\n\\\\tmorphList add: \\\\n\\\\t\\\\t(self left: startX; width: endX - startX).\\\\n\\\\n! !\\\\n\\\\n!SoundEventMorph methodsFor: 'piano rolls' stamp: 'RAA 12/7/2000 12:29'!\\\\nencounteredAtTime: ticks inScorePlayer: scorePlayer atIndex: index inEventTrack: track secsPerTick: secsPerTick\\\\n\\\\n\\\\t\\\\\\\"hack... since we are called from within the SoundPlayer loop, the Semaphore will\\\\n\\\\tblock attempts to play directly from here\\\\\\\"\\\\n\\\\tWorldState addDeferredUIMessage: [sound play].! !\\\\n\\\\n!SoundEventMorph methodsFor: 'piano rolls' stamp: 'RAA 12/9/2000 18:48'!\\\\njustDroppedIntoPianoRoll: newOwner event: evt\\\\n\\\\t\\\\n\\\\t| startX lengthInTicks endX |\\\\n\\\\n\\\\tsuper justDroppedIntoPianoRoll: newOwner event: evt.\\\\n\\\\n\\\\tstartTimeInScore _ newOwner timeForX: self left.\\\\n\\\\tlengthInTicks _ newOwner scorePlayer ticksForMSecs: sound duration * 1000.0.\\\\n\\\\tendTimeInScore _ startTimeInScore + lengthInTicks.\\\\n\\\\n\\\\tendTimeInScore > newOwner scorePlayer durationInTicks ifTrue:\\\\n\\\\t\\\\t[newOwner scorePlayer updateDuration].\\\\n\\\\n\\\\tstartX _ newOwner xForTime: startTimeInScore.\\\\n\\\\tendX _ newOwner xForTime: endTimeInScore.\\\\n\\\\tself width: endX - startX.\\\\n\\\\n! !\\\\nSoundRecorder subclass: #SoundInputStream\\\\n\\\\tinstanceVariableNames: 'bufferSize mutex'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Sound-Synthesis'!\\\\n!SoundInputStream commentStamp: '<historical>' prior: 0!\\\\nThis subclass of SoundRecorder supports real-time processing of incoming sound data. The sound input process queues raw sound buffers, allowing them to be read and processed by the client as they become available. A semaphore is used to synchronize between the record process and the client process. Since sound data is buffered, the client process may lag behind the input process without losing data.\\\\n!\\\\n\\\\n\\\\n!SoundInputStream methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nbufferCount\\\\n\\\\t\\\\\\\"Answer the number of sound buffers that have been queued.\\\\\\\"\\\\n\\\\n\\\\t| n |\\\\n\\\\tmutex ifNil: [^ 0].  \\\\\\\"not recording\\\\\\\"\\\\n\\\\tmutex critical: [n := recordedBuffers size].\\\\n\\\\t^ n\\\\n! !\\\\n\\\\n!SoundInputStream methodsFor: 'accessing' stamp: 'jm 9/6/1999 10:36'!\\\\nbufferSize\\\\n\\\\n\\\\t^ bufferSize\\\\n! !\\\\n\\\\n!SoundInputStream methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nbufferSize: aNumber\\\\n\\\\t\\\\\\\"Set the sound buffer size. Buffers of this size will be queued for the client to process.\\\\\\\"\\\\n\\\\n\\\\tbufferSize := aNumber truncated.\\\\n! !\\\\n\\\\n!SoundInputStream methodsFor: 'accessing' stamp: 'jm 9/8/1999 15:23'!\\\\nisRecording\\\\n\\\\t\\\\\\\"Answer true if the sound input process is running.\\\\\\\"\\\\n\\\\n\\\\t^ recordProcess ~~ nil\\\\n! !\\\\n\\\\n!SoundInputStream methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nnextBufferOrNil\\\\n\\\\t\\\\\\\"Answer the next input buffer or nil if no buffer is available.\\\\\\\"\\\\n\\\\n\\\\t| result |\\\\n\\\\tmutex ifNil: [^ nil].  \\\\\\\"not recording\\\\\\\"\\\\n\\\\tmutex critical: [\\\\n\\\\t\\\\trecordedBuffers size > 0\\\\n\\\\t\\\\t\\\\tifTrue: [result := recordedBuffers removeFirst]\\\\n\\\\t\\\\t\\\\tifFalse: [result := nil]].\\\\n\\\\t^ result\\\\n! !\\\\n\\\\n\\\\n!SoundInputStream methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ninitialize\\\\n\\\\n\\\\tsuper initialize.\\\\n\\\\tbufferSize := 1024.\\\\n\\\\tmutex := nil.\\\\n! !\\\\n\\\\n\\\\n!SoundInputStream methodsFor: 'recording controls' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nstartRecording\\\\n\\\\t\\\\\\\"Start the sound input process.\\\\\\\"\\\\n\\\\n\\\\trecordProcess ifNotNil: [self stopRecording].\\\\n\\\\trecordedBuffers := OrderedCollection new: 100.\\\\n\\\\tmutex := Semaphore forMutualExclusion.\\\\n\\\\tsuper startRecording.\\\\n\\\\tpaused := false.\\\\n! !\\\\n\\\\n!SoundInputStream methodsFor: 'recording controls' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nstopRecording\\\\n\\\\t\\\\\\\"Turn off the sound input process and close the driver.\\\\\\\"\\\\n\\\\n\\\\tsuper stopRecording.\\\\n\\\\trecordedBuffers := nil.\\\\n\\\\tmutex := nil.\\\\n! !\\\\n\\\\n\\\\n!SoundInputStream methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nallocateBuffer\\\\n\\\\t\\\\\\\"Allocate a new buffer and reset nextIndex. This message is sent by the sound input process.\\\\\\\"\\\\n\\\\n\\\\tcurrentBuffer := SoundBuffer newMonoSampleCount: bufferSize.\\\\n\\\\tnextIndex := 1.\\\\n! !\\\\n\\\\n!SoundInputStream methodsFor: 'private' stamp: 'jm 9/8/1999 15:24'!\\\\nemitBuffer: buffer\\\\n\\\\t\\\\\\\"Queue a buffer for later processing. This message is sent by the sound input process.\\\\\\\"\\\\n\\\\n\\\\tmutex critical: [recordedBuffers addLast: buffer].\\\\n! !\\\\nRectangleMorph subclass: #SoundLoopMorph\\\\n\\\\tinstanceVariableNames: 'samplesUntilNextControl seqSound cursor controlIndex'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-SoundInterface'!\\\\n\\\\n!SoundLoopMorph methodsFor: 'as yet unclassified' stamp: 'jm 11/14/97 11:21'!\\\\naddCursorMorph\\\\n\\\\tself addMorph:\\\\n\\\\t\\\\t(cursor _ (RectangleMorph\\\\n\\\\t\\\\t\\\\t\\\\tnewBounds: (self innerBounds topLeft extent: 1@self innerBounds height)\\\\n\\\\t\\\\t\\\\t\\\\tcolor: Color red)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tborderWidth: 0)! !\\\\n\\\\n!SoundLoopMorph methodsFor: 'as yet unclassified' stamp: 'jm 11/14/97 11:11'!\\\\nallowSubmorphExtraction\\\\n\\\\n\\\\t^ true! !\\\\n\\\\n!SoundLoopMorph methodsFor: 'as yet unclassified' stamp: 'jm 1/5/98 17:31'!\\\\nbuildSound\\\\n\\\\t\\\\\\\"Build a compound sound for the next iteration of the loop.\\\\\\\"\\\\n\\\\n\\\\t| mixer soundMorphs startTime pan |\\\\n\\\\tmixer _ MixedSound new.\\\\n\\\\tmixer add: (RestSound dur: (self width - (2 * borderWidth)) / 128.0).\\\\n\\\\tsoundMorphs _ self submorphs select: [:m | m respondsTo: #sound].\\\\n\\\\tsoundMorphs do: [:m |\\\\n\\\\t\\\\tstartTime _ (m position x - (self left + borderWidth)) / 128.0.\\\\n\\\\t\\\\tpan _ (m position y - (self top + borderWidth)) asFloat / (self height - (2 * borderWidth) - m height).\\\\n\\\\t\\\\tmixer add: ((RestSound dur: startTime), m sound copy) pan: pan].\\\\n\\\\t^ mixer\\\\n! !\\\\n\\\\n!SoundLoopMorph methodsFor: 'as yet unclassified' stamp: 'jm 11/14/97 11:11'!\\\\nplay\\\\n\\\\t\\\\\\\"Play this sound to the sound ouput port in real time.\\\\\\\"\\\\n\\\\n\\\\tself reset.\\\\n\\\\tSoundPlayer playSound: self.\\\\n! !\\\\n\\\\n\\\\n!SoundLoopMorph methodsFor: 'dropping/grabbing' stamp: 'jm 11/14/97 11:11'!\\\\nwantsDroppedMorph: aMorph event: evt\\\\n\\\\n\\\\t^ aMorph respondsTo: #sound\\\\n! !\\\\n\\\\n\\\\n!SoundLoopMorph methodsFor: 'geometry' stamp: 'jm 11/14/97 11:21'!\\\\nextent: newExtent\\\\n\\\\tsuper extent: (newExtent truncateTo: 128@128) + (self borderWidth*2)! !\\\\n\\\\n\\\\n!SoundLoopMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:40'!\\\\ndefaultBorderWidth\\\\n\\\\t\\\\\\\"answer the default border width for the receiver\\\\\\\"\\\\n\\\\t^ 1! !\\\\n\\\\n!SoundLoopMorph methodsFor: 'initialization' stamp: 'dgd 3/7/2003 15:07'!\\\\ndefaultBounds\\\\n\\\\\\\"answer the default bounds for the receiver\\\\\\\"\\\\n\\\\t^ 0 @ 0 corner: 128 @ 128 + (self defaultBorderWidth * 2)! !\\\\n\\\\n!SoundLoopMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:31'!\\\\ndefaultColor\\\\n\\\\t\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color lightBlue! !\\\\n\\\\n!SoundLoopMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 20:50'!\\\\ninitialize\\\\n\\\\t\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\t\\\\n\\\\tcontrolIndex _ 0.\\\\n\\\\tself addCursorMorph! !\\\\n\\\\n\\\\n!SoundLoopMorph methodsFor: 'playing' stamp: 'jm 11/14/97 11:21'!\\\\ncontrolRate\\\\n\\\\t\\\\\\\"Answer the number of control changes per second.\\\\\\\"\\\\n\\\\n\\\\t^ 32\\\\n! !\\\\n\\\\n!SoundLoopMorph methodsFor: 'playing' stamp: 'jm 11/14/97 11:21'!\\\\ndoControl\\\\n\\\\n\\\\tseqSound doControl.\\\\n\\\\tcontrolIndex _ controlIndex + 1.\\\\n\\\\tcontrolIndex >= (self controlRate * (self innerBounds width // 128))\\\\n\\\\t\\\\tifTrue: [controlIndex _ 0].\\\\n! !\\\\n\\\\n!SoundLoopMorph methodsFor: 'playing' stamp: 'jm 1/5/98 13:40'!\\\\nmixSampleCount: n into: aSoundBuffer startingAt: startIndex leftVol: leftVol rightVol: rightVol\\\\n\\\\t\\\\\\\"Repeatedly play my sounds.\\\\\\\"\\\\n\\\\n\\\\t| i count samplesNeeded |\\\\n\\\\ti _ startIndex.\\\\n\\\\tsamplesNeeded _ n.\\\\n\\\\t[samplesNeeded > 0] whileTrue: [\\\\n\\\\t\\\\tcount _ seqSound samplesRemaining min: samplesNeeded.\\\\n\\\\t\\\\tcount = 0 ifTrue: [\\\\n\\\\t\\\\t\\\\tself reset.\\\\n\\\\t\\\\t\\\\tcount _ seqSound samplesRemaining min: samplesNeeded.\\\\n\\\\t\\\\t\\\\tcount = 0 ifTrue: [^ self]].  \\\\\\\"zero length sound\\\\\\\"\\\\n\\\\t\\\\tseqSound mixSampleCount: count into: aSoundBuffer startingAt: i leftVol: leftVol rightVol: rightVol.\\\\n\\\\t\\\\ti _ i + count.\\\\n\\\\t\\\\tsamplesNeeded _ samplesNeeded - count].\\\\n! !\\\\n\\\\n!SoundLoopMorph methodsFor: 'playing' stamp: 'jm 1/26/98 22:05'!\\\\nplaySampleCount: n into: aSoundBuffer startingAt: startIndex\\\\n\\\\t\\\\\\\"Mixes the next count samples of this sound into the given buffer starting at the given index, updating the receiver's control parameters at periodic intervals.\\\\\\\"\\\\n\\\\n\\\\t| fullVol samplesBetweenControlUpdates pastEnd i remainingSamples count |\\\\n\\\\tfullVol _ AbstractSound scaleFactor.\\\\n\\\\tsamplesBetweenControlUpdates _ self samplingRate // self controlRate.\\\\n\\\\tpastEnd _ startIndex + n.  \\\\\\\"index just index of after last sample\\\\\\\"\\\\n\\\\ti _ startIndex.\\\\n\\\\t[i < pastEnd] whileTrue: [\\\\n\\\\t\\\\tremainingSamples _ self samplesRemaining.\\\\n\\\\t\\\\tremainingSamples <= 0 ifTrue: [^ self].\\\\n\\\\t\\\\tcount _ pastEnd - i.\\\\n\\\\t\\\\tsamplesUntilNextControl < count ifTrue: [count _ samplesUntilNextControl].\\\\n\\\\t\\\\tremainingSamples < count ifTrue: [count _ remainingSamples].\\\\n\\\\t\\\\tself mixSampleCount: count into: aSoundBuffer startingAt: i leftVol: fullVol rightVol: fullVol.\\\\n\\\\t\\\\tsamplesUntilNextControl _ samplesUntilNextControl - count.\\\\n\\\\t\\\\tsamplesUntilNextControl <= 0 ifTrue: [\\\\n\\\\t\\\\t\\\\tself doControl.\\\\n\\\\t\\\\t\\\\tsamplesUntilNextControl _ samplesBetweenControlUpdates].\\\\n\\\\t\\\\ti _ i + count].\\\\n! !\\\\n\\\\n!SoundLoopMorph methodsFor: 'playing' stamp: 'jm 11/14/97 11:21'!\\\\npositionCursor\\\\n\\\\t| x |\\\\n\\\\tx _ controlIndex * 128 // self controlRate.\\\\n\\\\tcursor position: self innerBounds topLeft + (x@0)\\\\n! !\\\\n\\\\n!SoundLoopMorph methodsFor: 'playing' stamp: 'jm 11/14/97 11:21'!\\\\nreset\\\\n\\\\t\\\\\\\"Reset my internal state for a replay.\\\\\\\"\\\\n\\\\n\\\\tseqSound _ self buildSound reset.\\\\n\\\\tsamplesUntilNextControl _ (self samplingRate // self controlRate).\\\\n\\\\tcontrolIndex _ 0.\\\\n\\\\tself positionCursor! !\\\\n\\\\n!SoundLoopMorph methodsFor: 'playing' stamp: 'jm 11/14/97 11:11'!\\\\nsamplesRemaining\\\\n\\\\n\\\\t^ 1000000\\\\n! !\\\\n\\\\n!SoundLoopMorph methodsFor: 'playing' stamp: 'jm 11/14/97 11:11'!\\\\nsamplingRate\\\\n\\\\t\\\\\\\"Answer the sampling rate in samples per second.\\\\\\\"\\\\n\\\\n\\\\t^ SoundPlayer samplingRate! !\\\\n\\\\n\\\\n!SoundLoopMorph methodsFor: 'stepping and presenter' stamp: 'jm 11/14/97 11:21'!\\\\nstep\\\\n\\\\tself positionCursor! !\\\\n\\\\n!SoundLoopMorph methodsFor: 'stepping and presenter' stamp: 'jm 11/14/97 11:11'!\\\\nstop\\\\n\\\\t\\\\\\\"Stop playing this sound.\\\\\\\"\\\\n\\\\n\\\\tSoundPlayer pauseSound: self.\\\\n! !\\\\n\\\\n\\\\n!SoundLoopMorph methodsFor: 'testing' stamp: 'jm 11/14/97 11:21'!\\\\nstepTime\\\\n\\\\n\\\\t^ 50\\\\n! !\\\\nImageMorph subclass: #SoundMorph\\\\n\\\\tinstanceVariableNames: 'sound'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-SoundInterface'!\\\\n!SoundMorph commentStamp: '<historical>' prior: 0!\\\\nNote: as of December 2000, this does not work. SoundMorph>>buildImage requires the sound to implement #volumeEnvelopeScaledTo: and as yet, no one does.!\\\\n\\\\n\\\\n!SoundMorph methodsFor: 'as yet unclassified' stamp: 'jm 11/14/97 11:21'!\\\\nbuildImage\\\\n\\\\t| scale env h imageColor |\\\\n\\\\towner ifNil: [scale _ 128@128]  \\\\\\\"Default is 128 pix/second, 128 pix fullscale\\\\\\\"\\\\n\\\\t\\\\tifNotNil: [scale _ owner soundScale].\\\\n\\\\tenv _ sound volumeEnvelopeScaledTo: scale.\\\\n\\\\tself image: (ColorForm extent: env size @ env max).\\\\n\\\\t1 to: image width do:\\\\n\\\\t\\\\t[:x | h _ env at: x.\\\\n\\\\t\\\\timage fillBlack: ((x-1)@(image height-h//2) extent: 1@h)].\\\\n\\\\timageColor _ #(black red orange green blue) atPin:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(sound pitch / 110.0) rounded highBit.\\\\n\\\\timage colors: (Array with: Color transparent with: (Color perform: imageColor)).\\\\n! !\\\\n\\\\n!SoundMorph methodsFor: 'as yet unclassified' stamp: 'jm 11/14/97 11:08'!\\\\nreset\\\\n\\\\tsound reset! !\\\\n\\\\n!SoundMorph methodsFor: 'as yet unclassified' stamp: 'jm 11/14/97 11:08'!\\\\nsound\\\\n\\\\t^ sound! !\\\\n\\\\n!SoundMorph methodsFor: 'as yet unclassified' stamp: 'jm 11/14/97 11:08'!\\\\nsound: aSound\\\\n\\\\tsound _ aSound copy.\\\\n\\\\tsound reset.\\\\n\\\\tself buildImage! !\\\\n\\\\n\\\\n!SoundMorph methodsFor: 'dropping/grabbing' stamp: 'ar 10/5/2000 20:05'!\\\\njustDroppedInto: aMorph event: anEvent\\\\n\\\\t| relPosition |\\\\n\\\\trelPosition _ self position - aMorph innerBounds topLeft.\\\\n\\\\trelPosition _ (relPosition x roundTo: 8) @ relPosition y.\\\\n\\\\tself position: aMorph innerBounds topLeft + relPosition.\\\\n\\\\tsound copy play.\\\\n\\\\t^super justDroppedInto: aMorph event: anEvent! !\\\\n\\\\n\\\\n!SoundMorph methodsFor: 'initialization' stamp: 'jm 12/17/97 22:43'!\\\\ninitialize\\\\n\\\\n\\\\tsuper initialize.\\\\n\\\\tself sound: (FMSound pitch: 880.0 dur: 0.2 loudness: 0.8).\\\\n! !\\\\nObject subclass: #SoundPlayer\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: 'ActiveSounds Buffer BufferIndex BufferMSecs LastBuffer PlayerProcess PlayerSemaphore ReadyForBuffer ReverbState SamplingRate SoundJustStarted SoundSupported Stereo UseReadySemaphore UseReverb'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Sound-Synthesis'!\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSoundPlayer class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SoundPlayer class methodsFor: 'accessing' stamp: 'jm 8/13/1998 15:00'!\\\\nbufferMSecs\\\\n\\\\n\\\\t^ BufferMSecs\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'accessing' stamp: 'jm 1/27/98 09:28'!\\\\nreverbState\\\\n\\\\n\\\\t^ ReverbState! !\\\\n\\\\n!SoundPlayer class methodsFor: 'accessing'!\\\\nsamplingRate\\\\n\\\\n\\\\t^ SamplingRate! !\\\\n\\\\n!SoundPlayer class methodsFor: 'accessing' stamp: 'JMM 11/6/2000 10:16'!\\\\nsetVolumeLeft: aLeftVolume volumeRight: aRightVolume\\\\n\\\\t\\\\\\\"Set sound pass in float 0.0-1.0 for left and right channel, with possible 2.0 or  higher to overdrive sound channel \\\\\\\"\\\\n\\\\tself primSoundSetVolumeLeft: aLeftVolume volumeRight: aRightVolume! !\\\\n\\\\n!SoundPlayer class methodsFor: 'accessing' stamp: 'JMM 11/6/2000 10:17'!\\\\nsoundVolume\\\\n\\\\t\\\\\\\"Return sound as array of doubles left then right channel, range is 0.0 to 1.0 but may be overdriven\\\\\\\"\\\\n\\\\t^self primSoundGetVolume! !\\\\n\\\\n!SoundPlayer class methodsFor: 'accessing'!\\\\nstereo\\\\n\\\\n\\\\t^ Stereo\\\\n! !\\\\n\\\\n\\\\n!SoundPlayer class methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ninitialize\\\\n\\\\t\\\\\\\"SoundPlayer initialize; shutDown; startUp\\\\\\\"\\\\n\\\\t\\\\\\\"Details: BufferMSecs represents a tradeoff between latency and quality. If BufferMSecs is too low, the sound will not play smoothly, especially during long-running primitives such as large BitBlts. If BufferMSecs is too high, there will be a long time lag between when a sound buffer is submitted to be played and when that sound is actually heard. BufferMSecs is typically in the range 50-200.\\\\\\\"\\\\n\\\\n\\\\tSamplingRate := 22050.\\\\n\\\\tBufferMSecs := 120.\\\\n\\\\tStereo := true.\\\\n\\\\tUseReverb ifNil: [UseReverb := true].\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'initialization' stamp: 'ar 1/24/2002 18:40'!\\\\nuseLastBuffer\\\\n\\\\t^LastBuffer notNil! !\\\\n\\\\n!SoundPlayer class methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nuseLastBuffer: aBool\\\\n\\\\tBuffer ifNil:[^self].\\\\n\\\\taBool \\\\n\\\\t\\\\tifTrue:[LastBuffer := SoundBuffer basicNew: Buffer basicSize]\\\\n\\\\t\\\\tifFalse:[LastBuffer := nil]\\\\t! !\\\\n\\\\n!SoundPlayer class methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nuseShortBuffer\\\\n\\\\t\\\\\\\"Experimental support for real-time MIDI input. This only works on platforms whose hardware allows very short buffer sizes. It has been tested on a Macintosh Powerbook G3.\\\\\\\"\\\\n\\\\t\\\\\\\"SoundPlayer useShortBuffer\\\\\\\"\\\\n\\\\n\\\\tself shutDown.\\\\n\\\\tBufferMSecs := 15.\\\\n\\\\tSoundPlayer\\\\n\\\\t\\\\tstartPlayerProcessBufferSize: (BufferMSecs * SamplingRate) // 1000\\\\n\\\\t\\\\trate: SamplingRate\\\\n\\\\t\\\\tstereo: Stereo.\\\\n! !\\\\n\\\\n\\\\n!SoundPlayer class methodsFor: 'player process' stamp: 'jm 1/29/98 18:56'!\\\\nisReverbOn\\\\n\\\\n\\\\t^ ReverbState ~~ nil\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'player process' stamp: 'ar 1/24/2002 18:41'!\\\\nlastPlayBuffer\\\\n\\\\t^LastBuffer! !\\\\n\\\\n!SoundPlayer class methodsFor: 'player process' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\noldStylePlayLoop\\\\n\\\\t\\\\\\\"This version of the play loop is used if the VM does not yet support sound primitives that signal a semaphore when a sound buffer becomes available.\\\\\\\"\\\\n\\\\n\\\\t| bytesPerSlice count |\\\\n\\\\tbytesPerSlice := Stereo ifTrue: [4] ifFalse: [2].\\\\n\\\\t[true] whileTrue: [\\\\n\\\\t\\\\t[(count := self primSoundAvailableBytes // bytesPerSlice) > 100]\\\\n\\\\t\\\\t\\\\twhileFalse: [(Delay forMilliseconds: 1) wait].\\\\n\\\\n\\\\t\\\\tcount := count min: Buffer stereoSampleCount.\\\\n\\\\t\\\\tPlayerSemaphore critical: [\\\\n\\\\t\\\\t\\\\tActiveSounds := ActiveSounds select: [:snd | snd samplesRemaining > 0].\\\\n\\\\t\\\\t\\\\tActiveSounds do: [:snd |\\\\n\\\\t\\\\t\\\\t\\\\tsnd ~~ SoundJustStarted ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsnd playSampleCount: count into: Buffer startingAt: 1]].\\\\n\\\\t\\\\t\\\\tReverbState == nil ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tReverbState applyReverbTo: Buffer startingAt: 1 count: count].\\\\n\\\\t\\\\t\\\\tself primSoundPlaySamples: count from: Buffer startingAt: 1.\\\\n\\\\t\\\\t\\\\tBuffer primFill: 0.\\\\n\\\\t\\\\t\\\\tSoundJustStarted := nil]].\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'player process' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nplayLoop\\\\n\\\\t\\\\\\\"The sound player process loop.\\\\\\\"\\\\n\\\\n\\\\t| bytesPerSlice count willStop mayStop |\\\\n\\\\tmayStop := Preferences soundStopWhenDone.\\\\n\\\\tbytesPerSlice := Stereo ifTrue: [4] ifFalse: [2].\\\\n\\\\t[true] whileTrue: [\\\\n\\\\t\\\\t[(count := self primSoundAvailableBytes // bytesPerSlice) > 100]\\\\n\\\\t\\\\t\\\\twhileFalse: [ReadyForBuffer wait].\\\\n\\\\n\\\\t\\\\tcount := count min: Buffer stereoSampleCount.\\\\n\\\\t\\\\tPlayerSemaphore critical: [\\\\n\\\\t\\\\t\\\\tActiveSounds := ActiveSounds select: [:snd | snd samplesRemaining > 0].\\\\n\\\\t\\\\t\\\\tActiveSounds do: [:snd |\\\\n\\\\t\\\\t\\\\t\\\\tsnd ~~ SoundJustStarted ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsnd playSampleCount: count into: Buffer startingAt: 1]].\\\\n\\\\t\\\\t\\\\tReverbState == nil ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tReverbState applyReverbTo: Buffer startingAt: 1 count: count].\\\\n\\\\t\\\\t\\\\tself primSoundPlaySamples: count from: Buffer startingAt: 1.\\\\n\\\\t\\\\t\\\\twillStop := mayStop and:[\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(ActiveSounds size = 0) and:[\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself isAllSilence: Buffer size: count]].\\\\n\\\\t\\\\t\\\\tLastBuffer ifNotNil:[\\\\n\\\\t\\\\t\\\\t\\\\tLastBuffer replaceFrom: 1 to: LastBuffer size with: Buffer startingAt: 1.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\twillStop\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:[self shutDown. PlayerProcess := nil]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:[Buffer primFill: 0].\\\\n\\\\t\\\\t\\\\tSoundJustStarted := nil].\\\\n\\\\t\\\\twillStop ifTrue:[^self].\\\\n\\\\t].\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'player process' stamp: 'nk 2/16/2001 13:26'!\\\\nplayerProcess\\\\n\\\\t^PlayerProcess! !\\\\n\\\\n!SoundPlayer class methodsFor: 'player process' stamp: 'ar 2/4/2001 18:01'!\\\\nstartPlayerProcessBufferSize: bufferSize rate: samplesPerSecond stereo: stereoFlag\\\\n\\\\t\\\\\\\"Start the sound player process. Terminate the old process, if any.\\\\\\\"\\\\n\\\\t\\\\\\\"SoundPlayer startPlayerProcessBufferSize: 1000 rate: 11025 stereo: false\\\\\\\"\\\\n\\\\t^self startPlayerProcessBufferSize: bufferSize \\\\n\\\\t\\\\t\\\\trate: samplesPerSecond \\\\n\\\\t\\\\t\\\\tstereo: stereoFlag \\\\n\\\\t\\\\t\\\\tsound: nil! !\\\\n\\\\n!SoundPlayer class methodsFor: 'player process' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nstartPlayerProcessBufferSize: bufferSize rate: samplesPerSecond stereo: stereoFlag sound: aSound\\\\n\\\\t\\\\\\\"Start the sound player process. Terminate the old process, if any.\\\\\\\"\\\\n\\\\t\\\\\\\"SoundPlayer startPlayerProcessBufferSize: 1000 rate: 11025 stereo: false\\\\\\\"\\\\n\\\\n\\\\tself stopPlayerProcess.\\\\n\\\\taSound\\\\n\\\\t\\\\tifNil:[ActiveSounds := OrderedCollection new]\\\\n\\\\t\\\\tifNotNil:[ActiveSounds := OrderedCollection with: aSound].\\\\n\\\\tBuffer := SoundBuffer newStereoSampleCount: (bufferSize // 4) * 4.\\\\n\\\\tLastBuffer ifNotNil:[LastBuffer := SoundBuffer basicNew: Buffer basicSize].\\\\n\\\\tPlayerSemaphore := Semaphore forMutualExclusion.\\\\n\\\\tSamplingRate := samplesPerSecond.\\\\n\\\\tStereo := stereoFlag.\\\\n\\\\tReadyForBuffer := Semaphore new.\\\\n\\\\tSoundSupported := true. \\\\\\\"Assume so\\\\\\\"\\\\n\\\\tUseReadySemaphore := true.  \\\\\\\"set to false if ready semaphore not supported by VM\\\\\\\"\\\\n\\\\tself primSoundStartBufferSize: Buffer stereoSampleCount\\\\n\\\\t\\\\trate: samplesPerSecond\\\\n\\\\t\\\\tstereo: Stereo\\\\n\\\\t\\\\tsemaIndex: (Smalltalk registerExternalObject: ReadyForBuffer).\\\\n\\\\t\\\\\\\"Check if sound start prim was successful\\\\\\\"\\\\n\\\\tSoundSupported ifFalse:[^self].\\\\n\\\\tUseReadySemaphore\\\\n\\\\t\\\\tifTrue: [PlayerProcess := [SoundPlayer playLoop] newProcess]\\\\n\\\\t\\\\tifFalse: [PlayerProcess := [SoundPlayer oldStylePlayLoop] newProcess].\\\\n\\\\tUseReverb ifTrue: [self startReverb].\\\\n\\\\n\\\\tPlayerProcess priority: Processor userInterruptPriority.\\\\n\\\\tPlayerProcess resume.! !\\\\n\\\\n!SoundPlayer class methodsFor: 'player process' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nstartReverb\\\\n\\\\t\\\\\\\"Start a delay-line style reverb with the given tap delays and gains. Tap delays are given in samples and should be prime integers; the following comment gives an expression that generates primes.\\\\\\\"\\\\n\\\\t\\\\\\\"Integer primesUpTo: 22050\\\\\\\"\\\\n\\\\n\\\\tUseReverb := true.\\\\n\\\\tReverbState := ReverbSound new\\\\n\\\\t\\\\ttapDelays: #(1601 7919) gains: #(0.12 0.07).\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'player process' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nstopPlayerProcess\\\\n\\\\t\\\\\\\"Stop the sound player process.\\\\\\\"\\\\n\\\\t\\\\\\\"SoundPlayer stopPlayerProcess\\\\\\\"\\\\n\\\\n\\\\t(PlayerProcess == nil or:[PlayerProcess == Processor activeProcess]) \\\\n\\\\t\\\\tifFalse:[PlayerProcess terminate].\\\\n\\\\tPlayerProcess := nil.\\\\n\\\\tself primSoundStop.\\\\n\\\\tActiveSounds := OrderedCollection new.\\\\n\\\\tBuffer := nil.\\\\n\\\\tPlayerSemaphore := Semaphore forMutualExclusion.\\\\n\\\\tReadyForBuffer ifNotNil:\\\\n\\\\t\\\\t[Smalltalk unregisterExternalObject: ReadyForBuffer].\\\\n\\\\tReadyForBuffer := nil.\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'player process' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nstopReverb\\\\n\\\\n\\\\tUseReverb := false.\\\\n\\\\tReverbState := nil.\\\\n! !\\\\n\\\\n\\\\n!SoundPlayer class methodsFor: 'playing' stamp: 'ar 2/1/2001 15:20'!\\\\ncanStartPlayer\\\\n\\\\t\\\\\\\"Some platforms do no support simultaneous record and play. If this is one of those platforms, return false if there is a running SoundRecorder.\\\\\\\"\\\\n\\\\n\\\\tPreferences canRecordWhilePlaying ifTrue: [^ true].\\\\n\\\\tSoundRecorder anyActive ifTrue:[^false].\\\\n\\\\t^ true\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'playing' stamp: 'di 8/5/1998 23:08'!\\\\nisPlaying: aSound\\\\n\\\\t^ ActiveSounds includes: aSound! !\\\\n\\\\n!SoundPlayer class methodsFor: 'playing' stamp: 'jm 8/23/97 20:38'!\\\\npauseSound: aSound\\\\n\\\\t\\\\\\\"Stop playing the given sound. Playing can be resumed from this point later.\\\\\\\"\\\\n\\\\n\\\\tPlayerSemaphore critical: [\\\\n\\\\t\\\\tActiveSounds remove: aSound ifAbsent: []].\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'playing' stamp: 'ar 2/19/2001 01:28'!\\\\nplaySound: aSound\\\\n\\\\t\\\\\\\"Reset and start playing the given sound from its beginning.\\\\\\\"\\\\n\\\\n\\\\taSound reset.\\\\n\\\\taSound samplesRemaining = 0 ifTrue:[^self].\\\\n\\\\tself resumePlaying: aSound.\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'playing' stamp: 'jm 9/8/1998 17:54'!\\\\nresumePlaying: aSound\\\\n\\\\t\\\\\\\"Start playing the given sound without resetting it; it will resume playing from where it last stopped.\\\\\\\"\\\\n\\\\t\\\\\\\"Implementation detail: On virtual machines that don't support the quickstart primitive, you may need to edit this method to pass false to resumePlaying:quickStart:.\\\\\\\"\\\\n\\\\n\\\\tself resumePlaying: aSound quickStart: true.\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'playing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nresumePlaying: aSound quickStart: quickStart\\\\n\\\\t\\\\\\\"Start playing the given sound without resetting it; it will resume playing from where it last stopped. If quickStart is true, then try to start playing the given sound immediately.\\\\\\\"\\\\n\\\\n\\\\t| doQuickStart |\\\\n\\\\tPreferences soundsEnabled ifFalse: [^ self].\\\\n\\\\tdoQuickStart := quickStart.\\\\n\\\\tPreferences soundQuickStart ifFalse: [doQuickStart := false].\\\\n\\\\tPlayerProcess == nil ifTrue: [\\\\n\\\\t\\\\tself canStartPlayer ifFalse: [^ self].\\\\n\\\\t\\\\t^self startUpWithSound: aSound].\\\\n\\\\n\\\\tPlayerSemaphore critical: [\\\\n\\\\t\\\\t(ActiveSounds includes: aSound)\\\\n\\\\t\\\\t\\\\tifTrue: [doQuickStart := false]\\\\n\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tdoQuickStart ifFalse: [ActiveSounds add: aSound]]].\\\\n\\\\n\\\\t\\\\\\\"quick-start the given sound, unless the sound player has just started\\\\\\\"\\\\n\\\\tdoQuickStart ifTrue: [self startPlayingImmediately: aSound].\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'playing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nstopPlayingAll\\\\n\\\\t\\\\\\\"Stop playing all sounds.\\\\\\\"\\\\n\\\\n\\\\tPlayerSemaphore critical: [\\\\n\\\\t\\\\tActiveSounds := ActiveSounds species new].\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'playing' stamp: 'jm 9/13/97 19:49'!\\\\nwaitUntilDonePlaying: aSound\\\\n\\\\t\\\\\\\"Wait until the given sound is no longer playing.\\\\\\\"\\\\n\\\\n\\\\t[PlayerSemaphore critical: [ActiveSounds includes: aSound]]\\\\n\\\\t\\\\twhileTrue: [(Delay forMilliseconds: 100) wait].\\\\n! !\\\\n\\\\n\\\\n!SoundPlayer class methodsFor: 'primitive test' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nboinkPitch: p dur: d loudness: l waveTable: waveTable pan: pan\\\\n\\\\t\\\\\\\"Play a decaying note on the given stream using the given wave table. Used for testing only.\\\\\\\"\\\\n\\\\n\\\\t| decay tableSize amplitude increment cycles i |\\\\n\\\\tdecay := 0.96.\\\\n\\\\ttableSize := waveTable size.\\\\n\\\\tamplitude := l asInteger min: 1000.\\\\n\\\\tincrement := ((p asFloat * tableSize asFloat) / SamplingRate asFloat) asInteger.\\\\n\\\\tincrement := (increment max: 1) min: (tableSize // 2).\\\\n\\\\tcycles := (d * SamplingRate asFloat) asInteger.\\\\n\\\\n\\\\ti := 1.\\\\n\\\\t1 to: cycles do: [:cycle |\\\\n\\\\t\\\\t(cycle \\\\\\\\\\\\\\\\ 100) = 0\\\\n\\\\t\\\\t\\\\tifTrue: [amplitude := (decay * amplitude asFloat) asInteger].\\\\n\\\\t\\\\ti := (((i - 1) + increment) \\\\\\\\\\\\\\\\ tableSize) + 1.\\\\n\\\\t\\\\tself playTestSample: (amplitude * (waveTable at: i)) // 1000 pan: pan].\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'primitive test' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nboinkScale\\\\n\\\\t\\\\\\\"Tests the sound output primitives by playing a scale.\\\\\\\"\\\\n\\\\t\\\\\\\"SoundPlayer boinkScale\\\\\\\"\\\\n\\\\n\\\\t| sineTable pan |\\\\n\\\\tself shutDown.\\\\n\\\\tSamplingRate := 11025.\\\\n\\\\tStereo := true.\\\\n\\\\tsineTable := self sineTable: 1000.\\\\n\\\\tBuffer := SoundBuffer newStereoSampleCount: 1000.\\\\n\\\\tBufferIndex := 1.\\\\n\\\\tself primSoundStartBufferSize: Buffer stereoSampleCount\\\\n\\\\t\\\\trate: SamplingRate\\\\n\\\\t\\\\tstereo: Stereo.\\\\n\\\\tpan := 0.\\\\n\\\\t#(261.626 293.665 329.628 349.229 391.996 440.001 493.884 523.252) do: [:p |\\\\n\\\\t\\\\tself boinkPitch: p dur: 0.3 loudness: 300 waveTable: sineTable pan: pan.\\\\n\\\\t\\\\tpan := pan + 125].\\\\n\\\\n\\\\tself boinkPitch: 261.626 dur: 1.0 loudness: 300 waveTable: sineTable pan: 500.\\\\n\\\\tself primSoundStop.\\\\n\\\\tself shutDown.\\\\n\\\\tSoundPlayer initialize.  \\\\\\\"reset sampling rate, buffer size, and stereo flag\\\\\\\"\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'primitive test' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nplayTestSample: s pan: pan\\\\n\\\\t\\\\\\\"Append the given sample in the range [-32767..32767] to the output buffer, playing the output buffer when it is full. Used for testing only.\\\\\\\"\\\\n\\\\n\\\\t| sample leftSample |\\\\n\\\\tBufferIndex >= Buffer size\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\\\\"current buffer is full; play it\\\\\\\"\\\\n\\\\t\\\\t\\\\t[self primSoundAvailableBytes > 0]\\\\n\\\\t\\\\t\\\\t\\\\twhileFalse. \\\\\\\"wait for space to be available\\\\\\\"\\\\n\\\\t\\\\t\\\\tself primSoundPlaySamples: Buffer stereoSampleCount from: Buffer startingAt: 1.\\\\n\\\\t\\\\t\\\\tBuffer primFill: 0.\\\\n\\\\t\\\\t\\\\tBufferIndex := 1].\\\\n\\\\n\\\\tsample := s.\\\\n\\\\tsample >  32767 ifTrue: [ sample :=  32767 ]. \\\\n\\\\tsample < -32767 ifTrue: [ sample := -32767 ].\\\\n\\\\n\\\\tStereo\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\tleftSample := (sample * pan) // 1000.\\\\n\\\\t\\\\t\\\\tBuffer at: BufferIndex\\\\t\\\\tput: sample - leftSample.\\\\n\\\\t\\\\t\\\\tBuffer at: BufferIndex + 1\\\\tput: leftSample]\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\tBuffer at: BufferIndex + 1 put: sample].\\\\n\\\\tBufferIndex := BufferIndex + 2.\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'primitive test' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nsineTable: size\\\\n\\\\t\\\\\\\"Compute a sine table of the given size. Used for testing only.\\\\\\\"\\\\n\\\\n\\\\t| radiansPerStep table |\\\\n\\\\ttable := Array new: size.\\\\n\\\\tradiansPerStep := (2.0 * Float pi) / table size asFloat.\\\\n\\\\t1 to: table size do: [:i |\\\\n\\\\t\\\\ttable at: i put:\\\\n\\\\t\\\\t\\\\t(32767.0 * (radiansPerStep * i) sin) asInteger].\\\\n\\\\n\\\\t^ table\\\\n! !\\\\n\\\\n\\\\n!SoundPlayer class methodsFor: 'snapshotting' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nshutDown\\\\n\\\\t\\\\\\\"Stop player process, for example before snapshotting.\\\\\\\"\\\\n\\\\n\\\\tself stopPlayerProcess.\\\\n\\\\tReverbState := nil.\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'snapshotting' stamp: 'jm 7/11/97 12:17'!\\\\nstartUp\\\\n\\\\t\\\\\\\"Start up the player process.\\\\\\\"\\\\n\\\\n\\\\tSoundPlayer initialize.\\\\n\\\\tSoundPlayer\\\\n\\\\t\\\\tstartPlayerProcessBufferSize: (BufferMSecs * SamplingRate) // 1000\\\\n\\\\t\\\\trate: SamplingRate\\\\n\\\\t\\\\tstereo: Stereo.\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'snapshotting' stamp: 'ar 2/4/2001 17:59'!\\\\nstartUpWithSound: aSound\\\\n\\\\t\\\\\\\"Start up the player process.\\\\\\\"\\\\n\\\\n\\\\tSoundPlayer initialize.\\\\n\\\\tSoundPlayer\\\\n\\\\t\\\\tstartPlayerProcessBufferSize: (BufferMSecs * SamplingRate) // 1000\\\\n\\\\t\\\\trate: SamplingRate\\\\n\\\\t\\\\tstereo: Stereo\\\\n\\\\t\\\\tsound: aSound.\\\\n! !\\\\n\\\\n\\\\n!SoundPlayer class methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nisAllSilence: buffer size: count\\\\n\\\\t\\\\\\\"return true if the buffer is all silence after reverb has ended\\\\\\\"\\\\n\\\\t| value |\\\\n\\\\tvalue := buffer at: 1.\\\\n\\\\t2 to: count do:[:i| (buffer at: i) = value ifFalse:[^false]].\\\\n\\\\t^true! !\\\\n\\\\n!SoundPlayer class methodsFor: 'private' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSoundAvailableBytes\\\\n\\\\t\\\\\\\"Return the number of bytes of available space in the sound output buffer.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: Squeak always uses buffers containing 4-bytes per sample (2 channels at 2 bytes per channel) regardless of the state of the Stereo flag.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSoundAvailableSpace' module: 'SoundPlugin'>\\\\n\\\\t^ self primitiveFailed\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'private' stamp: 'JMM 11/6/2000 10:17'!\\\\nprimSoundGetVolume\\\\n\\\\t\\\\\\\"Return sound as array of doubles left then right channel, range is 0.0 to 1.0 but may be overdriven\\\\\\\"\\\\n\\\\t<primitive: 'primitiveSoundGetVolume' module: 'SoundPlugin'>\\\\n\\\\t^Array with: 1.0 with: 1.0! !\\\\n\\\\n!SoundPlayer class methodsFor: 'private' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSoundInsertSamples: count from: aSoundBuffer samplesOfLeadTime: anInteger\\\\n\\\\t\\\\\\\"Mix the given number of sample frames from the given sound buffer into the queue of samples that has already been submitted to the sound driver. This primitive is used to start a sound playing with minimum latency, even if large sound output buffers are being used to ensure smooth sound output. Returns the number of samples consumed, or zero if the primitive is not implemented or fails.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSoundInsertSamples' module: 'SoundPlugin'>\\\\n\\\\t^ 0\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'private' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSoundPlaySamples: count from: aSampleBuffer startingAt: index\\\\n\\\\t\\\\\\\"Copy count bytes into the current sound output buffer from the given sample buffer starting at the given index.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSoundPlaySamples' module: 'SoundPlugin'>\\\\n\\\\t^ self primitiveFailed\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'private' stamp: 'JMM 11/6/2000 10:14'!\\\\nprimSoundSetVolumeLeft: aLeftVolume volumeRight: aRightVolume\\\\n\\\\t\\\\\\\"Set sound pass in float 0.0-1.0 for left and right channel, with possible 2.0 or  higher to overdrive sound channel \\\\\\\"\\\\n\\\\t<primitive: 'primitiveSoundSetLeftVolume' module: 'SoundPlugin'>\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nprimSoundStartBufferSize: bufferSize rate: samplesPerSecond stereo: stereoFlag\\\\n\\\\t\\\\\\\"Start double-buffered sound output with the given buffer size and sampling rate. This version has been superceded by primitive 171 (primSoundStartBufferSize:rate:stereo:semaIndex:).\\\\\\\"\\\\n\\\\t\\\\\\\"ar 12/5/1998 Turn off the sound if not supported\\\\\\\"\\\\n\\\\t<primitive: 'primitiveSoundStart' module: 'SoundPlugin'>\\\\n\\\\tSoundSupported := false.! !\\\\n\\\\n!SoundPlayer class methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nprimSoundStartBufferSize: bufferSize rate: samplesPerSecond stereo: stereoFlag semaIndex: anInteger\\\\n\\\\t\\\\\\\"Start double-buffered sound output with the given buffer size and sampling rate. If the given semaphore index is > 0, it is taken to be the index of a Semaphore in the external objects array to be signalled when the sound driver is ready to accept another buffer of samples.\\\\\\\"\\\\n\\\\t\\\\\\\"Details: If this primitive fails, this method tries to use the older version instead.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSoundStartWithSemaphore' module: 'SoundPlugin'>\\\\n\\\\tUseReadySemaphore := false.\\\\n\\\\tself primSoundStartBufferSize: bufferSize rate: samplesPerSecond stereo: stereoFlag.\\\\n! !\\\\n\\\\n!SoundPlayer class methodsFor: 'private' stamp: 'tpr 2/2/2001 19:46'!\\\\nprimSoundStop\\\\n\\\\t\\\\\\\"Stop double-buffered sound output. Must not raise an error because it is used inside error handling and at system shutdown\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSoundStop' module: 'SoundPlugin'>! !\\\\n\\\\n!SoundPlayer class methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nstartPlayingImmediately: aSound\\\\n\\\\t\\\\\\\"Private!! Start playing the given sound as soon as possible by mixing it into the sound output buffers of the underlying sound driver.\\\\\\\"\\\\n\\\\n\\\\t| totalSamples buf n leftover src rest |\\\\n\\\\t\\\\\\\"first, fill a double-size buffer with samples\\\\\\\"\\\\n\\\\t\\\\\\\"Note: The code below assumes that totalSamples contains two\\\\n\\\\t buffers worth of samples, and the insertSamples primitive is\\\\n\\\\t expected to consume at least one buffer's worth of these\\\\n\\\\t samples. The remaining samples are guaranteed to fit into\\\\n\\\\t a single buffer.\\\\\\\"\\\\n\\\\ttotalSamples := Buffer stereoSampleCount * 2.  \\\\\\\"two buffer's worth\\\\\\\"\\\\n\\\\tbuf := SoundBuffer newStereoSampleCount: totalSamples.\\\\n\\\\taSound playSampleCount: totalSamples into: buf startingAt: 1.\\\\n\\\\tReverbState == nil ifFalse: [\\\\n\\\\t\\\\tReverbState applyReverbTo: buf startingAt: 1 count: totalSamples].\\\\n\\\\n\\\\tPlayerSemaphore critical: [\\\\n\\\\t\\\\t\\\\\\\"insert as many samples as possible into the sound driver's buffers\\\\\\\"\\\\n\\\\t\\\\tn := self primSoundInsertSamples: totalSamples\\\\n\\\\t\\\\t\\\\tfrom: buf\\\\n\\\\t\\\\t\\\\tsamplesOfLeadTime: 1024.\\\\n\\\\t\\\\tn > 0 ifTrue:[\\\\n\\\\t\\\\t\\\\tleftover := totalSamples - n.\\\\n\\\\n\\\\t\\\\t\\\\t\\\\\\\"copy the remainder of buf into Buffer\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\\\\"Note: the following loop iterates over 16-bit words, not two-word stereo slices\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\\\\"assert: 0 < leftover <= Buffer stereoSampleCount\\\\\\\"\\\\n\\\\t\\\\t\\\\tsrc := 2 * n.\\\\n\\\\t\\\\t\\\\t1 to: 2 * leftover do:\\\\n\\\\t\\\\t\\\\t\\\\t[:dst | Buffer at: dst put: (buf at: (src := src + 1))].\\\\n\\\\n\\\\t\\\\t\\\\t\\\\\\\"generate enough additional samples to finish filling Buffer\\\\\\\"\\\\n\\\\t\\\\t\\\\trest := Buffer stereoSampleCount - leftover.\\\\n\\\\t\\\\t\\\\taSound playSampleCount: rest into: Buffer startingAt: leftover + 1.\\\\n\\\\t\\\\t\\\\tReverbState == nil ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tReverbState applyReverbTo: Buffer startingAt: leftover + 1 count: rest].\\\\n\\\\n\\\\t\\\\t\\\\t\\\\\\\"record the fact that this sound has already been played into Buffer so that we don't process it again this time around\\\\\\\"\\\\n\\\\t\\\\t\\\\tSoundJustStarted := aSound.\\\\n\\\\t\\\\t] ifFalse:[\\\\n\\\\t\\\\t\\\\t\\\\\\\"quick start failed; reset the sound so we start over\\\\\\\"\\\\n\\\\t\\\\t\\\\taSound reset.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tActiveSounds add: aSound].\\\\n! !\\\\nStringReadoutTile subclass: #SoundReadoutTile\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'EToys-Scripting Tiles'!\\\\n!SoundReadoutTile commentStamp: 'sw 11/24/2003 15:25' prior: 0!\\\\nA tile comprising a readout for a sound-valued instance variable in a Viewer.  It sports up/down  arrows, and a click on the sound name results in a pop-up menu, offering the user the opportunity to choose a new one.!\\\\n\\\\n\\\\n!SoundReadoutTile methodsFor: 'arrows' stamp: 'sw 1/28/2005 00:57'!\\\\narrowAction: delta\\\\n\\\\t\\\\\\\"Do what is appropriate when an arrow on the tile is pressed; delta will be +1 or -1\\\\\\\"\\\\n\\\\n\\\\t| soundChoices index |\\\\n\\\\tsoundChoices _ self soundChoices.\\\\n\\\\tindex _ soundChoices indexOf: literal.\\\\n\\\\tself literal: (soundChoices atWrap: (index + delta)).\\\\n\\\\tself playSoundNamed: literal! !\\\\n\\\\n!SoundReadoutTile methodsFor: 'arrows' stamp: 'sw 11/24/2003 14:54'!\\\\nhandlerForMouseDown: anEvent\\\\n\\\\n\\\\t\\\\\\\"Return the (prospective) handler for a mouse down event. The handler is temporarily installed and can be used for morphs further down the hierarchy to negotiate whether the inner or the outer morph should finally handle the event\\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\t^ ((self findA: UpdatingStringMorph) bounds containsPoint: anEvent cursorPoint)\\\\n\\\\n\\\\t\\\\tifTrue:\\\\n\\\\n\\\\t\\\\t\\\\t[self]\\\\n\\\\n\\\\t\\\\tifFalse:\\\\n\\\\n\\\\t\\\\t\\\\t[super handlerForMouseDown: anEvent]! !\\\\n\\\\n!SoundReadoutTile methodsFor: 'arrows' stamp: 'sw 1/28/2005 00:56'!\\\\nmouseDown: evt\\\\n\\\\t\\\\\\\"Handle a mouse down event\\\\\\\"\\\\n\\\\n\\\\t| aPoint index isUp soundChoices adjustment |\\\\n\\\\tupArrow ifNotNil: [((isUp _ upArrow containsPoint: (aPoint _ evt cursorPoint)) or:  [downArrow containsPoint: aPoint])\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[soundChoices _ self soundChoices.\\\\n\\\\t\\\\t\\\\tindex _ soundChoices indexOf: literal ifAbsent: [1].\\\\n\\\\t\\\\t\\\\tindex > 0 ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[adjustment _ isUp ifTrue: [1] ifFalse: [-1].\\\\n\\\\t\\\\t\\\\t\\\\tself literal: (soundChoices atWrap: (index + adjustment))].\\\\n\\\\t\\\\t\\\\tself playSoundNamed: literal.\\\\n\\\\t\\\\t\\\\t^ self]].\\\\n\\\\tself soundNameFromUser ifNotNilDo:\\\\n\\\\t\\\\t[:aSoundName |\\\\n\\\\t\\\\t\\\\tself literal: aSoundName.\\\\n\\\\t\\\\t\\\\tself playSoundNamed: literal]! !\\\\n\\\\n!SoundReadoutTile methodsFor: 'arrows' stamp: 'yo 2/11/2005 16:12'!\\\\nsetLiteral: aLiteral\\\\n\\\\n\\\\tsuper  setLiteral: aLiteral.\\\\n\\\\n\\\\t(self findA: UpdatingStringMorph) useSymbolFormat; lock! !\\\\n\\\\n!SoundReadoutTile methodsFor: 'arrows' stamp: 'yo 2/11/2005 16:08'!\\\\nsoundNameFromUser\\\\n\\\\t\\\\\\\"Obtain a sound from the user.  Exclude the items designated as being discouraged, except that if the current selection is one of those, show it anyway\\\\\\\"\\\\n\\\\n\\\\t| choices |\\\\n\\\\tchoices _ self soundChoices.\\\\n\\\\t^ (SelectionMenu labels: (choices collect: [:t | t translated]) selections: self soundChoices) startUpWithCaption: 'Sounds' translated! !\\\\n\\\\n\\\\n!SoundReadoutTile methodsFor: 'literal' stamp: 'sw 1/28/2005 00:57'!\\\\nsetLiteralTo: anObject width: w\\\\n\\\\t\\\\\\\"Set the literal and width of the tile as indicated\\\\\\\"\\\\n\\\\n\\\\t| soundChoices index |\\\\n\\\\tsoundChoices _ self soundChoices.\\\\n\\\\tindex _ soundChoices indexOf: anObject.\\\\n\\\\tself setLiteral: (soundChoices atWrap: index)! !\\\\n\\\\n\\\\n!SoundReadoutTile methodsFor: 'private' stamp: 'yo 2/11/2005 16:13'!\\\\nupdateLiteralLabel\\\\n\\\\n\\\\t\\\\\\\"Update the wording emblazoned on the tile, if needed\\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\tsuper updateLiteralLabel.\\\\n\\\\n\\\\t(self findA: UpdatingStringMorph) useSymbolFormat; lock! !\\\\nObject subclass: #SoundRecorder\\\\n\\\\tinstanceVariableNames: 'stereo samplingRate recordLevel recordedBuffers recordedSound recordProcess bufferAvailableSema paused meteringBuffer meterLevel soundPlaying currentBuffer nextIndex codec desiredSampleRate'\\\\n\\\\tclassVariableNames: 'CanRecordWhilePlaying RecorderActive'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Sound-Synthesis'!\\\\n\\\\n!SoundRecorder methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ncodec: aSoundCodec\\\\n\\\\n\\\\tcodec := aSoundCodec! !\\\\n\\\\n!SoundRecorder methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ndesiredSampleRate: newRate\\\\n\\\\n\\\\t\\\\\\\"use of this method indicates a strong desire for the specified rate, even if\\\\n\\\\tthe OS/hardware are not cooperative\\\\\\\"\\\\n\\\\n\\\\tdesiredSampleRate := samplingRate := newRate  \\\\\\\"Best are 44100 22050 11025\\\\\\\"\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'accessing' stamp: 'jj 10/20/97 15:30'!\\\\nisActive\\\\n\\\\t\\\\\\\"Return true if I have a recordProcess running.\\\\\\\"\\\\n\\\\n\\\\t^ recordProcess ~~ nil\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'accessing' stamp: 'jm 9/2/97 16:16'!\\\\nisPaused\\\\n\\\\t\\\\\\\"Return true if recording is paused.\\\\\\\"\\\\n\\\\n\\\\t^ paused\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'accessing' stamp: 'jm 9/18/97 19:19'!\\\\nmeterLevel\\\\n\\\\t\\\\\\\"Return the meter level, an integer in the range [0..100] where zero is silence and 100 represents the maximum signal level possible without clipping.\\\\\\\"\\\\n\\\\n\\\\t^ (100 * meterLevel) // 32768\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'accessing' stamp: 'jm 7/4/1998 15:03'!\\\\nrecordLevel\\\\n\\\\n\\\\t^ recordLevel\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nrecordLevel: level\\\\n\\\\t\\\\\\\"Set the desired recording level to the given value in the range 0.0 to 1.0, where 0.0 is the lowest recording level and 1.0 is the maximum. Do nothing if the sound input hardware does not support changing the recording level.\\\\\\\"\\\\n\\\\t\\\\\\\"Details: On the Macintosh, the lowest possible record level attenuates the input signal, but does not silence it entirely.\\\\\\\" \\\\n\\\\n\\\\trecordLevel := (level asFloat min: 1.0) max: 0.0.\\\\n\\\\trecordProcess ifNotNil: [\\\\n\\\\t\\\\tself primSetRecordLevel: (1000.0 * recordLevel) asInteger].\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'accessing' stamp: 'jm 12/15/97 14:28'!\\\\nsamplingRate\\\\n\\\\n\\\\t^ samplingRate\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nsamplingRate: newRate\\\\n\\\\n\\\\tsamplingRate := newRate  \\\\\\\"Best are 44100 22050 11025\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!SoundRecorder methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ninitialize\\\\n\\\\t\\\\\\\"SoundRecorder new\\\\\\\"\\\\n\\\\n\\\\tstereo := false.\\\\n\\\\tsamplingRate := 11025.\\\\n\\\\trecordLevel := 0.5.\\\\n\\\\tself initializeRecordingState.\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ninitializeRecordingState\\\\n\\\\n\\\\trecordProcess := nil.\\\\n\\\\tbufferAvailableSema := nil.\\\\n\\\\tpaused := true.\\\\n\\\\tmeteringBuffer := nil.\\\\n\\\\tmeterLevel := 0.\\\\n\\\\tsoundPlaying := nil.\\\\n\\\\tcurrentBuffer := nil.\\\\n\\\\tnextIndex := 1.\\\\n! !\\\\n\\\\n\\\\n!SoundRecorder methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimGetActualRecordingSampleRate\\\\n\\\\t\\\\\\\"Return the actual sample rate being used for recording. This primitive fails unless sound recording is currently in progress.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSoundGetRecordingSampleRate' module: 'SoundPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimRecordSamplesInto: aWordArray startingAt: index\\\\n\\\\t\\\\\\\"Record a sequence of 16-bit sound samples into the given array starting at the given sample index. Return the number of samples recorded, which may be zero if no samples are currently available.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSoundRecordSamples' module: 'SoundPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSetRecordLevel: anInteger\\\\n\\\\t\\\\\\\"Set the desired recording level to the given value in the range 0-1000, where 0 is the lowest recording level and 1000 is the maximum. Do nothing if the sound input hardware does not support changing the recording level.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSoundSetRecordLevel' module: 'SoundPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimStartRecordingDesiredSampleRate: samplesPerSec stereo: stereoFlag semaIndex: anInteger\\\\n\\\\t\\\\\\\"Start sound recording with the given stereo setting. Use a sampling rate as close to the desired rate as the underlying platform will support. If the given semaphore index is > 0, it is taken to be the index of a Semaphore in the external objects array to be signalled every time a recording buffer is filled.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSoundStartRecording' module: 'SoundPlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'primitives' stamp: 'tpr 2/15/2001 17:13'!\\\\nprimStopRecording\\\\n\\\\t\\\\\\\"Stop sound recording. Does nothing if recording is not currently in progress. Do not fail if plugin is not available\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveSoundStopRecording' module: 'SoundPlugin'>! !\\\\n\\\\n\\\\n!SoundRecorder methodsFor: 'recording controls' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nclearRecordedSound\\\\n\\\\t\\\\\\\"Clear the sound recorded thus far. Go into pause mode if currently recording.\\\\\\\"\\\\n\\\\n\\\\tpaused := true.\\\\n\\\\trecordedSound := SequentialSound new.\\\\n\\\\tself allocateBuffer.\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'recording controls' stamp: 'sw 6/10/2003 12:34'!\\\\nhasRecordedSound\\\\n\\\\n\\\\t\\\\\\\"Answer whether the receiver currently has any recorded sound\\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\t^ self recordedSound notNil! !\\\\n\\\\n!SoundRecorder methodsFor: 'recording controls' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\npause\\\\n\\\\t\\\\\\\"Go into pause mode. The record level continues to be updated, but no sound is recorded.\\\\\\\"\\\\n\\\\n\\\\tpaused := true.\\\\n\\\\t((currentBuffer ~~ nil) and: [nextIndex > 1])\\\\n\\\\t\\\\tifTrue: [self emitPartialBuffer.\\\\n\\\\t\\\\t\\\\t\\\\tself allocateBuffer].\\\\n\\\\n\\\\tsoundPlaying ifNotNil: [\\\\n\\\\t\\\\tsoundPlaying pause.\\\\n\\\\t\\\\tsoundPlaying := nil].\\\\n\\\\t\\\\\\\"Note: there can be problems if canRecordWhilePlaying is true. Recorders which only pause will inhibit other recorders from recording. I chose to make #stopPlaying unconditional in a subclass. The same might be appropriate here at the expense of making recorders resumable\\\\\\\"\\\\n\\\\n\\\\tPreferences canRecordWhilePlaying ifFalse: [self stopRecording].\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'recording controls' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nplayback\\\\n\\\\t\\\\\\\"Playback the sound that has been recorded.\\\\\\\"\\\\n\\\\n\\\\tself pause.\\\\n\\\\tsoundPlaying := self recordedSound.\\\\n\\\\tsoundPlaying play.\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'recording controls' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nresumeRecording\\\\n\\\\t\\\\\\\"Continue recording from the point at which it was last paused.\\\\\\\"\\\\n\\\\n\\\\tself flag: #bob.\\\\n\\\\t\\\\\\\"Note: If canRecordWhilePlaying is true, then recordings may never get started (at least by this method). One possibility, used in a subclass, is to make the #startPlaying unconditional. Another would be to use #startPlaying instead of #resumePlaying in appropriate cases\\\\\\\"\\\\n\\\\n\\\\tPreferences canRecordWhilePlaying ifFalse: [self startRecording].\\\\n\\\\tpaused := false.\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'recording controls' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nstartRecording\\\\n\\\\t\\\\\\\"Turn of the sound input driver and start the recording process. Initially, recording is paused.\\\\\\\"\\\\n\\\\n\\\\t| semaIndex |\\\\n\\\\trecordLevel ifNil: [recordLevel := 0.5].  \\\\\\\"lazy initialization\\\\\\\"\\\\n\\\\tPreferences canRecordWhilePlaying ifFalse: [SoundPlayer shutDown].\\\\n\\\\trecordProcess ifNotNil: [self stopRecording].\\\\n\\\\tpaused := true.\\\\n\\\\tmeteringBuffer := SoundBuffer newMonoSampleCount: 1024.\\\\n\\\\tmeterLevel := 0.\\\\n\\\\tself allocateBuffer.\\\\n\\\\tbufferAvailableSema := Semaphore new.\\\\n\\\\tsemaIndex := Smalltalk registerExternalObject: bufferAvailableSema.\\\\n\\\\tself primStartRecordingDesiredSampleRate: samplingRate asInteger\\\\n\\\\t\\\\tstereo: stereo\\\\n\\\\t\\\\tsemaIndex: semaIndex.\\\\n\\\\tRecorderActive := true.\\\\n\\\\tsamplingRate := self primGetActualRecordingSampleRate.\\\\n\\\\tself primSetRecordLevel: (1000.0 * recordLevel) asInteger.\\\\n\\\\trecordProcess := [self recordLoop] newProcess.\\\\n\\\\trecordProcess priority: Processor userInterruptPriority.\\\\n\\\\trecordProcess resume.\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'recording controls' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nstopRecording\\\\n\\\\t\\\\\\\"Stop the recording process and turn of the sound input driver.\\\\\\\"\\\\n\\\\n\\\\trecordProcess ifNotNil: [recordProcess terminate].\\\\n\\\\trecordProcess := nil.\\\\n\\\\tself primStopRecording.\\\\n\\\\tRecorderActive := false.\\\\n\\\\tSmalltalk unregisterExternalObject: bufferAvailableSema.\\\\n\\\\t((currentBuffer ~~ nil) and: [nextIndex > 1])\\\\n\\\\t\\\\tifTrue: [self emitPartialBuffer].\\\\n\\\\tself initializeRecordingState.\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'recording controls' stamp: 'sw 3/3/2004 19:49'!\\\\nverifyExistenceOfRecordedSound\\\\n\\\\n\\\\t\\\\\\\"If the receiver has a recorded sound, answer true; if not, put up an informer and answer false\\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\t^ self recordedSound\\\\n\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\n\\\\t\\\\t\\\\t[true]\\\\n\\\\n\\\\t\\\\tifNil:\\\\n\\\\n\\\\t\\\\t\\\\t[self inform: 'please record a sound first' translated.\\\\n\\\\n\\\\t\\\\t\\\\tfalse]! !\\\\n\\\\n\\\\n!SoundRecorder methodsFor: 'results' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ncondensedSamples\\\\n\\\\t\\\\\\\"Return a single SoundBuffer that is the contatenation of all my recorded buffers.\\\\\\\"\\\\n\\\\n\\\\t| sz newBuf i |\\\\n\\\\trecordedBuffers := recordedSound sounds collect: [:snd | snd samples].\\\\n\\\\trecordedBuffers isEmpty ifTrue: [^ SoundBuffer new: 0].\\\\n\\\\trecordedBuffers size = 1 ifTrue: [^ recordedBuffers first copy].\\\\n\\\\tsz := recordedBuffers inject: 0 into: [:tot :buff | tot + buff size].\\\\n\\\\tnewBuf := SoundBuffer newMonoSampleCount: sz.\\\\n\\\\ti := 1.\\\\n\\\\trecordedBuffers do: [:b |\\\\n\\\\t\\\\t1 to: b size do: [:j |\\\\n\\\\t\\\\t\\\\tnewBuf at: i put: (b at: j).\\\\n\\\\t\\\\t\\\\ti := i + 1]].\\\\n\\\\trecordedBuffers := nil.\\\\n\\\\t^ newBuf\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'results' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ncondensedStereoSound\\\\n\\\\t\\\\\\\"Decompose my buffers into left and right channels and return a mixed sound consisting of the those two channels. This may be take a while, since the data must be copied into new buffers.\\\\\\\"\\\\n\\\\n\\\\t| sz leftBuf rightBuf leftI rightI left |\\\\n\\\\tsz := recordedBuffers inject: 0 into: [:tot :buff | tot + buff size].\\\\n\\\\tleftBuf := SoundBuffer newMonoSampleCount: (sz + 1) // 2.\\\\n\\\\trightBuf := SoundBuffer newMonoSampleCount: (sz + 1) // 2.\\\\n\\\\tleftI := rightI := 1.\\\\n\\\\tleft := true.\\\\n\\\\trecordedBuffers do: [:b |\\\\n\\\\t\\\\t1 to: b size do: [:j |\\\\n\\\\t\\\\t\\\\tleft\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [leftBuf at: leftI put: (b at: j). leftI := leftI + 1. left := false]\\\\n\\\\f\\\\t\\\\t\\\\t\\\\tifFalse: [rightBuf at: rightI put: (b at: j). rightI := rightI + 1. left := true]]].\\\\n\\\\t^ MixedSound new\\\\n\\\\t\\\\tadd: (SampledSound new setSamples: leftBuf samplingRate: samplingRate) pan: 0.0;\\\\n\\\\t\\\\tadd: (SampledSound new setSamples: rightBuf samplingRate: samplingRate) pan: 1.0\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'results' stamp: 'di 2/17/1999 11:07'!\\\\nrecordedSound\\\\n\\\\t\\\\\\\"Return the sound that was recorded.\\\\\\\"\\\\n\\\\n\\\\t^ recordedSound\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'results' stamp: 'di 2/17/1999 21:24'!\\\\nsoundSegments\\\\n\\\\n\\\\t^ self segmentsAbove: 1000 normalizedVolume: 80.0\\\\n! !\\\\n\\\\n\\\\n!SoundRecorder methodsFor: 'trimming' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ncopyFrom: startPlace to: endPlace normalize: nFactor dcOffset: dcOffset\\\\n\\\\t\\\\\\\"Return a new SoundBuffer containing the samples in the given range.\\\\\\\"\\\\n\\\\n\\\\t| startBufIndex startSampleIndex endBufIndex endSampleIndex\\\\n\\\\t count resultBuf j buf firstInBuf n |\\\\n\\\\tstartBufIndex := startPlace at: 1.\\\\n\\\\tstartSampleIndex := startPlace at: 2.\\\\n\\\\tendBufIndex := endPlace at: 1.\\\\n\\\\tendSampleIndex := endPlace at: 2.\\\\n\\\\n\\\\tstartBufIndex = endBufIndex\\\\n\\\\t\\\\tifTrue: [count := endSampleIndex + 1 - startSampleIndex]\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\tcount := ((recordedBuffers at: startBufIndex) size + 1 - startSampleIndex).  \\\\\\\"first buffer\\\\\\\"\\\\n\\\\t\\\\t\\\\tcount := count + endSampleIndex.  \\\\\\\"last buffer\\\\\\\"\\\\n\\\\t\\\\t\\\\tstartBufIndex + 1 to: endBufIndex - 1 do:\\\\n\\\\t\\\\t\\\\t\\\\t[:i | count := count + (recordedBuffers at: i) size]].  \\\\\\\"middle buffers\\\\\\\"\\\\n\\\\tresultBuf := SoundBuffer newMonoSampleCount: count.\\\\n\\\\n\\\\tj := 1.  \\\\\\\"next destination index in resultBuf\\\\\\\"\\\\n\\\\tstartBufIndex to: endBufIndex do: [:i |\\\\n\\\\t\\\\tbuf := recordedBuffers at: i.\\\\n\\\\t\\\\tfirstInBuf := 1.\\\\n\\\\t \\\\tn := buf size.\\\\n\\\\t\\\\ti = startBufIndex ifTrue: [\\\\n\\\\t\\\\t\\\\tn := (recordedBuffers at: startBufIndex) size + 1 - startSampleIndex.\\\\n\\\\t\\\\t\\\\tfirstInBuf := startSampleIndex].\\\\n\\\\t\\\\ti = endBufIndex ifTrue: [\\\\n\\\\t\\\\t\\\\ti = startBufIndex\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [n := endSampleIndex + 1 - startSampleIndex]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [n := endSampleIndex]].\\\\n\\\\t\\\\tself copyTo: resultBuf from: j to: (j + n - 1)\\\\n\\\\t\\\\t\\\\tfrom: buf startingAt: firstInBuf\\\\n\\\\t\\\\t\\\\tnormalize: nFactor dcOffset: dcOffset.\\\\n\\\\t\\\\tj := j + n].\\\\n\\\\t^ resultBuf\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'trimming' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ncopyTo: resultBuf from: startIndex to: endIndex from: buf startingAt: firstInBuf normalize: nFactor dcOffset: dcOffset\\\\n\\\\t\\\\\\\"Copy samples from buf to resultBuf removing the DC offset and normalizing their volume in the process.\\\\\\\"\\\\n\\\\n\\\\t| indexOffset |\\\\n\\\\tindexOffset := firstInBuf - startIndex.\\\\n\\\\tstartIndex to: endIndex do: [:i |\\\\n\\\\t\\\\tresultBuf at: i put: (((buf at: (i + indexOffset)) - dcOffset) * nFactor) // 1000].\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'trimming' stamp: 'di 2/16/1999 22:11'!\\\\nendPlace\\\\n\\\\n\\\\t^ Array with: recordedBuffers size with: recordedBuffers last size! !\\\\n\\\\n!SoundRecorder methodsFor: 'trimming' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nfirstSampleOverThreshold: threshold dcOffset: dcOffset startingAt: startPlace\\\\n\\\\t\\\\\\\"Beginning at startPlace, this routine will return the first place at which a sample exceeds the given threshold.\\\\\\\"\\\\n\\\\n\\\\t| buf s iStart jStart nThreshold |\\\\n\\\\tnThreshold := threshold negated.\\\\n\\\\tiStart := startPlace first.\\\\n\\\\tjStart := startPlace second.\\\\n\\\\tiStart to: recordedBuffers size do:\\\\n\\\\t\\\\t[:i | buf := recordedBuffers at: i.\\\\n\\\\t\\\\tjStart to: buf size do:\\\\n\\\\t\\\\t\\\\t[:j | s := (buf at: j) - dcOffset.\\\\n\\\\t\\\\t\\\\t(s < nThreshold or: [s > threshold]) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[\\\\\\\"found a sample over threshold\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t^ Array with: i with: j]].\\\\n\\\\t\\\\tjStart := 1].\\\\n\\\\t^ self endPlace! !\\\\n\\\\n!SoundRecorder methodsFor: 'trimming' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nnormalizeFactorFor: percentOfMaxVolume min: min max: max dcOffset: dcOffset\\\\n\\\\t\\\\\\\"Return a normalization factor for the range of sample values and DC offset. A normalization factor is a fixed-point number that will be divided by 1000 after multiplication with each sample value.\\\\\\\"\\\\n\\\\n\\\\t| peak factor |\\\\n\\\\tpeak := (max - dcOffset) max: (min - dcOffset) negated.\\\\n\\\\tpeak = 0 ifTrue: [^ 1000].\\\\n\\\\tfactor := (32767.0 * percentOfMaxVolume) / (100.0 * peak).\\\\n\\\\t^ (factor * 1000.0) asInteger\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'trimming' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nplace: startPlace plus: nSamples\\\\n\\\\t\\\\\\\"Return the place that is nSamples (may be negative) beyond thisPlace.\\\\\\\"\\\\n\\\\n\\\\t| i j remaining buf |\\\\n\\\\ti := startPlace first.\\\\n\\\\tj := startPlace second.\\\\n\\\\tnSamples >= 0\\\\n\\\\tifTrue: [remaining := nSamples.\\\\n\\\\t\\\\t\\\\t[buf := recordedBuffers at: i.\\\\n\\\\t\\\\t\\\\t(j + remaining) <= buf size ifTrue: [^ Array with: i with: j + remaining].\\\\n\\\\t\\\\t\\\\ti < recordedBuffers size]\\\\n\\\\t\\\\t\\\\t\\\\twhileTrue: [remaining := remaining - (buf size - j + 1).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ti := i+1.  j := 1].\\\\n\\\\t\\\\t\\\\t^ self endPlace]\\\\n\\\\tifFalse: [remaining := nSamples negated.\\\\n\\\\t\\\\t\\\\t[buf := recordedBuffers at: i.\\\\n\\\\t\\\\t\\\\t(j - remaining) >= 1 ifTrue: [^ Array with: i with: j - remaining].\\\\n\\\\t\\\\t\\\\ti > 1]\\\\n\\\\t\\\\t\\\\t\\\\twhileTrue: [remaining := remaining - j.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ti := i-1.  j := (recordedBuffers at: i) size].\\\\n\\\\t\\\\t\\\\t^ #(1 1)]! !\\\\n\\\\n!SoundRecorder methodsFor: 'trimming' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nscanForEndThreshold: threshold dcOffset: dcOffset minLull: lull startingAt: startPlace\\\\n\\\\t\\\\\\\"Beginning at startPlace, this routine will find the last sound that exceeds threshold, such that if you look lull samples later you will not find another sound over threshold within the following block of lull samples.\\\\n\\\\tReturn the place that is lull samples beyond to that last sound.\\\\n\\\\tIf no end of sound is found, return endPlace.\\\\\\\"\\\\n\\\\n\\\\t| buf s iStart jStart nThreshold n |\\\\n\\\\tnThreshold := threshold negated.\\\\n\\\\tiStart := startPlace first.\\\\n\\\\tjStart := startPlace second.\\\\n\\\\tn := 0.\\\\n\\\\tiStart to: recordedBuffers size do:\\\\n\\\\t\\\\t[:i | buf := recordedBuffers at: i.\\\\n\\\\t\\\\tjStart to: buf size do:\\\\n\\\\t\\\\t\\\\t[:j | s := (buf at: j) - dcOffset.\\\\n\\\\t\\\\t\\\\t(s < nThreshold or: [s > threshold])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"found a sample over threshold\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tn := 0]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\\\\"still not over threshold\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tn := n + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tn >= lull ifTrue: [^ Array with: i with: j]]].\\\\n\\\\t\\\\tjStart := 1].\\\\n\\\\t^ self endPlace! !\\\\n\\\\n!SoundRecorder methodsFor: 'trimming' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nscanForStartThreshold: threshold dcOffset: dcOffset minDur: duration startingAt: startPlace\\\\n\\\\t\\\\\\\"Beginning at startPlace, this routine will find the first sound that exceeds threshold, such that if you look duration samples later you will find another sound over threshold within the following block of duration samples.\\\\n\\\\tReturn the place that is duration samples prior to that first sound.\\\\n\\\\tIf no sound is found, return endPlace.\\\\\\\"\\\\n\\\\n\\\\t| soundPlace lookPlace nextSoundPlace thirdPlace |\\\\n\\\\tsoundPlace := self firstSampleOverThreshold: threshold dcOffset: dcOffset\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: startPlace.\\\\n\\\\t[soundPlace = self endPlace ifTrue: [^ soundPlace].\\\\n\\\\t\\\\\\\"Found a sound -- look duration later\\\\\\\"\\\\n\\\\tlookPlace := self place: soundPlace plus: duration.\\\\n\\\\tnextSoundPlace := self firstSampleOverThreshold: threshold dcOffset: dcOffset\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: lookPlace.\\\\n\\\\tthirdPlace := self place: lookPlace plus: duration.\\\\n\\\\tnextSoundPlace first < thirdPlace first\\\\n\\\\t\\\\tor: [nextSoundPlace first = thirdPlace first\\\\n\\\\t\\\\t\\\\tand: [nextSoundPlace second < thirdPlace second]]]\\\\n\\\\t\\\\twhileFalse: [soundPlace := nextSoundPlace].\\\\n\\\\n\\\\t\\\\\\\"Yes, there is sound in the next interval as well\\\\\\\"\\\\n\\\\t^ self place: soundPlace plus: 0-duration\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'trimming' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nsegmentsAbove: threshold normalizedVolume: percentOfMaxVolume\\\\n\\\\t\\\\\\\"Break the current recording up into a sequence of sound segments separated by silences.\\\\\\\"\\\\n\\\\n\\\\t| max min sum totalSamples bufSize s dcOffset firstPlace endPlace resultBuf nFactor lastPlace segments gapSize minDur minLull soundSize restSize |\\\\n\\\\tstereo ifTrue: [self error: 'stereo trimming is not yet supported'].\\\\n\\\\tpaused ifFalse: [self error: 'must stop recording before trimming'].\\\\n\\\\t(recordedSound == nil or: [recordedSound sounds isEmpty]) ifTrue:[^ self].\\\\n\\\\t\\\\\\\"Reconstruct buffers so old trimming code will work\\\\\\\"\\\\n\\\\trecordedBuffers := recordedSound sounds collect: [:snd | snd samples].\\\\n\\\\tsoundSize := restSize := 0.\\\\n\\\\n\\\\tmax := min := sum := totalSamples := 0.\\\\n\\\\trecordedBuffers do: [:buf |\\\\n\\\\t\\\\tbufSize := buf size.\\\\n\\\\t\\\\ttotalSamples := totalSamples + buf size.\\\\n\\\\t\\\\t1 to: bufSize do: [:i |\\\\n\\\\t\\\\t\\\\ts := buf at: i.\\\\n\\\\t\\\\t\\\\ts > max ifTrue: [max := s].\\\\n\\\\t\\\\t\\\\ts < min ifTrue: [min := s].\\\\n\\\\t\\\\t\\\\tsum := sum + s]].\\\\n\\\\tdcOffset := sum // totalSamples.\\\\n\\\\n\\\\tminDur := (samplingRate/20.0) asInteger.  \\\\\\\" 1/20 second \\\\\\\"\\\\n\\\\tminLull := (samplingRate/4.0) asInteger.  \\\\\\\" 1/2 second \\\\\\\"\\\\n\\\\tsegments := SequentialSound new.\\\\n\\\\tendPlace := self endPlace.\\\\n\\\\tlastPlace := #(1 1).\\\\n\\\\t[firstPlace := self scanForStartThreshold: threshold\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdcOffset: dcOffset\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tminDur: minDur\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: lastPlace.\\\\n\\\\tfirstPlace = endPlace]\\\\n\\\\t\\\\twhileFalse:\\\\n\\\\t\\\\t[firstPlace = lastPlace ifFalse:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"Add a silence equal to the gap size\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\\\\"Wasteful but simple way to get gap size...\\\\\\\"\\\\n\\\\t\\\\t\\\\tgapSize := (self copyFrom: lastPlace to: firstPlace\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnormalize: 1000 dcOffset: dcOffset) size - 2.\\\\n\\\\t\\\\t\\\\t\\\\\\\"... -2 makes up for overlap of one sample on either end\\\\\\\"\\\\n\\\\t\\\\t\\\\tsegments add: (RestSound dur: gapSize asFloat / samplingRate).\\\\n\\\\t\\\\t\\\\trestSize := restSize + gapSize.\\\\n\\\\\\\"Transcript cr; print: firstPlace; space; print: lastPlace; space; print: gapSize; space; show: 'gap'.\\\\\\\"\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\tlastPlace := self scanForEndThreshold: threshold\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdcOffset: dcOffset\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tminLull: minLull + minDur\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: firstPlace.\\\\n\\\\t\\\\t\\\\\\\"Allow room for lead time of next sound\\\\\\\"\\\\n\\\\t\\\\tlastPlace := self place: lastPlace plus: minDur negated.\\\\n\\\\t\\\\tnFactor := self normalizeFactorFor: percentOfMaxVolume\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmin: min max: max dcOffset: dcOffset.\\\\n\\\\t\\\\tresultBuf := self copyFrom: firstPlace to: lastPlace\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnormalize: nFactor dcOffset: dcOffset.\\\\n\\\\t\\\\tsoundSize := soundSize + resultBuf size.\\\\n\\\\\\\"Transcript cr; print: firstPlace; space; print: lastPlace; space; print: resultBuf size; space; show: 'sound'.\\\\\\\"\\\\n\\\\t\\\\tsegments add: (codec == nil\\\\n\\\\t\\\\t\\\\tifTrue: [SampledSound new setSamples: resultBuf samplingRate: samplingRate]\\\\n\\\\t\\\\t\\\\tifFalse: [codec compressSound: (SampledSound new setSamples: resultBuf samplingRate: samplingRate)])].\\\\n\\\\n\\\\t\\\\\\\"Final gap for consistency\\\\\\\"\\\\n\\\\tgapSize := (self copyFrom: lastPlace to: self endPlace\\\\n\\\\t\\\\t\\\\t\\\\tnormalize: 1000 dcOffset: dcOffset) size - 1.\\\\n\\\\tsegments add: (RestSound dur: gapSize asFloat / samplingRate).\\\\n\\\\trestSize := restSize + gapSize.\\\\n\\\\tself inform: ((soundSize+restSize/samplingRate) roundTo: 0.1) printString , ' secs reduced to ' , ((soundSize/samplingRate) roundTo: 0.1) printString.\\\\n\\\\trecordedBuffers := nil.\\\\n\\\\t^ segments! !\\\\n\\\\n!SoundRecorder methodsFor: 'trimming' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nsuppressSilence\\\\n\\\\n\\\\trecordedSound := self soundSegments! !\\\\n\\\\n!SoundRecorder methodsFor: 'trimming' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ntrim: threshold normalizedVolume: percentOfMaxVolume\\\\n\\\\t\\\\\\\"Remove the leading and trailing parts of this recording that are below the given threshold. Remove any DC offset and scale the recording so that its peaks are the given percent of the maximum volume.\\\\\\\"\\\\n\\\\n\\\\t| max min sum totalSamples bufSize s dcOffset startPlace endPlace resultBuf nFactor |\\\\n\\\\tstereo ifTrue: [self error: 'stereo trimming is not yet supported'].\\\\n\\\\tpaused ifFalse: [self error: 'must stop recording before trimming'].\\\\n\\\\trecordedBuffers := recordedSound sounds collect: [:snd | snd samples].\\\\n\\\\trecordedBuffers isEmpty ifTrue: [^ self].\\\\n\\\\n\\\\tmax := min := sum := totalSamples := 0.\\\\n\\\\trecordedBuffers do: [:buf |\\\\n\\\\t\\\\tbufSize := buf size.\\\\n\\\\t\\\\ttotalSamples := totalSamples + buf size.\\\\n\\\\t\\\\t1 to: bufSize do: [:i |\\\\n\\\\t\\\\t\\\\ts := buf at: i.\\\\n\\\\t\\\\t\\\\ts > max ifTrue: [max := s].\\\\n\\\\t\\\\t\\\\ts < min ifTrue: [min := s].\\\\n\\\\t\\\\t\\\\tsum := sum + s]].\\\\n\\\\tdcOffset := sum // totalSamples.\\\\n\\\\n\\\\t\\\\\\\"a place is an array of <buffer index><index of sample in buffer>\\\\\\\"\\\\n\\\\tstartPlace := self scanForStartThreshold: threshold\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdcOffset: dcOffset\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tminDur: (samplingRate/60.0) asInteger \\\\\\\"at least 1/60th of a second\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: #(1 1).\\\\n\\\\tstartPlace = self endPlace ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"no samples above threshold\\\\\\\"\\\\n\\\\t\\\\trecordedBuffers := nil.  ^ self].\\\\n\\\\n\\\\tendPlace := self scanForEndThreshold: threshold\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdcOffset: dcOffset\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tminLull: (samplingRate/5) asInteger\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: startPlace.\\\\n\\\\tnFactor := self normalizeFactorFor: percentOfMaxVolume min: min max: max dcOffset: dcOffset.\\\\n\\\\tresultBuf := self copyFrom: startPlace to: endPlace normalize: nFactor dcOffset: dcOffset.\\\\n\\\\trecordedSound := SampledSound new setSamples: resultBuf samplingRate: samplingRate.\\\\n\\\\trecordedBuffers := nil\\\\n! !\\\\n\\\\n\\\\n!SoundRecorder methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nallocateBuffer\\\\n\\\\t\\\\\\\"Allocate a new buffer and reset nextIndex.\\\\\\\"\\\\n\\\\n\\\\t| bufferTime |\\\\n\\\\tbufferTime := stereo  \\\\\\\"Buffer time = 1/2 second\\\\\\\"\\\\n\\\\t\\\\tifTrue: [self samplingRate asInteger]\\\\n\\\\t\\\\tifFalse: [self samplingRate asInteger // 2].\\\\n\\\\tcurrentBuffer := SoundBuffer newMonoSampleCount:\\\\n\\\\t\\\\t\\\\\\\"Multiple of samplesPerFrame that is approx. bufferTime long\\\\\\\"\\\\n\\\\t\\\\t(bufferTime truncateTo: self samplesPerFrame).\\\\n\\\\tnextIndex := 1.\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nemitBuffer: buffer\\\\n\\\\n\\\\t| sound ratio resultBuf |\\\\n\\\\n\\\\t\\\\\\\"since some sound recording devices cannot (or will not) record below a certain sample rate,\\\\n\\\\ttrim the samples down if the user really wanted fewer samples\\\\\\\"\\\\n\\\\n\\\\t(desiredSampleRate isNil or: [(ratio := samplingRate // desiredSampleRate) <= 1]) ifTrue: [\\\\n\\\\t\\\\tsound := SampledSound new setSamples: buffer samplingRate: samplingRate.\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tresultBuf := SoundBuffer \\\\n\\\\t\\\\t\\\\taverageEvery: ratio \\\\n\\\\t\\\\t\\\\tfrom: buffer \\\\n\\\\t\\\\t\\\\tupTo: buffer monoSampleCount.\\\\n\\\\t\\\\tsound := SampledSound new setSamples: resultBuf samplingRate: samplingRate / ratio.\\\\n\\\\t].\\\\n\\\\n\\\\trecordedSound add: (codec ifNil: [sound] ifNotNil: [codec compressSound: sound])! !\\\\n\\\\n!SoundRecorder methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nemitPartialBuffer\\\\n\\\\t| s |\\\\n\\\\ts := self samplesPerFrame.\\\\n\\\\tself emitBuffer: (currentBuffer copyFrom: 1 to: ((nextIndex-1) +( s-1) truncateTo: s))! !\\\\n\\\\n!SoundRecorder methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nmeterFrom: start count: count in: buffer\\\\n\\\\t\\\\\\\"Update the meter level with the maximum signal level in the given range of the given buffer.\\\\\\\"\\\\n\\\\n\\\\t| last max sample |\\\\n\\\\tcount = 0 ifTrue: [^ self].  \\\\\\\"no new samples\\\\\\\"\\\\n\\\\tlast := start + count - 1.\\\\n\\\\tmax := 0.\\\\n\\\\tstart to: last do: [:i |\\\\n\\\\t\\\\tsample := buffer at: i.\\\\n\\\\t\\\\tsample < 0 ifTrue: [sample := sample negated].\\\\n\\\\t\\\\tsample > max ifTrue: [max := sample]].\\\\n\\\\tmeterLevel := max.\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'private' stamp: 'dgd 4/4/2006 16:15'!\\\\nrecordLoop\\\\n\\\\t\\\\\\\"Record process loop that records samples.\\\\\\\"\\\\n\\\\n\\\\t| n sampleCount |\\\\n\\\\n\\\\tn := 0.\\\\n\\\\t[true] whileTrue: [\\\\n\\\\t\\\\tn = 0 ifTrue: [bufferAvailableSema wait].\\\\n\\\\t\\\\tpaused\\\\n\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tn := self primRecordSamplesInto: meteringBuffer startingAt: 1.\\\\n\\\\t\\\\t\\\\t\\\\tself meterFrom: 1 count: n in: meteringBuffer]\\\\n\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tn := self primRecordSamplesInto: currentBuffer startingAt: nextIndex.\\\\n\\\\t\\\\t\\\\t\\\\tself meterFrom: nextIndex count: n in: currentBuffer.\\\\n\\\\t\\\\t\\\\t\\\\tnextIndex := nextIndex + n.\\\\n\\\\t\\\\t\\\\t\\\\tstereo\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [sampleCount := currentBuffer stereoSampleCount]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [sampleCount := currentBuffer monoSampleCount].\\\\n\\\\t\\\\t\\\\t\\\\tnextIndex > sampleCount\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself emitBuffer: currentBuffer.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself allocateBuffer]].\\\\n\\\\n\\\\t\\\\t\\\\\\\"workaround for OSS emulation on top on ALSA (on Linux environments)\\\\\\\"\\\\n\\\\t\\\\t(Delay forMilliseconds: 20) wait.\\\\n\\\\t].\\\\n! !\\\\n\\\\n!SoundRecorder methodsFor: 'private' stamp: 'di 2/17/1999 10:39'!\\\\nsamplesPerFrame\\\\n\\\\t\\\\\\\"Can be overridden to quantize buffer size for, eg, fixed-frame codecs\\\\\\\"\\\\n\\\\n\\\\tcodec == nil\\\\n\\\\t\\\\tifTrue: [^ 1]\\\\n\\\\t\\\\tifFalse: [^ codec samplesPerFrame]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSoundRecorder class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SoundRecorder class methodsFor: 'accessing' stamp: 'ar 2/1/2001 15:20'!\\\\nanyActive\\\\n\\\\t\\\\\\\"Return true if any sound recorder is actively recording\\\\\\\"\\\\n\\\\t^RecorderActive == true! !\\\\n\\\\n!SoundRecorder class methodsFor: 'accessing' stamp: 'RAA 8/7/2000 19:23'!\\\\ncanRecordWhilePlaying\\\\n\\\\t\\\\\\\"Return true if this platform supports simultaneous sound recording and playback.\\\\\\\"\\\\n\\\\n\\\\t^Preferences canRecordWhilePlaying.\\\\t\\\\t\\\\\\\"now in preferences\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!SoundRecorder class methodsFor: 'class initialization' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ninitialize\\\\n\\\\t\\\\\\\"SoundRecorder initialize\\\\\\\"\\\\n\\\\t\\\\\\\"Details: Some computers cannot record and playback sound at the same time. If CanRecordWhilePlaying is false, then the SoundRecorder alternates between recording and playing. If it is true, sounds can be playing during recording.\\\\\\\"\\\\n\\\\n\\\\tCanRecordWhilePlaying := #ignoredNowInPreferences.\\\\n! !\\\\nRectangleMorph subclass: #SoundSequencerMorph\\\\n\\\\tinstanceVariableNames: 'controlPanel'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-SoundInterface'!\\\\n\\\\n!SoundSequencerMorph methodsFor: 'as yet unclassified' stamp: 'tk 2/19/2001 18:14'!\\\\nmakeControlPanel\\\\n\\\\t| bb cc |\\\\n\\\\tcc _ Color black.\\\\n\\\\tbb _ SimpleButtonMorph new target: self; borderColor: cc.\\\\n\\\\tcontrolPanel _ AlignmentMorph newRow.\\\\n\\\\tbb _ SimpleButtonMorph new target: self; borderColor: cc.\\\\n\\\\tcontrolPanel color: bb color; borderWidth: 0; layoutInset: 0.\\\\n\\\\tcontrolPanel hResizing: #shrinkWrap; vResizing: #shrinkWrap; extent: 5@5.\\\\n\\\\tbb _ SimpleButtonMorph new target: self; borderColor: cc.\\\\n\\\\tcontrolPanel addMorphBack: (bb label: 'reset';\\\\tactionSelector: #reset).\\\\n\\\\tbb _ SimpleButtonMorph new target: self; borderColor: cc.\\\\n\\\\tcontrolPanel addMorphBack: (bb label: 'stop';\\\\t\\\\tactionSelector: #stop).\\\\n\\\\tbb _ SimpleButtonMorph new target: self; borderColor: cc.\\\\n\\\\tcontrolPanel addMorphBack: (bb label: 'play';\\\\tactionSelector: #play).\\\\n! !\\\\n\\\\n!SoundSequencerMorph methodsFor: 'as yet unclassified' stamp: 'jm 11/14/97 11:08'!\\\\nplay\\\\n\\\\tself submorphsDo: [:m | m == controlPanel ifFalse: [m play]]! !\\\\n\\\\n!SoundSequencerMorph methodsFor: 'as yet unclassified' stamp: 'jm 11/14/97 11:08'!\\\\nreset\\\\n\\\\tself submorphsDo: [:m | m == controlPanel ifFalse: [m reset]]! !\\\\n\\\\n\\\\n!SoundSequencerMorph methodsFor: 'initialization' stamp: 'jm 11/14/97 11:21'!\\\\ninitialize\\\\n\\\\tsuper initialize.\\\\n\\\\tself extent: 550@350.\\\\n\\\\tself makeControlPanel.\\\\n\\\\tself addMorph: controlPanel.\\\\n\\\\tself addMorph: ((SoundLoopMorph newBounds: (10@40 extent: 128@128)) extent: 128@128).\\\\n\\\\tself addMorph: ((SoundLoopMorph newBounds: (10@200 extent: 512@128)) extent: 512@128).! !\\\\n\\\\n\\\\n!SoundSequencerMorph methodsFor: 'stepping and presenter' stamp: 'jm 11/14/97 11:21'!\\\\nstop\\\\n\\\\tself submorphsDo: [:m | m == controlPanel ifFalse: [m stop]].\\\\n\\\\tSoundPlayer shutDown! !\\\\nAppRegistry subclass: #SoundService\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Applications'!\\\\n!SoundService commentStamp: 'gk 2/24/2004 23:14' prior: 0!\\\\nThis is the AppRegistry class for the sound system.\\\\n\\\\nA sound system offers a small protocol for playing sounds and making beeps and works like a facade towards the rest of Squeak. A sound system is registered in this registry and can be accessed by \\\\\\\"SoundService default\\\\\\\". This way we decouple the sound system from the rest of Squeak and make it pluggable. It also is a perfect spot to check for the Preference class>>soundsEnabled.!\\\\n\\\\nTileMorph subclass: #SoundTile\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'EToys-Scripting Tiles'!\\\\n!SoundTile commentStamp: 'sw 1/28/2005 01:42' prior: 0!\\\\nA scripting tile representing a 'sound' constant.  Sounds are represented by their names, which are strings; the actual sounds live in SampleSound's SoundLibrary.!\\\\n\\\\n\\\\n!SoundTile methodsFor: 'access' stamp: 'gk 2/23/2004 21:08'!\\\\nsound\\\\n\\\\n\\\\t^ SoundService default soundNamed: literal\\\\n! !\\\\n\\\\n\\\\n!SoundTile methodsFor: 'accessing' stamp: 'sw 9/27/2001 17:28'!\\\\nresultType\\\\n\\\\t\\\\\\\"Answer the result type of the receiver\\\\\\\"\\\\n\\\\n\\\\t^ #Sound! !\\\\n\\\\n\\\\n!SoundTile methodsFor: 'event handling' stamp: 'sw 1/28/2005 01:49'!\\\\noptions\\\\n\\\\t\\\\\\\"Answer the options of the tile for an arrow\\\\\\\"\\\\n\\\\n\\\\t| soundChoices |\\\\n\\\\tsoundChoices _ self soundChoices.\\\\n\\\\t^ {soundChoices. soundChoices}! !\\\\n\\\\n!SoundTile methodsFor: 'event handling' stamp: 'tak 12/5/2004 02:09'!\\\\nvalue: anObject \\\\n\\\\tsuper value: anObject.\\\\n\\\\tself playSoundNamed: anObject! !\\\\n\\\\n!SoundTile methodsFor: 'event handling' stamp: 'sw 11/3/97 02:11'!\\\\nwantsKeyboardFocusFor: aSubmorph\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!SoundTile methodsFor: 'initialization' stamp: 'yo 7/22/2005 15:51'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Initialize the state of the receiver. Pick the croak sound\\\\n\\\\tif available, otherwise any sound.\\\\\\\"\\\\n\\\\t\\\\n\\\\t| soundChoices startingSoundName |\\\\n\\\\tsuper initialize.\\\\n\\\\tsoundChoices _ self soundChoices.\\\\n\\\\tstartingSoundName _ (soundChoices includes: 'croak')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: ['croak']\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [[soundChoices anyOne] ifError: ['silence']].\\\\n\\\\tself addArrows; setLiteral: startingSoundName.\\\\n\\\\tself labelMorph useSymbolFormat! !\\\\n\\\\n!SoundTile methodsFor: 'initialization' stamp: 'yo 4/6/2005 16:34'!\\\\nsetLiteral: anObject\\\\n\\\\n\\\\tsuper setLiteral: anObject.\\\\n\\\\tself labelMorph useSymbolFormat\\\\n! !\\\\n\\\\n\\\\n!SoundTile methodsFor: 'mouse handling' stamp: 'sw 11/24/2003 14:44'!\\\\nhandlerForMouseDown: anEvent\\\\n\\\\n\\\\t\\\\\\\"Return the (prospective) handler for a mouse down event. The handler is temporarily installed and can be used for morphs further down the hierarchy to negotiate whether the inner or the outer morph should finally handle the event\\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\t^ ((self findA: UpdatingStringMorph) bounds containsPoint: anEvent cursorPoint)\\\\n\\\\n\\\\t\\\\tifTrue:\\\\n\\\\n\\\\t\\\\t\\\\t[self]\\\\n\\\\n\\\\t\\\\tifFalse:\\\\n\\\\n\\\\t\\\\t\\\\t[super handlerForMouseDown: anEvent]! !\\\\nDataType subclass: #SoundType\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Protocols-Type Vocabularies'!\\\\n\\\\n!SoundType methodsFor: 'initial value' stamp: 'sw 9/27/2001 17:29'!\\\\ninitialValueForASlotFor: aPlayer\\\\n\\\\t\\\\\\\"Answer the value to give initially to a newly created slot of the given type in the given player\\\\\\\"\\\\n\\\\n\\\\t^ 'croak'! !\\\\n\\\\n\\\\n!SoundType methodsFor: 'initialization' stamp: 'sw 9/27/2001 17:24'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Initialize the receiver (automatically called when instances are created via 'new')\\\\\\\"\\\\n\\\\n\\\\tsuper initialize.\\\\n\\\\tself vocabularyName: #Sound! !\\\\n\\\\n\\\\n!SoundType methodsFor: '*eToys-color' stamp: 'sw 9/27/2001 17:21'!\\\\ntypeColor\\\\n\\\\t\\\\\\\"Answer the color for tiles to be associated with objects of this type\\\\\\\"\\\\n\\\\n\\\\t^ self subduedColorFromTriplet: #(1.0 0.06 0.84)\\\\t! !\\\\n\\\\n\\\\n!SoundType methodsFor: '*eToys-tiles' stamp: 'sw 9/27/2001 17:30'!\\\\ndefaultArgumentTile\\\\n\\\\t\\\\\\\"Answer a tile to represent the type\\\\\\\"\\\\n\\\\n\\\\t^ SoundTile new typeColor: self typeColor! !\\\\n\\\\n!SoundType methodsFor: '*eToys-tiles' stamp: 'sw 9/27/2001 17:37'!\\\\nnewReadoutTile\\\\n\\\\t\\\\\\\"Answer a tile that can serve as a readout for data of this type\\\\\\\"\\\\n\\\\n\\\\t^ SoundReadoutTile new typeColor: Color lightGray lighter! !\\\\n\\\\n!SoundType methodsFor: '*eToys-tiles' stamp: 'sw 9/27/2001 17:33'!\\\\nsetFormatForDisplayer: aDisplayer\\\\n\\\\t\\\\\\\"Set up the displayer to have the right format characteristics\\\\\\\"\\\\n\\\\n\\\\taDisplayer useStringFormat\\\\n\\\\t! !\\\\nSequenceableCollection subclass: #SourceFileArray\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Files-System'!\\\\n!SourceFileArray commentStamp: '<historical>' prior: 0!\\\\nThis class is an abstract superclass for source code access mechanisms. It defines the messages that need to be understood by those subclasses that store and retrieve source chunks on files, over the network or in databases.\\\\nThe first concrete subclass, StandardSourceFileArray, supports access to the traditional sources and changes files. Other subclasses might implement multiple source files for different applications, or access to a network source server.!\\\\n]style[(254 23 184)f1,f1LStandardSourceFileArray Comment;,f1!\\\\n\\\\n\\\\n!SourceFileArray methodsFor: 'accessing' stamp: 'hmm 4/26/2000 21:42'!\\\\nat: index\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n!SourceFileArray methodsFor: 'accessing' stamp: 'hmm 4/26/2000 21:43'!\\\\nat: index put: aFileStream\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n!SourceFileArray methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\ncollect: aBlock\\\\n\\\\t| copy |\\\\n\\\\tcopy := self species new: self size.\\\\n\\\\t1 to: self size do:[:i| copy at: i put: (aBlock value: (self at: i))].\\\\n\\\\t^copy! !\\\\n\\\\n!SourceFileArray methodsFor: 'accessing' stamp: 'hmm 4/26/2000 21:43'!\\\\nsize\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n\\\\n!SourceFileArray methodsFor: 'sourcePointer conversion' stamp: 'hmm 4/25/2000 22:00'!\\\\nfileIndexFromSourcePointer: anInteger\\\\n\\\\t\\\\\\\"Return the index of a source file corresponding to the given source pointer.\\\\\\\"\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n!SourceFileArray methodsFor: 'sourcePointer conversion' stamp: 'hmm 4/25/2000 22:00'!\\\\nfilePositionFromSourcePointer: anInteger\\\\n\\\\t\\\\\\\"Return the position within a source file for the given source pointer.\\\\\\\"\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n!SourceFileArray methodsFor: 'sourcePointer conversion' stamp: 'hmm 4/25/2000 22:01'!\\\\nsourcePointerFromFileIndex: index andPosition: position\\\\n\\\\t\\\\\\\"Return a sourcePointer encoding the given file index and position\\\\\\\"\\\\n\\\\tself subclassResponsibility! !\\\\nObject subclass: #SpaceTally\\\\n\\\\tinstanceVariableNames: 'results'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Tools'!\\\\n!SpaceTally commentStamp: 'sd 6/20/2003 22:31' prior: 0!\\\\nI'm responsible to help getting information about system space usage. The information I compute is represented by a spaceTallyItem\\\\n\\\\ntry something like: \\\\n\\\\n((SpaceTally new spaceTally: (Array with: TextMorph with: Point)) \\\\n\\\\tasSortedCollection: [:a :b | a spaceForInstances > b spaceForInstances]) \\\\n\\\\nSpaceTally new systemWideSpaceTally\\\\n\\\\n\\\\nThis class has been created from a part of SystemDictionary. It still deserves a nice\\\\nclean, such as using object instead of array having 4 slots.\\\\n\\\\nsd-20 June 2003!\\\\n\\\\n\\\\n!SpaceTally methodsFor: 'accessing' stamp: 'sd 6/20/2003 22:31'!\\\\nresults\\\\n\\\\n\\\\t^ results! !\\\\n\\\\n\\\\n!SpaceTally methodsFor: 'class analysis' stamp: 'efc 7/6/2004 00:30'!\\\\ncomputeSpaceUsage\\\\n\\\\n\\\\t| entry c instanceCount |\\\\n\\\\t1 to: results size do: [:i |\\\\n\\\\t\\\\tentry := results at: i.\\\\n\\\\t\\\\tc := self class environment at: entry analyzedClassName.\\\\n\\\\t\\\\tinstanceCount _ c instanceCount.\\\\n\\\\t\\\\tentry codeSize: c spaceUsed.\\\\n\\\\t\\\\tentry instanceCount: instanceCount.\\\\n\\\\t\\\\tentry spaceForInstances: (self spaceForInstancesOf: c withInstanceCount: instanceCount).\\\\n\\\\t\\\\tSmalltalk garbageCollectMost].\\\\n\\\\t\\\\n! !\\\\n\\\\n!SpaceTally methodsFor: 'class analysis' stamp: 'sd 6/20/2003 22:54'!\\\\npreAllocateResultsFor: classes\\\\n\\\\n\\\\tresults := OrderedCollection new: classes size.\\\\n\\\\tclasses do: [:cl | results add: (SpaceTallyItem analyzedClassName: cl name)].\\\\n\\\\tresults _ results asArray.\\\\n! !\\\\n\\\\n!SpaceTally methodsFor: 'class analysis' stamp: 'sd 6/20/2003 22:24'!\\\\nspaceTally: classes\\\\n\\\\t\\\\\\\"Answer a collection of SpaceTallyItems representing the memory space (in bytes) consumed \\\\tby the code and instances of each class in the system. Note that code sizes do not currently \\\\treport memory consumed by class variables. \\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"((SpaceTally new spaceTally: (Array with: TextMorph with: Point)) asSortedCollection: [:a :b | a spaceForInstances > b spaceForInstances]) asArray\\\\\\\"\\\\n\\\\n\\\\tself preAllocateResultsFor: classes.\\\\n\\\\tSmalltalk garbageCollect.\\\\n\\\\tself computeSpaceUsage.\\\\n\\\\t^ results\\\\n! !\\\\n\\\\n!SpaceTally methodsFor: 'class analysis' stamp: 'efc 7/6/2004 00:25'!\\\\nsystemWideSpaceTally\\\\n\\\\t\\\\\\\"Answer a collection of SpaceTallyItems representing the memory space (in bytes) consumed \\\\tby the code and instances of each class in the system. Note that code sizes do not currently \\\\treport memory consumed by class variables. \\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"(SpaceTally new systemWideSpaceTally asSortedCollection: [:a :b | a spaceForInstances > b spaceForInstances]) asArray\\\\\\\"\\\\n\\\\n\\\\t^self spaceTally: Smalltalk allClasses.\\\\n\\\\n! !\\\\n\\\\n\\\\n!SpaceTally methodsFor: 'fileOut' stamp: 'sd 6/20/2003 22:39'!\\\\ncompareTallyIn: beforeFileName to: afterFileName\\\\n\\\\t\\\\\\\"SpaceTally new compareTallyIn: 'tally' to: 'tally2'\\\\\\\"\\\\n\\\\n\\\\t| answer s beforeDict a afterDict allKeys before after diff |\\\\n\\\\tbeforeDict _ Dictionary new.\\\\n\\\\ts _ FileDirectory default fileNamed: beforeFileName.\\\\n\\\\t[s atEnd] whileFalse: [\\\\n\\\\t\\\\ta _ Array readFrom: s nextLine.\\\\n\\\\t\\\\tbeforeDict at: a first put: a allButFirst.\\\\n\\\\t].\\\\n\\\\ts close.\\\\n\\\\tafterDict _ Dictionary new.\\\\n\\\\ts _ FileDirectory default fileNamed: afterFileName.\\\\n\\\\t[s atEnd] whileFalse: [\\\\n\\\\t\\\\ta _ Array readFrom: s nextLine.\\\\n\\\\t\\\\tafterDict at: a first put: a allButFirst.\\\\n\\\\t].\\\\n\\\\ts close.\\\\n\\\\tanswer _ WriteStream on: String new.\\\\n\\\\tallKeys _ (Set new addAll: beforeDict keys; addAll: afterDict keys; yourself) asSortedCollection.\\\\n\\\\tallKeys do: [ :each |\\\\n\\\\t\\\\tbefore _ beforeDict at: each ifAbsent: [#(0 0 0)].\\\\n\\\\t\\\\tafter _ afterDict at: each ifAbsent: [#(0 0 0)].\\\\n\\\\t\\\\tdiff _ before with: after collect: [ :vBefore :vAfter | vAfter - vBefore].\\\\n\\\\t\\\\tdiff = #(0 0 0) ifFalse: [\\\\n\\\\t\\\\t\\\\tanswer nextPutAll: each,'  ',diff printString; cr.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\tStringHolder new contents: answer contents; openLabel: 'space diffs'.\\\\n\\\\t\\\\n\\\\n\\\\n! !\\\\n\\\\n!SpaceTally methodsFor: 'fileOut' stamp: 'sd 6/20/2003 23:04'!\\\\nprintSpaceAnalysis\\\\t\\\\n\\\\t\\\\\\\"SpaceTally new printSpaceAnalysis\\\\\\\"\\\\n\\\\n\\\\t^ self printSpaceAnalysis: 0 on: 'STspace.text'! !\\\\n\\\\n!SpaceTally methodsFor: 'fileOut' stamp: 'sd 6/20/2003 23:03'!\\\\nprintSpaceAnalysis: threshold on: fileName\\\\n\\\\t\\\\\\\"SpaceTally new printSpaceAnalysis: 1000 on: 'STspace.text1'\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"sd-This method should be rewrote to be more coherent within the rest of the class \\\\n\\\\tie using preAllocate and spaceForInstanceOf:\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"If threshold > 0, then only those classes with more than that number\\\\n\\\\tof instances will be shown, and they will be sorted by total instance space.\\\\n\\\\tIf threshold = 0, then all classes will appear, sorted by name.\\\\\\\"\\\\n\\\\n\\\\t| f codeSpace instCount instSpace totalCodeSpace totalInstCount totalInstSpace eltSize n totalPercent percent |\\\\n\\\\tSmalltalk garbageCollect.\\\\n\\\\ttotalCodeSpace _ totalInstCount _ totalInstSpace _ n _ 0.\\\\n\\\\tresults _ OrderedCollection new: Smalltalk classNames size.\\\\n'Taking statistics...'\\\\n\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\tfrom: 0 to: Smalltalk classNames size\\\\n\\\\tduring: [:bar |\\\\n\\\\tSmalltalk allClassesDo:\\\\n\\\\t\\\\t[:cl | codeSpace _ cl spaceUsed.\\\\n\\\\t\\\\tbar value: (n _ n+1).\\\\n\\\\t\\\\tSmalltalk garbageCollectMost.\\\\n\\\\t\\\\tinstCount _ cl instanceCount.\\\\n\\\\t\\\\tinstSpace _ (cl indexIfCompact > 0 ifTrue: [4] ifFalse: [8])*instCount. \\\\\\\"Object headers\\\\\\\"\\\\n\\\\t\\\\tcl isVariable\\\\n\\\\t\\\\t\\\\tifTrue: [eltSize _ cl isBytes ifTrue: [1] ifFalse: [4].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcl allInstancesDo: [:x | instSpace _ instSpace + (x basicSize*eltSize)]]\\\\n\\\\t\\\\t\\\\tifFalse: [instSpace _ instSpace + (cl instSize*instCount*4)].\\\\n\\\\t\\\\tresults add: (SpaceTallyItem analyzedClassName: cl name codeSize: codeSpace instanceCount:  instCount spaceForInstances: instSpace).\\\\n\\\\t\\\\ttotalCodeSpace _ totalCodeSpace + codeSpace.\\\\n\\\\t\\\\ttotalInstCount _ totalInstCount + instCount.\\\\n\\\\t\\\\ttotalInstSpace _ totalInstSpace + instSpace]].\\\\n\\\\ttotalPercent _ 0.0.\\\\n\\\\n\\\\tf _ FileStream newFileNamed: fileName.\\\\n\\\\tf timeStamp.\\\\n\\\\tf nextPutAll: ('Class' padded: #right to: 30 with: $ );\\\\n\\\\t\\\\t\\\\tnextPutAll: ('code space' padded: #left to: 12 with: $ );\\\\n\\\\t\\\\t\\\\tnextPutAll: ('# instances' padded: #left to: 12 with: $ );\\\\n\\\\t\\\\t\\\\tnextPutAll: ('inst space' padded: #left to: 12 with: $ );\\\\n\\\\t\\\\t\\\\tnextPutAll: ('percent' padded: #left to: 8 with: $ ); cr.\\\\n\\\\n\\\\tthreshold > 0 ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"If inst count threshold > 0, then sort by space\\\\\\\"\\\\n\\\\t\\\\tresults _ (results select: [:s | s instanceCount >= threshold or: [s spaceForInstances > (totalInstSpace // 500)]])\\\\n\\\\t\\\\t\\\\t\\\\tasSortedCollection: [:s :s2 | s spaceForInstances > s2 spaceForInstances]].\\\\n\\\\n\\\\tresults do:\\\\n\\\\t\\\\t[:s | f nextPutAll: (s analyzedClassName padded: #right to: 30 with: $ );\\\\n\\\\t\\\\t\\\\tnextPutAll: (s codeSize printString padded: #left to: 12 with: $ );\\\\n\\\\t\\\\t\\\\tnextPutAll: (s instanceCount printString padded: #left to: 12 with: $ );\\\\n\\\\t\\\\t\\\\tnextPutAll: (s spaceForInstances printString padded: #left to: 14 with: $ ).\\\\n\\\\t\\\\tpercent _ s spaceForInstances*100.0/totalInstSpace roundTo: 0.1.\\\\n\\\\t\\\\ttotalPercent _ totalPercent + percent.\\\\n\\\\t\\\\tpercent >= 0.1 ifTrue:\\\\n\\\\t\\\\t\\\\t[f nextPutAll: (percent printString padded: #left to: 8 with: $ )].\\\\n\\\\t\\\\tf cr].\\\\n\\\\n\\\\tf cr; nextPutAll: ('Total' padded: #right to: 30 with: $ );\\\\n\\\\t\\\\tnextPutAll: (totalCodeSpace printString padded: #left to: 12 with: $ );\\\\n\\\\t\\\\tnextPutAll: (totalInstCount printString padded: #left to: 12 with: $ );\\\\n\\\\t\\\\tnextPutAll: (totalInstSpace printString padded: #left to: 14 with: $ );\\\\n\\\\t\\\\tnextPutAll: ((totalPercent roundTo: 0.1) printString padded: #left to: 8 with: $ ).\\\\n\\\\tf close! !\\\\n\\\\n!SpaceTally methodsFor: 'fileOut' stamp: 'sd 6/20/2003 23:07'!\\\\nprintSpaceDifferenceFrom: fileName1 to: fileName2\\\\n\\\\t\\\\\\\"For differential results, run printSpaceAnalysis twice with different fileNames,\\\\n\\\\tthen run this method...\\\\n\\\\t\\\\tSpaceTally new printSpaceAnalysis: 0 on: 'STspace.text1'.\\\\n\\\\t\\\\t\\\\t--- do something that uses space here ---\\\\n\\\\t\\\\tSpaceTally new printSpaceAnalysis: 0 on: 'STspace.text2'.\\\\n\\\\t\\\\tSpaceTally new printSpaceDifferenceFrom: 'STspace.text1' to: 'STspace.text2'\\\\n\\\\\\\"\\\\n\\\\t| f coll1 coll2 item |\\\\n\\\\tf _ FileStream readOnlyFileNamed: fileName1.\\\\n\\\\tcoll1 _ OrderedCollection new.\\\\n\\\\t[f atEnd] whileFalse: [coll1 add: (f upTo: Character cr)].\\\\n\\\\tf close.\\\\n\\\\tf _ FileStream readOnlyFileNamed: fileName2.\\\\n\\\\tcoll2 _ OrderedCollection new.\\\\n\\\\t[f atEnd] whileFalse:\\\\n\\\\t\\\\t[item _ (f upTo: Character cr).\\\\n\\\\t\\\\t((coll1 includes: item) and: [(item endsWith: 'percent') not])\\\\n\\\\t\\\\t\\\\tifTrue: [coll1 remove: item]\\\\n\\\\t\\\\t\\\\tifFalse: [coll2 add: item]].\\\\n\\\\tf close.\\\\n\\\\t(StringHolder new contents: (String streamContents: \\\\n\\\\t\\\\t\\\\t[:s | \\\\n\\\\t\\\\t\\\\ts nextPutAll: fileName1; cr.\\\\n\\\\t\\\\t\\\\tcoll1 do: [:x | s nextPutAll: x; cr].\\\\n\\\\t\\\\t\\\\ts cr; cr.\\\\n\\\\t\\\\t\\\\ts nextPutAll: fileName2; cr.\\\\n\\\\t\\\\t\\\\tcoll2 do: [:x | s nextPutAll: x; cr]]))\\\\n\\\\t\\\\topenLabel: 'Differential Space Analysis'.\\\\n! !\\\\n\\\\n!SpaceTally methodsFor: 'fileOut' stamp: 'sd 6/20/2003 22:59'!\\\\nsaveTo: aFileName\\\\n\\\\t\\\\\\\"| st |\\\\n\\\\tst := SpaceTally new.\\\\n\\\\tst spaceTally: (Array with: TextMorph with: Point).\\\\n\\\\tst saveTo: 'spaceTally2'\\\\\\\"\\\\n\\\\t| s |\\\\n\\\\t(FileDirectory default fileExists: aFileName) ifTrue: [\\\\n\\\\t\\\\tFileDirectory default deleteFileNamed: aFileName].\\\\n\\\\ts _ FileDirectory default fileNamed: aFileName.\\\\n\\\\tresults do: [:each | s nextPutAll: each analyzedClassName asString ; \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnextPutAll: ' '; nextPutAll: each codeSize printString; \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnextPutAll: ' '; nextPutAll: each instanceCount printString; \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnextPutAll: ' '; nextPutAll: each spaceForInstances printString; cr].\\\\n\\\\ts close! !\\\\n\\\\n\\\\n!SpaceTally methodsFor: 'instance size' stamp: 'efc 7/6/2004 00:30'!\\\\nspaceForInstancesOf: aClass withInstanceCount: instCount\\\\n\\\\t\\\\\\\"Answer the number of bytes consumed by all instances of the given class, including their object headers.\\\\\\\"\\\\n\\\\n\\\\t| isCompact instVarBytes bytesPerElement contentBytes headerBytes total |\\\\n\\\\tinstCount = 0 ifTrue: [^ 0].\\\\n\\\\tisCompact _ aClass indexIfCompact > 0.\\\\n\\\\tinstVarBytes _ aClass instSize * 4.\\\\n\\\\taClass isVariable\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\tbytesPerElement _ aClass isBytes ifTrue: [1] ifFalse: [4].\\\\n\\\\t\\\\t\\\\ttotal _ 0.\\\\n\\\\t\\\\t\\\\taClass allInstancesDo: [:inst |\\\\n\\\\t\\\\t\\\\t\\\\tcontentBytes _ instVarBytes + (inst size * bytesPerElement).\\\\n\\\\t\\\\t\\\\t\\\\theaderBytes _\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcontentBytes > 255\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [12]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [isCompact ifTrue: [4] ifFalse: [8]].\\\\n\\\\t\\\\t\\\\t\\\\ttotal _ total + headerBytes + contentBytes].\\\\n\\\\t\\\\t\\\\t^ total]\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\theaderBytes _\\\\n\\\\t\\\\t\\\\t\\\\tinstVarBytes > 255\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [12]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [isCompact ifTrue: [4] ifFalse: [8]].\\\\n\\\\t\\\\t\\\\t^ instCount * (headerBytes + instVarBytes)].\\\\n! !\\\\nObject subclass: #SpaceTallyItem\\\\n\\\\tinstanceVariableNames: 'analyzedClassName codeSize instanceCount spaceForInstances'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Tools'!\\\\n!SpaceTallyItem commentStamp: 'sd 6/20/2003 22:02' prior: 0!\\\\nI'm represent an entry in the spaceTally.!\\\\n\\\\n\\\\n!SpaceTallyItem methodsFor: 'accessing' stamp: 'sd 6/20/2003 22:59'!\\\\nanalyzedClassName\\\\n\\\\n\\\\t^ analyzedClassName! !\\\\n\\\\n!SpaceTallyItem methodsFor: 'accessing' stamp: 'sd 6/20/2003 22:59'!\\\\nanalyzedClassName: aClassName\\\\n\\\\n\\\\tanalyzedClassName := aClassName! !\\\\n\\\\n!SpaceTallyItem methodsFor: 'accessing' stamp: 'sd 6/20/2003 22:08'!\\\\ncodeSize\\\\n\\\\n\\\\t^ codeSize! !\\\\n\\\\n!SpaceTallyItem methodsFor: 'accessing' stamp: 'sd 6/20/2003 22:09'!\\\\ncodeSize: aNumber\\\\n\\\\n\\\\tcodeSize := aNumber! !\\\\n\\\\n!SpaceTallyItem methodsFor: 'accessing' stamp: 'sd 6/20/2003 22:09'!\\\\ninstanceCount\\\\n\\\\n\\\\t^ instanceCount! !\\\\n\\\\n!SpaceTallyItem methodsFor: 'accessing' stamp: 'sd 6/20/2003 22:09'!\\\\ninstanceCount: aNumber\\\\n\\\\n\\\\tinstanceCount := aNumber! !\\\\n\\\\n!SpaceTallyItem methodsFor: 'accessing' stamp: 'sd 6/20/2003 22:10'!\\\\nspaceForInstances\\\\n\\\\n\\\\t^ spaceForInstances! !\\\\n\\\\n!SpaceTallyItem methodsFor: 'accessing' stamp: 'sd 6/20/2003 22:10'!\\\\nspaceForInstances: aNumber\\\\n\\\\n\\\\tspaceForInstances := aNumber! !\\\\n\\\\n\\\\n!SpaceTallyItem methodsFor: 'printing' stamp: 'sd 6/20/2003 22:52'!\\\\nprintOn: aStream\\\\n\\\\n\\\\tanalyzedClassName isNil\\\\n\\\\t\\\\tifFalse: [aStream nextPutAll: analyzedClassName asString]. \\\\n\\\\taStream nextPutAll: ' ('.\\\\n\\\\tcodeSize isNil\\\\n\\\\t\\\\tifFalse: [aStream nextPutAll: 'code size: ' ;  nextPutAll: codeSize asString]. \\\\n\\\\tinstanceCount isNil\\\\n\\\\t\\\\tifFalse: [aStream nextPutAll: ' instance count: ' ;  nextPutAll: instanceCount asString]. \\\\n\\\\tspaceForInstances isNil\\\\n\\\\t\\\\tifFalse: [aStream nextPutAll: ' space for instances: ' ;  nextPutAll: spaceForInstances asString]. \\\\n\\\\taStream nextPut: $).\\\\n\\\\t! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSpaceTallyItem class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SpaceTallyItem class methodsFor: 'instance creation' stamp: 'sd 6/20/2003 22:54'!\\\\nanalyzedClassName: aClassName\\\\n\\\\n\\\\t^ self new\\\\n\\\\t\\\\tanalyzedClassName: aClassName ; yourself\\\\n\\\\t\\\\t! !\\\\n\\\\n!SpaceTallyItem class methodsFor: 'instance creation' stamp: 'sd 6/20/2003 22:54'!\\\\nanalyzedClassName: aClassName codeSize: codeSize instanceCount: instanceCount spaceForInstances: spaceForInstances\\\\n\\\\n\\\\t^ self new\\\\n\\\\t\\\\tanalyzedClassName: aClassName ;\\\\n\\\\t\\\\tcodeSize: codeSize ;\\\\n\\\\t\\\\tinstanceCount: instanceCount ;\\\\n\\\\t\\\\tspaceForInstances: spaceForInstances ; yourself! !\\\\nArrayedCollection variableSubclass: #SparseLargeTable\\\\n\\\\tinstanceVariableNames: 'base size chunkSize defaultValue'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Collections-Arrayed'!\\\\n!SparseLargeTable commentStamp: '<historical>' prior: 0!\\\\nDerivated from Stephan Pair's LargeArray, but to hold a sparse table, in which most of the entries are the same default value, it uses some tricks.!\\\\n\\\\n\\\\n!SparseLargeTable methodsFor: 'accessing' stamp: 'yo 12/1/2003 15:58'!\\\\narrayClass\\\\n\\\\n\\\\t^(self basicAt: 1) class\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'accessing' stamp: 'yo 12/1/2003 15:58'!\\\\nat: index\\\\n\\\\n\\\\tself pvtCheckIndex: index.\\\\n\\\\t^self noCheckAt: index.\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'accessing' stamp: 'yo 12/1/2003 15:58'!\\\\nat: index put: value\\\\n\\\\t\\\\n\\\\tself pvtCheckIndex: index.\\\\n\\\\t^self noCheckAt: index put: value\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'accessing' stamp: 'yo 12/1/2003 17:56'!\\\\nbase\\\\n\\\\n\\\\t^ base.\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'accessing' stamp: 'yo 12/1/2003 15:58'!\\\\nchunkSize\\\\n\\\\n\\\\t^chunkSize\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'accessing' stamp: 'tak 12/21/2004 16:59'!\\\\nnoCheckAt: index\\\\n\\\\t| chunkIndex t |\\\\n\\\\n\\\\tchunkIndex := index - base // chunkSize + 1.\\\\n\\\\t(chunkIndex > self basicSize or: [chunkIndex < 1]) ifTrue: [^ defaultValue].\\\\n\\\\tt _ self basicAt: chunkIndex.\\\\n\\\\tt ifNil: [^ defaultValue].\\\\n\\\\t^ t at: (index - base + 1 - (chunkIndex - 1 * chunkSize))\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'accessing' stamp: 'yo 12/1/2003 19:18'!\\\\nnoCheckAt: index put: value\\\\n\\\\t| chunkIndex t |\\\\n\\\\n\\\\tchunkIndex := index - base // chunkSize + 1.\\\\n\\\\tchunkIndex > self basicSize ifTrue: [^ value].\\\\n\\\\tt _  self basicAt: chunkIndex.\\\\n\\\\tt ifNil: [^ value].\\\\n\\\\t^ t at: (index - base + 1 - (chunkIndex - 1 * chunkSize)) put: value\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'accessing' stamp: 'yo 12/1/2003 15:58'!\\\\nsize\\\\n\\\\n\\\\t^size\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'accessing' stamp: 'yo 12/1/2003 22:34'!\\\\nzapDefaultOnlyEntries\\\\n\\\\n\\\\t| lastIndex newInst |\\\\n\\\\t1 to: self basicSize do: [:i |\\\\n\\\\t\\\\t(self allDefaultValueSubtableAt: i) ifTrue: [self basicAt: i put: nil].\\\\n\\\\t].\\\\n\\\\n\\\\tlastIndex _ self findLastNonNilSubTable.\\\\n\\\\tlastIndex = 0 ifTrue: [^ self].\\\\n\\\\t\\\\n\\\\tnewInst _ self class new: lastIndex*chunkSize chunkSize: chunkSize arrayClass: (self basicAt: lastIndex) class base: base defaultValue: defaultValue.\\\\n\\\\tnewInst privateSize: self size.\\\\n\\\\tbase to: newInst size do: [:i | newInst at: i put: (self at: i)].\\\\n\\\\t1 to: newInst basicSize do: [:i |\\\\n\\\\t\\\\t(newInst allDefaultValueSubtableAt: i) ifTrue: [newInst basicAt: i put: nil].\\\\n\\\\t].\\\\n\\\\n\\\\tself becomeForward: newInst.\\\\n\\\\t^ newInst.\\\\n! !\\\\n\\\\n\\\\n!SparseLargeTable methodsFor: 'initialization' stamp: 'yo 12/1/2003 16:58'!\\\\ninitChunkSize: aChunkSize size: aSize arrayClass: aClass base: b defaultValue: d\\\\n\\\\n\\\\t| lastChunkSize |\\\\n\\\\tchunkSize := aChunkSize.\\\\n\\\\tsize := aSize.\\\\n\\\\tbase _ b.\\\\n\\\\tdefaultValue _ d.\\\\n\\\\t1 to: (self basicSize - 1) do: [ :in | self basicAt: in put: (aClass new: chunkSize withAll: defaultValue) ].\\\\n\\\\tlastChunkSize := size \\\\\\\\\\\\\\\\ chunkSize.\\\\n\\\\tlastChunkSize = 0 ifTrue: [lastChunkSize := chunkSize].\\\\n\\\\tsize = 0 \\\\n\\\\t\\\\tifTrue: [self basicAt: 1 put: (aClass new: 0)]\\\\n\\\\t\\\\tifFalse: [self basicAt: self basicSize put: (aClass new: lastChunkSize withAll: defaultValue)].\\\\n! !\\\\n\\\\n\\\\n!SparseLargeTable methodsFor: 'printing' stamp: 'yo 12/1/2003 17:06'!\\\\nprintElementsOn: aStream\\\\n\\\\t| element |\\\\n\\\\taStream nextPut: $(.\\\\n\\\\tbase to: size do: [:index | element _ self at: index. aStream print: element; space].\\\\n\\\\tself isEmpty ifFalse: [aStream skip: -1].\\\\n\\\\taStream nextPut: $)\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'printing' stamp: 'yo 12/1/2003 15:58'!\\\\nprintOn: aStream\\\\n\\\\n\\\\t(#(String) includes: self arrayClass name) \\\\n\\\\t\\\\tifTrue: [^self storeOn: aStream].\\\\n\\\\t^super printOn: aStream\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'printing' stamp: 'yo 12/1/2003 15:59'!\\\\nstoreOn: aStream\\\\n\\\\n\\\\t| x |\\\\n\\\\t(#(String) includes: self arrayClass name) ifTrue: \\\\n\\\\t\\\\t[aStream nextPut: $'.\\\\n\\\\t\\\\t1 to: self size do:\\\\n\\\\t\\\\t\\\\t[:i |\\\\n\\\\t\\\\t\\\\taStream nextPut: (x _ self at: i).\\\\n\\\\t\\\\t\\\\tx == $' ifTrue: [aStream nextPut: x]].\\\\n\\\\t\\\\taStream nextPutAll: ''' asLargeArrayChunkSize: '.\\\\n\\\\t\\\\taStream nextPutAll: self chunkSize asString.\\\\n\\\\t\\\\t^self].\\\\n\\\\t^super storeOn: aStream\\\\n! !\\\\n\\\\n\\\\n!SparseLargeTable methodsFor: 'private' stamp: 'yo 12/1/2003 18:58'!\\\\nallDefaultValueSubtableAt: index\\\\n\\\\n\\\\t| t |\\\\n\\\\tt _ self basicAt: index.\\\\n\\\\tt ifNil: [^ true].\\\\n\\\\tt do: [:e |\\\\n\\\\t\\\\te ~= defaultValue ifTrue: [^ false].\\\\n\\\\t].\\\\n\\\\t^ true.\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'private' stamp: 'yo 12/1/2003 17:10'!\\\\nanalyzeSpaceSaving\\\\n\\\\n\\\\t| total elems tablesTotal nonNilTables |\\\\n\\\\ttotal _ size - base + 1.\\\\n\\\\telems _ 0.\\\\n\\\\tbase to: size do: [:i | (self at: i) ~= defaultValue ifTrue: [elems _ elems + 1]].\\\\n\\\\ttablesTotal _ self basicSize.\\\\n\\\\tnonNilTables _ 0.\\\\n\\\\t1 to: self basicSize do: [:i | (self basicAt: i) ifNotNil: [nonNilTables _ nonNilTables + 1]].\\\\n\\\\n\\\\t^ String streamContents: [:strm |\\\\n\\\\t\\\\tstrm nextPutAll: 'total: '.\\\\n\\\\t\\\\tstrm nextPutAll: total printString.\\\\n\\\\t\\\\tstrm nextPutAll: ' elements: '.\\\\n\\\\t\\\\tstrm nextPutAll: elems printString.\\\\n\\\\t\\\\tstrm nextPutAll: ' tables: '.\\\\n\\\\t\\\\tstrm nextPutAll: tablesTotal printString.\\\\n\\\\t\\\\tstrm nextPutAll: ' non-nil: '.\\\\n\\\\t\\\\tstrm nextPutAll: nonNilTables printString.\\\\n\\\\t].\\\\n\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'private' stamp: 'nk 8/31/2004 08:34'!\\\\ncopyEmpty\\\\n\\\\t\\\\\\\"Answer a copy of the receiver that contains no elements.\\\\\\\"\\\\n\\\\t^self speciesNew: 0\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'private' stamp: 'yo 12/1/2003 22:34'!\\\\nfindLastNonNilSubTable\\\\n\\\\n\\\\t(self basicAt: self basicSize) ifNotNil: [^ self basicSize].\\\\n\\\\n\\\\tself basicSize - 1 to: 1 by: -1 do: [:lastIndex |\\\\n\\\\t\\\\t(self basicAt: lastIndex) ifNotNil: [^ lastIndex].\\\\n\\\\t].\\\\n\\\\t^ 0.\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'private' stamp: 'yo 12/1/2003 19:19'!\\\\nprivateSize: s\\\\n\\\\n\\\\tsize _ s.\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'private' stamp: 'yo 12/1/2003 17:34'!\\\\npvtCheckIndex: index \\\\n\\\\n\\\\tindex isInteger ifFalse: [self errorNonIntegerIndex].\\\\n\\\\tindex < 1 ifTrue: [self errorSubscriptBounds: index].\\\\n\\\\tindex > size ifTrue: [self errorSubscriptBounds: index].\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'private' stamp: 'yo 12/1/2003 15:59'!\\\\nsimilarInstance\\\\n\\\\n\\\\t^self class\\\\n\\\\t\\\\tnew: self size \\\\n\\\\t\\\\tchunkSize: self chunkSize \\\\n\\\\t\\\\tarrayClass: self arrayClass\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'private' stamp: 'yo 12/1/2003 15:59'!\\\\nsimilarInstance: newSize\\\\n\\\\n\\\\t^self class\\\\n\\\\t\\\\tnew: newSize \\\\n\\\\t\\\\tchunkSize: self chunkSize \\\\n\\\\t\\\\tarrayClass: self arrayClass\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'private' stamp: 'yo 12/1/2003 15:59'!\\\\nsimilarSpeciesInstance\\\\n\\\\n\\\\t^self similarInstance\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'private' stamp: 'yo 12/1/2003 16:00'!\\\\nsimilarSpeciesInstance: newSize\\\\n\\\\n\\\\t^self similarInstance: newSize\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'private' stamp: 'yo 12/1/2003 16:00'!\\\\nspeciesNew\\\\n\\\\n\\\\t^self species\\\\n\\\\t\\\\tnew: self size \\\\n\\\\t\\\\tchunkSize: self chunkSize \\\\n\\\\t\\\\tarrayClass: self arrayClass\\\\n! !\\\\n\\\\n!SparseLargeTable methodsFor: 'private' stamp: 'yo 12/1/2003 16:00'!\\\\nspeciesNew: newSize\\\\n\\\\n\\\\t^self species\\\\n\\\\t\\\\tnew: newSize \\\\n\\\\t\\\\tchunkSize: self chunkSize \\\\n\\\\t\\\\tarrayClass: self arrayClass\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSparseLargeTable class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SparseLargeTable class methodsFor: 'accessing' stamp: 'yo 12/1/2003 15:54'!\\\\ndefaultChunkSize\\\\n\\\\n\\\\t^100! !\\\\n\\\\n!SparseLargeTable class methodsFor: 'accessing' stamp: 'yo 12/1/2003 15:54'!\\\\ndefaultChunkSizeForFiles\\\\n\\\\n\\\\t^8000! !\\\\n\\\\n\\\\n!SparseLargeTable class methodsFor: 'instance creation' stamp: 'yo 12/1/2003 16:06'!\\\\nnew: size\\\\n\\\\n\\\\t^self new: size chunkSize: self defaultChunkSize\\\\n! !\\\\n\\\\n!SparseLargeTable class methodsFor: 'instance creation' stamp: 'yo 12/1/2003 16:07'!\\\\nnew: size chunkSize: chunkSize\\\\n\\\\n\\\\t^self new: size chunkSize: chunkSize arrayClass: Array\\\\n! !\\\\n\\\\n!SparseLargeTable class methodsFor: 'instance creation' stamp: 'yo 12/1/2003 16:08'!\\\\nnew: size chunkSize: chunkSize arrayClass: aClass\\\\n\\\\n\\\\t^self new: size chunkSize: chunkSize arrayClass: Array base: 1.\\\\n! !\\\\n\\\\n!SparseLargeTable class methodsFor: 'instance creation' stamp: 'yo 12/1/2003 16:37'!\\\\nnew: size chunkSize: chunkSize arrayClass: aClass base: b\\\\n\\\\n\\\\t^self new: size chunkSize: chunkSize arrayClass: Array base: 1 defaultValue: nil.\\\\n! !\\\\n\\\\n!SparseLargeTable class methodsFor: 'instance creation' stamp: 'yo 12/1/2003 16:37'!\\\\nnew: size chunkSize: chunkSize arrayClass: aClass base: b defaultValue: d\\\\n\\\\n\\\\t| basicSize |\\\\n\\\\t(basicSize := ((size - 1) // chunkSize) + 1) = 0\\\\n\\\\t\\\\tifTrue: [basicSize := 1].\\\\n\\\\t^(self basicNew: basicSize)\\\\n\\\\t\\\\tinitChunkSize: chunkSize size: size arrayClass: aClass base: b defaultValue: d;\\\\n\\\\t\\\\tyourself\\\\n! !\\\\nObject subclass: #SparseXTable\\\\n\\\\tinstanceVariableNames: 'tables xTables'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Multilingual-Display'!\\\\n\\\\n!SparseXTable methodsFor: 'as yet unclassified' stamp: 'yo 7/30/2003 17:38'!\\\\ntableFor: code\\\\n\\\\n\\\\t| div t table |\\\\n\\\\tdiv _ code // 65536.\\\\n\\\\tt _ xTables at: div ifAbsent: [table _ Array new: 65536 withAll: 0. xTables at: div put: table. table].\\\\n\\\\t^ t.\\\\n! !\\\\nObject subclass: #Speaker\\\\n\\\\tinstanceVariableNames: 'pitch range loudness speed transcriber voice visitors'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Speech-TTS'!\\\\n\\\\n!Speaker methodsFor: 'accessing' stamp: 'len 12/8/1999 16:33'!\\\\nloudness\\\\n\\\\t^ loudness! !\\\\n\\\\n!Speaker methodsFor: 'accessing' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\nloudness: aNumber\\\\n\\\\tloudness := aNumber! !\\\\n\\\\n!Speaker methodsFor: 'accessing' stamp: 'len 12/13/1999 03:02'!\\\\nphonemes\\\\n\\\\t\\\\\\\"Answer the phoneme set of the receiver.\\\\\\\"\\\\n\\\\t^ self transcriber phonemes! !\\\\n\\\\n!Speaker methodsFor: 'accessing' stamp: 'len 12/12/1999 23:18'!\\\\npitch\\\\n\\\\t\\\\\\\"Answer the average pitch.\\\\\\\"\\\\n\\\\t^ pitch! !\\\\n\\\\n!Speaker methodsFor: 'accessing' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\npitch: aNumber\\\\n\\\\t\\\\\\\"Set the average pitch.\\\\\\\"\\\\n\\\\tpitch := aNumber! !\\\\n\\\\n!Speaker methodsFor: 'accessing' stamp: 'len 12/12/1999 23:18'!\\\\nrange\\\\n\\\\t\\\\\\\"Answer the pitch range (variation).\\\\\\\"\\\\n\\\\t^ range! !\\\\n\\\\n!Speaker methodsFor: 'accessing' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\nrange: aNumber\\\\n\\\\t\\\\\\\"Set the pitch range (variation).\\\\\\\"\\\\n\\\\trange := aNumber! !\\\\n\\\\n!Speaker methodsFor: 'accessing' stamp: 'len 12/8/1999 16:33'!\\\\nspeed\\\\n\\\\t^ speed! !\\\\n\\\\n!Speaker methodsFor: 'accessing' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\nspeed: aNumber\\\\n\\\\tspeed := aNumber! !\\\\n\\\\n!Speaker methodsFor: 'accessing' stamp: 'len 12/8/1999 16:31'!\\\\ntranscriber\\\\n\\\\t^ transcriber! !\\\\n\\\\n!Speaker methodsFor: 'accessing' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\ntranscriber: aPhoneticTranscriber\\\\n\\\\ttranscriber := aPhoneticTranscriber! !\\\\n\\\\n!Speaker methodsFor: 'accessing' stamp: 'len 12/12/1999 23:02'!\\\\nvisitors\\\\n\\\\t^ visitors! !\\\\n\\\\n!Speaker methodsFor: 'accessing' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\nvisitors: aCollection\\\\n\\\\tvisitors := aCollection! !\\\\n\\\\n!Speaker methodsFor: 'accessing' stamp: 'len 12/8/1999 16:32'!\\\\nvoice\\\\n\\\\t^ voice! !\\\\n\\\\n!Speaker methodsFor: 'accessing' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\nvoice: aVoice\\\\n\\\\tvoice := aVoice! !\\\\n\\\\n\\\\n!Speaker methodsFor: 'editing' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\nedit\\\\n\\\\t| answer buttons |\\\\n\\\\tanswer := (self findAVoice: KlattVoice) editor.\\\\n\\\\tbuttons := AlignmentMorph new listDirection: #leftToRight; color: answer color.\\\\n\\\\tbuttons\\\\n\\\\t\\\\taddMorphFront: (SimpleButtonMorph new target: self; actWhen: #buttonDown; actionSelector:  #newHead; labelString: 'new head');\\\\n\\\\t\\\\taddMorphFront: (SimpleButtonMorph new target: self; actWhen: #buttonDown; actionSelector:  #saySomething; labelString: 'test').\\\\n\\\\tanswer\\\\n\\\\t\\\\taddSliderForParameter: #speed target: self min: 0.1 max: 2.0 description: 'Speed';\\\\n\\\\t\\\\taddSliderForParameter: #loudness target: self min: 0.0 max: 1.0 description: 'Loudness';\\\\n\\\\t\\\\taddSliderForParameter: #range target: self min: 0.0 max: 1.0 description: 'Pitch Range';\\\\n\\\\t\\\\taddSliderForParameter: #pitch target: self min: 20.0 max: 800.0 description: 'Pitch';\\\\n\\\\t\\\\taddMorphFront: buttons;\\\\n\\\\t\\\\topenInWorld! !\\\\n\\\\n!Speaker methodsFor: 'editing' stamp: 'len 12/2/1999 03:19'!\\\\nfindAVoice: aClass\\\\n\\\\t(self voice isKindOf: aClass) ifTrue: [^ self voice].\\\\n\\\\t(self voice isKindOf: CompositeVoice)\\\\n\\\\t\\\\tifTrue: [self voice do: [ :each | (each isKindOf: aClass) ifTrue: [^ each]]].\\\\n\\\\t^ nil! !\\\\n\\\\n!Speaker methodsFor: 'editing' stamp: 'len 12/2/1999 03:27'!\\\\nmakeGestural\\\\n\\\\t(self findAVoice: GesturalVoice) isNil ifFalse: [^ self].\\\\n\\\\tself voice: self voice + GesturalVoice new! !\\\\n\\\\n!Speaker methodsFor: 'editing' stamp: 'len 12/2/1999 03:27'!\\\\nnewHead\\\\n\\\\tself makeGestural.\\\\n\\\\t(self findAVoice: GesturalVoice) newHead! !\\\\n\\\\n!Speaker methodsFor: 'editing' stamp: 'len 12/14/1999 05:24'!\\\\nsaySomething\\\\n\\\\tself say: #('This is my voice.' 'I am speaking.' 'Do you like my voice?' 'Listen to my voice.' 'Hello.' 'Hay. What are you doing?' 'How are you?' 'Is this my voice?' 'Are you there?' 'Help, please.' 'Howdy.' 'Ha ha he he hi.') atRandom! !\\\\n\\\\n\\\\n!Speaker methodsFor: 'initialization' stamp: 'len 11/27/2000 09:59'!\\\\ninitialize\\\\n\\\\tself pitch: 100.0; range: 0.3; loudness: 1.0; speed: 0.6; \\\\\\\"normalizer: TextNormalizer new;\\\\\\\" transcriber: PhoneticTranscriber default; visitors: {IntonationVisitor default. DurationsVisitor default. F0RenderingVisitor default}! !\\\\n\\\\n\\\\n!Speaker methodsFor: 'parsing' stamp: 'len 12/14/1999 02:13'!\\\\nclauseFromString: aString\\\\n\\\\t^ Clause new\\\\n\\\\t\\\\tstring: aString;\\\\n\\\\t\\\\tphrases: ((aString findTokens: '!!?.,;()') collect: [ :each | self phraseFromString: each])! !\\\\n\\\\n!Speaker methodsFor: 'parsing' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\neventsFromString: aString\\\\n\\\\t| clause |\\\\n\\\\tclause := self clauseFromString: aString.\\\\n\\\\tclause phrases do: [ :each | each lastSyllable events add: (PhoneticEvent new phoneme: self phonemes silence; duration: 0.1)].\\\\n\\\\tclause lastSyllable events last duration: 0.5.\\\\n\\\\tvisitors do: [ :each | each speaker: self. clause accept: each].\\\\n\\\\tclause eventsDo: [ :each | each loudness: self loudness].\\\\n\\\\t^ clause events! !\\\\n\\\\n!Speaker methodsFor: 'parsing' stamp: 'len 12/13/1999 03:19'!\\\\nphraseFromString: aString\\\\n\\\\t^ Phrase new\\\\n\\\\t\\\\tstring: aString;\\\\n\\\\t\\\\twords: ((aString findTokens: ' !!?.,;()') collect: [ :each | self wordFromString: each])! !\\\\n\\\\n!Speaker methodsFor: 'parsing' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\nsyllabizationOf: phonemes\\\\n\\\\t| syllable stream last answer |\\\\n\\\\tanswer := OrderedCollection new.\\\\n\\\\tsyllable := Syllable new phonemes: (OrderedCollection new: 4).\\\\n\\\\tstream := ReadStream on: phonemes.\\\\n\\\\t[stream atEnd]\\\\n\\\\t\\\\twhileFalse: [syllable phonemes add: (last := stream next).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(stream atEnd not and: [last isConsonant not and: [stream peek isConsonant]])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [answer add: syllable. syllable := Syllable new phonemes: (OrderedCollection new: 4)]].\\\\n\\\\tsyllable phonemes isEmpty ifFalse: [answer add: syllable].\\\\n\\\\t^ answer! !\\\\n\\\\n!Speaker methodsFor: 'parsing' stamp: 'len 12/8/1999 18:24'!\\\\nwordFromString: aString\\\\n\\\\t^ Word new\\\\n\\\\t\\\\tstring: aString;\\\\n\\\\t\\\\tsyllables: (self syllabizationOf: (self transcriber transcriptionOf: aString))! !\\\\n\\\\n\\\\n!Speaker methodsFor: 'playing' stamp: 'nk 2/19/2004 16:50'!\\\\nnumberSignDelay\\\\n\\\\t\\\\\\\"Answer the number of milliseconds that a # symbol in the string given to say: will generate.\\\\\\\"\\\\n\\\\t^200! !\\\\n\\\\n!Speaker methodsFor: 'playing' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\nsay: aString \\\\n\\\\t\\\\\\\"aString may contain characters and punctuation.\\\\n\\\\tYou may also include the # symbol in aString;\\\\n\\\\tfor each one of these, a 200msec delay will be generated.\\\\\\\"\\\\n\\\\n\\\\t| events stream string token delay |\\\\n\\\\n\\\\tstream := ReadStream\\\\n\\\\t\\\\t\\\\t\\\\ton: ((aString\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcopyReplaceAll: '-'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twith: ' '\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tasTokens: false)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfindTokens: '?# '\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tkeep: '?#').\\\\n\\\\tstring := ''.\\\\n\\\\tdelay := 0.\\\\n\\\\t[stream atEnd]\\\\n\\\\t\\\\twhileFalse: [token := stream next.\\\\n\\\\t\\\\t\\\\ttoken = '#'\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [ self voice playSilenceMSecs: self numberSignDelay.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdelay := delay + self numberSignDelay ]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [string := string , ' ' , token.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(token = '?' or: [stream atEnd])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tevents := CompositeEvent new.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tevents addAll: (self eventsFromString: string).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tevents playOn: self voice delayed: delay.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdelay := delay + (events duration * 1000).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstring := ''  ]]].\\\\n\\\\tself voice flush! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSpeaker class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!Speaker class methodsFor: 'examples' stamp: 'len 12/14/1999 03:17'!\\\\nbicyclic\\\\n\\\\t\\\\\\\"\\\\n\\\\tSpeaker bicyclic say: 'This is my voice. I am a woman with bicyclic voice.'\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t^ self new\\\\n\\\\t\\\\tpitch: 200.0;\\\\n\\\\t\\\\tvoice: (KlattVoice new diplophonia: 0.4; tract: 14.4)! !\\\\n\\\\n!Speaker class methodsFor: 'examples' stamp: 'len 12/14/1999 03:56'!\\\\nbigMan\\\\n\\\\t\\\\\\\"\\\\n\\\\tSpeaker bigMan say: 'I am the child? No. I am the big man speaking.'\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t^ self new\\\\n\\\\t\\\\tpitch: 90.0;\\\\n\\\\t\\\\trange: 0.5;\\\\n\\\\t\\\\tvoice: (KlattVoice new tract: 20)! !\\\\n\\\\n!Speaker class methodsFor: 'examples' stamp: 'len 12/14/1999 03:19'!\\\\nbreathy\\\\n\\\\t\\\\\\\"\\\\n\\\\tSpeaker breathy say: 'This is my breathy voice.'\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t^ self new\\\\n\\\\t\\\\tpitch: 100.0;\\\\n\\\\t\\\\tvoice: (KlattVoice new ro: 0.6; turbulence: 70)! !\\\\n\\\\n!Speaker class methodsFor: 'examples' stamp: 'len 12/14/1999 04:07'!\\\\nchild\\\\n\\\\t\\\\\\\"\\\\n\\\\tSpeaker child say: 'Hello. I am a child speaking.'\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t^ self new\\\\n\\\\t\\\\tpitch: 320.0;\\\\n\\\\t\\\\tvoice: (KlattVoice new tract: 12)! !\\\\n\\\\n!Speaker class methodsFor: 'examples' stamp: 'len 12/14/1999 03:21'!\\\\ncreaky\\\\n\\\\t\\\\\\\"\\\\n\\\\tSpeaker creaky say: 'This is my creaky voice with hight jitter and shimmer.'\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t^ self new\\\\n\\\\t\\\\tpitch: 90.0;\\\\n\\\\t\\\\tspeed: 0.5;\\\\n\\\\t\\\\tvoice: (KlattVoice new jitter: 0.5; shimmer: 0.5)! !\\\\n\\\\n!Speaker class methodsFor: 'examples' stamp: 'len 11/27/2000 10:01'!\\\\ndefault\\\\n\\\\t\\\\\\\"\\\\n\\\\tSpeaker default say: 'This is the default voice.'\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t^ self new voice: KlattVoice new! !\\\\n\\\\n!Speaker class methodsFor: 'examples' stamp: 'len 12/14/1999 04:13'!\\\\nexorsist\\\\n\\\\t\\\\\\\"\\\\n\\\\tSpeaker exorsist say: 'This is an scary voice. Boo.'\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t^ self new\\\\n\\\\t\\\\tpitch: 40.0;\\\\n\\\\t\\\\tspeed: 0.5;\\\\n\\\\t\\\\tvoice: (KlattVoice new tract: 10; diplophonia: 0.4; jitter: 0.3; shimmer: 0.5; turbulence: 50)! !\\\\n\\\\n!Speaker class methodsFor: 'examples' stamp: 'len 12/14/1999 04:13'!\\\\nfly\\\\n\\\\t\\\\\\\"\\\\n\\\\tSpeaker fly say: 'Haaaaaalp.'\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t^ self new\\\\n\\\\t\\\\tpitch: 650.0;\\\\n\\\\t\\\\tloudness: 0.5;\\\\n\\\\t\\\\tspeed: 0.8;\\\\n\\\\t\\\\tvoice: (KlattVoice new flutter: 1.0; tract: 1)! !\\\\n\\\\n!Speaker class methodsFor: 'examples' stamp: 'len 12/14/1999 04:01'!\\\\nkid\\\\n\\\\t\\\\\\\"\\\\n\\\\tSpeaker kid say: 'Do you like my voice? I am the kid speaking.'\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t^ self new\\\\n\\\\t\\\\tpitch: 170.0;\\\\n\\\\t\\\\trange: 0.4;\\\\n\\\\t\\\\tvoice: (KlattVoice new tract: 16)! !\\\\n\\\\n!Speaker class methodsFor: 'examples' stamp: 'len 11/27/2000 10:01'!\\\\nman\\\\n\\\\t\\\\\\\"\\\\n\\\\tSpeaker man say: 'Listen to my voice. I am a man speaking.'\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t^ self default pitch: 90.0! !\\\\n\\\\n!Speaker class methodsFor: 'examples' stamp: 'len 12/14/1999 03:26'!\\\\nnotPressed\\\\n\\\\t\\\\\\\"\\\\n\\\\tSpeaker notPressed say: 'This is a non pressed voice.'\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t^ self new\\\\n\\\\t\\\\tpitch: 100.0;\\\\n\\\\t\\\\tvoice: (KlattVoice new ro: 0.9)! !\\\\n\\\\n!Speaker class methodsFor: 'examples' stamp: 'len 12/14/1999 03:26'!\\\\npressed\\\\n\\\\t\\\\\\\"\\\\n\\\\tSpeaker pressed say: 'This is a pressed voice.'\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t^ self new\\\\n\\\\t\\\\tpitch: 100.0;\\\\n\\\\t\\\\tvoice: (KlattVoice new ro: 0.1)! !\\\\n\\\\n!Speaker class methodsFor: 'examples' stamp: 'len 12/14/1999 03:27'!\\\\nwhispery\\\\n\\\\t\\\\\\\"\\\\n\\\\tSpeaker whispery say: 'This is my whispery voice.'\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t^ self new\\\\n\\\\t\\\\tvoice: (KlattVoice new breathiness: 1.0)! !\\\\n\\\\n!Speaker class methodsFor: 'examples' stamp: 'len 12/14/1999 04:10'!\\\\nwoman\\\\n\\\\t\\\\\\\"\\\\n\\\\tSpeaker woman say: 'Do you listen? I am a woman speaking.'\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t^ self new\\\\n\\\\t\\\\tpitch: 230.0;\\\\n\\\\t\\\\trange: 0.5;\\\\n\\\\t\\\\tspeed: 0.7;\\\\n\\\\t\\\\tvoice: (KlattVoice new flutter: 0.5; ro: 0.3; ra: 0.003; tract: 14.4)! !\\\\n\\\\n\\\\n!Speaker class methodsFor: 'examples-others' stamp: 'len 12/2/1999 03:46'!\\\\nmanWithEditor\\\\n\\\\t\\\\\\\"\\\\n\\\\tSpeaker manWithEditor say: 'With this editor you can change my voice.'\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t^ self man edit! !\\\\n\\\\n!Speaker class methodsFor: 'examples-others' stamp: 'len 12/14/1999 05:10'!\\\\nmanWithHead\\\\n\\\\t\\\\\\\"\\\\n\\\\tSpeaker manWithHead say: 'This is my voice. Can you see my lips?'\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t^ self man newHead! !\\\\nMorph subclass: #SpeakerMorph\\\\n\\\\tinstanceVariableNames: 'bufferSize buffer lastConePosition sound'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-SoundInterface'!\\\\n\\\\n!SpeakerMorph methodsFor: 'initialization' stamp: 'nk 6/12/2004 10:05'!\\\\naddGraphic\\\\n\\\\n\\\\t| graphic |\\\\n\\\\tgraphic _ World drawingClass withForm: self speakerGraphic.\\\\n\\\\tgraphic position: bounds center - (graphic extent // 2).\\\\n\\\\tself addMorph: graphic.\\\\n! !\\\\n\\\\n!SpeakerMorph methodsFor: 'initialization' stamp: 'dgd 3/7/2003 14:51'!\\\\ndefaultColor\\\\n\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color\\\\n\\\\t\\\\tr: 1.0\\\\n\\\\t\\\\tg: 0.484\\\\n\\\\t\\\\tb: 0.258! !\\\\n\\\\n!SpeakerMorph methodsFor: 'initialization' stamp: 'dgd 3/7/2003 14:51'!\\\\ninitialize\\\\n\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\\\\"\\\\\\\"\\\\n\\\\tself addGraphic.\\\\n\\\\tbufferSize _ 5000.\\\\n\\\\tbuffer _ WriteStream\\\\n\\\\t\\\\t\\\\t\\\\ton: (SoundBuffer newMonoSampleCount: bufferSize).\\\\n\\\\tlastConePosition _ 0.\\\\n\\\\tsound _ SequentialSound new! !\\\\n\\\\n!SpeakerMorph methodsFor: 'initialization' stamp: 'jm 4/22/1999 22:58'!\\\\nspeakerGraphic\\\\n\\\\n\\\\t^ Form\\\\n\\\\t\\\\textent: 19@18\\\\n\\\\t\\\\tdepth: 8\\\\n\\\\t\\\\tfromArray: #(0 0 1493172224 2816 0 0 0 1493172224 11 0 0 138 1493172224 184549376 184549376 0 35509 2315255808 720896 720896 0 9090522 2315255808 2816 720896 0 2327173887 2315255819 2816 720896 138 3051028442 2315255819 2816 2816 1505080590 4294957786 2315255808 184549387 2816 3053453311 4292532917 1493172224 184549387 2816 1505080714 3048584629 1493172224 184549387 2816 9079434 3048584629 1493172224 184549387 2816 138 2327164341 1493172235 2816 2816 0 2324346293 1493172235 2816 720896 0 9079477 1493172224 2816 720896 0 35466 1493172224 720896 720896 0 138 0 184549376 184549376 0 0 0 11 0 0 0 0 2816 0)\\\\n\\\\t\\\\toffset: 0@0\\\\n! !\\\\n\\\\n\\\\n!SpeakerMorph methodsFor: 'speaker' stamp: 'jdl 3/28/2003 09:38'!\\\\nappendSample: aFloat \\\\n\\\\t\\\\\\\"Append the given sample, a number between -100.0 and 100.0, to my buffer. Flush the buffer if it is full.\\\\\\\"\\\\n\\\\n\\\\tlastConePosition := aFloat.\\\\n\\\\tlastConePosition := lastConePosition min: 100.0.\\\\n\\\\tlastConePosition := lastConePosition max: -100.0.\\\\n\\\\tbuffer nextPut: (327.67 * lastConePosition) truncated.\\\\n\\\\tbuffer position >= bufferSize ifTrue: [self flushBuffer]\\\\n! !\\\\n\\\\n!SpeakerMorph methodsFor: 'speaker' stamp: 'jm 4/21/1999 10:18'!\\\\nconePosition\\\\n\\\\n\\\\t^ lastConePosition\\\\n! !\\\\n\\\\n!SpeakerMorph methodsFor: 'speaker' stamp: 'jm 4/22/1999 16:46'!\\\\nconePosition: aNumber\\\\n\\\\n\\\\tself appendSample: aNumber asFloat.  \\\\\\\"sets lastConePosition\\\\\\\"\\\\n! !\\\\n\\\\n!SpeakerMorph methodsFor: 'speaker' stamp: 'jm 4/22/1999 13:29'!\\\\nflushBuffer\\\\n\\\\n\\\\t| buf |\\\\n\\\\tbuf _ buffer contents.\\\\n\\\\tbuffer resetContents.\\\\n\\\\tsound isPlaying ifFalse: [sound _ SequentialSound new].\\\\n\\\\tsound add: (SampledSound samples: buf samplingRate: 11025).\\\\n\\\\tsound isPlaying\\\\n\\\\t\\\\tifTrue: [sound pruneFinishedSounds]\\\\n\\\\t\\\\tifFalse: [sound play].\\\\n! !\\\\n\\\\n!SpeakerMorph methodsFor: 'speaker' stamp: 'jm 4/22/1999 15:33'!\\\\nstopSound\\\\n\\\\n\\\\tsound pause.\\\\n\\\\tbuffer resetContents.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSpeakerMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SpeakerMorph class methodsFor: '*eToys-scripting' stamp: 'sw 9/26/2001 04:27'!\\\\nadditionsToViewerCategories\\\\n\\\\t\\\\\\\"Answer a list of (<categoryName> <list of category specs>) pairs that characterize the phrases this kind of morph wishes to add to various Viewer categories.\\\\\\\"\\\\n\\\\n\\\\t^  #((speaker\\\\n\\\\n((slot conePosition  'the position of the speaker cone' Number readWrite Player getConePosition Player setConePosition:))))\\\\n\\\\n\\\\n\\\\n! !\\\\nAlignmentMorph subclass: #SpectrumAnalyzerMorph\\\\n\\\\tinstanceVariableNames: 'soundInput statusLight levelMeter graphMorph sonogramMorph fft displayType'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-SoundInterface'!\\\\n!SpectrumAnalyzerMorph commentStamp: '<historical>' prior: 0!\\\\nI am a tool for analyzing sound data from a microphone, CD, or other input source in real time. I have several display modes:\\\\n\\\\n\\\\tsignal\\\\t\\\\tsnapshots of the raw signal data as it arrives\\\\n\\\\tspectrum\\\\tfrequency spectrum of the signal data as it arrives\\\\n\\\\tsonogram\\\\tscrolling plot of the frequency spectrum over time,\\\\n\\\\t\\\\t\\\\t      where the vertical axis is frequency, the horizontal\\\\n\\\\t\\\\t\\\\t\\\\t  axis is time, and amount of energy at a given\\\\n\\\\t\\\\t\\\\t\\\\t  frequency is shown as a grayscale value with\\\\n\\\\t\\\\t\\\\t\\\\t  larger values being darker\\\\n\\\\nTo use this tool, be sure that you have selected the proper sound source using you host OS facilities. Set the desired sampling rate and FFT size (try 22050 samples/sec and an FFT size of 512) then click on the 'start' button. Use the slider to adjust the level so that the yellow level indicator peaks somewhere between the middle and the right edge at the maximum signal level.\\\\n\\\\nNote that if the level meter peaks hit the right edge, you will get 'clipping', which creates a bunch of spurious high frequency noise in the frequency spectrum. If the display is set to 'signal' mode, you can actually see the tops and bottoms of the waveform being cut off when clipping occurs.\\\\n\\\\nMany machines may not be able to perform spectrum analysis in real time, especially at higher sampling rates and larger FFT sizes. In both 'signal' and 'spectrum' modes, this tool will skip data to try to keep up with real time. However, in 'sonogram' mode it always processes all the data, even if it falls behind. This allows you to get a complete sonogram without dropouts even on a slower machine. However, as the sonogram display falls behind there will be a larger and larger time lag between when a sound is input and when it appears on the display.\\\\n\\\\nThe smaller the FFT size, the less frequency resolution you get. The lower the sampling rate, the less total frequency range you get. For an FFT size of N and a sampling rate of R, each of the N/2 'bins' of the frequency spectrum has a frequency resolution of R / N. For example, at a sampleing rate of 22050 samples/second, the total frequency range is 0 to 11025 Hz and an FFT of size 256 would divide this range into 128 bins (the output of an FFT of size N has N/2 bins), each of which covers a frequency band about 86 Hz wide.\\\\n\\\\nTo increase time resolution, increase the sampling rate and decrease the FFT size.\\\\n!\\\\n\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'initialization' stamp: 'dgd 3/7/2003 14:52'!\\\\ndefaultBorderWidth\\\\n\\\\\\\"answer the default border width for the receiver\\\\\\\"\\\\n\\\\t^ 2! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'initialization' stamp: 'dgd 3/7/2003 14:52'!\\\\ninitialize\\\\n\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\\\\"\\\\\\\"\\\\n\\\\tself listDirection: #topToBottom.\\\\n\\\\tsoundInput _ SoundInputStream new samplingRate: 22050.\\\\n\\\\tfft _ FFT new: 512.\\\\n\\\\tdisplayType _ 'sonogram'.\\\\n\\\\tself hResizing: #shrinkWrap.\\\\n\\\\tself vResizing: #shrinkWrap.\\\\n\\\\tself addButtonRow.\\\\n\\\\tself addLevelSlider.\\\\n\\\\tself addMorphBack: self makeLevelMeter.\\\\n\\\\tself addMorphBack: (Morph new extent: 10 @ 10;\\\\n\\\\t\\\\t\\\\t color: Color transparent).\\\\n\\\\t\\\\\\\"spacer\\\\\\\"\\\\n\\\\tself resetDisplay! !\\\\n\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'menu and buttons' stamp: 'dgd 9/19/2003 13:25'!\\\\ninvokeMenu\\\\n\\\\t\\\\\\\"Invoke the settings menu.\\\\\\\"\\\\n\\\\n\\\\t| aMenu |\\\\n\\\\taMenu _ CustomMenu new.\\\\n\\\\taMenu addList:\\\\t{\\\\n\\\\t\\\\t{'set sampling rate' translated.\\\\t\\\\t#setSamplingRate}.\\\\n\\\\t\\\\t{'set FFT size' translated.\\\\t\\\\t\\\\t#setFFTSize}.\\\\n\\\\t\\\\t{'set display type' translated.\\\\t\\\\t#setDisplayType}}.\\\\n\\\\taMenu invokeOn: self defaultSelection: nil.\\\\n! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'menu and buttons' stamp: 'jm 9/8/1999 12:52'!\\\\nresetDisplay\\\\n\\\\t\\\\\\\"Recreate my display after changing some parameter such as FFT size.\\\\\\\"\\\\n\\\\n\\\\tdisplayType = 'signal' ifTrue: [self showSignal].\\\\n\\\\tdisplayType = 'spectrum' ifTrue: [self showSpectrum].\\\\n\\\\tdisplayType = 'sonogram' ifTrue: [self showSonogram].\\\\n! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'menu and buttons' stamp: 'dgd 9/19/2003 13:29'!\\\\nsetDisplayType\\\\n\\\\t\\\\\\\"Set the display type.\\\\\\\"\\\\n\\\\n\\\\t| aMenu choice on |\\\\n\\\\taMenu _ CustomMenu new title: ('display type (currently {1})' translated format:{displayType}).\\\\n\\\\taMenu addList:\\\\t{\\\\n\\\\t\\\\t{'signal' translated.\\\\t'signal'}.\\\\n\\\\t\\\\t{'spectrum' translated.\\\\t'spectrum'}.\\\\n\\\\t\\\\t{'sonogram' translated.\\\\t'sonogram'}}.\\\\n\\\\tchoice _ aMenu startUp.\\\\n\\\\tchoice ifNil: [^ self].\\\\n\\\\n\\\\ton _ soundInput isRecording.\\\\n\\\\tself stop.\\\\n\\\\tdisplayType _ choice.\\\\n\\\\tself resetDisplay.\\\\n\\\\ton ifTrue: [self start].\\\\n\\\\n! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'menu and buttons' stamp: 'dgd 9/19/2003 13:27'!\\\\nsetFFTSize\\\\n\\\\t\\\\\\\"Set the size of the FFT used for frequency analysis.\\\\\\\"\\\\n\\\\n\\\\t| aMenu sz on |\\\\n\\\\taMenu _ CustomMenu new title: ('FFT size (currently {1})' translated format:{fft n}).\\\\n\\\\t((7 to: 10) collect: [:n | 2 raisedTo: n]) do:[:r | aMenu add: r printString action: r].\\\\n\\\\tsz _ aMenu startUp.\\\\n\\\\tsz ifNil: [^ self].\\\\n\\\\ton _ soundInput isRecording.\\\\n\\\\tself stop.\\\\n\\\\tfft _ FFT new: sz.\\\\n\\\\tself resetDisplay.\\\\n\\\\ton ifTrue: [self start].\\\\n! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'menu and buttons' stamp: 'dgd 9/19/2003 13:26'!\\\\nsetSamplingRate\\\\n\\\\t\\\\\\\"Set the sampling rate to be used for incoming sound data.\\\\\\\"\\\\n\\\\n\\\\t| aMenu rate on |\\\\n\\\\taMenu _ CustomMenu new title:\\\\n\\\\t\\\\t('Sampling rate (currently {1})' translated format:{soundInput samplingRate}).\\\\n\\\\t#(11025 22050 44100) do:[:r | aMenu add: r printString action: r].\\\\n\\\\trate _ aMenu startUp.\\\\n\\\\trate ifNil: [^ self].\\\\n\\\\ton _ soundInput isRecording.\\\\n\\\\tself stop.\\\\n\\\\tsoundInput samplingRate: rate.\\\\n\\\\tself resetDisplay.\\\\n\\\\ton ifTrue: [self start].\\\\n\\\\n! !\\\\n\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'stepping and presenter' stamp: 'jm 9/8/1999 15:12'!\\\\nstart\\\\n\\\\t\\\\\\\"Start displaying sound data.\\\\\\\"\\\\n\\\\n\\\\tdisplayType = 'signal'\\\\n\\\\t\\\\tifTrue: [soundInput bufferSize: graphMorph width - (2 * graphMorph borderWidth)]\\\\n\\\\t\\\\tifFalse: [soundInput bufferSize: fft n].\\\\n\\\\tsoundInput startRecording.\\\\n! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'stepping and presenter' stamp: 'jm 9/8/1999 19:05'!\\\\nstep\\\\n\\\\t\\\\\\\"Update the record light, level meter, and display.\\\\\\\"\\\\n\\\\n\\\\t| w |\\\\n\\\\t\\\\\\\"update the record light and level meter\\\\\\\"\\\\n\\\\tsoundInput isRecording\\\\n\\\\t\\\\tifTrue: [statusLight color: Color yellow]\\\\n\\\\t\\\\tifFalse: [statusLight color: Color gray].\\\\n\\\\tw _ ((121 * soundInput meterLevel) // 100) max: 1.\\\\n\\\\tlevelMeter width ~= w ifTrue: [levelMeter width: w].\\\\n\\\\n\\\\t\\\\\\\"update the display if any data is available\\\\\\\"\\\\n\\\\tself updateDisplay.\\\\n! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'stepping and presenter' stamp: 'jm 9/8/1999 15:12'!\\\\nstop\\\\n\\\\t\\\\\\\"Stop displaying sound data.\\\\\\\"\\\\n\\\\n\\\\tsoundInput stopRecording.\\\\n! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'stepping and presenter' stamp: 'jm 9/6/1999 12:12'!\\\\nstopStepping\\\\n\\\\t\\\\\\\"Turn off recording.\\\\\\\"\\\\n\\\\n\\\\tsuper stopStepping.\\\\n\\\\tsoundInput stopRecording.\\\\n! !\\\\n\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'submorphs-add/remove' stamp: 'jm 9/6/1999 14:40'!\\\\ndelete\\\\n\\\\t\\\\\\\"Turn off recording when this morph is deleted.\\\\\\\"\\\\n\\\\n\\\\tsuper delete.\\\\n\\\\tsoundInput stopRecording.\\\\n! !\\\\n\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'testing' stamp: 'jm 9/7/1999 22:26'!\\\\nstepTime\\\\n\\\\n\\\\t^ 0\\\\n! !\\\\n\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'private' stamp: 'dgd 9/19/2003 13:30'!\\\\naddButtonRow\\\\n\\\\n\\\\t| r |\\\\n\\\\tr _ AlignmentMorph newRow vResizing: #shrinkWrap.\\\\n\\\\tr addMorphBack: (self buttonName: 'Menu' translated action: #invokeMenu).\\\\n\\\\tr addMorphBack: (Morph new extent: 4@1; color: Color transparent).\\\\n\\\\tr addMorphBack: (self buttonName: 'Start' translated action: #start).\\\\n\\\\tr addMorphBack: (Morph new extent: 4@1; color: Color transparent).\\\\n\\\\tr addMorphBack: (self buttonName: 'Stop' translated action: #stop).\\\\n\\\\tr addMorphBack: (Morph new extent: 12@1; color: Color transparent).\\\\n\\\\tr addMorphBack: self makeStatusLight.\\\\n\\\\tself addMorphBack: r.\\\\n! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'private' stamp: 'ar 11/9/2000 21:23'!\\\\naddLevelSlider\\\\n\\\\n\\\\t| levelSlider r |\\\\n\\\\tlevelSlider _ SimpleSliderMorph new\\\\n\\\\t\\\\tcolor: color;\\\\n\\\\t\\\\textent: 100@2;\\\\n\\\\t\\\\ttarget: soundInput;\\\\n\\\\t\\\\tactionSelector: #recordLevel:;\\\\n\\\\t\\\\tadjustToValue: soundInput recordLevel.\\\\n\\\\tr _ AlignmentMorph newRow\\\\n\\\\t\\\\tcolor: color;\\\\n\\\\t\\\\tlayoutInset: 0;\\\\n\\\\t\\\\twrapCentering: #center; cellPositioning: #leftCenter;\\\\n\\\\t\\\\thResizing: #shrinkWrap;\\\\n\\\\t\\\\tvResizing: #rigid;\\\\n\\\\t\\\\theight: 24.\\\\n\\\\tr addMorphBack: (StringMorph contents: '0 ').\\\\n\\\\tr addMorphBack: levelSlider.\\\\n\\\\tr addMorphBack: (StringMorph contents: ' 10').\\\\n\\\\tself addMorphBack: r.\\\\n! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'private' stamp: 'jhm 10/15/97 14:30'!\\\\nbuttonName: aString action: aSymbol\\\\n\\\\n\\\\t^ SimpleButtonMorph new\\\\n\\\\t\\\\ttarget: self;\\\\n\\\\t\\\\tlabel: aString;\\\\n\\\\t\\\\tactionSelector: aSymbol\\\\n! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'private' stamp: 'jm 9/8/1999 13:27'!\\\\nmakeLevelMeter\\\\n\\\\n\\\\t| outerBox |\\\\n\\\\touterBox _ RectangleMorph new extent: 125@14; color: Color lightGray.\\\\n\\\\tlevelMeter _ Morph new extent: 2@10; color: Color yellow.\\\\n\\\\tlevelMeter position: outerBox topLeft + (2@2).\\\\n\\\\touterBox addMorph: levelMeter.\\\\n\\\\t^ outerBox\\\\n! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'private' stamp: 'dgd 9/19/2003 13:31'!\\\\nmakeStatusLight\\\\n\\\\n\\\\t| s |\\\\n\\\\tstatusLight _ RectangleMorph new extent: 24@19.\\\\n\\\\tstatusLight color: Color gray.\\\\n\\\\ts _ StringMorph contents: 'On' translated.\\\\n\\\\ts position: statusLight center - (s extent // 2).\\\\n\\\\tstatusLight addMorph: s.\\\\n\\\\t^ statusLight\\\\n! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'private' stamp: 'gm 2/28/2003 00:11'!\\\\nprocessBuffer: buf \\\\n\\\\t\\\\\\\"Analyze one buffer of data.\\\\\\\"\\\\n\\\\n\\\\t| data |\\\\n\\\\tdata := displayType = 'signal' \\\\n\\\\t\\\\tifTrue: [buf]\\\\n\\\\t\\\\tifFalse: [fft transformDataFrom: buf startingAt: 1].\\\\n\\\\tgraphMorph ifNotNil: \\\\n\\\\t\\\\t\\\\t[graphMorph\\\\n\\\\t\\\\t\\\\t\\\\tdata: data;\\\\n\\\\t\\\\t\\\\t\\\\tchanged].\\\\n\\\\tsonogramMorph ifNotNil: \\\\n\\\\t\\\\t\\\\t[data := data collect: [:v | v sqrt].\\\\t\\\\\\\"square root compresses dynamic range\\\\\\\"\\\\n\\\\t\\\\t\\\\tdata /= 400.0.\\\\n\\\\t\\\\t\\\\tsonogramMorph plotColumn: (data copyFrom: 1 to: data size // 1)]! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'private' stamp: 'jm 9/8/1999 12:49'!\\\\nremoveAllDisplays\\\\n\\\\t\\\\\\\"Remove all currently showing displays.\\\\\\\"\\\\n\\\\n\\\\tsonogramMorph ifNotNil: [sonogramMorph delete].\\\\n\\\\tgraphMorph ifNotNil: [graphMorph delete].\\\\n\\\\tsonogramMorph _ graphMorph _ nil.\\\\n! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'private' stamp: 'jm 9/8/1999 19:56'!\\\\nshowSignal\\\\n\\\\t\\\\\\\"Display the actual signal waveform.\\\\\\\"\\\\n\\\\n\\\\tdisplayType _ 'signal'.\\\\n\\\\tself removeAllDisplays.\\\\n\\\\tgraphMorph _ GraphMorph new.\\\\n\\\\tgraphMorph extent: (400 + (2 * graphMorph borderWidth))@128.\\\\n\\\\tgraphMorph data: (Array new: 100 withAll: 0).\\\\n\\\\tgraphMorph color: (Color r: 0.8 g: 1.0 b: 1.0).\\\\n\\\\tself addMorphBack: graphMorph.\\\\n\\\\tself extent: 10@10.  \\\\\\\"shrink to minimum size\\\\\\\"\\\\n! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'private' stamp: 'jm 9/8/1999 19:43'!\\\\nshowSonogram\\\\n\\\\t\\\\\\\"Display a sonogram showing the frequency spectrum versus time.\\\\\\\"\\\\n\\\\n\\\\t| zeros h w |\\\\n\\\\tdisplayType _ 'sonogram'.\\\\n\\\\tself removeAllDisplays.\\\\n\\\\th _ fft n // 2.\\\\n\\\\th _ h min: 512 max: 64.\\\\n\\\\tw _ 400.\\\\n\\\\tsonogramMorph _\\\\n\\\\t\\\\tSonogram new\\\\n\\\\t\\\\t\\\\textent: w@h\\\\n\\\\t\\\\t\\\\tminVal: 0.0\\\\n\\\\t\\\\t\\\\tmaxVal: 1.0\\\\n\\\\t\\\\t\\\\tscrollDelta: w.\\\\n\\\\tzeros _ Array new: sonogramMorph height withAll: 0.\\\\n\\\\tsonogramMorph width timesRepeat: [sonogramMorph plotColumn: zeros].\\\\n\\\\tself addMorphBack: sonogramMorph.\\\\n\\\\tself extent: 10@10.  \\\\\\\"shrink to minimum size\\\\\\\"\\\\n! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'private' stamp: 'jm 9/8/1999 15:10'!\\\\nshowSpectrum\\\\n\\\\t\\\\\\\"Display the frequency spectrum.\\\\\\\"\\\\n\\\\n\\\\tdisplayType _ 'spectrum'.\\\\n\\\\tself removeAllDisplays.\\\\n\\\\tgraphMorph _ GraphMorph new.\\\\n\\\\tgraphMorph extent: ((fft n // 2) + (2 * graphMorph borderWidth))@128.\\\\n\\\\tgraphMorph data: (Array new: fft n // 2 withAll: 0).\\\\n\\\\tself addMorphBack: graphMorph.\\\\n\\\\tself extent: 10@10.  \\\\\\\"shrink to minimum size\\\\\\\"\\\\n! !\\\\n\\\\n!SpectrumAnalyzerMorph methodsFor: 'private' stamp: 'jm 9/8/1999 19:39'!\\\\nupdateDisplay\\\\n\\\\t\\\\\\\"Update the display if any data is available.\\\\\\\"\\\\n\\\\n\\\\t| buf bufCount |\\\\n\\\\tsoundInput bufferCount = 0 ifTrue: [^ self].\\\\n\\\\n\\\\tgraphMorph ifNotNil: [\\\\n\\\\t\\\\t[soundInput bufferCount > 0] whileTrue: [\\\\n\\\\t\\\\t\\\\t\\\\\\\"skip to the most recent buffer\\\\\\\"\\\\n\\\\t\\\\t\\\\tbuf _ soundInput nextBufferOrNil].\\\\n\\\\t\\\\t^ self processBuffer: buf].\\\\n\\\\n\\\\tsonogramMorph ifNotNil: [\\\\n\\\\t\\\\t\\\\\\\"at small buffer sizes we have to update the sonogram in\\\\n\\\\t\\\\t batches or we may get behind; shoot for 8 updates/second\\\\\\\"\\\\n\\\\t\\\\tbufCount _ (soundInput samplingRate / (8 * soundInput bufferSize)) truncated max: 1.\\\\n\\\\t\\\\t[bufCount > 0 and: [soundInput bufferCount > 0]] whileTrue: [\\\\n\\\\t\\\\t\\\\tself processBuffer: (soundInput nextBufferOrNil)]].\\\\n! !\\\\nPath subclass: #Spline\\\\n\\\\tinstanceVariableNames: 'coefficients'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'ST80-Paths'!\\\\n!Spline commentStamp: '<historical>' prior: 0!\\\\nI represent a collection of Points through which a cubic spline curve is fitted.!\\\\n\\\\n\\\\n!Spline methodsFor: 'accessing'!\\\\ncoefficients\\\\n\\\\t\\\\\\\"Answer an eight-element Array of Arrays each of which is the length \\\\n\\\\tof the receiver. The first four arrays are the values, first, second and \\\\n\\\\tthird derivatives, respectively, for the parametric spline in x. The last \\\\n\\\\tfour elements are for y.\\\\\\\"\\\\n\\\\n\\\\t^coefficients! !\\\\n\\\\n\\\\n!Spline methodsFor: 'displaying'!\\\\ncomputeCurve\\\\n\\\\t\\\\\\\"Compute an array for the coefficients.\\\\\\\"\\\\n\\\\n\\\\t| length extras |\\\\n\\\\tlength _ self size.\\\\n\\\\textras _ 0.\\\\n\\\\tcoefficients _ Array new: 8.\\\\n\\\\t1 to: 8 do: [:i | coefficients at: i put: (Array new: length + extras)].\\\\n\\\\t1 to: 5 by: 4 do: \\\\n\\\\t\\\\t[:k | \\\\n\\\\t\\\\t1 to: length do:\\\\n\\\\t\\\\t\\\\t[:i | (coefficients at: k)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tat: i put: (k = 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [(self at: i) x asFloat]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [(self at: i) y asFloat])].\\\\n\\\\t\\\\t\\\\t1 to: extras do: [:i | (coefficients at: k)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tat: length + i put: ((coefficients at: k)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tat: i + 1)].\\\\n\\\\t\\\\t\\\\tself derivs: (coefficients at: k)\\\\n\\\\t\\\\t\\\\t\\\\tfirst: (coefficients at: k + 1)\\\\n\\\\t\\\\t\\\\t\\\\tsecond: (coefficients at: k + 2)\\\\n\\\\t\\\\t\\\\t\\\\tthird: (coefficients at: k + 3)].\\\\n\\\\textras > 0 \\\\n\\\\t\\\\tifTrue: [1 to: 8 do: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:i | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcoefficients at: i put: ((coefficients at: i)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcopyFrom: 2 to: length + 1)]]! !\\\\n\\\\n!Spline methodsFor: 'displaying'!\\\\ndisplayOn: aDisplayMedium at: aPoint clippingBox: clipRect rule: anInteger fillColor: aForm \\\\n\\\\t\\\\\\\"Display the receiver, a spline curve, approximated by straight line\\\\n\\\\tsegments.\\\\\\\"\\\\n\\\\n\\\\t| n line t x y x1 x2 x3 y1 y2 y3 |\\\\n\\\\tcollectionOfPoints size < 1 ifTrue: [self error: 'a spline must have at least one point'].\\\\n\\\\tline _ Line new.\\\\n\\\\tline form: self form.\\\\n\\\\tline beginPoint: \\\\n\\\\t\\\\t(x _ (coefficients at: 1) at: 1) rounded @ (y _ (coefficients at: 5) at: 1) rounded.\\\\n\\\\t1 to: (coefficients at: 1) size - 1 do: \\\\n\\\\t\\\\t[:i | \\\\n\\\\t\\\\t\\\\\\\"taylor series coefficients\\\\\\\"\\\\n\\\\t\\\\tx1 _ (coefficients at: 2) at: i.\\\\n\\\\t\\\\ty1 _ (coefficients at: 6) at: i.\\\\n\\\\t\\\\tx2 _ ((coefficients at: 3) at: i) / 2.0.\\\\n\\\\t\\\\ty2 _ ((coefficients at: 7) at: i) / 2.0.\\\\n\\\\t\\\\tx3 _ ((coefficients at: 4) at: i) / 6.0.\\\\n\\\\t\\\\ty3 _ ((coefficients at: 8) at: i) / 6.0.\\\\n\\\\t\\\\t\\\\\\\"guess n\\\\\\\"\\\\n\\\\t\\\\tn _ 5 max: (x2 abs + y2 abs * 2.0 + ((coefficients at: 3)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tat: i + 1) abs + ((coefficients at: 7)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tat: i + 1) abs / 100.0) rounded.\\\\n\\\\t\\\\t1 to: n - 1 do: \\\\n\\\\t\\\\t\\\\t[:j | \\\\n\\\\t\\\\t\\\\tt _ j asFloat / n.\\\\n\\\\t\\\\t\\\\tline endPoint: \\\\n\\\\t\\\\t\\\\t\\\\t(x3 * t + x2 * t + x1 * t + x) rounded \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t@ (y3 * t + y2 * t + y1 * t + y) rounded.\\\\n\\\\t\\\\t\\\\tline\\\\n\\\\t\\\\t\\\\t\\\\tdisplayOn: aDisplayMedium\\\\n\\\\t\\\\t\\\\t\\\\tat: aPoint\\\\n\\\\t\\\\t\\\\t\\\\tclippingBox: clipRect\\\\n\\\\t\\\\t\\\\t\\\\trule: anInteger\\\\n\\\\t\\\\t\\\\t\\\\tfillColor: aForm.\\\\n\\\\t\\\\t\\\\tline beginPoint: line endPoint].\\\\n\\\\t\\\\tline beginPoint: \\\\n\\\\t\\\\t\\\\t\\\\t(x _ (coefficients at: 1) at: i + 1) rounded \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t@ (y _ (coefficients at: 5) at: i + 1) rounded.\\\\n\\\\t\\\\tline\\\\n\\\\t\\\\t\\\\tdisplayOn: aDisplayMedium\\\\n\\\\t\\\\t\\\\tat: aPoint\\\\n\\\\t\\\\t\\\\tclippingBox: clipRect\\\\n\\\\t\\\\t\\\\trule: anInteger\\\\n\\\\t\\\\t\\\\tfillColor: aForm]! !\\\\n\\\\n!Spline methodsFor: 'displaying'!\\\\ndisplayOn: aDisplayMedium transformation: aTransformation clippingBox: clipRect rule: anInteger fillColor: aForm \\\\n\\\\t\\\\\\\"Get the scaled and translated path of newKnots.\\\\\\\"\\\\n\\\\n\\\\t| newKnots newSpline |\\\\n\\\\tnewKnots _ aTransformation applyTo: self.\\\\n\\\\tnewSpline _ Spline new.\\\\n\\\\tnewKnots do: [:knot | newSpline add: knot].\\\\n\\\\tnewSpline form: self form.\\\\n\\\\tnewSpline\\\\n\\\\t\\\\tdisplayOn: aDisplayMedium\\\\n\\\\t\\\\tat: 0 @ 0\\\\n\\\\t\\\\tclippingBox: clipRect\\\\n\\\\t\\\\trule: anInteger\\\\n\\\\t\\\\tfillColor: aForm! !\\\\n\\\\n\\\\n!Spline methodsFor: 'private'!\\\\nderivs: a first: point1 second: point2 third: point3\\\\n\\\\t\\\\\\\"Compute the first, second and third derivitives (in coefficients) from\\\\n\\\\tthe Points in this Path (coefficients at: 1 and coefficients at: 5).\\\\\\\"\\\\n\\\\n\\\\t| l v anArray |\\\\n\\\\tl _ a size.\\\\n\\\\tl < 2 ifTrue: [^self].\\\\n\\\\tl > 2\\\\n\\\\t  ifTrue:\\\\n\\\\t\\\\t[v _ Array new: l.\\\\n\\\\t\\\\t v  at:  1 put: 4.0.\\\\n\\\\t\\\\t anArray _ Array new: l.\\\\n\\\\t\\\\t anArray  at:  1 put: (6.0 * ((a  at:  1) - ((a  at:  2) * 2.0) + (a  at:  3))).\\\\n\\\\t\\\\t 2 to: l - 2 do:\\\\n\\\\t\\\\t\\\\t[:i | \\\\n\\\\t\\\\t\\\\tv  at:  i put: (4.0 - (1.0 / (v  at:  (i - 1)))).\\\\n\\\\t\\\\t\\\\tanArray\\\\n\\\\t\\\\t\\\\t\\\\tat:  i \\\\n\\\\t\\\\t\\\\t\\\\tput: (6.0 * ((a  at:  i) - ((a  at:  (i + 1)) * 2.0) + (a  at:  (i + 2)))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t- ((anArray  at:  (i - 1)) / (v  at:  (i - 1))))].\\\\n\\\\t\\\\t point2  at: (l - 1) put: ((anArray  at:  (l - 2)) / (v  at:  (l - 2))).\\\\n\\\\t\\\\t l - 2 to: 2 by: 0-1 do: \\\\n\\\\t\\\\t\\\\t[:i | \\\\n\\\\t\\\\t\\\\tpoint2 \\\\n\\\\t\\\\t\\\\t\\\\tat: i \\\\n\\\\t\\\\t\\\\t\\\\tput: ((anArray  at:  (i - 1)) - (point2  at:  (i + 1)) / (v  at:  (i - 1)))]].\\\\n\\\\tpoint2 at: 1 put: (point2  at:  l put: 0.0).\\\\n\\\\t1 to: l - 1 do:\\\\n\\\\t\\\\t[:i | point1 \\\\n\\\\t\\\\t\\\\t\\\\tat: i \\\\n\\\\t\\\\t\\\\t\\\\tput: ((a at: (i + 1)) - (a  at:  i) - \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t((point2  at:  i) * 2.0 + (point2  at:  (i + 1)) / 6.0)).\\\\n\\\\t\\\\t      point3 at: i put: ((point2  at:  (i + 1)) - (point2  at:  i))]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSpline class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!Spline class methodsFor: 'examples' stamp: '6/8/97 13:55 di'!\\\\nexample\\\\n\\\\t\\\\\\\"Designate points on the Path by clicking the red button. Terminate by\\\\n\\\\tpressing any other button. A curve will be displayed, through the\\\\n\\\\tselected points, using a long black form.\\\\\\\"\\\\n\\\\n\\\\t| splineCurve aForm flag|\\\\n\\\\taForm _ Form extent: 2@2.\\\\n\\\\taForm  fillBlack.\\\\n\\\\tsplineCurve _ Spline new.\\\\n\\\\tsplineCurve form: aForm.\\\\n\\\\tflag _ true.\\\\n\\\\t[flag] whileTrue:\\\\n\\\\t\\\\t[Sensor waitButton.\\\\n\\\\t\\\\t Sensor redButtonPressed\\\\n\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t[splineCurve add: Sensor waitButton. \\\\n\\\\t\\\\t\\\\t\\\\t Sensor waitNoButton.\\\\n\\\\t\\\\t\\\\t\\\\t aForm displayOn: Display at: splineCurve last]\\\\n\\\\t\\\\t\\\\tifFalse: [flag_false]].\\\\n\\\\tsplineCurve computeCurve.\\\\n\\\\tsplineCurve isEmpty \\\\n\\\\t\\\\tifFalse: [splineCurve displayOn: Display.\\\\n\\\\t\\\\t\\\\t\\\\tSensor waitNoButton].\\\\n \\\\n\\\\t\\\\\\\"Spline example\\\\\\\"! !\\\\nObject subclass: #SqNumberParser\\\\n\\\\tinstanceVariableNames: 'sourceStream base neg integerPart fractionPart exponent scale nDigits lastNonZero requestor failBlock'\\\\n\\\\tclassVariableNames: 'BelllerophonBase10'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Kernel-Numbers'!\\\\n!SqNumberParser commentStamp: 'nice 4/27/2006 22:38' prior: 0!\\\\nThis is a class specialized in parsing and building numbers.\\\\nNumber syntax should follow Smalltalk syntax.\\\\n\\\\nIf you have to read foreign number syntax, create a subclass.!\\\\n\\\\n\\\\n!SqNumberParser methodsFor: 'error' stamp: 'nice 4/28/2006 00:20'!\\\\nexpected: errorString \\\\n\\\\trequestor isNil\\\\n\\\\t\\\\tifFalse: [requestor\\\\n\\\\t\\\\t\\\\t\\\\tnotify: errorString , ' ->'\\\\n\\\\t\\\\t\\\\t\\\\tat: sourceStream position\\\\n\\\\t\\\\t\\\\t\\\\tin: sourceStream].\\\\n\\\\tself fail! !\\\\n\\\\n!SqNumberParser methodsFor: 'error' stamp: 'nice 4/28/2006 00:19'!\\\\nfail\\\\n\\\\tfailBlock isNil ifFalse: [^failBlock value].\\\\n\\\\tself error: 'Reading a number failed'! !\\\\n\\\\n\\\\n!SqNumberParser methodsFor: 'accessing' stamp: 'nice 4/27/2006 22:57'!\\\\nexponentLetters\\\\n\\\\t\\\\\\\"answer the list of possible exponents for Numbers.\\\\n\\\\tNote: this parser will not honour precision attached to the exponent.\\\\n\\\\tdifferent exponent do not lead to different precisions.\\\\n\\\\tonly IEEE 754 floating point numbers will be created\\\\\\\"\\\\n\\\\t\\\\n\\\\t^'edq'! !\\\\n\\\\n!SqNumberParser methodsFor: 'accessing' stamp: 'nice 5/1/2006 01:58'!\\\\nfailBlock: aBlockOrNil\\\\n\\\\tfailBlock := aBlockOrNil! !\\\\n\\\\n!SqNumberParser methodsFor: 'accessing' stamp: 'nice 5/1/2006 01:59'!\\\\nrequestor: anObjectOrNil\\\\n\\\\trequestor := anObjectOrNil! !\\\\n\\\\n\\\\n!SqNumberParser methodsFor: 'parsing-private' stamp: 'nice 5/7/2006 17:33'!\\\\nmakeFloatFromMantissa: m exponent: k base: aRadix \\\\n\\\\t\\\\\\\"Convert infinite precision arithmetic into Floating point.\\\\n\\\\tThis alogrithm rely on correct IEEE rounding mode\\\\n\\\\tbeing implemented in Integer>>asFloat and Fraction>>asFloat\\\\\\\"\\\\n\\\\n\\\\t^(k positive\\\\n\\\\t\\\\tifTrue: [m * (aRadix raisedTo: k)]\\\\n\\\\t\\\\tifFalse: [Fraction numerator: m denominator: (aRadix raisedTo: k negated)]) asFloat! !\\\\n\\\\n!SqNumberParser methodsFor: 'parsing-private' stamp: 'nice 4/28/2006 00:52'!\\\\nmakeIntegerOrScaledInteger\\\\n\\\\t\\\\\\\"at this point, there is no digit, nor fractionPart.\\\\n\\\\tmaybe it can be a scaled decimal with fraction omitted...\\\\\\\"\\\\n\\\\t\\\\n\\\\tneg\\\\n\\\\t\\\\tifTrue: [integerPart := integerPart negated].\\\\n\\\\tself readExponent\\\\n\\\\t\\\\tifTrue: [integerPart := integerPart\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t* (base raisedTo: exponent)]\\\\n\\\\t\\\\tifFalse: [self readScale\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [nil.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ ScaledDecimal newFromNumber: integerPart scale: scale]].\\\\n\\\\t^ integerPart! !\\\\n\\\\n!SqNumberParser methodsFor: 'parsing-private' stamp: 'nice 4/28/2006 01:14'!\\\\nreadExponent\\\\n\\\\t\\\\\\\"read the exponent if any (stored in instVar).\\\\n\\\\tAnswer true if found, answer false if none.\\\\n\\\\tIf exponent letter is not followed by a digit,\\\\n\\\\tthis is not considered as an error.\\\\n\\\\tExponent are always read in base 10, though i do not see why...\\\\\\\"\\\\n\\\\t\\\\n\\\\t| eneg |\\\\n\\\\texponent := 0.\\\\n\\\\tsourceStream atEnd\\\\n\\\\t\\\\tifTrue: [^ false].\\\\n\\\\t(self exponentLetters includes: sourceStream next)\\\\n\\\\t\\\\tifFalse: [sourceStream skip: -1.\\\\n\\\\t\\\\t\\\\t^ false].\\\\n\\\\teneg := sourceStream peekFor: $-.\\\\n\\\\texponent := self\\\\n\\\\t\\\\t\\\\t\\\\tnextUnsignedIntegerBase: 10\\\\n\\\\t\\\\t\\\\t\\\\tifFail: [sourceStream\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tskip: (eneg\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [-2]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [-1]).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ false].\\\\n\\\\teneg\\\\n\\\\t\\\\tifTrue: [exponent := exponent negated].\\\\n\\\\t^ true! !\\\\n\\\\n!SqNumberParser methodsFor: 'parsing-private' stamp: 'nice 4/28/2006 03:08'!\\\\nreadScale\\\\n\\\\t\\\\\\\"read the scale if any (stored in instVar).\\\\n\\\\tAnswer true if found, answer false if none.\\\\n\\\\tIf scale letter is not followed by a digit,\\\\n\\\\tthis is not considered as an error.\\\\n\\\\tScales are always read in base 10, though i do not see why...\\\\\\\"\\\\n\\\\t\\\\n\\\\tscale := 0.\\\\n\\\\tsourceStream atEnd ifTrue: [^ false].\\\\n\\\\t('s' includes: sourceStream next)\\\\n\\\\t\\\\tifFalse: [sourceStream skip: -1.\\\\n\\\\t\\\\t\\\\t^ false].\\\\n\\\\tscale := self\\\\n\\\\t\\\\t\\\\t\\\\tnextUnsignedIntegerBase: 10\\\\n\\\\t\\\\t\\\\t\\\\tifFail: [sourceStream skip: -1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ false].\\\\n\\\\t^ true! !\\\\n\\\\n\\\\n!SqNumberParser methodsFor: 'parsing-public' stamp: 'nice 4/27/2006 23:08'!\\\\nnextIntegerBase: aRadix\\\\n\\\\t\\\\\\\"Form an integer with following digits\\\\\\\"\\\\n\\\\t\\\\n\\\\t| isNeg value |\\\\n\\\\tisNeg := sourceStream peekFor: $-.\\\\n\\\\tvalue := self nextUnsignedIntegerBase: aRadix.\\\\n\\\\t^isNeg\\\\n\\\\t\\\\tifTrue: [value negated]\\\\n\\\\t\\\\tifFalse: [value]! !\\\\n\\\\n!SqNumberParser methodsFor: 'parsing-public' stamp: 'nice 4/28/2006 01:12'!\\\\nnextIntegerBase: aRadix ifFail: aBlock\\\\n\\\\t\\\\\\\"Form an integer with following digits\\\\\\\"\\\\n\\\\t\\\\n\\\\t| isNeg value |\\\\n\\\\tisNeg := sourceStream peekFor: $-.\\\\n\\\\tvalue := self nextUnsignedIntegerBase: aRadix ifFail: [^aBlock value].\\\\n\\\\t^isNeg\\\\n\\\\t\\\\tifTrue: [value negated]\\\\n\\\\t\\\\tifFalse: [value]! !\\\\n\\\\n!SqNumberParser methodsFor: 'parsing-public' stamp: 'nice 4/28/2006 03:38'!\\\\nnextNumber\\\\n\\\\t\\\\\\\"main method for reading a number.\\\\n\\\\tThis one can read Float Integer and ScaledDecimal\\\\\\\"\\\\n\\\\t\\\\n\\\\t| numberOfTrailingZeroInIntegerPart numberOfNonZeroFractionDigits mantissa decimalMultiplier decimalFraction value numberOfTrailingZeroInFractionPart |\\\\n\\\\t(sourceStream nextMatchAll: 'NaN')\\\\n\\\\t\\\\tifTrue: [^ Float nan].\\\\n\\\\tneg := sourceStream peekFor: $-.\\\\n\\\\t(sourceStream nextMatchAll: 'Infinity')\\\\n\\\\t\\\\tifTrue: [^ neg\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [Float infinity negated]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [Float infinity]].\\\\n\\\\tintegerPart := self nextUnsignedIntegerBase: base.\\\\n\\\\tnumberOfTrailingZeroInIntegerPart := nDigits - lastNonZero.\\\\n\\\\t(sourceStream peekFor: $r)\\\\n\\\\t\\\\tifTrue: [\\\\\\\"<base>r<integer>\\\\\\\"\\\\n\\\\t\\\\t\\\\t(base := integerPart) < 2\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [^ self expected: 'an integer greater than 1 as valid radix'].\\\\n\\\\t\\\\t\\\\t(sourceStream peekFor: $-)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [neg := neg not].\\\\n\\\\t\\\\t\\\\tintegerPart := self nextUnsignedIntegerBase: base.\\\\n\\\\t\\\\t\\\\tnumberOfTrailingZeroInIntegerPart := nDigits - lastNonZero].\\\\n\\\\t^ (sourceStream peekFor: $.)\\\\n\\\\t\\\\tifTrue: [fractionPart := self\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnextUnsignedIntegerBase: base\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFail: [sourceStream skip: -1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^ neg\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [integerPart negated]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [integerPart]].\\\\n\\\\t\\\\t\\\\tnumberOfNonZeroFractionDigits := lastNonZero.\\\\n\\\\t\\\\t\\\\tnumberOfTrailingZeroInFractionPart := nDigits - lastNonZero.\\\\n\\\\t\\\\t\\\\tself readExponent\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self readScale\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [decimalMultiplier := base raisedTo: numberOfNonZeroFractionDigits.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdecimalFraction := integerPart * decimalMultiplier + fractionPart / decimalMultiplier.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tneg\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [decimalFraction := decimalFraction negated].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^ ScaledDecimal newFromNumber: decimalFraction scale: scale]].\\\\n\\\\t\\\\t\\\\tfractionPart isZero\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [mantissa := integerPart\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t// (base raisedTo: numberOfTrailingZeroInIntegerPart).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\texponent := exponent + numberOfTrailingZeroInIntegerPart]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [mantissa := integerPart\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t* (base raisedTo: numberOfNonZeroFractionDigits) + (fractionPart // (base raisedTo: numberOfTrailingZeroInFractionPart)).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\texponent := exponent - numberOfNonZeroFractionDigits].\\\\n\\\\t\\\\t\\\\t\\\\\\\"very naive algorithm\\\\\\\"\\\\n\\\\t\\\\t\\\\tvalue := self makeFloatFromMantissa: mantissa exponent: exponent base: base.\\\\n\\\\t\\\\t\\\\t^ neg\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [value isZero\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [Float negativeZero]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [value negated]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [value]]\\\\n\\\\t\\\\tifFalse: [self makeIntegerOrScaledInteger]! !\\\\n\\\\n!SqNumberParser methodsFor: 'parsing-public' stamp: 'nice 4/28/2006 01:10'!\\\\nnextUnsignedIntegerBase: aRadix \\\\n\\\\t\\\\\\\"Form an unsigned integer with incoming digits from sourceStream.\\\\n\\\\tCount the number of digits and the lastNonZero digit and store int in\\\\n\\\\tinstVar \\\\\\\"\\\\n\\\\t\\\\n\\\\t^ self\\\\n\\\\t\\\\tnextUnsignedIntegerBase: aRadix\\\\n\\\\t\\\\tifFail: [self expected: 'a digit between 0 and 9']! !\\\\n\\\\n!SqNumberParser methodsFor: 'parsing-public' stamp: 'nice 4/28/2006 03:14'!\\\\nnextUnsignedIntegerBase: aRadix ifFail: errorBlock\\\\n\\\\t\\\\\\\"Form an unsigned integer with incoming digits from sourceStream.\\\\n\\\\tCount the number of digits and the lastNonZero digit and store int in instVar\\\\\\\"\\\\n\\\\t\\\\n\\\\t| value digit |\\\\n\\\\tvalue := 0.\\\\n\\\\tnDigits := 0.\\\\n\\\\tlastNonZero := 0.\\\\n\\\\t[sourceStream atEnd\\\\n\\\\t\\\\tor: [digit := sourceStream next digitValue.\\\\n\\\\t\\\\t\\\\t(digit < 0\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tor: [digit >= aRadix])\\\\n\\\\t\\\\t\\\\t\\\\tand: [sourceStream skip: -1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttrue]]]\\\\n\\\\t\\\\twhileFalse: [nDigits := nDigits + 1.\\\\n\\\\t\\\\t\\\\tdigit isZero\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [lastNonZero := nDigits].\\\\n\\\\t\\\\t\\\\tvalue := value * aRadix + digit].\\\\n\\\\tnDigits = 0\\\\n\\\\t\\\\tifTrue: [errorBlock value].\\\\n\\\\t^value! !\\\\n\\\\n\\\\n!SqNumberParser methodsFor: 'initialize-release' stamp: 'nice 5/1/2006 00:41'!\\\\non: aStringOrStream\\\\n\\\\tsourceStream := aStringOrStream isString\\\\n\\\\t\\\\tifTrue: [ReadStream on: aStringOrStream]\\\\n\\\\t\\\\tifFalse: [aStringOrStream].\\\\n\\\\tbase := 10.\\\\n\\\\tneg := false.\\\\n\\\\tintegerPart := fractionPart := exponent := scale := 0.\\\\n\\\\trequestor := failBlock := nil.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSqNumberParser class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SqNumberParser class methodsFor: 'instance creation' stamp: 'nice 5/1/2006 00:45'!\\\\non: aStringOrStream\\\\n\\\\t^self new on: aStringOrStream! !\\\\n\\\\n!SqNumberParser class methodsFor: 'instance creation' stamp: 'nice 5/1/2006 02:02'!\\\\nparse: aStringOrStream \\\\n\\\\t^(self new)\\\\n\\\\t\\\\ton: aStringOrStream;\\\\n\\\\t\\\\tnextNumber! !\\\\n\\\\n!SqNumberParser class methodsFor: 'instance creation' stamp: 'nice 5/1/2006 02:02'!\\\\nparse: aStringOrStream onError: failBlock \\\\n\\\\t^(self new)\\\\n\\\\t\\\\ton: aStringOrStream;\\\\n\\\\t\\\\tfailBlock: failBlock;\\\\n\\\\t\\\\tnextNumber! !\\\\nClassTestCase subclass: #SqNumberParserTest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'KernelTests-Numbers'!\\\\n!SqNumberParserTest commentStamp: 'nice 5/7/2006 17:54' prior: 0!\\\\nProvide tests for new clas aimed at parsing numbers.\\\\n\\\\nIt duplicates NumberParsingTest, with few more tests.!\\\\n\\\\n\\\\n!SqNumberParserTest methodsFor: 'tests - Float' stamp: 'nice 5/7/2006 17:46'!\\\\ntestFloatFromStreamAsNumber\\\\n\\\\t\\\\\\\"This covers parsing in Number>>readFrom:\\\\\\\"\\\\n\\\\n\\\\t| rs aFloat |\\\\n\\\\trs := '10r-12.3456' readStream.\\\\n\\\\taFloat := SqNumberParser parse: rs.\\\\n\\\\tself assert: -12.3456 = aFloat.\\\\n\\\\tself assert: rs atEnd.\\\\n\\\\n\\\\trs := '10r-12.3456e2' readStream.\\\\n\\\\taFloat := SqNumberParser parse: rs.\\\\n\\\\tself assert: -1234.56 = aFloat.\\\\n\\\\tself assert: rs atEnd.\\\\n\\\\n\\\\trs := '10r-12.3456e2e2' readStream.\\\\n\\\\taFloat := SqNumberParser parse: rs.\\\\n\\\\tself assert: -1234.56 = aFloat.\\\\n\\\\tself assert: rs upToEnd = 'e2'.\\\\n\\\\n\\\\trs := '10r-12.3456d2' readStream.\\\\n\\\\taFloat := SqNumberParser parse: rs.\\\\n\\\\tself assert: -1234.56 = aFloat.\\\\n\\\\tself assert: rs atEnd.\\\\n\\\\n\\\\trs := '10r-12.3456q2' readStream.\\\\n\\\\taFloat := SqNumberParser parse: rs.\\\\n\\\\tself assert: -1234.56 = aFloat.\\\\n\\\\tself assert: rs atEnd.\\\\n\\\\n\\\\trs := '-12.3456q2' readStream.\\\\n\\\\taFloat := SqNumberParser parse: rs.\\\\n\\\\tself assert: -1234.56 = aFloat.\\\\n\\\\tself assert: rs atEnd.\\\\n\\\\n\\\\trs := '12.3456q2' readStream.\\\\n\\\\taFloat := SqNumberParser parse: rs.\\\\n\\\\tself assert: 1234.56 = aFloat.\\\\n\\\\tself assert: rs atEnd.\\\\n\\\\n\\\\trs := '12.3456z2' readStream.\\\\n\\\\taFloat := SqNumberParser parse: rs.\\\\n\\\\tself assert: 12.3456 = aFloat.\\\\n\\\\tself assert: rs upToEnd = 'z2'.\\\\n! !\\\\n\\\\n!SqNumberParserTest methodsFor: 'tests - Float' stamp: 'nice 5/7/2006 17:46'!\\\\ntestFloatFromStreamWithExponent\\\\n\\\\t\\\\\\\"This covers parsing in Number>>readFrom:\\\\\\\"\\\\n\\\\n\\\\t| rs aFloat |\\\\n\\\\trs := '1.0e-14' readStream.\\\\n\\\\taFloat := SqNumberParser parse: rs.\\\\n\\\\tself assert: 1.0e-14 = aFloat.\\\\n\\\\tself assert: rs atEnd.\\\\n\\\\n\\\\trs := '1.0e-14 1' readStream.\\\\n\\\\taFloat := SqNumberParser parse: rs.\\\\n\\\\tself assert: 1.0e-14 = aFloat.\\\\n\\\\tself assert: rs upToEnd = ' 1'.\\\\n\\\\n\\\\trs := '1.0e-14eee' readStream.\\\\n\\\\taFloat := SqNumberParser parse: rs.\\\\n\\\\tself assert: 1.0e-14 = aFloat.\\\\n\\\\tself assert: rs upToEnd = 'eee'.\\\\n\\\\n\\\\trs := '1.0e14e10' readStream.\\\\n\\\\taFloat := SqNumberParser parse: rs.\\\\n\\\\tself assert: 1.0e14 = aFloat.\\\\n\\\\tself assert: rs upToEnd = 'e10'.\\\\n\\\\n\\\\trs := '1.0e+14e' readStream. \\\\\\\"Plus sign is not parseable\\\\\\\"\\\\n\\\\taFloat := SqNumberParser parse: rs.\\\\n\\\\tself assert: 1.0 = aFloat.\\\\n\\\\tself assert: rs upToEnd = 'e+14e'.\\\\n\\\\n\\\\trs := '1.0e' readStream.\\\\n\\\\taFloat := SqNumberParser parse: rs.\\\\n\\\\tself assert: 1.0 = aFloat.\\\\n\\\\tself assert: rs upToEnd = 'e'.! !\\\\n\\\\n!SqNumberParserTest methodsFor: 'tests - Float' stamp: 'nice 5/1/2006 00:40'!\\\\ntestFloatPrintString\\\\n\\\\t\\\\\\\"self debug: #testFloatPrintString\\\\\\\"\\\\n\\\\t\\\\n\\\\t| f r |\\\\n\\\\tf := Float basicNew: 2.\\\\n\\\\tr := Random new seed: 1234567.\\\\n\\\\t100\\\\n\\\\t\\\\ttimesRepeat: [f basicAt: 1 put: (r nextInt: 16r100000000)- 1.\\\\n\\\\t\\\\t\\\\tf basicAt: 2 put: (r nextInt: 16r100000000) - 1.\\\\n\\\\t\\\\t\\\\t#(2 8 10 16)\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:base | | str |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstr := (String new: 64) writeStream.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tf negative ifTrue: [str nextPut: $-].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstr print: base; nextPut: $r.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tf absPrintExactlyOn: str base: base.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself assert: (SqNumberParser parse: str contents) = f]].\\\\n\\\\t\\\\\\\"test big num near infinity\\\\\\\"\\\\n\\\\t10\\\\n\\\\t\\\\ttimesRepeat: [f basicAt: 1 put: 16r7FE00000 + ((r nextInt: 16r100000) - 1).\\\\n\\\\t\\\\t\\\\tf basicAt: 2 put: (r nextInt: 16r100000000) - 1.\\\\n\\\\t\\\\t\\\\t#(2 8 10 16)\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:base | | str |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstr := (String new: 64) writeStream.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tf negative ifTrue: [str nextPut: $-].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstr print: base; nextPut: $r.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tf absPrintExactlyOn: str base: base.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself assert: (SqNumberParser parse: str contents) = f]].\\\\n\\\\t\\\\\\\"test infinitesimal (gradual underflow)\\\\\\\"\\\\n\\\\t10\\\\n\\\\t\\\\ttimesRepeat: [f basicAt: 1 put: 0 + ((r nextInt: 16r100000) - 1).\\\\n\\\\t\\\\t\\\\tf basicAt: 2 put: (r nextInt: 16r100000000) - 1.\\\\n\\\\t\\\\t\\\\t#(2 8 10 16)\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:base | | str |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstr := (String new: 64) writeStream.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tf negative ifTrue: [str nextPut: $-].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstr print: base; nextPut: $r.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tf absPrintExactlyOn: str base: base.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself assert: (SqNumberParser parse: str contents) = f]].! !\\\\n\\\\n!SqNumberParserTest methodsFor: 'tests - Float' stamp: 'nice 5/1/2006 00:40'!\\\\ntestFloatReadError\\\\n\\\\t\\\\\\\"This covers parsing in Number>>readFrom:\\\\\\\"\\\\n\\\\n\\\\t| rs num |\\\\n\\\\trs := '1e' readStream.\\\\n\\\\tnum := SqNumberParser parse: rs.\\\\n\\\\tself assert: 1 = num.\\\\n\\\\tself assert: rs upToEnd = 'e'.\\\\n\\\\t\\\\n\\\\trs := '1s' readStream.\\\\n\\\\tnum := SqNumberParser parse: rs.\\\\n\\\\tself assert: 1 = num.\\\\n\\\\tself assert: rs upToEnd = 's'.\\\\n\\\\n\\\\trs := '1.' readStream.\\\\n\\\\tnum := SqNumberParser parse: rs.\\\\n\\\\tself assert: 1 = num.\\\\n\\\\tself assert: num isInteger.\\\\n\\\\tself assert: rs upToEnd = '.'.\\\\n\\\\t\\\\n\\\\trs := '' readStream.\\\\n\\\\tself should: [SqNumberParser parse: rs] raise: Error.\\\\n\\\\t\\\\n\\\\trs := 'foo' readStream.\\\\n\\\\tself should: [SqNumberParser parse: rs] raise: Error.\\\\n\\\\n\\\\trs := 'radix' readStream.\\\\n\\\\tself should: [SqNumberParser parse: rs] raise: Error.\\\\n\\\\t\\\\n\\\\trs := '.e0' readStream.\\\\n\\\\tself should: [SqNumberParser parse: rs] raise: Error.\\\\n\\\\t\\\\n\\\\trs := '-.e0' readStream.\\\\n\\\\tself should: [SqNumberParser parse: rs] raise: Error.\\\\n\\\\t\\\\n\\\\trs := '--1' readStream.\\\\n\\\\tself should: [SqNumberParser parse: rs] raise: Error.! !\\\\n\\\\n!SqNumberParserTest methodsFor: 'tests - Float' stamp: 'nice 5/7/2006 17:46'!\\\\ntestFloatReadWithRadix\\\\n\\\\t\\\\\\\"This covers parsing in Number>>readFrom:\\\\n\\\\tNote: In most Smalltalk dialects, the radix notation is not used for numbers\\\\n\\\\twith exponents. In Squeak, a string with radix and exponent can be parsed,\\\\n\\\\tand the exponent is always treated as base 10 (not the base indicated in the\\\\n\\\\tradix prefix). I am not sure if this is a feature, a bug, or both, but the\\\\n\\\\tSqueak behavior is documented in this test. -dtl\\\\\\\"\\\\n\\\\n\\\\t| aNumber rs |\\\\n\\\\taNumber := '2r1.0101e9' asNumber.\\\\n\\\\tself assert: 672.0 = aNumber.\\\\n\\\\tself assert: (SqNumberParser parse: '2r1.0101e9') = (1.3125 * (2 raisedTo: 9)).\\\\n\\\\trs := ReadStream on: '2r1.0101e9e9'.\\\\n\\\\tself assert: (SqNumberParser parse: rs) = 672.0.\\\\n\\\\tself assert: rs upToEnd = 'e9'\\\\n! !\\\\n\\\\n\\\\n!SqNumberParserTest methodsFor: 'tests - Integer' stamp: 'nice 5/7/2006 17:46'!\\\\ntestIntegerReadFrom\\\\n\\\\t\\\\\\\"Ensure remaining characters in a stream are not lost when parsing an integer.\\\\\\\"\\\\n\\\\n\\\\t| rs i s |\\\\n\\\\trs := ReadStream on: '123s could be confused with a ScaledDecimal'.\\\\n\\\\ti := SqNumberParser parse: rs.\\\\n\\\\tself assert: i == 123.\\\\n\\\\ts := rs upToEnd.\\\\n\\\\tself assert: 's could be confused with a ScaledDecimal' = s.\\\\n\\\\trs := ReadStream on: '123.s could be confused with a ScaledDecimal'.\\\\n\\\\ti := SqNumberParser parse: rs.\\\\n\\\\tself assert: i == 123.\\\\n\\\\ts := rs upToEnd.\\\\n\\\\tself assert: '.s could be confused with a ScaledDecimal' = s\\\\n! !\\\\n\\\\n!SqNumberParserTest methodsFor: 'tests - Integer' stamp: 'nice 5/7/2006 17:46'!\\\\ntestIntegerReadWithRadix\\\\n\\\\t\\\\\\\"This covers parsing in Number>>readFrom:\\\\n\\\\tNote: In most Smalltalk dialects, the radix notation is not used for numbers\\\\n\\\\twith exponents. In Squeak, a string with radix and exponent can be parsed,\\\\n\\\\tand the exponent is always treated as base 10 (not the base indicated in the\\\\n\\\\tradix prefix). I am not sure if this is a feature, a bug, or both, but the\\\\n\\\\tSqueak behavior is documented in this test. -dtl\\\\\\\"\\\\n\\\\n\\\\t| aNumber rs |\\\\n\\\\taNumber := '2r1e26' asNumber.\\\\n\\\\tself assert: 67108864 = aNumber.\\\\n\\\\tself assert: (SqNumberParser parse: '2r1e26') = (2 raisedTo: 26).\\\\n\\\\trs := '2r1e26eee' readStream.\\\\n\\\\tself assert: (SqNumberParser parse: rs) = 67108864.\\\\n\\\\tself assert: rs upToEnd = 'eee'\\\\n! !\\\\nObject subclass: #SqueakPage\\\\n\\\\tinstanceVariableNames: 'url title comment thumbnail contentsMorph creationTime creationAuthor lastChangeTime lastChangeAuthor policy dirty'\\\\n\\\\tclassVariableNames: 'MaxThumbnailWidthOrHeight RecentMaxNum RecentStem'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-SqueakPage'!\\\\n!SqueakPage commentStamp: '<historical>' prior: 0!\\\\nA SqueakPage is holder for a page of morphs that live on the disk or on a server.\\\\nA URLMorph is a thumbnail sized stand-in for the page.  Clicking on it gets the page.\\\\nAn ObjectOut is a fake object that stands for an object that is out on the disk.  (Like ObjectTracer or ObjectViewer.)\\\\nA MorphObjectOut is a subclass that stands for a Morph that is out on the disk.\\\\n\\\\nTo find out how to make the pages of any BookMorph go out to the disk (or a server), see \\\\thttp://minnow.cc.gatech.edu/SqueakDoc.1 then go to 'SqueakPages'.\\\\n\\\\nA SqueakPage is always in-memory.  Its contentsMorph will be 'become-ed' to a MorphObjectOut tombstone when it goes out.  (A page may or may not be in the cache.  First put it in, then ask it for the data.)  Sending any message to the contentsMorph triggers the fetch.  Many URLMorphs may hold onto one page.  A page has a thumbnail.  A URLMorph points at its page object.\\\\n\\\\nStates of a SqueakPage, and the transitions to another state:\\\\n1) have a url as a string.  Then: (URLMorph grabURL: 'file://Ted''s/books/tryThis/p1').  \\\\n\\\\tDrop it into any morph.\\\\n2) have a URLMorph, with page==nil.     Click it.  (makes an empty page, installs \\\\n\\\\tit in the global page cache)\\\\n3) have a URLMorph with a SqueakPage, with contentsMorph==nil, \\\\n\\\\tbut page is not in the cache (this is a rare case).  ask page contentsMorph.\\\\n4) OUT: have a URLMorph with a SqueakPage, with contentsMorph being a MorphObjectOut, \\\\n\\\\tand its page is in the cache.  Sending the contentsMorph any message brings it in and\\\\n\\\\tbecomes it to the morph.  (fix up morph's pointer to the page.)\\\\n5) Totally IN:  a morph, owned by a SqueakPage, has a page in the cache.  \\\\n\\\\tThe morph is clean.   \\\\n\\\\tWhenever someone triggers a purge (when?), contentsMorph is becomed\\\\n\\\\tto a MorphObjectOut. (go to 4)\\\\n\\\\tCausing the morph to execute layoutChanged marks the morph as dirty.\\\\n\\\\t(morph's property #pageDirty is set to true) (go to 6)\\\\n6) Totally IN and dirty.  \\\\n\\\\tWhenever any other page is fetched from the disk or the net, all other \\\\n\\\\tdirty pages are written and marked clean.  (go to 5)\\\\n\\\\nNote that the entire tree of submorphs goes out -- hundreds of objects.  Bringing the object back in brings in the SqueakPage, installs it in the cache.  Classes other than PasteUpMorph can easily be made to send their contents out if there is any need.\\\\n\\\\nNote that every book is now automatically a WebBook.  We simply give a page a url and tell it to purge.\\\\n\\\\nurl\\\\t\\\\ta string\\\\ntitle\\\\t\\\\t\\\\ncomment\\\\t\\\\t\\\\nthumbnail\\\\t\\\\t\\\\ncontentsMorph\\\\t\\\\t(1) a pasteUpMorph with other morphs in it.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(2) a MorphObjectOut.  Sending any message brings it in. \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(3) nil if the page has never been in this image.\\\\ncreationTime\\\\t\\\\t\\\\ncreationAuthor\\\\t\\\\t\\\\nlastChangeTime\\\\t\\\\t\\\\nlastChangeAuthor \\\\npolicy\\\\t\\\\t#alwaysWrite, #neverWrite, #ask.  (cache can override with a global policy)\\\\n\\\\t\\\\t\\\\t(Explicit writing by user has policy #neverWrite)\\\\ndirty \\\\t\\\\t(Morph>>layoutChanged sends changed: #SqueakPage. If policy==#check, \\\\n\\\\t\\\\t\\\\t\\\\tthen the page sets dirty_true.)\\\\n\\\\t\\\\t\\\\t(If policy==#alwaysWrite, then set dirty when the page is retrieved from the cache.)\\\\n\\\\nClass MorphObjectOut has an instance variable called page.\\\\nAll messages to an MorphObjectOut cause it to be brought in.  Except the messages needed to write the MorphObjectOut on the disk as part of a parent's being sent out.  (size, class, instSize, instVar:at:.  Can rename these and call from its own version of the writing routine.)\\\\n\\\\tTo purge, go through the clean pages, and any that have world not equal to this world, entomb them.  \\\\n\\\\t(If an object in the subtree is held by an object outside the tree, it will remain,  And will be duplicated when the tree comes back in.  This is a problem already in normal uses of SmartRefStream.)\\\\n\\\\n\\\\n!\\\\n\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'tk 2/5/1999 16:47'!\\\\nasMorph\\\\n\\\\t^ self fetchContents! !\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'jm 6/16/1998 13:47'!\\\\ncomment\\\\n\\\\n\\\\tcomment ifNil: [^ ''] ifNotNil: [^ comment].\\\\n! !\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'jm 6/16/1998 18:12'!\\\\ncomment: aString\\\\n\\\\n\\\\taString isEmpty\\\\n\\\\t\\\\tifTrue: [comment _ nil]\\\\n\\\\t\\\\tifFalse: [comment _ aString].\\\\n! !\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'tk 10/2/1998 11:27'!\\\\ncontentsMorph\\\\n\\\\t\\\\\\\"Return what it is now.  If the morph is out on the disk, return nil.  Use fetchContents to get the data for sure.\\\\\\\"\\\\n\\\\n\\\\t^ contentsMorph\\\\n! !\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'tk 11/11/1998 12:54'!\\\\ncontentsMorph: aPasteUpMorph\\\\n\\\\n\\\\tcontentsMorph _ aPasteUpMorph! !\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'tk 2/23/1999 14:39'!\\\\ncopyForSaving\\\\n\\\\t\\\\\\\"Make a copy and configure me to be put out on the disk.  When it is brought in and touched, it will turn into the object at the url.\\\\\\\"\\\\n\\\\n\\\\t| forDisk holder |\\\\n\\\\tforDisk _ self clone.\\\\n\\\\tholder _ MorphObjectOut new xxxSetUrl: url page: forDisk.\\\\n\\\\tforDisk contentsMorph: holder.\\\\n\\\\t^ holder\\\\t\\\\t\\\\\\\"directly representing the object\\\\\\\"! !\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'tk 10/30/1998 15:08'!\\\\nfetchContents\\\\n\\\\t\\\\\\\"Make every effort to get contentsMorph.\\\\\\\"\\\\n\\\\n\\\\tself isContentsInMemory ifTrue: [^ contentsMorph].\\\\n\\\\t^ self fetchInformIfError! !\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'ar 4/10/2005 18:52'!\\\\nfetchContentsIfAbsent: failBlock\\\\n\\\\t\\\\\\\"Make every effort to get contentsMorph.  Assume I am in the cache already.\\\\\\\"\\\\n\\\\t| strm page temp temp2 |\\\\n\\\\tSqueakPageCache write.\\\\t\\\\t\\\\\\\"sorry about the pause\\\\\\\"\\\\n\\\\tCursor wait showWhile: [\\\\n\\\\t\\\\tstrm _ (ServerFile new fullPath: url) asStream].\\\\n\\\\tstrm isString ifTrue: [^ failBlock value].\\\\t\\\\t\\\\n\\\\tpage _ strm fileInObjectAndCode.\\\\n\\\\tpage isMorph ifTrue: [contentsMorph _ page].\\\\t\\\\\\\"may be a bare morph\\\\\\\"\\\\n\\\\t\\\\\\\"copy over the state\\\\\\\"\\\\n\\\\ttemp _ url.\\\\n\\\\ttemp2 _ policy.\\\\n\\\\tself copyAddedStateFrom: page.\\\\n\\\\turl _ temp.\\\\t\\\\\\\"don't care what it says\\\\\\\"\\\\n\\\\ttemp2 ifNotNil: [policy _ temp2].\\\\t\\\\t\\\\\\\"use mine\\\\\\\"\\\\n\\\\tcontentsMorph setProperty: #pageDirty toValue: nil.\\\\n\\\\tself dirty: false.\\\\n\\\\t^ contentsMorph! !\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'ar 4/10/2005 18:52'!\\\\nfetchInformIfError\\\\n\\\\t\\\\\\\"Make every effort to get contentsMorph.  Put up a good notice if can't get it.  Assume page is in the cache already.  Overwrite the contentsMorph no matter what.\\\\\\\"\\\\n\\\\t| strm page temp temp2 |\\\\n\\\\n\\\\tSqueakPageCache write.\\\\t\\\\t\\\\\\\"sorry about the pause\\\\\\\"\\\\n\\\\tCursor wait showWhile: [\\\\n\\\\t\\\\tstrm _ (ServerFile new fullPath: url) asStream].\\\\n\\\\tstrm isString ifTrue: [self inform: 'Sorry, ',strm. ^ nil].\\\\t\\\\\\\"<<<<< Note Diff\\\\\\\"\\\\n\\\\t(url beginsWith: 'file:') ifTrue: [Transcript show: 'Fetching  ', url; cr].\\\\t\\\\n\\\\tpage _ strm fileInObjectAndCode.\\\\n\\\\tpage isMorph \\\\n\\\\t\\\\tifTrue: [contentsMorph _ page]\\\\t\\\\\\\"may be a bare morph\\\\\\\"\\\\n\\\\t\\\\tifFalse: [\\\\\\\"copy over the state\\\\\\\"\\\\n\\\\t\\\\t\\\\ttemp _ url.\\\\n\\\\t\\\\t\\\\ttemp2 _ policy.\\\\n\\\\t\\\\t\\\\tself copyFrom: page.\\\\t\\\\\\\"including contentsMorph\\\\\\\"\\\\n\\\\t\\\\t\\\\turl _ temp.\\\\t\\\\\\\"I know best!!\\\\\\\"\\\\n\\\\t\\\\t\\\\ttemp2 ifNotNil: [policy _ temp2]].\\\\t\\\\t\\\\\\\"use mine\\\\\\\"\\\\n\\\\tcontentsMorph setProperty: #pageDirty toValue: nil.\\\\n\\\\tcontentsMorph setProperty: #SqueakPage toValue: self.\\\\n\\\\tself dirty: false.\\\\n\\\\t^ contentsMorph! !\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'tk 10/30/1998 15:08'!\\\\nisContentsInMemory\\\\n\\\\t\\\\\\\"Is my contentsMorph in memory, or is it an ObjectOut tombstone?  Be careful not to send it any message.\\\\\\\"\\\\n\\\\n\\\\t^ (contentsMorph xxxClass inheritsFrom: Object) and: [(contentsMorph == nil) not]! !\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'tk 12/4/1998 01:00'!\\\\nlastChangeTime\\\\n\\\\t^ lastChangeTime! !\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'tk 2/24/1999 12:06'!\\\\nsaveMorph: aMorph author: authorString\\\\n\\\\t\\\\\\\"Save the given morph as this page's contents. Update its thumbnail and inform references to this URL that the page has changed.\\\\\\\"\\\\n\\\\t\\\\\\\"Details: updateThumbnail releases the cached state of the saved page contents after computing the thumbnail.\\\\\\\"\\\\n\\\\n\\\\t| n |\\\\n\\\\tcontentsMorph _ aMorph.\\\\n\\\\tn _ aMorph knownName.\\\\n\\\\tn ifNotNil: [self title: n].\\\\n\\\\tcreationAuthor ifNil: [\\\\n\\\\t\\\\tcreationAuthor _ authorString.\\\\n\\\\t\\\\tcreationTime _ Time totalSeconds].\\\\n\\\\\\\"\\\\tlastChangeAuthor _ authorString.\\\\n\\\\tlastChangeTime _ Time totalSeconds.\\\\tdo it when actually write\\\\\\\"\\\\n\\\\tself computeThumbnail.\\\\n\\\\tself postChangeNotification.\\\\n! !\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'jm 6/16/1998 17:45'!\\\\nthumbnail\\\\n\\\\n\\\\t^ thumbnail\\\\n! !\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'jm 6/16/1998 13:47'!\\\\ntitle\\\\n\\\\n\\\\ttitle ifNil: [^ ''] ifNotNil: [^ title].\\\\n! !\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'jm 6/16/1998 18:12'!\\\\ntitle: aString\\\\n\\\\n\\\\taString isEmpty\\\\n\\\\t\\\\tifTrue: [title _ nil]\\\\n\\\\t\\\\tifFalse: [title _ aString].\\\\n! !\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'tk 11/4/1998 20:34'!\\\\nurl\\\\n\\\\n\\\\t^ url! !\\\\n\\\\n!SqueakPage methodsFor: 'accessing' stamp: 'tk 1/14/1999 23:50'!\\\\nurl: aString\\\\n\\\\n\\\\t| sd |\\\\n\\\\taString isEmpty ifTrue: [url _ nil. ^ self].\\\\n\\\\n\\\\t\\\\\\\"Expand ./ and store as an absolute url\\\\\\\"\\\\n\\\\tsd _ ServerFile new.\\\\n\\\\tsd fullPath: aString.\\\\n\\\\turl _ sd realUrl.! !\\\\n\\\\n\\\\n!SqueakPage methodsFor: 'saving' stamp: 'tk 9/30/1998 22:40'!\\\\ndirty: aBool\\\\n\\\\tdirty _ aBool! !\\\\n\\\\n!SqueakPage methodsFor: 'saving' stamp: 'tk 10/8/1998 13:18'!\\\\npolicy\\\\n\\\\t^ policy! !\\\\n\\\\n!SqueakPage methodsFor: 'saving' stamp: 'tk 9/30/1998 22:39'!\\\\npolicy: aSymbol\\\\n\\\\tpolicy _ aSymbol! !\\\\n\\\\n!SqueakPage methodsFor: 'saving' stamp: 'ar 3/17/2001 23:36'!\\\\nprePurge\\\\n\\\\t\\\\\\\"Return self if ready to be purged, or nil if not\\\\\\\"\\\\n\\\\n\\\\tself isContentsInMemory ifFalse: [^ nil].\\\\n\\\\tcontentsMorph ifNil: [^ nil].  \\\\\\\"out already\\\\\\\"\\\\n\\\\turl ifNil: [^ nil].\\\\t\\\\\\\"just to be safe\\\\\\\"\\\\n\\\\t^ (World ~~ nil and: [contentsMorph world == World]) \\\\n\\\\t\\\\tifTrue: [nil \\\\\\\"showing now\\\\\\\"] ifFalse: [self]! !\\\\n\\\\n!SqueakPage methodsFor: 'saving' stamp: 'tk 12/16/1998 08:24'!\\\\npurge\\\\n\\\\t\\\\\\\"Replace my morph with a tombstone, if I am not in a world that is being shown.\\\\\\\"\\\\n\\\\n\\\\t(self prePurge) ifNotNil: [\\\\n\\\\t\\\\tcontentsMorph become: (MorphObjectOut new xxxSetUrl: url page: self)].\\\\n\\\\t\\\\t\\\\\\\"Simple, isn't it!!\\\\\\\"! !\\\\n\\\\n!SqueakPage methodsFor: 'saving' stamp: 'tk 1/23/1999 13:19'!\\\\nurlNoOverwrite: suggested\\\\n\\\\t\\\\\\\"Look in the directory.  If there is a file of this name, create a new name.  Keep track of highest numbers used as a hint.\\\\\\\"\\\\n\\\\n\\\\t| dir ll stem num local trial suffix |\\\\n\\\\t(suggested endsWith: '.sp') ifTrue: [suffix _ '.sp'].\\\\n\\\\t(suggested endsWith: '.bo') ifTrue: [suffix _ '.bo'].\\\\n\\\\tsuffix ifNil: [self error: 'unknown suffix'].\\\\n\\\\tdir _ ServerFile new fullPath: suggested.\\\\n\\\\t(dir includesKey: dir fileName) ifFalse: [^ url _ suggested].\\\\n\\\\t\\\\\\\"File already exists!!  Create a new name\\\\\\\"\\\\n\\\\t\\\\\\\"Find the stem file name\\\\\\\"\\\\n\\\\tstem _ SqueakPage stemUrl: suggested.\\\\n\\\\tnum _ stem = RecentStem ifTrue: [RecentMaxNum+1] ifFalse: [1].\\\\n\\\\n\\\\tlocal _ dir fileName.\\\\t\\\\\\\"ugh, take stem again...\\\\\\\"\\\\n\\\\tll _ local findLast: [:char | char == $.].\\\\n\\\\tll = 0 ifFalse: [local _ local copyFrom: 1 to: ll-1].\\\\t\\\\\\\"remove .sp\\\\\\\"\\\\n\\\\tlocal _ (local splitInteger) at: 1.\\\\t\\\\t\\\\\\\"remove trailing number\\\\\\\"\\\\n\\\\tlocal last == $x ifFalse: [local _ local , 'x'].\\\\n\\\\t[trial _ local, num printString, suffix.\\\\n\\\\t\\\\tdir includesKey: trial] whileTrue: [num _ num + 1].\\\\n\\\\tRecentStem _ stem.  RecentMaxNum _ num.\\\\n\\\\t^ url _ stem, 'x', num printString, suffix! !\\\\n\\\\n!SqueakPage methodsFor: 'saving' stamp: 'RAA 8/30/2000 11:43'!\\\\nwrite\\\\n\\\\t\\\\\\\"Decide whether to write this page on the disk.\\\\\\\"\\\\n\\\\t| sf remoteFile |\\\\n\\\\tpolicy == #neverWrite ifTrue: [^ self].\\\\n\\\\t\\\\t\\\\\\\"demo mode, or write only when user explicitly orders it\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"All other policies do write:   #now\\\\\\\"\\\\n\\\\tcontentsMorph ifNil: [^ self].\\\\n\\\\tdirty _ dirty | ((contentsMorph valueOfProperty: #pageDirty) == true).\\\\n\\\\t\\\\t\\\\\\\"set by layoutChanged\\\\\\\"\\\\n\\\\tdirty == true ifTrue: [ \\\\n\\\\t\\\\tsf _ ServerDirectory new fullPath: url.\\\\n\\\\t\\\\t\\\\\\\"check for shared password\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"contentsMorph allMorphsDo: [:m | m prepareToBeSaved].\\\\n\\\\t\\\\t\\\\t\\\\tdone in objectToStoreOnDataStream\\\\\\\"\\\\n\\\\t\\\\tlastChangeAuthor _ Utilities authorInitialsPerSe ifNil: ['*'].\\\\n\\\\t\\\\tlastChangeTime _ Time totalSeconds.\\\\n\\\\t\\\\tCursor wait showWhile: [\\\\n\\\\t\\\\t\\\\tremoteFile _ sf fileNamed: url.\\\\t\\\\\\\"no notification when overwriting\\\\\\\"\\\\n\\\\t\\\\t\\\\tremoteFile dataIsValid.\\\\n\\\\t\\\\t\\\\tremoteFile fileOutClass: nil andObject: self.\\\\n\\\\t\\\\t\\\\t\\\\\\\"remoteFile close\\\\\\\"].\\\\n\\\\t\\\\tcontentsMorph setProperty: #pageDirty toValue: nil.\\\\n\\\\t\\\\tdirty _ false].! !\\\\n\\\\n\\\\n!SqueakPage methodsFor: 'private' stamp: 'tk 2/25/1999 09:13'!\\\\ncomputeThumbnail\\\\n\\\\t\\\\\\\"Make a thumbnail from my morph.\\\\\\\"\\\\n\\\\n\\\\t(contentsMorph isKindOf: PasteUpMorph) \\\\n\\\\t\\\\tifTrue: [thumbnail _ contentsMorph smallThumbnailForPageSorter]\\\\n\\\\t\\\\tifFalse: [self updateThumbnail]! !\\\\n\\\\n!SqueakPage methodsFor: 'private' stamp: 'tk 6/24/1999 11:42'!\\\\npostChangeNotification\\\\n\\\\t\\\\\\\"Inform all thumbnails and books that this page has been updated.\\\\\\\"\\\\n\\\\n\\\\tURLMorph allSubInstancesDo: [:m | m pageHasChanged: self].\\\\n! !\\\\n\\\\n!SqueakPage methodsFor: 'private' stamp: 'jm 6/18/1998 11:31'!\\\\nupdateThumbnail\\\\n\\\\t\\\\\\\"Update my thumbnail from my morph.\\\\\\\"\\\\n\\\\n\\\\t| f scale scaleX scaleY shrunkF |\\\\n\\\\tcontentsMorph ifNil: [thumbnail _ nil. ^ self].\\\\n\\\\tf _ contentsMorph imageForm.\\\\n\\\\tscaleX _ MaxThumbnailWidthOrHeight asFloat / f height.\\\\n\\\\tscaleY _ MaxThumbnailWidthOrHeight asFloat/ f width.\\\\n\\\\tscale _ scaleX min: scaleY.  \\\\\\\"choose scale that maintains aspect ratio\\\\\\\"\\\\n\\\\tshrunkF _ (f magnify: f boundingBox by: scale@scale smoothing: 2).\\\\n\\\\tthumbnail _ Form extent: shrunkF extent depth: 8.  \\\\\\\"force depth to be 8\\\\\\\"\\\\n\\\\tshrunkF displayOn: thumbnail.\\\\n\\\\tcontentsMorph allMorphsDo: [:m | m releaseCachedState].\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSqueakPage class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SqueakPage class methodsFor: 'as yet unclassified' stamp: 'jm 6/18/1998 11:15'!\\\\ninitialize\\\\n\\\\t\\\\\\\"SqueakPage initialize\\\\\\\"\\\\n\\\\n\\\\tMaxThumbnailWidthOrHeight _ 60.\\\\n! !\\\\n\\\\n!SqueakPage class methodsFor: 'as yet unclassified' stamp: 'sw 7/6/1998 11:49'!\\\\nnewURLAndPageFor: aMorph\\\\n\\\\t\\\\\\\"Create a new SqueakPage whose contents is the given morph. Assign a URL for that page, record it in the page cache, and answer its URL.\\\\\\\"\\\\n\\\\n\\\\t| pg newURL stamp |\\\\n\\\\tpg _ self new.\\\\n\\\\tstamp _ Utilities authorInitialsPerSe ifNil: ['*'].\\\\n\\\\tpg saveMorph: aMorph author: stamp.\\\\n\\\\tnewURL _ SqueakPageCache generateURL.\\\\n\\\\tSqueakPageCache atURL: newURL put: pg.\\\\n\\\\t^ newURL \\\\n! !\\\\n\\\\n!SqueakPage class methodsFor: 'as yet unclassified' stamp: 'tk 1/15/1999 08:13'!\\\\nstemUrl: aUrlString\\\\n\\\\t\\\\\\\"Peel off the 'x5.sp'  or '.bo' from the end of a url of a SqueakPage or a BookMorph index file\\\\\\\"\\\\n\\\\n\\\\t| ll aUrl |\\\\n\\\\tll _ aUrlString findLast: [:char | char == $.].\\\\n\\\\tll = 0 \\\\n\\\\t\\\\tifTrue: [aUrl _ aUrlString]\\\\n\\\\t\\\\tifFalse: [aUrl _ aUrlString copyFrom: 1 to: ll-1].\\\\t\\\\\\\"remove .sp\\\\\\\"\\\\n\\\\taUrl _ (aUrl stemAndNumericSuffix) at: 1.\\\\n\\\\t\\\\t\\\\t\\\\\\\"remove trailing number\\\\\\\"\\\\n\\\\taUrl size = 0 ifTrue: [^ aUrl].\\\\t\\\\\\\"empty\\\\\\\"\\\\n\\\\t[aUrl last == $x] whileTrue: [aUrl _ aUrl allButLast].\\\\n\\\\t^ aUrl! !\\\\nObject subclass: #SqueakPageCache\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: 'GlobalPolicy PageCache'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-SqueakPage'!\\\\n!SqueakPageCache commentStamp: '<historical>' prior: 0!\\\\nA global cache of web pages known to this Squeak image.  Since there is a single, global page cache, it is implemented entirely as class methods.\\\\n\\\\nOnce a page has an entry, keep it.  (url string -> A SqueakPage)  The SqueakPage has a thumbnail and other info, but may not have the contentsMorph.  The morph is purged when space is needed, and fetched from the server as needed.\\\\n\\\\nSee SqueakPage's comment for the stages of in/out.!\\\\n\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSqueakPageCache class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SqueakPageCache class methodsFor: 'cache access' stamp: 'jm 6/25/1998 11:06'!\\\\nallURLs\\\\n\\\\t\\\\\\\"Answer a collection of URLs for all pages in the cache.\\\\\\\"\\\\n\\\\n\\\\t^ PageCache keys\\\\n\\\\n! !\\\\n\\\\n!SqueakPageCache class methodsFor: 'cache access' stamp: 'tk 10/2/1998 12:07'!\\\\natURL: aURLString\\\\n\\\\t\\\\\\\"Answer the page corresponding to this URL. Evaluate the given block if there is no entry for the given URL.\\\\\\\"\\\\n\\\\n\\\\t| pg |\\\\n\\\\t^ PageCache at: aURLString ifAbsent: [\\\\n\\\\t\\\\tpg _ SqueakPage new.\\\\n\\\\t\\\\t\\\\\\\"stamp _ Utilities authorInitialsPerSe ifNil: ['*'].\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"pg author: stamp.\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"Need to deal with inst vars if we turn out to be new!!\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"pg url: aURLString. \\\\tdone by atURL:put:\\\\\\\"\\\\n\\\\t\\\\tself atURL: aURLString put: pg.\\\\n\\\\t\\\\tpg]\\\\n! !\\\\n\\\\n!SqueakPageCache class methodsFor: 'cache access' stamp: 'tk 10/2/1998 12:06'!\\\\natURL: aURLString ifAbsent: failBlock\\\\n\\\\t\\\\\\\"Answer the page corresponding to this URL. Evaluate the given block if there is no entry for the given URL.\\\\\\\"\\\\n\\\\n\\\\tself halt.  \\\\\\\"use atURL:\\\\\\\"\\\\n! !\\\\n\\\\n!SqueakPageCache class methodsFor: 'cache access' stamp: 'tk 10/20/1998 15:51'!\\\\natURL: aURLString oldPage: aPage\\\\n\\\\t\\\\\\\"Bring in page and return the object.  First try looking up my url in the pageCache.  Then try the page (and install it, under its url).  Then start from scratch with the url.\\\\\\\"\\\\n\\\\n\\\\t| myPage |\\\\n\\\\t(myPage _ PageCache at: aURLString ifAbsent: [nil]) ifNotNil: [\\\\n\\\\t\\\\t^ myPage].\\\\n\\\\taPage url: aURLString.\\\\t\\\\\\\"for consistancy\\\\\\\"\\\\n\\\\tPageCache at: aPage url put: aPage.\\\\n\\\\t^ aPage! !\\\\n\\\\n!SqueakPageCache class methodsFor: 'cache access' stamp: 'tk 12/8/1998 21:51'!\\\\natURL: aURLString put: aSqueakPage\\\\n\\\\t\\\\\\\"Store the given page in the cache entry for the given URL.\\\\\\\"\\\\n\\\\n\\\\taSqueakPage url: aURLString.\\\\n\\\\taSqueakPage contentsMorph isInMemory ifTrue: [\\\\n\\\\t\\\\taSqueakPage contentsMorph ifNotNil: [\\\\n\\\\t\\\\t\\\\taSqueakPage contentsMorph setProperty: #SqueakPage \\\\n\\\\t\\\\t\\\\t\\\\ttoValue: aSqueakPage]].\\\\n\\\\tPageCache at: aURLString put: aSqueakPage.\\\\n! !\\\\n\\\\n!SqueakPageCache class methodsFor: 'cache access' stamp: 'tk 10/30/1998 15:08'!\\\\ndoPagesInMemory: aBlock\\\\n\\\\t\\\\\\\"Evaluate aBlock for each page whose contentsMorph is in-memory.  Don't add or remove pages while in this loop.\\\\\\\"\\\\n\\\\n\\\\tPageCache do: [:sqkPage |\\\\n\\\\t\\\\tsqkPage isContentsInMemory ifTrue: [aBlock value: sqkPage]].! !\\\\n\\\\n!SqueakPageCache class methodsFor: 'cache access' stamp: 'tk 11/24/1998 14:52'!\\\\ngenerateURL\\\\n\\\\t\\\\\\\"Generate an unused URL for an in-memory page.\\\\\\\"\\\\n\\\\t\\\\\\\"SqueakPageCache generateURL\\\\\\\"\\\\n\\\\n\\\\t| sd |\\\\n\\\\tsd _ ServerFile new on: 'file:./'.\\\\n\\\\tsd fileName: 'page1.sp'.\\\\n\\\\t^ SqueakPage new urlNoOverwrite: sd pathForFile\\\\n! !\\\\n\\\\n!SqueakPageCache class methodsFor: 'cache access' stamp: 'tk 10/1/1998 13:02'!\\\\nincludesMorph: aPasteUp\\\\n\\\\n\\\\tPageCache do: [:squeakPage |\\\\n\\\\t\\\\tsqueakPage contentsMorph == aPasteUp ifTrue: [^ true]].\\\\n\\\\t^ false! !\\\\n\\\\n!SqueakPageCache class methodsFor: 'cache access' stamp: 'tk 10/20/1998 15:11'!\\\\npageCache\\\\n\\\\n\\\\t^ PageCache! !\\\\n\\\\n!SqueakPageCache class methodsFor: 'cache access' stamp: 'tk 10/1/1998 13:04'!\\\\npageForMorph: aPasteUp\\\\n\\\\n\\\\tPageCache do: [:squeakPage |\\\\n\\\\t\\\\tsqueakPage contentsMorph == aPasteUp ifTrue: [^ squeakPage]].\\\\n\\\\t^ nil! !\\\\n\\\\n!SqueakPageCache class methodsFor: 'cache access' stamp: 'tk 12/16/1998 08:30'!\\\\npurge\\\\n\\\\t\\\\\\\"Replace morphs with tombstones in all pages that are clean and not being shown.  Write any dirty ones first, if allowed to.\\\\\\\"\\\\n\\\\n\\\\t| list |\\\\n\\\\tlist _ OrderedCollection new.\\\\n\\\\tGlobalPolicy == #neverWrite \\\\n\\\\t\\\\tifTrue: [PageCache doPagesInMemory: [:aPage | list add: aPage prePurge]]\\\\n\\\\t\\\\t\\\\t\\\\\\\"Writing only done by user's command\\\\\\\"\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\tPageCache doPagesInMemory: [:aPage | aPage write\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t list add: aPage prePurge]].\\\\n\\\\tlist _ list select: [:each | each notNil].\\\\n\\\\t\\\\\\\"do bulk become:\\\\\\\"\\\\n\\\\t(list collect: [:each | each contentsMorph])\\\\n\\\\t\\\\telementsExchangeIdentityWith:\\\\n\\\\t\\\\t\\\\t(list collect: [:pg | MorphObjectOut new xxxSetUrl: pg url page: pg])\\\\n! !\\\\n\\\\n!SqueakPageCache class methodsFor: 'cache access' stamp: 'tk 10/21/1998 13:28'!\\\\npurge: megs\\\\n\\\\t\\\\\\\"Replace morphs with tombstones in all pages that are clean and not being shown.  Do this until megs of new memory have been recovered.  Write any dirty ones first, if allowed to.\\\\\\\"\\\\n\\\\n\\\\t| goal |\\\\n\\\\tgoal _ Smalltalk garbageCollect + (megs * 1000000) asInteger.\\\\n\\\\tPageCache doPagesInMemory: [:aPage | \\\\n\\\\t\\\\tGlobalPolicy == #neverWrite ifFalse: [aPage write].\\\\n\\\\t\\\\taPage purge.\\\\n\\\\t\\\\tSmalltalk garbageCollect > goal ifTrue: [^ true]].\\\\t\\\\\\\"got enough\\\\\\\"\\\\n\\\\t^ false\\\\t\\\\\\\"caller may want to tell the user to write out more pages\\\\\\\"! !\\\\n\\\\n!SqueakPageCache class methodsFor: 'cache access' stamp: 'jm 6/16/1998 18:12'!\\\\nremoveURL: aURLString\\\\n\\\\t\\\\\\\"Remove the cache entry for the given URL. Do nothing if it has no cache entry.\\\\\\\"\\\\n\\\\n\\\\tPageCache removeKey: aURLString ifAbsent: [].\\\\n! !\\\\n\\\\n!SqueakPageCache class methodsFor: 'cache access' stamp: 'tk 10/22/1998 11:07'!\\\\nwrite\\\\n\\\\t\\\\\\\"Write out all dirty pages\\\\\\\"\\\\n\\\\tGlobalPolicy == #neverWrite ifTrue: [^ self].\\\\n\\\\tself doPagesInMemory: [:aPage | aPage write].! !\\\\n\\\\n\\\\n!SqueakPageCache class methodsFor: 'class initialization' stamp: 'tk 11/24/1998 14:53'!\\\\ninitialize\\\\n\\\\t\\\\\\\"SqueakPageCache initialize\\\\\\\"\\\\n\\\\n\\\\tGlobalPolicy _ #neverWrite.\\\\n\\\\tPageCache _ Dictionary new: 100.\\\\n\\\\t\\\\t\\\\\\\"forgets urls of pages, but ObjectOuts still remember them\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!SqueakPageCache class methodsFor: 'housekeeping' stamp: 'tk 6/24/1999 11:42'!\\\\ndeleteUnreferencedPages\\\\n\\\\t\\\\\\\"Remove any pages that are not current referred to by any book or URL morph.\\\\\\\"\\\\n\\\\t\\\\\\\"Details: Since unreferenced pages could refer to other pages, this process is iterated until no unreferenced pages can be found. It currently does not collect cycles.\\\\\\\"\\\\n\\\\t\\\\\\\"SqueakPageCache deleteUnreferencedPages\\\\\\\"\\\\n\\\\n\\\\t| unreferenced |\\\\n\\\\t[true] whileTrue: [\\\\n\\\\t\\\\tSmalltalk garbageCollect.\\\\n\\\\t\\\\tunreferenced _ PageCache keys.\\\\n\\\\t\\\\tURLMorph allSubInstancesDo: [:m | unreferenced remove: m url ifAbsent: []].\\\\n\\\\t\\\\tMorphObjectOut allInstancesDo: [:ticklish |\\\\n\\\\t\\\\t\\\\tunreferenced remove: ticklish url ifAbsent: []].\\\\n\\\\t\\\\tunreferenced size = 0 ifTrue: [^ self].\\\\n\\\\t\\\\tunreferenced do: [:url | PageCache removeKey: url ifAbsent: []]].\\\\n! !\\\\n\\\\n!SqueakPageCache class methodsFor: 'housekeeping' stamp: 'jm 6/25/1998 13:00'!\\\\nreleaseCachedStateOfPages\\\\n\\\\t\\\\\\\"Note: This shouldn't be necessary if we are doing a good job of releasing cached state as we go. If running this doesn't do very much, we're doing well!!\\\\\\\"\\\\n\\\\t\\\\\\\"SqueakPageCache releaseCachedStateOfPages\\\\\\\"\\\\n\\\\n\\\\t| memBytes |\\\\n\\\\tmemBytes _ Smalltalk garbageCollect.\\\\n\\\\tPageCache do: [:pg |\\\\n\\\\t\\\\tpg contentsMorph allMorphsDo: [:m | m releaseCachedState]].\\\\n\\\\t^ (Smalltalk garbageCollect - memBytes) printString, ' bytes recovered'\\\\n! !\\\\nMorph subclass: #SquishedNameMorph\\\\n\\\\tinstanceVariableNames: 'target getSelector setSelector'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-Navigators'!\\\\n\\\\n!SquishedNameMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/11/2000 23:19'!\\\\ncolorAroundName\\\\n\\\\n\\\\t^Color gray: 0.8! !\\\\n\\\\n!SquishedNameMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/11/2000 23:18'!\\\\nfontForName\\\\n\\\\n\\\\t| pickem |\\\\n\\\\tpickem _ 3.\\\\n\\\\n\\\\tpickem = 1 ifTrue: [\\\\n\\\\t\\\\t^(((TextStyle named: #Helvetica) ifNil: [TextStyle default]) fontOfSize: 13) emphasized: 1.\\\\n\\\\t].\\\\n\\\\tpickem = 2 ifTrue: [\\\\n\\\\t\\\\t^(((TextStyle named: #Palatino) ifNil: [TextStyle default]) fontOfSize: 12) emphasized: 1.\\\\n\\\\t].\\\\n\\\\t^((TextStyle default) fontAt: 1) emphasized: 1\\\\n! !\\\\n\\\\n!SquishedNameMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/11/2000 23:17'!\\\\nisEditingName\\\\n\\\\n\\\\t^((self findA: UpdatingStringMorph) ifNil: [^false]) hasFocus\\\\n! !\\\\n\\\\n!SquishedNameMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/11/2000 23:32'!\\\\nstringToShow\\\\n\\\\n\\\\t(target isNil or: [getSelector isNil]) ifTrue: [^'????'].\\\\n\\\\t^target perform: getSelector! !\\\\n\\\\n!SquishedNameMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/11/2000 23:31'!\\\\ntarget: aTarget getSelector: symbol1 setSelector: symbol2\\\\n\\\\n\\\\ttarget _ aTarget.\\\\n\\\\tgetSelector _ symbol1.\\\\n\\\\tsetSelector _ symbol2.! !\\\\n\\\\n\\\\n!SquishedNameMorph methodsFor: 'drawing' stamp: 'RAA 11/11/2000 23:17'!\\\\ndrawOn: aCanvas\\\\n\\\\n\\\\t| font stringToShow nameForm rectForName |\\\\n\\\\n\\\\tsuper drawOn: aCanvas.\\\\n\\\\tself isEditingName ifTrue: [^self].\\\\n\\\\n\\\\tfont _ self fontForName.\\\\n\\\\tstringToShow _ self stringToShow.\\\\n\\\\tnameForm _ (StringMorph contents: stringToShow font: font) imageForm.\\\\n\\\\tnameForm _ nameForm scaledToSize: (self extent - (4@2) min: nameForm extent).\\\\n\\\\trectForName _ self bottomLeft + \\\\n\\\\t\\\\t\\\\t(self width - nameForm width // 2 @ (nameForm height + 2) negated)\\\\n\\\\t\\\\t\\\\t\\\\textent: nameForm extent.\\\\n\\\\trectForName topLeft eightNeighbors do: [ :pt |\\\\n\\\\t\\\\taCanvas\\\\n\\\\t\\\\t\\\\tstencil: nameForm \\\\n\\\\t\\\\t\\\\tat: pt\\\\n\\\\t\\\\t\\\\tcolor: self colorAroundName.\\\\n\\\\t].\\\\n\\\\taCanvas\\\\n\\\\t\\\\tstencil: nameForm \\\\n\\\\t\\\\tat: rectForName topLeft \\\\n\\\\t\\\\tcolor: Color black.\\\\n\\\\n\\\\n\\\\t\\\\n! !\\\\nObject subclass: #Stack\\\\n\\\\tinstanceVariableNames: 'linkedList'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Collections-Stack'!\\\\n!Stack commentStamp: 'dc 7/24/2005 15:41' prior: 0!\\\\nI implement a simple Stack. #push: adds a new object of any kind on top of the stack. #pop returns the first element and remove it from the stack. #top answer the first element of the stack without removing it.!\\\\n\\\\n\\\\n!Stack methodsFor: 'accessing' stamp: 'dc 7/25/2005 10:04'!\\\\nsize\\\\n\\\\t\\\\\\\"How many objects in me ?\\\\\\\"\\\\n\\\\t^ self linkedList size! !\\\\n\\\\n!Stack methodsFor: 'accessing' stamp: 'sd 3/25/2006 15:05'!\\\\ntop\\\\n\\\\t\\\\\\\"Answer the first element of the stack without removing it.\\\\\\\"\\\\n\\\\tself notEmptyCheck.\\\\n\\\\t^ self linkedList first element! !\\\\n\\\\n\\\\n!Stack methodsFor: 'adding' stamp: 'dc 7/25/2005 10:22'!\\\\npush: anObject \\\\n\\\\t\\\\\\\"Adds a new object of any kind on top of the stack.\\\\\\\"\\\\n\\\\tself linkedList\\\\n\\\\t\\\\taddFirst: (StackLink with: anObject).\\\\n\\\\t^ anObject.! !\\\\n\\\\n\\\\n!Stack methodsFor: 'initialize-release' stamp: 'dc 7/25/2005 11:39'!\\\\ninitialize\\\\n\\\\tsuper initialize.\\\\n\\\\tlinkedList := LinkedList new! !\\\\n\\\\n\\\\n!Stack methodsFor: 'removing' stamp: 'dc 7/24/2005 16:16'!\\\\npop\\\\n\\\\t\\\\\\\"Returns the first element and remove it from the stack.\\\\\\\"\\\\n\\\\n\\\\tself notEmptyCheck.\\\\n\\\\t^self linkedList removeFirst element! !\\\\n\\\\n\\\\n!Stack methodsFor: 'testing' stamp: 'dc 7/25/2005 10:05'!\\\\nisEmpty\\\\n\\\\t^ self linkedList isEmpty! !\\\\n\\\\n\\\\n!Stack methodsFor: 'private' stamp: 'dc 7/25/2005 10:05'!\\\\nerrorEmptyStack\\\\n\\\\tself error: 'this stack is empty'! !\\\\n\\\\n!Stack methodsFor: 'private' stamp: 'dc 7/25/2005 10:20'!\\\\nlinkedList\\\\n\\\\t\\\\\\\"The stack is implemented with a LinkedList. Do NOT call this function, it  \\\\n\\\\tis for private use !!\\\\\\\"\\\\n\\\\t^ linkedList! !\\\\n\\\\n!Stack methodsFor: 'private' stamp: 'dc 7/25/2005 10:05'!\\\\nnotEmptyCheck\\\\n\\\\t\\\\\\\"Ensure the stack is not empty.\\\\\\\"\\\\n\\\\tself isEmpty\\\\n\\\\t\\\\tifTrue: [self errorEmptyStack]! !\\\\nLink subclass: #StackLink\\\\n\\\\tinstanceVariableNames: 'element'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Collections-Stack'!\\\\n!StackLink commentStamp: '<historical>' prior: 0!\\\\nI implement an element of a stack. I'm a container for any type of object, saved into the 'element' variable. My superclass Link allows me to be part of a LinkedList.!\\\\n\\\\n\\\\n!StackLink methodsFor: 'accessing' stamp: 'dc 7/24/2005 15:34'!\\\\nelement\\\\n\\\\t^element! !\\\\n\\\\n!StackLink methodsFor: 'accessing' stamp: 'dc 7/25/2005 10:16'!\\\\nelement: anObject \\\\n\\\\t\\\\\\\"Any kind of Object.\\\\\\\"\\\\n\\\\telement := anObject! !\\\\n\\\\n\\\\n!StackLink methodsFor: 'printing' stamp: 'dc 7/25/2005 10:15'!\\\\nprintOn: aStream \\\\n\\\\taStream nextPutAll: self class printString;\\\\n\\\\t\\\\t nextPutAll: ' with: ';\\\\n\\\\t\\\\t nextPutAll: self element printString! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStackLink class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StackLink class methodsFor: 'instance creation' stamp: 'dc 7/25/2005 10:15'!\\\\nwith: anObject \\\\n\\\\t^ self new element: anObject! !\\\\nBookMorph subclass: #StackMorph\\\\n\\\\tinstanceVariableNames: 'cards'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'EToys-Stacks'!\\\\n!StackMorph commentStamp: '<historical>' prior: 0!\\\\nA book that is very much like a HyperCard stack.  \\\\n\\\\nEach book page represents a different background.  The page stays while different cards are projected onto it.  \\\\n\\\\tThe data for a single card is stored in a CardPlayer.  There is a list of objects that only appear on this card (privateMorphs) and the card-specific text to be inserted into the background fields.\\\\n\\\\nItem\\\\t\\\\t\\\\t\\\\t\\\\tHow it is stored\\\\na background\\\\t\\\\t\\\\ta page of the StackMorph\\\\na card\\\\t\\\\t\\\\t\\\\t\\\\tdata is in an instance of a subclass of CardPlayer.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tA list of CardPlayers is in the 'cards' inst var of the StackMorph.\\\\na background field\\\\t\\\\ta TextMorph on a page of the StackMorph\\\\na background picture\\\\ta morph of any kind on a page of the StackMorph\\\\nscript for bkgnd button\\\\t\\\\tmethod in Player.  Button is its costume.\\\\ntext in a background field\\\\t\\\\tvalue of inst var 'field1' in a CardPlayer.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(The CardPlayer is also pointed at by the #cardInstance \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tproperty of the bkgnd field (TextMorph))\\\\ntext in a card field\\\\t\\\\tin the TextMorph in privateMorphs in the CardPlayer.\\\\npicture on a card\\\\t\\\\ta morph of any kind in privateMorphs in the CardPlayer.\\\\nscript for card button\\\\tmethod in the CardPlayer.  Button is its costume.\\\\n\\\\nSee VariableDock.!\\\\n\\\\n\\\\n!StackMorph methodsFor: 'accessing' stamp: 'sw 11/2/2002 15:51'!\\\\ncardNumberOf: aPlayer\\\\n\\\\t\\\\\\\"Answer the card-number of the given player, in the which-card-of-the-stack sense.\\\\\\\"\\\\n\\\\n\\\\t^ self cards identityIndexOf: aPlayer ifAbsent: [0]! !\\\\n\\\\n!StackMorph methodsFor: 'accessing' stamp: 'sw 3/18/2002 02:09'!\\\\ncardsOrPages\\\\n\\\\t\\\\\\\"The turnable and printable entities\\\\\\\"\\\\n\\\\n\\\\t^ self cards! !\\\\n\\\\n\\\\n!StackMorph methodsFor: 'as yet unclassified' stamp: 'sw 10/23/2000 16:27'!\\\\ncommitCardData\\\\n\\\\t\\\\\\\"Make certain that the player data are written back to the player instance\\\\\\\"\\\\n\\\\n\\\\t^ self currentCard commitCardPlayerData \\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'as yet unclassified' stamp: 'em 3/31/2005 10:56'!\\\\ninsertCardOfBackground\\\\n\\\\t\\\\\\\"Prompt the user for choice of a background, and insert a new card of that background\\\\\\\"\\\\n\\\\n\\\\t| bgs aMenu aBackground |\\\\n\\\\t(bgs _ self backgrounds) size == 1 ifTrue:\\\\n\\\\t\\\\t[self inform: \\\\n'At this time, there IS only one kind of\\\\nbackground in this stack, so that''s\\\\nwhat you''ll get' translated.\\\\n\\\\t\\\\t^ self insertCard].\\\\n\\\\taMenu _ SelectionMenu\\\\n\\\\t\\\\tlabels: \\\\t\\\\t(bgs collect: [:bg | bg externalName])\\\\n\\\\t\\\\tselections: \\\\tbgs.\\\\n\\\\t(aBackground _ aMenu startUp) ifNotNil:\\\\n\\\\t\\\\t[self insertCardOfBackground: aBackground]! !\\\\n\\\\n!StackMorph methodsFor: 'as yet unclassified' stamp: 'sw 3/18/2002 02:02'!\\\\ninsertCardOfBackground: aBackground\\\\n\\\\t\\\\\\\"Insert a new card of the given background and have it become the current card\\\\\\\"\\\\n\\\\n\\\\t| newCard |\\\\n\\\\tnewCard _  aBackground newCard.\\\\n\\\\tself privateCards add: newCard after: self currentCard.\\\\n\\\\tself goToCard: newCard! !\\\\n\\\\n!StackMorph methodsFor: 'as yet unclassified' stamp: 'sw 10/30/2000 10:08'!\\\\nopenInsideLook\\\\n\\\\t\\\\\\\"Open an inside-look at the current page.  This is a previously-demoed feature not presently incorporated in released code,\\\\\\\"\\\\n\\\\n\\\\ttrue ifTrue: [self notYetImplemented] ifFalse: [self currentPage openInsideLook]\\\\n! !\\\\n\\\\n\\\\n!StackMorph methodsFor: 'background' stamp: 'nb 6/17/2003 12:25'!\\\\naddCardsFromAFile\\\\n\\\\t\\\\\\\"Using the current background, create new cards by reading in data from a fileThe data are in each record are expected to be tab-delimited, and to occur in the same order as the instance variables of the current-background's cards \\\\\\\"\\\\n\\\\n\\\\t| aFileStream |\\\\n\\\\t(aFileStream _ FileList2 modalFileSelector) ifNil: [^ Beeper beep].\\\\n\\\\tself addCardsFromString: aFileStream contentsOfEntireFile.\\\\n\\\\taFileStream close! !\\\\n\\\\n!StackMorph methodsFor: 'background' stamp: 'nb 6/17/2003 12:25'!\\\\naddCardsFromClipboardData\\\\n\\\\t\\\\\\\"Using the current background, paste data from the (textual) clipboard to create new records.  The data are in each record are expected to be tab-delimited, and to occur in the same order as the instance variables of the current-background's cards \\\\\\\"\\\\n\\\\n\\\\t| clip |\\\\n\\\\t(clip _ Clipboard clipboardText) isEmptyOrNil ifTrue: [^ Beeper beep].\\\\n\\\\tself addCardsFromString: clip! !\\\\n\\\\n!StackMorph methodsFor: 'background' stamp: 'nb 6/17/2003 12:25'!\\\\naddCardsFromClipboardDataForInstanceVariables: slotNames\\\\n\\\\t\\\\\\\"Using the current background, paste data from the (textual) clipboard to create new records.  No senders, but can be usefully called manually for selectively bringing in data in oddball format.\\\\\\\"\\\\n\\\\n\\\\t| clip |\\\\n\\\\t(clip _ Clipboard clipboardText) isEmptyOrNil ifTrue: [^ Beeper beep].\\\\n\\\\tself addCardsFromString: clip slotNames: slotNames! !\\\\n\\\\n!StackMorph methodsFor: 'background' stamp: 'nb 6/17/2003 12:25'!\\\\naddCardsFromFile: fileStream\\\\n\\\\t\\\\\\\"Using the current background, take tab delimited data from the file to create new records.\\\\\\\"\\\\n\\\\n\\\\t| aString |\\\\n\\\\t(aString _ fileStream contentsOfEntireFile) isEmptyOrNil ifTrue: [^ Beeper beep].\\\\n\\\\tself addCardsFromString: aString! !\\\\n\\\\n!StackMorph methodsFor: 'background' stamp: 'sw 12/18/2001 11:35'!\\\\naddCardsFromString: aString\\\\n\\\\t\\\\\\\"Using the current background, add cards from a string, which is expected be tab- and return-delimited.  The data are in each record are expected to be tab-delimited, and to occur in the same order as the instance variables of the current-background's cards \\\\\\\"\\\\n\\\\n\\\\tself addCardsFromString: aString slotNames: self currentCard slotNames\\\\n \\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'background' stamp: 'em 3/31/2005 10:23'!\\\\naddCardsFromString: aString slotNames: slotNames \\\\n\\\\t\\\\\\\"Using the current background, add cards from a string, which is expected be tab- and return-delimited\\\\\\\"\\\\n\\\\n\\\\t| count |\\\\n\\\\tcount := 0.\\\\n\\\\taString asString linesDo: \\\\n\\\\t\\\\t\\\\t[:aLine | \\\\n\\\\t\\\\t\\\\taLine notEmpty \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[count := count + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinsertCardOfBackground: self currentPage\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twithDataFrom: aLine\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforInstanceVariables: slotNames]].\\\\n\\\\tself inform: count asString , ' card(s) added' translated! !\\\\n\\\\n!StackMorph methodsFor: 'background' stamp: 'sw 10/26/2000 14:41'!\\\\nbackgroundWithCard: aCard\\\\n\\\\t\\\\\\\"Answer the background which contains aCard.\\\\\\\"\\\\n\\\\n\\\\t^ self backgrounds detect:\\\\n\\\\t\\\\t[:aBackground | aBackground containsCard: aCard] ifNone: [nil]! !\\\\n\\\\n!StackMorph methodsFor: 'background' stamp: 'sw 10/30/2000 10:04'!\\\\nbackgrounds\\\\n\\\\t\\\\\\\"Answer the list of backgrounds available in the receiver\\\\\\\"\\\\n\\\\n\\\\t^ self pages! !\\\\n\\\\n!StackMorph methodsFor: 'background' stamp: 'sw 12/6/2001 21:26'!\\\\nbeDefaultsForNewCards\\\\n\\\\t\\\\\\\"Make the values that I see here all be accepted as defaults for new cards\\\\\\\"\\\\n\\\\n\\\\tself currentPage submorphs do:\\\\n\\\\t\\\\t[:aMorph | aMorph holdsSeparateDataForEachInstance ifTrue:\\\\n\\\\t\\\\t\\\\t[aMorph setAsDefaultValueForNewCard]]! !\\\\n\\\\n!StackMorph methodsFor: 'background' stamp: 'sw 11/2/2002 17:56'!\\\\nchangeInstVarOrder\\\\n\\\\t\\\\\\\"Change the order of the receiver's instance variables\\\\\\\"\\\\n\\\\n\\\\t| reply |\\\\n\\\\treply _ FillInTheBlank request: 'rearrange, then accept; or cancel' initialAnswer:\\\\n\\\\t\\\\t((self currentPage player class instVarNames asArray collect: [:v | v asSymbol]) storeString copyWithoutAll: #($# $( $))) asString.\\\\n\\\\treply isEmptyOrNil ifTrue: [^ self].\\\\n\\\\tself flag: #deferred.  \\\\\\\"Error checking and graceful escape wanted\\\\\\\"\\\\n\\\\tself currentPage player class resortInstanceVariables: (Compiler evaluate:\\\\n\\\\t\\\\t('#(', reply, ')'))! !\\\\n\\\\n!StackMorph methodsFor: 'background' stamp: 'em 3/30/2005 14:47'!\\\\ninsertAsBackground: newPage resize: doResize\\\\n\\\\t\\\\\\\"Make a new background for the stack.  Obtain a name for it from the user.  It starts out life empty\\\\\\\"\\\\n\\\\n\\\\t| aName |\\\\n\\\\taName _ FillInTheBlank request: 'What should we call this new background?' translated initialAnswer: 'alternateBackground' translated.\\\\n\\\\taName isEmptyOrNil ifTrue: [^ self].\\\\n\\\\tnewPage beSticky.\\\\n\\\\tdoResize ifTrue: [newPage extent: currentPage extent].\\\\n\\\\tnewPage beAStackBackground.\\\\n\\\\tnewPage setNameTo: aName.\\\\n\\\\tnewPage vResizeToFit: false.\\\\n\\\\tpages isEmpty\\\\n\\\\t\\\\tifTrue: [pages add: newPage]\\\\n\\\\t\\\\tifFalse: [pages add: newPage after: currentPage].\\\\n\\\\tself privateCards add: newPage currentDataInstance after: currentPage currentDataInstance.\\\\n\\\\tself nextPage.\\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'background' stamp: 'tk 10/30/2001 19:01'!\\\\nmakeNewBackground\\\\n\\\\t\\\\\\\"Make a new background for the stack.  Obtain a name for it from the user.  It starts out life empty\\\\\\\"\\\\n\\\\n\\\\t| newPage |\\\\n\\\\t(newPage _ PasteUpMorph newSticky) color: self color muchLighter.\\\\n\\\\tnewPage borderWidth: currentPage borderWidth; borderColor: currentPage borderColor.\\\\n\\\\tself insertAsBackground: newPage resize: true. \\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'background' stamp: 'sw 3/18/2002 02:14'!\\\\nsortByField: varName\\\\n\\\\t\\\\\\\"Perform a simple reordering of my cards, sorting by the given field name.  If there are multiple backgrounds, then sort the current one, placing all its cards first, followed by all others in unchanged order\\\\\\\"\\\\n\\\\n\\\\t| holdCards thisClassesInstances sortedList |\\\\n\\\\tholdCards _ self privateCards copy.\\\\n\\\\n\\\\tthisClassesInstances _ self privateCards select: [:c | c isKindOf: self currentCard class].\\\\n\\\\tsortedList _ thisClassesInstances asSortedCollection:\\\\n\\\\t\\\\t[:a :b | (a instVarNamed: varName) asString <= (b instVarNamed: varName) asString].\\\\n\\\\tsortedList _ sortedList asOrderedCollection.\\\\n\\\\tholdCards removeAllFoundIn: sortedList.\\\\n\\\\tself privateCards:  (sortedList asOrderedCollection, holdCards).\\\\n\\\\tself goToFirstCardOfStack\\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'background' stamp: 'sw 12/6/2001 22:08'!\\\\nsortCards\\\\n\\\\t\\\\\\\"Let the user provide an inst var on which to sort the cards of a background.\\\\\\\"\\\\n\\\\n\\\\t| names aMenu |\\\\n\\\\tnames _ self currentPage player class instVarNames.\\\\n\\\\taMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\taMenu addTitle: 'Choose field by which to sort:'.\\\\n\\\\tnames do: [:n | aMenu add: n selector: #sortByField: argument: n].\\\\n\\\\taMenu popUpInWorld! !\\\\n\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'sw 10/23/2000 16:24'!\\\\nbrowseCardClass\\\\n\\\\t\\\\\\\"Browse the class of the current card\\\\\\\"\\\\n\\\\n\\\\t| suffix |\\\\n\\\\tsuffix _ self currentCard class name numericSuffix.\\\\n\\\\tHierarchyBrowser newFor: self currentCard class labeled: 'Background ', suffix asString\\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'sw 3/18/2002 02:20'!\\\\ncardIndexOf: aCard\\\\n\\\\t\\\\\\\"Answer the ordinal position of aCard in the receiver's list\\\\\\\"\\\\n\\\\n\\\\t^ self privateCards indexOf: aCard ifAbsent: [nil]! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'sw 3/18/2002 02:12'!\\\\ncards\\\\n\\\\t\\\\\\\"Answer a list of the cards of the receiver, in order\\\\\\\"\\\\n\\\\n\\\\t^ self privateCards copy! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'sw 10/23/2000 16:27'!\\\\ncurrentCard\\\\n\\\\t\\\\\\\"Answer the current card of the current background of the receiver\\\\\\\"\\\\n\\\\n\\\\t^ currentPage currentDataInstance! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'em 3/31/2005 10:24'!\\\\ndeleteAllCardsExceptThisOne\\\\n\\\\t\\\\\\\"Delete all cards except the current one\\\\\\\"\\\\n\\\\n\\\\tself privateCards size <= 1 ifTrue: [^ Beeper beep].\\\\n\\\\t(self confirm: 'Really delete ' translated, self privateCards size asString, ' card(s) and all of their data?' translated) ifTrue:\\\\n\\\\t\\\\t[self privateCards: (OrderedCollection with: self currentCard)].! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'sd 11/13/2003 21:03'!\\\\ndeleteCard\\\\n\\\\t\\\\\\\"Delete the current card from the stack\\\\\\\"\\\\n\\\\n\\\\t| aCard |\\\\n\\\\taCard _ self currentCard.\\\\n\\\\tself privateCards size = 1 ifTrue: [^ Beeper beep].\\\\n\\\\t(self confirm: 'Really delete this card and all of its data?' translated) ifTrue:\\\\n\\\\t\\\\t[self goToNextCardInStack.\\\\n\\\\t\\\\tself privateCards remove: aCard].! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'nb 6/17/2003 12:25'!\\\\ndeleteCard: aCard\\\\n\\\\t\\\\\\\"Delete the current card from the stack.\\\\\\\"\\\\n\\\\n\\\\tself privateCards size = 1 ifTrue: [^ Beeper beep].\\\\n\\\\t(aCard == self currentCard) ifTrue: [^ self deleteCard].\\\\n\\\\n\\\\tself privateCards remove: aCard ifAbsent: []! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'em 3/31/2005 10:23'!\\\\ngoToCard\\\\n\\\\t\\\\\\\"prompt the user for an ordinal number, and use that as a basis for choosing a new card to install in the receiver\\\\\\\"\\\\n\\\\n\\\\t| reply index |\\\\n\\\\treply _ FillInTheBlank request: 'Which card number? ' translated initialAnswer: '1'.\\\\n\\\\treply isEmptyOrNil ifTrue: [^ self].\\\\n\\\\t((index _ reply asNumber) > 0 and: [index <= self privateCards size])\\\\n\\\\t\\\\tifFalse: [^ self inform: 'no such card'].\\\\n\\\\tself goToCard: (self privateCards at: index)! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'sw 11/8/2002 15:15'!\\\\ngoToCard: destinationCard\\\\n\\\\t\\\\\\\"Install the indicated destinationCard as the current card in the receiver.  Any viewer currently open on the current card will get retargeted to look at the new one.\\\\\\\"\\\\n\\\\n\\\\t| aBackground existingCard oldViewers |\\\\n\\\\tdestinationCard == self currentCard ifTrue: [^ self].\\\\n\\\\tself currentPlayerDo:\\\\n\\\\t\\\\t[:aPlayer | aPlayer runAllClosingScripts].   \\\\\\\"Like HyperCard 'on closeCard'\\\\\\\"\\\\n\\\\n\\\\taBackground _ self backgroundWithCard: destinationCard.\\\\n\\\\texistingCard _ aBackground currentDataInstance.\\\\n\\\\toldViewers _ existingCard ifNil: [#()] ifNotNil: [existingCard allOpenViewers].\\\\n\\\\n\\\\taBackground installAsCurrent: destinationCard.\\\\n\\\\taBackground setProperty: #myStack toValue: self.\\\\t\\\\\\\"pointer cardMorph -> stack\\\\\\\"\\\\n\\\\n\\\\taBackground ~~ currentPage ifTrue:\\\\n\\\\t\\\\t[self goToPageMorph: aBackground runTransitionScripts: false].\\\\n\\\\tself currentPlayerDo:\\\\n\\\\t\\\\t[:aPlayer | aPlayer runAllOpeningScripts] .  \\\\\\\"Like HyperCard 'on opencard'\\\\\\\"\\\\n\\\\n\\\\toldViewers do: [:aViewer | aViewer retargetFrom: existingCard to: destinationCard]! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'sw 11/11/2002 03:07'!\\\\ngoToCardNumber: aCardNumber\\\\n\\\\t\\\\\\\"Install the card whose ordinal number is provided as the current card in the stack\\\\\\\"\\\\n\\\\n\\\\tself goToCard: (self privateCards atWrap: aCardNumber)! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'nb 6/17/2003 12:25'!\\\\ngoToFirstCardInBackground\\\\n\\\\t\\\\\\\"Install the initial card in the current background as the current card in the stack\\\\\\\"\\\\n\\\\n\\\\t| kind |\\\\n\\\\tkind _ currentPage player class baseUniclass.\\\\n\\\\tself goToCard: (self privateCards detect: [:aCard | aCard isKindOf: kind] ifNone: [^ Beeper beep])! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'sw 3/18/2002 02:01'!\\\\ngoToFirstCardOfStack\\\\n\\\\t\\\\\\\"Install the initial card in the stack as the current card\\\\\\\"\\\\n\\\\n\\\\tself goToCard: self privateCards first! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'nb 6/17/2003 12:25'!\\\\ngoToLastCardInBackground\\\\n\\\\t\\\\\\\"Install the final card in the current background as the current card\\\\\\\"\\\\n\\\\n\\\\t| kind |\\\\n\\\\tkind _ currentPage player class baseUniclass.\\\\n\\\\tself goToCard: (self privateCards reversed detect: [:aCard | aCard isKindOf: kind] ifNone: [^ Beeper beep])! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'sw 3/18/2002 02:09'!\\\\ngoToLastCardOfStack\\\\n\\\\t\\\\\\\"Install the final card in the stack as the current card\\\\\\\"\\\\n\\\\n\\\\tself goToCard: self privateCards last! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'sw 3/18/2002 02:03'!\\\\ninsertCardOfBackground: aBackground withDataFrom: aLine forInstanceVariables: slotNames\\\\n\\\\t\\\\\\\"Insert a new card of the given background and have it become the current card. \\\\\\\"\\\\n\\\\n\\\\t| newCard |\\\\n\\\\tnewCard _  aBackground newCard.\\\\n\\\\tself privateCards add: newCard after: self currentCard.\\\\n\\\\tnewCard absorbBackgroundDataFrom: aLine forInstanceVariables: slotNames.\\\\n\\\\tself goToCard: newCard! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'sw 3/18/2002 01:57'!\\\\nmakeCurrentCardFirstInStack\\\\n\\\\t\\\\\\\"Move the current card such that it becomes the first card in the stack\\\\\\\"\\\\n\\\\n\\\\t| aCard |\\\\n\\\\taCard _ self currentCard.\\\\n\\\\tself privateCards remove: aCard ifAbsent: [];\\\\n\\\\t\\\\taddFirst: aCard.\\\\n\\\\tself currentPage flash! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'sw 3/18/2002 02:03'!\\\\nmakeCurrentCardLastInStack\\\\n\\\\t\\\\\\\"Move the current card such that it becomes the last card in the stack\\\\\\\"\\\\n\\\\n\\\\t| aCard |\\\\n\\\\taCard _ self currentCard.\\\\n\\\\tself privateCards remove: aCard ifAbsent: [];\\\\n\\\\t\\\\taddLast: aCard.\\\\n\\\\tself currentPage flash! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'sw 3/18/2002 02:08'!\\\\nmoveCardOnePositionEarlier\\\\n\\\\t\\\\\\\"Move the current card such that its ordinal position is one fewer than it formerly was.  If the current card is already the first one one in the stack, then do nothing\\\\\\\"\\\\n\\\\n\\\\t| aCard aPosition |\\\\n\\\\taCard _ self currentCard.\\\\n\\\\taCard == self privateCards first ifTrue: [^ self].\\\\n\\\\taPosition _ self privateCards indexOf: aCard.\\\\n\\\\tself privateCards remove: aCard;\\\\n\\\\t\\\\tadd: aCard afterIndex: (aPosition - 2).\\\\n\\\\tself currentPage flash! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'sw 3/18/2002 02:05'!\\\\nmoveCardOnePositionLater\\\\n\\\\t\\\\\\\"Move the current card such that its ordinal position is one greater than it formerly was.  If the current card is already the last one one in the stack, then do nothing\\\\\\\"\\\\n\\\\n\\\\t| aCard aPosition privateCards |\\\\n\\\\taCard _ self currentCard.\\\\n\\\\tprivateCards _ self privateCards.\\\\n\\\\taCard == privateCards last ifTrue: [^ self].\\\\n\\\\taPosition _ privateCards indexOf: aCard.\\\\n\\\\tprivateCards remove: aCard.\\\\n\\\\tprivateCards add: aCard afterIndex: aPosition.\\\\n\\\\tself currentPage flash! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'sw 3/18/2002 01:56'!\\\\nprivateCards\\\\n\\\\t\\\\\\\"Private - answer the collection object that sits in my cards instance variable\\\\\\\"\\\\n\\\\n\\\\t^ cards! !\\\\n\\\\n!StackMorph methodsFor: 'card access' stamp: 'sw 3/18/2002 02:51'!\\\\nprivateCards: aCollection\\\\n\\\\t\\\\\\\"Private - Make my cards be te given colllection\\\\\\\"\\\\n\\\\n\\\\tcards _ aCollection! !\\\\n\\\\n\\\\n!StackMorph methodsFor: 'card in a stack' stamp: 'sw 10/30/2000 10:03'!\\\\nexplainDesignations\\\\n\\\\t\\\\\\\"Give the user an explanation of what the designations mean\\\\\\\"\\\\n\\\\n\\\\tself currentPage explainDesignations\\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'card in a stack' stamp: 'sw 3/18/2002 02:03'!\\\\ngoToNextCardInStack\\\\n\\\\t\\\\\\\"Make the card *after* the current card become the current card\\\\\\\"\\\\n\\\\n\\\\t| anIndex newCard |\\\\n\\\\tanIndex _ self privateCards indexOf: currentPage currentDataInstance.\\\\n\\\\tnewCard _ self privateCards atWrap: anIndex + 1.\\\\n\\\\tself goToCard: newCard! !\\\\n\\\\n!StackMorph methodsFor: 'card in a stack' stamp: 'sw 3/18/2002 02:01'!\\\\ngoToPreviousCardInStack\\\\n\\\\t\\\\\\\"Install the previous card as my current one\\\\\\\"\\\\n\\\\n\\\\t| anIndex newCard |\\\\n\\\\tanIndex _ self privateCards indexOf: currentPage currentDataInstance.\\\\n\\\\tnewCard _ self privateCards atWrap: anIndex - 1.\\\\n\\\\tself goToCard: newCard! !\\\\n\\\\n!StackMorph methodsFor: 'card in a stack' stamp: 'sw 10/23/2000 16:02'!\\\\ninsertCard\\\\n\\\\t\\\\\\\"Create a new card of the current background and make it become the current card\\\\\\\"\\\\n\\\\n\\\\tself insertCardOfBackground: currentPage! !\\\\n\\\\n!StackMorph methodsFor: 'card in a stack' stamp: 'tk 10/5/2001 06:27'!\\\\nreassessBackgroundShape\\\\n\\\\t\\\\\\\"Have the current page reconsider its cards' instance structure\\\\\\\"\\\\n\\\\n\\\\tcurrentPage setProperty: #myStack toValue: self. \\\\t\\\\\\\"pointer cardMorph -> stack\\\\\\\"\\\\n\\\\t^ self currentPage reassessBackgroundShape \\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'card in a stack' stamp: 'sw 10/30/2000 10:04'!\\\\nrelaxGripOnVariableNames\\\\n\\\\t\\\\\\\"Have the current background relax its grip on existing variable name\\\\\\\"\\\\n\\\\n\\\\t^ self currentPage relaxGripOnVariableNames \\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'card in a stack' stamp: 'sw 10/30/2000 10:15'!\\\\nreshapeBackground\\\\n\\\\t\\\\\\\"Abandon any memory of variable-name preferences for the current background, and reassess its instance structure\\\\\\\"\\\\n\\\\n\\\\t^ self currentPage reshapeBackground \\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'card in a stack' stamp: 'sw 10/30/2000 10:10'!\\\\nshowDesignationsOfObjects\\\\n\\\\t\\\\\\\"Momentarily show which objects on the current card belong to which designation category\\\\\\\"\\\\n\\\\n\\\\tself currentPage showDesignationsOfObjects\\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'card in a stack' stamp: 'sw 10/23/2000 17:37'!\\\\nstackDo: aBlock\\\\n\\\\t\\\\\\\"Evaluate aBlock on behalf of the receiver stack\\\\\\\"\\\\n\\\\n\\\\t^ aBlock value: self! !\\\\n\\\\n\\\\n!StackMorph methodsFor: 'controls' stamp: 'sw 10/30/2000 16:31'!\\\\npageControlsMorphFrom: controlSpecs\\\\n\\\\t\\\\\\\"Answer a controls morph derived from the spec supplied\\\\\\\"\\\\n\\\\n\\\\t| controls |\\\\n\\\\tcontrols _ super pageControlsMorphFrom: controlSpecs.\\\\n\\\\tcontrols eventHandler: nil.  \\\\\\\"not grabbable\\\\\\\"\\\\n\\\\t^ controls! !\\\\n\\\\n\\\\n!StackMorph methodsFor: 'debugging' stamp: 'sw 10/30/2000 10:13'!\\\\ninspectCurrentBackground\\\\n\\\\t\\\\\\\"Open an inspector on the corrent background.  Ideally should put include the background name in the inspector's title.\\\\\\\"\\\\n\\\\n\\\\t^ self currentPage inspectWithLabel: 'A Background'\\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'debugging' stamp: 'sw 10/23/2000 16:37'!\\\\ninspectCurrentCard\\\\n\\\\t\\\\\\\"For debugging: open an Inspector on the receiver's current card\\\\\\\"\\\\n\\\\n\\\\t^ self currentCard inspectWithLabel: 'A Card'\\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'debugging' stamp: 'sw 10/30/2000 10:09'!\\\\ninspectCurrentStack\\\\n\\\\t\\\\\\\"Triggered from the stack-debug menu, open an Inspector on the receiver\\\\\\\"\\\\n\\\\n\\\\t^ self inspectWithLabel: 'A Stack'\\\\n! !\\\\n\\\\n\\\\n!StackMorph methodsFor: 'initialization' stamp: 'sw 6/5/2003 04:04'!\\\\naddPane: aPane paneType: aType\\\\n\\\\n\\\\t| anIndex |\\\\n\\\\n\\\\tanIndex _ self insertionIndexForPaneOfType: aType.\\\\n\\\\n\\\\tself privateAddMorph: aPane atIndex: anIndex! !\\\\n\\\\n!StackMorph methodsFor: 'initialization' stamp: 'sw 3/18/2002 02:12'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Initialize the stack\\\\\\\"\\\\n\\\\n\\\\t| initialBackground |\\\\n\\\\tsuper initialize.\\\\n\\\\tinitialBackground _ pages first.\\\\n\\\\tinitialBackground extent: (640@480); beSticky.\\\\n\\\\tinitialBackground beAStackBackground.\\\\n\\\\tself beUnsticky.\\\\n\\\\tself setProperty: #controlsAtBottom toValue: true.\\\\n\\\\tself privateCards: (OrderedCollection with: initialBackground currentDataInstance).\\\\n\\\\n\\\\\\\"self currentHand attachMorph: StackMorph authoringPrototype\\\\\\\"! !\\\\n\\\\n!StackMorph methodsFor: 'initialization' stamp: 'sw 3/18/2002 02:13'!\\\\ninitializeWith: aCardMorph\\\\n\\\\t\\\\\\\"Install the card inside a new stack.  Make no border or controls, so I the card's look is unchanged.  Card already has a CardPlayer.\\\\\\\"\\\\n\\\\t\\\\n\\\\t| wld |\\\\n\\\\twld _ aCardMorph world.\\\\n\\\\tself initialize.\\\\n\\\\tself pageSize: aCardMorph extent.\\\\n\\\\tself borderWidth: 0; layoutInset: 0; color: Color transparent.\\\\n\\\\tpages _ Array with: aCardMorph.\\\\n\\\\tcurrentPage _ aCardMorph.\\\\n\\\\tself privateCards: (OrderedCollection with: currentPage currentDataInstance).\\\\n\\\\tcurrentPage beAStackBackground.\\\\n\\\\tself position: aCardMorph position.\\\\n\\\\tsubmorphs last delete.\\\\n\\\\tself addMorph: currentPage.\\\\t\\\\n\\\\tself showPageControls: self fullControlSpecs.\\\\n\\\\twld addMorph: self.\\\\n! !\\\\n\\\\n\\\\n!StackMorph methodsFor: 'insert and delete' stamp: 'sw 10/30/2000 10:10'!\\\\ndefaultNameStemForNewPages\\\\n\\\\t\\\\\\\"Answer the stem to use as the default for names of cards in the stack\\\\\\\"\\\\n\\\\n\\\\t^ 'card'\\\\n! !\\\\n\\\\n\\\\n!StackMorph methodsFor: 'menu' stamp: 'dgd 8/30/2003 21:14'!\\\\naddBookMenuItemsTo: aMenu hand: aHandMorph\\\\n\\\\t\\\\\\\"Add book-related items to the given menu\\\\\\\"\\\\n\\\\n\\\\t| controlsShowing subMenu |\\\\n\\\\tsubMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\tsubMenu add: 'previous card' translated action: #goToPreviousCardInStack.\\\\n\\\\tsubMenu add: 'next card' translated action: #goToNextCardInStack.\\\\n\\\\tsubMenu add: 'go to card...' translated action: #goToCard.\\\\n\\\\tsubMenu add: 'insert a card' translated action: #insertCard.\\\\n\\\\tsubMenu add: 'delete this card' translated action: #deleteCard.\\\\n\\\\n\\\\tcontrolsShowing _ self hasSubmorphWithProperty: #pageControl.\\\\n\\\\tcontrolsShowing\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[subMenu add: 'hide card controls' translated action: #hidePageControls.\\\\n\\\\t\\\\t\\\\tsubMenu add: 'fewer card controls' translated action: #fewerPageControls]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[subMenu add: 'show card controls' translated action: #showPageControls].\\\\n\\\\n\\\\tsubMenu addLine.\\\\n\\\\tsubMenu add: 'sound effect for all backgrounds' translated action: #menuPageSoundForAll:.\\\\n\\\\tsubMenu add: 'sound effect this background only' translated action: #menuPageSoundForThisPage:.\\\\n\\\\tsubMenu add: 'visual effect for all backgrounds' translated action: #menuPageVisualForAll:.\\\\n\\\\tsubMenu add: 'visual effect this background only' translated action: #menuPageVisualForThisPage:.\\\\n\\\\n\\\\tsubMenu addLine.\\\\n\\\\tsubMenu add: 'sort pages' translated action: #sortPages:.\\\\n\\\\tsubMenu add: 'uncache page sorter' translated action: #uncachePageSorter.\\\\n\\\\t(self hasProperty: #dontWrapAtEnd)\\\\n\\\\t\\\\tifTrue: [subMenu add: 'wrap after last page' translated selector: #setWrapPages: argument: true]\\\\n\\\\t\\\\tifFalse: [subMenu add: 'stop at last page' translated selector: #setWrapPages: argument: false].\\\\n\\\\n\\\\tsubMenu  addUpdating: #showingFullScreenString action: #toggleFullScreen.\\\\n\\\\tsubMenu addLine.\\\\n\\\\tsubMenu add: 'search for text' translated action: #textSearch.\\\\n\\\\t(self primaryHand pasteBuffer class isKindOf: PasteUpMorph class) ifTrue:\\\\n\\\\t\\\\t[subMenu add: 'paste book page' translated action: #pasteBookPage].\\\\n\\\\n\\\\tsubMenu add: 'send all pages to server' translated action: #savePagesOnURL.\\\\n\\\\tsubMenu add: 'send this page to server' translated action: #saveOneOnURL.\\\\n\\\\tsubMenu add: 'reload all from server' translated action: #reload.\\\\n\\\\tsubMenu add: 'copy page url to clipboard' translated action: #copyUrl.\\\\n\\\\tsubMenu add: 'keep in one file' translated action: #keepTogether.\\\\n\\\\tsubMenu add: 'save as new-page prototype' translated action: #setNewPagePrototype.\\\\n\\\\tnewPagePrototype ifNotNil:\\\\n\\\\t\\\\t[subMenu add: 'clear new-page prototype' translated action: #clearNewPagePrototype].\\\\n\\\\n\\\\taMenu add: 'book...' translated subMenu: subMenu\\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'menu' stamp: 'sw 3/18/2002 02:06'!\\\\nfindText: wants\\\\n\\\\t\\\\\\\"Turn to the next card that has all of the strings mentioned on it.  Highlight where it is found.  allText and allTextUrls have been set.  Case insensitive search.\\\\n\\\\tResuming a search.  If container's text is still in the list and secondary keys are still in the page, (1) search rest of that container.  (2) search rest of containers on that page (3) pages till end of book, (4) from page 1 to this page again.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Later sort wants so longest key is first\\\\\\\"\\\\n\\\\t| allText good thisWord here fromHereOn startToHere oldContainer oldIndex otherKeys strings |\\\\n\\\\tallText _ self valueOfProperty: #allText ifAbsent: [#()].\\\\n\\\\there _ self privateCards identityIndexOf: self currentCard ifAbsent: [1].\\\\n\\\\tfromHereOn _ here+1 to: self privateCards size.\\\\n\\\\tstartToHere _ 1 to: here.\\\\t\\\\t\\\\\\\"repeat this page\\\\\\\"\\\\n\\\\t(self valueOfProperty: #searchKey ifAbsent: [#()]) = wants ifTrue: [\\\\n\\\\t\\\\t\\\\\\\"does page have all the other keys?  No highlight if found!!\\\\\\\"\\\\n\\\\t\\\\totherKeys _ wants allButFirst.\\\\n\\\\t\\\\tstrings _ allText at: here.\\\\n\\\\t\\\\tgood _ true.\\\\n\\\\t\\\\totherKeys do: [:searchString | \\\\\\\"each key\\\\\\\"\\\\n\\\\t\\\\t\\\\tgood ifTrue: [thisWord _ false.\\\\n\\\\t\\\\t\\\\t\\\\tstrings do: [:longString |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(longString findWordStart: searchString startingAt: 1) > 0 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tthisWord _ true]].\\\\n\\\\t\\\\t\\\\t\\\\tgood _ thisWord]].\\\\n\\\\t\\\\tgood ifTrue: [\\\\\\\"all are on this page.  Look in rest for string again.\\\\\\\"\\\\n\\\\t\\\\t\\\\toldContainer _ self valueOfProperty: #searchContainer.\\\\n\\\\t\\\\t\\\\toldIndex _ self valueOfProperty: #searchOffset.\\\\n\\\\t\\\\t\\\\t(self findText: (OrderedCollection with: wants first) inStrings: strings\\\\t\\\\n\\\\t\\\\t\\\\t\\\\tstartAt: oldIndex+1 container: oldContainer \\\\n\\\\t\\\\t\\\\t\\\\tcardNum: here) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself setProperty: #searchKey toValue: wants.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ true]]]\\\\n\\\\t\\\\tifFalse: [fromHereOn _ here to: self privateCards size].\\\\t\\\\\\\"do search this page\\\\\\\"\\\\n\\\\t\\\\\\\"other pages\\\\\\\"\\\\n\\\\tfromHereOn do: [:cardNum |\\\\n\\\\t\\\\t(self findText: wants inStrings: (allText at: cardNum) startAt: 1 container: nil \\\\n\\\\t\\\\t\\\\t\\\\tcardNum: cardNum) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [^ true]].\\\\n\\\\tstartToHere do: [:cardNum |\\\\n\\\\t\\\\t(self findText: wants inStrings: (allText at: cardNum) startAt: 1 container: nil \\\\n\\\\t\\\\t\\\\t\\\\tcardNum: cardNum) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [^ true]].\\\\n\\\\t\\\\\\\"if fail\\\\\\\"\\\\n\\\\tself setProperty: #searchContainer toValue: nil.\\\\n\\\\tself setProperty: #searchOffset toValue: nil.\\\\n\\\\tself setProperty: #searchKey toValue: nil.\\\\n\\\\t^ false! !\\\\n\\\\n!StackMorph methodsFor: 'menu' stamp: 'gm 2/22/2003 13:13'!\\\\nfindText: keys inStrings: rawStrings startAt: startIndex container: oldContainer cardNum: cardNum \\\\n\\\\t\\\\\\\"Call once to search a card of the stack.  Return true if found and highlight the text.  oldContainer should be NIL.  \\\\n\\\\t(oldContainer is only non-nil when (1) doing a 'search again' and (2) the page is in memory and (3) keys has just one element.  oldContainer is a TextMorph.)\\\\\\\"\\\\n\\\\n\\\\t| good thisWord index insideOf place container start strings old |\\\\n\\\\tgood := true.\\\\n\\\\tstart := startIndex.\\\\n\\\\tstrings := oldContainer ifNil: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"normal case\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\trawStrings]\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil: [self currentPage allStringsAfter: oldContainer text].\\\\n\\\\tkeys do: \\\\n\\\\t\\\\t\\\\t[:searchString | \\\\n\\\\t\\\\t\\\\t\\\\\\\"each key\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\tgood \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[thisWord := false.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstrings do: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:longString | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(index := longString findWordStart: searchString startingAt: start) > 0 \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[thisWord not & (searchString == keys first) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[insideOf := longString.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tplace := index].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tthisWord := true].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstart := 1].\\\\t\\\\\\\"only first key on first container\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tgood := thisWord]].\\\\n\\\\tgood \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"all are on this page\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\\\\"wasIn _ (pages at: pageNum) isInMemory.\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\tself goToCardNumber: cardNum\\\\n\\\\t\\\\t\\\\t\\\\\\\"wasIn ifFalse: ['search again, on the real current text.  Know page is in.'.\\\\n\\\\t\\\\t\\\\t^ self findText: keys \\\\n\\\\t\\\\t\\\\t\\\\tinStrings: ((pages at: pageNum) allStringsAfter: nil)         recompute it\\\\t\\\\n\\\\t\\\\t\\\\t\\\\tstartAt: startIndex container: oldContainer \\\\n\\\\t\\\\t\\\\t\\\\tpageNum: pageNum]\\\\\\\"].\\\\n\\\\t(old := self valueOfProperty: #searchContainer) ifNotNil: \\\\n\\\\t\\\\t\\\\t[(old respondsTo: #editor) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[old editor selectFrom: 1 to: 0.\\\\t\\\\\\\"trying to remove the previous selection!!\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\told changed]].\\\\n\\\\tgood \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"have the exact string object\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t(container := oldContainer) ifNil: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[container := self \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\thighlightText: keys first\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tat: place\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tin: insideOf]\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[container userString == insideOf \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[container := self \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\thighlightText: keys first\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tat: place\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tin: insideOf]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[(container isTextMorph) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[container editor selectFrom: place to: keys first size - 1 + place.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcontainer changed]]].\\\\n\\\\t\\\\t\\\\tself setProperty: #searchContainer toValue: container.\\\\n\\\\t\\\\t\\\\tself setProperty: #searchOffset toValue: place.\\\\n\\\\t\\\\t\\\\tself setProperty: #searchKey toValue: keys.\\\\t\\\\\\\"override later\\\\\\\"\\\\n\\\\t\\\\t\\\\tActiveHand newKeyboardFocus: container.\\\\n\\\\t\\\\t\\\\t^true].\\\\n\\\\t^false! !\\\\n\\\\n!StackMorph methodsFor: 'menu' stamp: 'em 3/31/2005 10:20'!\\\\nfindViaTemplate\\\\n\\\\t| list pl cardInst |\\\\n\\\\t\\\\\\\"Current card is the template.  Only search cards in this background. Look at cards directly (not allText). Key must be found in the same field as in the template.  HyperCard style (multiple starts of words).  \\\\n\\\\tPut results in a list, outside the stack.\\\\\\\"\\\\n\\\\n\\\\tlist _ self templateMatches.\\\\n\\\\tlist isEmpty ifTrue: [^ self inform: 'No matches were found.\\\\nBe sure the current card is mostly blank\\\\nand only has text you want to match.' translated]. \\\\n\\\\t\\\\\\\"put up a PluggableListMorph\\\\\\\"\\\\n\\\\tcardInst _ self currentCard.\\\\n\\\\tcardInst matchIndex: 0.\\\\t\\\\\\\"establish entries\\\\\\\"\\\\n\\\\tcardInst results at: 1 put: list.\\\\n\\\\tself currentPage setProperty: #myStack toValue: self.\\\\t\\\\\\\"way to get back\\\\\\\"\\\\n\\\\n\\\\tpl _ PluggableListMorph new\\\\n\\\\t\\\\t\\\\ton: cardInst list: #matchNames\\\\n\\\\t\\\\t\\\\tselected: #matchIndex changeSelected: #matchIndex:\\\\n\\\\t\\\\t\\\\tmenu: nil \\\\\\\"#matchMenu:shifted:\\\\\\\" keystroke: nil.\\\\n\\\\tActiveHand attachMorph: (self formatList: pl).\\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'menu' stamp: 'tk 6/2/2001 11:40'!\\\\nformatList: pl\\\\n\\\\t| rr ff |\\\\n\\\\t\\\\\\\"Turn this plugglable list into a good looking morph.\\\\\\\"\\\\n\\\\n\\\\tpl color: Color transparent; borderWidth: 0.\\\\n\\\\tpl font: ((TextStyle named: #Palatino) fontOfSize: 14).\\\\n\\\\tpl toggleCornerRounding; width: 252; retractableOrNot; hResizing: #spaceFill.\\\\n\\\\trr _ (RectangleMorph new) toggleCornerRounding; extent: pl extent + (30@30).\\\\n\\\\trr color: self currentPage color; fillStyle: (ff _ self currentPage fillStyle copy).\\\\n\\\\tff isGradientFill ifTrue: [\\\\n\\\\t\\\\trr fillStyle direction: (ff direction * self currentPage extent / rr extent) rounded.\\\\n\\\\t\\\\trr fillStyle origin: rr bounds origin].\\\\n\\\\trr addMorph: pl.\\\\n\\\\trr layoutPolicy: TableLayout new.\\\\n\\\\trr layoutInset: 10@15; cellInset: 10@15; wrapDirection: #leftToRight.\\\\n\\\\trr listCentering: #center; borderWidth: 5; borderColor: #raised.\\\\n\\\\t\\\\\\\"Up and down buttons on left with arrows in a holder.\\\\\\\"\\\\n\\\\t\\\\\\\"lb _ (RectangleMorph new) color: transparent; borderWidth: 0.\\\\\\\"\\\\n\\\\t^ rr! !\\\\n\\\\n!StackMorph methodsFor: 'menu' stamp: 'sw 3/18/2002 02:07'!\\\\ngetAllText\\\\n\\\\t\\\\\\\"Collect the text for each card.  Just point at strings so don't have to recopy them.  (Parallel array of urls for ID of cards.  Remote cards not working yet.)\\\\n\\\\tallText = Array (cards size) of arrays (fields in it) of strings of text.\\\\n\\\\tallTextUrls = Array (cards size) of urls or card numbers.\\\\\\\"\\\\n\\\\n\\\\t| oldUrls oldStringLists allText allTextUrls aUrl which |\\\\n\\\\tself writeSingletonData.\\\\n\\\\toldUrls _ self valueOfProperty: #allTextUrls ifAbsent: [#()].\\\\n\\\\toldStringLists _ self valueOfProperty: #allText ifAbsent: [#()].\\\\n\\\\tallText _ self privateCards collect: [:pg | OrderedCollection new].\\\\n\\\\tallTextUrls _ Array new: self privateCards size.\\\\n\\\\tself privateCards doWithIndex: [:aCard :ind | aUrl _ aCard url.  aCard isInMemory \\\\n\\\\t\\\\tifTrue: [(allText at: ind) addAll: (aCard allStringsAfter: nil).\\\\n\\\\t\\\\t\\\\taUrl ifNil: [aUrl _ ind].\\\\n\\\\t\\\\t\\\\tallTextUrls at: ind put: aUrl]\\\\n\\\\t\\\\tifFalse: [\\\\\\\"Order of cards on server may be different.  (later keep up to date?)\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\\\\"*** bug in this algorithm if delete a page?\\\\\\\"\\\\n\\\\t\\\\t\\\\twhich _ oldUrls indexOf: aUrl.\\\\n\\\\t\\\\t\\\\tallTextUrls at: ind put: aUrl.\\\\n\\\\t\\\\t\\\\twhich = 0 ifFalse: [allText at: ind put: (oldStringLists at: which)]]].\\\\n\\\\tself setProperty: #allText toValue: allText.\\\\n\\\\tself setProperty: #allTextUrls toValue: allTextUrls.\\\\n\\\\t^ allText! !\\\\n\\\\n!StackMorph methodsFor: 'menu' stamp: 'dgd 9/29/2004 20:47'!\\\\ninvokeBookMenu\\\\n\\\\t\\\\\\\"Invoke the book's control panel menu.\\\\\\\"\\\\n\\\\n\\\\t| aMenu |\\\\n\\\\taMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\taMenu addTitle: 'Stack' translated.\\\\n\\\\tPreferences noviceMode\\\\n\\\\t\\\\tifFalse: [aMenu addStayUpItem].\\\\n\\\\taMenu addList: {\\\\n\\\\t\\\\t{'find...' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#textSearch}.\\\\n\\\\t\\\\t{'find via this template' translated.\\\\t\\\\t\\\\t#findViaTemplate}.\\\\n\\\\t\\\\t{'show designations' translated. \\\\t\\\\t\\\\t#showDesignationsOfObjects}.\\\\n\\\\t\\\\t{'explain designations' translated.\\\\t\\\\t\\\\t#explainDesignations}.\\\\n\\\\t\\\\t#-.\\\\n\\\\t\\\\t{'previous card' translated. \\\\t\\\\t\\\\t\\\\t#goToPreviousCardInStack}.\\\\n\\\\t\\\\t{'next card' translated. \\\\t\\\\t\\\\t\\\\t#goToNextCardInStack}.\\\\n\\\\t\\\\t{'first card' translated. \\\\t\\\\t\\\\t\\\\t#goToFirstCardOfStack}.\\\\n\\\\t\\\\t{'last card' translated. \\\\t\\\\t\\\\t\\\\t#goToLastCardOfStack}.\\\\n\\\\t\\\\t{'go to card...' translated. \\\\t\\\\t\\\\t\\\\t#goToCard}.\\\\n\\\\t\\\\t#-.\\\\n\\\\t\\\\t{'add a card of this background' translated. \\\\t\\\\t#insertCard}.\\\\n\\\\t\\\\t{'add a card of background...' translated.\\\\t\\\\t#insertCardOfBackground}.\\\\n\\\\t\\\\t{'make a new background...' translated. \\\\t\\\\t#makeNewBackground}.\\\\n\\\\t\\\\t#-.\\\\n\\\\t\\\\t{'insert cards from clipboard data' translated.\\\\t\\\\t#addCardsFromClipboardData.\\\\t'Create new cards from a formatted string on the clipboard' translated}.\\\\n\\\\t\\\\t{'insert cards from a file...' translated.\\\\t\\\\t#addCardsFromAFile.\\\\t\\\\t'Create new cards from data in a file' translated}.\\\\n\\\\t\\\\t#-.\\\\n\\\\t\\\\t{'instance variable order...' translated.\\\\t\\\\t#changeInstVarOrder.\\\\t\\\\t'Caution -- DANGER. Change the order of the variables on the cards' translated}.\\\\n\\\\t\\\\t{'be defaults for new cards' translated. \\\\t\\\\t#beDefaultsForNewCards.\\\\t\\\\t'Make these current field values be the defaults for their respective fields on new cards' translated}.\\\\n\\\\t\\\\t    {'sort cards by...' translated.\\\\t\\\\t\\\\t#sortCards.\\\\t\\\\t\\\\t'Sort all the cards of the current background using some field as the sort key' translated}.\\\\n\\\\t\\\\t#-.\\\\n\\\\t\\\\t{'delete this card' translated. \\\\t\\\\t\\\\t#deleteCard}.\\\\n\\\\t\\\\t{'delete all cards *except* this one' translated.\\\\t#deleteAllCardsExceptThisOne}.\\\\n\\\\t\\\\t#-.\\\\n\\\\t\\\\t{'move card to front of stack' translated.\\\\t\\\\t#makeCurrentCardFirstInStack}.\\\\n\\\\t\\\\t{'move card to back of stack' translated.\\\\t\\\\t#makeCurrentCardLastInStack}.\\\\n\\\\t\\\\t{'move card one position earlier' translated.\\\\t\\\\t#moveCardOnePositionEarlier}.\\\\n\\\\t\\\\t{'move card one position later' translated.\\\\t\\\\t#moveCardOnePositionLater}.\\\\n\\\\t\\\\t#-.\\\\n\\\\t\\\\t{'scripts for this background' translated.\\\\t\\\\t#browseCardClass}.\\\\n\\\\t\\\\t#-.\\\\n\\\\t\\\\t{'debug...' translated.\\\\t\\\\t\\\\t\\\\t\\\\t#offerStackDebugMenu}.\\\\n\\\\t\\\\t{'bookish items...' translated. \\\\t\\\\t\\\\t#offerBookishMenu}}.\\\\n\\\\n\\\\taMenu addUpdating: #showingPageControlsString action: #toggleShowingOfPageControls.\\\\n\\\\taMenu addUpdating: #showingFullScreenString action: #toggleFullScreen.\\\\n\\\\n\\\\taMenu popUpEvent: self world activeHand lastEvent in: self world\\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'menu' stamp: 'dgd 4/4/2006 16:49'!\\\\nofferBookishMenu\\\\n\\\\t\\\\\\\"Offer a menu with book-related items in it\\\\\\\"\\\\n\\\\n\\\\t| aMenu |\\\\n\\\\taMenu := MenuMorph new defaultTarget: self.\\\\n\\\\taMenu addTitle: 'Stack / Book' translated.\\\\n\\\\tPreferences noviceMode\\\\n\\\\t\\\\tifFalse: [aMenu addStayUpItem].\\\\n\\\\taMenu addList:\\\\n\\\\t\\\\t#(('sort pages' sortPages)\\\\n\\\\t\\\\t('uncache page sorter' uncachePageSorter)).\\\\n\\\\t(self hasProperty: #dontWrapAtEnd)\\\\n\\\\t\\\\tifTrue: [aMenu add: 'wrap after last page' translated selector: #setWrapPages: argument: true]\\\\n\\\\t\\\\tifFalse: [aMenu add: 'stop at last page' translated selector: #setWrapPages: argument: false].\\\\n\\\\taMenu addList:\\\\n\\\\t\\\\t#(('make bookmark'\\\\t bookmarkForThisPage)\\\\n\\\\t\\\\t('make thumbnail' thumbnailForThisPage)).\\\\n\\\\n\\\\taMenu addLine.\\\\n\\\\taMenu add: 'sound effect for all pages' translated action: #menuPageSoundForAll:.\\\\n\\\\taMenu add: 'sound effect this page only' translated action: #menuPageSoundForThisPage:.\\\\n\\\\taMenu add: 'visual effect for all pages' translated action: #menuPageVisualForAll:.\\\\n\\\\taMenu add: 'visual effect this page only' translated action: #menuPageVisualForThisPage:.\\\\n\\\\n\\\\taMenu addLine.\\\\n\\\\t(self primaryHand pasteBuffer class isKindOf: PasteUpMorph class) ifTrue:\\\\n\\\\t\\\\t[aMenu add: 'paste book page'   translated action: #pasteBookPage].\\\\n\\\\n\\\\taMenu add: 'save as new-page prototype' translated action: #setNewPagePrototype.\\\\n\\\\tnewPagePrototype ifNotNil: [\\\\n\\\\t\\\\taMenu add: 'clear new-page prototype' translated action: #clearNewPagePrototype].\\\\n\\\\n\\\\taMenu add: (self dragNDropEnabled ifTrue: ['close' translated ] ifFalse: ['open' translated]) , ' dragNdrop' translated\\\\n\\\\t\\\\t\\\\taction: #toggleDragNDrop.\\\\n\\\\taMenu addLine.\\\\n\\\\taMenu add: 'make all pages this size' translated action: #makeUniformPageSize.\\\\n\\\\taMenu addUpdating: #keepingUniformPageSizeString target: self action: #toggleMaintainUniformPageSize.\\\\n\\\\taMenu addLine.\\\\n\\\\taMenu add: 'send all pages to server' translated action: #savePagesOnURL.\\\\n\\\\taMenu add: 'send this page to server' translated action: #saveOneOnURL.\\\\n\\\\taMenu add: 'reload all from server' translated action: #reload.\\\\n\\\\taMenu add: 'copy page url to clipboard' translated action: #copyUrl.\\\\n\\\\taMenu add: 'keep in one file' translated action: #keepTogether.\\\\n\\\\n\\\\taMenu addLine.\\\\n\\\\taMenu add: 'load PPT images from slide #1' translated action: #loadImagesIntoBook.\\\\n\\\\taMenu add: 'background color for all pages...' translated action: #setPageColor.\\\\n\\\\n\\\\taMenu popUpEvent: self world activeHand lastEvent in: self world\\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'menu' stamp: 'dgd 9/29/2004 20:47'!\\\\nofferStackDebugMenu\\\\n\\\\t\\\\\\\"Put up a menu offering debugging items for the stack\\\\\\\"\\\\n\\\\n\\\\t| aMenu |\\\\n\\\\taMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\taMenu addTitle: 'Stack debugging'.\\\\n\\\\tPreferences noviceMode\\\\n\\\\t\\\\tifFalse: [aMenu addStayUpItem].\\\\n\\\\taMenu addList: #(\\\\n\\\\t\\\\t('reassess'\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\treassessBackgroundShape)\\\\n\\\\t\\\\t('relax grip on variable names'\\\\t\\\\t\\\\trelaxGripOnVariableNames)\\\\n\\\\t\\\\t('commit card data'\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcommitCardData)\\\\n\\\\t\\\\t-\\\\n\\\\t\\\\t('browse card uniclass'\\\\t\\\\t\\\\t\\\\t\\\\tbrowseCardClass)\\\\n\\\\t\\\\t('inspect card'\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinspectCurrentCard)\\\\n\\\\t\\\\t('inspect background'\\\\t\\\\t\\\\t\\\\t\\\\tinspectCurrentBackground)\\\\n\\\\t\\\\t('inspect stack'\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinspectCurrentStack)).\\\\n\\\\taMenu popUpInWorld: (self world ifNil: [self currentWorld])\\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'menu' stamp: 'sw 3/18/2002 01:58'!\\\\ntemplateMatches\\\\n\\\\t| template docks keys bkg |\\\\n\\\\t\\\\\\\"Current card is the template.  Only search cards in this background. Look at cards directly (not allText). Key must be found in the same field as in the template.  HyperCard style (multiple starts of words).  \\\\n\\\\tPut results in a list, outside the stack.\\\\\\\"\\\\n\\\\n\\\\ttemplate _ self currentCard.\\\\n\\\\ttemplate commitCardPlayerData.\\\\n\\\\tdocks _ template class variableDocks.\\\\n\\\\t(keys _ template asKeys) ifNil: [^ #()]. \\\\\\\"nothing to match against\\\\\\\"\\\\n\\\\tbkg _ self currentPage.\\\\n\\\\t^ self privateCards select: [:cardPlayer | \\\\n\\\\t\\\\t(((cardPlayer == template) not) and: [cardPlayer costume == bkg]) \\\\n\\\\t\\\\t\\\\tand: [cardPlayer match: keys fields: docks]].\\\\n! !\\\\n\\\\n!StackMorph methodsFor: 'menu' stamp: 'sw 3/18/2002 02:00'!\\\\nwriteSingletonData\\\\n\\\\t\\\\\\\"Backgrounds that have just one card, may never get their data written into a CardPlayer. Make sure we do it.\\\\\\\"\\\\n\\\\n\\\\t| sieve |\\\\n\\\\tsieve _ IdentityDictionary new.\\\\n\\\\tpages do: [:pp | sieve at: pp put: 0].\\\\n\\\\tself privateCards do: [:cc | sieve at: cc costume put: (sieve at: cc costume) + 1].\\\\n\\\\tsieve associationsDo: [:ass | \\\\n\\\\t\\\\tass value = 1 ifTrue:\\\\n\\\\t\\\\t\\\\t[ass key player commitCardPlayerDataFrom: ass key]].\\\\n\\\\t\\\\t\\\\t\\\\\\\"If currently showing card, may be some trouble... <- tk note 5/01\\\\\\\"! !\\\\n\\\\n\\\\n!StackMorph methodsFor: 'page controls' stamp: 'sw 6/6/2003 13:59'!\\\\naddPageControlMorph: aMorph\\\\n\\\\n\\\\t\\\\\\\"Add the given morph as a page-control, at the appropriate place\\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\taMorph setProperty: #pageControl toValue: true.\\\\n\\\\n\\\\tself addPane: aMorph paneType: #pageControl! !\\\\n\\\\n!StackMorph methodsFor: 'page controls' stamp: 'tk 11/5/2001 08:21'!\\\\nfullControlSpecs\\\\n\\\\t\\\\\\\"Answer specifications for the long form of iconic stack/book controls\\\\\\\"\\\\n\\\\n\\\\t^ #(\\\\n\\\\t\\\\tspacer\\\\n\\\\t\\\\tvariableSpacer\\\\n\\\\t\\\\t('-'\\\\t\\\\t\\\\tdeleteCard\\\\t\\\\t\\\\t\\\\t\\\\t'Delete this card')\\\\n\\\\t\\\\tspacer\\\\n\\\\t\\\\t( '\\\\U00ab'\\\\t\\\\tgoToFirstCardOfStack\\\\t\\\\t\\\\t'First card')\\\\n\\\\t\\\\tspacer\\\\n\\\\t\\\\t( '<' \\\\t\\\\tgoToPreviousCardInStack\\\\t\\\\t'Previous card')\\\\n\\\\t\\\\tspacer\\\\n\\\\t\\\\t('\\\\U00b7'\\\\t\\\\t\\\\tinvokeBookMenu \\\\t\\\\t\\\\t'Click here to get a menu of options for this stack.')\\\\n\\\\t\\\\t\\\\\\\"spacer\\\\t('\\\\U00b6'\\\\t\\\\t\\\\treshapeBackground  \\\\t\\\\t'Reshape')\\\\t\\\\\\\"\\\\n\\\\n\\\\t\\\\tspacer\\\\n\\\\t\\\\t('\\\\U00a7'\\\\t\\\\t\\\\tshowDesignationsOfObjects \\\\t'Show designations')\\\\n\\\\t\\\\tspacer\\\\n\\\\t\\\\t('>'\\\\t\\\\t\\\\tgoToNextCardInStack\\\\t\\\\t\\\\t'Next card')\\\\n\\\\t\\\\tspacer\\\\n\\\\t\\\\t( '\\\\U00bb'\\\\t\\\\tgoToLastCardOfStack\\\\t\\\\t\\\\t'Final card')\\\\n\\\\t\\\\tspacer\\\\n\\\\t\\\\t('+'\\\\t\\\\t\\\\tinsertCard\\\\t\\\\t\\\\t\\\\t\\\\t'Add a new card after this one')\\\\n\\\\t\\\\tvariableSpacer\\\\n\\\\t\\\\t('\\\\U00b3'\\\\t\\\\t\\\\tfewerPageControls\\\\t\\\\t\\\\t'Fewer controls\\\\n(if shift key pressed,\\\\ndeletes controls)')\\\\n)! !\\\\n\\\\n!StackMorph methodsFor: 'page controls' stamp: 'sw 10/30/2000 10:09'!\\\\nshortControlSpecs\\\\n\\\\t\\\\\\\"Answer specficiations for the shorter form of stack controls\\\\\\\"\\\\n\\\\n\\\\t^ #(\\\\n\\\\t\\\\tspacer\\\\n\\\\t\\\\tvariableSpacer\\\\n\\\\t\\\\t( '<'\\\\t\\\\tgoToPreviousCardInStack\\\\t\\\\t'Previous card')\\\\n\\\\t\\\\tspacer\\\\n\\\\t\\\\t('\\\\U00b7'\\\\t\\\\tinvokeBookMenu \\\\t\\\\t\\\\t'Click here to get a menu for this stack.')\\\\n\\\\t\\\\tspacer\\\\n\\\\t\\\\t('>'\\\\t\\\\tgoToNextCardInStack\\\\t\\\\t\\\\t'Next card')\\\\n\\\\t\\\\tvariableSpacer\\\\n\\\\t\\\\t('\\\\U00b3'\\\\tshowMoreControls\\\\t\\\\t\\\\t\\\\t'More controls\\\\n(if shift key pressed,\\\\ndeletes controls)'))! !\\\\n\\\\n\\\\n!StackMorph methodsFor: 'parts bin' stamp: 'sw 8/2/2001 18:14'!\\\\ninitializeToStandAlone\\\\n\\\\t\\\\n\\\\tself initialize.\\\\n\\\\tself pageSize: (480 @ 320); color: (Color gray: 0.7).\\\\n\\\\tself borderWidth: 1; borderColor: Color black.\\\\n\\\\tself currentPage extent: self pageSize.\\\\n\\\\tself showPageControls: self fullControlSpecs.\\\\n\\\\t^ self\\\\n\\\\n\\\\\\\"StackMorph initializedInstance openInHand\\\\\\\"! !\\\\n\\\\n\\\\n!StackMorph methodsFor: 'submorphs-accessing' stamp: 'sw 3/18/2002 02:20'!\\\\nallNonSubmorphMorphs\\\\n\\\\t\\\\\\\"Return a collection containing all morphs in this morph which are not currently in the submorph containment hierarchy.  Especially the non-showing pages in BookMorphs.\\\\\\\"\\\\n\\\\n\\\\t| coll |\\\\n\\\\tcoll _ OrderedCollection new.\\\\n\\\\tself privateCards do: [:cd | \\\\n\\\\t\\\\tcd privateMorphs ifNotNil: [coll addAll: cd privateMorphs]].\\\\n\\\\t^ coll! !\\\\n\\\\n!StackMorph methodsFor: 'submorphs-accessing' stamp: 'sw 6/5/2003 04:01'!\\\\ninsertionIndexForPaneOfType: aType\\\\n\\\\n\\\\t| naturalIndex insertionIndex |\\\\n\\\\n\\\\tnaturalIndex _ self naturalPaneOrder indexOf: aType.\\\\n\\\\n\\\\tinsertionIndex _ 1.\\\\n\\\\n\\\\t(self naturalPaneOrder copyFrom: 1 to: (naturalIndex - 1)) do: \\\\\\\"guys that would precede\\\\\\\"\\\\n\\\\n\\\\t\\\\t[:sym | (self hasSubmorphWithProperty: sym)\\\\n\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t[insertionIndex _ insertionIndex + 1]].\\\\n\\\\n\\\\t^ insertionIndex! !\\\\n\\\\n!StackMorph methodsFor: 'submorphs-accessing' stamp: 'sw 6/5/2003 04:02'!\\\\nnaturalPaneOrder\\\\n\\\\n\\\\t^ #(header pageControl retrieve search index content)! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStackMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StackMorph class methodsFor: 'authoring prototype' stamp: 'nk 7/12/2003 08:59'!\\\\ndesignationsExplainer\\\\n\\\\t\\\\\\\"Answer a morph that contains designation explanation\\\\\\\"\\\\n\\\\n\\\\t| aMorph aSwatch aTextMorph |\\\\n\\\\taMorph _ AlignmentMorph newColumn color: Color black; layoutInset: 1.\\\\n\\\\t#((green\\\\t\\\\t\\\\n'Shared items on\\\\nBackground.\\\\nExact same item\\\\nshared by every card')\\\\n\\\\t(orange\\\\n'Data items on\\\\nBackground\\\\nEach card has its\\\\nown data')\\\\n\\\\t(red\\\\n'Instance-specific\\\\nitems\\\\nunique\\\\nto this card')) do:\\\\n\\\\n\\\\t[:aPair |\\\\n\\\\t\\\\taSwatch _ AlignmentMorph new extent: 132 @80; color: (Color perform: aPair first); lock.\\\\n\\\\t\\\\taSwatch hResizing: #rigid; vResizing: #rigid; layoutInset: 0.\\\\n\\\\t\\\\taSwatch borderColor: Color black.\\\\n\\\\t\\\\taTextMorph _ TextMorph new string: aPair second fontName: Preferences standardEToysFont familyName size: 18.\\\\n\\\\t\\\\taTextMorph width: 130.\\\\n\\\\t\\\\taTextMorph centered.\\\\n\\\\t\\\\taSwatch addMorphBack: aTextMorph.\\\\n\\\\t\\\\taMorph addMorphBack: aSwatch].\\\\n\\\\taMorph hResizing: #shrinkWrap; vResizing: #shrinkWrap.\\\\n\\\\n\\\\t^ aMorph\\\\n\\\\n\\\\t\\\\\\\"StackMorph designationsExplainer openInHand\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!StackMorph class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 11:30'!\\\\ninitialize\\\\n\\\\n\\\\tself registerInFlapsRegistry.\\\\t! !\\\\n\\\\n!StackMorph class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 11:36'!\\\\nregisterInFlapsRegistry\\\\n\\\\t\\\\\\\"Register the receiver in the system's flaps registry\\\\\\\"\\\\n\\\\tself environment\\\\n\\\\t\\\\tat: #Flaps\\\\n\\\\t\\\\tifPresent: [:cl | cl registerQuad: #(StackMorph\\\\tauthoringPrototype\\\\t'Stack'\\\\t\\\\t'A multi-card data base'\\\\t)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'Scripting'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcl registerQuad: #(StackMorph\\\\tauthoringPrototype\\\\t'Stack'\\\\t\\\\t'A multi-card data base'\\\\t)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'Stack Tools'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcl registerQuad: #(StackMorph\\\\tstackHelpWindow\\\\t'Stack Help'\\\\t'Some hints about how to use Stacks')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'Stack Tools'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcl registerQuad: #(StackMorph\\\\tpreviousCardButton\\\\t'Previous Card'\\\\t'A button that takes the user to the previous card in the stack')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'Stack Tools'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcl registerQuad: #(StackMorph\\\\tnextCardButton\\\\t'Next Card'\\\\t\\\\t'A button that takes the user to the next card in the stack')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'Stack Tools']! !\\\\n\\\\n!StackMorph class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 12:40'!\\\\nunload\\\\n\\\\t\\\\\\\"Unload the receiver from global registries\\\\\\\"\\\\n\\\\n\\\\tself environment at: #Flaps ifPresent: [:cl |\\\\n\\\\tcl unregisterQuadsWithReceiver: self] ! !\\\\n\\\\n\\\\n!StackMorph class methodsFor: 'misc' stamp: 'tk 12/14/2001 19:23'!\\\\ndiscoverSlots: aMorph\\\\n\\\\t\\\\\\\"Examine the parts of the morph for ones that couldHoldSeparateData.  Return a pair of lists: Named morphs, and unnamed morphs (which may be labels, and non-data).  Examine all submorphs.\\\\\\\"\\\\n\\\\n\\\\t| named unnamed got sn generic |\\\\n\\\\tnamed _ OrderedCollection new.\\\\n\\\\tunnamed _ OrderedCollection new.\\\\n\\\\taMorph submorphsDo: [:direct | \\\\n\\\\t\\\\tgot _ false.\\\\n\\\\t\\\\tdirect allMorphsDo: [:sub |\\\\n\\\\t\\\\t\\\\tsub couldHoldSeparateDataForEachInstance ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t(sn _ sub knownName) ifNotNil: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tgeneric _ (#('Number (fancy)' 'Number (mid)' 'Number (bare)')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tincludes: sn).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(sn beginsWith: 'shared' \\\\\\\"label\\\\\\\") | generic ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnamed add: sub.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tgot _ true]]]].\\\\n\\\\t\\\\tgot ifFalse: [unnamed add: direct]].\\\\n\\\\t^ Array with: named with: unnamed\\\\n\\\\t\\\\t! !\\\\n\\\\n\\\\n!StackMorph class methodsFor: 'navigation buttons' stamp: 'sw 10/27/2000 10:53'!\\\\nnextCardButton\\\\n\\\\t\\\\\\\"Answer a button that advances the user to the next card in the stack\\\\\\\"\\\\n\\\\n\\\\t| aButton |\\\\n\\\\taButton _ SimpleButtonMorph new.\\\\n\\\\taButton target: aButton; actionSelector: #goToNextCardInStack; label: '>'; color: Color yellow; borderWidth: 0.\\\\n\\\\taButton setNameTo: 'next'.\\\\n\\\\t^ aButton! !\\\\n\\\\n!StackMorph class methodsFor: 'navigation buttons' stamp: 'sw 10/27/2000 10:53'!\\\\npreviousCardButton\\\\n\\\\t\\\\\\\"Answer a button that will take the user to the preceding card in the stack\\\\\\\"\\\\n\\\\n\\\\t| aButton |\\\\n\\\\taButton _ SimpleButtonMorph new.\\\\n\\\\taButton target: aButton; actionSelector: #goToPreviousCardInStack; label: '<'; color: Color yellow ; borderWidth: 0.\\\\n\\\\taButton setNameTo: 'previous'.\\\\n\\\\t^ aButton! !\\\\n\\\\n\\\\n!StackMorph class methodsFor: 'parts bin' stamp: 'sw 8/2/2001 12:52'!\\\\ndescriptionForPartsBin\\\\n\\\\t^ self partName:\\\\t'Stack'\\\\n\\\\t\\\\tcategories:\\\\t\\\\t#('Presentation')\\\\n\\\\t\\\\tdocumentation:\\\\t'A database of any sort -- slide show, rolodex, and any point in between'! !\\\\n\\\\n!StackMorph class methodsFor: 'parts bin' stamp: 'sw 4/8/2002 09:30'!\\\\nstackHelpWindow\\\\n\\\\t^ (Workspace new contents: 'A \\\\\\\"stack\\\\\\\" is a place where you can create, store, view and retrieve data \\\\\\\"fields\\\\\\\" from a set of \\\\\\\"cards\\\\\\\".  Data that you want to occur on every card (such as a name and an address in an Address Stack) are represented by objects such as \\\\\\\"Simple Text\\\\\\\", \\\\\\\"Fancy Text\\\\\\\", and \\\\\\\"Scrolling Text\\\\\\\" that you obtain from the Stack Tools flap.\\\\n\\\\nWhen you look at a card in a Stack, you may be seeing three different kinds of material.  Press the \\\\U00a7 button in the stack''s controls to see the current designations, and use the \\\\\\\"explain designations\\\\\\\" to get a reminder of what the three different colors mean.\\\\n\\\\U00b7  Things that are designated to be seen on every card, and have the same contents whichever card is being shown. (green)\\\\n\\\\U00b7  Things that are designated to be seen on every card, with each card having its own value for them. (orange)\\\\n\\\\U00b7  Things that are designated to occur only on the particular card at hand. (red)\\\\n\\\\nUse the \\\\\\\"stack/cards\\\\\\\" menu (in an object''s halo menu) to change the designation of any object.  For example, if you have an object that is private to just one card, and you want to make it visible on all cards, use \\\\\\\"place onto background\\\\\\\".  If you further want it to hold a separate value for each separate card, use \\\\\\\"start holding separate data for each instance\\\\\\\".\\\\n\\\\nThe normal sequence to define a Stack''s structure is to obtain a blank Stack, then create your fields by grabbing what you want from the Stack Tools flap and dropping it where you want it in the stack.  For easiest use, give a name to each field (by editing the name in its halo) *before* you put it onto the background..  Those fields that you want to represent the basic data of the stack need to be given names, placed on the background, and then told to hold separate data.\\\\n\\\\nWhen you hit the + button in a stack''s controls, a new card is created with default values in all the fields.  You can arrange for a particular default value to be used in a field -- do this either for one field at a time with \\\\\\\"be default value on new card\\\\\\\", or you can request that the all the values seen on a particular card serve as default by choosing \\\\\\\"be defaults for new cards\\\\\\\" from the stack''s \\\\U00b7 menu.\\\\n\\\\nIt is also possible to have multiple \\\\\\\"backgrounds\\\\\\\" in the same stack -- each different background defines a different data structure, and cards from multiple backgrounds can be freely mixed in the same stack.\\\\n\\\\nBesides text fields, it is also possible to have picture-valued fields -- and potentially fields with data values of any other type as well.')\\\\n\\\\n\\\\tembeddedInMorphicWindowLabeled: 'Stack Help'\\\\n\\\\n\\\\t\\\\\\\"StackMorph stackHelpWindow\\\\\\\"! !\\\\n\\\\n\\\\n!StackMorph class methodsFor: 'scripting' stamp: 'sw 11/2/2002 15:47'!\\\\nadditionsToViewerCategories\\\\n\\\\t\\\\\\\"Answer a list of (<categoryName> <list of category specs>) pairs that characterize the phrases this kind of morph wishes to add to various Viewer categories.\\\\\\\"\\\\n\\\\n\\\\t^ # ((#'stack navigation'\\\\n\\\\t\\\\t\\\\t((command goToNextCardInStack 'Go to the next card')\\\\n\\\\t\\\\t\\\\t(command goToPreviousCardInStack  'Go to the previous card')\\\\n\\\\t\\\\t\\\\t(command goToFirstCardInBackground 'Go to the first card of the current background')\\\\n\\\\t\\\\t\\\\t(command goToFirstCardOfStack 'Go to the first card of the entire stack')\\\\n\\\\t\\\\t\\\\t(command goToLastCardInBackground 'Go to the last card of the current background')\\\\n\\\\t\\\\t\\\\t(command goToLastCardOfStack 'Go to the last card of the entire stack')\\\\n\\\\t\\\\t\\\\t(command deleteCard 'Delete the current card')\\\\n\\\\t\\\\t\\\\t(command insertCard 'Create a new card')\\\\n\\\\t\\\\t\\\\t(slot cardNumber 'The ordinal number of the current card' Number readWrite Player getCardNumber Player setCardNumber:))))! !\\\\n\\\\n!StackMorph class methodsFor: 'scripting' stamp: 'sw 10/9/2000 07:43'!\\\\nauthoringPrototype\\\\n\\\\t\\\\\\\"Answer an instance of the receiver suitable for placing in a parts bin for authors\\\\\\\"\\\\n\\\\t\\\\n\\\\t| book |\\\\n\\\\tbook _ self new markAsPartsDonor.\\\\n\\\\tbook pageSize: (480 @ 320); color: (Color gray: 0.7).\\\\n\\\\tbook borderWidth: 1; borderColor: Color black.\\\\n\\\\tbook currentPage extent: book pageSize.\\\\n\\\\tbook showPageControls: book fullControlSpecs.\\\\n\\\\t^ book\\\\n\\\\n\\\\\\\"self currentHand attachMorph: StackMorph authoringPrototype\\\\\\\"! !\\\\nTestCase subclass: #StackTest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'CollectionsTests-Stack'!\\\\n\\\\n!StackTest methodsFor: 'test' stamp: 'dc 6/21/2006 10:55'!\\\\ntestEmptyError\\\\n\\\\n\\\\t| aStack |\\\\n\\\\taStack := Stack new.\\\\n\\\\tself should: [ aStack top ] raise: Error.\\\\n\\\\tself should: [ aStack pop] raise: Error.\\\\n\\\\t\\\\n\\\\taStack push: 'element'.\\\\n\\\\t\\\\n\\\\tself shouldnt: [ aStack top ] raise: Error.\\\\n\\\\tself shouldnt: [ aStack pop] raise: Error.\\\\n\\\\t\\\\n\\\\t\\\\n\\\\t\\\\\\\"The stack is empty again due to previous pop\\\\\\\"\\\\n\\\\tself should: [ aStack top ] raise: Error.\\\\n\\\\tself should: [ aStack pop] raise: Error.! !\\\\n\\\\n!StackTest methodsFor: 'test' stamp: 'sd 3/21/2006 22:13'!\\\\ntestPop\\\\n\\\\n\\\\t| aStack res elem |\\\\n\\\\telem := 'anElement'.\\\\t\\\\n\\\\taStack := Stack new.\\\\n\\\\tself assert: aStack isEmpty.\\\\n\\\\t\\\\n\\\\taStack push: 'a'.\\\\n\\\\taStack push: elem.\\\\n\\\\tres := aStack pop.\\\\t\\\\n\\\\tself assert: res = elem.\\\\n\\\\tself assert: res == elem.\\\\n\\\\t\\\\n\\\\tself assert: aStack size = 1.\\\\n\\\\taStack pop.\\\\n\\\\tself assert: aStack isEmpty.\\\\n\\\\n! !\\\\n\\\\n!StackTest methodsFor: 'test' stamp: 'sd 3/21/2006 22:13'!\\\\ntestPush\\\\n\\\\t\\\\n\\\\t| aStack |\\\\n\\\\taStack := Stack new.\\\\n\\\\taStack push: 'a'.\\\\n\\\\tself assert: aStack size = 1.\\\\t\\\\n\\\\taStack push: 'b'.\\\\n\\\\tself assert: aStack size = 2.\\\\n\\\\t! !\\\\n\\\\n!StackTest methodsFor: 'test' stamp: 'sd 3/21/2006 22:13'!\\\\ntestSize\\\\n\\\\t\\\\n\\\\t| aStack |\\\\n\\\\taStack := Stack new.\\\\n\\\\tself assert: aStack size = 0.\\\\n\\\\taStack push: 'a'.\\\\n\\\\tself assert: aStack size = 1.\\\\n\\\\taStack push: 'b'.\\\\n\\\\tself assert: aStack size = 2.\\\\n\\\\taStack pop.\\\\n\\\\tself assert: aStack size = 1.\\\\n\\\\taStack pop.\\\\n\\\\tself assert: aStack size = 0.\\\\n\\\\n \\\\n\\\\t\\\\n\\\\n\\\\n! !\\\\n\\\\n!StackTest methodsFor: 'test' stamp: 'sd 3/21/2006 22:13'!\\\\ntestTop\\\\n\\\\n\\\\t| aStack |\\\\n\\\\taStack := Stack new.\\\\n\\\\tself assert: aStack isEmpty.\\\\n\\\\taStack push: 'a'.\\\\n\\\\taStack push: 'b'.\\\\n\\\\tself assert: aStack top = 'b'.\\\\n\\\\tself assert: aStack top = 'b'.\\\\n\\\\tself assert: aStack size = 2.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStackTest class\\\\n\\\\tinstanceVariableNames: 'testSize'!\\\\nSelectionMenu subclass: #StandardFileMenu\\\\n\\\\tinstanceVariableNames: 'canTypeFileName pattern'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-FileList'!\\\\n!StandardFileMenu commentStamp: 'mp 8/15/2005 18:44' prior: 0!\\\\nI represent a SelectionMenu which operates like a modal dialog for selecting files, somewhat similar to the StandardFile dialogs in MacOS and Java Swing.\\\\n\\\\nTry for example, the following:\\\\n\\\\n\\\\tStandardFileMenu oldFile inspect\\\\n\\\\n\\\\tStandardFileMenu oldFileStream inspect\\\\n\\\\n\\\\tStandardFileMenu newFile inspect\\\\n\\\\n\\\\tStandardFileMenu newFileStream inspect\\\\n\\\\t\\\\n\\\\t(StandardFileMenu oldFileMenu: FileDirectory default withPattern: '*') startUpWithCaption: 'Select a file:'\\\\n\\\\t\\\\n\\\\t(StandardFileMenu oldFileMenu: (FileDirectory default) withPatternList: {'*.txt'. '*.changes'}) startUpWithCaption: 'Select a file:'\\\\n!\\\\n\\\\n\\\\n!StandardFileMenu methodsFor: 'basic control sequences' stamp: 'rbb 2/16/2005 16:59'!\\\\nconfirmExistingFiles: aResult\\\\n\\\\n\\\\t|choice|\\\\n\\\\t(aResult directory fileExists: aResult name) ifFalse: [^aResult].\\\\n\\\\t\\\\n\\\\tchoice _ (UIManager default chooseFrom: #('overwrite that file' 'choose another name'\\\\n 'cancel')\\\\n\\\\t\\\\ttitle: aResult name, '\\\\nalready exists.').\\\\n\\\\n\\\\tchoice = 1 ifTrue: [\\\\n\\\\t\\\\taResult directory \\\\n\\\\t\\\\t\\\\tdeleteFileNamed: aResult name\\\\n\\\\t\\\\t\\\\tifAbsent: \\\\n\\\\t\\\\t\\\\t\\\\t[^self startUpWithCaption: \\\\n'Can''t delete ', aResult name, '\\\\nSelect another file'].\\\\n\\\\t\\\\t^aResult].\\\\n\\\\tchoice = 2 ifTrue: [^self startUpWithCaption: 'Select Another File'].\\\\n\\\\t^nil\\\\n ! !\\\\n\\\\n!StandardFileMenu methodsFor: 'basic control sequences' stamp: 'rbb 3/1/2005 11:14'!\\\\ngetTypedFileName: aResult\\\\n\\\\n\\\\t| name |\\\\n\\\\tname := UIManager default \\\\n\\\\t\\\\trequest: 'Enter a new file name' \\\\n\\\\t\\\\tinitialAnswer: ''.\\\\n\\\\tname = '' ifTrue: [^self startUpWithCaption: 'Select a File:' translated].\\\\n\\\\tname := aResult directory fullNameFor: name.\\\\n\\\\t^ StandardFileMenuResult\\\\n\\\\t\\\\t\\\\tdirectory: (FileDirectory forFileName: name)\\\\n\\\\t\\\\t\\\\tname: (FileDirectory localNameFor: name)\\\\n! !\\\\n\\\\n!StandardFileMenu methodsFor: 'basic control sequences' stamp: 'acg 9/28/1999 23:34'!\\\\nstartUpWithCaption: aString at: location\\\\n\\\\n\\\\t|result|\\\\n\\\\tresult _ super startUpWithCaption: aString at: location.\\\\n\\\\tresult ifNil: [^nil].\\\\n\\\\tresult isDirectory ifTrue:\\\\n\\\\t\\\\t[self makeFileMenuFor: result directory.\\\\n\\\\t\\\\t self computeForm.\\\\n\\\\t\\\\t ^self startUpWithCaption: aString at: location].\\\\n\\\\tresult isCommand ifTrue: \\\\n\\\\t\\\\t[result _ self getTypedFileName: result.\\\\n\\\\t\\\\tresult ifNil: [^nil]].\\\\n\\\\tcanTypeFileName ifTrue: [^self confirmExistingFiles: result].\\\\n\\\\t^result\\\\n\\\\t! !\\\\n\\\\n\\\\n!StandardFileMenu methodsFor: 'menu building' stamp: 'di 5/12/2000 10:31'!\\\\ndirectoryNamesString: aDirectory\\\\n\\\\\\\"Answer a string concatenating the directory name strings in aDirectory, each string followed by a '[...]' indicator, and followed by a cr.\\\\\\\"\\\\n\\\\n\\\\t^ String streamContents:\\\\n\\\\t\\\\t[:s | aDirectory directoryNames do: \\\\n\\\\t\\\\t\\\\t\\\\t[:dn | s nextPutAll: dn withBlanksTrimmed , ' [...]'; cr]]\\\\n\\\\n! !\\\\n\\\\n!StandardFileMenu methodsFor: 'menu building' stamp: 'zz 8/15/2005 17:33'!\\\\nfileNamesString: aDirectory\\\\n\\\\\\\"Answer a string concatenating the file name strings in aDirectory, each string followed by a cr.\\\\\\\"\\\\n\\\\n\\\\t^String streamContents:\\\\n\\\\t\\\\t[:s | \\\\n\\\\t\\\\t\\\\taDirectory fileNames do: \\\\n\\\\t\\\\t\\\\t\\\\t[:fn |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpattern do:[:each | (each match: fn) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ts nextPutAll: fn withBlanksTrimmed; cr]]]]\\\\n\\\\t\\\\t! !\\\\n\\\\n!StandardFileMenu methodsFor: 'menu building' stamp: 'zz 8/15/2005 16:28'!\\\\nmakeFileMenuFor: aDirectory\\\\n\\\\\\\"Initialize an instance of me to operate on aDirectory\\\\\\\"\\\\n\\\\n\\\\t| theMenu |\\\\n\\\\tpattern ifNil: [pattern := {'*'}].\\\\n\\\\tCursor wait showWhile: \\\\n\\\\t\\\\t[self \\\\n\\\\t\\\\t\\\\tlabels: \\\\t(self menuLabelsString: aDirectory)\\\\n\\\\t\\\\t\\\\tfont: \\\\t(MenuStyle fontAt: 1) \\\\n\\\\t\\\\t\\\\tlines: \\\\t(self menuLinesArray: aDirectory).\\\\n\\\\t\\\\ttheMenu := self selections: (self menuSelectionsArray: aDirectory)].\\\\n\\\\t^theMenu! !\\\\n\\\\n!StandardFileMenu methodsFor: 'menu building' stamp: 'acg 4/15/1999 21:57'!\\\\nmenuLabelsString: aDirectory\\\\n\\\\\\\"Answer a menu labels object corresponding to aDirectory\\\\\\\"\\\\n\\\\n\\\\t^ String streamContents: \\\\n\\\\t\\\\t[:s | \\\\n\\\\t\\\\t\\\\tcanTypeFileName ifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t[s nextPutAll: 'Enter File Name...'; cr].\\\\n\\\\t\\\\t\\\\ts nextPutAll: (self pathPartsString: aDirectory).\\\\n\\\\t\\\\t\\\\ts nextPutAll: (self directoryNamesString: aDirectory).\\\\n\\\\t\\\\t\\\\ts nextPutAll: (self fileNamesString: aDirectory).\\\\n\\\\t\\\\t\\\\ts skip: -1]! !\\\\n\\\\n!StandardFileMenu methodsFor: 'menu building' stamp: 'tpr 11/28/2003 15:12'!\\\\nmenuLinesArray: aDirectory\\\\n\\\\\\\"Answer a menu lines object corresponding to aDirectory\\\\\\\"\\\\n\\\\n\\\\t| typeCount nameCnt dirDepth|\\\\n\\\\ttypeCount _ canTypeFileName \\\\n\\\\t\\\\tifTrue: [1] \\\\n\\\\t\\\\tifFalse: [0].\\\\n\\\\tnameCnt _ aDirectory directoryNames size.\\\\n\\\\tdirDepth _ aDirectory pathParts size.\\\\n\\\\t^Array streamContents: [:s |\\\\n\\\\t\\\\tcanTypeFileName ifTrue: [s nextPut: 1].\\\\n\\\\t\\\\ts nextPut: dirDepth + typeCount + 1.\\\\n\\\\t\\\\ts nextPut: dirDepth + nameCnt + typeCount + 1]! !\\\\n\\\\n!StandardFileMenu methodsFor: 'menu building' stamp: 'zz 8/15/2005 18:18'!\\\\nmenuSelectionsArray: aDirectory\\\\n\\\\\\\"Answer a menu selections object corresponding to aDirectory.  The object is an array corresponding to each item, each element itself constituting a two-element array, the first element of which contains a selector to operate on and the second element of which contains the parameters for that selector.\\\\\\\"\\\\n\\\\n\\\\t|dirSize|\\\\n\\\\tdirSize := aDirectory pathParts size.\\\\n\\\\t^Array streamContents: [:s |\\\\n\\\\t\\\\tcanTypeFileName ifTrue:\\\\n\\\\t\\\\t\\\\t[s nextPut: (StandardFileMenuResult\\\\n\\\\t\\\\t\\\\t\\\\tdirectory: aDirectory\\\\n\\\\t\\\\t\\\\t\\\\tname: nil)].\\\\n\\\\t\\\\ts nextPut: (StandardFileMenuResult\\\\n\\\\t\\\\t\\\\tdirectory: (FileDirectory root)\\\\n\\\\t\\\\t\\\\tname: '').\\\\n\\\\t\\\\taDirectory pathParts doWithIndex: \\\\n\\\\t\\\\t\\\\t[:d :i | s nextPut: (StandardFileMenuResult\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdirectory: (self \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tadvance: dirSize - i\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcontainingDirectoriesFrom: aDirectory)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tname: '')].\\\\n\\\\t\\\\taDirectory directoryNames do: \\\\n\\\\t\\\\t\\\\t[:dn |  s nextPut: (StandardFileMenuResult\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdirectory: (FileDirectory on: (aDirectory fullNameFor: dn))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tname: '')].\\\\n\\\\t\\\\taDirectory fileNames do: \\\\n\\\\t\\\\t\\\\t[:fn | pattern do: [:pat | (pat match: fn) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ts nextPut: (StandardFileMenuResult\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdirectory: aDirectory\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tname: fn)]]]]! !\\\\n\\\\n!StandardFileMenu methodsFor: 'menu building' stamp: 'acg 4/15/1999 21:03'!\\\\npathPartsString: aDirectory\\\\n\\\\\\\"Answer a string concatenating the path parts strings in aDirectory, each string followed by a cr.\\\\\\\"\\\\n\\\\n\\\\t^String streamContents:\\\\n\\\\t\\\\t[:s | \\\\n\\\\t\\\\t\\\\ts nextPutAll: '[]'; cr.\\\\n\\\\t\\\\t\\\\taDirectory pathParts asArray doWithIndex: \\\\n\\\\t\\\\t\\\\t\\\\t[:part :i |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ts next: i put: $ .\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ts nextPutAll: part withBlanksTrimmed; cr]]! !\\\\n\\\\n\\\\n!StandardFileMenu methodsFor: 'private' stamp: 'acg 4/15/1999 00:32'!\\\\nadvance: anInteger containingDirectoriesFrom: aDirectory\\\\n\\\\n\\\\t| theDirectory |\\\\n\\\\ttheDirectory _ aDirectory.\\\\n\\\\t1 to: anInteger do: [:i | theDirectory _ theDirectory containingDirectory].\\\\n\\\\t^theDirectory! !\\\\n\\\\n!StandardFileMenu methodsFor: 'private' stamp: 'acg 4/15/1999 20:50'!\\\\ncomputeLabelParagraph\\\\n\\\\t\\\\\\\"Answer a Paragraph containing this menu's labels, one per line and centered.\\\\\\\"\\\\n\\\\n\\\\t^ Paragraph withText: labelString asText style: (MenuStyle leftFlush)! !\\\\n\\\\n!StandardFileMenu methodsFor: 'private' stamp: 'acg 4/15/1999 22:03'!\\\\nnewFileFrom: aDirectory\\\\n\\\\n\\\\tcanTypeFileName _ true.\\\\n\\\\t^self makeFileMenuFor: aDirectory! !\\\\n\\\\n!StandardFileMenu methodsFor: 'private' stamp: 'zz 8/15/2005 18:25'!\\\\nnewFileFrom: aDirectory withPatternList: aPatternList\\\\n\\\\n\\\\tcanTypeFileName := true.\\\\n\\\\tpattern := aPatternList.\\\\n\\\\t^self makeFileMenuFor: aDirectory! !\\\\n\\\\n!StandardFileMenu methodsFor: 'private' stamp: 'zz 8/15/2005 16:29'!\\\\nnewFileFrom: aDirectory withPattern: aPattern\\\\n\\\\n\\\\tcanTypeFileName := true.\\\\n\\\\tpattern := {aPattern}.\\\\n\\\\t^self makeFileMenuFor: aDirectory! !\\\\n\\\\n!StandardFileMenu methodsFor: 'private' stamp: 'acg 4/15/1999 22:03'!\\\\noldFileFrom: aDirectory\\\\n\\\\n\\\\tcanTypeFileName _ false.\\\\n\\\\t^self makeFileMenuFor: aDirectory! !\\\\n\\\\n!StandardFileMenu methodsFor: 'private' stamp: 'zz 8/15/2005 17:28'!\\\\noldFileFrom: aDirectory withPatternList: aPatternList\\\\n\\\\n\\\\tcanTypeFileName := false.\\\\n\\\\tpattern := aPatternList.\\\\n\\\\t^self makeFileMenuFor: aDirectory! !\\\\n\\\\n!StandardFileMenu methodsFor: 'private' stamp: 'zz 8/15/2005 16:28'!\\\\noldFileFrom: aDirectory withPattern: aPattern\\\\n\\\\n\\\\tcanTypeFileName := false.\\\\n\\\\tpattern := {aPattern}.\\\\n\\\\t^self makeFileMenuFor: aDirectory! !\\\\n\\\\n!StandardFileMenu methodsFor: 'private' stamp: 'zz 8/15/2005 17:29'!\\\\npatternList: aPatternList\\\\n\\\\n\\\\tpattern := aPatternList! !\\\\n\\\\n!StandardFileMenu methodsFor: 'private' stamp: 'zz 8/15/2005 16:31'!\\\\npattern: aPattern\\\\n\\\\t\\\\\\\" * for all files, or '*.cs' for changeSets, etc.  Just like fileLists\\\\\\\"\\\\n\\\\n\\\\tpattern := {aPattern}! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStandardFileMenu class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StandardFileMenu class methodsFor: 'instance creation' stamp: 'sma 4/30/2000 10:14'!\\\\nnewFileMenu: aDirectory\\\\n\\\\tSmalltalk isMorphic ifFalse: [^ PluggableFileList newFileMenu: aDirectory].\\\\n\\\\t^ super new newFileFrom: aDirectory! !\\\\n\\\\n!StandardFileMenu class methodsFor: 'instance creation' stamp: 'zz 8/15/2005 18:21'!\\\\nnewFileMenu: aDirectory withPatternList: aPatternList\\\\n\\\\tSmalltalk isMorphic ifFalse: [^ PluggableFileList newFileMenu: aDirectory].\\\\n\\\\t^ super new newFileFrom: aDirectory withPatternList: aPatternList! !\\\\n\\\\n!StandardFileMenu class methodsFor: 'instance creation' stamp: 'rww 9/23/2001 09:56'!\\\\nnewFileMenu: aDirectory withPattern: aPattern\\\\n\\\\tSmalltalk isMorphic ifFalse: [^ PluggableFileList newFileMenu: aDirectory].\\\\n\\\\t^ super new newFileFrom: aDirectory withPattern: aPattern! !\\\\n\\\\n!StandardFileMenu class methodsFor: 'instance creation' stamp: 'sma 4/30/2000 10:15'!\\\\noldFileMenu: aDirectory\\\\n\\\\tSmalltalk isMorphic ifFalse: [^ PluggableFileList oldFileMenu: aDirectory].\\\\n\\\\t^ super new oldFileFrom: aDirectory! !\\\\n\\\\n!StandardFileMenu class methodsFor: 'instance creation' stamp: 'zz 8/15/2005 17:41'!\\\\noldFileMenu: aDirectory withPatternList: aPatternList\\\\n\\\\n\\\\tSmalltalk isMorphic ifFalse: [^PluggableFileList oldFileMenu: aDirectory].\\\\n\\\\t^super new oldFileFrom: aDirectory withPatternList: aPatternList! !\\\\n\\\\n!StandardFileMenu class methodsFor: 'instance creation' stamp: 'RAA 5/25/2000 09:30'!\\\\noldFileMenu: aDirectory withPattern: aPattern\\\\n\\\\n\\\\tSmalltalk isMorphic ifFalse: [^PluggableFileList oldFileMenu: aDirectory].\\\\n\\\\t^super new oldFileFrom: aDirectory withPattern: aPattern! !\\\\n\\\\n\\\\n!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'tk 2/14/2000 14:28'!\\\\nnewFile\\\\n\\\\n\\\\t^self newFileFrom: (FileDirectory default)! !\\\\n\\\\n!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'dgd 9/21/2003 13:17'!\\\\nnewFileFrom: aDirectory\\\\n\\\\n\\\\t^(self newFileMenu: aDirectory)\\\\n\\\\t\\\\tstartUpWithCaption: 'Select a File:' translated! !\\\\n\\\\n!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'acg 4/15/1999 22:18'!\\\\nnewFileStream\\\\n\\\\n\\\\t^self newFileStreamFrom: (FileDirectory default)! !\\\\n\\\\n!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'tk 2/14/2000 14:28'!\\\\nnewFileStreamFrom: aDirectory\\\\n\\\\n\\\\t| sfmResult fileStream |\\\\n\\\\tsfmResult _ self newFileFrom: aDirectory.\\\\n\\\\tsfmResult ifNil: [^nil].\\\\n\\\\tfileStream _ sfmResult directory newFileNamed: sfmResult name.\\\\n\\\\t[fileStream isNil] whileTrue:\\\\n\\\\t\\\\t[sfmResult _ self newFileFrom: aDirectory.\\\\n\\\\t\\\\tsfmResult ifNil: [^nil].\\\\n\\\\t\\\\tfileStream _ sfmResult directory newFileNamed: sfmResult name].\\\\n\\\\t^fileStream\\\\n! !\\\\n\\\\n!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'tk 2/14/2000 14:28'!\\\\noldFile\\\\n\\\\n\\\\t^self oldFileFrom: (FileDirectory default)! !\\\\n\\\\n!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'dgd 9/21/2003 13:17'!\\\\noldFileFrom: aDirectory\\\\n\\\\n\\\\t^(self oldFileMenu: aDirectory)\\\\n\\\\t\\\\tstartUpWithCaption: 'Select a File:' translated! !\\\\n\\\\n!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'MM 4/6/2004 22:56'!\\\\noldFileFrom: aDirectory withPattern: aPattern\\\\n\\\\\\\"\\\\nSelect an existing file from a selection conforming to aPattern.\\\\n\\\\\\\"\\\\n\\\\t^(self oldFileMenu: aDirectory withPattern: aPattern)\\\\n\\\\t\\\\tstartUpWithCaption: 'Select a File:' translated! !\\\\n\\\\n!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'acg 4/15/1999 22:17'!\\\\noldFileStream\\\\n\\\\n\\\\t^self oldFileStreamFrom: (FileDirectory default)\\\\n! !\\\\n\\\\n!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'tk 2/14/2000 14:27'!\\\\noldFileStreamFrom: aDirectory\\\\n\\\\n\\\\t| sfmResult fileStream |\\\\n\\\\tsfmResult _ self oldFileFrom: aDirectory.\\\\n\\\\tsfmResult ifNil: [^nil].\\\\n\\\\tfileStream _ sfmResult directory oldFileNamed: sfmResult name.\\\\n\\\\t[fileStream isNil] whileTrue:\\\\n\\\\t\\\\t[sfmResult _ self oldFileFrom: aDirectory.\\\\n\\\\t\\\\tsfmResult ifNil: [^nil].\\\\n\\\\t\\\\tfileStream _ sfmResult directory oldFileNamed: sfmResult name].\\\\n\\\\t^fileStream\\\\n! !\\\\nObject subclass: #StandardFileMenuResult\\\\n\\\\tinstanceVariableNames: 'directory name'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-FileList'!\\\\n\\\\n!StandardFileMenuResult methodsFor: 'accessing' stamp: 'acg 4/15/1999 08:43'!\\\\ndirectory\\\\n\\\\n\\\\t^directory! !\\\\n\\\\n!StandardFileMenuResult methodsFor: 'accessing' stamp: 'acg 4/15/1999 08:43'!\\\\ndirectory: aDirectory\\\\n\\\\n\\\\t^directory _ aDirectory! !\\\\n\\\\n!StandardFileMenuResult methodsFor: 'accessing' stamp: 'acg 4/15/1999 08:43'!\\\\nname\\\\n\\\\n\\\\t^name! !\\\\n\\\\n!StandardFileMenuResult methodsFor: 'accessing' stamp: 'acg 4/15/1999 08:43'!\\\\nname: aString\\\\n\\\\n\\\\t^name _ aString! !\\\\n\\\\n!StandardFileMenuResult methodsFor: 'accessing' stamp: 'sw 6/9/1999 11:50'!\\\\nprintOn: aStream\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream nextPutAll: ' with directory: '.\\\\n\\\\tdirectory printOn: aStream.\\\\n\\\\taStream nextPutAll: ' name: '.\\\\n\\\\tname printOn: aStream\\\\n\\\\n\\\\\\\"StandardFileMenu oldFile\\\\\\\"! !\\\\n\\\\n\\\\n!StandardFileMenuResult methodsFor: 'testing' stamp: 'acg 4/15/1999 09:05'!\\\\nisCommand\\\\n\\\\n\\\\t^name isNil! !\\\\n\\\\n!StandardFileMenuResult methodsFor: 'testing' stamp: 'acg 4/15/1999 20:57'!\\\\nisDirectory\\\\n\\\\n\\\\t^name = ''! !\\\\n\\\\n\\\\n!StandardFileMenuResult methodsFor: 'private' stamp: 'acg 4/15/1999 08:42'!\\\\ndirectory: aDirectory name: aString\\\\n\\\\n\\\\tdirectory _ aDirectory.\\\\n\\\\tname _ aString.\\\\n\\\\t^self! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStandardFileMenuResult class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StandardFileMenuResult class methodsFor: 'instance creation' stamp: 'acg 4/15/1999 08:42'!\\\\ndirectory: aDirectory name: aString\\\\n\\\\n\\\\t^super new directory: aDirectory name: aString! !\\\\nFileStream subclass: #StandardFileStream\\\\n\\\\tinstanceVariableNames: 'name fileID buffer1'\\\\n\\\\tclassVariableNames: 'Registry'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Files-Kernel'!\\\\n!StandardFileStream commentStamp: '<historical>' prior: 0!\\\\nProvides a simple, platform-independent, interface to a file system.  This initial version ignores issues of Directories etc.  The instance-variable fallbackStream at the moment holds an instance of HFSMacFileStream, to bridge us to the new world while in the old.  The instance variable rwmode, inherited from class PositionableStream, here is used to hold a Boolean -- true means opened for read-write, false means opened for read-only.  2/12/96 sw!\\\\n\\\\n\\\\n!StandardFileStream methodsFor: 'access' stamp: 'jm 9/21/1998 14:16'!\\\\ndirectory\\\\n\\\\t\\\\\\\"Return the directory containing this file.\\\\\\\"\\\\n\\\\n\\\\t^ FileDirectory forFileName: self fullName\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'access' stamp: 'tk 3/14/2000 23:31'!\\\\ndirectoryUrl\\\\n\\\\n\\\\t^ self directory url! !\\\\n\\\\n!StandardFileStream methodsFor: 'access'!\\\\nfile\\\\n\\\\t\\\\\\\"Answer the object representing the receiver's file.  Need for compatibility with some calls -- check senders.  2/14/96 sw\\\\\\\"\\\\n\\\\n\\\\t^ self! !\\\\n\\\\n!StandardFileStream methodsFor: 'access' stamp: 'jm 9/21/1998 14:19'!\\\\nfullName\\\\n\\\\t\\\\\\\"Answer this file's full path name.\\\\\\\"\\\\n\\\\n\\\\t^ name\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'access'!\\\\nisDirectory\\\\n\\\\t\\\\\\\"Answer whether the receiver represents a directory.  For the post-transition case, uncertain what to do.  2/14/96 sw\\\\\\\"\\\\n\\\\t^ false! !\\\\n\\\\n!StandardFileStream methodsFor: 'access' stamp: 'ar 11/24/1998 14:00'!\\\\nlocalName\\\\n\\\\t^ name ifNotNil: [(name findTokens: FileDirectory pathNameDelimiter asString) last]! !\\\\n\\\\n!StandardFileStream methodsFor: 'access' stamp: 'jm 9/21/1998 14:19'!\\\\nname\\\\n\\\\t\\\\\\\"Answer this file's full path name.\\\\\\\"\\\\n\\\\n\\\\t^ name\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'access' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\npeekFor: item \\\\n\\\\t\\\\\\\"Answer false and do not advance if the next element is not equal to item, or if this stream is at the end.  If the next element is equal to item, then advance over it and return true\\\\\\\"\\\\n\\\\t| next |\\\\n\\\\t\\\\\\\"self atEnd ifTrue: [^ false]. -- SFStream will give nil\\\\\\\"\\\\n\\\\t(next := self next) == nil ifTrue: [^ false].\\\\n\\\\titem = next ifTrue: [^ true].\\\\n\\\\tself skip: -1.\\\\n\\\\t^ false! !\\\\n\\\\n!StandardFileStream methodsFor: 'access'!\\\\nprintOn: aStream\\\\n\\\\t\\\\\\\"Put a printed version of the receiver onto aStream.  1/31/96 sw\\\\\\\"\\\\n\\\\n\\\\taStream nextPutAll: self class name; nextPutAll: ': '; print: name! !\\\\n\\\\n!StandardFileStream methodsFor: 'access' stamp: 'ar 6/16/2002 18:58'!\\\\nreset\\\\n\\\\tself ensureOpen.\\\\n\\\\tself position: 0.! !\\\\n\\\\n!StandardFileStream methodsFor: 'access'!\\\\nsize\\\\n\\\\t\\\\\\\"Answer the size of the file in characters.  2/12/96 sw\\\\\\\"\\\\n\\\\n\\\\t^ self primSize: fileID! !\\\\n\\\\n\\\\n!StandardFileStream methodsFor: 'browser requests' stamp: 'mir 1/11/2000 10:44'!\\\\ndefaultBrowserReadyWait\\\\n\\\\t^5000! !\\\\n\\\\n!StandardFileStream methodsFor: 'browser requests' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\npost: data target: target url: url ifError: errorBlock\\\\n\\\\t\\\\\\\"Post data to the given URL. The returned file stream contains the reply of the server.\\\\n\\\\tIf Squeak is not running in a browser evaluate errorBlock\\\\\\\"\\\\n\\\\t| sema index request result |\\\\n\\\\tself waitBrowserReadyFor: self defaultBrowserReadyWait ifFail: [^errorBlock value].\\\\n\\\\tsema := Semaphore new.\\\\n\\\\tindex := Smalltalk registerExternalObject: sema.\\\\n\\\\trequest := self primURLPost: url target: target data: data semaIndex: index.\\\\n\\\\trequest == nil ifTrue:[\\\\n\\\\t\\\\n\\\\tSmalltalk unregisterExternalObject: sema.\\\\n\\\\t\\\\t^errorBlock value.\\\\n\\\\t] ifFalse:[\\\\n\\\\t\\\\t[sema wait. \\\\\\\"until something happens\\\\\\\"\\\\n\\\\t\\\\tresult := self primURLRequestState: request.\\\\n\\\\t\\\\tresult == nil] whileTrue.\\\\n\\\\t\\\\tresult ifTrue:[fileID := self primURLRequestFileHandle: request].\\\\n\\\\t\\\\tself primURLRequestDestroy: request.\\\\n\\\\t].\\\\n\\\\tSmalltalk unregisterExternalObject: sema.\\\\n\\\\tfileID == nil ifTrue:[^nil].\\\\n\\\\tself register.\\\\n\\\\tname := url.\\\\n\\\\trwmode := false.\\\\n\\\\tbuffer1 := String new: 1.! !\\\\n\\\\n!StandardFileStream methodsFor: 'browser requests' stamp: 'mir 2/2/2001 14:22'!\\\\npost: data url: url ifError: errorBlock\\\\n\\\\n\\\\tself post: data target: nil url: url ifError: errorBlock! !\\\\n\\\\n!StandardFileStream methodsFor: 'browser requests' stamp: 'ar 2/26/2001 15:58'!\\\\nprimBrowserReady\\\\n\\\\t<primitive:'primitivePluginBrowserReady'>\\\\n\\\\t^nil! !\\\\n\\\\n!StandardFileStream methodsFor: 'browser requests' stamp: 'mir 9/21/2000 16:58'!\\\\nprimURLPost: url data: contents semaIndex: index\\\\n\\\\t^self primURLPost: url target: nil data: contents semaIndex: index! !\\\\n\\\\n!StandardFileStream methodsFor: 'browser requests' stamp: 'mir 9/21/2000 16:58'!\\\\nprimURLPost: url target: target data: contents semaIndex: index\\\\n\\\\t\\\\\\\"Post the data (url might be 'mailto:' etc)\\\\\\\"\\\\n\\\\t<primitive:'primitivePluginPostURL'>\\\\n\\\\t^nil\\\\n ! !\\\\n\\\\n!StandardFileStream methodsFor: 'browser requests'!\\\\nprimURLRequest: url semaIndex: index\\\\n\\\\t<primitive:'primitivePluginRequestURLStream'>\\\\n\\\\t^nil! !\\\\n\\\\n!StandardFileStream methodsFor: 'browser requests' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nprimURLRequest: url target: target semaIndex: index\\\\n\\\\t\\\\\\\"target - String (frame, also ':=top', ':=parent' etc)\\\\\\\"\\\\n\\\\t<primitive:'primitivePluginRequestURL'>\\\\n\\\\t^nil\\\\n ! !\\\\n\\\\n!StandardFileStream methodsFor: 'browser requests'!\\\\nprimURLRequestDestroy: request\\\\n\\\\t<primitive:'primitivePluginDestroyRequest'>\\\\n\\\\t^nil! !\\\\n\\\\n!StandardFileStream methodsFor: 'browser requests'!\\\\nprimURLRequestFileHandle: request\\\\n\\\\t<primitive: 'primitivePluginRequestFileHandle'>\\\\n\\\\t^nil! !\\\\n\\\\n!StandardFileStream methodsFor: 'browser requests'!\\\\nprimURLRequestState: request\\\\n\\\\t<primitive:'primitivePluginRequestState'>\\\\n\\\\t^false! !\\\\n\\\\n!StandardFileStream methodsFor: 'browser requests' stamp: 'mir 2/29/2000 11:22'!\\\\nrequestURL: url target: target\\\\n\\\\t^self requestURL: url target: target ifError: [nil]! !\\\\n\\\\n!StandardFileStream methodsFor: 'browser requests' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nrequestURL: url target: target ifError: errorBlock\\\\n\\\\t\\\\\\\"Request to go to the target for the given URL.\\\\n\\\\tIf Squeak is not running in a browser evaluate errorBlock\\\\\\\"\\\\n\\\\n\\\\t| sema index request result |\\\\n\\\\tself waitBrowserReadyFor: self defaultBrowserReadyWait ifFail: [^errorBlock value].\\\\n\\\\tsema := Semaphore new.\\\\n\\\\tindex := Smalltalk registerExternalObject: sema.\\\\n\\\\trequest := self primURLRequest: url target: target semaIndex: index.\\\\n\\\\trequest == nil ifTrue:[\\\\n\\\\t\\\\n\\\\tSmalltalk unregisterExternalObject: sema.\\\\n\\\\t\\\\t^errorBlock value.\\\\n\\\\t] ifFalse:[\\\\n\\\\t\\\\t[sema wait. \\\\\\\"until something happens\\\\\\\"\\\\n\\\\t\\\\tresult := self primURLRequestState: request.\\\\n\\\\t\\\\tresult == nil] whileTrue.\\\\n\\\\t\\\\tself primURLRequestDestroy: request.\\\\n\\\\t].\\\\n\\\\tSmalltalk unregisterExternalObject: sema.\\\\n\\\\tfileID == nil ifTrue:[^nil].\\\\n\\\\tself register.\\\\n\\\\tname := url.\\\\n\\\\trwmode := false.\\\\n\\\\tbuffer1 := String new: 1.! !\\\\n\\\\n!StandardFileStream methodsFor: 'browser requests'!\\\\nrequestURLStream: url\\\\n\\\\t\\\\\\\"FileStream requestURLStream:'http://www.squeak.org'\\\\\\\"\\\\n\\\\t^self requestURLStream: url ifError:[nil]! !\\\\n\\\\n!StandardFileStream methodsFor: 'browser requests' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nrequestURLStream: url ifError: errorBlock\\\\n\\\\t\\\\\\\"Request a FileStream for the given URL.\\\\n\\\\tIf Squeak is not running in a browser evaluate errorBlock\\\\\\\"\\\\n\\\\t\\\\\\\"FileStream requestURLStream:'http://www.squeak.org'\\\\\\\"\\\\n\\\\t| sema index request result |\\\\n\\\\tself waitBrowserReadyFor: self defaultBrowserReadyWait ifFail: [^errorBlock value].\\\\n\\\\tsema := Semaphore new.\\\\n\\\\tindex := Smalltalk registerExternalObject: sema.\\\\n\\\\trequest := self primURLRequest: url semaIndex: index.\\\\n\\\\trequest == nil ifTrue:[\\\\n\\\\t\\\\n\\\\tSmalltalk unregisterExternalObject: sema.\\\\n\\\\t\\\\t^errorBlock value.\\\\n\\\\t] ifFalse:[\\\\n\\\\t\\\\t[sema wait. \\\\\\\"until something happens\\\\\\\"\\\\n\\\\t\\\\tresult := self primURLRequestState: request.\\\\n\\\\t\\\\tresult == nil] whileTrue.\\\\n\\\\t\\\\tresult ifTrue:[fileID := self primURLRequestFileHandle: request].\\\\n\\\\t\\\\tself primURLRequestDestroy: request.\\\\n\\\\t].\\\\n\\\\tSmalltalk unregisterExternalObject: sema.\\\\n\\\\tfileID == nil ifTrue:[^nil].\\\\n\\\\tself register.\\\\n\\\\tname := url.\\\\n\\\\trwmode := false.\\\\n\\\\tbuffer1 := String new: 1.! !\\\\n\\\\n!StandardFileStream methodsFor: 'browser requests' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nwaitBrowserReadyFor: timeout ifFail: errorBlock\\\\n\\\\t| startTime delay okay |\\\\n\\\\tokay := self primBrowserReady.\\\\n\\\\tokay ifNil:[^errorBlock value].\\\\n\\\\tokay ifTrue: [^true].\\\\n\\\\tstartTime := Time millisecondClockValue.\\\\n\\\\tdelay := Delay forMilliseconds: 100.\\\\n\\\\t[(Time millisecondsSince: startTime) < timeout]\\\\n\\\\t\\\\twhileTrue: [\\\\n\\\\t\\\\t\\\\tdelay wait.\\\\n\\\\t\\\\t\\\\tokay := self primBrowserReady.\\\\n\\\\t\\\\t\\\\tokay ifNil:[^errorBlock value].\\\\n\\\\t\\\\t\\\\tokay ifTrue: [^true]].\\\\n\\\\t^errorBlock value! !\\\\n\\\\n\\\\n!StandardFileStream methodsFor: 'dnd requests' stamp: 'ar 1/10/2001 20:01'!\\\\nprimDropRequestFileHandle: dropIndex\\\\n\\\\t\\\\\\\"Primitive. Return the (read-only) file handle for some file that was just dropped onto Squeak.\\\\n\\\\tFail if dropIndex is out of range or the primitive is not supported.\\\\\\\"\\\\n\\\\t<primitive: 'primitiveDropRequestFileHandle' module:'DropPlugin'>\\\\n\\\\t^nil! !\\\\n\\\\n!StandardFileStream methodsFor: 'dnd requests' stamp: 'ar 1/10/2001 20:01'!\\\\nprimDropRequestFileName: dropIndex\\\\n\\\\t\\\\\\\"Primitive. Return the file name for some file that was just dropped onto Squeak.\\\\n\\\\tFail if dropIndex is out of range or the primitive is not supported.\\\\\\\"\\\\n\\\\t<primitive: 'primitiveDropRequestFileName' module:'DropPlugin'>\\\\n\\\\t^nil! !\\\\n\\\\n!StandardFileStream methodsFor: 'dnd requests' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nrequestDropStream: dropIndex\\\\n\\\\t\\\\\\\"Return a read-only stream for some file the user has just dropped onto Squeak.\\\\\\\"\\\\n\\\\tname := self primDropRequestFileName: dropIndex.\\\\n\\\\tfileID := self primDropRequestFileHandle: dropIndex.\\\\n\\\\tfileID == nil ifTrue:[^nil].\\\\n\\\\tself register.\\\\n\\\\trwmode := false.\\\\n\\\\tbuffer1 := String new: 1.\\\\n\\\\n! !\\\\n\\\\n\\\\n!StandardFileStream methodsFor: 'finalization' stamp: 'ar 3/21/98 18:16'!\\\\nactAsExecutor\\\\n\\\\tsuper actAsExecutor.\\\\n\\\\tname := nil.! !\\\\n\\\\n!StandardFileStream methodsFor: 'finalization' stamp: 'ar 10/7/1998 15:44'!\\\\nfinalize\\\\n\\\\tself primCloseNoError: fileID.! !\\\\n\\\\n\\\\n!StandardFileStream methodsFor: 'open/close' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nclose\\\\n\\\\t\\\\\\\"Close this file.\\\\\\\"\\\\n\\\\n\\\\tfileID ifNotNil: [\\\\n\\\\t\\\\tself primClose: fileID.\\\\n\\\\t\\\\tself unregister.\\\\n\\\\t\\\\tfileID := nil].\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'open/close' stamp: 'jm 2/6/2002 08:33'!\\\\nclosed\\\\n\\\\t\\\\\\\"Answer true if this file is closed.\\\\\\\"\\\\n\\\\n\\\\t^ fileID isNil or: [(self primSizeNoError: fileID) isNil]\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'open/close' stamp: 'jm 9/21/1998 16:20'!\\\\nensureOpen\\\\n\\\\t\\\\\\\"Make sure that this file really is open.\\\\\\\"\\\\n\\\\n\\\\tself closed ifTrue: [^ self reopen].\\\\n\\\\t(self primSizeNoError: fileID) ifNotNil: [^ self].\\\\n\\\\tself reopen.\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'open/close'!\\\\nopen\\\\n\\\\t\\\\\\\"For compatibility with a few existing things.  2/14/96 sw\\\\\\\"\\\\n\\\\n\\\\t^ self reopen! !\\\\n\\\\n!StandardFileStream methodsFor: 'open/close' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nopen: fileName forWrite: writeMode \\\\n\\\\t\\\\\\\"Open the file with the given name. If writeMode is true, allow writing, otherwise open the file in read-only mode.\\\\\\\"\\\\n\\\\t\\\\\\\"Changed to do a GC and retry before failing ar 3/21/98 17:25\\\\\\\"\\\\n\\\\t| f |\\\\n\\\\tf := fileName asVmPathName.\\\\n\\\\n\\\\tfileID := StandardFileStream retryWithGC:[self primOpen: f writable: writeMode] \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tuntil:[:id| id notNil] \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tforFileNamed: fileName.\\\\n\\\\tfileID ifNil: [^ nil].  \\\\\\\"allows sender to detect failure\\\\\\\"\\\\n\\\\tself register.\\\\n\\\\tname := fileName.\\\\n\\\\trwmode := writeMode.\\\\n\\\\tbuffer1 := String new: 1.\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'open/close'!\\\\nopenReadOnly\\\\n\\\\t\\\\\\\"Open the receiver as a read-only file.  1/31/96 sw\\\\\\\"\\\\n\\\\n\\\\t^ self open: name forWrite: false! !\\\\n\\\\n!StandardFileStream methodsFor: 'open/close' stamp: 'jm 9/21/1998 13:58'!\\\\nreopen\\\\n\\\\t\\\\\\\"Close and reopen this file. The file position is reset to zero.\\\\\\\"\\\\n\\\\t\\\\\\\"Details: Files that were open when a snapshot occurs are no longer valid when the snapshot is resumed. This operation re-opens the file if that has happened.\\\\\\\"\\\\n\\\\n\\\\tfileID ifNotNil: [self primCloseNoError: fileID].\\\\n\\\\tself open: name forWrite: rwmode.\\\\n! !\\\\n\\\\n\\\\n!StandardFileStream methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimAtEnd: id\\\\n\\\\t\\\\\\\"Answer true if the file position is at the end of the file.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveFileAtEnd' module: 'FilePlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimClose: id\\\\n\\\\t\\\\\\\"Close this file.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveFileClose' module: 'FilePlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimCloseNoError: id\\\\n\\\\t\\\\\\\"Close this file. Don't raise an error if the primitive fails.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveFileClose' module: 'FilePlugin'>\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'primitives' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nprimFlush: id\\\\n\\\\t\\\\\\\"Flush pending changes to the disk\\\\\\\"\\\\n\\\\t| p |\\\\n\\\\t<primitive: 'primitiveFileFlush' module: 'FilePlugin'>\\\\n\\\\t\\\\\\\"In some OS's seeking to 0 and back will do a flush\\\\\\\"\\\\n\\\\tp := self position.\\\\n\\\\tself position: 0; position: p! !\\\\n\\\\n!StandardFileStream methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimGetPosition: id\\\\n\\\\t\\\\\\\"Get this files current position.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveFileGetPosition' module: 'FilePlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimOpen: fileName writable: writableFlag\\\\n\\\\t\\\\\\\"Open a file of the given name, and return the file ID obtained.\\\\n\\\\tIf writableFlag is true, then\\\\n\\\\t\\\\tif there is none with this name, then create one\\\\n\\\\t\\\\telse prepare to overwrite the existing from the beginning\\\\n\\\\totherwise\\\\n\\\\t\\\\tif the file exists, open it read-only\\\\n\\\\t\\\\telse return nil\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveFileOpen' module: 'FilePlugin'>\\\\n\\\\t^ nil\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimRead: id into: byteArray startingAt: startIndex count: count\\\\n\\\\t\\\\\\\"Read up to count bytes of data from this file into the given string or byte array starting at the given index. Answer the number of bytes actually read.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveFileRead' module: 'FilePlugin'>\\\\n\\\\tself closed ifTrue: [^ self error: 'File is closed'].\\\\n\\\\tself error: 'File read failed'.\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSetPosition: id to: anInteger\\\\n\\\\t\\\\\\\"Set this file to the given position.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveFileSetPosition' module: 'FilePlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSize: id\\\\n\\\\t\\\\\\\"Answer the size of this file.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveFileSize' module: 'FilePlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimSizeNoError: id\\\\n\\\\t\\\\\\\"Answer the size of this file. Answer nil if the primitive fails; this indicates that the file handle has become stale.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveFileSize' module: 'FilePlugin'>\\\\n\\\\t^ nil\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'primitives' stamp: 'JMM 5/24/2001 21:55'!\\\\nprimTruncate: id to: anInteger\\\\n\\\\t\\\\\\\"Truncate this file to the given position.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveFileTruncate' module: 'FilePlugin'>\\\\n\\\\tself primitiveFailed\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\\\\nprimWrite: id from: stringOrByteArray startingAt: startIndex count: count\\\\n\\\\t\\\\\\\"Write count bytes onto this file from the given string or byte array starting at the given index. Answer the number of bytes written.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveFileWrite' module: 'FilePlugin'>\\\\n\\\\tself closed ifTrue: [^ self error: 'File is closed'].\\\\n\\\\tself error: 'File write failed'.\\\\n! !\\\\n\\\\n\\\\n!StandardFileStream methodsFor: 'properties-setting'!\\\\nasHtml\\\\n\\\\t\\\\\\\"Convert me in to an HtmlFileStream. 4/11/96 tk\\\\\\\"\\\\n\\\\n\\\\t^ self as: HtmlFileStream \\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'properties-setting' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nascii\\\\n\\\\t\\\\\\\"opposite of binary\\\\\\\"\\\\n\\\\tbuffer1 := String new: 1! !\\\\n\\\\n!StandardFileStream methodsFor: 'properties-setting' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nbinary\\\\n\\\\tbuffer1 := ByteArray new: 1! !\\\\n\\\\n!StandardFileStream methodsFor: 'properties-setting' stamp: 'JMM 1/28/2001 18:44'!\\\\ngetFileType\\\\n\\\\t\\\\\\\"On the Macintosh, get the file type and creator of this file. On other platforms, do nothing.\\\\\\\"\\\\n\\\\n\\\\t^FileDirectory default\\\\n\\\\t\\\\tgetMacFileTypeAndCreator: self fullName\\\\n\\\\t\\\\t\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'properties-setting' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\ninsertLineFeeds\\\\n\\\\t\\\\\\\"(FileStream oldFileNamed: 'BBfix2.st') insertLineFeeds\\\\\\\"\\\\n\\\\t| s crLf f |\\\\n\\\\tcrLf := String with: Character cr with: (Character value: 10).\\\\n\\\\ts := ReadStream on: (self next: self size).\\\\n\\\\tself close.\\\\n\\\\tf := FileStream newFileNamed: self name.\\\\n\\\\t[s atEnd] whileFalse: \\\\n\\\\t\\\\t[f nextPutAll: (s upTo: Character cr); nextPutAll: crLf].\\\\n\\\\tf close! !\\\\n\\\\n!StandardFileStream methodsFor: 'properties-setting'!\\\\nisBinary\\\\n\\\\t^ buffer1 class == ByteArray! !\\\\n\\\\n!StandardFileStream methodsFor: 'properties-setting' stamp: 'tk 11/4/1998 19:17'!\\\\nisReadOnly\\\\n\\\\n\\\\t^ rwmode not\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'properties-setting' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nreadOnly\\\\n\\\\t\\\\\\\"Make this file read-only.\\\\\\\"\\\\n\\\\n\\\\trwmode := false.\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'properties-setting' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nreadWrite\\\\n\\\\t\\\\\\\"Make this file writable.\\\\\\\"\\\\n\\\\n\\\\trwmode := true.\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'properties-setting' stamp: 'jm 12/5/97 15:14'!\\\\nsetFileTypeToObject\\\\n\\\\t\\\\\\\"On the Macintosh, set the file type and creator of this file to be a Squeak object file. On other platforms, do nothing. Setting the file type allows Squeak object files to be sent as email attachments and launched by double-clicking. On other platforms, similar behavior is achieved by creating the file with the '.sqo' file name extension.\\\\\\\"\\\\n\\\\n\\\\tFileDirectory default\\\\n\\\\t\\\\tsetMacFileNamed: self fullName\\\\n\\\\t\\\\ttype: 'SOBJ'\\\\n\\\\t\\\\tcreator: 'FAST'.\\\\n! !\\\\n\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'sw 2/12/96'!\\\\natEnd\\\\n\\\\t\\\\\\\"Answer whether the receiver is at its end.  \\\\\\\"\\\\n\\\\t^ self primAtEnd: fileID! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nbasicNext\\\\n\\\\t\\\\\\\"Answer the next byte from this file, or nil if at the end of the file.\\\\\\\"\\\\n\\\\n\\\\t| count |\\\\n\\\\tcount := self primRead: fileID into: buffer1 startingAt: 1 count: 1.\\\\n\\\\tcount = 1\\\\n\\\\t\\\\tifTrue: [^ buffer1 at: 1]\\\\n\\\\t\\\\tifFalse: [^ nil].\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\ncompressFile\\\\n\\\\t\\\\\\\"Write a new file that has the data in me compressed in GZip format.\\\\\\\"\\\\n\\\\t| zipped buffer |\\\\n\\\\n\\\\tself readOnly; binary.\\\\n\\\\tzipped := self directory newFileNamed: (self name, FileDirectory dot, 'gz').\\\\n\\\\tzipped binary; setFileTypeToObject.\\\\n\\\\t\\\\t\\\\\\\"Type and Creator not to be text, so can be enclosed in an email\\\\\\\"\\\\n\\\\tzipped := GZipWriteStream on: zipped.\\\\n\\\\tbuffer := ByteArray new: 50000.\\\\n\\\\t'Compressing ', self fullName displayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\tfrom: 0 to: self size\\\\n\\\\t\\\\tduring: [:bar |\\\\n\\\\t\\\\t\\\\t[self atEnd] whileFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tbar value: self position.\\\\n\\\\t\\\\t\\\\t\\\\tzipped nextPutAll: (self nextInto: buffer)].\\\\n\\\\t\\\\t\\\\tzipped close.\\\\n\\\\t\\\\t\\\\tself close].\\\\n\\\\t^zipped! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nfindString: string\\\\n\\\\t\\\\\\\"Fast version of #upToAll: to find a String in a file starting from the beginning.\\\\n\\\\tReturns the position and also sets the position there.\\\\n\\\\tIf string is not found 0 is returned and position is unchanged.\\\\\\\"\\\\n\\\\n\\\\t| pos buffer count oldPos sz |\\\\n\\\\toldPos := self position.\\\\n\\\\tself reset.\\\\n\\\\tsz := self size.\\\\n\\\\tpos := 0.\\\\n\\\\tbuffer := String new: 2000.\\\\n\\\\t[ buffer := self nextInto: buffer.\\\\n\\\\t(count := buffer findString: string) > 0\\\\n\\\\t\\\\tifTrue: [\\\\\\\"Found the string part way into buffer\\\\\\\"\\\\n\\\\t\\\\t\\\\tself position: pos.\\\\n\\\\t\\\\t\\\\tself next: count - 1.\\\\n\\\\t\\\\t\\\\t^self position ].\\\\n\\\\tpos := ((pos + 2000 - string size) min: sz).\\\\n\\\\tself position: pos.\\\\n\\\\tpos = sz] whileFalse.\\\\n\\\\t\\\\\\\"Never found it, and hit end of file\\\\\\\"\\\\n\\\\tself position: oldPos.\\\\n\\\\t^0! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nfindStringFromEnd: string\\\\n\\\\t\\\\\\\"Fast version to find a String in a file starting from the end.\\\\n\\\\tReturns the position and also sets the position there.\\\\n\\\\tIf string is not found 0 is returned and position is unchanged.\\\\\\\"\\\\n\\\\n\\\\t| pos buffer count oldPos |\\\\n\\\\toldPos := self position.\\\\n\\\\tself setToEnd.\\\\n\\\\tpos := self position.\\\\n\\\\t[ pos := ((pos - 2000 + string size) max: 0).  \\\\\\\"the [+ string size] allows for the case where the end of the search string is at the beginning of the current buffer\\\\\\\"\\\\n\\\\tself position: pos.\\\\n\\\\tbuffer := self next: 2000.\\\\n\\\\t(count := buffer findString: string) > 0\\\\n\\\\t\\\\tifTrue: [\\\\\\\"Found the string part way into buffer\\\\\\\"\\\\n\\\\t\\\\t\\\\tself position: pos.\\\\n\\\\t\\\\t\\\\tself next: count-1.  \\\\\\\"use next instead of position:, so that CrLfFileStream can do its magic if it is being used\\\\\\\"\\\\n\\\\t\\\\t\\\\t^self position].\\\\n\\\\tpos = 0] whileFalse.\\\\n\\\\t\\\\\\\"Never found it, and hit beginning of file\\\\\\\"\\\\n\\\\tself position: oldPos.\\\\n\\\\t^0! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'ar 2/6/2001 17:59'!\\\\nflush\\\\n\\\\t\\\\\\\"Flush pending changes\\\\\\\"\\\\n\\\\t^self primFlush: fileID! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'mir 2/25/2000 12:37'!\\\\nnext\\\\n\\\\t\\\\\\\"Answer the next byte from this file, or nil if at the end of the file.\\\\\\\"\\\\n\\\\n\\\\t^ self basicNext! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position'!\\\\nnext: n\\\\n\\\\t\\\\\\\"Return a string with the next n characters of the filestream in it.  1/31/96 sw\\\\\\\"\\\\n\\\\t^ self nextInto: (buffer1 class new: n)! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nnext: n into: aString startingAt: startIndex\\\\n\\\\t\\\\\\\"Read n bytes into the given string.\\\\n\\\\tReturn aString or a partial copy if less than\\\\n\\\\tn elements have been read.\\\\\\\"\\\\n\\\\t| count |\\\\n\\\\tcount := self primRead: fileID into: aString\\\\n\\\\t\\\\t\\\\t\\\\tstartingAt: startIndex count: n.\\\\n\\\\tcount = n\\\\n\\\\t\\\\tifTrue:[^aString]\\\\n\\\\t\\\\tifFalse:[^aString copyFrom: 1 to: startIndex+count-1]! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'ar 1/2/2000 15:33'!\\\\nnext: anInteger putAll: aString startingAt: startIndex\\\\n\\\\t\\\\\\\"Store the next anInteger elements from the given collection.\\\\\\\"\\\\n\\\\trwmode ifFalse: [^ self error: 'Cannot write a read-only file'].\\\\n\\\\tself primWrite: fileID from: aString startingAt: startIndex count: anInteger.\\\\n\\\\t^aString! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'jm 9/21/1998 13:55'!\\\\nnextPut: char\\\\n\\\\t\\\\\\\"Write the given character to this file.\\\\\\\"\\\\n\\\\n\\\\trwmode ifFalse: [^ self error: 'Cannot write a read-only file'].\\\\n\\\\tbuffer1 at: 1 put: char.\\\\n\\\\tself primWrite: fileID from: buffer1 startingAt: 1 count: 1.\\\\n\\\\t^ char\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'tk 2/5/2000 21:43'!\\\\nnextPutAll: aString\\\\n\\\\t\\\\\\\"Write all the characters of the given string to this file.\\\\\\\"\\\\n\\\\n\\\\trwmode ifFalse: [^ self error: 'Cannot write a read-only file'].\\\\n\\\\tself primWrite: fileID from: aString startingAt: 1 count: aString basicSize.\\\\n\\\\t^ aString\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'tk 2/5/2000 21:58'!\\\\nnextWordsInto: aBitmap\\\\n\\\\t\\\\\\\"Note: The file primitives automatically adjust for word based objects.\\\\\\\"\\\\n\\\\n\\\\tself next: aBitmap basicSize into: aBitmap startingAt: 1.\\\\n\\\\taBitmap restoreEndianness.\\\\n\\\\t^ aBitmap! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\npadToEndWith: aChar\\\\n\\\\t\\\\\\\"On the Mac, files do not truncate.  One can delete the old file and write a new one, but sometime deletion fails (file still open? file stale?).  This is a sad compromise.  Just let the file be the same length but pad it with a harmless character.\\\\\\\"\\\\n\\\\n\\\\t| pad |\\\\n\\\\tself atEnd ifTrue: [^ self].\\\\n\\\\tpad := self isBinary \\\\n\\\\t\\\\tifTrue: [aChar asCharacter asciiValue]\\\\t\\\\\\\"ok for char or number\\\\\\\"\\\\n\\\\t\\\\tifFalse: [aChar asCharacter].\\\\n\\\\tself nextPutAll: (buffer1 class new: ((self size - self position) min: 20000) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twithAll: pad).! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\npeek\\\\n\\\\t\\\\\\\"Answer what would be returned if the message next were sent to the receiver. If the receiver is at the end, answer nil.  \\\\\\\"\\\\n\\\\t| next |\\\\n\\\\tself atEnd ifTrue: [^ nil].\\\\n\\\\tnext := self basicNext.\\\\n\\\\tself position: self position - 1.\\\\n\\\\t^ next! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'tk 10/19/2001 11:29'!\\\\npeekLast\\\\n\\\\t\\\\\\\"Return that item just put at the end of the stream\\\\\\\"\\\\n\\\\n\\\\t^ buffer1 size > 0 \\\\n\\\\t\\\\tifTrue: [buffer1 last]\\\\n\\\\t\\\\tifFalse: [nil]\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position'!\\\\nposition\\\\n\\\\t\\\\\\\"Return the receiver's current file position.  2/12/96 sw\\\\\\\"\\\\n\\\\n\\\\t^ self primGetPosition: fileID! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position'!\\\\nposition: pos\\\\n\\\\t\\\\\\\"Set the receiver's position as indicated.  2/12/96 sw\\\\\\\"\\\\n\\\\n\\\\t^ self primSetPosition: fileID to: pos! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position'!\\\\nreadInto: byteArray startingAt: startIndex count: count\\\\n\\\\t\\\\\\\"Read into the given array as specified, and return the count\\\\n\\\\tactually transferred.  index and count are in units of bytes or\\\\n\\\\tlongs depending on whether the array is Bitmap, String or ByteArray\\\\\\\"\\\\n\\\\t^ self primRead: fileID into: byteArray\\\\n\\\\t\\\\t\\\\tstartingAt: startIndex count: count\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'yo 10/31/2002 22:33'!\\\\nreadOnlyCopy\\\\n\\\\n\\\\t^ self class readOnlyFileNamed: self name.\\\\n! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position'!\\\\nsetToEnd\\\\n\\\\t\\\\\\\"Set the position of the receiver to the end of file.  1/31/96 sw\\\\\\\"\\\\n\\\\n\\\\tself position: self size! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position'!\\\\nskip: n\\\\n\\\\t\\\\\\\"Set the character position to n characters from the current position.\\\\n\\\\tError if not enough characters left in the file.  1/31/96 sw\\\\\\\"\\\\n\\\\n\\\\tself position: self position + n! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'JMM 5/24/2001 22:00'!\\\\ntruncate\\\\n\\\\t\\\\\\\"Truncate to zero\\\\\\\"\\\\n\\\\n\\\\t^ self truncate: 0! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'JMM 5/24/2001 22:47'!\\\\ntruncate: pos\\\\n\\\\t\\\\\\\"Truncate to this position\\\\\\\"\\\\n\\\\n\\\\tself position: pos.\\\\n\\\\t^self primTruncate: fileID to: pos! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nupTo: delim \\\\n\\\\t\\\\\\\"Fast version to speed up nextChunk\\\\\\\"\\\\n\\\\t| pos buffer count |\\\\n\\\\tpos := self position.\\\\n\\\\tbuffer := self next: 2000.\\\\n\\\\t(count := buffer indexOf: delim) > 0 ifTrue: \\\\n\\\\t\\\\t[\\\\\\\"Found the delimiter part way into buffer\\\\\\\"\\\\n\\\\t\\\\tself position: pos + count.\\\\n\\\\t\\\\t^ buffer copyFrom: 1 to: count - 1].\\\\n\\\\tself atEnd ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"Never found it, and hit end of file\\\\\\\"\\\\n\\\\t\\\\t^ buffer].\\\\n\\\\t\\\\\\\"Never found it, but there's more...\\\\\\\"\\\\n\\\\t^ buffer , (self upTo: delim)! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nupToEnd\\\\n\\\\t\\\\\\\"Answer a subcollection from the current access position through the last element of the receiver.\\\\\\\"\\\\n\\\\n\\\\t| newStream buffer |\\\\n\\\\tbuffer := buffer1 species new: 1000.\\\\n\\\\tnewStream := WriteStream on: (buffer1 species new: 100).\\\\n\\\\t[self atEnd] whileFalse: [newStream nextPutAll: (self nextInto: buffer)].\\\\n\\\\t^ newStream contents! !\\\\n\\\\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'jm 9/21/1998 13:56'!\\\\nverbatim: aString\\\\n\\\\t\\\\\\\"A version of nextPutAll that can be called knowing it won't call nextPut: \\\\\\\"\\\\n\\\\n\\\\t^ self nextPutAll: aString\\\\n! !\\\\n\\\\n\\\\n!StandardFileStream methodsFor: 'registry' stamp: 'ar 3/21/98 17:23'!\\\\nregister\\\\n\\\\t^self class register: self! !\\\\n\\\\n!StandardFileStream methodsFor: 'registry' stamp: 'ar 3/21/98 17:23'!\\\\nunregister\\\\n\\\\t^self class unregister: self! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStandardFileStream class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StandardFileStream class methodsFor: 'browser requests' stamp: 'mir 3/8/2001 16:28'!\\\\nisRunningAsBrowserPlugin\\\\n\\\\tself new waitBrowserReadyFor: 1000 ifFail: [^false].\\\\n\\\\t^true! !\\\\n\\\\n!StandardFileStream class methodsFor: 'browser requests' stamp: 'mir 9/7/2000 16:08'!\\\\nprivateCheckForBrowserPrimitives\\\\n\\\\t<primitive:'primitivePluginBrowserReady'>\\\\n\\\\t^false! !\\\\n\\\\n\\\\n!StandardFileStream class methodsFor: 'error handling' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nfileDoesNotExistUserHandling: fullFileName\\\\n\\\\n\\\\t| selection newName |\\\\n\\\\tselection := (PopUpMenu labels:\\\\n'create a new file\\\\nchoose another name\\\\ncancel')\\\\n\\\\t\\\\t\\\\tstartUpWithCaption: (FileDirectory localNameFor: fullFileName) , '\\\\ndoes not exist.'.\\\\n\\\\tselection = 1 ifTrue:\\\\n\\\\t\\\\t[^ self new open: fullFileName forWrite: true].\\\\n\\\\tselection = 2 ifTrue:\\\\n\\\\t\\\\t[ newName := FillInTheBlank request: 'Enter a new file name'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinitialAnswer:  fullFileName.\\\\n\\\\t\\\\t^ self oldFileNamed:\\\\n\\\\t\\\\t\\\\t(self fullName: newName)].\\\\n\\\\tself halt! !\\\\n\\\\n!StandardFileStream class methodsFor: 'error handling' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nfileExistsUserHandling: fullFileName\\\\n\\\\t| dir localName choice newName newFullFileName |\\\\n\\\\tdir := FileDirectory forFileName: fullFileName.\\\\n\\\\tlocalName := FileDirectory localNameFor: fullFileName.\\\\n\\\\tchoice := (PopUpMenu\\\\n\\\\t\\\\tlabels:\\\\n'overwrite that file\\\\\\\\choose another name\\\\\\\\cancel' withCRs)\\\\n\\\\t\\\\tstartUpWithCaption: localName, '\\\\nalready exists.'.\\\\n\\\\n\\\\tchoice = 1 ifTrue: [\\\\n\\\\t\\\\tdir deleteFileNamed: localName\\\\n\\\\t\\\\t\\\\tifAbsent: [self error: 'Could not delete the old version of that file'].\\\\n\\\\t\\\\t^ self new open: fullFileName forWrite: true].\\\\n\\\\n\\\\tchoice = 2 ifTrue: [\\\\n\\\\t\\\\tnewName := FillInTheBlank request: 'Enter a new file name' initialAnswer: fullFileName.\\\\n\\\\t\\\\tnewFullFileName := self fullName: newName.\\\\n\\\\t\\\\t^ self newFileNamed: newFullFileName].\\\\n\\\\n\\\\tself error: 'Please close this to abort file opening'! !\\\\n\\\\n!StandardFileStream class methodsFor: 'error handling' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nreadOnlyFileDoesNotExistUserHandling: fullFileName\\\\n\\\\n\\\\t| dir files choices selection newName fileName |\\\\n\\\\tdir := FileDirectory forFileName: fullFileName.\\\\n\\\\tfiles := dir fileNames.\\\\n\\\\tfileName := FileDirectory localNameFor: fullFileName.\\\\n\\\\tchoices := fileName correctAgainst: files.\\\\n\\\\tchoices add: 'Choose another name'.\\\\n\\\\tchoices add: 'Cancel'.\\\\n\\\\tselection := (PopUpMenu labelArray: choices lines: (Array with: 5) )\\\\n\\\\t\\\\tstartUpWithCaption: (FileDirectory localNameFor: fullFileName), '\\\\ndoes not exist.'.\\\\n\\\\tselection = choices size ifTrue:[\\\\\\\"cancel\\\\\\\" ^ nil \\\\\\\"should we raise another exception here?\\\\\\\"].\\\\n\\\\tselection < (choices size - 1) ifTrue: [\\\\n\\\\t\\\\tnewName := (dir pathName , FileDirectory slash , (choices at: selection))].\\\\n\\\\tselection = (choices size - 1) ifTrue: [\\\\n\\\\t\\\\tnewName := FillInTheBlank \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trequest: 'Enter a new file name' \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinitialAnswer: fileName].\\\\n\\\\tnewName = '' ifFalse: [^ self readOnlyFileNamed: (self fullName: newName)].\\\\n\\\\t^ self error: 'Could not open a file'! !\\\\n\\\\n\\\\n!StandardFileStream class methodsFor: 'file creation' stamp: 'TPR 8/13/1999 21:22'!\\\\nfileNamed: fileName\\\\n\\\\t\\\\\\\"Open a file with the given name for reading and writing. If the name has no directory part, then the file will be created in the default directory. If the file already exists, its prior contents may be modified or replaced, but the file will not be truncated on close.\\\\\\\"\\\\n\\\\n\\\\t^ self new open: (self fullName: fileName) forWrite: true\\\\n! !\\\\n\\\\n!StandardFileStream class methodsFor: 'file creation' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nforceNewFileNamed: fileName \\\\n\\\\t\\\\\\\"Create a new file with the given name, and answer a stream opened \\\\n\\\\tfor writing on that file. If the file already exists, delete it without \\\\n\\\\tasking before creating the new file.\\\\\\\"\\\\n\\\\t| dir localName fullName f |\\\\n\\\\tfullName := self fullName: fileName.\\\\n\\\\t(self isAFileNamed: fullName)\\\\n\\\\t\\\\tifFalse: [f := self new open: fullName forWrite: true.\\\\n\\\\t\\\\t\\\\t^ f isNil\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"Failed to open the file\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(FileDoesNotExistException fileName: fullName) signal]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [f]].\\\\n\\\\tdir := FileDirectory forFileName: fullName.\\\\n\\\\tlocalName := FileDirectory localNameFor: fullName.\\\\n\\\\tdir\\\\n\\\\t\\\\tdeleteFileNamed: localName\\\\n\\\\t\\\\tifAbsent: [(CannotDeleteFileException new\\\\n\\\\t\\\\t\\\\tmessageText: 'Could not delete the old version of file ' , fullName) signal].\\\\n\\\\tf := self new open: fullName forWrite: true.\\\\n\\\\t^ f isNil\\\\n\\\\t\\\\tifTrue: [\\\\\\\"Failed to open the file\\\\\\\"\\\\n\\\\t\\\\t\\\\t(FileDoesNotExistException fileName: fullName) signal]\\\\n\\\\t\\\\tifFalse: [f]! !\\\\n\\\\n!StandardFileStream class methodsFor: 'file creation' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nisAFileNamed: fileName\\\\n\\\\t\\\\\\\"Answer true if a file of the given name exists.\\\\\\\"\\\\n\\\\n\\\\t| f |\\\\n\\\\tf := self new open: fileName forWrite: false.\\\\n\\\\tf ifNil: [^ false].\\\\n\\\\tf close.\\\\n\\\\t^ true\\\\n! !\\\\n\\\\n!StandardFileStream class methodsFor: 'file creation' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nnewFileNamed: fileName\\\\n \\\\t\\\\\\\"Create a new file with the given name, and answer a stream opened for writing on that file. If the file already exists, ask the user what to do.\\\\\\\"\\\\n\\\\n\\\\t| fullName |\\\\n\\\\tfullName := self fullName: fileName.\\\\n\\\\n\\\\t^(self isAFileNamed: fullName)\\\\n\\\\t\\\\tifTrue: [\\\\\\\"file already exists:\\\\\\\"\\\\n\\\\t\\\\t\\\\t(FileExistsException fileName: fullName fileClass: self) signal]\\\\n\\\\t\\\\tifFalse: [self new open: fullName forWrite: true]\\\\n\\\\n! !\\\\n\\\\n!StandardFileStream class methodsFor: 'file creation' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\noldFileNamed: fileName\\\\n\\\\t\\\\\\\"Open an existing file with the given name for reading and writing. If the name has no directory part, then the file will be created in the default directory. If the file already exists, its prior contents may be modified or replaced, but the file will not be truncated on close.\\\\\\\"\\\\n\\\\n\\\\t| fullName |\\\\n\\\\tfullName := self fullName: fileName.\\\\n\\\\n\\\\t^(self isAFileNamed: fullName)\\\\n\\\\t\\\\tifTrue: [self new open: fullName forWrite: true]\\\\n\\\\t\\\\tifFalse: [\\\\\\\"File does not exist...\\\\\\\"\\\\n\\\\t\\\\t\\\\t(FileDoesNotExistException fileName: fullName) signal]! !\\\\n\\\\n!StandardFileStream class methodsFor: 'file creation' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nreadOnlyFileNamed: fileName \\\\n\\\\t\\\\\\\"Open an existing file with the given name for reading.\\\\\\\"\\\\n\\\\n\\\\t| fullName f |\\\\n\\\\tfullName := self fullName: fileName.\\\\n\\\\tf := self new open: fullName forWrite: false.\\\\n\\\\t^ f isNil\\\\n\\\\t\\\\tifFalse: [f]\\\\n\\\\t\\\\tifTrue: [\\\\\\\"File does not exist...\\\\\\\"\\\\n\\\\t\\\\t\\\\t((FileDoesNotExistException fileName: fullName) readOnly: true) signal].\\\\n\\\\n\\\\t\\\\\\\"StandardFileStream readOnlyFileNamed: 'kjsd.txt' \\\\\\\"! !\\\\n\\\\n\\\\n!StandardFileStream class methodsFor: 'registry' stamp: 'ar 10/7/1998 14:41'!\\\\nregister: anObject\\\\n\\\\tWeakArray isFinalizationSupported ifFalse:[^anObject].\\\\n\\\\tself registry add: anObject! !\\\\n\\\\n!StandardFileStream class methodsFor: 'registry' stamp: 'ar 10/7/1998 14:41'!\\\\nregistry\\\\n\\\\tWeakArray isFinalizationSupported ifFalse:[^nil].\\\\n\\\\t^Registry isNil\\\\n\\\\t\\\\tifTrue:[Registry := WeakRegistry new]\\\\n\\\\t\\\\tifFalse:[Registry].! !\\\\n\\\\n!StandardFileStream class methodsFor: 'registry' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nretryWithGC: execBlock until: testBlock forFileNamed: fullName\\\\n\\\\t\\\\\\\"Re-implemented to only force GC if a file with the given name exists\\\\\\\"\\\\n\\\\t| blockValue foundIt |\\\\n\\\\tblockValue := execBlock value.\\\\n\\\\t(testBlock value: blockValue) ifTrue:[^blockValue].\\\\n\\\\t\\\\\\\"See if we have a file with the given name\\\\\\\"\\\\n\\\\tfoundIt := Registry keys \\\\\\\"hold on strongly for now\\\\\\\" \\\\n\\\\t\\\\tanySatisfy:[:file| file name sameAs: fullName].\\\\n\\\\tfoundIt ifFalse:[^blockValue].\\\\n\\\\tSmalltalk garbageCollectMost.\\\\n\\\\tblockValue := execBlock value.\\\\n\\\\t(testBlock value: blockValue) ifTrue:[^blockValue].\\\\n\\\\tSmalltalk garbageCollect.\\\\n\\\\t^execBlock value.! !\\\\n\\\\n!StandardFileStream class methodsFor: 'registry' stamp: 'ar 10/7/1998 15:23'!\\\\nunregister: anObject\\\\n\\\\tWeakArray isFinalizationSupported ifFalse:[^anObject].\\\\n\\\\tself registry remove: anObject ifAbsent:[]! !\\\\nObject subclass: #StandardScriptingSystem\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: 'ClassVarNamesInUse FormDictionary HelpStrings StandardPartsBin'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Refactoring Candidates'!\\\\n!StandardScriptingSystem commentStamp: '<historical>' prior: 0!\\\\nAn instance of this is installed as the value of the global variable \\\\\\\"ScriptingSystem\\\\\\\".  Client subclasses are invited, such as one used internally by squeak team for ongoing internal work.!\\\\n\\\\n\\\\n!StandardScriptingSystem methodsFor: 'form dictionary' stamp: 'ar 3/3/2001 19:45'!\\\\ndeletePrivateGraphics\\\\n\\\\t\\\\\\\"ScriptingSystem deletePrivateGraphics\\\\\\\"\\\\n\\\\tself deletePrivateGraphics: self privateGraphics\\\\n\\\\t\\\\tafterStoringToFileNamed: 'disGraphics'! !\\\\n\\\\n!StandardScriptingSystem methodsFor: 'form dictionary' stamp: 'di 2/3/2001 20:10'!\\\\ndeletePrivateGraphics: nameList afterStoringToFileNamed: aFileName\\\\n\\\\t\\\\\\\"This method is used to strip private graphics from the FormDictionary and store them on a file of the given name\\\\\\\"\\\\n\\\\n\\\\t|  replacement toRemove aReferenceStream keySymbol |\\\\n\\\\ttoRemove _ Dictionary new.\\\\n\\\\treplacement _ FormDictionary at: #Gets.\\\\n\\\\n\\\\tnameList do:\\\\n\\\\t\\\\t[:aKey |\\\\n\\\\t\\\\t\\\\tkeySymbol _ aKey asSymbol.\\\\n\\\\t\\\\t\\\\t(toRemove at: keySymbol put: (self formAtKey: keySymbol)).\\\\n\\\\t\\\\t\\\\tFormDictionary at: keySymbol put: replacement].\\\\n\\\\n\\\\taReferenceStream _ ReferenceStream fileNamed: aFileName.\\\\n\\\\taReferenceStream nextPut: toRemove.\\\\n\\\\taReferenceStream close! !\\\\n\\\\n!StandardScriptingSystem methodsFor: 'form dictionary' stamp: 'sw 2/24/2003 16:28'!\\\\nformAtKey: aString\\\\n\\\\t\\\\\\\"Answer the form saved under the given key\\\\\\\"\\\\n\\\\n\\\\tSymbol hasInterned: aString ifTrue:\\\\n\\\\t\\\\t[:aKey | ^ FormDictionary at: aKey ifAbsent: [nil]].\\\\n\\\\t^ nil! !\\\\n\\\\n!StandardScriptingSystem methodsFor: 'form dictionary' stamp: 'ar 3/3/2001 19:46'!\\\\nformAtKey: aKey extent: extent depth: depth\\\\n\\\\t\\\\\\\"ScriptingSystem saveForm: (TileMorph downPicture) atKey: 'downArrow'\\\\\\\"\\\\n\\\\t^ FormDictionary at: aKey asSymbol ifAbsent: [Form extent: extent depth: depth]! !\\\\n\\\\n!StandardScriptingSystem methodsFor: 'form dictionary' stamp: 'ar 3/3/2001 19:49'!\\\\nformDictionary\\\\n\\\\t^FormDictionary! !\\\\n\\\\n!StandardScriptingSystem methodsFor: 'form dictionary' stamp: 'sd 5/11/2003 21:32'!\\\\ninspectFormDictionary\\\\n\\\\t\\\\\\\"ScriptingSystem inspectFormDictionary\\\\\\\"\\\\n\\\\t\\\\n\\\\tGraphicalDictionaryMenu openOn: FormDictionary withLabel: 'Testing One Two Three'! !\\\\n\\\\n!StandardScriptingSystem methodsFor: 'form dictionary' stamp: 'ar 3/3/2001 19:44'!\\\\nprivateGraphics\\\\n\\\\t\\\\\\\"ScriptingSystem deletePrivateGraphics\\\\\\\"\\\\n\\\\t^#(#BadgeMiniPic #BadgePic #Broom #CedarPic #CollagePic #CoverMain #CoverSpiral #CoverTexture #Fred #ImagiPic #KayaPic #StudioPic)! !\\\\n\\\\n!StandardScriptingSystem methodsFor: 'form dictionary' stamp: 'sw 10/6/1999 20:57'!\\\\nsaveForm: aForm atKey: aKey\\\\n\\\\tFormDictionary at: aKey asSymbol put: aForm! !\\\\n\\\\n!StandardScriptingSystem methodsFor: 'form dictionary' stamp: 'sw 10/24/1998 14:12'!\\\\nsqueakyMouseForm\\\\n\\\\t^ self formAtKey: 'squeakyMouse'\\\\n\\\\n\\\\\\\"\\\\n\\\\tScriptingSystem saveForm: (Form\\\\n\\\\textent: 30@29\\\\n\\\\tdepth: 16\\\\n\\\\tfromArray: #( 1811114995 1878286257 2012637171 1811180532 1811180533 1811179508 1811180532 1811179508 1744006133 1878289396 1811180533 1878289396 1744007156 1674736630 1744006132 1811114995 1811181556 1744006131 1811246068 1811180532 1811179508 1811180532 1744071668 1811113972 1811180532 1811180532 1811179507 1878288338 1945529332 1744071668 1743941620 1811112945 1811179506 1811114995 1744006131 1744006130 1744005106 1811048434 1811113969 1743939570 1811179506 1743939571 1676833782 1676765171 1811047410 1744006131 1811048435 1811116020 1811180531 1743939571 1811048435 1743939570 1743939570 1743939570 1743940594 1744005106 1811181556 1811180532 1676766196 1743939570 1878420468 1676963830 1189896082 1811245044 1744137204 1744070644 1811179508 1811113971 1743939571 1811179508 1811246070 1811309524 1811302093 1811310580 1811246068 1674867703 1744049472 1120606594 1118465013 1744137205 1811179508 1811180532 1744071667 1744006132 1811112947 1811247095 1605584589 358761132 289435638 1676830707 1741975543 1462778473 1811312631 702891724 1811310548 1945528308 1811178450 1945528307 1878288372 1878353875 1878421494 1051471335 1809213397 1118524175 1811246068 1945659348 1185698607 1878486005 1672694510 1118531574 1607626741 1878420467 1811180533 1743942645 1744072693 1811301035 1185770487 1878486006 1324239597 1811180533 1811116019 1120623438 1878352818 1945462739 704868339 1878289395 1811049459 1878221808 1878223859 1743876083 1811162563 1945463796 1811181556 1464746666 1811116018 1809019893 1120551562 1945464821 1741844468 1466842760 1878289395 1811048434 1811050483 1811050483 1878223859 1049188174 1741910004 1811181556 1256998634 1811114994 1878289396 1466840647 1744007156 1744006131 1676877216 1743940596 1878222835 1743938545 1878351792 1676833781 358641652 1743940596 1811050484 845566798 1811113970 1811114995 1811163652 1811112913 1878420468 1878282028 1811179506 1607560178 1878289395 1676900342 1878351825 1466853330 1811113971 1811116019 635659217 1811179506 1811245045 1676942754 1744137206 1744201717 1676962806 1676962805 1811310581 1676896245 1744199635 1811376117 1744072695 1744005109 1811244019 499279861 1811310581 1811244020 1811293668 1399943159 1605528567 1744136181 982063522 986342388 1744070645 1744189066 430063308 1744071669 1744070644 1744067504 566519797 1744136181 1744137205 1743999854 912813044 1811311606 1742162607 4195488 283139922 1945531382 1253113857 144710948 1601400791 1811246069 1811167879 1464821747 1744136180 1674799094 1811178482 843473875 1811311606 1878533542 2106790 2080066222 1876193270 696845376 627472380 1185772536 1878355957 1743990309 1744007157 1676898294 1744006132 1811114996 1743941620 1811180533 1809204941 4194368 4217681 1878290421 1252982848 4194336 1670540278 1739811795 1878353906 1744006131 1811179506 1744007157 1744005106 1945462771 1811182582 1811311574 1393641133 1462856629 2012638196 1876382449 1112301394 1742041045 1945596917 1676833781 1811113970 1811179507 1811180532 1672705014 1674735606 1672697648 1945725943 1878551479 1809215479 1811312629 1809216504 1809215479 1809215478 1462853490 1878487029 1744007158 1744005075 1811239726 704979363 495004132 700789287 562372997 631646663 1739998892 4194400 1116497846 698688932 562375109 770124262 633609569 495070758 1257010166 562315916 1809279958 2012894002 1047280171 980237901 910966381 1668677696 4194400 6314867 1047281260 908804749 910968495 1393719290 1809279959 1185750370 1809214455 1878469062 423836236 1532188466 1601592148 1462986647 1672937568 4194368 6319062 1603622706 1601525554 1601522417 1047336194 770206679 1878487031 1878409899 977955830 1809145716 1118586509 980105834 980045584 1811372914 980104778 1605526483 1395605131 910769804 1118651052 1534358520 1809136234 1118596053 1532059506 1878485973 1326456163 1945660374 1742106615 1811311607 1945725942 1742107641 1744072693 1811311605 1744203767 1878551543 564478604 1878553591 1603428242 1811048433 1811049459 1051290611 1744006131 1811049459 1878156273 1743874034 1744007156 1743874033 1811048434 1811113970 1743939571 1743933228 1603301363 1743875059 1811049458 1945461745 1811181556 1811113971 1811049458 1811048434 1811116020 1878287346 1878223857 1743940594 1744006130 1744007157 1945395153 1945400309 1811048434 1743810547 1676765170 1878353906 1811113970 1743874032 1810983921 1743874033 1811113971 1676765169 1743874034 1743940593 1743939569 1811047409 1676765168 1743940595 1810981872 1945397235 1607560179 1743941620 1810982897 1810983921 1811048433 1744007155 1743875059 1811048434 1743875058 1743939568 1676832754 1811116019 1811114994 1811244019 1676962805 1677029367 1811244020 1744005106 1743940594 1811246068 1744070645 1676961781 1744004084 1676897269 1811180533 1878353908 1744004083 1744070645)\\\\n\\\\toffset: 0@0) atKey: 'squeakyMouse'\\\\\\\"! !\\\\n\\\\n\\\\n!StandardScriptingSystem methodsFor: 'help dictionary' stamp: 'dgd 9/1/2003 14:25'!\\\\nhelpStringOrNilFor: aSymbol \\\\n\\\\t\\\\\\\"If my HelpStrings dictionary has an entry at the given symbol, \\\\n\\\\tanswer that entry's value, else answer nil\\\\\\\"\\\\n\\\\tHelpStrings\\\\n\\\\t\\\\tat: aSymbol\\\\n\\\\t\\\\tifPresent:[:string | ^ string translated].\\\\n^ nil! !\\\\n\\\\n!StandardScriptingSystem methodsFor: 'help dictionary' stamp: 'sw 6/15/1999 17:03'!\\\\ninitializeHelpStrings\\\\n\\\\t\\\\\\\"Initialize the data structure that determines, for the etoy system, help messages for various scripting elements.  The structure is built up by letting every Morph subclass contribute elements simply by implementing method #helpContributions.  Consult implementors of #helpContributions for examples of how this goes.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"ScriptingSystem initializeHelpStrings\\\\\\\"\\\\n\\\\n\\\\t| aDictionary |\\\\n\\\\taDictionary _ IdentityDictionary new.  \\\\n\\\\t\\\\\\\"For safety, the new copy is built up in this temp first, so that if an error occurs during the creation of the structure, the old version will remain remain in place\\\\\\\"\\\\n\\\\n\\\\tMorph withAllSubclasses do:\\\\n\\\\t\\\\t[:aClass | (aClass class selectors includes: #helpContributions)\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[aClass helpContributions do:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:pair | aDictionary at: pair first put: pair second]]].\\\\n\\\\n\\\\t\\\\tHelpStrings _ aDictionary! !\\\\n\\\\n\\\\n!StandardScriptingSystem methodsFor: 'utilities' stamp: 'sw 10/30/2000 16:33'!\\\\nallClassVarNamesInSystem\\\\n\\\\t\\\\\\\"Compute and answer a set of all the class variable names known to the sytem from any class\\\\\\\"\\\\n\\\\n\\\\t| aList |\\\\n\\\\taList _ OrderedCollection new.\\\\n\\\\tObject withAllSubclasses do:\\\\n\\\\t\\\\t[:c | aList addAll: c allClassVarNames].\\\\n\\\\t^ aList asSet\\\\n\\\\n\\\\t\\\\\\\"ScriptingSystem allClassVarNamesInSystem\\\\\\\"\\\\n! !\\\\n\\\\n!StandardScriptingSystem methodsFor: 'utilities' stamp: 'sw 6/16/2005 01:35'!\\\\ncustomizeForEToyUsers: aBoolean\\\\n\\\\t\\\\\\\"If aBoolean is true, set things up for etoy users.  If it's false, unset some of those things.  Some things are set when switching into etoy mode but not reversed when switching out of etoy mode.\\\\\\\"\\\\n \\\\n\\\\t#(\\\\t\\\\n\\\\t\\\\t(allowEtoyUserCustomEvents\\\\tno\\\\t\\\\treverse)\\\\n\\\\t\\\\t(balloonHelpEnabled\\\\t\\\\t\\\\tyes\\\\t\\\\tdontReverse)\\\\n\\\\t\\\\t(debugHaloHandle\\\\t\\\\t\\\\tno\\\\t\\\\treverse)\\\\n\\\\t\\\\t(modalColorPickers\\\\t\\\\t\\\\tyes\\\\t\\\\tdontReverse)\\\\n\\\\t\\\\t(oliveHandleForScriptedObjects\\\\tno\\\\tdontReverse)\\\\n\\\\t\\\\t(uniqueNamesInHalos\\\\t\\\\tyes\\\\t\\\\treverse)\\\\n\\\\t\\\\t(useUndo\\\\t\\\\t\\\\t\\\\t\\\\tyes\\\\t\\\\tdontReverse)\\\\n\\\\t\\\\t(infiniteUndo\\\\t\\\\t\\\\t\\\\tno\\\\t\\\\tdontReverse)\\\\n\\\\t\\\\t(warnIfNoChangesFile\\\\t\\\\tno\\\\t\\\\treverse)\\\\n\\\\t\\\\t(warnIfNoSourcesFile\\\\t\\\\tno\\\\t\\\\treverse)) do:\\\\n\\\\t\\\\t\\\\t[:trip |\\\\n\\\\t\\\\t\\\\t\\\\t(aBoolean or: [trip third == #reverse]) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[Preferences enableOrDisable: trip first asPer:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t((trip second == #yes) & aBoolean) | ((trip second == #no) & aBoolean not)]]! !\\\\n\\\\n!StandardScriptingSystem methodsFor: 'utilities' stamp: 'sw 4/6/2005 09:30'!\\\\nsoundNamesToSuppress\\\\n\\\\t\\\\\\\"Answer a list of sound-names that are not to be offered in sound-choice pop-ups unless they are the current choice\\\\\\\"\\\\n\\\\n\\\\t^ #('scrape' 'scritch' 'peaks')! !\\\\n\\\\n!StandardScriptingSystem methodsFor: 'utilities' stamp: 'sw 11/26/1999 15:44'!\\\\nstripGraphicsForExternalRelease\\\\n\\\\t\\\\\\\"ScriptingSystem stripGraphicsForExternalRelease\\\\\\\"\\\\n\\\\n\\\\t|  replacement |\\\\n\\\\treplacement _ FormDictionary at: #Gets.\\\\n\\\\n\\\\t#('BadgeMiniPic' 'BadgePic' 'Broom' 'CedarPic' 'CollagePic' 'CoverMain' 'CoverSpiral' 'CoverTexture' 'Fred' 'ImagiPic' 'KayaPic' 'StudioPic')\\\\n\\\\t\\\\tdo:\\\\n\\\\t\\\\t\\\\t[:aKey | FormDictionary at: aKey asSymbol put: replacement]! !\\\\n\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-customevents-custom events' stamp: 'nk 11/1/2004 07:47'!\\\\naddCustomEventFor: registrantClass named: aSymbol help: helpString targetMorphClass: targetClass\\\\n\\\\t| registration |\\\\n\\\\tregistration _ self customEventsRegistry at: aSymbol ifAbsentPut: [ IdentityDictionary new ].\\\\n\\\\tregistration at: registrantClass put: { helpString. targetClass }.\\\\n! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-customevents-custom events' stamp: 'nk 9/26/2003 23:23'!\\\\naddUserCustomEventNamed: aSymbol help: helpString\\\\n\\\\tself currentWorld addUserCustomEventNamed: aSymbol help: helpString.\\\\n\\\\t\\\\\\\"Vocabulary addStandardVocabulary: UserCustomEventNameType new.\\\\\\\"\\\\n\\\\tVocabulary customEventsVocabulary.\\\\n\\\\tSymbolListTile updateAllTilesForVocabularyNamed: #CustomEvents! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-customevents-custom events' stamp: 'nk 11/1/2004 08:19'!\\\\ncustomEventNamesAndHelpStringsFor: aPlayer\\\\n\\\\t| retval help helpStrings morph |\\\\n\\\\tmorph := aPlayer costume renderedMorph.\\\\n\\\\tretval := SortedCollection sortBlock: [ :a :b | a first < b first ].\\\\n\\\\tself customEventsRegistry\\\\n\\\\t\\\\tkeysAndValuesDo: [ :k :v |\\\\n\\\\t\\\\t\\\\thelpStrings := Array streamContents: [ :hsStream |\\\\n\\\\t\\\\t\\\\t\\\\tv keysAndValuesDo: [ :registrant :array |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(morph isKindOf: array second) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\thelp := String streamContents: [ :stream |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tv size > 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [ stream nextPut: $(;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnextPutAll: array second name;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnextPut: $);\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tspace ].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstream nextPutAll: array first ].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\thsStream nextPut: help ]]].\\\\n\\\\t\\\\t\\\\thelpStrings isEmpty ifFalse: [retval add: { k. helpStrings } ]].\\\\n\\\\t^ retval! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-customevents-custom events' stamp: 'nk 9/26/2003 23:31'!\\\\ncustomEventStati\\\\n\\\\t^self globalCustomEventNames,\\\\n\\\\tself userCustomEventNames! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-customevents-custom events' stamp: 'nk 10/12/2003 13:14'!\\\\ncustomEventsRegistry\\\\n\\\\t^Smalltalk at: #CustomEventsRegistry ifAbsentPut: [ IdentityDictionary new ].! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-customevents-custom events' stamp: 'nk 9/26/2003 23:30'!\\\\nglobalCustomEventNames\\\\n\\\\t^self customEventsRegistry keys asArray sort! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-customevents-custom events' stamp: 'nk 11/1/2004 07:56'!\\\\nglobalCustomEventNamesFor: aPlayer\\\\n\\\\t| morph names |\\\\n\\\\tmorph := aPlayer costume renderedMorph.\\\\n\\\\tnames := SortedCollection new.\\\\n\\\\tself customEventsRegistry keysAndValuesDo: [ :k :v |\\\\n\\\\t\\\\t(v anySatisfy: [ :array | morph isKindOf: array second ])\\\\n\\\\t\\\\t\\\\tifTrue: [ names add: k ]].\\\\n\\\\t^names asArray! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-customevents-custom events' stamp: 'nk 7/20/2003 12:37'!\\\\nremoveCustomEventNamed: aSymbol for: registrant\\\\n\\\\t| registration helpString |\\\\n\\\\tregistration _ self customEventsRegistry at: aSymbol ifAbsent: [ ^nil ].\\\\n\\\\thelpString _ registration removeKey: registrant ifAbsent: [].\\\\n\\\\tregistration isEmpty ifTrue: [ self customEventsRegistry removeKey: aSymbol ].\\\\n\\\\t^helpString! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-customevents-custom events' stamp: 'nk 9/26/2003 23:26'!\\\\nremoveUserCustomEventNamed: eventName\\\\n\\\\t| retval |\\\\n\\\\tretval _ self currentWorld removeUserCustomEventNamed: eventName.\\\\n\\\\t\\\\\\\"Vocabulary addStandardVocabulary: UserCustomEventNameType new.\\\\\\\"\\\\n\\\\tVocabulary customEventsVocabulary.\\\\n\\\\tSymbolListTile updateAllTilesForVocabularyNamed: #CustomEvents.\\\\n\\\\t^retval! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-customevents-custom events' stamp: 'nk 6/30/2004 18:16'!\\\\nstandardEventStati\\\\n\\\\t\\\\\\\"Answer the events that can be directed to a particular morph by its event handler.\\\\\\\"\\\\n\\\\t^ #(mouseDown\\\\t\\\\\\\"run when mouse goes down on me\\\\\\\"\\\\n\\\\t\\\\tmouseStillDown\\\\t\\\\\\\"while mouse still down\\\\\\\"\\\\n\\\\t\\\\tmouseUp\\\\t\\\\t\\\\\\\"when mouse comes back up\\\\\\\"\\\\n\\\\t\\\\tmouseEnter\\\\t\\\\\\\"when mouse enters my bounds, button up\\\\\\\"\\\\n\\\\t\\\\tmouseLeave\\\\t\\\\\\\"when mouse exits my bounds, button up\\\\\\\"\\\\n\\\\t\\\\tmouseEnterDragging\\\\t\\\\\\\"when mouse enters my bounds, button down\\\\\\\"\\\\n\\\\t\\\\tmouseLeaveDragging\\\\t\\\\\\\"when mouse exits my bounds, button down\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"keyStroke\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"gesture\\\\\\\"\\\\n\\\\t)\\\\n! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-customevents-custom events' stamp: 'nk 9/26/2003 23:22'!\\\\nuserCustomEventNames\\\\n\\\\t^ self currentWorld userCustomEventNames! !\\\\n\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-customevents-help dictionary' stamp: 'nk 11/1/2004 08:21'!\\\\nstatusHelpStringFor: aPlayer\\\\n\\\\t^String streamContents: [ :stream |\\\\n\\\\t\\\\tstream nextPutAll: 'normal -- run when called\\\\npaused -- ready to run all the time\\\\nticking -- run all the time\\\\nmouseDown -- run when mouse goes down on me\\\\nmouseStillDown -- while mouse still down\\\\nmouseUp -- when mouse comes back up\\\\nmouseEnter -- when mouse enters my bounds, button up\\\\nmouseLeave -- when mouse exits my bounds, button up\\\\nmouseEnterDragging -- when mouse enters my bounds, button down\\\\nmouseLeaveDragging -- when mouse exits my bounds, button down\\\\nopening -- when I am being opened\\\\nclosing -- when I am being closed' translated.\\\\n\\\\n\\\\\\\"'keyStroke -- run when user hits a key' \\\\\\\"\\\\n\\\\n\\\\tstream cr; cr; nextPutAll: 'More events:' translated; cr.\\\\n\\\\n\\\\t(self customEventNamesAndHelpStringsFor: aPlayer) do: [ :array |\\\\n\\\\t\\\\tstream cr;\\\\n\\\\t\\\\tnextPutAll: array first;\\\\n\\\\t\\\\tnextPutAll: ' -- '.\\\\n\\\\t\\\\tarray second do: [ :help | stream nextPutAll: help translated ]\\\\n\\\\t\\\\t\\\\tseparatedBy: [ stream nextPutAll: ' or ' translated ]].\\\\n\\\\n\\\\t(Preferences allowEtoyUserCustomEvents) ifTrue: [\\\\n\\\\tself userCustomEventNames isEmpty ifFalse: [\\\\n\\\\t\\\\tstream cr; cr; nextPutAll: 'User custom events:' translated; cr.\\\\n\\\\t\\\\tself currentWorld userCustomEventsRegistry keysAndValuesDo: [ :key :value |\\\\n\\\\t\\\\t\\\\tstream cr; nextPutAll: key; nextPutAll: ' -- '; nextPutAll: value ]]]]! !\\\\n\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-font & color choices' stamp: 'sw 5/2/1998 14:26'!\\\\ncolorBehindTiles\\\\n\\\\t^ Color r: 0.903 g: 1.0 b: 0.903! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-font & color choices' stamp: 'dgd 7/12/2003 12:06'!\\\\nfontForNameEditingInScriptor\\\\n\\\\t^ Preferences standardEToysFont! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-font & color choices' stamp: 'dgd 7/12/2003 12:05'!\\\\nfontForTiles\\\\n\\\\t^ Preferences standardEToysFont! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-font & color choices' stamp: 'nk 7/12/2003 08:59'!\\\\nsmallBoldFont\\\\n\\\\t\\\\\\\"Answer a small bold font for use in some standard scripting-support structures\\\\\\\"\\\\n\\\\n\\\\t^ StrikeFont familyName: Preferences standardEToysFont familyName size: 12! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-font & color choices' stamp: 'sw 9/14/1998 14:41'!\\\\nstatusColorSymbolFor: statusSymbol\\\\n\\\\t#(\\\\t(normal\\\\t\\\\t\\\\t\\\\t\\\\tgreen)\\\\n\\\\t\\\\t(ticking\\\\t\\\\t\\\\t\\\\t\\\\tblue)\\\\n\\\\t\\\\t(paused\\\\t\\\\t\\\\t\\\\t\\\\tred)\\\\n\\\\t\\\\t(mouseDown\\\\t\\\\t\\\\t\\\\tyellow)\\\\n\\\\t\\\\t(mouseStillDown\\\\t\\\\t\\\\tlightYellow)\\\\n\\\\t\\\\t(mouseUp\\\\t\\\\t\\\\t\\\\tlightBlue)\\\\n\\\\t\\\\t(mouseEnter\\\\t\\\\t\\\\t\\\\tlightBrown)\\\\n\\\\t\\\\t(mouseLeave\\\\t\\\\t\\\\tlightRed)\\\\n\\\\t\\\\t(mouseEnterDragging\\\\tlightGray)\\\\n\\\\t\\\\t(mouseLeaveDragging\\\\tdarkGray)\\\\n\\\\t\\\\t(keyStroke\\\\t\\\\t\\\\t\\\\tlightGreen)) do:\\\\n\\\\n\\\\t\\\\t\\\\t[:pair | statusSymbol == pair first ifTrue: [^ pair second]].\\\\n\\\\n\\\\t\\\\t^ #blue! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-font & color choices' stamp: 'sw 5/2/1998 14:23'!\\\\nuniformTileInteriorColor\\\\n\\\\t^ Color r: 0.806 g: 1.0 b: 0.806! !\\\\n\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-form dictionary' stamp: 'sw 5/12/1999 10:09'!\\\\ninstallSolidMenuForm\\\\n\\\\t\\\\\\\"ScriptingSystem installSolidMenuForm\\\\\\\"\\\\n\\\\tself saveForm:\\\\n\\\\t\\\\t(Form extent: 14@16 depth: 16\\\\n\\\\tfromArray: #( 1 0 0 0 0 0 0 65537 65536 0 0 0 65537 0 65537 65537 65537 65537 65537 65537 65536 65537 65537 65537 65537 65537 1600061441 65536 65537 1600085855 1600085855 1600085855 1600085855 1600061441 65536 65537 1600085855 65537 65537 65537 65537 65536 65537 1600085855 65537 65537 65537 1600061441 65536 65537 1600085855 1600085855 1600085855 1600085855 1600085855 65537 65537 1600085855 65537 65537 65537 1600085855 65537 65537 1600085855 1600061441 65537 65537 89951 65537 65537 1600085855 1600085855 1600085855 1600085855 1600085855 65537 65537 1600085855 1600061441 65537 65537 65537 65537 65537 1600085855 65537 65537 65537 65536 65537 65537 65537 65537 65537 65537 65537 65537 1 65537 65537 65537 65537 65537 65536 0 65536 0 0 0 0 0) offset: 0@0)\\\\n\\\\t\\\\tatKey: 'SolidMenu'! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-form dictionary' stamp: 'sw 11/26/1999 15:37'!\\\\nmergeGraphicsFrom: aDictionary\\\\n\\\\t\\\\\\\"aDictionary is assumed to hold associations of the form <formName> -> <form>.   Merge the graphics held by that dictionary into the internal FormDictionary, overlaying any existing entries with the ones found in aDictionary\\\\\\\"\\\\n\\\\n\\\\taDictionary associationsDo:\\\\n\\\\t\\\\t[:assoc | self saveForm: assoc value atKey: assoc key]\\\\n\\\\n\\\\t\\\\t\\\\\\\"works ok even if keys in aDictionary are strings rather than symbols\\\\\\\"! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-form dictionary' stamp: 'sw 2/20/2002 01:09'!\\\\npatchInNewStandardPlayerForm\\\\n\\\\t\\\\\\\"Patch in a darker and larger representation of a Dot.  No senders -- called from the postscript of an update\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"ScriptingSystem patchInNewStandardPlayerForm\\\\\\\"\\\\n\\\\n\\\\tFormDictionary at: #standardPlayer put:\\\\n\\\\t\\\\t(Form\\\\n\\\\textent: 13@13\\\\n\\\\tdepth: 16\\\\n\\\\tfromArray: #( 0 0 0 65536 0 0 0 0 0 65537 65537 65536 0 0 0 65537 65537 65537 65537 65536 0 0 65537 65537 65537 65537 65536 0 1 65537 65537 65537 65537 65537 0 1 65537 65537 65537 65537 65537 0 65537 65537 65537 65537 65537 65537 65536 1 65537 65537 65537 65537 65537 0 1 65537 65537 65537 65537 65537 0 0 65537 65537 65537 65537 65536 0 0 65537 65537 65537 65537 65536 0 0 0 65537 65537 65536 0 0 0 0 0 65536 0 0 0)\\\\n\\\\toffset: 0@0)! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-form dictionary' stamp: 'sw 5/2/1998 14:01'!\\\\nreadFormsFromFileNamed: aFileName\\\\n\\\\t\\\\\\\"Read the entire FormDictionary in from a designated file on disk\\\\\\\"\\\\n\\\\n\\\\t| aReferenceStream |\\\\n\\\\taReferenceStream _ ReferenceStream fileNamed: aFileName.\\\\n\\\\tFormDictionary _ aReferenceStream next.\\\\n\\\\taReferenceStream close\\\\n\\\\n\\\\t\\\\\\\"ScriptingSystem readFormsFromFileNamed: 'EToyForms22Apr'\\\\\\\"! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-form dictionary' stamp: 'sw 9/14/2000 21:29'!\\\\nreadFormsFromFileNamed: aFileName andStoreIntoGlobal: globalName\\\\n\\\\t\\\\\\\"Read the a FormDictionary in from a designated file on disk and save it in the designated global\\\\\\\"\\\\n\\\\n\\\\t| aReferenceStream |\\\\n\\\\taReferenceStream _ ReferenceStream fileNamed: aFileName.\\\\n\\\\tSmalltalk at: globalName put: aReferenceStream next.\\\\n\\\\taReferenceStream close\\\\n\\\\n\\\\t\\\\\\\"ScriptingSystem readFormsFromFileNamed: 'SystemFormsFromFwdF.forms' andStoreIntoGlobal: #FormsTemp\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"ScriptingSystem saveForm:  (FormsTemp at: #StackElementDesignationHelp) atKey: #StackElementDesignationHelp\\\\\\\"! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-form dictionary' stamp: 'sw 4/23/1999 11:24'!\\\\nrestorePrivateGraphics\\\\n\\\\t\\\\\\\"ScriptingSystem restorePrivateGraphics\\\\\\\"\\\\n\\\\t| aReferenceStream |\\\\n\\\\taReferenceStream _ ReferenceStream fileNamed: 'disGraphics'.\\\\n\\\\tself mergeGraphicsFrom: aReferenceStream next.\\\\n\\\\taReferenceStream close.\\\\n! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-form dictionary' stamp: 'sw 5/6/1998 17:46'!\\\\nsaveFormsToFileNamed: aFileName\\\\n\\\\t\\\\\\\"Save the current state of form dictionary to disk for possible later retrieval\\\\\\\"\\\\n  \\\\t (ReferenceStream fileNamed: aFileName) nextPut: FormDictionary; close\\\\n\\\\n\\\\t\\\\\\\"ScriptingSystem saveFormsToFileNamed: 'SystemForms06May98.forms'\\\\\\\"! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-form dictionary' stamp: 'sw 12/7/1998 16:47'!\\\\nstandardForms\\\\n\\\\t\\\\\\\"ScriptingSystem standardForms\\\\\\\"\\\\n\\\\t^ FormDictionary collect: [:f | f]! !\\\\n\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-parts bin' stamp: 'tk 10/20/2004 15:52'!\\\\nanyButtonPressedTiles\\\\n\\\\t\\\\\\\"Answer tiles representing the query 'is any button pressed?'\\\\\\\"\\\\n\\\\n\\\\t^ self tilesForQuery: '(ActiveHand anyButtonPressed)' label: 'button down?' translated! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-parts bin' stamp: 'sw 11/16/2004 13:56'!\\\\nnoButtonPressedTiles\\\\n\\\\t\\\\\\\"Answer tiles representing the query 'is no button pressed?'\\\\\\\"\\\\n\\\\n\\\\t^ self tilesForQuery: '(ActiveHand noButtonPressed)' label: 'button up?' translated! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-parts bin' stamp: 'sw 5/3/1999 22:40'!\\\\nprototypicalHolder\\\\n\\\\t| aHolder |\\\\n\\\\taHolder _ PasteUpMorph authoringPrototype color: Color orange muchLighter; borderColor: Color orange lighter.\\\\n\\\\taHolder setNameTo: 'holder'; extent: 160 @ 110.\\\\n\\\\t^ aHolder behaveLikeHolder.\\\\n! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-parts bin' stamp: 'sw 10/27/1998 13:35'!\\\\nresetStandardPartsBin\\\\n\\\\t\\\\\\\"ScriptingSystem resetStandardPartsBin\\\\\\\"\\\\n\\\\n\\\\tStandardPartsBin _ nil! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-parts bin' stamp: 'sw 7/3/2001 08:01'!\\\\ntilesForQuery: expressionString label: aLabel\\\\n\\\\t\\\\\\\"Answer scripting tiles that represent the query,\\\\\\\"\\\\n\\\\n\\\\t| aPhrase aTile |\\\\n\\\\taPhrase _ SystemQueryPhrase new.\\\\n\\\\taTile _ BooleanTile new.\\\\n\\\\taTile setExpression: expressionString  label: aLabel.\\\\n\\\\taPhrase addMorph: aTile.\\\\n\\\\t^ aPhrase\\\\n! !\\\\n\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-script-control' stamp: 'dgd 9/19/2003 14:40'!\\\\ngoButton\\\\n\\\\t| aButton |\\\\n\\\\taButton _  ThreePhaseButtonMorph new.\\\\n\\\\taButton image:  (ScriptingSystem formAtKey: 'GoPicOn');\\\\n\\\\t\\\\t\\\\toffImage: (ScriptingSystem formAtKey: 'GoPic');\\\\n\\\\t\\\\t\\\\tpressedImage: (ScriptingSystem formAtKey: 'GoPicOn');\\\\n\\\\t\\\\t\\\\tactionSelector: #goUp:with:; \\\\n\\\\t\\\\t\\\\targuments: (Array with: nil with: aButton);\\\\n\\\\t\\\\t\\\\tactWhen: #buttonUp;\\\\n\\\\t\\\\t\\\\ttarget: self;\\\\n\\\\t\\\\t\\\\tsetNameTo: 'Go Button';\\\\n\\\\t\\\\t\\\\tsetBalloonText:\\\\n'Resume running all paused scripts' translated.\\\\n\\\\t^ aButton! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-script-control' stamp: 'sw 11/11/1998 15:24'!\\\\ngoUp: evt with: aGoButton\\\\n\\\\taGoButton presenter startRunningScriptsFrom: aGoButton! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-script-control' stamp: 'sw 1/23/2001 11:39'!\\\\nscriptControlButtons\\\\n\\\\t\\\\\\\"Answer a composite object that serves to control the stop/stop/go status of a Presenter\\\\\\\"\\\\n\\\\n\\\\t| wrapper |\\\\n\\\\twrapper _ AlignmentMorph newRow setNameTo: 'script controls'.\\\\n\\\\twrapper vResizing: #shrinkWrap.\\\\n\\\\twrapper hResizing: #shrinkWrap.\\\\n\\\\twrapper addMorph: self stopButton.\\\\n\\\\twrapper addMorphBack: self stepButton.\\\\n\\\\twrapper addMorphBack: self goButton.\\\\n\\\\twrapper beTransparent.\\\\n\\\\t^ wrapper! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-script-control' stamp: 'dgd 9/19/2003 14:41'!\\\\nstepButton\\\\n\\\\t| aButton |\\\\n\\\\tself flag: #deferred.  \\\\\\\"ambiguity about recipients\\\\\\\"\\\\n\\\\taButton _ ThreePhaseButtonMorph new.\\\\n\\\\t\\\\taButton\\\\n\\\\t\\\\t\\\\timage:  (ScriptingSystem formAtKey: 'StepPicOn');\\\\n\\\\t\\\\t\\\\toffImage: (ScriptingSystem formAtKey: 'StepPic');\\\\n\\\\t\\\\t\\\\tpressedImage:  (ScriptingSystem formAtKey: 'StepPicOn');\\\\n\\\\t\\\\t\\\\targuments: (Array with: nil with: aButton);\\\\n\\\\t\\\\t \\\\tactionSelector: #stepStillDown:with:; \\\\n\\\\t\\\\t\\\\ttarget: self;\\\\n\\\\t\\\\t\\\\tsetNameTo: 'Step Button'; \\\\n\\\\t\\\\t\\\\tactWhen: #whilePressed;\\\\n\\\\t\\\\t\\\\ton: #mouseDown send: #stepDown:with: to: self;\\\\n\\\\t\\\\t\\\\ton: #mouseStillDown send: #stepStillDown:with: to: self;\\\\n\\\\t\\\\t\\\\ton: #mouseUp send: #stepUp:with: to: self;\\\\n\\\\t\\\\t\\\\tsetBalloonText:\\\\n'Run every paused script exactly once.  Keep the mouse button down over \\\\\\\"Step\\\\\\\" and everything will keep running until you release it' translated.\\\\n\\\\t^ aButton! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-script-control' stamp: 'sw 10/30/1998 15:33'!\\\\nstepDown: evt with: aMorph\\\\n\\\\taMorph presenter stopRunningScripts! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-script-control' stamp: 'sw 10/30/1998 15:35'!\\\\nstepStillDown: dummy with: theButton\\\\n\\\\ttheButton presenter stepStillDown: dummy with: theButton! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-script-control' stamp: 'sw 10/30/1998 15:35'!\\\\nstepUp: evt with: aMorph\\\\n\\\\taMorph presenter stepUp: evt with: aMorph! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-script-control' stamp: 'dgd 9/19/2003 14:41'!\\\\nstopButton\\\\n\\\\t\\\\\\\"Answer a new button that can serve as a stop button\\\\\\\"\\\\n\\\\t| aButton |\\\\n\\\\taButton _ ThreePhaseButtonMorph new.\\\\n\\\\taButton\\\\n\\\\t\\\\timage:  (ScriptingSystem formAtKey: 'StopPic');\\\\n\\\\t\\\\toffImage: (ScriptingSystem formAtKey: 'StopPic');\\\\n\\\\t\\\\tpressedImage:  (ScriptingSystem formAtKey: 'StopPicOn').\\\\n\\\\t\\\\taButton actionSelector: #stopUp:with:; \\\\n\\\\t\\\\targuments: (Array with: nil with: aButton);\\\\n\\\\t\\\\tactWhen: #buttonUp;\\\\n\\\\t\\\\ttarget: self;\\\\n\\\\t\\\\tsetNameTo: 'Stop Button'; \\\\n\\\\t\\\\tsetBalloonText: 'Pause all ticking scripts.' translated.\\\\n\\\\t^ aButton! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-script-control' stamp: 'sw 11/11/1998 15:16'!\\\\nstopUp: dummy with: theButton\\\\n\\\\t| aPresenter |\\\\n\\\\t(aPresenter _ theButton presenter) flushPlayerListCache.  \\\\\\\"catch guys not in cache but who're running\\\\\\\"\\\\n\\\\taPresenter stopRunningScriptsFrom: theButton! !\\\\n\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-tile colors' stamp: 'sw 8/28/2004 15:19'!\\\\ncolorForType: typeSymbol\\\\n\\\\t\\\\\\\"Answer the color to use to represent the given type symbol\\\\\\\"\\\\n\\\\n\\\\ttrue ifTrue:\\\\n\\\\t\\\\t[^ self standardTileBorderColor].\\\\n\\\\n\\\\ttypeSymbol capitalized = #Command ifTrue:\\\\n\\\\t\\\\t[^ Color fromRgbTriplet: #(0.065 0.258 1.0)].\\\\n\\\\t\\\\\\\"Command is historical and idiosyncratic and should be regularized\\\\\\\"\\\\n\\\\n\\\\t^ (Vocabulary vocabularyForType: typeSymbol) typeColor! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-tile colors' stamp: 'sw 10/29/1998 16:18'!\\\\ncolorFudge\\\\n\\\\t^ 0.4! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-tile colors' stamp: 'sw 8/28/2004 20:31'!\\\\nstandardTileBorderColor\\\\n\\\\t\\\\\\\"Answer the color to use for tile borders\\\\\\\"\\\\n\\\\n\\\\t^ Color r: 0.804 g: 0.76 b: 0.564! !\\\\n\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-universal slots & scripts' stamp: 'sw 1/4/2005 02:20'!\\\\nacceptableSlotNameFrom: originalString forSlotCurrentlyNamed: currentName asSlotNameIn: aPlayer world: aWorld\\\\n\\\\t\\\\\\\"Produce an acceptable slot name, derived from the current name, for aPlayer.  This method will always return a valid slot name that will be suitable for use in the given situation, though you might not like its beauty sometimes.\\\\\\\"\\\\n\\\\n\\\\t| aString stemAndSuffix proscribed stem suffix putative |\\\\n\\\\taString _ originalString asIdentifier: false.  \\\\\\\"get an identifier not lowercase\\\\\\\"\\\\n\\\\tstemAndSuffix _ aString stemAndNumericSuffix.\\\\n\\\\tproscribed _ #(self super thisContext costume costumes dependents #true #false size), aPlayer class allInstVarNames.\\\\n\\\\n\\\\tstem _ stemAndSuffix first.\\\\n\\\\tsuffix _ stemAndSuffix last.\\\\n\\\\tputative _ aString asSymbol.\\\\n\\\\t\\\\n\\\\t[(putative ~~ currentName) and: [(proscribed includes: putative)\\\\n\\\\t\\\\tor:\\\\t[(aPlayer respondsTo: putative)\\\\n\\\\t\\\\tor:\\\\t[Smalltalk includesKey: putative]]]]\\\\n\\\\twhileTrue:\\\\n\\\\t\\\\t[suffix _ suffix + 1.\\\\n\\\\t\\\\tputative _ (stem, suffix printString) asSymbol].\\\\n\\\\t^ putative! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-universal slots & scripts' stamp: 'kfr 9/23/2003 09:29'!\\\\ndoesOperatorWantArrows: aSymbol\\\\n\\\\taSymbol = #, ifTrue:[^ false].\\\\n\\\\t^ aSymbol isInfix or: [#(isDivisibleBy:) includes: aSymbol]! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-universal slots & scripts' stamp: 'sw 9/27/2001 04:08'!\\\\nsystemSlotNamesOfType: aType\\\\n\\\\t\\\\\\\"Answer the type of the slot name, or nil if not found.\\\\\\\"\\\\n\\\\t\\\\n\\\\t| aList |\\\\n\\\\tself flag: #deferred.  \\\\\\\"Hard-coded etoyVocabulary needed here to make this work.\\\\\\\"\\\\n\\\\taList _ OrderedCollection new.\\\\n\\\\tVocabulary eToyVocabulary methodInterfacesDo:\\\\n\\\\t\\\\t [:anInterface |\\\\n\\\\t\\\\t\\\\tanInterface resultType = aType ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[aList add: anInterface selector]].\\\\n\\\\t^ aList! !\\\\n\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 10/30/2000 16:37'!\\\\nallKnownClassVariableNames\\\\n\\\\t\\\\\\\"Answer a set of all the knwon class variable names in the system.  This normally retrieves them from a cache, and at present there is no organized mechanism for invalidating the cache.  The idea is to avoid, in the References scheme, names that may create a conflict\\\\\\\"\\\\n\\\\n\\\\t^ ClassVarNamesInUse ifNil: [ClassVarNamesInUse _ self allClassVarNamesInSystem]\\\\n\\\\n\\\\t\\\\\\\"ClassVarNamesInUse _ nil.\\\\n\\\\tTime millisecondsToRun: [ScriptingSystem allKnownClassVariableNames]\\\\\\\"\\\\n! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'kfr 9/23/2003 09:44'!\\\\narithmeticalOperatorsAndHelpStrings\\\\n\\\\t\\\\\\\"Answer an array consisting of lists of the standard arithmetical operator tiles and of the corresponding balloon help for them\\\\\\\"\\\\n\\\\n\\\\t^ #((+ - * / // \\\\\\\\\\\\\\\\ max: min:)\\\\n\\\\t \\\\t('add' 'subtract' 'multiply' 'divide' 'divide & truncate' 'remainder when divided by' 'larger value' 'smaller value' ))! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'tk 10/20/2004 15:52'!\\\\nbuttonDownTile\\\\n\\\\t\\\\\\\"Answer a boolean-valued tile which reports whether the button is down\\\\\\\"\\\\n\\\\n\\\\t^ self systemQueryPhraseWithActionString: '(ActiveHand anyButtonPressed)' labelled: 'button down?' translated! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'tk 10/20/2004 15:52'!\\\\nbuttonUpTile\\\\n\\\\t\\\\\\\"Answer a boolean-valued tile which reports whether the button is up\\\\\\\"\\\\n\\\\n\\\\t^ self systemQueryPhraseWithActionString: '(ActiveHand noButtonPressed)' labelled: 'button up?' translated! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'tk 8/21/2000 12:59'!\\\\ncleanupsForRelease\\\\n\\\\t\\\\\\\"Miscellaneous space cleanups to do before a release.\\\\\\\"\\\\n\\\\t\\\\\\\"EToySystem cleanupsForRelease\\\\\\\"\\\\n\\\\n\\\\tSocket deadServer: ''.  \\\\\\\"Don't reveal any specific server name\\\\\\\"\\\\n\\\\tHandMorph initialize.  \\\\\\\"free cached ColorChart\\\\\\\"\\\\n\\\\tPaintBoxMorph initialize.\\\\t\\\\\\\"forces Prototype to let go of extra things it might hold\\\\\\\"\\\\n\\\\tSmalltalk removeKey: #AA ifAbsent: [].\\\\n\\\\tSmalltalk removeKey: #BB ifAbsent: [].\\\\n\\\\tSmalltalk removeKey: #CC ifAbsent: [].\\\\n\\\\tSmalltalk removeKey: #DD ifAbsent: [].\\\\n\\\\tSmalltalk removeKey: #Temp ifAbsent: [].\\\\n\\\\n\\\\tScriptingSystem reclaimSpace.\\\\n\\\\tSmalltalk cleanOutUndeclared.\\\\n\\\\tSmalltalk reclaimDependents.\\\\n\\\\tSmalltalk forgetDoIts.\\\\n\\\\tSmalltalk removeEmptyMessageCategories.\\\\n\\\\tSymbol rehash! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 3/10/2004 23:24'!\\\\nhelpStringForOperator: anOperator\\\\n\\\\t\\\\\\\"Answer the help string associated with the given operator. If none found, return a standard no-help-available reply\\\\\\\"\\\\n\\\\n\\\\t^ (self helpStringOrNilForOperator: anOperator) ifNil:\\\\n\\\\t\\\\t['Sorry, no help available here' translated]  \\\\\\\"This should never be seen, but is provided as a backstop\\\\\\\"! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 6/27/2004 11:11'!\\\\nhelpStringOrNilForOperator: anOperator\\\\n\\\\t\\\\\\\"Answer the help string associated with the given operator, nil if none found.\\\\\\\"\\\\n\\\\n\\\\t| anIndex opsAndHelp |\\\\n\\\\t(anIndex _ (opsAndHelp _ self arithmeticalOperatorsAndHelpStrings) first indexOf: anOperator) > 0\\\\n\\\\t\\\\tifTrue:\\\\t[^ (opsAndHelp second at: anIndex) translated].\\\\n\\\\n\\\\t(anIndex _ (opsAndHelp _ self numericComparitorsAndHelpStrings) first indexOf: anOperator) > 0\\\\n\\\\t\\\\tifTrue:\\\\t[^ (opsAndHelp second at: anIndex) translated].\\\\n\\\\n\\\\tanOperator = #, ifTrue:\\\\n\\\\t\\\\t[^ 'Concatenate two Strings' translated].\\\\n\\\\n\\\\t^ nil! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'nk 7/12/2003 08:59'!\\\\nholderWithAlphabet\\\\n\\\\t\\\\\\\"Answer a fully instantiated Holder that has submorphs that represent the letters of the uppercase alphabet, with each one having an 'index' slot which bears the letter's index in the alphabet -- 1 for A, 2 for B, etc.   A few special characters are provided as per ack request 10/00; for these the index provided is rather arbitrarily assigned\\\\\\\"\\\\n\\\\n\\\\t| aMorph aPlayer newMorph oneCharString aContainer aWrapper |\\\\n\\\\n\\\\t\\\\\\\"ScriptingSystem holderWithAlphabet openInHand\\\\\\\"\\\\n\\\\n\\\\taContainer _ self prototypicalHolder useRoundedCorners.\\\\n\\\\taContainer borderColor: Color blue lighter.\\\\n\\\\n\\\\taWrapper _ AlignmentMorph new hResizing: #shrinkWrap; vResizing: #shrinkWrap; layoutInset: 0.\\\\n\\\\taWrapper addMorphBack: (aMorph _ TextMorph new contents: 'A').\\\\n\\\\taMorph beAllFont: ((TextStyle named: Preferences standardEToysFont familyName) fontOfSize: 24).\\\\n\\\\taMorph width: 14; lock.\\\\n\\\\taWrapper beTransparent; setNameTo: 'A'.\\\\n\\\\taPlayer _ aWrapper assuredPlayer.\\\\n\\\\taPlayer addInstanceVariableNamed: #index type: #Number value: 1.\\\\n\\\\taContainer addMorphBack: aWrapper.\\\\n\\\\t2 to: 26 do:\\\\n\\\\t\\\\t[:anIndex |\\\\n\\\\t\\\\t\\\\tnewMorph _ aWrapper usableSiblingInstance.\\\\n\\\\t\\\\t\\\\tnewMorph player perform: #setIndex: with: anIndex.\\\\n\\\\t\\\\t\\\\tnewMorph firstSubmorph contents: (oneCharString _ ($A asciiValue + anIndex - 1) asCharacter asString).\\\\n\\\\t\\\\t\\\\tnewMorph setNameTo: oneCharString.\\\\n\\\\n\\\\t\\\\t\\\\taContainer addMorphBack: newMorph].\\\\n\\\\n\\\\t#(' ' '.' '#') with: #(27 28 29) do:\\\\n\\\\t\\\\t[:aString :anIndex |\\\\n\\\\t\\\\t\\\\tnewMorph _ aWrapper usableSiblingInstance.\\\\n\\\\t\\\\t\\\\tnewMorph player perform: #setIndex: with: anIndex.\\\\n\\\\t\\\\t\\\\tnewMorph firstSubmorph contents: aString.\\\\n\\\\t\\\\t\\\\taString = ' '\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[newMorph setNameTo: 'space'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnewMorph color: (Color gray alpha: 0.2)]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[newMorph setNameTo: aString].\\\\n\\\\t\\\\t\\\\taContainer addMorphBack: newMorph].\\\\n\\\\n\\\\taContainer setNameTo: 'alphabet'.\\\\n\\\\taContainer isPartsBin: true.\\\\n\\\\taContainer enableDrop: false.\\\\n\\\\taContainer indicateCursor: false; width: 162.\\\\n\\\\taContainer color: (Color r: 0.839 g: 1.0 b: 1.0).  \\\\\\\"Color fromUser\\\\\\\"\\\\n\\\\t^ aContainer! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 9/15/2000 06:24'!\\\\ninformScriptingUser: aString\\\\n\\\\t\\\\\\\"This provides a hook for logging messages that the user or the developer may wish to see; at present it simply logs the message to the Transcript, with a standard prefix to signal their provenance.  Such messages will fall on the floor if there is no Transcript window open\\\\\\\"\\\\n\\\\n\\\\tTranscript cr; show: 'SCRIPT NOTE: ', aString! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 2/26/2003 22:44'!\\\\nnameForInstanceVariablesCategory\\\\n\\\\t\\\\\\\"Answer the name to use for the viewer category that contains instance variables\\\\\\\"\\\\n\\\\n\\\\t^ #variables    \\\\n\\\\t\\\\\\\"^ #'instance variables'\\\\\\\"\\\\n\\\\n\\\\\\\"ScriptingSystem nameForInstanceVariablesCategory\\\\\\\"! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 2/6/2003 18:00'!\\\\nnameForScriptsCategory\\\\n\\\\t\\\\\\\"Answer the name to use for the viewer category that contains scripts\\\\\\\"\\\\n\\\\n\\\\t^ #scripts! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 2/18/2001 17:50'!\\\\nnewScriptingSpace\\\\n\\\\t\\\\\\\"Answer a complete scripting space - raa 19 sept 2000 - experiment for Alan, a variant *not* in a window, now adopted as the only true scripting space\\\\\\\"\\\\n\\\\n\\\\t^ self newScriptingSpace2! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 11/13/2001 14:41'!\\\\nnewScriptingSpace2\\\\n\\\\t\\\\\\\"Answer a complete scripting space\\\\\\\"\\\\n\\\\n\\\\t| aTemplate  aPlayfield aControl |\\\\n\\\\t\\\\n\\\\t(aTemplate _ PasteUpMorph new)\\\\n\\\\t\\\\tsetNameTo: 'etoy';\\\\n\\\\t\\\\textent: 638 @ 470;\\\\n\\\\t\\\\tcolor: Color white;\\\\n\\\\t\\\\timpartPrivatePresenter;\\\\n\\\\t\\\\tsetProperty: #automaticPhraseExpansion toValue: true;\\\\n\\\\t\\\\tbeSticky.\\\\n\\\\taTemplate useRoundedCorners; borderWidth: 2. \\\\n\\\\taControl _  ScriptingSystem scriptControlButtons setToAdhereToEdge: #bottomLeft.\\\\n\\\\taControl beSticky; borderWidth: 0; beTransparent.\\\\n\\\\taTemplate addMorphBack: aControl.\\\\n\\\\taTemplate presenter addTrashCan.\\\\n\\\\n\\\\taTemplate addMorph: (aPlayfield _ PasteUpMorph new).\\\\n\\\\taPlayfield\\\\n\\\\t\\\\tsetNameTo: 'playfield';\\\\n\\\\t\\\\tuseRoundedCorners;\\\\n\\\\t\\\\tsetToAdhereToEdge: #topLeft;\\\\n\\\\t\\\\textent: 340@300;\\\\n\\\\t\\\\tposition: aTemplate topRight - (400@0);\\\\n\\\\t\\\\tbeSticky;\\\\n\\\\t\\\\tautomaticViewing: true;\\\\n\\\\t\\\\twantsMouseOverHalos: true.\\\\n\\\\taTemplate presenter standardPlayfield: aPlayfield.\\\\n\\\\t\\\\n\\\\t^ aTemplate\\\\n\\\\n! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 9/21/2000 22:39'!\\\\nnumericComparitorsAndHelpStrings\\\\n\\\\t\\\\\\\"Answer an array whose first element is the list of comparitors, and whose second element is a list of the corresponding help strings\\\\\\\"\\\\n\\\\n\\\\t^ #((< <= = ~= > >= isDivisibleBy:)\\\\n\\\\t \\\\t('less than' 'less than or equal' 'equal' 'not equal' 'greater than' 'greater than or equal' 'divisible by' ))! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities'!\\\\nprepareForExternalReleaseNamed: aReleaseName\\\\n\\\\t\\\\\\\"ScriptingSystem prepareForExternalReleaseNamed: '2.2Beta'\\\\\\\"\\\\n\\\\n\\\\tEToySystem stripMethodsForExternalRelease.\\\\n\\\\n\\\\tScriptingSystem saveFormsToFileNamed: aReleaseName, '.Dis.Forms'.\\\\n\\\\tScriptingSystem stripGraphicsForExternalRelease.\\\\n\\\\tScriptingSystem cleanupsForRelease.\\\\n\\\\tScreenController initialize.\\\\n! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 5/2/1998 14:17'!\\\\nreclaimSpace\\\\n\\\\t\\\\\\\"Reclaim space from the scripting system, and report the result in an informer\\\\\\\"\\\\n\\\\t\\\\\\\"ScriptingSystem reclaimSpace\\\\\\\"\\\\n\\\\n\\\\t| reclaimed |\\\\n\\\\t(reclaimed _ self spaceReclaimed)  > 0\\\\n\\\\t\\\\tifTrue:\\\\t[self inform: reclaimed printString, ' bytes reclaimed']\\\\n\\\\t\\\\tifFalse:\\\\t[self inform: 'Hmm...  Nothing gained this time.']! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 10/30/2000 09:08'!\\\\nreferenceAt: aSymbol\\\\n\\\\t\\\\\\\"Answer the object referred to by aSymbol in the 'References' scheme of things, or nil if none\\\\\\\"\\\\n\\\\n\\\\t^ References at: aSymbol ifAbsent: [nil]! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 10/30/2000 09:33'!\\\\nreferenceAt: aSymbol put: anObject\\\\n\\\\t\\\\\\\"Store a reference to anObject at the given symbol in the References directory\\\\\\\"\\\\n\\\\n\\\\t^ References at: aSymbol put: anObject! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 6/9/2000 18:44'!\\\\nreinvigorateThumbnailsInViewerFlapTabs\\\\n\\\\t\\\\\\\"It has happened that the thumbnail in a viewer flap tab will go solid gray because it got associated with some passing and disused player temporarily created during the initial painting process.  This method takes a sledge hammer to repair such thumbnails.   At its genesis, this method is called only from the postscript of its defining fileout.\\\\\\\"\\\\n\\\\t| vwr thumbnail |\\\\n\\\\tViewerFlapTab allInstancesDo:\\\\n\\\\t\\\\t[:aTab | \\\\n\\\\t\\\\t\\\\tvwr _ aTab referent findA: StandardViewer.\\\\n\\\\t\\\\t\\\\tthumbnail _ aTab findA: ThumbnailMorph.\\\\n\\\\t\\\\t\\\\t(vwr notNil and: [thumbnail notNil]) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[thumbnail objectToView: vwr scriptedPlayer]]\\\\n\\\\n\\\\t\\\\\\\"ScriptingSystem reinvigorateThumbnailsInViewerFlapTabs\\\\\\\"! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 12/20/2003 18:02'!\\\\nreportToUser: aString\\\\n\\\\t\\\\\\\"Make a message accessible to the user.  For the moment, we simply defer to the Transcript mechanism\\\\\\\"\\\\n\\\\n\\\\tTranscript cr; show: aString! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 10/30/2000 16:47'!\\\\nresetAllScriptingReferences\\\\n\\\\t\\\\\\\"Clear out all the elements in the References directory\\\\\\\"\\\\n\\\\t\\\\n\\\\tSmalltalk at: #References put: IdentityDictionary new\\\\n\\\\n\\\\t\\\\\\\"ScriptingSystem resetAllScriptingReferences\\\\\\\"! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 10/30/2000 16:45'!\\\\nresetStaleScriptingReferences\\\\n\\\\t\\\\\\\"Remove all scripting references that are no longer needed\\\\\\\"\\\\n\\\\n\\\\tReferences  removeUnreferencedKeys\\\\n\\\\n\\\\t\\\\\\\"ScriptingSystem resetStaleScriptingReferences\\\\\\\"\\\\n! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 7/25/2004 17:27'!\\\\nrestoreClassicEToyLook\\\\n\\\\t\\\\\\\"Restore classic EToy look, as closely as possible.  If ComicBold is present, restore it as the standard etoy and button font.  Substitute ComicSansMS and Accuny as respective alternatives if the classic fonts are absent.  If those also aren't available, do nothing.\\\\\\\"\\\\n\\\\n\\\\t| aTextStyle aFont | \\\\n\\\\t(aTextStyle _ TextStyle named: #ComicBold)\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t[aFont _ aTextStyle fontOfSize: 16.\\\\n\\\\t\\\\t\\\\tPreferences setEToysFontTo: aFont.\\\\n\\\\t\\\\t\\\\tPreferences setButtonFontTo: aFont]\\\\n\\\\t\\\\tifNil:\\\\n\\\\t\\\\t\\\\t[(aTextStyle _ TextStyle named: #ComicSansMS) ifNotNil:\\\\n\\\\t\\\\t\\\\t\\\\t[Preferences setEToysFontTo: (aTextStyle fontOfSize: 18)].\\\\n\\\\t\\\\t\\\\t(aTextStyle _ TextStyle named: #Accuny) ifNotNil:\\\\n\\\\t\\\\t\\\\t\\\\t[Preferences setButtonFontTo: (aTextStyle fontOfSize: 12)]].\\\\n\\\\n\\\\t(aTextStyle _ TextStyle named: #NewYork)\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t[Preferences setSystemFontTo: (aTextStyle fontOfSize: 12)]! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 5/16/2001 12:58'!\\\\nsetterSelectorForGetter: aGetterSymbol\\\\n\\\\t\\\\\\\"Answer the setter selector corresponding to a given getter\\\\\\\"\\\\n\\\\n\\\\t^ (('s', (aGetterSymbol copyFrom: 2 to: aGetterSymbol size)), ':') asSymbol\\\\n\\\\n\\\\t\\\\\\\"ScriptingSystem setterSelectorForGetter: #getCursor\\\\\\\"! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'di 3/3/2001 08:47'!\\\\nspaceReclaimed\\\\n\\\\t\\\\\\\"Reclaim space from the EToy system, and return the number of bytes reclaimed\\\\\\\"\\\\n\\\\t\\\\\\\"ScriptingSystem spaceReclaimed\\\\\\\"\\\\n\\\\n\\\\t| oldFree  |\\\\n\\\\toldFree _ Smalltalk garbageCollect.\\\\n\\\\tThumbnailMorph recursionReset.\\\\n\\\\tPlayer removeUninstantiatedSubclassesSilently.\\\\n\\\\tSmalltalk cleanOutUndeclared.\\\\n\\\\tSmalltalk reclaimDependents.\\\\n\\\\t^ Smalltalk garbageCollect - oldFree.! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'sw 9/27/2001 13:28'!\\\\ntileForArgType: aType\\\\n\\\\t\\\\\\\"Anwer a default tile to represent a datum of the given argument type, which may be either a symbol (e.g. #Color) or a class\\\\\\\"\\\\n\\\\n\\\\t(aType isKindOf: Class)  \\\\\\\"Allowed in Ted's work\\\\\\\"\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[^ aType name asString newTileMorphRepresentative typeColor: Color gray].\\\\n\\\\n\\\\t^ (Vocabulary vocabularyForType: aType) defaultArgumentTile! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'dgd 7/12/2003 12:05'!\\\\ntryButtonFor: aPhraseTileMorph \\\\n\\\\t| aButton |\\\\n\\\\taButton := SimpleButtonMorph new.\\\\n\\\\taButton target: aPhraseTileMorph;\\\\n\\\\t\\\\t actionSelector: #try;\\\\n\\\\t\\\\t\\\\n\\\\t\\\\tlabel: '!!'\\\\n\\\\t\\\\tfont: Preferences standardEToysFont;\\\\n\\\\t\\\\t color: Color yellow;\\\\n\\\\t\\\\t borderWidth: 0.\\\\n\\\\taButton actWhen: #whilePressed.\\\\n\\\\taButton balloonTextSelector: #try.\\\\n\\\\t^ aButton! !\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-utilities' stamp: 'nk 10/14/2004 11:19'!\\\\nwordingForOperator: aString\\\\n\\\\t\\\\\\\"Answer the wording to be seen by the user for the given operator symbol/string\\\\\\\"\\\\n\\\\n\\\\t| toTest |\\\\n\\\\ttoTest _ aString asString.\\\\n\\\\t#(\\\\t(append:\\\\t\\\\t\\\\t\\\\t'include at end')\\\\n\\\\t\\\\t(arrowheadsOnAllPens\\\\t'arrowheads on all pens')\\\\n\\\\t\\\\t(beep:\\\\t\\\\t\\\\t\\\\t\\\\t'make sound')\\\\n\\\\t\\\\t(bounce:\\\\t\\\\t\\\\t\\\\t'bounce')\\\\n\\\\t\\\\t(clearTurtleTrails\\\\t\\\\t'clear pen trails')\\\\n\\\\t\\\\t(clearOwnersPenTrails\\\\t'clear all pen trails')\\\\n\\\\t\\\\t(colorSees\\\\t\\\\t\\\\t\\\\t'color  sees')\\\\n\\\\t\\\\t(color:sees:\\\\t\\\\t\\\\t\\\\t'color sees')\\\\n\\\\t\\\\t(doMenuItem:\\\\t\\\\t\\\\t'do menu item')\\\\n\\\\t\\\\t(doScript:\\\\t\\\\t\\\\t\\\\t'do')\\\\n\\\\t\\\\t(forward:\\\\t\\\\t\\\\t\\\\t'forward by')\\\\n\\\\t\\\\t(goToRightOf:\\\\t\\\\t\\\\t'align after')\\\\n\\\\t\\\\t(includeAtCursor:\\\\t\\\\t'include at cursor')\\\\n\\\\t\\\\t(isDivisibleBy:\\\\t\\\\t\\\\t'is divisible by')\\\\n\\\\t\\\\t(liftAllPens\\\\t\\\\t\\\\t\\\\t'lift all pens')\\\\n\\\\t\\\\t(lowerAllPens\\\\t\\\\t\\\\t'lower all pens')\\\\n\\\\t\\\\t(makeNewDrawingIn:\\\\t'start painting in')\\\\n\\\\t\\\\t(max:\\\\t\\\\t\\\\t\\\\t\\\\t'max')\\\\n\\\\t\\\\t(min:\\\\t\\\\t\\\\t\\\\t\\\\t'min')\\\\n\\\\t\\\\t(moveToward:\\\\t\\\\t\\\\t'move toward')\\\\n\\\\t\\\\t(noArrowheadsOnAllPens\\\\t'no arrowheads on pens')\\\\n\\\\t\\\\t(overlapsAny\\\\t\\\\t\\\\t'overlaps any')\\\\n\\\\t\\\\t(pauseAll:\\\\t\\\\t\\\\t\\\\t'pause all')\\\\n\\\\t\\\\t(pauseScript:\\\\t\\\\t\\\\t'pause script')\\\\n\\\\t\\\\t(prepend:\\\\t\\\\t\\\\t\\\\t'include at beginning')\\\\n\\\\t\\\\t(seesColor:\\\\t\\\\t\\\\t\\\\t'is over color')\\\\n\\\\t\\\\t(startAll:\\\\t\\\\t\\\\t\\\\t'start all')\\\\n\\\\t\\\\t(startScript:\\\\t\\\\t\\\\t\\\\t'start script')\\\\n\\\\t\\\\t(stopProgramatically\\\\t'stop')\\\\n\\\\t\\\\t(stopAll:\\\\t\\\\t\\\\t\\\\t\\\\t'stop all')\\\\n\\\\t\\\\t(stopScript:\\\\t\\\\t\\\\t\\\\t'stop script')\\\\n\\\\t\\\\t(tellAllSiblings:\\\\t\\\\t\\\\t'tell all siblings')\\\\n\\\\t\\\\t(tellSelfAndAllSiblings:\\\\t'send to all')\\\\n\\\\t\\\\t(turn:\\\\t\\\\t\\\\t\\\\t\\\\t'turn by')\\\\n\\\\t\\\\t(turnToward:\\\\t\\\\t\\\\t\\\\t'turn toward')\\\\n\\\\t\\\\t(wearCostumeOf:\\\\t\\\\t'look like'))\\\\n\\\\n\\\\tdo:\\\\n\\\\t\\\\t[:pair | toTest = pair first ifTrue: [^ pair second]].\\\\n\\\\n\\\\t^ toTest\\\\n\\\\n\\\\t\\\\\\\"StandardScriptingSystem initialize\\\\\\\"\\\\n\\\\n! !\\\\n\\\\n\\\\n!StandardScriptingSystem methodsFor: '*eToys-viewer' stamp: 'sw 10/30/2000 09:07'!\\\\nuniqueNameForReference\\\\n\\\\t\\\\\\\"Answer a more-or-less global name by which the receiver can be referred to in scripts\\\\\\\"\\\\n\\\\n\\\\t^ #ScriptingSystem! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStandardScriptingSystem class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StandardScriptingSystem class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 19:04'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Initialize the scripting system.  Sometimes this method is vacuously changed just to get it in a changeset so that its invocation will occur as part of an update\\\\\\\"\\\\n\\\\n\\\\t(self environment at: #ScriptingSystem ifAbsent: [nil]) ifNil:\\\\n\\\\t\\\\t[self environment at: #ScriptingSystem put: self new].\\\\n\\\\n\\\\tScriptingSystem\\\\n\\\\t\\\\tinitializeHelpStrings.\\\\n\\\\n\\\\tself registerInFlapsRegistry.\\\\n\\\\n\\\\\\\"StandardScriptingSystem initialize\\\\\\\"! !\\\\n\\\\n\\\\n!StandardScriptingSystem class methodsFor: 'utilities' stamp: 'nk 9/1/2004 10:53'!\\\\napplyNewEToyLook\\\\n\\\\t\\\\\\\"Apply the new EToy look based on free fonts, approximating the classic look as closely as possible.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"StandardScriptingSystem applyNewEToyLook\\\\\\\"\\\\n\\\\n\\\\\\\"\\\\t| aTextStyle aFont | \\\\n\\\\taTextStyle _ TextStyle named: #BitstreamVeraSansMono.\\\\n\\\\taFont _ aTextStyle fontOfSize: 12.\\\\n\\\\taFont _ aFont emphasis: 1.\\\\n\\\\tPreferences setEToysFontTo: aFont.\\\\n\\\\tPreferences setButtonFontTo: aFont.\\\\n\\\\n\\\\taTextStyle _ TextStyle named: #Accushi.\\\\n\\\\taFont _ aTextStyle fontOfSize: 12.\\\\n\\\\tPreferences setFlapsFontTo: aFont.\\\\n\\\\n\\\\t(aTextStyle _ TextStyle named: #Accuny)\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t[Preferences setSystemFontTo: (aTextStyle fontOfSize: 12)]\\\\\\\"\\\\n\\\\n\\\\tPreferences setDefaultFonts: #(\\\\n\\\\t\\\\t(setEToysFontTo:\\\\t\\\\t\\\\tBitstreamVeraSansBold\\\\t10)\\\\n\\\\t\\\\t(setButtonFontTo:\\\\t\\\\tBitstreamVeraSansMono\\\\t9)\\\\n\\\\t\\\\t(setFlapsFontTo:\\\\t\\\\t\\\\tAccushi\\\\t\\\\t\\\\t\\\\t12)\\\\n\\\\t\\\\t(setSystemFontTo:\\\\t\\\\tAccuny\\\\t\\\\t\\\\t\\\\t10)\\\\n\\\\t\\\\t(setWindowTitleFontTo:\\\\tBitstreamVeraSansBold\\\\t12)\\\\n\\\\t)\\\\n! !\\\\n\\\\n!StandardScriptingSystem class methodsFor: 'utilities' stamp: 'mir 11/26/2004 16:14'!\\\\nremovePlayersIn: project\\\\n\\\\t\\\\\\\"Remove existing player references for project\\\\\\\"\\\\n\\\\n\\\\tReferences keys do: \\\\n\\\\t\\\\t[:key | (References at: key) costume pasteUpMorph == project world\\\\n\\\\t\\\\t\\\\tifTrue: [References removeKey: key]].\\\\n! !\\\\n\\\\n!StandardScriptingSystem class methodsFor: 'utilities' stamp: 'mir 11/25/2004 19:01'!\\\\nremoveUnreferencedPlayers\\\\n\\\\t\\\\\\\"Remove existing but unreferenced player references\\\\\\\"\\\\n\\\\t\\\\\\\"StandardScriptingSystem removeUnreferencedPlayers\\\\\\\"\\\\n\\\\tReferences keys do: \\\\n\\\\t\\\\t[:key | (References at: key) costume pasteUpMorph\\\\n\\\\t\\\\t\\\\tifNil: [References removeKey: key]].\\\\n! !\\\\n\\\\n\\\\n!StandardScriptingSystem class methodsFor: '*MorphicExtras-class initialization' stamp: 'asm 4/11/2003 19:08'!\\\\nregisterInFlapsRegistry\\\\n\\\\t\\\\\\\"Register the receiver in the system's flaps registry\\\\\\\"\\\\n\\\\tself environment\\\\n\\\\t\\\\tat: #Flaps\\\\n\\\\t\\\\tifPresent: [:cl | cl registerQuad: #(ScriptingSystem\\\\tprototypicalHolder\\\\t'Holder'\\\\t\\\\t'A place for storing alternative pictures in an animation, etc.')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'PlugIn Supplies'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcl registerQuad: #(ScriptingSystem\\\\tprototypicalHolder\\\\t'Holder'\\\\t\\\\t'A place for storing alternative pictures in an animation, etc.')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'Supplies'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcl registerQuad: #(ScriptingSystem\\\\tnewScriptingSpace\\\\t'Scripting'\\\\t'A confined place for drawing and scripting, with its own private stop/step/go buttons.')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'Widgets'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcl registerQuad: #(ScriptingSystem\\\\tholderWithAlphabet\\\\t'Alphabet'\\\\t'A source for single-letter objects')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'Widgets'.]! !\\\\n\\\\n!StandardScriptingSystem class methodsFor: '*MorphicExtras-class initialization' stamp: 'asm 4/12/2003 14:38'!\\\\nunload\\\\n\\\\t\\\\\\\"Unload the receiver from global registries\\\\\\\"\\\\n\\\\n\\\\tself environment at: #Flaps ifPresent: [:cl |\\\\n\\\\tcl unregisterQuadsWithReceiver: ScriptingSystem] ! !\\\\n\\\\n\\\\n\\\\n!StandardScriptingSystem class methodsFor: '*flexibleVocabularies-flexibleVocabularies' stamp: 'NS 4/8/2004 19:06'!\\\\nnoteAddedSelector: aSelector meta: isMeta\\\\n\\\\taSelector == #wordingForOperator: ifTrue:\\\\n\\\\t\\\\t[Vocabulary changeMadeToViewerAdditions].\\\\n\\\\tsuper noteAddedSelector: aSelector meta: isMeta! !\\\\n\\\\n!StandardScriptingSystem class methodsFor: '*flexibleVocabularies-flexibleVocabularies' stamp: 'NS 4/15/2004 12:41'!\\\\nnoteCompilationOf: aSelector meta: isMeta\\\\n\\\\t\\\\\\\"This method does nothing and should be removed.\\\\\\\"\\\\n\\\\n\\\\t^ super noteCompilationOf: aSelector meta: isMeta! !\\\\nSourceFileArray subclass: #StandardSourceFileArray\\\\n\\\\tinstanceVariableNames: 'files'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Files-System'!\\\\n!StandardSourceFileArray commentStamp: '<historical>' prior: 0!\\\\nThis class implements the source file management behavior of traditional Squeak, with a sources file and a changes file. File positions are mapped such that those files can be up to 32MBytes in size.\\\\n\\\\nStructure:\\\\n files\\\\t\\\\tArray -- storing the actual source files\\\\n!\\\\n\\\\n\\\\n!StandardSourceFileArray methodsFor: 'accessing' stamp: 'hmm 4/25/2000 21:20'!\\\\nat: index\\\\n\\\\t^files at: index! !\\\\n\\\\n!StandardSourceFileArray methodsFor: 'accessing' stamp: 'hmm 4/25/2000 21:20'!\\\\nat: index put: aFile\\\\n\\\\tfiles at: index put: aFile! !\\\\n\\\\n!StandardSourceFileArray methodsFor: 'accessing' stamp: 'hmm 4/25/2000 21:20'!\\\\nsize\\\\n\\\\t^files size! !\\\\n\\\\n\\\\n!StandardSourceFileArray methodsFor: 'initialize-release' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\ninitialize\\\\n\\\\tfiles := Array new: 2.\\\\n\\\\tfiles at: 1 put: (SourceFiles at: 1).\\\\n\\\\tfiles at: 2 put: (SourceFiles at: 2)! !\\\\n\\\\n!StandardSourceFileArray methodsFor: 'initialize-release' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\ninitialize: nFiles\\\\n\\\\tfiles := Array new: nFiles! !\\\\n\\\\n\\\\n!StandardSourceFileArray methodsFor: 'sourcePointer conversion' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nfileIndexFromSourcePointer: anInteger\\\\n\\\\t\\\\\\\"Return the index of the source file which contains the source chunk addressed by anInteger\\\\\\\"\\\\n\\\\t\\\\\\\"This implements the recent 32M source file algorithm\\\\\\\"\\\\n\\\\n\\\\t| hi |\\\\n\\\\thi := anInteger // 16r1000000.\\\\n\\\\t^hi < 3\\\\n\\\\t\\\\tifTrue: [hi]\\\\n\\\\t\\\\tifFalse: [hi - 2]! !\\\\n\\\\n!StandardSourceFileArray methodsFor: 'sourcePointer conversion' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nfilePositionFromSourcePointer: anInteger\\\\n\\\\t\\\\\\\"Return the position of the source chunk addressed by anInteger\\\\\\\"\\\\n\\\\t\\\\\\\"This implements the recent 32M source file algorithm\\\\\\\"\\\\n\\\\n\\\\t| hi lo |\\\\n\\\\thi := anInteger // 16r1000000.\\\\n\\\\tlo := anInteger \\\\\\\\\\\\\\\\ 16r1000000.\\\\n\\\\t^hi < 3\\\\n\\\\t\\\\tifTrue: [lo]\\\\n\\\\t\\\\tifFalse: [lo + 16r1000000]! !\\\\n\\\\n!StandardSourceFileArray methodsFor: 'sourcePointer conversion' stamp: 'stephaneducasse 2/4/2006 20:32'!\\\\nsourcePointerFromFileIndex: index andPosition: position\\\\n\\\\t| hi lo |\\\\n\\\\t\\\\\\\"Return a source pointer according to the new 32M algorithm\\\\\\\"\\\\n\\\\t((index between: 1 and: 2) and: [position between: 0 and: 16r1FFFFFF])\\\\n\\\\t\\\\tifFalse: [self error: 'invalid source code pointer'].\\\\n\\\\thi := index.\\\\n\\\\tlo := position.\\\\n\\\\tlo >= 16r1000000 ifTrue: [\\\\n\\\\t\\\\thi := hi+2.\\\\n\\\\t\\\\tlo := lo - 16r1000000].\\\\n\\\\t^hi * 16r1000000 + lo! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStandardSourceFileArray class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StandardSourceFileArray class methodsFor: 'initialize-release' stamp: 'nk 7/30/2004 21:50'!\\\\ninstall\\\\n\\\\t\\\\\\\"Replace SourceFiles by an instance of me with the standard sources and changes files.\\\\n\\\\tThis only works if SourceFiles is either an Array or an instance of this class\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"StandardSourceFileArray install\\\\\\\"\\\\n\\\\n\\\\tSourceFiles := self new! !\\\\n\\\\n!StandardSourceFileArray class methodsFor: 'initialize-release' stamp: 'ar 5/17/2000 18:27'!\\\\nnew: nFiles\\\\n\\\\t^self new initialize: nFiles.! !\\\\nMouseMenuController subclass: #StandardSystemController\\\\n\\\\tinstanceVariableNames: 'status'\\\\n\\\\tclassVariableNames: 'HBorderCursor ScheduledBlueButtonMenu ScheduledBlueButtonMessages VBorderCursor'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'ST80-Support'!\\\\n!StandardSystemController commentStamp: '<historical>' prior: 0!\\\\nI am a controller for StandardSystemViews, that is, those views that are at the top level of a project in the system user interface. I am a kind of MouseMenuController that creates a blue button menu for moving, framing, collapsing, and closing ScheduledViews, and for selecting views under the view of my instance.!\\\\n\\\\n\\\\n!StandardSystemController methodsFor: 'basic control sequence' stamp: 'sw 10/20/1999 09:52'!\\\\ncontrolInitialize\\\\n\\\\tview displayEmphasized.\\\\n\\\\tview uncacheBits.  \\\\\\\"Release cached bitmap while active\\\\\\\"\\\\n\\\\tmodel windowActiveOnFirstClick ifFalse: [sensor waitNoButton].\\\\n\\\\tstatus _ #active.\\\\n\\\\tview isCollapsed ifFalse: [model modelWakeUpIn: view]! !\\\\n\\\\n!StandardSystemController methodsFor: 'basic control sequence' stamp: 'di 5/11/1999 22:05'!\\\\ncontrolTerminate\\\\n\\\\tstatus == #closed\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[view ~~ nil ifTrue: [view release].\\\\n\\\\t\\\\t\\\\tScheduledControllers unschedule: self.\\\\n\\\\t\\\\t\\\\t^self].\\\\n\\\\tview deEmphasize; cacheBits.\\\\n\\\\tview isCollapsed ifFalse: [model modelSleep].! !\\\\n\\\\n\\\\n!StandardSystemController methodsFor: 'borders' stamp: 'ls 7/11/1998 07:45'!\\\\nadjustPaneBorders \\\\n\\\\t| side sub newRect outerFrame |\\\\n\\\\touterFrame _ view displayBox.\\\\n\\\\tside _ #none.\\\\n\\\\tVBorderCursor showWhile:\\\\n\\\\t\\\\t[ [sub _ view subviewWithLongestSide: [:s | side _ s]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnear: sensor cursorPoint.\\\\n\\\\t\\\\t  self cursorOnBorder and: [(side = #left) | (side = #right)]]\\\\n\\\\t\\\\t\\\\twhileTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tself interActivityPause.\\\\n\\\\t\\\\t\\\\t\\\\tsensor redButtonPressed ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[side = #left ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[newRect _ sub stretchFrame:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:f | (f withLeft: sensor cursorPoint x)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: outerFrame]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartingWith: sub displayBox].\\\\n\\\\t\\\\t\\\\t\\\\tside = #right ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[newRect _ sub stretchFrame:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:f | (f withRight: sensor cursorPoint x)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: outerFrame]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartingWith: sub displayBox].\\\\n\\\\t\\\\t\\\\t\\\\tview reframePanesAdjoining: sub along: side to: newRect]]].\\\\n\\\\tHBorderCursor showWhile:\\\\n\\\\t\\\\t[ [sub _ view subviewWithLongestSide: [:s | side _ s]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnear: sensor cursorPoint.\\\\n\\\\t\\\\t  self cursorOnBorder and: [(side = #top) | (side = #bottom)]]\\\\n\\\\t\\\\t\\\\twhileTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tself interActivityPause.\\\\n\\\\t\\\\t\\\\t\\\\tsensor redButtonPressed ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[side = #top ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[newRect _ sub stretchFrame:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:f | (f withTop: sensor cursorPoint y)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: outerFrame]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartingWith: sub displayBox].\\\\n\\\\t\\\\t\\\\t\\\\tside = #bottom ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[newRect _ sub stretchFrame:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:f | (f withBottom: sensor cursorPoint y)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tintersect: outerFrame]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartingWith: sub displayBox].\\\\n\\\\t\\\\t\\\\t\\\\tview reframePanesAdjoining: sub along: side to: newRect]]]! !\\\\n\\\\n!StandardSystemController methodsFor: 'borders' stamp: 'di 11/16/2001 22:22'!\\\\nadjustWindowBorders \\\\n\\\\t| side noClickYet |\\\\n\\\\tnoClickYet _ true.\\\\n\\\\tVBorderCursor showWhile:\\\\n\\\\t\\\\t[ [side _ view displayBox sideNearestTo: sensor cursorPoint.\\\\n\\\\t\\\\t  self cursorOnBorder\\\\n\\\\t\\\\t\\\\tand: [(side = #left) | (side = #right)\\\\n\\\\t\\\\t\\\\tand: [noClickYet or: [sensor redButtonPressed]]]]\\\\n\\\\t\\\\t\\\\twhileTrue:\\\\n\\\\t\\\\t\\\\t[sensor redButtonPressed ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[noClickYet _ false.\\\\n\\\\t\\\\t\\\\t\\\\tside = #left ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[view newFrame: [:f | f withLeft: sensor cursorPoint x]].\\\\n\\\\t\\\\t\\\\t\\\\tside = #right ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[view newFrame: [:f | f withRight: sensor cursorPoint x]]].\\\\n\\\\t\\\\t\\\\tself interActivityPause]].\\\\n\\\\tHBorderCursor showWhile:\\\\n\\\\t\\\\t[ [side _ view displayBox sideNearestTo: sensor cursorPoint.\\\\n\\\\t\\\\t  self cursorOnBorder\\\\n\\\\t\\\\t\\\\tand: [(side = #top) | (side = #bottom)\\\\n\\\\t\\\\t\\\\tand: [noClickYet or: [sensor redButtonPressed]]]]\\\\n\\\\t\\\\t\\\\twhileTrue:\\\\n\\\\t\\\\t\\\\t[sensor redButtonPressed ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[noClickYet _ false.\\\\n\\\\t\\\\t\\\\t\\\\tside = #top ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[view newFrame: [:f | f withTop: sensor cursorPoint y]].\\\\n\\\\t\\\\t\\\\t\\\\tside = #bottom ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[view newFrame: [:f | f withBottom: sensor cursorPoint y]]].\\\\n\\\\t\\\\t  self interActivityPause]]! !\\\\n\\\\n!StandardSystemController methodsFor: 'borders' stamp: 'ls 7/11/1998 07:38'!\\\\nadjustWindowCorners \\\\n\\\\t| box cornerBox p clicked f2 |\\\\n\\\\tbox _ view windowBox.\\\\n\\\\tclicked _ false.\\\\n\\\\t#(topLeft topRight bottomRight bottomLeft)\\\\n\\\\t\\\\tdo: [:readCorner |\\\\n\\\\t\\\\t\\\\tcornerBox _ ((box insetBy: 2) perform: readCorner) - (10@10) extent: 20@20.\\\\n\\\\t\\\\t\\\\t(cornerBox containsPoint: sensor cursorPoint)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t[\\\\\\\"Display reverse: cornerBox.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t(Cursor perform: readCorner) showWhile:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[[(cornerBox containsPoint: (p _ sensor cursorPoint))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tand: [(clicked _ sensor anyButtonPressed) not]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twhileTrue: [ self interActivityPause ].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"Display reverse: cornerBox.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tclicked ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[view newFrame:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:f | p _ sensor cursorPoint.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\treadCorner = #topLeft ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[f2 _ p corner: f bottomRight].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\treadCorner = #bottomLeft ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[f2 _ (f withBottom: p y) withLeft: p x].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\treadCorner = #bottomRight ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[f2 _ f topLeft corner: p].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\treadCorner = #topRight ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[f2 _ (f withTop: p y) withRight: p x].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tf2]]]]].\\\\n\\\\t^ clicked! !\\\\n\\\\n!StandardSystemController methodsFor: 'borders' stamp: 'di 11/16/2001 22:30'!\\\\ncheckForReframe\\\\n\\\\t| cp |\\\\n\\\\tview isCollapsed ifTrue: [^ self].\\\\n\\\\tcp _ sensor cursorPoint.\\\\n\\\\t((view closeBoxFrame expandBy: 2) containsPoint: cp)\\\\n\\\\t\\\\t| ((view growBoxFrame expandBy: 2) containsPoint: cp)\\\\n\\\\t\\\\tifTrue: [^ self].  \\\\\\\"Dont let reframe interfere with close/grow\\\\\\\"\\\\n\\\\tself adjustWindowCorners.\\\\n\\\\tself cursorOnBorder ifFalse: [^ self].\\\\n\\\\t((view insetDisplayBox insetBy: 2@2) containsPoint: cp)\\\\n\\\\t\\\\tifFalse: [^ self adjustWindowBorders].\\\\n\\\\tview subViews size <= 1 ifTrue: [^ self].\\\\n\\\\t(view subviewWithLongestSide: [:s | ] near: cp) == nil\\\\n\\\\t\\\\tifFalse: [^ self adjustPaneBorders].! !\\\\n\\\\n!StandardSystemController methodsFor: 'borders'!\\\\ncursorOnBorder \\\\n\\\\t| cp i box |\\\\n\\\\tview isCollapsed ifTrue: [^ false].\\\\n\\\\tcp _ sensor cursorPoint.\\\\n\\\\t((view labelDisplayBox insetBy: (0@2 corner: 0@-2)) containsPoint: cp)\\\\n\\\\t\\\\tifTrue: [^ false].\\\\n\\\\t(i _ view subViews findFirst: [:v | v displayBox containsPoint: cp]) = 0\\\\n\\\\t\\\\tifTrue: [box _ view windowBox]\\\\n\\\\t\\\\tifFalse: [box _ (view subViews at: i) insetDisplayBox].\\\\n\\\\t^ ((box insetBy: 3) containsPoint: cp) not\\\\n\\\\t\\\\tand: [(box expandBy: 4) containsPoint: cp]! !\\\\n\\\\n!StandardSystemController methodsFor: 'borders'!\\\\nfullScreen\\\\n\\\\t\\\\\\\"Make the receiver's window occupy jes' about the full screen.  6/10/96 sw\\\\\\\"\\\\n\\\\n\\\\tview fullScreen! !\\\\n\\\\n\\\\n!StandardSystemController methodsFor: 'control defaults' stamp: 'sma 3/11/2000 12:01'!\\\\nblueButtonActivity\\\\n\\\\tScheduledBlueButtonMenu ifNil: [^ super controlActivity].\\\\n\\\\tScheduledBlueButtonMenu invokeOn: self! !\\\\n\\\\n!StandardSystemController methodsFor: 'control defaults' stamp: 'sma 3/11/2000 15:20'!\\\\ncontrolActivity\\\\n\\\\tself checkForReframe.\\\\n\\\\t^ super controlActivity! !\\\\n\\\\n!StandardSystemController methodsFor: 'control defaults'!\\\\nisControlActive\\\\n\\\\tstatus == #active ifFalse: [^ false].\\\\n\\\\tsensor anyButtonPressed ifFalse: [^ true].\\\\n\\\\tself viewHasCursor\\\\n\\\\t\\\\tifTrue: [^ true]\\\\n\\\\t\\\\tifFalse: [ScheduledControllers noteNewTop.\\\\n\\\\t\\\\t\\\\t\\\\t^ false]! !\\\\n\\\\n!StandardSystemController methodsFor: 'control defaults' stamp: 'sma 3/15/2000 22:19'!\\\\nredButtonActivity\\\\n\\\\t\\\\\\\"If cursor is in label of a window when red button is pushed,\\\\n\\\\tcheck for closeBox or growBox, else drag the window frame\\\\n\\\\tor edit the label.\\\\\\\"\\\\n\\\\n\\\\t| box p |\\\\n\\\\tp _ sensor cursorPoint.\\\\n\\\\tself labelHasCursor ifFalse: [super redButtonActivity. ^ self].\\\\n\\\\t((box _ view closeBoxFrame) containsPoint: p)\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[Utilities\\\\n\\\\t\\\\t\\\\t\\\\tawaitMouseUpIn: box\\\\n\\\\t\\\\t\\\\t\\\\trepeating: []\\\\n\\\\t\\\\t\\\\t\\\\tifSucceed: [self close. ^ self].\\\\n\\\\t\\\\t\\\\t^ self].\\\\n\\\\t((box _ view growBoxFrame) containsPoint: p)\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[Utilities\\\\n\\\\t\\\\t\\\\t\\\\tawaitMouseUpIn: box\\\\n\\\\t\\\\t\\\\t\\\\trepeating: []\\\\n\\\\t\\\\t\\\\t\\\\tifSucceed:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[Sensor controlKeyPressed ifTrue: [^ self expand; fullScreen].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ view isCollapsed\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self expand]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [self collapse]].\\\\n\\\\t\\\\t\\\\t^ self].\\\\n\\\\t(((box _ view labelTextRegion expandBy: 1) containsPoint: p)\\\\n\\\\t\\\\t\\\\tand: [Preferences clickOnLabelToEdit or: [sensor leftShiftDown]])\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[Utilities\\\\n\\\\t\\\\t\\\\t\\\\tawaitMouseUpIn: box\\\\n\\\\t\\\\t\\\\t\\\\trepeating: []\\\\n\\\\t\\\\t\\\\t\\\\tifSucceed: [^ self label].\\\\n\\\\t\\\\t\\\\t^ self].\\\\n\\\\tself move! !\\\\n\\\\n\\\\n!StandardSystemController methodsFor: 'cursor'!\\\\nlabelHasCursor\\\\n\\\\t\\\\\\\"Answer true if the cursor is within the window's label\\\\\\\"\\\\n\\\\t^view labelContainsPoint: sensor cursorPoint! !\\\\n\\\\n\\\\n!StandardSystemController methodsFor: 'initialize-release' stamp: 'sma 3/11/2000 11:48'!\\\\ninitialize\\\\n\\\\tsuper initialize.\\\\n\\\\tstatus _ #inactive! !\\\\n\\\\n\\\\n!StandardSystemController methodsFor: 'menu messages'!\\\\nchooseColor\\\\n\\\\t\\\\\\\"Allow the user to specify a new background color for the receiver's window.  5/6/96 sw.\\\\n\\\\t 7/31/96 sw: use Color fromUser\\\\\\\"\\\\n\\\\n\\\\tview backgroundColor: Color fromUser; uncacheBits; display! !\\\\n\\\\n!StandardSystemController methodsFor: 'menu messages'!\\\\nclose\\\\n\\\\t\\\\\\\"The receiver's view should be removed from the screen and from the \\\\n\\\\tcollection of scheduled views.\\\\\\\"\\\\n\\\\n\\\\tmodel okToChange ifFalse: [^self].\\\\n\\\\tstatus _ #closed.\\\\n\\\\tview erase! !\\\\n\\\\n!StandardSystemController methodsFor: 'menu messages'!\\\\ncollapse\\\\n\\\\t\\\\\\\"Get the receiver's view to change to a collapsed view on the screen.\\\\\\\"\\\\n\\\\tview collapseToPoint: view chooseCollapsePoint! !\\\\n\\\\n!StandardSystemController methodsFor: 'menu messages'!\\\\nexpand\\\\n\\\\t\\\\\\\"The receiver's view was collapsed; open it again and ask the user to \\\\n\\\\tdesignate its rectangular area.\\\\\\\"\\\\n\\\\tview expand; emphasize! !\\\\n\\\\n!StandardSystemController methodsFor: 'menu messages' stamp: 'rbb 3/1/2005 11:14'!\\\\nlabel\\\\n\\\\n\\\\t| newLabel |\\\\n\\\\tnewLabel := UIManager default\\\\n\\\\t\\\\trequest: 'Edit the label, then type RETURN'\\\\n\\\\t\\\\tinitialAnswer: view label.\\\\n\\\\tnewLabel isEmpty ifFalse: [view relabel: newLabel].\\\\n! !\\\\n\\\\n!StandardSystemController methodsFor: 'menu messages'!\\\\nmove\\\\n\\\\t\\\\\\\"Ask the user to designate a new origin position for the receiver's view.\\\\n\\\\t6/10/96 sw: tell the view that it has moved\\\\\\\"\\\\n\\\\n\\\\t| oldBox | \\\\n\\\\toldBox _ view windowBox.\\\\n\\\\tview uncacheBits.\\\\n\\\\tview align: view windowBox topLeft\\\\n\\\\t\\\\twith: view chooseMoveRectangle topLeft.\\\\n\\\\tview displayEmphasized.\\\\n\\\\tview moved.  \\\\\\\"In case its model wishes to take note.\\\\\\\"\\\\n\\\\t(oldBox areasOutside: view windowBox) do:\\\\n\\\\t\\\\t[:rect | ScheduledControllers restore: rect]! !\\\\n\\\\n!StandardSystemController methodsFor: 'menu messages'!\\\\nreframe\\\\n\\\\t^ view reframeTo: view getFrame! !\\\\n\\\\n!StandardSystemController methodsFor: 'menu messages'!\\\\ntoggleTwoTone\\\\n\\\\t(view isMemberOf: StandardSystemView) ifTrue:\\\\n\\\\t\\\\t[^ view become: (view as: ColorSystemView)].\\\\n\\\\t(view isMemberOf: ColorSystemView) ifTrue:\\\\n\\\\t\\\\t[^ view become: (view as: StandardSystemView)].\\\\n! !\\\\n\\\\n!StandardSystemController methodsFor: 'menu messages'!\\\\nunder\\\\n\\\\t\\\\\\\"Deactive the receiver's scheduled view and pass control to any view that \\\\n\\\\tmight be positioned directly underneath it and the cursor.\\\\\\\"\\\\n\\\\n\\\\tstatus _ #inactive! !\\\\n\\\\n\\\\n!StandardSystemController methodsFor: 'pluggable menus' stamp: 'sma 3/11/2000 15:12'!\\\\ngetPluggableYellowButtonMenu: shiftKeyState\\\\n\\\\t^ nil! !\\\\n\\\\n\\\\n!StandardSystemController methodsFor: 'scheduling' stamp: 'sw 9/30/97 22:04'!\\\\ncloseAndUnschedule\\\\n\\\\t\\\\\\\"Erase the receiver's view and remove it from the collection of scheduled \\\\n\\\\tviews.\\\\\\\"\\\\n\\\\n\\\\tstatus _ #closed.\\\\n\\\\tview erase.\\\\n\\\\tview release.\\\\n\\\\tScheduledControllers unschedule: self; searchForActiveController\\\\n! !\\\\n\\\\n!StandardSystemController methodsFor: 'scheduling'!\\\\ncloseAndUnscheduleNoErase\\\\n\\\\t\\\\\\\"Remove the scheduled view from the collection of scheduled views. Set \\\\n\\\\tits status to closed but do not erase.\\\\\\\"\\\\n\\\\n\\\\tstatus _ #closed.\\\\n\\\\tview release.\\\\n\\\\tScheduledControllers unschedule: self! !\\\\n\\\\n!StandardSystemController methodsFor: 'scheduling' stamp: 'jm 3/18/98 19:21'!\\\\ncloseAndUnscheduleNoTerminate\\\\n\\\\t\\\\\\\"Erase the receiver's view and remove it from the collection of scheduled views, but do not terminate the current process.\\\\\\\"\\\\n\\\\n\\\\tstatus _ #closed.\\\\n\\\\tview erase.\\\\n\\\\tview release.\\\\n\\\\tScheduledControllers unschedule: self.\\\\n! !\\\\n\\\\n!StandardSystemController methodsFor: 'scheduling'!\\\\nopen\\\\n\\\\t\\\\\\\"Create an area on the screen in which the receiver's scheduled view can \\\\n\\\\tbe displayed. Make it the active view.\\\\\\\"\\\\n\\\\n\\\\tview resizeInitially.\\\\n\\\\tstatus _ #open.\\\\n\\\\tScheduledControllers scheduleActive: self! !\\\\n\\\\n!StandardSystemController methodsFor: 'scheduling'!\\\\nopenDisplayAt: aPoint \\\\n\\\\t\\\\\\\"Create an area with origin aPoint in which the receiver's scheduled \\\\n\\\\tview can be displayed. Make it the active view.\\\\\\\"\\\\n\\\\n\\\\tview align: view viewport center with: aPoint.\\\\n\\\\tview translateBy:\\\\n\\\\t\\\\t(view displayBox amountToTranslateWithin: Display boundingBox).\\\\n\\\\tstatus _ #open.\\\\n\\\\tScheduledControllers scheduleActive: self! !\\\\n\\\\n!StandardSystemController methodsFor: 'scheduling' stamp: 'jm 10/22/97 08:16'!\\\\nopenNoTerminate\\\\n\\\\t\\\\\\\"Create an area in which the receiver's scheduled view can be displayed. \\\\n\\\\tMake it the active view. Do not terminate the currently active process.\\\\\\\"\\\\n\\\\n\\\\tview resizeInitially.\\\\n\\\\tstatus _ #open.\\\\n\\\\tScheduledControllers scheduleActiveNoTerminate: self! !\\\\n\\\\n!StandardSystemController methodsFor: 'scheduling'!\\\\nopenNoTerminateDisplayAt: aPoint \\\\n\\\\t\\\\\\\"Create an area with origin aPoint in which the receiver's scheduled \\\\n\\\\tview can be displayed. Make it the active view. Do not terminate the \\\\n\\\\tcurrently active process.\\\\\\\"\\\\n\\\\n\\\\tview resizeMinimumCenteredAt: aPoint.\\\\n\\\\tstatus _ #open.\\\\n\\\\tScheduledControllers scheduleActiveNoTerminate: self! !\\\\n\\\\n!StandardSystemController methodsFor: 'scheduling'!\\\\nstatus: aSymbol\\\\n\\\\tstatus _ aSymbol! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStandardSystemController class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StandardSystemController class methodsFor: 'class initialization' stamp: 'sma 3/11/2000 11:57'!\\\\ninitialize\\\\n\\\\t\\\\\\\"StandardSystemController initialize\\\\\\\"\\\\n\\\\n\\\\tScheduledBlueButtonMenu _ SelectionMenu\\\\n\\\\t\\\\tlabels:\\\\n'edit label\\\\nchoose color...\\\\ntwo-tone/full color\\\\nmove\\\\nframe\\\\nfull screen\\\\ncollapse\\\\nclose'\\\\n\\\\tlines: #(3 7)\\\\n\\\\tselections: #(label chooseColor toggleTwoTone move reframe fullScreen collapse close).\\\\n\\\\n\\\\tVBorderCursor _ Cursor extent: 16@16 fromArray: #(\\\\n\\\\t\\\\t2r1010000000000000\\\\n\\\\t\\\\t2r1010000000000000\\\\n\\\\t\\\\t2r1010000000000000\\\\n\\\\t\\\\t2r1010000000000000\\\\n\\\\t\\\\t2r1010000000000000\\\\n\\\\t\\\\t2r1010010000100000\\\\n\\\\t\\\\t2r1010110000110000\\\\n\\\\t\\\\t2r1011111111111000\\\\n\\\\t\\\\t2r1010110000110000\\\\n\\\\t\\\\t2r1010010000100000\\\\n\\\\t\\\\t2r1010000000000000\\\\n\\\\t\\\\t2r1010000000000000\\\\n\\\\t\\\\t2r1010000000000000\\\\n\\\\t\\\\t2r1010000000000000\\\\n\\\\t\\\\t2r1010000000000000\\\\n\\\\t\\\\t2r1010000000000000)\\\\n\\\\t\\\\t\\\\toffset: 0@0.\\\\n\\\\tHBorderCursor _ Cursor extent: 16@16 fromArray: #(\\\\n\\\\t\\\\t2r1111111111111111\\\\n\\\\t\\\\t2r0000000000000000\\\\n\\\\t\\\\t2r1111111111111111\\\\n\\\\t\\\\t2r0000000100000000\\\\n\\\\t\\\\t2r0000001110000000\\\\n\\\\t\\\\t2r0000011111000000\\\\n\\\\t\\\\t2r0000000100000000\\\\n\\\\t\\\\t2r0000000100000000\\\\n\\\\t\\\\t2r0000000100000000\\\\n\\\\t\\\\t2r0000000100000000\\\\n\\\\t\\\\t2r0000011111000000\\\\n\\\\t\\\\t2r0000001110000000\\\\n\\\\t\\\\t2r0000000100000000\\\\n\\\\t\\\\t2r0000000000000000\\\\n\\\\t\\\\t2r0000000000000000\\\\n\\\\t\\\\t2r0000000000000000)\\\\n\\\\t\\\\t\\\\toffset: 0@0.! !\\\\nTestCase subclass: #StandardSystemFontsTest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Support-Tests'!\\\\n\\\\n!StandardSystemFontsTest methodsFor: 'testing' stamp: 'bp 11/6/2004 23:15'!\\\\ntestRestoreDefaultFonts\\\\n\\\\n\\\\tself saveStandardSystemFontsDuring: [\\\\n\\\\t\\\\tPreferences restoreDefaultFonts.\\\\n\\\\t\\\\tself assert: #standardDefaultTextFont familyName: 'Accuny' pointSize: 10.\\\\n\\\\t\\\\tself assert: #standardListFont familyName: 'Accuny' pointSize: 10.\\\\n\\\\t\\\\tself assert: #standardFlapFont familyName: 'Accushi' pointSize: 12.\\\\n\\\\t\\\\tself assert: #standardEToysFont familyName: 'BitstreamVeraSans' pointSize: 9.\\\\n\\\\t\\\\tself assert: #standardMenuFont familyName: 'Accuny' pointSize: 10.\\\\n\\\\t\\\\tself assert: #windowTitleFont familyName: 'BitstreamVeraSans' pointSize: 12.\\\\n\\\\t\\\\tself assert: #standardBalloonHelpFont familyName: 'Accujen' pointSize: 9.\\\\n\\\\t\\\\tself assert: #standardCodeFont familyName: 'Accuny' pointSize: 10.\\\\n\\\\t\\\\tself assert: #standardButtonFont familyName: 'BitstreamVeraSansMono' pointSize: 9]! !\\\\n\\\\n\\\\n!StandardSystemFontsTest methodsFor: 'utilities' stamp: 'bp 6/13/2004 18:22'!\\\\nassert: selector familyName: aString pointSize: anInteger\\\\n\\\\n\\\\t| font |\\\\n\\\\tfont _ Preferences perform: selector.\\\\n\\\\tself assert: font familyName = aString.\\\\n\\\\tself assert: font pointSize = anInteger\\\\n\\\\t! !\\\\n\\\\n!StandardSystemFontsTest methodsFor: 'utilities' stamp: 'bp 6/13/2004 21:51'!\\\\nsaveStandardSystemFontsDuring: aBlock\\\\n\\\\n\\\\t| standardDefaultTextFont standardListFont standardEToysFont standardMenuFont \\\\n\\\\twindowTitleFont standardBalloonHelpFont standardCodeFont standardButtonFont |\\\\n\\\\n\\\\tstandardDefaultTextFont _ Preferences standardDefaultTextFont.\\\\n\\\\tstandardListFont _ Preferences standardListFont.\\\\n\\\\tstandardEToysFont _ Preferences standardEToysFont.\\\\n\\\\tstandardMenuFont _ Preferences standardMenuFont.\\\\n\\\\twindowTitleFont _ Preferences windowTitleFont.\\\\n\\\\tstandardBalloonHelpFont _ Preferences standardBalloonHelpFont.\\\\n\\\\tstandardCodeFont _ Preferences standardCodeFont.\\\\n\\\\tstandardButtonFont _ Preferences standardButtonFont.\\\\n\\\\t[aBlock value] ensure: [\\\\n\\\\t\\\\tPreferences setSystemFontTo: standardDefaultTextFont.\\\\n\\\\t\\\\tPreferences setListFontTo: standardListFont.\\\\n\\\\t\\\\tPreferences setEToysFontTo: standardEToysFont.\\\\n\\\\t\\\\tPreferences setMenuFontTo: standardMenuFont.\\\\n\\\\t\\\\tPreferences setWindowTitleFontTo: windowTitleFont.\\\\n\\\\t\\\\tPreferences setBalloonHelpFontTo: standardBalloonHelpFont.\\\\n\\\\t\\\\tPreferences setCodeFontTo: standardCodeFont.\\\\n\\\\t\\\\tPreferences setButtonFontTo: standardButtonFont].\\\\n! !\\\\nView subclass: #StandardSystemView\\\\n\\\\tinstanceVariableNames: 'labelFrame labelText isLabelComplemented savedSubViews minimumSize maximumSize collapsedViewport expandedViewport labelBits windowBits bitsValid updatablePanes'\\\\n\\\\tclassVariableNames: 'CacheBits LabelStyle'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'ST80-Support'!\\\\n!StandardSystemView commentStamp: '<historical>' prior: 0!\\\\nI represent a view that has a label above its top left corner. The text in the label identifies the kind of view. In addition to a label, I add control over the maximum and minimum size of the display box of my instance. My default controller is StandardSystemController. The elements of ScheduledControllers, the sole instance of ControlManager, are usually controllers for instances of me.!\\\\n\\\\n\\\\n!StandardSystemView methodsFor: 'clipping box access'!\\\\nclippingBox\\\\n\\\\t\\\\\\\"Answer the rectangular area in which the receiver can show its label.\\\\\\\"\\\\n\\\\n\\\\t^self isTopView\\\\n\\\\t\\\\tifTrue: [self labelDisplayBox]\\\\n\\\\t\\\\tifFalse: [super insetDisplayBox]! !\\\\n\\\\n!StandardSystemView methodsFor: 'clipping box access' stamp: 'BG 12/5/2003 11:13'!\\\\nconstrainFrame: aRectangle\\\\n\\\\t\\\\\\\"Constrain aRectangle, to the minimum and maximum size\\\\n\\\\tfor this window\\\\\\\"\\\\n\\\\n   | adjustmentForLabel |\\\\n   adjustmentForLabel := 0 @ (labelFrame height  - labelFrame borderWidth).\\\\n\\\\t^ aRectangle origin extent:\\\\n\\\\t\\\\t((aRectangle extent max: minimumSize + adjustmentForLabel)\\\\n\\\\t\\\\t      min: maximumSize + adjustmentForLabel).! !\\\\n\\\\n\\\\n!StandardSystemView methodsFor: 'controller access'!\\\\ndefaultControllerClass \\\\n\\\\t\\\\\\\"Refer to the comment in View|defaultControllerClass.\\\\\\\"\\\\n\\\\n\\\\t^StandardSystemController! !\\\\n\\\\n\\\\n!StandardSystemView methodsFor: 'deEmphasizing'!\\\\ndeEmphasizeView \\\\n\\\\t\\\\\\\"Refer to the comment in View|deEmphasizeView.\\\\\\\"\\\\n\\\\n\\\\tisLabelComplemented ifTrue:\\\\n\\\\t\\\\t[self deEmphasizeLabel.\\\\n\\\\t\\\\tisLabelComplemented _ false]! !\\\\n\\\\n!StandardSystemView methodsFor: 'deEmphasizing'!\\\\nemphasizeView \\\\n\\\\t\\\\\\\"Refer to the comment in View|emphasizeView.\\\\\\\"\\\\n\\\\n\\\\tself emphasizeLabel! !\\\\n\\\\n\\\\n!StandardSystemView methodsFor: 'displaying'!\\\\ncacheBits\\\\n\\\\t| oldLabelState |\\\\n\\\\tCacheBits ifFalse: [^ self uncacheBits].\\\\n\\\\t(oldLabelState _ isLabelComplemented) ifTrue: [ self deEmphasize ].\\\\n\\\\tself cacheBitsAsIs.\\\\n\\\\t(isLabelComplemented _ oldLabelState) ifTrue: [ self emphasize ].\\\\n! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying'!\\\\ncacheBitsAsIs\\\\n\\\\tCacheBits ifFalse: [^ self uncacheBits].\\\\n\\\\twindowBits _ (self cacheBitsAsTwoTone and: [Display depth > 1])\\\\n\\\\t\\\\tifTrue: [ColorForm\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttwoToneFromDisplay: self windowBox\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tusing: windowBits\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbackgroundColor: self backgroundColor]\\\\n\\\\t\\\\tifFalse: [Form fromDisplay: self windowBox using: windowBits].\\\\n\\\\tbitsValid _ true.\\\\n! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying'!\\\\ncacheBitsAsTwoTone\\\\n\\\\t^ true! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying'!\\\\ndeEmphasizeForDebugger\\\\n\\\\t\\\\\\\"Carefully de-emphasis this window because a debugger is being opened. Care must be taken to avoid invoking potentially buggy window display code that could cause a recursive chain of errors eventually resulting in a virtual machine crash. In particular, do not de-emphasize the subviews.\\\\\\\"\\\\n\\\\n\\\\tself deEmphasizeView.  \\\\\\\"de-emphasize this top-level view\\\\\\\"\\\\n\\\\tself uncacheBits.\\\\n\\\\tSmalltalk garbageCollectMost > 1000000 ifTrue: [\\\\n\\\\t\\\\t\\\\\\\"if there is enough space, cache current window screen bits\\\\\\\"\\\\n\\\\t\\\\tself cacheBitsAsIs].\\\\n! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying' stamp: 'di 10/3/97 13:18'!\\\\ndeEmphasizeLabel\\\\n\\\\t\\\\\\\"Un-Highlight the label.\\\\\\\"\\\\n\\\\tlabelFrame height = 0 ifTrue: [^ self].  \\\\\\\"no label\\\\\\\"\\\\n\\\\tself displayLabelBackground: false.\\\\n\\\\tself displayLabelText.! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying'!\\\\ndisplay\\\\n\\\\tisLabelComplemented\\\\n\\\\t\\\\tifTrue: [self displayEmphasized]\\\\n\\\\t\\\\tifFalse: [self displayDeEmphasized]! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying' stamp: 'hmm 7/21/1999 07:37'!\\\\ndisplayDeEmphasized \\\\n\\\\t\\\\\\\"Display this view with emphasis off.\\\\n\\\\tIf windowBits is not nil, then simply BLT if possible,\\\\n\\\\t\\\\tbut force full display for top window so color is preserved.\\\\\\\"\\\\n\\\\t(bitsValid and: [controller ~~ ScheduledControllers activeController])\\\\n\\\\t\\\\tifTrue: [self lock.\\\\n\\\\t\\\\t\\\\t\\\\twindowBits displayAt: self windowOrigin]\\\\n\\\\t\\\\tifFalse: [Display deferUpdates: true.\\\\n\\\\t\\\\t\\\\t\\\\tsuper display.\\\\n\\\\t\\\\t\\\\t\\\\tDisplay deferUpdates: false; forceToScreen: self windowBox.\\\\n\\\\t\\\\t\\\\t\\\\tCacheBits ifTrue: [self cacheBitsAsIs]]\\\\n! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying'!\\\\ndisplayEmphasized\\\\n\\\\t\\\\\\\"Display with label highlighted to indicate that it is active.\\\\\\\"\\\\n\\\\n\\\\tself displayDeEmphasized; emphasize.\\\\n\\\\tisLabelComplemented _ true! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying' stamp: 'di 5/15/1998 21:55'!\\\\ndisplayLabelBackground: emphasized\\\\n\\\\t\\\\\\\"Clear or emphasize the inner region of the label\\\\\\\"\\\\n\\\\t| r1 r2 r3 c3 c2 c1 |\\\\n\\\\temphasized ifFalse:\\\\n\\\\t\\\\t[\\\\\\\"Just clear the label if not emphasized\\\\\\\"\\\\n\\\\t\\\\t^ Display fill: (self labelDisplayBox insetBy: 2) fillColor: self labelColor].\\\\n\\\\tr1 _ self labelDisplayBox insetBy: 2.\\\\n\\\\tr2 _ r1 insetBy: 0@2.\\\\n\\\\tr3 _ r2 insetBy: 0@3.\\\\n\\\\tc3 _ self labelColor.\\\\n\\\\tc2 _ c3 dansDarker.\\\\n\\\\tc1 _ c2 dansDarker.\\\\n\\\\tDisplay fill: r1 fillColor: c1.\\\\n\\\\tDisplay fill: r2 fillColor: c2.\\\\n\\\\tDisplay fill: r3 fillColor: c3.\\\\n \\\\n\\\\\\\"\\\\tHere is the Mac racing stripe code\\\\n\\\\tstripes _ Bitmap with: (self labelColor pixelWordForDepth: Display depth)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\twith: (Form black pixelWordForDepth: Display depth).\\\\n\\\\tself windowOrigin y even ifTrue: [stripes swap: 1 with: 2].\\\\n\\\\tDisplay fill: (self labelDisplayBox insetBy: 3) fillColor: stripes.\\\\n\\\\\\\"! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying'!\\\\ndisplayLabelBoxes\\\\n\\\\t\\\\\\\"closeBox, growBox.\\\\\\\"\\\\n\\\\t| aRect smallRect backColor |\\\\n\\\\taRect _ self closeBoxFrame.\\\\n\\\\tbackColor _ self labelColor.\\\\n\\\\tDisplay fill: (aRect insetBy: -2) fillColor: backColor.\\\\n\\\\tDisplay fillBlack: aRect.\\\\n\\\\tDisplay fill: (aRect insetBy: 1) fillColor: backColor.\\\\n\\\\n\\\\taRect _ self growBoxFrame.\\\\n\\\\tsmallRect _ aRect origin extent: 7@7.\\\\n\\\\tDisplay fill: (aRect insetBy: -2) fillColor: backColor.\\\\n\\\\taRect _ aRect insetOriginBy: 2@2 cornerBy: 0@0.\\\\n\\\\tDisplay fillBlack: aRect.\\\\n\\\\tDisplay fill: (aRect insetBy: 1) fillColor: backColor.\\\\n\\\\tDisplay fillBlack: smallRect.\\\\n\\\\tDisplay fill: (smallRect insetBy: 1) fillColor: backColor! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying' stamp: 'di 9/10/1998 09:43'!\\\\ndisplayLabelText\\\\n\\\\t\\\\\\\"The label goes in the center of the window\\\\\\\"\\\\n\\\\t| labelRect |\\\\n\\\\tlabelText foregroundColor: self foregroundColor\\\\n\\\\t\\\\t\\\\tbackgroundColor: self labelColor.\\\\n\\\\tlabelRect _ self labelTextRegion.\\\\n\\\\tDisplay fill: (labelRect expandBy: 3@0) fillColor: self labelColor.\\\\n\\\\tlabelText displayOn: Display at: labelRect topLeft clippingBox: labelRect\\\\n\\\\t\\\\t\\\\trule: labelText rule fillColor: labelText fillColor.\\\\n\\\\tlabelText destinationForm: nil! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying' stamp: 'di 8/29/97 18:57'!\\\\ndisplayOn: aPort\\\\n\\\\tbitsValid ifFalse:\\\\n\\\\t\\\\t[^ Display clippingTo: aPort clipRect do: [super display]].\\\\n\\\\twindowBits displayOnPort: aPort at: self windowOrigin! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying' stamp: 'ar 5/14/2001 23:40'!\\\\ndisplayRacingStripes\\\\n\\\\t\\\\\\\"Display Racing Stripes in the label\\\\\\\"\\\\n\\\\t| labelDisplayBox stripes top bottom left box right |\\\\n\\\\tlabelDisplayBox _ self labelDisplayBox.\\\\n\\\\ttop _ labelDisplayBox top + 3.\\\\n\\\\tbottom _ labelDisplayBox bottom - 3.\\\\n\\\\tstripes _ Bitmap with: (Display pixelWordFor: self labelColor)\\\\n\\\\t\\\\t\\\\twith: (Display pixelWordFor: Color black).\\\\n\\\\ttop even ifFalse: [stripes swap: 1 with: 2].\\\\n\\\\n\\\\tleft _ labelDisplayBox left + 3.\\\\n\\\\n\\\\tbox _ self closeBoxFrame.\\\\n\\\\tright _ box left - 2.\\\\n\\\\tDisplay fill: (Rectangle left: left right: right top: top bottom: bottom)\\\\n\\\\t\\\\t\\\\tfillColor: stripes.\\\\n\\\\tleft _ box right + 2.\\\\n\\\\n\\\\tbox _ self labelTextRegion.\\\\n\\\\tright _ box left - 3.\\\\n\\\\tDisplay fill: (Rectangle left: left right: right top: top bottom: bottom)\\\\n\\\\t\\\\t\\\\tfillColor: stripes.\\\\n\\\\tleft _ box right + 2.\\\\n\\\\n\\\\tbox _ self growBoxFrame.\\\\n\\\\tright _ box left - 2.\\\\n\\\\tDisplay fill: (Rectangle left: left right: right top: top bottom: bottom)\\\\n\\\\t\\\\t\\\\tfillColor: stripes.\\\\n\\\\tleft _ box right + 2.\\\\n\\\\n\\\\tright _ labelDisplayBox right - 3.\\\\n\\\\tDisplay fill: (Rectangle left: left right: right top: top bottom: bottom)\\\\n\\\\t\\\\t\\\\tfillColor: stripes.\\\\n! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying' stamp: 'di 10/3/97 13:14'!\\\\ndisplayView\\\\n\\\\t\\\\\\\"Refer to the comment in View|displayView. \\\\\\\"\\\\n\\\\tlabelFrame height = 0 ifTrue: [^ self].  \\\\\\\"no label\\\\\\\"\\\\n\\\\tself displayBox width = labelFrame width ifFalse:\\\\n\\\\t\\\\t[\\\\\\\"recompute label width when window changes size\\\\\\\"\\\\n\\\\t\\\\tself setLabelRegion].\\\\n\\\\t(labelFrame align: labelFrame topLeft with: self windowOrigin)\\\\n\\\\t\\\\tinsideColor: self labelColor;\\\\n\\\\t\\\\tdisplayOn: Display.\\\\n\\\\tself displayLabelText! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying' stamp: 'di 10/3/97 13:18'!\\\\nemphasizeLabel\\\\n\\\\t\\\\\\\"Highlight the label.\\\\\\\"\\\\n\\\\tlabelFrame height = 0 ifTrue: [^ self].  \\\\\\\"no label\\\\\\\"\\\\n\\\\tself displayLabelBackground: true.\\\\n\\\\tself displayLabelBoxes.\\\\n\\\\tself displayLabelText.! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying' stamp: 'di 8/30/97 11:07'!\\\\nerase\\\\n\\\\t\\\\\\\"Clear the display box of the receiver to be gray, as the screen background.\\\\\\\"\\\\n\\\\t| oldValid |\\\\n\\\\tCacheBits\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[oldValid _ bitsValid.\\\\n\\\\t\\\\t\\\\tbitsValid _ false.\\\\n\\\\t\\\\t\\\\tScheduledControllers restore: self windowBox without: self.\\\\n\\\\t\\\\t\\\\tbitsValid _ oldValid]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[ScheduledControllers restore: self windowBox without: self]! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying' stamp: 'RAA 6/14/2000 17:27'!\\\\nmakeMeVisible\\\\n\\\\n        | newLoc portRect |\\\\n        ((Display boundingBox insetBy: (0@0 corner: self labelHeight asPoint))\\\\n                containsPoint: self displayBox topLeft) ifTrue: [^ self \\\\\\\"OK -- my top left is visible\\\\\\\"].\\\\n\\\\n        \\\\\\\"window not on screen (probably due to reframe) -- move it now\\\\\\\"\\\\n        newLoc _ self isCollapsed\\\\n                ifTrue: [RealEstateAgent assignCollapsePointFor: self]\\\\n                ifFalse: [(RealEstateAgent initialFrameFor: self world: nil) topLeft].\\\\n        portRect _ newLoc + self labelOffset\\\\n                                extent: self windowBox extent - self labelOffset.\\\\n        self resizeTo: portRect.\\\\n        self setLabelRegion.\\\\n! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying'!\\\\nuncacheBits\\\\n\\\\twindowBits _ nil.\\\\n\\\\tbitsValid _ false.! !\\\\n\\\\n!StandardSystemView methodsFor: 'displaying'!\\\\nwindowBits\\\\n\\\\t^ windowBits! !\\\\n\\\\n\\\\n!StandardSystemView methodsFor: 'framing' stamp: 'sr 3/26/2000 03:47'!\\\\nchooseCollapsePoint\\\\n\\\\t\\\\\\\"Answer the point at which to place the collapsed window.\\\\\\\"\\\\n\\\\t| pt labelForm beenDown offset |\\\\n\\\\tlabelForm _ Form fromDisplay: self labelDisplayBox.\\\\n\\\\tself uncacheBits.\\\\n\\\\tself erase.\\\\n\\\\tbeenDown _ Sensor anyButtonPressed.\\\\n\\\\tself isCollapsed ifTrue:\\\\n\\\\t\\\\t[offset _ self labelDisplayBox topLeft - self growBoxFrame topLeft.\\\\n\\\\t\\\\tlabelForm follow: [pt _ (Sensor cursorPoint + offset max: 0@0) truncateTo: 8]\\\\n\\\\t\\\\t\\\\t\\\\twhile: [Sensor anyButtonPressed\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [beenDown _ true]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [beenDown not]].\\\\n\\\\t\\\\t^ pt].\\\\n\\\\t^ (RealEstateAgent assignCollapseFrameFor: self) origin.\\\\n! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing'!\\\\nchooseFrame\\\\n\\\\t\\\\\\\"Answer a new frame, depending on whether the view is currently \\\\n\\\\tcollapsed or not.\\\\\\\"\\\\n\\\\t| labelForm f |\\\\n\\\\tself isCollapsed & expandedViewport notNil\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[labelForm _ bitsValid\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [windowBits]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [Form fromDisplay: self labelDisplayBox].\\\\n\\\\t\\\\t\\\\tbitsValid _ false.\\\\n\\\\t\\\\t\\\\tself erase.\\\\n\\\\t\\\\t\\\\tlabelForm slideFrom: self labelDisplayBox origin\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tto: expandedViewport origin-self labelOffset\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnSteps: 10.\\\\n\\\\t\\\\t\\\\t^ expandedViewport]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[f _ self getFrame.\\\\n\\\\t\\\\t\\\\tbitsValid _ false.\\\\n\\\\t\\\\t\\\\tself erase.\\\\n\\\\t\\\\t\\\\t^ f topLeft + self labelOffset extent: f extent]! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing'!\\\\nchooseMoveRectangle\\\\n\\\\t\\\\\\\"Ask the user to designate a new window rectangle.\\\\\\\"\\\\n\\\\t| offset p |\\\\n\\\\toffset _ Sensor anyButtonPressed \\\\\\\"Offset if draggin, eg, label\\\\\\\"\\\\n\\\\t\\\\tifTrue: [self windowBox topLeft - Sensor cursorPoint]\\\\n\\\\t\\\\tifFalse: [0@0].\\\\n\\\\tself isCollapsed\\\\n\\\\t\\\\tifTrue: [^ self labelDisplayBox newRectFrom:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:f | p _ Sensor cursorPoint + offset.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tp _ (p max: 0@0) truncateTo: 8.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tp extent: f extent]]\\\\n\\\\t\\\\tifFalse: [^ self windowBox newRectFrom:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:f | p _ Sensor cursorPoint + offset.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself constrainFrame: (p extent: f extent)]]! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing' stamp: 'di 5/11/1999 22:09'!\\\\ncollapse\\\\n\\\\t\\\\\\\"If the receiver is not already collapsed, change its view to be that of its \\\\n\\\\tlabel only.\\\\\\\"\\\\n\\\\n\\\\tself isCollapsed ifFalse:\\\\n\\\\t\\\\t\\\\t[model modelSleep.\\\\n\\\\t\\\\t\\\\t(subViews ~~ nil and: [subViews size = 1 and: [subViews first isKindOf: MorphWorldView]])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [subViews first deEmphasizeView].\\\\n\\\\t\\\\t\\\\texpandedViewport _ self viewport.\\\\n\\\\t\\\\t\\\\tsavedSubViews _ subViews.\\\\n\\\\t\\\\t\\\\tself resetSubViews.\\\\n\\\\t\\\\t\\\\tlabelText isNil ifTrue: [self label: nil.  bitsValid _ false.].\\\\n\\\\t\\\\t\\\\tself window: (self inverseDisplayTransform:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t((self labelDisplayBox topLeft extent: (labelText extent x + 70) @ self labelHeight)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t intersect: self labelDisplayBox))]! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing'!\\\\ncollapseToPoint: collapsePoint\\\\n\\\\tself collapse.\\\\n\\\\tself align: self displayBox topLeft with: collapsePoint.\\\\n\\\\tcollapsedViewport _ self viewport.\\\\n\\\\tself displayEmphasized! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing'!\\\\ncollapsedFrame\\\\n\\\\t\\\\\\\"Answer the rectangle occupied by this window when collapsed.\\\\\\\"\\\\n\\\\t^ collapsedViewport  \\\\\\\"NOTE may be nil\\\\\\\"! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing' stamp: 'sw 10/20/1999 09:46'!\\\\nexpand\\\\n\\\\t\\\\\\\"If the receiver is collapsed, change its view to be that of all of its subviews, not its label alone.\\\\\\\"\\\\n\\\\t| newFrame |\\\\n\\\\tself isCollapsed\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[newFrame _ self chooseFrame expandBy: borderWidth.\\\\n\\\\t\\\\t\\\\tcollapsedViewport _ self viewport.\\\\n\\\\t\\\\t\\\\tsubViews _ savedSubViews.\\\\n\\\\t\\\\t\\\\tlabelFrame borderWidthLeft: 2 right: 2 top: 2 bottom: 2.\\\\n\\\\t\\\\t\\\\tsavedSubViews _ nil.\\\\n\\\\t\\\\t\\\\tself setWindow: nil.\\\\n\\\\t\\\\t\\\\tself resizeTo: newFrame.\\\\n\\\\t\\\\t\\\\tself displayDeEmphasized.\\\\n\\\\t\\\\t\\\\tmodel modelWakeUpIn: self]! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing'!\\\\nexpandedFrame\\\\n\\\\t\\\\\\\"Answer the rectangle occupied by this window when expanded.\\\\\\\"\\\\n\\\\t^ expandedViewport  \\\\\\\"NOTE may be nil\\\\\\\"! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing' stamp: 'sw 8/15/97 17:18'!\\\\nfullScreen\\\\n\\\\t\\\\\\\"Expand the receiver to fill the screen.  Let the model decide how big is full -- allows for flop-out scrollbar on left if desired\\\\\\\"\\\\n\\\\n\\\\tself isCollapsed ifFalse:\\\\n\\\\t\\\\t[self reframeTo: model fullScreenSize]! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing'!\\\\ngetFrame\\\\n\\\\t\\\\\\\"Ask the user to designate a rectangular area in which\\\\n\\\\tthe receiver should be displayed.\\\\\\\"\\\\n\\\\t| minFrame |\\\\n\\\\tminFrame _ Cursor origin showWhile: \\\\n\\\\t\\\\t[(Sensor cursorPoint extent: self minimumSize) newRectFrom:\\\\n\\\\t\\\\t\\\\t[:f | Sensor cursorPoint extent: self minimumSize]].\\\\n\\\\tself maximumSize <= self minimumSize ifTrue: [^ minFrame].\\\\n\\\\t^ Cursor corner showWhile:\\\\n\\\\t\\\\t[minFrame newRectFrom:\\\\n\\\\t\\\\t\\\\t[:f | self constrainFrame: (f origin corner: Sensor cursorPoint)]]! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing' stamp: 'sw 1/22/96'!\\\\ninitialExtent\\\\n\\\\t\\\\\\\"Answer the desired extent for the receiver when it is first opened on the screen.  \\\\\\\"\\\\n\\\\n\\\\t^ model initialExtent min: maximumSize max: minimumSize! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing' stamp: 'RAA 6/14/2000 17:27'!\\\\ninitialFrame\\\\n        \\\\\\\"Find a plausible initial screen area for the receiver, taking into account user preference, the size needed, and other windows currently on the screen.  5/22/96 sw: let RealEstateAgent do it for us\\\\\\\"\\\\n\\\\n        ^ RealEstateAgent initialFrameFor: self world: nil! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing'!\\\\nmoved\\\\n\\\\t\\\\\\\"The user has moved the receiver; after a new view rectangle is chosen, this method is called to allow certain views to take note of the change.  6/10/96 sw\\\\\\\" ! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing'!\\\\nnewFrame: frameChangeBlock\\\\n\\\\tself reframeTo: (self windowBox newRectFrom:\\\\n\\\\t\\\\t[:f | self constrainFrame: (frameChangeBlock value: f)])! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing' stamp: 'di 10/22/1998 16:15'!\\\\nreframePanesAdjoining: subView along: side to: aDisplayBox \\\\n\\\\t| newBox delta newRect minDim theMin |\\\\n\\\\tnewRect _ aDisplayBox.\\\\n\\\\ttheMin _ 16.\\\\n\\\\t\\\\\\\"First check that this won't make any pane smaller than theMin screen dots\\\\\\\"\\\\n\\\\tminDim _ ((subViews select: [:sub | sub displayBox bordersOn: subView displayBox along: side])\\\\n\\\\t\\\\tcollect: [:sub | sub displayBox adjustTo: newRect along: side])\\\\n\\\\t\\\\t\\\\tinject: 999 into: [:was :rect | (was min: rect width) min: rect height].\\\\n\\\\t\\\\\\\"If so, amend newRect as required\\\\\\\"\\\\n\\\\tminDim < theMin ifTrue:\\\\n\\\\t\\\\t[delta _ minDim - theMin.\\\\n\\\\t\\\\tnewRect _ newRect withSide: side setTo: \\\\n\\\\t\\\\t\\\\t\\\\t((newRect perform: side) > (subView displayBox perform: side)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [(newRect perform: side) + delta]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [(newRect perform: side) - delta])].\\\\n\\\\t\\\\\\\"Now adjust all adjoining panes for real\\\\\\\"\\\\n\\\\tsubViews do:\\\\n\\\\t\\\\t[:sub | (sub displayBox bordersOn: subView displayBox along: side) ifTrue:\\\\n\\\\t\\\\t\\\\t[newBox _ sub displayBox adjustTo: newRect along: side.\\\\n\\\\t\\\\t\\\\tsub window: sub window viewport:\\\\n\\\\t\\\\t\\\\t\\\\t(sub transform: (sub inverseDisplayTransform: newBox)) rounded]].\\\\n\\\\t\\\\\\\"And adjust the growing pane itself\\\\\\\"\\\\n\\\\tsubView window: subView window viewport:\\\\n\\\\t\\\\t\\\\t(subView transform: (subView inverseDisplayTransform: newRect)) rounded.\\\\n\\\\n\\\\t\\\\\\\"Finally force a recomposition of the whole window\\\\\\\"\\\\n\\\\tviewport _ nil.\\\\n\\\\tself resizeTo: self viewport.\\\\n\\\\tself uncacheBits; displayEmphasized! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing' stamp: 'BG 12/4/2003 13:14'!\\\\nreframeTo: newFrame\\\\n\\\\t\\\\\\\"Reframe the receiver to the given screen rectangle.  \\\\n\\\\tRepaint difference after the change.  \\\\\\\"\\\\n\\\\t| oldBox newBox portRect |\\\\n\\\\tself uncacheBits.\\\\n\\\\toldBox _ self windowBox.\\\\n\\\\tportRect _ newFrame topLeft + self labelOffset\\\\n\\\\t\\\\t\\\\t\\\\tcorner: newFrame corner.\\\\n\\\\tself setWindow: nil.\\\\n\\\\tself resizeTo: portRect.\\\\n\\\\tself setLabelRegion.\\\\n\\\\tnewBox _ self windowBox.\\\\n\\\\t(oldBox areasOutside: newBox) do:\\\\n\\\\t\\\\t[:rect | ScheduledControllers restore: rect].\\\\n\\\\tself displayEmphasized! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing'!\\\\nresize\\\\n\\\\t\\\\\\\"Determine the rectangular area for the receiver, adjusted to the \\\\n\\\\tminimum and maximum sizes.\\\\\\\"\\\\n\\\\t| f |\\\\n\\\\tf _ self getFrame.\\\\n\\\\tself resizeTo: (f topLeft + self labelOffset extent: f extent)\\\\n! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing'!\\\\nresizeInitially\\\\n\\\\t\\\\\\\"Determine the rectangular area for the receiver, adjusted to the \\\\n\\\\tminimum and maximum sizes.\\\\\\\"\\\\n\\\\tself resizeTo: self initialFrame\\\\n! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing' stamp: 'di 4/6/98 15:12'!\\\\nresizeMinimumCenteredAt: aPoint \\\\n\\\\t\\\\\\\"Determine the rectangular area for the receiver, adjusted so that it is \\\\n\\\\tcentered a position, aPoint.\\\\\\\"\\\\n\\\\t| aRectangle |\\\\n\\\\taRectangle _ 0 @ 0 extent: self minimumSize.\\\\n\\\\taRectangle _ aRectangle align: aRectangle center with: aPoint.\\\\n\\\\tself resizeTo: aRectangle! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing' stamp: 'di 4/6/98 15:29'!\\\\nresizeTo: aRectangle\\\\n\\\\t\\\\\\\"Resize this view to aRectangle\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"First get scaling right inside borders\\\\\\\"\\\\n\\\\tself window: (self window insetBy: borderWidth)\\\\n\\\\t\\\\tviewport: (aRectangle insetBy: borderWidth).\\\\n\\\\n\\\\t\\\\\\\"Then ensure window maps to aRectangle\\\\\\\"\\\\n\\\\twindow _ transformation applyInverseTo: aRectangle! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing'!\\\\nstandardWindowOffset\\\\n\\\\t^ Preferences standardWindowOffset! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing'!\\\\nwindowBox\\\\n\\\\t^ self displayBox merge: self labelDisplayBox! !\\\\n\\\\n!StandardSystemView methodsFor: 'framing' stamp: 'di 10/3/97 14:19'!\\\\nwindowOrigin\\\\n\\\\t^ (self isCollapsed or: [labelFrame height = 0  \\\\\\\"no label\\\\\\\"])\\\\n\\\\t\\\\tifTrue: [self displayBox topLeft]\\\\n\\\\t\\\\tifFalse: [self displayBox topLeft - self labelOffset]! !\\\\n\\\\n\\\\n!StandardSystemView methodsFor: 'initialize-release' stamp: 'sw 10/29/1999 12:58'!\\\\ninitialize \\\\n\\\\t\\\\\\\"Refer to the comment in View|initialize.\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\tlabelFrame _ Quadrangle new.\\\\n\\\\tlabelFrame region: (Rectangle origin: 0 @ 0 extent: 50 @ self labelHeight).\\\\n\\\\tlabelFrame borderWidthLeft: 2 right: 2 top: 2 bottom: 2.\\\\n\\\\tself label: nil.\\\\n\\\\tisLabelComplemented _ false.\\\\n\\\\tminimumSize _ 50 @ 50.\\\\n\\\\tmaximumSize _ Display extent.\\\\n\\\\tcollapsedViewport _ nil.\\\\n\\\\texpandedViewport _ nil.\\\\n\\\\tbitsValid _ false.\\\\n\\\\tupdatablePanes _ #()! !\\\\n\\\\n!StandardSystemView methodsFor: 'initialize-release'!\\\\nmodel: aModel\\\\n\\\\t\\\\\\\"Set the receiver's model.  For a Standard System View, we also at this time get the default background color set up.  7/30/96 sw\\\\\\\"\\\\n\\\\tsuper model: aModel.\\\\n\\\\tself setDefaultBackgroundColor! !\\\\n\\\\n!StandardSystemView methodsFor: 'initialize-release' stamp: 'jm 8/20/1998 18:29'!\\\\nrelease\\\\n\\\\n\\\\tmodel windowIsClosing.\\\\n\\\\tself isCollapsed ifTrue: [savedSubViews do: [:v | v release]].\\\\n\\\\tsuper release.\\\\n! !\\\\n\\\\n\\\\n!StandardSystemView methodsFor: 'label access' stamp: 'di 6/16/97 12:30'!\\\\ncloseBoxFrame\\\\n\\\\t^ Rectangle origin: (self labelDisplayBox leftCenter + (10@-5)) extent: (11@11)! !\\\\n\\\\n!StandardSystemView methodsFor: 'label access' stamp: 'di 6/16/97 12:29'!\\\\ngrowBoxFrame\\\\n\\\\t^ Rectangle origin: (self labelDisplayBox rightCenter + (-22@-5)) extent: (11@11)! !\\\\n\\\\n!StandardSystemView methodsFor: 'label access'!\\\\nlabel\\\\n\\\\t\\\\\\\"Answer the string that appears in the receiver's label.\\\\\\\"\\\\n\\\\tlabelText isNil\\\\n\\\\t\\\\tifTrue: [^ 'Untitled' copy]\\\\n\\\\t\\\\tifFalse: [^ labelText asString]! !\\\\n\\\\n!StandardSystemView methodsFor: 'label access' stamp: 'sw 12/9/1999 17:44'!\\\\nlabel: aString \\\\n\\\\t\\\\\\\"Set aString to be the receiver's label.\\\\\\\"\\\\n\\\\tlabelText _ Paragraph\\\\n\\\\t\\\\t\\\\twithText: (Text string: ((aString == nil or: [aString isEmpty])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: ['Untitled' copy]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [aString])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tattributes: (Array with: TextEmphasis bold))\\\\n\\\\t\\\\t\\\\tstyle: LabelStyle.\\\\n\\\\tinsetDisplayBox == nil ifTrue: [^ self].  \\\\\\\"wait for further initialization\\\\\\\"\\\\n\\\\tself setLabelRegion! !\\\\n\\\\n!StandardSystemView methodsFor: 'label access'!\\\\nlabelColor\\\\n\\\\t\\\\\\\"Answer the color to use as the background for the receiver's label.  By default, this is the same as the background color of the window, but need not be.  7/16/96 sw\\\\\\\"\\\\n\\\\n\\\\t^ self backgroundColor! !\\\\n\\\\n!StandardSystemView methodsFor: 'label access'!\\\\nlabelDisplayBox\\\\n\\\\t\\\\\\\"Answer the rectangle that borders the visible parts of the receiver's label \\\\n\\\\ton the display screen.\\\\\\\"\\\\n\\\\n\\\\t^ labelFrame region\\\\n\\\\t\\\\talign: labelFrame topLeft\\\\n\\\\t\\\\twith: self windowOrigin! !\\\\n\\\\n!StandardSystemView methodsFor: 'label access'!\\\\nlabelFrame\\\\n\\\\t^labelFrame! !\\\\n\\\\n!StandardSystemView methodsFor: 'label access' stamp: 'sw 12/9/1999 17:47'!\\\\nlabelHeight\\\\n\\\\t^ ((LabelStyle fontAt: 1) height + 4) max: 20! !\\\\n\\\\n!StandardSystemView methodsFor: 'label access'!\\\\nlabelOffset\\\\n\\\\t^ 0 @ (self labelHeight-2)! !\\\\n\\\\n!StandardSystemView methodsFor: 'label access' stamp: 'sr 3/26/2000 04:26'!\\\\nlabelText\\\\n\\\\t^labelText! !\\\\n\\\\n!StandardSystemView methodsFor: 'label access'!\\\\nlabelTextRegion\\\\n\\\\tlabelText == nil ifTrue: [^ self labelDisplayBox center extent: 0@0].\\\\n\\\\t^ (labelText boundingBox\\\\n\\\\t\\\\t\\\\talign: labelText boundingBox center\\\\n\\\\t\\\\t\\\\twith: self labelDisplayBox center)\\\\n\\\\t\\\\tintersect: (self labelDisplayBox insetBy: 35@0)! !\\\\n\\\\n!StandardSystemView methodsFor: 'label access' stamp: 'di 10/3/97 14:20'!\\\\nnoLabel\\\\n\\\\t\\\\\\\"A label of zero height indicates no label\\\\\\\"\\\\n\\\\tlabelFrame height > 0\\\\n\\\\t\\\\tifTrue: [labelFrame region: (labelFrame bottomLeft + (0@1) extent: labelFrame width@0).\\\\n\\\\t\\\\t\\\\t\\\\tlabelFrame borderWidth: 0.\\\\n\\\\t\\\\t\\\\t\\\\tself uncacheBits]! !\\\\n\\\\n!StandardSystemView methodsFor: 'label access' stamp: 'di 6/10/1998 13:18'!\\\\nrelabel: aString \\\\n\\\\t\\\\\\\"A new string for the label.  Window is assumed to be active.\\\\n\\\\tWindow will redisplay only if label bar has to grow.\\\\\\\"\\\\n\\\\t| oldRegion oldWidth |\\\\n\\\\t(model windowReqNewLabel: aString) ifFalse: [^ self].\\\\n\\\\toldRegion _ self labelTextRegion.\\\\n\\\\toldWidth _ self insetDisplayBox width.\\\\n\\\\tself label: aString.\\\\n\\\\tDisplay fill: ((oldRegion merge: self labelTextRegion) expandBy: 3@0)\\\\n\\\\t\\\\t\\\\tfillColor: self labelColor.\\\\n\\\\tself insetDisplayBox width = oldWidth\\\\n\\\\t\\\\tifTrue: [self displayLabelText; emphasizeLabel]\\\\n\\\\t\\\\tifFalse: [self uncacheBits; displayEmphasized].\\\\n! !\\\\n\\\\n!StandardSystemView methodsFor: 'label access' stamp: 'sw 1/19/2001 20:13'!\\\\nsetLabel: aLabel\\\\n\\\\t\\\\\\\"For compatibility with morphic\\\\\\\"\\\\n\\\\n\\\\tself relabel: aLabel! !\\\\n\\\\n!StandardSystemView methodsFor: 'label access' stamp: 'di 10/3/97 13:35'!\\\\nsetLabelRegion\\\\n\\\\t\\\\\\\"Always follows view width\\\\\\\"\\\\n\\\\n\\\\tlabelFrame region: (0 @ 0 extent: self displayBox width @ self labelHeight).\\\\n\\\\tlabelFrame borderWidth: 2! !\\\\n\\\\n!StandardSystemView methodsFor: 'label access' stamp: 'sumim 2/8/2002 14:36'!\\\\nsetLabelTo: aString \\\\n\\\\t\\\\\\\"Force aString to be the new label of the receiver, bypassing any logic about whether it is acceptable and about propagating information about the change.\\\\\\\"\\\\n\\\\n\\\\t| oldRegion oldWidth |\\\\n\\\\tself label: aString.\\\\n\\\\tself controller isControlActive ifFalse: [^ self].\\\\n\\\\toldRegion _ self labelTextRegion.\\\\n\\\\toldWidth _ self insetDisplayBox width.\\\\n\\\\tDisplay fill: ((oldRegion merge: self labelTextRegion) expandBy: 3@0)\\\\n\\\\t\\\\t\\\\tfillColor: self labelColor.\\\\n\\\\tself insetDisplayBox width = oldWidth\\\\n\\\\t\\\\tifTrue: [self displayLabelText; emphasizeLabel]\\\\n\\\\t\\\\tifFalse: [self uncacheBits; displayEmphasized]! !\\\\n\\\\n\\\\n!StandardSystemView methodsFor: 'object fileIn' stamp: 'RAA 12/20/2000 17:49'!\\\\nconvertToCurrentVersion: varDict refStream: smartRefStrm\\\\n\\\\t\\\\n\\\\tupdatablePanes ifNil: [updatablePanes _ #()].\\\\n\\\\t^super convertToCurrentVersion: varDict refStream: smartRefStrm.\\\\n\\\\n! !\\\\n\\\\n\\\\n!StandardSystemView methodsFor: 'size'!\\\\nmaximumSize\\\\n\\\\t\\\\\\\"Answer a point representing the maximum width and height of the \\\\n\\\\treceiver.\\\\\\\"\\\\n\\\\n\\\\t^maximumSize! !\\\\n\\\\n!StandardSystemView methodsFor: 'size'!\\\\nmaximumSize: aPoint \\\\n\\\\t\\\\\\\"Set the argument, aPoint, to be the maximum width and height of the \\\\n\\\\treceiver.\\\\\\\"\\\\n\\\\n\\\\tmaximumSize _ aPoint! !\\\\n\\\\n!StandardSystemView methodsFor: 'size'!\\\\nminimumSize\\\\n\\\\t\\\\\\\"Answer a point representing the minimum width and height of the \\\\n\\\\treceiver.\\\\\\\"\\\\n\\\\n\\\\t^minimumSize! !\\\\n\\\\n!StandardSystemView methodsFor: 'size'!\\\\nminimumSize: aPoint \\\\n\\\\t\\\\\\\"Set the argument, aPoint, to be the minimum width and height of the \\\\n\\\\treceiver.\\\\\\\"\\\\n\\\\n\\\\tminimumSize _ aPoint! !\\\\n\\\\n\\\\n!StandardSystemView methodsFor: 'testing'!\\\\ncontainsPoint: aPoint \\\\n\\\\t\\\\\\\"Refer to the comment in View|containsPoint:.\\\\\\\"\\\\n\\\\n\\\\t^(super containsPoint: aPoint) | (self labelContainsPoint: aPoint)! !\\\\n\\\\n!StandardSystemView methodsFor: 'testing'!\\\\nisCollapsed\\\\n\\\\t\\\\\\\"Answer whether the receiver is collapsed (true) or expanded (false).\\\\\\\"\\\\n\\\\n\\\\t^savedSubViews ~~ nil! !\\\\n\\\\n!StandardSystemView methodsFor: 'testing'!\\\\nlabelContainsPoint: aPoint \\\\n\\\\t\\\\\\\"Answer TRUE if aPoint is in the label box.\\\\\\\"\\\\n\\\\n\\\\t^self labelDisplayBox containsPoint: aPoint! !\\\\n\\\\n\\\\n!StandardSystemView methodsFor: 'updating' stamp: 'sw 10/29/1999 12:57'!\\\\nsetUpdatablePanesFrom: getSelectors\\\\n\\\\t| aList aPane |\\\\n\\\\t\\\\\\\"Set my updatablePanes inst var to the list of panes which are list panes with the given get-list selectors.  Order is important here!!  Note that the method is robust in the face of panes not found, but a warning is printed in the transcript in each such case\\\\\\\"\\\\n\\\\n\\\\taList _ OrderedCollection new.\\\\n\\\\tgetSelectors do:\\\\n\\\\t\\\\t[:sel | aPane _ self subViewSatisfying:\\\\n\\\\t\\\\t\\\\t\\\\t[:pane | (pane isKindOf: PluggableListView) and: [pane getListSelector == sel]].\\\\n\\\\t\\\\t\\\\taPane\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[aList add: aPane]\\\\n\\\\t\\\\t\\\\t\\\\tifNil:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[Transcript cr; show: 'Warning: view ', sel, ' not found.']].\\\\n\\\\tupdatablePanes _ aList asArray! !\\\\n\\\\n!StandardSystemView methodsFor: 'updating' stamp: 'sw 10/29/1999 21:20'!\\\\nupdatablePanes\\\\n\\\\t\\\\\\\"Answer the list of panes, in order, which might be sent the #verifyContents message upon window activation or expansion.\\\\\\\"\\\\n\\\\t^ updatablePanes ifNil: [updatablePanes _ #()]! !\\\\n\\\\n!StandardSystemView methodsFor: 'updating' stamp: 'sw 1/11/2000 15:30'!\\\\nupdate: aSymbol\\\\n\\\\taSymbol = #relabel\\\\n\\\\t\\\\tifTrue: [^ self setLabelTo: model labelString].\\\\n\\\\t^ super update: aSymbol! !\\\\n\\\\n\\\\n!StandardSystemView methodsFor: 'private'!\\\\nsetTransformation: aTransformation \\\\n\\\\t\\\\\\\"Override to support label size changes \\\\\\\"\\\\n\\\\tsuper setTransformation: aTransformation.\\\\n\\\\tself label: self label! !\\\\n\\\\n!StandardSystemView methodsFor: 'private' stamp: 'di 10/21/1998 16:12'!\\\\nsubviewWithLongestSide: sideBlock near: aPoint \\\\n\\\\t| theSub theSide theLen box |\\\\n\\\\ttheLen _ 0.\\\\n\\\\tsubViews do:\\\\n\\\\t\\\\t[:sub | box _ sub insetDisplayBox.\\\\n\\\\t\\\\tbox forPoint: aPoint closestSideDistLen:\\\\n\\\\t\\\\t\\\\t[:side :dist :len |\\\\n\\\\t\\\\t\\\\t(dist <= 5 and: [len > theLen]) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[theSub _ sub.\\\\n\\\\t\\\\t\\\\t\\\\ttheSide _ side.\\\\n\\\\t\\\\t\\\\t\\\\ttheLen _ len]]].\\\\n\\\\tsideBlock value: theSide.\\\\n\\\\t^ theSub! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStandardSystemView class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StandardSystemView class methodsFor: 'class initialization'!\\\\ncachingBits\\\\n\\\\t^ CacheBits! !\\\\n\\\\n!StandardSystemView class methodsFor: 'class initialization'!\\\\ndoCacheBits\\\\n\\\\t\\\\\\\"StandardSystemView doCacheBits - Enable fast window repaint feature\\\\\\\"\\\\n\\\\tCacheBits _ true.\\\\n\\\\tScheduledControllers unCacheWindows.\\\\n\\\\tScheduledControllers restore! !\\\\n\\\\n!StandardSystemView class methodsFor: 'class initialization'!\\\\ndontCacheBits\\\\n\\\\t\\\\\\\"StandardSystemView dontCacheBits - Disable fast window repaint feature.\\\\n\\\\tReturn true iff bits were cached, ie if space was been recovered\\\\\\\"\\\\n\\\\tCacheBits ifFalse: [^ false].\\\\n\\\\tCacheBits _ false.\\\\n\\\\tScheduledControllers unCacheWindows.\\\\n\\\\t^ true! !\\\\n\\\\n!StandardSystemView class methodsFor: 'class initialization' stamp: 'sw 12/6/1999 23:42'!\\\\ninitialize\\\\t\\\\t\\\\\\\"StandardSystemView initialize\\\\\\\"\\\\n\\\\tself doCacheBits.\\\\n\\\\tself setLabelStyle! !\\\\n\\\\n!StandardSystemView class methodsFor: 'class initialization' stamp: 'nk 9/1/2004 10:26'!\\\\nsetLabelStyle\\\\n\\\\t| aFont |\\\\n\\\\t\\\\\\\"StandardSystemView setLabelStyle\\\\\\\"\\\\n\\\\taFont _ Preferences windowTitleFont.\\\\n\\\\tLabelStyle _ TextStyle fontArray: { aFont }.\\\\n\\\\tLabelStyle gridForFont: 1 withLead: 0! !\\\\nObject subclass: #StandardToolSet\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Tools-Base'!\\\\n!StandardToolSet commentStamp: '<historical>' prior: 0!\\\\nMain comment stating the purpose of this class and relevant relationship to other classes.\\\\n\\\\nPossible useful expressions for doIt or printIt.\\\\n\\\\nStructure:\\\\n instVar1\\\\t\\\\ttype -- comment about the purpose of instVar1\\\\n instVar2\\\\t\\\\ttype -- comment about the purpose of instVar2\\\\n\\\\nAny further useful comments about the general approach of this implementation.!\\\\n\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStandardToolSet class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StandardToolSet class methodsFor: 'browsing' stamp: 'ar 7/16/2005 15:20'!\\\\nbrowseChangeSetsWithClass: aClass selector: aSelector\\\\n\\\\t\\\\\\\"Browse all the change sets with the given class/selector\\\\\\\"\\\\n\\\\t^ChangeSorter browseChangeSetsWithClass: aClass selector: aSelector! !\\\\n\\\\n!StandardToolSet class methodsFor: 'browsing' stamp: 'md 3/10/2006 21:42'!\\\\nbrowseHierarchy: aClass selector: aSelector\\\\n\\\\t\\\\\\\"Open a browser\\\\\\\"\\\\n\\\\t| newBrowser |\\\\n\\\\t(aClass == nil)  ifTrue: [^ self].\\\\n\\\\t(newBrowser := SystemBrowser default new) setClass: aClass selector: aSelector.\\\\n\\\\tnewBrowser spawnHierarchy.! !\\\\n\\\\n!StandardToolSet class methodsFor: 'browsing' stamp: 'ar 7/17/2005 11:12'!\\\\nbrowseMessageNames: aString\\\\n\\\\t^(MessageNames methodBrowserSearchingFor: aString) openInWorld! !\\\\n\\\\n!StandardToolSet class methodsFor: 'browsing' stamp: 'ar 7/17/2005 11:13'!\\\\nbrowseMessageSet: messageList name: title autoSelect: autoSelectString\\\\n\\\\t\\\\\\\"Open a message set browser\\\\\\\"\\\\n\\\\t^MessageSet\\\\n\\\\t\\\\topenMessageList: messageList \\\\n\\\\t\\\\tname: title \\\\n\\\\t\\\\tautoSelect: autoSelectString! !\\\\n\\\\n!StandardToolSet class methodsFor: 'browsing' stamp: 'ar 7/17/2005 11:35'!\\\\nbrowseVersionsOf: aClass selector: aSelector\\\\n\\\\t\\\\\\\"Open a browser\\\\\\\"\\\\n\\\\tVersionsBrowser\\\\n\\\\t\\\\tbrowseVersionsOf: (aClass compiledMethodAt: aSelector)\\\\n\\\\t\\\\tclass: aClass theNonMetaClass\\\\n\\\\t\\\\tmeta: aClass isMeta\\\\n\\\\t\\\\tcategory: (aClass organization categoryOfElement: aSelector)\\\\n\\\\t\\\\tselector: aSelector! !\\\\n\\\\n!StandardToolSet class methodsFor: 'browsing' stamp: 'md 3/10/2006 21:43'!\\\\nbrowse: aClass selector: aSelector\\\\n\\\\t\\\\\\\"Open a browser\\\\\\\"\\\\n\\\\t^SystemBrowser default fullOnClass: aClass selector: aSelector! !\\\\n\\\\n!StandardToolSet class methodsFor: 'browsing' stamp: 'ar 7/15/2005 18:58'!\\\\nopenChangedMessageSet: aChangeSet\\\\n\\\\t\\\\\\\"Open a ChangedMessageSet for aChangeSet\\\\\\\"\\\\n\\\\tChangedMessageSet openFor: aChangeSet! !\\\\n\\\\n!StandardToolSet class methodsFor: 'browsing' stamp: 'ar 7/15/2005 18:58'!\\\\nopenClassListBrowser: anArray title: aString\\\\n\\\\t\\\\\\\"Open a class list browser\\\\\\\"\\\\n\\\\t^ClassListBrowser new initForClassesNamed: anArray title: aString\\\\n! !\\\\n\\\\n\\\\n!StandardToolSet class methodsFor: 'class initialization' stamp: 'ar 7/17/2005 01:04'!\\\\ninitialize\\\\n\\\\tToolSet register: self.\\\\n\\\\tPreferences installMissingWindowColors.! !\\\\n\\\\n!StandardToolSet class methodsFor: 'class initialization' stamp: 'ar 7/16/2005 16:18'!\\\\nunload\\\\n\\\\tToolSet unregister: self.! !\\\\n\\\\n\\\\n!StandardToolSet class methodsFor: 'debugging' stamp: 'ar 7/15/2005 19:15'!\\\\ndebugContext: aContext label: aString contents: contents\\\\n\\\\t\\\\\\\"Open a debugger on the given process and context.\\\\\\\"\\\\n\\\\t^Debugger openContext: aContext label: aString contents: contents! !\\\\n\\\\n!StandardToolSet class methodsFor: 'debugging' stamp: 'ar 7/17/2005 11:16'!\\\\ndebugError: anError\\\\n\\\\t\\\\\\\"Handle an otherwise unhandled error\\\\\\\"\\\\n\\\\t^Processor activeProcess\\\\n\\\\t\\\\tdebug: anError signalerContext\\\\n\\\\t\\\\ttitle: anError description! !\\\\n\\\\n!StandardToolSet class methodsFor: 'debugging' stamp: 'ar 9/27/2005 19:18'!\\\\ndebugSyntaxError: anError\\\\n\\\\t\\\\\\\"Handle a syntax error\\\\\\\"\\\\n\\\\t| notifier |\\\\n\\\\tnotifier :=  SyntaxError new\\\\n\\\\t\\\\tsetClass: anError errorClass\\\\n\\\\t\\\\tcode: anError errorCode\\\\n\\\\t\\\\tdebugger: (Debugger context: anError signalerContext)\\\\n\\\\t\\\\tdoitFlag: anError doitFlag.\\\\n\\\\tnotifier category: anError category.\\\\n\\\\tSyntaxError open: notifier.! !\\\\n\\\\n!StandardToolSet class methodsFor: 'debugging' stamp: 'ar 7/15/2005 18:57'!\\\\ndebug: aProcess context: aContext label: aString contents: contents fullView: aBool\\\\n\\\\t\\\\\\\"Open a debugger on the given process and context.\\\\\\\"\\\\n\\\\t^Debugger openOn: aProcess context: aContext label: aString contents: contents fullView: aBool! !\\\\n\\\\n!StandardToolSet class methodsFor: 'debugging' stamp: 'ar 7/17/2005 11:16'!\\\\ninterrupt: aProcess label: aString\\\\n\\\\t\\\\\\\"Open a debugger on the given process and context.\\\\\\\"\\\\n\\\\tDebugger\\\\n\\\\t\\\\topenInterrupt: aString\\\\n\\\\t\\\\tonProcess: aProcess! !\\\\n\\\\n\\\\n!StandardToolSet class methodsFor: 'inspecting' stamp: 'ar 7/15/2005 18:57'!\\\\nbasicInspect: anObject\\\\n\\\\t\\\\\\\"Open an inspector on the given object. The tool set must know which inspector type to use for which object - the object cannot possibly know what kind of inspectors the toolset provides.\\\\\\\"\\\\n\\\\t^BasicInspector openOn: anObject! !\\\\n\\\\n!StandardToolSet class methodsFor: 'inspecting' stamp: 'ar 7/15/2005 19:34'!\\\\nexplore: anObject\\\\n\\\\t\\\\\\\"Open an explorer on the given object.\\\\\\\"\\\\n\\\\t^ObjectExplorer new openExplorerFor: anObject! !\\\\n\\\\n!StandardToolSet class methodsFor: 'inspecting' stamp: 'ar 7/15/2005 19:54'!\\\\ninspectorClassOf: anObject\\\\n\\\\t\\\\\\\"Answer the inspector class for the given object. The tool set must know which inspector type to use for which object - the object cannot possibly know what kind of inspectors the toolset provides.\\\\\\\"\\\\n\\\\t| map |\\\\n\\\\tmap := Dictionary new.\\\\n\\\\t#(\\\\n\\\\t\\\\t(CompiledMethod\\\\t\\\\tCompiledMethodInspector)\\\\n\\\\t\\\\t(CompositeEvent\\\\t\\\\tOrderedCollectionInspector)\\\\n\\\\t\\\\t(Dictionary\\\\t\\\\t\\\\tDictionaryInspector)\\\\n\\\\t\\\\t(ExternalStructure\\\\tExternalStructureInspector)\\\\n\\\\t\\\\t(FloatArray\\\\t\\\\t\\\\tOrderedCollectionInspector)\\\\n\\\\t\\\\t(OrderedCollection\\\\tOrderedCollectionInspector)\\\\n\\\\t\\\\t(Set\\\\t\\\\t\\\\t\\\\t\\\\tSetInspector)\\\\n\\\\t\\\\t(WeakSet\\\\t\\\\t\\\\tWeakSetInspector)\\\\n\\\\t) do:[:spec|\\\\n\\\\t\\\\tmap at: spec first put: spec last.\\\\n\\\\t].\\\\n\\\\tanObject class withAllSuperclassesDo:[:cls|\\\\n\\\\t\\\\tmap at: cls name ifPresent:[:inspectorName| ^Smalltalk classNamed: inspectorName].\\\\n\\\\t].\\\\n\\\\t^Inspector! !\\\\n\\\\n!StandardToolSet class methodsFor: 'inspecting' stamp: 'ar 7/15/2005 18:58'!\\\\ninspect: anObject\\\\n\\\\t\\\\\\\"Open an inspector on the given object. The tool set must know which inspector type to use for which object - the object cannot possibly know what kind of inspectors the toolset provides.\\\\\\\"\\\\n\\\\t^(self inspectorClassOf: anObject) openOn: anObject! !\\\\n\\\\n!StandardToolSet class methodsFor: 'inspecting' stamp: 'ar 7/15/2005 19:57'!\\\\ninspect: anObject label: aString\\\\n\\\\t\\\\\\\"Open an inspector on the given object. The tool set must know which inspector type to use for which object - the object cannot possibly know what kind of inspectors the toolset provides.\\\\\\\"\\\\n\\\\t^(self inspectorClassOf: anObject) openOn: anObject withEvalPane: true withLabel: aString! !\\\\n\\\\n\\\\n!StandardToolSet class methodsFor: 'menu' stamp: 'ar 7/17/2005 13:19'!\\\\nmenuItems\\\\n\\\\t\\\\\\\"Answer the menu items available for this tool set\\\\\\\"\\\\n\\\\t^#(\\\\n\\\\t\\\\t('class browser' \\\\t\\\\t\\\\t#openClassBrowser)\\\\n\\\\t\\\\t('workspace'\\\\t\\\\t\\\\t\\\\t#openWorkspace)\\\\n\\\\t\\\\t('file list'\\\\t\\\\t\\\\t\\\\t\\\\t#openFileList)\\\\n\\\\t\\\\t('package pane browser' \\\\t#openPackagePaneBrowser)\\\\n\\\\t\\\\t('process browser' \\\\t\\\\t\\\\t#openProcessBrowser)\\\\n\\\\t\\\\t-\\\\n\\\\t\\\\t('method finder'\\\\t\\\\t\\\\t\\\\t#openSelectorBrowser)\\\\n\\\\t\\\\t('message names'\\\\t\\\\t\\\\t#openMessageNames)\\\\n\\\\t\\\\t-\\\\n\\\\t\\\\t('simple change sorter'\\\\t\\\\t#openChangeSorter)\\\\n\\\\t\\\\t('dual change sorter'\\\\t\\\\t#openDualChangeSorter)\\\\n\\\\t)\\\\n! !\\\\n\\\\n!StandardToolSet class methodsFor: 'menu' stamp: 'ar 7/17/2005 13:05'!\\\\nopenChangeSorter\\\\n\\\\tChangeSorter new morphicWindow openInWorld! !\\\\n\\\\n!StandardToolSet class methodsFor: 'menu' stamp: 'md 3/10/2006 21:47'!\\\\nopenClassBrowser\\\\n\\\\tSystemBrowser default open! !\\\\n\\\\n!StandardToolSet class methodsFor: 'menu' stamp: 'ar 7/17/2005 13:05'!\\\\nopenDualChangeSorter\\\\n\\\\tDualChangeSorter new morphicWindow openInWorld! !\\\\n\\\\n!StandardToolSet class methodsFor: 'menu' stamp: 'md 2/24/2006 15:21'!\\\\nopenFileList\\\\n\\\\tFileList2 prototypicalToolWindow openInWorld.! !\\\\n\\\\n!StandardToolSet class methodsFor: 'menu' stamp: 'ar 7/17/2005 12:59'!\\\\nopenMessageNames\\\\n\\\\t\\\\\\\"Bring a MessageNames tool to the front\\\\\\\"\\\\n\\\\tMessageNames openMessageNames! !\\\\n\\\\n!StandardToolSet class methodsFor: 'menu' stamp: 'ar 7/17/2005 13:04'!\\\\nopenPackagePaneBrowser\\\\n\\\\tPackagePaneBrowser openBrowser.! !\\\\n\\\\n!StandardToolSet class methodsFor: 'menu' stamp: 'ar 7/17/2005 12:59'!\\\\nopenProcessBrowser\\\\n\\\\tProcessBrowser open! !\\\\n\\\\n!StandardToolSet class methodsFor: 'menu' stamp: 'ar 7/17/2005 13:00'!\\\\nopenSelectorBrowser\\\\n\\\\tSelectorBrowser new morphicWindow openInWorld! !\\\\n\\\\n!StandardToolSet class methodsFor: 'menu' stamp: 'md 1/18/2006 19:08'!\\\\nopenWorkspace\\\\n\\\\tWorkspace open! !\\\\nViewer subclass: #StandardViewer\\\\n\\\\tinstanceVariableNames: 'firstPanel'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'EToys-Scripting'!\\\\n!StandardViewer commentStamp: 'sw 8/17/2002 02:04' prior: 0!\\\\nA structure that allows you to view state and behavior of an object; it consists of a header and then any number of CategoryViewers.!\\\\n\\\\n\\\\n!StandardViewer methodsFor: 'categories' stamp: 'sw 12/28/1998 15:22'!\\\\naddCategoryViewer\\\\t\\\\n\\\\tself addCategoryViewerFor: self likelyCategoryToShow! !\\\\n\\\\n!StandardViewer methodsFor: 'categories' stamp: 'sw 8/23/2002 14:50'!\\\\naddCategoryViewerFor: categoryInfo\\\\n\\\\t\\\\\\\"Add a category viewer for the given category info\\\\\\\"\\\\n\\\\n\\\\tself addCategoryViewerFor: categoryInfo atEnd: true! !\\\\n\\\\n!StandardViewer methodsFor: 'categories' stamp: 'sw 8/23/2002 14:56'!\\\\naddCategoryViewerFor: categoryInfo atEnd: atEnd\\\\n\\\\t\\\\\\\"Add a category viewer for the given category info.  If atEnd is true, add it at the end, else add it just after the header morph\\\\\\\"\\\\n\\\\n\\\\t| aViewer |\\\\n\\\\taViewer _ self categoryViewerFor: categoryInfo.\\\\n\\\\tatEnd\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self addMorphBack: aViewer]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self addMorph: aViewer after: submorphs first].\\\\n\\\\taViewer establishContents.\\\\n\\\\tself world ifNotNil: [self world startSteppingSubmorphsOf: aViewer].\\\\n\\\\tself fitFlap! !\\\\n\\\\n!StandardViewer methodsFor: 'categories' stamp: 'sw 8/23/2002 14:18'!\\\\naddSearchPane\\\\n\\\\t\\\\\\\"Add a search pane\\\\\\\"\\\\n\\\\n\\\\tself addCategoryViewerFor: #(search '') atEnd: false! !\\\\n\\\\n!StandardViewer methodsFor: 'categories' stamp: 'sw 11/18/1999 16:00'!\\\\ncategoriesCurrentlyShowing\\\\n\\\\t^ self categoryMorphs collect: [:m | m currentCategory]! !\\\\n\\\\n!StandardViewer methodsFor: 'categories' stamp: 'sw 10/30/1998 18:38'!\\\\ncategoryMorphs\\\\n\\\\t^ self submorphsSatisfying: [:m | m isKindOf: CategoryViewer]! !\\\\n\\\\n!StandardViewer methodsFor: 'categories' stamp: 'gm 2/22/2003 13:01'!\\\\ncategoryViewerFor: categoryInfo \\\\n\\\\t\\\\\\\"Answer a category viewer for the given category info\\\\\\\"\\\\n\\\\n\\\\t| aViewer |\\\\n\\\\taViewer := ((categoryInfo isCollection) \\\\n\\\\t\\\\t\\\\t\\\\tand: [categoryInfo first == #search]) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [CategoryViewer new]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [SearchingViewer new].\\\\n\\\\taViewer initializeFor: scriptedPlayer categoryChoice: categoryInfo.\\\\n\\\\t^aViewer! !\\\\n\\\\n!StandardViewer methodsFor: 'categories' stamp: 'sw 8/3/2001 18:22'!\\\\nchooseLimitClass\\\\n\\\\t\\\\\\\"Put up a menu allowing the user to choose the most generic class to show\\\\\\\"\\\\n\\\\n\\\\t| aMenu limitClass |\\\\n\\\\taMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\tlimitClass _ self limitClass.\\\\n\\\\tscriptedPlayer class withAllSuperclasses do:\\\\n\\\\t\\\\t[:aClass | \\\\n\\\\t\\\\t\\\\taClass == ProtoObject\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[aMenu addLine].\\\\n\\\\t\\\\t\\\\taMenu add: aClass name selector: #setLimitClass: argument: aClass.\\\\n\\\\t\\\\t\\\\taClass == limitClass ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[aMenu lastItem color: Color red].\\\\n\\\\t\\\\t\\\\taClass == limitClass ifTrue: [aMenu addLine]].\\\\n\\\\taMenu addTitle: 'Show only methods\\\\nimplemented at or above...'.  \\\\\\\"heh heh -- somebody please find nice wording here!!\\\\\\\"\\\\n\\\\taMenu popUpInWorld: self currentWorld! !\\\\n\\\\n!StandardViewer methodsFor: 'categories' stamp: 'ka 11/29/2005 20:53'!\\\\nlikelyCategoryToShow\\\\n\\\\t\\\\\\\"Choose a category to show based on what's already showing and on some predefined heuristics\\\\\\\"\\\\n\\\\n\\\\t| possible all aCat currVocab |\\\\n\\\\tall := (scriptedPlayer categoriesForViewer: self) asOrderedCollection.\\\\n\\\\tpossible _ all copy.\\\\n\\\\n\\\\tcurrVocab := self currentVocabulary.\\\\n\\\\tself categoryMorphs do: \\\\n\\\\t\\\\t\\\\t[:m | \\\\n\\\\t\\\\t\\\\taCat := currVocab categoryWhoseTranslatedWordingIs: m currentCategory.\\\\n\\\\t\\\\t\\\\taCat ifNotNil: [possible remove: aCat wording ifAbsent: []]].\\\\n\\\\n\\\\t(possible includes: ScriptingSystem nameForInstanceVariablesCategory translated) ifTrue:\\\\n\\\\t\\\\t[^ ScriptingSystem nameForInstanceVariablesCategory].\\\\n\\\\n\\\\t(currVocab isEToyVocabulary) \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[(possible includes: ScriptingSystem nameForScriptsCategory translated) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [^ ScriptingSystem nameForScriptsCategory]].\\\\n\\\\t{'kedama' translated. #basic translated} \\\\n\\\\t\\\\tdo: [:preferred | (possible includes: preferred) ifTrue: [^ preferred]].\\\\n\\\\t((scriptedPlayer isPlayerLike) \\\\n\\\\t\\\\tand: [scriptedPlayer hasOnlySketchCostumes]) \\\\n\\\\t\\\\t\\\\tifTrue: [(possible includes: #tests translated) ifTrue: [^#tests translated]].\\\\n\\\\t{#'color & border' translated. #tests translated. #color translated. #flagging translated. #comparing translated.} \\\\n\\\\t\\\\tdo: [:preferred | (possible includes: preferred) ifTrue: [^ preferred]].\\\\n\\\\t^ possible isEmpty ifFalse: [possible first] ifTrue: [all first]! !\\\\n\\\\n!StandardViewer methodsFor: 'categories' stamp: 'sw 8/3/2001 18:17'!\\\\nlimitClass\\\\n\\\\t\\\\\\\"Answer the limit class to use in this viewer\\\\\\\"\\\\n\\\\n\\\\t| aClass |\\\\n\\\\t(aClass _ self valueOfProperty: #limitClass)  ifNotNil:\\\\n\\\\t\\\\t[^ aClass].\\\\n\\\\n\\\\taClass _ scriptedPlayer defaultLimitClassForVocabulary: self currentVocabulary.\\\\n\\\\tself setProperty: #limitClass toValue: aClass.\\\\n\\\\t^ aClass! !\\\\n\\\\n!StandardViewer methodsFor: 'categories' stamp: 'sw 8/3/2001 18:31'!\\\\nlimitClass: aClass\\\\n\\\\t\\\\\\\"Set aClass as the limit class for this viewer, without side effects\\\\\\\"\\\\n\\\\n\\\\tself setProperty: #limitClass toValue: aClass\\\\n! !\\\\n\\\\n!StandardViewer methodsFor: 'categories' stamp: 'sw 12/11/2000 10:51'!\\\\nouterViewer\\\\n\\\\t\\\\\\\"Answer the StandardViewer or equivalent that contains this object\\\\\\\"\\\\n\\\\n\\\\t^ self! !\\\\n\\\\n!StandardViewer methodsFor: 'categories' stamp: 'di 2/19/2001 10:39'!\\\\nrecreateCategories\\\\n\\\\t\\\\\\\"To change from old to new tiles\\\\\\\"\\\\n\\\\t| cats |\\\\n\\\\tcats _ self categoriesCurrentlyShowing.\\\\n\\\\tself removeAllMorphsIn: self categoryMorphs.\\\\n\\\\tcats do: [:cat | self addCategoryViewerFor: cat]! !\\\\n\\\\n!StandardViewer methodsFor: 'categories' stamp: 'yo 4/4/2005 14:42'!\\\\nsearchingViewerMorphs\\\\n\\\\t^ self submorphsSatisfying: [:m | m isKindOf: SearchingViewer].! !\\\\n\\\\n!StandardViewer methodsFor: 'categories' stamp: 'sw 8/3/2001 18:31'!\\\\nsetLimitClass: aClass\\\\n\\\\t\\\\\\\"Set aClass as the limit class for this viewer\\\\\\\"\\\\n\\\\n\\\\tself limitClass: aClass.\\\\n\\\\tself relaunchViewer\\\\n! !\\\\n\\\\n!StandardViewer methodsFor: 'categories' stamp: 'sw 5/29/2001 22:43'!\\\\nsymbolsOfCategoriesCurrentlyShowing\\\\n\\\\t\\\\\\\"Answer the category symbols of my categoryMorphs\\\\\\\"\\\\n\\\\n\\\\t^ self categoryMorphs collect: [:m | m chosenCategorySymbol]! !\\\\n\\\\n\\\\n!StandardViewer methodsFor: 'classification' stamp: 'ar 6/30/2001 13:13'!\\\\nisStandardViewer\\\\n\\\\t^true! !\\\\n\\\\n\\\\n!StandardViewer methodsFor: 'debug and other' stamp: 'sw 6/20/2001 12:47'!\\\\nviewMorphDirectly\\\\n\\\\t\\\\\\\"Launch a new viewer to replace the receiver.\\\\\\\"\\\\n\\\\n\\\\tself delete.\\\\n\\\\tself presenter viewObjectDirectly: scriptedPlayer costume renderedMorph! !\\\\n\\\\n\\\\n!StandardViewer methodsFor: 'initialization' stamp: 'nk 9/2/2004 11:30'!\\\\naddHeaderMorphWithBarHeight: anInteger includeDismissButton: aBoolean\\\\n\\\\t\\\\\\\"Add the header morph to the receiver, using anInteger as a guide for its height, and if aBoolean is true, include a dismiss buton for it\\\\\\\"\\\\n\\\\n\\\\t| header aFont aButton aTextMorph nail wrpr costs headWrapper |\\\\n\\\\theader _ AlignmentMorph newRow color: self color muchLighter; wrapCentering: #center; cellPositioning: #leftCenter.\\\\n\\\\taFont _ Preferences standardButtonFont.\\\\n\\\\taBoolean ifTrue:\\\\n\\\\t\\\\t[aButton _ self tanOButton.\\\\n\\\\t\\\\theader addMorph: aButton.\\\\n\\\\t\\\\taButton target: self;\\\\n\\\\t\\\\t\\\\t\\\\tactionSelector: #dismiss;\\\\n\\\\t\\\\t\\\\t\\\\tsetBalloonText: 'remove this entire Viewer from the screen\\\\ndon''t worry -- nothing will be lost!!.' translated.\\\\n\\\\t\\\\theader addTransparentSpacerOfSize: 4@1].\\\\n\\\\n\\\\taButton _ IconicButton new borderWidth: 0;\\\\n\\\\t\\\\t\\\\tlabelGraphic: (ScriptingSystem formAtKey: #AddCategoryViewer); color: Color transparent; \\\\n\\\\t\\\\t\\\\tactWhen: #buttonDown;\\\\n\\\\t\\\\t\\\\ttarget: self;\\\\n\\\\t\\\\t\\\\tactionSelector: #addCategoryViewer;\\\\n\\\\t\\\\t\\\\tsetBalloonText: 'click here to add\\\\nanother category pane' translated;\\\\n\\\\t\\\\t\\\\tshedSelvedge.\\\\n\\\\theader addMorphBack: aButton.\\\\n\\\\theader addTransparentSpacerOfSize: 4@1.\\\\n\\\\n\\\\tcosts _ scriptedPlayer costumes.\\\\n\\\\tcosts ifNotNil:\\\\n\\\\t[(costs size > 1 or: [costs size = 1 and: [costs first ~~ scriptedPlayer costume]]) ifTrue:\\\\n\\\\t\\\\t[header addUpDownArrowsFor: self.\\\\n\\\\t\\\\t(wrpr _ header submorphs last) submorphs second setBalloonText: 'switch to previous costume' translated.\\\\t\\\\n\\\\t\\\\twrpr submorphs first  setBalloonText: 'switch to next costume' translated]].\\\\t\\\\n\\\\n\\\\tnail _ (self hasProperty: #noInteriorThumbnail)\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[ThumbnailMorph new objectToView: scriptedPlayer viewSelector: #costume]\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[ImageMorph new image: Cursor menu].\\\\n\\\\tnail on: #mouseDown send: #offerViewerMenuForEvt:morph: to: scriptedPlayer.\\\\n\\\\theader addMorphBack: nail.\\\\n\\\\tnail setBalloonText: 'click here to get a menu\\\\nthat will allow you to\\\\nadd a variable,\\\\ntear off a tile, etc..' translated.\\\\n\\\\t(self hasProperty: #noInteriorThumbnail)\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[nail borderWidth: 3; borderColor: #raised].\\\\n\\\\n\\\\theader addTransparentSpacerOfSize: 5@5.\\\\n\\\\n\\\\\\\"\\\\taButton _ SimpleButtonMorph new target: self; actionSelector: #newEmptyScript; label: 'S' translated font: (aFont _ StrikeFont familyName: #ComicBold size: 16);  color: Color transparent; borderWidth: 0; actWhen: #buttonDown.\\\\n\\\\taButton setBalloonText: 'drag from here to\\\\ncreate a new script\\\\nfor this object' translated.\\\\t\\\\n\\\\theader addMorphBack: aButton.\\\\n\\\\n\\\\theader addTransparentSpacerOfSize: 8@5.\\\\\\\"\\\\n\\\\t\\\\n\\\\taButton _ SimpleButtonMorph new target: scriptedPlayer; actionSelector: #addInstanceVariable; label: 'v' translated font: (aFont emphasized: 1);  color: Color transparent; borderWidth: 1; actWhen: #buttonUp.\\\\n\\\\t\\\\\\\"aButton firstSubmorph color: Color gray.\\\\\\\"\\\\n\\\\taButton setBalloonText: 'click here to add a variable\\\\nto this object.' translated.\\\\n\\\\theader addMorphBack: aButton.\\\\n\\\\n\\\\theader addTransparentSpacerOfSize: 5@5.\\\\n\\\\tself viewsMorph ifTrue: [scriptedPlayer costume assureExternalName].\\\\n\\\\taTextMorph _ UpdatingStringMorph new\\\\n\\\\t\\\\tuseStringFormat;\\\\n\\\\t\\\\ttarget:  scriptedPlayer;\\\\n\\\\t\\\\tgetSelector: #nameForViewer;\\\\n\\\\t\\\\tsetNameTo: 'name';\\\\n\\\\t\\\\tfont: ScriptingSystem fontForNameEditingInScriptor.\\\\n\\\\tself viewsMorph ifTrue:\\\\n\\\\t\\\\t[aTextMorph putSelector: #setName:.\\\\n\\\\t\\\\taTextMorph setProperty: #okToTextEdit toValue: true].\\\\n\\\\taTextMorph step.\\\\n\\\\theader  addMorphBack: aTextMorph.\\\\n\\\\taTextMorph setBalloonText: 'Click here to edit the player''s name.' translated.\\\\t\\\\n\\\\n\\\\theader beSticky.\\\\n\\\\tanInteger > 0\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[headWrapper _ AlignmentMorph newColumn color: self color.\\\\n\\\\t\\\\t\\\\theadWrapper addTransparentSpacerOfSize: (0 @ anInteger).\\\\n\\\\t\\\\t\\\\theadWrapper addMorphBack: header.\\\\n\\\\t\\\\t\\\\tself addMorph: headWrapper]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self addMorph: header]! !\\\\n\\\\n!StandardViewer methodsFor: 'initialization' stamp: 'gm 2/22/2003 13:44'!\\\\naffordsUniclass\\\\n\\\\t\\\\\\\"Answer true iff the receiver operates on behalf of an object that is, or could become, a member of a Uniclass\\\\\\\"\\\\n\\\\n\\\\t| viewee |\\\\n\\\\t^(viewee := self objectViewed) belongsToUniClass or: \\\\n\\\\t\\\\t\\\\t[((viewee isInteger) not and: [viewee isBehavior not]) \\\\n\\\\t\\\\t\\\\t\\\\tand: [self userLevel > 0]]! !\\\\n\\\\n!StandardViewer methodsFor: 'initialization' stamp: 'ar 6/30/2001 13:23'!\\\\nfitFlap\\\\n\\\\t(owner notNil and:[owner isFlap]) ifTrue:[\\\\n\\\\t\\\\towner width < self fullBounds width ifTrue:[\\\\n\\\\t\\\\t\\\\towner assureFlapWidth: self fullBounds width + 25.\\\\n\\\\t\\\\t].\\\\n\\\\t].! !\\\\n\\\\n!StandardViewer methodsFor: 'initialization' stamp: 'sw 12/23/1998 23:26'!\\\\ninitialHeightToAllow\\\\n\\\\t^ 300! !\\\\n\\\\n!StandardViewer methodsFor: 'initialization' stamp: 'sw 6/25/1999 23:04'!\\\\ninitializeFor: aPlayer barHeight: anInteger\\\\n\\\\t^ self initializeFor: aPlayer barHeight: anInteger includeDismissButton: true! !\\\\n\\\\n!StandardViewer methodsFor: 'initialization' stamp: 'sw 8/4/2000 13:02'!\\\\ninitializeFor: aPlayer barHeight: anInteger includeDismissButton: aBoolean\\\\n\\\\tself initializeFor: aPlayer barHeight: anInteger includeDismissButton: aBoolean showCategories: nil! !\\\\n\\\\n!StandardViewer methodsFor: 'initialization' stamp: 'yo 8/18/2005 13:43'!\\\\ninitializeFor: aPlayer barHeight: anInteger includeDismissButton: aBoolean showCategories: categoryInfo\\\\n\\\\t\\\\\\\"Initialize the receiver to be a look inside the given Player.  The categoryInfo, if present, describes which categories should be present in it, in which order\\\\\\\"\\\\n\\\\n\\\\tscriptedPlayer _ aPlayer.\\\\n\\\\tself listDirection: #topToBottom;\\\\n\\\\t\\\\thResizing: #shrinkWrap;\\\\n\\\\t\\\\tvResizing: #shrinkWrap;\\\\n\\\\t\\\\tborderWidth: 1.\\\\n\\\\tself color: self standardViewerColor.\\\\n\\\\tself addHeaderMorphWithBarHeight: anInteger includeDismissButton: aBoolean.\\\\n\\\\n\\\\tcategoryInfo isEmptyOrNil\\\\n\\\\t\\\\tifFalse:  \\\\\\\"Reincarnating an pre-existing list\\\\\\\"\\\\n\\\\t\\\\t\\\\t[categoryInfo do:\\\\n\\\\t\\\\t\\\\t\\\\t[:aCat | self addCategoryViewerFor: aCat]]\\\\n\\\\t\\\\tifTrue:  \\\\\\\"starting fresh\\\\\\\"\\\\n\\\\t\\\\t\\\\t[self addSearchPane. \\\\n\\\\t\\\\t\\\\tself addCategoryViewer.\\\\n\\\\t\\\\t\\\\tself addCategoryViewer.\\\\n\\\\t\\\\t\\\\t(scriptedPlayer costume isMemberOf: KedamaMorph) ifTrue: [self addCategoryViewer].\\\\n\\\\t\\\\t].! !\\\\n\\\\n!StandardViewer methodsFor: 'initialization' stamp: 'sw 6/4/2001 18:06'!\\\\nrawVocabulary: aVocabulary\\\\n\\\\t\\\\\\\"Mark the receiver as having aVocabulary as its vocabulary\\\\\\\"\\\\n\\\\n\\\\tself setProperty: #currentVocabularySymbol toValue: aVocabulary vocabularyName! !\\\\n\\\\n!StandardViewer methodsFor: 'initialization' stamp: 'nk 8/29/2004 17:18'!\\\\nswitchToVocabulary: aVocabulary\\\\n\\\\t\\\\\\\"Make the receiver show categories and methods as dictated by aVocabulary.  If this constitutes a switch, then wipe out existing category viewers, which may be showing the wrong thing.\\\\\\\"\\\\n\\\\n\\\\tself adoptVocabulary: aVocabulary.  \\\\\\\"for benefit of submorphs\\\\\\\"\\\\n\\\\tself setProperty: #currentVocabularySymbol toValue: aVocabulary vocabularyName.\\\\n\\\\t((scriptedPlayer isPlayerLike) and: [self isUniversalTiles not]) ifTrue:\\\\n\\\\t\\\\t[scriptedPlayer allScriptEditors do:\\\\n\\\\t\\\\t\\\\t[:aScriptEditor |\\\\n\\\\t\\\\t\\\\t\\\\taScriptEditor adoptVocabulary: aVocabulary]]! !\\\\n\\\\n!StandardViewer methodsFor: 'initialization' stamp: 'sw 6/4/2001 19:40'!\\\\nuseVocabulary: aVocabulary\\\\n\\\\t\\\\\\\"Make the receiver show categories and methods as dictated by aVocabulary\\\\\\\"\\\\n\\\\n\\\\t| itsName |\\\\n\\\\t((self valueOfProperty: #currentVocabularySymbol ifAbsent: [nil]) == (itsName _ aVocabulary vocabularyName)) ifFalse:\\\\n\\\\t\\\\t[self setProperty: #currentVocabularySymbol toValue: itsName.\\\\n\\\\t\\\\tself removeProperty: #currentVocabulary.  \\\\\\\"grandfathered\\\\\\\"\\\\n\\\\t\\\\t(self submorphs select: [:m | m isKindOf: CategoryViewer]) do: [:m | m delete]]! !\\\\n\\\\n!StandardViewer methodsFor: 'initialization' stamp: 'sw 10/26/2000 09:42'!\\\\nuserLevel\\\\n\\\\t\\\\\\\"Answer the user level for this viewer, which can be used in figuring out what to display in the viewer.  Initially, we make little use of this, but in past prototypes, and in future deployments, it may be handy.\\\\\\\"\\\\n\\\\n\\\\t^ self valueOfProperty: #userLevel ifAbsent: [1]! !\\\\n\\\\n!StandardViewer methodsFor: 'initialization' stamp: 'nk 8/29/2004 17:18'!\\\\nviewsMorph\\\\n\\\\t\\\\\\\"Answer whether the receiver views a morph.  Traditional viewers up until late 2000 *all* viewed morphs (as per the morph/player architecture), but viewers on non-morph/players have now become possible\\\\\\\"\\\\n\\\\n\\\\t^ scriptedPlayer isPlayerLike! !\\\\n\\\\n\\\\n!StandardViewer methodsFor: 'macpal' stamp: 'sw 6/4/2001 18:05'!\\\\ncurrentVocabulary\\\\n\\\\t\\\\\\\"Answer the vocabulary currently associated with the receiver\\\\\\\"\\\\n\\\\n\\\\t| aSym aVocab |\\\\n\\\\taSym _ self valueOfProperty: #currentVocabularySymbol ifAbsent: [nil].\\\\n\\\\taSym ifNil:\\\\n\\\\t\\\\t[aVocab _ self valueOfProperty: #currentVocabulary ifAbsent: [nil].\\\\n\\\\t\\\\taVocab ifNotNil:\\\\n\\\\t\\\\t\\\\t[aSym _ aVocab vocabularyName.\\\\n\\\\t\\\\t\\\\tself removeProperty: #currentVocabulary.\\\\n\\\\t\\\\t\\\\tself setProperty: #currentVocabularySymbol toValue: aSym]].\\\\n\\\\t^ aSym\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t[Vocabulary vocabularyNamed: aSym]\\\\n\\\\t\\\\tifNil:\\\\n\\\\t\\\\t\\\\t[(self world ifNil: [ActiveWorld]) currentVocabularyFor: scriptedPlayer]! !\\\\n\\\\n\\\\n!StandardViewer methodsFor: 'user interface' stamp: 'sw 10/25/1999 22:08'!\\\\ndismiss\\\\n\\\\t| aFlapTab |\\\\n\\\\t\\\\\\\"User hit the dismiss button.\\\\\\\"\\\\n\\\\t(owner isKindOf: TabbedPalette)\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[^ owner showNoPalette].\\\\n\\\\t(aFlapTab _ self pasteUpMorph correspondingFlapTab) ifNotNil:\\\\n\\\\t\\\\t[^ aFlapTab dismissViaHalo].\\\\n\\\\tself topRendererOrSelf delete! !\\\\n\\\\n!StandardViewer methodsFor: 'user interface' stamp: 'sw 10/24/1998 14:34'!\\\\ndownArrowHit\\\\n\\\\tself nextCostume! !\\\\n\\\\n!StandardViewer methodsFor: 'user interface' stamp: 'sw 10/26/1999 01:07'!\\\\nhasDismissButton\\\\n\\\\tsubmorphs isEmptyOrNil ifTrue: [^ false].\\\\n\\\\t^ (submorphs first allMorphs detect:\\\\n\\\\t\\\\t[:possible |  (possible isKindOf: SimpleButtonMorph) and: [possible actionSelector == #dismiss]]\\\\n\\\\t\\\\t\\\\tifNone: [nil]) notNil! !\\\\n\\\\n!StandardViewer methodsFor: 'user interface' stamp: 'sw 5/18/2001 10:46'!\\\\nopenLexicon\\\\n\\\\t\\\\\\\"Open a lexicon browser on the receiver, showing its current vocabulary\\\\\\\"\\\\n\\\\n\\\\t| littleHim | \\\\n\\\\tlittleHim _ scriptedPlayer assureUniClass.\\\\n\\\\n\\\\t(InstanceBrowser new useVocabulary: self currentVocabulary) openOnObject: littleHim  inWorld: ActiveWorld showingSelector: nil! !\\\\n\\\\n!StandardViewer methodsFor: 'user interface' stamp: 'sw 4/20/2001 21:22'!\\\\nrelaunchViewer\\\\n\\\\t\\\\\\\"Launch a new viewer to replace the receiver.\\\\\\\"\\\\n\\\\n\\\\tself presenter updateViewer: self forceToShow: nil! !\\\\n\\\\n!StandardViewer methodsFor: 'user interface' stamp: 'sw 12/23/1998 22:45'!\\\\nstandardViewerColor\\\\n\\\\t ^ Color r: 0.572 g: 0.883 b: 0.572! !\\\\n\\\\n!StandardViewer methodsFor: 'user interface' stamp: 'sw 10/24/1998 14:33'!\\\\nupArrowHit\\\\n\\\\tself previousCostume! !\\\\nPolygonMorph subclass: #StarMorph\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-Widgets'!\\\\n!StarMorph commentStamp: 'wiz 9/6/2005 12:30' prior: 0!\\\\nI am a very flexible star..\\\\n\\\\nGrab me from the supplies flap or from the graphic objects.\\\\nAdd my handles and you can move and resize me.\\\\nThe up and down arrows increase or reduce the number of my sides.\\\\nThe right and left arrows cycle thru different amounts of  pointiness.\\\\n\\\\n\\\\nUse the arrows right and left of my center or get stars with a specific amount of pointyness.  The left side goes from fat to thin and then cycles around again. The right goes from thin to fat. Hold down the shift key if you wish to stop the cycling at the extremes.\\\\n\\\\nUse the arrows up and down to change the number of sides if you would like a different number of points.\\\\n\\\\nTo add or remove just one side hold the shift key down as you use the arrows or use the menu items for that purpose.\\\\n\\\\n\\\\nIf you add or remove just one point I will have an odd number of sides.  When that happens I can only look like a regular polygon. The right and left arrows will have no effect.  Add or remove just one more side and you can shift drag the outer handle or use the arrows to restore my pointiness. \\\\n\\\\nThat was too complicated. It is gone. You can get regular polygon shapes by adjusting my pointiness. For example the extreme of a five pointed star is a dodecahedron (10 sided regular polygon) and one step less extreme is a pentagon (5 sided regular polygon).\\\\n\\\\n\\\\nAt some time you will probably shift drag the outer handle thru the center handle.\\\\nWhile I looked round as you shrunk me, I will look very much like an asterisk as you pull me away.  What happens is that inside bend shrunk on the way down because it can never be larger than the outer point (or it wouldn't be the innerbend would it).\\\\nBut on the way out it is perfectly happy to remain small. So I look like an asterisk.\\\\n\\\\nTo fatten me up  (if you haven't already figured this out by fooling around)  hold the shift down an move the outer handle towards the center (but not quite all the way) then let the shift up and move the outer handle away.  A couple of cycles like this and I'll be looking fat and jolly again. Or you can now just use the right arrow to make me fatter.\\\\n\\\\nThis is also the reason I don't let the inside bend get larger than the outer point.\\\\nIf I did the same process that fattened me when I was an asterisk would also grow an asterisk so large squeak would complain about not having enough memory.\\\\n\\\\nHistorical note:\\\\n\\\\nThe former star had two bugs that are fixed here.\\\\nThe outer handle now no longer jumps from one point to another.\\\\nThe other bug prevented some higher order stars from looking right. \\\\nWhich is why the former star didn't allow you to change the number of points. !\\\\n\\\\n\\\\n!StarMorph methodsFor: 'access' stamp: 'wiz 1/11/2005 03:58'!\\\\nskipRatios\\\\n\\\\\\\"Return an array of  ratios  of the inner radius to the outer radius.\\\\nRatios are in ascending order from 0.0 to 1.0.\\\\\\\"\\\\n\\\\\\\"Assume we have at least one vertex.\\\\nAll ways return a number <= 1.0\\\\\\\"\\\\n\\\\n| n  alpha  |\\\\n\\\\\\\"Odd vertices sizes can not be stars only regular polygons\\\\\\\"\\\\nn:= vertices size . n odd ifTrue: [ ^ #(  1.0) ] .\\\\n\\\\nalpha := Float pi / (n//2)  asFloat .\\\\n\\\\n^ ((((    Float halfPi -alpha  to: alpha /2.0  by: alpha  negated ) \\\\n\\\\tcollect:  [:angle |( (angle) sin )/\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(angle + alpha ) sin ]\\\\n\\\\t) copyWith: 0.0) copyWithFirst: 1.0) reversed .! !\\\\n\\\\n!StarMorph methodsFor: 'access' stamp: 'wiz 1/4/2005 20:14'!\\\\nstarRatio\\\\n\\\\\\\"Return the ratio of the inner radius to the outer radius.\\\\\\\"\\\\n\\\\\\\"Assume we have at least one vertex.\\\\nAll ways return a number <= 1.0\\\\\\\"\\\\n| r c |\\\\nc := vertices average rounded .\\\\nr := (c dist: vertices last) / (c dist:  vertices first)  .\\\\n^ r > 1.0  ifTrue: [  r reciprocal ] ifFalse: [r ] .! !\\\\n\\\\n\\\\n!StarMorph methodsFor: 'accessing' stamp: 'wiz 1/4/2005 19:47'!\\\\nstarRatio: r\\\\n\\\\\\\"Set the star s.t. the ratio of the inner radius to the outer radius is r.\\\\nIf r is > 1 use the reciprocal to keep the outer radius first.\\\\\\\"\\\\n\\\\\\\"Assume we have at least one vertex.\\\\nset\\\\nAll ways return a number <= 1.0\\\\\\\"\\\\nself makeVertices: vertices size starRatio:( r > 1.0  ifTrue: [  r reciprocal ] ifFalse: [r ] ).! !\\\\n\\\\n\\\\n!StarMorph methodsFor: 'editing' stamp: 'wiz 12/15/2004 00:59'!\\\\naddHandles\\\\n\\\\tself addStarHandles! !\\\\n\\\\n!StarMorph methodsFor: 'editing' stamp: 'wiz 1/15/2005 00:20'!\\\\naddStarHandles\\\\n\\\\t\\\\\\\"Outer handle must not be blocked so it comes first. \\\\n\\\\tThe editing routine expects to find the center handle second.\\\\n\\\\tThe side and shape changing handles follow these.\\\\\\\"\\\\n\\\\t| center |\\\\n\\\\tself removeHandles.\\\\n\\\\t\\\\\\\"Check for old stars and correct order of vertices.\\\\\\\"\\\\n\\\\tself insureCompatability .\\\\n\\\\thandles := OrderedCollection new.\\\\n\\\\tcenter := vertices average rounded.\\\\n\\\\tself withCenterOuterHandles; withUpDownLeftRightHandlesAround: 6 center: center.\\\\n\\\\tself placeHandles.\\\\n\\\\tself changed.\\\\n\\\\t! !\\\\n\\\\n!StarMorph methodsFor: 'editing' stamp: 'wiz 9/5/2005 23:12'!\\\\nchangeVertices: label event: evt fromHandle: handle \\\\n\\\\t| |\\\\n\\\\tlabel == #more\\\\n\\\\t\\\\tifTrue: [evt shiftPressed\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self moreVertices \\\\\\\"not oneMoreVertex\\\\\\\"]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self moreVertices]].\\\\n\\\\tlabel == #less\\\\n\\\\t\\\\tifTrue: [evt shiftPressed\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self lessVertices \\\\\\\"not oneLessVertex\\\\\\\"]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self lessVertices]].\\\\n\\\\tlabel == #next\\\\n\\\\t\\\\tifTrue: [evt shiftPressed\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self makeVertices: vertices size starRatio: self nextSkip]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self makeVertices: vertices size starRatio: self nextTwinkleSkip]].\\\\n\\\\tlabel == #prev\\\\n\\\\t\\\\tifTrue: [evt shiftPressed\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self makeVertices: vertices size starRatio: self prevSkip]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self makeVertices: vertices size starRatio: self prevTwinkleSkip]].\\\\n\\\\tself computeBounds! !\\\\n\\\\n!StarMorph methodsFor: 'editing' stamp: 'wiz 1/20/2005 19:07'!\\\\ndragVertex: label event: evt fromHandle: handle \\\\n\\\\t| center r1 rN rNext a1 rTotal |\\\\n\\\\tlabel == #outside\\\\n\\\\t\\\\tifTrue: [center := handles second center.\\\\n\\\\t\\\\t\\\\tr1 := center dist: vertices first.\\\\n\\\\t\\\\t\\\\t\\\\\\\"Rounding and what happens as the outer handle\\\\n\\\\t\\\\t\\\\tapproached the center, \\\\n\\\\t\\\\t\\\\trequires we guard the inner radius \\\\n\\\\t\\\\t\\\\tfrom becoming larger than the outer radius.\\\\\\\"\\\\n\\\\t\\\\t\\\\trN := r1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmin: (center dist: vertices last).\\\\n\\\\t\\\\t\\\\trNext := 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmax: (center dist: evt cursorPoint).\\\\n\\\\t\\\\t\\\\ta1 := 270.0\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t+ (center bearingToPoint: evt cursorPoint).\\\\n\\\\t\\\\t\\\\trTotal := vertices size even\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [evt shiftPressed\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [rNext + rNext min: rNext + rN]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [r1 + rN * rNext / r1]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [rNext + rNext].\\\\n\\\\t\\\\t\\\\trNext := rTotal - rNext.\\\\n\\\\t\\\\t\\\\tvertices := ((a1 to: a1 + 359.999 by: 360.0 / vertices size)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcollect: [:angle | center\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t+ (Point r: (rNext := rTotal - rNext) degrees: angle)]) .\\\\n\\\\t\\\\t\\\\thandle align: handle center with: evt cursorPoint].\\\\n\\\\tlabel == #center\\\\n\\\\t\\\\tifTrue: [evt shiftPressed\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self updateFormFromUser]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self position: self position + (evt cursorPoint - handle center)]].\\\\n\\\\tself computeBounds! !\\\\n\\\\n!StarMorph methodsFor: 'editing' stamp: 'wiz 1/15/2005 00:19'!\\\\nplaceHandles\\\\n\\\\t\\\\\\\"Add the handles to my submorphs.\\\\\\\"\\\\n\\\\thandles reverseDo: [:each | self addMorphFront: each ] .\\\\n\\\\t\\\\n\\\\t! !\\\\n\\\\n!StarMorph methodsFor: 'editing' stamp: 'di 9/26/97 11:11'!\\\\nupdateHandles! !\\\\n\\\\n!StarMorph methodsFor: 'editing' stamp: 'wiz 1/11/2005 19:39'!\\\\nwithCenterOuterHandles\\\\n\\\\t\\\\\\\"Add to our handles the center positioning and outer resizing\\\\n\\\\thandles. Outer handle must not be blocked so it comes first. \\\\n\\\\tThe editing routine expects to find the center handle second.\\\\n\\\\tThe side and shape changing handles follow these.\\\\\\\"\\\\n\\\\t| center v1 hExtent holder |\\\\n\\\\tcenter := vertices average rounded.\\\\n\\\\thExtent := 8 @ 8.\\\\n\\\\tv1 := vertices first.\\\\n\\\\tholder := {(EllipseMorph\\\\n\\\\t\\\\t\\\\t\\\\tnewBounds: (Rectangle center: v1 extent: hExtent)\\\\n\\\\t\\\\t\\\\t\\\\tcolor: Color yellow)\\\\n\\\\t\\\\t\\\\t\\\\tsetBalloonText: 'Move me to adjust size. Shift move to adjust pointiness'. (EllipseMorph\\\\n\\\\t\\\\t\\\\t\\\\tnewBounds: (Rectangle center: center extent: hExtent)\\\\n\\\\t\\\\t\\\\t\\\\tcolor: Color yellow)\\\\n\\\\t\\\\t\\\\t\\\\tsetBalloonText: 'Move me to adjust position'}.\\\\n\\\\tholder\\\\n\\\\t\\\\twith: {#outside. #center}\\\\n\\\\t\\\\tdo: [:handle :which | handle\\\\n\\\\t\\\\t\\\\t\\\\ton: #mouseDown\\\\n\\\\t\\\\t\\\\t\\\\tsend: #dragVertex:event:fromHandle:\\\\n\\\\t\\\\t\\\\t\\\\tto: self\\\\n\\\\t\\\\t\\\\t\\\\twithValue: which;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\n\\\\t\\\\t\\\\t\\\\ton: #mouseMove\\\\n\\\\t\\\\t\\\\t\\\\tsend: #dragVertex:event:fromHandle:\\\\n\\\\t\\\\t\\\\t\\\\tto: self\\\\n\\\\t\\\\t\\\\t\\\\twithValue: which].\\\\n\\\\thandles addAll: holder! !\\\\n\\\\n!StarMorph methodsFor: 'editing' stamp: 'wiz 1/11/2005 19:47'!\\\\nwithUpDownLeftRightHandlesAround: radius center: center\\\\n\\\\t\\\\\\\"Add to our handles the side and shape changing handles.\\\\\\\"\\\\n\\\\t| tri  above holder  triAbove triBelow triRight triLeft |\\\\n\\\\tabove := 0 @ radius negated.\\\\n\\\\t\\\\n\\\\ttri := Array\\\\n\\\\t\\\\t\\\\t\\\\twith: 0 @ -5\\\\n\\\\t\\\\t\\\\t\\\\twith: 4 @ 3\\\\n\\\\t\\\\t\\\\t\\\\twith: -4 @ 3.\\\\n\\\\ttriAbove := tri + (center + above).\\\\n\\\\ttriBelow := triAbove\\\\n\\\\t\\\\t\\\\t\\\\tcollect: [:pt | pt rotateBy: #pi centerAt: center].\\\\n\\\\ttriRight := triAbove\\\\n\\\\t\\\\t\\\\t\\\\tcollect: [:pt | pt rotateBy: #right centerAt: center].\\\\n\\\\ttriLeft := triAbove\\\\n\\\\t\\\\t\\\\t\\\\tcollect: [:pt | pt rotateBy: #left centerAt: center].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\n\\\\tholder := { (PolygonMorph\\\\n\\\\t\\\\t\\\\t\\\\tvertices: triAbove\\\\n\\\\t\\\\t\\\\t\\\\tcolor: Color green\\\\n\\\\t\\\\t\\\\t\\\\tborderWidth: 1\\\\n\\\\t\\\\t\\\\t\\\\tborderColor: Color black)\\\\n\\\\t\\\\t\\\\t\\\\t setBalloonText: 'More points.'. \\\\n\\\\t\\\\t\\\\t\\\\t\\\\n\\\\t\\\\t\\\\t\\\\t(PolygonMorph\\\\n\\\\t\\\\t\\\\t\\\\tvertices: triBelow\\\\n\\\\t\\\\t\\\\t\\\\tcolor: Color magenta\\\\n\\\\t\\\\t\\\\t\\\\tborderWidth: 1\\\\n\\\\t\\\\t\\\\t\\\\tborderColor: Color black)\\\\n\\\\t\\\\t\\\\t\\\\t setBalloonText: 'Fewer points.'. \\\\n\\\\t\\\\t\\\\t\\\\t\\\\n\\\\t\\\\t\\\\t\\\\t(PolygonMorph\\\\n\\\\t\\\\t\\\\t\\\\tvertices: triRight\\\\n\\\\t\\\\t\\\\t\\\\tcolor: Color green\\\\n\\\\t\\\\t\\\\t\\\\tborderWidth: 1\\\\n\\\\t\\\\t\\\\t\\\\tborderColor: Color black)\\\\n\\\\t\\\\t\\\\t\\\\t setBalloonText: 'Twinkle fatter.'. \\\\n\\\\t\\\\t\\\\t\\\\t\\\\n\\\\t\\\\t\\\\t\\\\t(PolygonMorph\\\\n\\\\t\\\\t\\\\t\\\\tvertices: triLeft\\\\n\\\\t\\\\t\\\\t\\\\tcolor: Color magenta\\\\n\\\\t\\\\t\\\\t\\\\tborderWidth: 1\\\\n\\\\t\\\\t\\\\t\\\\tborderColor: Color black)\\\\n\\\\t\\\\t\\\\t\\\\t setBalloonText: 'Twinkle thinner.'}.\\\\n\\\\t\\\\n\\\\tholder\\\\n\\\\t\\\\twith: {#more. #less. #next. #prev}\\\\n\\\\t\\\\tdo: [:handle :which | handle\\\\n\\\\t\\\\t\\\\t\\\\ton: #mouseDown\\\\n\\\\t\\\\t\\\\t\\\\tsend: #changeVertices:event:fromHandle:\\\\n\\\\t\\\\t\\\\t\\\\tto: self\\\\n\\\\t\\\\t\\\\t\\\\twithValue: which;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\n\\\\t\\\\t\\\\t\\\\ton: #mouseMove\\\\n\\\\t\\\\t\\\\t\\\\tsend: #changeVertices:event:fromHandle:\\\\n\\\\t\\\\t\\\\t\\\\tto: self\\\\n\\\\t\\\\t\\\\t\\\\twithValue: which].\\\\n\\\\t^ handles addAll: holder! !\\\\n\\\\n\\\\n!StarMorph methodsFor: 'geometry' stamp: 'wiz 1/19/2005 22:34'!\\\\nnextSkip\\\\n\\\\t\\\\\\\"Set starRatio to next skip wrapping if needed.\\\\\\\"\\\\n\\\\t| skips n c r1 rN |\\\\n\\\\tc := vertices average rounded.\\\\n\\\\tr1 := (c dist: vertices first) truncated asFloat.\\\\n\\\\trN := c dist: vertices last.\\\\n\\\\tskips := self skipRatios.\\\\n\\\\tn := skips * r1\\\\n\\\\t\\\\t\\\\t\\\\tfindFirst: [:r | r > (rN + 1.0)].\\\\n\\\\t\\\\\\\"n = 0\\\\n\\\\t\\\\tifTrue: [n := skips size].\\\\\\\"\\\\n\\\\t^ skips atWrap: n! !\\\\n\\\\n!StarMorph methodsFor: 'geometry' stamp: 'wiz 1/19/2005 22:42'!\\\\nnextTwinkleSkip\\\\n\\\\t\\\\\\\"Set starRatio to next skip wrapping if needed.\\\\\\\"\\\\n\\\\t| skips n c r1 rN |\\\\n\\\\tc := vertices average rounded.\\\\n\\\\tr1 := (c dist: vertices first) truncated asFloat.\\\\n\\\\trN := c dist: vertices last.\\\\n\\\\tskips := self skipRatios.\\\\n\\\\tn := skips * r1\\\\n\\\\t\\\\t\\\\t\\\\tfindFirst: [:r | r > (rN + 1.0)].\\\\n\\\\tn = 0\\\\n\\\\t\\\\tifTrue: [ n := 1].\\\\n\\\\t^ skips atWrap: n! !\\\\n\\\\n!StarMorph methodsFor: 'geometry' stamp: 'wiz 1/19/2005 22:41'!\\\\nprevSkip\\\\n\\\\t\\\\\\\"Set starRatio to next skip wrapping if necessary\\\\\\\"\\\\n\\\\t| skips n c r1 rN |\\\\n\\\\tc := vertices average rounded.\\\\n\\\\tr1 := c dist: vertices first.\\\\n\\\\trN := (c dist: vertices last) truncated asFloat.\\\\n\\\\tskips := self skipRatios.\\\\n\\\\tn := skips * r1\\\\n\\\\t\\\\t\\\\t\\\\tfindLast: [:r | r + 1.0 < rN].\\\\n\\\\tn = 0\\\\n\\\\t\\\\tifTrue: [n := 1].\\\\n\\\\t^ skips at: n! !\\\\n\\\\n!StarMorph methodsFor: 'geometry' stamp: 'wiz 1/19/2005 22:19'!\\\\nprevTwinkleSkip\\\\n\\\\t\\\\\\\"Set starRatio to next skip wrapping if necessary\\\\\\\"\\\\n\\\\t| skips n c r1 rN |\\\\n\\\\tc := vertices average rounded.\\\\n\\\\tr1 := c dist: vertices first.\\\\n\\\\trN := (c dist: vertices last) truncated asFloat.\\\\n\\\\tskips := self skipRatios.\\\\n\\\\tn := skips * r1\\\\n\\\\t\\\\t\\\\t\\\\tfindLast: [:r | r + 1.0 < rN].\\\\n\\\\t\\\\\\\"n = 0\\\\n\\\\tifTrue: [^ oldR].\\\\\\\"\\\\n\\\\t^ skips atWrap: n! !\\\\n\\\\n\\\\n!StarMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:35'!\\\\ndefaultBorderColor\\\\n\\\\t\\\\\\\"answer the default border color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color black! !\\\\n\\\\n!StarMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:40'!\\\\ndefaultBorderWidth\\\\n\\\\t\\\\\\\"answer the default border width for the receiver\\\\\\\"\\\\n\\\\t^ 1! !\\\\n\\\\n!StarMorph methodsFor: 'initialization' stamp: 'wiz 1/11/2005 14:33'!\\\\ndefaultCenter\\\\n\\\\t\\\\\\\"answer the default center for the receiver\\\\\\\"\\\\n\\\\t^ 0 asPoint! !\\\\n\\\\n!StarMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:31'!\\\\ndefaultColor\\\\n\\\\t\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color lightBlue! !\\\\n\\\\n!StarMorph methodsFor: 'initialization' stamp: 'wiz 1/11/2005 14:33'!\\\\ndefaultFirstVertex\\\\n\\\\t\\\\\\\"answer the default first outer point for the receiver.\\\\n\\\\tThis with the center determines the angle and size of the outer radius.\\\\\\\"\\\\n\\\\t^ 10 asPoint! !\\\\n\\\\n!StarMorph methodsFor: 'initialization' stamp: 'wiz 1/11/2005 14:28'!\\\\ndefaultSides\\\\n\\\\t\\\\\\\"answer the default number of sides for the receiver\\\\\\\"\\\\n\\\\t^ 10! !\\\\n\\\\n!StarMorph methodsFor: 'initialization' stamp: 'wiz 1/11/2005 14:29'!\\\\ndefaultStarRatio\\\\n\\\\t\\\\\\\"answer the default ratio of outer radius to inner radius for the receiver\\\\\\\"\\\\n\\\\t^ 5.0 / 12.0! !\\\\n\\\\n!StarMorph methodsFor: 'initialization' stamp: 'wiz 1/11/2005 14:36'!\\\\ninitialize\\\\n\\\\t\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\tself\\\\n\\\\t\\\\tmakeVertices: self defaultSides\\\\n\\\\t\\\\tstarRatio: self defaultStarRatio\\\\n\\\\t\\\\twithCenter: self defaultCenter\\\\n\\\\t\\\\twithPoint: self defaultFirstVertex.\\\\n\\\\tself computeBounds! !\\\\n\\\\n!StarMorph methodsFor: 'initialization' stamp: 'wiz 1/9/2005 20:15'!\\\\ninsureCompatability\\\\n\\\\\\\"The old stars had the point on the second not the first vertex. So we need to check for this special case.\\\\\\\"\\\\n | c v1 v2 |\\\\nc := vertices average rounded.\\\\n v1 := vertices first .\\\\n v2 := vertices second .\\\\n(c dist: v1) + 0.001 < (c dist: v2) ifTrue: [vertices := vertices allButFirst copyWith: v1]\\\\n\\\\n! !\\\\n\\\\n!StarMorph methodsFor: 'initialization' stamp: 'wiz 12/30/2004 02:57'!\\\\nmakeVertices: nSides \\\\n\\\\t\\\\\\\"Assuming vertices has at least one point, make a new star \\\\n\\\\tor regular polygon (for odd sided polygons).\\\\n\\\\tThe center of the polygon and the first vertex remain in\\\\n\\\\tplace. The inner distances for stars remain the same also if\\\\n\\\\tpossible.\\\\\\\"\\\\n\\\\t| center r1 rN rNext a1 rTotal |\\\\n\\\\tcenter := vertices average rounded.\\\\n\\\\tr1 := center dist: vertices first.\\\\n\\\\trN := center dist: vertices last.\\\\n\\\\trNext := 1 max: r1.\\\\n\\\\ta1 := 270.0\\\\n\\\\t\\\\t\\\\t\\\\t+ (center bearingToPoint: vertices first).\\\\n\\\\trTotal := nSides even\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [rNext + rNext min: rNext + rN]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [rNext + rNext].\\\\n\\\\trNext := rTotal - rNext.\\\\n\\\\tself changed .\\\\n\\\\tvertices := (a1 to: a1 + 359.999 by: 360.0 / nSides)\\\\n\\\\t\\\\t\\\\t\\\\tcollect: [:angle | center\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t+ (Point r: (rNext := rTotal - rNext) degrees: angle)].\\\\n\\\\tself computeBounds.\\\\n\\\\tself changed! !\\\\n\\\\n!StarMorph methodsFor: 'initialization' stamp: 'wiz 1/4/2005 19:31'!\\\\nmakeVertices: nSides starRatio: fraction\\\\n\\\\t\\\\\\\"Assuming vertices has at least one point, make a new star \\\\n\\\\tor regular polygon (for odd sided polygons).\\\\n\\\\tThe center of the polygon and the first vertex remain in\\\\n\\\\tplace. The inner distances for stars remain the same also if\\\\n\\\\tpossible.\\\\\\\"\\\\n\\\\t| center r1 rN rNext a1 rTotal |\\\\n\\\\tcenter := vertices average rounded.\\\\n\\\\tr1 := center dist: vertices first.\\\\n\\\\trNext := 1 max: r1.\\\\n\\\\trN := (1.0 min: fraction) * rNext.\\\\n\\\\ta1 := 270.0\\\\n\\\\t\\\\t\\\\t\\\\t+ (center bearingToPoint: vertices first).\\\\n\\\\trTotal := nSides even\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [rNext + rNext min: rNext + rN]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [rNext + rNext].\\\\n\\\\trNext := rTotal - rNext.\\\\n\\\\tself changed .\\\\n\\\\tvertices := (a1 to: a1 + 359.999 by: 360.0 / nSides)\\\\n\\\\t\\\\t\\\\t\\\\tcollect: [:angle | center\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t+ (Point r: (rNext := rTotal - rNext) degrees: angle)].\\\\n\\\\tself computeBounds.\\\\n\\\\tself changed! !\\\\n\\\\n!StarMorph methodsFor: 'initialization' stamp: 'wiz 1/11/2005 21:36'!\\\\nmakeVertices: nSides starRatio: fraction withCenter: center withPoint: aPoint \\\\n\\\\t\\\\\\\"Make a new star or regular polygon (for odd sided polygons).\\\\n\\\\tThis makes star vertices from scratch without any feedback from existing vertices.\\\\\\\"\\\\n\\\\t| r1 rN rNext a1 rTotal |\\\\n\\\\tr1 := center dist: aPoint.\\\\n\\\\trNext := 1 max: r1.\\\\n\\\\trN := (1.0 min: fraction)\\\\n\\\\t\\\\t\\\\t\\\\t* rNext.\\\\n\\\\ta1 := 270.0\\\\n\\\\t\\\\t\\\\t\\\\t+ (center bearingToPoint: aPoint).\\\\n\\\\trTotal := nSides even\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [rNext + rNext min: rNext + rN]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [rNext + rNext].\\\\n\\\\trNext := rTotal - rNext.\\\\n\\\\tself changed.\\\\n\\\\tvertices := (a1 to: a1 + 359.999 by: 360.0 / nSides)\\\\n\\\\t\\\\t\\\\t\\\\tcollect: [:angle | center\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t+ (Point r: (rNext := rTotal - rNext) degrees: angle)].\\\\n\\\\tself computeBounds.\\\\n\\\\tself changed! !\\\\n\\\\n\\\\n!StarMorph methodsFor: 'menu' stamp: 'wiz 9/5/2005 23:08'!\\\\naddChangeSidesMenuItems: aCustomMenu hand: aHandMorph \\\\n\\\\t\\\\\\\"Menu items to change number of sides.\\\\\\\"\\\\n\\\\taCustomMenu addLine.\\\\n\\\\taCustomMenu add: 'more sides' translated action: #moreVertices.\\\\n\\\\taCustomMenu add: 'fewer sides' translated action: #lessVertices.\\\\n\\\\\\\"\\\\tRegular polygons can be simulated with the one of the skip stars \\\\n\\\\tand it would confuse users to have stars be limited to Regular polygons.\\\\n\\\\tSo we've removed those menu items - wiz\\\\\\\"\\\\n\\\\\\\"\\\\taCustomMenu add: 'one more side' translated action: #oneMoreVertex.\\\\n\\\\taCustomMenu add: 'one fewer side' translated action: #oneLessVertex\\\\\\\"! !\\\\n\\\\n!StarMorph methodsFor: 'menu' stamp: 'wiz 1/11/2005 14:55'!\\\\naddCustomMenuItems: aCustomMenu hand: aHandMorph \\\\n\\\\tsuper addCustomMenuItems: aCustomMenu hand: aHandMorph.\\\\nself addChangeSidesMenuItems: aCustomMenu hand: aHandMorph.\\\\nself addTwinkleMenuItems: aCustomMenu hand: aHandMorph.\\\\n\\\\t! !\\\\n\\\\n!StarMorph methodsFor: 'menu' stamp: 'wiz 1/11/2005 20:38'!\\\\naddTwinkleMenuItems: aCustomMenu hand: aHandMorph \\\\n\\\\t\\\\\\\"Menu items to change the sharpness of the star.\\\\\\\"\\\\n\\\\taCustomMenu addLine.\\\\n\\\\taCustomMenu add: 'twinkle fatter' translated action: #nextTwinkle.\\\\n\\\\taCustomMenu add: 'twinkle thinner' translated action: #prevTwinkle.\\\\n\\\\\\\"\\\\taCustomMenu add: 'fatter star' translated action: #nextFatter.\\\\n\\\\taCustomMenu add: 'thinner star' translated action: #prevThinner\\\\\\\"\\\\n\\\\t\\\\n\\\\t\\\\n\\\\n\\\\n! !\\\\n\\\\n!StarMorph methodsFor: 'menu' stamp: 'wiz 12/11/2004 16:45'!\\\\noneLessVertex\\\\n\\\\tself\\\\n\\\\t\\\\tmakeVertices: (3 max: 1 negated + vertices size)! !\\\\n\\\\n!StarMorph methodsFor: 'menu' stamp: 'wiz 12/11/2004 16:46'!\\\\noneMoreVertex\\\\n\\\\tself makeVertices: 1 + vertices size! !\\\\n\\\\n\\\\n!StarMorph methodsFor: 'menus' stamp: 'wiz 12/12/2004 16:43'!\\\\nlessVertices\\\\n\\\\\\\"Reduce the number of points by one until we are  a diamond. If odd reduce the number of sides by two until we become a triangle. See class comment.\\\\\\\"\\\\n\\\\t| nVerts |\\\\n\\\\t( nVerts := 2 negated + vertices size) < 3 ifFalse: [\\\\n\\\\tself\\\\n\\\\t\\\\tmakeVertices: nVerts]! !\\\\n\\\\n!StarMorph methodsFor: 'menus' stamp: 'wiz 12/11/2004 16:45'!\\\\nmoreVertices\\\\n\\\\tself makeVertices: 2+ vertices size! !\\\\n\\\\n!StarMorph methodsFor: 'menus' stamp: 'wiz 1/11/2005 20:37'!\\\\nnextTwinkle\\\\n\\\\tself makeVertices: vertices size starRatio: self nextTwinkleSkip .\\\\n\\\\tself computeBounds.! !\\\\n\\\\n!StarMorph methodsFor: 'menus' stamp: 'wiz 1/11/2005 20:37'!\\\\nprevTwinkle\\\\n\\\\tself makeVertices: vertices size starRatio: self prevTwinkleSkip .\\\\n\\\\tself computeBounds.! !\\\\n\\\\n!StarMorph methodsFor: 'menus' stamp: 'wiz 1/15/2005 02:26'!\\\\nupdateFormFromUser\\\\n\\\\\\\"Does nothing here. Overridden in subclasses e.g. Kaleidoscope.\\\\\\\"\\\\n^ self.! !\\\\n\\\\n\\\\n!StarMorph methodsFor: 'parts bin' stamp: 'sw 7/2/2001 11:07'!\\\\ninitializeToStandAlone\\\\n\\\\t^ self initialize removeHandles! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStarMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StarMorph class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 11:37'!\\\\ninitialize\\\\n\\\\n\\\\tself registerInFlapsRegistry.\\\\t! !\\\\n\\\\n!StarMorph class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 11:39'!\\\\nregisterInFlapsRegistry\\\\n\\\\t\\\\\\\"Register the receiver in the system's flaps registry\\\\\\\"\\\\n\\\\tself environment\\\\n\\\\t\\\\tat: #Flaps\\\\n\\\\t\\\\tifPresent: [:cl | cl registerQuad: #(StarMorph\\\\t\\\\tauthoringPrototype\\\\t'Star'\\\\t'A star')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'PlugIn Supplies'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcl registerQuad: #(StarMorph\\\\tauthoringPrototype\\\\t'Star'\\\\t'A star')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'Supplies'.]! !\\\\n\\\\n!StarMorph class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 12:41'!\\\\nunload\\\\n\\\\t\\\\\\\"Unload the receiver from global registries\\\\\\\"\\\\n\\\\n\\\\tself environment at: #Flaps ifPresent: [:cl |\\\\n\\\\tcl unregisterQuadsWithReceiver: self] ! !\\\\n\\\\n\\\\n!StarMorph class methodsFor: 'parts bin' stamp: 'sw 8/2/2001 16:22'!\\\\ndescriptionForPartsBin\\\\n\\\\t^ self partName:\\\\t'Star'\\\\n\\\\t\\\\tcategories:\\\\t\\\\t#('Graphics')\\\\n\\\\t\\\\tdocumentation:\\\\t'A symmetrical polygon in the shape of a star'! !\\\\nStarSqueakMorph subclass: #StarSqueakAntColony\\\\n\\\\tinstanceVariableNames: 'antCount'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'StarSqueak-Worlds'!\\\\n\\\\n!StarSqueakAntColony methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:26'!\\\\ninitialize\\\\n\\\\n\\\\tantCount := 50.\\\\n\\\\tsuper initialize.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakAntColony methodsFor: 'menu' stamp: 'jm 2/7/2001 18:41'!\\\\nsliderParameters\\\\n\\\\t\\\\\\\"Answer a list of parameters that the user can change via a slider. Each parameter is described by an array of: <name> <min value> <max value> <balloon help string>.\\\\\\\"\\\\n\\\\n\\\\t^ super sliderParameters, #(\\\\n\\\\t\\\\t(antCount 10 500 'The number of ants searching for food.'))\\\\n! !\\\\n\\\\n\\\\n!StarSqueakAntColony methodsFor: 'other' stamp: 'jm 1/19/2001 10:30'!\\\\ndiffusePheromone\\\\n\\\\n\\\\tself diffusePatchVariable: 'pheromone'.\\\\n! !\\\\n\\\\n!StarSqueakAntColony methodsFor: 'other' stamp: 'jm 1/19/2001 18:02'!\\\\nevaporatePheromone\\\\n\\\\n\\\\tself decayPatchVariable: 'pheromone'.\\\\n! !\\\\n\\\\n!StarSqueakAntColony methodsFor: 'other' stamp: 'jm 2/7/2001 08:03'!\\\\nsetupFood: aPatch\\\\n\\\\t\\\\\\\"Create several food caches.\\\\\\\"\\\\n\\\\n\\\\taPatch set: 'food' to: 0.  \\\\\\\"patch default is no food\\\\\\\"\\\\n\\\\n\\\\t((aPatch distanceTo: 15@15) <= 1 or:\\\\n\\\\t [(aPatch distanceTo: 80@20) <= 1 or:\\\\n\\\\t [(aPatch distanceTo: 25@80) <= 1 or:\\\\n\\\\t [(aPatch distanceTo: 70@70) <= 1]]]) ifTrue: [\\\\n\\\\t\\\\taPatch set: 'food' to: 10.\\\\n\\\\t\\\\taPatch color: Color red].\\\\n\\\\n! !\\\\n\\\\n!StarSqueakAntColony methodsFor: 'other' stamp: 'sd 11/20/2005 21:26'!\\\\nsetupNest: aPatch\\\\n\\\\t\\\\\\\"Create a nest of radius 5 centered at 50@50.\\\\\\\"\\\\n\\\\n\\\\t| distanceToNest |\\\\n\\\\tdistanceToNest := aPatch distanceTo: 50@50.\\\\n\\\\tdistanceToNest <= 4\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\taPatch set: 'isNest' to: 1.\\\\n\\\\t\\\\t\\\\taPatch color: Color brown lighter]\\\\n\\\\t\\\\tifFalse: [aPatch set: 'isNest' to: 0].\\\\n\\\\n\\\\t\\\\\\\"create a 'hill' of nest scent centered on the nest\\\\\\\"\\\\n\\\\tdistanceToNest > 0 ifTrue: [\\\\n\\\\t\\\\taPatch set: 'nestScent' to: 10000.0 // distanceToNest].\\\\n\\\\n! !\\\\n\\\\n!StarSqueakAntColony methodsFor: 'other' stamp: 'jm 3/8/2001 14:23'!\\\\nsetupPatches\\\\n\\\\t\\\\\\\"Create patch variables for sensing the nest and food caches. The nestScent variable is diffused so that it forms a 'hill' of scent over the entire world with its peak at the center of the nest. That way, the ants always know which way the nest is.\\\\\\\"\\\\n\\\\n\\\\tself createPatchVariable: 'food'.\\\\t\\\\t\\\\t\\\\\\\"greater than zero if patch has food\\\\\\\"\\\\n\\\\tself createPatchVariable: 'isNest'.\\\\t\\\\t\\\\\\\"greater than zero if patch is nest\\\\\\\"\\\\n\\\\tself createPatchVariable: 'nestScent'.\\\\t\\\\\\\"circular gradient with peak centered on nest\\\\\\\"\\\\n\\\\tself createPatchVariable: 'pheromone'.\\\\t\\\\\\\"dropped by ants when carrying food\\\\\\\"\\\\n\\\\tself displayPatchVariable: 'pheromone'.\\\\n\\\\tself patchesDo: [:p |\\\\n\\\\t\\\\tp color: self backgroundColor.\\\\n\\\\t\\\\tself setupNest: p.\\\\n\\\\t\\\\tself setupFood: p].\\\\n\\\\n! !\\\\n\\\\n!StarSqueakAntColony methodsFor: 'other' stamp: 'jm 3/8/2001 14:24'!\\\\nsetupTurtles\\\\n\\\\n\\\\tself makeTurtles: antCount class: AntColonyTurtle.\\\\n\\\\tturtles do: [:t |\\\\n\\\\t\\\\tt goto: 50@50.\\\\n\\\\t\\\\tt color: Color black.\\\\n\\\\t\\\\tt isCarryingFood: false.\\\\n\\\\t\\\\tt pheromoneDropSize: 100].\\\\n! !\\\\n\\\\n\\\\n!StarSqueakAntColony methodsFor: 'parameters' stamp: 'jm 2/7/2001 14:45'!\\\\nantCount\\\\n\\\\n\\\\t^ antCount\\\\n! !\\\\n\\\\n!StarSqueakAntColony methodsFor: 'parameters' stamp: 'sd 11/20/2005 21:26'!\\\\nantCount: aNumber\\\\n\\\\n\\\\tantCount := aNumber.\\\\n! !\\\\n\\\\n!StarSqueakAntColony methodsFor: 'parameters' stamp: 'jm 3/11/2001 17:10'!\\\\nbackgroundColor\\\\n\\\\n\\\\t^ Color brown lighter lighter lighter! !\\\\n\\\\n\\\\n!StarSqueakAntColony methodsFor: 'setup' stamp: 'sd 11/20/2005 21:26'!\\\\nsetup\\\\n\\\\n\\\\tself clearAll.\\\\n\\\\tself setupPatches.\\\\n\\\\tself setupTurtles.\\\\n\\\\tturtleDemons := #(searchForFood pickUpFood returnToNest dropFoodInNest).\\\\n\\\\tworldDemons := #(evaporatePheromone diffusePheromone).\\\\n! !\\\\nStarSqueakMorph subclass: #StarSqueakDiffusion\\\\n\\\\tinstanceVariableNames: 'waterCount dyeCount'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'StarSqueak-Worlds'!\\\\n\\\\n!StarSqueakDiffusion methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:26'!\\\\ninitialize\\\\n\\\\n\\\\tdyeCount := 200.\\\\n\\\\twaterCount := 2000.\\\\n\\\\tsuper initialize.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakDiffusion methodsFor: 'menu' stamp: 'jm 3/8/2001 14:08'!\\\\nsliderParameters\\\\n\\\\t\\\\\\\"Answer a list of parameters that the user can change via a slider. Each parameter is described by an array of: <name> <min value> <max value> <balloon help string>.\\\\\\\"\\\\n\\\\n\\\\t^ super sliderParameters, #(\\\\n\\\\t\\\\t(dyeCount 50 1000 'The number of dye particles.')\\\\n\\\\t\\\\t(waterCount 100 4000 'The number of water particles.'))\\\\n! !\\\\n\\\\n\\\\n!StarSqueakDiffusion methodsFor: 'other' stamp: 'sd 11/20/2005 21:26'!\\\\nsetupTurtles\\\\n\\\\n\\\\t| radius t |\\\\n\\\\tdyeCount ifNil: [dyeCount := 200].\\\\n\\\\twaterCount ifNil: [waterCount := 2000].\\\\n\\\\tradius := 10.\\\\n\\\\tself makeTurtles: waterCount class: DiffusionTurtle.\\\\n\\\\tturtles do: [:each |\\\\n\\\\t\\\\teach color: (Color gray: 0.7).\\\\n\\\\t\\\\t(each distanceTo: 50@50) < radius ifTrue: [each die]].\\\\n\\\\n\\\\tself makeTurtles: dyeCount class: DiffusionTurtle.\\\\n\\\\tturtles size - (dyeCount - 1) to: turtles size do: [:i |\\\\n\\\\t\\\\tt := turtles at: i.\\\\n\\\\t\\\\tt goto: 50@50.\\\\n\\\\t\\\\tt forward: (self random: radius).\\\\n\\\\t\\\\tt color: Color green darker darker].\\\\n! !\\\\n\\\\n\\\\n!StarSqueakDiffusion methodsFor: 'parameters' stamp: 'jm 3/8/2001 14:07'!\\\\ndyeCount\\\\n\\\\n\\\\t^ dyeCount\\\\n! !\\\\n\\\\n!StarSqueakDiffusion methodsFor: 'parameters' stamp: 'sd 11/20/2005 21:26'!\\\\ndyeCount: aNumber\\\\n\\\\n\\\\tdyeCount := aNumber asInteger max: 1.\\\\n! !\\\\n\\\\n!StarSqueakDiffusion methodsFor: 'parameters' stamp: 'jm 3/8/2001 14:07'!\\\\nwaterCount\\\\n\\\\n\\\\t^ waterCount\\\\n! !\\\\n\\\\n!StarSqueakDiffusion methodsFor: 'parameters' stamp: 'sd 11/20/2005 21:26'!\\\\nwaterCount: aNumber\\\\n\\\\n\\\\twaterCount := aNumber asInteger max: 1.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakDiffusion methodsFor: 'setup' stamp: 'sd 11/20/2005 21:26'!\\\\nsetup\\\\n\\\\n\\\\tself clearAll.\\\\n\\\\tself patchesDo: [:p | p color: (Color gray: 0.9)].\\\\n\\\\tself setupTurtles.\\\\n\\\\tturtleDemons := #(move bounce).\\\\n! !\\\\nStarSqueakMorph subclass: #StarSqueakForestFire\\\\n\\\\tinstanceVariableNames: 'treePercentage'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'StarSqueak-Worlds'!\\\\n\\\\n!StarSqueakForestFire methodsFor: 'demons' stamp: 'sd 11/20/2005 21:26'!\\\\nconsumeFuel\\\\n\\\\n\\\\t| level |\\\\n\\\\tself patchesDo: [:p |\\\\n\\\\t\\\\tlevel := p get: #flameLevel.\\\\n\\\\t\\\\tlevel > 0 ifTrue: [\\\\n\\\\t\\\\t\\\\tlevel := (level - 15) max: 0.\\\\n\\\\t\\\\t\\\\tp set: #flameLevel to: level.\\\\n\\\\t\\\\t\\\\tp brightness: level]].\\\\n! !\\\\n\\\\n!StarSqueakForestFire methodsFor: 'demons' stamp: 'jm 1/28/2001 16:33'!\\\\nspreadFire\\\\n\\\\n\\\\tself patchesDo: [:p |\\\\n\\\\t\\\\t(p get: #isUnburnt) > 0  ifTrue: [\\\\n\\\\t\\\\t\\\\t((p neighborN get: #flameLevel) +\\\\n\\\\t\\\\t\\\\t (p neighborS get: #flameLevel) +\\\\n\\\\t\\\\t\\\\t (p neighborE get: #flameLevel) +\\\\n\\\\t\\\\t\\\\t (p neighborW get: #flameLevel)) > 0 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tp set: #isUnburnt to: 0.\\\\n\\\\t\\\\t\\\\t\\\\tp set: #flameLevel to: 100.\\\\n\\\\t\\\\t\\\\t\\\\tp color: Color red]]].\\\\n! !\\\\n\\\\n\\\\n!StarSqueakForestFire methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:26'!\\\\ninitialize\\\\n\\\\n\\\\ttreePercentage := 70.\\\\n\\\\tsuper initialize.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakForestFire methodsFor: 'menu' stamp: 'jm 3/10/2001 11:06'!\\\\nsliderParameters\\\\n\\\\t\\\\\\\"Answer a list of parameters that the user can change via a slider. Each parameter is described by an array of: <name> <min value> <max value> <balloon help string>.\\\\\\\"\\\\n\\\\n\\\\t^ super sliderParameters, #(\\\\n\\\\t\\\\t(treePercentage 0 100 'The probability of that a given patch has a tree.'))\\\\n! !\\\\n\\\\n\\\\n!StarSqueakForestFire methodsFor: 'parameters' stamp: 'jm 3/10/2001 11:06'!\\\\ntreePercentage\\\\n\\\\n\\\\t^ treePercentage\\\\n! !\\\\n\\\\n!StarSqueakForestFire methodsFor: 'parameters' stamp: 'sd 11/20/2005 21:26'!\\\\ntreePercentage: aNumber\\\\n\\\\n\\\\ttreePercentage := aNumber.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakForestFire methodsFor: 'setup' stamp: 'sd 11/20/2005 21:26'!\\\\nsetup\\\\n\\\\n\\\\tself clearAll.\\\\n\\\\tself createPatchVariable: #isUnburnt.\\\\n\\\\tself createPatchVariable: #flameLevel.\\\\n\\\\tself setupTrees.\\\\n\\\\tself setupFire.\\\\n\\\\tself setupBorder.\\\\n\\\\tworldDemons := #(spreadFire consumeFuel).\\\\n\\\\n! !\\\\n\\\\n!StarSqueakForestFire methodsFor: 'setup' stamp: 'jm 1/28/2001 16:32'!\\\\nsetupBorder\\\\n\\\\n\\\\tself patchesDo: [:p |\\\\n\\\\t\\\\tp isLeftEdge | p isRightEdge |\\\\n\\\\t\\\\tp isTopEdge | p isBottomEdge ifTrue: [\\\\n\\\\t\\\\t\\\\tp set: #isUnburnt to: 0.\\\\n\\\\t\\\\t\\\\tp color: Color blue]].\\\\n! !\\\\n\\\\n!StarSqueakForestFire methodsFor: 'setup' stamp: 'jm 1/28/2001 16:32'!\\\\nsetupFire\\\\n\\\\n\\\\tself patchesDo: [:p |\\\\n\\\\t\\\\tp neighborW isLeftEdge ifTrue: [\\\\n\\\\t\\\\t\\\\tp set: #isUnburnt to: 0.\\\\n\\\\t\\\\t\\\\tp set: #flameLevel to: 100.\\\\n\\\\t\\\\t\\\\tp color: Color red]].\\\\n! !\\\\n\\\\n!StarSqueakForestFire methodsFor: 'setup' stamp: 'jm 3/10/2001 11:09'!\\\\nsetupTrees\\\\n\\\\t\\\\\\\"Setup a forest with treePercentage of trees.\\\\\\\"\\\\n\\\\n\\\\tself patchesDo: [:p |\\\\n\\\\t\\\\tp set: #isUnburnt to: 0.\\\\n\\\\t\\\\tp set: #flameLevel to: 0.\\\\n\\\\t\\\\t(10 * treePercentage) > (self random: 1000) ifTrue: [\\\\n\\\\t\\\\t\\\\tp set: #isUnburnt to: 1.\\\\n\\\\t\\\\t\\\\tp color: Color green]].\\\\n! !\\\\nMorph subclass: #StarSqueakMorph\\\\n\\\\tinstanceVariableNames: 'dimensions pixelsPerPatch patchVariables patchVariableToDisplay logPatchVariableScale patchVarDisplayForm patchForm patchColorSetter patchColorGetter turtles turtleDemons worldDemons sniffRange scaledEvaporationRate diffusionRate lastTurtleID generation running stepTime turtlesAtPatchCache turtlesAtPatchCacheValid'\\\\n\\\\tclassVariableNames: 'RandomSeed'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'StarSqueak-Kernel'!\\\\n!StarSqueakMorph commentStamp: '<historical>' prior: 0!\\\\nI implement a StarSqueak simulation. StarSqueak is a Squeak version of Mitchel Resnick's Star Logo, a simulation environment designed to explore massively parallel simulations with hundreds or thousands of turtles. See the excellent book \\\\\\\"Turtles, Termites, and Traffic Jams: Explorations in Massively Parallel Microworlds\\\\\\\" by Mitchel Resnick, MIT Press, 1994.\\\\n!\\\\n\\\\n\\\\n!StarSqueakMorph methodsFor: 'accessing' stamp: 'jm 2/7/2001 13:48'!\\\\ndiffusionRate\\\\n\\\\n\\\\t^ diffusionRate\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'accessing' stamp: 'sd 11/20/2005 21:26'!\\\\ndiffusionRate: newRate\\\\n\\\\t\\\\\\\"Set the diffusion rate to an integer between 0 and 10. The diffusion rate gives the number of patches on one size of the area averaged to compute the next value of the variable for a given patch. Larger numbers cause faster diffusion. Zero means no diffusion.\\\\\\\"\\\\n\\\\n\\\\tdiffusionRate := (newRate rounded max: 0) min: 10.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'accessing' stamp: 'jm 2/7/2001 18:59'!\\\\nevaporationRate\\\\n\\\\n\\\\t^ 1024 - scaledEvaporationRate! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'accessing' stamp: 'sd 11/20/2005 21:26'!\\\\nevaporationRate: newRate\\\\n\\\\t\\\\\\\"Set the evaporation rate. The useful range is 0 to 25 or so. Larger numbers cause faster evaporation. Zero means no evaporization.\\\\\\\"\\\\n\\\\n\\\\tscaledEvaporationRate := ((1024 - newRate truncated) max: 1) min: 1024.\\\\n\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'accessing' stamp: 'jm 3/3/2001 12:50'!\\\\npixelsPerPatch\\\\n\\\\n\\\\t^ pixelsPerPatch\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'accessing' stamp: 'sd 11/20/2005 21:26'!\\\\npixelsPerPatch: anInteger\\\\n\\\\t\\\\\\\"Set the width of one patch in pixels. Larger numbers scale up this StarSqueak world, but numbers larger than 2 or 3 result in a blocky look. The useful range is 1 to 10.\\\\\\\"\\\\n\\\\n\\\\tpixelsPerPatch := (anInteger rounded max: 1) min: 10.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakMorph methodsFor: 'drawing' stamp: 'jm 3/3/2001 12:55'!\\\\nareasRemainingToFill: aRectangle\\\\n\\\\t\\\\\\\"Drawing optimization. Since I completely fill my bounds with opaque pixels, this method tells Morphic that it isn't necessary to draw any morphs covered by me.\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ aRectangle areasOutside: self bounds\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'drawing' stamp: 'sd 11/20/2005 21:26'!\\\\ndisplay\\\\n\\\\t\\\\\\\"Display this world on the Display. Used for debugging.\\\\\\\"\\\\n\\\\n\\\\t| c |\\\\n\\\\tc := FormCanvas extent: (dimensions * pixelsPerPatch) depth: 32.\\\\n\\\\tc := c copyOffset: bounds origin negated.\\\\n\\\\tself drawOn: c.\\\\n\\\\tc form display.\\\\n\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'drawing' stamp: 'sd 11/20/2005 21:26'!\\\\ndrawOn: aCanvas\\\\n\\\\t\\\\\\\"Display this StarSqueak world.\\\\\\\"\\\\n\\\\n\\\\t| tmpForm bitBlt t |\\\\n\\\\t\\\\\\\"copy the patches form\\\\\\\"\\\\n\\\\ttmpForm := patchForm deepCopy.\\\\n\\\\n\\\\t\\\\\\\"draw patchVariableToDisplay on top of tmpForm as translucent color\\\\\\\"\\\\n\\\\tself displayPatchVariableOn: tmpForm color: Color yellow shift: logPatchVariableScale.\\\\n\\\\n\\\\t\\\\\\\"draw turtles on top of tmpForm\\\\\\\"\\\\n\\\\tbitBlt := (BitBlt toForm: tmpForm)\\\\n\\\\t\\\\tclipRect: tmpForm boundingBox;\\\\n\\\\t\\\\tcombinationRule: Form over.\\\\n\\\\t1 to: turtles size do: [:i |\\\\n\\\\t\\\\tt := turtles at: i.\\\\n\\\\t\\\\tbitBlt\\\\n\\\\t\\\\t\\\\tdestX: (pixelsPerPatch * t x truncated)\\\\n\\\\t\\\\t\\\\tdestY: (pixelsPerPatch * t y truncated)\\\\n\\\\t\\\\t\\\\twidth: pixelsPerPatch\\\\n\\\\t\\\\t\\\\theight: pixelsPerPatch.\\\\n\\\\t\\\\tbitBlt\\\\n\\\\t\\\\t\\\\tfillColor: t color;\\\\n\\\\t\\\\t\\\\tcopyBits].\\\\n\\\\n\\\\t\\\\\\\"display tmpForm\\\\\\\"\\\\n\\\\taCanvas paintImage: tmpForm at: bounds origin.\\\\n\\\\n! !\\\\n\\\\n\\\\n!StarSqueakMorph methodsFor: 'geometry' stamp: 'jm 2/7/2001 13:31'!\\\\nextent: aPoint\\\\n\\\\t\\\\\\\"Do nothing; my extent is determined by my StarSqueak world dimensions and pixelsPerPatch.\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!StarSqueakMorph methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:26'!\\\\ninitialize\\\\n\\\\n\\\\tsuper initialize.\\\\n\\\\tdimensions := self starSqueakDimensions.  \\\\\\\"dimensions of this StarSqueak world in patches\\\\\\\"\\\\n\\\\tpixelsPerPatch := 2.\\\\n\\\\tsuper extent: dimensions * pixelsPerPatch.\\\\n\\\\tself evaporationRate: 6.\\\\n\\\\tself diffusionRate: 1.\\\\n\\\\tself clearAll.  \\\\\\\"be sure this is done once in case setup fails to do it\\\\\\\"\\\\n\\\\tself setup.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakMorph methodsFor: 'menu' stamp: 'dgd 8/30/2003 22:17'!\\\\naddCustomMenuItems: aCustomMenu hand: aHandMorph\\\\n\\\\n\\\\tsuper addCustomMenuItems: aCustomMenu hand: aHandMorph.\\\\n\\\\taCustomMenu addLine.\\\\n\\\\taCustomMenu add: 'start' translated action: #startRunning.\\\\n\\\\taCustomMenu add: 'stop' translated action: #stopRunning.\\\\n\\\\taCustomMenu add: 'step' translated action: #singleStep.\\\\n\\\\taCustomMenu add: 'start over' translated action: #startOver.\\\\n\\\\taCustomMenu addLine.\\\\n\\\\taCustomMenu add: 'full speed' translated action: #fullSpeed.\\\\n\\\\taCustomMenu add: 'slow speed' translated action: #slowSpeed.\\\\n\\\\taCustomMenu addLine.\\\\n\\\\taCustomMenu add: 'set scale' translated action: #setScale.\\\\n\\\\taCustomMenu add: 'make parameter slider' translated action: #makeParameterSlider.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'menu' stamp: 'sd 11/20/2005 21:26'!\\\\nfullSpeed\\\\n\\\\t\\\\\\\"Run at maximum speed.\\\\\\\"\\\\n\\\\n\\\\tstepTime := 0.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'menu' stamp: 'dgd 2/21/2003 22:53'!\\\\nmakeParameterSlider\\\\n\\\\t| menu choice s |\\\\n\\\\tmenu := CustomMenu new title: 'Parameter?'.\\\\n\\\\tself sliderParameters do: [:rec | menu add: rec first action: rec].\\\\n\\\\tchoice := menu startUp.\\\\n\\\\tchoice ifNil: [^self].\\\\n\\\\ts := self \\\\n\\\\t\\\\t\\\\t\\\\tnewSliderForParameter: choice first\\\\n\\\\t\\\\t\\\\t\\\\ttarget: self\\\\n\\\\t\\\\t\\\\t\\\\tmin: (choice second)\\\\n\\\\t\\\\t\\\\t\\\\tmax: (choice third)\\\\n\\\\t\\\\t\\\\t\\\\tdescription: (choice fourth).\\\\n\\\\tself world activeHand attachMorph: s! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'menu' stamp: 'sd 11/20/2005 21:26'!\\\\nsetScale\\\\n\\\\n\\\\t| reply |\\\\n\\\\treply := FillInTheBlank\\\\n\\\\t\\\\trequest: 'Set the number of pixels per patch (a number between 1 and 10)?'\\\\n\\\\t\\\\t initialAnswer: pixelsPerPatch printString.\\\\n\\\\treply isEmpty ifTrue: [^ self].\\\\n\\\\tpixelsPerPatch := ((reply asNumber rounded) max: 1) min: 10.\\\\n\\\\tself changed.\\\\n\\\\tsuper extent: dimensions * pixelsPerPatch.\\\\n\\\\tself clearAll.  \\\\\\\"be sure this is done once in case setup fails to do it\\\\\\\"\\\\n\\\\tself setup.\\\\n\\\\tself startOver.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'menu' stamp: 'jm 2/5/2001 17:52'!\\\\nsingleStep\\\\n\\\\t\\\\\\\"Take one step and redisplay.\\\\\\\"\\\\n\\\\n\\\\tself oneStep.\\\\n\\\\tself changed.\\\\n\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'menu' stamp: 'jm 2/7/2001 19:07'!\\\\nsliderParameters\\\\n\\\\t\\\\\\\"Answer a list of parameters that the user can change via a slider. Each parameter is described by an array of: <name> <min value> <max value> <balloon help string>.\\\\\\\"\\\\n\\\\n\\\\t^ #((evaporationRate 0 40\\\\n\\\\t\\\\t\\\\t'The rate at which chemicals evaporate in this world. Larger numbers give faster evaporation.')\\\\n\\\\t\\\\t(diffusionRate 0 5\\\\n\\\\t\\\\t\\\\t'The rate of chemical diffusion. Larger numbers give quicker diffusion.'))\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'menu' stamp: 'sd 11/20/2005 21:26'!\\\\nslowSpeed\\\\n\\\\t\\\\\\\"Run at slow speed.\\\\\\\"\\\\n\\\\n\\\\tstepTime := 250.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'menu' stamp: 'jm 2/6/2001 22:04'!\\\\nstartOver\\\\n\\\\t\\\\\\\"Restart this StarSqueak simulation from its initial conditions.\\\\\\\"\\\\n\\\\n\\\\tself clearAll.\\\\n\\\\tself setup.\\\\n\\\\tself changed.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'menu' stamp: 'sd 11/20/2005 21:26'!\\\\nstartRunning\\\\n\\\\t\\\\\\\"Start running this StarSqueak simulation.\\\\\\\"\\\\n\\\\n\\\\trunning := true.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'menu' stamp: 'sd 11/20/2005 21:26'!\\\\nstopRunning\\\\n\\\\t\\\\\\\"STop running this StarSqueak simulation.\\\\\\\"\\\\n\\\\n\\\\trunning := false.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakMorph methodsFor: 'parts bin' stamp: 'sw 7/13/2001 22:22'!\\\\ninitializeToStandAlone\\\\n\\\\tself initialize.\\\\n\\\\tself startRunning! !\\\\n\\\\n\\\\n!StarSqueakMorph methodsFor: 'patches' stamp: 'jm 3/8/2001 13:47'!\\\\nclearPatches\\\\n\\\\t\\\\\\\"Clear patch colors, including turtle trails.\\\\\\\"\\\\n\\\\n\\\\tpatchForm fill: patchForm boundingBox fillColor: Color black.\\\\n\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'patches' stamp: 'jm 1/22/2001 16:52'!\\\\ncreatePatchVariable: patchVarName\\\\n\\\\t\\\\\\\"Create a patch variable of the given name. It is initialized to a value of zero for every patch.\\\\\\\"\\\\n\\\\n\\\\tpatchVariables\\\\n\\\\t\\\\tat: patchVarName\\\\n\\\\t\\\\tput: (Bitmap new: (dimensions x * dimensions y) withAll: 0).\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'patches' stamp: 'sd 11/20/2005 21:26'!\\\\ndecayPatchVariable: patchVarName\\\\n\\\\t\\\\\\\"Decay the values of the patch variable of the given name. That is, the value of each patch is replaced by a fraction of its former value, resulting in an expontial decay each patch's value over time. This can be used to model evaporation of a pheromone.\\\\\\\"\\\\n\\\\n\\\\t| patchVar |\\\\n\\\\tpatchVar := patchVariables at: patchVarName ifAbsent: [^ self].\\\\n\\\\tself primEvaporate: patchVar rate: scaledEvaporationRate.\\\\n\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'patches' stamp: 'sd 11/20/2005 21:26'!\\\\ndiffusePatchVariable: patchVarName\\\\n\\\\t\\\\\\\"Diffuse the patch variable of the given name.\\\\\\\"\\\\n\\\\n\\\\t| v newV |\\\\n\\\\tdiffusionRate = 0 ifTrue: [^ self].  \\\\\\\"no diffusion\\\\\\\"\\\\n\\\\tv := patchVariables at: patchVarName ifAbsent: [^ self].\\\\n\\\\tnewV := Bitmap new: v size.\\\\n\\\\tself primDiffuseFrom: v\\\\n\\\\t\\\\tto: newV\\\\n\\\\t\\\\twidth: dimensions x\\\\n\\\\t\\\\theight: dimensions y\\\\n\\\\t\\\\tdelta: diffusionRate truncated.\\\\n\\\\tpatchVariables at: patchVarName put: newV.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'patches' stamp: 'sd 11/20/2005 21:26'!\\\\npatchesDo: aBlock\\\\n\\\\t\\\\\\\"Evaluate the given block for every patch in this world.\\\\\\\"\\\\n\\\\n\\\\t| patch |\\\\n\\\\tpatch := StarSqueakPatch new world: self.\\\\n\\\\t0 to: dimensions y - 1 do: [:y |\\\\n\\\\t\\\\tpatch y: y.\\\\n\\\\t\\\\t0 to: dimensions x - 1 do: [:x |\\\\n\\\\t\\\\t\\\\tpatch x: x.\\\\n\\\\t\\\\t\\\\taBlock value: patch]].\\\\n! !\\\\n\\\\n\\\\n!StarSqueakMorph methodsFor: 'setup' stamp: 'sd 11/20/2005 21:26'!\\\\naddTurtleDemon: aSelector\\\\n\\\\t\\\\\\\"Add the given selector to the list of selectors sent to every turtle on every step.\\\\\\\"\\\\n\\\\n\\\\tturtleDemons := turtleDemons copyWith: aSelector.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'setup' stamp: 'sd 11/20/2005 21:26'!\\\\naddWorldDemon: aSelector\\\\n\\\\t\\\\\\\"Add the given selector to the list of selectors sent to the world on every step.\\\\\\\"\\\\n\\\\n\\\\tworldDemons := worldDemons copyWith: aSelector.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'setup' stamp: 'sd 11/20/2005 21:26'!\\\\nclearAll\\\\n\\\\t\\\\\\\"Reset this StarSqueak world. All patch variables are cleared, all turtles are removed, and all demons are turned off.\\\\\\\"\\\\n\\\\n\\\\tpatchVariables := Dictionary new: 10.\\\\n\\\\tpatchVariableToDisplay := nil.\\\\n\\\\tlogPatchVariableScale := 0.\\\\n\\\\tpatchForm := Form extent: (dimensions * pixelsPerPatch) depth: 32.\\\\n\\\\tself createPatchFormGetterAndSetter.\\\\n\\\\tpatchVarDisplayForm := nil.\\\\n\\\\tself clearPatches.\\\\n\\\\tturtles := #().\\\\n\\\\tturtleDemons := #().\\\\n\\\\tworldDemons := #().\\\\n\\\\tsniffRange := 1.\\\\n\\\\tlastTurtleID := -1.\\\\n\\\\tgeneration := 0.\\\\n\\\\trunning := false.\\\\n\\\\tstepTime := 0.  \\\\\\\"full speed\\\\\\\"\\\\n\\\\tturtlesAtPatchCache := nil.\\\\n\\\\tturtlesAtPatchCacheValid := false.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'setup' stamp: 'jm 1/24/2001 12:42'!\\\\ndisplayPatchVariable: patchVarName\\\\n\\\\t\\\\\\\"Make this StarSqueak world display the patch variable of the given name. Only one patch variable can be displayed at any given time.\\\\\\\"\\\\n\\\\n\\\\tself displayPatchVariable: patchVarName logScale: -2.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'setup' stamp: 'sd 11/20/2005 21:26'!\\\\ndisplayPatchVariable: patchVarName logScale: logBase2OfScaleFactor\\\\n\\\\t\\\\\\\"Make this StarSqueak world display the patch variable of the given name. Only one patch variable can be displayed at any given time. Values are scaled by 2^logBase2OfScaleFactor. For example, a value of 5 scales by 32 and a value of -2 scales by 1/4.\\\\\\\"\\\\n\\\\n\\\\t(patchVariables includesKey: patchVarName) ifFalse: [\\\\n\\\\t\\\\tpatchVariableToDisplay := nil.\\\\n\\\\t\\\\tpatchVarDisplayForm := nil.\\\\n\\\\t\\\\t^ self].\\\\n\\\\tpatchVariableToDisplay := patchVarName.\\\\n\\\\tpatchVarDisplayForm := Form extent: (dimensions * pixelsPerPatch) depth: 32.\\\\n\\\\tlogPatchVariableScale := logBase2OfScaleFactor.\\\\n\\\\tself clearPatches.\\\\n\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'setup' stamp: 'sd 11/20/2005 21:26'!\\\\nrandom: range\\\\n\\\\t\\\\\\\"Answer a random integer between 0 and range.\\\\\\\"\\\\n\\\\n\\\\tRandomSeed := ((RandomSeed * 1309) + 13849) bitAnd: 65535.\\\\n\\\\t^ (RandomSeed * (range + 1)) // 65536\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'setup' stamp: 'jm 1/23/2001 07:24'!\\\\nsetup\\\\n\\\\t\\\\\\\"Subclasses should override this to setup the initial conditions of this StarSqueak world. The method should start with 'self clearAll'.\\\\\\\"\\\\n\\\\n\\\\tself clearAll.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'setup' stamp: 'jm 3/3/2001 12:54'!\\\\nstarSqueakDimensions\\\\n\\\\t\\\\\\\"Answer the dimensions of this StarSqueak simulation. Subclasses can override this method to define their own world size.\\\\\\\"\\\\n\\\\n\\\\t^ 100@100\\\\n! !\\\\n\\\\n\\\\n!StarSqueakMorph methodsFor: 'stepping and presenter' stamp: 'dgd 2/21/2003 22:53'!\\\\noneStep\\\\n\\\\t\\\\\\\"Perform one step of the StarSqueak world. Execute all turtle and world demons.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"run demons in random order and increment the generation counter\\\\\\\"\\\\n\\\\n\\\\t| currentTurtles |\\\\n\\\\tturtleDemons notEmpty \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"Note: Make a copy of turtles list that won't change if turtles are created/deleted.\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\tcurrentTurtles := turtles copy.\\\\n\\\\t\\\\t\\\\tturtleDemons shuffled \\\\n\\\\t\\\\t\\\\t\\\\tdo: [:sel | 1 to: currentTurtles size do: [:i | (currentTurtles at: i) perform: sel]]].\\\\n\\\\tworldDemons shuffled do: [:sel | self perform: sel].\\\\n\\\\tgeneration := generation + 1.\\\\n\\\\tturtlesAtPatchCacheValid := false! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'stepping and presenter' stamp: 'jm 1/26/2001 17:21'!\\\\nstep\\\\n\\\\n\\\\trunning ifTrue: [\\\\n\\\\t\\\\tself oneStep.\\\\n\\\\t\\\\tself changed].\\\\n! !\\\\n\\\\n\\\\n!StarSqueakMorph methodsFor: 'testing' stamp: 'jm 1/22/2001 17:52'!\\\\nstepTime\\\\n\\\\n\\\\t^ stepTime\\\\n! !\\\\n\\\\n\\\\n!StarSqueakMorph methodsFor: 'turtles' stamp: 'jm 3/12/2001 09:44'!\\\\nmakeTurtles: count\\\\n\\\\t\\\\\\\"Create the given number of generic turtles.\\\\\\\"\\\\n\\\\n\\\\tself makeTurtles: count class: StarSqueakTurtle.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'turtles' stamp: 'sd 11/20/2005 21:26'!\\\\nmakeTurtles: count class: turtleClass\\\\n\\\\t\\\\\\\"Create the given number of turtles of the given turtle class.\\\\\\\"\\\\n\\\\n\\\\tturtles := turtles,\\\\n\\\\t\\\\t((1 to: count) collect: [:i |\\\\n\\\\t\\\\t\\\\tturtleClass new\\\\n\\\\t\\\\t\\\\t\\\\tinitializeWorld: self\\\\n\\\\t\\\\t\\\\t\\\\twho: (lastTurtleID := lastTurtleID + 1)]).\\\\n\\\\tself changed.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'turtles' stamp: 'jm 1/28/2001 10:55'!\\\\nturtles\\\\n\\\\n\\\\t^ turtles\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'turtles' stamp: 'dgd 2/21/2003 22:53'!\\\\nturtlesAtX: x y: y do: aBlock \\\\n\\\\t\\\\\\\"Evaluate the given block for each turtle at the given location.\\\\\\\"\\\\n\\\\n\\\\t| t |\\\\n\\\\tt := self firstTurtleAtX: x y: y.\\\\n\\\\t[t isNil] whileFalse: \\\\n\\\\t\\\\t\\\\t[aBlock value: t.\\\\n\\\\t\\\\t\\\\tt := t nextTurtle]! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'turtles' stamp: 'jm 3/3/2001 18:08'!\\\\nturtlesDo: aBlock\\\\n\\\\t\\\\\\\"Evaluate the given block for every turtle. For example:\\\\n\\\\t\\\\tw turtlesDo: [:t | t forward: 1]\\\\n\\\\twill tell every turtle to go forward by one turtle step.\\\\\\\"\\\\n\\\\n\\\\tturtles do: aBlock.\\\\n\\\\tself changed.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'sd 11/20/2005 21:26'!\\\\ncreatePatchFormGetterAndSetter\\\\n\\\\t\\\\\\\"Create BitBlt's for getting and setting patch colors.\\\\\\\"\\\\n\\\\n\\\\tpatchColorGetter := BitBlt bitPeekerFromForm: patchForm.\\\\n\\\\tpatchColorSetter :=\\\\n\\\\t\\\\t(BitBlt toForm: patchForm)\\\\n\\\\t\\\\t\\\\tcombinationRule: Form over;\\\\n\\\\t\\\\t\\\\tclipRect: patchForm boundingBox;\\\\n\\\\t\\\\t\\\\twidth: pixelsPerPatch;\\\\n\\\\t\\\\t\\\\theight: pixelsPerPatch.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'sd 11/20/2005 21:26'!\\\\ndeleteTurtle: aTurtle\\\\n\\\\t\\\\\\\"Delete the given turtle from this world.\\\\\\\"\\\\n\\\\n\\\\tturtles := turtles copyWithout: aTurtle.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'jm 1/22/2001 16:58'!\\\\ndimensions\\\\n\\\\n\\\\t^ dimensions\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'jdl 3/28/2003 09:32'!\\\\ndisplayPatchVariableOn: aForm color: aColor shift: shiftAmount \\\\n\\\\t\\\\\\\"Display patchVariableToDisplay in the given color. The opacity (alpha) of of each patch is determined by the patch variable value for that patch and shiftAmount. If shiftAmount is zero, the source value is unscaled. Positive shiftAmount values result in right shifting the source value by the given number of bits (That is, multiplying by 2^N. Negative values perform right shifts, dividing by 2^N).\\\\\\\"\\\\n\\\\n\\\\t| patchVar bitBlt w rowOffset alpha |\\\\n\\\\tpatchVariableToDisplay ifNil: [^self].\\\\n\\\\tpatchVar := patchVariables at: patchVariableToDisplay ifAbsent: [^self].\\\\n\\\\n\\\\t\\\\\\\"set up the BitBlt\\\\\\\"\\\\n\\\\tbitBlt := (BitBlt toForm: aForm)\\\\n\\\\t\\\\t\\\\t\\\\tsourceRect: (0 @ 0 extent: pixelsPerPatch);\\\\n\\\\t\\\\t\\\\t\\\\tfillColor: aColor;\\\\n\\\\t\\\\t\\\\t\\\\tcombinationRule: 30.\\\\n\\\\tw := dimensions x.\\\\n\\\\t0 to: dimensions y - 1\\\\n\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t[:y | \\\\n\\\\t\\\\t\\\\trowOffset := y * w + 1.\\\\n\\\\t\\\\t\\\\t0 to: w - 1\\\\n\\\\t\\\\t\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:x | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\talpha := (patchVar at: rowOffset + x) bitShift: shiftAmount.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\talpha := alpha min: 255.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\talpha > 1 \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"if not transparent, fill using the given alpha\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbitBlt destOrigin: (x * pixelsPerPatch) @ (y * pixelsPerPatch).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbitBlt copyBitsTranslucent: alpha]]]! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'sd 11/20/2005 21:26'!\\\\nfirstTurtleAtX: xPos y: yPos \\\\n\\\\n\\\\t| w t x y index |\\\\n\\\\t\\\\\\\"create turtlesAtPatchCache if necessary\\\\\\\"\\\\n\\\\tturtlesAtPatchCache ifNil: [\\\\n\\\\t\\\\tturtlesAtPatchCache := Array new: (dimensions x * dimensions y) withAll: nil.\\\\n\\\\t\\\\tturtlesAtPatchCacheValid := false].\\\\n\\\\n\\\\tw := dimensions y.\\\\n\\\\tturtlesAtPatchCacheValid ifFalse: [\\\\n\\\\t\\\\tturtlesAtPatchCache atAllPut: nil.\\\\n\\\\t\\\\t\\\\\\\"cache not yet computed for this step; make linked list of turtles for each patch\\\\\\\"\\\\n\\\\t\\\\t1 to: turtles size do: [:i |\\\\n\\\\t\\\\t\\\\tt := turtles at: i.\\\\n\\\\t\\\\t\\\\tx := t x truncated.\\\\n\\\\t\\\\t\\\\ty := t y truncated.\\\\n\\\\t\\\\t\\\\tindex := (w * y) + x + 1.\\\\n\\\\t\\\\t\\\\tt nextTurtle: (turtlesAtPatchCache at: index).\\\\n\\\\t\\\\t\\\\tturtlesAtPatchCache at: index put: t].\\\\n\\\\t\\\\tturtlesAtPatchCacheValid := true].\\\\n\\\\n\\\\tx := xPos truncated.\\\\n\\\\ty := yPos truncated.\\\\n\\\\tindex := (w * y) + x + 1.\\\\n\\\\t^ turtlesAtPatchCache at: index\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'sd 11/20/2005 21:26'!\\\\ngetPatchBrightnessAtX: x y: y\\\\n\\\\t\\\\\\\"Answer the brightness of the patch at the given location, a number from 0 to 100.\\\\\\\"\\\\n\\\\n\\\\t| c |\\\\n\\\\tc := self getPatchColorAtX: x y: y.\\\\n\\\\t^ (c brightness * 100.0) rounded\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'sd 11/20/2005 21:26'!\\\\ngetPatchColorAtX: x y: y\\\\n\\\\t\\\\\\\"Answer the color of the patch at the given location.\\\\\\\"\\\\n\\\\n\\\\t| pixel |\\\\n\\\\tpixel := patchColorGetter pixelAt:\\\\n\\\\t\\\\t(pixelsPerPatch * x truncated)@(pixelsPerPatch * y truncated).\\\\n\\\\t^ Color colorFromPixelValue: pixel depth: patchForm depth\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'sd 11/20/2005 21:26'!\\\\ngetPatchVariable: patchVarName atX: xPos y: yPos\\\\n\\\\t\\\\\\\"Answer the value of the given patch variable at the given turtle. Answer zero if the turtle is out of bounds.\\\\\\\"\\\\n\\\\n\\\\t| x y i |\\\\n\\\\tx := xPos truncated.\\\\n\\\\ty := yPos truncated.\\\\n\\\\t((x < 0) or: [y < 0]) ifTrue: [^ 0].\\\\n\\\\t((x >= dimensions x) or: [y >= dimensions y]) ifTrue: [^ 0].\\\\n\\\\ti := ((y * dimensions x) + x) truncated + 1.\\\\n\\\\t^ (patchVariables at: patchVarName ifAbsent: [^ 0]) at: i\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'sd 11/20/2005 21:26'!\\\\nincrementPatchVariable: patchVarName atX: xPos y: yPos by: amount\\\\n\\\\t\\\\\\\"Increment the value of the given patch variable at the given location by the given amount. Do nothing if the location is out of bounds.\\\\\\\"\\\\n\\\\n\\\\t| x y i var |\\\\n\\\\tx := xPos truncated.\\\\n\\\\ty := yPos truncated.\\\\n\\\\t((x < 0) or: [y < 0]) ifTrue: [^ self].\\\\n\\\\t((x >= dimensions x) or: [y >= dimensions y]) ifTrue: [^ self].\\\\n\\\\ti := ((y * dimensions x) + x) truncated + 1.\\\\n\\\\tvar := patchVariables at: patchVarName ifAbsent: [^ self].\\\\n\\\\tvar at: i put: ((var at: i) + amount).\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'sd 11/20/2005 21:26'!\\\\nnewSliderForParameter: parameter target: target min: min max: max description: description\\\\n\\\\n\\\\t| c slider r s |\\\\n\\\\tc := (AlignmentMorph newColumn)\\\\n\\\\t\\\\tcolor: Color lightBlue;\\\\n\\\\t\\\\tborderWidth: 2;\\\\n\\\\t\\\\thResizing: #shrinkWrap;\\\\n\\\\t\\\\tvResizing: #shrinkWrap;\\\\n\\\\t\\\\tuseRoundedCorners.\\\\n\\\\tslider := SimpleSliderMorph new\\\\n\\\\t\\\\tcolor: (Color r: 0.065 g: 0.548 b: 0.645);\\\\n\\\\t\\\\textent: 150@2;\\\\n\\\\t\\\\ttarget: target;\\\\n\\\\t\\\\tactionSelector: (parameter, ':') asSymbol;\\\\n\\\\t\\\\tminVal: min;\\\\n\\\\t\\\\tmaxVal: max;\\\\n\\\\t\\\\tadjustToValue: (target perform: parameter asSymbol).\\\\n\\\\tc addMorphBack: slider.\\\\n\\\\tr := (AlignmentMorph newRow)\\\\n\\\\t\\\\tcolor: Color lightBlue;\\\\n\\\\t\\\\thResizing: #spaceFill;\\\\n\\\\t\\\\tvResizing: #spaceFill.\\\\n\\\\ts := StringMorph new contents: parameter, ': '.\\\\n\\\\tr addMorphBack: s.\\\\n\\\\ts := UpdatingStringMorph new\\\\n\\\\t\\\\ttarget: target;\\\\n\\\\t\\\\tgetSelector: parameter asSymbol;\\\\n\\\\t\\\\tputSelector: (parameter, ':') asSymbol;\\\\n\\\\t\\\\tfloatPrecision: (10.0 raisedTo: (((max - min) / 150.0) log: 10) floor);\\\\n\\\\t\\\\tstep.\\\\n\\\\tr addMorphBack: s.\\\\n\\\\tc addMorphBack: r.\\\\n\\\\tc setBalloonText: description.\\\\n\\\\t^ c\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'jm 1/18/2001 21:58'!\\\\npatchVariable: patchVarName ifAbsent: aBlock\\\\n\\\\t\\\\\\\"Answer the patch variable array of the given name. If no such patch variables exists, answer the result of evaluating the given block.\\\\\\\"\\\\n\\\\n\\\\t^ patchVariables at: patchVarName ifAbsent: aBlock\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'sd 11/20/2005 21:26'!\\\\nreplicateTurtle: aTurtle\\\\n\\\\t\\\\\\\"Create an exact copy of the given turtle and add it to this world.\\\\\\\"\\\\n\\\\n\\\\t| newTurtle |\\\\n\\\\tnewTurtle := aTurtle clone who: (lastTurtleID := lastTurtleID + 1).\\\\n\\\\tturtles := turtles copyWith: newTurtle.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'jdl 3/28/2003 09:34'!\\\\nsetPatchBrightnessAtX: x y: y to: percent \\\\n\\\\t\\\\\\\"Set the brightness of the patch at the given location to the given level, where 0 is black and 100 is full brightness.\\\\\\\"\\\\n\\\\n\\\\t| c brightness |\\\\n\\\\tc := self getPatchColorAtX: x y: y.\\\\n\\\\tbrightness := percent / 100.0.\\\\n\\\\tbrightness := brightness max: 0.03125.\\\\n\\\\tself \\\\n\\\\t\\\\tsetPatchColorAtX: x\\\\n\\\\t\\\\ty: y\\\\n\\\\t\\\\tto: (Color \\\\n\\\\t\\\\t\\\\t\\\\th: c hue\\\\n\\\\t\\\\t\\\\t\\\\ts: c saturation\\\\n\\\\t\\\\t\\\\t\\\\tv: brightness)! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'jm 2/7/2001 07:20'!\\\\nsetPatchColorAtX: x y: y to: aColor\\\\n\\\\t\\\\\\\"Paint the patch at the given location with the given color.\\\\\\\"\\\\n\\\\n\\\\tpatchColorSetter\\\\n\\\\t\\\\tfillColor: aColor;\\\\n\\\\t\\\\tdestX: (pixelsPerPatch * x truncated);\\\\n\\\\t\\\\tdestY: (pixelsPerPatch * y truncated);\\\\n\\\\t\\\\tcopyBits.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'sd 11/20/2005 21:26'!\\\\nsetPatchVariable: patchVarName atX: xPos y: yPos to: newValue\\\\n\\\\t\\\\\\\"Set the value of the given patch variable below the given turtle to the given value. Do nothing if the turtle is out of bounds.\\\\\\\"\\\\n\\\\n\\\\t| x y i var |\\\\n\\\\tx := xPos truncated.\\\\n\\\\ty := yPos truncated.\\\\n\\\\t((x < 0) or: [y < 0]) ifTrue: [^ self].\\\\n\\\\t((x >= dimensions x) or: [y >= dimensions y]) ifTrue: [^ self].\\\\n\\\\ti := ((y * dimensions x) + x) truncated + 1.\\\\n\\\\tvar := patchVariables at: patchVarName ifAbsent: [^ self].\\\\n\\\\tvar at: i put: newValue.\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'sd 11/20/2005 21:26'!\\\\nsumPatchVariable: patchVarName neighborsAtX: xPos y: yPos\\\\n\\\\t\\\\\\\"Answer the sum of the given patch variable for the eight neighbors of the patch at the given location. Answer zero if the location is out of bounds.\\\\\\\"\\\\n\\\\n\\\\t| patchVar x y w h xLeft xRight rowOffset sum |\\\\n\\\\tpatchVar := patchVariables at: patchVarName ifAbsent: [^ 0].\\\\n\\\\tx := xPos truncated.\\\\n\\\\ty := yPos truncated.\\\\n\\\\tw := dimensions x.\\\\n\\\\th := dimensions y.\\\\n\\\\t((x < 0) or: [y < 0]) ifTrue: [^ 0].\\\\n\\\\t((x >= w) or: [y >= h]) ifTrue: [^ 0].\\\\n\\\\txLeft := (x - 1) \\\\\\\\\\\\\\\\ w.  \\\\\\\"column before x, wrapped\\\\\\\"\\\\n\\\\txRight := (x + 1) \\\\\\\\\\\\\\\\ w.  \\\\\\\"column after x, wrapped\\\\\\\"\\\\n\\\\trowOffset := y * w.\\\\n\\\\tsum :=\\\\n\\\\t\\\\t(patchVar at: rowOffset + xLeft) +\\\\n\\\\t\\\\t(patchVar at: rowOffset + xRight).\\\\n\\\\trowOffset := ((y - 1) \\\\\\\\\\\\\\\\ h) * w.  \\\\\\\"row above y, wrapped\\\\\\\"\\\\n\\\\tsum := sum +\\\\n\\\\t\\\\t(patchVar at: rowOffset + xLeft) +\\\\n\\\\t\\\\t(patchVar at: rowOffset + x) +\\\\n\\\\t\\\\t(patchVar at: rowOffset + xRight).\\\\n\\\\trowOffset := ((y + 1) \\\\\\\\\\\\\\\\ h) * w.  \\\\\\\"row below y, wrapped\\\\\\\"\\\\n\\\\tsum := sum +\\\\n\\\\t\\\\t(patchVar at: rowOffset + xLeft) +\\\\n\\\\t\\\\t(patchVar at: rowOffset + x) +\\\\n\\\\t\\\\t(patchVar at: rowOffset + xRight).\\\\n\\\\t^ sum\\\\n\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private' stamp: 'jdl 3/28/2003 09:36'!\\\\nuphillOf: patchVarName forTurtle: aTurtle \\\\n\\\\t\\\\\\\"Answer the heading the points in the direction of increasing value for the given patch variable. If there is no gradient, or if the turtle is outside the world bounds, answer the turtles current heading.\\\\\\\"\\\\n\\\\n\\\\t| patchVar turtleX turtleY startX endX startY endY maxVal rowOffset thisVal maxValX maxValY |\\\\n\\\\tpatchVar := patchVariables at: patchVarName ifAbsent: [^aTurtle heading].\\\\n\\\\tturtleX := aTurtle x truncated + 1.\\\\n\\\\tturtleY := aTurtle y truncated + 1.\\\\n\\\\tturtleX := turtleX max: 1.\\\\n\\\\tturtleY := turtleY max: 1.\\\\n\\\\tturtleX := turtleX min: dimensions x.\\\\n\\\\tturtleY := turtleY min: dimensions y.\\\\n\\\\tstartX := turtleX - sniffRange max: 1.\\\\n\\\\tendX := turtleX + sniffRange min: dimensions x.\\\\n\\\\tstartY := turtleY - sniffRange max: 1.\\\\n\\\\tendY := turtleY + sniffRange min: dimensions y.\\\\n\\\\tmaxVal := patchVar at: (turtleY - 1) * dimensions x + turtleX.\\\\n\\\\tmaxValX := nil.\\\\n\\\\tstartY to: endY\\\\n\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t[:y | \\\\n\\\\t\\\\t\\\\trowOffset := (y - 1) * dimensions x.\\\\n\\\\t\\\\t\\\\tstartX to: endX\\\\n\\\\t\\\\t\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:x | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tthisVal := patchVar at: rowOffset + x.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tthisVal > maxVal \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[maxValX := x.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmaxValY := y.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmaxVal := thisVal]]].\\\\n\\\\tnil = maxValX ifTrue: [^aTurtle heading].\\\\n\\\\t^(((maxValX - turtleX) @ (maxValY - turtleY)) degrees + 90.0) \\\\\\\\\\\\\\\\ 360.0! !\\\\n\\\\n\\\\n!StarSqueakMorph methodsFor: 'private-primitives' stamp: 'jdl 3/28/2003 09:46'!\\\\nprimDiffuseFrom: srcBitmap to: dstBitmap width: width height: height delta: delta \\\\n\\\\t\\\\\\\"Diffuse the integer values of the source patch variable Bitmap into the output Bitmap. Each cell of the output is the average of the NxN area around it in the source, where N = (2 * delta) + 1.\\\\\\\"\\\\n\\\\n\\\\t| area startY endY startX endX sum rowStart |\\\\n\\\\t<primitive: 'primitiveDiffuseFromToWidthHeightDelta' module: 'StarSqueakPlugin'>\\\\n\\\\tarea := (2 * delta + 1) * (2 * delta + 1).\\\\n\\\\t1 to: height\\\\n\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t[:y | \\\\n\\\\t\\\\t\\\\tstartY := y - delta.\\\\n\\\\t\\\\t\\\\tstartY := startY max: 1.\\\\n\\\\t\\\\t\\\\tendY := y + delta.\\\\n\\\\t\\\\t\\\\tendY := endY min: height.\\\\n\\\\t\\\\t\\\\t1 to: width\\\\n\\\\t\\\\t\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:x | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstartX := x - delta.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstartX := startX max: 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tendX := x + delta.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tendX := endX min: width.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsum := 0.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstartY to: endY\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:y2 | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trowStart := (y2 - 1) * width.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartX to: endX do: [:x2 | sum := sum + (srcBitmap at: rowStart + x2)]].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdstBitmap at: (y - 1) * width + x put: sum // area]]! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private-primitives' stamp: 'jm 3/12/2001 09:45'!\\\\nprimEvaporate: aBitmap rate: rate\\\\n\\\\t\\\\\\\"Evaporate the integer values of the source Bitmap at the given rate, an integer between 0 and 1024, where 1024 is a scale factor of 1.0 (i.e., no evaporation). That is, replace each integer element v with (rate * v) / 1024.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 'primitiveEvaporateRate' module: 'StarSqueakPlugin'>\\\\n\\\\t1 to: aBitmap size do: [:i |\\\\n\\\\t\\\\taBitmap at: i put: (((aBitmap at: i) * rate) bitShift: -10)].\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private-primitives' stamp: 'sd 11/20/2005 21:26'!\\\\nprimMapFrom: srcBitmap to: dstBitmap width: w height: h patchSize: patchSize rgbFlags: rgbFlags shift: shiftAmount \\\\n\\\\t\\\\\\\"Map values in the source bitmap (interpreted as unsigned 32-bit integers) to 2x2 patches of color in the destination bitmap. The color brightness level is determined by the source value and the color hue is determined by the bottom three bits of the rgbFlags value. For example, if rgbFlags is 1, you get shades of blue, if it is 6 you get shades of yellow, and if it is 7, you get shades of gray. The shiftAmount is used to scale the source data values by a power of two. If shiftAmount is zero, the data is unscaled. Positive shiftAmount values result in right shifting the source data by the given number of bits (multiplying by 2^N, negative values perform right shifts (dividing by 2^N). The width parameter gives the width of the Form that owns the destination bitmap.\\\\\\\"\\\\n\\\\n\\\\t| rgbMult srcIndex level pixel offset |\\\\n\\\\t<primitive: 'primitiveMapFromToWidthHeightPatchSizeRgbFlagsShift' module: 'StarSqueakPlugin'>\\\\n\\\\trgbMult := 0.\\\\n\\\\t(rgbFlags bitAnd: 4) > 0 ifTrue: [rgbMult := rgbMult + 65536].\\\\n\\\\t(rgbFlags bitAnd: 2) > 0 ifTrue: [rgbMult := rgbMult + 256].\\\\n\\\\t(rgbFlags bitAnd: 1) > 0 ifTrue: [rgbMult := rgbMult + 1].\\\\n\\\\tsrcIndex := 0.\\\\n\\\\t0 to: h // patchSize - 1\\\\n\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t[:y | \\\\n\\\\t\\\\t\\\\t0 to: w // patchSize - 1\\\\n\\\\t\\\\t\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:x | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tlevel := (srcBitmap at: (srcIndex := srcIndex + 1)) bitShift: shiftAmount.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tlevel := level min: 255.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpixel := level <= 0 \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"non-transparent black\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t1]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [level * rgbMult].\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"fill a patchSize x patchSize square with the pixel value\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\toffset := (y * w + x) * patchSize.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\toffset to: offset + ((patchSize - 1) * w)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tby: w\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:rowStart | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trowStart + 1 to: rowStart + patchSize\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:dstIndex | dstBitmap at: dstIndex put: pixel]]]]! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private-primitives' stamp: 'sd 11/20/2005 21:26'!\\\\ntestDiffusePrim\\\\n\\\\t\\\\\\\"This test should diffuse the initial value in the center cell so that each cell has 1000.\\\\\\\"\\\\n\\\\t\\\\\\\"StarSqueakMorph new testDiffusePrim\\\\\\\"\\\\n\\\\n\\\\t| src dst |\\\\n\\\\tsrc := Bitmap new: 49.\\\\n\\\\tsrc at: 25 put: 49000.\\\\n\\\\tdst := Bitmap new: 49.\\\\n\\\\tself primDiffuseFrom: src to: dst width: 7 height: 7 delta: 3.\\\\n\\\\t^ dst asArray\\\\n! !\\\\n\\\\n!StarSqueakMorph methodsFor: 'private-primitives' stamp: 'sd 11/20/2005 21:26'!\\\\ntestEvaporatePrim\\\\n\\\\t\\\\\\\"This test should result in reducing each element of the array to 75% of its initial value.\\\\\\\"\\\\n\\\\t\\\\\\\"StarSqueakMorph new testEvaporatePrim\\\\\\\"\\\\n\\\\n\\\\t| data |\\\\n\\\\tdata := Bitmap new: 10.\\\\n\\\\t1 to: data size do: [:i | data at: i put: (10000 * i)].\\\\n\\\\tself primEvaporate: data rate: (75 * 1024) // 100.\\\\n\\\\t^ data asArray\\\\n\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStarSqueakMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StarSqueakMorph class methodsFor: 'class initialization' stamp: 'sd 11/20/2005 21:26'!\\\\ninitialize\\\\n\\\\t\\\\\\\"StarSqueakMorph initialize\\\\\\\"\\\\n\\\\n\\\\tRandomSeed := 17.\\\\n! !\\\\nObject subclass: #StarSqueakPatch\\\\n\\\\tinstanceVariableNames: 'world worldWidth worldHeight x y'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'StarSqueak-Kernel'!\\\\n!StarSqueakPatch commentStamp: '<historical>' prior: 0!\\\\nI represent a patch in a StarSqueak world. Patch objects are not retained, but are created as needed, such as in patchesDo:.\\\\n!\\\\n\\\\n\\\\n!StarSqueakPatch methodsFor: 'accessing' stamp: 'jm 1/27/2001 08:59'!\\\\nasPoint\\\\n\\\\n\\\\t^ x @ y\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'accessing' stamp: 'jm 1/19/2001 08:28'!\\\\nworld\\\\n\\\\n\\\\t^ world\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'accessing' stamp: 'sd 11/20/2005 21:26'!\\\\nworld: aStarSqueakMorph\\\\n\\\\t\\\\\\\"Set the world for this patch. Also record the world's width and height.\\\\\\\"\\\\n\\\\n\\\\t| dims |\\\\n\\\\tworld := aStarSqueakMorph.\\\\n\\\\tdims := world dimensions.\\\\n\\\\tworldWidth := dims x.\\\\n\\\\tworldHeight := dims y.\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'accessing' stamp: 'jm 1/18/2001 21:27'!\\\\nx\\\\n\\\\n\\\\t^ x\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'accessing' stamp: 'sd 11/20/2005 21:26'!\\\\nx: anInteger\\\\n\\\\n\\\\tx := anInteger.\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'accessing' stamp: 'jm 1/18/2001 21:27'!\\\\ny\\\\n\\\\n\\\\t^ y\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'accessing' stamp: 'sd 11/20/2005 21:26'!\\\\ny: anInteger\\\\n\\\\n\\\\ty := anInteger.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakPatch methodsFor: 'geometry' stamp: 'jm 1/28/2001 15:27'!\\\\nisBottomEdge\\\\n\\\\n\\\\t^ y = (worldHeight - 1)\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'geometry' stamp: 'jm 1/28/2001 15:27'!\\\\nisLeftEdge\\\\n\\\\n\\\\t^ x = 0\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'geometry' stamp: 'jm 1/28/2001 15:27'!\\\\nisRightEdge\\\\n\\\\n\\\\t^ x = (worldWidth - 1)\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'geometry' stamp: 'jm 1/28/2001 15:27'!\\\\nisTopEdge\\\\n\\\\n\\\\t^ y = 0\\\\n! !\\\\n\\\\n\\\\n!StarSqueakPatch methodsFor: 'neighborhood' stamp: 'jm 1/28/2001 15:06'!\\\\nneighborE\\\\n\\\\t\\\\\\\"Answer the neightboring patch directly south of (below) this patch.\\\\\\\"\\\\n\\\\n\\\\t^ self clone x: ((x + 1) \\\\\\\\\\\\\\\\ worldWidth)\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'neighborhood' stamp: 'jm 1/28/2001 15:06'!\\\\nneighborN\\\\n\\\\t\\\\\\\"Answer the neightboring patch directly north of (above) this patch.\\\\\\\"\\\\n\\\\n\\\\t^ self clone y: ((y - 1) \\\\\\\\\\\\\\\\ worldHeight)\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'neighborhood' stamp: 'hh 8/26/2001 17:03'!\\\\nneighborNE\\\\n\\\\t\\\\\\\"Answer the neightboring patch directly south of (below) this patch.\\\\\\\"\\\\n\\\\n\\\\t^ self clone\\\\n\\\\t\\\\tx: ((x + 1) \\\\\\\\\\\\\\\\ worldWidth);\\\\n\\\\t\\\\ty: ((y - 1) \\\\\\\\\\\\\\\\ worldHeight)\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'neighborhood' stamp: 'hh 8/26/2001 17:03'!\\\\nneighborNW\\\\n\\\\t\\\\\\\"Answer the neightboring patch directly south of (below) this patch.\\\\\\\"\\\\n\\\\n\\\\t^ self clone\\\\n\\\\t\\\\tx: ((x - 1) \\\\\\\\\\\\\\\\ worldWidth);\\\\n\\\\t\\\\ty: ((y - 1) \\\\\\\\\\\\\\\\ worldHeight)\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'neighborhood' stamp: 'jm 1/28/2001 15:06'!\\\\nneighborS\\\\n\\\\t\\\\\\\"Answer the neightboring patch directly south of (below) this patch.\\\\\\\"\\\\n\\\\n\\\\t^ self clone y: ((y + 1) \\\\\\\\\\\\\\\\ worldHeight)\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'neighborhood' stamp: 'hh 8/26/2001 17:03'!\\\\nneighborSE\\\\n\\\\t\\\\\\\"Answer the neightboring patch directly south of (below) this patch.\\\\\\\"\\\\n\\\\n\\\\t^ self clone\\\\n\\\\t\\\\tx: ((x + 1) \\\\\\\\\\\\\\\\ worldWidth);\\\\n\\\\t\\\\ty: ((y + 1) \\\\\\\\\\\\\\\\ worldHeight)\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'neighborhood' stamp: 'hh 8/26/2001 17:04'!\\\\nneighborSW\\\\n\\\\t\\\\\\\"Answer the neightboring patch directly south of (below) this patch.\\\\\\\"\\\\n\\\\n\\\\t^ self clone\\\\n\\\\t\\\\tx: ((x - 1) \\\\\\\\\\\\\\\\ worldWidth);\\\\n\\\\t\\\\ty: ((y + 1) \\\\\\\\\\\\\\\\ worldHeight)\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'neighborhood' stamp: 'jm 1/28/2001 15:06'!\\\\nneighborW\\\\n\\\\t\\\\\\\"Answer the neightboring patch directly south of (below) this patch.\\\\\\\"\\\\n\\\\n\\\\t^ self clone x: ((x - 1) \\\\\\\\\\\\\\\\ worldWidth)\\\\n! !\\\\n\\\\n\\\\n!StarSqueakPatch methodsFor: 'patch color' stamp: 'jm 1/24/2001 15:57'!\\\\nbrightness\\\\n\\\\t\\\\\\\"Answer the brightness of this patch, a number from 0 to 100.\\\\\\\"\\\\n\\\\n\\\\t^ world getPatchBrightnessAtX: x y: y\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'patch color' stamp: 'jm 1/24/2001 15:56'!\\\\nbrightness: percent\\\\n\\\\t\\\\\\\"Set the brightness of this patch to the given level, where 0 is nearly black and 100 is full brightness.\\\\\\\"\\\\n\\\\n\\\\tworld setPatchBrightnessAtX: x y: y to: percent.\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'patch color' stamp: 'jm 1/24/2001 15:58'!\\\\ncolor\\\\n\\\\t\\\\\\\"Answer the color of this patch.\\\\\\\"\\\\n\\\\n\\\\t^ world getPatchColorAtX: x y: y\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'patch color' stamp: 'jm 1/24/2001 15:58'!\\\\ncolor: aColor\\\\n\\\\t\\\\\\\"Paint this patch the given color.\\\\\\\"\\\\n\\\\n\\\\tworld setPatchColorAtX: x y: y to: aColor.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakPatch methodsFor: 'patch variables' stamp: 'jm 1/18/2001 21:31'!\\\\ndistanceTo: aPoint\\\\n\\\\t\\\\\\\"Answer the distance from this patch to the given point.\\\\\\\"\\\\n\\\\n\\\\t^ ((x - aPoint x) squared + (y - aPoint y) squared) sqrt\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'patch variables' stamp: 'sd 11/20/2005 21:26'!\\\\nget: patchVarName\\\\n\\\\t\\\\\\\"Answer the value of the given patch variable for this patch.\\\\\\\"\\\\n\\\\n\\\\t| patchVar |\\\\n\\\\tpatchVar := world patchVariable: patchVarName ifAbsent: [^ 0].\\\\n\\\\t^ patchVar at: (y * world dimensions x) + x + 1\\\\n! !\\\\n\\\\n!StarSqueakPatch methodsFor: 'patch variables' stamp: 'sd 11/20/2005 21:26'!\\\\nset: patchVarName to: newValue\\\\n\\\\t\\\\\\\"Set the value of the given patch variable for this patch to the given value.\\\\\\\"\\\\n\\\\n\\\\t| patchVar |\\\\n\\\\tpatchVar := world patchVariable: patchVarName ifAbsent: [^ self].\\\\n\\\\tpatchVar at: (y * world dimensions x) + x + 1 put: newValue.\\\\n! !\\\\nStarSqueakMorph subclass: #StarSqueakSlimeMold\\\\n\\\\tinstanceVariableNames: 'cellCount'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'StarSqueak-Worlds'!\\\\n\\\\n!StarSqueakSlimeMold methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:26'!\\\\ninitialize\\\\n\\\\n\\\\tcellCount := 200.\\\\n\\\\tsuper initialize.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakSlimeMold methodsFor: 'menu' stamp: 'jm 2/7/2001 19:51'!\\\\nsliderParameters\\\\n\\\\t\\\\\\\"Answer a list of parameters that the user can change via a slider. Each parameter is described by an array of: <name> <min value> <max value> <balloon help string>.\\\\\\\"\\\\n\\\\n\\\\t^ super sliderParameters, #(\\\\n\\\\t\\\\t(cellCount 50 2000 'The number of slime mold cells.'))\\\\n! !\\\\n\\\\n\\\\n!StarSqueakSlimeMold methodsFor: 'other' stamp: 'jm 1/19/2001 18:36'!\\\\ndiffusePheromone\\\\n\\\\n\\\\tself diffusePatchVariable: 'pheromone'.\\\\n! !\\\\n\\\\n!StarSqueakSlimeMold methodsFor: 'other' stamp: 'jm 1/19/2001 18:36'!\\\\nevaporatePheromone\\\\n\\\\n\\\\tself decayPatchVariable: 'pheromone'.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakSlimeMold methodsFor: 'parameters' stamp: 'jm 2/7/2001 19:28'!\\\\ncellCount\\\\n\\\\n\\\\t^ cellCount\\\\n! !\\\\n\\\\n!StarSqueakSlimeMold methodsFor: 'parameters' stamp: 'sd 11/20/2005 21:26'!\\\\ncellCount: aNumber\\\\n\\\\n\\\\tcellCount := aNumber asInteger.\\\\n\\\\n! !\\\\n\\\\n\\\\n!StarSqueakSlimeMold methodsFor: 'setup' stamp: 'sd 11/20/2005 21:26'!\\\\nsetup\\\\n\\\\n\\\\tself clearAll.\\\\n\\\\tself makeTurtles: cellCount class: SlimeMoldTurtle.\\\\n\\\\tself createPatchVariable: 'pheromone'.  \\\\\\\"emitted by slime mold cells\\\\\\\"\\\\n\\\\tturtleDemons := #(dropPheromone followPheromone breakLoose).\\\\n\\\\tworldDemons := #(evaporatePheromone diffusePheromone).\\\\n\\\\tself displayPatchVariable: 'pheromone'.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStarSqueakSlimeMold class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StarSqueakSlimeMold class methodsFor: 'parts bin' stamp: 'sw 10/24/2001 16:36'!\\\\ndescriptionForPartsBin\\\\n\\\\t\\\\\\\"Answer a description of the receiver for use in a parts bin\\\\\\\"\\\\n\\\\n\\\\t^ self partName:\\\\t'SlimeMold'\\\\n\\\\t\\\\tcategories:\\\\t\\\\t#('StarSqueak')\\\\n\\\\t\\\\tdocumentation:\\\\t'A slime-mold simulation using StarSqueak'\\\\n\\\\t\\\\tsampleImageForm: (Form\\\\n\\\\textent: 92@96\\\\n\\\\tdepth: 8\\\\n\\\\tfromArray: #( 673720360 676154664 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 1296911693 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1296911693 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1398364499 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1396729208 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1296911693 1294477352 674900008 673720360 673720360 673720360 673720360 673720360 673729869 1918072946 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1296911693 1296902184 674900008 673720360 673720360 673720360 673720360 673720360 673729869 1296911693 1296902184 673720360 673720360 673720360 673720360 673720360 676154701 1296911693 673720360 673720360 673720360 673720360 1296921202 1920103026 1296911656 673720360 673720360 673720360 673720360 673720360 673720360 673720397 1296911693 1294477352 673720360 673720360 673720360 673720360 673720397 1296911693 1296911693 1296902184 673720360 673720360 673720397 1296921239 2021169010 1296911656 673720360 673720360 673720360 673720360 673720360 673720360 673720397 1296911693 1294477352 673720360 673720360 673720360 673720360 673720397 1296921202 1917668685 1296911656 673720360 673720360 673720397 1299346040 1701148786 1917668685 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729832 673720360 673720360 673720360 673720360 673720360 673729869 1299355580 2543284850 1296911656 673720360 673720360 673720397 1296921276 2122234994 1917668685 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1920121883 3784808306 1296911656 673720360 673720360 673720397 1296921202 2543294322 1296911693 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1922530886 3787233138 1296911656 673720360 673720360 673720397 1296911730 1920103026 1296911693 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1918442267 3784808306 1296911656 673720360 673720360 673720397 1296911693 1920093517 1296911693 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1299365052 3164041842 1296911656 673720360 673720360 673720397 1296911693 1296911693 1296911693 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 1296902184 673720360 673720360 673720360 673720360 673720397 1299346034 2540859981 1296911656 673720360 673720360 673720397 1296911693 1296911693 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1296911693 1294477352 673720360 673720360 673720360 673720397 1296911730 1920093517 1296911656 673720360 673720360 673729869 1296911693 1296911693 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1296911693 1296902184 673720360 673720360 673720360 673720360 1296911693 1296911693 1296911656 673720360 673720360 676154701 1296911693 1296911656 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1299336525 1296911693 673720360 673720360 673720360 673720360 1296911693 1296911693 1296911656 673720360 673720360 1296911693 1296911693 1294477352 673720360 1179002920 673720360 673720360 673720360 673720360 673720360 673720360 1296911730 1920103026 1917668685 1296902184 673720360 673720360 673720360 676154701 1296911693 1296911656 673720360 673720397 1296911693 1179471181 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 1296921202 2543294359 1920093517 1296911693 1294477352 673720360 673720360 673729869 1296911693 1296911656 673720360 673720397 1296462450 1917668685 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720397 1296921177 1189199036 2540850509 1296911693 1296911656 673720360 673720360 673729869 1296911693 1296911693 673720360 673720397 1299346071 1917668685 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720397 1296921276 3779479228 2540859981 1296911693 1296911693 673720360 673720360 673729869 1296921202 1917668685 1294477352 673720397 1299334726 1179471181 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720397 1299346108 1179050465 2543284850 1920103026 1917668685 1294477352 673720360 673729869 1299346034 1920093517 1294477352 673720397 1299346071 1917668685 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720397 1296921276 3779518908 2540860018 1920103001 1500663117 1294477352 673720360 673729869 1920112454 2540859981 1296902184 673720397 1296921202 1917668648 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720397 1296921239 3166485692 1920103026 1920104537 1501065805 1296902184 673720360 673729869 1922530886 2123854413 1296902184 673720360 1296911693 1296911656 673720360 673720360 975710248 673720360 673720360 673720360 673720360 673720360 673720397 1296921202 1920103026 1920093554 1920104549 1702392397 1296902184 673720360 673729869 1922530886 1503097421 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673721896 673720360 673720360 673720360 673720360 1296911693 1920103026 1296911693 1920103032 2020756813 1296902184 673720360 673729869 1920121945 2540859981 1294477352 673720360 673720360 673720360 673720360 774383656 673720360 673720360 673721896 673720360 673720360 673720360 673720360 676154701 1296911693 1296911693 1299346040 2020756813 1294477352 673720360 673729869 1299346034 1500663117 1294477352 673720360 673720360 673720360 673720360 774383656 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1296911693 1296911693 1296911699 1397574989 1294477352 673720360 673729869 1296911693 877481293 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 774776872 673720360 673720360 673720360 673720360 673720360 676154701 1296911693 1296911693 1296911693 673720360 673720360 673720397 1296911693 1296911693 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 774776872 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1296902184 673720360 673720360 673720397 1296911693 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1296911693 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 1296911693 1296911693 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720397 1296911693 1296911693 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1299346034 1920102989 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1299355580 3164041842 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1922546845 2646382450 1296911656 673720360 673720360 673720360 674900008 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1924981019 454777202 1296911656 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1920917787 454777202 1296911656 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1920122044 3166466674 1296911656 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1920103001 1180267085 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1299346034 1920093517 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1296911730 1296911693 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1296911693 1296911693 1294477352 673720360 673720360 673724968 673720360 673720397 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1296911693 1296911693 673720360 673720360 673720360 673720360 673720360 676154701 1296911656 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1296911693 1296902184 673720360 673720360 673720360 673720360 673720360 1296911693 1296911693 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 1296911693 1296911693 1296902184 673720360 673720360 673720360 673720360 673720397 1296921202 1499024717 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720397 1296911693 1296911693 1294477352 673720360 673720360 673720360 673720360 673720397 1296921239 2540850509 1294477352 673720360 673720360 673720360 673720360 675686440 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1296911693 1296911693 1294477352 673720360 673720360 673720360 673720360 673729869 1296914758 1180257613 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1296462450 1917668685 1294477352 673720360 673720360 673720360 673720360 673729869 1299346009 1500663117 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1920112535 2540850509 1294477352 673720360 673720360 673720360 673720360 676154701 1296921202 1920093517 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1920112454 2539205709 1294477352 673720360 673720360 673720360 673720360 676154701 1296921202 1917668685 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1922516550 3161607501 1294477352 673720360 673720360 673720360 673720360 1296911693 1299345997 1296911693 1294477352 673720360 673720360 673720360 673720390 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1299339609 2540850509 1294477352 673720360 673720360 673720360 673720360 1296911730 1920093517 1296911693 1294477352 673729832 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1299346009 1917668685 1294477352 673720360 673720360 673720360 673720360 1296921202 1500672589 1296911693 673720397 1296911693 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1296911705 1296911693 673720360 673720360 673720360 673720360 673720397 1296914839 1181905491 1397574989 673729869 1296911668 1296911693 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720397 1296911693 1296911656 673720360 673720360 673720360 673720360 673720360 1296914802 1181896019 1397574952 676154701 1296921177 1917668685 1294477352 673720360 673720360 673720366 673720360 673720360 673720360 673720360 673720360 673720360 1296911693 1296902184 673720360 673720360 673720360 673720360 673720360 1296911730 1181896013 1296902184 673729869 1299346009 1397969741 1296902184 673720360 673720360 673720366 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 674900008 673720360 673720360 676154701 877481293 1294477352 673729869 1296914777 1397969741 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 674900008 673720360 673720360 673729869 1296911693 673720360 673720397 1296914802 1917668685 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 1296911705 1296911693 1294477352 673729844 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154676 1296911656 673720360 673729844 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1296911693 673720360 673720360 673720360 673720360 673729869 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 674113576 673720360 673720360 673720360 673720360 673720360 676154701 1296911693 1294477352 673720360 673720360 673720360 1296911693 1296911656 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 674113576 673720360 673720360 673720360 673720360 673720360 1296911693 1296911693 1296902184 673724986 673720360 673720397 1296921202 1917668685 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720397 1296921202 1920103026 1296911656 673720360 673720360 673720397 1299355543 1917668685 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720397 1299346071 2543294322 1917668648 673720360 673720360 673720397 1299334726 1498238285 673720360 673720360 673720360 673720360 673720360 673720360 673720378 975710248 673720360 673720360 673720360 673720360 673720360 673720360 673720397 1920112572 3789676988 1917668648 673720360 673720360 673720397 1299339609 1917668685 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1922546913 3779518908 1920093480 673720360 673720360 673720397 1296921202 1296911656 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1922516705 3779468121 1499024717 673720360 673720360 673720360 1296911693 1296911656 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1922546913 3779518908 1920093480 673720360 673720360 673720360 676154701 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1920112572 3789676988 1917668648 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 674904616 673720397 1299334726 2543294322 1917668648 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720397 1299346034 1920103026 1296911656 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673724986 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720397 1296911730 1920093517 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1294477352 673720360 673720360 673720360 1296911693 1296911693 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676148294 877471784 673720360 673720360 673720360 676154701 1296911693 673720360 673720360 673720360 675686440 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 1296911668 877013032 673720360 673720360 673720360 673720360 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 1296911693 1296902184 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720397 1296911656 673720360 673720360 676154701 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1296911693 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1397968205 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1497387853 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1497387853 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676154701 1397968205 1294477352 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673729869 1296911693 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 1296911668 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720378 673720360 673720360 673720360 673720360 673720360 673720360 673721896 673720360 673720360 673720360)\\\\n\\\\toffset: 152@256)! !\\\\nStarSqueakMorph subclass: #StarSqueakTermites\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'StarSqueak-Worlds'!\\\\n\\\\n!StarSqueakTermites methodsFor: 'all' stamp: 'jm 1/24/2001 08:50'!\\\\nsetupPatches\\\\n\\\\t\\\\\\\"Create patch variables for sensing the nest and food caches. The nestScent variable is diffused so that it forms a 'hill' of scent over the entire world with its peak at the center of the nest. That way, the ants always know which way the nest is.\\\\\\\"\\\\n\\\\n\\\\tself createPatchVariable: 'woodChips'.  \\\\\\\"number of wood chips on patch\\\\\\\"\\\\n\\\\tself displayPatchVariable: 'woodChips' logScale: 5.\\\\n\\\\tself patchesDo: [:p |\\\\n\\\\t\\\\t(self random: 8) = 0\\\\n\\\\t\\\\t\\\\tifTrue: [p set: 'woodChips' to: 1]\\\\n\\\\t\\\\t\\\\tifFalse: [p set: 'woodChips' to: 0]].\\\\n! !\\\\n\\\\n!StarSqueakTermites methodsFor: 'all' stamp: 'jm 1/28/2001 15:35'!\\\\nsetupTurtles\\\\n\\\\t\\\\\\\"Create an initialize my termites.\\\\\\\"\\\\n\\\\n\\\\tself makeTurtles: 400 class: TermiteTurtle.\\\\n\\\\tself turtlesDo: [:t | t isCarryingChip: false].\\\\n! !\\\\n\\\\n\\\\n!StarSqueakTermites methodsFor: 'setup' stamp: 'sd 11/20/2005 21:26'!\\\\nsetup\\\\n\\\\n\\\\tself clearAll.\\\\n\\\\tself setupPatches.\\\\n\\\\tself setupTurtles.\\\\n\\\\tturtleDemons := #(walk wiggle lookForChip lookForPile).\\\\n! !\\\\nStarSqueakMorph subclass: #StarSqueakTrees\\\\n\\\\tinstanceVariableNames: 'depth treeTypeSelector'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'StarSqueak-Worlds'!\\\\n\\\\n!StarSqueakTrees methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:26'!\\\\ninitialize\\\\n\\\\n\\\\tsuper initialize.\\\\n\\\\tdepth := 8.\\\\n\\\\ttreeTypeSelector := #tree1.\\\\n\\\\tself setup.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakTrees methodsFor: 'menu' stamp: 'dgd 8/30/2003 22:17'!\\\\naddCustomMenuItems: aCustomMenu hand: aHandMorph\\\\n\\\\n\\\\tsuper addCustomMenuItems: aCustomMenu hand: aHandMorph.\\\\n\\\\taCustomMenu addLine.\\\\n\\\\taCustomMenu add: 'set tree depth' translated action: #setTreeDepth.\\\\n\\\\taCustomMenu add: 'set tree type' translated action: #setTreeType.\\\\n! !\\\\n\\\\n!StarSqueakTrees methodsFor: 'menu' stamp: 'rbb 3/1/2005 11:15'!\\\\nsetTreeDepth\\\\n\\\\n\\\\t| reply |\\\\n\\\\treply := UIManager default\\\\n\\\\t\\\\trequest: 'Tree depth (a number between 1 and 12)?'\\\\n\\\\t\\\\tinitialAnswer: depth printString.\\\\n\\\\treply isEmpty ifTrue: [^ self].\\\\n\\\\tdepth := ((reply asNumber rounded) max: 1) min: 12.\\\\n\\\\tself startOver.\\\\n! !\\\\n\\\\n!StarSqueakTrees methodsFor: 'menu' stamp: 'sd 11/20/2005 21:26'!\\\\nsetTreeType\\\\n\\\\n\\\\t| menu choice |\\\\n\\\\tmenu := CustomMenu new title: 'Choose tree type:'.\\\\n\\\\tmenu add: 'tree1' action: #tree1.\\\\n\\\\tmenu add: 'tree2' action: #tree2.\\\\n\\\\tchoice := menu startUp.\\\\n\\\\tchoice ifNotNil: [\\\\n\\\\t\\\\ttreeTypeSelector := choice.\\\\n\\\\t\\\\tself startOver].\\\\n! !\\\\n\\\\n\\\\n!StarSqueakTrees methodsFor: 'parts bin' stamp: 'sd 11/20/2005 21:26'!\\\\ninitializeToStandAlone\\\\n\\\\tself initialize.\\\\n\\\\ttreeTypeSelector := #tree2.\\\\n\\\\tself setup.  \\\\\\\"Run earlier, but need to run again to get the #tree2 used\\\\\\\"\\\\n\\\\tself startRunning! !\\\\n\\\\n\\\\n!StarSqueakTrees methodsFor: 'setup' stamp: 'jm 3/12/2001 09:59'!\\\\nsetup\\\\n\\\\n\\\\tself clearAll.\\\\n\\\\tself makeTurtles: 1 class: TreeTurtle.\\\\n\\\\tself turtlesDo: [:t |\\\\n\\\\t\\\\tt goto: 50@90.\\\\n\\\\t\\\\tt penDown.\\\\n\\\\t\\\\tt color: Color red.\\\\n\\\\t\\\\tt heading: 0.\\\\n\\\\t\\\\tt length: 15.\\\\n\\\\t\\\\tt depth: depth].\\\\n\\\\tself addTurtleDemon: treeTypeSelector.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStarSqueakTrees class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StarSqueakTrees class methodsFor: 'parts bin' stamp: 'sw 10/24/2001 16:37'!\\\\ndescriptionForPartsBin\\\\n\\\\t\\\\\\\"Answer a description of the receiver for use in a parts bin\\\\\\\"\\\\n\\\\n\\\\t^ self partName:\\\\t'Trees'\\\\n\\\\t\\\\tcategories:\\\\t\\\\t#('StarSqueak')\\\\n\\\\t\\\\tdocumentation:\\\\t'A tree-growing simulation using StarSqueak'\\\\n\\\\t\\\\tsampleImageForm: (Form\\\\n\\\\textent: 70@72\\\\n\\\\tdepth: 8\\\\n\\\\tfromArray: #( 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 681453608 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 681453608 673720360 673720360 673720360 673710080 673720360 673720360 673720360 1313744936 2661165134 2655922216 673720360 676241054 673720360 673720360 673720360 673720360 2653431848 1311284776 673720398 673720360 673720360 673710080 673720360 673720360 673720398 1313744936 2661195342 1311254568 673720360 676241054 2653431848 673750686 2661174862 2653431848 2655931944 1318987816 673720398 681453608 673720360 673710080 673720360 673720360 673750686 1313754664 2661195342 1311254568 673750606 673750686 673720360 673750686 2655931982 1318987816 2655922254 2653462174 673720398 2653431848 673720360 673710080 673720360 673720360 681453646 1319018024 2653431966 1311254568 673750686 1311284894 673720360 673720478 2661174862 2661165096 2653441694 2661195422 673720398 673750568 673720360 673710080 673720360 673720360 2661195342 676220574 2653431886 1313775262 681483934 1311284776 2653441576 673720478 681463374 2653431848 3257421470 2653462174 1311264334 681453726 673720360 673710080 673720360 673720398 2661195342 673730206 2653431848 1318997662 2661174862 3262300712 2653462174 1311254722 683852402 673720514 683843230 2661195422 1311264334 2661195304 673720360 673710080 673720360 673720360 2661195342 1313754782 2661165096 1920093854 2653441614 3262300712 681483854 1313744936 3262300786 673720514 3257411662 2661195304 673730206 673720360 673720360 673710080 673720360 673720398 681483934 2661195422 2661165096 1319018142 2653462094 678609448 681463454 2655922216 3262280232 673759938 3257421470 3267504286 676220456 673750568 673720360 673710080 673720360 673730206 673750606 2655922370 673759902 2661174942 3257421352 678570024 683852366 673720360 3245437224 683786792 683831848 1915264670 1316123176 673750686 673720360 673710080 673720360 673720360 2661165134 678589122 673750686 3267514049 2663524392 678504488 683812904 673720360 683766056 683747368 3267543746 2661195304 3262261288 2661165214 1311254568 673710080 673720360 673720360 673750606 673739304 3265175118 2661174977 3267504168 678504488 3240634408 673720360 678504488 1898496449 673720433 3265175198 3267543746 2661195422 1311254568 673710080 673720360 673730206 673720398 673720514 3257411742 2663563969 683812904 673759681 3240634408 673720360 678504488 1908484136 673720433 1898487490 1915234344 673720360 673720360 673710080 673720360 676241054 673720434 3262261288 3257441832 673739458 683747368 673759528 673720360 673720360 678504561 1898457128 673720433 1908484136 673720360 2661165096 673720360 673710080 673720360 676220456 2661195304 1920084008 3250661416 673720513 3250661416 673759528 673720360 673720360 678504561 1898457128 673739121 1898457128 673720360 2661195422 673720360 673710080 673720360 673730206 2653432002 3267523112 673759528 673720360 3250661416 673759528 673720360 673720360 678523249 673720360 673739201 1898457128 673720360 2661195304 673720360 673710080 673720360 676154958 1311254642 1920103025 1898496296 673720360 3245428008 676163880 673720360 673720360 681341261 673720360 676163953 1294477352 673720397 1313754702 673720360 673710080 673720360 676154664 673720360 673729905 1903280461 673720360 3240653133 678504488 673720360 673720360 681332008 673720360 681341224 673720360 676164253 676220574 673720360 673710080 673720360 673720360 673720360 673720360 678523292 1294477352 3240653212 1299261480 673720360 673720360 1903241256 673720360 681332008 673720360 1302109554 1319018142 673720360 673710080 673720360 673720360 673720360 673720360 673720433 1903250728 3240643996 1903241256 673720360 673720360 3243059240 673720360 1900881960 673720433 1903250728 1313775262 673720360 673710080 673720360 673720360 673720360 673720360 673720360 1299280168 3240634445 1906059304 673720360 673720360 3223857192 673720433 1898457165 1903260097 1898457128 1917754958 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673739121 1903241256 1302079528 673720360 673720360 3223857192 673739121 1903260017 1903260017 1903260274 1917734440 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673729905 1908484136 678504488 673720360 673720360 3223857192 678543729 1903259981 673720360 1299280498 1917724712 1296902184 673710080 673720360 673720360 673720360 673720360 673720360 673720360 1908418600 678504488 673720360 673720360 3223857192 1287680369 673720360 673720360 673720360 1922977358 1313679400 673710080 673720360 673720360 673720360 673720360 673720360 673720360 678513704 678504488 673720360 673720360 3223857228 1903241256 673720360 673720360 673720360 676240974 1313679400 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673739084 678504488 673720360 673720433 1898466417 1277700136 673720360 673720360 673720360 673750606 1296902184 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673739163 1282484264 673720360 673720512 676098380 673720360 673720360 673720360 673720360 673730206 1294477352 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673729691 1903241256 673720360 673720512 1903250472 673720360 673720360 673720360 673720360 673720478 1294477352 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720396 1905993768 673720360 673720512 1900816424 673720360 673720360 673720360 673720360 673720398 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 1285236776 673720360 673739200 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 678504488 673720360 673759345 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 678504488 673720360 673759272 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 676098344 673720360 676098344 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673739121 673720360 678504488 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720512 673720360 1282484264 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720433 1898457128 1903241256 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 3223857192 1903241256 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 3223857228 1900816424 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 1903241329 1898457128 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 683681905 1898457128 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 683681905 1898457128 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673759345 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673759345 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673739121 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673738864 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673738864 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673738864 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673738864 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673738864 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673738864 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673738864 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673738864 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673738864 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673738864 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673738864 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673738864 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673738864 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673738864 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673738864 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673720360 673710080)\\\\n\\\\toffset: 478@345)! !\\\\nObject subclass: #StarSqueakTurtle\\\\n\\\\tinstanceVariableNames: 'world who x y wrapX wrapY headingRadians color penDown nextTurtle'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'StarSqueak-Kernel'!\\\\n!StarSqueakTurtle commentStamp: '<historical>' prior: 0!\\\\nI represent a \\\\\\\"creature\\\\\\\" that can move about on the surface of a StarSqueak world. I have a position and a heading (direction), and respond commands such as \\\\\\\"turnRight:\\\\\\\" and \\\\\\\"forward:\\\\\\\" by turning or moving. I also have an imaginary pen that can draw a trail as I move. In StarSqueak, turtles are born with random positions and headings.\\\\n\\\\nHere are some expressions to try in a workspace:\\\\n\\\\tw _ StarSqueakMorph new openInWorld.\\\\t\\\\\\\"make an empty world\\\\\\\"\\\\n\\\\tw makeTurtles: 100.\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"create 100 turtles\\\\\\\"\\\\n\\\\tw turtlesDo: [:t | t forward: 1].\\\\t\\\\t\\\\t\\\\\\\"tell all turtles to take a step\\\\\\\"\\\\n\\\\tw turtlesDo: [:t | t goto: 50@50].\\\\t\\\\t\\\\t\\\\\\\"tell all turtles to go to 50@50\\\\\\\"\\\\n\\\\tw turtlesDo: [:t | t forward: 10].\\\\t\\\\t\\\\t\\\\\\\"tell all turtles to take 10 steps\\\\\\\"\\\\n\\\\nStructure:\\\\n  world\\\\t\\\\t\\\\t\\\\tStarSqueakMorph\\\\t\\\\tthe world that owns this turtle\\\\n  who\\\\t\\\\t\\\\t\\\\tinteger\\\\t\\\\t\\\\t\\\\t\\\\tunique id\\\\n  x\\\\t\\\\t\\\\t\\\\t\\\\tnumber\\\\t\\\\t\\\\t\\\\t\\\\tx position in world\\\\n  y\\\\t\\\\t\\\\t\\\\t\\\\tnumber\\\\t\\\\t\\\\t\\\\t\\\\ty position in world\\\\n  wrapX\\\\t\\\\t\\\\t\\\\tfloat\\\\t\\\\t\\\\t\\\\t\\\\tprivate; used for wrapping in x\\\\n  wrapY\\\\t\\\\t\\\\tfloat\\\\t\\\\t\\\\t\\\\t\\\\tprivate; used for wrapping in y\\\\n  headingRadians\\\\tfloat\\\\t\\\\t\\\\t\\\\t\\\\theading in radians\\\\n  color\\\\t\\\\t\\\\t\\\\tcolor\\\\t\\\\t\\\\t\\\\t\\\\tturtle color and its pen color\\\\n  penDown\\\\t\\\\t\\\\tboolean\\\\t\\\\t\\\\t\\\\t\\\\ttrue if drawing a pen trail\\\\n  nextTurtle\\\\t\\\\t\\\\tStarSqueaktTurtle\\\\t\\\\tprivate; used to make linked list of turtles\\\\n!\\\\n\\\\n\\\\n!StarSqueakTurtle methodsFor: 'accessing' stamp: 'jm 1/27/2001 08:59'!\\\\nasPoint\\\\n\\\\n\\\\t^ x truncated @ y truncated\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'accessing' stamp: 'jm 2/25/2000 16:03'!\\\\ncolor\\\\n\\\\n\\\\t^ color\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'accessing' stamp: 'sd 11/20/2005 21:26'!\\\\ncolor: aColor\\\\n\\\\n\\\\tcolor := aColor.\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'accessing' stamp: 'sd 11/20/2005 21:26'!\\\\nheading\\\\n\\\\t\\\\\\\"Answer my heading in degrees.\\\\\\\"\\\\n\\\\n\\\\t| degrees |\\\\n\\\\tdegrees := 90.0 - headingRadians radiansToDegrees.\\\\n\\\\t^ degrees >= 0.0 ifTrue: [degrees] ifFalse: [degrees + 360.0].\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'accessing' stamp: 'sd 11/20/2005 21:26'!\\\\nheading: angleInDegrees\\\\n\\\\t\\\\\\\"Set my heading in degrees. Like a compass, up or north is 0 degrees and right or east is 90 degrees.\\\\\\\"\\\\n\\\\n\\\\theadingRadians := ((90.0 - angleInDegrees) \\\\\\\\\\\\\\\\ 360.0) degreesToRadians.\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'accessing' stamp: 'jm 3/3/2001 17:49'!\\\\nnextTurtle\\\\n\\\\t\\\\\\\"The nextTurtle slot is used to make a linked list of turtles at a given patch.\\\\\\\"\\\\n\\\\n\\\\t^ nextTurtle\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'accessing' stamp: 'sd 11/20/2005 21:26'!\\\\nnextTurtle: aStarSqueakTurtle\\\\n\\\\t\\\\\\\"The nextTurtle slot is used to make a linked list of turtles at a given patch.\\\\\\\"\\\\n\\\\n\\\\tnextTurtle := aStarSqueakTurtle.\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'accessing' stamp: 'jm 1/26/2001 17:36'!\\\\nwho\\\\n\\\\n\\\\t^ who\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'accessing' stamp: 'sd 11/20/2005 21:26'!\\\\nwho: anInteger\\\\n\\\\n\\\\twho := anInteger.\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'accessing' stamp: 'jm 2/25/2000 16:02'!\\\\nx\\\\n\\\\n\\\\t^ x\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'accessing' stamp: 'sd 11/20/2005 21:26'!\\\\nx: aNumber\\\\n\\\\n\\\\tx := aNumber.\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'accessing' stamp: 'jm 2/25/2000 16:02'!\\\\ny\\\\n\\\\n\\\\t^ y\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'accessing' stamp: 'sd 11/20/2005 21:26'!\\\\ny: aNumber\\\\n\\\\n\\\\ty := aNumber.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakTurtle methodsFor: 'commands' stamp: 'jm 1/26/2001 17:39'!\\\\ndie\\\\n\\\\t\\\\\\\"Delete this turtle at the end of the current cycle. The turtle will finish running all demons for the current cycle before it dies.\\\\\\\"\\\\n\\\\n\\\\tworld deleteTurtle: self.\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'commands' stamp: 'jm 1/23/2001 17:26'!\\\\nforward: dist\\\\n\\\\t\\\\\\\"Move the given distance in the direction of my heading.\\\\\\\"\\\\n\\\\n\\\\t1 to: dist do: [:i | self forwardOne].\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'commands' stamp: 'sd 11/20/2005 21:26'!\\\\nforwardOne\\\\n\\\\t\\\\\\\"Move one turtle step in the direction of my heading.\\\\\\\"\\\\n\\\\n\\\\tpenDown ifTrue: [world setPatchColorAtX: x y: y to: color].\\\\n\\\\tx := x + headingRadians cos.\\\\n\\\\ty := y - headingRadians sin.\\\\n\\\\tx < 0.0 ifTrue: [x := x + wrapX].\\\\n\\\\ty < 0.0 ifTrue: [y := y + wrapY].\\\\n\\\\tx >= wrapX ifTrue: [x := x - wrapX].\\\\n\\\\ty >= wrapY ifTrue: [y := y - wrapY].\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'commands' stamp: 'sd 11/20/2005 21:26'!\\\\ngoto: aPoint\\\\n\\\\t\\\\\\\"Jump to the given location.\\\\\\\"\\\\n\\\\n\\\\tx := aPoint x.\\\\n\\\\ty := aPoint y.\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'commands' stamp: 'sd 11/20/2005 21:26'!\\\\npenDown\\\\n\\\\t\\\\\\\"Put down this turtle's pen. That is, the turtle will leave a trail the same color as itself when it moves.\\\\\\\"\\\\n\\\\n\\\\tpenDown := true.\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'commands' stamp: 'sd 11/20/2005 21:26'!\\\\npenUp\\\\n\\\\t\\\\\\\"Lift this turtle's pen. The turtle will stop leaving a trail.\\\\\\\"\\\\n\\\\n\\\\tpenDown := false.\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'commands' stamp: 'jm 1/19/2001 19:20'!\\\\nrandom: range\\\\n\\\\t\\\\\\\"Answer a random integer between 0 and range.\\\\\\\"\\\\n\\\\n\\\\t^ world random: range\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'commands' stamp: 'jm 1/27/2001 08:47'!\\\\nreplicate\\\\n\\\\t\\\\\\\"Add an exact replica of this turtle to the world. The new turtle does not become active until the next cycle.\\\\\\\"\\\\n\\\\t\\\\\\\"Note: We call this operation 'replicate' instead of Mitch Resnick's term 'clone' because Squeak already used the message 'clone' for cloning a generic object.\\\\\\\"\\\\n\\\\n\\\\tworld replicateTurtle: self.\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'commands' stamp: 'jm 1/29/2001 10:11'!\\\\nstop\\\\n\\\\t\\\\\\\"Stop running.\\\\\\\"\\\\n\\\\n\\\\tworld stopRunning.\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'commands' stamp: 'jm 1/19/2001 19:14'!\\\\nturnLeft: degrees\\\\n\\\\t\\\\\\\"Turn left by the given number of degrees.\\\\\\\"\\\\n\\\\n\\\\tself heading: (self heading - degrees).\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'commands' stamp: 'jm 2/27/2000 18:19'!\\\\nturnRight: degrees\\\\n\\\\t\\\\\\\"Turn right by the given number of degrees.\\\\\\\"\\\\n\\\\n\\\\tself heading: (self heading + degrees).\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'commands' stamp: 'sd 11/20/2005 21:26'!\\\\nturnTowards: aPointTurtleOrPatch\\\\n\\\\t\\\\\\\"Turn to face the given point, turtle, or patch.\\\\\\\"\\\\n\\\\n\\\\t| degrees |\\\\n\\\\tdegrees := (aPointTurtleOrPatch asPoint - self asPoint) degrees.\\\\n\\\\theadingRadians := (0.0 - degrees) degreesToRadians.\\\\n\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'commands' stamp: 'jm 1/27/2001 08:58'!\\\\nturnTowardsStrongest: patchVarName\\\\n\\\\t\\\\\\\"Turn to point toward the nearby patch having the highest value of the given patch variable. This command uses only local information. In particular, it only considers patches within 'sniffRange' of this turtles location. For example, with the default 'sniffRange' of 1, it only considers the immediate neighbors of the patch this turtle is on.\\\\\\\"\\\\n\\\\n\\\\tself heading: (world uphillOf: patchVarName forTurtle: self).\\\\n! !\\\\n\\\\n\\\\n!StarSqueakTurtle methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:26'!\\\\ninitializeWorld: aStarSqueakWorld who: anInteger\\\\n\\\\n\\\\t| dims |\\\\n\\\\tdims := aStarSqueakWorld dimensions.\\\\n\\\\tworld := aStarSqueakWorld.\\\\n\\\\twho := anInteger.\\\\n\\\\tx := world random: dims x - 1.\\\\n\\\\ty := world random: dims y - 1.\\\\n\\\\twrapX := dims x asFloat.\\\\n\\\\twrapY := dims y asFloat.\\\\n\\\\theadingRadians := ((self random: 36000) / 100.0) degreesToRadians.\\\\n\\\\tcolor := Color blue.\\\\n\\\\tpenDown := false.\\\\n\\\\tnextTurtle := nil.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakTurtle methodsFor: 'patches' stamp: 'jm 1/19/2001 19:08'!\\\\nget: patchVar\\\\n\\\\t\\\\\\\"Answer the value of the given patch variable below this turtle.\\\\\\\"\\\\n\\\\n\\\\t^ world getPatchVariable: patchVar atX: x y: y\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'patches' stamp: 'jm 1/27/2001 08:49'!\\\\nincrement: patchVar by: delta\\\\n\\\\t\\\\\\\"Increment the value of the given patch variable below this turtle by the given amount (positive or negative).\\\\\\\"\\\\n\\\\n\\\\t world incrementPatchVariable: patchVar atX: x y: y by: delta.\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'patches' stamp: 'hh 8/26/2001 19:49'!\\\\npatchBrightness\\\\n\\\\t\\\\\\\"Answer the brightness of the patch below this turtle, where 0 is black and 100 is full brightness.\\\\\\\"\\\\n\\\\n\\\\t^world getPatchBrightnessAtX: x y: y.\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'patches' stamp: 'jm 1/24/2001 13:28'!\\\\npatchBrightness: percent\\\\n\\\\t\\\\\\\"Set the brightness of the patch below this turtle to the given value, where 0 is black and 100 is full brightness.\\\\\\\"\\\\n\\\\n\\\\tworld setPatchBrightnessAtX: x y: y to: percent.\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'patches' stamp: 'jm 1/23/2001 17:17'!\\\\npatchColor\\\\n\\\\t\\\\\\\"Answer the color of the patch below this turtle.\\\\\\\"\\\\n\\\\n\\\\t^ world getPatchColorAtX: x y: y.\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'patches' stamp: 'jm 1/24/2001 13:37'!\\\\npatchColor: aColor\\\\n\\\\t\\\\\\\"Paint the patch below this turtle with the given color.\\\\\\\"\\\\n\\\\n\\\\tworld setPatchColorAtX: x y: y to: aColor.\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'patches' stamp: 'jm 1/19/2001 19:09'!\\\\nset: patchVar to: newValue\\\\n\\\\t\\\\\\\"Set the value of the given patch variable below this turtle to the given value.\\\\\\\"\\\\n\\\\n\\\\t world setPatchVariable: patchVar atX: x y: y to: newValue.\\\\n! !\\\\n\\\\n\\\\n!StarSqueakTurtle methodsFor: 'sensing' stamp: 'jm 2/5/2001 19:42'!\\\\ndistanceTo: aPoint\\\\n\\\\t\\\\\\\"Answer the distance from this turtle to the given point.\\\\\\\"\\\\n\\\\n\\\\t^ ((x - aPoint x) squared + (y - aPoint y) squared) sqrt\\\\n! !\\\\n\\\\n!StarSqueakTurtle methodsFor: 'sensing' stamp: 'sd 11/20/2005 21:26'!\\\\nturtleCountHere\\\\n\\\\t\\\\\\\"Answer a collection of turtles at this turtle's current location, including this turtle itself.\\\\\\\"\\\\n\\\\n\\\\t| n |\\\\n\\\\tn := 0.\\\\n\\\\tworld turtlesAtX: x y: y do: [:t | n := n + 1].\\\\n\\\\t^ n\\\\n! !\\\\nChangeSetCategory subclass: #StaticChangeSetCategory\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Tools-Changes'!\\\\n!StaticChangeSetCategory commentStamp: '<historical>' prior: 0!\\\\nStaticChangeSetCategory is a user-defined change-set category that has in it only those change sets specifically placed there.!\\\\n\\\\n\\\\n!StaticChangeSetCategory methodsFor: 'add' stamp: 'sw 4/11/2001 15:58'!\\\\naddChangeSet: aChangeSet\\\\n\\\\t\\\\\\\"Add the change set manually\\\\\\\"\\\\n\\\\n\\\\tself elementAt: aChangeSet name put: aChangeSet! !\\\\n\\\\n\\\\n!StaticChangeSetCategory methodsFor: 'queries' stamp: 'sw 4/11/2001 16:10'!\\\\nacceptsManualAdditions\\\\n\\\\t\\\\\\\"Answer whether the user is allowed manually to manipulate the contents of the change-set-category.\\\\\\\"\\\\n\\\\n\\\\t^ true! !\\\\n\\\\n!StaticChangeSetCategory methodsFor: 'queries' stamp: 'sw 4/11/2001 16:00'!\\\\nincludesChangeSet: aChangeSet\\\\n\\\\t\\\\\\\"Answer whether the receiver includes aChangeSet in its retrieval list\\\\\\\"\\\\n\\\\n\\\\t^ elementDictionary includesKey: aChangeSet name! !\\\\n\\\\n\\\\n!StaticChangeSetCategory methodsFor: 'updating' stamp: 'sd 11/20/2005 21:27'!\\\\nreconstituteList\\\\n\\\\t\\\\\\\"Reformulate the list.  Here, since we have a manually-maintained list, at this juncture we only make sure change-set-names are still up to date, and we purge moribund elements\\\\\\\"\\\\n\\\\n\\\\t|  survivors |\\\\n\\\\tsurvivors := elementDictionary select: [:aChangeSet | aChangeSet isMoribund not].\\\\n\\\\tself clear.\\\\n\\\\t(survivors asSortedCollection: [:a :b | a name <= b name]) reverseDo:\\\\n\\\\t\\\\t[:aChangeSet | self addChangeSet: aChangeSet]! !\\\\nForm subclass: #StaticForm\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Graphics-Display Objects'!\\\\n!StaticForm commentStamp: '<historical>' prior: 0!\\\\nAn optimization for Nebraska - a StaticForm does not change once created so it may be cached on the remote end.!\\\\n\\\\n\\\\n!StaticForm methodsFor: 'as yet unclassified' stamp: 'RAA 8/14/2000 09:59'!\\\\nisStatic\\\\n\\\\n\\\\t^true! !\\\\nMorphicAlarm subclass: #StepMessage\\\\n\\\\tinstanceVariableNames: 'stepTime'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Events'!\\\\n\\\\n!StepMessage methodsFor: 'accessing' stamp: 'ar 10/22/2000 16:56'!\\\\nstepTime: aNumber\\\\n\\\\t\\\\\\\"Set the step time for this message. If nil, the receiver of the message will be asked for its #stepTime.\\\\\\\"\\\\n\\\\tstepTime _ aNumber! !\\\\n\\\\n\\\\n!StepMessage methodsFor: 'printing' stamp: 'ar 10/22/2000 15:59'!\\\\nprintOn: aStream\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream \\\\n\\\\t\\\\tnextPut: $(;\\\\n\\\\t\\\\tprint: receiver;\\\\n\\\\t\\\\tspace;\\\\n\\\\t\\\\tprint: selector;\\\\n\\\\t\\\\tspace;\\\\n\\\\t\\\\tprint: scheduledTime;\\\\n\\\\t\\\\tnextPut: $).! !\\\\n\\\\n\\\\n!StepMessage methodsFor: 'testing' stamp: 'ar 10/22/2000 16:56'!\\\\nstepTime\\\\n\\\\t\\\\\\\"Return the step time for this message. If nil, the receiver of the message will be asked for its #stepTime.\\\\\\\"\\\\n\\\\t^stepTime! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStepMessage class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StepMessage class methodsFor: 'instance creation' stamp: 'ar 10/22/2000 15:48'!\\\\nscheduledAt: scheduledTime stepTime: stepTime receiver: aTarget selector: aSelector arguments: argArray\\\\n\\\\t^(self receiver: aTarget selector: aSelector arguments: argArray)\\\\n\\\\t\\\\tscheduledTime: scheduledTime;\\\\n\\\\t\\\\tstepTime: stepTime! !\\\\nRectangleMorph subclass: #StickyPadMorph\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: 'Colors LastColorIndex'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-Demo'!\\\\n!StickyPadMorph commentStamp: 'sw 3/3/2004 13:31' prior: 0!\\\\nA custom item for the  Squeakland Supplies bin, as defined by Kim Rose and BJ Con.A parts bin will deliver up translucent, borderless Rectangles in a sequence of 6 colors.  It offers some complication to the parts-bin protocols in two ways::\\\\n* The multi-colored icon seen in the parts bin is not a thumbnail of any actual instance, all of which are monochrome\\\\n* New instances need to be given default names that are not the same as the name seen in the parts bin.!\\\\n\\\\n\\\\n!StickyPadMorph methodsFor: 'visual properties' stamp: 'dgd 9/18/2004 18:52'!\\\\ncanHaveFillStyles\\\\n\\\\t\\\\\\\"Return true if the receiver can have general fill styles; not just \\\\n\\\\tcolors. This method is for gradually converting old morphs.\\\\\\\"\\\\n\\\\t^ true! !\\\\n\\\\n\\\\n!StickyPadMorph methodsFor: 'parts bin' stamp: 'sw 4/3/2003 15:25'!\\\\ninitializeToStandAlone\\\\n\\\\t\\\\\\\"Initialize the receiver to stand alone.  Use the next color in the standard sequence.\\\\\\\"\\\\n\\\\n\\\\tColors ifNil: [self initialize].\\\\n\\\\tLastColorIndex _ \\\\n\\\\t\\\\tLastColorIndex\\\\n\\\\t\\\\t\\\\tifNil:\\\\n\\\\t\\\\t\\\\t\\\\t[1]\\\\n\\\\t\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t\\\\t[(LastColorIndex \\\\\\\\\\\\\\\\ Colors size) + 1].\\\\n\\\\tsuper initializeToStandAlone.\\\\n\\\\tself assureExternalName.\\\\n\\\\tself color: (Colors at: LastColorIndex).\\\\n\\\\tself extent: 100@80.\\\\n\\\\tself borderWidth: 0\\\\n\\\\t! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStickyPadMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StickyPadMorph class methodsFor: 'as yet unclassified' stamp: 'sw 3/3/2004 13:42'!\\\\nregisterInFlapsRegistry\\\\n\\\\t\\\\\\\"Register the receiver in the system's flaps registry\\\\\\\"\\\\n\\\\t\\\\n\\\\tself environment\\\\n\\\\t\\\\tat: #Flaps\\\\n\\\\t\\\\tifPresent: [:cl | cl registerQuad: #(StickyPadMorph\\\\t\\\\tnewStandAlone\\\\t\\\\t\\\\t'Sticky Pad'\\\\t\\\\t\\\\t'Each time you obtain one of these pastel, translucent, borderless rectangles, it will be a different color from the previous time.')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'Supplies'.\\\\n\\\\t\\\\t\\\\t\\\\tcl registerQuad: #(StickyPadMorph\\\\t\\\\tnewStandAlone\\\\t\\\\t\\\\t'Sticky Pad'\\\\t\\\\t\\\\t'Each time you obtain one of these pastel, translucent, borderless rectangles, it will be a different color from the previous time.')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tforFlapNamed: 'PlugIn Supplies'.]! !\\\\n\\\\n\\\\n!StickyPadMorph class methodsFor: 'class initialization' stamp: 'sw 3/3/2004 13:44'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Class initialization\\\\\\\"\\\\n\\\\n\\\\tLastColorIndex _ 0.\\\\n\\\\tColors _  {\\\\n\\\\t\\\\tTranslucentColor r: 0.0 g: 0.0 b: 0.839 alpha: 0.267.\\\\n\\\\t\\\\tTranslucentColor r: 0.484 g: 1.0 b: 0.452 alpha: 0.706.\\\\n\\\\t\\\\tTranslucentColor r: 1.0 g: 0.355 b: 0.71 alpha: 0.569.\\\\n\\\\t\\\\tTranslucentColor r: 1.0 g: 1.0 b: 0.03 alpha: 0.561.\\\\n\\\\t\\\\tTranslucentColor r: 0.484 g: 0.161 b: 1.0 alpha: 0.529.\\\\n\\\\t\\\\tTranslucentColor r: 0.097 g: 0.097 b: 0.097 alpha: 0.192.\\\\n\\\\t}.\\\\n\\\\t\\\\n\\\\tself registerInFlapsRegistry.\\\\t\\\\n\\\\n\\\\\\\"StickyPadMorph initialize\\\\\\\"! !\\\\n\\\\n\\\\n!StickyPadMorph class methodsFor: 'parts bin' stamp: 'sw 4/3/2003 14:26'!\\\\ndefaultNameStemForInstances\\\\n\\\\t\\\\\\\"Answer the default name stem to use\\\\\\\"\\\\n\\\\n\\\\t^ 'tear off'! !\\\\n\\\\n!StickyPadMorph class methodsFor: 'parts bin' stamp: 'sw 4/4/2003 11:12'!\\\\ndescriptionForPartsBin\\\\n\\\\t\\\\\\\"Answer a description of the receiver for use in a parts bin\\\\\\\"\\\\n\\\\n\\\\t^ self partName: \\\\t'Sticky Pad'\\\\n\\\\t\\\\tcategories:\\\\t\\\\t#('Graphics')\\\\n\\\\t\\\\tdocumentation:\\\\t'A translucent, borderless rectangle of a standard size, delivered in a predictable sequence of pastel colors'\\\\n\\\\t\\\\tsampleImageForm: (Form extent: 50@40 depth: 16\\\\n\\\\tfromArray: #( 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461414680 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1796762392 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461414680 1796762392 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1796762392 1796762392 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461409563 1461414680 1796762392 1796762392 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1521900214 1521900214 1521900214 1521900214 1521900214 1521900214 1521900214 1521900214 1723098804 1723098804 1723098804 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1521900214 1521900214 1521900214 1521900214 1521900214 1521900214 1521900214 1521903284 1723098804 1723098804 1723096921 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1521900214 1521900214 1521900214 1521900214 1521900214 1521900214 1521900214 1723098804 1723098804 1723098804 1599692633 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1521900214 1521900214 1521900214 1521900214 1521900214 1521900214 1521903284 1723098804 1723098804 1723096921 1599692633 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1521900214 1521900214 1521900214 1521900214 1521900214 1521900214 1723098804 1723098804 1723098804 1599692633 1599692633 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1521900214 1521900214 1521900214 1521900214 1521900214 1521903284 1723098804 1723098804 1723096921 1599692633 1599692633 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1521900214 1521900214 1322274512 1322274512 1322274512 1389318863 1389318863 1389318863 1328697138 1328697138 1328697138 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1521900214 1521900214 1322274512 1322274512 1322275535 1389318863 1389318863 1389317938 1328697138 1328697138 1328702226 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1521900214 1521900214 1322274512 1322274512 1389318863 1389318863 1389318863 1328697138 1328697138 1328697138 1662149394 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1521900214 1521900214 1322274512 1322275535 1389318863 1389318863 1389317938 1328697138 1328697138 1328702226 1662149394 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1521900214 1521900214 1322274512 1389318863 1389318863 1389318863 1328697138 1328697138 1328697138 1662149394 1662149394 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1521900214 1521900214 1322275535 1389318863 1389318863 1389317938 1328697138 1328697138 1328702226 1662149394 1662149394 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1521900214 1521900214 1389318863 1389318863 1389318863 1460426508 1460426508 1460426508 1659658988 1659658988 1659658988 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1521900214 1521903284 1389318863 1389318863 1389317938 1460426508 1460426508 1460429548 1659658988 1659658988 1659660157 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1521900214 1723098804 1389318863 1389318863 1328697138 1460426508 1460426508 1659658988 1659658988 1659658988 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1521903284 1723098804 1389318863 1389317938 1328697138 1460426508 1460429548 1659658988 1659658988 1659660157 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521900214 1723098804 1723098804 1389318863 1328697138 1328697138 1460426508 1659658988 1659658988 1659658988 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1521903284 1723098804 1723098804 1389317938 1328697138 1328697138 1460429548 1659658988 1659658988 1659660157 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461409563 1723098804 1723098804 1723098804 1328697138 1328697138 1328697138 1659658988 1659658988 1659658988 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1461414680 1723098804 1723098804 1723096921 1328697138 1328697138 1328702226 1659658988 1659658988 1659660157 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461409563 1796762392 1723098804 1723098804 1599692633 1328697138 1328697138 1662149394 1659658988 1659658988 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1461414680 1796762392 1723098804 1723096921 1599692633 1328697138 1328702226 1662149394 1659658988 1659660157 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461409563 1796762392 1796762392 1723098804 1599692633 1599692633 1328697138 1662149394 1662149394 1659658988 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1736271741 1461414680 1796762392 1796762392 1723096921 1599692633 1599692633 1328702226 1662149394 1662149394 1659660157 1736271741 1736271741 1736271741 1736271741 1736271741)\\\\n\\\\toffset: 0@0)! !\\\\n\\\\n!StickyPadMorph class methodsFor: 'parts bin' stamp: 'sw 7/5/2004 18:09'!\\\\nlaunchPartVia: aSelector label: aString\\\\n\\\\t\\\\\\\"Obtain a morph by sending aSelector to self, and attach it to the morphic hand.  This provides a general protocol for parts bins.  Overridden here so that all instances will be given the name, unlike the prevailing convention for other object types\\\\\\\"\\\\n\\\\n\\\\t| aMorph |\\\\n\\\\taMorph _ self perform: aSelector.\\\\n\\\\taMorph setNameTo: self defaultNameStemForInstances.  \\\\\\\"i.e., circumvent uniqueness in this case\\\\\\\"\\\\n\\\\taMorph setProperty: #beFullyVisibleAfterDrop toValue: true.\\\\n\\\\taMorph openInHand! !\\\\nSketchMorph subclass: #StickySketchMorph\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'EToys-Scripting Support'!\\\\n\\\\n!StickySketchMorph methodsFor: 'e-toy support' stamp: 'sw 4/16/1998 13:44'!\\\\nmustBeBackmost\\\\n\\\\t^ true! !\\\\n\\\\n\\\\n!StickySketchMorph methodsFor: 'halos and balloon help' stamp: 'sw 9/18/97 15:37'!\\\\nwantsHalo\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!StickySketchMorph methodsFor: 'thumbnail' stamp: 'sw 6/16/1999 11:32'!\\\\npermitsThumbnailing\\\\n\\\\t^ false! !\\\\nObject subclass: #Stopwatch\\\\n\\\\tinstanceVariableNames: 'timespans state'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Kernel-Chronology'!\\\\n!Stopwatch commentStamp: '<historical>' prior: 0!\\\\nA Stopwatch maintains a collection of timespans.!\\\\n\\\\n\\\\n!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/24/2003 23:12'!\\\\nactivate\\\\n\\\\n\\\\tself isSuspended ifTrue:\\\\n\\\\t\\\\t[self timespans add: \\\\n\\\\t\\\\t\\\\t(Timespan starting: DateAndTime now duration: Duration zero).\\\\n\\\\t\\\\tself state: #active]\\\\n! !\\\\n\\\\n!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/24/2003 23:45'!\\\\nduration\\\\n\\\\n\\\\t| ts last |\\\\n\\\\tself isSuspended \\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[ (ts _ self timespans) isEmpty ifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t[ ts _ { Timespan starting: DateAndTime now duration: Duration zero } ] ]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[ last _ self timespans last.\\\\n\\\\t\\\\t\\\\tts _ self timespans allButLast\\\\n\\\\t\\\\t\\\\t\\\\tadd: (last duration: (DateAndTime now - last start); yourself);\\\\n\\\\t\\\\t\\\\t\\\\tyourself ].\\\\n\\\\t\\\\t\\\\n\\\\t^ (ts collect: [ :t | t duration ]) sum\\\\n! !\\\\n\\\\n!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/25/2003 11:21'!\\\\nend\\\\n\\\\n\\\\t^ self timespans last next\\\\n\\\\n! !\\\\n\\\\n!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/24/2003 22:48'!\\\\nisActive\\\\n\\\\n\\\\t^ self state = #active\\\\n! !\\\\n\\\\n!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/24/2003 22:48'!\\\\nisSuspended\\\\n\\\\n\\\\t^ self state = #suspended\\\\n\\\\n! !\\\\n\\\\n!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/25/2003 13:25'!\\\\nprintOn: aStream\\\\n\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream\\\\n\\\\t\\\\tnextPut: $(;\\\\n\\\\t\\\\tnextPutAll: self state;\\\\n\\\\t\\\\tnextPut: $:;\\\\n\\\\t\\\\tprint: self duration;\\\\n\\\\t\\\\tnextPut: $).\\\\n\\\\n! !\\\\n\\\\n!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/25/2003 12:03'!\\\\nreActivate\\\\n\\\\n\\\\tself \\\\n\\\\t\\\\tsuspend;\\\\n\\\\t\\\\tactivate.\\\\n! !\\\\n\\\\n!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/25/2003 11:54'!\\\\nreset\\\\n\\\\n\\\\tself suspend.\\\\n\\\\ttimespans _ nil.\\\\n\\\\n! !\\\\n\\\\n!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/24/2003 23:18'!\\\\nstart\\\\n\\\\n\\\\t^ self timespans first start\\\\n\\\\n! !\\\\n\\\\n!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/24/2003 22:47'!\\\\nstate\\\\n\\\\n\\\\t^ state ifNil: [ state _ #suspended ]\\\\n! !\\\\n\\\\n!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/24/2003 22:46'!\\\\nstate: aSymbol\\\\n\\\\n\\\\tstate _ aSymbol\\\\n! !\\\\n\\\\n!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/24/2003 23:13'!\\\\nsuspend\\\\n\\\\n\\\\t| ts |\\\\n\\\\tself isActive ifTrue:\\\\n\\\\t\\\\t[ ts _ self timespans last.\\\\n\\\\t\\\\tts duration: (DateAndTime now - ts start).\\\\n\\\\t\\\\tself state: #suspended]\\\\n! !\\\\n\\\\n!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/24/2003 22:44'!\\\\ntimespans\\\\n\\\\n\\\\t^ timespans ifNil: [ timespans _ OrderedCollection new ]\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStopwatch class\\\\n\\\\tinstanceVariableNames: ''!\\\\nClassTestCase subclass: #StopwatchTest\\\\n\\\\tinstanceVariableNames: 'aStopwatch aDelay'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'KernelTests-Chronology'!\\\\n\\\\n!StopwatchTest methodsFor: 'Coverage' stamp: 'brp 9/24/2003 22:49'!\\\\nclassToBeTested\\\\n\\\\n\\\\t^ Stopwatch\\\\n\\\\n! !\\\\n\\\\n!StopwatchTest methodsFor: 'Coverage' stamp: 'brp 9/24/2003 23:01'!\\\\nselectorsToBeIgnored\\\\n\\\\n\\\\t| private | \\\\n\\\\tprivate := #( #printOn: #state: ).\\\\n\\\\n\\\\t^ super selectorsToBeIgnored, private\\\\n! !\\\\n\\\\n\\\\n!StopwatchTest methodsFor: 'running' stamp: 'brp 1/21/2004 18:49'!\\\\nsetUp\\\\n\\\\taStopwatch := Stopwatch new.\\\\n\\\\taDelay := Delay forMilliseconds: 1.! !\\\\n\\\\n\\\\n!StopwatchTest methodsFor: 'Tests' stamp: 'brp 9/25/2003 11:45'!\\\\ntestActive\\\\n\\\\n\\\\t| sw |\\\\n\\\\tsw _ Stopwatch new.\\\\n\\\\tsw activate.\\\\n\\\\t\\\\n\\\\t1 seconds asDelay wait.\\\\n\\\\tself \\\\n\\\\t\\\\tassert: (sw duration >= 1 seconds).\\\\n\\\\n\\\\t2 seconds asDelay wait.\\\\n\\\\tself \\\\n\\\\t\\\\tassert: (sw duration >= 3 seconds).\\\\n\\\\n\\\\tsw suspend.! !\\\\n\\\\n!StopwatchTest methodsFor: 'Tests' stamp: 'brp 9/24/2003 22:56'!\\\\ntestNew\\\\n\\\\n\\\\t| sw |\\\\n\\\\tsw _ Stopwatch new.\\\\n\\\\t\\\\n\\\\tself \\\\n\\\\t\\\\tassert: (sw isSuspended);\\\\n\\\\t\\\\tassert: (sw state = #suspended);\\\\n\\\\t\\\\tdeny: (sw isActive);\\\\n\\\\t\\\\tassert: (sw timespans isEmpty)\\\\n\\\\n! !\\\\n\\\\n!StopwatchTest methodsFor: 'Tests' stamp: 'brp 9/25/2003 12:02'!\\\\ntestReActivate\\\\n\\\\n\\\\t| sw |\\\\n\\\\tsw _ Stopwatch new.\\\\n\\\\tsw \\\\n\\\\t\\\\tactivate;\\\\n\\\\t\\\\tsuspend;\\\\n\\\\t\\\\treActivate.\\\\n\\\\t\\\\n\\\\tself \\\\n\\\\t\\\\tassert: (sw isActive).\\\\n! !\\\\n\\\\n!StopwatchTest methodsFor: 'Tests' stamp: 'brp 9/25/2003 11:56'!\\\\ntestReset\\\\n\\\\n\\\\t| sw |\\\\n\\\\tsw _ Stopwatch new.\\\\n\\\\tsw activate.\\\\n\\\\t\\\\n\\\\tsw reset.\\\\n\\\\tself \\\\n\\\\t\\\\tassert: (sw isSuspended);\\\\n\\\\t\\\\tassert: (sw timespans isEmpty)\\\\n! !\\\\n\\\\n!StopwatchTest methodsFor: 'Tests' stamp: 'brp 9/26/2004 19:36'!\\\\ntestStartStop\\\\n\\\\n\\\\t| sw t1 t2 t3 t4 |\\\\n\\\\tsw := Stopwatch new.\\\\n\\\\tt1 := DateAndTime now.\\\\n\\\\t(Delay forMilliseconds: 10) wait.\\\\n\\\\tsw activate; activate.\\\\n\\\\t(Delay forMilliseconds: 10) wait.\\\\n\\\\tt2 := DateAndTime now.\\\\n\\\\t\\\\n\\\\tself \\\\n\\\\t\\\\tdeny: (sw isSuspended);\\\\n\\\\t\\\\tassert: (sw isActive);\\\\n\\\\t\\\\tassert: (sw timespans size = 1);\\\\n\\\\t\\\\tassert: (t1 <= sw start);\\\\n\\\\t\\\\tassert: (sw start <= t2).\\\\n\\\\n\\\\t(Delay forMilliseconds: 10) wait.\\\\n\\\\tt3 := DateAndTime now.\\\\n\\\\t(Delay forMilliseconds: 10) wait.\\\\n\\\\tsw suspend; suspend.\\\\n\\\\t(Delay forMilliseconds: 10) wait.\\\\n\\\\tt4 := DateAndTime now.\\\\n\\\\n\\\\tself \\\\n\\\\t\\\\tassert: (sw isSuspended);\\\\n\\\\t\\\\tdeny: (sw isActive);\\\\n\\\\t\\\\tassert: (sw timespans size = 1);\\\\n\\\\t\\\\tassert: (sw end between: t3 and: t4);\\\\n\\\\t\\\\tassert: (t3 <= sw end);\\\\n\\\\t\\\\tassert: (sw end <= t4).\\\\n! !\\\\n\\\\n\\\\n!StopwatchTest methodsFor: 'testing' stamp: 'brp 1/21/2004 18:49'!\\\\ntestChangingStatus\\\\n\\\\taStopwatch activate.\\\\n\\\\tself assert: aStopwatch isActive.\\\\n\\\\tself assert: aStopwatch timespans size = 1.\\\\n\\\\taStopwatch suspend.\\\\n\\\\tself assert: aStopwatch isSuspended.\\\\n\\\\tself assert: aStopwatch timespans size = 1.\\\\n\\\\taStopwatch activate.\\\\n\\\\taStopwatch reActivate.\\\\n\\\\tself assert: aStopwatch isActive.\\\\n\\\\tself assert: aStopwatch timespans size = 3.\\\\n\\\\taStopwatch reset.\\\\n\\\\tself assert: aStopwatch isSuspended.\\\\n\\\\tself assert: aStopwatch timespans size = 0.! !\\\\n\\\\n!StopwatchTest methodsFor: 'testing' stamp: 'brp 1/21/2004 18:49'!\\\\ntestInitialStatus\\\\n\\\\tself assert: aStopwatch isSuspended.\\\\n\\\\tself deny: aStopwatch isActive.\\\\n\\\\tself assert: aStopwatch duration = 0 seconds! !\\\\n\\\\n!StopwatchTest methodsFor: 'testing' stamp: 'brp 9/26/2004 19:32'!\\\\ntestMultipleTimings\\\\n\\\\taStopwatch activate.\\\\n\\\\taDelay wait.\\\\n\\\\taStopwatch suspend.\\\\n\\\\taStopwatch activate.\\\\n\\\\taDelay wait.\\\\n\\\\taStopwatch suspend.\\\\n\\\\tself assert: aStopwatch timespans size = 2. \\\\n\\\\tself assert: aStopwatch timespans first asDateAndTime <= \\\\n\\\\t\\\\t\\\\t\\\\t\\\\taStopwatch timespans last asDateAndTime.\\\\n! !\\\\n\\\\n!StopwatchTest methodsFor: 'testing' stamp: 'brp 1/21/2004 18:49'!\\\\ntestPrintOn\\\\n\\\\t| cs rw |\\\\n\\\\tcs := ReadStream on: 'a Stopwatch(suspended:0:00:00:00)'.\\\\n\\\\trw := ReadWriteStream on: ''.\\\\n\\\\taStopwatch printOn: rw.\\\\n\\\\tself assert: rw contents = cs contents! !\\\\n\\\\n!StopwatchTest methodsFor: 'testing' stamp: 'brp 9/26/2004 19:32'!\\\\ntestSingleTiming\\\\n\\\\t| timeBefore |\\\\n\\\\ttimeBefore := DateAndTime now.\\\\n\\\\taStopwatch activate.\\\\n\\\\taDelay wait.\\\\n\\\\taStopwatch suspend.\\\\n\\\\tself assert: aStopwatch timespans size = 1. \\\\n\\\\tself assert: aStopwatch timespans first asDateAndTime >= timeBefore. \\\\n\\\\tself assert: aStopwatch timespans first asDateAndTime <= aStopwatch end.\\\\n! !\\\\nPrintableEncoder subclass: #StoreEncoder\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-Postscript Filters'!\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStoreEncoder class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StoreEncoder class methodsFor: 'configuring' stamp: 'MPW 1/1/1901 01:52'!\\\\nfilterSelector\\\\n    ^#storeOnStream:.\\\\n! !\\\\nBookMorph subclass: #StoryboardBookMorph\\\\n\\\\tinstanceVariableNames: 'alansSliders panAndTiltFactor zoomFactor zoomController'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-Books'!\\\\n!StoryboardBookMorph commentStamp: '<historical>' prior: 0!\\\\nA BookMorph variant whose pages are instances of ZoomAndScrollMorph. I have a control area where the user may pan, tilt and zoom over the image shown in the page.\\\\n\\\\n- drag up and down to zoom in and out\\\\n- drag left and right to pan\\\\n- shift-drag up and down to tilt.!\\\\n\\\\n\\\\n!StoryboardBookMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/30/2000 16:37'!\\\\nchangeTiltFactor: x\\\\n\\\\n\\\\tcurrentPage changeTiltFactor: x.\\\\n\\\\tpanAndTiltFactor _ x.\\\\n\\\\n! !\\\\n\\\\n!StoryboardBookMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/30/2000 16:37'!\\\\nchangeZoomFactor: x\\\\n\\\\n\\\\tcurrentPage changeZoomFactor: x.\\\\n\\\\tzoomFactor _ x.! !\\\\n\\\\n!StoryboardBookMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/30/2000 16:38'!\\\\ngetTiltFactor\\\\n\\\\n\\\\t^panAndTiltFactor ifNil: [panAndTiltFactor _ 0.5].! !\\\\n\\\\n!StoryboardBookMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/30/2000 16:38'!\\\\ngetZoomFactor\\\\n\\\\n\\\\t^zoomFactor ifNil: [zoomFactor _ 0.5]! !\\\\n\\\\n!StoryboardBookMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/22/2000 08:41'!\\\\noffsetX\\\\n\\\\n\\\\t^currentPage offsetX! !\\\\n\\\\n!StoryboardBookMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/22/2000 08:41'!\\\\noffsetX: aNumber\\\\n\\\\n\\\\tcurrentPage offsetX: aNumber! !\\\\n\\\\n!StoryboardBookMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/22/2000 08:41'!\\\\noffsetY\\\\n\\\\n\\\\t^currentPage offsetY! !\\\\n\\\\n!StoryboardBookMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/22/2000 08:41'!\\\\noffsetY: aNumber\\\\n\\\\n\\\\tcurrentPage offsetY: aNumber! !\\\\n\\\\n!StoryboardBookMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/22/2000 08:35'!\\\\nscale\\\\n\\\\n\\\\t^currentPage scale! !\\\\n\\\\n!StoryboardBookMorph methodsFor: 'as yet unclassified' stamp: 'RAA 11/22/2000 08:26'!\\\\nscale: aValue\\\\n\\\\n\\\\tcurrentPage scale: aValue! !\\\\n\\\\n\\\\n!StoryboardBookMorph methodsFor: 'initialization' stamp: 'RAA 12/1/2000 15:22'!\\\\ninitialize\\\\n\\\\n\\\\tnewPagePrototype _ ZoomAndScrollMorph new extent: Display extent // 3.\\\\n\\\\tzoomController _ ZoomAndScrollControllerMorph new\\\\n\\\\t\\\\t\\\\tsetBalloonText: 'Drag in here to zoom, tilt and pan the page above'.\\\\n\\\\n\\\\tsuper initialize.\\\\n\\\\n\\\\tself addMorphBack: zoomController.\\\\n\\\\n\\\\talansSliders _ {\\\\n\\\\t\\\\t{#changeTiltFactor: . #getTiltFactor . 'Pan and tilt sensitivity'}.\\\\n\\\\t\\\\t{#changeZoomFactor: . #getZoomFactor . 'Zoom sensitivity'}.\\\\n\\\\t} collect: [ :sData |\\\\n\\\\t\\\\t{\\\\n\\\\t\\\\t\\\\tSimpleSliderMorph new\\\\n\\\\t\\\\t\\\\t\\\\textent: 150@10;\\\\n\\\\t\\\\t\\\\t\\\\tcolor: Color orange;\\\\n\\\\t\\\\t\\\\t\\\\tsliderColor: Color gray;\\\\n\\\\t\\\\t\\\\t\\\\ttarget: self; \\\\n\\\\t\\\\t\\\\t\\\\tactionSelector: sData first;\\\\n\\\\t\\\\t\\\\t\\\\tsetBalloonText: sData third;\\\\n\\\\t\\\\t\\\\t\\\\tadjustToValue: (self perform: sData second).\\\\n\\\\t\\\\t\\\\tsData second\\\\n\\\\t\\\\t}\\\\n\\\\t].\\\\n\\\\talansSliders do: [ :each | self addMorphBack: each first]\\\\n! !\\\\n\\\\n\\\\n!StoryboardBookMorph methodsFor: 'navigation' stamp: 'sw 7/25/2003 16:47'!\\\\ninsertPageMorphInCorrectSpot: aPageMorph\\\\n\\\\t\\\\\\\"Insert the page morph at the correct spot\\\\\\\"\\\\n\\\\t\\\\n\\\\t| place |\\\\n\\\\tplace _ submorphs size > 1 ifTrue: [submorphs second] ifFalse: [submorphs first].\\\\n\\\\t\\\\\\\"Old architecture had a tiny spacer morph as the second morph; now architecture does not\\\\\\\"\\\\n\\\\tself addMorph: (currentPage _ aPageMorph) behind: place.\\\\n\\\\tself changeTiltFactor: self getTiltFactor.\\\\n\\\\tself changeZoomFactor: self getZoomFactor.\\\\n\\\\tzoomController target: currentPage.\\\\n\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStoryboardBookMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StoryboardBookMorph class methodsFor: 'parts bin' stamp: 'sw 8/2/2001 12:53'!\\\\ndescriptionForPartsBin\\\\n\\\\t^ self partName:\\\\t'Storyboard'\\\\n\\\\t\\\\tcategories:\\\\t\\\\t#('Presentation')\\\\n\\\\t\\\\tdocumentation:\\\\t'A storyboard authoring tool'! !\\\\nObject subclass: #Stream\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Collections-Streams'!\\\\n!Stream commentStamp: '<historical>' prior: 0!\\\\nI am an abstract class that represents an accessor for a sequence of objects. This sequence is referred to as my \\\\\\\"contents\\\\\\\".!\\\\n\\\\n\\\\n!Stream methodsFor: 'accessing' stamp: 'yo 8/30/2002 17:13'!\\\\nbasicNext\\\\n\\\\n\\\\t^ self next.\\\\n! !\\\\n\\\\n!Stream methodsFor: 'accessing' stamp: 'yo 8/30/2002 17:13'!\\\\nbasicNextPut: anObject \\\\n\\\\n\\\\t^ self nextPut: anObject! !\\\\n\\\\n!Stream methodsFor: 'accessing' stamp: 'yo 8/30/2002 17:13'!\\\\nbasicNextPutAll: aCollection \\\\n\\\\n\\\\t^ self nextPutAll: aCollection.\\\\n! !\\\\n\\\\n!Stream methodsFor: 'accessing' stamp: 'nk 2/24/2001 17:31'!\\\\nbinary! !\\\\n\\\\n!Stream methodsFor: 'accessing'!\\\\ncontents\\\\n\\\\t\\\\\\\"Answer all of the contents of the receiver.\\\\\\\"\\\\n\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n!Stream methodsFor: 'accessing' stamp: 'sma 4/22/2000 17:07'!\\\\nflush\\\\n\\\\t\\\\\\\"Do nothing by default\\\\\\\"! !\\\\n\\\\n!Stream methodsFor: 'accessing' stamp: 'nk 4/29/2004 10:38'!\\\\nlocalName\\\\n\\\\t^'a stream'! !\\\\n\\\\n!Stream methodsFor: 'accessing'!\\\\nnext\\\\n\\\\t\\\\\\\"Answer the next object accessible by the receiver.\\\\\\\"\\\\n\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n!Stream methodsFor: 'accessing'!\\\\nnext: anInteger \\\\n\\\\t\\\\\\\"Answer the next anInteger number of objects accessible by the receiver.\\\\\\\"\\\\n\\\\n\\\\t| aCollection |\\\\n\\\\taCollection _ OrderedCollection new.\\\\n\\\\tanInteger timesRepeat: [aCollection addLast: self next].\\\\n\\\\t^aCollection! !\\\\n\\\\n!Stream methodsFor: 'accessing'!\\\\nnext: anInteger put: anObject \\\\n\\\\t\\\\\\\"Make anObject be the next anInteger number of objects accessible by the \\\\n\\\\treceiver. Answer anObject.\\\\\\\"\\\\n\\\\n\\\\tanInteger timesRepeat: [self nextPut: anObject].\\\\n\\\\t^anObject! !\\\\n\\\\n!Stream methodsFor: 'accessing'!\\\\nnextMatchAll: aColl\\\\n    \\\\\\\"Answer true if next N objects are the ones in aColl,\\\\n     else false.  Advance stream of true, leave as was if false.\\\\\\\"\\\\n    | save |\\\\n    save _ self position.\\\\n    aColl do: [:each |\\\\n       (self next) = each ifFalse: [\\\\n            self position: save.\\\\n            ^ false]\\\\n        ].\\\\n    ^ true! !\\\\n\\\\n!Stream methodsFor: 'accessing'!\\\\nnextMatchFor: anObject \\\\n\\\\t\\\\\\\"Gobble the next object and answer whether it is equal to the argument, \\\\n\\\\tanObject.\\\\\\\"\\\\n\\\\n\\\\t^anObject = self next! !\\\\n\\\\n!Stream methodsFor: 'accessing'!\\\\nnextPut: anObject \\\\n\\\\t\\\\\\\"Insert the argument, anObject, as the next object accessible by the \\\\n\\\\treceiver. Answer anObject.\\\\\\\"\\\\n\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n!Stream methodsFor: 'accessing'!\\\\nnextPutAll: aCollection \\\\n\\\\t\\\\\\\"Append the elements of aCollection to the sequence of objects accessible \\\\n\\\\tby the receiver. Answer aCollection.\\\\\\\"\\\\n\\\\n\\\\taCollection do: [:v | self nextPut: v].\\\\n\\\\t^aCollection! !\\\\n\\\\n!Stream methodsFor: 'accessing' stamp: 'nk 4/29/2004 10:40'!\\\\nopenReadOnly\\\\n\\\\t^self! !\\\\n\\\\n!Stream methodsFor: 'accessing' stamp: 'ajh 7/31/2001 20:34'!\\\\nprintOn: stream\\\\n\\\\n\\\\tsuper printOn: stream.\\\\n\\\\tstream space.\\\\n\\\\tself contents printOn: stream.\\\\n! !\\\\n\\\\n!Stream methodsFor: 'accessing' stamp: 'nk 4/29/2004 10:41'!\\\\nreadOnly\\\\n\\\\t^self! !\\\\n\\\\n!Stream methodsFor: 'accessing' stamp: 'ls 9/12/1998 20:55'!\\\\nupToEnd\\\\n\\\\t\\\\\\\"answer the remaining elements in the string\\\\\\\"\\\\n\\\\t| elements |\\\\n\\\\telements _ OrderedCollection new.\\\\n\\\\t[ self atEnd ] whileFalse: [ \\\\n\\\\t\\\\telements add: self next ].\\\\n\\\\t^elements! !\\\\n\\\\n\\\\n!Stream methodsFor: 'alternate syntax' stamp: 'RAA 6/20/2000 12:52'!\\\\ndialect\\\\n\\\\n\\\\t^#ST80\\\\t\\\\t\\\\\\\"in case a regular stream is used to print parse nodes\\\\\\\"! !\\\\n\\\\n!Stream methodsFor: 'alternate syntax' stamp: 'RAA 6/20/2000 12:54'!\\\\nwithStyleFor: elementType do: aBlock\\\\n\\\\n\\\\t^aBlock value\\\\t\\\\t\\\\\\\"in case a regular stream is used to print parse nodes\\\\\\\"\\\\n\\\\\\\">>\\\\n(Compiler new compile: 'blah ^self' in: String notifying: nil ifFail: []) printString\\\\n<<\\\\\\\"! !\\\\n\\\\n\\\\n!Stream methodsFor: 'as yet unclassified' stamp: 'RAA 9/11/2000 19:12'!\\\\nsleep\\\\n\\\\n\\\\t\\\\\\\"an FTP-based stream might close the connection here\\\\\\\"! !\\\\n\\\\n\\\\n!Stream methodsFor: 'enumerating'!\\\\ndo: aBlock \\\\n\\\\t\\\\\\\"Evaluate aBlock for each of the objects accessible by receiver.\\\\\\\"\\\\n\\\\n\\\\t[self atEnd]\\\\n\\\\t\\\\twhileFalse: [aBlock value: self next]! !\\\\n\\\\n\\\\n!Stream methodsFor: 'file open/close' stamp: 'mir 8/10/1999 12:04'!\\\\nclose! !\\\\n\\\\n\\\\n!Stream methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 00:48'!\\\\nwrite:encodedObject\\\\n\\\\t^encodedObject putOn:self.\\\\n! !\\\\n\\\\n\\\\n!Stream methodsFor: 'printing' stamp: 'sma 6/1/2000 09:56'!\\\\nprint: anObject\\\\n\\\\t\\\\\\\"Have anObject print itself on the receiver.\\\\\\\"\\\\n\\\\n\\\\tanObject printOn: self! !\\\\n\\\\n!Stream methodsFor: 'printing' stamp: 'djp 7/21/1998 17:13'!\\\\nprintHtml: anObject\\\\n\\\\tanObject printHtmlOn: self! !\\\\n\\\\n\\\\n!Stream methodsFor: 'testing'!\\\\natEnd\\\\n\\\\t\\\\\\\"Answer whether the receiver can access any more objects.\\\\\\\"\\\\n\\\\n\\\\tself subclassResponsibility! !\\\\n\\\\n!Stream methodsFor: 'testing' stamp: 'ab 8/28/2003 18:30'!\\\\nclosed\\\\n\\\\t^ false! !\\\\n\\\\n!Stream methodsFor: 'testing' stamp: 'ar 12/23/1999 15:43'!\\\\nisStream\\\\n\\\\t\\\\\\\"Return true if the receiver responds to the stream protocol\\\\\\\"\\\\n\\\\t^true! !\\\\n\\\\n!Stream methodsFor: 'testing' stamp: 'mir 11/10/2003 18:22'!\\\\nisTypeHTTP\\\\n\\\\n\\\\t^false! !\\\\n\\\\n!Stream methodsFor: 'testing' stamp: 'ar 5/17/2001 19:07'!\\\\nnextWordsPutAll: aCollection\\\\n\\\\t\\\\\\\"Write the argument a word-like object in big endian format on the receiver.\\\\n\\\\tMay be used to write other than plain word-like objects (such as ColorArray).\\\\\\\"\\\\n\\\\taCollection class isPointers | aCollection class isWords not \\\\n\\\\t\\\\tifTrue: [^self error: aCollection class name,' is not word-like'].\\\\n\\\\t1 to: aCollection basicSize do:[:i|\\\\n\\\\t\\\\tself nextNumber: 4 put: (aCollection basicAt: i).\\\\n\\\\t].\\\\n\\\\t^aCollection! !\\\\n\\\\n\\\\n!Stream methodsFor: '*monticello' stamp: 'cwp 8/9/2003 12:02'!\\\\nisMessageStream\\\\n\\\\t^ false! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStream class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!Stream class methodsFor: 'instance creation'!\\\\nnew\\\\n\\\\n\\\\tself error: 'Streams are created with on: and with:'! !\\\\nTestCase subclass: #StreamBugz\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Tests-Bugs'!\\\\n\\\\n!StreamBugz methodsFor: 'as yet unclassified' stamp: 'ar 8/5/2003 02:25'!\\\\ntestReadWriteStreamNextNBug\\\\n\\\\t| aStream |\\\\n\\\\taStream := ReadWriteStream on: String new.\\\\n\\\\taStream nextPutAll: 'Hello World'.\\\\n\\\\tself shouldnt:[aStream next: 5] raise: Error.\\\\n! !\\\\nAbstractSound subclass: #StreamingMP3Sound\\\\n\\\\tinstanceVariableNames: 'volume repeat mpegFile mpegStreamIndex totalSamples streamSamplingRate mixer lastBufferMSecs mutex'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Movies-Kernel'!\\\\n!StreamingMP3Sound commentStamp: '<historical>' prior: 0!\\\\nI implement a streaming player for MPEG or MP3 files.\\\\nExample of use:\\\\n\\\\t(StreamingMP3Sound onFileNamed: 'song.mp3') play.\\\\n!\\\\n\\\\n\\\\n!StreamingMP3Sound methodsFor: 'accessing' stamp: 'jm 11/16/2001 17:16'!\\\\nduration\\\\n\\\\t\\\\\\\"Answer the duration of this sound in seconds.\\\\\\\"\\\\n\\\\n\\\\t^ totalSamples asFloat / streamSamplingRate\\\\n! !\\\\n\\\\n!StreamingMP3Sound methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nrepeat\\\\n\\\\t\\\\\\\"Answer the repeat flag.\\\\\\\"\\\\n\\\\n\\\\trepeat ifNil: [repeat := false].\\\\n\\\\t^ repeat\\\\n! !\\\\n\\\\n!StreamingMP3Sound methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nrepeat: aBoolean\\\\n\\\\t\\\\\\\"Set the repeat flag. If true, this sound will loop back to the beginning when it gets to the end.\\\\\\\"\\\\n\\\\n\\\\trepeat := aBoolean.\\\\n! !\\\\n\\\\n!StreamingMP3Sound methodsFor: 'accessing' stamp: 'jm 11/16/2001 16:18'!\\\\nsoundPosition\\\\n\\\\t\\\\\\\"Answer the relative position of sound playback as a number between 0.0 and 1.0.\\\\\\\"\\\\n\\\\n\\\\tself mpegFileIsOpen ifFalse: [^ 0.0].\\\\n\\\\tmpegFile hasAudio ifFalse: [^ 0.0].\\\\n\\\\t^ (mpegFile audioGetSample: 0) asFloat / totalSamples\\\\n! !\\\\n\\\\n!StreamingMP3Sound methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nsoundPosition: fraction\\\\n\\\\t\\\\\\\"Jump to the position the given fraction through the sound file. The argument is a number between 0.0 and 1.0.\\\\\\\"\\\\n\\\\n\\\\t| sampleIndex |\\\\n\\\\tself mpegFileIsOpen ifFalse: [^ self].\\\\n\\\\tmpegFile hasAudio ifTrue: [\\\\n\\\\t\\\\tsampleIndex := ((totalSamples * fraction) truncated max: 0) min: totalSamples.\\\\n\\\\t\\\\tmpegFile audioSetSample: 0 stream: 0.  \\\\\\\"work around for library bug: first seek to zero\\\\\\\"\\\\n\\\\t\\\\tmpegFile audioSetSample: sampleIndex stream: 0].\\\\n! !\\\\n\\\\n!StreamingMP3Sound methodsFor: 'accessing' stamp: 'jm 11/16/2001 15:34'!\\\\nstreamSamplingRate\\\\n\\\\t\\\\\\\"Answer the sampling rate of the MP3 stream.\\\\\\\"\\\\n\\\\n\\\\t^ streamSamplingRate\\\\n! !\\\\n\\\\n!StreamingMP3Sound methodsFor: 'accessing' stamp: 'jm 9/26/2000 07:49'!\\\\nvolume\\\\n\\\\t\\\\\\\"Answer my volume.\\\\\\\"\\\\n\\\\n\\\\t^ volume\\\\n! !\\\\n\\\\n!StreamingMP3Sound methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nvolume: aNumber\\\\n\\\\t\\\\\\\"Set my volume to the given number between 0.0 and 1.0.\\\\\\\"\\\\n\\\\n\\\\tvolume := aNumber.\\\\n\\\\tself createMixer.\\\\n! !\\\\n\\\\n\\\\n!StreamingMP3Sound methodsFor: 'converting' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nsaveAsFileNamed: newFileName compressionType: compressionTypeString\\\\n\\\\t\\\\\\\"Store this MP3 sound in a SunAudio file with the given name using the given compression type.\\\\\\\"\\\\n\\\\n\\\\t| outFile |\\\\n\\\\toutFile := (FileStream newFileNamed: newFileName) binary.\\\\n\\\\tself storeSunAudioOn: outFile compressionType: compressionTypeString.\\\\n\\\\toutFile close.\\\\n! !\\\\n\\\\n!StreamingMP3Sound methodsFor: 'converting' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nstoreSunAudioOn: aBinaryStream compressionType: compressionName\\\\n\\\\t\\\\\\\"Store myself on the given stream as a monophonic sound compressed with the given type of compression. The sampling rate is reduced to 22050 samples/second if it is higher.\\\\\\\"\\\\n\\\\n\\\\t| fmt inBufSize samplesPerFrame codec inBuf compressed outSamplingRate audioWriter samplesRemaining outBuf counts byteCount |\\\\n\\\\tself pause; reset.  \\\\\\\"stop playing and return to beginning\\\\\\\"\\\\n\\\\n\\\\tfmt := SunAudioFileWriter formatCodeForCompressionType: compressionName.\\\\n\\\\tinBufSize := 64000.\\\\n\\\\tsamplesPerFrame := 1.\\\\n\\\\tcodec := SunAudioFileWriter codecForFormatCode: fmt.\\\\n\\\\tcodec ifNotNil: [\\\\n\\\\t\\\\tsamplesPerFrame := codec samplesPerFrame.\\\\n\\\\t\\\\tinBufSize := inBufSize roundUpTo: (2 * samplesPerFrame).\\\\n\\\\t\\\\tcompressed := ByteArray new:\\\\n\\\\t\\\\t\\\\t(inBufSize // samplesPerFrame) * codec bytesPerEncodedFrame].\\\\n\\\\tinBuf := SoundBuffer newMonoSampleCount: inBufSize.\\\\n\\\\toutSamplingRate := streamSamplingRate.\\\\n\\\\tstreamSamplingRate > 22050 ifTrue: [\\\\n\\\\t\\\\tstreamSamplingRate = 44100 ifFalse: [self error: 'unexpected MP3 sampling rate'].\\\\n\\\\t\\\\toutSamplingRate := 22050].\\\\n\\\\n\\\\t\\\\\\\"write audio header\\\\\\\"\\\\n\\\\taudioWriter := SunAudioFileWriter onStream: aBinaryStream.\\\\n\\\\taudioWriter writeHeaderSamplingRate: outSamplingRate format: fmt.\\\\n\\\\n\\\\t\\\\\\\"convert and write sound data\\\\\\\"\\\\n\\\\t'Storing audio...' displayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\tfrom: 0 to: totalSamples during: [:bar |\\\\n\\\\t\\\\t\\\\tsamplesRemaining := totalSamples.\\\\n\\\\t\\\\t\\\\t[samplesRemaining > 0] whileTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tbar value: totalSamples - samplesRemaining.\\\\n\\\\t\\\\t\\\\t\\\\tsamplesRemaining < inBuf monoSampleCount ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tinBuf := SoundBuffer newMonoSampleCount:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(samplesRemaining roundUpTo: 2 * samplesPerFrame)].\\\\n\\\\t\\\\t\\\\t\\\\tmpegFile audioReadBuffer: inBuf stream: 0 channel: 0.\\\\n\\\\t\\\\t\\\\t\\\\toutSamplingRate < streamSamplingRate\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [outBuf := inBuf downSampledLowPassFiltering: true]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [outBuf := inBuf].\\\\n\\\\t\\\\t\\\\t\\\\tcodec\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifNil: [audioWriter appendSamples: outBuf]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifNotNil: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcounts := codec\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tencodeFrames: (outBuf size // samplesPerFrame)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfrom: outBuf at: 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinto: compressed at: 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbyteCount := counts last.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbyteCount = compressed size\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [audioWriter appendBytes: compressed]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [audioWriter appendBytes: (compressed copyFrom: 1 to: byteCount)]].\\\\n\\\\t\\\\t\\\\t\\\\tsamplesRemaining := samplesRemaining - inBuf monoSampleCount]].\\\\n\\\\n\\\\t\\\\\\\"update audio header\\\\\\\"\\\\n\\\\taudioWriter updateHeaderDataSize.\\\\n! !\\\\n\\\\n\\\\n!StreamingMP3Sound methodsFor: 'file ops' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\ncloseFile\\\\n\\\\t\\\\\\\"Close the MP3 or MPEG file.\\\\\\\"\\\\n\\\\n\\\\tself pause.\\\\n\\\\tmpegFile ifNil: [^ self].\\\\n\\\\tmpegFile closeFile.\\\\n\\\\tmpegFile := nil.\\\\n\\\\tmixer := nil.\\\\n! !\\\\n\\\\n!StreamingMP3Sound methodsFor: 'file ops' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nmpegFileIsOpen\\\\n\\\\t\\\\\\\"Answer true if I have an open, valid MPEG file handle. If the handle is not valid, try to re-open the file.\\\\\\\"\\\\n\\\\n\\\\tmpegFile ifNil: [^ false].\\\\n\\\\tmpegFile fileHandle ifNil: [\\\\n\\\\t\\\\t\\\\\\\"try to reopen the file, which may have been saved in a snapshot\\\\\\\"\\\\n\\\\t\\\\tmpegFile openFile: mpegFile fileName.\\\\n\\\\t\\\\tmpegFile fileHandle ifNil: [mpegFile := nil]].\\\\n\\\\t^ mpegFile notNil\\\\n! !\\\\n\\\\n\\\\n!StreamingMP3Sound methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\ninitMPEGFile: anMPEGFile streamIndex: anInteger\\\\n\\\\t\\\\\\\"Initialize for playing the given stream of the given MPEG or MP3 file.\\\\\\\"\\\\n\\\\n\\\\tvolume := 0.3.\\\\n\\\\trepeat := false.\\\\n\\\\tmpegFile := anMPEGFile.\\\\n\\\\tmpegStreamIndex := anInteger.\\\\n\\\\ttotalSamples := mpegFile audioSamples: mpegStreamIndex.\\\\n\\\\tself reset.\\\\n! !\\\\n\\\\n\\\\n!StreamingMP3Sound methodsFor: 'playing' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nmillisecondsSinceStart\\\\n\\\\t\\\\\\\"Answer the number of milliseconds since this sound started playing.\\\\\\\"\\\\n\\\\n\\\\t| i mSecs |\\\\n\\\\tmpegFile ifNil: [^ 0].\\\\n\\\\tmpegFile fileHandle ifNil: [^ 0].  \\\\\\\"mpeg file not open\\\\\\\"\\\\n\\\\ti := mpegFile audioGetSample: mpegStreamIndex.\\\\n\\\\ti < 0 ifTrue: [^ 0].  \\\\\\\"movie file has no audio\\\\\\\"\\\\n\\\\tmSecs := i * 1000 // streamSamplingRate.\\\\n\\\\t(self isPlaying and: [lastBufferMSecs > 0]) ifTrue: [\\\\n\\\\t\\\\t\\\\\\\"adjust mSecs by the milliseconds since the last buffer\\\\\\\"\\\\n\\\\t\\\\tmutex critical: [\\\\n\\\\t\\\\t\\\\tmSecs := i * 1000 // streamSamplingRate.\\\\n\\\\t\\\\t\\\\tmSecs := mSecs + ((Time millisecondClockValue - lastBufferMSecs) max: 0)]].\\\\n\\\\t^ mSecs + 350 - (2 * SoundPlayer bufferMSecs)\\\\n! !\\\\n\\\\n!StreamingMP3Sound methodsFor: 'playing' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nplaySampleCount: n into: aSoundBuffer startingAt: startIndex\\\\n\\\\t\\\\\\\"Mix the next n samples of this sound into the given buffer starting at the given index\\\\\\\"\\\\n\\\\n\\\\t| current |\\\\n\\\\tself repeat ifTrue: [  \\\\\\\"loop if necessary\\\\\\\"\\\\n\\\\t\\\\tcurrent := mpegFile audioGetSample: mpegStreamIndex.\\\\n\\\\t\\\\t(totalSamples - current) < n ifTrue: [\\\\n\\\\t\\\\t\\\\tmpegFile audioSetSample: 0 stream: mpegStreamIndex]].\\\\n\\\\n\\\\tmutex critical: [\\\\n\\\\t\\\\tlastBufferMSecs := Time millisecondClockValue.\\\\n\\\\t\\\\tself loadBuffersForSampleCount: (n * streamSamplingRate) // SoundPlayer samplingRate.\\\\n\\\\t\\\\tmixer playSampleCount: n into: aSoundBuffer startingAt: startIndex].\\\\n! !\\\\n\\\\n!StreamingMP3Sound methodsFor: 'playing' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nreset\\\\n\\\\n\\\\tsuper reset.\\\\n\\\\tself createMixer.\\\\n\\\\tmpegFile audioSetSample: 0 stream: mpegStreamIndex.\\\\n\\\\tlastBufferMSecs := 0.\\\\n\\\\tmutex := Semaphore forMutualExclusion.\\\\n! !\\\\n\\\\n!StreamingMP3Sound methodsFor: 'playing' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nsamplesRemaining\\\\n\\\\n\\\\t| samplesPlayed |\\\\n\\\\tmpegFile ifNil: [^ 0].\\\\n\\\\tself repeat ifTrue: [^ 1000000].\\\\n\\\\tsamplesPlayed := mpegFile audioGetSample: mpegStreamIndex.\\\\n\\\\tsamplesPlayed > totalSamples ifTrue: [^ 0].\\\\n\\\\t^ totalSamples - samplesPlayed\\\\n! !\\\\n\\\\n\\\\n!StreamingMP3Sound methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\ncreateMixer\\\\n\\\\t\\\\\\\"Create a mixed sound consisting of sampled sounds with one sound buffer's worth of samples. The sound has the same sampling rate and number of channels as the MPEG or MP3 file.\\\\\\\"\\\\n\\\\n\\\\t| channels pan snd |\\\\n\\\\tmpegFile ifNil: [^ self error: 'No MPEG or MP3 file'].\\\\n\\\\tchannels := mpegFile audioChannels: mpegStreamIndex.\\\\n\\\\tstreamSamplingRate := mpegFile audioSampleRate: mpegStreamIndex.\\\\n\\\\tmixer := MixedSound new.\\\\n\\\\t1 to: channels do: [:c |\\\\n\\\\t\\\\tchannels = 1\\\\n\\\\t\\\\t\\\\tifTrue: [pan := 0.5]\\\\n\\\\t\\\\t\\\\tifFalse: [pan := (c - 1) asFloat / (channels - 1)].\\\\n\\\\t\\\\tsnd := SampledSound\\\\n\\\\t\\\\t\\\\tsamples: (SoundBuffer newMonoSampleCount: 2)  \\\\\\\"buffer size will be adjusted dynamically\\\\\\\"\\\\n\\\\t\\\\t\\\\tsamplingRate: streamSamplingRate.\\\\n\\\\t\\\\tmixer add: snd pan: pan volume: volume].\\\\n! !\\\\n\\\\n!StreamingMP3Sound methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nloadBuffersForSampleCount: count\\\\n        \\\\\\\"Load the sound buffers for all tracks with the next count\\\\nsamples from the MPEG\\\\nfile sound track.\\\\\\\"\\\\n\\\\n        | snd buf |\\\\n        1 to: mixer sounds size do: [:i |\\\\n                snd := mixer sounds at: i.\\\\n                buf := snd samples.\\\\n                buf monoSampleCount = count ifFalse: [\\\\n                        buf := SoundBuffer newMonoSampleCount: count.\\\\n                        snd setSamples: buf samplingRate:\\\\nstreamSamplingRate].\\\\n                i = 1 ifTrue: [  \\\\\\\"first channel\\\\\\\"\\\\n                                mpegFile\\\\n                                        audioReadBuffer: buf\\\\n                                        stream: mpegStreamIndex\\\\n                                        channel: 0]\\\\n                        ifFalse: [  \\\\\\\"all other channels\\\\\\\"\\\\n                                mpegFile\\\\n                                        audioReReadBuffer: buf\\\\n                                        stream: mpegStreamIndex\\\\n                                        channel: 1]].\\\\n        mixer reset.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStreamingMP3Sound class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StreamingMP3Sound class methodsFor: 'instance creation' stamp: 'stephaneducasse 2/4/2006 20:48'!\\\\nonFileNamed: fileName\\\\n\\\\t\\\\\\\"Answer an instance of me for playing the sound track of the MPEG or MP3 file with the given name. Answer nil the file is not a valid MPEG or MP3 file.\\\\\\\"\\\\n\\\\n\\\\t| mpegFile |\\\\n\\\\t(MPEGFile isFileValidMPEG: fileName) ifFalse: [^ nil].\\\\n\\\\tmpegFile := MPEGFile openFile: fileName.\\\\n\\\\t^ self new initMPEGFile: mpegFile streamIndex: 0  \\\\\\\"assume sound track is in stream 0\\\\\\\"\\\\n! !\\\\nAbstractSound subclass: #StreamingMonoSound\\\\n\\\\tinstanceVariableNames: 'stream volume repeat headerStart audioDataStart streamSamplingRate totalSamples codec mixer leftoverSamples lastBufferMSecs mutex'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Sound-Synthesis'!\\\\n!StreamingMonoSound commentStamp: '<historical>' prior: 0!\\\\nI implement a streaming player for monophonic Sun (.au) and AIFF (.aif) audio files.\\\\nExample of use:\\\\n\\\\t(StreamingMonoSound onFileNamed: 'song.aif') play.\\\\n!\\\\n\\\\n\\\\n!StreamingMonoSound methodsFor: 'accessing' stamp: 'jm 11/16/2001 17:12'!\\\\nduration\\\\n\\\\t\\\\\\\"Answer the duration of this sound in seconds.\\\\\\\"\\\\n\\\\n\\\\t^ totalSamples asFloat / streamSamplingRate\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'accessing' stamp: 'jm 10/18/2001 15:46'!\\\\nrepeat\\\\n\\\\t\\\\\\\"Answer the repeat flag.\\\\\\\"\\\\n\\\\n\\\\t^ repeat\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nrepeat: aBoolean\\\\n\\\\t\\\\\\\"Set the repeat flag. If true, this sound will loop back to the beginning when it gets to the end.\\\\\\\"\\\\n\\\\n\\\\trepeat := aBoolean.\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'accessing' stamp: 'jm 11/16/2001 17:05'!\\\\nsoundPosition\\\\n\\\\t\\\\\\\"Answer the relative position of sound playback as a number between 0.0 and 1.0.\\\\\\\"\\\\n\\\\n\\\\t(stream isNil or: [stream closed]) ifTrue: [^ 0.0].\\\\n\\\\t^ self currentSampleIndex asFloat / totalSamples\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nsoundPosition: fraction\\\\n\\\\t\\\\\\\"Jump to the position the given fraction through the sound file. The argument is a number between 0.0 and 1.0.\\\\\\\"\\\\n\\\\n\\\\t| desiredSampleIndex |\\\\n\\\\t(stream isNil or: [stream closed]) ifTrue: [^ self].\\\\n\\\\tdesiredSampleIndex := ((totalSamples * fraction) truncated max: 0) min: totalSamples.\\\\n\\\\tcodec\\\\n\\\\t\\\\tifNil: [stream position: audioDataStart + (desiredSampleIndex * 2)]\\\\n\\\\t\\\\tifNotNil: [self positionCodecTo: desiredSampleIndex].\\\\n\\\\tleftoverSamples := SoundBuffer new.\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'accessing' stamp: 'jm 11/20/2001 16:59'!\\\\nstreamSamplingRate\\\\n\\\\t\\\\\\\"Answer the sampling rate of the MP3 stream.\\\\\\\"\\\\n\\\\n\\\\t^ streamSamplingRate\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'accessing' stamp: 'jm 9/26/2000 07:49'!\\\\nvolume\\\\n\\\\t\\\\\\\"Answer my volume.\\\\\\\"\\\\n\\\\n\\\\t^ volume\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'accessing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nvolume: aNumber\\\\n\\\\t\\\\\\\"Set my volume to the given number between 0.0 and 1.0.\\\\\\\"\\\\n\\\\n\\\\tvolume := aNumber.\\\\n\\\\tself createMixer.\\\\n! !\\\\n\\\\n\\\\n!StreamingMonoSound methodsFor: 'converting' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nsaveAsFileNamed: newFileName compressionType: compressionTypeString\\\\n\\\\t\\\\\\\"Store this sound in a new file with the given name using the given compression type. Useful for converting between compression formats.\\\\\\\"\\\\n\\\\n\\\\t| outFile |\\\\n\\\\toutFile := (FileStream newFileNamed: newFileName) binary.\\\\n\\\\tself storeSunAudioOn: outFile compressionType: compressionTypeString.\\\\n\\\\toutFile close.\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'converting' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nstoreSunAudioOn: aBinaryStream compressionType: compressionName\\\\n\\\\t\\\\\\\"Store myself on the given stream as a monophonic sound compressed with the given type of compression. The sampling rate is reduced to 22050 samples/second if it is higher.\\\\\\\"\\\\n\\\\n\\\\t| fmt inBufSize samplesPerFrame outCodec compressed outSamplingRate audioWriter samplesRemaining inBuf outBuf counts byteCount |\\\\n\\\\tself pause; reset.  \\\\\\\"stop playing and return to beginning\\\\\\\"\\\\n\\\\n\\\\tfmt := SunAudioFileWriter formatCodeForCompressionType: compressionName.\\\\n\\\\tinBufSize := 64000.\\\\n\\\\tsamplesPerFrame := 1.\\\\n\\\\toutCodec := SunAudioFileWriter codecForFormatCode: fmt.\\\\n\\\\toutCodec ifNotNil: [\\\\n\\\\t\\\\tsamplesPerFrame := outCodec samplesPerFrame.\\\\n\\\\t\\\\tinBufSize := inBufSize roundUpTo: (2 * samplesPerFrame).\\\\n\\\\t\\\\tcompressed := ByteArray new:\\\\n\\\\t\\\\t\\\\t(inBufSize // samplesPerFrame) * outCodec bytesPerEncodedFrame].\\\\n\\\\toutSamplingRate := streamSamplingRate.\\\\n\\\\tstreamSamplingRate > 22050 ifTrue: [\\\\n\\\\t\\\\tstreamSamplingRate = 44100 ifFalse: [self error: 'unexpected MP3 sampling rate'].\\\\n\\\\t\\\\toutSamplingRate := 22050].\\\\n\\\\n\\\\t\\\\\\\"write audio header\\\\\\\"\\\\n\\\\taudioWriter := SunAudioFileWriter onStream: aBinaryStream.\\\\n\\\\taudioWriter writeHeaderSamplingRate: outSamplingRate format: fmt.\\\\n\\\\n\\\\t\\\\\\\"convert and write sound data\\\\\\\"\\\\n\\\\t'Storing audio...' displayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\tfrom: 0 to: totalSamples during: [:bar |\\\\n\\\\t\\\\t\\\\tsamplesRemaining := totalSamples.\\\\n\\\\t\\\\t\\\\t[samplesRemaining > 0] whileTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tbar value: totalSamples - samplesRemaining.\\\\n\\\\t\\\\t\\\\t\\\\tself loadBuffersForSampleCount: (inBufSize min: samplesRemaining).\\\\n\\\\t\\\\t\\\\t\\\\tinBuf := mixer sounds first samples.\\\\n\\\\t\\\\t\\\\t\\\\toutSamplingRate < streamSamplingRate\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [outBuf := inBuf downSampledLowPassFiltering: true]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [outBuf := inBuf].\\\\n\\\\t\\\\t\\\\t\\\\toutCodec\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifNil: [audioWriter appendSamples: outBuf]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifNotNil: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcounts := outCodec\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tencodeFrames: (outBuf size // samplesPerFrame)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfrom: outBuf at: 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinto: compressed at: 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbyteCount := counts last.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbyteCount = compressed size\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [audioWriter appendBytes: compressed]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [audioWriter appendBytes: (compressed copyFrom: 1 to: byteCount)]].\\\\n\\\\t\\\\t\\\\t\\\\tsamplesRemaining := samplesRemaining - inBuf monoSampleCount]].\\\\n\\\\n\\\\t\\\\\\\"update audio header\\\\\\\"\\\\n\\\\taudioWriter updateHeaderDataSize.\\\\n! !\\\\n\\\\n\\\\n!StreamingMonoSound methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ninitStream: aStream headerStart: anInteger\\\\n\\\\t\\\\\\\"Initialize for streaming from the given stream. The audio file header starts at the given stream position.\\\\\\\"\\\\n\\\\n\\\\tstream := aStream.\\\\n\\\\tvolume := 1.0.\\\\n\\\\trepeat := false.\\\\n\\\\theaderStart := anInteger.\\\\n\\\\tself reset.\\\\n! !\\\\n\\\\n\\\\n!StreamingMonoSound methodsFor: 'other' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ncloseFile\\\\n\\\\t\\\\\\\"Close my stream, if it responds to close.\\\\\\\"\\\\n\\\\n\\\\tstream ifNotNil: [\\\\n\\\\t\\\\t(stream respondsTo: #close) ifTrue: [stream close]].\\\\n\\\\tmixer := nil.\\\\n\\\\tcodec := nil.\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'other' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nextractFrom: startSecs to: endSecs\\\\n\\\\t\\\\\\\"Extract a portion of this sound between the given start and end times. The current implementation only works if the sound is uncompressed.\\\\\\\"\\\\n\\\\n\\\\t| emptySound first last sampleCount byteStream sndBuf |\\\\n\\\\tcodec ifNotNil: [^ self error: 'only works on uncompressed sounds'].\\\\n\\\\temptySound := SampledSound samples: SoundBuffer new samplingRate: streamSamplingRate.\\\\n\\\\tfirst := (startSecs * streamSamplingRate) truncated max: 0.\\\\n\\\\tlast := ((endSecs * streamSamplingRate) truncated min: totalSamples) - 1.\\\\n\\\\tfirst >= last ifTrue: [^ emptySound].\\\\n\\\\tcodec ifNotNil: [self error: 'extracting from compressed sounds is not supported'].\\\\n\\\\tsampleCount := last + 1 - first.\\\\n\\\\tstream position: audioDataStart + (2 * first).\\\\n\\\\tbyteStream := ReadStream on: (stream next: 2 * sampleCount).\\\\n\\\\tsndBuf := SoundBuffer newMonoSampleCount: sampleCount.\\\\n\\\\t1 to: sampleCount do: [:i | sndBuf at: i put: byteStream int16].\\\\n\\\\t^ SampledSound samples: sndBuf samplingRate: streamSamplingRate\\\\n! !\\\\n\\\\n\\\\n!StreamingMonoSound methodsFor: 'playing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nmillisecondsSinceStart\\\\n\\\\t\\\\\\\"Answer the number of milliseconds of this sound started playing.\\\\\\\"\\\\n\\\\n\\\\t| mSecs |\\\\n\\\\t(stream isNil or: [stream closed]) ifTrue: [^ 0].\\\\n\\\\tmSecs := self currentSampleIndex * 1000 // streamSamplingRate.\\\\n\\\\t(self isPlaying and: [lastBufferMSecs > 0]) ifTrue: [\\\\n\\\\t\\\\t\\\\\\\"adjust mSecs by the milliseconds since the last buffer\\\\\\\"\\\\n\\\\t\\\\tmutex critical: [\\\\n\\\\t\\\\t\\\\tmSecs := self currentSampleIndex * 1000 // streamSamplingRate.\\\\n\\\\t\\\\t\\\\tmSecs := mSecs + ((Time millisecondClockValue - lastBufferMSecs) max: 0)]].\\\\n\\\\t^ mSecs + 350 - (2 * SoundPlayer bufferMSecs)\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'playing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nplaySampleCount: n into: aSoundBuffer startingAt: startIndex\\\\n\\\\t\\\\\\\"Mix the next n samples of this sound into the given buffer starting at the given index\\\\\\\"\\\\n\\\\n\\\\tself repeat ifTrue: [  \\\\\\\"loop if necessary\\\\\\\"\\\\n\\\\t\\\\t(totalSamples - self currentSampleIndex) < n ifTrue: [self startOver]].\\\\n\\\\n\\\\tmutex critical: [\\\\n\\\\t\\\\tlastBufferMSecs := Time millisecondClockValue.\\\\n\\\\t\\\\tself loadBuffersForSampleCount: (n * streamSamplingRate) // SoundPlayer samplingRate.\\\\n\\\\t\\\\tmixer playSampleCount: n into: aSoundBuffer startingAt: startIndex].\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'playing' stamp: 'jm 10/21/2001 09:45'!\\\\nreset\\\\n\\\\n\\\\tsuper reset.\\\\n\\\\tself startOver.\\\\n\\\\tself createMixer.\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'playing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nsamplesRemaining\\\\n\\\\t\\\\\\\"Answer the number of samples remaining to be played.\\\\\\\"\\\\n\\\\n\\\\t| result |\\\\n\\\\t(stream isNil or: [stream closed]) ifTrue: [^ 0].\\\\n\\\\tself repeat ifTrue: [^ 1000000].\\\\n\\\\tresult := (totalSamples - self currentSampleIndex) max: 0.\\\\n\\\\tresult <= 0 ifTrue: [self closeFile].\\\\n\\\\t^ result\\\\n! !\\\\n\\\\n\\\\n!StreamingMonoSound methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ncreateMixer\\\\n\\\\t\\\\\\\"Create a mixed sound consisting of sampled sounds with one sound buffer's worth of samples.\\\\\\\"\\\\n\\\\n\\\\t| snd |\\\\n\\\\tmixer := MixedSound new.\\\\n\\\\tsnd := SampledSound\\\\n\\\\t\\\\tsamples: (SoundBuffer newMonoSampleCount: 2)  \\\\\\\"buffer size will be adjusted dynamically\\\\\\\"\\\\n\\\\t\\\\tsamplingRate: streamSamplingRate.\\\\n\\\\tmixer add: snd pan: 0.5 volume: volume.\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\ncurrentSampleIndex\\\\n\\\\t\\\\\\\"Answer the index of the current sample.\\\\\\\"\\\\n\\\\n\\\\t| bytePosition frameIndex |\\\\n\\\\tbytePosition := stream position - audioDataStart.\\\\n\\\\tcodec\\\\n\\\\t\\\\tifNil: [^ bytePosition // 2]\\\\n\\\\t\\\\tifNotNil: [\\\\n\\\\t\\\\t\\\\tframeIndex := bytePosition // codec bytesPerEncodedFrame.\\\\n\\\\t\\\\t\\\\t^ (frameIndex * codec samplesPerFrame) - leftoverSamples monoSampleCount].\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nloadBuffer: aSoundBuffer compressedSampleCount: sampleCount\\\\n\\\\t\\\\\\\"Load the given sound buffer from the compressed sample stream.\\\\\\\"\\\\n\\\\t\\\\\\\"Details: Most codecs decode in multi-sample units called 'frames'. Since the requested sampleCount is typically not an even multiple of the frame size, we need to deal with partial frames. The unused samples from a partial frame are retained until the next call to this method.\\\\\\\"\\\\n\\\\n\\\\t| n samplesNeeded frameCount encodedBytes r decodedCount buf j |\\\\n\\\\t\\\\\\\"first, use any leftover samples\\\\\\\"\\\\n\\\\tn := self loadFromLeftovers: aSoundBuffer sampleCount: sampleCount.\\\\n\\\\tsamplesNeeded := sampleCount - n.\\\\n\\\\tsamplesNeeded <= 0 ifTrue: [^ self].\\\\n\\\\n\\\\t\\\\\\\"decode an integral number of full compression frames\\\\\\\"\\\\n\\\\tframeCount := samplesNeeded // codec samplesPerFrame.\\\\n\\\\tencodedBytes := stream next: (frameCount * codec bytesPerEncodedFrame).\\\\n\\\\tr := codec decodeFrames: frameCount from: encodedBytes at: 1 into: aSoundBuffer at: n + 1.\\\\n\\\\tdecodedCount := r last.\\\\n\\\\tdecodedCount >= samplesNeeded ifTrue: [^ self].\\\\n\\\\n\\\\t\\\\\\\"decode one last compression frame to finish filling the buffer\\\\\\\"\\\\n\\\\tbuf := SoundBuffer newMonoSampleCount: codec samplesPerFrame.\\\\n\\\\tencodedBytes := stream next: codec bytesPerEncodedFrame.\\\\n\\\\tcodec decodeFrames: 1 from: encodedBytes at: 1 into: buf at: 1.\\\\n\\\\tj := 0.\\\\n\\\\t(n + decodedCount + 1) to: sampleCount do: [:i |\\\\n\\\\t\\\\taSoundBuffer at: i put: (buf at: (j := j + 1))].\\\\n\\\\n\\\\t\\\\\\\"save the leftover samples\\\\\\\"\\\\n\\\\tleftoverSamples := buf copyFrom: (j + 1) to: buf monoSampleCount.\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'private' stamp: 'jm 11/21/2001 08:03'!\\\\nloadBuffer: aSoundBuffer uncompressedSampleCount: sampleCount\\\\n\\\\t\\\\\\\"Load the given sound buffer from the uncompressed sample stream.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"read directly into the sample buffer; count is in 32-bit words\\\\\\\"\\\\n\\\\tstream next: sampleCount // 2 into: aSoundBuffer startingAt: 1.\\\\n\\\\taSoundBuffer restoreEndianness.\\\\n\\\\n\\\\t\\\\\\\"read the final sample if sampleCount is odd:\\\\\\\"\\\\n\\\\tsampleCount odd ifTrue: [aSoundBuffer at: sampleCount put: stream int16].\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nloadBuffersForSampleCount: count\\\\n\\\\t\\\\\\\"Load the sound buffers from the stream.\\\\\\\"\\\\n\\\\n\\\\t| snd buf sampleCount |\\\\n\\\\tsnd := mixer sounds first.\\\\n\\\\tbuf := snd samples.\\\\n\\\\tbuf monoSampleCount = count ifFalse: [\\\\n\\\\t\\\\tbuf := SoundBuffer newMonoSampleCount: count.\\\\n\\\\t\\\\tsnd setSamples: buf samplingRate: streamSamplingRate].\\\\n\\\\tsampleCount := count min: (totalSamples - self currentSampleIndex).\\\\n\\\\tsampleCount < count ifTrue: [buf primFill: 0].\\\\n\\\\n\\\\tcodec\\\\n\\\\t\\\\tifNil: [self loadBuffer: buf uncompressedSampleCount: sampleCount]\\\\n\\\\t\\\\tifNotNil: [self loadBuffer: buf compressedSampleCount: sampleCount].\\\\n\\\\n\\\\tmixer reset.\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nloadFromLeftovers: aSoundBuffer sampleCount: sampleCount\\\\n\\\\t\\\\\\\"Load the given sound buffer from the samples leftover from the last frame. Answer the number of samples loaded, which typically is less than sampleCount.\\\\\\\"\\\\n\\\\n\\\\t| leftoverCount n |\\\\n\\\\tleftoverCount := leftoverSamples monoSampleCount.\\\\n\\\\tleftoverCount = 0 ifTrue: [^ 0].\\\\n\\\\n\\\\tn := leftoverCount min: sampleCount.\\\\n\\\\t1 to: n do: [:i | aSoundBuffer at: i put: (leftoverSamples at: i)].\\\\n\\\\tn < sampleCount\\\\n\\\\t\\\\tifTrue: [leftoverSamples := SoundBuffer new]\\\\n\\\\t\\\\tifFalse: [leftoverSamples := leftoverSamples copyFrom: n + 1 to: leftoverSamples size].\\\\n\\\\t^ n\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\npositionCodecTo: desiredSampleIndex\\\\n\\\\t\\\\\\\"Position to the closest frame before the given sample index when using a codec. If using the ADPCM codec, try to ensure that it is in sync with the compressed sample stream.\\\\\\\"\\\\n\\\\n\\\\t| desiredFrameIndex desiredPosition tmpStream tmpCodec byteBuf bufFrames sampleBuf frameCount n startOffset |\\\\n\\\\t(codec isKindOf: ADPCMCodec) ifFalse: [\\\\n\\\\t\\\\t\\\\\\\"stateless codecs (or relatively stateless ones, like GSM: just jump to frame boundary\\\\\\\"\\\\n\\\\t\\\\tdesiredFrameIndex := desiredSampleIndex // codec samplesPerFrame.\\\\n\\\\t\\\\tstream position: audioDataStart + (desiredFrameIndex * codec bytesPerEncodedFrame).\\\\n\\\\t\\\\tcodec reset.\\\\n\\\\t\\\\t^ self].\\\\n\\\\n\\\\t\\\\\\\"compute the desired stream position\\\\\\\"\\\\n\\\\tdesiredFrameIndex := desiredSampleIndex // codec samplesPerFrame.\\\\n\\\\tdesiredPosition := audioDataStart + (desiredFrameIndex * codec bytesPerEncodedFrame).\\\\n\\\\n\\\\t\\\\\\\"copy stream and codec\\\\\\\"\\\\n\\\\t(stream isKindOf: FileStream)\\\\n\\\\t\\\\tifTrue: [tmpStream := (FileStream readOnlyFileNamed: stream name) binary]\\\\n\\\\t\\\\tifFalse: [tmpStream := stream deepCopy].\\\\n\\\\ttmpCodec := codec copy reset.\\\\n\\\\n\\\\t\\\\\\\"reset the codec and start back about 30 seconds to try to get codec in sync\\\\\\\"\\\\n\\\\tstartOffset := ((desiredFrameIndex - 80000) max: 0) * codec bytesPerEncodedFrame.\\\\n\\\\ttmpStream position: audioDataStart + startOffset.\\\\n\\\\n\\\\t\\\\\\\"decode forward to the desired position\\\\\\\"\\\\n\\\\tbyteBuf := ByteArray new: (32000 roundTo: codec bytesPerEncodedFrame).\\\\n\\\\tbufFrames := byteBuf size // codec bytesPerEncodedFrame.\\\\n\\\\tsampleBuf := SoundBuffer newMonoSampleCount: bufFrames * codec samplesPerFrame.\\\\n\\\\tframeCount := (desiredPosition - tmpStream position) // codec bytesPerEncodedFrame.\\\\n\\\\t[frameCount > 0] whileTrue: [\\\\n\\\\t\\\\tn := bufFrames min: frameCount.\\\\n\\\\t\\\\ttmpStream next: n * codec bytesPerEncodedFrame into: byteBuf startingAt: 1.\\\\n\\\\t\\\\ttmpCodec decodeFrames: n from: byteBuf at: 1 into: sampleBuf at: 1.\\\\n\\\\t\\\\tframeCount := frameCount - n].\\\\n\\\\n\\\\tcodec := tmpCodec.\\\\n\\\\tstream position: tmpStream position.\\\\n\\\\t(tmpStream isKindOf: FileStream) ifTrue: [tmpStream close].! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nreadAIFFHeader\\\\n\\\\t\\\\\\\"Read an AIFF file header from stream.\\\\\\\"\\\\n\\\\n\\\\t| aiffReader |\\\\n\\\\taiffReader := AIFFFileReader new.\\\\n\\\\taiffReader readFromStream: stream mergeIfStereo: false skipDataChunk: true.\\\\n\\\\taiffReader channelCount = 1 ifFalse: [self error: 'not monophonic'].\\\\n\\\\taiffReader bitsPerSample = 16 ifFalse: [self error: 'not 16-bit'].\\\\n\\\\n\\\\taudioDataStart := headerStart + aiffReader channelDataOffset.\\\\n\\\\tstreamSamplingRate := aiffReader samplingRate.\\\\n\\\\ttotalSamples := aiffReader frameCount min: (stream size - audioDataStart) // 2.\\\\n\\\\tcodec := nil.\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nreadHeader\\\\n\\\\t\\\\\\\"Read the sound file header from my stream.\\\\\\\"\\\\n\\\\n\\\\t| id |\\\\n\\\\tstream position: headerStart.\\\\n\\\\tid := (stream next: 4) asString.\\\\n\\\\tstream position: headerStart.\\\\n\\\\tid = '.snd' ifTrue: [^ self readSunAudioHeader].\\\\n\\\\tid = 'FORM' ifTrue: [^ self readAIFFHeader].\\\\n\\\\tself error: 'unrecognized sound file format'.\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nreadSunAudioHeader\\\\n\\\\t\\\\\\\"Read a Sun audio file header from my stream.\\\\\\\"\\\\n\\\\n\\\\t| id headerBytes dataBytes format channelCount |\\\\n\\\\tid := (stream next: 4) asString.\\\\n\\\\theaderBytes := stream uint32.  \\\\\\\"header bytes\\\\\\\"\\\\n\\\\tdataBytes := stream uint32.\\\\n\\\\tformat := stream uint32.\\\\n\\\\tstreamSamplingRate := stream uint32.\\\\n\\\\tchannelCount := stream uint32.\\\\n\\\\n\\\\tid = '.snd' ifFalse: [self error: 'not Sun audio format'].\\\\n\\\\tdataBytes := dataBytes min: (stream size - headerBytes).\\\\n\\\\tchannelCount = 1 ifFalse: [self error: 'not monophonic'].\\\\n\\\\taudioDataStart := headerStart + headerBytes.\\\\n\\\\tcodec := nil.\\\\n\\\\tformat = 1 ifTrue: [  \\\\\\\"8-bit u-LAW\\\\\\\"\\\\n\\\\t\\\\tcodec := MuLawCodec new.\\\\n\\\\t\\\\ttotalSamples := dataBytes.\\\\n\\\\t\\\\t^ self].\\\\n\\\\tformat = 3 ifTrue: [  \\\\\\\"16-bit linear\\\\\\\"\\\\n\\\\t\\\\ttotalSamples := dataBytes // 2.\\\\n\\\\t\\\\t^ self].\\\\n\\\\tformat = 23 ifTrue: [  \\\\\\\"ADPCM-4 bit (CCITT G.721)\\\\\\\"\\\\n\\\\t\\\\tcodec := ADPCMCodec new\\\\n\\\\t\\\\t\\\\tinitializeForBitsPerSample: 4 samplesPerFrame: 0.\\\\n\\\\t\\\\ttotalSamples := (dataBytes // 4) * 8.\\\\n\\\\t\\\\t^ self].\\\\n\\\\tformat = 25 ifTrue: [  \\\\\\\"ADPCM-3 bit (CCITT G.723)\\\\\\\"\\\\n\\\\t\\\\tcodec := ADPCMCodec new\\\\n\\\\t\\\\t\\\\tinitializeForBitsPerSample: 3 samplesPerFrame: 0.\\\\n\\\\t\\\\ttotalSamples := (dataBytes // 3) * 8.\\\\n\\\\t\\\\t^ self].\\\\n\\\\tformat = 26 ifTrue: [  \\\\\\\"ADPCM-5 bit (CCITT G.723)\\\\\\\"\\\\n\\\\t\\\\tcodec := ADPCMCodec new\\\\n\\\\t\\\\t\\\\tinitializeForBitsPerSample: 5 samplesPerFrame: 0.\\\\n\\\\t\\\\ttotalSamples := (dataBytes // 5) * 8.\\\\n\\\\t\\\\t^ self].\\\\n\\\\tformat = 610 ifTrue: [  \\\\\\\"GSM 06.10 (this format was added by Squeak)\\\\\\\"\\\\n\\\\t\\\\tcodec := GSMCodec new.\\\\n\\\\t\\\\ttotalSamples := (dataBytes // 33) * 160.\\\\n\\\\t\\\\t^ self].\\\\n\\\\tself error: 'unsupported Sun audio format ', format printString\\\\n! !\\\\n\\\\n!StreamingMonoSound methodsFor: 'private' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nstartOver\\\\n\\\\t\\\\\\\"Jump back to the first sample.\\\\\\\"\\\\n\\\\n\\\\tstream reopen; binary.\\\\n\\\\tself readHeader.\\\\n\\\\tstream position: audioDataStart.\\\\n\\\\tleftoverSamples := SoundBuffer new.\\\\n\\\\tlastBufferMSecs := 0.\\\\n\\\\tmutex := Semaphore forMutualExclusion.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStreamingMonoSound class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StreamingMonoSound class methodsFor: 'instance creation' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nonFileNamed: fileName\\\\n\\\\t\\\\\\\"Answer an instance of me for playing the file with the given name.\\\\\\\"\\\\n\\\\n\\\\t| f |\\\\n\\\\tf := FileDirectory default readOnlyFileNamed: fileName.\\\\n\\\\tf ifNil: [^ self error: 'could not open ', fileName].\\\\n\\\\t^ self new initStream: f headerStart: 0\\\\n! !\\\\n\\\\n!StreamingMonoSound class methodsFor: 'instance creation' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nonFileNamed: fileName headerStart: anInteger\\\\n\\\\t\\\\\\\"Answer an instance of me for playing audio data starting at the given position in the file with the given name.\\\\\\\"\\\\n\\\\n\\\\t| f |\\\\n\\\\tf := FileDirectory default readOnlyFileNamed: fileName.\\\\n\\\\tf ifNil: [^ self error: 'could not open ', fileName].\\\\n\\\\t^ self new initStream: f headerStart: anInteger\\\\n! !\\\\nAlignmentMorphBob1 subclass: #StretchyImageMorph\\\\n\\\\tinstanceVariableNames: 'form cache'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'EToys-Experimental'!\\\\n!StretchyImageMorph commentStamp: '<historical>' prior: 0!\\\\nI draw a form to fill whatever bounds I have.!\\\\n\\\\n\\\\n!StretchyImageMorph methodsFor: 'as yet unclassified' stamp: 'RAA 7/10/2000 16:20'!\\\\nform: aForm\\\\n\\\\n\\\\tform _ aForm! !\\\\n\\\\n\\\\n!StretchyImageMorph methodsFor: 'drawing' stamp: 'nk 1/3/2004 17:40'!\\\\ndrawOn: aCanvas\\\\n| t |\\\\n\\\\\\\"\\\\nSmalltalk at: #Q4 put: OrderedCollection new.\\\\n\\\\\\\"\\\\n\\\\tform ifNil: [form _ (Form extent: 32@32 depth: 8) fillColor: Color green].\\\\n\\\\t(cache isNil or: [cache extent ~= bounds extent]) ifTrue: [\\\\n\\\\t\\\\tt _ [cache _ Form extent: bounds extent depth: form depth.\\\\n\\\\t\\\\tform displayInterpolatedIn: cache boundingBox on: cache.\\\\n\\\\t\\\\tcache _ cache asFormOfDepth: aCanvas depth] timeToRun.\\\\n\\\\t\\\\t\\\\\\\"Q4 add: {t. form. cache}.\\\\\\\"\\\\n\\\\t].\\\\n\\\\taCanvas paintImage: cache at: bounds origin.\\\\n! !\\\\n\\\\n\\\\n!StretchyImageMorph methodsFor: 'initialization' stamp: 'ar 10/30/2000 15:31'!\\\\ninitialize\\\\n\\\\n\\\\tsuper initialize.\\\\n\\\\tself hResizing: #spaceFill.\\\\n\\\\tself vResizing: #spaceFill.\\\\n! !\\\\nAbstractFont subclass: #StrikeFont\\\\n\\\\tinstanceVariableNames: 'characterToGlyphMap xTable glyphs name type minAscii maxAscii maxWidth strikeLength ascent descent xOffset raster subscript superscript emphasis derivativeFonts pointSize fallbackFont charIndex'\\\\n\\\\tclassVariableNames: 'DefaultStringScanner'\\\\n\\\\tpoolDictionaries: 'TextConstants'\\\\n\\\\tcategory: 'Graphics-Fonts'!\\\\n!StrikeFont commentStamp: '<historical>' prior: 0!\\\\nI represent a compact encoding of a set of Forms corresponding to characters in the ASCII character set. All the forms are placed side by side in a large form whose height is the font height, and whose width is the sum of all the character widths. The xTable variable gives the left-x coordinates of the subforms corresponding to the glyphs. Characters are mapped to glyphs by using the characterToGyphMap.\\\\n\\\\nSubclasses can have non-trivial mapping rules as well as different representations for glyphs sizes (e.g., not using an xTable). If so, these classes should return nil when queried for xTable and/or the characterToGlyphMap. This will cause the CharacterScanner primitive to fail and query the font for the width of a character (so that a more programatical approach can be implemented).\\\\n\\\\nFor display, fonts need to implement two messages:\\\\n\\\\t#installOn: aDisplayContext foregroundColor: foregroundColor backgroundColor: backgroundColor\\\\nThis method installs the receiver (a font) on the given DisplayContext (which may be an instance of BitBlt or Canvas (or any of it's subclasses). The font should take the appropriate action to initialize the display context so that further display operations can be optimized.\\\\n\\\\t#displayString: aString on: aDisplayContext from: startIndex to: stopIndex at: aPoint kern: kernDelta\\\\nThis method is called for each subsequent run of characters in aString which is to be displayed with the (previously installed) settings.\\\\n!\\\\n\\\\n\\\\n!StrikeFont methodsFor: 'accessing'!\\\\nascent\\\\n\\\\t\\\\\\\"Answer the receiver's maximum extent of characters above the baseline.\\\\\\\"\\\\n\\\\n\\\\t^ascent! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'di 9/2/2000 13:06'!\\\\nascentKern\\\\n\\\\t\\\\\\\"Return the kern delta for ascenders.\\\\\\\"\\\\n\\\\t(emphasis noMask: 2) ifTrue: [^ 0].\\\\n\\\\t^ (self ascent-5+4)//4 max: 0  \\\\\\\"See makeItalicGlyphs\\\\\\\"\\\\n\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'yo 1/6/2005 04:19'!\\\\nascentOf: aCharacter\\\\n\\\\n\\\\t(self hasGlyphOf: aCharacter) ifFalse: [\\\\n\\\\t\\\\tfallbackFont ifNotNil: [\\\\n\\\\t\\\\t\\\\t^ fallbackFont ascentOf: aCharacter.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\t^ self ascent.\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'di 9/1/2000 17:17'!\\\\nbaseKern\\\\n\\\\t\\\\\\\"Return the base kern value to be used for all characters.\\\\\\\"\\\\n\\\\t(emphasis noMask: 2) ifTrue: [^ 0].\\\\n\\\\t^ ((self height-1-self ascent+4)//4 max: 0)  \\\\\\\"See makeItalicGlyphs\\\\\\\"\\\\n\\\\t\\\\t+ (((self ascent-5+4)//4 max: 0))\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'ar 5/23/2000 12:52'!\\\\ncharacterToGlyphMap\\\\n\\\\t^characterToGlyphMap ifNil:[characterToGlyphMap _ self createCharacterToGlyphMap].! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'ar 5/23/2000 12:52'!\\\\ncharacterToGlyphMap: anArray\\\\n\\\\tcharacterToGlyphMap _ anArray.! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'nk 3/15/2004 18:57'!\\\\nderivativeFonts\\\\n\\\\t^derivativeFonts copyWithout: nil! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing'!\\\\ndescent\\\\n\\\\t\\\\\\\"Answer the receiver's maximum extent of characters below the baseline.\\\\\\\"\\\\n\\\\n\\\\t^descent! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'di 9/2/2000 13:06'!\\\\ndescentKern\\\\n\\\\t\\\\\\\"Return the kern delta for descenders.\\\\\\\"\\\\n\\\\t(emphasis noMask: 2) ifTrue: [^ 0].\\\\n\\\\t^ (self height-1-self ascent+4)//4 max: 0  \\\\\\\"See makeItalicGlyphs\\\\\\\"\\\\n\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'yo 1/6/2005 04:19'!\\\\ndescentOf: aCharacter\\\\n\\\\n\\\\t(self hasGlyphOf: aCharacter) ifFalse: [\\\\n\\\\t\\\\tfallbackFont ifNotNil: [\\\\n\\\\t\\\\t\\\\t^ fallbackFont descentOf: aCharacter.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\t^ self descent.\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'tak 12/22/2004 01:25'!\\\\nfallbackFont\\\\n\\\\t^ fallbackFont\\\\n\\\\t\\\\tifNil: [fallbackFont _ FixedFaceFont new errorFont fontSize: self height]! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'yo 5/20/2004 11:01'!\\\\nfallbackFont: aFontSetOrNil\\\\n\\\\n\\\\tfallbackFont _ aFontSetOrNil.\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing'!\\\\nfamilyName\\\\n\\\\t^self name withoutTrailingDigits.\\\\n\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'tk 6/26/1998 16:45'!\\\\nfamilySizeFace\\\\n\\\\t\\\\\\\"Answer an array with familyName, a String, pointSize, an Integer, and\\\\n\\\\tfaceCode, an Integer.\\\\\\\"\\\\n\\\\n\\\\t^Array with: name\\\\n\\\\t\\\\twith: self height\\\\n\\\\t\\\\twith: emphasis\\\\n\\\\n\\\\t\\\\\\\"(1 to: 12) collect: [:x | (TextStyle default fontAt: x) familySizeFace]\\\\\\\"! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'ar 9/21/2000 11:53'!\\\\nfontNameWithPointSize\\\\n\\\\t^self name withoutTrailingDigits, ' ', self pointSize printString! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'yo 1/7/2005 11:15'!\\\\nglyphInfoOf: aCharacter into: glyphInfoArray\\\\n\\\\t\\\\\\\"Answer the width of the argument as a character in the receiver.\\\\\\\"\\\\n\\\\n\\\\t| code |\\\\n\\\\t(self hasGlyphOf: aCharacter) ifFalse: [\\\\n\\\\t\\\\tfallbackFont ifNotNil: [\\\\n\\\\t\\\\t\\\\t^ fallbackFont glyphInfoOf: aCharacter into: glyphInfoArray.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tcode _ 0.\\\\n\\\\t] ifTrue: [\\\\n\\\\t\\\\tcode _ aCharacter charCode.\\\\n\\\\t].\\\\n\\\\tglyphInfoArray at: 1 put: glyphs;\\\\n\\\\t\\\\tat: 2 put: (xTable at: code + 1);\\\\n\\\\t\\\\tat: 3 put: (xTable at: code + 2);\\\\n\\\\t\\\\tat: 4 put: (self ascentOf: aCharacter);\\\\n\\\\t\\\\tat: 5 put: self.\\\\n\\\\t^ glyphInfoArray.\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'yo 1/6/2005 04:19'!\\\\nglyphOf: aCharacter \\\\n\\\\t\\\\\\\"Answer the width of the argument as a character in the receiver.\\\\\\\"\\\\n\\\\n\\\\t| code |\\\\n\\\\t(self hasGlyphOf: aCharacter) ifFalse: [\\\\n\\\\t\\\\tfallbackFont ifNotNil: [\\\\n\\\\t\\\\t\\\\t^ fallbackFont glyphOf: aCharacter.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\t^ (Form extent: 1@self height) fillColor: Color white\\\\n\\\\t].\\\\n\\\\tcode _ aCharacter charCode.\\\\n\\\\t^ glyphs copy: (((xTable at: code + 1)@0) corner: (xTable at: code +2)@self height).\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing'!\\\\nglyphs\\\\n\\\\t\\\\\\\"Answer a Form containing the bits representing the characters of the \\\\n\\\\treceiver.\\\\\\\"\\\\n\\\\n\\\\t^glyphs! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing'!\\\\nheight\\\\n\\\\t\\\\\\\"Answer the height of the receiver, total of maximum extents of \\\\n\\\\tcharacters above and below the baseline.\\\\\\\"\\\\n\\\\n\\\\t^self ascent + self descent! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'yo 1/6/2005 04:19'!\\\\nheightOf: aCharacter\\\\n\\\\n\\\\t(self hasGlyphOf: aCharacter) ifFalse: [\\\\n\\\\t\\\\tfallbackFont ifNotNil: [\\\\n\\\\t\\\\t\\\\t^ fallbackFont heightOf: aCharacter.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\t^ self height.\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing'!\\\\nlineGrid\\\\n\\\\t^ ascent + descent! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing'!\\\\nmaxAscii\\\\n\\\\t\\\\\\\"Answer the integer that is the last Ascii character value of the receiver.\\\\\\\"\\\\n\\\\n\\\\t^maxAscii! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing'!\\\\nmaxWidth\\\\n\\\\t\\\\\\\"Answer the integer that is the width of the receiver's widest character.\\\\\\\"\\\\n\\\\n\\\\t^maxWidth! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing'!\\\\nminAscii\\\\n\\\\t\\\\\\\"Answer the integer that is the first Ascii character value of the receiver.\\\\\\\"\\\\n\\\\n\\\\t^minAscii! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'ls 3/27/2000 19:54'!\\\\nname\\\\n\\\\t\\\\\\\"Answer the receiver's name.\\\\\\\"\\\\n\\\\n\\\\t^name ifNil: ['(unnamed)']! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing'!\\\\nname: aString\\\\n\\\\t\\\\\\\"Set the receiver's name.\\\\\\\"\\\\n\\\\n\\\\tname _ aString! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'sw 1/18/2000 20:54'!\\\\npointSize\\\\n\\\\t^ pointSize! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'sma 5/5/2000 14:21'!\\\\npointSize: anInteger\\\\n\\\\tpointSize _ anInteger! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing'!\\\\nraster\\\\n\\\\t\\\\\\\"Answer an integer that specifies the layout of the glyphs' form.\\\\\\\"\\\\n\\\\n\\\\t^raster! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing'!\\\\nsetGlyphs: newGlyphs\\\\n\\\\t\\\\\\\"Replace the glyphs form.  Used to make a synthetic bold or italic font quickly.\\\\\\\"\\\\n\\\\n\\\\tglyphs _ newGlyphs! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing'!\\\\nsubscript\\\\n\\\\t\\\\\\\"Answer an integer that is the further vertical offset relative to the \\\\n\\\\tbaseline for positioning characters as subscripts.\\\\\\\"\\\\n\\\\n\\\\t^subscript! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing'!\\\\nsuperscript\\\\n\\\\t\\\\\\\"Answer an integer that is the further vertical offset relative to the \\\\n\\\\tbaseline for positioning characters as superscripts.\\\\\\\"\\\\n\\\\n\\\\t^superscript! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'nk 6/17/2003 14:26'!\\\\ntextStyle\\\\n\\\\t^ TextStyle actualTextStyles detect:\\\\n\\\\t\\\\t[:aStyle | aStyle fontArray includes: self] ifNone: [nil]! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'ar 4/12/2005 17:12'!\\\\nwidthOf: aCharacter \\\\n\\\\t\\\\\\\"Answer the width of the argument as a character in the receiver.\\\\\\\"\\\\n\\\\t| code |\\\\n\\\\tcode := aCharacter charCode.\\\\n\\\\t((code < minAscii or: [maxAscii < code]) \\\\n\\\\t\\\\tor: [(xTable at: code + 1) < 0])\\\\n\\\\t\\\\t\\\\tifTrue: [^ self fallbackFont widthOf: aCharacter].\\\\n\\\\t^ (xTable at: code + 2) - (xTable at: code + 1)! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing'!\\\\nxTable\\\\n\\\\t\\\\\\\"Answer an Array of the left x-coordinate of characters in glyphs.\\\\\\\"\\\\n\\\\n\\\\t^xTable! !\\\\n\\\\n!StrikeFont methodsFor: 'accessing' stamp: 'yo 8/28/2002 16:33'!\\\\nxTable: anObject\\\\n\\\\n\\\\txTable _ anObject.\\\\n! !\\\\n\\\\n\\\\n!StrikeFont methodsFor: 'character shapes'!\\\\nalter: char formBlock: formBlock\\\\n\\\\tself characterFormAt: char \\\\n\\\\t\\\\tput: (formBlock value: (self characterFormAt: char))! !\\\\n\\\\n!StrikeFont methodsFor: 'character shapes' stamp: 'yo 12/28/2002 22:37'!\\\\ncharacterFormAtMulti: character \\\\n\\\\t\\\\\\\"Answer a Form copied out of the glyphs for the argument, character.\\\\\\\"\\\\n\\\\t| ascii leftX rightX |\\\\n\\\\tascii _ character charCode.\\\\n\\\\t(ascii between: minAscii and: maxAscii) ifFalse: [ascii _ maxAscii + 1].\\\\n\\\\tleftX _ xTable at: ascii + 1.\\\\n\\\\trightX _ xTable at: ascii + 2.\\\\n\\\\t^ glyphs copy: (leftX @ 0 corner: rightX @ self height)! !\\\\n\\\\n!StrikeFont methodsFor: 'character shapes' stamp: 'yo 12/1/2003 17:01'!\\\\ncharacterFormAt: character \\\\n\\\\t\\\\\\\"Answer a Form copied out of the glyphs for the argument, character.\\\\\\\"\\\\n\\\\t| ascii leftX rightX |\\\\n\\\\tascii _ character charCode.\\\\n\\\\t(ascii between: minAscii and: maxAscii) ifFalse: [ascii _ maxAscii + 1].\\\\n\\\\tleftX _ xTable at: ascii + 1.\\\\n\\\\trightX _ xTable at: ascii + 2.\\\\n\\\\tleftX < 0 ifTrue: [^ glyphs copy: (0@0 corner: 0@self height)].\\\\n\\\\t^ glyphs copy: (leftX @ 0 corner: rightX @ self height)! !\\\\n\\\\n!StrikeFont methodsFor: 'character shapes' stamp: 'di 8/30/2000 10:00'!\\\\ncharacterFormAt: character put: characterForm\\\\n\\\\t\\\\\\\"Copy characterForm over the glyph for the argument, character.\\\\\\\"\\\\n\\\\t| ascii leftX rightX widthDif newGlyphs |\\\\n\\\\tascii _ character asciiValue.\\\\n\\\\tascii < minAscii ifTrue: [^ self error: 'Cant store characters below min ascii'].\\\\n\\\\tascii > maxAscii ifTrue:\\\\n\\\\t\\\\t[(self confirm:\\\\n'This font does not accomodate ascii values higher than ' , maxAscii printString , '.\\\\nDo you wish to extend it permanently to handle values up to ' , ascii printString)\\\\n\\\\t\\\\t\\\\tifTrue: [self extendMaxAsciiTo: ascii]\\\\n\\\\t\\\\t\\\\tifFalse: [^ self error: 'No change made']].\\\\n\\\\tleftX _ xTable at: ascii + 1.\\\\n\\\\trightX _ xTable at: ascii + 2.\\\\n\\\\twidthDif _ characterForm width - (rightX - leftX).\\\\n\\\\twidthDif ~= 0 ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"Make new glyphs with more or less space for this char\\\\\\\"\\\\n\\\\t\\\\tnewGlyphs _ Form extent: (glyphs width + widthDif) @ glyphs height.\\\\n\\\\t\\\\tnewGlyphs copy: (0@0 corner: leftX@glyphs height)\\\\n\\\\t\\\\t\\\\tfrom: 0@0 in: glyphs rule: Form over.\\\\n\\\\t\\\\tnewGlyphs copy: ((rightX+widthDif)@0 corner: newGlyphs width@glyphs height)\\\\n\\\\t\\\\t\\\\tfrom: rightX@0 in: glyphs rule: Form over.\\\\n\\\\t\\\\tglyphs _ newGlyphs.\\\\n\\\\t\\\\t\\\\\\\"adjust further entries on xTable\\\\\\\"\\\\n\\\\t\\\\txTable _ xTable copy.\\\\n\\\\t\\\\tascii+2 to: xTable size\\\\n\\\\t\\\\t\\\\tdo: [:i | xTable at: i put: (xTable at: i) + widthDif]].\\\\n\\\\tglyphs copy: (leftX @ 0 extent: characterForm extent)\\\\n\\\\t\\\\tfrom: 0@0 in: characterForm rule: Form over\\\\n\\\\\\\"\\\\n| f |  f _ TextStyle defaultFont.\\\\nf characterFormAt: $  put: (Form extent: (f widthOf: $ )+10@f height)\\\\n\\\\\\\"! !\\\\n\\\\n!StrikeFont methodsFor: 'character shapes'!\\\\ncharacterForm: char pixelValueAt: pt put: val\\\\n\\\\t| f |\\\\n\\\\tf _ self characterFormAt: char.\\\\n\\\\tf pixelAt: pt put: val.\\\\n\\\\tself characterFormAt: char put: val! !\\\\n\\\\n!StrikeFont methodsFor: 'character shapes' stamp: 'btr 11/18/2002 15:00'!\\\\nedit: character \\\\n\\\\t\\\\\\\"Open a Bit Editor on the given character. Note that you must do an accept \\\\n\\\\t(in the option menu of the bit editor) if you want this work. \\\\n\\\\tAccepted edits will not take effect in the font until you leave or close the bit editor. \\\\n\\\\tAlso note that unaccepted edits will be lost when you leave or close.\\\\\\\"\\\\n\\\\t\\\\\\\"Note that BitEditor only works in MVC currently.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"(TextStyle default fontAt: 1) edit: $_\\\\\\\"\\\\n\\\\n\\\\t| charForm editRect scaleFactor bitEditor savedForm r |\\\\n\\\\tcharForm _ self characterFormAt: character.\\\\n\\\\teditRect _ BitEditor locateMagnifiedView: charForm scale: (scaleFactor _ 8 @ 8).\\\\n\\\\tbitEditor _ BitEditor\\\\n\\\\t\\\\t\\\\t\\\\tbitEdit: charForm\\\\n\\\\t\\\\t\\\\t\\\\tat: editRect topLeft\\\\n\\\\t\\\\t\\\\t\\\\tscale: scaleFactor\\\\n\\\\t\\\\t\\\\t\\\\tremoteView: nil.\\\\n\\\\tsavedForm _ Form fromDisplay: (r _ bitEditor displayBox\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\texpandBy: (0 @ 23 corner: 0 @ 0)).\\\\n\\\\tbitEditor controller startUp.\\\\n\\\\tbitEditor release.\\\\n\\\\tsavedForm displayOn: Display at: r topLeft.\\\\n\\\\tself characterFormAt: character put: charForm! !\\\\n\\\\n!StrikeFont methodsFor: 'character shapes' stamp: 'BG 12/6/2004 19:22'!\\\\nensureCleanBold\\\\n\\\\t\\\\\\\"This ensures that all character glyphs have at least one pixel of white space on the right\\\\n\\\\tso as not to cause artifacts in neighboring characters in bold or italic.\\\\\\\"\\\\n\\\\n\\\\t| newGlyphs newXTable newGlyphPos startPos newWidth widthOfGlyph increment lastCol |\\\\n\\\\temphasis = 0 ifFalse: [^ self].\\\\n    newWidth := glyphs width + maxAscii - minAscii + 1.\\\\n    lastCol := Form extent: 1@ glyphs height.\\\\n    newGlyphs := Form extent: newWidth @ glyphs height.\\\\n    newXTable := Array new: xTable size.\\\\n    1 to: minAscii do: [:idx | newXTable at: idx put: (xTable at: idx)].\\\\n   \\\\n    newGlyphPos := startPos := 0.\\\\n    minAscii to: maxAscii do:\\\\n      [:idx | \\\\n         newXTable at: idx + 1 put: newGlyphPos.\\\\n         widthOfGlyph := (xTable at: idx + 2 ) - (xTable at: idx + 1).\\\\n         widthOfGlyph > 0\\\\n           ifTrue:\\\\n             [newGlyphs copy: (newGlyphPos @ 0 extent: widthOfGlyph @ glyphs height)\\\\n                          from: startPos@0 in: glyphs rule: Form over.\\\\n              lastCol copy: (0 @ 0 extent: 1 @ glyphs height)\\\\n                          from: startPos + widthOfGlyph - 1 @0 in: glyphs rule: Form over.\\\\n              increment := lastCol isAllWhite ifTrue: [0] ifFalse: [1].\\\\n              startPos := startPos + widthOfGlyph.\\\\n              newGlyphPos := newGlyphPos + widthOfGlyph + increment.\\\\n             ].\\\\n      ].\\\\n    maxAscii + 2 to: newXTable size do: [:idx | newXTable at: idx put: newGlyphPos.].\\\\n    glyphs := Form extent: newGlyphPos @ glyphs height.\\\\n    glyphs copy: (0 @ 0 extent: glyphs extent)\\\\n            from: 0@0 in: newGlyphs rule: Form over.\\\\n    xTable := newXTable.\\\\n\\\\\\\"\\\\nStrikeFont allInstancesDo: [:f | f ensureCleanBold].\\\\n(StrikeFont familyName: 'NewYork' size: 21) ensureCleanBold.\\\\nStrikeFont shutDown.  'Flush synthetic fonts'.\\\\n\\\\\\\"\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'character shapes' stamp: 'ar 5/23/2000 12:48'!\\\\nextendMaxAsciiTo: newMax\\\\n\\\\t\\\\\\\"Extend the range of this font so that it can display glyphs up to newMax.\\\\\\\"\\\\n\\\\n\\\\t(newMax+3) <= xTable size ifTrue: [^ self].  \\\\\\\"No need to extend.\\\\\\\"\\\\n\\\\txTable size = (maxAscii+3) ifFalse:\\\\n\\\\t\\\\t[^ self error: 'This font is not well-formed.'].\\\\n\\\\n\\\\t\\\\\\\"Insert a bunch of zero-width characters...\\\\\\\"\\\\n\\\\txTable _ (xTable copyFrom: 1 to: maxAscii+2) ,\\\\n\\\\t\\\\t\\\\t((maxAscii+1 to: newMax) collect: [:i | xTable at: maxAscii+2]) ,\\\\n\\\\t\\\\t\\\\t{ xTable at: maxAscii+3 }.\\\\n\\\\tmaxAscii _ newMax.\\\\n\\\\tself fillZeroWidthSlots.\\\\n\\\\tcharacterToGlyphMap _ nil.! !\\\\n\\\\n!StrikeFont methodsFor: 'character shapes' stamp: 'di 3/27/2000 16:10'!\\\\nfillZeroWidthSlots\\\\n\\\\t| nullGlyph |\\\\n\\\\t\\\\\\\"Note: this is slow because it copies the font once for every replacement.\\\\\\\"\\\\n\\\\n\\\\tnullGlyph _ (Form extent: 1@glyphs height) fillGray.\\\\n\\\\t\\\\\\\"Now fill the empty slots with narrow box characters.\\\\\\\"\\\\n\\\\tminAscii to: maxAscii do:\\\\n\\\\t\\\\t[:i | (self widthOf: (Character value: i)) = 0 ifTrue:\\\\n\\\\t\\\\t\\\\t[self characterFormAt: (Character value: i) put: nullGlyph]].\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'character shapes' stamp: 'di 4/28/2000 16:10'!\\\\nfixOneWideChars \\\\n\\\\t\\\\\\\"This fixes all 1-wide characters to be 2 wide with blank on the right\\\\n\\\\tso as not to cause artifacts in neighboring characters in bold or italic.\\\\\\\"\\\\n\\\\t| twoWide |\\\\n\\\\tminAscii to: maxAscii do:\\\\n\\\\t\\\\t[:i | (self widthOf: (Character value: i)) = 1 ifTrue:\\\\n\\\\t\\\\t\\\\t[twoWide _ Form extent: 2@glyphs height.\\\\n\\\\t\\\\t\\\\t(self characterFormAt: (Character value: i)) displayOn: twoWide at: 0@0.\\\\n\\\\t\\\\t\\\\tself characterFormAt: (Character value: i) put: twoWide]].\\\\n\\\\\\\"\\\\nStrikeFont allInstancesDo: [:f | f fixOneWideChars].\\\\nStrikeFont shutDown.  'Flush synthetic fonts'.\\\\n\\\\\\\"\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'character shapes' stamp: 'RAA 7/6/2000 16:50'!\\\\nmakeCarriageReturnsWhite\\\\n\\\\t| crForm |\\\\n\\\\t\\\\\\\"Some larger fonts have a gray carriage return (from the zero wide fixup) make it white so it doesn't show\\\\\\\"\\\\n\\\\n\\\\tcrForm _ self characterFormAt: 13 asCharacter.\\\\n\\\\tcrForm fillWhite.\\\\n\\\\tself characterFormAt: 13 asCharacter put: crForm.\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'character shapes'!\\\\nwiden: char by: delta\\\\n\\\\t| newForm |\\\\n\\\\t^ self alter: char formBlock:  \\\\\\\"Make a new form, wider or narrower...\\\\\\\"\\\\n\\\\t\\\\t[:charForm | newForm _ Form extent: charForm extent + (delta@0).\\\\n\\\\t\\\\tcharForm displayOn: newForm.  \\\\\\\"Copy this image into it\\\\\\\"\\\\n\\\\t\\\\tnewForm]    \\\\\\\"and substitute it in the font\\\\\\\"! !\\\\n\\\\n\\\\n!StrikeFont methodsFor: 'copying' stamp: 'BG 12/9/2004 17:27'!\\\\ndeepCopy\\\\n \\\\\\\" there is a circular reference from the derivative fonts back to the receiver. It is therefore not possible to make a deep copy. We make a sahllow copy. The method postCopy can be used to modify the shallow copy. \\\\\\\" \\\\n  ^self copy! !\\\\n\\\\n!StrikeFont methodsFor: 'copying' stamp: 'BG 12/9/2004 17:35'!\\\\npostCopy\\\\n \\\\\\\" the receiver is a just created shallow copy. This method gives it the final touch. \\\\\\\" \\\\n \\\\n    glyphs := glyphs copy.\\\\n    xTable := xTable copy.\\\\n    characterToGlyphMap := characterToGlyphMap copy.\\\\n \\\\n    self reset.  \\\\\\\" takes care of the derivative fonts \\\\\\\"! !\\\\n\\\\n!StrikeFont methodsFor: 'copying' stamp: 'tk 8/19/1998 16:15'!\\\\nveryDeepCopyWith: deepCopier\\\\n\\\\t\\\\\\\"Return self.  I am shared.  Do not record me.\\\\\\\"! !\\\\n\\\\n\\\\n!StrikeFont methodsFor: 'displaying' stamp: 'yo 5/19/2004 11:34'!\\\\ncharacters: anInterval in: sourceString displayAt: aPoint clippedBy: clippingRectangle rule: ruleInteger fillColor: aForm kernDelta: kernDelta on: aBitBlt\\\\n\\\\t\\\\\\\"Simple, slow, primitive method for displaying a line of characters.\\\\n\\\\tNo wrap-around is provided.\\\\\\\"\\\\n\\\\t| ascii destPoint leftX rightX sourceRect |\\\\n\\\\tdestPoint _ aPoint.\\\\n\\\\tanInterval do: \\\\n\\\\t\\\\t[:i |\\\\n\\\\t\\\\tself flag: #yoDisplay.\\\\n\\\\t\\\\t\\\\\\\"if the char is not supported, fall back to the specified fontset.\\\\\\\"\\\\n\\\\t\\\\tascii _ (sourceString at: i) charCode.\\\\n\\\\t\\\\t(ascii < minAscii or: [ascii > maxAscii])\\\\n\\\\t\\\\t\\\\tifTrue: [ascii _ maxAscii].\\\\n\\\\t\\\\tleftX _ xTable at: ascii + 1.\\\\n\\\\t\\\\trightX _ xTable at: ascii + 2.\\\\n\\\\t\\\\tsourceRect _ leftX@0 extent: (rightX-leftX) @ self height.\\\\n\\\\t\\\\taBitBlt copyFrom: sourceRect in: glyphs to: destPoint.\\\\n\\\\t\\\\tdestPoint _ destPoint + ((rightX-leftX+kernDelta)@0).\\\\n\\\\t\\\\t\\\\\\\"destPoint printString displayAt: 0@(i*20)\\\\\\\"].\\\\n\\\\t^ destPoint! !\\\\n\\\\n!StrikeFont methodsFor: 'displaying' stamp: 'yo 5/19/2004 11:36'!\\\\ndisplayLine: aString at: aPoint \\\\n\\\\t\\\\\\\"Display the characters in aString, starting at position aPoint.\\\\\\\"\\\\n\\\\n\\\\tself characters: (1 to: aString size)\\\\n\\\\t\\\\tin: aString\\\\n\\\\t\\\\tdisplayAt: aPoint\\\\n\\\\t\\\\tclippedBy: Display boundingBox\\\\n\\\\t\\\\trule: Form over\\\\n\\\\t\\\\tfillColor: nil\\\\n\\\\t\\\\tkernDelta: 0\\\\n\\\\t\\\\ton: (BitBlt current toForm: Display).\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'displaying' stamp: 'yo 1/7/2005 15:16'!\\\\ndisplayMultiString: aString on: aBitBlt from: startIndex to: stopIndex at: aPoint kern: kernDelta baselineY: baselineY\\\\n\\\\n\\\\t| destPoint leftX rightX glyphInfo char displayInfo destY |\\\\n\\\\tdestPoint _ aPoint.\\\\n\\\\tcharIndex _ startIndex.\\\\n\\\\tglyphInfo _ Array new: 5.\\\\n\\\\t[charIndex <= stopIndex] whileTrue: [\\\\n\\\\t\\\\tchar _ aString at: charIndex.\\\\n\\\\t\\\\t(self hasGlyphOf: char) not ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tdisplayInfo _ self fallbackFont displayString: aString on: aBitBlt from: charIndex to: stopIndex at: destPoint kern: kernDelta from: self baselineY: baselineY.\\\\n\\\\t\\\\t\\\\t\\\\tcharIndex _ displayInfo first.\\\\n\\\\t\\\\t\\\\t\\\\tdestPoint _ displayInfo second.\\\\n\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\tself glyphInfoOf: char into: glyphInfo.\\\\n\\\\t\\\\t\\\\tleftX _ glyphInfo second.\\\\n\\\\t\\\\t\\\\trightX _ glyphInfo third.\\\\n\\\\t\\\\t\\\\t(glyphInfo fifth ~= aBitBlt lastFont) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tglyphInfo fifth installOn: aBitBlt.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\taBitBlt sourceForm: glyphInfo first.\\\\n\\\\t\\\\t\\\\tdestY _ baselineY - glyphInfo fourth. \\\\n\\\\t\\\\t\\\\taBitBlt destX: destPoint x.\\\\n\\\\t\\\\t\\\\taBitBlt destY: destY.\\\\n\\\\t\\\\t\\\\taBitBlt sourceOrigin: leftX @ 0.\\\\n\\\\t\\\\t\\\\taBitBlt width: rightX - leftX.\\\\n\\\\t\\\\t\\\\taBitBlt height: self height.\\\\n\\\\t\\\\t\\\\taBitBlt copyBits.\\\\n\\\\t\\\\t\\\\tdestPoint _ destPoint + (rightX - leftX + kernDelta @ 0).\\\\n\\\\t\\\\t\\\\tcharIndex _ charIndex + 1.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\t^ Array with: charIndex with: destPoint.\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'displaying' stamp: 'yo 12/20/2002 18:54'!\\\\ndisplayStringR2L: aString on: aBitBlt from: startIndex to: stopIndex at: aPoint kern: kernDelta\\\\n\\\\t\\\\\\\"You are screwed if you reach this method.\\\\\\\"\\\\n\\\\tself halt.\\\\n\\\\taBitBlt displayString: aString \\\\n\\\\t\\\\t\\\\tfrom: startIndex \\\\n\\\\t\\\\t\\\\tto: stopIndex \\\\n\\\\t\\\\t\\\\tat: aPoint \\\\n\\\\t\\\\t\\\\tstrikeFont: self\\\\n\\\\t\\\\t\\\\tkern: kernDelta.! !\\\\n\\\\n!StrikeFont methodsFor: 'displaying' stamp: 'ar 4/10/2005 18:06'!\\\\ndisplayString: aString on: aBitBlt from: startIndex to: stopIndex at: aPoint kern: kernDelta\\\\n\\\\t\\\\\\\"Draw the given string from startIndex to stopIndex \\\\n\\\\tat aPoint on the (already prepared) BitBlt.\\\\\\\"\\\\n\\\\t\\\\n\\\\t(aString isByteString) ifFalse: [^ self displayMultiString: aString on: aBitBlt from: startIndex to: stopIndex at: aPoint kern: kernDelta baselineY: aPoint y + self ascent.].\\\\n\\\\n\\\\t^ aBitBlt displayString: aString \\\\n\\\\t\\\\t\\\\tfrom: startIndex \\\\n\\\\t\\\\t\\\\tto: stopIndex \\\\n\\\\t\\\\t\\\\tat: aPoint \\\\n\\\\t\\\\t\\\\tstrikeFont: self\\\\n\\\\t\\\\t\\\\tkern: kernDelta.! !\\\\n\\\\n!StrikeFont methodsFor: 'displaying' stamp: 'ar 4/10/2005 18:06'!\\\\ndisplayString: aString on: aBitBlt from: startIndex to: stopIndex at: aPoint kern: kernDelta baselineY: baselineY\\\\n\\\\t\\\\\\\"Draw the given string from startIndex to stopIndex \\\\n\\\\tat aPoint on the (already prepared) BitBlt.\\\\\\\"\\\\n\\\\t\\\\n\\\\t(aString isByteString) ifFalse:[^ self displayMultiString: aString on: aBitBlt from: startIndex to: stopIndex at: aPoint kern: kernDelta baselineY: baselineY.].\\\\n\\\\n\\\\t^ aBitBlt displayString: aString \\\\n\\\\t\\\\t\\\\tfrom: startIndex \\\\n\\\\t\\\\t\\\\tto: stopIndex \\\\n\\\\t\\\\t\\\\tat: aPoint \\\\n\\\\t\\\\t\\\\tstrikeFont: self\\\\n\\\\t\\\\t\\\\tkern: kernDelta.! !\\\\n\\\\n!StrikeFont methodsFor: 'displaying' stamp: 'BG 3/16/2005 08:27'!\\\\nfontDisplay\\\\n\\\\t\\\\\\\"TextStyle default defaultFont fontDisplay.\\\\\\\"\\\\n\\\\n\\\\tDisplay restoreAfter:\\\\n\\\\t\\\\t[(Form extent: 440@400) displayAt: 90@90.\\\\n\\\\t\\\\t 0 to: 15 do:\\\\n\\\\t\\\\t\\\\t[:i |\\\\n\\\\t\\\\t\\\\ti storeStringHex displayAt: 100 @ (20 * i + 100).\\\\n\\\\t\\\\t\\\\t0 to: 15 do:\\\\n\\\\t\\\\t\\\\t\\\\t[:j |\\\\n\\\\t\\\\t\\\\t\\\\t((16*i+j) between: 1 and: (self xTable size - 2)) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[(self characterFormAt: (16 * i + j) asCharacter)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdisplayAt: (20 * j + 150) @ (20 * i + 100)]]].\\\\n\\\\t\\\\t\\\\t'Click to continue...' asDisplayText displayAt: 100@450]! !\\\\n\\\\n!StrikeFont methodsFor: 'displaying' stamp: 'yo 1/5/2005 13:59'!\\\\ninstallOn: aDisplayContext\\\\n\\\\n\\\\t^aDisplayContext installStrikeFont: self.\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'displaying' stamp: 'ar 5/19/2000 15:08'!\\\\ninstallOn: aDisplayContext foregroundColor: foregroundColor backgroundColor: backgroundColor\\\\n\\\\t^aDisplayContext \\\\n\\\\t\\\\tinstallStrikeFont: self\\\\n\\\\t\\\\tforegroundColor: foregroundColor \\\\n\\\\t\\\\tbackgroundColor: backgroundColor! !\\\\n\\\\n!StrikeFont methodsFor: 'displaying' stamp: 'tak 1/11/2005 18:03'!\\\\nwidthOfString: aString from: firstIndex to: lastIndex\\\\n\\\\t| resultX |\\\\n\\\\tresultX _ 0.\\\\n\\\\tfirstIndex to: lastIndex do:[:i | \\\\n\\\\t\\\\tresultX _ resultX + (self widthOf: (aString at: i))].\\\\n\\\\t^ resultX.\\\\n! !\\\\n\\\\n\\\\n!StrikeFont methodsFor: 'emphasis' stamp: 'yo 12/18/2003 23:30'!\\\\nbonk: glyphForm with: bonkForm\\\\n\\\\t\\\\\\\"Bonking means to run through the glyphs clearing out black pixels\\\\n\\\\tbetween characters to prevent them from straying into an adjacent\\\\n\\\\tcharacter as a result of, eg, bolding or italicizing\\\\\\\"\\\\n\\\\t\\\\\\\"Uses the bonkForm to erase at every character boundary in glyphs.\\\\\\\"\\\\n\\\\t| bb offset x |\\\\n\\\\toffset _ bonkForm offset x.\\\\n\\\\tbb _ BitBlt current toForm: glyphForm.\\\\n\\\\tbb sourceForm: bonkForm; sourceRect: bonkForm boundingBox;\\\\n\\\\t\\\\tcombinationRule: Form erase; destY: 0.\\\\n\\\\tx _ self xTable.\\\\n\\\\t(x isMemberOf: SparseLargeTable) ifTrue: [\\\\n\\\\t\\\\tx base to: x size-1 do: [:i | bb destX: (x at: i) + offset; copyBits].\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\t1 to: x size-1 do: [:i | bb destX: (x at: i) + offset; copyBits].\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'emphasis'!\\\\nemphasis\\\\n\\\\t\\\\\\\"Answer the integer code for synthetic bold, italic, underline, and \\\\n\\\\tstrike-out.\\\\\\\"\\\\n\\\\n\\\\t^emphasis! !\\\\n\\\\n!StrikeFont methodsFor: 'emphasis'!\\\\nemphasis: code \\\\n\\\\t\\\\\\\"Set the integer code for synthetic bold, itallic, underline, and strike-out, \\\\n\\\\twhere bold=1, italic=2, underlined=4, and struck out=8.\\\\\\\"\\\\n\\\\n\\\\temphasis _ code! !\\\\n\\\\n!StrikeFont methodsFor: 'emphasis' stamp: 'di 9/3/2000 13:22'!\\\\nemphasized: code \\\\n\\\\t\\\\\\\"Answer a copy of the receiver with emphasis set to include code.\\\\\\\"\\\\n\\\\t| derivative addedEmphasis base safeCode |\\\\n\\\\tcode = 0 ifTrue: [^ self].\\\\n\\\\t(derivativeFonts == nil or: [derivativeFonts size = 0]) ifTrue: [^ self].\\\\n\\\\tderivative _ derivativeFonts at: (safeCode _ code min: derivativeFonts size).\\\\n\\\\tderivative == nil ifFalse: [^ derivative].  \\\\\\\"Already have this style\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Dont have it -- derive from another with one with less emphasis\\\\\\\"\\\\n\\\\taddedEmphasis _ 1 bitShift: safeCode highBit - 1.\\\\n\\\\tbase _ self emphasized: safeCode - addedEmphasis.  \\\\\\\"Order is Bold, Ital, Under, Narrow\\\\\\\"\\\\n\\\\taddedEmphasis = 1 ifTrue:   \\\\\\\"Compute synthetic bold version of the font\\\\\\\"\\\\n\\\\t\\\\t[derivative _ (base copy ensureCleanBold name: base name , 'B') makeBoldGlyphs].\\\\n\\\\taddedEmphasis = 2 ifTrue:   \\\\\\\"Compute synthetic italic version of the font\\\\\\\"\\\\n\\\\t\\\\t[ derivative _ (base copy name: base name , 'I') makeItalicGlyphs].\\\\n\\\\taddedEmphasis = 4 ifTrue:   \\\\\\\"Compute underlined version of the font\\\\\\\"\\\\n\\\\t\\\\t[derivative _ (base copy name: base name , 'U') makeUnderlinedGlyphs].\\\\n\\\\taddedEmphasis = 8 ifTrue:   \\\\\\\"Compute narrow version of the font\\\\\\\"\\\\n\\\\t\\\\t[derivative _ (base copy name: base name , 'N') makeCondensedGlyphs].\\\\n\\\\taddedEmphasis = 16 ifTrue:   \\\\\\\"Compute struck-out version of the font\\\\\\\"\\\\n\\\\t\\\\t[derivative _ (base copy name: base name , 'X') makeStruckOutGlyphs].\\\\n\\\\tderivative emphasis: safeCode.\\\\n\\\\tderivativeFonts at: safeCode put: derivative.\\\\n\\\\t^ derivative! !\\\\n\\\\n!StrikeFont methodsFor: 'emphasis' stamp: 'yo 5/24/2004 17:54'!\\\\nmakeBoldGlyphs\\\\n\\\\t\\\\\\\"Make a bold set of glyphs with same widths by ORing 1 bit to the right\\\\n\\\\t\\\\t(requires at least 1 pixel of intercharacter space)\\\\\\\"\\\\n\\\\t| g bonkForm |\\\\n\\\\tg _ glyphs deepCopy.\\\\n\\\\tbonkForm _ (Form extent: 1@16) fillBlack offset: -1@0.\\\\n\\\\tself bonk: g with: bonkForm.\\\\n\\\\tg copyBits: g boundingBox from: g at: (1@0)\\\\n\\\\t\\\\tclippingBox: g boundingBox rule: Form under fillColor: nil.\\\\n\\\\tglyphs _ g.\\\\n\\\\tfallbackFont ifNotNil: [\\\\n\\\\t\\\\tfallbackFont _ fallbackFont emphasized: 1\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'emphasis' stamp: 'yo 5/24/2004 17:51'!\\\\nmakeCondensedGlyphs\\\\n\\\\t\\\\\\\"Make a condensed set of glyphs with same widths.\\\\n\\\\tNOTE: this has been superceded by kerning -- should not get called\\\\\\\"\\\\n\\\\t| g newXTable x x1 w |\\\\n\\\\tg _ glyphs deepCopy.\\\\n\\\\tnewXTable _ Array new: xTable size.\\\\n\\\\tnewXTable at: 1 put: (x _ xTable at: 1).\\\\n\\\\t1 to: xTable size-1 do:\\\\n\\\\t\\\\t[:i | x1 _ xTable at: i.  w _ (xTable at: i+1) - x1.\\\\n\\\\t\\\\tw > 1 ifTrue: [w _ w-1].  \\\\\\\"Shrink every character wider than 1\\\\\\\"\\\\n\\\\t\\\\tg copy: (x@0 extent: w@g height) from: x1@0 in: glyphs rule: Form over.\\\\n\\\\t\\\\tnewXTable at: i+1 put: (x _ x + w)].\\\\n\\\\txTable _ newXTable.\\\\n\\\\tglyphs _ g.\\\\n\\\\tfallbackFont ifNotNil: [\\\\n\\\\t\\\\tfallbackFont emphasized: 8\\\\n\\\\t].\\\\n\\\\n\\\\\\\"\\\\n(TextStyle default fontAt: 1) copy makeCondensedGlyphs\\\\n\\\\tdisplayLine: 'The quick brown fox jumps over the lazy dog'\\\\n\\\\tat: Sensor cursorPoint\\\\n\\\\\\\"! !\\\\n\\\\n!StrikeFont methodsFor: 'emphasis' stamp: 'yo 5/24/2004 17:54'!\\\\nmakeItalicGlyphs\\\\n\\\\t\\\\\\\"Make an italic set of glyphs with same widths by skewing left and right.\\\\n\\\\tIn the process, characters would overlap, so we widen them all first.\\\\n\\\\t\\\\\\\"\\\\n\\\\t| extraWidth newGlyphs newXTable x newX w extraOnLeft |  \\\\n\\\\textraOnLeft _ (self height-1-self ascent+4)//4 max: 0.\\\\n\\\\textraWidth _ ((self ascent-5+4)//4 max: 0) + extraOnLeft.\\\\n\\\\tnewGlyphs _ Form extent: (glyphs width + (maxAscii + 1 - minAscii*extraWidth)) @ glyphs height.\\\\n\\\\tnewXTable _ xTable copy.\\\\n\\\\n\\\\t\\\\\\\"Copy glyphs into newGlyphs with room on left and right for overlap.\\\\\\\"\\\\n\\\\tminAscii to: maxAscii+1 do:\\\\n\\\\t\\\\t[:ascii | x _ xTable at: ascii+1.  w _ (xTable at: ascii+2) - x.\\\\n\\\\t\\\\tnewX _ newXTable at: ascii+1.\\\\n\\\\t\\\\tnewGlyphs copy: ((newX + extraOnLeft) @ 0 extent: w @ glyphs height)\\\\n\\\\t\\\\t\\\\tfrom: x @ 0 in: glyphs rule: Form over.\\\\n\\\\t\\\\tnewXTable at: ascii+2 put: newX + w + extraWidth].\\\\t\\\\t\\\\n\\\\tglyphs _ newGlyphs. \\\\n\\\\txTable _ newXTable.\\\\n\\\\t\\\\\\\"Slide the bitmaps left and right for synthetic italic effect.\\\\\\\"\\\\n\\\\t4 to: self ascent-1 by: 4 do:\\\\n\\\\t\\\\t[:y | \\\\t\\\\t\\\\\\\"Slide ascenders right...\\\\\\\"\\\\n\\\\t\\\\tglyphs copy: (1@0 extent: glyphs width @ (self ascent - y))\\\\n\\\\t\\\\t\\\\tfrom: 0@0 in: glyphs rule: Form over].\\\\n\\\\tself ascent to: self height-1 by: 4 do:\\\\n\\\\t\\\\t[:y | \\\\t\\\\t\\\\\\\"Slide descenders left...\\\\\\\"\\\\n\\\\t\\\\tglyphs copy: (0@y extent: glyphs width @ glyphs height)\\\\n\\\\t\\\\t\\\\tfrom: 1@y in: glyphs rule: Form over].\\\\n\\\\tfallbackFont ifNotNil: [\\\\n\\\\t\\\\tfallbackFont _ fallbackFont emphasized: 2\\\\n\\\\t].\\\\n\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'emphasis' stamp: 'yo 5/24/2004 17:54'!\\\\nmakeStruckOutGlyphs\\\\n\\\\t\\\\\\\"Make a struck-out set of glyphs with same widths\\\\\\\"\\\\n\\\\t| g |\\\\n\\\\tg _ glyphs deepCopy.\\\\n\\\\tg fillBlack: (0 @ (self ascent - (self ascent//3)) extent: g width @ 1).\\\\n\\\\tglyphs _ g.\\\\n\\\\tfallbackFont ifNotNil: [\\\\n\\\\t\\\\tfallbackFont _ fallbackFont emphasized: 16\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'emphasis' stamp: 'yo 5/24/2004 17:54'!\\\\nmakeUnderlinedGlyphs\\\\n\\\\t\\\\\\\"Make an underlined set of glyphs with same widths\\\\\\\"\\\\n\\\\t| g |\\\\n\\\\tg _ glyphs deepCopy.\\\\n\\\\tg fillBlack: (0 @ (self ascent+1) extent: g width @ 1).\\\\n\\\\tglyphs _ g.\\\\n\\\\tfallbackFont ifNotNil: [\\\\n\\\\t\\\\tfallbackFont _ fallbackFont emphasized: 4\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'emphasis' stamp: 'nk 3/15/2004 18:46'!\\\\nreleaseCachedState\\\\n\\\\n\\\\tself reset.! !\\\\n\\\\n!StrikeFont methodsFor: 'emphasis' stamp: 'tak 3/11/2005 17:09'!\\\\nreset\\\\n\\\\t\\\\\\\"Reset the cache of derivative emphasized fonts\\\\\\\"\\\\n\\\\n\\\\t| style font |\\\\n\\\\tfallbackFont class = FixedFaceFont\\\\n\\\\t\\\\tifTrue: [fallbackFont _ nil].\\\\n\\\\tderivativeFonts _ Array new: 32.\\\\n\\\\t#('B' 'I' 'BI') doWithIndex:\\\\n\\\\t\\\\t[:tag :index | \\\\n\\\\t\\\\t(style _ TextStyle named: self familyName) ifNotNil:\\\\n\\\\t\\\\t\\\\t[(font _ style fontArray\\\\n\\\\t\\\\t\\\\t\\\\tdetect: [:each | each name = (self name , tag)]\\\\n\\\\t\\\\t\\\\t\\\\tifNone: [nil]) ifNotNil: [derivativeFonts at: index put: font]]]! !\\\\n\\\\n\\\\n!StrikeFont methodsFor: 'file in/out' stamp: 'ar 5/23/2000 12:50'!\\\\nbuildfontNamed: nm fromForms: forms startingAtAscii: startAscii\\\\n\\\\tascent: a descent: d maxWid: m\\\\n\\\\t\\\\\\\"This builds a StrikeFont instance from existing forms.\\\\\\\"\\\\n\\\\n\\\\t| lastAscii width ascii charForm missingForm tempGlyphs |\\\\n\\\\tname _ nm.\\\\n\\\\tascent _ 11.\\\\n\\\\tdescent _ 3.\\\\n\\\\tmaxWidth _ 16.\\\\n\\\\tpointSize _ 8.\\\\n\\\\tname _ (name copyWithout: Character space) ,\\\\n\\\\t\\\\t\\\\t\\\\t(pointSize < 10\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: ['0' , pointSize printString]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [pointSize printString]).\\\\n\\\\tminAscii _ 258.\\\\n\\\\tmaxAscii _ 0.\\\\n\\\\tsuperscript _ ascent - descent // 3.\\\\t\\\\n\\\\tsubscript _ descent - ascent // 3.\\\\t\\\\n\\\\temphasis _ 0.\\\\n\\\\ttype _ 0.  \\\\\\\"ignored for now\\\\\\\"\\\\n\\\\n\\\\ttempGlyphs _ Form extent: (maxWidth*257) @ self height.\\\\n\\\\txTable _ (Array new: 258) atAllPut: 0.\\\\n\\\\txTable at: 1 put: 0.\\\\n\\\\n\\\\t\\\\\\\"Read character forms and blt into tempGlyphs\\\\\\\"\\\\n\\\\tlastAscii _ -1.\\\\n\\\\t1 to: forms size do:\\\\n\\\\t\\\\t[:i | charForm _ forms at: i. width _ charForm width.\\\\n\\\\t\\\\tascii _ startAscii-1+i.\\\\n\\\\t\\\\tself displayChar: ascii form: charForm.\\\\n\\\\t\\\\tascii = 256\\\\n\\\\t\\\\t\\\\tifTrue: [missingForm _ charForm deepCopy]\\\\n\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[minAscii _ minAscii min: ascii.\\\\n\\\\t\\\\t\\\\tmaxAscii _ maxAscii max: ascii.\\\\n\\\\t\\\\t\\\\tlastAscii+1 to: ascii-1 do: [:as | xTable at: as+2 put: (xTable at: as+1)].\\\\n\\\\t\\\\t\\\\ttempGlyphs copy: ((xTable at: ascii+1)@0\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\textent: charForm extent)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfrom: 0@0 in: charForm rule: Form over.\\\\n\\\\t\\\\t\\\\txTable at: ascii+2 put: (xTable at: ascii+1) + width.\\\\n\\\\t\\\\t\\\\tlastAscii _ ascii]].\\\\n\\\\tlastAscii+1 to: maxAscii+1 do: [:as | xTable at: as+2 put: (xTable at: as+1)].\\\\n\\\\tmissingForm == nil ifFalse:\\\\n\\\\t\\\\t[tempGlyphs copy: missingForm boundingBox from: missingForm\\\\n\\\\t\\\\t\\\\t\\\\tto: (xTable at: maxAscii+2)@0 rule: Form over.\\\\n\\\\t\\\\txTable at: maxAscii+3 put: (xTable at: maxAscii+2) + missingForm width].\\\\n\\\\tglyphs _ Form extent: (xTable at: maxAscii+3) @ self height.\\\\n\\\\tglyphs copy: glyphs boundingBox from: 0@0 in: tempGlyphs rule: Form over.\\\\n\\\\txTable _ xTable copyFrom: 1 to: maxAscii+3.\\\\n\\\\tcharacterToGlyphMap _ nil.! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out'!\\\\ndisplayChar: ascii form: charForm\\\\n\\\\t\\\\\\\"Convenience utility used during conversion of BitFont files\\\\\\\"\\\\n\\\\t| m bigForm |\\\\n\\\\tDisplay fillBlack: (0@0 extent: 20@14).\\\\n\\\\tascii printString displayAt: 0@2.\\\\n\\\\tcharForm width > 0 ifTrue:\\\\n\\\\t\\\\t[m _ 5.\\\\n\\\\t\\\\tbigForm _ charForm magnify: charForm boundingBox by: m@m.\\\\n\\\\t\\\\tDisplay border: ((bigForm boundingBox expandBy: m) translateBy: 50@2) width: m.\\\\n\\\\t\\\\tbigForm displayAt: 50@2.\\\\n\\\\t\\\\tDisplay fillBlack: ((50@2)+((m*charForm width)@0) extent: 1@(m*self height))].! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out' stamp: 'md 11/14/2003 17:25'!\\\\nnewFromStrike: fileName\\\\n\\\\t\\\\\\\"Build an instance from the strike font file name. The '.strike' extension\\\\n\\\\tis optional.\\\\\\\"\\\\n\\\\n\\\\t| strike startName raster16 |\\\\n\\\\tname _ fileName copyUpTo: $..\\\\t\\\\\\\"assumes extension (if any) is '.strike'\\\\\\\"\\\\n\\\\tstrike _ FileStream readOnlyFileNamed: name, '.strike.'.\\\\n\\\\tstrike binary.\\\\n\\\\n\\\\t\\\\\\\"strip off direcory name if any\\\\\\\"\\\\n\\\\tstartName _ name size.\\\\n\\\\t[startName > 0 and: [((name at: startName) ~= $>) & ((name at: startName) ~= $])]]\\\\n\\\\t\\\\twhileTrue: [startName _ startName - 1].\\\\n\\\\tname _ name copyFrom: startName+1 to: name size.\\\\n\\\\n\\\\ttype\\\\t\\\\t\\\\t_\\\\t\\\\tstrike nextWord.\\\\t\\\\t\\\\\\\"type is ignored now -- simplest\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tassumed.  Kept here to make\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twriting and consistency more\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstraightforward.\\\\\\\"\\\\n\\\\tminAscii\\\\t\\\\t_\\\\t\\\\tstrike nextWord.\\\\n\\\\tmaxAscii\\\\t\\\\t_\\\\t\\\\tstrike nextWord.\\\\n\\\\tmaxWidth\\\\t\\\\t_\\\\t\\\\tstrike nextWord.\\\\n\\\\tstrikeLength\\\\t_\\\\t\\\\tstrike nextWord.\\\\n\\\\tascent\\\\t\\\\t\\\\t_\\\\t\\\\tstrike nextWord.\\\\n\\\\tdescent\\\\t\\\\t\\\\t_\\\\t\\\\tstrike nextWord.\\\\n\\\\t\\\\\\\"xOffset\\\\t\\\\t\\\\t_\\\\\\\"\\\\t\\\\tstrike nextWord. \\\\t\\\\n\\\\traster16\\\\t\\\\t\\\\t_\\\\t\\\\tstrike nextWord.\\\\t\\\\n\\\\tsuperscript\\\\t\\\\t_\\\\t\\\\tascent - descent // 3.\\\\t\\\\n\\\\tsubscript\\\\t\\\\t_\\\\t\\\\tdescent - ascent // 3.\\\\t\\\\n\\\\temphasis\\\\t\\\\t_\\\\t\\\\t0.\\\\n\\\\tglyphs\\\\t\\\\t\\\\t_\\\\tForm extent: (raster16 * 16) @ (self height)  \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\toffset: 0@0.\\\\n\\\\t\\\\tglyphs bits fromByteStream: strike.\\\\n\\\\n\\\\txTable _ (Array new: maxAscii + 3) atAllPut: 0.\\\\n\\\\t(minAscii + 1 to: maxAscii + 3) do:\\\\n\\\\t\\\\t[:index | xTable at: index put: strike nextWord].\\\\n\\\\n\\\\t\\\\\\\"Set up space character\\\\\\\"\\\\n\\\\t((xTable at: (Space asciiValue + 2))  = 0 or:\\\\n\\\\t\\\\t\\\\t[(xTable at: (Space asciiValue + 2)) = (xTable at: (Space asciiValue + 1))])\\\\n\\\\t\\\\tifTrue:\\\\t[(Space asciiValue + 2) to: xTable size do:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:index | xTable at: index put: ((xTable at: index) + DefaultSpace)]].\\\\n\\\\tstrike close.\\\\n\\\\tcharacterToGlyphMap _ nil.! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out' stamp: 'tk 9/28/2000 15:50'!\\\\nobjectForDataStream: refStrm\\\\n\\\\t| dp |\\\\n\\\\t\\\\\\\"I am about to be written on an object file.  Write a reference to a known Font in the other system instead.  \\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"A path to me\\\\\\\"\\\\n\\\\t(TextConstants at: #forceFontWriting ifAbsent: [false]) ifTrue: [^ self].\\\\n\\\\t\\\\t\\\\\\\"special case for saving the default fonts on the disk.  See collectionFromFileNamed:\\\\\\\"\\\\n\\\\n\\\\tdp _ DiskProxy global: #StrikeFont selector: #familyName:size:emphasized:\\\\n\\\\t\\\\t\\\\targs: (Array with: self familyName   with: self height\\\\n\\\\t\\\\t\\\\t\\\\t\\\\twith: self emphasis).\\\\n\\\\trefStrm replace: self with: dp.\\\\n\\\\t^ dp! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out' stamp: 'sma 6/1/2000 09:32'!\\\\nprintOn: aStream\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream\\\\n\\\\t\\\\tnextPut: $(;\\\\n\\\\t\\\\tnextPutAll: self name;\\\\n\\\\t\\\\tspace;\\\\n\\\\t\\\\tprint: self height;\\\\n\\\\t\\\\tnextPut: $)! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out' stamp: 'ar 10/25/2005 00:21'!\\\\nreadBDFFromFile: fileName name: aString \\\\n\\\\t\\\\\\\"This builds a StrikeFont instance by reading the X11 Binary \\\\n\\\\tDistribution Format font source file.  See the BDFFontReader class\\\\n\\\\tcomment.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"StrikeFont new readBDFFromFile: 'helvR12' name: 'Helvetica12'.\\\\\\\"\\\\n\\\\n\\\\t| fontReader stream |\\\\n\\\\tfontReader := BDFFontReader openFileNamed: fileName.\\\\n\\\\tstream := ReadStream on: fontReader read.\\\\n\\\\txTable := stream next.\\\\n\\\\tglyphs := stream next.\\\\n\\\\tminAscii := stream next.\\\\n\\\\tmaxAscii := stream next.\\\\n\\\\tmaxWidth := stream next.\\\\n\\\\tascent := stream next.\\\\n\\\\tdescent := stream next.\\\\n\\\\tpointSize := stream next.\\\\n\\\\tname := aString.\\\\n\\\\\\\"\\\\txTable size <= 256 ifTrue: [self setStopConditions].\\\\\\\"\\\\n\\\\ttype := 0.\\\\t\\\\\\\"no one see this\\\\\\\"\\\\n\\\\tsuperscript := (ascent - descent) // 3.\\\\n\\\\tsubscript := (descent - ascent) // 3.\\\\n\\\\temphasis := 0.\\\\n\\\\tself reset! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out'!\\\\nreadBFHeaderFrom: f\\\\n\\\\tname _ self restOfLine: 'Font name = ' from: f.\\\\n\\\\tascent _ (self restOfLine: 'Ascent = ' from: f) asNumber.\\\\n\\\\tdescent _ (self restOfLine: 'Descent = ' from: f) asNumber.\\\\n\\\\tmaxWidth _ (self restOfLine: 'Maximum width = ' from: f) asNumber.\\\\n\\\\tpointSize _ (self restOfLine: 'Font size = ' from: f) asNumber.\\\\n\\\\tname _ (name copyWithout: Character space) ,\\\\n\\\\t\\\\t\\\\t\\\\t(pointSize < 10\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: ['0' , pointSize printString]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [pointSize printString]).\\\\n\\\\tminAscii _ 258.\\\\n\\\\tmaxAscii _ 0.\\\\n\\\\tsuperscript _ ascent - descent // 3.\\\\t\\\\n\\\\tsubscript _ descent - ascent // 3.\\\\t\\\\n\\\\temphasis _ 0.\\\\n\\\\ttype _ 0.  \\\\\\\"ignored for now\\\\\\\"\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out' stamp: 'yo 11/30/2003 17:08'!\\\\nreadEFontBDFForJapaneseFromFile: fileName name: aString overrideWith: otherFileName\\\\n\\\\n\\\\t| fontReader stream |\\\\n\\\\tfontReader _ EFontBDFFontReaderForRanges readOnlyFileNamed: fileName.\\\\n\\\\tstream _ ReadStream on: (fontReader readRanges: fontReader rangesForJapanese overrideWith: otherFileName otherRanges: {Array with: 8481 with: 12320} additionalOverrideRange: fontReader additionalRangesForJapanese).\\\\n\\\\txTable _ stream next.\\\\n\\\\tglyphs _ stream next.\\\\n\\\\tminAscii _ stream next.\\\\n\\\\tmaxAscii _ stream next.\\\\n\\\\tmaxWidth _ stream next.\\\\n\\\\tascent _ stream next.\\\\n\\\\tdescent _ stream next.\\\\n\\\\tpointSize _ stream next.\\\\n\\\\tname _ aString.\\\\n\\\\ttype _ 0. \\\\\\\"no one see this\\\\\\\"\\\\n\\\\tsuperscript _ ascent - descent // 3.\\\\t\\\\n\\\\tsubscript _ descent - ascent // 3.\\\\t\\\\n\\\\temphasis _ 0.\\\\n\\\\tself reset.\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out' stamp: 'yo 1/15/2004 16:48'!\\\\nreadEFontBDFForKoreanFromFile: fileName name: aString overrideWith: otherFileName\\\\n\\\\n\\\\t| fontReader stream |\\\\n\\\\tfontReader _ EFontBDFFontReaderForRanges readOnlyFileNamed: fileName.\\\\n\\\\tstream _ ReadStream on: (fontReader readRanges: fontReader rangesForKorean overrideWith: otherFileName otherRanges: {Array with: 8481 with: 12320} additionalOverrideRange: fontReader additionalRangesForKorean).\\\\n\\\\txTable _ stream next.\\\\n\\\\tglyphs _ stream next.\\\\n\\\\tminAscii _ stream next.\\\\n\\\\tmaxAscii _ stream next.\\\\n\\\\tmaxWidth _ stream next.\\\\n\\\\tascent _ stream next.\\\\n\\\\tdescent _ stream next.\\\\n\\\\tpointSize _ stream next.\\\\n\\\\tname _ aString.\\\\n\\\\ttype _ 0. \\\\\\\"no one see this\\\\\\\"\\\\n\\\\tsuperscript _ ascent - descent // 3.\\\\t\\\\n\\\\tsubscript _ descent - ascent // 3.\\\\t\\\\n\\\\temphasis _ 0.\\\\n\\\\tself reset.\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out' stamp: 'yo 12/28/2002 21:02'!\\\\nreadEFontBDFFromFile: fileName name: aString rangeFrom: startRange to: endRange\\\\n\\\\n\\\\t| fontReader stream |\\\\n\\\\tfontReader _ EFontBDFFontReader readOnlyFileNamed: fileName.\\\\n\\\\tstream _ ReadStream on: (fontReader readFrom: startRange to: endRange).\\\\n\\\\txTable _ stream next.\\\\n\\\\tglyphs _ stream next.\\\\n\\\\tminAscii _ stream next.\\\\n\\\\tmaxAscii _ stream next.\\\\n\\\\tmaxWidth _ stream next.\\\\n\\\\tascent _ stream next.\\\\n\\\\tdescent _ stream next.\\\\n\\\\tpointSize _ stream next.\\\\n\\\\tname _ aString.\\\\n\\\\ttype _ 0. \\\\\\\"no one see this\\\\\\\"\\\\n\\\\tsuperscript _ ascent - descent // 3.\\\\t\\\\n\\\\tsubscript _ descent - ascent // 3.\\\\t\\\\n\\\\temphasis _ 0.\\\\n\\\\tself reset.\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out' stamp: 'yo 1/19/2005 11:22'!\\\\nreadEFontBDFFromFile: fileName name: aString ranges: ranges\\\\n\\\\n\\\\t| fontReader stream |\\\\n\\\\tfontReader _ EFontBDFFontReaderForRanges readOnlyFileNamed: fileName.\\\\n\\\\tstream _ ReadStream on: (fontReader readRanges: ranges).\\\\n\\\\txTable _ stream next.\\\\n\\\\tglyphs _ stream next.\\\\n\\\\tminAscii _ stream next.\\\\n\\\\tmaxAscii _ stream next.\\\\n\\\\tmaxWidth _ stream next.\\\\n\\\\tascent _ stream next.\\\\n\\\\tdescent _ stream next.\\\\n\\\\tpointSize _ stream next.\\\\n\\\\tname _ aString.\\\\n\\\\ttype _ 0. \\\\\\\"no one see this\\\\\\\"\\\\n\\\\tsuperscript _ ascent - descent // 3.\\\\t\\\\n\\\\tsubscript _ descent - ascent // 3.\\\\t\\\\n\\\\temphasis _ 0.\\\\n\\\\tself reset.\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out' stamp: 'yo 9/23/2002 16:30'!\\\\nreadF12FromStream: aStream\\\\n\\\\n\\\\t| box blt |\\\\n\\\\tminAscii _ 0.\\\\n\\\\tmaxAscii _ 94*94.\\\\n\\\\tascent _ 12.\\\\n\\\\tdescent _ 0.\\\\n\\\\tpointSize _ 12.\\\\n\\\\tsuperscript _ 0.\\\\n\\\\tsubscript _ 0.\\\\n\\\\temphasis _ 0.\\\\n\\\\tmaxWidth _ 12.\\\\n\\\\t\\\\n\\\\tbox _ Form extent: 12@12.\\\\n\\\\tglyphs  _ Form extent: (94*94*12)@12.\\\\n\\\\tblt _ BitBlt toForm: glyphs. \\\\n\\\\txTable _ XTableForFixedFont new.\\\\n\\\\txTable maxAscii: maxAscii + 3.\\\\n\\\\txTable width: 12.\\\\n\\\\t1 to: 256 do:  [:index | \\\\n\\\\t\\\\t1 to: 12 do: [:i |\\\\n\\\\t\\\\t\\\\taStream next.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\t(minAscii + 1 to: 94*94) do:  [:index | \\\\n\\\\t\\\\tself readCharacter: (box bits) from: aStream.\\\\n\\\\t\\\\tblt copy: ((12*(index-1))@0 extent: 12@12) from: 0@0 in: box.\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out' stamp: 'ar 5/23/2000 12:50'!\\\\nreadFromBitFont: fileName\\\\n\\\\t\\\\\\\"This builds a StrikeFont instance by reading the data file format\\\\n\\\\tproduced by BitFont, a widely available font conversion utility\\\\n\\\\twritten by Peter DiCamillo at Brown University\\\\\\\"\\\\n\\\\t\\\\\\\"StrikeFont new readFromBitFont: 'Palatino10.BF' \\\\\\\"\\\\n\\\\t| f lastAscii charLine width ascii charForm line missingForm tempGlyphs iRect p rectLine left tokens right |\\\\n\\\\tf _ FileStream readOnlyFileNamed: fileName.\\\\n\\\\tself readBFHeaderFrom: f.\\\\n\\\\n\\\\t\\\\\\\"NOTE: if font has been scaled (and in any case),\\\\n\\\\tthe REAL bitmap dimensions come after the header.\\\\\\\"\\\\n\\\\tself restOfLine: 'Extent information for entire font' from: f.\\\\n\\\\t\\\\\\\"Parse the following line (including mispelling!!)\\\\\\\"\\\\n\\\\t\\\\\\\"Image rectange: left = -2, right = 8, bottom = -2, top = 7\\\\\\\"\\\\n\\\\ttokens _ (f upTo: Character cr)  findTokens: ' '.\\\\n\\\\tiRect _ Rectangle left: (tokens at: 5) asNumber right: (tokens at: 8) asNumber\\\\n\\\\t\\\\t\\\\t\\\\ttop: (tokens at: 14) asNumber bottom: (tokens at: 11) asNumber.\\\\n\\\\tascent _ iRect top.\\\\n\\\\tdescent _ iRect bottom negated.\\\\n\\\\t\\\\n\\\\ttempGlyphs _ Form extent: (maxWidth*257) @ self height.\\\\n\\\\txTable _ (Array new: 258) atAllPut: 0.\\\\n\\\\txTable at: 1 put: 0.\\\\n\\\\n\\\\t\\\\\\\"Read character forms and blt into tempGlyphs\\\\\\\"\\\\n\\\\tlastAscii _ -1.\\\\n\\\\t[charLine _ self restOfLine: 'Character: ' from: f.\\\\n\\\\tcharLine == nil ifFalse:\\\\n\\\\t\\\\t[p _ f position.\\\\n\\\\t\\\\trectLine _ f upTo: Character cr.\\\\n\\\\t\\\\t(rectLine beginsWith: 'Image rectange: left = ')\\\\n\\\\t\\\\t\\\\tifTrue: [tokens _ rectLine findTokens: ' '.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tleft _ (tokens at: 5) asNumber. right _ (tokens at: 8) asNumber]\\\\n\\\\t\\\\t\\\\tifFalse: [left _ right _ 0. f position: p].\\\\n\\\\t\\\\twidth_ (self restOfLine: 'Width (final pen position) = ' from: f) asNumber - left\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmax: (right-left+1).\\\\n\\\\t\\\\t(charLine beginsWith: 'Missing character') ifTrue: [ascii _ 256].\\\\n\\\\t\\\\t('x''*' match: charLine) ifTrue:\\\\n\\\\t\\\\t\\\\t[ascii _ Number readFrom: (charLine copyFrom: 3 to: 4) asUppercase base: 16].\\\\n\\\\t\\\\tcharForm _ Form extent: width@self height.\\\\n\\\\t\\\\t('*[all blank]' match: charLine) ifFalse:\\\\n\\\\t\\\\t\\\\t[self restOfLine: '  +' from: f.\\\\n\\\\t\\\\t\\\\t1 to: self height do:\\\\n\\\\t\\\\t\\\\t\\\\t[:y | line _ f upTo: Character cr.\\\\n\\\\t\\\\t\\\\t\\\\t4 to: (width + 3 min: line size + iRect left - left) do:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:x | (line at: x - iRect left + left) = $*\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [charForm pixelValueAt: (x-4)@(y-1) put: 1]]]]].\\\\n\\\\tcharLine == nil]\\\\n\\\\t\\\\twhileFalse:\\\\n\\\\t\\\\t\\\\t[self displayChar: ascii form: charForm.\\\\n\\\\t\\\\t\\\\tascii = 256\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [missingForm _ charForm deepCopy]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[minAscii _ minAscii min: ascii.\\\\n\\\\t\\\\t\\\\t\\\\tmaxAscii _ maxAscii max: ascii.\\\\n\\\\t\\\\t\\\\t\\\\tlastAscii+1 to: ascii-1 do: [:a | xTable at: a+2 put: (xTable at: a+1)].\\\\n\\\\t\\\\t\\\\t\\\\ttempGlyphs copy: ((xTable at: ascii+1)@0\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\textent: charForm extent)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfrom: 0@0 in: charForm rule: Form over.\\\\n\\\\t\\\\t\\\\t\\\\txTable at: ascii+2 put: (xTable at: ascii+1) + width.\\\\n\\\\t\\\\t\\\\t\\\\tlastAscii _ ascii]].\\\\n\\\\tf close.\\\\n\\\\tlastAscii+1 to: maxAscii+1 do: [:a | xTable at: a+2 put: (xTable at: a+1)].\\\\n\\\\tmissingForm == nil ifFalse:\\\\n\\\\t\\\\t[tempGlyphs copy: missingForm boundingBox from: missingForm\\\\n\\\\t\\\\t\\\\t\\\\tto: (xTable at: maxAscii+2)@0 rule: Form over.\\\\n\\\\t\\\\txTable at: maxAscii+3 put: (xTable at: maxAscii+2) + missingForm width].\\\\n\\\\tglyphs _ Form extent: (xTable at: maxAscii+3) @ self height.\\\\n\\\\tglyphs copy: glyphs boundingBox from: 0@0 in: tempGlyphs rule: Form over.\\\\n\\\\txTable _ xTable copyFrom: 1 to: maxAscii+3.\\\\n\\\\tcharacterToGlyphMap _ nil.! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out' stamp: 'ar 5/23/2000 12:53'!\\\\nreadFromStrike2Stream: file \\\\n\\\\t\\\\\\\"Build an instance from the supplied binary stream on data in strike2 format\\\\\\\"\\\\n\\\\ttype _ file nextInt32.  type = 2 ifFalse: [file close. self error: 'not strike2 format'].\\\\n\\\\tminAscii _ file nextInt32.\\\\n\\\\tmaxAscii _ file nextInt32.\\\\n\\\\tmaxWidth _ file nextInt32.\\\\n\\\\tascent _ file nextInt32.\\\\n\\\\tdescent _ file nextInt32.\\\\n\\\\tpointSize _ file nextInt32.\\\\n\\\\tsuperscript _ ascent - descent // 3.\\\\t\\\\n\\\\tsubscript _ descent - ascent // 3.\\\\t\\\\n\\\\temphasis _ file nextInt32.\\\\n\\\\txTable _ (Array new: maxAscii + 3) atAllPut: 0.\\\\n\\\\t(minAscii + 1 to: maxAscii + 3) do:\\\\n\\\\t\\\\t[:index | xTable at: index put: file nextInt32].\\\\n\\\\tglyphs _ Form new readFrom: file.\\\\n\\\\n\\\\t\\\\\\\"Set up space character\\\\\\\"\\\\n\\\\t((xTable at: (Space asciiValue + 2))  = 0 or:\\\\n\\\\t\\\\t\\\\t[(xTable at: (Space asciiValue + 2)) = (xTable at: (Space asciiValue + 1))])\\\\n\\\\t\\\\tifTrue:\\\\t[(Space asciiValue + 2) to: xTable size do:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:index | xTable at: index put: ((xTable at: index) + DefaultSpace)]].\\\\n\\\\tcharacterToGlyphMap _ nil.! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out' stamp: 'sma 12/30/1999 14:20'!\\\\nreadFromStrike2: fileName  \\\\\\\"StrikeFont new readFromStrike2: 'Palatino14.sf2'\\\\\\\"\\\\n\\\\t\\\\\\\"Build an instance from the strike font stored in strike2 format.\\\\n\\\\tfileName is of the form: <family name><pointSize>.sf2\\\\\\\"\\\\n\\\\t| file |\\\\n\\\\t('*.sf2' match: fileName) ifFalse: [self halt.  \\\\\\\"likely incompatible\\\\\\\"].\\\\n\\\\tname _ fileName copyUpTo: $. .  \\\\\\\"Drop filename extension\\\\\\\"\\\\n\\\\tfile _ FileStream readOnlyFileNamed: fileName.\\\\n\\\\tfile binary.\\\\n\\\\t[self readFromStrike2Stream: file] ensure: [file close]! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out'!\\\\nrestOfLine: leadString from: file\\\\n\\\\t\\\\\\\"Utility method to assist reading of BitFont data files\\\\\\\"\\\\n\\\\t| line |\\\\n\\\\t[line _ file upTo: Character cr.\\\\n\\\\tline size < leadString size or: [leadString ~= (line copyFrom: 1 to: leadString size)]]\\\\n\\\\twhileTrue: [file atEnd ifTrue: [^ nil]].\\\\n\\\\t^ line copyFrom: leadString size+1 to: line size! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out' stamp: 'ls 4/11/2000 18:57'!\\\\nwriteAsStrike2named: fileName\\\\n\\\\t\\\\\\\"Write me onto a file in strike2 format.\\\\n\\\\tfileName should be of the form: <family name><pointSize>.sf2\\\\\\\"\\\\n\\\\t| file |\\\\n\\\\tfile _ FileStream fileNamed: fileName.\\\\n\\\\tself writeAsStrike2On: file.\\\\n\\\\tfile close.! !\\\\n\\\\n!StrikeFont methodsFor: 'file in/out' stamp: 'ls 3/27/2000 17:43'!\\\\nwriteAsStrike2On: file\\\\n\\\\t\\\\\\\"Write me onto a file in strike2 format.\\\\n\\\\tfileName should be of the form: <family name><pointSize>.sf2\\\\\\\"\\\\n\\\\tfile binary.\\\\n\\\\tfile nextInt32Put: 2.\\\\n\\\\tfile nextInt32Put: minAscii.\\\\n\\\\tfile nextInt32Put: maxAscii.\\\\n\\\\tfile nextInt32Put: maxWidth.\\\\n\\\\tfile nextInt32Put: ascent.\\\\n\\\\tfile nextInt32Put: descent.\\\\n\\\\tfile nextInt32Put: pointSize.\\\\n\\\\tsuperscript _ ascent - descent // 3.\\\\t\\\\n\\\\tsubscript _ descent - ascent // 3.\\\\t\\\\n\\\\tfile nextInt32Put: emphasis.\\\\n\\\\t(minAscii + 1 to: maxAscii + 3) do:\\\\n\\\\t\\\\t[:index | file nextInt32Put: (xTable at: index)].\\\\n\\\\tglyphs writeOn: file.\\\\n\\\\tfile close.\\\\n! !\\\\n\\\\n\\\\n!StrikeFont methodsFor: 'Mac reader'!\\\\naComment\\\\n\\\\t\\\\\\\"To read Mac font resources.  \\\\n1) Use ResEdit in the Fonts folder in the System Folder.  Open the file of the Font you want.  (A screen font, not a TrueType outline font).\\\\n2) Open the FOND resource and scroll down to the list of sizes and resource numbers. Note the resource number of the size you want.\\\\n3) Open the NFNT resource.  Click on the number you have noted.\\\\n4) Choose 'Open Using Hex Editor' from the resource editor.\\\\n5) Copy all of the hex numbers and paste into a text editor.  Save the file into the Smalltalk folder under the name 'FontName 12 hex' (or other size).\\\\n6) Enter the fileName below and execute: \\\\n\\\\nTextStyle default fontAt: 8 put: (StrikeFont new readMacFontHex: 'fileName').\\\\n\\\\nSelect text and type Command-7 to change it to your new font.\\\\n\\\\n(There is some problem in the ParagraphEditor with the large size of Cairo 18.  Its line heights are not the right.)\\\\n\\\\t\\\\\\\"! !\\\\n\\\\n!StrikeFont methodsFor: 'Mac reader'!\\\\nfixKerning: extraWidth\\\\n\\\\t\\\\\\\"Insert one pixel (extraWidth) between each character.  And add the bits for the space character\\\\\\\"\\\\n\\\\t\\\\\\\"Create a space character Form.  Estimate width by ascent / 2 - 1\\\\\\\"\\\\n\\\\t| characterForm char leftX |\\\\n\\\\tcharacterForm _ Form extent: (ascent//2 - 1) @ self height.\\\\n\\\\tself characterFormAt: $  put: characterForm.\\\\n\\\\n\\\\t\\\\\\\"Put one pixel of space after every character.  Mac fonts have no space in the bitmap.\\\\\\\"\\\\n\\\\textraWidth <= 0 ifTrue: [^ self].\\\\n\\\\tminAscii to: maxAscii do: [:ascii |\\\\n\\\\t\\\\tchar _ Character value: ascii.\\\\n\\\\t\\\\tleftX _ xTable at: ascii + 1.\\\\n\\\\t\\\\tcharacterForm _ Form extent: \\\\n\\\\t\\\\t\\\\t((self widthOf: char) + extraWidth) @ self height.\\\\n\\\\t\\\\tcharacterForm \\\\n\\\\t\\\\t\\\\tcopy: (characterForm boundingBox extendBy: \\\\n\\\\t\\\\t\\\\t\\\\t(0-extraWidth@0))\\\\n\\\\t\\\\t\\\\tfrom: leftX@0 in: glyphs rule: Form over.\\\\n\\\\t\\\\tself characterFormAt: char put: characterForm.\\\\n\\\\t\\\\t].\\\\t! !\\\\n\\\\n!StrikeFont methodsFor: 'Mac reader' stamp: 'ar 5/23/2000 12:49'!\\\\nreadMacFontHex: fileName\\\\n\\\\t\\\\\\\"Read the hex version of a Mac FONT type resource.  See the method aComment for how to prepare the input file. 4/26/96 tk\\\\\\\"\\\\n\\\\t| file hh fRectWidth |\\\\n\\\\tname _ fileName.\\\\t\\\\\\\"Palatino 12\\\\\\\"\\\\n\\\\tfile _ FileStream readOnlyFileNamed: fileName, ' hex'.\\\\n\\\\n\\\\t\\\\\\\"See Inside Macintosh page IV-42 for this record\\\\\\\"\\\\n\\\\t\\\\\\\"FontType _ \\\\\\\" Number readFrom: (file next: 4) base: 16.\\\\n\\\\temphasis\\\\t\\\\t_\\\\t\\\\t0.\\\\n\\\\tminAscii _ Number readFrom: (file next: 4) base: 16.\\\\n\\\\tmaxAscii _ Number readFrom: (file next: 4) base: 16.\\\\n\\\\tmaxWidth\\\\t\\\\t_ Number readFrom: (file next: 4) base: 16.\\\\n\\\\t\\\\\\\"kernMax _ \\\\\\\" Number readFrom: (file next: 4) base: 16.\\\\n\\\\t\\\\\\\"NDescent _ \\\\\\\" Number readFrom: (file next: 4) base: 16.\\\\n\\\\tfRectWidth _  Number readFrom: (file next: 4) base: 16.\\\\n\\\\thh _  Number readFrom: (file next: 4) base: 16.\\\\n\\\\t\\\\\\\"OWTLoc _ \\\\\\\" Number readFrom: (file next: 4) base: 16.\\\\n\\\\tascent\\\\t\\\\t\\\\t_ Number readFrom: (file next: 4) base: 16.\\\\n\\\\tdescent\\\\t\\\\t\\\\t_ Number readFrom: (file next: 4) base: 16.\\\\n\\\\t\\\\\\\"leading _ \\\\\\\" Number readFrom: (file next: 4) base: 16.\\\\n\\\\txOffset\\\\t\\\\t\\\\t_\\\\t\\\\t0. \\\\t\\\\n\\\\traster\\\\t\\\\t\\\\t_ Number readFrom: (file next: 4) base: 16.\\\\n\\\\n\\\\tstrikeLength\\\\t_\\\\t\\\\traster*16.\\\\n\\\\tsuperscript\\\\t\\\\t_\\\\t\\\\tascent - descent // 3.\\\\t\\\\n\\\\tsubscript\\\\t\\\\t_\\\\t\\\\tdescent - ascent // 3.\\\\t\\\\n\\\\tself strikeFromHex: file width: raster height: hh.\\\\n\\\\tself xTableFromHex: file.\\\\n\\\\tfile close.\\\\n\\\\n\\\\t\\\\\\\"Insert one pixel between each character.  And add space character.\\\\\\\"\\\\n\\\\tself fixKerning: (fRectWidth - maxWidth).\\\\t\\\\n\\\\n\\\\t\\\\\\\"Recompute character to glyph mapping\\\\\\\"\\\\n\\\\tcharacterToGlyphMap _ nil.! !\\\\n\\\\n!StrikeFont methodsFor: 'Mac reader'!\\\\nstrikeFromHex: file width: w height: h\\\\n\\\\t\\\\\\\"read in just the raw strike bits from a hex file.  No spaces or returns.  W is in words (2 bytes), h in pixels.\\\\\\\" \\\\n\\\\t| newForm theBits offsetX offsetY str num cnt |\\\\n\\\\toffsetX  _ 0.\\\\n\\\\toffsetY _ 0.\\\\n\\\\toffsetX > 32767 ifTrue: [offsetX _ offsetX - 65536]. \\\\\\\"stored two's-complement\\\\\\\"\\\\n\\\\toffsetY > 32767 ifTrue: [offsetY _ offsetY - 65536]. \\\\\\\"stored two's-complement\\\\\\\"\\\\n\\\\tnewForm _ Form extent: strikeLength @ h offset: offsetX @ offsetY.\\\\n\\\\ttheBits _ newForm bits.\\\\n\\\\tcnt _ 0.\\\\t\\\\t\\\\\\\"raster may be 16 bits, but theBits width is 32\\\\\\\" \\\\n\\\\t1 to: theBits size do: [:i | \\\\n\\\\t\\\\t(cnt _ cnt + 32) > strikeLength \\\\n\\\\t\\\\t  ifTrue: [cnt _ 0.\\\\n\\\\t\\\\t\\\\tnum _ Number readFrom: (str _ file next: 4) base: 16]\\\\n\\\\t\\\\t  ifFalse: [\\\\n\\\\t\\\\t\\\\tcnt = strikeLength ifTrue: [cnt _ 0].\\\\n\\\\t\\\\t\\\\tnum _ Number readFrom: (str _ file next: 8) base: 16].\\\\n\\\\t\\\\ttheBits at: i put: num].\\\\n\\\\tglyphs _ newForm.! !\\\\n\\\\n!StrikeFont methodsFor: 'Mac reader'!\\\\nxTableFromHex: file\\\\n\\\\n\\\\t| strike num str wid |\\\\n\\\\tstrike _ file.\\\\n\\\\txTable _ (Array new: maxAscii + 3) atAllPut: 0.\\\\n\\\\t(minAscii + 1 to: maxAscii + 3) do:\\\\n\\\\t\\\\t[:index | \\\\n\\\\t\\\\t\\\\tnum _ Number readFrom: (str _ strike next: 4) base: 16. \\\\n\\\\t\\\\t\\\\txTable at: index put: num].\\\\n\\\\n\\\\t1 to: xTable size - 1 do: [:ind |\\\\n\\\\t\\\\twid _ (xTable at: ind+1) - (xTable at: ind).\\\\n\\\\t\\\\t(wid < 0) | (wid > 40) ifTrue: [\\\\n\\\\t\\\\t\\\\tfile close.\\\\n\\\\t\\\\t\\\\tself error: 'illegal character width']].\\\\n! !\\\\n\\\\n\\\\n!StrikeFont methodsFor: 'make arrows' stamp: 'sps 10/15/2003 17:06'!\\\\nmakeAssignArrow\\\\n\\\\\\\"Replace the underline character with an arrow for this font\\\\\\\"\\\\n\\\\n\\\\t| arrowForm arrowCanvas arrowY arrowLeft arrowRight arrowHeadLength |\\\\n\\\\n\\\\tarrowForm _ (self characterFormAt: $_) copy.\\\\n\\\\tarrowCanvas _ arrowForm getCanvas.\\\\n\\\\tarrowCanvas fillColor: Color white.\\\\n\\\\tarrowY _ arrowForm height // 2.\\\\n\\\\tarrowLeft _ 0. \\\\n\\\\tarrowRight _ arrowForm width - 2.\\\\n\\\\tarrowHeadLength _ (arrowRight - arrowLeft) * 2 // 5.\\\\n\\\\t\\\\\\\"Draw the lines\\\\\\\"\\\\n\\\\tarrowCanvas line: (arrowLeft@arrowY) to: (arrowRight@arrowY) color: Color black.\\\\n\\\\tarrowCanvas \\\\n\\\\t\\\\tline: (arrowLeft@arrowY) \\\\n\\\\t\\\\tto: ((arrowLeft + arrowHeadLength)@(arrowY - arrowHeadLength)) \\\\n\\\\t\\\\tcolor: Color black.\\\\n\\\\tarrowCanvas \\\\n\\\\t\\\\tline: (arrowLeft@arrowY) \\\\n\\\\t\\\\tto: ((arrowLeft + arrowHeadLength)@(arrowY + arrowHeadLength)) \\\\n\\\\t\\\\tcolor: Color black.\\\\n\\\\n\\\\t\\\\\\\"Replace the glyph\\\\\\\"\\\\n\\\\tself characterFormAt: $_ put: arrowForm.\\\\n\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'make arrows' stamp: 'sps 10/15/2003 17:06'!\\\\nmakeReturnArrow\\\\n\\\\\\\"Replace the caret character with an arrow\\\\\\\"\\\\n\\\\n\\\\t| arrowForm arrowCanvas arrowHeadLength arrowX arrowTop arrowBottom |\\\\n\\\\n\\\\tarrowForm _ (self characterFormAt: $^) copy.\\\\n\\\\tarrowCanvas _ arrowForm getCanvas.\\\\n\\\\tarrowCanvas fillColor: Color white.\\\\n\\\\n\\\\tarrowHeadLength _ ((arrowForm width - 2)// 2).\\\\n\\\\tarrowX _ (arrowHeadLength max: (arrowForm width // 2)).\\\\n\\\\tarrowTop _ arrowForm height // 4. \\\\n\\\\tarrowBottom _ (arrowTop + (arrowForm width * 4 // 5 )).\\\\n\\\\tarrowBottom _ (arrowBottom min: arrowForm height) max: (arrowForm height * 2 // 3).\\\\n\\\\n\\\\t\\\\\\\"Draw the lines\\\\\\\"\\\\n\\\\tarrowCanvas line: (arrowX@arrowTop) to: (arrowX@arrowBottom) color: Color black.\\\\n\\\\tarrowCanvas \\\\n\\\\t\\\\tline: (arrowX@arrowTop) \\\\n\\\\t\\\\tto: ((arrowX - arrowHeadLength)@(arrowTop + arrowHeadLength)) \\\\n\\\\t\\\\tcolor: Color black.\\\\n\\\\tarrowCanvas \\\\n\\\\t\\\\tline: (arrowX@arrowTop) \\\\n\\\\t\\\\tto: ((arrowX + arrowHeadLength)@(arrowTop + arrowHeadLength)) \\\\n\\\\t\\\\tcolor: Color black.\\\\n\\\\n\\\\t\\\\\\\"Replace the glyph\\\\\\\"\\\\n\\\\tself characterFormAt: $^ put: arrowForm.\\\\n\\\\n! !\\\\n\\\\n\\\\n!StrikeFont methodsFor: 'multibyte character methods' stamp: 'yo 3/18/2004 00:10'!\\\\nfixAccuISO8859From: aStrikeFont\\\\n\\\\n\\\\t| f |\\\\n\\\\tself reset.\\\\n\\\\txTable _ aStrikeFont xTable copy.\\\\n\\\\tglyphs _ Form extent: aStrikeFont glyphs extent.\\\\n\\\\tmaxAscii _ 255.\\\\n\\\\tminAscii _ 0.\\\\n\\\\t\\\\\\\"stopConditions _ nil.\\\\\\\"\\\\n\\\\n\\\\t0 to: 127 do: [:i |\\\\n\\\\t\\\\tf _ aStrikeFont characterFormAt: (Character value: i) isoToSqueak.\\\\n\\\\t\\\\tf width  = 0 ifTrue: [f _ Form extent: 1@f height].\\\\n\\\\t\\\\t\\\\n\\\\t\\\\tself characterFormAt: (Character value: i) put: f.\\\\n\\\\t].\\\\n\\\\t128 to: 159 do: [:i |\\\\n\\\\t\\\\tf _ Form extent: 1@f height.\\\\n\\\\t\\\\tself characterFormAt: (Character value: i) put: f.\\\\n\\\\t].\\\\n\\\\t160 to: 255 do: [:i |\\\\n\\\\t\\\\tf _ aStrikeFont characterFormAt: (Character value: i) isoToSqueak.\\\\n\\\\t\\\\tf width  = 0 ifTrue: [f _ Form extent: 1@f height].\\\\n\\\\t\\\\t\\\\n\\\\t\\\\tself characterFormAt: (Character value: i) put: f.\\\\n\\\\t].\\\\n\\\\t\\\\t\\\\n\\\\t^ self.\\\\t\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'multibyte character methods' stamp: 'yo 11/12/2002 12:56'!\\\\nfixAscent: a andDescent: d head: h\\\\n\\\\n\\\\t| bb newGlyphs |\\\\n\\\\t\\\\\\\"(a + d) = (ascent + descent) ifTrue: [\\\\\\\"\\\\n\\\\t\\\\tascent _ a.\\\\n\\\\t\\\\tdescent _ d.\\\\n\\\\t\\\\tnewGlyphs _ Form extent: (glyphs width@(h + glyphs height)).\\\\n\\\\t\\\\tbb _ BitBlt toForm: newGlyphs.\\\\n\\\\t\\\\tbb copy: (0@h extent: (glyphs extent)) from: 0@0 in: glyphs\\\\n\\\\t\\\\t\\\\tfillColor: nil rule: Form over.\\\\n\\\\t\\\\tglyphs _ newGlyphs.\\\\n\\\\t\\\\\\\"].\\\\\\\"\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'multibyte character methods' stamp: 'yo 9/16/2002 15:07'!\\\\nfixForISO8859From: aStrikeFont\\\\n\\\\n\\\\t| fixer m mappingTable |\\\\n\\\\tfixer _ StrikeFontFixer newOn: aStrikeFont.\\\\n\\\\tself reset.\\\\n\\\\txTable _ aStrikeFont xTable copy.\\\\n\\\\tglyphs _ Form extent: aStrikeFont glyphs extent.\\\\n\\\\tmaxAscii _ 255.\\\\n\\\\tminAscii _ 0.\\\\n\\\\tmappingTable _ fixer mappingTable.\\\\n\\\\t\\\\\\\"stopConditions _ nil.\\\\\\\"\\\\n\\\\n\\\\t0 to: 255 do: [:i |\\\\n\\\\t\\\\t(m _ mappingTable at: i+1) ~= nil ifTrue: [\\\\n\\\\t\\\\t\\\\tself characterFormAt: (Character value: i)\\\\n\\\\t\\\\t\\\\t\\\\tput: (aStrikeFont characterFormAt: (Character value: m)).\\\\n\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\tself characterFormAt: (Character value: i)\\\\n\\\\t\\\\t\\\\t\\\\tput: (aStrikeFont characterFormAt: (Character space)).\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\t^self.\\\\t\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'multibyte character methods' stamp: 'yo 8/28/2002 16:35'!\\\\nfixXTable\\\\n\\\\n\\\\t| newXTable val |\\\\n\\\\txTable size >= 258 ifTrue: [\\\\n\\\\t\\\\t^ self.\\\\n\\\\t].\\\\n\\\\n\\\\tnewXTable _ Array new: 258.\\\\n\\\\t1 to: xTable size do: [:i |\\\\n\\\\t\\\\tnewXTable at: i put: (xTable at: i).\\\\n\\\\t].\\\\n\\\\n\\\\tval _ xTable at: (xTable size).\\\\n\\\\t\\\\n\\\\txTable size + 1 to: 258 do: [:i |\\\\n\\\\t\\\\tnewXTable at: i put: val.\\\\n\\\\t].\\\\n\\\\tminAscii _ 0.\\\\n\\\\tmaxAscii _ 255.\\\\n\\\\txTable _ newXTable.\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'multibyte character methods' stamp: 'yo 1/6/2005 04:18'!\\\\nhasGlyphOf: aCharacter\\\\n\\\\n\\\\t| code |\\\\n\\\\tcode _ aCharacter charCode.\\\\n\\\\t((code between: self minAscii and: self maxAscii) not) ifTrue: [\\\\n\\\\t\\\\t^ false.\\\\n\\\\t].\\\\n\\\\t(xTable at: code + 1) < 0 ifTrue: [\\\\n\\\\t\\\\t^ false.\\\\n\\\\t].\\\\n\\\\t^ true.\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'multibyte character methods' stamp: 'yo 8/28/2002 16:37'!\\\\nreadCharacter: aBits from: aStream\\\\n\\\\n\\\\t| pos |\\\\n\\\\tpos _ 0.\\\\n\\\\t12 timesRepeat: [\\\\n\\\\t\\\\t1 to: 2 do: [ :w |\\\\n\\\\t\\\\t\\\\taBits byteAt: (pos+w) put: (aStream next ). \\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tpos _ pos + 4.\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'multibyte character methods' stamp: 'yo 5/24/2004 23:11'!\\\\nsetupDefaultFallbackFont\\\\n\\\\n\\\\t| fonts f |\\\\n\\\\tfonts _ TextStyle default fontArray.\\\\n\\\\tf _ fonts first.\\\\n\\\\t1 to: fonts size do: [:i |\\\\n\\\\t\\\\tself height > (fonts at: i) height ifTrue: [f _ fonts at: i].\\\\n\\\\t].\\\\n\\\\tself fallbackFont: f.\\\\n\\\\tself reset.\\\\n\\\\n! !\\\\n\\\\n\\\\n!StrikeFont methodsFor: 'testing'!\\\\ncheckCharacter: character \\\\n\\\\t\\\\\\\"Answer a Character that is within the ascii range of the receiver--either \\\\n\\\\tcharacter or the last character in the receiver.\\\\\\\"\\\\n\\\\n\\\\t| ascii |  \\\\n\\\\tascii _ character asciiValue.\\\\n\\\\t((ascii < minAscii) or: [ascii > maxAscii])\\\\n\\\\t\\\\t\\\\tifTrue: [^maxAscii asCharacter]\\\\n\\\\t\\\\t\\\\tifFalse:\\\\t[^character]\\\\n! !\\\\n\\\\n\\\\n!StrikeFont methodsFor: '*nebraska-file in/out' stamp: 'yo 12/17/2005 20:36'!\\\\nencodedForRemoteCanvas\\\\n\\\\n\\\\t| stream |\\\\n\\\\tstream := RWBinaryOrTextStream on: ''.\\\\n\\\\tstream nextPutAll: self familyName.\\\\n\\\\tstream nextPut: Character space.\\\\n\\\\tstream nextPutAll: self name.\\\\n\\\\tstream nextPut: Character space.\\\\n\\\\tstream nextPutAll: self height.\\\\n\\\\tstream nextPut: Character space.\\\\n\\\\tstream nextPutAll: self emphasis asString.\\\\n\\\\t^ stream contents asString.\\\\n! !\\\\n\\\\n\\\\n!StrikeFont methodsFor: 'private' stamp: 'yo 3/11/2005 07:38'!\\\\ncreateCharacterToGlyphMap\\\\n        \\\\\\\"Private. Create the character to glyph mapping for a font that didn't have any before. This is basically equivalent to what the former setStopCondition did, only based on indexes.\\\\\\\"\\\\n\\\\n        maxAscii < 256 ifTrue: [^ (1 to: 256) collect: [:i | i - 1]].\\\\n        ^ nil.\\\\n! !\\\\n\\\\n!StrikeFont methodsFor: 'private' stamp: 'yo 5/20/2004 10:51'!\\\\nleftAndRighOrNilFor: char\\\\n\\\\n\\\\t| code leftX |\\\\n\\\\tcode _ char charCode.\\\\n\\\\t((code between: self minAscii and: self maxAscii) not) ifTrue: [\\\\n\\\\t\\\\tcode _ $? charCode.\\\\n\\\\t].\\\\n\\\\tleftX _ xTable at: code + 1.\\\\n\\\\tleftX < 0 ifTrue: [\\\\n\\\\t\\\\tcode _ $? charCode.\\\\n\\\\t\\\\tleftX _ xTable at: code + 1.\\\\n\\\\t].\\\\n\\\\t^ Array with: leftX with: (xTable at: code + 2).\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStrikeFont class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StrikeFont class methodsFor: 'accessing' stamp: 'nk 9/1/2004 11:00'!\\\\nactualFamilyNames\\\\n\\\\t\\\\\\\"Answer a sorted list of actual family names, without the Default aliases\\\\\\\"\\\\n\\\\n\\\\t^(self familyNames copyWithoutAll: TextStyle defaultFamilyNames) asOrderedCollection! !\\\\n\\\\n!StrikeFont class methodsFor: 'accessing' stamp: 'ar 2/3/2002 23:04'!\\\\nfamilyName: aName pointSize: aSize\\\\n\\\\t\\\\\\\"Answer a font (or the default font if the name is unknown) in the specified size.\\\\\\\"\\\\n\\\\n\\\\t^ ((TextStyle named: aName asSymbol) ifNil: [TextStyle default]) fontOfPointSize: aSize! !\\\\n\\\\n!StrikeFont class methodsFor: 'accessing' stamp: 'ar 11/25/2004 15:19'!\\\\nfamilyName: aName size: aSize\\\\n\\\\t\\\\\\\"Answer a font (or the default font if the name is unknown) in the specified size.\\\\\\\"\\\\n\\\\t| style |\\\\n\\\\tstyle := TextStyle named: aName asSymbol.\\\\n\\\\tstyle ifNil: [^(FontSubstitutionDuringLoading forFamilyName: aName pixelSize: aSize)\\\\n\\\\t\\\\t\\\\tsignal: 'missing font' ].\\\\n\\\\t^style fontOfSize: aSize! !\\\\n\\\\n!StrikeFont class methodsFor: 'accessing' stamp: 'sma 12/30/1999 13:48'!\\\\nfamilyNames\\\\n\\\\t^ (TextConstants select: [:each | each isKindOf: TextStyle]) keys asSortedCollection! !\\\\n\\\\n!StrikeFont class methodsFor: 'accessing' stamp: 'tak 11/11/2004 21:14'!\\\\nsetupDefaultFallbackFont\\\\n\\\\\\\"\\\\n\\\\tStrikeFont setupDefaultFallbackFont\\\\n\\\\\\\"\\\\n\\\\n\\\\t(#(#Accuat #Accujen #Accula #Accumon #Accusf #Accushi #Accuve #Atlanta) collect: [:e | TextStyle named: e]) do: [:style |\\\\n\\\\t\\\\tstyle fontArray do: [:e |\\\\n\\\\t\\\\t\\\\te reset.\\\\n\\\\t\\\\t\\\\te setupDefaultFallbackFont.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\tTTCFont allSubInstances\\\\n\\\\t\\\\tdo: [:font | font reset.\\\\n\\\\t\\\\t\\\\tfont setupDefaultFallbackFont]\\\\n\\\\n! !\\\\n\\\\n\\\\n!StrikeFont class methodsFor: 'derivative font caching' stamp: 'tak 3/11/2005 16:27'!\\\\nshutDown  \\\\\\\"StrikeFont shutDown\\\\\\\"\\\\n\\\\t\\\\\\\"Deallocate synthetically derived copies of base fonts to save space\\\\\\\"\\\\n\\\\tself allSubInstancesDo: [:sf | sf reset].\\\\n\\\\tStrikeFontSet allSubInstancesDo: [:sf | sf reset].\\\\n\\\\tDefaultStringScanner _ nil.\\\\n! !\\\\n\\\\n\\\\n!StrikeFont class methodsFor: 'examples'!\\\\nconvertFontsNamed: familyName  \\\\\\\" StrikeFont convertFontsNamed: 'NewYork' \\\\\\\"\\\\n\\\\t\\\\\\\"This utility is for use after you have used BitFont to produce data files \\\\n\\\\tfor the fonts you wish to use.  It will read the BitFont files and then \\\\n\\\\twrite them out in strike2 (*.sf2) format which is much more compact,\\\\n\\\\tand which can be read in again very quickly.\\\\\\\"\\\\n\\\\t\\\\\\\"For this utility to work as is, the BitFont data files must be named\\\\n\\\\t'familyNN.BF', and must reside in the same directory as the image.\\\\\\\"\\\\n\\\\t| f |\\\\n\\\\t(FileDirectory default fileNamesMatching: familyName , '*.BF') do:\\\\n\\\\t\\\\t[:fname | Transcript cr; show: fname.\\\\n\\\\t\\\\tf _ StrikeFont new readFromBitFont: fname.\\\\n\\\\t\\\\tf writeAsStrike2named: f name , '.sf2']! !\\\\n\\\\n!StrikeFont class methodsFor: 'examples'!\\\\nexample\\\\n\\\\t\\\\\\\"Displays a line of text on the display screen at the location of the cursor.\\\\n\\\\tExample depends on the strike font file, 'TimesRoman10.strike'. existing.\\\\\\\"\\\\n\\\\n\\\\t(StrikeFont new readFromStrike2: 'NewYork12.sf2')\\\\n\\\\t\\\\tdisplayLine: 'A line of 12-pt text in New York style' at: Sensor cursorPoint\\\\n\\\\t \\\\n\\\\t\\\\\\\"StrikeFont example.\\\\\\\"! !\\\\n\\\\n!StrikeFont class methodsFor: 'examples' stamp: 'tpr 6/10/2005 16:07'!\\\\nreadStrikeFont2Family: familyName \\\\n\\\\t\\\\\\\"StrikeFont readStrikeFont2Family: 'Lucida'\\\\\\\"\\\\n\\\\t^self readStrikeFont2Family: familyName fromDirectory: FileDirectory default! !\\\\n\\\\n!StrikeFont class methodsFor: 'examples' stamp: 'tpr 6/10/2005 16:07'!\\\\nreadStrikeFont2Family: familyName fromDirectory: aDirectory\\\\n\\\\t\\\\\\\"StrikeFont readStrikeFont2Family: 'Lucida' fromDirectory: FileDirectory default\\\\\\\"\\\\n\\\\t\\\\\\\"This utility reads all available .sf2 StrikeFont files for a given family from  \\\\n\\\\tthe current directory. It returns an Array, sorted by size, suitable for handing \\\\n\\\\tto TextStyle newFontArray: .\\\\\\\"\\\\n\\\\t\\\\\\\"For this utility to work as is, the .sf2 files must be named 'familyNN.sf2'.\\\\\\\"\\\\n\\\\t| fileNames strikeFonts fontArray |\\\\n\\\\tfileNames _ aDirectory fileNamesMatching: familyName , '##.sf2'.\\\\n\\\\tstrikeFonts _ fileNames collect: [:fname | StrikeFont new readFromStrike2: fname].\\\\n\\\\tstrikeFonts do: [ :font | font reset ].\\\\n\\\\tstrikeFonts _ strikeFonts asSortedCollection: [:a :b | a height < b height].\\\\n\\\\tfontArray _ strikeFonts asArray.\\\\n\\\\t^ fontArray\\\\n\\\\n\\\\\\\"TextConstants at: #Lucida put: (TextStyle fontArray: (StrikeFont \\\\n\\\\treadStrikeFont2Family: 'Lucida')).\\\\\\\"! !\\\\n\\\\n\\\\n!StrikeFont class methodsFor: 'font creation' stamp: 'ar 6/4/2000 22:27'!\\\\nfromHostFont: fontName size: fontSize flags: fontFlags weight: fontWeight\\\\n\\\\t\\\\\\\"\\\\n\\\\t\\\\t^StrikeFont fromHostFont: (StrikeFont hostFontFromUser)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsize: 12 flags: 0 weight: 4.\\\\n\\\\t\\\\\\\"\\\\n\\\\t| fontHandle glyphs xTable xStart maxWidth w glyphForm ascent descent fontHeight |\\\\n\\\\tfontHandle _ self primitiveCreateFont: fontName size: fontSize flags: fontFlags weight: fontWeight.\\\\n\\\\tascent _ self primitiveFontAscent: fontHandle.\\\\n\\\\tdescent _ self primitiveFontDescent: fontHandle.\\\\n\\\\tfontHeight _ ascent + descent.\\\\n\\\\txTable _ Array new: 258.\\\\n\\\\txStart _ maxWidth _ 0.\\\\n\\\\t0 to: 255 do:[:i|\\\\n\\\\t\\\\txTable at: i+1 put: xStart.\\\\n\\\\t\\\\tw _ self primitiveFont: fontHandle widthOfChar: i.\\\\n\\\\t\\\\tw > maxWidth ifTrue:[maxWidth _ w].\\\\n\\\\t\\\\txStart _ xStart + w].\\\\n\\\\txTable at: 256 put: xStart.\\\\n\\\\txTable at: 257 put: xStart.\\\\n\\\\txTable at: 258 put: xStart.\\\\n\\\\tglyphs _ Form extent: xTable last @ fontHeight depth: 1.\\\\n\\\\tglyphForm _ Form extent: maxWidth @ fontHeight depth: 1.\\\\n\\\\t0 to: 255 do:[:i|\\\\n\\\\t\\\\tglyphForm fillWhite.\\\\n\\\\t\\\\tself primitiveFont: fontHandle glyphOfChar: i into: glyphForm.\\\\n\\\\t\\\\txStart _ xTable at: i+1.\\\\n\\\\t\\\\tglyphForm displayOn: glyphs at: xStart@0.\\\\n\\\\t\\\\tglyphForm displayOn: Display at: xStart@0.\\\\n\\\\t].\\\\n\\\\tself primitiveDestroyFont: fontHandle.\\\\n\\\\t^Array with: glyphs with: xTable! !\\\\n\\\\n!StrikeFont class methodsFor: 'font creation' stamp: 'rbb 2/18/2005 13:21'!\\\\nhostFontFromUser\\\\n\\\\t\\\\\\\"StrikeFont hostFontFromUser\\\\\\\"\\\\n\\\\t| fontNames index labels |\\\\n\\\\tfontNames _ self listFontNames asSortedCollection.\\\\n\\\\tlabels _ WriteStream on: (String new: 100).\\\\n\\\\tfontNames do:[:fn| labels nextPutAll: fn] separatedBy:[labels cr].\\\\n\\\\tindex _ (UIManager default chooseFrom: (labels contents substrings) \\\\n\\\\t\\\\t\\\\t\\\\ttitle: 'Choose your font').\\\\n\\\\tindex = 0 ifTrue:[^nil].\\\\n\\\\t^fontNames at: index! !\\\\n\\\\n!StrikeFont class methodsFor: 'font creation' stamp: 'ar 6/4/2000 21:12'!\\\\nlistFont: index\\\\n\\\\t<primitive:'primitiveListFont' module:'FontPlugin'>\\\\n\\\\t^nil! !\\\\n\\\\n!StrikeFont class methodsFor: 'font creation' stamp: 'ar 6/4/2000 21:12'!\\\\nlistFontNames\\\\n\\\\t\\\\\\\"StrikeFont listFontNames\\\\\\\"\\\\n\\\\t\\\\\\\"List all the OS font names\\\\\\\"\\\\n\\\\t| font fontNames index |\\\\n\\\\tfontNames _ WriteStream on: Array new.\\\\n\\\\tindex _ 0.\\\\n\\\\t[font _ self listFont: index.\\\\n\\\\tfont == nil] whileFalse:[\\\\n\\\\t\\\\tfontNames nextPut: font.\\\\n\\\\t\\\\tindex _ index + 1].\\\\n\\\\t^fontNames contents! !\\\\n\\\\n!StrikeFont class methodsFor: 'font creation' stamp: 'tak 8/3/2005 21:11'!\\\\nlocaleChanged\\\\n\\\\tself setupDefaultFallbackFont! !\\\\n\\\\n!StrikeFont class methodsFor: 'font creation' stamp: 'ar 6/4/2000 21:13'!\\\\nprimitiveCreateFont: fontName size: fontSize flags: fontFlags weight: fontWeight\\\\n\\\\t<primitive:'primitiveCreateFont' module:'FontPlugin'>\\\\n\\\\t^self primitiveFailed! !\\\\n\\\\n!StrikeFont class methodsFor: 'font creation' stamp: 'ar 6/4/2000 21:13'!\\\\nprimitiveDestroyFont: fontHandle\\\\n\\\\t<primitive:'primitiveDestroyFont' module:'FontPlugin'>\\\\n\\\\t^self primitiveFailed! !\\\\n\\\\n!StrikeFont class methodsFor: 'font creation' stamp: 'ar 6/4/2000 21:14'!\\\\nprimitiveFont: fontHandle glyphOfChar: charIndex into: glyphForm\\\\n\\\\t<primitive:'primitiveFontGlyphOfChar' module:'FontPlugin'>\\\\n\\\\t^self primitiveFailed! !\\\\n\\\\n!StrikeFont class methodsFor: 'font creation' stamp: 'ar 6/4/2000 21:15'!\\\\nprimitiveFont: fontHandle widthOfChar: charIndex\\\\n\\\\t<primitive:'primitiveFontWidthOfChar' module:'FontPlugin'>\\\\n\\\\t^self primitiveFailed! !\\\\n\\\\n!StrikeFont class methodsFor: 'font creation' stamp: 'ar 6/4/2000 22:25'!\\\\nprimitiveFontAscent: fontHandle\\\\n\\\\t<primitive:'primitiveFontAscent' module:'FontPlugin'>\\\\n\\\\t^self primitiveFailed! !\\\\n\\\\n!StrikeFont class methodsFor: 'font creation' stamp: 'ar 6/4/2000 22:25'!\\\\nprimitiveFontDescent: fontHandle\\\\n\\\\t<primitive:'primitiveFontDescent' module:'FontPlugin'>\\\\n\\\\t^self primitiveFailed! !\\\\n\\\\n!StrikeFont class methodsFor: 'font creation' stamp: 'ar 6/4/2000 21:14'!\\\\nprimitiveFontEncoding: fontHandle\\\\n\\\\t<primitive:'primitiveFontEncoding' module:'FontPlugin'>\\\\n\\\\t^self primitiveFailed! !\\\\n\\\\n\\\\n!StrikeFont class methodsFor: 'instance creation' stamp: 'ar 2/3/2002 23:06'!\\\\nfamilyName: aName pointSize: aSize emphasized: emphasisCode\\\\n\\\\t\\\\\\\"Create the font with this emphasis\\\\\\\"\\\\n\\\\n\\\\t^ (self familyName: aName pointSize: aSize) emphasized: emphasisCode! !\\\\n\\\\n!StrikeFont class methodsFor: 'instance creation' stamp: 'tk 1/28/1999 11:31'!\\\\nfamilyName: aName size: aSize emphasized: emphasisCode\\\\n\\\\t\\\\\\\"Create the font with this emphasis\\\\\\\"\\\\n\\\\n\\\\t^ (self familyName: aName size: aSize) emphasized: emphasisCode! !\\\\n\\\\n!StrikeFont class methodsFor: 'instance creation' stamp: 'yo 3/18/2004 00:10'!\\\\nfixAccuISO8859From: aStrikeFont\\\\n\\\\n\\\\t^aStrikeFont copy fixAccuISO8859From: aStrikeFont.\\\\n! !\\\\n\\\\n!StrikeFont class methodsFor: 'instance creation' stamp: 'yo 9/16/2002 15:55'!\\\\nfixForISO8859From: aStrikeFont\\\\n\\\\n\\\\t^aStrikeFont copy fixForISO8859From: aStrikeFont.\\\\n! !\\\\n\\\\n!StrikeFont class methodsFor: 'instance creation'!\\\\nfromStrike: fileName \\\\n\\\\t\\\\\\\"Read a font from disk in the old ST-80 'strike' format.\\\\n\\\\tNote: this is an old format; use strike2 format instead\\\\\\\"\\\\n\\\\n\\\\t^self new newFromStrike: fileName! !\\\\n\\\\n!StrikeFont class methodsFor: 'instance creation' stamp: 'ar 1/5/2002 21:41'!\\\\nfromUser\\\\n\\\\t\\\\\\\"StrikeFont fromUser\\\\\\\"\\\\n\\\\t^self fromUser: TextStyle defaultFont! !\\\\n\\\\n!StrikeFont class methodsFor: 'instance creation' stamp: 'nk 9/1/2004 14:29'!\\\\nfromUser: priorFont\\\\n\\\\t^self fromUser: priorFont allowKeyboard: true! !\\\\n\\\\n!StrikeFont class methodsFor: 'instance creation' stamp: 'nk 9/1/2004 14:28'!\\\\nfromUser: priorFont allowKeyboard: aBoolean\\\\n\\\\t\\\\\\\"rr 3/23/2004 10:02 : made the menu invoked modally, thus allowing\\\\n\\\\tkeyboard control\\\\\\\" \\\\n\\\\t\\\\\\\"StrikeFont fromUser\\\\\\\"\\\\n\\\\t\\\\\\\"Present a menu of available fonts, and if one is chosen, return it.\\\\n\\\\tOtherwise return nil.\\\\\\\"\\\\n\\\\n\\\\t| fontList fontMenu style active ptMenu label spec font |\\\\n\\\\tfontList _ StrikeFont actualFamilyNames.\\\\n\\\\tfontMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\tfontList do: [:fontName |\\\\n\\\\t\\\\tstyle _ TextStyle named: fontName.\\\\n\\\\t\\\\tactive _ priorFont familyName sameAs: fontName.\\\\n\\\\t\\\\tptMenu _ MenuMorph new defaultTarget: self.\\\\n\\\\t\\\\tstyle pointSizes do: [:pt |\\\\n\\\\t\\\\t\\\\t(active and:[pt = priorFont pointSize]) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue:[label _ '<on>'] \\\\n\\\\t\\\\t\\\\t\\\\tifFalse:[label _ '<off>'].\\\\n\\\\t\\\\t\\\\tlabel _ label, pt printString, ' pt'.\\\\n\\\\t\\\\t\\\\tptMenu add: label \\\\n\\\\t\\\\t\\\\t\\\\ttarget: fontMenu\\\\n\\\\t\\\\t\\\\t\\\\tselector: #modalSelection:\\\\n\\\\t\\\\t\\\\t\\\\targument: {fontName. pt}].\\\\n\\\\t\\\\tstyle isTTCStyle ifTrue: [\\\\n\\\\t\\\\t\\\\tptMenu add: 'new size'\\\\n\\\\t\\\\t\\\\t\\\\ttarget: style selector: #addNewFontSizeDialog: argument: {fontName. fontMenu}.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tactive ifTrue:[label _ '<on>'] ifFalse:[label _ '<off>'].\\\\n\\\\t\\\\tlabel _ label, fontName.\\\\n\\\\t\\\\tfontMenu add: label subMenu: ptMenu].\\\\n\\\\tspec _ fontMenu invokeModalAt: ActiveHand position in: ActiveWorld allowKeyboard: aBoolean.\\\\n\\\\tspec ifNil: [^ nil].\\\\n\\\\tstyle _ TextStyle named: spec first.\\\\n\\\\tstyle ifNil: [^ self].\\\\n\\\\tfont _ style fonts detect: [:any | any pointSize = spec last] ifNone: [nil].\\\\n\\\\t^ font! !\\\\n\\\\n!StrikeFont class methodsFor: 'instance creation' stamp: 'yo 8/5/2003 13:11'!\\\\nnewForJapaneseFromEFontBDFFile: fileName name: aString overrideWith: otherFileName\\\\n\\\\n\\\\t| n |\\\\n\\\\tn _ self new.\\\\n\\\\tn readEFontBDFForJapaneseFromFile: fileName name: aString overrideWith: otherFileName.\\\\n\\\\t^ n.\\\\n! !\\\\n\\\\n!StrikeFont class methodsFor: 'instance creation' stamp: 'yo 1/15/2004 16:48'!\\\\nnewForKoreanFromEFontBDFFile: fileName name: aString overrideWith: otherFileName\\\\n\\\\n\\\\t| n |\\\\n\\\\tn _ self new.\\\\n\\\\tn readEFontBDFForKoreanFromFile: fileName name: aString overrideWith: otherFileName.\\\\n\\\\t^ n.\\\\n! !\\\\n\\\\n!StrikeFont class methodsFor: 'instance creation' stamp: 'nop 1/23/2000 19:21'!\\\\nnewFromBDFFile: aFileName name: aString  \\\\\\\"StrikeFont newFromBDFFile: 'helvR12.bdf' name: 'Helvetica12'\\\\\\\"\\\\n\\\\t\\\\\\\"Read a font from disk in the X11 Bitmap Distribution Format.\\\\\\\"\\\\n\\\\n\\\\t| n |\\\\n\\\\tn _ self new.\\\\n\\\\tn readBDFFromFile: aFileName name: aString.\\\\n\\\\t^n.\\\\n\\\\n\\\\t\\\\\\\"TextConstants at: #Helvetica put: (TextStyle fontArray: {StrikeFont newFromBDFFile: 'helvR12.bdf' name: 'Helvetica12'})\\\\\\\"\\\\n\\\\t\\\\\\\"TextConstants at: #Lucida put: (TextStyle fontArray: {StrikeFont newFromBDFFile: 'luRS12.bdf' name: 'Lucida'})\\\\\\\"\\\\n\\\\t\\\\\\\"TextStyle default fontAt: 5 put: (StrikeFont new readFromStrike2: 'helv12.sf2').\\\\\\\"\\\\n\\\\n! !\\\\n\\\\n!StrikeFont class methodsFor: 'instance creation' stamp: 'yo 1/19/2005 11:22'!\\\\nnewFromEFontBDFFile: fileName name: aString ranges: ranges\\\\n\\\\n\\\\t| n |\\\\n\\\\tn _ self new.\\\\n\\\\tn readEFontBDFFromFile: fileName name: aString ranges: ranges.\\\\n\\\\t^ n.\\\\n! !\\\\n\\\\n!StrikeFont class methodsFor: 'instance creation' stamp: 'yo 12/27/2002 16:57'!\\\\nnewFromEFontBDFFile: aFileName name: aString startRange: start endRange: end\\\\n\\\\n\\\\t| n |\\\\n\\\\tn _ self new.\\\\n\\\\tn readEFontBDFFromFile: aFileName name: aString rangeFrom: start to: end.\\\\n\\\\t^n.\\\\n\\\\n\\\\t\\\\\\\"TextConstants at: #Helvetica put: (TextStyle fontArray: {StrikeFont newFromBDFFile: 'helvR12.bdf' name: 'Helvetica12'})\\\\\\\"\\\\n\\\\t\\\\\\\"TextConstants at: #Lucida put: (TextStyle fontArray: {StrikeFont newFromBDFFile: 'luRS12.bdf' name: 'Lucida'})\\\\\\\"\\\\n\\\\t\\\\\\\"TextStyle default fontAt: 5 put: (StrikeFont new readFromStrike2: 'helv12.sf2').\\\\\\\"\\\\n\\\\n! !\\\\n\\\\n!StrikeFont class methodsFor: 'instance creation' stamp: 'yo 9/23/2002 16:28'!\\\\nnewFromF12File: aFileName\\\\n\\\\t\\\\\\\"StrikeFont newFromF12File: 'kaname.f12'\\\\\\\"\\\\n\\\\n\\\\t| file n |\\\\n\\\\t('*.F12' match: aFileName) ifFalse: [\\\\\\\"self halt. \\\\\\\" \\\\\\\"likely incompatible\\\\\\\"].\\\\n\\\\tfile _ FileStream readOnlyFileNamed: aFileName.\\\\n\\\\tfile binary.\\\\n\\\\tn _ self new.\\\\n\\\\tn name: (FileDirectory baseNameFor: (FileDirectory localNameFor: aFileName)).\\\\n\\\\tn readF12FromStream: file.\\\\n\\\\t^ n.\\\\n! !\\\\n\\\\n!StrikeFont class methodsFor: 'instance creation' stamp: 'tak 12/20/2004 10:23'!\\\\npasswordFontSize: aSize \\\\n\\\\t^ FixedFaceFont new passwordFont fontSize: aSize! !\\\\n\\\\n\\\\n!StrikeFont class methodsFor: '*nebraska-instance creation' stamp: 'yo 12/17/2005 22:41'!\\\\ndecodedFromRemoteCanvas: aString\\\\n\\\\n\\\\t| array style base |\\\\n\\\\tarray _ aString findTokens: #($ ).\\\\n\\\\tstyle _ TextStyle named: (array at: 1) asSymbol.\\\\n\\\\tstyle ifNil: [^ TextStyle defaultFont].\\\\n\\\\t(style fontArray first name = style fontArray first name withoutTrailingDigits) ifTrue: [\\\\n\\\\t\\\\t\\\\t^ self familyName: (array at: 1) size: (array at: 3) asNumber emphasized: (array at: 4) asNumber].\\\\n\\\\tbase _ style fontArray detect: [:f | (array at: 2) beginsWith: f name].\\\\n\\\\t^ base emphasized: (array at: 4) asNumber.\\\\n\\\\n\\\\t\\\\\\\"^ self familyName: (array at: 1) size: (array at: 2) asNumber emphasized: (array at: 3) asNumber.\\\\\\\"\\\\n! !\\\\nObject subclass: #StrikeFontFixer\\\\n\\\\tinstanceVariableNames: 'strikeFont charForms newFont'\\\\n\\\\tclassVariableNames: 'MappingTable NoFontTable'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Multilingual-Display'!\\\\n\\\\n!StrikeFontFixer methodsFor: 'as yet unclassified' stamp: 'yo 9/16/2002 15:03'!\\\\ncharacterFormAt: aCharacter at: aPoint\\\\n\\\\n\\\\t| f |\\\\n\\\\tf _ charForms at: aCharacter asciiValue + 1.\\\\n\\\\t(f magnifyBy: 3) displayAt: aPoint.\\\\n\\\\t^ f.\\\\n! !\\\\n\\\\n!StrikeFontFixer methodsFor: 'as yet unclassified' stamp: 'yo 9/16/2002 15:03'!\\\\ndisplayOn: aDisplayObject at: aPoint magnifyBy: aNumber\\\\n\\\\n\\\\t| form hStep vStep bb source nextPoint |\\\\n\\\\thStep _ (strikeFont maxWidth * aNumber * 1.2) asInteger.\\\\n\\\\tvStep _ (strikeFont height * aNumber *  1.2) asInteger.\\\\n\\\\t\\\\n\\\\tform _ Form extent: (hStep * 16)@(vStep * 16).\\\\n\\\\tbb _ BitBlt toForm: form.\\\\n\\\\t0 to: 15 do: [:i |\\\\n\\\\t\\\\t1 to: 16 do: [:j |\\\\n\\\\t\\\\t\\\\tsource _ ((charForms at: (i * 16 + j)) magnifyBy: aNumber).\\\\n\\\\t\\\\t\\\\tnextPoint _ (hStep * (j - 1)@(vStep * i)).\\\\n\\\\t\\\\t\\\\tbb copy: ((nextPoint+((hStep@vStep - source extent) // 2)) extent: source extent)\\\\n\\\\t\\\\t\\\\t\\\\tfrom: 0@0 in: source fillColor: Color black rule: Form over.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\tform displayOn: aDisplayObject at: aPoint.\\\\n! !\\\\n\\\\n!StrikeFontFixer methodsFor: 'as yet unclassified' stamp: 'yo 9/16/2002 15:03'!\\\\nfont: aStrikeFont\\\\n\\\\n\\\\tstrikeFont _ aStrikeFont.\\\\n\\\\tself forms.\\\\n! !\\\\n\\\\n!StrikeFontFixer methodsFor: 'as yet unclassified' stamp: 'yo 9/16/2002 15:04'!\\\\nforms\\\\n\\\\n\\\\t1 to: 256 do: [:i |\\\\n\\\\t\\\\tcharForms at: i put: (strikeFont characterFormAt: (Character value: (i - 1)))\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StrikeFontFixer methodsFor: 'as yet unclassified' stamp: 'yo 9/16/2002 15:04'!\\\\ninitialize\\\\n\\\\n\\\\tcharForms _ Array new: 256.\\\\n! !\\\\n\\\\n!StrikeFontFixer methodsFor: 'as yet unclassified' stamp: 'yo 9/16/2002 15:04'!\\\\nmappingTable\\\\n\\\\n\\\\t^ MappingTable.\\\\n! !\\\\n\\\\n!StrikeFontFixer methodsFor: 'as yet unclassified' stamp: 'yo 9/16/2002 15:04'!\\\\nstoreEditedGlyphsOn: aStream\\\\n\\\\n\\\\t| n |\\\\n\\\\tNoFontTable do: [:i |\\\\n\\\\t\\\\tn _ strikeFont name.\\\\n\\\\t\\\\t(n beginsWith: 'NewYork') ifTrue: [n _ 'NewYork'].\\\\n\\\\t\\\\taStream nextPutAll: '((StrikeFont familyName: ''', n, ''' size: ',\\\\n\\\\t\\\\t\\\\tstrikeFont height asString, ')'.\\\\n\\\\t\\\\taStream nextPutAll: ' characterFormAt: '.\\\\n\\\\t\\\\taStream nextPutAll: '(Character value: ', i asString, ')'.\\\\n\\\\t\\\\taStream nextPutAll: ' put: '.\\\\n\\\\t\\\\t(strikeFont characterFormAt: (Character value: i)) storeOn: aStream base: 2.\\\\n\\\\t\\\\taStream nextPutAll: ')!!'.\\\\n\\\\t\\\\taStream nextPut: Character cr.\\\\n\\\\t\\\\taStream nextPut: Character cr.\\\\n\\\\t].\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStrikeFontFixer class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StrikeFontFixer class methodsFor: 'as yet unclassified' stamp: 'yo 9/16/2002 15:06'!\\\\ninitialize\\\\n\\\\\\\"\\\\n\\\\tStrikeFontFixer initialize\\\\n\\\\\\\"\\\\n\\\\n\\\\t| d |\\\\n\\\\tself initializeNoFontTable.\\\\n\\\\td _ Array new: 256.\\\\n\\\\t0 to: 127 do: [:i | d at: i+1 put: i].\\\\n\\\\t16r80 to: 16r9F do: [:i | d at: i+1 put: nil].\\\\n\\\\td at: 16rA0+1 put: 16r20.\\\\n\\\\td at: 16rA1+1 put: 16rC1.\\\\n\\\\td at: 16rA2+1 put: 16rA2.\\\\n\\\\td at: 16rA3+1 put: 16rA3.\\\\n\\\\td at: 16rA4+1 put: 16rA9. \\\\\\\"CURRENCY SIGN\\\\\\\"\\\\n\\\\td at: 16rA5+1 put: 16rB4.\\\\n\\\\td at: 16rA6+1 put: 16r7C. \\\\\\\"BROKEN BAR\\\\\\\"\\\\n\\\\td at: 16rA7+1 put: 16rA4.\\\\n\\\\td at: 16rA8+1 put: 16r80. \\\\\\\"DIAERESIS\\\\\\\"\\\\n\\\\td at: 16rA9+1 put: 16rA9.\\\\n\\\\td at: 16rAA+1 put: 16rBB.\\\\n\\\\td at: 16rAB+1 put: 16rC7.\\\\n\\\\td at: 16rAC+1 put: 16rD1. \\\\\\\"NOT SIGN\\\\\\\"\\\\n\\\\td at: 16rAD+1 put: 16rD0.\\\\n\\\\td at: 16rAE+1 put: 16rA8.\\\\n\\\\td at: 16rAF+1 put: 16rD1. \\\\\\\"MACRON\\\\\\\"\\\\n\\\\td at: 16rB0+1 put: 16rA1.\\\\n\\\\td at: 16rB1+1 put: 16r2B. \\\\\\\"PLUS-MINUS SIGN\\\\\\\"\\\\n\\\\td at: 16rB2+1 put: 16rAB. \\\\\\\"SUPERSCRIPT TWO\\\\\\\"\\\\n\\\\td at: 16rB3+1 put: 16rAB. \\\\\\\"SUPERSCRIPT THREE\\\\\\\"\\\\n\\\\td at: 16rB4+1 put: 16rAB.\\\\n\\\\td at: 16rB5+1 put: 16r75. \\\\\\\"MICRO SIGN\\\\\\\"\\\\n\\\\td at: 16rB6+1 put: 16rA6.\\\\n\\\\td at: 16rB7+1 put: 16rA5.\\\\n\\\\td at: 16rB8+1 put: 16r82. \\\\\\\"CEDILLA\\\\\\\"\\\\n\\\\td at: 16rB9+1 put: 16rAB. \\\\\\\"SUPERSCRIPT ONE\\\\\\\"\\\\n\\\\td at: 16rBA+1 put: 16rBC.\\\\n\\\\td at: 16rBB+1 put: 16rC8.\\\\n\\\\td at: 16rBC+1 put: 16r4D. \\\\\\\"VULGAR FRACTION ONE QUARTER\\\\\\\"\\\\n\\\\td at: 16rBD+1 put: 16r4D. \\\\\\\"VULGAR FRACTIOIN ONE HALF\\\\\\\"\\\\n\\\\td at: 16rBE+1 put: 16r4D. \\\\\\\"VALGAR FRACTION THREE QUARTERS\\\\\\\"\\\\n\\\\td at: 16rBF+1 put: 16rC0.\\\\n\\\\td at: 16rC0+1 put: 16rCB.\\\\n\\\\td at: 16rC1+1 put: 16rCB. \\\\\\\"CAPITAL A WITH ACUTE\\\\\\\"\\\\n\\\\td at: 16rC2+1 put: 16rCB. \\\\\\\"CAPITAL A WITH CIRCUMFLEX\\\\\\\"\\\\n\\\\td at: 16rC3+1 put: 16rCC.\\\\n\\\\td at: 16rC4+1 put: 16r80.\\\\n\\\\td at: 16rC5+1 put: 16r81.\\\\n\\\\td at: 16rC6+1 put: 16rAE.\\\\n\\\\td at: 16rC7+1 put: 16r82.\\\\n\\\\td at: 16rC8+1 put: 16r83. \\\\\\\"CAPITAL E WITH GRAVE\\\\\\\"\\\\n\\\\td at: 16rC9+1 put: 16r83.\\\\n\\\\td at: 16rCA+1 put: 16r83. \\\\\\\"CAPITAL E WITH CIRCUMFLEX\\\\\\\"\\\\n\\\\td at: 16rCB+1 put: 16r83. \\\\\\\"CAPITAL E WITH DIAERESIS\\\\\\\"\\\\n\\\\td at: 16rCC+1 put: 16r49. \\\\\\\"CAPITAL I WITH GRAVE\\\\\\\"\\\\n\\\\td at: 16rCD+1 put: 16r49. \\\\\\\"CAPITAL I WITH ACUTE\\\\\\\"\\\\n\\\\td at: 16rCE+1 put: 16r49. \\\\\\\"CAPITAL I WITH CIRCUMFLEX\\\\\\\"\\\\n\\\\td at: 16rCF+1 put: 16r49. \\\\\\\"CAPITAL I WITH DIAERESIS\\\\\\\"\\\\n\\\\td at: 16rD0+1 put: 16r44. \\\\\\\"CAPITAL ETH\\\\\\\"\\\\n\\\\td at: 16rD1+1 put: 16r84.\\\\n\\\\td at: 16rD2+1 put: 16rCD. \\\\\\\"CAPITAL O WITH GRAVE\\\\\\\"\\\\n\\\\td at: 16rD3+1 put: 16rCD. \\\\\\\"CAPITAL O WITH ACUTE\\\\\\\"\\\\n\\\\td at: 16rD4+1 put: 16rCD. \\\\\\\"CAPITAL O WITH CIRCUMFLEX\\\\\\\"\\\\n\\\\td at: 16rD5+1 put: 16rCD.\\\\n\\\\td at: 16rD6+1 put: 16r85.\\\\n\\\\td at: 16rD7+1 put: 16r2B. \\\\\\\"MULTIPLICATION SIGN\\\\\\\"\\\\n\\\\td at: 16rD8+1 put: 16rBF.\\\\n\\\\td at: 16rD9+1 put: 16r86. \\\\\\\"CAPITAL U WITH GRAVE\\\\\\\"\\\\n\\\\td at: 16rDA+1 put: 16r86. \\\\\\\"CAPITAL U WITH ACUTE\\\\\\\"\\\\n\\\\td at: 16rDB+1 put: 16r86. \\\\\\\"CAPITAL U WITH CIRCUMFLEX\\\\\\\"\\\\n\\\\td at: 16rDC+1 put: 16r86. \\\\\\\"CAPTIAL U WITH DIAERESIS\\\\\\\"\\\\n\\\\td at: 16rDD+1 put: 16r59. \\\\\\\"CAPITAL Y WITH ACUTE\\\\\\\"\\\\n\\\\td at: 16rDE+1 put: 16r50. \\\\\\\"CAPITAL THORN\\\\\\\"\\\\n\\\\td at: 16rDF+1 put: 16rA7.\\\\n\\\\td at: 16rE0+1 put: 16r88.\\\\n\\\\td at: 16rE1+1 put: 16r87.\\\\n\\\\td at: 16rE2+1 put: 16r89.\\\\n\\\\td at: 16rE3+1 put: 16r8B.\\\\n\\\\td at: 16rE4+1 put: 16r8A.\\\\n\\\\td at: 16rE5+1 put: 16r8C.\\\\n\\\\td at: 16rE6+1 put: 16rBE.\\\\n\\\\td at: 16rE7+1 put: 16r8D.\\\\n\\\\td at: 16rE8+1 put: 16r8F.\\\\n\\\\td at: 16rE9+1 put: 16r8E.\\\\n\\\\td at: 16rEA+1 put: 16r90.\\\\n\\\\td at: 16rEB+1 put: 16r91.\\\\n\\\\td at: 16rEC+1 put: 16r93.\\\\n\\\\td at: 16rED+1 put: 16r92.\\\\n\\\\td at: 16rEE+1 put: 16r94.\\\\n\\\\td at: 16rEF+1 put: 16r95.\\\\n\\\\td at: 16rF0+1 put: 16r64. \\\\\\\"SMALL ETH\\\\\\\"\\\\n\\\\td at: 16rF1+1 put: 16r96.\\\\n\\\\td at: 16rF2+1 put: 16r98.\\\\n\\\\td at: 16rF3+1 put: 16r97.\\\\n\\\\td at: 16rF4+1 put: 16r99.\\\\n\\\\td at: 16rF5+1 put: 16r9B.\\\\n\\\\td at: 16rF6+1 put: 16r9A.\\\\n\\\\td at: 16rF7+1 put: 16r2D. \\\\\\\"DIVISION SIGN\\\\\\\"\\\\n\\\\td at: 16rF8+1 put: 16rBF.\\\\n\\\\td at: 16rF9+1 put: 16r9D.\\\\n\\\\td at: 16rFA+1 put: 16r9C.\\\\n\\\\td at: 16rFB+1 put: 16r9E.\\\\n\\\\td at: 16rFC+1 put: 16r9F.\\\\n\\\\td at: 16rFD+1 put: 16rD8. \\\\\\\"SMALL Y WITH ACUTE\\\\\\\"\\\\n\\\\td at: 16rFE+1 put: 16r70. \\\\\\\"SMALL THORN\\\\\\\"\\\\n\\\\td at: 16rFF+1 put: 16rD8.\\\\n\\\\n\\\\tMappingTable _ d.\\\\n! !\\\\n\\\\n!StrikeFontFixer class methodsFor: 'as yet unclassified' stamp: 'yo 9/16/2002 15:05'!\\\\ninitializeNoFontTable\\\\n\\\\n\\\\t| n |\\\\n\\\\tn _ #(\\\\n\\\\t16rA4 \\\\\\\"CURRENCY SIGN\\\\\\\"\\\\n\\\\t16rA6 \\\\\\\"BROKEN BAR\\\\\\\"\\\\n\\\\t16rA8 \\\\\\\"DIAERESIS\\\\\\\"\\\\n\\\\t16rAC \\\\\\\"NOT SIGN\\\\\\\"\\\\n\\\\t16rAF \\\\\\\"MACRON\\\\\\\"\\\\n\\\\t16rB1 \\\\\\\"PLUS-MINUS SIGN\\\\\\\"\\\\n\\\\t16rB2 \\\\\\\"SUPERSCRIPT TWO\\\\\\\"\\\\n\\\\t16rB3 \\\\\\\"SUPERSCRIPT THREE\\\\\\\"\\\\n\\\\t16rB5 \\\\\\\"MICRO SIGN\\\\\\\"\\\\n\\\\t16rB8 \\\\\\\"CEDILLA\\\\\\\"\\\\n\\\\t16rB9 \\\\\\\"SUPERSCRIPT ONE\\\\\\\"\\\\n\\\\t16rBC \\\\\\\"VULGAR FRACTION ONE QUARTER\\\\\\\"\\\\n\\\\t16rBD \\\\\\\"VULGAR FRACTIOIN ONE HALF\\\\\\\"\\\\n\\\\t16rBE \\\\\\\"VALGAR FRACTION THREE QUARTERS\\\\\\\"\\\\n\\\\t16rC1 \\\\\\\"CAPITAL A WITH ACUTE\\\\\\\"\\\\n\\\\t16rC2 \\\\\\\"CAPITAL A WITH CIRCUMFLEX\\\\\\\"\\\\n\\\\t16rC8 \\\\\\\"CAPITAL E WITH GRAVE\\\\\\\"\\\\n\\\\t16rCA \\\\\\\"CAPITAL E WITH CIRCUMFLEX\\\\\\\"\\\\n\\\\t16rCB \\\\\\\"CAPITAL E WITH DIAERESIS\\\\\\\"\\\\n\\\\t16rCC \\\\\\\"CAPITAL I WITH GRAVE\\\\\\\"\\\\n\\\\t16rCD \\\\\\\"CAPITAL I WITH ACUTE\\\\\\\"\\\\n\\\\t16rCE \\\\\\\"CAPITAL I WITH CIRCUMFLEX\\\\\\\"\\\\n\\\\t16rCF \\\\\\\"CAPITAL I WITH DIAERESIS\\\\\\\"\\\\n\\\\t16rD0 \\\\\\\"CAPITAL ETH\\\\\\\"\\\\n\\\\t16rD2 \\\\\\\"CAPITAL O WITH GRAVE\\\\\\\"\\\\n\\\\t16rD3 \\\\\\\"CAPITAL O WITH ACUTE\\\\\\\"\\\\n\\\\t16rD4 \\\\\\\"CAPITAL O WITH CIRCUMFLEX\\\\\\\"\\\\n\\\\t16rD7 \\\\\\\"MULTIPLICATION SIGN\\\\\\\"\\\\n\\\\t16rD9 \\\\\\\"CAPITAL U WITH GRAVE\\\\\\\"\\\\n\\\\t16rDA \\\\\\\"CAPITAL U WITH ACUTE\\\\\\\"\\\\n\\\\t16rDB \\\\\\\"CAPITAL U WITH CIRCUMFLEX\\\\\\\"\\\\n\\\\t16rDD \\\\\\\"CAPITAL Y WITH ACUTE\\\\\\\"\\\\n\\\\t16rDE \\\\\\\"CAPITAL THORN\\\\\\\"\\\\n\\\\t16rF0 \\\\\\\"SMALL ETH\\\\\\\"\\\\n\\\\t16rF7 \\\\\\\"DIVISION SIGN\\\\\\\"\\\\n\\\\t16rFD \\\\\\\"SMALL Y WITH ACUTE\\\\\\\"\\\\n\\\\t16rFE \\\\\\\"SMALL THORN\\\\\\\"\\\\n\\\\t).\\\\n\\\\tNoFontTable _ n.\\\\n\\\\n! !\\\\n\\\\n!StrikeFontFixer class methodsFor: 'as yet unclassified' stamp: 'nk 7/30/2004 18:09'!\\\\nnewOn: aStrikeFont \\\\n\\\\t^self new  font: aStrikeFont! !\\\\nAbstractFont subclass: #StrikeFontSet\\\\n\\\\tinstanceVariableNames: 'fontArray emphasis derivativeFonts name rIndex'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Multilingual-Display'!\\\\n\\\\n!StrikeFontSet methodsFor: 'accessing' stamp: 'ar 4/12/2005 17:14'!\\\\nascentOf: aCharacter\\\\n\\\\t^(self fontOf: aCharacter) ascent! !\\\\n\\\\n!StrikeFontSet methodsFor: 'accessing' stamp: 'ar 4/12/2005 17:15'!\\\\ndescentOf: aCharacter\\\\n\\\\t^(self fontOf: aCharacter) descent! !\\\\n\\\\n!StrikeFontSet methodsFor: 'accessing' stamp: 'yo 9/23/2002 20:08'!\\\\nfontArray\\\\n\\\\n\\\\t^ fontArray\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'accessing' stamp: 'ar 4/12/2005 17:14'!\\\\nfontOf: aCharacter\\\\n\\\\t\\\\\\\"Answer the actual font to use for aCharacter\\\\\\\"\\\\n\\\\t^self fontOf: aCharacter ifAbsent:[fontArray at: 1]! !\\\\n\\\\n!StrikeFontSet methodsFor: 'accessing' stamp: 'ar 4/12/2005 17:14'!\\\\nfontOf: aCharacter ifAbsent: aBlock\\\\n\\\\t\\\\\\\"Answer the actual font to use for aCharacter\\\\\\\"\\\\n\\\\t| encoding font |\\\\n\\\\tencoding := aCharacter leadingChar + 1.\\\\n\\\\tencoding <= fontArray size \\\\n\\\\t\\\\tifTrue:[font := fontArray at: encoding].\\\\n\\\\tfont ifNil:[^aBlock value].\\\\n\\\\t^font\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'accessing' stamp: 'ar 4/12/2005 17:15'!\\\\nheightOf: aCharacter\\\\n\\\\t^(self fontOf: aCharacter) height! !\\\\n\\\\n!StrikeFontSet methodsFor: 'accessing' stamp: 'tak 12/21/2004 16:43'!\\\\nlatin1\\\\n\\\\t\\\\\\\"Answer primary font\\\\\\\"\\\\n\\\\t^ fontArray at: 1! !\\\\n\\\\n!StrikeFontSet methodsFor: 'accessing' stamp: 'yo 11/15/2002 14:22'!\\\\nmaxAsciiFor: encoding\\\\n\\\\n\\\\t| f |\\\\n\\\\tf _ (fontArray at: encoding+1).\\\\n\\\\tf ifNotNil: [^ f maxAscii].\\\\n\\\\t^ 0.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'accessing' stamp: 'yo 8/5/2003 15:31'!\\\\ntextStyle\\\\n\\\\n\\\\t^ TextStyle actualTextStyles detect: [:aStyle | (aStyle fontArray collect: [:s | s name]) includes: self name]\\\\n\\\\t\\\\tifNone: [].\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'accessing' stamp: 'ar 4/12/2005 17:15'!\\\\nwidthOf: aCharacter \\\\n\\\\t\\\\\\\"Answer the width of the argument as a character in the receiver.\\\\\\\"\\\\n\\\\t^(self fontOf: aCharacter) widthOf: aCharacter! !\\\\n\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 16:43'!\\\\nascent\\\\n\\\\n\\\\t^ fontArray first ascent.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 16:49'!\\\\nascentKern\\\\n\\\\n\\\\t^ fontArray first ascentKern.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 16:49'!\\\\nbaseKern\\\\n\\\\n\\\\t^ fontArray first baseKern.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 12/1/2003 18:00'!\\\\nbonk: glyphForm with: bonkForm at: j\\\\n\\\\t\\\\\\\"Bonking means to run through the glyphs clearing out black pixels\\\\n\\\\tbetween characters to prevent them from straying into an adjacent\\\\n\\\\tcharacter as a result of, eg, bolding or italicizing\\\\\\\"\\\\n\\\\t\\\\\\\"Uses the bonkForm to erase at every character boundary in glyphs.\\\\\\\"\\\\n\\\\n\\\\t| bb offset font x |\\\\n\\\\tfont _ (fontArray at: j).\\\\n\\\\toffset _ bonkForm offset x.\\\\n\\\\tbb _ BitBlt toForm: glyphForm.\\\\n\\\\tbb sourceForm: bonkForm; sourceRect: bonkForm boundingBox;\\\\n\\\\t\\\\tcombinationRule: Form erase; destY: 0.\\\\n\\\\tx _ font xTable.\\\\n\\\\t(x isMemberOf: SparseLargeTable) ifTrue: [\\\\n\\\\t\\\\tx base to: x size-1 do: [:i | bb destX: (x at: i) + offset; copyBits].\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\t1 to: x size-1 do: [:i | bb destX: (x at: i) + offset; copyBits].\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:15'!\\\\ncopy\\\\n\\\\n\\\\t| s a |\\\\n\\\\ts _ self class new.\\\\n\\\\ts name: self name.\\\\n\\\\ts emphasis: self emphasis.\\\\n\\\\ts reset.\\\\n\\\\ta _ Array new: fontArray size.\\\\n\\\\t1 to: a size do: [:i |\\\\n\\\\t\\\\ta at: i put: (fontArray at: i) copy.\\\\n\\\\t].\\\\n\\\\ts fontArray: a.\\\\n\\\\t^ s.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'nk 9/1/2004 12:06'!\\\\nderivativeFonts\\\\n\\\\t^derivativeFonts copyWithout: nil! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:02'!\\\\ndescent\\\\n\\\\n\\\\t^ fontArray first descent.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:02'!\\\\ndescentKern\\\\n\\\\n\\\\t^ fontArray first descentKern.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 5/19/2004 11:36'!\\\\ndisplayLine: aString at: aPoint \\\\n\\\\t\\\\\\\"Display the characters in aString, starting at position aPoint.\\\\\\\"\\\\n\\\\n\\\\tself characters: (1 to: aString size)\\\\n\\\\t\\\\tin: aString\\\\n\\\\t\\\\tdisplayAt: aPoint\\\\n\\\\t\\\\tclippedBy: Display boundingBox\\\\n\\\\t\\\\trule: Form over\\\\n\\\\t\\\\tfillColor: nil\\\\n\\\\t\\\\tkernDelta: 0\\\\n\\\\t\\\\ton: (BitBlt current toForm: Display).\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:06'!\\\\nemphasis\\\\n\\\\t\\\\\\\"Answer the integer code for synthetic bold, italic, underline, and \\\\n\\\\tstrike-out.\\\\\\\"\\\\n\\\\n\\\\t^ emphasis.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:07'!\\\\nemphasis: code \\\\n\\\\t\\\\\\\"Set the integer code for synthetic bold, itallic, underline, and strike-out, \\\\n\\\\twhere bold=1, italic=2, underlined=4, and struck out=8.\\\\\\\"\\\\n\\\\n\\\\temphasis _ code.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:15'!\\\\nemphasized: code \\\\n\\\\n\\\\t\\\\\\\"Answer a copy of the receiver with emphasis set to include code.\\\\\\\"\\\\n\\\\t| derivative addedEmphasis base safeCode |\\\\n\\\\tcode = 0 ifTrue: [^ self].\\\\n\\\\t(derivativeFonts == nil or: [derivativeFonts size = 0]) ifTrue: [^ self].\\\\n\\\\tderivative _ derivativeFonts at: (safeCode _ code min: derivativeFonts size).\\\\n\\\\tderivative == nil ifFalse: [^ derivative].  \\\\\\\"Already have this style\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Dont have it -- derive from another with one with less emphasis\\\\\\\"\\\\n\\\\taddedEmphasis _ 1 bitShift: safeCode highBit - 1.\\\\n\\\\tbase _ self emphasized: safeCode - addedEmphasis.  \\\\\\\"Order is Bold, Ital, Under, Narrow\\\\\\\"\\\\n\\\\taddedEmphasis = 1 ifTrue:   \\\\\\\"Compute synthetic bold version of the font\\\\\\\"\\\\n\\\\t\\\\t[derivative _ (base copy name: base name , 'B') makeBoldGlyphs].\\\\n\\\\taddedEmphasis = 2 ifTrue:   \\\\\\\"Compute synthetic italic version of the font\\\\\\\"\\\\n\\\\t\\\\t[ derivative _ (base copy name: base name , 'I') makeItalicGlyphs].\\\\n\\\\taddedEmphasis = 4 ifTrue:   \\\\\\\"Compute underlined version of the font\\\\\\\"\\\\n\\\\t\\\\t[derivative _ (base copy name: base name , 'U') makeUnderlinedGlyphs].\\\\n\\\\taddedEmphasis = 8 ifTrue:   \\\\\\\"Compute narrow version of the font\\\\\\\"\\\\n\\\\t\\\\t[derivative _ (base copy name: base name , 'N') makeCondensedGlyphs].\\\\n\\\\taddedEmphasis = 16 ifTrue:   \\\\\\\"Compute struck-out version of the font\\\\\\\"\\\\n\\\\t\\\\t[derivative _ (base copy name: base name , 'X') makeStruckOutGlyphs].\\\\n\\\\tderivative emphasis: safeCode.\\\\n\\\\tderivativeFonts at: safeCode put: derivative.\\\\n\\\\t^ derivative\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 8/18/2003 20:59'!\\\\nfamilyName\\\\n\\\\n\\\\t^ fontArray first familyName.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:38'!\\\\nfamilySizeFace\\\\n\\\\n\\\\t^ Array\\\\n\\\\t\\\\twith: fontArray first name\\\\n\\\\t\\\\twith: self height\\\\n\\\\t\\\\twith: fontArray first emphasis\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:49'!\\\\nfontArray: anArray\\\\n\\\\n\\\\tfontArray _ anArray.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:49'!\\\\nfontNameWithPointSize\\\\n\\\\n\\\\t^ fontArray first fontNameWithPointSize.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:50'!\\\\nglyphs\\\\n\\\\n\\\\t^ fontArray first glyphs\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:50'!\\\\nglyphsEncoding: anInteger\\\\n\\\\n\\\\t^ (fontArray at: (anInteger+1)) glyphs.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:50'!\\\\nheight\\\\n\\\\n\\\\t^ fontArray first height.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'tak 12/16/2004 19:15'!\\\\ninitializeWithFontArray: anArray \\\\n\\\\t\\\\\\\"Initialize with given font array, the ascent of primary font is modified \\\\n\\\\tif another font has higher size\\\\\\\"\\\\n\\\\t| primaryFont maxHeight newFont |\\\\n\\\\tfontArray := anArray.\\\\n\\\\tprimaryFont := anArray first.\\\\n\\\\temphasis := 0.\\\\n\\\\tname := primaryFont name.\\\\n\\\\tmaxHeight := anArray\\\\n\\\\t\\\\t\\\\t\\\\tinject: 0\\\\n\\\\t\\\\t\\\\t\\\\tinto: [:theHeight :font | (font notNil\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tand: [theHeight < font height])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [font height]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [theHeight]].\\\\n\\\\tprimaryFont height < maxHeight\\\\n\\\\t\\\\tifTrue: [newFont := primaryFont copy\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfixAscent: primaryFont ascent + (maxHeight - primaryFont height)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tandDescent: primaryFont descent\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\thead: 0.\\\\n\\\\t\\\\t\\\\tfontArray at: 1 put: newFont].\\\\n\\\\tself reset! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 1/5/2005 13:59'!\\\\ninstallOn: aDisplayContext\\\\n\\\\n\\\\t^ aDisplayContext installStrikeFont: self.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:50'!\\\\ninstallOn: aDisplayContext foregroundColor: foregroundColor backgroundColor: backgroundColor \\\\n\\\\n\\\\t^ aDisplayContext\\\\n\\\\t\\\\tinstallStrikeFont: self\\\\n\\\\t\\\\tforegroundColor: foregroundColor\\\\n\\\\t\\\\tbackgroundColor: backgroundColor.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:50'!\\\\nlineGrid\\\\n\\\\n\\\\t| f |\\\\n\\\\tf _ fontArray first.\\\\n\\\\t^ f ascent + f descent.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:52'!\\\\nmaxEncoding\\\\n\\\\n\\\\t^ fontArray size.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 2/24/2005 15:45'!\\\\nmaxWidth\\\\n\\\\n\\\\t^ (fontArray at: 1) maxWidth.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:52'!\\\\nname\\\\n\\\\n\\\\t^ name\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:52'!\\\\nname: aString\\\\n\\\\n\\\\tname _ aString\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 8/18/2003 21:17'!\\\\nobjectForDataStream: refStrm\\\\n\\\\t| dp |\\\\n\\\\t\\\\\\\"I am about to be written on an object file.  Write a reference to a known Font in the other system instead.  \\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"A path to me\\\\\\\"\\\\n\\\\t(TextConstants at: #forceFontWriting ifAbsent: [false]) ifTrue: [^ self].\\\\n\\\\t\\\\t\\\\\\\"special case for saving the default fonts on the disk.  See collectionFromFileNamed:\\\\\\\"\\\\n\\\\n\\\\tdp _ DiskProxy global: #StrikeFontSet selector: #familyName:size:emphasized:\\\\n\\\\t\\\\t\\\\targs: (Array with: self familyName with: self pointSize\\\\n\\\\t\\\\t\\\\t\\\\t\\\\twith: self emphasis).\\\\n\\\\trefStrm replace: self with: dp.\\\\n\\\\t^ dp.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:53'!\\\\npointSize\\\\n\\\\n\\\\t^ fontArray first pointSize.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:53'!\\\\nprintOn: aStream\\\\n\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream nextPutAll: '(' , self name.\\\\n\\\\taStream space.\\\\n\\\\tself height printOn: aStream.\\\\n\\\\taStream nextPut: $).\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:53'!\\\\nreset\\\\n\\\\t\\\\\\\"Reset the cache of derivative emphasized fonts\\\\\\\"\\\\n\\\\n\\\\tderivativeFonts _ Array new: 32.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:53'!\\\\nsubscript\\\\n\\\\n\\\\t^ fontArray first subscript\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:53'!\\\\nsuperscript\\\\n\\\\n\\\\t^ fontArray first superscript\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'ar 4/10/2005 18:53'!\\\\nwidthOfString: aString\\\\n\\\\n\\\\taString ifNil:[^0].\\\\n\\\\t\\\\\\\"Optimizing\\\\\\\"\\\\n\\\\t(aString isByteString) ifTrue: [\\\\n\\\\t\\\\t^ self fontArray first widthOfString: aString from: 1 to: aString size].\\\\n\\\\t^ self widthOfString: aString from: 1 to: aString size.\\\\n\\\\\\\"\\\\n\\\\tTextStyle default defaultFont widthOfString: 'zort' 21\\\\n\\\\\\\"\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'tak 1/11/2005 17:59'!\\\\nwidthOfString: aString from: startIndex to: stopIndex\\\\n\\\\t\\\\\\\"Measure the length of the given string between start and stop index\\\\\\\"\\\\n\\\\n\\\\t| resultX |\\\\n\\\\tresultX _ 0.\\\\n\\\\tstartIndex to: stopIndex do:[:i | \\\\n\\\\t\\\\tresultX _ resultX + (self widthOf: (aString at: i))].\\\\n\\\\t^ resultX.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:56'!\\\\nxTable\\\\n\\\\t\\\\\\\"Answer an Array of the left x-coordinate of characters in glyphs.\\\\\\\"\\\\n\\\\n\\\\t^ fontArray first xTable.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'as yet unclassified' stamp: 'yo 9/17/2002 17:56'!\\\\nxTableEncoding: anInteger\\\\n\\\\t\\\\\\\"Answer an Array of the left x-coordinate of characters in glyphs.\\\\\\\"\\\\n\\\\n\\\\t^(fontArray at: anInteger + 1) xTable.\\\\n! !\\\\n\\\\n\\\\n!StrikeFontSet methodsFor: 'character shapes' stamp: 'yo 12/27/2002 04:35'!\\\\ncharacterFormAt: character \\\\n\\\\n\\\\t| encoding ascii xTable leftX rightX |\\\\n\\\\tencoding _ character leadingChar + 1.\\\\n\\\\tascii _ character charCode.\\\\n\\\\t(ascii < (fontArray at: encoding) minAscii or: [ascii > (fontArray at: encoding) maxAscii])\\\\n\\\\t\\\\tifTrue: [ascii _ (fontArray at: encoding) maxAscii].\\\\n\\\\txTable _ (fontArray at: encoding) xTable.\\\\n\\\\tleftX _ xTable at: ascii + 1.\\\\n\\\\trightX _ xTable at: ascii + 2.\\\\n\\\\t^ (fontArray at: encoding) glyphs copy: (leftX @ 0 corner: rightX @ self height).\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'character shapes' stamp: 'yo 12/27/2002 04:35'!\\\\ncharacterFormAt: character put: characterForm \\\\n\\\\n\\\\t| ascii leftX rightX widthDif newGlyphs encoding xTable glyphs |\\\\n\\\\tencoding _ character leadingChar + 1.\\\\n\\\\tascii _ character charCode.\\\\n\\\\tascii < (fontArray at: encoding) minAscii ifTrue: [\\\\n\\\\t\\\\t^ self error: 'Cant store characters below min ascii'\\\\n\\\\t].\\\\n\\\\tascii > (fontArray at: encoding) maxAscii ifTrue: [\\\\n\\\\t\\\\t^ self error: 'No change made'\\\\n\\\\t].\\\\n\\\\txTable _ (fontArray at: encoding) xTable.\\\\n\\\\tleftX _ xTable at: ascii + 1.\\\\n\\\\trightX _ xTable at: ascii + 2.\\\\n\\\\tglyphs _ (fontArray at: encoding) glyphs.\\\\n\\\\twidthDif _ characterForm width - (rightX - leftX).\\\\n\\\\twidthDif ~= 0 ifTrue: [\\\\n\\\\t\\\\tnewGlyphs _ Form extent: glyphs width + widthDif @ glyphs height.\\\\n\\\\t\\\\tnewGlyphs copy: (0 @ 0 corner: leftX @ glyphs height) from: 0 @ 0\\\\n\\\\t\\\\t\\\\tin: glyphs rule: Form over.\\\\n\\\\t\\\\tnewGlyphs\\\\n\\\\t\\\\t\\\\t\\\\tcopy: (rightX + widthDif @ 0 corner: newGlyphs width @ glyphs height)\\\\n\\\\t\\\\t\\\\t\\\\tfrom: rightX @ 0 in: glyphs rule: Form over.\\\\n\\\\t\\\\tglyphs _ newGlyphs.\\\\n\\\\t\\\\t\\\\\\\"adjust further entries on xTable\\\\\\\"\\\\n\\\\t\\\\txTable _ xTable copy.\\\\n\\\\t\\\\tascii + 2 to: xTable size do: [:i |\\\\n\\\\t\\\\t\\\\txTable at: i put: (xTable at: i) + widthDif]].\\\\n\\\\tglyphs copy: (leftX @ 0 extent: characterForm extent) from: 0 @ 0 in: characterForm rule: Form over.\\\\n! !\\\\n\\\\n\\\\n!StrikeFontSet methodsFor: 'displaying' stamp: 'yo 5/19/2004 11:35'!\\\\ncharacters: anInterval in: sourceString displayAt: aPoint clippedBy: clippingRectangle rule: ruleInteger fillColor: aForm kernDelta: kernDelta on: aBitBlt\\\\n\\\\t\\\\\\\"Simple, slow, primitive method for displaying a line of characters.\\\\n\\\\tNo wrap-around is provided.\\\\\\\"\\\\n\\\\n\\\\t| ascii encoding destPoint leftX rightX sourceRect xTable noFont f |\\\\n\\\\tdestPoint _ aPoint.\\\\n\\\\tanInterval do: \\\\n\\\\t\\\\t[:i |\\\\n\\\\t\\\\tencoding _ (sourceString at: i) leadingChar + 1.\\\\n\\\\t\\\\tnoFont _ false.\\\\n\\\\t\\\\t[f _ fontArray at: encoding]\\\\n\\\\t\\\\t\\\\ton: Exception do: [:ex | noFont _ true. f _ fontArray at: 1].\\\\n\\\\t\\\\tf ifNil: [noFont _ true. f _ fontArray at: 1].\\\\n\\\\t\\\\tascii _ noFont ifTrue: [$?] ifFalse: [(sourceString at: i) charCode].\\\\n\\\\t\\\\t(ascii < f minAscii\\\\n\\\\t\\\\t\\\\tor: [ascii > f maxAscii])\\\\n\\\\t\\\\t\\\\tifTrue: [ascii _ f maxAscii].\\\\n\\\\t\\\\txTable _ f xTable.\\\\n\\\\t\\\\tleftX _ xTable at: ascii + 1.\\\\n\\\\t\\\\trightX _ xTable at: ascii + 2.\\\\n\\\\t\\\\tsourceRect _ leftX@0 extent: (rightX-leftX) @ self height.\\\\n\\\\t\\\\taBitBlt copyFrom: sourceRect in: f glyphs to: destPoint.\\\\n\\\\t\\\\tdestPoint _ destPoint + ((rightX-leftX+kernDelta)@0).\\\\n\\\\t\\\\t\\\\\\\"destPoint printString displayAt: 0@(i*20).\\\\\\\"\\\\n\\\\t].\\\\n\\\\t^ destPoint.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'displaying' stamp: 'efc 8/6/2005 11:45'!\\\\ndisplayMultiString: aString on: aBitBlt from: startIndex to: stopIndex at: aPoint kern: kernDelta baselineY: baselineY\\\\n\\\\n\\\\t| destPoint leftX rightX glyphInfo g destY |\\\\n\\\\tdestPoint := aPoint.\\\\n\\\\tglyphInfo := Array new: 5.\\\\n\\\\tstartIndex to: stopIndex do: [:charIndex |\\\\n\\\\t\\\\tself glyphInfoOf: (aString at: charIndex) into: glyphInfo.\\\\n\\\\t\\\\tg := glyphInfo at:1.\\\\n\\\\t\\\\tleftX := glyphInfo at:2.\\\\n\\\\t\\\\trightX := glyphInfo at:3.\\\\n\\\\t\\\\t((glyphInfo at:5) ~= aBitBlt lastFont) ifTrue: [\\\\n\\\\t\\\\t\\\\t(glyphInfo at:5) installOn: aBitBlt.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\taBitBlt sourceForm: g.\\\\n\\\\t\\\\tdestY := baselineY - (glyphInfo at:4).\\\\n\\\\t\\\\taBitBlt destX: (destPoint x) destY: destY width: (rightX - leftX) height: (self height).\\\\n\\\\t\\\\taBitBlt sourceOrigin: leftX @ 0.\\\\n\\\\t\\\\taBitBlt copyBits.\\\\n\\\\t\\\\tdestPoint := destPoint + (rightX - leftX + kernDelta @ 0).\\\\n\\\\t].\\\\n\\\\t^ destPoint.! !\\\\n\\\\n!StrikeFontSet methodsFor: 'displaying' stamp: 'yo 12/27/2002 04:35'!\\\\ndisplayStringR2L: aString on: aBitBlt from: startIndex to: stopIndex at: aPoint kern: kernDelta \\\\n\\\\n\\\\t| destPoint font |\\\\n\\\\tdestPoint _ aPoint.\\\\n\\\\tstartIndex to: stopIndex do: [:charIndex | \\\\n\\\\t\\\\t| encoding ascii xTable leftX rightX | \\\\n\\\\t\\\\tencoding _ (aString at: charIndex) leadingChar + 1.\\\\n\\\\t\\\\tascii _ (aString at: charIndex) charCode.\\\\n\\\\t\\\\tfont _ fontArray at: encoding.\\\\n\\\\t\\\\t((ascii between: font minAscii and: font maxAscii) not) ifTrue: [\\\\n\\\\t\\\\t\\\\tascii _ font maxAscii].\\\\n\\\\t\\\\txTable _ font xTable.\\\\n\\\\t\\\\tleftX _ xTable at: ascii + 1.\\\\n\\\\t\\\\trightX _ xTable at: ascii + 2.\\\\n\\\\t\\\\taBitBlt sourceForm: font glyphs.\\\\n\\\\t\\\\taBitBlt destX: destPoint x - (rightX - leftX).\\\\n\\\\t\\\\taBitBlt destY: destPoint y.\\\\n\\\\t\\\\taBitBlt sourceOrigin: leftX @ 0.\\\\n\\\\t\\\\taBitBlt width: rightX - leftX.\\\\n\\\\t\\\\taBitBlt height: self height.\\\\n\\\\t\\\\taBitBlt copyBits.\\\\n\\\\t\\\\tdestPoint _ destPoint - (rightX - leftX + kernDelta @ 0).\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'displaying' stamp: 'yo 1/7/2005 12:04'!\\\\ndisplayString: aString on: aBitBlt from: startIndex to: stopIndex at: aPoint kern: kernDelta \\\\n\\\\n\\\\t^ self displayString: aString on: aBitBlt from: startIndex to: stopIndex at: aPoint kern: kernDelta baselineY: aPoint y + self ascent.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'displaying' stamp: 'efc 8/6/2005 13:35'!\\\\ndisplayString: aString on: aBitBlt from: startIndex to: stopIndex at: aPoint kern: kernDelta baselineY: baselineY\\\\n\\\\t\\\\\\\"Draw the given string from startIndex to stopIndex \\\\n\\\\tat aPoint on the (already prepared) BitBlt.\\\\\\\"\\\\n\\\\t\\\\n\\\\t\\\\\\\"Assume this is a wide string\\\\\\\"\\\\n\\\\t| isMulti |\\\\n\\\\tisMulti _ true.\\\\n\\\\n\\\\t\\\\\\\"Look for an excuse to use the fast primitive\\\\\\\"\\\\n \\\\t(aString isKindOf: ByteString) \\\\n\\\\t\\\\tifTrue:[ isMulti _ false]\\\\n\\\\t\\\\tifFalse:[ (aString isKindOf: Text) \\\\n\\\\t\\\\t\\\\tifTrue:[ (aString string isKindOf: ByteString) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue:[ isMulti _ false ] \\\\n\\\\t]].\\\\n\\\\n\\\\tisMulti ifTrue:[^ self displayMultiString: aString on: aBitBlt from: startIndex to: stopIndex at: aPoint kern: kernDelta baselineY: baselineY].\\\\n\\\\n\\\\t^ aBitBlt displayString: aString \\\\n\\\\t\\\\t\\\\tfrom: startIndex \\\\n\\\\t\\\\t\\\\tto: stopIndex \\\\n\\\\t\\\\t\\\\tat: aPoint \\\\n\\\\t\\\\t\\\\tstrikeFont: self\\\\n\\\\t\\\\t\\\\tkern: kernDelta! !\\\\n\\\\n!StrikeFontSet methodsFor: 'displaying' stamp: 'yo 1/7/2005 15:17'!\\\\ndisplayString: aString on: aBitBlt from: startIndex to: stopIndex at: aPoint kern: kernDelta from: fromFont baselineY: baselineY\\\\n\\\\n\\\\t| destPoint leftX rightX glyphInfo g tag char destY |\\\\n\\\\tdestPoint _ aPoint.\\\\n\\\\trIndex _ startIndex.\\\\n\\\\ttag _ (aString at: rIndex) leadingChar.\\\\n\\\\tglyphInfo _ Array new: 5.\\\\n\\\\t[rIndex <= stopIndex] whileTrue: [\\\\n\\\\t\\\\tchar _ aString at: rIndex.\\\\n\\\\t\\\\t((fromFont hasGlyphOf: char) or: [char leadingChar ~= tag]) ifTrue: [^ Array with: rIndex with: destPoint].\\\\n\\\\t\\\\tself glyphInfoOf: char into: glyphInfo.\\\\n\\\\t\\\\tg _ glyphInfo first.\\\\n\\\\t\\\\tleftX _ glyphInfo second.\\\\n\\\\t\\\\trightX _ glyphInfo third.\\\\n\\\\t\\\\t(glyphInfo fifth ~= aBitBlt lastFont) ifTrue: [\\\\n\\\\t\\\\t\\\\tglyphInfo fifth installOn: aBitBlt.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\taBitBlt sourceForm: g.\\\\n\\\\t\\\\tdestY _ baselineY - glyphInfo fourth. \\\\n\\\\t\\\\taBitBlt destX: destPoint x.\\\\n\\\\t\\\\taBitBlt destY: destY.\\\\n\\\\t\\\\taBitBlt sourceOrigin: leftX @ 0.\\\\n\\\\t\\\\taBitBlt width: rightX - leftX.\\\\n\\\\t\\\\taBitBlt height: self height.\\\\n\\\\t\\\\taBitBlt copyBits.\\\\n\\\\t\\\\tdestPoint _ destPoint + (rightX - leftX + kernDelta @ 0).\\\\n\\\\t\\\\trIndex _ rIndex + 1.\\\\n\\\\t].\\\\n\\\\t^ Array with: rIndex with: destPoint.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'displaying' stamp: 'BG 3/16/2005 08:27'!\\\\nfontDisplay\\\\n\\\\t\\\\\\\"TextStyle default defaultFont fontDisplay.\\\\\\\"\\\\n\\\\n\\\\tDisplay restoreAfter:\\\\n\\\\t\\\\t[(Form extent: 440@400) displayAt: 90@90.\\\\n\\\\t\\\\t 0 to: 15 do:\\\\n\\\\t\\\\t\\\\t[:i |\\\\n\\\\t\\\\t\\\\ti storeStringHex displayAt: 100 @ (20 * i + 100).\\\\n\\\\t\\\\t\\\\t0 to: 15 do:\\\\n\\\\t\\\\t\\\\t\\\\t[:j |\\\\n\\\\t\\\\t\\\\t\\\\t((16*i+j) between: 1 and: (self xTable size - 2)) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[(self characterFormAt: (16 * i + j) asCharacter)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdisplayAt: (20 * j + 150) @ (20 * i + 100)]]].\\\\n\\\\t\\\\t\\\\t'Click to continue...' asDisplayText displayAt: 100@450]! !\\\\n\\\\n\\\\n!StrikeFontSet methodsFor: 'emphasis' stamp: 'yo 12/27/2002 13:52'!\\\\nmakeBoldGlyphs\\\\n\\\\t\\\\\\\"Make a bold set of glyphs with same widths by ORing 1 bit to the right\\\\n\\\\t\\\\t(requires at least 1 pixel of intercharacter space)\\\\\\\"\\\\n\\\\n\\\\t| g bonkForm font |\\\\n\\\\t1 to: fontArray size do: [:i |\\\\n\\\\t\\\\tfont _ fontArray at: i.\\\\n\\\\t\\\\tfont ifNotNil: [\\\\n\\\\t\\\\t\\\\tg _ font glyphs deepCopy.\\\\n\\\\t\\\\t\\\\tbonkForm _ (Form extent: 1@16) fillBlack offset: -1@0.\\\\n\\\\t\\\\t\\\\tself bonk: g with: bonkForm at: i.\\\\n\\\\t\\\\t\\\\tg copyBits: g boundingBox from: g at: (1@0)\\\\n\\\\t\\\\t\\\\t\\\\tclippingBox: g boundingBox rule: Form under fillColor: nil.\\\\n\\\\t\\\\t\\\\t(fontArray at: i) setGlyphs: g.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'emphasis' stamp: 'yo 12/27/2002 13:51'!\\\\nmakeItalicGlyphs\\\\n\\\\t\\\\\\\"Make an italic set of glyphs with same widths by skewing left and right\\\\n\\\\t\\\\t(may require more intercharacter space)\\\\\\\"\\\\n\\\\n\\\\t| g bonkForm bc font |\\\\n\\\\t1 to: fontArray size do: [:j |\\\\n\\\\t\\\\tfont _ (fontArray at: j).\\\\n\\\\t\\\\tfont ifNotNil: [\\\\n\\\\t\\\\t\\\\tg _ font glyphs deepCopy.\\\\n\\\\t\\\\t\\\\t\\\\\\\"BonkForm will have bits where slanted characters overlap their neighbors.\\\\\\\"\\\\n\\\\t\\\\t\\\\tbonkForm _ Form extent: (self height//4+2) @ self height.\\\\n\\\\t\\\\t\\\\tbc _ font descent//4 + 1.  \\\\\\\"Bonker x-coord corresponding to char boundary.\\\\\\\"\\\\n\\\\t\\\\t\\\\tbonkForm fill: (0 @ 0 corner: (bc+1) @ font ascent) fillColor: Color black.\\\\n\\\\t\\\\t\\\\t4 to: font ascent-1 by: 4 do:\\\\n\\\\t\\\\t\\\\t\\\\t[:y | \\\\t\\\\t\\\\\\\"Slide ascenders right...\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tg copy: (1@0 extent: g width @ (font ascent - y))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tfrom: 0@0 in: g rule: Form over.\\\\n\\\\t\\\\t\\\\t\\\\tbonkForm copy: (1@0 extent: bonkForm width @ (font ascent - y))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tfrom: 0@0 in: bonkForm rule: Form over].\\\\n\\\\t\\\\t\\\\tbonkForm fill: (0 @ 0 corner: (bc+1) @ font ascent) fillColor: Color white.\\\\n\\\\t\\\\t\\\\tbonkForm fill: (bc @ font ascent corner: bonkForm extent) fillColor: Color black.\\\\n\\\\t\\\\t\\\\tfont ascent to: font height-1 by: 4 do:\\\\n\\\\t\\\\t\\\\t\\\\t[:y | \\\\t\\\\t\\\\\\\"Slide descenders left...\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tg copy: (0@y extent: g width @ g height)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tfrom: 1@y in: g rule: Form over.\\\\n\\\\t\\\\t\\\\t\\\\tbonkForm copy: (0@0 extent: bonkForm width @ bonkForm height)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tfrom: 1@0 in: bonkForm rule: Form over].\\\\n\\\\t\\\\t\\\\tbonkForm fill: (bc @ font ascent corner: bonkForm extent) fillColor: Color white.\\\\n\\\\t\\\\t\\\\t\\\\\\\"Now use bonkForm to erase at every character boundary in glyphs.\\\\\\\"\\\\n\\\\t\\\\t\\\\tbonkForm offset: (0-bc) @ 0.\\\\n\\\\t\\\\t\\\\tfont bonk: g with: bonkForm.\\\\n\\\\t\\\\t\\\\tfont setGlyphs: g\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'emphasis' stamp: 'yo 12/27/2002 13:53'!\\\\nmakeStruckOutGlyphs\\\\n\\\\t\\\\\\\"Make a struck-out set of glyphs with same widths\\\\\\\"\\\\n\\\\n\\\\t| g font |\\\\n\\\\t1 to: fontArray size do: [:i |\\\\n\\\\t\\\\tfont _ (fontArray at: i).\\\\n\\\\t\\\\tfont ifNotNil: [\\\\n\\\\t\\\\t\\\\tg _ font glyphs deepCopy.\\\\n\\\\t\\\\t\\\\tg fillBlack: (0 @ (font ascent - (font ascent//3)) extent: g width @ 1).\\\\n\\\\t\\\\t\\\\tfont setGlyphs: g\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'emphasis' stamp: 'yo 12/27/2002 13:51'!\\\\nmakeUnderlinedGlyphs\\\\n\\\\t\\\\\\\"Make an underlined set of glyphs with same widths\\\\\\\"\\\\n\\\\n\\\\t| g font |\\\\n\\\\t1 to: fontArray size do: [:i |\\\\n\\\\t\\\\tfont _ (fontArray at: i).\\\\n\\\\t\\\\tfont ifNotNil: [\\\\n\\\\t\\\\t\\\\tg _ font glyphs deepCopy.\\\\n\\\\t\\\\t\\\\tg fillBlack: (0 @ (font ascent+1) extent: g width @ 1).\\\\n\\\\t\\\\t\\\\tfont setGlyphs: g\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n! !\\\\n\\\\n\\\\n!StrikeFontSet methodsFor: '*nebraska-as yet unclassified' stamp: 'yo 12/17/2005 20:19'!\\\\nencodedForRemoteCanvas\\\\n\\\\n\\\\t| stream |\\\\n\\\\tstream := RWBinaryOrTextStream on: ''.\\\\n\\\\tstream nextPutAll: self familyName.\\\\n\\\\tstream nextPut: Character space.\\\\n\\\\tstream nextPutAll: self pointSize asString.\\\\n\\\\tstream nextPut: Character space.\\\\n\\\\tstream nextPutAll: self emphasis asString.\\\\n\\\\t^ stream contents asString.\\\\n! !\\\\n\\\\n\\\\n!StrikeFontSet methodsFor: 'private' stamp: 'yo 12/27/2002 13:39'!\\\\naddNewFont: aFont at: encodingIndex\\\\n\\\\n\\\\t| newArray |\\\\n\\\\tencodingIndex > fontArray size ifTrue: [\\\\n\\\\t\\\\tnewArray _ Array new: encodingIndex.\\\\n\\\\t\\\\tnewArray replaceFrom: 1 to: fontArray size with: fontArray startingAt: 1.\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tnewArray _ fontArray.\\\\n\\\\t].\\\\n\\\\n\\\\tnewArray at: encodingIndex put: aFont.\\\\n\\\\n\\\\tself initializeWithFontArray: newArray.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'private' stamp: 'yo 1/7/2005 11:16'!\\\\nglyphInfoOf: aCharacter into: glyphInfoArray\\\\n\\\\n\\\\t| index f code leftX |\\\\n\\\\tindex _ aCharacter leadingChar + 1.\\\\n\\\\tfontArray size < index ifTrue: [^ self questionGlyphInfoInto: glyphInfoArray].\\\\n\\\\t(f _ fontArray at: index) ifNil: [^ self questionGlyphInfoInto: glyphInfoArray].\\\\n\\\\n\\\\tcode _ aCharacter charCode.\\\\n\\\\t((code between: f minAscii and: f maxAscii) not) ifTrue: [\\\\n\\\\t\\\\t^ self questionGlyphInfoInto: glyphInfoArray.\\\\n\\\\t].\\\\n\\\\tleftX _ f xTable at: code + 1.\\\\n\\\\tleftX < 0 ifTrue: [\\\\n\\\\t\\\\t^ self questionGlyphInfoInto: glyphInfoArray.\\\\n\\\\t].\\\\n\\\\tglyphInfoArray at: 1 put: f glyphs;\\\\n\\\\t\\\\tat: 2 put: leftX;\\\\n\\\\t\\\\tat: 3 put: (f xTable at: code + 2);\\\\n\\\\t\\\\tat: 4 put: (f ascentOf: aCharacter);\\\\n\\\\t\\\\tat: 5 put: self.\\\\n\\\\t^ glyphInfoArray.\\\\n! !\\\\n\\\\n!StrikeFontSet methodsFor: 'private' stamp: 'yo 1/13/2005 16:43'!\\\\nquestionGlyphInfoInto: glyphInfoArray\\\\n\\\\n\\\\t| f ascii |\\\\n\\\\tf _ fontArray at: 1.\\\\n\\\\tascii _ $? asciiValue.\\\\n\\\\tglyphInfoArray at: 1 put: f glyphs;\\\\n\\\\t\\\\tat: 2 put: (f xTable at: ascii + 1);\\\\n\\\\t\\\\tat: 3 put: (f xTable at: ascii + 2);\\\\n\\\\t\\\\tat: 4 put: (self ascentOf: $?);\\\\n\\\\t\\\\tat: 5 put: self.\\\\n\\\\t^ glyphInfoArray.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStrikeFontSet class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StrikeFontSet class methodsFor: 'as yet unclassified' stamp: 'yo 1/19/2005 11:25'!\\\\ncreateExternalFontFileForLatin2: fileName\\\\n\\\\\\\"\\\\n\\\\tStrikeFontSet createExternalFontFileForLatin2: 'latin2.out'.\\\\n\\\\\\\"\\\\n\\\\n\\\\t| file array f installDirectory |\\\\n\\\\tfile _ FileStream newFileNamed: fileName.\\\\n\\\\tinstallDirectory _ Smalltalk at: #M17nInstallDirectory ifAbsent: [].\\\\n\\\\tinstallDirectory _ installDirectory\\\\n\\\\t\\\\tifNil: [String new]\\\\n\\\\t\\\\tifNotNil: [installDirectory , FileDirectory pathNameDelimiter asString].\\\\n\\\\tarray _ Array\\\\n\\\\t\\\\t\\\\t\\\\twith: (StrikeFont newFromEFontBDFFile: installDirectory , 'b10.bdf' name: 'LatinTwo9' ranges: EFontBDFFontReaderForRanges rangesForLatin2)\\\\n\\\\t\\\\t\\\\t\\\\twith: (StrikeFont newFromEFontBDFFile: installDirectory , 'b12.bdf' name: 'LatinTwo10' ranges: EFontBDFFontReaderForRanges rangesForLatin2)\\\\n\\\\t\\\\t\\\\t\\\\twith: (StrikeFont newFromEFontBDFFile: installDirectory , 'b14.bdf' name: 'LatinTwo12' ranges: EFontBDFFontReaderForRanges rangesForLatin2)\\\\n\\\\t\\\\t\\\\t\\\\twith: (StrikeFont newFromEFontBDFFile: installDirectory , 'b16.bdf' name: 'LatingTwo14' ranges: EFontBDFFontReaderForRanges rangesForLatin2)\\\\n\\\\t\\\\t\\\\t\\\\twith: (StrikeFont newFromEFontBDFFile: installDirectory , 'b24.bdf' name: 'LatinTwo20' ranges: EFontBDFFontReaderForRanges rangesForLatin2).\\\\n\\\\tTextConstants at: #forceFontWriting put: true.\\\\n\\\\tf _ ReferenceStream on: file.\\\\n\\\\tf nextPut: array.\\\\n\\\\tfile close.\\\\n\\\\tTextConstants removeKey: #forceFontWriting.\\\\n! !\\\\n\\\\n!StrikeFontSet class methodsFor: 'as yet unclassified' stamp: 'yo 5/25/2004 11:05'!\\\\ncreateExternalFontFileForUnicodeJapanese: fileName\\\\n\\\\\\\"\\\\n\\\\tStrikeFontSet createExternalFontFileForUnicodeJapanese: 'uJapaneseFont.out'.\\\\n\\\\\\\"\\\\n\\\\n\\\\t| file array f installDirectory |\\\\n\\\\tfile _ FileStream newFileNamed: fileName.\\\\n\\\\tinstallDirectory _ Smalltalk at: #M17nInstallDirectory ifAbsent: [].\\\\n\\\\tinstallDirectory _ installDirectory\\\\n\\\\t\\\\tifNil: [String new]\\\\n\\\\t\\\\tifNotNil: [installDirectory , FileDirectory pathNameDelimiter asString].\\\\n\\\\tarray _ Array\\\\n\\\\t\\\\t\\\\t\\\\twith: (StrikeFont newForJapaneseFromEFontBDFFile: installDirectory , 'b12.bdf' name: 'Japanese10' overrideWith: 'shnmk12.bdf')\\\\n\\\\t\\\\t\\\\t\\\\twith: ((StrikeFont newForJapaneseFromEFontBDFFile: installDirectory , 'b14.bdf' name: 'Japanese12' overrideWith: 'shnmk14.bdf') \\\\\\\"fixAscent: 14 andDescent: 1 head: 1\\\\\\\")\\\\n\\\\t\\\\t\\\\t\\\\twith: ((StrikeFont newForJapaneseFromEFontBDFFile: 'b16.bdf' name: 'Japanese14' overrideWith: 'shnmk16.bdf') \\\\\\\"fixAscent: 16 andDescent: 4 head: 4\\\\\\\")\\\\n\\\\t\\\\t\\\\t\\\\twith: (StrikeFont newForJapaneseFromEFontBDFFile: installDirectory , 'b24.bdf' name: 'Japanese18' overrideWith: 'kanji24.bdf').\\\\n\\\\tTextConstants at: #forceFontWriting put: true.\\\\n\\\\tf _ ReferenceStream on: file.\\\\n\\\\tf nextPut: array.\\\\n\\\\tfile close.\\\\n\\\\tTextConstants removeKey: #forceFontWriting.\\\\n! !\\\\n\\\\n!StrikeFontSet class methodsFor: 'as yet unclassified' stamp: 'yo 1/15/2004 16:58'!\\\\ncreateExternalFontFileForUnicodeKorean: fileName\\\\n\\\\\\\"\\\\n\\\\tSmalltalk garbageCollect.\\\\n\\\\tStrikeFontSet createExternalFontFileForUnicodeKorean: 'uKoreanFont.out'.\\\\n\\\\\\\"\\\\n\\\\n\\\\t| file array f installDirectory |\\\\n\\\\tfile _ FileStream newFileNamed: fileName.\\\\n\\\\tinstallDirectory _ Smalltalk at: #M17nInstallDirectory ifAbsent: [].\\\\n\\\\tinstallDirectory _ installDirectory\\\\n\\\\t\\\\tifNil: [String new]\\\\n\\\\t\\\\tifNotNil: [installDirectory , FileDirectory pathNameDelimiter asString].\\\\n\\\\tarray _ Array\\\\n\\\\t\\\\t\\\\t\\\\twith: (StrikeFont newForKoreanFromEFontBDFFile: installDirectory , 'b12.bdf' name: 'Japanese10' overrideWith: 'shnmk12.bdf')\\\\n\\\\t\\\\t\\\\t\\\\twith: ((StrikeFont newForKoreanFromEFontBDFFile: installDirectory , 'b14.bdf' name: 'Japanese12' overrideWith: 'shnmk14.bdf') \\\\\\\"fixAscent: 14 andDescent: 1 head: 1\\\\\\\")\\\\n\\\\t\\\\t\\\\t\\\\twith: ((StrikeFont newForKoreanFromEFontBDFFile: installDirectory , 'b16.bdf' name: 'Japanese14' overrideWith: 'hanglg16.bdf') fixAscent: 16 andDescent: 4 head: 4)\\\\n\\\\t\\\\t\\\\t\\\\twith: (StrikeFont newForKoreanFromEFontBDFFile: installDirectory , 'b24.bdf' name: 'Japanese18' overrideWith: 'hanglm24.bdf').\\\\n\\\\tTextConstants at: #forceFontWriting put: true.\\\\n\\\\tf _ ReferenceStream on: file.\\\\n\\\\tf nextPut: array.\\\\n\\\\tfile close.\\\\n\\\\tTextConstants removeKey: #forceFontWriting.\\\\n! !\\\\n\\\\n!StrikeFontSet class methodsFor: 'as yet unclassified' stamp: 'yo 12/17/2005 22:42'!\\\\ndecodedFromRemoteCanvas: aString\\\\n\\\\n\\\\t| array |\\\\n\\\\tarray _ aString findTokens: #($ ).\\\\n\\\\t^ self familyName: (array at: 1) size: (array at: 2) asNumber emphasized: (array at: 3) asNumber.\\\\n! !\\\\n\\\\n!StrikeFontSet class methodsFor: 'as yet unclassified' stamp: 'yo 12/27/2002 14:08'!\\\\nduplicateArrayElementsForLeadingCharShift\\\\n\\\\\\\"\\\\n\\\\tself duplicateArrayElementsForLeadingCharShift\\\\n\\\\\\\"\\\\n\\\\t| array font |\\\\n\\\\tself allInstances do: [:s |\\\\n\\\\t\\\\ts emphasis = 0 ifTrue: [\\\\n\\\\t\\\\t\\\\tarray _ s fontArray.\\\\n\\\\t\\\\t\\\\t2 to: (4 min: array size) do: [:i |\\\\n\\\\t\\\\t\\\\t\\\\tfont _ array at: i.\\\\n\\\\t\\\\t\\\\t\\\\ts addNewFont: font at: ((i - 1) << 2) + 1.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\ts reset\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StrikeFontSet class methodsFor: 'as yet unclassified' stamp: 'yo 8/19/2003 13:04'!\\\\nfamilyName: aName size: aSize\\\\n\\\\t\\\\\\\"Answer a font (or the default font if the name is unknown) in the specified size.\\\\\\\"\\\\n\\\\n\\\\t| collection |\\\\n\\\\tcollection _  self allInstances select: [:inst | (inst name beginsWith: aName) and: [inst emphasis = 0]].\\\\n\\\\tcollection isEmpty ifTrue: [\\\\n\\\\t\\\\t(aName = 'DefaultMultiStyle') ifTrue: [\\\\n\\\\t\\\\t\\\\tcollection _ (TextConstants at: #DefaultMultiStyle) fontArray.\\\\n\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\t^ TextStyle defaultFont\\\\n\\\\t\\\\t]\\\\n\\\\t].\\\\n\\\\tcollection _ collection asSortedCollection: [:a :b | a pointSize <= b pointSize].\\\\n\\\\tcollection do: [:s | (s pointSize >= aSize) ifTrue: [^ s]].\\\\n\\\\t^ TextStyle defaultFont.\\\\n! !\\\\n\\\\n!StrikeFontSet class methodsFor: 'as yet unclassified' stamp: 'yo 8/18/2003 21:03'!\\\\nfamilyName: aName size: aSize emphasized: emphasisCode\\\\n\\\\t\\\\\\\"Create the font with this emphasis\\\\\\\"\\\\n\\\\n\\\\t^ (self familyName: aName size: aSize) emphasized: emphasisCode\\\\n! !\\\\n\\\\n!StrikeFontSet class methodsFor: 'as yet unclassified' stamp: 'yo 5/25/2004 14:32'!\\\\nfindMaximumLessThan: f in: array\\\\n\\\\n\\\\tarray size to: 1 by: -1 do: [:i |\\\\n\\\\t\\\\tf height >= (array at: i) height ifTrue: [^ array at: i].\\\\n\\\\t].\\\\n\\\\t^ array first.\\\\n! !\\\\n\\\\n!StrikeFontSet class methodsFor: 'as yet unclassified' stamp: 'yo 9/23/2002 16:32'!\\\\nnewFontArray: anArray\\\\n \\\\n\\\\t^super new initializeWithFontArray: anArray\\\\n! !\\\\n\\\\n\\\\n!StrikeFontSet class methodsFor: 'fileIn/Out' stamp: 'yo 1/18/2005 16:00'!\\\\ninstallExternalFontFileName6: fileName encoding: encoding encodingName: aString textStyleName: styleName\\\\n\\\\n\\\\t^ self installExternalFontFileName6: fileName inDir: FileDirectory default encoding: encoding encodingName: aString textStyleName: styleName.\\\\n\\\\n\\\\\\\"\\\\nStrikeFontSet createExternalFontFileForCyrillic: 'cyrillicFont.out'.\\\\n\\\\nStrikeFontSet installExternalFontFileName6: 'latin2.out' encoding: Latin2Environment leadingChar encodingName: #Latin2 textStyleName: #DefaultMultiStyle.\\\\nStrikeFontSet installExternalFontFileName6: 'uJapaneseFont.out' encoding: JapaneseEnvironment leadingChar encodingName: #Japanese textStyleName: #DefaultMultiStyle.\\\\n\\\\nStrikeFontSet installExternalFontFileName6: 'uKoreanFont.out' encoding: UnicodeKorean leadingChar encodingName: #Korean textStyleName: #DefaultMultiStyle.\\\\n\\\\nStrikeFontSet removeFontsForEncoding: 2 encodingName: #Gb2312.\\\\nself halt.\\\\nStrikeFontSet removeFontsForEncoding: 3 encodingName: #KsX1001.\\\\n\\\\\\\"\\\\n! !\\\\n\\\\n!StrikeFontSet class methodsFor: 'fileIn/Out' stamp: 'tak 8/3/2005 17:40'!\\\\ninstallExternalFontFileName6: fileName inDir: dir encoding: encoding encodingName: aString textStyleName: styleName \\\\n\\\\t| aStream |\\\\n\\\\taStream := dir readOnlyFileNamed: fileName.\\\\n\\\\t[self\\\\n\\\\t\\\\tinstallExternalFontOn: aStream\\\\n\\\\t\\\\tencoding: encoding\\\\n\\\\t\\\\tencodingName: aString\\\\n\\\\t\\\\ttextStyleName: styleName]\\\\n\\\\t\\\\tensure: [aStream close]! !\\\\n\\\\n!StrikeFontSet class methodsFor: 'fileIn/Out' stamp: 'yo 3/17/2004 10:32'!\\\\ninstallExternalFontFileName: fileName encoding: encoding encodingName: aString textStyleName: styleName\\\\n\\\\n\\\\t^ self installExternalFontFileName: fileName inDir: FileDirectory default encoding: encoding encodingName: aString textStyleName: styleName.\\\\n\\\\n\\\\\\\"\\\\nStrikeFontSet createExternalFontFileForCyrillic: 'cyrillicFont.out'.\\\\n\\\\nStrikeFontSet installExternalFontFileName: 'chineseFont.out' encoding: 2 encodingName: #Gb2312 textStyleName: #DefaultMultiStyle.\\\\nStrikeFontSet installExternalFontFileName: 'japaneseFont.out' encoding: 1 encodingName: #JisX0208 textStyleName: #DefaultMultiStyle.\\\\nStrikeFontSet installExternalFontFileName: 'defaultFont.out' encoding: 0 encodingName: #Latin1 textStyleName: #DefaultMultiStyle.\\\\nStrikeFontSet installExternalFontFileName: 'cyrillicFont.out' encoding: UnicodeCyrillic leadingChar encodingName: #Cyrillic textStyleName: #DefaultMultiStyle.\\\\nStrikeFontSet installExternalFontFileName: 'extendedLatinFont.out' encoding: UnicodeLatinExtendedAB leadingChar encodingName: #ExtendedLatin textStyleName: #DefaultMultiStyle.\\\\nStrikeFontSet installExternalFontFileName: 'ipaExtensionsFont.out' encoding: UnicodeIPA leadingChar encodingName: #IPAExtensions textStyleName: #DefaultMultiStyle.\\\\nStrikeFontSet installExternalFontFileName: 'armenianFont.out' encoding: UnicodeArmenian leadingChar encodingName: #Armenian textStyleName: #DefaultMultiStyle.\\\\nStrikeFontSet installExternalFontFileName: 'greekFont.out' encoding: UnicodeGreek leadingChar encodingName: #Greek textStyleName: #DefaultMultiStyle.\\\\n\\\\nStrikeFontSet installExternalFontFileName: 'arrowFont.out' encoding: UnicodeArrows leadingChar encodingName: #Arrow textStyleName: #DefaultMultiStyle.\\\\n\\\\nStrikeFontSet installExternalFontFileName: 'uJapaneseFont.out' indir: FileDirectory default encoding: JapaneseEnvironment leadingChar encodingName: #Japanese textStyleName: #DefaultMultiStyle.\\\\n\\\\nStrikeFontSet installExternalFontFileName: 'uKoreanFont.out' encoding: UnicodeKorean leadingChar encodingName: #Korean textStyleName: #DefaultMultiStyle.\\\\n\\\\nStrikeFontSet removeFontsForEncoding: 2 encodingName: #Gb2312.\\\\nself halt.\\\\nStrikeFontSet removeFontsForEncoding: 3 encodingName: #KsX1001.\\\\n\\\\\\\"\\\\n! !\\\\n\\\\n!StrikeFontSet class methodsFor: 'fileIn/Out' stamp: 'yo 8/19/2003 00:32'!\\\\ninstallExternalFontFileName: fileName inDir: dir encoding: encoding encodingName: aString textStyleName: styleName\\\\n\\\\n\\\\t| array arrayFour oldStyle arrayOfFS fs fonts newFonts |\\\\n\\\\tarray _ (ReferenceStream on: (dir readOnlyFileNamed: fileName)) next.\\\\n\\\\n\\\\tarrayFour _ Array new: 4 withAll: array last.\\\\n\\\\tarrayFour replaceFrom: 1 to: array size with: array startingAt: 1.\\\\n\\\\tTextConstants at: aString asSymbol put: arrayFour.\\\\n\\\\n\\\\toldStyle _ TextConstants at: styleName asSymbol.\\\\n\\\\tarrayOfFS _ oldStyle fontArray.\\\\n\\\\tarrayOfFS _ (1 to: 4) collect: [:i |\\\\n\\\\t\\\\tfs _ arrayOfFS at: i.\\\\n\\\\t\\\\tfonts _ fs fontArray.\\\\n\\\\t\\\\tencoding + 1 > fonts size ifTrue: [\\\\n\\\\t\\\\t\\\\tnewFonts _ Array new: encoding + 1.\\\\n\\\\t\\\\t\\\\tnewFonts replaceFrom: 1 to: fonts size with: fonts startingAt: 1.\\\\n\\\\t\\\\t\\\\tnewFonts at: encoding + 1 put: (arrayFour at: i).\\\\n\\\\t\\\\t\\\\tfs initializeWithFontArray: newFonts.\\\\n\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\tfonts at: encoding + 1 put: (arrayFour at: i).\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tfs.\\\\n\\\\t].\\\\n\\\\n\\\\tTextConstants at: styleName asSymbol put: (TextStyle fontArray: arrayOfFS).\\\\n\\\\toldStyle becomeForward: (TextConstants at: styleName asSymbol).\\\\n\\\\n! !\\\\n\\\\n!StrikeFontSet class methodsFor: 'fileIn/Out' stamp: 'tak 8/5/2005 10:34'!\\\\ninstallExternalFontOn: aStream encoding: encoding encodingName: aString textStyleName: styleName\\\\n\\\\n\\\\t| array fonts encodingIndex textStyle |\\\\n\\\\n\\\\tarray _ aStream\\\\n\\\\t\\\\tuntilEndWithFork: [(ReferenceStream on: aStream) next]\\\\n\\\\t\\\\tdisplayingProgress: 'Font reading...'. \\\\n\\\\t\\\\n\\\\tTextConstants at: aString asSymbol put: array.\\\\n\\\\n\\\\ttextStyle _ TextConstants at: styleName asSymbol.\\\\n\\\\tencodingIndex _ encoding + 1.\\\\n\\\\ttextStyle fontArray do: [:fs |\\\\n\\\\t\\\\tfonts _ fs fontArray.\\\\n\\\\t\\\\tencodingIndex > fonts size\\\\n\\\\t\\\\t\\\\tifTrue: [fonts _  (Array new: encodingIndex)\\\\n\\\\t\\\\t\\\\t\\\\treplaceFrom: 1 to: fonts size with: fonts startingAt: 1].\\\\n\\\\t\\\\tfonts at: encodingIndex put: (self findMaximumLessThan: fs fontArray first in: array).\\\\n\\\\t\\\\tfs initializeWithFontArray: fonts.\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StrikeFontSet class methodsFor: 'fileIn/Out' stamp: 'tak 8/4/2005 11:03'!\\\\ninstallExternalFontOn: aStream forLocale: locale \\\\n\\\\tself\\\\n\\\\t\\\\tinstallExternalFontOn: aStream\\\\n\\\\t\\\\tencoding: locale languageEnvironment leadingChar\\\\n\\\\t\\\\tencodingName: locale languageEnvironment fontEncodingName\\\\n\\\\t\\\\ttextStyleName: #DefaultMultiStyle! !\\\\n\\\\n!StrikeFontSet class methodsFor: 'fileIn/Out' stamp: 'yo 1/15/2004 16:06'!\\\\ninstallNewFontAtIndex: newIndex fromOld: oldIndex\\\\n\\\\n\\\\t| fontArray newArray |\\\\n\\\\tself allInstances do: [:set |\\\\n\\\\t\\\\tfontArray _ set fontArray.\\\\n\\\\t\\\\tnewIndex + 1 > fontArray size ifTrue: [\\\\n\\\\t\\\\t\\\\tnewArray _ Array new: newIndex + 1.\\\\n\\\\t\\\\t\\\\tnewArray replaceFrom: 1 to: fontArray size with: fontArray startingAt: 1.\\\\n\\\\t\\\\t\\\\tnewArray at: newIndex + 1 put: (fontArray at: oldIndex + 1).\\\\n\\\\t\\\\t\\\\tset initializeWithFontArray: newArray.\\\\n\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\tfontArray at: newIndex + 1 put: (fontArray at: oldIndex + 1).\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\n\\\\\\\"\\\\nStrikeFontSet installNewFontAtIndex: UnicodeSimplifiedChinese leadingChar fromOld: UnicodeJapanese leadingChar\\\\nStrikeFontSet installNewFontAtIndex: UnicodeKorean leadingChar fromOld: UnicodeJapanese leadingChar\\\\n\\\\\\\"\\\\n! !\\\\n\\\\n!StrikeFontSet class methodsFor: 'fileIn/Out' stamp: 'tak 8/4/2005 14:41'!\\\\nremoveFontsForEncoding: leadingChar encodingName: encodingSymbol\\\\n\\\\n\\\\t| insts fonts newFonts index |\\\\n\\\\tleadingChar = 0 ifTrue: [^ self error: 'you cannot delete the intrinsic fonts'].\\\\n\\\\tinsts _ self allInstances.\\\\n\\\\tinsts do: [:inst |\\\\n\\\\t\\\\tfonts _ inst fontArray.\\\\n\\\\t\\\\tfonts size >= (leadingChar + 1) ifTrue: [\\\\n\\\\t\\\\t\\\\tleadingChar + 1 = fonts size ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tnewFonts _ fonts copyFrom: 1 to: fonts size - 1.\\\\n\\\\t\\\\t\\\\t\\\\tindex _ newFonts indexOf: nil.\\\\n\\\\t\\\\t\\\\t\\\\tindex > 0 ifTrue: [newFonts _ newFonts copyFrom: 1 to: index - 1].\\\\n\\\\t\\\\t\\\\t\\\\tinst initializeWithFontArray: newFonts.\\\\n\\\\t\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tfonts at: leadingChar + 1 put: nil.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\n\\\\tTextConstants removeKey: encodingSymbol asSymbol ifAbsent: [].\\\\n! !\\\\nArrayedCollection subclass: #String\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: 'AsciiOrder CSLineEnders CSNonSeparators CSSeparators CaseInsensitiveOrder CaseSensitiveOrder HtmlEntities LowercasingTable Tokenish UppercasingTable'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Collections-Strings'!\\\\n!String commentStamp: '<historical>' prior: 0!\\\\nA String is an indexed collection of Characters. Class String provides the abstract super class for ByteString (that represents an array of 8-bit Characters) and WideString (that represents an array of  32-bit characters).  In the similar manner of LargeInteger and SmallInteger, those subclasses are chosen accordingly for a string; namely as long as the system can figure out so, the String is used to represent the given string.\\\\n\\\\nStrings support a vast array of useful methods, which can best be learned by browsing and trying out examples as you find them in the code.\\\\n\\\\nHere are a few useful methods to look at...\\\\n\\\\tString match:\\\\n\\\\tString contractTo:\\\\n\\\\nString also inherits many useful methods from its hierarchy, such as\\\\n\\\\tSequenceableCollection ,\\\\n\\\\tSequenceableCollection copyReplaceAll:with:\\\\n!\\\\n]style[(55 376 188 13 2 18 72 24 2 44)f1,f2,f1,f1LString match:;,f1,f1LString contractTo:;,f1,f1LSequenceableCollection ,;,f1,f1LSequenceableCollection copyReplaceAll:with:;!\\\\n\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'ar 4/12/2005 16:30'!\\\\nbyteAt: index\\\\n\\\\t^self subclassResponsibility! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'ar 4/12/2005 16:30'!\\\\nbyteAt: index put: value\\\\n\\\\t^self subclassResponsibility! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'ar 4/12/2005 16:30'!\\\\nbyteSize\\\\n\\\\t^self subclassResponsibility! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\ndo: aBlock toFieldNumber: aNumber\\\\n\\\\t\\\\\\\"Considering the receiver as a holder of tab-delimited fields, evaluate aBlock on behalf of a field in this string\\\\\\\"\\\\n\\\\n\\\\t| start end index |\\\\n\\\\tstart _ 1.\\\\n\\\\tindex _ 1.\\\\n\\\\t[start <= self size] whileTrue: \\\\n\\\\t\\\\t[end _ self indexOf: Character tab startingAt: start ifAbsent: [self size + 1].\\\\n\\\\t\\\\tend _ end - 1.\\\\n\\\\t\\\\taNumber = index ifTrue:\\\\n\\\\t\\\\t\\\\t[aBlock value: (self copyFrom: start  to: end).\\\\n\\\\t\\\\t\\\\t^ self].\\\\n\\\\t\\\\tindex _ index + 1.\\\\n\\\\t\\\\tstart _ end + 2]\\\\n\\\\n\\\\\\\"\\\\n1 to: 6 do:\\\\n\\\\t[:aNumber |\\\\n\\\\t\\\\t'fred\\\\tcharlie\\\\telmo\\\\t\\\\twimpy\\\\tfriml' do:\\\\n\\\\t\\\\t\\\\t[:aField | Transcript cr; show: aField] toFieldNumber: aNumber]\\\\n\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nendsWithDigit\\\\n\\\\t\\\\\\\"Answer whether the receiver's final character represents a digit.  3/11/96 sw\\\\\\\"\\\\n\\\\n\\\\t^ self size > 0 and: [self last isDigit]! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'ar 4/10/2005 17:12'!\\\\nfindAnySubStr: delimiters startingAt: start \\\\n\\\\t\\\\\\\"Answer the index of the character within the receiver, starting at start, that begins a substring matching one of the delimiters.  delimiters is an Array of Strings (Characters are permitted also).  If the receiver does not contain any of the delimiters, answer size + 1.\\\\\\\"\\\\n\\\\n\\\\t| min ind |\\\\n\\\\tmin _ self size + 1.\\\\n\\\\tdelimiters do: [:delim |\\\\t\\\\\\\"May be a char, a string of length 1, or a substring\\\\\\\"\\\\n\\\\t\\\\tdelim isCharacter \\\\n\\\\t\\\\t\\\\tifTrue: [ind _ self indexOfSubCollection: (String with: delim) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: start ifAbsent: [min]]\\\\n\\\\t\\\\t\\\\tifFalse: [ind _ self indexOfSubCollection: delim \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartingAt: start ifAbsent: [min]].\\\\n\\\\t\\\\t\\\\tmin _ min min: ind].\\\\n\\\\t^ min! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nfindBetweenSubStrs: delimiters\\\\n\\\\t\\\\\\\"Answer the collection of String tokens that result from parsing self.  Tokens are separated by 'delimiters', which can be a collection of Strings, or a collection of Characters.  Several delimiters in a row are considered as just one separation.\\\\\\\"\\\\n\\\\n\\\\t| tokens keyStart keyStop |\\\\n\\\\ttokens _ OrderedCollection new.\\\\n\\\\tkeyStop _ 1.\\\\n\\\\t[keyStop <= self size] whileTrue:\\\\n\\\\t\\\\t[keyStart _ self skipAnySubStr: delimiters startingAt: keyStop.\\\\n\\\\t\\\\tkeyStop _ self findAnySubStr: delimiters startingAt: keyStart.\\\\n\\\\t\\\\tkeyStart < keyStop\\\\n\\\\t\\\\t\\\\tifTrue: [tokens add: (self copyFrom: keyStart to: (keyStop - 1))]].\\\\n\\\\t^tokens! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nfindCloseParenthesisFor: startIndex\\\\n\\\\t\\\\\\\"assume (self at: startIndex) is $(.  Find the matching $), allowing parentheses to nest.\\\\\\\"\\\\n\\\\t\\\\\\\" '(1+(2-3))-3.14159' findCloseParenthesisFor: 1 \\\\\\\"\\\\n\\\\t\\\\\\\" '(1+(2-3))-3.14159' findCloseParenthesisFor: 4 \\\\\\\"\\\\n\\\\t| pos nestLevel |\\\\n\\\\tpos := startIndex+1.\\\\n\\\\tnestLevel := 1.\\\\n\\\\t[ pos <= self size ] whileTrue: [\\\\n\\\\t\\\\t(self at: pos) = $( ifTrue: [ nestLevel := nestLevel + 1 ].\\\\n\\\\t\\\\t(self at: pos) = $) ifTrue: [ nestLevel := nestLevel - 1 ].\\\\n\\\\t\\\\tnestLevel = 0 ifTrue: [ ^pos ].\\\\n\\\\t\\\\tpos := pos + 1.\\\\n\\\\t].\\\\n\\\\t^self size + 1! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nfindDelimiters: delimiters startingAt: start \\\\n\\\\t\\\\\\\"Answer the index of the character within the receiver, starting at start, that matches one of the delimiters. If the receiver does not contain any of the delimiters, answer size + 1.\\\\\\\"\\\\n\\\\n\\\\tstart to: self size do: [:i |\\\\n\\\\t\\\\tdelimiters do: [:delim | delim = (self at: i) ifTrue: [^ i]]].\\\\n\\\\t^ self size + 1! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 10/15/2003 15:32'!\\\\nfindLastOccuranceOfString: subString startingAt: start \\\\n\\\\t\\\\\\\"Answer the index of the last occurance of subString within the receiver, starting at start. If \\\\n\\\\tthe receiver does not contain subString, answer 0.\\\\\\\"\\\\n\\\\n\\\\t| last now |\\\\n\\\\tlast _ self findSubstring: subString in: self startingAt: start matchTable: CaseSensitiveOrder.\\\\n\\\\tlast = 0 ifTrue: [^ 0].\\\\n\\\\t[last > 0] whileTrue: [\\\\n\\\\t\\\\tnow _ last.\\\\n\\\\t\\\\tlast _ self findSubstring: subString in: self startingAt: last + subString size matchTable: CaseSensitiveOrder.\\\\n\\\\t].\\\\n\\\\n\\\\t^ now.\\\\n! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nfindString: subString\\\\n\\\\t\\\\\\\"Answer the index of subString within the receiver, starting at start. If \\\\n\\\\tthe receiver does not contain subString, answer 0.\\\\\\\"\\\\n\\\\t^self findString: subString startingAt: 1.! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nfindString: subString startingAt: start \\\\n\\\\t\\\\\\\"Answer the index of subString within the receiver, starting at start. If \\\\n\\\\tthe receiver does not contain subString, answer 0.\\\\\\\"\\\\n\\\\n\\\\t^ self findSubstring: subString in: self startingAt: start matchTable: CaseSensitiveOrder! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nfindString: key startingAt: start caseSensitive: caseSensitive\\\\n\\\\t\\\\\\\"Answer the index in this String at which the substring key first occurs, at or beyond start.  The match can be case-sensitive or not.  If no match is found, zero will be returned.\\\\\\\"\\\\n\\\\n\\\\tcaseSensitive\\\\n\\\\tifTrue: [^ self findSubstring: key in: self startingAt: start matchTable: CaseSensitiveOrder]\\\\n\\\\tifFalse: [^ self findSubstring: key in: self startingAt: start matchTable: CaseInsensitiveOrder]! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'ar 4/10/2005 17:13'!\\\\nfindTokens: delimiters\\\\n\\\\t\\\\\\\"Answer the collection of tokens that result from parsing self.  Return strings between the delimiters.  Any character in the Collection delimiters marks a border.  Several delimiters in a row are considered as just one separation.  Also, allow delimiters to be a single character.\\\\\\\"\\\\n\\\\n\\\\t| tokens keyStart keyStop separators |\\\\n\\\\n\\\\ttokens _ OrderedCollection new.\\\\n\\\\tseparators _ delimiters isCharacter \\\\n\\\\t\\\\tifTrue: [Array with: delimiters]\\\\n\\\\t\\\\tifFalse: [delimiters].\\\\n\\\\tkeyStop _ 1.\\\\n\\\\t[keyStop <= self size] whileTrue:\\\\n\\\\t\\\\t[keyStart _ self skipDelimiters: separators startingAt: keyStop.\\\\n\\\\t\\\\tkeyStop _ self findDelimiters: separators startingAt: keyStart.\\\\n\\\\t\\\\tkeyStart < keyStop\\\\n\\\\t\\\\t\\\\tifTrue: [tokens add: (self copyFrom: keyStart to: (keyStop - 1))]].\\\\n\\\\t^tokens! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'dtl 8/14/2004 11:27'!\\\\nfindTokens: delimiters escapedBy: quoteDelimiters \\\\n\\\\t\\\\\\\"Answer a collection of Strings separated by the delimiters, where  \\\\n\\\\tdelimiters is a Character or collection of characters. Two delimiters in a  \\\\n\\\\trow produce an empty string (compare this to #findTokens, which  \\\\n\\\\ttreats sequential delimiters as one).  \\\\n\\\\t \\\\n\\\\tThe characters in quoteDelimiters are treated as quote characters, such  \\\\n\\\\tthat any delimiter within a pair of matching quoteDelimiter characters  \\\\n\\\\tis treated literally, rather than as a delimiter.  \\\\n\\\\t \\\\n\\\\tThe quoteDelimiter characters may be escaped within a quoted string.  \\\\n\\\\tTwo sequential quote characters within a quoted string are treated as  \\\\n\\\\ta single character.  \\\\n\\\\t \\\\n\\\\tThis method is useful for parsing comma separated variable strings for  \\\\n\\\\tspreadsheet import and export.\\\\\\\"\\\\n\\\\n\\\\t| tokens rs activeEscapeCharacter ts char token delimiterChars quoteChars |\\\\n\\\\tdelimiterChars _ (delimiters isNil\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: ['']\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [delimiters]) asString.\\\\n\\\\tquoteChars _ (quoteDelimiters isNil\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: ['']\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [quoteDelimiters]) asString.\\\\n\\\\ttokens _ OrderedCollection new.\\\\n\\\\trs _ ReadStream on: self.\\\\n\\\\tactiveEscapeCharacter _ nil.\\\\n\\\\tts _ WriteStream on: ''.\\\\n\\\\t[rs atEnd]\\\\n\\\\t\\\\twhileFalse: [char _ rs next.\\\\n\\\\t\\\\t\\\\tactiveEscapeCharacter isNil\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [(quoteChars includes: char)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [activeEscapeCharacter _ char]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [(delimiterChars includes: char)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [token _ ts contents.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttokens add: token.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tts _ WriteStream on: '']\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [ts nextPut: char]]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [char == activeEscapeCharacter\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [rs peek == activeEscapeCharacter\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [ts nextPut: rs next]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [activeEscapeCharacter _ nil]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [ts nextPut: char]]].\\\\n\\\\ttoken _ ts contents.\\\\n\\\\t(tokens isEmpty and: [token isEmpty])\\\\n\\\\t\\\\tifFalse: [tokens add: token].\\\\n\\\\t^ tokens! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nfindTokens: delimiters includes: subString\\\\n\\\\t\\\\\\\"Divide self into pieces using delimiters.  Return the piece that includes subString anywhere in it.  Is case sensitive (say asLowercase to everything beforehand to make insensitive).\\\\\\\"\\\\n\\\\n^ (self findTokens: delimiters) \\\\n\\\\tdetect: [:str | (str includesSubString: subString)] \\\\n\\\\tifNone: [nil]! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nfindTokens: delimiters keep: keepers\\\\n\\\\t\\\\\\\"Answer the collection of tokens that result from parsing self.  The tokens are seperated by delimiters, any of a string of characters.  If a delimiter is also in keepers, make a token for it.  (Very useful for carriage return.  A sole return ends a line, but is also saved as a token so you can see where the line breaks were.)\\\\\\\"\\\\n\\\\n\\\\t| tokens keyStart keyStop |\\\\n\\\\ttokens _ OrderedCollection new.\\\\n\\\\tkeyStop _ 1.\\\\n\\\\t[keyStop <= self size] whileTrue:\\\\n\\\\t\\\\t[keyStart _ self skipDelimiters: delimiters startingAt: keyStop.\\\\n\\\\t\\\\tkeyStop to: keyStart-1 do: [:ii | \\\\n\\\\t\\\\t\\\\t(keepers includes: (self at: ii)) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\ttokens add: (self copyFrom: ii to: ii)]].\\\\t\\\\\\\"Make this keeper be a token\\\\\\\"\\\\n\\\\t\\\\tkeyStop _ self findDelimiters: delimiters startingAt: keyStart.\\\\n\\\\t\\\\tkeyStart < keyStop\\\\n\\\\t\\\\t\\\\tifTrue: [tokens add: (self copyFrom: keyStart to: (keyStop - 1))]].\\\\n\\\\t^tokens! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nfindWordStart: key startingAt: start\\\\n\\\\t| ind |\\\\n\\\\t\\\\\\\"HyperCard style searching.  Answer the index in self of the substring key, when that key is preceeded by a separator character.  Must occur at or beyond start.  The match is case-insensitive.  If no match is found, zero will be returned.\\\\\\\"\\\\n\\\\n\\\\tind _ start.\\\\n\\\\t[ind _ self findSubstring: key in: self startingAt: ind matchTable: CaseInsensitiveOrder.\\\\n\\\\tind = 0 ifTrue: [^ 0].\\\\t\\\\\\\"not found\\\\\\\"\\\\n\\\\tind = 1 ifTrue: [^ 1].\\\\t\\\\\\\"First char is the start of a word\\\\\\\"\\\\n\\\\t(self at: ind-1) isSeparator] whileFalse: [ind _ ind + 1].\\\\n\\\\t^ ind\\\\t\\\\\\\"is a word start\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nincludesSubString: subString\\\\n\\\\t^ (self findString: subString startingAt: 1) > 0! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nincludesSubstring: aString caseSensitive: caseSensitive\\\\n\\\\t\\\\n\\\\t^ (self findString: aString startingAt: 1 caseSensitive: caseSensitive) > 0! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 8/28/2002 16:45'!\\\\nindexOf: aCharacter\\\\n\\\\n\\\\taCharacter isCharacter ifFalse: [^ 0].\\\\n\\\\t^ self class\\\\n\\\\t\\\\tindexOfAscii: aCharacter asciiValue\\\\n\\\\t\\\\tinString: self\\\\n\\\\t\\\\tstartingAt: 1.\\\\n! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'ar 4/12/2005 16:31'!\\\\nindexOf: aCharacter startingAt: start\\\\n\\\\n\\\\t(aCharacter isCharacter) ifFalse: [^ 0].\\\\n\\\\t^ self class indexOfAscii: aCharacter asciiValue inString: self startingAt: start! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'ar 4/12/2005 16:31'!\\\\nindexOf: aCharacter  startingAt: start  ifAbsent: aBlock\\\\n\\\\t| ans |\\\\n\\\\t(aCharacter isCharacter) ifFalse: [ ^ aBlock value ].\\\\n\\\\tans _ self class indexOfAscii: aCharacter asciiValue inString: self  startingAt: start.\\\\n\\\\tans = 0\\\\n\\\\t\\\\tifTrue: [ ^ aBlock value ]\\\\n\\\\t\\\\tifFalse: [ ^ ans ]! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nindexOfAnyOf: aCharacterSet\\\\n\\\\t\\\\\\\"returns the index of the first character in the given set.  Returns 0 if none are found\\\\\\\"\\\\n\\\\t^self indexOfAnyOf: aCharacterSet  startingAt: 1! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nindexOfAnyOf: aCharacterSet  ifAbsent: aBlock\\\\n\\\\t\\\\\\\"returns the index of the first character in the given set.  Returns the evaluation of aBlock if none are found\\\\\\\"\\\\n\\\\t^self indexOfAnyOf: aCharacterSet  startingAt: 1  ifAbsent: aBlock! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nindexOfAnyOf: aCharacterSet  startingAt: start\\\\n\\\\t\\\\\\\"returns the index of the first character in the given set, starting from start.  Returns 0 if none are found\\\\\\\"\\\\n\\\\t^self indexOfAnyOf: aCharacterSet  startingAt: start  ifAbsent: [ 0 ]! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'ar 4/10/2005 16:22'!\\\\nindexOfAnyOf: aCharacterSet  startingAt: start ifAbsent: aBlock\\\\n\\\\t\\\\\\\"returns the index of the first character in the given set, starting from start\\\\\\\"\\\\n\\\\n\\\\t| ans |\\\\n\\\\tans _ self class findFirstInString: self  inSet: aCharacterSet byteArrayMap startingAt: start.\\\\n\\\\n\\\\tans = 0 \\\\n\\\\t\\\\tifTrue: [ ^aBlock value ]\\\\n\\\\t\\\\tifFalse: [ ^ans ]! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nindexOfSubCollection: sub \\\\n\\\\t#Collectn.\\\\n\\\\t\\\\\\\"Added 2000/04/08 For ANSI <sequenceReadableCollection> protocol.\\\\\\\"\\\\n\\\\t^ self\\\\n\\\\t\\\\tindexOfSubCollection: sub\\\\n\\\\t\\\\tstartingAt: 1\\\\n\\\\t\\\\tifAbsent: [0]! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nindexOfSubCollection: sub startingAt: start ifAbsent: exceptionBlock\\\\n\\\\t| index |\\\\n\\\\tindex _ self findSubstring: sub in: self startingAt: start matchTable: CaseSensitiveOrder.\\\\n\\\\tindex = 0 ifTrue: [^ exceptionBlock value].\\\\n\\\\t^ index! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nlastIndexOfPKSignature: aSignature\\\\n\\\\t\\\\\\\"Answer the last index in me where aSignature (4 bytes long) occurs, or 0 if not found\\\\\\\"\\\\n\\\\t| a b c d |\\\\n\\\\ta _ aSignature first.\\\\n\\\\tb _ aSignature second.\\\\n\\\\tc _ aSignature third.\\\\n\\\\td _ aSignature fourth.\\\\n\\\\t(self size - 3) to: 1 by: -1 do: [ :i |\\\\n\\\\t\\\\t(((self at: i) = a)\\\\n\\\\t\\\\t\\\\tand: [ ((self at: i + 1) = b)\\\\n\\\\t\\\\t\\\\t\\\\tand: [ ((self at: i + 2) = c)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [ ((self at: i + 3) = d) ]]])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [ ^i ]\\\\n\\\\t].\\\\n\\\\t^0! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 12/17/2002 16:56'!\\\\nleadingCharRunLengthAt: index\\\\n\\\\n\\\\t| leadingChar |\\\\n\\\\tleadingChar _ (self at: index) leadingChar.\\\\n\\\\tindex to: self size do: [:i |\\\\n\\\\t\\\\t(self at: i) leadingChar ~= leadingChar ifTrue: [^ i - index].\\\\n\\\\t].\\\\n\\\\t^ self size - index + 1.\\\\n! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 8/27/2002 14:33'!\\\\nlineCorrespondingToIndex: anIndex\\\\n\\\\t\\\\\\\"Answer a string containing the line at the given character position.  1/15/96 sw:  Inefficient first stab at this\\\\\\\"\\\\n\\\\n\\\\t| cr aChar answer |\\\\n\\\\tcr _ Character cr.\\\\n\\\\tanswer _ ''.\\\\n\\\\t1 to: self size do:\\\\n\\\\t\\\\t[:i | \\\\n\\\\t\\\\t\\\\taChar _ self at: i.\\\\n\\\\t\\\\t\\\\taChar = cr\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[i > anIndex\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[^ answer]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[answer _ '']]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[answer _ answer copyWith: aChar]].\\\\n\\\\t^ answer! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 8/27/2002 14:34'!\\\\nlineCount\\\\n\\\\t\\\\\\\"Answer the number of lines represented by the receiver, where every cr adds one line.  5/10/96 sw\\\\\\\"\\\\n\\\\n\\\\t| cr count |\\\\n\\\\tcr _ Character cr.\\\\n\\\\tcount _ 1  min: self size..\\\\n\\\\t1 to: self size do:\\\\n\\\\t\\\\t[:i | (self at: i) = cr ifTrue: [count _ count + 1]].\\\\n\\\\t^ count\\\\n\\\\n\\\\\\\"\\\\n'Fred\\\\nthe\\\\nBear' lineCount\\\\n\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 8/27/2002 14:34'!\\\\nlineNumber: anIndex\\\\n\\\\t\\\\\\\"Answer a string containing the characters in the given line number.  5/10/96 sw\\\\\\\"\\\\n\\\\n\\\\t| crString pos finalPos |\\\\n\\\\tcrString _ String with: Character cr.\\\\n\\\\tpos _ 0.\\\\n\\\\t1 to: anIndex - 1 do:\\\\n\\\\t\\\\t[:i | pos _ self findString: crString startingAt: pos + 1.\\\\n\\\\t\\\\t\\\\tpos = 0 ifTrue: [^ nil]].\\\\n\\\\tfinalPos _ self findString: crString startingAt: pos + 1.\\\\n\\\\tfinalPos = 0 ifTrue: [finalPos _ self size + 1].\\\\n\\\\t^ self copyFrom: pos + 1 to: finalPos - 1\\\\n\\\\n\\\\\\\"\\\\n'Fred\\\\nthe\\\\nBear' lineNumber: 3\\\\n\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nlinesDo: aBlock\\\\n\\\\t\\\\\\\"execute aBlock with each line in this string.  The terminating CR's are not included in what is passed to aBlock\\\\\\\"\\\\n\\\\t| start end |\\\\n\\\\tstart _ 1.\\\\n\\\\t[ start <= self size ] whileTrue: [\\\\n\\\\t\\\\tend _ self indexOf: Character cr  startingAt: start  ifAbsent: [ self size + 1 ].\\\\n\\\\t\\\\tend _ end - 1.\\\\n\\\\n\\\\t\\\\taBlock value: (self copyFrom: start  to: end).\\\\n\\\\t\\\\tstart _ end + 2. ].! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 8/28/2002 14:28'!\\\\nskipAnySubStr: delimiters startingAt: start \\\\n\\\\t\\\\\\\"Answer the index of the last character within the receiver, starting at start, that does NOT match one of the delimiters. delimiters is a Array of substrings (Characters also allowed).  If the receiver is all delimiters, answer size + 1.\\\\\\\"\\\\n\\\\n\\\\t| any this ind ii |\\\\n\\\\tii _ start-1.\\\\n\\\\t[(ii _ ii + 1) <= self size] whileTrue: [ \\\\\\\"look for char that does not match\\\\\\\"\\\\n\\\\t\\\\tany _ false.\\\\n\\\\t\\\\tdelimiters do: [:delim |\\\\n\\\\t\\\\t\\\\tdelim isCharacter \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [(self at: ii) == delim ifTrue: [any _ true]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\\\\"a substring\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdelim size > (self size - ii + 1) ifFalse: \\\\\\\"Here's where the one-off error was.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[ind _ 0.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tthis _ true.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdelim do: [:dd | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdd == (self at: ii+ind) ifFalse: [this _ false].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tind _ ind + 1].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tthis ifTrue: [ii _ ii + delim size - 1.  any _ true]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [any _ false] \\\\\\\"if the delim is too big, it can't match\\\\\\\"]].\\\\n\\\\t\\\\tany ifFalse: [^ ii]].\\\\n\\\\t^ self size + 1! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nskipDelimiters: delimiters startingAt: start \\\\n\\\\t\\\\\\\"Answer the index of the character within the receiver, starting at start, that does NOT match one of the delimiters. If the receiver does not contain any of the delimiters, answer size + 1.  Assumes the delimiters to be a non-empty string.\\\\\\\"\\\\n\\\\n\\\\tstart to: self size do: [:i |\\\\n\\\\t\\\\tdelimiters detect: [:delim | delim = (self at: i)]\\\\n\\\\t\\\\t\\\\t\\\\tifNone: [^ i]].\\\\n\\\\t^ self size + 1! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\nstartsWithDigit\\\\n\\\\t\\\\\\\"Answer whether the receiver's first character represents a digit\\\\\\\"\\\\n\\\\n\\\\t^ self size > 0 and: [self first isDigit]! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'md 5/26/2005 13:35'!\\\\nstring\\\\n\\\\t^self! !\\\\n\\\\n!String methodsFor: 'accessing' stamp: 'yo 11/3/2004 19:24'!\\\\ntabDelimitedFieldsDo: aBlock\\\\n\\\\t\\\\\\\"Considering the receiver as a holder of tab-delimited fields, evaluate execute aBlock with each field in this string.  The separatilng tabs are not included in what is passed to aBlock\\\\\\\"\\\\n\\\\n\\\\t| start end |\\\\n\\\\t\\\\\\\"No senders but was useful enough in earlier work that it's retained for the moment.\\\\\\\"\\\\n\\\\tstart _ 1.\\\\n\\\\t[start <= self size] whileTrue: \\\\n\\\\t\\\\t[end _ self indexOf: Character tab startingAt: start ifAbsent: [self size + 1].\\\\n\\\\t\\\\tend _ end - 1.\\\\n\\\\t\\\\taBlock value: (self copyFrom: start  to: end).\\\\n\\\\t\\\\tstart _ end + 2]\\\\n\\\\n\\\\\\\"\\\\n'fred\\\\tcharlie\\\\telmo\\\\t\\\\t2' tabDelimitedFieldsDo: [:aField | Transcript cr; show: aField]\\\\n\\\\\\\"! !\\\\n\\\\n\\\\n!String methodsFor: 'arithmetic' stamp: 'yo 11/3/2004 19:24'!\\\\n* arg\\\\n\\\\n\\\\t^ arg adaptToString: self andSend: #*! !\\\\n\\\\n!String methodsFor: 'arithmetic' stamp: 'yo 11/3/2004 19:24'!\\\\n+ arg\\\\n\\\\n\\\\t^ arg adaptToString: self andSend: #+! !\\\\n\\\\n!String methodsFor: 'arithmetic' stamp: 'yo 11/3/2004 19:24'!\\\\n- arg\\\\n\\\\n\\\\t^ arg adaptToString: self andSend: #-! !\\\\n\\\\n!String methodsFor: 'arithmetic' stamp: 'yo 11/3/2004 19:24'!\\\\n/ arg\\\\n\\\\n\\\\t^ arg adaptToString: self andSend: #/! !\\\\n\\\\n!String methodsFor: 'arithmetic' stamp: 'yo 11/3/2004 19:24'!\\\\n// arg\\\\n\\\\n\\\\t^ arg adaptToString: self andSend: #//! !\\\\n\\\\n!String methodsFor: 'arithmetic' stamp: 'yo 11/3/2004 19:24'!\\\\n\\\\\\\\\\\\\\\\ arg\\\\n\\\\n\\\\t^ arg adaptToString: self andSend: #\\\\\\\\\\\\\\\\! !\\\\n\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'lr 7/7/2006 11:19'!\\\\n< aString \\\\n\\\\t\\\\\\\"Answer whether the receiver sorts before aString.\\\\n\\\\tThe collation order is simple ascii (with case differences).\\\\\\\"\\\\n\\\\n\\\\t^ (self compare: self with: aString collated: AsciiOrder) = 1! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'lr 7/7/2006 11:20'!\\\\n<= aString \\\\n\\\\t\\\\\\\"Answer whether the receiver sorts before or equal to aString.\\\\n\\\\tThe collation order is simple ascii (with case differences).\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ (self compare: self with: aString collated: AsciiOrder) <= 2! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'lr 7/7/2006 11:21'!\\\\n= aString \\\\n\\\\t\\\\\\\"Answer whether the receiver sorts equally as aString.\\\\n\\\\tThe collation order is simple ascii (with case differences).\\\\\\\"\\\\n\\\\t\\\\n\\\\taString isString ifFalse: [ ^ false ].\\\\n\\\\t^ (self compare: self with: aString collated: AsciiOrder) = 2! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'lr 7/7/2006 11:21'!\\\\n> aString \\\\n\\\\t\\\\\\\"Answer whether the receiver sorts after aString.\\\\n\\\\tThe collation order is simple ascii (with case differences).\\\\\\\"\\\\n\\\\n\\\\t^ (self compare: self with: aString collated: AsciiOrder) = 3! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'lr 7/7/2006 11:21'!\\\\n>= aString \\\\n\\\\t\\\\\\\"Answer whether the receiver sorts after or equal to aString.\\\\n\\\\tThe collation order is simple ascii (with case differences).\\\\\\\"\\\\n\\\\n\\\\t^ (self compare: self with: aString collated: AsciiOrder) >= 2! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'yo 11/3/2004 19:24'!\\\\nalike: aString \\\\n\\\\t\\\\\\\"Answer some indication of how alike the receiver is to the argument,  0 is no match, twice aString size is best score.  Case is ignored.\\\\\\\"\\\\n\\\\n\\\\t| i j k minSize bonus |\\\\n\\\\tminSize _ (j _ self size) min: (k _ aString size).\\\\n\\\\tbonus _ (j - k) abs < 2 ifTrue: [ 1 ] ifFalse: [ 0 ].\\\\n\\\\ti _ 1.\\\\n\\\\t[(i <= minSize) and: [((super at: i) bitAnd: 16rDF)  = ((aString at: i) asciiValue bitAnd: 16rDF)]]\\\\n\\\\t\\\\twhileTrue: [ i _ i + 1 ].\\\\n\\\\t[(j > 0) and: [(k > 0) and:\\\\n\\\\t\\\\t[((super at: j) bitAnd: 16rDF) = ((aString at: k) asciiValue bitAnd: 16rDF)]]]\\\\n\\\\t\\\\t\\\\twhileTrue: [ j _ j - 1.  k _ k - 1. ].\\\\n\\\\t^ i - 1 + self size - j + bonus. ! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'yo 11/3/2004 19:24'!\\\\nbeginsWith: prefix\\\\n\\\\t\\\\\\\"Answer whether the receiver begins with the given prefix string.\\\\n\\\\tThe comparison is case-sensitive.\\\\\\\"\\\\n\\\\n\\\\tself size < prefix size ifTrue: [^ false].\\\\n\\\\t^ (self findSubstring: prefix in: self startingAt: 1\\\\n\\\\t\\\\t\\\\tmatchTable: CaseSensitiveOrder) = 1\\\\n! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'ar 4/10/2005 16:39'!\\\\ncaseInsensitiveLessOrEqual: aString \\\\n\\\\t\\\\\\\"Answer whether the receiver sorts before or equal to aString.\\\\n\\\\tThe collation order is case insensitive.\\\\\\\"\\\\n\\\\t^(self compare: aString caseSensitive: false) <= 2! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'ar 4/10/2005 16:39'!\\\\ncaseSensitiveLessOrEqual: aString \\\\n\\\\t\\\\\\\"Answer whether the receiver sorts before or equal to aString.\\\\n\\\\tThe collation order is case sensitive.\\\\\\\"\\\\n\\\\t^(self compare: aString caseSensitive: true) <= 2! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'yo 8/27/2002 14:15'!\\\\ncharactersExactlyMatching: aString\\\\n\\\\t\\\\\\\"Do a character-by-character comparison between the receiver and aString.  Return the index of the final character that matched exactly.\\\\\\\"\\\\n\\\\n\\\\t| count |\\\\n\\\\tcount _ self size min: aString size.\\\\n\\\\t1 to: count do: [:i | \\\\n\\\\t\\\\t(self at: i) = (aString at: i) ifFalse: [\\\\n\\\\t\\\\t\\\\t^ i - 1]].\\\\n\\\\t^ count! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'ar 4/10/2005 16:38'!\\\\ncompare: aString \\\\n\\\\t\\\\\\\"Answer a comparison code telling how the receiver sorts relative to aString:\\\\n\\\\t\\\\t1 - before\\\\n\\\\t\\\\t2 - equal\\\\n\\\\t\\\\t3 - after.\\\\n\\\\tThe collation sequence is ascii with case differences ignored.\\\\n\\\\tTo get the effect of a <= b, but ignoring case, use (a compare: b) <= 2.\\\\\\\"\\\\n\\\\t^self compare: aString caseSensitive: false! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'ar 4/10/2005 16:42'!\\\\ncompare: aString caseSensitive: aBool\\\\n\\\\t\\\\\\\"Answer a comparison code telling how the receiver sorts relative to aString:\\\\n\\\\t\\\\t1 - before\\\\n\\\\t\\\\t2 - equal\\\\n\\\\t\\\\t3 - after.\\\\n\\\\t\\\\\\\"\\\\n\\\\t| map |\\\\n\\\\tmap := aBool ifTrue:[CaseSensitiveOrder] ifFalse:[CaseInsensitiveOrder].\\\\n\\\\t^self compare: self with: aString collated: map! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'yo 12/15/2005 14:28'!\\\\ncompare: string1 with: string2 collated: order\\\\n\\\\n\\\\t(string1 isByteString and: [string2 isByteString]) ifTrue: [\\\\n\\\\t\\\\t^ ByteString compare: string1 with: string2 collated: order\\\\n\\\\t].\\\\n     \\\\\\\"Primitive does not fail properly right now\\\\\\\"\\\\n      ^ String compare: string1 with: string2 collated: order\\\\n\\\\n\\\\\\\"\\\\nself assert: 'abc' = 'abc' asWideString.\\\\nself assert: 'abc' asWideString = 'abc'.\\\\nself assert: ((ByteArray with: 97 with: 0 with: 0 with: 0) asString ~= 'a000' asWideString).\\\\nself assert: ('a000' asWideString ~= (ByteArray with: 97 with: 0 with: 0 with: 0) asString).\\\\n\\\\nself assert: ('abc' sameAs: 'aBc' asWideString).\\\\nself assert: ('aBc' asWideString sameAs: 'abc').\\\\nself assert: ((ByteArray with: 97 with: 0 with: 0 with: 0) asString sameAs: 'Abcd' asWideString) not.\\\\nself assert: ('a000' asWideString sameAs: (ByteArray with: 97 with: 0 with: 0 with: 0) asString) not.\\\\n\\\\n\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'ar 4/10/2005 17:27'!\\\\ncrc16\\\\n\\\\t\\\\\\\"Compute a 16 bit cyclic redundancy check.\\\\\\\"\\\\n\\\\n\\\\t| crc |\\\\n\\\\tcrc := 0.\\\\n\\\\t1 to: self byteSize do: [:i |\\\\n\\\\t\\\\tcrc := (crc bitShift: -8) bitXor: (\\\\n\\\\t\\\\t #(\\\\t16r0000\\\\t16rC0C1\\\\t16rC181\\\\t16r0140\\\\t16rC301\\\\t16r03C0\\\\t16r0280\\\\t16rC241\\\\n\\\\t\\\\t\\\\t16rC601\\\\t16r06C0\\\\t16r0780\\\\t16rC741\\\\t16r0500\\\\t16rC5C1\\\\t16rC481\\\\t16r0440\\\\n\\\\t\\\\t\\\\t16rCC01\\\\t16r0CC0\\\\t16r0D80\\\\t16rCD41\\\\t16r0F00\\\\t16rCFC1\\\\t16rCE81\\\\t16r0E40\\\\n\\\\t\\\\t\\\\t16r0A00\\\\t16rCAC1\\\\t16rCB81\\\\t16r0B40\\\\t16rC901\\\\t16r09C0\\\\t16r0880\\\\t16rC841\\\\n\\\\t\\\\t\\\\t16rD801\\\\t16r18C0\\\\t16r1980\\\\t16rD941\\\\t16r1B00\\\\t16rDBC1\\\\t16rDA81\\\\t16r1A40\\\\n\\\\t\\\\t\\\\t16r1E00\\\\t16rDEC1\\\\t16rDF81\\\\t16r1F40\\\\t16rDD01\\\\t16r1DC0\\\\t16r1C80\\\\t16rDC41\\\\n\\\\t\\\\t\\\\t16r1400\\\\t16rD4C1\\\\t16rD581\\\\t16r1540\\\\t16rD701\\\\t16r17C0\\\\t16r1680\\\\t16rD641\\\\n\\\\t\\\\t\\\\t16rD201\\\\t16r12C0\\\\t16r1380\\\\t16rD341\\\\t16r1100\\\\t16rD1C1\\\\t16rD081\\\\t16r1040\\\\n\\\\t\\\\t\\\\t16rF001\\\\t16r30C0\\\\t16r3180\\\\t16rF141\\\\t16r3300\\\\t16rF3C1\\\\t16rF281\\\\t16r3240\\\\n\\\\t\\\\t\\\\t16r3600\\\\t16rF6C1\\\\t16rF781\\\\t16r3740\\\\t16rF501\\\\t16r35C0\\\\t16r3480\\\\t16rF441\\\\n\\\\t\\\\t\\\\t16r3C00\\\\t16rFCC1\\\\t16rFD81\\\\t16r3D40\\\\t16rFF01\\\\t16r3FC0\\\\t16r3E80\\\\t16rFE41\\\\n\\\\t\\\\t\\\\t16rFA01\\\\t16r3AC0\\\\t16r3B80\\\\t16rFB41\\\\t16r3900\\\\t16rF9C1\\\\t16rF881\\\\t16r3840\\\\n\\\\t\\\\t\\\\t16r2800\\\\t16rE8C1\\\\t16rE981\\\\t16r2940\\\\t16rEB01\\\\t16r2BC0\\\\t16r2A80\\\\t16rEA41\\\\n\\\\t\\\\t\\\\t16rEE01\\\\t16r2EC0\\\\t16r2F80\\\\t16rEF41\\\\t16r2D00\\\\t16rEDC1\\\\t16rEC81\\\\t16r2C40\\\\n\\\\t\\\\t\\\\t16rE401\\\\t16r24C0\\\\t16r2580\\\\t16rE541\\\\t16r2700\\\\t16rE7C1\\\\t16rE681\\\\t16r2640\\\\n\\\\t\\\\t\\\\t16r2200\\\\t16rE2C1\\\\t16rE381\\\\t16r2340\\\\t16rE101\\\\t16r21C0\\\\t16r2080\\\\t16rE041\\\\n\\\\t\\\\t\\\\t16rA001\\\\t16r60C0\\\\t16r6180\\\\t16rA141\\\\t16r6300\\\\t16rA3C1\\\\t16rA281\\\\t16r6240\\\\n\\\\t\\\\t\\\\t16r6600\\\\t16rA6C1\\\\t16rA781\\\\t16r6740\\\\t16rA501\\\\t16r65C0\\\\t16r6480\\\\t16rA441\\\\n\\\\t\\\\t\\\\t16r6C00\\\\t16rACC1\\\\t16rAD81\\\\t16r6D40\\\\t16rAF01\\\\t16r6FC0\\\\t16r6E80\\\\t16rAE41\\\\n\\\\t\\\\t\\\\t16rAA01\\\\t16r6AC0\\\\t16r6B80\\\\t16rAB41\\\\t16r6900\\\\t16rA9C1\\\\t16rA881\\\\t16r6840\\\\n\\\\t\\\\t\\\\t16r7800\\\\t16rB8C1\\\\t16rB981\\\\t16r7940\\\\t16rBB01\\\\t16r7BC0\\\\t16r7A80\\\\t16rBA41\\\\n\\\\t\\\\t\\\\t16rBE01\\\\t16r7EC0\\\\t16r7F80\\\\t16rBF41\\\\t16r7D00\\\\t16rBDC1\\\\t16rBC81\\\\t16r7C40\\\\n\\\\t\\\\t\\\\t16rB401\\\\t16r74C0\\\\t16r7580\\\\t16rB541\\\\t16r7700\\\\t16rB7C1\\\\t16rB681\\\\t16r7640\\\\n\\\\t\\\\t\\\\t16r7200\\\\t16rB2C1\\\\t16rB381\\\\t16r7340\\\\t16rB101\\\\t16r71C0\\\\t16r7080\\\\t16rB041\\\\n\\\\t\\\\t\\\\t16r5000\\\\t16r90C1\\\\t16r9181\\\\t16r5140\\\\t16r9301\\\\t16r53C0\\\\t16r5280\\\\t16r9241\\\\n\\\\t\\\\t\\\\t16r9601\\\\t16r56C0\\\\t16r5780\\\\t16r9741\\\\t16r5500\\\\t16r95C1\\\\t16r9481\\\\t16r5440\\\\n\\\\t\\\\t\\\\t16r9C01\\\\t16r5CC0\\\\t16r5D80\\\\t16r9D41\\\\t16r5F00\\\\t16r9FC1\\\\t16r9E81\\\\t16r5E40\\\\n\\\\t\\\\t\\\\t16r5A00\\\\t16r9AC1\\\\t16r9B81\\\\t16r5B40\\\\t16r9901\\\\t16r59C0\\\\t16r5880\\\\t16r9841\\\\n\\\\t\\\\t\\\\t16r8801\\\\t16r48C0\\\\t16r4980\\\\t16r8941\\\\t16r4B00\\\\t16r8BC1\\\\t16r8A81\\\\t16r4A40\\\\n\\\\t\\\\t\\\\t16r4E00\\\\t16r8EC1\\\\t16r8F81\\\\t16r4F40\\\\t16r8D01\\\\t16r4DC0\\\\t16r4C80\\\\t16r8C41\\\\n\\\\t\\\\t\\\\t16r4400\\\\t16r84C1\\\\t16r8581\\\\t16r4540\\\\t16r8701\\\\t16r47C0\\\\t16r4680\\\\t16r8641\\\\n\\\\t\\\\t\\\\t16r8201\\\\t16r42C0\\\\t16r4380\\\\t16r8341\\\\t16r4100\\\\t16r81C1\\\\t16r8081\\\\t16r4040)\\\\n\\\\t\\\\t\\\\t at: ((crc bitXor: (self byteAt: i)) bitAnd: 16rFF) + 1) ].\\\\n\\\\t^crc! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'yo 11/3/2004 19:24'!\\\\nendsWith: suffix\\\\n\\\\t\\\\\\\"Answer whether the tail end of the receiver is the same as suffix.\\\\n\\\\tThe comparison is case-sensitive.\\\\\\\"\\\\n\\\\t| extra |\\\\n\\\\t(extra _ self size - suffix size) < 0 ifTrue: [^ false].\\\\n\\\\t^ (self findSubstring: suffix in: self startingAt: extra + 1\\\\n\\\\t\\\\t\\\\tmatchTable: CaseSensitiveOrder) > 0\\\\n\\\\\\\"\\\\n  'Elvis' endsWith: 'vis'\\\\n\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'yo 11/3/2004 19:24'!\\\\nendsWithAnyOf: aCollection\\\\n\\\\taCollection do:[:suffix|\\\\n\\\\t\\\\t(self endsWith: suffix) ifTrue:[^true].\\\\n\\\\t].\\\\n\\\\t^false! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'md 2/16/2006 17:49'!\\\\nhash\\\\n\\\\t\\\\\\\"#hash is implemented, because #= is implemented\\\\\\\"\\\\n\\\\t\\\\\\\"ar 4/10/2005: I had to change this to use ByteString hash as initial \\\\n\\\\thash in order to avoid having to rehash everything and yet compute\\\\n\\\\tthe same hash for ByteString and WideString.\\\\n\\\\tmd 16/10/2006: use identityHash as initialHash, as behavior hash will \\\\n    use String hash (name) to have a better hash soon\\\\\\\"\\\\n\\\\t^ self class stringHash: self initialHash: ByteString identityHash! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'yo 11/3/2004 19:24'!\\\\nhashMappedBy: map\\\\n\\\\t\\\\\\\"My hash is independent of my oop.\\\\\\\"\\\\n\\\\n\\\\t^self hash! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'yo 11/3/2004 19:24'!\\\\nhowManyMatch: string \\\\n\\\\t\\\\\\\"Count the number of characters that match up in self and aString.\\\\\\\"\\\\n\\\\t| count shorterLength |\\\\n\\\\t\\\\n\\\\tcount  _  0 .\\\\n\\\\tshorterLength  _  ((self size ) min: (string size ) ) .\\\\n\\\\t(1 to: shorterLength  do: [:index |\\\\n\\\\t\\\\t (((self at: index ) = (string at: index )  ) ifTrue: [count  _  (count + 1 ) .\\\\n\\\\t\\\\t\\\\t]   ).\\\\n\\\\t\\\\t]   ).\\\\n\\\\t^  count \\\\n\\\\t\\\\n\\\\t! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'yo 11/3/2004 19:24'!\\\\nmatch: text\\\\n\\\\t\\\\\\\"Answer whether text matches the pattern in this string.\\\\n\\\\tMatching ignores upper/lower case differences.\\\\n\\\\tWhere this string contains #, text may contain any character.\\\\n\\\\tWhere this string contains *, text may contain any sequence of characters.\\\\\\\"\\\\n\\\\n\\\\t^ self startingAt: 1 match: text startingAt: 1\\\\n\\\\\\\"\\\\n\\\\t'*'\\\\t\\\\t\\\\tmatch: 'zort' true\\\\n\\\\t'*baz'\\\\t\\\\tmatch: 'mobaz' true\\\\n\\\\t'*baz'\\\\t\\\\tmatch: 'mobazo' false\\\\n\\\\t'*baz*'\\\\t\\\\tmatch: 'mobazo' true\\\\n\\\\t'*baz*'\\\\t\\\\tmatch: 'mozo' false\\\\n\\\\t'foo*'\\\\t\\\\tmatch: 'foozo' true\\\\n\\\\t'foo*'\\\\t\\\\tmatch: 'bozo' false\\\\n\\\\t'foo*baz'\\\\tmatch: 'foo23baz' true\\\\n\\\\t'foo*baz'\\\\tmatch: 'foobaz' true\\\\n\\\\t'foo*baz'\\\\tmatch: 'foo23bazo' false\\\\n\\\\t'foo'\\\\t\\\\tmatch: 'Foo' true\\\\n\\\\t'foo*baz*zort' match: 'foobazort' false\\\\n\\\\t'foo*baz*zort' match: 'foobazzort' false\\\\n\\\\t'*foo#zort'\\\\tmatch: 'afoo3zortthenfoo3zort' true\\\\n\\\\t'*foo*zort'\\\\tmatch: 'afoodezortorfoo3zort' true\\\\n\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'ar 4/10/2005 17:35'!\\\\nsameAs: aString \\\\n\\\\t\\\\\\\"Answer whether the receiver sorts equal to aString. The \\\\n\\\\tcollation sequence is ascii with case differences ignored.\\\\\\\"\\\\n\\\\t^(self compare: aString caseSensitive: false) = 2! !\\\\n\\\\n!String methodsFor: 'comparing' stamp: 'yo 11/3/2004 19:24'!\\\\nstartingAt: keyStart match: text startingAt: textStart\\\\n\\\\t\\\\\\\"Answer whether text matches the pattern in this string.\\\\n\\\\tMatching ignores upper/lower case differences.\\\\n\\\\tWhere this string contains #, text may contain any character.\\\\n\\\\tWhere this string contains *, text may contain any sequence of characters.\\\\\\\"\\\\n\\\\t| anyMatch matchStart matchEnd i matchStr j ii jj |\\\\n\\\\ti _ keyStart.\\\\n\\\\tj _ textStart.\\\\n\\\\n\\\\t\\\\\\\"Check for any #'s\\\\\\\"\\\\n\\\\t[i > self size ifTrue: [^ j > text size \\\\\\\"Empty key matches only empty string\\\\\\\"].\\\\n\\\\t(self at: i) = $#] whileTrue:\\\\n\\\\t\\\\t[\\\\\\\"# consumes one char of key and one char of text\\\\\\\"\\\\n\\\\t\\\\tj > text size ifTrue: [^ false \\\\\\\"no more text\\\\\\\"].\\\\n\\\\t\\\\ti _ i+1.  j _ j+1].\\\\n\\\\n\\\\t\\\\\\\"Then check for *\\\\\\\"\\\\n\\\\t(self at: i) = $*\\\\n\\\\t\\\\tifTrue: [i = self size ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[^ true \\\\\\\"Terminal * matches all\\\\\\\"].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"* means next match string can occur anywhere\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tanyMatch _ true.\\\\n\\\\t\\\\t\\\\t\\\\tmatchStart _ i + 1]\\\\n\\\\t\\\\tifFalse: [\\\\\\\"Otherwise match string must occur immediately\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tanyMatch _ false.\\\\n\\\\t\\\\t\\\\t\\\\tmatchStart _ i].\\\\n\\\\n\\\\t\\\\\\\"Now determine the match string\\\\\\\"\\\\n\\\\tmatchEnd _ self size.\\\\n\\\\t(ii _ self indexOf: $* startingAt: matchStart) > 0 ifTrue:\\\\n\\\\t\\\\t[ii = 1 ifTrue: [self error: '** not valid -- use * instead'].\\\\n\\\\t\\\\tmatchEnd _ ii-1].\\\\n\\\\t(ii _ self indexOf: $# startingAt: matchStart) > 0 ifTrue:\\\\n\\\\t\\\\t[ii = 1 ifTrue: [self error: '*# not valid -- use #* instead'].\\\\n\\\\t\\\\tmatchEnd _ matchEnd min: ii-1].\\\\n\\\\tmatchStr _ self copyFrom: matchStart to: matchEnd.\\\\n\\\\n\\\\t\\\\\\\"Now look for the match string\\\\\\\"\\\\n\\\\t[jj _ text findString: matchStr startingAt: j caseSensitive: false.\\\\n\\\\tanyMatch ifTrue: [jj > 0] ifFalse: [jj = j]]\\\\n\\\\t\\\\twhileTrue:\\\\n\\\\t\\\\t[\\\\\\\"Found matchStr at jj.  See if the rest matches...\\\\\\\"\\\\n\\\\t\\\\t(self startingAt: matchEnd+1 match: text startingAt: jj + matchStr size) ifTrue:\\\\n\\\\t\\\\t\\\\t[^ true \\\\\\\"the rest matches -- success\\\\\\\"].\\\\n\\\\t\\\\t\\\\\\\"The rest did not match.\\\\\\\"\\\\n\\\\t\\\\tanyMatch ifFalse: [^ false].\\\\n\\\\t\\\\t\\\\\\\"Preceded by * -- try for a later match\\\\\\\"\\\\n\\\\t\\\\tj _ j+1].\\\\n\\\\t^ false \\\\\\\"Failed to find the match string\\\\\\\"! !\\\\n\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nadaptToCollection: rcvr andSend: selector\\\\n\\\\t\\\\\\\"If I am involved in arithmetic with a collection, convert me to a number.\\\\\\\"\\\\n\\\\n\\\\t^ rcvr perform: selector with: self asNumber! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nadaptToNumber: rcvr andSend: selector\\\\n\\\\t\\\\\\\"If I am involved in arithmetic with a number, convert me to a number.\\\\\\\"\\\\n\\\\n\\\\t^ rcvr perform: selector with: self asNumber! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nadaptToPoint: rcvr andSend: selector\\\\n\\\\t\\\\\\\"If I am involved in arithmetic with a point, convert me to a number.\\\\\\\"\\\\n\\\\n\\\\t^ rcvr perform: selector with: self asNumber! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nadaptToString: rcvr andSend: selector\\\\n\\\\t\\\\\\\"If I am involved in arithmetic with a string, convert us both to\\\\n\\\\tnumbers, and return the printString of the result.\\\\\\\"\\\\n\\\\n\\\\t^ (rcvr asNumber perform: selector with: self asNumber) printString! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'mw 1/30/2004 11:53'!\\\\nasAlphaNumeric: totalSize extraChars: additionallyAllowed mergeUID: minimalSizeOfRandomPart\\\\n\\\\t\\\\\\\"Generates a String with unique identifier ( UID ) qualities, the difference to a\\\\n\\\\t UUID is that its beginning is derived from the receiver, so that it has a meaning\\\\n\\\\t for a human reader.\\\\n\\\\n\\\\t Answers a String of totalSize, which consists of 3 parts\\\\n\\\\t 1.part: the beginning of the receiver only consisting of\\\\n\\\\t\\\\ta-z, A-Z, 0-9 and extraChars in Collection additionallyAllowed ( which can be nil )\\\\n\\\\t 2.part: a single _\\\\n\\\\t 3.part: a ( random ) UID of size >= minimalSizeOfRandomPart consisting of\\\\n\\\\t\\\\ta-z, A-Z, 0-9\\\\n\\\\n\\\\t Starting letters are capitalized. \\\\n\\\\t TotalSize must be at least 1.\\\\n\\\\t Exactly 1 occurrence of $_ is guaranteed ( unless additionallyAllowed includes $_ ).\\\\n\\\\t The random part has even for small sizes good UID qualitites for many practical purposes.\\\\n\\\\t If only lower- or uppercase letters are demanded, simply convert the answer with\\\\n\\\\t say #asLowercase. The probability of a duplicate will rise only moderately ( see below ).\\\\n\\\\n\\\\t Example: \\\\n\\\\t\\\\tsize of random part = 10\\\\n\\\\t\\\\tin n generated UIDs the chance p of having non-unique UIDs is\\\\n\\\\t\\\\t\\\\tn = 10000 ->  p < 1e-10\\\\t\\\\tif answer is reduced to lowerCase: p < 1.4 e-8\\\\n\\\\t\\\\t\\\\tn = 100000 -> p < 1e-8\\\\n\\\\t\\\\tat the bottom is a snippet for your own calculations  \\\\n\\\\t\\\\tNote: the calculated propabilites are theoretical,\\\\n\\\\t\\\\t\\\\tfor the actually used random generator they may be much worse\\\\\\\"\\\\n\\\\n\\\\t| stream out sizeOfFirstPart index ascii ch skip array random |\\\\n\\\\ttotalSize > minimalSizeOfRandomPart \\\\n\\\\t\\\\tifFalse: [ self errorOutOfBounds ].\\\\n\\\\tstream := ReadStream on: self.\\\\n\\\\tout := WriteStream on: ( String new: totalSize ).\\\\n\\\\tindex := 0.\\\\n\\\\tskip := true.\\\\n\\\\tsizeOfFirstPart := totalSize - minimalSizeOfRandomPart - 1.\\\\n\\\\t[ stream atEnd or: [ index >= sizeOfFirstPart ]]\\\\n\\\\twhileFalse: [\\\\n\\\\t\\\\t((( ascii := ( ch := stream next ) asciiValue ) >= 65 and: [ ascii <= 90 ]) or: [\\\\n\\\\t\\\\t\\\\t( ascii >= 97 and: [ ascii <= 122 ]) or: [\\\\t\\\\t\\\\t \\\\n\\\\t\\\\t\\\\tch isDigit or: [\\\\n\\\\t\\\\t\\\\tadditionallyAllowed notNil and: [ additionallyAllowed includes: ch ]]]])\\\\n\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\tskip\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [ out nextPut: ch asUppercase ]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [ out nextPut: ch ].\\\\n\\\\t\\\\t\\\\tindex := index + 1.\\\\n\\\\t\\\\t\\\\tskip := false ]\\\\n\\\\t\\\\tifFalse: [ skip := true ]].\\\\n\\\\tout nextPut: $_.\\\\n\\\\tarray := Array new: 62.\\\\n\\\\t1 to: 26 do: [ :i |\\\\n\\\\t\\\\tarray at: i put: ( i + 64 ) asCharacter.\\\\n\\\\t\\\\tarray at: i + 26 put: ( i + 96 ) asCharacter ].\\\\n\\\\t53 to: 62 do: [ :i |\\\\n\\\\t\\\\tarray at: i put: ( i - 5 ) asCharacter ].\\\\n\\\\trandom := UUIDGenerator default randomGenerator. \\\\n\\\\ttotalSize - index - 1 timesRepeat: [\\\\n\\\\t\\\\tout nextPut: ( array atRandom: random )].\\\\n\\\\t^out contents\\\\n\\\\n\\\\t\\\\\\\"\\\\tcalculation of probability p for failure of uniqueness in n UIDs\\\\n\\\\t\\\\tNote: if answer will be converted to upper or lower case replace 62 with 36\\\\n\\\\t| n i p all |\\\\n\\\\tall := 62 raisedTo: sizeOfRandomPart.\\\\n\\\\ti := 1.\\\\n\\\\tp := 0.0 .\\\\n\\\\tn := 10000.\\\\n\\\\t[ i <= n ]\\\\n\\\\twhileTrue: [\\\\n\\\\t\\\\tp := p + (( i - 1 ) / all ).\\\\n\\\\t\\\\ti := i + 1 ].\\\\n\\\\tp   \\\\n\\\\n\\\\tapproximation formula: n squared / ( 62.0 raisedTo: sizeOfRandomPart ) / 2 \\\\n\\\\t\\\\\\\" \\\\n\\\\n\\\\t\\\\\\\"'Crop SketchMorphs and Grab Screen Rect to JPG' \\\\n\\\\t\\\\t\\\\tasAlphaNumeric: 31 extraChars: nil mergeUID: 10  \\\\n\\\\t \\\\t\\\\t\\\\t'CropSketchMorphsAndG_iOw94jquN6'\\\\n\\\\t 'Monticello' \\\\n\\\\t\\\\t\\\\tasAlphaNumeric: 31 extraChars: nil mergeUID: 10    \\\\n\\\\t\\\\t\\\\t\\\\t'Monticello_kp6aV2l0IZK9uBULGOeG' \\\\n\\\\t 'version-', ( '1.1.2' replaceAll: $. with: $- )\\\\n\\\\t\\\\t\\\\tasAlphaNumeric: 31 extraChars: #( $- ) mergeUID: 10    \\\\n\\\\t\\\\t\\\\t\\\\t'Version-1-1-2_kuz2tMg2xX9iRLDVR'\\\\\\\"\\\\n\\\\t\\\\t! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'ar 4/10/2005 17:18'!\\\\nasByteArray\\\\n\\\\t\\\\\\\"Convert to a ByteArray with the ascii values of the string.\\\\\\\"\\\\n\\\\t| b |\\\\n\\\\tb _ ByteArray new: self byteSize.\\\\n\\\\t1 to: self size * 4 do: [:i |\\\\n\\\\t\\\\tb at: i put: (self byteAt: i).\\\\n\\\\t].\\\\n\\\\t^ b.\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'ar 4/10/2005 16:22'!\\\\nasByteString\\\\n\\\\t\\\\\\\"Convert the receiver into a ByteString\\\\\\\"\\\\n\\\\t^self asOctetString! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'ar 4/10/2005 17:03'!\\\\nasCharacter\\\\n\\\\t\\\\\\\"Answer the receiver's first character, or '*' if none.  Idiosyncratic, provisional.\\\\\\\"\\\\n\\\\n\\\\t^ self size > 0 ifTrue: [self first] ifFalse:[$\\\\U00b7]! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasDate\\\\n\\\\t\\\\\\\"Many allowed forms, see Date>>#readFrom:\\\\\\\"\\\\n\\\\n\\\\t^ Date fromString: self! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasDateAndTime\\\\n\\\\n\\\\n\\\\n\\\\t\\\\\\\"Convert from UTC format\\\\\\\" \\\\t^ DateAndTime fromString: self! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 10/22/2002 17:38'!\\\\nasDefaultDecodedString\\\\n\\\\n\\\\t^ self\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasDisplayText\\\\n\\\\t\\\\\\\"Answer a DisplayText whose text string is the receiver.\\\\\\\"\\\\n\\\\n\\\\t^DisplayText text: self asText! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasDuration\\\\n\\\\n\\\\t\\\\\\\"convert from [nnnd]hh:mm:ss[.nanos] format. [] implies optional elements\\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\t^ Duration fromString: self\\\\n\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'ar 4/12/2005 13:55'!\\\\nasFileName\\\\n\\\\t\\\\\\\"Answer a String made up from the receiver that is an acceptable file \\\\n\\\\tname.\\\\\\\"\\\\n\\\\n\\\\t| string checkedString |\\\\n\\\\tstring _ FileDirectory checkName: self fixErrors: true.\\\\n\\\\tcheckedString _ (FilePath pathName: string) asVmPathName.\\\\n\\\\t^ (FilePath pathName: checkedString isEncoded: true) asSqueakPathName.\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 8/27/2002 14:38'!\\\\nasFourCode\\\\n\\\\n\\\\t| result |\\\\n\\\\tself size = 4 ifFalse: [^self error: 'must be exactly four characters'].\\\\n\\\\tresult _ self inject: 0 into: [:val :each | 256 * val + each asciiValue].\\\\n\\\\t(result bitAnd: 16r80000000) = 0 \\\\n\\\\t\\\\tifFalse: [self error: 'cannot resolve fourcode'].\\\\n\\\\t(result bitAnd: 16r40000000) = 0 ifFalse: [^result - 16r80000000].\\\\n\\\\t^ result\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 8/26/2002 23:06'!\\\\nasHex\\\\n\\\\t| stream |\\\\n\\\\tstream _ WriteStream on: (String new: self size * 4).\\\\n\\\\tself do: [ :ch | stream nextPutAll: ch hex ].\\\\n\\\\t^stream contents! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasHtml\\\\n\\\\t\\\\\\\"Do the basic character conversion for HTML.  Leave all original return \\\\n\\\\tand tabs in place, so can conver back by simply removing bracked \\\\n\\\\tthings. 4/4/96 tk\\\\\\\"\\\\n\\\\t| temp |\\\\n\\\\ttemp _ self copyReplaceAll: '&' with: '&amp;'.\\\\n\\\\tHtmlEntities keysAndValuesDo:\\\\n\\\\t\\\\t[:entity :char |\\\\n\\\\t\\\\tchar = $& ifFalse:\\\\n\\\\t\\\\t\\\\t[temp _ temp copyReplaceAll: char asString with: '&' , entity , ';']].\\\\n\\\\ttemp _ temp copyReplaceAll: '\\\\t' with: '\\\\t<IMG SRC=\\\\\\\"tab.gif\\\\\\\" ALT=\\\\\\\"    \\\\\\\">'.\\\\n\\\\ttemp _ temp copyReplaceAll: '\\\\n' with: '\\\\n<BR>'.\\\\n\\\\t^ temp\\\\n\\\\n\\\\\\\"\\\\n\\\\t'A<&>B' asHtml\\\\n\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasIRCLowercase\\\\n\\\\t\\\\\\\"Answer a String made up from the receiver whose characters are all \\\\n\\\\tlowercase, where 'lowercase' is by IRC's definition\\\\\\\"\\\\n\\\\n\\\\t^self collect: [ :c | c asIRCLowercase ]! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasIdentifier: shouldBeCapitalized\\\\n\\\\t\\\\\\\"Return a legal identifier, with first character in upper case if shouldBeCapitalized is true, else lower case.  This will always return a legal identifier, even for an empty string\\\\\\\"\\\\n\\\\n\\\\t| aString firstChar firstLetterPosition |\\\\n\\\\taString _ self select: [:el | el isAlphaNumeric].\\\\n\\\\tfirstLetterPosition _ aString findFirst: [:ch | ch isLetter].\\\\n\\\\taString _ firstLetterPosition == 0\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[aString copyFrom: firstLetterPosition to: aString size]\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t['a', aString].\\\\n\\\\tfirstChar _ shouldBeCapitalized ifTrue: [aString first asUppercase] ifFalse: [aString first asLowercase].\\\\n\\\\n\\\\t^ firstChar asString, (aString copyFrom: 2 to: aString size)\\\\n\\\\\\\"\\\\n'234Fred987' asIdentifier: false\\\\n'235Fred987' asIdentifier: true\\\\n'' asIdentifier: true\\\\n'()87234' asIdentifier: false\\\\n'())z>=PPve889  U >' asIdentifier: false\\\\n\\\\n\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'laza 10/1/2004 09:55'!\\\\nasInteger \\\\n\\\\t^self asSignedInteger\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasLegalSelector\\\\n\\\\t| toUse |\\\\n\\\\ttoUse _ ''.\\\\n\\\\tself do:\\\\n\\\\t\\\\t[:char | char isAlphaNumeric ifTrue: [toUse _ toUse copyWith: char]].\\\\n\\\\t(self size == 0 or: [self first isLetter not])\\\\n\\\\t\\\\tifTrue:\\\\t\\\\t[toUse _ 'v', toUse].\\\\n\\\\n\\\\t^ toUse withFirstCharacterDownshifted\\\\n\\\\n\\\\\\\"'234znak 43 ) 2' asLegalSelector\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasLowercase\\\\n\\\\t\\\\\\\"Answer a String made up from the receiver whose characters are all \\\\n\\\\tlowercase.\\\\\\\"\\\\n\\\\n\\\\t^ self copy asString translateToLowercase! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasNumber \\\\n\\\\t\\\\\\\"Answer the Number created by interpreting the receiver as the string \\\\n\\\\trepresentation of a number.\\\\\\\"\\\\n\\\\n\\\\t^Number readFromString: self! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'ar 4/10/2005 20:55'!\\\\nasOctetString\\\\n\\\\t\\\\\\\"Convert the receiver into an octet string\\\\\\\"\\\\n\\\\t| string |\\\\n\\\\tstring _ String new: self size.\\\\n\\\\t1 to: self size do: [:i | string at: i put: (self at: i)].\\\\n\\\\t^string! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 8/27/2002 14:39'!\\\\nasPacked\\\\n\\\\t\\\\\\\"Convert to a longinteger that describes the string\\\\\\\"\\\\n\\\\n\\\\t^ self inject: 0 into: [ :pack :next | pack _ pack * 256 + next asInteger ].! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasParagraph\\\\n\\\\t\\\\\\\"Answer a Paragraph whose text string is the receiver.\\\\\\\"\\\\n\\\\n\\\\t^Paragraph withText: self asText! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'dew 9/13/2001 01:17'!\\\\nasPluralBasedOn: aNumberOrCollection\\\\n\\\\t\\\\\\\"Append an 's' to this string based on whether aNumberOrCollection is 1 or of size 1.\\\\\\\"\\\\n\\\\n\\\\t^ (aNumberOrCollection = 1 or:\\\\n\\\\t\\\\t[aNumberOrCollection isCollection and: [aNumberOrCollection size = 1]])\\\\n\\\\t\\\\t\\\\tifTrue: [self]\\\\n\\\\t\\\\t\\\\tifFalse: [self, 's']\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'laza 10/1/2004 09:54'!\\\\nasSignedInteger \\\\n\\\\t\\\\\\\"Returns the first signed integer it can find or nil.\\\\\\\"\\\\n\\\\n\\\\t| start stream |\\\\n\\\\tstart := self findFirst: [:char | char isDigit].\\\\n\\\\tstart isZero ifTrue: [^nil].\\\\n\\\\tstream := (ReadStream on: self) position: start.\\\\n\\\\tstream back = $- ifTrue: [stream back].\\\\n\\\\t^Integer readFrom: stream! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasSmalltalkComment\\\\n\\\\t\\\\\\\"return this string, munged so that it can be treated as a comment in Smalltalk code.  Quote marks are added to the beginning and end of the string, and whenever a solitary quote mark appears within the string, it is doubled\\\\\\\"\\\\n\\\\n\\\\t^String streamContents:  [ :str |\\\\n\\\\t\\\\t| quoteCount first |\\\\n\\\\n\\\\t\\\\tstr nextPut: $\\\\\\\".\\\\n\\\\t\\\\n\\\\t\\\\tquoteCount := 0.\\\\n\\\\t\\\\tfirst := true.\\\\n\\\\t\\\\tself do: [ :char |\\\\n\\\\t\\\\t\\\\tchar = $\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tfirst ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstr nextPut: char.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tquoteCount := quoteCount + 1 ] ]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tquoteCount odd ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"add a quote to even the number of quotes in a row\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstr nextPut: $\\\\\\\" ].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tquoteCount := 0.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstr nextPut: char ].\\\\n\\\\t\\\\t\\\\tfirst := false ]. \\\\n\\\\n\\\\t\\\\tquoteCount odd ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\\\\"check at the end\\\\\\\"\\\\n\\\\t\\\\t\\\\tstr nextPut: $\\\\\\\". ].\\\\n\\\\n\\\\t\\\\tstr nextPut: $\\\\\\\".\\\\n\\\\t].\\\\n\\\\t! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 12/19/2003 21:16'!\\\\nasSqueakPathName\\\\n\\\\n\\\\t^ self.\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasString\\\\n\\\\t\\\\\\\"Answer this string.\\\\\\\"\\\\n\\\\n\\\\t^ self\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasStringOrText\\\\n\\\\t\\\\\\\"Answer this string.\\\\\\\"\\\\n\\\\n\\\\t^ self\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'ar 4/10/2005 19:24'!\\\\nasSymbol\\\\n\\\\t\\\\\\\"Answer the unique Symbol whose characters are the characters of the \\\\n\\\\tstring.\\\\\\\"\\\\n\\\\t^Symbol intern: self! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasText\\\\n\\\\t\\\\\\\"Answer a Text whose string is the receiver.\\\\\\\"\\\\n\\\\n\\\\t^Text fromString: self! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasTime\\\\n\\\\t\\\\\\\"Many allowed forms, see Time>>readFrom:\\\\\\\"\\\\n\\\\n\\\\t^ Time fromString: self.! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasTimeStamp\\\\n\\\\t\\\\\\\"Convert from obsolete TimeStamp format\\\\\\\"\\\\n\\\\n\\\\n\\\\t^ TimeStamp fromString: self! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'ar 4/10/2005 17:05'!\\\\nasUnHtml\\\\n\\\\t\\\\\\\"Strip out all Html stuff (commands in angle brackets <>) and convert\\\\nthe characters &<> back to their real value.  Leave actual cr and tab as\\\\nthey were in text.\\\\\\\"\\\\n\\\\t| in out char rest did |\\\\n\\\\tin _ ReadStream on: self.\\\\n\\\\tout _ WriteStream on: (String new: self size).\\\\n\\\\t[in atEnd] whileFalse:\\\\n\\\\t\\\\t[in peek = $<\\\\n\\\\t\\\\t\\\\tifTrue: [in unCommand] \\\\t\\\\\\\"Absorb <...><...>\\\\\\\"\\\\n\\\\t\\\\t\\\\tifFalse: [(char _ in next) = $&\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [rest _ in upTo: $;.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdid _ out position.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trest = 'lt' ifTrue: [out nextPut: $<].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trest = 'gt' ifTrue: [out nextPut: $>].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trest = 'amp' ifTrue: [out nextPut: $&].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trest = 'deg' ifTrue: [out nextPut: $\\\\U00b0].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\trest = 'quot' ifTrue: [out nextPut: $\\\\\\\"].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdid = out position ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself error: 'unknown encoded HTML char'.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Please add it to this method\\\\\\\"]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [out nextPut: char]].\\\\n\\\\t\\\\t].\\\\n\\\\t^ out contents! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'laza 10/1/2004 10:02'!\\\\nasUnsignedInteger \\\\n\\\\t\\\\\\\"Returns the first integer it can find or nil.\\\\\\\"\\\\n\\\\n\\\\t| start stream |\\\\n\\\\tstart := self findFirst: [:char | char isDigit].\\\\n\\\\tstart isZero ifTrue: [^nil].\\\\n\\\\tstream := (ReadStream on: self) position: start - 1.\\\\n\\\\t^Integer readFrom: stream! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasUppercase\\\\n\\\\t\\\\\\\"Answer a String made up from the receiver whose characters are all \\\\n\\\\tuppercase.\\\\\\\"\\\\n\\\\n\\\\t^self copy asString translateToUppercase! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasUrl\\\\n\\\\t\\\\\\\"convert to a Url\\\\\\\"\\\\n\\\\t\\\\\\\"'http://www.cc.gatech.edu/' asUrl\\\\\\\"\\\\n\\\\t\\\\\\\"msw://chaos.resnet.gatech.edu:9000/' asUrl\\\\\\\"\\\\n\\\\t^Url absoluteFromText: self! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nasUrlRelativeTo: aUrl\\\\n\\\\t^aUrl newFromRelativeText: self! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 2/24/2005 18:33'!\\\\nasVmPathName\\\\n\\\\n\\\\t^ (FilePath pathName: self) asVmPathName.\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\naskIfAddStyle: priorMethod req: requestor\\\\n\\\\t^ self   \\\\\\\"we are a string with no text style\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'ar 4/12/2005 17:36'!\\\\nasWideString \\\\n\\\\tself isWideString\\\\n\\\\t\\\\tifTrue:[^self]\\\\n\\\\t\\\\tifFalse:[^WideString from: self]! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\ncapitalized\\\\n\\\\t\\\\\\\"Return a copy with the first letter capitalized\\\\\\\"\\\\n\\\\t| cap |\\\\n\\\\tself isEmpty ifTrue: [ ^self copy ].\\\\n\\\\tcap _ self copy.\\\\n\\\\tcap at: 1 put: (cap at: 1) asUppercase.\\\\n\\\\t^ cap! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\ncompressWithTable: tokens\\\\n\\\\t\\\\\\\"Return a string with all substrings that occur in tokens replaced\\\\n\\\\tby a character with ascii code = 127 + token index.\\\\n\\\\tThis will work best if tokens are sorted by size.\\\\n\\\\tAssumes this string contains no characters > 127, or that they\\\\n\\\\tare intentionally there and will not interfere with this process.\\\\\\\"\\\\n\\\\t| str null finalSize start result ri c ts |\\\\n\\\\tnull _ Character value: 0.\\\\n\\\\tstr _ self copyFrom: 1 to: self size.  \\\\\\\"Working string will get altered\\\\\\\"\\\\n\\\\tfinalSize _ str size.\\\\n\\\\ttokens doWithIndex:\\\\n\\\\t\\\\t[:token :tIndex |\\\\n\\\\t\\\\tstart _ 1.\\\\n\\\\t\\\\t[(start _ str findString: token startingAt: start) > 0]\\\\n\\\\t\\\\t\\\\twhileTrue:\\\\n\\\\t\\\\t\\\\t[ts _ token size.\\\\n\\\\t\\\\t\\\\t((start + ts) <= str size\\\\n\\\\t\\\\t\\\\t\\\\tand: [(str at: start + ts) = $  and: [tIndex*2 <= 128]])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [ts _ token size + 1.  \\\\\\\"include training blank\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstr at: start put: (Character value: tIndex*2 + 127)]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [str at: start put: (Character value: tIndex + 127)].\\\\n\\\\t\\\\t\\\\tstr at: start put: (Character value: tIndex + 127).\\\\n\\\\t\\\\t\\\\t1 to: ts-1 do: [:i | str at: start+i put: null].\\\\n\\\\t\\\\t\\\\tfinalSize _ finalSize - (ts - 1).\\\\n\\\\t\\\\t\\\\tstart _ start + ts]].\\\\n\\\\tresult _ String new: finalSize.\\\\n\\\\tri _ 0.\\\\n\\\\t1 to: str size do:\\\\n\\\\t\\\\t[:i | (c _ str at: i) = null ifFalse: [result at: (ri _ ri+1) put: c]].\\\\n\\\\t^ result! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\ncontractTo: smallSize\\\\n\\\\t\\\\\\\"return myself or a copy shortened by ellipsis to smallSize\\\\\\\"\\\\n\\\\t| leftSize |\\\\n\\\\tself size <= smallSize\\\\n\\\\t\\\\tifTrue: [^ self].  \\\\\\\"short enough\\\\\\\"\\\\n\\\\tsmallSize < 5\\\\n\\\\t\\\\tifTrue: [^ self copyFrom: 1 to: smallSize].    \\\\\\\"First N characters\\\\\\\"\\\\n\\\\tleftSize _ smallSize-2//2.\\\\n\\\\t^ self copyReplaceFrom: leftSize+1\\\\t\\\\t\\\\\\\"First N/2 ... last N/2\\\\\\\"\\\\n\\\\t\\\\tto: self size - (smallSize - leftSize - 3)\\\\n\\\\t\\\\twith: '...'\\\\n\\\\\\\"\\\\n\\\\t'A clear but rather long-winded summary' contractTo: 18\\\\n\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'KR 1/30/2006 21:47'!\\\\nconvertFromEncoding: encodingName\\\\n\\\\t^self convertFromWithConverter: (TextConverter newForEncoding: encodingName)! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'KR 1/30/2006 21:47'!\\\\nconvertFromSuperSwikiServerString\\\\n\\\\t^self convertFromEncoding: 'shift_jis'! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 7/8/2004 12:02'!\\\\nconvertFromWithConverter: converter\\\\n\\\\n\\\\t| readStream writeStream c |\\\\n\\\\treadStream _ self readStream.\\\\n\\\\twriteStream _ String new writeStream.\\\\n\\\\tconverter ifNil: [^ self].\\\\n\\\\t[readStream atEnd] whileFalse: [\\\\n\\\\t\\\\tc _ converter nextFromStream: readStream.\\\\n\\\\t\\\\tc ifNotNil: [writeStream nextPut: c] ifNil: [^ writeStream contents]\\\\n\\\\t].\\\\n\\\\t^ writeStream contents\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'KR 1/30/2006 21:49'!\\\\nconvertToEncoding: encodingName\\\\n\\\\t^self convertToWithConverter: (TextConverter newForEncoding: encodingName).! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'KR 1/30/2006 21:50'!\\\\nconvertToSuperSwikiServerString\\\\n\\\\t^self convertToEncoding: 'shift_jis'! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'ar 4/12/2005 14:01'!\\\\nconvertToSystemString\\\\n\\\\n\\\\t| readStream writeStream converter |\\\\n\\\\treadStream _ self readStream.\\\\n\\\\twriteStream _ String new writeStream.\\\\n\\\\tconverter _ LanguageEnvironment defaultSystemConverter.\\\\n\\\\tconverter ifNil: [^ self].\\\\n\\\\t[readStream atEnd] whileFalse: [\\\\n\\\\t\\\\tconverter nextPut: readStream next toStream: writeStream\\\\n\\\\t].\\\\n\\\\tconverter emitSequenceToResetStateIfNeededOn: writeStream.\\\\n\\\\t^ writeStream contents.\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 7/8/2004 12:01'!\\\\nconvertToWithConverter: converter\\\\n\\\\n\\\\t| readStream writeStream |\\\\n\\\\treadStream _ self readStream.\\\\n\\\\twriteStream _ String new writeStream.\\\\n\\\\tconverter ifNil: [^ self].\\\\n\\\\t[readStream atEnd] whileFalse: [\\\\n\\\\t\\\\tconverter nextPut: readStream next toStream: writeStream\\\\n\\\\t].\\\\n\\\\tconverter emitSequenceToResetStateIfNeededOn: writeStream.\\\\n\\\\t^ writeStream contents.\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\ncorrectAgainst: wordList\\\\n\\\\t\\\\\\\"Correct the receiver: assume it is a misspelled word and return the (maximum of five) nearest words in the wordList.  Depends on the scoring scheme of alike:\\\\\\\"\\\\n\\\\t| results |\\\\n\\\\tresults _ self correctAgainst: wordList continuedFrom: nil.\\\\n\\\\tresults _ self correctAgainst: nil continuedFrom: results.\\\\n\\\\t^ results! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\ncorrectAgainst: wordList continuedFrom: oldCollection\\\\n\\\\t\\\\\\\"Like correctAgainst:.  Use when you want to correct against several lists, give nil as the first oldCollection, and nil as the last wordList.\\\\\\\"\\\\n\\\\n\\\\t^ wordList isNil\\\\n\\\\t\\\\tifTrue: [ self correctAgainstEnumerator: nil\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcontinuedFrom: oldCollection ]\\\\n\\\\t\\\\tifFalse: [ self correctAgainstEnumerator: [ :action | wordList do: action without: nil]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcontinuedFrom: oldCollection ]! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\ncorrectAgainstDictionary: wordDict continuedFrom: oldCollection\\\\n\\\\t\\\\\\\"Like correctAgainst:continuedFrom:.  Use when you want to correct against a dictionary.\\\\\\\"\\\\n\\\\n\\\\t^ wordDict isNil\\\\n\\\\t\\\\tifTrue: [ self correctAgainstEnumerator: nil\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcontinuedFrom: oldCollection ]\\\\n\\\\t\\\\tifFalse: [ self correctAgainstEnumerator: [ :action | wordDict keysDo: action ]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcontinuedFrom: oldCollection ]! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 7/29/2005 16:04'!\\\\nencodeForHTTP\\\\n\\\\t\\\\\\\"change dangerous characters to their %XX form, for use in HTTP transactions\\\\\\\"\\\\n\\\\n\\\\t^ self encodeForHTTPWithTextEncoding: 'utf-8' conditionBlock: [:c | c isSafeForHTTP].\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 7/29/2005 16:04'!\\\\nencodeForHTTPWithTextEncoding: encodingName\\\\n\\\\n\\\\t^ self encodeForHTTPWithTextEncoding: encodingName conditionBlock: [:c | c isSafeForHTTP].\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 7/29/2005 16:03'!\\\\nencodeForHTTPWithTextEncoding: encodingName conditionBlock: conditionBlock\\\\n\\\\t\\\\\\\"change dangerous characters to their %XX form, for use in HTTP transactions\\\\\\\"\\\\n\\\\n\\\\t| httpSafeStream encodedStream cont |\\\\n\\\\thttpSafeStream _ WriteStream on: (String new).\\\\n\\\\tencodedStream _ MultiByteBinaryOrTextStream on: (String new: 6).\\\\n\\\\tencodedStream converter: (TextConverter newForEncoding: encodingName).\\\\n\\\\tself do: [:c |\\\\n\\\\t\\\\t(conditionBlock value: c)\\\\n\\\\t\\\\t\\\\tifTrue: [httpSafeStream nextPut: (Character value: c charCode)]\\\\n\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tencodedStream text; reset.\\\\n\\\\t\\\\t\\\\t\\\\tencodedStream nextPut: c.\\\\n\\\\t\\\\t\\\\t\\\\tencodedStream position: 0.\\\\n\\\\t\\\\t\\\\t\\\\tencodedStream binary.\\\\n\\\\t\\\\t\\\\t\\\\tcont _ encodedStream contents.\\\\n\\\\t\\\\t\\\\t\\\\tcont do: [:byte |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\thttpSafeStream nextPut: $%.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\thttpSafeStream nextPut: (byte // 16) asHexDigit.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\thttpSafeStream nextPut: (byte \\\\\\\\\\\\\\\\ 16) asHexDigit.\\\\n\\\\t\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\t^ httpSafeStream contents.\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 7/5/2004 16:48'!\\\\nfindSelector\\\\n\\\\t\\\\\\\"Dan's code for hunting down selectors with keyword parts; while this doesn't give a true parse, in most cases it does what we want, in where it doesn't, we're none the worse for it.\\\\\\\"\\\\n\\\\t| sel possibleParens level n |\\\\n\\\\tsel _ self withBlanksTrimmed.\\\\n\\\\t(sel includes: $:) ifTrue:\\\\n\\\\t\\\\t[sel _ sel copyReplaceAll: ':' with: ': '.\\\\t\\\\\\\"for the style (aa max:bb) with no space\\\\\\\"\\\\n\\\\t\\\\tpossibleParens _ sel findTokens: Character separators.\\\\n\\\\t\\\\tsel _ self class streamContents:\\\\n\\\\t\\\\t\\\\t[:s | level _ 0.\\\\n\\\\t\\\\t\\\\tpossibleParens do:\\\\n\\\\t\\\\t\\\\t\\\\t[:token |\\\\n\\\\t\\\\t\\\\t\\\\t(level = 0 and: [token endsWith: ':'])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [s nextPutAll: token]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [(n _ token occurrencesOf: $( ) > 0 ifTrue: [level _ level + n].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(n _ token occurrencesOf: $[ ) > 0 ifTrue: [level _ level + n].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(n _ token occurrencesOf: $] ) > 0 ifTrue: [level _ level - n].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(n _ token occurrencesOf: $) ) > 0 ifTrue: [level _ level - n]]]]].\\\\n\\\\n\\\\tsel isEmpty ifTrue: [^ nil].\\\\n\\\\tsel isOctetString ifTrue: [sel _ sel asOctetString].\\\\n\\\\tSymbol hasInterned: sel ifTrue:\\\\n\\\\t\\\\t[:aSymbol | ^ aSymbol].\\\\n\\\\t^ nil! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\ninitialIntegerOrNil\\\\n\\\\t\\\\\\\"Answer the integer represented by the leading digits of the receiver, or nil if the receiver does not begin with a digit\\\\\\\"\\\\n\\\\t| firstNonDigit |\\\\n\\\\t(self size == 0 or: [self first isDigit not]) ifTrue: [^ nil].\\\\n\\\\tfirstNonDigit _ (self findFirst: [:m | m isDigit not]).\\\\n\\\\tfirstNonDigit = 0 ifTrue: [firstNonDigit _ self size + 1].\\\\n\\\\t^ (self copyFrom: 1  to: (firstNonDigit - 1)) asNumber\\\\n\\\\\\\"\\\\n'234Whoopie' initialIntegerOrNil\\\\n'wimpy' initialIntegerOrNil\\\\n'234' initialIntegerOrNil\\\\n'2N' initialIntegerOrNil\\\\n'2' initialIntegerOrNil\\\\n'  89Ten ' initialIntegerOrNil\\\\n'78 92' initialIntegerOrNil\\\\n\\\\\\\"\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nkeywords\\\\n\\\\t\\\\\\\"Answer an array of the keywords that compose the receiver.\\\\\\\"\\\\n\\\\t| kwd char keywords |\\\\n\\\\tkeywords _ Array streamContents:\\\\n\\\\t\\\\t[:kwds | kwd _ WriteStream on: (String new: 16).\\\\n\\\\t\\\\t1 to: self size do:\\\\n\\\\t\\\\t\\\\t[:i |\\\\n\\\\t\\\\t\\\\tkwd nextPut: (char _ self at: i).\\\\n\\\\t\\\\t\\\\tchar = $: ifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[kwds nextPut: kwd contents.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tkwd reset]].\\\\n\\\\t\\\\tkwd isEmpty ifFalse: [kwds nextPut: kwd contents]].\\\\n\\\\t(keywords size >= 1 and: [(keywords at: 1) = ':']) ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"Has an initial keyword, as in #:if:then:else:\\\\\\\"\\\\n\\\\t\\\\tkeywords _ keywords allButFirst].\\\\n\\\\t(keywords size >= 2 and: [(keywords at: keywords size - 1) = ':']) ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"Has a final keyword, as in #nextPut::andCR\\\\\\\"\\\\n\\\\t\\\\tkeywords _ keywords copyReplaceFrom: keywords size - 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tto: keywords size with: {':' , keywords last}].\\\\n\\\\t^ keywords! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nnumericSuffix\\\\n\\\\t^ self stemAndNumericSuffix last\\\\n\\\\n\\\\\\\"\\\\n'abc98' numericSuffix\\\\n'98abc' numericSuffix\\\\n\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nonlyLetters\\\\n\\\\t\\\\\\\"answer the receiver with only letters\\\\\\\"\\\\n\\\\t^ self select:[:each | each isLetter]! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nromanNumber\\\\n\\\\t| value v1 v2 |\\\\n\\\\tvalue _ v1 _ v2 _ 0.\\\\n\\\\tself reverseDo:\\\\n\\\\t\\\\t[:each |\\\\n\\\\t\\\\tv1 _ #(1 5 10 50 100 500 1000) at: ('IVXLCDM' indexOf: each).\\\\n\\\\t\\\\tv1 >= v2\\\\n\\\\t\\\\t\\\\tifTrue: [value _ value + v1]\\\\n\\\\t\\\\t\\\\tifFalse: [value _ value - v1].\\\\n\\\\t\\\\tv2 _ v1].\\\\n\\\\t^ value! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nsansPeriodSuffix\\\\n\\\\t\\\\\\\"Return a copy of the receiver up to, but not including, the first period.  If the receiver's *first* character is a period, then just return the entire receiver. \\\\\\\"\\\\n\\\\n\\\\t| likely |\\\\n\\\\tlikely _ self copyUpTo: $..\\\\n\\\\t^ likely size == 0\\\\n\\\\t\\\\tifTrue:\\\\t[self]\\\\n\\\\t\\\\tifFalse:\\\\t[likely]! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 8/27/2002 11:13'!\\\\nsplitInteger\\\\n\\\\t\\\\\\\"Answer an array that is a splitting of self into a string and an integer.\\\\n\\\\t'43Sam' ==> #(43 'Sam').  'Try90' ==> #('Try' 90)\\\\n\\\\tBUT NOTE: 'Sam' ==> #('Sam' 0), and '90' ==> #('' 90)  ie, (<string> <integer>).\\\\\\\"\\\\n\\\\n\\\\t| pos |\\\\n\\\\t(pos _ self findFirst: [:d | d isDigit not]) = 0 ifTrue: [^ Array with: '' with: self asNumber].\\\\n\\\\tself first isDigit ifTrue: [\\\\n\\\\t\\\\t^ Array with: (self copyFrom: 1 to: pos - 1) asNumber \\\\n\\\\t\\\\t\\\\t\\\\twith: (self copyFrom: pos to: self size)].\\\\n\\\\t(pos _ self findFirst: [:d | d isDigit]) = 0 ifTrue: [^ Array with: self with: 0].\\\\n\\\\t^ Array with: (self copyFrom: 1 to: pos - 1)\\\\n\\\\t\\\\t\\\\twith: (self copyFrom: pos to: self size) asNumber! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nstemAndNumericSuffix\\\\n\\\\t\\\\\\\"Parse the receiver into a string-valued stem and a numeric-valued suffix.  6/7/96 sw\\\\\\\"\\\\n\\\\n\\\\t| stem suffix position |\\\\n\\\\n\\\\tstem _ self.\\\\n\\\\tsuffix _ 0.\\\\n\\\\tposition _ 1.\\\\n\\\\t[stem endsWithDigit and: [stem size > 1]] whileTrue:\\\\n\\\\t\\\\t[suffix _  stem last digitValue * position + suffix.\\\\n\\\\t\\\\tposition _ position * 10.\\\\n\\\\t\\\\tstem _ stem copyFrom: 1 to: stem size - 1].\\\\n\\\\t^ Array with: stem with: suffix\\\\n\\\\n\\\\\\\"'Fred2305' stemAndNumericSuffix\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nsubStrings\\\\n\\\\t\\\\\\\"Answer an array of the substrings that compose the receiver.\\\\\\\"\\\\n\\\\t#Collectn.\\\\n\\\\t\\\\\\\"Added 2000/04/08 For ANSI <readableString> protocol.\\\\\\\"\\\\n\\\\t^ self substrings! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'ar 4/12/2005 16:32'!\\\\nsubStrings: separators \\\\n\\\\t\\\\\\\"Answer an array containing the substrings in the receiver separated \\\\n\\\\tby the elements of separators.\\\\\\\"\\\\n\\\\t| char result sourceStream subString |\\\\n\\\\t#Collectn.\\\\n\\\\t\\\\\\\"Changed 2000/04/08 For ANSI <readableString> protocol.\\\\\\\"\\\\n\\\\t(separators isString or:[separators allSatisfy: [:element | element isKindOf: Character]])\\\\n\\\\t\\\\tifFalse: [^ self error: 'separators must be Characters.'].\\\\n\\\\tsourceStream := ReadStream on: self.\\\\n\\\\tresult := OrderedCollection new.\\\\n\\\\tsubString := String new.\\\\n\\\\t[sourceStream atEnd]\\\\n\\\\t\\\\twhileFalse: \\\\n\\\\t\\\\t\\\\t[char := sourceStream next.\\\\n\\\\t\\\\t\\\\t(separators includes: char)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [subString notEmpty\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[result add: subString copy.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsubString := String new]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [subString := subString , (String with: char)]].\\\\n\\\\tsubString notEmpty ifTrue: [result add: subString copy].\\\\n\\\\t^ result asArray! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nsubstrings\\\\n\\\\t\\\\\\\"Answer an array of the substrings that compose the receiver.\\\\\\\"\\\\n\\\\t| result end beginning |\\\\n\\\\n\\\\tresult _ WriteStream on: (Array new: 10).\\\\n\\\\n\\\\n\\\\n\\\\tend _ 0.\\\\n\\\\t\\\\\\\"find one substring each time through this loop\\\\\\\"\\\\n\\\\t[ \\\\n\\\\t\\\\t\\\\\\\"find the beginning of the next substring\\\\\\\"\\\\n\\\\t\\\\tbeginning _ self indexOfAnyOf: CSNonSeparators startingAt: end+1 ifAbsent: [ nil ].\\\\n\\\\t\\\\tbeginning ~~ nil ] \\\\n\\\\twhileTrue: [\\\\n\\\\t\\\\t\\\\\\\"find the end\\\\\\\"\\\\n\\\\t\\\\tend _ self indexOfAnyOf: CSSeparators startingAt: beginning ifAbsent: [ self size + 1 ].\\\\n\\\\t\\\\tend _ end - 1.\\\\n\\\\n\\\\t\\\\tresult nextPut: (self copyFrom: beginning to: end).\\\\n\\\\n\\\\t].\\\\n\\\\n\\\\n\\\\t^result contents! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nsurroundedBySingleQuotes\\\\n\\\\t\\\\\\\"Answer the receiver with leading and trailing quotes.  \\\\\\\"\\\\n\\\\n\\\\t^ $' asString, self, $' asString! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 8/28/2002 15:14'!\\\\ntranslateFrom: start  to: stop  table: table\\\\n\\\\t\\\\\\\"translate the characters in the string by the given table, in place\\\\\\\"\\\\n\\\\tself class translate: self from: start to: stop table: table! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\ntranslateToLowercase\\\\n\\\\t\\\\\\\"Translate all characters to lowercase, in place\\\\\\\"\\\\n\\\\n\\\\tself translateWith: LowercasingTable! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\ntranslateToUppercase\\\\n\\\\t\\\\\\\"Translate all characters to lowercase, in place\\\\\\\"\\\\n\\\\n\\\\tself translateWith: UppercasingTable! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 8/28/2002 15:13'!\\\\ntranslateWith: table\\\\n\\\\t\\\\\\\"translate the characters in the string by the given table, in place\\\\\\\"\\\\n\\\\t^ self translateFrom: 1 to: self size table: table! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\ntruncateTo: smallSize\\\\n\\\\t\\\\\\\"return myself or a copy shortened to smallSize.  1/18/96 sw\\\\\\\"\\\\n\\\\n\\\\t^ self size <= smallSize\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self copyFrom: 1 to: smallSize]! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\ntruncateWithElipsisTo: maxLength\\\\n\\\\t\\\\\\\"Return myself or a copy suitably shortened but with elipsis added\\\\\\\"\\\\n\\\\n\\\\t^ self size <= maxLength\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[(self copyFrom: 1 to: (maxLength - 3)), '...']\\\\n\\\\n\\\\n\\\\t\\\\\\\"'truncateWithElipsisTo:' truncateWithElipsisTo: 20\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'KR 9/22/2005 23:06'!\\\\nunescapePercents\\\\n\\\\t\\\\\\\"decode %xx form.  This is the opposite of #encodeForHTTP\\\\\\\"\\\\n\\\\t^ self unescapePercentsWithTextEncoding: 'utf-8'.! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'ky 7/8/2006 17:56'!\\\\nunescapePercentsWithTextEncoding: encodingName \\\\n\\\\t\\\\\\\"decode string including %XX form\\\\\\\"\\\\n\\\\t| unescaped char asciiVal specialChars oldPos pos converter |\\\\n\\\\tunescaped := ReadWriteStream on: String new.\\\\n\\\\tspecialChars := '+%' asCharacterSet.\\\\n\\\\toldPos := 1.\\\\n\\\\t[pos := self indexOfAnyOf: specialChars startingAt: oldPos.\\\\n\\\\tpos > 0]\\\\n\\\\t\\\\twhileTrue: [unescaped\\\\n\\\\t\\\\t\\\\t\\\\tnextPutAll: (self copyFrom: oldPos to: pos - 1).\\\\n\\\\t\\\\t\\\\tchar := self at: pos.\\\\n\\\\t\\\\t\\\\t(char = $%\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [pos + 2 <= self size])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [asciiVal := (self at: pos + 1) asUppercase digitValue * 16 + (self at: pos + 2) asUppercase digitValue.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tasciiVal > 255\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [^ self].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tunescaped\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnextPut: (Character value: asciiVal).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpos := pos + 3.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpos <= self size\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [char := nil].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\toldPos := pos]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [char = $+\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [unescaped nextPut: Character space]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [unescaped nextPut: char].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\toldPos := pos + 1]].\\\\n\\\\toldPos <= self size\\\\n\\\\t\\\\tifTrue: [unescaped\\\\n\\\\t\\\\t\\\\t\\\\tnextPutAll: (self copyFrom: oldPos to: self size)].\\\\n\\\\tconverter := (TextConverter newForEncoding: encodingName)\\\\n\\\\t\\\\t\\\\t\\\\tifNil: [TextConverter newForEncoding: nil].\\\\n\\\\t^ [unescaped contents convertFromWithConverter: converter]\\\\n\\\\t\\\\ton: Error\\\\n\\\\t\\\\tdo: [\\\\\\\"the contents may be squeak-encoded\\\\\\\"\\\\n\\\\t\\\\t\\\\tunescaped contents]! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 8/27/2002 11:20'!\\\\nunparenthetically\\\\n\\\\t\\\\\\\"If the receiver starts with (..( and ends with matching )..), strip them\\\\\\\"\\\\n\\\\n\\\\t| curr |\\\\n\\\\tcurr _ self.\\\\n\\\\t[((curr first = $() and: [curr last = $)])] whileTrue:\\\\n\\\\t\\\\t[curr _ curr copyFrom: 2 to: (curr size - 1)].\\\\n\\\\n\\\\t^ curr\\\\n\\\\n\\\\\\\"\\\\n\\\\n'((fred the bear))' unparenthetically\\\\n\\\\n\\\\\\\"\\\\n\\\\t\\\\t! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nunzipped\\\\n\\\\t| magic1 magic2 |\\\\n\\\\tmagic1 _ (self at: 1) asInteger.\\\\n\\\\tmagic2 _ (self at: 2) asInteger.\\\\n\\\\t(magic1 = 16r1F and:[magic2 = 16r8B]) ifFalse:[^self].\\\\n\\\\t^(GZipReadStream on: self) upToEnd! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nwithBlanksCondensed\\\\n\\\\t\\\\\\\"Return a copy of the receiver with leading/trailing blanks removed\\\\n\\\\t and consecutive white spaces condensed.\\\\\\\"\\\\n\\\\n\\\\t| trimmed lastBlank |\\\\n\\\\ttrimmed _ self withBlanksTrimmed.\\\\n\\\\t^String streamContents: [:stream |\\\\n\\\\t\\\\tlastBlank _ false.\\\\n\\\\t\\\\ttrimmed do: [:c | (c isSeparator and: [lastBlank]) ifFalse: [stream nextPut: c].\\\\n\\\\t\\\\t\\\\tlastBlank _ c isSeparator]].\\\\n\\\\n\\\\t\\\\\\\" ' abc  d   ' withBlanksCondensed\\\\\\\"\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 7/5/2004 16:43'!\\\\nwithBlanksTrimmed\\\\n\\\\t\\\\\\\"Return a copy of the receiver from which leading and trailing blanks have been trimmed.\\\\\\\"\\\\n\\\\n\\\\t| first result |\\\\n\\\\tfirst _ self findFirst: [:c | c isSeparator not].\\\\n\\\\tfirst = 0 ifTrue: [^ ''].  \\\\\\\"no non-separator character\\\\\\\"\\\\n\\\\tresult _  self\\\\n\\\\t\\\\tcopyFrom: first\\\\n\\\\t\\\\tto: (self findLast: [:c | c isSeparator not]).\\\\n\\\\tresult isOctetString ifTrue: [^ result asOctetString] ifFalse: [^ result].\\\\n\\\\n\\\\t\\\\\\\" ' abc  d   ' withBlanksTrimmed\\\\\\\"\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'md 9/19/2004 15:19'!\\\\nwithFirstCharacterDownshifted\\\\n\\\\t\\\\\\\"Return a copy with the first letter downShifted\\\\\\\"\\\\n\\\\t\\\\n\\\\t| answer |\\\\n\\\\t\\\\n\\\\tself ifEmpty: [^ self copy].\\\\n\\\\tanswer _ self copy.\\\\n\\\\tanswer at: 1 put: (answer at: 1) asLowercase.\\\\n\\\\t^ answer. ! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nwithNoLineLongerThan: aNumber\\\\n\\\\t\\\\\\\"Answer a string with the same content as receiver, but rewrapped so that no line has more characters than the given number\\\\\\\"\\\\n\\\\t| listOfLines currentLast currentStart resultString putativeLast putativeLine crPosition |\\\\n\\\\taNumber isNumber not | (aNumber < 1) ifTrue: [self error: 'too narrow'].\\\\n\\\\tlistOfLines _ OrderedCollection new.\\\\n\\\\tcurrentLast _ 0.\\\\n\\\\t[currentLast < self size] whileTrue:\\\\n\\\\t\\\\t[currentStart _ currentLast + 1.\\\\n\\\\t\\\\tputativeLast _ (currentStart + aNumber - 1) min: self size.\\\\n\\\\t\\\\tputativeLine _ self copyFrom: currentStart to: putativeLast.\\\\n\\\\t\\\\t(crPosition _ putativeLine indexOf: Character cr) > 0 ifTrue:\\\\n\\\\t\\\\t\\\\t[putativeLast _ currentStart + crPosition - 1.\\\\n\\\\t\\\\t\\\\tputativeLine _ self copyFrom: currentStart to: putativeLast].\\\\n\\\\t\\\\tcurrentLast _ putativeLast == self size\\\\n\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[putativeLast]\\\\n\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t[currentStart + putativeLine lastSpacePosition - 1].\\\\n\\\\t\\\\tcurrentLast <= currentStart ifTrue:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"line has NO spaces; baleout!!\\\\\\\"\\\\n\\\\t\\\\t\\\\tcurrentLast _ putativeLast].\\\\n\\\\t\\\\tlistOfLines add: (self copyFrom: currentStart to: currentLast) withBlanksTrimmed].\\\\n\\\\n\\\\tlistOfLines size > 0 ifFalse: [^ ''].\\\\n\\\\tresultString _ listOfLines first.\\\\n\\\\t2 to: listOfLines size do:\\\\n\\\\t\\\\t[:i | resultString _ resultString, String cr, (listOfLines at: i)].\\\\n\\\\t^ resultString\\\\n\\\\n\\\\\\\"#(5 7 20) collect:\\\\n\\\\t[:i | 'Fred the bear went down to the brook to read his book in silence' withNoLineLongerThan: i]\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'md 10/5/2005 11:01'!\\\\nwithoutLeadingBlanks\\\\n\\\\t\\\\n\\\\t\\\\\\\"Return a copy of the receiver from which leading blanks have been\\\\ntrimmed.\\\\\\\"\\\\n\\\\n\\\\t\\\\n\\\\t| first |\\\\n\\\\t\\\\n\\\\tfirst := self findFirst: [:c | c isSeparator not ].\\\\n\\\\n\\\\tfirst = 0 ifTrue: [^ ''].  \\\\n\\\\t\\\\n\\\\t\\\\\\\"no non-separator character\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ self copyFrom: first to: self size\\\\n\\\\n\\\\t\\\\n\\\\t\\\\t\\\\n\\\\t\\\\\\\" '    abc  d' withoutLeadingBlanks\\\\\\\"\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'tak 4/25/2004 12:57'!\\\\nwithSeparatorsCompacted\\\\n\\\\t\\\\\\\"replace each sequences of whitespace by a single space character\\\\\\\"\\\\n\\\\t\\\\\\\"' test ' withSeparatorsCompacted = ' test '\\\\\\\"\\\\n\\\\t\\\\\\\"' test test' withSeparatorsCompacted = ' test test'\\\\\\\"\\\\n\\\\t\\\\\\\"'test test\\\\t\\\\t' withSeparatorsCompacted = 'test test '\\\\\\\"\\\\n\\\\n\\\\t| out in next isSeparator |\\\\n\\\\tself isEmpty ifTrue: [^ self].\\\\n\\\\n\\\\tout _ WriteStream on: (String new: self size).\\\\n\\\\tin _ self readStream.\\\\n\\\\tisSeparator _ [:char | char asciiValue < 256\\\\n\\\\t\\\\t\\\\t\\\\tand: [CSSeparators includes: char]].\\\\n\\\\t[in atEnd] whileFalse: [\\\\n\\\\t\\\\tnext _ in next.\\\\n\\\\t\\\\t(isSeparator value: next)\\\\n\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tout nextPut: $ .\\\\n\\\\t\\\\t\\\\t\\\\t[in atEnd or:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[next _ in next.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(isSeparator value: next)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [false]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [out nextPut: next. true]]] whileFalse]\\\\n\\\\t\\\\t\\\\tifFalse: [out nextPut: next]].\\\\n\\\\t^ out contents! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 8/27/2002 14:06'!\\\\nwithoutLeadingDigits\\\\n\\\\t\\\\\\\"Answer the portion of the receiver that follows any leading series of digits and blanks.  If the receiver consists entirely of digits and blanks, return an empty string\\\\\\\"\\\\n\\\\t| firstNonDigit |\\\\n\\\\tfirstNonDigit _ (self findFirst: [:m | m isDigit not and: [m ~= $ ]]).\\\\n\\\\t^ firstNonDigit > 0\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self copyFrom: firstNonDigit  to: self size]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t['']\\\\n\\\\n\\\\\\\"\\\\n'234Whoopie' withoutLeadingDigits\\\\n' 4321 BlastOff!!' withoutLeadingDigits\\\\n'wimpy' withoutLeadingDigits\\\\n'  89Ten ' withoutLeadingDigits\\\\n'78 92' withoutLeadingDigits\\\\n\\\\\\\"\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 11/3/2004 19:24'!\\\\nwithoutTrailingBlanks\\\\n\\\\t\\\\\\\"Return a copy of the receiver from which trailing blanks have been trimmed.\\\\\\\"\\\\n\\\\n\\\\t| last |\\\\n\\\\tlast _ self findLast: [:c | c isSeparator not].\\\\n\\\\tlast = 0 ifTrue: [^ ''].  \\\\\\\"no non-separator character\\\\\\\"\\\\n\\\\t^ self copyFrom: 1 to: last\\\\n\\\\n\\\\t\\\\\\\" ' abc  d   ' withoutTrailingBlanks\\\\\\\"\\\\n! !\\\\n\\\\n!String methodsFor: 'converting' stamp: 'yo 8/27/2002 14:06'!\\\\nwithoutTrailingDigits\\\\n\\\\t\\\\\\\"Answer the portion of the receiver that precedes any trailing series of digits and blanks.  If the receiver consists entirely of digits and blanks, return an empty string\\\\\\\"\\\\n\\\\t| firstDigit |\\\\n\\\\tfirstDigit _ (self findFirst: [:m | m isDigit or: [m = $ ]]).\\\\n\\\\t^ firstDigit > 0\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self copyFrom: 1 to: firstDigit-1]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[self]\\\\n\\\\n\\\\\\\"\\\\n'Whoopie234' withoutTrailingDigits\\\\n' 4321 BlastOff!!' withoutLeadingDigits\\\\n'wimpy' withoutLeadingDigits\\\\n'  89Ten ' withoutLeadingDigits\\\\n'78 92' withoutLeadingDigits\\\\n\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!String methodsFor: 'copying' stamp: 'yo 11/3/2004 19:24'!\\\\ncopyReplaceTokens: oldSubstring with: newSubstring \\\\n\\\\t\\\\\\\"Replace all occurrences of oldSubstring that are surrounded\\\\n\\\\tby non-alphanumeric characters\\\\\\\"\\\\n\\\\t^ self copyReplaceAll: oldSubstring with: newSubstring asTokens: true\\\\n\\\\t\\\\\\\"'File asFile Files File''s File' copyReplaceTokens: 'File' with: 'Snick'\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'copying' stamp: 'yo 11/3/2004 19:24'!\\\\ndeepCopy\\\\n\\\\t\\\\\\\"DeepCopy would otherwise mean make a copy of the character;  since \\\\n\\\\tcharacters are unique, just return a shallowCopy.\\\\\\\"\\\\n\\\\n\\\\t^self shallowCopy! !\\\\n\\\\n!String methodsFor: 'copying' stamp: 'yo 11/3/2004 19:24'!\\\\npadded: leftOrRight to: length with: char\\\\n\\\\tleftOrRight = #left ifTrue:\\\\n\\\\t\\\\t[^ (String new: (length - self size max: 0) withAll: char) , self].\\\\n\\\\tleftOrRight = #right ifTrue:\\\\n\\\\t\\\\t[^ self , (String new: (length - self size max: 0) withAll: char)].! !\\\\n\\\\n\\\\n!String methodsFor: 'displaying' stamp: 'yo 11/3/2004 19:24'!\\\\ndisplayAt: aPoint \\\\n\\\\t\\\\\\\"Display the receiver as a DisplayText at aPoint on the display screen.\\\\\\\"\\\\n\\\\n\\\\tself displayOn: Display at: aPoint! !\\\\n\\\\n!String methodsFor: 'displaying' stamp: 'yo 11/3/2004 19:24'!\\\\ndisplayOn: aDisplayMedium\\\\n\\\\t\\\\\\\"Display the receiver on the given DisplayMedium.  5/16/96 sw\\\\\\\"\\\\n\\\\n\\\\tself displayOn: aDisplayMedium at: 0 @ 0! !\\\\n\\\\n!String methodsFor: 'displaying' stamp: 'yo 11/3/2004 19:24'!\\\\ndisplayOn: aDisplayMedium at: aPoint \\\\n\\\\t\\\\\\\"Show a representation of the receiver as a DisplayText at location aPoint on aDisplayMedium, using black-colored text.\\\\\\\"\\\\n\\\\n\\\\tself displayOn: aDisplayMedium at: aPoint textColor: Color black! !\\\\n\\\\n!String methodsFor: 'displaying' stamp: 'yo 11/3/2004 19:24'!\\\\ndisplayOn: aDisplayMedium at: aPoint textColor: aColor\\\\n\\\\t\\\\\\\"Show a representation of the receiver as a DisplayText at location aPoint on aDisplayMedium, rendering the text in the designated color\\\\\\\"\\\\n\\\\n\\\\t(self asDisplayText foregroundColor: (aColor ifNil: [Color black]) backgroundColor: Color white)\\\\n\\\\t\\\\tdisplayOn: aDisplayMedium at: aPoint! !\\\\n\\\\n!String methodsFor: 'displaying' stamp: 'yo 11/3/2004 19:24'!\\\\ndisplayProgressAt: aPoint from: minVal to: maxVal during: workBlock \\\\n\\\\t\\\\\\\"Display this string as a caption over a progress bar while workBlock is evaluated.\\\\n\\\\nEXAMPLE (Select next 6 lines and Do It)\\\\n'Now here''s some Real Progress'\\\\n\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\tfrom: 0 to: 10\\\\n\\\\tduring: [:bar |\\\\n\\\\t1 to: 10 do: [:x | bar value: x.\\\\n\\\\t\\\\t\\\\t(Delay forMilliseconds: 500) wait]].\\\\n\\\\nHOW IT WORKS (Try this in any other language :-)\\\\nSince your code (the last 2 lines in the above example) is in a block,\\\\nthis method gets control to display its heading before, and clean up \\\\nthe screen after, its execution.\\\\nThe key, though, is that the block is supplied with an argument,\\\\nnamed 'bar' in the example, which will update the bar image every \\\\nit is sent the message value: x, where x is in the from:to: range.\\\\n\\\\\\\"\\\\n\\\\t^ProgressInitiationException \\\\n\\\\t\\\\tdisplay: self\\\\n\\\\t\\\\tat: aPoint \\\\n\\\\t\\\\tfrom: minVal \\\\n\\\\t\\\\tto: maxVal \\\\n\\\\t\\\\tduring: workBlock! !\\\\n\\\\n\\\\n!String methodsFor: 'encoding' stamp: 'ar 4/10/2005 17:16'!\\\\ngetInteger32: location\\\\n\\\\t| integer |\\\\n\\\\t<primitive: 'getInteger' module: 'IntegerPokerPlugin'>\\\\n\\\\t\\\\\\\"^IntegerPokerPlugin doPrimitive: #getInteger\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"the following is about 7x faster than interpreting the plugin if not compiled\\\\\\\"\\\\n\\\\n\\\\tinteger := \\\\n\\\\t\\\\t((self at: location) asInteger bitShift: 24) +\\\\n\\\\t\\\\t((self at: location+1) asInteger bitShift: 16) +\\\\n\\\\t\\\\t((self at: location+2) asInteger bitShift: 8) +\\\\n\\\\t\\\\t(self at: location+3) asInteger.\\\\n\\\\n\\\\tinteger > 1073741824 ifTrue: [^1073741824 - integer ].\\\\n\\\\t^integer\\\\n! !\\\\n\\\\n!String methodsFor: 'encoding' stamp: 'ar 4/10/2005 17:17'!\\\\nputInteger32: anInteger at: location\\\\n\\\\t| integer |\\\\n\\\\t<primitive: 'putInteger' module: 'IntegerPokerPlugin'>\\\\n\\\\t\\\\\\\"IntegerPokerPlugin doPrimitive: #putInteger\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"the following is close to 20x faster than the above if the primitive is not compiled\\\\\\\"\\\\n\\\\t\\\\\\\"PUTCOUNTER _ PUTCOUNTER + 1.\\\\\\\"\\\\n\\\\tinteger _ anInteger.\\\\n\\\\tinteger < 0 ifTrue: [integer :=  1073741824 - integer. ].\\\\n\\\\tself at: location+3 put: (Character value: (integer \\\\\\\\\\\\\\\\ 256)).\\\\n\\\\tself at: location+2 put: (Character value: (integer bitShift: -8) \\\\\\\\\\\\\\\\ 256).\\\\n\\\\tself at: location+1 put: (Character value: (integer bitShift: -16) \\\\\\\\\\\\\\\\ 256).\\\\n\\\\tself at: location put: (Character value: (integer bitShift: -24) \\\\\\\\\\\\\\\\ 256).\\\\n\\\\n\\\\\\\"Smalltalk at: #PUTCOUNTER put: 0\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'encoding' stamp: 'ar 4/10/2005 17:18'!\\\\nwriteLeadingCharRunsOn: stream\\\\n\\\\n\\\\t| runLength runValues runStart leadingChar |\\\\n\\\\tself isEmpty ifTrue: [^ self].\\\\n\\\\n\\\\trunLength _ OrderedCollection new.\\\\n\\\\trunValues _ OrderedCollection new.\\\\n\\\\trunStart _ 1.\\\\n\\\\tleadingChar _ (self at: runStart) leadingChar.\\\\n\\\\t2 to: self size do: [:index |\\\\n\\\\t\\\\t(self at: index) leadingChar = leadingChar ifFalse: [\\\\n\\\\t\\\\t\\\\trunValues add: leadingChar.\\\\n\\\\t\\\\t\\\\trunLength add: (index - runStart).\\\\n\\\\t\\\\t\\\\tleadingChar _ (self at: index) leadingChar.\\\\n\\\\t\\\\t\\\\trunStart _ index.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\trunValues add: (self last) leadingChar.\\\\n\\\\trunLength add: self size + 1 -  runStart.\\\\n\\\\n\\\\tstream nextPut: $(.\\\\n\\\\trunLength do: [:rr | rr printOn: stream. stream space].\\\\n\\\\tstream skip: -1; nextPut: $).\\\\n\\\\trunValues do: [:vv | vv printOn: stream. stream nextPut: $,].\\\\n\\\\tstream skip: -1.\\\\n! !\\\\n\\\\n\\\\n!String methodsFor: 'filter streaming' stamp: 'yo 8/26/2002 22:31'!\\\\nbyteEncode:aStream\\\\n\\\\n\\\\t^aStream writeString: self.\\\\n! !\\\\n\\\\n!String methodsFor: 'filter streaming' stamp: 'yo 8/26/2002 22:31'!\\\\nputOn:aStream\\\\n\\\\n\\\\t^aStream nextPutAll: self.\\\\n! !\\\\n\\\\n\\\\n!String methodsFor: 'formatting' stamp: 'md 5/26/2005 13:34'!\\\\nexpandMacros\\\\n\\\\t^self expandMacrosWithArguments: #()! !\\\\n\\\\n!String methodsFor: 'formatting' stamp: 'md 5/26/2005 13:34'!\\\\nexpandMacrosWithArguments: anArray \\\\n\\\\t| newStream readStream char index |\\\\n\\\\tnewStream := WriteStream on: (String new: self size).\\\\n\\\\treadStream := ReadStream on: self.\\\\n\\\\t[readStream atEnd] whileFalse: \\\\n\\\\t\\\\t\\\\t[char := readStream next.\\\\n\\\\t\\\\t\\\\tchar == $< \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[| nextChar |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnextChar := readStream next asUppercase.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnextChar == $N ifTrue: [newStream cr].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnextChar == $T ifTrue: [newStream tab].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnextChar isDigit \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[index := nextChar digitValue.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[readStream atEnd \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tor: [(nextChar := readStream next asUppercase) isDigit not]] \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twhileFalse: [index := index * 10 + nextChar digitValue]].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnextChar == $? \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[| trueString falseString |\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttrueString := readStream upTo: $:.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tfalseString := readStream upTo: $>.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\treadStream position: readStream position - 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnewStream \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnextPutAll: ((anArray at: index) ifTrue: [trueString] ifFalse: [falseString])].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnextChar == $P \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [newStream nextPutAll: (anArray at: index) printString].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnextChar == $S ifTrue: [newStream nextPutAll: (anArray at: index)].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\treadStream skipTo: $>]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[newStream nextPut: (char == $% ifTrue: [readStream next] ifFalse: [char])]].\\\\n\\\\t^newStream contents! !\\\\n\\\\n!String methodsFor: 'formatting' stamp: 'md 5/26/2005 13:34'!\\\\nexpandMacrosWith: anObject \\\\n\\\\t^self expandMacrosWithArguments: (Array with: anObject)! !\\\\n\\\\n!String methodsFor: 'formatting' stamp: 'md 5/26/2005 13:34'!\\\\nexpandMacrosWith: anObject with: anotherObject \\\\n\\\\t^self \\\\n\\\\t\\\\texpandMacrosWithArguments: (Array with: anObject with: anotherObject)! !\\\\n\\\\n!String methodsFor: 'formatting' stamp: 'md 5/26/2005 13:34'!\\\\nexpandMacrosWith: anObject with: anotherObject with: thirdObject \\\\n\\\\t^self expandMacrosWithArguments: (Array \\\\n\\\\t\\\\t\\\\t\\\\twith: anObject\\\\n\\\\t\\\\t\\\\t\\\\twith: anotherObject\\\\n\\\\t\\\\t\\\\t\\\\twith: thirdObject)! !\\\\n\\\\n!String methodsFor: 'formatting' stamp: 'md 5/26/2005 13:34'!\\\\nexpandMacrosWith: anObject with: anotherObject with: thirdObject with: fourthObject \\\\n\\\\t^self expandMacrosWithArguments: (Array \\\\n\\\\t\\\\t\\\\t\\\\twith: anObject\\\\n\\\\t\\\\t\\\\t\\\\twith: anotherObject\\\\n\\\\t\\\\t\\\\t\\\\twith: thirdObject\\\\n\\\\t\\\\t\\\\t\\\\twith: fourthObject)! !\\\\n\\\\n!String methodsFor: 'formatting' stamp: 'yo 11/3/2004 19:24'!\\\\nformat: aCollection \\\\n\\\\t\\\\\\\"format the receiver with aCollection  \\\\n\\\\t \\\\n\\\\tsimplest example:  \\\\n\\\\t'foo {1} bar' format: {Date today}.\\\\n\\\\t \\\\n\\\\tcomplete example:  \\\\n\\\\t'\\\\\\\\{ \\\\\\\\} \\\\\\\\\\\\\\\\ foo {1} bar {2}' format: {12. 'string'}.  \\\\n\\\\t\\\\\\\"\\\\n\\\\t| result stream |\\\\n\\\\tresult := String new writeStream.\\\\n\\\\tstream := self readStream.\\\\n\\\\n\\\\t[stream atEnd]\\\\n\\\\t\\\\twhileFalse: [| currentChar | \\\\n\\\\t\\\\t\\\\tcurrentChar := stream next.\\\\n\\\\t\\\\t\\\\tcurrentChar == ${\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [| expression | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\texpression := self getEnclosedExpressionFrom: stream.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tresult\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnextPutAll: (self evaluateExpression: expression parameters: aCollection)]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcurrentChar == $\\\\\\\\\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [stream atEnd\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [result nextPut: stream next]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [result nextPut: currentChar]]].\\\\n\\\\n\\\\t^ result contents! !\\\\n\\\\n!String methodsFor: 'formatting' stamp: 'yo 11/3/2004 19:24'!\\\\nwithCRs\\\\n\\\\t\\\\\\\"Return a copy of the receiver in which backslash (\\\\\\\\) characters have been replaced with carriage returns.\\\\\\\"\\\\n\\\\n\\\\t^ self collect: [ :c | c = $\\\\\\\\ ifTrue: [ Character cr ] ifFalse: [ c ]].! !\\\\n\\\\n\\\\n!String methodsFor: 'internet' stamp: 'yo 12/28/2003 01:17'!\\\\ndecodeMimeHeader\\\\n\\\\t\\\\\\\"See RFC 2047, MIME Part Three: Message Header Extension for Non-ASCII  \\\\n\\\\tText. Text containing non-ASCII characters is encoded by the sequence  \\\\n\\\\t=?character-set?encoding?encoded-text?=  \\\\n\\\\tEncoding is Q (quoted printable) or B (Base64), handled by  \\\\n\\\\tBase64MimeConverter / RFC2047MimeConverter.\\\\n\\\\n\\\\tThanks to Yokokawa-san, it works in m17n package.  Try the following:\\\\n\\\\n\\\\t'=?ISO-2022-JP?B?U1dJS0lQT1AvGyRCPUJDKyVpJXMlQRsoQi8=?= =?ISO-2022-JP?B?GyRCJVElRiUjJSobKEIoUGF0aW8p?=' decodeMimeHeader.\\\\n\\\\\\\"\\\\n\\\\t| input output temp charset decoder encodedStream encoding pos |\\\\n\\\\tinput _ ReadStream on: self.\\\\n\\\\toutput _ WriteStream on: String new.\\\\n\\\\t[output\\\\n\\\\t\\\\tnextPutAll: (input upTo: $=).\\\\n\\\\t\\\\\\\"ASCII Text\\\\\\\"\\\\n\\\\tinput atEnd]\\\\n\\\\t\\\\twhileFalse: [(temp _ input next) = $?\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [charset _ input upTo: $?.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tencoding _ (input upTo: $?) asUppercase.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttemp _ input upTo: $?.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tinput next.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Skip final =\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(charset isNil or: [charset size = 0]) ifTrue: [charset _ 'LATIN-1'].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tencodedStream _ MultiByteBinaryOrTextStream on: String new encoding: charset.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdecoder _ encoding = 'B'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [Base64MimeConverter new]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [RFC2047MimeConverter new].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tdecoder\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmimeStream: (ReadStream on: temp);\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t dataStream: encodedStream;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t mimeDecode.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\toutput nextPutAll: encodedStream reset contents.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpos _ input position.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tinput skipSeparators.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Delete spaces if followed by =\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tinput peek = $=\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [input position: pos]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [output nextPut: $=;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t nextPut: temp]].\\\\n\\\\t^ output contents! !\\\\n\\\\n!String methodsFor: 'internet' stamp: 'yo 11/3/2004 19:24'!\\\\ndecodeQuotedPrintable\\\\n\\\\t\\\\\\\"Assume receiver is in MIME 'quoted-printable' encoding, and decode it.\\\\\\\"\\\\n  \\\\n\\\\t^QuotedPrintableMimeConverter mimeDecode: self as: self class! !\\\\n\\\\n!String methodsFor: 'internet' stamp: 'ar 4/9/2005 22:16'!\\\\nisoToSqueak\\\\n\\\\t^self \\\\\\\"no longer needed\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'internet' stamp: 'yo 11/3/2004 19:24'!\\\\nisoToUtf8\\\\n\\\\t\\\\\\\"Convert ISO 8559-1 to UTF-8\\\\\\\"\\\\n\\\\t| s v |\\\\n\\\\ts _ WriteStream on: (String new: self size).\\\\n\\\\n\\\\tself do: [:c |\\\\n\\\\t\\\\tv _ c asciiValue.\\\\n\\\\t\\\\t(v > 128)\\\\n\\\\t\\\\t\\\\tifFalse: [s nextPut: c]\\\\n\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\ts nextPut: (192+(v >> 6)) asCharacter.\\\\n\\\\t\\\\t\\\\t\\\\ts nextPut: (128+(v bitAnd: 63)) asCharacter]].\\\\n\\\\t^s contents. \\\\n! !\\\\n\\\\n!String methodsFor: 'internet' stamp: 'ar 4/10/2005 15:58'!\\\\nmacToSqueak\\\\n\\\\t\\\\\\\"Convert the receiver from MacRoman to Squeak encoding\\\\\\\"\\\\n\\\\t^ self collect: [:each | each macToSqueak]! !\\\\n\\\\n!String methodsFor: 'internet' stamp: 'ar 4/9/2005 22:16'!\\\\nsqueakToIso\\\\n\\\\t^self \\\\\\\"no longer needed\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'internet' stamp: 'ar 4/10/2005 15:55'!\\\\nsqueakToMac\\\\n\\\\t\\\\\\\"Convert the receiver from Squeak to MacRoman encoding\\\\\\\"\\\\n\\\\t^ self collect: [:each | each squeakToMac]! !\\\\n\\\\n!String methodsFor: 'internet' stamp: 'yo 11/3/2004 19:24'!\\\\nutf8ToIso\\\\n\\\\t\\\\\\\"Only UTF-8 characters that maps to 8-bit ISO-8559-1 values are converted. Others raises an error\\\\\\\"\\\\n\\\\t| s i c v c2 v2 |\\\\n\\\\ts _ WriteStream on: (String new: self size).\\\\n\\\\t\\\\n\\\\ti _ 1.\\\\n\\\\t[i <= self size] whileTrue: [\\\\n\\\\t\\\\tc _ self at: i. i_i+1.\\\\n\\\\t\\\\tv _ c asciiValue.\\\\n\\\\t\\\\t(v > 128)\\\\n\\\\t\\\\t\\\\tifFalse: [ s nextPut: c ]\\\\n\\\\t\\\\t\\\\tifTrue: [((v bitAnd: 252) == 192)\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self error: 'illegal UTF-8 ISO character']\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(i > self size) ifTrue: [ self error: 'illegal end-of-string, expected 2nd byte of UTF-8'].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tc2 _ self at: i. i_i+1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tv2 _ c2 asciiValue.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t((v2 bitAnd: 192) = 128) ifFalse: [self error: 'illegal 2nd UTF-8 char']. \\\\n\\\\t\\\\t\\\\t\\\\t\\\\ts nextPut: ((v2 bitAnd: 63) bitOr: ((v << 6) bitAnd: 192)) asCharacter]]].\\\\n\\\\t^s contents. \\\\n! !\\\\n\\\\n!String methodsFor: 'internet' stamp: 'yo 11/3/2004 19:24'!\\\\nwithInternetLineEndings\\\\n\\\\t\\\\\\\"change line endings from CR's to CRLF's.  This is probably in\\\\nprepration for sending a string over the Internet\\\\\\\"\\\\n\\\\t| cr lf |\\\\n\\\\tcr _ Character cr.\\\\n\\\\tlf _ Character linefeed.\\\\n\\\\t^self class streamContents: [ :stream |\\\\n\\\\t\\\\tself do: [ :c |\\\\n\\\\t\\\\t\\\\tstream nextPut: c.\\\\n\\\\t\\\\t\\\\tc = cr ifTrue:[ stream nextPut: lf ]. ] ].! !\\\\n\\\\n!String methodsFor: 'internet' stamp: 'yo 11/3/2004 19:24'!\\\\nwithSqueakLineEndings\\\\n\\\\t\\\\\\\"assume the string is textual, and that CR, LF, and CRLF are all \\\\n\\\\tvalid line endings.  Replace each occurence with a single CR\\\\\\\"\\\\n\\\\t| cr lf input c crlf inPos outPos outString lineEndPos newOutPos |\\\\n\\\\tcr _ Character cr.\\\\n\\\\tlf _ Character linefeed.\\\\n\\\\tcrlf _ CharacterSet new.\\\\n\\\\tcrlf add: cr; add: lf.\\\\n\\\\n\\\\tinPos _ 1.\\\\n\\\\toutPos _ 1.\\\\n\\\\toutString _\\\\n String new: self size.\\\\n\\\\n\\\\t[ lineEndPos _ self indexOfAnyOf: crlf startingAt: inPos ifAbsent: [0].\\\\n\\\\t\\\\tlineEndPos ~= 0 ] whileTrue: [\\\\n\\\\t\\\\t\\\\tnewOutPos _ outPos + (lineEndPos - inPos + 1).\\\\n\\\\t\\\\t\\\\toutString replaceFrom: outPos to: newOutPos - 2 with: self startingAt: inPos.\\\\n\\\\t\\\\t\\\\toutString at: newOutPos-1 put: cr.\\\\n\\\\t\\\\t\\\\toutPos _ newOutPos.\\\\n\\\\n\\\\t\\\\t\\\\t((self at: lineEndPos) = cr and: [ lineEndPos < self size and: [ (self at: lineEndPos+1) = lf ] ]) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"CRLF ending\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tinPos _ lineEndPos + 2 ]\\\\n\\\\t\\\\t\\\\tifFalse: [ \\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"CR or LF ending\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tinPos _ lineEndPos + 1 ]. ].\\\\n\\\\n\\\\t\\\\\\\"no more line endings.  copy the rest\\\\\\\"\\\\n\\\\tnewOutPos _ outPos + (self size - inPos + 1).\\\\n\\\\toutString replaceFrom: outPos to: newOutPos-1 with: self startingAt: inPos.\\\\n\\\\n\\\\t^outString copyFrom: 1 to: newOutPos-1\\\\n\\\\t! !\\\\n\\\\n!String methodsFor: 'internet' stamp: 'yo 11/3/2004 19:24'!\\\\nwithoutQuoting\\\\n\\\\t\\\\\\\"remove the initial and final quote marks, if present\\\\\\\"\\\\n\\\\t\\\\\\\"'''h''' withoutQuoting\\\\\\\"\\\\n\\\\t| quote |\\\\n\\\\tself size < 2 ifTrue: [ ^self ].\\\\n\\\\tquote _ self first.\\\\n\\\\t(quote = $' or: [ quote = $\\\\\\\" ])\\\\n\\\\t\\\\tifTrue: [ ^self copyFrom: 2 to: self size - 1 ]\\\\n\\\\t\\\\tifFalse: [ ^self ].! !\\\\n\\\\n\\\\n!String methodsFor: 'paragraph support' stamp: 'yo 8/26/2002 22:19'!\\\\nindentationIfBlank: aBlock\\\\n\\\\t\\\\\\\"Answer the number of leading tabs in the receiver.  If there are\\\\n\\\\t no visible characters, pass the number of tabs to aBlock and return its value.\\\\\\\"\\\\n\\\\n\\\\t| reader leadingTabs lastSeparator cr tab ch |\\\\n\\\\tcr _ Character cr.\\\\n\\\\ttab _ Character tab.\\\\n\\\\treader _ ReadStream on: self.\\\\n\\\\tleadingTabs _ 0.\\\\n\\\\t[reader atEnd not and: [(ch _ reader next) = tab]]\\\\n\\\\t\\\\twhileTrue: [leadingTabs _ leadingTabs + 1].\\\\n\\\\tlastSeparator _ leadingTabs + 1.\\\\n\\\\t[reader atEnd not and: [ch isSeparator and: [ch ~= cr]]]\\\\n\\\\t\\\\twhileTrue: [lastSeparator _ lastSeparator + 1. ch _ reader next].\\\\n\\\\tlastSeparator = self size | (ch = cr)\\\\n\\\\t\\\\tifTrue: [^aBlock value: leadingTabs].\\\\n\\\\t^ leadingTabs.\\\\n! !\\\\n\\\\n\\\\n!String methodsFor: 'printing' stamp: 'yo 11/3/2004 19:24'!\\\\nbasicType\\\\n\\\\t\\\\\\\"Answer a symbol representing the inherent type of the receiver\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Number String Boolean player collection sound color etc\\\\\\\"\\\\n\\\\t^ #String! !\\\\n\\\\n!String methodsFor: 'printing' stamp: 'yo 8/26/2002 22:57'!\\\\nencodeDoublingQuoteOn: aStream \\\\n\\\\t\\\\\\\"Print inside string quotes, doubling inbedded quotes.\\\\\\\"\\\\n\\\\t| x |\\\\n\\\\taStream print: $'.\\\\n\\\\t1 to: self size do:\\\\n\\\\t\\\\t[:i |\\\\n\\\\t\\\\taStream print: (x _ self at: i).\\\\n\\\\t\\\\tx = $' ifTrue: [aStream print: x]].\\\\n\\\\taStream print: $'! !\\\\n\\\\n!String methodsFor: 'printing' stamp: 'yo 11/3/2004 19:24'!\\\\nisLiteral\\\\n\\\\n\\\\t^true! !\\\\n\\\\n!String methodsFor: 'printing' stamp: 'sd 7/8/2006 18:06'!\\\\nprintOn: aStream \\\\n\\\\t\\\\\\\"Print inside string quotes, doubling inbedded quotes.\\\\\\\"\\\\n \\\\n\\\\tself storeOn: aStream! !\\\\n\\\\n!String methodsFor: 'printing' stamp: 'yo 8/26/2002 22:58'!\\\\nstoreOn: aStream \\\\n\\\\t\\\\\\\"Print inside string quotes, doubling inbedded quotes.\\\\\\\"\\\\n\\\\t| x |\\\\n\\\\taStream nextPut: $'.\\\\n\\\\t1 to: self size do:\\\\n\\\\t\\\\t[:i |\\\\n\\\\t\\\\taStream nextPut: (x _ self at: i).\\\\n\\\\t\\\\tx = $' ifTrue: [aStream nextPut: x]].\\\\n\\\\taStream nextPut: $'! !\\\\n\\\\n!String methodsFor: 'printing' stamp: 'yo 11/3/2004 19:24'!\\\\nstringRepresentation\\\\n\\\\t\\\\\\\"Answer a string that represents the receiver.  For most objects this is simply its printString, but for strings themselves, it's themselves, to avoid the superfluous extra pair of quotes.  6/12/96 sw\\\\\\\"\\\\n\\\\n\\\\t^ self ! !\\\\n\\\\n\\\\n!String methodsFor: 'system primitives' stamp: 'sw 10/20/2004 17:51'!\\\\nendsWithAColon \\\\n\\\\t\\\\\\\"Answer whether the final character of the receiver is a colon\\\\\\\"\\\\n\\\\n\\\\t^ self size > 0 and: [self last == $:]\\\\n\\\\n\\\\\\\"\\\\n#fred: endsWithAColon\\\\n'fred' endsWithAColon\\\\n\\\\\\\"! !\\\\n\\\\n!String methodsFor: 'system primitives' stamp: 'ar 4/10/2005 16:55'!\\\\nfindSubstring: key in: body startingAt: start matchTable: matchTable\\\\n\\\\t\\\\\\\"Answer the index in the string body at which the substring key first occurs, at or beyond start.  The match is determined using matchTable, which can be used to effect, eg, case-insensitive matches.  If no match is found, zero will be returned.\\\\\\\"\\\\n\\\\t| index c1 c2 |\\\\n\\\\tmatchTable == nil ifTrue: [\\\\n\\\\t\\\\tkey size = 0 ifTrue: [^ 0].\\\\n\\\\t\\\\tstart to: body size - key size + 1 do:\\\\n\\\\t\\\\t\\\\t[:startIndex |\\\\n\\\\t\\\\t\\\\tindex _ 1.\\\\n\\\\t\\\\t\\\\t\\\\t[(body at: startIndex+index-1)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t= (key at: index)]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\twhileTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[index = key size ifTrue: [^ startIndex].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tindex _ index+1]].\\\\n\\\\t\\\\t^ 0\\\\n\\\\t].\\\\n\\\\n\\\\tkey size = 0 ifTrue: [^ 0].\\\\n\\\\tstart to: body size - key size + 1 do:\\\\n\\\\t\\\\t[:startIndex |\\\\n\\\\t\\\\tindex _ 1.\\\\n\\\\t\\\\t[c1 _ body at: startIndex+index-1.\\\\n\\\\t\\\\tc2 _ key at: index.\\\\n\\\\t\\\\t((c1 leadingChar = 0) ifTrue: [(matchTable at: c1 asciiValue + 1)]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [c1 asciiValue + 1])\\\\n\\\\t\\\\t\\\\t= ((c2 leadingChar = 0) ifTrue: [(matchTable at: c2 asciiValue + 1)]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [c2 asciiValue + 1])]\\\\n\\\\t\\\\t\\\\twhileTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[index = key size ifTrue: [^ startIndex].\\\\n\\\\t\\\\t\\\\t\\\\tindex _ index+1]].\\\\n\\\\t^ 0\\\\n! !\\\\n\\\\n!String methodsFor: 'system primitives' stamp: 'yo 11/3/2004 19:24'!\\\\nnumArgs \\\\n\\\\t\\\\\\\"Answer either the number of arguments that the receiver would take if considered a selector.  Answer -1 if it couldn't be a selector.  Note that currently this will answer -1 for anything begining with an uppercase letter even though the system will accept such symbols as selectors.  It is intended mostly for the assistance of spelling correction.\\\\\\\"\\\\n\\\\n\\\\t| firstChar numColons excess start ix |\\\\n\\\\tself size = 0 ifTrue: [^ -1].\\\\n\\\\tfirstChar _ self at: 1.\\\\n\\\\t(firstChar isLetter or: [firstChar = $:]) ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"Fast reject if any chars are non-alphanumeric\\\\\\\"\\\\n\\\\t\\\\t(self findSubstring: '~' in: self startingAt: 1 matchTable: Tokenish) > 0 ifTrue: [^ -1].\\\\n\\\\t\\\\t\\\\\\\"Fast colon count\\\\\\\"\\\\n\\\\t\\\\tnumColons _ 0.  start _ 1.\\\\n\\\\t\\\\t[(ix _ self findSubstring: ':' in: self startingAt: start matchTable: CaseSensitiveOrder) > 0]\\\\n\\\\t\\\\t\\\\twhileTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[numColons _ numColons + 1.\\\\n\\\\t\\\\t\\\\t\\\\tstart _ ix + 1].\\\\n\\\\t\\\\tnumColons = 0 ifTrue: [^ 0].\\\\n\\\\t\\\\tfirstChar = $:\\\\n\\\\t\\\\t\\\\tifTrue: [excess _ 2 \\\\\\\"Has an initial keyword, as #:if:then:else:\\\\\\\"]\\\\n\\\\t\\\\t\\\\tifFalse: [excess _ 0].\\\\n\\\\t\\\\tself last = $:\\\\n\\\\t\\\\t\\\\tifTrue: [^ numColons - excess]\\\\n\\\\t\\\\t\\\\tifFalse: [^ numColons - excess - 1 \\\\\\\"Has a final keywords as #nextPut::andCR\\\\\\\"]].\\\\n\\\\tfirstChar isSpecial ifTrue:\\\\n\\\\t\\\\t[self size = 1 ifTrue: [^ 1].\\\\n\\\\t\\\\t2 to: self size do: [:i | (self at: i) isSpecial ifFalse: [^ -1]].\\\\n\\\\t\\\\t^ 1].\\\\n\\\\t^ -1.! !\\\\n\\\\n\\\\n!String methodsFor: 'testing' stamp: 'yo 11/3/2004 19:24'!\\\\nhasContentsInExplorer\\\\n\\\\n\\\\t^false! !\\\\n\\\\n!String methodsFor: 'testing' stamp: 'ar 4/10/2005 16:49'!\\\\nincludesUnifiedCharacter\\\\n\\\\t^false! !\\\\n\\\\n!String methodsFor: 'testing' stamp: 'yo 11/3/2004 19:24'!\\\\nisAllDigits\\\\n\\\\t\\\\\\\"whether the receiver is composed entirely of digits\\\\\\\"\\\\n\\\\tself do: [:c | c isDigit ifFalse: [^ false]].\\\\n\\\\t^ true! !\\\\n\\\\n!String methodsFor: 'testing' stamp: 'yo 11/3/2004 19:24'!\\\\nisAllSeparators\\\\n\\\\t\\\\\\\"whether the receiver is composed entirely of separators\\\\\\\"\\\\n\\\\tself do: [ :c | c isSeparator ifFalse: [ ^false ] ].\\\\n\\\\t^true! !\\\\n\\\\n!String methodsFor: 'testing' stamp: 'yo 8/4/2003 12:26'!\\\\nisAsciiString\\\\n\\\\n\\\\t| c |\\\\n\\\\tc _ self detect: [:each | each asciiValue > 127] ifNone: [nil].\\\\n\\\\t^ c isNil.\\\\n! !\\\\n\\\\n!String methodsFor: 'testing' stamp: 'ar 4/10/2005 16:23'!\\\\nisByteString\\\\n\\\\t\\\\\\\"Answer whether the receiver is a ByteString\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n!String methodsFor: 'testing' stamp: 'ar 4/10/2005 23:25'!\\\\nisOctetString\\\\n\\\\t\\\\\\\"Answer whether the receiver can be represented as a byte string. \\\\n\\\\tThis is different from asking whether the receiver *is* a ByteString \\\\n\\\\t(i.e., #isByteString)\\\\\\\"\\\\n\\\\t1 to: self size do: [:pos |\\\\n\\\\t\\\\t(self at: pos) asInteger >= 256 ifTrue: [^ false].\\\\n\\\\t].\\\\n\\\\t^ true.\\\\n! !\\\\n\\\\n!String methodsFor: 'testing' stamp: 'yo 11/3/2004 19:24'!\\\\nisString\\\\n\\\\t^ true! !\\\\n\\\\n!String methodsFor: 'testing' stamp: 'ar 4/12/2005 19:52'!\\\\nisWideString\\\\n\\\\t\\\\\\\"Answer whether the receiver is a WideString\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n!String methodsFor: 'testing' stamp: 'yo 11/3/2004 19:24'!\\\\nlastSpacePosition\\\\n\\\\t\\\\\\\"Answer the character position of the final space or other separator character in the receiver, and 0 if none\\\\\\\"\\\\n\\\\tself size to: 1 by: -1 do:\\\\n\\\\t\\\\t[:i | ((self at: i) isSeparator) ifTrue: [^ i]].\\\\n\\\\t^ 0\\\\n\\\\n\\\\\\\"\\\\n'fred the bear' lastSpacePosition\\\\n'ziggie' lastSpacePosition\\\\n'elvis ' lastSpacePosition\\\\n'wimpy  ' lastSpacePosition\\\\n'' lastSpacePosition\\\\n\\\\\\\"! !\\\\n\\\\n\\\\n!String methodsFor: 'translating' stamp: 'dgd 8/24/2004 19:42'!\\\\ntranslated\\\\n\\\\t\\\\\\\"answer the receiver translated to the default language\\\\\\\"\\\\n\\\\t^ NaturalLanguageTranslator current  translate: self! !\\\\n\\\\n!String methodsFor: 'translating' stamp: 'dgd 8/27/2004 18:43'!\\\\ntranslatedIfCorresponds\\\\n\\\\t\\\\\\\"answer the receiver translated to the default language only if \\\\n\\\\tthe receiver begins and ends with an underscore (_)\\\\\\\"\\\\n\\\\t^ ('_*_' match: self)\\\\n\\\\t\\\\tifTrue: [(self copyFrom: 2 to: self size - 1) translated]\\\\n\\\\t\\\\tifFalse: [self]! !\\\\n\\\\n!String methodsFor: 'translating' stamp: 'dgd 8/24/2004 19:38'!\\\\ntranslatedTo: localeID \\\\n\\\\t\\\\\\\"answer the receiver translated to the given locale id\\\\\\\"\\\\n\\\\t^ localeID translator translate: self! !\\\\n\\\\n\\\\n!String methodsFor: 'user interface' stamp: 'md 7/28/2005 20:42'!\\\\nasExplorerString\\\\n\\\\n\\\\t^ self printString! !\\\\n\\\\n!String methodsFor: 'user interface' stamp: 'ar 9/27/2005 20:02'!\\\\nopenInWorkspaceWithTitle: aTitle\\\\n\\\\t\\\\\\\"Open up a workspace with the receiver as its contents, with the given title\\\\\\\"\\\\n\\\\tUIManager default edit: self label: aTitle! !\\\\n\\\\n\\\\n!String methodsFor: '*eToys-*Morphic' stamp: 'ar 4/10/2005 17:06'!\\\\nnewTileMorphRepresentative\\\\n\\\\t^ TileMorph new setLiteral: self;addSuffixIfCan! !\\\\n\\\\n\\\\n!String methodsFor: '*Morphic' stamp: 'ar 4/10/2005 17:07'!\\\\nasMorph \\\\n\\\\t\\\\\\\"Answer the receiver as a StringMorph\\\\\\\"\\\\n\\\\n\\\\t^ StringMorph contents: self\\\\n\\\\n\\\\\\\"'bugs black blood' asMorph openInHand\\\\\\\"! !\\\\n\\\\n!String methodsFor: '*Morphic' stamp: 'ar 4/10/2005 17:07'!\\\\nasStringMorph \\\\n\\\\t\\\\\\\"Answer the receiver as a StringMorph\\\\\\\"\\\\n\\\\n\\\\t^ StringMorph contents: self\\\\n\\\\n\\\\\\\"'bugs black blood' asStringMorph openInHand\\\\\\\"! !\\\\n\\\\n\\\\n!String methodsFor: '*MorphicExtras-*morphic-Postscript Canvases' stamp: 'yo 11/3/2004 19:24'!\\\\nasPostscript\\\\n\\\\n\\\\t| temp |\\\\n\\\\ttemp _ self asString copyReplaceAll: '(' with: '\\\\\\\\('.\\\\n\\\\ttemp _ temp copyReplaceAll: ')' with: '\\\\\\\\)'.\\\\n\\\\ttemp _ temp copyReplaceAll: '\\\\n' \\\\n\\\\t\\\\t\\\\twith: ''.\\\\n\\\\t^ PostscriptEncoder mapMacStringToPS: temp! !\\\\n\\\\n\\\\n!String methodsFor: '*Morphic-converting' stamp: 'yo 11/3/2004 19:24'!\\\\nopenAsMorph\\\\n\\\\t\\\\\\\"Open the receiver as a morph\\\\\\\"\\\\n\\\\n\\\\t^ self asMorph openInHand ! !\\\\n\\\\n\\\\n!String methodsFor: '*monticello' stamp: 'avi 2/4/2004 14:14'!\\\\nextractNumber\\\\n\\\\t^ ('0', self select: [:ea | ea isDigit]) asNumber! !\\\\n\\\\n\\\\n!String methodsFor: '*network-uri' stamp: 'mir 2/26/2002 14:59'!\\\\nasURI\\\\n\\\\t\\\\\\\"convert to a Url\\\\\\\"\\\\n\\\\t\\\\\\\"'http://www.cc.gatech.edu/' asURI\\\\\\\"\\\\n\\\\t\\\\\\\"'msw://chaos.resnet.gatech.edu:9000/' asURI\\\\\\\"\\\\n\\\\t^URI fromString: self! !\\\\n\\\\n\\\\n!String methodsFor: '*packageinfo-base' stamp: 'nk 8/30/2004 09:02'!\\\\nescapeEntities\\\\n\\\\t^ self species streamContents: [:s | self do: [:c | s nextPutAll: c escapeEntities]]\\\\n! !\\\\n\\\\n\\\\n!String methodsFor: '*services-base' stamp: 'rr 3/21/2006 12:00'!\\\\nservice\\\\n\\\\t^ self serviceOrNil ifNil: [ServiceCategory new id: self asSymbol]! !\\\\n\\\\n!String methodsFor: '*services-base' stamp: 'rr 3/21/2006 12:00'!\\\\nserviceOrNil\\\\n\\\\t^ ServiceRegistry current serviceWithId: self asSymbol! !\\\\n\\\\n\\\\n!String methodsFor: '*versionnumber' stamp: 'yo 11/3/2004 19:24'!\\\\nasVersion\\\\n\\\\n\\\\t\\\\\\\"Answer a VersionNumber\\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\t^VersionNumber fromString: self! !\\\\n\\\\n\\\\n!String methodsFor: 'private' stamp: 'yo 11/3/2004 19:24'!\\\\ncorrectAgainstEnumerator: wordBlock continuedFrom: oldCollection\\\\n\\\\t\\\\\\\"The guts of correction, instead of a wordList, there is a block that should take another block and enumerate over some list with it.\\\\\\\"\\\\n\\\\n\\\\t| choices scoreMin results score maxChoices |\\\\n\\\\tscoreMin _ self size // 2 min: 3.\\\\n\\\\tmaxChoices _ 10.\\\\n\\\\toldCollection isNil\\\\n\\\\t\\\\tifTrue: [ choices _ SortedCollection sortBlock: [ :x :y | x value > y value ] ]\\\\n\\\\t\\\\tifFalse: [ choices _ oldCollection ].\\\\n\\\\twordBlock isNil\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[ results _ OrderedCollection new.\\\\n\\\\t\\\\t\\\\t1 to: (maxChoices min: choices size) do: [ :i | results add: (choices at: i) key ] ]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[ wordBlock value: [ :word |\\\\n\\\\t\\\\t\\\\t\\\\t(score _ self alike: word) >= scoreMin ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[ choices add: (Association key: word value: score).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(choices size >= maxChoices) ifTrue: [ scoreMin _ (choices at: maxChoices) value] ] ].\\\\n\\\\t\\\\t\\\\tresults _ choices ].\\\\n\\\\t^ results! !\\\\n\\\\n!String methodsFor: 'private' stamp: 'yo 11/3/2004 19:24'!\\\\nevaluateExpression: aString parameters: aCollection \\\\n\\\\t\\\\\\\"private - evaluate the expression aString with  \\\\n\\\\taCollection as the parameters and answer the  \\\\n\\\\tevaluation result as an string\\\\\\\"\\\\n\\\\t| index |\\\\n\\\\tindex := ('0' , aString) asNumber.\\\\n\\\\n\\\\tindex isZero\\\\n\\\\t\\\\tifTrue: [^ '[invalid subscript: {1}]' format: {aString}].\\\\n\\\\n\\\\tindex > aCollection size\\\\n\\\\t\\\\tifTrue: [^ '[subscript is out of bounds: {1}]' format: {aString}].\\\\n\\\\n\\\\t^ (aCollection at: index) asString! !\\\\n\\\\n!String methodsFor: 'private' stamp: 'yo 11/3/2004 19:24'!\\\\ngetEnclosedExpressionFrom: aStream \\\\n\\\\t\\\\\\\"private - get the expression enclosed between '{' and \\\\n\\\\t'}' and remove all the characters from the stream\\\\\\\"\\\\n\\\\t| result currentChar |\\\\n\\\\tresult := String new writeStream.\\\\n\\\\n\\\\t[aStream atEnd \\\\n\\\\t\\\\tor: [(currentChar := aStream next) == $}]]\\\\n\\\\t\\\\twhileFalse: [result nextPut: currentChar].\\\\n\\\\n\\\\t^ result contents withBlanksTrimmed! !\\\\n\\\\n!String methodsFor: 'private' stamp: 'yo 8/26/2002 22:53'!\\\\nreplaceFrom: start to: stop with: replacement startingAt: repStart \\\\n\\\\t\\\\\\\"Primitive. This destructively replaces elements from start to stop in the receiver starting at index, repStart, in the collection, replacement. Answer the receiver. Range checks are performed in the primitive only. Optional. See Object documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\t<primitive: 105>\\\\n\\\\tsuper replaceFrom: start to: stop with: replacement startingAt: repStart! !\\\\n\\\\n!String methodsFor: 'private' stamp: 'yo 8/28/2002 15:22'!\\\\nstringhash\\\\n\\\\n\\\\t^ self hash.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nString class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!String class methodsFor: 'examples' stamp: 'yo 11/3/2004 19:24'!\\\\nexample\\\\n\\\\t\\\\\\\"To see the string displayed at the cursor point, execute this expression\\\\n\\\\tand select a point by pressing a mouse button.\\\\\\\"\\\\n\\\\n\\\\t'this is some text' displayOn: Display at: Sensor waitButton! !\\\\n\\\\n\\\\n!String class methodsFor: 'formatting' stamp: 'md 6/5/2005 07:49'!\\\\nexpandMacro: macroType argument: argument withExpansions: expansions \\\\n\\\\tmacroType = $s ifTrue: [^expansions at: argument].\\\\n\\\\tmacroType = $p ifTrue: [^(expansions at: argument) printString].\\\\n\\\\tmacroType = $n ifTrue: [^String cr].\\\\n\\\\tmacroType = $t ifTrue: [^String tab].\\\\n\\\\tself error: 'unknown expansion type'! !\\\\n\\\\n\\\\n!String class methodsFor: 'initialization' stamp: 'ar 4/9/2005 22:37'!\\\\ninitialize   \\\\\\\"self initialize\\\\\\\"\\\\n\\\\n\\\\t| order |\\\\n\\\\tAsciiOrder _ (0 to: 255) as: ByteArray.\\\\n\\\\n\\\\tCaseInsensitiveOrder _ AsciiOrder copy.\\\\n\\\\t($a to: $z) do:\\\\n\\\\t\\\\t[:c | CaseInsensitiveOrder at: c asciiValue + 1\\\\n\\\\t\\\\t\\\\t\\\\tput: (CaseInsensitiveOrder at: c asUppercase asciiValue +1)].\\\\n\\\\n\\\\t\\\\\\\"Case-sensitive compare sorts space, digits, letters, all the rest...\\\\\\\"\\\\n\\\\tCaseSensitiveOrder _ ByteArray new: 256 withAll: 255.\\\\n\\\\torder _ -1.\\\\n\\\\t' 0123456789' do:  \\\\\\\"0..10\\\\\\\"\\\\n\\\\t\\\\t[:c | CaseSensitiveOrder at: c asciiValue + 1 put: (order _ order+1)].\\\\n\\\\t($a to: $z) do:     \\\\\\\"11-64\\\\\\\"\\\\n\\\\t\\\\t[:c | CaseSensitiveOrder at: c asUppercase asciiValue + 1 put: (order _ order+1).\\\\n\\\\t\\\\tCaseSensitiveOrder at: c asciiValue + 1 put: (order _ order+1)].\\\\n\\\\t1 to: CaseSensitiveOrder size do:\\\\n\\\\t\\\\t[:i | (CaseSensitiveOrder at: i) = 255 ifTrue:\\\\n\\\\t\\\\t\\\\t[CaseSensitiveOrder at: i put: (order _ order+1)]].\\\\n\\\\torder = 255 ifFalse: [self error: 'order problem'].\\\\n\\\\n\\\\t\\\\\\\"a table for translating to lower case\\\\\\\"\\\\n\\\\tLowercasingTable _ String withAll: (Character allByteCharacters collect: [:c | c asLowercase]).\\\\n\\\\n\\\\t\\\\\\\"a table for translating to upper case\\\\\\\"\\\\n\\\\tUppercasingTable _ String withAll: (Character allByteCharacters collect: [:c | c asUppercase]).\\\\n\\\\n\\\\t\\\\\\\"a table for testing tokenish (for fast numArgs)\\\\\\\"\\\\n\\\\tTokenish _ String withAll: (Character allByteCharacters collect:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:c | c tokenish ifTrue: [c] ifFalse: [$~]]).\\\\n\\\\n\\\\t\\\\\\\"CR and LF--characters that terminate a line\\\\\\\"\\\\n\\\\tCSLineEnders _ CharacterSet empty.\\\\n\\\\tCSLineEnders add: Character cr.\\\\n\\\\tCSLineEnders add: Character lf.\\\\n\\\\n \\\\t\\\\\\\"separators and non-separators\\\\\\\"\\\\n\\\\tCSSeparators _ CharacterSet separators.\\\\n\\\\tCSNonSeparators _ CSSeparators complement.! !\\\\n\\\\n!String class methodsFor: 'initialization' stamp: 'yo 8/11/2003 21:11'!\\\\ninitializeHtmlEntities\\\\n\\\\t\\\\\\\"self initializeHtmlEntities\\\\\\\"\\\\n\\\\n\\\\tHtmlEntities _ (Dictionary new: 128)\\\\n\\\\t\\\\tat: 'amp'\\\\tput: $&;\\\\n\\\\t\\\\tat: 'lt'\\\\t\\\\tput: $<;\\\\n\\\\t\\\\tat: 'gt'\\\\t\\\\tput: $>;\\\\n\\\\t\\\\tat: 'quot'\\\\tput: $\\\\\\\";\\\\n\\\\t\\\\tat: 'euro'\\\\tput: Character euro;\\\\n\\\\t\\\\tyourself.\\\\n\\\\t#('nbsp' 'iexcl' 'cent' 'pound' 'curren' 'yen' 'brvbar' 'sect' 'uml' 'copy' 'ordf' 'laquo' 'not' 'shy' 'reg' 'hibar' 'deg' 'plusmn' 'sup2' 'sup3' 'acute' 'micro' 'para' 'middot' 'cedil' 'sup1' 'ordm' 'raquo' 'frac14' 'frac12' 'frac34' 'iquest' 'Agrave' 'Aacute' 'Acirc' 'Atilde' 'Auml' 'Aring' 'AElig' 'Ccedil' 'Egrave' 'Eacute' 'Ecirc' 'Euml' 'Igrave' 'Iacute' 'Icirc' 'Iuml' 'ETH' 'Ntilde' 'Ograve' 'Oacute' 'Ocirc' 'Otilde' 'Ouml' 'times' 'Oslash' 'Ugrave' 'Uacute' 'Ucirc' 'Uuml' 'Yacute' 'THORN' 'szlig' 'agrave' 'aacute' 'acirc' 'atilde' 'auml' 'aring' 'aelig' 'ccedil' 'egrave' 'eacute' 'ecirc' 'euml' 'igrave' 'iacute' 'icirc' 'iuml' 'eth' 'ntilde' 'ograve' 'oacute' 'ocirc' 'otilde' 'ouml' 'divide' 'oslash' 'ugrave' 'uacute' 'ucirc' 'uuml' 'yacute' 'thorn' 'yuml' ) withIndexDo: [:each :index | HtmlEntities at: each put: (index + 159) asCharacter]! !\\\\n\\\\n\\\\n!String class methodsFor: 'instance creation' stamp: 'yo 11/3/2004 19:24'!\\\\ncr\\\\n\\\\t\\\\\\\"Answer a string containing a single carriage return character.\\\\\\\"\\\\n\\\\n\\\\t^ self with: Character cr\\\\n! !\\\\n\\\\n!String class methodsFor: 'instance creation' stamp: 'yo 11/3/2004 19:24'!\\\\ncrlf\\\\n\\\\t\\\\\\\"Answer a string containing a carriage return and a linefeed.\\\\\\\"\\\\n\\\\n\\\\t^ self with: Character cr with: Character lf\\\\n! !\\\\n\\\\n!String class methodsFor: 'instance creation' stamp: 'yo 11/3/2004 19:24'!\\\\ncrlfcrlf\\\\n\\\\t^self crlf , self crlf.\\\\n! !\\\\n\\\\n!String class methodsFor: 'instance creation' stamp: 'ar 4/10/2005 16:24'!\\\\nfromByteArray: aByteArray\\\\n\\\\n\\\\t^ aByteArray asString\\\\n! !\\\\n\\\\n!String class methodsFor: 'instance creation' stamp: 'yo 11/3/2004 19:24'!\\\\nfromPacked: aLong\\\\n\\\\t\\\\\\\"Convert from a longinteger to a String of length 4.\\\\\\\"\\\\n\\\\n\\\\t| s |\\\\n\\\\ts _ self new: 4.\\\\n\\\\ts at: 1 put: (aLong digitAt: 4) asCharacter.\\\\n\\\\ts at: 2 put: (aLong digitAt: 3) asCharacter.\\\\n\\\\ts at: 3 put: (aLong digitAt: 2) asCharacter.\\\\n\\\\ts at: 4 put: (aLong digitAt: 1) asCharacter.\\\\n\\\\t^s\\\\n\\\\n\\\\\\\"String fromPacked: 'TEXT' asPacked\\\\\\\"\\\\n! !\\\\n\\\\n!String class methodsFor: 'instance creation' stamp: 'yo 11/3/2004 19:24'!\\\\nfromString: aString \\\\n\\\\t\\\\\\\"Answer an instance of me that is a copy of the argument, aString.\\\\\\\"\\\\n\\\\t\\\\n\\\\t^ aString copyFrom: 1 to: aString size! !\\\\n\\\\n!String class methodsFor: 'instance creation' stamp: 'yo 11/3/2004 19:24'!\\\\nlf\\\\n\\\\t\\\\\\\"Answer a string containing a single carriage return character.\\\\\\\"\\\\n\\\\n\\\\t^ self with: Character lf! !\\\\n\\\\n!String class methodsFor: 'instance creation' stamp: 'ar 4/10/2005 23:26'!\\\\nnew: sizeRequested \\\\n\\\\t\\\\\\\"Answer an instance of this class with the number of indexable\\\\n\\\\tvariables specified by the argument, sizeRequested.\\\\\\\"\\\\n\\\\tself == String \\\\n\\\\t\\\\tifTrue:[^ByteString new: sizeRequested]\\\\n\\\\t\\\\tifFalse:[^self basicNew: sizeRequested].! !\\\\n\\\\n!String class methodsFor: 'instance creation' stamp: 'yo 8/28/2002 13:27'!\\\\nreadFrom: inStream\\\\n\\\\t\\\\\\\"Answer an instance of me that is determined by reading the stream, \\\\n\\\\tinStream. Embedded double quotes become the quote Character.\\\\\\\"\\\\n\\\\n\\\\t| outStream char done |\\\\n\\\\toutStream _ WriteStream on: (self new: 16).\\\\n\\\\t\\\\\\\"go to first quote\\\\\\\"\\\\n\\\\tinStream skipTo: $'.\\\\n\\\\tdone _ false.\\\\n\\\\t[done or: [inStream atEnd]]\\\\n\\\\t\\\\twhileFalse: \\\\n\\\\t\\\\t\\\\t[char _ inStream next.\\\\n\\\\t\\\\t\\\\tchar = $'\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[char _ inStream next.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tchar = $'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [outStream nextPut: char]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [done _ true]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [outStream nextPut: char]].\\\\n\\\\t^outStream contents! !\\\\n\\\\n!String class methodsFor: 'instance creation' stamp: 'yo 11/3/2004 19:24'!\\\\ntab\\\\n\\\\t\\\\\\\"Answer a string containing a single tab character.\\\\\\\"\\\\n\\\\n\\\\t^ self with: Character tab\\\\n! !\\\\n\\\\n!String class methodsFor: 'instance creation' stamp: 'yo 8/28/2002 13:29'!\\\\nvalue: anInteger\\\\n\\\\n\\\\t^ self with: (Character value: anInteger).\\\\n! !\\\\n\\\\n!String class methodsFor: 'instance creation' stamp: 'ar 4/12/2005 17:34'!\\\\nwith: aCharacter\\\\n\\\\t| newCollection |\\\\n\\\\taCharacter asInteger < 256\\\\n\\\\t\\\\tifTrue:[newCollection _ ByteString new: 1]\\\\n\\\\t\\\\tifFalse:[newCollection _ WideString new: 1].\\\\n\\\\tnewCollection at: 1 put: aCharacter.\\\\n\\\\t^newCollection! !\\\\n\\\\n\\\\n!String class methodsFor: 'primitives' stamp: 'yo 12/15/2005 13:41'!\\\\ncompare: string1 with: string2 collated: order\\\\n\\\\t\\\\\\\"Return 1, 2 or 3, if string1 is <, =, or > string2, with the collating order of characters given by the order array.\\\\\\\"\\\\n\\\\n\\\\t| len1 len2 c1 c2 |\\\\n\\\\torder == nil ifTrue: [\\\\n\\\\t\\\\tlen1 _ string1 size.\\\\n\\\\t\\\\tlen2 _ string2 size.\\\\n\\\\t\\\\t1 to: (len1 min: len2) do:[:i |\\\\n\\\\t\\\\t\\\\tc1 _ (string1 at: i) asInteger.\\\\n\\\\t\\\\t\\\\tc2 _ (string2 at: i) asInteger.\\\\n\\\\t\\\\t\\\\tc1 = c2 ifFalse: [c1 < c2 ifTrue: [^ 1] ifFalse: [^ 3]].\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tlen1 = len2 ifTrue: [^ 2].\\\\n\\\\t\\\\tlen1 < len2 ifTrue: [^ 1] ifFalse: [^ 3].\\\\n\\\\t].\\\\n\\\\tlen1 _ string1 size.\\\\n\\\\tlen2 _ string2 size.\\\\n\\\\t1 to: (len1 min: len2) do:[:i |\\\\n\\\\t\\\\tc1 _ (string1 at: i) asInteger.\\\\n\\\\t\\\\tc2 _ (string2 at: i) asInteger.\\\\n\\\\t\\\\tc1 < 256 ifTrue: [c1 _ order at: c1 + 1].\\\\n\\\\t\\\\tc2 < 256 ifTrue: [c2 _ order at: c2 + 1].\\\\n\\\\t\\\\tc1 = c2 ifFalse:[c1 < c2 ifTrue: [^ 1] ifFalse: [^ 3]].\\\\n\\\\t].\\\\n\\\\tlen1 = len2 ifTrue: [^ 2].\\\\n\\\\tlen1 < len2 ifTrue: [^ 1] ifFalse: [^ 3].\\\\n! !\\\\n\\\\n!String class methodsFor: 'primitives' stamp: 'ar 4/10/2005 16:36'!\\\\nfindFirstInString: aString inSet: inclusionMap startingAt: start\\\\n\\\\t\\\\\\\"Trivial, non-primitive version\\\\\\\"\\\\n\\\\t| i stringSize ascii more |\\\\n\\\\tinclusionMap size ~= 256 ifTrue: [^ 0].\\\\n\\\\tstringSize _ aString size.\\\\n\\\\tmore _ true.\\\\n\\\\ti _ start - 1.\\\\n\\\\t[more and: [i + 1 <= stringSize]] whileTrue: [\\\\n\\\\t\\\\ti _ i + 1.\\\\n\\\\t\\\\tascii _ (aString at: i) asciiValue.\\\\n\\\\t\\\\tmore _ ascii < 256 ifTrue: [(inclusionMap at: ascii + 1) = 0] ifFalse: [true].\\\\n\\\\t].\\\\n\\\\n\\\\ti + 1 > stringSize ifTrue: [^ 0].\\\\n\\\\t^ i! !\\\\n\\\\n!String class methodsFor: 'primitives' stamp: 'ar 4/10/2005 16:36'!\\\\nindexOfAscii: anInteger inString: aString startingAt: start\\\\n\\\\t\\\\\\\"Trivial, non-primitive version\\\\\\\"\\\\n\\\\t| stringSize |\\\\n\\\\tstringSize _ aString size.\\\\n\\\\tstart to: stringSize do: [:pos |\\\\n\\\\t\\\\t(aString at: pos) asInteger = anInteger ifTrue: [^ pos]].\\\\n\\\\t^ 0\\\\n! !\\\\n\\\\n!String class methodsFor: 'primitives' stamp: 'ar 4/10/2005 16:29'!\\\\nstringHash: aString initialHash: speciesHash\\\\n\\\\t| stringSize hash low |\\\\n\\\\tstringSize _ aString size.\\\\n\\\\thash _ speciesHash bitAnd: 16rFFFFFFF.\\\\n\\\\t1 to: stringSize do: [:pos |\\\\n\\\\t\\\\thash _ hash + (aString at: pos) asInteger.\\\\n\\\\t\\\\t\\\\\\\"Begin hashMultiply\\\\\\\"\\\\n\\\\t\\\\tlow _ hash bitAnd: 16383.\\\\n\\\\t\\\\thash _ (16r260D * low + ((16r260D * (hash bitShift: -14) + (16r0065 * low) bitAnd: 16383) * 16384)) bitAnd: 16r0FFFFFFF.\\\\n\\\\t].\\\\n\\\\t^ hash.\\\\n! !\\\\n\\\\n!String class methodsFor: 'primitives' stamp: 'ar 4/10/2005 16:36'!\\\\ntranslate: aString from: start  to: stop  table: table\\\\n\\\\t\\\\\\\"Trivial, non-primitive version\\\\\\\"\\\\n\\\\t| char |\\\\n\\\\tstart to: stop do: [:i |\\\\n\\\\t\\\\tchar _ (aString at: i) asInteger.\\\\n\\\\t\\\\tchar < 256 ifTrue: [aString at: i put: (table at: char+1)].\\\\n\\\\t].\\\\n! !\\\\nStringMorph subclass: #StringButtonMorph\\\\n\\\\tinstanceVariableNames: 'target actionSelector arguments actWhen oldColor'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'MorphicExtras-Widgets'!\\\\n\\\\n!StringButtonMorph methodsFor: 'accessing'!\\\\nactionSelector\\\\n\\\\n\\\\t^ actionSelector\\\\n! !\\\\n\\\\n!StringButtonMorph methodsFor: 'accessing'!\\\\nactionSelector: aSymbolOrString\\\\n\\\\n\\\\t(nil = aSymbolOrString or:\\\\n\\\\t ['nil' = aSymbolOrString or:\\\\n\\\\t [aSymbolOrString isEmpty]])\\\\n\\\\t\\\\tifTrue: [^ actionSelector _ nil].\\\\n\\\\n\\\\tactionSelector _ aSymbolOrString asSymbol.\\\\n! !\\\\n\\\\n!StringButtonMorph methodsFor: 'accessing'!\\\\narguments\\\\n\\\\n\\\\t^ arguments\\\\n! !\\\\n\\\\n!StringButtonMorph methodsFor: 'accessing'!\\\\narguments: aCollection\\\\n\\\\n\\\\targuments _ aCollection asArray copy.\\\\n! !\\\\n\\\\n!StringButtonMorph methodsFor: 'accessing'!\\\\ntarget\\\\n\\\\n\\\\t^ target\\\\n! !\\\\n\\\\n!StringButtonMorph methodsFor: 'accessing'!\\\\ntarget: anObject\\\\n\\\\n\\\\ttarget _ anObject\\\\n! !\\\\n\\\\n\\\\n!StringButtonMorph methodsFor: 'button' stamp: 'dgd 2/22/2003 18:45'!\\\\ndoButtonAction\\\\n\\\\t\\\\\\\"Perform the action of this button. Subclasses may override this method. The default behavior is to send the button's actionSelector to its target object with its arguments.\\\\\\\"\\\\n\\\\n\\\\t(target notNil and: [actionSelector notNil]) \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[Cursor normal \\\\n\\\\t\\\\t\\\\t\\\\tshowWhile: [target perform: actionSelector withArguments: arguments]]! !\\\\n\\\\n\\\\n!StringButtonMorph methodsFor: 'copying' stamp: 'jm 7/28/97 11:55'!\\\\nupdateReferencesUsing: aDictionary\\\\n\\\\t\\\\\\\"If the arguments array points at a morph we are copying, then point at the new copy.  And also copies the array, which is important!!\\\\\\\"\\\\n\\\\n\\\\tsuper updateReferencesUsing: aDictionary.\\\\n\\\\targuments _ arguments collect:\\\\n\\\\t\\\\t[:old | aDictionary at: old ifAbsent: [old]].\\\\n! !\\\\n\\\\n!StringButtonMorph methodsFor: 'copying' stamp: 'tk 1/8/1999 09:47'!\\\\nveryDeepFixupWith: deepCopier\\\\n\\\\t\\\\\\\"If target and arguments fields were weakly copied, fix them here.  If they were in the tree being copied, fix them up, otherwise point to the originals!!!!\\\\\\\"\\\\n\\\\nsuper veryDeepFixupWith: deepCopier.\\\\ntarget _ deepCopier references at: target ifAbsent: [target].\\\\narguments _ arguments collect: [:each |\\\\n\\\\tdeepCopier references at: each ifAbsent: [each]].\\\\n! !\\\\n\\\\n!StringButtonMorph methodsFor: 'copying' stamp: 'tk 1/8/1999 09:46'!\\\\nveryDeepInner: deepCopier\\\\n\\\\t\\\\\\\"Copy all of my instance variables.  Some need to be not copied at all, but shared.  \\\\tWarning!!!!  Every instance variable defined in this class must be handled.  We must also implement veryDeepFixupWith:.  See DeepCopier class comment.\\\\\\\"\\\\n\\\\nsuper veryDeepInner: deepCopier.\\\\n\\\\\\\"target _ target.\\\\t\\\\tWeakly copied\\\\\\\"\\\\n\\\\\\\"actionSelector _ actionSelector.\\\\t\\\\ta Symbol\\\\\\\"\\\\n\\\\\\\"arguments _ arguments.\\\\t\\\\tAll weakly copied\\\\\\\"\\\\nactWhen _ actWhen veryDeepCopyWith: deepCopier.\\\\noldColor _ oldColor veryDeepCopyWith: deepCopier.! !\\\\n\\\\n\\\\n!StringButtonMorph methodsFor: 'event handling'!\\\\nhandlesMouseDown: evt\\\\n\\\\n\\\\t^ true\\\\n! !\\\\n\\\\n!StringButtonMorph methodsFor: 'event handling' stamp: 'ar 10/25/2000 18:14'!\\\\nhandlesMouseStillDown: evt\\\\n\\\\t^actWhen == #whilePressed! !\\\\n\\\\n!StringButtonMorph methodsFor: 'event handling'!\\\\nmouseDown: evt\\\\n\\\\n\\\\toldColor _ color.\\\\n\\\\tactWhen == #buttonDown\\\\n\\\\t\\\\tifTrue: [self doButtonAction].\\\\n! !\\\\n\\\\n!StringButtonMorph methodsFor: 'event handling' stamp: 'ar 10/25/2000 18:15'!\\\\nmouseMove: evt\\\\n\\\\tactWhen == #buttonDown ifTrue: [^ self].\\\\n\\\\t(self containsPoint: evt cursorPoint)\\\\n\\\\t\\\\tifTrue:[self color: (oldColor alphaMixed: 1/2 with: Color white)]\\\\n\\\\t\\\\tifFalse: [self color: oldColor].\\\\n! !\\\\n\\\\n!StringButtonMorph methodsFor: 'event handling' stamp: 'ar 10/25/2000 18:15'!\\\\nmouseStillDown: evt\\\\n\\\\tactWhen == #whilePressed ifFalse: [^ self].\\\\n\\\\t(self containsPoint: evt cursorPoint) ifTrue:[self doButtonAction].! !\\\\n\\\\n!StringButtonMorph methodsFor: 'event handling'!\\\\nmouseUp: evt\\\\n\\\\n\\\\tself color: oldColor.\\\\n\\\\t(actWhen == #buttonUp and: [self containsPoint: evt cursorPoint])\\\\n\\\\t\\\\tifTrue: [self doButtonAction].\\\\n! !\\\\n\\\\n\\\\n!StringButtonMorph methodsFor: 'e-toy support' stamp: 'ar 3/17/2001 20:17'!\\\\nadaptToWorld: aWorld\\\\n\\\\tsuper adaptToWorld: aWorld.\\\\n\\\\ttarget _ target adaptedToWorld: aWorld.! !\\\\n\\\\n\\\\n!StringButtonMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 20:44'!\\\\ninitialize\\\\n\\\\t\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\ttarget _ nil.\\\\n\\\\tactionSelector _ #flash.\\\\n\\\\targuments _ EmptyArray.\\\\n\\\\tactWhen _ #buttonUp.\\\\n\\\\tself contents: 'Flash' ! !\\\\n\\\\n\\\\n!StringButtonMorph methodsFor: 'menu' stamp: 'wiz 1/16/2006 19:57'!\\\\naddCustomMenuItems: aCustomMenu hand: aHandMorph\\\\n\\\\n\\\\tsuper addCustomMenuItems: aCustomMenu hand: aHandMorph.\\\\n\\\\taCustomMenu add: 'change label' translated action: #setLabel.\\\\n\\\\taCustomMenu add: 'change action selector' translated action: #setActionSelector.\\\\n\\\\taCustomMenu add: 'change arguments' translated action: #setArguments.\\\\n\\\\taCustomMenu add: 'change when to act' translated action: #setActWhen.\\\\n\\\\tself addTargetingMenuItems: aCustomMenu hand: aHandMorph .! !\\\\n\\\\n!StringButtonMorph methodsFor: 'menu' stamp: 'wiz 1/16/2006 19:56'!\\\\naddTargetingMenuItems: aCustomMenu hand: aHandMorph \\\\n\\\\t\\\\\\\"Add targeting menu items\\\\\\\"\\\\n\\\\taCustomMenu addLine.\\\\n\\\\n\\\\taCustomMenu add: 'set target' translated action: #targetWith:.\\\\n\\\\taCustomMenu add: 'sight target' translated action: #sightTargets:.\\\\n\\\\ttarget\\\\n\\\\t\\\\tifNotNil: [aCustomMenu add: 'clear target' translated action: #clearTarget]! !\\\\n\\\\n!StringButtonMorph methodsFor: 'menu' stamp: 'wiz 1/16/2006 19:55'!\\\\nclearTarget\\\\n\\\\n\\\\ttarget _ nil.\\\\n! !\\\\n\\\\n!StringButtonMorph methodsFor: 'menu' stamp: 'yo 3/16/2005 21:02'!\\\\nsetActWhen\\\\n\\\\n\\\\t| selections |\\\\n\\\\tselections _ #(buttonDown buttonUp whilePressed).\\\\n\\\\tactWhen _ (SelectionMenu labelList: (selections collect: [:t | t translated]) selections: selections)\\\\n\\\\t\\\\tstartUpWithCaption: 'Choose one of the following conditions' translated.\\\\n! !\\\\n\\\\n!StringButtonMorph methodsFor: 'menu' stamp: 'yo 3/16/2005 20:54'!\\\\nsetActionSelector\\\\n\\\\n\\\\t| newSel |\\\\n\\\\tnewSel _ FillInTheBlank\\\\n\\\\t\\\\trequest:\\\\n'Please type the selector to be sent to\\\\nthe target when this button is pressed' translated\\\\n\\\\t\\\\tinitialAnswer: actionSelector.\\\\n\\\\tnewSel isEmpty ifFalse: [self actionSelector: newSel].\\\\n! !\\\\n\\\\n!StringButtonMorph methodsFor: 'menu' stamp: 'yo 3/14/2005 13:09'!\\\\nsetArguments\\\\n\\\\n\\\\t| s newArgs newArgsArray |\\\\n\\\\ts _ WriteStream on: ''.\\\\n\\\\targuments do: [:arg | arg printOn: s. s nextPutAll: '. '].\\\\n\\\\tnewArgs _ FillInTheBlank\\\\n\\\\t\\\\trequest:\\\\n'Please type the arguments to be sent to the target\\\\nwhen this button is pressed separated by periods' translated\\\\n\\\\t\\\\tinitialAnswer: s contents.\\\\n\\\\tnewArgs isEmpty ifFalse: [\\\\n\\\\t\\\\tnewArgsArray _ Compiler evaluate: '{', newArgs, '}' for: self logged: false.\\\\n\\\\t\\\\tself arguments: newArgsArray].\\\\n! !\\\\n\\\\n!StringButtonMorph methodsFor: 'menu'!\\\\nsetLabel\\\\n\\\\n\\\\t| newLabel |\\\\n\\\\tnewLabel _ FillInTheBlank\\\\n\\\\t\\\\trequest:\\\\n'Please type a new label for this button'\\\\n\\\\t\\\\tinitialAnswer: self contents.\\\\n\\\\tnewLabel isEmpty ifFalse: [self contents: newLabel].\\\\n! !\\\\n\\\\n!StringButtonMorph methodsFor: 'menu' stamp: 'dgd 2/22/2003 18:55'!\\\\nsetTarget: evt \\\\n\\\\t| rootMorphs |\\\\n\\\\trootMorphs _ self world rootMorphsAt: evt hand targetOffset.\\\\n\\\\ttarget _ rootMorphs size > 1\\\\n\\\\t\\\\tifTrue: [rootMorphs second]\\\\n\\\\t\\\\tifFalse: [nil]! !\\\\n\\\\n\\\\n!StringButtonMorph methodsFor: 'submorphs-add/remove'!\\\\nactWhen: aSymbol\\\\n\\\\t\\\\\\\"Set the condition under which to invoke my action to one of: #buttonDown, #buttonUp, and #whilePressed.\\\\\\\"\\\\n\\\\n\\\\tactWhen _ aSymbol.\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStringButtonMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StringButtonMorph class methodsFor: 'printing' stamp: 'sw 2/16/98 03:02'!\\\\ndefaultNameStemForInstances\\\\n\\\\t^ 'SButton'! !\\\\nModel subclass: #StringHolder\\\\n\\\\tinstanceVariableNames: 'contents'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'ST80-Kernel-Remnants'!\\\\n!StringHolder commentStamp: '<historical>' prior: 0!\\\\nI am a kind of Model that includes a piece of text.  In some cases, the text can be edited, and in some the text is a method.\\\\n\\\\nCategories 'code pane menu' and 'message list menu' are messages that may be called by my menus when the text is a method, and when some pane is a list of methods.  Other of my subclasses may ignore these two catagories altogether.!\\\\n\\\\n\\\\n!StringHolder methodsFor: 'accessing' stamp: 'di 5/19/1998 15:34'!\\\\nacceptContents: aString \\\\n\\\\t\\\\\\\"Set aString to be the contents of the receiver.  Return true cuz happy\\\\\\\"\\\\n\\\\n\\\\tself contents: aString.\\\\n\\\\t^ true! !\\\\n\\\\n!StringHolder methodsFor: 'accessing' stamp: 'nk 4/29/2004 12:32'!\\\\nclassCommentIndicated\\\\n\\\\t\\\\\\\"Answer true iff we're viewing the class comment.\\\\\\\"\\\\n\\\\t^false! !\\\\n\\\\n!StringHolder methodsFor: 'accessing'!\\\\ncontents\\\\n\\\\t\\\\\\\"Answer the contents that the receiver is holding--presumably a string.\\\\\\\"\\\\n\\\\n\\\\t^contents! !\\\\n\\\\n!StringHolder methodsFor: 'accessing' stamp: 'sw 1/12/1999 11:47'!\\\\ncontents: textOrString \\\\n\\\\t\\\\\\\"Set textOrString to be the contents of the receiver.\\\\\\\"\\\\n\\\\n\\\\tcontents _ textOrString \\\\\\\"asString\\\\\\\"! !\\\\n\\\\n!StringHolder methodsFor: 'accessing' stamp: 'tk 4/3/98 22:50'!\\\\ncontentsSelection\\\\n\\\\t\\\\\\\"Return the interval of text in the code pane to select when I set the pane's contents\\\\\\\"\\\\n\\\\n\\\\t^ 1 to: 0  \\\\\\\"null selection\\\\\\\"! !\\\\n\\\\n!StringHolder methodsFor: 'accessing' stamp: 'sw 12/9/2000 23:59'!\\\\nnoteAcceptanceOfCodeFor: aSelector\\\\n\\\\t\\\\\\\"A method has possibly been submitted for the receiver with aSelector as its selector; If the receiver wishes to take soem action here is a chance for it to do so\\\\\\\"\\\\n! !\\\\n\\\\n!StringHolder methodsFor: 'accessing' stamp: 'sw 12/1/2000 11:04'!\\\\nreformulateList\\\\n\\\\t\\\\\\\"If the receiver has a way of reformulating its message list, here is a chance for it to do so\\\\\\\"! !\\\\n\\\\n!StringHolder methodsFor: 'accessing' stamp: 'sw 12/6/2000 17:48'!\\\\nreformulateListNoting: newSelector\\\\n\\\\t\\\\\\\"A method has possibly been submitted for the receiver with newSelector as its selector; If the receiver has a way of reformulating its message list, here is a chance for it to do so\\\\\\\"\\\\n\\\\n\\\\t^ self reformulateList! !\\\\n\\\\n!StringHolder methodsFor: 'accessing' stamp: 'tk 4/18/1998 14:59'!\\\\nselectedClassName\\\\n\\\\t\\\\\\\"I may know what class is currently selected\\\\\\\"\\\\n\\\\n\\\\tself selectedClass ifNotNil: [^ self selectedClass name].\\\\n\\\\t^ nil! !\\\\n\\\\n!StringHolder methodsFor: 'accessing' stamp: 'tk 4/18/1998 15:01'!\\\\nselectedClassOrMetaClass\\\\n\\\\n\\\\t^ self selectedClass\\\\t\\\\\\\"I don't know any better\\\\\\\"! !\\\\n\\\\n!StringHolder methodsFor: 'accessing' stamp: 'tk 4/18/1998 15:22'!\\\\nselectedMessageName\\\\n\\\\n\\\\t^ nil! !\\\\n\\\\n!StringHolder methodsFor: 'accessing' stamp: 'di 11/23/1998 15:21'!\\\\ntextContents: aStringOrText \\\\n\\\\t\\\\\\\"Set aStringOrText to be the contents of the receiver.\\\\\\\"\\\\n\\\\n\\\\tcontents _ aStringOrText! !\\\\n\\\\n\\\\n!StringHolder methodsFor: 'code pane menu' stamp: 'dgd 10/1/2004 13:43'!\\\\ncodePaneMenu: aMenu shifted: shifted \\\\n\\\\t\\\\\\\"Note that unless we override perform:orSendTo:, \\\\n\\\\tPluggableTextController will respond to all menu items in a \\\\n\\\\ttext pane\\\\\\\"\\\\n\\\\t| donorMenu |\\\\n\\\\tdonorMenu := shifted\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [ParagraphEditor shiftedYellowButtonMenu]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [ParagraphEditor yellowButtonMenu].\\\\n\\\\t^ aMenu addAllFrom: donorMenu! !\\\\n\\\\n!StringHolder methodsFor: 'code pane menu' stamp: 'wod 5/29/1998 16:35'!\\\\nperform: selector orSendTo: otherTarget\\\\n\\\\t\\\\\\\"Selector was just chosen from a menu by a user.  If can respond, then\\\\nperform it on myself. If not, send it to otherTarget, presumably the\\\\neditPane from which the menu was invoked.\\\\\\\"\\\\n\\\\n\\\\t(self respondsTo: selector)\\\\n\\\\t\\\\tifTrue: [^ self perform: selector]\\\\n\\\\t\\\\tifFalse: [^ otherTarget perform: selector]! !\\\\n\\\\n!StringHolder methodsFor: 'code pane menu' stamp: 'tk 4/6/98 11:43'!\\\\nshowBytecodes\\\\n\\\\t\\\\\\\"We don't know how to do this\\\\\\\"\\\\n\\\\n\\\\t^ self changed: #flash! !\\\\n\\\\n!StringHolder methodsFor: 'code pane menu' stamp: 'ar 9/27/2005 20:47'!\\\\nspawn: contentsString\\\\n\\\\n\\\\tUIManager default edit: contentsString label: 'Workspace'\\\\n! !\\\\n\\\\n\\\\n!StringHolder methodsFor: 'evaluation'!\\\\ndoItContext\\\\n\\\\t\\\\\\\"Answer the context in which a text selection can be evaluated.\\\\\\\"\\\\n\\\\n\\\\t^nil! !\\\\n\\\\n!StringHolder methodsFor: 'evaluation'!\\\\ndoItReceiver\\\\n\\\\t\\\\\\\"Answer the object that should be informed of the result of evaluating a \\\\n\\\\ttext selection.\\\\\\\"\\\\n\\\\n\\\\t^nil! !\\\\n\\\\n\\\\n!StringHolder methodsFor: 'initialize-release'!\\\\ndefaultContents\\\\n\\\\n\\\\t^''! !\\\\n\\\\n!StringHolder methodsFor: 'initialize-release' stamp: 'sw 10/16/1998 11:36'!\\\\nembeddedInMorphicWindowLabeled: labelString\\\\n\\\\t| window |\\\\n\\\\twindow _ (SystemWindow labelled: labelString) model: self.\\\\n\\\\twindow addMorph: (PluggableTextMorph on: self text: #contents accept: #acceptContents:\\\\n\\\\t\\\\t\\\\treadSelection: nil menu: #codePaneMenu:shifted:)\\\\n\\\\t\\\\tframe: (0@0 corner: 1@1).\\\\n\\\\t^ window! !\\\\n\\\\n!StringHolder methodsFor: 'initialize-release' stamp: 'jm 3/24/98 17:56'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Initialize the state of the receiver with its default contents.\\\\\\\"\\\\n\\\\n\\\\tcontents _ self defaultContents.\\\\n! !\\\\n\\\\n!StringHolder methodsFor: 'initialize-release' stamp: 'sw 10/16/1998 11:37'!\\\\nopenAsMorphLabel: labelString \\\\n\\\\t\\\\\\\"Workspace new openAsMorphLabel: 'Workspace'\\\\\\\"\\\\n\\\\t(self embeddedInMorphicWindowLabeled: labelString) openInWorld! !\\\\n\\\\n!StringHolder methodsFor: 'initialize-release' stamp: 'sw 12/22/1998 00:16'!\\\\nopenLabel: aString \\\\n\\\\t\\\\\\\"Create a standard system view of the model, me, a StringHolder and open it.  If in mvc, terminate the active controller so that the new window will immediately be activated.\\\\\\\"\\\\n\\\\tself openLabel: aString andTerminate: true! !\\\\n\\\\n!StringHolder methodsFor: 'initialize-release' stamp: 'sma 4/30/2000 10:15'!\\\\nopenLabel: aString andTerminate: terminateBoolean\\\\n\\\\t\\\\\\\"Create a standard system view of the model, me, a StringHolder and open it.; do not terminate the active process if in mvc\\\\\\\"\\\\n\\\\t| topView codeView |\\\\n\\\\n\\\\tSmalltalk isMorphic ifTrue: [^ self openAsMorphLabel: aString].\\\\n\\\\n\\\\ttopView _ (StandardSystemView new) model: self.\\\\n\\\\ttopView borderWidth: 1.\\\\n\\\\ttopView label: aString.\\\\n\\\\ttopView minimumSize: 100 @ 50.\\\\n\\\\n\\\\tcodeView _ PluggableTextView on: self \\\\n\\\\t\\\\t\\\\ttext: #contents accept: #acceptContents:\\\\n\\\\t\\\\t\\\\treadSelection: #contentsSelection menu: #codePaneMenu:shifted:.\\\\n\\\\tcodeView window: (0@0 extent: 200@200).\\\\n\\\\ttopView addSubView: codeView.\\\\n\\\\t\\\\\\\"self contents size > 0 ifTrue: [\\\\n\\\\t\\\\t\\\\tcodeView hasUnacceptedEdits: true].  Is it already saved or not??\\\\\\\"\\\\n\\\\tterminateBoolean\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[topView controller open]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[topView controller openNoTerminate]! !\\\\n\\\\n\\\\n!StringHolder methodsFor: 'optional panes' stamp: 'sw 1/24/2001 21:25'!\\\\nwantsAnnotationPane\\\\n\\\\t\\\\\\\"Answer whether the receiver, seen in some browser window, would like to have the so-called  annotationpane included.  By default, various browsers defer to the global preference 'optionalButtons' -- but individual subclasses can insist to the contrary.\\\\\\\"\\\\n\\\\n\\\\t^ Preferences annotationPanes! !\\\\n\\\\n!StringHolder methodsFor: 'optional panes' stamp: 'sw 1/24/2001 18:57'!\\\\nwantsOptionalButtons\\\\n\\\\t\\\\\\\"Answer whether the receiver, seen in some browser window, would like to have the so-called optional button pane included.  By default, various browsers defer to the global preference 'optionalButtons' -- but individual subclasses can insist to the contrary.\\\\\\\"\\\\n\\\\n\\\\t^ Preferences optionalButtons! !\\\\n\\\\n\\\\n!StringHolder methodsFor: 'tiles' stamp: 'di 11/4/2000 11:07'!\\\\nopenSyntaxView\\\\n\\\\t\\\\\\\"Open a syntax view on the current method\\\\\\\"\\\\n\\\\n\\\\t| class selector |\\\\n\\\\n\\\\t(selector _ self selectedMessageName) ifNotNil: [\\\\n\\\\t\\\\tclass _ self selectedClassOrMetaClass.\\\\n\\\\t\\\\tSyntaxMorph testClass: class andMethod: selector.\\\\n\\\\t]! !\\\\n\\\\n\\\\n!StringHolder methodsFor: 'toolbuilder' stamp: 'ar 2/11/2005 20:36'!\\\\nbuildWith: builder\\\\n\\\\t| windowSpec textSpec |\\\\n\\\\twindowSpec := builder pluggableWindowSpec new.\\\\n\\\\twindowSpec model: self.\\\\n\\\\twindowSpec label: 'Workspace'.\\\\n\\\\twindowSpec children: OrderedCollection new.\\\\n\\\\ttextSpec := builder pluggableTextSpec new.\\\\n\\\\ttextSpec \\\\n\\\\t\\\\tmodel: self;\\\\n\\\\t\\\\tgetText: #contents; \\\\n\\\\t\\\\tsetText: #acceptContents:; \\\\n\\\\t\\\\tselection: nil; \\\\n\\\\t\\\\tmenu: #codePaneMenu:shifted:;\\\\n\\\\t\\\\tframe: (0@0corner: 1@1).\\\\n\\\\twindowSpec children add: textSpec.\\\\n\\\\n\\\\t^builder build: windowSpec! !\\\\n\\\\n\\\\n!StringHolder methodsFor: 'user edits' stamp: 'di 4/21/1998 11:30'!\\\\nclearUserEditFlag\\\\n\\\\t\\\\\\\"Clear the hasUnacceptedEdits flag in all my dependent views.\\\\\\\"\\\\n\\\\n\\\\tself changed: #clearUserEdits! !\\\\n\\\\n!StringHolder methodsFor: 'user edits' stamp: 'tk 4/13/1998 23:07'!\\\\nokToChange\\\\n\\\\n\\\\tself canDiscardEdits ifTrue: [^ true].\\\\n\\\\tself changed: #wantToChange.  \\\\\\\"Solicit cancel from view\\\\\\\"\\\\n\\\\t^ self canDiscardEdits\\\\n! !\\\\n\\\\n\\\\n!StringHolder methodsFor: '*services-base' stamp: 'rr 3/15/2004 09:17'!\\\\ncodeTextMorph\\\\n\\\\t^ self dependents\\\\n\\\\t\\\\tdetect: [:dep | (dep isKindOf: PluggableTextMorph)\\\\n\\\\t\\\\t\\\\t\\\\tand: [dep getTextSelector == #contents]]\\\\n\\\\t\\\\tifNone: []! !\\\\n\\\\n!StringHolder methodsFor: '*services-base' stamp: 'rr 6/9/2005 10:47'!\\\\nrequestor\\\\n\\\\t^ (TextRequestor new) model: self; yourself! !\\\\n\\\\n!StringHolder methodsFor: '*services-base' stamp: 'rr 3/15/2004 09:17'!\\\\nselectedInterval\\\\n\\\\t^self codeTextMorph selectionInterval! !\\\\n\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nbrowseAllMessages\\\\n\\\\t\\\\\\\"Create and schedule a message set browser on all implementors of all the messages sent by the current method.\\\\\\\"\\\\n\\\\n\\\\t| aClass aName method filteredList |\\\\n\\\\t(aName := self selectedMessageName) ifNotNil: [\\\\n\\\\t\\\\tmethod := (aClass := self selectedClassOrMetaClass) compiledMethodAt: aName.\\\\n\\\\t\\\\tfilteredList := method messages reject: \\\\n\\\\t\\\\t\\\\t[:each | #(new initialize = ) includes: each].\\\\n\\\\t\\\\tself systemNavigation browseAllImplementorsOfList: filteredList asSortedCollection\\\\n\\\\t\\\\t\\\\t title: 'All messages sent in ', aClass name, '.', aName]\\\\n! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'tk 4/18/1998 16:11'!\\\\nbrowseClass\\\\n\\\\t\\\\\\\"Open an class browser on this class and method\\\\\\\"\\\\n\\\\n\\\\tself selectedClassOrMetaClass ifNotNil: [\\\\n\\\\t\\\\tBrowser newOnClass: self selectedClassOrMetaClass \\\\n\\\\t\\\\t\\\\tselector: self selectedMessageName]! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 4/16/2003 08:42'!\\\\nbrowseLocalImplementors\\\\n\\\\t\\\\\\\"Present a menu of all messages sent by the currently selected message. \\\\n\\\\tOpen a message set browser of all implementors of the message chosen in or below\\\\n\\\\tthe selected class.\\\\n\\\\tDo nothing if no message is chosen.\\\\\\\"\\\\n\\\\tself getSelectorAndSendQuery: #browseAllImplementorsOf:localTo:\\\\n\\\\t\\\\tto: self systemNavigation\\\\n\\\\t\\\\twith: { self selectedClass }! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 4/16/2003 20:41'!\\\\nbrowseLocalSendersOfMessages\\\\n\\\\t\\\\\\\"Present a menu of the currently selected message, as well as all\\\\n\\\\tmessages sent by it.  Open a message set browser of all implementors\\\\n\\\\tof the message chosen in or below the selected class\\\\\\\"\\\\n\\\\n\\\\tself getSelectorAndSendQuery: #browseAllCallsOn:localTo:\\\\n\\\\t\\\\tto: self systemNavigation\\\\n\\\\t\\\\twith: { self selectedClass }! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 4/16/2003 08:45'!\\\\nbrowseMessages\\\\n\\\\t\\\\\\\"Present a menu of all messages sent by the currently selected message. \\\\n\\\\tOpen a message set browser of all implementors of the message chosen.\\\\\\\"\\\\n\\\\n\\\\tself getSelectorAndSendQuery: #browseAllImplementorsOf: to: self systemNavigation! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nbrowseMethodFull\\\\n\\\\t\\\\\\\"Create and schedule a full Browser and then select the current class and message.\\\\\\\"\\\\n\\\\n\\\\t| myClass |\\\\n\\\\t(myClass := self selectedClassOrMetaClass) ifNotNil:\\\\n\\\\t\\\\t[Browser fullOnClass: myClass selector: self selectedMessageName]! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 4/16/2003 20:40'!\\\\nbrowseSendersOfMessages\\\\n\\\\t\\\\\\\"Present a menu of the currently selected message, as well as all messages sent by it.  Open a message set browser of all senders of the selector chosen.\\\\\\\"\\\\n\\\\n\\\\tself getSelectorAndSendQuery: #browseAllCallsOn: to: self systemNavigation! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nbrowseUnusedMethods\\\\n\\\\t| classes unsent messageList cls |\\\\n\\\\t(cls := self selectedClass)\\\\n\\\\t\\\\tifNil: [^ self].\\\\n\\\\tclasses := Array with: cls with: cls class.\\\\n\\\\tunsent := Set new.\\\\n\\\\tclasses\\\\n\\\\t\\\\tdo: [:c | unsent addAll: c selectors].\\\\n\\\\tunsent := self systemNavigation allUnSentMessagesIn: unsent.\\\\n\\\\tmessageList := OrderedCollection new.\\\\n\\\\tclasses\\\\n\\\\t\\\\tdo: [:c | (c selectors\\\\n\\\\t\\\\t\\\\t\\\\tselect: [:s | unsent includes: s]) asSortedCollection\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:sel | messageList add: c name , ' ' , sel]].\\\\n\\\\tself systemNavigation browseMessageList: messageList name: 'Unsent Methods in ' , cls name! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nbrowseVersions\\\\n\\\\t\\\\\\\"Create and schedule a Versions Browser, showing all versions of the \\\\n\\\\tcurrently selected message. Answer the browser or nil.\\\\\\\"\\\\n\\\\t| selector class | \\\\n\\\\tself classCommentIndicated\\\\n\\\\t\\\\tifTrue: [ ClassCommentVersionsBrowser browseCommentOf: self selectedClass.\\\\n\\\\t\\\\t\\\\t^nil ].\\\\n\\\\n\\\\t(selector := self selectedMessageName)\\\\n\\\\t\\\\tifNil:[ self inform: 'Sorry, only actual methods have retrievable versions.'. ^nil ]\\\\n\\\\t\\\\tifNotNil: [\\\\n\\\\t\\\\t\\\\tclass := self selectedClassOrMetaClass.\\\\n\\\\t\\\\t\\\\t^VersionsBrowser\\\\n\\\\t\\\\t\\\\t\\\\tbrowseVersionsOf: (class compiledMethodAt: selector)\\\\n\\\\t\\\\t\\\\t\\\\tclass: self selectedClass\\\\n\\\\t\\\\t\\\\t\\\\tmeta: class isMeta\\\\n\\\\t\\\\t\\\\t\\\\tcategory: (class organization categoryOfElement: selector)\\\\n\\\\t\\\\t\\\\t\\\\tselector: selector]! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'tk 4/28/1998 19:14'!\\\\nbuildMessageBrowser\\\\n\\\\t\\\\\\\"Create and schedule a message browser.\\\\\\\"\\\\n\\\\n\\\\tself selectedMessageName ifNil: [^ self].\\\\n\\\\tBrowser openMessageBrowserForClass: self selectedClassOrMetaClass \\\\n\\\\t\\\\tselector: self selectedMessageName editString: nil! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 1/16/2004 21:14'!\\\\nclassHierarchy\\\\n\\\\t\\\\\\\"Create and schedule a class list browser on the receiver's hierarchy.\\\\\\\"\\\\n\\\\n\\\\tself systemNavigation\\\\n\\\\t\\\\tspawnHierarchyForClass: self selectedClassOrMetaClass \\\\\\\"OK if nil\\\\\\\"\\\\n\\\\t\\\\tselector: self selectedMessageName\\\\n! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sw 5/8/2000 02:16'!\\\\nclassListKey: aChar from: view \\\\n\\\\t\\\\\\\"Respond to a Command key.  I am a model with a list of classes and a \\\\n\\\\tcode pane, and I also have a listView that has a list of methods.  The \\\\n\\\\tview knows how to get the list and selection.\\\\\\\"\\\\n\\\\n\\\\taChar == $f ifTrue: [^ self findMethod].\\\\n\\\\taChar == $r ifTrue: [^ self recent].\\\\n\\\\taChar == $h ifTrue: [^ self spawnHierarchy].\\\\n\\\\taChar == $x ifTrue: [^ self removeClass].\\\\n\\\\t^ self messageListKey: aChar from: view! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\ncopyName\\\\n\\\\t\\\\\\\"Copy the current selector to the clipboard\\\\\\\"\\\\n\\\\t| selector |\\\\n\\\\t(selector := self selectedMessageName) ifNotNil:\\\\n\\\\t\\\\t[Clipboard clipboardText: selector asString asText]! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\ncopySelector\\\\n\\\\t\\\\\\\"Copy the selected selector to the clipboard\\\\\\\"\\\\n\\\\n\\\\t| selector |\\\\n\\\\t(selector := self selectedMessageName) ifNotNil:\\\\n\\\\t\\\\t[Clipboard clipboardText: selector asString]! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sw 7/1/2001 08:24'!\\\\nfileOutMessage\\\\n\\\\t\\\\\\\"Put a description of the selected message on a file\\\\\\\"\\\\n\\\\n\\\\tself selectedMessageName ifNotNil:\\\\n\\\\t\\\\t[Cursor write showWhile:\\\\n\\\\t\\\\t\\\\t[self selectedClassOrMetaClass fileOutMethod: self selectedMessageName]]! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nfindMethodInChangeSets\\\\n\\\\t\\\\\\\"Find and open a changeSet containing the current method.\\\\\\\"\\\\n\\\\n\\\\t| aName |\\\\n\\\\t(aName := self selectedMessageName) ifNotNil: [\\\\n\\\\t\\\\tChangeSorter browseChangeSetsWithClass: self selectedClassOrMetaClass\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tselector: aName]! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\ninspectInstances\\\\n\\\\t\\\\\\\"Inspect all instances of the selected class.\\\\\\\"\\\\n\\\\n\\\\t| myClass |\\\\n\\\\t(myClass := self selectedClassOrMetaClass) ifNotNil:\\\\n\\\\t\\\\t[myClass theNonMetaClass inspectAllInstances]. \\\\n! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\ninspectSubInstances\\\\n\\\\t\\\\\\\"Inspect all instances of the selected class and all its subclasses\\\\\\\"\\\\n\\\\n\\\\t| aClass |\\\\n\\\\t(aClass := self selectedClassOrMetaClass) ifNotNil: [\\\\n\\\\t\\\\taClass theNonMetaClass inspectSubInstances].\\\\n! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nmakeIsolatedCodePane\\\\n\\\\t| msgName |\\\\n\\\\n\\\\t(msgName := self selectedMessageName) ifNil: [^ Beeper beep].\\\\n\\\\tMethodHolder makeIsolatedCodePaneForClass: self selectedClassOrMetaClass selector: msgName! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nmessageListKey: aChar from: view\\\\n\\\\t\\\\\\\"Respond to a Command key.  I am a model with a code pane, and I also\\\\n\\\\thave a listView that has a list of methods.  The view knows how to get\\\\n\\\\tthe list and selection.\\\\\\\"\\\\n\\\\n\\\\t| sel class |\\\\n\\\\taChar == $D ifTrue: [^ self toggleDiffing].\\\\n\\\\n\\\\tsel := self selectedMessageName.\\\\n\\\\taChar == $m ifTrue:  \\\\\\\"These next two put up a type in if no message selected\\\\\\\"\\\\n\\\\t\\\\t[^ self useSelector: sel orGetSelectorAndSendQuery: #browseAllImplementorsOf: to: self systemNavigation].\\\\n\\\\taChar == $n ifTrue: \\\\n\\\\t\\\\t[^ self useSelector: sel orGetSelectorAndSendQuery: #browseAllCallsOn: to: self systemNavigation].\\\\n\\\\n\\\\t\\\\\\\"The following require a class selection\\\\\\\"\\\\n\\\\t(class := self selectedClassOrMetaClass) ifNil: [^ self arrowKey: aChar from: view].\\\\n\\\\taChar == $b ifTrue: [^ Browser fullOnClass: class selector: sel].\\\\n\\\\taChar == $N ifTrue: [^ self browseClassRefs].\\\\n\\\\taChar == $i ifTrue: [^ self methodHierarchy].\\\\n\\\\taChar == $h ifTrue: [^ self classHierarchy].\\\\n\\\\taChar == $p ifTrue: [^ self browseFullProtocol].\\\\n\\\\n\\\\t\\\\\\\"The following require a method selection\\\\\\\"\\\\n\\\\tsel ifNotNil: \\\\n\\\\t\\\\t[aChar == $o ifTrue: [^ self fileOutMessage].\\\\n\\\\t\\\\taChar == $c ifTrue: [^ self copySelector].\\\\n\\\\t\\\\taChar == $v ifTrue: [^ self browseVersions].\\\\n\\\\t\\\\taChar == $O ifTrue: [^ self openSingleMessageBrowser].\\\\n\\\\t\\\\taChar == $x ifTrue: [^ self removeMessage]].\\\\n\\\\n\\\\t^ self arrowKey: aChar from: view! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nmessageListSelectorTitle\\\\n\\\\t| selector aString aStamp aSize |\\\\n\\\\n\\\\t(selector := self selectedMessageName)\\\\n\\\\t\\\\tifNil:\\\\n\\\\t\\\\t\\\\t[aSize := self messageList size.\\\\n\\\\t\\\\t\\\\t^ (aSize == 0 ifTrue: ['no'] ifFalse: [aSize printString]), ' message', (aSize == 1 ifTrue: [''] ifFalse: ['s'])]\\\\n\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t[Preferences timeStampsInMenuTitles\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\t[^ nil].\\\\n\\\\t\\\\t\\\\taString := selector truncateWithElipsisTo: 28.\\\\n\\\\t\\\\t\\\\t^ (aStamp := self timeStamp) size > 0\\\\n\\\\t\\\\t\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[aString, String cr, aStamp]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[aString]]! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 1/16/2004 21:10'!\\\\nmethodHierarchy\\\\n\\\\t\\\\\\\"Create and schedule a method browser on the hierarchy of implementors.\\\\\\\"\\\\n\\\\n\\\\tself systemNavigation \\\\n\\\\t\\\\t\\\\tmethodHierarchyBrowserForClass: self selectedClassOrMetaClass \\\\n\\\\t\\\\t\\\\tselector: self selectedMessageName\\\\n! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nofferDurableMenuFrom: menuRetriever shifted: aBoolean\\\\n\\\\t\\\\\\\"Pop up (morphic only) a menu whose target is the receiver and whose contents are provided by sending the menuRetriever to the receiver.  The menuRetriever takes two arguments: a menu, and a boolean representing the shift state; put a stay-up item at the top of the menu.\\\\\\\"\\\\n\\\\n\\\\t| aMenu |\\\\n\\\\taMenu := MenuMorph new defaultTarget: self.\\\\n\\\\taMenu addStayUpItem.\\\\n\\\\tself perform: menuRetriever with: aMenu with: aBoolean.\\\\n\\\\t\\\\taMenu popUpInWorld! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nofferMenuFrom: menuRetriever shifted: aBoolean\\\\n\\\\t\\\\\\\"Pop up, in morphic or mvc as the case may be, a menu whose target is the receiver and whose contents are provided by sending the menuRetriever to the receiver.  The menuRetriever takes two arguments: a menu, and a boolean representing the shift state.\\\\\\\"\\\\n\\\\n\\\\t| aMenu |\\\\n\\\\tSmalltalk isMorphic\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[aMenu := MenuMorph new defaultTarget: self.\\\\n\\\\t\\\\t\\\\tself perform: menuRetriever with: aMenu with: aBoolean.\\\\n\\\\t\\\\t\\\\taMenu popUpInWorld]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[aMenu := CustomMenu new.\\\\n\\\\t\\\\t\\\\tself perform: menuRetriever with: aMenu with: aBoolean.\\\\n\\\\t\\\\t\\\\taMenu invokeOn: self]! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nopenSingleMessageBrowser\\\\n\\\\t| msgName mr |\\\\n\\\\t\\\\\\\"Create and schedule a message list browser populated only by the currently selected message\\\\\\\"\\\\n\\\\n\\\\t(msgName := self selectedMessageName) ifNil: [^ self].\\\\n\\\\n\\\\tmr := MethodReference new\\\\n\\\\t\\\\tsetStandardClass: self selectedClassOrMetaClass\\\\n\\\\t\\\\tmethodSymbol: msgName.\\\\n\\\\n\\\\tself systemNavigation \\\\n\\\\t\\\\tbrowseMessageList: (Array with: mr)\\\\n\\\\t\\\\tname: mr asStringOrText\\\\n\\\\t\\\\tautoSelect: nil! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'RAA 12/10/1999 09:36'!\\\\npackageListKey: aChar from: view\\\\n\\\\t\\\\\\\"Respond to a Command key in the package pane in the PackageBrowser\\\\\\\"\\\\n\\\\taChar == $f ifTrue: [^ self findClass].\\\\n\\\\t^ self classListKey: aChar from: view\\\\n! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'tk 4/28/1998 18:16'!\\\\nprintOutMessage\\\\n\\\\t\\\\\\\"Write a file with the text of the selected message, for printing by a web browser\\\\\\\"\\\\n\\\\n\\\\tself selectedMessageName ifNotNil: [\\\\n\\\\t\\\\tself selectedClassOrMetaClass fileOutMethod: self selectedMessageName\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tasHtml: true]! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 5/23/2003 14:42'!\\\\nremoveFromCurrentChanges\\\\n\\\\t\\\\\\\"Tell the changes mgr to forget that the current msg was changed.\\\\\\\"\\\\n\\\\n\\\\tChangeSet current removeSelectorChanges: self selectedMessageName \\\\n\\\\t\\\\t\\\\tclass: self selectedClassOrMetaClass.\\\\n\\\\tself changed: #annotation! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sw 1/28/1999 12:34'!\\\\nrevertAndForget\\\\n\\\\t\\\\\\\"Revert to the previous version of the current method, and tell the changes mgr to forget that it was ever changed.  Danger!!  Use only if you really know what you're doing!!\\\\\\\"\\\\n\\\\n\\\\tself okToChange ifFalse: [^ self].\\\\n\\\\tself revertToPreviousVersion.\\\\n\\\\tself removeFromCurrentChanges.\\\\n\\\\tself contentsChanged\\\\n! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nrevertToPreviousVersion\\\\n\\\\t\\\\\\\"Revert to the previous version of the current method\\\\\\\"\\\\n\\\\t| aClass aSelector  changeRecords |\\\\n\\\\tself okToChange ifFalse: [^ self].\\\\n\\\\taClass := self selectedClassOrMetaClass.\\\\n\\\\taClass ifNil: [^ self changed: #flash].\\\\n\\\\taSelector := self selectedMessageName.\\\\n\\\\tchangeRecords := aClass changeRecordsAt: aSelector.\\\\n\\\\t(changeRecords == nil or: [changeRecords size <= 1]) ifTrue: [self changed: #flash.  ^ Beeper beep].\\\\n\\\\tchangeRecords second fileIn.\\\\n\\\\tself contentsChanged\\\\n! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nselectMessageAndEvaluate: aBlock\\\\n\\\\t\\\\\\\"Allow the user to choose one selector, chosen from the currently selected message's selector, as well as those of all messages sent by it, and evaluate aBlock on behalf of chosen selector.  If there is only one possible choice, simply make it; if there are multiple choices, put up a menu, and evaluate aBlock on behalf of the the chosen selector, doing nothing if the user declines to choose any\\\\\\\"\\\\n\\\\n\\\\t| selector method messages |\\\\n\\\\t(selector := self selectedMessageName) ifNil: [^ self].\\\\n\\\\tmethod := (self selectedClassOrMetaClass ifNil: [^ self])\\\\n\\\\t\\\\tcompiledMethodAt: selector\\\\n\\\\t\\\\tifAbsent: [].\\\\n\\\\t(method isNil or: [(messages := method messages) size == 0])\\\\n\\\\t\\\\t ifTrue: [^ aBlock value: selector].\\\\n\\\\t(messages size == 1 and: [messages includes: selector])\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[^ aBlock value: selector].  \\\\\\\"If only one item, there is no choice\\\\\\\"\\\\n\\\\n\\\\tself systemNavigation \\\\n\\\\t\\\\tshowMenuOf: messages\\\\n\\\\t\\\\twithFirstItem: selector\\\\n\\\\t\\\\tifChosenDo: [:sel | aBlock value: sel]! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'nk 11/15/2002 12:23'!\\\\nsystemCatListKey: aChar from: view\\\\n\\\\t\\\\\\\"Respond to a Command key.  I am a model with a code pane, and I also have a listView that has a list of methods.  The view knows how to get the list and selection.\\\\\\\"\\\\n\\\\n\\\\taChar == $f ifTrue: [^ self findClass].\\\\n\\\\taChar == $x ifTrue: [^ self removeSystemCategory].\\\\n\\\\t^ self classListKey: aChar from: view! !\\\\n\\\\n!StringHolder methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\ntimeStamp\\\\n\\\\t\\\\\\\"Answer the time stamp for the chosen class and method, if any, else an empty string\\\\\\\"\\\\n\\\\n\\\\t|  selector  aMethod |\\\\n\\\\t(selector := self selectedMessageName) ifNotNil:\\\\n\\\\t\\\\t[self selectedClassOrMetaClass \\\\n\\\\t\\\\t\\\\tifNil:\\\\n\\\\t\\\\t\\\\t\\\\t[^ String new]\\\\n\\\\t\\\\t\\\\tifNotNil:\\\\n\\\\t\\\\t\\\\t\\\\t[aMethod := self selectedClassOrMetaClass compiledMethodAt: selector ifAbsent: [nil].\\\\n\\\\t\\\\t\\\\t\\\\taMethod ifNotNil: [^ Utilities timeStampForMethod: aMethod]]].\\\\n\\\\t^ String new! !\\\\n\\\\n\\\\n!StringHolder methodsFor: '*Tools-traits' stamp: 'al 12/6/2005 22:22'!\\\\nbrowseClassRefs\\\\n\\\\n\\\\t| cls |\\\\n\\\\tcls := self selectedClass.\\\\n\\\\t(cls notNil and: [cls isTrait not])\\\\n\\\\t\\\\tifTrue: [self systemNavigation browseAllCallsOnClass: cls theNonMetaClass]\\\\n! !\\\\n\\\\n!StringHolder methodsFor: '*Tools-traits' stamp: 'al 12/6/2005 22:22'!\\\\nbrowseClassVariables\\\\n\\\\t\\\\\\\"Browse the class variables of the selected class. 2/5/96 sw\\\\\\\"\\\\n\\\\t| cls |\\\\n\\\\tcls := self selectedClass.\\\\n\\\\t(cls notNil and: [cls isTrait not])\\\\n\\\\t\\\\tifTrue: [self systemNavigation  browseClassVariables: cls]\\\\n! !\\\\n\\\\n!StringHolder methodsFor: '*Tools-traits' stamp: 'al 12/6/2005 22:23'!\\\\nbrowseClassVarRefs\\\\n\\\\t\\\\\\\"1/17/96 sw: devolve responsibility to the class, so that the code that does the real work can be shared\\\\\\\"\\\\n\\\\n\\\\t| cls |\\\\n\\\\tcls := self selectedClass.\\\\n\\\\t(cls notNil and: [cls isTrait not])\\\\n\\\\t\\\\tifTrue: [self systemNavigation  browseClassVarRefs: cls]! !\\\\n\\\\n!StringHolder methodsFor: '*Tools-traits' stamp: 'al 12/6/2005 22:23'!\\\\nbrowseFullProtocol\\\\n\\\\t\\\\\\\"Open up a protocol-category browser on the value of the receiver's current selection.    If in mvc, an old-style protocol browser is opened instead.  Someone who still uses mvc might wish to make the protocol-category-browser work there too, thanks.\\\\\\\"\\\\n\\\\n\\\\t| aClass |\\\\n\\\\n\\\\t(Smalltalk isMorphic and: [Smalltalk includesKey: #Lexicon]) ifFalse: [^ self spawnFullProtocol].\\\\n\\\\t((aClass := self selectedClassOrMetaClass) notNil and: [aClass isTrait not]) ifTrue:\\\\n\\\\t\\\\t[(Smalltalk at: #Lexicon) new openOnClass: aClass inWorld: ActiveWorld showingSelector: self selectedMessageName]! !\\\\n\\\\n!StringHolder methodsFor: '*Tools-traits' stamp: 'al 12/6/2005 22:24'!\\\\nbrowseInstVarDefs \\\\n\\\\n\\\\t| cls |\\\\n\\\\tcls := self selectedClassOrMetaClass.\\\\n\\\\t(cls notNil and: [cls isTrait not])\\\\n\\\\t\\\\tifTrue: [self systemNavigation browseInstVarDefs: cls]! !\\\\n\\\\n!StringHolder methodsFor: '*Tools-traits' stamp: 'al 12/6/2005 22:24'!\\\\nbrowseInstVarRefs\\\\n\\\\t\\\\\\\"1/26/96 sw: real work moved to class, so it can be shared\\\\\\\"\\\\n\\\\t| cls |\\\\n\\\\tcls := self selectedClassOrMetaClass.\\\\n\\\\t(cls notNil and: [cls isTrait not])\\\\n\\\\t\\\\tifTrue: [self systemNavigation browseInstVarRefs: cls]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStringHolder class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StringHolder class methodsFor: 'class initialization'!\\\\ninitialize\\\\n\\\\t\\\\\\\"The class variables were initialized once, and subsequently filled with\\\\n\\\\tinformation. Re-executing this method is therefore dangerous.\\\\\\\" \\\\n\\\\t \\\\n\\\\t\\\\\\\"workSpace _ StringHolder new\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"StringHolder initialize\\\\\\\"! !\\\\n\\\\n\\\\n!StringHolder class methodsFor: 'instance creation' stamp: 'ar 9/27/2005 20:48'!\\\\nopen\\\\n\\\\t(Smalltalk at: #Workspace ifAbsent:[self]) new openLabel: 'Workspace'\\\\n\\\\t\\\\t\\\\\\\"Not to be confused with our own class var 'Workspace'\\\\\\\"! !\\\\n\\\\n!StringHolder class methodsFor: 'instance creation' stamp: 'tk 5/4/1998 16:41'!\\\\nopenLabel: aString\\\\n\\\\n\\\\tself new openLabel: aString! !\\\\n\\\\n\\\\n!StringHolder class methodsFor: 'window color' stamp: 'sw 2/26/2002 14:44'!\\\\nwindowColorSpecification\\\\n\\\\t\\\\\\\"Answer a WindowColorSpec object that declares my preference\\\\\\\"\\\\n\\\\n\\\\t^ WindowColorSpec classSymbol: self name wording: 'Workspace' brightColor: #lightYellow pastelColor: #paleYellow helpMessage: 'A place for text in a window.'! !\\\\nParagraphEditor subclass: #StringHolderController\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: 'CodeYellowButtonMenu CodeYellowButtonMessages'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'ST80-Support'!\\\\n!StringHolderController commentStamp: '<historical>' prior: 0!\\\\nI represent a ParagraphEditor for a single paragraph of text, omitting alignment commands. I provide items in the yellow button menu so that the text selection can be evaluated and so that the contents of the model can be stored or restored.\\\\n\\\\tdoIt\\\\tevaluate the text selection as an expression\\\\n\\\\tprintIt\\\\tsame as doIt but insert a description of the result after the selection\\\\n\\\\taccept\\\\tstore the contents of the StringHolder into the model\\\\n\\\\tcancel\\\\tstore the contents of the model into the StringHolder!\\\\n\\\\n\\\\n!StringHolderController methodsFor: 'accessing' stamp: 'di 6/21/2001 10:32'!\\\\nchangeText: aText\\\\n\\\\t\\\\\\\"The paragraph to be edited is changed to aText.\\\\\\\"\\\\n\\\\tparagraph text: aText.\\\\n\\\\tself resetState.\\\\n\\\\tself selectInvisiblyFrom: paragraph text size + 1 to: paragraph text size.\\\\n\\\\tself selectAndScroll.\\\\n\\\\tself deselect! !\\\\n\\\\n!StringHolderController methodsFor: 'accessing'!\\\\nmodel: aModel\\\\n\\\\n\\\\tsuper model: aModel.\\\\n\\\\tview displayContents == nil\\\\n\\\\t\\\\tifFalse: [self changeParagraph: view displayContents]! !\\\\n\\\\n\\\\n!StringHolderController methodsFor: 'compiler access'!\\\\nbindingOf: aString\\\\n\\\\t^model bindingOf: aString! !\\\\n\\\\n\\\\n!StringHolderController methodsFor: 'edit flag' stamp: 'di 10/9/1998 15:41'!\\\\nhasUnacceptedEdits: aBoolean\\\\n\\\\t^ view hasUnacceptedEdits: aBoolean! !\\\\n\\\\n!StringHolderController methodsFor: 'edit flag' stamp: 'tk 4/13/1998 23:09'!\\\\nuserHasEdited\\\\n\\\\t\\\\\\\"Note that the user has edited my text.\\\\\\\"\\\\n\\\\n\\\\tview hasUnacceptedEdits: true\\\\n! !\\\\n\\\\n!StringHolderController methodsFor: 'edit flag' stamp: 'tk 4/13/1998 23:08'!\\\\nuserHasNotEdited\\\\n\\\\t\\\\\\\"Note that my text is free of user edits.\\\\\\\"\\\\n\\\\n\\\\tmodel clearUserEditFlag\\\\n! !\\\\n\\\\n\\\\n!StringHolderController methodsFor: 'menu messages' stamp: 'jm 3/18/98 20:53'!\\\\naccept \\\\n\\\\t\\\\\\\"Refer to the comment in ParagraphEditor|accept.\\\\\\\"\\\\n\\\\n\\\\tsuper accept.\\\\n\\\\tmodel contents: paragraph string.\\\\n\\\\tself userHasNotEdited.\\\\n! !\\\\n\\\\n!StringHolderController methodsFor: 'menu messages' stamp: 'jm 3/18/98 20:54'!\\\\ncancel \\\\n\\\\t\\\\\\\"Refer to the comment in ParagraphEditor|cancel.\\\\\\\"\\\\n\\\\n\\\\tsuper cancel.\\\\n\\\\tself userHasNotEdited.\\\\n! !\\\\n\\\\n!StringHolderController methodsFor: 'menu messages' stamp: 'tk 4/13/1998 23:14'!\\\\nperformMenuMessage: aSelector\\\\n\\\\t\\\\\\\"Intercept #again so the model does not get locked by keying the search text.\\\\\\\"\\\\n\\\\n\\\\t| hadEdits |\\\\n\\\\thadEdits _ view canDiscardEdits not.\\\\n\\\\tsuper performMenuMessage: aSelector.\\\\n\\\\t(hadEdits not and:\\\\n\\\\t [aSelector == #again and:\\\\n\\\\t [(UndoMessage sends: #undoAgain:andReselect:typedKey:) and:\\\\n\\\\t [UndoMessage arguments at: 3]]])\\\\n\\\\t\\\\tifTrue: [self userHasNotEdited].\\\\n! !\\\\n\\\\n\\\\n!StringHolderController methodsFor: 'private' stamp: 'jm 3/18/98 20:43'!\\\\ncloseTypeIn\\\\n\\\\t\\\\\\\"Note edit if something actually was typed.\\\\\\\"\\\\n\\\\n\\\\tbeginTypeInBlock ~~ nil ifTrue: [self userHasEdited].\\\\n\\\\tsuper closeTypeIn.\\\\n! !\\\\n\\\\n!StringHolderController methodsFor: 'private' stamp: 'jm 3/18/98 20:45'!\\\\nzapSelectionWith: aText\\\\n\\\\t\\\\\\\"Note edit except during typeIn, which notes edits at close.\\\\\\\"\\\\n\\\\n\\\\tsuper zapSelectionWith: aText.\\\\n\\\\tbeginTypeInBlock == nil ifTrue: [self userHasEdited].\\\\n! !\\\\nView subclass: #StringHolderView\\\\n\\\\tinstanceVariableNames: 'displayContents hasUnacceptedEdits askBeforeDiscardingEdits'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'ST80-Support'!\\\\n!StringHolderView commentStamp: '<historical>' prior: 0!\\\\nI am a View of a String that is an aspect of a more structured object. This String should not be changed by any editing unless the user issues the accept command. Thus my instances provide a working copy of the String. This copy is edited. When the user issues the accept command, the String is copied from the working version; or if the user issues the cancel command, the working version is restored from the String. StringHolderController is my default controller. It is initialized specially by passing the string viewed which is then converted to a Paragraph for editing.!\\\\n\\\\n\\\\n!StringHolderView methodsFor: 'controller access'!\\\\ndefaultController \\\\n\\\\t\\\\\\\"Refer to the comment in View|defaultController.\\\\\\\"\\\\n\\\\n\\\\t^self defaultControllerClass newParagraph: displayContents! !\\\\n\\\\n!StringHolderView methodsFor: 'controller access'!\\\\ndefaultControllerClass \\\\n\\\\t\\\\\\\"Refer to the comment in View|defaultControllerClass.\\\\\\\"\\\\n\\\\n\\\\t^StringHolderController! !\\\\n\\\\n!StringHolderView methodsFor: 'controller access'!\\\\ndisplayContents\\\\n\\\\n\\\\t^displayContents! !\\\\n\\\\n\\\\n!StringHolderView methodsFor: 'deEmphasizing'!\\\\ndeEmphasizeView \\\\n\\\\t\\\\\\\"Refer to the comment in View|deEmphasizeView.\\\\\\\"\\\\n\\\\n\\\\t(self controller isKindOf: ParagraphEditor)\\\\n\\\\t \\\\tifTrue: [controller deselect]! !\\\\n\\\\n\\\\n!StringHolderView methodsFor: 'displaying'!\\\\ndisplay \\\\n\\\\t\\\\\\\"Refer to the comment in View.display.\\\\\\\"\\\\n\\\\t(self isUnlocked and: [self insetDisplayBox ~= displayContents clippingRectangle])\\\\n\\\\t\\\\tifTrue:  \\\\\\\"Recompose the text if the window changed\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t[self positionDisplayContents. \\\\n\\\\t\\\\t\\\\t\\\\t(self controller isKindOf: ParagraphEditor)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [controller recomputeSelection]].\\\\n\\\\tsuper display! !\\\\n\\\\n!StringHolderView methodsFor: 'displaying' stamp: 'hmm 6/18/2000 19:24'!\\\\ndisplayView \\\\n\\\\t\\\\\\\"Refer to the comment in View|displayView.\\\\\\\"\\\\n\\\\n\\\\tDisplay deferUpdatesIn: self displayBox while: [\\\\n\\\\t\\\\tself clearInside.\\\\n\\\\t\\\\t(self controller isKindOf: ParagraphEditor)\\\\n\\\\t\\\\t\\\\tifTrue: [controller display]\\\\n\\\\t\\\\t\\\\tifFalse: [displayContents display]]! !\\\\n\\\\n!StringHolderView methodsFor: 'displaying'!\\\\nlock\\\\n\\\\t\\\\\\\"Refer to the comment in view|lock.  Must do at least what display would do to lock the view.\\\\\\\"\\\\n\\\\t(self isUnlocked and: [self insetDisplayBox ~= displayContents clippingRectangle])\\\\n\\\\t\\\\tifTrue:  \\\\\\\"Recompose the text if the window changed\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t[self positionDisplayContents. \\\\n\\\\t\\\\t\\\\t\\\\t(self controller isKindOf: ParagraphEditor)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [controller recomputeSelection]].\\\\n\\\\tsuper lock! !\\\\n\\\\n!StringHolderView methodsFor: 'displaying'!\\\\npositionDisplayContents\\\\n\\\\t\\\\\\\"Presumably the text being displayed changed so that the wrapping box \\\\n\\\\tand clipping box should be reset.\\\\\\\"\\\\n\\\\n\\\\tdisplayContents \\\\n\\\\t\\\\twrappingBox: (self insetDisplayBox insetBy: 6 @ 0)\\\\n\\\\t\\\\tclippingBox: self insetDisplayBox! !\\\\n\\\\n\\\\n!StringHolderView methodsFor: 'initialize-release' stamp: 'jm 3/24/98 14:39'!\\\\ninitialize \\\\n\\\\t\\\\\\\"Refer to the comment in View|initialize.\\\\\\\"\\\\n\\\\n\\\\tsuper initialize.\\\\n\\\\tdisplayContents _ '' asParagraph.\\\\n\\\\thasUnacceptedEdits _ false.\\\\n\\\\taskBeforeDiscardingEdits _ true.\\\\n! !\\\\n\\\\n\\\\n!StringHolderView methodsFor: 'model access'!\\\\neditString: aString \\\\n\\\\t\\\\\\\"The paragraph to be displayed is created from the characters in aString.\\\\\\\"\\\\n\\\\n\\\\tdisplayContents _ Paragraph withText: aString asText\\\\n\\\\t\\\\tstyle: TextStyle default copy\\\\n\\\\t\\\\tcompositionRectangle: (self insetDisplayBox insetBy: 6 @ 0)\\\\n\\\\t\\\\tclippingRectangle: self insetDisplayBox\\\\n\\\\t\\\\tforeColor: self foregroundColor backColor: self backgroundColor.\\\\n\\\\t(self controller isKindOf: ParagraphEditor)\\\\n\\\\t\\\\tifTrue: [controller changeParagraph: displayContents]! !\\\\n\\\\n!StringHolderView methodsFor: 'model access' stamp: 'sma 5/28/2000 23:25'!\\\\ngetMenu: shiftKeyState\\\\n\\\\t^ nil! !\\\\n\\\\n!StringHolderView methodsFor: 'model access'!\\\\nmodel: aLockedModel \\\\n\\\\t\\\\\\\"Refer to the comment in View|model:.\\\\\\\"\\\\n \\\\n\\\\tsuper model: aLockedModel.\\\\n\\\\tself editString: model contents! !\\\\n\\\\n\\\\n!StringHolderView methodsFor: 'updating' stamp: 'jm 3/24/98 14:38'!\\\\naskBeforeDiscardingEdits: aBoolean\\\\n\\\\t\\\\\\\"Set the flag that determines whether the user should be asked before discarding unaccepted edits.\\\\\\\"\\\\n\\\\n\\\\taskBeforeDiscardingEdits _ aBoolean.\\\\n! !\\\\n\\\\n!StringHolderView methodsFor: 'updating' stamp: 'tk 4/13/1998 22:58'!\\\\ncanDiscardEdits\\\\n\\\\t\\\\\\\"Return true if this view either has no text changes or does not care.\\\\\\\"\\\\n\\\\n\\\\t^ (hasUnacceptedEdits & askBeforeDiscardingEdits) not\\\\n! !\\\\n\\\\n!StringHolderView methodsFor: 'updating' stamp: 'jm 3/24/98 17:49'!\\\\nhasUnacceptedEdits\\\\n\\\\t\\\\\\\"Return true if this view has unaccepted edits.\\\\\\\"\\\\n\\\\n\\\\t^ hasUnacceptedEdits\\\\n! !\\\\n\\\\n!StringHolderView methodsFor: 'updating' stamp: 'tk 4/13/1998 17:17'!\\\\nhasUnacceptedEdits: aBoolean\\\\n\\\\t\\\\\\\"Set the hasUnacceptedEdits flag to the given value.\\\\\\\"\\\\n\\\\n\\\\thasUnacceptedEdits _ aBoolean.\\\\n! !\\\\n\\\\n!StringHolderView methodsFor: 'updating' stamp: 'dgd 9/21/2003 17:42'!\\\\npromptForCancel\\\\n\\\\t\\\\\\\"Ask if it is OK to cancel changes to text\\\\\\\"\\\\n\\\\t| okToCancel stripes |\\\\n\\\\tself topView isCollapsed ifTrue:\\\\n\\\\t\\\\t[(self confirm: 'Changes have not been saved.\\\\nIs it OK to cancel those changes?' translated) ifTrue: [model clearUserEditFlag].\\\\n\\\\t\\\\t^ self].\\\\n\\\\tstripes _ (Form extent: 16@16 fromStipple: 16r36C9) bits.\\\\n\\\\tDisplay border: self insetDisplayBox width: 4\\\\n\\\\t\\\\t\\\\trule: Form reverse fillColor: stripes.\\\\n\\\\tokToCancel _ self confirm: 'Changes have not been saved.\\\\nIs it OK to cancel those changes?' translated.\\\\n\\\\tDisplay border: self insetDisplayBox width: 4\\\\n\\\\t\\\\t\\\\trule: Form reverse fillColor: stripes.\\\\n\\\\tokToCancel ifTrue:\\\\n\\\\t\\\\t[self updateDisplayContents.\\\\n\\\\t\\\\tmodel clearUserEditFlag].\\\\n! !\\\\n\\\\n!StringHolderView methodsFor: 'updating' stamp: 'di 4/21/1998 11:30'!\\\\nupdate: aSymbol\\\\n\\\\t\\\\\\\"Refer to the comment in View|update:.\\\\\\\"\\\\n\\\\taSymbol == #wantToChange ifTrue: [^ self promptForCancel].\\\\n\\\\taSymbol == #clearUserEdits ifTrue: [^ self hasUnacceptedEdits: false].\\\\n\\\\taSymbol == #flash ifTrue: [^ controller flash].\\\\n\\\\tself updateDisplayContents! !\\\\n\\\\n!StringHolderView methodsFor: 'updating'!\\\\nupdateDisplayContents\\\\n\\\\t\\\\\\\"Make the text that is displayed be the contents of the receiver's model.\\\\\\\"\\\\n\\\\n\\\\tself editString: model contents.\\\\n\\\\tself displayView! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStringHolderView class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StringHolderView class methodsFor: 'instance creation'!\\\\ncontainer\\\\n\\\\t\\\\\\\"Answer an instance of me with a new instance of StringHolder as the \\\\n\\\\tmodel.\\\\\\\"\\\\n\\\\n\\\\t^self container: StringHolder new! !\\\\n\\\\n!StringHolderView class methodsFor: 'instance creation'!\\\\ncontainer: aContainer \\\\n\\\\t\\\\\\\"Answer an instance of me whose model is aContainer. Give it a 2-dot \\\\n\\\\tborder.\\\\\\\"\\\\n\\\\n\\\\t| aCodeView |\\\\n\\\\taCodeView _ self new model: aContainer.\\\\n\\\\taCodeView borderWidthLeft: 2 right: 2 top: 2 bottom: 2.\\\\n\\\\t^aCodeView! !\\\\n\\\\n!StringHolderView class methodsFor: 'instance creation' stamp: 'ar 9/27/2005 20:48'!\\\\nopen\\\\n\\\\t\\\\\\\"Create a standard system view of a workspace on the screen.\\\\\\\"\\\\n\\\\n\\\\tself open: StringHolder new label: 'Workspace'! !\\\\n\\\\n!StringHolderView class methodsFor: 'instance creation'!\\\\nopen: aStringHolder \\\\n\\\\t\\\\\\\"Create a standard system view of the argument, aStringHolder, as viewed \\\\n\\\\tby an instance of me. The view has label 'StringHolder'.\\\\\\\"\\\\n\\\\n\\\\tself open: aStringHolder label: 'StringHolder'! !\\\\n\\\\n!StringHolderView class methodsFor: 'instance creation' stamp: 'sma 4/30/2000 10:15'!\\\\nopen: aStringHolder label: labelString \\\\n\\\\t\\\\\\\"NOTE this should be in the model class, and all senders so redirected,\\\\n\\\\tin order that the view class can be discarded in a morphic world.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Create a standard system view of the model, aStringHolder, as viewed by \\\\n\\\\tan instance of me. The label of the view is aString.\\\\\\\"\\\\n\\\\t| aStringHolderView topView |\\\\n\\\\n\\\\tSmalltalk isMorphic ifTrue: [^ aStringHolder openAsMorphLabel: labelString].\\\\n\\\\n\\\\taStringHolderView _ self container: aStringHolder.\\\\n\\\\ttopView _ StandardSystemView new.\\\\n\\\\ttopView model: aStringHolderView model.\\\\n\\\\ttopView addSubView: aStringHolderView.\\\\n\\\\ttopView label: labelString.\\\\n\\\\ttopView minimumSize: 100 @ 50.\\\\n\\\\ttopView controller open! !\\\\nMorph subclass: #StringMorph\\\\n\\\\tinstanceVariableNames: 'font emphasis contents hasFocus'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Basic'!\\\\n!StringMorph commentStamp: 'efc 3/7/2003 17:34' prior: 0!\\\\nStringMorph is a \\\\\\\"lightweight\\\\\\\" Morph to display a String. It supports only a single font, color, and emphasis combination. For multiple text styles, use TextMorph.\\\\n\\\\nStructure:\\\\ninstance var    \\\\tType              Description \\\\nfont \\\\t\\\\t\\\\tStrikeFont \\\\t\\\\t(normally nil; then the accessor #font gives back TextStyle \\\\n\\\\t\\\\t\\\\t\\\\tor nil\\\\t\\\\t\\\\tdefaultFont) \\\\nemphasis \\\\t\\\\tSmallInteger\\\\tbitmask determining character attributes (underline, bold, \\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\titalics, narrow, struckout) \\\\ncontents \\\\t\\\\tString \\\\t\\\\t\\\\tThe text that will be displayed. \\\\nhasFocus \\\\t\\\\tBoolean \\\\t\\\\tDo I have the keyboard focus or not? \\\\n\\\\nIf you shift-click on a StringMorph you can edit its string. This is accomplished the following way: StringMorph can launch a StringMorphEditor if it receives a #mouseDown event.\\\\n\\\\nA StringMorph may also be used like a SimpleButtonMorph to do an action when clicked. Use the menu 'extras' / 'add mouseUpAction'.\\\\n\\\\nThe following propery will be defined:\\\\naStringMorph valueOfProperty: #mouseUpCodeToRun!\\\\n]style[(11 20 5 14 6 97 9 14 47 9 10 53 9 40 12 108 6 49 7 168 17 75 17 163)f1LStringMorph Hierarchy;,f1,f1LMorph Comment;,f1,f1LString Comment;,f1,f1LTextMorph Comment;,f1,f1i,f1,f1LStrikeFont Comment;,f1,f1LTextStyle Comment;,f1,f1LSmallInteger Comment;,f1,f1LString Comment;,f1,f1LBoolean Comment;,f1,f1LStringMorphEditor Comment;,f1,f1LSimpleButtonMorph Comment;,f1!\\\\n\\\\n\\\\n!StringMorph methodsFor: 'accessing'!\\\\ncontents\\\\n\\\\n\\\\t^ contents! !\\\\n\\\\n!StringMorph methodsFor: 'accessing'!\\\\ncontentsClipped: aString\\\\n\\\\t\\\\\\\"Change my text, but do not change my size as a result\\\\\\\"\\\\n\\\\tcontents = aString ifTrue: [^ self].  \\\\\\\"No substantive change\\\\\\\"\\\\n\\\\tcontents _ aString.\\\\n\\\\tself changed! !\\\\n\\\\n!StringMorph methodsFor: 'accessing' stamp: 'nk 2/26/2004 13:15'!\\\\ncontents: newContents \\\\n\\\\t| scanner |\\\\n\\\\tcontents := newContents isText\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [scanner := StringMorphAttributeScanner new initializeFromStringMorph: self.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(newContents attributesAt: 1 forStyle: self font textStyle)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:attr | attr emphasizeScanner: scanner].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\temphasis := scanner emphasis.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tfont := scanner font emphasis: emphasis.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcolor := scanner textColor.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnewContents string]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [contents = newContents\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [^ self].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"no substantive change\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnewContents].\\\\n\\\\tself fitContents! !\\\\n\\\\n!StringMorph methodsFor: 'accessing' stamp: 'ar 12/12/2001 02:44'!\\\\nfitContents\\\\n\\\\n\\\\t| newBounds boundsChanged |\\\\n\\\\tnewBounds _ self measureContents.\\\\n\\\\tboundsChanged _ bounds extent ~= newBounds.\\\\n\\\\tself extent: newBounds.\\\\t\\\\t\\\\\\\"default short-circuits if bounds not changed\\\\\\\"\\\\n\\\\tboundsChanged ifFalse: [self changed]! !\\\\n\\\\n!StringMorph methodsFor: 'accessing' stamp: 'ar 1/31/2001 19:33'!\\\\nfont\\\\n\\\\t\\\\\\\"who came up with #fontToUse rather than font?!!\\\\\\\"\\\\n\\\\t^self fontToUse! !\\\\n\\\\n!StringMorph methodsFor: 'accessing' stamp: 'tk 8/28/2000 13:59'!\\\\nfontName: fontName size: fontSize\\\\n\\\\n\\\\t^ self font: (StrikeFont familyName: fontName size: fontSize) \\\\n\\\\t\\\\t\\\\temphasis: 0! !\\\\n\\\\n!StringMorph methodsFor: 'accessing' stamp: 'dgd 2/21/2003 23:07'!\\\\nfontToUse\\\\n\\\\t| fontToUse |\\\\n\\\\tfontToUse := font isNil ifTrue: [TextStyle defaultFont] ifFalse: [font].\\\\n\\\\t(emphasis isNil or: [emphasis = 0]) \\\\n\\\\t\\\\tifTrue: [^fontToUse]\\\\n\\\\t\\\\tifFalse: [^fontToUse emphasized: emphasis]! !\\\\n\\\\n!StringMorph methodsFor: 'accessing' stamp: 'di 4/2/1999 16:11'!\\\\nfont: aFont emphasis: emphasisCode\\\\n\\\\tfont _ aFont.\\\\n\\\\temphasis _ emphasisCode.\\\\n\\\\tself fitContents.\\\\n\\\\\\\"\\\\nin inspector say,\\\\n\\\\t self font: (TextStyle default fontAt: 2) emphasis: 1\\\\n\\\\\\\"! !\\\\n\\\\n!StringMorph methodsFor: 'accessing' stamp: 'sw 9/8/1999 11:10'!\\\\ninterimContents: aString\\\\n\\\\t\\\\\\\"The receiver is under edit and aString represents the string the user sees as she edits, which typically will not have been accepted and indeed may be abandoned\\\\\\\"\\\\n\\\\n\\\\tself contents: aString! !\\\\n\\\\n!StringMorph methodsFor: 'accessing' stamp: 'ar 12/30/2001 20:45'!\\\\nmeasureContents\\\\n\\\\t| f |\\\\n\\\\tf _ self fontToUse.\\\\n\\\\t^(((f widthOfString: contents) max: self minimumWidth)  @ f height).! !\\\\n\\\\n!StringMorph methodsFor: 'accessing' stamp: 'sw 9/8/1999 13:44'!\\\\nminimumWidth\\\\n\\\\t\\\\\\\"Answer the minimum width that the receiver can have.  A nonzero value here keeps the receiver from degenerating into something that cannot ever be seen or touched again!!  Obeyed by fitContents.\\\\\\\"\\\\n\\\\n\\\\t^ 3! !\\\\n\\\\n!StringMorph methodsFor: 'accessing' stamp: 'sw 12/6/1999 13:16'!\\\\nsetWidth: width\\\\n\\\\n\\\\tself extent: width @ (font ifNil: [TextStyle defaultFont]) height! !\\\\n\\\\n!StringMorph methodsFor: 'accessing' stamp: 'tk 12/16/1998 11:55'!\\\\nuserString\\\\n\\\\t\\\\\\\"Do I have a text string to be searched on?\\\\\\\"\\\\n\\\\n\\\\t^ contents! !\\\\n\\\\n!StringMorph methodsFor: 'accessing' stamp: 'sw 9/16/1999 22:57'!\\\\nvalueFromContents\\\\n\\\\t\\\\\\\"Return a new value from the current contents string.\\\\\\\"\\\\n\\\\t^ contents! !\\\\n\\\\n\\\\n!StringMorph methodsFor: 'connectors-layout' stamp: 'dgd 2/16/2003 21:52'!\\\\nminHeight\\\\n\\\\\\\"answer the receiver's minHeight\\\\\\\"\\\\n\\\\t^ self fontToUse height! !\\\\n\\\\n\\\\n!StringMorph methodsFor: 'drawing' stamp: 'ar 12/31/2001 02:38'!\\\\ndrawOn: aCanvas\\\\n\\\\n\\\\taCanvas drawString: contents in: bounds font: self fontToUse color: color.! !\\\\n\\\\n!StringMorph methodsFor: 'drawing' stamp: 'tk 8/1/2001 14:15'!\\\\nlookTranslucent\\\\n\\\\n\\\\t\\\\\\\"keep the text the same color (black)\\\\\\\"! !\\\\n\\\\n\\\\n!StringMorph methodsFor: 'editing'!\\\\nacceptContents\\\\n\\\\t\\\\\\\"The message is sent when the user hits enter or Cmd-S. Accept the current contents and end editing. This default implementation does nothing.\\\\\\\"\\\\n! !\\\\n\\\\n!StringMorph methodsFor: 'editing' stamp: 'sw 9/8/1999 17:04'!\\\\nacceptValue: aValue\\\\n\\\\t| val |\\\\n\\\\tself contents: (val _ aValue asString).\\\\n\\\\t^ val! !\\\\n\\\\n!StringMorph methodsFor: 'editing' stamp: 'sw 9/17/1999 13:27'!\\\\ncancelEdits\\\\n\\\\n\\\\tself doneWithEdits! !\\\\n\\\\n!StringMorph methodsFor: 'editing' stamp: 'di 9/6/1999 22:44'!\\\\ndoneWithEdits\\\\n\\\\n\\\\thasFocus _ false! !\\\\n\\\\n!StringMorph methodsFor: 'editing' stamp: 'nk 2/24/2005 20:11'!\\\\nlaunchMiniEditor: evt\\\\n\\\\n\\\\t| textMorph |\\\\n\\\\thasFocus _ true.  \\\\\\\"Really only means edit in progress for this morph\\\\\\\"\\\\n\\\\ttextMorph _ StringMorphEditor new contentsAsIs: contents.\\\\n\\\\ttextMorph beAllFont: self fontToUse.\\\\n\\\\ttextMorph bounds: (self bounds expandBy: 0@2).\\\\n\\\\tself addMorphFront: textMorph.\\\\n\\\\tevt hand newKeyboardFocus: textMorph.\\\\n\\\\ttextMorph editor selectFrom: 1 to: textMorph paragraph text string size! !\\\\n\\\\n!StringMorph methodsFor: 'editing' stamp: 'sw 9/8/1999 10:42'!\\\\nlostFocusWithoutAccepting\\\\n\\\\t\\\\\\\"The message is sent when the user, having been in an editing episode on the receiver, changes the keyboard focus -- typically by clicking on some editable text somewhere else -- without having accepted the current edits.\\\\\\\"\\\\n\\\\n\\\\tself acceptContents! !\\\\n\\\\n!StringMorph methodsFor: 'editing' stamp: 'sw 7/21/1999 14:59'!\\\\nwantsKeyboardFocusOnShiftClick\\\\n\\\\t^ owner topRendererOrSelf wantsKeyboardFocusFor: self\\\\n! !\\\\n\\\\n\\\\n!StringMorph methodsFor: 'event handling' stamp: 'ar 10/6/2000 00:16'!\\\\nhandlesMouseDown: evt\\\\n\\\\t^ (evt shiftPressed and: [self wantsKeyboardFocusOnShiftClick])\\\\n\\\\t\\\\tifTrue: [true]\\\\n\\\\t\\\\tifFalse: [super handlesMouseDown: evt].\\\\n! !\\\\n\\\\n!StringMorph methodsFor: 'event handling' stamp: 'sw 9/8/1999 11:26'!\\\\nhasFocus\\\\n\\\\t^ hasFocus! !\\\\n\\\\n!StringMorph methodsFor: 'event handling' stamp: 'di 9/5/1999 17:25'!\\\\nmouseDown: evt\\\\n\\\\t\\\\\\\"If the shift key is pressed, make this string the keyboard input focus.\\\\\\\"\\\\n\\\\n\\\\t(evt shiftPressed and: [self wantsKeyboardFocusOnShiftClick])\\\\n\\\\t\\\\tifTrue: [self launchMiniEditor: evt]\\\\n\\\\t\\\\tifFalse: [super mouseDown: evt].\\\\n! !\\\\n\\\\n!StringMorph methodsFor: 'event handling' stamp: 'sw 5/6/1998 15:45'!\\\\nwouldAcceptKeyboardFocus\\\\n\\\\t^ self isLocked not! !\\\\n\\\\n\\\\n!StringMorph methodsFor: 'font' stamp: 'efc 2/22/2003 21:35'!\\\\nemphasis: aNumber\\\\n\\\\t\\\\\\\"Set the receiver's emphasis as indicated. aNumber is a bitmask with the following format:\\\\n\\\\n\\\\tbit\\\\tattribute\\\\n\\\\t1\\\\tbold\\\\n\\\\t2\\\\titalic\\\\n\\\\t4\\\\tunderlined\\\\n\\\\t8\\\\tnarrow\\\\n\\\\t16\\\\tstruckOut\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"examples: 0 -> plain.  \\\\n\\\\t1 -> bold.  2 -> italic.  3 -> bold italic.  4 -> underlined  \\\\n\\\\t5 -> bold underlined.  6 -> italic underlined.   7 -> bold italic underlined   \\\\n\\\\tetc...\\\\\\\"\\\\n\\\\n\\\\temphasis _ aNumber.\\\\n\\\\t^ self font: font emphasis: emphasis! !\\\\n\\\\n\\\\n!StringMorph methodsFor: 'halos and balloon help' stamp: 'sw 6/15/1998 15:34'!\\\\naddOptionalHandlesTo: aHalo box: box\\\\n\\\\tself flag: #deferred.\\\\n\\\\n\\\\t\\\\\\\"Eventually...\\\\n\\\\tself addFontHandlesTo: aHalo box: box\\\\\\\"! !\\\\n\\\\n!StringMorph methodsFor: 'halos and balloon help' stamp: 'sw 6/6/2001 13:34'!\\\\nboundsForBalloon\\\\n\\\\t\\\\\\\"Some morphs have bounds that are way too big.  This is a contorted way of making things work okay in PluggableListMorphs, whose list elements historically have huge widths\\\\\\\"\\\\n\\\\n\\\\t| ownerOwner |\\\\n\\\\t^ ((owner notNil and: [(ownerOwner _ owner owner) notNil]) and:\\\\n\\\\t\\\\t\\\\t[ownerOwner isKindOf: PluggableListMorph])\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self boundsInWorld intersect: ownerOwner boundsInWorld]\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[super boundsForBalloon]! !\\\\n\\\\n\\\\n!StringMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 22:31'!\\\\ndefaultColor\\\\n\\\\t\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color black! !\\\\n\\\\n!StringMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 20:42'!\\\\ninitialize\\\\n\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\\\\"\\\\\\\"\\\\n\\\\tfont _ nil.\\\\n\\\\temphasis _ 0.\\\\n\\\\thasFocus _ false! !\\\\n\\\\n!StringMorph methodsFor: 'initialization' stamp: 'dgd 2/14/2003 21:57'!\\\\ninitWithContents: aString font: aFont emphasis: emphasisCode \\\\n\\\\tsuper initialize.\\\\n\\\\t\\\\n\\\\tfont _ aFont.\\\\n\\\\temphasis _ emphasisCode.\\\\n\\\\thasFocus _ false.\\\\n\\\\tself contents: aString! !\\\\n\\\\n\\\\n!StringMorph methodsFor: 'layout' stamp: 'nk 5/11/2001 09:33'!\\\\nfullBounds\\\\n\\\\tself contents ifNil: [ self contents: 'String Morph' ].\\\\n\\\\t^super fullBounds! !\\\\n\\\\n\\\\n!StringMorph methodsFor: 'menu' stamp: 'dgd 8/30/2003 22:17'!\\\\naddCustomMenuItems: aCustomMenu hand: aHandMorph\\\\n\\\\n\\\\tsuper addCustomMenuItems: aCustomMenu hand: aHandMorph.\\\\n\\\\taCustomMenu add: 'change font' translated action: #changeFont.\\\\n\\\\taCustomMenu add: 'change emphasis' translated action: #changeEmphasis.\\\\n! !\\\\n\\\\n!StringMorph methodsFor: 'menu' stamp: 'yo 3/14/2005 13:03'!\\\\nchangeEmphasis\\\\n\\\\n\\\\t| reply aList |\\\\n\\\\taList _ #(normal bold italic narrow underlined struckOut).\\\\n\\\\treply _ (SelectionMenu labelList: (aList collect: [:t | t translated]) selections: aList) startUp.\\\\n\\\\treply ifNotNil:[\\\\n\\\\t\\\\tself emphasis: (TextEmphasis perform: reply) emphasisCode.\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StringMorph methodsFor: 'menu' stamp: 'ar 1/5/2002 21:45'!\\\\nchangeFont\\\\n\\\\t| newFont |\\\\n\\\\tnewFont _ StrikeFont fromUser: self fontToUse.\\\\n\\\\tnewFont ifNotNil:[self font: newFont].! !\\\\n\\\\n\\\\n!StringMorph methodsFor: 'objects from disk' stamp: 'tk 11/29/2004 16:52'!\\\\nfixUponLoad: aProject seg: anImageSegment\\\\n\\\\n\\\\t\\\\\\\"We are in an old project that is being loaded from disk.\\\\n\\\\nFix up conventions that have changed.\\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\t| substituteFont |\\\\n\\\\n\\\\tsubstituteFont _ aProject projectParameters at:\\\\n\\\\n#substitutedFont ifAbsent: [#none].\\\\n\\\\n\\\\t(substituteFont ~~ #none and: [self font == substituteFont])\\\\n\\\\n\\\\t\\\\t\\\\tifTrue: [ self fitContents ].\\\\n\\\\n\\\\n\\\\n\\\\t^ super fixUponLoad: aProject seg: anImageSegment! !\\\\n\\\\n\\\\n!StringMorph methodsFor: 'parts bin' stamp: 'dgd 2/14/2003 21:58'!\\\\ninitializeToStandAlone\\\\n\\\\tsuper initializeToStandAlone.\\\\n\\\\t\\\\n\\\\tfont _ nil.\\\\n\\\\temphasis _ 0.\\\\n\\\\thasFocus _ false.\\\\n\\\\tself contents: 'String: Shift-click on me to edit'! !\\\\n\\\\n\\\\n!StringMorph methodsFor: 'printing' stamp: 'efc 2/22/2003 21:35'!\\\\nfont: aFont \\\\n\\\\t\\\\\\\"Set the font my text will use. The emphasis remains unchanged.\\\\\\\"\\\\n\\\\n\\\\tfont _ aFont.\\\\n\\\\t^ self font: font emphasis: emphasis! !\\\\n\\\\n!StringMorph methodsFor: 'printing' stamp: 'jm 11/3/97 16:52'!\\\\nprintOn: aStream\\\\n\\\\n\\\\tsuper printOn: aStream.\\\\n\\\\taStream print: contents.\\\\n! !\\\\n\\\\n\\\\n!StringMorph methodsFor: '*MorphicExtras-accessing' stamp: 'sw 2/18/2003 02:55'!\\\\ngetCharacters\\\\n\\\\t\\\\\\\"obtain a string value from the receiver.\\\\\\\"\\\\n\\\\n\\\\t^ self contents! !\\\\n\\\\n!StringMorph methodsFor: '*MorphicExtras-accessing' stamp: 'sw 9/9/1999 18:09'!\\\\nhandsWithMeForKeyboardFocus\\\\n\\\\t| foc |\\\\n\\\\t\\\\\\\"Answer the hands that have me as their keyboard focus\\\\\\\"\\\\n\\\\n\\\\thasFocus ifFalse: [^ #()].\\\\n\\\\t^ self currentWorld hands select:\\\\n\\\\t\\\\t[:aHand | (foc _ aHand keyboardFocus) notNil and: [foc owner == self]]! !\\\\n\\\\n\\\\n!StringMorph methodsFor: '*MorphicExtras-printing'!\\\\nfullPrintOn: aStream\\\\n\\\\n\\\\taStream nextPutAll: '('.\\\\n\\\\tsuper fullPrintOn: aStream.\\\\n\\\\taStream nextPutAll: ') contents: '; print: contents! !\\\\n\\\\n\\\\n!StringMorph methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nballoonTextForClassAndMethodString\\\\n\\\\t\\\\\\\"Answer suitable balloon text for the receiver thought of as an encoding of the form\\\\n\\\\t\\\\t<className>  [ class ] <selector>\\\\\\\"\\\\n\\\\n\\\\t| aComment |\\\\n\\\\tPreferences balloonHelpInMessageLists\\\\n\\\\t\\\\tifFalse: [^ nil].\\\\n\\\\tMessageSet parse: self contents asString toClassAndSelector:\\\\n\\\\t\\\\t[:aClass :aSelector |\\\\n\\\\t\\\\t\\\\t(aClass notNil and: [aSelector notNil]) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[aComment := aClass precodeCommentOrInheritedCommentFor: aSelector]].\\\\n\\\\t^ aComment\\\\n! !\\\\n\\\\n!StringMorph methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nballoonTextForLexiconString\\\\n\\\\t\\\\\\\"Answer suitable balloon text for the receiver thought of as an encoding (used in Lexicons) of the form\\\\n\\\\t\\\\t<selector> <spaces> (<className>>)\\\\\\\"\\\\n\\\\n\\\\t| aComment contentsString aSelector aClassName |\\\\n\\\\tPreferences balloonHelpInMessageLists\\\\n\\\\t\\\\tifFalse: [^ nil].\\\\n\\\\tcontentsString := self contents asString.\\\\n\\\\taSelector := contentsString upTo: $ .\\\\n\\\\taClassName := contentsString copyFrom: ((contentsString indexOf: $() + 1) to: ((contentsString indexOf: $)) - 1).\\\\n\\\\tMessageSet parse: (aClassName, ' dummy') toClassAndSelector:\\\\n\\\\t\\\\t[:cl :sel | cl ifNotNil:\\\\n\\\\t\\\\t\\\\t[aComment := cl precodeCommentOrInheritedCommentFor: aSelector]].\\\\n\\\\t^ aComment\\\\n! !\\\\n\\\\n!StringMorph methodsFor: '*Tools' stamp: 'sd 11/20/2005 21:26'!\\\\nballoonTextForMethodString\\\\n\\\\t\\\\\\\"Answer suitable balloon text for the receiver thought of as a method belonging to the currently-selected class of a browser tool.\\\\\\\"\\\\n\\\\n\\\\t| aWindow aCodeHolder aClass |\\\\n\\\\tPreferences balloonHelpInMessageLists\\\\n\\\\t\\\\tifFalse: [^ nil].\\\\n\\\\taWindow := self ownerThatIsA: SystemWindow.\\\\n\\\\t(aWindow isNil or: [((aCodeHolder := aWindow model) isKindOf: CodeHolder) not])\\\\n\\\\t\\\\tifTrue:\\\\t[^ nil].\\\\n\\\\t((aClass := aCodeHolder selectedClassOrMetaClass) isNil or:\\\\n\\\\t\\\\t[(aClass includesSelector: contents asSymbol) not])\\\\n\\\\t\\\\t\\\\tifTrue: [^ nil].\\\\n\\\\t^ aClass precodeCommentOrInheritedCommentFor: contents asSymbol\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStringMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StringMorph class methodsFor: 'instance creation' stamp: 'sw 8/22/97 22:19'!\\\\ncontents: aString\\\\n\\\\t\\\\\\\" 'StringMorph contents: str' is faster than 'StringMorph new contents: str' \\\\\\\"\\\\n\\\\t^ self contents: aString font: nil! !\\\\n\\\\n!StringMorph class methodsFor: 'instance creation' stamp: 'di 4/1/1999 17:15'!\\\\ncontents: aString font: aFont\\\\n\\\\t^ self basicNew initWithContents: aString font: aFont emphasis: 0! !\\\\n\\\\n!StringMorph class methodsFor: 'instance creation' stamp: 'di 4/1/1999 17:15'!\\\\ncontents: aString font: aFont emphasis: emphasisCode\\\\n\\\\t^ self basicNew initWithContents: aString font: aFont emphasis: emphasisCode! !\\\\n\\\\n\\\\n!StringMorph class methodsFor: 'scripting' stamp: 'sw 5/6/1998 14:00'!\\\\nauthoringPrototype\\\\n\\\\t^ super authoringPrototype contents: 'String'! !\\\\n\\\\n\\\\n!StringMorph class methodsFor: 'testing' stamp: 'di 5/6/1998 21:07'!\\\\ntest\\\\n\\\\t\\\\\\\"Return a morph with lots of strings for testing display speed.\\\\\\\"\\\\n\\\\t| c |\\\\n\\\\tc _ AlignmentMorph newColumn.\\\\n\\\\tSystemOrganization categories do:\\\\n\\\\t\\\\t[:cat | c addMorph: (StringMorph new contents: cat)].\\\\n\\\\t^ c! !\\\\n\\\\n!StringMorph class methodsFor: 'testing' stamp: 'di 5/6/1998 21:08'!\\\\ntest2\\\\n\\\\t\\\\\\\"Return a morph with lots of strings for testing display speed.\\\\\\\"\\\\n\\\\t| c r |\\\\n\\\\tc _ AlignmentMorph newColumn.\\\\n\\\\tSystemOrganization categories reverseDo:\\\\n\\\\t\\\\t[:cat | c addMorph: (StringMorph new contents: cat)].\\\\n\\\\tr _ RectangleMorph new extent: c fullBounds extent.\\\\n\\\\tc submorphsDo: [:m | r addMorph: m].\\\\n\\\\t^ r\\\\n! !\\\\nObject subclass: #StringMorphAttributeScanner\\\\n\\\\tinstanceVariableNames: 'fontNumber textColor emphasis alignment actualFont indent kern'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Text Support'!\\\\n!StringMorphAttributeScanner commentStamp: '<historical>' prior: 0!\\\\nA StringMorphAttributeScanner provides the interface of a CharacterScanner so that text attributes may be collected from a Text and used elsewhere, like in setting the attributes of a StringMorph.\\\\n!\\\\n]style[(2 195)cblack;,f3cblack;!\\\\n\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'accessing' stamp: 'nk 2/26/2004 13:12'!\\\\nactualFont\\\\n\\\\t\\\\\\\"Answer the value of actualFont\\\\\\\"\\\\n\\\\n\\\\t^ actualFont ifNil: [ TextStyle defaultFont ]! !\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'accessing' stamp: 'nk 2/26/2004 12:34'!\\\\nalignment\\\\n\\\\t\\\\\\\"Answer the value of alignment\\\\\\\"\\\\n\\\\n\\\\t^ alignment! !\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'accessing' stamp: 'nk 2/26/2004 12:34'!\\\\nemphasis\\\\n\\\\t\\\\\\\"Answer the value of emphasis\\\\\\\"\\\\n\\\\n\\\\t^ emphasis! !\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'accessing' stamp: 'nk 2/26/2004 13:14'!\\\\nfont\\\\n\\\\t\\\\\\\"Answer the value of font\\\\\\\"\\\\n\\\\n\\\\t^self textStyle fontAt: self fontNumber! !\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'accessing' stamp: 'nk 2/26/2004 13:11'!\\\\nfontNumber\\\\n\\\\t\\\\\\\"Answer the value of font\\\\\\\"\\\\n\\\\n\\\\t^ fontNumber! !\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'accessing' stamp: 'nk 2/26/2004 12:34'!\\\\nindent\\\\n\\\\t\\\\\\\"Answer the value of indent\\\\\\\"\\\\n\\\\n\\\\t^ indent! !\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'accessing' stamp: 'nk 2/26/2004 12:34'!\\\\nkern\\\\n\\\\t\\\\\\\"Answer the value of kern\\\\\\\"\\\\n\\\\n\\\\t^ kern! !\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'accessing' stamp: 'nk 2/26/2004 12:34'!\\\\ntextColor\\\\n\\\\t\\\\\\\"Answer the value of textColor\\\\\\\"\\\\n\\\\n\\\\t^ textColor! !\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'accessing' stamp: 'nk 2/26/2004 13:12'!\\\\ntextStyle\\\\n\\\\t^self actualFont textStyle ifNil: [ TextStyle default ]! !\\\\n\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'initialize-release' stamp: 'nk 2/26/2004 13:10'!\\\\ninitialize\\\\n\\\\temphasis _ 0.\\\\n\\\\tindent _ 0.\\\\n\\\\tkern _ 0.\\\\n\\\\tfontNumber _ 1.\\\\n\\\\tactualFont _ TextStyle defaultFont! !\\\\n\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'scanning' stamp: 'nk 2/26/2004 12:40'!\\\\naddEmphasis: anInteger\\\\n\\\\t\\\\\\\"Set the value of emphasis\\\\\\\"\\\\n\\\\n\\\\temphasis _ emphasis bitOr: anInteger! !\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'scanning' stamp: 'nk 2/26/2004 12:41'!\\\\naddKern: kernDelta\\\\n\\\\t\\\\\\\"Set the current kern amount.\\\\\\\"\\\\n\\\\tkern _ kern + kernDelta! !\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'scanning' stamp: 'nk 2/26/2004 12:37'!\\\\nindentationLevel: anInteger\\\\n\\\\t\\\\\\\"Set the value of indent\\\\\\\"\\\\n\\\\n\\\\tindent _ anInteger! !\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'scanning' stamp: 'nk 2/26/2004 13:09'!\\\\nsetActualFont: aFont\\\\n\\\\t\\\\\\\"Set the value of actualFont, from a TextFontReference\\\\\\\"\\\\n\\\\n\\\\tactualFont _ aFont.\\\\n\\\\taFont textStyle ifNotNilDo: [ :ts | fontNumber _ ts fontIndexOf: aFont ]! !\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'scanning' stamp: 'nk 2/26/2004 12:39'!\\\\nsetAlignment: aSymbol\\\\n\\\\t\\\\\\\"Set the value of alignment\\\\\\\"\\\\n\\\\n\\\\talignment _ aSymbol! !\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'scanning' stamp: 'nk 2/26/2004 13:10'!\\\\nsetFont: fontNum\\\\n\\\\t\\\\\\\"Set the value of font\\\\\\\"\\\\n\\\\n\\\\tfontNumber _ fontNum! !\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'scanning' stamp: 'nk 2/26/2004 12:34'!\\\\ntextColor: anObject\\\\n\\\\t\\\\\\\"Set the value of textColor\\\\\\\"\\\\n\\\\n\\\\ttextColor _ anObject! !\\\\n\\\\n\\\\n!StringMorphAttributeScanner methodsFor: 'string morph' stamp: 'nk 2/26/2004 13:09'!\\\\ninitializeFromStringMorph: aStringMorph\\\\n\\\\t| style |\\\\n\\\\tactualFont _ aStringMorph font ifNil: [ TextStyle defaultFont ].\\\\n\\\\tstyle _ actualFont textStyle.\\\\n\\\\temphasis _ actualFont emphasis.\\\\n\\\\tfontNumber _ (style fontIndexOf: actualFont) ifNil: [ 1 ].\\\\n\\\\ttextColor _ aStringMorph color.\\\\n! !\\\\nTextMorph subclass: #StringMorphEditor\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Text Support'!\\\\n!StringMorphEditor commentStamp: '<historical>' prior: 0!\\\\nI am a textMorph used as a pop-up editor for StringMorphs.  I present a yellow background and I go away when a CR is typed or when the user clicks elsewhere.!\\\\n\\\\n\\\\n!StringMorphEditor methodsFor: 'display' stamp: 'sw 4/20/2003 15:46'!\\\\ninitialize\\\\n\\\\n\\\\t\\\\\\\"Initialize the receiver.  Give it a white background\\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\tsuper initialize.\\\\n\\\\n\\\\tself backgroundColor: Color white.\\\\n\\\\n\\\\tself color: Color red! !\\\\n\\\\n\\\\n!StringMorphEditor methodsFor: 'drawing' stamp: 'sw 9/7/1999 16:22'!\\\\ndrawOn: aCanvas\\\\n\\\\n\\\\taCanvas fillRectangle: self bounds color: Color yellow muchLighter.\\\\n\\\\t^ super drawOn: aCanvas! !\\\\n\\\\n\\\\n!StringMorphEditor methodsFor: 'event handling' stamp: 'nk 6/12/2004 22:07'!\\\\nkeyStroke: evt\\\\n\\\\t\\\\\\\"This is hugely inefficient, but it seems to work, and it's unlikely it will ever need\\\\n\\\\tto be any more efficient -- it's only intended to edit single-line strings.\\\\\\\"\\\\n\\\\n\\\\t| char priorEditor newSel |\\\\n\\\\t(((char _ evt keyCharacter) = Character enter) or: [(char = Character cr)\\\\n\\\\t\\\\t\\\\tor: [char = $s and: [evt commandKeyPressed]]])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [owner doneWithEdits; acceptContents.\\\\n\\\\tself flag: #arNote. \\\\\\\"Probably unnecessary\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tevt hand releaseKeyboardFocus.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t^ self delete].\\\\n\\\\t\\\\n\\\\t(char = $l and: [evt commandKeyPressed]) ifTrue:   \\\\\\\"cancel\\\\\\\"\\\\n\\\\t\\\\t[owner cancelEdits.\\\\n\\\\t\\\\tevt hand releaseKeyboardFocus.\\\\n\\\\t\\\\t^ self delete].\\\\n\\\\n\\\\tsuper keyStroke: evt.\\\\n\\\\towner interimContents: self contents asString.\\\\n\\\\tnewSel _ self editor selectionInterval.\\\\n\\\\n\\\\tpriorEditor _ self editor.  \\\\\\\"Save editor state\\\\\\\"\\\\n\\\\tself releaseParagraph.  \\\\\\\"Release paragraph so it will grow with selection.\\\\\\\"\\\\n\\\\tself paragraph.      \\\\\\\"Re-instantiate to set new bounds\\\\\\\"\\\\n\\\\tself installEditorToReplace: priorEditor.  \\\\\\\"restore editor state\\\\\\\"\\\\n\\\\tself editor selectFrom: newSel first to: newSel last.\\\\n! !\\\\n\\\\n!StringMorphEditor methodsFor: 'event handling' stamp: 'nk 1/23/2004 13:18'!\\\\nkeyboardFocusChange: aBoolean\\\\n\\\\t| hadFocus |\\\\n\\\\towner ifNil: [ ^self ].\\\\n\\\\thadFocus _ owner hasFocus.\\\\n\\\\tsuper keyboardFocusChange: aBoolean.\\\\n\\\\taBoolean ifFalse:\\\\n\\\\t\\\\t[hadFocus ifTrue:\\\\n\\\\t\\\\t\\\\t[owner lostFocusWithoutAccepting; doneWithEdits].\\\\n\\\\t\\\\t^ self delete]! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStringMorphEditor class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StringMorphEditor class methodsFor: 'new-morph participation' stamp: 'kfr 5/1/2000 13:41'!\\\\nincludeInNewMorphMenu\\\\n\\\\t\\\\\\\"Not to be instantiated from the menu\\\\\\\"\\\\n\\\\t^ false! !\\\\nTileMorph subclass: #StringReadoutTile\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'EToys-Scripting Tiles'!\\\\n\\\\n!StringReadoutTile methodsFor: 'accessing' stamp: 'sw 11/1/97 13:15'!\\\\nliteral: anObject\\\\n\\\\tliteral _ anObject.\\\\n\\\\tself updateLiteralLabel.\\\\n\\\\tsubmorphs last informTarget! !\\\\n\\\\n\\\\n!StringReadoutTile methodsFor: 'literal' stamp: 'sw 9/15/1999 15:14'!\\\\nsetLiteralTo: anObject width: w\\\\n\\\\t\\\\\\\"like literal:width: but does not inform the target\\\\\\\"\\\\n\\\\tliteral _ anObject.\\\\n\\\\tself updateLiteralLabel.\\\\n\\\\tsubmorphs last setWidth: w.\\\\n\\\\tself updateLiteralLabel! !\\\\n\\\\n\\\\n!StringReadoutTile methodsFor: 'misc' stamp: 'sw 9/17/1999 08:01'!\\\\nbasicWidth\\\\n\\\\t^ 26! !\\\\n\\\\n\\\\n!StringReadoutTile methodsFor: 'event handling' stamp: 'tak 8/2/2005 18:20'!\\\\nhandlesMouseDown: evt \\\\n\\\\t^ true! !\\\\n\\\\n!StringReadoutTile methodsFor: 'event handling' stamp: 'tak 8/2/2005 23:38'!\\\\nmouseStillDown: evt \\\\n\\\\t(self labelMorph notNil\\\\n\\\\t\\\\t\\\\tand: [self labelMorph containsPoint: evt cursorPoint])\\\\n\\\\t\\\\tifTrue: [^ self labelMorph mouseDown: evt].\\\\n\\\\t^ super mouseStillDown: evt! !\\\\nObjectSocket subclass: #StringSocket\\\\n\\\\tinstanceVariableNames: 'numStringsInNextArray stringsForNextArray nextStringSize files startTime stringCounter socketWriterProcess outputQueue bytesInOutputQueue extraUnsentBytes transmissionError readBuffer'\\\\n\\\\tclassVariableNames: 'MaxRatesSeen RecentSendHistory RunningSendCount'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Nebraska-Network-ObjectSocket'!\\\\n!StringSocket commentStamp: 'ls 8/4/2004 15:15' prior: 0!\\\\nThis is a socket which sends arrays of strings back and forth.  This is less convenient than ObjectSockets, but it is more secure and it makes it easier to reason about updates to the protocol.\\\\n\\\\nAn array of strings is represented on the network as:\\\\n\\\\n\\\\t4-bytes\\\\t\\\\tnumber of strings in the array\\\\n\\\\t4-byte\\\\t\\\\tnumber of bytes in the first string\\\\n\\\\tn1-bytes\\\\t\\\\tcharacters in the first string\\\\n\\\\t4-bytes\\\\t\\\\tnumber of bytes in the second string\\\\n\\\\tn2-bytes\\\\tcharacters in the second string\\\\n\\\\t...\\\\n\\\\n!\\\\n\\\\n\\\\n!StringSocket methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:26'!\\\\ndestroy\\\\n\\\\n\\\\tsocketWriterProcess ifNotNil: [socketWriterProcess terminate. socketWriterProcess := nil].\\\\n\\\\toutputQueue := nil.\\\\n\\\\tbytesInOutputQueue := 0.\\\\n\\\\tsocket ifNotNil: [socket destroy. socket := nil.].\\\\n! !\\\\n\\\\n!StringSocket methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:26'!\\\\ninitialize: aSocket\\\\n\\\\n\\\\ttransmissionError := false.\\\\n\\\\tsuper initialize: aSocket.\\\\n\\\\toutputQueue := SharedQueue new.\\\\n\\\\textraUnsentBytes := bytesInOutputQueue := 0.\\\\n\\\\tsocketWriterProcess := [\\\\n\\\\t\\\\t[self transmitQueueNext] whileTrue.\\\\n\\\\t\\\\tsocketWriterProcess := nil.\\\\n\\\\t\\\\toutputQueue := nil.\\\\n\\\\t\\\\tbytesInOutputQueue := 0.\\\\n\\\\t] forkAt: Processor lowIOPriority.! !\\\\n\\\\n!StringSocket methodsFor: 'as yet unclassified' stamp: 'yo 10/10/2005 18:47'!\\\\nreadBuffer\\\\n\\\\n\\\\t^ readBuffer ifNil: [readBuffer _ String new: 20000].\\\\n! !\\\\n\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'yo 10/10/2005 18:49'!\\\\naddToInBuf: aString\\\\n\\\\n\\\\t| newAlloc |\\\\n\\\\tnewAlloc _ aString size * 2 max: 80000.\\\\n\\\\tinBuf ifNil: [\\\\n\\\\t\\\\tinBuf _ String new: newAlloc.\\\\n\\\\t\\\\tinBufIndex _ 1.\\\\n\\\\t\\\\tinBufLastIndex _ 0.\\\\n\\\\t].\\\\n\\\\taString size > (inBuf size - inBufLastIndex) ifTrue: [\\\\n\\\\t\\\\tinBuf _ inBuf , (String new: newAlloc)\\\\n\\\\t].\\\\n\\\\tinBuf \\\\n\\\\t\\\\treplaceFrom: inBufLastIndex + 1 \\\\n\\\\t\\\\tto: inBufLastIndex + aString size\\\\n\\\\t\\\\twith: aString \\\\n\\\\t\\\\tstartingAt: 1.\\\\n\\\\tinBufLastIndex _ inBufLastIndex + aString size.\\\\n! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'sd 11/20/2005 21:26'!\\\\naddToOutBuf: arrayToWrite\\\\n\\\\n\\\\t| size newAlloc |\\\\n\\\\tsize := self spaceToEncode: arrayToWrite.\\\\n\\\\tnewAlloc := size * 2 max: 8000.\\\\t\\\\\\\"gives us room to grow\\\\\\\"\\\\n\\\\toutBuf ifNil: [\\\\n\\\\t\\\\toutBuf := String new: newAlloc.\\\\n\\\\t\\\\toutBufIndex := 1.\\\\n\\\\t].\\\\n\\\\toutBuf size - outBufIndex + 1 < size ifTrue: [\\\\n\\\\t\\\\toutBuf := outBuf , (String new: newAlloc).\\\\n\\\\t].\\\\n\\\\tCanvasEncoder at: 1 count: arrayToWrite size + 1.\\\\n\\\\toutBuf putInteger32: arrayToWrite size at: outBufIndex.\\\\n\\\\toutBufIndex := outBufIndex + 4.\\\\n\\\\tarrayToWrite do: [ :each |\\\\n\\\\t\\\\toutBuf putInteger32: each size at: outBufIndex.\\\\n\\\\t\\\\toutBufIndex := outBufIndex + 4.\\\\n\\\\t\\\\toutBuf \\\\n\\\\t\\\\t\\\\treplaceFrom: outBufIndex \\\\n\\\\t\\\\t\\\\tto: outBufIndex + each size - 1 \\\\n\\\\t\\\\t\\\\twith: each \\\\n\\\\t\\\\t\\\\tstartingAt: 1.\\\\n\\\\t\\\\toutBufIndex := outBufIndex + each size.\\\\n\\\\t].\\\\n\\\\t^size! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'RAA 12/13/2000 08:29'!\\\\nbacklog\\\\n\\\\n\\\\t^bytesInOutputQueue + extraUnsentBytes! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'sd 11/20/2005 21:26'!\\\\ngotSomething\\\\n\\\\n\\\\tnumStringsInNextArray ifNil: [^self tryForNumStringsInNextArray ].\\\\n\\\\tnumStringsInNextArray = 0 ifTrue: [\\\\n\\\\t\\\\tinObjects add: #().\\\\n\\\\t\\\\tnumStringsInNextArray := nil.\\\\n\\\\t\\\\t^true ].\\\\n\\\\tnextStringSize ifNil: [^ self tryForNextStringSize ].\\\\n\\\\t^self tryForString\\\\n! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'sd 11/20/2005 21:26'!\\\\ninBufNext: anInteger\\\\n\\\\t\\\\n\\\\t| answer |\\\\n\\\\tanswer := inBuf copyFrom: inBufIndex to: inBufIndex + anInteger - 1.\\\\n\\\\tinBufIndex := inBufIndex + anInteger.\\\\n\\\\t^answer! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'RAA 7/20/2000 15:55'!\\\\ninBufSize\\\\n\\\\n\\\\tinBuf ifNil: [^0].\\\\n\\\\t^inBufLastIndex - inBufIndex + 1! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'RAA 12/14/2000 09:54'!\\\\nisConnected\\\\n\\\\n\\\\t^super isConnected and: [socketWriterProcess notNil]! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'md 2/24/2006 19:51'!\\\\nnextPut: anObject\\\\n\\\\n\\\\tsocketWriterProcess ifNil: [^self].\\\\n\\\\toutObjects addLast: anObject.\\\\n\\\\t\\\\\\\"return the argument - added by kwl\\\\\\\"\\\\n\\\\t^ anObject! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'RAA 12/14/2000 09:46'!\\\\nprocessIO\\\\n\\\\t\\\\\\\"do some as much network IO as possible\\\\\\\"\\\\n\\\\n\\\\tsocketWriterProcess ifNil: [^self].\\\\n\\\\tself processOutput.\\\\n\\\\tself processInput.! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'yo 10/10/2005 18:47'!\\\\nprocessInput\\\\n\\\\t| totalReceived chunkOfData |\\\\n\\\\t\\\\\\\"do as much input as possible\\\\\\\"\\\\n\\\\n\\\\tself flag: #XXX.  \\\\\\\"should have resource limits here--no more than X objects and Y bytes\\\\\\\"\\\\n\\\\n\\\\tchunkOfData _ socket receiveAvailableDataIntoBuffer: self readBuffer.\\\\n\\\\tself addToInBuf: chunkOfData.\\\\n\\\\ttotalReceived _ chunkOfData size.\\\\n\\\\n\\\\ttotalReceived > 0 ifTrue: [\\\\n\\\\t\\\\tNebraskaDebug at: #SendReceiveStats add: {'GET'. totalReceived}.\\\\n\\\\t].\\\\n\\\\n\\\\t[ self gotSomething ] whileTrue: [].\\\\t\\\\t\\\\\\\"decode as many string arrays as possible\\\\\\\"\\\\n\\\\n\\\\tself shrinkInBuf.! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'sd 11/20/2005 21:26'!\\\\nprocessOutput\\\\n\\\\n\\\\t| arrayToWrite size bytesSent timeStartSending t itemsSent now timeSlot bucketAgeInMS bytesThisSlot |\\\\n\\\\n\\\\toutBufIndex := 1.\\\\n\\\\titemsSent := bytesSent := 0.\\\\n\\\\ttimeStartSending := Time millisecondClockValue.\\\\n\\\\t[outObjects isEmpty not and: [self isConnected]] whileTrue: [\\\\n\\\\t\\\\tarrayToWrite := outObjects removeFirst.\\\\n\\\\t\\\\tsize := self addToOutBuf: arrayToWrite.\\\\n\\\\t\\\\tbytesSent := bytesSent + size.\\\\n\\\\t\\\\titemsSent := itemsSent + 1.\\\\n\\\\t\\\\toutBufIndex > 10000 ifTrue: [self queueOutBufContents].\\\\n\\\\t].\\\\n\\\\toutBufIndex > 1 ifTrue: [self queueOutBufContents].\\\\n\\\\tbytesSent > 0 ifTrue: [\\\\n\\\\t\\\\tMaxRatesSeen ifNil: [MaxRatesSeen := Dictionary new].\\\\n\\\\t\\\\tnow := Time millisecondClockValue.\\\\n\\\\t\\\\tt := now - timeStartSending.\\\\n\\\\t\\\\ttimeSlot := now // 10000.\\\\t\\\\\\\"ten second buckets\\\\\\\"\\\\n\\\\t\\\\tbucketAgeInMS := now \\\\\\\\\\\\\\\\ 10.\\\\n\\\\t\\\\tbytesThisSlot := (MaxRatesSeen at: timeSlot ifAbsent: [0]) + bytesSent.\\\\n\\\\t\\\\tMaxRatesSeen \\\\n\\\\t\\\\t\\\\tat: timeSlot \\\\n\\\\t\\\\t\\\\tput: bytesThisSlot.\\\\n\\\\t\\\\tNebraskaDebug \\\\n\\\\t\\\\t\\\\tat: #SendReceiveStats \\\\n\\\\t\\\\t\\\\tadd: {'put'. bytesSent. t. itemsSent. bytesThisSlot // (bucketAgeInMS max: 100)}.\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'sd 11/20/2005 21:26'!\\\\npurgeOutputQueue\\\\n\\\\n\\\\tbytesInOutputQueue := 0.\\\\n\\\\t[outputQueue nextOrNil notNil] whileTrue.! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'sd 11/20/2005 21:26'!\\\\nqueueOutBufContents\\\\n\\\\n\\\\tbytesInOutputQueue := bytesInOutputQueue + outBufIndex - 1.\\\\n\\\\toutputQueue nextPut: {outBuf. outBufIndex - 1}.\\\\n\\\\tNebraskaDebug at: #queuedbufferSizes add: {outBufIndex - 1}.\\\\n\\\\toutBufIndex := 1.\\\\n\\\\toutBuf := String new: 11000.\\\\n\\\\t\\\\n! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'sd 11/20/2005 21:26'!\\\\nsendDataCautiously: aStringOrByteArray bytesToSend: bytesToSend\\\\n\\\\t\\\\\\\"Send all of the data in the given array, even if it requires multiple calls to send it all. Return the number of bytes sent. Try not to send too much at once since this seemed to cause problems talking to a port on the same machine\\\\\\\"\\\\n\\\\n\\\\t| bytesSent count |\\\\n\\\\n\\\\tbytesSent := 0.\\\\n\\\\t[bytesSent < bytesToSend] whileTrue: [\\\\n\\\\t\\\\textraUnsentBytes := bytesToSend - bytesSent.\\\\n\\\\t\\\\tcount := socket \\\\n\\\\t\\\\t\\\\tsendSomeData: aStringOrByteArray \\\\n\\\\t\\\\t\\\\tstartIndex: bytesSent + 1  \\\\n\\\\t\\\\t\\\\tcount: (bytesToSend - bytesSent min: 6000).\\\\n\\\\t\\\\tbytesSent := bytesSent + count.\\\\n\\\\t\\\\t(Delay forMilliseconds: 1) wait.\\\\n\\\\t].\\\\n\\\\textraUnsentBytes := 0.\\\\n\\\\t^ bytesSent\\\\n! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'sd 11/20/2005 21:26'!\\\\nshrinkInBuf\\\\n\\\\n\\\\tinBuf ifNil: [^self].\\\\n\\\\tinBufLastIndex < inBufIndex ifTrue: [\\\\n\\\\t\\\\tinBufLastIndex := 0.\\\\n\\\\t\\\\tinBufIndex := 1.\\\\n\\\\t\\\\tinBuf size > 20000 ifTrue: [inBuf := nil].\\\\t\\\\\\\"if really big, kill it\\\\\\\"\\\\n\\\\t\\\\t^self\\\\n\\\\t].\\\\n\\\\tinBuf := inBuf copyFrom: inBufIndex to: inBufLastIndex.\\\\n\\\\tinBufLastIndex := inBuf size.\\\\n\\\\tinBufIndex := 1.\\\\n\\\\n! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'ls 4/25/2000 18:36'!\\\\nspaceToEncode: anArray\\\\n\\\\t\\\\\\\"return the number of characters needed to encode the given string array\\\\\\\"\\\\n\\\\t^anArray inject: 4 into: [ :sum :array |\\\\n\\\\t\\\\tsum + (array size + 4) ].! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'sd 11/20/2005 21:26'!\\\\ntransmitQueueNext\\\\n\\\\n\\\\t| bufTuple |\\\\n\\\\n\\\\tbufTuple := outputQueue next.\\\\n\\\\tbytesInOutputQueue := bytesInOutputQueue - bufTuple second max: 0.\\\\n\\\\t[\\\\n\\\\t\\\\tself \\\\n\\\\t\\\\t\\\\tsendDataCautiously: bufTuple first \\\\n\\\\t\\\\t\\\\tbytesToSend: bufTuple second.\\\\n\\\\t]\\\\n\\\\t\\\\ton: Error\\\\n\\\\t\\\\tdo: [ :ex |\\\\n\\\\t\\\\t\\\\ttransmissionError := true.\\\\n\\\\t\\\\t].\\\\n\\\\t^transmissionError not\\\\n\\\\n! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'sd 11/20/2005 21:26'!\\\\ntryForNextStringSize\\\\n\\\\t\\\\\\\"grab the size of the next string, if it's available\\\\\\\"\\\\n\\\\n\\\\tself inBufSize >= 4 ifFalse: [^false].\\\\n\\\\n\\\\tnextStringSize := inBuf getInteger32: inBufIndex.\\\\n\\\\t\\\\\\\"nextStringSize > 100000 ifTrue: [self barf].\\\\\\\"\\\\n\\\\tinBufIndex := inBufIndex + 4.\\\\n\\\\t\\\\n\\\\tnextStringSize < 0 ifTrue: [\\\\n\\\\t\\\\tsocket disconnect.\\\\n\\\\t\\\\t^false ].\\\\n\\\\t\\\\n\\\\t^true\\\\n! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'sd 11/20/2005 21:26'!\\\\ntryForNumStringsInNextArray\\\\n\\\\t\\\\\\\"input numStringsInNextARray, if 4 bytes are available\\\\\\\"\\\\n\\\\n\\\\tself inBufSize >= 4 ifFalse: [^false].\\\\n\\\\n\\\\tnumStringsInNextArray := inBuf getInteger32: inBufIndex.\\\\n\\\\t\\\\\\\"(numStringsInNextArray > 100 or: [numStringsInNextArray < 1]) ifTrue: [self barf].\\\\\\\"\\\\n\\\\tinBufIndex := inBufIndex + 4.\\\\n\\\\n\\\\tnumStringsInNextArray < 0 ifTrue: [\\\\n\\\\t\\\\tsocket disconnect.\\\\n\\\\t\\\\t^false ].\\\\n\\\\t\\\\n\\\\tstringsForNextArray := Array new: numStringsInNextArray.\\\\n\\\\tstringCounter := 0.\\\\n\\\\tnextStringSize := nil. \\\\n\\\\t^true! !\\\\n\\\\n!StringSocket methodsFor: 'private-IO' stamp: 'sd 11/20/2005 21:26'!\\\\ntryForString\\\\n\\\\t\\\\\\\"try to grab an actual string\\\\\\\"\\\\n\\\\n\\\\tself inBufSize >= nextStringSize ifFalse: [^false].\\\\n\\\\n\\\\tstringsForNextArray \\\\n\\\\t\\\\tat: (stringCounter := stringCounter + 1)\\\\n\\\\t\\\\tput: (self inBufNext: nextStringSize) asString.\\\\n\\\\n\\\\tstringCounter = numStringsInNextArray ifTrue: [\\\\t\\\\\\\"we have finished another array!!\\\\\\\"\\\\n\\\\t\\\\tinObjects addLast: stringsForNextArray.\\\\n\\\\t\\\\tstringCounter := stringsForNextArray := numStringsInNextArray := nextStringSize := nil.\\\\n\\\\t] ifFalse: [\\\\t\\\\\\\"still need more strings for this array\\\\\\\"\\\\n\\\\t\\\\tnextStringSize := nil.\\\\n\\\\t].\\\\n\\\\n\\\\t^true\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nStringSocket class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!StringSocket class methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:26'!\\\\nclearRatesSeen\\\\n\\\\\\\"\\\\nStringSocket clearRatesSeen\\\\n\\\\\\\"\\\\n\\\\tMaxRatesSeen := nil ! !\\\\n\\\\n!StringSocket class methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:26'!\\\\ncompareFiles\\\\n\\\\\\\"\\\\nStringSocket compareFiles\\\\n\\\\\\\"\\\\n\\\\t| data1 data2 |\\\\n\\\\n\\\\tdata1 := (FileStream fileNamed: 'Macintosh HD:bob:nebraska test:58984048.1')\\\\n\\\\t\\\\t\\\\tcontentsOfEntireFile.\\\\n\\\\tdata2 := (FileStream fileNamed: 'BobsG3:squeak:dsqueak:DSqueak2.7 folder:58795431.3')\\\\n\\\\t\\\\t\\\\tcontentsOfEntireFile.\\\\n\\\\t1 to: (data1 size min: data2 size) do: [ :i |\\\\n\\\\t\\\\t(data1 at: i) = (data2 at: i) ifFalse: [self halt].\\\\n\\\\t].\\\\n! !\\\\n\\\\n!StringSocket class methodsFor: 'as yet unclassified' stamp: 'sd 11/20/2005 21:26'!\\\\nshowRatesSeen\\\\n\\\\\\\"\\\\nStringSocket showRatesSeen\\\\n\\\\\\\"\\\\n\\\\t| answer |\\\\n\\\\n\\\\tMaxRatesSeen ifNil: [^Beeper beep].\\\\n\\\\tanswer := WriteStream on: String new.\\\\n\\\\tMaxRatesSeen keys asSortedCollection do: [ :key |\\\\n\\\\t\\\\tanswer nextPutAll: key printString,'  ',((MaxRatesSeen at: key) // 10000) printString; cr\\\\n\\\\t].\\\\n\\\\tStringHolder new contents: answer contents; openLabel: 'send rates at 10 second intervals'.! !\\\\nTestCase subclass: #StringSocketTestCase\\\\n\\\\tinstanceVariableNames: 'socket1 socket2 end1 end2'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Nebraska-Network-ObjectSocket'!\\\\n\\\\n!StringSocketTestCase methodsFor: 'running' stamp: 'sd 11/20/2005 21:26'!\\\\nsetUp\\\\n\\\\t\\\\\\\"it would be nice to have an in-image loopback socket, so that the tests do not need the underlying platform's sockets to behave nicely\\\\\\\"\\\\n\\\\tsocket1 := Socket newTCP.\\\\n\\\\tsocket2 := Socket newTCP.\\\\n\\\\t\\\\n\\\\tsocket1 listenOn: 9999.\\\\n\\\\tsocket2 connectTo: (NetNameResolver localHostAddress) port: 9999.\\\\n\\\\n\\\\tsocket1 waitForConnectionFor: 60.\\\\t\\\\n\\\\tsocket2 waitForConnectionFor: 60.\\\\n\\\\t\\\\n\\\\tend1 := StringSocket on: socket1.\\\\n\\\\tend2 := StringSocket on: socket2.\\\\n\\\\t! !\\\\n\\\\n!StringSocketTestCase methodsFor: 'running' stamp: 'ls 8/4/2004 15:22'!\\\\ntearDown\\\\n\\\\tend1 destroy.\\\\n\\\\tend2 destroy.\\\\n\\\\t! !\\\\n\\\\n!StringSocketTestCase methodsFor: 'running' stamp: 'ls 8/4/2004 15:21'!\\\\ntestBasics\\\\n\\\\tend1 nextPut: #().\\\\n\\\\tend1 nextPut: #('').\\\\n\\\\tend1 nextPut: #('hello' 'world').\\\\n\\\\tend1 processIO.\\\\n\\\\t\\\\n\\\\tend2 processIO.\\\\n\\\\n\\\\tself should: [ end2 next = #() ].\\\\n\\\\tself should: [ end2 next = #('') ].\\\\n\\\\tself should: [ end2 next = #('hello' 'world') ].\\\\n\\\\t! !\\\\n\\\\n!StringSocketTestCase methodsFor: 'running' stamp: 'sd 11/20/2005 21:26'!\\\\ntestBogusInput1\\\\n\\\\t| negString |\\\\n\\\\tnegString := String new: 4.\\\\n\\\\tnegString putInteger32: -10 at: 1.\\\\n\\\\tsocket1 sendData: negString.\\\\n\\\\tend2 processIO.\\\\n\\\\t\\\\n\\\\tself should: [ end2 isConnected not ].\\\\n\\\\t! !\\\\n\\\\n!StringSocketTestCase methodsFor: 'running' stamp: 'sd 11/20/2005 21:26'!\\\\ntestBogusInput2\\\\n\\\\t| bogoString |\\\\n\\\\tbogoString := String new: 8.\\\\n\\\\tbogoString putInteger32: 2 at: 1.\\\\n\\\\tbogoString putInteger32: -10 at: 5.\\\\n\\\\tsocket1 sendData: bogoString.\\\\n\\\\tend2 processIO.\\\\n\\\\t\\\\n\\\\tself should: [ end2 isConnected not ].\\\\n\\\\t! !\\\\nClassTestCase subclass: #StringTest\\\\n\\\\tinstanceVariableNames: 'string'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'CollectionsTests-Text'!\\\\n!StringTest commentStamp: '<historical>' prior: 0!\\\\nThis is the unit test for the class String. Unit tests are a good way to exercise the functionality of your system in a repeatable and automatic manner. They are therefore recommended if you plan to release anything. For more information, see: \\\\n\\\\t- http://www.c2.com/cgi/wiki?UnitTest\\\\n\\\\t- http://minnow.cc.gatech.edu/squeak/1547\\\\n\\\\t- the sunit class category!\\\\n\\\\n\\\\n!StringTest methodsFor: 'initialize-release' stamp: 'md 4/18/2003 10:00'!\\\\nsetUp\\\\n\\\\tstring := 'Hi, I am a String'! !\\\\n\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'stephaneducasse 2/4/2006 20:10'!\\\\ntestFindTokensEscapedBy01\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'this, is, \\\\\\\"a, test\\\\\\\"'.\\\\n\\\\ttokens := string findTokens: ',' escapedBy: '\\\\\\\"'.\\\\n\\\\tself assert: tokens size == 3! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'fbs 2/13/2006 22:20'!\\\\ntestFindTokensEscapedBy02\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := ''.\\\\n\\\\ttokens := string findTokens: ',' escapedBy: '\\\\\\\"'.\\\\n\\\\tself assert: tokens isEmpty! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'stephaneducasse 2/4/2006 20:10'!\\\\ntestFindTokensEscapedBy03\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'this, is, a, test'.\\\\n\\\\ttokens := string findTokens: ',' escapedBy: '\\\\\\\"'.\\\\n\\\\tself assert: tokens size == 4! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'stephaneducasse 2/4/2006 20:10'!\\\\ntestFindTokensEscapedBy04\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'this, is, a\\\\\\\",\\\\\\\" test'.\\\\n\\\\ttokens := string findTokens: ',' escapedBy: '\\\\\\\"'.\\\\n\\\\tself assert: tokens size == 3.\\\\n\\\\tself assert: tokens third = ' a, test'! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'fbs 2/13/2006 22:19'!\\\\ntestFindTokensEscapedBy05\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'this, /is, a\\\\\\\",\\\\\\\" test/'.\\\\n\\\\ttokens := string findTokens: ',#' escapedBy: '\\\\\\\"/'.\\\\n\\\\tself assert: tokens size = 2.\\\\n\\\\tself assert: tokens first = 'this'.\\\\n\\\\tself assert: tokens second = ' is, a\\\\\\\",\\\\\\\" test'.! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'stephaneducasse 2/4/2006 20:10'!\\\\ntestFindTokensEscapedBy06\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'this, is, \\\\\\\"a, test'.\\\\n\\\\ttokens := string findTokens: ',' escapedBy: '\\\\\\\"'.\\\\n\\\\tself assert: tokens size == 3.\\\\n\\\\tself assert: tokens third = ' a, test'! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'stephaneducasse 2/4/2006 20:10'!\\\\ntestFindTokensEscapedBy07\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'a:b::c'.\\\\n\\\\ttokens := string findTokens: ':' escapedBy: '\\\\\\\"'.\\\\n\\\\tself assert: tokens size == 4.\\\\n\\\\tself assert: tokens first = 'a'.\\\\n\\\\tself assert: tokens second = 'b'.\\\\n\\\\tself assert: tokens third = ''.\\\\n\\\\tself assert: tokens fourth = 'c'! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'stephaneducasse 2/4/2006 20:10'!\\\\ntestFindTokensEscapedBy08\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'this, is, ##a, test'.\\\\n\\\\ttokens := string findTokens: ',' escapedBy: '#'.\\\\n\\\\tself assert: tokens size == 4.\\\\n\\\\tself assert: tokens third = ' a'.\\\\n\\\\tself assert: tokens fourth = ' test'! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'stephaneducasse 2/4/2006 20:10'!\\\\ntestFindTokensEscapedBy09\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'this, is, ###a, test#'.\\\\n\\\\ttokens := string findTokens: ',' escapedBy: '#'.\\\\n\\\\tself assert: tokens size == 3.\\\\n\\\\tself assert: tokens third = ' #a, test'! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'stephaneducasse 2/4/2006 20:10'!\\\\ntestFindTokensEscapedBy10\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'this, is, ###a, test'.\\\\n\\\\ttokens := string findTokens: ',' escapedBy: '#'.\\\\n\\\\tself assert: tokens size == 3.\\\\n\\\\tself assert: tokens third = ' #a, test'! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'stephaneducasse 2/4/2006 20:10'!\\\\ntestFindTokensEscapedBy11\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'this, is, \\\\\\\"\\\\\\\"\\\\\\\"a, test\\\\\\\"'.\\\\n\\\\ttokens := string findTokens: ',' escapedBy: '\\\\\\\"'.\\\\n\\\\tself assert: tokens size == 3.\\\\n\\\\tself assert: tokens third = ' \\\\\\\"a, test'! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'stephaneducasse 2/4/2006 20:10'!\\\\ntestFindTokensEscapedBy12\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'one, two# three; four. five'.\\\\n\\\\ttokens := string findTokens: ',#;.' escapedBy: '\\\\\\\"'.\\\\n\\\\tself assert: tokens size == 5.\\\\n\\\\tself assert: tokens third = ' three'! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'stephaneducasse 2/4/2006 20:10'!\\\\ntestFindTokensEscapedBy13\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'one, two# three; four. five'.\\\\n\\\\ttokens := string findTokens: ',#;.' escapedBy: nil.\\\\n\\\\tself assert: tokens size == 5.\\\\n\\\\tself assert: tokens third = ' three'! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'stephaneducasse 2/4/2006 20:10'!\\\\ntestFindTokensEscapedBy14\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'one, \\\\\\\"two# three\\\\\\\"; &four. five&'.\\\\n\\\\ttokens := string findTokens: ',#;.' escapedBy: '\\\\\\\"&'.\\\\n\\\\tself assert: tokens size == 3.\\\\n\\\\tself assert: tokens second = ' two# three'.\\\\n\\\\tself assert: tokens third = ' four. five'! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'fbs 2/13/2006 22:19'!\\\\ntestFindTokensEscapedBy15\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'one, \\\\\\\"two# three\\\\\\\"; &four. five&'.\\\\n\\\\ttokens := string findTokens: nil escapedBy: '\\\\\\\"&'.\\\\n\\\\tself assert: tokens size = 1.\\\\n\\\\tself assert: tokens first = 'one, two# three; four. five'! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'fbs 2/13/2006 22:19'!\\\\ntestFindTokensEscapedBy16\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'one, \\\\\\\"two# three\\\\\\\"; &four. five&'.\\\\n\\\\ttokens := string findTokens: nil escapedBy: nil.\\\\n\\\\tself assert: tokens size = 1.\\\\n\\\\tself assert: tokens first = string! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'stephaneducasse 2/4/2006 20:10'!\\\\ntestFindTokensEscapedBy21\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'this, is, \\\\\\\"a, test\\\\\\\"'.\\\\n\\\\ttokens := string findTokens: $, escapedBy: $\\\\\\\".\\\\n\\\\tself assert: tokens size == 3! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'fbs 2/13/2006 22:19'!\\\\ntestFindTokensEscapedBy22\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := ''.\\\\n\\\\ttokens := string findTokens: $, escapedBy: $\\\\\\\".\\\\n\\\\tself assert: tokens size = 0! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'stephaneducasse 2/4/2006 20:10'!\\\\ntestFindTokensEscapedBy23\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'this, is, a, test'.\\\\n\\\\ttokens := string findTokens: $, escapedBy: $\\\\\\\".\\\\n\\\\tself assert: tokens size == 4! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'stephaneducasse 2/4/2006 20:10'!\\\\ntestFindTokensEscapedBy24\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'this, is, a\\\\\\\",\\\\\\\" test'.\\\\n\\\\ttokens := string findTokens: $, escapedBy: $\\\\\\\".\\\\n\\\\tself assert: tokens size == 3.\\\\n\\\\tself assert: tokens third = ' a, test'! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'fbs 2/13/2006 22:19'!\\\\ntestFindTokensEscapedBy25\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'this, /is, a\\\\\\\",\\\\\\\" test/'.\\\\n\\\\ttokens := string findTokens: $, escapedBy: $/.\\\\n\\\\tself assert: tokens size = 2.\\\\n\\\\tself assert: tokens first = 'this'.\\\\n\\\\tself assert: tokens second = ' is, a\\\\\\\",\\\\\\\" test'.! !\\\\n\\\\n!StringTest methodsFor: 'testing - tokenizing' stamp: 'stephaneducasse 2/4/2006 20:10'!\\\\ntestFindTokensEscapedBy26\\\\n\\\\n\\\\t| tokens |\\\\n\\\\tstring := 'this, is, \\\\\\\"a, test'.\\\\n\\\\ttokens := string findTokens: $, escapedBy: $\\\\\\\".\\\\n\\\\tself assert: tokens size == 3.\\\\n\\\\tself assert: tokens third = ' a, test'! !\\\\n\\\\n\\\\n!StringTest methodsFor: 'tests - accessing' stamp: 'sd 6/5/2005 09:27'!\\\\ntestAt\\\\n\\\\n\\\\tself assert: (string at: 1) = $H.! !\\\\n\\\\n\\\\n!StringTest methodsFor: 'tests - converting' stamp: 'sd 6/5/2005 09:26'!\\\\ntestAsInteger\\\\n\\\\n\\\\tself assert: '1796exportFixes-tkMX' asInteger = 1796.\\\\n\\\\tself assert: 'donald' asInteger isNil.\\\\n\\\\tself assert: 'abc234def567' asInteger = 234.\\\\n\\\\tself assert: '-94' asInteger = -94.\\\\n\\\\tself assert: 'foo-bar-92' asInteger = -92! !\\\\n\\\\n!StringTest methodsFor: 'tests - converting' stamp: 'sd 6/5/2005 09:27'!\\\\ntestAsSmalltalkComment\\\\n\\\\n\\\\t| exampleStrings  |\\\\n\\\\texampleStrings := #(\\\\n\\\\t\\\\t''\\\\n\\\\t\\\\t' '\\\\n\\\\t\\\\t'\\\\\\\"'\\\\n\\\\t\\\\t'\\\\\\\"\\\\\\\"'\\\\n\\\\t\\\\t'\\\\\\\"\\\\\\\"\\\\\\\"'\\\\n\\\\t\\\\t'abc\\\\\\\"abc'\\\\n\\\\t\\\\t'abc\\\\\\\"\\\\\\\"abc'\\\\n\\\\t\\\\t'abc\\\\\\\"hello\\\\\\\"abc'\\\\n\\\\t\\\\t'abc\\\\\\\"'\\\\n\\\\t\\\\t'\\\\\\\"abc' ).\\\\n\\\\n\\\\t\\\\\\\"check that the result of scanning the comment is empty\\\\\\\"\\\\n\\\\texampleStrings do: [ :s |\\\\n\\\\t\\\\t| tokens  |\\\\n\\\\t\\\\ttokens :=  Scanner new scanTokens: s asSmalltalkComment.\\\\n\\\\t\\\\tself assert: (tokens isEmpty) ].\\\\n\\\\n\\\\t\\\\\\\"check that the result has the same non-quote characters as the original\\\\\\\"\\\\n\\\\texampleStrings do: [ :s |\\\\n\\\\t\\\\tself assert: ( (s copyWithout: $\\\\\\\") = (s asSmalltalkComment copyWithout: $\\\\\\\"))].\\\\n\\\\n\\\\t\\\\\\\"finnaly, test for some common kinds of inputs\\\\\\\"\\\\n\\\\tself assert: ( 'abc' asSmalltalkComment = '\\\\\\\"abc\\\\\\\"').\\\\n\\\\tself assert: ( 'abc\\\\\\\"abc' asSmalltalkComment = '\\\\\\\"abc\\\\\\\"\\\\\\\"abc\\\\\\\"').\\\\n\\\\tself assert: ('abc\\\\\\\"\\\\\\\"abc' asSmalltalkComment = '\\\\\\\"abc\\\\\\\"\\\\\\\"abc\\\\\\\"' ).\\\\n\\\\t\\\\t! !\\\\n\\\\n!StringTest methodsFor: 'tests - converting' stamp: 'sd 6/5/2005 09:27'!\\\\ntestCapitalized\\\\n\\\\n\\\\t| uc lc empty |\\\\t\\\\t\\\\n\\\\tuc := 'MElViN'.\\\\n\\\\tlc := 'mElViN'.\\\\n\\\\tempty := ' '.\\\\n\\\\tself assert:  lc capitalized = uc.\\\\n\\\\tself assert: uc capitalized = uc.\\\\n\\\\t\\\\\\\"the string gets copied\\\\\\\"\\\\n\\\\tself deny: uc capitalized == uc.\\\\n\\\\tself deny: empty capitalized == empty.! !\\\\n\\\\n!StringTest methodsFor: 'tests - converting' stamp: 'ky 7/8/2006 15:28'!\\\\ntestUnescapePercents\\\\n\\\\tself assert: '' unescapePercents = ''.\\\\n\\\\tself assert: 'x' unescapePercents = 'x'.\\\\n\\\\n\\\\tself assert: '+' unescapePercents = ' '.\\\\n\\\\tself assert: 'x+' unescapePercents = 'x '.\\\\n\\\\tself assert: '+x' unescapePercents = ' x'.\\\\n\\\\tself assert: 'x+x' unescapePercents = 'x x'.\\\\n\\\\n\\\\tself assert: '%' unescapePercents = '%'.\\\\n\\\\tself assert: '%3' unescapePercents = '%3'.\\\\n\\\\tself assert: '%3C' unescapePercents = '<'.\\\\n\\\\t\\\\n\\\\tself assert: '%3Cx%3E4%3C%2Fx%3E' unescapePercents = '<x>4</x>'.\\\\n\\\\t\\\\n\\\\tself assert: '!!@#$%25%5E&*()%7B%7D%5B%5D=:/;?+''%22' unescapePercents  = '!!@#$%^&*(){}[]=:/;? ''\\\\\\\"'.\\\\n\\\\tself assert: '!!%40%23%24%25%5E%26*()%7B%7D%5B%5D%3D%3A%2F%3B%3F%2B''%22' unescapePercents  = '!!@#$%^&*(){}[]=:/;?+''\\\\\\\"'.\\\\n\\\\tself assert: '%21@%23%24%25%5E%26*%28%29%7B%7D%5B%5D%3D%3A/%3B%3F+%27%22' unescapePercents = '!!@#$%^&*(){}[]=:/;? ''\\\\\\\"'! !\\\\n\\\\n!StringTest methodsFor: 'tests - converting' stamp: 'ky 7/8/2006 18:01'!\\\\ntestUnescapePercentsWithTextEncoding\\\\n\\\\t| leading kataTe kataSu kataTo |\\\\n\\\\tleading := JapaneseEnvironment leadingChar.\\\\n\\\\t\\\\\\\"Katakana letter Te\\\\\\\"\\\\n\\\\tkataTe := (Character leadingChar: leading code: 12486) asString.\\\\n\\\\t\\\\\\\"Katakana letter Su\\\\\\\"\\\\n\\\\tkataSu := (Character leadingChar: leading code: 12473) asString.\\\\n\\\\t\\\\\\\"Katakana letter To\\\\\\\"\\\\n\\\\tkataTo := (Character leadingChar: leading code: 12488) asString.\\\\n\\\\tself assert: ('%83e%83X%83g' unescapePercentsWithTextEncoding: 'shift_jis')\\\\n\\\\t\\\\t\\\\t= (kataTe , kataSu , kataTo).\\\\n\\\\tself assert: ('%83e%83X%83g%20and%20%83e%83X%83g' unescapePercentsWithTextEncoding: 'shift_jis')\\\\n\\\\t\\\\t\\\\t= (kataTe , kataSu , kataTo , ' and ' , kataTe , kataSu , kataTo)! !\\\\n\\\\n!StringTest methodsFor: 'tests - converting' stamp: 'sd 6/5/2005 09:27'!\\\\ntestWithFirstCharacterDownshifted\\\\n\\\\n\\\\t| uc lc empty |\\\\t\\\\t\\\\n\\\\tuc := 'MElViN'.\\\\n\\\\tlc := 'mElViN'.\\\\n\\\\tempty := ' '.\\\\n\\\\tself assert:  uc withFirstCharacterDownshifted = lc.\\\\n\\\\tself assert: lc withFirstCharacterDownshifted = lc.\\\\n\\\\t\\\\\\\"the string gets copied\\\\\\\"\\\\n\\\\tself deny: lc withFirstCharacterDownshifted == lc.\\\\n\\\\tself deny: empty withFirstCharacterDownshifted == empty.! !\\\\n\\\\n\\\\n!StringTest methodsFor: 'as yet unclassified' stamp: 'md 3/16/2006 22:12'!\\\\ntestEquality\\\\n\\\\n\\\\tself assert: 'abc' = 'abc' asWideString.\\\\n\\\\tself assert: 'abc' asWideString = 'abc'.\\\\n\\\\tself assert: ((ByteArray with: 97 with: 0 with: 0 with: 0) asString ~= 'a000' asWideString).\\\\n\\\\tself assert: ('a000' asWideString ~= (ByteArray with: 97 with: 0 with: 0 with: 0) asString).\\\\n\\\\n\\\\tself assert: ('abc' sameAs: 'aBc' asWideString).\\\\n\\\\tself assert: ('aBc' asWideString sameAs: 'abc').\\\\n\\\\tself assert: ((ByteArray with: 97 with: 0 with: 0 with: 0) asString \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsameAs: 'Abcd' asWideString) not.\\\\n\\\\tself assert: ('a000' asWideString sameAs: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(ByteArray with: 97 with: 0 with: 0 with: 0) asString) not.! !\\\\n\\\\n\\\\n!StringTest methodsFor: 'test-comparing' stamp: 'lr 7/7/2006 11:32'!\\\\ntestComparing\\\\n\\\\tself assert: 'foo' < 'foo:'.\\\\n\\\\tself assert: 'foo' < 'fooBar'.\\\\n\\\\tself assert: 'foo' <= 'foo:'.\\\\n\\\\tself assert: 'foo' <= 'fooBar'.\\\\n\\\\tself assert: 'foo:' > 'foo'.\\\\n\\\\tself assert: 'fooBar' > 'foo'.\\\\n\\\\tself assert: 'foo:' >= 'foo'.\\\\n\\\\tself assert: 'fooBar' >= 'foo'! !\\\\n\\\\n\\\\n!StringTest methodsFor: 'testing - converting' stamp: 'KR 06/24/2005 11:21'!\\\\ntestPercentEncodingJa\\\\n\\\\t| leading hiraA hiraO hiraAO encodedHiraA encodedHiraO encodedHiraAO |\\\\n\\\\n    \\\\\\\"Make Japanese String from unicode. see http://www.unicode.org/charts/PDF/U3040.pdf\\\\\\\"\\\\n     leading _ JapaneseEnvironment leadingChar.\\\\n\\\\thiraA _ (Character leadingChar: leading code: 16r3042) asString.  \\\\\\\"HIRAGANA LETTER A\\\\\\\"\\\\n\\\\thiraO _ (Character leadingChar: leading code: 16r304A) asString.  \\\\\\\"HIRAGANA LETTER O\\\\\\\"\\\\n\\\\thiraAO _ hiraA, hiraO.\\\\n\\\\n\\\\t\\\\\\\"Percent Encoded Japanese String\\\\\\\"\\\\n\\\\tencodedHiraA _ hiraA encodeForHTTP.\\\\n\\\\tself assert: encodedHiraA = '%E3%81%82'.\\\\n\\\\tencodedHiraO _ hiraO encodeForHTTP.\\\\n\\\\tself assert: encodedHiraO = '%E3%81%8A'.\\\\n\\\\tencodedHiraAO _ hiraAO encodeForHTTP.\\\\n\\\\tself assert: encodedHiraAO =  '%E3%81%82%E3%81%8A'.\\\\n\\\\n     \\\\\\\"without percent encoded string\\\\\\\"\\\\n\\\\tself assert: '' unescapePercents = ''.\\\\n\\\\tself assert: 'abc' unescapePercents = 'abc'.\\\\t\\\\\\\"latin1 character\\\\\\\"\\\\n\\\\tself assert: hiraAO unescapePercents = hiraAO.  \\\\\\\"multibyte character\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"encoded latin1 string\\\\\\\"\\\\n\\\\tself assert: '%61' unescapePercents = 'a'.\\\\n\\\\tself assert: '%61%62%63' unescapePercents = 'abc'.\\\\n\\\\n\\\\t\\\\\\\"encoded multibyte string\\\\\\\"\\\\n\\\\tLocale currentPlatform: (Locale isoLanguage: 'ja') during: [ \\\\n\\\\t\\\\tself assert: encodedHiraA unescapePercents = hiraA.\\\\n\\\\t\\\\tself assert: encodedHiraAO unescapePercents = hiraAO].\\\\n\\\\n\\\\t\\\\\\\"mixed string\\\\\\\"\\\\n\\\\tLocale currentPlatform: (Locale isoLanguage: 'ja') during: [ \\\\n\\\\t\\\\tself assert: (encodedHiraAO,'a') unescapePercents = (hiraAO, 'a').\\\\n\\\\t\\\\tself assert: ('a', encodedHiraA) unescapePercents = ('a', hiraA).\\\\n\\\\t\\\\tself assert: ('a', encodedHiraA, 'b')  unescapePercents = ('a', hiraA, 'b').\\\\n\\\\t\\\\tself assert: ('a', encodedHiraA, 'b', encodedHiraO) unescapePercents = ('a', hiraA, 'b', hiraO).\\\\n\\\\t\\\\tself assert: (encodedHiraA, encodedHiraO, 'b', encodedHiraA) unescapePercents = (hiraA, hiraO, 'b', hiraA)].\\\\n\\\\n\\\\n\\\\t\\\\\\\"for Seaside\\\\\\\"\\\\n\\\\tLocale currentPlatform: (Locale isoLanguage: 'ja') during: [ \\\\n\\\\t\\\\tself assert: (encodedHiraA, '+', encodedHiraO) unescapePercents = (hiraA, ' ', hiraO)].\\\\n\\\\n! !\\\\n\\\\n\\\\n!StringTest methodsFor: 'tests - indexOf' stamp: 'nice 5/9/2006 23:55'!\\\\ntestIndexOf\\\\n\\\\t\\\\n\\\\t\\\\\\\"test for http://bugs.impara.de/view.php?id=3574\\\\\\\"\\\\n\\\\tself assert: ('abc-' asWideString indexOfAnyOf: (CharacterSet newFrom: ' -0123456789')) = 4.\\\\n\\\\tself assert: ('ab7' asWideString indexOfAnyOf: (CharacterSet newFrom: ' -0123456789')) = 3.\\\\n\\\\tself assert: ('a2c' asWideString indexOfAnyOf: (CharacterSet newFrom: ' -0123456789')) = 2.\\\\n\\\\tself assert: ('3bc' asWideString indexOfAnyOf: (CharacterSet newFrom: ' -0123456789')) = 1.\\\\n\\\\tself assert: ('abc' asWideString indexOfAnyOf: (CharacterSet newFrom: ' -0123456789')) = 0.\\\\n\\\\t\\\\n\\\\t\\\\\\\"extension to wide characters\\\\\\\"\\\\n\\\\tself assert: ((String with: 803 asCharacter with: 811 asCharacter) indexOfAnyOf: (CharacterSet newFrom: (String with: 811 asCharacter with: 812 asCharacter))) = 2.\\\\n\\\\t\\\\n\\\\tself assert: ('abc' indexOfAnyOf: (CharacterSet newFrom: (String with: 811 asCharacter with: 812 asCharacter))) = 0.\\\\n\\\\t\\\\n\\\\tself assert: ('abc' indexOfAnyOf: (CharacterSet newFrom: (String with: 811 asCharacter with: $c))) = 3.! !\\\\nDataType subclass: #StringType\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Protocols-Type Vocabularies'!\\\\n\\\\n!StringType methodsFor: 'initial value' stamp: 'sw 9/27/2001 17:29'!\\\\ninitialValueForASlotFor: aPlayer\\\\n\\\\t\\\\\\\"Answer the value to give initially to a newly created slot of the given type in the given player\\\\\\\"\\\\n\\\\n\\\\t^ 'abc'! !\\\\n\\\\n\\\\n!StringType methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:39'!\\\\ninitialize\\\\n\\\\t\\\\\\\"Initialize the receiver (automatically called when instances are created via 'new')\\\\\\\"\\\\n\\\\n\\\\t| aMethodCategory aMethodInterface |\\\\n\\\\tsuper initialize.\\\\n\\\\tself vocabularyName: #String.\\\\n\\\\n#((accessing \\\\t\\\\t\\\\t'The basic info'\\\\n\\\\t\\\\t(at: at:put: size endsWithDigit findString: findTokens: includesSubString: indexOf: indexOf:startingAt: indexOf:startingAt:ifAbsent: lineCorrespondingToIndex: lineCount lineNumber: startsWithDigit numArgs))\\\\n(#'more accessing' \\\\t\\\\t'More basic info'\\\\n\\\\t\\\\t(allButFirst allButFirst: allButLast allButLast: at:ifAbsent: atAllPut: atPin: atRandom: atWrap: atWrap:put: fifth first first: fourth from:to:put: last last: lastIndexOf: lastIndexOf:ifAbsent: middle replaceAll:with: replaceFrom:to:with: replaceFrom:to:with:startingAt: second sixth third))\\\\n(comparing\\\\t\\\\t\\\\t\\\\t'Determining which comes first alphabeticly'\\\\n\\\\t\\\\t(< <= = > >= beginsWith: endsWith: endsWithAnyOf: howManyMatch: match:))\\\\n(testing \\\\t\\\\t\\\\t\\\\t'Testing'\\\\n\\\\t\\\\t(includes: isEmpty ifNil: ifNotNil: isAllDigits isAllSeparators isString lastSpacePosition))\\\\n(converting \\\\t\\\\t\\\\t'Converting it to another form'\\\\n\\\\t\\\\t(asCharacter asDate asInteger asLowercase asNumber asString asStringOrText asSymbol asText asTime asUppercase asUrl capitalized keywords numericSuffix romanNumber reversed splitInteger surroundedBySingleQuotes withBlanksTrimmed withSeparatorsCompacted withoutTrailingBlanks withoutTrailingDigits asSortedCollection))\\\\n(copying \\\\t\\\\t\\\\t\\\\t'Make another one like me'\\\\n\\\\t\\\\t(copy copyFrom:to: copyUpTo: copyUpToLast: shuffled))\\\\n(enumerating\\\\t\\\\t'Passing over the letters'\\\\n\\\\t\\\\t(collect: collectWithIndex: do: from:to:do: reverseDo: select: withIndexDo: detect: detect:ifNone:))\\\\n) do: [:item | \\\\n\\\\t\\\\t\\\\taMethodCategory := ElementCategory new categoryName: item first.\\\\n\\\\t\\\\t\\\\taMethodCategory documentation: item second.\\\\n\\\\t\\\\t\\\\titem third do:\\\\n\\\\t\\\\t\\\\t\\\\t[:aSelector | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\taMethodInterface := MethodInterface new initializeFor: aSelector.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself atKey: aSelector putMethodInterface: aMethodInterface.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\taMethodCategory elementAt: aSelector put: aMethodInterface].\\\\n\\\\t\\\\t\\\\tself addCategory: aMethodCategory].\\\\n! !\\\\n\\\\n\\\\n!StringType methodsFor: '*eToys-color' stamp: 'sw 9/27/2001 17:21'!\\\\ntypeColor\\\\n\\\\t\\\\\\\"Answer the color for tiles to be associated with objects of this type\\\\\\\"\\\\n\\\\n\\\\t^ self subduedColorFromTriplet: #(0.0 0.0 1.0)\\\\t! !\\\\n\\\\n\\\\n!StringType methodsFor: '*eToys-tiles' stamp: 'yo 3/14/2005 21:27'!\\\\ndefaultArgumentTile\\\\n        \\\\\\\"Answer a tile to represent the type\\\\\\\"\\\\n\\\\n        ^ 'abc' translated newTileMorphRepresentative typeColor: self typeColor! !\\\\n\\\\n!StringType methodsFor: '*eToys-tiles' stamp: 'sw 9/27/2001 17:33'!\\\\nsetFormatForDisplayer: aDisplayer\\\\n\\\\t\\\\\\\"Set up the displayer to have the right format characteristics\\\\\\\"\\\\n\\\\n\\\\taDisplayer useStringFormat\\\\n\\\\t! !\\\\n\\\\n!StringType methodsFor: '*eToys-tiles' stamp: 'sw 9/27/2001 17:33'!\\\\nwantsArrowsOnTiles\\\\n\\\\t\\\\\\\"Answer whether this data type wants up/down arrows on tiles representing its values\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\nMorph subclass: #SubpaneDividerMorph\\\\n\\\\tinstanceVariableNames: 'resizingEdge'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Windows'!\\\\n!SubpaneDividerMorph commentStamp: '<historical>' prior: 0!\\\\nA morph which presents a visible separator between subpanes of a SystemWindow which have zero edgeWidth.  Subpanes are submorphs of a SystemWindow's paneMorphs.\\\\n\\\\nA SubpaneDividerMorph may also initiate reframe handles for the subpanes.  For resizing, it is expected that the main paneMorph has a ProportionalLayout LayoutPolicy, and that the subpanes to be resized have LayoutFrames with equal topFractions and bottomFractions, but different topOffsets and bottomOffsets.  It is the offsets that are changed, and the change is propagated through sibling morphs up to the first resizable morph (with different nominal frame fractions).\\\\n\\\\nThe direction of propagation is determined by the value of resizingEdge, which is one of: nil (for non-adjustible subpane divisions), #bottom or #top (which acts a though the divider is the corresponding edge of the subpane directly above or below it).  Does not currently support #left or #right binding, or subpanes in a TableLayout.\\\\n!\\\\n\\\\n\\\\n!SubpaneDividerMorph methodsFor: 'accessing' stamp: 'sw 5/18/2001 11:27'!\\\\nborderColor\\\\n\\\\t\\\\\\\"I behave like a border for the purpose of browser beautifying, so I obey this protocol, to advantage\\\\\\\"\\\\n\\\\n\\\\t^ self color! !\\\\n\\\\n!SubpaneDividerMorph methodsFor: 'accessing' stamp: 'sw 5/18/2001 11:26'!\\\\nborderColor: aColor\\\\n\\\\t\\\\\\\"I behave like a border for the purpose of browser beautifying, so I obey this protocol, to advantage\\\\\\\"\\\\n\\\\n\\\\tself color: aColor! !\\\\n\\\\n!SubpaneDividerMorph methodsFor: 'accessing' stamp: 'JW 2/3/2001 09:39'!\\\\nresizingEdge\\\\n\\\\n\\\\t^resizingEdge\\\\n! !\\\\n\\\\n\\\\n!SubpaneDividerMorph methodsFor: 'initialization' stamp: 'dgd 3/7/2003 14:53'!\\\\ndefaultColor\\\\n\\\\\\\"answer the default color/fill style for the receiver\\\\\\\"\\\\n\\\\t^ Color black! !\\\\n\\\\n!SubpaneDividerMorph methodsFor: 'initialization' stamp: 'JW 2/3/2001 09:26'!\\\\nfirstEnter: evt\\\\n\\\\t\\\\\\\"The first time this divider is activated, find its window and redirect further interaction there.\\\\\\\"\\\\n\\\\t| window |\\\\n\\\\n\\\\twindow := self firstOwnerSuchThat: [:m | m respondsTo: #secondaryPaneTransition:divider:].\\\\n\\\\twindow ifNil: [ self suspendEventHandler. ^ self ]. \\\\\\\"not working out\\\\\\\"\\\\n\\\\twindow secondaryPaneTransition: evt divider: self.\\\\n\\\\tself on: #mouseEnter send: #secondaryPaneTransition:divider: to: window.\\\\n! !\\\\n\\\\n!SubpaneDividerMorph methodsFor: 'initialization' stamp: 'JW 2/3/2001 09:07'!\\\\nhorizontal\\\\n\\\\n\\\\tself hResizing: #spaceFill.! !\\\\n\\\\n!SubpaneDividerMorph methodsFor: 'initialization' stamp: 'dgd 3/7/2003 14:53'!\\\\ninitialize\\\\n\\\\t\\\\\\\"initialize the state of the receiver\\\\\\\"\\\\n\\\\tsuper initialize.\\\\n\\\\t\\\\\\\"\\\\\\\"\\\\n\\\\tself extent: 1 @ 1! !\\\\n\\\\n!SubpaneDividerMorph methodsFor: 'initialization' stamp: 'JW 2/3/2001 09:12'!\\\\nresizingEdge: edgeSymbol\\\\n\\\\n\\\\t(#(top bottom) includes: edgeSymbol) ifFalse:\\\\n\\\\t\\\\t[ self error: 'resizingEdge must be #top or #bottom' ].\\\\n\\\\tresizingEdge := edgeSymbol.\\\\n\\\\tself on: #mouseEnter send: #firstEnter: to: self.\\\\n! !\\\\n\\\\n!SubpaneDividerMorph methodsFor: 'initialization' stamp: 'JW 2/3/2001 09:07'!\\\\nvertical\\\\n\\\\n\\\\tself vResizing: #spaceFill.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSubpaneDividerMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SubpaneDividerMorph class methodsFor: 'instance creation' stamp: 'JW 2/3/2001 09:35'!\\\\nforBottomEdge\\\\n\\\\t^self new horizontal resizingEdge: #bottom! !\\\\n\\\\n!SubpaneDividerMorph class methodsFor: 'instance creation' stamp: 'JW 2/3/2001 09:35'!\\\\nforTopEdge\\\\n\\\\t^self new horizontal resizingEdge: #top! !\\\\n\\\\n!SubpaneDividerMorph class methodsFor: 'instance creation' stamp: 'JW 2/3/2001 09:31'!\\\\nhorizontal\\\\n\\\\t^self new horizontal! !\\\\n\\\\n!SubpaneDividerMorph class methodsFor: 'instance creation' stamp: 'JW 2/3/2001 09:31'!\\\\nvertical\\\\n\\\\t^self new vertical! !\\\\nObject subclass: #SunAudioFileWriter\\\\n\\\\tinstanceVariableNames: 'stream headerStart'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Sound-Synthesis'!\\\\n!SunAudioFileWriter commentStamp: '<historical>' prior: 0!\\\\nI encode monophonic sampled sounds in Sun audio (.au) file format. Sun audio files have a very simple format but can store both compressed and uncompressed sample data. I can write this format either directly into a file or onto any writable binary stream.\\\\n!\\\\n\\\\n\\\\n!SunAudioFileWriter methodsFor: 'initialization' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nsetStream: aBinaryStream\\\\n\\\\t\\\\\\\"Initialize myself for writing on the given stream.\\\\\\\"\\\\n\\\\n\\\\tstream := aBinaryStream.\\\\n\\\\theaderStart := aBinaryStream position.\\\\n! !\\\\n\\\\n\\\\n!SunAudioFileWriter methodsFor: 'other' stamp: 'jm 11/16/2001 18:02'!\\\\nappendBytes: aByteArray\\\\n\\\\t\\\\\\\"Append the given sample data to my stream.\\\\\\\"\\\\n\\\\n\\\\tstream nextPutAll: aByteArray.\\\\n! !\\\\n\\\\n!SunAudioFileWriter methodsFor: 'other' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nappendSamples: aSoundBuffer\\\\n\\\\t\\\\\\\"Append the given SoundBuffer to my stream.\\\\\\\"\\\\n\\\\n\\\\t| swapBytes s |\\\\n\\\\t(stream isKindOf: StandardFileStream) ifTrue: [\\\\n\\\\t\\\\t\\\\\\\"optimization: write sound buffer directly to file\\\\\\\"\\\\n\\\\t\\\\tswapBytes := SmalltalkImage current  isLittleEndian.\\\\n\\\\t\\\\tswapBytes ifTrue: [aSoundBuffer reverseEndianness].  \\\\\\\"make big endian\\\\\\\"\\\\n\\\\t\\\\tstream next: (aSoundBuffer size // 2) putAll: aSoundBuffer startingAt: 1.  \\\\\\\"size in words\\\\\\\"\\\\n\\\\t\\\\tswapBytes ifTrue: [aSoundBuffer reverseEndianness].  \\\\\\\"revert to little endian\\\\\\\"\\\\n\\\\t\\\\t^ self].\\\\n\\\\n\\\\t\\\\\\\"for non-file streams:\\\\\\\"\\\\n\\\\ts := WriteStream on: (ByteArray new: 2 * aSoundBuffer monoSampleCount).\\\\n\\\\t1 to: aSoundBuffer monoSampleCount do: [:i | s int16: (aSoundBuffer at: i)].\\\\n\\\\tself appendBytes: s contents.\\\\n! !\\\\n\\\\n!SunAudioFileWriter methodsFor: 'other' stamp: 'jm 11/16/2001 22:09'!\\\\ncloseFile\\\\n\\\\t\\\\\\\"Update the Sun audio file header to reflect the final size of the sound data. If my stream is a file stream, close it and, on a Macintosh, set the file type and creator to that used by SoundApp for Sun Audio files. (This does nothing on other platforms.)\\\\\\\"\\\\n\\\\n\\\\tself ensureOpen.\\\\n\\\\tself updateHeaderDataSize.\\\\n\\\\t(stream isKindOf: StandardFileStream) ifTrue: [\\\\n\\\\t\\\\tstream close.\\\\n\\\\t\\\\tFileDirectory default setMacFileNamed: stream name type: 'ULAW' creator: 'SCPL'].\\\\n! !\\\\n\\\\n!SunAudioFileWriter methodsFor: 'other' stamp: 'sd 1/30/2004 15:23'!\\\\nensureOpen\\\\n\\\\t\\\\\\\"Ensure that my stream is open.\\\\\\\"\\\\n\\\\n\\\\tstream closed ifTrue: [stream reopen; binary].\\\\n! !\\\\n\\\\n!SunAudioFileWriter methodsFor: 'other' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nupdateHeaderDataSize\\\\n\\\\t\\\\\\\"Update the Sun audio file header to reflect the final size of the sound data.\\\\\\\"\\\\n\\\\n\\\\t| byteCount |\\\\n\\\\tbyteCount := stream position - (headerStart + 24).\\\\n\\\\tstream position: headerStart + 8.\\\\n\\\\tstream uint32: byteCount.\\\\n! !\\\\n\\\\n!SunAudioFileWriter methodsFor: 'other' stamp: 'jm 11/16/2001 17:55'!\\\\nwriteHeaderSamplingRate: samplingRate\\\\n\\\\t\\\\\\\"Write a Sun audio file header for 16-bit linear format.\\\\\\\"\\\\n\\\\n\\\\tself writeHeaderSamplingRate: samplingRate format: 3.\\\\n! !\\\\n\\\\n!SunAudioFileWriter methodsFor: 'other' stamp: 'jm 11/16/2001 22:10'!\\\\nwriteHeaderSamplingRate: samplingRate format: audioFormat\\\\n\\\\t\\\\\\\"Write a Sun audio file header for the given sampling rate and format. Currently, only monophonic files are supported.\\\\\\\"\\\\n\\\\n\\\\tself ensureOpen.\\\\n\\\\tstream position: headerStart.\\\\n\\\\tstream nextPutAll: '.snd' asByteArray.\\\\n\\\\tstream uint32: 24.\\\\t\\\\\\\"header size in bytes\\\\\\\"\\\\n\\\\tstream uint32: 0.\\\\t\\\\\\\"sample data size in bytes; fill in later\\\\\\\"\\\\n\\\\tstream uint32: audioFormat.\\\\n\\\\tstream uint32: samplingRate truncated.\\\\n\\\\tstream uint32: 1.\\\\t\\\\\\\"channel count\\\\\\\"\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSunAudioFileWriter class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SunAudioFileWriter class methodsFor: 'instance creation' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nonFileNamed: fileName\\\\n\\\\t\\\\\\\"Answer an instance of me on a newly created file with the given name.\\\\\\\"\\\\n\\\\n\\\\t| file |\\\\n\\\\tfile := (FileStream newFileNamed: fileName) binary.\\\\n\\\\t^ self new setStream: file\\\\n! !\\\\n\\\\n!SunAudioFileWriter class methodsFor: 'instance creation' stamp: 'jm 11/16/2001 17:50'!\\\\nonStream: aBinaryStream\\\\n\\\\t\\\\\\\"Answer an instance of me on the given binary stream.\\\\\\\"\\\\n\\\\n\\\\t^ self new setStream: aBinaryStream\\\\n! !\\\\n\\\\n\\\\n!SunAudioFileWriter class methodsFor: 'sound storing' stamp: 'jm 11/21/2001 15:42'!\\\\ncodecForFormatCode: formatCode\\\\n\\\\t\\\\\\\"Answer the codec for the given Sun audio file format number.\\\\\\\"\\\\n\\\\n\\\\tformatCode = 1 ifTrue: [^ MuLawCodec new].\\\\n\\\\tformatCode = 3 ifTrue: [^ nil].  \\\\\\\"uncompressed\\\\\\\"\\\\n\\\\tformatCode = 23 ifTrue: [^ ADPCMCodec newBitsPerSample: 4].\\\\n\\\\tformatCode = 25 ifTrue: [^ ADPCMCodec newBitsPerSample: 3].\\\\n\\\\tformatCode = 26 ifTrue: [^ ADPCMCodec newBitsPerSample: 5].\\\\n\\\\tformatCode = 610 ifTrue: [^ GSMCodec new].\\\\n\\\\tself error: 'unsupported Sun audio format'\\\\n! !\\\\n\\\\n!SunAudioFileWriter class methodsFor: 'sound storing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nformatCodeForCompressionType: aString\\\\n\\\\t\\\\\\\"Answer the Sun audio file format number for the given compression type name.\\\\\\\"\\\\n\\\\n\\\\t| lowercase |\\\\n\\\\tlowercase := aString asLowercase.\\\\n\\\\t'mulaw' = lowercase ifTrue: [^ 1].\\\\n\\\\t'none' = lowercase ifTrue: [^ 3].\\\\n\\\\t'adpcm3' = lowercase ifTrue: [^ 25].\\\\n\\\\t'adpcm4' = lowercase ifTrue: [^ 23].\\\\n\\\\t'adpcm5' = lowercase ifTrue: [^ 26].\\\\n\\\\t'gsm' = lowercase ifTrue: [^ 610].\\\\n\\\\tself error: 'unknown compression style'\\\\n! !\\\\n\\\\n!SunAudioFileWriter class methodsFor: 'sound storing' stamp: 'stephaneducasse 2/4/2006 20:41'!\\\\nstoreSampledSound: aSampledSound onFileNamed: fileName compressionType: aString\\\\n\\\\t\\\\\\\"Store the samples of the given sampled sound on a file with the given name using the given type of compression. See formatCodeForCompressionType: for the list of compression types.\\\\\\\"\\\\n\\\\n\\\\t| fmt codec f compressed |\\\\n\\\\tfmt := self formatCodeForCompressionType: aString.\\\\n\\\\tcodec := self codecForFormatCode: fmt.\\\\n\\\\tf := self onFileNamed: fileName.\\\\n\\\\tf writeHeaderSamplingRate: aSampledSound originalSamplingRate format: fmt.\\\\n\\\\tcodec\\\\n\\\\t\\\\tifNil: [f appendSamples: aSampledSound samples]\\\\n\\\\t\\\\tifNotNil: [\\\\n\\\\t\\\\t\\\\tcompressed := codec encodeSoundBuffer: aSampledSound samples.\\\\n\\\\t\\\\t\\\\tf appendBytes: compressed].\\\\n\\\\tf closeFile.\\\\n! !\\\\nFileDirectoryWrapper subclass: #SuperSwikiDirectoryWrapper\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Morphic-Explorer'!\\\\n!SuperSwikiDirectoryWrapper commentStamp: '<historical>' prior: 0!\\\\nThe super swiki does not at present have subdirectories!\\\\n\\\\n\\\\n!SuperSwikiDirectoryWrapper methodsFor: 'as yet unclassified' stamp: 'RAA 2/2/2001 08:28'!\\\\ncontents\\\\n\\\\n\\\\t^#()\\\\t\\\\t\\\\\\\"we have no sundirectories\\\\\\\"! !\\\\n\\\\n!SuperSwikiDirectoryWrapper methodsFor: 'as yet unclassified' stamp: 'RAA 2/2/2001 08:28'!\\\\nhasContents\\\\n\\\\n\\\\t^false\\\\t\\\\t\\\\\\\"we have no sundirectories\\\\\\\"! !\\\\nProjectSwikiServer subclass: #SuperSwikiServer\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Network-RemoteDirectory'!\\\\n\\\\n!SuperSwikiServer methodsFor: 'accessing' stamp: 'KR 2/1/2006 13:07'!\\\\nencodingName\\\\n\\\\t(super encodingName) ifNil: [ ^SuperSwikiServer defaultEncodingName ] ifNotNil: [^super encodingName].! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'accessing' stamp: 'mir 6/25/2001 17:17'!\\\\ntypeForPrefs\\\\n\\\\n\\\\t^'bss'! !\\\\n\\\\n\\\\n!SuperSwikiServer methodsFor: 'for real' stamp: 'mir 8/23/2001 22:15'!\\\\nallEntries\\\\n\\\\n\\\\t| answer |\\\\n\\\\n\\\\tanswer _ self sendToSwikiProjectServer: {\\\\n\\\\t\\\\t'action: listallprojects'.\\\\n\\\\t}.\\\\n\\\\t(answer beginsWith: 'OK') ifFalse: [^#()].\\\\n\\\\t^self parseListEntries: answer! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'for real' stamp: 'ar 3/2/2001 14:36'!\\\\ndirectoryNames\\\\n\\\\n\\\\t^self entries select:[:each| each isDirectory] thenCollect: [ :each | each name]! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'for real' stamp: 'RAA 2/2/2001 08:29'!\\\\ndirectoryWrapperClass\\\\n\\\\n\\\\t^SuperSwikiDirectoryWrapper! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'for real' stamp: 'mir 8/23/2001 22:16'!\\\\nentries\\\\n\\\\n\\\\t^self allEntries! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'for real' stamp: 'KR 1/30/2006 21:59'!\\\\nfastParseEntriesFrom: aString\\\\n\\\\n\\\\t| c first strm xEntryName xCreationTime xModificationTime xIsDirectory xFileSize ch |\\\\n\\\\n\\\\tc _ OrderedCollection new.\\\\n\\\\tfirst _ true.\\\\n\\\\taString linesDo: [ :x |\\\\n\\\\t\\\\tfirst ifFalse: [\\\\n\\\\t\\\\t\\\\tstrm _ ReadStream on: x.\\\\n\\\\t\\\\t\\\\t(strm upTo: $ ) = '(DirectoryEntry' ifFalse: [^nil].\\\\n\\\\t\\\\t\\\\t(strm upTo: $ ) = 'name:' ifFalse: [^nil].\\\\n\\\\t\\\\t\\\\txEntryName _ WriteStream on: String new.\\\\n\\\\t\\\\t\\\\tstrm next = $' ifFalse: [^nil].\\\\n\\\\t\\\\t\\\\t[\\\\n\\\\t\\\\t\\\\t\\\\tch _ strm next.\\\\n\\\\t\\\\t\\\\t\\\\tch = $' and: [(strm peekFor: $') not]\\\\n\\\\t\\\\t\\\\t] whileFalse: [\\\\n\\\\t\\\\t\\\\t\\\\txEntryName nextPut: ch.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\txEntryName _ xEntryName contents.\\\\n\\\\t\\\\t\\\\tstrm skipSeparators.\\\\n\\\\t\\\\t\\\\t(strm upTo: $ ) = 'creationTime:' ifFalse: [^nil].\\\\n\\\\t\\\\t\\\\txCreationTime _ (strm upTo: $ ) asNumber.\\\\n\\\\t\\\\t\\\\t(strm upTo: $ ) = 'modificationTime:' ifFalse: [^nil].\\\\n\\\\t\\\\t\\\\txModificationTime _ (strm upTo: $ ) asNumber.\\\\n\\\\t\\\\t\\\\t(strm upTo: $ ) = 'isDirectory:' ifFalse: [^nil].\\\\n\\\\t\\\\t\\\\txIsDirectory _ (strm upTo: $ ) = 'true'.\\\\n\\\\t\\\\t\\\\t(strm upTo: $ ) = 'fileSize:' ifFalse: [^nil].\\\\n\\\\t\\\\t\\\\txFileSize _ (strm upTo: $ ) asNumber.\\\\n\\\\n\\\\t\\\\t\\\\tc add: (DirectoryEntry \\\\n\\\\t\\\\t\\\\t\\\\tname: (xEntryName convertFromEncoding: self encodingName)\\\\n\\\\t\\\\t\\\\t\\\\tcreationTime: xCreationTime \\\\n\\\\t\\\\t\\\\t\\\\tmodificationTime: xModificationTime \\\\n\\\\t\\\\t\\\\t\\\\tisDirectory: xIsDirectory \\\\n\\\\t\\\\t\\\\t\\\\tfileSize: xFileSize\\\\n\\\\t\\\\t\\\\t)\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tfirst _ false.\\\\n\\\\t].\\\\n\\\\t^c\\\\n! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'for real' stamp: 'ar 3/2/2001 14:36'!\\\\nfileNames\\\\n\\\\n\\\\t^self entries select:[:each| each isDirectory not] thenCollect: [ :each | each name]! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'for real' stamp: 'RAA 10/17/2000 12:49'!\\\\ngetOnly: numberOfBytes from: aName\\\\n\\\\n\\\\t| answer |\\\\n\\\\n\\\\tanswer _ self sendToSwikiProjectServer: {\\\\n\\\\t\\\\t'action: readnamedfile'.\\\\n\\\\t\\\\t'projectname: ',aName.\\\\n\\\\t\\\\t'bytestoread: ',numberOfBytes printString.\\\\n\\\\t}.\\\\n\\\\t(answer beginsWith: 'OK') ifFalse: [ ^nil].\\\\n\\\\t^answer allButFirst: 3\\\\n! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'for real' stamp: 'md 11/14/2003 17:28'!\\\\nmatchingEntries: criteria\\\\n\\\\t| result |\\\\n\\\\teToyUserListUrl ifNil:[^self entries].\\\\n\\\\tresult _ self sendToSwikiProjectServer: {\\\\n\\\\t\\\\t'action: listmatchingprojects'.\\\\n\\\\t}  , criteria.\\\\n\\\\t(result beginsWith: 'OK')\\\\n\\\\t\\\\tifFalse: [^self entries]. \\\\\\\"If command not supported\\\\\\\"\\\\n\\\\t^self parseListEntries: result! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'for real' stamp: 'KR 1/30/2006 22:02'!\\\\noldFileNamed: aName\\\\n\\\\n\\\\t| answer |\\\\n\\\\n\\\\tanswer _ self sendToSwikiProjectServer: {\\\\n\\\\t\\\\t'action: readnamedfile'.\\\\n\\\\t\\\\t'projectname: ',aName convertToEncoding: self encodingName.\\\\n\\\\t}.\\\\n\\\\t(answer beginsWith: 'OK') ifFalse: [ ^nil].\\\\n\\\\t^(SwikiPseudoFileStream with: (answer allButFirst: 3))\\\\n\\\\t\\\\treset;\\\\n\\\\t\\\\tdirectory: self;\\\\n\\\\t\\\\tlocalName: (aName convertToEncoding: self encodingName);\\\\n\\\\t\\\\tyourself\\\\n! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'for real' stamp: 'RAA 10/17/2000 14:54'!\\\\noldFileOrNoneNamed: fullName\\\\n\\\\n\\\\t| answer aName |\\\\n\\\\n\\\\tself flag: #bob.\\\\t\\\\t\\\\\\\"fix this up for full names\\\\\\\"\\\\n\\\\n\\\\taName _ fullName.\\\\n\\\\tanswer _ self sendToSwikiProjectServer: {\\\\n\\\\t\\\\t'action: readnamedfile'.\\\\n\\\\t\\\\t'projectname: ',(self localNameFor: aName).\\\\n\\\\t}.\\\\n\\\\t(answer beginsWith: 'OK') ifFalse: [^nil].\\\\n\\\\t^(SwikiPseudoFileStream with: (answer allButFirst: 3))\\\\n\\\\t\\\\treset;\\\\n\\\\t\\\\tdirectory: self;\\\\n\\\\t\\\\tlocalName: aName;\\\\n\\\\t\\\\tyourself\\\\n! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'for real' stamp: 'KR 1/30/2006 21:57'!\\\\nputFile: fileStream named: fileNameOnServer\\\\n\\\\n\\\\t\\\\n\\\\t^(\\\\n\\\\t\\\\tself sendToSwikiProjectServer: {\\\\n\\\\t\\\\t\\\\t'uploadproject: ',fileNameOnServer convertToEncoding: self encodingName.\\\\n\\\\t\\\\t\\\\t'password: ',ProjectPasswordNotification signal.\\\\n\\\\t\\\\t\\\\tfileStream contentsOfEntireFile.\\\\n\\\\t\\\\t}\\\\n\\\\t) beginsWith: 'OK'\\\\n! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'for real' stamp: 'RAA 10/13/2000 16:53'!\\\\nreadOnlyFileNamed: aName\\\\n\\\\n\\\\t^self oldFileNamed: aName\\\\n! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'for real' stamp: 'RAA 2/16/2001 18:22'!\\\\nsendToSwikiProjectServer: anArray\\\\n\\\\n\\\\t| argsDict answer buildStream |\\\\n\\\\n\\\\tbuildStream _ WriteStream on: String new.\\\\n\\\\tanArray do: [ :each | \\\\n\\\\t\\\\tbuildStream \\\\n\\\\t\\\\t\\\\tnextPutAll: each size printString;\\\\n\\\\t\\\\t\\\\tspace;\\\\n\\\\t\\\\t\\\\tnextPutAll: each\\\\n\\\\t].\\\\n\\\\t(argsDict _ Dictionary new)\\\\n\\\\t\\\\tat: 'swikicommands'\\\\n\\\\t\\\\tput: {buildStream contents}.\\\\n\\\\tanswer _ HTTPSocket \\\\n\\\\t\\\\thttpPostToSuperSwiki: self url\\\\n\\\\t\\\\targs: argsDict\\\\n\\\\t\\\\taccept: 'application/octet-stream' \\\\n\\\\t\\\\trequest: ''.\\\\n\\\\t^(answer isKindOf: MIMEDocument) ifTrue: [answer content] ifFalse: [answer]\\\\n! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'for real' stamp: 'KR 2/20/2006 12:50'!\\\\nupdateProjectInfoFor: aProject\\\\n\\\\n\\\\t| data details projectLinks linkString uploader |\\\\n\\\\n\\\\tdata _ OrderedCollection new.\\\\n\\\\tdata add: 'action: updatepage'.\\\\n\\\\tdata add: 'password: ',ProjectPasswordNotification signal.\\\\n\\\\tdata add: 'projectimage: ', (aProject name convertToEncoding: self encodingName) , '.gif'.\\\\n\\\\tuploader _ Utilities authorNamePerSe.\\\\n\\\\tuploader isEmptyOrNil ifTrue: [uploader _ Utilities authorInitialsPerSe].\\\\n\\\\tuploader isEmptyOrNil ifFalse: [\\\\n\\\\t\\\\tdata add: ('submittedBy: ',uploader convertToEncoding: self encodingName).\\\\n\\\\t].\\\\n\\\\tprojectLinks _ Set new.\\\\n\\\\taProject world allMorphsDo: [ :each |\\\\n\\\\t\\\\t(each isKindOf: ProjectViewMorph) ifTrue: [\\\\n\\\\t\\\\t\\\\tprojectLinks add: each safeProjectName.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\tdetails _ aProject world valueOfProperty: #ProjectDetails ifAbsent: [Dictionary new].\\\\n\\\\tdetails at: 'projectname' ifAbsentPut: [aProject name].\\\\n\\\\tprojectLinks isEmpty ifTrue: [\\\\n\\\\t\\\\tdetails removeKey: 'projectlinks' ifAbsent: []\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tlinkString _ String streamContents: [ :strm |\\\\n\\\\t\\\\t\\\\tprojectLinks asSortedCollection do: [ :each |\\\\n\\\\t\\\\t\\\\t\\\\tstrm nextPutAll: each\\\\n\\\\t\\\\t\\\\t] separatedBy: [\\\\n\\\\t\\\\t\\\\t\\\\tstrm nextPut: $.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tdetails at: 'projectlinks' put: linkString\\\\n\\\\t].\\\\n\\\\tdetails keysAndValuesDo: [ :k :v |\\\\n\\\\t\\\\tdata add: k , ': ' , (v convertToEncoding: self encodingName). self flag: #yoFlag.\\\\n\\\\t].\\\\n\\\\t^self sendToSwikiProjectServer: data! !\\\\n\\\\n\\\\n\\\\n!SuperSwikiServer methodsFor: 'squeaklets' stamp: 'KR 1/30/2006 22:15'!\\\\nupLoadProject: projectName members: archiveMembers retry: aBool\\\\n\\\\t| answer |\\\\n\\\\tarchiveMembers do:[:entry|\\\\n\\\\t\\\\tProgressNotification signal: '4:uploadingFile' extra:'(uploading ' translated, entry fileName convertFromSystemString , '...)' translated.\\\\n\\\\t\\\\tanswer _ self sendToSwikiProjectServer: {\\\\n\\\\t\\\\t\\\\t'uploadproject2: ', entry fileName convertFromSystemString convertToEncoding: self encodingName.\\\\n\\\\t\\\\t\\\\t'password: ',ProjectPasswordNotification signal.\\\\n\\\\t\\\\t\\\\tentry contents.\\\\n\\\\t\\\\t}.\\\\n\\\\t\\\\tanswer = 'OK' ifFalse:[\\\\n\\\\t\\\\t\\\\tself inform:'Server responded ' translated, answer.\\\\n\\\\t\\\\t\\\\t^false].\\\\n\\\\t].\\\\n\\\\tProgressNotification signal: '4:uploadingFile' extra:''.\\\\n\\\\t^true! !\\\\n\\\\n\\\\n!SuperSwikiServer methodsFor: 'testing' stamp: 'mir 11/14/2001 16:25'!\\\\nisSearchable\\\\n\\\\t^true! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'testing' stamp: 'ar 8/24/2001 15:12'!\\\\nparseQueryResult: resultStream\\\\n\\\\n\\\\t| projectInfos projectName  downloadUrl |\\\\n\\\\tprojectInfos _ OrderedCollection new.\\\\n\\\\tdownloadUrl _ self downloadUrl.\\\\n\\\\tresultStream reset; nextLine.\\\\n\\\\t[resultStream atEnd] whileFalse: [\\\\n\\\\t\\\\tprojectName _ resultStream nextLine.\\\\n\\\\t\\\\tprojectInfos add: projectName.\\\\n\\\\t\\\\t\\\\\\\"Transcript show: projectName; cr.\\\\\\\"\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\\\\"Transcript show: 'done'; cr.\\\\\\\"\\\\n\\\\t^projectInfos\\\\n! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'testing' stamp: 'RAA 10/17/2000 16:10'!\\\\nqueryAllProjects\\\\n\\\\n\\\\\\\"answer a collection of DirectoryEntry objects for each file on server\\\\\\\"\\\\n\\\\n\\\\\\\"SuperSwikiServer testOnlySuperSwiki queryAllProjects\\\\\\\"\\\\n\\\\n\\\\t^self sendToSwikiProjectServer: {\\\\n\\\\t\\\\t'action: listallprojects'.\\\\n\\\\t}! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'testing' stamp: 'md 11/14/2003 17:28'!\\\\nqueryProjects: criteria\\\\n\\\\t| result |\\\\n\\\\t\\\\\\\"SuperSwikiServer defaultSuperSwiki queryProjects: #('submittedBy: mir' )\\\\\\\"\\\\n\\\\tresult _ self sendToSwikiProjectServer: {\\\\n\\\\t\\\\t'action: findproject'.\\\\n\\\\t}  , criteria.\\\\n\\\\t(result beginsWith: 'OK') ifFalse: [^self inform: result printString].\\\\n\\\\t^self parseQueryResult: (ReadStream on: result).\\\\n! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'testing' stamp: 'RAA 10/17/2000 19:23'!\\\\nqueryProjectsAndShow\\\\n\\\\t| result |\\\\n\\\\\\\"SuperSwikiServer testOnlySuperSwiki queryProjectsAndShow\\\\\\\"\\\\n\\\\n\\\\tresult _ self sendToSwikiProjectServer: {\\\\n\\\\t\\\\t'action: findproject'.\\\\n\\\\t\\\\t\\\\\\\"'projectname: *proj*'.\\\\\\\"\\\\n\\\\t}.\\\\n\\\\t(result beginsWith: 'OK') ifFalse: [^self inform: result printString].\\\\n\\\\tself showQueryAsPVM: (ReadStream on: result).\\\\n! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'testing' stamp: 'RAA 10/18/2000 12:23'!\\\\nqueryProjectsAndShow: thingsToSearchFor\\\\n\\\\t| result |\\\\n\\\\\\\"SuperSwikiServer testOnlySuperSwiki queryProjectsAndShow\\\\\\\"\\\\n\\\\n\\\\tresult _ self sendToSwikiProjectServer: {\\\\n\\\\t\\\\t'action: findproject'.\\\\n\\\\t}, thingsToSearchFor.\\\\n\\\\t(result beginsWith: 'OK') ifFalse: [^self inform: result printString].\\\\n\\\\tself showQueryAsPVM: (ReadStream on: result).\\\\n! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'testing' stamp: 'RAA 10/12/2000 17:01'!\\\\nqueryPythagoras\\\\n\\\\\\\"SuperSwikiServer testOnlySuperSwiki queryPythagoras\\\\\\\"\\\\n\\\\n\\\\t^self sendToSwikiProjectServer: {\\\\n\\\\t\\\\t'action: findproject'.\\\\n\\\\t\\\\t'projectsubcategory: *geometry*'.\\\\n\\\\t\\\\t\\\\\\\"'projectname: *pythagoras*'.\\\\\\\"\\\\n\\\\t}! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'testing' stamp: 'KR 1/30/2006 21:59'!\\\\nshowQueryAsPVM: resultStream\\\\n\\\\t| answer gif whatToShow projectName fileName firstURL wrapper currX currY maxX maxY rawProjectName |\\\\n\\\\\\\"SuperSwikiServer testOnlySuperSwiki queryProjectsAndShow\\\\\\\"\\\\n\\\\n\\\\tresultStream reset; nextLine.\\\\n\\\\tanswer _ RectangleMorph new\\\\n\\\\t\\\\tuseRoundedCorners;\\\\n\\\\t\\\\tborderWidth: 0;\\\\n\\\\t\\\\tborderColor: Color blue;\\\\n\\\\t\\\\tcolor: Color paleBlue.\\\\n\\\\tcurrX _ currY _ maxX _ maxY _ 10.\\\\n\\\\t[resultStream atEnd] whileFalse: [\\\\n\\\\t\\\\trawProjectName _ resultStream nextLine.\\\\n\\\\t\\\\tprojectName _ rawProjectName convertFromEncoding: self encodingName.\\\\n\\\\t\\\\tfileName _ resultStream nextLine convertFromEncoding: self encodingName.\\\\n\\\\t\\\\tgif _ self oldFileOrNoneNamed: rawProjectName,'.gif'.\\\\n\\\\t\\\\tgif ifNotNil: [gif _ GIFReadWriter formFromStream: gif].\\\\n\\\\t\\\\tcurrX > 600 ifTrue: [\\\\n\\\\t\\\\t\\\\tcurrX _ 10.\\\\n\\\\t\\\\t\\\\tcurrY _ maxY + 10.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tgif ifNil: [\\\\n\\\\t\\\\t\\\\tgif _ AlignmentMorph newColumn\\\\n\\\\t\\\\t\\\\t\\\\thResizing: #shrinkWrap;\\\\n\\\\t\\\\t\\\\t\\\\tvResizing: #shrinkWrap;\\\\n\\\\t\\\\t\\\\t\\\\tborderWidth: 8;\\\\n\\\\t\\\\t\\\\t\\\\tborderColor: Color red;\\\\n\\\\t\\\\t\\\\t\\\\tcolor: Color lightRed;\\\\n\\\\t\\\\t\\\\t\\\\taddMorph: (StringMorph contents: 'No GIF for ',projectName);\\\\n\\\\t\\\\t\\\\t\\\\tfullBounds;\\\\n\\\\t\\\\t\\\\t\\\\timageForm\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tfirstURL _ self url.\\\\n\\\\t\\\\tfirstURL last == $/ ifFalse: [firstURL _ firstURL, '/'].\\\\n\\\\n\\\\t\\\\twhatToShow _ ProjectViewMorph new\\\\n\\\\t\\\\t\\\\timage: (gif asFormOfDepth: Display depth);\\\\n\\\\t\\\\t\\\\tlastProjectThumbnail: gif;\\\\n\\\\t\\\\t\\\\tsetProperty: #SafeProjectName toValue: projectName;\\\\n\\\\t\\\\t\\\\tproject: (DiskProxy \\\\n\\\\t\\\\t\\\\t\\\\tglobal: #Project \\\\n\\\\t\\\\t\\\\t\\\\tselector: #namedUrl: \\\\n\\\\t\\\\t\\\\t\\\\targs: {firstURL,fileName}\\\\n\\\\t\\\\t\\\\t).\\\\n\\\\n\\\\t\\\\tanswer addMorphBack: (whatToShow position: currX @ currY).\\\\n\\\\t\\\\tcurrX _ currX + whatToShow width + 10.\\\\n\\\\t\\\\tmaxX _ maxX max: currX.\\\\n\\\\t\\\\tmaxY _ maxY max: currY + whatToShow height.\\\\n\\\\t].\\\\n\\\\tmaxX = 10 ifTrue: [\\\\n\\\\t\\\\t^self inform: 'No projects found for your criteria'\\\\n\\\\t].\\\\n\\\\tanswer extent: (maxX @ maxY) + (0@10).\\\\n\\\\twrapper _ ScrollPane new extent: (answer width + 10) @ (answer height min: 400).\\\\n\\\\twrapper color: Color white.\\\\n\\\\twrapper scroller addMorph: answer.\\\\n\\\\twrapper \\\\n\\\\t\\\\tbecomeModal;\\\\n\\\\t\\\\topenCenteredInWorld;\\\\n\\\\t\\\\tuseRoundedCorners;\\\\n\\\\t\\\\tsetScrollDeltas.! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'testing' stamp: 'RAA 10/25/2000 12:14'!\\\\nspeedTest1\\\\n\\\\n\\\\\\\"SuperSwikiServer testOnlySuperSwiki speedTest1\\\\\\\"\\\\n\\\\n\\\\t| answer t totalTime |\\\\n\\\\n\\\\ttotalTime _ [\\\\n\\\\t\\\\tanswer _ (1 to: 10) collect: [ :x |\\\\n\\\\t\\\\t\\\\tt _ [answer _ self sendToSwikiProjectServer: {\\\\n\\\\t\\\\t\\\\t\\\\t'action: readnamedfile'.\\\\n\\\\t\\\\t\\\\t\\\\t'projectname: xyz.002.pr'.\\\\n\\\\t\\\\t\\\\t}] timeToRun.\\\\n\\\\t\\\\t\\\\t{t. answer size}\\\\n\\\\t\\\\t].\\\\n\\\\t] timeToRun.\\\\n\\\\t^{totalTime. answer}\\\\n! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'testing' stamp: 'ar 7/8/2001 17:06'!\\\\nspeedTest2\\\\n\\\\n\\\\\\\"SuperSwikiServer testOnlySuperSwiki speedTest2\\\\\\\"\\\\n\\\\n\\\\\\\"==observed results\\\\n10 forks of 10 reads of 88K in 12.7 seconds\\\\n100 * 88110 / 12.7 ===> 693779 bytes per second\\\\n---\\\\n10 forks of 10 reads of 88K in 10.7 seconds\\\\n100 * 88110 / 10.7 ===> 823457 bytes per second\\\\n---at priority 5\\\\n10 forks of 10 reads of 88K in 9.8 seconds\\\\n100 * 88110 / 9.8 ===> 899081 bytes per second\\\\n===\\\\\\\"\\\\n\\\\n\\\\t| answer bigAnswer tRealBegin tRealEnd |\\\\n\\\\n\\\\tbigAnswer _ SharedQueue new.\\\\n\\\\ttRealBegin _ tRealEnd _ Time millisecondClockValue.\\\\n\\\\t10 timesRepeat: [\\\\n\\\\t\\\\t[\\\\n\\\\t\\\\t\\\\tanswer _ SuperSwikiServer testOnlySuperSwiki speedTest1.\\\\n\\\\t\\\\t\\\\ttRealEnd _ Time millisecondClockValue.\\\\n\\\\t\\\\t\\\\tbigAnswer nextPut: {\\\\n\\\\t\\\\t\\\\t\\\\t{tRealBegin. tRealEnd. tRealEnd - tRealBegin}.\\\\n\\\\t\\\\t\\\\t\\\\tanswer\\\\n\\\\t\\\\t\\\\t}.\\\\n\\\\t\\\\t] forkAt: Processor userInterruptPriority.\\\\n\\\\t].\\\\n\\\\tbigAnswer inspect.\\\\n! !\\\\n\\\\n!SuperSwikiServer methodsFor: 'testing' stamp: 'RAA 10/7/2000 16:12'!\\\\ntest1\\\\n\\\\n\\\\t| localDirectory localFileName local resp |\\\\n\\\\n\\\\tlocalDirectory _ FileDirectory default.\\\\n\\\\tlocalFileName _ 'superTest1.07Oct1611.cs'.\\\\n\\\\tlocal _ localDirectory oldFileNamed: localFileName.\\\\n\\\\tresp _ self putFile: local named: localFileName retry: false.\\\\n\\\\tlocal close.\\\\n\\\\t^resp\\\\n! !\\\\n\\\\n\\\\n!SuperSwikiServer methodsFor: 'private' stamp: 'mir 8/23/2001 22:04'!\\\\nparseListEntries: listResult\\\\n\\\\n\\\\t| c first |\\\\n\\\\tc _ self fastParseEntriesFrom: listResult.\\\\n\\\\tc ifNotNil: [^c].\\\\n\\\\tc _ OrderedCollection new.\\\\n\\\\tfirst _ true.\\\\n\\\\tlistResult linesDo: [ :x |\\\\n\\\\t\\\\tfirst ifFalse: [c add: (Compiler evaluate: x)].\\\\n\\\\t\\\\tfirst _ false.\\\\n\\\\t].\\\\n\\\\t^c\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSuperSwikiServer class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SuperSwikiServer class methodsFor: 'as yet unclassified' stamp: 'RAA 10/7/2000 17:47'!\\\\ncurrentSuperSwiki\\\\n\\\\n\\\\t\\\\\\\"make this return nil to disable SuperSwiki hack\\\\\\\"\\\\n\\\\n\\\\t^self defaultSuperSwiki\\\\n\\\\n! !\\\\n\\\\n!SuperSwikiServer class methodsFor: 'as yet unclassified' stamp: 'KR 2/1/2006 13:18'!\\\\ndefaultEncodingName\\\\n\\\\tLocale current isoLanguage = 'ja' ifTrue: [^'shift_jis' copy] ifFalse: [^'latin1' copy].\\\\n! !\\\\n\\\\n!SuperSwikiServer class methodsFor: 'as yet unclassified' stamp: 'RAA 10/17/2000 19:11'!\\\\ndefaultSuperSwiki\\\\n\\\\n\\\\t^SuperSwikiServer new \\\\n\\\\t\\\\ttype: #http;\\\\n\\\\t\\\\tserver: self defaultSuperSwikiIPAddress;\\\\n\\\\t\\\\tdirectory: '/super/SuperSwikiProj'\\\\n\\\\t\\\\n! !\\\\n\\\\n!SuperSwikiServer class methodsFor: 'as yet unclassified' stamp: 'RAA 10/19/2000 11:05'!\\\\ndefaultSuperSwikiIPAddress\\\\n\\\\n\\\\t^'209.143.91.36'\\\\n! !\\\\n\\\\n!SuperSwikiServer class methodsFor: 'as yet unclassified' stamp: 'RAA 10/17/2000 19:11'!\\\\ntestOnlySuperSwiki\\\\n\\\\n\\\\t^SuperSwikiServer new \\\\n\\\\t\\\\ttype: #http;\\\\n\\\\t\\\\tserver: self defaultSuperSwikiIPAddress;\\\\n\\\\t\\\\tdirectory: '/super/SuperSwikiProj'\\\\n\\\\t\\\\n! !\\\\nRWBinaryOrTextStream subclass: #SwikiPseudoFileStream\\\\n\\\\tinstanceVariableNames: 'directoryUrl localName directory'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Network-RemoteDirectory'!\\\\n\\\\n!SwikiPseudoFileStream methodsFor: 'as yet unclassified' stamp: 'RAA 10/17/2000 14:53'!\\\\ndirectory\\\\n\\\\n\\\\t^directory url! !\\\\n\\\\n!SwikiPseudoFileStream methodsFor: 'as yet unclassified' stamp: 'RAA 10/17/2000 14:53'!\\\\ndirectory: x\\\\n\\\\n\\\\tdirectory _ x! !\\\\n\\\\n!SwikiPseudoFileStream methodsFor: 'as yet unclassified' stamp: 'RAA 10/17/2000 15:00'!\\\\ndirectoryObject\\\\n\\\\n\\\\t^directory! !\\\\n\\\\n!SwikiPseudoFileStream methodsFor: 'as yet unclassified' stamp: 'RAA 10/17/2000 15:00'!\\\\ndirectoryUrl\\\\n\\\\n\\\\t^directory url! !\\\\n\\\\n!SwikiPseudoFileStream methodsFor: 'as yet unclassified' stamp: 'RAA 10/13/2000 11:50'!\\\\ndirectoryUrl: x\\\\n\\\\n\\\\tdirectoryUrl _ x! !\\\\n\\\\n!SwikiPseudoFileStream methodsFor: 'as yet unclassified' stamp: 'RAA 10/17/2000 13:59'!\\\\nfileName\\\\n\\\\n\\\\t^localName! !\\\\n\\\\n!SwikiPseudoFileStream methodsFor: 'as yet unclassified' stamp: 'RAA 10/17/2000 14:01'!\\\\nisTypeHTTP\\\\n\\\\n\\\\t^true! !\\\\n\\\\n!SwikiPseudoFileStream methodsFor: 'as yet unclassified' stamp: 'RAA 10/13/2000 11:50'!\\\\nlocalName\\\\n\\\\n\\\\t^localName! !\\\\n\\\\n!SwikiPseudoFileStream methodsFor: 'as yet unclassified' stamp: 'RAA 10/13/2000 11:50'!\\\\nlocalName: x\\\\n\\\\n\\\\tlocalName _ x! !\\\\nModel subclass: #Switch\\\\n\\\\tinstanceVariableNames: 'on onAction offAction'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'ST80-Menus'!\\\\n!Switch commentStamp: '<historical>' prior: 0!\\\\nI represent a selection setting and actions to take depending on a change in the setting. An instance has three attributes: state, which is either on or off; on action; and off action. The on and off actions are blocks of code that execute whenever the instance changes state. I am typically used as a menu item in conjunction with a SwitchView and a SwitchController.\\\\n1/24/96 sw: made this a subclass of Model, for faster dependents handling!\\\\n\\\\n\\\\n!Switch methodsFor: 'action'!\\\\ndoAction: anAction \\\\n\\\\t\\\\\\\"Execute anAction if it is non-nil.\\\\\\\"\\\\n\\\\n\\\\tanAction == nil ifFalse: [anAction value]! !\\\\n\\\\n!Switch methodsFor: 'action'!\\\\noffAction: anAction \\\\n\\\\t\\\\\\\"Set the off action of the receiver to anAction.\\\\\\\"\\\\n\\\\n\\\\toffAction _ anAction fixTemps! !\\\\n\\\\n!Switch methodsFor: 'action'!\\\\nonAction: anAction \\\\n\\\\t\\\\\\\"Set the on action of the receiver to anAction.\\\\\\\"\\\\n\\\\n\\\\tonAction _ anAction fixTemps! !\\\\n\\\\n\\\\n!Switch methodsFor: 'converting' stamp: 'md 9/18/2004 19:51'!\\\\nprintOn: aStream\\\\n\\\\tself isOn\\\\n\\\\t\\\\tifTrue: [aStream nextPutAll: 'ON-Switch']\\\\n\\\\t\\\\tifFalse: [aStream nextPutAll: 'OFF-Switch']! !\\\\n\\\\n\\\\n!Switch methodsFor: 'state'!\\\\nclear\\\\n\\\\t\\\\\\\"Set the state of the receiver to 'off'. If the state of the receiver was \\\\n\\\\tpreviously 'on', then 'self change' is sent. The receiver's off action is \\\\n\\\\tNOT executed.\\\\\\\"\\\\n\\\\n\\\\tself isOn\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[on _ false.\\\\n\\\\t\\\\t\\\\tself changed]! !\\\\n\\\\n!Switch methodsFor: 'state'!\\\\nisOff\\\\n\\\\t\\\\\\\"Answer whether the receiver is set off or not.\\\\\\\"\\\\n\\\\n\\\\t^on not! !\\\\n\\\\n!Switch methodsFor: 'state'!\\\\nisOn\\\\n\\\\t\\\\\\\"Answer whether the receiver is set on or not.\\\\\\\"\\\\n\\\\n\\\\t^on! !\\\\n\\\\n!Switch methodsFor: 'state'!\\\\nset\\\\n\\\\t\\\\\\\"Set the state of the receiver to 'on'. If the state of the receiver was \\\\n\\\\tpreviously 'off', then 'self change' is sent. The receiver's on action is \\\\n\\\\tNOT executed.\\\\\\\"\\\\n\\\\n\\\\tself isOff\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[on _ true.\\\\n\\\\t\\\\t\\\\tself changed]! !\\\\n\\\\n!Switch methodsFor: 'state'!\\\\nswitch\\\\n\\\\t\\\\\\\"Change the state of the receiver from 'on' to 'off' or from 'off' to 'on' (see \\\\n\\\\tSwitch|turnOn, Switch|turnOff).\\\\\\\"\\\\n\\\\n\\\\tself isOn\\\\n\\\\t\\\\tifTrue: [self turnOff]\\\\n\\\\t\\\\tifFalse: [self turnOn]! !\\\\n\\\\n!Switch methodsFor: 'state'!\\\\nturnOff\\\\n\\\\t\\\\\\\"Set the state of the receiver to 'off'. If the state of the receiver was \\\\n\\\\tpreviously 'on', then 'self change' is sent and the receiver's off action is \\\\n\\\\texecuted.\\\\\\\"\\\\n\\\\n\\\\tself isOn\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[on _ false.\\\\n\\\\t\\\\t\\\\tself changed.\\\\n\\\\t\\\\t\\\\tself doAction: offAction]! !\\\\n\\\\n!Switch methodsFor: 'state'!\\\\nturnOn\\\\n\\\\t\\\\\\\"Set the state of the receiver to 'on'. If the state of the receiver was \\\\n\\\\tpreviously 'off', then 'self change' is sent and the receiver's on action is \\\\n\\\\texecuted.\\\\\\\"\\\\n\\\\n\\\\tself isOff\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[on _ true.\\\\n\\\\t\\\\t\\\\tself changed.\\\\n\\\\t\\\\t\\\\tself doAction: onAction]! !\\\\n\\\\n\\\\n!Switch methodsFor: 'private'!\\\\ninitializeOff\\\\n\\\\n\\\\ton _ false. \\\\n\\\\tonAction _ nil.\\\\n\\\\toffAction _ nil! !\\\\n\\\\n!Switch methodsFor: 'private'!\\\\ninitializeOn\\\\n\\\\n\\\\ton _ true. \\\\n\\\\tonAction _ nil.\\\\n\\\\toffAction _ nil! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSwitch class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!Switch class methodsFor: 'instance creation'!\\\\nnew\\\\n\\\\t\\\\\\\"Answer an instance of me such that the on and off actions are set to nil\\\\n\\\\t('no action'), and the state is set to 'off'.\\\\\\\"\\\\n\\\\n\\\\t^self newOff! !\\\\n\\\\n!Switch class methodsFor: 'instance creation'!\\\\nnewOff\\\\n\\\\t\\\\\\\"Answer an instance of me such that the on and off actions are set to nil \\\\n\\\\t('no action'), and the state is set to 'off'.\\\\\\\"\\\\n\\\\n\\\\t^super new initializeOff! !\\\\n\\\\n!Switch class methodsFor: 'instance creation'!\\\\nnewOn\\\\n\\\\t\\\\\\\"Answer an instance of me such that the on and off actions are set to nil \\\\n\\\\t('no action'), and the state is set to 'on'.\\\\\\\"\\\\n\\\\n\\\\t^super new initializeOn! !\\\\nObject subclass: #Syllable\\\\n\\\\tinstanceVariableNames: 'phonemes accent events'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Speech-TTS'!\\\\n!Syllable commentStamp: '<historical>' prior: 0!\\\\nMy instances are syllables. They can carry a pitch accent: 'H*', 'L*', etc.!\\\\n\\\\n\\\\n!Syllable methodsFor: 'accessing' stamp: 'len 12/11/1999 13:03'!\\\\naccent\\\\n\\\\t^ accent! !\\\\n\\\\n!Syllable methodsFor: 'accessing' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\naccent: aString\\\\n\\\\taccent := aString! !\\\\n\\\\n!Syllable methodsFor: 'accessing' stamp: 'len 12/8/1999 17:47'!\\\\naccept: anObject\\\\n\\\\tanObject syllable: self! !\\\\n\\\\n!Syllable methodsFor: 'accessing' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\nevents\\\\n\\\\t^ events ifNil: [events := CompositeEvent new addAll: (self phonemes collect: [ :each | PhoneticEvent new phoneme: each; duration: 0.080]); yourself]! !\\\\n\\\\n!Syllable methodsFor: 'accessing' stamp: 'len 12/8/1999 02:55'!\\\\nphonemes\\\\n\\\\t^ phonemes! !\\\\n\\\\n!Syllable methodsFor: 'accessing' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\nphonemes: aCollection\\\\n\\\\tphonemes := aCollection! !\\\\n\\\\n!Syllable methodsFor: 'accessing' stamp: 'len 12/8/1999 02:54'!\\\\nstress\\\\n\\\\tself phonemes do: [ :each | each stress > 0 ifTrue: [^ each stress]].\\\\n\\\\t^ 0! !\\\\n\\\\n\\\\n!Syllable methodsFor: 'enumarating' stamp: 'len 12/13/1999 01:20'!\\\\neventsDo: aBlock\\\\n\\\\tself events do: aBlock! !\\\\n\\\\n\\\\n!Syllable methodsFor: 'printing' stamp: 'stephaneducasse 2/3/2006 22:23'!\\\\nprintOn: aStream\\\\n\\\\t| first |\\\\n\\\\taStream nextPut: $[.\\\\n\\\\tfirst := true.\\\\n\\\\tself phonemes do: [ :each |\\\\n\\\\t\\\\tfirst ifFalse: [aStream space].\\\\n\\\\t\\\\taStream print: each.\\\\n\\\\t\\\\tfirst := false].\\\\n\\\\taStream nextPut: $]! !\\\\n\\\\n\\\\n!Syllable methodsFor: 'testing' stamp: 'len 12/8/1999 19:03'!\\\\nhasPrimaryStress\\\\n\\\\t^ self stress = 1! !\\\\n\\\\n!Syllable methodsFor: 'testing' stamp: 'len 12/8/1999 19:03'!\\\\nhasSecondaryStress\\\\n\\\\t^ self stress = 2! !\\\\n\\\\n!Syllable methodsFor: 'testing' stamp: 'len 12/11/1999 13:11'!\\\\nisAccented\\\\n\\\\t^ self accent notNil! !\\\\nString subclass: #Symbol\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: 'NewSymbols OneCharacterSymbols SymbolTable'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Collections-Strings'!\\\\n!Symbol commentStamp: '<historical>' prior: 0!\\\\nI represent Strings that are created uniquely. Thus, someString asSymbol == someString asSymbol.!\\\\n\\\\n\\\\n!Symbol methodsFor: 'accessing'!\\\\nat: anInteger put: anObject \\\\n\\\\t\\\\\\\"You cannot modify the receiver.\\\\\\\"\\\\n\\\\n\\\\tself errorNoModification! !\\\\n\\\\n!Symbol methodsFor: 'accessing' stamp: 'sma 2/5/2000 12:32'!\\\\nprecedence\\\\n\\\\t\\\\\\\"Answer the receiver's precedence, assuming it is a valid Smalltalk\\\\n\\\\tmessage selector or 0 otherwise.  The numbers are 1 for unary,\\\\n\\\\t2 for binary and 3 for keyword selectors.\\\\\\\"\\\\n\\\\n\\\\tself size = 0 ifTrue: [^ 0].\\\\n\\\\tself first isLetter ifFalse: [^ 2].\\\\n\\\\tself last = $: ifTrue: [^ 3].\\\\n\\\\t^ 1! !\\\\n\\\\n!Symbol methodsFor: 'accessing'!\\\\nreplaceFrom: start to: stop with: replacement startingAt: repStart\\\\n\\\\n\\\\tself errorNoModification! !\\\\n\\\\n\\\\n!Symbol methodsFor: 'comparing' stamp: 'ar 4/10/2005 23:45'!\\\\n= aSymbol\\\\n\\\\t\\\\\\\"Compare the receiver and aSymbol.\\\\\\\" \\\\n\\\\tself == aSymbol ifTrue: [^ true].\\\\n\\\\tself class == aSymbol class ifTrue: [^ false].\\\\n\\\\t\\\\\\\"Use String comparison otherwise\\\\\\\"\\\\n\\\\t^ super = aSymbol! !\\\\n\\\\n\\\\n!Symbol methodsFor: 'converting' stamp: 'st 11/22/2004 17:26'!\\\\nasMutator\\\\n\\\\t\\\\\\\"Return a setter message from a getter message. For example,\\\\n\\\\t#name asMutator returns #name:\\\\\\\"\\\\n\\\\t^ (self copyWith: $:) asSymbol! !\\\\n\\\\n!Symbol methodsFor: 'converting' stamp: 'ar 4/10/2005 22:42'!\\\\nasString \\\\n\\\\t\\\\\\\"Refer to the comment in String|asString.\\\\\\\"\\\\n\\\\t| newString |\\\\n\\\\tnewString _ self species new: self size.\\\\n\\\\tnewString replaceFrom: 1 to: newString size with: self startingAt: 1.\\\\n\\\\t^newString! !\\\\n\\\\n!Symbol methodsFor: 'converting'!\\\\nasSymbol \\\\n\\\\t\\\\\\\"Refer to the comment in String|asSymbol.\\\\\\\"! !\\\\n\\\\n!Symbol methodsFor: 'converting' stamp: 'sw 1/28/98 18:18'!\\\\ncapitalized\\\\n\\\\t^ self asString capitalized asSymbol! !\\\\n\\\\n!Symbol methodsFor: 'converting' stamp: 'md 8/10/2004 10:54'!\\\\nwithFirstCharacterDownshifted\\\\n\\\\t\\\\\\\"Answer an object like the receiver but with first character downshifted if necesary\\\\\\\"\\\\n\\\\n\\\\t^self asString withFirstCharacterDownshifted asSymbol.! !\\\\n\\\\n\\\\n!Symbol methodsFor: 'copying' stamp: 'tk 6/26/1998 11:35'!\\\\nclone\\\\n\\\\t\\\\\\\"Answer with the receiver, because Symbols are unique.\\\\\\\"! !\\\\n\\\\n!Symbol methodsFor: 'copying'!\\\\ncopy\\\\n\\\\t\\\\\\\"Answer with the receiver, because Symbols are unique.\\\\\\\"! !\\\\n\\\\n!Symbol methodsFor: 'copying'!\\\\nshallowCopy\\\\n\\\\t\\\\\\\"Answer with the receiver, because Symbols are unique.\\\\\\\"! !\\\\n\\\\n!Symbol methodsFor: 'copying' stamp: 'tk 8/19/1998 16:05'!\\\\nveryDeepCopyWith: deepCopier\\\\n\\\\t\\\\\\\"Return self.  I am immutable in the Morphic world.  Do not record me.\\\\\\\"! !\\\\n\\\\n\\\\n!Symbol methodsFor: 'filter streaming' stamp: 'mpw 1/1/1901 00:20'!\\\\nbyteEncode:aStream\\\\n\\\\t^aStream writeSymbol:self.\\\\n! !\\\\n\\\\n\\\\n!Symbol methodsFor: 'printing' stamp: 'sw 8/19/1999 11:30'!\\\\nisOrientedFill\\\\n\\\\t\\\\\\\"Needs to be implemented here because symbols can occupy 'color' slots of morphs.\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!Symbol methodsFor: 'printing' stamp: 'di 4/25/2000 12:32'!\\\\nstoreOn: aStream \\\\n\\\\n\\\\taStream nextPut: $#.\\\\n\\\\t(Scanner isLiteralSymbol: self)\\\\n\\\\t\\\\tifTrue: [aStream nextPutAll: self]\\\\n\\\\t\\\\tifFalse: [super storeOn: aStream]! !\\\\n\\\\n\\\\n!Symbol methodsFor: 'system primitives' stamp: 'di 1/2/1999 17:00'!\\\\nflushCache\\\\n\\\\t\\\\\\\"Tell the interpreter to remove all entries with this symbol as a selector from its method lookup cache, if it has one.  This primitive must be called whenever a method is defined or removed.\\\\n\\\\tNOTE:  Only one of the two selective flush methods needs to be used.\\\\n\\\\tSqueak 2.3 and later uses 116 (See CompiledMethod flushCache).\\\\\\\"\\\\n\\\\n\\\\t<primitive: 119>\\\\n! !\\\\n\\\\n!Symbol methodsFor: 'system primitives' stamp: 'md 2/16/2006 17:17'!\\\\nnumArgs: n\\\\n\\\\t\\\\\\\"Answer a string that can be used as a selector with n arguments.\\\\n\\\\t TODO: need to be extended to support shrinking and for selectors like #+ \\\\\\\" \\\\n\\\\n\\\\t| selector numArgs aStream offs |\\\\n\\\\t\\\\n\\\\tselector := self.\\\\n\\\\t(numArgs := selector numArgs) >= n ifTrue: [^self].\\\\t\\\\n\\\\taStream := WriteStream on: (String new: 16).\\\\n\\\\taStream nextPutAll: self.\\\\n\\\\t\\\\n\\\\t(numArgs = 0) ifTrue: [aStream nextPutAll: ':'. offs := 0] ifFalse: [offs := 1].\\\\n\\\\t2 to: n - numArgs + offs do: [:i | aStream nextPutAll: 'with:'].\\\\t\\\\n\\\\t^aStream contents asSymbol\\\\n\\\\t\\\\n! !\\\\n\\\\n\\\\n!Symbol methodsFor: 'testing' stamp: 'md 1/20/2006 16:16'!\\\\nincludesKey: sym\\\\n\\\\t^self == sym.! !\\\\n\\\\n!Symbol methodsFor: 'testing' stamp: 'md 8/27/2005 16:33'!\\\\nisDoIt\\\\n\\\\n\\\\t^ (self == #DoIt) or: [self == #DoItIn:].! !\\\\n\\\\n!Symbol methodsFor: 'testing' stamp: 'sma 2/5/2000 12:32'!\\\\nisInfix\\\\n\\\\t\\\\\\\"Answer whether the receiver is an infix message selector.\\\\\\\"\\\\n\\\\n\\\\t^ self precedence == 2! !\\\\n\\\\n!Symbol methodsFor: 'testing' stamp: 'sma 2/5/2000 12:34'!\\\\nisKeyword\\\\n\\\\t\\\\\\\"Answer whether the receiver is a message keyword.\\\\\\\"\\\\n\\\\n\\\\t^ self precedence == 3! !\\\\n\\\\n!Symbol methodsFor: 'testing' stamp: 'di 4/25/2000 12:32'!\\\\nisLiteral\\\\n\\\\t\\\\\\\"Answer whether the receiver is a valid Smalltalk literal.\\\\\\\"\\\\n\\\\n\\\\t^ true! !\\\\n\\\\n!Symbol methodsFor: 'testing' stamp: 'sma 2/5/2000 12:13'!\\\\nisPvtSelector\\\\n\\\\t\\\\\\\"Answer whether the receiver is a private message selector, that is,\\\\n\\\\tbegins with 'pvt' followed by an uppercase letter, e.g. pvtStringhash.\\\\\\\"\\\\n\\\\n\\\\t^ (self beginsWith: 'pvt') and: [self size >= 4 and: [(self at: 4) isUppercase]]! !\\\\n\\\\n!Symbol methodsFor: 'testing' stamp: 'md 4/30/2003 15:31'!\\\\nisSymbol\\\\n\\\\t^ true ! !\\\\n\\\\n!Symbol methodsFor: 'testing' stamp: 'sma 2/5/2000 12:34'!\\\\nisUnary\\\\n\\\\t\\\\\\\"Answer whether the receiver is an unary message selector.\\\\\\\"\\\\n\\\\n\\\\t^ self precedence == 1! !\\\\n\\\\n\\\\n!Symbol methodsFor: 'user interface' stamp: 'sma 11/12/2000 11:46'!\\\\nasExplorerString\\\\n\\\\t^ self printString! !\\\\n\\\\n\\\\n!Symbol methodsFor: 'private'!\\\\nerrorNoModification\\\\n\\\\n\\\\tself error: 'symbols can not be modified.'! !\\\\n\\\\n!Symbol methodsFor: 'private'!\\\\nstring: aString\\\\n\\\\n\\\\t1 to: aString size do: [:j | super at: j put: (aString at: j)].\\\\n\\\\t^self  ! !\\\\n\\\\n\\\\n!Symbol methodsFor: 'evaluating' stamp: 'md 3/24/2006 12:09'!\\\\nvalue: anObject \\\\n\\\\t^anObject perform: self.! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSymbol class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!Symbol class methodsFor: 'access' stamp: 'ar 4/10/2005 22:49'!\\\\nallSymbols\\\\n\\\\t\\\\\\\"Answer all interned symbols\\\\\\\"\\\\n\\\\t^Array streamContents:[:s|\\\\n\\\\t\\\\ts nextPutAll: NewSymbols.\\\\n\\\\t\\\\ts nextPutAll: OneCharacterSymbols.\\\\n\\\\t\\\\ts nextPutAll: SymbolTable.\\\\n\\\\t].\\\\n! !\\\\n\\\\n!Symbol class methodsFor: 'access' stamp: 'yo 11/3/2004 19:24'!\\\\nselectorsContaining: aString\\\\n\\\\t\\\\\\\"Answer a list of selectors that contain aString within them. Case-insensitive.  Does return symbols that begin with a capital letter.\\\\\\\"\\\\n\\\\n\\\\t| size selectorList ascii |\\\\n\\\\n\\\\tselectorList _ OrderedCollection new.\\\\n\\\\t(size _ aString size) = 0 ifTrue: [^selectorList].\\\\n\\\\n\\\\taString size = 1 ifTrue:\\\\n\\\\t\\\\t[\\\\n\\\\t\\\\t\\\\tascii _ aString first asciiValue.\\\\n\\\\t\\\\t\\\\tascii < 128 ifTrue: [selectorList add: (OneCharacterSymbols at: ascii+1)]\\\\n\\\\t\\\\t].\\\\n\\\\n\\\\taString first isLetter ifFalse:\\\\n\\\\t\\\\t[\\\\n\\\\t\\\\t\\\\taString size == 2 ifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t[Symbol hasInterned: aString ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:s | selectorList add: s]].\\\\n\\\\t\\\\t\\\\t^selectorList\\\\n\\\\t\\\\t].\\\\n\\\\n\\\\tselectorList _ selectorList copyFrom: 2 to: selectorList size.\\\\n\\\\n\\\\tself allSymbolTablesDo: [:each |\\\\n\\\\t\\\\teach size >= size ifTrue:\\\\n\\\\t\\\\t\\\\t[(each findSubstring: aString in: each startingAt: 1 \\\\n\\\\t\\\\t\\\\t\\\\tmatchTable: CaseInsensitiveOrder) > 0\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [selectorList add: each]]].\\\\n\\\\n\\\\t^selectorList reject: [:each | \\\\\\\"reject non-selectors, but keep ones that begin with an uppercase\\\\\\\"\\\\n\\\\t\\\\teach numArgs < 0 and: [each asString withFirstCharacterDownshifted numArgs < 0]].\\\\n\\\\n\\\\\\\"Symbol selectorsContaining: 'scon'\\\\\\\"! !\\\\n\\\\n!Symbol class methodsFor: 'access' stamp: 'tween 9/13/2004 10:09'!\\\\nthatStartsCaseSensitive: leadingCharacters skipping: skipSym\\\\n\\\\t\\\\\\\"Same as thatStarts:skipping: but caseSensitive\\\\\\\"\\\\n\\\\t| size firstMatch key |\\\\n\\\\n\\\\tsize := leadingCharacters size.\\\\n\\\\tsize = 0 ifTrue: [^skipSym ifNil: [#''] ifNotNil: [nil]].\\\\n\\\\tfirstMatch := leadingCharacters at: 1.\\\\n\\\\tsize > 1 ifTrue: [key := leadingCharacters copyFrom: 2 to: size].\\\\n\\\\tself allSymbolTablesDo: [:each |\\\\n\\\\t\\\\t\\\\teach size >= size ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t((each at: 1) == firstMatch and:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[key == nil or:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[(each findString: key startingAt: 2 caseSensitive: true) = 2]])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [^each]\\\\n\\\\t\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t] after: skipSym.\\\\n\\\\n\\\\t^nil\\\\n! !\\\\n\\\\n!Symbol class methodsFor: 'access' stamp: 'RAA 5/29/2001 14:35'!\\\\nthatStarts: leadingCharacters skipping: skipSym\\\\n\\\\t\\\\\\\"Answer a selector symbol that starts with leadingCharacters.\\\\n\\\\tSymbols beginning with a lower-case letter handled directly here.\\\\n\\\\tIgnore case after first char.\\\\n\\\\tIf skipSym is not nil, it is a previous answer; start searching after it.\\\\n\\\\tIf no symbols are found, answer nil.\\\\n\\\\tUsed by Alt-q (Command-q) routines\\\\\\\"\\\\n\\\\n\\\\t| size firstMatch key |\\\\n\\\\n\\\\tsize _ leadingCharacters size.\\\\n\\\\tsize = 0 ifTrue: [^skipSym ifNil: [#''] ifNotNil: [nil]].\\\\n\\\\n\\\\tfirstMatch _ leadingCharacters at: 1.\\\\n\\\\tsize > 1 ifTrue: [key _ leadingCharacters copyFrom: 2 to: size].\\\\n\\\\n\\\\tself allSymbolTablesDo: [:each |\\\\n\\\\t\\\\t\\\\teach size >= size ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t((each at: 1) == firstMatch and:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[key == nil or:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[(each findString: key startingAt: 2 caseSensitive: false) = 2]])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [^each]\\\\n\\\\t\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t] after: skipSym.\\\\n\\\\n\\\\t^nil\\\\n\\\\n\\\\\\\"Symbol thatStarts: 'sf' skipping: nil\\\\\\\"\\\\n\\\\\\\"Symbol thatStarts: 'sf' skipping: #sfpGetFile:with:with:with:with:with:with:with:with:\\\\\\\"\\\\n\\\\\\\"Symbol thatStarts: 'candidate' skipping: nil\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!Symbol class methodsFor: 'class initialization' stamp: 'RAA 5/29/2001 08:21'!\\\\nallSymbolTablesDo: aBlock\\\\n\\\\n\\\\tNewSymbols do: aBlock.\\\\n\\\\tSymbolTable do: aBlock.! !\\\\n\\\\n!Symbol class methodsFor: 'class initialization' stamp: 'RAA 5/29/2001 14:35'!\\\\nallSymbolTablesDo: aBlock after: aSymbol\\\\n\\\\n\\\\tNewSymbols do: aBlock after: aSymbol.\\\\n\\\\tSymbolTable do: aBlock after: aSymbol.! !\\\\n\\\\n!Symbol class methodsFor: 'class initialization' stamp: 'RAA 12/17/2000 18:05'!\\\\ncompactSymbolTable\\\\n\\\\t\\\\\\\"Reduce the size of the symbol table so that it holds all existing symbols + 25% (changed from 1000 since sets like to have 25% free and the extra space would grow back in a hurry)\\\\\\\"\\\\n\\\\n\\\\t| oldSize |\\\\n\\\\n\\\\tSmalltalk garbageCollect.\\\\n\\\\toldSize _ SymbolTable array size.\\\\n\\\\tSymbolTable growTo: SymbolTable size * 4 // 3 + 100.\\\\n\\\\t^oldSize printString,'  ',(oldSize - SymbolTable array size) printString, ' slot(s) reclaimed'! !\\\\n\\\\n!Symbol class methodsFor: 'class initialization' stamp: 'RAA 5/29/2001 09:04'!\\\\ninitialize\\\\n\\\\n\\\\t\\\\\\\"Symbol initialize\\\\\\\"\\\\n\\\\n\\\\tSymbol rehash.\\\\n\\\\tOneCharacterSymbols _ nil.\\\\n\\\\tOneCharacterSymbols _ (1 to: 256) collect: [ :i | (i - 1) asCharacter asSymbol].\\\\n\\\\tSmalltalk addToShutDownList: self.\\\\n! !\\\\n\\\\n\\\\n!Symbol class methodsFor: 'instance creation'!\\\\nfindInterned:aString\\\\n\\\\n\\\\tself hasInterned:aString ifTrue:[:symbol| ^symbol].\\\\n\\\\t^nil.! !\\\\n\\\\n!Symbol class methodsFor: 'instance creation' stamp: 'ar 4/10/2005 23:04'!\\\\ninternCharacter: aCharacter\\\\n\\\\taCharacter asciiValue > 256 ifTrue:[^self intern: aCharacter asString].\\\\n\\\\tOneCharacterSymbols ifNil: [^self intern: aCharacter asString].\\\\n\\\\t^OneCharacterSymbols at: aCharacter asciiValue + 1\\\\n! !\\\\n\\\\n!Symbol class methodsFor: 'instance creation' stamp: 'ar 4/12/2005 17:37'!\\\\nintern: aStringOrSymbol \\\\n\\\\n\\\\t^(self lookup: aStringOrSymbol) ifNil:[\\\\n\\\\t\\\\t| aClass aSymbol |\\\\n\\\\t\\\\taStringOrSymbol isSymbol ifTrue:[\\\\n\\\\t\\\\t\\\\taSymbol _ aStringOrSymbol.\\\\n\\\\t\\\\t] ifFalse:[\\\\n\\\\t\\\\t\\\\taClass := aStringOrSymbol isOctetString ifTrue:[ByteSymbol] ifFalse:[WideSymbol].\\\\n\\\\t\\\\t\\\\taSymbol := aClass new: aStringOrSymbol size.\\\\n\\\\t\\\\t\\\\taSymbol string: aStringOrSymbol.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tNewSymbols add: aSymbol.\\\\n\\\\t\\\\taSymbol].! !\\\\n\\\\n!Symbol class methodsFor: 'instance creation' stamp: 'RAA 5/29/2001 08:09'!\\\\nlookup: aStringOrSymbol\\\\n\\\\n\\\\t^(SymbolTable like: aStringOrSymbol) ifNil: [\\\\n\\\\t\\\\tNewSymbols like: aStringOrSymbol\\\\n\\\\t]! !\\\\n\\\\n!Symbol class methodsFor: 'instance creation'!\\\\nnewFrom: aCollection \\\\n\\\\t\\\\\\\"Answer an instance of me containing the same elements as aCollection.\\\\\\\"\\\\n\\\\n\\\\t^ (aCollection as: String) asSymbol\\\\n\\\\n\\\\\\\"\\\\tSymbol newFrom: {$P. $e. $n}\\\\n\\\\t{$P. $e. $n} as: Symbol\\\\n\\\\\\\"! !\\\\n\\\\n!Symbol class methodsFor: 'instance creation' stamp: 'di 10/11/1999 00:02'!\\\\nreadFrom: strm  \\\\\\\"Symbol readFromString: '#abc'\\\\\\\"\\\\n\\\\n\\\\tstrm peek = $# ifFalse: [self error: 'Symbols must be introduced by #'].\\\\n\\\\t^ (Scanner new scan: strm) advance  \\\\\\\"Just do what the code scanner does\\\\\\\"! !\\\\n\\\\n\\\\n!Symbol class methodsFor: 'private' stamp: 'ar 4/10/2005 22:43'!\\\\nhasInterned: aString ifTrue: symBlock \\\\n\\\\t\\\\\\\"Answer with false if aString hasnt been interned (into a Symbol),  \\\\n\\\\totherwise supply the symbol to symBlock and return true.\\\\\\\"\\\\n\\\\n\\\\t| symbol |\\\\n\\\\t^ (symbol _ self lookup: aString)\\\\n\\\\t\\\\tifNil: [false]\\\\n\\\\t\\\\tifNotNil: [symBlock value: symbol.\\\\n\\\\t\\\\t\\\\ttrue]! !\\\\n\\\\n!Symbol class methodsFor: 'private' stamp: 'RAA 5/29/2001 14:33'!\\\\npossibleSelectorsFor: misspelled \\\\n\\\\t\\\\\\\"Answer an ordered collection of possible corrections\\\\n\\\\tfor the misspelled selector in order of likelyhood\\\\\\\"\\\\n\\\\n\\\\t| numArgs candidates lookupString best binary short long first ss |\\\\n\\\\tlookupString _ misspelled asLowercase. \\\\\\\"correct uppercase selectors to lowercase\\\\\\\"\\\\n\\\\tnumArgs _ lookupString numArgs.\\\\n\\\\t(numArgs < 0 or: [lookupString size < 2]) ifTrue: [^ OrderedCollection new: 0].\\\\n\\\\tfirst _ lookupString first.\\\\n\\\\tshort _ lookupString size - (lookupString size // 4 max: 3) max: 2.\\\\n\\\\tlong _ lookupString size + (lookupString size // 4 max: 3).\\\\n\\\\n\\\\t\\\\\\\"First assemble candidates for detailed scoring\\\\\\\"\\\\n\\\\tcandidates _ OrderedCollection new.\\\\n\\\\tself allSymbolTablesDo: [:s | (((ss _ s size) >= short\\\\t\\\\\\\"not too short\\\\\\\"\\\\n\\\\t\\\\t\\\\tand: [ss <= long\\\\t\\\\t\\\\t\\\\\\\"not too long\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tor: [(s at: 1) = first]])\\\\t\\\\\\\"well, any length OK if starts w/same letter\\\\\\\"\\\\n\\\\t\\\\t\\\\tand: [s numArgs = numArgs])\\\\t\\\\\\\"and numArgs is the same\\\\\\\"\\\\n\\\\t\\\\t\\\\tifTrue: [candidates add: s]].\\\\n\\\\n\\\\t\\\\\\\"Then further prune these by correctAgainst:\\\\\\\"\\\\n\\\\tbest _ lookupString correctAgainst: candidates.\\\\n\\\\t((misspelled last ~~ $:) and: [misspelled size > 1]) ifTrue: [\\\\n\\\\t\\\\tbinary _ misspelled, ':'.\\\\t\\\\t\\\\\\\"try for missing colon\\\\\\\"\\\\n\\\\t\\\\tSymbol hasInterned: binary ifTrue: [:him | best addFirst: him]].\\\\n\\\\t^ best! !\\\\n\\\\n!Symbol class methodsFor: 'private' stamp: 'ar 9/27/2005 20:01'!\\\\nrehash\\\\t\\\\t\\\\\\\"Symbol rehash\\\\\\\"\\\\n\\\\t\\\\\\\"Rebuild the hash table, reclaiming unreferenced Symbols.\\\\\\\"\\\\n\\\\n\\\\tSymbolTable := WeakSet withAll: self allSubInstances.\\\\n\\\\tNewSymbols := WeakSet new.! !\\\\n\\\\n!Symbol class methodsFor: 'private' stamp: 'RAA 5/29/2001 09:04'!\\\\nshutDown: aboutToQuit\\\\n\\\\n\\\\tSymbolTable addAll: NewSymbols.\\\\n\\\\tNewSymbols _ WeakSet new.! !\\\\nKeyboardInputInterpreter subclass: #SymbolInputInterpreter\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Multilingual-TextConversion'!\\\\n\\\\n!SymbolInputInterpreter methodsFor: 'as yet unclassified' stamp: 'ar 4/10/2005 16:10'!\\\\nnextCharFrom: sensor firstEvt: evtBuf\\\\n\\\\n\\\\t| keyValue |\\\\n\\\\tkeyValue := evtBuf third.\\\\n\\\\tevtBuf fifth > 1 ifTrue: [^ keyValue asCharacter macToSqueak].\\\\n\\\\t^ (self symbolKeyValueToUnicode: keyValue) asCharacter.\\\\n! !\\\\n\\\\n!SymbolInputInterpreter methodsFor: 'as yet unclassified' stamp: 'yo 11/8/2004 18:53'!\\\\nsymbolKeyValueToUnicode: keyValue\\\\n\\\\n\\\\tkeyValue = 127 ifTrue: [^ 127].\\\\n\\\\tkeyValue < 32 ifTrue: [^ keyValue].\\\\n\\\\tkeyValue > 255 ifTrue: [^ 0].\\\\n\\\\t^ #(0 0 0 0 0 0 0 0 0 61472 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61472 61473 61474 61475 61476 61477 61478 61479 61480 61481 61482 61483 61484 61485 61486 61487 61488 61489 61490 61491 61492 61493 61494 61495 61496 61497 61498 61499 61500 61501 61502 61503 61504 61505 61506 61507 61508 61509 61510 61511 61512 61513 61514 61515 61516 61517 61518 61519 61520 61521 61522 61523 61524 61525 61526 61527 61528 61529 61530 61531 61532 61533 61534 61535 61536 61537 61538 61539 61540 61541 61542 61543 61544 61545 61546 61547 61548 61549 61550 61551 61552 61553 61554 61555 61556 61557 61558 61559 61560 61561 61562 61563 61564 61565 61566 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61601 61602 61603 61604 61605 61606 61607 61608 61609 61610 61611 61612 61613 61614 61615 61616 61617 61618 61619 61620 61621 61622 61623 61624 61625 61626 61627 61628 61629 61630 61631 61632 61633 61634 61635 61636 61637 61638 61639 61640 61641 61642 61643 61644 61645 61646 61647 61648 61649 61650 61651 61652 61653 61654 61655 61656 61657 61658 61659 61660 61661 61662 61663 61664 61665 61666 61667 61668 61669 61670 61671 61672 61673 61674 61675 61676 61677 61678 61679 0 61681 61682 61683 61684 61685 61686 61687 61688 61689 61690 61691 61692 61693 61694 0) at: keyValue + 1.\\\\n! !\\\\nTileMorph subclass: #SymbolListTile\\\\n\\\\tinstanceVariableNames: 'choices dataType'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'EToys-Scripting Tiles'!\\\\n!SymbolListTile commentStamp: '<historical>' prior: 0!\\\\nInstances of SymbolListTile are literal tiles whose literals are choosable from a finite list.!\\\\n\\\\n\\\\n!SymbolListTile methodsFor: 'accessing' stamp: 'yo 7/2/2004 21:27'!\\\\nliteral: anObject\\\\n\\\\t\\\\\\\"Set the receiver's literal as indicated\\\\\\\"\\\\n\\\\tself flag: #yo.\\\\n\\\\n\\\\tliteral _ anObject asSymbol.\\\\n\\\\tself updateLiteralLabel.\\\\n\\\\\\\"\\\\n\\\\tkey _ Vocabulary eToyVocabulary translationKeyFor: literal.\\\\n\\\\tkey isNil ifFalse: [literal _ key].\\\\n\\\\\\\"\\\\n\\\\tself flag: #deferred.  \\\\\\\"The below formerly was necessary but now is problematical, leading to low-space condition etc.  May need to revisit, since as I comment this out now I am uncertain what if anything this may break\\\\\\\"\\\\n\\\\t\\\\\\\"self labelMorph informTarget\\\\\\\"\\\\n\\\\n! !\\\\n\\\\n!SymbolListTile methodsFor: 'accessing' stamp: 'tak 12/6/2004 01:58'!\\\\noptions\\\\n\\\\t^ {self choices. self choices\\\\n\\\\t\\\\tcollect: [:each | ScriptingSystem helpStringForOperator: literal]}! !\\\\n\\\\n!SymbolListTile methodsFor: 'accessing' stamp: 'tak 12/7/2004 14:42'!\\\\nvalue: anObject \\\\n\\\\tself acceptNewLiteral: anObject! !\\\\n\\\\n\\\\n!SymbolListTile methodsFor: 'customevents-accessing' stamp: 'nk 7/21/2003 22:02'!\\\\ndataType\\\\n\\\\t^dataType! !\\\\n\\\\n\\\\n!SymbolListTile methodsFor: 'customevents-initialization' stamp: 'nk 7/21/2003 22:14'!\\\\nupdateChoices\\\\n\\\\tchoices _ (Vocabulary vocabularyNamed: dataType) choices.\\\\n\\\\t(choices includes: literal) ifFalse: [ literal _ choices first. self changed ]! !\\\\n\\\\n\\\\n!SymbolListTile methodsFor: 'event handling' stamp: 'sw 12/3/2001 21:30'!\\\\nhandlesMouseDown: evt\\\\n\\\\t\\\\\\\"Answer whether the receiver handles mouse-down\\\\\\\"\\\\n\\\\n\\\\t^ true! !\\\\n\\\\n!SymbolListTile methodsFor: 'event handling' stamp: 'sw 11/16/2001 07:31'!\\\\nwantsKeyboardFocusFor: aSubmorph\\\\n\\\\t\\\\\\\"Answer whether a plain mouse click on aSubmorph, a text-edit-capable thing, should result in a text selection there\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!SymbolListTile methodsFor: 'events-processing' stamp: 'sw 12/3/2001 20:45'!\\\\nmouseDownPriority\\\\n\\\\t\\\\\\\"Higher-priority than parts donor, so that the tile can offer a popup even when it is in a larger structure, such as a PhraseTileMorph, that itself behaves as a parts donor\\\\\\\"\\\\n\\\\n\\\\t^ 75! !\\\\n\\\\n\\\\n!SymbolListTile methodsFor: 'initialization' stamp: 'sw 10/30/2000 09:04'!\\\\nchoices: choiceList dataType: aDataType\\\\n\\\\t\\\\\\\"Initialize the receiver with the given choice-list and data type\\\\\\\"\\\\n\\\\n\\\\tchoices _ choiceList.\\\\n\\\\tdataType _ aDataType.\\\\n\\\\tliteral _ choiceList first! !\\\\n\\\\n!SymbolListTile methodsFor: 'initialization' stamp: 'tak 12/6/2004 01:38'!\\\\ninitialize\\\\n\\\\tsuper initialize.\\\\n\\\\tliteral _ #nothing! !\\\\n\\\\n\\\\n!SymbolListTile methodsFor: 'misc' stamp: 'sw 11/6/2001 13:30'!\\\\nsetLiteralInitially: anObject\\\\n\\\\t\\\\\\\"Establish the initial literal.  Get the label correct, but do *not* send the value back to the target via the setter (unlike #literal:)\\\\\\\"\\\\n\\\\n\\\\tliteral _ anObject ifNotNil: [anObject asSymbol].\\\\n\\\\tself updateLiteralLabel! !\\\\n\\\\n\\\\n!SymbolListTile methodsFor: 'player viewer' stamp: 'yo 1/12/2005 14:28'!\\\\nupdateLiteralLabel\\\\n\\\\t\\\\\\\"Update the wording emblazoned on the tile, if needed.  Copied down, for jimmying, unfortunately\\\\\\\"\\\\n\\\\n\\\\t| myLabel |\\\\n\\\\t(myLabel _ self labelMorph) ifNil: [^ self].\\\\n\\\\tmyLabel useSymbolFormat.\\\\n\\\\tmyLabel acceptValue: literal asString.\\\\n\\\\tself changed.! !\\\\n\\\\n\\\\n!SymbolListTile methodsFor: 'user interface' stamp: 'yo 1/12/2005 14:38'!\\\\nacceptNewLiteral: aLiteral\\\\n\\\\t\\\\\\\"Accept the new literal\\\\\\\"\\\\n\\\\n\\\\tself labelMorph useSymbolFormat.\\\\n\\\\tself literal: aLiteral.\\\\n\\\\tself adjustHelpMessage.\\\\n\\\\tself acceptNewLiteral.  \\\\\\\"so tile scriptor can recompile if necessary\\\\\\\"\\\\n\\\\tself labelMorph informTarget\\\\n! !\\\\n\\\\n!SymbolListTile methodsFor: 'user interface' stamp: 'sw 3/10/2004 23:24'!\\\\nadjustHelpMessage\\\\n\\\\t\\\\\\\"Adjust the help message to reflect the new literal\\\\\\\"\\\\n\\\\n\\\\t(ScriptingSystem helpStringOrNilForOperator: literal) ifNotNilDo:\\\\n\\\\t\\\\t[:aString |\\\\n\\\\t\\\\t\\\\tself labelMorph setBalloonText: aString]! !\\\\n\\\\n!SymbolListTile methodsFor: 'user interface' stamp: 'sw 12/21/2003 00:07'!\\\\nchoices\\\\n\\\\t\\\\\\\"Answer the list of current choices for the receiver's symbol\\\\\\\"\\\\n\\\\n\\\\tdataType == #ScriptName ifTrue: \\\\\\\"Backward compatibility with old tiles\\\\\\\"\\\\n\\\\t\\\\t[^ ActiveWorld presenter allKnownUnaryScriptSelectors].\\\\n\\\\t^ choices! !\\\\n\\\\n!SymbolListTile methodsFor: 'user interface' stamp: 'sw 1/4/2005 00:16'!\\\\nofferAllChoicesInAPopUp\\\\n\\\\t\\\\\\\"Retained in deference to pre-existing content that may have event handlers that send this message.\\\\\\\"\\\\n\\\\n\\\\t! !\\\\n\\\\n\\\\n!SymbolListTile methodsFor: 'private' stamp: 'yo 1/12/2005 14:28'!\\\\nline1: line1\\\\n\\\\t\\\\\\\"Emblazon the receiver with the requested label.  If the receiver already has a label, make the new label be of the same class\\\\\\\"\\\\n\\\\n\\\\tsuper line1: line1.\\\\n\\\\tself labelMorph useSymbolFormat! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSymbolListTile class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SymbolListTile class methodsFor: 'customevents-updating' stamp: 'nk 7/21/2003 22:16'!\\\\nupdateAllTilesForVocabularyNamed: aVocabularyName\\\\n\\\\t\\\\\\\"The choices in the Vocabulary named aVocabularyName may have changed.\\\\n\\\\tUpdate my subinstances if necessary to reflect the changes.\\\\\\\"\\\\n\\\\n\\\\t (self allSubInstances select: [ :ea | ea dataType = aVocabularyName ])\\\\n\\\\t\\\\tdo: [ :ea | ea updateChoices ] ! !\\\\nDataType subclass: #SymbolListType\\\\n\\\\tinstanceVariableNames: 'symbols'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Protocols-Type Vocabularies'!\\\\n!SymbolListType commentStamp: 'sw 1/6/2005 17:52' prior: 0!\\\\nA type whose values range across a finite set of symbols, which are held in the \\\\\\\"symbols\\\\\\\" instance variable.!\\\\n\\\\n\\\\n!SymbolListType methodsFor: 'initial value' stamp: 'sw 12/3/2001 19:27'!\\\\ninitialValueForASlotFor: aPlayer\\\\n\\\\t\\\\\\\"Answer the value to give initially to a newly created slot of the given type in the given player\\\\\\\"\\\\n\\\\n\\\\t^ self choices first! !\\\\n\\\\n\\\\n!SymbolListType methodsFor: 'tiles' stamp: 'sw 12/3/2001 19:14'!\\\\nchoices\\\\n\\\\t\\\\\\\"answer the list of choices to offer as variant values\\\\\\\"\\\\n\\\\n\\\\t^ symbols copy! !\\\\n\\\\n!SymbolListType methodsFor: 'tiles' stamp: 'sw 1/6/2005 17:24'!\\\\nrepresentsAType\\\\n\\\\t\\\\\\\"Answer whether this vocabulary represents an end-user-sensible data type\\\\\\\"\\\\n\\\\n\\\\t^ #(BorderStyle ButtonPhase TrailStyle) includes: vocabularyName! !\\\\n\\\\n!SymbolListType methodsFor: 'tiles' stamp: 'stephaneducasse 2/4/2006 20:39'!\\\\nsymbols: symbolList\\\\n\\\\t\\\\\\\"Set the receiver's list of symbols as indicated\\\\\\\"\\\\n\\\\n\\\\tsymbols := symbolList! !\\\\n\\\\n\\\\n!SymbolListType methodsFor: '*eToys-tiles' stamp: 'sw 1/12/2005 10:13'!\\\\naffordsCoercionToBoolean\\\\n\\\\t\\\\\\\"Answer true if a tile of this data type, when dropped into a pane that demands a boolean, could plausibly be expanded into a comparison (of the form  frog < toad   or frog = toad) to provide a boolean expression\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Formerly this had been disabled (9/27/01) but from today's perspective I don't see any reason to disable it...\\\\\\\"\\\\n\\\\n\\\\t^ true! !\\\\n\\\\n!SymbolListType methodsFor: '*eToys-tiles' stamp: 'sw 12/3/2001 19:15'!\\\\ndefaultArgumentTile\\\\n\\\\t\\\\\\\"Answer a tile to represent the type\\\\\\\"\\\\n\\\\n\\\\t| aTile choices |\\\\n\\\\taTile _ SymbolListTile new choices: (choices _ self choices) dataType: self vocabularyName.\\\\n\\\\taTile addArrows.\\\\n\\\\taTile setLiteral: choices first.\\\\n\\\\t^ aTile! !\\\\n\\\\n!SymbolListType methodsFor: '*eToys-tiles' stamp: 'sw 12/3/2001 21:00'!\\\\nnewReadoutTile\\\\n\\\\t\\\\\\\"Answer a tile that can serve as a readout for data of this type\\\\\\\"\\\\n\\\\n\\\\t^ SymbolListTile new choices: self choices dataType: self vocabularyName\\\\n! !\\\\nClassTestCase subclass: #SymbolTest\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'CollectionsTests-Text'!\\\\n!SymbolTest commentStamp: '<historical>' prior: 0!\\\\nThis is the unit test for the class Symbol. Unit tests are a good way to exercise the functionality of your system in a repeatable and automatic manner. They are therefore recommended if you plan to release anything. For more information, see: \\\\n\\\\t- http://www.c2.com/cgi/wiki?UnitTest\\\\n\\\\t- http://minnow.cc.gatech.edu/squeak/1547\\\\n\\\\t- the sunit class category!\\\\n\\\\n\\\\n!SymbolTest methodsFor: 'tests' stamp: 'md 9/6/2005 20:02'!\\\\ntestAsMutator\\\\n\\\\n\\\\tself assert: #x asMutator = #x:.\\\\n\\\\tself assert: #x asMutator isSymbol! !\\\\n\\\\n!SymbolTest methodsFor: 'tests' stamp: 'sd 6/5/2005 09:29'!\\\\ntestCapitalized\\\\n\\\\n\\\\t| uc lc |\\\\t\\\\t\\\\n\\\\tuc := #MElViN.\\\\n\\\\tlc := #mElViN.\\\\n\\\\tself assert:  lc capitalized = uc.\\\\n\\\\tself assert: uc capitalized = uc.\\\\n! !\\\\n\\\\n!SymbolTest methodsFor: 'tests' stamp: 'sd 6/5/2005 09:29'!\\\\ntestWithFirstCharacterDownshifted\\\\n\\\\n\\\\t| uc lc empty |\\\\t\\\\t\\\\n\\\\tuc := #MElViN.\\\\n\\\\tlc := #mElViN.\\\\n\\\\tempty := #' '.\\\\n\\\\tself assert:  uc withFirstCharacterDownshifted = lc.\\\\n\\\\tself assert: lc withFirstCharacterDownshifted = lc.\\\\n\\\\t\\\\n! !\\\\n\\\\n\\\\n!SymbolTest methodsFor: 'as yet unclassified' stamp: 'md 2/16/2006 17:17'!\\\\ntestNumArgs2\\\\n    \\\\\\\"TODO: need to be extended to support shrinking and for selectors like #+ \\\\\\\" \\\\n\\\\t\\\\n\\\\tself assert: (#test numArgs: 0) = #test.\\\\n\\\\tself assert: (#test numArgs: 1) = #test:.\\\\n\\\\tself assert: (#test numArgs: 2) = #test:with:.\\\\n\\\\tself assert: (#test numArgs: 3) = #test:with:with:.\\\\n\\\\t\\\\n\\\\n\\\\tself assert: (#test: numArgs: 0) = #test:.\\\\n\\\\tself assert: (#test: numArgs: 1) = #test:.\\\\n\\\\tself assert: (#test: numArgs: 2) = #test:with:.\\\\n\\\\tself assert: (#test: numArgs: 3) = #test:with:with:.\\\\n\\\\t\\\\n\\\\tself assert: (#test:with: numArgs: 0) = #test:with:.\\\\n\\\\tself assert: (#test:with: numArgs: 1) = #test:with:.\\\\n\\\\tself assert: (#test:with: numArgs: 2) = #test:with:.\\\\n\\\\tself assert: (#test:with: numArgs: 3) = #test:with:with:.\\\\n\\\\tself assert: (#test:with: numArgs: 4) = #test:with:with:with:.\\\\n\\\\t\\\\n\\\\tself assert: (#test:with:with: numArgs: 0) = #test:with:with:.\\\\n\\\\tself assert: (#test:with:with: numArgs: 1) = #test:with:with:.\\\\n\\\\tself assert: (#test:with:with: numArgs: 2) = #test:with:with:.\\\\n\\\\tself assert: (#test:with:with: numArgs: 3) = #test:with:with:.\\\\n\\\\tself assert: (#test:with:with: numArgs: 4) = #test:with:with:with:.! !\\\\nObject subclass: #SyntaxAttribute\\\\n\\\\tinstanceVariableNames: 'color emphasis attributeList'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Compiler-Support'!\\\\n!SyntaxAttribute commentStamp: '<historical>' prior: 0!\\\\nRepresents a color and possibly a style attribute to be applied to a syntactic element for pretty-printing.  The attributeList inst var is a cache.!\\\\n\\\\n\\\\n!SyntaxAttribute methodsFor: 'accessing' stamp: 'sw 11/17/1999 15:04'!\\\\nattributeList\\\\n\\\\t\\\\\\\"Answer a list of text attributes that characterize the receiver\\\\\\\"\\\\n\\\\tattributeList ifNil:\\\\n\\\\t\\\\t[attributeList _ OrderedCollection new: 2.\\\\n\\\\t\\\\tcolor ifNotNil: [attributeList add: (TextColor color: color)].\\\\n\\\\t\\\\temphasis ifNotNil: [attributeList add: (TextEmphasis perform: emphasis)]].\\\\n\\\\t^ attributeList! !\\\\n\\\\n!SyntaxAttribute methodsFor: 'accessing' stamp: 'djp 11/7/1999 14:52'!\\\\ncolor\\\\n\\\\n\\\\t^ color! !\\\\n\\\\n!SyntaxAttribute methodsFor: 'accessing' stamp: 'sw 11/16/1999 16:21'!\\\\ncolor: aTextColor\\\\n\\\\tcolor _ aTextColor.\\\\n\\\\tattributeList _ nil! !\\\\n\\\\n!SyntaxAttribute methodsFor: 'accessing' stamp: 'djp 11/7/1999 14:52'!\\\\nemphasis\\\\n\\\\n\\\\t^ emphasis! !\\\\n\\\\n!SyntaxAttribute methodsFor: 'accessing' stamp: 'sw 11/16/1999 16:22'!\\\\nemphasis: aTextEmphasis\\\\n\\\\temphasis _ aTextEmphasis.\\\\n\\\\tattributeList _ nil! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSyntaxAttribute class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SyntaxAttribute class methodsFor: 'as yet unclassified' stamp: 'sw 11/16/1999 12:01'!\\\\ncolor: aColor emphasis: anEmphasis\\\\n\\\\t^ self new color: aColor; emphasis: anEmphasis; yourself! !\\\\nStringHolder subclass: #SyntaxError\\\\n\\\\tinstanceVariableNames: 'class selector category debugger doitFlag'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Tools-Debugger'!\\\\n!SyntaxError commentStamp: '<historical>' prior: 0!\\\\nI represent syntax error report for syntax errors encountered when filing in class descriptions from a non-interactive source such as an external file. As a StringHolder, the string to be viewed is the method code or expression containing the error.\\\\n\\\\nThe user may fix the error and accept the method to continue the fileIn.\\\\n!\\\\n\\\\n\\\\n!SyntaxError methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:27'!\\\\ncategory: aSymbol\\\\n\\\\t\\\\\\\"Record the message category of method being compiled. This is used when the user corrects the error and accepts.\\\\\\\"\\\\n\\\\n\\\\tcategory := aSymbol.\\\\n! !\\\\n\\\\n!SyntaxError methodsFor: 'initialization' stamp: 'sd 11/20/2005 21:30'!\\\\nsetClass: aClass code: aString debugger: aDebugger doitFlag: flag\\\\n\\\\n\\\\t| types printables badChar |\\\\n\\\\tclass := aClass.\\\\n\\\\tdebugger := aDebugger.\\\\n\\\\tselector := aClass parserClass new parseSelector: aString.\\\\n\\\\ttypes := Scanner classPool at: #TypeTable.\\\\t\\\\\\\"dictionary\\\\\\\"\\\\n\\\\tprintables := '!!@#$%&*-_=+<>{}?/\\\\\\\\,\\\\U00b7\\\\U00a3\\\\U00a2\\\\U00a7\\\\U00b6\\\\U00aa\\\\U00ba\\\\U0096\\\\U0097\\\\U0093\\\\U0091\\\\U0094\\\\U0092\\\\U0085\\\\U00da\\\\U00e6\\\\U00da\\\\U00af\\\\U00d7\\\\U00bf\\\\U00ab\\\\U00bb`~`' asSet.\\\\n\\\\tbadChar := aString detect: [:aChar | (types at: aChar asciiValue ifAbsent: [#xLetter]) == #xBinary and: [\\\\n\\\\t\\\\t\\\\t(printables includes: aChar) not]] ifNone: [nil].\\\\n\\\\tcontents := badChar \\\\n\\\\t\\\\tifNil: [aString]\\\\n\\\\t\\\\tifNotNil: ['<<<This string contains a character (ascii value ', \\\\n\\\\t\\\\t\\\\tbadChar asciiValue printString,\\\\n\\\\t\\\\t\\\\t') that is not normally used in code>>> ', aString].\\\\n\\\\tcategory ifNil: [category := aClass organization categoryOfElement: selector].\\\\n\\\\tcategory ifNil: [category := ClassOrganizer default].\\\\n\\\\tdoitFlag := flag! !\\\\n\\\\n\\\\n!SyntaxError methodsFor: 'menu' stamp: 'RAA 12/1/2000 14:24'!\\\\ndebug\\\\n\\\\t\\\\\\\"Show the stack of the process leading to this syntax editor, typically showing the stack of the compiler as called from fileIn.\\\\\\\"\\\\n\\\\n\\\\tdebugger openFullNoSuspendLabel: 'Stack of the Syntax Error'.\\\\n\\\\tSmalltalk isMorphic ifFalse: [Processor terminateActive].\\\\n! !\\\\n\\\\n!SyntaxError methodsFor: 'menu' stamp: 'jm 5/3/1998 14:22'!\\\\nlistMenu: aMenu\\\\n\\\\n\\\\t^ aMenu labels:\\\\n'proceed\\\\ndebug calling process\\\\nbrowse full'\\\\n\\\\tlines: #()\\\\n\\\\tselections: #(proceed debug browseMethodFull)\\\\n! !\\\\n\\\\n!SyntaxError methodsFor: 'menu' stamp: 'di 5/5/1998 00:06'!\\\\nproceed\\\\n\\\\t\\\\\\\"The user has has edited and presumably fixed the syntax error and the filein can now proceed.\\\\\\\"\\\\n\\\\n\\\\tdebugger proceed: self topView.\\\\n! !\\\\n\\\\n\\\\n!SyntaxError methodsFor: 'message list' stamp: 'tk 4/19/1999 08:08'!\\\\nlist\\\\n\\\\t\\\\\\\"Answer an array of one element made up of the class name, message category, and message selector in which the syntax error was found. This is the single item in the message list of a view/browser on the receiver.\\\\\\\"\\\\n\\\\n\\\\tselector ifNil: [^ Array with: (class name, '  ', category, '  ', '<none>')].\\\\n\\\\t^ Array with: (class name, '  ', category, '  ', selector)\\\\n! !\\\\n\\\\n!SyntaxError methodsFor: 'message list' stamp: 'jm 5/3/1998 13:48'!\\\\nlistIndex\\\\n\\\\t\\\\\\\"There is always exactly one element in my list and it is always selected.\\\\\\\"\\\\n\\\\n\\\\t^ 1\\\\n! !\\\\n\\\\n\\\\n!SyntaxError methodsFor: 'other' stamp: 'di 10/9/1998 16:36'!\\\\ncontents: aString notifying: aController\\\\n\\\\t\\\\\\\"Compile the code in aString and notify aController of any errors. If there are no errors, then automatically proceed.\\\\\\\"\\\\n\\\\n\\\\tdoitFlag\\\\n\\\\tifTrue: [Compiler new evaluate: aString in: nil to: nil\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnotifying: aController ifFail: [^ false]]\\\\n\\\\tifFalse: [(class compile: aString classified: category\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnotifying: aController) ifNil: [^ false]].\\\\n\\\\n\\\\taController hasUnacceptedEdits: false.\\\\n\\\\tself proceed! !\\\\n\\\\n!SyntaxError methodsFor: 'other' stamp: 'sd 11/20/2005 21:27'!\\\\nnotify: error at: location in: source\\\\n\\\\t\\\\\\\"Open a syntax error view, inserting the given error message into the given source at the given location. This message is sent to the 'requestor' when the parser or compiler finds a syntax error.\\\\\\\"\\\\n\\\\n\\\\t| aClass aString |\\\\n\\\\taClass := thisContext sender receiver encoder classEncoding.\\\\n\\\\taString :=\\\\n\\\\t\\\\tsource contents\\\\n\\\\t\\\\t\\\\tcopyReplaceFrom: location\\\\n\\\\t\\\\t\\\\tto: location - 1\\\\n\\\\t\\\\t\\\\twith: error.\\\\n\\\\tself setClass: aClass\\\\n\\\\t\\\\tcode: aString\\\\n\\\\t\\\\tdebugger: (Debugger context: thisContext)\\\\n\\\\t\\\\tdoitFlag: false.\\\\n\\\\tself class open: self.\\\\n! !\\\\n\\\\n\\\\n!SyntaxError methodsFor: 'text menu support' stamp: 'jm 5/3/1998 14:15'!\\\\nselectedClass\\\\n\\\\t\\\\\\\"Answer the class in which the syntax error occurred.\\\\\\\"\\\\n\\\\n\\\\t^ class\\\\n! !\\\\n\\\\n!SyntaxError methodsFor: 'text menu support' stamp: 'jm 5/3/1998 14:33'!\\\\nselectedClassOrMetaClass\\\\n\\\\t\\\\\\\"Answer the class of the method being compiled.\\\\\\\"\\\\n\\\\n\\\\t^ class\\\\n! !\\\\n\\\\n!SyntaxError methodsFor: 'text menu support' stamp: 'jm 5/3/1998 14:17'!\\\\nselectedMessageName\\\\n\\\\t\\\\\\\"Answer the selector of the method being compiled.\\\\\\\"\\\\n\\\\n\\\\t^ selector\\\\n! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSyntaxError class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SyntaxError class methodsFor: 'instance creation' stamp: 'sd 11/20/2005 21:28'!\\\\nbuildMVCViewOn: aSyntaxError\\\\n\\\\t\\\\\\\"Answer an MVC view on the given SyntaxError.\\\\\\\"\\\\n\\\\n\\\\t| topView aListView aCodeView |\\\\n\\\\ttopView := StandardSystemView new\\\\n\\\\t\\\\tmodel: aSyntaxError;\\\\n\\\\t\\\\tlabel: 'Syntax Error';\\\\n\\\\t\\\\tminimumSize: 380@220.\\\\n\\\\n\\\\taListView := PluggableListView on: aSyntaxError\\\\n\\\\t\\\\tlist: #list\\\\n\\\\t\\\\tselected: #listIndex\\\\n\\\\t\\\\tchangeSelected: nil\\\\n\\\\t\\\\tmenu: #listMenu:.\\\\n\\\\taListView window: (0@0 extent: 380@20).\\\\n\\\\ttopView addSubView: aListView.\\\\n\\\\n\\\\taCodeView := PluggableTextView on: aSyntaxError\\\\n\\\\t\\\\ttext: #contents\\\\n\\\\t\\\\taccept: #contents:notifying:\\\\n\\\\t\\\\treadSelection: #contentsSelection\\\\n\\\\t\\\\tmenu: #codePaneMenu:shifted:.\\\\n\\\\taCodeView window: (0@0 extent: 380@200).\\\\n\\\\ttopView addSubView: aCodeView below: aListView.\\\\n\\\\n\\\\t^ topView\\\\n! !\\\\n\\\\n!SyntaxError class methodsFor: 'instance creation' stamp: 'sd 11/20/2005 21:28'!\\\\nbuildMorphicViewOn: aSyntaxError\\\\n\\\\t\\\\\\\"Answer an Morphic view on the given SyntaxError.\\\\\\\"\\\\n\\\\t| window |\\\\n\\\\twindow := (SystemWindow labelled: 'Syntax Error') model: aSyntaxError.\\\\n\\\\n\\\\twindow addMorph: (PluggableListMorph on: aSyntaxError list: #list\\\\n\\\\t\\\\t\\\\tselected: #listIndex changeSelected: nil menu: #listMenu:)\\\\n\\\\t\\\\tframe: (0@0 corner: 1@0.15).\\\\n\\\\n\\\\twindow addMorph: (PluggableTextMorph on: aSyntaxError text: #contents\\\\n\\\\t\\\\t\\\\taccept: #contents:notifying: readSelection: #contentsSelection\\\\n\\\\t\\\\t\\\\tmenu: #codePaneMenu:shifted:)\\\\n\\\\t\\\\tframe: (0@0.15 corner: 1@1).\\\\n\\\\n\\\\t^ window openInWorldExtent: 380@220! !\\\\n\\\\n!SyntaxError class methodsFor: 'instance creation' stamp: 'di 9/14/2001 07:46'!\\\\nerrorInClass: aClass withCode: codeString doitFlag: doit\\\\n\\\\t\\\\\\\"Open a view whose model is a syntax error. The error occurred when trying to add the given method code to the given class.\\\\\\\"\\\\n\\\\n\\\\tself open:\\\\n\\\\t\\\\t(self new setClass: aClass\\\\n\\\\t\\\\t\\\\tcode: codeString\\\\n\\\\t\\\\t\\\\tdebugger: (Debugger context: thisContext)\\\\n\\\\t\\\\t\\\\tdoitFlag: doit).\\\\n! !\\\\n\\\\n!SyntaxError class methodsFor: 'instance creation' stamp: 'sd 11/20/2005 21:28'!\\\\nopen: aSyntaxError\\\\n\\\\t\\\\\\\"Answer a standard system view whose model is an instance of me.\\\\\\\"\\\\n\\\\t| topView |\\\\n\\\\t<primitive: 19> \\\\\\\"Simulation guard\\\\\\\"\\\\n\\\\tSmalltalk isMorphic\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[self buildMorphicViewOn: aSyntaxError.\\\\n\\\\t\\\\t\\\\tProject spawnNewProcessIfThisIsUI: Processor activeProcess.\\\\n\\\\t\\\\t\\\\t^ Processor activeProcess suspend].\\\\n\\\\ttopView := self buildMVCViewOn: aSyntaxError.\\\\n\\\\ttopView controller openNoTerminateDisplayAt: Display extent // 2.\\\\n\\\\tCursor normal show.\\\\n\\\\tProcessor activeProcess suspend.\\\\n! !\\\\nNotification subclass: #SyntaxErrorNotification\\\\n\\\\tinstanceVariableNames: 'inClass code category doitFlag'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Exceptions-Extensions'!\\\\n\\\\n!SyntaxErrorNotification methodsFor: 'accessing' stamp: 'ar 9/27/2005 19:17'!\\\\ncategory\\\\n\\\\t^category! !\\\\n\\\\n!SyntaxErrorNotification methodsFor: 'accessing' stamp: 'ar 9/27/2005 19:11'!\\\\ndoitFlag\\\\n\\\\t^doitFlag! !\\\\n\\\\n!SyntaxErrorNotification methodsFor: 'accessing' stamp: 'ar 9/27/2005 19:10'!\\\\nerrorClass\\\\n\\\\t^inClass! !\\\\n\\\\n!SyntaxErrorNotification methodsFor: 'accessing' stamp: 'ar 9/27/2005 19:10'!\\\\nerrorCode\\\\n\\\\t^code! !\\\\n\\\\n!SyntaxErrorNotification methodsFor: 'accessing' stamp: 'ar 9/27/2005 19:14'!\\\\nmessageText\\\\n\\\\t^ super messageText\\\\n\\\\t\\\\tifNil: [messageText := code]! !\\\\n\\\\n!SyntaxErrorNotification methodsFor: 'accessing' stamp: 'ar 9/27/2005 19:15'!\\\\nsetClass: aClass category: aCategory code: codeString doitFlag: aBoolean\\\\n\\\\tinClass := aClass.\\\\n\\\\tcategory := aCategory.\\\\n\\\\tcode := codeString.\\\\n\\\\tdoitFlag := aBoolean ! !\\\\n\\\\n\\\\n!SyntaxErrorNotification methodsFor: 'exceptionDescription' stamp: 'ar 9/27/2005 19:13'!\\\\ndefaultAction\\\\n\\\\t^ToolSet debugSyntaxError: self! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSyntaxErrorNotification class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SyntaxErrorNotification class methodsFor: 'exceptionInstantiator' stamp: 'ar 9/27/2005 19:15'!\\\\ninClass: aClass category: aCategory withCode: codeString doitFlag: doitFlag \\\\n\\\\t^ (self new\\\\n\\\\t\\\\tsetClass: aClass\\\\n\\\\t\\\\tcategory: aCategory \\\\n\\\\t\\\\tcode: codeString\\\\n\\\\t\\\\tdoitFlag: doitFlag) signal! !\\\\nAlignmentMorph subclass: #SyntaxMorph\\\\n\\\\tinstanceVariableNames: 'parseNode markerMorph'\\\\n\\\\tclassVariableNames: 'AllSpecs ContrastFactor DownRightArrow SelfTile SizeScaleFactor'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'EToys-Tile Scriptors'!\\\\n!SyntaxMorph commentStamp: '<historical>' prior: 0!\\\\nA single class of morph that holds any piece of Smalltalk syntax, and allows it to be a tile.  Tiles can be dragged in or out of a method. \\\\n\\\\nIn the message list pane of a Browser, choose 'tile scriptor'.  Bring up a second one to steal parts from.  If you use a Protocol Browser, and choose tiles, there will be two buttons that bring up menus with many tiles on them.\\\\n\\\\nClicking multiple times selects enclosing phrases of code.  Dragging lets you take away a copy.  Any tile may be replaced by dropping on it.  Shift-click to edit the text of any tile.  Change variable and message names, but do not change the part-of-speech (objects to selector).\\\\n\\\\nEach SyntaxMorph holds a ParseNode.  After editing, the parseNode is only good as a part-of-speech indicator.  Only the Class of a parseNode is important.  It's state is not kept up to date with the tile edits (but maybe it should be).  (For MessageNodes, whether the receiver slot is nil is significant.)\\\\n\\\\nThe correspondence between SyntaxMorphs and parseNodes in the real parse tree is not one-to-one.  Several extra levels of SyntaxMorph were added as aligners to make the horizontal and vertical layout right.  These sometimes have nil for the parseNode.\\\\n\\\\nWhen accept the method, we pass over the tree of SyntaxMorphs, gathering their printStrings and inserting punctuation.  See (SyntaxMorph>>printOn:indent:).  We send the result to the compiler.  (We do not use the parse tree we already have.)\\\\n\\\\nTo turn on type checking: \\\\nPreferences enable: #eToyFriendly\\\\nor for testing:     World project projectParameters at: #fullCheck put: true.\\\\n\\\\nColors of tiles:  Each tile has a current color (inst car color) and a deselectedColor (a property).  The deselectedColor may be governed by the part of speech, or not.  (translateColor: is only used when a tile is created, to set deselectedColor.)  From deselectedColor (set by #setDeselectedColor), the color changes to:\\\\n\\\\tlightBrown when selected (not the submorphs) in #select\\\\n\\\\ttranslucent when held in the hand (allMorphs) in #lookTranslucent\\\\n\\\\tgreen when a drop target (allMorphs) (change the owners back) #dropColor, \\\\n\\\\t\\\\t#trackDropZones \\\\ndeselectedColor is moderated by the darkness setting, #scaleColorByUserPref:.  (as it is put into color in #color:)\\\\n\\\\nCode to produce an individual tile is: \\\\n\\\\t(SyntaxMorph new) attachTileForCode: '''abc''' nodeType: LiteralNode.\\\\nsee offerTilesMenuFor:in: for many other phrases that produce useful tiles.\\\\n\\\\nAssignmentNode:  If three submorphs, is a statement, and is a noun.  If one submorph, is just the left arrow.  When dropped on a variable, it creates a new assignment statement. !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'tk 8/21/2001 09:36'!\\\\nactualObject\\\\n\\\\t| sub |\\\\n\\\\t\\\\\\\"Who is self in these tiles?  Usually a Player.\\\\\\\"\\\\n\\\\n\\\\n\\\\t(self nodeClassIs: LiteralVariableNode) ifTrue: [\\\\n\\\\t\\\\t(sub _ self findA: StringMorph) ifNil: [^ nil].\\\\n\\\\t\\\\t\\\\\\\"Need to decompile here for odd synonyms of 'self' ?\\\\\\\"\\\\n\\\\t\\\\t^ Compiler evaluate: sub contents for: Player logged: false].\\\\n\\\\n\\\\t(self nodeClassIs: VariableNode) ifTrue: [\\\\n\\\\t\\\\t(sub _ self findA: StringMorph) ifNil: [^ nil].\\\\n\\\\t\\\\t^ References at: (self cleanUpString: sub) asSymbol ifAbsent: [nil]].\\\\n\\\\n\\\\t(self nodeClassIs: LiteralNode) ifTrue: [\\\\n\\\\t\\\\t(sub _ self findA: StringMorph) ifNil: [^ nil].\\\\n\\\\t\\\\t^ Compiler evaluate: sub contents for: nil logged: false].\\\\n\\\\n\\\\t(sub _ self findA: SyntaxMorph) ifNil: [^ nil].\\\\n\\\\t^ sub actualObject\\\\t\\\\\\\"receiver\\\\\\\"! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'tk 9/20/2001 13:21'!\\\\nargumentNodes\\\\n\\\\t\\\\\\\"Return a collection of this message's argument nodes.  \\\\\\\"\\\\n\\\\n\\\\t| cls coll rec |\\\\n\\\\tparseNode ifNil: [^ #()].\\\\n\\\\tcls _ parseNode class.\\\\n\\\\tcls == SelectorNode ifTrue: [^ #()].\\\\n\\\\tcls == KeyWordNode ifTrue: [^ #()].\\\\n\\\\n\\\\tcoll _ OrderedCollection new.\\\\n\\\\trec _ self receiverNode.\\\\n\\\\tsubmorphs do: [:sub | \\\\n\\\\t\\\\t(sub isSyntaxMorph and: [sub ~~ rec]) ifTrue: [\\\\n\\\\t\\\\t\\\\tsub isNoun ifTrue: [coll addLast: sub]\\\\t\\\\\\\"complete arg\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [coll _ coll, sub argumentNodes]]].\\\\t\\\\\\\"MessagePartNode, MessageNode with no receiver\\\\\\\"\\\\n\\\\t^ coll! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'RAA 8/24/1999 17:57'!\\\\nballoonText\\\\n\\\\n\\\\t^(('Value: ',(self getCurrentValue ifNil: [^nil])) \\\\n\\\\t\\\\twithNoLineLongerThan: 35) truncateWithElipsisTo: 300! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'di 12/13/2000 15:25'!\\\\nborderColor: colorOrSymbolOrNil\\\\n\\\\n\\\\tborderColor = colorOrSymbolOrNil ifFalse: [\\\\n\\\\t\\\\tborderColor _ colorOrSymbolOrNil.\\\\n\\\\t\\\\tself bounds area < 40000\\\\n\\\\t\\\\t\\\\tifTrue: [self invalidRect: self bounds]\\\\n\\\\t\\\\t\\\\tifFalse: [(self bounds areasOutside: (self bounds insetBy: self borderWidth))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:r | self invalidRect: r]]].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'RAA 4/4/2001 12:36'!\\\\ncleanUpString: stringSubMorph\\\\n\\\\n\\\\t| style rawData |\\\\n\\\\t^ stringSubMorph \\\\n\\\\t\\\\tvalueOfProperty: #syntacticallyCorrectContents \\\\n\\\\t\\\\tifAbsent: [\\\\n\\\\t\\\\t\\\\tstyle _ stringSubMorph valueOfProperty: #syntacticReformatting.\\\\n\\\\t\\\\t\\\\trawData _ stringSubMorph contents.\\\\n\\\\t\\\\t\\\\t (#(unary tempVariableDeclaration blockarg2 methodHeader1 tempVariable variable) includes: style) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\trawData _ self unSpaceAndUpShift: rawData appending: nil.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\tstyle == #keywordGetz ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\trawData _ self unSpaceAndUpShift: rawData appending: 'Getz:'.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\tstyle == #keywordSetter ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\trawData _ self unSpaceAndUpShift: 'set ',rawData appending: ':'.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\tstyle == #unaryGetter ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\trawData _ self unSpaceAndUpShift: 'get ',rawData appending: nil.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\t(#(keyword2 methodHeader2) includes: style)  ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\trawData _ self unSpaceAndUpShift: rawData appending: ':'.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\trawData\\\\n\\\\t\\\\t]\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'tk 7/19/2001 20:04'!\\\\ncolor: aColorOrSymbol\\\\n\\\\n\\\\t| deselectedColor cc |\\\\n\\\\taColorOrSymbol isColor ifTrue: [\\\\n\\\\t\\\\tself valueOfProperty: #deselectedColor ifAbsent: [\\\\\\\"record my color the first time\\\\\\\"\\\\n\\\\t\\\\t\\\\tself setProperty: #deselectedColor toValue: aColorOrSymbol.\\\\n\\\\t\\\\t\\\\t^ super color: (self scaleColorByUserPref: aColorOrSymbol)].\\\\n\\\\t\\\\t^ super color: aColorOrSymbol].\\\\n\\\\n\\\\tdeselectedColor _ self valueOfProperty: #deselectedColor ifAbsent: [nil].\\\\n\\\\tdeselectedColor ifNotNil: [^ super color: (self scaleColorByUserPref: deselectedColor)].\\\\n\\\\n\\\\taColorOrSymbol == #comment  ifTrue: [^ self color: Color blue lighter].\\\\n\\\\tSyntaxMorph noTileColor ifTrue: [\\\\t\\\\\\\"override\\\\\\\"\\\\n\\\\t\\\\t^ self color: Color transparent].\\\\t\\\\\\\"Fix this to be real color!!\\\\\\\"\\\\n\\\\n\\\\t(cc _ self class translateColor: aColorOrSymbol) isColor\\\\n\\\\t\\\\tifTrue: [^ self color: cc]\\\\n\\\\t\\\\tifFalse: [Transcript show: aColorOrSymbol, ' needs to be handled in translateColor:'; cr.\\\\n\\\\t\\\\t\\\\t^ self color: Color transparent].\\\\t\\\\\\\"help!!\\\\\\\"! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'tk 9/20/2001 12:43'!\\\\ndissectMessage\\\\n\\\\t\\\\\\\"I am a MessageNode.  Return {receiverNode or nil, selector, (keyword nodes), (argument nodes)}.  Ignore all spacing morphs.\\\\\\\"\\\\n\\\\n\\\\t! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'sw 2/3/2001 01:40'!\\\\neditor\\\\n\\\\t\\\\\\\"In parallel with the interface for text morphs, we respond to this, but in our case we are our own editor\\\\\\\"\\\\n\\\\n\\\\t^ self! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'tk 9/19/2001 15:39'!\\\\nenclosingPane\\\\n\\\\t\\\\\\\"The object that owns this script layout\\\\\\\"\\\\n\\\\n\\\\t| oo higher |\\\\n\\\\too _ self owner.\\\\n\\\\t[higher _ oo isSyntaxMorph.\\\\n\\\\thigher _ higher or: [oo class == TransformMorph].\\\\n\\\\thigher _ higher or: [oo class == TwoWayScrollPane].\\\\n\\\\thigher ifFalse: [^ oo].\\\\n\\\\thigher] whileTrue: [oo _ oo owner].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'tk 9/7/2001 16:13'!\\\\ngetCurrentValue\\\\n\\\\n\\\\tparseNode ifNil: [^nil].\\\\n\\\\tparseNode class == Symbol ifTrue: [^nil].\\\\t\\\\\\\"special\\\\\\\"\\\\n\\\\t^parseNode currentValueIn: self hostContext! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'dgd 2/22/2003 18:48'!\\\\nmessageNode\\\\n\\\\t\\\\\\\"Return the enclosing messageNode that is the full message.  It has a receiver.\\\\\\\"\\\\n\\\\n\\\\t^self orOwnerSuchThat: [:oo | oo receiverNode notNil]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'RAA 8/15/1999 16:23'!\\\\nparseNode\\\\n\\\\t\\\\n\\\\t^parseNode\\\\n\\\\t\\\\t\\\\n\\\\t! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'RAA 8/15/1999 16:11'!\\\\nparseNode: x\\\\n\\\\t\\\\n\\\\tparseNode _ x\\\\n\\\\t\\\\t\\\\n\\\\t! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'di 11/17/2000 08:07'!\\\\nparsedInClass\\\\n\\\\n\\\\t^ self rootTile parseNode encoder classEncoding! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'tk 11/15/2000 14:39'!\\\\nparsedInClass: x\\\\n\\\\n\\\\tself parsedInClass == x ifFalse: [self error: 'inconsistent value']! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'tk 9/25/2001 11:28'!\\\\nreadOut\\\\n\\\\t\\\\\\\"Find and return an UpdatingStringMorph, possibly in a NumericReadoutTile\\\\\\\"\\\\n\\\\n\\\\t^ ((self findA: NumericReadoutTile) ifNil: [^ nil]) findA: UpdatingStringMorph! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'tk 7/23/2001 18:04'!\\\\nreceiverNode\\\\n\\\\t\\\\\\\"If I am (have) a MessageNode, return the node of the receiver.  Watch out for foolish noise words.\\\\\\\"\\\\n\\\\n\\\\tparseNode class == MessageNode ifFalse: [^ nil].\\\\n\\\\tparseNode receiver ifNil: [^ nil].\\\\n\\\\tsubmorphs do: [:ss | \\\\n\\\\t\\\\tss isSyntaxMorph ifTrue: [\\\\n\\\\t\\\\t\\\\tss parseNode ifNotNil: [\\\\\\\"not noise word\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tss isNoun ifTrue: [^ ss] \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [^ nil \\\\\\\"found selector\\\\\\\"]]]].\\\\n\\\\t^ nil! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'tk 9/23/2001 00:27'!\\\\nreceiverObject\\\\n\\\\t\\\\\\\"Return some object that could be the receiver to me (a selector).  Either the actual object who is the receiver in this message, or a guy of the right class.\\\\\\\"\\\\n\\\\n\\\\t| rec value mm |\\\\n\\\\t(rec _ owner) isSyntaxMorph ifFalse: [^ nil].\\\\n\\\\trec _ rec receiverNode.\\\\n\\\\trec ifNil: [(rec _ owner owner) isSyntaxMorph ifFalse: [^ nil].\\\\n\\\\t\\\\t\\\\t\\\\trec _ rec receiverNode].\\\\t\\\\n\\\\trec ifNil: [(rec _ owner owner owner) isSyntaxMorph ifFalse: [^ nil].\\\\n\\\\t\\\\t\\\\t\\\\trec _ rec receiverNode].\\\\n\\\\trec isSelfTile ifTrue: [\\\\n\\\\t\\\\t^ ((mm _ self containingWindow model) respondsTo: #targetObject) \\\\n\\\\t\\\\t\\\\tifTrue: [mm targetObject]\\\\n\\\\t\\\\t\\\\tifFalse: [mm selectedClassOrMetaClass new]].\\\\n\\\\tvalue _ rec ifNotNil: [rec try].\\\\n\\\\tvalue class == Error ifTrue: [\\\\n\\\\t\\\\tvalue _ Vocabulary instanceWhoRespondsTo: self selector].\\\\n\\\\t^ value! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'tk 1/13/2001 20:08'!\\\\nrename: newSelector\\\\n\\\\t| keywords mainSel list last |\\\\n\\\\t\\\\\\\"Attempt to change the name as listed in my tiles.  Can change the number of argumtents.  MethodNode (SelectorNode (SelectorNode (string))) or MethodNode (SelectorNode (SelectorNode (string) TempVarNode() SelectorNode (string) TempVarNode()))\\\\\\\"\\\\n\\\\n\\\\tself isMethodNode ifFalse: [\\\\n\\\\t\\\\tself rootTile == self ifTrue: [^ self].  \\\\\\\"not in a script\\\\\\\"\\\\n\\\\t\\\\t^ self rootTile rename: newSelector  \\\\\\\"always do at the root\\\\\\\"].\\\\n\\\\n\\\\tkeywords _ newSelector keywords.\\\\n\\\\tmainSel _ self findA: SelectorNode.\\\\n\\\\tlist _ mainSel submorphs select: [:mm | \\\\n\\\\t\\\\tmm isSyntaxMorph and: [mm parseNode class == SelectorNode]].\\\\n\\\\t1 to: (list size min: keywords size) do: [:ind |\\\\n\\\\t\\\\t((list at: ind) findA: UpdatingStringMorph) contents: (keywords at: ind)].\\\\n\\\\tkeywords size + 1 to: list size do: [:ind | \\\\\\\"removing keywords\\\\\\\"\\\\n\\\\t\\\\t[last _ mainSel submorphs last.\\\\n\\\\t\\\\t (last isSyntaxMorph and: [last parseNode class == TempVariableNode])] whileFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tlast delete].\\\\n\\\\t\\\\t[last _ mainSel submorphs last.\\\\n\\\\t\\\\t (last isSyntaxMorph and: [last parseNode class == SelectorNode])] whileFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tlast delete].\\\\t\\\\\\\"the TempVariableNode and others\\\\\\\"\\\\n\\\\t\\\\tmainSel submorphs last delete.\\\\t\\\\\\\"the SelectorNode\\\\\\\"\\\\n\\\\t\\\\t].\\\\n\\\\tlist size + 1 to: keywords size do: [:ind | \\\\\\\"adding keywords\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"add a SelectorNode, add a spacer, add a TempVarNode\\\\\\\"\\\\n\\\\t\\\\tmainSel addToken: (keywords at: ind) type: #keyword1 \\\\n\\\\t\\\\t\\\\ton: (SelectorNode new key: (keywords at: ind) code: nil).\\\\n\\\\t\\\\tmainSel addMorphBack: (mainSel transparentSpacerOfSize: 4@4).\\\\n\\\\t\\\\t(TempVariableNode new name: 'arg', ind printString index: ind type: nil scope: nil)\\\\n\\\\t\\\\t\\\\t asMorphicSyntaxIn: mainSel].! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'dgd 2/22/2003 13:41'!\\\\nselector\\\\n\\\\t\\\\\\\"Find the selector I represent, or have inside of me.  My parseNode is a SelectorNode or a MessageNode.\\\\\\\"\\\\n\\\\n\\\\t| sel cnt |\\\\n\\\\tparseNode class == SelectorNode \\\\n\\\\t\\\\tifTrue: [^self decompile asString asSymbol].\\\\n\\\\tparseNode class == KeyWordNode ifTrue: [^self decompile asString asSymbol].\\\\n\\\\tparseNode class == MessageNode | (parseNode class == MessagePartNode) \\\\n\\\\t\\\\tifFalse: [^nil].\\\\n\\\\t\\\\\\\"Must be one of those to have a selector\\\\\\\"\\\\n\\\\t\\\\\\\"Beware of messageParts.  If MessagePartNode, only returns this one keyword.\\\\\\\"\\\\n\\\\tsel := ''.\\\\n\\\\tcnt := 0.\\\\n\\\\tsubmorphs do: \\\\n\\\\t\\\\t\\\\t[:mm | \\\\n\\\\t\\\\t\\\\tmm isSyntaxMorph \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[cnt := cnt + 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(mm nodeClassIs: SelectorNode) ifTrue: [^mm selector].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(mm nodeClassIs: MessagePartNode) ifTrue: [sel := sel , mm selector].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(mm nodeClassIs: KeyWordNode) ifTrue: [sel := sel , mm decompile asString].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(mm nodeClassIs: ReturnNode) ifTrue: [cnt := cnt - 1].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(mm nodeClassIs: MessageNode) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[parseNode receiver ifNil: [sel := mm selector].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcnt = 2 & (sel isEmpty) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"not the receiver.  Selector and arg\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsel := mm selector]]]].\\\\n\\\\tsel ifNil: [^nil].\\\\n\\\\tsel notEmpty ifTrue: [^sel asSymbol].\\\\n\\\\t^nil! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'aoy 2/15/2003 21:31'!\\\\nunSpaceAndUpShift: aString appending: extraChars \\\\n\\\\t| answer upShiftNext |\\\\n\\\\tanswer := WriteStream on: String new.\\\\n\\\\tupShiftNext := false.\\\\n\\\\taString do: \\\\n\\\\t\\\\t\\\\t[:ch | \\\\n\\\\t\\\\t\\\\tupShiftNext :=( ch == Character space) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [ true]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[answer nextPut: (upShiftNext ifTrue: [ch asUppercase] ifFalse: [ch]).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t false]].\\\\n\\\\tanswer := answer contents.\\\\n\\\\textraChars isEmptyOrNil ifTrue: [^answer].\\\\n\\\\t(answer endsWith: extraChars) ifFalse: [answer := answer , extraChars].\\\\n\\\\t^answer! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'tk 11/12/2000 14:42'!\\\\nuserScriptSelector\\\\n\\\\t\\\\\\\"user wrote this script\\\\\\\"\\\\n\\\\n\\\\t^ self valueOfProperty: #userScriptSelector! !\\\\n\\\\n!SyntaxMorph methodsFor: 'accessing' stamp: 'tk 11/12/2000 14:41'!\\\\nuserScriptSelector: sel\\\\n\\\\t\\\\\\\"user wrote this script\\\\\\\"\\\\n\\\\n\\\\tself setProperty: #userScriptSelector toValue: sel.! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/26/2001 16:03'!\\\\naSimpleStringMorphWith: aString\\\\n\\\\n\\\\tself alansTest1 ifTrue: [\\\\n\\\\t\\\\t^StringMorph contents: aString font: self alansCurrentFontPreference\\\\n\\\\t].\\\\n\\\\n\\\\t^StringMorph contents: aString! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/26/2001 23:24'!\\\\nalansCurrentFontPreference\\\\n\\\\n\\\\t^nil\\\\t\\\\t\\\\\\\"StrikeFont familyName: 'ComicBold' size: 16\\\\\\\"! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/26/2001 13:38'!\\\\nalansTemplateStyleFor: key\\\\n\\\\n\\\\t(#(ifTrue: ifFalse: ifTrue:ifFalse: ifFalse:ifTrue:) includes: key) ifTrue: [^1].\\\\n\\\\t(#(do: collect:) includes: key) ifTrue: [^2].\\\\n\\\\t(#(if:do:) includes: key) ifTrue: [^3].\\\\n\\\\t^0\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/28/2001 13:46'!\\\\nanUpdatingStringMorphWith: aString special: aBoolean\\\\n\\\\n\\\\tself alansTest1 ifTrue: [\\\\n\\\\t\\\\t^(aBoolean ifTrue: [SyntaxUpdatingStringMorph] ifFalse: [UpdatingStringMorph])\\\\n\\\\t\\\\t\\\\t contents: aString\\\\n\\\\t\\\\t\\\\tfont: self alansCurrentFontPreference\\\\n\\\\t].\\\\n\\\\t^UpdatingStringMorph contents: aString! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/26/2001 13:39'!\\\\nconstructSelfVariant: receiver and: key\\\\n\\\\n\\\\t| wordy |\\\\n\\\\t(receiver isKindOf: VariableNode) ifFalse: [^nil].\\\\n\\\\treceiver name = 'self'  ifFalse: [^nil].\\\\n\\\\t(wordy _ self translateFromWordySelfVariant: key) ifNil: [^nil].\\\\n\\\\t^wordy\\\\n\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/26/2001 23:20'!\\\\ndarkerColor\\\\n\\\\n\\\\t^(Color r: 1.0 g: 0.839 b: 0.613)\\\\t\\\\\\\"Color lightBrown lighter lighter.\\\\\\\"\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/26/2001 23:23'!\\\\nfontToUseForSpecialWord: aString\\\\n\\\\n\\\\t^(#('Yes' 'No' 'Test') includes: aString) ifTrue: [\\\\n\\\\t\\\\t(StrikeFont familyName: 'Helvetica' size: 14)\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tnil\\\\t\\\\\\\"(StrikeFont familyName: 'ComicBold' size: 16)\\\\\\\"\\\\n\\\\t]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/28/2001 09:35'!\\\\nlighterColor\\\\n\\\\n\\\\t^Color gray: 0.9\\\\t\\\\t\\\\n\\\\\\\"(Color r: 0.935 g: 0.935 b: 0.935)\\\\\\\"\\\\n\\\\\\\"paleGreen lighter\\\\\\\"\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'tk 8/7/2001 23:15'!\\\\nnoiseBeforeBlockArg\\\\n\\\\n\\\\t^ self alansTest1 ifTrue: [' Use'] ifFalse: [' from']! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 3/25/2001 17:16'!\\\\nnoiseStringMorph: aNoiseString\\\\n\\\\n\\\\t| sMorph |\\\\n\\\\n\\\\tsMorph _ self aSimpleStringMorphWith: aNoiseString.\\\\n\\\\tsMorph \\\\n\\\\t\\\\tfont: (self fontToUseForSpecialWord: aNoiseString); \\\\n\\\\t\\\\tsetProperty: #noiseWord toValue: true.\\\\n\\\\n\\\\t^sMorph\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'tk 8/7/2001 23:12'!\\\\nnoiseWordBeforeVariableNode: aNode string: aString\\\\n\\\\n\\\\t(#('self' 'nil') includes: aString) ifFalse: [\\\\n\\\\t\\\\taNode code ifNil: [^'my'].\\\\n\\\\t\\\\taNode type < 4 ifTrue: [^'my']\\\\n\\\\t].\\\\n\\\\t^nil! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/26/2001 22:50'!\\\\nsetConditionalPartStyle\\\\n\\\\n\\\\tself specialColor: self lighterColor andBorder: self darkerColor.\\\\n\\\\tself useRoundedCorners.\\\\n\\\\tself borderWidth: 1.\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/27/2001 07:34'!\\\\nsetSpecialOuterTestFormat\\\\n\\\\n\\\\tself \\\\n\\\\t\\\\tspecialColor: self darkerColor \\\\n\\\\t\\\\tandBorder: self lighterColor.\\\\n\\\\tself useRoundedCorners.\\\\n\\\\tself layoutInset: 1.\\\\n\\\\t\\\\\\\"self setProperty: #variableInsetSize toValue: 6.\\\\\\\"\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/26/2001 22:50'!\\\\nsetSpecialTempDeclarationFormat1\\\\n\\\\n\\\\t\\\\\\\"the outer template for temp defs\\\\\\\"\\\\n\\\\n\\\\tself \\\\n\\\\t\\\\tspecialColor: self darkerColor \\\\n\\\\t\\\\tandBorder: self lighterColor.\\\\n\\\\t\\\\\\\"self \\\\n\\\\t\\\\tspecialColor: (Color lightYellow) \\\\n\\\\t\\\\tandBorder: (Color r: 0.581 g: 0.774 b: 0.903).\\\\\\\"\\\\n\\\\tself useRoundedCorners.\\\\n\\\\tself layoutInset: 1.\\\\n\\\\tself cellPositioning: #center.\\\\n\\\\t\\\\\\\"self setProperty: #variableInsetSize toValue: 6.\\\\\\\"\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/26/2001 22:50'!\\\\nsetSpecialTempDeclarationFormat2\\\\n\\\\n\\\\t\\\\\\\"the inner template for temp defs\\\\\\\"\\\\n\\\\n\\\\tself \\\\n\\\\t\\\\tspecialColor: self lighterColor \\\\n\\\\t\\\\tandBorder:  self darkerColor.\\\\n\\\\t\\\\\\\"self \\\\n\\\\t\\\\tspecialColor: (Color r: 1.0 g: 1.0 b: 0.548) \\\\n\\\\t\\\\tandBorder:  (Color r: 0.581 g: 0.774 b: 0.903).\\\\\\\"\\\\n\\\\tself useRoundedCorners.\\\\n\\\\tself layoutInset: 1.\\\\n\\\\t\\\\\\\"self setProperty: #variableInsetSize toValue: 6.\\\\\\\"\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'tk 7/27/2001 16:53'!\\\\nshouldBeBrokenIntoWords: aSymbol\\\\n\\\\n\\\\t^#(methodHeader1 methodHeader2 keyword2 upArrow \\\\n\\\\t\\\\ttempVariable tempVariableDeclaration blockarg2 variable\\\\n\\\\t\\\\tkeywordGetz keywordSetter unaryGetter\\\\n\\\\t\\\\tassignmentArrow) includes: aSymbol! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/26/2001 13:44'!\\\\nspecialColor: c1 andBorder: c2\\\\n\\\\n\\\\tself color: (self scaleColorByUserPref: c1).\\\\n\\\\tself setProperty: #deselectedColor toValue: c1.\\\\n\\\\tself borderColor: (self scaleColorByUserPref: c2).\\\\n\\\\tself setProperty: #deselectedBorderColor toValue: c2.\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'yo 11/11/2002 10:32'!\\\\nsplitAtCapsAndDownshifted: aString\\\\n\\\\n\\\\tself flag: #yoCharCases.\\\\n\\\\n\\\\t^String streamContents: [ :strm |\\\\n\\\\t\\\\taString do: [ :each | \\\\n\\\\t\\\\t\\\\teach = $: ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\teach isUppercase ifTrue: [strm nextPut: (Character value: 0);  \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t \\\\tnextPut: (Character value: 0); \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t \\\\tnextPut: (Character value: 0); \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnextPut: each asLowercase]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [strm nextPut: each]\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t]\\\\n\\\\t].! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/26/2001 23:01'!\\\\nstandardCellPositioning\\\\n\\\\n\\\\t^ self alansTest1 ifTrue: [#leftCenter] ifFalse: [#topLeft]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'tk 7/25/2001 17:33'!\\\\nstandardInset\\\\n\\\\n\\\\tparseNode class == BlockNode ifTrue: [^ 5@1].\\\\n\\\\t\\\\t\\\\\\\"allow pointing beside a line so can replace it\\\\\\\"\\\\n\\\\t^ self alansTest1 ifTrue: [1] ifFalse: [-1]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 4/4/2001 13:12'!\\\\nsubstituteKeywordFor: aString\\\\n\\\\n\\\\taString isEmpty ifTrue: [^aString asString].\\\\n\\\\taString asString = '^ ' ifTrue: [^'answer'].\\\\n\\\\taString asString = 'ifTrue:' ifTrue: [^'Yes'].\\\\n\\\\taString asString = 'ifFalse:' ifTrue: [^'No'].\\\\n\\\\taString asString = 'self' ifTrue: [^'self'].\\\\n\\\\taString first isUppercase ifTrue: [^aString asString].\\\\n\\\\n\\\\t^self splitAtCapsAndDownshifted: aString! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/28/2001 15:03'!\\\\ntokenVerticalSeparator\\\\n\\\\n\\\\t^Morph new \\\\n\\\\t\\\\tcolor: Color transparent;\\\\n\\\\t\\\\textent: 3@3;\\\\n\\\\t\\\\tlock\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/26/2001 13:45'!\\\\ntranslateFromWordySelfVariant: key\\\\n\\\\n\\\\t#selfWrittenAsMe == key ifTrue: [^'me'].\\\\n\\\\t#selfWrittenAsMy == key ifTrue: [^'my'].\\\\n\\\\t#selfWrittenAsIll == key ifTrue: [^'I''ll'].\\\\n\\\\t#selfWrittenAsIm == key ifTrue: [^'I''m'].\\\\n\\\\t#selfWrittenAsThis == key ifTrue: [^'this'].\\\\n\\\\t^nil\\\\n\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'tk 7/28/2001 09:05'!\\\\ntranslateToWordyGetter: key\\\\n\\\\t\\\\\\\"  setBlob:  becomes  's blob _  \\\\\\\"\\\\n\\\\n\\\\t^ '''s ', \\\\n\\\\t  (self splitAtCapsAndDownshifted: (key asString allButFirst: 3) \\\\n\\\\t\\\\t\\\\twithFirstCharacterDownshifted)! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'RAA 2/26/2001 13:45'!\\\\ntranslateToWordySelfVariant: aString\\\\n\\\\n\\\\t| lc |\\\\n\\\\tlc _ aString asLowercase.\\\\n\\\\tlc = 'me' ifTrue: [^#selfWrittenAsMe].\\\\n\\\\tlc = 'my' ifTrue: [^#selfWrittenAsMy].\\\\n\\\\tlc = 'i''ll' ifTrue: [^#selfWrittenAsIll].\\\\n\\\\tlc = 'i''m' ifTrue: [^#selfWrittenAsIm].\\\\n\\\\tlc = 'this' ifTrue: [^#selfWrittenAsThis].\\\\n\\\\t^nil\\\\n\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'alans styles' stamp: 'tk 7/27/2001 17:26'!\\\\ntranslateToWordySetter: key\\\\n\\\\t\\\\\\\"  setBlob:  becomes  's blob _  \\\\\\\"\\\\n\\\\n\\\\t^ '''s ', \\\\n\\\\t  (self splitAtCapsAndDownshifted: (key asString allButFirst: 3) allButLast \\\\n\\\\t\\\\t\\\\twithFirstCharacterDownshifted), \\\\n\\\\t  ' _'! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'card in a stack' stamp: 'tk 9/25/2001 11:46'!\\\\ncouldHoldSeparateDataForEachInstance\\\\n\\\\t\\\\\\\"Answer whether this type of morph is inherently capable of holding separate data for each instance ('card data')\\\\\\\"\\\\n\\\\n\\\\t^ true! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'card & stack' stamp: 'tk 9/25/2001 11:41'!\\\\nsetNewContentsFrom: stringOrNumberOrNil\\\\n\\\\t\\\\\\\"Using stringOrNumberOrNil as a guide, set the receiver's contents afresh.  If the input parameter is nil, the a default value stored in a property of the receiver, if any, will supply the new initial content.  This method is only called when a VariableDock is attempting to put a new value.\\\\\\\"\\\\n\\\\n\\\\t(self readOut ifNil: [^ self]) setNewContentsFrom: stringOrNumberOrNil.! !\\\\n\\\\n!SyntaxMorph methodsFor: 'card & stack' stamp: 'tk 11/4/2001 21:47'!\\\\nsetTarget: aPlayer\\\\n\\\\t\\\\\\\"Find my UpdatingStringMorph and set its getSelector, putSelector, and target\\\\\\\"\\\\n\\\\n\\\\t| updatingString |\\\\n\\\\t(updatingString _ self readOut) ifNil: [^ self].\\\\n\\\\tupdatingString putSelector: (Utilities setterSelectorFor: self knownName).\\\\n\\\\tupdatingString getSelector: (Utilities getterSelectorFor: self knownName).\\\\n\\\\tupdatingString target: aPlayer. ! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'change reporting' stamp: 'tk 9/28/2001 13:36'!\\\\ncolorChangedForSubmorph: colorPatch\\\\n\\\\t| sel newSel cc ms phrase completeMsg |\\\\n\\\\t\\\\\\\"reporting a color change\\\\\\\"\\\\n\\\\n\\\\t(self nodeClassIs: MessageNode) ifFalse: [^ nil].\\\\n\\\\t(sel _ self selector) ifNil: [^ nil].\\\\n\\\\t(Color colorNames includes: sel) | (sel == #r:g:b:) ifFalse: [^ nil].\\\\n\\\\t\\\\t\\\\\\\"a standard color name\\\\\\\"\\\\n\\\\t\\\\\\\"replace self with new tiles from the color\\\\\\\"\\\\n\\\\t(newSel _ (cc _ colorPatch color) name) \\\\n\\\\t\\\\tifNil: [ms _ MessageSend receiver: Color selector: #r:g:b: arguments: \\\\n\\\\t\\\\t\\\\t\\\\t(Array with: cc red with: cc green with: cc blue).\\\\n\\\\t\\\\t\\\\tphrase _ ms asTilesIn: Color globalNames: true]\\\\n\\\\t\\\\tifNotNil: [ms _ MessageSend receiver: Color selector: newSel arguments: #().\\\\n\\\\t\\\\t\\\\tphrase _ ms asTilesIn: Color globalNames: true].\\\\n\\\\tself deletePopup.\\\\n\\\\tcompleteMsg _ self isNoun ifTrue: [self] ifFalse: [owner].\\\\n\\\\tcompleteMsg owner replaceSubmorph: completeMsg by: phrase.\\\\n\\\\t\\\\\\\"rec setSelection: {rec. nil. rec}.\\\\\\\"\\\\n\\\\tphrase acceptIfInScriptor.! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'classification' stamp: 'di 11/2/2000 13:25'!\\\\nisSyntaxMorph\\\\n\\\\t^ true! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'debugging' stamp: 'di 11/17/2000 07:59'!\\\\ndebugger\\\\n\\\\n\\\\t^ self rootTile valueOfProperty: #debugger! !\\\\n\\\\n!SyntaxMorph methodsFor: 'debugging' stamp: 'di 11/17/2000 07:59'!\\\\ndebugger: x\\\\n\\\\n\\\\tself rootTile setProperty: #debugger toValue: x! !\\\\n\\\\n!SyntaxMorph methodsFor: 'debugging' stamp: 'RAA 8/24/1999 12:35'!\\\\nhostContext\\\\n\\\\n\\\\t^nil\\\\t\\\\t\\\\\\\"we don't have one\\\\\\\"! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'drawing' stamp: 'RAA 3/25/2001 16:16'!\\\\ndrawOn: aCanvas\\\\n\\\\n\\\\tsuper drawOn: aCanvas.\\\\n\\\\tself isBlockNode ifFalse: [^self].\\\\n\\\\tself alansTest1 ifTrue: [^self].\\\\n\\\\n\\\\tself immediatelyBelowTheMethodNode ifTrue: [\\\\n\\\\t\\\\taCanvas fillRectangle: (self topLeft + (0@-1) extent: self width@1) color: Color gray\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\taCanvas fillRectangle: (self topLeft + (1@1) extent: 2@(self height-2)) color: Color gray.\\\\n\\\\t\\\\taCanvas fillRectangle: (self topLeft + (1@1) extent: 4@1) color: Color gray.\\\\n\\\\t\\\\taCanvas fillRectangle: (self bottomLeft + (1@-1) extent: 4@1) color: Color gray\\\\n\\\\t].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'drawing' stamp: 'tk 9/13/2001 15:13'!\\\\nlookTranslucent\\\\n\\\\n\\\\tself setDeselectedColor.\\\\n\\\\tsuper color: (self color alpha: 0.25).\\\\n\\\\tsubmorphs do: [:mm | (mm respondsTo: #lookTranslucent) \\\\n\\\\t\\\\tifTrue: [mm lookTranslucent]\\\\n\\\\t\\\\tifFalse: [\\\\\\\"mm color: color\\\\\\\"]].\\\\n! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'dropping/grabbing' stamp: 'di 1/29/2001 16:23'!\\\\ncleanupAfterItDroppedOnMe\\\\n\\\\t\\\\\\\"A tile just dropped into me.  Clean up\\\\\\\"\\\\n\\\\n\\\\tself layoutChanged.  \\\\\\\"** Isn't this already implied by the addMorph: ?\\\\\\\"\\\\n\\\\t\\\\\\\"Auto-accept on drop if in a scriptor\\\\\\\"\\\\n\\\\tself acceptIfInScriptor.! !\\\\n\\\\n!SyntaxMorph methodsFor: 'dropping/grabbing' stamp: 'di 5/4/2001 13:16'!\\\\nhighlightForDrop: evt\\\\n\\\\n\\\\t(self wantsDroppedMorph: evt hand firstSubmorph event: evt)\\\\n\\\\t\\\\tifTrue: [self color: self dropColor].! !\\\\n\\\\n!SyntaxMorph methodsFor: 'dropping/grabbing' stamp: 'tk 7/19/2001 19:04'!\\\\njustDroppedInto: aMorph event: evt\\\\n\\\\taMorph isSyntaxMorph ifFalse:\\\\n\\\\t\\\\t[Preferences tileTranslucentDrag\\\\n\\\\t\\\\t\\\\tifTrue: [self setDeselectedColor]\\\\n\\\\t\\\\t\\\\tifFalse: [self align: self topLeft with: self topLeft - self cursorBaseOffset]].\\\\n\\\\tself removeProperty: #beScript.\\\\n\\\\t^ super justDroppedInto: aMorph event: evt! !\\\\n\\\\n!SyntaxMorph methodsFor: 'dropping/grabbing' stamp: 'tk 9/30/2001 11:09'!\\\\nmorphToDropInPasteUp: aPasteUp\\\\n\\\\t\\\\\\\"If property #beScript is true, create a scriptor around me.\\\\\\\"\\\\n\\\\n\\\\t| actualObject itsSelector aScriptor adjustment handy tw blk |\\\\n\\\\t(self valueOfProperty: #beScript ifAbsent: [false]) ifFalse: [^ self].\\\\n\\\\tself removeProperty: #beScript.\\\\n\\\\tactualObject _ self actualObject ifNil: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself valueOfProperty: #scriptedPlayer ifAbsent: [nil]].\\\\n\\\\tactualObject ifNil: [^ self].\\\\n\\\\tself removeProperty: #scriptedPlayer.\\\\n\\\\tactualObject assureUniClass.\\\\n\\\\n\\\\titsSelector _ self userScriptSelector.\\\\n\\\\taScriptor _ itsSelector isEmptyOrNil\\\\n\\\\t\\\\tifFalse:\\\\n\\\\t\\\\t\\\\t[adjustment _ 0@0.\\\\n\\\\t\\\\t\\\\tactualObject scriptEditorFor: itsSelector]\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[adjustment _ 60 @ 20.\\\\n\\\\t\\\\t\\\\tactualObject newScriptorAround: self].\\\\n\\\\taScriptor ifNil: [^self].\\\\n\\\\thandy _ aPasteUp primaryHand.\\\\n\\\\n\\\\taScriptor position: handy position - adjustment.\\\\n\\\\taPasteUp addMorphFront: aScriptor.\\\\t\\\\\\\"do this early so can find World\\\\\\\"\\\\n\\\\taScriptor showingMethodPane ifFalse: [\\\\n\\\\t\\\\t\\\\\\\"(tw _ aScriptor findA: TwoWayScrollPane) ifNil:\\\\n\\\\t\\\\t\\\\t[itsSelector ifNil: ['blank script'.\\\\n\\\\t\\\\t\\\\t\\\\ttw _ aScriptor findA: TwoWayScrollPane.\\\\n\\\\t\\\\t\\\\t\\\\tblk _ (tw scroller findA:  SyntaxMorph \\\\\\\"\\\\\\\"MethodNode\\\\\\\"\\\\\\\") findA: BlockNode.\\\\n\\\\t\\\\t\\\\t\\\\tblk addMorphFront: self]].\\\\n\\\\t\\\\t\\\\\\\"\\\\n\\\\t\\\\tSyntaxMorph setSize: nil andMakeResizable: aScriptor.\\\\n\\\\t\\\\t].\\\\n\\\\t^ aScriptor\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'dropping/grabbing' stamp: 'tk 9/24/2001 10:04'!\\\\nstructureMatchWith: aMorph\\\\n\\\\t| meNoun itNoun |\\\\n\\\\t\\\\\\\"Return true if the node types would allow aMorph to replace me.  This tests the gross structure of the method only.\\\\\\\"\\\\n\\\\n\\\\tmeNoun _ self isNoun.\\\\n\\\\titNoun _ aMorph isNoun.\\\\n\\\\n\\\\t\\\\\\\"Consider these nouns to be equal:  TempVariableNode, LiteralNode, VariableNode, (MessageNode with receiver), CascadeNode, AssignmentNode\\\\\\\"\\\\n\\\\tmeNoun & itNoun ifTrue: [^ true].\\\\n\\\\tmeNoun & aMorph isBlockNode ifTrue: [^ true].\\\\n\\\\n\\\\t\\\\\\\"If I am a BlockNode, and it is a TempVariableNode, add it into list\\\\\\\"\\\\n\\\\t\\\\\\\"If I am a BlockNode, and it is a noun, add it as a new line\\\\\\\"\\\\n\\\\tself isBlockNode ifTrue:\\\\n\\\\t\\\\t[itNoun ifTrue: [^ true].\\\\n\\\\t\\\\t(aMorph nodeClassIs: ReturnNode) ifTrue:\\\\n\\\\t\\\\t\\\\t[^ (self submorphs\\\\n\\\\t\\\\t\\\\t\\\\tdetect: [:mm | ((mm isSyntaxMorph) and: [mm nodeClassIs: ReturnNode])]\\\\n\\\\t\\\\t\\\\t\\\\tifNone: [nil]) isNil].\\\\t\\\\\\\"none already in this block\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"If I am a BlockNode, and it is a ReturnNode, add to end\\\\\\\"\\\\n\\\\t\\\\t(aMorph nodeClassIs: CommentNode) ifTrue: [^ true]].\\\\n\\\\n\\\\t(self isMethodNode) ifTrue: [^ false].\\\\t\\\\\\\"Later add args and keywords\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"Later allow comments to be dropped in\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"Add MethodTemps by dropping into the main block\\\\\\\"\\\\n\\\\n\\\\t(self nodeClassIs: ReturnNode) & (aMorph parseNode class == MessageNode) \\\\n\\\\t\\\\tifTrue: [^ true].\\\\t\\\\t\\\\\\\"Command replace Return\\\\\\\"\\\\n\\\\t(self nodeClassIs: MessageNode) & (aMorph parseNode class == ReturnNode) ifTrue: [\\\\n\\\\t\\\\t(owner submorphs select: [:ss | ss isSyntaxMorph]) last == self\\\\n\\\\t\\\\t\\\\tifTrue: [^ true]].\\\\t\\\\\\\"Return replace last command\\\\\\\"\\\\n\\\\n\\\\t(aMorph nodeClassIs: AssignmentNode) ifTrue: [\\\\n\\\\t\\\\titNoun ifFalse: [\\\\\\\"create a new assignment\\\\\\\"\\\\n\\\\t\\\\t\\\\t^ self isAVariable & self isDeclaration not]].\\\\t\\\\\\\"only assign to a variable\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"If nodes are of equal class, replace me with new one.\\\\\\\"\\\\n\\\\t(self nodeClassIs: aMorph parseNode class) ifTrue: [\\\\n\\\\t\\\\t(self nodeClassIs: MessageNode) \\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [^ true]\\\\t\\\\\\\"normal match\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [^ self receiverNode == aMorph receiverNode]].\\\\t\\\\\\\"both nil\\\\\\\"\\\\n\\\\n\\\\t^ false \\\\\\\"otherwise reject\\\\\\\"\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'dropping/grabbing' stamp: 'gm 2/22/2003 12:49'!\\\\nwantsDroppedMorph: aMorph event: evt \\\\n\\\\t\\\\\\\"For the moment, you have to drop it the right place.  We do not look at enclosing morphs\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Two ways to do this:  Must always destroy old node, then drag in new one.\\\\n\\\\t\\\\tOr, drop replaces what you drop on.  Nasty with blocks.\\\\\\\"\\\\n\\\\n\\\\t(aMorph isSyntaxMorph) ifFalse: [^false].\\\\n\\\\t(self structureMatchWith: aMorph) ifFalse: [^false].\\\\t\\\\\\\"gross structure\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Only look at types if NoviceMode -- building EToys\\\\\\\"\\\\n\\\\t^self okToBeReplacedBy: aMorph\\\\t\\\\\\\"test the types\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"^ true\\\\\\\"! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'event handling' stamp: 'di 11/8/2000 22:05'!\\\\ncursorBaseOffset\\\\n\\\\n\\\\t^ 7@14\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'event handling' stamp: 'di 11/6/2000 16:20'!\\\\nhandlesKeyboard: evt\\\\n\\\\t^ evt keyCharacter = Character backspace! !\\\\n\\\\n!SyntaxMorph methodsFor: 'event handling' stamp: 'dgd 2/22/2003 13:39'!\\\\nhandlesMouseDown: evt \\\\n\\\\tevt yellowButtonPressed ifTrue: [^true].\\\\n\\\\tparseNode isNil ifTrue: [^false].\\\\n\\\\towner isSyntaxMorph \\\\n\\\\t\\\\tifTrue: [(owner isMethodNode and: [self isBlockNode not]) ifTrue: [^false]].\\\\t\\\\\\\"Can only take block out of a MethodNode\\\\\\\"\\\\n\\\\t^true! !\\\\n\\\\n!SyntaxMorph methodsFor: 'event handling' stamp: 'tk 10/26/2000 16:58'!\\\\nhandlesMouseOver: evt\\\\n\\\\t\\\\\\\"Am I a tile that could be picked up?\\\\\\\"\\\\n\\\\n\\\\t^ true! !\\\\n\\\\n!SyntaxMorph methodsFor: 'event handling' stamp: 'di 11/6/2000 08:21'!\\\\nhandlesMouseOverDragging: evt\\\\n\\\\n\\\\t^ evt hand hasSubmorphs\\\\n\\\\t\\\\tand: [evt hand firstSubmorph isSyntaxMorph]\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'event handling' stamp: 'di 11/17/2000 08:21'!\\\\nkeyStroke: evt\\\\n\\\\t\\\\\\\"Handle a keystroke event.\\\\\\\"\\\\n\\\\t| spacer |\\\\n\\\\tevt keyCharacter = Character backspace ifTrue:\\\\n\\\\t\\\\t[(owner notNil and: [owner isSyntaxMorph]) ifTrue:\\\\n\\\\t\\\\t\\\\t[owner isBlockNode ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[\\\\\\\"Delete a statement.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t(spacer _ self submorphAfter) class == AlignmentMorph\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [spacer delete].\\\\n\\\\t\\\\t\\\\t\\\\tself delete].\\\\n\\\\t\\\\t\\\\t]].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'event handling' stamp: 'tk 9/26/2001 05:56'!\\\\nmouseDown: evt \\\\n\\\\t| dup rootTile |\\\\n\\\\tevt yellowButtonPressed ifTrue: [^ self showMenu: evt].\\\\n\\\\t(rootTile _ self rootTile) isMethodNode ifTrue:\\\\n\\\\t\\\\t[self currentSelectionDo:\\\\n\\\\t\\\\t\\\\t[:innerMorph :mouseDownLoc :outerMorph |\\\\n\\\\t\\\\t\\\\t(outerMorph notNil and: [self == innerMorph])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"Click on prior selection -- record click point.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself setSelection: {self. evt cursorPoint. outerMorph}]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\\\\"A new selection sequence.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tself setSelection: {self. evt cursorPoint. nil}]].\\\\n\\\\t\\\\t^ self].\\\\n\\\\n\\\\t\\\\\\\"Out in the world -- treat as a unit\\\\\\\"\\\\n\\\\trootTile isSticky ifTrue: [^ self].\\\\t\\\\\\\"later may allow to be selected\\\\\\\"\\\\n\\\\trootTile isPartsDonor \\\\n\\\\t\\\\tifTrue: [dup _ rootTile duplicate.\\\\n\\\\t\\\\t\\\\t\\\\tdup setProperty: #beScript toValue: true]\\\\n\\\\t\\\\tifFalse: [dup _ rootTile].\\\\n\\\\tevt hand attachMorph: dup.\\\\n\\\\tPreferences tileTranslucentDrag\\\\n\\\\t\\\\tifTrue: [^ dup lookTranslucent]\\\\n\\\\t\\\\tifFalse: [^ dup align: dup topLeft with: evt hand position + self cursorBaseOffset]\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'event handling' stamp: 'tk 7/19/2001 20:21'!\\\\nmouseEnter: evt\\\\n\\\\t\\\\\\\"Highlight this level as a potential grab target\\\\\\\"\\\\n\\\\n\\\\\\\"Transcript cr; print: self; show: ' enter'.\\\\\\\"\\\\n\\\\tself rootTile isMethodNode ifFalse: [^ self]. \\\\t\\\\\\\"not in a script\\\\\\\"\\\\n\\\\tself unhighlightOwnerBorder.\\\\n\\\\tself highlightForGrab: evt.\\\\n\\\\tevt hand newKeyboardFocus: self.\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'event handling' stamp: 'tk 7/25/2001 10:09'!\\\\nmouseEnterDragging: evt\\\\n\\\\t\\\\\\\"Highlight this level as a potential drop target\\\\\\\"\\\\n\\\\n\\\\\\\"self isBlockNode ifTrue: [Transcript cr; print: self; show: ' enterDragging'].\\\\\\\"\\\\n\\\\tself rootTile isMethodNode ifFalse: [^ self]. \\\\t\\\\\\\"not in a script\\\\\\\"\\\\n\\\\n\\\\tevt hand hasSubmorphs ifFalse: [^ self].  \\\\\\\"Don't react to empty hand\\\\\\\"\\\\n\\\\tself unhighlightOwnerBorder.\\\\n\\\\tself isBlockNode ifFalse: [self highlightForDrop: evt.\\\\n\\\\t\\\\t(self firstOwnerSuchThat: [:m | m isSyntaxMorph and: [m color = self dropColor]])\\\\n\\\\t\\\\t\\\\tifNotNilDo: [:m | m unhighlight]].\\\\n\\\\n\\\\tself isBlockNode ifTrue:\\\\n\\\\t\\\\t[(self firstOwnerSuchThat: [:m | m isSyntaxMorph and: [m isBlockNode]])\\\\n\\\\t\\\\t\\\\tifNotNilDo: [:m | \\\\\\\"Suspend outer block.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tm stopStepping; removeDropZones].\\\\n\\\\t\\\\tself startStepping]\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'event handling' stamp: 'dgd 2/22/2003 18:48'!\\\\nmouseLeave: evt \\\\n\\\\t\\\\\\\"Move grab highlight back out a level\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Transcript cr; print: self; show: ' leave'.\\\\\\\"\\\\n\\\\n\\\\tself rootTile isMethodNode ifFalse: [^self].\\\\t\\\\\\\"not in a script\\\\\\\"\\\\n\\\\tself unhighlightBorder.\\\\n\\\\t(owner notNil and: [owner isSyntaxMorph]) \\\\n\\\\t\\\\tifTrue: [owner highlightForGrab: evt]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'event handling' stamp: 'dgd 2/22/2003 18:48'!\\\\nmouseLeaveDragging: evt \\\\n\\\\t\\\\\\\"Transcript cr; print: self; show: ' leaveDragging'.\\\\\\\"\\\\n\\\\n\\\\tself rootTile isMethodNode ifFalse: [^self].\\\\t\\\\\\\"not in a script\\\\\\\"\\\\n\\\\tself isBlockNode \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[self\\\\n\\\\t\\\\t\\\\t\\\\tstopStepping;\\\\n\\\\t\\\\t\\\\t\\\\tremoveDropZones.\\\\n\\\\t\\\\t\\\\t(self firstOwnerSuchThat: [:m | m isSyntaxMorph and: [m isBlockNode]]) \\\\n\\\\t\\\\t\\\\t\\\\tifNotNilDo: [:m | m startStepping].\\\\t\\\\\\\"Activate outer block.\\\\\\\"\\\\n\\\\t\\\\t\\\\tself submorphs do: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:ss | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"cancel drop color in line beside mouse\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tss color = self dropColor ifTrue: [ss setDeselectedColor]]].\\\\n\\\\n\\\\t\\\\\\\"Move drop highlight back out a level\\\\\\\"\\\\n\\\\tself unhighlight.\\\\n\\\\t(owner notNil and: [owner isSyntaxMorph]) \\\\n\\\\t\\\\tifTrue: [owner isBlockNode ifFalse: [owner highlightForDrop: evt]]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'event handling' stamp: 'tk 10/17/2001 13:41'!\\\\nmouseMove: evt\\\\n\\\\t| dup selection |\\\\n\\\\towner isSyntaxMorph ifFalse: [^ self].\\\\n\\\\nfalse ifTrue: [\\\\\\\"for now, do not drag off a tile\\\\\\\"\\\\n\\\\tself currentSelectionDo:\\\\n\\\\t\\\\t[:innerMorph :mouseDownLoc :outerMorph |\\\\n\\\\t\\\\tmouseDownLoc ifNotNil: [\\\\n\\\\t\\\\t\\\\t(evt cursorPoint dist: mouseDownLoc) > 4 ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[\\\\\\\"If drag 5 pixels, then tear off a copy of outer selection.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tselection _ outerMorph ifNil: [self].\\\\n\\\\t\\\\t\\\\t\\\\tselection deletePopup.\\\\n\\\\t\\\\t\\\\t\\\\tevt hand attachMorph: (dup _ selection duplicate).\\\\n\\\\t\\\\t\\\\t\\\\tPreferences tileTranslucentDrag\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [dup lookTranslucent]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [dup align: dup topLeft\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twith: evt hand position + self cursorBaseOffset].\\\\n\\\\t\\\\t\\\\t\\\\tself setSelection: nil.\\\\t\\\\\\\"Why doesn't this deselect?\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t(self firstOwnerSuchThat: [:m | m isSyntaxMorph and: [m isBlockNode]])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifNotNilDo: [:m | \\\\\\\"Activate enclosing block.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tm startStepping]]]].\\\\n\\\\t].! !\\\\n\\\\n!SyntaxMorph methodsFor: 'event handling' stamp: 'di 11/17/2000 08:13'!\\\\nmouseUp: evt\\\\n\\\\t| newSel |\\\\n\\\\tself rootTile isMethodNode ifFalse: [^ self].\\\\n\\\\tself currentSelectionDo:\\\\n\\\\t\\\\t[:innerMorph :mouseDownLoc :outerMorph |\\\\n\\\\t\\\\tnewSel _ outerMorph\\\\n\\\\t\\\\t\\\\tifNil: [self \\\\\\\"first click\\\\\\\"]\\\\n\\\\t\\\\t\\\\tifNotNil: [(outerMorph firstOwnerSuchThat:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:m | m isSyntaxMorph and: [m isSelectable]]) ifNil: [self]].\\\\n\\\\t\\\\tnewSel isMethodNode ifTrue: [^ self setSelection: nil].\\\\n\\\\t\\\\tself setSelection: {self. nil. newSel}]\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'event handling' stamp: 'tk 12/1/2000 15:42'!\\\\nwantsKeyboardFocusFor: aSubmorph\\\\n\\\\t| doEdit |\\\\n\\\\t\\\\\\\"only let strings edit on shift-click.  Editing on ordinary click defeats the brown selection and tile dragging.\\\\\\\"\\\\n\\\\n\\\\tdoEdit _ self world primaryHand lastEvent shiftPressed.\\\\n\\\\tdoEdit ifTrue: [\\\\\\\"remove the arrows during editing\\\\\\\"\\\\n\\\\t\\\\tself valueOfProperty: #myPopup ifPresentDo: [:panel |\\\\n\\\\t\\\\t\\\\tpanel delete. self removeProperty: #myPopup]].\\\\n\\\\t^ doEdit! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'formatting options' stamp: 'di 2/21/2001 11:42'!\\\\nalansTest1\\\\n\\\\t\\\\n\\\\t| root |\\\\n\\\\n\\\\troot _ self rootTile ifNil: [self].\\\\n\\\\t^root valueOfProperty: #alansNewStyle ifAbsent: [self usingClassicTiles not]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'formatting options' stamp: 'RAA 2/26/2001 09:02'!\\\\ncontrolContrast2: evt\\\\n\\\\n\\\\t| origin scale startingContrastX |\\\\n\\\\n\\\\tevt isMouseUp ifTrue: [\\\\n\\\\t\\\\t^self removeProperty: #startingPointForSomeAdjustment\\\\n\\\\t].\\\\n\\\\tevt isMouseDown ifTrue: [\\\\n\\\\t\\\\t^self setProperty: #startingPointForSomeAdjustment toValue: evt cursorPoint\\\\n\\\\t].\\\\n\\\\tContrastFactor ifNil: [ContrastFactor _ 0.5].\\\\n\\\\tscale _ 200.0.\\\\n\\\\tstartingContrastX _ ContrastFactor * scale.\\\\n\\\\torigin _ self valueOfProperty: #startingPointForSomeAdjustment.\\\\n\\\\tContrastFactor _ (evt cursorPoint x - origin x + startingContrastX) / scale min: 1.0 max: 0.0.\\\\n\\\\tself finalAppearanceTweaks.\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'formatting options' stamp: 'RAA 2/26/2001 09:07'!\\\\ncontrolContrast: evt\\\\n\\\\n\\\\t\\\\\\\"old version. may be some scripts saved with me, so don't crash\\\\\\\"\\\\n\\\\t^self! !\\\\n\\\\n!SyntaxMorph methodsFor: 'formatting options' stamp: 'RAA 5/11/2001 07:41'!\\\\ncontrolSpacing2: evt\\\\n\\\\n\\\\t| origin scale startingContrastX |\\\\n\\\\n\\\\tevt isMouseUp ifTrue: [\\\\n\\\\t\\\\t^self removeProperty: #startingPointForSomeAdjustment\\\\n\\\\t].\\\\n\\\\tevt isMouseDown ifTrue: [\\\\n\\\\t\\\\t^self setProperty: #startingPointForSomeAdjustment toValue: evt cursorPoint\\\\n\\\\t].\\\\n\\\\tSizeScaleFactor ifNil: [SizeScaleFactor _ 0.15].\\\\n\\\\tscale _ 200.0.\\\\n\\\\tstartingContrastX _ SizeScaleFactor * scale.\\\\n\\\\torigin _ self valueOfProperty: #startingPointForSomeAdjustment.\\\\n\\\\tSizeScaleFactor _ (evt cursorPoint x - origin x + startingContrastX) / scale min: 1.0 max: 0.0.\\\\n\\\\tself finalAppearanceTweaks.\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'formatting options' stamp: 'RAA 2/26/2001 09:07'!\\\\ncontrolSpacing: evt\\\\n\\\\n\\\\t\\\\\\\"old version. may be some scripts saved with me, so don't crash\\\\\\\"\\\\n\\\\t^self! !\\\\n\\\\n!SyntaxMorph methodsFor: 'formatting options' stamp: 'di 2/21/2001 12:30'!\\\\nlookClassic\\\\n\\\\tself isLeafTile ifTrue: [self layoutInset: 2@4]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'formatting options' stamp: 'tk 7/18/2001 16:00'!\\\\nusingClassicTiles \\\\n\\\\n\\\\t^ Preferences uniTilesClassic! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'highlighting' stamp: 'tk 7/30/2001 14:48'!\\\\ncompoundBorderColor \\\\n\\\\n\\\\t^ self valueOfProperty: #deselectedBorderColor ifAbsent: [Color veryLightGray]\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'highlighting' stamp: 'di 11/5/2000 07:26'!\\\\ndropColor\\\\n\\\\t^ Color green darker! !\\\\n\\\\n!SyntaxMorph methodsFor: 'highlighting' stamp: 'tk 7/23/2001 18:28'!\\\\ngrabColor\\\\n\\\\n\\\\t\\\\\\\"Not the select color, but the mouseOver border color.  Means it could be grabbed\\\\\\\"\\\\n\\\\t^ Color paleOrange mixed: 0.5 with: Color brown! !\\\\n\\\\n!SyntaxMorph methodsFor: 'highlighting' stamp: 'di 11/6/2000 09:22'!\\\\nhighlightForGrab: evt\\\\n\\\\n\\\\tself borderColor: self grabColor.! !\\\\n\\\\n!SyntaxMorph methodsFor: 'highlighting' stamp: 'tk 7/19/2001 19:09'!\\\\nstdBorderColor \\\\n\\\\n\\\\t\\\\\\\"put choices of how to do the border here\\\\\\\"\\\\n\\\\t^ self valueOfProperty: #deselectedBorderColor ifAbsent: [Color transparent]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'highlighting' stamp: 'tk 7/19/2001 19:50'!\\\\nunhighlight\\\\n\\\\n\\\\tself setDeselectedColor.\\\\n\\\\n\\\\nfalse ifTrue: [\\\\n\\\\tself currentSelectionDo: [:innerMorph :mouseDownLoc :outerMorph |\\\\n\\\\t\\\\tself color: ( false\\\\n\\\\t\\\\t\\\\t\\\\\\\"(self == outerMorph or: [owner notNil and: [owner isSyntaxMorph not]])\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self valueOfProperty: #deselectedBorderColor ifAbsent: [#raised]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self color: Color transparent]\\\\n\\\\t\\\\t)\\\\n\\\\t]].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'highlighting' stamp: 'di 5/4/2001 13:21'!\\\\nunhighlightBorder\\\\n\\\\n\\\\tself currentSelectionDo: [:innerMorph :mouseDownLoc :outerMorph |\\\\n\\\\t\\\\tself borderColor: (\\\\n\\\\t\\\\t\\\\t(self == outerMorph or: [owner notNil and: [owner isSyntaxMorph not]])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self valueOfProperty: #deselectedBorderColor ifAbsent: [#raised]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [self stdBorderColor]\\\\n\\\\t\\\\t)\\\\n\\\\t]\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'highlighting' stamp: 'dgd 2/22/2003 18:48'!\\\\nunhighlightOwner\\\\n\\\\t\\\\\\\"Unhighlight my owner\\\\\\\"\\\\n\\\\n\\\\t(owner notNil and: [owner isSyntaxMorph]) ifTrue: [owner unhighlight]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'highlighting' stamp: 'dgd 2/22/2003 18:49'!\\\\nunhighlightOwnerBorder\\\\n\\\\t\\\\\\\"Unhighlight my owner's border\\\\\\\"\\\\n\\\\n\\\\t(owner notNil and: [owner isSyntaxMorph]) \\\\n\\\\t\\\\tifTrue: [owner unhighlightBorder]! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'initialization' stamp: 'sw 3/6/2001 11:26'!\\\\ninAPluggableScrollPane\\\\n\\\\t\\\\\\\"Answer a PluggableTileScriptorMorph that holds the receiver\\\\\\\"\\\\n\\\\n\\\\t| widget |\\\\n\\\\twidget _ PluggableTileScriptorMorph new.\\\\n\\\\twidget extent: 10@10; borderWidth: 0.\\\\n\\\\twidget scroller addMorph: self.\\\\n\\\\twidget setScrollDeltas.\\\\n\\\\twidget hResizing: #spaceFill; vResizing: #spaceFill.\\\\n\\\\t^ widget\\\\n\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'initialization' stamp: 'sw 6/26/2001 10:58'!\\\\ninAScrollPane\\\\n\\\\t\\\\\\\"Answer a scroll pane in which the receiver is scrollable\\\\\\\"\\\\n\\\\n\\\\t^ self inATwoWayScrollPane! !\\\\n\\\\n!SyntaxMorph methodsFor: 'initialization' stamp: 'di 1/31/2001 10:14'!\\\\nopenInWindow\\\\n\\\\n\\\\t| window widget sel |\\\\n\\\\tsel _ ''.\\\\n\\\\tself firstSubmorph allMorphs do: [:rr | \\\\n\\\\t\\\\t\\\\t(rr isKindOf: StringMorph) ifTrue: [sel _ sel, rr contents]].\\\\n\\\\twindow _ (SystemWindow labelled: 'Tiles for ', self parsedInClass printString, '>>',sel).\\\\n\\\\twidget _ self inAScrollPane.\\\\n\\\\twidget color: Color paleOrange.\\\\n\\\\twindow\\\\n\\\\t\\\\taddMorph: widget\\\\n\\\\t\\\\tframe: (0@0 extent: 1.0@1.0).\\\\n\\\\twindow openInWorldExtent: (\\\\n\\\\t\\\\tself extent + (20@40) min: (Display boundingBox extent * 0.8) rounded\\\\n\\\\t)\\\\n\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'initialization' stamp: 'FBS 2/24/2004 14:21'!\\\\nreturnNode: aNode expression: expr\\\\n\\\\n\\\\t| row expMorph sMorph aNoiseString |\\\\n\\\\trow _ self addRow: #return on: aNode.\\\\n\\\\tself alansTest1 ifTrue: [\\\\n\\\\t\\\\trow setSpecialOuterTestFormat.\\\\n\\\\t\\\\taNoiseString _ ' Reply '.\\\\n\\\\t\\\\tsMorph _ self aSimpleStringMorphWith: aNoiseString.\\\\n\\\\t\\\\tsMorph \\\\n\\\\t\\\\t\\\\temphasis: TextEmphasis bold emphasisCode;\\\\n\\\\t\\\\t\\\\tsetProperty: #syntacticallyCorrectContents toValue: '^'.\\\\n\\\\n\\\\t\\\\trow addMorphBack: sMorph.\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\trow addToken: '^ ' type: #upArrow on: aNode.\\\\n\\\\t].\\\\n\\\\texpMorph _ expr asMorphicSyntaxIn: row.\\\\n\\\\tself alansTest1 ifTrue: [\\\\n\\\\t\\\\t(expMorph hasProperty: #deselectedColor) ifFalse: [expMorph setConditionalPartStyle].\\\\n\\\\t].\\\\n\\\\texpr addCommentToMorph: row.\\\\n\\\\t^row\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'initialization' stamp: 'tk 1/19/2001 13:29'!\\\\nsample: arg1\\\\n\\\\\\\"a comment\\\\\\\"\\\\n| temp1 |\\\\ntemp1 _ 5.\\\\ntemp1 yourself.\\\\ntemp1 min: arg1.! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'insertion drop zones' stamp: 'di 1/30/2001 21:00'!\\\\nremoveDropZones\\\\n\\\\t\\\\\\\"Remove the insertion drop-zone morphs.\\\\\\\"\\\\n\\\\n\\\\tself submorphsDo:\\\\n\\\\t\\\\t[:mm | (mm isMemberOf: BorderedMorph) ifTrue: [mm delete]].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'insertion drop zones' stamp: 'tk 9/13/2001 15:24'!\\\\ntrackDropZones\\\\n\\\\t| hand i localPt insertion insHt ii prevBot nxtHt d c1 c2 ht2 spacer1 spacer2 wid ht1 dc each |\\\\n\\\\thand _ self primaryHand.\\\\n\\\\t(\\\\\\\"hand lastEvent redButtonPressed &\\\\\\\" hand hasSubmorphs\\\\n\\\\t\\\\tand: [(self hasOwner: hand) not]) ifFalse: [^ self].\\\\n\\\\n\\\\tinsertion _ hand firstSubmorph renderedMorph.\\\\n\\\\tinsertion isSyntaxMorph ifFalse: [^ self].\\\\n\\\\tinsertion isNoun ifFalse: [(insertion nodeClassIs: CommentNode) ifFalse: [^ self]].\\\\n\\\\tlocalPt _ self globalPointToLocal: hand position.\\\\n\\\\tinsHt _ insertion height.  \\\\\\\"**just use standard line height here\\\\\\\"\\\\n\\\\tself removeDropZones.  \\\\\\\"Maybe first check if in right place, then just tweak heights.\\\\\\\"\\\\n\\\\ti _ (ii _ self indexOfMorphAbove: localPt) min: submorphs size-1.\\\\n\\\\tprevBot _ i <= 0 ifTrue: [(self innerBounds) top]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [(self submorphs at: i) bottom].\\\\n\\\\tnxtHt _ (submorphs isEmpty\\\\n\\\\t\\\\tifTrue: [insertion]\\\\n\\\\t\\\\tifFalse: [self submorphs at: i+1]) height.\\\\n\\\\td _ ii > i ifTrue: [nxtHt \\\\\\\"for consistent behavior at bottom\\\\\\\"]\\\\n\\\\t\\\\t\\\\tifFalse: [0 max: (localPt y - prevBot min: nxtHt)].\\\\n\\\\n\\\\t\\\\\\\"Top and bottom spacer heights cause continuous motion...\\\\\\\"\\\\n\\\\tc1 _ Color transparent.  c2 _ Color transparent.\\\\n\\\\tht2 _ d*insHt//nxtHt.  ht1 _ insHt - ht2.\\\\n\\\\twid _ self width - (2*borderWidth) - (2*self layoutInset).\\\\n\\\\twid isPoint ifTrue: [wid _ wid x].\\\\n\\\\t(spacer1 _ BorderedMorph newBounds: (0@0 extent: wid@ht1)\\\\n\\\\t\\\\t\\\\t\\\\tcolor: (ht1 > (insHt//2) ifTrue: [c1] ifFalse: [c2]))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tborderWidth: 1; borderColor: spacer1 color.\\\\n\\\\tself privateAddMorph: spacer1 atIndex: (i+1 max: 1).\\\\n\\\\t(spacer2 _ BorderedMorph newBounds: (0@0 extent: wid@ht2)\\\\n\\\\t\\\\t\\\\t\\\\tcolor: (ht2 > (insHt//2+1) ifTrue: [c1] ifFalse: [c2]))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tborderWidth: 1; borderColor: spacer2 color.\\\\n\\\\tspacer1 setProperty: #dropZone toValue: true.\\\\n\\\\tspacer2 setProperty: #dropZone toValue: true.\\\\n\\\\tself privateAddMorph: spacer2 atIndex: (i+3 min: submorphs size+1).\\\\n\\\\tself fullBounds.  \\\\\\\"Force layout prior to testing for cursor containment\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Maintain the drop target highlight -- highlight spacer if hand is in it.\\\\\\\"\\\\n\\\\t{spacer1. spacer2} do:\\\\n\\\\t\\\\t[:spacer | (spacer containsPoint: localPt) ifTrue:\\\\n\\\\t\\\\t\\\\t[spacer color: self dropColor.\\\\n\\\\t\\\\t\\\\t\\\\\\\"Ignore border color.  Maybe do it later.\\\\n\\\\t\\\\t\\\\tself borderColor = self dropColor\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self borderColor: self stdBorderColor]\\\\\\\"]].\\\\n\\\\t\\\\\\\"If no submorph (incl spacers) highlighted, then re-highlight the block.\\\\\\\"\\\\n\\\\t\\\\\\\"Ignore border color.  Maybe do it later.\\\\n\\\\t((self wantsDroppedMorph: insertion event: hand lastEvent) and:\\\\n\\\\t\\\\t[(self submorphs anySatisfy: [:m | m containsPoint: localPt]) not])\\\\n\\\\t\\\\t\\\\tifTrue: [self borderColor: self dropColor].\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Dragging a tile within a Block, if beside a tile, color it a dropzone\\\\\\\"\\\\n\\\\t\\\\\\\"Transcript show: localPt y printString; space; show: submorphs first top \\\\n\\\\t\\\\tprintString; space; show: submorphs last top printString; cr.\\\\\\\"\\\\n\\\\tdc _ self dropColor.\\\\n\\\\t1 to: ((ii+4 min: submorphs size) max: 1) do: [:ind | \\\\n\\\\t\\\\teach _ submorphs at: ind.\\\\n\\\\t\\\\teach isSyntaxMorph ifTrue: [\\\\n\\\\t\\\\t\\\\tlocalPt y >= each top \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"in this one or beyond\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(localPt y < each bottom) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [(each submorphs anySatisfy: [:m | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tm containsPoint: localPt])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [each setDeselectedColor]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [each color: dc]]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [each color = dc ifTrue: [each setDeselectedColor]]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [each color = dc ifTrue: [each setDeselectedColor]]]].\\\\n! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'tk 9/13/2001 15:28'!\\\\nacceptDroppingMorph: aMorph event: evt\\\\n\\\\t| itNoun old |\\\\n\\\\t\\\\\\\"Two cases: 1) a phrase being dropped into a block.  Add a new line.\\\\n\\\\t\\\\t2) aMorph is replacing self by dropping on it.\\\\n\\\\tFor the moment, you have to drop it the right place (the end of a tile if it is complex).  We do not look at enclosing morphs\\\\\\\"\\\\n\\\\n\\\\titNoun _ aMorph isNoun.\\\\n\\\\tself withAllOwnersDo:\\\\n\\\\t\\\\t[:m | (m isSyntaxMorph and: [m isBlockNode])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [m stopStepping; removeDropZones]].\\\\n\\\\tself isBlockNode & itNoun ifTrue:\\\\n\\\\t\\\\t[(aMorph nodeClassIs: TempVariableNode) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[\\\\\\\"If I am a BlockNode, and it is a TempVariableNode, add it into list\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t(self addBlockArg: aMorph)].\\\\n\\\\t\\\\t\\\\\\\"If I am a BlockNode and it is a noun add it as a new line\\\\\\\"\\\\n\\\\t\\\\t^ self addToBlock: aMorph event: evt].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\n\\\\tself isBlockNode ifTrue: [\\\\n\\\\t\\\\t (aMorph nodeClassIs: CommentNode) ifTrue: [^ self addToBlock: aMorph event: evt].\\\\n\\\\t\\\\t (aMorph nodeClassIs: ReturnNode) ifTrue: [^ self addToBlock: aMorph event: evt]].\\\\n\\\\n\\\\t\\\\\\\"Later add args and keywords.  later allow comments to be dropped\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Can't put statement, literal, assignment, or cascade into left side of assignment\\\\\\\"\\\\n\\\\t(owner isSyntaxMorph) ifTrue:\\\\n\\\\t\\\\t[(owner nodeClassIs: AssignmentNode) ifTrue:\\\\n\\\\t\\\\t\\\\t[(owner submorphIndexOf: self) = 1 ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[aMorph isAVariable ifFalse: [ ^ self]]]].\\\\n\\\\n\\\\t(aMorph nodeClassIs: AssignmentNode) ifTrue: [\\\\n\\\\t\\\\titNoun ifFalse: [\\\\\\\"create a new assignment\\\\\\\"\\\\n\\\\t\\\\t\\\\tself isAVariable ifTrue: [^ self newAssignment]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [^ self]]].\\\\t\\\\\\\"only assign to a variable\\\\\\\"\\\\n\\\\n\\\\taMorph deselect.\\\\n\\\\t(old _ owner) replaceSubmorph: self by: aMorph.\\\\t\\\\\\\"do the normal replacement\\\\\\\"\\\\n\\\\t(old isSyntaxMorph) ifTrue: [old cleanupAfterItDroppedOnMe].\\\\t\\\\\\\"now owned by no one\\\\\\\"\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'FBS 2/24/2004 14:24'!\\\\naddBlockArg: aMorph\\\\n\\\\t\\\\\\\"Add a temporary to a block or the method.  Return true if succeed\\\\\\\"\\\\n\\\\t\\\\\\\"(aMorph nodeClassIs: TempVariableNode) is known to be true.\\\\\\\"\\\\n\\\\t\\\\\\\"***NOTE: This method should be combined with addTempVar:\\\\\\\"\\\\n\\\\n\\\\t| tempHolder tt var nn |\\\\n\\\\towner isMethodNode ifTrue: [\\\\n\\\\t\\\\t^ (self addTempVar: aMorph)].\\\\t\\\\\\\"Node for them is not inside the block\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"If exists, drop the temp in this block and let user extend it.\\\\\\\"\\\\n\\\\tnn _ aMorph decompile string.\\\\t\\\\\\\"name\\\\\\\"\\\\n\\\\t(self isKnownVarName: nn) ifTrue: [^ false].\\\\t\\\\\\\"already defined\\\\\\\"\\\\n\\\\n\\\\ttt _ self firstSubmorph.\\\\n\\\\ttempHolder _ tt firstSubmorph isSyntaxMorph \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [(tt nodeClassIs: BlockArgsNode) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [tt] ifFalse: [nil]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [nil].\\\\n\\\\n\\\\ttempHolder ifNil: [\\\\\\\"make new row\\\\\\\"\\\\n\\\\t\\\\ttempHolder _ self addRow: #blockarg1 on: (BlockArgsNode new).\\\\n\\\\t\\\\ttempHolder addNoiseString: self noiseBeforeBlockArg.\\\\n\\\\t\\\\ttempHolder submorphs last firstSubmorph emphasis: TextEmphasis bold emphasisCode.\\\\n\\\\t\\\\ttempHolder useRoundedCorners.\\\\n\\\\n\\\\t\\\\tself addMorphFront: tempHolder.\\\\n\\\\t\\\\taMorph parseNode name: nn key: nn code: nil.\\\\n\\\\t\\\\taMorph parseNode asMorphicSyntaxIn: tempHolder.\\\\n\\\\t\\\\ttempHolder cleanupAfterItDroppedOnMe.\\\\n\\\\t\\\\t^ true].\\\\n\\\\n\\\\t\\\\\\\"Know this variable is not present, so add it\\\\\\\"\\\\n\\\\n\\\\taMorph parseNode name: nn key: nn code: nil.\\\\n\\\\ttempHolder addMorphBack: (tempHolder transparentSpacerOfSize: 4@4).\\\\n\\\\tvar _ tempHolder addRow: #tempVariable on: aMorph parseNode.\\\\n\\\\tvar layoutInset: 1.\\\\n\\\\tvar addMorphBack: (self aSimpleStringMorphWith: nn).\\\\n\\\\tvar cleanupAfterItDroppedOnMe.\\\\n\\\\t^ true\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'RAA 3/25/2001 16:15'!\\\\naddColumn: aColorOrSymbol on: aNode\\\\n\\\\t| col |\\\\n\\\\tself addMorphBack: (col _ self class column: aColorOrSymbol on: aNode).\\\\n\\\\n\\\\\\\"col setProperty: #howCreated toValue: thisContext longStack.\\\\\\\"\\\\n\\\\n\\\\tself alansTest1 ifTrue: [\\\\n\\\\t\\\\t(aColorOrSymbol == #block and: [self isMethodNode not]) ifTrue: [\\\\n\\\\t\\\\t\\\\tcol setConditionalPartStyle.\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\t^ col\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'FBS 2/24/2004 14:44'!\\\\naddNoiseString: aNoiseString\\\\n\\\\n\\\\t^self addNoiseString: aNoiseString emphasis: TextEmphasis normal emphasisCode.\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'RAA 3/25/2001 16:17'!\\\\naddNoiseString: aNoiseString emphasis: anInteger\\\\n\\\\n\\\\tself alansTest1 ifFalse: [^self].\\\\n\\\\t^(self addColumn: #keyword1 on: nil)\\\\n\\\\t\\\\tlayoutInset: 1;\\\\n\\\\t\\\\taddMorphBack: ((self noiseStringMorph: aNoiseString)  emphasis: anInteger)\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'RAA 2/15/2001 19:22'!\\\\naddRow: aColorOrSymbol on: aNode\\\\n\\\\n\\\\t| row |\\\\n\\\\tself addMorphBack: (row _ self class row: aColorOrSymbol on: aNode).\\\\n\\\\n\\\\\\\"row setProperty: #howCreated toValue: thisContext longStack.\\\\\\\"\\\\n\\\\n\\\\t^row\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'tk 8/24/2001 15:15'!\\\\naddSingleKeywordRow: aStringLikeItem\\\\n\\\\n\\\\t| row sMorph modifiedString |\\\\n\\\\n\\\\t(row _ self class row: #text on: nil) borderWidth: 1.\\\\n\\\\n\\\\tmodifiedString _ self substituteKeywordFor: aStringLikeItem.\\\\n\\\\tsMorph _ self addString: modifiedString special: true.\\\\n\\\\tsMorph font: (self fontToUseForSpecialWord: modifiedString).\\\\n\\\\tmodifiedString = aStringLikeItem ifFalse: [\\\\n\\\\t\\\\tsMorph setProperty: #syntacticallyCorrectContents toValue: aStringLikeItem].\\\\n\\\\n\\\\trow addMorph: sMorph.\\\\n\\\\tself addMorphBack: row.\\\\n\\\\t^row! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'RAA 4/4/2001 13:15'!\\\\naddString: literalOrVarName special: aBoolean\\\\n\\\\n\\\\t| answer |\\\\n\\\\t\\\\\\\"Create and return an UpdatingStringMorph containing the value.  Use an UpdatingStringMorph, so it can inform its owner when it has been edited. Keep the getSelector being nil\\\\\\\"\\\\n\\\\n\\\\tanswer _ (self anUpdatingStringMorphWith: literalOrVarName special: aBoolean)\\\\n\\\\t\\\\ttarget: self;\\\\n\\\\t\\\\tputSelector: #acceptIgnoring:;\\\\n\\\\t\\\\tuseStringFormat.\\\\n\\\\n\\\\t^answer\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'FBS 2/24/2004 14:23'!\\\\naddTempVar: aMorph \\\\n\\\\t\\\\\\\"know we are a block inside a MethodNode\\\\\\\" \\\\n\\\\t\\\\\\\"(aMorph nodeClassIs: TempVariableNode) is known to be true.\\\\\\\"\\\\n\\\\t| tempHolder ii tt var nn |\\\\n\\\\tnn _ aMorph decompile string.\\\\t\\\\\\\"name\\\\\\\"\\\\n\\\\t(self isKnownVarName: nn) ifTrue: [^ false].\\\\t\\\\\\\"already defined\\\\\\\"\\\\n\\\\n\\\\ttempHolder _ nil.\\\\n\\\\t(ii _ owner submorphIndexOf: self) = 1 ifFalse: [\\\\n\\\\t\\\\ttt _ owner submorphs at: ii - 1.\\\\n\\\\t\\\\ttt isSyntaxMorph ifTrue: [\\\\n\\\\t\\\\t\\\\t(tt nodeClassIs: MethodTempsNode) ifTrue: [tempHolder _ tt].\\\\n\\\\t\\\\t\\\\t(tt nodeClassIs: UndefinedObject) ifTrue: [tempHolder _ tt findA: MethodTempsNode]]].\\\\n\\\\n\\\\ttempHolder ifNil: [\\\\n\\\\t\\\\ttempHolder _ owner addRow: #tempVariable on: MethodTempsNode new.\\\\n\\\\t\\\\ttempHolder addNoiseString: self noiseBeforeBlockArg.\\\\n\\\\t\\\\ttempHolder submorphs last firstSubmorph emphasis: TextEmphasis bold emphasisCode.\\\\n\\\\t\\\\ttempHolder useRoundedCorners.\\\\n\\\\n\\\\t\\\\towner addMorph: tempHolder inFrontOf: self.\\\\n\\\\t\\\\taMorph parseNode name: nn key: nn code: nil.\\\\n\\\\t\\\\taMorph parseNode asMorphicSyntaxIn: tempHolder.\\\\n\\\\t\\\\ttempHolder cleanupAfterItDroppedOnMe.\\\\n\\\\t\\\\t^ true].\\\\n\\\\n\\\\taMorph parseNode name: nn key: nn code: nil.\\\\n\\\\ttempHolder addMorphBack: (tempHolder transparentSpacerOfSize: 4@4).\\\\n\\\\tvar _ tempHolder addRow: #tempVariable on: aMorph parseNode.\\\\n\\\\tvar layoutInset: 1.\\\\n\\\\tvar addMorphBack: (self addString: nn special: false).\\\\n\\\\tvar cleanupAfterItDroppedOnMe.\\\\n\\\\t^ true! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'tk 8/10/2001 09:57'!\\\\naddTextRow: aStringLikeItem\\\\n\\\\n\\\\t| row tt |\\\\n\\\\t(row _ self class row: #text on: nil) borderWidth: 1.\\\\n\\\\t(tt _ TextMorph new) contents: aStringLikeItem.\\\\n\\\\trow addMorph: tt.\\\\n\\\\t\\\\\\\"row addMorph: (self addString: (aStringLikeItem copyWithout: Character cr) special: false).\\\\\\\"\\\\n\\\\tself addMorphBack: row.\\\\n\\\\t^row! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'tk 7/25/2001 10:01'!\\\\naddToBlock: aMorph event: evt\\\\n\\\\t\\\\\\\"Insert a new line of code.  Figure out who it goes before.  If evt Y is within an existing line (to the right of a tile), then replace that tile.\\\\\\\"\\\\n\\\\n\\\\t| whereDropped dropBefore replace |\\\\n\\\\twhereDropped _ \\\\\\\"self pointFromWorld:\\\\\\\" evt cursorPoint.\\\\n\\\\tdropBefore _ self submorphs \\\\n\\\\t\\\\tdetect: [:each | each isSyntaxMorph ifTrue: [\\\\n\\\\t\\\\t\\\\twhereDropped y < each top ifTrue: [true]\\\\t\\\\\\\"before this one\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [whereDropped y < each bottom \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [replace _ true]\\\\t\\\\\\\"replace this one\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [false]]]] \\\\\\\"try next line\\\\\\\"\\\\n\\\\t\\\\tifNone: [nil].\\\\n\\\\t(aMorph nodeClassIs: ReturnNode) ifTrue: [dropBefore _ nil].\\\\n\\\\t\\\\t\\\\\\\"Returns are always at the end. (Watch out for comments)\\\\\\\"\\\\n\\\\n\\\\tdropBefore \\\\n\\\\t\\\\tifNil: [self addMorphBack: aMorph]\\\\n\\\\t\\\\tifNotNil: [\\\\n\\\\t\\\\t\\\\treplace ifNotNil: [aMorph deselect.\\\\n\\\\t\\\\t\\\\t\\\\tself replaceSubmorph: dropBefore by: aMorph.\\\\t\\\\\\\"replace it!!\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t^ dropBefore cleanupAfterItDroppedOnMe].\\\\t\\\\\\\"now owned by no one\\\\\\\"\\\\n\\\\t\\\\t\\\\tself addMorph: aMorph inFrontOf: dropBefore].\\\\n\\\\tself cleanupAfterItDroppedOnMe.\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'FBS 2/24/2004 14:22'!\\\\naddToken: aString type: aColorOrSymbol on: aNode\\\\n\\\\n\\\\t| sMorph modifiedString noiseWord row |\\\\n\\\\n\\\\trow _ (self addRow: aColorOrSymbol on: aNode) layoutInset: 1.\\\\n\\\\tself alansTest1 ifFalse: [\\\\n\\\\t\\\\tsMorph _ self addString: aString special: false.\\\\n\\\\t\\\\trow addMorphBack: sMorph.\\\\n\\\\t\\\\t^row\\\\n\\\\t].\\\\n\\\\n\\\\tnoiseWord _ [ :w |\\\\n\\\\t\\\\tw ifNotNil: [\\\\n\\\\t\\\\t\\\\trow \\\\n\\\\t\\\\t\\\\t\\\\taddMorphBack: (self noiseStringMorph: w);\\\\n\\\\t\\\\t\\\\t\\\\taddMorphBack: (self tokenVerticalSeparator)\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\t(self shouldBeBrokenIntoWords: aColorOrSymbol) ifTrue: [\\\\n\\\\t\\\\tmodifiedString _ self substituteKeywordFor: aString.\\\\n\\\\t\\\\tsMorph _ self addString: modifiedString special: (aColorOrSymbol ~= #assignmentArrow).\\\\n\\\\t\\\\t\\\\t\\\\\\\"(#(unary keywordGetz keywordSetter unaryGetter) includes: aColorOrSymbol)\\\\\\\"\\\\n\\\\t\\\\tmodifiedString = aString ifFalse: [\\\\n\\\\t\\\\t\\\\tsMorph setProperty: #syntacticallyCorrectContents toValue: aString].\\\\n\\\\t\\\\tsMorph setProperty: #syntacticReformatting toValue: aColorOrSymbol;\\\\n\\\\t\\\\t\\\\tcontents: modifiedString.\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\tsMorph _ self addString: (modifiedString _ aString) special: false.\\\\n\\\\t].\\\\n\\\\t(#(keyword2 upArrow) includes: aColorOrSymbol) ifTrue: [\\\\n\\\\t\\\\tsMorph \\\\n\\\\t\\\\t\\\\tfont: (self fontToUseForSpecialWord: modifiedString).\\\\n\\\\t].\\\\n\\\\t(#(keyword2 unary assignmentArrow methodHeader1 methodHeader2) includes: aColorOrSymbol) ifTrue: [\\\\n\\\\t\\\\tsMorph emphasis: TextEmphasis bold emphasisCode.\\\\n\\\\t].\\\\n\\\\taColorOrSymbol == #blockarg1 ifTrue: [\\\\n\\\\t].\\\\n\\\\t(aColorOrSymbol == #variable or: [aColorOrSymbol == #tempVariable]) ifTrue: [\\\\n\\\\t\\\\taString = 'self' ifTrue: [\\\\n\\\\t\\\\t\\\\tsMorph setProperty: #wordyVariantOfSelf toValue: true.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tnoiseWord value: (self noiseWordBeforeVariableNode: aNode string: aString).\\\\n\\\\t].\\\\n\\\\n\\\\trow addMorphBack: sMorph.\\\\n\\\\t^row! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'RAA 3/25/2001 17:22'!\\\\naddTokenSpecialCase: aString type: aColorOrSymbol on: aNode\\\\n\\\\n\\\\t| sMorph modifiedString noiseWord col |\\\\n\\\\n\\\\tnoiseWord _ nil.\\\\n\\\\tsMorph _ self addString: aString special: false.\\\\n\\\\t(aColorOrSymbol == #keyword2) ifTrue: [\\\\n\\\\t\\\\tmodifiedString _ aString = 'if:' ifTrue: ['Test'] ifFalse: ['Yes'].\\\\n\\\\t\\\\tsMorph \\\\n\\\\t\\\\t\\\\tfont: (self fontToUseForSpecialWord: modifiedString); \\\\n\\\\t\\\\t\\\\tsetProperty: #syntacticallyCorrectContents toValue: aString;\\\\n\\\\t\\\\t\\\\tcontents: modifiedString.\\\\n\\\\t].\\\\n\\\\n\\\\tcol _ (self addRow: aColorOrSymbol on: aNode) layoutInset: 1.\\\\n\\\\tnoiseWord ifNotNil: [\\\\n\\\\t\\\\tcol \\\\n\\\\t\\\\t\\\\taddMorphBack: (self noiseStringMorph: noiseWord);\\\\n\\\\t\\\\t\\\\taddMorphBack: (self transparentSpacerOfSize: 3@1)\\\\n\\\\t].\\\\n\\\\tcol addMorphBack: sMorph.\\\\n\\\\t^col! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'tk 8/24/2001 15:21'!\\\\naddUnaryRow: aStringLikeItem style: aSymbol\\\\n\\\\n\\\\t| row sMorph modifiedString fontToUse |\\\\n\\\\n\\\\t(row _ self class row: #text on: nil) borderWidth: 1.\\\\n\\\\tmodifiedString _ self substituteKeywordFor: aStringLikeItem.\\\\n\\\\tsMorph _ self addString: modifiedString special: true.\\\\n\\\\tfontToUse _ self fontToUseForSpecialWord: modifiedString.\\\\n\\\\n\\\\tsMorph \\\\n\\\\t\\\\tfont: fontToUse emphasis: 1;\\\\n\\\\t\\\\tsetProperty: #syntacticReformatting toValue: #unary.\\\\n\\\\tmodifiedString = aStringLikeItem ifFalse: [\\\\n\\\\t\\\\tsMorph setProperty: #syntacticallyCorrectContents toValue: aStringLikeItem].\\\\n\\\\trow addMorph: sMorph.\\\\n\\\\tself addMorphBack: row.\\\\n\\\\t^row! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'RAA 2/15/2001 19:43'!\\\\nfoldMessage\\\\n\\\\t\\\\\\\"I am a message whose receiver is wide, and whose message part is a column.\\\\n\\\\tRearrange me so that the message part appears indented under the receiver part.\\\\\\\"\\\\n\\\\t| messageRow node2 |\\\\n\\\\tnode2 _ parseNode copy receiver: nil.\\\\n\\\\tmessageRow _ SyntaxMorph row: #keyword1 on: node2.\\\\n\\\\n\\\\tmessageRow \\\\n\\\\t\\\\taddMorph: (self transparentSpacerOfSize: 20@10);\\\\n\\\\t\\\\taddMorphBack: submorphs last.\\\\t\\\\t\\\\\\\"<<handle noise words better\\\\\\\"\\\\n\\\\tself listDirection: #topToBottom;\\\\n\\\\t\\\\twrapCentering: #topLeft;\\\\n\\\\t\\\\taddMorphBack: (self transparentSpacerOfSize: 4@4);\\\\n\\\\t\\\\taddMorphBack: messageRow.\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'tk 1/15/2001 11:15'!\\\\nfoldMessageOneArg\\\\n\\\\t\\\\\\\"I am a message that is wide, a row with receiver and a row with selector and arg.\\\\n\\\\tRearrange me so that the message part appears indented under the receiver part.\\\\\\\"\\\\n\\\\t| messageRow node2 |\\\\n\\\\tnode2 _ parseNode copy receiver: nil.\\\\n\\\\tmessageRow _ SyntaxMorph row: #keyword1 on: node2.\\\\n\\\\tmessageRow addMorph: (self transparentSpacerOfSize: 20@10);\\\\n\\\\t\\\\t\\\\taddMorphBack: submorphs second;\\\\n\\\\t\\\\t\\\\taddMorphBack: submorphs second.  \\\\\\\"was the third\\\\\\\"\\\\n\\\\tself listDirection: #topToBottom;\\\\n\\\\t\\\\twrapCentering: #topLeft;\\\\n\\\\t\\\\taddMorphBack: messageRow.\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'tk 8/22/2001 16:30'!\\\\nisKnownVarName: newVarName\\\\n\\\\t\\\\\\\"Return true if this variable is already known, as an argument, temp var, block temp, or instance variable.\\\\\\\"\\\\n\\\\n\\\\t| syntLevel |\\\\n\\\\t(self parsedInClass allInstVarNames includes: newVarName) ifTrue: [^ true].\\\\n\\\\tsyntLevel _ self.\\\\n\\\\t[syntLevel tempVarNodesDo: [:node | \\\\n\\\\t\\\\tnode decompile string = newVarName ifTrue: [^ true]].\\\\n\\\\t (syntLevel _ syntLevel owner) isSyntaxMorph] whileTrue.\\\\n\\\\t^ false! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'tk 8/1/2001 13:06'!\\\\nremoveReturnNode\\\\n\\\\t| blk |\\\\n\\\\t\\\\\\\"If last line is ^ self, remove it.  I am a methodNode.  Keep if no other tiles in the block.\\\\\\\"\\\\n\\\\n\\\\tblk _ self findA: BlockNode.\\\\n\\\\tblk submorphs last decompile string = '^self ' ifTrue: [\\\\n\\\\t\\\\t(blk submorphs count: [:ss | ss isSyntaxMorph]) > 1 ifTrue: [\\\\n\\\\t\\\\t\\\\tblk submorphs last delete]].! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'tk 8/22/2001 16:35'!\\\\ntempVarNodesDo: aBlock\\\\n\\\\t\\\\\\\"Execute the block for any block temporary variables, method temps, or method args we have\\\\\\\"\\\\n\\\\n\\\\t| tempHolder argsHolder |\\\\n\\\\t((self parseNode class == MethodNode) or: [self parseNode class == BlockNode]) ifTrue: [\\\\n\\\\t\\\\tself submorphsDoIfSyntax: [:sub | \\\\n\\\\t\\\\t\\\\t\\\\t(sub nodeClassIs: MethodTempsNode) ifTrue: [tempHolder _ sub].\\\\n\\\\t\\\\t\\\\t\\\\t((sub nodeClassIs: UndefinedObject) and: [tempHolder isNil]) ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttempHolder _ sub findA: MethodTempsNode].\\\\n\\\\t\\\\t\\\\t\\\\t(sub nodeClassIs: BlockArgsNode) ifTrue: [tempHolder _ sub].\\\\n\\\\t\\\\t\\\\t\\\\t(sub nodeClassIs: SelectorNode) ifTrue: [argsHolder _ sub].\\\\n\\\\t\\\\t\\\\t\\\\t]\\\\n\\\\t\\\\t\\\\tifString: [:sub | ].\\\\n\\\\t\\\\ttempHolder ifNotNil: [\\\\\\\"Temp variables\\\\\\\"\\\\n\\\\t\\\\t\\\\ttempHolder submorphsDoIfSyntax: [:sm | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(sm nodeClassIs: TempVariableNode) ifTrue: [aBlock value: sm]]\\\\n\\\\t\\\\t\\\\t\\\\tifString: [:sm | ]].\\\\n\\\\t\\\\targsHolder ifNotNil: [\\\\\\\"arguments\\\\\\\"\\\\n\\\\t\\\\t\\\\targsHolder submorphsDoIfSyntax: [:sm | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(sm nodeClassIs: TempVariableNode) ifTrue: [aBlock value: sm]]\\\\n\\\\t\\\\t\\\\t\\\\tifString: [:sm | ]].\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\\\\"otherwise do nothing\\\\\\\"! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'tk 2/12/2001 14:39'!\\\\ntry\\\\n\\\\t\\\\\\\"Evaluate me once\\\\\\\"\\\\n\\\\n\\\\t(#(MessageNode LiteralNode VariableNode) includes: parseNode class name) \\\\n\\\\t\\\\tifFalse: [^ Error new].\\\\n\\\\t^ [Compiler evaluate: self decompile\\\\n\\\\t\\\\t\\\\t\\\\tfor: self actualObject\\\\n\\\\t\\\\t\\\\t\\\\tlogged: false.\\\\t\\\\\\\"should do something to the player\\\\\\\"\\\\n\\\\t\\\\t] ifError: [ :a :b | Error new].! !\\\\n\\\\n!SyntaxMorph methodsFor: 'layout' stamp: 'ar 8/10/2003 18:19'!\\\\nunfoldMessage\\\\n\\\\t\\\\\\\"I am a message whose message part is a column.\\\\n\\\\tRearrange me so that the entire message is one row.\\\\\\\"\\\\n\\\\t| messageRow |\\\\n\\\\tmessageRow _ self submorphs last.\\\\n\\\\tself removeMorph: messageRow.\\\\n\\\\tmessageRow submorphs do: [:m | self addMorphBack: m].\\\\n\\\\n! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'macpal' stamp: 'sw 6/4/2001 19:26'!\\\\ncurrentVocabulary\\\\n\\\\t\\\\\\\"Answer the current vocabulary associated with the receiver.  If none is yet set, determine an appropriate vocabulary and cache it within my properties dictionary.\\\\\\\"\\\\n\\\\n\\\\t| aVocab aSym |\\\\n\\\\taSym _ self valueOfProperty: #currentVocabularySymbol ifAbsent: [nil].\\\\n\\\\taSym ifNil:\\\\n\\\\t\\\\t[aVocab _ self valueOfProperty: #currentVocabulary ifAbsent: [nil].\\\\n\\\\t\\\\taVocab ifNotNil:\\\\n\\\\t\\\\t\\\\t[aSym _ aVocab vocabularyName.\\\\n\\\\t\\\\t\\\\tself removeProperty: #currentVocabulary.\\\\n\\\\t\\\\t\\\\tself setProperty: #currentVocabularySymbol toValue: aSym]].\\\\n\\\\n\\\\taSym ifNotNil:\\\\n\\\\t\\\\t[^ Vocabulary vocabularyNamed: aSym].\\\\n\\\\taVocab _ super currentVocabulary.\\\\n\\\\tself setProperty: #currentVocabularySymbol toValue: aVocab vocabularyName.\\\\n\\\\t^ aVocab! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'menus' stamp: 'tk 9/27/2001 19:09'!\\\\naccept\\\\n\\\\t\\\\\\\"Turn my current state into the text of a method.  Compile it in my class.\\\\\\\"\\\\n\\\\n\\\\t^ self acceptInCategory: ClassOrganizer default! !\\\\n\\\\n!SyntaxMorph methodsFor: 'menus' stamp: 'tk 11/21/2000 16:35'!\\\\nacceptIfInScriptor\\\\n\\\\t| root |\\\\n\\\\t\\\\\\\"If I am in a ScriptEditorMorph, tell my root to accept the new changes.\\\\\\\"\\\\n\\\\n\\\\t(self ownerThatIsA: ScriptEditorMorph) ifNotNil: [\\\\n\\\\t\\\\troot _ self rootTile.\\\\n\\\\t\\\\troot ifNotNil: [root accept]]. ! !\\\\n\\\\n!SyntaxMorph methodsFor: 'menus' stamp: 'RAA 2/14/2001 15:40'!\\\\nacceptIgnoring: aString\\\\n\\\\t\\\\\\\"If I am inside a ScriptEditorMorph, tell my root to accept the new changes.  Ignore the argument, which is the string whose conents just changed.\\\\\\\"\\\\n\\\\n\\\\tthisContext sender receiver removeProperty: #syntacticallyCorrectContents.\\\\n\\\\tself acceptIfInScriptor! !\\\\n\\\\n!SyntaxMorph methodsFor: 'menus' stamp: 'tk 9/27/2001 17:15'!\\\\nacceptInCategory: categoryString\\\\n\\\\t\\\\\\\"Turn my current state into the text of a method.  Compile it in my class.\\\\\\\"\\\\n\\\\t| cls sc sel |\\\\n\\\\tself isMethodNode ifFalse: [\\\\n\\\\t\\\\tself rootTile == self ifTrue: [^ self].  \\\\\\\"not in a script\\\\\\\"\\\\n\\\\t\\\\t^ self rootTile accept  \\\\\\\"always accept at the root\\\\\\\"].\\\\n\\\\t(cls _ self parsedInClass) ifNil: [^ self].\\\\n\\\\tsel _ cls compile: self decompile classified: categoryString.\\\\n\\\\t(sc _ self firstOwnerSuchThat: [:mm | mm class == ScriptEditorMorph]) \\\\n\\\\t\\\\tifNotNil: [sc hibernate; unhibernate].\\\\t\\\\\\\"rebuild the tiles\\\\\\\"\\\\n\\\\t^ sel! !\\\\n\\\\n!SyntaxMorph methodsFor: 'menus' stamp: 'tk 9/27/2001 19:12'!\\\\nacceptSilently\\\\n\\\\t\\\\\\\"Turn my current state into the text of a method.\\\\n\\\\tCompile it in my class.  Don't rebuild the tiles.\\\\\\\"\\\\n\\\\t| cls |\\\\n\\\\tself isMethodNode ifFalse: [\\\\n\\\\t\\\\tself rootTile == self ifTrue: [^ false].  \\\\\\\"not in a script\\\\\\\"\\\\n\\\\t\\\\t^ self rootTile acceptSilently  \\\\\\\"always accept at the root\\\\\\\"].\\\\n\\\\t(self ownerThatIsA: ScriptEditorMorph) ifNil: [^ false].\\\\n\\\\t(cls _ self parsedInClass) ifNil: [^ false].\\\\n\\\\tcls compile: self decompile classified: 'scripts'.\\\\n\\\\t^ true! !\\\\n\\\\n!SyntaxMorph methodsFor: 'menus' stamp: 'di 5/4/2001 12:14'!\\\\nacceptUnlogged\\\\n\\\\t\\\\\\\"This is an exact copy of acceptSilently, except it does not log to the source file.\\\\n\\\\tUsed for all but the last of scrolling number changes.\\\\\\\"\\\\n\\\\t| cls |\\\\n\\\\tself isMethodNode ifFalse:\\\\n\\\\t\\\\t[self rootTile == self ifTrue: [^ self].  \\\\\\\"not in a script\\\\\\\"\\\\n\\\\t\\\\t^ self rootTile acceptUnlogged  \\\\\\\"always accept at the root\\\\\\\"].\\\\n\\\\t(self ownerThatIsA: ScriptEditorMorph) ifNil: [^ self].\\\\n\\\\t(cls _ self parsedInClass) ifNil: [^ self].\\\\n\\\\tcls compile: self decompile\\\\n\\\\t\\\\tclassified: ClassOrganizer default\\\\n\\\\t\\\\twithStamp: nil\\\\n\\\\t\\\\tnotifying: nil\\\\n\\\\t\\\\tlogSource: false.\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'menus' stamp: 'md 8/15/2005 11:02'!\\\\ndecompile\\\\n\\\\t| stream |\\\\n\\\\t\\\\\\\"Produce Smalltalk code.  We have a tree of SyntaxMorphs, but not a tree of ParseNodes.  The user has dragged in many SyntaxMorphs, each with its own parseNode, but those nodes are not sewn together in a tree.  The only data we get from a ParseNode is its class.\\\\n\\\\tWe produce really ugly code.  But we compile it and decompile (prettyPrint) again for user to see.\\\\\\\"\\\\n\\\\n\\\\tstream _ ColoredCodeStream on: (Text new: 400).\\\\n\\\\tself printOn: stream indent: 1.\\\\t\\\\\\\"Tree walk and produce text of the code\\\\\\\"\\\\n\\\\t^ stream contents! !\\\\n\\\\n!SyntaxMorph methodsFor: 'menus' stamp: 'di 11/13/2000 20:23'!\\\\ngetMenuBlock\\\\n\\\\n\\\\t^ nil! !\\\\n\\\\n!SyntaxMorph methodsFor: 'menus' stamp: 'tk 9/23/2001 02:05'!\\\\nofferTilesMenuFor: aReceiver in: aLexiconModel\\\\n\\\\t\\\\\\\"Offer a menu of tiles for assignment and constants\\\\\\\"\\\\n\\\\n\\\\t| menu |\\\\n\\\\tmenu _ MenuMorph new addTitle: 'Hand me a tile for...'.\\\\n\\\\tmenu addLine.\\\\n\\\\tmenu add: '(accept method now)' target: aLexiconModel selector: #acceptTiles.\\\\n\\\\tmenu submorphs last color: Color red darker.\\\\n\\\\tmenu addLine.\\\\n\\\\n\\\\tmenu add: 'me, by name' target: self  selector: #attachTileForCode:nodeType: \\\\n\\\\t\\\\t\\\\t\\\\targumentList: {'<me by name>'. aReceiver}.\\\\n\\\\tmenu add: 'self' target: self  selector: #attachTileForCode:nodeType: \\\\n\\\\t\\\\t\\\\t\\\\targumentList: {'self'. VariableNode}.\\\\n\\\\tmenu add: '_   (assignment)' target: self  selector: #attachTileForCode:nodeType: \\\\n\\\\t\\\\t\\\\t\\\\targumentList: {'<assignment>'. nil}.\\\\n\\\\tmenu add: '\\\\\\\"a Comment\\\\\\\"' target: self  selector: #attachTileForCode:nodeType: \\\\n\\\\t\\\\t\\\\t\\\\targumentList: {'\\\\\\\"a comment\\\\\\\"\\\\\\\\' withCRs. CommentNode}.\\\\n\\\\tmenu submorphs last color: Color blue.\\\\n\\\\tmenu add: 'a Number' target: self  selector: #attachTileForCode:nodeType: \\\\n\\\\t\\\\t\\\\t\\\\targumentList: {'5'. LiteralNode}.\\\\n\\\\tmenu add: 'a Character' target: self  selector: #attachTileForCode:nodeType: \\\\n\\\\t\\\\t\\\\t\\\\targumentList: {'$z'. LiteralNode}.\\\\n\\\\tmenu add: '''abc''' target: self selector: #attachTileForCode:nodeType: \\\\n\\\\t\\\\t\\\\t\\\\targumentList: {'''abc'''. LiteralNode}.\\\\n\\\\tmenu add: 'a Symbol constant' target: self selector: #attachTileForCode:nodeType: \\\\n\\\\t\\\\t\\\\t\\\\targumentList: {'#next'. LiteralNode}.\\\\n\\\\tmenu add: 'true' target: self selector: #attachTileForCode:nodeType: \\\\n\\\\t\\\\t\\\\t\\\\targumentList: {'true'. VariableNode}.\\\\n\\\\tmenu add: 'a Test' target: self  selector: #attachTileForCode:nodeType: \\\\n\\\\t\\\\t\\\\t\\\\targumentList: {'true ifTrue: [self] ifFalse: [self]'. MessageNode}.\\\\n\\\\tmenu add: 'a Loop' target: self selector: #attachTileForCode:nodeType: \\\\n\\\\t\\\\t\\\\t\\\\targumentList: {'1 to: 10 do: [:index | self]'. MessageNode}.\\\\n\\\\tmenu add: 'a Block' target: self selector: #attachTileForCode:nodeType: \\\\n\\\\t\\\\t\\\\t\\\\targumentList: {'[self]'. BlockNode}.\\\\n\\\\tmenu add: 'a Class or Global' target: self selector: #attachTileForCode:nodeType: \\\\n\\\\t\\\\t\\\\t\\\\targumentList: {'Character'. LiteralVariableNode}.\\\\n\\\\tmenu add: 'a Reply' target: self selector: #attachTileForCode:nodeType: \\\\n\\\\t\\\\t\\\\t\\\\targumentList: {'| temp | temp'. ReturnNode}.\\\\n\\\\tmenu popUpAt: ActiveHand position forHand: ActiveHand in: World.\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'menus' stamp: 'tk 9/17/2001 13:38'!\\\\nofferVarsMenuFor: aReceiver in: aLexiconModel\\\\n\\\\t\\\\\\\"Offer a menu of tiles for assignment and constants\\\\\\\"\\\\n\\\\n\\\\t| menu instVarList cls |\\\\n\\\\tmenu _ MenuMorph new addTitle: 'Hand me a tile for...'.\\\\n\\\\tmenu addLine.\\\\n\\\\tmenu add: '(accept method now)' target: aLexiconModel selector: #acceptTiles.\\\\n\\\\tmenu submorphs last color: Color red darker.\\\\n\\\\tmenu addLine.\\\\n\\\\tmenu add: 'new temp variable' target: self selector: #attachTileForCode:nodeType: \\\\n\\\\t\\\\t\\\\t\\\\targumentList: {'| temp | temp'. TempVariableNode}.\\\\n\\\\n\\\\tinstVarList _ OrderedCollection new.\\\\n\\\\tcls _ aReceiver class.\\\\n\\\\t[instVarList addAllFirst: cls instVarNames.\\\\n\\\\t cls == aLexiconModel limitClass] whileFalse: [cls _ cls superclass].\\\\n\\\\tinstVarList do: [:nn |\\\\n\\\\t\\\\tmenu add: nn target: self selector: #instVarTile: argument: nn].\\\\n\\\\tmenu popUpAt: ActiveHand position forHand: ActiveHand in: World.\\\\n\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'menus' stamp: 'tk 12/14/2001 11:58'!\\\\nputOnBackground\\\\n\\\\t\\\\\\\"Place the receiver, formerly private to its card, onto the shared background.  If the receiver needs data carried on its behalf by the card, such data will be represented on every card.\\\\\\\"\\\\n\\\\n\\\\t| updStr |\\\\n\\\\t(updStr _ self readOut) ifNotNil: [\\\\\\\"If has a place to put per-card data, set that up.\\\\\\\"\\\\n\\\\t\\\\tupdStr getSelector ifNotNil: [\\\\n\\\\t\\\\t\\\\tself setProperty: #holdsSeparateDataForEachInstance toValue: true]].\\\\n\\\\tsuper putOnBackground.! !\\\\n\\\\n!SyntaxMorph methodsFor: 'menus' stamp: 'di 11/17/2000 09:00'!\\\\nshowCode\\\\n\\\\t\\\\\\\"Turn my current state into the text of a method.  Put it in a window.\\\\\\\"\\\\n\\\\n\\\\t(Workspace new contents: self rootTile decompile) openLabel: self printString,' code'\\\\n\\\\n\\\\t\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'menus' stamp: 'tk 12/10/2001 17:48'!\\\\nshowMenu: evt\\\\n\\\\t| menu |\\\\n\\\\tmenu _ MenuMorph new.\\\\n\\\\tself rootTile isMethodNode ifTrue:\\\\n\\\\t\\\\t[menu add: 'accept method' target: self selector: #accept.\\\\n\\\\t\\\\tmenu addLine.\\\\n\\\\n\\\\t\\\\tmenu add: 'new temp variable' target: self selector: #attachTileForCode:nodeType: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\targumentList: {'| temp | temp'. TempVariableNode}.\\\\n\\\\t\\\\tmenu addLine.\\\\n\\\\n\\\\t\\\\tself parsedInClass allInstVarNames do: [:nn |\\\\n\\\\t\\\\t\\\\tmenu add: nn,' tile' target: self selector: #instVarTile: argument: nn].\\\\n\\\\t\\\\tmenu addLine.\\\\n\\\\n\\\\t\\\\tmenu add: 'show code' target: self selector: #showCode.\\\\n\\\\t\\\\tmenu add: 'try out' target: self selector: #try.\\\\n\\\\t\\\\tmenu popUpAt: evt hand position forHand: evt hand in: World].\\\\n\\\\n\\\\n\\\\n! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'new tiles' stamp: 'FBS 2/24/2004 14:32'!\\\\nattachTileForCode: expression nodeType: nodeClass\\\\n\\\\t| nn master tile |\\\\n\\\\t\\\\\\\"create a new tile for a part of speech, and put it into the hand\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"a few special cases\\\\\\\"\\\\n\\\\texpression = 'self' ifTrue: [\\\\n\\\\t\\\\t^ (((self string: expression toTilesIn: Object) \\\\n\\\\t\\\\t\\\\t\\\\tfindA: ReturnNode) findA: nodeClass) attachToHand].\\\\n\\\\n\\\\texpression = '<me by name>' ifTrue: [\\\\\\\"Tile for the variable in References\\\\\\\"\\\\n\\\\t\\\\tnn _ nodeClass knownName ifNil: [#+].\\\\n\\\\t\\\\t(References at: nn asSymbol ifAbsent: [nil]) == nodeClass ifTrue: [\\\\n\\\\t\\\\t\\\\t^ self attachTileForCode: nn nodeType: LiteralVariableNode].\\\\n\\\\t\\\\t\\\\\\\"otherwise just give a tile for self\\\\\\\"\\\\n\\\\t\\\\t^ self attachTileForCode: 'self' nodeType: VariableNode].\\\\n\\\\n\\\\texpression = '<assignment>' ifTrue: [\\\\\\\"do something really special\\\\\\\"\\\\n\\\\t\\\\tmaster _ self class new.\\\\n\\\\t\\\\tmaster addNoiseString: '  _  ' emphasis: TextEmphasis bold emphasisCode.\\\\n\\\\t\\\\ttile _ master firstSubmorph.\\\\n\\\\t\\\\t^ (tile parseNode: AssignmentNode new) attachToHand].\\\\t\\\\\\\"special marker\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"When this is dropped on a variable, enclose it in \\\\n\\\\t\\\\t\\\\ta new assignment statement\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"general case -- a tile for a whole line of code is returned\\\\\\\"\\\\n\\\\t^ ((self string: expression toTilesIn: Object) \\\\n\\\\t\\\\t\\\\t\\\\tfindA: nodeClass) attachToHand.! !\\\\n\\\\n!SyntaxMorph methodsFor: 'new tiles' stamp: 'tk 9/7/2001 11:21'!\\\\nattachToHand\\\\n\\\\t\\\\\\\"Adjust my look and attach me to the hand\\\\\\\"\\\\n\\\\n\\\\tself roundedCorners.\\\\n\\\\tActiveHand attachMorph: self.\\\\n\\\\tPreferences tileTranslucentDrag\\\\n\\\\t\\\\tifTrue: [self lookTranslucent.\\\\n\\\\t\\\\t\\\\tself align: self center with: ActiveHand position \\\\\\\"+ self cursorBaseOffset\\\\\\\"]\\\\n\\\\t\\\\tifFalse: [self align: self topLeft with: ActiveHand position + self cursorBaseOffset]\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'new tiles' stamp: 'tk 8/30/2001 06:22'!\\\\ninstVarTile: aName\\\\n\\\\t\\\\\\\"Make and put into hand a tile for an instance variable\\\\\\\"\\\\n\\\\n\\\\t| sm |\\\\n\\\\tsm _ ((VariableNode new\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tname: aName\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tindex: 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttype: 1 \\\\\\\"LdInstType\\\\\\\") asMorphicSyntaxIn: SyntaxMorph new).\\\\n\\\\tsm roundedCorners.\\\\n\\\\tActiveHand attachMorph: sm.\\\\n\\\\tPreferences tileTranslucentDrag\\\\n\\\\t\\\\tifTrue: [sm lookTranslucent.\\\\n\\\\t\\\\t\\\\tsm align: sm center with: ActiveHand position \\\\\\\"+ self cursorBaseOffset\\\\\\\"]\\\\n\\\\t\\\\tifFalse: [sm align: sm topLeft with: ActiveHand position + self cursorBaseOffset]\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'new tiles' stamp: 'tk 9/13/2001 13:44'!\\\\nstring: anExpression toTilesIn: playerClass\\\\n\\\\t| code tree methodNode |\\\\n\\\\t\\\\\\\"Construct SyntaxMorph tiles for some code.  Returns the main BlockNode of a doIt.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"This is really cheating!!  Make a true parse tree later. -tk\\\\\\\"\\\\n\\\\tcode _ String streamContents: [:strm | \\\\n\\\\t\\\\tstrm nextPutAll: 'doIt'; cr; tab; nextPutAll: anExpression].\\\\n\\\\t\\\\\\\"decompile to tiles\\\\\\\"\\\\n\\\\ttree _ Compiler new \\\\n\\\\t\\\\tparse: code \\\\n\\\\t\\\\tin: playerClass\\\\n\\\\t\\\\tnotifying: nil.\\\\n\\\\tmethodNode _ tree asMorphicSyntaxUsing: SyntaxMorph.\\\\n\\\\tanExpression first == $\\\\\\\" ifTrue: [\\\\\\\"a comment\\\\\\\" \\\\n\\\\t\\\\t\\\\\\\"(methodNode findA: CommentNode) firstSubmorph color: Color blue.\\\\\\\"\\\\n\\\\t\\\\t^ methodNode].\\\\n\\\\t^ methodNode submorphs detect: [:mm | \\\\n\\\\t\\\\t(mm respondsTo: #parseNode) \\\\n\\\\t\\\\t\\\\tifTrue: [mm parseNode class == BlockNode] \\\\n\\\\t\\\\t\\\\tifFalse: [false]].\\\\n! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'FBS 2/24/2004 14:23'!\\\\naddTemporaries: temporaries \\\\n\\\\t| tempMorph outerMorph w2 |\\\\n\\\\ttemporaries notEmpty ifFalse: [^self].\\\\n\\\\tself alansTest1 \\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[tempMorph := self addRow: #tempVariable on: MethodTempsNode new.\\\\n\\\\t\\\\t\\\\ttemporaries do: [:temp | temp asMorphicSyntaxIn: tempMorph]\\\\n\\\\t\\\\t\\\\t\\\\tseparatedBy: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[tempMorph addMorphBack: (tempMorph transparentSpacerOfSize: 4 @ 4)].\\\\n\\\\t\\\\t\\\\t^self].\\\\n\\\\touterMorph := self addRow: #tempVariable on: nil.\\\\n\\\\touterMorph setSpecialTempDeclarationFormat1.\\\\n\\\\touterMorph \\\\n\\\\t\\\\taddMorphBack: (w2 := self noiseStringMorph: self noiseBeforeBlockArg).\\\\n\\\\tw2 emphasis: TextEmphasis bold emphasisCode.\\\\n\\\\ttempMorph := outerMorph addRow: #tempVariable on: MethodTempsNode new.\\\\n\\\\ttempMorph setSpecialTempDeclarationFormat2.\\\\n\\\\ttemporaries do: \\\\n\\\\t\\\\t\\\\t[:temp | \\\\n\\\\t\\\\t\\\\ttempMorph \\\\n\\\\t\\\\t\\\\t\\\\taddToken: temp name\\\\n\\\\t\\\\t\\\\t\\\\ttype: #tempVariableDeclaration\\\\n\\\\t\\\\t\\\\t\\\\ton: temp]\\\\n\\\\t\\\\tseparatedBy: [tempMorph addMorphBack: self tokenVerticalSeparator]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'tk 7/31/2001 17:27'!\\\\naddTemporaryControls\\\\n\\\\n\\\\t| row stdSize |\\\\n\\\\t\\\\n\\\\tstdSize _ 8@8.\\\\n\\\\trow _ AlignmentMorph newRow\\\\n\\\\t\\\\tcolor: Color transparent;\\\\n\\\\t\\\\thResizing: #shrinkWrap;\\\\n\\\\t\\\\tvResizing: #shrinkWrap.\\\\n\\\\tself addMorphBack: row.\\\\n\\\\n\\\\t{\\\\n\\\\t\\\\tMorph new\\\\n\\\\t\\\\t\\\\textent: stdSize; \\\\n\\\\t\\\\t\\\\tcolor: Color paleBlue darker;\\\\n\\\\t\\\\t\\\\tsetBalloonText: 'Change the contrast';\\\\n\\\\t\\\\t\\\\ton: #mouseUp send: #controlContrast2: to: self;\\\\n\\\\t\\\\t\\\\ton: #mouseMove send: #controlContrast2: to: self;\\\\n\\\\t\\\\t\\\\ton: #mouseDown send: #controlContrast2: to: self.\\\\n\\\\n\\\\t\\\\\\\"Removed because it's default is giant tiles, which no one wants. --tk\\\\n\\\\t\\\\tMorph new\\\\n\\\\t\\\\t\\\\textent: stdSize; \\\\n\\\\t\\\\t\\\\tcolor: Color green;\\\\n\\\\t\\\\t\\\\tsetBalloonText: 'Change basic spacing';\\\\n\\\\t\\\\t\\\\ton: #mouseUp send: #controlSpacing2: to: self;\\\\n\\\\t\\\\t\\\\ton: #mouseMove send: #controlSpacing2: to: self;\\\\n\\\\t\\\\t\\\\ton: #mouseDown send: #controlSpacing2: to: self.\\\\n\\\\t\\\\\\\"\\\\n\\\\n\\\\t\\\\tMorph new\\\\n\\\\t\\\\t\\\\textent: stdSize; \\\\n\\\\t\\\\t\\\\tcolor: Color lightRed;\\\\n\\\\t\\\\t\\\\tsetBalloonText: 'Change basic style';\\\\n\\\\t\\\\t\\\\ton: #mouseUp send: #changeBasicStyle to: self.\\\\n\\\\n\\\\t} do: [ :each |\\\\n\\\\t\\\\trow addMorphBack: each.\\\\n\\\\t\\\\trow addMorphBack: (self transparentSpacerOfSize: stdSize).\\\\n\\\\t].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'yo 12/3/2004 17:01'!\\\\nalanBinaryPostRcvr: aNode key: key args: args\\\\n\\\\n\\\\t| nodeWithNilReceiver row |\\\\n\\\\n\\\\\\\"==\\\\nRepeat for collection [ collect ( from foo. blah blah foo blah) ]\\\\nRepeat for 1 to 50 [ do ( from i. blah blab i blah ) ]\\\\n==\\\\\\\"\\\\n\\\\n\\\\tnodeWithNilReceiver _ aNode copy receiver: nil.\\\\n\\\\t(row _ self addRow: #keyword2 on: nodeWithNilReceiver)\\\\n\\\\t\\\\tborderWidth: 1;\\\\n\\\\t\\\\tparseNode: (nodeWithNilReceiver as: MessageNode);\\\\n\\\\t\\\\tborderColor: row stdBorderColor.\\\\n\\\\trow addToken: key asString\\\\n\\\\t\\\\ttype: #binary\\\\n\\\\t\\\\ton: (SelectorNode new key: key asString code: nil \\\\\\\"fill this in?\\\\\\\").\\\\n\\\\targs first asMorphicSyntaxIn: row.\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'tk 7/30/2001 14:52'!\\\\nalanKeywordMessage: aNode isAConditional: template key: key args: args\\\\n\\\\n\\\\t| nodeWithNilReceiver column keywords row onlyOne |\\\\n\\\\n\\\\t(key == #collect: and: [args first isKindOf: BlockNode]) ifTrue: [\\\\n\\\\t\\\\t^self\\\\n\\\\t\\\\t\\\\talanKwdCollect: aNode \\\\n\\\\t\\\\t\\\\tisAConditional: template \\\\n\\\\t\\\\t\\\\tkey: key \\\\n\\\\t\\\\t\\\\targs: args\\\\n\\\\t].\\\\n\\\\tkey == #repeatFor:doing: ifTrue: [\\\\n\\\\t\\\\t^self\\\\n\\\\t\\\\t\\\\talanKwdRepeatForDoing: aNode \\\\n\\\\t\\\\t\\\\tisAConditional: template \\\\n\\\\t\\\\t\\\\tkey: key \\\\n\\\\t\\\\t\\\\targs: args\\\\n\\\\t].\\\\n\\\\tkey == #if:do: ifTrue: [\\\\n\\\\t\\\\t^self\\\\n\\\\t\\\\t\\\\talanKwdIfDo: aNode \\\\n\\\\t\\\\t\\\\tisAConditional: template \\\\n\\\\t\\\\t\\\\tkey: key \\\\n\\\\t\\\\t\\\\targs: args\\\\n\\\\t].\\\\n\\\\t(args size = 1 and: [key endsWith: 'Getz:']) ifTrue: [\\\\n\\\\t\\\\t^self\\\\n\\\\t\\\\t\\\\talanKwdSetter: aNode \\\\n\\\\t\\\\t\\\\tisAConditional: 0 \\\\n\\\\t\\\\t\\\\tkey: key \\\\n\\\\t\\\\t\\\\targs: args\\\\n\\\\t].\\\\n\\\\t(args size = 1 and: [self isStandardSetterKeyword: key]) ifTrue: [\\\\n\\\\t\\\\t^self\\\\n\\\\t\\\\t\\\\talanKwdSetter2: aNode \\\\n\\\\t\\\\t\\\\tisAConditional: 0 \\\\n\\\\t\\\\t\\\\tkey: key \\\\n\\\\t\\\\t\\\\targs: args\\\\n\\\\t].\\\\n\\\\tnodeWithNilReceiver _ aNode copy receiver: nil.\\\\n\\\\ttemplate = 1 ifTrue: [\\\\n\\\\t\\\\tself listDirection: #topToBottom.\\\\n\\\\t].\\\\n\\\\tcolumn _ self addColumn: #keyword1 on: nodeWithNilReceiver.\\\\n\\\\tkeywords _ key keywords.\\\\n\\\\tonlyOne _ args size = 1.\\\\n\\\\tonlyOne ifFalse: [\\\\\\\"necessary for three keyword messages!!\\\\\\\"\\\\n\\\\t\\\\tcolumn setProperty: #deselectedBorderColor toValue: column compoundBorderColor].\\\\n\\\\tkeywords\\\\n\\\\t\\\\twith: (args first: keywords size)\\\\n\\\\t\\\\tdo: [:kwd :arg |\\\\n\\\\t\\\\t\\\\ttemplate = 1 ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tcolumn addMorphBack: (column transparentSpacerOfSize: 3@3).\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\t(row _ column addRow: #keyword2 on: nodeWithNilReceiver)\\\\n\\\\t\\\\t\\\\t\\\\tparseNode: (nodeWithNilReceiver as: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(onlyOne ifTrue: [MessageNode] ifFalse: [MessagePartNode]));\\\\n\\\\t\\\\t\\\\t\\\\tborderColor: row stdBorderColor.\\\\n\\\\t\\\\t\\\\ttemplate = 1 ifTrue: [row addMorphBack: (row transparentSpacerOfSize: 20@6)].\\\\n\\\\t\\\\t\\\\trow addToken: kwd\\\\n\\\\t\\\\t\\\\t\\\\ttype: #keyword2\\\\n\\\\t\\\\t\\\\t\\\\ton: (onlyOne ifTrue: [SelectorNode new key: kwd code: nil \\\\\\\"fill this in?\\\\\\\"]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [KeyWordNode new]).\\\\n\\\\t\\\\t\\\\t(arg asMorphicSyntaxIn: row) setConditionalPartStyle.\\\\n\\\\t\\\\t].\\\\n\\\\tonlyOne ifTrue: [\\\\n\\\\t\\\\tself replaceSubmorph: column by: row.\\\\n\\\\t\\\\tcolumn _ row.\\\\n\\\\t].\\\\n\\\\t\\\\t\\\\t\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'RAA 3/25/2001 16:31'!\\\\nalanKwdCollect: aNode isAConditional: template key: key args: args\\\\n\\\\n\\\\t| nodeWithNilReceiver row kwdHolder |\\\\n\\\\n\\\\tnodeWithNilReceiver _ aNode copy receiver: nil.\\\\n\\\\t(row _ self addRow: #keyword2 on: nodeWithNilReceiver)\\\\n\\\\t\\\\tborderWidth: 1;\\\\n\\\\t\\\\tparseNode: (nodeWithNilReceiver as: MessageNode);\\\\n\\\\t\\\\tborderColor: row stdBorderColor.\\\\n\\\\tkwdHolder _ row\\\\n\\\\t\\\\taddToken: key\\\\n\\\\t\\\\ttype: #keyword2\\\\n\\\\t\\\\ton: (SelectorNode new key: key code: nil \\\\\\\"fill this in?\\\\\\\").\\\\n\\\\tkwdHolder firstSubmorph \\\\n\\\\t\\\\tsetProperty: #syntacticallyCorrectContents toValue: key asString;\\\\n\\\\t\\\\tcontents: ''.\\\\n\\\\n\\\\targs first asMorphicCollectSyntaxIn: row.\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'tk 7/30/2001 14:52'!\\\\nalanKwdIfDo: aNode isAConditional: template key: key args: args\\\\n\\\\t\\\\\\\"(know it has more than one arg)\\\\\\\"\\\\n\\\\t| nodeWithNilReceiver column keywords row |\\\\n\\\\n\\\\tnodeWithNilReceiver _ aNode copy receiver: nil.\\\\n\\\\tcolumn _ self addColumn: #keyword1 on: nodeWithNilReceiver.\\\\n\\\\t\\\\\\\"column borderColor: column compoundBorderColor.\\\\\\\"\\\\n\\\\tkeywords _ key keywords.\\\\n\\\\tkeywords\\\\n\\\\t\\\\twith: (args first: keywords size)\\\\n\\\\t\\\\tdo: [:kwd :arg |\\\\n\\\\t\\\\t\\\\t(row _ column addRow: #keyword2 on: nodeWithNilReceiver)\\\\n\\\\t\\\\t\\\\t\\\\tparseNode: (nodeWithNilReceiver as: MessagePartNode).\\\\n\\\\t\\\\t\\\\tkwd = 'do:' ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\trow addMorphBack: (row transparentSpacerOfSize: 26@6).\\\\n\\\\t\\\\t\\\\t] ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\trow addMorphBack: (row transparentSpacerOfSize: 10@6).\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\trow addTokenSpecialCase: kwd\\\\n\\\\t\\\\t\\\\t\\\\ttype: #keyword2\\\\n\\\\t\\\\t\\\\t\\\\ton: KeyWordNode new.\\\\n\\\\t\\\\t\\\\t(arg asMorphicSyntaxIn: row) setConditionalPartStyle.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\t\\\\t\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'RAA 2/28/2001 10:16'!\\\\nalanKwdRepeatForDoing: aNode isAConditional: template key: key args: args\\\\n\\\\n\\\\t| nodeWithNilReceiver row column keywords |\\\\n\\\\n\\\\tnodeWithNilReceiver _ aNode copy receiver: nil.\\\\n\\\\tcolumn _ self addColumn: #keyword1 on: nodeWithNilReceiver.\\\\n\\\\tkeywords _ key keywords.\\\\n\\\\tkeywords\\\\n\\\\t\\\\twith: (args first: keywords size)\\\\n\\\\t\\\\tdo: [:kwd :arg |\\\\n\\\\t\\\\t\\\\t(row _ column addRow: #keyword2 on: nodeWithNilReceiver)\\\\n\\\\t\\\\t\\\\t\\\\tparseNode: (nodeWithNilReceiver as: MessagePartNode).\\\\n\\\\t\\\\t\\\\trow addToken: kwd\\\\n\\\\t\\\\t\\\\t\\\\ttype: #keyword2\\\\n\\\\t\\\\t\\\\t\\\\ton: KeyWordNode new.\\\\n\\\\t\\\\t\\\\t(arg asMorphicSyntaxIn: row) setConditionalPartStyle.\\\\n\\\\t\\\\t].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'FBS 2/24/2004 14:22'!\\\\nalanKwdSetter2: aNode isAConditional: template key: key args: args\\\\n\\\\t\\\\\\\"translates\\\\n\\\\t\\\\tfoo setHeading: 0\\\\n\\\\tto\\\\n\\\\t\\\\tfoo's heading _ 0\\\\n\\\\t\\\\\\\"\\\\n\\\\t| kwdHolder wordy |\\\\n\\\\tkwdHolder _ self\\\\n\\\\t\\\\taddToken: key\\\\n\\\\t\\\\ttype: #keywordSetter\\\\n\\\\t\\\\ton: (SelectorNode new key: key code: nil \\\\\\\"fill this in?\\\\\\\").\\\\n\\\\twordy _ self translateToWordySetter: key.\\\\n\\\\tkwdHolder firstSubmorph \\\\n\\\\t\\\\tsetProperty: #syntacticReformatting toValue: #keywordSetter;\\\\n\\\\t\\\\tcontents: wordy;\\\\n\\\\t\\\\temphasis: TextEmphasis bold emphasisCode.\\\\n\\\\twordy = key asString ifFalse: [\\\\n\\\\t\\\\tkwdHolder firstSubmorph \\\\n\\\\t\\\\t\\\\tsetProperty: #syntacticallyCorrectContents toValue: key asString].\\\\n\\\\n\\\\t(args first asMorphicSyntaxIn: self) setConditionalPartStyle\\\\n\\\\t\\\\t\\\\t\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'FBS 2/24/2004 14:22'!\\\\nalanKwdSetter: aNode isAConditional: template key: key args: args\\\\n\\\\n\\\\t| nodeWithNilReceiver row kwdHolder |\\\\n\\\\n\\\\tnodeWithNilReceiver _ aNode copy receiver: nil.\\\\n\\\\t(row _ self addRow: #keyword2 on: nodeWithNilReceiver)\\\\n\\\\t\\\\tborderWidth: 1;\\\\n\\\\t\\\\tparseNode: (nodeWithNilReceiver as: MessageNode);\\\\n\\\\t\\\\tborderColor: row stdBorderColor.\\\\n\\\\trow addNoiseString: '''s' emphasis: TextEmphasis bold emphasisCode.\\\\n\\\\tkwdHolder _ row\\\\n\\\\t\\\\taddToken: key\\\\n\\\\t\\\\ttype: #keywordGetz\\\\n\\\\t\\\\ton: (SelectorNode new key: key code: nil \\\\\\\"fill this in?\\\\\\\").\\\\n\\\\tkwdHolder firstSubmorph \\\\n\\\\t\\\\tsetProperty: #syntacticReformatting toValue: #keywordGetz;\\\\n\\\\t\\\\tsetProperty: #syntacticallyCorrectContents toValue: key asString;\\\\n\\\\t\\\\tcontents: (self splitAtCapsAndDownshifted: (key asString allButLast: 5));\\\\n\\\\t\\\\temphasis: TextEmphasis bold emphasisCode.\\\\n\\\\trow addNoiseString: '_' emphasis: TextEmphasis bold emphasisCode.\\\\n\\\\n\\\\t(args first asMorphicSyntaxIn: row) setConditionalPartStyle\\\\n\\\\t\\\\t\\\\t\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'FBS 2/24/2004 14:21'!\\\\nalanUnaryGetter: aNode key: key\\\\n\\\\t\\\\\\\"I am a MessageNode.  Fill me with a SelectorNode {getX} whose string is {'s x}.  All on one level.\\\\\\\"\\\\n\\\\n\\\\t| selSyn usm wordy |\\\\n\\\\tselSyn _ self\\\\n\\\\t\\\\taddToken: key\\\\n\\\\t\\\\ttype: #unaryGetter\\\\n\\\\t\\\\ton: (SelectorNode new key: key code: nil \\\\\\\"fill this in?\\\\\\\").\\\\n\\\\tusm _ selSyn firstSubmorph.\\\\n\\\\tusm setProperty: #syntacticReformatting toValue: #unaryGetter.\\\\n\\\\twordy _ self translateToWordyGetter: key.\\\\n\\\\twordy = key asString ifFalse: [\\\\n\\\\t\\\\tusm setProperty: #syntacticallyCorrectContents toValue: key asString].\\\\n\\\\tusm contents: wordy; emphasis: TextEmphasis bold emphasisCode.\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'RAA 4/4/2001 12:49'!\\\\nalanUnaryPostRcvr: aNode key: key selector: selector\\\\n\\\\n\\\\t| row |\\\\n\\\\n\\\\t(self isStandardGetterSelector: key) ifTrue: [\\\\n\\\\t\\\\t^self alanUnaryGetter: aNode key: key\\\\n\\\\t].\\\\n\\\\trow _ (self addUnaryRow: key style: #unary) layoutInset: 1.\\\\n\\\\t^ row parseNode: selector\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'dgd 2/22/2003 13:38'!\\\\nalansMessageNode: aNode receiver: receiver selector: selector keywords: key arguments: args \\\\n\\\\t| receiverMorph testAndReceiver anotherSelf wordyMorph template |\\\\n\\\\ttemplate := self alansTemplateStyleFor: key.\\\\n\\\\treceiver ifNotNil: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"i.e. not a cascade\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\tanotherSelf := self constructSelfVariant: receiver and: key.\\\\n\\\\t\\\\t\\\\tanotherSelf ifNotNil: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[wordyMorph := self addString: anotherSelf special: false.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\twordyMorph setProperty: #wordyVariantOfSelf toValue: true.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself addMorph: wordyMorph.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself layoutInset: 1.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^self].\\\\n\\\\t\\\\t\\\\ttestAndReceiver := self.\\\\n\\\\t\\\\t\\\\ttemplate = 1 \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[testAndReceiver := self addRow: #keyword1 on: nil.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tself setSpecialOuterTestFormat.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttestAndReceiver addNoiseString: 'Test'].\\\\n\\\\t\\\\t\\\\tfalse \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[\\\\\\\"template = 2\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttestAndReceiver := self addRow: #keyword1 on: nil.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"self setSpecialOuterTestFormat.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\ttestAndReceiver addNoiseString: 'Repeat for'].\\\\n\\\\t\\\\t\\\\treceiverMorph := receiver asMorphicSyntaxIn: testAndReceiver.\\\\n\\\\t\\\\t\\\\ttemplate = 1 ifTrue: [receiverMorph setConditionalPartStyle]].\\\\n\\\\n\\\\t\\\\\\\"unary messages\\\\\\\"\\\\n\\\\targs isEmpty \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[^self \\\\n\\\\t\\\\t\\\\t\\\\talanUnaryPostRcvr: aNode\\\\n\\\\t\\\\t\\\\t\\\\tkey: key\\\\n\\\\t\\\\t\\\\t\\\\tselector: selector].\\\\n\\\\n\\\\t\\\\\\\"binary messages\\\\\\\"\\\\n\\\\tkey last = $: \\\\n\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t[^self \\\\n\\\\t\\\\t\\\\t\\\\talanBinaryPostRcvr: aNode\\\\n\\\\t\\\\t\\\\t\\\\tkey: key\\\\n\\\\t\\\\t\\\\t\\\\targs: args].\\\\n\\\\n\\\\t\\\\\\\"keyword messages\\\\\\\"\\\\n\\\\treceiverMorph ifNotNil: [receiverMorph setConditionalPartStyle].\\\\n\\\\tself setSpecialOuterTestFormat.\\\\n\\\\tself \\\\n\\\\t\\\\talanKeywordMessage: aNode\\\\n\\\\t\\\\tisAConditional: template\\\\n\\\\t\\\\tkey: key\\\\n\\\\t\\\\targs: args! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'RAA 2/27/2001 14:19'!\\\\nassignmentNode: aNode variable: variable value: value\\\\n\\\\n\\\\t| row v expMorph |\\\\n\\\\n\\\\trow _ self addRow: #assignment on: aNode.\\\\n\\\\tv _ variable asMorphicSyntaxIn: row.\\\\n\\\\tself alansTest1 ifTrue: [v setConditionalPartStyle; layoutInset: 2].\\\\n\\\\trow addToken: ' _ ' type: #assignmentArrow on: aNode.\\\\n\\\\texpMorph _ value asMorphicSyntaxIn: row.\\\\n\\\\tself alansTest1 ifTrue: [\\\\n\\\\t\\\\trow setSpecialOuterTestFormat.\\\\n\\\\t\\\\t(expMorph hasProperty: #deselectedColor) ifFalse: [expMorph setConditionalPartStyle].\\\\n\\\\t].\\\\n\\\\t^row\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'dgd 2/22/2003 13:39'!\\\\nblockNode: aNode arguments: arguments statements: statements \\\\n\\\\t| row column |\\\\n\\\\tcolumn := self addColumn: #block on: aNode.\\\\n\\\\tself alansTest1 ifFalse: [column layoutInset: 5 @ -1].\\\\n\\\\tself alansTest1 \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[column setProperty: #deselectedBorderColor toValue: self lighterColor].\\\\n\\\\taNode addCommentToMorph: column.\\\\n\\\\targuments notEmpty \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[row := column addRow: #blockarg1 on: BlockArgsNode new.\\\\n\\\\t\\\\t\\\\trow addNoiseString: self noiseBeforeBlockArg.\\\\n\\\\t\\\\t\\\\targuments do: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:arg | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\trow \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taddToken: arg name\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttype: #blockarg2\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ton: arg]].\\\\n\\\\tstatements do: \\\\n\\\\t\\\\t\\\\t[:each | \\\\n\\\\t\\\\t\\\\t(row := each asMorphicSyntaxIn: column) borderWidth: 1.\\\\n\\\\t\\\\t\\\\tself alansTest1 ifTrue: [row setSpecialOuterTestFormat].\\\\n\\\\t\\\\t\\\\teach addCommentToMorph: column].\\\\n\\\\t^column! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'FBS 2/24/2004 14:32'!\\\\nblockNodeCollect: aNode arguments: arguments statements: statements \\\\n\\\\t| row column c2 r2 r3 |\\\\n\\\\tcolumn := self addColumn: #blockCollectOnly on: aNode.\\\\n\\\\tself alansTest1 ifFalse: [column layoutInset: 5 @ -1].\\\\n\\\\taNode addCommentToMorph: column.\\\\n\\\\targuments notEmpty \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[row := column addRow: #blockarg1 on: BlockArgsNode new.\\\\n\\\\t\\\\t\\\\trow addNoiseString: 'collect using' emphasis: TextEmphasis bold emphasisCode.\\\\n\\\\t\\\\t\\\\tr3 := row addRow: #blockarg1b on: nil.\\\\t\\\\\\\"aNode\\\\\\\"\\\\n\\\\t\\\\t\\\\tr3 setConditionalPartStyle.\\\\n\\\\t\\\\t\\\\targuments do: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:arg | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tr3 \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taddToken: arg name\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttype: #blockarg2\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ton: arg]].\\\\n\\\\tr2 := column addRow: #block on: aNode.\\\\n\\\\tr2 setProperty: #ignoreNodeWhenPrinting toValue: true.\\\\n\\\\tr2 addNoiseString: self noiseBeforeBlockArg emphasis: TextEmphasis bold emphasisCode.\\\\n\\\\tc2 := r2 addColumn: #block on: aNode.\\\\n\\\\tc2 setProperty: #ignoreNodeWhenPrinting toValue: true.\\\\n\\\\tstatements do: \\\\n\\\\t\\\\t\\\\t[:each | \\\\n\\\\t\\\\t\\\\t(each asMorphicSyntaxIn: c2) borderWidth: 1.\\\\n\\\\t\\\\t\\\\teach addCommentToMorph: c2].\\\\n\\\\t^column! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'RAA 2/22/2001 17:00'!\\\\ncascadeNode: aNode receiver: receiver messages: messages\\\\n\\\\t| row |\\\\n\\\\n\\\\tself alansTest1 ifTrue: [\\\\n\\\\t\\\\trow _ self addColumn: #cascade on: aNode.\\\\n\\\\t\\\\trow setSpecialOuterTestFormat.\\\\n\\\\t] ifFalse: [\\\\n\\\\t\\\\trow _ self addRow: #cascade on: aNode\\\\n\\\\t].\\\\n\\\\treceiver asMorphicSyntaxIn: row.\\\\n\\\\tmessages do: [:m | m asMorphicSyntaxIn: row].\\\\n\\\\t^ row\\\\n\\\\n\\\\\\\"\\\\t(node2 _ aNode copy) receiver: nil messages: messages.\\\\n\\\\tcascadeMorph _ row addColumn: #cascade2 on: node2.\\\\n\\\\tmessages do: [ :m | m asMorphicSyntaxIn: cascadeMorph].\\\\n\\\\t^row\\\\n\\\\\\\"\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'RAA 2/16/2001 16:34'!\\\\nchangeBasicStyle\\\\n\\\\n\\\\tself removeAllMorphs.\\\\n\\\\tself setProperty: #alansNewStyle toValue: self alansTest1 not.\\\\n\\\\tself methodNodeOuter: parseNode\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'gm 2/22/2003 13:42'!\\\\nfinalAppearanceTweaks\\\\n\\\\t| deletes lw |\\\\n\\\\tSizeScaleFactor ifNil: [SizeScaleFactor := 0.15].\\\\n\\\\tSizeScaleFactor := 0.0.\\\\t\\\\\\\"disable this feature.  Default was for giant tiles\\\\\\\"\\\\n\\\\tself usingClassicTiles \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[self \\\\n\\\\t\\\\t\\\\t\\\\tallMorphsDo: [:each | (each isSyntaxMorph) ifTrue: [each lookClassic]].\\\\n\\\\t\\\\t\\\\t^self].\\\\n\\\\tdeletes := OrderedCollection new.\\\\n\\\\tself allMorphsDo: \\\\n\\\\t\\\\t\\\\t[:each | \\\\n\\\\t\\\\t\\\\t(each respondsTo: #setDeselectedColor) ifTrue: [each setDeselectedColor].\\\\n\\\\t\\\\t\\\\t\\\\\\\"(each hasProperty: #variableInsetSize) ifTrue: [\\\\n\\\\t\\\\t\\\\teach layoutInset: \\\\n\\\\t\\\\t\\\\t\\\\t((each valueOfProperty: #variableInsetSize) * SizeScaleFactor) rounded].\\\\\\\"\\\\n\\\\t\\\\t\\\\teach isSyntaxMorph \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[lw := each layoutInset.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tlw isPoint ifTrue: [lw := lw x].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\teach layoutInset: lw @ 0\\\\t\\\\\\\"(6 * SizeScaleFactor) rounded\\\\\\\"]].\\\\n\\\\tdeletes do: [:each | each delete]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'yo 11/11/2002 10:30'!\\\\nisStandardGetterSelector: key\\\\n\\\\n\\\\tself flag: #yoCharCases.\\\\n\\\\n\\\\tkey size > 3 ifFalse: [^false].\\\\n\\\\t(key beginsWith: 'get') ifFalse: [^false].\\\\n\\\\tkey fourth isUppercase ifFalse: [^false].\\\\n\\\\t^true\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'yo 11/11/2002 10:31'!\\\\nisStandardSetterKeyword: key\\\\n\\\\n\\\\tself flag: #yoCharCases.\\\\n\\\\n\\\\tkey size > 4 ifFalse: [^false].\\\\n\\\\t(key endsWith: ':') ifFalse: [^false].\\\\n\\\\t(key beginsWith: 'set') ifFalse: [^false].\\\\n\\\\tkey fourth isUppercase ifFalse: [^false].\\\\n\\\\t^true\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'dgd 2/22/2003 13:39'!\\\\nmessageNode: aNode receiver: receiver selector: selector keywords: key arguments: args \\\\n\\\\t| keywords column row receiverMorph receiverWidth messageWidth onlyOne nodeWithNilReceiver isAConditional |\\\\n\\\\tself alansTest1 \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[^self \\\\n\\\\t\\\\t\\\\t\\\\talansMessageNode: aNode\\\\n\\\\t\\\\t\\\\t\\\\treceiver: receiver\\\\n\\\\t\\\\t\\\\t\\\\tselector: selector\\\\n\\\\t\\\\t\\\\t\\\\tkeywords: key\\\\n\\\\t\\\\t\\\\t\\\\targuments: args].\\\\n\\\\tisAConditional := #(#ifTrue: #ifFalse: #ifTrue:ifFalse: #ifFalse:ifTrue:) \\\\n\\\\t\\\\t\\\\t\\\\tincludes: key.\\\\n\\\\treceiver ifNotNil: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"i.e. not a cascade\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\treceiverMorph := receiver asMorphicSyntaxIn: self].\\\\n\\\\tkeywords := key keywords.\\\\n\\\\targs isEmpty \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[row := (self addSingleKeywordRow: key) layoutInset: 1.\\\\n\\\\t\\\\t\\\\t^row parseNode: selector].\\\\n\\\\treceiverWidth := receiver ifNil: [0]\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil: [receiverMorph fullBounds width].\\\\n\\\\tonlyOne := args size = 1.\\\\n\\\\t(receiverWidth <= 80 and: [onlyOne]) \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[self \\\\n\\\\t\\\\t\\\\t\\\\tmessageOneArg: key\\\\n\\\\t\\\\t\\\\t\\\\treceiver: receiver\\\\n\\\\t\\\\t\\\\t\\\\tselector: selector\\\\n\\\\t\\\\t\\\\t\\\\targs: args.\\\\n\\\\t\\\\t\\\\t^self].\\\\n\\\\tnodeWithNilReceiver := aNode copy receiver: nil.\\\\n\\\\tcolumn := self addColumn: #keyword1 on: nodeWithNilReceiver.\\\\n\\\\t\\\\\\\"onlyOne ifTrue: [column parseNode: nil].\\\\tis a spacer\\\\\\\"\\\\n\\\\tmessageWidth := 0.\\\\n\\\\tkeywords with: (args copyFrom: 1 to: keywords size)\\\\n\\\\t\\\\tdo: \\\\n\\\\t\\\\t\\\\t[:kwd :arg | \\\\n\\\\t\\\\t\\\\tisAConditional \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [column addMorphBack: (column transparentSpacerOfSize: 3 @ 3)].\\\\n\\\\t\\\\t\\\\t(row := column addRow: #keyword2 on: nodeWithNilReceiver)\\\\n\\\\t\\\\t\\\\t\\\\tborderWidth: 1;\\\\n\\\\t\\\\t\\\\t\\\\tparseNode: (nodeWithNilReceiver \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tas: (onlyOne ifTrue: [MessageNode] ifFalse: [MessagePartNode]));\\\\n\\\\t\\\\t\\\\t\\\\tborderColor: row stdBorderColor.\\\\n\\\\t\\\\t\\\\tisAConditional \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [row addMorphBack: (row transparentSpacerOfSize: 20 @ 6)].\\\\n\\\\t\\\\t\\\\trow \\\\n\\\\t\\\\t\\\\t\\\\taddToken: kwd\\\\n\\\\t\\\\t\\\\t\\\\ttype: #keyword2\\\\n\\\\t\\\\t\\\\t\\\\ton: (onlyOne \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [SelectorNode new key: kwd code: nil\\\\t\\\\\\\"fill this in?\\\\\\\"]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [KeyWordNode new]).\\\\n\\\\t\\\\t\\\\targ asMorphicSyntaxIn: row.\\\\n\\\\t\\\\t\\\\tmessageWidth := messageWidth + row fullBounds width].\\\\n\\\\tonlyOne \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[self replaceSubmorph: column by: row.\\\\n\\\\t\\\\t\\\\tcolumn := row].\\\\n\\\\treceiverMorph ifNil: [^self].\\\\n\\\\treceiverWidth + messageWidth < 350 \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[isAConditional ifFalse: [self unfoldMessage].\\\\n\\\\t\\\\t\\\\t^self].\\\\n\\\\t((receiverWidth > 200 \\\\n\\\\t\\\\tor: [receiverWidth > 80 and: [column fullBounds height > 20]]) or: \\\\n\\\\t\\\\t\\\\t\\\\t[receiverMorph fullBounds width > 30 \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [column fullBounds height > 100 or: [column fullBounds width > 250]]]) \\\\n\\\\t\\\\tifTrue: [^self foldMessage]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'RAA 2/26/2001 14:04'!\\\\nmessageOneArg: key receiver: receiver selector: selector args: args\\\\n\\\\n\\\\t| row firstArgMorph |\\\\n\\\\n\\\\trow _ (self addSingleKeywordRow: key) layoutInset: 1.\\\\n\\\\trow parseNode: selector.\\\\n\\\\tfirstArgMorph _ args first asMorphicSyntaxIn: self.\\\\n\\\\treceiver ifNil: [^ self].\\\\n\\\\t(firstArgMorph fullBounds height > 100\\\\n\\\\t\\\\t\\\\tor: [firstArgMorph fullBounds width > 250])\\\\n\\\\t\\\\tifTrue: [self foldMessageOneArg].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'RAA 2/26/2001 17:12'!\\\\nmethodNodeInner: aNode selectorOrFalse: selectorOrFalse precedence: precedence arguments: arguments temporaries: temporaries primitive: primitive block: block\\\\n\\\\t| header selNode |\\\\n\\\\n\\\\tselNode _ selectorOrFalse class == SelectorNode \\\\n\\\\t\\\\tifTrue: [selectorOrFalse] \\\\n\\\\t\\\\tifFalse: [SelectorNode new key: selectorOrFalse code: nil].\\\\n\\\\theader _ self addRow: Color white on: selNode.\\\\n\\\\tprecedence = 1\\\\n\\\\t\\\\tifTrue: [header addToken: aNode selector type: #methodHeader1 on: selNode]\\\\n\\\\t\\\\tifFalse: [aNode selector keywords with: arguments do:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:kwd :arg | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\theader addToken: kwd type: #methodHeader2 on: selNode.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(arg asMorphicSyntaxIn: header) color: #blockarg2]].\\\\n\\\\taNode addCommentToMorph: self.\\\\n\\\\tself addTemporaries: temporaries.\\\\n\\\\t(primitive > 0 and: [(primitive between: 255 and: 519) not]) ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"Dont decompile <prim> for, eg, ^ self \\\\\\\"\\\\n\\\\t\\\\tself addTextRow: (String streamContents: [ :strm | aNode printPrimitiveOn: strm])].\\\\n\\\\tblock asMorphicSyntaxIn: self.\\\\n\\\\t^ self\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'tk 7/31/2001 17:37'!\\\\nmethodNodeOuter: aNode\\\\n\\\\n\\\\t| block |\\\\n\\\\t\\\\n\\\\tself borderWidth: 0.\\\\n\\\\taNode asMorphicSyntaxIn: self.\\\\n\\\\tself alansTest1 ifTrue: [self addTemporaryControls].\\\\n\\\\tself finalAppearanceTweaks.\\\\n\\\\t\\\\t\\\\\\\"self setProperty: #deselectedColor toValue: Color transparent.\\\\\\\"\\\\n\\\\tblock _ self findA: BlockNode.\\\\n\\\\t\\\\t\\\\\\\"block setProperty: #deselectedColor toValue: Color transparent.\\\\\\\"\\\\n\\\\tblock submorphs size = 1 ifTrue: [^ self].\\\\t\\\\\\\"keep '^ self' if that is the only thing in method\\\\\\\"\\\\n\\\\tblock submorphs last decompile string = '^  self ' ifTrue: [\\\\n\\\\t\\\\tblock submorphs last delete].\\\\n\\\\t^ self! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node to morph' stamp: 'RAA 2/15/2001 19:49'!\\\\nvanillaMessageNode: aNode receiver: receiver selector: selector arguments: arguments\\\\n\\\\n\\\\t| substitute row sel |\\\\n\\\\tsel _ #message.\\\\n\\\\t((self nodeClassIs: CascadeNode) and: [self parseNode receiver ~~ aNode]) ifTrue: [\\\\n\\\\t\\\\tsel _ #keyword2.\\\\n\\\\t\\\\treceiver ifNotNil: [self inform: 'receiver should be nil']].\\\\n\\\\trow _ self addRow: sel on: aNode.\\\\n\\\\tsubstitute _ aNode as: TileMessageNode.\\\\n\\\\t(aNode macroPrinter == #printCaseOn:indent:) ifTrue: [\\\\n\\\\t\\\\taNode asMorphicCaseOn: row indent: nil.\\\\n\\\\t\\\\t^ self].\\\\n\\\\taNode macroPrinter\\\\n\\\\t\\\\tifNotNil: \\\\n\\\\t\\\\t\\\\t[substitute perform: aNode macroPrinter with: row with: nil]\\\\n\\\\t\\\\tifNil: \\\\n\\\\t\\\\t\\\\t[substitute \\\\n\\\\t\\\\t\\\\t\\\\tprintKeywords: selector key\\\\n\\\\t\\\\t\\\\t\\\\targuments: arguments\\\\n\\\\t\\\\t\\\\t\\\\ton: row\\\\n\\\\t\\\\t\\\\t\\\\tindent: nil].\\\\n\\\\t^ row addTransparentSpacerOfSize: 3@0.\\\\t\\\\\\\"horizontal spacing only\\\\\\\"\\\\n! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'node types' stamp: 'RAA 2/14/2001 20:34'!\\\\nimmediatelyBelowTheMethodNode\\\\n\\\\n\\\\t^(owner respondsTo: #isMethodNode) and: [owner isMethodNode]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node types' stamp: 'tk 8/24/2001 15:41'!\\\\nisAVariable\\\\n\\\\t\\\\\\\"There are three kinds of variable nodes\\\\\\\"\\\\n\\\\n\\\\t((parseNode class == TempVariableNode) or: [\\\\n\\\\t\\\\t(parseNode class == LiteralVariableNode) or: [\\\\n\\\\t\\\\t\\\\tparseNode class == VariableNode]]) ifFalse: [^ false].\\\\n\\\\t^ (ClassBuilder new reservedNames includes: \\\\n\\\\t\\\\t\\\\tself decompile string withoutTrailingBlanks) not! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node types' stamp: 'di 11/17/2000 08:31'!\\\\nisBlockNode\\\\n\\\\t^ parseNode class == BlockNode! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node types' stamp: 'tk 9/26/2001 05:50'!\\\\nisDeclaration\\\\n\\\\t\\\\\\\"Return true if I am a TempVarNode inside a declaration of some kind, including a method arg\\\\\\\"\\\\n\\\\n\\\\t| opc |\\\\n\\\\towner isSyntaxMorph ifFalse: [^ false].\\\\n\\\\topc _ owner parseNode class.\\\\n\\\\topc == BlockArgsNode ifTrue: [^ true].\\\\n\\\\topc == MethodTempsNode ifTrue: [^ true].\\\\n\\\\topc == SelectorNode ifTrue: [^ true].\\\\n\\\\t^ false! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node types' stamp: 'gm 2/22/2003 12:30'!\\\\nisLeafTile\\\\n\\\\tself hasSubmorphs ifFalse: [^false].\\\\n\\\\t(self firstSubmorph isSyntaxMorph) ifTrue: [^false].\\\\n\\\\t(self firstSubmorph isMemberOf: Morph) ifTrue: [^false].\\\\n\\\\t^true! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node types' stamp: 'di 11/17/2000 08:31'!\\\\nisMethodNode\\\\n\\\\t^ parseNode class == MethodNode! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node types' stamp: 'tk 9/13/2001 15:28'!\\\\nisNoun\\\\n\\\\t\\\\\\\"Consider these to be nouns:  MessageNode with receiver, CascadeNode with receiver, AssignmentNode, TempVariableNode, LiteralNode, VariableNode, LiteralVariableNode.\\\\\\\"\\\\n\\\\n\\\\t(#(TempVariableNode LiteralNode VariableNode LiteralVariableNode) includes:\\\\n\\\\t\\\\t(parseNode class name)) ifTrue: [^ true].\\\\n\\\\n\\\\t(self nodeClassIs: MessageNode) ifTrue: [^ parseNode receiver notNil].\\\\n\\\\t(self nodeClassIs: CascadeNode) ifTrue: [^ parseNode receiver notNil].\\\\n\\\\t(self nodeClassIs: AssignmentNode) ifTrue: [^ submorphs size >= 3].\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node types' stamp: 'tk 9/23/2001 00:17'!\\\\nisSelfTile\\\\n\\\\n\\\\t^ parseNode class == VariableNode and: [self decompile asString = 'self ']\\\\n\\\\t! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node types' stamp: 'di 11/6/2000 15:26'!\\\\nnodeClassIs: aParseNodeClass\\\\n\\\\t\\\\\\\"Test the class of my parseNode\\\\\\\"\\\\n\\\\n\\\\t^ parseNode class == aParseNodeClass! !\\\\n\\\\n!SyntaxMorph methodsFor: 'node types' stamp: 'dgd 2/22/2003 13:40'!\\\\nrootTile\\\\n\\\\t^self \\\\n\\\\t\\\\torOwnerSuchThat: [:m | m owner isNil or: [m owner isSyntaxMorph not]]! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'player' stamp: 'tk 9/26/2001 06:05'!\\\\ncurrentDataValue\\\\n\\\\t\\\\\\\"Answer the current data value held by the receiver\\\\\\\"\\\\n\\\\n\\\\t^ self readOut valueFromContents! !\\\\n\\\\n!SyntaxMorph methodsFor: 'player' stamp: 'tk 2/15/2002 13:03'!\\\\nvariableDocks\\\\n\\\\t\\\\\\\"Answer a list of VariableDock objects for docking up my data with an instance held in my containing playfield.  For a numeric-readout tile.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Is CardPlayer class holding my variableDock, or should I be using the caching mechanism in Morph>>variableDocks?\\\\\\\"\\\\n\\\\t| updatingString lab nn aGetter |\\\\n\\\\t(updatingString _ self readOut) ifNil: [^ #()].\\\\n\\\\tupdatingString getSelector ifNil: [\\\\n\\\\t\\\\tlab _ self submorphNamed: 'label' ifNone: [self defaultName].\\\\n\\\\t\\\\tnn _ lab contents asString.\\\\n\\\\t\\\\t\\\\\\\"nn at: 1 put: nn first asUppercase.\\\\\\\"\\\\n\\\\t\\\\tupdatingString getSelector: (aGetter _ 'get',nn) asSymbol;\\\\n\\\\t\\\\t\\\\tputSelector: (ScriptingSystem setterSelectorForGetter: aGetter).\\\\n\\\\t\\\\t].\\\\n\\\\t^ Array with: (VariableDock new \\\\n\\\\t\\\\t\\\\tvariableName: (updatingString getSelector allButFirst: 3) withFirstCharacterDownshifted \\\\n\\\\t\\\\t\\\\ttype: #number \\\\n\\\\t\\\\t\\\\tdefiningMorph: updatingString \\\\n\\\\t\\\\t\\\\tmorphGetSelector: #valueFromContents \\\\n\\\\t\\\\t\\\\tmorphPutSelector: #acceptValue:)! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'aoy 2/15/2003 21:30'!\\\\naddArg: index \\\\n\\\\t\\\\\\\"I rep a SelectorNode.  My string has been replaced.  Append an argument to my owner.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"See if any sample args are recorded\\\\\\\"\\\\n\\\\n\\\\t| sel rec aVocabulary mi sample descrip mthNode tiles |\\\\n\\\\tsel := self decompile asString asSymbol.\\\\n\\\\trec := self receiverObject.\\\\n\\\\tsample := rec class == Error \\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[aVocabulary := self vocabularyToUseWith: rec.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmi := aVocabulary methodInterfaceAt: sel ifAbsent: [nil].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmi ifNil: [5]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifNotNil: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[descrip := mi argumentVariables at: index.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdescrip sample]]\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [5]. \\\\n\\\\tmthNode := self string: sample storeString toTilesIn: sample class.\\\\n\\\\ttiles := mthNode submorphs at: mthNode submorphs size - 1.\\\\t\\\\\\\"before the ^ self\\\\\\\"\\\\n\\\\tself owner addMorphBack: tiles! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 8/24/2001 13:24'!\\\\nassignmentArrow\\\\n\\\\t\\\\\\\"Offer to embed this variable in a new assignment statement.  (Don't confuse this with upDownAssignment:, which runs the up and down arrows that rotate among assignment types.)\\\\\\\"\\\\n\\\\t| rr |\\\\n\\\\n\\\\tself isAVariable ifFalse: [^ nil].\\\\n\\\\tself isDeclaration ifTrue: [^ nil].\\\\n\\\\t^ (rr _ RectangleMorph new)\\\\n\\\\t\\\\textent: 11@13; borderWidth: 1; color: Color lightGreen;\\\\n\\\\t\\\\tborderColor: Color gray;\\\\n\\\\t\\\\taddMorph: ((self noiseStringMorph: '_') topLeft: rr topLeft + (3@0));\\\\n\\\\t\\\\ton: #mouseUp send: #newAssignment to: self\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'gk 2/23/2004 21:08'!\\\\nchangeSound: upDown\\\\n\\\\t| ind arg st soundChoices index it current |\\\\n\\\\t\\\\\\\"move in the list of sounds.  Adjust arg tile after me\\\\\\\"\\\\n\\\\n\\\\tind _ owner submorphs indexOf: self.\\\\n\\\\targ _ owner submorphs atWrap: ind+1.\\\\n\\\\targ isSyntaxMorph ifFalse: [^ self].\\\\n\\\\tst _ arg submorphs detect: [:mm | mm isKindOf: StringMorph] ifNone: [^ self].\\\\n\\\\tsoundChoices _ SoundService default sampledSoundChoices.\\\\n\\\\tcurrent _ st contents copyFrom: 2 to: st contents size-1.\\\\t\\\\\\\"remove string quotes\\\\\\\"\\\\n\\\\tindex _ soundChoices indexOf: current.\\\\n\\\\tindex > 0 ifTrue:\\\\n\\\\t\\\\t[st contents: (it _ soundChoices atWrap: index + upDown) printString.\\\\n\\\\t\\\\tself playSoundNamed: it].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 8/26/2001 14:31'!\\\\ncolorPatch\\\\n\\\\t\\\\\\\"Return a color patch button that lets the user choose a color and modifies the code\\\\\\\"\\\\n\\\\t| cc patch sel completeMsg |\\\\n\\\\t\\\\n\\\\t\\\\n\\\\t((self nodeClassIs: MessageNode) \\\\\\\"or: [self nodeClassIs: SelectorNode]\\\\\\\") ifFalse: [^ nil].\\\\n\\\\t(sel _ self selector) ifNil: [^ nil].\\\\n\\\\t(Color colorNames includes: sel) | (sel == #r:g:b:) ifFalse: [^ nil].\\\\n\\\\t\\\\t\\\\\\\"a standard color name\\\\\\\"\\\\n\\\\tcompleteMsg _ self isNoun ifTrue: [self] \\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [owner isNoun ifTrue: [owner] ifFalse: [owner owner]].\\\\n\\\\n\\\\t(cc _ completeMsg try) class == Color ifFalse: [^ nil].\\\\n\\\\tpatch _ ColorTileMorph new colorSwatchColor: cc.\\\\n\\\\t\\\\t\\\\\\\"sends colorChangedForSubmorph: to the messageNode\\\\\\\"\\\\n\\\\tpatch color: Color transparent; borderWidth: 0.  patch submorphs last delete.\\\\n\\\\t^ patch! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 2/21/2001 16:37'!\\\\ndeleteLine\\\\n\\\\t| temp |\\\\n\\\\ttemp _ owner.\\\\n\\\\tself deletePopup.\\\\n\\\\tself delete.\\\\n\\\\ttemp setSelection: nil.\\\\n\\\\ttemp acceptIfInScriptor.! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'di 12/13/2000 13:05'!\\\\ndeletePopup\\\\n\\\\n\\\\tself valueOfProperty: #myPopup ifPresentDo:\\\\n\\\\t\\\\t[:panel | panel delete. self removeProperty: #myPopup]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 2/21/2001 13:09'!\\\\ndismisser\\\\n\\\\t\\\\\\\"Return the icon to delete this line of tiles.  I am an entire line in a block.\\\\\\\"\\\\n\\\\t| handle handleSpec colorToUse iconName form |\\\\n\\\\n\\\\t(owner isSyntaxMorph and: [owner nodeClassIs: BlockNode]) ifFalse: [^ nil].\\\\n\\\\thandleSpec _ Preferences haloSpecifications fourth.\\\\t\\\\\\\"dismiss\\\\\\\"\\\\n\\\\thandle _ EllipseMorph\\\\n\\\\t\\\\t\\\\tnewBounds: (Rectangle center: 10@10 extent: 16 asPoint)\\\\n\\\\t\\\\t\\\\tcolor: (colorToUse _ Color colorFrom: handleSpec color).\\\\n\\\\ticonName _ handleSpec iconSymbol.\\\\n\\\\tform _ ScriptingSystem formAtKey: iconName.\\\\t\\\\\\\"#'Halo-Dismiss'\\\\\\\"\\\\n\\\\thandle addMorphCentered: (ImageMorph new\\\\n\\\\t\\\\t\\\\t\\\\timage: form; \\\\n\\\\t\\\\t\\\\t\\\\tcolor: colorToUse makeForegroundColor;\\\\n\\\\t\\\\t\\\\t\\\\tlock).\\\\n\\\\thandle on: #mouseDown send: #deleteLine to: self.\\\\n\\\\t^ handle! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 10/17/2001 13:38'!\\\\ndupTile: evt\\\\n\\\\n\\\\t| dup |\\\\n\\\\tself deletePopup.\\\\n\\\\t\\\\\\\"self deselect.\\\\\\\"\\\\n\\\\tdup _ self duplicateMorph: evt.\\\\n\\\\tPreferences tileTranslucentDrag\\\\n\\\\t\\\\tifTrue: [dup align: dup center with: evt hand position.\\\\n\\\\t\\\\t\\\\t\\\\tdup lookTranslucent]\\\\n\\\\t\\\\tifFalse: [dup align: dup topLeft\\\\n\\\\t\\\\t\\\\t\\\\t\\\\twith: evt hand position + self cursorBaseOffset].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 10/17/2001 13:29'!\\\\nduplicator\\\\n\\\\t\\\\\\\"Return the icon to duplicate this tile.\\\\\\\"\\\\n\\\\t| handle handleSpec colorToUse iconName form |\\\\n\\\\n\\\\thandleSpec _ Preferences haloSpecifications at: 11.\\\\t\\\\\\\"duplicate\\\\\\\"\\\\n\\\\thandle _ EllipseMorph\\\\n\\\\t\\\\t\\\\tnewBounds: (Rectangle center: 10@10 extent: 16 asPoint)\\\\n\\\\t\\\\t\\\\tcolor: (colorToUse _ Color colorFrom: handleSpec color).\\\\n\\\\ticonName _ handleSpec iconSymbol.\\\\n\\\\tform _ ScriptingSystem formAtKey: iconName.\\\\t\\\\\\\"#'Halo-Dup'\\\\\\\"\\\\n\\\\thandle addMorphCentered: (ImageMorph new\\\\n\\\\t\\\\t\\\\t\\\\timage: form; \\\\n\\\\t\\\\t\\\\t\\\\tcolor: colorToUse makeForegroundColor;\\\\n\\\\t\\\\t\\\\t\\\\tlock).\\\\n\\\\thandle on: #mouseDown send: #dupTile: to: self.\\\\n\\\\t^ handle! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'ar 3/18/2001 17:28'!\\\\nevent: arg1 arrow: arg2 upDown: arg3\\\\n\\\\t\\\\\\\"Reorder the arguments for existing event handlers\\\\\\\"\\\\n\\\\t(arg3 isMorph and:[arg3 eventHandler notNil]) ifTrue:[arg3 eventHandler fixReversedValueMessages].\\\\n\\\\t^self upDown: arg1 event: arg2 arrow: arg3! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 9/28/2001 13:38'!\\\\nextend\\\\n\\\\t| messageNodeMorph first |\\\\n\\\\t\\\\\\\"replace this noun with a new message like (arg + 1).  If type is not known, ask the user to type in a selector.  Use nil as arg.  Let user drag something to it afterwards.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Later do evaluation of self to see what type and offer right selector\\\\\\\"\\\\n\\\\tself deselect.\\\\n\\\\tmessageNodeMorph _ (MessageSend receiver: 1 selector: #+ arguments: #(1))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tasTilesIn: Player globalNames: false.\\\\n\\\\towner replaceSubmorph: self by: messageNodeMorph.\\\\n\\\\tfirst _ messageNodeMorph submorphs detect: [:mm | mm isSyntaxMorph].\\\\n\\\\tmessageNodeMorph replaceSubmorph: first by: self.\\\\n\\\\tself acceptIfInScriptor.! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 8/24/2001 13:14'!\\\\nextendArrow\\\\n\\\\t\\\\\\\"Return the extend arrow button.  It replaces the argument with a new message.\\\\n\\\\tI am a number or getter messageNode.\\\\\\\"\\\\n\\\\t| patch |\\\\n\\\\t\\\\n\\\\tself isNoun ifFalse: [^ nil].\\\\n\\\\tself isDeclaration ifTrue: [^ nil].\\\\n\\\\tpatch _ (ImageMorph new image: (TileMorph classPool at: #SuffixPicture)).\\\\n\\\\tpatch on: #mouseDown send: #extend to: self.\\\\n\\\\t^ patch! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 9/28/2001 11:35'!\\\\nnewAssignment\\\\n\\\\t\\\\\\\"I am a variableNode.  Place me inside an assignment statement.\\\\\\\"\\\\n\\\\n\\\\t| new old |\\\\n\\\\tparseNode name: self decompile.\\\\t\\\\\\\"in case user changed name\\\\\\\"\\\\n\\\\tnew _ owner assignmentNode: AssignmentNode new variable: parseNode \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tvalue: parseNode copy.\\\\n\\\\tself deselect.\\\\n\\\\t(old _ owner) replaceSubmorph: self by: new.\\\\t\\\\\\\"do the normal replacement\\\\\\\"\\\\n\\\\t(old isSyntaxMorph) ifTrue: [old cleanupAfterItDroppedOnMe].\\\\t\\\\\\\"now owned by no one\\\\\\\"\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'dgd 2/22/2003 13:40'!\\\\nofferPopUp\\\\n\\\\t\\\\\\\"Put up a halo to allow user to change\\\\n\\\\t\\\\tLiterals (Integer, true),\\\\n\\\\t\\\\tSelector (beep: sound, +,-,*,//,\\\\\\\\\\\\\\\\, r:g:b:, setX: incX: decX: for any X,),\\\\n\\\\t\\\\tVariable (Color),\\\\n\\\\t\\\\tnot AssignmentNode (_ inc dec),\\\\n\\\\tExtend arrows on each literal, variable, and message, (block that is by itself).\\\\n\\\\tRetract arrows on each literal or variable, or message or block that is an argument.\\\\n\\\\tAny literal can be changed by Shift-clicking and typing.\\\\\\\"\\\\n\\\\n\\\\t| panel any upDown retract extend colorPatch edge dismiss rr duplicate |\\\\n\\\\t(self hasProperty: #myPopup) ifTrue: [^self].\\\\t\\\\\\\"already has one\\\\\\\"\\\\n\\\\tany := false.\\\\n\\\\t(upDown := self upDownArrows) ifNotNil: [any := true].\\\\t\\\\\\\"includes menu of selectors\\\\\\\"\\\\n\\\\t(retract := self retractArrow) ifNotNil: [any := true].\\\\n\\\\t(extend := self extendArrow) ifNotNil: [any := true].\\\\n\\\\t(dismiss := self dismisser) ifNotNil: [any := true].\\\\n\\\\t(duplicate := self duplicator) ifNotNil: [any := true].\\\\n\\\\t\\\\\\\"(assign _ self assignmentArrow) ifNotNil: [any _ true].\\\\n\\\\t\\\\t\\\\tget from menu or any other assignment\\\\\\\"\\\\n\\\\tsubmorphs last class == ColorTileMorph \\\\n\\\\t\\\\tifFalse: [(colorPatch := self colorPatch) ifNotNil: [any := true]].\\\\n\\\\tany ifFalse: [^self].\\\\n\\\\t\\\\\\\"Transcript cr; print: parseNode class; space; \\\\n\\\\t\\\\tprint: (self hasProperty: #myPopup); endEntry.\\\\\\\"\\\\n\\\\tpanel := (RectangleMorph new)\\\\n\\\\t\\\\t\\\\t\\\\tcolor: Color transparent;\\\\n\\\\t\\\\t\\\\t\\\\tborderWidth: 0.\\\\n\\\\tupDown ifNotNil: \\\\n\\\\t\\\\t\\\\t[panel addMorphBack: upDown first.\\\\n\\\\t\\\\t\\\\tupDown first align: upDown first topLeft with: panel topLeft + (0 @ 0).\\\\n\\\\t\\\\t\\\\tpanel addMorphBack: upDown second.\\\\n\\\\t\\\\t\\\\tupDown second align: upDown second topLeft\\\\n\\\\t\\\\t\\\\t\\\\twith: upDown first bottomLeft + (0 @ 1).\\\\n\\\\t\\\\t\\\\tupDown size > 2 \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[panel addMorphBack: upDown third.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tupDown third align: upDown third topLeft\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twith: upDown first topRight + (2 @ 3)]].\\\\n\\\\trr := self right.\\\\n\\\\tcolorPatch ifNotNil: \\\\n\\\\t\\\\t\\\\t[rr := rr + colorPatch submorphs first width + 1.\\\\n\\\\t\\\\t\\\\tself addMorphBack: colorPatch\\\\t\\\\\\\"always in tile\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\\\\"colorPatch align: colorPatch topLeft \\\\n\\\\t\\\\t\\\\t\\\\t\\\\twith: panel topLeft + (1@1)\\\\\\\"].\\\\n\\\\tretract ifNotNil: \\\\n\\\\t\\\\t\\\\t[edge := panel submorphs isEmpty \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [panel left]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [panel submorphs last right].\\\\n\\\\t\\\\t\\\\tpanel addMorphBack: retract.\\\\n\\\\t\\\\t\\\\tretract align: retract topLeft with: (edge + 2) @ (panel top + 3)].\\\\n\\\\textend ifNotNil: \\\\n\\\\t\\\\t\\\\t[edge := panel submorphs isEmpty \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [panel left]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [panel submorphs last right].\\\\n\\\\t\\\\t\\\\tpanel addMorphBack: extend.\\\\n\\\\t\\\\t\\\\textend align: extend topLeft with: (edge + 2) @ (panel top + 3)].\\\\n\\\\tduplicate ifNotNil: \\\\n\\\\t\\\\t\\\\t[edge := panel submorphs isEmpty \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [panel left]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [panel submorphs last right].\\\\n\\\\t\\\\t\\\\tpanel addMorphBack: duplicate.\\\\n\\\\t\\\\t\\\\tduplicate align: duplicate topLeft with: (edge + 2) @ (panel top + 1)].\\\\n\\\\tdismiss ifNotNil: \\\\n\\\\t\\\\t\\\\t[edge := panel submorphs isEmpty \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [panel left]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [panel submorphs last right].\\\\n\\\\t\\\\t\\\\tpanel addMorphBack: dismiss.\\\\n\\\\t\\\\t\\\\tdismiss align: dismiss topLeft with: (edge + 2) @ (panel top + 1)].\\\\n\\\\t\\\\\\\"\\\\tassign ifNotNil: [\\\\n\\\\t\\\\tedge _ panel submorphs isEmpty \\\\n\\\\t\\\\t\\\\tifTrue: [panel left] \\\\n\\\\t\\\\t\\\\tifFalse: [panel submorphs last right].\\\\n\\\\t\\\\tpanel addMorphBack: assign.\\\\n\\\\t\\\\tassign align: assign topLeft with: (edge+2) @ (panel top + 2)].\\\\n\\\\\\\"\\\\n\\\\tpanel align: panel topLeft with: rr @ (self top - 2).\\\\n\\\\tpanel extent: panel submorphs last bottomRight - panel topLeft.\\\\n\\\\tself setProperty: #myPopup toValue: panel.\\\\n\\\\tself addMorphBack: panel\\\\t\\\\\\\"Any reason ever to have panel below?\\\\\\\"\\\\n\\\\t\\\\\\\"(owner listDirection = #topToBottom and: [self listDirection = #leftToRight])\\\\n\\\\t\\\\tifTrue: [self addMorphBack: panel]\\\\n\\\\t\\\\tifFalse: [owner addMorph: panel after: self].\\\\\\\"! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 9/28/2001 13:39'!\\\\nreplaceKeyWord: evt menuItem: stringMorph\\\\n\\\\t\\\\\\\"Replace my entire message (which may be multi-part) with the one specified.  Preserve all argument tiles, either in the new message or in the world outside the scriptor.  I am a SelectorNode or KeyWordNode.\\\\\\\"\\\\n\\\\n\\\\t| menu new news newSel mm newTree newRec newArgs top oldArgNodes share ctrY |\\\\n\\\\t(menu _ stringMorph owner owner) class == RectangleMorph ifTrue: [\\\\n\\\\t\\\\tmenu delete].\\\\n\\\\tnew _ stringMorph contents.\\\\n\\\\tnew first = $( ifTrue: [^ self].\\\\t\\\\\\\"Cancel\\\\\\\"\\\\n\\\\tnew first = $  ifTrue: [^ self].\\\\t\\\\\\\"nothing\\\\\\\"\\\\n\\\\tnews _ String streamContents: [:strm | \\\\\\\"remove fake args\\\\\\\"\\\\n\\\\t\\\\t(new findBetweenSubStrs: #(' 5' $ )) do: [:part | strm nextPutAll: part]].\\\\n\\\\tnewSel _ stringMorph valueOfProperty: #syntacticallyCorrectContents.\\\\n\\\\tnewSel ifNil: [newSel _ news].\\\\n\\\\tmm _ MessageSend receiver: 5 selector: newSel \\\\n\\\\t\\\\t\\\\targuments: ((Array new: newSel numArgs) atAllPut: 5).\\\\n\\\\tnewTree _ mm asTilesIn: Object globalNames: false.\\\\n\\\\tnewRec _ newTree receiverNode.\\\\n\\\\tnewArgs _ newTree argumentNodes.\\\\n\\\\tctrY _ self fullBoundsInWorld center y.\\\\n\\\\ttop _ self messageNode.\\\\n\\\\tnewRec owner replaceSubmorph: newRec by: top receiverNode.\\\\n\\\\toldArgNodes _ top argumentNodes.\\\\n\\\\tshare _ newArgs size min: oldArgNodes size.\\\\n\\\\t(newArgs first: share) with: (oldArgNodes first: share) do: [:newNode :oldNode | \\\\n\\\\t\\\\tnewNode owner replaceSubmorph: newNode by: oldNode].\\\\n\\\\t\\\\\\\"later get nodes for objects of the right type for new extra args\\\\\\\"\\\\n\\\\n\\\\ttop owner replaceSubmorph: top by: newTree.\\\\n\\\\n\\\\t\\\\\\\"Deposit extra args in the World\\\\\\\"\\\\n\\\\t(oldArgNodes copyFrom: share+1 to: oldArgNodes size) do: [:leftOver |\\\\n\\\\t\\\\t(leftOver parseNode class == LiteralNode and: [leftOver decompile asString = '5']) \\\\n\\\\t\\\\t\\\\tifFalse: [newTree pasteUpMorph addMorphFront: leftOver.\\\\n\\\\t\\\\t\\\\t\\\\tleftOver position: newTree enclosingPane fullBoundsInWorld right - 20 @ ctrY.\\\\n\\\\t\\\\t\\\\t\\\\tctrY _ ctrY + 26]\\\\n\\\\t\\\\t\\\\tifTrue: [leftOver delete]].\\\\n\\\\tnewTree acceptIfInScriptor.! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 9/19/2001 21:32'!\\\\nreplaceSel: evt menuItem: stringMorph\\\\n\\\\t\\\\\\\"I rep a SelectorNode.  Replace my selector with new one that was just chosen from a menu\\\\\\\"\\\\n\\\\n\\\\t| menu new old newSel ms oa na case news |\\\\n\\\\t(menu _ stringMorph owner owner) class == RectangleMorph ifTrue: [\\\\n\\\\t\\\\tmenu delete].\\\\n\\\\tnew _ stringMorph contents.\\\\n\\\\tnew first = $( ifTrue: [^ self].\\\\t\\\\\\\"Cancel\\\\\\\"\\\\n\\\\tnew first = $  ifTrue: [^ self].\\\\t\\\\\\\"nothing\\\\\\\"\\\\n\\\\tnews _ String streamContents: [:strm | \\\\\\\"remove fake args\\\\\\\"\\\\n\\\\t\\\\t(new findBetweenSubStrs: #(' 5' $ )) do: [:part | strm nextPutAll: part]].\\\\n\\\\tnewSel _ stringMorph valueOfProperty: #syntacticallyCorrectContents.\\\\n\\\\tnewSel ifNil: [newSel _ news].\\\\n\\\\told _ (ms _ self findA: StringMorph) valueOfProperty: #syntacticallyCorrectContents.\\\\n\\\\told ifNil: [old _ (self findA: StringMorph) contents].\\\\n\\\\toa _ old numArgs.  na _ newSel numArgs.  case _ 5.\\\\n\\\\t(oa = 1) & (na = 1) ifTrue: [case _ 1]. \\\\n\\\\t(oa = 0) & (na = 0) ifTrue: [case _ 2].\\\\n\\\\t(oa = 1) & (na  = 0) ifTrue: [case _ 3].\\\\n\\\\t(oa = 0) & (na  = 1) ifTrue: [case _ 4].\\\\n\\\\tcase <= 4 ifTrue: [\\\\\\\"replace the selector\\\\\\\"\\\\n\\\\t\\\\tms contents: news.\\\\t\\\\\\\"not multi-part\\\\\\\"\\\\n\\\\t\\\\tms setProperty: #syntacticallyCorrectContents toValue: newSel].\\\\n\\\\tcase = 3 ifTrue: [owner tossOutArg: 1].\\\\n\\\\tcase = 4 ifTrue: [self addArg: 1].\\\\n\\\\t\\\\\\\"more cases here.  Rebuild the entire MessageNode\\\\\\\"\\\\n\\\\t\\\\n\\\\tself acceptIfInScriptor.! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 9/28/2001 10:06'!\\\\nretract\\\\n\\\\t\\\\\\\"replace this message with its receiver.  I am the message node.\\\\\\\"\\\\n\\\\t| rec cascade msg |\\\\n\\\\t(self nodeClassIs: CascadeNode) ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"This is a piece of a cascaded message -- just delete it\\\\\\\"\\\\n\\\\t\\\\tself deletePopup.\\\\n\\\\t\\\\tcascade _ owner.\\\\n\\\\t\\\\tself delete.\\\\n\\\\t\\\\tcascade setSelection: {cascade. nil. cascade}.\\\\n\\\\t\\\\t^ cascade acceptIfInScriptor].\\\\n\\\\tself deletePopup.\\\\n\\\\t(rec _ self receiverNode)\\\\n\\\\t\\\\tifNil: [msg _ owner.\\\\n\\\\t\\\\t\\\\trec _ owner receiverNode.\\\\n\\\\t\\\\t\\\\tmsg owner replaceSubmorph: msg by: rec]\\\\n\\\\t\\\\tifNotNil: [owner replaceSubmorph: self by: rec].\\\\n\\\\trec setSelection: {rec. nil. rec}.\\\\n\\\\trec acceptIfInScriptor.! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'di 12/13/2000 12:57'!\\\\nretractArrow\\\\n\\\\t\\\\\\\"Return the retract arrow button.  It replaces the current message with its receiver.\\\\n\\\\tI am in a MessageNode whose first subnode is not a MessagePartNode.  I did not encounter a block on the way up to it.  I am the last subnode in every owner up to it.\\\\\\\"\\\\n\\\\t| patch |\\\\n\\\\n\\\\t(self nodeClassIs: MessageNode) ifFalse: [^ nil].\\\\n\\\\t(owner isSyntaxMorph and: [owner parseNode == parseNode]) ifTrue: [^ nil].\\\\n\\\\n\\\\tpatch _ (ImageMorph new image: (TileMorph classPool at: #RetractPicture)).\\\\n\\\\tpatch on: #mouseDown send: #retract to: self.\\\\n\\\\t^ patch! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 9/18/2001 16:27'!\\\\nselectorMenu\\\\n\\\\t\\\\\\\"Put up a menu of all selectors that my receiver could be sent.  Replace me with the one chosen.  (If fewer args, put the tiles for the extra arg to the side, in script's owner (world?).)\\\\n\\\\tGo ahead and eval receiver to find out its type.  Later, mark selectors for side effects, and don't eval those.\\\\n\\\\tPut up a table.  Each column is a viewer category.\\\\\\\"\\\\n\\\\n\\\\t| cats value catNames interfaces list setter wording all words ind aVocabulary limitClass |\\\\n\\\\tcats _ #().\\\\n\\\\tall _ Set new.\\\\n\\\\tvalue _ self receiverObject.\\\\n\\\\tvalue class == Error ifTrue: [^ nil].\\\\n\\\\t\\\\n\\\\taVocabulary _ self vocabularyToUseWith: value.\\\\n\\\\tlimitClass _ self limitClassToUseWith: value vocabulary: aVocabulary.\\\\n\\\\tcatNames _ value categoriesForVocabulary: aVocabulary limitClass: limitClass.\\\\n\\\\tcats _ catNames collect: [:nn | \\\\n\\\\t\\\\tlist _ OrderedCollection new.\\\\n\\\\t\\\\tinterfaces _ value methodInterfacesForCategory: nn \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tinVocabulary: aVocabulary limitClass: limitClass.\\\\n\\\\t\\\\tinterfaces do: [:mi | \\\\n\\\\t\\\\t\\\\t(all includes: mi selector) ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\\\\"list add: (self aSimpleStringMorphWith: mi elementWording).  Expensive\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\twords _ mi selector.\\\\n\\\\t\\\\t\\\\t\\\\t(words beginsWith: 'get ') ifTrue: [words _ words allButFirst: 4].\\\\n\\\\t\\\\t\\\\t\\\\tmi selector last == $: ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\twords _ String streamContents: [:strm | \\\\\\\"add fake args\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(words findTokens: $:) do: [:part | strm nextPutAll: part; nextPutAll: ' 5 ']].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\twords _ words allButLast].\\\\n\\\\t\\\\t\\\\t\\\\tmi selector isInfix ifTrue: [words _ words, ' 5'].\\\\n\\\\t\\\\t\\\\t\\\\twords _ self splitAtCapsAndDownshifted: words.\\\\t\\\\n\\\\t\\\\t\\\\t\\\\tlist add: (self anUpdatingStringMorphWith: words special: true).\\\\n\\\\t\\\\t\\\\t\\\\twords = mi selector ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tlist last setProperty: #syntacticallyCorrectContents toValue: mi selector].\\\\n\\\\t\\\\t\\\\t\\\\tall add: mi selector].\\\\n\\\\t\\\\t\\\\tsetter _ mi companionSetterSelector asString.\\\\n\\\\t\\\\t\\\\t(setter = 'nil') | (all includes: setter) ifFalse: [\\\\\\\"need setters also\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\twording _ (self translateToWordySetter: setter).\\\\n\\\\t\\\\t\\\\t\\\\tlist add:  (self aSimpleStringMorphWith: wording, ' 5').\\\\n\\\\t\\\\t\\\\t\\\\twording = setter ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tlist last setProperty: #syntacticallyCorrectContents \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttoValue: setter].\\\\n\\\\t\\\\t\\\\t\\\\tall add: setter]].\\\\n\\\\t\\\\tlist].\\\\n\\\\t(ind _ catNames indexOf: 'scripts') > 0 ifTrue: [\\\\n\\\\t\\\\t(cats at: ind) first contents = 'empty script' ifTrue: [(cats at: ind) removeFirst]].\\\\n\\\\tcats first addFirst: (self aSimpleStringMorphWith: ' ').\\\\t\\\\\\\"spacer\\\\\\\"\\\\n\\\\tcats first addFirst: (self aSimpleStringMorphWith: '( from ', value class name, ' )').\\\\n\\\\tcats first first color: (Color green mixed: 0.25 with: Color black).\\\\n\\\\tself selectorMenuAsk: cats.\\\\t\\\\\\\"The method replaceSel:menuItem: does the work.  \\\\n\\\\t\\\\tand replaces the selector.\\\\\\\"\\\\n\\\\t! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 9/20/2001 16:04'!\\\\nselectorMenuAsk: listOfLists\\\\n\\\\t\\\\\\\"I represent a SelectorNode to be replaced by one of the selectors in one of the category lists.  Each list has pre-built StringMorphs in it.\\\\\\\"\\\\n\\\\n\\\\t| menu col |\\\\n\\\\tlistOfLists isEmpty ifTrue: [^ nil].\\\\n\\\\tlistOfLists first addFirst: (self aSimpleStringMorphWith: '( Cancel )').\\\\n\\\\tlistOfLists first first color: Color red.\\\\n\\\\tmenu _ RectangleMorph new.\\\\n\\\\tmenu listDirection: #leftToRight; layoutInset: 3; cellInset: 1@0.\\\\n\\\\tmenu layoutPolicy: TableLayout new; hResizing: #shrinkWrap; \\\\n\\\\t\\\\tvResizing: #shrinkWrap; color: (Color r: 0.767 g: 1.0 b: 0.767);\\\\n\\\\t\\\\tuseRoundedCorners; cellPositioning: #topLeft.\\\\n\\\\tlistOfLists do: [:ll |\\\\n\\\\t\\\\tcol _ Morph new.\\\\n\\\\t \\\\tcol listDirection: #topToBottom; layoutInset: 0; cellInset: 0@0.\\\\n\\\\t\\\\tcol layoutPolicy: TableLayout new; hResizing: #shrinkWrap.\\\\n\\\\t\\\\tcol color: Color transparent; vResizing: #shrinkWrap.\\\\n\\\\t\\\\tmenu addMorphBack: col.\\\\n\\\\t\\\\tll do: [:ss | \\\\n\\\\t\\\\t\\\\tcol addMorphBack: ss.\\\\n\\\\t\\\\t\\\\tss on: #mouseUp send: #replaceKeyWord:menuItem: to: self]\\\\n\\\\t\\\\t].\\\\n\\\\tself world addMorph: menu.\\\\n\\\\tmenu setConstrainedPosition: (owner localPointToGlobal: self topRight) + (10@-30) \\\\n\\\\t\\\\t\\\\thangOut: false.\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'sw 3/18/2004 00:35'!\\\\nsetSelector: stringLike in: stringMorph\\\\n\\\\t\\\\\\\"Store the new selector and accept method.\\\\\\\"\\\\n\\\\n\\\\t| aSymbol myType str |\\\\n\\\\taSymbol _ stringLike asSymbol.\\\\n\\\\t(ScriptingSystem helpStringOrNilFor: aSymbol) ifNotNilDo:\\\\n\\\\t\\\\t[:aString |\\\\n\\\\t\\\\t\\\\tself setBalloonText: aString translated].\\\\n\\\\tmyType _ stringMorph valueOfProperty: #syntacticReformatting ifAbsent: [#none].\\\\n\\\\tstr _ aSymbol.\\\\n\\\\t(self isStandardSetterKeyword: str) ifTrue: [str _ self translateToWordySetter: str].\\\\n\\\\t(self isStandardGetterSelector: str) ifTrue: [str _ self translateToWordyGetter: str].\\\\n\\\\t(self shouldBeBrokenIntoWords: myType) \\\\n\\\\t\\\\tifTrue: [str _ self substituteKeywordFor: str].\\\\n\\\\tstringMorph contents: str.\\\\n\\\\t\\\\\\\"parseNode key: aSymbol code: nil.\\\\\\\"\\\\n\\\\tstr = stringLike ifFalse:\\\\n\\\\t\\\\t[stringMorph setProperty: #syntacticallyCorrectContents toValue: aSymbol].\\\\n\\\\tself acceptSilently! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 9/19/2001 15:47'!\\\\ntossOutArg: extras\\\\n\\\\n\\\\t\\\\\\\"Remove the tiles for the last N keywords and arguments.  Place the tiles beside the current window.  I am a SyntaxMorph for a MessageNode.\\\\\\\"\\\\n\\\\n\\\\t| cnt ctr |\\\\n\\\\tcnt _ 0.\\\\n\\\\t submorphs copy reverseDo: [:sub |\\\\n\\\\t\\\\tctr _ sub fullBoundsInWorld center.\\\\n\\\\t\\\\tsub delete.\\\\n\\\\t\\\\t(sub isSyntaxMorph and: [sub parseNode notNil]) ifTrue: [\\\\n\\\\t\\\\t\\\\tsub isNoun ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\tself pasteUpMorph addMorphFront: sub.\\\\n\\\\t\\\\t\\\\t\\\\tsub position: self enclosingPane fullBoundsInWorld right - 20 @ ctr y].\\\\n\\\\t\\\\t\\\\t(cnt _ cnt + 1) >= extras ifTrue: [^ self]]].! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 8/24/2001 13:35'!\\\\nupDown: delta event: evt arrow: arrowMorph\\\\n\\\\n\\\\t| st |\\\\n\\\\tst _ submorphs detect: [:mm | mm isKindOf: StringMorph] ifNone: [^ self].\\\\n\\\\t(self nodeClassIs: LiteralNode) ifTrue:\\\\n\\\\t\\\\t[ \\\\\\\"+/- 1\\\\\\\"\\\\n\\\\t\\\\tst contents: (self decompile asNumber + delta) printString.\\\\n\\\\t\\\\t^ self acceptUnlogged].\\\\n\\\\t(self nodeClassIs: VariableNode) ifTrue:\\\\n\\\\t\\\\t[ \\\\\\\"true/false\\\\\\\"\\\\n\\\\t\\\\tst contents: (self decompile string = 'true') not printString.\\\\n\\\\t\\\\t^ self acceptSilently ifFalse: [self changed].\\\\n\\\\t\\\\t\\\\t\\\\\\\"maybe set parseNode's key\\\\\\\"].\\\\n\\\\n\\\\t(self upDownArithOp: delta) ifTrue: [^ self].\\\\t\\\\\\\"+ - // *   < > <= =   beep:\\\\\\\"\\\\n\\\\n\\\\t(self upDownAssignment: delta) ifTrue: [^ self].\\\\n\\\\t\\\\t\\\\\\\"Handle assignment --  increaseBy:  <-   multiplyBy:\\\\\\\"\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 7/24/2001 17:54'!\\\\nupDownArithOp: delta\\\\n\\\\t\\\\\\\"Change a + into a -.  Also do sounds (change the arg to the beep:).\\\\\\\"\\\\n\\\\n\\\\t| aList index st |\\\\n\\\\tst _ submorphs detect: [:mm | mm isKindOf: StringMorph] ifNone: [^ self].\\\\n\\\\t(self nodeClassIs: SelectorNode) ifTrue:\\\\n\\\\t\\\\t[aList _ #(+ - * / // \\\\\\\\\\\\\\\\ min: max:).\\\\n\\\\t\\\\t(index _ aList indexOf: self decompile asString) > 0 ifTrue:\\\\n\\\\t\\\\t\\\\t[self setSelector: (aList atWrap: index + delta) in: st.  ^ true].\\\\n\\\\n\\\\t\\\\taList _ #(= ~= > >= isDivisibleBy: < <=).\\\\n\\\\t\\\\t(index _ aList indexOf: self decompile asString) > 0 ifTrue:\\\\n\\\\t\\\\t\\\\t[self setSelector: (aList atWrap: index + delta) in: st.  ^ true].\\\\n\\\\n\\\\t\\\\taList _ #(== ~~).\\\\n\\\\t\\\\t(index _ aList indexOf: self decompile asString) > 0 ifTrue:\\\\n\\\\t\\\\t\\\\t[self setSelector: (aList atWrap: index + delta) in: st.  ^ true].\\\\n\\\\n\\\\t\\\\t'beep:' = self decompile asString ifTrue:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"replace sound arg\\\\\\\"\\\\n\\\\t\\\\t\\\\tself changeSound: delta.\\\\n\\\\t\\\\t\\\\tself acceptSilently.  ^ true].\\\\n\\\\t\\\\t].\\\\n\\\\t^ false! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 9/20/2001 16:33'!\\\\nupDownArrows\\\\n\\\\t\\\\\\\"Return an array of two up/down arrow buttons.\\\\n\\\\tIt replaces the selector or arg with a new one.\\\\n\\\\tI am a number or boolean or a selector (beep:, +,-,*,//,\\\\\\\\\\\\\\\\, or setX: incX: decX: for any X.\\\\\\\"\\\\n\\\\t| patch any noMenu |\\\\n\\\\tany _ (self nodeClassIs: LiteralNode) and: [parseNode key isNumber].\\\\n\\\\tany _ any or: [(self nodeClassIs: VariableNode) and:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[(#('true' 'false') includes: self decompile asString)]].\\\\n\\\\tnoMenu _ any.\\\\n\\\\n\\\\tany _ any or: [self nodeClassIs: SelectorNode].\\\\t\\\\\\\"arrows and menu of selectors\\\\\\\"\\\\n\\\\tany _ any or: [self nodeClassIs: KeyWordNode].\\\\n\\\\tany ifFalse: [^ nil].\\\\n\\\\n\\\\tpatch _ {(ImageMorph new image: TileMorph upPicture)\\\\n\\\\t\\\\t\\\\t\\\\ton: #mouseDown send: #upDown:event:arrow: to: self withValue: 1;\\\\n\\\\t\\\\t\\\\t\\\\ton: #mouseStillDown send: #upDownMore:event:arrow: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tto: self withValue: 1;\\\\n\\\\t\\\\t\\\\t\\\\ton: #mouseUp send: #upDownDone to: self.\\\\n\\\\t\\\\t\\\\t(ImageMorph new image: TileMorph downPicture)\\\\n\\\\t\\\\t\\\\t\\\\ton: #mouseDown send: #upDown:event:arrow: to: self withValue: -1;\\\\n\\\\t\\\\t\\\\t\\\\ton: #mouseStillDown send: #upDownMore:event:arrow: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tto: self withValue: -1;\\\\n\\\\t\\\\t\\\\t\\\\ton: #mouseUp send: #upDownDone to: self}.\\\\n\\\\tnoMenu ifFalse: [patch _ patch, {(RectangleMorph new)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\textent: 6@10; borderWidth: 1;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tborderColor: Color gray;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ton: #mouseUp send: #selectorMenu to: self}.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpatch last color: ((self nodeClassIs: SelectorNode) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [Color lightGreen] ifFalse: [Color red darker])].\\\\n\\\\t^ patch! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'tk 8/24/2001 12:33'!\\\\nupDownAssignment: delta\\\\n\\\\t\\\\\\\"Rotate between increaseBy:  decreaseBy:   _  multiplyBy:\\\\\\\"\\\\n\\\\n\\\\t| st now want instVar |\\\\n\\\\tst _ submorphs detect: [:mm | mm isKindOf: StringMorph] ifNone: [^ self].\\\\n\\\\t(self nodeClassIs: SelectorNode) ifTrue:\\\\n\\\\t\\\\t[\\\\\\\"kinds of assignment\\\\\\\"\\\\n\\\\t\\\\t((now _ self decompile asString) beginsWith: 'set') ifTrue:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"a setX: 3\\\\\\\"\\\\n\\\\t\\\\t\\\\twant _ 1+delta.  instVar _ (now allButFirst: 3) allButLast].\\\\n\\\\t\\\\t(now endsWith: 'IncreaseBy:') ifTrue:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"a xIncreaseBy: 3 a setX: (a getX +3).\\\\\\\"\\\\n\\\\t\\\\t\\\\twant _ 2+delta.  instVar _ now allButLast: 11].\\\\n\\\\t\\\\t(now endsWith: 'DecreaseBy:') ifTrue:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"a xDecreaseBy: 3 a setX: (a getX -3).\\\\\\\"\\\\n\\\\t\\\\t\\\\twant _ 3+delta.  instVar _ now allButLast: 11].\\\\n\\\\t\\\\t(now endsWith: 'MultiplyBy:') ifTrue:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"a xMultiplyBy: 3 a setX: (a getX *3).\\\\\\\"\\\\n\\\\t\\\\t\\\\twant _ 4+delta.  instVar _ now allButLast: 11].\\\\n\\\\t\\\\twant ifNil: [^ false].\\\\n\\\\t\\\\tinstVar _ instVar asLowercase.\\\\n\\\\t\\\\twant _ #(1 2 3 4) atWrap: want.\\\\n\\\\t\\\\twant = 1 ifTrue:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"setter method is present\\\\\\\"\\\\n\\\\t\\\\t\\\\tself setSelector: ('set', instVar capitalized, ':') in: st.  ^ true].\\\\n\\\\t\\\\twant = 2 ifTrue:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"notUnderstood will create the method if needed\\\\\\\"\\\\n\\\\t\\\\t\\\\tself setSelector: instVar, 'IncreaseBy:' in: st.  ^ true].\\\\n\\\\t\\\\twant = 3 ifTrue:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"notUnderstood will create the method if needed\\\\\\\"\\\\n\\\\t\\\\t\\\\tself setSelector: instVar, 'DecreaseBy:' in: st.  ^ true].\\\\n\\\\t\\\\twant = 4 ifTrue:\\\\n\\\\t\\\\t\\\\t[\\\\\\\"notUnderstood will create the method if needed\\\\\\\"\\\\n\\\\t\\\\t\\\\tself setSelector: instVar, 'MultiplyBy:' in: st.  ^ true].\\\\n\\\\t\\\\t].\\\\n\\\\t^ false\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'di 5/4/2001 11:49'!\\\\nupDownDone\\\\n\\\\n\\\\t(self nodeClassIs: LiteralNode) ifTrue:\\\\n\\\\t\\\\t[self acceptSilently.  \\\\\\\"Final compilation logs source\\\\\\\"\\\\n\\\\t\\\\tself removeProperty: #timeOfLastTick;\\\\n\\\\t\\\\t\\\\tremoveProperty: #currentDelay].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'pop ups' stamp: 'di 5/4/2001 12:26'!\\\\nupDownMore: delta event: evt arrow: arrowMorph\\\\n\\\\n\\\\t| st delay1 delay2 now timeOfLastTick currentDelay |\\\\n\\\\t(self nodeClassIs: LiteralNode) ifFalse: [^ self].\\\\n\\\\tst _ submorphs detect: [:mm | mm isKindOf: StringMorph] ifNone: [^ self].\\\\n\\\\tdelay1 _ 300.  \\\\\\\"ms\\\\\\\"\\\\n\\\\tdelay2 _ 50.  \\\\\\\"ms\\\\\\\"\\\\n\\\\tnow _ Time millisecondClockValue.\\\\n\\\\ttimeOfLastTick _ (self valueOfProperty: #timeOfLastTick) ifNil: [now - delay1].\\\\n\\\\tcurrentDelay _ (self valueOfProperty: #currentDelay) ifNil: [delay1].\\\\n\\\\tnow >= (timeOfLastTick + currentDelay) ifTrue:\\\\n\\\\t\\\\t[self setProperty: #timeOfLastTick toValue: now.\\\\n\\\\t\\\\t\\\\\\\"decrease the delay\\\\\\\"\\\\n\\\\t\\\\tself setProperty: #currentDelay toValue: (currentDelay*8//10 max: delay2).\\\\n\\\\t\\\\tst contents: (self decompile asNumber + delta) printString.\\\\n\\\\t\\\\t^ self acceptUnlogged].\\\\n! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'tk 9/23/2001 01:33'!\\\\ngetHeader: strm\\\\n\\\\t| se |\\\\n\\\\t\\\\\\\"We are in an EToy scriptor and the method header line has been removed.  Try to recover the method name.  Fail if method has args (deal with this later).\\\\\\\"\\\\n\\\\n\\\\t(se _ self ownerThatIsA: ScriptEditorMorph) ifNotNil: [\\\\n\\\\t\\\\tse scriptName numArgs > 0 ifTrue: [^ false].\\\\t\\\\\\\"abort\\\\\\\"\\\\n\\\\t\\\\tstrm nextPutAll: se scriptName].\\\\n\\\\t^ true! !\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'dgd 2/22/2003 13:40'!\\\\nownerPrecedence\\\\n\\\\t\\\\\\\"Return the selector precedence of my owner.  1 for unary (asInteger), 2 for binary arithmetic (+), and 3 for keyword selectors (from:to:).  Subtract 0.5 if self is an arg, not the receiver (the case of a + (b + c))\\\\\\\"\\\\n\\\\n\\\\t| oo below sel pp |\\\\n\\\\too := owner.\\\\n\\\\tbelow := self.\\\\n\\\\t\\\\n\\\\t[oo isSyntaxMorph ifFalse: [^10].\\\\t\\\\\\\"I do not need parens\\\\\\\"\\\\n\\\\too parseNode isNil] \\\\n\\\\t\\\\t\\\\twhileTrue: \\\\n\\\\t\\\\t\\\\t\\\\t[below := oo.\\\\n\\\\t\\\\t\\\\t\\\\too := oo owner].\\\\n\\\\t(sel := oo selector) ifNil: [^10].\\\\n\\\\t(pp := sel precedence) = 3 ifTrue: [^2.5].\\\\t\\\\\\\"keyword messages need parens\\\\\\\"\\\\n\\\\t^oo receiverNode == below ifTrue: [pp] ifFalse: [pp - 0.5]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'tk 9/23/2001 02:11'!\\\\nprintAssignmentNodeOn: strm indent: level\\\\n\\\\t\\\\\\\"sometimes an assignment is in parens\\\\\\\"\\\\n\\\\t| parens above |\\\\n\\\\n\\\\tparens _ submorphs size >= 3.\\\\n\\\\tparens ifTrue: [\\\\n\\\\t\\\\tabove _ self ownerPrecedence.\\\\t\\\\\\\"high if not in an expression\\\\\\\"\\\\n\\\\t\\\\tparens _ above <= 3].\\\\t\\\\\\\"assignment is a noun inside a message\\\\\\\"\\\\n\\\\tparens ifTrue: [strm nextPut: $( ].\\\\n\\\\tself\\\\n\\\\t\\\\tsubmorphsDoIfSyntax: [ :sub |\\\\n\\\\t\\\\t\\\\tsub printOn: strm indent: level.\\\\n\\\\t\\\\t\\\\tstrm ensureASpace.\\\\n\\\\t\\\\t]\\\\n\\\\t\\\\tifString: [ :sub |\\\\n\\\\t\\\\t\\\\tstrm ensureNoSpace. \\\\t\\\\\\\"_ will have a leading space\\\\\\\"\\\\n\\\\t\\\\t\\\\tself printSimpleStringMorph: sub on: strm\\\\n\\\\t\\\\t].\\\\n\\\\tparens ifTrue: [strm ensureNoSpace; nextPut: $) ].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'RAA 3/4/2001 12:19'!\\\\nprintBlockArgsNodeOn: strm indent: level\\\\n\\\\n\\\\t| argString |\\\\n\\\\n\\\\tself\\\\n\\\\t\\\\tsubmorphsDoIfSyntax: [ :sub |\\\\n\\\\t\\\\t\\\\t(argString _ sub decompile) isEmpty ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tstrm \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnextPut: $:;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnextPutAll: argString;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tspace\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t] \\\\n\\\\t\\\\tifString: [ :sub |\\\\n\\\\t\\\\t\\\\t\\\\\\\"self printSimpleStringMorph: sub on: strm\\\\t<<<< do we need this??\\\\\\\"\\\\n\\\\t\\\\t].\\\\n\\\\tstrm nextPut: $|; crtab: level.\\\\n\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'tk 9/23/2001 01:17'!\\\\nprintBlockNodeOn: strm indent: level\\\\n\\\\n\\\\t| lev inASyntaxButNotOutermost subNodeClass |\\\\n\\\\n\\\\tlev _ level.\\\\n\\\\tinASyntaxButNotOutermost _ owner isSyntaxMorph and: [ owner isMethodNode not].\\\\n\\\\tinASyntaxButNotOutermost ifTrue: [strm nextPut: $[.  lev _ lev+1].\\\\n\\\\tself\\\\n\\\\t\\\\tsubmorphsDoIfSyntax: [ :sub |\\\\n\\\\t\\\\t\\\\tsub printOn: strm indent: lev.\\\\n\\\\t\\\\t\\\\tsubNodeClass _ sub parseNode class.\\\\n\\\\t\\\\t\\\\t(#(BlockArgsNode ReturnNode CommentNode) includes: subNodeClass name) ifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\tstrm ensureNoSpace; nextPut: $.].\\\\n\\\\t\\\\t\\\\tsubNodeClass == BlockArgsNode\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [strm space]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [strm crtab: lev].\\\\n\\\\t\\\\t] \\\\n\\\\t\\\\tifString: [ :sub |\\\\n\\\\t\\\\t\\\\tself printSimpleStringMorph: sub on: strm\\\\n\\\\t\\\\t].\\\\n\\\\tinASyntaxButNotOutermost ifTrue: [strm nextPut: $] ].\\\\n\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'tk 9/23/2001 01:19'!\\\\nprintCascadeNodeOn: strm indent: level\\\\n\\\\n\\\\t| parens cnt me above |\\\\n\\\\n\\\\tparens _ parseNode receiver notNil.\\\\n\\\\tparens ifTrue: [me _ self selector precedence.\\\\n\\\\t\\\\tabove _ self ownerPrecedence.\\\\t\\\\\\\"high if not in an expression\\\\\\\"\\\\n\\\\t\\\\tparens _ me > above].\\\\n\\\\tparens ifTrue: [strm nextPut: $( ].\\\\n\\\\tcnt _ 0.\\\\n\\\\tself\\\\n\\\\t\\\\tsubmorphsDoIfSyntax: [ :sub |\\\\n\\\\t\\\\t\\\\tcnt _ cnt + 1.\\\\n\\\\t\\\\t\\\\t\\\\\\\"maybe we want to test sub isCascadePart for the following???\\\\\\\"\\\\n\\\\t\\\\t\\\\tcnt > 2 ifTrue: [strm nextPutAll: '; '].\\\\n\\\\t\\\\t\\\\tsub printOn: strm indent: level.\\\\n\\\\t\\\\t\\\\tstrm ensureASpace.\\\\n\\\\t\\\\t]\\\\n\\\\t\\\\tifString: [ :sub |\\\\n\\\\t\\\\t\\\\tself printSimpleStringMorph: sub on: strm\\\\n\\\\t\\\\t].\\\\n\\\\tparens ifTrue: [strm ensureNoSpace; nextPut: $) ].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'tk 9/23/2001 01:17'!\\\\nprintMessageNodeOn: strm indent: level\\\\n\\\\n\\\\t| parens me above |\\\\n\\\\n\\\\tparens _ parseNode receiver notNil.\\\\n\\\\tparens ifTrue: [me _ self selector precedence.\\\\n\\\\t\\\\tabove _ self ownerPrecedence.\\\\t\\\\\\\"high if not in an expression\\\\\\\"\\\\n\\\\t\\\\tparens _ me > above].\\\\n\\\\tparens ifTrue: [strm nextPut: $( ].\\\\n\\\\tself\\\\n\\\\t\\\\tsubmorphsDoIfSyntax: [ :sub |\\\\n\\\\t\\\\t\\\\tsub printOn: strm indent: level.\\\\n\\\\t\\\\t\\\\tstrm ensureASpace.\\\\n\\\\t\\\\t]\\\\n\\\\t\\\\tifString: [ :sub |\\\\n\\\\t\\\\t\\\\tself printSimpleStringMorph: sub on: strm\\\\n\\\\t\\\\t].\\\\n\\\\tparens ifTrue: [strm ensureNoSpace; nextPut: $) ].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'tk 9/23/2001 02:12'!\\\\nprintMethodNodeOn: strm indent: level\\\\n\\\\n\\\\t(self findA: SelectorNode) ifNil: [\\\\n\\\\t\\\\t(self getHeader: strm) ifFalse: [^ self].\\\\t\\\\t\\\\\\\"might fail\\\\\\\"\\\\n\\\\t\\\\tstrm crtab: level].\\\\n\\\\tself \\\\n\\\\t\\\\tsubmorphsDoIfSyntax: [ :sub |\\\\n\\\\t\\\\t\\\\tsub printOn: strm indent: level.\\\\n\\\\t\\\\t\\\\tstrm crtab: level.\\\\n\\\\t\\\\t]\\\\n\\\\t\\\\tifString: [ :sub |\\\\n\\\\t\\\\t\\\\tself printSimpleStringMorph: sub on: strm\\\\n\\\\t\\\\t]. \\\\n\\\\tstrm last == $. ifTrue: [strm skip: -1].  \\\\\\\"ugh!!  erase duplicate final period\\\\\\\"! !\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'RAA 3/4/2001 12:08'!\\\\nprintMethodTempsNodeOn: strm indent: level\\\\n\\\\n\\\\tstrm nextPut: $|; space.\\\\n\\\\tself\\\\n\\\\t\\\\tsubmorphsDoIfSyntax: [ :sub |\\\\n\\\\t\\\\t\\\\tsub printOn: strm indent: level.\\\\n\\\\t\\\\t\\\\tstrm space.\\\\n\\\\t\\\\t]\\\\n\\\\t\\\\tifString: [ :sub |\\\\n\\\\t\\\\t\\\\tself printSimpleStringMorph: sub on: strm\\\\n\\\\t\\\\t].\\\\n\\\\tstrm nextPut: $|; crtab: level.\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'tk 10/22/2000 20:43'!\\\\nprintOn: strm\\\\n\\\\n\\\\tsuper printOn: strm.\\\\n\\\\tstrm space; nextPutAll: parseNode class name.! !\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'tk 9/14/2001 13:52'!\\\\nprintOn: strm indent: level\\\\n\\\\n\\\\t| nodeClass |\\\\n\\\\n\\\\t(self hasProperty: #ignoreNodeWhenPrinting) ifFalse: [\\\\n\\\\t\\\\tnodeClass _ parseNode class.\\\\n\\\\t\\\\tnodeClass == VariableNode ifTrue: [^self printVariableNodeOn: strm indent: level].\\\\n\\\\t\\\\tnodeClass == LiteralVariableNode ifTrue: [^self printVariableNodeOn: strm indent: level].\\\\n\\\\t\\\\tnodeClass == MessageNode ifTrue: [^self printMessageNodeOn: strm indent: level].\\\\n\\\\t\\\\tnodeClass == BlockNode ifTrue: [^self printBlockNodeOn: strm indent: level].\\\\n\\\\t\\\\tnodeClass == BlockArgsNode ifTrue: [^self printBlockArgsNodeOn: strm indent: level].\\\\n\\\\t\\\\tnodeClass == MethodNode ifTrue: [^self printMethodNodeOn: strm indent: level].\\\\n\\\\t\\\\tnodeClass == MethodTempsNode ifTrue: [^self printMethodTempsNodeOn: strm indent: level].\\\\n\\\\t\\\\tnodeClass == CascadeNode ifTrue: [^self printCascadeNodeOn: strm indent: level].\\\\n\\\\t\\\\tnodeClass == AssignmentNode ifTrue: [^self printAssignmentNodeOn: strm indent: level].\\\\n\\\\t].\\\\n\\\\tself\\\\n\\\\t\\\\tsubmorphsDoIfSyntax: [ :sub |\\\\n\\\\t\\\\t\\\\tsub printOn: strm indent: level.\\\\n\\\\t\\\\t\\\\tstrm ensureASpace.\\\\n\\\\t\\\\t]\\\\n\\\\t\\\\tifString: [ :sub |\\\\n\\\\t\\\\t\\\\tself printSimpleStringMorph: sub on: strm\\\\n\\\\t\\\\t].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'RAA 2/16/2001 18:16'!\\\\nprintSimpleStringMorph: aMorph on: strm\\\\n\\\\n\\\\t| trialContents |\\\\n\\\\n\\\\t(aMorph hasProperty: #wordyVariantOfSelf) ifTrue: [\\\\n\\\\t\\\\tstrm nextPutAll: 'self '.\\\\n\\\\t\\\\tstrm nextPutAll: ((self translateToWordySelfVariant: aMorph contents) ifNil: [^self]).\\\\n\\\\t\\\\t^self\\\\n\\\\t].\\\\n\\\\t(aMorph hasProperty: #noiseWord) ifFalse: [\\\\n\\\\t\\\\ttrialContents _ self cleanUpString: aMorph.\\\\n\\\\t\\\\tstrm nextPutAll: trialContents\\\\n\\\\t].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'RAA 2/13/2001 23:10'!\\\\nprintStatementsOn: aStream indent: indent\\\\n\\\\n\\\\t\\\\\\\"seemed to be necessary to see top node in explorer\\\\\\\"\\\\n\\\\n\\\\t^parseNode printStatementsOn: aStream indent: indent! !\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'ar 8/16/2001 13:29'!\\\\nprintVariableNodeOn: strm indent: level\\\\n\\\\n\\\\t\\\\\\\"nil out any old association\\\\\\\"\\\\n\\\\tparseNode key isVariableBinding ifTrue: [\\\\n\\\\t\\\\tparseNode \\\\n\\\\t\\\\t\\\\tname: parseNode name \\\\n\\\\t\\\\t\\\\tkey: nil \\\\n\\\\t\\\\t\\\\tcode: parseNode code\\\\n\\\\t].\\\\n\\\\tself\\\\n\\\\t\\\\tsubmorphsDoIfSyntax: [ :sub |\\\\n\\\\t\\\\t\\\\tsub printOn: strm indent: level.\\\\n\\\\t\\\\t\\\\tstrm ensureASpace.\\\\n\\\\t\\\\t]\\\\n\\\\t\\\\tifString: [ :sub |\\\\n\\\\t\\\\t\\\\tself printSimpleStringMorph: sub on: strm\\\\n\\\\t\\\\t].\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'di 11/13/2000 07:43'!\\\\nstructure\\\\n\\\\t\\\\\\\"Print my structure from inner to outer.\\\\\\\"\\\\n\\\\t^ String streamContents: [:s |\\\\n\\\\t\\\\tself withAllOwnersDo:\\\\n\\\\t\\\\t\\\\t[:m | m isSyntaxMorph ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[s cr; print: m parseNode class.\\\\n\\\\t\\\\t\\\\t\\\\t((m nodeClassIs: MessageNode) or: [m nodeClassIs: TileMessageNode]) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[s space; nextPutAll: m parseNode selector key]]]]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'RAA 3/4/2001 11:55'!\\\\nsubmorphsDoIfSyntax: block1 ifString: block2 \\\\n\\\\n\\\\t^self submorphsDoIfSyntax: block1 ifString: block2 otherwise: [ :sub | ]\\\\n! !\\\\n\\\\n!SyntaxMorph methodsFor: 'printing' stamp: 'gm 2/22/2003 12:34'!\\\\nsubmorphsDoIfSyntax: block1 ifString: block2 otherwise: block3 \\\\n\\\\tsubmorphs do: \\\\n\\\\t\\\\t\\\\t[:sub | \\\\n\\\\t\\\\t\\\\tsub isSyntaxMorph \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [block1 value: sub]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[(sub isKindOf: StringMorph) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [block2 value: sub]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[(sub isTextMorph) \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [block2 value: sub]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [block3 value: sub]]]]! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'scripting' stamp: 'tk 9/26/2001 06:01'!\\\\ntearOffTile\\\\n\\\\t\\\\\\\"For a SyntaxMorph, this means give a copy of me\\\\\\\"\\\\n\\\\n\\\\t| dup |\\\\n\\\\tdup _ self duplicate.\\\\n\\\\tActiveHand attachMorph: dup.\\\\n\\\\tPreferences tileTranslucentDrag\\\\n\\\\t\\\\tifTrue: [^ dup lookTranslucent]\\\\n\\\\t\\\\tifFalse: [^ dup align: dup topLeft with: ActiveHand position + self cursorBaseOffset]\\\\n! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'selection' stamp: 'di 11/17/2000 08:10'!\\\\ncurrentSelectionDo: blockForSelection\\\\n\\\\t| rootTile |\\\\n\\\\t(rootTile _ self rootTile) isMethodNode ifFalse:\\\\n\\\\t\\\\t [^ blockForSelection value: nil value: nil value: nil].\\\\n\\\\trootTile valueOfProperty: #selectionSpec ifPresentDo:\\\\n\\\\t\\\\t[:selectionSpec | ^ blockForSelection\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tvalue: selectionSpec first\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tvalue: selectionSpec second\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tvalue: selectionSpec third].\\\\n\\\\t^ blockForSelection value: nil value: nil value: nil! !\\\\n\\\\n!SyntaxMorph methodsFor: 'selection' stamp: 'RAA 2/14/2001 11:33'!\\\\ndeselect\\\\n\\\\tself allMorphsDo:\\\\n\\\\t\\\\t[:m | m isSyntaxMorph ifTrue: [m setDeselectedColor]].\\\\n\\\\n\\\\t\\\\\\\"Note following is wasteful because we do a deselect before each select, and it is often the same morph.\\\\\\\"\\\\n\\\\tself deletePopup! !\\\\n\\\\n!SyntaxMorph methodsFor: 'selection' stamp: 'tk 1/17/2001 15:07'!\\\\nisSelectable\\\\n\\\\t| ss |\\\\n\\\\t\\\\\\\"Spacer morphs enclose other morphs with the same parseNode\\\\\\\"\\\\n\\\\tself submorphs size > 1 ifTrue: [\\\\n\\\\t\\\\tss _ self submorphs second.\\\\n\\\\t\\\\tss isSyntaxMorph ifTrue: [\\\\n\\\\t\\\\t\\\\tss parseNode == parseNode ifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t^ self submorphs first class ~~ Morph]]].\\\\n\\\\t\\\\t\\\\n\\\\\\\"\\\\t(self nodeClassIs: SelectorNode) ifTrue: [^ false].\\\\n\\\\t(self nodeClassIs: KeyWordNode) ifTrue: [^ false].\\\\n\\\\\\\"\\\\n\\\\tself isMethodNode ifTrue: [^ false].\\\\n\\\\tparseNode ifNil: [^ false].\\\\n\\\\t^ true! !\\\\n\\\\n!SyntaxMorph methodsFor: 'selection' stamp: 'tk 7/31/2001 17:18'!\\\\nscaleColorByUserPref: aColor\\\\n\\\\t\\\\n\\\\t| myRoot underLyingColor |\\\\n\\\\n\\\\tmyRoot _ self rootTile.\\\\n\\\\tunderLyingColor _ myRoot ifNil: [Color transparent] ifNotNil: [myRoot color].\\\\n\\\\t[underLyingColor isTransparent and: [(myRoot _ myRoot owner) notNil]] whileTrue: [\\\\n\\\\t\\\\tunderLyingColor _ myRoot color.\\\\n\\\\t].\\\\n\\\\t\\\\n\\\\t\\\\\\\"rude hack to get the desired effect before we have an owner\\\\\\\"\\\\n\\\\n\\\\tunderLyingColor isTransparent ifTrue: [underLyingColor _ Color r: 0.903 g: 1.0 b: 0.903].\\\\n\\\\t^aColor mixed: (ContrastFactor ifNil: [0.3]) with: underLyingColor\\\\n\\\\n\\\\\\\"Would like to be able to make MethodNode and outer Block be transparent.  This method does not allow that.  Consider (^ myRoot color) inside the whileTrue.  Consider setting underLyingColor to (myRoot valueOfProperty: #deselectedBorderColor ifAbsent: [myRoot color]) in second line.\\\\\\\"! !\\\\n\\\\n!SyntaxMorph methodsFor: 'selection' stamp: 'tk 7/23/2001 18:31'!\\\\nselect\\\\n\\\\tself deselect.\\\\n\\\\t\\\\\\\"Outer block is not colored and has no popup\\\\\\\"\\\\n\\\\t(owner isSyntaxMorph and: [owner nodeClassIs: MethodNode]) \\\\n\\\\t\\\\tifTrue: [self setDeselectedColor \\\\\\\"normal\\\\\\\"]\\\\n\\\\t\\\\tifFalse: [self color: Color lightBrown].\\\\n\\\\tself borderColor: #raised.\\\\n\\\\tself offerPopUp.! !\\\\n\\\\n!SyntaxMorph methodsFor: 'selection' stamp: 'tk 7/19/2001 17:52'!\\\\nsetDeselectedColor\\\\n\\\\t\\\\\\\"The normal color of the tile, stored with the tile\\\\\\\"\\\\n\\\\t| deselectedColor deselectedBorderColor |\\\\n\\\\n\\\\tdeselectedColor _ self valueOfProperty: #deselectedColor ifAbsent: [nil].\\\\n\\\\tdeselectedBorderColor _ self valueOfProperty: #deselectedBorderColor ifAbsent: [nil].\\\\n\\\\tdeselectedColor ifNotNil: [\\\\n\\\\t\\\\tdeselectedColor _ self scaleColorByUserPref: deselectedColor].\\\\n\\\\tdeselectedBorderColor ifNotNil: [\\\\n\\\\t\\\\tdeselectedBorderColor _ self scaleColorByUserPref: deselectedBorderColor].\\\\n\\\\tself \\\\n\\\\t\\\\tcolor: (deselectedColor ifNil: [Color transparent]);\\\\n\\\\t\\\\tborderColor: (deselectedBorderColor ifNil: [Color transparent])! !\\\\n\\\\n!SyntaxMorph methodsFor: 'selection' stamp: 'dgd 2/22/2003 13:41'!\\\\nsetSelection: newSpec \\\\n\\\\t\\\\\\\"A selectionSpec is {Inner morph.  Where clicked.  Outer morph}.\\\\n\\\\tFirst mouseDown starts a selection (with outerMorph isNil).\\\\n\\\\tDragging more than 4 pixels means to grab a copy of the current outer selection.\\\\n\\\\t\\\\tThe current selection is the outerMorph, or the inner if it is nil.\\\\n\\\\tEach mouseUp extends the selection to the next outer morph that is selectable.\\\\n\\\\t\\\\tExcept if this is the first click.\\\\\\\"\\\\n\\\\n\\\\t| rootTile |\\\\n\\\\t(rootTile := self rootTile) valueOfProperty: #selectionSpec\\\\n\\\\t\\\\tifPresentDo: [:oldSpec | oldSpec third ifNotNilDo: [:m | m deselect]].\\\\n\\\\t(newSpec isNil or: [newSpec third isNil and: [self isMethodNode]]) \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[self deselect.\\\\n\\\\t\\\\t\\\\t^rootTile removeProperty: #selectionSpec].\\\\n\\\\n\\\\t\\\\\\\"Select outer morph of the new selection\\\\\\\"\\\\n\\\\tnewSpec third isNil \\\\n\\\\t\\\\tifTrue: [self select\\\\t\\\\\\\"first click down\\\\\\\"]\\\\n\\\\t\\\\tifFalse: [newSpec third select\\\\t\\\\\\\"subsequent clicks\\\\\\\"].\\\\n\\\\trootTile setProperty: #selectionSpec toValue: newSpec! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'stepping and presenter' stamp: 'tk 7/25/2001 11:26'!\\\\nstep\\\\n\\\\tsuper step.\\\\n\\\\tself isBlockNode ifTrue: [self trackDropZones].\\\\n! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'submorphs-accessing' stamp: 'tk 1/13/2001 20:41'!\\\\nfindA: aClass\\\\n\\\\t| ans |\\\\n\\\\t\\\\\\\"Allow finding on the class of the parseNode\\\\\\\"\\\\n\\\\n\\\\t(ans _ super findA: aClass) ifNotNil: [^ ans].\\\\n\\\\tsubmorphs do: [:ss | \\\\n\\\\t\\\\tss isSyntaxMorph ifTrue: [\\\\n\\\\t\\\\t\\\\tss parseNode class == aClass ifTrue: [^ ss]]].\\\\n\\\\t^ nil! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'testing' stamp: 'di 11/3/2000 08:03'!\\\\nstepTime\\\\n\\\\n\\\\t^ 50! !\\\\n\\\\n!SyntaxMorph methodsFor: 'testing' stamp: 'di 1/30/2001 11:22'!\\\\nwantsSteps\\\\n\\\\t\\\\\\\"Only step this morph if we explicitly send startStepping\\\\\\\"\\\\n\\\\n\\\\t^ false! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'tests' stamp: 'di 11/6/2000 10:47'!\\\\ntest\\\\n\\\\t3 > 4 ifTrue: [].\\\\n\\\\t^ self! !\\\\n\\\\n!SyntaxMorph methodsFor: 'tests' stamp: 'gm 2/22/2003 12:35'!\\\\ntestForNode: targetNode andDo: aBlock \\\\n\\\\ttargetNode == parseNode ifTrue: [aBlock value: self].\\\\n\\\\tself submorphsDo: \\\\n\\\\t\\\\t\\\\t[:each | \\\\n\\\\t\\\\t\\\\t(each isSyntaxMorph) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [each testForNode: targetNode andDo: aBlock]]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'tests' stamp: 'di 11/14/2000 14:54'!\\\\ntoDo\\\\n\\\\\\\"\\\\nBiggies...\\\\n[ ]\\\\tIntegrate with EToy scriptors\\\\n\\\\treleaseCachedState can discard all morphic structure.\\\\n\\\\n[ ]\\\\tOptions:\\\\n\\\\tShow / hide syntax markers (like [], (), ., :, ;, etc)\\\\n\\\\tNo color / color-in-focus / full color\\\\n\\\\tTiles / textiles / text\\\\n\\\\n[ ]\\\\tParsedTextMorph -- looks like text but has all same substructure\\\\n\\\\n[ ]\\\\tIntroduce notion of an UnParsedNode -- maybe a flag in ParseNode\\\\n\\\\tText -> UnParsed -> Parsed -> CodeGen\\\\n\\\\n[ ]\\\\tNeed DnD evaluator, or some sort of '!!' button on any entity (halo?)\\\\n\\\\tAlso inspector / browser\\\\n\\\\n[ ]\\\\tAll the type help we can get\\\\n\\\\nDetails ...\\\\n[ ]\\\\tOpen up the parse of BraceNodes\\\\n\\\\n[ ]\\\\tVerify that all pastes are OK\\\\n\\\\n[ ]\\\\tColors not yet right for colored version.\\\\n\\\\n[ ]\\\\tStart work on show / hide of syntax markers -- (), [], etc.\\\\n\\\\n[ ]\\\\tStart work on textiles (grabable entites in 'normal' text)\\\\n\\\\n[ ]\\\\tNeed autoscroll during drag for drop\\\\n\\\\n[ ]\\\\tUse, eg, shift-drag to move, del to delete\\\\n\\\\n[ ]\\\\tWhat about invalid drops -- stick on cursor?\\\\n\\\\nSystem...\\\\n[ ]\\\\tOnly keep history 7 deep; option to clear on quit\\\\n\\\\tclear command above spaceLeft\\\\n\\\\n[ ]\\\\tCompute each page of prefs viewer on demand instead of as now.\\\\n\\\\n[ ]\\\\tOffer a search command that will gather up all preferences that match a given string (name or help string)\\\\n\\\\nPreferences enable: #noTileColor.\\\\nPreferences disable: #noTileColor.\\\\nSmalltalk browseAllSelect: [:cm | cm size > 600]\\\\nSyntaxMorph testAll\\\\n\\\\\\\"! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'type checking' stamp: 'sw 2/23/2001 23:40'!\\\\nargTypeFor: aSelector\\\\n\\\\t\\\\\\\"Answer the type of the argument of this selector.  Return #unknown if not found.\\\\\\\"\\\\n\\\\n\\\\t| itsInterface |\\\\n\\\\taSelector numArgs = 0 \\\\n\\\\t\\\\tifTrue: [self inform: aSelector, ' does not take an argument'. ^ #error \\\\\\\"7\\\\\\\"].\\\\n\\\\titsInterface _ self currentVocabulary methodInterfaceAt: aSelector ifAbsent:\\\\n\\\\t\\\\t[^ #unknown].\\\\n\\\\t^ itsInterface typeForArgumentNumber: 1! !\\\\n\\\\n!SyntaxMorph methodsFor: 'type checking' stamp: 'sw 2/15/2001 14:25'!\\\\nokToBeReplacedBy: aSyntaxMorph\\\\n\\\\t\\\\\\\"Return true if it is OK to replace me with aSyntaxMorph.  Enforce the type rules in the old EToy green tiles.\\\\\\\"\\\\n\\\\n\\\\t| itsType myType |\\\\n\\\\t(Preferences eToyFriendly or: [Preferences typeCheckingInTileScripting])\\\\n\\\\t\\\\tifFalse: [^ true].\\\\t\\\\\\\"not checking unless one of those prefs is true\\\\\\\"\\\\n\\\\t(parseNode class == BlockNode and: [aSyntaxMorph parseNode class == BlockNode]) \\\\n\\\\t\\\\tifTrue: [^ true].\\\\n\\\\t(parseNode class == ReturnNode and: [aSyntaxMorph parseNode class == ReturnNode]) \\\\n\\\\t\\\\tifTrue: [^ true].\\\\n\\\\tparseNode class == KeyWordNode ifTrue: [^ false].\\\\n\\\\taSyntaxMorph parseNode class == KeyWordNode ifTrue: [^ false].\\\\n\\\\tparseNode class == SelectorNode ifTrue: [^ false].\\\\n\\\\taSyntaxMorph parseNode class == SelectorNode ifTrue: [^ false].\\\\n\\\\towner isSyntaxMorph ifFalse: [^ true].\\\\t\\\\\\\"only within a script\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"Transcript show: aSyntaxMorph resultType printString, ' dropped on ', \\\\n\\\\t\\\\t\\\\tself receiverOrArgType printString; cr.\\\\n\\\\t\\\\t\\\\\\\"\\\\n\\\\t(itsType _ aSyntaxMorph resultType) == #unknown ifTrue: [^ true].\\\\n\\\\t(myType _ self receiverOrArgType) == #unknown ifTrue: [^ true].\\\\n\\\\t\\\\t\\\\\\\"my type in enclosing message\\\\\\\"\\\\n\\\\t^ myType = itsType! !\\\\n\\\\n!SyntaxMorph methodsFor: 'type checking' stamp: 'tk 2/9/2001 15:56'!\\\\nreceiverOrArgType\\\\n\\\\t| ty |\\\\n\\\\t\\\\\\\"Return my type in my role as a receiver or as an argument.  Ask my enclosing message first, then ask myself.  (If owner accepts any #object, and I am a #point, do return #object.)\\\\\\\"\\\\n\\\\n\\\\t^ (ty _ self receiverOrArgTypeAbove) == #unknown\\\\n\\\\t\\\\tifTrue: [self resultType]\\\\n\\\\t\\\\tifFalse: [ty]! !\\\\n\\\\n!SyntaxMorph methodsFor: 'type checking' stamp: 'dgd 2/22/2003 18:48'!\\\\nreceiverOrArgTypeAbove\\\\n\\\\t\\\\\\\"Return the type for me according to the message that encloses me.\\\\\\\"\\\\n\\\\n\\\\t| enclosing sub list |\\\\n\\\\t(self nodeClassIs: BlockNode) ifTrue: [^#command].\\\\n\\\\tenclosing := owner.\\\\n\\\\tsub := self.\\\\n\\\\t\\\\n\\\\t[enclosing isSyntaxMorph ifFalse: [^#unknown].\\\\n\\\\t(enclosing nodeClassIs: MessageNode) \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[list := enclosing submorphs \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tselect: [:ss | ss isSyntaxMorph and: [ss parseNode notNil]].\\\\n\\\\t\\\\t\\\\tlist size = 1 \\\\n\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[^(list indexOf: sub) = 1 \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [enclosing receiverTypeFor: enclosing selector]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [enclosing argTypeFor: enclosing selector]]].\\\\n\\\\t(enclosing nodeClassIs: BlockNode) ifTrue: [^#command].\\\\n\\\\tsub := enclosing.\\\\n\\\\tenclosing := enclosing owner.\\\\n\\\\ttrue] \\\\n\\\\t\\\\t\\\\twhileTrue! !\\\\n\\\\n!SyntaxMorph methodsFor: 'type checking' stamp: 'sw 2/27/2001 09:11'!\\\\nreceiverTypeFor: aSelector\\\\n\\\\t\\\\\\\"Answer the type of the receiver of this selector.  Return #unknown if not found.\\\\\\\"\\\\n\\\\n\\\\t| itsInterface |\\\\n\\\\n\\\\taSelector ifNil: [^ #unknown].\\\\n\\\\titsInterface _ self currentVocabulary methodInterfaceAt: aSelector ifAbsent:\\\\n\\\\t\\\\t[^ #unknown].\\\\n\\\\t^ itsInterface receiverType! !\\\\n\\\\n!SyntaxMorph methodsFor: 'type checking' stamp: 'yo 7/22/2005 16:43'!\\\\nresultType\\\\n\\\\t\\\\\\\"Look up my result type.  If I am a constant, use that class.  If I am a message, look up the selector.\\\\\\\"\\\\n\\\\n\\\\t| list value soundChoices |\\\\n\\\\tparseNode class == BlockNode ifTrue: [^#blockContext].\\\\n\\\\tparseNode class == AssignmentNode ifTrue: [^#command].\\\\n\\\\tparseNode class == ReturnNode ifTrue: [^#command].\\\\t\\\\\\\"Need more restriction than this\\\\\\\"\\\\n\\\\tlist := submorphs \\\\n\\\\t\\\\t\\\\t\\\\tselect: [:ss | ss isSyntaxMorph and: [ss parseNode notNil]].\\\\n\\\\tlist size > 1 ifTrue: [^self resultTypeFor: self selector].\\\\n\\\\tlist size = 1 \\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[\\\\\\\"test for levels that are just for spacing in layout\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t(list first isSyntaxMorph and: [list first nodeClassIs: MessageNode]) \\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [^list first resultType]].\\\\t\\\\\\\"go down one level\\\\\\\"\\\\n\\\\tvalue := self try.\\\\n\\\\tvalue class == Error ifTrue: [^#unknown].\\\\n\\\\t(value isNumber) ifTrue: [^#Number].\\\\n\\\\t(value isKindOf: Boolean) ifTrue: [^#Boolean].\\\\n\\\\t(value isForm) ifTrue: [^#Graphic].\\\\n\\\\t(value isPlayerLike and: [value costume renderedMorph isMemberOf: KedamaPatchMorph]) ifTrue: [^#Patch].\\\\n\\\\tvalue isString\\\\n\\\\t\\\\tifTrue: \\\\n\\\\t\\\\t\\\\t[soundChoices := #('silence').\\\\t\\\\\\\"default, if no SampledSound class\\\\\\\"\\\\n\\\\t\\\\t\\\\tSmalltalk at: #SampledSound\\\\n\\\\t\\\\t\\\\t\\\\tifPresent: [:sampledSound | soundChoices := sampledSound soundNames].\\\\n\\\\t\\\\t\\\\t(soundChoices includes: value) ifTrue: [^#Sound]].\\\\n\\\\t(value isPlayerLike) ifTrue: [^#Player].\\\\n\\\\t^value class name asLowercase\\\\t\\\\\\\"asSymbol (not needed)\\\\\\\"! !\\\\n\\\\n!SyntaxMorph methodsFor: 'type checking' stamp: 'sw 2/24/2001 12:13'!\\\\nresultTypeFor: aSelector\\\\n\\\\t\\\\\\\"Answer the result type of selector.  Return #unknown if not found.\\\\\\\"\\\\n\\\\n\\\\t| itsInterface |\\\\n\\\\taSelector ifNil: [self inform: 'Please tell Ted how you caused this'.\\\\n\\\\t\\\\t^ #abs \\\\\\\"a bogus type\\\\\\\"].\\\\n\\\\titsInterface _ self currentVocabulary methodInterfaceAt: aSelector ifAbsent:\\\\n\\\\t\\\\t[^ #unknown].\\\\n\\\\t^ itsInterface resultType! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'updating' stamp: 'di 11/13/2000 20:30'!\\\\nupdate: aSymbol\\\\n\\\\n\\\\t| bingo saveOwner newMorph db |\\\\n\\\\n\\\\t(db _ self debugger) ifNil: [^super update: aSymbol].\\\\n\\\\taSymbol == #contents ifTrue: [\\\\n\\\\t\\\\tsaveOwner _ owner.\\\\n\\\\t\\\\tdb removeDependent: self.\\\\n\\\\t\\\\tmarkerMorph ifNotNil: [markerMorph delete. markerMorph _ nil].\\\\n\\\\t\\\\tnewMorph _ db createSyntaxMorph.\\\\n\\\\t\\\\tself delete.\\\\n\\\\t\\\\tsaveOwner addMorph: newMorph.\\\\n\\\\t\\\\tsaveOwner owner setScrollDeltas.\\\\n\\\\t\\\\tnewMorph update: #contentsSelection.\\\\n\\\\t].\\\\n\\\\taSymbol == #contentsSelection ifTrue: [\\\\n\\\\t\\\\tmarkerMorph ifNil: [\\\\n\\\\t\\\\t\\\\tmarkerMorph _ RectangleMorph new.\\\\n\\\\t\\\\t\\\\tmarkerMorph\\\\n\\\\t\\\\t\\\\t\\\\tcolor: Color transparent;\\\\n\\\\t\\\\t\\\\t\\\\tborderWidth: 2;\\\\n\\\\t\\\\t\\\\t\\\\tborderColor: Color red;\\\\n\\\\t\\\\t\\\\t\\\\tlock.\\\\n\\\\t\\\\t\\\\towner addMorphFront: markerMorph.\\\\n\\\\t\\\\t].\\\\n\\\\t\\\\tbingo _ parseNode rawSourceRanges keyAtValue: db pcRange ifAbsent: [nil].\\\\n\\\\t\\\\tself testForNode: bingo andDo: [ :foundMorph | \\\\n\\\\t\\\\t\\\\tmarkerMorph\\\\n\\\\t\\\\t\\\\t\\\\tposition: foundMorph position;\\\\n\\\\t\\\\t\\\\t\\\\textent: foundMorph extent.\\\\n\\\\t\\\\t\\\\towner owner scrollIntoView: foundMorph bounds extra: 0.5.\\\\n\\\\t\\\\t\\\\t^self\\\\n\\\\t\\\\t].\\\\n\\\\t].\\\\n\\\\tsuper update: aSymbol! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'viewer' stamp: 'tk 11/5/2001 08:32'!\\\\nexternalName\\\\n\\\\n\\\\t^ self knownName ifNil: [\\\\n\\\\t\\\\tparseNode ifNil: ['Syntax -- (extra layer)']\\\\n\\\\t\\\\t\\\\t\\\\tifNotNil: [self parseNode class printString]]! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'visual properties' stamp: 'tk 7/31/2001 16:53'!\\\\nfillStyle: aFillStyle\\\\n\\\\n\\\\taFillStyle isColor \\\\n\\\\t\\\\tifTrue: [self color: aFillStyle]\\\\t\\\\\\\"so we will process it\\\\\\\"\\\\n\\\\t\\\\tifFalse: [super fillStyle: aFillStyle].\\\\n! !\\\\n\\\\n\\\\n!SyntaxMorph methodsFor: 'vocabulary' stamp: 'gm 2/22/2003 12:31'!\\\\nlimitClassToUseWith: aValue vocabulary: aVocabulary \\\\n\\\\t\\\\\\\"Answer the most generic whose method should be shown in a selector pop-up in the receiver that is put up on behalf of aValue\\\\\\\"\\\\n\\\\n\\\\t(aValue isNumber) ifTrue: [^Number].\\\\n\\\\t\\\\\\\"Ted: This hook allows you to intervene as suits your purposes here if you don't like the defaults.\\\\\\\"\\\\n\\\\t^aValue defaultLimitClassForVocabulary: aVocabulary! !\\\\n\\\\n!SyntaxMorph methodsFor: 'vocabulary' stamp: 'gm 2/22/2003 12:48'!\\\\nvocabularyToUseWith: aValue \\\\n\\\\t\\\\\\\"Answer a vocabulary to use with the given value\\\\\\\"\\\\n\\\\n\\\\t(aValue isNumber) ifTrue: [^Vocabulary numberVocabulary].\\\\n\\\\t(aValue isKindOf: Time) ifTrue: [^Vocabulary vocabularyForClass: Time].\\\\n\\\\t(aValue isString) ifTrue: [^Vocabulary vocabularyForClass: String].\\\\n\\\\taValue class isUniClass ifTrue: [^Vocabulary eToyVocabulary].\\\\n\\\\t^self currentVocabulary! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSyntaxMorph class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SyntaxMorph class methodsFor: 'accessing' stamp: 'tk 9/18/2001 16:10'!\\\\nsourceCodeTemplate\\\\n\\\\t\\\\\\\"Return the default tile method template\\\\\\\"\\\\n\\\\n\\\\t^ 'anEmpty: input1 method: input2\\\\n\\\\t\\\\\\\"Edit the name above and the code below to make your own method\\\\\\\"\\\\n\\\\t3 + 4.\\\\n\\\\t\\\\\\\"Drag tiles in here.  Use the ''tiles'' and ''vars'' menus to get new tiles\\\\\\\"\\\\n\\\\t^ ''this is a statement'' sort'  \\\\n! !\\\\n\\\\n\\\\n!SyntaxMorph class methodsFor: 'as yet unclassified' stamp: 'RAA 2/26/2001 22:59'!\\\\ncolumn: aColor on: aParseNode\\\\n\\\\n\\\\t| c color |\\\\n\\\\tcolor _ self translateColor: aColor.\\\\n\\\\t(c _ self newColumn)\\\\n\\\\t\\\\tparseNode: aParseNode;\\\\n\\\\t\\\\tlayoutInset: c standardInset;\\\\n\\\\t\\\\thResizing: #shrinkWrap;\\\\n\\\\t\\\\tvResizing: #shrinkWrap;\\\\n\\\\t\\\\tcolor: color;\\\\n\\\\t\\\\tborderWidth: 1;\\\\n\\\\t\\\\tborderColor: c stdBorderColor;\\\\n\\\\t\\\\twrapCentering: #topLeft;\\\\n\\\\t\\\\tcellPositioning: c standardCellPositioning.\\\\n\\\\t^c\\\\n! !\\\\n\\\\n!SyntaxMorph class methodsFor: 'as yet unclassified' stamp: 'RAA 2/16/2001 15:37'!\\\\nmethodNodeOuter: aNode\\\\n\\\\n\\\\t^(self column: #method on: aNode) methodNodeOuter: aNode\\\\n! !\\\\n\\\\n!SyntaxMorph class methodsFor: 'as yet unclassified' stamp: 'di 11/13/2000 21:12'!\\\\nnoTileColor\\\\n\\\\n\\\\t^ true! !\\\\n\\\\n!SyntaxMorph class methodsFor: 'as yet unclassified' stamp: 'RAA 2/26/2001 23:00'!\\\\nrow: aColor on: aParseNode\\\\n\\\\n\\\\t| r color |\\\\n\\\\tcolor _ self translateColor: aColor.\\\\n\\\\t(r _ self newRow)\\\\n\\\\t\\\\tparseNode: aParseNode;\\\\n\\\\t\\\\tlayoutInset: r standardInset;\\\\n\\\\t\\\\thResizing: #shrinkWrap;\\\\n\\\\t\\\\tvResizing: #shrinkWrap;\\\\n\\\\t\\\\tcolor: color;\\\\n\\\\t\\\\tborderWidth: 1;\\\\n\\\\t\\\\tborderColor: r stdBorderColor;\\\\n\\\\t\\\\twrapCentering: #topLeft;\\\\n\\\\t\\\\tcellPositioning: r standardCellPositioning.\\\\n\\\\t^r! !\\\\n\\\\n!SyntaxMorph class methodsFor: 'as yet unclassified' stamp: 'di 5/2/2001 09:59'!\\\\nsetSize: oldExtent andMakeResizable: outerMorph\\\\n\\\\t| tw |\\\\n\\\\t(tw _ outerMorph findA: TwoWayScrollPane) ifNil: [^self].\\\\n\\\\ttw hResizing: #spaceFill;\\\\n\\\\t\\\\tvResizing: #spaceFill;\\\\n\\\\t\\\\tcolor: Color transparent;\\\\n\\\\t\\\\tsetProperty: #hideUnneededScrollbars toValue: true.\\\\n\\\\touterMorph \\\\n\\\\t\\\\thResizing: #shrinkWrap;\\\\n\\\\t\\\\tvResizing: #shrinkWrap;\\\\n\\\\t\\\\tcellPositioning: #topLeft.\\\\n\\\\touterMorph fullBounds.\\\\n! !\\\\n\\\\n!SyntaxMorph class methodsFor: 'as yet unclassified' stamp: 'RAA 2/26/2001 22:56'!\\\\nstandardInset\\\\n\\\\n\\\\t^ self alansTest1 ifTrue: [1] ifFalse: [-1@-1]! !\\\\n\\\\n!SyntaxMorph class methodsFor: 'as yet unclassified' stamp: 'RAA 8/24/1999 11:59'!\\\\ntest\\\\n\\\\n\\\\\\\"\\\\nSyntaxMorph test\\\\n\\\\\\\"\\\\n\\\\tself testClass: MessageNode andMethod: #asMorphicSyntaxIn:.\\\\n\\\\t\\\\\\\"self testClass: MethodNode andMethod: #asMorphicSyntaxIn:.\\\\\\\"\\\\n\\\\n! !\\\\n\\\\n!SyntaxMorph class methodsFor: 'as yet unclassified' stamp: 'dvf 8/23/2003 12:20'!\\\\ntestAll\\\\n\\\\n\\\\t| source tree total count systNav|\\\\n\\\\\\\"\\\\nSyntaxMorph testAll\\\\n\\\\\\\"\\\\n\\\\tsystNav _ self systemNavigation.\\\\n\\\\tcount _ total _ 0.\\\\n\\\\tsystNav allBehaviorsDo: [ :aClass | total _ total + 1].\\\\n'Testing all behaviors'\\\\n\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\tfrom: 0 to: total\\\\n\\\\tduring: [ :bar |\\\\n\\\\t\\\\tsystNav allBehaviorsDo: [ :aClass |\\\\n\\\\t\\\\t\\\\tbar value: (count _ count + 1).\\\\n\\\\t\\\\t\\\\taClass selectors do: [ :aSelector |\\\\n\\\\t\\\\t\\\\t\\\\tsource _ (aClass compiledMethodAt: aSelector) getSourceFromFile.\\\\n\\\\t\\\\t\\\\t\\\\ttree _ Compiler new \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tparse: source \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tin: aClass \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnotifying: nil.\\\\n\\\\t\\\\t\\\\t\\\\ttree asMorphicSyntaxUsing: SyntaxMorph.\\\\n\\\\t\\\\t\\\\t].\\\\n\\\\t\\\\t].\\\\t].\\\\n\\\\n\\\\n! !\\\\n\\\\n!SyntaxMorph class methodsFor: 'as yet unclassified' stamp: 'dvf 8/23/2003 12:20'!\\\\ntestAllMethodsOver: methodSize \\\\n\\\\t\\\\\\\"MessageTally spyOn: [SyntaxMorph testAllMethodsOver: 600]\\\\\\\"\\\\n\\\\t\\\\\\\"Add up the total layout area for syntax morphs representing all  \\\\n\\\\tmethods over the given size. This is a stress-test for SyntaxMorph  \\\\n\\\\tlayout. A small value for the total area is also a figure of merit in the  \\\\n\\\\tpresentation of Squeak source code in general.\\\\\\\"\\\\n\\\\t\\\\\\\"Results:  \\\\n\\\\t#(69 600 180820874 103700) 11/4  \\\\n\\\\t70% build morphs, 12% get source, 9% layout, 8% parse, 1% roundoff  \\\\n\\\\tFolded wide receivers, don't center keywords any more.  \\\\n\\\\t#(68 600 160033784 127727) 11/9  \\\\n\\\\t76% build morphs, 8% get source, 8% layout, 8% parse, 0% roundoff  \\\\n\\\\tFolded more messages, dropped extra vertical spacing in blocks.  \\\\n\\\\t#(68 600 109141704 137308) 11/10  \\\\n\\\\t79% build morphs, 6% get source, 8% layout, 7% parse  \\\\n\\\\tFolded more messages, dropped extra horizontal spacing.  \\\\n\\\\t#(68 600 106912968 132171) 11/10  \\\\n\\\\t80% build morphs, ??% get source, 11% layout, 7% parse  \\\\n\\\\tUnfolded keyword messages that will fit on one line.  \\\\n\\\\t#(68 600 96497372 132153) 11/10  \\\\n\\\\t81% build morphs, ??% get source, 8% layout, 8% parse  \\\\n\\\\tAfter alignment rewrite...  \\\\n\\\\t#(74 600 101082316 244799) 11/12  \\\\n\\\\t76% build morphs, 4% get source, 15% layout, 5% parse  \\\\n\\\\tAfter alignment rewrite...  \\\\n\\\\t#(74 600 101250620 204972) 11/15  \\\\n\\\\t74% build morphs, 6% get source, 13% layout, 7% parse  \\\\n\\\\t\\\\\\\"\\\\n\\\\t| tree source biggies morph stats time area |\\\\n\\\\tbiggies _ self systemNavigation \\\\n\\\\t\\\\t\\\\t\\\\tallMethodsSelect: [:cm | cm size > methodSize].\\\\n\\\\tstats _ OrderedCollection new.\\\\n\\\\t'Laying out all ' , biggies size printString , ' methods over ' , methodSize printString , ' bytes...'\\\\n\\\\t\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\tfrom: 1\\\\n\\\\t\\\\tto: biggies size\\\\n\\\\t\\\\tduring: [:bar | biggies\\\\n\\\\t\\\\t\\\\t\\\\twithIndexDo: [:methodRef :i | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbar value: i.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tUtilities\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsetClassAndSelectorFrom: methodRef\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tin: [:aClass :aSelector | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tsource _ (aClass compiledMethodAt: aSelector) getSourceFromFile.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttime _ Time\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmillisecondsToRun: [tree _ Compiler new\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tparse: source\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tin: aClass\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnotifying: nil.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmorph _ tree asMorphicSyntaxUsing: SyntaxMorph.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tarea _ morph fullBounds area]].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstats add: {methodRef. area. time}]].\\\\n\\\\t^ {{biggies size. methodSize. stats\\\\n\\\\t\\\\tdetectSum: [:a | a second]. stats\\\\n\\\\t\\\\tdetectSum: [:a | a third]}. (stats\\\\n\\\\t\\\\tasSortedCollection: [:x :y | x third >= y third]) asArray}! !\\\\n\\\\n!SyntaxMorph class methodsFor: 'as yet unclassified' stamp: 'di 7/30/2001 16:29'!\\\\ntestClass: aClass andMethod: aSelector\\\\n\\\\t| tree |\\\\n\\\\ttree _ Compiler new \\\\n\\\\t\\\\tparse: (aClass sourceCodeAt: aSelector) \\\\n\\\\t\\\\tin: aClass \\\\n\\\\t\\\\tnotifying: nil.\\\\n\\\\t(tree asMorphicSyntaxUsing: SyntaxMorph)\\\\n\\\\t\\\\tparsedInClass: aClass;\\\\n\\\\t\\\\topenInWindow! !\\\\n\\\\n!SyntaxMorph class methodsFor: 'as yet unclassified' stamp: 'tk 7/19/2001 20:06'!\\\\ntranslateColor: aColorOrSymbol\\\\n\\\\n\\\\taColorOrSymbol isColor  ifTrue: [^ aColorOrSymbol].\\\\n\\\\taColorOrSymbol == #comment  ifTrue: [^ Color blue lighter].\\\\n\\\\taColorOrSymbol == #block  ifTrue: [^ Color r: 0.903 g: 1.0 b: 0.903].\\\\n\\\\taColorOrSymbol == #method  ifTrue: [^ Color r: 0.903 g: 1.0 b: 0.903].\\\\n\\\\taColorOrSymbol == #text  ifTrue: [^ Color r: 0.9 g: 0.9 b: 0.9].\\\\n\\\\n\\\\tself noTileColor ifTrue: [^ Color r: 1.0 g: 0.839 b: 0.613].\\\\t\\\\\\\"override\\\\\\\"\\\\n\\\\n\\\\taColorOrSymbol == #assignment  ifTrue: [^ Color paleGreen].\\\\n\\\\taColorOrSymbol == #keyword1  ifTrue: [^ Color paleBuff].\\\\t\\\\\\\"binary\\\\\\\"\\\\n\\\\taColorOrSymbol == #keyword2  ifTrue: [^ Color paleBuff lighter].\\\\t\\\\\\\"multipart\\\\\\\" \\\\n\\\\taColorOrSymbol == #cascade  ifTrue: [^ Color paleYellow darker].\\\\t\\\\\\\"has receiver\\\\\\\"\\\\n\\\\taColorOrSymbol == #cascade2  ifTrue: [^ Color paleOrange].\\\\t\\\\\\\"one send in the cascade\\\\\\\"\\\\n\\\\taColorOrSymbol == #literal  ifTrue: [^ Color paleMagenta].\\\\n\\\\taColorOrSymbol == #message  ifTrue: [^ Color paleYellow].\\\\n\\\\taColorOrSymbol == #method  ifTrue: [^ Color white].\\\\n\\\\taColorOrSymbol == #error  ifTrue: [^ Color red].\\\\n\\\\taColorOrSymbol == #return  ifTrue: [^ Color lightGray].\\\\n\\\\taColorOrSymbol == #variable  ifTrue: [^ Color paleTan].\\\\n\\\\taColorOrSymbol == #brace  ifTrue: [^ Color paleOrange].\\\\n\\\\taColorOrSymbol == #tempVariable  ifTrue: [^ Color paleYellow mixed: 0.75 with: Color paleGreen\\\\n\\\\t\\\\t\\\\\\\"Color yellow lighter lighter\\\\\\\"].\\\\n\\\\taColorOrSymbol == #blockarg2  ifTrue: [\\\\n\\\\t\\\\t\\\\t^ Color paleYellow mixed: 0.75 with: Color paleGreen].\\\\t\\\\\\\"arg itself\\\\\\\"\\\\n\\\\taColorOrSymbol == #blockarg1  ifTrue: [^ Color paleRed].\\\\t\\\\\\\"container\\\\\\\"\\\\n\\\\t\\\\t\\\\\\\"yellow mixed: 0.5 with: Color white\\\\\\\"\\\\n\\\\n\\\\t^ Color tan\\\\t\\\\\\\"has to be something!!\\\\\\\"! !\\\\n\\\\n\\\\n!SyntaxMorph class methodsFor: '*flexibleVocabularies-flexiblevocabularies-accessing' stamp: 'stephaneducasse 2/4/2006 20:33'!\\\\nallSpecs\\\\n\\\\t\\\\\\\"Return all specs that the Viewer knows about. Cache them.\\\\\\\"\\\\n\\\\t\\\\\\\"SyntaxMorph allSpecs\\\\\\\"\\\\n\\\\n\\\\t^AllSpecs ifNil: [\\\\n\\\\t\\\\tAllSpecs := Dictionary new.\\\\n\\\\t\\\\t(EToyVocabulary morphClassesDeclaringViewerAdditions)\\\\n\\\\t\\\\t\\\\tdo: [:cls | cls allAdditionsToViewerCategories keysAndValuesDo: [ :k :v | \\\\n\\\\t\\\\t\\\\t\\\\t(AllSpecs at: k ifAbsentPut: [ OrderedCollection new ]) addAll: v ] ].\\\\n\\\\t\\\\tAllSpecs\\\\n\\\\t]! !\\\\n\\\\n!SyntaxMorph class methodsFor: '*flexibleVocabularies-flexiblevocabularies-accessing' stamp: 'stephaneducasse 2/4/2006 20:33'!\\\\nclearAllSpecs\\\\n\\\\t\\\\\\\"Clear the specs that the Viewer knows about.\\\\\\\"\\\\n\\\\t\\\\\\\"SyntaxMorph clearAllSpecs\\\\\\\"\\\\n\\\\n\\\\tAllSpecs := nil.! !\\\\nUpdatingStringMorph subclass: #SyntaxUpdatingStringMorph\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'EToys-Tile Scriptors'!\\\\n\\\\n!SyntaxUpdatingStringMorph methodsFor: 'drawing' stamp: 'tk 1/31/2002 09:53'!\\\\ndrawOn: aCanvas\\\\n\\\\n\\\\t| tempForm strm where chars wid spaceWidth putLigature topOfLigature sizeOfLigature colorOfLigature dots charZero canvas f |\\\\n\\\\n\\\\ttempForm _ Form extent: self extent depth: aCanvas depth.\\\\n\\\\tcanvas _ tempForm getCanvas.\\\\n\\\\tf _ self fontToUse.\\\\n\\\\tspaceWidth _ f widthOf: Character space.\\\\n\\\\tstrm _ ReadStream on: contents.\\\\n\\\\tcharZero _ Character value: 0.\\\\t\\\\\\\"a marker for center dot \\\\U00b7\\\\\\\"\\\\n\\\\twhere _ 0@0.\\\\n\\\\ttopOfLigature _ self height // 2 - 1.\\\\n\\\\tsizeOfLigature _ (spaceWidth-2)@(spaceWidth-2).\\\\n\\\\tcolorOfLigature _ Color black alpha: 0.45\\\\t\\\\\\\"veryLightGray\\\\\\\".\\\\n\\\\tdots _ OrderedCollection new.\\\\n\\\\tputLigature _ [\\\\n\\\\t\\\\tdots add: ((where x + 1) @ topOfLigature extent: sizeOfLigature).\\\\n\\\\t\\\\twhere _ where + (spaceWidth@0)].\\\\n\\\\tstrm peek = charZero ifTrue: [\\\\n\\\\t\\\\tstrm next.\\\\n\\\\t\\\\tputLigature value].\\\\n\\\\t[strm peek = charZero] whileTrue: [strm next].\\\\n\\\\t[strm atEnd] whileFalse: [\\\\n\\\\t\\\\tchars _ strm upTo: charZero.\\\\n\\\\t\\\\twid _ f widthOfString: chars.\\\\n\\\\t\\\\tcanvas drawString: chars at: where.\\\\n\\\\t\\\\twhere _ where + (wid@0).\\\\n\\\\t\\\\tstrm atEnd ifFalse: [putLigature value.\\\\n\\\\t\\\\t\\\\t[strm peek = charZero] whileTrue: [strm next]].\\\\n\\\\t].\\\\n\\\\taCanvas paintImage: tempForm at: self topLeft.\\\\n\\\\tdots do: [ :each |\\\\n\\\\t\\\\taCanvas \\\\n\\\\t\\\\t\\\\tfillRectangle: (each translateBy: self topLeft) \\\\n\\\\t\\\\t\\\\tfillStyle: colorOfLigature.\\\\n\\\\t].\\\\n! !\\\\nAppRegistry subclass: #SystemBrowser\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'Tools-Base'!\\\\n!SystemBrowser commentStamp: '<historical>' prior: 0!\\\\nThis is the AppRegistry class for class browsing!\\\\n\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSystemBrowser class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SystemBrowser class methodsFor: 'class initialization' stamp: 'sd 11/20/2005 21:28'!\\\\ninitialize\\\\n\\\\t| pref |\\\\n\\\\tpref := Preferences preferenceAt: #browserShowsPackagePane.\\\\n\\\\tPreferences\\\\n\\\\t\\\\taddPreference: #browserShowsPackagePane\\\\n\\\\t\\\\tcategories: pref categoryList\\\\n\\\\t\\\\tdefault: pref defaultValue\\\\n\\\\t\\\\tballoonHelp: pref helpString\\\\n\\\\t\\\\tprojectLocal: pref localToProject\\\\n\\\\t\\\\tchangeInformee: self\\\\n\\\\t\\\\tchangeSelector: #packagePanePreferenceChanged\\\\n\\\\t\\\\t! !\\\\n\\\\n\\\\n!SystemBrowser class methodsFor: 'events' stamp: 'sd 11/20/2005 21:28'!\\\\npackagePanePreferenceChanged\\\\n\\\\t| theOtherOne |\\\\n\\\\tself registeredClasses size = 2\\\\n\\\\t\\\\tifTrue: [theOtherOne := (self registeredClasses copyWithout: PackagePaneBrowser) first]\\\\n\\\\t\\\\tifFalse: [theOtherOne := nil].\\\\n\\\\t(Preferences valueOfFlag: #browserShowsPackagePane ifAbsent: [false])\\\\n\\\\t\\\\tifTrue: [self default: PackagePaneBrowser]\\\\n\\\\t\\\\tifFalse: [self default: theOtherOne].\\\\n\\\\tSystemNavigation default browserClass: self default.! !\\\\n\\\\n\\\\n!SystemBrowser class methodsFor: 'initialize-release' stamp: 'sd 11/20/2005 21:28'!\\\\nunload\\\\n\\\\t| pref |\\\\n\\\\tpref := Preferences preferenceAt: #browserShowsPackagePane.\\\\n\\\\tPreferences\\\\n\\\\t\\\\taddPreference: #browserShowsPackagePane\\\\n\\\\t\\\\tcategories: pref categoryList\\\\n\\\\t\\\\tdefault: pref defaultValue\\\\n\\\\t\\\\tballoonHelp: pref helpString\\\\n\\\\t\\\\tprojectLocal: pref localToProject\\\\n\\\\t\\\\tchangeInformee: nil\\\\n\\\\t\\\\tchangeSelector: nil\\\\n\\\\t\\\\t! !\\\\n\\\\n\\\\n!SystemBrowser class methodsFor: 'instance creation' stamp: 'hpt 8/5/2004 20:27'!\\\\ndefaultOpenBrowser\\\\n\\\\t^self default openBrowser! !\\\\n\\\\n\\\\n!SystemBrowser class methodsFor: 'registration' stamp: 'hpt 9/30/2004 20:53'!\\\\naddRegistryMenuItemsTo: aMenu inAccountOf: aBrowser \\\\n\\\\t\\\\\\\"Add some useful options related Browser registry to the\\\\n\\\\tbrowsers windows menu\\\\\\\"\\\\n\\\\taMenu addLine;\\\\n\\\\t\\\\tadd: 'Register this Browser as default'\\\\n\\\\t\\\\ttarget: [self default: aBrowser class]\\\\n\\\\t\\\\taction: #value;\\\\n\\\\t\\\\tadd: 'Choose new default Browser'\\\\n\\\\t\\\\ttarget: self\\\\n\\\\t\\\\taction: #askForDefault! !\\\\nSystemChangeTestRoot subclass: #SystemChangeErrorHandling\\\\n\\\\tinstanceVariableNames: 'capturedEvents'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'SystemChangeNotification-Tests'!\\\\n!SystemChangeErrorHandling commentStamp: 'rw 4/3/2006 17:21' prior: 0!\\\\nThis class tests the error handing of the notification mechanism to ensure that one client that receives a system change cannot lock up the complete system.\\\\\\\"!\\\\n\\\\n\\\\n!SystemChangeErrorHandling methodsFor: 'Event Notifications' stamp: 'rw 4/3/2006 17:57'!\\\\nhandleEventWithError: event\\\\n\\\\n\\\\tself error: 'Example of event handling code that throws an error.'! !\\\\n\\\\n!SystemChangeErrorHandling methodsFor: 'Event Notifications' stamp: 'rw 4/3/2006 18:07'!\\\\nhandleEventWithHalt: event\\\\n\\\\n\\\\tself halt: 'Example of event handling code that contains a halt.'! !\\\\n\\\\n!SystemChangeErrorHandling methodsFor: 'Event Notifications' stamp: 'rw 4/3/2006 17:57'!\\\\nstoreEvent1: anEvent\\\\n\\\\n\\\\tcapturedEvents add: anEvent! !\\\\n\\\\n!SystemChangeErrorHandling methodsFor: 'Event Notifications' stamp: 'rw 4/3/2006 17:57'!\\\\nstoreEvent2: anEvent\\\\n\\\\n\\\\tcapturedEvents add: anEvent! !\\\\n\\\\n!SystemChangeErrorHandling methodsFor: 'Event Notifications' stamp: 'rw 4/3/2006 17:57'!\\\\nstoreEvent3: anEvent\\\\n\\\\n\\\\tcapturedEvents add: anEvent! !\\\\n\\\\n\\\\n!SystemChangeErrorHandling methodsFor: 'Running' stamp: 'rw 4/3/2006 17:51'!\\\\nsetUp\\\\n\\\\n\\\\tsuper setUp.\\\\n\\\\tcapturedEvents := OrderedCollection new! !\\\\n\\\\n!SystemChangeErrorHandling methodsFor: 'Running' stamp: 'rw 4/3/2006 17:56'!\\\\ntearDown\\\\n\\\\n\\\\tcapturedEvents := nil.\\\\n\\\\tsuper tearDown! !\\\\n\\\\n\\\\n!SystemChangeErrorHandling methodsFor: 'Testing' stamp: 'rw 4/5/2006 17:24'!\\\\ntestErrorOperation\\\\n\\\\n\\\\t| notifier wasCaptured |\\\\n\\\\tnotifier := self systemChangeNotifier.\\\\n\\\\twasCaptured := false.\\\\n\\\\tnotifier notify: self ofSystemChangesOfItem: #class change: #Added using: #storeEvent1:.\\\\n\\\\tnotifier notify: self ofSystemChangesOfItem: #class change: #Added using: #storeEvent2:.\\\\n\\\\tnotifier notify: self ofSystemChangesOfItem: #class change: #Added using: #handleEventWithError:.\\\\n\\\\tnotifier notify: self ofSystemChangesOfItem: #class change: #Added using: #storeEvent3:.\\\\n\\\\t[notifier classAdded: self class inCategory: #FooCat] on: Error do: [:exc |\\\\n\\\\t\\\\twasCaptured := true.\\\\n\\\\t\\\\tself assert: (capturedEvents size = 3)].\\\\n\\\\tself assert: wasCaptured.! !\\\\n\\\\n!SystemChangeErrorHandling methodsFor: 'Testing' stamp: 'rw 4/5/2006 17:24'!\\\\ntestHaltOperation\\\\n\\\\t\\\\n\\\\t| notifier wasCaptured |\\\\n\\\\tnotifier := self systemChangeNotifier.\\\\n\\\\twasCaptured := false.\\\\n\\\\tnotifier notify: self ofAllSystemChangesUsing: #storeEvent1:.\\\\n\\\\tnotifier notify: self ofAllSystemChangesUsing: #storeEvent2:.\\\\n\\\\tnotifier notify: self ofAllSystemChangesUsing: #handleEventWithHalt:.\\\\n\\\\tnotifier notify: self ofAllSystemChangesUsing: #storeEvent3:.\\\\n\\\\t[notifier classAdded: self class inCategory: #FooCat] on: Halt do: [:exc |\\\\n\\\\t\\\\twasCaptured := true.\\\\n\\\\t\\\\tself assert: (capturedEvents size = 3)].\\\\n\\\\tself assert: wasCaptured.! !\\\\n\\\\n!SystemChangeErrorHandling methodsFor: 'Testing' stamp: 'rw 4/5/2006 17:24'!\\\\ntestUnhandledEventOperation\\\\n\\\\n\\\\t| notifier wasCaptured |\\\\n\\\\tnotifier := self systemChangeNotifier.\\\\n\\\\twasCaptured := false.\\\\n\\\\tnotifier notify: self ofSystemChangesOfItem: #class change: #Added using: #storeEvent1:.\\\\n\\\\tnotifier notify: self ofSystemChangesOfItem: #class change: #Added using: #storeEvent2:.\\\\n\\\\tnotifier notify: self ofSystemChangesOfItem: #class change: #Added using: #zork:.\\\\n\\\\tnotifier notify: self ofSystemChangesOfItem: #class change: #Added using: #storeEvent3:.\\\\n\\\\t[notifier classAdded: self class inCategory: #FooCat] on: MessageNotUnderstood do: [:exc |\\\\n\\\\t\\\\twasCaptured := true.\\\\n\\\\t\\\\tself assert: (capturedEvents size = 3)].\\\\n\\\\tself assert: wasCaptured.! !\\\\nObject subclass: #SystemChangeNotifier\\\\n\\\\tinstanceVariableNames: 'eventSource silenceLevel'\\\\n\\\\tclassVariableNames: 'UniqueInstance'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Change Notification'!\\\\n\\\\n!SystemChangeNotifier methodsFor: 'initialize' stamp: 'NS 1/26/2004 20:41'!\\\\ninitialize\\\\n\\\\n\\\\teventSource := SystemEventManager new.\\\\n\\\\tsilenceLevel _ 0.! !\\\\n\\\\n\\\\n!SystemChangeNotifier methodsFor: 'public' stamp: 'NS 1/28/2004 11:29'!\\\\ndoSilently: aBlock\\\\n\\\\t\\\\\\\"Perform the block, and ensure that no system notification are broadcasted while doing so.\\\\\\\"\\\\n\\\\n\\\\t| result |\\\\n\\\\tsilenceLevel := silenceLevel + 1.\\\\n\\\\t[result := aBlock value] ensure: [silenceLevel > 0 ifTrue: [silenceLevel := silenceLevel - 1]].\\\\n\\\\t^ result.! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'public' stamp: 'NS 1/26/2004 20:41'!\\\\nisBroadcasting\\\\n\\\\n\\\\t^ silenceLevel = 0! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'public' stamp: 'rw 7/29/2003 17:01'!\\\\nnoMoreNotificationsFor: anObject\\\\n\\\\t\\\\\\\"Stop sending system notifications to an object.\\\\\\\"\\\\n\\\\n\\\\teventSource removeActionsWithReceiver: anObject! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'public' stamp: 'rw 7/10/2003 12:00'!\\\\nnotify: anObject ofAllSystemChangesUsing: oneArgumentSelector \\\\n\\\\t\\\\\\\"Notifies an object of any system changes.\\\\\\\"\\\\n\\\\n\\\\tself \\\\n\\\\t\\\\tnotify: anObject\\\\n\\\\t\\\\tofEvents: self allSystemEvents\\\\n\\\\t\\\\tusing: oneArgumentSelector! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'public' stamp: 'bvs 7/20/2004 12:13'!\\\\nnotify: anObject ofSystemChangesOfChange: changeKind using: oneArgumentSelector \\\\n\\\\t\\\\\\\"Notifies an object of system changes of the specified changeKind (#added, #removed, ...). Evaluate 'AbstractEvent allChangeKinds' to get the complete list.\\\\\\\"\\\\n\\\\n\\\\tself \\\\n\\\\t\\\\tnotify: anObject\\\\n\\\\t\\\\tofEvents: (self systemEventsForChange: changeKind)\\\\n\\\\t\\\\tusing: oneArgumentSelector! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'public' stamp: 'bvs 7/20/2004 12:13'!\\\\nnotify: anObject ofSystemChangesOfItem: itemKind change: changeKind using: oneArgumentSelector \\\\n\\\\t\\\\\\\"Notifies an object of system changes of the specified itemKind (#class, #category, ...) and changeKind (#added, #removed, ...). This is the finest granularity possible.\\\\n\\\\tEvaluate 'AbstractEvent allChangeKinds' to get the complete list of change kinds, and 'AbstractEvent allItemKinds to get all the possible item kinds supported.\\\\\\\"\\\\n\\\\n\\\\tself \\\\n\\\\t\\\\tnotify: anObject\\\\n\\\\t\\\\tofEvents: (Bag with: (self systemEventsForItem: itemKind change: changeKind))\\\\n\\\\t\\\\tusing: oneArgumentSelector! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'public' stamp: 'bvs 7/20/2004 12:13'!\\\\nnotify: anObject ofSystemChangesOfItem: itemKind  using: oneArgumentSelector \\\\n\\\\t\\\\\\\"Notifies an object of system changes of the specified itemKind (#class, #method, #protocol, ...). Evaluate 'AbstractEvent allItemKinds' to get the complete list.\\\\\\\"\\\\n\\\\n\\\\tself \\\\n\\\\t\\\\tnotify: anObject\\\\n\\\\t\\\\tofEvents: (self systemEventsForItem: itemKind)\\\\n\\\\t\\\\tusing: oneArgumentSelector! !\\\\n\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'ab 2/10/2005 16:32'!\\\\nclassCategoryAdded: aClassCategoryName\\\\n\\\\n\\\\tself trigger: (AddedEvent\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tclassCategory: aClassCategoryName)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'ab 2/10/2005 16:35'!\\\\nclassCategoryRemoved: aClassCategoryName\\\\n\\\\n\\\\tself trigger: (RemovedEvent\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tclassCategory: aClassCategoryName)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'ab 2/10/2005 16:44'!\\\\nclassCategoryRenamedFrom: anOldClassCategoryName to: aNewClassCategoryName\\\\n\\\\n\\\\tself trigger: (RenamedEvent\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tclassCategoryRenamedFrom: anOldClassCategoryName \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tto: aNewClassCategoryName)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'rw 7/29/2003 15:12'!\\\\nclass: aClass recategorizedFrom: oldCategory to: newCategory \\\\n\\\\tself trigger: (RecategorizedEvent \\\\n\\\\t\\\\t\\\\t\\\\tclass: aClass\\\\n\\\\t\\\\t\\\\t\\\\tcategory: newCategory\\\\n\\\\t\\\\t\\\\t\\\\toldCategory: oldCategory)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'rw 7/29/2003 15:11'!\\\\nclassAdded: aClass inCategory: aCategoryName \\\\n\\\\tself trigger: (AddedEvent class: aClass category: aCategoryName)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/26/2004 09:37'!\\\\nclassCommented: aClass\\\\n\\\\t\\\\\\\"A class with the given name was commented in the system.\\\\\\\"\\\\n\\\\n\\\\tself trigger: (CommentedEvent class: aClass)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'rw 7/29/2003 15:11'!\\\\nclassCommented: aClass inCategory: aCategoryName \\\\n\\\\t\\\\\\\"A class with the given name was commented in the system.\\\\\\\"\\\\n\\\\n\\\\tself trigger: (CommentedEvent class: aClass category: aCategoryName)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/20/2004 19:37'!\\\\nclassDefinitionChangedFrom: oldClass to: newClass\\\\n\\\\tself trigger: (ModifiedClassDefinitionEvent classDefinitionChangedFrom: oldClass to: newClass)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/16/2004 15:10'!\\\\nclassRemoved: aClass fromCategory: aCategoryName \\\\n\\\\tself trigger: (RemovedEvent class: aClass category: aCategoryName)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/27/2004 12:19'!\\\\nclassRenamed: aClass from: oldClassName to: newClassName inCategory: aCategoryName \\\\n\\\\tself trigger: (RenamedEvent \\\\n\\\\t\\\\t\\\\t\\\\tclass: aClass\\\\n\\\\t\\\\t\\\\t\\\\tcategory: aCategoryName\\\\n\\\\t\\\\t\\\\t\\\\toldName: oldClassName\\\\n\\\\t\\\\t\\\\t\\\\tnewName: newClassName)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/27/2004 12:48'!\\\\nclassReorganized: aClass\\\\n\\\\tself trigger: (ReorganizedEvent class: aClass)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/19/2004 09:48'!\\\\nevaluated: textOrStream\\\\n\\\\t^ self evaluated: textOrStream context: nil.! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/19/2004 09:47'!\\\\nevaluated: expression context: aContext\\\\n\\\\tself trigger: (DoItEvent \\\\n\\\\t\\\\t\\\\t\\\\texpression: expression\\\\n\\\\t\\\\t\\\\t\\\\tcontext: aContext)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/27/2004 11:24'!\\\\nmethodAdded: aMethod selector: aSymbol inClass: aClass \\\\n\\\\t\\\\\\\"A method with the given selector was added to aClass, but not put in a protocol.\\\\\\\"\\\\n\\\\n\\\\tself trigger: (AddedEvent\\\\n\\\\t\\\\t\\\\t\\\\tmethod: aMethod \\\\n\\\\t\\\\t\\\\t\\\\tselector: aSymbol\\\\n\\\\t\\\\t\\\\t\\\\tclass: aClass)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/27/2004 11:24'!\\\\nmethodAdded: aMethod selector: aSymbol inClass: aClass requestor: requestor\\\\n\\\\t\\\\\\\"A method with the given selector was added to aClass, but not put in a protocol.\\\\\\\"\\\\n\\\\n\\\\tself trigger: (AddedEvent\\\\n\\\\t\\\\t\\\\t\\\\tmethod: aMethod \\\\n\\\\t\\\\t\\\\t\\\\tselector: aSymbol\\\\n\\\\t\\\\t\\\\t\\\\tclass: aClass\\\\n\\\\t\\\\t\\\\t\\\\trequestor: requestor)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/27/2004 11:24'!\\\\nmethodAdded: aMethod selector: aSymbol inProtocol: aCategoryName class: aClass \\\\n\\\\t\\\\\\\"A method with the given selector was added to aClass in protocol aCategoryName.\\\\\\\"\\\\n\\\\n\\\\tself trigger: (AddedEvent\\\\n\\\\t\\\\t\\\\t\\\\tmethod: aMethod\\\\n\\\\t\\\\t\\\\t\\\\tselector: aSymbol\\\\n\\\\t\\\\t\\\\t\\\\tprotocol: aCategoryName\\\\n\\\\t\\\\t\\\\t\\\\tclass: aClass)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/27/2004 11:24'!\\\\nmethodAdded: aMethod selector: aSymbol inProtocol: aCategoryName class: aClass requestor: requestor\\\\n\\\\t\\\\\\\"A method with the given selector was added to aClass in protocol aCategoryName.\\\\\\\"\\\\n\\\\n\\\\tself trigger: (AddedEvent\\\\n\\\\t\\\\t\\\\t\\\\tmethod: aMethod\\\\n\\\\t\\\\t\\\\t\\\\tselector: aSymbol\\\\n\\\\t\\\\t\\\\t\\\\tprotocol: aCategoryName\\\\n\\\\t\\\\t\\\\t\\\\tclass: aClass\\\\n\\\\t\\\\t\\\\t\\\\trequestor: requestor)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/27/2004 11:41'!\\\\nmethodChangedFrom: oldMethod to: newMethod selector: aSymbol inClass: aClass\\\\n\\\\tself trigger: (ModifiedEvent\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmethodChangedFrom: oldMethod\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tto: newMethod\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tselector: aSymbol \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tinClass: aClass)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/27/2004 11:41'!\\\\nmethodChangedFrom: oldMethod to: newMethod selector: aSymbol inClass: aClass requestor: requestor\\\\n\\\\tself trigger: (ModifiedEvent\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmethodChangedFrom: oldMethod\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tto: newMethod\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tselector: aSymbol \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tinClass: aClass\\\\n\\\\t\\\\t\\\\t\\\\t\\\\trequestor: requestor)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/28/2004 11:12'!\\\\nmethodRemoved: aMethod selector: aSymbol class: aClass \\\\n\\\\t\\\\\\\"A method with the given selector was removed from the class.\\\\\\\"\\\\n\\\\n\\\\tself trigger: (RemovedEvent\\\\n\\\\t\\\\t\\\\t\\\\tmethod: aMethod \\\\n\\\\t\\\\t\\\\t\\\\tselector: aSymbol\\\\n\\\\t\\\\t\\\\t\\\\tclass: aClass)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/28/2004 11:11'!\\\\nmethodRemoved: aMethod selector: aSymbol inProtocol: protocol class: aClass \\\\n\\\\t\\\\\\\"A method with the given selector was removed from the class.\\\\\\\"\\\\n\\\\n\\\\tself trigger: (RemovedEvent\\\\n\\\\t\\\\t\\\\t\\\\tmethod: aMethod \\\\n\\\\t\\\\t\\\\t\\\\tselector: aSymbol\\\\n\\\\t\\\\t\\\\t\\\\tprotocol: protocol\\\\n\\\\t\\\\t\\\\t\\\\tclass: aClass)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 4/7/2004 13:35'!\\\\nselector: selector recategorizedFrom: oldCategory to: newCategory inClass: aClass\\\\n\\\\n\\\\tself trigger: (RecategorizedEvent \\\\n\\\\t\\\\t\\\\t\\\\tmethod: (aClass compiledMethodAt: selector ifAbsent: [nil])\\\\n\\\\t\\\\t\\\\t\\\\tprotocol: newCategory\\\\n\\\\t\\\\t\\\\t\\\\tclass: aClass\\\\n\\\\t\\\\t\\\\t\\\\toldProtocol: oldCategory)! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'al 7/18/2004 10:48'!\\\\ntraitDefinitionChangedFrom: oldTrait to: newTrait\\\\n\\\\tself trigger: (ModifiedTraitDefinitionEvent traitDefinitionChangedFrom: oldTrait to: newTrait)! !\\\\n\\\\n\\\\n\\\\n!SystemChangeNotifier methodsFor: 'private' stamp: 'rw 7/10/2003 15:15'!\\\\nnotify: anObject ofEvents: eventsCollection using: oneArgumentSelector\\\\n\\\\t\\\\\\\"Notifies an object of any events in the eventsCollection. Send it back a message #oneArgumentSelector, with as argument the particular system event instance.\\\\\\\"\\\\n\\\\n\\\\teventsCollection do: [:eachEvent |\\\\n\\\\t\\\\teventSource when: eachEvent send: oneArgumentSelector to: anObject]! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'private' stamp: 'rw 7/29/2003 17:05'!\\\\nreleaseAll\\\\n\\\\t\\\\\\\"Release all the dependents so that nobody receives notifications anymore.\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Done for cleaning up the system.\\\\\\\"\\\\n\\\\t\\\\\\\"self uniqueInstance releaseAll\\\\\\\"\\\\n\\\\n\\\\teventSource releaseActionMap! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'private' stamp: 'NS 1/26/2004 20:43'!\\\\nsetBroadcasting\\\\n\\\\tsilenceLevel := 0.! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'private' stamp: 'NS 1/26/2004 20:41'!\\\\ntrigger: event\\\\n\\\\n\\\\tself isBroadcasting ifTrue: [event trigger: eventSource]\\\\n\\\\n\\\\\\\"\\\\t| caughtExceptions |\\\\n\\\\tcaughtExceptions := OrderedCollection new.\\\\n\\\\tself isBroadcasting ifTrue: [\\\\n\\\\t\\\\t[(eventSource actionForEvent: event eventSelector) valueWithArguments: (Array with: event)] on: Exception do: [:exc | caughtExceptions add: exc]].\\\\n\\\\tcaughtExceptions do: [:exc | exc resignalAs: exc class new]\\\\\\\"! !\\\\n\\\\n\\\\n!SystemChangeNotifier methodsFor: 'private-event lists' stamp: 'rw 7/29/2003 15:14'!\\\\nallSystemEvents\\\\n\\\\t^AbstractEvent systemEvents! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'private-event lists' stamp: 'rw 7/29/2003 15:14'!\\\\nsystemEventsForChange: changeKind \\\\n\\\\t| selectorBlock |\\\\n\\\\tselectorBlock := AbstractEvent eventSelectorBlock.\\\\n\\\\t^AbstractEvent allItemKinds \\\\n\\\\t\\\\tcollect: [:itemKind | selectorBlock value: itemKind value: changeKind]! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'private-event lists' stamp: 'rw 7/29/2003 15:14'!\\\\nsystemEventsForItem: itemKind \\\\n\\\\t| selectorBlock |\\\\n\\\\tselectorBlock := AbstractEvent eventSelectorBlock.\\\\n\\\\t^AbstractEvent allChangeKinds \\\\n\\\\t\\\\tcollect: [:changeKind | selectorBlock value: itemKind value: changeKind]! !\\\\n\\\\n!SystemChangeNotifier methodsFor: 'private-event lists' stamp: 'rw 7/29/2003 15:14'!\\\\nsystemEventsForItem: itemKind change: changeKind \\\\n\\\\t^AbstractEvent eventSelectorBlock value: itemKind value: changeKind! !\\\\n\\\\n\\\\\\\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \\\\\\\"!\\\\n\\\\nSystemChangeNotifier class\\\\n\\\\tinstanceVariableNames: ''!\\\\n\\\\n!SystemChangeNotifier class methodsFor: 'instance creation' stamp: 'rw 6/28/2003 09:41'!\\\\nnew\\\\n\\\\n\\\\t^self error: self instanceCreationErrorString! !\\\\n\\\\n\\\\n!SystemChangeNotifier class methodsFor: 'item kinds' stamp: 'NS 1/21/2004 09:31'!\\\\ncategoryKind\\\\n\\\\n\\\\t^ AbstractEvent categoryKind! !\\\\n\\\\n!SystemChangeNotifier class methodsFor: 'item kinds' stamp: 'NS 1/21/2004 09:31'!\\\\nclassKind\\\\n\\\\n\\\\t^ AbstractEvent classKind! !\\\\n\\\\n!SystemChangeNotifier class methodsFor: 'item kinds' stamp: 'NS 1/21/2004 09:32'!\\\\nexpressionKind\\\\n\\\\t^ AbstractEvent expressionKind! !\\\\n\\\\n!SystemChangeNotifier class methodsFor: 'item kinds' stamp: 'NS 1/21/2004 09:31'!\\\\nmethodKind\\\\n\\\\n\\\\t^ AbstractEvent methodKind! !\\\\n\\\\n!SystemChangeNotifier class methodsFor: 'item kinds' stamp: 'NS 1/21/2004 09:32'!\\\\nprotocolKind\\\\n\\\\t^ AbstractEvent protocolKind! !\\\\n\\\\n\\\\n!SystemChangeNotifier class methodsFor: 'public' stamp: 'NS 1/27/2004 16:23'!\\\\nuniqueInstance\\\\n\\\\n\\\\tUniqueInstance ifNil: [UniqueInstance := self createInstance].\\\\n\\\\t^UniqueInstance! !\\\\n\\\\n\\\\n!SystemChangeNotifier class methodsFor: 'private' stamp: 'NS 1/27/2004 16:23'!\\\\ncreateInstance\\\\n\\\\n\\\\t^self basicNew initialize! !\\\\n\\\\n!SystemChangeNotifier class methodsFor: 'private' stamp: 'rw 6/28/2003 09:41'!\\\\ninstanceCreationErrorString\\\\n\\\\n\\\\t^'This is a singleton implementation, so you are not allowed to create instances yourself. Use #uniqueInstance to access the instance.'! !\\\\n\\\\n!SystemChangeNotifier class methodsFor: 'private' stamp: 'rw 7/11/2003 14:36'!\\\\nresetUniqueInstance\\\\n\\\\t\\\\\\\"self resetUniqueInstance\\\\\\\"\\\\n\\\\n\\\\tUniqueInstance\\\\n\\\\t\\\\tifNotNilDo: [:u | UniqueInstance releaseAll.\\\\n\\\\t\\\\t\\\\tUniqueInstance _ nil]! !\\\\nSystemChangeTestRoot subclass: #SystemChangeNotifierTest\\\\n\\\\tinstanceVariableNames: 'capturedEvent'\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'SystemChangeNotification-Tests'!\\\\n!SystemChangeNotifierTest commentStamp: 'rw 4/3/2006 17:19' prior: 0!\\\\nA SystemChangeNotifierTest is a test class that tests whether the triggering of changes indeed results in the intended changes to be sent to registered object. The basic mechanism for each test is fairly simple:\\\\n\\\\t- register the receiver as the one to get the change notifier.\\\\n\\\\t- manually trigger a change (so the system is not polluted just to see whether we get the needed event).\\\\n\\\\t- the method #event: is invoked and remembers the change event.\\\\n\\\\t- the change event is checked to see whether it was the intended one.\\\\n\\\\nInstance Variables\\\\n\\\\tcapturedEvent:\\\\t\\\\tRemembers the captured event!\\\\n\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Private' stamp: 'rw 4/3/2006 16:34'!\\\\ncapturedEvent: eventOrNil\\\\n\\\\t\\\\\\\"Remember the event being sent.\\\\\\\"\\\\n\\\\n\\\\tcapturedEvent := eventOrNil! !\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Private' stamp: 'rw 4/3/2006 16:36'!\\\\ncheckEventForClass: aClass category: cat change: changeKind \\\\n\\\\n\\\\tself assert: (capturedEvent perform: ('is' , changeKind) asSymbol).\\\\n\\\\tself assert: capturedEvent item = aClass.\\\\n\\\\tself assert: capturedEvent itemKind = AbstractEvent classKind.\\\\n\\\\tself assert: capturedEvent itemClass = aClass.\\\\n\\\\tself assert: capturedEvent itemCategory = cat! !\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Private' stamp: 'rw 4/3/2006 16:43'!\\\\ncheckEventForMethod: aMethod protocol: prot change: changeKind \\\\n\\\\n\\\\tself assert: (capturedEvent perform: ('is' , changeKind) asSymbol).\\\\n\\\\tself assert: capturedEvent item = aMethod.\\\\n\\\\tself assert: capturedEvent itemKind = AbstractEvent methodKind.\\\\n\\\\tself assert: capturedEvent itemClass = self class.\\\\n\\\\tself assert: capturedEvent itemMethod = aMethod.\\\\n\\\\tself assert: capturedEvent itemProtocol = prot! !\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Private' stamp: 'rw 4/3/2006 16:43'!\\\\ncheckEventForMethod: aMethod protocol: prot change: changeKind oldMethod: oldMethod\\\\n\\\\n\\\\tself checkEventForMethod: aMethod protocol: prot change: changeKind.\\\\n\\\\tself assert: capturedEvent oldItem == oldMethod\\\\n\\\\t! !\\\\n\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Event Notifications' stamp: 'rw 4/3/2006 17:50'!\\\\nevent: event\\\\n\\\\t\\\\\\\"The notification message being sent to me when an event is captured. Remember it.\\\\\\\"\\\\n\\\\n\\\\\\\"\\\\tcapturedEvent isNil ifTrue: [\\\\tself capturedEvent: event] ifFalse: [self assert: false]\\\\\\\"\\\\n\\\\n\\\\tself capturedEvent: event! !\\\\n\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Running' stamp: 'rw 4/3/2006 17:55'!\\\\ntearDown\\\\n\\\\n\\\\tself capturedEvent: nil.\\\\n\\\\tsuper tearDown! !\\\\n\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Testing-system triggers' stamp: 'rw 4/5/2006 17:24'!\\\\ntestClassAddedEvent\\\\n\\\\n\\\\tself systemChangeNotifier notify: self ofAllSystemChangesUsing: #event:.\\\\n\\\\tself systemChangeNotifier classAdded: self class inCategory: #FooCat.\\\\n\\\\tself\\\\n\\\\t\\\\tcheckEventForClass: self class\\\\n\\\\t\\\\tcategory: #FooCat\\\\n\\\\t\\\\tchange: #Added! !\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Testing-system triggers' stamp: 'rw 4/5/2006 17:24'!\\\\ntestClassAddedEvent2\\\\n\\\\n\\\\tself systemChangeNotifier notify: self ofSystemChangesOfItem: #class change: #Added using: #event:.\\\\n\\\\tself systemChangeNotifier classAdded: self class inCategory: #FooCat.\\\\n\\\\tself\\\\n\\\\t\\\\tcheckEventForClass: self class\\\\n\\\\t\\\\tcategory: #FooCat\\\\n\\\\t\\\\tchange: #Added! !\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Testing-system triggers' stamp: 'rw 4/5/2006 17:24'!\\\\ntestClassCommentedEvent\\\\n\\\\n\\\\tself systemChangeNotifier notify: self ofAllSystemChangesUsing: #event:.\\\\n\\\\tself systemChangeNotifier classCommented: self class inCategory: #FooCat.\\\\n\\\\tself\\\\n\\\\t\\\\tcheckEventForClass: self class\\\\n\\\\t\\\\tcategory: #FooCat\\\\n\\\\t\\\\tchange: #Commented! !\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Testing-system triggers' stamp: 'rw 4/5/2006 17:24'!\\\\ntestClassRecategorizedEvent\\\\n\\\\n\\\\tself systemChangeNotifier notify: self ofAllSystemChangesUsing: #event:.\\\\n\\\\tself systemChangeNotifier \\\\n\\\\t\\\\tclass: self class\\\\n\\\\t\\\\trecategorizedFrom: #FooCat\\\\n\\\\t\\\\tto: #FooBar.\\\\n\\\\tself\\\\n\\\\t\\\\tcheckEventForClass: self class\\\\n\\\\t\\\\tcategory: #FooBar\\\\n\\\\t\\\\tchange: #Recategorized.\\\\n\\\\tself assert: capturedEvent oldCategory = #FooCat! !\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Testing-system triggers' stamp: 'rw 4/5/2006 17:24'!\\\\ntestClassRemovedEvent\\\\n\\\\n\\\\tself systemChangeNotifier notify: self ofAllSystemChangesUsing: #event:.\\\\n\\\\tself systemChangeNotifier classRemoved: self class fromCategory: #FooCat.\\\\n\\\\tself\\\\n\\\\t\\\\tcheckEventForClass: self class\\\\n\\\\t\\\\tcategory: #FooCat\\\\n\\\\t\\\\tchange: #Removed! !\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Testing-system triggers' stamp: 'rw 4/5/2006 17:24'!\\\\ntestClassRenamedEvent\\\\n\\\\n\\\\tself systemChangeNotifier notify: self ofAllSystemChangesUsing: #event:.\\\\n\\\\tself systemChangeNotifier \\\\n\\\\t\\\\tclassRenamed: self class\\\\n\\\\t\\\\tfrom: #OldFooClass\\\\n\\\\t\\\\tto: #NewFooClass\\\\n\\\\t\\\\tinCategory: #FooCat.\\\\n\\\\tself\\\\n\\\\t\\\\tcheckEventForClass: self class\\\\n\\\\t\\\\tcategory: #FooCat\\\\n\\\\t\\\\tchange: #Renamed.\\\\n\\\\\\\"\\\\tself assert: capturedEvent oldName = #OldFooClass.\\\\n\\\\tself assert: capturedEvent newName = #NewFooClass\\\\\\\"! !\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Testing-system triggers' stamp: 'rw 4/5/2006 17:25'!\\\\ntestDoItEvent\\\\n\\\\n\\\\tself systemChangeNotifier notify: self ofAllSystemChangesUsing: #event:.\\\\n\\\\tself systemChangeNotifier \\\\n\\\\t\\\\tevaluated: '1 + 2'\\\\n\\\\t\\\\tcontext: self.\\\\n\\\\tself assert: capturedEvent isDoIt.\\\\n\\\\tself assert: capturedEvent item = '1 + 2'.\\\\n\\\\tself assert: capturedEvent itemKind = AbstractEvent expressionKind.\\\\n\\\\tself assert: capturedEvent itemClass = nil.\\\\n\\\\tself assert: capturedEvent itemMethod = nil.\\\\n\\\\tself assert: capturedEvent itemProtocol = nil.\\\\n\\\\tself assert: capturedEvent itemExpression = '1 + 2'.\\\\n\\\\tself assert: capturedEvent context = self.! !\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Testing-system triggers' stamp: 'rw 4/5/2006 17:25'!\\\\ntestMethodAddedEvent1\\\\n\\\\n\\\\tself systemChangeNotifier notify: self ofAllSystemChangesUsing: #event:.\\\\n\\\\tself systemChangeNotifier \\\\n\\\\t\\\\tmethodAdded: self class >> #testMethodAddedEvent1\\\\n\\\\t\\\\tselector: #testMethodAddedEvent1\\\\n\\\\t\\\\tinProtocol: #FooCat\\\\n\\\\t\\\\tclass: self class.\\\\n\\\\tself \\\\n\\\\t\\\\tcheckEventForMethod: self class >> #testMethodAddedEvent1\\\\n\\\\t\\\\tprotocol: #FooCat\\\\n\\\\t\\\\tchange: #Added! !\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Testing-system triggers' stamp: 'rw 4/5/2006 17:25'!\\\\ntestMethodAddedEvent2\\\\n\\\\n\\\\tself systemChangeNotifier notify: self ofAllSystemChangesUsing: #event:.\\\\n\\\\tself systemChangeNotifier \\\\n\\\\t\\\\tmethodAdded: self class >> #testMethodAddedEvent1\\\\n\\\\t\\\\tselector: #testMethodAddedEvent1\\\\n\\\\t\\\\tinClass: self class.\\\\n\\\\tself \\\\n\\\\t\\\\tcheckEventForMethod: self class >> #testMethodAddedEvent1\\\\n\\\\t\\\\tprotocol: nil\\\\n\\\\t\\\\tchange: #Added! !\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Testing-system triggers' stamp: 'rw 4/5/2006 17:25'!\\\\ntestMethodAddedEvent3\\\\n\\\\n\\\\tself systemChangeNotifier notify: self ofAllSystemChangesUsing: #event:.\\\\n\\\\tself systemChangeNotifier \\\\n\\\\t\\\\tmethodChangedFrom: self class >> #testMethodAddedEvent1\\\\n\\\\t\\\\tto: self class >> #testMethodAddedEvent2\\\\n\\\\t\\\\tselector: #testMethodAddedEvent2\\\\n\\\\t\\\\tinClass: self class.\\\\n\\\\tself \\\\n\\\\t\\\\tcheckEventForMethod: self class >> #testMethodAddedEvent2\\\\n\\\\t\\\\tprotocol: nil\\\\n\\\\t\\\\tchange: #Modified\\\\n\\\\t\\\\toldMethod: self class >> #testMethodAddedEvent1.! !\\\\n\\\\n!SystemChangeNotifierTest methodsFor: 'Testing-system triggers' stamp: 'rw 4/5/2006 17:25'!\\\\ntestMethodRemovedEvent\\\\n\\\\n\\\\tself systemChangeNotifier notify: self ofAllSystemChangesUsing: #event:.\\\\n\\\\tself systemChangeNotifier \\\\n\\\\t\\\\tmethodRemoved: self class>> #testMethodRemovedEvent\\\\n\\\\t\\\\tselector: #testMethodRemovedEvent\\\\n\\\\t\\\\tinProtocol: #FooCat\\\\n\\\\t\\\\tclass: self class.\\\\n\\\\tself\\\\n\\\\t\\\\tcheckEventForMethod: self class>> #testMethodRemovedEvent\\\\n\\\\t\\\\tprotocol: #FooCat\\\\n\\\\t\\\\tchange: #Removed.! !\\\\nTestCase subclass: #SystemChangeTestRoot\\\\n\\\\tinstanceVariableNames: ''\\\\n\\\\tclassVariableNames: ''\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'SystemChangeNotification-Tests'!\\\\n!SystemChangeTestRoot commentStamp: 'rw 4/5/2006 17:28' prior: 0!\\\\nThe Root test class for the System Change Notification tests.!\\\\n\\\\n\\\\n!SystemChangeTestRoot methodsFor: 'Private' stamp: 'rw 4/3/2006 17:48'!\\\\nsystemChangeNotifier\\\\n\\\\t\\\\\\\"The notifier to use. Use the one for the system.\\\\\\\"\\\\n\\\\n\\\\t^SystemChangeNotifier uniqueInstance! !\\\\n\\\\n\\\\n!SystemChangeTestRoot methodsFor: 'Running' stamp: 'rw 4/3/2006 17:59'!\\\\ntearDown\\\\n\\\\n\\\\tself unhook.\\\\n\\\\tsuper tearDown! !\\\\n\\\\n!SystemChangeTestRoot methodsFor: 'Running' stamp: 'rw 4/3/2006 17:23'!\\\\nunhook\\\\n\\\\n\\\\tself systemChangeNotifier noMoreNotificationsFor: self! !\\\\nIdentityDictionary subclass: #SystemDictionary\\\\n\\\\tinstanceVariableNames: 'cachedClassNames'\\\\n\\\\tclassVariableNames: 'LastImageName LastQuitLogPosition LowSpaceProcess LowSpaceSemaphore MemoryHogs ShutDownList SpecialSelectors StartUpList StartupStamp SystemChanges'\\\\n\\\\tpoolDictionaries: ''\\\\n\\\\tcategory: 'System-Support'!\\\\n!SystemDictionary commentStamp: '<historical>' prior: 0!\\\\nI represent a special dictionary that supports protocol for asking questions about the structure of the system. Other than class names, I contain (print this)...\\\\n\\\\tSmalltalk keys select: [:k | ((Smalltalk at: k) isKindOf: Class) not]\\\\n\\\\t\\\\t\\\\tthenCollect: [:k | k -> (Smalltalk at: k) class]\\\\n!\\\\n\\\\n\\\\n!SystemDictionary methodsFor: 'accessing' stamp: 'ar 7/11/1999 21:56'!\\\\norganization\\\\n\\\\t\\\\\\\"Return the organizer for the receiver\\\\\\\"\\\\n\\\\t^SystemOrganization! !\\\\n\\\\n\\\\n!SystemDictionary methodsFor: 'class and trait names' stamp: 'al 1/12/2006 23:59'!\\\\nallClassesAndTraits\\\\n\\\\t\\\\\\\"Return all the classes and traits defined in the Smalltalk SystemDictionary\\\\\\\"\\\\n\\\\n\\\\t^ self classNames , self traitNames collect: [:each | self at: each]! !\\\\n\\\\n!SystemDictionary methodsFor: 'class and trait names' stamp: 'al 1/13/2006 00:15'!\\\\nallClassesAndTraitsDo: aBlock\\\\n\\\\t^self allClassesAndTraits do: aBlock! !\\\\n\\\\n!SystemDictionary methodsFor: 'class and trait names' stamp: 'al 1/12/2006 23:57'!\\\\nclassNamed: className \\\\n\\\\t^self classOrTraitNamed: className.! !\\\\n\\\\n!SystemDictionary methodsFor: 'class and trait names' stamp: 'al 1/13/2006 00:51'!\\\\nclassNames\\\\n\\\\t\\\\\\\"Answer a SortedCollection of all class names.\\\\\\\"\\\\n\\\\t| names |\\\\n\\\\tcachedClassNames == nil ifTrue:\\\\n\\\\t\\\\t[names _ OrderedCollection new: self size.\\\\n\\\\t\\\\tself do: \\\\n\\\\t\\\\t\\\\t[:cl | (cl isInMemory\\\\n\\\\t\\\\t\\\\t\\\\tand: [(cl isKindOf: Class)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tand: [(cl name beginsWith: 'AnObsolete') not]])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [names add: cl name]].\\\\n\\\\t\\\\tcachedClassNames _ names asSortedCollection].\\\\n\\\\t^ cachedClassNames! !\\\\n\\\\n!SystemDictionary methodsFor: 'class and trait names' stamp: 'al 1/12/2006 23:56'!\\\\nclassOrTraitNamed: aString \\\\n\\\\t\\\\\\\"aString is either a class or trait name or a class or trait name followed by ' class' or 'classTrait' respectively.\\\\n\\\\tAnswer the class or metaclass it names.\\\\\\\"\\\\n\\\\n\\\\t| meta baseName baseClass |\\\\n\\\\t(aString endsWith: ' class')\\\\n\\\\t\\\\tifTrue: [meta _ true.\\\\n\\\\t\\\\t\\\\t\\\\tbaseName _ aString copyFrom: 1 to: aString size - 6]\\\\n\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t(aString endsWith: ' classTrait')\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmeta _ true.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbaseName _ aString copyFrom: 1 to: aString size - 11]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmeta _ false.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbaseName _ aString]].\\\\n\\\\tbaseClass _ Smalltalk at: baseName asSymbol ifAbsent: [^ nil].\\\\n\\\\tmeta\\\\n\\\\t\\\\tifTrue: [^ baseClass classSide]\\\\n\\\\t\\\\tifFalse: [^ baseClass]! !\\\\n\\\\n!SystemDictionary methodsFor: 'class and trait names' stamp: 'di 2/16/2000 10:28'!\\\\nflushClassNameCache\\\\n\\\\t\\\\\\\"Smalltalk flushClassNameCache\\\\\\\"\\\\n\\\\t\\\\\\\"Forse recomputation of the cached list of class names.\\\\\\\"\\\\n\\\\n\\\\tcachedClassNames _ nil! !\\\\n\\\\n!SystemDictionary methodsFor: 'class and trait names' stamp: 'NS 1/27/2004 12:08'!\\\\nforgetClass: aClass logged: aBool \\\\n\\\\t\\\\\\\"Delete the class, aClass, from the system.\\\\n\\\\tNote that this doesn't do everything required to dispose of a class - to do that use Class>>removeFromSystem.\\\\\\\"\\\\n\\\\n\\\\taBool ifTrue: [SystemChangeNotifier uniqueInstance classRemoved: aClass fromCategory: aClass category].\\\\t\\\\t\\\\n\\\\tSystemOrganization removeElement: aClass name.\\\\n\\\\tself removeFromStartUpList: aClass.\\\\n\\\\tself removeFromShutDownList: aClass.\\\\n\\\\tself removeKey: aClass name ifAbsent: [].\\\\n\\\\tself flushClassNameCache! !\\\\n\\\\n!SystemDictionary methodsFor: 'class and trait names'!\\\\nhasClassNamed: aString\\\\n\\\\t\\\\\\\"Answer whether there is a class of the given name, but don't intern aString if it's not alrady interned.  4/29/96 sw\\\\\\\"\\\\n\\\\n\\\\tSymbol hasInterned: aString ifTrue: \\\\n\\\\t\\\\t[:aSymbol | ^ (self at: aSymbol ifAbsent: [nil]) isKindOf: Class].\\\\n\\\\t^ false! !\\\\n\\\\n!SystemDictionary methodsFor: 'class and trait names' stamp: 'sw 9/5/97 18:30'!\\\\nremoveClassNamed: aName\\\\n\\\\t\\\\\\\"Invoked from fileouts:  if there is currently a class in the system named aName, then remove it.  If anything untoward happens, report it in the Transcript.  \\\\\\\"\\\\n\\\\n\\\\t| oldClass |\\\\n\\\\t(oldClass _ self at: aName asSymbol ifAbsent: [nil]) == nil\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[Transcript cr; show: 'Removal of class named ', aName, ' ignored because ', aName, ' does not exist.'.\\\\n\\\\t\\\\t\\\\t^ self].\\\\n\\\\n\\\\toldClass removeFromSystem! !\\\\n\\\\n!SystemDictionary methodsFor: 'class and trait names' stamp: 'sw 10/28/96'!\\\\nrenameClassNamed: oldName as: newName\\\\n\\\\t\\\\\\\"Invoked from fileouts:  if there is currently a class in the system named oldName, then rename it to newName.  If anything untoward happens, report it in the Transcript.  \\\\\\\"\\\\n\\\\n\\\\t| oldClass |\\\\n\\\\t(oldClass _ self at: oldName asSymbol ifAbsent: [nil]) == nil\\\\n\\\\t\\\\tifTrue:\\\\n\\\\t\\\\t\\\\t[Transcript cr; show: 'Class-rename for ', oldName, ' ignored because ', oldName, ' does not exist.'.\\\\n\\\\t\\\\t\\\\t^ self].\\\\n\\\\n\\\\toldClass rename: newName! !\\\\n\\\\n!SystemDictionary methodsFor: 'class and trait names' stamp: 'rr 3/11/2004 15:18'!\\\\nrenameClass: aClass as: newName \\\\n\\\\t\\\\\\\"Rename the class, aClass, to have the title newName.\\\\\\\"\\\\n\\\\t| oldref i oldName category |\\\\n\\\\toldName := aClass name.\\\\n\\\\tcategory := aClass category.\\\\n\\\\tSystemOrganization classify: newName under: aClass category.\\\\n\\\\tSystemOrganization removeElement: aClass name.\\\\n\\\\toldref _ self associationAt: aClass name.\\\\n\\\\tself removeKey: aClass name.\\\\n\\\\toldref key: newName.\\\\n\\\\tself add: oldref.  \\\\\\\"Old association preserves old refs\\\\\\\"\\\\n\\\\t(Array with: StartUpList with: ShutDownList) do:\\\\n\\\\t\\\\t[:list |  i _ list indexOf: aClass name ifAbsent: [0].\\\\n\\\\t\\\\ti > 0 ifTrue: [list at: i put: newName]].\\\\n\\\\tself flushClassNameCache.\\\\n\\\\tSystemChangeNotifier uniqueInstance classRenamed: aClass from: oldName to: newName inCategory: category! !\\\\n\\\\n!SystemDictionary methodsFor: 'class and trait names' stamp: 'al 1/12/2006 23:54'!\\\\ntraitNames\\\\n\\\\t\\\\\\\"Answer a SortedCollection of all traits (not including class-traits) names.\\\\\\\"\\\\n\\\\t| names |\\\\n\\\\tnames := OrderedCollection new.\\\\n\\\\tself do: \\\\n\\\\t\\\\t[:cl | (cl isInMemory\\\\n\\\\t\\\\t\\\\tand: [(cl isKindOf: Trait)\\\\n\\\\t\\\\t\\\\tand: [(cl name beginsWith: 'AnObsolete') not]])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [names add: cl name]].\\\\n\\\\t^ names! !\\\\n\\\\n\\\\n!SystemDictionary methodsFor: 'copying' stamp: 'tk 10/20/2000 11:35'!\\\\nveryDeepCopyWith: deepCopier\\\\n\\\\t\\\\\\\"Return self.  I can't be copied.  Do not record me.\\\\\\\"! !\\\\n\\\\n\\\\n!SystemDictionary methodsFor: 'dictionary access' stamp: 'md 3/2/2006 22:01'!\\\\nassociationOrUndeclaredAt: key \\\\n\\\\t\\\\\\\"return an association or install in undeclared.  Used for mating up ImageSegments.\\\\\\\"\\\\n\\\\n\\\\t^ self associationAt: key ifAbsent: [\\\\n\\\\t\\\\tUndeclared at: key put: nil.\\\\n\\\\t\\\\tUndeclared associationAt: key]! !\\\\n\\\\n!SystemDictionary methodsFor: 'dictionary access'!\\\\nat: aKey put: anObject \\\\n\\\\t\\\\\\\"Override from Dictionary to check Undeclared and fix up\\\\n\\\\treferences to undeclared variables.\\\\\\\"\\\\n\\\\t| index element |\\\\n\\\\t(self includesKey: aKey) ifFalse: \\\\n\\\\t\\\\t[self declare: aKey from: Undeclared.\\\\n\\\\t\\\\tself flushClassNameCache].\\\\n\\\\tsuper at: aKey put: anObject.\\\\n\\\\t^ anObject! !\\\\n\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping'!\\\\ncleanOutUndeclared \\\\n\\\\tUndeclared removeUnreferencedKeys! !\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping' stamp: 'md 1/5/2004 18:05'!\\\\ncompressSources\\\\t\\\\n\\\\t\\\\\\\"Copy all the source file to a compressed file. Usually preceded by Smalltalk condenseSources.\\\\\\\"\\\\n\\\\t\\\\\\\"The new file will be created in the default directory, and the code in openSources\\\\n\\\\twill try to open it if it is there, otherwise it will look for normal sources.\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk compressSources\\\\\\\"\\\\n\\\\n\\\\t| f cfName cf |\\\\n\\\\tf _ SourceFiles first.\\\\n\\\\t(SmalltalkImage current sourcesName endsWith: 'sources')\\\\n\\\\t\\\\tifTrue: [cfName _ (SmalltalkImage current sourcesName allButLast: 7) , 'stc']\\\\n\\\\t\\\\tifFalse: [self error: 'Hey, I thought the sources name ended with ''.sources''.'].\\\\n\\\\tcf _ (CompressedSourceStream on: (FileStream newFileNamed: cfName))\\\\n\\\\t\\\\t\\\\t\\\\tsegmentSize: 20000 maxSize: f size.\\\\n\\\\n\\\\t\\\\\\\"Copy the sources\\\\\\\"\\\\n'Compressing Sources File...'\\\\n\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\tfrom: 0 to: f size\\\\n\\\\tduring:\\\\n\\\\t\\\\t[:bar | f position: 0.\\\\n\\\\t\\\\t[f atEnd] whileFalse:\\\\n\\\\t\\\\t\\\\t[cf nextPutAll: (f next: 20000).\\\\n\\\\t\\\\t\\\\tbar value: f position]].\\\\n\\\\tcf close.\\\\n\\\\tself setMacFileInfoOn: cfName.\\\\n\\\\tself inform: 'You now have a compressed sources file!!\\\\nSqueak will use it the next time you start.'! !\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping' stamp: 'al 1/13/2006 00:17'!\\\\ncondenseChanges\\\\n\\\\t\\\\\\\"Move all the changes onto a compacted sources file.\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk condenseChanges\\\\\\\"\\\\n\\\\t| f oldChanges count |\\\\n\\\\tf := FileStream fileNamed: 'ST80.temp'.\\\\n\\\\tf header; timeStamp.\\\\n\\\\t'Condensing Changes File...'\\\\n\\\\t\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\tfrom: 0\\\\n\\\\t\\\\tto: self classNames size + self traitNames size\\\\n\\\\t\\\\tduring: [:bar | \\\\n\\\\t\\\\t\\\\tcount := 0.\\\\n\\\\t\\\\t\\\\tself\\\\n\\\\t\\\\t\\\\t\\\\tallClassesAndTraitsDo: [:classOrTrait | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbar value: (count := count + 1).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tclassOrTrait moveChangesTo: f.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tclassOrTrait putClassCommentToCondensedChangesFile: f.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tclassOrTrait classSide moveChangesTo: f]].\\\\n\\\\tSmalltalkImage current lastQuitLogPosition: f position.\\\\n\\\\tf trailer; close.\\\\n\\\\toldChanges := SourceFiles at: 2.\\\\n\\\\toldChanges close.\\\\n\\\\tFileDirectory default deleteFileNamed: oldChanges name , '.old';\\\\n\\\\t\\\\t rename: oldChanges name toBe: oldChanges name , '.old';\\\\n\\\\t\\\\t rename: f name toBe: oldChanges name.\\\\n\\\\tself setMacFileInfoOn: oldChanges name.\\\\n\\\\tSourceFiles\\\\n\\\\t\\\\tat: 2\\\\n\\\\t\\\\tput: (StandardFileStream oldFileNamed: oldChanges name)! !\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping' stamp: 'md 3/1/2006 00:02'!\\\\ncondenseSources\\\\t\\\\n\\\\t\\\\\\\"Move all the changes onto a compacted sources file.\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk condenseSources\\\\\\\"\\\\n\\\\n\\\\t| f dir newVersionString count |\\\\n\\\\tUtilities fixUpProblemsWithAllCategory.\\\\n\\\\t\\\\\\\"The above removes any concrete, spurious '-- all --' categories, which mess up the process.\\\\\\\"\\\\n\\\\tdir := FileDirectory default.\\\\n\\\\tnewVersionString := UIManager default request: 'Please designate the version\\\\nfor the new source code file...' initialAnswer: SmalltalkImage current sourceFileVersionString.\\\\n\\\\tnewVersionString ifNil: [^ self].\\\\n\\\\tnewVersionString = SmalltalkImage current sourceFileVersionString ifTrue:\\\\n\\\\t\\\\t[^ self error: 'The new source file must not be the same as the old.'].\\\\n\\\\tSmalltalkImage current sourceFileVersionString: newVersionString.\\\\n\\\\n\\\\t\\\\\\\"Write all sources with fileIndex 1\\\\\\\"\\\\n\\\\tf := FileStream newFileNamed: SmalltalkImage current sourcesName.\\\\n\\\\tf header; timeStamp.\\\\n'Condensing Sources File...'\\\\n\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\tfrom: 0 to: self classNames size + self traitNames size\\\\n\\\\tduring:\\\\n\\\\t\\\\t[:bar | count := 0.\\\\n\\\\t\\\\tSmalltalk allClassesAndTraitsDo:\\\\n\\\\t\\\\t\\\\t[:classOrTrait | bar value: (count := count + 1).\\\\n\\\\t\\\\t\\\\tclassOrTrait fileOutOn: f moveSource: true toFile: 1]].\\\\n\\\\tf trailer; close.\\\\n\\\\n\\\\t\\\\\\\"Make a new empty changes file\\\\\\\"\\\\n\\\\tSmalltalkImage current closeSourceFiles.\\\\n\\\\tdir rename: SmalltalkImage current changesName\\\\n\\\\t\\\\ttoBe: SmalltalkImage current changesName , '.old'.\\\\n\\\\t(FileStream newFileNamed: SmalltalkImage current changesName)\\\\n\\\\t\\\\theader; timeStamp; close.\\\\n\\\\tSmalltalkImage current lastQuitLogPosition: 0.\\\\n\\\\n\\\\tself setMacFileInfoOn: SmalltalkImage current changesName.\\\\n\\\\tself setMacFileInfoOn: SmalltalkImage current sourcesName.\\\\n\\\\tSmalltalkImage current openSourceFiles.\\\\n\\\\tself inform: 'Source files have been rewritten!!\\\\nCheck that all is well,\\\\nand then save/quit.'! !\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping' stamp: 'sd 4/17/2003 20:59'!\\\\nforgetDoIts\\\\t\\\\n\\\\t\\\\\\\"Smalltalk forgetDoIts\\\\\\\"\\\\n\\\\t \\\\\\\"get rid of old DoIt methods\\\\\\\"\\\\n\\\\n\\\\tself systemNavigation allBehaviorsDo:\\\\n\\\\t\\\\t[:cl | cl forgetDoIts]\\\\n\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping' stamp: 'ar 9/27/2005 21:45'!\\\\nmakeExternalRelease\\\\n\\\\t\\\\\\\"Smalltalk makeExternalRelease\\\\\\\"\\\\n\\\\t(self confirm: SystemVersion current version , '\\\\nIs this the correct version designation?\\\\nIf not, choose no, and fix it.')\\\\n\\\\t\\\\tifFalse: [^ self].\\\\n\\\\t\\\\\\\"Object classPool at: #DependentsFields\\\\\\\"\\\\n\\\\tself reclaimDependents.\\\\n\\\\tPreferences enable: #mvcProjectsAllowed.\\\\n\\\\tPreferences enable: #fastDragWindowForMorphic.\\\\n\\\\tSmalltalk at: #Browser ifPresent:[:br| br initialize].\\\\n\\\\tUndeclared isEmpty\\\\n\\\\t\\\\tifFalse: [self halt].\\\\n\\\\tScriptingSystem deletePrivateGraphics.\\\\n\\\\t#(#Helvetica #Palatino #Courier )\\\\n\\\\t\\\\tdo: [:n | TextConstants\\\\n\\\\t\\\\t\\\\t\\\\tremoveKey: n\\\\n\\\\t\\\\t\\\\t\\\\tifAbsent: []].\\\\n\\\\t(Utilities classPool at: #UpdateUrlLists) copy\\\\n\\\\t\\\\tdo: [:pair | (pair first includesSubstring: 'Disney' caseSensitive: false)\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [(Utilities classPool at: #UpdateUrlLists)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tremove: pair]].\\\\n\\\\t(ServerDirectory serverNames copyWithoutAll: #('UCSBCreateArchive' 'UIUCArchive' 'UpdatesExtUIUC' 'UpdatesExtWebPage' ))\\\\n\\\\t\\\\tdo: [:sn | ServerDirectory removeServerNamed: sn].\\\\n\\\\tself  garbageCollect.\\\\n\\\\tself obsoleteClasses isEmpty\\\\n\\\\t\\\\tifFalse: [self halt].\\\\n\\\\tSymbol rehash.\\\\n\\\\tself halt: 'Ready to condense changes or sources'! !\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping' stamp: 'ar 9/27/2005 21:45'!\\\\nmakeInternalRelease\\\\n\\\\t\\\\\\\"Smalltalk makeInternalRelease\\\\\\\"\\\\n\\\\t(self confirm: SystemVersion current version , '\\\\nIs this the correct version designation?\\\\nIf not, choose no, and fix it.')\\\\n\\\\t\\\\tifFalse: [^ self].\\\\n\\\\t(Object classPool at: #DependentsFields) size > 1\\\\n\\\\t\\\\tifTrue: [self halt].\\\\n\\\\tSmalltalk at: #Browser ifPresent:[:br| br initialize].\\\\n\\\\tUndeclared isEmpty\\\\n\\\\t\\\\tifFalse: [self halt].\\\\n\\\\tself garbageCollect.\\\\n\\\\tself obsoleteClasses isEmpty\\\\n\\\\t\\\\tifFalse: [self halt].\\\\n\\\\tSymbol rehash.\\\\n\\\\tself halt: 'Ready to condense changes'.\\\\n\\\\tself condenseChanges! !\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping' stamp: 'sd 9/29/2004 18:15'!\\\\nreclaimDependents\\\\n\\\\t\\\\\\\"No-opped due to weak dictionary in use\\\\\\\"\\\\n\\\\tself garbageCollect! !\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping' stamp: 'al 1/13/2006 00:19'!\\\\nreconstructChanges\\\\t\\\\n\\\\t\\\\\\\"Move all the changes and its histories onto another sources file.\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk reconstructChanges\\\\\\\"\\\\n\\\\n\\\\t| f oldChanges classCount |\\\\n\\\\tf _ FileStream fileNamed: 'ST80.temp'.\\\\n\\\\tf header; timeStamp.\\\\n'Condensing Changes File...'\\\\n\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\tfrom: 0 to: self classNames size + self traitNames size\\\\n\\\\tduring:\\\\n\\\\t\\\\t[:bar | classCount _ 0.\\\\n\\\\t\\\\tSmalltalk allClassesAndTraitsDo:\\\\n\\\\t\\\\t\\\\t[:classOrTrait | bar value: (classCount _ classCount + 1).\\\\n\\\\t\\\\t\\\\tclassOrTrait moveChangesWithVersionsTo: f.\\\\n\\\\t\\\\t\\\\tclassOrTrait putClassCommentToCondensedChangesFile: f.\\\\n\\\\t\\\\t\\\\tclassOrTrait classSide moveChangesWithVersionsTo: f]].\\\\n\\\\tSmalltalkImage current lastQuitLogPosition: f position.\\\\n\\\\tf trailer; close.\\\\n\\\\toldChanges _ SourceFiles at: 2.\\\\n\\\\toldChanges close.\\\\n\\\\tFileDirectory default \\\\n\\\\t\\\\tdeleteFileNamed: oldChanges name , '.old';\\\\n\\\\t\\\\trename: oldChanges name toBe: oldChanges name , '.old';\\\\n\\\\t\\\\trename: f name toBe: oldChanges name.\\\\n\\\\tself setMacFileInfoOn: oldChanges name.\\\\n\\\\tSourceFiles at: 2\\\\n\\\\t\\\\t\\\\tput: (FileStream oldFileNamed: oldChanges name)! !\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping' stamp: 'yo 2/24/2005 18:01'!\\\\nreformatChangesToUTF8\\\\n\\\\t\\\\\\\"Smalltalk reformatChangesToUTF8\\\\\\\"\\\\n\\\\n\\\\t| f oldChanges classCount |\\\\n\\\\tf _ FileStream fileNamed: 'ST80.temp'.\\\\n\\\\tf converter: (UTF8TextConverter new).\\\\n\\\\tf header; timeStamp.\\\\n'Condensing Changes File...'\\\\n\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\tfrom: 0 to: Smalltalk classNames size\\\\n\\\\tduring:\\\\n\\\\t\\\\t[:bar | classCount _ 0.\\\\n\\\\t\\\\tSmalltalk allClassesDo:\\\\n\\\\t\\\\t\\\\t[:class | bar value: (classCount _ classCount + 1).\\\\n\\\\t\\\\t\\\\tclass moveChangesTo: f.\\\\n\\\\t\\\\t\\\\tclass putClassCommentToCondensedChangesFile: f.\\\\n\\\\t\\\\t\\\\tclass class moveChangesTo: f]].\\\\n\\\\tSmalltalkImage current lastQuitLogPosition: f position.\\\\n\\\\tf trailer; close.\\\\n\\\\toldChanges _ SourceFiles at: 2.\\\\n\\\\toldChanges close.\\\\n\\\\tFileDirectory default \\\\n\\\\t\\\\tdeleteFileNamed: oldChanges name , '.old';\\\\n\\\\t\\\\trename: oldChanges name toBe: oldChanges name , '.old';\\\\n\\\\t\\\\trename: f name toBe: oldChanges name.\\\\n\\\\tself setMacFileInfoOn: oldChanges name.\\\\n\\\\tSourceFiles at: 2\\\\n\\\\t\\\\t\\\\tput: (FileStream oldFileNamed: oldChanges name).\\\\n\\\\tMultiByteFileStream codeConverterClass: UTF8TextConverter.\\\\n\\\\t(SourceFiles at: 2) converter: (UTF8TextConverter new).\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping' stamp: 'nk 6/2/2006 10:22'!\\\\nremoveAllLineFeeds\\\\n\\\\t\\\\\\\"Smalltalk removeAllLineFeeds\\\\\\\"\\\\n\\\\t\\\\\\\"Scan all methods for source code with lineFeeds.\\\\n\\\\tReplaces all occurrences of <CR><LF> or <LF> by <CR>.\\\\n\\\\tWhen done, offers to display an Inspector containing the message\\\\n\\\\tnames grouped by author initials.\\\\n\\\\tIn this dictionary, the key 'OK' contains the methods that had literals that contained <LF> characters.\\\\\\\"\\\\n\\\\t| n authors totalStripped totalOK |\\\\n\\\\t'Scanning sources for LineFeeds.\\\\nThis will take a few minutes...'\\\\n\\\\t\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\tfrom: 0\\\\n\\\\t\\\\tto: CompiledMethod instanceCount\\\\n\\\\t\\\\tduring: [:bar | \\\\n\\\\t\\\\t\\\\tn _ 0.\\\\n\\\\t\\\\t\\\\tauthors _ self\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tremoveAllLineFeedsQuietlyCalling: [:cls :sel | (n _ n + 1) \\\\\\\\\\\\\\\\ 100 = 0\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [bar value: n]]].\\\\n\\\\ttotalStripped _ authors\\\\n\\\\t\\\\t\\\\t\\\\tinject: 1\\\\n\\\\t\\\\t\\\\t\\\\tinto: [:sum :set | sum + set size].\\\\n\\\\ttotalOK _ (authors at: 'OK') size.\\\\n\\\\ttotalStripped _ totalStripped - totalOK.\\\\n\\\\tTranscript cr; show: totalStripped printString , ' methods stripped of LFs.'.\\\\n\\\\tTranscript cr; show: totalOK printString , ' methods still correctly contain LFs.'.\\\\n\\\\t(self confirm: 'Do you want to see the affected methods?')\\\\n\\\\t\\\\tifTrue: [authors inspect]! !\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping' stamp: 'nk 6/2/2006 08:35'!\\\\nremoveAllLineFeedsQuietly\\\\n\\\\t\\\\\\\"Smalltalk removeAllLineFeedsQuietly\\\\\\\"\\\\n\\\\t\\\\\\\"Scan all methods for source code with lineFeeds.\\\\n\\\\tReplaces all occurrences of <CR><LF> or <LF> by <CR>.\\\\n\\\\tAnswer a Dictionary keyed by author name containing sets of affected method names,\\\\n\\\\tas well as (at the key 'OK') a list of methods that still contain LF characters inside literal strings or characters.\\\\\\\"\\\\n\\\\t^self removeAllLineFeedsQuietlyCalling: [ :cls :sel | ].! !\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping' stamp: 'nk 6/2/2006 09:22'!\\\\nremoveAllLineFeedsQuietlyCalling: aBlock\\\\n\\\\t\\\\\\\"Smalltalk removeAllLineFeedsQuietly\\\\\\\"\\\\n\\\\t\\\\\\\"Scan all methods for source code with lineFeeds.\\\\n\\\\tReplaces all occurrences of <CR><LF> or <LF> by <CR>.\\\\n\\\\tAnswer a Dictionary keyed by author name containing sets of affected method names,\\\\n\\\\tas well as (at the key 'OK') a list of methods that still contain LF characters inside literal strings or characters.\\\\n\\\\tEvaluate aBlock for each method so that status can be updated.\\\\\\\"\\\\n\\\\t| oldCodeString newCodeString oldStamp oldCategory authors nameString |\\\\n\\\\tself forgetDoIts.\\\\n\\\\tauthors _ Dictionary new.\\\\n\\\\tauthors at: 'OK' put: Set new.\\\\n\\\\tself systemNavigation\\\\n\\\\t\\\\tallBehaviorsDo: [:cls | cls selectors\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:selector | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\taBlock value: cls value: selector.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\toldCodeString _ cls sourceCodeAt: selector.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t(oldCodeString includes: Character lf)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnewCodeString _ oldCodeString withSqueakLineEndings.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnameString _ cls name , '>>' , selector.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t((cls compiledMethodAt: selector) hasLiteralSuchThat: [ :lit | lit asString includes: Character lf ])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [(authors at: 'OK')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tadd: nameString]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [oldStamp _ (Utilities\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\ttimeStampForMethod: (cls compiledMethodAt: selector))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcopy replaceAll: Character cr\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twith: Character space.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(authors\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tat: (oldStamp copyFrom: 1 to: (oldStamp findFirst: [ :c | c isAlphaNumeric not ]))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifAbsentPut: [Set new])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tadd: nameString.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\toldCategory _ cls whichCategoryIncludesSelector: selector.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcls\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcompile: newCodeString\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tclassified: oldCategory\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twithStamp: oldStamp\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnotifying: nil ]]]].\\\\n\\\\t^ authors! !\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping' stamp: 'sd 9/29/2004 18:15'!\\\\nremoveEmptyMessageCategories\\\\n\\\\t\\\\\\\"Smalltalk removeEmptyMessageCategories\\\\\\\"\\\\n\\\\tself garbageCollect.\\\\n\\\\t(ClassOrganizer allInstances copyWith: SystemOrganization)\\\\n\\\\t\\\\tdo: [:org | org removeEmptyCategories]! !\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping' stamp: 'nk 2/23/2005 18:00'!\\\\ntestFormatter\\\\n\\\\t\\\\\\\"Smalltalk testFormatter\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Reformats the source for every method in the system, and\\\\n\\\\tthen compiles that source and verifies that it generates\\\\n\\\\tidentical code. The formatting used will be either classic\\\\n\\\\tmonochrome or fancy polychrome, depending on the setting\\\\n\\\\tof the preference #colorWhenPrettyPrinting.\\\\\\\"\\\\n\\\\n\\\\t| newCodeString methodNode oldMethod newMethod badOnes n |\\\\n\\\\tbadOnes := OrderedCollection new.\\\\n\\\\tself forgetDoIts.\\\\n\\\\t'Formatting all classes...' \\\\n\\\\t\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\tfrom: 0\\\\n\\\\t\\\\tto: CompiledMethod instanceCount\\\\n\\\\t\\\\tduring: \\\\n\\\\t\\\\t\\\\t[:bar | \\\\n\\\\t\\\\t\\\\tn := 0.\\\\n\\\\t\\\\t\\\\tself systemNavigation allBehaviorsDo: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:cls | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Transcript cr; show: cls name.\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcls selectors do: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:selector | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(n := n + 1) \\\\\\\\\\\\\\\\ 100 = 0 ifTrue: [bar value: n].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnewCodeString := cls prettyPrinterClass \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tformat: (cls sourceCodeAt: selector)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tin: cls\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnotifying: nil\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdecorated: Preferences colorWhenPrettyPrinting.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmethodNode := cls compilerClass new \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcompile: newCodeString\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tin: cls\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnotifying: nil\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFail: [].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnewMethod := methodNode generate: #(0 0 0 0).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\toldMethod := cls compiledMethodAt: selector.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\toldMethod = newMethod \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[Transcript\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcr;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tshow: '***' , cls name , ' ' , selector.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbadOnes add: cls name , ' ' , selector]]]].\\\\n\\\\tself systemNavigation browseMessageList: badOnes asSortedCollection\\\\n\\\\t\\\\tname: 'Formatter Discrepancies'! !\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping' stamp: 'nk 2/23/2005 18:00'!\\\\ntestFormatter2\\\\n\\\\t\\\\\\\"Smalltalk testFormatter2\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"Reformats the source for every method in the system, and\\\\n\\\\tthen verifies that the order of source tokens is unchanged.\\\\n\\\\tThe formatting used will be either classic monochrome or\\\\n\\\\tfancy polychrome, depending on the setting of the preference\\\\n\\\\t#colorWhenPrettyPrinting. \\\\\\\"\\\\n\\\\n\\\\t| newCodeString badOnes n oldCodeString oldTokens newTokens |\\\\n\\\\tbadOnes := OrderedCollection new.\\\\n\\\\tself forgetDoIts.\\\\n\\\\t'Formatting all classes...' \\\\n\\\\t\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\tfrom: 0\\\\n\\\\t\\\\tto: CompiledMethod instanceCount\\\\n\\\\t\\\\tduring: \\\\n\\\\t\\\\t\\\\t[:bar | \\\\n\\\\t\\\\t\\\\tn := 0.\\\\n\\\\t\\\\t\\\\tself systemNavigation allBehaviorsDo: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:cls | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"Transcript cr; show: cls name.\\\\\\\"\\\\n\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcls selectors do: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[:selector | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(n := n + 1) \\\\\\\\\\\\\\\\ 100 = 0 ifTrue: [bar value: n].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\toldCodeString := (cls sourceCodeAt: selector) asString.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnewCodeString := cls prettyPrinterClass \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tformat: oldCodeString\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tin: cls\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnotifying: nil\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdecorated: Preferences colorWhenPrettyPrinting.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\toldTokens := oldCodeString findTokens: Character separators.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnewTokens := newCodeString findTokens: Character separators.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\toldTokens = newTokens \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[Transcript\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcr;\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tshow: '***' , cls name , ' ' , selector.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbadOnes add: cls name , ' ' , selector]]]].\\\\n\\\\tself systemNavigation browseMessageList: badOnes asSortedCollection\\\\n\\\\t\\\\tname: 'Formatter Discrepancies'! !\\\\n\\\\n!SystemDictionary methodsFor: 'housekeeping' stamp: 'sd 4/17/2003 21:01'!\\\\nverifyChanges\\\\t\\\\t\\\\\\\"Smalltalk verifyChanges\\\\\\\"\\\\n\\\\t\\\\\\\"Recompile all methods in the changes file.\\\\\\\"\\\\n\\\\tself systemNavigation allBehaviorsDo: [:class | class recompileChanges].\\\\n! !\\\\n\\\\n\\\\n!SystemDictionary methodsFor: 'image, changes name' stamp: 'yo 3/29/2004 09:36'!\\\\nprimImageName\\\\n\\\\t\\\\\\\"Answer the full path name for the current image.\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk imageName\\\\\\\"\\\\n\\\\n\\\\t<primitive: 121>\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!SystemDictionary methodsFor: 'image, changes name' stamp: 'yo 3/29/2004 09:36'!\\\\nprimImageName: newName\\\\n\\\\t\\\\\\\"Set the the full path name for the current image.  All further snapshots will use this.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 121>\\\\n\\\\t^ self primitiveFailed! !\\\\n\\\\n!SystemDictionary methodsFor: 'image, changes name' stamp: 'yo 3/29/2004 09:36'!\\\\nprimVmPath\\\\n\\\\t\\\\\\\"Answer the path for the directory containing the Smalltalk virtual machine. Return the empty string if this primitive is not implemented.\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk vmPath\\\\\\\"\\\\n\\\\n\\\\t<primitive: 142>\\\\n\\\\t^ ''! !\\\\n\\\\n\\\\n!SystemDictionary methodsFor: 'memory space'!\\\\nbytesLeft\\\\n\\\\t\\\\\\\"Answer the number of bytes of space available. Does a full garbage collection.\\\\\\\"\\\\n\\\\n\\\\t^ self garbageCollect\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'ar 2/25/2001 18:00'!\\\\nbytesLeftString\\\\n\\\\t\\\\\\\"Return a string describing the amount of memory available\\\\\\\"\\\\n\\\\t| availInternal availPhysical availTotal |\\\\n\\\\tself garbageCollect.\\\\n\\\\tavailInternal _ self primBytesLeft.\\\\n\\\\tavailPhysical _ self bytesLeft: false.\\\\n\\\\tavailTotal _ self bytesLeft: true.\\\\n\\\\t(availTotal > (availInternal + 10000)) \\\\\\\"compensate for mini allocations inbetween\\\\\\\"\\\\n\\\\t\\\\tifFalse:[^availInternal asStringWithCommas, ' bytes available'].\\\\n\\\\t^String streamContents:[:s|\\\\n\\\\t\\\\ts nextPutAll: availInternal asStringWithCommas, \\\\t' bytes (internal) '; cr.\\\\n\\\\t\\\\ts nextPutAll: availPhysical asStringWithCommas,\\\\t' bytes (physical) '; cr.\\\\n\\\\t\\\\ts nextPutAll: availTotal asStringWithCommas, \\\\t' bytes (total)     '].! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'ar 2/25/2001 17:55'!\\\\nbytesLeft: aBool\\\\n\\\\t\\\\\\\"Return the amount of available space. If aBool is true, include possibly available swap space. If aBool is false, include possibly available physical memory. For a report on the largest free block currently availabe within Squeak memory but not counting extra memory use #primBytesLeft.\\\\\\\"\\\\n\\\\t<primitive: 112>\\\\n\\\\t^self primBytesLeft! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space'!\\\\ncreateStackOverflow\\\\n\\\\t\\\\\\\"For testing the low space handler...\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk installLowSpaceWatcher; createStackOverflow\\\\\\\"\\\\n\\\\n\\\\tself createStackOverflow.  \\\\\\\"infinite recursion\\\\\\\"! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'JMM 1/27/2005 13:23'!\\\\nforceTenure\\\\n\\\\t\\\\\\\"Primitive. Tell the GC logic to force a tenure on the next increment GC.\\\\\\\"\\\\n\\\\t<primitive: 'primitiveForceTenure'>\\\\n\\\\t^self primitiveFailed! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'ar 2/11/2001 02:36'!\\\\ngarbageCollect\\\\n\\\\t\\\\\\\"Primitive. Reclaims all garbage and answers the number of bytes of available space.\\\\\\\"\\\\n\\\\tObject flushDependents.\\\\n\\\\tObject flushEvents.\\\\n\\\\t^self primitiveGarbageCollect! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space'!\\\\ngarbageCollectMost\\\\n\\\\t\\\\\\\"Primitive. Reclaims recently created garbage (which is usually most of it) fairly quickly and answers the number of bytes of available space.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 131>\\\\n\\\\t^ self primBytesLeft! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space'!\\\\ninstallLowSpaceWatcher\\\\n\\\\t\\\\\\\"Start a process to watch for low-space conditions.\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk installLowSpaceWatcher\\\\\\\"\\\\n\\\\n\\\\tself primSignalAtBytesLeft: 0.  \\\\\\\"disable low-space interrupts\\\\\\\"\\\\n\\\\tLowSpaceProcess == nil ifFalse: [LowSpaceProcess terminate].\\\\n\\\\tLowSpaceProcess _ [self lowSpaceWatcher] newProcess.\\\\n\\\\tLowSpaceProcess priority: Processor lowIOPriority.\\\\n\\\\tLowSpaceProcess resume.\\\\n\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'ar 1/18/2005 16:46'!\\\\nisRoot: oop\\\\n\\\\t\\\\\\\"Primitive. Answer whether the object is currently a root for youngSpace.\\\\\\\"\\\\n\\\\t<primitive: 'primitiveIsRoot'>\\\\n\\\\t^self primitiveFailed! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'ar 1/18/2005 16:47'!\\\\nisYoung: oop\\\\n\\\\t\\\\\\\"Primitive. Answer whether the object currently resides in youngSpace.\\\\\\\"\\\\n\\\\t<primitive: 'primitiveIsYoung'>\\\\n\\\\t^self primitiveFailed! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'di 8/18/2000 16:49'!\\\\nlowSpaceThreshold \\\\n\\\\t\\\\\\\"Return the low space threshold. When the amount of free memory (after garbage collection) falls below this limit, the system is in serious danger of completely exhausting memory and crashing. This limit should be made high enough to allow the user open a debugger to diagnose a problem or to save the image.\\\\\\\"\\\\n\\\\n\\\\tthisContext isPseudoContext\\\\n\\\\t\\\\tifTrue: [^ 400000  \\\\\\\"Enough for JIT compiler\\\\\\\"]\\\\n\\\\t\\\\tifFalse: [^ 200000  \\\\\\\"Enough for interpreter\\\\\\\"]! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'dtl 10/3/2005 06:12'!\\\\nlowSpaceWatcher\\\\n\\\\t\\\\\\\"Wait until the low space semaphore is signalled, then take appropriate actions.\\\\\\\"\\\\n\\\\n\\\\t| free preemptedProcess |\\\\n\\\\tself garbageCollectMost <= self lowSpaceThreshold\\\\n\\\\t\\\\tifTrue: [self garbageCollect <= self lowSpaceThreshold\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"free space must be above threshold before\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tstarting low space watcher\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t^ Beeper beep]].\\\\n\\\\n\\\\tSmalltalk specialObjectsArray at: 23 put: nil.  \\\\\\\"process causing low space will be saved here\\\\\\\"\\\\n\\\\tLowSpaceSemaphore _ Semaphore new.\\\\n\\\\tself primLowSpaceSemaphore: LowSpaceSemaphore.\\\\n\\\\tself primSignalAtBytesLeft: self lowSpaceThreshold.  \\\\\\\"enable low space interrupts\\\\\\\"\\\\n\\\\n\\\\tLowSpaceSemaphore wait.  \\\\\\\"wait for a low space condition...\\\\\\\"\\\\n\\\\n\\\\tself primSignalAtBytesLeft: 0.  \\\\\\\"disable low space interrupts\\\\\\\"\\\\n\\\\tself primLowSpaceSemaphore: nil.\\\\n\\\\tLowSpaceProcess _ nil.\\\\n\\\\n\\\\t\\\\\\\"The process that was active at the time of the low space interrupt.\\\\\\\"\\\\n\\\\tpreemptedProcess _ Smalltalk specialObjectsArray at: 23.\\\\n\\\\tSmalltalk specialObjectsArray at: 23 put: nil.\\\\n\\\\n\\\\t\\\\\\\"Note: user now unprotected until the low space watcher is re-installed\\\\\\\"\\\\n\\\\n\\\\tself memoryHogs isEmpty\\\\n\\\\t\\\\tifFalse: [free := self bytesLeft.\\\\n\\\\t\\\\t\\\\tself memoryHogs\\\\n\\\\t\\\\t\\\\t\\\\tdo: [ :hog | hog freeSomeSpace ].\\\\n\\\\t\\\\t\\\\tself bytesLeft > free\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [ ^ self installLowSpaceWatcher ]].\\\\n\\\\tself isMorphic\\\\n\\\\t\\\\tifTrue: [CurrentProjectRefactoring\\\\n\\\\t\\\\t\\\\t\\\\tcurrentInterruptName: 'Space is low'\\\\n\\\\t\\\\t\\\\t\\\\tpreemptedProcess: preemptedProcess]\\\\n\\\\t\\\\tifFalse: [ScheduledControllers\\\\n\\\\t\\\\t\\\\t\\\\tinterruptName: 'Space is low'\\\\n\\\\t\\\\t\\\\t\\\\tpreemptedProcess: preemptedProcess]\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'nk 10/28/2000 20:37'!\\\\nlowSpaceWatcherProcess\\\\n\\\\t^LowSpaceProcess! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'sma 4/22/2000 19:03'!\\\\nmemoryHogs\\\\n\\\\t\\\\\\\"Answer the list of objects to notify with #freeSomeSpace if memory gets full.\\\\\\\"\\\\n\\\\n\\\\t^ MemoryHogs ifNil: [MemoryHogs _ OrderedCollection new]! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space'!\\\\nokayToProceedEvenIfSpaceIsLow\\\\n\\\\t\\\\\\\"Return true if either there is enough memory to do so safely or if the user gives permission after being given fair warning.\\\\\\\"\\\\n\\\\n\\\\tself garbageCollectMost > self lowSpaceThreshold ifTrue: [^ true].  \\\\\\\"quick\\\\\\\"\\\\n\\\\tself garbageCollect > self lowSpaceThreshold ifTrue: [^ true].  \\\\\\\"work harder\\\\\\\"\\\\n\\\\n\\\\t^ self confirm:\\\\n'WARNING: There is not enough space to start the low space watcher.\\\\nIf you proceed, you will not be warned again, and the system may\\\\nrun out of memory and crash. If you do proceed, you can start the\\\\nlow space notifier when more space becomes available simply by\\\\nopening and then closing a debugger (e.g., by hitting Cmd-period.)\\\\nDo you want to proceed?'\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space'!\\\\nprimBytesLeft\\\\n\\\\t\\\\\\\"Primitive. Answer the number of bytes available for new object data.\\\\n\\\\tNot accurate unless preceded by\\\\n\\\\t\\\\tSmalltalk garbageCollectMost (for reasonable accuracy), or\\\\n\\\\t\\\\tSmalltalk garbageCollect (for real accuracy).\\\\n\\\\tSee Object documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 112>\\\\n\\\\t^ 0! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'ar 2/11/2001 02:16'!\\\\nprimitiveGarbageCollect\\\\n\\\\t\\\\\\\"Primitive. Reclaims all garbage and answers the number of bytes of available space.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 130>\\\\n\\\\t^ self primBytesLeft! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space'!\\\\nprimLowSpaceSemaphore: aSemaphore\\\\n\\\\t\\\\\\\"Primitive. Register the given Semaphore to be signalled when the\\\\n\\\\tnumber of free bytes drops below some threshold. Disable low-space\\\\n\\\\tinterrupts if the argument is nil.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 124>\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space'!\\\\nprimSignalAtBytesLeft: numBytes\\\\n\\\\t\\\\\\\"Tell the interpreter the low-space threshold in bytes. When the free\\\\n\\\\tspace falls below this threshold, the interpreter will signal the low-space\\\\n\\\\tsemaphore, if one has been registered.  Disable low-space interrupts if the\\\\n\\\\targument is zero.  Fail if numBytes is not an Integer.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 125>\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'ar 1/18/2005 16:48'!\\\\nrootTable\\\\n\\\\t\\\\\\\"Primitive. Answer a snapshot of the VMs root table. \\\\n\\\\tKeep in mind that the primitive may itself cause GC.\\\\\\\"\\\\n\\\\t<primitive: 'primitiveRootTable'>\\\\n\\\\t^self primitiveFailed! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'ar 1/18/2005 16:49'!\\\\nrootTableAt: index\\\\n\\\\t\\\\\\\"Primitive. Answer the nth element of the VMs root table\\\\\\\"\\\\n\\\\t<primitive: 'primitiveRootTableAt'>\\\\n\\\\t^nil! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'JMM 1/27/2005 12:27'!\\\\nsetGCBiasToGrowGCLimit: aNumber\\\\n\\\\t\\\\\\\"Primitive. Indicate that the bias to grow logic should do a GC after aNumber Bytes\\\\\\\"\\\\n\\\\t<primitive: 'primitiveSetGCBiasToGrowGCLimit'>\\\\n\\\\t^self primitiveFailed\\\\n\\\\\\\"Example:\\\\n\\\\tSmalltalk setGCBiasToGrowGCLimit: 16*1024*1024.\\\\n\\\\\\\"! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'JMM 1/27/2005 13:12'!\\\\nsetGCBiasToGrow: aNumber\\\\n\\\\t\\\\\\\"Primitive. Indicate that the GC logic should be bias to grow\\\\\\\"\\\\n\\\\t<primitive: 'primitiveSetGCBiasToGrow'>\\\\n\\\\t^self primitiveFailed\\\\n\\\\\\\"Example:\\\\n\\\\tSmalltalk setGCBiasToGrowGCLimit: 16*1024*1024.\\\\n\\\\tSmalltalk setGCBiasToGrow: 1.\\\\n\\\\\\\"! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'ar 1/18/2005 16:54'!\\\\nsetGCSemaphore: semaIndex\\\\n\\\\t\\\\\\\"Primitive. Indicate the GC semaphore index to be signaled on GC occurance.\\\\\\\"\\\\n\\\\t<primitive: 'primitiveSetGCSemaphore'>\\\\n\\\\t^self primitiveFailed\\\\n\\\\\\\"Example:\\\\n\\\\n\\\\t| index sema process |\\\\n\\\\tsema := Semaphore new.\\\\n\\\\tindex := Smalltalk registerExternalObject: sema.\\\\n\\\\tSmalltalk setGCSemaphore: index.\\\\n\\\\tprocess := [\\\\n\\\\t\\\\t[[true] whileTrue:[\\\\n\\\\t\\\\t\\\\tsema wait.\\\\n\\\\t\\\\t\\\\tSmalltalk beep.\\\\n\\\\t\\\\t]] ensure:[\\\\n\\\\t\\\\t\\\\tSmalltalk setGCSemaphore: 0.\\\\n\\\\t\\\\t\\\\tSmalltalk unregisterExternalObject: sema.\\\\n\\\\t\\\\t].\\\\n\\\\t] fork.\\\\n\\\\tprocess inspect.\\\\n\\\\\\\"! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space'!\\\\nsignalLowSpace\\\\n\\\\t\\\\\\\"Signal the low-space semaphore to alert the user that space is running low.\\\\\\\"\\\\n\\\\n\\\\tLowSpaceSemaphore signal.! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'apb 10/3/2000 16:40'!\\\\nuseUpMemory\\\\n\\\\t\\\\\\\"For testing the low space handler...\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk installLowSpaceWatcher; useUpMemory\\\\\\\"\\\\n\\\\n\\\\t| lst |\\\\n\\\\tlst _ nil.\\\\n\\\\t[true] whileTrue: [\\\\n\\\\t\\\\tlst _ Link nextLink: lst.\\\\n\\\\t].! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'di 8/18/2000 21:15'!\\\\nuseUpMemoryWithArrays \\\\n\\\\t\\\\\\\"For testing the low space handler...\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk installLowSpaceWatcher; useUpMemoryWithArrays\\\\\\\"\\\\n\\\\n\\\\t| b |  \\\\\\\"First use up most of memory.\\\\\\\"\\\\n\\\\tb _ String new: self bytesLeft - self lowSpaceThreshold - 100000.\\\\n\\\\tb _ b.  \\\\\\\"Avoid unused value warning\\\\\\\"\\\\n\\\\t(1 to: 10000) collect: [:i | Array new: 10000]! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'di 8/18/2000 16:49'!\\\\nuseUpMemoryWithContexts \\\\n\\\\t\\\\\\\"For testing the low space handler...\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk installLowSpaceWatcher; useUpMemoryWithContexts\\\\\\\"\\\\n\\\\n\\\\tself useUpMemoryWithContexts! !\\\\n\\\\n!SystemDictionary methodsFor: 'memory space' stamp: 'di 8/18/2000 16:50'!\\\\nuseUpMemoryWithTinyObjects \\\\n\\\\t\\\\\\\"For testing the low space handler...\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk installLowSpaceWatcher; useUpMemoryWithTinyObjects\\\\\\\"\\\\n\\\\n\\\\t| b |  \\\\\\\"First use up most of memory.\\\\\\\"\\\\n\\\\tb _ String new: self bytesLeft - self lowSpaceThreshold - 100000.\\\\n\\\\tb _ b.  \\\\\\\"Avoid unused value warning\\\\\\\"\\\\n\\\\t(1 to: 10000) collect: [:i | BitBlt new]! !\\\\n\\\\n\\\\n!SystemDictionary methodsFor: 'miscellaneous'!\\\\nexitToDebugger\\\\n\\\\t\\\\\\\"Primitive. Enter the machine language debugger, if one exists. Essential.\\\\n\\\\tSee Object documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 114>\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!SystemDictionary methodsFor: 'miscellaneous' stamp: 'dao 10/1/2004 13:33'!\\\\nhandleUserInterrupt\\\\n\\\\tPreferences cmdDotEnabled ifTrue:\\\\n\\\\t\\\\t[Smalltalk isMorphic\\\\n\\\\t\\\\t\\\\tifTrue: [[Project interruptName: 'User Interrupt'] fork]\\\\n\\\\t\\\\t\\\\tifFalse: [[ScheduledControllers interruptName: 'User Interrupt'] fork]]! !\\\\n\\\\n!SystemDictionary methodsFor: 'miscellaneous' stamp: 'sd 9/29/2004 18:17'!\\\\nhasMorphic\\\\n\\\\t\\\\\\\"Answer whether the Morphic classes are available in the\\\\n\\\\tsystem (they may have been stripped, such as by a call to\\\\n\\\\tSmalltalk removeMorphic\\\\\\\"\\\\n\\\\t^ (self\\\\n\\\\t\\\\tat: #Morph\\\\n\\\\t\\\\tifAbsent: [])\\\\n\\\\t\\\\tisKindOf: Class! !\\\\n\\\\n!SystemDictionary methodsFor: 'miscellaneous' stamp: 'tk 10/16/2001 19:24'!\\\\nlogError: errMsg inContext: aContext to: aFilename\\\\n\\\\t\\\\\\\"Log the error message and a stack trace to the given file.\\\\\\\"\\\\n\\\\n\\\\t| ff |\\\\n\\\\tFileDirectory default deleteFileNamed: aFilename ifAbsent: [].\\\\n\\\\t(ff _ FileStream fileNamed: aFilename) ifNil: [^ self \\\\\\\"avoid recursive errors\\\\\\\"].\\\\n\\\\n  \\\\tff nextPutAll: errMsg; cr.\\\\n\\\\taContext errorReportOn: ff.\\\\n\\\\tff close.! !\\\\n\\\\n!SystemDictionary methodsFor: 'miscellaneous' stamp: 'yo 7/2/2004 13:32'!\\\\nm17nVersion\\\\n\\\\n\\\\t^ 'M17n 5.0' copy\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'miscellaneous' stamp: 'yo 7/2/2004 13:32'!\\\\nnihongoVersion\\\\n\\\\n\\\\t^ 'Nihongo7.0' copy\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'miscellaneous' stamp: 'MPH 10/24/2000 14:27'!\\\\nsetMacFileInfoOn: aString\\\\n\\\\t\\\\\\\"On Mac, set the file type and creator (noop on other platforms)\\\\\\\"\\\\n\\\\tFileDirectory default\\\\n\\\\t\\\\tsetMacFileNamed: aString\\\\n\\\\t\\\\ttype: 'STch'\\\\n\\\\t\\\\tcreator: 'FAST'.! !\\\\n\\\\n!SystemDictionary methodsFor: 'miscellaneous' stamp: 'nb 6/17/2003 12:25'!\\\\nverifyMorphicAvailability\\\\n\\\\t\\\\\\\"If Morphic is available, return true; if not, put up an informer and return false\\\\\\\"\\\\n\\\\tself hasMorphic ifFalse:\\\\n\\\\t\\\\t[Beeper beep.\\\\n\\\\t\\\\tself inform: 'Sorry, Morphic must\\\\nbe present to use this feature'.\\\\n\\\\t\\\\t^ false].\\\\n\\\\t^ true! !\\\\n\\\\n\\\\n!SystemDictionary methodsFor: 'objects from disk' stamp: 'tk 9/28/2000 15:50'!\\\\nobjectForDataStream: refStrm\\\\n\\\\t| dp |\\\\n\\\\t\\\\\\\"I am about to be written on an object file.  Write a reference to Smalltalk instead.\\\\\\\"\\\\n\\\\n\\\\tdp _ DiskProxy global: #Smalltalk selector: #yourself\\\\n\\\\t\\\\t\\\\targs: #().\\\\n\\\\trefStrm replace: self with: dp.\\\\n\\\\t^ dp! !\\\\n\\\\n!SystemDictionary methodsFor: 'objects from disk' stamp: 'tk 3/7/2000 18:40'!\\\\nstoreDataOn: aDataStream\\\\n\\\\t\\\\\\\"I don't get stored.  Use a DiskProxy\\\\\\\"\\\\n\\\\n\\\\tself error: 'use a DiskProxy to store me'! !\\\\n\\\\n\\\\n!SystemDictionary methodsFor: 'printing' stamp: 'sma 6/1/2000 09:53'!\\\\nprintElementsOn: aStream\\\\n\\\\taStream nextPutAll:'(lots of globals)'! !\\\\n\\\\n\\\\n!SystemDictionary methodsFor: 'retrieving' stamp: 'sd 4/17/2003 21:15'!\\\\nallClasses  \\\\n\\\\t\\\\\\\"Return all the class defines in the Smalltalk SystemDictionary\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk allClasses\\\\\\\"\\\\n\\\\n\\\\t^ self classNames collect: [:name | self at: name]! !\\\\n\\\\n!SystemDictionary methodsFor: 'retrieving' stamp: 'sd 4/17/2003 21:18'!\\\\nallClassesDo: aBlock\\\\n\\\\t\\\\\\\"Evaluate the argument, aBlock, for each class in the system.\\\\\\\"\\\\n\\\\n\\\\t(self classNames collect: [:name | self at: name]) do: aBlock! !\\\\n\\\\n!SystemDictionary methodsFor: 'retrieving' stamp: 'al 2/23/2006 21:39'!\\\\nallTraits\\\\n\\\\t\\\\\\\"Return all traits defined in the Smalltalk SystemDictionary\\\\\\\"\\\\n\\\\n\\\\t^ self traitNames collect: [:each | self at: each]! !\\\\n\\\\n!SystemDictionary methodsFor: 'retrieving' stamp: 'sd 9/29/2004 18:17'!\\\\npoolUsers\\\\n\\\\t\\\\\\\"Answer a dictionary of pool name -> classes that refer to it.\\\\n\\\\tAlso includes any globally know dictionaries (such as\\\\n\\\\tSmalltalk, Undeclared etc) which although not strictly\\\\n\\\\taccurate is potentially useful information\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk poolUsers\\\\\\\"\\\\n\\\\t| poolUsers pool refs |\\\\n\\\\tpoolUsers := Dictionary new.\\\\n\\\\tself keys\\\\n\\\\t\\\\tdo: [:k | \\\\\\\"yes, using isKindOf: is tacky but for reflective code like\\\\n\\\\t\\\\t\\\\tthis it is very useful. If you really object you can:-\\\\n\\\\t\\\\t\\\\ta) go boil your head.\\\\n\\\\t\\\\t\\\\tb) provide a better answer.\\\\n\\\\t\\\\t\\\\tyour choice.\\\\\\\"\\\\n\\\\t\\\\t\\\\t(((pool := self at: k) isKindOf: Dictionary)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tor: [pool isKindOf: SharedPool class])\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [refs := self systemNavigation allClasses\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tselect: [:c | c sharedPools identityIncludes: pool]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tthenCollect: [:c | c name].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\trefs\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tadd: (self systemNavigation\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tallCallsOn: (self associationAt: k)).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tpoolUsers at: k put: refs]].\\\\n\\\\t^ poolUsers! !\\\\n\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'sd 9/29/2004 18:18'!\\\\nabandonSources\\\\n\\\\t\\\\\\\"Smalltalk abandonSources\\\\\\\"\\\\n\\\\t\\\\\\\"Replaces every method by a copy with the 4-byte source\\\\n\\\\tpointer \\\\n\\\\treplaced by a string of all arg and temp names, followed by its\\\\n\\\\tlength. These names can then be used to inform the\\\\n\\\\tdecompiler. See stats below\\\\\\\"\\\\n\\\\t\\\\\\\"wod 11/3/1998: zap the organization before rather than after\\\\n\\\\tcondensing changes.\\\\\\\"\\\\n\\\\t| oldCodeString argsAndTemps oldMethods newMethods m bTotal bCount |\\\\n\\\\t(self confirm: 'This method will preserve most temp names\\\\n(up to about 400 characters) while allowing\\\\nthe sources file to be discarded.\\\\n-- CAUTION --\\\\nIf you have backed up your system and\\\\nare prepared to face the consequences of\\\\nabandoning source code files, choose Yes.\\\\nIf you have any doubts, you may choose No\\\\nto back out with no harm done.')\\\\n\\\\t\\\\t\\\\t== true\\\\n\\\\t\\\\tifFalse: [^ self inform: 'Okay - no harm done'].\\\\n\\\\tself forgetDoIts.\\\\n\\\\toldMethods := OrderedCollection new: CompiledMethod instanceCount.\\\\n\\\\tnewMethods := OrderedCollection new: CompiledMethod instanceCount.\\\\n\\\\tbTotal := 0.\\\\n\\\\tbCount := 0.\\\\n\\\\tself systemNavigation\\\\n\\\\t\\\\tallBehaviorsDo: [:b | bTotal := bTotal + 1].\\\\n\\\\t'Saving temp names for better decompilation...'\\\\n\\\\t\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\tfrom: 0\\\\n\\\\t\\\\tto: bTotal\\\\n\\\\t\\\\tduring: [:bar | self systemNavigation\\\\n\\\\t\\\\t\\\\t\\\\tallBehaviorsDo: [:cl | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"for test: (Array with: Arc with: Arc class) do:\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbar value: (bCount := bCount + 1).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tcl selectors\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:selector | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tm := cl compiledMethodAt: selector.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tm fileIndex > 0\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [oldCodeString := cl sourceCodeAt: selector.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\targsAndTemps := (cl compilerClass new\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tparse: oldCodeString\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tin: cl\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnotifying: nil) tempNames.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\toldMethods addLast: m.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnewMethods\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taddLast: (m copyWithTempNames: argsAndTemps)]]]].\\\\n\\\\toldMethods asArray elementsExchangeIdentityWith: newMethods asArray.\\\\n\\\\tself systemNavigation\\\\n\\\\t\\\\tallBehaviorsDo: [:b | b zapOrganization].\\\\n\\\\tself condenseChanges.\\\\n\\\\tPreferences disable: #warnIfNoSourcesFile! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'sd 9/29/2004 18:18'!\\\\nabandonTempNames\\\\n\\\\t\\\\\\\"Replaces every method by a copy with no source pointer or\\\\n\\\\tencoded temp names.\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk abandonTempNames\\\\\\\"\\\\n\\\\t| continue oldMethods newMethods n m |\\\\n\\\\tcontinue := self confirm: '-- CAUTION --\\\\nIf you have backed up your system and\\\\nare prepared to face the consequences of\\\\nabandoning all source code, hit Yes.\\\\nIf you have any doubts, hit No,\\\\nto back out with no harm done.'.\\\\n\\\\tcontinue\\\\n\\\\t\\\\tifFalse: [^ self inform: 'Okay - no harm done'].\\\\n\\\\tself forgetDoIts; garbageCollect.\\\\n\\\\toldMethods := OrderedCollection new.\\\\n\\\\tnewMethods := OrderedCollection new.\\\\n\\\\tn := 0.\\\\n\\\\t'Removing temp names to save space...'\\\\n\\\\t\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\tfrom: 0\\\\n\\\\t\\\\tto: CompiledMethod instanceCount\\\\n\\\\t\\\\tduring: [:bar | self systemNavigation\\\\n\\\\t\\\\t\\\\t\\\\tallBehaviorsDo: [:cl | cl selectors\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:sel | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tbar value: (n := n + 1).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tm := cl compiledMethodAt: sel.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\toldMethods addLast: m.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tnewMethods\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taddLast: (m copyWithTrailerBytes: #(0 ))]]].\\\\n\\\\toldMethods asArray elementsExchangeIdentityWith: newMethods asArray.\\\\n\\\\tSmalltalkImage current closeSourceFiles.\\\\n\\\\tself flag: #shouldUseAEnsureBlockToBeSureThatTheFileIsClosed.\\\\n\\\\t\\\\\\\"sd: 17 April 2003\\\\\\\"\\\\n\\\\tPreferences disable: #warnIfNoChangesFile.\\\\n\\\\tPreferences disable: #warnIfNoSourcesFile! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'di 3/3/2001 08:31'!\\\\ncleanUpUndoCommands\\\\n\\\\t\\\\\\\"Smalltalk cleanUpUndoCommands\\\\\\\"  \\\\\\\"<== print this to get classes involved\\\\\\\"\\\\n\\\\n\\\\t| classes i p |\\\\n\\\\tclasses _ Bag new.\\\\n\\\\t'Ferreting out obsolete undo commands'\\\\n\\\\t\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\tfrom: 0 to: Morph withAllSubclasses size\\\\n\\\\t\\\\tduring:\\\\n\\\\t[:bar | i _ 0.\\\\n\\\\tMorph withAllSubclassesDo:\\\\n\\\\t\\\\t[:c | bar value: (i _ i+1).\\\\n\\\\t\\\\tc allInstancesDo:\\\\n\\\\t\\\\t\\\\t[:m | (p _ m otherProperties) ifNotNil:\\\\n\\\\t\\\\t\\\\t\\\\t[p keys do:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:k | (p at: k) class == Command ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[classes add: c name.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tm removeProperty: k]]]]]].\\\\n\\\\t^ classes! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'sd 9/29/2004 18:40'!\\\\ncomputeImageSegmentation\\\\n\\\\t\\\\\\\"Smalltalk computeImageSegmentation\\\\\\\"\\\\n\\\\t\\\\\\\"Here's how the segmentation works:\\\\n\\\\tFor each partition, we collect the classes involved, and also all\\\\n\\\\tmessages no longer used in the absence of this partition. We\\\\n\\\\tstart by computing a 'Miscellaneous' segment of all the\\\\n\\\\tunused classes in the system as is.\\\\\\\"\\\\n\\\\t| partitions unusedCandM newClasses expandedCandM |\\\\n\\\\tpartitions := Dictionary new.\\\\n\\\\tunusedCandM := self unusedClassesAndMethodsWithout: {{}. {}}.\\\\n\\\\tpartitions at: 'Miscellaneous' put: unusedCandM.\\\\n\\\\tnewClasses := Array\\\\n\\\\t\\\\t\\\\t\\\\tstreamContents: [:s | (SystemOrganization categoriesMatching: 'VMConstruction-*')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:cat | (SystemOrganization superclassOrder: cat)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:c | s nextPut: c name]]].\\\\n\\\\texpandedCandM := self unusedClassesAndMethodsWithout: {unusedCandM first asArray , newClasses. unusedCandM second}.\\\\n\\\\tpartitions at: 'VMConstruction' put: {(expandedCandM first copyWithoutAll: unusedCandM first) addAll: newClasses;\\\\n\\\\t\\\\t\\\\t yourself. expandedCandM second copyWithoutAll: unusedCandM second}.\\\\n\\\\tunusedCandM := expandedCandM.\\\\n\\\\tnewClasses := Array\\\\n\\\\t\\\\t\\\\t\\\\tstreamContents: [:s | (SystemOrganization categoriesMatching: 'ST80-*')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:cat | (SystemOrganization superclassOrder: cat)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:c | s nextPut: c name]]].\\\\n\\\\texpandedCandM := self unusedClassesAndMethodsWithout: {unusedCandM first asArray , newClasses. unusedCandM second}.\\\\n\\\\tpartitions at: 'ST80' put: {(expandedCandM first copyWithoutAll: unusedCandM first) addAll: newClasses;\\\\n\\\\t\\\\t\\\\t yourself. expandedCandM second copyWithoutAll: unusedCandM second}.\\\\n\\\\tunusedCandM := expandedCandM.\\\\n\\\\tnewClasses := Array\\\\n\\\\t\\\\t\\\\t\\\\tstreamContents: [:s | (SystemOrganization categoriesMatching: 'Morphic-Games')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:cat | (SystemOrganization superclassOrder: cat)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:c | s nextPut: c name]]].\\\\n\\\\texpandedCandM := self unusedClassesAndMethodsWithout: {unusedCandM first asArray , newClasses. unusedCandM second}.\\\\n\\\\tpartitions at: 'Games' put: {(expandedCandM first copyWithoutAll: unusedCandM first) addAll: newClasses;\\\\n\\\\t\\\\t\\\\t yourself. expandedCandM second copyWithoutAll: unusedCandM second}.\\\\n\\\\tunusedCandM := expandedCandM.\\\\n\\\\tnewClasses := Array\\\\n\\\\t\\\\t\\\\t\\\\tstreamContents: [:s | (SystemOrganization categoriesMatching: 'Morphic-Remote')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:cat | (SystemOrganization superclassOrder: cat)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:c | s nextPut: c name]]].\\\\n\\\\texpandedCandM := self unusedClassesAndMethodsWithout: {unusedCandM first asArray , newClasses. unusedCandM second}.\\\\n\\\\tpartitions at: 'Nebraska' put: {(expandedCandM first copyWithoutAll: unusedCandM first) addAll: newClasses;\\\\n\\\\t\\\\t\\\\t yourself. expandedCandM second copyWithoutAll: unusedCandM second}.\\\\n\\\\tunusedCandM := expandedCandM.\\\\n\\\\tnewClasses := Array\\\\n\\\\t\\\\t\\\\t\\\\tstreamContents: [:s | ((SystemOrganization categoriesMatching: 'Network-*')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcopyWithoutAll: #('Network-Kernel' 'Network-Url' 'Network-Protocols' 'Network-ObjectSocket' ))\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:cat | (SystemOrganization superclassOrder: cat)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:c | s nextPut: c name]]].\\\\n\\\\texpandedCandM := Smalltalk unusedClassesAndMethodsWithout: {unusedCandM first asArray , newClasses. unusedCandM second}.\\\\n\\\\tpartitions at: 'Network' put: {(expandedCandM first copyWithoutAll: unusedCandM first) addAll: newClasses;\\\\n\\\\t\\\\t\\\\t yourself. expandedCandM second copyWithoutAll: unusedCandM second}.\\\\n\\\\tunusedCandM := expandedCandM.\\\\n\\\\tnewClasses := Array\\\\n\\\\t\\\\t\\\\t\\\\tstreamContents: [:s | (SystemOrganization categoriesMatching: 'Balloon3D-*')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:cat | (SystemOrganization superclassOrder: cat)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:c | s nextPut: c name]]].\\\\n\\\\texpandedCandM := self unusedClassesAndMethodsWithout: {unusedCandM first asArray , newClasses. unusedCandM second}.\\\\n\\\\tpartitions at: 'Balloon3D' put: {(expandedCandM first copyWithoutAll: unusedCandM first) addAll: newClasses;\\\\n\\\\t\\\\t\\\\t yourself. expandedCandM second copyWithoutAll: unusedCandM second}.\\\\n\\\\tunusedCandM := expandedCandM.\\\\n\\\\tnewClasses := Array\\\\n\\\\t\\\\t\\\\t\\\\tstreamContents: [:s | (SystemOrganization categoriesMatching: 'FFI-*')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:cat | (SystemOrganization superclassOrder: cat)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:c | s nextPut: c name]]].\\\\n\\\\texpandedCandM := self unusedClassesAndMethodsWithout: {unusedCandM first asArray , newClasses. unusedCandM second}.\\\\n\\\\tpartitions at: 'FFI' put: {(expandedCandM first copyWithoutAll: unusedCandM first) addAll: newClasses;\\\\n\\\\t\\\\t\\\\t yourself. expandedCandM second copyWithoutAll: unusedCandM second}.\\\\n\\\\tunusedCandM := expandedCandM.\\\\n\\\\tnewClasses := Array\\\\n\\\\t\\\\t\\\\t\\\\tstreamContents: [:s | (SystemOrganization categoriesMatching: 'Genie-*')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:cat | (SystemOrganization superclassOrder: cat)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:c | s nextPut: c name]]].\\\\n\\\\texpandedCandM := self unusedClassesAndMethodsWithout: {unusedCandM first asArray , newClasses. unusedCandM second}.\\\\n\\\\tpartitions at: 'Genie' put: {(expandedCandM first copyWithoutAll: unusedCandM first) addAll: newClasses;\\\\n\\\\t\\\\t\\\\t yourself. expandedCandM second copyWithoutAll: unusedCandM second}.\\\\n\\\\tunusedCandM := expandedCandM.\\\\n\\\\tnewClasses := Array\\\\n\\\\t\\\\t\\\\t\\\\tstreamContents: [:s | (SystemOrganization categoriesMatching: 'Speech-*')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:cat | (SystemOrganization superclassOrder: cat)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:c | s nextPut: c name]]].\\\\n\\\\texpandedCandM := self unusedClassesAndMethodsWithout: {unusedCandM first asArray , newClasses. unusedCandM second}.\\\\n\\\\tpartitions at: 'Speech' put: {(expandedCandM first copyWithoutAll: unusedCandM first) addAll: newClasses;\\\\n\\\\t\\\\t\\\\t yourself. expandedCandM second copyWithoutAll: unusedCandM second}.\\\\n\\\\tunusedCandM := expandedCandM.\\\\n\\\\tnewClasses := Array\\\\n\\\\t\\\\t\\\\t\\\\tstreamContents: [:s | #('Morphic-Components' )\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:cat | (SystemOrganization superclassOrder: cat)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:c | s nextPut: c name]]].\\\\n\\\\tnewClasses := newClasses copyWithoutAll: #(#ComponentLikeModel ).\\\\n\\\\texpandedCandM := Smalltalk unusedClassesAndMethodsWithout: {unusedCandM first asArray , newClasses. unusedCandM second}.\\\\n\\\\tpartitions at: 'Components' put: {(expandedCandM first copyWithoutAll: unusedCandM first) addAll: newClasses;\\\\n\\\\t\\\\t\\\\t yourself. expandedCandM second copyWithoutAll: unusedCandM second}.\\\\n\\\\tunusedCandM := expandedCandM.\\\\n\\\\tnewClasses := Array\\\\n\\\\t\\\\t\\\\t\\\\tstreamContents: [:s | #('Sound-Scores' 'Sound-Interface' )\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:cat | (SystemOrganization superclassOrder: cat)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:c | s nextPut: c name]]].\\\\n\\\\tnewClasses := newClasses , #(#WaveletCodec #Sonogram #FWT #AIFFFileReader ).\\\\n\\\\texpandedCandM := self unusedClassesAndMethodsWithout: {unusedCandM first asArray , newClasses. unusedCandM second}.\\\\n\\\\tpartitions at: 'Sound' put: {(expandedCandM first copyWithoutAll: unusedCandM first) addAll: newClasses;\\\\n\\\\t\\\\t\\\\t yourself. expandedCandM second copyWithoutAll: unusedCandM second}.\\\\n\\\\tunusedCandM := expandedCandM.\\\\n\\\\tnewClasses := Array\\\\n\\\\t\\\\t\\\\t\\\\tstreamContents: [:s | ((SystemOrganization categoriesMatching: 'Tools-*')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcopyWithout: 'Tools-Menus')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:cat | (SystemOrganization superclassOrder: cat)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:c | s nextPut: c name]]].\\\\n\\\\tnewClasses := newClasses copyWithoutAll: #(#Debugger #Inspector #ContextVariablesInspector #SyntaxError #ChangeSet #ChangeRecord #ClassChangeRecord #ChangeList #VersionsBrowser ).\\\\n\\\\texpandedCandM := self unusedClassesAndMethodsWithout: {unusedCandM first asArray , newClasses. unusedCandM second}.\\\\n\\\\tpartitions at: 'Tools' put: {(expandedCandM first copyWithoutAll: unusedCandM first) addAll: newClasses;\\\\n\\\\t\\\\t\\\\t yourself. expandedCandM second copyWithoutAll: unusedCandM second}.\\\\n\\\\tunusedCandM := expandedCandM.\\\\n\\\\tnewClasses := Array\\\\n\\\\t\\\\t\\\\t\\\\tstreamContents: [:s | (SystemOrganization categoriesMatching: 'Balloon-MMFlash*')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:cat | (SystemOrganization superclassOrder: cat)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:c | s nextPut: c name]]].\\\\n\\\\tnewClasses := newClasses , #(#ADPCMCodec ).\\\\n\\\\texpandedCandM := self unusedClassesAndMethodsWithout: {unusedCandM first asArray , newClasses. unusedCandM second}.\\\\n\\\\tpartitions at: 'Flash' put: {(expandedCandM first copyWithoutAll: unusedCandM first) addAll: newClasses;\\\\n\\\\t\\\\t\\\\t yourself. expandedCandM second copyWithoutAll: unusedCandM second}.\\\\n\\\\tunusedCandM := expandedCandM.\\\\n\\\\tnewClasses := Array\\\\n\\\\t\\\\t\\\\t\\\\tstreamContents: [:s | (SystemOrganization categoriesMatching: 'Balloon-TrueType*')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:cat | (SystemOrganization superclassOrder: cat)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:c | s nextPut: c name]]].\\\\n\\\\texpandedCandM := self unusedClassesAndMethodsWithout: {unusedCandM first asArray , newClasses. unusedCandM second}.\\\\n\\\\tpartitions at: 'TrueType' put: {(expandedCandM first copyWithoutAll: unusedCandM first) addAll: newClasses;\\\\n\\\\t\\\\t\\\\t yourself. expandedCandM second copyWithoutAll: unusedCandM second}.\\\\n\\\\tunusedCandM := expandedCandM.\\\\n\\\\tnewClasses := Array\\\\n\\\\t\\\\t\\\\t\\\\tstreamContents: [:s | (SystemOrganization categoriesMatching: 'Graphics-Files')\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:cat | (SystemOrganization superclassOrder: cat)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:c | s nextPut: c name]]].\\\\n\\\\texpandedCandM := self unusedClassesAndMethodsWithout: {unusedCandM first asArray , newClasses. unusedCandM second}.\\\\n\\\\tpartitions at: 'GraphicFiles' put: {(expandedCandM first copyWithoutAll: unusedCandM first) addAll: newClasses;\\\\n\\\\t\\\\t\\\\t yourself. expandedCandM second copyWithoutAll: unusedCandM second}.\\\\n\\\\tunusedCandM := expandedCandM.\\\\n\\\\t#(#AliceConstants 'Balloon3D' #B3DEngineConstants 'Balloon3D' #WonderlandConstants 'Balloon3D' #FFIConstants 'FFI' #KlattResonatorIndices 'Speech' )\\\\n\\\\t\\\\tpairsDo: [:poolName :part | (partitions at: part) first add: poolName].\\\\n\\\\tpartitions\\\\n\\\\t\\\\tkeysDo: [:k | k = 'Miscellaneous'\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [(partitions at: 'Miscellaneous') first removeAllFoundIn: (partitions at: k) first]].\\\\n\\\\t^ partitions! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'sma 6/18/2000 12:32'!\\\\ndiscardDiscards\\\\n\\\\t\\\\\\\"Discard all discard* methods - including this one.\\\\\\\"\\\\n\\\\n\\\\t(self class selectors select: [:each | each beginsWith: 'discard']) \\\\n\\\\t\\\\tdo: [:each | self class removeSelector: each].\\\\n\\\\t#(lastRemoval majorShrink zapMVCprojects)\\\\n\\\\t\\\\tdo: [:each | self class removeSelector: each]! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'sd 9/29/2004 18:20'!\\\\ndiscardFFI\\\\n\\\\t\\\\\\\"Discard the complete foreign function interface.\\\\n\\\\tNOTE: Recreates specialObjectsArray to prevent obsolete\\\\n\\\\treferences. Has to specially remove external structure\\\\n\\\\thierarchy before ExternalType\\\\\\\"\\\\n\\\\tself\\\\n\\\\t\\\\tat: #ExternalStructure\\\\n\\\\t\\\\tifPresent: [:cls | (ChangeSet superclassOrder: cls withAllSubclasses asArray)\\\\n\\\\t\\\\t\\\\t\\\\treverseDo: [:c | c removeFromSystem]].\\\\n\\\\tSystemOrganization removeCategoriesMatching: 'FFI-*'.\\\\n\\\\tself recreateSpecialObjectsArray.\\\\n\\\\t\\\\\\\"Remove obsolete refs\\\\\\\"\\\\n\\\\tByteArray removeSelector: #asExternalPointer.\\\\n\\\\tByteArray removeSelector: #pointerAt:! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'TPR 8/5/2000 01:32'!\\\\ndiscardFlash\\\\n\\\\t\\\\\\\"Discard Flash support.\\\\\\\"\\\\n\\\\n\\\\tSystemOrganization removeCategoriesMatching: 'Balloon-MMFlash*'\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'RAA 12/17/2000 16:50'!\\\\ndiscardMIDI\\\\n\\\\n\\\\t\\\\\\\"this seems to have gone away\\\\\\\"! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'sd 9/29/2004 18:21'!\\\\ndiscardMorphic\\\\n\\\\t\\\\\\\"Discard Morphic.\\\\n\\\\tUpdated for 2.8 TPR\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk discardMorphic\\\\\\\"\\\\n\\\\t\\\\\\\"Check that we are in an MVC Project and that there are no\\\\n\\\\tMorphic Projects\\\\n\\\\tor WorldMorphViews.\\\\\\\"\\\\n\\\\t| subs |\\\\n\\\\tFlaps clobberFlapTabList.\\\\n\\\\tself discardFlash.\\\\n\\\\tself discardTrueType.\\\\n\\\\tsubs := OrderedCollection new.\\\\n\\\\tMorph\\\\n\\\\t\\\\tallSubclassesWithLevelDo: [:c :i | subs addFirst: c]\\\\n\\\\t\\\\tstartingLevel: 0.\\\\n\\\\tsubs\\\\n\\\\t\\\\tdo: [:c | c removeFromSystem].\\\\n\\\\tself removeClassNamed: #CornerRounder.\\\\n\\\\tself\\\\n\\\\t\\\\tremoveKey: #BalloonEngineConstants\\\\n\\\\t\\\\tifAbsent: [].\\\\n\\\\tSystemOrganization removeCategoriesMatching: 'Balloon-*'.\\\\n\\\\tSystemOrganization removeCategoriesMatching: 'Morphic-*'.\\\\n\\\\tSystemOrganization removeSystemCategory: 'Graphics-Transformations'.\\\\n\\\\tSystemOrganization removeSystemCategory: 'ST80-Morphic'.\\\\n\\\\tScriptingSystem := nil! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'sd 9/29/2004 18:21'!\\\\ndiscardMVC\\\\n\\\\t\\\\\\\"After suitable checks, strip out much of MVC from the system\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk discardMVC\\\\\\\"\\\\n\\\\t| keepers |\\\\n\\\\tself flag: #bob.\\\\n\\\\t\\\\\\\"zapping projects\\\\\\\"\\\\n\\\\tself isMorphic\\\\n\\\\t\\\\tifFalse: [self inform: 'You must be in a Morphic project to discard MVC.'.\\\\n\\\\t\\\\t\\\\t^ self].\\\\n\\\\t\\\\\\\"Check that there are no MVC Projects\\\\\\\"\\\\n\\\\t(Project allProjects\\\\n\\\\t\\\\t\\\\tallSatisfy: [:proj | proj isMorphic])\\\\n\\\\t\\\\tifFalse: [(self confirm: 'Would you like a chance to remove your\\\\nMVC projects in an orderly manner?')\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [^ self].\\\\n\\\\t\\\\t\\\\t(self confirm: 'If you wish, I can remove all MVC projects,\\\\nmake this project be the top project, and place\\\\nall orphaned sub-projects of MVC parents here.\\\\nWould you like be to do this\\\\nand proceed to discard all MVC classes?')\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [self zapMVCprojects]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [^ self]].\\\\n\\\\tself reclaimDependents.\\\\n\\\\t\\\\\\\"Remove old Paragraph classes and View classes.\\\\\\\"\\\\n\\\\tself\\\\n\\\\t\\\\tat: #Paragraph\\\\n\\\\t\\\\tifPresent: [:paraClass | (ChangeSet superclassOrder: paraClass withAllSubclasses asArray)\\\\n\\\\t\\\\t\\\\t\\\\treverseDo: [:c | c removeFromSystem]].\\\\n\\\\tself\\\\n\\\\t\\\\tat: #View\\\\n\\\\t\\\\tifPresent: [:viewClass | (ChangeSet superclassOrder: viewClass withAllSubclasses asArray)\\\\n\\\\t\\\\t\\\\t\\\\treverseDo: [:c | c removeFromSystem]].\\\\n\\\\t\\\\\\\"Get rid of ParagraphEditor's ScrollController dependence\\\\\\\"\\\\n\\\\t#(#markerDelta #viewDelta #scrollAmount #scrollBar #computeMarkerRegion )\\\\n\\\\t\\\\tdo: [:sel | ParagraphEditor removeSelector: sel].\\\\n\\\\tParagraphEditor compile: 'updateMarker'.\\\\n\\\\t\\\\\\\"Reshape to MouseMenuController\\\\\\\"\\\\n\\\\tCompiler\\\\n\\\\t\\\\tevaluate: (ParagraphEditor definition copyReplaceAll: 'ScrollController' with: 'MouseMenuController').\\\\n\\\\t\\\\\\\"Get rid of all Controller classes not needed by\\\\n\\\\tParagraphEditor and ScreenController\\\\\\\"\\\\n\\\\tkeepers := TextMorphEditor withAllSuperclasses copyWith: ScreenController.\\\\n\\\\t(ChangeSet superclassOrder: Controller withAllSubclasses asArray)\\\\n\\\\t\\\\treverseDo: [:c | (keepers includes: c)\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [c removeFromSystem]].\\\\n\\\\tSystemOrganization removeCategoriesMatching: 'ST80-Paths'.\\\\n\\\\tSystemOrganization removeCategoriesMatching: 'ST80-Symbols'.\\\\n\\\\tSystemOrganization removeCategoriesMatching: 'ST80-Pluggable Views'.\\\\n\\\\tself removeClassNamed: 'FormButtonCache'.\\\\n\\\\tself removeClassNamed: 'WindowingTransformation'.\\\\n\\\\tself removeClassNamed: 'ControlManager'.\\\\n\\\\tself removeClassNamed: 'DisplayTextView'.\\\\n\\\\tScheduledControllers := nil.\\\\n\\\\tUndeclared removeUnreferencedKeys.\\\\n\\\\tSystemOrganization removeEmptyCategories.\\\\n\\\\tSymbol rehash! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'cwp 11/8/2002 13:38'!\\\\ndiscardNetworking\\\\n\\\\t\\\\\\\"Discard the support for TCP/IP networking.\\\\\\\"\\\\n\\\\n\\\\tSystemOrganization removeCategoriesMatching: 'Network-*'.\\\\n\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'md 7/29/2005 16:00'!\\\\ndiscardOddsAndEnds\\\\n\\\\t\\\\\\\"This method throws out lots of classes that are not frequently\\\\n\\\\tused.\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk discardOddsAndEnds\\\\\\\"\\\\n\\\\tself organization removeSystemCategory: 'System-Serial Port'.\\\\n\\\\tself organization removeSystemCategory: 'ST80-Symbols'.\\\\n\\\\tself organization removeSystemCategory: 'Tools-File Contents Browser'.\\\\n\\\\tself organization removeSystemCategory: 'System-Compression'.\\\\n\\\\tself organization removeSystemCategory: 'Tools-Explorer'.\\\\n\\\\tself organization removeSystemCategory: 'System-Digital Signatures'.\\\\n\\\\tForm removeSelector: #edit.\\\\n\\\\tself\\\\n\\\\t\\\\tat: #FormView\\\\n\\\\t\\\\tifPresent: [:c | c compile: 'defaultControllerClass  ^ NoController' classified: 'controller access'].\\\\n\\\\tself removeClassNamed: #FormEditorView.\\\\n\\\\tself removeClassNamed: #FormEditor.\\\\n\\\\tself organization removeSystemCategory: 'ST80-Paths'.\\\\n\\\\t\\\\\\\"bit editor (remove Form editor first):\\\\\\\"\\\\n\\\\tForm removeSelector: #bitEdit.\\\\n\\\\tForm removeSelector: #bitEditAt:scale:.\\\\n\\\\tStrikeFont removeSelector: #edit:.\\\\n\\\\tself removeClassNamed: #FormButtonCache.\\\\n\\\\tself removeClassNamed: #FormMenuController.\\\\n\\\\tself removeClassNamed: #FormMenuView.\\\\n\\\\tself removeClassNamed: #BitEditor.\\\\n\\\\t\\\\\\\"inspector for Dictionaries of Forms\\\\\\\"\\\\n\\\\tDictionary removeSelector: #inspectFormsWithLabel:.\\\\n\\\\tSystemDictionary removeSelector: #viewImageImports.\\\\n\\\\tScreenController removeSelector: #viewImageImports.\\\\n\\\\tself removeClassNamed: #FormHolderView.\\\\n\\\\tself removeClassNamed: #FormInspectView.\\\\n\\\\t\\\\\\\"experimental updating object viewer:\\\\\\\"\\\\n\\\\tObject removeSelector: #evaluate:wheneverChangeIn:.\\\\n\\\\tself removeClassNamed: #ObjectViewer.\\\\n\\\\tself removeClassNamed: #ObjectTracer.\\\\n\\\\t\\\\\\\"miscellaneous classes:\\\\\\\"\\\\n\\\\tself removeClassNamed: #Array2D.\\\\n\\\\tself removeClassNamed: #DriveACar.\\\\n\\\\tself removeClassNamed: #EventRecorder.\\\\n\\\\tself removeClassNamed: #FindTheLight.\\\\n\\\\tself removeClassNamed: #PluggableTest.\\\\n\\\\tself removeClassNamed: #SystemMonitor.\\\\n\\\\tself removeClassNamed: #ProtocolBrowser.\\\\n\\\\tself removeClassNamed: #ObjectExplorerWrapper.\\\\n\\\\tself removeClassNamed: #HierarchyBrowser.\\\\n\\\\tself removeClassNamed: #LinkedMessageSet.\\\\n\\\\tself removeClassNamed: #ObjectExplorer.\\\\n\\\\tself removeClassNamed: #PackageBrowser.\\\\n\\\\tself removeClassNamed: #AbstractHierarchicalList.\\\\n\\\\tself removeClassNamed: #ChangeList.\\\\n\\\\tself removeClassNamed: #VersionsBrowser.\\\\n\\\\tself removeClassNamed: #ChangeRecord.\\\\n\\\\tself removeClassNamed: #SelectorBrowser.\\\\n\\\\tself removeClassNamed: #HtmlFileStream.\\\\n\\\\tself removeClassNamed: #CrLfFileStream.\\\\n\\\\tself removeClassNamed: #FXGrafPort.\\\\n\\\\tself removeClassNamed: #FXBlt.\\\\n\\\\tself\\\\n\\\\t\\\\tat: #SampledSound\\\\n\\\\t\\\\tifPresent: [:c | c initialize].\\\\n\\\\t#(#Helvetica #Palatino #Courier #ComicBold #ComicPlain )\\\\n\\\\t\\\\tdo: [:k | TextConstants\\\\n\\\\t\\\\t\\\\t\\\\tremoveKey: k\\\\n\\\\t\\\\t\\\\t\\\\tifAbsent: []].\\\\n\\\\tPreferences\\\\n\\\\t\\\\tsetButtonFontTo: (StrikeFont familyName: #NewYork size: 12).\\\\n\\\\tPreferences\\\\n\\\\t\\\\tsetFlapsFontTo: (StrikeFont familyName: #NewYork size: 12).\\\\n\\\\t#(#GZipConstants #ZipConstants #KlattResonatorIndices )\\\\n\\\\t\\\\tdo: [:k | self\\\\n\\\\t\\\\t\\\\t\\\\tremoveKey: k\\\\n\\\\t\\\\t\\\\t\\\\tifAbsent: []]! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'sd 9/29/2004 18:23'!\\\\ndiscardSoundSynthesis\\\\n\\\\t\\\\\\\"Discard the sound synthesis facilities, and the methods and\\\\n\\\\tclasses that use it. This also discards MIDI.\\\\\\\"\\\\n\\\\tself discardMIDI.\\\\n\\\\tself discardSpeech.\\\\n\\\\tSystemOrganization removeCategoriesMatching: 'Sound-Interface'.\\\\n\\\\tself\\\\n\\\\t\\\\tat: #GraphMorph\\\\n\\\\t\\\\tifPresent: [:graphMorph | #(#playOnce #readDataFromFile )\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:sel | graphMorph removeSelector: sel]].\\\\n\\\\tself\\\\n\\\\t\\\\tat: #TrashCanMorph\\\\n\\\\t\\\\tifPresent: [:trashMorph | \\\\n\\\\t\\\\t\\\\ttrashMorph class removeSelector: #samplesForDelete.\\\\n\\\\t\\\\t\\\\ttrashMorph class removeSelector: #samplesForMouseEnter.\\\\n\\\\t\\\\t\\\\ttrashMorph class removeSelector: #samplesForMouseLeave].\\\\n\\\\tSystemOrganization removeCategoriesMatching: 'Sound-Synthesis'.\\\\n\\\\tSystemOrganization removeCategoriesMatching: 'Sound-Scores'! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'TPR 8/3/2000 19:21'!\\\\ndiscardSpeech\\\\n\\\\t\\\\\\\"Discard support for speech synthesis\\\\\\\"\\\\n\\\\n\\\\tSystemOrganization removeCategoriesMatching: 'Speech*'.\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'sd 9/29/2004 18:23'!\\\\ndiscardSUnit\\\\n\\\\t\\\\\\\"Smalltalk discardSUnit\\\\\\\"\\\\n\\\\t| oc |\\\\n\\\\toc := OrderedCollection new.\\\\n\\\\t(self\\\\n\\\\t\\\\tat: #TestCase\\\\n\\\\t\\\\tifAbsent: [^ self])\\\\n\\\\t\\\\tallSubclassesWithLevelDo: [:c :i | oc addFirst: c]\\\\n\\\\t\\\\tstartingLevel: 0.\\\\n\\\\toc\\\\n\\\\t\\\\tdo: [:c | c removeFromSystem].\\\\n\\\\tSystemOrganization removeCategoriesMatching: 'SUnit-*'! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'TPR 8/5/2000 01:32'!\\\\ndiscardTrueType\\\\n\\\\t\\\\\\\"Discard TrueType support.\\\\\\\"\\\\n\\\\n\\\\tSystemOrganization removeCategoriesMatching: 'Balloon-TrueType*'.\\\\n\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'sd 9/29/2004 18:24'!\\\\nlastRemoval\\\\n\\\\t\\\\\\\"Smalltalk lastRemoval\\\\\\\"\\\\n\\\\t\\\\\\\"Some explicit removals - add unwanted methods keeping\\\\n\\\\tother methods.\\\\\\\"\\\\n\\\\t| oldDicts newDicts |\\\\n\\\\t#(#abandonSources )\\\\n\\\\t\\\\tdo: [:each | self class removeSelector: each].\\\\n\\\\t\\\\\\\"Get rid of all unsent methods.\\\\\\\"\\\\n\\\\t[self removeAllUnSentMessages > 0] whileTrue.\\\\n\\\\t\\\\\\\"Shrink method dictionaries.\\\\\\\"\\\\n\\\\tself garbageCollect.\\\\n\\\\toldDicts := MethodDictionary allInstances.\\\\n\\\\tnewDicts := Array new: oldDicts size.\\\\n\\\\toldDicts\\\\n\\\\t\\\\twithIndexDo: [:d :index | newDicts at: index put: d rehashWithoutBecome].\\\\n\\\\toldDicts elementsExchangeIdentityWith: newDicts.\\\\n\\\\toldDicts := newDicts := nil.\\\\n\\\\tself\\\\n\\\\t\\\\tallClassesDo: [:c | c zapOrganization].\\\\n\\\\tSystemOrganization := nil.\\\\n\\\\tChangeSet current initialize! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'md 2/24/2006 15:42'!\\\\nmajorShrink\\\\n\\\\t\\\\\\\"Undertake a major shrinkage of the image.\\\\n\\\\tThis method throws out lots of the system that is not needed\\\\n\\\\tfor, eg, operation in a hand-held PC. majorShrink produces a\\\\n\\\\t999k image in Squeak 2.8\\\\n\\\\tSmalltalk majorShrink; abandonSources; lastRemoval\\\\\\\"\\\\n\\\\t| oldDicts newDicts |\\\\n\\\\tself isMorphic\\\\n\\\\t\\\\tifTrue: [^ self error: 'You can only run majorShrink in MVC'].\\\\n\\\\tProject current isTopProject\\\\n\\\\t\\\\tifFalse: [^ self error: 'You can only run majorShrink in the top project'].\\\\n\\\\t(self confirm: 'All sub-projects will be deleted from this image.\\\\nYou should already have made a backup copy,\\\\nor you must save with a different name after shrinking.\\\\nShall we proceed to discard most of the content in this image?')\\\\n\\\\t\\\\tifFalse: [^ self inform: 'No changes have been made.'].\\\\n\\\\t\\\\\\\"Remove all projects but the current one. - saves 522k\\\\\\\"\\\\n\\\\tProjectView\\\\n\\\\t\\\\tallInstancesDo: [:pv | pv controller closeAndUnscheduleNoTerminate].\\\\n\\\\tProject current setParent: Project current.\\\\n\\\\tMorphWorldView\\\\n\\\\t\\\\tallInstancesDo: [:pv | pv topView controller closeAndUnscheduleNoTerminate].\\\\n\\\\tself\\\\n\\\\t\\\\tat: #Wonderland\\\\n\\\\t\\\\tifPresent: [:cls | cls removeActorPrototypesFromSystem].\\\\n\\\\tPlayer freeUnreferencedSubclasses.\\\\n\\\\tMorphicModel removeUninstantiatedModels.\\\\n\\\\tUtilities classPool at: #ScrapsBook put: nil.\\\\n\\\\tUtilities zapUpdateDownloader.\\\\n\\\\tProjectHistory currentHistory initialize.\\\\n\\\\tProject rebuildAllProjects.\\\\n\\\\t\\\\\\\"Smalltalk discardVMConstruction.\\\\\\\"\\\\n\\\\t\\\\\\\"755k\\\\\\\"\\\\n\\\\tself discardSoundSynthesis.\\\\n\\\\t\\\\\\\"544k\\\\\\\"\\\\n\\\\tself discardOddsAndEnds.\\\\n\\\\t\\\\\\\"227k\\\\\\\"\\\\n\\\\tself discardNetworking.\\\\n\\\\t\\\\\\\"234k\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk discard3D.\\\\\\\"\\\\n\\\\t\\\\\\\"407k\\\\\\\"\\\\n\\\\tself discardFFI.\\\\n\\\\t\\\\\\\"33k\\\\\\\"\\\\n\\\\tself discardMorphic.\\\\n\\\\t\\\\\\\"1372k\\\\\\\"\\\\n\\\\tSymbol rehash.\\\\n\\\\t\\\\\\\"40k\\\\\\\"\\\\n\\\\t\\\\\\\"Above by itself saves about 4,238k\\\\\\\"\\\\n\\\\t\\\\\\\"Remove references to a few classes to be deleted, so that they\\\\n\\\\twon't leave obsolete versions around.\\\\\\\"\\\\n\\\\tChangeSet class compile: 'defaultName\\\\n\\\\t\\\\t^ ''Changes'' ' classified: 'initialization'.\\\\n\\\\tScreenController removeSelector: #openChangeManager.\\\\n\\\\tScreenController removeSelector: #exitProject.\\\\n\\\\tScreenController removeSelector: #openProject.\\\\n\\\\tScreenController removeSelector: #viewImageImports.\\\\n\\\\t\\\\\\\"Now delete various other classes..\\\\\\\"\\\\n\\\\tSystemOrganization removeSystemCategory: 'Graphics-Files'.\\\\n\\\\tSystemOrganization removeSystemCategory: 'System-Object Storage'.\\\\n\\\\tself removeClassNamed: #ProjectController.\\\\n\\\\tself removeClassNamed: #ProjectView.\\\\n\\\\t\\\\\\\"Smalltalk removeClassNamed: #Project.\\\\\\\"\\\\n\\\\tself removeClassNamed: #Component1.\\\\n\\\\tself removeClassNamed: #FormSetFont.\\\\n\\\\tself removeClassNamed: #FontSet.\\\\n\\\\tself removeClassNamed: #InstructionPrinter.\\\\n\\\\tself removeClassNamed: #ChangeSorter.\\\\n\\\\tself removeClassNamed: #DualChangeSorter.\\\\n\\\\tself removeClassNamed: #EmphasizedMenu.\\\\n\\\\tself removeClassNamed: #MessageTally.\\\\n\\\\tStringHolder class removeSelector: #originalWorkspaceContents.\\\\n\\\\tCompiledMethod removeSelector: #symbolic.\\\\n\\\\tRemoteString removeSelector: #makeNewTextAttVersion.\\\\n\\\\tUtilities class removeSelector: #absorbUpdatesFromServer.\\\\n\\\\tself removeClassNamed: #PenPointRecorder.\\\\n\\\\tself removeClassNamed: #Path.\\\\n\\\\tself removeClassNamed: #Base64MimeConverter.\\\\n\\\\t\\\\\\\"Smalltalk removeClassNamed: #EToySystem. Dont bother - its\\\\n\\\\tvery small and used for timestamps etc\\\\\\\"\\\\n\\\\tself removeClassNamed: #RWBinaryOrTextStream.\\\\n\\\\tself removeClassNamed: #AttributedTextStream.\\\\n\\\\tself removeClassNamed: #WordNet.\\\\n\\\\tself removeClassNamed: #SelectorBrowser.\\\\n\\\\tTextStyle\\\\n\\\\t\\\\tallSubInstancesDo: [:ts | ts\\\\n\\\\t\\\\t\\\\t\\\\tnewFontArray: (ts fontArray\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tcopyFrom: 1\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tto: (2 min: ts fontArray size))].\\\\n\\\\tListParagraph initialize.\\\\n\\\\tPopUpMenu initialize.\\\\n\\\\tStandardSystemView initialize.\\\\n\\\\tChangeSet noChanges.\\\\n\\\\tChangeSet classPool\\\\n\\\\t\\\\tat: #AllChangeSets\\\\n\\\\t\\\\tput: (OrderedCollection with: ChangeSet current).\\\\n\\\\tSystemDictionary removeSelector: #majorShrink.\\\\n\\\\t[self removeAllUnSentMessages > 0]\\\\n\\\\t\\\\twhileTrue: [Smalltalk unusedClasses\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:c | (Smalltalk at: c) removeFromSystem]].\\\\n\\\\tSystemOrganization removeEmptyCategories.\\\\n\\\\tself\\\\n\\\\t\\\\tallClassesDo: [:c | c zapOrganization].\\\\n\\\\tself garbageCollect.\\\\n\\\\t'Rehashing method dictionaries . . .'\\\\n\\\\t\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\tfrom: 0\\\\n\\\\t\\\\tto: MethodDictionary instanceCount\\\\n\\\\t\\\\tduring: [:bar | \\\\n\\\\t\\\\t\\\\toldDicts := MethodDictionary allInstances.\\\\n\\\\t\\\\t\\\\tnewDicts := Array new: oldDicts size.\\\\n\\\\t\\\\t\\\\toldDicts\\\\n\\\\t\\\\t\\\\t\\\\twithIndexDo: [:d :index | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbar value: index.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tnewDicts at: index put: d rehashWithoutBecome].\\\\n\\\\t\\\\t\\\\toldDicts elementsExchangeIdentityWith: newDicts].\\\\n\\\\toldDicts := newDicts := nil.\\\\n\\\\tProject rebuildAllProjects.\\\\n\\\\tChangeSet current initialize.\\\\n\\\\t\\\\\\\"seems to take more than one try to gc all the weak refs in\\\\n\\\\tSymbolTable \\\\\\\"\\\\n\\\\t3\\\\n\\\\t\\\\ttimesRepeat: [self garbageCollect.\\\\n\\\\t\\\\t\\\\tSymbol compactSymbolTable]! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'nk 4/28/2004 10:24'!\\\\npresumedSentMessages   | sent |\\\\n\\\\\\\"Smalltalk presumedSentMessages\\\\\\\"\\\\n\\\\n\\\\t\\\\\\\"The following should be preserved for doIts, etc\\\\\\\"\\\\n\\\\tsent _ IdentitySet new.\\\\n\\\\t#( rehashWithoutBecome compactSymbolTable rebuildAllProjects\\\\n\\\\t\\\\tbrowseAllSelect:  lastRemoval\\\\n\\\\t\\\\tscrollBarValue: vScrollBarValue: scrollBarMenuButtonPressed: \\\\n\\\\t\\\\twithSelectionFrom:  to: removeClassNamed:\\\\n\\\\t\\\\tdragon: hilberts: mandala: web test3 factorial tinyBenchmarks benchFib\\\\n\\\\t\\\\tnewDepth: restoreAfter: forgetDoIts zapAllMethods obsoleteClasses\\\\n\\\\t\\\\tremoveAllUnSentMessages abandonSources removeUnreferencedKeys\\\\n\\\\t\\\\treclaimDependents zapOrganization condenseChanges browseObsoleteReferences\\\\n\\\\t\\\\tsubclass:instanceVariableNames:classVariableNames:poolDictionaries:category:\\\\n\\\\t\\\\tmethodsFor:stamp: methodsFor:stamp:prior: instanceVariableNames:\\\\n\\\\t\\\\tstartTimerInterruptWatcher unusedClasses) do:\\\\n\\\\t\\\\t[:sel | sent add: sel].\\\\n\\\\t\\\\\\\"The following may be sent by perform: in dispatchOnChar...\\\\\\\"\\\\n\\\\t(ParagraphEditor classPool at: #CmdActions) asSet do:\\\\n\\\\t\\\\t[:sel | sent add: sel].\\\\n\\\\t(ParagraphEditor classPool at: #ShiftCmdActions) asSet do:\\\\n\\\\t\\\\t[:sel | sent add: sel].\\\\n\\\\t^ sent! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'nk 4/28/2004 10:24'!\\\\nremoveAllUnSentMessages\\\\n\\\\t\\\\\\\"Smalltalk removeAllUnSentMessages\\\\\\\"\\\\n\\\\t\\\\\\\"[Smalltalk unusedClasses do: [:c | (Smalltalk at: c) removeFromSystem]. \\\\n\\\\tSmalltalk removeAllUnSentMessages > 0] whileTrue.\\\\\\\"\\\\n\\\\t\\\\\\\"Remove all implementations of unsent messages.\\\\\\\"\\\\n\\\\t| sels n |\\\\n\\\\tsels _ self systemNavigation allUnSentMessages.\\\\n\\\\t\\\\\\\"The following should be preserved for doIts, etc\\\\\\\"\\\\n\\\\t\\\\\\\"needed even after #majorShrink is pulled\\\\\\\"\\\\n\\\\t#(#rehashWithoutBecome #compactSymbolTable #rebuildAllProjects #browseAllSelect:  #lastRemoval #scrollBarValue: vScrollBarValue: #scrollBarMenuButtonPressed: #withSelectionFrom: #to: #removeClassNamed: #dragon: #hilberts: #mandala: #web #test3 #factorial #tinyBenchmarks #benchFib #newDepth: #restoreAfter: #forgetDoIts #zapAllMethods #obsoleteClasses #removeAllUnSentMessages #abandonSources #removeUnreferencedKeys #reclaimDependents #zapOrganization #condenseChanges #browseObsoleteReferences #subclass:instanceVariableNames:classVariableNames:poolDictionaries:category: #methodsFor:stamp: #methodsFor:stamp:prior: #instanceVariableNames: #startTimerInterruptWatcher #unusedClasses )\\\\n\\\\t\\\\tdo: [:sel | sels\\\\n\\\\t\\\\t\\\\t\\\\tremove: sel\\\\n\\\\t\\\\t\\\\t\\\\tifAbsent: []].\\\\n\\\\t\\\\\\\"The following may be sent by perform: in dispatchOnChar...\\\\\\\"\\\\n\\\\t(ParagraphEditor classPool at: #CmdActions) asSet\\\\n\\\\t\\\\tdo: [:sel | sels\\\\n\\\\t\\\\t\\\\t\\\\tremove: sel\\\\n\\\\t\\\\t\\\\t\\\\tifAbsent: []].\\\\n\\\\t(ParagraphEditor classPool at: #ShiftCmdActions) asSet\\\\n\\\\t\\\\tdo: [:sel | sels\\\\n\\\\t\\\\t\\\\t\\\\tremove: sel\\\\n\\\\t\\\\t\\\\t\\\\tifAbsent: []].\\\\n\\\\tsels size = 0\\\\n\\\\t\\\\tifTrue: [^ 0].\\\\n\\\\tn _ 0.\\\\n\\\\tself systemNavigation\\\\n\\\\t\\\\tallBehaviorsDo: [:x | n _ n + 1].\\\\n\\\\t'Removing ' , sels size printString , ' messages . . .'\\\\n\\\\t\\\\tdisplayProgressAt: Sensor cursorPoint\\\\n\\\\t\\\\tfrom: 0\\\\n\\\\t\\\\tto: n\\\\n\\\\t\\\\tduring: [:bar | \\\\n\\\\t\\\\t\\\\tn _ 0.\\\\n\\\\t\\\\t\\\\tself systemNavigation\\\\n\\\\t\\\\t\\\\t\\\\tallBehaviorsDo: [:class | \\\\n\\\\t\\\\t\\\\t\\\\t\\\\tbar value: (n _ n + 1).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tsels\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tdo: [:sel | class basicRemoveSelector: sel]]].\\\\n\\\\t^ sels size! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'sd 9/29/2004 18:26'!\\\\nremoveNormalCruft\\\\n\\\\t\\\\\\\"Remove various graphics, uniclasses, references. Caution: see\\\\n\\\\tcomment at bottom of method\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk removeNormalCruft\\\\\\\"\\\\n\\\\tScriptingSystem stripGraphicsForExternalRelease.\\\\n\\\\tScriptingSystem spaceReclaimed.\\\\n\\\\tReferences keys\\\\n\\\\t\\\\tdo: [:k | References removeKey: k].\\\\n\\\\tself classNames\\\\n\\\\t\\\\tdo: [:cName | #('Player' 'CardPlayer' 'Component' 'WonderlandActor' 'MorphicModel' 'PlayWithMe' )\\\\n\\\\t\\\\t\\\\t\\\\tdo: [:superName | ((cName ~= superName\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tand: [cName beginsWith: superName])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tand: [(cName allButFirst: superName size)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tallSatisfy: [:ch | ch isDigit]])\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [self removeClassNamed: cName]]].\\\\n\\\\tself\\\\n\\\\t\\\\tat: #Wonderland\\\\n\\\\t\\\\tifPresent: [:cls | cls removeActorPrototypesFromSystem].\\\\n\\\\tChangeSet current clear\\\\n\\\\t\\\\\\\"Caution: if any worlds in the image happen to have uniclass\\\\n\\\\tplayers associated with them, running this method would\\\\n\\\\tlikely compromise their functioning and could cause errors,\\\\n\\\\tespecially if the uniclass player of the current world had any\\\\n\\\\tscripts set to ticking. If that happens to you somehow, you will\\\\n\\\\tprobably want to find a way to reset the offending world's\\\\n\\\\tplayer to be an UnscriptedCardPlayer, or perhaps nil\\\\\\\"! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'sd 9/29/2004 18:26'!\\\\nremoveSelector: descriptor \\\\n\\\\t\\\\\\\"Safely remove a selector from a class (or metaclass). If the\\\\n\\\\tclass or the method doesn't exist anymore, never mind and\\\\n\\\\tanswer nil.\\\\n\\\\tThis method should be used instead of 'Class removeSelector:\\\\n\\\\t#method' to omit global class references.\\\\\\\"\\\\n\\\\t| class sel |\\\\n\\\\tclass := self\\\\n\\\\t\\\\t\\\\t\\\\tat: descriptor first\\\\n\\\\t\\\\t\\\\t\\\\tifAbsent: [^ nil].\\\\n\\\\t(descriptor size > 2\\\\n\\\\t\\\\t\\\\tand: [descriptor second == #class])\\\\n\\\\t\\\\tifTrue: [class := class class.\\\\n\\\\t\\\\t\\\\tsel := descriptor third]\\\\n\\\\t\\\\tifFalse: [sel := descriptor second].\\\\n\\\\t^ class removeSelector: sel! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'di 2/25/2001 22:34'!\\\\nreportClassAndMethodRemovalsFor: collectionOfClassNames\\\\n\\\\t| initialClassesAndMethods finalClassesAndMethods |\\\\n\\\\t\\\\\\\"Smalltalk reportClassAndMethodRemovalsFor: #(Celeste Scamper MailMessage)\\\\\\\"\\\\n\\\\n\\\\tinitialClassesAndMethods _ self unusedClassesAndMethodsWithout: {{}. {}}.\\\\n\\\\tfinalClassesAndMethods _ self unusedClassesAndMethodsWithout: {collectionOfClassNames. {}}.\\\\n\\\\t^ {finalClassesAndMethods first copyWithoutAll: initialClassesAndMethods first.\\\\n\\\\t\\\\tfinalClassesAndMethods second copyWithoutAll: initialClassesAndMethods second}! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'sd 4/29/2003 19:06'!\\\\nunusedClasses\\\\n\\\\t\\\\\\\"Enumerates all classes in the system and returns a list of those that are \\\\n\\\\tapparently unused. A class is considered in use if it (a) has subclasses \\\\n\\\\tor (b) is referred to by some method or (c) has its name in use as a \\\\n\\\\tliteral. \\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk unusedClasses asSortedCollection\\\\\\\"\\\\n\\\\t^ self systemNavigation allUnusedClassesWithout: {{}. {}}! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'edc 11/8/2005 10:11'!\\\\nunusedClassesAndMethodsWithout: classesAndMessagesPair \\\\n\\\\t\\\\\\\"Accepts and returns a pair: {set of class names. set of selectors}. \\\\n\\\\tIt is expected these results will be diff'd with the normally unused \\\\n\\\\tresults. \\\\\\\"\\\\n\\\\t| classRemovals messageRemovals nClasses nMessages |\\\\n\\\\t(classRemovals _ IdentitySet new) addAll: classesAndMessagesPair first.\\\\n\\\\t(messageRemovals _ IdentitySet new) addAll: classesAndMessagesPair second.\\\\n\\\\tnClasses _ nMessages _ -1.\\\\n\\\\t[\\\\\\\"As long as we keep making progress...\\\\\\\"\\\\n\\\\tclassRemovals size > nClasses\\\\n\\\\t\\\\tor: [messageRemovals size > nMessages]]\\\\n\\\\t\\\\twhileTrue: [\\\\\\\"...keep trying for bigger sets of unused classes and selectors.\\\\\\\"\\\\n\\\\t\\\\t\\\\tnClasses _ classRemovals size.\\\\n\\\\t\\\\t\\\\tnMessages _ messageRemovals size.\\\\n\\\\t\\\\t\\\\tUtilities\\\\n\\\\t\\\\t\\\\t\\\\tinformUser: 'Iterating removals '\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t, (classesAndMessagesPair first isEmpty\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: ['for baseline...']\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: ['for ' , classesAndMessagesPair first first , ' etc...']) , Character cr asString , nClasses printString , ' classes, ' , nMessages printString , ' messages.\\\\n|\\\\n|'\\\\n\\\\t\\\\t\\\\t\\\\tduring: [\\\\\\\"spacers move menu off cursor\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tclassRemovals\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taddAll: (self systemNavigation allUnusedClassesWithout: {classRemovals. messageRemovals}).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tmessageRemovals\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taddAll: (self systemNavigation allUnSentMessagesWithout: {classRemovals. messageRemovals})]].\\\\n\\\\t^ {classRemovals. self systemNavigation allUnSentMessagesWithout: {classRemovals. messageRemovals}}! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'dao 10/1/2004 13:51'!\\\\nwriteImageSegmentsFrom: segmentDictionary withKernel: kernel\\\\n\\\\t\\\\\\\"segmentDictionary is associates segmentName -> {classNames. methodNames},\\\\n\\\\tand kernel is another set of classNames determined to be essential.\\\\n\\\\tAdd a partition, 'Secondary' with everything not in partitions and not in the kernel.\\\\n\\\\tThen write segments based on this partitioning of classes.\\\\\\\"\\\\n\\\\n\\\\t| metas secondary dups segDict overlaps classes n symbolHolder |\\\\n\\\\t\\\\\\\"First, put all classes that are in no other partition, and not in kernel into a new partition called 'Secondary'.  Also remove any classes in kernel from putative partitions.\\\\\\\"\\\\n\\\\tsecondary _ Smalltalk classNames asIdentitySet.\\\\n\\\\tsegmentDictionary keysDo:\\\\n\\\\t\\\\t[:segName |\\\\n\\\\t\\\\tsecondary removeAllFoundIn: (segmentDictionary at: segName) first.\\\\n\\\\t\\\\t(segmentDictionary at: segName) first removeAllFoundIn: kernel].\\\\n\\\\tsecondary removeAllFoundIn: kernel.\\\\n\\\\tsecondary removeAllFoundIn: #(PseudoContext TranslatedMethod Utilities Preferences OutOfScopeNotification FakeClassPool  BlockCannotReturn FormSetFont ExternalSemaphoreTable NetNameResolver ScreenController InterpreterPlugin Command WeakSet).\\\\n\\\\tFileDirectory allSubclassesDo: [:c | secondary remove: c name ifAbsent: []].\\\\n\\\\tsegmentDictionary at: 'Secondary' put: {secondary. {}}.\\\\n\\\\n\\\\t\\\\\\\"Now build segDict giving className -> segName, and report any duplicates.\\\\\\\"\\\\n\\\\tdups _ Dictionary new.\\\\n\\\\tsegDict _ IdentityDictionary new: 3000.\\\\n\\\\tsegmentDictionary keysDo:\\\\n\\\\t\\\\t[:segName | (segmentDictionary at: segName) first do:\\\\n\\\\t\\\\t\\\\t[:className |\\\\n\\\\t\\\\t\\\\t(segDict includesKey: className) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[(dups includesKey: className) ifFalse: [dups at: className put: Array new].\\\\n\\\\t\\\\t\\\\t\\\\tdups at: className put: (dups at: className) , {segName}].\\\\n\\\\t\\\\t\\\\tsegDict at: className put: segName]].\\\\n\\\\tdups size > 0 ifTrue: [dups inspect.  ^ self error: 'Duplicate entries'].\\\\n\\\\n\\\\t\\\\\\\"Then for every class in every partition, make sure that neither it\\\\n\\\\tnor any of its superclasses are in any other partition.  If they are,\\\\n\\\\tenter them in a dictionary of overlaps.\\\\n\\\\tIf the dictionary is not empty, then stop and report it.\\\\\\\"\\\\n\\\\toverlaps _ Dictionary new.\\\\n\\\\tsegmentDictionary keysDo:\\\\n\\\\t\\\\t[:segName |  \\\\n\\\\t\\\\tclasses _ (segmentDictionary at: segName) first asArray collect: [:k | Smalltalk at: k].\\\\n\\\\t\\\\tclasses do:\\\\n\\\\t\\\\t\\\\t[:c | (c isKindOf: Class) ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t[c withAllSuperclasses do:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[:sc | n _ segDict at: sc name ifAbsent: [segName].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tn ~= segName ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[n = 'Secondary'\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [(segmentDictionary at: 'Secondary') first\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tremove: sc name ifAbsent: []]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [overlaps at: c name put: \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t(c withAllSuperclasses collect: [:cc | segDict associationAt: cc name ifAbsent: [cc name -> 'Kernel']])]]]]]].\\\\n\\\\toverlaps size > 0 ifTrue: [overlaps inspect.  ^ self error: 'Superclasses in separate segments'].\\\\n\\\\n\\\\t\\\\\\\"If there are no overlaps, then proceed to write the partitioned classes.\\\\\\\"\\\\n\\\\tsymbolHolder _ Symbol allInstances.\\\\t\\\\\\\"Hold onto Symbols with strong pointers, \\\\n\\\\t\\\\tso they will be in outPointers\\\\\\\"\\\\n\\\\tsegmentDictionary keysDo:\\\\n\\\\t\\\\t[:segName |  Utilities informUser: segName during:\\\\n\\\\t\\\\t\\\\t[classes _ (segmentDictionary at: segName) first asArray collect: [:k | Smalltalk at: k].\\\\n\\\\t\\\\t\\\\tmetas _ classes select: [:c | c isKindOf: Class] thenCollect: [:c | c class].\\\\n\\\\t\\\\t\\\\t(ImageSegment new copyFromRoots: classes , metas sizeHint: 0) extract; \\\\n\\\\t\\\\t\\\\t\\\\t\\\\twriteToFile: segName]].\\\\n\\\\tsymbolHolder.  \\\\\\\"Keep compiler for getting uppity.\\\\\\\"! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'ar 9/27/2005 20:12'!\\\\nzapAllOtherProjects \\\\n\\\\t\\\\\\\"Smalltalk zapAllOtherProjects\\\\\\\"\\\\n\\\\\\\"Note: as of this writing, the only reliable way to get rid of all but the current project is te execute the following, one line at a time...\\\\n\\\\t\\\\tSmalltalk zapAllOtherProjects.\\\\n\\\\t\\\\tProjectHistory currentHistory initialize.\\\\n\\\\t\\\\tSmalltalk garbageCollect.\\\\n\\\\t\\\\tProject rebuildAllProjects.\\\\n\\\\\\\"\\\\n\\\\n\\\\t\\\\n\\\\tProject allInstancesDo: [:p | p setParent: nil].\\\\n\\\\tProject current setParent: Project current.\\\\n\\\\tProject current isMorphic ifTrue: [ScheduledControllers := nil].\\\\n\\\\tTheWorldMenu allInstancesDo: [:m | 1 to: m class instSize do: [:i | m instVarAt: i put: nil]].\\\\n\\\\tChangeSet classPool at: #AllChangeSets put: nil.\\\\n\\\\tProject classPool at: #AllProjects put: nil.\\\\n\\\\tProjectHistory currentHistory initialize.\\\\n\\\\tChangeSet initialize.\\\\n\\\\tProject rebuildAllProjects.  \\\\\\\"Does a GC\\\\\\\"\\\\n\\\\tProject allProjects size > 1 ifTrue: [Project allProjects inspect]! !\\\\n\\\\n!SystemDictionary methodsFor: 'shrinking' stamp: 'dao 10/1/2004 13:30'!\\\\nzapMVCprojects\\\\n\\\\t\\\\\\\"Smalltalk zapMVCprojects\\\\\\\"\\\\n\\\\t| window |\\\\n\\\\n\\\\tself flag: #bob. \\\\\\\"zapping projects\\\\\\\"\\\\n\\\\n\\\\tSmalltalk garbageCollect.\\\\n\\\\t\\\\\\\"So allInstances is precise\\\\\\\"\\\\n\\\\tProject\\\\n\\\\t\\\\tallSubInstancesDo: [:proj | proj isTopProject\\\\n\\\\t\\\\t\\\\t\\\\tifTrue: [proj isMorphic\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\\\\"Root project is MVC -- we must become the root\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tProject current setParent: Project current.]]\\\\n\\\\t\\\\t\\\\t\\\\tifFalse: [proj parent isMorphic\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [proj isMorphic\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"Remove Morphic projects from MVC \\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tviews \\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\\\\"... and add them back here.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twindow _ (SystemWindow labelled: proj name)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tmodel: proj.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twindow\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\taddMorph: (ProjectViewMorph on: proj)\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tframe: (0 @ 0 corner: 1.0 @ 1.0).\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\twindow openInWorld.\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tproj setParent: Project current]].\\\\n\\\\t\\\\t\\\\t\\\\t\\\\tproj isMorphic\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\\\\"Remove MVC projects from Morphic views\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tProject deletingProject: proj]]]! !\\\\n\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'di 2/4/1999 15:38'!\\\\naddToShutDownList: aClass\\\\n\\\\t\\\\\\\"This will add a ref to this class at the BEGINNING of the shutDown list.\\\\\\\"\\\\n\\\\n\\\\tself addToShutDownList: aClass after: nil! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'di 2/3/1999 22:04'!\\\\naddToShutDownList: aClass after: predecessor\\\\n\\\\n\\\\tself add: aClass toList: ShutDownList after: predecessor! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'di 2/4/1999 15:37'!\\\\naddToStartUpList: aClass\\\\n\\\\t\\\\\\\"This will add a ref to this class at the END of the startUp list.\\\\\\\"\\\\n\\\\n\\\\tself addToStartUpList: aClass after: nil! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'di 2/3/1999 22:04'!\\\\naddToStartUpList: aClass after: predecessor\\\\n\\\\n\\\\tself add: aClass toList: StartUpList after: predecessor! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'ar 11/19/1999 22:36'!\\\\nadd: aClass toList: startUpOrShutDownList after: predecessor\\\\n\\\\t\\\\\\\"Add the name of aClass to the startUp or shutDown list.\\\\n\\\\tAdd it after the name of predecessor, or at the end if predecessor is nil.\\\\\\\"\\\\n\\\\n\\\\t| name earlierName |\\\\n\\\\tname _ aClass name.\\\\n\\\\t(self at: name ifAbsent: [nil]) == aClass ifFalse:\\\\n\\\\t\\\\t[self error: name , ' cannot be found in Smalltalk dictionary.'].\\\\n\\\\tpredecessor == nil\\\\n\\\\t\\\\tifTrue: [\\\\\\\"No-op if alredy in the list.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t(startUpOrShutDownList includes: name) ifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[startUpOrShutDownList == StartUpList\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifTrue: [\\\\\\\"Add to end of startUp list\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartUpOrShutDownList addLast: name]\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tifFalse: [\\\\\\\"Add to front of shutDown list\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\\\\tstartUpOrShutDownList addFirst: name]]]\\\\n\\\\t\\\\tifFalse: [\\\\\\\"Add after predecessor, moving it if already there.\\\\\\\"\\\\n\\\\t\\\\t\\\\t\\\\tearlierName _ predecessor name.\\\\n\\\\t\\\\t\\\\t\\\\t(self at: earlierName) == predecessor ifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self error: earlierName , ' cannot be found in Smalltalk dictionary.'].\\\\n\\\\t\\\\t\\\\t\\\\t(startUpOrShutDownList includes: earlierName) ifFalse:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t[self error: earlierName , ' cannot be found in the list.'].\\\\n\\\\t\\\\t\\\\t\\\\tstartUpOrShutDownList remove: name ifAbsent:[].\\\\n\\\\t\\\\t\\\\t\\\\tstartUpOrShutDownList add: name after: earlierName]! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'RAA 6/14/2000 17:21'!\\\\nisMorphic\\\\n        \\\\\\\"Answer true if the user interface is running in Morphic rathern than \\\\n        MVC.  By convention the gloabl variable World is set to nil when MVC is \\\\n        running.  ScheduledControllers could be set to nil when Morphic is \\\\n        running, but this symmetry is not yet in effect.\\\\\\\"\\\\n\\\\n        ^ World ~~ nil \\\\\\\"or: [RequestCurrentWorldNotification signal notNil]\\\\\\\"! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'ar 11/16/1999 20:12'!\\\\nprocessShutDownList: quitting\\\\n\\\\t\\\\\\\"Send #shutDown to each class that needs to wrap up before a snapshot.\\\\\\\"\\\\n\\\\n\\\\tself send: #shutDown: toClassesNamedIn: ShutDownList with: quitting.\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'ar 11/16/1999 20:12'!\\\\nprocessStartUpList: resuming\\\\n\\\\t\\\\\\\"Send #startUp to each class that needs to run initialization after a snapshot.\\\\\\\"\\\\n\\\\n\\\\tself send: #startUp: toClassesNamedIn: StartUpList with: resuming.\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit'!\\\\nquitPrimitive\\\\n\\\\t\\\\\\\"Primitive. Exit to another operating system on the host machine, if one\\\\n\\\\texists. All state changes in the object space since the last snapshot are lost.\\\\n\\\\tEssential. See Object documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 113>\\\\n\\\\tself primitiveFailed! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'di 2/3/1999 22:22'!\\\\nremoveFromShutDownList: aClass\\\\n\\\\n\\\\tShutDownList remove: aClass name ifAbsent: []! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'di 2/3/1999 22:22'!\\\\nremoveFromStartUpList: aClass\\\\n\\\\n\\\\tStartUpList remove: aClass name ifAbsent: []! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'di 3/7/2001 01:26'!\\\\nsend: startUpOrShutDown toClassesNamedIn: startUpOrShutDownList with: argument\\\\n\\\\t\\\\\\\"Send the message #startUp: or #shutDown: to each class named in the list.\\\\n\\\\tThe argument indicates if the system is about to quit (for #shutDown:) or if\\\\n\\\\tthe image is resuming (for #startUp:).\\\\n\\\\tIf any name cannot be found, then remove it from the list.\\\\\\\"\\\\n\\\\n\\\\t| removals class |\\\\n\\\\tremovals _ OrderedCollection new.\\\\n\\\\tstartUpOrShutDownList do:\\\\n\\\\t\\\\t[:name |\\\\n\\\\t\\\\tclass _ self at: name ifAbsent: [nil].\\\\n\\\\t\\\\tclass == nil\\\\n\\\\t\\\\t\\\\tifTrue: [removals add: name]\\\\n\\\\t\\\\t\\\\tifFalse: [class isInMemory ifTrue:\\\\n\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t[class perform: startUpOrShutDown with: argument]]].\\\\n\\\\n\\\\t\\\\\\\"Remove any obsolete entries, but after the iteration\\\\\\\"\\\\n\\\\tstartUpOrShutDownList removeAll: removals! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'sd 9/30/2003 13:47'!\\\\nsetGCParameters\\\\n\\\\t\\\\\\\"Adjust the VM's default GC parameters to avoid premature tenuring.\\\\\\\"\\\\n\\\\n\\\\tSmalltalkImage current  vmParameterAt: 5 put: 4000.  \\\\\\\"do an incremental GC after this many allocations\\\\\\\"\\\\n\\\\tSmalltalkImage current  vmParameterAt: 6 put: 2000.  \\\\\\\"tenure when more than this many objects survive the GC\\\\\\\"\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'sd 11/16/2003 13:14'!\\\\nshutDown\\\\n\\\\t^ SmalltalkImage current closeSourceFiles! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'gk 2/23/2004 20:51'!\\\\nshutDownSound\\\\n\\\\t\\\\\\\"No longer used in the release, but retained for backward compatibility.\\\\\\\"\\\\n\\\\n\\\\tSoundService default shutDown\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'JMM 11/21/2000 21:02'!\\\\nsnapshotEmbeddedPrimitive\\\\n\\\\t<primitive: 247>\\\\n\\\\t^nil \\\\\\\"indicates error writing embedded image file\\\\\\\"! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'ar 7/22/2000 14:34'!\\\\nsnapshotPrimitive\\\\n\\\\t\\\\\\\"Primitive. Write the current state of the object memory on a file in the\\\\n\\\\tsame format as the Smalltalk-80 release. The file can later be resumed,\\\\n\\\\treturning you to this exact state. Return normally after writing the file.\\\\n\\\\tEssential. See Object documentation whatIsAPrimitive.\\\\\\\"\\\\n\\\\n\\\\t<primitive: 97>\\\\n\\\\t^nil \\\\\\\"indicates error writing image file\\\\\\\"! !\\\\n\\\\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'nk 11/12/2003 10:32'!\\\\nunbindExternalPrimitives\\\\n\\\\t\\\\\\\"Primitive. Force all external primitives to be looked up again afterwards. Since external primitives that have not found are bound for fast failure this method will force the lookup of all primitives again so that after adding some plugin the primitives may be found.\\\\\\\"\\\\n\\\\t^ self deprecated: 'Use SmalltalkImage unbindExternalPrimitives'\\\\n\\\\t\\\\tblock: [SmalltalkImage unbindExternalPrimitives].\\\\n\\\\t\\\\\\\"Do nothing if the primitive fails for compatibility with older VMs\\\\\\\"! !\\\\n\\\\n\\\\n!SystemDictionary methodsFor: 'sources, change log'!\\\\ncopyright\\\\n\\\\t\\\\\\\"The Smalltalk copyright.\\\\\\\"\\\\n\\\\n\\\\t^'Copyright (c) Xerox Corp. 1981, 1982 All rights reserved.\\\\nCopyright (c) Apple Computer, Inc. 1985-1996 All rights reserved.'! !\\\\n\\\\n!SystemDictionary methodsFor: 'sources, change log' stamp: 'em 3/31/2005 11:48'!\\\\ncurrentChangeSetString\\\\n\\\\t\\\\\\\"Smalltalk currentChangeSetString\\\\\\\"\\\\n\\\\t^ 'Current Change Set: ' translated, ChangeSet current name! !\\\\n\\\\n!SystemDictionary methodsFor: 'sources, change log' stamp: 'sd 9/29/2004 18:27'!\\\\ncurrentProjectDo: aBlock \\\\n\\\\t\\\\\\\"So that code can work after removal of Projects\\\\\\\"\\\\n\\\\tself\\\\n\\\\t\\\\tat: #Project\\\\n\\\\t\\\\tifPresent: [:projClass | aBlock value: projClass current]! !\\\\n\\\\n!SystemDictionary methodsFor: 'sources, change log' stamp: 'sd 11/16/2003 12:55'!\\\\nexternalizeSources   \\\\n\\\\t\\\\\\\"Write the sources and changes streams onto external files.\\\\\\\"\\\\n \\\\t\\\\\\\"Smalltalk externalizeSources\\\\\\\"\\\\n\\\\t\\\\\\\"the logic of this method is complex because it uses changesName and self changesName\\\\n\\\\tmay be this is normal - sd\\\\\\\"\\\\n\\\\t\\\\n\\\\t| sourcesName changesName aFile |\\\\n\\\\tsourcesName _ SmalltalkImage current sourcesName.\\\\n\\\\t(FileDirectory default fileExists: sourcesName)\\\\n\\\\t\\\\tifTrue: [^ self inform:\\\\n'Sorry, you must first move or remove the\\\\nfile named ', sourcesName].\\\\n\\\\tchangesName _ SmalltalkImage current changesName.\\\\n\\\\t(FileDirectory default fileExists: changesName)\\\\n\\\\t\\\\tifTrue: [^ self inform:\\\\n'Sorry, you must first move or remove the\\\\nfile named ', changesName].\\\\n\\\\n\\\\taFile _  FileStream newFileNamed: sourcesName.\\\\n\\\\taFile nextPutAll: SourceFiles first originalContents.\\\\n\\\\taFile close.\\\\n\\\\tself setMacFileInfoOn: sourcesName.\\\\n\\\\tSourceFiles at: 1 put: (FileStream readOnlyFileNamed: sourcesName).\\\\n\\\\n\\\\taFile _ FileStream newFileNamed: SmalltalkImage current changesName.\\\\n\\\\taFile nextPutAll: SourceFiles last contents.\\\\n\\\\taFile close.\\\\n\\\\t\\\\\\\"On Mac, set the file type and creator (noop on other platforms)\\\\\\\"\\\\n\\\\tFileDirectory default\\\\n\\\\t\\\\tsetMacFileNamed: SmalltalkImage current changesName\\\\n\\\\t\\\\ttype: 'STch'\\\\n\\\\t\\\\tcreator: 'FAST'.\\\\n\\\\tSourceFiles at: 2 put: (FileStream oldFileNamed: changesName).\\\\n\\\\n\\\\tself inform: 'Sources successfully externalized'.\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'sources, change log' stamp: 'ar 2/6/2001 18:42'!\\\\nforceChangesToDisk\\\\n\\\\t\\\\\\\"Ensure that the changes file has been fully written to disk by closing and re-opening it. This makes the system more robust in the face of a power failure or hard-reboot.\\\\\\\"\\\\n\\\\n\\\\t| changesFile |\\\\n\\\\tchangesFile _ SourceFiles at: 2.\\\\n\\\\t(changesFile isKindOf: FileStream) ifTrue: [\\\\n\\\\t\\\\tchangesFile flush.\\\\n\\\\t\\\\tSecurityManager default hasFileAccess ifTrue:[\\\\n\\\\t\\\\t\\\\tchangesFile close.\\\\n\\\\t\\\\t\\\\tchangesFile open: changesFile name forWrite: true].\\\\n\\\\t\\\\tchangesFile setToEnd.\\\\n\\\\t].\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'sources, change log' stamp: 'sd 11/16/2003 12:55'!\\\\ninternalizeChangeLog    \\\\n\\\\t\\\\t\\\\\\\"Smalltalk internalizeChangeLog\\\\\\\"\\\\n\\\\t\\\\\\\"Bring the changes file into a memory-resident filestream, for faster access and freedom from external file system.  1/31/96 sw\\\\\\\"\\\\n\\\\n\\\\t| reply aName aFile |\\\\n\\\\treply _ self confirm:  'CAUTION -- do not undertake this lightly!!\\\\nIf you have backed up your system and\\\\nare prepared to face the consequences of\\\\nthe requested internalization of sources,\\\\nhit Yes.  If you have any doubts, hit No\\\\nto back out with no harm done.'.\\\\n\\\\n\\\\t(reply ==  true) ifFalse:\\\\n\\\\t\\\\t[^ self inform: 'Okay - abandoned'].\\\\n\\\\n\\\\taName _ SmalltalkImage current changesName.\\\\n\\\\t(aFile _ SourceFiles last) == nil ifTrue:\\\\n\\\\t\\\\t[(FileDirectory default fileExists: aName)\\\\n\\\\t\\\\t\\\\tifFalse: [^ self halt: 'Cannot locate ', aName, ' so cannot proceed.'].\\\\n\\\\t\\\\taFile _ FileStream readOnlyFileNamed: aName].\\\\n\\\\tSourceFiles at: 2 put: (ReadWriteStream with: aFile contentsOfEntireFile).\\\\n\\\\n\\\\tself inform: 'Okay, changes file internalized'! !\\\\n\\\\n!SystemDictionary methodsFor: 'sources, change log' stamp: 'sd 11/16/2003 12:55'!\\\\ninternalizeSources    \\\\n\\\\t\\\\t\\\\\\\"Smalltalk internalizeSources\\\\\\\"\\\\n\\\\t\\\\\\\"Bring the sources and changes files into memory-resident filestreams, for faster access and freedom from file-system interface.  1/29/96 sw\\\\\\\"\\\\n\\\\n\\\\t| reply aName aFile |\\\\n\\\\treply _ self confirm:  'CAUTION -- do not undertake this lightly!!\\\\nIf you have backed up your system and\\\\nare prepared to face the consequences of\\\\nthe requested internalization of sources,\\\\nhit Yes.  If you have any doubts, hit No\\\\nto back out with no harm done.'.\\\\n\\\\n\\\\t(reply ==  true) ifFalse:\\\\n\\\\t\\\\t[^ self inform: 'Okay - abandoned'].\\\\n\\\\n\\\\taName _ SmalltalkImage current sourcesName.\\\\n\\\\t(aFile _ SourceFiles first) == nil ifTrue:\\\\n\\\\t\\\\t[(FileDirectory default fileExists: aName)\\\\n\\\\t\\\\t\\\\tifFalse: [^ self halt: 'Cannot locate ', aName, ' so cannot proceed.'].\\\\n\\\\t\\\\taFile _ FileStream readOnlyFileNamed: aName].\\\\n\\\\tSourceFiles at: 1 put: (ReadWriteStream with: aFile contentsOfEntireFile).\\\\n\\\\n\\\\taName _ SmalltalkImage current changesName.\\\\n\\\\t(aFile _ SourceFiles last) == nil ifTrue:\\\\n\\\\t\\\\t[(FileDirectory default fileExists: aName)\\\\n\\\\t\\\\t\\\\tifFalse: [^ self halt: 'Cannot locate ', aName, ' so cannot proceed.'].\\\\n\\\\t\\\\taFile _ FileStream readOnlyFileNamed: aName].\\\\n\\\\tSourceFiles at: 2 put: (ReadWriteStream with: aFile contentsOfEntireFile).\\\\n\\\\n\\\\tself inform: 'Okay, sources internalized'! !\\\\n\\\\n!SystemDictionary methodsFor: 'sources, change log' stamp: 'sw 2/3/2000 15:59'!\\\\nrecover: nCharacters\\\\n\\\\t\\\\\\\"Schedule an editable text view on the last n characters of changes.\\\\\\\"\\\\n\\\\tself writeRecentCharacters: nCharacters toFileNamed: 'st80.recent'! !\\\\n\\\\n!SystemDictionary methodsFor: 'sources, change log' stamp: 'md 5/16/2006 12:34'!\\\\nversion\\\\n\\\\t\\\\\\\"Answer the version of this release.\\\\\\\"\\\\n\\\\n\\\\t^SystemVersion current version! !\\\\n\\\\n!SystemDictionary methodsFor: 'sources, change log' stamp: 'JMM 4/13/2005 20:35'!\\\\nwordSize\\\\n\\\\t\\\\\\\"Answer the size (in bytes) of an object pointer.\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk wordSize\\\\\\\"\\\\n\\\\n\\\\t^[SmalltalkImage current vmParameterAt: 40] on: Error do: [4]! !\\\\n\\\\n!SystemDictionary methodsFor: 'sources, change log' stamp: 'nk 8/21/2004 15:55'!\\\\nwriteRecentCharacters: nCharacters toFileNamed: aFilename\\\\n\\\\t\\\\\\\"Schedule an editable text view on the last n characters of changes.\\\\\\\"\\\\n\\\\t| changes |\\\\n\\\\tchanges _ SourceFiles at: 2.\\\\n\\\\tchanges setToEnd; skip: nCharacters negated.\\\\n\\\\t(StandardFileStream newFileNamed: aFilename) nextPutAll: (changes next: nCharacters); close; open; edit! !\\\\n\\\\n!SystemDictionary methodsFor: 'sources, change log' stamp: 'ar 9/27/2005 22:38'!\\\\nwriteRecentToFile\\\\n\\\\t\\\\\\\"Smalltalk writeRecentToFile\\\\\\\"\\\\n\\\\t| numChars aDirectory aFileName |\\\\n\\\\taDirectory := FileDirectory default.\\\\n\\\\taFileName := Utilities\\\\n\\\\t\\\\t\\\\t\\\\tkeyLike: 'squeak-recent.01'\\\\n\\\\t\\\\t\\\\t\\\\twithTrailing: '.log'\\\\n\\\\t\\\\t\\\\t\\\\tsatisfying: [:aKey | (aDirectory includesKey: aKey) not].\\\\n\\\\tnumChars := ChangeSet getRecentLocatorWithPrompt: 'copy logged source as far back as...'.\\\\n\\\\tnumChars\\\\n\\\\t\\\\tifNotNil: [self writeRecentCharacters: numChars toFileNamed: aFileName]! !\\\\n\\\\n\\\\n!SystemDictionary methodsFor: 'special objects' stamp: 'JMM 6/6/2000 20:36'!\\\\nclearExternalObjects\\\\n\\\\t\\\\\\\"Clear the array of objects that have been registered for use in non-Smalltalk code.\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk clearExternalObjects\\\\\\\"\\\\n\\\\n\\\\tExternalSemaphoreTable clearExternalObjects\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'special objects' stamp: 'sd 9/29/2004 18:30'!\\\\ncompactClassesArray\\\\n\\\\t\\\\\\\"Smalltalk compactClassesArray\\\\\\\"\\\\n\\\\t\\\\\\\"Return the array of 31 classes whose instances may be\\\\n\\\\trepresented compactly\\\\\\\"\\\\n\\\\t^ self specialObjectsArray at: 29! !\\\\n\\\\n!SystemDictionary methodsFor: 'special objects' stamp: 'JMM 6/6/2000 21:01'!\\\\nexternalObjects\\\\n\\\\t\\\\\\\"Return an array of objects that have been registered for use in non-Smalltalk code. Smalltalk objects should be referrenced by external code only via indirection through this array, thus allowing the objects to move during compaction. This array can be cleared when the VM re-starts, since variables in external code do not survive snapshots. Note that external code should not attempt to access a Smalltalk object, even via this mechanism, while garbage collection is in progress.\\\\\\\"\\\\n\\\\t\\\\\\\"Smalltalk externalObjects\\\\\\\"\\\\n\\\\n\\\\t^ ExternalSemaphoreTable externalObjects\\\\n! !\\\\n\\\\n!SystemDictionary methodsFor: 'special objects'!\\\\nhasSpecialSelector: aLiteral ifTrueSetByte: aBlock\\\\n\\\\n\\\\t1 to: self specialSelectorSize do:\\\\n\\\\t\\\\t[:index | \\\\n\\\\t\\\\t(self specialSelectorAt: index) == aLiteral\\\\n\\\\t\\\\t\\\\tifTrue: [aBlock value: index + 16rAF. ^true]].\\\\n\\\\t^false! !\\\\n\\\\n!SystemDictionary methodsFor: 'special objects' stamp: 'dtl 10/3/2005 05:56'!\\\\nrecreateSpecialObjectsArray\\\\n\\\\t\\\\\\\"Smalltalk recreateSpecialObjectsArray\\\\\\\"\\\\n\\\\t\\\\\\\"The Special Objects Array is an array of object pointers used\\\\n\\\\tby the\\\\n\\\\tSqueak virtual machine. Its contents are critical and\\\\n\\\\tunchecked, so don't even think of playing here unless you\\\\n\\\\tknow what you are doing.\\\\\\\"\\\\n\\\\t| newArray |\\\\n\\\\tnewArray := Array new: 50.\\\\n\\\\t\\\\\\\"Nil false and true get used throughout the interpreter\\\\\\\"\\\\n\\\\tnewArray at: 1 put: nil.\\\\n\\\\tnewArray at: 2 put: false.\\\\n\\\\tnewArray at: 3 put: true.\\\\n\\\\t\\\\\\\"This association holds the active process (a ProcessScheduler)\\\\\\\"\\\\n\\\\tnewArray\\\\n\\\\t\\\\tat: 4\\\\n\\\\t\\\\tput: (self associationAt: #Processor).\\\\n\\\\t\\\\\\\"Numerous classes below used for type checking and\\\\n\\\\tinstantiation\\\\\\\"\\\\n\\\\tnewArray at: 5 put: Bitmap.\\\\n\\\\tnewArray at: 6 put: SmallInteger.\\\\n\\\\tnewArray at: 7 put: ByteString.\\\\n\\\\tnewArray at: 8 put: Array.\\\\n\\\\tnewArray at: 9 put: Smalltalk.\\\\n\\\\tnewArray at: 10 put: Float.\\\\n\\\\tnewArray at: 11 put: MethodContext.\\\\n\\\\tnewArray at: 12 put: BlockContext.\\\\n\\\\tnewArray at: 13 put: Point.\\\\n\\\\tnewArray at: 14 put: LargePositiveInteger.\\\\n\\\\tnewArray at: 15 put: Display.\\\\n\\\\tnewArray at: 16 put: Message.\\\\n\\\\tnewArray at: 17 put: CompiledMethod.\\\\n\\\\tnewArray\\\\n\\\\t\\\\tat: 18\\\\n\\\\t\\\\tput: (self specialObjectsArray at: 18).\\\\n\\\\t\\\\\\\"(low space Semaphore)\\\\\\\"\\\\n\\\\tnewArray at: 19 put: Semaphore.\\\\n\\\\tnewArray at: 20 put: Character.\\\\n\\\\tnewArray at: 21 put: #doesNotUnderstand:.\\\\n\\\\tnewArray at: 22 put: #cannotReturn:.\\\\n\\\\t\\\\\\\"The process that signaled the low space semaphore.\\\\\\\"\\\\n\\\\tnewArray at: 23 put: nil.\\\\n\\\\t\\\\\\\"An array of the 32 selectors that are compiled as special\\\\n\\\\tbytecodes, paired alternately with the number of arguments\\\\n\\\\teach takes.\\\\\\\"\\\\n\\\\tnewArray at: 24 put: #(#+ 1 #- 1 #< 1 \\\";\\n            r = \\\"{13490630, 1448950}\\\";\\n            s = 1;\\n        }\\n    );\\n    r = \\\"{0, 17583493}\\\";\\n    s = 0;\\n}\";\n\t\t\tsepNavIntBoundsRect = \"{{0, 0}, {3988, 3.06823e+06}}\";\n\t\t\tsepNavSelRange = \"{1340, 0}\";\n\t\t\tsepNavVisRange = \"{0, 2724}\";\n\t\t};\n\t};\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/SqueakPureObjcCogVM.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 45;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t040F20C212CE0FFB008BA0CB /* UnixOSProcessPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 040F20C112CE0FFB008BA0CB /* UnixOSProcessPlugin.c */; };\n\t\t040F20C812CE1057008BA0CB /* Squeak3D.c in Sources */ = {isa = PBXBuildFile; fileRef = 040F20C712CE1057008BA0CB /* Squeak3D.c */; };\n\t\t040F20CB12CE10AC008BA0CB /* ClipboardExtendedPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 040F20CA12CE10AC008BA0CB /* ClipboardExtendedPlugin.c */; };\n\t\t040F20E312CE1283008BA0CB /* ObjectiveCPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 040F20E212CE1283008BA0CB /* ObjectiveCPlugin.c */; };\n\t\t040F22DB12CE1517008BA0CB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 040F22DA12CE1517008BA0CB /* Foundation.framework */; };\n\t\t040F22E412CE155C008BA0CB /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 040F22E312CE155C008BA0CB /* OpenGL.framework */; };\n\t\t040F22FC12CE1752008BA0CB /* SoundPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 040F22FB12CE1752008BA0CB /* SoundPlugin.c */; };\n\t\t040F230712CE1AE2008BA0CB /* SqueakFFIPrims.c in Sources */ = {isa = PBXBuildFile; fileRef = 040F230612CE1AE2008BA0CB /* SqueakFFIPrims.c */; };\n\t\t040F230E12CE1B28008BA0CB /* HostWindowPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 040F230D12CE1B28008BA0CB /* HostWindowPlugin.c */; };\n\t\t1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; };\n\t\t28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; };\n\t\t9402DD7110CE0E91005C2102 /* SqViewClut.m in Sources */ = {isa = PBXBuildFile; fileRef = 9402DD6F10CE0E91005C2102 /* SqViewClut.m */; };\n\t\t9402F2B00F3F9BB900F3D637 /* PDColoredProgressView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9402F2AF0F3F9BB900F3D637 /* PDColoredProgressView.m */; };\n\t\t9402F2C60F3F9C5600F3D637 /* drawing.m in Sources */ = {isa = PBXBuildFile; fileRef = 9402F2C50F3F9C5600F3D637 /* drawing.m */; };\n\t\t9412CAB30E6C037B00DB8625 /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 9412CAB20E6C037B00DB8625 /* Settings.bundle */; };\n\t\t9412CAE60E6C05EC00DB8625 /* sqSqueakInfoPlistInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = 9412CAE50E6C05EC00DB8625 /* sqSqueakInfoPlistInterface.m */; };\n\t\t9414422610BC89440088F8AC /* Squeak.icns in Resources */ = {isa = PBXBuildFile; fileRef = 9414421E10BC89440088F8AC /* Squeak.icns */; };\n\t\t9414422710BC89440088F8AC /* SqueakChanges.icns in Resources */ = {isa = PBXBuildFile; fileRef = 9414421F10BC89440088F8AC /* SqueakChanges.icns */; };\n\t\t9414422810BC89440088F8AC /* SqueakGeneric.icns in Resources */ = {isa = PBXBuildFile; fileRef = 9414422010BC89440088F8AC /* SqueakGeneric.icns */; };\n\t\t9414422910BC89440088F8AC /* SqueakImage.icns in Resources */ = {isa = PBXBuildFile; fileRef = 9414422110BC89440088F8AC /* SqueakImage.icns */; };\n\t\t9414422A10BC89440088F8AC /* SqueakPlugin.icns in Resources */ = {isa = PBXBuildFile; fileRef = 9414422210BC89440088F8AC /* SqueakPlugin.icns */; };\n\t\t9414422B10BC89440088F8AC /* SqueakProject.icns in Resources */ = {isa = PBXBuildFile; fileRef = 9414422310BC89440088F8AC /* SqueakProject.icns */; };\n\t\t9414422C10BC89440088F8AC /* SqueakScript.icns in Resources */ = {isa = PBXBuildFile; fileRef = 9414422410BC89440088F8AC /* SqueakScript.icns */; };\n\t\t9414422D10BC89440088F8AC /* SqueakSources.icns in Resources */ = {isa = PBXBuildFile; fileRef = 9414422510BC89440088F8AC /* SqueakSources.icns */; };\n\t\t941724440F36624C0031AF33 /* squeakProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = 941724420F36624C0031AF33 /* squeakProxy.m */; };\n\t\t941D1C9B0E696FC7005B77B3 /* Entitlements.plist in Resources */ = {isa = PBXBuildFile; fileRef = 941D1C9A0E696FC7005B77B3 /* Entitlements.plist */; };\n\t\t9424FF620DDCB1C7009912BF /* sqNamedPrims.c in Sources */ = {isa = PBXBuildFile; fileRef = 9424FF5E0DDCB1C7009912BF /* sqNamedPrims.c */; };\n\t\t9424FF6B0DDCB202009912BF /* sqMacV2Memory.c in Sources */ = {isa = PBXBuildFile; fileRef = 9424FF670DDCB202009912BF /* sqMacV2Memory.c */; };\n\t\t9424FF730DDCB234009912BF /* macintoshextra.c in Sources */ = {isa = PBXBuildFile; fileRef = 9424FF710DDCB234009912BF /* macintoshextra.c */; };\n\t\t9424FF760DDCB271009912BF /* osExports.c in Sources */ = {isa = PBXBuildFile; fileRef = 9424FF750DDCB271009912BF /* osExports.c */; };\n\t\t9427E45612628749002DCA6D /* Squeak72x72.png in Resources */ = {isa = PBXBuildFile; fileRef = 9427E45512628749002DCA6D /* Squeak72x72.png */; };\n\t\t9428BA9710BB440800DAD287 /* sqSqueakOSXClipboardAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 9428BA9610BB440800DAD287 /* sqSqueakOSXClipboardAPI.m */; };\n\t\t9428BB0610BB478600DAD287 /* sqSqueakOSXApplication+clipboard.m in Sources */ = {isa = PBXBuildFile; fileRef = 9428BB0510BB478600DAD287 /* sqSqueakOSXApplication+clipboard.m */; };\n\t\t942ABE6F10AA23E20086D908 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 942ABE6E10AA23E20086D908 /* ApplicationServices.framework */; };\n\t\t942F48FE123C1C0C002B05DF /* SqueakUIViewCALayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 942F48FB123C1C0C002B05DF /* SqueakUIViewCALayer.m */; };\n\t\t942F48FF123C1C0C002B05DF /* SqueakUIViewOpenGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 942F48FD123C1C0C002B05DF /* SqueakUIViewOpenGL.m */; };\n\t\t942F75D30E0B67AD00848BF2 /* sqSqueakVmAndImagePathAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 942F75D20E0B67AD00848BF2 /* sqSqueakVmAndImagePathAPI.m */; };\n\t\t942F76320E0B6C7600848BF2 /* sqSqueakMainApplication+attributes.m in Sources */ = {isa = PBXBuildFile; fileRef = 942F76310E0B6C7600848BF2 /* sqSqueakMainApplication+attributes.m */; };\n\t\t943B9B2A1235BDD20056205E /* sqMacHostWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 943B9B281235BDD20056205E /* sqMacHostWindow.m */; };\n\t\t944069CF10E6B63200353B27 /* MacMenubarPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 944069CD10E6B63200353B27 /* MacMenubarPlugin.c */; };\n\t\t9452D5E50E044A9D000AD792 /* Queue.m in Sources */ = {isa = PBXBuildFile; fileRef = 9452D5D80E044A9D000AD792 /* Queue.m */; };\n\t\t9452D5E60E044A9D000AD792 /* sqMacV2Time.c in Sources */ = {isa = PBXBuildFile; fileRef = 9452D5D90E044A9D000AD792 /* sqMacV2Time.c */; };\n\t\t9452D5E70E044A9D000AD792 /* sqSqueakFileDirectoryAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 9452D5DC0E044A9D000AD792 /* sqSqueakFileDirectoryAPI.m */; };\n\t\t9452D5E80E044A9D000AD792 /* sqSqueakFileDirectoryInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = 9452D5DE0E044A9D000AD792 /* sqSqueakFileDirectoryInterface.m */; };\n\t\t9452D5E90E044A9D000AD792 /* sqSqueakMainApp.m in Sources */ = {isa = PBXBuildFile; fileRef = 9452D5DF0E044A9D000AD792 /* sqSqueakMainApp.m */; };\n\t\t9452D5EA0E044A9D000AD792 /* sqSqueakMainApplication+vmAndImagePath.m in Sources */ = {isa = PBXBuildFile; fileRef = 9452D5E20E044A9D000AD792 /* sqSqueakMainApplication+vmAndImagePath.m */; };\n\t\t9452D5EB0E044A9D000AD792 /* sqSqueakMainApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = 9452D5E40E044A9D000AD792 /* sqSqueakMainApplication.m */; };\n\t\t9452D6030E044CB3000AD792 /* sqSqueakAttributesAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 9452D6020E044CB3000AD792 /* sqSqueakAttributesAPI.m */; };\n\t\t9452D6080E044D2F000AD792 /* sqSqueakEventsAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 9452D6070E044D2F000AD792 /* sqSqueakEventsAPI.m */; };\n\t\t945550010DF1BC6A00FB176B /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 945550000DF1BC6A00FB176B /* AudioToolbox.framework */; };\n\t\t94577FBD10684D5E0020840A /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94577FBC10684D5E0020840A /* CoreAudio.framework */; };\n\t\t94577FBF10684D5E0020840A /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94577FBE10684D5E0020840A /* CoreLocation.framework */; };\n\t\t94577FC510684D7E0020840A /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94577FC410684D7E0020840A /* SystemConfiguration.framework */; };\n\t\t94584FDC10F02378001401E7 /* sqMacExtendedClipboard.m in Sources */ = {isa = PBXBuildFile; fileRef = 94584FD910F02378001401E7 /* sqMacExtendedClipboard.m */; };\n\t\t945851F010F03E60001401E7 /* sqMacExtendedClipboard.m in Sources */ = {isa = PBXBuildFile; fileRef = 945851EF10F03E60001401E7 /* sqMacExtendedClipboard.m */; };\n\t\t9458525610F04339001401E7 /* sqSqueakIPhoneClipboardAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 9458525510F04339001401E7 /* sqSqueakIPhoneClipboardAPI.m */; };\n\t\t9458525C10F043EB001401E7 /* sqSqueakIPhoneApplication+clipboard.m in Sources */ = {isa = PBXBuildFile; fileRef = 9458525B10F043EB001401E7 /* sqSqueakIPhoneApplication+clipboard.m */; };\n\t\t9463943F0E95845000015851 /* squeakSUnitTester.m in Sources */ = {isa = PBXBuildFile; fileRef = 9463943E0E95845000015851 /* squeakSUnitTester.m */; };\n\t\t946DA8D310C0C30D00F26F56 /* DropPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 946DA8D210C0C30D00F26F56 /* DropPlugin.c */; };\n\t\t946DA91510C0C71100F26F56 /* sqSqueakOSXDropAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 946DA91410C0C71100F26F56 /* sqSqueakOSXDropAPI.m */; };\n\t\t946DAA0010C0D35500F26F56 /* sqMacUnixExternalPrims.m in Sources */ = {isa = PBXBuildFile; fileRef = 946DA9FF10C0D35500F26F56 /* sqMacUnixExternalPrims.m */; };\n\t\t9471D2730E04703B00703D45 /* sqSqueakScreenAndWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 9471D2720E04703B00703D45 /* sqSqueakScreenAndWindow.m */; };\n\t\t9471D2E10E04743F00703D45 /* sqSqueakAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9471D2E00E04743F00703D45 /* sqSqueakAppDelegate.m */; };\n\t\t9478E0340EC8D98F007096A7 /* sqSqueakSoundCoreAudioAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 9478E0330EC8D98F007096A7 /* sqSqueakSoundCoreAudioAPI.m */; };\n\t\t9478E0600EC8DCFB007096A7 /* sqSqueakSoundCoreAudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 9478E05F0EC8DCFB007096A7 /* sqSqueakSoundCoreAudio.m */; };\n\t\t947E627510AA098300D3B69E /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; };\n\t\t947E627610AA098300D3B69E /* sqNamedPrims.c in Sources */ = {isa = PBXBuildFile; fileRef = 9424FF5E0DDCB1C7009912BF /* sqNamedPrims.c */; };\n\t\t947E627710AA098300D3B69E /* sqMacV2Memory.c in Sources */ = {isa = PBXBuildFile; fileRef = 9424FF670DDCB202009912BF /* sqMacV2Memory.c */; };\n\t\t947E627910AA098300D3B69E /* osExports.c in Sources */ = {isa = PBXBuildFile; fileRef = 9424FF750DDCB271009912BF /* osExports.c */; };\n\t\t947E627A10AA098300D3B69E /* sqSqueakScreenAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 94A3488D0DDCCCC700D1D4A9 /* sqSqueakScreenAPI.m */; };\n\t\t947E627B10AA098300D3B69E /* ADPCMCodecPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E658E40DDD03FE00358328 /* ADPCMCodecPlugin.c */; };\n\t\t947E627C10AA098300D3B69E /* B2DPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E658E60DDD03FE00358328 /* B2DPlugin.c */; };\n\t\t947E627D10AA098300D3B69E /* BitBltPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E658EA0DDD03FE00358328 /* BitBltPlugin.c */; };\n\t\t947E627E10AA098300D3B69E /* BMPReadWriterPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E658EC0DDD03FE00358328 /* BMPReadWriterPlugin.c */; };\n\t\t947E627F10AA098300D3B69E /* DSAPrims.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E658F00DDD03FE00358328 /* DSAPrims.c */; };\n\t\t947E628010AA098300D3B69E /* FFTPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E658F20DDD03FE00358328 /* FFTPlugin.c */; };\n\t\t947E628110AA098300D3B69E /* FilePlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E658F40DDD03FE00358328 /* FilePlugin.c */; };\n\t\t947E628210AA098300D3B69E /* FloatArrayPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E658F60DDD03FE00358328 /* FloatArrayPlugin.c */; };\n\t\t947E628310AA098300D3B69E /* GeniePlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E658F80DDD03FE00358328 /* GeniePlugin.c */; };\n\t\t947E628510AA098300D3B69E /* JPEGReaderPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E658FE0DDD03FE00358328 /* JPEGReaderPlugin.c */; };\n\t\t947E628610AA098300D3B69E /* JPEGReadWriter2Plugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659000DDD03FE00358328 /* JPEGReadWriter2Plugin.c */; };\n\t\t947E628710AA098300D3B69E /* Klatt.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659020DDD03FE00358328 /* Klatt.c */; };\n\t\t947E628810AA098300D3B69E /* LargeIntegers.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659040DDD03FE00358328 /* LargeIntegers.c */; };\n\t\t947E628910AA098300D3B69E /* Matrix2x3Plugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659060DDD03FE00358328 /* Matrix2x3Plugin.c */; };\n\t\t947E628A10AA098300D3B69E /* MiscPrimitivePlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6590A0DDD03FE00358328 /* MiscPrimitivePlugin.c */; };\n\t\t947E628B10AA098300D3B69E /* RePlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6590C0DDD03FE00358328 /* RePlugin.c */; };\n\t\t947E628C10AA098300D3B69E /* SecurityPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6590E0DDD03FE00358328 /* SecurityPlugin.c */; };\n\t\t947E628D10AA098300D3B69E /* SoundCodecPrims.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659120DDD03FE00358328 /* SoundCodecPrims.c */; };\n\t\t947E628E10AA098300D3B69E /* SoundGenerationPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659140DDD03FE00358328 /* SoundGenerationPlugin.c */; };\n\t\t947E629110AA098300D3B69E /* StarSqueakPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6591A0DDD03FE00358328 /* StarSqueakPlugin.c */; };\n\t\t947E629210AA098300D3B69E /* UUIDPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6591D0DDD03FE00358328 /* UUIDPlugin.c */; };\n\t\t947E629310AA098300D3B69E /* ZipPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6591F0DDD03FE00358328 /* ZipPlugin.c */; };\n\t\t947E629410AA098300D3B69E /* sqFilePluginBasicPrims.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659460DDD04FA00358328 /* sqFilePluginBasicPrims.c */; };\n\t\t947E629510AA098300D3B69E /* SurfacePlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659490DDD053900358328 /* SurfacePlugin.c */; };\n\t\t947E629610AA098300D3B69E /* Error.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659520DDD053900358328 /* Error.c */; };\n\t\t947E629710AA098300D3B69E /* jcapimin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659530DDD053900358328 /* jcapimin.c */; };\n\t\t947E629810AA098300D3B69E /* jcapistd.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659540DDD053900358328 /* jcapistd.c */; };\n\t\t947E629910AA098300D3B69E /* jccoefct.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659550DDD053900358328 /* jccoefct.c */; };\n\t\t947E629A10AA098300D3B69E /* jccolor.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659560DDD053900358328 /* jccolor.c */; };\n\t\t947E629B10AA098300D3B69E /* jcdctmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659570DDD053900358328 /* jcdctmgr.c */; };\n\t\t947E629C10AA098300D3B69E /* jchuff.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659580DDD053900358328 /* jchuff.c */; };\n\t\t947E629D10AA098300D3B69E /* jcinit.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6595A0DDD053900358328 /* jcinit.c */; };\n\t\t947E629E10AA098300D3B69E /* jcmainct.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6595B0DDD053900358328 /* jcmainct.c */; };\n\t\t947E629F10AA098300D3B69E /* jcmarker.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6595C0DDD053900358328 /* jcmarker.c */; };\n\t\t947E62A010AA098300D3B69E /* jcmaster.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6595D0DDD053900358328 /* jcmaster.c */; };\n\t\t947E62A110AA098300D3B69E /* jcomapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6595E0DDD053900358328 /* jcomapi.c */; };\n\t\t947E62A210AA098300D3B69E /* jcparam.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659600DDD053900358328 /* jcparam.c */; };\n\t\t947E62A310AA098300D3B69E /* jcphuff.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659610DDD053900358328 /* jcphuff.c */; };\n\t\t947E62A410AA098300D3B69E /* jcprepct.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659620DDD053900358328 /* jcprepct.c */; };\n\t\t947E62A510AA098300D3B69E /* jcsample.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659630DDD053900358328 /* jcsample.c */; };\n\t\t947E62A610AA098300D3B69E /* jctrans.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659640DDD053900358328 /* jctrans.c */; };\n\t\t947E62A710AA098300D3B69E /* jdapimin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659650DDD053900358328 /* jdapimin.c */; };\n\t\t947E62A810AA098300D3B69E /* jdapistd.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659660DDD053900358328 /* jdapistd.c */; };\n\t\t947E62A910AA098300D3B69E /* jdatadst.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659670DDD053900358328 /* jdatadst.c */; };\n\t\t947E62AA10AA098300D3B69E /* jdatasrc.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659680DDD053900358328 /* jdatasrc.c */; };\n\t\t947E62AB10AA098300D3B69E /* jdcoefct.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659690DDD053900358328 /* jdcoefct.c */; };\n\t\t947E62AC10AA098300D3B69E /* jdcolor.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6596A0DDD053900358328 /* jdcolor.c */; };\n\t\t947E62AD10AA098300D3B69E /* jddctmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6596C0DDD053900358328 /* jddctmgr.c */; };\n\t\t947E62AE10AA098300D3B69E /* jdhuff.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6596D0DDD053900358328 /* jdhuff.c */; };\n\t\t947E62AF10AA098300D3B69E /* jdinput.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6596F0DDD053900358328 /* jdinput.c */; };\n\t\t947E62B010AA098300D3B69E /* jdmainct.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659700DDD053900358328 /* jdmainct.c */; };\n\t\t947E62B110AA098300D3B69E /* jdmarker.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659710DDD053900358328 /* jdmarker.c */; };\n\t\t947E62B210AA098300D3B69E /* jdmaster.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659720DDD053900358328 /* jdmaster.c */; };\n\t\t947E62B310AA098300D3B69E /* jdmerge.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659730DDD053900358328 /* jdmerge.c */; };\n\t\t947E62B410AA098300D3B69E /* jdphuff.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659740DDD053900358328 /* jdphuff.c */; };\n\t\t947E62B510AA098300D3B69E /* jdpostct.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659750DDD053900358328 /* jdpostct.c */; };\n\t\t947E62B610AA098300D3B69E /* jdsample.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659760DDD053900358328 /* jdsample.c */; };\n\t\t947E62B710AA098300D3B69E /* jdtrans.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659770DDD053900358328 /* jdtrans.c */; };\n\t\t947E62B810AA098300D3B69E /* jerror.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659780DDD053900358328 /* jerror.c */; };\n\t\t947E62B910AA098300D3B69E /* jfdctflt.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6597A0DDD053900358328 /* jfdctflt.c */; };\n\t\t947E62BA10AA098300D3B69E /* jfdctfst.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6597B0DDD053900358328 /* jfdctfst.c */; };\n\t\t947E62BB10AA098300D3B69E /* jfdctint.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6597C0DDD053900358328 /* jfdctint.c */; };\n\t\t947E62BC10AA098300D3B69E /* jidctflt.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6597D0DDD053900358328 /* jidctflt.c */; };\n\t\t947E62BD10AA098300D3B69E /* jidctfst.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6597E0DDD053900358328 /* jidctfst.c */; };\n\t\t947E62BE10AA098300D3B69E /* jidctint.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6597F0DDD053900358328 /* jidctint.c */; };\n\t\t947E62BF10AA098300D3B69E /* jidctred.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659800DDD053900358328 /* jidctred.c */; };\n\t\t947E62C010AA098300D3B69E /* jmemdatadst.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659820DDD053900358328 /* jmemdatadst.c */; };\n\t\t947E62C110AA098300D3B69E /* jmemdatasrc.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659830DDD053900358328 /* jmemdatasrc.c */; };\n\t\t947E62C210AA098300D3B69E /* jmemmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659840DDD053900358328 /* jmemmgr.c */; };\n\t\t947E62C310AA098300D3B69E /* jmemnobs.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659850DDD053900358328 /* jmemnobs.c */; };\n\t\t947E62C410AA098300D3B69E /* jquant1.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6598B0DDD053900358328 /* jquant1.c */; };\n\t\t947E62C510AA098300D3B69E /* jquant2.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6598C0DDD053900358328 /* jquant2.c */; };\n\t\t947E62C610AA098300D3B69E /* jutils.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6598D0DDD053900358328 /* jutils.c */; };\n\t\t947E62C710AA098300D3B69E /* b3dAlloc.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659980DDD053900358328 /* b3dAlloc.c */; };\n\t\t947E62C810AA098300D3B69E /* b3dDraw.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6599A0DDD053900358328 /* b3dDraw.c */; };\n\t\t947E62C910AA098300D3B69E /* b3dInit.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6599B0DDD053900358328 /* b3dInit.c */; };\n\t\t947E62CA10AA098300D3B69E /* b3dMain.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6599C0DDD053900358328 /* b3dMain.c */; };\n\t\t947E62CB10AA098300D3B69E /* b3dRemap.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6599D0DDD053900358328 /* b3dRemap.c */; };\n\t\t947E62CC10AA098300D3B69E /* sqSoundCodecPluginBasicPrims.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659A40DDD053900358328 /* sqSoundCodecPluginBasicPrims.c */; };\n\t\t947E62CD10AA098300D3B69E /* chartables.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E65A290DDD053900358328 /* chartables.c */; };\n\t\t947E62CE10AA098300D3B69E /* get.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E65A2B0DDD053900358328 /* get.c */; };\n\t\t947E62CF10AA098300D3B69E /* pcre.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E65A2E0DDD053900358328 /* pcre.c */; };\n\t\t947E62D010AA098300D3B69E /* study.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E65A340DDD053900358328 /* study.c */; };\n\t\t947E62D110AA098300D3B69E /* sqUnixUUID.c in Sources */ = {isa = PBXBuildFile; fileRef = 94BCE7870DDDF61200F38F31 /* sqUnixUUID.c */; };\n\t\t947E62D210AA098300D3B69E /* sqSqueakMainApplication+imageReadWrite.m in Sources */ = {isa = PBXBuildFile; fileRef = 94A0E8840DE5EF430071C8B9 /* sqSqueakMainApplication+imageReadWrite.m */; };\n\t\t947E62D310AA098300D3B69E /* sqSqueakMainApplication+screen.m in Sources */ = {isa = PBXBuildFile; fileRef = 94A0E9830DE5F1FE0071C8B9 /* sqSqueakMainApplication+screen.m */; };\n\t\t947E62D510AA098300D3B69E /* sqVirtualMachine.c in Sources */ = {isa = PBXBuildFile; fileRef = 9424FF600DDCB1C7009912BF /* sqVirtualMachine.c */; };\n\t\t947E62D610AA098300D3B69E /* Queue.m in Sources */ = {isa = PBXBuildFile; fileRef = 9452D5D80E044A9D000AD792 /* Queue.m */; };\n\t\t947E62D710AA098300D3B69E /* sqMacV2Time.c in Sources */ = {isa = PBXBuildFile; fileRef = 9452D5D90E044A9D000AD792 /* sqMacV2Time.c */; };\n\t\t947E62D810AA098300D3B69E /* sqSqueakFileDirectoryAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 9452D5DC0E044A9D000AD792 /* sqSqueakFileDirectoryAPI.m */; };\n\t\t947E62D910AA098300D3B69E /* sqSqueakFileDirectoryInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = 9452D5DE0E044A9D000AD792 /* sqSqueakFileDirectoryInterface.m */; };\n\t\t947E62DA10AA098300D3B69E /* sqSqueakMainApp.m in Sources */ = {isa = PBXBuildFile; fileRef = 9452D5DF0E044A9D000AD792 /* sqSqueakMainApp.m */; };\n\t\t947E62DB10AA098300D3B69E /* sqSqueakMainApplication+vmAndImagePath.m in Sources */ = {isa = PBXBuildFile; fileRef = 9452D5E20E044A9D000AD792 /* sqSqueakMainApplication+vmAndImagePath.m */; };\n\t\t947E62DC10AA098300D3B69E /* sqSqueakMainApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = 9452D5E40E044A9D000AD792 /* sqSqueakMainApplication.m */; };\n\t\t947E62DD10AA098300D3B69E /* sqSqueakAttributesAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 9452D6020E044CB3000AD792 /* sqSqueakAttributesAPI.m */; };\n\t\t947E62DE10AA098300D3B69E /* sqSqueakEventsAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 9452D6070E044D2F000AD792 /* sqSqueakEventsAPI.m */; };\n\t\t947E62DF10AA098300D3B69E /* sqSqueakScreenAndWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 9471D2720E04703B00703D45 /* sqSqueakScreenAndWindow.m */; };\n\t\t947E62E010AA098300D3B69E /* sqSqueakAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9471D2E00E04743F00703D45 /* sqSqueakAppDelegate.m */; };\n\t\t947E62E110AA098300D3B69E /* sqSqueakVmAndImagePathAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 942F75D20E0B67AD00848BF2 /* sqSqueakVmAndImagePathAPI.m */; };\n\t\t947E62E210AA098300D3B69E /* sqSqueakMainApplication+attributes.m in Sources */ = {isa = PBXBuildFile; fileRef = 942F76310E0B6C7600848BF2 /* sqSqueakMainApplication+attributes.m */; };\n\t\t947E62E310AA098300D3B69E /* SocketPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659100DDD03FE00358328 /* SocketPlugin.c */; };\n\t\t947E62E410AA098300D3B69E /* sqUnixSocket.c in Sources */ = {isa = PBXBuildFile; fileRef = 94883B400E0C2B9C005A4738 /* sqUnixSocket.c */; };\n\t\t947E62E510AA098300D3B69E /* sqSqueakMainApplication+events.m in Sources */ = {isa = PBXBuildFile; fileRef = 94A1B0060E0DBE2400EB5EFC /* sqSqueakMainApplication+events.m */; };\n\t\t947E62E610AA098300D3B69E /* sqSqueakSoundAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 94A1B02C0E0DC10D00EB5EFC /* sqSqueakSoundAPI.m */; };\n\t\t947E62E710AA098300D3B69E /* sqSqueakMainApplication+sound.m in Sources */ = {isa = PBXBuildFile; fileRef = 94A1B0310E0DC19300EB5EFC /* sqSqueakMainApplication+sound.m */; };\n\t\t947E62E810AA098300D3B69E /* sqSqueakInfoPlistInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = 9412CAE50E6C05EC00DB8625 /* sqSqueakInfoPlistInterface.m */; };\n\t\t947E62EA10AA098300D3B69E /* squeakSUnitTester.m in Sources */ = {isa = PBXBuildFile; fileRef = 9463943E0E95845000015851 /* squeakSUnitTester.m */; };\n\t\t947E62ED10AA098300D3B69E /* sqSqueakSoundCoreAudioAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 9478E0330EC8D98F007096A7 /* sqSqueakSoundCoreAudioAPI.m */; };\n\t\t947E62EE10AA098300D3B69E /* sqSqueakSoundCoreAudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 9478E05F0EC8DCFB007096A7 /* sqSqueakSoundCoreAudio.m */; };\n\t\t947E62EF10AA098300D3B69E /* squeakProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = 941724420F36624C0031AF33 /* squeakProxy.m */; };\n\t\t947E62F410AA098300D3B69E /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 945550000DF1BC6A00FB176B /* AudioToolbox.framework */; };\n\t\t947E62F510AA098300D3B69E /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94577FBC10684D5E0020840A /* CoreAudio.framework */; };\n\t\t947E62F710AA098300D3B69E /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94577FC410684D7E0020840A /* SystemConfiguration.framework */; };\n\t\t947E62FF10AA09C300D3B69E /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 947E61C210AA03C300D3B69E /* Cocoa.framework */; };\n\t\t947E632410AA0B4E00D3B69E /* dummyFFI.c in Sources */ = {isa = PBXBuildFile; fileRef = 947E21320EB2868A007957D0 /* dummyFFI.c */; };\n\t\t947E642D10AA0E9E00D3B69E /* sqMacV2Browser.m in Sources */ = {isa = PBXBuildFile; fileRef = 947E642810AA0E9E00D3B69E /* sqMacV2Browser.m */; };\n\t\t947E647B10AA100900D3B69E /* SqueakOSXAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 947E647A10AA100900D3B69E /* SqueakOSXAppDelegate.m */; };\n\t\t947E64AB10AA149F00D3B69E /* sqMacSecurity.c in Sources */ = {isa = PBXBuildFile; fileRef = 94BCEAF20DDE16B400F38F31 /* sqMacSecurity.c */; };\n\t\t947E64CC10AA16FE00D3B69E /* sqSqueakOSXApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = 947E64CB10AA16FE00D3B69E /* sqSqueakOSXApplication.m */; };\n\t\t947E64DE10AA18FE00D3B69E /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 947E64DC10AA18FE00D3B69E /* MainMenu.xib */; };\n\t\t9484F80210B0D81F0038BDC0 /* iPhone.image in Resources */ = {isa = PBXBuildFile; fileRef = 94A349B50DDCDBE200D1D4A9 /* iPhone.image */; };\n\t\t9484F80310B0D81F0038BDC0 /* iPhone.changes in Resources */ = {isa = PBXBuildFile; fileRef = 94638B260EAFB77B00A3F155 /* iPhone.changes */; };\n\t\t9484F8D410B0E04E0038BDC0 /* sqMacSecurity.c in Sources */ = {isa = PBXBuildFile; fileRef = 94BCEAF20DDE16B400F38F31 /* sqMacSecurity.c */; };\n\t\t9484F8DB10B0E09B0038BDC0 /* sqiPhoneScreenAndWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 9452D7640E0452D3000AD792 /* sqiPhoneScreenAndWindow.m */; };\n\t\t9484F8DC10B0E0C60038BDC0 /* sqSqueakIPhoneApplication+attributes.m in Sources */ = {isa = PBXBuildFile; fileRef = 94A0E8450DE5EB6E0071C8B9 /* sqSqueakIPhoneApplication+attributes.m */; };\n\t\t9484F8DD10B0E0C70038BDC0 /* sqSqueakIPhoneApplication+events.m in Sources */ = {isa = PBXBuildFile; fileRef = 94BCE93F0DDE044700F38F31 /* sqSqueakIPhoneApplication+events.m */; };\n\t\t9484F8DE10B0E0C90038BDC0 /* sqSqueakIPhoneApplication+imageReadWrite.m in Sources */ = {isa = PBXBuildFile; fileRef = 943001270E0D5D670040BB27 /* sqSqueakIPhoneApplication+imageReadWrite.m */; };\n\t\t9484F8DF10B0E0CB0038BDC0 /* sqSqueakIPhoneApplication+Network.m in Sources */ = {isa = PBXBuildFile; fileRef = 9452BDC20F4095DE006410DE /* sqSqueakIPhoneApplication+Network.m */; };\n\t\t9484F8E010B0E0CE0038BDC0 /* sqSqueakiPhoneApplication+sound.m in Sources */ = {isa = PBXBuildFile; fileRef = 94554F1E0DF1B65700FB176B /* sqSqueakiPhoneApplication+sound.m */; };\n\t\t9484F8E110B0E0CE0038BDC0 /* sqSqueakIPhoneApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = 942F761C0E0B6B6100848BF2 /* sqSqueakIPhoneApplication.m */; };\n\t\t9484F8E210B0E0D10038BDC0 /* sqSqueakIPhoneFileDirectoryInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = 943001A40E0D600C0040BB27 /* sqSqueakIPhoneFileDirectoryInterface.m */; };\n\t\t9484F8E310B0E0D30038BDC0 /* sqSqueakIPhoneInfoPlistInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = 94F879900E6C0C7E00662DEA /* sqSqueakIPhoneInfoPlistInterface.m */; };\n\t\t9484F8E510B0E0F00038BDC0 /* SqueakNoOGLIPhoneAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* SqueakNoOGLIPhoneAppDelegate.m */; };\n\t\t9484F8E610B0E0FD0038BDC0 /* SqueakUIController.m in Sources */ = {isa = PBXBuildFile; fileRef = 940CE8550DFCE2D200EBA91B /* SqueakUIController.m */; };\n\t\t9484F8E710B0E0FE0038BDC0 /* SqueakUIView.m in Sources */ = {isa = PBXBuildFile; fileRef = 949E5DB60DE3AB6A007388E0 /* SqueakUIView.m */; };\n\t\t9484F8EF10B0E1580038BDC0 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 945550910DF2041100FB176B /* Default.png */; };\n\t\t9484F91210B0E25B0038BDC0 /* dummyFFI.c in Sources */ = {isa = PBXBuildFile; fileRef = 947E21320EB2868A007957D0 /* dummyFFI.c */; };\n\t\t9484F9AF10B13DA50038BDC0 /* sqMacHostWindow.c in Sources */ = {isa = PBXBuildFile; fileRef = 94BCEA2B0DDE0C1600F38F31 /* sqMacHostWindow.c */; };\n\t\t94883B1C0E0C2937005A4738 /* SocketPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659100DDD03FE00358328 /* SocketPlugin.c */; };\n\t\t94883B410E0C2B9C005A4738 /* sqUnixSocket.c in Sources */ = {isa = PBXBuildFile; fileRef = 94883B400E0C2B9C005A4738 /* sqUnixSocket.c */; };\n\t\t948EC3901155312600B08A4F /* MainWindow-iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 948EC38F1155312600B08A4F /* MainWindow-iPad.xib */; };\n\t\t9492453110BA43AA00E726F5 /* SqueakOSXApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = 9492453010BA43AA00E726F5 /* SqueakOSXApplication.m */; };\n\t\t9494928411E5178D0019BC29 /* cogit.c in Sources */ = {isa = PBXBuildFile; fileRef = 9494927D11E5178D0019BC29 /* cogit.c */; };\n\t\t9494928511E5178D0019BC29 /* gcc3x-cointerp.c in Sources */ = {isa = PBXBuildFile; fileRef = 9494928011E5178D0019BC29 /* gcc3x-cointerp.c */; };\n\t\t949492C711E51C6B0019BC29 /* sqExternalSemaphores.c in Sources */ = {isa = PBXBuildFile; fileRef = 949492C311E51C6B0019BC29 /* sqExternalSemaphores.c */; };\n\t\t949492C811E51C6B0019BC29 /* sqHeapMap.c in Sources */ = {isa = PBXBuildFile; fileRef = 949492C511E51C6B0019BC29 /* sqHeapMap.c */; };\n\t\t949492C911E51C6B0019BC29 /* sqTicker.c in Sources */ = {isa = PBXBuildFile; fileRef = 949492C611E51C6B0019BC29 /* sqTicker.c */; };\n\t\t949492CA11E51C6B0019BC29 /* sqExternalSemaphores.c in Sources */ = {isa = PBXBuildFile; fileRef = 949492C311E51C6B0019BC29 /* sqExternalSemaphores.c */; };\n\t\t949492CB11E51C6B0019BC29 /* sqHeapMap.c in Sources */ = {isa = PBXBuildFile; fileRef = 949492C511E51C6B0019BC29 /* sqHeapMap.c */; };\n\t\t949492CC11E51C6B0019BC29 /* sqTicker.c in Sources */ = {isa = PBXBuildFile; fileRef = 949492C611E51C6B0019BC29 /* sqTicker.c */; };\n\t\t9494932F11E527180019BC29 /* sqUnixHeartbeat.c in Sources */ = {isa = PBXBuildFile; fileRef = 9494932C11E527180019BC29 /* sqUnixHeartbeat.c */; };\n\t\t9494933011E527180019BC29 /* sqUnixThreads.c in Sources */ = {isa = PBXBuildFile; fileRef = 9494932D11E527180019BC29 /* sqUnixThreads.c */; };\n\t\t9494933211E527180019BC29 /* sqUnixHeartbeat.c in Sources */ = {isa = PBXBuildFile; fileRef = 9494932C11E527180019BC29 /* sqUnixHeartbeat.c */; };\n\t\t9494933311E527180019BC29 /* sqUnixThreads.c in Sources */ = {isa = PBXBuildFile; fileRef = 9494932D11E527180019BC29 /* sqUnixThreads.c */; };\n\t\t9494933411E527180019BC29 /* sqUnixVMProfile.c in Sources */ = {isa = PBXBuildFile; fileRef = 9494932E11E527180019BC29 /* sqUnixVMProfile.c */; };\n\t\t949493C011E52ADE0019BC29 /* aio.c in Sources */ = {isa = PBXBuildFile; fileRef = 949493BF11E52ADE0019BC29 /* aio.c */; };\n\t\t949493C111E52ADE0019BC29 /* aio.c in Sources */ = {isa = PBXBuildFile; fileRef = 949493BF11E52ADE0019BC29 /* aio.c */; };\n\t\t94A0E8850DE5EF430071C8B9 /* sqSqueakMainApplication+imageReadWrite.m in Sources */ = {isa = PBXBuildFile; fileRef = 94A0E8840DE5EF430071C8B9 /* sqSqueakMainApplication+imageReadWrite.m */; };\n\t\t94A0E9840DE5F1FE0071C8B9 /* sqSqueakMainApplication+screen.m in Sources */ = {isa = PBXBuildFile; fileRef = 94A0E9830DE5F1FE0071C8B9 /* sqSqueakMainApplication+screen.m */; };\n\t\t94A1B0070E0DBE2400EB5EFC /* sqSqueakMainApplication+events.m in Sources */ = {isa = PBXBuildFile; fileRef = 94A1B0060E0DBE2400EB5EFC /* sqSqueakMainApplication+events.m */; };\n\t\t94A1B02D0E0DC10D00EB5EFC /* sqSqueakSoundAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 94A1B02C0E0DC10D00EB5EFC /* sqSqueakSoundAPI.m */; };\n\t\t94A1B0320E0DC19300EB5EFC /* sqSqueakMainApplication+sound.m in Sources */ = {isa = PBXBuildFile; fileRef = 94A1B0310E0DC19300EB5EFC /* sqSqueakMainApplication+sound.m */; };\n\t\t94A1B21C10B9DE0300C64473 /* keyBoardStrokeDetails.m in Sources */ = {isa = PBXBuildFile; fileRef = 94A1B21B10B9DE0300C64473 /* keyBoardStrokeDetails.m */; };\n\t\t94A3488E0DDCCCC700D1D4A9 /* sqSqueakScreenAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 94A3488D0DDCCCC700D1D4A9 /* sqSqueakScreenAPI.m */; };\n\t\t94AB2E570E003692006A79E4 /* sqVirtualMachine.c in Sources */ = {isa = PBXBuildFile; fileRef = 9424FF600DDCB1C7009912BF /* sqVirtualMachine.c */; };\n\t\t94B6E9DD10BC777A00333E9E /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 94B6E9DC10BC777A00333E9E /* Localizable.strings */; };\n\t\t94B6E9DE10BC777A00333E9E /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 94B6E9DC10BC777A00333E9E /* Localizable.strings */; };\n\t\t94B9533610E6BD7100DC476A /* MacMenuOS9ToOSX.m in Sources */ = {isa = PBXBuildFile; fileRef = 94B9533410E6BD7100DC476A /* MacMenuOS9ToOSX.m */; };\n\t\t94BCABC110AB72A600F87527 /* sqSqueakOSXFileDirectoryInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = 94BCABC010AB72A600F87527 /* sqSqueakOSXFileDirectoryInterface.m */; };\n\t\t94BCAD1D10AB942300F87527 /* sqSqueakOSXApplication+attributes.m in Sources */ = {isa = PBXBuildFile; fileRef = 94BCAD1C10AB942300F87527 /* sqSqueakOSXApplication+attributes.m */; };\n\t\t94BCAE6910ACA10100F87527 /* sqSqueakOSXInfoPlistInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = 94BCAE6810ACA10100F87527 /* sqSqueakOSXInfoPlistInterface.m */; };\n\t\t94BCE78C0DDDF61200F38F31 /* sqUnixUUID.c in Sources */ = {isa = PBXBuildFile; fileRef = 94BCE7870DDDF61200F38F31 /* sqUnixUUID.c */; };\n\t\t94BD817011C8A58D00556751 /* sqManualSurface.c in Sources */ = {isa = PBXBuildFile; fileRef = 94BD816F11C8A58D00556751 /* sqManualSurface.c */; };\n\t\t94BD817311C8A59A00556751 /* sqManualSurface.c in Sources */ = {isa = PBXBuildFile; fileRef = 94BD816F11C8A58D00556751 /* sqManualSurface.c */; };\n\t\t94C2068A10AF4F53002F4160 /* sqSqueakOSXNSView.m in Sources */ = {isa = PBXBuildFile; fileRef = 94C2068910AF4F53002F4160 /* sqSqueakOSXNSView.m */; };\n\t\t94C208F910AF7262002F4160 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94C208F810AF7262002F4160 /* QuartzCore.framework */; };\n\t\t94C3682610AFA39A0041953A /* macintoshosxextra.c in Sources */ = {isa = PBXBuildFile; fileRef = 94C3682510AFA39A0041953A /* macintoshosxextra.c */; };\n\t\t94C3687810AFA77F0041953A /* sqSqueakOSXApplication+cursor.m in Sources */ = {isa = PBXBuildFile; fileRef = 94C3687710AFA77F0041953A /* sqSqueakOSXApplication+cursor.m */; };\n\t\t94C3687D10AFA8300041953A /* sqSqueakCursorAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 94C3687C10AFA8300041953A /* sqSqueakCursorAPI.m */; };\n\t\t94C3688C10AFA9EF0041953A /* sqSqueakMainApplication+cursor.m in Sources */ = {isa = PBXBuildFile; fileRef = 94C3688B10AFA9EF0041953A /* sqSqueakMainApplication+cursor.m */; };\n\t\t94C36A9410B09EE70041953A /* sqSqueakOSXApplication+events.m in Sources */ = {isa = PBXBuildFile; fileRef = 94C36A9310B09EE70041953A /* sqSqueakOSXApplication+events.m */; };\n\t\t94C4B83010C06F8800CD4F90 /* sqSqueakOSXSoundCoreAudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 94C4B82F10C06F8800CD4F90 /* sqSqueakOSXSoundCoreAudio.m */; };\n\t\t94C887FB10ADCEFC007CB39E /* sqSqueakOSXApplication+imageReadWrite.m in Sources */ = {isa = PBXBuildFile; fileRef = 94C887FA10ADCEFC007CB39E /* sqSqueakOSXApplication+imageReadWrite.m */; };\n\t\t94C88BDF10AF3C52007CB39E /* sqSqueakOSXScreenAndWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 94C88BDE10AF3C52007CB39E /* sqSqueakOSXScreenAndWindow.m */; };\n\t\t94D16CB010BCF96B00A69A89 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 94D16CAF10BCF96B00A69A89 /* Credits.rtf */; };\n\t\t94D2A24C112B8ED000B6E459 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94C208F810AF7262002F4160 /* QuartzCore.framework */; };\n\t\t94E659230DDD03FE00358328 /* ADPCMCodecPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E658E40DDD03FE00358328 /* ADPCMCodecPlugin.c */; };\n\t\t94E659240DDD03FE00358328 /* B2DPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E658E60DDD03FE00358328 /* B2DPlugin.c */; };\n\t\t94E659260DDD03FE00358328 /* BitBltPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E658EA0DDD03FE00358328 /* BitBltPlugin.c */; };\n\t\t94E659270DDD03FE00358328 /* BMPReadWriterPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E658EC0DDD03FE00358328 /* BMPReadWriterPlugin.c */; };\n\t\t94E659290DDD03FE00358328 /* DSAPrims.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E658F00DDD03FE00358328 /* DSAPrims.c */; };\n\t\t94E6592A0DDD03FE00358328 /* FFTPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E658F20DDD03FE00358328 /* FFTPlugin.c */; };\n\t\t94E6592B0DDD03FE00358328 /* FilePlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E658F40DDD03FE00358328 /* FilePlugin.c */; };\n\t\t94E6592C0DDD03FE00358328 /* FloatArrayPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E658F60DDD03FE00358328 /* FloatArrayPlugin.c */; };\n\t\t94E6592D0DDD03FE00358328 /* GeniePlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E658F80DDD03FE00358328 /* GeniePlugin.c */; };\n\t\t94E659300DDD03FE00358328 /* JPEGReaderPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E658FE0DDD03FE00358328 /* JPEGReaderPlugin.c */; };\n\t\t94E659310DDD03FE00358328 /* JPEGReadWriter2Plugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659000DDD03FE00358328 /* JPEGReadWriter2Plugin.c */; };\n\t\t94E659320DDD03FE00358328 /* Klatt.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659020DDD03FE00358328 /* Klatt.c */; };\n\t\t94E659330DDD03FE00358328 /* LargeIntegers.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659040DDD03FE00358328 /* LargeIntegers.c */; };\n\t\t94E659340DDD03FE00358328 /* Matrix2x3Plugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659060DDD03FE00358328 /* Matrix2x3Plugin.c */; };\n\t\t94E659360DDD03FE00358328 /* MiscPrimitivePlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6590A0DDD03FE00358328 /* MiscPrimitivePlugin.c */; };\n\t\t94E659370DDD03FE00358328 /* RePlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6590C0DDD03FE00358328 /* RePlugin.c */; };\n\t\t94E659380DDD03FE00358328 /* SecurityPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6590E0DDD03FE00358328 /* SecurityPlugin.c */; };\n\t\t94E6593A0DDD03FE00358328 /* SoundCodecPrims.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659120DDD03FE00358328 /* SoundCodecPrims.c */; };\n\t\t94E6593B0DDD03FE00358328 /* SoundGenerationPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659140DDD03FE00358328 /* SoundGenerationPlugin.c */; };\n\t\t94E6593E0DDD03FE00358328 /* StarSqueakPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6591A0DDD03FE00358328 /* StarSqueakPlugin.c */; };\n\t\t94E6593F0DDD03FE00358328 /* UUIDPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6591D0DDD03FE00358328 /* UUIDPlugin.c */; };\n\t\t94E659400DDD03FE00358328 /* ZipPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6591F0DDD03FE00358328 /* ZipPlugin.c */; };\n\t\t94E659470DDD04FA00358328 /* sqFilePluginBasicPrims.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659460DDD04FA00358328 /* sqFilePluginBasicPrims.c */; };\n\t\t94E65A350DDD053900358328 /* SurfacePlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659490DDD053900358328 /* SurfacePlugin.c */; };\n\t\t94E65A370DDD053900358328 /* Error.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659520DDD053900358328 /* Error.c */; };\n\t\t94E65A380DDD053900358328 /* jcapimin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659530DDD053900358328 /* jcapimin.c */; };\n\t\t94E65A390DDD053900358328 /* jcapistd.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659540DDD053900358328 /* jcapistd.c */; };\n\t\t94E65A3A0DDD053900358328 /* jccoefct.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659550DDD053900358328 /* jccoefct.c */; };\n\t\t94E65A3B0DDD053900358328 /* jccolor.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659560DDD053900358328 /* jccolor.c */; };\n\t\t94E65A3C0DDD053900358328 /* jcdctmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659570DDD053900358328 /* jcdctmgr.c */; };\n\t\t94E65A3D0DDD053900358328 /* jchuff.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659580DDD053900358328 /* jchuff.c */; };\n\t\t94E65A3E0DDD053900358328 /* jcinit.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6595A0DDD053900358328 /* jcinit.c */; };\n\t\t94E65A3F0DDD053900358328 /* jcmainct.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6595B0DDD053900358328 /* jcmainct.c */; };\n\t\t94E65A400DDD053900358328 /* jcmarker.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6595C0DDD053900358328 /* jcmarker.c */; };\n\t\t94E65A410DDD053900358328 /* jcmaster.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6595D0DDD053900358328 /* jcmaster.c */; };\n\t\t94E65A420DDD053900358328 /* jcomapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6595E0DDD053900358328 /* jcomapi.c */; };\n\t\t94E65A430DDD053900358328 /* jcparam.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659600DDD053900358328 /* jcparam.c */; };\n\t\t94E65A440DDD053900358328 /* jcphuff.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659610DDD053900358328 /* jcphuff.c */; };\n\t\t94E65A450DDD053900358328 /* jcprepct.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659620DDD053900358328 /* jcprepct.c */; };\n\t\t94E65A460DDD053900358328 /* jcsample.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659630DDD053900358328 /* jcsample.c */; };\n\t\t94E65A470DDD053900358328 /* jctrans.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659640DDD053900358328 /* jctrans.c */; };\n\t\t94E65A480DDD053900358328 /* jdapimin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659650DDD053900358328 /* jdapimin.c */; };\n\t\t94E65A490DDD053900358328 /* jdapistd.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659660DDD053900358328 /* jdapistd.c */; };\n\t\t94E65A4A0DDD053900358328 /* jdatadst.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659670DDD053900358328 /* jdatadst.c */; };\n\t\t94E65A4B0DDD053900358328 /* jdatasrc.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659680DDD053900358328 /* jdatasrc.c */; };\n\t\t94E65A4C0DDD053900358328 /* jdcoefct.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659690DDD053900358328 /* jdcoefct.c */; };\n\t\t94E65A4D0DDD053900358328 /* jdcolor.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6596A0DDD053900358328 /* jdcolor.c */; };\n\t\t94E65A4E0DDD053900358328 /* jddctmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6596C0DDD053900358328 /* jddctmgr.c */; };\n\t\t94E65A4F0DDD053900358328 /* jdhuff.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6596D0DDD053900358328 /* jdhuff.c */; };\n\t\t94E65A500DDD053900358328 /* jdinput.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6596F0DDD053900358328 /* jdinput.c */; };\n\t\t94E65A510DDD053900358328 /* jdmainct.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659700DDD053900358328 /* jdmainct.c */; };\n\t\t94E65A520DDD053900358328 /* jdmarker.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659710DDD053900358328 /* jdmarker.c */; };\n\t\t94E65A530DDD053900358328 /* jdmaster.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659720DDD053900358328 /* jdmaster.c */; };\n\t\t94E65A540DDD053900358328 /* jdmerge.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659730DDD053900358328 /* jdmerge.c */; };\n\t\t94E65A550DDD053900358328 /* jdphuff.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659740DDD053900358328 /* jdphuff.c */; };\n\t\t94E65A560DDD053900358328 /* jdpostct.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659750DDD053900358328 /* jdpostct.c */; };\n\t\t94E65A570DDD053900358328 /* jdsample.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659760DDD053900358328 /* jdsample.c */; };\n\t\t94E65A580DDD053900358328 /* jdtrans.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659770DDD053900358328 /* jdtrans.c */; };\n\t\t94E65A590DDD053900358328 /* jerror.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659780DDD053900358328 /* jerror.c */; };\n\t\t94E65A5A0DDD053900358328 /* jfdctflt.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6597A0DDD053900358328 /* jfdctflt.c */; };\n\t\t94E65A5B0DDD053900358328 /* jfdctfst.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6597B0DDD053900358328 /* jfdctfst.c */; };\n\t\t94E65A5C0DDD053900358328 /* jfdctint.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6597C0DDD053900358328 /* jfdctint.c */; };\n\t\t94E65A5D0DDD053900358328 /* jidctflt.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6597D0DDD053900358328 /* jidctflt.c */; };\n\t\t94E65A5E0DDD053900358328 /* jidctfst.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6597E0DDD053900358328 /* jidctfst.c */; };\n\t\t94E65A5F0DDD053900358328 /* jidctint.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6597F0DDD053900358328 /* jidctint.c */; };\n\t\t94E65A600DDD053900358328 /* jidctred.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659800DDD053900358328 /* jidctred.c */; };\n\t\t94E65A610DDD053900358328 /* jmemdatadst.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659820DDD053900358328 /* jmemdatadst.c */; };\n\t\t94E65A620DDD053900358328 /* jmemdatasrc.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659830DDD053900358328 /* jmemdatasrc.c */; };\n\t\t94E65A630DDD053900358328 /* jmemmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659840DDD053900358328 /* jmemmgr.c */; };\n\t\t94E65A640DDD053900358328 /* jmemnobs.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659850DDD053900358328 /* jmemnobs.c */; };\n\t\t94E65A650DDD053900358328 /* jquant1.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6598B0DDD053900358328 /* jquant1.c */; };\n\t\t94E65A660DDD053900358328 /* jquant2.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6598C0DDD053900358328 /* jquant2.c */; };\n\t\t94E65A670DDD053900358328 /* jutils.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6598D0DDD053900358328 /* jutils.c */; };\n\t\t94E65A690DDD053900358328 /* b3dAlloc.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659980DDD053900358328 /* b3dAlloc.c */; };\n\t\t94E65A6A0DDD053900358328 /* b3dDraw.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6599A0DDD053900358328 /* b3dDraw.c */; };\n\t\t94E65A6B0DDD053900358328 /* b3dInit.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6599B0DDD053900358328 /* b3dInit.c */; };\n\t\t94E65A6C0DDD053900358328 /* b3dMain.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6599C0DDD053900358328 /* b3dMain.c */; };\n\t\t94E65A6D0DDD053900358328 /* b3dRemap.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6599D0DDD053900358328 /* b3dRemap.c */; };\n\t\t94E65A6F0DDD053900358328 /* sqSoundCodecPluginBasicPrims.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659A40DDD053900358328 /* sqSoundCodecPluginBasicPrims.c */; };\n\t\t94E65AEE0DDD053900358328 /* chartables.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E65A290DDD053900358328 /* chartables.c */; };\n\t\t94E65AEF0DDD053900358328 /* get.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E65A2B0DDD053900358328 /* get.c */; };\n\t\t94E65AF00DDD053900358328 /* pcre.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E65A2E0DDD053900358328 /* pcre.c */; };\n\t\t94E65AF40DDD053900358328 /* study.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E65A340DDD053900358328 /* study.c */; };\n\t\t94EF6CC311E55947003BA64D /* gcc3x-interp.c in Sources */ = {isa = PBXBuildFile; fileRef = 94EF6CBE11E55947003BA64D /* gcc3x-interp.c */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXBuildRule section */\n\t\t9469CEED10BFD8CE002245C2 /* PBXBuildRule */ = {\n\t\t\tisa = PBXBuildRule;\n\t\t\tcompilerSpec = com.apple.compilers.gcc.4_2;\n\t\t\tfileType = sourcecode.c;\n\t\t\tisEditable = 1;\n\t\t\toutputFiles = (\n\t\t\t);\n\t\t};\n/* End PBXBuildRule section */\n\n/* Begin PBXFileReference section */\n\t\t040F20C112CE0FFB008BA0CB /* UnixOSProcessPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = UnixOSProcessPlugin.c; sourceTree = \"<group>\"; };\n\t\t040F20C712CE1057008BA0CB /* Squeak3D.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Squeak3D.c; sourceTree = \"<group>\"; };\n\t\t040F20CA12CE10AC008BA0CB /* ClipboardExtendedPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ClipboardExtendedPlugin.c; sourceTree = \"<group>\"; };\n\t\t040F20E212CE1283008BA0CB /* ObjectiveCPlugin.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = ObjectiveCPlugin.c; sourceTree = \"<group>\"; };\n\t\t040F22DA12CE1517008BA0CB /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = \"<absolute>\"; };\n\t\t040F22E312CE155C008BA0CB /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = \"<absolute>\"; };\n\t\t040F22FB12CE1752008BA0CB /* SoundPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SoundPlugin.c; sourceTree = \"<group>\"; };\n\t\t040F230612CE1AE2008BA0CB /* SqueakFFIPrims.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SqueakFFIPrims.c; sourceTree = \"<group>\"; };\n\t\t040F230D12CE1B28008BA0CB /* HostWindowPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = HostWindowPlugin.c; sourceTree = \"<group>\"; };\n\t\t1D3623240D0F684500981E51 /* SqueakNoOGLIPhoneAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SqueakNoOGLIPhoneAppDelegate.h; sourceTree = \"<group>\"; };\n\t\t1D3623250D0F684500981E51 /* SqueakNoOGLIPhoneAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SqueakNoOGLIPhoneAppDelegate.m; sourceTree = \"<group>\"; };\n\t\t1D6058910D05DD3D006BFB54 /* Squeak.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Squeak.app; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = \"<group>\"; };\n\t\t29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = vm/Common/main.m; sourceTree = \"<group>\"; };\n\t\t9400325B0DEF3936002FA1C4 /* sqDummyaio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqDummyaio.h; sourceTree = \"<group>\"; };\n\t\t9400325C0DEF3936002FA1C4 /* sqDummyaio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqDummyaio.c; sourceTree = \"<group>\"; };\n\t\t9402DD5E10CE0C16005C2102 /* SqViewBitmapConversion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SqViewBitmapConversion.h; path = vm/OSX/SqViewBitmapConversion.h; sourceTree = \"<group>\"; };\n\t\t9402DD5F10CE0C16005C2102 /* SqViewBitmapConversion.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SqViewBitmapConversion.m; path = vm/OSX/SqViewBitmapConversion.m; sourceTree = \"<group>\"; };\n\t\t9402DD6F10CE0E91005C2102 /* SqViewClut.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SqViewClut.m; path = vm/OSX/SqViewClut.m; sourceTree = \"<group>\"; };\n\t\t9402F2AE0F3F9BB900F3D637 /* PDColoredProgressView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PDColoredProgressView.h; sourceTree = \"<group>\"; };\n\t\t9402F2AF0F3F9BB900F3D637 /* PDColoredProgressView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PDColoredProgressView.m; sourceTree = \"<group>\"; };\n\t\t9402F2C50F3F9C5600F3D637 /* drawing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = drawing.m; sourceTree = \"<group>\"; };\n\t\t940CE8540DFCE2D200EBA91B /* SqueakUIController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SqueakUIController.h; sourceTree = \"<group>\"; };\n\t\t940CE8550DFCE2D200EBA91B /* SqueakUIController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SqueakUIController.m; sourceTree = \"<group>\"; };\n\t\t9412CAB20E6C037B00DB8625 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = \"wrapper.plug-in\"; path = Settings.bundle; sourceTree = \"<group>\"; };\n\t\t9412CAE40E6C05EC00DB8625 /* sqSqueakInfoPlistInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakInfoPlistInterface.h; path = vm/Common/Classes/sqSqueakInfoPlistInterface.h; sourceTree = \"<group>\"; };\n\t\t9412CAE50E6C05EC00DB8625 /* sqSqueakInfoPlistInterface.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakInfoPlistInterface.m; path = vm/Common/Classes/sqSqueakInfoPlistInterface.m; sourceTree = \"<group>\"; };\n\t\t9414421E10BC89440088F8AC /* Squeak.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = Squeak.icns; path = OSX/Squeak.icns; sourceTree = \"<group>\"; };\n\t\t9414421F10BC89440088F8AC /* SqueakChanges.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = SqueakChanges.icns; path = OSX/SqueakChanges.icns; sourceTree = \"<group>\"; };\n\t\t9414422010BC89440088F8AC /* SqueakGeneric.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = SqueakGeneric.icns; path = OSX/SqueakGeneric.icns; sourceTree = \"<group>\"; };\n\t\t9414422110BC89440088F8AC /* SqueakImage.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = SqueakImage.icns; path = OSX/SqueakImage.icns; sourceTree = \"<group>\"; };\n\t\t9414422210BC89440088F8AC /* SqueakPlugin.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = SqueakPlugin.icns; path = OSX/SqueakPlugin.icns; sourceTree = \"<group>\"; };\n\t\t9414422310BC89440088F8AC /* SqueakProject.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = SqueakProject.icns; path = OSX/SqueakProject.icns; sourceTree = \"<group>\"; };\n\t\t9414422410BC89440088F8AC /* SqueakScript.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = SqueakScript.icns; path = OSX/SqueakScript.icns; sourceTree = \"<group>\"; };\n\t\t9414422510BC89440088F8AC /* SqueakSources.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = SqueakSources.icns; path = OSX/SqueakSources.icns; sourceTree = \"<group>\"; };\n\t\t941724420F36624C0031AF33 /* squeakProxy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = squeakProxy.m; sourceTree = \"<group>\"; };\n\t\t941724430F36624C0031AF33 /* squeakProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = squeakProxy.h; sourceTree = \"<group>\"; };\n\t\t941D1C9A0E696FC7005B77B3 /* Entitlements.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Entitlements.plist; sourceTree = \"<group>\"; };\n\t\t9424FF5B0DDCB1C7009912BF /* sqGnu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqGnu.h; path = vm/sqGnu.h; sourceTree = \"<group>\"; };\n\t\t9424FF5C0DDCB1C7009912BF /* sqMemoryAccess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqMemoryAccess.h; sourceTree = \"<group>\"; };\n\t\t9424FF5D0DDCB1C7009912BF /* sq.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sq.h; sourceTree = \"<group>\"; };\n\t\t9424FF5E0DDCB1C7009912BF /* sqNamedPrims.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqNamedPrims.c; sourceTree = \"<group>\"; };\n\t\t9424FF600DDCB1C7009912BF /* sqVirtualMachine.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqVirtualMachine.c; sourceTree = \"<group>\"; };\n\t\t9424FF610DDCB1C7009912BF /* sqVirtualMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqVirtualMachine.h; sourceTree = \"<group>\"; };\n\t\t9424FF640DDCB1EF009912BF /* sqPlatformSpecific.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqPlatformSpecific.h; sourceTree = \"<group>\"; };\n\t\t9424FF650DDCB1EF009912BF /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = \"<group>\"; };\n\t\t9424FF660DDCB1EF009912BF /* sqConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqConfig.h; sourceTree = \"<group>\"; };\n\t\t9424FF670DDCB202009912BF /* sqMacV2Memory.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqMacV2Memory.c; sourceTree = \"<group>\"; };\n\t\t9424FF680DDCB202009912BF /* sqMacV2Memory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqMacV2Memory.h; sourceTree = \"<group>\"; };\n\t\t9424FF710DDCB234009912BF /* macintoshextra.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = macintoshextra.c; sourceTree = \"<group>\"; };\n\t\t9424FF720DDCB234009912BF /* macintoshextra.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = macintoshextra.h; sourceTree = \"<group>\"; };\n\t\t9424FF750DDCB271009912BF /* osExports.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = osExports.c; sourceTree = \"<group>\"; };\n\t\t9427E45512628749002DCA6D /* Squeak72x72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Squeak72x72.png; sourceTree = \"<group>\"; };\n\t\t9428BA9510BB440800DAD287 /* sqSqueakOSXClipboardAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakOSXClipboardAPI.h; path = vm/OSX/sqSqueakOSXClipboardAPI.h; sourceTree = \"<group>\"; };\n\t\t9428BA9610BB440800DAD287 /* sqSqueakOSXClipboardAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakOSXClipboardAPI.m; path = vm/OSX/sqSqueakOSXClipboardAPI.m; sourceTree = \"<group>\"; };\n\t\t9428BB0410BB478600DAD287 /* sqSqueakOSXApplication+clipboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = \"sqSqueakOSXApplication+clipboard.h\"; path = \"vm/OSX/sqSqueakOSXApplication+clipboard.h\"; sourceTree = \"<group>\"; };\n\t\t9428BB0510BB478600DAD287 /* sqSqueakOSXApplication+clipboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = \"sqSqueakOSXApplication+clipboard.m\"; path = \"vm/OSX/sqSqueakOSXApplication+clipboard.m\"; sourceTree = \"<group>\"; };\n\t\t942ABE6E10AA23E20086D908 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = \"<absolute>\"; };\n\t\t942F48FA123C1C0C002B05DF /* SqueakUIViewCALayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SqueakUIViewCALayer.h; sourceTree = \"<group>\"; };\n\t\t942F48FB123C1C0C002B05DF /* SqueakUIViewCALayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SqueakUIViewCALayer.m; sourceTree = \"<group>\"; };\n\t\t942F48FC123C1C0C002B05DF /* SqueakUIViewOpenGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SqueakUIViewOpenGL.h; sourceTree = \"<group>\"; };\n\t\t942F48FD123C1C0C002B05DF /* SqueakUIViewOpenGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SqueakUIViewOpenGL.m; sourceTree = \"<group>\"; };\n\t\t942F75D10E0B67AD00848BF2 /* sqSqueakVmAndImagePathAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakVmAndImagePathAPI.h; path = vm/Common/Classes/sqSqueakVmAndImagePathAPI.h; sourceTree = \"<group>\"; };\n\t\t942F75D20E0B67AD00848BF2 /* sqSqueakVmAndImagePathAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakVmAndImagePathAPI.m; path = vm/Common/Classes/sqSqueakVmAndImagePathAPI.m; sourceTree = \"<group>\"; };\n\t\t942F761B0E0B6B6100848BF2 /* sqSqueakIPhoneApplication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqSqueakIPhoneApplication.h; sourceTree = \"<group>\"; };\n\t\t942F761C0E0B6B6100848BF2 /* sqSqueakIPhoneApplication.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = sqSqueakIPhoneApplication.m; sourceTree = \"<group>\"; };\n\t\t942F76310E0B6C7600848BF2 /* sqSqueakMainApplication+attributes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = \"sqSqueakMainApplication+attributes.m\"; path = \"vm/Common/Classes/sqSqueakMainApplication+attributes.m\"; sourceTree = \"<group>\"; };\n\t\t942F76350E0B6CEF00848BF2 /* sqSqueakIPhoneApplication+attributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"sqSqueakIPhoneApplication+attributes.h\"; sourceTree = \"<group>\"; };\n\t\t943001260E0D5D670040BB27 /* sqSqueakIPhoneApplication+imageReadWrite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"sqSqueakIPhoneApplication+imageReadWrite.h\"; sourceTree = \"<group>\"; };\n\t\t943001270E0D5D670040BB27 /* sqSqueakIPhoneApplication+imageReadWrite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = \"sqSqueakIPhoneApplication+imageReadWrite.m\"; sourceTree = \"<group>\"; };\n\t\t943001A30E0D600C0040BB27 /* sqSqueakIPhoneFileDirectoryInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqSqueakIPhoneFileDirectoryInterface.h; sourceTree = \"<group>\"; };\n\t\t943001A40E0D600C0040BB27 /* sqSqueakIPhoneFileDirectoryInterface.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = sqSqueakIPhoneFileDirectoryInterface.m; sourceTree = \"<group>\"; };\n\t\t943B9B281235BDD20056205E /* sqMacHostWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = sqMacHostWindow.m; sourceTree = \"<group>\"; };\n\t\t943B9B291235BDD20056205E /* sqMacHostWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqMacHostWindow.h; sourceTree = \"<group>\"; };\n\t\t944069CD10E6B63200353B27 /* MacMenubarPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = MacMenubarPlugin.c; sourceTree = \"<group>\"; };\n\t\t944895AD10F4081300FB3EC8 /* PharoV10.sources */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = PharoV10.sources; path = iPhone/PharoV10.sources; sourceTree = \"<group>\"; };\n\t\t9452BDC10F4095DE006410DE /* sqSqueakIPhoneApplication+Network.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"sqSqueakIPhoneApplication+Network.h\"; sourceTree = \"<group>\"; };\n\t\t9452BDC20F4095DE006410DE /* sqSqueakIPhoneApplication+Network.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = \"sqSqueakIPhoneApplication+Network.m\"; sourceTree = \"<group>\"; };\n\t\t9452D5D70E044A9D000AD792 /* Queue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Queue.h; path = vm/Common/Classes/Queue.h; sourceTree = \"<group>\"; };\n\t\t9452D5D80E044A9D000AD792 /* Queue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Queue.m; path = vm/Common/Classes/Queue.m; sourceTree = \"<group>\"; };\n\t\t9452D5D90E044A9D000AD792 /* sqMacV2Time.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sqMacV2Time.c; path = vm/Common/Classes/sqMacV2Time.c; sourceTree = \"<group>\"; };\n\t\t9452D5DA0E044A9D000AD792 /* sqMacV2Time.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqMacV2Time.h; path = vm/Common/Classes/sqMacV2Time.h; sourceTree = \"<group>\"; };\n\t\t9452D5DB0E044A9D000AD792 /* sqSqueakFileDirectoryAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakFileDirectoryAPI.h; path = vm/Common/Classes/sqSqueakFileDirectoryAPI.h; sourceTree = \"<group>\"; };\n\t\t9452D5DC0E044A9D000AD792 /* sqSqueakFileDirectoryAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakFileDirectoryAPI.m; path = vm/Common/Classes/sqSqueakFileDirectoryAPI.m; sourceTree = \"<group>\"; };\n\t\t9452D5DD0E044A9D000AD792 /* sqSqueakFileDirectoryInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakFileDirectoryInterface.h; path = vm/Common/Classes/sqSqueakFileDirectoryInterface.h; sourceTree = \"<group>\"; };\n\t\t9452D5DE0E044A9D000AD792 /* sqSqueakFileDirectoryInterface.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakFileDirectoryInterface.m; path = vm/Common/Classes/sqSqueakFileDirectoryInterface.m; sourceTree = \"<group>\"; };\n\t\t9452D5DF0E044A9D000AD792 /* sqSqueakMainApp.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakMainApp.m; path = vm/Common/Classes/sqSqueakMainApp.m; sourceTree = \"<group>\"; };\n\t\t9452D5E00E044A9D000AD792 /* sqSqueakMainApp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakMainApp.h; path = vm/Common/Classes/sqSqueakMainApp.h; sourceTree = \"<group>\"; };\n\t\t9452D5E10E044A9D000AD792 /* sqSqueakMainApplication+vmAndImagePath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = \"sqSqueakMainApplication+vmAndImagePath.h\"; path = \"vm/Common/Classes/sqSqueakMainApplication+vmAndImagePath.h\"; sourceTree = \"<group>\"; };\n\t\t9452D5E20E044A9D000AD792 /* sqSqueakMainApplication+vmAndImagePath.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = \"sqSqueakMainApplication+vmAndImagePath.m\"; path = \"vm/Common/Classes/sqSqueakMainApplication+vmAndImagePath.m\"; sourceTree = \"<group>\"; };\n\t\t9452D5E30E044A9D000AD792 /* sqSqueakMainApplication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakMainApplication.h; path = vm/Common/Classes/sqSqueakMainApplication.h; sourceTree = \"<group>\"; };\n\t\t9452D5E40E044A9D000AD792 /* sqSqueakMainApplication.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakMainApplication.m; path = vm/Common/Classes/sqSqueakMainApplication.m; sourceTree = \"<group>\"; };\n\t\t9452D6010E044CB3000AD792 /* sqSqueakAttributesAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakAttributesAPI.h; path = vm/Common/Classes/sqSqueakAttributesAPI.h; sourceTree = \"<group>\"; };\n\t\t9452D6020E044CB3000AD792 /* sqSqueakAttributesAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakAttributesAPI.m; path = vm/Common/Classes/sqSqueakAttributesAPI.m; sourceTree = \"<group>\"; };\n\t\t9452D6060E044D2F000AD792 /* sqSqueakEventsAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakEventsAPI.h; path = vm/Common/Classes/sqSqueakEventsAPI.h; sourceTree = \"<group>\"; };\n\t\t9452D6070E044D2F000AD792 /* sqSqueakEventsAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakEventsAPI.m; path = vm/Common/Classes/sqSqueakEventsAPI.m; sourceTree = \"<group>\"; };\n\t\t9452D7630E0452D3000AD792 /* sqiPhoneScreenAndWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqiPhoneScreenAndWindow.h; sourceTree = \"<group>\"; };\n\t\t9452D7640E0452D3000AD792 /* sqiPhoneScreenAndWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = sqiPhoneScreenAndWindow.m; sourceTree = \"<group>\"; };\n\t\t94554F1D0DF1B65700FB176B /* sqSqueakIPhoneApplication+sound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"sqSqueakIPhoneApplication+sound.h\"; sourceTree = \"<group>\"; };\n\t\t94554F1E0DF1B65700FB176B /* sqSqueakiPhoneApplication+sound.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = \"sqSqueakiPhoneApplication+sound.m\"; sourceTree = \"<group>\"; };\n\t\t945550000DF1BC6A00FB176B /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = \"<absolute>\"; };\n\t\t945550910DF2041100FB176B /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = \"<group>\"; };\n\t\t94577FBC10684D5E0020840A /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = \"<absolute>\"; };\n\t\t94577FBE10684D5E0020840A /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = /System/Library/Frameworks/CoreLocation.framework; sourceTree = \"<absolute>\"; };\n\t\t94577FC410684D7E0020840A /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = /System/Library/Frameworks/SystemConfiguration.framework; sourceTree = \"<absolute>\"; };\n\t\t94584FD910F02378001401E7 /* sqMacExtendedClipboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = sqMacExtendedClipboard.m; sourceTree = \"<group>\"; };\n\t\t94584FDA10F02378001401E7 /* sqMacExtendedClipboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqMacExtendedClipboard.h; sourceTree = \"<group>\"; };\n\t\t945851EE10F03E60001401E7 /* sqMacExtendedClipboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqMacExtendedClipboard.h; sourceTree = \"<group>\"; };\n\t\t945851EF10F03E60001401E7 /* sqMacExtendedClipboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = sqMacExtendedClipboard.m; sourceTree = \"<group>\"; };\n\t\t9458525410F04339001401E7 /* sqSqueakIPhoneClipboardAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqSqueakIPhoneClipboardAPI.h; sourceTree = \"<group>\"; };\n\t\t9458525510F04339001401E7 /* sqSqueakIPhoneClipboardAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = sqSqueakIPhoneClipboardAPI.m; sourceTree = \"<group>\"; };\n\t\t9458525A10F043EB001401E7 /* sqSqueakIPhoneApplication+clipboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"sqSqueakIPhoneApplication+clipboard.h\"; sourceTree = \"<group>\"; };\n\t\t9458525B10F043EB001401E7 /* sqSqueakIPhoneApplication+clipboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = \"sqSqueakIPhoneApplication+clipboard.m\"; sourceTree = \"<group>\"; };\n\t\t94638B260EAFB77B00A3F155 /* iPhone.changes */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = iPhone.changes; path = iPhone/iPhone.changes; sourceTree = \"<group>\"; };\n\t\t9463943D0E95845000015851 /* squeakSUnitTester.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = squeakSUnitTester.h; sourceTree = \"<group>\"; };\n\t\t9463943E0E95845000015851 /* squeakSUnitTester.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = squeakSUnitTester.m; sourceTree = \"<group>\"; };\n\t\t946DA8D210C0C30D00F26F56 /* DropPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = DropPlugin.c; sourceTree = \"<group>\"; };\n\t\t946DA8EF10C0C38600F26F56 /* DropPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DropPlugin.h; sourceTree = \"<group>\"; };\n\t\t946DA91310C0C71100F26F56 /* sqSqueakOSXDropAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakOSXDropAPI.h; path = vm/OSX/sqSqueakOSXDropAPI.h; sourceTree = \"<group>\"; };\n\t\t946DA91410C0C71100F26F56 /* sqSqueakOSXDropAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakOSXDropAPI.m; path = vm/OSX/sqSqueakOSXDropAPI.m; sourceTree = \"<group>\"; };\n\t\t946DA9FF10C0D35500F26F56 /* sqMacUnixExternalPrims.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqMacUnixExternalPrims.m; path = vm/OSX/sqMacUnixExternalPrims.m; sourceTree = \"<group>\"; };\n\t\t9471D2710E04703B00703D45 /* sqSqueakScreenAndWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakScreenAndWindow.h; path = vm/Common/Classes/sqSqueakScreenAndWindow.h; sourceTree = \"<group>\"; };\n\t\t9471D2720E04703B00703D45 /* sqSqueakScreenAndWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakScreenAndWindow.m; path = vm/Common/Classes/sqSqueakScreenAndWindow.m; sourceTree = \"<group>\"; };\n\t\t9471D2DF0E04743F00703D45 /* sqSqueakAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakAppDelegate.h; path = vm/Common/Classes/sqSqueakAppDelegate.h; sourceTree = \"<group>\"; };\n\t\t9471D2E00E04743F00703D45 /* sqSqueakAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakAppDelegate.m; path = vm/Common/Classes/sqSqueakAppDelegate.m; sourceTree = \"<group>\"; };\n\t\t9478E0250EC8D957007096A7 /* dummyFFI.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dummyFFI.c; sourceTree = \"<group>\"; };\n\t\t9478E0260EC8D957007096A7 /* dummyFFI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dummyFFI.h; sourceTree = \"<group>\"; };\n\t\t9478E02A0EC8D957007096A7 /* squeakSUnitTester.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = squeakSUnitTester.h; sourceTree = \"<group>\"; };\n\t\t9478E02B0EC8D957007096A7 /* squeakSUnitTester.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = squeakSUnitTester.m; sourceTree = \"<group>\"; };\n\t\t9478E0320EC8D98F007096A7 /* sqSqueakSoundCoreAudioAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqSqueakSoundCoreAudioAPI.h; sourceTree = \"<group>\"; };\n\t\t9478E0330EC8D98F007096A7 /* sqSqueakSoundCoreAudioAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = sqSqueakSoundCoreAudioAPI.m; sourceTree = \"<group>\"; };\n\t\t9478E05E0EC8DCFB007096A7 /* sqSqueakSoundCoreAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqSqueakSoundCoreAudio.h; sourceTree = \"<group>\"; };\n\t\t9478E05F0EC8DCFB007096A7 /* sqSqueakSoundCoreAudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = sqSqueakSoundCoreAudio.m; sourceTree = \"<group>\"; };\n\t\t947E20F90EB2826C007957D0 /* sqFFI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqFFI.h; sourceTree = \"<group>\"; };\n\t\t947E21310EB2868A007957D0 /* dummyFFI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dummyFFI.h; sourceTree = \"<group>\"; };\n\t\t947E21320EB2868A007957D0 /* dummyFFI.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dummyFFI.c; sourceTree = \"<group>\"; };\n\t\t947E5F9310A9FF4A00D3B69E /* SqueakPureObjc_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SqueakPureObjc_Prefix.pch; sourceTree = \"<group>\"; };\n\t\t947E5F9F10A9FFA000D3B69E /* SqueakPureObjc-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = \"SqueakPureObjc-Info.plist\"; sourceTree = \"<group>\"; };\n\t\t947E61C210AA03C300D3B69E /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = \"<absolute>\"; };\n\t\t947E61C410AA03DC00D3B69E /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = \"<absolute>\"; };\n\t\t947E62FC10AA098300D3B69E /* Squeak.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Squeak.app; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t947E642710AA0E9E00D3B69E /* sqMacV2Browser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqMacV2Browser.h; path = vm/OSX/sqMacV2Browser.h; sourceTree = \"<group>\"; };\n\t\t947E642810AA0E9E00D3B69E /* sqMacV2Browser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqMacV2Browser.m; path = vm/OSX/sqMacV2Browser.m; sourceTree = \"<group>\"; };\n\t\t947E647910AA100900D3B69E /* SqueakOSXAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SqueakOSXAppDelegate.h; path = vm/OSX/SqueakOSXAppDelegate.h; sourceTree = \"<group>\"; };\n\t\t947E647A10AA100900D3B69E /* SqueakOSXAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SqueakOSXAppDelegate.m; path = vm/OSX/SqueakOSXAppDelegate.m; sourceTree = \"<group>\"; };\n\t\t947E64CA10AA16FE00D3B69E /* sqSqueakOSXApplication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakOSXApplication.h; path = vm/OSX/sqSqueakOSXApplication.h; sourceTree = \"<group>\"; };\n\t\t947E64CB10AA16FE00D3B69E /* sqSqueakOSXApplication.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakOSXApplication.m; path = vm/OSX/sqSqueakOSXApplication.m; sourceTree = \"<group>\"; };\n\t\t947E64DD10AA18FE00D3B69E /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = \"<group>\"; };\n\t\t94883B400E0C2B9C005A4738 /* sqUnixSocket.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqUnixSocket.c; sourceTree = \"<group>\"; };\n\t\t948EC38F1155312600B08A4F /* MainWindow-iPad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = \"MainWindow-iPad.xib\"; path = \"Resources-iPad/MainWindow-iPad.xib\"; sourceTree = \"<group>\"; };\n\t\t9492452F10BA43AA00E726F5 /* SqueakOSXApplication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SqueakOSXApplication.h; path = vm/OSX/SqueakOSXApplication.h; sourceTree = \"<group>\"; };\n\t\t9492453010BA43AA00E726F5 /* SqueakOSXApplication.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SqueakOSXApplication.m; path = vm/OSX/SqueakOSXApplication.m; sourceTree = \"<group>\"; };\n\t\t9494927D11E5178D0019BC29 /* cogit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cogit.c; sourceTree = \"<group>\"; };\n\t\t9494927E11E5178D0019BC29 /* cogit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cogit.h; sourceTree = \"<group>\"; };\n\t\t9494927F11E5178D0019BC29 /* cogmethod.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cogmethod.h; sourceTree = \"<group>\"; };\n\t\t9494928011E5178D0019BC29 /* gcc3x-cointerp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = \"gcc3x-cointerp.c\"; sourceTree = \"<group>\"; xcLanguageSpecificationIdentifier = \"<none>\"; };\n\t\t9494928111E5178D0019BC29 /* cointerp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cointerp.h; sourceTree = \"<group>\"; };\n\t\t949492C011E51C6B0019BC29 /* dispdbg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dispdbg.h; sourceTree = \"<group>\"; };\n\t\t949492C111E51C6B0019BC29 /* sqAssert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqAssert.h; sourceTree = \"<group>\"; };\n\t\t949492C211E51C6B0019BC29 /* sqCogStackAlignment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqCogStackAlignment.h; sourceTree = \"<group>\"; };\n\t\t949492C311E51C6B0019BC29 /* sqExternalSemaphores.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqExternalSemaphores.c; sourceTree = \"<group>\"; };\n\t\t949492C411E51C6B0019BC29 /* sqAtomicOps.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqAtomicOps.h; sourceTree = \"<group>\"; };\n\t\t949492C511E51C6B0019BC29 /* sqHeapMap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqHeapMap.c; sourceTree = \"<group>\"; };\n\t\t949492C611E51C6B0019BC29 /* sqTicker.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqTicker.c; sourceTree = \"<group>\"; };\n\t\t9494932C11E527180019BC29 /* sqUnixHeartbeat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqUnixHeartbeat.c; sourceTree = \"<group>\"; };\n\t\t9494932D11E527180019BC29 /* sqUnixThreads.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqUnixThreads.c; sourceTree = \"<group>\"; };\n\t\t9494932E11E527180019BC29 /* sqUnixVMProfile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqUnixVMProfile.c; sourceTree = \"<group>\"; };\n\t\t9494935011E527AB0019BC29 /* sqMemoryFence.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqMemoryFence.h; sourceTree = \"<group>\"; };\n\t\t949493BF11E52ADE0019BC29 /* aio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = aio.c; path = ../../../../unix/vm/aio.c; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t949AD14911E542E8006D6BF4 /* SqueakPureObjc-InfoCOG.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = \"SqueakPureObjc-InfoCOG.plist\"; sourceTree = \"<group>\"; };\n\t\t949E5DB50DE3AB6A007388E0 /* SqueakUIView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SqueakUIView.h; sourceTree = \"<group>\"; };\n\t\t949E5DB60DE3AB6A007388E0 /* SqueakUIView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SqueakUIView.m; sourceTree = \"<group>\"; };\n\t\t94A0E8440DE5EB6E0071C8B9 /* sqSqueakMainApplication+attributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = \"sqSqueakMainApplication+attributes.h\"; path = \"vm/Common/Classes/sqSqueakMainApplication+attributes.h\"; sourceTree = \"<group>\"; };\n\t\t94A0E8450DE5EB6E0071C8B9 /* sqSqueakIPhoneApplication+attributes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = \"sqSqueakIPhoneApplication+attributes.m\"; sourceTree = \"<group>\"; };\n\t\t94A0E8830DE5EF430071C8B9 /* sqSqueakMainApplication+imageReadWrite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = \"sqSqueakMainApplication+imageReadWrite.h\"; path = \"vm/Common/Classes/sqSqueakMainApplication+imageReadWrite.h\"; sourceTree = \"<group>\"; };\n\t\t94A0E8840DE5EF430071C8B9 /* sqSqueakMainApplication+imageReadWrite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = \"sqSqueakMainApplication+imageReadWrite.m\"; path = \"vm/Common/Classes/sqSqueakMainApplication+imageReadWrite.m\"; sourceTree = \"<group>\"; };\n\t\t94A0E9820DE5F1FE0071C8B9 /* sqSqueakMainApplication+screen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = \"sqSqueakMainApplication+screen.h\"; path = \"vm/Common/Classes/sqSqueakMainApplication+screen.h\"; sourceTree = \"<group>\"; };\n\t\t94A0E9830DE5F1FE0071C8B9 /* sqSqueakMainApplication+screen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = \"sqSqueakMainApplication+screen.m\"; path = \"vm/Common/Classes/sqSqueakMainApplication+screen.m\"; sourceTree = \"<group>\"; };\n\t\t94A1B0050E0DBE2400EB5EFC /* sqSqueakMainApplication+events.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = \"sqSqueakMainApplication+events.h\"; path = \"vm/Common/Classes/sqSqueakMainApplication+events.h\"; sourceTree = \"<group>\"; };\n\t\t94A1B0060E0DBE2400EB5EFC /* sqSqueakMainApplication+events.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = \"sqSqueakMainApplication+events.m\"; path = \"vm/Common/Classes/sqSqueakMainApplication+events.m\"; sourceTree = \"<group>\"; };\n\t\t94A1B02B0E0DC10D00EB5EFC /* sqSqueakSoundAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakSoundAPI.h; path = vm/Common/Classes/sqSqueakSoundAPI.h; sourceTree = \"<group>\"; };\n\t\t94A1B02C0E0DC10D00EB5EFC /* sqSqueakSoundAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakSoundAPI.m; path = vm/Common/Classes/sqSqueakSoundAPI.m; sourceTree = \"<group>\"; };\n\t\t94A1B0300E0DC19300EB5EFC /* sqSqueakMainApplication+sound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = \"sqSqueakMainApplication+sound.h\"; path = \"vm/Common/Classes/sqSqueakMainApplication+sound.h\"; sourceTree = \"<group>\"; };\n\t\t94A1B0310E0DC19300EB5EFC /* sqSqueakMainApplication+sound.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = \"sqSqueakMainApplication+sound.m\"; path = \"vm/Common/Classes/sqSqueakMainApplication+sound.m\"; sourceTree = \"<group>\"; };\n\t\t94A1B21A10B9DE0300C64473 /* keyBoardStrokeDetails.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = keyBoardStrokeDetails.h; path = vm/OSX/keyBoardStrokeDetails.h; sourceTree = \"<group>\"; };\n\t\t94A1B21B10B9DE0300C64473 /* keyBoardStrokeDetails.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = keyBoardStrokeDetails.m; path = vm/OSX/keyBoardStrokeDetails.m; sourceTree = \"<group>\"; };\n\t\t94A3488C0DDCCCC700D1D4A9 /* sqSqueakScreenAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakScreenAPI.h; path = vm/Common/Classes/sqSqueakScreenAPI.h; sourceTree = \"<group>\"; };\n\t\t94A3488D0DDCCCC700D1D4A9 /* sqSqueakScreenAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakScreenAPI.m; path = vm/Common/Classes/sqSqueakScreenAPI.m; sourceTree = \"<group>\"; };\n\t\t94A349B50DDCDBE200D1D4A9 /* iPhone.image */ = {isa = PBXFileReference; lastKnownFileType = file; name = iPhone.image; path = iPhone/iPhone.image; sourceTree = \"<group>\"; };\n\t\t94B6E9D910BC775E00333E9E /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = vm/Common/English.lproj/Localizable.strings; sourceTree = \"<group>\"; };\n\t\t94B8F54E10CF677800F0DD6B /* SqViewClut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SqViewClut.h; path = vm/OSX/SqViewClut.h; sourceTree = \"<group>\"; };\n\t\t94B9528510E6B79E00DC476A /* MacMenubarPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MacMenubarPlugin.h; sourceTree = \"<group>\"; };\n\t\t94B9533310E6BD7100DC476A /* MacMenuOS9ToOSX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MacMenuOS9ToOSX.h; sourceTree = \"<group>\"; };\n\t\t94B9533410E6BD7100DC476A /* MacMenuOS9ToOSX.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MacMenuOS9ToOSX.m; sourceTree = \"<group>\"; };\n\t\t94BCABBF10AB72A600F87527 /* sqSqueakOSXFileDirectoryInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakOSXFileDirectoryInterface.h; path = vm/OSX/sqSqueakOSXFileDirectoryInterface.h; sourceTree = \"<group>\"; };\n\t\t94BCABC010AB72A600F87527 /* sqSqueakOSXFileDirectoryInterface.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakOSXFileDirectoryInterface.m; path = vm/OSX/sqSqueakOSXFileDirectoryInterface.m; sourceTree = \"<group>\"; };\n\t\t94BCAD1B10AB942300F87527 /* sqSqueakOSXApplication+attributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = \"sqSqueakOSXApplication+attributes.h\"; path = \"vm/OSX/sqSqueakOSXApplication+attributes.h\"; sourceTree = \"<group>\"; };\n\t\t94BCAD1C10AB942300F87527 /* sqSqueakOSXApplication+attributes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = \"sqSqueakOSXApplication+attributes.m\"; path = \"vm/OSX/sqSqueakOSXApplication+attributes.m\"; sourceTree = \"<group>\"; };\n\t\t94BCAE6710ACA10100F87527 /* sqSqueakOSXInfoPlistInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakOSXInfoPlistInterface.h; path = vm/OSX/sqSqueakOSXInfoPlistInterface.h; sourceTree = \"<group>\"; };\n\t\t94BCAE6810ACA10100F87527 /* sqSqueakOSXInfoPlistInterface.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakOSXInfoPlistInterface.m; path = vm/OSX/sqSqueakOSXInfoPlistInterface.m; sourceTree = \"<group>\"; };\n\t\t94BCE6660DDDEB5000F38F31 /* sqMacHostWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqMacHostWindow.h; sourceTree = \"<group>\"; };\n\t\t94BCE6870DDDECB800F38F31 /* HostWindowPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HostWindowPlugin.h; sourceTree = \"<group>\"; };\n\t\t94BCE7870DDDF61200F38F31 /* sqUnixUUID.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqUnixUUID.c; sourceTree = \"<group>\"; };\n\t\t94BCE7A60DDDF8F800F38F31 /* sqaio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqaio.h; path = vm/sqaio.h; sourceTree = \"<group>\"; };\n\t\t94BCE93E0DDE044700F38F31 /* sqSqueakIPhoneApplication+events.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"sqSqueakIPhoneApplication+events.h\"; sourceTree = \"<group>\"; };\n\t\t94BCE93F0DDE044700F38F31 /* sqSqueakIPhoneApplication+events.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = \"sqSqueakIPhoneApplication+events.m\"; sourceTree = \"<group>\"; };\n\t\t94BCEA2B0DDE0C1600F38F31 /* sqMacHostWindow.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqMacHostWindow.c; sourceTree = \"<group>\"; };\n\t\t94BCEAF20DDE16B400F38F31 /* sqMacSecurity.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqMacSecurity.c; sourceTree = \"<group>\"; };\n\t\t94BD816F11C8A58D00556751 /* sqManualSurface.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqManualSurface.c; sourceTree = \"<group>\"; };\n\t\t94C2068810AF4F53002F4160 /* sqSqueakOSXNSView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakOSXNSView.h; path = vm/OSX/sqSqueakOSXNSView.h; sourceTree = \"<group>\"; };\n\t\t94C2068910AF4F53002F4160 /* sqSqueakOSXNSView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakOSXNSView.m; path = vm/OSX/sqSqueakOSXNSView.m; sourceTree = \"<group>\"; };\n\t\t94C208F810AF7262002F4160 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = /System/Library/Frameworks/QuartzCore.framework; sourceTree = \"<absolute>\"; };\n\t\t94C3682410AFA39A0041953A /* macintoshosxextra.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = macintoshosxextra.h; path = vm/OSX/macintoshosxextra.h; sourceTree = \"<group>\"; };\n\t\t94C3682510AFA39A0041953A /* macintoshosxextra.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = macintoshosxextra.c; path = vm/OSX/macintoshosxextra.c; sourceTree = \"<group>\"; };\n\t\t94C3687610AFA77F0041953A /* sqSqueakOSXApplication+cursor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = \"sqSqueakOSXApplication+cursor.h\"; path = \"vm/OSX/sqSqueakOSXApplication+cursor.h\"; sourceTree = \"<group>\"; };\n\t\t94C3687710AFA77F0041953A /* sqSqueakOSXApplication+cursor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = \"sqSqueakOSXApplication+cursor.m\"; path = \"vm/OSX/sqSqueakOSXApplication+cursor.m\"; sourceTree = \"<group>\"; };\n\t\t94C3687B10AFA8300041953A /* sqSqueakCursorAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakCursorAPI.h; path = vm/Common/Classes/sqSqueakCursorAPI.h; sourceTree = \"<group>\"; };\n\t\t94C3687C10AFA8300041953A /* sqSqueakCursorAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakCursorAPI.m; path = vm/Common/Classes/sqSqueakCursorAPI.m; sourceTree = \"<group>\"; };\n\t\t94C3688A10AFA9EF0041953A /* sqSqueakMainApplication+cursor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = \"sqSqueakMainApplication+cursor.h\"; path = \"vm/Common/Classes/sqSqueakMainApplication+cursor.h\"; sourceTree = \"<group>\"; };\n\t\t94C3688B10AFA9EF0041953A /* sqSqueakMainApplication+cursor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = \"sqSqueakMainApplication+cursor.m\"; path = \"vm/Common/Classes/sqSqueakMainApplication+cursor.m\"; sourceTree = \"<group>\"; };\n\t\t94C36A9210B09EE70041953A /* sqSqueakOSXApplication+events.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = \"sqSqueakOSXApplication+events.h\"; path = \"vm/OSX/sqSqueakOSXApplication+events.h\"; sourceTree = \"<group>\"; };\n\t\t94C36A9310B09EE70041953A /* sqSqueakOSXApplication+events.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = \"sqSqueakOSXApplication+events.m\"; path = \"vm/OSX/sqSqueakOSXApplication+events.m\"; sourceTree = \"<group>\"; };\n\t\t94C36C9710B0CF290041953A /* Info-iPhone.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = \"Info-iPhone.plist\"; sourceTree = \"<group>\"; };\n\t\t94C4B80F10C06C4700CD4F90 /* configx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = configx.h; sourceTree = \"<group>\"; };\n\t\t94C4B82E10C06F8800CD4F90 /* sqSqueakOSXSoundCoreAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakOSXSoundCoreAudio.h; path = vm/OSX/plugins/SoundPlugin/sqSqueakOSXSoundCoreAudio.h; sourceTree = \"<group>\"; };\n\t\t94C4B82F10C06F8800CD4F90 /* sqSqueakOSXSoundCoreAudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakOSXSoundCoreAudio.m; path = vm/OSX/plugins/SoundPlugin/sqSqueakOSXSoundCoreAudio.m; sourceTree = \"<group>\"; };\n\t\t94C887F910ADCEFC007CB39E /* sqSqueakOSXApplication+imageReadWrite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = \"sqSqueakOSXApplication+imageReadWrite.h\"; path = \"vm/OSX/sqSqueakOSXApplication+imageReadWrite.h\"; sourceTree = \"<group>\"; };\n\t\t94C887FA10ADCEFC007CB39E /* sqSqueakOSXApplication+imageReadWrite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = \"sqSqueakOSXApplication+imageReadWrite.m\"; path = \"vm/OSX/sqSqueakOSXApplication+imageReadWrite.m\"; sourceTree = \"<group>\"; };\n\t\t94C88BDD10AF3C52007CB39E /* sqSqueakOSXScreenAndWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqSqueakOSXScreenAndWindow.h; path = vm/OSX/sqSqueakOSXScreenAndWindow.h; sourceTree = \"<group>\"; };\n\t\t94C88BDE10AF3C52007CB39E /* sqSqueakOSXScreenAndWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = sqSqueakOSXScreenAndWindow.m; path = vm/OSX/sqSqueakOSXScreenAndWindow.m; sourceTree = \"<group>\"; };\n\t\t94D16CAF10BCF96B00A69A89 /* Credits.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = Credits.rtf; path = OSX/Credits.rtf; sourceTree = \"<group>\"; };\n\t\t94D3654D10CEC86C00805023 /* BitMapConversionLogicFromX11.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BitMapConversionLogicFromX11.h; path = vm/OSX/BitMapConversionLogicFromX11.h; sourceTree = \"<group>\"; };\n\t\t94D3654E10CEC86C00805023 /* BitMapConversionLogicFromX11.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = BitMapConversionLogicFromX11.c; path = vm/OSX/BitMapConversionLogicFromX11.c; sourceTree = \"<group>\"; };\n\t\t94E658E10DDD03FE00358328 /* interp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = interp.h; sourceTree = \"<group>\"; };\n\t\t94E658E40DDD03FE00358328 /* ADPCMCodecPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ADPCMCodecPlugin.c; sourceTree = \"<group>\"; };\n\t\t94E658E60DDD03FE00358328 /* B2DPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = B2DPlugin.c; sourceTree = \"<group>\"; };\n\t\t94E658EA0DDD03FE00358328 /* BitBltPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = BitBltPlugin.c; sourceTree = \"<group>\"; };\n\t\t94E658EC0DDD03FE00358328 /* BMPReadWriterPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = BMPReadWriterPlugin.c; sourceTree = \"<group>\"; };\n\t\t94E658F00DDD03FE00358328 /* DSAPrims.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = DSAPrims.c; sourceTree = \"<group>\"; };\n\t\t94E658F20DDD03FE00358328 /* FFTPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = FFTPlugin.c; sourceTree = \"<group>\"; };\n\t\t94E658F40DDD03FE00358328 /* FilePlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = FilePlugin.c; sourceTree = \"<group>\"; };\n\t\t94E658F60DDD03FE00358328 /* FloatArrayPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = FloatArrayPlugin.c; sourceTree = \"<group>\"; };\n\t\t94E658F80DDD03FE00358328 /* GeniePlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = GeniePlugin.c; sourceTree = \"<group>\"; };\n\t\t94E658FE0DDD03FE00358328 /* JPEGReaderPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = JPEGReaderPlugin.c; sourceTree = \"<group>\"; };\n\t\t94E659000DDD03FE00358328 /* JPEGReadWriter2Plugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = JPEGReadWriter2Plugin.c; sourceTree = \"<group>\"; };\n\t\t94E659020DDD03FE00358328 /* Klatt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Klatt.c; sourceTree = \"<group>\"; };\n\t\t94E659040DDD03FE00358328 /* LargeIntegers.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = LargeIntegers.c; sourceTree = \"<group>\"; };\n\t\t94E659060DDD03FE00358328 /* Matrix2x3Plugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Matrix2x3Plugin.c; sourceTree = \"<group>\"; };\n\t\t94E659080DDD03FE00358328 /* MIDIPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = MIDIPlugin.c; sourceTree = \"<group>\"; };\n\t\t94E6590A0DDD03FE00358328 /* MiscPrimitivePlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = MiscPrimitivePlugin.c; sourceTree = \"<group>\"; };\n\t\t94E6590C0DDD03FE00358328 /* RePlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = RePlugin.c; sourceTree = \"<group>\"; };\n\t\t94E6590E0DDD03FE00358328 /* SecurityPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SecurityPlugin.c; sourceTree = \"<group>\"; };\n\t\t94E659100DDD03FE00358328 /* SocketPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SocketPlugin.c; sourceTree = \"<group>\"; };\n\t\t94E659120DDD03FE00358328 /* SoundCodecPrims.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SoundCodecPrims.c; sourceTree = \"<group>\"; };\n\t\t94E659140DDD03FE00358328 /* SoundGenerationPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SoundGenerationPlugin.c; sourceTree = \"<group>\"; };\n\t\t94E6591A0DDD03FE00358328 /* StarSqueakPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = StarSqueakPlugin.c; sourceTree = \"<group>\"; };\n\t\t94E6591D0DDD03FE00358328 /* UUIDPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = UUIDPlugin.c; sourceTree = \"<group>\"; };\n\t\t94E6591F0DDD03FE00358328 /* ZipPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ZipPlugin.c; sourceTree = \"<group>\"; };\n\t\t94E659200DDD03FE00358328 /* sqNamedPrims.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sqNamedPrims.h; path = src/vm/sqNamedPrims.h; sourceTree = SOURCE_ROOT; };\n\t\t94E659430DDD04FA00358328 /* AsynchFilePlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AsynchFilePlugin.h; sourceTree = \"<group>\"; };\n\t\t94E659450DDD04FA00358328 /* FilePlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FilePlugin.h; sourceTree = \"<group>\"; };\n\t\t94E659460DDD04FA00358328 /* sqFilePluginBasicPrims.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqFilePluginBasicPrims.c; sourceTree = \"<group>\"; };\n\t\t94E659490DDD053900358328 /* SurfacePlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SurfacePlugin.c; sourceTree = \"<group>\"; };\n\t\t94E6594A0DDD053900358328 /* SurfacePlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SurfacePlugin.h; sourceTree = \"<group>\"; };\n\t\t94E6594D0DDD053900358328 /* SecurityPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SecurityPlugin.h; sourceTree = \"<group>\"; };\n\t\t94E6594F0DDD053900358328 /* SoundGenerationPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoundGenerationPlugin.h; sourceTree = \"<group>\"; };\n\t\t94E659520DDD053900358328 /* Error.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Error.c; sourceTree = \"<group>\"; };\n\t\t94E659530DDD053900358328 /* jcapimin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jcapimin.c; sourceTree = \"<group>\"; };\n\t\t94E659540DDD053900358328 /* jcapistd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jcapistd.c; sourceTree = \"<group>\"; };\n\t\t94E659550DDD053900358328 /* jccoefct.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jccoefct.c; sourceTree = \"<group>\"; };\n\t\t94E659560DDD053900358328 /* jccolor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jccolor.c; sourceTree = \"<group>\"; };\n\t\t94E659570DDD053900358328 /* jcdctmgr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jcdctmgr.c; sourceTree = \"<group>\"; };\n\t\t94E659580DDD053900358328 /* jchuff.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jchuff.c; sourceTree = \"<group>\"; };\n\t\t94E659590DDD053900358328 /* jchuff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jchuff.h; sourceTree = \"<group>\"; };\n\t\t94E6595A0DDD053900358328 /* jcinit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jcinit.c; sourceTree = \"<group>\"; };\n\t\t94E6595B0DDD053900358328 /* jcmainct.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jcmainct.c; sourceTree = \"<group>\"; };\n\t\t94E6595C0DDD053900358328 /* jcmarker.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jcmarker.c; sourceTree = \"<group>\"; };\n\t\t94E6595D0DDD053900358328 /* jcmaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jcmaster.c; sourceTree = \"<group>\"; };\n\t\t94E6595E0DDD053900358328 /* jcomapi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jcomapi.c; sourceTree = \"<group>\"; };\n\t\t94E6595F0DDD053900358328 /* jconfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jconfig.h; sourceTree = \"<group>\"; };\n\t\t94E659600DDD053900358328 /* jcparam.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jcparam.c; sourceTree = \"<group>\"; };\n\t\t94E659610DDD053900358328 /* jcphuff.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jcphuff.c; sourceTree = \"<group>\"; };\n\t\t94E659620DDD053900358328 /* jcprepct.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jcprepct.c; sourceTree = \"<group>\"; };\n\t\t94E659630DDD053900358328 /* jcsample.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jcsample.c; sourceTree = \"<group>\"; };\n\t\t94E659640DDD053900358328 /* jctrans.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jctrans.c; sourceTree = \"<group>\"; };\n\t\t94E659650DDD053900358328 /* jdapimin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdapimin.c; sourceTree = \"<group>\"; };\n\t\t94E659660DDD053900358328 /* jdapistd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdapistd.c; sourceTree = \"<group>\"; };\n\t\t94E659670DDD053900358328 /* jdatadst.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdatadst.c; sourceTree = \"<group>\"; };\n\t\t94E659680DDD053900358328 /* jdatasrc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdatasrc.c; sourceTree = \"<group>\"; };\n\t\t94E659690DDD053900358328 /* jdcoefct.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdcoefct.c; sourceTree = \"<group>\"; };\n\t\t94E6596A0DDD053900358328 /* jdcolor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdcolor.c; sourceTree = \"<group>\"; };\n\t\t94E6596B0DDD053900358328 /* jdct.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jdct.h; sourceTree = \"<group>\"; };\n\t\t94E6596C0DDD053900358328 /* jddctmgr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jddctmgr.c; sourceTree = \"<group>\"; };\n\t\t94E6596D0DDD053900358328 /* jdhuff.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdhuff.c; sourceTree = \"<group>\"; };\n\t\t94E6596E0DDD053900358328 /* jdhuff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jdhuff.h; sourceTree = \"<group>\"; };\n\t\t94E6596F0DDD053900358328 /* jdinput.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdinput.c; sourceTree = \"<group>\"; };\n\t\t94E659700DDD053900358328 /* jdmainct.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdmainct.c; sourceTree = \"<group>\"; };\n\t\t94E659710DDD053900358328 /* jdmarker.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdmarker.c; sourceTree = \"<group>\"; };\n\t\t94E659720DDD053900358328 /* jdmaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdmaster.c; sourceTree = \"<group>\"; };\n\t\t94E659730DDD053900358328 /* jdmerge.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdmerge.c; sourceTree = \"<group>\"; };\n\t\t94E659740DDD053900358328 /* jdphuff.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdphuff.c; sourceTree = \"<group>\"; };\n\t\t94E659750DDD053900358328 /* jdpostct.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdpostct.c; sourceTree = \"<group>\"; };\n\t\t94E659760DDD053900358328 /* jdsample.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdsample.c; sourceTree = \"<group>\"; };\n\t\t94E659770DDD053900358328 /* jdtrans.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jdtrans.c; sourceTree = \"<group>\"; };\n\t\t94E659780DDD053900358328 /* jerror.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jerror.c; sourceTree = \"<group>\"; };\n\t\t94E659790DDD053900358328 /* jerror.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jerror.h; sourceTree = \"<group>\"; };\n\t\t94E6597A0DDD053900358328 /* jfdctflt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jfdctflt.c; sourceTree = \"<group>\"; };\n\t\t94E6597B0DDD053900358328 /* jfdctfst.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jfdctfst.c; sourceTree = \"<group>\"; };\n\t\t94E6597C0DDD053900358328 /* jfdctint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jfdctint.c; sourceTree = \"<group>\"; };\n\t\t94E6597D0DDD053900358328 /* jidctflt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jidctflt.c; sourceTree = \"<group>\"; };\n\t\t94E6597E0DDD053900358328 /* jidctfst.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jidctfst.c; sourceTree = \"<group>\"; };\n\t\t94E6597F0DDD053900358328 /* jidctint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jidctint.c; sourceTree = \"<group>\"; };\n\t\t94E659800DDD053900358328 /* jidctred.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jidctred.c; sourceTree = \"<group>\"; };\n\t\t94E659810DDD053900358328 /* jinclude.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jinclude.h; sourceTree = \"<group>\"; };\n\t\t94E659820DDD053900358328 /* jmemdatadst.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jmemdatadst.c; sourceTree = \"<group>\"; };\n\t\t94E659830DDD053900358328 /* jmemdatasrc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jmemdatasrc.c; sourceTree = \"<group>\"; };\n\t\t94E659840DDD053900358328 /* jmemmgr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jmemmgr.c; sourceTree = \"<group>\"; };\n\t\t94E659850DDD053900358328 /* jmemnobs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jmemnobs.c; sourceTree = \"<group>\"; };\n\t\t94E659860DDD053900358328 /* jmemsys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jmemsys.h; sourceTree = \"<group>\"; };\n\t\t94E659870DDD053900358328 /* jmorecfg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jmorecfg.h; sourceTree = \"<group>\"; };\n\t\t94E659880DDD053900358328 /* jpegint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jpegint.h; sourceTree = \"<group>\"; };\n\t\t94E659890DDD053900358328 /* jpeglib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jpeglib.h; sourceTree = \"<group>\"; };\n\t\t94E6598A0DDD053900358328 /* JPEGReadWriter2Plugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JPEGReadWriter2Plugin.h; sourceTree = \"<group>\"; };\n\t\t94E6598B0DDD053900358328 /* jquant1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jquant1.c; sourceTree = \"<group>\"; };\n\t\t94E6598C0DDD053900358328 /* jquant2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jquant2.c; sourceTree = \"<group>\"; };\n\t\t94E6598D0DDD053900358328 /* jutils.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jutils.c; sourceTree = \"<group>\"; };\n\t\t94E6598E0DDD053900358328 /* jversion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jversion.h; sourceTree = \"<group>\"; };\n\t\t94E659910DDD053900358328 /* UUIDPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UUIDPlugin.h; sourceTree = \"<group>\"; };\n\t\t94E659930DDD053900358328 /* SoundPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoundPlugin.h; sourceTree = \"<group>\"; };\n\t\t94E659970DDD053900358328 /* b3d.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b3d.h; sourceTree = \"<group>\"; };\n\t\t94E659980DDD053900358328 /* b3dAlloc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = b3dAlloc.c; sourceTree = \"<group>\"; };\n\t\t94E659990DDD053900358328 /* b3dAlloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b3dAlloc.h; sourceTree = \"<group>\"; };\n\t\t94E6599A0DDD053900358328 /* b3dDraw.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = b3dDraw.c; sourceTree = \"<group>\"; };\n\t\t94E6599B0DDD053900358328 /* b3dInit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = b3dInit.c; sourceTree = \"<group>\"; };\n\t\t94E6599C0DDD053900358328 /* b3dMain.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = b3dMain.c; sourceTree = \"<group>\"; };\n\t\t94E6599D0DDD053900358328 /* b3dRemap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = b3dRemap.c; sourceTree = \"<group>\"; };\n\t\t94E6599E0DDD053900358328 /* b3dTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b3dTypes.h; sourceTree = \"<group>\"; };\n\t\t94E659A00DDD053900358328 /* SocketPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SocketPlugin.h; sourceTree = \"<group>\"; };\n\t\t94E659A30DDD053900358328 /* SoundCodecPrims.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoundCodecPrims.h; sourceTree = \"<group>\"; };\n\t\t94E659A40DDD053900358328 /* sqSoundCodecPluginBasicPrims.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqSoundCodecPluginBasicPrims.c; sourceTree = \"<group>\"; };\n\t\t94E65A290DDD053900358328 /* chartables.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = chartables.c; sourceTree = \"<group>\"; };\n\t\t94E65A2B0DDD053900358328 /* get.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = get.c; sourceTree = \"<group>\"; };\n\t\t94E65A2C0DDD053900358328 /* internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = internal.h; sourceTree = \"<group>\"; };\n\t\t94E65A2E0DDD053900358328 /* pcre.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre.c; sourceTree = \"<group>\"; };\n\t\t94E65A2F0DDD053900358328 /* pcre.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pcre.h; sourceTree = \"<group>\"; };\n\t\t94E65A300DDD053900358328 /* rePlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rePlugin.h; sourceTree = \"<group>\"; };\n\t\t94E65A340DDD053900358328 /* study.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = study.c; sourceTree = \"<group>\"; };\n\t\t94EF6CBE11E55947003BA64D /* gcc3x-interp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = \"gcc3x-interp.c\"; sourceTree = \"<group>\"; };\n\t\t94EF6CC011E55947003BA64D /* interp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = interp.h; sourceTree = \"<group>\"; };\n\t\t94F3A9690E6BFA7C00E0B12A /* Squeak.png */ = {isa = PBXFileReference; explicitFileType = image.png; path = Squeak.png; sourceTree = \"<group>\"; };\n\t\t94F8798F0E6C0C7E00662DEA /* sqSqueakIPhoneInfoPlistInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqSqueakIPhoneInfoPlistInterface.h; sourceTree = \"<group>\"; };\n\t\t94F879900E6C0C7E00662DEA /* sqSqueakIPhoneInfoPlistInterface.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = sqSqueakIPhoneInfoPlistInterface.m; sourceTree = \"<group>\"; };\n\t\t94FFF7A40EBE2B9C00C69C79 /* SqueakV39.sources */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = SqueakV39.sources; path = iPhone/SqueakV39.sources; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t1D60588F0D05DD3D006BFB54 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t94D2A24C112B8ED000B6E459 /* QuartzCore.framework in Frameworks */,\n\t\t\t\t945550010DF1BC6A00FB176B /* AudioToolbox.framework in Frameworks */,\n\t\t\t\t94577FBD10684D5E0020840A /* CoreAudio.framework in Frameworks */,\n\t\t\t\t94577FBF10684D5E0020840A /* CoreLocation.framework in Frameworks */,\n\t\t\t\t94577FC510684D7E0020840A /* SystemConfiguration.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t947E62F210AA098300D3B69E /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t947E62FF10AA09C300D3B69E /* Cocoa.framework in Frameworks */,\n\t\t\t\t947E62F410AA098300D3B69E /* AudioToolbox.framework in Frameworks */,\n\t\t\t\t947E62F510AA098300D3B69E /* CoreAudio.framework in Frameworks */,\n\t\t\t\t947E62F710AA098300D3B69E /* SystemConfiguration.framework in Frameworks */,\n\t\t\t\t942ABE6F10AA23E20086D908 /* ApplicationServices.framework in Frameworks */,\n\t\t\t\t94C208F910AF7262002F4160 /* QuartzCore.framework in Frameworks */,\n\t\t\t\t040F22DB12CE1517008BA0CB /* Foundation.framework in Frameworks */,\n\t\t\t\t040F22E412CE155C008BA0CB /* OpenGL.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t040F20B812CE0C84008BA0CB /* UnixOSProcessPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t040F20C112CE0FFB008BA0CB /* UnixOSProcessPlugin.c */,\n\t\t\t);\n\t\t\tpath = UnixOSProcessPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t040F20C312CE1006008BA0CB /* Squeak3D */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t040F20C712CE1057008BA0CB /* Squeak3D.c */,\n\t\t\t);\n\t\t\tname = Squeak3D;\n\t\t\tpath = ../../platforms/iOS/vm/src/vm/intplugins/Squeak3D;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t040F20C912CE1067008BA0CB /* ClipboardExtendedPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t040F20CA12CE10AC008BA0CB /* ClipboardExtendedPlugin.c */,\n\t\t\t);\n\t\t\tname = ClipboardExtendedPlugin;\n\t\t\tpath = ../../platforms/iOS/vm/src/vm/intplugins/ClipboardExtendedPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t040F20E112CE1283008BA0CB /* ObjectiveCPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t040F20E212CE1283008BA0CB /* ObjectiveCPlugin.c */,\n\t\t\t);\n\t\t\tname = ObjectiveCPlugin;\n\t\t\tpath = src/vm/intplugins/ObjectiveCPlugin;\n\t\t\tsourceTree = SOURCE_ROOT;\n\t\t};\n\t\t040F22FA12CE1752008BA0CB /* SoundPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t040F22FB12CE1752008BA0CB /* SoundPlugin.c */,\n\t\t\t);\n\t\t\tname = SoundPlugin;\n\t\t\tpath = src/vm/intplugins/SoundPlugin;\n\t\t\tsourceTree = SOURCE_ROOT;\n\t\t};\n\t\t040F230512CE1AE2008BA0CB /* SqueakFFIPrims */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t040F230612CE1AE2008BA0CB /* SqueakFFIPrims.c */,\n\t\t\t);\n\t\t\tname = SqueakFFIPrims;\n\t\t\tpath = src/vm/intplugins/SqueakFFIPrims;\n\t\t\tsourceTree = SOURCE_ROOT;\n\t\t};\n\t\t040F230C12CE1B28008BA0CB /* HostWindowPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t040F230D12CE1B28008BA0CB /* HostWindowPlugin.c */,\n\t\t\t);\n\t\t\tname = HostWindowPlugin;\n\t\t\tpath = src/vm/intplugins/HostWindowPlugin;\n\t\t\tsourceTree = SOURCE_ROOT;\n\t\t};\n\t\t080E96DDFE201D6D7F000001 /* Classes */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t1D3623240D0F684500981E51 /* SqueakNoOGLIPhoneAppDelegate.h */,\n\t\t\t\t1D3623250D0F684500981E51 /* SqueakNoOGLIPhoneAppDelegate.m */,\n\t\t\t\t942F761B0E0B6B6100848BF2 /* sqSqueakIPhoneApplication.h */,\n\t\t\t\t942F761C0E0B6B6100848BF2 /* sqSqueakIPhoneApplication.m */,\n\t\t\t\t942F76350E0B6CEF00848BF2 /* sqSqueakIPhoneApplication+attributes.h */,\n\t\t\t\t94A0E8450DE5EB6E0071C8B9 /* sqSqueakIPhoneApplication+attributes.m */,\n\t\t\t\t9458525A10F043EB001401E7 /* sqSqueakIPhoneApplication+clipboard.h */,\n\t\t\t\t9458525B10F043EB001401E7 /* sqSqueakIPhoneApplication+clipboard.m */,\n\t\t\t\t943001260E0D5D670040BB27 /* sqSqueakIPhoneApplication+imageReadWrite.h */,\n\t\t\t\t943001270E0D5D670040BB27 /* sqSqueakIPhoneApplication+imageReadWrite.m */,\n\t\t\t\t94BCE93E0DDE044700F38F31 /* sqSqueakIPhoneApplication+events.h */,\n\t\t\t\t94BCE93F0DDE044700F38F31 /* sqSqueakIPhoneApplication+events.m */,\n\t\t\t\t9452BDC10F4095DE006410DE /* sqSqueakIPhoneApplication+Network.h */,\n\t\t\t\t9452BDC20F4095DE006410DE /* sqSqueakIPhoneApplication+Network.m */,\n\t\t\t\t94554F1D0DF1B65700FB176B /* sqSqueakIPhoneApplication+sound.h */,\n\t\t\t\t94554F1E0DF1B65700FB176B /* sqSqueakiPhoneApplication+sound.m */,\n\t\t\t\t943001A30E0D600C0040BB27 /* sqSqueakIPhoneFileDirectoryInterface.h */,\n\t\t\t\t943001A40E0D600C0040BB27 /* sqSqueakIPhoneFileDirectoryInterface.m */,\n\t\t\t\t94F8798F0E6C0C7E00662DEA /* sqSqueakIPhoneInfoPlistInterface.h */,\n\t\t\t\t94F879900E6C0C7E00662DEA /* sqSqueakIPhoneInfoPlistInterface.m */,\n\t\t\t\t9452D7630E0452D3000AD792 /* sqiPhoneScreenAndWindow.h */,\n\t\t\t\t9452D7640E0452D3000AD792 /* sqiPhoneScreenAndWindow.m */,\n\t\t\t\t949E5DB50DE3AB6A007388E0 /* SqueakUIView.h */,\n\t\t\t\t949E5DB60DE3AB6A007388E0 /* SqueakUIView.m */,\n\t\t\t\t942F48FA123C1C0C002B05DF /* SqueakUIViewCALayer.h */,\n\t\t\t\t942F48FB123C1C0C002B05DF /* SqueakUIViewCALayer.m */,\n\t\t\t\t942F48FC123C1C0C002B05DF /* SqueakUIViewOpenGL.h */,\n\t\t\t\t942F48FD123C1C0C002B05DF /* SqueakUIViewOpenGL.m */,\n\t\t\t\t940CE8540DFCE2D200EBA91B /* SqueakUIController.h */,\n\t\t\t\t940CE8550DFCE2D200EBA91B /* SqueakUIController.m */,\n\t\t\t\t9458525410F04339001401E7 /* sqSqueakIPhoneClipboardAPI.h */,\n\t\t\t\t9458525510F04339001401E7 /* sqSqueakIPhoneClipboardAPI.m */,\n\t\t\t);\n\t\t\tpath = Classes;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t19C28FACFE9D520D11CA2CBB /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t1D6058910D05DD3D006BFB54 /* Squeak.app */,\n\t\t\t\t947E62FC10AA098300D3B69E /* Squeak.app */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t9412CAB20E6C037B00DB8625 /* Settings.bundle */,\n\t\t\t\t29B97315FDCFA39411CA2CEA /* Other Sources */,\n\t\t\t\t29B97317FDCFA39411CA2CEA /* Resources */,\n\t\t\t\t948EC38E1155311D00B08A4F /* Resources-iPad */,\n\t\t\t\t29B97323FDCFA39411CA2CEA /* Frameworks */,\n\t\t\t\t19C28FACFE9D520D11CA2CBB /* Products */,\n\t\t\t\t941D1C9A0E696FC7005B77B3 /* Entitlements.plist */,\n\t\t\t\t94C36C9710B0CF290041953A /* Info-iPhone.plist */,\n\t\t\t\t947E5F9F10A9FFA000D3B69E /* SqueakPureObjc-Info.plist */,\n\t\t\t\t949AD14911E542E8006D6BF4 /* SqueakPureObjc-InfoCOG.plist */,\n\t\t\t);\n\t\t\tname = CustomTemplate;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t29B97315FDCFA39411CA2CEA /* Other Sources */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t9424FF570DDCB17F009912BF /* platforms */,\n\t\t\t\t94E658DC0DDD03FE00358328 /* src */,\n\t\t\t\t94EF6CB911E55947003BA64D /* stacksrc */,\n\t\t\t\t947E5F9310A9FF4A00D3B69E /* SqueakPureObjc_Prefix.pch */,\n\t\t\t);\n\t\t\tname = \"Other Sources\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t29B97317FDCFA39411CA2CEA /* Resources */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94B6E9DC10BC777A00333E9E /* Localizable.strings */,\n\t\t\t\t947E64DC10AA18FE00D3B69E /* MainMenu.xib */,\n\t\t\t\t94A349B50DDCDBE200D1D4A9 /* iPhone.image */,\n\t\t\t\t94638B260EAFB77B00A3F155 /* iPhone.changes */,\n\t\t\t\t94FFF7A40EBE2B9C00C69C79 /* SqueakV39.sources */,\n\t\t\t\t944895AD10F4081300FB3EC8 /* PharoV10.sources */,\n\t\t\t\t28AD733E0D9D9553002E5188 /* MainWindow.xib */,\n\t\t\t\t945550910DF2041100FB176B /* Default.png */,\n\t\t\t\t94F3A9690E6BFA7C00E0B12A /* Squeak.png */,\n\t\t\t\t9427E45512628749002DCA6D /* Squeak72x72.png */,\n\t\t\t\t9414421E10BC89440088F8AC /* Squeak.icns */,\n\t\t\t\t9414421F10BC89440088F8AC /* SqueakChanges.icns */,\n\t\t\t\t9414422010BC89440088F8AC /* SqueakGeneric.icns */,\n\t\t\t\t9414422110BC89440088F8AC /* SqueakImage.icns */,\n\t\t\t\t9414422210BC89440088F8AC /* SqueakPlugin.icns */,\n\t\t\t\t9414422310BC89440088F8AC /* SqueakProject.icns */,\n\t\t\t\t9414422410BC89440088F8AC /* SqueakScript.icns */,\n\t\t\t\t9414422510BC89440088F8AC /* SqueakSources.icns */,\n\t\t\t\t94D16CAF10BCF96B00A69A89 /* Credits.rtf */,\n\t\t\t);\n\t\t\tname = Resources;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t29B97323FDCFA39411CA2CEA /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t947E61C410AA03DC00D3B69E /* AppKit.framework */,\n\t\t\t\t947E61C210AA03C300D3B69E /* Cocoa.framework */,\n\t\t\t\t945550000DF1BC6A00FB176B /* AudioToolbox.framework */,\n\t\t\t\t94577FBC10684D5E0020840A /* CoreAudio.framework */,\n\t\t\t\t94577FBE10684D5E0020840A /* CoreLocation.framework */,\n\t\t\t\t94577FC410684D7E0020840A /* SystemConfiguration.framework */,\n\t\t\t\t942ABE6E10AA23E20086D908 /* ApplicationServices.framework */,\n\t\t\t\t94C208F810AF7262002F4160 /* QuartzCore.framework */,\n\t\t\t\t040F22DA12CE1517008BA0CB /* Foundation.framework */,\n\t\t\t\t040F22E312CE155C008BA0CB /* OpenGL.framework */,\n\t\t\t);\n\t\t\tname = Frameworks;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t9424FF570DDCB17F009912BF /* platforms */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94BCE77E0DDDF61200F38F31 /* unix */,\n\t\t\t\t94BCE6880DDDECC200F38F31 /* Cross */,\n\t\t\t\t9424FF590DDCB198009912BF /* iOS */,\n\t\t\t);\n\t\t\tname = platforms;\n\t\t\tpath = ../..;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t9424FF580DDCB18C009912BF /* vm */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t9494935011E527AB0019BC29 /* sqMemoryFence.h */,\n\t\t\t\t949492C011E51C6B0019BC29 /* dispdbg.h */,\n\t\t\t\t949492C111E51C6B0019BC29 /* sqAssert.h */,\n\t\t\t\t949492C211E51C6B0019BC29 /* sqCogStackAlignment.h */,\n\t\t\t\t949492C311E51C6B0019BC29 /* sqExternalSemaphores.c */,\n\t\t\t\t949492C411E51C6B0019BC29 /* sqAtomicOps.h */,\n\t\t\t\t949492C511E51C6B0019BC29 /* sqHeapMap.c */,\n\t\t\t\t949492C611E51C6B0019BC29 /* sqTicker.c */,\n\t\t\t\t9424FF5C0DDCB1C7009912BF /* sqMemoryAccess.h */,\n\t\t\t\t9424FF5D0DDCB1C7009912BF /* sq.h */,\n\t\t\t\t9424FF5E0DDCB1C7009912BF /* sqNamedPrims.c */,\n\t\t\t\t9424FF600DDCB1C7009912BF /* sqVirtualMachine.c */,\n\t\t\t\t9424FF610DDCB1C7009912BF /* sqVirtualMachine.h */,\n\t\t\t);\n\t\t\tpath = vm;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t9424FF590DDCB198009912BF /* iOS */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t947E642610AA0E1100D3B69E /* OSX */,\n\t\t\t\t9452D5EF0E044AC2000AD792 /* Common */,\n\t\t\t\t9424FF5B0DDCB1C7009912BF /* sqGnu.h */,\n\t\t\t\t9424FF5A0DDCB19F009912BF /* iPhone */,\n\t\t\t);\n\t\t\tpath = iOS;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t9424FF5A0DDCB19F009912BF /* iPhone */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94BCE6640DDDEB5000F38F31 /* plugins */,\n\t\t\t\t080E96DDFE201D6D7F000001 /* Classes */,\n\t\t\t\t9424FF650DDCB1EF009912BF /* config.h */,\n\t\t\t\t9424FF710DDCB234009912BF /* macintoshextra.c */,\n\t\t\t\t9424FF720DDCB234009912BF /* macintoshextra.h */,\n\t\t\t\t9424FF750DDCB271009912BF /* osExports.c */,\n\t\t\t\t9424FF660DDCB1EF009912BF /* sqConfig.h */,\n\t\t\t\t9400325C0DEF3936002FA1C4 /* sqDummyaio.c */,\n\t\t\t\t9400325B0DEF3936002FA1C4 /* sqDummyaio.h */,\n\t\t\t\t9424FF670DDCB202009912BF /* sqMacV2Memory.c */,\n\t\t\t\t9424FF680DDCB202009912BF /* sqMacV2Memory.h */,\n\t\t\t\t9424FF640DDCB1EF009912BF /* sqPlatformSpecific.h */,\n\t\t\t);\n\t\t\tname = iPhone;\n\t\t\tpath = vm/iPhone;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t943B9B271235BD960056205E /* HostWindowPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t943B9B281235BDD20056205E /* sqMacHostWindow.m */,\n\t\t\t\t943B9B291235BDD20056205E /* sqMacHostWindow.h */,\n\t\t\t);\n\t\t\tname = HostWindowPlugin;\n\t\t\tpath = vm/OSX/plugins/HostWindowPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t944069CC10E6B63200353B27 /* MacMenubarPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t944069CD10E6B63200353B27 /* MacMenubarPlugin.c */,\n\t\t\t);\n\t\t\tpath = MacMenubarPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t9452D5EF0E044AC2000AD792 /* Common */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t29B97316FDCFA39411CA2CEA /* main.m */,\n\t\t\t\t9478E0220EC8D957007096A7 /* plugins */,\n\t\t\t\t9452D5F00E044AD1000AD792 /* Classes */,\n\t\t\t);\n\t\t\tname = Common;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t9452D5F00E044AD1000AD792 /* Classes */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t9452D5D70E044A9D000AD792 /* Queue.h */,\n\t\t\t\t9452D5D80E044A9D000AD792 /* Queue.m */,\n\t\t\t\t9452D5D90E044A9D000AD792 /* sqMacV2Time.c */,\n\t\t\t\t9452D5DA0E044A9D000AD792 /* sqMacV2Time.h */,\n\t\t\t\t9471D2DF0E04743F00703D45 /* sqSqueakAppDelegate.h */,\n\t\t\t\t9471D2E00E04743F00703D45 /* sqSqueakAppDelegate.m */,\n\t\t\t\t9452D5DB0E044A9D000AD792 /* sqSqueakFileDirectoryAPI.h */,\n\t\t\t\t9452D5DC0E044A9D000AD792 /* sqSqueakFileDirectoryAPI.m */,\n\t\t\t\t9452D5DD0E044A9D000AD792 /* sqSqueakFileDirectoryInterface.h */,\n\t\t\t\t9452D5DE0E044A9D000AD792 /* sqSqueakFileDirectoryInterface.m */,\n\t\t\t\t9412CAE40E6C05EC00DB8625 /* sqSqueakInfoPlistInterface.h */,\n\t\t\t\t9412CAE50E6C05EC00DB8625 /* sqSqueakInfoPlistInterface.m */,\n\t\t\t\t9452D5DF0E044A9D000AD792 /* sqSqueakMainApp.m */,\n\t\t\t\t9452D5E00E044A9D000AD792 /* sqSqueakMainApp.h */,\n\t\t\t\t9452D5E30E044A9D000AD792 /* sqSqueakMainApplication.h */,\n\t\t\t\t9452D5E40E044A9D000AD792 /* sqSqueakMainApplication.m */,\n\t\t\t\t94A0E8440DE5EB6E0071C8B9 /* sqSqueakMainApplication+attributes.h */,\n\t\t\t\t942F76310E0B6C7600848BF2 /* sqSqueakMainApplication+attributes.m */,\n\t\t\t\t9452D6010E044CB3000AD792 /* sqSqueakAttributesAPI.h */,\n\t\t\t\t9452D6020E044CB3000AD792 /* sqSqueakAttributesAPI.m */,\n\t\t\t\t94A1B0050E0DBE2400EB5EFC /* sqSqueakMainApplication+events.h */,\n\t\t\t\t94A1B0060E0DBE2400EB5EFC /* sqSqueakMainApplication+events.m */,\n\t\t\t\t9452D6060E044D2F000AD792 /* sqSqueakEventsAPI.h */,\n\t\t\t\t9452D6070E044D2F000AD792 /* sqSqueakEventsAPI.m */,\n\t\t\t\t94A0E8830DE5EF430071C8B9 /* sqSqueakMainApplication+imageReadWrite.h */,\n\t\t\t\t94A0E8840DE5EF430071C8B9 /* sqSqueakMainApplication+imageReadWrite.m */,\n\t\t\t\t94A1B0300E0DC19300EB5EFC /* sqSqueakMainApplication+sound.h */,\n\t\t\t\t94A1B0310E0DC19300EB5EFC /* sqSqueakMainApplication+sound.m */,\n\t\t\t\t94A1B02B0E0DC10D00EB5EFC /* sqSqueakSoundAPI.h */,\n\t\t\t\t94A1B02C0E0DC10D00EB5EFC /* sqSqueakSoundAPI.m */,\n\t\t\t\t9452D5E10E044A9D000AD792 /* sqSqueakMainApplication+vmAndImagePath.h */,\n\t\t\t\t9452D5E20E044A9D000AD792 /* sqSqueakMainApplication+vmAndImagePath.m */,\n\t\t\t\t942F75D10E0B67AD00848BF2 /* sqSqueakVmAndImagePathAPI.h */,\n\t\t\t\t942F75D20E0B67AD00848BF2 /* sqSqueakVmAndImagePathAPI.m */,\n\t\t\t\t94A0E9820DE5F1FE0071C8B9 /* sqSqueakMainApplication+screen.h */,\n\t\t\t\t94A0E9830DE5F1FE0071C8B9 /* sqSqueakMainApplication+screen.m */,\n\t\t\t\t94A3488C0DDCCCC700D1D4A9 /* sqSqueakScreenAPI.h */,\n\t\t\t\t94A3488D0DDCCCC700D1D4A9 /* sqSqueakScreenAPI.m */,\n\t\t\t\t9471D2710E04703B00703D45 /* sqSqueakScreenAndWindow.h */,\n\t\t\t\t9471D2720E04703B00703D45 /* sqSqueakScreenAndWindow.m */,\n\t\t\t\t94C3687B10AFA8300041953A /* sqSqueakCursorAPI.h */,\n\t\t\t\t94C3687C10AFA8300041953A /* sqSqueakCursorAPI.m */,\n\t\t\t\t94C3688A10AFA9EF0041953A /* sqSqueakMainApplication+cursor.h */,\n\t\t\t\t94C3688B10AFA9EF0041953A /* sqSqueakMainApplication+cursor.m */,\n\t\t\t);\n\t\t\tname = Classes;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94584FD810F02378001401E7 /* ClipboardExtended */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94584FD910F02378001401E7 /* sqMacExtendedClipboard.m */,\n\t\t\t\t94584FDA10F02378001401E7 /* sqMacExtendedClipboard.h */,\n\t\t\t);\n\t\t\tname = ClipboardExtended;\n\t\t\tpath = plugins/ClipboardExtended;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t945851ED10F03E60001401E7 /* ClipboardExtended */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t945851EE10F03E60001401E7 /* sqMacExtendedClipboard.h */,\n\t\t\t\t945851EF10F03E60001401E7 /* sqMacExtendedClipboard.m */,\n\t\t\t);\n\t\t\tpath = ClipboardExtended;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t9463943C0E95845000015851 /* SqueakObjectiveC */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t9463943E0E95845000015851 /* squeakSUnitTester.m */,\n\t\t\t\t9463943D0E95845000015851 /* squeakSUnitTester.h */,\n\t\t\t);\n\t\t\tname = SqueakObjectiveC;\n\t\t\tpath = ../plugins/SqueakObjectiveC;\n\t\t\tsourceTree = SOURCE_ROOT;\n\t\t};\n\t\t946DA8D110C0C30D00F26F56 /* DropPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t946DA8D210C0C30D00F26F56 /* DropPlugin.c */,\n\t\t\t);\n\t\t\tpath = DropPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t946DA8EE10C0C38600F26F56 /* DropPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t946DA8EF10C0C38600F26F56 /* DropPlugin.h */,\n\t\t\t);\n\t\t\tpath = DropPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t9478E0220EC8D957007096A7 /* plugins */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t9478E0230EC8D957007096A7 /* SoundPlugin */,\n\t\t\t\t9478E0240EC8D957007096A7 /* SqueakFFIPrims */,\n\t\t\t\t9478E0270EC8D957007096A7 /* SqueakObjectiveC */,\n\t\t\t\t94BCEAF10DDE16B400F38F31 /* SecurityPlugin */,\n\t\t\t);\n\t\t\tpath = plugins;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t9478E0230EC8D957007096A7 /* SoundPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t9478E0320EC8D98F007096A7 /* sqSqueakSoundCoreAudioAPI.h */,\n\t\t\t\t9478E0330EC8D98F007096A7 /* sqSqueakSoundCoreAudioAPI.m */,\n\t\t\t\t9478E05E0EC8DCFB007096A7 /* sqSqueakSoundCoreAudio.h */,\n\t\t\t\t9478E05F0EC8DCFB007096A7 /* sqSqueakSoundCoreAudio.m */,\n\t\t\t);\n\t\t\tpath = SoundPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t9478E0240EC8D957007096A7 /* SqueakFFIPrims */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t9478E0250EC8D957007096A7 /* dummyFFI.c */,\n\t\t\t\t9478E0260EC8D957007096A7 /* dummyFFI.h */,\n\t\t\t);\n\t\t\tpath = SqueakFFIPrims;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t9478E0270EC8D957007096A7 /* SqueakObjectiveC */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t9402F2C50F3F9C5600F3D637 /* drawing.m */,\n\t\t\t\t9402F2AE0F3F9BB900F3D637 /* PDColoredProgressView.h */,\n\t\t\t\t9402F2AF0F3F9BB900F3D637 /* PDColoredProgressView.m */,\n\t\t\t\t9478E02A0EC8D957007096A7 /* squeakSUnitTester.h */,\n\t\t\t\t9478E02B0EC8D957007096A7 /* squeakSUnitTester.m */,\n\t\t\t\t941724430F36624C0031AF33 /* squeakProxy.h */,\n\t\t\t\t941724420F36624C0031AF33 /* squeakProxy.m */,\n\t\t\t);\n\t\t\tpath = SqueakObjectiveC;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t947E20F80EB2826C007957D0 /* SqueakFFIPrims */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94BD816F11C8A58D00556751 /* sqManualSurface.c */,\n\t\t\t\t947E20F90EB2826C007957D0 /* sqFFI.h */,\n\t\t\t);\n\t\t\tpath = SqueakFFIPrims;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t947E21300EB28650007957D0 /* SqueakFFIPrims */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t947E21310EB2868A007957D0 /* dummyFFI.h */,\n\t\t\t\t947E21320EB2868A007957D0 /* dummyFFI.c */,\n\t\t\t);\n\t\t\tpath = SqueakFFIPrims;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t947E642610AA0E1100D3B69E /* OSX */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94C4B82C10C06F0D00CD4F90 /* plugins */,\n\t\t\t\t947E647610AA0FF200D3B69E /* Classes */,\n\t\t\t);\n\t\t\tname = OSX;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t947E647610AA0FF200D3B69E /* Classes */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t947E647910AA100900D3B69E /* SqueakOSXAppDelegate.h */,\n\t\t\t\t947E647A10AA100900D3B69E /* SqueakOSXAppDelegate.m */,\n\t\t\t\t947E642710AA0E9E00D3B69E /* sqMacV2Browser.h */,\n\t\t\t\t947E642810AA0E9E00D3B69E /* sqMacV2Browser.m */,\n\t\t\t\t946DA9FF10C0D35500F26F56 /* sqMacUnixExternalPrims.m */,\n\t\t\t\t947E64CA10AA16FE00D3B69E /* sqSqueakOSXApplication.h */,\n\t\t\t\t947E64CB10AA16FE00D3B69E /* sqSqueakOSXApplication.m */,\n\t\t\t\t94BCABBF10AB72A600F87527 /* sqSqueakOSXFileDirectoryInterface.h */,\n\t\t\t\t94BCABC010AB72A600F87527 /* sqSqueakOSXFileDirectoryInterface.m */,\n\t\t\t\t94BCAD1B10AB942300F87527 /* sqSqueakOSXApplication+attributes.h */,\n\t\t\t\t94BCAD1C10AB942300F87527 /* sqSqueakOSXApplication+attributes.m */,\n\t\t\t\t94BCAE6710ACA10100F87527 /* sqSqueakOSXInfoPlistInterface.h */,\n\t\t\t\t94BCAE6810ACA10100F87527 /* sqSqueakOSXInfoPlistInterface.m */,\n\t\t\t\t94C887F910ADCEFC007CB39E /* sqSqueakOSXApplication+imageReadWrite.h */,\n\t\t\t\t94C887FA10ADCEFC007CB39E /* sqSqueakOSXApplication+imageReadWrite.m */,\n\t\t\t\t94C88BDD10AF3C52007CB39E /* sqSqueakOSXScreenAndWindow.h */,\n\t\t\t\t94C88BDE10AF3C52007CB39E /* sqSqueakOSXScreenAndWindow.m */,\n\t\t\t\t94C2068810AF4F53002F4160 /* sqSqueakOSXNSView.h */,\n\t\t\t\t94C2068910AF4F53002F4160 /* sqSqueakOSXNSView.m */,\n\t\t\t\t9402DD6F10CE0E91005C2102 /* SqViewClut.m */,\n\t\t\t\t94B8F54E10CF677800F0DD6B /* SqViewClut.h */,\n\t\t\t\t94D3654D10CEC86C00805023 /* BitMapConversionLogicFromX11.h */,\n\t\t\t\t94D3654E10CEC86C00805023 /* BitMapConversionLogicFromX11.c */,\n\t\t\t\t9402DD5E10CE0C16005C2102 /* SqViewBitmapConversion.h */,\n\t\t\t\t9402DD5F10CE0C16005C2102 /* SqViewBitmapConversion.m */,\n\t\t\t\t94C3682410AFA39A0041953A /* macintoshosxextra.h */,\n\t\t\t\t94C3682510AFA39A0041953A /* macintoshosxextra.c */,\n\t\t\t\t94C3687610AFA77F0041953A /* sqSqueakOSXApplication+cursor.h */,\n\t\t\t\t94C3687710AFA77F0041953A /* sqSqueakOSXApplication+cursor.m */,\n\t\t\t\t94C36A9210B09EE70041953A /* sqSqueakOSXApplication+events.h */,\n\t\t\t\t94C36A9310B09EE70041953A /* sqSqueakOSXApplication+events.m */,\n\t\t\t\t94A1B21A10B9DE0300C64473 /* keyBoardStrokeDetails.h */,\n\t\t\t\t94A1B21B10B9DE0300C64473 /* keyBoardStrokeDetails.m */,\n\t\t\t\t9492452F10BA43AA00E726F5 /* SqueakOSXApplication.h */,\n\t\t\t\t9492453010BA43AA00E726F5 /* SqueakOSXApplication.m */,\n\t\t\t\t9428BA9510BB440800DAD287 /* sqSqueakOSXClipboardAPI.h */,\n\t\t\t\t9428BA9610BB440800DAD287 /* sqSqueakOSXClipboardAPI.m */,\n\t\t\t\t9428BB0410BB478600DAD287 /* sqSqueakOSXApplication+clipboard.h */,\n\t\t\t\t9428BB0510BB478600DAD287 /* sqSqueakOSXApplication+clipboard.m */,\n\t\t\t\t946DA91310C0C71100F26F56 /* sqSqueakOSXDropAPI.h */,\n\t\t\t\t946DA91410C0C71100F26F56 /* sqSqueakOSXDropAPI.m */,\n\t\t\t);\n\t\t\tname = Classes;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94883B3F0E0C2B9C005A4738 /* SocketPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94883B400E0C2B9C005A4738 /* sqUnixSocket.c */,\n\t\t\t\t949493BF11E52ADE0019BC29 /* aio.c */,\n\t\t\t);\n\t\t\tpath = SocketPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t948EC38E1155311D00B08A4F /* Resources-iPad */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t948EC38F1155312600B08A4F /* MainWindow-iPad.xib */,\n\t\t\t);\n\t\t\tname = \"Resources-iPad\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t9494932B11E527180019BC29 /* vm */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t9494932C11E527180019BC29 /* sqUnixHeartbeat.c */,\n\t\t\t\t9494932D11E527180019BC29 /* sqUnixThreads.c */,\n\t\t\t\t9494932E11E527180019BC29 /* sqUnixVMProfile.c */,\n\t\t\t);\n\t\t\tpath = vm;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94B9528410E6B79E00DC476A /* MacMenubarPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94B9528510E6B79E00DC476A /* MacMenubarPlugin.h */,\n\t\t\t\t94B9533310E6BD7100DC476A /* MacMenuOS9ToOSX.h */,\n\t\t\t\t94B9533410E6BD7100DC476A /* MacMenuOS9ToOSX.m */,\n\t\t\t);\n\t\t\tname = MacMenubarPlugin;\n\t\t\tpath = plugins/MacMenubarPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94BCE6640DDDEB5000F38F31 /* plugins */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t945851ED10F03E60001401E7 /* ClipboardExtended */,\n\t\t\t\t947E21300EB28650007957D0 /* SqueakFFIPrims */,\n\t\t\t\t94BCE6650DDDEB5000F38F31 /* HostWindowPlugin */,\n\t\t\t);\n\t\t\tpath = plugins;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94BCE6650DDDEB5000F38F31 /* HostWindowPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94BCEA2B0DDE0C1600F38F31 /* sqMacHostWindow.c */,\n\t\t\t\t94BCE6660DDDEB5000F38F31 /* sqMacHostWindow.h */,\n\t\t\t);\n\t\t\tpath = HostWindowPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94BCE6860DDDECB800F38F31 /* HostWindowPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94BCE6870DDDECB800F38F31 /* HostWindowPlugin.h */,\n\t\t\t);\n\t\t\tpath = HostWindowPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94BCE6880DDDECC200F38F31 /* Cross */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t9424FF580DDCB18C009912BF /* vm */,\n\t\t\t\t94BCE6890DDDECD600F38F31 /* plugins */,\n\t\t\t);\n\t\t\tpath = Cross;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94BCE6890DDDECD600F38F31 /* plugins */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E659420DDD04FA00358328 /* AsynchFilePlugin */,\n\t\t\t\t946DA8EE10C0C38600F26F56 /* DropPlugin */,\n\t\t\t\t94E659440DDD04FA00358328 /* FilePlugin */,\n\t\t\t\t94BCE6860DDDECB800F38F31 /* HostWindowPlugin */,\n\t\t\t\t94E659510DDD053900358328 /* JPEGReadWriter2Plugin */,\n\t\t\t\t94E65A280DDD053900358328 /* RePlugin */,\n\t\t\t\t94E6594C0DDD053900358328 /* SecurityPlugin */,\n\t\t\t\t94E6599F0DDD053900358328 /* SocketPlugin */,\n\t\t\t\t94E659A20DDD053900358328 /* SoundCodecPrims */,\n\t\t\t\t94E6594E0DDD053900358328 /* SoundGenerationPlugin */,\n\t\t\t\t94E659920DDD053900358328 /* SoundPlugin */,\n\t\t\t\t9463943C0E95845000015851 /* SqueakObjectiveC */,\n\t\t\t\t94E659960DDD053900358328 /* Squeak3D */,\n\t\t\t\t947E20F80EB2826C007957D0 /* SqueakFFIPrims */,\n\t\t\t\t94E659480DDD053900358328 /* SurfacePlugin */,\n\t\t\t\t94E659900DDD053900358328 /* UUIDPlugin */,\n\t\t\t);\n\t\t\tpath = plugins;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94BCE77E0DDDF61200F38F31 /* unix */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94BCE7A60DDDF8F800F38F31 /* sqaio.h */,\n\t\t\t\t9494932B11E527180019BC29 /* vm */,\n\t\t\t\t94BCE77F0DDDF61200F38F31 /* plugins */,\n\t\t\t);\n\t\t\tpath = unix;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94BCE77F0DDDF61200F38F31 /* plugins */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94883B3F0E0C2B9C005A4738 /* SocketPlugin */,\n\t\t\t\t94BCE7840DDDF61200F38F31 /* UUIDPlugin */,\n\t\t\t);\n\t\t\tpath = plugins;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94BCE7840DDDF61200F38F31 /* UUIDPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94BCE7870DDDF61200F38F31 /* sqUnixUUID.c */,\n\t\t\t);\n\t\t\tpath = UUIDPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94BCEAF10DDE16B400F38F31 /* SecurityPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94BCEAF20DDE16B400F38F31 /* sqMacSecurity.c */,\n\t\t\t);\n\t\t\tpath = SecurityPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94C4B82C10C06F0D00CD4F90 /* plugins */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t943B9B271235BD960056205E /* HostWindowPlugin */,\n\t\t\t\t94584FD810F02378001401E7 /* ClipboardExtended */,\n\t\t\t\t94B9528410E6B79E00DC476A /* MacMenubarPlugin */,\n\t\t\t\t94C4B82D10C06F1800CD4F90 /* SoundPlugin */,\n\t\t\t);\n\t\t\tname = plugins;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94C4B82D10C06F1800CD4F90 /* SoundPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94C4B82E10C06F8800CD4F90 /* sqSqueakOSXSoundCoreAudio.h */,\n\t\t\t\t94C4B82F10C06F8800CD4F90 /* sqSqueakOSXSoundCoreAudio.m */,\n\t\t\t);\n\t\t\tname = SoundPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E658DC0DDD03FE00358328 /* src */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E658DD0DDD03FE00358328 /* plugins */,\n\t\t\t\t94E658DF0DDD03FE00358328 /* vm */,\n\t\t\t);\n\t\t\tname = src;\n\t\t\tpath = ../../../src;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E658DD0DDD03FE00358328 /* plugins */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t);\n\t\t\tpath = plugins;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E658DF0DDD03FE00358328 /* vm */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t9494927D11E5178D0019BC29 /* cogit.c */,\n\t\t\t\t9494927E11E5178D0019BC29 /* cogit.h */,\n\t\t\t\t9494927F11E5178D0019BC29 /* cogmethod.h */,\n\t\t\t\t9494928011E5178D0019BC29 /* gcc3x-cointerp.c */,\n\t\t\t\t9494928111E5178D0019BC29 /* cointerp.h */,\n\t\t\t\t94E658E10DDD03FE00358328 /* interp.h */,\n\t\t\t\t94E658E20DDD03FE00358328 /* plugins */,\n\t\t\t\t94E659200DDD03FE00358328 /* sqNamedPrims.h */,\n\t\t\t);\n\t\t\tpath = vm;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E658E20DDD03FE00358328 /* plugins */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t040F230C12CE1B28008BA0CB /* HostWindowPlugin */,\n\t\t\t\t040F230512CE1AE2008BA0CB /* SqueakFFIPrims */,\n\t\t\t\t040F22FA12CE1752008BA0CB /* SoundPlugin */,\n\t\t\t\t040F20E112CE1283008BA0CB /* ObjectiveCPlugin */,\n\t\t\t\t040F20C912CE1067008BA0CB /* ClipboardExtendedPlugin */,\n\t\t\t\t040F20C312CE1006008BA0CB /* Squeak3D */,\n\t\t\t\t040F20B812CE0C84008BA0CB /* UnixOSProcessPlugin */,\n\t\t\t\t94E658E30DDD03FE00358328 /* ADPCMCodecPlugin */,\n\t\t\t\t94E658E50DDD03FE00358328 /* B2DPlugin */,\n\t\t\t\t94E658E90DDD03FE00358328 /* BitBltPlugin */,\n\t\t\t\t94E658EB0DDD03FE00358328 /* BMPReadWriterPlugin */,\n\t\t\t\t946DA8D110C0C30D00F26F56 /* DropPlugin */,\n\t\t\t\t94E658EF0DDD03FE00358328 /* DSAPrims */,\n\t\t\t\t94E658F10DDD03FE00358328 /* FFTPlugin */,\n\t\t\t\t94E658F30DDD03FE00358328 /* FilePlugin */,\n\t\t\t\t94E658F50DDD03FE00358328 /* FloatArrayPlugin */,\n\t\t\t\t94E658F70DDD03FE00358328 /* GeniePlugin */,\n\t\t\t\t94E658FD0DDD03FE00358328 /* JPEGReaderPlugin */,\n\t\t\t\t94E658FF0DDD03FE00358328 /* JPEGReadWriter2Plugin */,\n\t\t\t\t94E659010DDD03FE00358328 /* Klatt */,\n\t\t\t\t94E659030DDD03FE00358328 /* LargeIntegers */,\n\t\t\t\t944069CC10E6B63200353B27 /* MacMenubarPlugin */,\n\t\t\t\t94E659050DDD03FE00358328 /* Matrix2x3Plugin */,\n\t\t\t\t94E659070DDD03FE00358328 /* MIDIPlugin */,\n\t\t\t\t94E659090DDD03FE00358328 /* MiscPrimitivePlugin */,\n\t\t\t\t94E6590B0DDD03FE00358328 /* RePlugin */,\n\t\t\t\t94E6590D0DDD03FE00358328 /* SecurityPlugin */,\n\t\t\t\t94E6590F0DDD03FE00358328 /* SocketPlugin */,\n\t\t\t\t94E659110DDD03FE00358328 /* SoundCodecPrims */,\n\t\t\t\t94E659130DDD03FE00358328 /* SoundGenerationPlugin */,\n\t\t\t\t94E659190DDD03FE00358328 /* StarSqueakPlugin */,\n\t\t\t\t94E6591B0DDD03FE00358328 /* SurfacePlugin */,\n\t\t\t\t94E6591C0DDD03FE00358328 /* UUIDPlugin */,\n\t\t\t\t94E6591E0DDD03FE00358328 /* ZipPlugin */,\n\t\t\t);\n\t\t\tname = plugins;\n\t\t\tpath = ../plugins;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E658E30DDD03FE00358328 /* ADPCMCodecPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E658E40DDD03FE00358328 /* ADPCMCodecPlugin.c */,\n\t\t\t);\n\t\t\tpath = ADPCMCodecPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E658E50DDD03FE00358328 /* B2DPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E658E60DDD03FE00358328 /* B2DPlugin.c */,\n\t\t\t);\n\t\t\tpath = B2DPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E658E90DDD03FE00358328 /* BitBltPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E658EA0DDD03FE00358328 /* BitBltPlugin.c */,\n\t\t\t);\n\t\t\tpath = BitBltPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E658EB0DDD03FE00358328 /* BMPReadWriterPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E658EC0DDD03FE00358328 /* BMPReadWriterPlugin.c */,\n\t\t\t);\n\t\t\tpath = BMPReadWriterPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E658EF0DDD03FE00358328 /* DSAPrims */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E658F00DDD03FE00358328 /* DSAPrims.c */,\n\t\t\t);\n\t\t\tpath = DSAPrims;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E658F10DDD03FE00358328 /* FFTPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E658F20DDD03FE00358328 /* FFTPlugin.c */,\n\t\t\t);\n\t\t\tpath = FFTPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E658F30DDD03FE00358328 /* FilePlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E658F40DDD03FE00358328 /* FilePlugin.c */,\n\t\t\t);\n\t\t\tpath = FilePlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E658F50DDD03FE00358328 /* FloatArrayPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E658F60DDD03FE00358328 /* FloatArrayPlugin.c */,\n\t\t\t);\n\t\t\tpath = FloatArrayPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E658F70DDD03FE00358328 /* GeniePlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E658F80DDD03FE00358328 /* GeniePlugin.c */,\n\t\t\t);\n\t\t\tpath = GeniePlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E658FD0DDD03FE00358328 /* JPEGReaderPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E658FE0DDD03FE00358328 /* JPEGReaderPlugin.c */,\n\t\t\t);\n\t\t\tpath = JPEGReaderPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E658FF0DDD03FE00358328 /* JPEGReadWriter2Plugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E659000DDD03FE00358328 /* JPEGReadWriter2Plugin.c */,\n\t\t\t);\n\t\t\tpath = JPEGReadWriter2Plugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E659010DDD03FE00358328 /* Klatt */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E659020DDD03FE00358328 /* Klatt.c */,\n\t\t\t);\n\t\t\tpath = Klatt;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E659030DDD03FE00358328 /* LargeIntegers */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E659040DDD03FE00358328 /* LargeIntegers.c */,\n\t\t\t);\n\t\t\tpath = LargeIntegers;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E659050DDD03FE00358328 /* Matrix2x3Plugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E659060DDD03FE00358328 /* Matrix2x3Plugin.c */,\n\t\t\t);\n\t\t\tpath = Matrix2x3Plugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E659070DDD03FE00358328 /* MIDIPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E659080DDD03FE00358328 /* MIDIPlugin.c */,\n\t\t\t);\n\t\t\tpath = MIDIPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E659090DDD03FE00358328 /* MiscPrimitivePlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E6590A0DDD03FE00358328 /* MiscPrimitivePlugin.c */,\n\t\t\t);\n\t\t\tpath = MiscPrimitivePlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E6590B0DDD03FE00358328 /* RePlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E6590C0DDD03FE00358328 /* RePlugin.c */,\n\t\t\t);\n\t\t\tpath = RePlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E6590D0DDD03FE00358328 /* SecurityPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E6590E0DDD03FE00358328 /* SecurityPlugin.c */,\n\t\t\t);\n\t\t\tpath = SecurityPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E6590F0DDD03FE00358328 /* SocketPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E659100DDD03FE00358328 /* SocketPlugin.c */,\n\t\t\t);\n\t\t\tpath = SocketPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E659110DDD03FE00358328 /* SoundCodecPrims */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E659120DDD03FE00358328 /* SoundCodecPrims.c */,\n\t\t\t);\n\t\t\tpath = SoundCodecPrims;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E659130DDD03FE00358328 /* SoundGenerationPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E659140DDD03FE00358328 /* SoundGenerationPlugin.c */,\n\t\t\t);\n\t\t\tpath = SoundGenerationPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E659190DDD03FE00358328 /* StarSqueakPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E6591A0DDD03FE00358328 /* StarSqueakPlugin.c */,\n\t\t\t);\n\t\t\tpath = StarSqueakPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E6591B0DDD03FE00358328 /* SurfacePlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t);\n\t\t\tpath = SurfacePlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E6591C0DDD03FE00358328 /* UUIDPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E6591D0DDD03FE00358328 /* UUIDPlugin.c */,\n\t\t\t);\n\t\t\tpath = UUIDPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E6591E0DDD03FE00358328 /* ZipPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E6591F0DDD03FE00358328 /* ZipPlugin.c */,\n\t\t\t);\n\t\t\tpath = ZipPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E659420DDD04FA00358328 /* AsynchFilePlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E659430DDD04FA00358328 /* AsynchFilePlugin.h */,\n\t\t\t);\n\t\t\tpath = AsynchFilePlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E659440DDD04FA00358328 /* FilePlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E659450DDD04FA00358328 /* FilePlugin.h */,\n\t\t\t\t94E659460DDD04FA00358328 /* sqFilePluginBasicPrims.c */,\n\t\t\t);\n\t\t\tpath = FilePlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E659480DDD053900358328 /* SurfacePlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E659490DDD053900358328 /* SurfacePlugin.c */,\n\t\t\t\t94E6594A0DDD053900358328 /* SurfacePlugin.h */,\n\t\t\t);\n\t\t\tpath = SurfacePlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E6594C0DDD053900358328 /* SecurityPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E6594D0DDD053900358328 /* SecurityPlugin.h */,\n\t\t\t);\n\t\t\tpath = SecurityPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E6594E0DDD053900358328 /* SoundGenerationPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E6594F0DDD053900358328 /* SoundGenerationPlugin.h */,\n\t\t\t);\n\t\t\tpath = SoundGenerationPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E659510DDD053900358328 /* JPEGReadWriter2Plugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E659520DDD053900358328 /* Error.c */,\n\t\t\t\t94E659530DDD053900358328 /* jcapimin.c */,\n\t\t\t\t94E659540DDD053900358328 /* jcapistd.c */,\n\t\t\t\t94E659550DDD053900358328 /* jccoefct.c */,\n\t\t\t\t94E659560DDD053900358328 /* jccolor.c */,\n\t\t\t\t94E659570DDD053900358328 /* jcdctmgr.c */,\n\t\t\t\t94E659580DDD053900358328 /* jchuff.c */,\n\t\t\t\t94E659590DDD053900358328 /* jchuff.h */,\n\t\t\t\t94E6595A0DDD053900358328 /* jcinit.c */,\n\t\t\t\t94E6595B0DDD053900358328 /* jcmainct.c */,\n\t\t\t\t94E6595C0DDD053900358328 /* jcmarker.c */,\n\t\t\t\t94E6595D0DDD053900358328 /* jcmaster.c */,\n\t\t\t\t94E6595E0DDD053900358328 /* jcomapi.c */,\n\t\t\t\t94E6595F0DDD053900358328 /* jconfig.h */,\n\t\t\t\t94E659600DDD053900358328 /* jcparam.c */,\n\t\t\t\t94E659610DDD053900358328 /* jcphuff.c */,\n\t\t\t\t94E659620DDD053900358328 /* jcprepct.c */,\n\t\t\t\t94E659630DDD053900358328 /* jcsample.c */,\n\t\t\t\t94E659640DDD053900358328 /* jctrans.c */,\n\t\t\t\t94E659650DDD053900358328 /* jdapimin.c */,\n\t\t\t\t94E659660DDD053900358328 /* jdapistd.c */,\n\t\t\t\t94E659670DDD053900358328 /* jdatadst.c */,\n\t\t\t\t94E659680DDD053900358328 /* jdatasrc.c */,\n\t\t\t\t94E659690DDD053900358328 /* jdcoefct.c */,\n\t\t\t\t94E6596A0DDD053900358328 /* jdcolor.c */,\n\t\t\t\t94E6596B0DDD053900358328 /* jdct.h */,\n\t\t\t\t94E6596C0DDD053900358328 /* jddctmgr.c */,\n\t\t\t\t94E6596D0DDD053900358328 /* jdhuff.c */,\n\t\t\t\t94E6596E0DDD053900358328 /* jdhuff.h */,\n\t\t\t\t94E6596F0DDD053900358328 /* jdinput.c */,\n\t\t\t\t94E659700DDD053900358328 /* jdmainct.c */,\n\t\t\t\t94E659710DDD053900358328 /* jdmarker.c */,\n\t\t\t\t94E659720DDD053900358328 /* jdmaster.c */,\n\t\t\t\t94E659730DDD053900358328 /* jdmerge.c */,\n\t\t\t\t94E659740DDD053900358328 /* jdphuff.c */,\n\t\t\t\t94E659750DDD053900358328 /* jdpostct.c */,\n\t\t\t\t94E659760DDD053900358328 /* jdsample.c */,\n\t\t\t\t94E659770DDD053900358328 /* jdtrans.c */,\n\t\t\t\t94E659780DDD053900358328 /* jerror.c */,\n\t\t\t\t94E659790DDD053900358328 /* jerror.h */,\n\t\t\t\t94E6597A0DDD053900358328 /* jfdctflt.c */,\n\t\t\t\t94E6597B0DDD053900358328 /* jfdctfst.c */,\n\t\t\t\t94E6597C0DDD053900358328 /* jfdctint.c */,\n\t\t\t\t94E6597D0DDD053900358328 /* jidctflt.c */,\n\t\t\t\t94E6597E0DDD053900358328 /* jidctfst.c */,\n\t\t\t\t94E6597F0DDD053900358328 /* jidctint.c */,\n\t\t\t\t94E659800DDD053900358328 /* jidctred.c */,\n\t\t\t\t94E659810DDD053900358328 /* jinclude.h */,\n\t\t\t\t94E659820DDD053900358328 /* jmemdatadst.c */,\n\t\t\t\t94E659830DDD053900358328 /* jmemdatasrc.c */,\n\t\t\t\t94E659840DDD053900358328 /* jmemmgr.c */,\n\t\t\t\t94E659850DDD053900358328 /* jmemnobs.c */,\n\t\t\t\t94E659860DDD053900358328 /* jmemsys.h */,\n\t\t\t\t94E659870DDD053900358328 /* jmorecfg.h */,\n\t\t\t\t94E659880DDD053900358328 /* jpegint.h */,\n\t\t\t\t94E659890DDD053900358328 /* jpeglib.h */,\n\t\t\t\t94E6598A0DDD053900358328 /* JPEGReadWriter2Plugin.h */,\n\t\t\t\t94E6598B0DDD053900358328 /* jquant1.c */,\n\t\t\t\t94E6598C0DDD053900358328 /* jquant2.c */,\n\t\t\t\t94E6598D0DDD053900358328 /* jutils.c */,\n\t\t\t\t94E6598E0DDD053900358328 /* jversion.h */,\n\t\t\t);\n\t\t\tpath = JPEGReadWriter2Plugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E659900DDD053900358328 /* UUIDPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E659910DDD053900358328 /* UUIDPlugin.h */,\n\t\t\t);\n\t\t\tpath = UUIDPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E659920DDD053900358328 /* SoundPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E659930DDD053900358328 /* SoundPlugin.h */,\n\t\t\t);\n\t\t\tpath = SoundPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E659960DDD053900358328 /* Squeak3D */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E659970DDD053900358328 /* b3d.h */,\n\t\t\t\t94E659980DDD053900358328 /* b3dAlloc.c */,\n\t\t\t\t94E659990DDD053900358328 /* b3dAlloc.h */,\n\t\t\t\t94E6599A0DDD053900358328 /* b3dDraw.c */,\n\t\t\t\t94E6599B0DDD053900358328 /* b3dInit.c */,\n\t\t\t\t94E6599C0DDD053900358328 /* b3dMain.c */,\n\t\t\t\t94E6599D0DDD053900358328 /* b3dRemap.c */,\n\t\t\t\t94E6599E0DDD053900358328 /* b3dTypes.h */,\n\t\t\t);\n\t\t\tpath = Squeak3D;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E6599F0DDD053900358328 /* SocketPlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E659A00DDD053900358328 /* SocketPlugin.h */,\n\t\t\t);\n\t\t\tpath = SocketPlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E659A20DDD053900358328 /* SoundCodecPrims */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94E659A30DDD053900358328 /* SoundCodecPrims.h */,\n\t\t\t\t94E659A40DDD053900358328 /* sqSoundCodecPluginBasicPrims.c */,\n\t\t\t);\n\t\t\tpath = SoundCodecPrims;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94E65A280DDD053900358328 /* RePlugin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94C4B80F10C06C4700CD4F90 /* configx.h */,\n\t\t\t\t94E65A290DDD053900358328 /* chartables.c */,\n\t\t\t\t94E65A2B0DDD053900358328 /* get.c */,\n\t\t\t\t94E65A2C0DDD053900358328 /* internal.h */,\n\t\t\t\t94E65A2E0DDD053900358328 /* pcre.c */,\n\t\t\t\t94E65A2F0DDD053900358328 /* pcre.h */,\n\t\t\t\t94E65A300DDD053900358328 /* rePlugin.h */,\n\t\t\t\t94E65A340DDD053900358328 /* study.c */,\n\t\t\t);\n\t\t\tpath = RePlugin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94EF6CB911E55947003BA64D /* stacksrc */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94EF6CBC11E55947003BA64D /* vm */,\n\t\t\t);\n\t\t\tname = stacksrc;\n\t\t\tpath = ../../../stacksrc;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94EF6CBC11E55947003BA64D /* vm */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t94EF6CBE11E55947003BA64D /* gcc3x-interp.c */,\n\t\t\t\t94EF6CC011E55947003BA64D /* interp.h */,\n\t\t\t);\n\t\t\tpath = vm;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\t1D6058900D05DD3D006BFB54 /* SqueakNoOGLIPhone */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget \"SqueakNoOGLIPhone\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t1D60588D0D05DD3D006BFB54 /* Resources */,\n\t\t\t\t1D60588E0D05DD3D006BFB54 /* Sources */,\n\t\t\t\t1D60588F0D05DD3D006BFB54 /* Frameworks */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = SqueakNoOGLIPhone;\n\t\t\tproductName = SqueakNoOGLIPhone;\n\t\t\tproductReference = 1D6058910D05DD3D006BFB54 /* Squeak.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n\t\t947E626F10AA098300D3B69E /* SqueakPureObjc */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 947E62F810AA098300D3B69E /* Build configuration list for PBXNativeTarget \"SqueakPureObjc\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t947E627010AA098300D3B69E /* Resources */,\n\t\t\t\t947E627410AA098300D3B69E /* Sources */,\n\t\t\t\t947E62F210AA098300D3B69E /* Frameworks */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t\t9469CEED10BFD8CE002245C2 /* PBXBuildRule */,\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = SqueakPureObjc;\n\t\t\tproductName = SqueakNoOGLIPhone;\n\t\t\tproductReference = 947E62FC10AA098300D3B69E /* Squeak.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t29B97313FDCFA39411CA2CEA /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tbuildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject \"SqueakPureObjcCogVM\" */;\n\t\t\tcompatibilityVersion = \"Xcode 3.1\";\n\t\t\tdevelopmentRegion = English;\n\t\t\thasScannedForEncodings = 1;\n\t\t\tknownRegions = (\n\t\t\t\tEnglish,\n\t\t\t\tJapanese,\n\t\t\t\tFrench,\n\t\t\t\tGerman,\n\t\t\t);\n\t\t\tmainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t1D6058900D05DD3D006BFB54 /* SqueakNoOGLIPhone */,\n\t\t\t\t947E626F10AA098300D3B69E /* SqueakPureObjc */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t1D60588D0D05DD3D006BFB54 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t9484F80210B0D81F0038BDC0 /* iPhone.image in Resources */,\n\t\t\t\t9484F80310B0D81F0038BDC0 /* iPhone.changes in Resources */,\n\t\t\t\t28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */,\n\t\t\t\t941D1C9B0E696FC7005B77B3 /* Entitlements.plist in Resources */,\n\t\t\t\t9412CAB30E6C037B00DB8625 /* Settings.bundle in Resources */,\n\t\t\t\t9484F8EF10B0E1580038BDC0 /* Default.png in Resources */,\n\t\t\t\t94B6E9DD10BC777A00333E9E /* Localizable.strings in Resources */,\n\t\t\t\t948EC3901155312600B08A4F /* MainWindow-iPad.xib in Resources */,\n\t\t\t\t9427E45612628749002DCA6D /* Squeak72x72.png in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t947E627010AA098300D3B69E /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t947E64DE10AA18FE00D3B69E /* MainMenu.xib in Resources */,\n\t\t\t\t94B6E9DE10BC777A00333E9E /* Localizable.strings in Resources */,\n\t\t\t\t9414422610BC89440088F8AC /* Squeak.icns in Resources */,\n\t\t\t\t9414422710BC89440088F8AC /* SqueakChanges.icns in Resources */,\n\t\t\t\t9414422810BC89440088F8AC /* SqueakGeneric.icns in Resources */,\n\t\t\t\t9414422910BC89440088F8AC /* SqueakImage.icns in Resources */,\n\t\t\t\t9414422A10BC89440088F8AC /* SqueakPlugin.icns in Resources */,\n\t\t\t\t9414422B10BC89440088F8AC /* SqueakProject.icns in Resources */,\n\t\t\t\t9414422C10BC89440088F8AC /* SqueakScript.icns in Resources */,\n\t\t\t\t9414422D10BC89440088F8AC /* SqueakSources.icns in Resources */,\n\t\t\t\t94D16CB010BCF96B00A69A89 /* Credits.rtf in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t1D60588E0D05DD3D006BFB54 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t1D60589B0D05DD56006BFB54 /* main.m in Sources */,\n\t\t\t\t9424FF620DDCB1C7009912BF /* sqNamedPrims.c in Sources */,\n\t\t\t\t9424FF6B0DDCB202009912BF /* sqMacV2Memory.c in Sources */,\n\t\t\t\t9424FF730DDCB234009912BF /* macintoshextra.c in Sources */,\n\t\t\t\t9424FF760DDCB271009912BF /* osExports.c in Sources */,\n\t\t\t\t94A3488E0DDCCCC700D1D4A9 /* sqSqueakScreenAPI.m in Sources */,\n\t\t\t\t94E659230DDD03FE00358328 /* ADPCMCodecPlugin.c in Sources */,\n\t\t\t\t94E659240DDD03FE00358328 /* B2DPlugin.c in Sources */,\n\t\t\t\t94E659260DDD03FE00358328 /* BitBltPlugin.c in Sources */,\n\t\t\t\t94E659270DDD03FE00358328 /* BMPReadWriterPlugin.c in Sources */,\n\t\t\t\t94E659290DDD03FE00358328 /* DSAPrims.c in Sources */,\n\t\t\t\t94E6592A0DDD03FE00358328 /* FFTPlugin.c in Sources */,\n\t\t\t\t94E6592B0DDD03FE00358328 /* FilePlugin.c in Sources */,\n\t\t\t\t94E6592C0DDD03FE00358328 /* FloatArrayPlugin.c in Sources */,\n\t\t\t\t94E6592D0DDD03FE00358328 /* GeniePlugin.c in Sources */,\n\t\t\t\t94E659300DDD03FE00358328 /* JPEGReaderPlugin.c in Sources */,\n\t\t\t\t94E659310DDD03FE00358328 /* JPEGReadWriter2Plugin.c in Sources */,\n\t\t\t\t94E659320DDD03FE00358328 /* Klatt.c in Sources */,\n\t\t\t\t94E659330DDD03FE00358328 /* LargeIntegers.c in Sources */,\n\t\t\t\t94E659340DDD03FE00358328 /* Matrix2x3Plugin.c in Sources */,\n\t\t\t\t94E659360DDD03FE00358328 /* MiscPrimitivePlugin.c in Sources */,\n\t\t\t\t94E659370DDD03FE00358328 /* RePlugin.c in Sources */,\n\t\t\t\t94E659380DDD03FE00358328 /* SecurityPlugin.c in Sources */,\n\t\t\t\t94E6593A0DDD03FE00358328 /* SoundCodecPrims.c in Sources */,\n\t\t\t\t94E6593B0DDD03FE00358328 /* SoundGenerationPlugin.c in Sources */,\n\t\t\t\t94E6593E0DDD03FE00358328 /* StarSqueakPlugin.c in Sources */,\n\t\t\t\t94E6593F0DDD03FE00358328 /* UUIDPlugin.c in Sources */,\n\t\t\t\t94E659400DDD03FE00358328 /* ZipPlugin.c in Sources */,\n\t\t\t\t94E659470DDD04FA00358328 /* sqFilePluginBasicPrims.c in Sources */,\n\t\t\t\t94E65A350DDD053900358328 /* SurfacePlugin.c in Sources */,\n\t\t\t\t94E65A370DDD053900358328 /* Error.c in Sources */,\n\t\t\t\t94E65A380DDD053900358328 /* jcapimin.c in Sources */,\n\t\t\t\t94E65A390DDD053900358328 /* jcapistd.c in Sources */,\n\t\t\t\t94E65A3A0DDD053900358328 /* jccoefct.c in Sources */,\n\t\t\t\t94E65A3B0DDD053900358328 /* jccolor.c in Sources */,\n\t\t\t\t94E65A3C0DDD053900358328 /* jcdctmgr.c in Sources */,\n\t\t\t\t94E65A3D0DDD053900358328 /* jchuff.c in Sources */,\n\t\t\t\t94E65A3E0DDD053900358328 /* jcinit.c in Sources */,\n\t\t\t\t94E65A3F0DDD053900358328 /* jcmainct.c in Sources */,\n\t\t\t\t94E65A400DDD053900358328 /* jcmarker.c in Sources */,\n\t\t\t\t94E65A410DDD053900358328 /* jcmaster.c in Sources */,\n\t\t\t\t94E65A420DDD053900358328 /* jcomapi.c in Sources */,\n\t\t\t\t94E65A430DDD053900358328 /* jcparam.c in Sources */,\n\t\t\t\t94E65A440DDD053900358328 /* jcphuff.c in Sources */,\n\t\t\t\t94E65A450DDD053900358328 /* jcprepct.c in Sources */,\n\t\t\t\t94E65A460DDD053900358328 /* jcsample.c in Sources */,\n\t\t\t\t94E65A470DDD053900358328 /* jctrans.c in Sources */,\n\t\t\t\t94E65A480DDD053900358328 /* jdapimin.c in Sources */,\n\t\t\t\t94E65A490DDD053900358328 /* jdapistd.c in Sources */,\n\t\t\t\t94E65A4A0DDD053900358328 /* jdatadst.c in Sources */,\n\t\t\t\t94E65A4B0DDD053900358328 /* jdatasrc.c in Sources */,\n\t\t\t\t94E65A4C0DDD053900358328 /* jdcoefct.c in Sources */,\n\t\t\t\t94E65A4D0DDD053900358328 /* jdcolor.c in Sources */,\n\t\t\t\t94E65A4E0DDD053900358328 /* jddctmgr.c in Sources */,\n\t\t\t\t94E65A4F0DDD053900358328 /* jdhuff.c in Sources */,\n\t\t\t\t94E65A500DDD053900358328 /* jdinput.c in Sources */,\n\t\t\t\t94E65A510DDD053900358328 /* jdmainct.c in Sources */,\n\t\t\t\t94E65A520DDD053900358328 /* jdmarker.c in Sources */,\n\t\t\t\t94E65A530DDD053900358328 /* jdmaster.c in Sources */,\n\t\t\t\t94E65A540DDD053900358328 /* jdmerge.c in Sources */,\n\t\t\t\t94E65A550DDD053900358328 /* jdphuff.c in Sources */,\n\t\t\t\t94E65A560DDD053900358328 /* jdpostct.c in Sources */,\n\t\t\t\t94E65A570DDD053900358328 /* jdsample.c in Sources */,\n\t\t\t\t94E65A580DDD053900358328 /* jdtrans.c in Sources */,\n\t\t\t\t94E65A590DDD053900358328 /* jerror.c in Sources */,\n\t\t\t\t94E65A5A0DDD053900358328 /* jfdctflt.c in Sources */,\n\t\t\t\t94E65A5B0DDD053900358328 /* jfdctfst.c in Sources */,\n\t\t\t\t94E65A5C0DDD053900358328 /* jfdctint.c in Sources */,\n\t\t\t\t94E65A5D0DDD053900358328 /* jidctflt.c in Sources */,\n\t\t\t\t94E65A5E0DDD053900358328 /* jidctfst.c in Sources */,\n\t\t\t\t94E65A5F0DDD053900358328 /* jidctint.c in Sources */,\n\t\t\t\t94E65A600DDD053900358328 /* jidctred.c in Sources */,\n\t\t\t\t94E65A610DDD053900358328 /* jmemdatadst.c in Sources */,\n\t\t\t\t94E65A620DDD053900358328 /* jmemdatasrc.c in Sources */,\n\t\t\t\t94E65A630DDD053900358328 /* jmemmgr.c in Sources */,\n\t\t\t\t94E65A640DDD053900358328 /* jmemnobs.c in Sources */,\n\t\t\t\t94E65A650DDD053900358328 /* jquant1.c in Sources */,\n\t\t\t\t94E65A660DDD053900358328 /* jquant2.c in Sources */,\n\t\t\t\t94E65A670DDD053900358328 /* jutils.c in Sources */,\n\t\t\t\t94E65A690DDD053900358328 /* b3dAlloc.c in Sources */,\n\t\t\t\t94E65A6A0DDD053900358328 /* b3dDraw.c in Sources */,\n\t\t\t\t94E65A6B0DDD053900358328 /* b3dInit.c in Sources */,\n\t\t\t\t94E65A6C0DDD053900358328 /* b3dMain.c in Sources */,\n\t\t\t\t94E65A6D0DDD053900358328 /* b3dRemap.c in Sources */,\n\t\t\t\t94E65A6F0DDD053900358328 /* sqSoundCodecPluginBasicPrims.c in Sources */,\n\t\t\t\t94E65AEE0DDD053900358328 /* chartables.c in Sources */,\n\t\t\t\t94E65AEF0DDD053900358328 /* get.c in Sources */,\n\t\t\t\t94E65AF00DDD053900358328 /* pcre.c in Sources */,\n\t\t\t\t94E65AF40DDD053900358328 /* study.c in Sources */,\n\t\t\t\t94BCE78C0DDDF61200F38F31 /* sqUnixUUID.c in Sources */,\n\t\t\t\t94A0E8850DE5EF430071C8B9 /* sqSqueakMainApplication+imageReadWrite.m in Sources */,\n\t\t\t\t94A0E9840DE5F1FE0071C8B9 /* sqSqueakMainApplication+screen.m in Sources */,\n\t\t\t\t94AB2E570E003692006A79E4 /* sqVirtualMachine.c in Sources */,\n\t\t\t\t9452D5E50E044A9D000AD792 /* Queue.m in Sources */,\n\t\t\t\t9452D5E60E044A9D000AD792 /* sqMacV2Time.c in Sources */,\n\t\t\t\t9452D5E70E044A9D000AD792 /* sqSqueakFileDirectoryAPI.m in Sources */,\n\t\t\t\t9452D5E80E044A9D000AD792 /* sqSqueakFileDirectoryInterface.m in Sources */,\n\t\t\t\t9452D5E90E044A9D000AD792 /* sqSqueakMainApp.m in Sources */,\n\t\t\t\t9452D5EA0E044A9D000AD792 /* sqSqueakMainApplication+vmAndImagePath.m in Sources */,\n\t\t\t\t9452D5EB0E044A9D000AD792 /* sqSqueakMainApplication.m in Sources */,\n\t\t\t\t9452D6030E044CB3000AD792 /* sqSqueakAttributesAPI.m in Sources */,\n\t\t\t\t9452D6080E044D2F000AD792 /* sqSqueakEventsAPI.m in Sources */,\n\t\t\t\t9471D2730E04703B00703D45 /* sqSqueakScreenAndWindow.m in Sources */,\n\t\t\t\t9471D2E10E04743F00703D45 /* sqSqueakAppDelegate.m in Sources */,\n\t\t\t\t942F75D30E0B67AD00848BF2 /* sqSqueakVmAndImagePathAPI.m in Sources */,\n\t\t\t\t942F76320E0B6C7600848BF2 /* sqSqueakMainApplication+attributes.m in Sources */,\n\t\t\t\t94883B1C0E0C2937005A4738 /* SocketPlugin.c in Sources */,\n\t\t\t\t94883B410E0C2B9C005A4738 /* sqUnixSocket.c in Sources */,\n\t\t\t\t94A1B0070E0DBE2400EB5EFC /* sqSqueakMainApplication+events.m in Sources */,\n\t\t\t\t94A1B02D0E0DC10D00EB5EFC /* sqSqueakSoundAPI.m in Sources */,\n\t\t\t\t94A1B0320E0DC19300EB5EFC /* sqSqueakMainApplication+sound.m in Sources */,\n\t\t\t\t9412CAE60E6C05EC00DB8625 /* sqSqueakInfoPlistInterface.m in Sources */,\n\t\t\t\t9463943F0E95845000015851 /* squeakSUnitTester.m in Sources */,\n\t\t\t\t9478E0340EC8D98F007096A7 /* sqSqueakSoundCoreAudioAPI.m in Sources */,\n\t\t\t\t9478E0600EC8DCFB007096A7 /* sqSqueakSoundCoreAudio.m in Sources */,\n\t\t\t\t941724440F36624C0031AF33 /* squeakProxy.m in Sources */,\n\t\t\t\t9402F2B00F3F9BB900F3D637 /* PDColoredProgressView.m in Sources */,\n\t\t\t\t9402F2C60F3F9C5600F3D637 /* drawing.m in Sources */,\n\t\t\t\t9484F8D410B0E04E0038BDC0 /* sqMacSecurity.c in Sources */,\n\t\t\t\t9484F8DB10B0E09B0038BDC0 /* sqiPhoneScreenAndWindow.m in Sources */,\n\t\t\t\t9484F8DC10B0E0C60038BDC0 /* sqSqueakIPhoneApplication+attributes.m in Sources */,\n\t\t\t\t9484F8DD10B0E0C70038BDC0 /* sqSqueakIPhoneApplication+events.m in Sources */,\n\t\t\t\t9484F8DE10B0E0C90038BDC0 /* sqSqueakIPhoneApplication+imageReadWrite.m in Sources */,\n\t\t\t\t9484F8DF10B0E0CB0038BDC0 /* sqSqueakIPhoneApplication+Network.m in Sources */,\n\t\t\t\t9484F8E010B0E0CE0038BDC0 /* sqSqueakiPhoneApplication+sound.m in Sources */,\n\t\t\t\t9484F8E110B0E0CE0038BDC0 /* sqSqueakIPhoneApplication.m in Sources */,\n\t\t\t\t9484F8E210B0E0D10038BDC0 /* sqSqueakIPhoneFileDirectoryInterface.m in Sources */,\n\t\t\t\t9484F8E310B0E0D30038BDC0 /* sqSqueakIPhoneInfoPlistInterface.m in Sources */,\n\t\t\t\t9484F8E510B0E0F00038BDC0 /* SqueakNoOGLIPhoneAppDelegate.m in Sources */,\n\t\t\t\t9484F8E610B0E0FD0038BDC0 /* SqueakUIController.m in Sources */,\n\t\t\t\t9484F8E710B0E0FE0038BDC0 /* SqueakUIView.m in Sources */,\n\t\t\t\t9484F91210B0E25B0038BDC0 /* dummyFFI.c in Sources */,\n\t\t\t\t9484F9AF10B13DA50038BDC0 /* sqMacHostWindow.c in Sources */,\n\t\t\t\t945851F010F03E60001401E7 /* sqMacExtendedClipboard.m in Sources */,\n\t\t\t\t9458525610F04339001401E7 /* sqSqueakIPhoneClipboardAPI.m in Sources */,\n\t\t\t\t9458525C10F043EB001401E7 /* sqSqueakIPhoneApplication+clipboard.m in Sources */,\n\t\t\t\t94BD817011C8A58D00556751 /* sqManualSurface.c in Sources */,\n\t\t\t\t949492C711E51C6B0019BC29 /* sqExternalSemaphores.c in Sources */,\n\t\t\t\t949492C811E51C6B0019BC29 /* sqHeapMap.c in Sources */,\n\t\t\t\t949492C911E51C6B0019BC29 /* sqTicker.c in Sources */,\n\t\t\t\t9494932F11E527180019BC29 /* sqUnixHeartbeat.c in Sources */,\n\t\t\t\t9494933011E527180019BC29 /* sqUnixThreads.c in Sources */,\n\t\t\t\t949493C011E52ADE0019BC29 /* aio.c in Sources */,\n\t\t\t\t94EF6CC311E55947003BA64D /* gcc3x-interp.c in Sources */,\n\t\t\t\t942F48FE123C1C0C002B05DF /* SqueakUIViewCALayer.m in Sources */,\n\t\t\t\t942F48FF123C1C0C002B05DF /* SqueakUIViewOpenGL.m in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t947E627410AA098300D3B69E /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t947E627510AA098300D3B69E /* main.m in Sources */,\n\t\t\t\t947E627610AA098300D3B69E /* sqNamedPrims.c in Sources */,\n\t\t\t\t947E627710AA098300D3B69E /* sqMacV2Memory.c in Sources */,\n\t\t\t\t947E627910AA098300D3B69E /* osExports.c in Sources */,\n\t\t\t\t947E627A10AA098300D3B69E /* sqSqueakScreenAPI.m in Sources */,\n\t\t\t\t947E627B10AA098300D3B69E /* ADPCMCodecPlugin.c in Sources */,\n\t\t\t\t947E627C10AA098300D3B69E /* B2DPlugin.c in Sources */,\n\t\t\t\t947E627D10AA098300D3B69E /* BitBltPlugin.c in Sources */,\n\t\t\t\t947E627E10AA098300D3B69E /* BMPReadWriterPlugin.c in Sources */,\n\t\t\t\t947E627F10AA098300D3B69E /* DSAPrims.c in Sources */,\n\t\t\t\t947E628010AA098300D3B69E /* FFTPlugin.c in Sources */,\n\t\t\t\t947E628110AA098300D3B69E /* FilePlugin.c in Sources */,\n\t\t\t\t947E628210AA098300D3B69E /* FloatArrayPlugin.c in Sources */,\n\t\t\t\t947E628310AA098300D3B69E /* GeniePlugin.c in Sources */,\n\t\t\t\t947E628510AA098300D3B69E /* JPEGReaderPlugin.c in Sources */,\n\t\t\t\t947E628610AA098300D3B69E /* JPEGReadWriter2Plugin.c in Sources */,\n\t\t\t\t947E628710AA098300D3B69E /* Klatt.c in Sources */,\n\t\t\t\t947E628810AA098300D3B69E /* LargeIntegers.c in Sources */,\n\t\t\t\t947E628910AA098300D3B69E /* Matrix2x3Plugin.c in Sources */,\n\t\t\t\t947E628A10AA098300D3B69E /* MiscPrimitivePlugin.c in Sources */,\n\t\t\t\t947E628B10AA098300D3B69E /* RePlugin.c in Sources */,\n\t\t\t\t947E628C10AA098300D3B69E /* SecurityPlugin.c in Sources */,\n\t\t\t\t947E628D10AA098300D3B69E /* SoundCodecPrims.c in Sources */,\n\t\t\t\t947E628E10AA098300D3B69E /* SoundGenerationPlugin.c in Sources */,\n\t\t\t\t947E629110AA098300D3B69E /* StarSqueakPlugin.c in Sources */,\n\t\t\t\t947E629210AA098300D3B69E /* UUIDPlugin.c in Sources */,\n\t\t\t\t947E629310AA098300D3B69E /* ZipPlugin.c in Sources */,\n\t\t\t\t947E629410AA098300D3B69E /* sqFilePluginBasicPrims.c in Sources */,\n\t\t\t\t947E629510AA098300D3B69E /* SurfacePlugin.c in Sources */,\n\t\t\t\t947E629610AA098300D3B69E /* Error.c in Sources */,\n\t\t\t\t947E629710AA098300D3B69E /* jcapimin.c in Sources */,\n\t\t\t\t947E629810AA098300D3B69E /* jcapistd.c in Sources */,\n\t\t\t\t947E629910AA098300D3B69E /* jccoefct.c in Sources */,\n\t\t\t\t947E629A10AA098300D3B69E /* jccolor.c in Sources */,\n\t\t\t\t947E629B10AA098300D3B69E /* jcdctmgr.c in Sources */,\n\t\t\t\t947E629C10AA098300D3B69E /* jchuff.c in Sources */,\n\t\t\t\t947E629D10AA098300D3B69E /* jcinit.c in Sources */,\n\t\t\t\t947E629E10AA098300D3B69E /* jcmainct.c in Sources */,\n\t\t\t\t947E629F10AA098300D3B69E /* jcmarker.c in Sources */,\n\t\t\t\t947E62A010AA098300D3B69E /* jcmaster.c in Sources */,\n\t\t\t\t947E62A110AA098300D3B69E /* jcomapi.c in Sources */,\n\t\t\t\t947E62A210AA098300D3B69E /* jcparam.c in Sources */,\n\t\t\t\t947E62A310AA098300D3B69E /* jcphuff.c in Sources */,\n\t\t\t\t947E62A410AA098300D3B69E /* jcprepct.c in Sources */,\n\t\t\t\t947E62A510AA098300D3B69E /* jcsample.c in Sources */,\n\t\t\t\t947E62A610AA098300D3B69E /* jctrans.c in Sources */,\n\t\t\t\t947E62A710AA098300D3B69E /* jdapimin.c in Sources */,\n\t\t\t\t947E62A810AA098300D3B69E /* jdapistd.c in Sources */,\n\t\t\t\t947E62A910AA098300D3B69E /* jdatadst.c in Sources */,\n\t\t\t\t947E62AA10AA098300D3B69E /* jdatasrc.c in Sources */,\n\t\t\t\t947E62AB10AA098300D3B69E /* jdcoefct.c in Sources */,\n\t\t\t\t947E62AC10AA098300D3B69E /* jdcolor.c in Sources */,\n\t\t\t\t947E62AD10AA098300D3B69E /* jddctmgr.c in Sources */,\n\t\t\t\t947E62AE10AA098300D3B69E /* jdhuff.c in Sources */,\n\t\t\t\t947E62AF10AA098300D3B69E /* jdinput.c in Sources */,\n\t\t\t\t947E62B010AA098300D3B69E /* jdmainct.c in Sources */,\n\t\t\t\t947E62B110AA098300D3B69E /* jdmarker.c in Sources */,\n\t\t\t\t947E62B210AA098300D3B69E /* jdmaster.c in Sources */,\n\t\t\t\t947E62B310AA098300D3B69E /* jdmerge.c in Sources */,\n\t\t\t\t947E62B410AA098300D3B69E /* jdphuff.c in Sources */,\n\t\t\t\t947E62B510AA098300D3B69E /* jdpostct.c in Sources */,\n\t\t\t\t947E62B610AA098300D3B69E /* jdsample.c in Sources */,\n\t\t\t\t947E62B710AA098300D3B69E /* jdtrans.c in Sources */,\n\t\t\t\t947E62B810AA098300D3B69E /* jerror.c in Sources */,\n\t\t\t\t947E62B910AA098300D3B69E /* jfdctflt.c in Sources */,\n\t\t\t\t947E62BA10AA098300D3B69E /* jfdctfst.c in Sources */,\n\t\t\t\t947E62BB10AA098300D3B69E /* jfdctint.c in Sources */,\n\t\t\t\t947E62BC10AA098300D3B69E /* jidctflt.c in Sources */,\n\t\t\t\t947E62BD10AA098300D3B69E /* jidctfst.c in Sources */,\n\t\t\t\t947E62BE10AA098300D3B69E /* jidctint.c in Sources */,\n\t\t\t\t947E62BF10AA098300D3B69E /* jidctred.c in Sources */,\n\t\t\t\t947E62C010AA098300D3B69E /* jmemdatadst.c in Sources */,\n\t\t\t\t947E62C110AA098300D3B69E /* jmemdatasrc.c in Sources */,\n\t\t\t\t947E62C210AA098300D3B69E /* jmemmgr.c in Sources */,\n\t\t\t\t947E62C310AA098300D3B69E /* jmemnobs.c in Sources */,\n\t\t\t\t947E62C410AA098300D3B69E /* jquant1.c in Sources */,\n\t\t\t\t947E62C510AA098300D3B69E /* jquant2.c in Sources */,\n\t\t\t\t947E62C610AA098300D3B69E /* jutils.c in Sources */,\n\t\t\t\t947E62C710AA098300D3B69E /* b3dAlloc.c in Sources */,\n\t\t\t\t947E62C810AA098300D3B69E /* b3dDraw.c in Sources */,\n\t\t\t\t947E62C910AA098300D3B69E /* b3dInit.c in Sources */,\n\t\t\t\t947E62CA10AA098300D3B69E /* b3dMain.c in Sources */,\n\t\t\t\t947E62CB10AA098300D3B69E /* b3dRemap.c in Sources */,\n\t\t\t\t947E62CC10AA098300D3B69E /* sqSoundCodecPluginBasicPrims.c in Sources */,\n\t\t\t\t947E62CD10AA098300D3B69E /* chartables.c in Sources */,\n\t\t\t\t947E62CE10AA098300D3B69E /* get.c in Sources */,\n\t\t\t\t947E62CF10AA098300D3B69E /* pcre.c in Sources */,\n\t\t\t\t947E62D010AA098300D3B69E /* study.c in Sources */,\n\t\t\t\t947E62D110AA098300D3B69E /* sqUnixUUID.c in Sources */,\n\t\t\t\t947E62D210AA098300D3B69E /* sqSqueakMainApplication+imageReadWrite.m in Sources */,\n\t\t\t\t947E62D310AA098300D3B69E /* sqSqueakMainApplication+screen.m in Sources */,\n\t\t\t\t947E62D510AA098300D3B69E /* sqVirtualMachine.c in Sources */,\n\t\t\t\t947E62D610AA098300D3B69E /* Queue.m in Sources */,\n\t\t\t\t947E62D710AA098300D3B69E /* sqMacV2Time.c in Sources */,\n\t\t\t\t947E62D810AA098300D3B69E /* sqSqueakFileDirectoryAPI.m in Sources */,\n\t\t\t\t947E62D910AA098300D3B69E /* sqSqueakFileDirectoryInterface.m in Sources */,\n\t\t\t\t947E62DA10AA098300D3B69E /* sqSqueakMainApp.m in Sources */,\n\t\t\t\t947E62DB10AA098300D3B69E /* sqSqueakMainApplication+vmAndImagePath.m in Sources */,\n\t\t\t\t947E62DC10AA098300D3B69E /* sqSqueakMainApplication.m in Sources */,\n\t\t\t\t947E62DD10AA098300D3B69E /* sqSqueakAttributesAPI.m in Sources */,\n\t\t\t\t947E62DE10AA098300D3B69E /* sqSqueakEventsAPI.m in Sources */,\n\t\t\t\t947E62DF10AA098300D3B69E /* sqSqueakScreenAndWindow.m in Sources */,\n\t\t\t\t947E62E010AA098300D3B69E /* sqSqueakAppDelegate.m in Sources */,\n\t\t\t\t947E62E110AA098300D3B69E /* sqSqueakVmAndImagePathAPI.m in Sources */,\n\t\t\t\t947E62E210AA098300D3B69E /* sqSqueakMainApplication+attributes.m in Sources */,\n\t\t\t\t947E62E310AA098300D3B69E /* SocketPlugin.c in Sources */,\n\t\t\t\t947E62E410AA098300D3B69E /* sqUnixSocket.c in Sources */,\n\t\t\t\t947E62E510AA098300D3B69E /* sqSqueakMainApplication+events.m in Sources */,\n\t\t\t\t947E62E610AA098300D3B69E /* sqSqueakSoundAPI.m in Sources */,\n\t\t\t\t947E62E710AA098300D3B69E /* sqSqueakMainApplication+sound.m in Sources */,\n\t\t\t\t947E62E810AA098300D3B69E /* sqSqueakInfoPlistInterface.m in Sources */,\n\t\t\t\t947E62EA10AA098300D3B69E /* squeakSUnitTester.m in Sources */,\n\t\t\t\t947E62ED10AA098300D3B69E /* sqSqueakSoundCoreAudioAPI.m in Sources */,\n\t\t\t\t947E62EE10AA098300D3B69E /* sqSqueakSoundCoreAudio.m in Sources */,\n\t\t\t\t947E62EF10AA098300D3B69E /* squeakProxy.m in Sources */,\n\t\t\t\t947E632410AA0B4E00D3B69E /* dummyFFI.c in Sources */,\n\t\t\t\t947E642D10AA0E9E00D3B69E /* sqMacV2Browser.m in Sources */,\n\t\t\t\t947E647B10AA100900D3B69E /* SqueakOSXAppDelegate.m in Sources */,\n\t\t\t\t947E64AB10AA149F00D3B69E /* sqMacSecurity.c in Sources */,\n\t\t\t\t947E64CC10AA16FE00D3B69E /* sqSqueakOSXApplication.m in Sources */,\n\t\t\t\t94BCABC110AB72A600F87527 /* sqSqueakOSXFileDirectoryInterface.m in Sources */,\n\t\t\t\t94BCAD1D10AB942300F87527 /* sqSqueakOSXApplication+attributes.m in Sources */,\n\t\t\t\t94BCAE6910ACA10100F87527 /* sqSqueakOSXInfoPlistInterface.m in Sources */,\n\t\t\t\t94C887FB10ADCEFC007CB39E /* sqSqueakOSXApplication+imageReadWrite.m in Sources */,\n\t\t\t\t94C88BDF10AF3C52007CB39E /* sqSqueakOSXScreenAndWindow.m in Sources */,\n\t\t\t\t94C2068A10AF4F53002F4160 /* sqSqueakOSXNSView.m in Sources */,\n\t\t\t\t94C3682610AFA39A0041953A /* macintoshosxextra.c in Sources */,\n\t\t\t\t94C3687810AFA77F0041953A /* sqSqueakOSXApplication+cursor.m in Sources */,\n\t\t\t\t94C3687D10AFA8300041953A /* sqSqueakCursorAPI.m in Sources */,\n\t\t\t\t94C3688C10AFA9EF0041953A /* sqSqueakMainApplication+cursor.m in Sources */,\n\t\t\t\t94C36A9410B09EE70041953A /* sqSqueakOSXApplication+events.m in Sources */,\n\t\t\t\t94A1B21C10B9DE0300C64473 /* keyBoardStrokeDetails.m in Sources */,\n\t\t\t\t9492453110BA43AA00E726F5 /* SqueakOSXApplication.m in Sources */,\n\t\t\t\t9428BA9710BB440800DAD287 /* sqSqueakOSXClipboardAPI.m in Sources */,\n\t\t\t\t9428BB0610BB478600DAD287 /* sqSqueakOSXApplication+clipboard.m in Sources */,\n\t\t\t\t94C4B83010C06F8800CD4F90 /* sqSqueakOSXSoundCoreAudio.m in Sources */,\n\t\t\t\t946DA8D310C0C30D00F26F56 /* DropPlugin.c in Sources */,\n\t\t\t\t946DA91510C0C71100F26F56 /* sqSqueakOSXDropAPI.m in Sources */,\n\t\t\t\t946DAA0010C0D35500F26F56 /* sqMacUnixExternalPrims.m in Sources */,\n\t\t\t\t9402DD7110CE0E91005C2102 /* SqViewClut.m in Sources */,\n\t\t\t\t944069CF10E6B63200353B27 /* MacMenubarPlugin.c in Sources */,\n\t\t\t\t94B9533610E6BD7100DC476A /* MacMenuOS9ToOSX.m in Sources */,\n\t\t\t\t94584FDC10F02378001401E7 /* sqMacExtendedClipboard.m in Sources */,\n\t\t\t\t94BD817311C8A59A00556751 /* sqManualSurface.c in Sources */,\n\t\t\t\t9494928411E5178D0019BC29 /* cogit.c in Sources */,\n\t\t\t\t9494928511E5178D0019BC29 /* gcc3x-cointerp.c in Sources */,\n\t\t\t\t949492CA11E51C6B0019BC29 /* sqExternalSemaphores.c in Sources */,\n\t\t\t\t949492CB11E51C6B0019BC29 /* sqHeapMap.c in Sources */,\n\t\t\t\t949492CC11E51C6B0019BC29 /* sqTicker.c in Sources */,\n\t\t\t\t9494933211E527180019BC29 /* sqUnixHeartbeat.c in Sources */,\n\t\t\t\t9494933311E527180019BC29 /* sqUnixThreads.c in Sources */,\n\t\t\t\t9494933411E527180019BC29 /* sqUnixVMProfile.c in Sources */,\n\t\t\t\t949493C111E52ADE0019BC29 /* aio.c in Sources */,\n\t\t\t\t943B9B2A1235BDD20056205E /* sqMacHostWindow.m in Sources */,\n\t\t\t\t040F20C212CE0FFB008BA0CB /* UnixOSProcessPlugin.c in Sources */,\n\t\t\t\t040F20C812CE1057008BA0CB /* Squeak3D.c in Sources */,\n\t\t\t\t040F20CB12CE10AC008BA0CB /* ClipboardExtendedPlugin.c in Sources */,\n\t\t\t\t040F20E312CE1283008BA0CB /* ObjectiveCPlugin.c in Sources */,\n\t\t\t\t040F22FC12CE1752008BA0CB /* SoundPlugin.c in Sources */,\n\t\t\t\t040F230712CE1AE2008BA0CB /* SqueakFFIPrims.c in Sources */,\n\t\t\t\t040F230E12CE1B28008BA0CB /* HostWindowPlugin.c in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin PBXVariantGroup section */\n\t\t947E64DC10AA18FE00D3B69E /* MainMenu.xib */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t947E64DD10AA18FE00D3B69E /* English */,\n\t\t\t);\n\t\t\tname = MainMenu.xib;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t94B6E9DC10BC777A00333E9E /* Localizable.strings */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t94B6E9D910BC775E00333E9E /* English */,\n\t\t\t);\n\t\t\tname = Localizable.strings;\n\t\t\tpath = ..;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXVariantGroup section */\n\n/* Begin XCBuildConfiguration section */\n\t\t9427E3A612627B12002DCA6D /* Distribution Store */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tARCHS = \"$(ARCHS_STANDARD_32_BIT)\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Distribution: Corporate Smalltalk Consulting Ltd\";\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = c99;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = SQUEAK_BUILTIN_PLUGIN;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tHEADER_SEARCH_PATHS = /usr/include/uuid;\n\t\t\t\tPREBINDING = NO;\n\t\t\t\t\"PROVISIONING_PROFILE[sdk=iphoneos*]\" = \"4D1323CE-3998-4FF8-AB83-49838083E965\";\n\t\t\t\tSDKROOT = iphoneos4.1;\n\t\t\t};\n\t\t\tname = \"Distribution Store\";\n\t\t};\n\t\t9427E3A712627B12002DCA6D /* Distribution Store */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tARCHS = \"$(ARCHS_STANDARD_32_BIT)\";\n\t\t\t\tCODE_SIGN_ENTITLEMENTS = Entitlements.plist;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Distribution: Corporate Smalltalk Consulting Ltd\";\n\t\t\t\tCOPY_PHASE_STRIP = YES;\n\t\t\t\tGCC_PRECOMPILE_PREFIX_HEADER = YES;\n\t\t\t\tGCC_PREFIX_HEADER = SqueakNoOGLIPhone_Prefix.pch;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUGVM=0\",\n\t\t\t\t\t\"STACKVM=1\",\n\t\t\t\t\t\"NDEBUG=1\",\n\t\t\t\t\t\"COGMTVM=0\",\n\t\t\t\t\t\"USE_GLOBAL_STRUCT=0\",\n\t\t\t\t\t\"BASE_HEADER_SIZE=4\",\n\t\t\t\t\tTARGET_OS_IS_IPHONE,\n\t\t\t\t\tXXXUSE_INLINE_MEMORY_ACCESSORS,\n\t\t\t\t\tHAVE_SYS_TIME_H,\n\t\t\t\t\tHAVE_NANOSLEEP,\n\t\t\t\t\tSQUEAK_BUILTIN_PLUGIN,\n\t\t\t\t\t\"ISQUEAK_IMAGE=\\\"iPhone\\\"\",\n\t\t\t\t\t\"ISQUEAK_SOURCES=\\\"PharoV10\\\"\",\n\t\t\t\t);\n\t\t\t\tGCC_THUMB_SUPPORT = NO;\n\t\t\t\tGCC_VERSION = 4.2;\n\t\t\t\tINFOPLIST_FILE = \"Info-iPhone.plist\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 3.2;\n\t\t\t\tONLY_ACTIVE_ARCH = NO;\n\t\t\t\tOTHER_CFLAGS = (\n\t\t\t\t\t\"-fno-cse-follow-jumps\",\n\t\t\t\t\t\"-finline-functions\",\n\t\t\t\t\t\"-O3\",\n\t\t\t\t\t\"-fno-gcse\",\n\t\t\t\t\t\"-fomit-frame-pointer\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_NAME = Squeak;\n\t\t\t\t\"PROVISIONING_PROFILE[sdk=iphoneos*]\" = \"D0FAB1BA-D41B-4D7E-A984-469B9016ACB9\";\n\t\t\t\tSDKROOT = iphoneos4.1;\n\t\t\t\tTARGETED_DEVICE_FAMILY = 2;\n\t\t\t};\n\t\t\tname = \"Distribution Store\";\n\t\t};\n\t\t9427E3A812627B12002DCA6D /* Distribution Store */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tARCHS = i386;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=macosx*]\" = \"iPhone Distribution: Corporate Smalltalk Consulting Ltd\";\n\t\t\t\tCOPY_PHASE_STRIP = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = \"compiler-default\";\n\t\t\t\tGCC_ENABLE_SSE3_EXTENSIONS = YES;\n\t\t\t\tGCC_ENABLE_SSE41_EXTENSIONS = YES;\n\t\t\t\tGCC_ENABLE_SSE42_EXTENSIONS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = s;\n\t\t\t\tGCC_PREFIX_HEADER = SqueakPureObjc_Prefix.pch;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUGVM=0\",\n\t\t\t\t\t\"NDEBUG=1\",\n\t\t\t\t\t\"COGMTVM=0\",\n\t\t\t\t\t\"USE_GLOBAL_STRUCT=0\",\n\t\t\t\t\t\"BASE_HEADER_SIZE=4\",\n\t\t\t\t\tBUILD_FOR_OSX,\n\t\t\t\t\tUSE_INLINE_MEMORY_ACCESSORS,\n\t\t\t\t\tHAVE_SYS_TIME_H,\n\t\t\t\t\tHAVE_NANOSLEEP,\n\t\t\t\t\tSQUEAK_BUILTIN_PLUGIN,\n\t\t\t\t);\n\t\t\t\tGCC_VERSION = \"\";\n\t\t\t\tINFOPLIST_FILE = \"SqueakPureObjc-InfoCOG.plist\";\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.5;\n\t\t\t\tPER_ARCH_CFLAGS_i386 = \"-DLSB_FIRST -mfpmath=sse -finline-functions  -fomit-frame-pointer -fno-cse-follow-jumps -fno-gcse -mtune=prescott -march=pentium-m -falign-functions=16\";\n\t\t\t\tPRODUCT_NAME = Squeak;\n\t\t\t\t\"PROVISIONING_PROFILE[sdk=macosx*]\" = \"4D1323CE-3998-4FF8-AB83-49838083E965\";\n\t\t\t\tSDKROOT = macosx10.6;\n\t\t\t};\n\t\t\tname = \"Distribution Store\";\n\t\t};\n\t\t947E5F3610A9FD0400D3B69E /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tARCHS = \"$(ARCHS_STANDARD_32_64_BIT)\";\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = c99;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = \"-DSQUEAK_BUILTIN_PLUGIN\";\n\t\t\t\tGCC_THUMB_SUPPORT = NO;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tHEADER_SEARCH_PATHS = /usr/include/uuid;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tPREBINDING = NO;\n\t\t\t\tSDKROOT = iphoneos4.1;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t947E5F3710A9FD0400D3B69E /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tARCHS = \"$(ARCHS_STANDARD_32_BIT)\";\n\t\t\t\tCODE_SIGN_ENTITLEMENTS = \"\";\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PRECOMPILE_PREFIX_HEADER = YES;\n\t\t\t\tGCC_PREFIX_HEADER = SqueakNOOGLIPhone_Prefix.pch;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"NDEBUG=1\",\n\t\t\t\t\txxxUSE_INLINE_MEMORY_ACCESSORS,\n\t\t\t\t\t\"STACKVM=1\",\n\t\t\t\t\t\"COGMTVM=0\",\n\t\t\t\t\t\"USE_GLOBAL_STRUCT=1\",\n\t\t\t\t\tNO_ISNAN,\n\t\t\t\t\t\"BASE_HEADER_SIZE=4\",\n\t\t\t\t\tTARGET_OS_IS_IPHONE,\n\t\t\t\t\tHAVE_SYS_TIME_H,\n\t\t\t\t\tHAVE_NANOSLEEP,\n\t\t\t\t\tSQUEAK_BUILTIN_PLUGIN,\n\t\t\t\t\t\"ISQUEAK_IMAGE=\\\"iPhone\\\"\",\n\t\t\t\t\t\"ISQUEAK_SOURCES=\\\"PharoV10\\\"\",\n\t\t\t\t\t\"DEBUGVM=0\",\n\t\t\t\t);\n\t\t\t\tGCC_THUMB_SUPPORT = NO;\n\t\t\t\tGCC_VERSION = 4.2;\n\t\t\t\tINFOPLIST_FILE = \"Info-iPhone.plist\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 3.1.3;\n\t\t\t\tPRODUCT_NAME = Squeak;\n\t\t\t\tPROVISIONING_PROFILE = \"\";\n\t\t\t\t\"PROVISIONING_PROFILE[sdk=iphoneos*]\" = \"\";\n\t\t\t\tSDKROOT = iphoneos4.1;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t947E62F910AA098300D3B69E /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tARCHS = i386;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = \"compiler-default\";\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PRECOMPILE_PREFIX_HEADER = YES;\n\t\t\t\tGCC_PREFIX_HEADER = SqueakPureObjc_Prefix.pch;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUGVM=0\",\n\t\t\t\t\t\"COGMTVM=0\",\n\t\t\t\t\t\"USE_GLOBAL_STRUCT=0\",\n\t\t\t\t\tNO_ISNAN,\n\t\t\t\t\t\"BASE_HEADER_SIZE=4\",\n\t\t\t\t\tBUILD_FOR_OSX,\n\t\t\t\t\tUSE_INLINE_MEMORY_ACCESSORS,\n\t\t\t\t\tHAVE_SYS_TIME_H,\n\t\t\t\t\tHAVE_NANOSLEEP,\n\t\t\t\t\tSQUEAK_BUILTIN_PLUGIN,\n\t\t\t\t);\n\t\t\t\tGCC_VERSION = 4.2;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = NO;\n\t\t\t\tINFOPLIST_FILE = \"SqueakPureObjc-InfoCOG.plist\";\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.5;\n\t\t\t\tOTHER_CFLAGS = \"\";\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tPER_ARCH_CFLAGS_i386 = \"-DLSB_FIRST\";\n\t\t\t\tPRODUCT_NAME = Squeak;\n\t\t\t\tSDKROOT = macosx10.6;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t947E62FB10AA098300D3B69E /* Distribution */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tARCHS = i386;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=macosx*]\" = \"Don't Code Sign\";\n\t\t\t\tCOPY_PHASE_STRIP = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = \"compiler-default\";\n\t\t\t\tGCC_ENABLE_SSE3_EXTENSIONS = YES;\n\t\t\t\tGCC_ENABLE_SSE41_EXTENSIONS = YES;\n\t\t\t\tGCC_ENABLE_SSE42_EXTENSIONS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = s;\n\t\t\t\tGCC_PREFIX_HEADER = SqueakPureObjc_Prefix.pch;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUGVM=0\",\n\t\t\t\t\t\"NDEBUG=1\",\n\t\t\t\t\t\"COGMTVM=0\",\n\t\t\t\t\t\"USE_GLOBAL_STRUCT=0\",\n\t\t\t\t\t\"BASE_HEADER_SIZE=4\",\n\t\t\t\t\tBUILD_FOR_OSX,\n\t\t\t\t\tUSE_INLINE_MEMORY_ACCESSORS,\n\t\t\t\t\tHAVE_SYS_TIME_H,\n\t\t\t\t\tHAVE_NANOSLEEP,\n\t\t\t\t\tSQUEAK_BUILTIN_PLUGIN,\n\t\t\t\t);\n\t\t\t\tGCC_VERSION = \"\";\n\t\t\t\tINFOPLIST_FILE = \"SqueakPureObjc-InfoCOG.plist\";\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.5;\n\t\t\t\tPER_ARCH_CFLAGS_i386 = \"-DLSB_FIRST -mfpmath=sse -finline-functions  -fomit-frame-pointer -fno-cse-follow-jumps -fno-gcse -mtune=prescott -march=pentium-m -falign-functions=16\";\n\t\t\t\tPRODUCT_NAME = Squeak;\n\t\t\t\tSDKROOT = macosx10.5;\n\t\t\t};\n\t\t\tname = Distribution;\n\t\t};\n\t\t9480CD150E5C7D9300C32178 /* Distribution */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tARCHS = \"$(ARCHS_STANDARD_32_BIT)\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Distribution: Corporate Smalltalk Consulting Ltd\";\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = c99;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = SQUEAK_BUILTIN_PLUGIN;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tHEADER_SEARCH_PATHS = /usr/include/uuid;\n\t\t\t\tPREBINDING = NO;\n\t\t\t\t\"PROVISIONING_PROFILE[sdk=iphoneos*]\" = \"4D1323CE-3998-4FF8-AB83-49838083E965\";\n\t\t\t\tSDKROOT = iphoneos4.1;\n\t\t\t};\n\t\t\tname = Distribution;\n\t\t};\n\t\t9480CD160E5C7D9300C32178 /* Distribution */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tARCHS = \"$(ARCHS_STANDARD_32_BIT)\";\n\t\t\t\tCODE_SIGN_ENTITLEMENTS = Entitlements.plist;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Distribution: Corporate Smalltalk Consulting Ltd\";\n\t\t\t\tCOPY_PHASE_STRIP = YES;\n\t\t\t\tGCC_PRECOMPILE_PREFIX_HEADER = YES;\n\t\t\t\tGCC_PREFIX_HEADER = SqueakNoOGLIPhone_Prefix.pch;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUGVM=0\",\n\t\t\t\t\t\"STACKVM=1\",\n\t\t\t\t\t\"NDEBUG=1\",\n\t\t\t\t\t\"COGMTVM=0\",\n\t\t\t\t\t\"USE_GLOBAL_STRUCT=0\",\n\t\t\t\t\t\"BASE_HEADER_SIZE=4\",\n\t\t\t\t\tTARGET_OS_IS_IPHONE,\n\t\t\t\t\tXXXUSE_INLINE_MEMORY_ACCESSORS,\n\t\t\t\t\tHAVE_SYS_TIME_H,\n\t\t\t\t\tHAVE_NANOSLEEP,\n\t\t\t\t\tSQUEAK_BUILTIN_PLUGIN,\n\t\t\t\t\t\"ISQUEAK_IMAGE=\\\"iPhone\\\"\",\n\t\t\t\t\t\"ISQUEAK_SOURCES=\\\"PharoV10\\\"\",\n\t\t\t\t);\n\t\t\t\tGCC_THUMB_SUPPORT = NO;\n\t\t\t\tGCC_VERSION = 4.2;\n\t\t\t\tINFOPLIST_FILE = \"Info-iPhone.plist\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 3.2;\n\t\t\t\tONLY_ACTIVE_ARCH = NO;\n\t\t\t\tOTHER_CFLAGS = (\n\t\t\t\t\t\"-fno-cse-follow-jumps\",\n\t\t\t\t\t\"-finline-functions\",\n\t\t\t\t\t\"-O3\",\n\t\t\t\t\t\"-fno-gcse\",\n\t\t\t\t\t\"-fomit-frame-pointer\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_NAME = Squeak;\n\t\t\t\t\"PROVISIONING_PROFILE[sdk=iphoneos*]\" = \"813AC9F6-39F6-492C-8710-8D1C5D88E049\";\n\t\t\t\tSDKROOT = iphoneos4.2;\n\t\t\t\tTARGETED_DEVICE_FAMILY = 2;\n\t\t\t};\n\t\t\tname = Distribution;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget \"SqueakNoOGLIPhone\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t947E5F3710A9FD0400D3B69E /* Debug */,\n\t\t\t\t9480CD160E5C7D9300C32178 /* Distribution */,\n\t\t\t\t9427E3A712627B12002DCA6D /* Distribution Store */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Debug;\n\t\t};\n\t\t947E62F810AA098300D3B69E /* Build configuration list for PBXNativeTarget \"SqueakPureObjc\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t947E62F910AA098300D3B69E /* Debug */,\n\t\t\t\t947E62FB10AA098300D3B69E /* Distribution */,\n\t\t\t\t9427E3A812627B12002DCA6D /* Distribution Store */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Debug;\n\t\t};\n\t\tC01FCF4E08A954540054247B /* Build configuration list for PBXProject \"SqueakPureObjcCogVM\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t947E5F3610A9FD0400D3B69E /* Debug */,\n\t\t\t\t9480CD150E5C7D9300C32178 /* Distribution */,\n\t\t\t\t9427E3A612627B12002DCA6D /* Distribution Store */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Debug;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 29B97313FDCFA39411CA2CEA /* Project object */;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/SqueakPureObjc_Prefix.pch",
    "content": "//\n// Prefix header for all source files of the 'Untitled2' target in the 'Untitled2' project\n//\n\n#ifdef __OBJC__\n    #import <Cocoa/Cocoa.h>\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/RoarVMAbstractEvent.h",
    "content": "//\n//  RoarVMAbstractEvent.h\n//  RoarVMOnIPad\n//\n\n#import <Foundation/Foundation.h>\n#import \"sq.h\"\n#import \"SqueakUIController.h\"\n\ntypedef enum  {RoarVMEventLocationOffset, RoarVMEventLocationPrevious, RoarVMEventLocationAbsolute, RoarVMEventLocationRelative} RoarVMEventLocationType;\n\n@interface RoarVMAbstractEvent : NSObject {\n  int touches;\n  int taps;\n  CGPoint location;\n}\n\n+ (void) enqueueFrom: (UIGestureRecognizer*) recognizer controller: (SqueakUIController*) controller where: (RoarVMEventLocationType) where;\n+ (RoarVMAbstractEvent*) newFrom: (UIGestureRecognizer*) recognizer view: (UIView*) view where: (RoarVMEventLocationType) where;\n- (void) initFrom: (UIGestureRecognizer*) recognizer view: (UIView*) view where: (RoarVMEventLocationType) where;\n\n- (void) processInto: (sqInputEvent*)evt;\n+ (CGPoint) adjustLocation: (CGPoint) p size: (CGSize) s;\n+ (CGPoint) leftmostLocationInView: (UIView*) view recognizer: (UIGestureRecognizer*) recognizer ;\n- (CGPoint) computeLocationFrom: (UIGestureRecognizer*) recognizer view: (UIView*) view where: (RoarVMEventLocationType) where;\n- (BOOL) resetsRelativeOffset;\n\n@property (nonatomic, readonly) CGPoint location;\n@property (nonatomic,assign) int touches;\n@end"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/RoarVMAbstractEvent.m",
    "content": "//\n//  RoarVMAbstractEvent.m\n//  RoarVMOnIPad\n//\n\n#import \"sq.h\"\n#import \"RoarVMAbstractEvent.h\"\n#import \"sqSqueakIPhoneApplication.h\"\n#import \"sqSqueakIPhoneApplication+events.h\"\n#import \"SqueakNoOGLIPhoneAppDelegate.h\"\n#import \"UIGestureRecognizer+RoarVMEvents.h\"\n\nextern SqueakNoOGLIPhoneAppDelegate *gDelegateApp;\n\nstatic const char* typeString(RoarVMEventLocationType t) {\n  switch (t) {\n    case RoarVMEventLocationRelative: return \"relative\";\n    case RoarVMEventLocationAbsolute: return \"absolute\";\n    case RoarVMEventLocationPrevious: return \"previous\";\n    case RoarVMEventLocationOffset:   return \"offset\";\n  }\n}\n\n\n@implementation RoarVMAbstractEvent\n\n@synthesize location, touches;\n\n- (void ) initFrom: (UIGestureRecognizer*) recognizer view: (UIView*) view where: (RoarVMEventLocationType) where {\n  touches = recognizer.numberOfTouches;\n  taps = recognizer.numberOfTapsRequired;\n  location = [self computeLocationFrom: recognizer view: view where: where];\n}\n\n- (BOOL) resetsRelativeOffset { return NO; }\n\n- (CGPoint) computeLocationFrom: (UIGestureRecognizer*) recognizer view: (UIView*) view where: (RoarVMEventLocationType) where\n{\n  static BOOL inited = NO;\n  static BOOL nextWillEstablishRelativeOffset = YES;\n  \n  static CGPoint lastLocation;\n  static CGPoint prevTouchLocation;\n  if (!inited) {\n    inited = YES;\n    lastLocation = CGPointMake(CGRectGetMidX(view.frame), CGRectGetMidY(view.frame));\n  }\n  CGPoint touchLocation = [[self class] leftmostLocationInView: view recognizer: recognizer];\n  switch (where) {\n    case RoarVMEventLocationPrevious:  \n      break;\n    case RoarVMEventLocationAbsolute:  \n      lastLocation = touchLocation;\n      break;\n      \n    case RoarVMEventLocationOffset:    \n      lastLocation = [[self class] adjustLocation: touchLocation size: view.frame.size];\n      break;\n      \n    case RoarVMEventLocationRelative: \n      if (!nextWillEstablishRelativeOffset) {\n        lastLocation.x += touchLocation.x - prevTouchLocation.x;\n        lastLocation.y += touchLocation.y - prevTouchLocation.y;\n      }\n      break;\n  }\n  prevTouchLocation = touchLocation;\n  nextWillEstablishRelativeOffset = where != RoarVMEventLocationRelative  ||  [self resetsRelativeOffset];\n\n  return lastLocation;\n}\n\n\n- (void) processInto: (sqInputEvent*)evt {\n}\n\n\n+ (RoarVMAbstractEvent*) newFrom: (UIGestureRecognizer*) recognizer view: (UIView*) view where: (RoarVMEventLocationType) where {\n  RoarVMAbstractEvent* evt = [self new];\n  [evt initFrom: recognizer view: view where: where];\n  return evt;\n}\n\n+ (void) enqueueFrom: (UIGestureRecognizer*) recognizer controller: (SqueakUIController*) controller where: (RoarVMEventLocationType) where {\n  RoarVMAbstractEvent* e = [self newFrom: recognizer view: controller.view where: where];\n  controller.cursor.center = e.location;\n  [(sqSqueakIPhoneApplication *) gDelegateApp.squeakApplication enqueueRoarVMEvent: e];\n}\n\n+ (CGPoint) adjustLocation: (CGPoint) p size: (CGSize) s {\n  static const float offsetUp = 100;\n  \n  return CGPointMake(p.x, s.height - p.y  >  offsetUp  ?  p.y - offsetUp  :  2 * p.y  -  s.height);\n}\n\n\n+ (CGPoint) leftmostLocationInView: (UIView*) view recognizer: (UIGestureRecognizer*) recognizer {\n  \n  CGPoint result = CGPointMake(INFINITY, INFINITY);\n  NSUInteger nt = [recognizer numberOfTouches];\n  for (NSUInteger i = 0; i < nt; ++i) {\n    CGPoint p = [recognizer locationOfTouch:i inView: view];\n    if (p.x < result.x) result = p;\n  }\n  return result;\n}\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/RoarVMMouseEvent.h",
    "content": "//\n//  RoarVMMouseEvent.h\n//  RoarVMOnIPad\n//\n\n#import <Foundation/Foundation.h>\n#import \"RoarVMAbstractEvent.h\"\n\n@interface RoarVMMouseEvent : RoarVMAbstractEvent {\n  int buttonBits; // RedButtonBit YellowButtonBit BlueButtonBit\n}\n\n\n\n\n- (int) buttonBitsFor: (UIGestureRecognizer*) recognizer;\n\n@property (nonatomic,assign) int buttonBits;\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/RoarVMMouseEvent.m",
    "content": "//\n//  RoarVMMouseEvent.m\n//  RoarVMOnIPad\n//\n\n#import \"RoarVMMouseEvent.h\"\n\n\n@implementation RoarVMMouseEvent\n\n@synthesize buttonBits;\n\n- (void) processInto: (sqInputEvent*)evt {\n  \n  sqMouseEvent* me = (sqMouseEvent*)evt;\n  me->type = EventTypeMouse;\n  me->timeStamp = 0; // fix later\n  me->x = lround(location.x);\n  me->y = lround(location.y);\n  me->buttons = buttonBits; \n  me->modifiers = 0; // fix later\n  me->nrClicks = 0; \n  me->windowIndex = 0; // is this right?\n\n}\n\n\n- (void) initFrom: (UIGestureRecognizer*) recognizer view: (UIView*) view where: (RoarVMEventLocationType) where {\n  [super initFrom: recognizer view: view where: where];\n  buttonBits = [self buttonBitsFor: recognizer];\n}\n\n- (int) buttonBitsFor: (UIGestureRecognizer*) recognizer {\n  if ( [recognizer isKindOfClass: [UITapGestureRecognizer class]]) {\n    switch (touches) {\n      case 1: return RedButtonBit;\n      case 2: return YellowButtonBit;\n      case 3: return BlueButtonBit;\n      default: return 0;\n    }\n  }\n  if ( [recognizer isKindOfClass: [UILongPressGestureRecognizer class]]) {\n    switch (touches) {\n      case 1: return 0;\n      case 2: return RedButtonBit;\n      case 3: return YellowButtonBit;\n      case 4: return BlueButtonBit;\n      default: return 0;\n    }\n  }\n  return 0;\n}\n\n\n\n@end;\n        \n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/RoarVMMouseUpEvent.h",
    "content": "//\n//  RoarVMMouseUpEvent.h\n//  RoarVMOnIPad\n//\n//  Created by David Ungar on 4/13/11.\n//  Copyright 2011 IBM. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n# import \"RoarVMMouseEvent.h\"\n\n\n@interface RoarVMMouseUpEvent : RoarVMMouseEvent {\n    \n}\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/RoarVMMouseUpEvent.m",
    "content": "//\n//  RoarVMMouseUpEvent.m\n//  RoarVMOnIPad\n//\n//  Created by David Ungar on 4/13/11.\n//  Copyright 2011 IBM. All rights reserved.\n//\n\n#import \"RoarVMMouseUpEvent.h\"\n\n\n@implementation RoarVMMouseUpEvent\n\n- (int) buttonBitsFor: (UIGestureRecognizer*) recognizer {\n  return 0;\n}\n\n- (BOOL) resetsRelativeOffset { return  YES; }\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/SqueakNoOGLIPhoneAppDelegate.h",
    "content": "//\n//  SqueakNoOGLIPhoneAppDelegate.h\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 5/15/08.\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n*/\n//\n\n#import <UIKit/UIKit.h>\n#import <CoreLocation/CoreLocation.h>\n#import \"SqueakUIView.h\"\n#import \"SqueakUIController.h\"\n#import \"sqSqueakAppDelegate.h\"\n#import\t\"sqiPhoneScreenAndWindow.h\"\n\n@interface SqueakNoOGLIPhoneAppDelegate : sqSqueakAppDelegate <UIApplicationDelegate,UIScrollViewDelegate,UIAccelerometerDelegate,CLLocationManagerDelegate> {\n\tIBOutlet UIWindow *window;\n\tIBOutlet SqueakUIView *mainView;\t\t\t\t//This is the squeak screen surface\n\tIBOutlet SqueakUIController *viewController;\t//This controler manages the ability to do orientation\n\tUIScrollView *scrollView;\t\t\t\t\t\t//This scroll view wrapps the mainView\n\tsqiPhoneScreenAndWindow *screenAndWindow;\n}\n- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView;\n- (void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration;\n- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error;\n- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation;\n- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application;      // try to clean up as much memory as possible. next step is to terminate app\n- (void) zoomToOrientation:(UIInterfaceOrientation)o animated:(BOOL)animated;\n\n@property (nonatomic,retain) UIWindow *window;\n@property (nonatomic,retain) SqueakUIView *mainView;\n@property (nonatomic,retain) UIScrollView *scrollView;\n@property (nonatomic,retain) SqueakUIController *viewController;\n@property (nonatomic,retain) sqiPhoneScreenAndWindow *screenAndWindow;\n@end\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/SqueakNoOGLIPhoneAppDelegate.m",
    "content": "//\n//  SqueakNoOGLIPhoneAppDelegate.m\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 5/15/08.\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n*/\n//\n#import <UIKit/UIKit.h>\n\n#import \"SqueakNoOGLIPhoneAppDelegate.h\"\n#import \"sqSqueakIPhoneApplication.h\"\n#import \"sqiPhoneScreenAndWindow.h\"\n#import \"sqSqueakIPhoneInfoPlistInterface.h\"\n#import \"SqueakUIViewCALayer.h\"\n#import \"SqueakUIViewOpenGL.h\"\n\nextern struct\tVirtualMachine* interpreterProxy;\nSqueakNoOGLIPhoneAppDelegate *gDelegateApp;\n\n@implementation SqueakNoOGLIPhoneAppDelegate\n\n@synthesize window;\n@synthesize mainView;\n@synthesize scrollView;\n@synthesize viewController;\n@synthesize screenAndWindow;\n\n- (sqSqueakMainApplication *) makeApplicationInstance {\n\treturn [sqSqueakIPhoneApplication new];\n}\n\n- (void)applicationDidFinishLaunching:(UIApplication *)application {\t\n\t\n#warning this is wrong, need to get shared application\n\tgDelegateApp = self;\t\n\tmainView = null;\n\tscrollView = null;\n\t\n\tsqueakApplication = [self makeApplicationInstance];\n\tscreenAndWindow =  [sqiPhoneScreenAndWindow new];\n\t[self.squeakApplication setupEventQueue];\n\t[self singleThreadStart];\n\t//[self workerThreadStart];\n\n}\n\n- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView\n{\n\treturn self.mainView;\n}\n\n- (id) createPossibleWindow {\n\tif (gDelegateApp.mainView == nil) {\n\t\tNSAutoreleasePool * pool = [NSAutoreleasePool new];\n\t\tNSMethodSignature * methodSignature = [gDelegateApp methodSignatureForSelector:@selector(makeMainWindowOnMainThread)];\n\t\tNSInvocation *redrawInv = [NSInvocation invocationWithMethodSignature: methodSignature];\n\t\t[redrawInv setTarget: gDelegateApp];\n\t\t[redrawInv setSelector:@selector(makeMainWindowOnMainThread)];\n\t\t[redrawInv performSelectorOnMainThread: @selector(invoke) withObject: nil waitUntilDone: YES];\t\t\t\t\n\t\t[pool drain];\t\n\t}\n\treturn self.window;\n}\n\n- (void) zoomToOrientation:(UIInterfaceOrientation)o animated:(BOOL)animated {\n\t/* \n\t Magic eToys code, leave this here to be nice.. Don't use unless you know what you are doing?\n\t \n\t CGRect zoomRect;\n\t zoomRect.origin.x = 0;\n\t zoomRect.origin.y = 0;\n\t if (UIInterfaceOrientationIsPortrait(o)) {\n\t zoomRect.size.width  = 1200 * 4 / 3;\n\t } else {\n\t zoomRect.size.width  = 1200 * 3 / 4;\n\t }\n\t zoomRect.size.height = zoomRect.size.width * 3 / 4;\n\t [self.scrollView zoomToRect: zoomRect animated: animated];\n\t */\n}\n\n- (Class) whatRenderCanWeUse {\n//  Ok the proper way is to get the glGetString() extensions, but at this point open/gl is not setup. \n//  So bail and decide on operating system version.. \n//\tBOOL hasGL_APPLE_texture_2D_limited_npot = (0 != strstr((char *)glGetString(GL_EXTENSIONS), \"GL_APPLE_texture_2D_limited_npot\"));\n//\treturn  (hasGL_APPLE_texture_2D_limited_npot) ? [SqueakUIViewOpenGL class] : [SqueakUIViewCALayer class];\n\n    // The device must be running running iOS 3.2 or later.\n    NSString *reqSysVer = @\"3.2\";\n    NSString *currSysVer = [[UIDevice currentDevice] systemVersion];\n    BOOL osVersionSupported = ([currSysVer compare:reqSysVer options:NSNumericSearch] != NSOrderedAscending);\n\treturn  (osVersionSupported) ? [SqueakUIViewOpenGL class] : [SqueakUIViewCALayer class];\n}\n\n- (void) makeMainWindowOnMainThread\n\n//This is fired via a cross thread message send from logic that checks to see if the window exists in the squeak thread.\n\n{\n\t\t\n\t// Set up content view\n\t// The application frame includes the status area if needbe. \n\n\tCGRect mainScreenSize = [[UIScreen mainScreen] applicationFrame];\n\t\n\tBOOL useScrollingView = [(sqSqueakIPhoneInfoPlistInterface*)self.squeakApplication.infoPlistInterfaceLogic useScrollingView];\n\t\n\tif (useScrollingView) {\n\t\tscrollView = [[UIScrollView alloc ] initWithFrame: mainScreenSize];\n\n\t\t//Now setup the true view size as the width/height * 2.0  so we can have a larger squeak window and zoom in/out. \n\t\tCGRect fakeScreenSize = mainScreenSize;\n\t\tfakeScreenSize.origin.x = 0;\n\t\tfakeScreenSize.origin.y = 0;\n\t\tfakeScreenSize.size.width *= 2.0; \n\t\tfakeScreenSize.size.height *= 2.0;\n\t\t/* eToys setup \n\t\t fakeScreenSize.size.width = 1200; \n\t\t fakeScreenSize.size.height = 900;\n\t\t*/\n\t\tmainView = [[[self whatRenderCanWeUse] alloc] initWithFrame: fakeScreenSize];\n\t\tmainView.backgroundColor = [UIColor blackColor];\n\t\tmainView.multipleTouchEnabled = YES;\n\t\tmainView.autoresizingMask = UIViewAutoresizingNone;\n\t\tself.mainView.clearsContextBeforeDrawing = NO;\n\t\t\n\t\t//Setup the scroll view which wraps the mainView\n\t\tself.scrollView.scrollEnabled = useScrollingView;\n\t\tself.scrollView.clearsContextBeforeDrawing = NO;\n\t\tself.scrollView.canCancelContentTouches = NO;\n\t\tself.scrollView.minimumZoomScale = 0.5; \n\t\tself.scrollView.maximumZoomScale = 4.0;\n\t\tself.scrollView.delegate = self;\n\t\tself.scrollView.backgroundColor = [UIColor blackColor];\n\t\tself.scrollView.autoresizesSubviews=YES;\n\t\tself.scrollView.autoresizingMask=(UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth);\t\n\n\t\tself.viewController = [SqueakUIController new];\n\t\tself.viewController.view = self.scrollView;\n\t\t\n\t\t\n\t\t[self zoomToOrientation: UIInterfaceOrientationPortrait animated: NO];\n\t\t[self.scrollView addSubview: self.mainView];\n\t\t[window addSubview: self.scrollView];\n\t\t\n\t} else {\n\t\tCGRect fakeScreenSize = mainScreenSize;\n\t\tmainView = [[[self whatRenderCanWeUse] alloc] initWithFrame: fakeScreenSize];\n\t\tself.mainView.clearsContextBeforeDrawing = NO;\n\t\t[self.mainView setMultipleTouchEnabled: YES];\n\t\tself.viewController = [SqueakUIController new];\n\t\tself.viewController.view = self.mainView;\n\t\t[window addSubview: self.mainView];\n\t}\n\t\n\t[window makeKeyAndVisible];\n  \n  [self.viewController setupRecognizers];\n  [self.viewController addCursor];\n\t\n}\n\n- (void)dealloc {\n\t[mainView release];\n\t[scrollView release];\n\t[viewController release];\n\t[window release];\n\t[screenAndWindow release];\n\t[super dealloc];\n}\n\n- (void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration {\n\tNSMutableArray* data = [NSMutableArray new];\n\t\n\t[acceleration retain]; \n\t[data addObject: [NSNumber numberWithInteger: 2]];\n\t[data addObject: acceleration];\n\t[[[self squeakApplication] eventQueue] addItem: data];\n\t[data release];\n\tinterpreterProxy->signalSemaphoreWithIndex(gDelegateApp.squeakApplication.inputSemaphoreIndex);\n}\n\n- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error {\n\tNSMutableArray* data = [NSMutableArray new];\n\n\t[manager retain]; \n\t[error retain]; \n\t[data addObject: [NSNumber numberWithInteger: 3]];\n\t[data addObject: manager];\n\t[data addObject: error];\n\t[[[self squeakApplication] eventQueue] addItem: data];\n\t[data release];\n\tinterpreterProxy->signalSemaphoreWithIndex(gDelegateApp.squeakApplication.inputSemaphoreIndex);\n}\n\n- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation {\n\tNSMutableArray* data = [NSMutableArray new];\n\n\t[manager retain]; \n\t[newLocation retain]; \n\t[oldLocation retain]; \n\t[data addObject: [NSNumber numberWithInteger: 4]];\n\t[data addObject: manager];\n\t[data addObject: newLocation];\n\t[data addObject: oldLocation];\n\t[[[self squeakApplication] eventQueue] addItem: data];\n\t[data release];\n\tinterpreterProxy->signalSemaphoreWithIndex(gDelegateApp.squeakApplication.inputSemaphoreIndex);\n}\n\n- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application {\n\t// try to clean up as much memory as possible. next step is to terminate app\n\t/* Actually sending the message to the image is nice, but it's impossible to clean up things here \n\t on the VM level. It could be some Object-C thing is going on, like URL fetching, or JPEG rendering,\n\t if so the squeak application can decide what to do, or ignore it which leads to death in a few seconds */\n\t\n\tNSMutableArray* data = [NSMutableArray new];\n\t\n\t[data addObject: [NSNumber numberWithInteger: 5]];\n\t[[[self squeakApplication] eventQueue] addItem: data];\n\t[data release];\n\tinterpreterProxy->signalSemaphoreWithIndex(gDelegateApp.squeakApplication.inputSemaphoreIndex);\n}\n\n- (void)applicationWillTerminate:(UIApplication *)application {\n\t[[NSNotificationCenter defaultCenter] postNotificationName: @\"ApplicationWillTerminate\" object: self];\n}\n\n\n@end\n\n/* unableToReadImageError and others, where do they go? */\n\n/*\n> kCLLocationAccuracyBest = -1.0\n> kCLLocationAccuracyNearestTenMeters = 10.0\n> kCLLocationAccuracyHundredMeters = 100.0\n> kCLLocationAccuracyKilometer = 1000.0\n> kCLLocationAccuracyThreeKilometers = 3000.0\n */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/SqueakUIController.h",
    "content": "//\n//  SqueakUIController.h\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 6/8/08.\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n*/\n\n# ifdef ROAR_VM\n\n@interface SqueakUIController : UIViewController <UIGestureRecognizerDelegate, UIKeyInput> {\n  UIButton* cursor;\n  UILongPressGestureRecognizer* longRecognizers[4];\n}\n- (void) setupRecognizers;\n- (void) addCursor;\n\n- (void)handleTapFrom:(UITapGestureRecognizer *)recognizer;\n- (void)finishTapFrom:(UITapGestureRecognizer *)recognizer;\n- (void)handleSwipeFrom:(UISwipeGestureRecognizer *)recognize;\n- (void)handleLongPressFrom:(UILongPressGestureRecognizer *)recognizer;\n\n- (void)startEnteringText;\n\n@property (nonatomic,assign) UIButton* cursor;\n\n# else\n@interface SqueakUIController : UIViewController\n# endif // ROAR_VM\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/SqueakUIController.m",
    "content": "//\n//  SqueakUIController.m\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 6/8/08.SqueakNoOGLIPhoneAppDelegate.m: \t[[[self squeakApplication] eventQueue] addItem: data];\n\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n#import \"SqueakNoOGLIPhoneAppDelegate.h\"\n#import \"SqueakUIController.h\"\n#import \"sqiPhoneScreenAndWindow.h\"\n#import \"sq.h\"\n\n#import \"sqSqueakIPhoneApplication.h\"\n#import \"sqSqueakIPhoneApplication+events.h\"\n#import \"RoarVMMouseUpEvent.h\"\n#import \"RoarVMSwipeEvent.h\"\n\n\nextern struct\tVirtualMachine* interpreterProxy;\nextern SqueakNoOGLIPhoneAppDelegate *gDelegateApp;\nstatic\tsqWindowEvent evt;\n\n@implementation SqueakUIController\n\n@synthesize cursor;\n\n\n\n- (void) setupRecognizers {\n\n  for ( int touches = 1;  touches <= 3;   ++touches ) {\n    UIGestureRecognizer *fewerTapRecognizer = nil;\n    for ( int taps = 1;  taps <= 2;  ++taps) {\n      UITapGestureRecognizer *r;\n      r = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTapFrom:)];\n      r.numberOfTapsRequired = taps;  r.numberOfTouchesRequired = touches;\n      r.delaysTouchesBegan = NO;  r.delaysTouchesEnded = NO; r.cancelsTouchesInView = NO;\n      [self.view addGestureRecognizer:r];\n      r.delegate = self;\n      \n      // if (fewerTapRecognizer != nil) [fewerTapRecognizer requireGestureRecognizerToFail: r];\n      fewerTapRecognizer = r;\n    }\n  }\n    \n  for ( int taps = 0; taps <= 0; ++taps) {\n    for (int touches = 1;  touches <= sizeof(longRecognizers)/sizeof(longRecognizers[0]);  ++touches) {\n      UILongPressGestureRecognizer *r;\n      r = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleLongPressFrom:)];\n      r.delaysTouchesBegan = NO; r.delaysTouchesEnded = NO; r.cancelsTouchesInView = YES;  \n      r.numberOfTouchesRequired = touches; r.numberOfTapsRequired = taps;\n      CFTimeInterval minSecs = 0.1; // if zero don't get taps, or long press changed\n      r.minimumPressDuration = minSecs;\n      r.allowableMovement = 10000;\n      [self.view addGestureRecognizer: r];\n      longRecognizers[touches-1] = r;\n      r.delegate = self;\n    }\n  }\n\n  static int dirs[] = {\n    UISwipeGestureRecognizerDirectionDown, \n    UISwipeGestureRecognizerDirectionLeft, \n    UISwipeGestureRecognizerDirectionRight, \n    UISwipeGestureRecognizerDirectionUp};\n  \n  for (int touches = 3;  touches <= 4;  ++touches)\n    for (int i = 0;  i < sizeof(dirs)/sizeof(dirs[0]); ++i) {\n      UISwipeGestureRecognizer *spr;\n      spr = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwipeFrom:)];\n      spr.direction = dirs[i];\n      spr.delaysTouchesBegan = NO; spr.delaysTouchesEnded = NO; spr.cancelsTouchesInView = YES;\n      spr.numberOfTouchesRequired = touches;\n      [self.view addGestureRecognizer: spr];\n       spr.delegate = self;\n     }\n}\n\nstatic const char* stateString(UIGestureRecognizerState s) {\n  switch (s) {\n    case UIGestureRecognizerStatePossible: return  \"Possible\"; \n    case UIGestureRecognizerStateBegan: return  \"Began\"; \n    case UIGestureRecognizerStateChanged: return  \"Changed\"; \n    case UIGestureRecognizerStateRecognized: return  \"Recognized\"; \n    case UIGestureRecognizerStateCancelled: return  \"Cancelled\"; \n    case UIGestureRecognizerStateFailed: return  \"Failed\"; \n    default:  return \"Unknown state\";\n  }\n}\n\n\n- (void)handleTapFrom:(UITapGestureRecognizer *)recognizer {\n  if (recognizer.numberOfTapsRequired > 1) {\n    [self startEnteringText];\n    return;\n  }\n  [RoarVMMouseEvent enqueueFrom: recognizer controller: self where: RoarVMEventLocationAbsolute];\n  \n  [self performSelector: @selector(finishTapFrom:) withObject: recognizer afterDelay: 0.3];\n}\n\n- (void) finishTapFrom:(UITapGestureRecognizer *) recognizer {\n  [RoarVMMouseUpEvent enqueueFrom: recognizer controller: self  where: RoarVMEventLocationPrevious];\n}\n\n\n\n- (void)handleSwipeFrom:(UISwipeGestureRecognizer *)recognizer {\n  [RoarVMSwipeEvent enqueueFrom: recognizer controller: self   where: RoarVMEventLocationAbsolute];\n}\n\n\n\n\n\n- (BOOL)canBecomeFirstResponder\n{\n  return YES;\n}\n\n- (BOOL) hasText {return NO;}\n\n- (void)startEnteringText\n{\n  [self becomeFirstResponder];\n}\n\n- (void) insertText:(NSString *)text {\n  [(SqueakUIView*)self.view recordCharEvent: text];\n}\n\n- (void) deleteBackward {\n  static NSString* backspace = nil;\n  if (!backspace) {\n    backspace = [NSString stringWithCString: \"\\b\" encoding: NSASCIIStringEncoding];\n    [backspace retain];\n  }\n  [self insertText: backspace];\n}\n\n\n- (void)handleLongPressFrom:(UILongPressGestureRecognizer *)recognizer {\n  switch ( recognizer.state ) {\n    case UIGestureRecognizerStateBegan:   \n      [RoarVMMouseEvent enqueueFrom: recognizer controller: self where: RoarVMEventLocationRelative]; \n      break;\n    case UIGestureRecognizerStateChanged: \n      [RoarVMMouseEvent enqueueFrom: recognizer controller: self where: RoarVMEventLocationRelative]; \n      break;\n    case UIGestureRecognizerStateEnded:   \n      [RoarVMMouseUpEvent enqueueFrom: recognizer controller: self where: RoarVMEventLocationRelative]; \n      //for (int i = 1;  i < recognizer.numberOfTouchesRequired; ++i)\n      //  longRecognizers[i-1].enabled = YES;\n      break;\n    default: break;\n  }\n }\n\n# if 0\n- (BOOL) gestureRecognizer: (UIGestureRecognizer*) r1 shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)r2 {\n  if (![r1 isKindOfClass: [UILongPressGestureRecognizer class]]) return NO;\n  if (![r2 isKindOfClass: [UILongPressGestureRecognizer class]]) return NO;\n  return YES;\n}\n\n- (BOOL) gestureRecognizerShouldBegin: (UIGestureRecognizer*) r {\n  if (![r isKindOfClass: [UILongPressGestureRecognizer class]]) return YES;\n  UILongPressGestureRecognizer* lpr = (UILongPressGestureRecognizer*)r;\n  for (int i = 1;  i < lpr.numberOfTouchesRequired; ++i)\n    longRecognizers[i-1].enabled = NO;\n  return YES;\n}\n# endif\n\n\n// Subclasses override this method to define how the view they control will respond to device rotation \n- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {\n\t//Called by Main Thread, beware of calling Squeak routines in Squeak Thread\n\t\n\treturn YES;\n}\n\n- (void) pushEventToQueue {\n\tNSMutableArray* data = [NSMutableArray new];\n\t[data addObject: [NSNumber numberWithInteger: 8]];\n\t[data addObject: [NSData  dataWithBytes:(const void *) &evt length: sizeof(sqInputEvent)]];\n\t[[gDelegateApp.squeakApplication eventQueue]  addItem: data];\n\t[data release];\t\n}\n\n\n- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {\n\t[gDelegateApp zoomToOrientation: toInterfaceOrientation animated: YES];\n}\n\n- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {\n\tUIInterfaceOrientation o = [[UIApplication sharedApplication] statusBarOrientation];\n\n/*\tetoys rotate for keyboard! \n\tif (UIInterfaceOrientationIsPortrait(o))\n\t\t[gDelegateApp.mainView becomeFirstResponder];\n\telse\n\t\t[gDelegateApp.mainView resignFirstResponder];\n*/\t\n\t\n\tCGRect mainScreenSize = [[UIScreen mainScreen] applicationFrame];\n\tCGRect f;\n\n\tf.origin.x = 0.0f;\n\tf.origin.y = 0.0f;\n\tf.size.width = UIInterfaceOrientationIsPortrait(o) ? mainScreenSize.size.width : mainScreenSize.size.height;\n\tf.size.height = UIInterfaceOrientationIsPortrait(o) ? mainScreenSize.size.height : mainScreenSize.size.width;\n\tevt.type = EventTypeWindow;\n\tevt.timeStamp = (int) ioMSecs();\n\tevt.action = WindowEventPaint;\n\n\tevt.value1 = (int) f.origin.x;\n\tevt.value2 = (int) f.origin.y;\n\tevt.value3 = (int) f.size.width;;\n\tevt.value4 = (int) f.size.height;\n\tevt.windowIndex = 1;\n\n//\tf.size.width *= 2.0;\n//\tf.size.height *= 2.0;\n//\tgDelegateApp.mainView.frame = f;\n//\t[gDelegateApp.scrollView sizeToFit];\n\n\t[self performSelector: @selector(pushEventToQueue) withObject: nil afterDelay: 1.0]; \n\n}\n\n- (void) addCursor {\n  cursor = [UIButton buttonWithType: UIButtonTypeRoundedRect];\n  cursor.alpha = 0.66;\n  cursor.frame = CGRectMake(100, 100, 20, 20);\n  [self.view addSubview: cursor];\n}\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/SqueakUIView.h",
    "content": "//\n//  SqueakUIView.h\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 5/20/08.\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n//\n\n#import <Foundation/Foundation.h>\n#include <AvailabilityInternal.h>\n\n#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_3_2\n@interface SqueakUIView : UIView  <UIKeyInput> {\n#else\n@interface SqueakUIView : UIView  {\n#endif\n\tCGColorSpaceRef colorspace;\n\tvoid\t*squeakTheDisplayBits;\n\t}\n\t\n\t- (void) recordCharEvent:(NSString *) unicodeString;\n\t- (void) drawThelayers;\n\t- (void) drawImageUsingClip: (CGRect) clip;\n\t@property (nonatomic,assign) void *squeakTheDisplayBits;\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/SqueakUIView.m",
    "content": "//\n//  SqueakUIView.m\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 5/20/08.\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n//\n#import \"SqueakUIView.h\"\n#import \"sqSqueakMainApplication.h\"\n#import \"SqueakNoOGLIPhoneAppDelegate.h\"\n#import \"sqSqueakIPhoneApplication+events.h\"\n#import \"sqiPhoneScreenAndWindow.h\"\n#import \"sq.h\"\n\nextern struct\tVirtualMachine* interpreterProxy;\nextern SqueakNoOGLIPhoneAppDelegate *gDelegateApp;\n\n@implementation SqueakUIView : UIView ;\n@synthesize squeakTheDisplayBits;\n\n- (id)initWithFrame:(CGRect) aFrame {\n\tself = [super initWithFrame: aFrame];\n\tself.autoresizingMask = UIViewAutoresizingFlexibleRightMargin|UIViewAutoresizingFlexibleBottomMargin|UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth;\n\tcolorspace = CGColorSpaceCreateDeviceRGB();\n\treturn self;\n}\n\n- (void) dealloc {\n    [super dealloc];\n//\tif (colorspace)\n//\t\tCGColorSpaceRelease(colorspace);\t\n}\n\n- (void) drawThelayers {\n}\n\n- (void) drawImageUsingClip: (CGRect) clip {\n}\n\n# ifndef ROAR_VM\n// Handles the start of a touch\n- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event\n{\n\t//Called by Main Thread, beware of calling Squeak routines in Squeak Thread\n\t[(sqSqueakIPhoneApplication *) gDelegateApp.squeakApplication recordTouchEvent: touches type: UITouchPhaseBegan];\n}\n\n// Handles the continuation of a touch.\n- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event \n{  \n\t//Called by Main Thread, beware of calling Squeak routines in Squeak Thread\n\t[(sqSqueakIPhoneApplication *) gDelegateApp.squeakApplication recordTouchEvent: touches type: UITouchPhaseMoved];\n\t\n}\n\n// Handles the end of a touch event.\n- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event \n{\n\t//Called by Main Thread, beware of calling Squeak routines in Squeak Thread\n\t[(sqSqueakIPhoneApplication *) gDelegateApp.squeakApplication recordTouchEvent: touches type: UITouchPhaseEnded];\n}\n\n- (void) touchesCancelled: (NSSet *) touches withEvent: (UIEvent *) event {\n\t//Called by Main Thread, beware of calling Squeak routines in Squeak Thread\n\t[(sqSqueakIPhoneApplication *) gDelegateApp.squeakApplication recordTouchEvent: touches type: UITouchPhaseCancelled];\n}\n# endif // !ROAR_VM\n\n- (BOOL)canBecomeFirstResponder {\n\treturn YES;\n}\n\n- (BOOL)hasText {\n\treturn YES;\n}\n\n- (void)insertText:(NSString *)text {\n\t[self recordCharEvent: text];\n}\n\n- (void)deleteBackward {\n\tunichar delete[1];\n\tdelete[0] =  0x08;\n\n\t[self recordCharEvent:[NSString stringWithCharacters: delete length: 1]];\n}\n\n- (void) pushEventToQueue: (sqInputEvent *) evt {\t\n\tNSMutableArray* data = [NSMutableArray new];\n\t[data addObject: [NSNumber numberWithInteger: 7]];\n\t[data addObject: [NSData  dataWithBytes:(const void *) evt length: sizeof(sqInputEvent)]];\n\t[[gDelegateApp.squeakApplication eventQueue]  addItem: data];\n\t[data release];\t\n}\n\n- (int) figureOutKeyCode: (unichar) unicode {\n\tstatic int unicodeToKeyCode[] = {54, 115, 11, 52, 119, 114, 3, 5, 51, 48, 38, 116, 121, 36, 45, 31, \n\t\t96, 12, 15, 1, 17, 32, 9, 13, 7, 16, 6, 53, 123, 124, 126, 125, 49, 18, 39, 20, 21, 23, 26, 39, \n\t\t25, 29, 67, 69, 43, 27, 47, 44, 29, 18, 19, 20, 21, 23, 22, 26, 28, 25, 41, 41, 43, 24, 47, \n\t\t44, 19, 0, 11, 8, 2, 14, 3, 5, 4, 34, 38, 40, 37, 46, 45, 31, 35, 12, 15, 1, 17, 32, 9, 13, \n\t\t7, 16, 6, 33, 42, 30, 22, 27, 50, 0, 11, 8, 2, 14, 3, 5, 4, 34, 38, 40, 37, 46, 45, 31, 35, \n\t\t12, 15, 1, 17, 32, 9, 13, 7, 16, 6, 33, 42, 30, 50, 117};\n\tif (unicode > 127) \n\t\treturn 0;\n\treturn unicodeToKeyCode[unicode];\n\t\n}\n\n- (void) recordCharEvent:(NSString *) unicodeString {\n\tsqKeyboardEvent evt;\n\tunichar unicode;\n\tunsigned char macRomanCharacter;\n\tNSInteger\ti;\n\tNSRange picker;\n\tNSUInteger totaLength;\n\t\n\tevt.type = EventTypeKeyboard;\n\tevt.timeStamp = (int) ioMSecs();\n\tpicker.location = 0;\n\tpicker.length = 1;\n\ttotaLength = [unicodeString length];\n\tfor (i=0;i < totaLength;i++) {\n\t\t\n\t\tunicode = [unicodeString characterAtIndex: i];\n\t\tNSString *lookupString = [[NSString alloc] initWithCharacters: &unicode length: 1];\n\t\t[lookupString getBytes: &macRomanCharacter maxLength: 1 usedLength: NULL encoding: NSMacOSRomanStringEncoding\n\t\t\t\t\t   options: 0 range: picker remainingRange: NULL];\n\t\t[lookupString release];\n\t\t\n\t\t// LF -> CR\n\t\tif (macRomanCharacter == 10)\n\t\t\tmacRomanCharacter = 13;\n\t\t\n\t\tevt.pressCode = EventKeyDown;\n\t\tBOOL isUppercase = [[NSCharacterSet uppercaseLetterCharacterSet] characterIsMember: unicode];\n\t\tevt.modifiers = isUppercase ? ShiftKeyBit : 0;\n\t\tevt.charCode = [self figureOutKeyCode: unicode];\n\n\t\tunsigned int keyCodeRemembered = evt.charCode;\n\t\tevt.utf32Code = 0;\n\t\tevt.reserved1 = 0;\n\t\tevt.windowIndex = 1;\n\t\t[self pushEventToQueue: (sqInputEvent *)&evt];\n\t\t\n\t\tevt.charCode =\tmacRomanCharacter;\n\t\tevt.pressCode = EventKeyChar;\n\t\tevt.modifiers = evt.modifiers;\n\t\tif ((evt.modifiers & CommandKeyBit) && (evt.modifiers & ShiftKeyBit)) {  /* command and shift */\n            if ((unicode >= 97) && (unicode <= 122)) {\n\t\t\t\t/* convert ascii code of command-shift-letter to upper case */\n\t\t\t\tunicode = unicode - 32;\n            }\n\t\t}\n\t\t\n\t\tevt.utf32Code = unicode;\n\t\tevt.timeStamp++; \n\t\t[self pushEventToQueue: (sqInputEvent *) &evt];\n\t\tif (YES) {\n\t\t\tevt.pressCode = EventKeyUp;\n\t\t\tevt.charCode = keyCodeRemembered;\n\t\t\tevt.utf32Code = 0;\n\t\t\tevt.timeStamp++; \n\t\t\t[self pushEventToQueue: (sqInputEvent *) &evt];\n\t\t}\n\t}\n\t\n\tinterpreterProxy->signalSemaphoreWithIndex(gDelegateApp.squeakApplication.inputSemaphoreIndex);\n\t\n}\n \n@end\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/SqueakUIViewCALayer.h",
    "content": "//\n//  SqueakUIViewCALayer.h\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 10-09-09.\n//  Copyright 2010 Corporate Smalltalk Consulting Ltd. All rights reserved.\n/*\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import <UIKit/UIKit.h>\n#import \"SqueakUIView.h\"\n\n@interface SqueakUIViewCALayer : SqueakUIView {\n\tCALayer *myLayer[4][4];\n\tBOOL\tdirty[4][4];\n\tCGRect\tframeForQuartz[4][4];\n\tCGFloat dividedWidth;\n\tCGFloat dividedHeight;\t\n}\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/SqueakUIViewCALayer.m",
    "content": "//\n//  SqueakUIViewCALayer.m\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 10-09-09.\n//  Copyright 2010 Corporate Smalltalk Consulting Ltd. All rights reserved.\n//\n/*\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n#import \"SqueakUIViewCALayer.h\"\n#import <QuartzCore/QuartzCore.h>\n#import \"sq.h\"\nextern struct\tVirtualMachine* interpreterProxy;\n\nstatic void MyProviderReleaseData (\n\t\t\t\t\t\t\t\t   void *info,\n\t\t\t\t\t\t\t\t   const void *data,\n\t\t\t\t\t\t\t\t   size_t size\n\t\t\t\t\t\t\t\t   ) {\n}\n\n\n@implementation SqueakUIViewCALayer\n\n- (void)layoutSubviews {\n\tCGRect aFrame = self.bounds;\n\tdividedWidth = aFrame.size.width/4.0;\n\tdividedHeight = aFrame.size.height/4.0;\n\tfor (int v=0;v<4;v++) {\n\t\tfor (int h=0;h<4;h++) {\n\t\t\tCALayer *setupLayer = [CALayer layer];\n\t\t\t[setupLayer setOpaque: YES];\n\t\t\tsetupLayer.frame = CGRectMake(dividedWidth*h, dividedHeight*v, dividedWidth, dividedHeight);\n\t\t\tif (myLayer[v][h]) {\n\t\t\t\t[self.layer replaceSublayer: myLayer[v][h] with: setupLayer];\n\t\t\t\tmyLayer[v][h] = setupLayer;\n\t\t\t} else {\n\t\t\t\tmyLayer[v][h] = setupLayer;\n\t\t\t\t[self.layer addSublayer: setupLayer];\n\t\t\t}\n\t\t\tframeForQuartz[v][h] = CGRectMake(dividedWidth*h,dividedHeight*(3-v), dividedWidth, dividedHeight);\n\t\t\tdirty[v][h] = NO;\n\t\t}\n\t}\n}\n\n- (CGImageRef) createImageFrom: (void *) dispBitsIndex affectedT: (int) affectedT affectedB: (int) affectedB affectedL: (int) affectedL affectedR: (int) affectedR height: (int) height width: (int) width {\n\tconst size_t depth = 32;\n\tsize_t \tpitch = ((((width)*(depth) + 31) >> 5) << 2);\n\t\n\tsize_t totalSize = pitch * (affectedB-affectedT)-affectedL*4;\n\tCGDataProviderRef provider =  CGDataProviderCreateWithData (NULL,(void*)dispBitsIndex+ pitch*affectedT + affectedL*4,(size_t) totalSize,MyProviderReleaseData);\n\t\n\tCGImageRef image = CGImageCreate((size_t) affectedR-affectedL,(size_t) affectedB-affectedT, (size_t) 8 /* bitsPerComponent */,\n\t\t\t\t\t\t\t\t\t (size_t) depth /* bitsPerPixel */, \n\t\t\t\t\t\t\t\t\t (size_t) pitch, colorspace, \n\t\t\t\t\t\t\t\t\t (CGBitmapInfo) kCGImageAlphaNoneSkipFirst | kCGBitmapByteOrder32Host , \n\t\t\t\t\t\t\t\t\t provider, NULL, (bool) 0, kCGRenderingIntentDefault);\n\t\n\tCGDataProviderRelease(provider);\n\treturn image;\n}\n\n\n- (void) drawImageUsingClip: (CGRect) clip {\n\tfor (int v=0;v<4;v++) {\n\t\tfor (int h=0;h<4;h++) {\n\t\t\tdirty[v][h] = dirty[v][h] || CGRectIntersectsRect(frameForQuartz[v][h],clip);\n\t\t}\n\t}\n}\n\n- (void) drawThelayers {\n\tsqInt formObj = interpreterProxy->displayObject();\n\tsqInt formPtrOop = interpreterProxy->fetchPointerofObject(0, formObj);\t\n\tvoid* dispBitsIndex = interpreterProxy->firstIndexableField(formPtrOop);\n\tsqueakTheDisplayBits = (void*) dispBitsIndex;\t\n\t\n\t[CATransaction begin];\n\t[CATransaction setValue: [NSNumber numberWithBool:YES] forKey: kCATransactionDisableActions];\n\tfor (int v=0;v<4;v++) {\n\t\tfor (int h=0;h<4;h++) {\n\t\t\tif (dirty[v][h]) {\n\t\t\t\tCGRect rect = myLayer[v][h].frame;\n\t\t\t\tCGImageRef x= [self createImageFrom: squeakTheDisplayBits \n\t\t\t\t\t\t\t\t\t\t  affectedT: rect.origin.y \n\t\t\t\t\t\t\t\t\t\t  affectedB: rect.origin.y+rect.size.height \n\t\t\t\t\t\t\t\t\t\t  affectedL: rect.origin.x \n\t\t\t\t\t\t\t\t\t\t  affectedR: rect.origin.x+rect.size.width \n\t\t\t\t\t\t\t\t\t\t\t height: (int) dividedHeight*4 \n\t\t\t\t\t\t\t\t\t\t\t  width: (int) dividedWidth*4];\n\t\t\t\tmyLayer[v][h].contents = (id)x; \n\t\t\t\tCGImageRelease(x);\n\t\t\t\tdirty[v][h] = NO;\n\t\t\t}\n\t\t}\n\t}\n\t[CATransaction commit];\n}\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/SqueakUIViewOpenGL.h",
    "content": "//\n//  SqueakUIViewOpenGL.h\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 10-09-09.\n//  Copyright 2010 Corporate Smalltalk Consulting Ltd. All rights reserved.\n/*\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import <UIKit/UIKit.h>\n#import \"SqueakUIView.h\"\n#import <OpenGLES/EAGL.h>\n#import <OpenGLES/ES1/gl.h>\n#import <OpenGLES/ES1/glext.h>\n#import <OpenGLES/EAGLDrawable.h>\n#import <QuartzCore/QuartzCore.h>\nextern struct\tVirtualMachine* interpreterProxy;\n\n// Run-time assertion\n#if 0\n#define rt_assert(expression) assert(expression)\n#else\n#define rt_assert(expression)\n#endif\n\n// Catch run-time GL errors\n#if 0\n#define glCheckError() { \\\nGLenum err = glGetError(); \\\nif (err != GL_NO_ERROR) { \\\nfprintf(stderr, \"glCheckError: %04x caught at %s:%u\\n\", err, __FILE__, __LINE__); \\\nrt_assert(0); \\\n} \\\n}\n#else\n#define glCheckError()\n#endif\n\n\n@interface SqueakUIViewOpenGL : SqueakUIView {\n\t// The pixel dimensions of the backbuffer\n    GLint backingWidth;\n    GLint backingHeight;\n\tGLuint textureId;\n\tBOOL clippyIsEmpty;\n\tBOOL\tsyncNeeded;\n\tCGRect clippy;\n\t// OpenGL names for the renderbuffer and framebuffer used to render to this view\n    EAGLContext *context;\n    GLuint viewRenderbuffer, viewFramebuffer;   \n}\n-(void)setupOpenGL;\n\n@end\n\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/SqueakUIViewOpenGL.m",
    "content": "//\n//  SqueakUIViewOpenGL.m\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 10-09-09.\n//  Copyright 2010 Corporate Smalltalk Consulting Ltd. All rights reserved.\n/*\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import \"SqueakUIViewOpenGL.h\"\n#import \"sq.h\"\n\n// A class extension to declare private methods\n@interface SqueakUIViewOpenGL ()\n@property (nonatomic, retain) EAGLContext *context;\n@end\n\nconst GLfloat spriteTexcoords[] = {\n\t0.0f, 1.0f,\n\t1.0f, 1.0f,\n\t0.0f, 0.0f,\n\t1.0f, 0.0f,\n};\n\n@implementation SqueakUIViewOpenGL\n@synthesize context;\n\n+ (Class)layerClass {\n    return [CAEAGLLayer class];\n}\n\n- (id)initWithFrame:(CGRect) aFrame {\n\tself = [super initWithFrame: aFrame];\n\tclippyIsEmpty = YES;\n\tsyncNeeded = NO;\n\n\t// Get the layer\n\tCAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer;\n\teaglLayer.opaque = YES;\n\teaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys:\n\t\t\t\t\t\t\t\t\t[NSNumber numberWithBool:NO], kEAGLDrawablePropertyRetainedBacking,\n\t\t\t\t\t\t\t\t\tkEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat,\n\t\t\t\t\t\t\t\t\tnil];\n\t\n\t//other choice is kEAGLColorFormatRGB565\n\t\n\tcontext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES1];        \n\tif (!context || ![EAGLContext setCurrentContext:context]) {\n\t\t[self release];\n\t\treturn nil;\n\t}\n\n\t[self setupOpenGL];\n\treturn self;\n}\n\n-(void)setupOpenGL {\t\n\t// Create system framebuffer object. The backing will be allocated in -reshapeFramebuffer\n\t\n\tglGenFramebuffersOES(1, &viewFramebuffer);glCheckError();\n\tglBindFramebufferOES(GL_FRAMEBUFFER_OES, viewFramebuffer);glCheckError();\n\tglGenRenderbuffersOES(1, &viewRenderbuffer);glCheckError();\n\tglBindRenderbufferOES(GL_RENDERBUFFER_OES, viewRenderbuffer);glCheckError();\n\tglFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_RENDERBUFFER_OES, viewRenderbuffer);glCheckError();\n}\n\n-(GLuint)createTextuerUsingWidth:(GLuint)w Height:(GLuint)h\n{\n\tGLuint handle;\n\n\tglGenTextures(1, &handle);glCheckError();\n\tglBindTexture(GL_TEXTURE_2D, handle);glCheckError();\n\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);\n\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);\n\tglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);glCheckError();\n\tglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);glCheckError();\n\t\n\t// http://www.khronos.org/registry/gles/extensions/APPLE/APPLE_texture_2D_limited_npot.txt\n\t\n\tglTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_BGRA, GL_UNSIGNED_BYTE, NULL);glCheckError();\n\t\n\tglDisable(GL_DEPTH_TEST);glCheckError();\n\tglDisableClientState(GL_COLOR_ARRAY);glCheckError();\n\tglEnable(GL_TEXTURE_2D);glCheckError();\n\tglEnableClientState(GL_VERTEX_ARRAY);glCheckError();\n\tglEnableClientState(GL_TEXTURE_COORD_ARRAY);glCheckError();\n\n\treturn handle;\n}\n\n- (void)dealloc {        \n    if ([EAGLContext currentContext] == context)\n        [EAGLContext setCurrentContext:nil];\n    \n    self.context = nil;\n    [super dealloc];\n}\n\n- (void)layoutSubviews {\n    // Allocate GL color buffer backing, matching the current layer size\n\t[context renderbufferStorage:GL_RENDERBUFFER_OES fromDrawable:(CAEAGLLayer*)self.layer]; glCheckError();\n\tglGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_WIDTH_OES, &backingWidth);glCheckError();\n    glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_HEIGHT_OES, &backingHeight);glCheckError();\n\trt_assert(GL_FRAMEBUFFER_COMPLETE_OES == glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES));\n\tif (textureId) {\n\t\tglDeleteTextures(1,&textureId);\n\t\ttextureId = 0;\n\t}\n}\n\n- (void) drawImageUsingClip: (CGRect) clip {\n\tif (clippyIsEmpty){\n\t\tclippy = clip;\n\t\tclippyIsEmpty = NO;\n\t} else {\n\t\tclippy = CGRectUnion(clippy, clip);\n\t}\n\tsyncNeeded = YES;\n}\n\n- (void) drawThelayers {\n\tif (syncNeeded) { \n\t\t[self drawRect: clippy];\n\t\tsyncNeeded = NO;\n\t\tclippyIsEmpty = YES;\n//\t\tglFlush();\n\t\t[EAGLContext setCurrentContext:context];\n\t\t[context presentRenderbuffer:GL_RENDERBUFFER_OES];\n\t}\n}\n\n- (void)loadTexturesFrom: (void*) lastBitsIndex subRectangle: (CGRect) subRectSqueak { \n\tCGRect subRect = subRectSqueak;\n\tNSUInteger imageWidth = (NSUInteger)self.bounds.size.width*4;\n\tGLfloat spriteVertices[] =  {\n\t\t0.0f,0.0f,   \n\t\tself.bounds.size.width,0.0f,   \n\t\t0.0f,self.bounds.size.height, \n\t\tself.bounds.size.width,self.bounds.size.height};\n\n\tsubRect.origin.y = self.bounds.size.height-subRectSqueak.origin.y-subRectSqueak.size.height;\n\tvoid *span = lastBitsIndex+(NSUInteger)subRect.origin.y*imageWidth + (NSUInteger)subRect.origin.x* 4;\n\t\n\tif (!textureId) {\n\t\ttextureId = [self createTextuerUsingWidth: backingWidth Height: backingHeight];\n\t} else {\n\t\tglBindTexture(GL_TEXTURE_2D, textureId);glCheckError();\n\t}\n\t\n\tfor( GLint y = 0; y < (GLint) subRect.size.height; y++ ) {\n\t\t void *row =  imageWidth*y + span;\n\t\t glTexSubImage2D( GL_TEXTURE_2D, 0, (GLint)subRect.origin.x, (GLint)subRect.origin.y+y, \n\t\t\t\t\t\t (GLsizei)subRect.size.width, 1, GL_BGRA, GL_UNSIGNED_BYTE, row );glCheckError();\n\t }\n\t\t\n    glViewport( 0, 0, self.bounds.size.width, self.bounds.size.height);glCheckError();\t\n\tglMatrixMode(GL_PROJECTION);glCheckError();\n\tglLoadIdentity();glCheckError();\n    glMatrixMode(GL_MODELVIEW);glCheckError();\n    glLoadIdentity();glCheckError();\n\tglVertexPointer(2, GL_FLOAT, 0, spriteVertices);glCheckError();\n\tglTexCoordPointer(2, GL_FLOAT, 0, spriteTexcoords);\tglCheckError();\n\tglOrthof(0, (GLfloat) self.bounds.size.width, 0, (GLfloat) self.bounds.size.height, 0, 1);glCheckError();\n\tglDrawArrays(GL_TRIANGLE_STRIP, 0, 4);glCheckError();\n}\n\n\n-(void)drawRect:(CGRect)rect {\n\t//\tNSLog(@\" drawRect %f %f %f %f\",rect.origin.x,rect.origin.y,rect.size.width,rect.size.height);\n\tsqInt formObj = interpreterProxy->displayObject();\n\tsqInt formPtrOop = interpreterProxy->fetchPointerofObject(0, formObj);\t\n\tvoid* dispBitsIndex = interpreterProxy->firstIndexableField(formPtrOop);\n    if ( dispBitsIndex ) {\n\t\t[self loadTexturesFrom:dispBitsIndex subRectangle: rect];\n\t}\n}\n\n@end"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/SqueakUIViewOpenGLAlternate.m",
    "content": "//\n//  SqueakUIViewOpenGL.m\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 10-09-09.\n//  Copyright 2010 Corporate Smalltalk Consulting Ltd. All rights reserved.\n/*\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import \"SqueakUIViewOpenGL.h\"\n#import \"sq.h\"\n\n// A class extension to declare private methods\n@interface SqueakUIViewOpenGL ()\n@property (nonatomic, retain) EAGLContext *context;\n@end\n\nconst GLfloat spriteTexcoords[] = {\n\t0.0f, 1.0f,\n\t1.0f, 1.0f,\n\t0.0f, 0.0f,\n\t1.0f, 0.0f,\n};\n\n@implementation SqueakUIViewOpenGL\n@synthesize context;\n\n+ (Class)layerClass {\n    return [CAEAGLLayer class];\n}\n\n- (id)initWithFrame:(CGRect) aFrame {\n\tself = [super initWithFrame: aFrame];\n\tclippyIsEmpty = YES;\n\tsyncNeeded = NO;\n\n\t// Get the layer\n\tCAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer;\n\teaglLayer.opaque = YES;\n\teaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys:\n\t\t\t\t\t\t\t\t\t[NSNumber numberWithBool:YES], kEAGLDrawablePropertyRetainedBacking,\n\t\t\t\t\t\t\t\t\tkEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat,\n\t\t\t\t\t\t\t\t\tnil];\n\t\n\t//other choice is kEAGLColorFormatRGB565\n\t\n\tcontext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES1];        \n\tif (!context || ![EAGLContext setCurrentContext:context]) {\n\t\t[self release];\n\t\treturn nil;\n\t}\n\n\t[self setupOpenGL];\n\treturn self;\n}\n\n-(void)setupOpenGL {\t\n\t// Create system framebuffer object. The backing will be allocated in -reshapeFramebuffer\n\t\n\tglGenFramebuffersOES(1, &viewFramebuffer);glCheckError();\n\tglBindFramebufferOES(GL_FRAMEBUFFER_OES, viewFramebuffer);glCheckError();\n\tglGenRenderbuffersOES(1, &viewRenderbuffer);glCheckError();\n\tglBindRenderbufferOES(GL_RENDERBUFFER_OES, viewRenderbuffer);glCheckError();\n\tglFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_RENDERBUFFER_OES, viewRenderbuffer);glCheckError();\n}\n\n-(GLuint)createTextuerUsingWidth:(GLuint)w Height:(GLuint)h\n{\n\tGLuint handle;\n\n\tglGenTextures(1, &handle);glCheckError();\n\tglBindTexture(GL_TEXTURE_2D, handle);glCheckError();\n\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);\n\tglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);\n\tglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);glCheckError();\n\tglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);glCheckError();\n\t\n\t// http://www.khronos.org/registry/gles/extensions/APPLE/APPLE_texture_2D_limited_npot.txt\n\t\t\n\tglDisable(GL_DEPTH_TEST);glCheckError();\n\tglDisableClientState(GL_COLOR_ARRAY);glCheckError();\n\tglEnable(GL_TEXTURE_2D);glCheckError();\n\tglEnableClientState(GL_VERTEX_ARRAY);glCheckError();\n\tglEnableClientState(GL_TEXTURE_COORD_ARRAY);glCheckError();\n\n\treturn handle;\n}\n\n- (void)dealloc {        \n    if ([EAGLContext currentContext] == context)\n        [EAGLContext setCurrentContext:nil];\n    \n    self.context = nil;\n    [super dealloc];\n}\n\n- (void)layoutSubviews {\n    // Allocate GL color buffer backing, matching the current layer size\n\t[context renderbufferStorage:GL_RENDERBUFFER_OES fromDrawable:(CAEAGLLayer*)self.layer]; glCheckError();\n\tglGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_WIDTH_OES, &backingWidth);glCheckError();\n    glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_HEIGHT_OES, &backingHeight);glCheckError();\n\trt_assert(GL_FRAMEBUFFER_COMPLETE_OES == glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES));\n\tif (textureId) {\n\t\tglDeleteTextures(1,&textureId);\n\t\ttextureId = 0;\n\t}\n}\n\n- (void) drawImageUsingClip: (CGRect) clip {\n\tif (clippyIsEmpty){\n\t\tclippy = clip;\n\t\tclippyIsEmpty = NO;\n\t} else {\n\t\tclippy = CGRectUnion(clippy, clip);\n\t}\n\tsyncNeeded = YES;\n}\n\n- (void) drawThelayers {\n\tif (syncNeeded) { \n\t\t[self drawRect: clippy];\n\t\tsyncNeeded = NO;\n\t\tclippyIsEmpty = YES;\n//\t\tglFlush();\n\t\t[EAGLContext setCurrentContext:context];\n\t\t[context presentRenderbuffer:GL_RENDERBUFFER_OES];\n\t}\n}\n\n- (void)loadTexturesFrom: (void*) lastBitsIndex subRectangle: (CGRect) subRectSqueak { \n\tCGRect subRect = subRectSqueak;\n\tNSUInteger imageWidth = (NSUInteger)self.bounds.size.width*4;\n\tGLfloat spriteVertices[] =  {\n\t\t0.0f,0.0f,   \n\t\tsubRect.size.width,0.0f,   \n\t\t0.0f,subRect.size.height, \n\t\tsubRect.size.width,subRect.size.height};\n\n\tsubRect.origin.y = self.bounds.size.height-subRectSqueak.origin.y-subRectSqueak.size.height;\n\tvoid *span = lastBitsIndex+(NSUInteger)subRect.origin.y*imageWidth + (NSUInteger)subRect.origin.x* 4;\n\t\n\tif (!textureId) {\n\t\ttextureId = [self createTextuerUsingWidth: backingWidth Height: backingHeight];\n\t} else {\n\t\tglBindTexture(GL_TEXTURE_2D, textureId);glCheckError();\n\t}\n\t\n\tglTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, (GLsizei)subRect.size.width, (GLsizei)subRect.size.height, 0, GL_BGRA, GL_UNSIGNED_BYTE, NULL);glCheckError();\n\tfor( GLint y = 0; y < (GLint) subRect.size.height; y++ ) {\n\t\t void *row =  imageWidth*y + span;\n\t\t glTexSubImage2D( GL_TEXTURE_2D, 0, 0, y, \n\t\t\t\t\t\t (GLsizei)subRect.size.width, 1, GL_BGRA, GL_UNSIGNED_BYTE, row );glCheckError();\n\t }\n\t\t\n    glViewport( subRect.origin.x, subRectSqueak.origin.y, subRect.size.width, subRect.size.height);glCheckError();\t\n\tglMatrixMode(GL_PROJECTION);glCheckError();\n\tglLoadIdentity();glCheckError();\n    glMatrixMode(GL_MODELVIEW);glCheckError();\n    glLoadIdentity();glCheckError();\n\tglVertexPointer(2, GL_FLOAT, 0, spriteVertices);glCheckError();\n\tglTexCoordPointer(2, GL_FLOAT, 0, spriteTexcoords);\tglCheckError();\n\tglOrthof(0, (GLfloat) subRect.size.width, 0, (GLfloat) subRect.size.height, 0, 1);glCheckError();\n\tglDrawArrays(GL_TRIANGLE_STRIP, 0, 4);glCheckError();\n}\n\n\n-(void)drawRect:(CGRect)rect {\n\t//\tNSLog(@\" drawRect %f %f %f %f\",rect.origin.x,rect.origin.y,rect.size.width,rect.size.height);\n\tsqInt formObj = interpreterProxy->displayObject();\n\tsqInt formPtrOop = interpreterProxy->fetchPointerofObject(0, formObj);\t\n\tvoid* dispBitsIndex = interpreterProxy->firstIndexableField(formPtrOop);\n    if ( dispBitsIndex ) {\n\t\t[self loadTexturesFrom:dispBitsIndex subRectangle: rect];\n\t}\n}\n\n@end"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/UIGestureRecognizer+RoarVMEvents.h",
    "content": "//\n//  UIGestureRecognizer+RoarVMEvents.h\n//  RoarVMOnIPad\n//\n//  Created by David Ungar on 4/13/11.\n//  Copyright 2011 IBM. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\n\n@interface UIGestureRecognizer (UIGestureRecognizer_RoarVMEvents)\n\n- (int) numberOfTapsRequired;\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/UIGestureRecognizer+RoarVMEvents.m",
    "content": "//\n//  UIGestureRecognizer+RoarVMEvents.m\n//  RoarVMOnIPad\n//\n//  Created by David Ungar on 4/13/11.\n//  Copyright 2011 IBM. All rights reserved.\n//\n\n#import \"UIGestureRecognizer+RoarVMEvents.h\"\n\n\n@implementation UIGestureRecognizer (UIGestureRecognizer_RoarVMEvents)\n\n- (int) numberOfTapsRequired { return 0; }\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/sqSqueakIPhoneApplication+Network.h",
    "content": "//\n//  sqSqueakIPhoneApplication+Network.h\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 09/02/09.\n//  Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n//\n// This example code comes from https://devforums.apple.com/message/26334#26334\n\n\n#import <Foundation/Foundation.h>\n#import <SystemConfiguration/SCNetworkReachability.h>\n\n\n@interface UIApplication (NetworkExtensions)\n\n+(BOOL)hasActiveWiFiConnection;     // fast wi-fi connection\n+(BOOL)hasNetworkConnection;     // any type of internet connection (edge, 3g, wi-fi)\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/sqSqueakIPhoneApplication+Network.m",
    "content": "//\n//  sqSqueakIPhoneApplication+Network.m\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 09/02/09.\n//  Copyright 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n//\n// This example code comes from https://devforums.apple.com/message/26334#26334\n// Also see http://developer.apple.com/iphone/library/samplecode/Reachability/listing2.html\n\n#import \"sqSqueakIPhoneApplication+Network.h\"\n\t\n\t\n@implementation UIApplication (NetworkExtensions)\n\n// fast wi-fi connection\n+(BOOL)hasActiveWiFiConnection\n{\n\tSCNetworkReachabilityFlags     flags;\n\tSCNetworkReachabilityRef     reachabilityRef;\n\tBOOL                              gotFlags;\n\t\n\treachabilityRef   = SCNetworkReachabilityCreateWithName(CFAllocatorGetDefault(), [@\"0.0.0.0\" UTF8String]);\n\tgotFlags          = SCNetworkReachabilityGetFlags(reachabilityRef, &flags);\n\tCFRelease(reachabilityRef);\n\t\n\tif (!gotFlags)\n\t{\n\t\treturn NO;\n\t}\n\t\n\tif( flags & kSCNetworkReachabilityFlagsIsWWAN )\n\t{\n\t\treturn NO;\n\t}\n\t\n\tif( flags & kSCNetworkReachabilityFlagsReachable )\n\t{\n\t\treturn YES;\n\t}\n\t\n\treturn NO;\n}\n\n// any type of internet connection (edge, 3g, wi-fi)\n+(BOOL)hasNetworkConnection\n{\n\tSCNetworkReachabilityFlags     flags;\n\tSCNetworkReachabilityRef     reachabilityRef;\n\tBOOL                              gotFlags;\n\t\n\treachabilityRef     = SCNetworkReachabilityCreateWithName(CFAllocatorGetDefault(), [@\"www.apple.com\" UTF8String]);\n\tgotFlags          = SCNetworkReachabilityGetFlags(reachabilityRef, &flags);\n\tCFRelease(reachabilityRef);\n\t\n\tif (!gotFlags || (flags == 0) )\n\t{\n\t\treturn NO;\n\t}\n\t\n\treturn YES;\n}\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/sqSqueakIPhoneApplication+attributes.h",
    "content": "//\n//  sqSqueakIPhoneApplication+attributes.h\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 6/19/08.\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n*/\n//\n\n#import \"sqSqueakIPhoneApplication.h\" \n\n@interface sqSqueakIPhoneApplication (attributes) \n- (const char *) getAttribute:(sqInt) indexNumber;\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/sqSqueakIPhoneApplication+attributes.m",
    "content": "//\n//  sqSqueakIPhoneApplication+attributes.m\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 6/19/08.\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n//\n\n#import \"sqSqueakIPhoneApplication+attributes.h\"\n#import \"sqSqueakMainApplication+attributes.h\"\n#import \"sqSqueakMainApplication+vmAndImagePath.h\"\n\nextern struct VirtualMachine* interpreterProxy;\n\n@implementation sqSqueakIPhoneApplication (attributes) \n\n- (const char *) getAttribute:(sqInt)indexNumber {\n\t//indexNumber is a postive/negative number\n\t\n\tswitch (indexNumber) {\n\t\tcase 1001: /* OS type: \"unix\", \"win32\", \"mac\", ... */\n\t\t\treturn \"iPhone\";\n\t\t\t\n\t\tcase 1002: /* OS name: \"solaris2.5\" on unix, \"win95\" on win32, ... */\n\t\t\treturn \"iPhone\";\n\t\t\t\n\t\tcase 1003: /* processor architecture: \"68k\", \"x86\", \"PowerPC\", ...  */\n\t\t\treturn \"iPhone\";\n\t\t\t\n\t\tcase 1006: /* vm build string */\n\t\t\treturn \"iPhone 2.2.4b1 20-Mar-10 >432619D7-FA70-4449-BEDF-68A74B3E4EF5<\";\n/*\t\t\treturn \"iPhone 2.2.3b2 05-Mar-10 >9E99B1C2-0B6B-4944-8B6F-74030D14F3C6<\";\n\t\t\treturn \"iPhone 2.2.2b1 17-Feb-10 >18862A37-A8AD-411D-945B-95AE2596AD89<\";\n\t\t\treturn \"iPhone 2.1.1b1 06-Jan-10 >3487508B-770D-4F8D-B9FF-75B2A5657D42<\";\n\t\t\treturn \"iPhone 2.1.0b1 05-Jan-10 >E33C3EE9-3038-4F83-8BE9-C6BE0C00E5B1<\";\n\t\t\treturn \"iPhone 2.0.2b1 04-Jan-10 >1159F4AC-5B8A-4F56-B5E0-C792ACC9E094<\";\n\t\t\treturn \"iPhone 2.0.1b1 02-Jan-10 >DE4B61C0-E36D-4F72-AE95-148A0664CC1A<\";\n\t\t\treturn \"iPhone 2.0.0b1 04-Sep-09 >41158CDC-6D20-4C58-82AB-72B754757C01<\";\n\t\t\treturn \"iPhone 1.0.9b2 04-Feb-09 >32DDCF17-D959-44ED-8DF8-10EE08D4DBFC<\";\n\t\t\treturn \"iPhone 1.0.9b1 01-Feb-09 >9FD8E823-6E8B-4416-A9D6-8770E74F7BB1<\";\n\t\t\treturn \"iPhone 1.0.7b2 03-Nov-08 >D60C0BDB-CA0F-45E1-822F-05A93C104712<\";\n\t\t\treturn \"iPhone 1.0.7b1 27-Oct-08 >C2B2864E-B83D-4A6E-B8EF-CCD4AC64CFDC<\";\n \t\t\treturn \"iPhone 1.0.6b5 22-Oct-08 >BD6F8836-420A-479B-B400-70F73845A140<\";\n\t\t\treturn \"iPhone 1.0.6b4 20-Oct-08 >E1936807-92EA-43AC-85A5-5BDA5755A606<\";\n\t\t\treturn \"iPhone 1.0.6b3 10-Oct-08 >1EA1C0AA-BD8C-4BDD-94D7-19E021A32A66<\";\n\t\t\treturn \"iPhone 1.0.6b2 10-Oct-08 >5BD0B1C3-5D5F-4E39-8EB4-2A6B75D969B0<\";\n\t\t\treturn \"iPhone 1.0.6b1 09-Oct-08 >BBBBD9F3-64F7-4C86-8416-021732AAA9CB<\";\n\t\t\treturn \"iPhone 1.0.5b4 03-Oct-08 >B35DA17D-2A1E-4DB6-9A3B-FEA51C5E8BEB<\";\n\t\t\treturn \"iPhone 1.0.5b3 02-Oct-08 >2C04C0A4-5A5E-494E-BD49-2958E5AFA17D<\";\n\t\t\treturn \"iPhone 1.0.5b1 21-Sep-08 >FF17E074-9A2F-4538-9433-BDDB87F97AD5<\";\n\t\t\treturn \"iPhone 1.0.4b1 16-Sep-08 >B0574F6D-48DD-48CD-BE9F-0D197DED1A8F<\";\n\t\t\treturn \"iPhone 1.0.3b2 13-Sep-08 >EB1B4D70-E96B-4F43-B2BA-B2A470E4A265<\";\n\t\t\treturn \"iPhone 1.0.3b1 03-Sep-08 >721B48ED-CD8C-43A1-BE69-09FC9131E573<\";\n\t\t\treturn \"iPhone 1.0.1b1 18-May-08 >1B1BAAE0-F4CA-4192-B3E5-4FE51E5BB820<\";\n\t\t\treturn \"iPhone 1.0.2b1 02-Sep-08 >08F8D709-6867-4272-B18C-DBA704CB3C62<\";\n*/\t\t\t\n\t\tcase 1007: { /* vm build string also info.plist */\n#if STACKVM\n\t\t\textern char *__interpBuildInfo;\n\t\t\treturn __interpBuildInfo;\n#endif\n\t\t\tbreak;\n\t\t}\n\t\tcase 1008: { /* vm build string also info.plist */\n# if COGVM\n\t\t\textern char *__cogitBuildInfo;\n\t\t\treturn __cogitBuildInfo;\n#endif\n\t\t\tbreak;\n\t\t}\n\t\tdefault: \n\t\t\tbreak;\n\t}\n\n\treturn (char *) [super getAttribute: indexNumber];\n}\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/sqSqueakIPhoneApplication+clipboard.h",
    "content": "//\n//  sqSqueakIPhoneApplication+clipboard.h\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 10-01-02.\n//  Copyright 2010 Corporate Smalltalk Consulting Ltd. All rights reserved.\n//\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import \"sqSqueakIPhoneApplication.h\" \n\n@interface sqSqueakIPhoneApplication  (clipboard) \n- (sqInt) clipboardSize;\n- (void) clipboardRead: (sqInt) count into: (char *)byteArrayIndex  startingAt: (sqInt) startIndex;\n- (void) clipboardWrite: (sqInt) count from: (char *)byteArrayIndex  startingAt:  (sqInt) startIndex;\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/sqSqueakIPhoneApplication+clipboard.m",
    "content": "//\n//  sqSqueakIPhoneApplication+clipboard.m\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 10-01-02.\n//  Copyright 2010 Corporate Smalltalk Consulting Ltd. All rights reserved.\n//\n\n#import \"sqSqueakIPhoneApplication+clipboard.h\"\n\nstatic char * clipboard=NULL;\n\n@implementation sqSqueakIPhoneApplication (clipboard)\n\n/* Cheat, we always call clipboardSize before clipboardRead, so obviously we can do the read when asking for the size */\n\n- (sqInt) clipboardSize {\n\tUIPasteboard *pboard= [UIPasteboard generalPasteboard];\n\tif (clipboard) free(clipboard);\n\tclipboard = NULL;\n\tNSString *possibleData = pboard.string;\n\tif (!possibleData) \n\t\treturn 0;\n\tconst char *contents= [[possibleData precomposedStringWithCanonicalMapping] UTF8String];\n\tif (contents != nil)\n\t\tclipboard= strdup(contents);\n\treturn clipboard ? (sqInt) strlen(clipboard) : 0;\n}\n\n//Evil assumption is that clipboardSize size <= byteArrayIndex size\n\n- (void) clipboardRead: (sqInt) count into: (char *)byteArrayIndex  startingAt: (sqInt) startIndex {\n\tif (clipboard){\n\t\tmemcpy((char *)byteArrayIndex + startIndex, clipboard, count);  //use memcpy versus strlcpy, targets is not null terminated. \n    }\n}\n\n- (void) clipboardWrite: (sqInt) count from: (char *)byteArrayIndex  startingAt:  (sqInt) startIndex {\n\tUIPasteboard      *pboard= [UIPasteboard generalPasteboard];\n\tNSString * string = [[NSString alloc] initWithBytes: byteArrayIndex length:(NSUInteger)count encoding: NSUTF8StringEncoding];\n\tpboard.string = string;\n\t[string release];\n}\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/sqSqueakIPhoneApplication+events.h",
    "content": "/*\n *  sqSqueakIPhoneApplication+events.h\n *  SqueakNoOGLIPhone\n *\n *  Created by John M McIntosh on 5/16/08.\n *\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n//\n\n#import \"sqSqueakIPhoneApplication.h\"\n#import \"RoarVMAbstractEvent.h\"\n#import \"RoarVMMouseEvent.h\"\n\n@interface sqSqueakIPhoneApplication (events) \n# ifdef ROAR_VM\n- (void) enqueueRoarVMEvent: (RoarVMAbstractEvent*) evt;\n- (void) processRoarVMEvent: (RoarVMAbstractEvent*) event placeIn: (sqInputEvent *) evt;\n# else\n- (void) recordTouchEvent:(NSSet *) touches type: (UITouchPhase) phase;\n# endif\n\n- (void) buildTouchEventComplexObject:(NSSet *) touches forType: (NSNumber *) aType placeIn: (sqComplexEvent *) evt ;\n- (void) buildAccelerationEventComplexObject: (UIAcceleration *) acceleration placeIn: (sqComplexEvent *) evt;\n- (void) buildLocationEventComplexObject: (NSMutableArray *) acceleration placeIn: (sqComplexEvent *) evt;\n- (void) buildApplicationEventComplexObject: (NSMutableArray *) acceleration placeIn: (sqComplexEvent *) evt;\n\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/sqSqueakIPhoneApplication+events.m",
    "content": "/*\n *  sqSqueakIPhoneApplication+events.m\n *  SqueakNoOGLIPhone\n *\n *  Created by John M McIntosh on 5/16/08.\n *\n\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n//\n\n#import \"sq.h\"\n#import \"sqSqueakMainApplication+events.h\"\n#import \"sqSqueakIPhoneApplication+events.h\"\n#import \"sqDummyaio.h\"\n#import \"sqMacHostWindow.h\"\n#import \"SqueakNoOGLIPhoneAppDelegate.h\"\n#import \"Queue.h\"\n#import \"RoarVMAbstractEvent.h\"\n#import \"RoarVMSwipeEvent.h\"\n\nextern SqueakNoOGLIPhoneAppDelegate *gDelegateApp;\nextern struct\tVirtualMachine* interpreterProxy;\nsqInt\twindowActive=1;\n\n\n@implementation sqSqueakIPhoneApplication (events) \n\n\n- (void ) processAsOldEventOrComplexEvent: (id) event placeIn: (sqInputEvent *) evt {\n\tif ([event isKindOfClass: [NSData class]]) {\n\t\t[super processAsOldEventOrComplexEvent: event placeIn: evt];\n\t\treturn;\n\t}\n\t\n  if ([event isKindOfClass: [RoarVMAbstractEvent class]]) {\n    [self processRoarVMEvent: (RoarVMAbstractEvent*)event placeIn: evt];\n    return;\n  }\n\tif ([event isKindOfClass: [NSArray class]]) {\n\t\tif ([[event objectAtIndex: 0] intValue] == 1) {\n\t\t\t[self buildTouchEventComplexObject: [event objectAtIndex: 2] forType:  [event objectAtIndex: 1] placeIn: (sqComplexEvent *) evt];\n\t\t\treturn;\n\t\t}\n\t\tif ([[event objectAtIndex: 0] intValue] == 2) { // acceleration dataa\n\t\t\t[self buildAccelerationEventComplexObject: [event objectAtIndex: 1] placeIn: (sqComplexEvent *) evt];\n\t\t\treturn;\n\t\t}\n\t\tif ([[event objectAtIndex: 0] intValue] == 3) { // location data error\n\t\t\t[self buildLocationEventComplexObject: event placeIn: (sqComplexEvent *) evt];\n\t\t\treturn;\n\t\t}\n\t\tif ([[event objectAtIndex: 0] intValue] == 4) { // location data \n\t\t\t[self buildLocationEventComplexObject: event placeIn: (sqComplexEvent *) evt];\n\t\t\treturn;\n\t\t}\n\t\tif ([[event objectAtIndex: 0] intValue] == 5) { // memory warning  \n\t\t\t[self buildApplicationEventComplexObject: event placeIn: (sqComplexEvent *) evt];\n\t\t\treturn;\n\t\t}\n\t\tif ([[event objectAtIndex: 0] intValue] == 6) { // termination warning \n\t\t\t[self buildApplicationEventComplexObject: event placeIn: (sqComplexEvent *) evt];\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif ([[event objectAtIndex: 0] intValue] == 7) { // keyboard \n\t\t\t[(NSData *)[event objectAtIndex: 1] getBytes: evt length: sizeof(sqInputEvent)];\n\t\t\treturn;\n\t\t}\n\n\t\tif ([[event objectAtIndex: 0] intValue] == 8) { // window \n\t\t\t[(NSData *)[event objectAtIndex: 1] getBytes: evt length: sizeof(sqWindowEvent)];\n\t\t\treturn;\n\t\t}\n\t}\n}\n\n# ifdef ROAR_VM\n\n- (void) processRoarVMEvent: (RoarVMAbstractEvent*) event placeIn: (sqInputEvent *) evt {\n  [event processInto: evt];\n}\n\n\n- (void) enqueueRoarVMEvent:(RoarVMAbstractEvent *) evt { \n\t[eventQueue addItem: evt];\n\t[evt release];\n\tinterpreterProxy->signalSemaphoreWithIndex(gDelegateApp.squeakApplication.inputSemaphoreIndex);\n}\n\n# else\n- (void) recordTouchEvent:(NSSet *) touches type: (UITouchPhase) phase {\n\tNSMutableArray* data = [NSMutableArray new];\n\t\n\t[data addObject: [NSNumber numberWithInteger: 1]];\n\t[data addObject: [NSNumber numberWithInteger: (signed) phase]];\n\t[data addObject: touches];\n\t[eventQueue addItem: data];\n\t[data release];\n\tinterpreterProxy->signalSemaphoreWithIndex(gDelegateApp.squeakApplication.inputSemaphoreIndex);\n}\n# endif // ROAR_VM\n\n\n\n// unused now\n\n- (void) buildTouchEventComplexObject:(NSSet *) touches forType: (NSNumber *) aType placeIn: (sqComplexEvent *) evt {\n\t\n\tsqInt count = [touches count],arrayIndex=0,squeakMSTimeNow = ioMSecs(),action;\n\tUITouch *touch;\n\tsqInt  previousLocationInViewY,previousLocationInViewX,locationInViewX,locationInViewY,squeakMSTime, view, window, tapCount, phase,timeStamp,storageArea,containerArray,touchId;\n\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), count));\n\t\tfor (touch in touches) {\n \t\t\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 11));\n\t\t\tinterpreterProxy->pushRemappableOop(interpreterProxy->integerObjectOf(squeakMSTimeNow));\n\t\t\tinterpreterProxy->pushRemappableOop(interpreterProxy->floatObjectOf([touch timestamp]));\n\t\t\tinterpreterProxy->pushRemappableOop(interpreterProxy->integerObjectOf((signed)[touch phase]));\n\t\t\tinterpreterProxy->pushRemappableOop(interpreterProxy->integerObjectOf((signed)[touch tapCount]));\n\t\t\tinterpreterProxy->pushRemappableOop(interpreterProxy->positive64BitIntegerFor((sqLong)[touch window]));\n\t\t\tinterpreterProxy->pushRemappableOop(interpreterProxy->positive64BitIntegerFor((sqLong)[touch view]));\n\t\t\tinterpreterProxy->pushRemappableOop(interpreterProxy->floatObjectOf([touch locationInView:[gDelegateApp mainView]].x));\n\t\t\tinterpreterProxy->pushRemappableOop(interpreterProxy->floatObjectOf([touch locationInView:[gDelegateApp mainView]].y));\n\t\t\tinterpreterProxy->pushRemappableOop(interpreterProxy->floatObjectOf([touch previousLocationInView:[gDelegateApp mainView]].x));\n\t\t\tinterpreterProxy->pushRemappableOop(interpreterProxy->floatObjectOf([touch previousLocationInView:[gDelegateApp mainView]].y));\n\t\t\tinterpreterProxy->pushRemappableOop(interpreterProxy->positive64BitIntegerFor((sqLong)touch));\n\t\t\ttouchId = interpreterProxy->popRemappableOop();\n\t\t\tpreviousLocationInViewY = interpreterProxy->popRemappableOop();\n\t\t\tpreviousLocationInViewX = interpreterProxy->popRemappableOop();\n\t\t\tlocationInViewY = interpreterProxy->popRemappableOop();\n\t\t\tlocationInViewX = interpreterProxy->popRemappableOop();\n\t\t\tview = interpreterProxy->popRemappableOop();\n\t\t\twindow = interpreterProxy->popRemappableOop();\n\t\t\ttapCount = interpreterProxy->popRemappableOop();\n\t\t\tphase = interpreterProxy->popRemappableOop();\n\t\t\ttimeStamp = interpreterProxy->popRemappableOop();\n\t\t\tsqueakMSTime = interpreterProxy->popRemappableOop();\n\t\t\tstorageArea = interpreterProxy->popRemappableOop();\n\t\t\tcontainerArray = interpreterProxy->popRemappableOop();\n\t\t\tinterpreterProxy->storePointerofObjectwithValue(0, storageArea, squeakMSTime);\n\t\t\tinterpreterProxy->storePointerofObjectwithValue(1, storageArea, timeStamp);\n\t\t\tinterpreterProxy->storePointerofObjectwithValue(2, storageArea, phase);\n\t\t\tinterpreterProxy->storePointerofObjectwithValue(3, storageArea, tapCount);\n\t\t\tinterpreterProxy->storePointerofObjectwithValue(4, storageArea, window);\n\t\t\tinterpreterProxy->storePointerofObjectwithValue(5, storageArea, view);\n\t\t\tinterpreterProxy->storePointerofObjectwithValue(6, storageArea, locationInViewX);\n\t\t\tinterpreterProxy->storePointerofObjectwithValue(7, storageArea, locationInViewY);\n\t\t\tinterpreterProxy->storePointerofObjectwithValue(8, storageArea, previousLocationInViewX);\n\t\t\tinterpreterProxy->storePointerofObjectwithValue(9, storageArea, previousLocationInViewY);\n\t\t\tinterpreterProxy->storePointerofObjectwithValue(10, storageArea, touchId);\n\t\t\tinterpreterProxy->storePointerofObjectwithValue(arrayIndex++, containerArray, storageArea);\n\t\t\tinterpreterProxy->pushRemappableOop(containerArray);\n\t\t}\n\t\n\tevt->type = EventTypeComplex;  //This is read as an integer and converted to an oop by interp.c\n\t\n\tevt->timeStamp = interpreterProxy->integerObjectOf(squeakMSTimeNow);\n\tswitch ([aType integerValue]) {\n\t\tcase UITouchPhaseBegan:\n\t\t\taction = ComplexEventTypeTouchsDown;\n\t\t\tbreak;\n\t\tcase UITouchPhaseEnded:\n\t\t\taction = ComplexEventTypeTouchsUp;\n\t\t\tbreak;\n\t\tcase UITouchPhaseMoved:\n\t\t\taction = ComplexEventTypeTouchsMoved;\n\t\t\tbreak;\n\t\tcase UITouchPhaseStationary:\n\t\t\taction = ComplexEventTypeTouchsStationary;\n\t\t\tbreak;\n\t\tcase UITouchPhaseCancelled:\n\t\t\taction = ComplexEventTypeTouchsCancelled;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\taction = 0;\n\t\t\tbreak;\n\t}\n\tevt->action = interpreterProxy->integerObjectOf(action);\n\tcontainerArray = interpreterProxy->popRemappableOop();\t\n\tevt->objectPointer = containerArray;\n\tevt->unused1 =interpreterProxy->integerObjectOf(0);\n\tevt->unused2 = interpreterProxy->integerObjectOf(0);\n\tevt->unused3 =interpreterProxy->integerObjectOf(0);\n\tevt->windowIndex = interpreterProxy->integerObjectOf(windowActive);\n}\n\n- (void) buildAccelerationEventComplexObject: (UIAcceleration *) acceleration placeIn: (sqComplexEvent *) evt {\n\tsqInt squeakMSTimeNow = ioMSecs();\n\t\n\tinterpreterProxy->pushRemappableOop(interpreterProxy->positive64BitIntegerFor(((usqInt) acceleration)));\n\t\n\tevt->type = EventTypeComplex;  //This is read as an integer and converted to an oop by interp.c\n\tevt->timeStamp = interpreterProxy->integerObjectOf(squeakMSTimeNow);\n\tevt->action = interpreterProxy->integerObjectOf(ComplexEventTypeAccelerationData);\n\tevt->objectPointer = interpreterProxy->popRemappableOop();\n\tevt->unused1 =interpreterProxy->integerObjectOf(0);\n\tevt->unused2 = interpreterProxy->integerObjectOf(0);\n\tevt->unused3 =interpreterProxy->integerObjectOf(0);\n\tevt->windowIndex = interpreterProxy->integerObjectOf(windowActive);\n}\n\n- (void) buildLocationEventComplexObject: (NSMutableArray *) event placeIn: (sqComplexEvent *) evt {\n\tsqInt squeakMSTimeNow = ioMSecs();\n\n\tinterpreterProxy->pushRemappableOop(interpreterProxy->positive64BitIntegerFor(((usqInt) event)));\n\n\tevt->type = EventTypeComplex;  //This is read as an integer and converted to an oop by interp.c\n\tevt->timeStamp = interpreterProxy->integerObjectOf(squeakMSTimeNow);\n\tevt->action = interpreterProxy->integerObjectOf(ComplexEventTypeLocationData);\n\tevt->objectPointer = interpreterProxy->popRemappableOop();\n\tevt->unused1 =interpreterProxy->integerObjectOf(0);\n\tevt->unused2 = interpreterProxy->integerObjectOf(0);\n\tevt->unused3 =interpreterProxy->integerObjectOf(0);\n\tevt->windowIndex = interpreterProxy->integerObjectOf(windowActive);\n}\n\n- (void) buildApplicationEventComplexObject: (NSMutableArray *) event placeIn: (sqComplexEvent *) evt {\n\tsqInt squeakMSTimeNow = ioMSecs();\n\n\tinterpreterProxy->pushRemappableOop(interpreterProxy->positive64BitIntegerFor(((usqInt) event)));\n\n\tevt->type = EventTypeComplex;  //This is read as an integer and converted to an oop by interp.c\n\tevt->timeStamp = interpreterProxy->integerObjectOf(squeakMSTimeNow);\n\tevt->action = interpreterProxy->integerObjectOf(ComplexEventTypeApplicationData);\n\tevt->objectPointer = interpreterProxy->popRemappableOop();\n\tevt->unused1 =interpreterProxy->integerObjectOf(0);\n\tevt->unused2 = interpreterProxy->integerObjectOf(0);\n\tevt->unused3 =interpreterProxy->integerObjectOf(0);\n\tevt->windowIndex = interpreterProxy->integerObjectOf(windowActive);\n}\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/sqSqueakIPhoneApplication+imageReadWrite.h",
    "content": "//\n//  sqSqueakIPhoneApplication+imageReadWrite.h\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 5/22/08.\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n//\n\n#import \"sqSqueakIPhoneApplication.h\" \n\n@interface sqSqueakIPhoneApplication (imageReadWrite) \n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/sqSqueakIPhoneApplication+imageReadWrite.m",
    "content": "//\n//  sqSqueakIPhoneApplication+imageReadWrite.m\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 5/22/08.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n//\n\n#import \"sqSqueakIPhoneApplication+imageReadWrite.h\"\n#import \"sqMacV2Memory.h\"\n#import \"sqSqueakIPhoneInfoPlistInterface.h\"\n\n#define QUOTEME_(x) #x\n#define QUOTEME(x) QUOTEME_(x)\n\n#ifndef ISQUEAK_IMAGE\n#error ISQUEAK_IMAGE is undefined (add ISQUEAK_IMAGE=\"iPhone\" to your preprocessor macros)\n#else\n#define QUOTEDIMAGE QUOTEME(ISQUEAK_IMAGE)\n#endif\n\n#ifndef ISQUEAK_SOURCES\n#error ISQUEAK_SOURCES is undefined (add ISQUEAK_SOURCES=\"PharoV10\" to your preprocessor macros)\n#else\n#define QUOTEDSOURCES QUOTEME(ISQUEAK_SOURCES)\n#endif\n\n@implementation sqSqueakIPhoneApplication (imageReadWrite) \n\n- (void) findImageViaBundleOrPreferences {\n\tNSAutoreleasePool * pool = [NSAutoreleasePool new];\n\tNSFileManager *dfm = [NSFileManager defaultManager];\n\tNSString* documentsPath = [dfm currentDirectoryPath];  //This should point to the Documents folder via a previous setup\n\tNSString* documentsImagePath = [documentsPath stringByAppendingPathComponent: [@QUOTEDIMAGE stringByAppendingString: @\".image\"]];\n\tNSString* documentsSourcesPath = [documentsPath stringByAppendingPathComponent: [@QUOTEDSOURCES stringByAppendingString: @\".sources\"]];\n\n\tBOOL fileExists = [dfm fileExistsAtPath: documentsImagePath], sourcesFileIsReadable,sourcesFileExists,copyOk,removeOK;\n\tNSError* error;\n\t\n\t/* At this point we copy over the image/changes/sources if they do not exist in Documents\n\t however it appears the simulator logic caches things in the \"iPhone Simulator\" folder\n\t between builds and is not cleaned by clean all, also you must delete the app on the iPhone\n\t when doing development. Not sure how this will work for production. Do not know where\n\t Apple syncs the iphone data to via iTunes yet */\n\t\n\tconst char\t*imageNameCharactersInDocumentPath = [dfm fileSystemRepresentationWithPath: documentsImagePath];\n\timageNamePutLength((sqInt) imageNameCharactersInDocumentPath, strlen(imageNameCharactersInDocumentPath)); \n\t\n\tNSString * likelySourceFilePath = [dfm destinationOfSymbolicLinkAtPath: documentsSourcesPath error: &error];\n\n\tif (likelySourceFilePath) {\n\t\tsourcesFileExists = true;\n\t\tsourcesFileIsReadable = [dfm isReadableFileAtPath: documentsSourcesPath];\n\t} else {\n\t\tsourcesFileExists = false;\n\t\tsourcesFileIsReadable = false;\n\t}\n\t\n\tif (sourcesFileExists && !sourcesFileIsReadable) {\n\t\tsourcesFileExists = 0;\n\t\tremoveOK = [dfm removeItemAtPath: documentsSourcesPath error: &error];\n\t}\n\t\n\tif (!sourcesFileExists) {\n\t\tNSString* bundleSourcesPath = [[NSBundle mainBundle] pathForResource:@QUOTEDSOURCES ofType:@\"sources\"]; \n\t\tif (bundleSourcesPath) \n\t\t\tcopyOk = [dfm createSymbolicLinkAtPath: documentsSourcesPath withDestinationPath: bundleSourcesPath error: &error];\n\t}\n\t\n\tif (fileExists) {\n\t\t[pool drain];\n\t\treturn;\n\t} else {\n\n\t\tNSString* bundleImagePath = [[NSBundle mainBundle] pathForResource:@QUOTEDIMAGE ofType:@\"image\"]; \n\t\tBOOL writeable = [(sqSqueakIPhoneInfoPlistInterface*)[self infoPlistInterfaceLogic] imageIsWriteable];\n\t\t\n\t\tif (writeable) {\n\t\t\tNSString* documentsChangesPath = [documentsPath stringByAppendingPathComponent: [@QUOTEDIMAGE stringByAppendingString: @\".changes\"]];\n\t\t\tNSString* bundleChangesPath = [[NSBundle mainBundle] pathForResource:@QUOTEDIMAGE ofType:@\"changes\"]; \n\t\t\t\n\t\t\tcopyOk = [dfm copyItemAtPath: bundleImagePath toPath: documentsImagePath error: &error];\n\t\t\tif (!copyOk) {\n\t\t\t\t[pool drain];\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcopyOk = [dfm copyItemAtPath: bundleChangesPath toPath: documentsChangesPath error: &error];\n\t\t} else {\n\t\t\tconst char\t*imageNameCharacters = [dfm fileSystemRepresentationWithPath: bundleImagePath];\n\t\t\timageNamePutLength((sqInt) imageNameCharacters, strlen(imageNameCharacters));\n\t\t}\n\t}\n\t[pool drain];\n}\n@end\n\n#undef QUOTEDIMAGE\n#undef QUOTEDSOURCES\n#undef QUOTEME\n#undef QUOTEME_\n\t\t\t\t\t\t\t\t\t\t\t  \n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/sqSqueakIPhoneApplication+sound.h",
    "content": "//\n//  sqSqueakIPhoneApplication+sound.h\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 5/31/08.\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n\n#import \"sqSqueakIPhoneApplication.h\"\n\n@interface sqSqueakIPhoneApplication (sound) \n\t- (void) ioBeep;\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/sqSqueakIPhoneApplication.h",
    "content": "//\n//  sqSqueakIPhoneApplication.h\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 6/19/08.\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n*/\n//\n\n#import \"sqSqueakMainApplication.h\"\n#import \"sqSqueakIPhoneFileDirectoryInterface.h\"\n\n@interface sqSqueakIPhoneApplication : sqSqueakMainApplication {\n\n}\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/sqSqueakIPhoneApplication.m",
    "content": "//\n//  sqSqueakIPhoneApplication.m\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 6/19/08.\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n*/\n//\n\n#import \"sqSqueakIPhoneApplication.h\"\n#import \"sqSqueakAppDelegate.h\"\n#import \"sqSqueakIPhoneInfoPlistInterface.h\"\n\nusqInt\tgMaxHeapSize=32*1024*1024;\nextern sqSqueakAppDelegate *gDelegateApp;\n\n@implementation sqSqueakIPhoneApplication\n- (sqSqueakFileDirectoryInterface *) newFileDirectoryInterfaceInstance {\n\treturn [sqSqueakIPhoneFileDirectoryInterface new];\n}\n\n- (sqSqueakInfoPlistInterface *) newSqSqueakInfoPlistInterfaceCreation {\n\treturn [sqSqueakIPhoneInfoPlistInterface new];\n}\n\n- (void) doMemorySetup {\n\tgMaxHeapSize =  [(sqSqueakIPhoneInfoPlistInterface*) self.infoPlistInterfaceLogic memorySize];\n\tif (gMaxHeapSize == 0) // NO IDEA is this a 4.1 bug? \n\t\tgMaxHeapSize = 32*1024*1024;\n\t\t\n}\n\n- (void) fetchPreferences {\n\t[super fetchPreferences];\n\textern char gSqueakUntrustedDirectoryName[];\n\textern char gSqueakTrustedDirectoryName[];\n\tstrlcpy(gSqueakUntrustedDirectoryName, \"/foobar/tooBar/forSqueak/bogus/\",PATH_MAX);\n\tstrlcpy(gSqueakTrustedDirectoryName, \"/foobar/tooBar/forSqueak/bogus/\",PATH_MAX);\n}\n\n@end\n\n\n/* Profiling. */\nvoid  ioProfileStatus(sqInt *running, void **exestartpc, void **exelimitpc,\n\t\t\t\t\t  void **vmhst, long *nvmhbin, void **eahst, long *neahbin) {};\nvoid  ioControlProfile(int on, void **vhp, long *nvb, void **ehp, long *neb) {};\nlong  ioControlNewProfile(int on, unsigned long buffer_size) {return 0;};\nvoid  ioNewProfileStatus(sqInt *running, long *buffersize) {};\nlong  ioNewProfileSamplesInto(void *sampleBuffer) {return 0;};\nvoid  ioClearProfile(void) {};\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/sqSqueakIPhoneClipboardAPI.h",
    "content": "//\n//  sqSqueakIPhoneClipboardAPI.h\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 01-02-10.\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2009 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#import \"sq.h\""
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/sqSqueakIPhoneClipboardAPI.m",
    "content": "//\n//  sqSqueakIPhoneClipboardAPI.m\n//  SqueakPureObjc\n//\n//  Created by John M McIntosh on 01-02-10.\n//  Copyright 2010 Corporate Smalltalk Consulting Ltd. All rights reserved.\n//\n\n#import \"sqSqueakIPhoneClipboardAPI.h\"\n\n#import \"SqueakNoOGLIPhoneAppDelegate.h\"\n#import \"sqSqueakIPhoneApplication+clipboard.h\"\n\nextern SqueakNoOGLIPhoneAppDelegate *gDelegateApp;\n\n/* Clipboard (cut/copy/paste). */\nsqInt clipboardSize(void) {\n\tNSAutoreleasePool * pool = [NSAutoreleasePool new];\n\tsqInt value = [(sqSqueakIPhoneApplication*)(SqueakNoOGLIPhoneAppDelegate *)gDelegateApp.squeakApplication clipboardSize];\n\t[pool drain];\n\treturn value;\n}\n\nsqInt clipboardReadIntoAt(sqInt count, sqInt byteArrayIndex, sqInt startIndex){\n\tNSAutoreleasePool * pool = [NSAutoreleasePool new];\n\t[(sqSqueakIPhoneApplication*)(SqueakNoOGLIPhoneAppDelegate *)gDelegateApp.squeakApplication clipboardRead: count into: (char *) pointerForIndex_xxx_dmu((usqInt)byteArrayIndex)  startingAt: startIndex];\n\t[pool drain];\n\treturn 0;\n}\n\nsqInt clipboardWriteFromAt(sqInt count, sqInt byteArrayIndex, sqInt startIndex){\n\tNSAutoreleasePool * pool = [NSAutoreleasePool new];\n\t[(sqSqueakIPhoneApplication*)(SqueakNoOGLIPhoneAppDelegate *)gDelegateApp.squeakApplication clipboardWrite: count from: (char *)pointerForIndex_xxx_dmu((usqInt)byteArrayIndex)  startingAt: startIndex];\n\t[pool drain];\n\treturn 0;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/sqSqueakIPhoneFileDirectoryInterface.h",
    "content": "//\n//  sqSqueakIPhoneFileDirectoryInterface.h\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 6/21/08.\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n//\n\n#import \"sqSqueakFileDirectoryInterface.h\"\n\n@interface sqSqueakIPhoneFileDirectoryInterface : sqSqueakFileDirectoryInterface {\n\n}\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/sqSqueakIPhoneFileDirectoryInterface.m",
    "content": "//\n//  sqSqueakIPhoneFileDirectoryInterface.m\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 6/21/08.\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n//\n\n#import \"sqSqueakIPhoneFileDirectoryInterface.h\"\n\n/* IPhone can only write to certain locations so we want to write to the documents directory */\n\n@implementation sqSqueakIPhoneFileDirectoryInterface\n\n- (BOOL) setWorkingDirectory {\n\tNSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); \n\tNSString *documentsDirectory = [paths objectAtIndex:0]; \n\tBOOL results = [[NSFileManager defaultManager] changeCurrentDirectoryPath: documentsDirectory];\n\treturn results;\n}\n\n- (NSString *) resolvedAliasFiles: (NSString *) filePath {\n\tNSFileManager * fileMgr = [NSFileManager defaultManager];\n\tNSDictionary * fileAttributes = [fileMgr fileAttributesAtPath: filePath traverseLink: NO];\n\tif (fileAttributes) {\n\t\tif ([[fileAttributes objectForKey: NSFileTypeSymbolicLink] boolValue]) {\n\t\t\tNSString* targetFilePath = [fileMgr destinationOfSymbolicLinkAtPath: filePath error: NULL];\n\t\t\tif (targetFilePath) {\n\t\t\t\tfilePath = targetFilePath;\n\t\t\t}\n\t\t}\n\t}\n\treturn filePath;\n}\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/sqSqueakIPhoneInfoPlistInterface.h",
    "content": "//\n//  sqSqueakIPhoneInfoPlistInterface.h\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 9/1/08.\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\nCopyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\nMIT License\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\nSept-02-08  1.03b1  setup useScrollingView\n */\n\n//\n\n#import \"sqSqueakInfoPlistInterface.h\"\n\n@interface sqSqueakIPhoneInfoPlistInterface : sqSqueakInfoPlistInterface \n- (BOOL) imageIsWriteable;\n- (BOOL) useScrollingView;\n- (NSInteger) memorySize;\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/sqSqueakIPhoneInfoPlistInterface.m",
    "content": "//\n//  sqSqueakIPhoneInfoPlistInterface\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 9/1/08.\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\nCopyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\nMIT License\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n\nSept-02-08  1.03b1  setup useScrollingView\n*/\n//\n\n#import \"sqSqueakIPhoneInfoPlistInterface.h\"\n\nNSString * kwriteable_preferenceKey = @\"writeable_preference\";\nNSString * kscrollableView_preferenceKey = @\"scrollableView_preference\";\nNSString * kmemorySize_preferenceKey = @\"memorySize_preference\";\n\n extern int gSqueakUseFileMappedMMAP;\n\n@implementation sqSqueakIPhoneInfoPlistInterface\n- (void) parseInfoPlist {\n\tNSAutoreleasePool * pool = [NSAutoreleasePool new];\n\n\t[super parseInfoPlist];\n\t\n\tself.SqueakUseFileMappedMMAP = YES;\n\tgSqueakUseFileMappedMMAP = 1;\n\t\n\tNSString *testValue = [defaults stringForKey: kwriteable_preferenceKey];\n\t\n\tif (testValue == nil) {\n\t\t// no default values have been set, create them here based on what's in our Settings bundle info\n        //\n        NSString *pathStr = [[NSBundle mainBundle] bundlePath];\n        NSString *settingsBundlePath = [pathStr stringByAppendingPathComponent:@\"Settings.bundle\"];\n        NSString *finalPath = [settingsBundlePath stringByAppendingPathComponent:@\"Root.plist\"];\n\t\t\n        NSDictionary *settingsDict = [NSDictionary dictionaryWithContentsOfFile:finalPath];\n        NSArray *prefSpecifierArray = [settingsDict objectForKey:@\"PreferenceSpecifiers\"];\n\n        NSDictionary *prefItem;\n\t\tNSString\t*writeable_preferenceDefault = @\"YES\";\n\t\tNSString\t*scrollableView_preferenceDefault= @\"NO\";\n\t\tNSString\t*memorySize_preferenceDefault=@\"33554432\";\n        for (prefItem in prefSpecifierArray)\t{\n\t\t\tNSString *keyValueStr = [prefItem objectForKey:@\"Key\"];\n\t\t\tid defaultValue = [prefItem objectForKey:@\"DefaultValue\"];\n\t\t\n\t\t\tif ([keyValueStr isEqualToString: kwriteable_preferenceKey]) {\n\t\t\t\twriteable_preferenceDefault = defaultValue;\n\t\t\t}\n\n\t\t\tif ([keyValueStr isEqualToString: kscrollableView_preferenceKey]) {\n\t\t\t\tscrollableView_preferenceDefault = defaultValue;\n\t\t\t}\n\n\t\t\tif ([keyValueStr isEqualToString: kmemorySize_preferenceKey]) {\n\t\t\t\tmemorySize_preferenceDefault = defaultValue;\n\t\t\t}\n\t\t}\n\t\t\n        // since no default values have been set (i.e. no preferences file created), create it here\n        NSDictionary *appDefaults =  [NSDictionary dictionaryWithObjectsAndKeys: writeable_preferenceDefault,  kwriteable_preferenceKey,\n\t\t\t\t\t\t\t\t\t  scrollableView_preferenceDefault,  kscrollableView_preferenceKey,\n\t\t\t\t\t\t\t\t\t  memorySize_preferenceDefault,  kmemorySize_preferenceKey,\n\t\t\t\t\t\t\t\t\t  nil];\n        \n        [[NSUserDefaults standardUserDefaults] registerDefaults: appDefaults];\n        [[NSUserDefaults standardUserDefaults] synchronize];\n\t}\n\t[pool drain];\n\t\n}\n\n- (BOOL) imageIsWriteable {\n\treturn [defaults boolForKey: kwriteable_preferenceKey];\n}\n\n- (BOOL) useScrollingView {\n\treturn [defaults boolForKey: kscrollableView_preferenceKey];\n}\n\n- (NSInteger) memorySize {\n\treturn [defaults integerForKey: kmemorySize_preferenceKey];\n}\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/sqSqueakiPhoneApplication+sound.m",
    "content": "//\n//  sqSqueakIPhoneApplication+sound.m\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 5/31/08.\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n\n/* Note iphone mic is 8 Khz mono, question is where the audio comes froms and goes to \n technically has two speakers, telephone receiver, speaker, plus headphones, plus bluetooth\n plus to a doc and audio out, or USB out!  note the ringer controlls and volme controls \n \n Lots of this is user interaction, don't want the user to manage things if they fiddle with \n hardware plug in/out adjust switchs\n \n ipod can play in background, where is audio routed \n \n Oh and ipod touch and iphone are different, iphone has many audio paths/routings\n \n interrupt listener, begin/end when alarm, begin on phone start, but app then gets terminated so you don't get end\n \n look for audio session current hardware settings to see what the hardware has, ie 44khz input or 8kHz input?\n look for audio route changing, you get audio route change notification\n \n */\n\n\n#import \"sqSqueakIPhoneApplication+sound.h\"\n#import <AudioToolbox/AudioToolbox.h> \n#import <UIKit/UIKit.h>\n\n@implementation sqSqueakIPhoneApplication (sound)\n- (void) ioBeep {\n#if TARGET_OS_IPHONE\n\tAudioServicesPlaySystemSound(kSystemSoundID_Vibrate);\n#else\t\n\tAudioServicesPlaySystemSound(kSystemSoundID_UserPreferredAlert);\n#endif\n\t/*Note:System-suppliedalertsoundsandsystem-supplieduser-interfacesoundeffectsarenotavailable \n\t iniPhoneOS.Forexample,usingthekSystemSoundID_UserPreferredAlertconstantasaparameter \n\t totheAudioServicesPlayAlertSoundfunctionwillnotplayanything. */\n#warning this does nothing on the iPod Touch \n}\n\n@end\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/sqiPhoneScreenAndWindow.h",
    "content": "//\n//  sqiPhoneScreenAndWindow.h\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 6/14/08.\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n//\n#import <Foundation/Foundation.h>\n#import \"sqSqueakScreenAndWindow.h\"\n\n@interface sqiPhoneScreenAndWindow : sqSqueakScreenAndWindow {\n}\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Classes/sqiPhoneScreenAndWindow.m",
    "content": "//\n//  sqiPhoneScreenAndWindow.m\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 6/14/08.\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2002-2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n//\n#import <QuartzCore/QuartzCore.h>\n\n#import \"sqiPhoneScreenAndWindow.h\"\n#import \"sqSqueakMainApplication+screen.h\"\n#import \"SqueakNoOGLIPhoneAppDelegate.h\"\n#import \"sq.h\"\n\nextern struct\tVirtualMachine* interpreterProxy;\nextern SqueakNoOGLIPhoneAppDelegate *gDelegateApp;\n\n@implementation sqiPhoneScreenAndWindow\n\n- (id)init {\n    self = [super init];\n    if (self) {\n        self.windowIndex = 1;\n\t}\n    return self;\n}\n\n- (SqueakUIView *) getMainView {\n\treturn gDelegateApp.mainView;\n}\n\n- (void)dealloc {\n\t[super dealloc];\n}\n\n@end"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/Info-iPhone.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>en</string>\n\t<key>CFBundleDisplayName</key>\n\t<string>${PRODUCT_NAME}</string>\n\t<key>CFBundleExecutable</key>\n\t<string>${EXECUTABLE_NAME}</string>\n\t<key>CFBundleIconFile</key>\n\t<string>Squeak.png</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>com.smalltalkconsulting.squeakbase</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>${PRODUCT_NAME}</string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>2.0.0</string>\n\t<key>CFBundleSignature</key>\n\t<string>FAST</string>\n\t<key>CFBundleVersion</key>\n\t<string>2.0.0</string>\n\t<key>LSRequiresIPhoneOS</key>\n\t<true/>\n\t<key>NSMainNibFile</key>\n\t<string>MainWindow</string>\n\t<key>UIInterfaceOrientation</key>\n\t<string>UIInterfaceOrientationPortrait</string>\n\t<key>UIPrerenderedIcon</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/SqueakV3-minimum-MVC.sources",
    "content": "'From Squeak3.7 of ''4 September 2004'' [latest update: #5989] on 8 October 2008 at 1:15:45 pm'!\rObject subclass: #AbstractEvent\r\tinstanceVariableNames: 'item itemKind environment'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Change Notification'!\r\r!AbstractEvent methodsFor: 'private-accessing' stamp: 'rw 7/10/2003 12:10'!\rchangeKind\r\r\t^self class changeKind! !\r\r!AbstractEvent methodsFor: 'private-accessing' stamp: 'rw 7/10/2003 12:43'!\renvironmentAt: anItemKind\r\r\t(self itemKind = anItemKind) ifTrue: [^self item].\r\t^environment at: anItemKind ifAbsent: [nil]! !\r\r!AbstractEvent methodsFor: 'private-accessing' stamp: 'rw 7/10/2003 12:20'!\reventSelector\r\r\t^self class eventSelectorBlock value: itemKind value: self changeKind! !\r\r!AbstractEvent methodsFor: 'private-accessing' stamp: 'rw 7/10/2003 12:36'!\ritem: anItem kind: anItemKind\r\r\titem := anItem.\r\titemKind := anItemKind.\r\tenvironment := Dictionary new! !\r\r!AbstractEvent methodsFor: 'private-accessing' stamp: 'rw 7/10/2003 12:37'!\ritemCategory: aCategory\r\r\tenvironment at: self class categoryKind put: aCategory! !\r\r!AbstractEvent methodsFor: 'private-accessing' stamp: 'rw 7/10/2003 12:36'!\ritemClass: aClass\r\r\tenvironment at: self class classKind put: aClass! !\r\r!AbstractEvent methodsFor: 'private-accessing' stamp: 'rw 7/10/2003 12:38'!\ritemProtocol: aProtocol\r\r\tenvironment at: self class protocolKind put: aProtocol! !\r\r!AbstractEvent methodsFor: 'private-accessing' stamp: 'NS 1/27/2004 10:38'!\ritemRequestor: requestor\r\r\tenvironment at: #requestor put: requestor! !\r\r!AbstractEvent methodsFor: 'private-accessing' stamp: 'NS 1/27/2004 10:39'!\ritemSelector: aSymbol\r\r\tenvironment at: #selector put: aSymbol! !\r\r\r!AbstractEvent methodsFor: 'accessing' stamp: 'rw 6/30/2003 08:22'!\ritem\r\t\"Return the item that triggered the event (typically the name of a class, a category, a protocol, a method).\"\r\r\t^item! !\r\r!AbstractEvent methodsFor: 'accessing' stamp: 'rw 7/10/2003 12:43'!\ritemClass\r\r\t^self environmentAt: self class classKind! !\r\r!AbstractEvent methodsFor: 'accessing' stamp: 'rw 6/30/2003 08:22'!\ritemKind\r\t\"Return the kind of the item of the event (#category, #class, #protocol, #method, ...)\"\r\r\t^itemKind! !\r\r!AbstractEvent methodsFor: 'accessing' stamp: 'rw 7/10/2003 12:44'!\ritemProtocol\r\r\t^self environmentAt: self class protocolKind! !\r\r!AbstractEvent methodsFor: 'accessing' stamp: 'NS 1/27/2004 10:38'!\ritemRequestor\r\r\t^self environmentAt: #requestor! !\r\r!AbstractEvent methodsFor: 'accessing' stamp: 'NS 1/27/2004 10:38'!\ritemSelector\r\r\t^self environmentAt: #selector! !\r\r\r!AbstractEvent methodsFor: 'printing' stamp: 'NS 1/19/2004 17:52'!\rprintOn: aStream\r\r\tself printEventKindOn: aStream.\r\taStream\r\t\tnextPutAll: ' Event for item: ';\r\t\tprint: self item;\r\t\tnextPutAll: ' of kind: ';\r\t\tprint: self itemKind! !\r\r\r!AbstractEvent methodsFor: 'testing' stamp: 'rw 6/30/2003 08:34'!\risAdded\r\r\t^false! !\r\r!AbstractEvent methodsFor: 'testing' stamp: 'rw 7/10/2003 15:01'!\risCommented\r\r\t^false! !\r\r!AbstractEvent methodsFor: 'testing' stamp: 'rw 7/14/2003 10:15'!\risDoIt\r\r\t^false! !\r\r!AbstractEvent methodsFor: 'testing' stamp: 'NS 1/19/2004 15:09'!\risModified\r\r\t^false! !\r\r!AbstractEvent methodsFor: 'testing' stamp: 'rw 7/1/2003 19:53'!\risRecategorized\r\r\t^false! !\r\r!AbstractEvent methodsFor: 'testing' stamp: 'rw 6/30/2003 08:34'!\risRemoved\r\r\t^false! !\r\r!AbstractEvent methodsFor: 'testing' stamp: 'rw 7/1/2003 11:35'!\risRenamed\r\r\t^false! !\r\r!AbstractEvent methodsFor: 'testing' stamp: 'NS 1/27/2004 12:44'!\risReorganized\r\t^ false! !\r\r\r!AbstractEvent methodsFor: 'triggering' stamp: 'rw 7/14/2003 17:06'!\rtrigger: anEventManager \r\t\"Trigger the event manager.\"\r\r\tanEventManager triggerEvent: self eventSelector with: self.! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rAbstractEvent class\r\tinstanceVariableNames: ''!\r\r!AbstractEvent class methodsFor: 'instance creation' stamp: 'NS 1/19/2004 18:42'!\rclass: aClass\r\t^ self item: aClass kind: AbstractEvent classKind.! !\r\r!AbstractEvent class methodsFor: 'instance creation' stamp: 'NS 1/19/2004 18:42'!\rclass: aClass category: cat \r\t| instance |\r\tinstance := self class: aClass.\r\tinstance itemCategory: cat.\r\t^instance! !\r\r!AbstractEvent class methodsFor: 'instance creation' stamp: 'rw 7/9/2003 11:19'!\ritem: anItem kind: anItemKind\r\r\t^self basicNew item: anItem kind: anItemKind! !\r\r!AbstractEvent class methodsFor: 'instance creation' stamp: 'NS 1/16/2004 14:19'!\rmethod: aMethod class: aClass\r\r\t| instance |\r\tinstance := self item: aMethod kind: self methodKind.\r\tinstance itemClass: aClass.\r\t^instance! !\r\r!AbstractEvent class methodsFor: 'instance creation' stamp: 'NS 1/16/2004 14:20'!\rmethod: aMethod protocol: prot class: aClass\r\r\t| instance |\r\tinstance := self method: aMethod class: aClass.\r\tinstance itemProtocol: prot.\r\t^instance! !\r\r!AbstractEvent class methodsFor: 'instance creation' stamp: 'NS 1/27/2004 10:48'!\rmethod: aMethod selector: aSymbol class: aClass\r\r\t| instance |\r\tinstance := self item: aMethod kind: self methodKind.\r\tinstance itemSelector: aSymbol.\r\tinstance itemClass: aClass.\r\t^instance! !\r\r!AbstractEvent class methodsFor: 'instance creation' stamp: 'NS 1/27/2004 10:49'!\rmethod: aMethod selector: aSymbol class: aClass requestor: requestor\r\r\t| instance |\r\tinstance := self method: aMethod selector: aSymbol class: aClass.\r\tinstance itemRequestor: requestor.\r\t^instance! !\r\r!AbstractEvent class methodsFor: 'instance creation' stamp: 'NS 1/27/2004 10:49'!\rmethod: aMethod selector: aSymbol protocol: prot class: aClass\r\r\t| instance |\r\tinstance := self method: aMethod selector: aSymbol class: aClass.\r\tinstance itemProtocol: prot.\r\t^instance! !\r\r!AbstractEvent class methodsFor: 'instance creation' stamp: 'NS 1/27/2004 10:50'!\rmethod: aMethod selector: aSymbol protocol: prot class: aClass requestor: requestor\r\r\t| instance |\r\tinstance := self method: aMethod selector: aSymbol protocol: prot class: aClass.\r\tinstance itemRequestor: requestor.\r\t^instance! !\r\r!AbstractEvent class methodsFor: 'instance creation' stamp: 'rw 6/30/2003 09:20'!\rnew\r\t\"Override new to trigger an error, since we want to use specialized methods to create basic and higher-level events.\"\r\r\t^self error: 'Instances can only be created using specialized instance creation methods.'! !\r\r\r!AbstractEvent class methodsFor: 'accessing' stamp: 'rw 7/29/2003 15:14'!\rallItemKinds\r\t\"SystemEvent allItemKinds\"\r\r\t^(AbstractEvent class organization listAtCategoryNamed: #'item kinds') \r\t\tcollect: [:sel | self perform: sel]! !\r\r!AbstractEvent class methodsFor: 'accessing' stamp: 'rw 7/10/2003 12:08'!\rchangeKind\r\t\"Return a symbol, with a : as last character, identifying the change kind.\"\r\r\tself subclassResponsibility! !\r\r!AbstractEvent class methodsFor: 'accessing' stamp: 'rw 7/10/2003 12:18'!\reventSelectorBlock\r\r\t^[:itemKind :changeKind | itemKind, changeKind, 'Event:']! !\r\r!AbstractEvent class methodsFor: 'accessing' stamp: 'rw 7/10/2003 12:19'!\ritemChangeCombinations\r\r\t^self supportedKinds collect: [:itemKind | self eventSelectorBlock value: itemKind value: self changeKind]! !\r\r!AbstractEvent class methodsFor: 'accessing' stamp: 'rw 7/10/2003 12:04'!\rsupportedKinds\r\t\"All the kinds of items that this event can take. By default this is all the kinds in the system. But subclasses can override this to limit the choices. For example, the SuperChangedEvent only works with classes, and not with methods, instance variables, ...\"\r\r\t^self allItemKinds! !\r\r!AbstractEvent class methodsFor: 'accessing' stamp: 'rw 7/10/2003 11:39'!\rsystemEvents\r\t\"Return all the possible events in the system. Make a cross product of \r\tthe items and the change types.\"\r\t\"self systemEvents\"\r\r\t^self allSubclasses\r\t\tinject: OrderedCollection new\r\t\tinto: [:allEvents :eventClass | allEvents addAll: eventClass itemChangeCombinations; yourself]! !\r\r\r!AbstractEvent class methodsFor: 'item kinds' stamp: 'rw 7/9/2003 11:12'!\rcategoryKind\r\r\t^#category! !\r\r!AbstractEvent class methodsFor: 'item kinds' stamp: 'rw 7/9/2003 11:12'!\rclassKind\r\r\t^#class! !\r\r!AbstractEvent class methodsFor: 'item kinds' stamp: 'rw 7/14/2003 11:41'!\rexpressionKind\r\r\t^#expression! !\r\r!AbstractEvent class methodsFor: 'item kinds' stamp: 'rw 7/9/2003 11:12'!\rmethodKind\r\r\t^#method! !\r\r!AbstractEvent class methodsFor: 'item kinds' stamp: 'rw 7/10/2003 12:36'!\rprotocolKind\r\r\t^#protocol! !\rObject subclass: #AbstractFont\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: 'TextConstants'\r\tcategory: 'Graphics-Text'!\r!AbstractFont commentStamp: '<historical>' prior: 0!\rAbstractFont defines the generic interface that all fonts need to implement.!\r\r\r!AbstractFont methodsFor: 'accessing' stamp: 'nk 4/2/2004 11:06'!\rbaseKern\r\t^0! !\r\r!AbstractFont methodsFor: 'accessing' stamp: 'ar 5/19/2000 14:56'!\rcharacterToGlyphMap\r\t\"Return the character to glyph mapping table. If the table is not provided the character scanner will query the font directly for the width of each individual character.\"\r\t^nil! !\r\r!AbstractFont methodsFor: 'accessing' stamp: 'nk 4/1/2004 10:51'!\rheight\r\t\"Answer the height of the receiver, total of maximum extents of \r\tcharacters above and below the baseline.\"\r\r\t^self ascent + self descent! !\r\r!AbstractFont methodsFor: 'accessing' stamp: 'nk 4/2/2004 11:07'!\rlineGrid\r\t\"Answer the relative space between lines\"\r\t^ self ascent + self descent! !\r\r!AbstractFont methodsFor: 'accessing' stamp: 'nk 4/2/2004 11:33'!\rpixelSize\r\t\"Make sure that we don't return a Fraction\"\r\t^ TextStyle pointsToPixels: self pointSize! !\r\r!AbstractFont methodsFor: 'accessing' stamp: 'nk 4/1/2004 10:48'!\rpointSize\r\tself subclassResponsibility.! !\r\r!AbstractFont methodsFor: 'accessing' stamp: 'nk 7/11/2004 21:15'!\rtextStyle\r\t^ TextStyle actualTextStyles detect:\r\t\t[:aStyle | aStyle fontArray includes: self] ifNone: [ TextStyle fontArray: { self } ]! !\r\r!AbstractFont methodsFor: 'accessing' stamp: 'ar 5/19/2000 14:57'!\rxTable\r\t\"Return the xTable for the font. The xTable defines the left x-value for each individual glyph in the receiver. If such a table is not provided, the character scanner will ask the font directly for the appropriate width of each individual character.\"\r\t^nil! !\r\r\r!AbstractFont methodsFor: 'displaying' stamp: 'ar 5/19/2000 14:59'!\rdisplayString: aString on: aDisplayContext from: startIndex to: stopIndex at: aPoint kern: kernDelta\r\t\"Draw the given string from startIndex to stopIndex \r\tat aPoint on the (already prepared) display context.\"\r\t^self subclassResponsibility! !\r\r!AbstractFont methodsFor: 'displaying' stamp: 'ar 5/19/2000 14:59'!\rinstallOn: aDisplayContext foregroundColor: foregroundColor backgroundColor: backgroundColor\r\t\"Install the receiver on the given DisplayContext (either BitBlt or Canvas) for further drawing operations.\"\r\t^self subclassResponsibility! !\r\r\r!AbstractFont methodsFor: 'measuring' stamp: 'ar 5/19/2000 14:58'!\rwidthOf: aCharacter\r\t\"Return the width of the given character\"\r\t^self subclassResponsibility! !\r\r!AbstractFont methodsFor: 'measuring' stamp: 'ar 12/31/2001 14:25'!\rwidthOfString: aString\r\taString ifNil:[^0].\r\t^self widthOfString: aString from: 1 to: aString size.\r\"\r\tTextStyle default defaultFont widthOfString: 'zort' 21\r\"! !\r\r!AbstractFont methodsFor: 'measuring' stamp: 'ar 12/31/2001 00:54'!\rwidthOfString: aString from: startIndex to: stopIndex\r\t\"Measure the length of the given string between start and stop index\"\r\t| character resultX |\r\tresultX _ 0.\r\tstartIndex to: stopIndex do:[:i | \r\t\tcharacter _ aString at: i.\r\t\tresultX _ resultX + (self widthOf: character)].\r\t^resultX! !\r\r\r!AbstractFont methodsFor: 'testing' stamp: 'nk 6/25/2003 12:54'!\risTTCFont\r\t^false! !\r\r\r!AbstractFont methodsFor: 'caching' stamp: 'nk 3/15/2004 18:47'!\rreleaseCachedState\r\t! !\rArray variableSubclass: #ActionSequence\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Object Events'!\r\r!ActionSequence methodsFor: 'converting' stamp: 'reThink 2/18/2001 15:12'!\rasActionSequence\r\r\t^self! !\r\r!ActionSequence methodsFor: 'converting' stamp: 'rw 7/20/2003 16:03'!\rasActionSequenceTrappingErrors\r\r\t^WeakActionSequenceTrappingErrors withAll: self! !\r\r!ActionSequence methodsFor: 'converting' stamp: 'reThink 2/18/2001 15:28'!\rasMinimalRepresentation\r\r\tself size = 0\r\t\tifTrue: [^nil].\r\tself size = 1\r\t\tifTrue: [^self first].\r\t^self! !\r\r\r!ActionSequence methodsFor: 'evaluating' stamp: 'reThink 2/18/2001 17:51'!\rvalue\r    \"Answer the result of evaluating the elements of the receiver.\"\r\r    | answer |\r    self do:\r        [:each |\r        answer := each value].\r    ^answer! !\r\r!ActionSequence methodsFor: 'evaluating' stamp: 'reThink 2/18/2001 17:52'!\rvalueWithArguments: anArray\r\r    | answer |\r    self do:\r        [:each |\r        answer := each valueWithArguments: anArray].\r    ^answer! !\r\r\r!ActionSequence methodsFor: 'printing' stamp: 'SqR 07/28/2001 18:25'!\rprintOn: aStream\r\r\tself size < 2 ifTrue: [^super printOn: aStream].\r\taStream nextPutAll: '#('.\r\tself\r\t\tdo: [:each | each printOn: aStream]\r\t\tseparatedBy: [aStream cr].\r\taStream nextPut: $)! !\rAbstractEvent subclass: #AddedEvent\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Change Notification'!\r\r!AddedEvent methodsFor: 'testing' stamp: 'rw 6/30/2003 08:35'!\risAdded\r\r\t^true! !\r\r\r!AddedEvent methodsFor: 'printing' stamp: 'rw 6/30/2003 09:31'!\rprintEventKindOn: aStream\r\r\taStream nextPutAll: 'Added'! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rAddedEvent class\r\tinstanceVariableNames: ''!\r\r!AddedEvent class methodsFor: 'accessing' stamp: 'rw 7/19/2003 09:52'!\rchangeKind\r\r\t^#Added! !\r\r!AddedEvent class methodsFor: 'accessing' stamp: 'NS 1/20/2004 12:22'!\rsupportedKinds\r\t\"All the kinds of items that this event can take.\"\r\t\r\t^ Array with: self classKind with: self methodKind with: self categoryKind with: self protocolKind! !\rObject subclass: #AppRegistry\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Applications'!\r!AppRegistry commentStamp: 'ads 4/2/2003 15:30' prior: 0!\rAppRegistry is a simple little class, not much more than a wrapper around a collection. It's intended to help break dependencies between packages. For example, if you'd like to be able to send e-mail, you could use the bare-bones MailComposition class, or you could use the full-blown Celeste e-mail client. Instead of choosing one or the other, you can call \"MailSender default\" (where MailSender is a subclass of AppRegistry), and thus avoid creating a hard-coded dependency on either of the two mail senders.\r\rThis will only really be useful, of course, for applications that have a very simple, general, well-defined interface. Most of the time, you're probably better off just marking your package as being dependent on a specific other package, and avoiding the hassle of this whole AppRegistry thing. But for simple things like e-mail senders or web browsers, it might be useful.\r!\r\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rAppRegistry class\r\tinstanceVariableNames: 'registeredClasses default'!\r\r!AppRegistry class methodsFor: 'as yet unclassified' stamp: 'ads 3/29/2003 13:36'!\rappName\r\t\"Defaults to the class name, which is probably good enough, but you could override this in subclasses if you want to.\"\r\t^ self name! !\r\r!AppRegistry class methodsFor: 'as yet unclassified' stamp: 'ads 4/2/2003 15:31'!\raskForDefault\r\t| menu |\r\tself registeredClasses isEmpty ifTrue:\r\t\t[self inform: 'There are no ', self appName, ' applications registered.'.\r\t\t^ default _ nil].\r\tself registeredClasses size = 1 ifTrue:\r\t\t[^ default _ self registeredClasses anyOne].\r\t\r\tmenu _ CustomMenu new.\r\tself registeredClasses do: [:c | menu add: c name printString action: c].\r\t^ default _ menu startUpWithCaption: 'Which ', self appName, ' would you prefer?'! !\r\r!AppRegistry class methodsFor: 'as yet unclassified' stamp: 'ads 3/29/2003 13:11'!\rdefault\r\t^ default ifNil: [self askForDefault]! !\r\r!AppRegistry class methodsFor: 'as yet unclassified' stamp: 'nk 3/9/2004 12:33'!\rdefault: aClassOrNil\r\t\"Sets my default to aClassOrNil. \r\tAnswers the old default.\"\r\t| oldDefault |\r\toldDefault := default.\r\taClassOrNil ifNotNil: [ self register: aClassOrNil ].\r\tdefault := aClassOrNil.\r\t^ oldDefault! !\r\r!AppRegistry class methodsFor: 'as yet unclassified' stamp: 'ads 4/2/2003 15:25'!\rregister: aProviderClass\r\t(self registeredClasses includes: aProviderClass) ifFalse:\r\t\t[default _ nil.  \"so it'll ask for a new default, since if you're registering a new app you probably want to use it\"\r\t\tself registeredClasses add: aProviderClass].! !\r\r!AppRegistry class methodsFor: 'as yet unclassified' stamp: 'ads 3/29/2003 13:01'!\rregisteredClasses\r\t^ registeredClasses ifNil: [registeredClasses _ OrderedCollection new]! !\r\r!AppRegistry class methodsFor: 'as yet unclassified' stamp: 'ads 3/29/2003 13:03'!\runregister: aProviderClass\r\t(default = aProviderClass) ifTrue: [default _ nil].\r\tself registeredClasses remove: aProviderClass ifAbsent: [].! !\rPath subclass: #Arc\r\tinstanceVariableNames: 'quadrant radius center'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Paths'!\r!Arc commentStamp: '<historical>' prior: 0!\rArcs are an unusual implementation of splines due to Ted Kaehler.  Imagine two lines that meet at a corner. Now imagine two moving points; one moves from the corner to the end on one line, the other moves from the end of the other line in to the corner.  Now imagine a series of lines drawn between those moving points at each step along the way (they form a sort of spider web pattern).  By connecting segments of the intersecting lines, a smooth curve is achieved that is tangent to both of the original lines.  Voila.!\r\r\r!Arc methodsFor: 'accessing'!\rcenter\r\t\"Answer the point at the center of the receiver.\"\r\r\t^center! !\r\r!Arc methodsFor: 'accessing'!\rcenter: aPoint \r\t\"Set aPoint to be the receiver's center.\"\r\r\tcenter _ aPoint! !\r\r!Arc methodsFor: 'accessing'!\rquadrant\r\t\"Answer the part of the circle represented by the receiver.\"\r\t^quadrant! !\r\r!Arc methodsFor: 'accessing'!\rquadrant: section \r\t\"Set the part of the circle represented by the receiver to be the argument, \r\tsection.\"\r\r\tquadrant _ section! !\r\r!Arc methodsFor: 'accessing'!\rradius\r\t\"Answer the receiver's radius.\"\r\r\t^radius! !\r\r!Arc methodsFor: 'accessing'!\rradius: anInteger \r\t\"Set the receiver's radius to be the argument, anInteger.\"\r\r\tradius _ anInteger! !\r\r\r!Arc methodsFor: 'display box access'!\rcomputeBoundingBox\r\t| aRectangle aPoint |\r\taRectangle _ center - radius + form offset extent: form extent + (radius * 2) asPoint.\r\taPoint _ center + form extent.\r\tquadrant = 1 ifTrue: [^ aRectangle encompass: center x @ aPoint y].\r\tquadrant = 2 ifTrue: [^ aRectangle encompass: aPoint x @ aPoint y].\r\tquadrant = 3 ifTrue: [^ aRectangle encompass: aPoint x @ center y].\r\tquadrant = 4 ifTrue: [^ aRectangle encompass: center x @ center y]! !\r\r\r!Arc methodsFor: 'displaying'!\rdisplayOn: aDisplayMedium at: aPoint clippingBox: clipRect rule: anInteger fillColor: aForm\r\r\t| nSegments line angle sin cos xn yn xn1 yn1 |\r\tnSegments _ 12.0.\r\tline _ Line new.\r\tline form: self form.\r\tangle _ 90.0 / nSegments.\r\tsin _ (angle * (2 * Float pi / 360.0)) sin.\r\tcos _ (angle * (2 * Float pi / 360.0)) cos.\r\tquadrant = 1\r\t\tifTrue: \r\t\t\t[xn _ radius asFloat.\r\t\t\tyn _ 0.0].\r\tquadrant = 2\r\t\tifTrue: \r\t\t\t[xn _ 0.0.\r\t\t\tyn _ 0.0 - radius asFloat].\r\tquadrant = 3\r\t\tifTrue: \r\t\t\t[xn _ 0.0 - radius asFloat.\r\t\t\tyn _ 0.0].\r\tquadrant = 4\r\t\tifTrue: \r\t\t\t[xn _ 0.0.\r\t\t\tyn _ radius asFloat].\r\tnSegments asInteger\r\t\ttimesRepeat: \r\t\t\t[xn1 _ xn * cos + (yn * sin).\r\t\t\tyn1 _ yn * cos - (xn * sin).\r\t\t\tline beginPoint: center + (xn asInteger @ yn asInteger).\r\t\t\tline endPoint: center + (xn1 asInteger @ yn1 asInteger).\r\t\t\tline\r\t\t\t\tdisplayOn: aDisplayMedium\r\t\t\t\tat: aPoint\r\t\t\t\tclippingBox: clipRect\r\t\t\t\trule: anInteger\r\t\t\t\tfillColor: aForm.\r\t\t\txn _ xn1.\r\t\t\tyn _ yn1]! !\r\r!Arc methodsFor: 'displaying'!\rdisplayOn: aDisplayMedium transformation: aTransformation clippingBox: clipRect rule: anInteger fillColor: aForm\r\r\t| newArc tempCenter |\r\tnewArc _ Arc new.\r\ttempCenter _ aTransformation applyTo: self center.\r\tnewArc center: tempCenter x asInteger @ tempCenter y asInteger.\r\tnewArc quadrant: self quadrant.\r\tnewArc radius: (self radius * aTransformation scale x) asInteger.\r\tnewArc form: self form.\r\tnewArc\r\t\tdisplayOn: aDisplayMedium\r\t\tat: 0 @ 0\r\t\tclippingBox: clipRect\r\t\trule: anInteger\r\t\tfillColor: aForm! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rArc class\r\tinstanceVariableNames: ''!\r\r!Arc class methodsFor: 'examples'!\rexample\r\t\"Click the button somewhere on the screen. The designated point will\r\tbe the center of an Arc with radius 50 in the 4th quadrant.\"\r\r\t| anArc aForm |\r\taForm _ Form extent: 1 @ 30.\t\"make a long thin Form for display\"\r\taForm fillBlack.\t\t\t\t\t\t\"turn it black\"\r\tanArc _ Arc new.\r\tanArc form: aForm.\t\t\t\t\t\"set the form for display\"\r\tanArc radius: 50.0.\r\tanArc center: Sensor waitButton.\r\tanArc quadrant: 4.\r\tanArc displayOn: Display.\r\tSensor waitButton\r\r\t\"Arc example\"! !\rError subclass: #ArithmeticError\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Exceptions Kernel'!\rArrayedCollection variableSubclass: #Array\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Arrayed'!\r!Array commentStamp: '<historical>' prior: 0!\rI present an ArrayedCollection whose elements are objects.!\r\r\r!Array methodsFor: 'comparing'!\rhashMappedBy: map\r\t\"Answer what my hash would be if oops changed according to map.\"\r\r\tself size = 0 ifTrue: [^self hash].\r\t^(self first hashMappedBy: map) + (self last hashMappedBy: map)! !\r\r!Array methodsFor: 'comparing' stamp: 'ajh 2/2/2002 15:03'!\rliteralEqual: other\r\r\tself class == other class ifFalse: [^ false].\r\tself size = other size ifFalse: [^ false].\r\tself with: other do: [:e1 :e2 |\r\t\t(e1 literalEqual: e2) ifFalse: [^ false]].\r\t^ true! !\r\r\r!Array methodsFor: 'converting' stamp: 'sma 5/12/2000 17:32'!\rasArray\r\t\"Answer with the receiver itself.\"\r\r\t^ self! !\r\r!Array methodsFor: 'converting' stamp: 'ajh 9/8/2002 17:45'!\relementsExchangeIdentityWith: otherArray\r\t\"This primitive performs a bulk mutation, causing all pointers to the elements of this array to be replaced by pointers to the corresponding elements of otherArray.  At the same time, all pointers to the elements of otherArray are replaced by pointers to the corresponding elements of this array.  The identityHashes remain with the pointers rather than with the objects so that objects in hashed structures should still be properly indexed after the mutation.\"\r\r\t<primitive: 128>\r\totherArray class == Array ifFalse: [^ self error: 'arg must be array'].\r\tself size = otherArray size ifFalse: [^ self error: 'arrays must be same size'].\r\t(self anySatisfy: [:obj | obj class == SmallInteger]) ifTrue: [^ self error: 'can''t become SmallIntegers'].\r\t(otherArray anySatisfy: [:obj | obj class == SmallInteger]) ifTrue: [^ self error: 'can''t become SmallIntegers'].\r\r\t\"Must have failed because not enough space in forwarding table (see ObjectMemory-prepareForwardingTableForBecoming:with:twoWay:).  Do GC and try again only once\"\r\t(Smalltalk bytesLeft: true) = Smalltalk primitiveGarbageCollect\r\t\tifTrue: [^ self primitiveFailed].\r\t^ self elementsExchangeIdentityWith: otherArray! !\r\r!Array methodsFor: 'converting' stamp: 'di 3/28/1999 10:23'!\relementsForwardIdentityTo: otherArray\r\t\"This primitive performs a bulk mutation, causing all pointers to the elements of this array to be replaced by pointers to the corresponding elements of otherArray.  The identityHashes remain with the pointers rather than with the objects so that the objects in this array should still be properly indexed in any existing hashed structures after the mutation.\"\r\t<primitive: 72>\r\tself primitiveFailed! !\r\r!Array methodsFor: 'converting' stamp: 'brp 9/26/2003 08:09'!\relementsForwardIdentityTo: otherArray copyHash: copyHash\r\t\"This primitive performs a bulk mutation, causing all pointers to the elements of this array to be replaced by pointers to the corresponding elements of otherArray.  The identityHashes remain with the pointers rather than with the objects so that the objects in this array should still be properly indexed in any existing hashed structures after the mutation.\"\r\t<primitive: 249>\r\tself primitiveFailed! !\r\r!Array methodsFor: 'converting'!\revalStrings\r\t   \"Allows you to construct literal arrays.\r    #(true false nil '5@6' 'Set new' '''text string''') evalStrings\r    gives an array with true, false, nil, a Point, a Set, and a String\r    instead of just a bunch of Symbols\"\r    | it |\r\r    ^ self collect: [:each |\r        it _ each.\r        each == #true ifTrue: [it _ true].\r\t\t      each == #false ifTrue: [it _ false].\r        each == #nil ifTrue: [it _ nil].\r        each class == String ifTrue: [\r\t\t\tit _ Compiler evaluate: each].\r        each class == Array ifTrue: [it _ it evalStrings].\r        it]! !\r\r\r!Array methodsFor: 'printing' stamp: 'sma 5/12/2000 14:11'!\risLiteral\r\t^ self allSatisfy: [:each | each isLiteral]! !\r\r!Array methodsFor: 'printing' stamp: 'sma 6/1/2000 09:39'!\rprintOn: aStream\r\taStream nextPut: $#.\r\tself printElementsOn: aStream! !\r\r!Array methodsFor: 'printing'!\rstoreOn: aStream \r\t\"Use the literal form if possible.\"\r\r\tself isLiteral\r\t\tifTrue: \r\t\t\t[aStream nextPut: $#; nextPut: $(.\r\t\t\tself do: \r\t\t\t\t[:element | \r\t\t\t\telement printOn: aStream.\r\t\t\t\taStream space].\r\t\t\taStream nextPut: $)]\r\t\tifFalse: [super storeOn: aStream]! !\r\r\r!Array methodsFor: 'private' stamp: 'sma 6/3/2000 21:39'!\rhasLiteral: literal\r\t\"Answer true if literal is identical to any literal in this array, even \r\tif imbedded in further array structure. This method is only intended \r\tfor private use by CompiledMethod hasLiteralSymbol:\"\r\r\t| lit |\r\t1 to: self size do: \r\t\t[:index | \r\t\t(lit _ self at: index) == literal ifTrue: [^ true].\r\t\t(lit class == Array and: [lit hasLiteral: literal]) ifTrue: [^ true]].\r\t^ false! !\r\r!Array methodsFor: 'private' stamp: 'di 8/15/97 09:55'!\rhasLiteralSuchThat: litBlock\r\t\"Answer true if litBlock returns true for any literal in this array, even if imbedded in further array structure.  This method is only intended for private use by CompiledMethod hasLiteralSuchThat:\"\r\t| lit |\r\t1 to: self size do:\r\t\t[:index | lit _ self at: index.\r\t\t(litBlock value: lit) ifTrue: [^ true].\r\t\t(lit class == Array and: [lit hasLiteralSuchThat: litBlock]) ifTrue: [^ true]].\r\t^false! !\r\r!Array methodsFor: 'private'!\rreplaceFrom: start to: stop with: replacement startingAt: repStart \r\t\"Primitive. This destructively replaces elements from start to stop in the receiver starting at index, repStart, in the collection, replacement. Answer the receiver. Range checks are performed in the primitive only. Optional. See Object documentation whatIsAPrimitive.\"\r\t<primitive: 105>\r\tsuper replaceFrom: start to: stop with: replacement startingAt: repStart! !\r\r\r!Array methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 01:42'!\rbyteEncode:aStream\r\taStream writeArray:self.\r! !\r\r!Array methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 01:55'!\rstoreOnStream:aStream\r\tself isLiteral ifTrue: [super storeOnStream:aStream] ifFalse:[aStream writeCollection:self].\r! !\r\r\r\r!Array methodsFor: 'copying' stamp: 'ar 2/11/2001 01:55'!\rcopyWithDependent: newElement\r\tself size = 0 ifTrue:[^DependentsArray with: newElement].\r\t^self copyWith: newElement! !\r\r\r!Array methodsFor: 'accessing' stamp: 'ar 8/26/2001 22:02'!\ratWrap: index \r\t\"Optimized to go through the primitive if possible\"\r\t<primitive: 60>\r\t^ self at: index - 1 \\\\ self size + 1! !\r\r!Array methodsFor: 'accessing' stamp: 'ar 8/26/2001 22:03'!\ratWrap: index put: anObject\r\t\"Optimized to go through the primitive if possible\"\r\t<primitive: 61>\r\t^ self at: index - 1 \\\\ self size + 1 put: anObject! !\r\r\r!Array methodsFor: 'arithmetic' stamp: 'raok 10/22/2002 20:09'!\r+* aCollection\r\t\"Premultiply aCollection by self.  aCollection should be an Array or Matrix.\r\t The name of this method is APL's +.x squished into Smalltalk syntax.\"\r\r\t^aCollection preMultiplyByArray: self\r! !\r\r!Array methodsFor: 'arithmetic' stamp: 'raok 10/22/2002 20:10'!\rpreMultiplyByArray: a\r\t\"Answer a+*self where a is an Array.  Arrays are always understood as column vectors,\r\t so an n element Array is an n*1 Array.  This multiplication is legal iff self size = 1.\"\r\r\tself size = 1 ifFalse: [self error: 'dimensions do not conform'].\r\t^a * self first! !\r\r!Array methodsFor: 'arithmetic' stamp: 'raok 10/22/2002 20:08'!\rpreMultiplyByMatrix: m\r\t\"Answer m+*self where m is a Matrix.\"\r\t|s|\r\r\tm columnCount = self size ifFalse: [self error: 'dimensions do not conform'].\r\t^(1 to: m rowCount) collect: [:row |\r\t\ts _ 0.\r\t\t1 to: self size do: [:k | s _ (m at: row at: k) * (self at: k) + s].\r\t\ts]! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rArray class\r\tinstanceVariableNames: ''!\r\r!Array class methodsFor: 'plugin generation' stamp: 'acg 9/17/1999 01:12'!\rccg: cg emitLoadFor: aString from: anInteger on: aStream\r\r\tcg emitLoad: aString asIntPtrFrom: anInteger on: aStream! !\r\r!Array class methodsFor: 'plugin generation' stamp: 'acg 9/19/1999 13:10'!\rccg: cg prolog: aBlock expr: aString index: anInteger\r\r\t^cg \r\t\tccgLoad: aBlock \r\t\texpr: aString \r\t\tasIntPtrFrom: anInteger\r\t\tandThen: (cg ccgValBlock: 'isIndexable')! !\r\r!Array class methodsFor: 'plugin generation' stamp: 'acg 9/17/1999 01:12'!\rccgDeclareCForVar: aSymbolOrString\r\r\t^'int *', aSymbolOrString! !\r\r\r!Array class methodsFor: 'brace support' stamp: 'di 11/18/1999 22:53'!\rbraceStream: nElements\r\t\"This method is used in compilation of brace constructs.\r\tIt MUST NOT be deleted or altered.\"\r\r\t^ WriteStream basicNew braceArray: (self new: nElements)\r! !\r\r!Array class methodsFor: 'brace support' stamp: 'di 11/19/1999 08:16'!\rbraceWith: a\r\t\"This method is used in compilation of brace constructs.\r\tIt MUST NOT be deleted or altered.\"\r\r\t| array |\r\tarray _ self new: 1.\r\tarray at: 1 put: a.\r\t^ array! !\r\r!Array class methodsFor: 'brace support' stamp: 'di 11/19/1999 08:15'!\rbraceWith: a with: b \r\t\"This method is used in compilation of brace constructs.\r\tIt MUST NOT be deleted or altered.\"\r\r\t| array |\r\tarray _ self new: 2.\r\tarray at: 1 put: a.\r\tarray at: 2 put: b.\r\t^ array! !\r\r!Array class methodsFor: 'brace support' stamp: 'di 11/19/1999 08:17'!\rbraceWith: a with: b with: c \r\t\"This method is used in compilation of brace constructs.\r\tIt MUST NOT be deleted or altered.\"\r\r\t| array |\r\tarray _ self new: 3.\r\tarray at: 1 put: a.\r\tarray at: 2 put: b.\r\tarray at: 3 put: c.\r\t^ array! !\r\r!Array class methodsFor: 'brace support' stamp: 'di 11/19/1999 08:17'!\rbraceWith: a with: b with: c with: d\r\t\"This method is used in compilation of brace constructs.\r\tIt MUST NOT be deleted or altered.\"\r\r\t| array |\r\tarray _ self new: 4.\r\tarray at: 1 put: a.\r\tarray at: 2 put: b.\r\tarray at: 3 put: c.\r\tarray at: 4 put: d.\r\t^ array! !\r\r!Array class methodsFor: 'brace support' stamp: 'di 11/19/1999 08:16'!\rbraceWithNone\r\t\"This method is used in compilation of brace constructs.\r\tIt MUST NOT be deleted or altered.\"\r\r\t^ self new: 0! !\rSequenceableCollection subclass: #ArrayedCollection\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Abstract'!\r!ArrayedCollection commentStamp: '<historical>' prior: 0!\rI am an abstract collection of elements with a fixed range of integers (from 1 to n>=0) as external keys.!\r\r\r!ArrayedCollection methodsFor: 'accessing' stamp: 'sma 5/12/2000 11:36'!\rsize\r\t\"Answer how many elements the receiver contains.\"\r\r\t<primitive: 62>\r\t^ self basicSize! !\r\r\r!ArrayedCollection methodsFor: 'adding' stamp: 'sma 5/12/2000 14:09'!\radd: newObject\r\tself shouldNotImplement! !\r\r\r!ArrayedCollection methodsFor: 'filter streaming' stamp: 'sma 5/12/2000 14:20'!\rflattenOnStream: aStream \r\taStream writeArrayedCollection: self! !\r\r\r!ArrayedCollection methodsFor: 'printing'!\rstoreOn: aStream\r\r\taStream nextPutAll: '(('.\r\taStream nextPutAll: self class name.\r\taStream nextPutAll: ' new: '.\r\taStream store: self size.\r\taStream nextPut: $).\r\t(self storeElementsFrom: 1 to: self size on: aStream)\r\t\tifFalse: [aStream nextPutAll: '; yourself'].\r\taStream nextPut: $)! !\r\r\r!ArrayedCollection methodsFor: 'private'!\rdefaultElement\r\r\t^nil! !\r\r!ArrayedCollection methodsFor: 'private'!\rstoreElementsFrom: firstIndex to: lastIndex on: aStream\r\r\t| noneYet defaultElement arrayElement |\r\tnoneYet _ true.\r\tdefaultElement _ self defaultElement.\r\tfirstIndex to: lastIndex do: \r\t\t[:index | \r\t\tarrayElement _ self at: index.\r\t\tarrayElement = defaultElement\r\t\t\tifFalse: \r\t\t\t\t[noneYet\r\t\t\t\t\tifTrue: [noneYet _ false]\r\t\t\t\t\tifFalse: [aStream nextPut: $;].\r\t\t\t\taStream nextPutAll: ' at: '.\r\t\t\t\taStream store: index.\r\t\t\t\taStream nextPutAll: ' put: '.\r\t\t\t\taStream store: arrayElement]].\r\t^noneYet! !\r\r\r!ArrayedCollection methodsFor: 'sorting' stamp: 'sma 5/12/2000 18:18'!\rasSortedArray\r\tself isSorted ifTrue: [^ self asArray].\r\t^ super asSortedArray! !\r\r!ArrayedCollection methodsFor: 'sorting' stamp: 'sma 6/1/2000 11:57'!\risSorted\r\t\"Return true if the receiver is sorted by the given criterion.\r\tOptimization for isSortedBy: [:a :b | a <= b].\"\r\r\t| lastElm elm |\r\tself isEmpty ifTrue: [^ true].\r\tlastElm _ self first.\r\t2 to: self size do: \r\t\t[:index | \r\t\telm _ self at: index.\r\t\tlastElm <= elm ifFalse: [^ false].\r\t\tlastElm _ elm].\r\t^ true! !\r\r!ArrayedCollection methodsFor: 'sorting' stamp: 'sma 6/1/2000 11:58'!\risSortedBy: aBlock\r\t\"Return true if the receiver is sorted by the given criterion.\"\r\r\t| lastElm elm |\r\tself isEmpty ifTrue: [^ true].\r\tlastElm _ self first.\r\t2 to: self size do: \r\t\t[:index | \r\t\telm _ self at: index.\r\t\t(aBlock value: lastElm value: elm) ifFalse: [^ false].\r\t\tlastElm _ elm].\r\t^ true! !\r\r!ArrayedCollection methodsFor: 'sorting' stamp: 'sma 5/12/2000 14:28'!\rmergeFirst: first middle: middle last: last into: dst by: aBlock\r\t\"Private. Merge the sorted ranges [first..middle] and [middle+1..last] \r\tof the receiver into the range [first..last] of dst.\"\r\r\t| i1 i2 val1 val2 out |\r\ti1 _ first.\r\ti2 _ middle + 1.\r\tval1 _ self at: i1.\r\tval2 _ self at: i2.\r\tout _ first - 1.  \"will be pre-incremented\"\r\r\t\"select 'lower' half of the elements based on comparator\"\r\t[(i1 <= middle) and: [i2 <= last]] whileTrue:\r\t\t[(aBlock value: val1 value: val2)\r\t\t\tifTrue: [dst at: (out _ out + 1) put: val1.\r\t\t\t\t\tval1 _ self at: (i1 _ i1 + 1)]\r\t\t\tifFalse: [dst at: (out _ out + 1) put: val2.\r\t\t\t\t\ti2 _ i2 + 1.\r\t\t\t\t\ti2 <= last ifTrue: [val2 _ self at: i2]]].\r\r\t\"copy the remaining elements\"\r\ti1 <= middle\r\t\tifTrue: [dst replaceFrom: out + 1 to: last with: self startingAt: i1]\r\t\tifFalse: [dst replaceFrom: out + 1 to: last with: self startingAt: i2]! !\r\r!ArrayedCollection methodsFor: 'sorting' stamp: 'sma 5/12/2000 14:25'!\rmergeSortFrom: startIndex to: stopIndex by: aBlock\r\t\"Sort the given range of indices using the mergesort algorithm.\r\tMergesort is a worst-case O(N log N) sorting algorithm that usually\r\tdoes only half as many comparisons as heapsort or quicksort.\"\r\r\t\"Details: recursively split the range to be sorted into two halves,\r\tmergesort each half, then merge the two halves together. An extra \r\tcopy of the data is used as temporary storage and successive merge \r\tphases copy data back and forth between the receiver and this copy.\r\tThe recursion is set up so that the final merge is performed into the\r\treceiver, resulting in the receiver being completely sorted.\"\r\r\tself size <= 1 ifTrue: [^ self].  \"nothing to do\"\r\tstartIndex = stopIndex ifTrue: [^ self].\r\tself assert: [startIndex >= 1 and: [startIndex < stopIndex]]. \"bad start index\"\r\tself assert: [stopIndex <= self size]. \"bad stop index\"\r\tself\r\t\tmergeSortFrom: startIndex\r\t\tto: stopIndex \r\t\tsrc: self clone \r\t\tdst: self \r\t\tby: aBlock! !\r\r!ArrayedCollection methodsFor: 'sorting' stamp: 'sma 5/12/2000 14:26'!\rmergeSortFrom: first to: last src: src dst: dst by: aBlock\r\t\"Private. Split the range to be sorted in half, sort each half, and \r\tmerge the two half-ranges into dst.\"\r\r\t| middle |\r\tfirst = last ifTrue: [^ self].\r\tmiddle _ (first + last) // 2.\r\tself mergeSortFrom: first to: middle src: dst dst: src by: aBlock.\r\tself mergeSortFrom: middle + 1 to: last src: dst dst: src by: aBlock.\r\tsrc mergeFirst: first middle: middle last: last into: dst by: aBlock! !\r\r!ArrayedCollection methodsFor: 'sorting' stamp: 'sma 5/12/2000 14:22'!\rsort\r\t\"Sort this array into ascending order using the '<=' operator.\"\r\r\tself sort: [:a :b | a <= b]! !\r\r!ArrayedCollection methodsFor: 'sorting' stamp: 'sma 5/12/2000 14:21'!\rsort: aSortBlock \r\t\"Sort this array using aSortBlock. The block should take two arguments\r\tand return true if the first element should preceed the second one.\"\r\r\tself\r\t\tmergeSortFrom: 1\r\t\tto: self size\r\t\tby: aSortBlock! !\r\r\r!ArrayedCollection methodsFor: 'objects from disk' stamp: 'nk 3/17/2004 15:22'!\rbyteSize\r\t^self basicSize * self bytesPerBasicElement\r! !\r\r!ArrayedCollection methodsFor: 'objects from disk' stamp: 'nk 3/17/2004 16:28'!\rbytesPerBasicElement\r\t\"Answer the number of bytes that each of my basic elements requires.\r\tIn other words:\r\t\tself basicSize * self bytesPerBasicElement\r\tshould equal the space required on disk by my variable sized representation.\"\r\t^self class isBytes ifTrue: [ 1 ] ifFalse: [ 4 ]! !\r\r!ArrayedCollection methodsFor: 'objects from disk' stamp: 'nk 3/17/2004 18:51'!\rbytesPerElement\r\t^self class isBytes ifTrue: [ 1 ] ifFalse: [ 4 ].\r! !\r\r!ArrayedCollection methodsFor: 'objects from disk' stamp: 'sd 6/28/2003 09:49'!\rrestoreEndianness\r\t\"This word object was just read in from a stream.  It was stored in Big Endian (Mac) format.  Reverse the byte order if the current machine is Little Endian.\r\tWe only intend this for non-pointer arrays.  Do nothing if I contain pointers.\"\r\r\tself class isPointers | self class isWords not ifTrue: [^ self].\r\r\tSmalltalk isLittleEndian \r\t\tifTrue: [Bitmap swapBytesIn: self from: 1 to: self basicSize]\r! !\r\r!ArrayedCollection methodsFor: 'objects from disk' stamp: 'md 12/12/2003 17:01'!\rswapBytesFrom: start to: stop\r\t\"Perform a bigEndian/littleEndian byte reversal of my words.\r\tWe only intend this for non-pointer arrays.  Do nothing if I contain pointers.\"\r\t| hack blt |\r\tself deprecated: 'Use BitMap class>>swapBytesIn:from:to:'.\r\tself class isPointers | self class isWords not ifTrue: [^ self].\r\r\t\"The implementation is a hack, but fast for large ranges\"\r\thack _ Form new hackBits: self.\r\tblt _ (BitBlt toForm: hack) sourceForm: hack.\r\tblt combinationRule: Form reverse.  \"XOR\"\r\tblt sourceY: start-1; destY: start-1; height: stop-start+1; width: 1.\r\tblt sourceX: 0; destX: 3; copyBits.  \"Exchange bytes 0 and 3\"\r\tblt sourceX: 3; destX: 0; copyBits.\r\tblt sourceX: 0; destX: 3; copyBits.\r\tblt sourceX: 1; destX: 2; copyBits.  \"Exchange bytes 1 and 2\"\r\tblt sourceX: 2; destX: 1; copyBits.\r\tblt sourceX: 1; destX: 2; copyBits.\r! !\r\r!ArrayedCollection methodsFor: 'objects from disk' stamp: 'tk 3/7/2001 17:36'!\rswapHalves\r\t\t\"A normal switch in endianness (byte order in words) reverses the order of 4 bytes.  That is not correct for SoundBuffers, which use 2-bytes units.  If a normal switch has be done, this method corrects it further by swapping the two halves of the long word.\r\tThis method is only used for 16-bit quanities in SoundBuffer, ShortIntegerArray, etc.\"\r\r\t| hack blt |\r\t\"The implementation is a hack, but fast for large ranges\"\r\thack _ Form new hackBits: self.\r\tblt _ (BitBlt toForm: hack) sourceForm: hack.\r\tblt combinationRule: Form reverse.  \"XOR\"\r\tblt sourceY: 0; destY: 0; height: self size; width: 2.\r\tblt sourceX: 0; destX: 2; copyBits.  \"Exchange bytes 0&1 with 2&3\"\r\tblt sourceX: 2; destX: 0; copyBits.\r\tblt sourceX: 0; destX: 2; copyBits.! !\r\r!ArrayedCollection methodsFor: 'objects from disk' stamp: 'ar 5/17/2001 19:50'!\rwriteOn: aStream \r\t\"Store the array of bits onto the argument, aStream.  (leading byte ~= 16r80) identifies this as raw bits (uncompressed).  Always store in Big Endian (Mac) byte order.  Do the writing at BitBlt speeds. We only intend this for non-pointer arrays.  Do nothing if I contain pointers.\"\r\tself class isPointers | self class isWords not ifTrue: [^ super writeOn: aStream].\r\t\t\t\t\"super may cause an error, but will not be called.\"\r\taStream nextInt32Put: self basicSize.\r\taStream nextWordsPutAll: self.! !\r\r!ArrayedCollection methodsFor: 'objects from disk' stamp: 'tk 3/7/2001 18:07'!\rwriteOnGZIPByteStream: aStream \r\t\"We only intend this for non-pointer arrays.  Do nothing if I contain pointers.\"\r\r\tself class isPointers | self class isWords not ifTrue: [^ super writeOnGZIPByteStream: aStream].\r\t\t\"super may cause an error, but will not be called.\"\r\t\r\taStream nextPutAllWordArray: self! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rArrayedCollection class\r\tinstanceVariableNames: ''!\r\r!ArrayedCollection class methodsFor: 'instance creation'!\rnew\r\t\"Answer a new instance of me, with size = 0.\"\r\r\t^self new: 0! !\r\r!ArrayedCollection class methodsFor: 'instance creation'!\rnew: size withAll: value \r\t\"Answer an instance of me, with number of elements equal to size, each \r\tof which refers to the argument, value.\"\r\r\t^(self new: size) atAllPut: value! !\r\r!ArrayedCollection class methodsFor: 'instance creation'!\rnewFrom: aCollection \r\t\"Answer an instance of me containing the same elements as aCollection.\"\r\t| newArray |\r\tnewArray _ self new: aCollection size.\r\t1 to: aCollection size do: [:i | newArray at: i put: (aCollection at: i)].\r\t^ newArray\r\r\"\tArray newFrom: {1. 2. 3}\r\t{1. 2. 3} as: Array\r\t{1. 2. 3} as: ByteArray\r\t{$c. $h. $r} as: String\r\t{$c. $h. $r} as: Text\r\"! !\r\r!ArrayedCollection class methodsFor: 'instance creation' stamp: 'ar 5/17/2001 19:50'!\rnewFromStream: s\r\t\"Only meant for my subclasses that are raw bits and word-like.  For quick unpack form the disk.\"\r\t| len |\r\r\tself isPointers | self isWords not ifTrue: [^ super newFromStream: s].\r\t\t\"super may cause an error, but will not be called.\"\r\r\ts next = 16r80 ifTrue:\r\t\t[\"A compressed format.  Could copy what BitMap does, or use a \r\t\tspecial sound compression format.  Callers normally compress their own way.\"\r\t\t^ self error: 'not implemented'].\r\ts skip: -1.\r\tlen _ s nextInt32.\r\t^ s nextWordsInto: (self basicNew: len)! !\r\r!ArrayedCollection class methodsFor: 'instance creation'!\rwith: anObject \r\t\"Answer a new instance of me, containing only anObject.\"\r\r\t| newCollection |\r\tnewCollection _ self new: 1.\r\tnewCollection at: 1 put: anObject.\r\t^newCollection! !\r\r!ArrayedCollection class methodsFor: 'instance creation'!\rwith: firstObject with: secondObject \r\t\"Answer a new instance of me, containing firstObject and secondObject.\"\r\r\t| newCollection |\r\tnewCollection _ self new: 2.\r\tnewCollection at: 1 put: firstObject.\r\tnewCollection at: 2 put: secondObject.\r\t^newCollection! !\r\r!ArrayedCollection class methodsFor: 'instance creation'!\rwith: firstObject with: secondObject with: thirdObject \r\t\"Answer a new instance of me, containing only the three arguments as\r\telements.\"\r\r\t| newCollection |\r\tnewCollection _ self new: 3.\r\tnewCollection at: 1 put: firstObject.\r\tnewCollection at: 2 put: secondObject.\r\tnewCollection at: 3 put: thirdObject.\r\t^newCollection! !\r\r!ArrayedCollection class methodsFor: 'instance creation'!\rwith: firstObject with: secondObject with: thirdObject with: fourthObject \r\t\"Answer a new instance of me, containing only the three arguments as\r\telements.\"\r\r\t| newCollection |\r\tnewCollection _ self new: 4.\r\tnewCollection at: 1 put: firstObject.\r\tnewCollection at: 2 put: secondObject.\r\tnewCollection at: 3 put: thirdObject.\r\tnewCollection at: 4 put: fourthObject.\r\t^newCollection! !\r\r!ArrayedCollection class methodsFor: 'instance creation'!\rwith: firstObject with: secondObject with: thirdObject with: fourthObject with: fifthObject\r\t\"Answer a new instance of me, containing only the five arguments as\r\telements.\"\r\r\t| newCollection |\r\tnewCollection _ self new: 5.\r\tnewCollection at: 1 put: firstObject.\r\tnewCollection at: 2 put: secondObject.\r\tnewCollection at: 3 put: thirdObject.\r\tnewCollection at: 4 put: fourthObject.\r\tnewCollection at: 5 put: fifthObject.\r\t^newCollection! !\r\r!ArrayedCollection class methodsFor: 'instance creation' stamp: 'sw 10/24/1998 22:22'!\rwith: firstObject with: secondObject with: thirdObject with: fourthObject with: fifthObject with: sixthObject\r\t\"Answer a new instance of me, containing only the 6 arguments as elements.\"\r\r\t| newCollection |\r\tnewCollection _ self new: 6.\r\tnewCollection at: 1 put: firstObject.\r\tnewCollection at: 2 put: secondObject.\r\tnewCollection at: 3 put: thirdObject.\r\tnewCollection at: 4 put: fourthObject.\r\tnewCollection at: 5 put: fifthObject.\r\tnewCollection at: 6 put: sixthObject.\r\t^ newCollection! !\r\r!ArrayedCollection class methodsFor: 'instance creation' stamp: 'sma 5/12/2000 17:37'!\rwithAll: aCollection\r\t\"Create a new collection containing all the elements from aCollection.\"\r\r\t^ (self new: aCollection size) replaceFrom: 1 to: aCollection size with: aCollection! !\r\r\r!ArrayedCollection class methodsFor: 'plugin generation' stamp: 'acg 9/20/1999 10:03'!\rccg: cg generateCoerceToOopFrom: aNode on: aStream\r\r\tself instSize > 0 ifTrue: \r\t\t[self error: 'cannot auto-coerce arrays with named instance variables'].\r\tcg generateCoerceToObjectFromPtr: aNode on: aStream! !\r\r!ArrayedCollection class methodsFor: 'plugin generation' stamp: 'acg 10/5/1999 06:18'!\rccg: cg generateCoerceToValueFrom: aNode on: aStream\r\r\tcg \r\t\tgenerateCoerceToPtr: (self ccgDeclareCForVar: '')\r\t\tfromObject: aNode on: aStream! !\rHalt subclass: #AssertionFailure\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Exceptions Extensions'!\r!AssertionFailure commentStamp: 'gh 5/2/2002 20:29' prior: 0!\rAsssertionFailure is the exception signaled from Object>>assert: when the assertion block evaluates to false.!\r\rParseNode subclass: #AssignmentNode\r\tinstanceVariableNames: 'variable value'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Compiler'!\r!AssignmentNode commentStamp: '<historical>' prior: 0!\rAssignmentNode comment: 'I represent a (var_expr) construct.'!\r\r\r!AssignmentNode methodsFor: 'initialize-release'!\rtoDoIncrement: var\r\tvar = variable ifFalse: [^ nil].\r\t(value isMemberOf: MessageNode) \r\t\tifTrue: [^ value toDoIncrement: var]\r\t\tifFalse: [^ nil]! !\r\r!AssignmentNode methodsFor: 'initialize-release'!\rvalue\r\t^ value! !\r\r!AssignmentNode methodsFor: 'initialize-release'!\rvariable: aVariable value: expression\r\r\tvariable _ aVariable.\r\tvalue _ expression! !\r\r!AssignmentNode methodsFor: 'initialize-release' stamp: 'di 3/22/1999 12:00'!\rvariable: aVariable value: expression from: encoder\r\r\t(aVariable isMemberOf: MessageAsTempNode)\r\t\tifTrue: [\"Case of remote temp vars\"\r\t\t\t\t^ aVariable store: expression from: encoder].\r\tvariable _ aVariable.\r\tvalue _ expression! !\r\r!AssignmentNode methodsFor: 'initialize-release' stamp: 'hmm 7/15/2001 21:17'!\rvariable: aVariable value: expression from: encoder sourceRange: range\r\r\tencoder noteSourceRange: range forNode: self.\r\t^self\r\t\tvariable: aVariable\r\t\tvalue: expression\r\t\tfrom: encoder! !\r\r\r!AssignmentNode methodsFor: 'code generation' stamp: 'di 9/5/2001 18:46'!\remitForEffect: stack on: aStream\r\r\tvariable emitLoad: stack on: aStream.\r\tvalue emitForValue: stack on: aStream.\r\tvariable emitStorePop: stack on: aStream.\r\tpc _ aStream position! !\r\r!AssignmentNode methodsFor: 'code generation' stamp: 'di 9/5/2001 21:26'!\remitForValue: stack on: aStream\r\r\tvariable emitLoad: stack on: aStream.\r\tvalue emitForValue: stack on: aStream.\r\tvariable emitStore: stack on: aStream.\r\tpc _ aStream position! !\r\r!AssignmentNode methodsFor: 'code generation'!\rsizeForEffect: encoder\r\r\t^(value sizeForValue: encoder)\r\t\t+ (variable sizeForStorePop: encoder)! !\r\r!AssignmentNode methodsFor: 'code generation'!\rsizeForValue: encoder\r\r\t^(value sizeForValue: encoder)\r\t\t+ (variable sizeForStore: encoder)! !\r\r\r!AssignmentNode methodsFor: 'printing' stamp: 'brp 10/8/2003 14:55'!\rprintOn: aStream indent: level \r\taStream dialect = #SQ00\r\t\tifTrue: [aStream\r\t\t\t\twithStyleFor: #setOrReturn\r\t\t\t\tdo: [aStream nextPutAll: 'Set '].\r\t\t\tvariable printOn: aStream indent: level.\r\t\t\taStream\r\t\t\t\twithStyleFor: #setOrReturn\r\t\t\t\tdo: [aStream nextPutAll: ' to '].\r\t\t\tvalue printOn: aStream indent: level + 2]\r\t\tifFalse: [variable printOn: aStream indent: level.\r\t\t\taStream\r\t\t\t\tnextPutAll: (Preferences ansiAssignmentOperatorWhenPrettyPrinting\r\t\t\t\t\t\tifTrue: [' := ']\r\t\t\t\t\t\tifFalse: [' _ ']).\r\t\t\tvalue printOn: aStream indent: level + 2]! !\r\r!AssignmentNode methodsFor: 'printing' stamp: 'di 4/25/2000 13:52'!\rprintOn: aStream indent: level precedence: p\r\r\t(aStream dialect = #SQ00\r\t\t\tifTrue: [p < 3]\r\t\t\tifFalse: [p < 4])\r\t\tifTrue: [aStream nextPutAll: '('.\r\t\t\t\tself printOn: aStream indent: level.\r\t\t\t\taStream nextPutAll: ')']\r\t\tifFalse: [self printOn: aStream indent: level]! !\r\r\r!AssignmentNode methodsFor: 'equation translation'!\rvariable\r\t^variable! !\rLookupKey subclass: #Association\r\tinstanceVariableNames: 'value'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Support'!\r!Association commentStamp: '<historical>' prior: 0!\rI represent a pair of associated objects--a key and a value. My instances can serve as entries in a dictionary.!\r\r\r!Association methodsFor: 'accessing'!\rkey: aKey value: anObject \r\t\"Store the arguments as the variables of the receiver.\"\r\r\tkey _ aKey.\r\tvalue _ anObject! !\r\r!Association methodsFor: 'accessing'!\rvalue\r\t\"Answer the value of the receiver.\"\r\r\t^value! !\r\r!Association methodsFor: 'accessing'!\rvalue: anObject \r\t\"Store the argument, anObject, as the value of the receiver.\"\r\r\tvalue _ anObject! !\r\r\r!Association methodsFor: 'printing'!\rprintOn: aStream\r\r\tsuper printOn: aStream.\r\taStream nextPutAll: '->'.\r\tvalue printOn: aStream! !\r\r!Association methodsFor: 'printing' stamp: 'MPW 1/4/1901 08:31'!\rpropertyListOn: aStream\r\taStream write:key; print:'='; write:value.\r! !\r\r!Association methodsFor: 'printing'!\rstoreOn: aStream\r\t\"Store in the format (key->value)\"\r\taStream nextPut: $(.\r\tkey storeOn: aStream.\r\taStream nextPutAll: '->'.\r\tvalue storeOn: aStream.\r\taStream nextPut: $)! !\r\r\r!Association methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 20:53'!\rbyteEncode: aStream\r\taStream writeAssocation:self.! !\r\r\r\r!Association methodsFor: 'testing' stamp: 'ar 8/14/2001 23:06'!\risSpecialWriteBinding\r\t\"Return true if this variable binding is write protected, e.g., should not be accessed primitively but rather by sending #value: messages\"\r\t^false! !\r\r!Association methodsFor: 'testing' stamp: 'ar 8/14/2001 22:39'!\risVariableBinding\r\t\"Return true if I represent a literal variable binding\"\r\t^true! !\r\r\r!Association methodsFor: 'comparing' stamp: 'md 1/27/2004 17:27'!\r= anAssociation\r\r\t^ super = anAssociation and: [value = anAssociation value]! !\r\r!Association methodsFor: 'comparing' stamp: 'md 1/27/2004 17:28'!\rhash\r\t\"Hash is reimplemented because = is implemented.\"\r\t\r\t^key hash bitXor: value hash.! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rAssociation class\r\tinstanceVariableNames: ''!\r\r!Association class methodsFor: 'instance creation'!\rkey: newKey value: newValue\r\t\"Answer an instance of me with the arguments as the key and value of \r\tthe association.\"\r\r\t^(super key: newKey) value: newValue! !\rError subclass: #AttemptToWriteReadOnlyGlobal\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Exceptions Kernel'!\r!AttemptToWriteReadOnlyGlobal commentStamp: 'gh 5/2/2002 20:26' prior: 0!\rThis is a resumable error you get if you try to assign a readonly variable a value.\rName definitions in the module system can be read only and are then created using instances of ReadOnlyVariableBinding instead of Association.\rSee also LookupKey>>beReadWriteBinding and LookupKey>>beReadOnlyBinding.\r\r!\r\r\r!AttemptToWriteReadOnlyGlobal methodsFor: 'as yet unclassified' stamp: 'ar 8/17/2001 18:02'!\rdescription\r\t\"Return a textual description of the exception.\"\r\r\t| desc mt |\r\tdesc := 'Error'.\r\t^(mt := self messageText) == nil\r\t\tifTrue: [desc]\r\t\tifFalse: [desc, ': ', mt]! !\r\r!AttemptToWriteReadOnlyGlobal methodsFor: 'as yet unclassified' stamp: 'ar 8/17/2001 18:02'!\risResumable\r\t^true! !\rCollection subclass: #Bag\r\tinstanceVariableNames: 'contents'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Unordered'!\r!Bag commentStamp: '<historical>' prior: 0!\rI represent an unordered collection of possibly duplicate elements.\r\t\rI store these elements in a dictionary, tallying up occurrences of equal objects. Because I store an occurrence only once, my clients should beware that objects they store will not necessarily be retrieved such that == is true. If the client cares, a subclass of me should be created.!\r\r\r!Bag methodsFor: 'accessing' stamp: 'sma 5/12/2000 17:23'!\rat: index \r\tself errorNotKeyed! !\r\r!Bag methodsFor: 'accessing' stamp: 'sma 5/12/2000 17:23'!\rat: index put: anObject \r\tself errorNotKeyed! !\r\r!Bag methodsFor: 'accessing' stamp: 'tao 1/5/2000 18:25'!\rcumulativeCounts\r\t\"Answer with a collection of cumulative percents covered by elements so far.\"\r\t| s n |\r\ts _ self size / 100.0. n _ 0.\r\t^ self sortedCounts asArray collect:\r\t\t[:a | n _ n + a key. (n / s roundTo: 0.1) -> a value]! !\r\r!Bag methodsFor: 'accessing' stamp: 'sma 5/12/2000 11:35'!\rsize\r\t\"Answer how many elements the receiver contains.\"\r\r\t| tally |\r\ttally _ 0.\r\tcontents do: [:each | tally _ tally + each].\r\t^ tally! !\r\r!Bag methodsFor: 'accessing' stamp: 'sma 6/15/2000 17:00'!\rsortedCounts\r\t\"Answer with a collection of counts with elements, sorted by decreasing\r\tcount.\"\r\r\t| counts |\r\tcounts _ SortedCollection sortBlock: [:x :y | x >= y].\r\tcontents associationsDo:\r\t\t[:assn |\r\t\tcounts add: (Association key: assn value value: assn key)].\r\t^ counts! !\r\r!Bag methodsFor: 'accessing'!\rsortedElements\r\t\"Answer with a collection of elements with counts, sorted by element.\"\r\r\t| elements |\r\telements _ SortedCollection new.\r\tcontents associationsDo: [:assn | elements add: assn].\r\t^elements! !\r\r\r!Bag methodsFor: 'adding' stamp: 'sma 5/12/2000 17:18'!\radd: newObject \r\t\"Include newObject as one of the receiver's elements. Answer newObject.\"\r\r\t^ self add: newObject withOccurrences: 1! !\r\r!Bag methodsFor: 'adding' stamp: 'sma 5/12/2000 17:20'!\radd: newObject withOccurrences: anInteger \r\t\"Add newObject anInteger times to the receiver. Answer newObject.\"\r\r\tcontents at: newObject put: (contents at: newObject ifAbsent: [0]) + anInteger.\r\t^ newObject! !\r\r\r!Bag methodsFor: 'converting' stamp: 'sma 5/12/2000 14:34'!\rasBag\r\t^ self! !\r\r!Bag methodsFor: 'converting' stamp: 'sma 5/12/2000 14:30'!\rasSet\r\t\"Answer a set with the elements of the receiver.\"\r\r\t^ contents keys! !\r\r\r!Bag methodsFor: 'copying' stamp: 'sma 5/12/2000 14:53'!\rcopy\r\t^ self shallowCopy setContents: contents copy! !\r\r\r!Bag methodsFor: 'enumerating'!\rdo: aBlock \r\t\"Refer to the comment in Collection|do:.\"\r\r\tcontents associationsDo: [:assoc | assoc value timesRepeat: [aBlock value: assoc key]]! !\r\r\r!Bag methodsFor: 'private' stamp: 'sma 5/12/2000 14:49'!\rsetContents: aDictionary\r\tcontents _ aDictionary! !\r\r\r!Bag methodsFor: 'removing' stamp: 'sma 5/12/2000 14:32'!\rremove: oldObject ifAbsent: exceptionBlock \r\t\"Refer to the comment in Collection|remove:ifAbsent:.\"\r\r\t| count |\r\tcount _ contents at: oldObject ifAbsent: [^ exceptionBlock value].\r\tcount = 1\r\t\tifTrue: [contents removeKey: oldObject]\r\t\tifFalse: [contents at: oldObject put: count - 1].\r\t^ oldObject! !\r\r\r!Bag methodsFor: 'testing'!\rincludes: anObject \r\t\"Refer to the comment in Collection|includes:.\"\r\r\t^contents includesKey: anObject! !\r\r!Bag methodsFor: 'testing'!\roccurrencesOf: anObject \r\t\"Refer to the comment in Collection|occurrencesOf:.\"\r\r\t(self includes: anObject)\r\t\tifTrue: [^contents at: anObject]\r\t\tifFalse: [^0]! !\r\r\r!Bag methodsFor: 'comparing' stamp: 'raok 6/10/2002 15:28'!\r= aBag\r\t\"Two bags are equal if\r\t (a) they are the same 'kind' of thing.\r\t (b) they have the same size.\r\t (c) each element occurs the same number of times in both of them\".\r\r\t(aBag isKindOf: Bag) ifFalse: [^false].\r\tself size = aBag size ifFalse: [^false].\r\tcontents associationsDo: [:assoc|\r\t\t(aBag occurrencesOf: assoc key) = assoc value\r\t\t\tifFalse: [^false]].\r\t^true\r\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rBag class\r\tinstanceVariableNames: ''!\r\r!Bag class methodsFor: 'instance creation' stamp: 'nk 3/17/2001 09:52'!\rcontentsClass\r\t^Dictionary! !\r\r!Bag class methodsFor: 'instance creation' stamp: 'sma 5/12/2000 13:31'!\rnew\r\t^ self new: 4! !\r\r!Bag class methodsFor: 'instance creation' stamp: 'nk 3/17/2001 09:52'!\rnew: nElements\r\t^ super new setContents: (self contentsClass new: nElements)! !\r\r!Bag class methodsFor: 'instance creation' stamp: 'sma 5/12/2000 17:17'!\rnewFrom: aCollection \r\t\"Answer an instance of me containing the same elements as aCollection.\"\r\r\t^ self withAll: aCollection\r\r\"Examples:\r\tBag newFrom: {1. 2. 3. 3}\r\t{1. 2. 3. 3} as: Bag\r\"! !\rCategorizer subclass: #BasicClassOrganizer\r\tinstanceVariableNames: 'subject classComment commentStamp'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Classes'!\r\r!BasicClassOrganizer methodsFor: 'accessing' stamp: 'NS 4/7/2004 16:02'!\rclassComment\r\tclassComment\r\t\tifNil: [^ ''].\r\t^ classComment text ifNil: ['']! !\r\r!BasicClassOrganizer methodsFor: 'accessing' stamp: 'NS 4/7/2004 16:03'!\rclassComment: aString \r\t\"Store the comment, aString, associated with the object that refers to the \r\treceiver.\"\r\r\t(aString isKindOf: RemoteString) \r\t\tifTrue: [classComment _ aString]\r\t\tifFalse: [(aString == nil or: [aString size = 0])\r\t\t\tifTrue: [classComment _ nil]\r\t\t\tifFalse: [\r\t\t\t\tself error: 'use aClass classComment:'.\r\t\t\t\tclassComment _ RemoteString newString: aString onFileNumber: 2]]\r\t\t\t\t\"Later add priorSource and date and initials?\"! !\r\r!BasicClassOrganizer methodsFor: 'accessing' stamp: 'NS 4/7/2004 16:03'!\rclassComment: aString  stamp: aStamp\r\t\"Store the comment, aString, associated with the object that refers to the receiver.\"\r\r\tself commentStamp: aStamp.\r\t(aString isKindOf: RemoteString) \r\t\tifTrue: [classComment _ aString]\r\t\tifFalse: [(aString == nil or: [aString size = 0])\r\t\t\tifTrue: [classComment _ nil]\r\t\t\tifFalse:\r\t\t\t\t[self error: 'use aClass classComment:'.\r\t\t\t\tclassComment _ RemoteString newString: aString onFileNumber: 2]]\r\t\t\t\t\"Later add priorSource and date and initials?\"! !\r\r!BasicClassOrganizer methodsFor: 'accessing' stamp: 'NS 4/7/2004 16:03'!\rcommentRemoteStr\r\t^ classComment! !\r\r!BasicClassOrganizer methodsFor: 'accessing' stamp: 'NS 4/7/2004 16:03'!\rcommentStamp\r\t\"Answer the comment stamp for the class\"\r\r\t^ commentStamp! !\r\r!BasicClassOrganizer methodsFor: 'accessing' stamp: 'NS 4/7/2004 16:03'!\rcommentStamp: aStamp\r\tcommentStamp _ aStamp! !\r\r!BasicClassOrganizer methodsFor: 'accessing' stamp: 'NS 4/7/2004 16:03'!\rdateCommentLastSubmitted\r\t\"Answer a Date object indicating when my class comment was last submitted.  If there is no date stamp, or one of the old-time <historical>  guys, return nil\"\r\t\"RecentMessageSet organization dateCommentLastSubmitted\"\r\r\t| aStamp tokens |\r\t(aStamp _ self commentStamp) isEmptyOrNil ifTrue: [^ nil].\r\ttokens _ aStamp findBetweenSubStrs: ' \r'.  \"space is expected delimiter, but cr is sometimes seen, though of mysterious provenance\"\r\t^ tokens size > 1\r\t\tifTrue:\r\t\t\t[[tokens second asDate] ifError: [nil]]\r\t\tifFalse:\r\t\t\t[nil]! !\r\r!BasicClassOrganizer methodsFor: 'accessing' stamp: 'NS 4/7/2004 16:03'!\rhasNoComment\r\t\"Answer whether the class classified by the receiver has a comment.\"\r\r\t^classComment == nil! !\r\r!BasicClassOrganizer methodsFor: 'accessing' stamp: 'NS 4/7/2004 16:04'!\rhasSubject\r\t^ self subject notNil! !\r\r!BasicClassOrganizer methodsFor: 'accessing' stamp: 'NS 4/7/2004 16:04'!\rsubject\r\t^ subject.! !\r\r\r!BasicClassOrganizer methodsFor: 'fileIn/Out' stamp: 'NS 4/7/2004 16:03'!\rfileOutCommentOn: aFileStream moveSource: moveSource toFile: fileIndex\r\t\"Copy the class comment to aFileStream.  If moveSource is true (as in compressChanges or compressSources, then update classComment to point to the new file.\"\r\t| fileComment |\r\tclassComment ifNotNil: \r\t\t\t[aFileStream cr.\r\t\t\tfileComment _ RemoteString newString: classComment text\r\t\t\t\t\t\t\tonFileNumber: fileIndex toFile: aFileStream.\r\t\t\tmoveSource ifTrue: [classComment _ fileComment]]! !\r\r!BasicClassOrganizer methodsFor: 'fileIn/Out' stamp: 'NS 4/7/2004 16:04'!\rputCommentOnFile: aFileStream numbered: sourceIndex moveSource: moveSource forClass: aClass\r\t\"Store the comment about the class onto file, aFileStream.\"\r\t| header |\r\tclassComment ifNotNil:\r\t\t[aFileStream cr; nextPut: $!!.\r\t\theader _ String streamContents: [:strm | \r\t\t\t\tstrm nextPutAll: aClass name;\r\t\t\t\tnextPutAll: ' commentStamp: '.\r\t\t\t\tcommentStamp ifNil: [commentStamp _ '<historical>'].\r\t\t\t\tcommentStamp storeOn: strm.\r\t\t\t\tstrm nextPutAll: ' prior: '; nextPutAll: '0'].\r\t\taFileStream nextChunkPut: header.\r\t\taClass organization fileOutCommentOn: aFileStream\r\t\t\t\tmoveSource: moveSource toFile: sourceIndex.\r\t\taFileStream cr]! !\r\r\r!BasicClassOrganizer methodsFor: 'private' stamp: 'NS 4/7/2004 16:04'!\rsetSubject: aClassDescription\r\tsubject _ aClassDescription! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rBasicClassOrganizer class\r\tinstanceVariableNames: ''!\r\r!BasicClassOrganizer class methodsFor: 'instance creation' stamp: 'NS 4/7/2004 16:04'!\rclass: aClassDescription\r\t^ self new setSubject: aClassDescription! !\rInspector subclass: #BasicInspector\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Inspector'!\r\r!BasicInspector methodsFor: 'as yet unclassified' stamp: 'ajh 1/31/2003 15:49'!\rinspect: anObject \r\t\"Initialize the receiver so that it is inspecting anObject. There is no \r\tcurrent selection.\"\r\r\tself initialize.\r\tobject _ anObject.\r\tselectionIndex _ 0.\r\tcontents _ ''! !\rObject subclass: #Beeper\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Support'!\r!Beeper commentStamp: 'gk 2/26/2004 22:44' prior: 0!\rBeeper provides simple audio (or in some other way) feedback to the user.\r\rThe recommended use is \"Beeper beep\" to give the user the equivalence of a beep. If you want to force the beep to use the primitive in the VM for beeping, then use \"Beeper beepPrimitive\". In either case, if sounds are disabled there will be no beep.\r\rThe actual beeping, when you use \"Beeper beep\", is done by sending a #play message to a registered playable object. You can register your own playable object by invoking the class side method #setDefault: passing in an object that responds to the #play message.\r\rThe default playable object is an instance of Beeper itself which implements #play on the instance side. That implementation delegates the playing of the beep to the default SoundService.\r\rNote that #play is introduced as a common interface between AbstractSound and Beeper.\rThis way we can register instances of AbstractSound as playable entities, for example:\r\r\tBeeper setDefault: (SampledSound new\r\t\t\t\t\t\tsetSamples: self coffeeCupClink\r\t\t\t\t\t\tsamplingRate: 12000).\r\rThen \"Beeper beep\" will play the coffeeCup sound.!\r\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rBeeper class\r\tinstanceVariableNames: 'default'!\r\r!Beeper class methodsFor: 'customize' stamp: 'gk 2/22/2004 17:55'!\rdefault\r\t\"When the default is not defined it is\r\tinitialized using #newDefault.\"\r\r\tdefault isNil \r\t\tifTrue: [default := self newDefault ].\r\t^ default! !\r\r!Beeper class methodsFor: 'customize' stamp: 'gk 2/24/2004 22:12'!\rnewDefault\r\t\"Subclasses may override me to provide a default beep.\r\tThis base implementation returns an instance of Beeper\r\twhich uses the pluggable sound service.\"\r\r\t^ self new! !\r\r\r!Beeper class methodsFor: 'beeping' stamp: 'BG 11/26/2003 22:58'!\rbeep\r\t\"The preferred way of producing an audible feedback\"\r\r\tself beepPrimitive\r! !\r\r!Beeper class methodsFor: 'beeping' stamp: 'gk 2/24/2004 08:38'!\rbeepPrimitive\r\t\"Make a primitive beep. Only use this if\r\tyou want to force this to be a primitive beep.\r\tOtherwise use Beeper class>>beep\r\tsince this method bypasses the current\r\tregistered playable entity.\"\r\r\tPreferences soundsEnabled ifTrue: [\r\t\tself primitiveBeep]! !\r\r\r!Beeper class methodsFor: 'private' stamp: 'gk 2/24/2004 23:51'!\rprimitiveBeep\r\t\"Make a primitive beep. Not to be called directly.\r\tIt is much better to use Beeper class>>beep\r\tor Beeper class>>beepPrimitive\r\tsince this method bypasses the current\r\tregistered playable entity and does not\r\tcheck Preferences class>>soundsEnabled.\"\r\r\t<primitive: 140>\r\tself primitiveFailed! !\rObject subclass: #Behavior\r\tinstanceVariableNames: 'superclass methodDict format'\r\tclassVariableNames: 'ObsoleteSubclasses'\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Classes'!\r!Behavior commentStamp: '<historical>' prior: 0!\rMy instances describe the behavior of other objects. I provide the minimum state necessary for compiling methods, and creating and running instances. Most objects are created as instances of the more fully supported subclass, Class, but I am a good starting point for providing instance-specific behavior (as in Metaclass).!\r\r\r!Behavior methodsFor: 'initialize-release' stamp: 'NS 1/28/2004 11:17'!\rforgetDoIts\r\t\"get rid of old DoIt methods\"\r\tself \r\t\tbasicRemoveSelector: #DoIt;\r\t\tbasicRemoveSelector: #DoItIn:! !\r\r!Behavior methodsFor: 'initialize-release' stamp: 'ar 9/10/1999 17:33'!\robsolete\r\t\"Invalidate and recycle local messages,\r\te.g., zap the method dictionary if can be done safely.\"\r\tself canZapMethodDictionary\r\t\tifTrue:[ methodDict _ MethodDictionary new ].! !\r\r!Behavior methodsFor: 'initialize-release' stamp: 'ar 7/15/1999 16:39'!\rsuperclass: aClass methodDictionary: mDict format: fmt\r\t\"Basic initialization of the receiver.\r\tMust only be sent to a new instance; else we would need Object flushCache.\"\r\tsuperclass _ aClass.\r\tformat _ fmt.\r\tmethodDict _ mDict.! !\r\r\r!Behavior methodsFor: 'accessing'!\rcompilerClass\r\t\"Answer a compiler class appropriate for source methods of this class.\"\r\r\t^Compiler! !\r\r!Behavior methodsFor: 'accessing'!\rdecompilerClass\r\t\"Answer a decompiler class appropriate for compiled methods of this class.\"\r\r\t^Decompiler! !\r\r!Behavior methodsFor: 'accessing' stamp: 'ar 7/11/1999 05:17'!\renvironment\r\t\"Return the environment in which the receiver is visible\"\r\t^Smalltalk! !\r\r!Behavior methodsFor: 'accessing'!\revaluatorClass\r\t\"Answer an evaluator class appropriate for evaluating expressions in the \r\tcontext of this class.\"\r\r\t^Compiler! !\r\r!Behavior methodsFor: 'accessing'!\rformat\r\t\"Answer an Integer that encodes the kinds and numbers of variables of \r\tinstances of the receiver.\"\r\r\t^format! !\r\r!Behavior methodsFor: 'accessing' stamp: 'di 3/7/2001 17:05'!\rmethodDict\r\tmethodDict == nil ifTrue: [self recoverFromMDFaultWithTrace].\r\t^ methodDict! !\r\r!Behavior methodsFor: 'accessing' stamp: 'rca 7/26/2000 16:53'!\rname\r\t\"Answer a String that is the name of the receiver.\"\r\t^'a subclass of ', superclass name! !\r\r!Behavior methodsFor: 'accessing'!\rparserClass\r\t\"Answer a parser class to use for parsing method headers.\"\r\r\t^self compilerClass parserClass! !\r\r!Behavior methodsFor: 'accessing'!\rsourceCodeTemplate\r\t\"Answer an expression to be edited and evaluated in order to define \r\tmethods in this class.\"\r\r\t^'message selector and argument names\r\t\"comment stating purpose of message\"\r\r\t| temporary variable names |\r\tstatements'! !\r\r!Behavior methodsFor: 'accessing'!\rsubclassDefinerClass\r\t\"Answer an evaluator class appropriate for evaluating definitions of new \r\tsubclasses of this class.\"\r\r\t^Compiler! !\r\r!Behavior methodsFor: 'accessing' stamp: 'ar 7/13/1999 22:00'!\rtypeOfClass\r\t\"Answer a symbol uniquely describing the type of the receiver\"\r\tself instSpec = CompiledMethod instSpec ifTrue:[^#compiledMethod]. \"Very special!!\"\r\tself isBytes ifTrue:[^#bytes].\r\t(self isWords and:[self isPointers not]) ifTrue:[^#words].\r\tself isWeak ifTrue:[^#weak].\r\tself isVariable ifTrue:[^#variable].\r\t^#normal.! !\r\r\r!Behavior methodsFor: 'testing' stamp: 'ar 9/10/1999 17:29'!\rcanZapMethodDictionary\r\t\"Return true if it is safe to zap the method dictionary on #obsolete\"\r\t^true! !\r\r!Behavior methodsFor: 'testing'!\rinstSize\r\t\"Answer the number of named instance variables\r\t(as opposed to indexed variables) of the receiver.\"\r\r\tself flag: #instSizeChange.  \"Smalltalk browseAllCallsOn: #instSizeChange\"\r\"\r\tNOTE: This code supports the backward-compatible extension to 8 bits of instSize.\r\tWhen we revise the image format, it should become...\r\t^ ((format bitShift: -1) bitAnd: 16rFF) - 1\r\tNote also that every other method in this category will require\r\t2 bits more of right shift after the change.\r\"\r\t^ ((format bitShift: -10) bitAnd: 16rC0) + ((format bitShift: -1) bitAnd: 16r3F) - 1! !\r\r!Behavior methodsFor: 'testing'!\rinstSpec\r\t^ (format bitShift: -7) bitAnd: 16rF! !\r\r!Behavior methodsFor: 'testing' stamp: 'ar 7/9/1999 18:18'!\risBehavior\r\t\"Return true if the receiver is a behavior\"\r\t^true! !\r\r!Behavior methodsFor: 'testing'!\risBits\r\t\"Answer whether the receiver contains just bits (not pointers).\"\r\r\t^ self instSpec >= 6! !\r\r!Behavior methodsFor: 'testing'!\risBytes\r\t\"Answer whether the receiver has 8-bit instance variables.\"\r\r\t^ self instSpec >= 8! !\r\r!Behavior methodsFor: 'testing'!\risFixed\r\t\"Answer whether the receiver does not have a variable (indexable) part.\"\r\r\t^self isVariable not! !\r\r!Behavior methodsFor: 'testing' stamp: 'ab 3/12/2003 17:44'!\risMeta\r\t^ false! !\r\r!Behavior methodsFor: 'testing' stamp: 'ar 7/14/1999 02:38'!\risObsolete\r\t\"Return true if the receiver is obsolete.\"\r\t^self instanceCount = 0! !\r\r!Behavior methodsFor: 'testing'!\risPointers\r\t\"Answer whether the receiver contains just pointers (not bits).\"\r\r\t^self isBits not! !\r\r!Behavior methodsFor: 'testing'!\risVariable\r\t\"Answer whether the receiver has indexable variables.\"\r\r\t^ self instSpec >= 2! !\r\r!Behavior methodsFor: 'testing' stamp: 'ar 3/21/98 02:36'!\risWeak\r\t\"Answer whether the receiver has contains weak references.\"\r\t^ self instSpec = 4! !\r\r!Behavior methodsFor: 'testing'!\risWords\r\t\"Answer whether the receiver has 16-bit instance variables.\"\r\r\t^self isBytes not! !\r\r!Behavior methodsFor: 'testing' stamp: 'sd 3/28/2003 15:07'!\rshouldNotBeRedefined\r\t\"Return true if the receiver should not be redefined.\r\tThe assumption is that compact classes,\r\tclasses in Smalltalk specialObjects and \r\tBehaviors should not be redefined\"\r\r\t^(self environment compactClassesArray includes: self)\r\t\tor:[(self environment specialObjectsArray includes: self)\r\t\t\tor:[self isKindOf: self]]! !\r\r\r!Behavior methodsFor: 'copying' stamp: 'di 2/17/2000 22:37'!\rcopy\r\t\"Answer a copy of the receiver without a list of subclasses.\"\r\r\t| myCopy |\r\tmyCopy _ self shallowCopy.\r\t^myCopy methodDictionary: self methodDict copy! !\r\r!Behavior methodsFor: 'copying' stamp: 'tk 4/16/1999 17:30'!\rdeepCopy\r\t\"Classes should only be shallowCopied or made anew.\"\r\r^ self shallowCopy! !\r\r\r!Behavior methodsFor: 'printing' stamp: 'sw 10/13/2000 12:59'!\rdefaultNameStemForInstances\r\t\"Answer a basis for external names for default instances of the receiver.  For classees, the class-name itself is a good one.\"\r\r\t^ self name! !\r\r!Behavior methodsFor: 'printing' stamp: 'ar 5/17/2003 14:11'!\rliteralScannedAs: scannedLiteral notifying: requestor\r\t\"Postprocesses a literal scanned by Scanner scanToken (esp. xLitQuote).\r\tIf scannedLiteral is not an association, answer it.\r\tElse, if it is of the form:\r\t\tnil->#NameOfMetaclass\r\tanswer nil->theMetaclass, if any has that name, else report an error.\r\tElse, if it is of the form:\r\t\t#NameOfGlobalVariable->anythiEng\r\tanswer the global, class, or pool association with that nameE, if any, else\r\tadd it to Undeclared a answer the new Association.\"\r\r\t| key value |\r\t(scannedLiteral isVariableBinding)\r\t\tifFalse: [^ scannedLiteral].\r\tkey _ scannedLiteral key.\r\tvalue _ scannedLiteral value.\r\tkey isNil \r\t\tifTrue: \"###<metaclass soleInstance name>\"\r\t\t\t[(self bindingOf: value) ifNotNilDo:[:assoc|\r\t\t\t\t (assoc value isKindOf: Behavior)\r\t\t\t\t\tifTrue: [^ nil->assoc value class]].\r\t\t\t requestor notify: 'No such metaclass'.\r\t\t\t ^false].\r\t(key isMemberOf: Symbol)\r\t\tifTrue: \"##<global var name>\"\r\t\t\t[(self bindingOf: key) ifNotNilDo:[:assoc | ^assoc].\r\t\t\tUndeclared at: key put: nil.\r\t\t\t ^Undeclared bindingOf: key].\r\trequestor notify: '## must be followed by a non-local variable name'.\r\t^false\r\r\"\tForm literalScannedAs: 14 notifying: nil 14\r\tForm literalScannedAs: #OneBitForm notiEfying: nil  OneBitForm\r\tForm literalScannedAs: ##OneBitForm notifying: nil  OneBitForm->a Form\r\tForm literalScannedAs: ##Form notifying: nil   Form->Form\r\tForm literalScannedAs: ###Form notifying: nil   nilE->Form class\r\"! !\r\r!Behavior methodsFor: 'printing' stamp: 'tk 10/16/2001 19:35'!\rlongPrintOn: aStream\r\t\"Append to the argument, aStream, the names and values of all of the receiver's instance variables.  But, not useful for a class with a method dictionary.\"\r\r\taStream nextPutAll: '<<too complex to show>>'; cr.! !\r\r!Behavior methodsFor: 'printing'!\rprintHierarchy\r\t\"Answer a description containing the names and instance variable names \r\tof all of the subclasses and superclasses of the receiver.\"\r\r\t| aStream index |\r\tindex _ 0.\r\taStream _ WriteStream on: (String new: 16).\r\tself allSuperclasses reverseDo: \r\t\t[:aClass | \r\t\taStream crtab: index.\r\t\tindex _ index + 1.\r\t\taStream nextPutAll: aClass name.\r\t\taStream space.\r\t\taStream print: aClass instVarNames].\r\taStream cr.\r\tself printSubclassesOn: aStream level: index.\r\t^aStream contents! !\r\r!Behavior methodsFor: 'printing'!\rprintOn: aStream \r\t\"Refer to the comment in Object|printOn:.\" \r\r\taStream nextPutAll: 'a descendent of '.\r\tsuperclass printOn: aStream! !\r\r!Behavior methodsFor: 'printing' stamp: 'MPW 1/1/1901 21:56'!\rprintOnStream: aStream \r\t\"Refer to the comment in Object|printOn:.\" \r\r\taStream print: 'a descendent of '; write:superclass.! !\r\r\r!Behavior methodsFor: 'compiling'!\rcompile: code \r\t\"Compile the argument, code, as source code in the context of the \r\treceiver. Create an error notification if the code can not be compiled. \r\tThe argument is either a string or an object that converts to a string or a \r\tPositionableStream on an object that converts to a string.\"\r\r\t^self compile: code notifying: nil! !\r\r!Behavior methodsFor: 'compiling' stamp: 'NS 1/28/2004 13:59'!\rcompile: code notifying: requestor \r\t\"Compile the argument, code, as source code in the context of the \r\treceiver and insEtall the result in the receiver's method dictionary. The \r\tsecond argument, requestor, is to be notified if an error occurs. The \r\targument code is either a string or an object that converts to a string or \r\ta PositionableStream. This method also saves the source code.\"\r\t\r\t| methodAndNode |\r\tmethodAndNode _ self\r\t\tbasicCompile: code \"a Text\"\r\t\tnotifying: requestor\r\t\ttrailer: self defaultMethodTrailer\r\t\tifFail: [^nil].\r\tmethodAndNode method putSource: code fromParseNode: methodAndNode node inFile: 2\r\t\t\twithPreamble: [:f | f cr; nextPut: $!!; nextChunkPut: 'Behavior method'; cr].\r\tself addSelector: methodAndNode selector withMethod: methodAndNode method notifying: requestor.\r\t^ methodAndNode selector! !\r\r!Behavior methodsFor: 'compiling'!\rcompileAll\r\t^ self compileAllFrom: self! !\r\r!Behavior methodsFor: 'compiling' stamp: 'sd 3/28/2003 15:07'!\rcompileAllFrom: oldClass\r\t\"Compile all the methods in the receiver's method dictionary.\r\tThis validates sourceCode and variable references and forces\r\tall methods to use the current bytecode set\"\r\t\"ar 7/10/1999: Use oldClass selectors not self selectors\"\r\toldClass selectorsDo: [:sel | self recompile: sel from: oldClass].\r\tself environment currentProjectDo: [:proj | proj compileAllIsolated: self from: oldClass].! !\r\r!Behavior methodsFor: 'compiling' stamp: 'NS 1/28/2004 11:32'!\rdefaultMethodTrailer\r\t^ #(0 0 0 0)! !\r\r!Behavior methodsFor: 'compiling' stamp: 'NS 1/28/2004 09:22'!\rrecompile: selector from: oldClass\r\t\"Compile the method associated with selector in the receiver's method dictionary.\"\r\t\"ar 7/10/1999: Use oldClass compiledMethodAt: not self compiledMethodAt:\"\r\t| method trailer methodNode |\r\tmethod _ oldClass compiledMethodAt: selector.\r\ttrailer _ method trailer.\r\tmethodNode _ self compilerClass new\r\t\t\t\tcompile: (oldClass sourceCodeAt: selector)\r\t\t\t\tin: self\r\t\t\t\tnotifying: nil\r\t\t\t\tifFail: [^ self].   \"Assume OK after proceed from SyntaxError\"\r\tselector == methodNode selector ifFalse: [self error: 'selector changed!!'].\r\tself addSelectorSilently: selector withMethod: (methodNode generate: trailer).\r! !\r\r!Behavior methodsFor: 'compiling' stamp: 'ajh 6/11/2001 17:05'!\rrecompileNonResidentMethod: method atSelector: selector from: oldClass\r\t\"Recompile the method supplied in the context of this class.\"\r\r\t| trailer methodNode |\r\ttrailer _ method trailer.\r\tmethodNode _ self compilerClass new\r\t\t\tcompile: (method getSourceFor: selector in: oldClass)\r\t\t\tin: self\r\t\t\tnotifying: nil\r\t\t\tifFail: [\"We're in deep doo-doo if this fails (syntax error).\r\t\t\t\tPresumably the user will correct something and proceed,\r\t\t\t\tthus installing the result in this methodDict.  We must\r\t\t\t\tretrieve that new method, and restore the original (or remove)\r\t\t\t\tand then return the method we retrieved.\"\r\t\t\t\t^ self error: 'see comment'].\r\tselector == methodNode selector ifFalse: [self error: 'selector changed!!'].\r\t^ methodNode generate: trailer\r! !\r\r\r!Behavior methodsFor: 'instance creation' stamp: 'sd 3/28/2003 15:06'!\rbasicNew\r\t\"Primitive. Answer an instance of the receiver (which is a class) with no \r\tindexable variables. Fail if the class is indexable. Essential. See Object \r\tdocumentation whatIsAPrimitive.\"\r\r\t<primitive: 70>\r\tself isVariable ifTrue: [ ^ self basicNew: 0 ].\r\t\"space must be low\"\r\tself environment signalLowSpace.\r\t^ self basicNew  \"retry if user proceeds\"\r! !\r\r!Behavior methodsFor: 'instance creation' stamp: 'sd 3/28/2003 15:06'!\rbasicNew: sizeRequested \r\t\"Primitive. Answer an instance of this class with the number\r\tof indexable variables specified by the argument, sizeRequested.\r\tFail if this class is not indexable or if the argument is not a\r\tpositive Integer, or if there is not enough memory available. \r\tEssential. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 71>\r\tself isVariable ifFalse:\r\t\t[self error: self printString, ' cannot have variable sized instances'].\r\t(sizeRequested isInteger and: [sizeRequested >= 0]) ifTrue:\r\t\t[\"arg okay; space must be low.\"\r\t\tself environment signalLowSpace.\r\t\t^ self basicNew: sizeRequested  \"retry if user proceeds\"].\r\tself primitiveFailed! !\r\r!Behavior methodsFor: 'instance creation' stamp: 'sw 5/4/2000 20:47'!\rinitializedInstance\r\t\"Answer an instance of the receiver which in some sense is initialized.  In the case of Morphs, this will yield an instance that can be attached to the Hand after having received the same kind of basic initialization that would be obtained from an instance chosen from the 'new morph' menu.   Return nil if the receiver is reluctant for some reason to return such a thing\"\r\r\t^ self new! !\r\r!Behavior methodsFor: 'instance creation'!\rnew\r\t\"Answer a new initialized instance of the receiver (which is a class) with no indexable variables. Fail if the class is indexable.\"\r\r\t^ self basicNew initialize\r! !\r\r!Behavior methodsFor: 'instance creation' stamp: 'sd 5/20/2004 11:20'!\rnew: sizeRequested \r\t\"Answer an initialized instance of this class with the number of indexable\r\tvariables specified by the argument, sizeRequested.\"\r\r\t^ (self basicNew: sizeRequested) initialize  ! !\r\r\r!Behavior methodsFor: 'accessing class hierarchy' stamp: 'nb 5/6/2003 17:11'!\rallSubclasses\r\t\"Answer a Set of the receiver's and the receiver's descendent's subclasses. \"\r\r\t| scan scanTop |\r\tscan _ OrderedCollection withAll: self subclasses.\r\tscanTop _ 1.\r\t[scanTop > scan size]\r\t\twhileFalse: [scan addAll: (scan at: scanTop) subclasses.\r\t\t\tscanTop _ scanTop + 1].\r\t^ scan asSet! !\r\r!Behavior methodsFor: 'accessing class hierarchy' stamp: 'sd 3/28/2003 15:06'!\rallSubclassesWithLevelDo: classAndLevelBlock startingLevel: level \r\t\"Walk the tree of subclasses, giving the class and its level\"\r\t| subclassNames |\r\tclassAndLevelBlock value: self value: level.\r\tself == Class ifTrue:  [^ self].  \"Don't visit all the metaclasses\"\r\t\"Visit subclasses in alphabetical order\"\r\tsubclassNames _ SortedCollection new.\r\tself subclassesDo: [:subC | subclassNames add: subC name].\r\tsubclassNames do:\r\t\t[:name | (self environment at: name)\r\t\t\tallSubclassesWithLevelDo: classAndLevelBlock\r\t\t\tstartingLevel: level+1]! !\r\r!Behavior methodsFor: 'accessing class hierarchy'!\rallSuperclasses\r\t\"Answer an OrderedCollection of the receiver's and the receiver's  \r\tancestor's superclasses. The first element is the receiver's immediate  \r\tsuperclass, followed by its superclass; the last element is Object.\"\r\t| temp |\r\t^ superclass == nil\r\t\tifTrue: [ OrderedCollection new]\r\t\tifFalse: [temp _ superclass allSuperclasses.\r\t\t\ttemp addFirst: superclass.\r\t\t\ttemp]! !\r\r!Behavior methodsFor: 'accessing class hierarchy' stamp: 'sd 3/14/2004 18:09'!\rsubclasses\r\t\"slow implementation since Behavior does not keep trace of subclasses\"\r\t\r\t^ self class allInstances  select: [:each | each superclass = self ]! !\r\r!Behavior methodsFor: 'accessing class hierarchy'!\rsuperclass\r\t\"Answer the receiver's superclass, a Class.\"\r\r\t^superclass! !\r\r!Behavior methodsFor: 'accessing class hierarchy' stamp: 'ar 7/10/1999 12:10'!\rsuperclass: aClass \r\t\"Change the receiver's superclass to be aClass.\"\r\t\"Note: Do not use 'aClass isKindOf: Behavior' here\r\t\tin case we recompile from Behavior itself.\"\r\t(aClass == nil or: [aClass isBehavior])\r\t\tifTrue: [superclass _ aClass.\r\t\t\t\tObject flushCache]\r\t\tifFalse: [self error: 'superclass must be a class-describing object']! !\r\r!Behavior methodsFor: 'accessing class hierarchy'!\rwithAllSubclasses\r\t\"Answer a Set of the receiver, the receiver's descendent's, and the  \r\treceiver's descendent's subclasses.\"\r\r\t^ self allSubclasses add: self;\r\t\t yourself! !\r\r!Behavior methodsFor: 'accessing class hierarchy'!\rwithAllSuperclasses\r\t\"Answer an OrderedCollection of the receiver and the receiver's \r\tsuperclasses. The first element is the receiver, \r\tfollowed by its superclass; the last element is Object.\"\r\r\t| temp |\r\ttemp _ self allSuperclasses.\r\ttemp addFirst: self.\r\t^ temp! !\r\r\r!Behavior methodsFor: 'accessing method dictionary' stamp: 'bf 9/27/1999 17:23'!\r>> selector \r\t\"Answer the compiled method associated with the argument, selector (a \r\tSymbol), a message selector in the receiver's method dictionary. If the \r\tselector is not in the dictionary, create an error notification.\"\r\r\t^self compiledMethodAt: selector \r! !\r\r!Behavior methodsFor: 'accessing method dictionary' stamp: 'NS 1/28/2004 09:34'!\raddSelector: selector withMethod: compiledMethod notifying: requestor\r\t^ self addSelectorSilently: selector withMethod: compiledMethod! !\r\r!Behavior methodsFor: 'accessing method dictionary' stamp: 'NS 1/28/2004 11:27'!\raddSelectorSilently: selector withMethod: compiledMethod \r\t\"Add the message selector with the corresponding compiled method to the \r\treceiver's method dictionary.\r\tDo this without sending system change notifications\"\r\r\t| oldMethodOrNil |\r\toldMethodOrNil _ self lookupSelector: selector.\r\tself methodDict at: selector put: compiledMethod.\r\r\t\"Now flush Squeak's method cache, either by selector or by method\"\r\toldMethodOrNil == nil ifFalse: [oldMethodOrNil flushCache].\r\tselector flushCache.! !\r\r!Behavior methodsFor: 'accessing method dictionary' stamp: 'NS 12/12/2003 15:57'!\rallSelectors\r\t\"Answer all selectors understood by instances of the receiver\"\r\r\t| coll |\r\tcoll _ OrderedCollection new.\r\tself withAllSuperclasses do:\r\t\t[:aClass | coll addAll: aClass selectors].\r\t^ coll asIdentitySet! !\r\r!Behavior methodsFor: 'accessing method dictionary' stamp: 'sw 10/19/1999 15:12'!\rchangeRecordsAt: selector\r\t\"Return a list of ChangeRecords for all versions of the method at selector. Source code can be retrieved by sending string to any one.  Return nil if the method is absent.\"\r\r\t\"(Pen changeRecordsAt: #go:) collect: [:cRec | cRec string]\"\r\t| aList |\r\taList _ VersionsBrowser new\r\t\t\tscanVersionsOf: (self compiledMethodAt: selector ifAbsent: [^ nil])\r\t\t\tclass: self meta: self isMeta\r\t\t\tcategory: (self whichCategoryIncludesSelector: selector)\r\t\t\tselector: selector.\r\t^ aList ifNotNil: [aList changeList]! !\r\r!Behavior methodsFor: 'accessing method dictionary' stamp: 'di 2/17/2000 22:37'!\rcompiledMethodAt: selector \r\t\"Answer the compiled method associated with the argument, selector (a \r\tSymbol), a message selector in the receiver's method dictionary. If the \r\tselector is not in the dictionary, create an error notification.\"\r\r\t^ self methodDict at: selector! !\r\r!Behavior methodsFor: 'accessing method dictionary' stamp: 'di 2/17/2000 22:41'!\rcompiledMethodAt: selector ifAbsent: aBlock\r\t\"Answer the compiled method associated with the argument, selector (a Symbol), a message selector in the receiver's method dictionary. If the selector is not in the dictionary, return the value of aBlock\"\r\r\t^ self methodDict at: selector ifAbsent: [aBlock value]! !\r\r!Behavior methodsFor: 'accessing method dictionary' stamp: 'sw 12/1/2000 20:12'!\rfirstCommentAt:  selector\r\t\"Answer a string representing the first comment in the method associated with selector.  Return an empty string if the relevant source file is not available, or if the method's source code does not contain a comment.  Not smart enough to bypass quotes in string constants, but does map doubled quote into a single quote.\"\r\r\t| sourceString commentStart  pos nextQuotePos |\r\r\tsourceString _ (self sourceCodeAt: selector) asString.\r\tsourceString size == 0 ifTrue: [^ ''].\r\tcommentStart _ sourceString findString: '\"' startingAt: 1.\r\tcommentStart == 0 ifTrue: [^ ''].\r\tpos _ commentStart + 1.\r\t[(nextQuotePos _ sourceString findString: '\"' startingAt: pos) == (sourceString findString: '\"\"' startingAt: pos)]\r\t\twhileTrue:\r\t\t\t[pos _ nextQuotePos + 2].\r\t\r\tcommentStart == nextQuotePos ifTrue: [^ ''].  \"Must have been a quote in string literal\"\r\r\t^ (sourceString copyFrom: commentStart + 1 to: nextQuotePos - 1) copyReplaceAll: '\"\"' with: '\"'\r\r\r\"Behavior firstCommentAt: #firstCommentAt:\"! !\r\r!Behavior methodsFor: 'accessing method dictionary' stamp: 'sw 6/20/2001 15:46'!\rfirstPrecodeCommentFor:  selector\r\t\"If there is a comment in the source code at the given selector that preceeds the body of the method, return it here, else return nil\"\r\r\t| parser source tree |\r\t\"Behavior firstPrecodeCommentFor: #firstPrecodeCommentFor:\"\r\t(MessageSet isPseudoSelector: selector)\r\t\tifTrue:\r\t\t\t[\"Not really a selector\"\r\t\t\t^ nil].\r\tsource _ self sourceCodeAt: selector asSymbol ifAbsent: [^ nil].\r\tparser _ self parserClass new.\r\ttree _ \r\t\tparser\r\t\t\tparse: (ReadStream on: source)\r\t\t\tclass: self\r\t\t\tnoPattern: false\r\t\t\tcontext: nil\r\t\t\tnotifying: nil\r\t\t\tifFail: [^ nil].\r\t^ (tree comment ifNil: [^ nil]) first! !\r\r!Behavior methodsFor: 'accessing method dictionary' stamp: 'di 1/2/1999 15:45'!\rlookupSelector: selector\r\t\"Look up the given selector in my methodDictionary.\r\tReturn the corresponding method if found.\r\tOtherwise chase the superclass chain and try again.\r\tReturn nil if no method is found.\"\r\t| lookupClass |\r\tlookupClass _ self.\r\t[lookupClass == nil]\r\t\twhileFalse: \r\t\t\t[(lookupClass includesSelector: selector)\r\t\t\t\tifTrue: [^ lookupClass compiledMethodAt: selector].\r\t\t\tlookupClass _ lookupClass superclass].\r\t^ nil! !\r\r!Behavior methodsFor: 'accessing method dictionary' stamp: 'ar 7/11/1999 05:11'!\rmethodDictionary\r\t\"Convenience\"\r\t^self methodDict! !\r\r!Behavior methodsFor: 'accessing method dictionary' stamp: 'ar 7/12/1999 07:45'!\rmethodDictionary: aDictionary \r\t\"Store the argument, aDictionary, as the method dictionary of the \r\treceiver.\"\r\tmethodDict _ aDictionary.! !\r\r!Behavior methodsFor: 'accessing method dictionary' stamp: 'ar 12/27/2001 22:29'!\rmethodHeaderFor: selector \r\t\"Answer the string corresponding to the method header for the given selector\"\r\r\t| sourceString parser |\r\tsourceString _ self ultimateSourceCodeAt: selector ifAbsent: [self standardMethodHeaderFor: selector].\r\t(parser _ self parserClass new) parseSelector: sourceString.\r\t^ sourceString asString copyFrom: 1 to: (parser endOfLastToken min: sourceString size)\r\r\"Behavior methodHeaderFor: #methodHeaderFor: \"\r! !\r\r!Behavior methodsFor: 'accessing method dictionary'!\rprecodeCommentOrInheritedCommentFor: selector \r\t\"Answer a string representing the first comment in the method associated \r\twith selector, considering however only comments that occur before the \r\tbeginning of the actual code. If the version recorded in the receiver is \r\tuncommented, look up the inheritance chain. Return nil if none found.\"\r\t| aSuper aComment |\r\t^ (aComment _ self firstPrecodeCommentFor: selector) isEmptyOrNil\r\t\tifTrue: [(self == Behavior\r\t\t\t\t\tor: [superclass == nil\r\t\t\t\t\t\t\tor: [(aSuper _ superclass whichClassIncludesSelector: selector) == nil]])\r\t\t\t\tifFalse: [aSuper precodeCommentOrInheritedCommentFor: selector]\r\t\t\t\"ActorState precodeCommentOrInheritedCommentFor: #printOn:\"]\r\t\tifFalse: [aComment]! !\r\r!Behavior methodsFor: 'accessing method dictionary' stamp: 'NS 1/28/2004 11:17'!\rremoveSelector: selector \r\t\"Assuming that the argument, selector (a Symbol), is a message selector \r\tin my method dictionary, remove it and its method.\"\r\r\t^ self basicRemoveSelector: selector! !\r\r!Behavior methodsFor: 'accessing method dictionary' stamp: 'rw 5/12/2003 11:19'!\rselectorAtMethod: method setClass: classResultBlock \r\t\"Answer both the message selector associated with the compiled method \r\tand the class in which that selector is defined.\"\r\r\t| sel |\r\tsel _ self methodDict keyAtIdentityValue: method\r\t\t\t\tifAbsent: \r\t\t\t\t\t[superclass == nil\r\t\t\t\t\t\tifTrue: \r\t\t\t\t\t\t\t[classResultBlock value: self.\r\t\t\t\t\t\t\t^method defaultSelector].\r\t\t\t\t\tsel _ superclass selectorAtMethod: method setClass: classResultBlock.\r\t\t\t\t\t\"Set class to be self, rather than that returned from \r\t\t\t\t\tsuperclass. \"\r\t\t\t\t\tsel == method defaultSelector ifTrue: [classResultBlock value: self].\r\t\t\t\t\t^sel].\r\tclassResultBlock value: self.\r\t^sel! !\r\r!Behavior methodsFor: 'accessing method dictionary' stamp: 'di 2/17/2000 22:38'!\rselectors\r\t\"Answer a Set of all the message selectors specified in the receiver's \r\tmethod dictionary.\"\r\r\t^ self methodDict keys  \r\r\t\"Point selectors.\"! !\r\r!Behavior methodsFor: 'accessing method dictionary' stamp: 'di 2/17/2000 22:41'!\rselectorsAndMethodsDo: aBlock\r\t\"Evaluate selectorBlock for all the message selectors in my method dictionary.\"\r\r\t^ self methodDict keysAndValuesDo: aBlock! !\r\r!Behavior methodsFor: 'accessing method dictionary' stamp: 'di 2/17/2000 22:38'!\rselectorsDo: selectorBlock\r\t\"Evaluate selectorBlock for all the message selectors in my method dictionary.\"\r\r\t^ self methodDict keysDo: selectorBlock! !\r\r!Behavior methodsFor: 'accessing method dictionary' stamp: 'tk 3/24/1999 07:44'!\rselectorsWithArgs: numberOfArgs\r\t\"Return all selectors defined in this class that take this number of arguments.  Could use String.keywords.  Could see how compiler does this.\"\r\r\t| list num |\r\tlist _ OrderedCollection new.\r\tself selectorsDo: [:aSel | \r\t\tnum _ aSel count: [:char | char == $:].\r\t\tnum = 0 ifTrue: [aSel last isLetter ifFalse: [num _ 1]].\r\t\tnum = numberOfArgs ifTrue: [list add: aSel]].\r\t^ list! !\r\r!Behavior methodsFor: 'accessing method dictionary' stamp: 'di 2/17/2000 22:40'!\rsourceCodeAt: selector\r\r\t^ (self methodDict at: selector) getSourceFor: selector in: self! !\r\r!Behavior methodsFor: 'accessing method dictionary' stamp: 'di 2/17/2000 22:40'!\rsourceCodeAt: selector ifAbsent: aBlock\r\r\t^ (self methodDict at: selector ifAbsent: [^ aBlock value]) getSourceFor: selector in: self! !\r\r!Behavior methodsFor: 'accessing method dictionary'!\rsourceMethodAt: selector \r\t\"Answer the paragraph corresponding to the source code for the \r\targument.\"\r\r\t^(self sourceCodeAt: selector) asText makeSelectorBoldIn: self! !\r\r!Behavior methodsFor: 'accessing method dictionary' stamp: 'sw 11/3/97 00:10'!\rsourceMethodAt: selector ifAbsent: aBlock\r\t\"Answer the paragraph corresponding to the source code for the \r\targument.\"\r\r\t^ (self sourceCodeAt: selector ifAbsent: [^ aBlock value]) asText makeSelectorBoldIn: self! !\r\r!Behavior methodsFor: 'accessing method dictionary' stamp: 'ar 12/27/2001 22:29'!\rstandardMethodHeaderFor: aSelector\r\t| args |\r\targs _ (1 to: aSelector numArgs)\tcollect:[:i| 'arg', i printString].\r\targs size = 0 ifTrue:[^aSelector asString].\r\targs size = 1 ifTrue:[^aSelector,' arg1'].\r\t^String streamContents:[:s|\r\t\t(aSelector findTokens:':') with: args do:[:tok :arg|\r\t\t\ts nextPutAll: tok; nextPutAll:': '; nextPutAll: arg; nextPutAll:' '.\r\t\t].\r\t].\r! !\r\r!Behavior methodsFor: 'accessing method dictionary'!\rsupermostPrecodeCommentFor: selector \r\t\"Answer a string representing the precode comment in the most distant \r\tsuperclass's implementation of the selector. Return nil if none found.\"\r\t| aSuper superComment |\r\t(self == Behavior\r\t\t\tor: [superclass == nil\r\t\t\t\t\tor: [(aSuper _ superclass whichClassIncludesSelector: selector) == nil]])\r\t\tifFalse: [\"There is a super implementor\"\r\t\t\tsuperComment _ aSuper supermostPrecodeCommentFor: selector].\r\t^ superComment\r\t\tifNil: [self firstPrecodeCommentFor: selector\r\t\t\t\"ActorState supermostPrecodeCommentFor: #printOn:\"]! !\r\r!Behavior methodsFor: 'accessing method dictionary' stamp: 'sd 2/1/2004 19:41'!\rzapAllMethods\r\t\"Remove all methods in this class which is assumed to be obsolete\"\r\r\tmethodDict _ MethodDictionary new.\r\tself class isMeta ifTrue: [self class zapAllMethods]! !\r\r\r!Behavior methodsFor: 'accessing instances and variables'!\rallClassVarNames\r\t\"Answer a Set of the names of the receiver's and the receiver's ancestor's \r\tclass variables.\"\r\r\t^superclass allClassVarNames! !\r\r!Behavior methodsFor: 'accessing instances and variables'!\rallInstVarNames\r\t\"Answer an Array of the names of the receiver's instance variables. The \r\tArray ordering is the order in which the variables are stored and \r\taccessed by the interpreter.\"\r\r\t| vars |\r\tsuperclass == nil\r\t\tifTrue: [vars _ self instVarNames copy]\t\"Guarantee a copy is answered.\"\r\t\tifFalse: [vars _ superclass allInstVarNames , self instVarNames].\r\t^vars! !\r\r!Behavior methodsFor: 'accessing instances and variables' stamp: 'jm 5/20/1998 15:53'!\rallInstances \r\t\"Answer a collection of all current instances of the receiver.\"\r\r\t| all |\r\tall _ OrderedCollection new.\r\tself allInstancesDo: [:x | x == all ifFalse: [all add: x]].\r\t^ all asArray\r! !\r\r!Behavior methodsFor: 'accessing instances and variables' stamp: 'tpr 5/30/2003 13:04'!\rallSharedPools\r\t\"Answer a Set of the names of the pools (Dictionaries or SharedPool subclasses) that the receiver and the receiver's ancestors share.\"\r\r\t^superclass allSharedPools! !\r\r!Behavior methodsFor: 'accessing instances and variables' stamp: 'di 6/20/97 10:51'!\rallSubInstances \r\t\"Answer a list of all current instances of the receiver and all of its subclasses.\"\r\t| aCollection |\r\taCollection _ OrderedCollection new.\r\tself allSubInstancesDo:\r\t\t[:x | x == aCollection ifFalse: [aCollection add: x]].\r\t^ aCollection! !\r\r!Behavior methodsFor: 'accessing instances and variables' stamp: 'ajh 10/17/2002 11:03'!\rallowsSubInstVars\r\t\"Classes that allow instances to change classes among its subclasses will want to override this and return false, so inst vars are not accidentally added to its subclasses.\"\r\r\t^ true! !\r\r!Behavior methodsFor: 'accessing instances and variables'!\rclassVarNames\r\t\"Answer a Set of the receiver's class variable names.\"\r\r\t^Set new! !\r\r!Behavior methodsFor: 'accessing instances and variables' stamp: 'sw 5/21/2001 22:51'!\rinspectAllInstances \r\t\"Inpsect all instances of the receiver.  1/26/96 sw\"\r\r\t| all allSize prefix |\r\tall _ self allInstances.\r\t(allSize _ all size) == 0 ifTrue: [^ self inform: 'There are no \rinstances of ', self name].\r\tprefix _ allSize == 1\r\t\tifTrue: \t['The lone instance']\r\t\tifFalse:\t['The ', allSize printString, ' instances'].\r\t\r\tall asArray inspectWithLabel: (prefix, ' of ', self name)! !\r\r!Behavior methodsFor: 'accessing instances and variables' stamp: 'sw 5/21/2001 22:51'!\rinspectSubInstances \r\t\"Inspect all instances of the receiver and all its subclasses.  CAUTION - don't do this for something as generic as Object!!  1/26/96 sw\"\r\r\t| all allSize prefix |\r\tall _ self allSubInstances.\r\t(allSize _ all size) == 0 ifTrue: [^ self inform: 'There are no \rinstances of ', self name, '\ror any of its subclasses'].\r\tprefix _ allSize == 1\r\t\tifTrue: \t['The lone instance']\r\t\tifFalse:\t['The ', allSize printString, ' instances'].\r\t\r\tall asArray inspectWithLabel: (prefix, ' of ', self name, ' & its subclasses')! !\r\r!Behavior methodsFor: 'accessing instances and variables'!\rinstVarNames\r\t\"Answer an Array of the instance variable names. Behaviors must make \r\tup fake local instance variable names because Behaviors have instance \r\tvariables for the purpose of compiling methods, but these are not named \r\tinstance variables.\"\r\r\t| mySize superSize |\r\tmySize _ self instSize.\r\tsuperSize _ \r\t\tsuperclass == nil\r\t\t\tifTrue: [0]\r\t\t\tifFalse: [superclass instSize].\r\tmySize = superSize ifTrue: [^#()].\t\r\t^(superSize + 1 to: mySize) collect: [:i | 'inst' , i printString]! !\r\r!Behavior methodsFor: 'accessing instances and variables'!\rinstanceCount\r\t\"Answer the number of instances of the receiver that are currently in \r\tuse.\"\r\r\t| count |\r\tcount _ 0.\r\tself allInstancesDo: [:x | count _ count + 1].\r\t^count! !\r\r!Behavior methodsFor: 'accessing instances and variables'!\rsharedPools\r\t\"Answer a Set of the names of the pools (Dictionaries) that the receiver \r\tshares.\r\t9/12/96 tk  sharedPools have an order now\"\r\r\t^ OrderedCollection new! !\r\r!Behavior methodsFor: 'accessing instances and variables'!\rsomeInstance\r\t\"Primitive. Answer the first instance in the enumeration of all instances \r\tof the receiver. Fails if there are none. Essential. See Object \r\tdocumentation whatIsAPrimitive.\"\r\r\t<primitive: 77>\r\t^nil! !\r\r!Behavior methodsFor: 'accessing instances and variables'!\rsubclassInstVarNames\r\t\"Answer a Set of the names of the receiver's subclasses' instance \r\tvariables.\"\r\t| vars |\r\tvars _ Set new.\r\tself allSubclasses do: [:aSubclass | vars addAll: aSubclass instVarNames].\r\t^vars! !\r\r\r!Behavior methodsFor: 'testing class hierarchy' stamp: 'ar 3/12/98 12:36'!\rincludesBehavior: aClass\r\t^self == aClass or:[self inheritsFrom: aClass]! !\r\r!Behavior methodsFor: 'testing class hierarchy'!\rinheritsFrom: aClass \r\t\"Answer whether the argument, aClass, is on the receiver's superclass \r\tchain.\"\r\r\t| aSuperclass |\r\taSuperclass _ superclass.\r\t[aSuperclass == nil]\r\t\twhileFalse: \r\t\t\t[aSuperclass == aClass ifTrue: [^true].\r\t\t\taSuperclass _ aSuperclass superclass].\r\t^false! !\r\r!Behavior methodsFor: 'testing class hierarchy'!\rkindOfSubclass\r\t\"Answer a String that is the keyword that describes the receiver's kind \r\tof subclass, either a regular subclass, a variableSubclass, a  \r\tvariableByteSubclass, a variableWordSubclass, or a weakSubclass.\"\r\tself isWeak\r\t\tifTrue: [^ ' weakSubclass: '].\r\t^ self isVariable\r\t\tifTrue: [self isBits\r\t\t\t\tifTrue: [self isBytes\r\t\t\t\t\t\tifTrue: [ ' variableByteSubclass: ']\r\t\t\t\t\t\tifFalse: [ ' variableWordSubclass: ']]\r\t\t\t\tifFalse: [ ' variableSubclass: ']]\r\t\tifFalse: [ ' subclass: ']! !\r\r\r!Behavior methodsFor: 'testing method dictionary' stamp: 'ar 5/17/2003 14:06'!\rbindingOf: varName\r\t\"Answer the binding of some variable resolved in the scope of the receiver\"\r\t^superclass bindingOf: varName! !\r\r!Behavior methodsFor: 'testing method dictionary'!\rcanUnderstand: selector \r\t\"Answer whether the receiver can respond to the message whose selector \r\tis the argument. The selector can be in the method dictionary of the \r\treceiver's class or any of its superclasses.\"\r\r\t(self includesSelector: selector) ifTrue: [^true].\r\tsuperclass == nil ifTrue: [^false].\r\t^superclass canUnderstand: selector! !\r\r!Behavior methodsFor: 'testing method dictionary' stamp: 'ar 5/18/2003 18:13'!\rclassBindingOf: varName\r\t\"Answer the binding of some variable resolved in the scope of the receiver's class\"\r\t^self bindingOf: varName! !\r\r!Behavior methodsFor: 'testing method dictionary' stamp: 'di 2/17/2000 22:40'!\rhasMethods\r\t\"Answer whether the receiver has any methods in its method dictionary.\"\r\r\t^ self methodDict size > 0! !\r\r!Behavior methodsFor: 'testing method dictionary' stamp: 'di 3/27/1999 23:20'!\rincludesSelector: aSymbol \r\t\"Answer whether the message whose selector is the argument is in the \r\tmethod dictionary of the receiver's class.\"\r\r\t^ self methodDict includesKey: aSymbol! !\r\r!Behavior methodsFor: 'testing method dictionary' stamp: 'ar 5/17/2003 14:20'!\rscopeHas: varName ifTrue: aBlock\r\t\"Obsolete. Kept around for possible spurios senders which we don't know about\"\r\t(self bindingOf: varName) ifNotNilDo:[:binding|\r\t\taBlock value: binding.\r\t\t^true].\r\t^false! !\r\r!Behavior methodsFor: 'testing method dictionary' stamp: 'ar 8/16/2001 13:31'!\rthoroughWhichSelectorsReferTo: literal special: specialFlag byte: specialByte\r\t\"Answer a set of selectors whose methods access the argument as a \r\tliteral. Dives into the compact literal notation, making it slow but \r\tthorough \"\r\r\t| who |\r\twho _ Set new.\r\tself selectorsAndMethodsDo:\r\t\t[:sel :method |\r\t\t((method hasLiteralThorough: literal) or: [specialFlag and: [method scanFor: specialByte]])\r\t\t\tifTrue:\r\t\t\t\t[((literal isVariableBinding) not\r\t\t\t\t\tor: [method sendsToSuper not\r\t\t\t\t\tor: [method literals allButLast includes: literal]])\r\t\t\t\t\t\tifTrue: [who add: sel]]].\r\t^ who! !\r\r!Behavior methodsFor: 'testing method dictionary'!\rwhichClassIncludesSelector: aSymbol \r\t\"Answer the class on the receiver's superclass chain where the \r\targument, aSymbol (a message selector), will be found. Answer nil if none found.\"\r\t\"Rectangle whichClassIncludesSelector: #inspect.\"\r\t(self includesSelector: aSymbol)\r\t\tifTrue: [^ self].\r\tsuperclass == nil\r\t\tifTrue: [^ nil].\r\t^ superclass whichClassIncludesSelector: aSymbol! !\r\r!Behavior methodsFor: 'testing method dictionary' stamp: 'di 2/17/2000 22:40'!\rwhichSelectorsAccess: instVarName \r\t\"Answer a Set of selectors whose methods access the argument, \r\tinstVarName, as a named instance variable.\"\r\r\t| instVarIndex |\r\tinstVarIndex _ self allInstVarNames indexOf: instVarName ifAbsent: [^Set new].\r\t^ self methodDict keys select: \r\t\t[:sel | \r\t\t((self methodDict at: sel)\r\t\t\treadsField: instVarIndex)\r\t\t\tor: [(self methodDict at: sel) writesField: instVarIndex]]\r\r\t\"Point whichSelectorsAccess: 'x'.\"! !\r\r!Behavior methodsFor: 'testing method dictionary' stamp: 'sd 3/28/2003 15:07'!\rwhichSelectorsReferTo: literal \r\t\"Answer a Set of selectors whose methods access the argument as a\rliteral.\"\r\r\t| special byte |\r\tspecial _ self environment hasSpecialSelector: literal ifTrueSetByte: [:b |\rbyte _ b].\r\t^self whichSelectorsReferTo: literal special: special byte: byte\r\r\t\"Rectangle whichSelectorsReferTo: #+.\"! !\r\r!Behavior methodsFor: 'testing method dictionary' stamp: 'ar 8/16/2001 13:31'!\rwhichSelectorsReferTo: literal special: specialFlag byte: specialByte\r\t\"Answer a set of selectors whose methods access the argument as a literal.\"\r\r\t| who |\r\twho _ Set new.\r\tself selectorsAndMethodsDo: \r\t\t[:sel :method |\r\t\t((method hasLiteral: literal) or: [specialFlag and: [method scanFor: specialByte]])\r\t\t\tifTrue:\r\t\t\t\t[((literal isVariableBinding) not\r\t\t\t\t\tor: [method sendsToSuper not\r\t\t\t\t\tor: [method literals allButLast includes: literal]])\r\t\t\t\t\t\tifTrue: [who add: sel]]].\r\t^ who! !\r\r!Behavior methodsFor: 'testing method dictionary' stamp: 'di 2/17/2000 22:39'!\rwhichSelectorsStoreInto: instVarName \r\t\"Answer a Set of selectors whose methods access the argument, \r\tinstVarName, as a named instance variable.\"\r\t| instVarIndex |\r\tinstVarIndex _ self allInstVarNames indexOf: instVarName ifAbsent: [^Set new].\r\t^ self methodDict keys select: \r\t\t[:sel | (self methodDict at: sel) writesField: instVarIndex]\r\r\t\"Point whichSelectorsStoreInto: 'x'.\"! !\r\r\r!Behavior methodsFor: 'enumerating'!\rallInstancesDo: aBlock \r\t\"Evaluate the argument, aBlock, for each of the current instances of the \r\treceiver.\"\r\t| inst next |\r\tself ==  UndefinedObject ifTrue: [^ aBlock value: nil].\r\tinst _ self someInstance.\r\t[inst == nil]\r\t\twhileFalse:\r\t\t[aBlock value: inst.\r\t\tinst _ inst nextInstance]! !\r\r!Behavior methodsFor: 'enumerating' stamp: 'di 6/20/97 10:50'!\rallSubInstancesDo: aBlock \r\t\"Evaluate the argument, aBlock, for each of the current instances of the \r\treceiver and all its subclasses.\"\r\r\tself allInstancesDo: aBlock.\r\tself allSubclassesDo: [:sub | sub allInstancesDo: aBlock]! !\r\r!Behavior methodsFor: 'enumerating'!\rallSubclassesDo: aBlock \r\t\"Evaluate the argument, aBlock, for each of the receiver's subclasses.\"\r\r\tself subclassesDo: \r\t\t[:cl | \r\t\taBlock value: cl.\r\t\tcl allSubclassesDo: aBlock]! !\r\r!Behavior methodsFor: 'enumerating' stamp: 'tk 8/18/1999 17:38'!\rallSubclassesDoGently: aBlock \r\t\"Evaluate the argument, aBlock, for each of the receiver's subclasses.\"\r\r\tself subclassesDoGently: \r\t\t[:cl | \r\t\tcl isInMemory ifTrue: [\r\t\t\taBlock value: cl.\r\t\t\tcl allSubclassesDoGently: aBlock]]! !\r\r!Behavior methodsFor: 'enumerating'!\rallSuperclassesDo: aBlock \r\t\"Evaluate the argument, aBlock, for each of the receiver's superclasses.\"\r\r\tsuperclass == nil\r\t\tifFalse: [aBlock value: superclass.\r\t\t\t\tsuperclass allSuperclassesDo: aBlock]! !\r\r!Behavior methodsFor: 'enumerating'!\rwithAllSubclassesDo: aBlock \r\t\"Evaluate the argument, aBlock, for the receiver and each of its \r\tsubclasses.\"\r\r\taBlock value: self.\r\tself allSubclassesDo: aBlock! !\r\r!Behavior methodsFor: 'enumerating' stamp: 'nk 2/14/2001 12:09'!\rwithAllSuperAndSubclassesDoGently: aBlock\r\tself allSuperclassesDo: aBlock.\r\taBlock value: self.\r\tself allSubclassesDoGently: aBlock! !\r\r!Behavior methodsFor: 'enumerating' stamp: 'ar 7/11/1999 04:21'!\rwithAllSuperclassesDo: aBlock \r\t\"Evaluate the argument, aBlock, for each of the receiver's superclasses.\"\r\taBlock value: self.\r\tsuperclass == nil\r\t\tifFalse: [superclass withAllSuperclassesDo: aBlock]! !\r\r\r!Behavior methodsFor: 'user interface' stamp: 'sd 3/28/2003 15:05'!\rallLocalCallsOn: aSymbol\r\t\"Answer a SortedCollection of all the methods that call on aSymbol, anywhere in my class hierarchy.\"\r\r\t| aSet special byte cls |\r\taSet _ Set new.\r\tcls _ self theNonMetaClass.\r\tspecial _ self environment hasSpecialSelector: aSymbol\r\t\t\t\t\tifTrueSetByte: [:b | byte _ b ].\r\tcls withAllSuperAndSubclassesDoGently: [ :class |\r\t\t(class whichSelectorsReferTo: aSymbol special: special byte: byte)\r\t\t\tdo: [:sel |\r\t\t\t\tsel ~~ #DoIt ifTrue: [aSet add: class name , ' ', sel]]].\r\tcls class withAllSuperAndSubclassesDoGently: [ :class |\r\t\t(class whichSelectorsReferTo: aSymbol special: special byte: byte)\r\t\t\tdo: [:sel |\r\t\t\t\tsel ~~ #DoIt ifTrue: [aSet add: class name , ' ', sel]]].\r\t^aSet! !\r\r!Behavior methodsFor: 'user interface' stamp: 'sw 4/4/2000 11:22'!\rallUnreferencedInstanceVariables\r\t\"Return a list of the instance variables known to the receiver which are not referenced in the receiver or any of its subclasses OR superclasses\"\r\r\t| any definingClass |\r\r\t^ self allInstVarNames copy reject:\r\t\t[:ivn | any _ false.\r\t\tdefiningClass _ self classThatDefinesInstanceVariable: ivn.\r\t\tdefiningClass withAllSubclasses do:\r\t\t\t[:class |  any ifFalse:\r\t\t\t\t[(class whichSelectorsAccess: ivn asSymbol) do: \r\t\t\t\t\t[:sel | sel ~~ #DoIt ifTrue: [any _ true]]]].\r\t\t\tany]! !\r\r!Behavior methodsFor: 'user interface' stamp: 'RAA 5/28/2001 12:00'!\rwithAllSubAndSuperclassesDo: aBlock\r\r\tself withAllSubclassesDo: aBlock.\r\tself allSuperclassesDo: aBlock.\r! !\r\r\r!Behavior methodsFor: 'private' stamp: 'NS 1/28/2004 13:59'!\rbasicCompile: code notifying: requestor trailer: bytes ifFail: failBlock\r\t\"Compile code without logging the source in the changes file\"\r\r\t| methodNode |\r\tmethodNode _ self compilerClass new\r\t\t\t\tcompile: code\r\t\t\t\tin: self\r\t\t\t\tnotifying: requestor\r\t\t\t\tifFail: failBlock.\r\tmethodNode encoder requestor: requestor.\r\t^ CompiledMethodWithNode generateMethodFromNode: methodNode trailer: bytes.! !\r\r!Behavior methodsFor: 'private' stamp: 'NS 1/28/2004 10:29'!\rbasicRemoveSelector: selector \r\t\"Assuming that the argument, selector (a Symbol), is a message selector \r\tin my method dictionary, remove it and its method.\"\r\r\t| oldMethod |\r\toldMethod _ self methodDict at: selector ifAbsent: [^ self].\r\tself methodDict removeKey: selector.\r\r\t\"Now flush Squeak's method cache, either by selector or by method\"\r\toldMethod flushCache.\r\tselector flushCache.! !\r\r!Behavior methodsFor: 'private' stamp: 'sd 3/28/2003 15:06'!\rbecomeCompact\r\t\"Here are the restrictions on compact classes in order for export segments to work:  A compact class index may not be reused.  If a class was compact in a release of Squeak, no other class may use that index.  The class might not be compact later, and there should be nil in its place in the array.\"\r\t| cct index |\r\r\tself isWeak ifTrue:[^ self halt: 'You must not make a weak class compact'].\r\tcct _ self environment compactClassesArray.\r\t(self indexIfCompact > 0 or: [cct includes: self])\r\t\tifTrue: [^ self halt: self name , 'is already compact'].\r\tindex _ cct indexOf: nil\r\t\tifAbsent: [^ self halt: 'compact class table is full'].\r\t\"Install this class in the compact class table\"\r\tcct at: index put: self.\r\t\"Update instspec so future instances will be compact\"\r\tformat _ format + (index bitShift: 11).\r\t\"Make up new instances and become old ones into them\"\r\tself updateInstancesFrom: self.\r\t\"Purge any old instances\"\r\tSmalltalk garbageCollect.! !\r\r!Behavior methodsFor: 'private' stamp: 'sd 3/28/2003 15:06'!\rbecomeUncompact\r\t| cct index |\r\tcct _ self environment compactClassesArray.\r\t(index _ self indexIfCompact) = 0\r\t\tifTrue: [^ self].\r\t(cct includes: self)\r\t\tifFalse: [^ self halt  \"inconsistent state\"].\r\t\"Update instspec so future instances will not be compact\"\r\tformat _ format - (index bitShift: 11).\r\t\"Make up new instances and become old ones into them\"\r\tself updateInstancesFrom: self.\r\t\"Make sure there are no compact ones left around\"\r\tSmalltalk garbageCollect.\r\t\"Remove this class from the compact class table\"\r\tcct at: index put: nil.\r! !\r\r!Behavior methodsFor: 'private'!\rflushCache\r\t\"Tell the interpreter to remove the contents of its method lookup cache, if it has \r\tone.  Essential.  See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 89>\r\tself primitiveFailed! !\r\r!Behavior methodsFor: 'private'!\rindexIfCompact\r\t\"If these 5 bits are non-zero, then instances of this class\r\twill be compact.  It is crucial that there be an entry in\r\tSmalltalk compactClassesArray for any class so optimized.\r\tSee the msgs becomeCompact and becomeUncompact.\"\r\t^ (format bitShift: -11) bitAnd: 16r1F\r\"\rSmalltalk compactClassesArray doWithIndex: \r\t[:c :i | c == nil ifFalse:\r\t\t[c indexIfCompact = i ifFalse: [self halt]]]\r\"! !\r\r\r!Behavior methodsFor: 'system startup' stamp: 'ar 11/16/1999 20:15'!\rshutDown\r\t\"This message is sent on system shutdown to registered classes\"\r! !\r\r!Behavior methodsFor: 'system startup' stamp: 'ar 11/16/1999 20:15'!\rshutDown: quitting\r\t\"This message is sent on system shutdown to registered classes\"\r\t^self shutDown.! !\r\r!Behavior methodsFor: 'system startup' stamp: 'ar 11/16/1999 20:15'!\rstartUp\r\t\"This message is sent to registered classes when the system is coming up.\"\r! !\r\r!Behavior methodsFor: 'system startup' stamp: 'ar 11/16/1999 20:15'!\rstartUp: resuming\r\t\"This message is sent to registered classes when the system is coming up.\"\r\t^self startUp! !\r\r\r!Behavior methodsFor: 'obsolete subclasses' stamp: 'ar 3/2/2001 00:58'!\raddObsoleteSubclass: aClass\r\t\"Weakly remember that aClass was a subclass of the receiver and is now obsolete\"\r\t| obs |\r\tObsoleteSubclasses finalizeValues. \"clean up if need be\"\r\tobs _ ObsoleteSubclasses at: self ifAbsent:[WeakArray new].\r\t(obs includes: aClass) ifTrue:[^self].\r\tobs _ obs copyWithout: nil.\r\tobs _ obs copyWith: aClass.\r\tObsoleteSubclasses at: self put: obs.\r! !\r\r!Behavior methodsFor: 'obsolete subclasses' stamp: 'ar 3/2/2001 00:58'!\robsoleteSubclasses\r\t\"Return all the weakly remembered obsolete subclasses of the receiver\"\r\t| obs |\r\tObsoleteSubclasses finalizeValues. \"clean up if need be\"\r\tobs _ ObsoleteSubclasses at: self ifAbsent:[^#()].\r\tobs _ obs copyWithout: nil.\r\tobs isEmpty\r\t\tifTrue:[ObsoleteSubclasses removeKey: self ifAbsent:[]]\r\t\tifFalse:[ObsoleteSubclasses at: self put: obs].\r\t^obs! !\r\r!Behavior methodsFor: 'obsolete subclasses' stamp: 'NS 2/19/2002 11:16'!\rremoveObsoleteSubclass: aClass\r\t\"Remove aClass from the weakly remembered obsolete subclasses\"\r\t| obs |\r\tObsoleteSubclasses finalizeValues. \"clean up if need be\"\r\tobs _ ObsoleteSubclasses at: self ifAbsent:[^ self].\r\t(obs includes: aClass) ifFalse:[^self].\r\tobs _ obs copyWithout: aClass.\r\tobs _ obs copyWithout: nil.\r\tobs isEmpty\r\t\tifTrue: [ObsoleteSubclasses removeKey: self ifAbsent: []]\r\t\tifFalse: [ObsoleteSubclasses at: self put: obs].! !\r\r\r!Behavior methodsFor: 'deprecated' stamp: 'NS 1/28/2004 11:29'!\rremoveSelectorSimply: selector \r\t\"Assuming that the argument, selector (a Symbol), is a message selector \r\tin my method dictionary, remove it and its method.\"\r\r\t| oldMethod |\r\tself deprecated: 'Use basicRemoveSelector: instead.'.\r\toldMethod _ self methodDict at: selector ifAbsent: [^ self].\r\tself methodDict removeKey: selector.\r\r\t\"Now flush Squeak's method cache, either by selector or by method\"\r\toldMethod flushCache.\r\tselector flushCache.! !\r\r\r!Behavior methodsFor: '*system-support' stamp: 'tpr 12/17/2003 16:04'!\rallCallsOn\r\t\"Answer a SortedCollection of all the methods that refer to me by name or as part of an association in a global dict.\"\r\r\r\t^ (self  systemNavigation allCallsOn:  (self environment associationAt: self theNonMetaClass name)), (self  systemNavigation allCallsOn:  self theNonMetaClass name)\t! !\r\r!Behavior methodsFor: '*system-support' stamp: 'dvf 8/23/2003 12:43'!\rallCallsOn: aSymbol\r\t\"Answer a SortedCollection of all the methods that call on aSymbol.\"\r\r\r\t^ self  systemNavigation allCallsOn: aSymbol from: self .\r\t! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rBehavior class\r\tinstanceVariableNames: ''!\r\r!Behavior class methodsFor: 'testing' stamp: 'ar 9/10/1999 17:28'!\rcanZapMethodDictionary\r\t\"Return false since zapping the method dictionary of Behavior class or its subclasses will cause the system to fail.\"\r\t^false! !\r\r\r!Behavior class methodsFor: 'class initialization' stamp: 'ar 3/3/2001 00:30'!\rflushObsoleteSubclasses\r\t\"Behavior flushObsoleteSubclasses\"\r\tObsoleteSubclasses keys \"need a copy\" \r\t\tdo:[:obs| obs ifNotNil:[obs obsoleteSubclasses]]. \"remove themselves\"\r\tObsoleteSubclasses finalizeValues.! !\r\r!Behavior class methodsFor: 'class initialization' stamp: 'ar 3/2/2001 00:47'!\rinitialize\t\"Behavior initialize\"\r\t\"Never called for real\"\r\tObsoleteSubclasses ifNil:[self initializeObsoleteSubclasses].! !\r\r!Behavior class methodsFor: 'class initialization' stamp: 'ar 3/2/2001 00:48'!\rinitializeObsoleteSubclasses\r\tObsoleteSubclasses _ WeakIdentityKeyDictionary new.! !\rObject subclass: #BitBlt\r\tinstanceVariableNames: 'destForm sourceForm halftoneForm combinationRule destX destY width height sourceX sourceY clipX clipY clipWidth clipHeight colorMap'\r\tclassVariableNames: 'CachedFontColorMaps'\r\tpoolDictionaries: ''\r\tcategory: 'Graphics-Primitives'!\r!BitBlt commentStamp: '<historical>' prior: 0!\rI represent a block transfer (BLT) of pixels into a rectangle (destX, destY, width, height) of the destinationForm.  The source of pixels may be a similar rectangle (at sourceX, sourceY) in the sourceForm, or a constant color, currently called halftoneForm.  If both are specified, their pixel values are combined with a logical AND function prior to transfer.  In any case, the pixels from the source are combined with those of the destination by as specified by the combinationRule.\r\rThe combination rule whose value is 0 through 15 programs the transfer to produce 1 or 0 according to its 4-bit representation as follows:\r\t8:\tif source is 0 and destination is 0\r\t4:\tif source is 0 and destination is 1\r\t2:\tif source is 1 and destination is 0\r\t1:\tif source is 1 and destination is 1.\rAt each pixel the corresponding bits of the source and destination pixel values determine one of these conditions;  if the combination rule has a 1 in the corresponding bit position, then the new destination value will be 1, otherwise it will be zero.  Forms may be of different depths, see the comment in class Form.\r\rIn addition to the original 16 combination rules, this BitBlt supports\r\t16\tfails (to simulate paint bits)\r\t17\tfails (to simulate erase bits)\r\t18\tsourceWord + destinationWord\r\t19\tsourceWord - destinationWord\r\t20\trgbAdd: sourceWord with: destinationWord.  Sum of color components\r\t21\trgbSub: sourceWord with: destinationWord.  Difference of color components\r\t22\tOLDrgbDiff: sourceWord with: destinationWord.  Sum of abs of differences in components\r\t23\tOLDtallyIntoMap: destinationWord.  Tallies pixValues into a colorMap\r\t\t\tthese old versions don't do bitwise dest clipping.  Use 32 and 33 now.\r\t24\talphaBlend: sourceWord with: destinationWord.  32-bit source and dest only\r\t25\tpixPaint: sourceWord with: destinationWord.  Wherever the sourceForm is non-zero, it replaces the destination.  Can be used with a 1-bit source color mapped to (0, FFFFFFFF), and a fillColor to fill the dest with that color wherever the source is 1.\r\t26\tpixMask: sourceWord with: destinationWord.  Like pixPaint, but fills with 0.\r\t27\trgbMax: sourceWord with: destinationWord.  Max of each color component.\r\t28\trgbMin: sourceWord with: destinationWord.  Min of each color component.\r\t29\trgbMin: sourceWord bitInvert32 with: destinationWord.  Min with (max-source)\r\t30\talphaBlendConst: sourceWord with: destinationWord.  alpha is an arg. works in 16 bits.\r\t31\talphaPaintConst: sourceWord with: destinationWord.  alpha is an arg. works in 16 bits.\r\t32\trgbDiff: sourceWord with: destinationWord.  Sum of abs of differences in components\r\t33\ttallyIntoMap: destinationWord.  Tallies pixValues into a colorMap\r\t34\talphaBlendScaled: srcWord with: dstWord. Alpha blend of scaled srcWord and destWord.\r\rThe color specified by halftoneForm may be either a Color or a Pattern.   A Color is converted to a pixelValue for the depth of the destinationForm.  If a Pattern, BitBlt will simply interpret its bitmap as an array of Color pixelValues.  BitBlt aligns the first element of this array with the top scanline of the destinationForm, the second with the second, and so on, cycling through the color array as necessary.  Within each scan line the 32-bit value is repeated from left to right across the form.  If the value repeats on pixels boudaries, the effect will be a constant color;  if not, it will produce a halftone that repeats on 32-bit boundaries.\r\rAny transfer specified is further clipped by the specified rectangle (clipX, clipY, clipWidth, clipHeight), and also by the bounds of the source and destination forms.\r\tTo make a small Form repeat and fill a big form, use an InfiniteForm as the source.\r\tTo write on a form and leave with both transparent and opapue areas, use a MaskedForm as the source.\r\rPixels from a source to a destination whose pixels have a different depth are converted based on the optional colorMap.  If colorMap is nil, then conversion to more bits is done by filling the new high-order bits with zero, and conversion to fewer bits is done by truncating the lost high-order bits.  \r\rThe colorMap, if specified, must be a either word array (ie Bitmap) with 2^n elements, where n is the pixel depth of the source, or a fully specified ColorMap which may contain a lookup table (ie Bitmap) and/or four separate masks and shifts which are applied to the pixels. For every source pixel, BitBlt will first perform masking and shifting and then index the lookup table, and select the corresponding pixelValue and mask it to the destination pixel size before storing.\r\tWhen blitting from a 32 or 16 bit deep Form to one 8 bits or less, the default is truncation.  This will produce very strange colors, since truncation of the high bits does not produce the nearest encoded color.  Supply a 512 long colorMap, and red, green, and blue will be shifted down to 3 bits each, and mapped.  The message copybits...stdColors will use the best map to the standard colors for destinations of depths 8, 4, 2 and 1.  Two other sized of colorMaps are allowed, 4096 (4 bits per color) and 32786 (five bits per color).\r\tNormal blits between 16 and 32 bit forms truncates or pads the colors automatically to provide the best preservation of colors.\r\tColors can be remapped at the same depth.  Sometimes a Form is in terms of colors that are not the standard colors for this depth, for example in a GIF file.  Convert the Form to a MaskedForm and send colorMap: the list of colors that the picture is in terms of.  MaskedForm will use the colorMap when copying to the display or another Form. (Note also that a Form can be copied to itself, and transformed in the process, if a non-nil colorMap is supplied.)!\r\r\r!BitBlt methodsFor: 'accessing' stamp: 'ar 5/17/2000 18:58'!\rclipHeight\r\t^clipHeight! !\r\r!BitBlt methodsFor: 'accessing'!\rclipHeight: anInteger \r\t\"Set the receiver's clipping area height to be the argument, anInteger.\"\r\r\tclipHeight _ anInteger! !\r\r!BitBlt methodsFor: 'accessing'!\rclipRect\r\t\"Answer the receiver's clipping area rectangle.\"\r\r\t^clipX @ clipY extent: clipWidth @ clipHeight! !\r\r!BitBlt methodsFor: 'accessing' stamp: 'ar 10/4/2000 16:37'!\rclipRect: aRectangle \r\t\"Set the receiver's clipping area rectangle to be the argument, aRectangle.\"\r\r\tclipX _ aRectangle left truncated.\r\tclipY _ aRectangle top truncated.\r\tclipWidth _ aRectangle right truncated - clipX.\r\tclipHeight _ aRectangle bottom truncated - clipY.! !\r\r!BitBlt methodsFor: 'accessing' stamp: 'ar 5/17/2000 18:58'!\rclipWidth\r\t^clipWidth! !\r\r!BitBlt methodsFor: 'accessing'!\rclipWidth: anInteger \r\t\"Set the receiver's clipping area width to be the argument, anInteger.\"\r\r\tclipWidth _ anInteger! !\r\r!BitBlt methodsFor: 'accessing' stamp: 'ar 5/17/2000 18:58'!\rclipX\r\t^clipX! !\r\r!BitBlt methodsFor: 'accessing'!\rclipX: anInteger \r\t\"Set the receiver's clipping area top left x coordinate to be the argument, \r\tanInteger.\"\r\r\tclipX _ anInteger! !\r\r!BitBlt methodsFor: 'accessing' stamp: 'ar 5/17/2000 18:58'!\rclipY\r\t^clipY! !\r\r!BitBlt methodsFor: 'accessing'!\rclipY: anInteger \r\t\"Set the receiver's clipping area top left y coordinate to be the argument, \r\tanInteger.\"\r\r\tclipY _ anInteger! !\r\r!BitBlt methodsFor: 'accessing' stamp: 'tk 8/15/2001 10:56'!\rcolor\r\t\"Return the current fill color as a Color.  \r\t Gives the wrong answer if the halftoneForm is a complex pattern of more than one word.\"\r\r\thalftoneForm ifNil: [^ Color black].\r\t^ Color colorFromPixelValue: halftoneForm first depth: destForm depth! !\r\r!BitBlt methodsFor: 'accessing'!\rcolorMap\r\t^ colorMap! !\r\r!BitBlt methodsFor: 'accessing' stamp: 'ar 5/4/2001 15:45'!\rcolorMap: map\r\t\"See last part of BitBlt comment. 6/18/96 tk\"\r\tcolorMap _ map.! !\r\r!BitBlt methodsFor: 'accessing'!\rcombinationRule: anInteger \r\t\"Set the receiver's combination rule to be the argument, anInteger, a \r\tnumber in the range 0-15.\"\r\r\tcombinationRule _ anInteger! !\r\r!BitBlt methodsFor: 'accessing'!\rdestForm\r\t^ destForm! !\r\r!BitBlt methodsFor: 'accessing'!\rdestOrigin: aPoint \r\t\"Set the receiver's destination top left coordinates to be those of the \r\targument, aPoint.\"\r\r\tdestX _ aPoint x.\r\tdestY _ aPoint y! !\r\r!BitBlt methodsFor: 'accessing'!\rdestRect: aRectangle \r\t\"Set the receiver's destination form top left coordinates to be the origin of \r\tthe argument, aRectangle, and set the width and height of the receiver's \r\tdestination form to be the width and height of aRectangle.\"\r\r\tdestX _ aRectangle left.\r\tdestY _ aRectangle top.\r\twidth _ aRectangle width.\r\theight _ aRectangle height! !\r\r!BitBlt methodsFor: 'accessing'!\rdestX: anInteger \r\t\"Set the top left x coordinate of the receiver's destination form to be the \r\targument, anInteger.\"\r\r\tdestX _ anInteger! !\r\r!BitBlt methodsFor: 'accessing'!\rdestX: x destY: y width: w height: h\r\t\"Combined init message saves 3 sends from DisplayScanner\"\r\tdestX _ x.\r\tdestY _ y.\r\twidth _ w.\r\theight _ h.! !\r\r!BitBlt methodsFor: 'accessing'!\rdestY: anInteger \r\t\"Set the top left y coordinate of the receiver's destination form to be the \r\targument, anInteger.\"\r\r\tdestY _ anInteger! !\r\r!BitBlt methodsFor: 'accessing'!\rfillColor\r\t^ halftoneForm! !\r\r!BitBlt methodsFor: 'accessing' stamp: 'ar 5/14/2001 23:25'!\rfillColor: aColorOrPattern \r\t\"The destForm will be filled with this color or pattern of colors.  May be an old Color, a new type Color, a Bitmap (see BitBlt comment), a Pattern, or a Form.  6/18/96 tk\"\r\r\taColorOrPattern == nil ifTrue: [halftoneForm _ nil. ^ self].\r\tdestForm == nil ifTrue: [self error: 'Must set destForm first'].\r\thalftoneForm _ destForm bitPatternFor: aColorOrPattern ! !\r\r!BitBlt methodsFor: 'accessing'!\rheight: anInteger \r\t\"Set the receiver's destination form height to be the argument, anInteger.\"\r\r\theight _ anInteger! !\r\r!BitBlt methodsFor: 'accessing'!\rsourceForm: aForm \r\t\"Set the receiver's source form to be the argument, aForm.\"\r\r\tsourceForm _ aForm! !\r\r!BitBlt methodsFor: 'accessing'!\rsourceOrigin: aPoint \r\t\"Set the receiver's source form coordinates to be those of the argument, \r\taPoint.\"\r\r\tsourceX _ aPoint x.\r\tsourceY _ aPoint y! !\r\r!BitBlt methodsFor: 'accessing'!\rsourceRect: aRectangle \r\t\"Set the receiver's source form top left x and y, width and height to be \r\tthe top left coordinate and extent of the argument, aRectangle.\"\r\r\tsourceX _ aRectangle left.\r\tsourceY _ aRectangle top.\r\twidth _ aRectangle width.\r\theight _ aRectangle height! !\r\r!BitBlt methodsFor: 'accessing'!\rsourceX: anInteger \r\t\"Set the receiver's source form top left x to be the argument, anInteger.\"\r\r\tsourceX _ anInteger! !\r\r!BitBlt methodsFor: 'accessing'!\rsourceY: anInteger \r\t\"Set the receiver's source form top left y to be the argument, anInteger.\"\r\r\tsourceY _ anInteger! !\r\r!BitBlt methodsFor: 'accessing' stamp: 'ar 5/25/2000 19:39'!\rtallyMap: aBitmap\r\t\"Install the map used for tallying pixels\"\r\tcolorMap _ aBitmap! !\r\r!BitBlt methodsFor: 'accessing'!\rwidth: anInteger \r\t\"Set the receiver's destination form width to be the argument, anInteger.\"\r\r\twidth _ anInteger! !\r\r\r!BitBlt methodsFor: 'copying'!\rcopy: destRectangle from: sourcePt in: srcForm\r\t| destOrigin |\r\tsourceForm _ srcForm.\r\thalftoneForm _ nil.\r\tcombinationRule _ 3.  \"store\"\r\tdestOrigin _ destRectangle origin.\r\tdestX _ destOrigin x.\r\tdestY _ destOrigin y.\r\tsourceX _ sourcePt x.\r\tsourceY _ sourcePt y.\r\twidth _ destRectangle width.\r\theight _ destRectangle height.\r\tself copyBits! !\r\r!BitBlt methodsFor: 'copying' stamp: 'ar 5/14/2001 23:32'!\rcopy: destRectangle from: sourcePt in: srcForm fillColor: hf rule: rule\r\t\"Specify a Color to fill, not a Form. 6/18/96 tk\"  \r\t| destOrigin |\r\tsourceForm _ srcForm.\r\tself fillColor: hf.\t\"sets halftoneForm\"\r\tcombinationRule _ rule.\r\tdestOrigin _ destRectangle origin.\r\tdestX _ destOrigin x.\r\tdestY _ destOrigin y.\r\tsourceX _ sourcePt x.\r\tsourceY _ sourcePt y.\r\twidth _ destRectangle width.\r\theight _ destRectangle height.\r\tsrcForm == nil ifFalse:\r\t\t[colorMap _ srcForm colormapIfNeededFor: destForm].\r\t^ self copyBits! !\r\r!BitBlt methodsFor: 'copying' stamp: 'nk 4/17/2004 19:41'!\rcopyBits\r\t\"Primitive. Perform the movement of bits from the source form to the \r\tdestination form. Fail if any variables are not of the right type (Integer, \r\tFloat, or Form) or if the combination rule is not implemented. \r\tIn addition to the original 16 combination rules, this BitBlt supports\r\t16\tfail (to simulate paint)\r\t17\tfail (to simulate mask)\r\t18\tsourceWord + destinationWord\r\t19\tsourceWord - destinationWord\r\t20\trgbAdd: sourceWord with: destinationWord\r\t21\trgbSub: sourceWord with: destinationWord\r\t22\trgbDiff: sourceWord with: destinationWord\r\t23\ttallyIntoMap: destinationWord\r\t24\talphaBlend: sourceWord with: destinationWord\r\t25\tpixPaint: sourceWord with: destinationWord\r\t26\tpixMask: sourceWord with: destinationWord\r\t27\trgbMax: sourceWord with: destinationWord\r\t28\trgbMin: sourceWord with: destinationWord\r\t29\trgbMin: sourceWord bitInvert32 with: destinationWord\r\"\r\t<primitive: 'primitiveCopyBits' module: 'BitBltPlugin'>\r\r\t\"Check for compressed source, destination or halftone forms\"\r\t(combinationRule >= 30 and: [combinationRule <= 31]) ifTrue:\r\t\t[\"No alpha specified -- re-run with alpha = 1.0\"\r\t\t^ self copyBitsTranslucent: 255].\r\t((sourceForm isForm) and: [sourceForm unhibernate])\r\t\tifTrue: [^ self copyBits].\r\t((destForm isForm) and: [destForm unhibernate])\r\t\tifTrue: [^ self copyBits].\r\t((halftoneForm isForm) and: [halftoneForm unhibernate])\r\t\tifTrue: [^ self copyBits].\r\r\t\"Check for unimplmented rules\"\r\tcombinationRule = Form oldPaint ifTrue: [^ self paintBits].\r\tcombinationRule = Form oldErase1bitShape ifTrue: [^ self eraseBits].\r\r\t\"Check if BitBlt doesn't support full color maps\"\r\t(colorMap notNil and:[colorMap isColormap]) ifTrue:[\r\t\tcolorMap _ colorMap colors.\r\t\t^self copyBits].\r\t\"Check if clipping gots us way out of range\"\r\tself clipRange ifTrue:[^self copyBits].\r\r\tself error: 'Bad BitBlt arg (Fraction?); proceed to convert.'.\r\t\"Convert all numeric parameters to integers and try again.\"\r\tdestX _ destX asInteger.\r\tdestY _ destY asInteger.\r\twidth _ width asInteger.\r\theight _ height asInteger.\r\tsourceX _ sourceX asInteger.\r\tsourceY _ sourceY asInteger.\r\tclipX _ clipX asInteger.\r\tclipY _ clipY asInteger.\r\tclipWidth _ clipWidth asInteger.\r\tclipHeight _ clipHeight asInteger.\r\t^ self copyBitsAgain! !\r\r!BitBlt methodsFor: 'copying' stamp: 'nk 4/17/2004 19:42'!\rcopyBitsTranslucent: factor\r\t\"This entry point to BitBlt supplies an extra argument to specify translucency\r\tfor operations 30 and 31.  The argument must be an integer between 0 and 255.\"\r\r\t<primitive: 'primitiveCopyBits' module: 'BitBltPlugin'>\r\r\t\"Check for compressed source, destination or halftone forms\"\r\t((sourceForm isForm) and: [sourceForm unhibernate])\r\t\tifTrue: [^ self copyBitsTranslucent: factor].\r\t((destForm isForm) and: [destForm unhibernate])\r\t\tifTrue: [^ self copyBitsTranslucent: factor].\r\t((halftoneForm isForm) and: [halftoneForm unhibernate])\r\t\tifTrue: [^ self copyBitsTranslucent: factor].\r\r\tself primitiveFailed  \"Later do nicer error recovery -- share copyBits recovery\"! !\r\r!BitBlt methodsFor: 'copying' stamp: 'ar 5/14/2001 23:32'!\rcopyForm: srcForm to: destPt rule: rule\r\t^ self copyForm: srcForm to: destPt rule: rule\r\t\tcolorMap: (srcForm colormapIfNeededFor: destForm)! !\r\r!BitBlt methodsFor: 'copying' stamp: 'di 7/17/97 10:04'!\rcopyForm: srcForm to: destPt rule: rule colorMap: map\r\tsourceForm _ srcForm.\r\thalftoneForm _ nil.\r\tcombinationRule _ rule.\r\tdestX _ destPt x + sourceForm offset x.\r\tdestY _ destPt y + sourceForm offset y.\r\tsourceX _ 0.\r\tsourceY _ 0.\r\twidth _ sourceForm width.\r\theight _ sourceForm height.\r\tcolorMap _ map.\r\tself copyBits! !\r\r!BitBlt methodsFor: 'copying'!\rcopyForm: srcForm to: destPt rule: rule fillColor: color\r\tsourceForm _ srcForm.\r\tself fillColor: color.\t\"sets halftoneForm\"\r\tcombinationRule _ rule.\r\tdestX _ destPt x + sourceForm offset x.\r\tdestY _ destPt y + sourceForm offset y.\r\tsourceX _ 0.\r\tsourceY _ 0.\r\twidth _ sourceForm width.\r\theight _ sourceForm height.\r\tself copyBits! !\r\r!BitBlt methodsFor: 'copying' stamp: 'ar 5/14/2001 23:32'!\rcopyFrom: sourceRectangle in: srcForm to: destPt\r\t| sourceOrigin |\r\tsourceForm _ srcForm.\r\thalftoneForm _ nil.\r\tcombinationRule _ 3.  \"store\"\r\tdestX _ destPt x.\r\tdestY _ destPt y.\r\tsourceOrigin _ sourceRectangle origin.\r\tsourceX _ sourceOrigin x.\r\tsourceY _ sourceOrigin y.\r\twidth _ sourceRectangle width.\r\theight _ sourceRectangle height.\r\tcolorMap _ srcForm colormapIfNeededFor: destForm.\r\tself copyBits! !\r\r!BitBlt methodsFor: 'copying' stamp: 'RAA 9/27/2000 16:48'!\rdisplayString: aString from: startIndex to: stopIndex at: aPoint strikeFont: font kern: kernDelta\r\r\tdestY _ aPoint y.\r\tdestX _ aPoint x.\r\r\t\"the following are not really needed, but theBitBlt primitive will fail if not set\"\r\tsourceX ifNil: [sourceX _ 100].\r\twidth ifNil: [width _ 100].\r\r\t^self primDisplayString: aString from: startIndex to: stopIndex\r\t\t\tmap: font characterToGlyphMap xTable: font xTable\r\t\t\tkern: kernDelta.! !\r\r!BitBlt methodsFor: 'copying'!\rfill: destRect fillColor: grayForm rule: rule\r\t\"Fill with a Color, not a Form. 6/18/96 tk\"\r\tsourceForm _ nil.\r\tself fillColor: grayForm.\t\t\"sets halftoneForm\"\r\tcombinationRule _ rule.\r\tdestX _ destRect left.\r\tdestY _ destRect top.\r\tsourceX _ 0.\r\tsourceY _ 0.\r\twidth _ destRect width.\r\theight _ destRect height.\r\tself copyBits! !\r\r!BitBlt methodsFor: 'copying' stamp: 'ar 3/1/2004 13:49'!\rpixelAt: aPoint\r\t\"Assumes this BitBlt has been set up specially (see the init message,\r\tBitBlt bitPeekerFromForm:.  Returns the pixel at aPoint.\"\r\tsourceX _ aPoint x.\r\tsourceY _ aPoint y.\r\tdestForm unhibernate. \"before poking\"\r\tdestForm bits at: 1 put: 0.  \"Just to be sure\"\r\tself copyBits.\r\t^ destForm bits at: 1! !\r\r!BitBlt methodsFor: 'copying' stamp: 'ar 3/1/2004 13:49'!\rpixelAt: aPoint put: pixelValue\r\t\"Assumes this BitBlt has been set up specially (see the init message,\r\tBitBlt bitPokerToForm:.  Overwrites the pixel at aPoint.\"\r\tdestX _ aPoint x.\r\tdestY _ aPoint y.\r\tsourceForm unhibernate. \"before poking\"\r\tsourceForm bits at: 1 put: pixelValue.\r\tself copyBits\r\"\r| bb |\rbb _ (BitBlt bitPokerToForm: Display).\r[Sensor anyButtonPressed] whileFalse:\r\t[bb pixelAt: Sensor cursorPoint put: 55]\r\"! !\r\r\r!BitBlt methodsFor: 'line drawing'!\rdrawFrom: startPoint to: stopPoint \r\t\r\t ^ self drawFrom: startPoint to: stopPoint withFirstPoint: true! !\r\r!BitBlt methodsFor: 'line drawing' stamp: '6/8/97 15:41 di'!\rdrawFrom: startPoint to: stopPoint withFirstPoint: drawFirstPoint\r\t\"Draw a line whose end points are startPoint and stopPoint.\r\tThe line is formed by repeatedly calling copyBits at every\r\tpoint along the line.  If drawFirstPoint is false, then omit\r\tthe first point so as not to overstrike at line junctions.\"\r\t| offset point1 point2 forwards |\r\t\"Always draw down, or at least left-to-right\"\r\tforwards _ (startPoint y = stopPoint y and: [startPoint x < stopPoint x])\r\t\t\t\tor: [startPoint y < stopPoint y].\r\tforwards\r\t\tifTrue: [point1 _ startPoint. point2 _ stopPoint]\r\t\tifFalse: [point1 _ stopPoint. point2 _ startPoint].\r\tsourceForm == nil ifTrue:\r\t\t[destX _ point1 x.\r\t\tdestY _ point1 y]\r\t\tifFalse:\r\t\t[width _ sourceForm width.\r\t\theight _ sourceForm height.\r\t\toffset _ sourceForm offset.\r\t\tdestX _ (point1 x + offset x) rounded.\r\t\tdestY _ (point1 y + offset y) rounded].\r\r\t\"Note that if not forwards, then the first point is the last and vice versa.\r\tWe agree to always paint stopPoint, and to optionally paint startPoint.\"\r\t(drawFirstPoint or: [forwards == false  \"ie this is stopPoint\"])\r\t\tifTrue: [self copyBits].\r\tself drawLoopX: (point2 x - point1 x) rounded \r\t\t\t\t  Y: (point2 y - point1 y) rounded.\r\t(drawFirstPoint or: [forwards  \"ie this is stopPoint\"])\r\t\tifTrue: [self copyBits].\r! !\r\r!BitBlt methodsFor: 'line drawing' stamp: 'ar 2/2/2001 15:09'!\rdrawLoopX: xDelta Y: yDelta \r\t\"Primitive. Implements the Bresenham plotting algorithm (IBM Systems\r\tJournal, Vol. 4 No. 1, 1965). It chooses a principal direction, and\r\tmaintains a potential, P. When P's sign changes, it is time to move in\r\tthe minor direction as well. This particular version does not write the\r\tfirst and last points, so that these can be called for as needed in client code.\r\tOptional. See Object documentation whatIsAPrimitive.\"\r\t| dx dy px py P |\r\t<primitive: 'primitiveDrawLoop' module: 'BitBltPlugin'>\r\tdx _ xDelta sign.\r\tdy _ yDelta sign.\r\tpx _ yDelta abs.\r\tpy _ xDelta abs.\r\t\"self copyBits.\"\r\tpy > px\r\t\tifTrue: \r\t\t\t[\"more horizontal\"\r\t\t\tP _ py // 2.\r\t\t\t1 to: py do: \r\t\t\t\t[:i |\r\t\t\t\tdestX _ destX + dx.\r\t\t\t\t(P _ P - px) < 0 ifTrue: \r\t\t\t\t\t\t[destY _ destY + dy.\r\t\t\t\t\t\tP _ P + py].\r\t\t\t\ti < py ifTrue: [self copyBits]]]\r\t\tifFalse: \r\t\t\t[\"more vertical\"\r\t\t\tP _ px // 2.\r\t\t\t1 to: px do:\r\t\t\t\t[:i |\r\t\t\t\tdestY _ destY + dy.\r\t\t\t\t(P _ P - py) < 0 ifTrue: \r\t\t\t\t\t\t[destX _ destX + dx.\r\t\t\t\t\t\tP _ P + px].\r\t\t\t\ti < px ifTrue: [self copyBits]]]! !\r\r\r!BitBlt methodsFor: 'private' stamp: 'hg 6/27/2000 12:27'!\rcachedFontColormapFrom: sourceDepth to: destDepth\r\r\t| srcIndex map |\r\tCachedFontColorMaps class == Array \r\t\tifFalse: [CachedFontColorMaps _ (1 to: 9) collect: [:i | Array new: 32]].\r\tsrcIndex _ sourceDepth.\r\tsourceDepth > 8 ifTrue: [srcIndex _ 9].\r\t(map _ (CachedFontColorMaps at: srcIndex) at: destDepth) ~~ nil ifTrue: [^ map].\r\r\tmap _ (Color cachedColormapFrom: sourceDepth to: destDepth) copy.\r\t(CachedFontColorMaps at: srcIndex) at: destDepth put: map.\r\t^ map\r! !\r\r!BitBlt methodsFor: 'private' stamp: 'ar 3/8/2003 00:34'!\rclipRange\r\t\"clip and adjust source origin and extent appropriately\"\r\t\"first in x\"\r\t| sx sy dx dy bbW bbH |\r\t\"fill in the lazy state if needed\"\r\tdestX ifNil:[destX := 0].\r\tdestY ifNil:[destY := 0].\r\twidth ifNil:[width := destForm width].\r\theight ifNil:[height := destForm height].\r\tsourceX ifNil:[sourceX := 0].\r\tsourceY ifNil:[sourceY := 0].\r\tclipX ifNil:[clipX := 0].\r\tclipY ifNil:[clipY := 0].\r\tclipWidth ifNil:[clipWidth := destForm width].\r\tclipHeight ifNil:[clipHeight := destForm height].\r\r\tdestX >= clipX\r\t\tifTrue: [sx _ sourceX.\r\t\t\t\tdx _ destX.\r\t\t\t\tbbW _ width]\r\t\tifFalse: [sx _ sourceX + (clipX - destX).\r\t\t\t\tbbW _ width - (clipX - destX).\r\t\t\t\tdx _ clipX].\r\t(dx + bbW) > (clipX + clipWidth)\r\t\tifTrue: [bbW _ bbW - ((dx + bbW) - (clipX + clipWidth))].\r\t\"then in y\"\r\tdestY >= clipY\r\t\tifTrue: [sy _ sourceY.\r\t\t\t\tdy _ destY.\r\t\t\t\tbbH _ height]\r\t\tifFalse: [sy _ sourceY + clipY - destY.\r\t\t\t\tbbH _ height - (clipY - destY).\r\t\t\t\tdy _ clipY].\r\t(dy + bbH) > (clipY + clipHeight)\r\t\tifTrue: [bbH _ bbH - ((dy + bbH) - (clipY + clipHeight))].\r\tsourceForm ifNotNil:[\r\t\tsx < 0\r\t\t\tifTrue: [dx _ dx - sx.\r\t\t\t\t\tbbW _ bbW + sx.\r\t\t\t\t\tsx _ 0].\r\t\tsx + bbW > sourceForm width\r\t\t\tifTrue: [bbW _ bbW - (sx + bbW - sourceForm width)].\r\t\tsy < 0\r\t\t\tifTrue: [dy _ dy - sy.\r\t\t\t\t\tbbH _ bbH + sy.\r\t\t\t\t\tsy _ 0].\r\t\tsy + bbH > sourceForm height\r\t\t\tifTrue: [bbH _ bbH - (sy + bbH - sourceForm height)].\r\t].\r\t(bbW <= 0 or:[bbH <= 0]) ifTrue:[\r\t\tsourceX := sourceY := destX := destY := clipX := clipY := width := height := 0.\r\t\t^true].\r\t(sx = sourceX \r\t\tand:[sy = sourceY \r\t\tand:[dx = destX \r\t\tand:[dy = destY \r\t\tand:[bbW = width \r\t\tand:[bbH = height]]]]]) ifTrue:[^false].\r\tsourceX := sx.\r\tsourceY := sy.\r\tdestX := dx.\r\tdestY := dy.\r\twidth := bbW.\r\theight := bbH.\r\t^true! !\r\r!BitBlt methodsFor: 'private' stamp: 'ar 2/2/2001 15:09'!\rcopyBitsAgain\r\t\"Primitive. See BitBlt|copyBits, also a Primitive. Essential. See Object\r\tdocumentation whatIsAPrimitive.\"\r\r\t<primitive: 'primitiveCopyBits' module: 'BitBltPlugin'>\r\tself primitiveFailed! !\r\r!BitBlt methodsFor: 'private'!\reraseBits\r\t\"Perform the erase operation, which puts 0's in the destination\r\twherever the source (which is assumed to be just 1 bit deep)\r\thas a 1.  This requires the colorMap to be set in order to AND\r\tall 1's into the destFrom pixels regardless of their size.\"\r\t| oldMask oldMap |\r\toldMask _ halftoneForm.\r\thalftoneForm _ nil.\r\toldMap _ colorMap.\r\tself colorMap: (Bitmap with: 0 with: 16rFFFFFFFF).\r\tcombinationRule _ Form erase.\r\tself copyBits. \t\t\"Erase the dest wherever the source is 1\"\r\thalftoneForm _ oldMask.\t\"already converted to a Bitmap\"\r\tcolorMap _ oldMap! !\r\r!BitBlt methodsFor: 'private' stamp: 'ar 5/14/2001 23:43'!\rinstallStrikeFont: aStrikeFont foregroundColor: foregroundColor backgroundColor: backgroundColor\r\t| lastSourceDepth |\r\tsourceForm ifNotNil:[lastSourceDepth _ sourceForm depth].\r\tsourceForm _ aStrikeFont glyphs.\r\t(colorMap notNil and:[lastSourceDepth = sourceForm depth]) ifFalse:\r\t\t[\"Set up color map for a different source depth (color font)\"\r\t\t\"Uses caching for reasonable efficiency\"\r\t\tcolorMap _ self cachedFontColormapFrom: sourceForm depth to: destForm depth.\r\t\tcolorMap at: 1 put: (destForm pixelValueFor: backgroundColor)].\r\tsourceForm depth = 1 ifTrue:\r\t\t[colorMap at: 2 put: (destForm pixelValueFor: foregroundColor).\r\t\t\"Ignore any halftone pattern since we use a color map approach here\"\r\t\thalftoneForm _ nil].\r\tsourceY _ 0.\r\theight _ aStrikeFont height.\r! !\r\r!BitBlt methodsFor: 'private'!\rpaintBits\r\t\"Perform the paint operation, which requires two calls to BitBlt.\"\r\t| color oldMap saveRule |\r\tsourceForm depth = 1 ifFalse: \r\t\t[^ self halt: 'paint operation is only defined for 1-bit deep sourceForms'].\r\tsaveRule _ combinationRule.\r\tcolor _ halftoneForm.  halftoneForm _ nil.\r\toldMap _ colorMap.\r\t\"Map 1's to ALL ones, not just one\"\r\tself colorMap: (Bitmap with: 0 with: 16rFFFFFFFF).\r\tcombinationRule _ Form erase.\r\tself copyBits. \t\t\"Erase the dest wherever the source is 1\"\r\thalftoneForm _ color.\r\tcombinationRule _ Form under.\r\tself copyBits.\t\"then OR, with whatever color, into the hole\"\r\tcolorMap _ oldMap.\r\tcombinationRule _ saveRule\r\r\" | dot |\rdot _ Form dotOfSize: 32.\r((BitBlt destForm: Display\r\t\tsourceForm: dot\r\t\tfillColor: Color lightGray\r\t\tcombinationRule: Form paint\r\t\tdestOrigin: Sensor cursorPoint\r\t\tsourceOrigin: 0@0\r\t\textent: dot extent\r\t\tclipRect: Display boundingBox)\r\t\tcolorMap: (Bitmap with: 0 with: 16rFFFFFFFF)) copyBits\"! !\r\r!BitBlt methodsFor: 'private' stamp: 'ar 5/18/2000 21:49'!\rprimDisplayString: aString from: startIndex to: stopIndex map: glyphMap xTable: xTable kern: kernDelta\r\t| ascii glyph |\r\t<primitive:'primitiveDisplayString' module:'BitBltPlugin'>\r\tstartIndex to: stopIndex do:[:charIndex|\r\t\tascii _ (aString at: charIndex) asciiValue.\r\t\tglyph _ glyphMap at: ascii + 1.\r\t\tsourceX _ xTable at: glyph + 1.\r\t\twidth _ (xTable at: glyph + 2) - sourceX.\r\t\tself copyBits.\r\t\tdestX _ destX + width + kernDelta.\r\t].! !\r\r!BitBlt methodsFor: 'private'!\rsetDestForm: df\r\t| bb |\r\tbb _ df boundingBox.\r\tdestForm _ df.\r\tclipX _ bb left.\r\tclipY _ bb top.\r\tclipWidth _ bb width.\r\tclipHeight _ bb height! !\r\r!BitBlt methodsFor: 'private' stamp: 'ar 5/14/2001 23:32'!\rsetDestForm: df sourceForm: sf fillColor: hf combinationRule: cr destOrigin: destOrigin sourceOrigin: sourceOrigin extent: extent clipRect: clipRect\r\r\t| aPoint |\r\tdestForm _ df.\r\tsourceForm _ sf.\r\tself fillColor: hf.\t\"sets halftoneForm\"\r\tcombinationRule _ cr.\r\tdestX _ destOrigin x.\r\tdestY _ destOrigin y.\r\tsourceX _ sourceOrigin x.\r\tsourceY _ sourceOrigin y.\r\twidth _ extent x.\r\theight _ extent y.\r\taPoint _ clipRect origin.\r\tclipX _ aPoint x.\r\tclipY _ aPoint y.\r\taPoint _ clipRect corner.\r\tclipWidth _ aPoint x - clipX.\r\tclipHeight _ aPoint y - clipY.\r\tsourceForm == nil ifFalse:\r\t\t[colorMap _ sourceForm colormapIfNeededFor: destForm]! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rBitBlt class\r\tinstanceVariableNames: ''!\r\r!BitBlt class methodsFor: 'instance creation' stamp: 'di 3/2/98 12:53'!\rbitPeekerFromForm: sourceForm\r\t\"Answer an instance to be used extract individual pixels from the given Form. The destination for a 1x1 copyBits will be the low order bits of (bits at: 1).\"\r\t| pixPerWord |\r\tpixPerWord _ 32 // sourceForm depth.\r\tsourceForm unhibernate.\r\t^ self destForm: (Form extent: pixPerWord@1 depth: sourceForm depth)\r\t \tsourceForm: sourceForm\r\t\thalftoneForm: nil\r\t\tcombinationRule: Form over\r\t\tdestOrigin: (pixPerWord - 1)@0\r\t\tsourceOrigin: 0@0\r\t\textent: 1@1\r\t\tclipRect: (0@0 extent: pixPerWord@1)\r! !\r\r!BitBlt class methodsFor: 'instance creation' stamp: 'di 3/2/98 12:53'!\rbitPokerToForm: destForm\r\t\"Answer an instance to be used for valueAt: aPoint put: pixValue.\r\tThe source for a 1x1 copyBits will be the low order of (bits at: 1)\"\r\t| pixPerWord |\r\tpixPerWord _ 32//destForm depth.\r\tdestForm unhibernate.\r\t^ self destForm: destForm\r\t \tsourceForm: (Form extent: pixPerWord@1 depth: destForm depth)\r\t\thalftoneForm: nil combinationRule: Form over\r\t\tdestOrigin: 0@0 sourceOrigin: (pixPerWord-1)@0\r\t\textent: 1@1 clipRect: (0@0 extent: destForm extent)\r! !\r\r!BitBlt class methodsFor: 'instance creation' stamp: 'ar 5/28/2000 12:00'!\rcurrent\r\t\"Return the class currently to be used for BitBlt\"\r\t^Display defaultBitBltClass! !\r\r!BitBlt class methodsFor: 'instance creation'!\rdestForm: df sourceForm: sf fillColor: hf combinationRule: cr destOrigin: destOrigin sourceOrigin: sourceOrigin extent: extent clipRect: clipRect \r\t\"Answer an instance of me with values set according to the arguments.\"\r\r\t^ self new\r\t\tsetDestForm: df\r\t\tsourceForm: sf\r\t\tfillColor: hf\r\t\tcombinationRule: cr\r\t\tdestOrigin: destOrigin\r\t\tsourceOrigin: sourceOrigin\r\t\textent: extent\r\t\tclipRect: clipRect! !\r\r!BitBlt class methodsFor: 'instance creation'!\rdestForm: df sourceForm: sf halftoneForm: hf combinationRule: cr destOrigin: destOrigin sourceOrigin: sourceOrigin extent: extent clipRect: clipRect \r\t\"Answer an instance of me with values set according to the arguments.\"\r\r\t^ self new\r\t\tsetDestForm: df\r\t\tsourceForm: sf\r\t\tfillColor: hf\r\t\tcombinationRule: cr\r\t\tdestOrigin: destOrigin\r\t\tsourceOrigin: sourceOrigin\r\t\textent: extent\r\t\tclipRect: clipRect! !\r\r!BitBlt class methodsFor: 'instance creation'!\rtoForm: aForm\r\t^ self new setDestForm: aForm! !\r\r\r!BitBlt class methodsFor: 'examples' stamp: 'dew 9/18/2001 02:30'!\rexampleOne\r\t\"This tests BitBlt by displaying the result of all sixteen combination rules that BitBlt is capable of using. (Please see the comment in BitBlt for the meaning of the combination rules). This only works at Display depth of 1. (Rule 15 does not work?)\"\r\t| path displayDepth |\r\r\tdisplayDepth _ Display depth.\r\tDisplay newDepth: 1.\r\r\tpath _ Path new.\r\t0 to: 3 do: [:i | 0 to: 3 do: [:j | path add: j * 100 @ (i * 75)]].\r\tDisplay fillWhite.\r\tpath _ path translateBy: 60 @ 40.\r\t1 to: 16 do: [:index | BitBlt\r\t\t\texampleAt: (path at: index)\r\t\t\trule: index - 1\r\t\t\tfillColor: nil].\r\r\t[Sensor anyButtonPressed] whileFalse: [].\r\tDisplay newDepth: displayDepth.\r\r\t\"BitBlt exampleOne\"! !\r\r!BitBlt class methodsFor: 'examples' stamp: 'jrm 2/21/2001 23:43'!\rexampleTwo\r\t\"This is to test painting with a gray tone. It also tests that the seaming with gray patterns is correct in the microcode. Lets you paint for a while and then automatically stops. This only works at Depth of 1.\"\r\t| f aBitBlt displayDepth |\r\t\"create a small black Form source as a brush. \"\r\tdisplayDepth _ Display depth.\r\tDisplay newDepth: 1.\r\tf _ Form extent: 20 @ 20.\r\tf fillBlack.\r\t\"create a BitBlt which will OR gray into the display. \"\r\taBitBlt _ BitBlt\r\t\tdestForm: Display\r\t\tsourceForm: f\r\t\tfillColor: Color gray\r\t\tcombinationRule: Form over\r\t\tdestOrigin: Sensor cursorPoint\r\t\tsourceOrigin: 0 @ 0\r\t\textent: f extent\r\t\tclipRect: Display computeBoundingBox.\r\t\"paint the gray Form on the screen for a while. \"\r\t[Sensor anyButtonPressed] whileFalse: \r\t\t[aBitBlt destOrigin: Sensor cursorPoint.\r\t\taBitBlt copyBits].\r\tDisplay newDepth: displayDepth.\r\t\"BitBlt exampleTwo\"! !\r\r\r!BitBlt class methodsFor: 'private' stamp: 'jrm 2/21/2001 23:45'!\rexampleAt: originPoint rule: rule fillColor: mask \r\t\"This builds a source and destination form and copies the source to the\r\tdestination using the specifed rule and mask. It is called from the method\r\tnamed exampleOne. Only works with Display depth of 1\"\r\r\t| s d border aBitBlt | \r\tborder_Form extent: 32@32.\r\tborder fillBlack.\r\tborder fill: (1@1 extent: 30@30) fillColor: Color white.\r\ts _ Form extent: 32@32.\r\ts fillWhite.\r\ts fillBlack: (7@7 corner: 25@25).\r\td _ Form extent: 32@32.\r\td fillWhite.\r\td fillBlack: (0@0 corner: 32@16).\r\r\ts displayOn: Display at: originPoint.\r\tborder displayOn: Display at: originPoint rule: Form under.\r\td displayOn: Display at: originPoint + (s width @0).\r\tborder displayOn: Display at: originPoint + (s width @0) rule: Form under.\r\r\td displayOn: Display at: originPoint + (s extent // (2 @ 1)). \r\taBitBlt _ BitBlt\r\t\tdestForm: Display\r\t\tsourceForm: s\r\t\tfillColor: mask\r\t\tcombinationRule: rule\r\t\tdestOrigin: originPoint + (s extent // (2 @ 1))\r\t\tsourceOrigin: 0 @ 0\r\t\textent: s extent\r\t\tclipRect: Display computeBoundingBox.\r\taBitBlt copyBits.\r\tborder \r\t\tdisplayOn: Display at: originPoint + (s extent // (2 @ 1))\r\t\trule: Form under.\r\r\t\"BitBlt exampleAt: 100@100 rule: 0 fillColor: nil\"  ! !\r\r\r!BitBlt class methodsFor: 'benchmarks' stamp: 'ar 5/14/2001 23:31'!\rbenchmark\t\t\"BitBlt benchmark\"\r\t\"Run a benchmark on different combinations rules, source/destination depths and BitBlt modes. Note: This benchmark doesn't give you any 'absolute' value - it is intended only for benchmarking improvements in the bitblt code and nothing else.\r\tAttention: *this*may*take*a*while*\"\r\t| bb source dest destRect log t |\r\tlog _ WriteStream on: String new.\r\tdestRect _ 0@0 extent: 600@600.\r\t\"Form paint/Form over - the most common rules\"\r\t#( 25 3 ) do:[:rule|\r\t\tTranscript cr; show:'---- Combination rule: ', rule printString,' ----'.\r\t\tlog cr; nextPutAll:'---- Combination rule: ', rule printString,' ----'.\r\t\t#(1 2 4 8 16 32) do:[:destDepth|\r\t\t\tdest _ nil.\r\t\t\tdest _ Form extent: destRect extent depth: destDepth.\r\t\t\tTranscript cr.\r\t\t\tlog cr.\r\t\t\t#(1 2 4 8 16 32) do:[:sourceDepth|\r\t\t\t\tTranscript cr; show: sourceDepth printString, ' => ', destDepth printString.\r\t\t\t\tlog cr; nextPutAll: sourceDepth printString, ' => ', destDepth printString.\r\t\t\t\tsource _ nil. bb _ nil.\r\t\t\t\tsource _ Form extent: destRect extent depth: sourceDepth.\r\t\t\t\t(source getCanvas) fillOval: dest boundingBox color: Color yellow borderWidth: 30 borderColor: Color black.\r\t\t\t\tbb _ WarpBlt toForm: dest.\r\t\t\t\tbb sourceForm: source.\r\t\t\t\tbb sourceRect: source boundingBox.\r\t\t\t\tbb destRect: dest boundingBox.\r\t\t\t\tbb colorMap: (source colormapIfNeededFor: dest).\r\t\t\t\tbb combinationRule: rule.\r\r\t\t\t\t\"Measure speed of copyBits\"\r\t\t\t\tt _ Time millisecondsToRun:[bb copyBits].\r\t\t\t\tTranscript tab; show: t printString.\r\t\t\t\tlog tab; nextPutAll: t printString.\r\r\t\t\t\tbb sourceForm: source destRect: source boundingBox.\r\r\t\t\t\t\"Measure speed of 1x1 warpBits\"\r\t\t\t\tbb cellSize: 1.\r\t\t\t\tt _ Time millisecondsToRun:[bb warpBits].\r\t\t\t\tTranscript tab; show: t printString.\r\t\t\t\tlog tab; nextPutAll: t printString.\r\r\t\t\t\t\"Measure speed of 2x2 warpBits\"\r\t\t\t\tbb cellSize: 2.\r\t\t\t\tt _ Time millisecondsToRun:[bb warpBits].\r\t\t\t\tTranscript tab; show: t printString.\r\t\t\t\tlog tab; nextPutAll: t printString.\r\r\t\t\t\t\"Measure speed of 3x3 warpBits\"\r\t\t\t\tbb cellSize: 3.\r\t\t\t\tt _ Time millisecondsToRun:[bb warpBits].\r\t\t\t\tTranscript tab; show: t printString.\r\t\t\t\tlog tab; nextPutAll: t printString.\r\t\t\t].\r\t\t].\r\t].\r\t^log contents! !\rArrayedCollection variableWordSubclass: #Bitmap\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Graphics-Primitives'!\r!Bitmap commentStamp: '<historical>' prior: 0!\rMy instances provide contiguous storage of bits, primarily to hold the graphical data of Forms. Forms and their subclasses provide the additional structural information as to how the bits should be interpreted in two dimensions.!\r\r\r!Bitmap methodsFor: 'filing' stamp: 'ar 2/3/2001 16:11'!\rcompress: bm toByteArray: ba\r\t\"Store a run-coded compression of the receiver into the byteArray ba,\r\tand return the last index stored into. ba is assumed to be large enough.\r\tThe encoding is as follows...\r\t\tS {N D}*.\r\t\tS is the size of the original bitmap, followed by run-coded pairs.\r\t\tN is a run-length * 4 + data code.\r\t\tD, the data, depends on the data code...\r\t\t\t0\tskip N words, D is absent\r\t\t\t1\tN words with all 4 bytes = D (1 byte)\r\t\t\t2\tN words all = D (4 bytes)\r\t\t\t3\tN words follow in D (4N bytes)\r\t\tS and N are encoded as follows...\r\t\t\t0-223\t0-223\r\t\t\t224-254\t(0-30)*256 + next byte (0-7935)\r\t\t\t255\t\tnext 4 bytes\"\t\t\r\t| size k word j lowByte eqBytes i |\r\t<primitive: 'primitiveCompressToByteArray' module: 'MiscPrimitivePlugin'>\r\tself var: #bm declareC: 'int *bm'.\r\tself var: #ba declareC: 'unsigned char *ba'.\r\tsize _ bm size.\r\ti _ self encodeInt: size in: ba at: 1.\r\tk _ 1.\r\t[k <= size] whileTrue:\r\t\t[word _ bm at: k.\r\t\tlowByte _ word bitAnd: 16rFF.\r\t\teqBytes _ ((word >> 8) bitAnd: 16rFF) = lowByte\r\t\t\t\tand: [((word >> 16) bitAnd: 16rFF) = lowByte\r\t\t\t\tand: [((word >> 24) bitAnd: 16rFF) = lowByte]].\r\t\tj _ k.\r\t\t[j < size and: [word = (bm at: j+1)]]  \"scan for = words...\"\r\t\t\twhileTrue: [j _ j+1].\r\t\tj > k ifTrue:\r\t\t\t[\"We have two or more = words, ending at j\"\r\t\t\teqBytes\r\t\t\t\tifTrue: [\"Actually words of = bytes\"\r\t\t\t\t\t\ti _ self encodeInt: j-k+1*4+1 in: ba at: i.\r\t\t\t\t\t\tba at: i put: lowByte.  i _ i+1]\r\t\t\t\tifFalse: [i _ self encodeInt: j-k+1*4+2 in: ba at: i.\r\t\t\t\t\t\ti _ self encodeBytesOf: word in: ba at: i].\r\t\t\tk _ j+1]\r\t\t\tifFalse:\r\t\t\t[\"Check for word of 4 = bytes\"\r\t\t\teqBytes ifTrue:\r\t\t\t\t[\"Note 1 word of 4 = bytes\"\r\t\t\t\ti _ self encodeInt: 1*4+1 in: ba at: i.\r\t\t\t\tba at: i put: lowByte.  i _ i+1.\r\t\t\t\tk _ k + 1]\r\t\t\t\tifFalse:\r\t\t\t\t[\"Finally, check for junk\"\r\t\t\t\t[j < size and: [(bm at: j) ~= (bm at: j+1)]]  \"scan for ~= words...\"\r\t\t\t\t\twhileTrue: [j _ j+1].\r\t\t\t\tj = size ifTrue: [j _ j + 1].\r\t\t\t\t\"We have one or more unmatching words, ending at j-1\"\r\t\t\t\ti _ self encodeInt: j-k*4+3 in: ba at: i.\r\t\t\t\tk to: j-1 do:\r\t\t\t\t\t[:m | i _ self encodeBytesOf: (bm at: m) in: ba at: i].\r\t\t\t\tk _ j]]].\r\t^ i - 1  \"number of bytes actually stored\"\r\"\rSpace check:\r | n rawBytes myBytes b |\rn _ rawBytes _ myBytes _ 0.\rForm allInstancesDo:\r\t[:f | f unhibernate.\r\tb _ f bits.\r\tn _ n + 1.\r\trawBytes _ rawBytes + (b size*4).\r\tmyBytes _ myBytes + (b compressToByteArray size).\r\tf hibernate].\rArray with: n with: rawBytes with: myBytes\rColorForms: (116 230324 160318 )\rForms: (113 1887808 1325055 )\r\rIntegerity check:\rForm allInstances do:\r\t[:f | f unhibernate.\r\tf bits = (Bitmap decompressFromByteArray: f bits compressToByteArray)\r\t\tifFalse: [self halt].\r\tf hibernate]\r\rSpeed test:\rMessageTally spyOn: [Form allInstances do:\r\t[:f | Bitmap decompressFromByteArray: f bits compressToByteArray]]\r\"! !\r\r!Bitmap methodsFor: 'filing' stamp: 'di 8/5/1998 11:31'!\rcompressToByteArray\r\t\"Return a run-coded compression of this bitmap into a byteArray\"\t\t\r\t| byteArray lastByte |\r\t\"Without skip codes, it is unlikely that the compressed bitmap will be any larger than was the original.  The run-code cases are...\r\tN >= 1 words of equal bytes:  4N bytes -> 2 bytes (at worst 4 -> 2)\r\tN > 1 equal words:  4N bytes -> 5 bytes (at worst 8 -> 5)\r\tN > 1 unequal words:  4N bytes -> 4N + M, where M is the number of bytes required to encode the run length.\r\rThe worst that can happen is that the method begins with unequal words, and than has interspersed occurrences of a word with equal bytes.  Thus we require a run-length at the beginning, and after every interspersed word of equal bytes.  However, each of these saves 2 bytes, so it must be followed by a run of 1984 (7936//4) or more (for which M jumps from 2 to 5) to add any extra overhead.  Therefore the worst case is a series of runs of 1984 or more, with single interspersed words of equal bytes.  At each break we save 2 bytes, but add 5.  Thus the overhead would be no more than 5 (encoded size) + 2 (first run len) + (S//1984*3).\"\r\t\r\"NOTE: This code is copied in Form hibernate for reasons given there.\"\r\tbyteArray _ ByteArray new: (self size*4) + 7 + (self size//1984*3).\r\tlastByte _ self compress: self toByteArray: byteArray.\r\t^ byteArray copyFrom: 1 to: lastByte! !\r\r!Bitmap methodsFor: 'filing' stamp: 'ar 2/3/2001 16:11'!\rdecompress: bm fromByteArray: ba at: index\r\t\"Decompress the body of a byteArray encoded by compressToByteArray (qv)...\r\tThe format is simply a sequence of run-coded pairs, {N D}*.\r\t\tN is a run-length * 4 + data code.\r\t\tD, the data, depends on the data code...\r\t\t\t0\tskip N words, D is absent\r\t\t\t\t(could be used to skip from one raster line to the next)\r\t\t\t1\tN words with all 4 bytes = D (1 byte)\r\t\t\t2\tN words all = D (4 bytes)\r\t\t\t3\tN words follow in D (4N bytes)\r\t\tS and N are encoded as follows (see decodeIntFrom:)...\r\t\t\t0-223\t0-223\r\t\t\t224-254\t(0-30)*256 + next byte (0-7935)\r\t\t\t255\t\tnext 4 bytes\"\t\r\t\"NOTE:  If fed with garbage, this routine could read past the end of ba, but it should fail before writing past the ned of bm.\"\r\t| i code n anInt data end k pastEnd |\r\t<primitive: 'primitiveDecompressFromByteArray' module: 'MiscPrimitivePlugin'>\r\tself var: #bm declareC: 'int *bm'.\r\tself var: #ba declareC: 'unsigned char *ba'.\r\ti _ index.  \"byteArray read index\"\r\tend _ ba size.\r\tk _ 1.  \"bitmap write index\"\r\tpastEnd _ bm size + 1.\r\t[i <= end] whileTrue:\r\t\t[\"Decode next run start N\"\r\t\tanInt _ ba at: i.  i _ i+1.\r\t\tanInt <= 223 ifFalse:\r\t\t\t[anInt <= 254\r\t\t\t\tifTrue: [anInt _ (anInt-224)*256 + (ba at: i).  i _ i+1]\r\t\t\t\tifFalse: [anInt _ 0.\r\t\t\t\t\t\t1 to: 4 do: [:j | anInt _ (anInt bitShift: 8) + (ba at: i).  i _ i+1]]].\r\t\tn _ anInt >> 2.\r\t\t(k + n) > pastEnd ifTrue: [^ self primitiveFail].\r\t\tcode _ anInt bitAnd: 3.\r\t\tcode = 0 ifTrue: [\"skip\"].\r\t\tcode = 1 ifTrue: [\"n consecutive words of 4 bytes = the following byte\"\r\t\t\t\t\t\tdata _ ba at: i.  i _ i+1.\r\t\t\t\t\t\tdata _ data bitOr: (data bitShift: 8).\r\t\t\t\t\t\tdata _ data bitOr: (data bitShift: 16).\r\t\t\t\t\t\t1 to: n do: [:j | bm at: k put: data.  k _ k+1]].\r\t\tcode = 2 ifTrue: [\"n consecutive words = 4 following bytes\"\r\t\t\t\t\t\tdata _ 0.\r\t\t\t\t\t\t1 to: 4 do: [:j | data _ (data bitShift: 8) bitOr: (ba at: i).  i _ i+1].\r\t\t\t\t\t\t1 to: n do: [:j | bm at: k put: data.  k _ k+1]].\r\t\tcode = 3 ifTrue: [\"n consecutive words from the data...\"\r\t\t\t\t\t\t1 to: n do:\r\t\t\t\t\t\t\t[:m | data _ 0.\r\t\t\t\t\t\t\t1 to: 4 do: [:j | data _ (data bitShift: 8) bitOr: (ba at: i).  i _ i+1].\r\t\t\t\t\t\t\tbm at: k put: data.  k _ k+1]]]! !\r\r!Bitmap methodsFor: 'filing' stamp: 'jm 2/15/98 17:27'!\rencodeBytesOf: anInt in: ba at: i\r\t\"Copy the integer anInt into byteArray ba at index i, and return the next index\"\r\r\tself inline: true.\r\tself var: #ba declareC: 'unsigned char *ba'.\r\t0 to: 3 do:\r\t\t[:j | ba at: i+j put: (anInt >> (3-j*8) bitAnd: 16rFF)].\r\t^ i+4! !\r\r!Bitmap methodsFor: 'filing' stamp: 'jm 2/12/98 17:32'!\rencodeInt: int\r\t\"Encode the integer int as per encodeInt:in:at:, and return it as a ByteArray\"\r\t| byteArray next |\r\tbyteArray _ ByteArray new: 5.\r\tnext _ self encodeInt: int in: byteArray at: 1.\r\t^ byteArray copyFrom: 1 to: next - 1\r! !\r\r!Bitmap methodsFor: 'filing' stamp: 'jm 2/15/98 17:26'!\rencodeInt: anInt in: ba at: i\r\t\"Encode the integer anInt in byteArray ba at index i, and return the next index.\r\tThe encoding is as follows...\r\t\t0-223\t0-223\r\t\t224-254\t(0-30)*256 + next byte (0-7935)\r\t\t255\t\tnext 4 bytes\"\t\t\r\r\tself inline: true.\r\tself var: #ba declareC: 'unsigned char *ba'.\r\tanInt <= 223 ifTrue: [ba at: i put: anInt. ^ i+1].\r\tanInt <= 7935 ifTrue: [ba at: i put: anInt//256+224. ba at: i+1 put: anInt\\\\256.  ^ i+2].\r\tba at: i put: 255.\r\t^ self encodeBytesOf: anInt in: ba at: i+1! !\r\r!Bitmap methodsFor: 'filing' stamp: 'di 2/11/98 21:34'!\rreadCompressedFrom: strm\r\t\"Decompress an old-style run-coded stream into this bitmap:\r\t\t[0 means end of runs]\r\t\t[n = 1..127] [(n+3) copies of next byte]\r\t\t[n = 128..191] [(n-127) next bytes as is]\r\t\t[n = 192..255] [(n-190) copies of next 4 bytes]\"\r\t| n byte out outBuff bytes |\r\tout _ WriteStream on: (outBuff _ ByteArray new: self size*4).\r\t[(n _ strm next) > 0] whileTrue:\r\t\t[(n between: 1 and: 127) ifTrue:\r\t\t\t[byte _ strm next.\r\t\t\t1 to: n+3 do: [:i | out nextPut: byte]].\r\t\t(n between: 128 and: 191) ifTrue:\r\t\t\t[1 to: n-127 do: [:i | out nextPut: strm next]].\r\t\t(n between: 192 and: 255) ifTrue:\r\t\t\t[bytes _ (1 to: 4) collect: [:i | strm next].\r\t\t\t1 to: n-190 do: [:i | bytes do: [:b | out nextPut: b]]]].\r\tout position = outBuff size ifFalse: [self error: 'Decompression size error'].\r\t\"Copy the final byteArray into self\"\r\tself copyFromByteArray: outBuff.! !\r\r!Bitmap methodsFor: 'filing' stamp: 'tk 1/24/2000 22:37'!\rrestoreEndianness\r\t\"This word object was just read in from a stream.  Bitmaps are always compressed and serialized in a machine-independent way.  Do not correct the Endianness.\"\r\r\t\"^ self\"\r! !\r\r!Bitmap methodsFor: 'filing' stamp: 'nk 12/31/2003 16:02'!\rstoreBits: startBit to: stopBit on: aStream \r\t\"Store my bits as a hex string, breaking the lines every 100 bytes or \r\tso to comply with the maximum line length limits of Postscript (255 \r\tbytes). \"\r\t| lineWidth |\r\tlineWidth := 0.\r\tself\r\t\tdo: [:word | \r\t\t\tstartBit\r\t\t\t\tto: stopBit\r\t\t\t\tby: -4\r\t\t\t\tdo: [:shift | \r\t\t\t\t\taStream nextPut: (word >> shift bitAnd: 15) asHexDigit.\r\t\t\t\t\tlineWidth := lineWidth + 1].\r\t\t\t(lineWidth > 100)\r\t\t\t\tifTrue: [aStream cr.\r\t\t\t\t\tlineWidth := 0]].\r\tlineWidth > 0 ifTrue: [ aStream cr ].! !\r\r!Bitmap methodsFor: 'filing' stamp: 'jm 2/18/98 14:19'!\rwriteOn: aStream \r\t\"Store the array of bits onto the argument, aStream. A leading byte of 16r80 identifies this as compressed by compressToByteArray (qv).\"\r\r\t| b |\r\taStream nextPut: 16r80.\r\tb _ self compressToByteArray.\r\taStream\r\t\tnextPutAll: (self encodeInt: b size);\r\t\tnextPutAll: b.\r! !\r\r!Bitmap methodsFor: 'filing' stamp: 'tk 2/19/1999 07:36'!\rwriteUncompressedOn: aStream \r\t\"Store the array of bits onto the argument, aStream.\r\t(leading byte ~= 16r80) identifies this as raw bits (uncompressed).\"\r\r\taStream nextInt32Put: self size.\r\taStream nextPutAll: self\r! !\r\r\r!Bitmap methodsFor: 'printing' stamp: 'sma 6/1/2000 09:42'!\rprintOn: aStream\r\tself printNameOn: aStream.\r\taStream nextPutAll: ' of length '; print: self size! !\r\r!Bitmap methodsFor: 'printing' stamp: 'MPW 1/1/1901 22:00'!\rprintOnStream: aStream\r\r\taStream print: 'a Bitmap of length '; write:self size.\r! !\r\r\r!Bitmap methodsFor: 'accessing' stamp: 'ar 3/3/2001 16:11'!\ratAllPut: value\r\t\"Fill the receiver, an indexable bytes or words object, with the given positive integer. The range of possible fill values is [0..255] for byte arrays and [0..(2^32 - 1)] for word arrays.\"\r\t<primitive: 145>\r\tsuper atAllPut: value.! !\r\r!Bitmap methodsFor: 'accessing'!\rbitPatternForDepth: depth\r\t\"The raw call on BitBlt needs a Bitmap to represent this color.  I already am Bitmap like.  I am already adjusted for a specific depth.  Interpret me as an array of (32/depth) Color pixelValues.  BitBlt aligns the first element of this array with the top scanline of the destinationForm, the second with the second, and so on, cycling through the color array as necessary. 6/18/96 tk\"\r\r\t^ self! !\r\r!Bitmap methodsFor: 'accessing'!\rbyteAt: byteAddress\r\t\"Extract a byte from a Bitmap.  Note that this is a byte address and it is one-order.  For repeated use, create an instance of BitBlt and use pixelAt:.  See Form pixelAt:  7/1/96 tk\"\r\t| lowBits |\r\tlowBits _ byteAddress - 1 bitAnd: 3.\r\t^((self at: byteAddress - 1 - lowBits // 4 + 1)\r\t\tbitShift: (lowBits - 3) * 8)\r\t\tbitAnd: 16rFF! !\r\r!Bitmap methodsFor: 'accessing' stamp: 'ar 9/21/2001 23:06'!\rbyteAt: byteAddress put: byte\r\t\"Insert a byte into a Bitmap.  Note that this is a byte address and it is one-order.  For repeated use, create an instance of BitBlt and use pixelAt:put:.  See Form pixelAt:put:  7/1/96 tk\"\r\t| longWord shift lowBits longAddr |\r\t(byte < 0 or:[byte > 255]) ifTrue:[^self errorImproperStore].\r\tlowBits _ byteAddress - 1 bitAnd: 3.\r\tlongWord _ self at: (longAddr _ (byteAddress - 1 - lowBits) // 4 + 1).\r\tshift _ (3 - lowBits) * 8.\r\tlongWord _ longWord - (longWord bitAnd: (16rFF bitShift: shift)) \r\t\t+ (byte bitShift: shift).\r\tself at: longAddr put: longWord.\r\t^ byte! !\r\r!Bitmap methodsFor: 'accessing' stamp: 'ar 3/3/2001 16:18'!\rbyteSize\r\t^self size * 4! !\r\r!Bitmap methodsFor: 'accessing' stamp: 'ar 6/16/2002 18:49'!\rcopyFromByteArray: byteArray\r\t\"This method should work with either byte orderings\"\r\t| myHack byteHack |\r\tmyHack := Form new hackBits: self.\r\tbyteHack := Form new hackBits: byteArray.\r\tSmalltalk isLittleEndian ifTrue:[byteHack swapEndianness].\r\tbyteHack displayOn: myHack.\r! !\r\r!Bitmap methodsFor: 'accessing' stamp: 'ar 11/2/1998 12:19'!\rdefaultElement\r\t\"Return the default element of the receiver\"\r\t^0! !\r\r!Bitmap methodsFor: 'accessing' stamp: 'ar 3/3/2001 22:41'!\rintegerAt: index\r\t\"Return the integer at the given index\"\r\t| word |\r\t<primitive: 165>\r\tword _ self basicAt: index.\r\tword < 16r3FFFFFFF ifTrue:[^word]. \"Avoid LargeInteger computations\"\r\t^word >= 16r80000000\t\"Negative?!!\"\r\t\tifTrue:[\"word - 16r100000000\"\r\t\t\t\t(word bitInvert32 + 1) negated]\r\t\tifFalse:[word]! !\r\r!Bitmap methodsFor: 'accessing' stamp: 'ar 3/3/2001 22:42'!\rintegerAt: index put: anInteger\r\t\"Store the integer at the given index\"\r\t| word |\r\t<primitive: 166>\r\tanInteger < 0\r\t\tifTrue:[\"word _ 16r100000000 + anInteger\"\r\t\t\t\tword _ (anInteger + 1) negated bitInvert32]\r\t\tifFalse:[word _ anInteger].\r\tself  basicAt: index put: word.\r\t^anInteger! !\r\r!Bitmap methodsFor: 'accessing' stamp: 'tk 3/15/97'!\rpixelValueForDepth: depth\r\t\"Self is being used to represent a single color.  Answer bits that appear in ONE pixel of this color in a Bitmap of the given depth. The depth must be one of 1, 2, 4, 8, 16, or 32.  Returns an integer.  First pixel only.  \"\r\r\t^ (self at: 1) bitAnd: (1 bitShift: depth) - 1! !\r\r!Bitmap methodsFor: 'accessing'!\rprimFill: aPositiveInteger\r\t\"Fill the receiver, an indexable bytes or words object, with the given positive integer. The range of possible fill values is [0..255] for byte arrays and [0..(2^32 - 1)] for word arrays.\"\r\r\t<primitive: 145>\r\tself errorImproperStore.! !\r\r!Bitmap methodsFor: 'accessing'!\rreplaceFrom: start to: stop with: replacement startingAt: repStart \r\t\"Primitive. This destructively replaces elements from start to stop in the receiver starting at index, repStart, in the collection, replacement. Answer the receiver. Range checks are performed in the primitive only. Optional. See Object documentation whatIsAPrimitive.\"\r\t<primitive: 105>\r\tsuper replaceFrom: start to: stop with: replacement startingAt: repStart! !\r\r\r!Bitmap methodsFor: 'testing' stamp: 'ar 5/25/2000 19:42'!\risColormap\r\t\"Bitmaps were used as color maps for BitBlt.\r\tThis method allows to recognize real color maps.\"\r\t^false! !\r\r\r!Bitmap methodsFor: 'as yet unclassified' stamp: 'RAA 7/28/2000 21:51'!\rcopy\r\r\t^self clone! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rBitmap class\r\tinstanceVariableNames: ''!\r\r!Bitmap class methodsFor: 'instance creation' stamp: 'di 2/9/98 16:02'!\rdecodeIntFrom: s\r\t\"Decode an integer in stream s as follows...\r\t\t0-223\t0-223\r\t\t224-254\t(0-30)*256 + next byte (0-7935)\r\t\t255\t\tnext 4 bytes\t\"\t\t\r\t| int |\r\tint _ s next.\r\tint <= 223 ifTrue: [^ int].\r\tint <= 254 ifTrue: [^ (int-224)*256 + s next].\r\tint _ s next.\r\t1 to: 3 do: [:j | int _ (int bitShift: 8) + s next].\r\t^ int! !\r\r!Bitmap class methodsFor: 'instance creation' stamp: 'di 2/12/98 14:34'!\rdecompressFromByteArray: byteArray\r\t| s bitmap size |\r\ts _ ReadStream on: byteArray.\r\tsize _ self decodeIntFrom: s.\r\tbitmap _ self new: size.\r\tbitmap decompress: bitmap fromByteArray: byteArray at: s position+1.\r\t^ bitmap! !\r\r!Bitmap class methodsFor: 'instance creation' stamp: 'ar 12/23/1999 14:35'!\rnewFromStream: s\r\t| len |\r\ts next = 16r80 ifTrue:\r\t\t[\"New compressed format\"\r\t\tlen _ self decodeIntFrom: s.\r\t\t^ Bitmap decompressFromByteArray: (s nextInto: (ByteArray new: len))].\r\ts skip: -1.\r\tlen _ s nextInt32.\r\tlen <= 0\r\t\tifTrue: [\"Old compressed format\"\r\t\t\t\t^ (self new: len negated) readCompressedFrom: s]\r\t\tifFalse: [\"Old raw data format\"\r\t\t\t\t^ s nextWordsInto: (self new: len)]! !\r\r\r!Bitmap class methodsFor: 'utilities' stamp: 'sd 6/28/2003 09:33'!\rswapBytesIn: aNonPointerThing from: start to: stop\r\t\"Perform a bigEndian/littleEndian byte reversal of my words.\r\tWe only intend this for non-pointer arrays.  Do nothing if I contain pointers.\"\r\t| hack blt |\r\t\"The implementation is a hack, but fast for large ranges\"\r\thack _ Form new hackBits: aNonPointerThing.\r\tblt _ (BitBlt toForm: hack) sourceForm: hack.\r\tblt combinationRule: Form reverse.  \"XOR\"\r\tblt sourceY: start-1; destY: start-1; height: stop-start+1; width: 1.\r\tblt sourceX: 0; destX: 3; copyBits.  \"Exchange bytes 0 and 3\"\r\tblt sourceX: 3; destX: 0; copyBits.\r\tblt sourceX: 0; destX: 3; copyBits.\r\tblt sourceX: 1; destX: 2; copyBits.  \"Exchange bytes 1 and 2\"\r\tblt sourceX: 2; destX: 1; copyBits.\r\tblt sourceX: 1; destX: 2; copyBits.\r! !\rError subclass: #BlockCannotReturn\r\tinstanceVariableNames: 'result deadHome'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Exceptions Kernel'!\r!BlockCannotReturn commentStamp: '<historical>' prior: 0!\rThis class is private to the EHS implementation.  Its use allows for ensured execution to survive code such as:\r\r[self doThis.\r^nil]\r\tensure: [self doThat]\r\rSignaling or handling this exception is not recommended.!\r\r\r!BlockCannotReturn methodsFor: 'accessing' stamp: 'ajh 2/6/2002 11:12'!\rdeadHome: context\r\r\tdeadHome _ context! !\r\r!BlockCannotReturn methodsFor: 'accessing' stamp: 'tfei 3/30/1999 12:54'!\rresult\r\r\t^result! !\r\r!BlockCannotReturn methodsFor: 'accessing' stamp: 'tfei 3/30/1999 12:54'!\rresult: r\r\r\tresult := r! !\r\r\r!BlockCannotReturn methodsFor: 'exceptionDescription' stamp: 'tfei 3/30/1999 12:55'!\rdefaultAction\r\r\tself messageText: 'Block cannot return'.\r\t^super defaultAction! !\r\r!BlockCannotReturn methodsFor: 'exceptionDescription' stamp: 'tfei 4/2/1999 15:49'!\risResumable\r\r\t^true! !\rContextPart variableSubclass: #BlockContext\r\tinstanceVariableNames: 'nargs startpc home'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Methods'!\r!BlockContext commentStamp: '<historical>' prior: 0!\rMy instances function similarly to instances of MethodContext, but they hold the dynamic state for execution of a block in Smalltalk. They access all temporary variables and the method sender via their home pointer, so that those values are effectively shared. Their indexable part is used to store their independent value stack during execution.\r\t\rMy instance must hold onto its home in order to work. This can cause circularities if the home is also pointing (via a temp, perhaps) to the instance. In the rare event that this happens (as in SortedCollection sortBlock:) the message fixTemps will replace home with a copy of home, thus defeating the sharing of temps but, nonetheless, eliminating the circularity.\r\rBlockContexts must only be created using the method newForMethod:.  Note that it is impossible to determine the real object size of a BlockContext except by asking for the frameSize of its method.  Any fields above the stack pointer (stackp) are truly invisible -- even (and especially!!) to the garbage collector.  Any store into stackp other than by the primitive method stackp: is potentially fatal.!\r\r\r!BlockContext methodsFor: 'initialize-release' stamp: 'ls 6/21/2000 17:42'!\rhome: aContextPart startpc: position nargs: anInteger \r\t\"This is the initialization message. The receiver has been initialized with \r\tthe correct size only.\"\r\r\thome _ aContextPart.\r\tpc _ startpc _ position.\r\tnargs _ anInteger.\r\tstackp _ 0.! !\r\r!BlockContext methodsFor: 'initialize-release' stamp: 'ajh 7/18/2003 21:49'!\rprivRefresh\r\t\"Reinitialize the receiver so that it is in the state it was at its creation.\"\r\r\tpc _ startpc.\r\tself stackp: 0.\r\tnargs timesRepeat: [  \"skip arg popping\"\r\t\tself nextInstruction selector = #popIntoTemporaryVariable:\r\t\t\tifFalse: [self halt: 'unexpected bytecode instruction']\r\t].\r! !\r\r\r!BlockContext methodsFor: 'accessing' stamp: 'ajh 1/24/2003 12:35'!\rblockHome\r\r\t^ self home! !\r\r!BlockContext methodsFor: 'accessing' stamp: 'ajh 1/31/2003 23:29'!\rfinalBlockHome\r\r\t^ self home! !\r\r!BlockContext methodsFor: 'accessing'!\rfixTemps\r\t\"Fix the values of the temporary variables used in the block that are \r\tordinarily shared with the method in which the block is defined.\"\r\r\thome _ home copy.\r\thome swapSender: nil! !\r\r!BlockContext methodsFor: 'accessing'!\rhasMethodReturn\r\t\"Answer whether the receiver has a return ('^') in its code.\"\r\r\t| method scanner end |\r\tmethod _ self method.\r\t\"Determine end of block from long jump preceding it\"\r\tend _ (method at: startpc-2)\\\\16-4*256 + (method at: startpc-1) + startpc - 1.\r\tscanner _ InstructionStream new method: method pc: startpc.\r\tscanner scanFor: [:byte | (byte between: 120 and: 124) or: [scanner pc > end]].\r\t^scanner pc <= end! !\r\r!BlockContext methodsFor: 'accessing'!\rhome\r\t\"Answer the context in which the receiver was defined.\"\r\r\t^home! !\r\r!BlockContext methodsFor: 'accessing' stamp: 'ajh 1/21/2003 13:16'!\risBlock\r\r\t^ true! !\r\r!BlockContext methodsFor: 'accessing' stamp: 'ajh 1/31/2003 12:12'!\risExecutingBlock\r\r\t^ true! !\r\r!BlockContext methodsFor: 'accessing'!\rmethod\r\t\"Answer the compiled method in which the receiver was defined.\"\r\r\t^home method! !\r\r!BlockContext methodsFor: 'accessing' stamp: 'mdr 4/10/2001 10:34'!\rnumArgs\r\t\"Answer the number of arguments that must be used to evaluate this block\"\r\r\t^nargs! !\r\r!BlockContext methodsFor: 'accessing'!\rreceiver \r\t\"Refer to the comment in ContextPart|receiver.\"\r\r\t^home receiver! !\r\r!BlockContext methodsFor: 'accessing'!\rtempAt: index \r\t\"Refer to the comment in ContextPart|tempAt:.\"\r\r\t^home at: index! !\r\r!BlockContext methodsFor: 'accessing'!\rtempAt: index put: value \r\t\"Refer to the comment in ContextPart|tempAt:put:.\"\r\r\t^home at: index put: value! !\r\r\r!BlockContext methodsFor: 'evaluating' stamp: 'ajh 1/13/2002 13:36'!\rifError: errorHandlerBlock\r\t\"Evaluate the block represented by the receiver, and normally return it's value.  If an error occurs, the errorHandlerBlock is evaluated, and it's value is instead returned.  The errorHandlerBlock must accept zero, one, or two parameters (the error message and the receiver).\"\r\t\"Examples:\r\t\t[1 whatsUpDoc] ifError: [:err :rcvr | 'huh?'].\r\t\t[1 / 0] ifError: [:err :rcvr |\r\t\t\t'ZeroDivide' = err\r\t\t\t\tifTrue: [Float infinity]\r\t\t\t\tifFalse: [self error: err]]\r\"\r\r\t^ self on: Error do: [:ex |\r\t\terrorHandlerBlock valueWithPossibleArgs: {ex description. ex receiver}]! !\r\r!BlockContext methodsFor: 'evaluating' stamp: 'jm 6/3/1998 14:25'!\rtimeToRun\r\t\"Answer the number of milliseconds taken to execute this block.\"\r\r\t^ Time millisecondsToRun: self\r! !\r\r!BlockContext methodsFor: 'evaluating'!\rvalue\r\t\"Primitive. Evaluate the block represented by the receiver. Fail if the \r\tblock expects any arguments or if the block is already being executed. \r\tOptional. No Lookup. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 81>\r\t^self valueWithArguments: #()! !\r\r!BlockContext methodsFor: 'evaluating'!\rvalue: arg \r\t\"Primitive. Evaluate the block represented by the receiver. Fail if the \r\tblock expects other than one argument or if the block is already being \r\texecuted. Optional. No Lookup. See Object documentation \r\twhatIsAPrimitive.\"\r\r\t<primitive: 81>\r\t^self valueWithArguments: (Array with: arg)! !\r\r!BlockContext methodsFor: 'evaluating'!\rvalue: arg1 value: arg2 \r\t\"Primitive. Evaluate the block represented by the receiver. Fail if the \r\tblock expects other than two arguments or if the block is already being \r\texecuted. Optional. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 81>\r\t^self valueWithArguments: (Array with: arg1 with: arg2)! !\r\r!BlockContext methodsFor: 'evaluating'!\rvalue: arg1 value: arg2 value: arg3 \r\t\"Primitive. Evaluate the block represented by the receiver. Fail if the \r\tblock expects other than three arguments or if the block is already being \r\texecuted. Optional. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 81>\r\t^self valueWithArguments: \r\t\t(Array\r\t\t\twith: arg1\r\t\t\twith: arg2\r\t\t\twith: arg3)! !\r\r!BlockContext methodsFor: 'evaluating' stamp: 'di 11/30/97 09:19'!\rvalue: arg1 value: arg2 value: arg3 value: arg4 \r\t\"Primitive. Evaluate the block represented by the receiver. Fail if the \r\tblock expects other than three arguments or if the block is already being \r\texecuted. Optional. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 81>\r\t^self valueWithArguments: \r\t\t(Array\r\t\t\twith: arg1\r\t\t\twith: arg2\r\t\t\twith: arg3\r\t\t\twith: arg4)! !\r\r!BlockContext methodsFor: 'evaluating' stamp: 'mjr 9/10/2003 22:42'!\rvalueWithArguments: anArray \r\t\"Primitive. Evaluate the block represented by the receiver. The argument \r\tis an Array whose elements are the arguments for the block. Fail if the \r\tlength of the Array is not the same as the the number of arguments that \r\tthe block was expecting. Fail if the block is already being executed. \r\tEssential. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 82>\r\r\tself numArgs = anArray size\r\t\tifTrue: [self error: 'Attempt to evaluate a block that is already being evaluated.']\r\t\tifFalse: [self error: \r\t\t\t'This block accepts ' ,self numArgs printString, ' argument', (self numArgs = 1 ifTrue:[''] ifFalse:['s']) , \r\t\t\t', but was called with ', anArray size printString, '.']\r\r! !\r\r\r!BlockContext methodsFor: 'controlling' stamp: 'sma 5/12/2000 13:22'!\rrepeat\r\t\"Evaluate the receiver repeatedly, ending only if the block explicitly returns.\"\r\r\t[self value. true] whileTrue! !\r\r!BlockContext methodsFor: 'controlling'!\rwhileFalse\r\t\"Ordinarily compiled in-line, and therefore not overridable.\r\tThis is in case the message is sent to other than a literal block.\r\tEvaluate the receiver, as long as its value is false.\"\r \r\t^ [self value] whileFalse: []! !\r\r!BlockContext methodsFor: 'controlling'!\rwhileFalse: aBlock \r\t\"Ordinarily compiled in-line, and therefore not overridable.\r\tThis is in case the message is sent to other than a literal block.\r\tEvaluate the argument, aBlock, as long as the value of the receiver is false.\"\r\r\t^ [self value] whileFalse: [aBlock value]! !\r\r!BlockContext methodsFor: 'controlling'!\rwhileTrue\r\t\"Ordinarily compiled in-line, and therefore not overridable.\r\tThis is in case the message is sent to other than a literal block.\r\tEvaluate the receiver, as long as its value is true.\"\r \r\t^ [self value] whileTrue: []! !\r\r!BlockContext methodsFor: 'controlling'!\rwhileTrue: aBlock \r\t\"Ordinarily compiled in-line, and therefore not overridable.\r\tThis is in case the message is sent to other than a literal block.\r\tEvaluate the argument, aBlock, as long as the value of the receiver is true.\"\r\r\t^ [self value] whileTrue: [aBlock value]! !\r\r\r!BlockContext methodsFor: 'scheduling' stamp: 'di 9/12/1998 11:53'!\rfork\r\t\"Create and schedule a Process running the code in the receiver.\"\r\r\t^ self newProcess resume! !\r\r!BlockContext methodsFor: 'scheduling' stamp: 'jm 11/9/1998 10:16'!\rforkAt: priority \r\t\"Create and schedule a Process running the code in the receiver at the given priority. Answer the newly created process.\"\r\r\t| forkedProcess |\r\tforkedProcess _ self newProcess.\r\tforkedProcess priority: priority.\r\t^ forkedProcess resume\r! !\r\r!BlockContext methodsFor: 'scheduling' stamp: 'ar 6/5/1998 21:44'!\rnewProcess\r\t\"Answer a Process running the code in the receiver. The process is not \r\tscheduled.\"\r\t<primitive: 19> \"Simulation guard\"\r\t^Process\r\t\tforContext: \r\t\t\t[self value.\r\t\t\tProcessor terminateActive]\r\t\tpriority: Processor activePriority! !\r\r\r!BlockContext methodsFor: 'instruction decoding' stamp: 'ajh 1/24/2003 16:35'!\rblockReturnTop\r\t\"Simulate the interpreter's action when a ReturnTopOfStack bytecode is \r\tencountered in the receiver.\"\r\r\t| save dest |\r\tsave _ home.\t\"Needed because return code will nil it\"\r\tdest _ self return: self pop from: self.\r\thome _ save.\r\tsender _ nil.\r\t^ dest! !\r\r\r!BlockContext methodsFor: 'printing' stamp: 'LC 1/6/2002 11:59'!\rdecompile\r\t^ Decompiler new decompileBlock: self! !\r\r!BlockContext methodsFor: 'printing' stamp: 'dew 11/11/2003 01:15'!\rprintOn: aStream\r\t| blockString truncatedBlockString |\r\r\thome == nil ifTrue: [^aStream nextPutAll: 'a BlockContext with home=nil'].\r\taStream nextPutAll: '[] in '.\r\tsuper printOn: aStream.\r\taStream nextPutAll: ' '.\r\tblockString _ ((self decompile ifNil: ['--source missing--']) printString\r\t\t\t\t\t\treplaceAll: Character cr with: Character space)\r\t\t\t\t\t\t\treplaceAll: Character tab with: Character space.\r\ttruncatedBlockString _ blockString truncateWithElipsisTo: 80.\r\ttruncatedBlockString size < blockString size ifTrue:\r\t\t[truncatedBlockString _ truncatedBlockString, ']}'].\r\taStream nextPutAll: truncatedBlockString.\r! !\r\r!BlockContext methodsFor: 'printing' stamp: 'MPW 1/1/1901 22:01'!\rprintOnStream: aStream\r\r\thome == nil ifTrue: [^aStream print: 'a BlockContext with home=nil'].\r\taStream print: '[] in '.\r\tsuper printOnStream: aStream! !\r\r\r!BlockContext methodsFor: 'private' stamp: 'ajh 1/24/2003 20:36'!\raboutToReturn: result through: firstUnwindContext \r\t\"Called from VM when an unwindBlock is found between self and its home.  Return to home's sender, executing unwind blocks on the way.\"\r\r\tself home return: result! !\r\r!BlockContext methodsFor: 'private' stamp: 'tfei 3/31/1999 17:40'!\rcannotReturn: result\r\t\"The receiver tried to return result to a method context that no longer exists.\"\r\r\t| ex newResult |\r\tex := BlockCannotReturn new.\r\tex result: result.\r\tnewResult := ex signal.\r\t^newResult! !\r\r!BlockContext methodsFor: 'private' stamp: 'di 1/14/1999 22:28'!\rinstVarAt: index put: value\r\tindex = 3 ifTrue: [self stackp: value. ^ value].\r\t^ super instVarAt: index put: value! !\r\r!BlockContext methodsFor: 'private'!\rstartpc\r\t\"for use by the System Tracer only\"\r\r\t^startpc! !\r\r!BlockContext methodsFor: 'private' stamp: 'ar 3/2/2001 01:16'!\rvalueUnpreemptively\r\t\"Evaluate the receiver (block), without the possibility of preemption by higher priority processes. Use this facility VERY sparingly!!\"\r\t\"Think about using Block>>valueUninterruptably first, and think about using Semaphore>>critical: before that, and think about redesigning your application even before that!! \r\tAfter you've done all that thinking, go right ahead and use it...\"\r\t| activeProcess oldPriority result |\r\tactiveProcess _ Processor activeProcess.\r\toldPriority _ activeProcess priority.\r\tactiveProcess priority: Processor highestPriority.\r\tresult _ self ensure: [activeProcess priority: oldPriority].\r\t\"Yield after restoring priority to give the preempted processes a chance to run\"\r\tProcessor yield.\r\t^result! !\r\r\r!BlockContext methodsFor: 'system simulation' stamp: 'di 1/11/1999 10:24'!\rpushArgs: args from: sendr \r\t\"Simulates action of the value primitive.\"\r\r\targs size ~= nargs ifTrue: [^self error: 'incorrect number of args'].\r\tself stackp: 0.\r\targs do: [:arg | self push: arg].\r\tsender _ sendr.\r\tpc _ startpc! !\r\r!BlockContext methodsFor: 'system simulation' stamp: 'hmm 7/30/2001 18:03'!\rstepToSendOrReturn\r\tpc = startpc ifTrue: [\r\t\t\"pop args first\"\r\t\tself numArgs timesRepeat: [self step]].\r\t^super stepToSendOrReturn! !\r\r\r!BlockContext methodsFor: 'exceptions' stamp: 'ajh 3/4/2004 22:36'!\rensure: aBlock\r\t\"Evaluate a termination block after evaluating the receiver, regardless of whether the receiver's evaluation completes.\"\r\r\t| returnValue b |\r\t<primitive: 198>\r\treturnValue := self value.\r\t\"aBlock wasn't nil when execution of this method began; it is nil'd out by the unwind machinery, and that's how we know it's already been evaluated ... otherwise, obviously, it needs to be evaluated\"\r\taBlock == nil ifFalse: [\r\t\t\"nil out aBlock temp before evaluating aBlock so it is not executed again if aBlock remote returns\"\r\t\tb _ aBlock.\r\t\tthisContext tempAt: 1 put: nil.  \"aBlock _ nil\"\r\t\tb value.\r\t].\r\t^ returnValue! !\r\r!BlockContext methodsFor: 'exceptions' stamp: 'ajh 1/24/2003 21:43'!\rifCurtailed: aBlock\r\t\"Evaluate the receiver with an abnormal termination action.\"\r\r\t<primitive: 198>\r\t^ self value! !\r\r!BlockContext methodsFor: 'exceptions' stamp: 'ar 3/6/2001 14:25'!\ron: exception do: handlerAction\r\t\"Evaluate the receiver in the scope of an exception handler.\"\r\t| handlerActive |\r\t<primitive: 199>\r\thandlerActive _ true.\r\t^self value! !\r\r\r!BlockContext methodsFor: 'private-debugger' stamp: 'tfei 3/20/2000 00:24'!\rhideFromDebugger\r\r\t^home ~~ nil and: [home hideFromDebugger]! !\r\r\r!BlockContext methodsFor: 'tiles' stamp: 'RAA 8/16/1999 13:52'!\rvalueWithPossibleArgs: anArray \r\r\tself numArgs = 0 ifTrue: [^self value].\r\tself numArgs = anArray size ifTrue: [^self valueWithArguments: anArray].\r\tself numArgs > anArray size ifTrue: [\r\t\t^self valueWithArguments: anArray,\r\t\t\t\t(Array new: (self numArgs - anArray size))\r\t].\r\t^self valueWithArguments: (anArray copyFrom: 1 to: self numArgs)\r\r! !\rParseNode subclass: #BlockNode\r\tinstanceVariableNames: 'arguments statements returns nArgsNode size remoteCopyNode temporaries'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Compiler'!\r!BlockNode commentStamp: '<historical>' prior: 0!\rI represent a bracketed block with 0 or more arguments and 1 or more statements. If I am initialized with no statements, I create one. I have a flag to tell whether my last statement returns a value from the enclosing method. My last three fields remember data needed for code generation. I can emit for value in the usual way, in which case I create a literal method (actually a context remotely copied) to be evaluated by sending it value: at run time. Or I can emit code to be evaluated in line; this only happens at the top level of a method and in conditionals and while-loops, none of which have arguments.!\r\r\r!BlockNode methodsFor: 'initialize-release'!\rarguments: argNodes statements: statementsCollection returns: returnBool from: encoder\r\t\"Compile.\"\r\r\targuments _ argNodes.\r\tstatements _ statementsCollection size > 0\r\t\t\t\tifTrue: [statementsCollection]\r\t\t\t\tifFalse: [argNodes size > 0\r\t\t\t\t\t\tifTrue: [statementsCollection copyWith: arguments last]\r\t\t\t\t\t\tifFalse: [Array with: NodeNil]].\r\treturns _ returnBool! !\r\r!BlockNode methodsFor: 'initialize-release' stamp: 'sma 3/3/2000 13:38'!\rstatements: statementsCollection returns: returnBool \r\t\"Decompile.\"\r\r\t| returnLast |\r\treturnLast _ returnBool.\r\treturns _ false.\r\tstatements _ \r\t\t(statementsCollection size > 1 \r\t\t\tand: [(statementsCollection at: statementsCollection size - 1) \r\t\t\t\t\tisReturningIf])\r\t\t\t\tifTrue: \r\t\t\t\t\t[returnLast _ false.\r\t\t\t\t\tstatementsCollection allButLast]\r\t\t\t\tifFalse: [statementsCollection size = 0\r\t\t\t\t\t\tifTrue: [Array with: NodeNil]\r\t\t\t\t\t\tifFalse: [statementsCollection]].\r\targuments _ #().\r\ttemporaries _ #().\r\treturnLast ifTrue: [self returnLast]! !\r\r\r!BlockNode methodsFor: 'accessing'!\rarguments: argNodes \r\t\"Decompile.\"\r\r\targuments _ argNodes! !\r\r!BlockNode methodsFor: 'accessing' stamp: 'tk 8/4/1999 22:53'!\rblock\r\t^ self! !\r\r!BlockNode methodsFor: 'accessing'!\rfirstArgument\r\t^ arguments first! !\r\r!BlockNode methodsFor: 'accessing'!\rnumberOfArguments\r\r\t^arguments size! !\r\r!BlockNode methodsFor: 'accessing'!\rreturnLast\r\r\tself returns\r\t\tifFalse: \r\t\t\t[returns _ true.\r\t\t\tstatements at: statements size put: statements last asReturnNode]! !\r\r!BlockNode methodsFor: 'accessing'!\rreturnSelfIfNoOther\r\r\tself returns\r\t\tifFalse: \r\t\t\t[statements last == NodeSelf ifFalse: [statements add: NodeSelf].\r\t\t\tself returnLast]! !\r\r!BlockNode methodsFor: 'accessing' stamp: 'sma 2/27/2000 22:37'!\rtemporaries: aCollection\r\ttemporaries _ aCollection! !\r\r\r!BlockNode methodsFor: 'testing'!\rcanBeSpecialArgument\r\t\"Can I be an argument of (e.g.) ifTrue:?\"\r\r\t^arguments size = 0! !\r\r!BlockNode methodsFor: 'testing'!\risComplex\r\r\t^statements size > 1 or: [statements size = 1 and: [statements first isComplex]]! !\r\r!BlockNode methodsFor: 'testing'!\risJust: node\r\r\treturns ifTrue: [^false].\r\t^statements size = 1 and: [statements first == node]! !\r\r!BlockNode methodsFor: 'testing'!\risJustCaseError\r\r\t^ statements size = 1 and:\r\t\t[statements first\r\t\t\tisMessage: #caseError\r\t\t\treceiver: [:r | r==NodeSelf]\r\t\t\targuments: nil]! !\r\r!BlockNode methodsFor: 'testing'!\risQuick\r\t^ statements size = 1\r\t\tand: [statements first isVariableReference\r\t\t\t\tor: [statements first isSpecialConstant]]! !\r\r!BlockNode methodsFor: 'testing'!\rreturns\r\r\t^returns or: [statements last isReturningIf]! !\r\r\r!BlockNode methodsFor: 'code generation'!\rcode\r\r\t^statements first code! !\r\r!BlockNode methodsFor: 'code generation' stamp: 'di 11/19/1999 19:32'!\remitExceptLast: stack on: aStream\r\t| nextToLast |\r\tnextToLast _ statements size - 1.\r\tnextToLast < 1 ifTrue: [^ self].  \"Only one statement\"\r\t1 to: nextToLast do:\r\t\t[:i | (statements at: i) emitForEffect: stack on: aStream].\r! !\r\r!BlockNode methodsFor: 'code generation'!\remitForEvaluatedEffect: stack on: aStream\r\r\tself returns\r\t\tifTrue: \r\t\t\t[self emitForEvaluatedValue: stack on: aStream.\r\t\t\tstack pop: 1]\r\t\tifFalse: \r\t\t\t[self emitExceptLast: stack on: aStream.\r\t\t\tstatements last emitForEffect: stack on: aStream]! !\r\r!BlockNode methodsFor: 'code generation' stamp: 'di 11/19/1999 19:44'!\remitForEvaluatedValue: stack on: aStream\r\tself emitExceptLast: stack on: aStream.\r\tstatements last emitForValue: stack on: aStream.\r! !\r\r!BlockNode methodsFor: 'code generation' stamp: 'hmm 7/17/2001 21:02'!\remitForValue: stack on: aStream\r\r\taStream nextPut: LdThisContext.\r\tstack push: 1.\r\tnArgsNode emitForValue: stack on: aStream.\r\tremoteCopyNode\r\t\temit: stack\r\t\targs: 1\r\t\ton: aStream.\r\t\"Force a two byte jump.\"\r\tself emitLong: size code: JmpLong on: aStream.\r\tstack push: arguments size.\r\targuments reverseDo: [:arg | arg emitStorePop: stack on: aStream].\r\tself emitForEvaluatedValue: stack on: aStream.\r\tself returns ifFalse: [\r\t\taStream nextPut: EndRemote.\r\t\tpc _ aStream position.\r\t].\r\tstack pop: 1! !\r\r!BlockNode methodsFor: 'code generation' stamp: 'di 11/19/1999 19:33'!\rsizeExceptLast: encoder\r\t| codeSize nextToLast |\r\tnextToLast _ statements size - 1.\r\tnextToLast < 1 ifTrue: [^ 0]. \"Only one statement\"\r\tcodeSize _ 0.\r\t1 to: nextToLast do: \r\t\t[:i | codeSize _ codeSize + ((statements at: i) sizeForEffect: encoder)].\r\t^ codeSize! !\r\r!BlockNode methodsFor: 'code generation'!\rsizeForEvaluatedEffect: encoder\r\r\tself returns ifTrue: [^self sizeForEvaluatedValue: encoder].\r\t^(self sizeExceptLast: encoder)\r\t\t+ (statements last sizeForEffect: encoder)! !\r\r!BlockNode methodsFor: 'code generation'!\rsizeForEvaluatedValue: encoder\r\r\t^(self sizeExceptLast: encoder)\r\t\t+ (statements last sizeForValue: encoder)! !\r\r!BlockNode methodsFor: 'code generation'!\rsizeForValue: encoder\r\tnArgsNode _ encoder encodeLiteral: arguments size.\r\tremoteCopyNode _ encoder encodeSelector: #blockCopy:.\r\tsize _ (self sizeForEvaluatedValue: encoder)\r\t\t\t\t+ (self returns ifTrue: [0] ifFalse: [1]). \"endBlock\"\r\targuments _ arguments collect:  \"Chance to prepare debugger remote temps\"\r\t\t\t\t[:arg | arg asStorableNode: encoder].\r\targuments do: [:arg | size _ size + (arg sizeForStorePop: encoder)].\r\t^1 + (nArgsNode sizeForValue: encoder) \r\t\t+ (remoteCopyNode size: encoder args: 1 super: false) + 2 + size! !\r\r\r!BlockNode methodsFor: 'printing' stamp: 'RAA 7/5/2000 11:43'!\rprintArgumentsOn: aStream indent: level\r\targuments size = 0\r\t\tifTrue: [^ self].\r\taStream dialect = #SQ00\r\t\tifTrue: [aStream\r\t\t\t\twithStyleFor: #setOrReturn\r\t\t\t\tdo: [aStream nextPutAll: 'With'].\r\t\t\targuments\r\t\t\t\tdo: [:arg | \r\t\t\t\t\taStream space.\r\t\t\t\t\taStream\r\t\t\t\t\t\twithStyleFor: #blockArgument\r\t\t\t\t\t\tdo: [aStream nextPutAll: arg key]].\r\t\t\taStream nextPutAll: '. ']\r\t\tifFalse: [arguments\r\t\t\t\tdo: [:arg | aStream\r\t\t\t\t\t\twithStyleFor: #blockArgument\r\t\t\t\t\t\tdo: [aStream nextPutAll: ':';\r\t\t\t\t\t\t\t\t nextPutAll: arg key;\r\t\t\t\t\t\t\t\t space]].\r\t\t\taStream nextPutAll: '| '].\r\t\"If >0 args and >1 statement, put all statements on separate lines\"\r\tstatements size > 1\r\t\tifTrue: [aStream crtab: level]! !\r\r!BlockNode methodsFor: 'printing' stamp: 'di 5/1/2000 23:49'!\rprintOn: aStream indent: level\r\r\t\"statements size <= 1 ifFalse: [aStream crtab: level].\"\r\taStream nextPut: $[.\r\tself printArgumentsOn: aStream indent: level.\r\tself printTemporariesOn: aStream indent: level.\r\tself printStatementsOn: aStream indent: level.\r\taStream nextPut: $]! !\r\r!BlockNode methodsFor: 'printing' stamp: 'di 4/3/1999 23:25'!\rprintStatementsOn: aStream indent: levelOrZero\r\t| len shown thisStatement level |\r\tlevel _ 1 max: levelOrZero.\r\tcomment == nil\r\t\tifFalse: \r\t\t\t[self printCommentOn: aStream indent: level.\r\t\t\taStream crtab: level].\r\tlen _ shown _ statements size.\r\t(levelOrZero = 0 \"top level\" and: [statements last isReturnSelf])\r\t\tifTrue: [shown _ 1 max: shown - 1]\r\t\tifFalse: [(len = 1 and: [((statements at: 1) == NodeNil) & (arguments size = 0)])\r\t\t\t\t\tifTrue: [shown _ shown - 1]].\r\t1 to: shown do: \r\t\t[:i | \r\t\tthisStatement _ statements at: i.\r\t\tthisStatement printOn: aStream indent: level.\r\t\ti < shown ifTrue: [aStream nextPut: $.; crtab: level].\r\t\t(thisStatement comment ~~ nil and: [thisStatement comment size > 0])\r\t\t\tifTrue: \r\t\t\t\t[i = shown ifTrue: [aStream crtab: level].\r\t\t\t\tthisStatement printCommentOn: aStream indent: level.\r\t\t\t\ti < shown ifTrue: [aStream crtab: level]]]! !\r\r!BlockNode methodsFor: 'printing' stamp: 'di 4/5/2000 15:09'!\rprintTemporariesOn: aStream indent: level\r\r\t(temporaries == nil or: [temporaries size = 0])\r\t\tifFalse: \r\t\t\t[aStream nextPut: $|.\r\t\t\ttemporaries do: \r\t\t\t\t[:arg | \r\t\t\t\taStream\r\t\t\t\t\tspace;\r\t\t\t\t\twithStyleFor: #temporaryVariable\r\t\t\t\t\t\tdo: [aStream nextPutAll: arg key]].\r\t\t\taStream nextPutAll: ' | '.\r\t\t\t\"If >0 args and >1 statement, put all statements on separate lines\"\r\t\t\tstatements size > 1 ifTrue: [aStream crtab: level]]! !\r\r\r!BlockNode methodsFor: 'equation translation'!\rstatements\r\t^statements! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rBlockNode class\r\tinstanceVariableNames: ''!\r\r!BlockNode class methodsFor: 'instance creation' stamp: 'sma 3/3/2000 13:34'!\rstatements: statements returns: returns\r\t^ self new statements: statements returns: returns! !\r\r!BlockNode class methodsFor: 'instance creation' stamp: 'sma 3/3/2000 13:34'!\rwithJust: aNode\r\t^ self statements: (Array with: aNode) returns: false! !\rObject subclass: #Boolean\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Objects'!\r!Boolean commentStamp: '<historical>' prior: 0!\rBoolean is an abstract class defining the protocol for logic testing operations and conditional control structures for the logical values represented by the instances of its subclasses True and False.\r\rBoolean redefines #new so no instances of Boolean can be created. It also redefines several messages in the 'copying' protocol to ensure that only one instance of each of its subclasses True (the global true, logical assertion) and False (the global false, logical negation) ever exist in the system.!\r\r\r!Boolean methodsFor: 'logical operations'!\r& aBoolean \r\t\"Evaluating conjunction. Evaluate the argument. Then answer true if \r\tboth the receiver and the argument are true.\"\r\r\tself subclassResponsibility! !\r\r!Boolean methodsFor: 'logical operations'!\reqv: aBoolean \r\t\"Answer true if the receiver is equivalent to aBoolean.\"\r\r\t^self == aBoolean! !\r\r!Boolean methodsFor: 'logical operations'!\rnot\r\t\"Negation. Answer true if the receiver is false, answer false if the \r\treceiver is true.\"\r\r\tself subclassResponsibility! !\r\r!Boolean methodsFor: 'logical operations'!\rxor: aBoolean \r\t\"Exclusive OR. Answer true if the receiver is not equivalent to aBoolean.\"\r\r\t^(self == aBoolean) not! !\r\r!Boolean methodsFor: 'logical operations'!\r| aBoolean \r\t\"Evaluating disjunction (OR). Evaluate the argument. Then answer true \r\tif either the receiver or the argument is true.\"\r\r\tself subclassResponsibility! !\r\r\r!Boolean methodsFor: 'controlling'!\rand: alternativeBlock \r\t\"Nonevaluating conjunction. If the receiver is true, answer the value of \r\tthe argument, alternativeBlock; otherwise answer false without \r\tevaluating the argument.\"\r\r\tself subclassResponsibility! !\r\r!Boolean methodsFor: 'controlling' stamp: 'zz 3/2/2004 23:44'!\rand: block1 and: block2\r\t\"Nonevaluating conjunction without deep nesting.\r\tThe receiver is evaluated, followed by the blocks in order.\r\tIf any of these evaluates as false, then return false immediately,\r\t\twithout evaluating any further blocks.\r\tIf all return true, then return true.\"\r\r\tself ifFalse: [^ false].\r\tblock1 value ifFalse: [^ false].\r\tblock2 value ifFalse: [^ false].\r\t^ true! !\r\r!Boolean methodsFor: 'controlling' stamp: 'zz 3/2/2004 23:44'!\rand: block1 and: block2 and: block3\r\t\"Nonevaluating conjunction without deep nesting.\r\tThe receiver is evaluated, followed by the blocks in order.\r\tIf any of these evaluates as false, then return false immediately,\r\t\twithout evaluating any further blocks.\r\tIf all return true, then return true.\"\r\r\tself ifFalse: [^ false].\r\tblock1 value ifFalse: [^ false].\r\tblock2 value ifFalse: [^ false].\r\tblock3 value ifFalse: [^ false].\r\t^ true! !\r\r!Boolean methodsFor: 'controlling' stamp: 'zz 3/2/2004 23:44'!\rand: block1 and: block2 and: block3 and: block4\r\t\"Nonevaluating conjunction without deep nesting.\r\tThe receiver is evaluated, followed by the blocks in order.\r\tIf any of these evaluates as false, then return false immediately,\r\t\twithout evaluating any further blocks.\r\tIf all return true, then return true.\"\r\r\tself ifFalse: [^ false].\r\tblock1 value ifFalse: [^ false].\r\tblock2 value ifFalse: [^ false].\r\tblock3 value ifFalse: [^ false].\r\tblock4 value ifFalse: [^ false].\r\t^ true! !\r\r!Boolean methodsFor: 'controlling'!\rifFalse: alternativeBlock \r\t\"If the receiver is true (i.e., the condition is true), then the value is the \r\ttrue alternative, which is nil. Otherwise answer the result of evaluating \r\tthe argument, alternativeBlock. Create an error notification if the \r\treceiver is nonBoolean. Execution does not actually reach here because \r\tthe expression is compiled in-line.\"\r\r\tself subclassResponsibility! !\r\r!Boolean methodsFor: 'controlling'!\rifFalse: falseAlternativeBlock ifTrue: trueAlternativeBlock \r\t\"Same as ifTrue:ifFalse:.\"\r\r\tself subclassResponsibility! !\r\r!Boolean methodsFor: 'controlling'!\rifTrue: alternativeBlock \r\t\"If the receiver is false (i.e., the condition is false), then the value is the \r\tfalse alternative, which is nil. Otherwise answer the result of evaluating \r\tthe argument, alternativeBlock. Create an error notification if the \r\treceiver is nonBoolean. Execution does not actually reach here because \r\tthe expression is compiled in-line.\"\r\r\tself subclassResponsibility! !\r\r!Boolean methodsFor: 'controlling'!\rifTrue: trueAlternativeBlock ifFalse: falseAlternativeBlock\r\t\"If the receiver is true (i.e., the condition is true), then answer the value \r\tof the argument trueAlternativeBlock. If the receiver is false, answer the \r\tresult of evaluating the argument falseAlternativeBlock. If the receiver \r\tis a nonBoolean then create an error notification. Execution does not \r\tactually reach here because the expression is compiled in-line.\"\r\r\tself subclassResponsibility! !\r\r!Boolean methodsFor: 'controlling'!\ror: alternativeBlock \r\t\"Nonevaluating disjunction. If the receiver is false, answer the value of \r\tthe argument, alternativeBlock; otherwise answer true without \r\tevaluating the argument.\"\r\r\tself subclassResponsibility! !\r\r!Boolean methodsFor: 'controlling' stamp: 'zz 3/2/2004 23:45'!\ror: block1 or: block2\r\t\"Nonevaluating alternation without deep nesting.\r\tThe receiver is evaluated, followed by the blocks in order.\r\tIf any of these evaluates as true, then return true immediately,\r\t\twithout evaluating any further blocks.\r\tIf all return false, then return false.\"\r\r\tself ifTrue: [^ true].\r\tblock1 value ifTrue: [^ true].\r\tblock2 value ifTrue: [^ true].\r\t^ false! !\r\r!Boolean methodsFor: 'controlling' stamp: 'zz 3/2/2004 23:45'!\ror: block1 or: block2 or: block3\r\t\"Nonevaluating alternation without deep nesting.\r\tThe receiver is evaluated, followed by the blocks in order.\r\tIf any of these evaluates as true, then return true immediately,\r\t\twithout evaluating any further blocks.\r\tIf all return false, then return false.\"\r\r\tself ifTrue: [^ true].\r\tblock1 value ifTrue: [^ true].\r\tblock2 value ifTrue: [^ true].\r\tblock3 value ifTrue: [^ true].\r\t^ false! !\r\r!Boolean methodsFor: 'controlling' stamp: 'zz 3/2/2004 23:45'!\ror: block1 or: block2 or: block3 or: block4\r\t\"Nonevaluating alternation without deep nesting.\r\tThe receiver is evaluated, followed by the blocks in order.\r\tIf any of these evaluates as true, then return true immediately,\r\t\twithout evaluating any further blocks.\r\tIf all return false, then return false.\"\r\r\tself ifTrue: [^ true].\r\tblock1 value ifTrue: [^ true].\r\tblock2 value ifTrue: [^ true].\r\tblock3 value ifTrue: [^ true].\r\tblock4 value ifTrue: [^ true].\r\t^ false! !\r\r\r!Boolean methodsFor: 'copying' stamp: 'tk 6/26/1998 11:32'!\rclone \r\t\"Receiver has two concrete subclasses, True and False.\r\tOnly one instance of each should be made, so return self.\"! !\r\r!Boolean methodsFor: 'copying'!\rdeepCopy \r\t\"Receiver has two concrete subclasses, True and False.\r\tOnly one instance of each should be made, so return self.\"! !\r\r!Boolean methodsFor: 'copying'!\rshallowCopy \r\t\"Receiver has two concrete subclasses, True and False.\r\tOnly one instance of each should be made, so return self.\"! !\r\r!Boolean methodsFor: 'copying' stamp: 'tk 8/20/1998 16:07'!\rveryDeepCopyWith: deepCopier\r\t\"Return self.  I can't be copied.  Do not record me.\"! !\r\r\r!Boolean methodsFor: 'printing' stamp: 'sw 9/27/2001 17:19'!\rbasicType\r\t\"Answer a symbol representing the inherent type of the receiver\"\r\r\t^ #Boolean! !\r\r!Boolean methodsFor: 'printing'!\rstoreOn: aStream \r\t\"Refer to the comment in Object|storeOn:.\"\r\r\tself printOn: aStream! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rBoolean class\r\tinstanceVariableNames: ''!\r\r!Boolean class methodsFor: 'instance creation' stamp: 'sw 5/5/2000 00:31'!\rinitializedInstance\r\t^ nil! !\r\r!Boolean class methodsFor: 'instance creation'!\rnew\r\tself error: 'You may not create any more Booleans - this is two-valued logic'! !\r\r\r!Boolean class methodsFor: 'plugin generation' stamp: 'acg 9/17/1999 01:06'!\rccg: cg emitLoadFor: aString from: anInteger on: aStream\r\r\tcg emitLoad: aString asBooleanValueFrom: anInteger on: aStream ! !\r\r!Boolean class methodsFor: 'plugin generation' stamp: 'acg 10/5/1999 06:05'!\rccg: cg generateCoerceToOopFrom: aNode on: aStream\r\r\tcg generateCoerceToBooleanObjectFrom: aNode on: aStream! !\r\r!Boolean class methodsFor: 'plugin generation' stamp: 'acg 10/5/1999 06:10'!\rccg: cg generateCoerceToValueFrom: aNode on: aStream\r\r\tcg generateCoerceToBooleanValueFrom: aNode on: aStream! !\r\r!Boolean class methodsFor: 'plugin generation' stamp: 'acg 9/18/1999 17:08'!\rccg: cg prolog: aBlock expr: aString index: anInteger\r\r\t^cg ccgLoad: aBlock expr: aString asBooleanValueFrom: anInteger! !\rParseNode subclass: #BraceNode\r\tinstanceVariableNames: 'elements sourceLocations emitNode'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Compiler'!\r!BraceNode commentStamp: '<historical>' prior: 0!\rUsed for compiling and decompiling brace constructs.\r\rThese now compile into either a fast short form for 4 elements or less:\r\tArray braceWith: a with: b ... \ror a long form of indefinfite length:\r\t(Array braceStream: N) nextPut: a; nextPut: b; ...; braceArray.\r\rThe erstwhile brace assignment form is no longer supported.!\r\r\r!BraceNode methodsFor: 'initialize-release'!\relements: collection\r\t\"Decompile.\"\r\r\telements _ collection! !\r\r!BraceNode methodsFor: 'initialize-release'!\relements: collection sourceLocations: locations\r\t\"Compile.\"\r\r\telements _ collection.\r\tsourceLocations _ locations! !\r\r!BraceNode methodsFor: 'initialize-release' stamp: 'di 11/19/1999 11:06'!\rmatchBraceStreamReceiver: receiver messages: messages\r\r\t((receiver isMessage: #braceStream: receiver: nil arguments: [:arg | arg isConstantNumber])\r\t\tand: [messages last isMessage: #braceArray receiver: nil arguments: nil])\r\t\tifFalse: [^ nil \"no match\"].\r\r\t\"Appears to be a long form brace construct\"\r\tself elements: (messages allButLast collect:\r\t\t[:msg | (msg isMessage: #nextPut: receiver: nil arguments: nil)\r\t\t\t\t\tifFalse: [^ nil \"not a brace element\"].\r\t\tmsg arguments first])! !\r\r!BraceNode methodsFor: 'initialize-release' stamp: 'di 11/19/1999 11:19'!\rmatchBraceWithReceiver: receiver selector: selector arguments: arguments\r\r\tselector = (self selectorForShortForm: arguments size)\r\t\tifFalse: [^ nil \"no match\"].\r\r\t\"Appears to be a short form brace construct\"\r\tself elements: arguments! !\r\r\r!BraceNode methodsFor: 'testing'!\rblockAssociationCheck: encoder\r\t\"If all elements are MessageNodes of the form [block]->[block], and there is at\r\t least one element, answer true.\r\t Otherwise, notify encoder of an error.\"\r\r\telements size = 0\r\t\tifTrue: [^encoder notify: 'At least one case required'].\r\telements with: sourceLocations do:\r\t\t\t[:x :loc |\r\t\t\t(x \tisMessage: #->\r\t\t\t\treceiver:\r\t\t\t\t\t[:rcvr |\r\t\t\t\t\t(rcvr isKindOf: BlockNode) and: [rcvr numberOfArguments = 0]]\r\t\t\t\targuments:\r\t\t\t\t\t[:arg |\r\t\t\t\t\t(arg isKindOf: BlockNode) and: [arg numberOfArguments = 0]])\r\t\t\t  ifFalse:\r\t\t\t\t[^encoder notify: 'Association between 0-argument blocks required' at: loc]].\r\t^true! !\r\r!BraceNode methodsFor: 'testing'!\rnumElements\r\r\t^ elements size! !\r\r\r!BraceNode methodsFor: 'code generation' stamp: 'di 11/19/1999 08:58'!\remitForValue: stack on: aStream\r\r\t^ emitNode emitForValue: stack on: aStream! !\r\r!BraceNode methodsFor: 'code generation' stamp: 'di 1/4/2000 11:24'!\rselectorForShortForm: nElements\r\r\tnElements > 4 ifTrue: [^ nil].\r\t^ #(braceWithNone braceWith: braceWith:with:\r\t\t\tbraceWith:with:with: braceWith:with:with:with:) at: nElements + 1! !\r\r!BraceNode methodsFor: 'code generation' stamp: 'di 11/19/1999 11:13'!\rsizeForValue: encoder\r\r\temitNode _ elements size <= 4\r\t\tifTrue: [\"Short form: Array braceWith: a with: b ... \"\r\t\t\t\tMessageNode new\r\t\t\t\t\treceiver: (encoder encodeVariable: #Array)\r\t\t\t\t\tselector: (self selectorForShortForm: elements size)\r\t\t\t\t\targuments: elements precedence: 3 from: encoder]\r\t\tifFalse: [\"Long form: (Array braceStream: N) nextPut: a; nextPut: b; ...; braceArray\"\r\t\t\t\tCascadeNode new\r\t\t\t\t\treceiver: (MessageNode new\r\t\t\t\t\t\t\t\treceiver: (encoder encodeVariable: #Array)\r\t\t\t\t\t\t\t\tselector: #braceStream:\r\t\t\t\t\t\t\t\targuments: (Array with: (encoder encodeLiteral: elements size))\r\t\t\t\t\t\t\t\tprecedence: 3 from: encoder)\r\t\t\t\t\tmessages: ((elements collect: [:elt | MessageNode new receiver: nil\r\t\t\t\t\t\t\t\t\t\t\t\t\t\tselector: #nextPut:\r\t\t\t\t\t\t\t\t\t\t\t\t\t\targuments: (Array with: elt)\r\t\t\t\t\t\t\t\t\t\t\t\t\t\tprecedence: 3 from: encoder])\r\t\t\t\t\t\t\t\tcopyWith: (MessageNode new receiver: nil\r\t\t\t\t\t\t\t\t\t\t\t\t\t\tselector: #braceArray\r\t\t\t\t\t\t\t\t\t\t\t\t\t\targuments: (Array new)\r\t\t\t\t\t\t\t\t\t\t\t\t\t\tprecedence: 1 from: encoder))].\r\t^ emitNode sizeForValue: encoder! !\r\r\r!BraceNode methodsFor: 'enumerating'!\rcasesForwardDo: aBlock\r\t\"For each case in forward order, evaluate aBlock with three arguments:\r\t the key block, the value block, and whether it is the last case.\"\r\r\t| numCases case |\r\t1 to: (numCases _ elements size) do:\r\t\t[:i |\r\t\tcase _ elements at: i.\r\t\taBlock value: case receiver value: case arguments first value: i=numCases]! !\r\r!BraceNode methodsFor: 'enumerating'!\rcasesReverseDo: aBlock\r\t\"For each case in reverse order, evaluate aBlock with three arguments:\r\t the key block, the value block, and whether it is the last case.\"\r\r\t| numCases case |\r\t(numCases _ elements size) to: 1 by: -1 do:\r\t\t[:i |\r\t\tcase _ elements at: i.\r\t\taBlock value: case receiver value: case arguments first value: i=numCases]! !\r\r\r!BraceNode methodsFor: 'printing' stamp: 'di 11/19/1999 09:17'!\rprintOn: aStream indent: level\r\r\taStream nextPut: ${.\r\t1 to: elements size do: \r\t\t[:i | (elements at: i) printOn: aStream indent: level.\r\t\ti < elements size ifTrue: [aStream nextPutAll: '. ']].\r\taStream nextPut: $}! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rBraceNode class\r\tinstanceVariableNames: ''!\r\r!BraceNode class methodsFor: 'examples' stamp: 'di 11/19/1999 09:05'!\rexample\r\t\"Test the {a. b. c} syntax.\"\r\r\t| x |\r\tx _ {1. {2. 3}. 4}.\r\t^ {x first. x second first. x second last. x last. 5} as: Set\r\r\"BraceNode example Set (0 1 2 3 4 5 )\"\r! !\rHalt subclass: #BreakPoint\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Debugger'!\r!BreakPoint commentStamp: 'md 11/18/2003 09:32' prior: 0!\rThis exception is raised on executing a breakpoint.\r\r\"BreakPoint signal\" is called from \"Object>>break\".!\r\rObject subclass: #BreakpointManager\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'Installed'\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Debugger'!\r!BreakpointManager commentStamp: 'emm 5/30/2002 14:20' prior: 0!\rThis class manages methods that include breakpoints.\rIt has several class methods to install and uninstall breakpoints.\r\rEvaluating \"BreakpointManager clear\" will remove all installed breakpoints in the system.\r\rKnown issues:\r- currently, only break-on-entry type of breakpoints are supported\r- emphasis change not implemented for MVC browsers\r- uninstalling the breakpoint doesn't auto-update other browsers\r- uninstalling a breakpoint while debugging should restart-simulate the current method\r\rErnest Micklei, 2002\r\rSend comments to emicklei@philemonworks.com!\r\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rBreakpointManager class\r\tinstanceVariableNames: ''!\r\r!BreakpointManager class methodsFor: 'install-uninstall' stamp: 'emm 5/30/2002 09:37'!\rinstallInClass: aClass selector: aSymbol \r\t\"Install a new method containing a breakpoint.\r\tThe receiver will remember this for unstalling it later\"\r\r\t| breakMethod |\r\tbreakMethod _ self compilePrototype: aSymbol in: aClass.\r\tbreakMethod isNil\r\t\tifTrue: [^ nil].\r\tself installed at: breakMethod put: aClass >> aSymbol. \"old method\"\r\taClass methodDictionary at: aSymbol put: breakMethod.! !\r\r!BreakpointManager class methodsFor: 'install-uninstall' stamp: 'emm 4/24/2002 23:24'!\runInstall: breakMethod \r\r\t| who oldMethod |\r\toldMethod _ self installed at: breakMethod ifAbsent:[^self].\r\twho _ breakMethod who.\r\t(who first methodDictionary at: who last) == breakMethod\r\t\tifTrue:[\twho first methodDictionary at: who last put: oldMethod].\r\tself installed removeKey: breakMethod! !\r\r\r!BreakpointManager class methodsFor: 'private' stamp: 'emm 5/30/2002 09:36'!\rbreakpointMethodSourceFor: aSymbol in: aClass \r\t\"Compose new source containing a break statement (currently it will be the first,\r\tlater we want to insert it in any place)\"\r\r\t| oldSource methodNode breakOnlyMethodNode sendBreakMessageNode |\r\toldSource := aClass sourceCodeAt: aSymbol.\r\tmethodNode := aClass compilerClass new\r\t\tcompile: oldSource\r\t\tin: aClass \r\t\tnotifying: nil \r\t\tifFail: [self error: '[breakpoint] unable to install breakpoint'].\r\tbreakOnlyMethodNode := aClass compilerClass new\r\t\tcompile: 'temporaryMethodSelectorForBreakpoint\rself break.\r^self'\r\t\tin: aClass \r\t\tnotifying: nil \r\t\tifFail: [self error: '[breakpoint] unable to install breakpoint'].\r\tsendBreakMessageNode := breakOnlyMethodNode block statements first.\r\tmethodNode block statements addFirst: sendBreakMessageNode.\r\t^methodNode printString\r\t! !\r\r!BreakpointManager class methodsFor: 'private' stamp: 'emm 5/30/2002 09:33'!\rcompilePrototype: aSymbol in: aClass \r\t\"Compile and return a new method containing a break statement\"\r\r\t| source node method |\r\tsource := self breakpointMethodSourceFor: aSymbol in: aClass.\r\tnode := aClass compilerClass new\r\t\tcompile: source\r\t\tin: aClass \r\t\tnotifying: nil \r\t\tifFail: [self error: '[breakpoint] unable to install breakpoint'].\r\tnode isNil ifTrue: [^nil].\r\t\"dunno what the arguments mean...\"\r\tmethod := node generate: #(0 0 0 0).\r\t^method! !\r\r!BreakpointManager class methodsFor: 'private' stamp: 'emm 4/24/2002 23:24'!\rinstalled\r\tInstalled isNil ifTrue:[Installed := IdentityDictionary new].\r\t^Installed! !\r\r\r!BreakpointManager class methodsFor: 'intialization-release' stamp: 'emm 5/30/2002 09:08'!\rclear\r\n\t\"BreakpointManager clear\"\r\r\n\tself installed copy keysDo:[ :breakMethod |\r\t\tself unInstall: breakMethod].\r\t\t\r\t\t! !\r\r\r!BreakpointManager class methodsFor: 'testing' stamp: 'emm 5/30/2002 09:22'!\rmethodHasBreakpoint: aMethod\r\t^self installed includesKey: aMethod! !\rCodeHolder subclass: #Browser\r\tinstanceVariableNames: 'systemOrganizer classOrganizer metaClassOrganizer systemCategoryListIndex classListIndex messageCategoryListIndex messageListIndex editSelection metaClassIndicated'\r\tclassVariableNames: 'RecentClasses'\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Browser'!\r!Browser commentStamp: '<historical>' prior: 0!\rI represent a query path into the class descriptions, the software of the system.!\r\r\r!Browser methodsFor: 'accessing' stamp: 'ls 10/28/2003 12:28'!\rcontents\r\t\"Depending on the current selection, different information is retrieved.\r\tAnswer a string description of that information. This information is the\r\tmethod of the currently selected class and message.\"\r\r\t| comment theClass latestCompiledMethod |\r\tlatestCompiledMethod _ currentCompiledMethod.\r\tcurrentCompiledMethod _ nil.\r\r\teditSelection == #none ifTrue: [^ ''].\r\teditSelection == #editSystemCategories \r\t\tifTrue: [^ systemOrganizer printString].\r\teditSelection == #newClass \r\t\tifTrue: [^ (theClass _ self selectedClass)\r\t\t\tifNil:\r\t\t\t\t[Class template: self selectedSystemCategoryName]\r\t\t\tifNotNil:\r\t\t\t\t[Class templateForSubclassOf: theClass category: self selectedSystemCategoryName]].\r\teditSelection == #editClass \r\t\tifTrue:\r\t\t\t[^ self classDefinitionText ].\r\teditSelection == #editComment \r\t\tifTrue:\r\t\t\t[(theClass _ self selectedClass) ifNil: [^ ''].\r\t\t\tcomment _ theClass comment.\r\t\t\tcurrentCompiledMethod _ theClass organization commentRemoteStr.\r\t\t\t^ comment size = 0\r\t\t\t\tifTrue: ['This class has not yet been commented.']\r\t\t\t\tifFalse: [comment]].\r\teditSelection == #hierarchy \r\t\tifTrue: [^ self selectedClassOrMetaClass printHierarchy].\r\teditSelection == #editMessageCategories \r\t\tifTrue: [^ self classOrMetaClassOrganizer printString].\r\teditSelection == #newMessage\r\t\tifTrue:\r\t\t\t[^ (theClass _ self selectedClassOrMetaClass) \r\t\t\t\tifNil: ['']\r\t\t\t\tifNotNil: [theClass sourceCodeTemplate]].\r\teditSelection == #editMessage\r\t\tifTrue:\r\t\t\t[self showingByteCodes ifTrue: [^ self selectedBytecodes].\r\t\t\tcurrentCompiledMethod _ latestCompiledMethod.\r\t\t\t^ self selectedMessage].\r\r\tself error: 'Browser internal error: unknown edit selection.'! !\r\r!Browser methodsFor: 'accessing' stamp: 'nk 3/29/2004 10:11'!\rcontents: input notifying: aController \r\t\"The retrieved information has changed and its source must now be\r\t updated. The information can be a variety of things, depending on\r\t the list selections (such as templates for class or message definition,\r\t methods) or the user menu commands (such as definition, comment,\r\t hierarchy).  Answer the result of updating the source.\"\r\r\t| aString aText theClass |\r\tself changed: #annotation.\r\taString _ input asString.\r\taText _ input asText.\r\teditSelection == #editSystemCategories ifTrue: [^ self changeSystemCategories: aString].\r\teditSelection == #editClass | (editSelection == #newClass) ifTrue: [^ self defineClass: aString notifying: aController].\r\teditSelection == #editComment\r\t\tifTrue: \r\t\t\t[theClass _ self selectedClass.\r\t\t\ttheClass\r\t\t\t\tifNil: \r\t\t\t\t\t[self inform: 'You must select a class\rbefore giving it a comment.'.\r\t\t\t\t\t^ false].\r\t\t\ttheClass comment: aText stamp: Utilities changeStamp.\r\t\t\tself changed: #classCommentText.\r\t\t\t^ true].\r\teditSelection == #hierarchy ifTrue: [^ true].\r\teditSelection == #editMessageCategories ifTrue: [^ self changeMessageCategories: aString].\r\teditSelection == #editMessage | (editSelection == #newMessage)\r\t\tifTrue:\r\t\t\t[^ self okayToAccept\r\t\t\t\tifFalse:\r\t\t\t\t\t[false]\r\t\t\t\tifTrue:\r\t\t\t\t\t[self compileMessage: aText notifying: aController]].\r\teditSelection == #none\r\t\tifTrue: \r\t\t\t[self inform: 'This text cannot be accepted\rin this part of the browser.'.\r\t\t\t^ false].\r\tself error: 'unacceptable accept'! !\r\r!Browser methodsFor: 'accessing' stamp: 'drs 1/6/2003 16:11'!\rcontentsSelection\r\t\"Return the interval of text in the code pane to select when I set the pane's contents\"\r\r\tmessageCategoryListIndex > 0 & (messageListIndex = 0)\r\t\tifTrue: [^ 1 to: 500]\t\"entire empty method template\"\r\t\tifFalse: [^ 1 to: 0]  \"null selection\"! !\r\r!Browser methodsFor: 'accessing' stamp: 'BG 10/29/2003 09:01'!\rcouldBrowseAnyClass\r\t\"Answer whether the receiver is equipped to browse any class. This is in support of the system-brower feature that allows the browser to be redirected at the selected class name.  This implementation is clearly ugly, but the feature it enables is handsome enough.  3/1/96 sw\"\r\r\tself dependents\r\t\tdetect: [:d |\r\t\t\t((d isKindOf: PluggableListView)) and: \r\t\t\t[d getListSelector == #systemCategoryList]]\r\t\tifNone: [^ false].\r\t^ true\r! !\r\r!Browser methodsFor: 'accessing' stamp: 'sma 5/28/2000 11:28'!\rdoItReceiver\r\t\"This class's classPool has been jimmied to be the classPool of the class \r\tbeing browsed. A doIt in the code pane will let the user see the value of \r\tthe class variables.\"\r\r\t^ self selectedClass ifNil: [FakeClassPool new]! !\r\r!Browser methodsFor: 'accessing'!\reditSelection\r\t^editSelection! !\r\r!Browser methodsFor: 'accessing' stamp: 'nk 2/15/2004 13:27'!\reditSelection: aSelection\r\t\"Set the editSelection as requested.\"\r\r\teditSelection _ aSelection.\r\tself changed: #editSelection.! !\r\r!Browser methodsFor: 'accessing' stamp: 'sw 10/30/1999 22:59'!\rnoteSelectionIndex: anInteger for: aSymbol\r\taSymbol == #systemCategoryList\r\t\tifTrue:\r\t\t\t[systemCategoryListIndex _ anInteger].\r\taSymbol == #classList\r\t\tifTrue:\r\t\t\t[classListIndex _ anInteger].\r\taSymbol == #messageCategoryList\r\t\tifTrue:\r\t\t\t[messageCategoryListIndex _ anInteger].\r\taSymbol == #messageList\r\t\tifTrue:\r\t\t\t[messageListIndex _ anInteger].! !\r\r!Browser methodsFor: 'accessing' stamp: 'jm 4/28/1998 05:55'!\rrequest: prompt initialAnswer: initialAnswer\r\r\t^ FillInTheBlank\r\t\trequest: prompt\r\t\tinitialAnswer: initialAnswer\r! !\r\r!Browser methodsFor: 'accessing' stamp: 'sw 1/4/2001 12:24'!\rspawn: aString \r\t\"Create and schedule a fresh browser and place aString in its code pane.  This method is called when the user issues the #spawn command (cmd-o) in any code pane.  Whatever text was in the original code pane comes in to this method as the aString argument; the changes in the original code pane have already been cancelled by the time this method is called, so aString is the only copy of what the user had in his code pane.\"\r\r\tself selectedClassOrMetaClass ifNotNil: [^ super spawn: aString].\r\r\tsystemCategoryListIndex ~= 0\r\t\tifTrue:\r\t\t\t[\"This choice is slightly useless but is the historical implementation\"\r\t\t\t^ self buildSystemCategoryBrowserEditString: aString].\r\t\t\r\t^ super spawn: aString  \r\t\"This bail-out at least saves the text being spawned, which would otherwise be lost\"! !\r\r!Browser methodsFor: 'accessing' stamp: 'sw 9/26/2002 17:56'!\rsuggestCategoryToSpawnedBrowser: aBrowser\r\t\"aBrowser is a message-category browser being spawned from the receiver.  Tell it what it needs to know to get its category info properly set up.\"\r\r\t(self isMemberOf: Browser) \"yecch, but I didn't invent the browser hierarchy\"\r\t\tifTrue:\r\t\t\t[aBrowser messageCategoryListIndex: (self messageCategoryList indexOf: self categoryOfCurrentMethod ifAbsent: [2])]\r\t\tifFalse:\r\t\t\t[aBrowser setOriginalCategoryIndexForCurrentMethod]! !\r\r\r!Browser methodsFor: 'annotation' stamp: 'sw 8/26/2002 10:00'!\rannotation\r\t\"Provide a line of content for an annotation pane, representing information about the method associated with the selected class and selector in the receiver.\"\r\r\t|  aSelector aClass |\r\t(aClass _ self selectedClassOrMetaClass) == nil ifTrue: [^ '------'].\r\tself editSelection == #editComment ifTrue:\r\t\t[^ self annotationForSelector: #Comment ofClass: aClass].\r\r\tself editSelection == #editClass ifTrue:\r\t\t[^ self annotationForSelector: #Definition ofClass: aClass].\r\t(aSelector _ self selectedMessageName) ifNil: [^ '------'].\r\t^ self annotationForSelector: aSelector ofClass: aClass! !\r\r\r!Browser methodsFor: 'breakpoints' stamp: 'emm 5/30/2002 09:23'!\rtoggleBreakOnEntry\r\t\"Install or uninstall a halt-on-entry breakpoint\"\r\r\t| selectedMethod |\r\tself selectedClassOrMetaClass isNil ifTrue:[^self].\r\tselectedMethod := self selectedClassOrMetaClass >> self selectedMessageName.\r\tselectedMethod hasBreakpoint\r\t\tifTrue:\r\t\t\t[BreakpointManager unInstall: selectedMethod]\r\t\tifFalse:\r\t\t\t[BreakpointManager \r\t\t\t\tinstallInClass: self selectedClassOrMetaClass\r\t\t\t\tselector: self selectedMessageName].\r\tself changed: #messageList\r\t\t! !\r\r\r!Browser methodsFor: 'class comment pane' stamp: 'nk 2/15/2004 13:19'!\rclassComment: aText notifying: aPluggableTextMorph \r\t\"The user has just entered aText.\r\tIt may be all red (a side-effect of replacing the default comment), so remove the color if it is.\"\r\r\t| theClass cleanedText redRange |\r\ttheClass := self selectedClassOrMetaClass.\r\ttheClass\r\t\tifNotNil: [cleanedText := aText asText.\r\t\t\tredRange := cleanedText rangeOf: TextColor red startingAt: 1.\r\t\t\tredRange size = cleanedText size\r\t\t\t\tifTrue: [cleanedText\r\t\t\t\t\t\tremoveAttribute: TextColor red\r\t\t\t\t\t\tfrom: 1\r\t\t\t\t\t\tto: redRange last ].\r\t\t\ttheClass classComment: aText].\r\tself changed: #classCommentText.\r\t^ true! !\r\r\r!Browser methodsFor: 'class functions' stamp: 'sd 5/23/2003 14:23'!\raddAllMethodsToCurrentChangeSet\r\t\"Add all the methods in the selected class or metaclass to the current change set.  You ought to know what you're doing before you invoke this!!\"\r\r\t| aClass |\r\t(aClass _ self selectedClassOrMetaClass) ifNotNil:\r\t\t[aClass selectors do:\r\t\t\t[:sel |\r\t\t\t\tChangeSet current adoptSelector: sel forClass: aClass].\r\t\tself changed: #annotation]\r! !\r\r!Browser methodsFor: 'class functions'!\rbuildClassBrowser\r\t\"Create and schedule a new class category browser for the current class \r\tselection, if one exists.\"\r\r\tself buildClassBrowserEditString: nil! !\r\r!Browser methodsFor: 'class functions' stamp: 'nk 2/14/2004 14:32'!\rclassCommentText\r\t\"return the text to display for the comment of the currently selected class\"\r\t| theClass |\r\ttheClass _ self selectedClassOrMetaClass.\r\ttheClass ifNil: [ ^''].\r\r\t^ theClass hasComment\r\t\tifTrue: [  theClass comment  ]\r\t\tifFalse: [ Text string: 'THIS CLASS HAS NO COMMENT!!' translated attribute: TextColor red ]! !\r\r!Browser methodsFor: 'class functions' stamp: 'nk 2/14/2004 15:11'!\rclassDefinitionText\r\t\"return the text to display for the definition of the currently selected class\"\r\t| theClass |\r\ttheClass _ self selectedClassOrMetaClass.\r\ttheClass ifNil: [ ^''].\r\r\t^theClass definitionST80: Preferences printAlternateSyntax not! !\r\r!Browser methodsFor: 'class functions' stamp: 'sw 12/6/2000 16:32'!\rclassListMenu: aMenu \r\t\"For backward compatibility with old browers stored in image segments\"\r\r\t^ self classListMenu: aMenu shifted: false! !\r\r!Browser methodsFor: 'class functions' stamp: 'sw 2/27/2001 12:06'!\rclassListMenu: aMenu shifted: shifted\r\t\"Set up the menu to apply to the receiver's class list, honoring the #shifted boolean\"\r\r\tshifted\r\t\tifTrue:\r\t\t\t[^ self shiftedClassListMenu: aMenu].\r\taMenu addList: #(\r\t\t-\r\t\t('browse full (b)'\t\t\tbrowseMethodFull)\r\t\t('browse hierarchy (h)'\t\tspawnHierarchy)\r\t\t('browse protocol (p)'\t\tbrowseFullProtocol)\r\t\t-\r\t\t('printOut'\t\t\t\t\tprintOutClass)\r\t\t('fileOut'\t\t\t\t\tfileOutClass)\r\t\t-\r\t\t('show hierarchy'\t\t\thierarchy)\r\t\t('show definition'\t\t\teditClass)\r\t\t('show comment'\t\t\teditComment)\r\t\t-\r\t\t('inst var refs...'\t\t\tbrowseInstVarRefs)\r\t\t('inst var defs...'\t\t\tbrowseInstVarDefs)\r\t\t-\r\t\t('class var refs...'\t\t\tbrowseClassVarRefs)\r\t\t('class vars'\t\t\t\t\tbrowseClassVariables)\r\t\t('class refs (N)'\t\t\t\tbrowseClassRefs)\r\t\t-\r\t\t('rename class ...'\t\t\trenameClass)\r\t\t('copy class'\t\t\t\tcopyClass)\r\t\t('remove class (x)'\t\t\tremoveClass)\r\t\t-\r\t\t('find method...'\t\t\t\tfindMethod)\r\t\t-\r\t\t('more...'\t\t\t\t\tofferShiftedClassListMenu)).\r\t^ aMenu! !\r\r!Browser methodsFor: 'class functions' stamp: 'dwh 11/23/1999 00:09'!\rcopyClass\r\t| originalName copysName class oldDefinition newDefinition |\r\tclassListIndex = 0 ifTrue: [^ self].\r\tself okToChange ifFalse: [^ self].\r\toriginalName _ self selectedClass name.\r\tcopysName _ self request: 'Please type new class name' initialAnswer: originalName.\r\tcopysName = '' ifTrue: [^ self].  \" Cancel returns '' \"\r\tcopysName _ copysName asSymbol.\r\tcopysName = originalName ifTrue: [^ self].\r\t(Smalltalk includesKey: copysName)\r\t\tifTrue: [^ self error: copysName , ' already exists'].\r\toldDefinition _ self selectedClass definition.\r\tnewDefinition _ oldDefinition copyReplaceAll: '#' , originalName asString with: '#' , copysName asString.\r\tCursor wait \r\t\tshowWhile: [class _ Compiler evaluate: newDefinition logged: true.\r\t\t\t\t\tclass copyAllCategoriesFrom: (Smalltalk at: originalName).\r\t\t\t\t\tclass class copyAllCategoriesFrom: (Smalltalk at: originalName) class].\r\tself classListIndex: 0.\r\tself changed: #classList! !\r\r!Browser methodsFor: 'class functions' stamp: 'sw 10/22/2002 16:10'!\rcreateInstVarAccessors\r\t\"Create getters and setters for all inst vars defined at the level of the current class selection, except do NOT clobber or override any selectors already understood by the instances of the selected class\"\r\r\t| aClass newMessage setter |\r\t(aClass _ self selectedClassOrMetaClass) ifNotNil:\r\t\t[aClass instVarNames do: \r\t\t\t[:aName |\r\t\t\t\t(aClass canUnderstand: aName asSymbol)\r\t\t\t\t\tifFalse:\r\t\t\t\t\t\t[newMessage _ aName, '\r\t\"Answer the value of ', aName, '\"\r\r\t^ ', aName.\r\t\t\t\t\t\taClass compile: newMessage classified: 'accessing' notifying: nil].\r\t\t\t\t(aClass canUnderstand: (setter _ aName, ':') asSymbol)\r\t\t\t\t\tifFalse:\r\t\t\t\t\t\t[newMessage _ setter, ' anObject\r\t\"Set the value of ', aName, '\"\r\r\t', aName, ' _ anObject'.\r\t\t\t\t\t\taClass compile: newMessage classified: 'accessing' notifying: nil]]]! !\r\r!Browser methodsFor: 'class functions' stamp: 'sw 11/21/2003 21:45'!\rdefineClass: defString notifying: aController  \r\t\"The receiver's textual content is a request to define a new class. The\r\tsource code is defString. If any errors occur in compilation, notify\r\taController.\"\r\t| oldClass class newClassName defTokens keywdIx envt |\r\toldClass _ self selectedClassOrMetaClass.\r\tdefTokens _ defString findTokens: Character separators.\r\tkeywdIx _ defTokens findFirst: [:x | x beginsWith: 'category'].\r\tenvt _ Smalltalk environmentForCategory: ((defTokens at: keywdIx+1) copyWithout: $').\r\tkeywdIx _ defTokens findFirst: [:x | '*subclass*' match: x].\r\tnewClassName _ (defTokens at: keywdIx+1) copyWithoutAll: '#()'.\r\t((oldClass isNil or: [oldClass theNonMetaClass name asString ~= newClassName])\r\t\tand: [envt includesKeyOrAbove: newClassName asSymbol]) ifTrue:\r\t\t\t[\"Attempting to define new class over existing one when\r\t\t\t\tnot looking at the original one in this browser...\"\r\t\t\t(self confirm: ((newClassName , ' is an existing class in this system.\rRedefining it might cause serious problems.\rIs this really what you want to do?') asText makeBoldFrom: 1 to: newClassName size))\r\t\t\t\tifFalse: [^ false]].\r\t\"ar 8/29/1999: Use oldClass superclass for defining oldClass\r\tsince oldClass superclass knows the definerClass of oldClass.\"\r\toldClass ifNotNil:[oldClass _ oldClass superclass].\r\tclass _ oldClass subclassDefinerClass\r\t\t\t\tevaluate: defString\r\t\t\t\tnotifying: aController\r\t\t\t\tlogged: true.\r\t(class isKindOf: Behavior)\r\t\tifTrue: [self changed: #systemCategoryList.\r\t\t\t\tself changed: #classList.\r\t\t\t\tself clearUserEditFlag.\r\t\t\t\tself setClass: class selector: nil.\r\t\t\t\t\"self clearUserEditFlag; editClass.\"\r\t\t\t\t^ true]\r\t\tifFalse: [^ false]! !\r\r!Browser methodsFor: 'class functions' stamp: 'nk 2/15/2004 13:23'!\reditClass\r\t\"Retrieve the description of the class definition.\"\r\r\tclassListIndex = 0 ifTrue: [^ self].\r\tself okToChange ifFalse: [^ self].\r\tself messageCategoryListIndex: 0.\r\tself editSelection: #editClass.\r\tself changed: #contents.\r\tself changed: #classCommentText.\r! !\r\r!Browser methodsFor: 'class functions' stamp: 'nk 2/14/2004 15:08'!\reditComment\r\t\"Retrieve the description of the class comment.\"\r\r\tclassListIndex = 0 ifTrue: [^ self].\r\tself okToChange ifFalse: [^ self].\r\tself messageCategoryListIndex: 0.\r\tmetaClassIndicated _ false.\r\tself editSelection: #editComment.\r\tself changed: #classSelectionChanged.\r\tself changed: #messageCategoryList.\r\tself changed: #messageList.\r\tself decorateButtons.\r\tself contentsChanged\r! !\r\r!Browser methodsFor: 'class functions' stamp: 'nb 5/6/2003 16:49'!\rexplainSpecial: string \r\t\"Answer a string explaining the code pane selection if it is displaying \r\tone of the special edit functions.\"\r\r\t| classes whole lits reply |\r\t(editSelection == #editClass or: [editSelection == #newClass])\r\t\tifTrue: \r\t\t\t[\"Selector parts in class definition\"\r\t\t\tstring last == $: ifFalse: [^nil].\r\t\t\tlits _ Array with:\r\t\t\t\t#subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:.\r\t\t\t(whole _ lits detect: [:each | (each keywords\r\t\t\t\t\tdetect: [:frag | frag = string] ifNone: []) ~~ nil]\r\t\t\t\t\t\tifNone: []) ~~ nil\r\t\t\t\tifTrue: [reply _ '\"' , string , ' is one part of the message selector ' , whole , '.']\r\t\t\t\tifFalse: [^nil].\r\t\t\tclasses _ self systemNavigation allClassesImplementing: whole.\r\t\t\tclasses _ 'these classes ' , classes printString.\r\t\t\t^reply , '  It is defined in ' , classes , '.\"\rSmalltalk browseAllImplementorsOf: #' , whole].\r\r\teditSelection == #hierarchy\r\t\tifTrue: \r\t\t\t[\"Instance variables in subclasses\"\r\t\t\tclasses _ self selectedClassOrMetaClass allSubclasses.\r\t\t\tclasses _ classes detect: [:each | (each instVarNames\r\t\t\t\t\t\tdetect: [:name | name = string] ifNone: []) ~~ nil]\r\t\t\t\t\tifNone: [^nil].\r\t\t\tclasses _ classes printString.\r\t\t\t^'\"is an instance variable in class ' , classes , '.\"\r' , classes , ' browseAllAccessesTo: ''' , string , '''.'].\r\teditSelection == #editSystemCategories ifTrue: [^nil].\r\teditSelection == #editMessageCategories ifTrue: [^nil].\r\t^nil! !\r\r!Browser methodsFor: 'class functions' stamp: 'tk 4/2/98 13:50'!\rfileOutClass\r\t\"Print a description of the selected class onto a file whose name is the \r\tcategory name followed by .st.\"\r\rCursor write showWhile:\r\t\t[classListIndex ~= 0 ifTrue: [self selectedClass fileOut]]! !\r\r!Browser methodsFor: 'class functions' stamp: 'je 12/4/2002 18:10'!\rfindMethod\r\t\"Pop up a list of the current class's methods, and select the one chosen by the user\"\r\r\t| aClass selectors reply cat messageCatIndex messageIndex |\r\tself classListIndex = 0 ifTrue: [^ self].\r\tself okToChange ifFalse: [^ self].\r\taClass _ self selectedClassOrMetaClass.\r\tselectors _ aClass selectors asSortedArray.\r\tselectors isEmpty ifTrue: [self inform: aClass name, ' has no methods.'. ^ self].\r\treply _ (SelectionMenu labelList: selectors selections: selectors) startUp.\r\treply == nil ifTrue: [^ self].\r\tcat _ aClass whichCategoryIncludesSelector: reply.\r\tmessageCatIndex _ self messageCategoryList indexOf: cat.\r\tself messageCategoryListIndex: messageCatIndex.\r\tmessageIndex _ (self messageList indexOf: reply).\r\tself messageListIndex: messageIndex! !\r\r!Browser methodsFor: 'class functions' stamp: 'nk 2/14/2004 15:09'!\rhierarchy\r\t\"Display the inheritance hierarchy of the receiver's selected class.\"\r\r\tclassListIndex = 0 ifTrue: [^ self].\r\tself okToChange ifFalse: [^ self].\r\tself messageCategoryListIndex: 0.\r\tself editSelection: #hierarchy.\r\tself changed: #editComment.\r\tself contentsChanged.\r\t^ self! !\r\r!Browser methodsFor: 'class functions' stamp: 'nk 2/14/2004 15:07'!\rmakeNewSubclass\r\r\tself selectedClassOrMetaClass ifNil: [^ self].\r\tself okToChange ifFalse: [^ self].\r\tself editSelection: #newClass.\r\tself contentsChanged! !\r\r!Browser methodsFor: 'class functions' stamp: 'nk 2/14/2004 15:09'!\rplusButtonHit\r\t\"Cycle among definition, comment, and hierachy\"\r\r\teditSelection == #editComment\r\t\tifTrue: [self hierarchy. ^ self].\r\teditSelection == #hierarchy\r\t\tifTrue: [self editSelection: #editClass.\r\t\t\tclassListIndex = 0 ifTrue: [^ self].\r\t\t\tself okToChange ifFalse: [^ self].\r\t\t\tself changed: #editComment.\r\t\t\tself contentsChanged.\r\t\t\t^ self].\r\tself editComment! !\r\r!Browser methodsFor: 'class functions' stamp: 'tk 4/2/98 13:50'!\rprintOutClass\r\t\"Print a description of the selected class onto a file whose name is the \r\tcategory name followed by .html.\"\r\rCursor write showWhile:\r\t\t[classListIndex ~= 0 ifTrue: [self selectedClass fileOutAsHtml: true]]! !\r\r!Browser methodsFor: 'class functions' stamp: 'sw 3/5/2001 18:04'!\rremoveClass\r\t\"If the user confirms the wish to delete the class, do so\"\r\r\tsuper removeClass ifTrue:\r\t\t[self classListIndex: 0]! !\r\r!Browser methodsFor: 'class functions' stamp: 'sd 4/29/2003 11:49'!\rrenameClass\r\t| oldName newName obs |\r\tclassListIndex = 0\r\t\tifTrue: [^ self].\r\tself okToChange\r\t\tifFalse: [^ self].\r\toldName _ self selectedClass name.\r\tnewName _ self request: 'Please type new class name' initialAnswer: oldName.\r\tnewName = ''\r\t\tifTrue: [^ self].\r\t\"Cancel returns ''\"\r\tnewName _ newName asSymbol.\r\tnewName = oldName\r\t\tifTrue: [^ self].\r\t(Smalltalk includesKey: newName)\r\t\tifTrue: [^ self error: newName , ' already exists'].\r\tself selectedClass rename: newName.\r\tself changed: #classList.\r\tself\r\t\tclassListIndex: ((systemOrganizer listAtCategoryNamed: self selectedSystemCategoryName)\r\t\t\t\tindexOf: newName).\r\tobs _ self systemNavigation\r\t\t\t\tallCallsOn: (Smalltalk associationAt: newName).\r\tobs isEmpty\r\t\tifFalse: [self systemNavigation\r\t\t\t\tbrowseMessageList: obs\r\t\t\t\tname: 'Obsolete References to ' , oldName\r\t\t\t\tautoSelect: oldName]! !\r\r!Browser methodsFor: 'class functions' stamp: 'BG 11/1/2003 13:59'!\rshiftedClassListMenu: aMenu\r\t\"Set up the menu to apply to the receiver's class list when the shift key is down\"\r\r\t^ aMenu addList: #(\r\t\t\t-\r\t\t\t('unsent methods'\t\t\tbrowseUnusedMethods\t'browse all methods defined by this class that have no senders')\r\t\t\t('unreferenced inst vars'\tshowUnreferencedInstVars\t'show a list of all instance variables that are not referenced in methods')\r\t\t\t('unreferenced class vars'\tshowUnreferencedClassVars\t'show a list of all class variables that are not referenced in methods')\r\t\t\t('subclass template'\t\t\tmakeNewSubclass\t\t'put a template into the code pane for defining of a subclass of this class')\r\t\t\t-\r\t\t\t('sample instance'\t\t\tmakeSampleInstance\t\t'give me a sample instance of this class, if possible')\r\t\t\t('inspect instances'\t\t\tinspectInstances\t\t\t'open an inspector on all the extant instances of this class')\r\t\t\t('inspect subinstances'\t\tinspectSubInstances\t\t'open an inspector on all the extant instances of this class and of all of its subclasses')\r\t\t\t-\r\t\t\t\r\t\t\t('add all meths to current chgs'\t\taddAllMethodsToCurrentChangeSet\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'place all the methods defined by this class into the current change set')\r\t\t\t('create inst var accessors'\tcreateInstVarAccessors\t'compile instance-variable access methods for any instance variables that do not yet have them')\r\t\t\t-\r\t\t\t('more...'\t\t\t\t\tofferUnshiftedClassListMenu\t'return to the standard class-list menu'))! !\r\r\r!Browser methodsFor: 'class list'!\rclassList\r\t\"Answer an array of the class names of the selected category. Answer an \r\tempty array if no selection exists.\"\r\r\tsystemCategoryListIndex = 0\r\t\tifTrue: [^Array new]\r\t\tifFalse: [^systemOrganizer listAtCategoryNumber: systemCategoryListIndex]! !\r\r!Browser methodsFor: 'class list'!\rclassListIndex\r\t\"Answer the index of the current class selection.\"\r\r\t^classListIndex! !\r\r!Browser methodsFor: 'class list' stamp: 'nk 2/14/2004 15:07'!\rclassListIndex: anInteger \r\t\"Set anInteger to be the index of the current class selection.\"\r\r\t| className |\r\r\tclassListIndex _ anInteger.\r\tself setClassOrganizer.\r\tmessageCategoryListIndex _ 0.\r\tmessageListIndex _ 0.\r\tself classCommentIndicated\r\t\tifTrue: []\r\t\tifFalse: [self editSelection: (anInteger = 0\r\t\t\t\t\tifTrue: [metaClassIndicated | (systemCategoryListIndex == 0)\r\t\t\t\t\t\tifTrue: [#none]\r\t\t\t\t\t\tifFalse: [#newClass]]\r\t\t\t\t\tifFalse: [#editClass])].\r\tcontents _ nil.\r\tself selectedClass isNil\r\t\tifFalse: [className _ self selectedClass name.\r\t\t\t\t\t(RecentClasses includes: className)\r\t\t\t\tifTrue: [RecentClasses remove: className].\r\t\t\tRecentClasses addFirst: className.\r\t\t\tRecentClasses size > 16\r\t\t\t\tifTrue: [RecentClasses removeLast]].\r\tself changed: #classSelectionChanged.\r\tself changed: #classCommentText.\r\tself changed: #classListIndex.\t\"update my selection\"\r\tself changed: #messageCategoryList.\r\tself changed: #messageList.\r\tself changed: #relabel.\r\tself contentsChanged! !\r\r!Browser methodsFor: 'class list' stamp: 'tk 4/5/98 12:25'!\rclassListSingleton\r\r\t| name |\r\tname _ self selectedClassName.\r\t^ name ifNil: [Array new]\r\t\tifNotNil: [Array with: name]! !\r\r!Browser methodsFor: 'class list' stamp: 'nb 6/17/2003 12:25'!\rrecent\r\t\"Let the user select from a list of recently visited classes.  11/96 stp.\r\t 12/96 di:  use class name, not classes themselves.\r\t : dont fall into debugger in empty case\"\r\r\t| className class recentList |\r\trecentList _ RecentClasses select: [:n | Smalltalk includesKey: n].\r\trecentList size == 0 ifTrue: [^ Beeper beep].\r\tclassName := (SelectionMenu selections: recentList) startUp.\r\tclassName == nil ifTrue: [^ self].\r\tclass := Smalltalk at: className.\r\tself selectCategoryForClass: class.\r\tself classListIndex: (self classList indexOf: class name)! !\r\r!Browser methodsFor: 'class list' stamp: 'sr 10/29/1999 20:28'!\rselectClass: classNotMeta\r\tself classListIndex: (self classList indexOf: classNotMeta name)! !\r\r!Browser methodsFor: 'class list' stamp: 'di 12/6/1999 20:41'!\rselectedClass\r\t\"Answer the class that is currently selected. Answer nil if no selection \r\texists.\"\r\r\t| name envt |\r\t(name _ self selectedClassName) ifNil: [^ nil].\r\t(envt _ self selectedEnvironment) ifNil: [^ nil].\r\t^ envt at: name! !\r\r!Browser methodsFor: 'class list' stamp: 'sw 11/24/1999 14:48'!\rselectedClassName\r\t| aClassList |\r\t\"Answer the name of the current class. Answer nil if no selection exists.\"\r\r\t(classListIndex = 0 or: [classListIndex > (aClassList _ self classList) size]) ifTrue: [^ nil].\r\t^ aClassList at: classListIndex! !\r\r!Browser methodsFor: 'class list'!\rtoggleClassListIndex: anInteger \r\t\"If anInteger is the current class index, deselect it. Else make it the \r\tcurrent class selection.\"\r\r\tself classListIndex: \r\t\t(classListIndex = anInteger\r\t\t\tifTrue: [0]\r\t\t\tifFalse: [anInteger])! !\r\r\r!Browser methodsFor: 'code pane' stamp: 'asm 6/25/2003 22:48'!\rcompileMessage: aText notifying: aController\r\t\"Compile the code that was accepted by the user, placing the compiled method into an appropriate message category.  Return true if the compilation succeeded, else false.\"\r\r\t| fallBackCategoryIndex fallBackMethodIndex originalSelectorName result |\r\r\tself selectedMessageCategoryName ifNil:\r\t\t\t[ self selectOriginalCategoryForCurrentMethod \t\r\t\t\t\t\t\t\t\t\t\tifFalse:[\"Select the '--all--' category\"\r\t\t\t\t\t\t\t\t\t\t\tself messageCategoryListIndex: 1]]. \r\r\r\tself selectedMessageCategoryName asSymbol = ClassOrganizer allCategory\r\t\tifTrue:\r\t\t\t[ \"User tried to save a method while the ALL category was selected\"\r\t\t\tfallBackCategoryIndex _ messageCategoryListIndex.\r\t\t\tfallBackMethodIndex _ messageListIndex.\r\t\t\teditSelection == #newMessage\r\t\t\t\tifTrue:\r\t\t\t\t\t[ \"Select the 'as yet unclassified' category\"\r\t\t\t\t\tmessageCategoryListIndex _ 0.\r\t\t\t\t\t(result _ self defineMessageFrom: aText notifying: aController)\r\t\t\t\t\t\tifNil:\r\t\t\t\t\t\t\t[\"Compilation failure:  reselect the original category & method\"\r\t\t\t\t\t\t\tmessageCategoryListIndex _ fallBackCategoryIndex.\r\t\t\t\t\t\t\tmessageListIndex _ fallBackMethodIndex]\r\t\t\t\t\t\tifNotNil:\r\t\t\t\t\t\t\t[self setSelector: result]]\r\t\t\t\tifFalse:\r\t\t\t\t\t[originalSelectorName _ self selectedMessageName.\r\t\t\t\t\tself setOriginalCategoryIndexForCurrentMethod.\r\t\t\t\t\tmessageListIndex _ fallBackMethodIndex _ self messageList indexOf: originalSelectorName.\t\t\t\r\t\t\t\t\t(result _ self defineMessageFrom: aText notifying: aController)\r\t\t\t\t\t\tifNotNil:\r\t\t\t\t\t\t\t[self setSelector: result]\r\t\t\t\t\t\tifNil:\r\t\t\t\t\t\t\t[ \"Compilation failure:  reselect the original category & method\"\r\t\t\t\t\t\t\tmessageCategoryListIndex _ fallBackCategoryIndex.\r\t\t\t\t\t\t\tmessageListIndex _ fallBackMethodIndex.\r\t\t\t\t\t\t\t^ result notNil]].\r\t\t\tself changed: #messageCategoryList.\r\t\t\t^ result notNil]\r\t\tifFalse:\r\t\t\t[ \"User tried to save a method while the ALL category was NOT selected\"\r\t\t\t^ (self defineMessageFrom: aText notifying: aController) notNil]! !\r\r!Browser methodsFor: 'code pane' stamp: 'sw 5/18/2001 20:55'!\rshowBytecodes\r\t\"Show or hide the bytecodes of the selected method -- an older protocol now mostly not relevant.\"\r\r\tself toggleShowingByteCodes! !\r\r\r!Browser methodsFor: 'copying' stamp: 'tk 12/5/1999 17:59'!\rveryDeepInner: deepCopier\r\t\"Copy all of my instance variables.  Some need to be not copied at all, but shared.  See DeepCopier class comment.\"\r\rsuper veryDeepInner: deepCopier.\r\"systemOrganizer _ systemOrganizer. \tclone has the old value. we share it\"\r\"classOrganizer _ classOrganizer\t\tclone has the old value. we share it\"\r\"metaClassOrganizer \t_ metaClassOrganizer\tclone has the old value. we share it\"\rsystemCategoryListIndex _ systemCategoryListIndex veryDeepCopyWith: deepCopier.\rclassListIndex _ classListIndex veryDeepCopyWith: deepCopier.\rmessageCategoryListIndex _ messageCategoryListIndex veryDeepCopyWith: deepCopier.\rmessageListIndex _ messageListIndex veryDeepCopyWith: deepCopier.\reditSelection _ editSelection veryDeepCopyWith: deepCopier.\rmetaClassIndicated _ metaClassIndicated veryDeepCopyWith: deepCopier.\r! !\r\r\r!Browser methodsFor: 'drag and drop' stamp: 'mir 5/25/2000 13:08'!\racceptMethod: methodSel dstMessageCategory: dstMessageCategorySel srcMessageCategory: srcMessageCategorySel dstClass: dstClass dstClassOrMeta: dstClassOrMeta srcClassOrMeta: srcClassOrMeta internal: internal copySemantic: copyFlag \r\t| success hierarchyChange higher checkForOverwrite |\r\t(success _ dstClassOrMeta ~~ nil) ifFalse: [^false].\r\tcheckForOverwrite _ dstClassOrMeta selectors includes: methodSel.\r\thierarchyChange _ (higher _ srcClassOrMeta inheritsFrom: dstClassOrMeta) | (dstClassOrMeta inheritsFrom: srcClassOrMeta).\r\tsuccess _ (checkForOverwrite not\r\t\t\t\tor: [self\r\t\t\t\t\t\toverwriteDialogHierarchyChange: hierarchyChange\r\t\t\t\t\t\thigher: higher\r\t\t\t\t\t\tsourceClassName: srcClassOrMeta name\r\t\t\t\t\t\tdestinationClassName: dstClassOrMeta name\r\t\t\t\t\t\tmethodSelector: methodSel])\r\t\t\t\tand: [self\r\t\t\t\t\t\tmessage: methodSel\r\t\t\t\t\t\tcompileInClass: dstClassOrMeta\r\t\t\t\t\t\tfromClass: srcClassOrMeta\r\t\t\t\t\t\tdstMessageCategory: dstMessageCategorySel\r\t\t\t\t\t\tsrcMessageCategory: srcMessageCategorySel\r\t\t\t\t\t\tinternal: internal\r\t\t\t\t\t\tcopySemantic: copyFlag].\r\t^ success! !\r\r!Browser methodsFor: 'drag and drop' stamp: 'mir 5/25/2000 13:27'!\racceptMethod: methodSel messageCategory: srcMessageCategorySel class: srcClassOrMeta atListMorph: dstListMorph internal: internal copy: copyFlag \r\t| success dstClassOrMeta dstClass dstMessageCategorySel |\r\tdstClass _ self dstClassDstListMorph: dstListMorph.\r\tdstClassOrMeta _ dstClass\r\t\t\t\tifNotNil: [self metaClassIndicated\r\t\t\t\t\t\tifTrue: [dstClass class]\r\t\t\t\t\t\tifFalse: [dstClass]].\r\tdstMessageCategorySel _ self dstMessageCategoryDstListMorph: dstListMorph.\r\tsuccess _ (dstClassOrMeta notNil\r\t\t\t\tand: [dstClassOrMeta == srcClassOrMeta])\r\t\t\t\t\t\tifTrue: [\"one class\"\r\t\t\t\t\t\t\tself\r\t\t\t\t\t\t\t\tchangeMessageCategoryForMethod: methodSel\r\t\t\t\t\t\t\t\tdstMessageCategory: dstMessageCategorySel\r\t\t\t\t\t\t\t\tsrcMessageCategory: srcMessageCategorySel\r\t\t\t\t\t\t\t\tinsideClassOrMeta: dstClassOrMeta\r\t\t\t\t\t\t\t\tinternal: internal\r\t\t\t\t\t\t\t\tcopySemantic: copyFlag]\r\t\t\t\t\t\tifFalse: [\"different classes\"\r\t\t\t\t\t\t\tself\r\t\t\t\t\t\t\t\tacceptMethod: methodSel\r\t\t\t\t\t\t\t\tdstMessageCategory: dstMessageCategorySel\r\t\t\t\t\t\t\t\tsrcMessageCategory: srcMessageCategorySel\r\t\t\t\t\t\t\t\tdstClass: dstClass\r\t\t\t\t\t\t\t\tdstClassOrMeta: dstClassOrMeta\r\t\t\t\t\t\t\t\tsrcClassOrMeta: srcClassOrMeta\r\t\t\t\t\t\t\t\tinternal: internal\r\t\t\t\t\t\t\t\tcopySemantic: copyFlag].\r\t^ success! !\r\r!Browser methodsFor: 'drag and drop' stamp: 'mir 5/25/2000 13:27'!\rchangeCategoryForClass: class srcSystemCategory: srcSystemCategorySel atListMorph: dstListMorph internal: internal copy: copyFlag \r\t\"only move semantic\"\r\t| newClassCategory success |\r\tself flag: #stringSymbolProblem.\r\tsuccess _ copyFlag not ifFalse: [^ false].\r\tnewClassCategory _ self dstCategoryDstListMorph: dstListMorph.\r\t(success _ newClassCategory notNil & (newClassCategory ~= class category))\r\t\tifTrue: \r\t\t\t[class category: newClassCategory.\r\t\t\tself changed: #classList.\r\t\t\tinternal ifFalse: [self selectClass: class]].\r\t^ success! !\r\r!Browser methodsFor: 'drag and drop' stamp: 'mir 5/23/2000 17:27'!\rchangeMessageCategoryForMethod: methodSel dstMessageCategory: dstMessageCategorySel srcMessageCategory: srcMessageCategorySel insideClassOrMeta: classOrMeta internal: internal copySemantic: copyFlag \r\t\"only move semantic\"\r\t| success messageCategorySel |\r\t(success _ copyFlag not) ifFalse: [^ false].\r\tmessageCategorySel _ dstMessageCategorySel ifNil: [srcMessageCategorySel].\r\t(success _ messageCategorySel notNil & (messageCategorySel ~= '-- all --' asSymbol)\r\t\t\t\tand: [messageCategorySel ~= srcMessageCategorySel and: [classOrMeta organization categories includes: messageCategorySel]])\r\t\tifTrue: \r\t\t\t[classOrMeta organization\r\t\t\t\tclassify: methodSel\r\t\t\t\tunder: messageCategorySel\r\t\t\t\tsuppressIfDefault: false.\r\t\t\tself changed: #messageList].\r\tsuccess & internal not ifTrue: [self setSelector: methodSel].\r\t^ success! !\r\r!Browser methodsFor: 'drag and drop' stamp: 'ls 6/22/2001 23:21'!\rdstCategoryDstListMorph: dstListMorph\r\t^(dstListMorph getListSelector == #systemCategoryList)\r\t\tifTrue: [dstListMorph potentialDropItem ]\r\t\tifFalse: [self selectedSystemCategoryName]! !\r\r!Browser methodsFor: 'drag and drop' stamp: 'ls 6/22/2001 23:20'!\rdstClassDstListMorph: dstListMorph\r\t| dropItem |\r\t^(dstListMorph getListSelector == #classList)\r\t\tifTrue: [(dropItem _ dstListMorph potentialDropItem) ifNotNil: [Smalltalk at: dropItem withBlanksCondensed asSymbol]]\r\t\tifFalse: [dstListMorph model selectedClass]! !\r\r!Browser methodsFor: 'drag and drop' stamp: 'nk 6/13/2004 06:16'!\rdstMessageCategoryDstListMorph: dstListMorph\r\t| dropItem |\r\t^dstListMorph getListSelector == #messageCategoryList\r\t\tifTrue: \r\t\t\t[dropItem _ dstListMorph potentialDropItem.\r\t\t\tdropItem ifNotNil: [dropItem asSymbol]]\r\t\tifFalse: [self selectedMessageCategoryName ifNil: [ Categorizer default ]]! !\r\r!Browser methodsFor: 'drag and drop' stamp: 'mir 5/25/2000 13:47'!\rmessage: messageSel compileInClass: dstClassOrMeta fromClass: srcClassOrMeta dstMessageCategory: dstMessageCategorySel srcMessageCategory: srcMessageCategorySel internal: internal copySemantic: copyFlag \r\t| source messageCategorySel tm success oldOrNoMethod newMethod |\r\tsource _ srcClassOrMeta sourceCodeAt: messageSel.\r\tmessageCategorySel _ dstMessageCategorySel ifNil: [srcMessageCategorySel].\r\tself selectClass: dstClassOrMeta theNonMetaClass.\r\t(self messageCategoryList includes: messageCategorySel)\r\t\tifFalse: [\"create message category\"\r\t\t\tself classOrMetaClassOrganizer addCategory: messageCategorySel].\r\tself selectMessageCategoryNamed: messageCategorySel.\r\ttm _ self codeTextMorph.\r\ttm setText: source.\r\ttm setSelection: (0 to: 0).\r\ttm hasUnacceptedEdits: true.\r\toldOrNoMethod _ srcClassOrMeta compiledMethodAt: messageSel ifAbsent: [].\r\ttm accept.\r\t\"compilation successful?\"\r\tnewMethod _ dstClassOrMeta compiledMethodAt: messageSel ifAbsent: [].\r\tsuccess _ newMethod ~~ nil & (newMethod ~~ oldOrNoMethod).\r\t\"\tsuccess ifFalse: [TransferMorph allInstances do: [:e | e delete]].            \r\t \"\r\tsuccess\r\t\tifTrue: \r\t\t\t[copyFlag not ifTrue: [\"remove old method in move semantic if new exists\"\r\t\tsrcClassOrMeta removeSelector: messageSel].internal\r\t\t\t\tifTrue: [self selectClass: srcClassOrMeta]\r\t\t\t\tifFalse: [self selectClass: dstClassOrMeta].\r\t\t\tself setSelector: messageSel].\r\t^ success! !\r\r!Browser methodsFor: 'drag and drop'!\roverwriteDialogHierarchyChange: hierarchyChange higher: higherFlag sourceClassName: srcClassName destinationClassName: dstClassName methodSelector: methodSelector \r\t| lf success |\r\tlf _ Character cr asString.\r\tsuccess _ SelectionMenu\r\t\t\t\tconfirm: 'There is a conflict.' , ' Overwrite' , (hierarchyChange\r\t\t\t\t\t\t\tifTrue: [higherFlag\r\t\t\t\t\t\t\t\t\tifTrue: [' superclass']\r\t\t\t\t\t\t\t\t\tifFalse: [' subclass']]\r\t\t\t\t\t\t\tifFalse: ['']) , ' method' , lf , dstClassName , '>>' , methodSelector , lf , 'by ' , (hierarchyChange\r\t\t\t\t\t\t\tifTrue: ['moving']\r\t\t\t\t\t\t\tifFalse: ['copying']) , ' method' , lf , srcClassName name , '>>' , methodSelector , ' ?'\r\t\t\t\ttrueChoice: 'Yes, don''t care.'\r\t\t\t\tfalseChoice: 'No, I have changed my opinion.'.\r\t^ success! !\r\r\r!Browser methodsFor: 'initialize-release' stamp: 'rww 8/18/2002 09:31'!\rbrowseSelectionInPlace\r\r\t\"In place code - incomplete\"\r\"\tself systemCategoryListIndex: \r\t\t(self systemCategoryList indexOf: self selectedClass category).\r\tself classListIndex: (self classList indexOf: self selectedClass name)\"\r\r\tself spawnHierarchy.! !\r\r!Browser methodsFor: 'initialize-release'!\rbrowserWindowActivated\r\t\"Called when a window whose model is the receiver is reactivated, giving the receiver an opportunity to take steps if it wishes.  The default is to do nothing.  8/5/96 sw\"! !\r\r!Browser methodsFor: 'initialize-release' stamp: 'tk 4/8/98 15:22'!\rbuildClassSwitchView\r\r\t| aSwitchView |\r\taSwitchView _ PluggableButtonView\r\t\ton: self\r\t\tgetState: #classMessagesIndicated\r\t\taction: #indicateClassMessages.\r\taSwitchView\r\t\tlabel: 'class';\r\t\twindow: (0@0 extent: 15@8);\r\t\taskBeforeChanging: true.\r\t^ aSwitchView\r! !\r\r!Browser methodsFor: 'initialize-release' stamp: 'di 4/13/1999 13:54'!\rbuildCommentSwitchView\r\r\t| aSwitchView |\r\taSwitchView _ PluggableButtonView\r\t\ton: self\r\t\tgetState: #classCommentIndicated\r\t\taction: #plusButtonHit.\r\taSwitchView\r\t\tlabel: '?' asText allBold;\r\t\tborderWidthLeft: 0 right: 1 top: 0 bottom: 0;\t\r\t\twindow: (0@0 extent: 10@8);\r\t\taskBeforeChanging: true.\r\t^ aSwitchView\r! !\r\r!Browser methodsFor: 'initialize-release' stamp: 'tk 4/8/98 16:11'!\rbuildInstanceClassSwitchView\r\t| aView aSwitchView instSwitchView comSwitchView |\r\r\taView _ View new model: self.\r\taView window: (0 @ 0 extent: 50 @ 8).\r\tinstSwitchView _ self buildInstanceSwitchView.\r\taView addSubView: instSwitchView.\r\tcomSwitchView _ self buildCommentSwitchView.\r\taView addSubView: comSwitchView toRightOf: instSwitchView.\r\taSwitchView _ self buildClassSwitchView.\r\taView addSubView: aSwitchView toRightOf: comSwitchView.\r\t^aView! !\r\r!Browser methodsFor: 'initialize-release' stamp: 'tk 4/8/98 16:10'!\rbuildInstanceSwitchView\r\r\t| aSwitchView |\r\taSwitchView _ PluggableButtonView\r\t\ton: self\r\t\tgetState: #instanceMessagesIndicated\r\t\taction: #indicateInstanceMessages.\r\taSwitchView\r\t\tlabel: 'instance';\r\t\tborderWidthLeft: 0 right: 1 top: 0 bottom: 0;\t\r\t\twindow: (0@0 extent: 25@8);\r\t\taskBeforeChanging: true.\r\t^ aSwitchView\r! !\r\r!Browser methodsFor: 'initialize-release' stamp: 'sw 1/4/2001 15:55'!\rbuildOptionalButtonsView\r\t\"Build the view for the optional buttons (mvc)\"\r\r\t| aView buttonView offset bWidth bHeight first previousView |\r\taView _ View new model: self.\r\tbHeight _ self optionalButtonHeight.\r\taView window: (0 @ 0 extent: 200 @ bHeight).\r\toffset _ 0.\r\tfirst _ true.\r\tpreviousView _ nil.\r\tself optionalButtonPairs do: [:pair |\r\t\tbuttonView _ PluggableButtonView on: self\r\t\t\tgetState: nil\r\t\t\taction: pair second.\r\t\tbuttonView\r\t\t\tlabel: pair first asParagraph.\r\t\tbWidth _ buttonView label boundingBox width // 2.  \"Need something more deterministic.\"\r\t\tbuttonView window: (offset@0 extent: bWidth@bHeight).\r\t\toffset _ offset + bWidth + 0.\r\t\tfirst\r\t\t\tifTrue:\r\t\t\t\t[aView addSubView: buttonView.\r\t\t\t\tfirst _ false]\r\t\t\tifFalse:\r\t\t\t\t[buttonView borderWidthLeft: 1 right: 0 top: 0 bottom: 0.\r\t\t\t\taView addSubView: buttonView toRightOf: previousView]. \r\t\tpreviousView _ buttonView].\r\t^ aView! !\r\r!Browser methodsFor: 'initialize-release' stamp: 'sw 1/13/2000 16:45'!\rdefaultBrowserTitle\r\t^ 'System Browser'! !\r\r!Browser methodsFor: 'initialize-release' stamp: 'ar 1/31/2001 20:56'!\rhighlightClassList: list with: morphList! !\r\r!Browser methodsFor: 'initialize-release' stamp: 'ar 1/31/2001 20:56'!\rhighlightMessageCategoryList: list with: morphList! !\r\r!Browser methodsFor: 'initialize-release' stamp: 'ar 1/31/2001 20:56'!\rhighlightSystemCategoryList: list with: morphList! !\r\r!Browser methodsFor: 'initialize-release' stamp: 'nk 2/13/2001 13:25'!\rlabelString\r\t^self selectedClass ifNil: [ self defaultBrowserTitle ]\r\t\tifNotNil: [ self defaultBrowserTitle, ': ', self selectedClass printString ].\r! !\r\r!Browser methodsFor: 'initialize-release' stamp: 'sw 9/22/1999 17:13'!\rmethodCategoryChanged\r\tself changed: #messageCategoryList.\r\tself changed: #messageList.\r\tself changed: #annotation.\r\tself messageListIndex: 0! !\r\r!Browser methodsFor: 'initialize-release' stamp: 'BG 10/30/2003 21:09'!\ropenEditString: aString\r        \"Create a pluggable version of all the views for a Browser, including views and controllers.\"\r        | systemCategoryListView classListView \r        messageCategoryListView messageListView browserCodeView topView switchView underPane y optionalButtonsView annotationPane |\r\r        topView _ StandardSystemView new model: self.\r        topView borderWidth: 1. \"label and minSize taken care of by caller\"\r\r        systemCategoryListView _ PluggableListView on: self\r                list: #systemCategoryList\r                selected: #systemCategoryListIndex\r                changeSelected: #systemCategoryListIndex:\r                menu: #systemCategoryMenu:\r                keystroke: #systemCatListKey:from:.\r        systemCategoryListView window: (0 @ 0 extent: 50 @ 70).\r        topView addSubView: systemCategoryListView.\r\r        classListView _ PluggableListView on: self\r                list: #classList\r                selected: #classListIndex\r                changeSelected: #classListIndex:\r                menu: #classListMenu:shifted:\r                keystroke: #classListKey:from:.\r        classListView window: (0 @ 0 extent: 50 @ 62).\r        topView addSubView: classListView toRightOf: systemCategoryListView.\r\r        switchView _ self buildInstanceClassSwitchView.\r        switchView borderWidth: 1.\r        topView addSubView: switchView below: classListView.\r\r        messageCategoryListView _ PluggableListView on: self\r                list: #messageCategoryList\r                selected: #messageCategoryListIndex\r                changeSelected: #messageCategoryListIndex:\r                menu: #messageCategoryMenu:. \r        messageCategoryListView controller terminateDuringSelect: true.\r        messageCategoryListView window: (0 @ 0 extent: 50 @ 70).\r        topView addSubView: messageCategoryListView toRightOf: classListView.\r\r        messageListView _ PluggableListView on: self\r                list: #messageList\r                selected: #messageListIndex\r                changeSelected: #messageListIndex:\r                menu: #messageListMenu:shifted:\r                keystroke: #messageListKey:from:.\r        messageListView window: (0 @ 0 extent: 50 @ 70).\r        messageListView menuTitleSelector: #messageListSelectorTitle.\r        topView addSubView: messageListView toRightOf: messageCategoryListView.\r\r       self wantsAnnotationPane\r                ifTrue:\r                        [annotationPane _ PluggableTextView on: self\r                                text: #annotation accept: nil\r                                readSelection: nil menu: nil.\r                        annotationPane window: (0@0 extent: 200@self optionalAnnotationHeight).\r                        topView addSubView: annotationPane below: systemCategoryListView.\r                        underPane _ annotationPane.\r                        y _ 110 - self optionalAnnotationHeight]\r                ifFalse: [\r                        underPane _ systemCategoryListView.\r                        y _ 110].\r\r        self wantsOptionalButtons ifTrue:\r                [optionalButtonsView _ self buildOptionalButtonsView.\r                optionalButtonsView borderWidth: 1.\r                topView addSubView: optionalButtonsView below: underPane.\r                underPane _ optionalButtonsView.\r                y _ y - self optionalButtonHeight].\r\r        browserCodeView _ PluggableTextView on: self \r                        text: #contents accept: #contents:notifying:\r                        readSelection: #contentsSelection menu: #codePaneMenu:shifted:.\r        browserCodeView window: (0@0 extent: 200@y).\r        topView addSubView: browserCodeView below: underPane.\r        aString ifNotNil: [browserCodeView editString: aString.\r                        browserCodeView hasUnacceptedEdits: true].\r        topView setUpdatablePanesFrom: #(systemCategoryList classList messageCategoryList messageList).\r\r        ^ topView! !\r\r!Browser methodsFor: 'initialize-release' stamp: 'BG 10/30/2003 21:09'!\ropenMessageCatEditString: aString\r        \"Create a pluggable version of the views for a Browser that just shows one message category.\"\r        | messageCategoryListView messageListView browserCodeView topView annotationPane underPane y optionalButtonsView |\r\r        topView _ (StandardSystemView new) model: self.\r        topView borderWidth: 1.\r                \"label and minSize taken care of by caller\"\r\r        messageCategoryListView _ PluggableListView on: self\r                list: #messageCatListSingleton\r                selected: #indexIsOne \r                changeSelected: #indexIsOne:\r                menu: #messageCategoryMenu:.\r        messageCategoryListView window: (0 @ 0 extent: 200 @ 12).\r        topView addSubView: messageCategoryListView.\r\r        messageListView _ PluggableListView on: self\r                list: #messageList\r                selected: #messageListIndex\r                changeSelected: #messageListIndex:\r                menu: #messageListMenu:shifted:\r                keystroke: #messageListKey:from:.\r        messageListView menuTitleSelector: #messageListSelectorTitle.\r        messageListView window: (0 @ 0 extent: 200 @ 70).\r        topView addSubView: messageListView below: messageCategoryListView.\r\r        self wantsAnnotationPane\r                ifTrue:\r                        [annotationPane _ PluggableTextView on: self\r                                text: #annotation accept: nil\r                                readSelection: nil menu: nil.\r                        annotationPane window: (0@0 extent: 200@self optionalAnnotationHeight).\r                        topView addSubView: annotationPane below: messageListView.\r                        underPane _ annotationPane.\r                        y _ (200 - 12 - 70) - self optionalAnnotationHeight]\r                ifFalse:\r                        [underPane _ messageListView.\r                        y _ (200 - 12 - 70)].\r\r        self wantsOptionalButtons ifTrue:\r                [optionalButtonsView _ self buildOptionalButtonsView.\r                optionalButtonsView borderWidth: 1.\r                topView addSubView: optionalButtonsView below: underPane.\r                underPane _ optionalButtonsView.\r                y _ y - self optionalButtonHeight].\r\r        browserCodeView _ PluggableTextView on: self \r                        text: #contents accept: #contents:notifying:\r                        readSelection: #contentsSelection menu: #codePaneMenu:shifted:.\r        browserCodeView window: (0@0 extent: 200@y).\r        topView addSubView: browserCodeView below: underPane.\r        aString ifNotNil: [browserCodeView editString: aString.\r                        browserCodeView hasUnacceptedEdits: true].\r        topView setUpdatablePanesFrom: #(messageCatListSingleton messageList).\r        ^ topView! !\r\r!Browser methodsFor: 'initialize-release' stamp: 'BG 10/28/2003 20:45'!\ropenMessageEditString: aString\r\t\"Create a pluggable version of the views for a Browser that just shows one message.\"\r\t| messageListView browserCodeView topView annotationPane underPane y |\r\r\r\ttopView _ (StandardSystemView new) model: self.\r\ttopView borderWidth: 1.\r\t\t\"label and minSize taken care of by caller\"\r\r\tmessageListView _ PluggableListView on: self\r\t\tlist: #messageListSingleton\r\t\tselected: #indexIsOne \r\t\tchangeSelected: #indexIsOne:\r\t\tmenu: #messageListMenu:shifted:.\r\tmessageListView window: (0 @ 0 extent: 200 @ 12).\r\ttopView addSubView: messageListView.\r\r\t self wantsAnnotationPane\r\t\tifTrue:\r\t\t\t[annotationPane _ PluggableTextView on: self\r\t\t\t\ttext: #annotation accept: nil\r\t\t\t\treadSelection: nil menu: nil.\r\t\t\tannotationPane window: (0@0 extent: 200@self optionalAnnotationHeight).\r\t\t\ttopView addSubView: annotationPane below: messageListView.\r\t\t\tunderPane _ annotationPane.\r\t\t\ty _ (200 - 12) - self optionalAnnotationHeight]\r\t\tifFalse:\r\t\t\t[underPane _ messageListView.\r\t\t\ty _ 200 - 12].\r\r\tbrowserCodeView _ PluggableTextView on: self \r\t\t\ttext: #contents accept: #contents:notifying:\r\t\t\treadSelection: #contentsSelection menu: #codePaneMenu:shifted:.\r\tbrowserCodeView window: (0@0 extent: 200@y).\r\ttopView addSubView: browserCodeView below: underPane.\r\taString ifNotNil: [browserCodeView editString: aString.\r\t\t\tbrowserCodeView hasUnacceptedEdits: true].\r\t^ topView! !\r\r!Browser methodsFor: 'initialize-release' stamp: 'BG 10/28/2003 20:45'!\ropenOnClassWithEditString: aString\r\t\"Create a pluggable version of all the views for a Browser, including views and controllers.\"\r\t| classListView messageCategoryListView messageListView browserCodeView topView switchView annotationPane underPane y optionalButtonsView |\r\r\r\ttopView _ (StandardSystemView new) model: self.\r\ttopView borderWidth: 1.\r\t\t\"label and minSize taken care of by caller\"\r\r\tclassListView _ PluggableListView on: self\r\t\tlist: #classListSingleton\r\t\tselected: #indexIsOne \r\t\tchangeSelected: #indexIsOne:\r\t\tmenu: #classListMenu:shifted:\r\t\tkeystroke: #classListKey:from:.\r\tclassListView window: (0 @ 0 extent: 100 @ 12).\r\ttopView addSubView: classListView.\r\r\tmessageCategoryListView _ PluggableListView on: self\r\t\tlist: #messageCategoryList\r\t\tselected: #messageCategoryListIndex\r\t\tchangeSelected: #messageCategoryListIndex:\r\t\tmenu: #messageCategoryMenu:.\r\tmessageCategoryListView window: (0 @ 0 extent: 100 @ 70).\r\ttopView addSubView: messageCategoryListView below: classListView.\r\r\tmessageListView _ PluggableListView on: self\r\t\tlist: #messageList\r\t\tselected: #messageListIndex\r\t\tchangeSelected: #messageListIndex:\r\t\tmenu: #messageListMenu:shifted:\r\t\tkeystroke: #messageListKey:from:.\r\tmessageListView menuTitleSelector: #messageListSelectorTitle.\r\tmessageListView window: (0 @ 0 extent: 100 @ 70).\r\ttopView addSubView: messageListView toRightOf: messageCategoryListView.\r\r\tswitchView _ self buildInstanceClassSwitchView.\r\tswitchView borderWidth: 1.\r\tswitchView \r\t\twindow: switchView window \r\t\tviewport: (classListView viewport topRight \r\t\t\t\t\tcorner: messageListView viewport topRight).\r\ttopView addSubView: switchView toRightOf: classListView.\r\r\t self wantsAnnotationPane\r\t\tifTrue:\r\t\t\t[annotationPane _ PluggableTextView on: self\r\t\t\t\ttext: #annotation accept: nil\r\t\t\t\treadSelection: nil menu: nil.\r\t\t\tannotationPane window: (0@0 extent: 200@self optionalAnnotationHeight).\r\t\t\ttopView addSubView: annotationPane below: messageCategoryListView.\r\t\t\tunderPane _ annotationPane.\r\t\t\ty _ (200-12-70) - self optionalAnnotationHeight]\r\t\tifFalse:\r\t\t\t[underPane _ messageCategoryListView.\r\t\t\ty _ (200-12-70)].\r\r\tself wantsOptionalButtons ifTrue:\r\t\t[optionalButtonsView _ self buildOptionalButtonsView.\r\t\toptionalButtonsView borderWidth: 1.\r\t\ttopView addSubView: optionalButtonsView below: underPane.\r\t\tunderPane _ optionalButtonsView.\r\t\ty _ y - self optionalButtonHeight].\r\r\tbrowserCodeView _ PluggableTextView on: self \r\t\t\ttext: #contents accept: #contents:notifying:\r\t\t\treadSelection: #contentsSelection menu: #codePaneMenu:shifted:.\r\tbrowserCodeView window: (0@0 extent: 200@y).\r\ttopView addSubView: browserCodeView below: underPane.\r\taString ifNotNil: [browserCodeView editString: aString.\r\t\t\tbrowserCodeView hasUnacceptedEdits: true].\r\r\ttopView setUpdatablePanesFrom: #(messageCategoryList messageList).\r\t^ topView! !\r\r!Browser methodsFor: 'initialize-release' stamp: 'BG 10/28/2003 20:45'!\ropenSystemCatEditString: aString\r\t\"Create a pluggable version of all the views for a Browser, including views and controllers.  The top list view is of the currently selected system class category--a single item list.\"\r\t| systemCategoryListView classListView messageCategoryListView messageListView browserCodeView topView switchView y annotationPane underPane optionalButtonsView |\r\r\r\ttopView _ (StandardSystemView new) model: self.\r\ttopView borderWidth: 1.\r\t\t\"label and minSize taken care of by caller\"\r\r\tsystemCategoryListView _ PluggableListView on: self\r\t\tlist: #systemCategorySingleton\r\t\tselected: #indexIsOne \r\t\tchangeSelected: #indexIsOne:\r\t\tmenu: #systemCatSingletonMenu:\r\t\tkeystroke: #systemCatSingletonKey:from:.\r\tsystemCategoryListView window: (0 @ 0 extent: 200 @ 12).\r\ttopView addSubView: systemCategoryListView.\r\r\tclassListView _ PluggableListView on: self\r\t\tlist: #classList\r\t\tselected: #classListIndex\r\t\tchangeSelected: #classListIndex:\r\t\tmenu: #classListMenu:shifted:\r\t\tkeystroke: #classListKey:from:.\r\tclassListView window: (0 @ 0 extent: 67 @ 62).\r\ttopView addSubView: classListView below: systemCategoryListView.\r\r\tmessageCategoryListView _ PluggableListView on: self\r\t\tlist: #messageCategoryList\r\t\tselected: #messageCategoryListIndex\r\t\tchangeSelected: #messageCategoryListIndex:\r\t\tmenu: #messageCategoryMenu:.\r\tmessageCategoryListView controller terminateDuringSelect: true.\r\tmessageCategoryListView window: (0 @ 0 extent: 66 @ 70).\r\ttopView addSubView: messageCategoryListView toRightOf: classListView.\r\r\tswitchView _ self buildInstanceClassSwitchView.\r\tswitchView \r\t\twindow: switchView window \r\t\tviewport: (classListView viewport bottomLeft \r\t\t\t\t\tcorner: messageCategoryListView viewport bottomLeft).\r\tswitchView borderWidth: 1.\r\ttopView addSubView: switchView below: classListView.\r\r\tmessageListView _ PluggableListView on: self\r\t\tlist: #messageList\r\t\tselected: #messageListIndex\r\t\tchangeSelected: #messageListIndex:\r\t\tmenu: #messageListMenu:shifted:\r\t\tkeystroke: #messageListKey:from:.\r\tmessageListView menuTitleSelector: #messageListSelectorTitle.\r\tmessageListView window: (0 @ 0 extent: 67 @ 70).\r\ttopView addSubView: messageListView toRightOf: messageCategoryListView.\r\r\t self wantsAnnotationPane\r\t\tifTrue:\r\t\t\t[annotationPane _ PluggableTextView on: self\r\t\t\t\ttext: #annotation accept: nil\r\t\t\t\treadSelection: nil menu: nil.\r\t\t\tannotationPane window: (0@0 extent: 200@self optionalAnnotationHeight).\r\t\t\ttopView addSubView: annotationPane below: switchView.\r\t\t\ty _ 110 - 12 - self optionalAnnotationHeight.\r\t\t\tunderPane _ annotationPane]\r\t\tifFalse:\r\t\t\t[y _ 110 - 12.\r\t\t\tunderPane _ switchView].\r\r\tself wantsOptionalButtons ifTrue:\r\t\t[optionalButtonsView _ self buildOptionalButtonsView.\r\t\toptionalButtonsView borderWidth: 1.\r\t\ttopView addSubView: optionalButtonsView below: underPane.\r\t\tunderPane _ optionalButtonsView.\r\t\ty _ y - self optionalButtonHeight].\r\r\tbrowserCodeView _ PluggableTextView on: self \r\t\t\ttext: #contents accept: #contents:notifying:\r\t\t\treadSelection: #contentsSelection menu: #codePaneMenu:shifted:.\r\tbrowserCodeView window: (0@0 extent: 200@y).\r\ttopView addSubView: browserCodeView below: underPane.\r\taString ifNotNil: [browserCodeView editString: aString.\r\t\t\tbrowserCodeView hasUnacceptedEdits: true].\r\ttopView setUpdatablePanesFrom: #(classList messageCategoryList messageList).\r\t^ topView! !\r\r!Browser methodsFor: 'initialize-release' stamp: 'sbw 12/8/1999 12:37'!\roptionalAnnotationHeight\r\r\t^ 10! !\r\r!Browser methodsFor: 'initialize-release' stamp: 'sbw 12/8/1999 12:23'!\roptionalButtonHeight\r\r\t^ 10! !\r\r!Browser methodsFor: 'initialize-release' stamp: 'rhi 5/12/2004 23:23'!\rsetClass: aBehavior selector: aSymbol\r\t\"Set the state of a new, uninitialized Browser.\"\r\r\t| isMeta aClass messageCatIndex |\r\taBehavior ifNil: [^ self].\r\t(aBehavior isKindOf: Metaclass)\r\t\tifTrue: [\r\t\t\tisMeta _ true.\r\t\t\taClass _ aBehavior soleInstance]\r\t\tifFalse: [\r\t\t\tisMeta _ false.\r\t\t\taClass _ aBehavior].\r\tself selectCategoryForClass: aClass.\r\tself classListIndex: (\r\t\t(SystemOrganization listAtCategoryNamed: self selectedSystemCategoryName)\r\t\t\tindexOf: aClass name).\r\tself metaClassIndicated: isMeta.\r\taSymbol ifNil: [^ self].\r\tmessageCatIndex _ aBehavior organization numberOfCategoryOfElement: aSymbol.\r\tself messageCategoryListIndex: (messageCatIndex > 0\r\t\tifTrue: [messageCatIndex + 1]\r\t\tifFalse: [0]).\r\tmessageCatIndex = 0 ifTrue: [^ self].\r\tself messageListIndex: (\r\t\t(aBehavior organization listAtCategoryNumber: messageCatIndex)\r\t\t\tindexOf: aSymbol).! !\r\r!Browser methodsFor: 'initialize-release' stamp: 'sw 5/26/1999 23:46'!\rsetSelector: aSymbol\r\t\"Make the receiver point at the given selector, in the currently chosen class\"\r\r\t| aClass messageCatIndex |\r\taSymbol ifNil: [^ self].\r\t(aClass _ self selectedClassOrMetaClass) ifNil: [^ self].\r\tmessageCatIndex _ aClass organization numberOfCategoryOfElement: aSymbol.\r\tself messageCategoryListIndex: messageCatIndex + 1.\r\tmessageCatIndex = 0 ifTrue: [^ self].\r\tself messageListIndex:\r\t\t\t((aClass organization listAtCategoryNumber: messageCatIndex)\r\t\t\t\t\tindexOf: aSymbol)! !\r\r!Browser methodsFor: 'initialize-release' stamp: 'sw 11/8/1999 13:36'!\rsystemCatSingletonKey: aChar from: aView\r\t^ self messageListKey: aChar from: aView! !\r\r!Browser methodsFor: 'initialize-release' stamp: 'rhi 5/12/2004 15:00'!\rsystemOrganizer: aSystemOrganizer\r\t\"Initialize the receiver as a perspective on the system organizer, \r\taSystemOrganizer. Typically there is only one--the system variable \r\tSystemOrganization.\"\r\r\tcontents _ nil.\r\tsystemOrganizer _ aSystemOrganizer.\r\tsystemCategoryListIndex _ 0.\r\tclassListIndex _ 0.\r\tmessageCategoryListIndex _ 0.\r\tmessageListIndex _ 0.\r\tmetaClassIndicated _ false.\r\tself setClassOrganizer.\r\tself editSelection: #none.! !\r\r\r!Browser methodsFor: 'message category functions' stamp: 'mir 5/5/2000 16:02'!\raddCategory\r\t\"Present a choice of categories or prompt for a new category name and add it before the current selection, or at the end if no current selection\"\r\t| labels reject lines cats menuIndex oldIndex newName |\r\tself okToChange ifFalse: [^ self].\r\tclassListIndex = 0 ifTrue: [^ self].\r\tlabels _ OrderedCollection with: 'new...'.\r\treject _ Set new.\r\treject\r\t\taddAll: self selectedClassOrMetaClass organization categories;\r\t\tadd: ClassOrganizer nullCategory;\r\t\tadd: ClassOrganizer default.\r\tlines _ OrderedCollection new.\r\tself selectedClassOrMetaClass allSuperclasses do: [:cls |\r\t\tcls = Object ifFalse: [\r\t\t\tcats _ cls organization categories reject:\r\t\t\t\t [:cat | reject includes: cat].\r\t\t\tcats isEmpty ifFalse: [\r\t\t\t\tlines add: labels size.\r\t\t\t\tlabels addAll: cats asSortedCollection.\r\t\t\t\treject addAll: cats]]].\r\tnewName _ (labels size = 1 or: [\r\t\tmenuIndex _ (PopUpMenu labelArray: labels lines: lines)\r\t\tstartUpWithCaption: 'Add Category'.\r\t\tmenuIndex = 0 ifTrue: [^ self].\r\t\tmenuIndex = 1])\r\t\t\tifTrue: [\r\t\t\t\tself request: 'Please type new category name'\r\t\t\t\t\tinitialAnswer: 'category name']\r\t\t\tifFalse: [\r\t\t\t\tlabels at: menuIndex].\r\toldIndex _ messageCategoryListIndex.\r\tnewName isEmpty\r\t\tifTrue: [^ self]\r\t\tifFalse: [newName _ newName asSymbol].\r\tself classOrMetaClassOrganizer\r\t\taddCategory: newName\r\t\tbefore: (messageCategoryListIndex = 0\r\t\t\t\tifTrue: [nil]\r\t\t\t\tifFalse: [self selectedMessageCategoryName]).\r\tself changed: #messageCategoryList.\r\tself messageCategoryListIndex:\r\t\t(oldIndex = 0\r\t\t\tifTrue: [self classOrMetaClassOrganizer categories size + 1]\r\t\t\tifFalse: [oldIndex]).\r\tself changed: #messageCategoryList.\r! !\r\r!Browser methodsFor: 'message category functions' stamp: 'NS 4/7/2004 22:47'!\ralphabetizeMessageCategories\r\tclassListIndex = 0 ifTrue: [^ false].\r\tself okToChange ifFalse: [^ false].\r\tself classOrMetaClassOrganizer sortCategories.\r\tself clearUserEditFlag.\r\tself editClass.\r\tself classListIndex: classListIndex.\r\t^ true! !\r\r!Browser methodsFor: 'message category functions'!\rbuildMessageCategoryBrowser\r\t\"Create and schedule a message category browser for the currently \r\tselected message category.\"\r\r\tself buildMessageCategoryBrowserEditString: nil! !\r\r!Browser methodsFor: 'message category functions' stamp: 'nk 6/13/2004 07:21'!\rbuildMessageCategoryBrowserEditString: aString \r\t\"Create and schedule a message category browser for the currently \r\tselected\t message category. The initial text view contains the characters \r\tin aString.\"\r\t\"wod 6/24/1998: set newBrowser classListIndex so that it works whether the\r\treceiver is a standard or a Hierarchy Browser.\"\r\r\t| newBrowser |\r\tmessageCategoryListIndex ~= 0\r\t\tifTrue: \r\t\t\t[newBrowser _ Browser new.\r\t\t\tnewBrowser systemCategoryListIndex: systemCategoryListIndex.\r\t\t\tnewBrowser classListIndex: (newBrowser classList indexOf: self selectedClassName).\r\t\t\tnewBrowser metaClassIndicated: metaClassIndicated.\r\t\t\tnewBrowser messageCategoryListIndex: messageCategoryListIndex.\r\t\t\tnewBrowser messageListIndex: messageListIndex.\r\t\t\tself class openBrowserView: (newBrowser openMessageCatEditString: aString)\r\t\t\t\tlabel: 'Message Category Browser (' , \r\t\t\t\t\t\tnewBrowser selectedClassOrMetaClassName , ')']! !\r\r!Browser methodsFor: 'message category functions' stamp: 'sw 10/8/2001 14:10'!\rcanShowMultipleMessageCategories\r\t\"Answer whether the receiver is capable of showing multiple message categories\"\r\r\t^ true! !\r\r!Browser methodsFor: 'message category functions' stamp: 'sw 2/22/2001 06:54'!\rcategoryOfCurrentMethod\r\t\"Determine the method category associated with the receiver at the current moment, or nil if none\"\r\r\t| aCategory |\r\t^ super categoryOfCurrentMethod ifNil:\r\t\t[(aCategory _ self messageCategoryListSelection) == ClassOrganizer allCategory\r\t\t\t\t\tifTrue:\r\t\t\t\t\t\t[nil]\r\t\t\t\t\tifFalse:\r\t\t\t\t\t\t[aCategory]]! !\r\r!Browser methodsFor: 'message category functions' stamp: 'NS 4/7/2004 22:56'!\rchangeMessageCategories: aString \r\t\"The characters in aString represent an edited version of the the message \r\tcategories for the selected class. Update this information in the system \r\tand inform any dependents that the categories have been changed. This \r\tmessage is invoked because the user had issued the categories command \r\tand edited the message categories. Then the user issued the accept \r\tcommand.\"\r\r\tself classOrMetaClassOrganizer changeFromString: aString.\r\tself clearUserEditFlag.\r\tself editClass.\r\tself classListIndex: classListIndex.\r\t^ true! !\r\r!Browser methodsFor: 'message category functions' stamp: 'nk 2/14/2004 15:06'!\reditMessageCategories\r\t\"Indicate to the receiver and its dependents that the message categories of \r\tthe selected class have been changed.\"\r\r\tself okToChange ifFalse: [^ self].\r\tclassListIndex ~= 0\r\t\tifTrue: \r\t\t\t[self messageCategoryListIndex: 0.\r\t\t\tself editSelection: #editMessageCategories.\r\t\t\tself changed: #editMessageCategories.\r\t\t\tself contentsChanged]! !\r\r!Browser methodsFor: 'message category functions' stamp: 'tk 4/2/98 13:53'!\rfileOutMessageCategories\r\t\"Print a description of the selected message category of the selected class \r\tonto an external file.\"\r\rCursor write showWhile:\r\t[messageCategoryListIndex ~= 0\r\t\tifTrue: \r\t\t\t[self selectedClassOrMetaClass fileOutCategory: self selectedMessageCategoryName]]! !\r\r!Browser methodsFor: 'message category functions' stamp: 'emm 5/30/2002 09:20'!\rhighlightMessageList: list with: morphList\r\t\"Changed by emm to add emphasis in case of breakpoint\"\r\r\tmorphList do:[:each | \r\t\t| classOrNil methodOrNil |\r\t\tclassOrNil := self selectedClassOrMetaClass.\r\t\tmethodOrNil := classOrNil isNil\r\t\t\tifTrue:[nil]\r\t\t\tifFalse:[classOrNil methodDictionary at: each contents ifAbsent:[]].\r\t\t(methodOrNil notNil and:[methodOrNil hasBreakpoint])\r\t\t\tifTrue:[each contents: ((each contents ,' [break]') asText allBold)]]! !\r\r!Browser methodsFor: 'message category functions' stamp: 'dew 9/20/2001 00:21'!\rmessageCategoryMenu: aMenu\r\r^ aMenu labels:\r'browse\rprintOut\rfileOut\rreorganize\ralphabetize\rremove empty categories\rcategorize all uncategorized\rnew category...\rrename...\rremove'\r\tlines: #(3 8)\r\tselections:\r\t\t#(buildMessageCategoryBrowser printOutMessageCategories fileOutMessageCategories\r\t\teditMessageCategories alphabetizeMessageCategories removeEmptyCategories\r\t\tcategorizeAllUncategorizedMethods addCategory renameCategory removeMessageCategory)\r! !\r\r!Browser methodsFor: 'message category functions' stamp: 'tk 4/2/98 13:53'!\rprintOutMessageCategories\r\t\"Print a description of the selected message category of the selected class \r\tonto an external file in Html format.\"\r\rCursor write showWhile:\r\t[messageCategoryListIndex ~= 0\r\t\tifTrue: \r\t\t\t[self selectedClassOrMetaClass fileOutCategory: self selectedMessageCategoryName\r\t\t\t\t\t\t\t\t\t\tasHtml: true]]! !\r\r!Browser methodsFor: 'message category functions' stamp: 'nk 4/23/2004 09:18'!\rremoveEmptyCategories\r\tself okToChange ifFalse: [^ self].\r\tself selectedClassOrMetaClass organization removeEmptyCategories.\r\tself changed: #messageCategoryList\r! !\r\r!Browser methodsFor: 'message category functions' stamp: 'tk 4/2/98 13:54'!\rremoveMessageCategory\r\t\"If a message category is selected, create a Confirmer so the user can \r\tverify that the currently selected message category should be removed\r \tfrom the system. If so, remove it.\"\r\r\t| messageCategoryName |\r\tmessageCategoryListIndex = 0 ifTrue: [^ self].\r\tself okToChange ifFalse: [^ self].\r\tmessageCategoryName _ self selectedMessageCategoryName.\r\t(self messageList size = 0\r\t\tor: [self confirm: 'Are you sure you want to\rremove this method category \rand all its methods?'])\r\t\tifTrue: \r\t\t\t[self selectedClassOrMetaClass removeCategory: messageCategoryName.\r\t\t\tself messageCategoryListIndex: 0.\r\t\t\tself changed: #classSelectionChanged].\r\tself changed: #messageCategoryList.\r! !\r\r!Browser methodsFor: 'message category functions' stamp: 'NS 4/7/2004 23:01'!\rrenameCategory\r\t\"Prompt for a new category name and add it before the\r\tcurrent selection, or at the end if no current selection\"\r\t| oldIndex oldName newName |\r\tclassListIndex = 0 ifTrue: [^ self].\r\tself okToChange ifFalse: [^ self].\r\t(oldIndex _ messageCategoryListIndex) = 0 ifTrue: [^ self].\r\toldName _ self selectedMessageCategoryName.\r\tnewName _ self\r\t\trequest: 'Please type new category name'\r\t\tinitialAnswer: oldName.\r\tnewName isEmpty\r\t\tifTrue: [^ self]\r\t\tifFalse: [newName _ newName asSymbol].\r\tnewName = oldName ifTrue: [^ self].\r\tself classOrMetaClassOrganizer\r\t\trenameCategory: oldName\r\t\ttoBe: newName.\r\tself classListIndex: classListIndex.\r\tself messageCategoryListIndex: oldIndex.\r\tself changed: #messageCategoryList.\r! !\r\r!Browser methodsFor: 'message category functions' stamp: 'sw 10/8/2001 15:08'!\rshowHomeCategory\r\t\"Show the home category of the selected method.  This is only really useful if one is in a tool that supports the showing of categories.  Thus, it's good in browsers and hierarchy browsers but not in message-list browsers\"\r\r\t| aSelector |\r\tself okToChange ifTrue:\r\t\t[(aSelector _ self selectedMessageName) ifNotNil:\r\t\t\t[self selectOriginalCategoryForCurrentMethod.\r\t\t\tself selectedMessageName: aSelector]]! !\r\r\r!Browser methodsFor: 'message category list' stamp: 'nk 11/30/2002 08:20'!\rcategorizeAllUncategorizedMethods\r\t\"Categorize methods by looking in parent classes for a method category.\"\r\r\t| organizer organizers |\r\torganizer _ self classOrMetaClassOrganizer.\r\torganizers _ self selectedClassOrMetaClass withAllSuperclasses collect: [:ea | ea organization].\r\t(organizer listAtCategoryNamed: ClassOrganizer default) do: [:sel | | found |\r\t\tfound _ (organizers collect: [ :org | org categoryOfElement: sel])\r\t\t\tdetect: [:ea | ea ~= ClassOrganizer default and: [ ea ~= nil]]\r\t\t\tifNone: [].\r\t\tfound ifNotNil: [organizer classify: sel under: found]].\r\r\tself changed: #messageCategoryList! !\r\r!Browser methodsFor: 'message category list' stamp: 'tk 4/5/98 12:25'!\rmessageCatListSingleton\r\r\t| name |\r\tname _ self selectedMessageCategoryName.\r\t^ name ifNil: [Array new]\r\t\tifNotNil: [Array with: name]! !\r\r!Browser methodsFor: 'message category list' stamp: 'ccn 3/22/1999 17:56'!\rmessageCategoryList\r\t\"Answer the selected category of messages.\"\r\r\tclassListIndex = 0\r\t\tifTrue: [^ Array new]\r\t\tifFalse: [^ (Array with: ClassOrganizer allCategory), self classOrMetaClassOrganizer categories]! !\r\r!Browser methodsFor: 'message category list'!\rmessageCategoryListIndex\r\t\"Answer the index of the selected message category.\"\r\r\t^messageCategoryListIndex! !\r\r!Browser methodsFor: 'message category list' stamp: 'rhi 5/12/2004 19:36'!\rmessageCategoryListIndex: anInteger\r\t\"Set the selected message category to be the one indexed by anInteger.\"\r\r\tmessageCategoryListIndex _ anInteger.\r\tmessageListIndex _ 0.\r\tself changed: #messageCategorySelectionChanged.\r\tself changed: #messageCategoryListIndex. \"update my selection\"\r\tself changed: #messageList.\r\tself editSelection: (anInteger > 0\r\t\tifTrue: [#newMessage]\r\t\tifFalse: [self classListIndex > 0\r\t\t\tifTrue: [#editClass]\r\t\t\tifFalse: [#newClass]]).\r\tcontents _ nil.\r\tself contentsChanged.! !\r\r!Browser methodsFor: 'message category list' stamp: 'ccn 3/24/1999 11:02'!\rmessageCategoryListSelection\r\t\"Return the selected category name or nil.\"\r\r\t^ ((self messageCategoryList size = 0 \r\t\tor: [self messageCategoryListIndex = 0]) \r\t\tor: [self messageCategoryList size < self messageCategoryListIndex])\r\t\t\tifTrue: [nil]\r\t\t\tifFalse: [self messageCategoryList at: (self messageCategoryListIndex max: 1)]! !\r\r!Browser methodsFor: 'message category list' stamp: 'sw 10/16/1999 22:56'!\rrawMessageCategoryList\r\t^ classListIndex = 0\r\t\tifTrue: [Array new]\r\t\tifFalse: [self classOrMetaClassOrganizer categories]! !\r\r!Browser methodsFor: 'message category list' stamp: 'nk 6/13/2004 06:20'!\rselectMessageCategoryNamed: aSymbol \r\t\"Given aSymbol, select the category with that name.  Do nothing if \r\taSymbol doesn't exist.\"\r\tself messageCategoryListIndex: (self messageCategoryList indexOf: aSymbol ifAbsent: [ 1])! !\r\r!Browser methodsFor: 'message category list' stamp: 'KLC 2/20/2004 08:08'!\rselectOriginalCategoryForCurrentMethod\r\t\"private - Select the message category for the current method. \r\t \r\t Note:  This should only be called when somebody tries to save  \r\t a method that they are modifying while ALL is selected. \r\t \r\t Returns: true on success, false on failure.\"\r\t| aSymbol selectorName |\r\taSymbol _ self categoryOfCurrentMethod.\r\tselectorName _ self selectedMessageName.\r\t(aSymbol notNil and: [aSymbol ~= ClassOrganizer allCategory])\r\t\tifTrue: \r\t\t\t[messageCategoryListIndex _ (self messageCategoryList indexOf: aSymbol).\r\t\t\tmessageListIndex _ (self messageList indexOf: selectorName).\r\t\t\tself changed: #messageCategorySelectionChanged.\r\t\t\tself changed: #messageCategoryListIndex.\t\"update my selection\"\r\t\t\tself changed: #messageList.\r\t\t\tself changed: #messageListIndex.\r\t\t\t^ true].\r\t^ false! !\r\r!Browser methodsFor: 'message category list'!\rselectedMessageCategoryName\r\t\"Answer the name of the selected message category, if any. Answer nil \r\totherwise.\"\r\r\tmessageCategoryListIndex = 0 ifTrue: [^nil].\r\t^self messageCategoryList at: messageCategoryListIndex! !\r\r!Browser methodsFor: 'message category list' stamp: 'ccn+ceg 5/13/1999 19:54'!\rsetOriginalCategoryIndexForCurrentMethod\r\t\"private - Set the message category index for the currently selected method. \r\t \r\t Note:  This should only be called when somebody tries to save  \r\t a method that they are modifying while ALL is selected.\"\r\r\tmessageCategoryListIndex _ self messageCategoryList indexOf: self categoryOfCurrentMethod\r\t! !\r\r!Browser methodsFor: 'message category list'!\rtoggleMessageCategoryListIndex: anInteger \r\t\"If the currently selected message category index is anInteger, deselect \r\tthe category. Otherwise select the category whose index is anInteger.\"\r\r\tself messageCategoryListIndex: \r\t\t(messageCategoryListIndex = anInteger\r\t\t\tifTrue: [0]\r\t\t\tifFalse: [anInteger])! !\r\r\r!Browser methodsFor: 'message functions' stamp: 'sw 1/11/2001 07:22'!\raddExtraShiftedItemsTo: aMenu\r\t\"The shifted selector-list menu is being built; some menu items are appropriate only for certain kinds of browsers, and this gives a hook for them to be added as approrpiate.  If any is added here, a line should be added first -- browse reimplementors of this message for examples.\"\r! !\r\r!Browser methodsFor: 'message functions'!\rbuildMessageBrowser\r\t\"Create and schedule a message browser on the currently selected \r\tmessage. Do nothing if no message is selected. The initial text view \r\tcontains nothing.\"\r\r\tself buildMessageBrowserEditString: nil! !\r\r!Browser methodsFor: 'message functions' stamp: 'sd 1/5/2002 21:11'!\rbuildMessageBrowserEditString: aString \r\t\"Create and schedule a message browser for the receiver in which the \r\targument, aString, contains characters to be edited in the text view.\"\r\r\tmessageListIndex = 0 ifTrue: [^ self].\r\t^ self class openMessageBrowserForClass: self selectedClassOrMetaClass \r\t\tselector: self selectedMessageName editString: aString! !\r\r!Browser methodsFor: 'message functions' stamp: 'tk 4/25/1998 00:08'!\rdefineMessage: aString notifying: aController \r\t\"Compile the expressions in aString. Notify aController if a syntax error \r\toccurs. Install the compiled method in the selected class classified under \r\tthe currently selected message category name. Answer true if \r\tcompilation succeeds, false otherwise.\"\r\t| selectedMessageName selector category oldMessageList |\r\tselectedMessageName _ self selectedMessageName.\r\toldMessageList _ self messageList.\r\tcontents _ nil.\r\tselector _ self selectedClassOrMetaClass\r\t\t\t\tcompile: aString\r\t\t\t\tclassified: (category _ self selectedMessageCategoryName)\r\t\t\t\tnotifying: aController.\r\tselector == nil ifTrue: [^ false].\r\tcontents _ aString copy.\r\tselector ~~ selectedMessageName\r\t\tifTrue: \r\t\t\t[category = ClassOrganizer nullCategory\r\t\t\t\tifTrue: [self changed: #classSelectionChanged.\r\t\t\t\t\t\tself changed: #classList.\r\t\t\t\t\t\tself messageCategoryListIndex: 1].\r\t\t\tself setClassOrganizer.  \"In case organization not cached\"\r\t\t\t(oldMessageList includes: selector)\r\t\t\t\tifFalse: [self changed: #messageList].\r\t\t\tself messageListIndex: (self messageList indexOf: selector)].\r\t^ true! !\r\r!Browser methodsFor: 'message functions' stamp: 'di 11/24/1999 13:40'!\rdefineMessageFrom: aString notifying: aController\r\t\"Compile the expressions in aString. Notify aController if a syntax error occurs. Install the compiled method in the selected class classified under  the currently selected message category name. Answer the selector obtained if compilation succeeds, nil otherwise.\"\r\t| selectedMessageName selector category oldMessageList |\r\tselectedMessageName _ self selectedMessageName.\r\toldMessageList _ self messageList.\r\tcontents _ nil.\r\tselector _ (Parser new parseSelector: aString).\r\t(self metaClassIndicated\r\t\tand: [(self selectedClassOrMetaClass includesSelector: selector) not\r\t\tand: [Metaclass isScarySelector: selector]])\r\t\tifTrue: [\"A frist-time definition overlaps the protocol of Metaclasses\"\r\t\t\t\t(self confirm: ((selector , ' is used in the existing class system.\rOverriding it could cause serious problems.\rIs this really what you want to do?') asText makeBoldFrom: 1 to: selector size))\r\t\t\t\tifFalse: [^nil]].\r\tselector _ self selectedClassOrMetaClass\r\t\t\t\tcompile: aString\r\t\t\t\tclassified: (category _ self selectedMessageCategoryName)\r\t\t\t\tnotifying: aController.\r\tselector == nil ifTrue: [^ nil].\r\tcontents _ aString copy.\r\tselector ~~ selectedMessageName\r\t\tifTrue: \r\t\t\t[category = ClassOrganizer nullCategory\r\t\t\t\tifTrue: [self changed: #classSelectionChanged.\r\t\t\t\t\t\tself changed: #classList.\r\t\t\t\t\t\tself messageCategoryListIndex: 1].\r\t\t\tself setClassOrganizer.  \"In case organization not cached\"\r\t\t\t(oldMessageList includes: selector)\r\t\t\t\tifFalse: [self changed: #messageList].\r\t\t\tself messageListIndex: (self messageList indexOf: selector)].\r\t^ selector! !\r\r!Browser methodsFor: 'message functions' stamp: 'tk 4/2/98 17:02'!\rinspectInstances\r\t\"Inspect all instances of the selected class.  1/26/96 sw\"\r\r\t| myClass |\r\tmyClass _ self selectedClassOrMetaClass.\r\tmyClass ~~ nil ifTrue:\r\t\t[myClass theNonMetaClass inspectAllInstances].\r! !\r\r!Browser methodsFor: 'message functions' stamp: 'tk 4/2/98 17:02'!\rinspectSubInstances\r\t\"Inspect all instances of the selected class and all its subclasses  1/26/96 sw\"\r\r\t| aClass |\r\taClass _ self selectedClassOrMetaClass.\r\taClass ~~ nil ifTrue:\r\t\t[aClass _ aClass theNonMetaClass.\r\t\t aClass inspectSubInstances].\r! !\r\r!Browser methodsFor: 'message functions' stamp: 'BG 11/1/2003 13:27'!\rmessageListMenu: aMenu shifted: shifted\r\t\"Answer the message-list menu\"\r\r\tshifted ifTrue: [^ self shiftedMessageListMenu: aMenu].\r\taMenu addList:#(\r\t\t\t('browse full (b)' \t\t\t\t\t\tbrowseMethodFull)\r\t\t\t('browse hierarchy (h)'\t\t\t\t\tclassHierarchy)\r\t\t\t('browse method (O)'\t\t\t\t\topenSingleMessageBrowser)\r\t\t\t('browse protocol (p)'\t\t\t\t\tbrowseFullProtocol)\r\t\t\t-\r\t\t\t('fileOut (o)'\t\t\t\t\t\t\tfileOutMessage)\r\t\t\t('printOut'\t\t\t\t\t\t\t\tprintOutMessage)\r\t\t\t('copy selector (c)'\t\t\t\t\t\tcopySelector)\r\t\t\t-\r\t\t\t('senders of... (n)'\t\t\t\t\t\tbrowseSendersOfMessages)\r\t\t\t('implementors of... (m)'\t\t\t\t\tbrowseMessages)\r\t\t\t('inheritance (i)'\t\t\t\t\t\tmethodHierarchy)\r\t\t\t('versions (v)'\t\t\t\t\t\t\tbrowseVersions)\r\t\t\t-\r\t\t\t('inst var refs...'\t\t\t\t\t\tbrowseInstVarRefs)\r\t\t\t('inst var defs...'\t\t\t\t\t\tbrowseInstVarDefs)\r\t\t\t('class var refs...'\t\t\t\t\t\tbrowseClassVarRefs)\r\t\t\t('class variables'\t\t\t\t\t\tbrowseClassVariables)\r\t\t\t('class refs (N)'\t\t\t\t\t\t\tbrowseClassRefs)\r\t\t\t-\r\t\t\t('remove method (x)'\t\t\t\t\tremoveMessage)\r\t\t\t-\r\t\t\t('more...'\t\t\t\t\t\t\t\tshiftedYellowButtonActivity)).\r\t^ aMenu! !\r\r!Browser methodsFor: 'message functions' stamp: 'sd 5/11/2003 21:01'!\rremoveMessage\r\t\"If a message is selected, create a Confirmer so the user can verify that  \r\tthe currently selected message should be removed from the system. If \r\tso,  \r\tremove it. If the Preference 'confirmMethodRemoves' is set to false, the \r\tconfirmer is bypassed.\"\r\t| messageName confirmation |\r\tmessageListIndex = 0\r\t\tifTrue: [^ self].\r\tself okToChange\r\t\tifFalse: [^ self].\r\tmessageName _ self selectedMessageName.\r\tconfirmation _ self systemNavigation   confirmRemovalOf: messageName on: self selectedClassOrMetaClass.\r\tconfirmation == 3\r\t\tifTrue: [^ self].\r\tself selectedClassOrMetaClass removeSelector: self selectedMessageName.\r\tself messageListIndex: 0.\r\tself changed: #messageList.\r\tself setClassOrganizer.\r\t\"In case organization not cached\"\r\tconfirmation == 2\r\t\tifTrue: [self systemNavigation browseAllCallsOn: messageName]! !\r\r!Browser methodsFor: 'message functions' stamp: 'tk 4/2/98 17:03'!\rremoveMessageFromBrowser\r\t\"Our list speaks the truth and can't have arbitrary things removed\"\r\r\t^ self changed: #flash! !\r\r!Browser methodsFor: 'message functions' stamp: 'BG 11/1/2003 13:58'!\rshiftedMessageListMenu: aMenu\r\t\"Fill aMenu with the items appropriate when the shift key is held down\"\r\r\taMenu addList: #(\r\t\t('toggle diffing (D)'\t\t\t\t\t\ttoggleDiffing)\r\t\t('implementors of sent messages'\t\t\tbrowseAllMessages)\r\t\t-\r\t\t('local senders of...'\t\t\t\t\t\tbrowseLocalSendersOfMessages)\r\t\t('local implementors of...'\t\t\t\tbrowseLocalImplementors)\r\t\t-\r\t\t('spawn sub-protocol'\t\t\t\t\tspawnProtocol)\r\t\t('spawn full protocol'\t\t\t\t\tspawnFullProtocol)\r\t\t-\r\t\t('sample instance'\t\t\t\t\t\tmakeSampleInstance)\r\t\t('inspect instances'\t\t\t\t\t\tinspectInstances)\r\t\t('inspect subinstances'\t\t\t\t\tinspectSubInstances)).\r\r\tself addExtraShiftedItemsTo: aMenu.\r\taMenu addList: #(\r\t\t-\r\t\t('change category...'\t\t\t\t\tchangeCategory)).\r\r\tself canShowMultipleMessageCategories ifTrue: [aMenu addList:\r\t\t #(('show category (C)'\t\t\t\t\t\tshowHomeCategory))].\r\taMenu addList: #(\r\t\t-\r\t\t('change sets with this method'\t\t\tfindMethodInChangeSets)\r\t\t('revert to previous version'\t\t\t\trevertToPreviousVersion)\r\t\t('remove from current change set'\t\tremoveFromCurrentChanges)\r\t\t('revert & remove from changes'\t\trevertAndForget)\r\t\t('add to current change set'\t\t\t\tadoptMessageInCurrentChangeset)\r\t\t('copy up or copy down...'\t\t\t\tcopyUpOrCopyDown)\r\t\t-\r\t\t('more...' \t\t\t\t\t\t\t\tunshiftedYellowButtonActivity)).\r\t^ aMenu\r! !\r\r\r!Browser methodsFor: 'message list' stamp: 'drs 1/1/2003 23:33'!\rmessageList\r\t\"Answer an Array of the message selectors of the currently selected message category, provided that the messageCategoryListIndex is in proper range.  Otherwise, answer an empty Array  If messageCategoryListIndex is found to be larger than the number of categories (it happens!!), it is reset to zero.\"\r\t| sel |\r\t(sel _ self messageCategoryListSelection) ifNil: \r\t\t[\r\t\t\t^ self classOrMetaClassOrganizer\r\t\t\t\tifNil:\t\t[Array new]\r\t\t\t\tifNotNil:\t[self classOrMetaClassOrganizer allMethodSelectors]\r\t\t\t\"^ Array new\"\r\t\t].\r\r\t^ sel = ClassOrganizer allCategory\r\t\tifTrue: \r\t\t\t[self classOrMetaClassOrganizer\r\t\t\t\tifNil:\t\t[Array new]\r\t\t\t\tifNotNil:\t[self classOrMetaClassOrganizer allMethodSelectors]]\r\t\tifFalse:\r\t\t\t[(self classOrMetaClassOrganizer listAtCategoryNumber: messageCategoryListIndex - 1)\r\t\t\t\tifNil: [messageCategoryListIndex _ 0.  Array new]]! !\r\r!Browser methodsFor: 'message list'!\rmessageListIndex\r\t\"Answer the index of the selected message selector into the currently \r\tselected message category.\"\r\r\t^messageListIndex! !\r\r!Browser methodsFor: 'message list' stamp: 'rhi 5/12/2004 19:35'!\rmessageListIndex: anInteger\r\t\"Set the selected message selector to be the one indexed by anInteger.\"\r\r\tmessageListIndex _ anInteger.\r\tself editSelection: (anInteger > 0\r\t\tifTrue: [#editMessage]\r\t\tifFalse: [self messageCategoryListIndex > 0\r\t\t\tifTrue: [#newMessage]\r\t\t\tifFalse: [self classListIndex > 0\r\t\t\t\tifTrue: [#editClass]\r\t\t\t\tifFalse: [#newClass]]]).\r\tcontents _ nil.\r\tself changed: #messageListIndex. \"update my selection\"\r\tself contentsChanged.\r\tself decorateButtons.! !\r\r!Browser methodsFor: 'message list' stamp: 'tk 4/6/98 10:48'!\rmessageListSingleton\r\r\t| name |\r\tname _ self selectedMessageName.\r\t^ name ifNil: [Array new]\r\t\tifNotNil: [Array with: name]! !\r\r!Browser methodsFor: 'message list' stamp: 'sw 12/1/2000 11:17'!\rreformulateList\r\t\"If the receiver has a way of reformulating its message list, here is a chance for it to do so\"\r\r\tsuper reformulateList.\r\tself messageListIndex: 0! !\r\r!Browser methodsFor: 'message list' stamp: 'nk 6/19/2004 16:44'!\rselectedMessage\r\t\"Answer a copy of the source code for the selected message.\"\r\r\t| class selector method |\r\tcontents == nil ifFalse: [^ contents copy].\r\r\tself showingDecompile ifTrue:\r\t\t[^ self decompiledSourceIntoContentsWithTempNames: Sensor leftShiftDown not ].\r\r\tclass _ self selectedClassOrMetaClass.\r\tselector _ self selectedMessageName.\r\tmethod _ class compiledMethodAt: selector ifAbsent: [^ ''].\t\"method deleted while in another project\"\r\tcurrentCompiledMethod _ method.\r\r\t^ contents _ (self showingDocumentation\r\t\tifFalse: [ self sourceStringPrettifiedAndDiffed ]\r\t\tifTrue: [ self commentContents ])\r\t\t\tcopy asText makeSelectorBoldIn: class! !\r\r!Browser methodsFor: 'message list' stamp: 'sw 8/26/2002 09:55'!\rselectedMessageName\r\t\"Answer the message selector of the currently selected message, if any. \r\tAnswer nil otherwise.\"\r\r\t| aList |\r\teditSelection == #editComment ifTrue: [^ #Comment].\r\teditSelection == #editClass ifTrue: [^ #Definition].\r\r\tmessageListIndex = 0 ifTrue: [^ nil].\r\t^ (aList _ self messageList) size >= messageListIndex\r\t\tifTrue:\r\t\t\t[aList at: messageListIndex]\r\t\tifFalse:\r\t\t\t[nil]! !\r\r!Browser methodsFor: 'message list' stamp: 'sw 10/8/2001 13:37'!\rselectedMessageName: aSelector\r\t\"Make the given selector be the selected message name\"\r\r\t| anIndex |\r\tanIndex _ self messageList indexOf: aSelector.\r\tanIndex > 0 ifTrue:\r\t\t[self messageListIndex: anIndex]! !\r\r!Browser methodsFor: 'message list'!\rtoggleMessageListIndex: anInteger \r\t\"If the currently selected message index is anInteger, deselect the message \r\tselector. Otherwise select the message selector whose index is anInteger.\"\r\r\tself messageListIndex: \r\t\t(messageListIndex = anInteger\r\t\t\tifTrue: [0]\r\t\t\tifFalse: [anInteger])! !\r\r\r!Browser methodsFor: 'metaclass' stamp: 'di 1/14/98 12:25'!\rclassCommentIndicated\r\t\"Answer true iff we're viewing the class comment.\"\r\r\t^ editSelection == #editComment \r! !\r\r!Browser methodsFor: 'metaclass' stamp: 'ak 11/24/2000 21:46'!\rclassMessagesIndicated\r\t\"Answer whether the messages to be presented should come from the \r\tmetaclass.\"\r\r\t^ self metaClassIndicated and: [self classCommentIndicated not]! !\r\r!Browser methodsFor: 'metaclass'!\rclassOrMetaClassOrganizer\r\t\"Answer the class organizer for the metaclass or class, depending on \r\twhich (instance or class) is indicated.\"\r\r\tself metaClassIndicated\r\t\tifTrue: [^metaClassOrganizer]\r\t\tifFalse: [^classOrganizer]! !\r\r!Browser methodsFor: 'metaclass'!\rindicateClassMessages\r\t\"Indicate that the message selection should come from the metaclass \r\tmessages.\"\r\r\tself metaClassIndicated: true! !\r\r!Browser methodsFor: 'metaclass'!\rindicateInstanceMessages\r\t\"Indicate that the message selection should come from the class (instance) \r\tmessages.\"\r\r\tself metaClassIndicated: false! !\r\r!Browser methodsFor: 'metaclass' stamp: 'di 1/14/98 13:20'!\rinstanceMessagesIndicated\r\t\"Answer whether the messages to be presented should come from the \r\tclass.\"\r\r\t^metaClassIndicated not and: [self classCommentIndicated not]! !\r\r!Browser methodsFor: 'metaclass' stamp: 'sr 6/21/2000 17:23'!\rmetaClassIndicated\r\t\"Answer the boolean flag that indicates which of the method dictionaries, \r\tclass or metaclass.\"\r\r\t^ metaClassIndicated! !\r\r!Browser methodsFor: 'metaclass' stamp: 'nk 2/14/2004 15:08'!\rmetaClassIndicated: trueOrFalse \r\t\"Indicate whether browsing instance or class messages.\"\r\r\tmetaClassIndicated _ trueOrFalse.\r\tself setClassOrganizer.\r\tsystemCategoryListIndex > 0 ifTrue:\r\t\t[self editSelection: (classListIndex = 0\r\t\t\tifTrue: [metaClassIndicated\r\t\t\t\tifTrue: [#none]\r\t\t\t\tifFalse: [#newClass]]\r\t\t\tifFalse: [#editClass])].\r\tmessageCategoryListIndex _ 0.\r\tmessageListIndex _ 0.\r\tcontents _ nil.\r\tself changed: #classSelectionChanged.\r\tself changed: #messageCategoryList.\r\tself changed: #messageList.\r\tself changed: #contents.\r\tself changed: #annotation.\r\tself decorateButtons\r! !\r\r!Browser methodsFor: 'metaclass' stamp: 'tk 4/9/98 10:48'!\rselectedClassOrMetaClass\r\t\"Answer the selected class or metaclass.\"\r\r\t| cls |\r\tself metaClassIndicated\r\t\tifTrue: [^ (cls _ self selectedClass) ifNil: [nil] ifNotNil: [cls class]]\r\t\tifFalse: [^ self selectedClass]! !\r\r!Browser methodsFor: 'metaclass'!\rselectedClassOrMetaClassName\r\t\"Answer the selected class name or metaclass name.\"\r\r\t^self selectedClassOrMetaClass name! !\r\r!Browser methodsFor: 'metaclass' stamp: 'di 1/14/98 13:27'!\rsetClassOrganizer\r\t\"Install whatever organization is appropriate\"\r\t| theClass |\r\tclassOrganizer _ nil.\r\tmetaClassOrganizer _ nil.\r\tclassListIndex = 0 ifTrue: [^ self].\r\tclassOrganizer _ (theClass _ self selectedClass) organization.\r\tmetaClassOrganizer _ theClass class organization.! !\r\r\r!Browser methodsFor: 'system category functions' stamp: 'je 4/30/2001 17:59'!\raddSystemCategory\r\t\"Prompt for a new category name and add it before the\r\tcurrent selection, or at the end if no current selection\"\r\t| oldIndex newName |\r\tself okToChange ifFalse: [^ self].\r\toldIndex _ systemCategoryListIndex.\r\tnewName _ self\r\t\trequest: 'Please type new category name'\r\t\tinitialAnswer: 'Category-Name'.\r\tnewName isEmpty\r\t\tifTrue: [^ self]\r\t\tifFalse: [newName _ newName asSymbol].\r\tsystemOrganizer\r\t\taddCategory: newName\r\t\tbefore: (systemCategoryListIndex = 0\r\t\t\t\tifTrue: [nil]\r\t\t\t\tifFalse: [self selectedSystemCategoryName]).\r\tself systemCategoryListIndex:\r\t\t(oldIndex = 0\r\t\t\tifTrue: [self systemCategoryList size]\r\t\t\tifFalse: [oldIndex]).\r\tself changed: #systemCategoryList.! !\r\r!Browser methodsFor: 'system category functions' stamp: 'brp 8/4/2003 21:38'!\ralphabetizeSystemCategories\r\r\tself okToChange ifFalse: [^ false].\r\tsystemOrganizer sortCategories.\r\tself systemCategoryListIndex: 0.\r\tself changed: #systemCategoryList.\r! !\r\r!Browser methodsFor: 'system category functions' stamp: 'sd 1/5/2002 21:11'!\rbrowseAllClasses\r\t\"Create and schedule a new browser on all classes alphabetically.\"\r\t| newBrowser |\r\tnewBrowser _ HierarchyBrowser new initAlphabeticListing.\r\tself class openBrowserView: (newBrowser openSystemCatEditString: nil)\r\t\tlabel: 'All Classes Alphabetically'! !\r\r!Browser methodsFor: 'system category functions'!\rbuildSystemCategoryBrowser\r\t\"Create and schedule a new system category browser.\"\r\r\tself buildSystemCategoryBrowserEditString: nil! !\r\r!Browser methodsFor: 'system category functions' stamp: 'sd 1/5/2002 21:12'!\rbuildSystemCategoryBrowserEditString: aString \r\t\"Create and schedule a new system category browser with initial textual \r\tcontents set to aString.\"\r\r\t| newBrowser |\r\tsystemCategoryListIndex > 0\r\t\tifTrue: \r\t\t\t[newBrowser _ self class new.\r\t\t\tnewBrowser systemCategoryListIndex: systemCategoryListIndex.\r\t\t\tnewBrowser setClass: self selectedClassOrMetaClass selector: self selectedMessageName.\r\t\t\tself class openBrowserView: (newBrowser openSystemCatEditString: aString)\r\t\t\t\tlabel: 'Classes in category ', newBrowser selectedSystemCategoryName]! !\r\r!Browser methodsFor: 'system category functions' stamp: 'di 4/12/98 13:21'!\rchangeSystemCategories: aString \r\t\"Update the class categories by parsing the argument aString.\"\r\r\tsystemOrganizer changeFromString: aString.\r\tself changed: #systemCategoryList.\r\t^ true! !\r\r!Browser methodsFor: 'system category functions' stamp: 'tk 4/2/98 13:43'!\rclassNotFound\r\r\tself changed: #flash.! !\r\r!Browser methodsFor: 'system category functions' stamp: 'nk 2/14/2004 15:09'!\reditSystemCategories\r\t\"Retrieve the description of the class categories of the system organizer.\"\r\r\tself okToChange ifFalse: [^ self].\r\tself systemCategoryListIndex: 0.\r\tself editSelection: #editSystemCategories.\r\tself changed: #editSystemCategories.\r\tself contentsChanged! !\r\r!Browser methodsFor: 'system category functions' stamp: 'tk 3/31/98 07:52'!\rfileOutSystemCategory\r\t\"Print a description of each class in the selected category onto a file \r\twhose name is the category name followed by .st.\"\r\r\tsystemCategoryListIndex ~= 0\r\t\tifTrue: [systemOrganizer fileOutCategory: self selectedSystemCategoryName]! !\r\r!Browser methodsFor: 'system category functions' stamp: 'stp 01/13/2000 12:26'!\rfindClass\r\t\"Search for a class by name.\"\r\t| pattern foundClass classNames index toMatch exactMatch potentialClassNames |\r\r\tself okToChange ifFalse: [^ self classNotFound].\r\tpattern _ FillInTheBlank request: 'Class name or fragment?'.\r\tpattern isEmpty ifTrue: [^ self classNotFound].\r\ttoMatch _ (pattern copyWithout: $.) asLowercase.\r\tpotentialClassNames _ self potentialClassNames asOrderedCollection.\r\tclassNames _ pattern last = $. \r\t\tifTrue: [potentialClassNames select:\r\t\t\t\t\t[:nm |  nm asLowercase = toMatch]]\r\t\tifFalse: [potentialClassNames select: \r\t\t\t\t\t[:n | n includesSubstring: toMatch caseSensitive: false]].\r\tclassNames isEmpty ifTrue: [^ self classNotFound].\r\texactMatch _ classNames detect: [:each | each asLowercase = toMatch] ifNone: [nil].\r\r\tindex _ classNames size = 1\r\t\tifTrue:\t[1]\r\t\tifFalse:\t[exactMatch\r\t\t\tifNil: [(PopUpMenu labelArray: classNames lines: #()) startUp]\r\t\t\tifNotNil: [classNames addFirst: exactMatch.\r\t\t\t\t(PopUpMenu labelArray: classNames lines: #(1)) startUp]].\r\tindex = 0 ifTrue: [^ self classNotFound].\r\tfoundClass _ Smalltalk at: (classNames at: index) asSymbol.\r \tself selectCategoryForClass: foundClass.\r\tself selectClass: foundClass\r! !\r\r!Browser methodsFor: 'system category functions' stamp: 'sw 11/8/1999 10:04'!\rpotentialClassNames\r\t\"Answer the names of all the classes that could be viewed in this browser.  This hook is provided so that HierarchyBrowsers can indicate their restricted subset.  For generic Browsers, the entire list of classes known to Smalltalk is provided, though of course that really only is accurate in the case of full system browsers.\"\r\r\t^ Smalltalk classNames! !\r\r!Browser methodsFor: 'system category functions' stamp: 'tk 4/2/98 13:46'!\rprintOutSystemCategory\r\t\"Print a description of each class in the selected category as Html.\"\r\rCursor write showWhile:\r\t[systemCategoryListIndex ~= 0\r\t\tifTrue: [systemOrganizer fileOutCategory: self selectedSystemCategoryName\r\t\t\t\t\t\t\t\tasHtml: true ]]\r! !\r\r!Browser methodsFor: 'system category functions' stamp: 'di 4/12/98 13:55'!\rremoveSystemCategory\r\t\"If a class category is selected, create a Confirmer so the user can \r\tverify that the currently selected class category and all of its classes\r \tshould be removed from the system. If so, remove it.\"\r\r\tsystemCategoryListIndex = 0 ifTrue: [^ self].\r\tself okToChange ifFalse: [^ self].\r\t(self classList size = 0\r\t\tor: [self confirm: 'Are you sure you want to\rremove this system category \rand all its classes?'])\r\t\tifTrue: \r\t\t[systemOrganizer removeSystemCategory: self selectedSystemCategoryName.\r\t\tself systemCategoryListIndex: 0.\r\t\tself changed: #systemCategoryList]! !\r\r!Browser methodsFor: 'system category functions' stamp: 'di 4/12/98 13:55'!\rrenameSystemCategory\r\t\"Prompt for a new category name and add it before the\r\tcurrent selection, or at the end if no current selection\"\r\t| oldIndex oldName newName |\r\t(oldIndex _ systemCategoryListIndex) = 0\r\t\tifTrue: [^ self].  \"no selection\"\r\tself okToChange ifFalse: [^ self].\r\toldName _ self selectedSystemCategoryName.\r\tnewName _ self\r\t\trequest: 'Please type new category name'\r\t\tinitialAnswer: oldName.\r\tnewName isEmpty\r\t\tifTrue: [^ self]\r\t\tifFalse: [newName _ newName asSymbol].\r\toldName = newName ifTrue: [^ self].\r\tsystemOrganizer\r\t\trenameCategory: oldName\r\t\ttoBe: newName.\r\tself systemCategoryListIndex: oldIndex.\r\tself changed: #systemCategoryList.! !\r\r!Browser methodsFor: 'system category functions' stamp: 'sw 11/8/1999 14:07'!\rsystemCatSingletonMenu: aMenu\r\r\t^ aMenu labels:\r'browse all\rbrowse\rprintOut\rfileOut\rupdate\rrename...\rremove' \r\tlines: #(2 4)\r\tselections:\r\t\t#(browseAllClasses buildSystemCategoryBrowser\r\t\tprintOutSystemCategory fileOutSystemCategory updateSystemCategories\r\t\trenameSystemCategory removeSystemCategory)\r! !\r\r!Browser methodsFor: 'system category functions' stamp: 'brp 8/4/2003 21:32'!\rsystemCategoryMenu: aMenu\r\r^ aMenu labels:\r'find class... (f)\rrecent classes... (r)\rbrowse all\rbrowse\rprintOut\rfileOut\rreorganize\ralphabetize\rupdate\radd item...\rrename...\rremove' \r\tlines: #(2 4 6 8)\r\tselections:\r\t\t#(findClass recent browseAllClasses buildSystemCategoryBrowser\r\t\tprintOutSystemCategory fileOutSystemCategory\r\t\teditSystemCategories alphabetizeSystemCategories updateSystemCategories\r\t\taddSystemCategory renameSystemCategory removeSystemCategory )! !\r\r!Browser methodsFor: 'system category functions' stamp: 'di 4/12/98 13:17'!\rupdateSystemCategories\r\t\"The class categories were changed in another browser. The receiver must \r\treorganize its lists based on these changes.\"\r\r\tself okToChange ifFalse: [^ self].\r\tself changed: #systemCategoryList! !\r\r\r!Browser methodsFor: 'system category list' stamp: 'tk 5/4/1998 15:46'!\rindexIsOne\r\t\"When used as a singleton list, index is always one\"\r\t^ 1! !\r\r!Browser methodsFor: 'system category list' stamp: 'tk 5/4/1998 15:46'!\rindexIsOne: value\r\t\"When used as a singleton list, can't change it\"\r\r\t^ self! !\r\r!Browser methodsFor: 'system category list' stamp: 'stp 01/13/2000 12:25'!\rselectCategoryForClass: theClass\r\r\tself systemCategoryListIndex: (self systemCategoryList indexOf: theClass category)\r! !\r\r!Browser methodsFor: 'system category list' stamp: 'di 12/6/1999 20:11'!\rselectedEnvironment\r\t\"Answer the name of the selected system category or nil.\"\r\r\tsystemCategoryListIndex = 0 ifTrue: [^nil].\r\t^ Smalltalk environmentForCategory: self selectedSystemCategoryName! !\r\r!Browser methodsFor: 'system category list'!\rselectedSystemCategoryName\r\t\"Answer the name of the selected system category or nil.\"\r\r\tsystemCategoryListIndex = 0 ifTrue: [^nil].\r\t^self systemCategoryList at: systemCategoryListIndex! !\r\r!Browser methodsFor: 'system category list'!\rsystemCategoryList\r\t\"Answer the class categories modelled by the receiver.\"\r\r\t^systemOrganizer categories! !\r\r!Browser methodsFor: 'system category list'!\rsystemCategoryListIndex\r\t\"Answer the index of the selected class category.\"\r\r\t^systemCategoryListIndex! !\r\r!Browser methodsFor: 'system category list' stamp: 'nk 2/14/2004 15:06'!\rsystemCategoryListIndex: anInteger \r\t\"Set the selected system category index to be anInteger. Update all other \r\tselections to be deselected.\"\r\r\tsystemCategoryListIndex _ anInteger.\r\tclassListIndex _ 0.\r\tmessageCategoryListIndex _ 0.\r\tmessageListIndex _ 0.\r\tself editSelection: ( anInteger = 0 ifTrue: [#none] ifFalse: [#newClass]).\r\tmetaClassIndicated _ false.\r\tself setClassOrganizer.\r\tcontents _ nil.\r\tself changed: #systemCategorySelectionChanged.\r\tself changed: #systemCategoryListIndex.\t\"update my selection\"\r\tself changed: #classList.\r\tself changed: #messageCategoryList.\r\tself changed: #messageList.\r\tself changed: #relabel.\r\tself contentsChanged! !\r\r!Browser methodsFor: 'system category list' stamp: 'tk 4/3/98 10:30'!\rsystemCategorySingleton\r\r\t| cat |\r\tcat _ self selectedSystemCategoryName.\r\t^ cat ifNil: [Array new]\r\t\tifNotNil: [Array with: cat]! !\r\r!Browser methodsFor: 'system category list'!\rtoggleSystemCategoryListIndex: anInteger \r\t\"If anInteger is the current system category index, deselect it. Else make \r\tit the current system category selection.\"\r\r\tself systemCategoryListIndex: \r\t\t(systemCategoryListIndex = anInteger\r\t\t\tifTrue: [0]\r\t\t\tifFalse: [anInteger])! !\r\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rBrowser class\r\tinstanceVariableNames: ''!\r\r!Browser class methodsFor: 'instance creation' stamp: 'sd 2/2/2004 13:50'!\rfullOnClass: aClass \r\t\"Open a new full browser set to class.\"\r\t| brow |\r\tbrow _ self new.\r\tbrow setClass: aClass selector: nil.\r\t^ self \r\t\topenBrowserView: (brow openEditString: nil)\r\t\tlabel: 'System Browser'! !\r\r!Browser class methodsFor: 'instance creation' stamp: 'jcg 10/29/2003 23:11'!\rfullOnClass: aClass selector: aSelector\r\t\"Open a new full browser set to class.\"\r\r\t| brow classToUse |\r\tclassToUse _ Preferences browseToolClass.\r\tbrow _ classToUse new.\r\tbrow setClass: aClass selector: aSelector.\r\t^ classToUse \r\t\topenBrowserView: (brow openEditString: nil)\r\t\tlabel: brow labelString! !\r\r!Browser class methodsFor: 'instance creation' stamp: 'di 10/18/1999 22:03'!\rnew\r\r\t^super new systemOrganizer: SystemOrganization! !\r\r!Browser class methodsFor: 'instance creation' stamp: 'jcg 10/29/2003 23:12'!\rnewOnCategory: aCategory\r\t\"Browse the system category of the given name.  7/13/96 sw\"\r\r\t\"Browser newOnCategory: 'Interface-Browser'\"\r\r\t| newBrowser catList |\r\tnewBrowser _ self new.\r\tcatList _ newBrowser systemCategoryList.\r\tnewBrowser systemCategoryListIndex: \r\t\t(catList indexOf: aCategory asSymbol ifAbsent: [^ self inform: 'No such category']).\r\t^ self \r\t\topenBrowserView: (newBrowser openSystemCatEditString: nil)\r\t\tlabel: 'Classes in category ', aCategory\r! !\r\r!Browser class methodsFor: 'instance creation' stamp: 'tk 4/18/1998 16:28'!\rnewOnClass: aClass \r\t\"Open a new class browser on this class.\"\r\t^ self newOnClass: aClass label: 'Class Browser: ', aClass name! !\r\r!Browser class methodsFor: 'instance creation' stamp: 'jcg 10/29/2003 23:12'!\rnewOnClass: aClass label: aLabel\r\t\"Open a new class browser on this class.\"\r\t| newBrowser |\r\r\tnewBrowser _ self new.\r\tnewBrowser setClass: aClass selector: nil.\r\t^ self \r\t\topenBrowserView: (newBrowser openOnClassWithEditString: nil)\r\t\tlabel: aLabel\r! !\r\r!Browser class methodsFor: 'instance creation' stamp: 'jcg 10/29/2003 23:12'!\rnewOnClass: aClass selector: aSymbol\r\t\"Open a new class browser on this class.\"\r\t| newBrowser |\r\r\tnewBrowser _ self new.\r\tnewBrowser setClass: aClass selector: aSymbol.\r\t^ self \r\t\topenBrowserView: (newBrowser openOnClassWithEditString: nil)\r\t\tlabel: 'Class Browser: ', aClass name\r! !\r\r!Browser class methodsFor: 'instance creation' stamp: 'jcg 10/29/2003 23:11'!\ropenBrowser\r\t\"Create and schedule a BrowserView with default browser label. The\r\tview consists of five subviews, starting with the list view of system\r\tcategories of SystemOrganization. The initial text view part is empty.\"\r\r\t| br |\r\tbr := self new.\r\t^ self\r\t\topenBrowserView: (br openEditString: nil)\r\t\tlabel: br defaultBrowserTitle.\r\r! !\r\r!Browser class methodsFor: 'instance creation' stamp: 'BG 10/30/2003 21:10'!\ropenBrowserView: aBrowserView label: aString \r\t\"Schedule aBrowserView, labelling the view aString.\"\r\t\r\taBrowserView label: aString.\r\taBrowserView minimumSize: 300 @ 200.\r\taBrowserView subViews do: [:each | each controller].\r\taBrowserView controller open! !\r\r!Browser class methodsFor: 'instance creation' stamp: 'sd 1/5/2002 21:10'!\ropenMessageBrowserForClass: aBehavior selector: aSymbol editString: aString\r\t\"Create and schedule a message browser for the class, aBehavior, in \r\twhich the argument, aString, contains characters to be edited in the text \r\tview. These characters are the source code for the message selector \r\taSymbol.\"\r\r\t| newBrowser |\r\t(newBrowser _ self new) setClass: aBehavior selector: aSymbol.\r\t^ self openBrowserView: (newBrowser openMessageEditString: aString)\r\t\tlabel: newBrowser selectedClassOrMetaClassName , ' ' , newBrowser selectedMessageName\r! !\r\r\r!Browser class methodsFor: 'class initialization' stamp: 'asm 4/10/2003 12:27'!\rinitialize\r\t\"Browser initialize\"\r\r\tRecentClasses := OrderedCollection new.\r\tself registerInFlapsRegistry.\t! !\r\r!Browser class methodsFor: 'class initialization' stamp: 'asm 4/10/2003 12:32'!\rregisterInFlapsRegistry\r\t\"Register the receiver in the system's flaps registry\"\r\tself environment\r\t\tat: #Flaps\r\t\tifPresent: [:cl | cl registerQuad: #(#Browser #prototypicalToolWindow 'Browser' 'A Browser is a tool that allows you to view all the code of all the classes in the system' ) \r\t\t\t\t\t\tforFlapNamed: 'Tools']! !\r\r!Browser class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 12:32'!\runload\r\t\"Unload the receiver from global registries\"\r\r\tself environment at: #Flaps ifPresent: [:cl |\r\tcl unregisterQuadsWithReceiver: self] ! !\r\rSwitch subclass: #Button\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Menus'!\r!Button commentStamp: '<historical>' prior: 0!\rI am a Switch that turns off automatically after being turned on, that is, I act like a push-button switch.!\r\r\r!Button methodsFor: 'state'!\rturnOff\r\t\"Sets the state of the receiver to 'off'. The off action of the receiver is not  \r\texecuted.\"\r\r\ton _ false! !\r\r!Button methodsFor: 'state'!\rturnOn\r\t\"The receiver remains in the 'off' state'.\"\r\r\tself doAction: onAction.\r\tself doAction: offAction! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rButton class\r\tinstanceVariableNames: ''!\r\r!Button class methodsFor: 'instance creation'!\rnewOn \r\t\"Refer to the comment in Switch|newOn.\"\r\r\tself error: 'Buttons cannot be created in the on state'.\r\t^nil! !\rArrayedCollection variableByteSubclass: #ByteArray\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Arrayed'!\r!ByteArray commentStamp: '<historical>' prior: 0!\rI represent an ArrayedCollection whose elements are integers between 0 and 255.\r!\r\r\r!ByteArray methodsFor: 'accessing' stamp: 'sma 4/22/2000 17:47'!\ratAllPut: value\r\t\"Fill the receiver with the given value\"\r\r\t<primitive: 145>\r\tsuper atAllPut: value! !\r\r!ByteArray methodsFor: 'accessing' stamp: 'ar 12/5/1998 14:52'!\rbyteAt: index\r\t<primitive: 60>\r\t^self at: index! !\r\r!ByteArray methodsFor: 'accessing' stamp: 'ar 12/5/1998 14:52'!\rbyteAt: index put: value\r\t<primitive: 61>\r\t^self at: index put: value! !\r\r!ByteArray methodsFor: 'accessing' stamp: 'ar 3/3/2001 16:17'!\rbyteSize\r\t^self size! !\r\r!ByteArray methodsFor: 'accessing' stamp: 'tk 3/13/2000 14:46'!\rbytesPerElement\r\t\"Number of bytes in each item.  This multiplied by (self size)*8 gives the number of bits stored.\"\r\t^ 1! !\r\r\r!ByteArray methodsFor: 'platform independent access' stamp: 'ar 11/1/1998 20:44'!\rlongAt: index bigEndian: aBool\r\t\"Return a 32bit integer quantity starting from the given byte index\"\r\t| b0 b1 b2 w h |\r\taBool ifTrue:[\r\t\tb0 _ self at: index.\r\t\tb1 _ self at: index+1.\r\t\tb2 _ self at: index+2.\r\t\tw _ self at: index+3.\r\t] ifFalse:[\r\t\tw _ self at: index.\r\t\tb2 _ self at: index+1.\r\t\tb1 _ self at: index+2.\r\t\tb0 _ self at: index+3.\r\t].\r\t\"Minimize LargeInteger arithmetic\"\r\th _ ((b0 bitAnd: 16r7F) - (b0 bitAnd: 16r80) bitShift: 8) + b1.\r\tb2 = 0 ifFalse:[w _ (b2 bitShift: 8) + w].\r\th = 0 ifFalse:[w _ (h bitShift: 16) + w].\r\t^w! !\r\r!ByteArray methodsFor: 'platform independent access' stamp: 'ar 8/2/2003 19:29'!\rlongAt: index put: value bigEndian: aBool\r\t\"Return a 32bit integer quantity starting from the given byte index\"\r\t| b0 b1 b2 b3 |\r\tb0 _ value bitShift: -24.\r\tb0 _ (b0 bitAnd: 16r7F) - (b0 bitAnd: 16r80).\r\tb0 < 0 ifTrue:[b0 := 256 + b0].\r\tb1 _ (value bitShift: -16) bitAnd: 255.\r\tb2 _ (value bitShift: -8) bitAnd: 255.\r\tb3 _ value bitAnd: 255.\r\taBool ifTrue:[\r\t\tself at: index put: b0.\r\t\tself at: index+1 put: b1.\r\t\tself at: index+2 put: b2.\r\t\tself at: index+3 put: b3.\r\t] ifFalse:[\r\t\tself at: index put: b3.\r\t\tself at: index+1 put: b2.\r\t\tself at: index+2 put: b1.\r\t\tself at: index+3 put: b0.\r\t].\r\t^value! !\r\r!ByteArray methodsFor: 'platform independent access' stamp: 'ar 11/1/1998 20:57'!\rshortAt: index bigEndian: aBool\r\t\"Return a 16 bit integer quantity starting from the given byte index\"\r\t| uShort |\r\tuShort _ self unsignedShortAt: index bigEndian: aBool.\r\t^(uShort bitAnd: 16r7FFF) - (uShort bitAnd: 16r8000)! !\r\r!ByteArray methodsFor: 'platform independent access' stamp: 'ar 11/3/1998 14:20'!\rshortAt: index put: value bigEndian: aBool\r\t\"Store a 16 bit integer quantity starting from the given byte index\"\r\tself unsignedShortAt: index put: (value bitAnd: 16r7FFF) - (value bitAnd: -16r8000) bigEndian: aBool.\r\t^value! !\r\r!ByteArray methodsFor: 'platform independent access' stamp: 'ar 11/1/1998 20:49'!\runsignedLongAt: index bigEndian: aBool\r\t\"Return a 32bit unsigned integer quantity starting from the given byte index\"\r\t| b0 b1 b2 w |\r\taBool ifTrue:[\r\t\tb0 _ self at: index.\r\t\tb1 _ self at: index+1.\r\t\tb2 _ self at: index+2.\r\t\tw _ self at: index+3.\r\t] ifFalse:[\r\t\tw _ self at: index.\r\t\tb2 _ self at: index+1.\r\t\tb1 _ self at: index+2.\r\t\tb0 _ self at: index+3.\r\t].\r\t\"Minimize LargeInteger arithmetic\"\r\tb2 = 0 ifFalse:[w _ (b2 bitShift: 8) + w].\r\tb1 = 0 ifFalse:[w _ (b1 bitShift: 16) + w].\r\tb0 = 0 ifFalse:[w _ (b0 bitShift: 24) + w].\r\t^w! !\r\r!ByteArray methodsFor: 'platform independent access' stamp: 'ar 11/1/1998 20:49'!\runsignedLongAt: index put: value bigEndian: aBool\r\t\"Store a 32bit unsigned integer quantity starting from the given byte index\"\r\t| b0 b1 b2 b3 |\r\tb0 _ value bitShift: -24.\r\tb1 _ (value bitShift: -16) bitAnd: 255.\r\tb2 _ (value bitShift: -8) bitAnd: 255.\r\tb3 _ value bitAnd: 255.\r\taBool ifTrue:[\r\t\tself at: index put: b0.\r\t\tself at: index+1 put: b1.\r\t\tself at: index+2 put: b2.\r\t\tself at: index+3 put: b3.\r\t] ifFalse:[\r\t\tself at: index put: b3.\r\t\tself at: index+1 put: b2.\r\t\tself at: index+2 put: b1.\r\t\tself at: index+3 put: b0.\r\t].\r\t^value! !\r\r!ByteArray methodsFor: 'platform independent access' stamp: 'ar 11/1/1998 20:51'!\runsignedShortAt: index bigEndian: aBool\r\t\"Return a 16 bit unsigned integer quantity starting from the given byte index\"\r\t^aBool \r\t\tifTrue:[((self at: index) bitShift: 8) + (self at: index+1)]\r\t\tifFalse:[((self at: index+1) bitShift: 8) + (self at: index)].! !\r\r!ByteArray methodsFor: 'platform independent access' stamp: 'ar 11/1/1998 20:53'!\runsignedShortAt: index put: value bigEndian: aBool\r\t\"Store a 16 bit unsigned integer quantity starting from the given byte index\"\r\taBool ifTrue:[\r\t\tself at: index put: (value bitShift: -8).\r\t\tself at: index+1 put: (value bitAnd: 255).\r\t] ifFalse:[\r\t\tself at: index+1 put: (value bitShift: -8).\r\t\tself at: index put: (value bitAnd: 255).\r\t].\r\t^value! !\r\r\r!ByteArray methodsFor: 'converting' stamp: 'sma 5/12/2000 17:35'!\rasByteArray\r\t^ self! !\r\r!ByteArray methodsFor: 'converting'!\rasString\r\t\"Convert to a String with Characters for each byte.\r\tFast code uses primitive that avoids character conversion\"\r\r\t^ (String new: self size) replaceFrom: 1 to: self size with: self! !\r\r\r!ByteArray methodsFor: 'private'!\rdefaultElement\r\r\t^0! !\r\r!ByteArray methodsFor: 'private'!\rreplaceFrom: start to: stop with: replacement startingAt: repStart \r\t\"Primitive. This destructively replaces elements from start to stop in the receiver starting at index, repStart, in the collection, replacement. Answer the receiver. Range checks are performed in the primitive only. Optional. See Object documentation whatIsAPrimitive.\"\r\t<primitive: 105>\r\tsuper replaceFrom: start to: stop with: replacement startingAt: repStart! !\r\r\r!ByteArray methodsFor: 'comparing' stamp: 'SqR 8/13/2002 10:52'!\rhash\r\t\"#hash is implemented, because #= is implemented\"\r\r\t^self class\r\t\thashBytes: self\r\t\tstartingWith: self species hash! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rByteArray class\r\tinstanceVariableNames: ''!\r\r!ByteArray class methodsFor: 'plugin generation' stamp: 'acg 9/17/1999 01:13'!\rccg: cg emitLoadFor: aString from: anInteger on: aStream\r\r\tcg emitLoad: aString asCharPtrFrom: anInteger on: aStream! !\r\r!ByteArray class methodsFor: 'plugin generation' stamp: 'acg 9/19/1999 00:25'!\rccg: cg prolog: aBlock expr: aString index: anInteger\r\r\t^cg \r\t\tccgLoad: aBlock \r\t\texpr: aString \r\t\tasCharPtrFrom: anInteger\r\t\tandThen: (cg ccgValBlock: 'isBytes')! !\r\r!ByteArray class methodsFor: 'plugin generation' stamp: 'acg 9/17/1999 01:13'!\rccgDeclareCForVar: aSymbolOrString\r\r\t^'char *', aSymbolOrString! !\r\r\r!ByteArray class methodsFor: 'byte based hash' stamp: 'SqR 8/21/2002 16:21'!\rhashBytes: aByteArray startingWith: speciesHash\r\t\"Answer the hash of a byte-indexed collection,\r\tusing speciesHash as the initial value.\r\tSee SmallInteger>>hashMultiply.\r\r\tThe primitive should be renamed at a\r\tsuitable point in the future\"\r\r\t| byteArraySize hash low |\r\t<primitive: 'primitiveStringHash' module: 'MiscPrimitivePlugin'>\r\r\tself var: #aHash declareC: 'int speciesHash'.\r\tself var: #aByteArray declareC: 'unsigned char *aByteArray'.\r\r\tbyteArraySize _ aByteArray size.\r\thash _ speciesHash bitAnd: 16rFFFFFFF.\r\t1 to: byteArraySize do: [:pos |\r\t\thash _ hash + (aByteArray basicAt: pos).\r\t\t\"Begin hashMultiply\"\r\t\tlow _ hash bitAnd: 16383.\r\t\thash _ (16r260D * low + ((16r260D * (hash bitShift: -14) + (16r0065 * low) bitAnd: 16383) * 16384)) bitAnd: 16r0FFFFFFF.\r\t].\r\t^ hash! !\rModel subclass: #CPUWatcher\r\tinstanceVariableNames: 'tally watcher threshold'\r\tclassVariableNames: 'CurrentCPUWatcher'\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Process Browser'!\r!CPUWatcher commentStamp: '<historical>' prior: 0!\rCPUWatcher implements a simple runaway process monitoring tool\rthat will suspend a process that is taking up too much of Squeak's\rtime and allow user interaction. By default it watches for a Process that\ris taking more than 80% of the time; this threshold can be changed.\r\rCPUWatcher can also be used to show cpu percentages for each process \rfrom within the ProcessBrowser.\r\r\tCPUWatcher startMonitoring.\t\"process period 20 seconds, sample rate 100 msec\"\r\tCPUWatcher current monitorProcessPeriod: 10 sampleRate: 20.\r\tCPUWatcher current threshold: 0.5.\t\"change from 80% to 50%\"\r\tCPUWatcher stopMonitoring.\r!\r\r\r!CPUWatcher methodsFor: 'process operations' stamp: 'nk 3/8/2001 17:13'!\rdebugProcess: aProcess\r\t| uiPriority oldPriority |\r\tuiPriority _ Processor activeProcess priority.\r\taProcess priority >= uiPriority ifTrue: [\r\t\toldPriority _ ProcessBrowser setProcess: aProcess toPriority: uiPriority - 1\r\t].\r\tProcessBrowser debugProcess: aProcess.! !\r\r!CPUWatcher methodsFor: 'process operations' stamp: 'nk 3/8/2001 17:27'!\rdebugProcess: aProcess fromMenu: aMenuMorph\r\taMenuMorph delete.\r\tself debugProcess: aProcess.! !\r\r!CPUWatcher methodsFor: 'process operations' stamp: 'nk 3/8/2001 17:21'!\rresumeProcess: aProcess fromMenu: aMenuMorph\r\taMenuMorph delete.\r\tProcessBrowser resumeProcess: aProcess.! !\r\r!CPUWatcher methodsFor: 'process operations' stamp: 'nk 3/8/2001 17:24'!\rterminateProcess: aProcess fromMenu: aMenuMorph\r\taMenuMorph delete.\r\tProcessBrowser terminateProcess: aProcess.! !\r\r\r!CPUWatcher methodsFor: 'porcine capture' stamp: 'nk 3/8/2001 20:47'!\rcatchThePig: aProcess\r\t| rules |\r\t\"nickname, allow-stop, allow-debug\"\r\trules _ ProcessBrowser nameAndRulesFor: aProcess.\r\r\t(ProcessBrowser isUIProcess: aProcess)\r\t\tifTrue: [ \"aProcess debugWithTitle: 'Interrupted from the CPUWatcher'.\" ]\r\t\tifFalse: [ rules second ifFalse: [ ^self ].\r\t\t\t\tProcessBrowser suspendProcess: aProcess.\r\t\t\t\tself openWindowForSuspendedProcess: aProcess ]\r! !\r\r!CPUWatcher methodsFor: 'porcine capture' stamp: 'nk 3/8/2001 16:05'!\rfindThePig\r\t\"tally has been updated. Look at it to see if there is a bad process.\r\tThis runs at a very high priority, so make it fast\"\r\t| countAndProcess | \r\tcountAndProcess _ tally sortedCounts first.\r\t(countAndProcess key / tally size > self threshold) ifTrue: [ | proc |\r\t\tproc _ countAndProcess value.\r\t\tproc == Processor backgroundProcess ifTrue: [ ^self ].\t\"idle process? OK\"\r\t\tself catchThePig: proc\r\t].\r! !\r\r!CPUWatcher methodsFor: 'porcine capture' stamp: 'nk 3/8/2001 18:34'!\ropenMVCWindowForSuspendedProcess: aProcess\r\tProcessBrowser new openAsMVC.! !\r\r!CPUWatcher methodsFor: 'porcine capture' stamp: 'BG 10/29/2003 01:06'!\ropenWindowForSuspendedProcess: aProcess\r\r\tSmalltalk isMorphic\r\t\tifTrue: [ ]\r\t\tifFalse: [ [ self openMVCWindowForSuspendedProcess: aProcess ] forkAt: Processor userSchedulingPriority ]\r! !\r\r\r!CPUWatcher methodsFor: 'startup-shutdown' stamp: 'nk 3/14/2001 08:39'!\rmonitorProcessPeriod: secs sampleRate: msecs\r\tself stopMonitoring.\r\r\twatcher _ [ [ | promise |\r\t\tpromise _ Processor tallyCPUUsageFor: secs every: msecs.\r\t\ttally _ promise value.\r\t\tpromise _ nil.\r\t\tself findThePig.\r\t] repeat ] forkAt: Processor highestPriority.\r\tProcessor yield ! !\r\r!CPUWatcher methodsFor: 'startup-shutdown' stamp: 'nk 3/14/2001 08:07'!\rstartMonitoring\r\tself\r\t\tmonitorProcessPeriod: 20 sampleRate: 100! !\r\r!CPUWatcher methodsFor: 'startup-shutdown' stamp: 'nk 3/8/2001 16:24'!\rstopMonitoring\r\twatcher ifNotNil: [\r\t\tProcessBrowser terminateProcess: watcher.\r\t\twatcher _ nil.\r\t]! !\r\r\r!CPUWatcher methodsFor: 'accessing' stamp: 'nk 3/14/2001 07:56'!\risMonitoring\r\t^watcher notNil! !\r\r!CPUWatcher methodsFor: 'accessing' stamp: 'nk 3/8/2001 18:36'!\rtally\r\t^tally copy! !\r\r!CPUWatcher methodsFor: 'accessing' stamp: 'nk 3/8/2001 18:49'!\rthreshold\r\t\"What fraction of the time can a process be the active process before we stop it?\"\r\t^threshold! !\r\r!CPUWatcher methodsFor: 'accessing' stamp: 'nk 3/8/2001 18:38'!\rthreshold: thresh\r\t\"What fraction of the time can a process be the active process before we stop it?\"\r\tthreshold _ (thresh max: 0.02) min: 1.0! !\r\r!CPUWatcher methodsFor: 'accessing' stamp: 'nk 3/14/2001 08:26'!\rwatcherProcess\r\t^watcher! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rCPUWatcher class\r\tinstanceVariableNames: ''!\r\r!CPUWatcher class methodsFor: 'as yet unclassified' stamp: 'nk 3/8/2001 18:45'!\rcurrent\r\t^CurrentCPUWatcher\r! !\r\r!CPUWatcher class methodsFor: 'as yet unclassified' stamp: 'nk 3/14/2001 08:28'!\rcurrentWatcherProcess\r\t^CurrentCPUWatcher ifNotNil: [ CurrentCPUWatcher watcherProcess ]\r! !\r\r!CPUWatcher class methodsFor: 'as yet unclassified' stamp: 'nk 3/8/2001 21:43'!\rdumpTallyOnTranscript\r\tself current ifNotNil: [\r\t\tProcessBrowser dumpTallyOnTranscript: self current tally\r\t]! !\r\r!CPUWatcher class methodsFor: 'as yet unclassified' stamp: 'nk 6/18/2003 07:15'!\rinitialize\r\t\"CPUWatcher initialize\"\r\tSmalltalk addToStartUpList: self.\r\tSmalltalk addToShutDownList: self.! !\r\r!CPUWatcher class methodsFor: 'as yet unclassified' stamp: 'nk 3/14/2001 08:06'!\risMonitoring\r\r\t^CurrentCPUWatcher notNil and: [ CurrentCPUWatcher isMonitoring ]\r! !\r\r!CPUWatcher class methodsFor: 'as yet unclassified' stamp: 'nk 10/31/2001 10:50'!\rmonitorPreferenceChanged\r\tPreferences cpuWatcherEnabled\r\t\tifTrue: [ self startMonitoring ]\r\t\tifFalse: [ self stopMonitoring ]! !\r\r!CPUWatcher class methodsFor: 'as yet unclassified' stamp: 'nk 6/18/2003 07:14'!\rshutDown\r\tself stopMonitoring.! !\r\r!CPUWatcher class methodsFor: 'as yet unclassified' stamp: 'nk 3/14/2001 08:17'!\rstartMonitoring\r\t\"CPUWatcher startMonitoring\"\r\r\t^self startMonitoringPeriod: 20 rate: 100 threshold: 0.8! !\r\r!CPUWatcher class methodsFor: 'as yet unclassified' stamp: 'nk 3/14/2001 08:16'!\rstartMonitoringPeriod: pd rate: rt threshold: th\r\t\"CPUWatcher startMonitoring\"\r\r\tCurrentCPUWatcher ifNotNil: [ ^CurrentCPUWatcher startMonitoring. ].\r\tCurrentCPUWatcher _ (self new)\r\t\tmonitorProcessPeriod: pd sampleRate: rt;\r\t\tthreshold: th;\r\t\tyourself.\r\t^CurrentCPUWatcher\r! !\r\r!CPUWatcher class methodsFor: 'as yet unclassified' stamp: 'nk 6/18/2003 07:14'!\rstartUp\r\tself monitorPreferenceChanged.! !\r\r!CPUWatcher class methodsFor: 'as yet unclassified' stamp: 'nk 3/14/2001 08:05'!\rstopMonitoring\r\t\"CPUWatcher stopMonitoring\"\r\r\tCurrentCPUWatcher ifNotNil: [ CurrentCPUWatcher stopMonitoring. ].\r\tCurrentCPUWatcher _ nil.\r! !\rFileStreamException subclass: #CannotDeleteFileException\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Exceptions Kernel'!\rParseNode subclass: #CascadeNode\r\tinstanceVariableNames: 'receiver messages'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Compiler'!\r!CascadeNode commentStamp: '<historical>' prior: 0!\rThe first message has the common receiver, the rest have receiver == nil, which signifies cascading.!\r\r\r!CascadeNode methodsFor: 'initialize-release'!\rreceiver: receivingObject messages: msgs\r\t\" Transcript show: 'abc'; cr; show: 'def' \"\r\r\treceiver _ receivingObject.\r\tmessages _ msgs! !\r\r\r!CascadeNode methodsFor: 'code generation'!\remitForValue: stack on: aStream\r\r\treceiver emitForValue: stack on: aStream.\r\t1 to: messages size - 1 do: \r\t\t[:i | \r\t\taStream nextPut: Dup.\r\t\tstack push: 1.\r\t\t(messages at: i) emitForValue: stack on: aStream.\r\t\taStream nextPut: Pop.\r\t\tstack pop: 1].\r\tmessages last emitForValue: stack on: aStream! !\r\r!CascadeNode methodsFor: 'code generation'!\rsizeForValue: encoder\r\r\t| size |\r\tsize _ (receiver sizeForValue: encoder) + (messages size - 1 * 2).\r\tmessages do: [:aMessage | size _ size + (aMessage sizeForValue: encoder)].\r\t^size! !\r\r\r!CascadeNode methodsFor: 'printing'!\rprintOn: aStream indent: level\r\tself printOn: aStream indent: level precedence: 0! !\r\r!CascadeNode methodsFor: 'printing' stamp: 'di 4/25/2000 19:17'!\rprintOn: aStream indent: level precedence: p \r\r\tp > 0 ifTrue: [aStream nextPut: $(].\r\tmessages first printReceiver: receiver on: aStream indent: level.\r\t1 to: messages size do: \r\t\t[:i | (messages at: i) printOn: aStream indent: level.\r\t\ti < messages size ifTrue: \r\t\t\t\t[aStream nextPut: $;.\r\t\t\t\tmessages first precedence >= 2 ifTrue: [aStream crtab: level + 1]]].\r\tp > 0 ifTrue: [aStream nextPut: $)]! !\r\r\r!CascadeNode methodsFor: 'accessing' stamp: 'tk 10/22/2000 16:55'!\rreceiver\r\t^receiver! !\rObject subclass: #Categorizer\r\tinstanceVariableNames: 'categoryArray categoryStops elementArray'\r\tclassVariableNames: 'Default NullCategory'\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Classes'!\r\r!Categorizer methodsFor: 'accessing' stamp: 'NS 4/5/2004 17:44'!\raddCategory: newCategory\r\t^ self addCategory: newCategory before: nil ! !\r\r!Categorizer methodsFor: 'accessing' stamp: 'NS 4/5/2004 17:44'!\raddCategory: catString before: nextCategory\r\t\"Add a new category named heading.\r\tIf default category exists and is empty, remove it.\r\tIf nextCategory is nil, then add the new one at the end,\r\totherwise, insert it before nextCategory.\"\r\t| index newCategory |\r\tnewCategory _ catString asSymbol.\r\t(categoryArray indexOf: newCategory) > 0\r\t\tifTrue: [^self].\t\"heading already exists, so done\"\r\tindex _ categoryArray indexOf: nextCategory\r\t\tifAbsent: [categoryArray size + 1].\r\tcategoryArray _ categoryArray\r\t\tcopyReplaceFrom: index\r\t\tto: index-1\r\t\twith: (Array with: newCategory).\r\tcategoryStops _ categoryStops\r\t\tcopyReplaceFrom: index\r\t\tto: index-1\r\t\twith: (Array with: (index = 1\r\t\t\t\tifTrue: [0]\r\t\t\t\tifFalse: [categoryStops at: index-1])).\r\t\"remove empty default category\"\r\t(newCategory ~= Default\r\t\t\tand: [(self listAtCategoryNamed: Default) isEmpty])\r\t\tifTrue: [self removeCategory: Default]! !\r\r!Categorizer methodsFor: 'accessing' stamp: 'NS 4/5/2004 17:44'!\rallMethodSelectors\r\t\"give a list of all method selectors.\"\r\r\t^ elementArray copy sort! !\r\r!Categorizer methodsFor: 'accessing' stamp: 'NS 4/7/2004 10:29'!\rcategories\r\t\"Answer an Array of categories (names).\"\r\tcategoryArray isNil ifTrue: [^ nil].\r\t(categoryArray size = 1 \r\t\tand: [categoryArray first = Default & (elementArray size = 0)])\r\t\tifTrue: [^Array with: NullCategory].\r\t^categoryArray! !\r\r!Categorizer methodsFor: 'accessing' stamp: 'NS 4/5/2004 17:44'!\rcategories: anArray \r\t\"Reorder my categories to be in order of the argument, anArray. If the \r\tresulting organization does not include all elements, then give an error.\"\r\r\t| newCategories newStops newElements catName list runningTotal | \r\tnewCategories _ Array new: anArray size.\r\tnewStops _ Array new: anArray size.\r\tnewElements _ Array new: 0.\r\trunningTotal _ 0.\r\t1 to: anArray size do:\r\t\t[:i |\r\t\tcatName _ (anArray at: i) asSymbol.\r\t\tlist _ self listAtCategoryNamed: catName.\r\t\t\t\tnewElements _ newElements, list.\r\t\t\t\tnewCategories at: i put: catName.\r\t\t\t\tnewStops at: i put: (runningTotal _ runningTotal + list size)].\r\telementArray do:\r\t\t[:element | \"check to be sure all elements are included\"\r\t\t(newElements includes: element)\r\t\t\tifFalse: [^self error: 'New categories must match old ones']].\r\t\"Everything is good, now update my three arrays.\"\r\tcategoryArray _ newCategories.\r\tcategoryStops _ newStops.\r\telementArray _ newElements! !\r\r!Categorizer methodsFor: 'accessing' stamp: 'NS 4/5/2004 17:44'!\rcategoryOfElement: element \r\t\"Answer the category associated with the argument, element.\"\r\r\t| index |\r\tindex _ self numberOfCategoryOfElement: element.\r\tindex = 0\r\t\tifTrue: [^nil]\r\t\tifFalse: [^categoryArray at: index]! !\r\r!Categorizer methodsFor: 'accessing' stamp: 'NS 4/7/2004 10:36'!\rchangeFromCategorySpecs: categorySpecs \r\t\"Tokens is an array of categorySpecs as scanned from a browser 'reorganize' pane, or built up by some other process, such as a scan of an environment.\"\r\r\t| oldElements newElements newCategories newStops currentStop temp ii cc catSpec |\r\toldElements _ elementArray asSet.\r\tnewCategories _ Array new: categorySpecs size.\r\tnewStops _ Array new: categorySpecs size.\r\tcurrentStop _ 0.\r\tnewElements _ WriteStream on: (Array new: 16).\r\t1 to: categorySpecs size do: \r\t\t[:i | \r\t\tcatSpec _ categorySpecs at: i.\r\t\tnewCategories at: i put: catSpec first asSymbol.\r\t\tcatSpec allButFirst asSortedCollection do:\r\t\t\t[:elem |\r\t\t\t(oldElements remove: elem ifAbsent: [nil]) notNil ifTrue:\r\t\t\t\t[newElements nextPut: elem.\r\t\t\t\tcurrentStop _ currentStop+1]].\r\t\tnewStops at: i put: currentStop].\r\r\t\"Ignore extra elements but don't lose any existing elements!!\"\r\toldElements _ oldElements collect:\r\t\t[:elem | Array with: (self categoryOfElement: elem) with: elem].\r\tnewElements _ newElements contents.\r\tcategoryArray _ newCategories.\r\t(cc _ categoryArray asSet) size = categoryArray size ifFalse: [\"has duplicate element\"\r\t\ttemp _ categoryArray asOrderedCollection.\r\t\ttemp removeAll: categoryArray asSet asOrderedCollection.\r\t\ttemp do: [:dup | \r\t\t\tii _ categoryArray indexOf: dup.\r\t\t\t[dup _ (dup,' #2') asSymbol.  cc includes: dup] whileTrue.\r\t\t\tcc add: dup.\r\t\t\tcategoryArray at: ii put: dup]].\r\tcategoryStops _ newStops.\r\telementArray _ newElements.\r\toldElements do: [:pair | self classify: pair last under: pair first].! !\r\r!Categorizer methodsFor: 'accessing' stamp: 'NS 4/5/2004 17:44'!\rchangeFromString: aString \r\t\"Parse the argument, aString, and make this be the receiver's structure.\"\r\r\t| categorySpecs |\r\tcategorySpecs _ Scanner new scanTokens: aString.\r\t\"If nothing was scanned and I had no elements before, then default me\"\r\t(categorySpecs isEmpty and: [elementArray isEmpty])\r\t\tifTrue: [^ self setDefaultList: Array new].\r\r\t^ self changeFromCategorySpecs: categorySpecs! !\r\r!Categorizer methodsFor: 'accessing' stamp: 'NS 4/5/2004 17:44'!\rclassify: element under: heading \r\tself classify: element under: heading suppressIfDefault: true! !\r\r!Categorizer methodsFor: 'accessing' stamp: 'NS 4/5/2004 17:54'!\rclassify: element under: heading suppressIfDefault: aBoolean\r\t\"Store the argument, element, in the category named heading.   If aBoolean is true, then invoke special logic such that the classification is NOT done if the new heading is the Default and the element already had a non-Default classification -- useful for filein\"\r\r\t| catName catIndex elemIndex realHeading |\r\t((heading = NullCategory) or: [heading == nil])\r\t\tifTrue: [realHeading _ Default]\r\t\tifFalse: [realHeading _ heading asSymbol].\r\t(catName _ self categoryOfElement: element) = realHeading\r\t\tifTrue: [^ self].  \"done if already under that category\"\r\r\tcatName ~~ nil ifTrue: \r\t\t[(aBoolean and: [realHeading = Default])\r\t\t\t\tifTrue: [^ self].\t  \"return if non-Default category already assigned in memory\"\r\t\tself removeElement: element].\t\"remove if in another category\"\r\r\t(categoryArray indexOf: realHeading) = 0 ifTrue: [self addCategory: realHeading].\r\r\tcatIndex _ categoryArray indexOf: realHeading.\r\telemIndex _ \r\t\tcatIndex > 1\r\t\t\tifTrue: [categoryStops at: catIndex - 1]\r\t\t\tifFalse: [0].\r\t[(elemIndex _ elemIndex + 1) <= (categoryStops at: catIndex) \r\t\tand: [element >= (elementArray at: elemIndex)]] whileTrue.\r\r\t\"elemIndex is now the index for inserting the element. Do the insertion before it.\"\r\telementArray _ elementArray copyReplaceFrom: elemIndex to: elemIndex-1\r\t\t\t\t\t\twith: (Array with: element).\r\r\t\"add one to stops for this and later categories\"\r\tcatIndex to: categoryArray size do: \r\t\t[:i | categoryStops at: i put: (categoryStops at: i) + 1].\r\r\t(self listAtCategoryNamed: Default) size = 0 ifTrue: [self removeCategory: Default]! !\r\r!Categorizer methodsFor: 'accessing' stamp: 'NS 4/5/2004 17:44'!\rclassifyAll: aCollection under: heading\r\r\taCollection do:\r\t\t[:element | self classify: element under: heading]! !\r\r!Categorizer methodsFor: 'accessing' stamp: 'NS 4/7/2004 10:20'!\relementCategoryDict\r\t| dict firstIndex lastIndex |\r\telementArray isNil ifTrue: [^ nil].\r\tdict _ Dictionary new: elementArray size.\r\t1to: categoryStops size do: [:cat |\r\t\tfirstIndex _ self firstIndexOfCategoryNumber: cat.\r\t\tlastIndex _ self lastIndexOfCategoryNumber: cat.\r\t\tfirstIndex to: lastIndex do: [:el |\r\t\t\tdict at: (elementArray at: el) put: (categoryArray at: cat)].\r\t].\r\t^ dict.! !\r\r!Categorizer methodsFor: 'accessing' stamp: 'NS 4/5/2004 17:44'!\rlistAtCategoryNamed: categoryName\r\t\"Answer the array of elements associated with the name, categoryName.\"\r\r\t| i |\r\ti _ categoryArray indexOf: categoryName ifAbsent: [^Array new].\r\t^self listAtCategoryNumber: i! !\r\r!Categorizer methodsFor: 'accessing' stamp: 'NS 4/6/2004 13:51'!\rlistAtCategoryNumber: anInteger \r\t\"Answer the array of elements stored at the position indexed by anInteger.  Answer nil if anInteger is larger than the number of categories.\"\r\r\t| firstIndex lastIndex |\r\t(anInteger < 1 or: [anInteger > categoryStops size])\r\t\tifTrue: [^ nil].\r\tfirstIndex _ self firstIndexOfCategoryNumber: anInteger.\r\tlastIndex _  self lastIndexOfCategoryNumber: anInteger.\r\t^elementArray copyFrom: firstIndex to: lastIndex! !\r\r!Categorizer methodsFor: 'accessing' stamp: 'NS 4/5/2004 17:44'!\rnumberOfCategoryOfElement: element \r\t\"Answer the index of the category with which the argument, element, is \r\tassociated.\"\r\r\t| categoryIndex elementIndex |\r\tcategoryIndex _ 1.\r\telementIndex _ 0.\r\t[(elementIndex _ elementIndex + 1) <= elementArray size]\r\t\twhileTrue: \r\t\t\t[\"point to correct category\"\r\t\t\t[elementIndex > (categoryStops at: categoryIndex)]\r\t\t\t\twhileTrue: [categoryIndex _ categoryIndex + 1].\r\t\t\t\"see if this is element\"\r\t\t\telement = (elementArray at: elementIndex) ifTrue: [^categoryIndex]].\r\t^0! !\r\r!Categorizer methodsFor: 'accessing' stamp: 'NS 4/5/2004 17:44'!\rremoveCategory: cat \r\t\"Remove the category named, cat. Create an error notificiation if the \r\tcategory has any elements in it.\"\r\r\t| index lastStop |\r\tindex _ categoryArray indexOf: cat ifAbsent: [^self].\r\tlastStop _ \r\t\tindex = 1\r\t\t\tifTrue: [0]\r\t\t\tifFalse: [categoryStops at: index - 1].\r\t(categoryStops at: index) - lastStop > 0 \r\t\tifTrue: [^self error: 'cannot remove non-empty category'].\r\tcategoryArray _ categoryArray copyReplaceFrom: index to: index with: Array new.\r\tcategoryStops _ categoryStops copyReplaceFrom: index to: index with: Array new.\r\tcategoryArray size = 0\r\t\tifTrue:\r\t\t\t[categoryArray _ Array with: Default.\r\t\t\tcategoryStops _ Array with: 0]\r! !\r\r!Categorizer methodsFor: 'accessing' stamp: 'NS 4/5/2004 17:44'!\rremoveElement: element \r\t\"Remove the selector, element, from all categories.\"\r\t| categoryIndex elementIndex nextStop newElements |\r\tcategoryIndex _ 1.\r\telementIndex _ 0.\r\tnextStop _ 0.\r\t\"nextStop keeps track of the stops in the new element array\"\r\tnewElements _ WriteStream on: (Array new: elementArray size).\r\t[(elementIndex _ elementIndex + 1) <= elementArray size]\r\t\twhileTrue: \r\t\t\t[[elementIndex > (categoryStops at: categoryIndex)]\r\t\t\t\twhileTrue: \r\t\t\t\t\t[categoryStops at: categoryIndex put: nextStop.\r\t\t\t\t\tcategoryIndex _ categoryIndex + 1].\r\t\t\t(elementArray at: elementIndex) = element\r\t\t\t\tifFalse: \r\t\t\t\t\t[nextStop _ nextStop + 1.\r\t\t\t\t\tnewElements nextPut: (elementArray at: elementIndex)]].\r\t[categoryIndex <= categoryStops size]\r\t\twhileTrue: \r\t\t\t[categoryStops at: categoryIndex put: nextStop.\r\t\t\tcategoryIndex _ categoryIndex + 1].\r\telementArray _ newElements contents! !\r\r!Categorizer methodsFor: 'accessing' stamp: 'NS 4/5/2004 17:44'!\rremoveEmptyCategories\r\t\"Remove empty categories.\"\r\r\t| categoryIndex currentStop keptCategories keptStops |\r\tkeptCategories _ WriteStream on: (Array new: 16).\r\tkeptStops _ WriteStream on: (Array new: 16).\r\tcurrentStop _ categoryIndex _ 0.\r\t[(categoryIndex _ categoryIndex + 1) <= categoryArray size]\r\t\twhileTrue: \r\t\t\t[(categoryStops at: categoryIndex) > currentStop\r\t\t\t\tifTrue: \r\t\t\t\t\t[keptCategories nextPut: (categoryArray at: categoryIndex).\r\t\t\t\t\tkeptStops nextPut: (currentStop _ categoryStops at: categoryIndex)]].\r\tcategoryArray _ keptCategories contents.\r\tcategoryStops _ keptStops contents.\r\tcategoryArray size = 0\r\t\tifTrue:\r\t\t\t[categoryArray _ Array with: Default.\r\t\t\tcategoryStops _ Array with: 0]\r\r\t\"ClassOrganizer allInstancesDo: [:co | co removeEmptyCategories].\"! !\r\r!Categorizer methodsFor: 'accessing' stamp: 'NS 4/5/2004 17:44'!\rrenameCategory: oldCatString toBe: newCatString\r\t\"Rename a category. No action if new name already exists, or if old name does not exist.\"\r\t| index oldCategory newCategory |\r\toldCategory _ oldCatString asSymbol.\r\tnewCategory _ newCatString asSymbol.\r\t(categoryArray indexOf: newCategory) > 0\r\t\tifTrue: [^ self].\t\"new name exists, so no action\"\r\t(index _ categoryArray indexOf: oldCategory) = 0\r\t\tifTrue: [^ self].\t\"old name not found, so no action\"\r\tcategoryArray _ categoryArray copy.  \"need to change identity so smart list update will notice the change\"\r\tcategoryArray at: index put: newCategory! !\r\r!Categorizer methodsFor: 'accessing' stamp: 'NS 4/5/2004 17:44'!\rsortCategories\r\t| privateCategories publicCategories newCategories |\r\r\tprivateCategories _ self categories select:\r\t\t[:one | (one findString: 'private' startingAt: 1 caseSensitive: false) = 1].\r\tpublicCategories _ self categories copyWithoutAll: privateCategories.\r\tnewCategories _ publicCategories asSortedCollection asOrderedCollection\r\t\taddAll: privateCategories asSortedCollection;\r\t\tasArray.\r\tself categories: newCategories! !\r\r\r!Categorizer methodsFor: 'printing' stamp: 'NS 4/5/2004 17:44'!\rprintOn: aStream \r\t\"Refer to the comment in Object|printOn:.\"\r\r\t| elementIndex |\r\telementIndex _ 1.\r\t1 to: categoryArray size do: \r\t\t[:i | \r\t\taStream nextPut: $(.\r\t\t(categoryArray at: i) asString printOn: aStream.\r\t\t[elementIndex <= (categoryStops at: i)]\r\t\t\twhileTrue: \r\t\t\t\t[aStream space; nextPutAll: (elementArray at: elementIndex).\r\t\t\t\telementIndex _ elementIndex + 1].\r\t\taStream nextPut: $); cr]! !\r\r!Categorizer methodsFor: 'printing' stamp: 'NS 4/5/2004 17:44'!\rprintOnStream: aStream \r\t\"Refer to the comment in Object|printOn:.\"\r\r\t| elementIndex  |\r\telementIndex _ 1.\r\t1 to: categoryArray size do: \r\t\t[:i | \r\t\taStream print: '(';\r\t\twrite:(categoryArray at:i).\t\t\" is the asString redundant? \"\r\r\t\t[elementIndex <= (categoryStops at: i)]\r\t\t\twhileTrue: \r\t\t\t\t[aStream print:' '; write:(elementArray at: elementIndex).\r\t\t\t\telementIndex _ elementIndex + 1].\r\t\taStream print:')'.\r\t\taStream cr]! !\r\r\r!Categorizer methodsFor: 'fileIn/Out' stamp: 'NS 4/5/2004 17:44'!\rscanFrom: aStream\r\t\"Reads in the organization from the next chunk on aStream.\r\tCategories or elements not found in the definition are not affected.\r\tNew elements are ignored.\"\r\r\tself changeFromString: aStream nextChunk.\r\taStream skipStyleChunk.! !\r\r\r!Categorizer methodsFor: 'private' stamp: 'NS 4/5/2004 17:44'!\relementArray\r\r\t^ elementArray! !\r\r!Categorizer methodsFor: 'private' stamp: 'NS 4/6/2004 13:51'!\rfirstIndexOfCategoryNumber: anInteger\r\tanInteger < 1 ifTrue: [^ nil].\r\t^ (anInteger > 1\r\t\t\tifTrue: [(categoryStops at: anInteger - 1) + 1]\r\t\t\tifFalse: [1]).! !\r\r!Categorizer methodsFor: 'private' stamp: 'NS 4/6/2004 13:52'!\rlastIndexOfCategoryNumber: anInteger\r\tanInteger > categoryStops size ifTrue: [^ nil].\r\t^ categoryStops at: anInteger! !\r\r!Categorizer methodsFor: 'private' stamp: 'NS 4/5/2004 17:50'!\rsetDefaultList: aSortedCollection\r\r\tcategoryArray _ Array with: Default.\r\tcategoryStops _ Array with: aSortedCollection size.\r\telementArray _ aSortedCollection asArray! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rCategorizer class\r\tinstanceVariableNames: ''!\r\r!Categorizer class methodsFor: 'class initialization' stamp: 'NS 4/5/2004 17:44'!\rallCategory\r\t\"Return a symbol that represents the virtual all methods category.\"\r\r\t^ '-- all --' asSymbol! !\r\r!Categorizer class methodsFor: 'class initialization' stamp: 'NS 4/5/2004 17:44'!\rdefault \r\t^ Default! !\r\r!Categorizer class methodsFor: 'class initialization' stamp: 'NS 4/6/2004 11:48'!\rinitialize\r\t\"\tself  initialize\t\"\r\t\r\tDefault _ 'as yet unclassified' asSymbol.\r\tNullCategory _ 'no messages' asSymbol.! !\r\r!Categorizer class methodsFor: 'class initialization' stamp: 'NS 4/5/2004 17:44'!\rnullCategory\r\t^ NullCategory! !\r\r\r!Categorizer class methodsFor: 'instance creation' stamp: 'NS 4/5/2004 17:44'!\rdefaultList: aSortedCollection \r\t\"Answer an instance of me with initial elements from the argument, \r\taSortedCollection.\"\r\r\t^self new setDefaultList: aSortedCollection! !\r\r\r!Categorizer class methodsFor: 'documentation' stamp: 'NS 4/5/2004 17:44'!\rdocumentation\r\t\"Instances consist of an Array of category names (categoryArray), each of \r\twhich refers to an Array of elements (elementArray). This association is \r\tmade through an Array of stop indices (categoryStops), each of which is \r\tthe index in elementArray of the last element (if any) of the \r\tcorresponding category. For example: categories _ Array with: 'firstCat' \r\twith: 'secondCat' with: 'thirdCat'. stops _ Array with: 1 with: 4 with: 4. \r\telements _ Array with: #a with: #b with: #c with: #d. This means that \r\tcategory firstCat has only #a, secondCat has #b, #c, and #d, and \r\tthirdCat has no elements. This means that stops at: stops size must be the \r\tsame as elements size.\" ! !\rCodeHolder subclass: #ChangeList\r\tinstanceVariableNames: 'changeList list listIndex listSelections file lostMethodPointer showsVersions'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Changes'!\r!ChangeList commentStamp: '<historical>' prior: 0!\rA ChangeList represents a list of changed methods that reside on a file in fileOut format.  The classes and methods in my list are not necessarily in this image!!  Used as the model for both Version Lists and Changed Methods (in Screen Menu, Changes...).  Note that the two kinds of window have different controller classes!!!!\r\rIt holds three lists:\r\tchangeList - a list of ChangeRecords\r\tlist - a list of one-line printable headers\r\tlistSelections - a list of Booleans (true = selected, false = not selected) multiple OK.\r\tlistIndex \rItems that are removed (removeDoits, remove an item) are removed from all three lists.\rMost recently clicked item is the one showing in the bottom pane.!\r\r\r!ChangeList methodsFor: 'initialization-release'!\raddItem: item text: text\r\t| cr |\r\tcr _ Character cr.\r\tchangeList addLast: item.\r\tlist addLast: (text collect: [:x | x = cr ifTrue: [$/] ifFalse: [x]])! !\r\r!ChangeList methodsFor: 'initialization-release' stamp: 'sw 1/7/2000 12:42'!\rchangeListButtonSpecs\r\r\t^#(\r\t\t('select all' \t\t\tselectAll\t\t\t\t'select all entries')\r\t\t('deselect all'\t\tdeselectAll\t\t\t'deselect all entries')\r\t\t('select conflicts'\tselectAllConflicts\t'select all methods that occur in any change set')\r\t\t('file in selections' \tfileInSelections\t\t'file in all selected entries')\r\t\t)! !\r\r!ChangeList methodsFor: 'initialization-release' stamp: 'sw 9/5/2001 13:53'!\rinitialize\r\t\"Initialize a blank ChangeList.  Set the contentsSymbol to reflect whether diffs will initally be shown or not\"\r\r\tcontentsSymbol _ Preferences diffsInChangeList\r\t\tifTrue:\r\t\t\t[self defaultDiffsSymbol]\r\t\tifFalse:\r\t\t\t[#source].\r\tchangeList _ OrderedCollection new.\r\tlist _ OrderedCollection new.\r\tlistIndex _ 0.\r\tsuper initialize! !\r\r!ChangeList methodsFor: 'initialization-release' stamp: 'sbw 12/30/1999 11:02'!\roptionalButtonHeight\r\r\t^ 15! !\r\r!ChangeList methodsFor: 'initialization-release' stamp: 'sw 11/13/2001 08:50'!\roptionalButtonsView\r\t\"Answer the a View containing the optional buttons\"\r\r\t| view bHeight vWidth first offset previousView bWidth button |\r\tvWidth _ 200.\r\tbHeight _ self optionalButtonHeight.\r\tpreviousView _ nil.\r\toffset _ 0.\r\tfirst _ true.\r\r\tview _ View new\r\t\tmodel: self;\r\t\twindow: (0 @ 0 extent: vWidth @ bHeight).\r\r\tself changeListButtonSpecs do: [:triplet |\r\t\tbutton _ PluggableButtonView\r\t\t\ton: self\r\t\t\tgetState: nil\r\t\t\taction: triplet second.\r\t\tbutton label: triplet first asParagraph.\r\t\tbWidth _ button label boundingBox width // 2.\r\t\tbutton\r\t\t\twindow: (offset@0 extent: bWidth@bHeight);\r\t\t\tborderWidthLeft: 0 right: 1 top: 0 bottom: 0.\r\t\toffset _ offset + bWidth.\r\t\tfirst\r\t\t\tifTrue:\r\t\t\t\t[view addSubView: button.\r\t\t\t\tfirst _ false.]\r\t\t\tifFalse:\r\t\t\t\t[view addSubView: button toRightOf: previousView].\r\t\tpreviousView _ button].\r\r\tbutton _ PluggableButtonView\r\t\ton: self\r\t\tgetState: #showingAnyKindOfDiffs\r\t\taction: #toggleDiffing.\r\tbutton\r\t\tlabel: 'diffs' asParagraph;\r\t\twindow: (offset@0 extent: (vWidth - offset)@bHeight).\r\tview addSubView: button toRightOf: previousView.\r\r\t^ view! !\r\r!ChangeList methodsFor: 'initialization-release' stamp: 'sw 8/15/2002 22:34'!\rwantsPrettyDiffOption\r\t\"Answer whether pretty-diffs are meaningful for this tool\"\r\r\t^ true! !\r\r\r!ChangeList methodsFor: 'scanning' stamp: 'sw 1/15/98 21:56'!\rscanCategory  \r\t\"Scan anything that involves more than one chunk; method name is historical only\"\r\r\t| itemPosition item tokens stamp isComment anIndex |\r\titemPosition _ file position.\r\titem _ file nextChunk.\r\r\tisComment _ (item includesSubString: 'commentStamp:').\r\t(isComment or: [item includesSubString: 'methodsFor:']) ifFalse:\r\t\t[\"Maybe a preamble, but not one we recognize; bail out with the preamble trick\"\r\t\t^ self addItem: (ChangeRecord new file: file position: itemPosition type: #preamble)\r\t\t\t\t text: ('preamble: ' , item contractTo: 50)].\r\r\ttokens _ Scanner new scanTokens: item.\r\ttokens size >= 3 ifTrue:\r\t\t[stamp _ ''.\r\t\tanIndex _ tokens indexOf: #stamp: ifAbsent: [nil].\r\t\tanIndex ifNotNil: [stamp _ tokens at: (anIndex + 1)].\r\r\t\ttokens second == #methodsFor:\r\t\t\tifTrue: [^ self scanCategory: tokens third class: tokens first\r\t\t\t\t\t\t\tmeta: false stamp: stamp].\r\t\ttokens third == #methodsFor:\r\t\t\tifTrue: [^ self scanCategory: tokens fourth class: tokens first\r\t\t\t\t\t\t\tmeta: true stamp: stamp]].\r\r\t\ttokens second == #commentStamp:\r\t\t\tifTrue:\r\t\t\t\t[stamp _ tokens third.\r\t\t\t\tself addItem:\r\t\t\t\t\t\t(ChangeRecord new file: file position: file position type: #classComment\r\t\t\t\t\t\t\t\t\t\tclass: tokens first category: nil meta: false stamp: stamp)\r\t\t\t\t\t\ttext: 'class comment for ' , tokens first, \r\t\t\t\t\t\t\t  (stamp isEmpty ifTrue: [''] ifFalse: ['; ' , stamp]).\r\t\t\t\tfile nextChunk.\r\t\t\t\t^ file skipStyleChunk]! !\r\r!ChangeList methodsFor: 'scanning' stamp: 'di 1/13/98 16:56'!\rscanCategory: category class: class meta: meta stamp: stamp\r\t| itemPosition method |\r\t[itemPosition _ file position.\r\tmethod _ file nextChunk.\r\tfile skipStyleChunk.\r\tmethod size > 0]\t\t\t\t\t\t\"done when double terminators\"\r\t\twhileTrue:\r\t\t[self addItem: (ChangeRecord new file: file position: itemPosition type: #method\r\t\t\t\t\t\t\tclass: class category: category meta: meta stamp: stamp)\r\t\t\ttext: 'method: ' , class , (meta ifTrue: [' class '] ifFalse: [' '])\r\t\t\t\t, (Parser new parseSelector: method)\r\t\t\t\t, (stamp isEmpty ifTrue: [''] ifFalse: ['; ' , stamp])]! !\r\r!ChangeList methodsFor: 'scanning' stamp: 'sw 10/19/1999 15:13'!\rscanFile: aFile from: startPosition to: stopPosition\r\t| itemPosition item prevChar |\r\tfile _ aFile.\r\tchangeList _ OrderedCollection new.\r\tlist _ OrderedCollection new.\r\tlistIndex _ 0.\r\tfile position: startPosition.\r'Scanning ', aFile localName, '...'\r\tdisplayProgressAt: Sensor cursorPoint\r\tfrom: startPosition to: stopPosition\r\tduring: [:bar |\r\t[file position < stopPosition]\r\t\twhileTrue:\r\t\t[bar value: file position.\r\t\t[file atEnd not and: [file peek isSeparator]]\r\t\t\t\twhileTrue: [prevChar _ file next].\r\t\t(file peekFor: $!!)\r\t\tifTrue:\r\t\t\t[(prevChar = Character cr or: [prevChar = Character lf])\r\t\t\t\tifTrue: [self scanCategory]]\r\t\tifFalse:\r\t\t\t[itemPosition _ file position.\r\t\t\titem _ file nextChunk.\r\t\t\tfile skipStyleChunk.\r\t\t\titem size > 0 ifTrue:\r\t\t\t\t[self addItem: (ChangeRecord new file: file position: itemPosition type: #doIt)\r\t\t\t\t\ttext: 'do it: ' , (item contractTo: 50)]]]].\r\tlistSelections _ Array new: list size withAll: false! !\r\r\r!ChangeList methodsFor: 'menu actions' stamp: 'jm 5/3/1998 19:15'!\racceptFrom: aView\r\r\taView controller text = aView controller initialText ifFalse: [\r\t\taView flash.\r\t\t^ self inform: 'You can only accept this version as-is.\rIf you want to edit, copy the text to a browser'].\r\t(aView setText: aView controller text from: self) ifTrue:\r\t\t[aView ifNotNil: [aView controller accept]].\t\"initialText\"\r! !\r\r!ChangeList methodsFor: 'menu actions' stamp: 'nk 1/7/2004 11:08'!\rbrowseAllVersionsOfSelections\r\t\"Opens a Versions browser on all the currently selected methods, showing each alongside all of their historical versions.\"\r\t|  oldSelection aList |\r\toldSelection _ self listIndex.\r\taList _ OrderedCollection new.\r\tCursor read showWhile: [\r\t\t1 to: changeList size do: [:i |\r\t\t\t(listSelections at: i) ifTrue: [\r\t\t\t\tlistIndex _ i.\r\t\t\t\tself browseVersions.\r\t\t\t\taList add: i.\r\t\t\t\t]]].\r\tlistIndex _ oldSelection.\r\r\taList size == 0 ifTrue: [^ self inform: 'no selected methods have in-memory counterparts'].\r! !\r\r!ChangeList methodsFor: 'menu actions' stamp: 'RAA 5/28/2001 11:37'!\rbrowseCurrentVersionsOfSelections\r\t\"Opens a message-list browser on the current in-memory versions of all methods that are currently seleted\"\r\t|  aClass aChange aList |\r\r\taList _ OrderedCollection new.\r\tCursor read showWhile: [\r\t\t1 to: changeList size do: [:i |\r\t\t\t(listSelections at: i) ifTrue: [\r\t\t\t\taChange _ changeList at: i.\r\t\t\t\t(aChange type = #method\r\t\t\t\t\tand: [(aClass _ aChange methodClass) notNil\r\t\t\t\t\tand: [aClass includesSelector: aChange methodSelector]])\r\t\t\t\t\t\tifTrue: [\r\t\t\t\t\t\t\taList add: (\r\t\t\t\t\t\t\t\tMethodReference new\r\t\t\t\t\t\t\t\t\tsetStandardClass: aClass  \r\t\t\t\t\t\t\t\t\tmethodSymbol: aChange methodSelector\r\t\t\t\t\t\t\t)\r\t\t\t\t\t\t]]]].\r\r\taList size == 0 ifTrue: [^ self inform: 'no selected methods have in-memory counterparts'].\r\tMessageSet \r\t\topenMessageList: aList \r\t\tname: 'Current versions of selected methods in ', file localName! !\r\r!ChangeList methodsFor: 'menu actions' stamp: 'nk 1/7/2004 10:23'!\rbrowseVersions\r\t| change class browser |\r\tlistIndex = 0\r\t\tifTrue: [^ nil ].\r\tchange _ changeList at: listIndex.\r\t((class _ change methodClass) notNil\r\t\t\tand: [class includesSelector: change methodSelector])\r\t\tifFalse: [ ^nil ].\r\tbrowser _ super browseVersions.\r\tbrowser ifNotNil: [ browser addedChangeRecord: change ].\r\t^browser! !\r\r!ChangeList methodsFor: 'menu actions' stamp: 'sw 1/25/2001 07:22'!\rchangeListKey: aChar from: view\r\t\"Respond to a Command key in the list pane.\"\r\r\taChar == $D ifTrue: [^ self toggleDiffing].\r\taChar == $a ifTrue: [^ self selectAll].\r\r\t^ self arrowKey: aChar from: view! !\r\r!ChangeList methodsFor: 'menu actions' stamp: 'BG 10/28/2003 20:46'!\rchangeListMenu: aMenu\r\t\"Fill aMenu up so that it comprises the primary changelist-browser menu\"\r\r\taMenu addList: #(\r\r\t('fileIn selections'\t\t\t\t\t\t\tfileInSelections\t\t\t\t\t\t'import the selected items into the image')\r\t('fileOut selections...\t'\t\t\t\t\t\tfileOutSelections\t\t\t\t\t\t'create a new file containing the selected items')\r\t-\r\t('compare to current'\t\t\t\t\t\tcompareToCurrentVersion\t\t\t'open a separate window which shows the text differences between the on-file version and the in-image version.' )\r\t('toggle diffing (D)'\t\t\t\t\t\t\ttoggleDiffing\t\t\t\t\t\t'start or stop showing diffs in the code pane.')\r\t-\r\t('select conflicts with any changeset'\t\tselectAllConflicts\t\t\t\t\t'select methods in the file which also occur in any change-set in the system')\r\t('select conflicts with current changeset'\tselectConflicts\t\t\t\t\t\t'select methods in the file which also occur in the current change-set')\r\t('select conflicts with...'\t\t\t\t\t\tselectConflictsWith\t\t\t\t\t'allows you to designate a file or change-set against which to check for code conflicts.')\r\t-\r\t('select unchanged methods'\t\t\t\t\tselectUnchangedMethods\t\t\t\t'select methods in the file whose in-image versions are the same as their in-file counterparts' )\r\t('select new methods'\t\t\t\t\t\tselectNewMethods\t\t\t\t\t'select methods in the file that do not current occur in the image')\r\t('select methods for this class'\t\t\t\tselectMethodsForThisClass\t\t\t'select all methods in the file that belong to the currently-selected class')\r\r\t-\r\t('select all (a)'\t\t\t\t\t\t\t\tselectAll\t\t\t\t\t\t\t\t'select all the items in the list')\r\t('deselect all'\t\t\t\t\t\t\t\tdeselectAll\t\t\t\t\t\t\t'deselect all the items in the list')\r\t('invert selections'\t\t\t\t\t\t\tinvertSelections\t\t\t\t\t\t'select every item that is not currently selected, and deselect every item that *is* currently selected')\r\t-\r\t('browse current versions of selections'\t\tbrowseCurrentVersionsOfSelections\t'open a message-list browser showing the current (in-image) counterparts of the selected methods')\r\t('destroy current methods of selections'\t\tdestroyCurrentCodeOfSelections\t\t'remove (*destroy*) the in-image counterparts of all selected methods')\r\t-\r\t('remove doIts'\t\t\t\t\t\t\t\tremoveDoIts\t\t\t\t\t\t\t'remove all items that are doIts rather than methods')\r\t('remove older versions'\t\t\t\t\t\tremoveOlderMethodVersions\t\t\t'remove all but the most recent versions of methods in the list')\r\t('remove up-to-date versions'\t\t\t\tremoveExistingMethodVersions\t\t'remove all items whose code is the same as the counterpart in-image code')\r\t('remove selected items'\t\t\t\t\t\tremoveSelections\t\t\t\t\t'remove the selected items from the change-list')\r\t('remove unselected items'\t\t\t\t\tremoveNonSelections\t\t\t\t\t'remove all the items not currently selected from the change-list')).\r\r\t^ aMenu\r\r! !\r\r!ChangeList methodsFor: 'menu actions' stamp: 'sw 5/20/2001 21:18'!\rcompareToCurrentVersion\r\t\"If the current selection corresponds to a method in the system, then spawn a window showing the diffs as text\"\r\r\t| change class s1 s2 |\r\tlistIndex = 0\r\t\tifTrue: [^ self].\r\tchange _ changeList at: listIndex.\r\t((class _ change methodClass) notNil\r\t\t\tand: [class includesSelector: change methodSelector])\r\t\tifTrue: [s1 _ (class sourceCodeAt: change methodSelector) asString.\r\t\t\ts2 _ change string.\r\t\t\ts1 = s2\r\t\t\t\tifTrue: [^ self inform: 'Exact Match'].\r\t\t\t(StringHolder new\r\t\t\t\ttextContents: (TextDiffBuilder buildDisplayPatchFrom: s1 to: s2 inClass: class  prettyDiffs: self showingPrettyDiffs))\r\t\t\t\topenLabel: 'Comparison to Current Version']\r\t\tifFalse: [self flash]! !\r\r!ChangeList methodsFor: 'menu actions' stamp: 'sw 1/25/2001 08:38'!\rdeselectAll \r\t\"Deselect all items in the list pane, and clear the code pane\"\r\r\tlistIndex _ 0.\r\tlistSelections atAllPut: false.\r\tself changed: #allSelections.\r\tself contentsChanged! !\r\r!ChangeList methodsFor: 'menu actions' stamp: 'sw 1/25/2001 09:04'!\rdestroyCurrentCodeOfSelections\r\t\"Actually remove from the system any in-memory methods with class and selector identical to items current selected.  This may seem rather arcane but believe me it has its great uses, when trying to split out code.  To use effectively, first file out a change set that you wish to split off.  Then open a ChangeList browser on that fileout.  Now look through the methods, and select any of them which you want to remove completely from the system, then issue this command.  For those methods where you have made changes to pre-existing versions, of course, you won't want to remove them from the system, so use this mechanism with care!!\"\r\r\t|  aClass aChange aList |\r\taList _ OrderedCollection new.\r\t1 to: changeList size do:\r\t\t[:index |\r\t\t\t(listSelections at: index) ifTrue:\r\t\t\t\t[aChange _ changeList at: index.\r\t\t\t\t(aChange type = #method\r\t\t\t\t\tand: [(aClass _ aChange methodClass) notNil\r\t\t\t\t\tand: [aClass includesSelector: aChange methodSelector]])\r\t\t\t\t\t\tifTrue:\r\t\t\t\t\t\t\t[aList add: {aClass. aChange methodSelector}]]].\r\r\taList size > 0 ifTrue:\r\t\t[(self confirm: 'Warning!! This will actually remove ', aList size printString,  ' method(s) from the system!!') ifFalse: [^ self]].\r\taList do:\r\t\t[:aPair | Transcript cr; show: 'Removed: ', aPair first printString, '.', aPair second.\r\t\t\taPair first removeSelector: aPair second]! !\r\r!ChangeList methodsFor: 'menu actions' stamp: 'sw 10/11/1999 17:10'!\rfileInSelections \r\t| any |\r\tany _ false.\r\tlistSelections with: changeList do: \r\t\t[:selected :item | selected ifTrue: [any _ true. item fileIn]].\r\tany ifFalse:\r\t\t[self inform: 'nothing selected, so nothing done']! !\r\r!ChangeList methodsFor: 'menu actions' stamp: 'sma 2/5/2000 19:13'!\rfileOutSelections \r\t| f |\r\tf _ FileStream newFileNamed: (FillInTheBlank request: 'Enter file name' initialAnswer: 'Filename.st').\r\tf ifNil: [^ self].\r\tf header; timeStamp.\r\tlistSelections with: changeList do: \r\t\t[:selected :item | selected ifTrue: [item fileOutOn: f]].\r\tf close! !\r\r!ChangeList methodsFor: 'menu actions' stamp: 'sw 1/25/2001 08:35'!\rinvertSelections\r\t\"Invert the selectedness of each item in the changelist\"\r\r\tlistSelections _ listSelections collect: [ :ea | ea not].\r\tlistIndex _ 0.\r\tself changed: #allSelections.\r\tself contentsChanged! !\r\r!ChangeList methodsFor: 'menu actions' stamp: 'sw 10/11/1999 17:18'!\rperform: selector orSendTo: otherTarget\r\t\"Selector was just chosen from a menu by a user.  If I can respond, then perform it on myself.  If not, send it to otherTarget, presumably the editPane from which the menu was invoked.\" \r\r\t(#accept == selector) ifTrue:\r\t\t[otherTarget isMorph ifFalse: [^ self acceptFrom: otherTarget view]].\r\t\t\t\"weird special case just for mvc changlist\"\r\r\t^ super perform: selector orSendTo: otherTarget! !\r\r!ChangeList methodsFor: 'menu actions' stamp: 'tk 4/8/98 12:38'!\rremoveDoIts\r\t\"Remove doits from the receiver, other than initializes. 1/26/96 sw\"\r\r\t| newChangeList newList |\r\r\tnewChangeList _ OrderedCollection new.\r\tnewList _ OrderedCollection new.\r\r\tchangeList with: list do:\r\t\t[:chRec :str |\r\t\t\t(chRec type ~~ #doIt or:\r\t\t\t\t[str endsWith: 'initialize'])\r\t\t\t\t\tifTrue:\r\t\t\t\t\t\t[newChangeList add: chRec.\r\t\t\t\t\t\tnewList add: str]].\r\tnewChangeList size < changeList size\r\t\tifTrue:\r\t\t\t[changeList _ newChangeList.\r\t\t\tlist _ newList.\r\t\t\tlistIndex _ 0.\r\t\t\tlistSelections _ Array new: list size withAll: false].\r\tself changed: #list.\r\r\t! !\r\r!ChangeList methodsFor: 'menu actions' stamp: 'ar 2/24/2001 18:29'!\rremoveExistingMethodVersions\r\t\"Remove all up to date version of entries from the receiver\"\r\t| newChangeList newList str keep cls sel |\r\tnewChangeList _ OrderedCollection new.\r\tnewList _ OrderedCollection new.\r\r\tchangeList with: list do:[:chRec :strNstamp | \r\t\t\tkeep _ true.\r\t\t\t(cls _ chRec methodClass) ifNotNil:[\r\t\t\t\tstr _ chRec string.\r\t\t\t\tsel _ cls parserClass new parseSelector: str.\r\t\t\t\tkeep _ (cls sourceCodeAt: sel ifAbsent:['']) asString ~= str.\r\t\t\t].\r\t\t\tkeep ifTrue:[\r\t\t\t\t\tnewChangeList add: chRec.\r\t\t\t\t\tnewList add: strNstamp]].\r\tnewChangeList size < changeList size\r\t\tifTrue:\r\t\t\t[changeList _ newChangeList.\r\t\t\tlist _ newList.\r\t\t\tlistIndex _ 0.\r\t\t\tlistSelections _ Array new: list size withAll: false].\r\tself changed: #list! !\r\r!ChangeList methodsFor: 'menu actions' stamp: 'sw 9/18/2000 12:21'!\rremoveNonSelections\r\t\"Remove the unselected items from the receiver.\"\r\r\t| newChangeList newList |\r\r\tnewChangeList _ OrderedCollection new.\r\tnewList _ OrderedCollection new.\r\r\t1 to: changeList size do:\r\t\t[:i | (listSelections at: i) ifTrue:\r\t\t\t[newChangeList add: (changeList at: i).\r\t\t\tnewList add: (list at: i)]].\r\tnewChangeList size == 0 ifTrue:\r\t\t[^ self inform: 'That would remove everything.\rWhy would you want to do that?'].\r\r\tnewChangeList size < changeList size\r\t\tifTrue:\r\t\t\t[changeList _ newChangeList.\r\t\t\tlist _ newList.\r\t\t\tlistIndex _ 0.\r\t\t\tlistSelections _ Array new: list size withAll: false].\r\tself changed: #list\r\r\t! !\r\r!ChangeList methodsFor: 'menu actions' stamp: 'di 6/13/97 23:10'!\rremoveOlderMethodVersions\r\t\"Remove older versions of entries from the receiver.\"\r\t| newChangeList newList found str |\r\tnewChangeList _ OrderedCollection new.\r\tnewList _ OrderedCollection new.\r\tfound _ OrderedCollection new.\r\r\tchangeList reverseWith: list do:\r\t\t[:chRec :strNstamp | str _ strNstamp copyUpTo: $;.\r\t\t\t(found includes: str)\r\t\t\t\tifFalse:\r\t\t\t\t\t[found add: str.\r\t\t\t\t\tnewChangeList add: chRec.\r\t\t\t\t\tnewList add: strNstamp]].\r\tnewChangeList size < changeList size\r\t\tifTrue:\r\t\t\t[changeList _ newChangeList reversed.\r\t\t\tlist _ newList reversed.\r\t\t\tlistIndex _ 0.\r\t\t\tlistSelections _ Array new: list size withAll: false].\r\tself changed: #list! !\r\r!ChangeList methodsFor: 'menu actions'!\rremoveSelections\r\t\"Remove the selected items from the receiver.  9/18/96 sw\"\r\r\t| newChangeList newList |\r\r\tnewChangeList _ OrderedCollection new.\r\tnewList _ OrderedCollection new.\r\r\t1 to: changeList size do:\r\t\t[:i | (listSelections at: i) ifFalse:\r\t\t\t[newChangeList add: (changeList at: i).\r\t\t\tnewList add: (list at: i)]].\r\tnewChangeList size < changeList size\r\t\tifTrue:\r\t\t\t[changeList _ newChangeList.\r\t\t\tlist _ newList.\r\t\t\tlistIndex _ 0.\r\t\t\tlistSelections _ Array new: list size withAll: false].\r\tself changed: #list\r\r\t! !\r\r!ChangeList methodsFor: 'menu actions'!\rselectAll\r\tlistIndex _ 0.\r\tlistSelections atAllPut: true.\r\tself changed: #allSelections! !\r\r!ChangeList methodsFor: 'menu actions' stamp: 'sw 6/6/2001 12:54'!\rselectAllConflicts\r\t\"Selects all method definitions in the receiver which are also in any existing change set in the system.  This makes no statement about whether the content of the methods differ, only whether there is a change represented.\"\r\r\t|  aClass aChange |\r\tCursor read showWhile: \r\t\t[1 to: changeList size do:\r\t\t\t[:i | aChange _ changeList at: i.\r\t\t\tlistSelections at: i put:\r\t\t\t\t(aChange type = #method\r\t\t\t\tand: [(aClass _ aChange methodClass) notNil\r\t\t\t\tand: [ChangeSorter doesAnyChangeSetHaveClass: aClass andSelector:  aChange methodSelector]])]].\r\tself changed: #allSelections! !\r\r!ChangeList methodsFor: 'menu actions' stamp: 'sd 5/23/2003 14:24'!\rselectConflicts\r\t\"Selects all method definitions for which there is ALSO an entry in changes\"\r\t| change class  |\r\tCursor read showWhile: \r\t[1 to: changeList size do:\r\t\t[:i | change _ changeList at: i.\r\t\tlistSelections at: i put:\r\t\t\t(change type = #method\r\t\t\tand: [(class _ change methodClass) notNil\r\t\t\tand: [(ChangeSet current atSelector: change methodSelector\r\t\t\t\t\t\tclass: class) ~~ #none]])]].\r\tself changed: #allSelections! !\r\r!ChangeList methodsFor: 'menu actions'!\rselectConflicts: changeSetOrList\r\t\"Selects all method definitions for which there is ALSO an entry in the specified changeSet or changList\"\r\t| change class systemChanges |\r\tCursor read showWhile: \r\t[(changeSetOrList isKindOf: ChangeSet) ifTrue: [\r\t1 to: changeList size do:\r\t\t[:i | change _ changeList at: i.\r\t\tlistSelections at: i put:\r\t\t\t(change type = #method\r\t\t\tand: [(class _ change methodClass) notNil\r\t\t\tand: [(changeSetOrList atSelector: change methodSelector\r\t\t\t\t\t\tclass: class) ~~ #none]])]]\r\tifFalse: [\"a ChangeList\"\r\t1 to: changeList size do:\r\t\t[:i | change _ changeList at: i.\r\t\tlistSelections at: i put:\r\t\t\t(change type = #method\r\t\t\tand: [(class _ change methodClass) notNil\r\t\t\tand: [changeSetOrList list includes: (list at: i)]])]]\r\t].\r\tself changed: #allSelections! !\r\r!ChangeList methodsFor: 'menu actions' stamp: 'di 4/6/2001 09:03'!\rselectConflictsWith\r\t\"Selects all method definitions for which there is ALSO an entry in the specified changeSet or changList chosen by the user. 4/11/96 tk\"\r\t| aStream all index |\r\taStream _ WriteStream on: (String new: 200).\r\t(all _ ChangeSorter allChangeSets copy) do:\r\t\t[:sel | aStream nextPutAll: (sel name contractTo: 40); cr].\r\tChangeList allSubInstancesDo:\r\t\t[:sel | aStream nextPutAll: (sel file name); cr.\r\t\t\tall addLast: sel].\r\taStream skip: -1.\r\tindex _ (PopUpMenu labels: aStream contents) startUp.\r\tindex > 0 ifTrue: [\r\t\tself selectConflicts: (all at: index)].\r! !\r\r!ChangeList methodsFor: 'menu actions' stamp: 'ls 11/14/1998 14:30'!\rselectMethodsForThisClass\r\t| name |\r\tself currentChange ifNil: [ ^self ].\r\tname _ self currentChange methodClassName.\r\tname ifNil: [ ^self ].\r\t^self selectSuchThat: [ :change |\r\t\tchange methodClassName = name ].! !\r\r!ChangeList methodsFor: 'menu actions' stamp: 'sw 12/3/2002 22:27'!\rselectNewMethods\r\t\"Selects all method definitions for which there is no counterpart method in the current image\"\r\r\t| change class |\r\tCursor read showWhile: \r\t\t[1 to: changeList size do:\r\t\t\t[:i | change _ changeList at: i.\r\t\t\tlistSelections at: i put:\r\t\t\t\t((change type = #method and:\r\t\t\t\t\t[((class _ change methodClass) isNil) or:\r\t\t\t\t\t\t[(class includesSelector: change methodSelector) not]]))]].\r\tself changed: #allSelections! !\r\r!ChangeList methodsFor: 'menu actions' stamp: 'sw 1/7/2000 15:04'!\rselectSuchThat\r\t\"query the user for a selection criterio.  By Lex Spoon.  NB: the UI for invoking this from a changelist browser is currently commented out; to reenfranchise it, you'll need to mild editing to ChangeList method #changeListMenu:\"\r\t| code block |\r\tcode _ FillInTheBlank request: 'selection criteria for a change named aChangeRecord?\\For instance, ''aChangeRecord category = ''System-Network''''' withCRs.\r\r\tcode isEmpty ifTrue: [^ self ].\r\r\tblock _ Compiler evaluate: '[:aChangeRecord | ', code, ']'.\r\r\tself selectSuchThat: block! !\r\r!ChangeList methodsFor: 'menu actions' stamp: 'ls 5/12/1999 07:56'!\rselectSuchThat: aBlock\r\t\"select all changes for which block returns true\"\r\tlistSelections _ changeList collect: [ :change | aBlock value: change ].\r\tself changed: #allSelections! !\r\r!ChangeList methodsFor: 'menu actions' stamp: 'nk 1/7/2004 09:16'!\rselectUnchangedMethods\r\t\"Selects all method definitions for which there is already a method in the current image, whose source is exactly the same.  9/18/96 sw\"\r\t| change class |\r\tCursor read showWhile: \r\t[1 to: changeList size do:\r\t\t[:i | change _ changeList at: i.\r\t\tlistSelections at: i put:\r\t\t\t((change type = #method and:\r\t\t\t\t[(class _ change methodClass) notNil]) and:\r\t\t\t\t\t[(class includesSelector: change methodSelector) and:\r\t\t\t\t\t\t[change string withBlanksCondensed = (class sourceCodeAt: change methodSelector) asString withBlanksCondensed ]])]].\r\tself changed: #allSelections! !\r\r\r!ChangeList methodsFor: 'viewing access' stamp: 'sw 6/18/2001 10:44'!\rannotation\r\t\"Answer the string to be shown in an annotation pane.  Make plain that the annotation is associated with the current in-image version of the code, not of the selected disk-based version, and if the corresponding method is missing from the in-image version, mention that fact.\"\r\r\t| annot aChange aClass |\r\r\tannot _ super annotation.\r\tannot asString = '------' ifTrue: [^ annot].\r\r\t^ ((aChange _ self currentChange) notNil and: [aChange methodSelector notNil])\r\t\tifFalse:\r\t\t\t[annot]\r\t\tifTrue:\r\t\t\t[((aClass _ aChange methodClass) isNil or: [(aClass includesSelector: aChange methodSelector) not])\r\t\t\t\tifTrue:\r\t\t\t\t\t[aChange methodClassName, ' >> ', aChange methodSelector, ' is not present in the current image.']\r\t\t\t\tifFalse:\r\t\t\t\t\t['current version: ', annot]]! !\r\r!ChangeList methodsFor: 'viewing access' stamp: 'sw 9/5/2001 13:52'!\rcontents\r\t\"Answer the contents string, obeying diffing directives if needed\"\r\r\t^ self showingAnyKindOfDiffs\r\t\tifFalse:\r\t\t\t[self undiffedContents]\r\t\tifTrue:\r\t\t\t[self showsVersions\r\t\t\t\tifTrue:\r\t\t\t\t\t[self diffedVersionContents]\r\t\t\t\tifFalse:\r\t\t\t\t\t[self contentsDiffedFromCurrent]]! !\r\r!ChangeList methodsFor: 'viewing access' stamp: 'tk 4/10/1998 09:25'!\rcontents: aString\r\tlistIndex = 0 ifTrue: [self changed: #flash. ^ false].\r\tlostMethodPointer ifNotNil: [^ self restoreDeletedMethod].\r\tself okToChange \"means not dirty\" ifFalse: [\"is dirty\"\r\t\tself inform: 'This is a view of a method on a file.\\Please cancel your changes.  You may\\accept, but only when the method is untouched.' withCRs.  ^ false].\r\t\t\"Can't accept changes here.  Method text must be unchanged!!\"\r\t(changeList at: listIndex) fileIn.\r\t^ true! !\r\r!ChangeList methodsFor: 'viewing access' stamp: 'sw 5/19/2001 10:59'!\rcontentsDiffedFromCurrent\r\t\"Answer the contents diffed forward from current (in-memory) method version\"\r\r\t| aChange aClass |\r\tlistIndex = 0\r\t\tifTrue: [^ ''].\r\taChange _ changeList at: listIndex.\r\t^ ((aChange type == #method and: [(aClass _ aChange methodClass) notNil]) and: [aClass includesSelector: aChange methodSelector])\r\t\tifTrue:\r\t\t\t [Utilities methodDiffFor: aChange text class: aClass selector: aChange methodSelector prettyDiffs: self showingPrettyDiffs]\r\t\tifFalse:\r\t\t\t[(changeList at: listIndex) text]! !\r\r!ChangeList methodsFor: 'viewing access' stamp: 'sw 11/13/2001 09:12'!\rcontentsSymbolQuints\r\t\"Answer a list of quintuplets representing information on the alternative views available in the code pane\"\r\r\t^ self sourceAndDiffsQuintsOnly! !\r\r!ChangeList methodsFor: 'viewing access' stamp: 'sw 6/7/2001 23:54'!\rdiffedVersionContents\r\t\"Answer diffed version contents, maybe pretty maybe not\"\r\r\t| change class earlier later |\r\t(listIndex = 0\r\t\t\tor: [changeList size < listIndex])\r\t\tifTrue: [^ ''].\r\tchange _ changeList at: listIndex.\r\tlater _ change text.\r\tclass _ change methodClass.\r\t(listIndex == changeList size or: [class == nil])\r\t\tifTrue: [^ later].\r\r\tearlier _ (changeList at: listIndex + 1) text.\r\r\t^ TextDiffBuilder buildDisplayPatchFrom: earlier to: later inClass: class prettyDiffs: self showingPrettyDiffs! !\r\r!ChangeList methodsFor: 'viewing access'!\rlist\r\t^ list! !\r\r!ChangeList methodsFor: 'viewing access'!\rlistIndex\r\t^ listIndex! !\r\r!ChangeList methodsFor: 'viewing access'!\rlistSelectionAt: index\r\t^ listSelections at: index! !\r\r!ChangeList methodsFor: 'viewing access' stamp: 'di 1/13/1999 14:59'!\rlistSelectionAt: index put: value\r\r\t^ listSelections at: index put: value! !\r\r!ChangeList methodsFor: 'viewing access' stamp: 'NS 1/28/2004 11:18'!\rrestoreDeletedMethod\r\t\"If lostMethodPointer is not nil, then this is a version browser for a method that has been removed.  In this case we want to establish a sourceCode link to prior versions.  We do this by installing a dummy method with the correct source code pointer prior to installing this version.\"\r\t| dummyMethod class selector |\r\tdummyMethod _ CompiledMethod toReturnSelf setSourcePointer: lostMethodPointer.\r\tclass _ (changeList at: listIndex) methodClass.\r\tselector _ (changeList at: listIndex) methodSelector.\r\tclass addSelectorSilently: selector withMethod: dummyMethod.\r\t(changeList at: listIndex) fileIn.\r\t\"IF for some reason, the dummy remains, remove it, but (N.B.!!) we might not get control back if the compile (fileIn above) fails.\"\r\t(class compiledMethodAt: selector) == dummyMethod\r\t\tifTrue: [class basicRemoveSelector: selector].\r\t^ true! !\r\r!ChangeList methodsFor: 'viewing access' stamp: 'nk 2/26/2004 13:50'!\rselectedClass\r\t^(self selectedClassOrMetaClass ifNil: [ ^nil ]) theNonMetaClass ! !\r\r!ChangeList methodsFor: 'viewing access' stamp: 'sma 2/5/2000 19:09'!\rselectedClassOrMetaClass\r\t| c |\r\t^ (c _ self currentChange) ifNotNil: [c methodClass]! !\r\r!ChangeList methodsFor: 'viewing access' stamp: 'sma 2/5/2000 19:10'!\rselectedMessageName\r\t| c |\r\t^ (c _ self currentChange) ifNotNil: [c methodSelector]! !\r\r!ChangeList methodsFor: 'viewing access' stamp: 'sw 1/28/1999 12:30'!\rtoggleListIndex: newListIndex\r\r\tlistIndex ~= 0 ifTrue: [listSelections at: listIndex put: false].\r\tnewListIndex ~= 0 ifTrue: [listSelections at: newListIndex put: true].\r\tlistIndex _ newListIndex.\r\tself changed: #listIndex.\r\tself contentsChanged! !\r\r!ChangeList methodsFor: 'viewing access' stamp: 'sw 1/25/1999 14:45'!\rundiffedContents\r\t^ listIndex = 0\r\t\tifTrue: ['']\r\t\tifFalse: [(changeList at: listIndex) text]! !\r\r\r!ChangeList methodsFor: 'accessing'!\rchangeList\r\t^ changeList! !\r\r!ChangeList methodsFor: 'accessing' stamp: 'ls 5/12/1999 07:55'!\rcurrentChange\r\t\"return the current change being viewed, or nil if none\"\r\tlistIndex = 0 ifTrue: [ ^nil ].\r\t^changeList at: listIndex! !\r\r!ChangeList methodsFor: 'accessing'!\rfile\r\t^file! !\r\r!ChangeList methodsFor: 'accessing' stamp: 'TPR 11/28/1998 17:38'!\rlistHasSingleEntry\r\t\"does the list of changes have only a single item?\"\r\t^list size = 1! !\r\r!ChangeList methodsFor: 'accessing' stamp: 'tk 6/21/1999 20:43'!\rlistSelections\r\tlistSelections ifNil: [\r\t\tlist ifNotNil: [\r\t\t\tlistSelections _ Array new: list size withAll: false]].\r\t^ listSelections! !\r\r!ChangeList methodsFor: 'accessing' stamp: 'di 6/15/97 15:13'!\rsetLostMethodPointer: sourcePointer\r\tlostMethodPointer _ sourcePointer! !\r\r!ChangeList methodsFor: 'accessing' stamp: 'sw 10/19/1999 15:11'!\rshowsVersions\r\t^ false! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rChangeList class\r\tinstanceVariableNames: ''!\r\r!ChangeList class methodsFor: 'public access' stamp: 'di 1/18/2001 15:30'!\rbrowseFile: fileName    \"ChangeList browseFile: 'AutoDeclareFix.st'\"\r\t\"Opens a changeList on the file named fileName\"\r\r\t^ self browseStream: (FileStream readOnlyFileNamed: fileName)! !\r\r!ChangeList class methodsFor: 'public access' stamp: 'HK 4/18/2002 15:02'!\rbrowseRecent: charCount \r\t\"ChangeList browseRecent: 5000\"\r\t\"Opens a changeList on the end of the changes log file\"\r\t^ self browseRecent: charCount on: (SourceFiles at: 2) ! !\r\r!ChangeList class methodsFor: 'public access' stamp: 'HK 4/18/2002 15:02'!\rbrowseRecent: charCount on: origChangesFile \r\t\"Opens a changeList on the end of the specified changes log file\"\r\t| changeList end changesFile |\r\tchangesFile _ origChangesFile readOnlyCopy.\r\tend _ changesFile size.\r\tCursor read\r\t\tshowWhile: [changeList _ self new\r\t\t\t\t\t\tscanFile: changesFile\r\t\t\t\t\t\tfrom: (0 max: end - charCount)\r\t\t\t\t\t\tto: end].\r\tchangesFile close.\r\tself\r\t\topen: changeList\r\t\tname: 'Recent changes'\r\t\tmultiSelect: true! !\r\r!ChangeList class methodsFor: 'public access' stamp: 'sd 11/16/2003 14:10'!\rbrowseRecentLog\r\t\"ChangeList browseRecentLog\"\r\t\"Prompt with a menu of how far back to go to browse the current image's changes log file\"\r\t^ self\r\t\tbrowseRecentLogOn: (SourceFiles at: 2)\r\t\tstartingFrom: SmalltalkImage current lastQuitLogPosition! !\r\r!ChangeList class methodsFor: 'public access' stamp: 'nk 7/8/2003 13:56'!\rbrowseRecentLogOn: origChangesFile \r\t\"figure out where the last snapshot or quit was, then browse the recent entries.\"\r\r\t| end done block pos chunk changesFile positions prevBlock |\r\tchangesFile _ origChangesFile readOnlyCopy.\r\tpositions _ SortedCollection new.\r\tend _ changesFile size.\r\tprevBlock _ end.\r\tblock _ end - 1024 max: 0.\r\tdone _ false.\r\t[done\r\t\tor: [positions size > 0]]\r\t\twhileFalse: [changesFile position: block.\r\t\t\t\"ignore first fragment\"\r\t\t\tchangesFile nextChunk.\r\t\t\t[changesFile position < prevBlock]\r\t\t\t\twhileTrue: [pos _ changesFile position.\r\t\t\t\t\tchunk _ changesFile nextChunk.\r\t\t\t\t\t((chunk indexOfSubCollection: '----' startingAt: 1) = 1) ifTrue: [\r\t\t\t\t\t\t({ '----QUIT'. '----SNAPSHOT' } anySatisfy: [ :str |\r\t\t\t\t\t\t\tchunk beginsWith: str ])\r\t\t\t\t\t\t\t\tifTrue: [positions add: pos]]].\r\t\t\tblock = 0\r\t\t\t\tifTrue: [done _ true]\r\t\t\t\tifFalse: [prevBlock _ block.\r\t\t\t\t\tblock _ block - 1024 max: 0]].\r\tchangesFile close.\r\tpositions isEmpty\r\t\tifTrue: [self inform: 'File ' , changesFile name , ' does not appear to be a changes file']\r\t\tifFalse: [self browseRecentLogOn: origChangesFile startingFrom: positions last]! !\r\r!ChangeList class methodsFor: 'public access' stamp: 'sw 1/2/2003 21:39'!\rbrowseRecentLogOn: origChangesFile startingFrom: initialPos \r\t\"Prompt with a menu of how far back to go when browsing a changes file.\"\r\r\t| end banners positions pos chunk i changesFile |\r\tchangesFile _ origChangesFile readOnlyCopy.\r\tbanners _ OrderedCollection new.\r\tpositions _ OrderedCollection new.\r\tend _ changesFile size.\r\tpos _ initialPos.\r\t[pos = 0\r\t\tor: [banners size > 20]]\r\t\twhileFalse: [changesFile position: pos.\r\t\t\tchunk _ changesFile nextChunk.\r\t\t\ti _ chunk indexOfSubCollection: 'priorSource: ' startingAt: 1.\r\t\t\ti > 0\r\t\t\t\tifTrue: [positions addLast: pos.\r\t\t\t\t\tbanners\r\t\t\t\t\t\taddLast: (chunk copyFrom: 5 to: i - 2).\r\t\t\t\t\tpos _ Number\r\t\t\t\t\t\t\t\treadFrom: (chunk copyFrom: i + 13 to: chunk size)]\r\t\t\t\tifFalse: [pos _ 0]].\r\tchangesFile close.\r\tbanners size == 0 ifTrue: [^ self inform: \r'this image has never been saved\rsince changes were compressed'].\r\tpos _ (SelectionMenu labelList: banners selections: positions)\r\t\t\t\tstartUpWithCaption: 'Browse as far back as...'.\r\tpos == nil\r\t\tifTrue: [^ self].\r\tself browseRecent: end - pos on: origChangesFile! !\r\r!ChangeList class methodsFor: 'public access' stamp: 'nb 6/17/2003 12:25'!\rbrowseRecentLogOnPath: fullName \r\t\"figure out where the last snapshot or quit was, then browse the recent  entries.\"\r\r\tfullName\r\t\tifNotNil:\r\t\t\t[self browseRecentLogOn: (FileStream readOnlyFileNamed: fullName)]\r\t\tifNil:\r\t\t\t[Beeper beep]\r\t! !\r\r!ChangeList class methodsFor: 'public access' stamp: 'di 1/18/2001 15:23'!\rbrowseStream: changesFile\r\t\"Opens a changeList on a fileStream\"\r\t| changeList charCount |\r\tchangesFile readOnly.\r\tcharCount _ changesFile size.\r\tcharCount > 1000000 ifTrue:\r\t\t[(self confirm: 'The file ', changesFile name , '\ris really long (' , charCount printString , ' characters).\rWould you prefer to view only the last million characters?')\r\t\t\tifTrue: [charCount _ 1000000]].\r\tCursor read showWhile:\r\t\t[changeList _ self new\r\t\t\tscanFile: changesFile from: changesFile size-charCount to: changesFile size].\r\tchangesFile close.\r\tself open: changeList name: changesFile localName , ' log' multiSelect: true! !\r\r!ChangeList class methodsFor: 'public access' stamp: 'sd 11/16/2003 14:11'!\rgetRecentLocatorWithPrompt: aPrompt\r\t\"Prompt with a menu of how far back to go.  Return nil if user backs out.  Otherwise return the number of characters back from the end of the .changes file the user wishes to include\"\r\t \"ChangeList getRecentPosition\"\r\t| end changesFile banners positions pos chunk i |\r\tchangesFile _ (SourceFiles at: 2) readOnlyCopy.\r\tbanners _ OrderedCollection new.\r\tpositions _ OrderedCollection new.\r\tend _ changesFile size.\r\tpos _ SmalltalkImage current lastQuitLogPosition.\r\t[pos = 0 or: [banners size > 20]] whileFalse:\r\t\t[changesFile position: pos.\r\t\tchunk _ changesFile nextChunk.\r\t\ti _ chunk indexOfSubCollection: 'priorSource: ' startingAt: 1.\r\t\ti > 0 ifTrue: [positions addLast: pos.\r\t\t\t\t\tbanners addLast: (chunk copyFrom: 5 to: i-2).\r\t\t\t\t\tpos _ Number readFrom: (chunk copyFrom: i+13 to: chunk size)]\r\t\t\tifFalse: [pos _ 0]].\r\tchangesFile close.\r\tpos _ (SelectionMenu labelList: banners selections: positions)\r\t\t\t\tstartUpWithCaption: aPrompt.\r\tpos == nil ifTrue: [^ nil].\r\t^ end - pos! !\r\r\r!ChangeList class methodsFor: 'instance creation' stamp: 'BG 10/28/2003 20:46'!\ropen: aChangeList name: aString multiSelect: multiSelect\r\t\"Create a standard system view for the messageSet, whose label is aString.\r\tThe listView may be either single or multiple selection type\"\r\r\t| topView listHeight annoHeight optButtonHeight codeHeight aListView underPane annotationPane buttonsView aBrowserCodeView |\r\t\r\tlistHeight _ 70.\r\tannoHeight _ 10.\r\toptButtonHeight _ aChangeList optionalButtonHeight.\r\tcodeHeight _ 110.\r\r\ttopView _ (StandardSystemView new)\r\t\tmodel: aChangeList;\r\t\tlabel: aString;\r\t\tminimumSize: 200 @ 120;\r\t\tborderWidth: 1.\r\r\taListView _ (multiSelect\r\t\t\tifTrue: [PluggableListViewOfMany\r\t\t\t\t\t\ton: aChangeList\r\t\t\t\t\t\tlist: #list\r\t\t\t\t\t\tprimarySelection: #listIndex\r\t\t\t\t\t\tchangePrimarySelection: #toggleListIndex:\r\t\t\t\t\t\tlistSelection: #listSelectionAt:\r\t\t\t\t\t\tchangeListSelection: #listSelectionAt:put:\r\t\t\t\t\t\tmenu: (aChangeList showsVersions\r\t\t\t\t\t\t\t\tifTrue: [#versionsMenu:]\r\t\t\t\t\t\t\t\tifFalse: [#changeListMenu:])]\r\t\t\tifFalse: [PluggableListView\r\t\t\t\t\t\ton: aChangeList\r\t\t\t\t\t\tlist: #list\r\t\t\t\t\t\tselected: #listIndex\r\t\t\t\t\t\tchangeSelected: #toggleListIndex:\r\t\t\t\t\t\tmenu: (aChangeList showsVersions\r\t\t\t\t\t\t\t\tifTrue: [#versionsMenu:]\r\t\t\t\t\t\t\t\tifFalse: [#changeListMenu:])]).\r\taListView window: (0 @ 0 extent: 200 @ listHeight).\r\ttopView addSubView: aListView.\r\r\tunderPane _ aListView.\r\taChangeList wantsAnnotationPane\r\t\tifTrue:\r\t\t\t[annotationPane _ PluggableTextView\r\t\t\t\ton: aChangeList\r\t\t\t\ttext: #annotation\r\t\t\t\taccept: nil\r\t\t\t\treadSelection: nil\r\t\t\t\tmenu: nil.\r\t\t\tannotationPane window: (0 @ 0 extent: 200 @ 10).\r\t\t\ttopView addSubView: annotationPane below: underPane.\r\t\t\tunderPane _ annotationPane.\r\t\t\tcodeHeight _ codeHeight - annoHeight].\r\r\taChangeList wantsOptionalButtons\r\t\tifTrue:\r\t\t\t[buttonsView _ aChangeList optionalButtonsView.\r\t\t\tbuttonsView borderWidth: 1.\r\t\t\ttopView addSubView: buttonsView below: underPane.\r\t\t\tunderPane _ buttonsView.\r\t\t\tcodeHeight _ codeHeight - optButtonHeight].\r\r\taBrowserCodeView _ PluggableTextView\r\t\t\ton: aChangeList\r\t\t\ttext: #contents\r\t\t\taccept: #contents:\r\t\t\treadSelection: #contentsSelection\r\t\t\tmenu: #codePaneMenu:shifted:.\r\taBrowserCodeView\r\t\t\tcontroller: ReadOnlyTextController new;\r\t\t\twindow: (0 @ 0 extent: 200 @ codeHeight).\r\ttopView addSubView: aBrowserCodeView below: underPane.\r\r\ttopView controller open.! !\r\r\r\r!ChangeList class methodsFor: 'initialize-release' stamp: 'hg 8/3/2000 18:14'!\rinitialize\r\r\tFileList registerFileReader: self! !\r\r\r!ChangeList class methodsFor: 'fileIn/Out' stamp: 'md 10/22/2003 16:13'!\rbrowseChangesFile: fullName\r\t\"Browse the selected file in fileIn format.\"\r\r\tfullName\r\t\tifNotNil:\r\t\t\t[ChangeList browseStream: (FileStream readOnlyFileNamed:  fullName)]\r\t\tifNil:\r\t\t\t[Beeper beep]! !\r\r!ChangeList class methodsFor: 'fileIn/Out' stamp: 'ssa 9/3/2008 10:49'!\rfileReaderServicesForFile: fullName suffix: suffix\r\t| services |\r\tservices _ OrderedCollection new.\r\t(FileStream isSourceFileSuffix: suffix) | (suffix = '*')\r\t\tifTrue: [ services add: self serviceBrowseChangeFile ].\r\t(suffix = 'changes') | (suffix = '*')\r\t\tifTrue: [ services add: self serviceBrowseDotChangesFile ].\r\t^services! !\r\r!ChangeList class methodsFor: 'fileIn/Out' stamp: 'nk 4/29/2004 10:35'!\rserviceBrowseChangeFile\r\t\"Answer a service for opening a changelist browser on a file\"\r\r\t^ (SimpleServiceEntry \r\t\tprovider: self \r\t\tlabel: 'changelist browser'\r\t\tselector: #browseStream:\r\t\tdescription: 'open a changelist tool on this file'\r\t\tbuttonLabel: 'changes')\r\t\targumentGetter: [ :fileList | fileList readOnlyStream ]! !\r\r!ChangeList class methodsFor: 'fileIn/Out' stamp: 'sw 7/4/2002 18:37'!\rserviceBrowseDotChangesFile\r\t\"Answer a service for opening a changelist browser on the tail end of a .changes file\"\r\r\t^ SimpleServiceEntry \r\t\tprovider: self \r\t\tlabel: 'recent changes in file'\r\t\tselector: #browseRecentLogOnPath:\r\t\tdescription: 'open a changelist tool on recent changes in file'\r\t\tbuttonLabel: 'recent changes'! !\r\r!ChangeList class methodsFor: 'fileIn/Out' stamp: 'ssa 9/3/2008 10:49'!\rservices\r\t\"Answer potential file services associated with this class\"\r\r\t^ { self serviceBrowseChangeFile. \r\t\tself serviceBrowseDotChangesFile.\r\t\t }! !\r\r\r!ChangeList class methodsFor: 'class initialization' stamp: 'SD 11/15/2001 22:21'!\runload\r\r\tFileList unregisterFileReader: self ! !\rObject subclass: #ChangeRecord\r\tinstanceVariableNames: 'file position type class category meta stamp'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Changes'!\r!ChangeRecord commentStamp: '<historical>' prior: 0!\rA ChangeRecord represents a change recorded on a file in fileOut format.\rIt includes a type (more needs to be done here), and additional information\rfor certain types such as method defs which need class and category.!\r\r\r!ChangeRecord methodsFor: 'access'!\rcategory\r\t^category! !\r\r!ChangeRecord methodsFor: 'access' stamp: 'nk 1/7/2004 10:28'!\rfileName\r\t^(file ifNotNil: [ file name ]) \r\t\t\tifNil: [ '<no file>' ]! !\r\r!ChangeRecord methodsFor: 'access' stamp: 'sw 10/20/2002 02:53'!\rfileOutOn: aFileStream\r\t\"File the receiver out on the given file stream\"\r\r\t| aString |\r\ttype == #method\r\t\tifTrue:\r\t\t\t[aFileStream nextPut: $!!.\r\t\t\taString _  class asString\r\t\t\t\t\t\t\t, (meta ifTrue: [' class methodsFor: ']\r\t\t\t\t\t\t\t\t\tifFalse: [' methodsFor: '])\r\t\t\t\t\t\t\t, category asString printString.\r\t\t\tstamp ifNotNil:\r\t\t\t\t[aString _ aString, ' stamp: ''', stamp, ''''].\r\t\t\taFileStream nextChunkPut: aString.\r\t\t\taFileStream cr].\r\r\ttype == #preamble ifTrue: [aFileStream nextPut: $!!].\r\r\ttype == #classComment\r\t\tifTrue:\r\t\t\t[aFileStream nextPut: $!!.\r\t\t\taFileStream nextChunkPut: class asString, ' commentStamp: ', stamp storeString.\r\t\t\taFileStream cr].\r\r\taFileStream nextChunkPut: self string.\r\ttype == #method ifTrue: [aFileStream nextChunkPut: ' '].\r\taFileStream cr! !\r\r!ChangeRecord methodsFor: 'access'!\risMetaClassChange\r\t^meta! !\r\r!ChangeRecord methodsFor: 'access'!\rmethodClass \r\t| methodClass |\r\ttype == #method ifFalse: [^ nil].\r\t(Smalltalk includesKey: class asSymbol) ifFalse: [^ nil].\r\tmethodClass _ Smalltalk at: class asSymbol.\r\tmeta ifTrue: [^ methodClass class]\r\t\tifFalse: [^ methodClass]! !\r\r!ChangeRecord methodsFor: 'access'!\rmethodClassName\r\t^class! !\r\r!ChangeRecord methodsFor: 'access'!\rmethodSelector\r\ttype == #method ifFalse: [^ nil].\r\t^ Parser new parseSelector: self string! !\r\r!ChangeRecord methodsFor: 'access' stamp: '6/6/97 08:56 dhhi'!\rstamp\r\t^ stamp! !\r\r!ChangeRecord methodsFor: 'access' stamp: 'tk 9/7/2000 15:09'!\rstamp: threePartString\r\r\tstamp _ threePartString! !\r\r!ChangeRecord methodsFor: 'access' stamp: 'di 1/13/98 16:57'!\rstring \r\t| string |\r\tfile openReadOnly.\r\tfile position: position.\r\tstring _ file nextChunk.\r\tfile close.\r\t^ string! !\r\r!ChangeRecord methodsFor: 'access' stamp: 'tk 6/23/1999 08:20'!\rtext\r\t| text |\r\t^ file ifNil: ['']\r\t\tifNotNil: [\r\t\t\tfile openReadOnly.\r\t\t\tfile position: position.\r\t\t\ttext _ file nextChunkText.\r\t\t\tfile close.\r\t\t\ttext]! !\r\r!ChangeRecord methodsFor: 'access' stamp: 'nk 11/25/2003 09:44'!\rtimeStamp\r\t\"Answer a TimeStamp that corresponds to my (text) stamp\"\r\t| tokens date time |\r\ttokens := self stamp findTokens: Character separators.\r\t^ tokens size > 2\r\t\tifTrue: [[date := Date\r\t\t\t\t\t\tfromString: (tokens at: tokens size - 1).\r\t\t\ttime := Time fromString: tokens last.\r\t\t\tTimeStamp date: date time: time]\r\t\t\t\ton: Error\r\t\t\t\tdo: [:ex | ex\r\t\t\t\t\t\treturn: (TimeStamp fromSeconds: 0)]]\r\t\tifFalse: [TimeStamp fromSeconds: 0]! !\r\r!ChangeRecord methodsFor: 'access'!\rtype\r\t^ type! !\r\r\r!ChangeRecord methodsFor: 'initialization'!\rfile: f position: p type: t\r\tfile _ f.\r\tposition _ p.\r\ttype _ t! !\r\r!ChangeRecord methodsFor: 'initialization' stamp: '6/6/97 08:48 dhhi'!\rfile: f position: p type: t class: c category: cat meta: m stamp: s\r\tself file: f position: p type: t.\r\tclass _ c.\r\tcategory _ cat.\r\tmeta _ m.\r\tstamp _ s! !\r\r!ChangeRecord methodsFor: 'initialization' stamp: 'nk 11/26/2002 12:07'!\rfileIn\r\t\"File the receiver in.  If I represent a method or a class-comment, file the method in and make a note of it in the recent-submissions list; if I represent a do-it, then, well, do it.\"\r\r\t| methodClass s aSelector |\r\tCursor read showWhile:\r\t\t[(methodClass _ self methodClass) notNil ifTrue:\r\t\t\t[methodClass compile: self text classified: category withStamp: stamp notifying: nil.\r\t\t\t(aSelector _ self methodSelector) ifNotNil:\r\t\t\t\t[Utilities noteMethodSubmission: aSelector forClass: methodClass]].\r\t\t(type == #doIt) ifTrue:\r\t\t\t[((s _ self string) beginsWith: '----') ifFalse: [Compiler evaluate: s]].\r\t\t(type == #classComment) ifTrue:\r\t\t\t[ | cls | (cls _ Smalltalk at: class asSymbol) comment: self text stamp: stamp.\r\t\t\tUtilities noteMethodSubmission: #Comment forClass: cls ]]! !\rObject subclass: #ChangeSet\r\tinstanceVariableNames: 'name preamble postscript revertable isolationSet isolatedProject changeRecords structures superclasses'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Changes'!\r!ChangeSet commentStamp: '<historical>' prior: 0!\rChangeSets keep track of the changes made to a system, so they can be written on a file as source code (a \"fileOut\").  Every project has an associated changeSet.  For simple projects, a different changeSet may be designated to capture changes at any time.\r\rThis implementation of ChangeSet is capable of remembering and manipulating methods for which the classes are not present in the system.  However at the present time, this capability is not used in normal rearranging and fileOuts, but only for invoking and revoking associated with isolation layers.\r\rFor isolated projects (see Project class comment), the changeSet binding is semi-permanent.  Every project exists in an isolation layer defined by its closest enclosing parent (or itself) that is isolated.  If a project is not isolated, then changes reported to its designated changeSet must also be reported to the permanent changeSet for that layer, designated in the isolated project.  This ensures that that outer project will be able to revert all changes upon exit.\r\rNote that only certain changes may be reverted.  Classes may not be added, removed, renamed or reshaped except in the layer in which they are defined because these operations on non-local classes are not revertable.\r\rIf a Squeak Project is established as being isolated, then its associated changeSet will be declared to be revertable.  In this case all changes stored can be reverted.  The changeSet associated with an isolated project is tied to that project, and cannot be edited in a changeSorter.\r------\r\rname - a String used to name the changeSet, and thus any associated project or fileOut.\r\rpreamble and postscript:  two strings that serve as prefix (useful for documentation) and suffix (useful for doits) to the fileout of the changeSet.\r\rrevertable - a Boolean\rIf this variable is true, then all of the changes recorded by this changeSet can be reverted.\r\risolationSet - a ChangeSet or nil\rThe isolationSet is the designated changeSet for an isolation layer.  If this changeSet is an isolationSet, then this variable will be nil.  If not, then it points to the isolationSet for this layer, and all changes reported here will also be reported to the isolationSet.\r\risolatedProject - a Project or nil\rIf this is an isolationSet, then this variable points to the project with which it is associated.\r\rchangeRecords -  Dictionary {class name -> a ClassChangeRecord}.\rThese classChangeRecords (qv) remember all of the system changes.\r\rstructures -    Dictionary {#Rectangle -> #(<classVersionInteger> 'origin' 'corner')}.\rOf  the names of the instances variables before any changes for all classes in classChanges, and all of their superclasses.  In the same format used in SmartRefStream.  Inst var names are strings.  \r\rsuperclasses -    Dictionary {#Rectangle -> #Object}.\rOf all classes in classChanges, and all of their superclasses.\r\rStructures and superclasses save the instance variable names of this class and all of its superclasses.  Later we can tell how it changed and write a conversion method.  The conversion method is used when old format objects are brought in from the disk from ImageSegment files (.extSeg) or SmartRefStream files (.obj .morph .bo .sp).\r\rNOTE:  It should be fairly simple, by adding a bit more information to the classChangeRecords, to reconstruct the information now stored in 'structures' and 'superclasses'.  This would be a welcome simplification.\r!\r\r\r!ChangeSet methodsFor: 'initialize-release' stamp: 'di 3/29/2000 20:42'!\rbeIsolationSetFor: aProject\r\r\tself isEmpty ifFalse: [self error: 'Must be empty at the start.'].\r\tisolatedProject _ aProject.\r\trevertable _ true.! !\r\r!ChangeSet methodsFor: 'initialize-release' stamp: 'di 4/1/2000 12:00'!\rclear \r\t\"Reset the receiver to be empty.  \"\r\r\tchangeRecords _ Dictionary new.\r\tpreamble _ nil.\r\tpostscript _ nil! !\r\r!ChangeSet methodsFor: 'initialize-release' stamp: 'di 4/6/2001 09:40'!\rinitialize \r\t\"Initialize the receiver to be empty.\"\r\r\tname ifNil:\r\t\t[^ self error: 'All changeSets must be registered, as in ChangeSorter newChangeSet'].\r\trevertable _ false.\r\tself clear.\r! !\r\r!ChangeSet methodsFor: 'initialize-release'!\risMoribund\r\t\"Answer whether the receiver is obsolete and about to die; part of an effort to get such guys cleared out from the change sorter.  2/7/96 sw\"\r\r\t^ name == nil ! !\r\r!ChangeSet methodsFor: 'initialize-release' stamp: 'sw 3/6/1999 09:31'!\rveryDeepCopyWith: deepCopier\r\t\"Return self; this is NOT the way to launch new change sets!! Having this method here allows Change Sorters to be in parts bins\"! !\r\r!ChangeSet methodsFor: 'initialize-release' stamp: 'di 3/23/2000 12:14'!\rwither\r\t\"The receiver is to be clobbered.  Clear it out.  2/7/96 sw\"\r\r\tself clear.\r\tname _ nil! !\r\r!ChangeSet methodsFor: 'initialize-release' stamp: 'di 9/21/2000 15:29'!\rzapHistory \r\t\"Much stronger than trimHistory, but it should still leave the changeSet in good shape.\r\tMust not be done on revertable changeSets\r\t\tChangeSet allInstancesDo: [:cs | cs zapHistory].\"\r\r\trevertable ifTrue: [^ self].  \"No can do\"\r\tchangeRecords do: [:chgRecord | chgRecord zapHistory]! !\r\r\r!ChangeSet methodsFor: 'change logging' stamp: 'di 3/29/2000 13:10'!\raddClass: class \r\t\"Include indication that a new class was created.\"\r\r\tclass wantsChangeSetLogging ifFalse: [^ self].\r\tisolationSet ifNotNil:\r\t\t[\"If there is an isolation layer above me, inform it as well.\"\r\t\tisolationSet addClass: class].\r\tself atClass: class add: #new.\r\tself atClass: class add: #change.\r\tself addCoherency: class name! !\r\r!ChangeSet methodsFor: 'change logging' stamp: 'NS 1/19/2004 18:30'!\rchangeClass: class from: oldClass\r\t\"Remember that a class definition has been changed.  Record the original structure, so that a conversion method can be built.\"\r\r\tclass wantsChangeSetLogging ifFalse: [^ self]. \r\tisolationSet ifNotNil:\r\t\t[\"If there is an isolation layer above me, inform it as well.\"\r\t\tisolationSet changeClass: class from: oldClass].\r\tclass isMeta \r\t\tifFalse: [self atClass: class add: #change]\t\"normal\"\r\t\tifTrue: [((self classChangeAt: class theNonMetaClass name) includes: #add) \r\t\t\tifTrue: [self atClass: class add: #add] \t\"When a class is defined, the metaclass\r\t\t\t\tis not recorded, even though it was added.  A further change is\r\t\t\t\treally just part of the original add.\"\r\t\t\tifFalse: [self atClass: class add: #change]].\r\tself addCoherency: class name.\r\t(self changeRecorderFor: class) notePriorDefinition: oldClass.\r\tself noteClassStructure: oldClass! !\r\r!ChangeSet methodsFor: 'change logging' stamp: 'NS 4/12/2004 22:44'!\revent: anEvent\r\t\"Hook for SystemChangeNotifier\"\r\r\t(anEvent isRemoved and: [anEvent itemKind = SystemChangeNotifier classKind]) \r\t\tifTrue: [self noteRemovalOf: anEvent item].\r\t(anEvent isAdded and: [anEvent itemKind = SystemChangeNotifier classKind]) \r\t\tifTrue: [self addClass: anEvent item].\r\t(anEvent isModified and: [anEvent itemKind = SystemChangeNotifier classKind])\r\t\tifTrue: [anEvent anyChanges ifTrue: [self changeClass: anEvent item from: anEvent oldItem]].\r\t(anEvent isCommented and: [anEvent itemKind = SystemChangeNotifier classKind])\r\t\tifTrue: [self commentClass: anEvent item].\r\t(anEvent isAdded and: [anEvent itemKind = SystemChangeNotifier methodKind])\r\t\tifTrue: [self noteNewMethod: anEvent item forClass: anEvent itemClass selector: anEvent itemSelector priorMethod: nil].\r\t(anEvent isModified and: [anEvent itemKind = SystemChangeNotifier methodKind])\r\t\tifTrue: [self noteNewMethod: anEvent item forClass: anEvent itemClass selector: anEvent itemSelector priorMethod: anEvent oldItem].\r\t(anEvent isRemoved and: [anEvent itemKind = SystemChangeNotifier methodKind])\r\t\tifTrue: [self removeSelector: anEvent itemSelector class: anEvent itemClass priorMethod: anEvent item lastMethodInfo: {anEvent item sourcePointer. anEvent itemProtocol}].\r\t(anEvent isRenamed and: [anEvent itemKind = SystemChangeNotifier classKind])\r\t\tifTrue: [self renameClass: anEvent item as: anEvent newName].\r\t(anEvent isReorganized and: [anEvent itemKind = SystemChangeNotifier classKind])\r\t\tifTrue: [self reorganizeClass: anEvent item].\r\t(anEvent isRecategorized and: [anEvent itemKind = SystemChangeNotifier methodKind])\r\t\tifTrue: [self reorganizeClass: anEvent itemClass].! !\r\r!ChangeSet methodsFor: 'change logging' stamp: 'di 3/29/2000 11:08'!\rnoteNewMethod: newMethod forClass: class selector: selector priorMethod: methodOrNil\r\r\tclass wantsChangeSetLogging ifFalse: [^ self].\r\tisolationSet ifNotNil:\r\t\t[\"If there is an isolation layer above me, inform it as well.\"\r\t\tisolationSet noteNewMethod: newMethod forClass: class selector: selector\r\t\t\t\tpriorMethod: methodOrNil].\r\t(self changeRecorderFor: class)\r\t\tnoteNewMethod: newMethod selector: selector priorMethod: methodOrNil\r! !\r\r!ChangeSet methodsFor: 'change logging' stamp: 'di 3/29/2000 12:29'!\rremoveSelector: selector class: class priorMethod: priorMethod lastMethodInfo: info\r\t\"Include indication that a method has been forgotten.\r\tinfo is a pair of the source code pointer and message category\r\tfor the method that was removed.\"\r\r\tclass wantsChangeSetLogging ifFalse: [^ self].\r\tisolationSet ifNotNil:\r\t\t[\"If there is an isolation layer above me, inform it as well.\"\r\t\tisolationSet removeSelector: selector class: class\r\t\t\t\tpriorMethod: priorMethod lastMethodInfo: info].\r\t(self changeRecorderFor: class)\r\t\tnoteRemoveSelector: selector priorMethod: priorMethod lastMethodInfo: info\r! !\r\r!ChangeSet methodsFor: 'change logging' stamp: 'tk 6/8/2001 09:27'!\rrenameClass: class as: newName \r\t\"Include indication that a class has been renamed.\"\r\r\t| recorder |\r\tisolationSet ifNotNil:\r\t\t[\"If there is an isolation layer above me, inform it as well.\"\r\t\tisolationSet renameClass: class as: newName].\r\t(recorder _ self changeRecorderFor: class)\r\t\tnoteChangeType: #rename;\r\t\tnoteNewName: newName asSymbol.\r\t\t\r\t\"store under new name (metaclass too)\"\r\tchangeRecords at: newName put: recorder.\r\tchangeRecords removeKey: class name.\r\tself noteClassStructure: class.\r\r\trecorder _ changeRecords at: class class name ifAbsent: [^ nil].\r\tchangeRecords at: (newName, ' class') put: recorder.\r\tchangeRecords removeKey: class class name.\r\trecorder noteNewName: newName , ' class'! !\r\r\r!ChangeSet methodsFor: 'isolation layers' stamp: 'di 4/1/2000 09:25'!\rcompileAll: newClass from: oldClass\r\t\"If I have changes for this class, recompile them\"\r\r\t(changeRecords at: newClass ifAbsent: [^ self])\r\t\tcompileAll: newClass from: oldClass\r! !\r\r!ChangeSet methodsFor: 'isolation layers' stamp: 'di 3/29/2000 14:47'!\rinvoke\r\r\t\"Do the first part of the invoke operation -- no particular hurry.\"\r\tchangeRecords do: [:changeRecord | changeRecord invokePhase1].\r\r\t\"Complete the invoke process -- this must be very simple.\"\r\t\"Replace method dicts for any method changes.\"\r\tchangeRecords do: [:changeRecord | changeRecord invokePhase2].\r\tBehavior flushCache.\r\r! !\r\r!ChangeSet methodsFor: 'isolation layers' stamp: 'di 4/13/2000 12:47'!\risolatedProject\r\t\"Return the isolated project for which I am the changeSet.\"\r\r\t^ isolatedProject! !\r\r!ChangeSet methodsFor: 'isolation layers' stamp: 'di 3/29/2000 13:59'!\risolationSet: setOrNil\r\r\tsetOrNil == self\r\t\tifTrue: [isolationSet _ nil]  \"Means this IS the isolation set\"\r\t\tifFalse: [isolationSet _ setOrNil]! !\r\r!ChangeSet methodsFor: 'isolation layers' stamp: 'di 3/29/2000 14:47'!\rrevoke\r\r\t\"Do the first part of the revoke operation -- this must be very simple.\"\r\t\"Replace original method dicts if there are method changes.\"\r\tchangeRecords do: [:changeRecord | changeRecord revokePhase1].\r\tBehavior flushCache.\r\r\t\"Complete the revoke process -- no particular hurry.\"\r\tchangeRecords do: [:changeRecord | changeRecord revokePhase2].\r! !\r\r!ChangeSet methodsFor: 'isolation layers' stamp: 'di 3/23/2000 12:00'!\runinstall\r\r\tself halt.\r! !\r\r\r!ChangeSet methodsFor: 'accessing' stamp: 'BJP 4/24/2001 00:23'!\rauthor\r\t| author |\r\tself assurePreambleExists.\r\tauthor _ self preambleString lineNumber: 3.\r\tauthor _ author copyFrom: 8 to: author size. \"Strip the 'Author:' prefix. Ugly ugly.\"\t\r\t^author withBlanksTrimmed.\r\t! !\r\r!ChangeSet methodsFor: 'accessing' stamp: 'di 4/1/2000 12:00'!\rclassRemoves\r\r\t^ changeRecords keys select:\r\t\t[:className | (changeRecords at: className) isClassRemoval]! !\r\r!ChangeSet methodsFor: 'accessing' stamp: 'ssa 9/3/2008 11:02'!\reditPostscript\r\t\"edit the receiver's postscript, in a separate window.  \"\r\r\t| deps found |\r\tself assurePostscriptExists.\r\tdeps _ postscript dependents select:\r\t\t[:m | m isKindOf: StandardSystemView].\r\tdeps size > 0 ifTrue:\r\t\t[Smalltalk isMorphic\r\t\t\tifTrue:\r\t\t\t\t[]\r\t\t\tifFalse:\r\t\t\t\t[found _ deps detect: [:obj | (obj isKindOf: StandardSystemView) and: [ScheduledControllers scheduledControllers includes: obj controller]] ifNone: [nil].\r\t\t\t\tfound ifNotNil: [^ ScheduledControllers activateController: found controller]].\r.\r\t\tself inform:\r'Caution -- there', (deps size isOrAreStringWith: 'other window'), '\ralready open on this postscript elsewhere'].\r\r\tpostscript openLabel: 'Postscript for ChangeSet named ', name! !\r\r!ChangeSet methodsFor: 'accessing' stamp: 'sw 6/29/1999 14:44'!\rhasPostscript\r\t^ postscript notNil! !\r\r!ChangeSet methodsFor: 'accessing' stamp: 'di 4/1/2000 12:00'!\rmethodChanges\r\r\t| methodChangeDict changeTypes |\r\tmethodChangeDict _ Dictionary new.\r\tchangeRecords associationsDo:\r\t\t[:assn |\r\t\tchangeTypes _ assn value methodChangeTypes.\r\t\tchangeTypes isEmpty ifFalse: [methodChangeDict at: assn key put: changeTypes]].\r\t^ methodChangeDict! !\r\r!ChangeSet methodsFor: 'accessing' stamp: 'di 3/29/2000 16:22'!\rmethodInfoFromRemoval: classAndSelector\r\r\t^ (self changeRecorderFor: classAndSelector first)\r\t\tinfoFromRemoval: classAndSelector last! !\r\r!ChangeSet methodsFor: 'accessing'!\rname\r\t\"The name of this changeSet.\r\t 2/7/96 sw: If name is nil, we've got garbage.  Help to identify.\"\r\r\t^ name == nil\r\t\tifTrue:\r\t\t\t['<no name -- garbage?>']\r\t\tifFalse:\r\t\t\t[name]! !\r\r!ChangeSet methodsFor: 'accessing'!\rname: anObject\r\tname _ anObject! !\r\r!ChangeSet methodsFor: 'accessing' stamp: 'sw 6/29/1999 20:51'!\rpostscriptHasDependents\r\t^ postscript dependents size > 0! !\r\r!ChangeSet methodsFor: 'accessing'!\rprintOn: aStream\r\t\"2/7/96 sw: provide the receiver's name in the printout\"\r\tsuper printOn: aStream.\r\taStream nextPutAll: ' named ', self name! !\r\r!ChangeSet methodsFor: 'accessing' stamp: 'MPW 1/1/1901 22:02'!\rprintOnStream: aStream\r\t\"2/7/96 sw: provide the receiver's name in the printout\"\r\tsuper printOnStream: aStream.\r\taStream print: ' named ', self name! !\r\r!ChangeSet methodsFor: 'accessing' stamp: 'sw 6/29/1999 14:48'!\rremovePostscript\r\tpostscript _ nil! !\r\r!ChangeSet methodsFor: 'accessing' stamp: 'tk 6/8/1999 22:25'!\rstructures\r\t^structures! !\r\r!ChangeSet methodsFor: 'accessing' stamp: 'tk 6/8/1999 22:25'!\rsuperclasses\r\t^superclasses! !\r\r\r!ChangeSet methodsFor: 'testing' stamp: 'RAA 10/1/2000 12:28'!\rbelongsToAProject\r\r\tSmalltalk at: #Project ifPresent:\r\t\t[:projClass | projClass allProjects do:\r\t\t\t[:proj | proj projectChangeSet == self ifTrue: [^ true]]].\r\t^ false! !\r\r!ChangeSet methodsFor: 'testing' stamp: 'sw 8/10/2002 22:21'!\rcontainsMethodAtPosition: aFilePosition\r\t\"Answer whether the receiver contains the method logged at the given file position\"\r\r\t\"class: aClassSymbol\" \"(need class parameter to speed up?)\"  \"<- dew 9/6/2001\"\r\r\tchangeRecords values do:\r\t\t[:classChangeRecord |\r\t\tclassChangeRecord methodChanges values do:\r\t\t\t[:methodChangeRecord | | changeType |\r\t\t\tchangeType _ methodChangeRecord changeType.\r\t\t\t((changeType == #add or: [changeType == #change]) and:\r\t\t\t\t[methodChangeRecord currentMethod notNil and: [methodChangeRecord currentMethod filePosition = aFilePosition]])\r\t\t\t\t\tifTrue: [^ true]]].\r\t^ false! !\r\r!ChangeSet methodsFor: 'testing' stamp: 'RAA 11/13/2000 17:15'!\rcorrespondingProject\r\t\"If the receiver is the current change set for any project, answer it, else answer nil\"\r\r\t^Project allProjects \r\t\tdetect: [ :proj |\r\t\t\tproj projectChangeSet == self\r\t\t]\r\t\tifNone: [nil]\r\r! !\r\r!ChangeSet methodsFor: 'testing' stamp: 'RAA 10/19/2000 13:17'!\risEmpty\r\t\"Answer whether the receiver contains any elements.\"\r\t\r\tchangeRecords ifNil: [^true].\r\t^ changeRecords isEmpty ! !\r\r!ChangeSet methodsFor: 'testing' stamp: 'nk 7/2/2003 10:47'!\rmethodsWithoutClassifications\r\t\"Return a collection representing methods in the receiver which have not been categorized\"\r\r\t| slips notClassified aSelector |\r\r\tnotClassified _ {'as yet unclassified' asSymbol. #all}.\r\tslips _ OrderedCollection new.\r\tself changedClasses do:\r\t\t[:aClass |\r\t\t(self methodChangesAtClass: aClass name) associationsDo: \r\t\t\t\t[:mAssoc | (aClass selectors includes:  (aSelector _ mAssoc key)) ifTrue:\r\t\t\t\t\t\t[(notClassified includes: (aClass organization categoryOfElement: aSelector))\r\t\t\t\t\t\t\t\tifTrue: [slips add: aClass name , ' ' , aSelector]]]].\r\t^ slips\r\r\t\"Smalltalk browseMessageList: (ChangeSet current methodsWithoutClassifications) name: 'unclassified methods'\"! !\r\r!ChangeSet methodsFor: 'testing' stamp: 'sw 8/3/1998 16:25'!\rokayToRemove\r\t^ self okayToRemoveInforming: true! !\r\r!ChangeSet methodsFor: 'testing' stamp: 'sd 5/23/2003 14:24'!\rokayToRemoveInforming: aBoolean\r\t\"Answer whether it is okay to remove the receiver.  If aBoolean is true, inform the receiver if it is not okay\"\r\r\t| aName |\r\taName _ self name.\r\tself == self class current ifTrue:\r\t\t[aBoolean ifTrue: [self inform: 'Cannot remove \"', aName, '\"\rbecause it is the \rcurrent change set.'].\r\t\t^ false].\r\r\tself belongsToAProject ifTrue:\r\t\t[aBoolean ifTrue: [self inform: 'Cannot remove \"', aName, '\" \rbecause it belongs to a \rproject.'].\r\t\t\t^ false].\r\r\t^ true\r! !\r\r!ChangeSet methodsFor: 'testing' stamp: 'RAA 9/27/2000 22:40'!\rprojectsBelongedTo\r\t\"Answer a list of all the projects for which the receiver is the current change set\"\r\r\t^ Project allProjects select: [:proj | proj projectChangeSet == self]\r! !\r\r\r!ChangeSet methodsFor: 'converting' stamp: 'RAA 12/20/2000 16:02'!\rconvertApril2000: varDict using: smartRefStrm\r\t| cls info selector pair classChanges methodChanges methodRemoves classRemoves |\r\t\"These variables are automatically stored into the new instance:\r\t\t('name' 'preamble' 'postscript' 'structures' 'superclasses' ).\r\tThis method is for additional changes.\r\tIt initializes the isolation variables, and then duplicates the logic fo\r\t\tassimilateAllChangesFoundIn:.\"\r\r\trevertable _ false.\r\tisolationSet _ nil.\r\tisolatedProject _ nil.\r\tchangeRecords _ Dictionary new.\r\r\tclassChanges _ varDict at: 'classChanges'.\r\tclassChanges keysDo:\r\t\t[:className |\r\t  \t(cls _ Smalltalk classNamed: className) ifNotNil:\r\t\t\t[info _ classChanges at: className ifAbsent: [Set new].\r\t\t\tinfo do: [:each | self atClass: cls add: each]]].\r\r\tmethodChanges _ varDict at: 'methodChanges'.\r\tmethodRemoves _ varDict at: 'methodRemoves'.\r\tmethodChanges keysDo:\r\t\t[:className |\r\t  \t(cls _ Smalltalk classNamed: className) ifNotNil:\r\t\t\t[info _ methodChanges at: className ifAbsent: [Dictionary new].\r\t\t\tinfo associationsDo:\r\t\t\t\t[:assoc | selector _ assoc key.\r\t\t\t\t(assoc value == #remove or: [assoc value == #addedThenRemoved])\r\t\t\t\t\tifTrue:\r\t\t\t\t\t\t[assoc value == #addedThenRemoved\r\t\t\t\t\t\t\tifTrue: [self atSelector: selector class: cls put: #add].\r\t\t\t\t\t\tpair _ methodRemoves at: {cls name. selector} ifAbsent: [nil] .\r\t\t\t\t\t\tself removeSelector: selector class: cls priorMethod: nil lastMethodInfo: pair]\r\t\t\t\t\tifFalse: \r\t\t\t\t\t\t[self atSelector: selector class: cls put: assoc value]]]].\r\r\tclassRemoves _ varDict at: 'classRemoves'.\r\tclassRemoves do:\r\t\t[:className | self noteRemovalOf: className].\r\r! !\r\r!ChangeSet methodsFor: 'converting' stamp: 'RAA 12/20/2000 17:57'!\rconvertToCurrentVersion: varDict refStream: smartRefStrm\r\t\r\t\"major change - 4/4/2000\"\r\tvarDict at: 'classChanges' ifPresent: [ :x | \r\t\tself convertApril2000: varDict using: smartRefStrm\r\t].\r\t^super convertToCurrentVersion: varDict refStream: smartRefStrm.\r\r! !\r\r\r!ChangeSet methodsFor: 'method changes' stamp: 'sw 12/28/2000 18:08'!\radoptSelector: aSelector forClass: aClass\r\t\"Adopt the given selector/class combination as a change in the receiver\"\r\r\tself noteNewMethod: (aClass methodDictionary at: aSelector)\r\t\t\tforClass: aClass selector: aSelector priorMethod: nil! !\r\r!ChangeSet methodsFor: 'method changes' stamp: 'di 3/29/2000 11:01'!\ratSelector: selector class: class put: changeType\r\r\t(selector == #DoIt or: [selector == #DoItIn:]) ifTrue: [^ self].\r\t(self changeRecorderFor: class) atSelector: selector put: changeType.\r! !\r\r!ChangeSet methodsFor: 'method changes' stamp: 'sd 4/16/2003 09:15'!\rbrowseMessagesWithPriorVersions\r\t\"Open a message list browser on the new and changed methods in the receiver which have at least one prior version.  6/28/96 sw\"\r\r\t| aList |\r\r\taList _ self \r\t\tmessageListForChangesWhich: [ :aClass :aSelector |\r\t\t\t(VersionsBrowser versionCountForSelector: aSelector class: aClass) > 1\r\t\t]\r\t\tifNone: [^self inform: 'None!!'].\r\tself systemNavigation \r\t\tbrowseMessageList: aList \r\t\tname: self name, ' methods that have prior versions'! !\r\r!ChangeSet methodsFor: 'method changes' stamp: 'sw 6/26/2001 12:15'!\rchangedMessageList\r\t\"Used by a message set browser to access the list view information.\"\r\r\t| messageList classNameInFull classNameInParts |\r\tmessageList _ OrderedCollection new.\r\tchangeRecords associationsDo: [:clAssoc |\r\t\tclassNameInFull _ clAssoc key asString.\r\t\tclassNameInParts _ classNameInFull findTokens: ' '.\r\r\t\t(clAssoc value allChangeTypes includes: #comment) ifTrue:\r\t\t\t[messageList add:\r\t\t\t\t(MethodReference new\r\t\t\t\t\tsetClassSymbol: classNameInParts first asSymbol\r\t\t\t\t\tclassIsMeta: false \r\t\t\t\t\tmethodSymbol: #Comment \r\t\t\t\t\tstringVersion: classNameInFull, ' Comment')].\r\r\t\tclAssoc value methodChangeTypes associationsDo: [:mAssoc |\r\t\t\t(#(remove addedThenRemoved) includes: mAssoc value) ifFalse:\r\t\t\t\t[messageList add:\r\t\t\t\t\t(MethodReference new\r\t\t\t\t\t\tsetClassSymbol: classNameInParts first asSymbol\r\t\t\t\t\t\tclassIsMeta: classNameInParts size > 1 \r\t\t\t\t\t\tmethodSymbol: mAssoc key \r\t\t\t\t\t\tstringVersion: classNameInFull, ' ' , mAssoc key)]]].\r\t^ messageList asSortedArray! !\r\r!ChangeSet methodsFor: 'method changes' stamp: 'tk 6/7/1999 18:57'!\rchangedMessageListAugmented\r\t\"Even added classes have all messages in changedMessageList.\"\r\t^ self changedMessageList asArray! !\r\r!ChangeSet methodsFor: 'method changes' stamp: 'sw 4/19/2001 19:45'!\rhasAnyChangeForSelector: aSelector\r\t\"Answer whether the receiver has any change under the given selector, whether it be add, change, or remove, for any class\"\r\r\tchangeRecords do:\r\t\t[:aRecord | (aRecord changedSelectors  includes: aSelector)\r\t\t\tifTrue:\t[^ true]].\r\t^ false! !\r\r!ChangeSet methodsFor: 'method changes' stamp: 'RAA 5/28/2001 12:05'!\rmessageListForChangesWhich: aBlock ifNone: ifEmptyBlock\r\r\t| answer |\r\r\tanswer _ self changedMessageListAugmented select: [ :each |\r\t\taBlock value: each actualClass value: each methodSymbol\r\t].\r\tanswer isEmpty ifTrue: [^ifEmptyBlock value].\r\t^answer\r! !\r\r!ChangeSet methodsFor: 'method changes' stamp: 'di 4/1/2000 12:00'!\rmethodChangesAtClass: className\r\t\"Return an old-style dictionary of method change types.\"\r\r\t^(changeRecords at: className ifAbsent: [^ Dictionary new])\r\t\tmethodChangeTypes! !\r\r!ChangeSet methodsFor: 'method changes' stamp: 'di 4/4/2000 11:14'!\rremoveSelectorChanges: selector class: class \r\t\"Remove all memory of changes associated with the argument, selector, in \r\tthis class.\"\r\r\t| chgRecord |\r\t(chgRecord _ changeRecords at: class name ifAbsent: [^ self])\r\t\tremoveSelector: selector.\r\tchgRecord hasNoChanges ifTrue: [changeRecords removeKey: class name]! !\r\r!ChangeSet methodsFor: 'method changes' stamp: 'SqR 6/13/2000 19:16'!\rselectorsInClass: aClassName\r\t\"Used by a ChangeSorter to access the list methods.\"\r\r\t^ (changeRecords at: aClassName ifAbsent: [^#()]) changedSelectors! !\r\r\r!ChangeSet methodsFor: 'class changes' stamp: 'di 4/1/2000 12:00'!\rchangedClassNames\r\t\"Answer a OrderedCollection of the names of changed or edited classes.\r\tDOES include removed classes.  Sort alphabetically.\"\r\r\t^ changeRecords keysSortedSafely ! !\r\r!ChangeSet methodsFor: 'class changes' stamp: 'di 3/23/2000 08:12'!\rchangedClasses\r\t\"Answer an OrderedCollection of changed or edited classes.\r\tDoes not include removed classes.  Sort alphabetically by name.\"\r\r\t\"Much faster to sort names first, then convert back to classes.  Because metaclasses reconstruct their name at every comparison in the sorted collection.\r\t8/91 sw chgd to filter out non-existent classes (triggered by problems with class-renames\"\r\r\t^ self changedClassNames\r\t\tcollect: [:className | Smalltalk classNamed: className]\r\t\tthenSelect: [:aClass | aClass notNil]! !\r\r!ChangeSet methodsFor: 'class changes' stamp: 'di 4/1/2000 12:00'!\rclassChangeAt: className\r\t\"Return what we know about class changes to this class.\"\r\r\t^ (changeRecords at: className ifAbsent: [^ Set new])\r\t\tallChangeTypes! !\r\r!ChangeSet methodsFor: 'class changes' stamp: 'NS 1/26/2004 09:46'!\rcommentClass: class \r\t\"Include indication that a class comment has been changed.\"\r\r\tclass wantsChangeSetLogging ifFalse: [^ self].\r\tself atClass: class add: #comment! !\r\r!ChangeSet methodsFor: 'class changes' stamp: 'nk 6/26/2002 12:30'!\rcontainsClass: aClass\r\t^ self changedClasses includes: aClass! !\r\r!ChangeSet methodsFor: 'class changes' stamp: 'RAA 6/16/2000 15:13'!\rfatDefForClass: class\r\r\t| newDef oldDef oldStrm newStrm outStrm oldVars newVars addedVars |\r\tnewDef _ class definition.\r\toldDef _ (self changeRecorderFor: class) priorDefinition.\r\toldDef ifNil: [^ newDef].\r\toldDef = newDef ifTrue: [^ newDef].\r\r\toldStrm _ ReadStream on: oldDef.\r\tnewStrm _ ReadStream on: newDef.\r\toutStrm _ WriteStream on: (String new: newDef size * 2).\r\r\t\"Merge inst vars from old and new defs...\"\r\toldStrm upToAll: 'instanceVariableNames'; upTo: $'.\r\toutStrm \r\t\tnextPutAll: (newStrm upToAll: 'instanceVariableNames'); \r\t\tnextPutAll: 'instanceVariableNames:'.\r\tnewStrm peek = $: ifTrue: [newStrm next].\t\"may or may not be there, but already written\"\r\toutStrm\r\t\tnextPutAll: (newStrm upTo: $'); nextPut: $'.\r\toldVars _ (oldStrm upTo: $') findTokens: Character separators.\r\tnewVars _ (newStrm upTo: $') findTokens: Character separators.\r\taddedVars _ oldVars asSet addAll: newVars; removeAll: oldVars; asOrderedCollection.\r\toldVars , addedVars do: [:var | outStrm nextPutAll: var; space].\r\toutStrm nextPut: $'.\r\r\tclass isMeta ifFalse:\r\t\t[\"Merge class vars from old and new defs...\"\r\t\toldStrm upToAll: 'classVariableNames:'; upTo: $'.\r\t\toutStrm nextPutAll: (newStrm upToAll: 'classVariableNames:'); nextPutAll: 'classVariableNames:';\r\t\t\tnextPutAll: (newStrm upTo: $'); nextPut: $'.\r\t\toldVars _ (oldStrm upTo: $') findTokens: Character separators.\r\t\tnewVars _ (newStrm upTo: $') findTokens: Character separators.\r\t\taddedVars _ oldVars asSet addAll: newVars; removeAll: oldVars; asOrderedCollection.\r\t\toldVars , addedVars do: [:var | outStrm nextPutAll: var; space].\r\t\toutStrm nextPut: $'].\r\r\toutStrm nextPutAll: newStrm upToEnd.\r\t^ outStrm contents\r! !\r\r!ChangeSet methodsFor: 'class changes' stamp: 'tk 6/9/1999 19:54'!\rnoteClassForgotten: className\r\t\"Remove from structures if class is not a superclass of some other one we are remembering\"\r\r\tstructures ifNil: [^ self].\r\tSmalltalk at: className ifPresent: [:cls |\r\t\tcls subclasses do: [:sub | (structures includesKey: sub) ifTrue: [\r\t\t\t^ self]]].  \"No delete\"\r\tstructures removeKey: className ifAbsent: [].! !\r\r!ChangeSet methodsFor: 'class changes' stamp: 'tk 6/9/1999 21:51'!\rnoteClassStructure: aClass\r\t\"Save the instance variable names of this class and all of its superclasses.  Later we can tell how it changed and write a conversion method.  The conversion method is used when old format objects are brought in from the disk from ImageSegment files (.extSeg) or SmartRefStream files (.obj .morph .bo .sp).\"\r\r\t| clsName |\r\taClass ifNil: [^ self].\r\tstructures ifNil: [structures _ Dictionary new.\r\t\t\t\tsuperclasses _ Dictionary new].\r\tclsName _ (aClass name asLowercase beginsWith: 'anobsolete') \r\t\tifTrue: [(aClass name copyFrom: 11 to: aClass name size) asSymbol]\r\t\tifFalse: [aClass name].\r\t(structures includesKey: clsName) ifFalse: [\r\t\tstructures at: clsName put: \r\t\t\t((Array with: aClass classVersion), (aClass allInstVarNames)).\r\t\tsuperclasses at: clsName put: aClass superclass name].\r\t\"up the superclass chain\"\r\taClass superclass ifNotNil: [self noteClassStructure: aClass superclass].\r! !\r\r!ChangeSet methodsFor: 'class changes' stamp: 'NS 1/19/2004 17:49'!\rnoteRemovalOf: class\r\t\"The class is about to be removed from the system.\r\tAdjust the receiver to reflect that fact.\"\r\r\tclass wantsChangeSetLogging ifFalse: [^ self].\r\t(self changeRecorderFor: class)\r\t\tnoteChangeType: #remove fromClass: class.\r\tchangeRecords removeKey: class class name ifAbsent: [].! !\r\r!ChangeSet methodsFor: 'class changes'!\rreorganizeClass: class \r\t\"Include indication that a class was reorganized.\"\r\r\tself atClass: class add: #reorganize! !\r\r!ChangeSet methodsFor: 'class changes' stamp: 'di 5/16/2000 09:03'!\rtrimHistory \r\t\"Drop non-essential history:  methods added and then removed, as well as rename and reorganization of newly-added classes.\"\r\r\tchangeRecords do: [:chgRecord | chgRecord trimHistory]! !\r\r\r!ChangeSet methodsFor: 'moving changes' stamp: 'di 4/4/2000 09:37'!\rabsorbClass: className from: otherChangeSet\r\t\"Absorb into the receiver all the changes found in the class in the other change set.\r\t*** Classes renamed in otherChangeSet may have problems\"\r\r\t| cls |\r\t(self changeRecorderFor: className)\r\t\t\tassimilateAllChangesIn: (otherChangeSet changeRecorderFor: className).\r\r\t(cls _ Smalltalk classNamed: className) ifNotNil:\r\t\t[self absorbStructureOfClass: cls from: otherChangeSet].\r! !\r\r!ChangeSet methodsFor: 'moving changes' stamp: 'di 3/23/2000 11:52'!\rabsorbMethod: selector class: aClass from: aChangeSet\r\t\"Absorb into the receiver all the changes for the method in the class in the other change set.\"\r\r\t| info |\r\tinfo _ aChangeSet methodChanges at: aClass name ifAbsent: [Dictionary new].\r\tself atSelector: selector class: aClass put: (info at: selector).\r\r! !\r\r!ChangeSet methodsFor: 'moving changes' stamp: 'sw 1/30/2001 15:41'!\rabsorbStructureOfClass: aClass from: otherChangeSet\r\t\"Absorb into the receiver all the structure and superclass info in the other change set.  Used to write conversion methods.\"\r\r\t| sup next |\r\totherChangeSet structures ifNil: [^ self].\r\t(otherChangeSet structures includesKey: aClass name) ifFalse: [^ self].\r\tstructures ifNil:\r\t\t[structures _ Dictionary new.\r\t\tsuperclasses _ Dictionary new].\r\tsup _ aClass name.\r\t[(structures includesKey: sup) \r\t\tifTrue: [\"use what is here\" true]\r\t\tifFalse: [self flag: #noteToDan.  \"sw 1/30/2001 13:57 emergency workaround -- a case arose where the otherChangeSet's structures did not have the key, and it gummed up the works.\"\r\t\t\t\t(otherChangeSet structures includesKey: sup) ifTrue:\r\t\t\t\t\t[structures at: sup put: (otherChangeSet structures at: sup)].\r\t\t\t\tnext _ otherChangeSet superclasses at: sup.\r\t\t\t\tsuperclasses at: sup put: next.\r\t\t\t\t(sup _ next) = 'nil']\r\t] whileFalse.\r\r\r! !\r\r!ChangeSet methodsFor: 'moving changes' stamp: 'di 4/4/2000 11:21'!\rassimilateAllChangesFoundIn: otherChangeSet\r\t\"Make all changes in otherChangeSet take effect on self as if they happened just now.\"\r\r\totherChangeSet changedClassNames do:\r\t\t[:className | self absorbClass: className from: otherChangeSet]\r! !\r\r!ChangeSet methodsFor: 'moving changes' stamp: 'di 4/8/2000 23:16'!\reditPreamble\r\t\"edit the receiver's preamble, in a separate window.  \"\r\r\tself assurePreambleExists.\r\tpreamble openLabel: 'Preamble for ChangeSet named ', name! !\r\r!ChangeSet methodsFor: 'moving changes' stamp: 'di 4/4/2000 11:49'!\rexpungeEmptyClassChangeEntries\r\r\tchangeRecords keysAndValuesRemove:\r\t\t[:className :classRecord | classRecord hasNoChanges]! !\r\r!ChangeSet methodsFor: 'moving changes' stamp: 'sw 4/19/2000 16:17'!\rexpungeUniclasses\r\r\tchangeRecords keysAndValuesRemove:\r\t\t[:className :classRecord | className endsWithDigit]! !\r\r!ChangeSet methodsFor: 'moving changes' stamp: 'di 4/4/2000 12:40'!\rforgetAllChangesFoundIn: otherChangeSet\r\t\"Remove from the receiver all method changes found in aChangeSet. The intention is facilitate the process of factoring a large set of changes into disjoint change sets.  To use:  in a change sorter, copy over all the changes you want into some new change set, then use the subtract-other-side feature to subtract those changes from the larger change set, and continue in this manner.\"\r\r\totherChangeSet == self ifTrue: [^ self].\r\totherChangeSet changedClassNames do:\r\t\t[:className | self forgetChangesForClass: className in: otherChangeSet].\r\tself expungeEmptyClassChangeEntries.\r\r\"  Old code...\r\taChangeSet changedClassNames do: \r\t\t[:className |\r\t\t\t(cls _ Smalltalk classNamed: className) ~~ nil ifTrue:\r\t\t\t\t[itsMethodChanges _ aChangeSet methodChanges at: className \r\t\t\t\t\t\tifAbsent: [Dictionary new].\r\t\t\t\titsMethodChanges associationsDo: [:assoc | \r\t\t\t\t\tself forgetChange: assoc value forSelector: assoc key class: cls].\r\t\t\t\tmyClassChange _ self classChangeAt: className.\r\t\t\t\tmyClassChange size > 0 ifTrue:\r\t\t\t\t\t[(aChangeSet classChangeAt: className) do:\r\t\t\t\t\t\t[:aChange | myClassChange remove: aChange ifAbsent: []]].\r\t\t\t\tself noteClassForgotten: className]].\r\r\taChangeSet classRemoves do:\r\t\t[:className | (recorder _ changeRecords at: className ifAbsent: [])\r\t\t\tifNotNil: [recorder forgetClassRemoval]].\r\tself expungeEmptyClassChangeEntries\r\"\r! !\r\r!ChangeSet methodsFor: 'moving changes' stamp: 'di 4/4/2000 12:04'!\rforgetChangesForClass: className in: otherChangeSet\r\t\"See forgetAllChangesFoundIn:.  Used in culling changeSets.\"\r\r\t(self changeRecorderFor: className)\r\t\t\tforgetChangesIn: (otherChangeSet changeRecorderFor: className).\r\tself noteClassForgotten: className\r! !\r\r!ChangeSet methodsFor: 'moving changes' stamp: 'sw 3/5/1999 19:27'!\rhasPreamble\r\t^ preamble notNil! !\r\r!ChangeSet methodsFor: 'moving changes' stamp: 'nk 3/30/2002 09:13'!\rmethodsWithAnyInitialsOtherThan: myInits\r\t\"Return a collection of method refs whose author appears to be different from the given one, even historically\"\r\t| slips method aTimeStamp |\r\tslips _ Set new.\r\tself changedClasses do: [:aClass |\r\t\t(self methodChangesAtClass: aClass name) associationsDo: [ :mAssoc |\r\t\t\t(#(remove addedThenRemoved) includes: mAssoc value) ifFalse:\r\t\t\t\t[method _ aClass compiledMethodAt: mAssoc key ifAbsent: [nil].\r\t\t\t\tmethod ifNotNil: [\r\t\t\t\t\t(aClass changeRecordsAt: mAssoc key) do: [ :chg |\r\t\t\t\t\t\taTimeStamp _ chg stamp.\r\t\t\t\t\t\t(aTimeStamp notNil and: [(aTimeStamp beginsWith: myInits) not])\r\t\t\t\t\t\t\tifTrue: [slips add: aClass name , ' ' , mAssoc key]]]]]].\r\t^ slips! !\r\r!ChangeSet methodsFor: 'moving changes' stamp: 'nk 7/2/2003 10:47'!\rmethodsWithInitialsOtherThan: myInits\r\t\"Return a collection of method refs whose author appears to be different from the given one\"\r\t| slips method aTimeStamp |\r\tslips _ OrderedCollection new.\r\tself changedClasses do:\r\t\t[:aClass |\r\t\t(self methodChangesAtClass: aClass name) associationsDo: \r\t\t\t\t[:mAssoc | (#(remove addedThenRemoved) includes: mAssoc value) ifFalse:\r\t\t\t\t\t[method _ aClass compiledMethodAt: mAssoc key ifAbsent: [nil].\r\t\t\t\t\tmethod ifNotNil:\r\t\t\t\t\t\t[((aTimeStamp _ Utilities timeStampForMethod: method) notNil and:\r\t\t\t\t\t\t\t[(aTimeStamp beginsWith: myInits) not])\r\t\t\t\t\t\t\t\tifTrue: [slips add: aClass name , ' ' , mAssoc key]]]]].\r\t^ slips\r\r\t\"Smalltalk browseMessageList: (ChangeSet current methodsWithInitialsOtherThan: 'sw') name: 'authoring problems'\"! !\r\r!ChangeSet methodsFor: 'moving changes' stamp: 'nk 7/2/2003 10:47'!\rmethodsWithoutComments\r\t\"Return a collection representing methods in the receiver which have no precode comments\"\r\r\t| slips |\r\tslips _ OrderedCollection new.\r\tself changedClasses do:\r\t\t[:aClass |\r\t\t(self methodChangesAtClass: aClass name) associationsDo: \r\t\t\t\t[:mAssoc | (#(remove addedThenRemoved) includes: mAssoc value) ifFalse:\r\t\t\t\t\t[(aClass selectors includes:  mAssoc key) ifTrue:\r\t\t\t\t\t\t[(aClass firstPrecodeCommentFor: mAssoc key) isEmptyOrNil\r\t\t\t\t\t\t\t\tifTrue: [slips add: aClass name , ' ' , mAssoc key]]]]].\r\t^ slips\r\r\t\"Smalltalk browseMessageList: (ChangeSet current methodsWithoutComments) name: 'methods lacking comments'\"! !\r\r!ChangeSet methodsFor: 'moving changes' stamp: 'di 4/1/2000 12:00'!\rremoveClassAndMetaClassChanges: class\r\t\"Remove all memory of changes associated with this class and its metaclass.  7/18/96 sw\"\r\r\tchangeRecords removeKey: class name ifAbsent: [].\r\tchangeRecords removeKey: class class name ifAbsent: [].\r! !\r\r!ChangeSet methodsFor: 'moving changes' stamp: 'di 4/1/2000 12:00'!\rremoveClassChanges: class\r\t\"Remove all memory of changes associated with this class\"\r\t| cname |\r\t(class isKindOf: String)\r\t\tifTrue: [ cname _ class ]\r\t\tifFalse: [ cname _ class name ].\r\r\tchangeRecords removeKey: cname ifAbsent: [].\r\tself noteClassForgotten: cname.! !\r\r!ChangeSet methodsFor: 'moving changes' stamp: 'sw 3/5/1999 19:32'!\rremovePreamble\r\tpreamble _ nil! !\r\r\r!ChangeSet methodsFor: 'fileIn/Out' stamp: 'tk 6/8/2001 20:28'!\raskAddedInstVars: classList\r\t| pairList pairClasses index pls newStruct oldStruct |\r\t\"Ask the author whether these newly added inst vars need to be non-nil\"\r\r\tpairList _ OrderedCollection new.\r\tpairClasses _ OrderedCollection new.\r\t\"Class version numbers:  If it must change, something big happened.  Do need a conversion method then.  Ignore them here.\"\r\tclassList do: [:cls |\r\t\tnewStruct _ (cls allInstVarNames).\r\t\toldStruct _ (structures at: cls name ifAbsent: [#(0), newStruct]) allButFirst.\r\t\tnewStruct do: [:instVarName |\r\t\t\t(oldStruct includes: instVarName) ifFalse: [\r\t\t\t\tpairList add: cls name, ' ', instVarName.\r\t\t\t\tpairClasses add: cls]]].\r\r\tpairList isEmpty ifTrue: [^ #()].\r\t[index _ PopUpMenu withCaption: 'These instance variables were added.\rWhen an old project comes in, newly added \rinstance variables will have the value nil.\rClick on items to remove them from the list.\rClick on any for which nil is an OK value.'\r\t\tchooseFrom: pairList, #('all of these need a non-nil value'\r\t\t\t\t\t\t'all of these are OK with a nil value').\r\t(index <= (pls _ pairList size)) & (index > 0) ifTrue: [\r\t\tpairList removeAt: index.\r\t\tpairClasses removeAt: index].\r\tindex = (pls + 2) ifTrue: [\"all are OK\" ^ #()].\r\tpairList isEmpty | (index = (pls + 1)) \"all need conversion, exit\"] whileFalse.\r\r\t^ pairClasses asSet asArray\t\"non redundant\"! !\r\r!ChangeSet methodsFor: 'fileIn/Out' stamp: 'tk 6/8/2001 20:29'!\raskRemovedInstVars: classList\r\t| pairList pairClasses index pls newStruct oldStruct |\r\t\"Ask the author whether these newly removed inst vars need to have their info saved\"\r\r\tpairList _ OrderedCollection new.\r\tpairClasses _ OrderedCollection new.\r\t\"Class version numbers:  If it must change, something big happened.  Do need a conversion method then.  Ignore them here.\"\r\tclassList do: [:cls |\r\t\tnewStruct _ (cls allInstVarNames).\r\t\toldStruct _ (structures at: cls name ifAbsent: [#(0), newStruct]) allButFirst.\r\t\toldStruct do: [:instVarName |\r\t\t\t(newStruct includes: instVarName) ifFalse: [\r\t\t\t\tpairList add: cls name, ' ', instVarName.\r\t\t\t\tpairClasses add: cls]]].\r\r\tpairList isEmpty ifTrue: [^ #()].\r\t[index _ PopUpMenu withCaption: 'These instance variables were removed.\rWhen an old project comes in, instance variables \rthat have been removed will lose their contents.\rClick on items to remove them from the list.\rClick on any whose value is unimportant and need not be saved.'\r\t\tchooseFrom: pairList, #('all of these need a conversion method'\r\t\t\t\t\t\t'all of these have old values that can be erased').\r\t(index <= (pls _ pairList size)) & (index > 0) ifTrue: [\r\t\tpairList removeAt: index.\r\t\tpairClasses removeAt: index].\r\tindex = (pls + 2) ifTrue: [\"all are OK\" ^ #()].\r\tpairList isEmpty | (index = (pls + 1))  \"all need conversion, exit\"] whileFalse.\r\r\t^ pairClasses asSet asArray\t\"non redundant\"! !\r\r!ChangeSet methodsFor: 'fileIn/Out' stamp: 'tk 6/8/2001 11:12'!\raskRenames: renamed addTo: msgSet using: smart\r\t| list rec ans oldStruct newStruct |\r\t\"Go through the renamed classes.  Ask the user if it could be in a project.  Add a method in SmartRefStream, and a conversion method in the new class.\"\r\r\tlist _ OrderedCollection new.\r\trenamed do: [:cls |\r\t\trec _ changeRecords at: cls name.\r\t\trec priorName ifNotNil: [\r\t\t\tans _ PopUpMenu withCaption: 'You renamed class ', rec priorName, \r\t\t\t\t' to be ', rec thisName,\r\t\t\t\t'.\\Could an instance of ', rec priorName, \r\t\t\t\t' be in a project on someone''s disk?'\r\t\t\tchooseFrom: #('Yes, write code to convert those instances'\r\t\t\t\t'No, no instances are in projects').\r\t\t\tans = 1 ifTrue: [\r\t\t\t\t\toldStruct _ structures at: rec priorName ifAbsent: [nil].\r\t\t\t\t\tnewStruct _ (Array with: cls classVersion), (cls allInstVarNames).\r\t\t\t\t\toldStruct ifNotNil: [\r\t\t\t\t\t\tsmart writeConversionMethodIn: cls fromInstVars: oldStruct \r\t\t\t\t\t\t\t\tto: newStruct renamedFrom: rec priorName.\r\t\t\t\t\t\tsmart writeClassRename: cls name was: rec priorName.\r\t\t\t\t\t\tlist add: cls name, ' convertToCurrentVersion:refStream:']]\r\t\t\t\tifFalse: [structures removeKey: rec priorName ifAbsent: []]]].\r\tlist isEmpty ifTrue: [^ msgSet].\r\tmsgSet messageList ifNil: [msgSet initializeMessageList: list]\r\t\tifNotNil: [list do: [:item | msgSet addItem: item]].\r\t^ msgSet! !\r\r!ChangeSet methodsFor: 'fileIn/Out' stamp: 'di 9/11/1998 16:13'!\rassurePostscriptExists\r\t\"Make sure there is a StringHolder holding the postscript.  \"\r\r\t\"NOTE: FileIn recognizes the postscript by the line with Postscript: on it\"\r\tpostscript == nil ifTrue: [postscript _ StringHolder new contents: '\"Postscript:\rLeave the line above, and replace the rest of this comment by a useful one.\rExecutable statements should follow this comment, and should\rbe separated by periods, with no exclamation points (!!).\rBe sure to put any further comments in double-quotes, like this one.\"\r']! !\r\r!ChangeSet methodsFor: 'fileIn/Out' stamp: 'sw 4/7/1999 17:45'!\rassurePreambleExists\r\t\"Make sure there is a StringHolder holding the preamble; if it's found to have reverted to empty contents, put up the template\"\r\r\t(preamble == nil or: [preamble contents isEmptyOrNil])\r\t\tifTrue: [preamble _ StringHolder new contents: self preambleTemplate]! !\r\r!ChangeSet methodsFor: 'fileIn/Out' stamp: 'sd 4/16/2003 09:15'!\rcheckForAlienAuthorship\r\t\"Check to see if there are any methods in the receiver that have author initials other than that of the current author, and open a browser on all found\"\r\r\t| aList initials |\r\t(initials _ Utilities authorInitialsPerSe) ifNil: [^ self inform: 'No author initials set in this image'].\r\t(aList _ self methodsWithInitialsOtherThan: initials) size > 0\r\t\tifFalse:\r\t\t\t[^ self inform: 'All methods in \"', self name, '\"\rhave authoring stamps which start with \"', initials, '\"']\r\t\tifTrue:\r\t\t\t[self systemNavigation  browseMessageList: aList name: 'methods in \"', self name, '\" whose authoring stamps do not start with \"', initials, '\"']! !\r\r!ChangeSet methodsFor: 'fileIn/Out' stamp: 'sd 4/16/2003 09:16'!\rcheckForAnyAlienAuthorship\r\t\"Check to see if there are any versions of any methods in the receiver that have author initials other than that of the current author, and open a browser on all found\"\r\r\t| aList initials |\r\t(initials _ Utilities authorInitialsPerSe) ifNil: [^ self inform: 'No author initials set in this image'].\r\t(aList _ self methodsWithAnyInitialsOtherThan: initials) size > 0\r\t\tifFalse: [^ self inform: 'All versions of all methods in \"', self name, '\"\rhave authoring stamps which start with \"', initials, '\"']\r\t\tifTrue:\r\t\t\t[self systemNavigation  browseMessageList: aList name: 'methods in \"', self name, '\" with any authoring stamps not starting with \"', initials, '\"']! !\r\r!ChangeSet methodsFor: 'fileIn/Out' stamp: 'ssa 9/3/2008 10:51'!\rcheckForConversionMethods\r\t\"See if any conversion methods are needed\"\r\t| oldStruct newStruct tell choice list need\rsel renamed rec nn |\r\r\tPreferences conversionMethodsAtFileOut ifFalse: [^ self].\t\"Check preference\"\r\tstructures ifNil: [^ self].\r\r\tlist _ OrderedCollection new.\r\trenamed _ OrderedCollection new.\r\tself changedClasses do: [:class |\r\t\tneed _ (self atClass: class includes: #new) not.\r\t\tneed ifTrue: [\"Renamed classes.\"\r\t\t\t(self atClass: class includes: #rename) ifTrue: [\r\t\t\t\trec _ changeRecords at: class name.\r\t\t\t\trec priorName ifNotNil: [\r\t\t\t\t\t(structures includesKey: rec priorName) ifTrue: [\r\t\t\t\t\t\trenamed add: class.  need _ false]]]].\r\t\tneed ifTrue: [need _ (self atClass: class includes: #change)].\r\t\tneed ifTrue: [oldStruct _ structures at: class name \r\t\t\t\t\t\t\t\t\tifAbsent: [need _ false.  #()]].\r\t\tneed ifTrue: [\r\t\t\tnewStruct _ (Array with: class classVersion), (class allInstVarNames).\r\t\t\tneed _ (oldStruct ~= newStruct)].\r\t\tneed ifTrue: [sel _ #convertToCurrentVersion:refStream:.\r\t\t\t(#(add change) includes: (self atSelector: sel class: class)) ifFalse: [\r\t\t\t\tlist add: class]].\r\t\t].\r\r\tlist isEmpty & renamed isEmpty ifTrue: [^ self].\r\t\"Ask user if want to do this\"\r\ttell _ 'If there might be instances of ', (list asArray, renamed asArray) printString,\r\t\t'\\in a project (.pr file) on someone''s disk, \\please ask to write a conversion method.\\'\r\t\t\twithCRs,\r\t\t'After you edit the conversion method, you''ll need to fileOut again.\\' withCRs,\r\t\t'The preference conversionMethodsAtFileOut in category \"fileout\" controls this feature.'.\r\tchoice _ (PopUpMenu labels: \r'Write a conversion method by editing a prototype\rThese classes are not used in any object file.  fileOut my changes now.\rI''m too busy.  fileOut my changes now.\rDon''t ever ask again.  fileOut my changes now.') startUpWithCaption: tell. \r\tchoice = 4 ifTrue: [Preferences disable: #conversionMethodsAtFileOut].\r\tchoice = 2 ifTrue: [\"Don't consider this class again in the changeSet\"\r\t\t\tlist do: [:cls | structures removeKey: cls name ifAbsent: []].\r\t\t\trenamed do: [:cls | \r\t\t\t\tnn _ (changeRecords at: cls name) priorName.\r\t\t\t\tstructures removeKey: nn ifAbsent: []]].\r\tchoice ~= 1 ifTrue: [^ self].\t\"exit if choice 2,3,4\"\r\r\tself error:'No support for writing conversion methods in this stripped image'! !\r\r!ChangeSet methodsFor: 'fileIn/Out' stamp: 'di 3/26/2000 10:06'!\rcheckForSlips\r\t\"Return a collection of method refs with possible debugging code in them.\"\r\t| slips method |\r\tslips _ OrderedCollection new.\r\tself changedClasses do:\r\t\t[:aClass |\r\t\t(self methodChangesAtClass: aClass name) associationsDo: \r\t\t\t\t[:mAssoc | (#(remove addedThenRemoved) includes: mAssoc value) ifFalse:\r\t\t\t\t\t[method _ aClass compiledMethodAt: mAssoc key ifAbsent: [nil].\r\t\t\t\t\tmethod ifNotNil:\r\t\t\t\t\t\t[method hasReportableSlip\r\t\t\t\t\t\t\tifTrue: [slips add: aClass name , ' ' , mAssoc key]]]]].\r\t^ slips! !\r\r!ChangeSet methodsFor: 'fileIn/Out' stamp: 'sd 4/16/2003 09:16'!\rcheckForUnclassifiedMethods\r\t\"Open a message list browser on all methods in the current change set that have not been categorized,\"\r\r\t| aList |\r\t(aList _ self methodsWithoutClassifications) size > 0\r\t\tifFalse:\r\t\t\t[^ self inform: 'All methods in \"', self name, '\"\rare categorized.']\r\t\tifTrue:\r\t\t\t[self systemNavigation  browseMessageList: aList name: 'methods in \"', self name, '\" which have not been categorized']! !\r\r!ChangeSet methodsFor: 'fileIn/Out' stamp: 'sw 7/19/2002 20:21'!\rcheckForUncommentedClasses\r\t\"Check to see if any classes involved in this change set do not have class comments.  Open up a browser showing all such classes.\"\r\r\t| aList |\r\taList _ self changedClasses\r\t\tselect:\r\t\t\t[:aClass | aClass theNonMetaClass organization classComment isEmptyOrNil]\r\t\tthenCollect:\r\t\t\t[:aClass  | aClass theNonMetaClass name].\r\r\taList size > 0\r\t\tifFalse:\r\t\t\t[^ self inform: 'All classes involved in this change set have class comments']\r\t\tifTrue:\r\t\t\t[ClassListBrowser new initForClassesNamed: aList asSet asSortedArray title: 'Classes in Change Set ', self name, ': classes that lack class comments']! !\r\r!ChangeSet methodsFor: 'fileIn/Out' stamp: 'sd 4/16/2003 09:16'!\rcheckForUncommentedMethods\r\t| aList |\r\t\"Check to see if there are any methods in the receiver that have no comments, and open a browser on all found\"\r\r\t(aList _ self methodsWithoutComments) size > 0\r\t\tifFalse:\r\t\t\t[^ self inform: 'All methods in \"', self name, '\" have comments']\r\t\tifTrue:\r\t\t\t[self systemNavigation  browseMessageList: aList name: 'methods in \"', self name, '\" that lack comments']! !\r\r!ChangeSet methodsFor: 'fileIn/Out' stamp: 'sd 4/29/2003 20:19'!\rcheckForUnsentMessages\r\t\"Check the change set for unsent messages, and if any are found, open \r\tup a message-list browser on them\"\r\t| nameLine allChangedSelectors augList unsent |\r\tnameLine _ '\"' , self name , '\"'.\r\tallChangedSelectors _ Set new.\r\t(augList _ self changedMessageListAugmented)\r\t\tdo: [:each | each isValid\r\t\t\t\tifTrue: [allChangedSelectors add: each methodSymbol]].\r\tunsent _ self systemNavigation allUnSentMessagesIn: allChangedSelectors.\r\tunsent size = 0\r\t\tifTrue: [^ self inform: 'There are no unsent \rmessages in change set\r' , nameLine].\r\tself systemNavigation\r\t\tbrowseMessageList: (augList\r\t\t\t\tselect: [:each | unsent includes: each methodSymbol])\r\t\tname: 'Unsent messages in ' , nameLine! !\r\r!ChangeSet methodsFor: 'fileIn/Out' stamp: 'FBS 1/6/2004 16:59'!\rchooseSubjectPrefixForEmail\r\r\t| subjectIndex |\r\r\tsubjectIndex _\r\t\t(PopUpMenu labels: 'Bug fix [FIX]\\Enhancement [ENH]\\Goodie [GOODIE]\\Test suite [TEST]\\None of the above (will not be archived)' withCRs)\r\t\t\tstartUpWithCaption: 'What type of change set\\are you submitting to the list?' withCRs.\r\r\t^ #('[CS] ' '[FIX] ' '[ENH] ' '[GOODIE] ' '[TEST] ' '[CS] ') at: subjectIndex + 1! !\r\r!ChangeSet methodsFor: 'fileIn/Out' stamp: 'nk 10/15/2003 09:55'!\rdefaultChangeSetDirectory\r\t^self class defaultChangeSetDirectory! !\r\r!ChangeSet methodsFor: 'fileIn/Out' stamp: 'nk 1/4/2004 17:07'!\rfileOut\r\t\"File out the receiver, to a file whose name is a function of the  \r\tchange-set name and either of the date & time or chosen to have a  \r\tunique numeric tag, depending on the preference  \r\t'changeSetVersionNumbers'\"\r\t| file slips nameToUse |\r\tself checkForConversionMethods.\r\tChangeSet promptForDefaultChangeSetDirectoryIfNecessary.\r\tnameToUse := Preferences changeSetVersionNumbers\r\t\t\t\tifTrue: [self defaultChangeSetDirectory nextNameFor: self name extension: 'cs']\r\t\t\t\tifFalse: [(self name , FileDirectory dot , Utilities dateTimeSuffix , FileDirectory dot , 'cs') asFileName].\r\t(Preferences warningForMacOSFileNameLength\r\t\t\tand: [nameToUse size > 31])\r\t\tifTrue: [nameToUse := FillInTheBlank\r\t\t\t\t\t\trequest: (nameToUse , '\\has ' , nameToUse size asString , ' letters - too long for Mac OS.\\Suggested replacement is:') withCRs\r\t\t\t\t\t\tinitialAnswer: (nameToUse contractTo: 30).\r\t\t\tnameToUse = ''\r\t\t\t\tifTrue: [^ self]].\r\tCursor write\r\t\tshowWhile: [[file := self defaultChangeSetDirectory newFileNamed: nameToUse.\r\t\t\tfile header; timeStamp.\r\t\t\tself fileOutPreambleOn: file.\r\t\t\tself fileOutOn: file.\r\t\t\tself fileOutPostscriptOn: file.\r\t\t\tfile trailer]\r\t\t\t\tensure: [file close]].\r\tPreferences checkForSlips\r\t\tifFalse: [^ self].\r\tslips := self checkForSlips.\r\t(slips size > 0\r\t\t\tand: [(PopUpMenu withCaption: 'Methods in this fileOut have halts\ror references to the Transcript\ror other ''slips'' in them.\rWould you like to browse them?' chooseFrom: 'Ignore\\Browse slips')\r\t\t\t\t\t= 2])\r\t\tifTrue: [self systemNavigation browseMessageList: slips name: 'Possible slips in ' , name]! !\r\r!ChangeSet methodsFor: 'fileIn/Out' stamp: 'di 3/28/2000 09:35'!\rfileOutChangesFor: class on: stream \r\t\"Write out all the method changes for this class.\"\r\r\t| changes |\r\tchanges _ Set new.\r\t(self methodChangesAtClass: class name) associationsDo: \r\t\t[:mAssoc | (mAssoc value = #remove or: [mAssoc value = #addedThenRemoved])\r\t\t\tifFalse: [changes add: mAssoc key]].\r\tchanges isEmpty ifFalse: \r\t\t[class fileOutChangedMessages: changes on: stream.\r\t\tstream cr]! !\r\r!ChangeSet methodsFor: 'fileIn/Out' stamp: 'sw 5/23/2001 13:29'!\rfileOutOn: stream \r\t\"Write out all the changes the receiver knows about\"\r\r\t| classList |\r\t(self isEmpty and: [stream isKindOf: FileStream])\r\t\tifTrue: [self inform: 'Warning: no changes to file out'].\r\tclassList _ ChangeSet superclassOrder: self changedClasses asOrderedCollection.\r\r\t\"First put out rename, max classDef and comment changes.\"\r\tclassList do: [:aClass | self fileOutClassDefinition: aClass on: stream].\r\r\t\"Then put out all the method changes\"\r\tclassList do: [:aClass | self fileOutChangesFor: aClass on: stream].\r\r\t\"Finally put out removals, final class defs and reorganization if any\"\r\tclassList reverseDo: [:aClass | self fileOutPSFor: aClass on: stream].\r\r\tself classRemoves asSortedCollection do:\r\t\t[:aClassName | stream nextChunkPut: 'Smalltalk removeClassNamed: #', aClassName; cr].! !\r\r!ChangeSet methodsFor: 'fileIn/Out' stamp: 'di 5/8/2000 20:47'!\rfileOutPSFor: class on: stream \r\t\"Write out removals and initialization for this class.\"\r\r\t| dict changeType classRecord currentDef |\r\tclassRecord _ changeRecords at: class name ifAbsent: [^ self].\r\tdict _ classRecord methodChangeTypes.\r\tdict keysSortedSafely do:\r\t\t[:key | changeType _ dict at: key.\r\t\t(#(remove addedThenRemoved) includes: changeType)\r\t\t\tifTrue: [stream nextChunkPut: class name,\r\t\t\t\t\t\t' removeSelector: ', key storeString; cr]\r\t\t\tifFalse: [(key = #initialize and: [class isMeta]) ifTrue:\r\t\t\t\t\t\t[stream nextChunkPut: class soleInstance name, ' initialize'; cr]]].\r\t((classRecord includesChangeType: #change)\r\t\tand: [(currentDef _ class definition) ~= (self fatDefForClass: class)]) ifTrue:\r\t\t[stream command: 'H3'; nextChunkPut: currentDef; cr; command: '/H3'].\r\t(classRecord includesChangeType: #reorganize) ifTrue:\r\t\t[class fileOutOrganizationOn: stream.\r\t\tstream cr]! !\r\r!ChangeSet methodsFor: 'fileIn/Out' stamp: 'di 3/29/1999 13:35'!\rfileOutPostscriptOn: stream \r\t\"If the receiver has a postscript, put it out onto the stream.  \"\r\r\t| aString |\r\taString _ self postscriptString.\r\t(aString ~~ nil and: [aString size > 0])\r\t\tifTrue:\r\t\t\t[stream nextChunkPut: aString \"surroundedBySingleQuotes\".\r\t\t\tstream cr; cr]! !\r\r!ChangeSet methodsFor: 'fileIn/Out' stamp: 'di 3/29/1999 14:58'!\rfileOutPreambleOn: stream \r\t\"If the receiver has a preamble, put it out onto the stream.  \"\r\r\t| aString |\r\taString _ self preambleString.\r\t(aString ~~ nil and: [aString size > 0])\r\t\tifTrue:\r\t\t\t[stream nextChunkPut: aString \"surroundedBySingleQuotes\".\r\t\t\tstream cr; cr]! !\r\r!ChangeSet methodsFor: 'fileIn/Out' stamp: 'sd 4/16/2003 09:16'!\rlookForSlips\r\t\"Scan the receiver for changes that the user may regard as slips to be remedied\"\r\r\t| slips nameLine msg |\r\tnameLine _ '\r\"', self name, '\"\r'.\r\t(slips _ self checkForSlips) size == 0 ifTrue:\r\t\t[^ self inform: 'No slips detected in change set', nameLine].\r\r\tmsg _ slips size == 1\r\t\tifTrue:\r\t\t\t[ 'One method in change set', nameLine, \r'has a halt, reference to the Transcript,\rand/or some other ''slip'' in it.\rWould you like to browse it? ?']\r\t\tifFalse:\r\t\t\t[ slips size printString,\r' methods in change set', nameLine, 'have halts or references to the\rTranscript or other ''slips'' in them.\rWould you like to browse them?'].\r\r\t(PopUpMenu withCaption: msg chooseFrom: 'Ignore\\Browse slips') = 2\r\t\tifTrue: [self systemNavigation  browseMessageList: slips\r\t\t\t\t\t\t\tname: 'Possible slips in ', name]! !\r\r!ChangeSet methodsFor: 'fileIn/Out' stamp: 'sw 5/7/1998 12:16'!\rpostscriptString\r\t\"Answer the string representing the postscript.  \"\r\r\t^ postscript == nil\r\t\tifTrue:\r\t\t\t[postscript]\r\t\tifFalse:\r\t\t\t[postscript contents asString]! !\r\r!ChangeSet methodsFor: 'fileIn/Out' stamp: 'sw 11/27/96'!\rpostscriptString: aString\r\t\"Establish aString as the new contents of the postscript.  \"\r\r\tpostscript _ StringHolder new contents: aString! !\r\r!ChangeSet methodsFor: 'fileIn/Out' stamp: 'sw 5/7/1998 12:08'!\rpreambleString\r\t\"Answer the string representing the preamble\"\r\r\t^ preamble == nil\r\t\tifTrue:\r\t\t\t[preamble]\r\t\tifFalse:\r\t\t\t[preamble contents asString]! !\r\r!ChangeSet methodsFor: 'fileIn/Out' stamp: 'sw 11/27/96'!\rpreambleString: aString\r\t\"Establish aString as the new contents of the preamble.  \"\r\r\tpreamble _ StringHolder new contents: aString! !\r\r!ChangeSet methodsFor: 'fileIn/Out' stamp: 'nk 7/2/2003 10:47'!\rpreambleTemplate\r\t\"Answer a string that will form the default contents for a change set's preamble.\r\tJust a first stab at what the content should be.\"\r\r\t^ String streamContents: [:strm |\r\t\tstrm nextPutAll: '\"Change Set:'.  \"NOTE: fileIn recognizes preambles by this string.\"\r\t\tstrm tab;tab; nextPutAll: self name.\r\t\tstrm cr; nextPutAll: 'Date:'; tab; tab; tab; nextPutAll: Date today printString.\r\t\tstrm cr; nextPutAll: 'Author:'; tab; tab; tab; nextPutAll: Preferences defaultAuthorName.\r\t\tstrm cr; cr; nextPutAll: '<your descriptive text goes here>\"']\r\"ChangeSet current preambleTemplate\"! !\r\r!ChangeSet methodsFor: 'fileIn/Out' stamp: 'sw 3/30/2001 13:47'!\rsetPreambleToSay: aString\r\t\"Make aString become the preamble of this change set\"\r\r\tpreamble _ StringHolder new contents: aString! !\r\r!ChangeSet methodsFor: 'fileIn/Out' stamp: 'di 9/24/1999 12:33'!\rsummaryString\r\t\"Answer the string summarizing this changeSet\"\r\r\t^ self summaryStringDelta: 0\r\"\rTo summarize all recent changeSets on a file...\r(FileStream newFileNamed: 'Summaries.txt') nextPutAll:\r\t(String streamContents:\r\t\t[:s | (ChangeSorter changeSetsNamedSuchThat:\r\t\t\t[:name | name first isDigit and: [name initialIntegerOrNil >= 948]])\r\t\t\t do: [:cs | s nextPutAll: cs summaryString; cr]]);\r\t\tclose\r\rTo list all changeSets with a certain string in the preamble...\r\t(FileStream newFileNamed: 'MyUpdates.txt') nextPutAll:\r\t\t(String streamContents:\r\t\t\t[:s | ChangeSorter gatherChangeSetRevertables do:\r\t\t\t\t[:cs | (cs preambleString notNil\r\t\t\t\t\tand: [cs preambleString includesSubString: 'Author Name'])\r\t\t\t\t \tifTrue: [s nextPutAll: cs summaryString; cr]]]);\r\t\tclose\r\"! !\r\r!ChangeSet methodsFor: 'fileIn/Out' stamp: 'di 9/24/1999 12:27'!\rsummaryStringDelta: delta\r\t\"Answer the string summarizing this changeSet\"\r\t| ps s2 date author line intName |\r\t^ String streamContents:\r\t\t[:s |\r\t\tintName _ self name splitInteger.\r\t\tintName first isNumber\r\t\t\tifTrue: [s nextPutAll: (intName first + delta) printString , intName last]\r\t\t\tifFalse: [s nextPutAll: intName first  \"weird convention of splitInteger\"].\r\t\t(ps _ self preambleString)\r\t\t\tifNil: [s cr]\r\t\t\tifNotNil:\r\t\t\t[s2 _ ReadStream on: ps.\r\t\t\ts2 match: 'Date:'; skipSeparators.  date _ s2 upTo: Character cr.\r\t\t\ts2 match: 'Author:'; skipSeparators.  author _ s2 upTo: Character cr.\r\t\t\ts nextPutAll: ' -- '; nextPutAll: author; nextPutAll: ' -- '; nextPutAll: date; cr.\r\t\t\t[s2 atEnd] whileFalse:\r\t\t\t\t[line _ s2 upTo: Character cr.\r\t\t\t\t(line isEmpty or: [line = '\"']) ifFalse: [s nextPutAll: line; cr]]]].\r! !\r\r!ChangeSet methodsFor: 'fileIn/Out' stamp: 'sd 1/16/2004 21:31'!\rverboseFileOut\r\t\"File out the receiver, to a file whose name is a function of the change-set name and either of the date & time or chosen to have a unique numeric tag, depending on the preference 'changeSetVersionNumbers'\"\r\r\tChangeSet current fileOut.\r\tTranscript cr; show: 'Changes filed out ', Date dateAndTimeNow printString! !\r\r\r!ChangeSet methodsFor: 'private' stamp: 'di 3/23/2000 08:37'!\raddCoherency: className\r\t\"SqR!! 19980923: If I recreate the class then don't remove it\"\r\r\t(self changeRecorderFor: className)\r\t\tcheckCoherence.\r\"\r\tclassRemoves remove: className ifAbsent: [].\r\t(classChanges includesKey: className) ifTrue:\r\t\t[(classChanges at: className) remove: #remove ifAbsent: []]\r\"! !\r\r!ChangeSet methodsFor: 'private' stamp: 'di 3/28/2000 14:40'!\ratClass: class add: changeType\r\r\t(self changeRecorderFor: class)\r\t\tnoteChangeType: changeType fromClass: class! !\r\r!ChangeSet methodsFor: 'private' stamp: 'di 4/1/2000 12:00'!\ratClass: class includes: changeType\r\r\t^(changeRecords at: class name ifAbsent: [^false])\r\t\tincludesChangeType: changeType! !\r\r!ChangeSet methodsFor: 'private' stamp: 'di 4/1/2000 12:00'!\ratSelector: selector class: class\r\r\t^ (changeRecords at: class name ifAbsent: [^ #none])\r\t\tatSelector: selector ifAbsent: [^ #none]! !\r\r!ChangeSet methodsFor: 'private' stamp: 'di 3/29/2000 20:46'!\rchangeRecorderFor: class\r\r\t| cname |\r\t(class isKindOf: String)\r\t\tifTrue: [ cname _ class ]\r\t\tifFalse: [ cname _ class name ].\r\r\t\"Later this will init the changeRecords so according to whether they should be revertable.\"\r\t^ changeRecords at: cname\r\t\t\tifAbsent: [^ changeRecords at: cname\r\t\t\t\t\t\t\tput: (ClassChangeRecord new initFor: cname revertable: revertable)]! !\r\r!ChangeSet methodsFor: 'private' stamp: 'ssa 9/3/2008 10:28'!\rfileOutClassDefinition: class on: stream \r\t\"Write out class definition for the given class on the given stream, if the class definition was added or changed.\"\r\r\t(self atClass: class includes: #rename) ifTrue:\r\t\t[stream nextChunkPut: 'Smalltalk renameClassNamed: #', (self oldNameFor: class), ' as: #', class name; cr].\r\r\t(self atClass: class includes: #change) ifTrue: [ \"fat definition only needed for changes\"\r\t\tstream command: 'H3'; nextChunkPut: (self fatDefForClass: class); cr; command: '/H3'.\r\t\t\r\t] ifFalse: [\r\t\t(self atClass: class includes: #add) ifTrue: [ \"use current definition for add\"\r\t\t\tstream command: 'H3'; nextChunkPut: class definition; cr; command: '/H3'.\r\t\t\r\t\t].\r\t].\r\r\t(self atClass: class includes: #comment) ifTrue:\r\t\t[class theNonMetaClass organization putCommentOnFile: stream numbered: 0 moveSource: false forClass: class theNonMetaClass.\r\t\tstream cr].\r\r! !\r\r!ChangeSet methodsFor: 'private' stamp: 'di 4/1/2000 12:00'!\roldNameFor: class\r\r\t^ (changeRecords at: class name) priorName! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rChangeSet class\r\tinstanceVariableNames: 'current'!\r\r!ChangeSet class methodsFor: 'current changeset' stamp: 'sd 5/22/2003 19:59'!\rbrowseChangedMessages\r\t\"Create and schedule a message browser on each method that has been \r\tchanged.\"\r\r\tcurrent isEmpty ifTrue: [^ self inform: 'There are no changed messages\rin the current change set.'].\r\tChangedMessageSet openFor: current! !\r\r!ChangeSet class methodsFor: 'current changeset' stamp: 'sd 5/22/2003 21:53'!\rcurrent\r\t\"return the current changeset\"\r\r\t^ current! !\r\r!ChangeSet class methodsFor: 'current changeset' stamp: 'sd 5/22/2003 22:24'!\rcurrentChangeSetString\r\t\"ChangeSet current currentChangeSetString\"\r\r\t^ 'Current Change Set: ', self current name! !\r\r!ChangeSet class methodsFor: 'current changeset' stamp: 'NS 1/16/2004 14:49'!\rnewChanges: aChangeSet \r\t\"Set the system ChangeSet to be the argument, aChangeSet.  Tell the current project that aChangeSet is now its change set.  When called from Project enter:, the setChangeSet: call is redundant but harmless; when called from code that changes the current-change-set from within a project, it's vital\"\r\r\tSystemChangeNotifier uniqueInstance noMoreNotificationsFor: current.\r\tcurrent isolationSet: nil.\r\tcurrent _ aChangeSet.\r\tSystemChangeNotifier uniqueInstance notify: aChangeSet ofAllSystemChangesUsing: #event:.\r\tSmalltalk currentProjectDo:\r\t\t[:proj |\r\t\tproj setChangeSet: aChangeSet.\r\t\taChangeSet isolationSet: proj isolationSet]! !\r\r!ChangeSet class methodsFor: 'current changeset' stamp: 'sd 5/22/2003 22:18'!\rnoChanges \r\t\"Initialize the system ChangeSet.\"\r\r\tcurrent initialize! !\r\r\r!ChangeSet class methodsFor: 'defaults' stamp: 'nk 7/18/2004 16:13'!\rdefaultChangeSetDirectory\r\t\"Answer the directory in which to store ChangeSets. \r\tAnswer the default directory if the preferred directory doesn't exist.\"\r\t| dir directoryName |\r\tdirectoryName := Preferences\r\t\t\t\tparameterAt: #defaultChangeSetDirectoryName\r\t\t\t\tifAbsentPut: [''].\r\tdir := directoryName isEmptyOrNil\r\t\tifTrue: [ FileDirectory default ]\r\t\tifFalse: [ FileDirectory default directoryNamed: directoryName ].\r\tdir exists\r\t\tifTrue: [^ dir].\r\t^ FileDirectory default! !\r\r!ChangeSet class methodsFor: 'defaults' stamp: 'nk 3/24/2004 15:52'!\rdefaultChangeSetDirectory: dirOrName \r\t\"Set the Preference for storing change sets to the given directory or name (possibly relative).\r\tRewrite directory names below the default directory as relative names.\r\tIf dirOrName is an empty string, use the default directory.\"\r\r\t\"ChangeSet defaultChangeSetDirectory: 'changeSets'\"\r\r\t| dirName defaultFullName |\r\tdirName := dirOrName isString\r\t\t\t\tifTrue: [FileDirectory default fullNameFor: dirOrName]\r\t\t\t\tifFalse: [dirOrName fullName].\r\tdefaultFullName := FileDirectory default fullName.\r\tdirName = defaultFullName\r\t\tifTrue: [dirName := '']\r\t\tifFalse: [(dirName beginsWith: defaultFullName , FileDirectory slash)\r\t\t\t\tifTrue: [dirName := dirName copyFrom: defaultFullName size + 2 to: dirName size]].\r\tPreferences setParameter: #defaultChangeSetDirectoryName to: dirName! !\r\r!ChangeSet class methodsFor: 'defaults' stamp: 'dgd 9/6/2003 19:56'!\rdefaultName\r\t^ self uniqueNameLike: 'Unnamed' translated! !\r\r!ChangeSet class methodsFor: 'defaults' stamp: 'BG 8/18/2004 15:19'!\rpromptForDefaultChangeSetDirectoryIfNecessary\r\t\"Check the Preference (if any), and prompt the user to change it if necessary.\r\tThe default if the Preference is unset is the current directory.\r\tAnswer the directory.\"\r\r\t\"ChangeSet promptForDefaultChangeSetDirectoryIfNecessary\"\r\t| choice directoryName dir |\r\tdirectoryName := Preferences\r\t\t\t\tparameterAt: #defaultChangeSetDirectoryName\r\t\t\t\tifAbsentPut: [''].\r\t[dir := FileDirectory default directoryNamed: directoryName.\r\tdir exists]\r\t\twhileFalse: [choice := PopUpMenu withCaption: \r\t\t\t('The preferred change set directory (''{1}'') does not exist.\rCreate it or use the default directory ({2})?' translated format: { directoryName. FileDirectory default pathName })\r\tchooseFrom: (#('Create directory' 'Use default directory and forget preference' 'Choose another directory' ) collect: [ :ea | ea translated ]).\r\t\t\tchoice = 1\r\t\t\t\tifTrue: [dir assureExistence ].\r\t\t\tchoice = 3\r\t\t\t\tifTrue: [dir := FileList modalFolderSelector.\r\t\t\t\t\tdirectoryName := dir\r\t\t\t\t\tifNil: [ '' ]\r\t\t\t\t\t\tifNotNil: [dir pathName ]]].\r\t\tself defaultChangeSetDirectory: directoryName.\r\t\t^dir! !\r\r!ChangeSet class methodsFor: 'defaults' stamp: 'di 4/5/2001 21:31'!\runiqueNameLike: aString\r\r\t| try |\r\t1 to: 999999 do:\r\t\t[:i | try _ aString , i printString.\r\t\t(ChangeSorter changeSetNamed: try) ifNil: [^ try]]! !\r\r\r!ChangeSet class methodsFor: 'fileIn/Out' stamp: 'SqR 11/14/2000 11:36'!\rdoWeFileOut: aClass given: aSet cache: cache\r\t| aClassAllSuperclasses aClassSoleInstanceAllSuperclasses |\r\r\taClassAllSuperclasses _ cache at: aClass\r\t\tifAbsent: [cache at: aClass put: aClass allSuperclasses asArray].\r\t(aSet includesAnyOf: aClassAllSuperclasses) ifTrue: [^false].\r\taClass isMeta ifFalse: [^true].\r\t(aSet includes: aClass soleInstance) ifTrue: [^false].\r\taClassSoleInstanceAllSuperclasses _ cache at: aClass soleInstance\r\t\tifAbsent: [cache at: aClass soleInstance put: aClass soleInstance allSuperclasses asArray].\r\t(aSet includesAnyOf: aClassSoleInstanceAllSuperclasses) ifTrue: [^false].\r\t^true! !\r\r!ChangeSet class methodsFor: 'fileIn/Out' stamp: 'SqR 11/14/2000 11:37'!\rsuperclassOrder: classes\r\t\"Arrange the classes in the collection, classes, in superclass order so the \r\tclasses can be properly filed in. Do it in sets instead of ordered collections.\r\tSqR 4/12/2000 22:04\"\r\r\t| all list aClass inclusionSet aClassIndex cache |\r\r\tlist _ classes copy. \"list is indexable\"\r\tinclusionSet _ list asSet. cache _ Dictionary new.\r\tall _ OrderedCollection new: list size.\r\tlist size timesRepeat:\r\t\t[\r\t\t\taClassIndex _ list findFirst: [:one | one isNil not and: \r\t\t\t\t[self doWeFileOut: one given: inclusionSet cache: cache]].\r\t\t\taClass _ list at: aClassIndex.\r\t\t\tall addLast: aClass.\r\t\t\tinclusionSet remove: aClass.\r\t\t\tlist at: aClassIndex put: nil\r\t\t].\r\t^all! !\r\r\r!ChangeSet class methodsFor: 'instance creation' stamp: 'di 4/6/2001 09:43'!\rbasicNewNamed: aName\r\r\t^ (self basicNew name: aName) initialize! !\r\r!ChangeSet class methodsFor: 'instance creation' stamp: 'di 4/6/2001 10:02'!\rnew\r\t\"All current changeSets must be registered in the AllChangeSets collection.\r\tDue to a quirk of history, this is maintained as class variable of ChangeSorter.\"\r\r\t^ ChangeSorter basicNewChangeSet: ChangeSet defaultName! !\rChangeSorter subclass: #ChangeSetBrowser\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Changes'!\r!ChangeSetBrowser commentStamp: '<historical>' prior: 0!\rA tool allowing you to browse the methods of a single change set.!\r\r\r!ChangeSetBrowser methodsFor: 'initialization' stamp: 'BG 10/28/2003 20:47'!\raddModelItemsToWindowMenu: aMenu\r\t\"Add model-related items to the given window menu\"\r\r\t| oldTarget |\r\toldTarget _ aMenu defaultTarget.\r\taMenu defaultTarget: self.\r\taMenu addLine.\r\taMenu add: 'rename change set' action: #rename.\r\taMenu add: 'make changes go to me' action: #newCurrent.\r\taMenu addLine.\r\taMenu add: 'file out' action: #fileOut.\r\taMenu add: 'browse methods' action: #browseChangeSet.\r\taMenu addLine.\r\tmyChangeSet hasPreamble\r\t\tifTrue:\r\t\t\t[aMenu add: 'edit preamble' action: #addPreamble.\r\t\t\taMenu add: 'remove preamble' action: #removePreamble]\r\t\tifFalse:\r\t\t\t[aMenu add: 'add preamble' action: #addPreamble].\r\r\tmyChangeSet hasPostscript\r\t\tifTrue:\r\t\t\t[aMenu add: 'edit postscript...' action: #editPostscript.\r\t\t\taMenu add: 'remove postscript' action: #removePostscript]\r\t\tifFalse:\r\t\t\t[aMenu add: 'add postscript...' action: #editPostscript].\r\taMenu addLine.\r\t\r\taMenu add: 'destroy change set' action: #remove.\r\taMenu addLine.\r\t\r\taMenu addLine.\r\taMenu add: 'more...' action: #offerShiftedChangeSetMenu.\r\taMenu defaultTarget: oldTarget.\r\r\t^ aMenu! !\r\r!ChangeSetBrowser methodsFor: 'initialization' stamp: 'sw 3/14/2001 10:03'!\rwantsAnnotationPane\r\t\"This kind of browser always wants annotation panes, so answer true\"\r\r\t^ true! !\r\r!ChangeSetBrowser methodsFor: 'initialization' stamp: 'sw 3/9/2001 15:02'!\rwantsOptionalButtons\r\t\"Sure, why not?\"\r\r\t^ true! !\r\r\r!ChangeSetBrowser methodsFor: 'menu' stamp: 'sw 3/12/2001 14:07'!\rofferUnshiftedChangeSetMenu\r\t\"The user chose 'more' from the shifted window menu; go back to the regular window menu\"\r\r\tself containingWindow ifNotNil: [self containingWindow offerWindowMenu] ! !\r\r!ChangeSetBrowser methodsFor: 'menu' stamp: 'BG 10/28/2003 20:47'!\rshiftedChangeSetMenu: aMenu\r\t\"Set up aMenu to hold items relating to the change-set-list pane when the shift key is down\"\r\r\r\taMenu add: 'conflicts with other change sets' action: #browseMethodConflicts.\r\taMenu balloonTextForLastItem: \r'Browse all methods that occur both in this change set and in at least one other change set.'.\r\r\taMenu addLine.\r\taMenu add: 'check for slips' action: #lookForSlips.\r\taMenu balloonTextForLastItem: \r'Check this change set for halts and references to Transcript.'.\r\r\taMenu add: 'check for unsent messages' action: #checkForUnsentMessages.\r\taMenu balloonTextForLastItem:\r'Check this change set for messages that are not sent anywhere in the system'.\r\r\taMenu add: 'check for uncommented methods' action: #checkForUncommentedMethods.\r\taMenu balloonTextForLastItem:\r'Check this change set for methods that do not have comments'.\r\r\taMenu add: 'check for uncommented classes' action: #checkForUncommentedClasses.\r\taMenu balloonTextForLastItem:\r'Check for classes with code in this changeset which lack class comments'.\r\r\r\tUtilities authorInitialsPerSe isEmptyOrNil ifFalse:\r\t\t[aMenu add: 'check for other authors' action: #checkForAlienAuthorship.\r\t\taMenu balloonTextForLastItem:\r'Check this change set for methods whose current authoring stamp does not start with \"', Utilities authorInitials, '\"'.\r\r\t\taMenu add: 'check for any other authors' action: #checkForAnyAlienAuthorship.\r\t\taMenu balloonTextForLastItem:\r'Check this change set for methods any of whose previous authoring stamps do not start with \"', Utilities authorInitials, '\"'].\r\r\taMenu add: 'check for uncategorized methods' action: #checkForUnclassifiedMethods.\r\taMenu balloonTextForLastItem:\r'Check to see if any methods in the selected change set have not yet been assigned to a category.  If any are found, open a browser on them.'.\r\taMenu addLine.\r\r\taMenu add: 'inspect change set' action: #inspectChangeSet.\r\taMenu balloonTextForLastItem: \r'Open an inspector on this change set. (There are some details in a change set which you don''t see in a change sorter.)'.\r\r\taMenu add: 'update' action: #update.\r\taMenu balloonTextForLastItem: \r'Update the display for this change set.  (This is done automatically when you activate this window, so is seldom needed.)'.\r\r\taMenu add: 'go to change set''s project' action: #goToChangeSetsProject.\r\taMenu balloonTextForLastItem: \r'If this change set is currently associated with a Project, go to that project right now.'.\r\r\taMenu add: 'trim history' action: #trimHistory.\r\taMenu balloonTextForLastItem: \r' Drops any methods added and then removed, as well as renaming and reorganization of newly-added classes.  NOTE: can cause confusion if later filed in over an earlier version of these changes'.\r\r\taMenu add: 'clear this change set' action: #clearChangeSet.\r\taMenu balloonTextForLastItem: \r'Reset this change set to a pristine state where it holds no information. CAUTION: this is destructive and irreversible!!'.\r\taMenu add: 'expunge uniclasses' action: #expungeUniclasses.\r\taMenu balloonTextForLastItem:\r'Remove from the change set all memory of uniclasses, e.g. classes added on behalf of etoys, fabrik, etc., whose classnames end with a digit.'.\r\r\taMenu add: 'uninstall this change set' action: #uninstallChangeSet.\r\taMenu balloonTextForLastItem: \r'Attempt to uninstall this change set. CAUTION: this may not work completely and is irreversible!!'.\r\r\taMenu addLine.\r\r\taMenu add: 'more...' action: #offerUnshiftedChangeSetMenu.\r\taMenu balloonTextForLastItem: \r'Takes you back to the primary change-set menu.'.\r\r\t^ aMenu! !\rElementCategory subclass: #ChangeSetCategory\r\tinstanceVariableNames: 'membershipSelector'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Changes'!\r!ChangeSetCategory commentStamp: '<historical>' prior: 0!\rA ChangeSetCategory represents a list of change sets to be shown in a ChangeSorter.  It computes whether a given change set is in the list by sending its membershipSelector to ChangeSorter (i.e. the class object) with the change set as message argument.!\r\r\r!ChangeSetCategory methodsFor: 'initialization' stamp: 'sw 3/30/2001 12:35'!\rmembershipSelector: aSelector\r\t\"Set the membershipSelector\"\r\r\tmembershipSelector _ aSelector! !\r\r\r!ChangeSetCategory methodsFor: 'queries' stamp: 'sw 4/11/2001 16:11'!\racceptsManualAdditions\r\t\"Answer whether the user is allowed manually to manipulate the contents of the change-set-category.\"\r\r\t^ false! !\r\r!ChangeSetCategory methodsFor: 'queries' stamp: 'sw 3/30/2001 14:39'!\rchangeSetList\r\t\"Answer the list of change-set names in the category\"\r\r\t| aChangeSet |\r\tself reconstituteList.\r\tkeysInOrder size == 0 ifTrue:\r\t\t[\"don't tolerate emptiness, because ChangeSorters gag when they have no change-set selected\"\r\t\taChangeSet _ ChangeSorter assuredChangeSetNamed: 'New Changes'.\r\t\tself elementAt: aChangeSet name put: aChangeSet].\r\t^ keysInOrder reversed! !\r\r!ChangeSetCategory methodsFor: 'queries' stamp: 'sw 4/5/2001 17:26'!\rhasChangeForClassName: aClassName selector: aSelector otherThanIn: excludedChangeSet\r\t\"Answer whether any change set in this category, other than the excluded one, has a change marked for the given class and selector\"\r\r\tself elementsInOrder do:\r\t\t[:aChangeSet |\r\t\t\t(aChangeSet ~~ excludedChangeSet and:\r\t\t\t\t[((aChangeSet methodChangesAtClass: aClassName) includesKey: aSelector)]) ifTrue:\t[^ true]].\r\r\t^ false! !\r\r!ChangeSetCategory methodsFor: 'queries' stamp: 'sw 3/30/2001 14:04'!\rincludesChangeSet: aChangeSet\r\t\"Answer whether the receiver includes aChangeSet in its retrieval list\"\r\r\t^ ChangeSorter perform: membershipSelector with: aChangeSet! !\r\r\r!ChangeSetCategory methodsFor: 'services' stamp: 'sd 1/16/2004 21:37'!\rfileOutAllChangeSets\r\t\"File out all the nonempty change sets in the current category, suppressing the checks for slips that might otherwise ensue.  Obtain user confirmation before undertaking this possibly prodigious task.\"\r\r\t| aList |\r\taList _ self elementsInOrder select:\r\t\t[:aChangeSet  | aChangeSet isEmpty not].\r\taList size == 0 ifTrue: [^ self inform: 'sorry, all the change sets in this category are empty'].\r\t(self confirm: 'This will result in filing out ', aList size printString, ' change set(s)\rAre you certain you want to do this?') ifFalse: [^ self].\r\r\tPreferences setFlag: #checkForSlips toValue: false during: \r\t\t[ChangeSorter fileOutChangeSetsNamed: (aList collect: [:m | m name]) asSortedArray]! !\r\r!ChangeSetCategory methodsFor: 'services' stamp: 'BG 10/28/2003 20:38'!\rfillAggregateChangeSet\r\t\"Create a change-set named Aggregate and pour into it all the changes in all the change-sets of the currently-selected category\"\r\r\t| aggChangeSet |\r\taggChangeSet _  ChangeSorter assuredChangeSetNamed: #Aggregate.\r\taggChangeSet clear.\r\taggChangeSet setPreambleToSay: '\"Change Set:\t\tAggregate\rCreated at ', Time now printString, ' on ', Date today printString, ' by combining all the changes in all the change sets in the category ', categoryName printString, '\"'.\r\r\t(self elementsInOrder copyWithout: aggChangeSet) do:\r\t\t[:aChangeSet  | aggChangeSet assimilateAllChangesFoundIn: aChangeSet].\r! !\r\r\r!ChangeSetCategory methodsFor: 'miscellaneous' stamp: 'sd 5/23/2003 14:25'!\rdefaultChangeSetToShow\r\t\"Answer the name of a change-set to show\"\r\r\t^ ChangeSet current! !\r\r!ChangeSetCategory methodsFor: 'miscellaneous' stamp: 'di 4/6/2001 10:37'!\rreconstituteList\r\t\"Clear out the receiver's elements and rebuild them\"\r\r\t| newMembers |\r\t\"First determine newMembers and check if they have not changed...\"\r\tnewMembers _ ChangeSorter allChangeSets select:\r\t\t[:aChangeSet | ChangeSorter perform: membershipSelector with: aChangeSet].\r\t(newMembers collect: [:cs | cs name]) = keysInOrder ifTrue: [^ self  \"all current\"].\r\r\t\"Things have changed.  Need to recompute the whole category\"\r\tself clear.\r\tnewMembers do:\r\t\t[:aChangeSet | self fasterElementAt: aChangeSet name asSymbol put: aChangeSet] \r! !\rChangeSetCategory subclass: #ChangeSetCategoryWithParameters\r\tinstanceVariableNames: 'parameters'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Changes'!\r\r!ChangeSetCategoryWithParameters methodsFor: 'as yet unclassified' stamp: 'nk 6/26/2002 12:34'!\racceptsManualAdditions\r\t\"Answer whether the user is allowed manually to manipulate the contents of the change-set-category.\"\r\r\t^ true! !\r\r!ChangeSetCategoryWithParameters methodsFor: 'as yet unclassified' stamp: 'nk 6/26/2002 12:43'!\raddChangeSet: aChangeSet\r\tself inform: 'sorry, you can''t do that'! !\r\r!ChangeSetCategoryWithParameters methodsFor: 'as yet unclassified' stamp: 'nk 6/26/2002 12:08'!\rincludesChangeSet: aChangeSet\r\t\"Answer whether the receiver includes aChangeSet in its retrieval list\"\r\r\t^ ChangeSorter perform: membershipSelector withArguments: { aChangeSet } , parameters! !\r\r!ChangeSetCategoryWithParameters methodsFor: 'as yet unclassified' stamp: 'nk 6/26/2002 12:04'!\rparameters: anArray\r\tparameters _ anArray! !\r\r!ChangeSetCategoryWithParameters methodsFor: 'as yet unclassified' stamp: 'nk 6/26/2002 12:16'!\rreconstituteList\r\t\"Clear out the receiver's elements and rebuild them\"\r\r\t| newMembers |\r\t\"First determine newMembers and check if they have not changed...\"\r\tnewMembers _ ChangeSorter allChangeSets select:\r\t\t[:aChangeSet | ChangeSorter perform: membershipSelector withArguments: { aChangeSet }, parameters].\r\t(newMembers collect: [:cs | cs name]) = keysInOrder ifTrue: [^ self  \"all current\"].\r\r\t\"Things have changed.  Need to recompute the whole category\"\r\tself clear.\r\tnewMembers do:\r\t\t[:aChangeSet | self fasterElementAt: aChangeSet name asSymbol put: aChangeSet]! !\rCodeHolder subclass: #ChangeSorter\r\tinstanceVariableNames: 'parent myChangeSet currentClassName currentSelector priorChangeSetList changeSetCategory'\r\tclassVariableNames: 'AllChangeSets ChangeSetCategories ChangeSetNamesInRelease PreviousSet RecentUpdateMarker'\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Changes'!\r!ChangeSorter commentStamp: '<historical>' prior: 0!\rI display a ChangeSet.  Two of me are in a DualChangeSorter.!\r\r\r!ChangeSorter methodsFor: 'creation' stamp: 'BG 11/26/2003 14:18'!\ropen\r\t\"ChangeSorterPluggable new open\"\r\t| topView |\r\r\ttopView _ StandardSystemView new.\r\ttopView model: self.\r\tmyChangeSet ifNil: [self myChangeSet: ChangeSet current]. \r\ttopView label: self labelString.\r\ttopView borderWidth: 1; minimumSize: 360@360.\r\tself openView: topView offsetBy: 0@0.\r\ttopView controller open.\r! !\r\r!ChangeSorter methodsFor: 'creation' stamp: 'sw 2/26/2001 12:00'!\ropenView: topView offsetBy: offset\r\t\"Add a set of change sorter views to the given top view offset by the given amount. To create a single change sorter, call this once with an offset of 0@0. To create a dual change sorter, call it twice with offsets of 0@0 and 360@0.\"\r\r\t| classView messageView codeView cngSetListView basePane annoPane annoHeight |\r\tcontents _ ''.\r\tannoHeight _ 20.\r\tself addDependent: topView. \"so it will get changed: #relabel\"\r\r\tcngSetListView _ PluggableListViewByItem on: self\r\t\tlist: #changeSetList\r\t\tselected: #currentCngSet\r\t\tchangeSelected: #showChangeSetNamed:\r\t\tmenu: #changeSetMenu:shifted:\r\t\tkeystroke: #changeSetListKey:from:.\r\tcngSetListView window: ((0@0 extent: 180@100) translateBy: offset).\r\ttopView addSubView: cngSetListView.\r\r\tclassView _ PluggableListViewByItem on: self\r\t\tlist: #classList\r\t\tselected: #currentClassName\r\t\tchangeSelected: #currentClassName:\r\t\tmenu: #classListMenu:shifted:\r\t\tkeystroke: #classListKey:from:.\r\tclassView window: ((0@0 extent: 180@100) translateBy: offset).\r\ttopView addSubView: classView toRightOf: cngSetListView.\r\r\tmessageView _ PluggableListViewByItem on: self\r\t\tlist: #messageList\r\t\tselected: #currentSelector\r\t\tchangeSelected: #currentSelector:\r\t\tmenu: #messageMenu:shifted:\r\t\tkeystroke: #messageListKey:from:.\r\tmessageView menuTitleSelector: #messageListSelectorTitle.\r\tmessageView window: ((0@0 extent: 360@100) translateBy: offset).\r\ttopView addSubView: messageView below: cngSetListView.\r\r\t self wantsAnnotationPane\r\t\tifFalse:\r\t\t\t[basePane _ messageView]\r\t\tifTrue:\r\t\t\t[annoPane _ PluggableTextView on: self\r\t\t\t\ttext: #annotation\r\t\t\t\taccept: nil\r\t\t\t\treadSelection: nil\r\t\t\t\tmenu: nil.\r\t\t\tannoPane window: ((0@0 extent: 360@annoHeight) translateBy: offset).\r\t\t\ttopView addSubView: annoPane below: messageView.\r\t\t\tbasePane _ annoPane].\r\r\tcodeView _ PluggableTextView on: self \r\t\ttext: #contents\r\t\taccept: #contents:notifying:\r\t\treadSelection: #contentsSelection\r\t\tmenu: #codePaneMenu:shifted:.\r\tcodeView window: ((0 @ 0 extent: 360 @ 180) translateBy: offset).\r\ttopView addSubView: codeView below: basePane.! !\r\r!ChangeSorter methodsFor: 'creation' stamp: 'sw 3/29/2001 14:46'!\rsetDefaultChangeSetCategory\r\t\"Set a default ChangeSetCategory for the receiver, and answer it\"\r\r\t^ changeSetCategory _ self class changeSetCategoryNamed: #All! !\r\r!ChangeSorter methodsFor: 'creation' stamp: 'tk 12/7/1999 12:53'!\rveryDeepFixupWith: deepCopier\r\r\tsuper veryDeepFixupWith: deepCopier.\r\tparent _ deepCopier references at: parent ifAbsent: [parent].\r\tself updateIfNecessary! !\r\r!ChangeSorter methodsFor: 'creation' stamp: 'sw 3/29/2001 13:01'!\rveryDeepInner: deepCopier\r\t\"Copy all of my instance variables.  Some need to be not copied at all, but shared.\"\r\rsuper veryDeepInner: deepCopier.\r\"parent _ parent.\t\tWeakly copied\"\r\"myChangeSet _ myChangeSet.\t\tWeakly copied\"\rcurrentClassName _ currentClassName veryDeepCopyWith: deepCopier.\r\"currentSelector _ currentSelector.\t\tSymbol\"\rpriorChangeSetList _ priorChangeSetList veryDeepCopyWith: deepCopier.\rchangeSetCategory _ changeSetCategory.\r\r! !\r\r\r!ChangeSorter methodsFor: 'access' stamp: 'tk 4/29/1998 08:22'!\rchangeSet\r\t^ myChangeSet! !\r\r!ChangeSorter methodsFor: 'access' stamp: 'sw 3/29/2001 14:45'!\rchangeSetCategory\r\t\"Answer the current changeSetCategory object that governs which change sets are shown in this ChangeSorter\"\r\r\t^ changeSetCategory ifNil:\r\t\t[self setDefaultChangeSetCategory]! !\r\r!ChangeSorter methodsFor: 'access' stamp: 'sw 1/27/2000 11:19'!\rchangeSetCurrentlyDisplayed\r\t^ myChangeSet! !\r\r!ChangeSorter methodsFor: 'access' stamp: 'tk 4/30/1998 13:37'!\rlabel\r\t^ self labelString! !\r\r!ChangeSorter methodsFor: 'access' stamp: 'sd 5/23/2003 14:25'!\rlabelString\r\t\"The label for my entire window.  The large button that displays my name is gotten via mainButtonName\"\r\r\t^ String streamContents:\r\t\t[:aStream |\r\t\t\taStream nextPutAll: (ChangeSet current == myChangeSet\r\t\t\t\tifTrue: ['Changes go to \"', myChangeSet name, '\"']\r\t\t\t\tifFalse: ['ChangeSet: ', myChangeSet name]).\r\t\t(self changeSetCategory categoryName ~~ #All)\r\t\t\tifTrue:\r\t\t\t\t[aStream nextPutAll:  ' - ', self parenthesizedCategoryName]]! !\r\r!ChangeSorter methodsFor: 'access' stamp: 'sma 11/11/2000 23:28'!\rmodelWakeUp\r\t\"A window with me as model is being entered.\r\tMake sure I am up-to-date with the changeSets.\"\r\r\tself canDiscardEdits ifTrue: [self update]! !\r\r!ChangeSorter methodsFor: 'access' stamp: 'tk 4/24/1998 08:43'!\rmyChangeSet: anObject\r\tmyChangeSet _ anObject! !\r\r!ChangeSorter methodsFor: 'access' stamp: 'tk 4/24/1998 08:42'!\rparent\r\t^ parent! !\r\r!ChangeSorter methodsFor: 'access' stamp: 'tk 4/24/1998 08:42'!\rparent: anObject\r\tparent _ anObject! !\r\r!ChangeSorter methodsFor: 'access' stamp: 'sw 3/29/2001 22:51'!\rparenthesizedCategoryName\r\t\"Answer my category name in parentheses\"\r\r\t^ ' (', self changeSetCategory categoryName, ')'! !\r\r!ChangeSorter methodsFor: 'access' stamp: 'sw 1/28/1999 12:31'!\rshowChangeSet: chgSet\r\r\tmyChangeSet == chgSet ifFalse: [\r\t\tmyChangeSet _ chgSet.\r\t\tcurrentClassName _ nil.\r\t\tcurrentSelector _ nil].\r\tself changed: #relabel.\r\tself changed: #currentCngSet.\t\"new -- list of sets\"\r\tself changed: #mainButtonName.\t\"old, button\"\r\tself changed: #classList.\r\tself changed: #messageList.\r\tself setContents.\r\tself contentsChanged.! !\r\r!ChangeSorter methodsFor: 'access' stamp: 'di 4/5/2001 21:20'!\rshowChangeSetNamed: aName\r\r\tself showChangeSet: (ChangeSorter changeSetNamed: aName) ! !\r\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 3/6/1999 23:22'!\raddPreamble\r\tmyChangeSet assurePreambleExists.\r\tself okToChange ifTrue:\r\t\t[currentClassName _ nil.\r\t\tcurrentSelector _ nil.\r\t\tself showChangeSet: myChangeSet]! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 4/11/2001 16:30'!\raddToCategoryOpposite\r\t\"Add the current change set to the category viewed on the opposite side, if it's of the sort to accept things like that\"\r\r\t| categoryOpposite |\r\tcategoryOpposite _ (parent other: self) changeSetCategory.\r\tcategoryOpposite acceptsManualAdditions\r\t\tifTrue:\r\t\t\t[categoryOpposite addChangeSet: myChangeSet.\r\t\t\tcategoryOpposite reconstituteList.\r\t\t\tself update]\r\t\tifFalse:\r\t\t\t[self inform: \r'sorry, this command only makes sense\rif the category showing on the opposite\rside is a static category whose\rmembers are manually maintained']! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'tk 4/24/1998 13:27'!\rbrowseChangeSet\r\t\"Open a message list browser on the new and changed methods in the current change set\"\r\r\tChangedMessageSet openFor: myChangeSet\r\r! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'RAA 5/28/2001 12:06'!\rbrowseMethodConflicts\r\t\"Check to see if any other change set also holds changes to any methods in the selected change set; if so, open a browser on all such.\"\r\r\t| aList |\r\r\taList _ myChangeSet \r\t\tmessageListForChangesWhich: [ :aClass :aSelector |\r\t\t\t(ChangeSorter allChangeSetsWithClass: aClass selector: aSelector) size > 1\r\t\t]\r\t\tifNone: [^ self inform: 'No other change set has changes\rfor any method in this change set.'].\r\t\r\tMessageSet \r\t\topenMessageList: aList \r\t\tname: 'Methods in \"', myChangeSet name, '\" that are also in other change sets (', aList size printString, ')'\r\t! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 8/12/2002 17:29'!\rcategorySubmenu: aMenu  shifted: shiftedIgnored\r\t\"Fill aMenu with less-frequently-needed category items\"\r\t\r\taMenu title: 'Change set category'.\r\taMenu addStayUpItem.\r\r\taMenu addList: #(\r\t\t('make a new category...' makeNewCategory 'Creates a new change-set-category (you will be asked to supply a name) which will start out its life with this change set in it')\r\t\t('make a new category with class...' makeNewCategoryShowingClassChanges 'Creates a new change-set-category that includes change sets that change a particular class (you will be asked to supply a name)')\r\t\t('rename this category' renameCategory 'Rename this change-set category.   Only applies when the current category being shown is a manually-maintained, user-defined category, such as you can create for yourself by choosing \"make a new category...\" from this same menu.')\r\t\t('remove this category' removeCategory 'Remove this change-set category.   Only applies when the current category being shown is a manually-maintained, user-defined category, such as you can create for yourself by choosing \"make a new category...\" from this same menu.')\r\t\t('show categories of this changeset' showCategoriesOfChangeSet 'Show a list of all the change-set categories that contain this change-set; if the you choose one of the categories from this pop-up, that category will be installed in this change sorter')\r\t-).\r\r\tparent ifNotNil:\r\t\t[aMenu addList: #(\r\t\t\t('add change set to category opposite' addToCategoryOpposite 'Adds this change set to the category on the other side of the change sorter.  Only applies if the category shown on the opposite side is a manually-maintained, user-defined category, such as you can create for yourself by choosing \"make a new category...\" from this same menu.'))].\r\r\taMenu addList: #(\r\t\t('remove change set from this category' removeFromCategory 'Removes this change set from the current category.  Only applies when the current category being shown is a manually-maintained, user-defined category, such as you can create for yourself by choosing \"make a new category...\" from this same menu.')\r\t\t-\r\t\t('file out category''s change sets' fileOutAllChangeSets 'File out every change set in this category that has anything in it.  The usual checks for slips are suppressed when this command is done.')\r\t\t('set recent-updates marker' setRecentUpdatesMarker 'Allows you to specify a number that will demarcate which updates are considered \"recent\" and which are not.  This will govern which updates are included in the RecentUpdates category in a change sorter')\r\t\t('fill aggregate change set' fillAggregateChangeSet 'Creates a change-set named Aggregate into which all the changes in all the change sets in this category will be copied.')\r\t\t-\r\t\t('back to main menu' offerUnshiftedChangeSetMenu 'Takes you back to the shifted change-set menu.')\r\t\t('back to shifted menu' offerShiftedChangeSetMenu 'Takes you back to the primary change-set menu.')).\r\r\t^ aMenu! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 3/30/2001 00:00'!\rchangeSetList\r\t\"Answer a list of ChangeSet names to be shown in the change sorter.\"\r\r\t^ self changeSetCategory changeSetList! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 7/17/2002 11:37'!\rchangeSetListKey: aChar from: view\r\t\"Respond to a Command key.  I am a model with a listView that has a list of changeSets.\"\r\r\taChar == $b ifTrue: [^ self browseChangeSet].\r\taChar == $B ifTrue: [^ self openChangeSetBrowser].\r\taChar == $c ifTrue: [^ self copyAllToOther].\r\taChar == $D ifTrue: [^ self toggleDiffing]. \r\taChar == $f ifTrue: [^ self findCngSet].\r\taChar == $m ifTrue: [^ self newCurrent].\r\taChar == $n ifTrue: [^ self newSet].\r\taChar == $o ifTrue: [^ self fileOut].\r\taChar == $p ifTrue: [^ self addPreamble].\r\taChar == $r ifTrue: [^ self rename].\r\taChar == $s ifTrue: [^ self chooseChangeSetCategory].\r\taChar == $x ifTrue: [^ self remove].\r\taChar == $- ifTrue: [^ self subtractOtherSide].\r\r\t^ self messageListKey: aChar from: view! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'BG 10/29/2003 08:09'!\rchangeSetMenu: aMenu shifted: isShifted \r\t\"Set up aMenu to hold commands for the change-set-list pane.  This could be for a single or double changeSorter\"\r\r\tisShifted ifTrue: [^ self shiftedChangeSetMenu: aMenu].\r\tSmalltalk isMorphic\r\t\tifTrue:\r\t\t\t[]\r\t\tifFalse:\r\t\t\t[aMenu title: 'Change Set:\r' , myChangeSet name].\r\r\taMenu add: 'make changes go to me (m)' action: #newCurrent.\r\taMenu addLine.\r\taMenu add: 'new change set... (n)' action: #newSet.\r\taMenu add: 'find...(f)' action: #findCngSet.\r\taMenu add: 'show category... (s)' action:  #chooseChangeSetCategory.\r\taMenu balloonTextForLastItem:\r'Lets you choose which change sets should be listed in this change sorter'.\r\taMenu add: 'select change set...' action: #chooseCngSet.\r\taMenu addLine.\r\taMenu add: 'rename change set (r)' action: #rename.\r\taMenu add: 'file out (o)' action: #fileOut.\r\"\taMenu add: 'mail to list' action: #mailOut. \"\r\taMenu add: 'browse methods (b)' action: #browseChangeSet.\r\taMenu add: 'browse change set (B)' action: #openChangeSetBrowser.\r\taMenu addLine.\r\tparent\r\t\tifNotNil: \r\t\t\t[aMenu add: 'copy all to other side (c)' action: #copyAllToOther.\r\t\t\taMenu add: 'submerge into other side' action: #submergeIntoOtherSide.\r\t\t\taMenu add: 'subtract other side (-)' action: #subtractOtherSide.\r\t\t\taMenu addLine].\r\tmyChangeSet hasPreamble\r\t\tifTrue: \r\t\t\t[aMenu add: 'edit preamble (p)' action: #addPreamble.\r\t\t\taMenu add: 'remove preamble' action: #removePreamble]\r\t\tifFalse: [aMenu add: 'add preamble (p)' action: #addPreamble].\r\tmyChangeSet hasPostscript\r\t\tifTrue: \r\t\t\t[aMenu add: 'edit postscript...' action: #editPostscript.\r\t\t\taMenu add: 'remove postscript' action: #removePostscript]\r\t\tifFalse: [aMenu add: 'add postscript...' action: #editPostscript].\r\taMenu addLine.\r\r\taMenu add: 'category functions...' action: #offerCategorySubmenu.\r\taMenu balloonTextForLastItem:\r'Various commands relating to change-set-categories'.\r\taMenu addLine.\r\r\r\taMenu add: 'destroy change set (x)' action: #remove.\r\taMenu addLine.\r\taMenu add: 'more...' action: #offerShiftedChangeSetMenu.\r\t^ aMenu! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 10/30/2000 10:48'!\rcheckForAlienAuthorship\r\t\"Open a message list browser on all uncommented methods in the current change set that have alien authorship\"\r\r\tmyChangeSet checkForAlienAuthorship\r\r! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'nk 3/30/2002 08:56'!\rcheckForAnyAlienAuthorship\r\t\"Open a message list browser on all uncommented methods in the current change set that have alien authorship, even historically\"\r\r\tmyChangeSet checkForAnyAlienAuthorship\r\r! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 3/29/2001 12:47'!\rcheckForUnclassifiedMethods\r\t\"Open a message list browser on all methods in the current change set that have not been categorized\"\r\r\tmyChangeSet checkForUnclassifiedMethods\r\r! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 7/18/2002 17:58'!\rcheckForUncommentedClasses\r\t\"Open a class list browser on classes in the change set that lack class comments\"\r\r\tmyChangeSet checkForUncommentedClasses! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 10/30/2000 10:39'!\rcheckForUncommentedMethods\r\t\"Open a message list browser on all uncommented methods in the current change set\"\r\r\tmyChangeSet checkForUncommentedMethods\r\r! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 10/27/1999 14:20'!\rcheckForUnsentMessages\r\t\"Open a message list browser on all unsent messages in the current change set\"\r\r\tmyChangeSet checkForUnsentMessages\r\r! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 7/8/1999 13:36'!\rcheckThatSidesDiffer: escapeBlock\r\t\"If the change sets on both sides of the dual sorter are the same, put up an error message and escape via escapeBlock, else proceed happily\"\r\r\t(myChangeSet == (parent other: self) changeSet)\r\t\tifTrue:\r\t\t\t[self inform: \r'This command requires that the\rchange sets selected on the two\rsides of the change sorter *not*\rbe the same.'.\r\t\t\t^ escapeBlock value]\r! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'BG 10/28/2003 20:47'!\rchooseChangeSetCategory\r\t\"Present the user with a list of change-set-categories and let her choose one\"\r\r\t|  cats aMenu result |\r\tself okToChange ifFalse: [^ self].\r\t\r\r\tcats _ ChangeSetCategories elementsInOrder.\r\taMenu _ SelectionMenu\r\t\tlabels: (cats collect: [:cat | cat categoryName])\r\t\tselections: cats.\r\tresult _ aMenu startUp.\r\tresult ifNotNil:\r\t\t[changeSetCategory _ result.\r\t\tself changed: #changeSetList.\r\t\t(self changeSetList includes: myChangeSet name) ifFalse:\r\t\t\t[self showChangeSet: (ChangeSorter changeSetNamed: self changeSetList first)].\r\t\tself changed: #relabel]! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'di 4/5/2001 17:56'!\rchooseCngSet\r\t\"Present the user with an alphabetical list of change set names, and let her choose one\"\r\r\t| changeSetsSortedAlphabetically chosen |\r\tself okToChange ifFalse: [^ self].\r\r\tchangeSetsSortedAlphabetically _ self changeSetList asSortedCollection:\r\t\t[:a :b | a asLowercase withoutLeadingDigits < b asLowercase withoutLeadingDigits].\r\r\tchosen _ (SelectionMenu selections: changeSetsSortedAlphabetically)\r\t\t\tstartUp.\r\tchosen ifNil: [^ self].\r\tself showChangeSet: (ChangeSorter changeSetNamed: chosen)! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 1/28/1999 12:30'!\rclearChangeSet\r\t\"Clear out the current change set, after getting a confirmation.\"\r\t| message |\r\r\tself okToChange ifFalse: [^ self].\r\tmyChangeSet isEmpty ifFalse:\r\t\t[message _ 'Are you certain that you want to\\forget all the changes in this set?' withCRs.\r\t\t(self confirm: message) ifFalse: [^ self]].\r\tmyChangeSet clear.\r\tself changed: #classList.\r\tself changed: #messageList.\r\tself setContents.\r\tself contentsChanged.\r! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 1/27/2000 11:21'!\rcopyAllToOther\r\t\"Copy this entire change set into the one on the other side\"\r\t| companionSorter |\r\tself checkThatSidesDiffer: [^ self].\r\t(companionSorter _ parent other: self) changeSetCurrentlyDisplayed assimilateAllChangesFoundIn: myChangeSet.\r\tcompanionSorter changed: #classList.\t\"Later the changeSet itself will notice...\"\r\tcompanionSorter changed: #messageList! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'tk 6/5/1998 06:47'!\rcurrentCngSet\r\t^ myChangeSet name! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'tk 4/28/1998 08:06'!\reditPostscript\r\t\"Allow the user to edit the receiver's change-set's postscript -- in a separate window\"\r\r\tmyChangeSet editPostscript! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'tk 4/28/1998 08:06'!\reditPreamble\r\t\"Allow the user to edit the receiver's change-set's preamble -- in a separate window.\"\r\r\tmyChangeSet editPreamble! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 4/19/2000 16:18'!\rexpungeUniclasses\r\t\"remove all memory of uniclasses in the receiver\"\r\r\tself okToChange ifFalse: [^ self].\r\tmyChangeSet expungeUniclasses.\r\tself changed: #classList.\r\tself changed: #messageList.\r\r! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'nk 1/4/2004 17:07'!\rfileIntoNewChangeSet\r\t\"Obtain a file designation from the user, and file its contents into a  \r\tnew change set whose name is a function of the filename. Show the  \r\tnew set and leave the current changeSet unaltered.\"\r\t| aNewChangeSet stream |\r\tself okToChange\r\t\tifFalse: [^ self].\r\tChangeSet promptForDefaultChangeSetDirectoryIfNecessary.\r\tstream := StandardFileMenu oldFileStreamFrom: ChangeSet defaultChangeSetDirectory.\r\tstream\r\t\tifNil: [^ self].\r\taNewChangeSet := self class\r\t\t\t\tnewChangesFromStream: stream\r\t\t\t\tnamed: (FileDirectory localNameFor: stream name).\r\taNewChangeSet\r\t\tifNotNil: [self showChangeSet: aNewChangeSet]! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'tk 6/10/1999 12:44'!\rfileOut\r\t\"File out the current change set.\"\r\r\tmyChangeSet fileOut.\r\tparent modelWakeUp.\t\"notice object conversion methods created\"\r! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 3/30/2001 00:57'!\rfileOutAllChangeSets\r\t\"File out all nonempty change sets in the current category, probably\"\r\r\tself changeSetCategory fileOutAllChangeSets! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 3/30/2001 01:26'!\rfillAggregateChangeSet\r\t\"Create a change-set named Aggregate and pour into it all the changes in all the change-sets of the currently-selected category\"\r\r\tself changeSetCategory fillAggregateChangeSet! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'nb 6/17/2003 12:25'!\rfindCngSet \r\t\"Search for a changeSet by name.  Pop up a menu of all changeSets whose name contains the string entered by the user.  If only one matches, then the pop-up menu is bypassed\"\r\t| index pattern candidates nameList |\r\tself okToChange ifFalse: [^ self].\r\tpattern _ FillInTheBlank request: 'ChangeSet name or fragment?'.\r\tpattern isEmpty ifTrue: [^ self].\r\tnameList _ self changeSetList asSet.\r\tcandidates _ AllChangeSets select:\r\t\t\t[:c | (nameList includes: c name) and: \r\t\t\t\t[c name includesSubstring: pattern caseSensitive: false]].\r\tcandidates size = 0 ifTrue: [^ Beeper beep].\r\tcandidates size = 1 ifTrue:\r\t\t[^ self showChangeSet: candidates first].\r\tindex _ (PopUpMenu labels: \r\t\t(candidates collect: [:each | each name]) asStringWithCr) startUp.\r\tindex = 0 ifFalse: [self showChangeSet: (candidates at: index)].\r! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'tk 10/26/1999 14:24'!\rgoToChangeSetsProject\r\t\"Transport the user to a project which bears the selected changeSet as its current changeSet\"\r\r\t| aProject |\r\t(aProject _ myChangeSet correspondingProject) \r\t\tifNotNil:\r\t\t\t[aProject enter: false revert: false saveForRevert: false]\r\t\tifNil:\r\t\t\t[self inform: 'Has no project']! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 1/10/1999 01:01'!\rinspectChangeSet\r\t\"Open a message list browser on the new and changed methods in the current change set\"\r\r\tmyChangeSet inspectWithLabel: 'Change set: ', myChangeSet name\r\r! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 2/17/1999 11:05'!\rlookForSlips\r\t\"Open a message list browser on the new and changed methods in the current change set\"\r\r\tmyChangeSet lookForSlips\r\r! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'dvf 5/13/2000 05:08'!\rmailOut\r\t\"Create a mail with a gzipped attachment holding out the current change \r\tset. \"\r\tmyChangeSet mailOut.\r\tparent modelWakeUp! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'tk 4/24/1998 13:10'!\rmainButtonName\r\r\t^ myChangeSet name! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 4/11/2001 16:43'!\rmakeNewCategory\r\t\"Create a new, static change-set category, which will be populated entirely by change sets that have been manually placed in it\"\r\r\t| catName aCategory |\r\tcatName _ FillInTheBlank request: 'Please give the new category a name' initialAnswer: ''.\r\tcatName isEmptyOrNil ifTrue: [^ self].\r\tcatName _ catName asSymbol.\r\t(ChangeSetCategories includesKey: catName) ifTrue:\r\t\t[^ self inform: 'Sorry, there is already a category of that name'].\r\r\taCategory _ StaticChangeSetCategory new categoryName: catName.\r\tChangeSetCategories elementAt: catName put: aCategory.\r\taCategory addChangeSet: myChangeSet.\r\tself showChangeSetCategory: aCategory! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'nk 6/26/2002 12:28'!\rmakeNewCategoryShowingClassChanges\r\t\"Create a new, static change-set category, which will be populated entirely by change sets that have been manually placed in it\"\r\r\t| catName aCategory clsName |\r\tclsName _ self selectedClass ifNotNil: [self selectedClass name ] ifNil: [''].\r\tclsName _ FillInTheBlank request: 'Which class?' initialAnswer: clsName.\r\tclsName isEmptyOrNil ifTrue: [^ self].\r\tcatName _ ('Changes to ', clsName) asSymbol.\r\t(ChangeSetCategories includesKey: catName) ifTrue:\r\t\t[^ self inform: 'Sorry, there is already a category of that name'].\r\r\taCategory _ ChangeSetCategoryWithParameters new categoryName: catName.\r\taCategory membershipSelector: #changeSet:containsClass: ; parameters: { clsName }.\r\tChangeSetCategories elementAt: catName put: aCategory.\r\taCategory reconstituteList.\r\tself showChangeSetCategory: aCategory! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'RAA 5/28/2001 12:07'!\rmethodConflictsWithOppositeCategory\r\t\"Check to see if ANY change set on the other side shares any methods with the selected change set; if so, open a browser on all such.\"\r\r\t| aList otherCategory |\r\r\totherCategory _ (parent other: self) changeSetCategory.\r\taList _ myChangeSet \r\t\tmessageListForChangesWhich: [ :aClass :aSelector |\r\t\t\taClass notNil and: \r\t\t\t\t[otherCategory \r\t\t\t\t\thasChangeForClassName: aClass name \r\t\t\t\t\tselector: aSelector \r\t\t\t\t\totherThanIn: myChangeSet]\r\t\t]\r\t\tifNone: [^ self inform: \r'There are no methods that appear both in\rthis change set and in any change set\r(other than this one) on the other side.'].\r\t\r\tMessageSet \r\t\topenMessageList: aList \r\t\tname: 'Methods in \"', myChangeSet name, '\" also in some other change set in category ', otherCategory categoryName,' (', aList size printString, ')'\r\t! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'RAA 5/28/2001 12:07'!\rmethodConflictsWithOtherSide\r\t\"Check to see if the change set on the other side shares any methods with the selected change set; if so, open a browser on all such.\"\r\r\t| aList other |\r\r\tself checkThatSidesDiffer: [^ self].\r\tother _ (parent other: self) changeSet.\r\taList _ myChangeSet \r\t\tmessageListForChangesWhich: [ :aClass :aSelector |\r\t\t\taClass notNil and: [(other methodChangesAtClass: aClass name) includesKey: aSelector]\r\t\t]\r\t\tifNone:  [^ self inform: 'There are no methods that appear\rboth in this change set and\rin the one on the other side.'].\r\t\r\tMessageSet \r\t\topenMessageList: aList \r\t\tname: 'Methods in \"', myChangeSet name, '\" that are also in ', other name,' (', aList size printString, ')'\r\t! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sd 5/23/2003 15:15'!\rnewCurrent\r\t\"make my change set be the current one that changes go into\"\r\r\tChangeSet  newChanges: myChangeSet.\r\tself update.  \"Because list of changes in a category may thus have changed\"\r\tself changed: #relabel.! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 4/11/2001 16:26'!\rnewSet\r\t\"Create a new changeSet and show it., making it the current one.  Reject name if already in use.\"\r\r\t| aSet |\r\tself okToChange ifFalse: [^ self].\r\taSet _ self class newChangeSet.\r\taSet ifNotNil:\r\t\t[self changeSetCategory acceptsManualAdditions ifTrue:\r\t\t\t[changeSetCategory addChangeSet: aSet].\r\t\tself update.\r\t\t(changeSetCategory includesChangeSet: aSet) ifTrue:\r\t\t\t[self showChangeSet: aSet].\r\t\tself changed: #relabel]! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 4/11/2001 17:41'!\rofferCategorySubmenu\r\t\"Offer a menu of category-related items\"\r\r\tself offerMenuFrom: #categorySubmenu:shifted: shifted: false! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 2/27/2001 21:55'!\rofferShiftedChangeSetMenu\r\t\"Offer the shifted version of the change set menu\"\r\r\tself offerMenuFrom: #changeSetMenu:shifted: shifted: true! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 3/6/2001 14:41'!\rofferUnshiftedChangeSetMenu\r\t\"Offer the unshifted version of the change set menu\"\r\r\tself offerMenuFrom: #changeSetMenu:shifted: shifted: false! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'BG 10/29/2003 00:38'!\ropenChangeSetBrowser\r\t\"Open a ChangeSet browser on the current change set\"\r\r\tSmalltalk isMorphic\r\t\tifFalse:\r\t\t\t[self browseChangeSet]  \"msg-list browser only\"\r\t\tifTrue:\r\t\t\t[]! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 12/13/2003 18:14'!\rpromoteToTopChangeSet\r\t\"Move the selected change-set to the top of the list\"\r\r\tself class promoteToTop: myChangeSet.\r\t(parent ifNil: [self]) modelWakeUp! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'di 6/14/1998 12:00'!\rremove\r\t\"Completely destroy my change set.  Check if it's OK first\"\r\r\tself okToChange ifFalse: [^ self].\r\tself removePrompting: true.\r\tself update! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 4/11/2001 20:03'!\rremoveCategory\r\t\"Remove the current category\"\r\r\t| itsName |\r\tself changeSetCategory acceptsManualAdditions ifFalse:\r\t\t[^ self inform: 'sorry, you can only remove manually-added categories.'].\r\r\t(self confirm: 'Really remove the change-set-category\rnamed ', (itsName _ changeSetCategory categoryName), '?') ifFalse: [^ self].\r\r\tChangeSetCategories removeElementAt: itsName.\r\tself setDefaultChangeSetCategory.\r\r\tself update! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'MU 7/1/2002 18:38'!\rremoveContainedInClassCategories\r\t| matchExpression |\r\tmyChangeSet removePreamble.\r\tmatchExpression :=  FillInTheBlank request: 'Enter class category name (wildcard is ok)' initialAnswer: 'System-*'. \r\t(SystemOrganization categories\r\t\tselect: [:each | matchExpression match: each])\r\t\tdo: [:eachCat | \r\t\t\t| classNames | \r\t\t\tclassNames := SystemOrganization listAtCategoryNamed: eachCat.\r\t\t\tclassNames\r\t\t\t\tdo: [:eachClassName | \r\t\t\t\t\tmyChangeSet removeClassChanges: eachClassName.\r\t\t\t\t\tmyChangeSet removeClassChanges: eachClassName , ' class'].\r\t\t\tself showChangeSet: myChangeSet]! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 4/11/2001 16:31'!\rremoveFromCategory\r\t\"Add the current change set to the category viewed on the opposite side, if it's of the sort to accept things like that\"\r\r\t| aCategory |\r\t(aCategory _ self changeSetCategory) acceptsManualAdditions\r\t\tifTrue:\r\t\t\t[aCategory removeElementAt: myChangeSet name.\r\t\t\taCategory reconstituteList.\r\t\t\tself update]\r\t\tifFalse:\r\t\t\t[self inform: \r'sorry, this command only makes\rsense for static categories whose\rmembers are manually maintained']! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 6/29/1999 20:53'!\rremovePostscript\r\t(myChangeSet hasPostscript and: [myChangeSet postscriptHasDependents]) ifTrue:\r\t\t[^ self inform:\r'Cannot remove the postscript right\rnow because there is at least one\rwindow open on that postscript.\rClose that window and try again.'].\r\r\tmyChangeSet removePostscript.\r\tself showChangeSet: myChangeSet! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 3/5/1999 19:32'!\rremovePreamble\r\tmyChangeSet removePreamble.\r\tself showChangeSet: myChangeSet! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sd 5/23/2003 14:26'!\rremovePrompting: doPrompt\r\t\"Completely destroy my change set.  Check if it's OK first, and if doPrompt is true, get the user to confirm his intentions first.\"\r\r\t| message aName changeSetNumber msg |\r\taName _ myChangeSet name.\r\tmyChangeSet okayToRemove ifFalse: [^ self]. \"forms current changes for some project\"\r\t(myChangeSet isEmpty or: [doPrompt not]) ifFalse:\r\t\t[message _ 'Are you certain that you want to \rremove (destroy) the change set\rnamed  \"', aName, '\" ?'.\r\t\t(self confirm: message) ifFalse: [^ self]].\r\r\tdoPrompt ifTrue:\r\t\t[msg _ myChangeSet hasPreamble\r\t\t\tifTrue:\r\t\t\t\t[myChangeSet hasPostscript\r\t\t\t\t\tifTrue:\r\t\t\t\t\t\t['a preamble and a postscript']\r\t\t\t\t\tifFalse:\r\t\t\t\t\t\t['a preamble']]\r\t\t\tifFalse:\r\t\t\t\t[myChangeSet hasPostscript\r\t\t\t\t\tifTrue:\r\t\t\t\t\t\t['a postscript']\r\t\t\t\t\tifFalse:\r\t\t\t\t\t\t['']].\r\t\tmsg isEmpty ifFalse:\r\t\t\t[(self confirm: \r'Caution!!  This change set has\r', msg, ' which will be\rlost if you destroy the change set.\rDo you really want to go ahead with this?') ifFalse: [^ self]]].\r\r\t\"Go ahead and remove the change set\"\r\tchangeSetNumber _ myChangeSet name initialIntegerOrNil.\r\tchangeSetNumber ifNotNil: [SystemVersion current unregisterUpdate: changeSetNumber].\r\tChangeSorter removeChangeSet: myChangeSet.\r\tself showChangeSet: ChangeSet current.! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'nb 6/17/2003 12:25'!\rrename\r\t\"Store a new name string into the selected ChangeSet.  reject duplicate name; allow user to back out\"\r\r\t| newName |\r\tnewName _ FillInTheBlank request: 'New name for this change set'\r\t\t\t\t\t\tinitialAnswer: myChangeSet name.\r\t(newName = myChangeSet name or: [newName size == 0]) ifTrue:\r\t\t\t[^ Beeper beep].\r\r\t(self class changeSetNamed: newName) ifNotNil:\r\t\t\t[^ Utilities inform: 'Sorry that name is already used'].\r\r\tmyChangeSet name: newName.\r\tself update.\r\tself changed: #mainButtonName.\r\tself changed: #relabel.! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 4/11/2001 18:18'!\rrenameCategory\r\t\"Obtain a new name for the category and, if acceptable, apply it\"\r\r\t| catName oldName |\r\tself changeSetCategory acceptsManualAdditions ifFalse:\r\t\t[^ self inform: 'sorry, you can only rename manually-added categories.'].\r\r\tcatName _ FillInTheBlank request: 'Please give the new category a name' initialAnswer:  (oldName _ changeSetCategory categoryName).\r\tcatName isEmptyOrNil ifTrue: [^ self].\r\t(catName _ catName asSymbol) = oldName ifTrue: [^ self inform: 'no change.'].\r\t(ChangeSetCategories includesKey: catName) ifTrue:\r\t\t[^ self inform: 'Sorry, there is already a category of that name'].\r\r\tchangeSetCategory categoryName: catName.\r\tChangeSetCategories removeElementAt: oldName.\r\tChangeSetCategories elementAt: catName put: changeSetCategory.\r\r\tself update! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 3/5/2001 11:03'!\rreorderChangeSets\r\t\"apply a standard reordering -- let the class handle this\"\r\r\t^ self class reorderChangeSets! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'BG 10/28/2003 20:37'!\rsetRecentUpdatesMarker\r\t\"Allow the user to change the recent-updates marker\"\r\r\t| result |\r\tresult _ FillInTheBlank request: \r('Enter the lowest change-set number\rthat you wish to consider \"recent\"?\r(note: highest change-set number\rin this image at this time is ', self class highestNumberedChangeSet asString, ')') initialAnswer: self class recentUpdateMarker asString.\r\t(result notNil and: [result startsWithDigit]) ifTrue:\r\t\t[self class recentUpdateMarker: result asInteger.]! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'BG 10/28/2003 20:48'!\rshiftedChangeSetMenu: aMenu\r\t\"Set up aMenu to hold items relating to the change-set-list pane when the shift key is down\"\r\r\t\r\r\t\"CONFLICTS SECTION\"\r\taMenu add: 'conflicts with other change sets' action: #browseMethodConflicts.\r\taMenu balloonTextForLastItem: \r'Browse all methods that occur both in this change set and in at least one other change set.'.\r\tparent ifNotNil:\r\t\t[aMenu add: 'conflicts with change set opposite' action: #methodConflictsWithOtherSide.\r\t\t\taMenu balloonTextForLastItem: \r'Browse all methods that occur both in this change set and in the one on the opposite side of the change sorter.'.\r\r\t\t\taMenu add: 'conflicts with category opposite' action: #methodConflictsWithOppositeCategory.\r\t\t\taMenu balloonTextForLastItem: \r'Browse all methods that occur both in this change set and in ANY change set in the category list on the opposite side of this change sorter, other of course than this change set itself.  (Caution -- this could be VERY slow)'].\r\taMenu addLine.\r\r\t\"CHECKS SECTION\"\r\taMenu add: 'check for slips' action: #lookForSlips.\r\taMenu balloonTextForLastItem: \r'Check this change set for halts and references to Transcript.'.\r\r\taMenu add: 'check for unsent messages' action: #checkForUnsentMessages.\r\taMenu balloonTextForLastItem:\r'Check this change set for messages that are not sent anywhere in the system'.\r\r\taMenu add: 'check for uncommented methods' action: #checkForUncommentedMethods.\r\taMenu balloonTextForLastItem:\r'Check this change set for methods that do not have comments'.\r\r\taMenu add: 'check for uncommented classes' action: #checkForUncommentedClasses.\r\taMenu balloonTextForLastItem:\r'Check for classes with code in this changeset which lack class comments'.\r\r\tUtilities authorInitialsPerSe isEmptyOrNil ifFalse:\r\t\t[aMenu add: 'check for other authors' action: #checkForAlienAuthorship.\r\t\taMenu balloonTextForLastItem:\r'Check this change set for methods whose current authoring stamp does not start with \"', Utilities authorInitials, '\"'.\r\r\taMenu add: 'check for any other authors' action: #checkForAnyAlienAuthorship.\r\taMenu balloonTextForLastItem:\r'Check this change set for methods any of whose authoring stamps do not start with \"', Utilities authorInitials, '\"'].\r\r\taMenu add: 'check for uncategorized methods' action: #checkForUnclassifiedMethods.\r\taMenu balloonTextForLastItem:\r'Check to see if any methods in the selected change set have not yet been assigned to a category.  If any are found, open a browser on them.'.\r\taMenu addLine.\r\r\taMenu add: 'inspect change set' action: #inspectChangeSet.\r\taMenu balloonTextForLastItem: \r'Open an inspector on this change set. (There are some details in a change set which you don''t see in a change sorter.)'.\r\r\taMenu add: 'update' action: #update.\r\taMenu balloonTextForLastItem: \r'Update the display for this change set.  (This is done automatically when you activate this window, so is seldom needed.)'.\r\r\taMenu add: 'go to change set''s project' action: #goToChangeSetsProject.\r\taMenu balloonTextForLastItem: \r'If this change set is currently associated with a Project, go to that project right now.'.\r\r\taMenu add: 'promote to top of list' action: #promoteToTopChangeSet.\r\taMenu balloonTextForLastItem:\r'Make this change set appear first in change-set lists in all change sorters.'.\r\r\taMenu add: 'trim history' action: #trimHistory.\r\taMenu balloonTextForLastItem: \r' Drops any methods added and then removed, as well as renaming and reorganization of newly-added classes.  NOTE: can cause confusion if later filed in over an earlier version of these changes'.\r\r\taMenu add: 'clear this change set' action: #clearChangeSet.\r\taMenu balloonTextForLastItem: \r'Reset this change set to a pristine state where it holds no information. CAUTION: this is destructive and irreversible!!'.\r\taMenu add: 'expunge uniclasses' action: #expungeUniclasses.\r\taMenu balloonTextForLastItem:\r'Remove from the change set all memory of uniclasses, e.g. classes added on behalf of etoys, fabrik, etc., whose classnames end with a digit.'.\r\r\taMenu add: 'uninstall this change set' action: #uninstallChangeSet.\r\taMenu balloonTextForLastItem: \r'Attempt to uninstall this change set. CAUTION: this may not work completely and is irreversible!!'.\r\r\taMenu addLine.\r\taMenu add: 'file into new...' action: #fileIntoNewChangeSet.\r\taMenu balloonTextForLastItem: \r'Load a fileout from disk and place its changes into a new change set (seldom needed -- much better to do this from a file-list browser these days.)'.\r\r\taMenu add: 'reorder all change sets' action: #reorderChangeSets.\r\taMenu balloonTextForLastItem:\r'Applies a standard reordering of all change-sets in the system -- at the bottom will come the sets that come with the release; next will come all the numbered updates; finally, at the top, will come all other change sets'.\r\r\taMenu addLine.\r\r\taMenu add: 'more...' action: #offerUnshiftedChangeSetMenu.\r\taMenu balloonTextForLastItem: \r'Takes you back to the primary change-set menu.'.\r\r\t^ aMenu! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'BG 10/28/2003 20:51'!\rshowCategoriesOfChangeSet\r\t\"Show a list of all the categories in which the selected change-set occurs at the moment.  Install the one the user chooses, if any.\"\r\r\tSmalltalk isMorphic\r\t\tifFalse:\r\t\t\t[self inform:\r'Only available in morphic, right now, sorry.\rIt would not take much to make this\ralso work in mvc, so if you are\rinclined to do that, thanks in advance...']\r\t\tifTrue:\r\t\t\t[]! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 3/30/2001 13:27'!\rshowChangeSetCategory: aChangeSetCategory\r\t\"Show the given change-set category\"\r\t\r\tchangeSetCategory _ aChangeSetCategory.\r\tself changed: #changeSetList.\r\t(self changeSetList includes: myChangeSet name) ifFalse:\r\t\t\t[self showChangeSet: (ChangeSorter changeSetNamed: self changeSetList first)].\r\tself changed: #relabel! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'di 4/5/2001 21:22'!\rsubmergeIntoOtherSide\r\t\"Copy the contents of the receiver to the other side, then remove the receiver -- all after checking that all is well.\"\r\t| other message nextToView i |\r\tself checkThatSidesDiffer: [^ self].\r\tself okToChange ifFalse: [^ self].\r\tother _ (parent other: self) changeSet.\r\tother == myChangeSet ifTrue: [^ self inform: 'Both sides are the same!!'].\r\tmyChangeSet isEmpty ifTrue: [^ self inform: 'Nothing to copy.  To remove,\rsimply choose \"remove\".'].\r\r\tmyChangeSet okayToRemove ifFalse: [^ self].\r\tmessage _ 'Please confirm:  copy all changes\rin \"', myChangeSet name, '\" into \"', other name, '\"\rand then destroy the change set\rnamed \"', myChangeSet name, '\"?'.\r \r\t(self confirm: message) ifFalse: [^ self].\r\r\t(myChangeSet hasPreamble or: [myChangeSet hasPostscript]) ifTrue:\r\t\t[(self confirm: \r'Caution!!  This change set has a preamble or\ra postscript or both.  If you submerge it into\rthe other side, these will be lost.\rDo you really want to go ahead with this?') ifFalse: [^ self]].\r\r\tother assimilateAllChangesFoundIn: myChangeSet.\r\r\tnextToView _ ((AllChangeSets includes: myChangeSet)\r\t\tand: [(i _ AllChangeSets indexOf: myChangeSet) < AllChangeSets size])\r\t\tifTrue: [AllChangeSets at: i+1]\r\t\tifFalse: [other].\r\r\tself removePrompting: false.\r\tself showChangeSet: nextToView.\r\tparent modelWakeUp.\r! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 7/8/1999 12:32'!\rsubtractOtherSide\r\t\"Subtract the changes found on the other side from the requesting side.\"\r\tself checkThatSidesDiffer: [^ self].\r\tmyChangeSet forgetAllChangesFoundIn: ((parent other: self) changeSet).\r\tself showChangeSet: myChangeSet! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'di 5/12/2000 15:03'!\rtrimHistory\r\t\"Drop non-essential history (rename, reorg, method removals) from newly-added classes.\"\r\r\tmyChangeSet trimHistory\r\r! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'di 3/8/2000 14:18'!\runinstallChangeSet\r\t\"Attempt to uninstall the current change set, after confirmation.\"\r\r\tself okToChange ifFalse: [^ self].\r\t(self confirm: 'Uninstalling a changeSet is unreliable at best.\rIt will only work if the changeSet consists only of single\rchanges, additions and removals of methods, and if\rno subsequent changes have been to any of them.\rNo changes to classes will be undone.\rThe changeSet will be cleared after uninstallation.\rDo you still wish to attempt to uninstall this changeSet?')\r\tifFalse: [^ self].\r\r\tmyChangeSet uninstall.\r\tself changed: #relabel.\r\tself changed: #classList.\r\tself changed: #messageList.\r\tself setContents.\r\tself contentsChanged.\r! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'di 6/21/1998 13:02'!\rupdate\r\t\"recompute all of my panes\"\r\r\tself updateIfNecessary.\r\tparent ifNotNil: [(parent other: self) updateIfNecessary]! !\r\r!ChangeSorter methodsFor: 'changeSet menu' stamp: 'di 6/20/2001 09:37'!\rupdateIfNecessary\r\t\"Recompute all of my panes.\"\r\r\t| newList |\r\tself okToChange ifFalse: [^ self].\r\r\tmyChangeSet ifNil: [^ self].  \"Has been known to happen though shouldn't\"\r\t(myChangeSet isMoribund or: [(changeSetCategory notNil and: [changeSetCategory includesChangeSet: myChangeSet]) not]) ifTrue:\r\t\t[self changed: #changeSetList.\r\t\t^ self showChangeSet: self changeSetCategory defaultChangeSetToShow].\r\r\tnewList _ self changeSetList.\r\r\t(priorChangeSetList == nil or: [priorChangeSetList ~= newList])\r\t\tifTrue:\r\t\t\t[priorChangeSetList _ newList.\r\t\t\tself changed: #changeSetList].\r\tself showChangeSet: myChangeSet! !\r\r\r!ChangeSorter methodsFor: 'class list' stamp: 'sw 3/29/2001 15:19'!\rclassList\r\t\"Computed.  View should try to preserve selections, even though index changes\"\r\r\t^ myChangeSet ifNotNil: [myChangeSet changedClassNames] ifNil: [OrderedCollection new]\r! !\r\r!ChangeSorter methodsFor: 'class list' stamp: 'sw 3/5/2001 18:24'!\rclassListKey: aChar from: view\r\t\"Respond to a Command key in the class-list pane.\"\r\r\taChar == $x ifTrue: [^ self removeClass].\r\taChar == $d ifTrue: [^ self forgetClass]. \r\r\t^ self messageListKey: aChar from: view \"picks up b,h,p\"! !\r\r!ChangeSorter methodsFor: 'class list' stamp: 'BG 10/28/2003 20:48'!\rclassListMenu: aMenu shifted: shifted\r\t\"Fill aMenu with items appropriate for the class list\"\r\r\taMenu title: 'class list'.\r\t(parent notNil and: [shifted not])\r\t\tifTrue: [aMenu addList: #( \"These two only apply to dual change sorters\"\r\t\t\t('copy class chgs to other side'\t\t\tcopyClassToOther)\t\r\t\t\t('move class chgs to other side'\t\t\tmoveClassToOther))].\r\r\taMenu addList: (shifted\r\t\tifFalse: [#(\r\t\t\t-\r\t\t\t('delete class from change set (d)'\t\tforgetClass)\r\t\t\t('remove class from system (x)'\t\t\tremoveClass)\r\t\t\t-\r\t\t\t('browse full (b)'\t\t\t\t\t\tbrowseMethodFull)\r\t\t\t('browse hierarchy (h)'\t\t\t\t\tspawnHierarchy)\r\t\t\t('browse protocol (p)'\t\t\t\t\tbrowseFullProtocol)\r\t\t\t-\r\t\t\t('printOut'\t\t\t\t\t\t\t\tprintOutClass)\r\t\t\t('fileOut'\t\t\t\t\t\t\t\tfileOutClass)\r\t\t\t-\r\t\t\t('inst var refs...'\t\t\t\t\t\tbrowseInstVarRefs)\r\t\t\t('inst var defs...'\t\t\t\t\t\tbrowseInstVarDefs)\r\t\t\t('class var refs...'\t\t\t\t\t\tbrowseClassVarRefs)\r\t\t\t('class vars'\t\t\t\t\t\t\t\tbrowseClassVariables)\r\t\t\t('class refs (N)'\t\t\t\t\t\t\tbrowseClassRefs)\r\t\t\t-\r\t\t\t('more...'\t\t\t\t\t\t\t\tofferShiftedClassListMenu))]\r\r\t\tifTrue: [#(\r\t\t\t-\r\t\t\t('unsent methods'\t\t\t\t\t\tbrowseUnusedMethods)\r\t\t\t('unreferenced inst vars'\t\t\t\tshowUnreferencedInstVars)\r\t\t\t('unreferenced class vars'\t\t\t\tshowUnreferencedClassVars)\r\t\t\t-\r\t\t\t('sample instance'\t\t\t\t\t\tmakeSampleInstance)\r\t\t\t('inspect instances'\t\t\t\t\t\tinspectInstances)\r\t\t\t('inspect subinstances'\t\t\t\t\tinspectSubInstances)\r\t\t\t-\r\t\t\t('more...'\t\t\t\t\t\t\t\tofferUnshiftedClassListMenu ))]).\r\t^ aMenu! !\r\r!ChangeSorter methodsFor: 'class list' stamp: 'sw 2/26/2001 12:00'!\rclassMenu: aMenu\r\t\"Set up aMenu for the class-list.  Retained for backward compatibility with old change sorters in image segments\"\r\r\t^ self classListMenu: aMenu shifted: false! !\r\r!ChangeSorter methodsFor: 'class list' stamp: 'sw 3/6/2001 12:40'!\rclassMenu: aMenu shifted: shifted\r\t\"Fill aMenu with items appropriate for the class list.  Retained for bkwd compatibility\"\r\r\t^ self classListMenu: aMenu shifted: shifted! !\r\r!ChangeSorter methodsFor: 'class list' stamp: 'nb 6/17/2003 12:25'!\rcopyClassToOther\r\t\"Place these changes in the other changeSet also\"\r\r\t| otherSorter otherChangeSet |\r\tself checkThatSidesDiffer: [^ self].\r\tself okToChange ifFalse: [^ Beeper beep].\r\tcurrentClassName ifNil: [^ Beeper beep].\r\totherSorter _ parent other: self.\r\totherChangeSet _ otherSorter changeSet.\r\r\totherChangeSet absorbClass: self selectedClassOrMetaClass name from: myChangeSet.\r\totherSorter showChangeSet: otherChangeSet.! !\r\r!ChangeSorter methodsFor: 'class list' stamp: 'tk 4/24/1998 09:14'!\rcurrentClassName\r\r\t^ currentClassName! !\r\r!ChangeSorter methodsFor: 'class list' stamp: 'sw 1/28/1999 12:30'!\rcurrentClassName: aString\r\r\tcurrentClassName _ aString.\r\tcurrentSelector _ nil.\t\"fix by wod\"\r\tself changed: #currentClassName.\r\tself changed: #messageList.\r\tself setContents.\r\tself contentsChanged.! !\r\r!ChangeSorter methodsFor: 'class list' stamp: 'kfr 6/16/2000 16:27'!\rfileOutClass\r\t\"this is a hack!!!! makes a new change set, called the class name, adds author initials to try to make a unique change set name, files it out and removes it. kfr 16 june 2000\" \r\t| aSet |\r\t\"File out the selected class set.\"\r     aSet _ self class newChangeSet: currentClassName.\r\taSet absorbClass: self selectedClassOrMetaClass name from: myChangeSet.\r\taSet fileOut.\r\tself class removeChangeSet: aSet.\r\tparent modelWakeUp.\t\"notice object conversion methods created\"\r\r! !\r\r!ChangeSorter methodsFor: 'class list' stamp: 'ls 8/12/1998 23:47'!\rforgetClass\r\t\"Remove all mention of this class from the changeSet\"\r\r\tself okToChange ifFalse: [^ self].\r\tcurrentClassName ifNotNil: [\r\t\tmyChangeSet removeClassChanges: currentClassName.\r\t\tcurrentClassName _ nil.\r\t\tcurrentSelector _ nil.\r\t\tself showChangeSet: myChangeSet].\r! !\r\r!ChangeSorter methodsFor: 'class list' stamp: 'sw 3/5/2001 18:30'!\rmessageListKey: aChar from: view\r\t\"Respond to a Command key in the message-list pane.\"\r\r\taChar == $d ifTrue: [^ self forget].\r\tsuper messageListKey: aChar from: view! !\r\r!ChangeSorter methodsFor: 'class list' stamp: 'nb 6/17/2003 12:25'!\rmoveClassToOther\r\t\"Place class changes in the other changeSet and remove them from this one\"\r\r\tself checkThatSidesDiffer: [^ self].\r\t(self okToChange and: [currentClassName notNil]) ifFalse: [^ Beeper beep].\r\r\tself copyClassToOther.\r\tself forgetClass! !\r\r!ChangeSorter methodsFor: 'class list' stamp: 'sw 12/7/1998 09:43'!\rselectedClass\r\t\"Answer the currently-selected class.  If there is no selection, or if the selection refers to a class no longer extant, return nil\"\r\t| c |\r\t^ currentClassName ifNotNil: [(c _ self selectedClassOrMetaClass)\r\t\tifNotNil: [c theNonMetaClass]]! !\r\r!ChangeSorter methodsFor: 'class list' stamp: 'tk 5/7/1998 13:48'!\rselectedClassOrMetaClass\r\t\"Careful, the class may have been removed!!\"\r\r\t| cName |\r\tcurrentClassName ifNil: [^ nil].\r\t(currentClassName endsWith: ' class')\r\t\tifTrue: [cName _ (currentClassName copyFrom: 1 to: currentClassName size-6) asSymbol.\r\t\t\t\t^ (Smalltalk at: cName ifAbsent: [^nil]) class]\r\t\tifFalse: [cName _ currentClassName asSymbol.\r\t\t\t\t^ Smalltalk at: cName ifAbsent: [nil]]! !\r\r\r!ChangeSorter methodsFor: 'message list' stamp: 'di 3/23/2000 13:34'!\rbrowseVersions\r\t\"Create and schedule a changelist browser on the versions of the \r\tselected message.\"\r\t| class selector method category pair sourcePointer |\r\r\t(selector _ self selectedMessageName) ifNil: [^ self].\r\tclass _ self selectedClassOrMetaClass.\r\t(class includesSelector: selector)\r\t\tifTrue: [method _ class compiledMethodAt: selector.\r\t\t\t\tcategory _ class whichCategoryIncludesSelector: selector.\r\t\t\t\tsourcePointer _ nil]\r\t\tifFalse: [pair _ myChangeSet methodInfoFromRemoval: {class name. selector}.\r\t\t\t\tpair ifNil: [^ nil].\r\t\t\t\tsourcePointer _ pair first.\r\t\t\t\tmethod _ CompiledMethod toReturnSelf setSourcePointer: sourcePointer.\r\t\t\t\tcategory _ pair last].\r\tVersionsBrowser\r\t\tbrowseVersionsOf: method\r\t\tclass: self selectedClass meta: class isMeta\r\t\tcategory: category selector: selector\r\t\tlostMethodPointer: sourcePointer.\r! !\r\r!ChangeSorter methodsFor: 'message list' stamp: 'sw 7/8/1999 12:31'!\rcopyMethodToOther\r\t\"Place this change in the other changeSet also\"\r\t| other cls sel |\r\tself checkThatSidesDiffer: [^ self].\r\tcurrentSelector ifNotNil:\r\t\t[other _ (parent other: self) changeSet.\r\t\tcls _ self selectedClassOrMetaClass.\r\t\tsel _ currentSelector asSymbol.\r\r\t\tother absorbMethod: sel class: cls from: myChangeSet.\r\t\t(parent other: self) showChangeSet: other]\r! !\r\r!ChangeSorter methodsFor: 'message list' stamp: 'tk 4/24/1998 09:15'!\rcurrentSelector\r\r\t^ currentSelector! !\r\r!ChangeSorter methodsFor: 'message list' stamp: 'sw 1/28/1999 12:31'!\rcurrentSelector: messageName\r\r\tcurrentSelector _ messageName.\r\tself changed: #currentSelector.\r\tself setContents.\r\tself contentsChanged.! !\r\r!ChangeSorter methodsFor: 'message list' stamp: 'di 6/22/1998 02:08'!\rforget\r\t\"Drop this method from the changeSet\"\r\r\tself okToChange ifFalse: [^ self].\r\tcurrentSelector ifNotNil: [\r\t\tmyChangeSet removeSelectorChanges: self selectedMessageName \r\t\t\tclass: self selectedClassOrMetaClass.\r\t\tcurrentSelector _ nil.\r\t\tself showChangeSet: myChangeSet]! !\r\r!ChangeSorter methodsFor: 'message list' stamp: 'di 4/25/2000 10:33'!\rmessageList \r\r\t| probe newSelectors |\r\tcurrentClassName ifNil: [^ #()].\r\tprobe _ (currentClassName endsWith: ' class')\r\t\tifTrue: [currentClassName]\r\t\tifFalse: [currentClassName asSymbol].\r\tnewSelectors _ myChangeSet selectorsInClass: probe.\r\t(newSelectors includes: currentSelector) ifFalse: [currentSelector _ nil].\r\t^ newSelectors asSortedCollection\r! !\r\r!ChangeSorter methodsFor: 'message list' stamp: 'sw 3/9/2001 14:27'!\rmessageListMenu: aMenu shifted: shifted\r\t\"Fill aMenu with items appropriate for the message list; could be for a single or double changeSorter\"\r\r\t^ self messageMenu: aMenu shifted: shifted! !\r\r!ChangeSorter methodsFor: 'message list' stamp: 'BG 10/28/2003 20:48'!\rmessageMenu: aMenu shifted: shifted\r\t\"Fill aMenu with items appropriate for the message list; could be for a single or double changeSorter\"\r\r\tshifted ifTrue: [^ self shiftedMessageMenu: aMenu].\r\r\taMenu title: 'message list'.\r\t\r\tparent ifNotNil:\r\t\t[aMenu addList: #(\r\t\t\t('copy method to other side'\t\t\tcopyMethodToOther)\r\t\t\t('move method to other side'\t\t\tmoveMethodToOther))].\r\r\taMenu addList: #(\r\t\t\t('delete method from changeSet (d)'\tforget)\r\t\t\t-\r\t\t\t('remove method from system (x)'\tremoveMessage)\r\t\t\t\t-\r\t\t\t('browse full (b)'\t\t\t\t\tbrowseMethodFull)\r\t\t\t('browse hierarchy (h)'\t\t\t\tspawnHierarchy)\r\t\t\t('browse method (O)'\t\t\t\topenSingleMessageBrowser)\r\t\t\t('browse protocol (p)'\t\t\t\tbrowseFullProtocol)\r\t\t\t-\r\t\t\t('fileOut'\t\t\t\t\t\t\tfileOutMessage)\r\t\t\t('printOut'\t\t\t\t\t\t\tprintOutMessage)\r\t\t\t-\r\t\t\t('senders of... (n)'\t\t\t\t\tbrowseSendersOfMessages)\r\t\t\t('implementors of... (m)'\t\t\t\tbrowseMessages)\r\t\t\t('inheritance (i)'\t\t\t\t\tmethodHierarchy)\r\t\t\t('versions (v)'\t\t\t\t\t\tbrowseVersions)\r\t\t\t-\r\t\t\t('more...'\t\t\t\t\t\t\tshiftedYellowButtonActivity)).\r\t^ aMenu\r! !\r\r!ChangeSorter methodsFor: 'message list' stamp: 'nb 6/17/2003 12:25'!\rmoveMethodToOther\r\t\"Place this change in the other changeSet and remove it from this side\"\r\t| other cls sel |\r\tself checkThatSidesDiffer: [^ self].\r\tself okToChange ifFalse: [^ Beeper beep].\r\tcurrentSelector ifNotNil:\r\t\t[other _ (parent other: self) changeSet.\r\t\tother == myChangeSet ifTrue: [^ self beep].\r\t\tcls _ self selectedClassOrMetaClass.\r\t\tsel _ currentSelector asSymbol.\r\t\tother absorbMethod: sel class: cls from: myChangeSet.\r\t\r\t\t(parent other: self) showChangeSet: other.\r\t\tself forget \"removes the method from this side\"]\r! !\r\r!ChangeSorter methodsFor: 'message list' stamp: 'di 6/21/1998 23:13'!\rremoveFromCurrentChanges\r\t\"Redisplay after removal in case we are viewing the current changeSet\"\r\r\tsuper removeFromCurrentChanges.\r\tcurrentSelector _ nil.\r\tself showChangeSet: myChangeSet! !\r\r!ChangeSorter methodsFor: 'message list' stamp: 'sd 5/11/2003 18:38'!\rremoveMessage\r\t\"Remove the selected msg from the system. Real work done by the \r\tparent, a ChangeSorter\"\r\t| confirmation sel |\r\tself okToChange\r\t\tifFalse: [^ self].\r\tcurrentSelector\r\t\tifNotNil: [confirmation _ self systemNavigation   confirmRemovalOf: (sel _ self selectedMessageName) on: self selectedClassOrMetaClass.\r\t\t\tconfirmation == 3\r\t\t\t\tifTrue: [^ self].\r\t\t\tself selectedClassOrMetaClass removeSelector: sel.\r\t\t\tself update.\r\t\t\tconfirmation == 2\r\t\t\t\tifTrue: [self systemNavigation browseAllCallsOn: sel]]! !\r\r!ChangeSorter methodsFor: 'message list' stamp: 'jm 5/4/1998 07:32'!\rselectedMessageName\r\r\tcurrentSelector ifNil: [^ nil].\r\t^ currentSelector asSymbol! !\r\r!ChangeSorter methodsFor: 'message list' stamp: 'BG 11/1/2003 13:24'!\rshiftedMessageMenu: aMenu\r\t\"Arm the menu so that it holds items appropriate to the message-list while the shift key is down.  Answer the menu.\"\r\r\t^ aMenu addList: #(\r\t\t-\r\t\t('toggle diffing (D)'\t\t\t\t\ttoggleDiffing)\r\t\t('implementors of sent messages'\t\tbrowseAllMessages)\r\t\t('change category...'\t\t\t\tchangeCategory)\r\t\t\t-\r\t\t('sample instance'\t\t\t\t\tmakeSampleInstance)\r\t\t('inspect instances'\t\t\t\t\tinspectInstances)\r\t\t('inspect subinstances'\t\t\t\tinspectSubInstances)\r\t\t-\r\t\t('change sets with this method'\t\tfindMethodInChangeSets)\r\t\t('revert to previous version'\t\t\trevertToPreviousVersion)\r\t\t('revert & remove from changes'\trevertAndForget)\r\t\t-\r\t\t('more...'\t\t\t\t\t\t\tunshiftedYellowButtonActivity))! !\r\r\r!ChangeSorter methodsFor: 'code pane' stamp: 'tk 5/10/1999 17:24'!\rcontents: aString notifying: aController \r\t\"Compile the code in aString. Notify aController of any syntax errors. \r\tCreate an error if the category of the selected message is unknown. \r\tAnswer false if the compilation fails. Otherwise, if the compilation \r\tcreated a new method, deselect the current selection. Then answer true.\"\r\t| category selector class oldSelector |\r\r\t(class _ self selectedClassOrMetaClass) ifNil:\r\t\t[(myChangeSet preambleString == nil or: [aString size == 0]) ifTrue: [ ^ false].\r\t\t(aString count: [:char | char == $\"]) odd \r\t\t\tifTrue: [self inform: 'unmatched double quotes in preamble']\r\t\t\tifFalse: [(Scanner new scanTokens: aString) size > 0 ifTrue: [\r\t\t\t\tself inform: 'Part of the preamble is not within double-quotes.\rTo put a double-quote inside a comment, type two double-quotes in a row.\r(Ignore this warning if you are including a doIt in the preamble.)']].\r\t\tmyChangeSet preambleString: aString.\r\t\tself currentSelector: nil.  \"forces update with no 'unsubmitted chgs' feedback\"\r\t\t^ true].\r\toldSelector _ self selectedMessageName.\r\tcategory _ class organization categoryOfElement: oldSelector.\r\tselector _ class compile: aString\r\t\t\t\tclassified: category\r\t\t\t\tnotifying: aController.\r\tselector ifNil: [^ false].\r\t(self messageList includes: selector)\r\t\tifTrue: [self currentSelector: selector]\r\t\tifFalse: [self currentSelector: oldSelector].\r\tself update.\r\t^ true! !\r\r!ChangeSorter methodsFor: 'code pane' stamp: 'sw 11/13/2001 07:35'!\rsetContents\r\t\"return the source code that shows in the bottom pane\"\r\r\t| sel class strm changeType |\r\tself clearUserEditFlag.\r\tcurrentClassName ifNil: [^ contents _ myChangeSet preambleString ifNil: ['']].\r\tclass _ self selectedClassOrMetaClass.\r\t(sel _ currentSelector) == nil\r\t\tifFalse: [changeType _ (myChangeSet atSelector: (sel _ sel asSymbol) class: class).\r\t\t\tchangeType == #remove\r\t\t\t\tifTrue: [^ contents _ 'Method has been removed (see versions)'].\r\t\t\tchangeType == #addedThenRemoved\r\t\t\t\tifTrue: [^ contents _ 'Added then removed (see versions)'].\r\t\t\tclass ifNil: [^ contents _ 'Method was added, but cannot be found!!'].\r\t\t\t(class includesSelector: sel)\r\t\t\t\tifFalse: [^ contents _ 'Method was added, but cannot be found!!'].\r\t\t\tcontents _ class sourceCodeAt: sel.\r\t\t\t(#(prettyPrint colorPrint prettyDiffs altSyntax) includes: contentsSymbol) ifTrue:\r\t\t\t\t[contents _ class compilerClass new\r\t\t\t\t\tformat: contents in: class notifying: nil contentsSymbol: contentsSymbol].\r\t\t\tself showingAnyKindOfDiffs\r\t\t\t\tifTrue: [contents _ self diffFromPriorSourceFor: contents].\r\t\t\t^ contents _ contents asText makeSelectorBoldIn: class]\r\t\tifTrue: [strm _ WriteStream on: (String new: 100).\r\t\t\t(myChangeSet classChangeAt: currentClassName) do:\r\t\t\t\t[:each |\r\t\t\t\teach = #remove ifTrue: [strm nextPutAll: 'Entire class was removed.'; cr].\r\t\t\t\teach = #addedThenRemoved ifTrue: [strm nextPutAll: 'Class was added then removed.'].\r\t\t\t\teach = #rename ifTrue: [strm nextPutAll: 'Class name was changed.'; cr].\r\t\t\t\teach = #add ifTrue: [strm nextPutAll: 'Class definition was added.'; cr].\r\t\t\t\teach = #change ifTrue: [strm nextPutAll: 'Class definition was changed.'; cr].\r\t\t\t\teach = #reorganize ifTrue: [strm nextPutAll: 'Class organization was changed.'; cr].\r\t\t\t\teach = #comment ifTrue: [strm nextPutAll: 'New class comment.'; cr.\r\t\t\t\t]].\r\t\t\t^ contents _ strm contents].! !\r\r!ChangeSorter methodsFor: 'code pane' stamp: 'sw 11/13/2001 07:34'!\rtoggleDiffing\r\t\"Toggle whether diffs should be shown in the code pane\"\r\r\tself okToChange ifTrue:\r\t\t[super toggleDiffing.\r\t\tself changed: #contents.\r\t\tself update]\r\r! !\r\r!ChangeSorter methodsFor: 'code pane' stamp: 'JW 2/2/2001 21:41'!\rwantsOptionalButtons\r\t\"No optional buttons for ChangeSorter\"\r\t^false! !\r\r\r!ChangeSorter methodsFor: 'annotation' stamp: 'sw 2/22/2001 10:35'!\raddPriorVersionsCountForSelector: aSelector ofClass: aClass to: aStream\r\t\"Add an annotation detailing the prior versions count.  Specially handled here for the case of a selector no longer in the system, whose prior version is pointed to by the lost-method pointer in the change held on to by the changeset\"\r\r\t(aClass includesSelector: aSelector) ifTrue:\r\t\t[^ super addPriorVersionsCountForSelector: aSelector ofClass: aClass to: aStream].\r\taStream nextPutAll:\r\t\t((myChangeSet methodInfoFromRemoval: {aClass name. aSelector})\r\t\t\tifNil:\r\t\t\t\t['no prior versions']\r\t\t\tifNotNil:\r\t\t\t\t['version(s) retrievable here']), self annotationSeparator! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rChangeSorter class\r\tinstanceVariableNames: ''!\r\r!ChangeSorter class methodsFor: 'enumerating' stamp: 'di 4/5/2001 21:33'!\rallChangeSetNames\r\t^ self allChangeSets collect: [:c | c name]! !\r\r!ChangeSorter class methodsFor: 'enumerating' stamp: 'di 4/5/2001 21:27'!\rallChangeSets\r\t\"Return the list of all current ChangeSets\"\r\r\t^ AllChangeSets! !\r\r!ChangeSorter class methodsFor: 'enumerating' stamp: 'di 4/5/2001 21:34'!\rallChangeSetsWithClass: class selector: selector\r\tclass ifNil: [^ #()].\r\t^ self allChangeSets select: \r\t\t[:cs | (cs atSelector: selector class: class) ~~ #none]! !\r\r!ChangeSorter class methodsFor: 'enumerating' stamp: 'nk 6/26/2002 12:39'!\rchangeSet: aChangeSet containsClass: aClass\r\t| theClass |\r\ttheClass _ Smalltalk classNamed: aClass.\r\ttheClass ifNil: [^ false].\r\t^ aChangeSet containsClass: theClass! !\r\r!ChangeSorter class methodsFor: 'enumerating' stamp: 'di 4/5/2001 19:42'!\rchangeSetNamed: aName\r\t\"Return the change set of the given name, or nil if none found.  1/22/96 sw\"\r\r\t^ AllChangeSets\r\t\t\tdetect: [:aChangeSet | aChangeSet name = aName]\r\t\t\tifNone: [nil]! !\r\r!ChangeSorter class methodsFor: 'enumerating' stamp: 'di 4/5/2001 19:42'!\rchangeSetsNamedSuchThat: nameBlock\r\t\"(ChangeSorter changeSetsNamedSuchThat:\r\t\t[:name | name first isDigit and: [name initialInteger >= 373]])\r\t\tdo: [:cs | AllChangeSets remove: cs wither]\"\r\r\t^ AllChangeSets select: [:aChangeSet | nameBlock value: aChangeSet name]! !\r\r!ChangeSorter class methodsFor: 'enumerating' stamp: 'di 4/6/2001 09:49'!\rexistingOrNewChangeSetNamed: aName\r\r\t| newSet |\r\r\t^(self changeSetNamed: aName) ifNil: [\r\t\tnewSet _ ChangeSet basicNewNamed: aName.\r\t\tAllChangeSets add: newSet.\r\t\tnewSet\r\t]! !\r\r!ChangeSorter class methodsFor: 'enumerating' stamp: 'di 4/3/2000 14:51'!\rgatherChangeSets\t\t\"ChangeSorter gatherChangeSets\"\r\t\"Collect any change sets created in other projects\"\r\t| allChangeSets obsolete |\r\tallChangeSets _ AllChangeSets asSet.\r\tChangeSet allSubInstances do: [:each |\r\t\t(allChangeSets includes: each) == (obsolete _ each isMoribund) ifTrue:[\r\t\t\tobsolete\r\t\t\t\tifTrue: [\"Was included and is obsolete.\"\r\t\t\t\t\t\tAllChangeSets remove: each]\r\t\t\t\tifFalse: [\"Was not included and is not obsolete.\"\r\t\t\t\t\t\tAllChangeSets add: each]]].\r\t^ AllChangeSets\r! !\r\r!ChangeSorter class methodsFor: 'enumerating' stamp: 'sw 8/20/1999 10:27'!\rhighestNumberedChangeSet\r\t\"ChangeSorter highestNumberedChangeSet\"\r\t| aList |\r\taList _ (self allChangeSetNames select: [:aString | aString startsWithDigit] thenCollect:\r\t\t[:aString | aString initialIntegerOrNil]).\r\t^ (aList size > 0)\r\t\tifTrue:\r\t\t\t[aList max]\r\t\tifFalse:\r\t\t\t[nil]\r! !\r\r!ChangeSorter class methodsFor: 'enumerating' stamp: 'di 4/5/2001 21:37'!\rmostRecentChangeSetWithChangeForClass: class selector: selector\r\t| hits |\r\thits _ self allChangeSets select: \r\t\t[:cs | (cs atSelector: selector class: class) ~~ #none].\r\thits isEmpty ifTrue: [^ 'not in any change set'].\r\t^ 'recent cs: ', hits last name! !\r\r!ChangeSorter class methodsFor: 'enumerating' stamp: 'BG 10/28/2003 20:38'!\rpromoteToTop: aChangeSet\r\t\"make aChangeSet the first in the list from now on\"\r\tAllChangeSets remove: aChangeSet ifAbsent: [^ self].\r\tAllChangeSets add: aChangeSet.! !\r\r\r!ChangeSorter class methodsFor: 'class initialization' stamp: 'sw 3/30/2001 16:01'!\rbelongsInAdditions: aChangeSet\r\t\"Answer whether a change set belongs in the Additions category, which is fed by all change sets that are neither numbered nor in the initial release\"\r\r\t^ (((self belongsInProjectsInRelease: aChangeSet) or:\r\t\t[self belongsInNumbered: aChangeSet])) not! !\r\r!ChangeSorter class methodsFor: 'class initialization' stamp: 'sw 3/30/2001 12:38'!\rbelongsInAll: aChangeSet\r\t\"Answer whether a change set belongs in the All category\"\r\r\t^ true ! !\r\r!ChangeSorter class methodsFor: 'class initialization' stamp: 'sw 3/30/2001 12:47'!\rbelongsInMyInitials: aChangeSet\r\t\"Answer whether a change set belongs in the MyInitials category. \"\r\r\t^ aChangeSet name endsWith: ('-', Utilities authorInitials)! !\r\r!ChangeSorter class methodsFor: 'class initialization' stamp: 'sw 3/30/2001 12:45'!\rbelongsInNumbered:  aChangeSet\r\t\"Answer whether a change set belongs in the Numbered category. \"\r\r\t^  aChangeSet name startsWithDigit! !\r\r!ChangeSorter class methodsFor: 'class initialization' stamp: 'sw 3/30/2001 12:49'!\rbelongsInProjectChangeSets: aChangeSet\r\t\"Answer whether a change set belongs in the MyInitials category. \"\r\r\t^ aChangeSet belongsToAProject! !\r\r!ChangeSorter class methodsFor: 'class initialization' stamp: 'sw 3/30/2001 12:44'!\rbelongsInProjectsInRelease:  aChangeSet\r\t\"Answer whether a change set belongs in the ProjectsInRelease category.  You can hand-tweak this to suit your working style.  This just covers the space of project names in the 2.9, 3.0, and 3.1a systems\"\r\r\t| aString |\r\t^ ((aString _ aChangeSet name) beginsWith: 'Play With Me') or: [self changeSetNamesInReleaseImage includes: aString]! !\r\r!ChangeSorter class methodsFor: 'class initialization' stamp: 'sw 3/30/2001 12:56'!\rbelongsInRecentUpdates: aChangeSet\r\t\"Answer whether a change set belongs in the RecentUpdates category.\"\r\r\t^ aChangeSet name startsWithDigit and:\r\t\t\t[aChangeSet name asInteger >= self recentUpdateMarker]! !\r\r!ChangeSorter class methodsFor: 'class initialization' stamp: 'sw 3/29/2001 14:44'!\rchangeSetCategoryNamed: aName\r\t\"Answer the changeSetCategory of the given name, or nil if none\"\r\r\t^ ChangeSetCategories elementAt: aName asSymbol ! !\r\r!ChangeSorter class methodsFor: 'class initialization' stamp: 'sw 4/16/2002 00:47'!\rchangeSetNamesInReleaseImage\r\t\"Answer a list of names of project change sets that come pre-shipped in the latest sytem release.  On the brink of shipping a new release, call 'ChangeSorter noteChangeSetsInRelease'  \"\r\r\t^ ChangeSetNamesInRelease ifNil:\r\t\t[ChangeSetNamesInRelease _ self changeSetNamesInThreeOh]! !\r\r!ChangeSorter class methodsFor: 'class initialization' stamp: 'sw 4/16/2002 00:45'!\rchangeSetNamesInThreeOh\r\t\"Hard-coded: answer a list of names of project change sets that came pre-shipped in Squeak 3.0\"\r\r\t^ #('The Worlds of Squeak' 'Fun with Morphic' 'Games' 'Fun With Music' 'Building with Squeak' 'Squeak and the Internet' 'Squeak in 3D' 'More About Sound' ) ! !\r\r!ChangeSorter class methodsFor: 'class initialization' stamp: 'asm 4/10/2003 12:41'!\rinitialize\r\t\"Initialize the class variables\"\r\r\tAllChangeSets == nil ifTrue:\r\t\t[AllChangeSets _ OrderedCollection new].\r\tself gatherChangeSets.\r\tChangeSetCategories ifNil:\r\t\t[self initializeChangeSetCategories].\r\tRecentUpdateMarker _ 0.\r\r\t\"ChangeSorter initialize\"\r\r\tFileList registerFileReader: self.\r\r\tself registerInFlapsRegistry.\r! !\r\r!ChangeSorter class methodsFor: 'class initialization' stamp: 'sw 3/30/2001 13:30'!\rinitializeChangeSetCategories\r\t\"Initialize the set of change-set categories\"\r\t\"ChangeSorter initializeChangeSetCategories\"\r\r\t| aCategory |\r\tChangeSetCategories _ ElementCategory new categoryName: #ChangeSetCategories.\r\r\taCategory _ ChangeSetCategory new categoryName: #All.\r\taCategory membershipSelector: #belongsInAll:.\r\taCategory documentation: 'All change sets known to the system'.\r\tChangeSetCategories addCategoryItem: aCategory.\r\r\taCategory _ ChangeSetCategory new categoryName: #Additions.\r\taCategory membershipSelector: #belongsInAdditions:.\r\taCategory documentation: 'All unnumbered change sets except those representing projects in the system as initially released.'.\r\tChangeSetCategories addCategoryItem: aCategory.\r\r\taCategory _ ChangeSetCategory new categoryName: #MyInitials.\r\taCategory membershipSelector: #belongsInMyInitials:.\r\taCategory documentation: 'All change sets whose names end with the current author''s initials.'.\r\tChangeSetCategories addCategoryItem: aCategory.\r\r\taCategory _ ChangeSetCategory new categoryName: #Numbered.\r\taCategory membershipSelector: #belongsInNumbered:.\r\taCategory documentation: 'All change sets whose names start with a digit -- normally these will be the official updates to the system.'.\r\tChangeSetCategories addCategoryItem: aCategory.\r\r\taCategory _ ChangeSetCategory new categoryName: #ProjectChangeSets.\r\taCategory membershipSelector: #belongsInProjectChangeSets:.\r\taCategory documentation: 'All change sets that are currently associated with projects present in the system right now.'.\r\tChangeSetCategories addCategoryItem: aCategory.\r\r\taCategory _ ChangeSetCategory new categoryName: #ProjectsInRelease.\r\taCategory membershipSelector: #belongsInProjectsInRelease:.\r\taCategory documentation: 'All change sets belonging to projects that were shipped in the initial release of this version of Squeak'.\r\tChangeSetCategories addCategoryItem: aCategory.\r\r\taCategory _ ChangeSetCategory new categoryName: #RecentUpdates.\r\taCategory membershipSelector: #belongsInRecentUpdates:.\r\taCategory documentation: 'Updates whose numbers are at or beyond the number I have designated as the earliest one to qualify as Recent'.\r\tChangeSetCategories addCategoryItem: aCategory.\r\r\tChangeSetCategories elementsInOrder do: [:anElem | anElem reconstituteList] ! !\r\r!ChangeSorter class methodsFor: 'class initialization' stamp: 'sw 4/16/2002 00:47'!\rnoteChangeSetsInRelease\r\t\"Freshly compute what the change sets in the release are; to be called manually just before a release\"\r\r\tChangeSetNamesInRelease _ (Project allProjects collect: [:p | p name]) asSet asOrderedCollection.\r\r\"ChangeSorter noteChangeSetsInRelease\"! !\r\r!ChangeSorter class methodsFor: 'class initialization' stamp: 'asm 4/10/2003 12:42'!\rregisterInFlapsRegistry\r\t\"Register the receiver in the system's flaps registry\"\r\tself environment\r\t\tat: #Flaps\r\t\tifPresent: [:cl | cl registerQuad: #(ChangeSorter\t\t\tprototypicalToolWindow\t\t'Change Set'\t\t\t'A tool that allows you to view and manipulate all the code changes in a single change set')\r\t\t\t\t\t\tforFlapNamed: 'Tools']! !\r\r!ChangeSorter class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 12:32'!\runload\r\t\"Unload the receiver from global registries\"\r\r\tself environment at: #FileList ifPresent: [:cl |\r\tcl unregisterFileReader: self].\r\tself environment at: #Flaps ifPresent: [:cl |\r\tcl unregisterQuadsWithReceiver: self] ! !\r\r\r!ChangeSorter class methodsFor: 'adding' stamp: 'di 4/6/2001 09:46'!\rbasicNewChangeSet: newName\r\t| newSet |\r\tnewName ifNil: [^ nil].\r\t(self changeSetNamed: newName) ifNotNil:\r\t\t[self inform: 'Sorry that name is already used'.\r\t\t^ nil].\r\tnewSet _ ChangeSet basicNewNamed: newName.\r\tAllChangeSets add: newSet.\r\t^ newSet! !\r\r!ChangeSorter class methodsFor: 'adding' stamp: 'sd 5/23/2003 15:15'!\rnewChangeSet\r\t\"Prompt the user for a name, and establish a new change set of\r\tthat name (if ok), making it the current changeset.  Return nil\r\tof not ok, else return the actual changeset.\"\r\r\t| newName newSet |\r\tnewName _ FillInTheBlank\r\t\trequest: 'Please name the new change set:'\r\t\tinitialAnswer: ChangeSet defaultName.\r\tnewName isEmptyOrNil ifTrue:\r\t\t[^ nil].\r\tnewSet _ self basicNewChangeSet: newName.\r\tnewSet ifNotNil:\r\t\t[ChangeSet  newChanges: newSet].\r\t^ newSet! !\r\r!ChangeSorter class methodsFor: 'adding' stamp: 'sma 11/11/2000 23:23'!\rnewChangeSet: aName\r\t\"Makes a new change set called aName, add author initials to try to\r\tensure a unique change set name.\"\r\r\t| newName |\r\tnewName _ aName , FileDirectory dot , Utilities authorInitials.\r\t^ self basicNewChangeSet: newName! !\r\r!ChangeSorter class methodsFor: 'adding' stamp: 'sd 5/23/2003 15:15'!\rnewChangesFromStream: aStream named: aName\r\t\"File in the code from the stream into a new change set whose\r\tname is derived from aName. Leave the 'current change set'\r\tunchanged. Return the new change set or nil on failure.\"\r\r\t| oldChanges newName newSet |\r\toldChanges _ ChangeSet current.\r\tPreviousSet _ oldChanges name. \t\t\"so a Bumper update can find it\"\r\tnewName _ aName sansPeriodSuffix.\r\tnewSet _ self basicNewChangeSet: newName.\r\t[newSet ifNotNil:\r\t\t[ChangeSet  newChanges: newSet.\r\t\taStream fileInAnnouncing: 'Loading ', newName, '...'.\r\t\tTranscript cr; show: 'File ', aName, ' successfully filed in to change set ', newName].\r\taStream close] ensure: [\r\t\t\tChangeSet  newChanges: oldChanges].\r\t^ newSet! !\r\r\r!ChangeSorter class methodsFor: 'removing' stamp: 'sw 1/6/2001 06:21'!\rdeleteChangeSetsNumberedLowerThan: anInteger\r\t\"Delete all changes sets whose names start with integers smaller than anInteger\"\r\r\tChangeSorter removeChangeSetsNamedSuchThat:\r\t\t[:aName | aName first isDigit and: [aName initialIntegerOrNil < anInteger]].\r\r\t\"ChangeSorter deleteChangeSetsNumberedLowerThan: (ChangeSorter highestNumberedChangeSet name initialIntegerOrNil - 500)\"\r! !\r\r!ChangeSorter class methodsFor: 'removing' stamp: 'sw 8/18/1999 09:44'!\rremoveChangeSet: aChangeSet\r\t\"Remove the given changeSet.  Caller must assure that it's cool to do this\"\r\r\tAllChangeSets remove: aChangeSet ifAbsent: [].\r\taChangeSet wither\r! !\r\r!ChangeSorter class methodsFor: 'removing' stamp: 'di 4/5/2001 21:12'!\rremoveChangeSetsNamedSuchThat: nameBlock\r\t(ChangeSorter changeSetsNamedSuchThat: nameBlock)\r\t\tdo: [:cs | self removeChangeSet: cs]! !\r\r!ChangeSorter class methodsFor: 'removing' stamp: 'di 4/5/2001 21:13'!\rremoveEmptyUnnamedChangeSets\r\t\"Remove all change sets that are empty, whose names start with Unnamed,\r\t\tand which are not nailed down by belonging to a Project.\"\r\t\"ChangeSorter removeEmptyUnnamedChangeSets\"\r\t| toGo |\r\t(toGo _ (self changeSetsNamedSuchThat: [:csName | csName beginsWith: 'Unnamed'])\r\t\tselect: [:cs | cs isEmpty and: [cs okayToRemoveInforming: false]])\r\t\tdo: [:cs | self removeChangeSet: cs].\r\tself inform: toGo size printString, ' change set(s) removed.'! !\r\r\r!ChangeSorter class methodsFor: 'services' stamp: 'sw 3/30/2001 13:43'!\rassuredChangeSetNamed: aName\r\t\"Answer a change set of the given name.  If one already exists, answer that, else create a new one and answer it.\"\r\r\t| existing |\r\t^ (existing _ self changeSetNamed: aName)\r\t\tifNotNil:\r\t\t\t[existing]\r\t\tifNil:\r\t\t\t[self basicNewChangeSet: aName]! !\r\r!ChangeSorter class methodsFor: 'services' stamp: 'sw 5/23/2001 13:30'!\rbrowseChangeSetsWithClass: class selector: selector\r\t\"Put up a menu comprising a list of change sets that hold changes for the given class and selector.  If the user selects one, open a single change-sorter onto it\"\r\r\t| hits index |\r\thits _ self allChangeSets select: \r\t\t[:cs | (cs atSelector: selector class: class) ~~ #none].\r\thits isEmpty ifTrue: [^ self inform: class name, '.', selector , '\ris not in any change set'].\r\tindex _ hits size == 1\r\t\tifTrue:\t[1]\r\t\tifFalse:\t[(PopUpMenu labelArray: (hits collect: [:cs | cs name])\r\t\t\t\t\tlines: #()) startUp].\r\tindex = 0 ifTrue: [^ self].\r\t(ChangeSorter new myChangeSet: (hits at: index)) open.\r! !\r\r!ChangeSorter class methodsFor: 'services' stamp: 'sw 5/23/2001 13:31'!\rbrowseChangeSetsWithSelector: aSelector\r\t\"Put up a list of all change sets that contain an addition, deletion, or change of any method with the given selector\"\r\r\t| hits index |\r\thits _ self allChangeSets select: \r\t\t[:cs | cs hasAnyChangeForSelector: aSelector].\r\thits isEmpty ifTrue: [^ self inform: aSelector , '\ris not in any change set'].\r\tindex _ hits size == 1\r\t\tifTrue:\t[1]\r\t\tifFalse:\t[(PopUpMenu labelArray: (hits collect: [:cs | cs name])\r\t\t\t\t\tlines: #()) startUp].\r\tindex = 0 ifTrue: [^ self].\r\t(ChangeSetBrowser new myChangeSet: (hits at: index)) open\r\r\"ChangeSorter browseChangeSetsWithSelector: #clearPenTrails\"\r! !\r\r!ChangeSorter class methodsFor: 'services' stamp: 'di 4/5/2001 21:36'!\rbuildAggregateChangeSet\r\t\"Establish a change-set named Aggregate which bears the union of all the changes in all the existing change-sets in the system (other than any pre-existing Aggregate).  This can be useful when wishing to discover potential conflicts between a disk-resident change-set and an image.  Formerly very useful, now some of its unique contributions have been overtaken by new features\"\r\r\t| aggregateChangeSet |\r\taggregateChangeSet _ self existingOrNewChangeSetNamed: 'Aggregate'.\r\taggregateChangeSet clear.\r\tself allChangeSets do:\r\t\t[:aChangeSet | aChangeSet == aggregateChangeSet ifFalse:\r\t\t\t[aggregateChangeSet assimilateAllChangesFoundIn: aChangeSet]]\r\r\"ChangeSorter buildAggregateChangeSet\"\r\r\t! !\r\r!ChangeSorter class methodsFor: 'services' stamp: 'sw 6/6/2001 12:51'!\rcountOfChangeSetsWithClass: aClass andSelector: aSelector\r\t\"Answer how many change sets record a change for the given class and selector\"\r\r\t^ (self allChangeSetsWithClass: aClass selector: aSelector) size! !\r\r!ChangeSorter class methodsFor: 'services' stamp: 'sw 6/6/2001 12:52'!\rdoesAnyChangeSetHaveClass: aClass andSelector: aSelector\r\t\"Answer whether any known change set bears a change for the given class and selector\"\r\r\t^ (self countOfChangeSetsWithClass: aClass andSelector: aSelector) > 0! !\r\r!ChangeSorter class methodsFor: 'services' stamp: 'sw 3/30/2001 00:30'!\rrecentUpdateMarker\r\t\"Answer the number representing the threshold of what counts as 'recent' for an update number.  This allow you to use the RecentUpdates category in a ChangeSorter to advantage\"\r\r\t^ RecentUpdateMarker ifNil: [RecentUpdateMarker _ 0]! !\r\r!ChangeSorter class methodsFor: 'services' stamp: 'sw 3/30/2001 00:30'!\rrecentUpdateMarker: aNumber\r\t\"Set the recent update marker as indicated\"\r\r\t^ RecentUpdateMarker _ aNumber! !\r\r!ChangeSorter class methodsFor: 'services' stamp: 'BG 10/28/2003 20:38'!\rreorderChangeSets\r\t\"Change the order of the change sets to something more convenient:\r\t\tFirst come the project changesets that come with the release.  These are mostly empty.\r\t\tNext come all numbered updates.\r\t\tNext come all remaining changesets\r\tIn a ChangeSorter, they will appear in the reversed order.\"\r\r\t\"ChangeSorter reorderChangeSets\"\r\r\t| newHead newMid newTail |\r\tnewHead _ OrderedCollection new.\r\tnewMid _ OrderedCollection new.\r\tnewTail _ OrderedCollection new.\r\tAllChangeSets do:\r\t\t[:aChangeSet |\r\t\t\t(self belongsInProjectsInRelease: aChangeSet)\r\t\t\t\tifTrue:\r\t\t\t\t\t[newHead add: aChangeSet]\r\t\t\t\tifFalse:\r\t\t\t\t\t[(self belongsInNumbered: aChangeSet)\r\t\t\t\t\t\tifTrue:\r\t\t\t\t\t\t\t[newMid add: aChangeSet]\r\t\t\t\t\t\tifFalse:\r\t\t\t\t\t\t\t[newTail add: aChangeSet]]].\r\tAllChangeSets _ newHead, newMid, newTail.! !\r\r!ChangeSorter class methodsFor: 'services' stamp: 'sd 5/23/2003 14:27'!\rsecondaryChangeSet\r\t\"Answer a likely change set to use as the second initial one in a Dual Change Sorter.  \"\r\r\tAllChangeSets size = 1 ifTrue: [^ AllChangeSets first].\r\tAllChangeSets last == ChangeSet current\r\t\tifTrue: \t[^ AllChangeSets at: (AllChangeSets size - 1)]\r\t\tifFalse:\t[^ AllChangeSets last]! !\r\r\r\r!ChangeSorter class methodsFor: 'fileIn/Out' stamp: 'ssa 9/3/2008 10:33'!\rfileIntoNewChangeSet: fullName\r\t\"File in all of the contents of the currently selected file, if any, into a new change set.\" \r\r\t| fn ff |\r\tfullName ifNil: [^ Beeper beep].\r\tff _ FileStream readOnlyFileNamed: (fn _  fullName).\r\t((FileDirectory extensionFor: fn) sameAs: 'html') ifTrue: [ff _ ff asHtml].\r\tself newChangesFromStream: ff named: (FileDirectory localNameFor: fn)! !\r\r!ChangeSorter class methodsFor: 'fileIn/Out' stamp: 'sd 2/6/2002 21:29'!\rfileReaderServicesForFile: fullName suffix: suffix\r\r\t^(suffix = 'st') | (suffix = 'cs') | (suffix = '*')\r\t\tifTrue: [ self services]\r\t\tifFalse: [#()]! !\r\r!ChangeSorter class methodsFor: 'fileIn/Out' stamp: 'sw 2/17/2002 01:36'!\rserviceFileIntoNewChangeSet\r\t\"Answer a service for installing a file into a new change set\"\r\r\t^ SimpleServiceEntry \r\t\tprovider: self \r\t\tlabel: 'install into new change set'\r\t\tselector: #fileIntoNewChangeSet:\r\t\tdescription: 'install the file as a body of code in the image: create a new change set and file-in the selected file into it'\r\t\tbuttonLabel: 'install'! !\r\r!ChangeSorter class methodsFor: 'fileIn/Out' stamp: 'sd 2/1/2002 22:47'!\rservices\r\r\t^ Array with: self serviceFileIntoNewChangeSet\r\r\t! !\r\r\r!ChangeSorter class methodsFor: 'utilities' stamp: 'sd 1/16/2004 21:36'!\rfileOutChangeSetsNamed: nameList\r\t\"File out the list of change sets whose names are provided\"\r     \"ChangeSorter fileOutChangeSetsNamed: #('New Changes' 'miscTidies-sw')\"\r\r\t| notFound aChangeSet infoString empty |\r\tnotFound _ OrderedCollection new.\r\tempty _ OrderedCollection new.\r\tnameList do:\r\t\t[:aName | (aChangeSet _ self changeSetNamed: aName)\r\t\t\tifNotNil:\r\t\t\t\t[aChangeSet isEmpty\r\t\t\t\t\tifTrue:\r\t\t\t\t\t\t[empty add: aName]\r\t\t\t\t\tifFalse:\r\t\t\t\t\t\t[aChangeSet fileOut]]\r\t\t\tifNil:\r\t\t\t\t[notFound add: aName]].\r\r\tinfoString _ (nameList size - notFound size) printString, ' change set(s) filed out'.\r\tnotFound size > 0 ifTrue:\r\t\t[infoString _ infoString, '\r\r', notFound size printString, ' change set(s) not found:'.\r\t\tnotFound do:\r\t\t\t[:aName | infoString _ infoString, '\r', aName]].\r\tempty size > 0 ifTrue:\r\t\t[infoString _ infoString, '\r', empty size printString, ' change set(s) were empty:'.\r\t\tempty do:\r\t\t\t[:aName | infoString _ infoString, '\r', aName]].\r\r\tself inform: infoString! !\rMessageSet subclass: #ChangedMessageSet\r\tinstanceVariableNames: 'changeSet'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Browser'!\r!ChangedMessageSet commentStamp: '<historical>' prior: 0!\rA ChangedMessageSet is a message set associated with a change-set; it bears an entry for every method added or changed in the change set, as well as for every class-comment of which the change-set bears a note.!\r\r\r!ChangedMessageSet methodsFor: 'initialization'!\rchangeSet: aChangeSet\r\tchangeSet _ aChangeSet! !\r\r\r!ChangedMessageSet methodsFor: 'acceptance' stamp: 'sw 6/26/2001 11:42'!\rcontents: aString notifying: aController\r\t\"Accept the string as new source for the current method, and make certain the annotation pane gets invalidated\"\r\r\t| existingSelector existingClass superResult newSelector |\r\texistingSelector _ self selectedMessageName.\r\texistingClass _ self selectedClassOrMetaClass.\r\r\tsuperResult _ super contents: aString notifying: aController.\r\tsuperResult ifTrue:  \"succeeded\"\r\t\t[newSelector _ Parser new parseSelector: aString.\r\t\tnewSelector ~= existingSelector\r\t\t\tifTrue:   \"Selector changed -- maybe an addition\"\r\t\t\t\t[self reformulateList.\r\t\t\t\tself changed: #messageList.\r\t\t\t\tself messageList doWithIndex:\r\t\t\t\t\t[:aMethodReference :anIndex |\r\t\t\t\t\t\t(aMethodReference actualClass == existingClass and:\r\t\t\t\t\t\t\t\t\t[aMethodReference methodSymbol == newSelector])\r\t\t\t\t\t\t\tifTrue:\r\t\t\t\t\t\t\t\t[self messageListIndex: anIndex]]]].\r\t^ superResult! !\r\r\r!ChangedMessageSet methodsFor: 'message list' stamp: 'sw 1/28/2001 20:59'!\rgrowable\r\t\"Answer whether the receiver can be changed by manual additions & deletions\"\r\r\t^ false! !\r\r\r!ChangedMessageSet methodsFor: 'reformulation' stamp: 'sw 6/26/2001 11:20'!\rreformulateList\r\t\"Reformulate the message list of the receiver\"\r\r\tself initializeMessageList: (changeSet changedMessageListAugmented select: \r\t\t[:each | each isValid])\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rChangedMessageSet class\r\tinstanceVariableNames: ''!\r\r!ChangedMessageSet class methodsFor: 'as yet unclassified' stamp: 'RAA 5/29/2001 10:19'!\ropenFor: aChangeSet\r\t\"Open up a ChangedMessageSet browser on the given change set; this is a conventional message-list browser whose message-list consists of all the methods in aChangeSet.  After any method submission, the message list is refigured, making it plausibly dynamic\"\r\r\t| messageSet |\r\r\tmessageSet _ aChangeSet changedMessageListAugmented select: [ :each | each isValid].\r\tself \r\t\topenMessageList: messageSet \r\t\tname: 'Methods in Change Set ', aChangeSet name\r\t\tautoSelect: nil\r\t\tchangeSet: aChangeSet! !\r\r!ChangedMessageSet class methodsFor: 'as yet unclassified' stamp: 'BG 10/28/2003 20:51'!\ropenMessageList: messageList name: labelString autoSelect: autoSelectString changeSet: aChangeSet\r\t| messageSet |\r\r\tmessageSet _ self messageList: messageList.\r\tmessageSet changeSet: aChangeSet.\r\tmessageSet autoSelectString: autoSelectString.\r\tSmalltalk isMorphic\r\t\tifTrue: []\r\t\tifFalse: [ScheduledControllers scheduleActive:  (self open: messageSet name: labelString)]! !\rMagnitude subclass: #Character\r\tinstanceVariableNames: 'value'\r\tclassVariableNames: 'CharacterTable ClassificationTable LetterBits LowercaseBit UppercaseBit'\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Text'!\r!Character commentStamp: '<historical>' prior: 0!\rI represent a character by storing its associated ASCII code (extended to 256 codes). My instances are created uniquely, so that all instances of a character ($R, for example) are identical.!\r\r\r!Character methodsFor: 'accessing'!\rasciiValue\r\t\"Answer the value of the receiver that represents its ascii encoding.\"\r\r\t^value! !\r\r!Character methodsFor: 'accessing'!\rdigitValue\r\t\"Answer 0-9 if the receiver is $0-$9, 10-35 if it is $A-$Z, and < 0 \r\totherwise. This is used to parse literal numbers of radix 2-36.\"\r\r\tvalue <= $9 asciiValue \r\t\tifTrue: [^value - $0 asciiValue].\r\tvalue >= $A asciiValue \r\t\tifTrue: [value <= $Z asciiValue ifTrue: [^value - $A asciiValue + 10]].\r\t^ -1! !\r\r\r!Character methodsFor: 'comparing'!\r< aCharacter \r\t\"Answer true if the receiver's value < aCharacter's value.\"\r\r\t^self asciiValue < aCharacter asciiValue! !\r\r!Character methodsFor: 'comparing'!\r= aCharacter \r\t\"Primitive. Answer true if the receiver and the argument are the same\r\tobject (have the same object pointer) and false otherwise. Optional. See\r\tObject documentation whatIsAPrimitive.\"\r\r\t<primitive: 110>\r\t^self == aCharacter! !\r\r!Character methodsFor: 'comparing'!\r> aCharacter \r\t\"Answer true if the receiver's value > aCharacter's value.\"\r\r\t^self asciiValue > aCharacter asciiValue! !\r\r!Character methodsFor: 'comparing'!\rhash\r\t\"Hash is reimplemented because = is implemented.\"\r\r\t^value! !\r\r\r!Character methodsFor: 'testing'!\risAlphaNumeric\r\t\"Answer whether the receiver is a letter or a digit.\"\r\r\t^self isLetter or: [self isDigit]! !\r\r!Character methodsFor: 'testing'!\risDigit\r\t\"Answer whether the receiver is a digit.\"\r\r\t^value >= 48 and: [value <= 57]! !\r\r!Character methodsFor: 'testing' stamp: 'dgd 8/24/2003 14:50'!\risLetter\r\t\"Answer whether the receiver is a letter.\"\r\r\t^ (ClassificationTable at: value + 1)\r\t\tanyMask: LetterBits! !\r\r!Character methodsFor: 'testing' stamp: 'dgd 8/24/2003 14:51'!\risLowercase\r\t\"Answer whether the receiver is a lowercase letter.\r\t(The old implementation answered whether the receiver is not an uppercase letter.)\"\r\r\t^ ((ClassificationTable at: value + 1)\r\t\tbitAnd: LowercaseBit)\r\t\t= LowercaseBit! !\r\r!Character methodsFor: 'testing' stamp: 'dgd 8/24/2003 14:52'!\risSafeForHTTP\r\t\"whether a character is 'safe', or needs to be escaped when used, eg, in a URL\"\r\t^ value < 128\r\t\tand: [self isAlphaNumeric\r\t\t\t\tor: ['.~-_' includes: self]]! !\r\r!Character methodsFor: 'testing'!\risSeparator\r\t\"Answer whether the receiver is one of the separator characters--space, \r\tcr, tab, line feed, or form feed.\"\r\r\tvalue = 32 ifTrue: [^true].\t\"space\"\r\tvalue = 13 ifTrue: [^true].\t\"cr\"\r\tvalue = 9 ifTrue: [^true].\t\"tab\"\r\tvalue = 10 ifTrue: [^true].\t\"line feed\"\r\tvalue = 12 ifTrue: [^true].\t\"form feed\"\r\t^false! !\r\r!Character methodsFor: 'testing' stamp: 'di 4/3/1999 00:38'!\risSpecial\r\t\"Answer whether the receiver is one of the special characters\"\r\r\t^'+-/\\*~<>=@,%|&?!!' includes: self! !\r\r!Character methodsFor: 'testing' stamp: 'dgd 8/24/2003 14:52'!\risUppercase\r\t\"Answer whether the receiver is an uppercase letter.\r\t(The old implementation answered whether the receiver is not a lowercase letter.)\"\r\r\t^ ((ClassificationTable at: value + 1)\r\t\tbitAnd: UppercaseBit)\r\t\t= UppercaseBit! !\r\r!Character methodsFor: 'testing'!\risVowel\r\t\"Answer whether the receiver is one of the vowels, AEIOU, in upper or \r\tlower case.\"\r\r\t^'AEIOU' includes: self asUppercase! !\r\r!Character methodsFor: 'testing'!\rtokenish\r\t\"Answer whether the receiver is a valid token-character--letter, digit, or \r\tcolon.\"\r\r\t^self isLetter or: [self isDigit or: [self = $:]]! !\r\r\r!Character methodsFor: 'copying' stamp: 'tk 12/9/2000 11:46'!\rclone\r\t\"Answer with the receiver, because Characters are unique.\"! !\r\r!Character methodsFor: 'copying'!\rcopy\r\t\"Answer with the receiver because Characters are unique.\"! !\r\r!Character methodsFor: 'copying'!\rdeepCopy\r\t\"Answer with the receiver because Characters are unique.\"! !\r\r!Character methodsFor: 'copying' stamp: 'tk 1/7/1999 16:50'!\rveryDeepCopyWith: deepCopier\r\t\"Return self.  I can't be copied.\"! !\r\r\r!Character methodsFor: 'printing'!\rhex\r\t^ String with: ('0123456789ABCDEF' at: value//16+1)\r\t\t\twith:  ('0123456789ABCDEF' at: value\\\\16+1)! !\r\r!Character methodsFor: 'printing'!\risLiteral\r\r\t^true! !\r\r!Character methodsFor: 'printing'!\rprintOn: aStream\r\r\taStream nextPut: $$.\r\taStream nextPut: self! !\r\r!Character methodsFor: 'printing' stamp: 'MPW 1/1/1901 22:04'!\rprintOnStream: aStream\r\r\taStream print:'$', (String with:self).! !\r\r!Character methodsFor: 'printing'!\rstoreOn: aStream\r\t\"Character literals are preceded by '$'.\"\r\r\taStream nextPut: $$; nextPut: self! !\r\r\r!Character methodsFor: 'converting'!\rasCharacter\r\t\"Answer the receiver itself.\"\r\r\t^self! !\r\r!Character methodsFor: 'converting' stamp: 'ls 9/5/1998 01:18'!\rasIRCLowercase\r\t\"convert to lowercase, using IRC's rules\"\r\r\tself == $[ ifTrue: [ ^ ${ ].\r\tself == $] ifTrue: [ ^ $} ].\r\tself == $\\ ifTrue: [ ^ $| ].\r\r\t^self asLowercase! !\r\r!Character methodsFor: 'converting'!\rasInteger\r\t\"Answer the value of the receiver.\"\r\r\t^value! !\r\r!Character methodsFor: 'converting' stamp: 'dgd 8/24/2003 14:53'!\rasLowercase\r\t\"If the receiver is uppercase, answer its matching lowercase Character.\"\r\t\r\t^ Character\r\t\tvalue: ((ClassificationTable at: value + 1)\r\t\t\t\tbitAnd: 255)! !\r\r!Character methodsFor: 'converting' stamp: 'sma 3/11/2000 17:21'!\rasString\r\t^ String with: self! !\r\r!Character methodsFor: 'converting' stamp: 'raa 5/26/2001 09:54'!\rasSymbol \r\t\"Answer a Symbol consisting of the receiver as the only element.\"\r\r\t^Symbol internCharacter: self! !\r\r!Character methodsFor: 'converting' stamp: 'tk 9/4/2000 12:05'!\rasText\r\t^ self asString asText! !\r\r!Character methodsFor: 'converting' stamp: 'dgd 8/24/2003 14:53'!\rasUppercase\r\t\"If the receiver is lowercase, answer its matching uppercase Character.\"\r\t\r\t^ Character\r\t\tvalue: (((ClassificationTable at: value + 1)\r\t\t\t\tbitShift: -8)\r\t\t\t\tbitAnd: 255)! !\r\r!Character methodsFor: 'converting' stamp: 'sma 3/15/2000 22:57'!\risoToSqueak\r\t\"Convert receiver from iso8895-1 (actually CP1252) to mac encoding.\r\tDoes not do lf/cr conversion!! Characters not available in MacRoman\r\tencoding have been remapped to their base characters or to $?.\"\r\r\tvalue < 128 ifTrue: [^ self].\r\t^ Character value: (#(\r\t\t219 63 226 196 227 201 160 224 246 228 83 220 206 63 90 63\t\t\"80-8F\"\r\t\t63 212 213 210 211 165 208 209 247 170 115 221 207 63 122 217\t\t\"90-9F\"\r\t\t202 193 162 163 63 180 124 164 172 169 187 199 194 45 168 248\t \t\"A0-AF\"\r\t\t161 177 50 51 171 181 166 225 252 49 188 200 63 63 63 192 \t\t\t\"B0-BF\"\r\t\t203 231 229 204 128 129 174 130 233 131 230 232 237 234 235 236 \t\"C0-CF\"\r\t\t63 132 241 238 239 205 133 42 175 244 242 243 134 89 63 167\t \t\"D0-DF\"\r\t\t136 135 137 139 138 140 190 141 143 142 144 145 147 146 148 149\t\t\"E0-EF\"\r\t\t63 150 152 151 153 155 154 214 191 157 156 158 159 121 63 216\t\t\"F0-FF\"\r\t) at: value - 127)! !\r\r!Character methodsFor: 'converting' stamp: 'bf 3/9/2000 16:52'!\rsqueakToIso\r\t\"Convert from mac to iso8895-1 encoding. Does not do lf/cr conversion!!\"\r\tvalue < 128 ifTrue: [^self].\r\t^ Character value: (#(196 197 199 201 209 214 220 225 224 226 228 227 229 231 233 232 234 235 237 236 238 239 241 243 242 244 246 245 250 249 251 252 185 176 162 163 167 130 182 223 174 169 142 180 168 173 198 216 141 177 178 179 165 181 166 183 184 160 188 170 186 189 230 248 191 161 172 146 128 129 140 171 187 131 190 192 195 213 145 147 208 132 150 148 149 144 247 215 255 221 152 151 134 153 222 164 136 135 137 139 138 194 202 193 203 200 205 206 207 204 211 212 240 210 218 219 217 155 154 133 143 157 156 158 159 253 254 175) at: value - 127)! !\r\r!Character methodsFor: 'converting'!\rto: other\r\t\"Answer with a collection in ascii order -- $a to: $z\"\r\t^ (self asciiValue to: other asciiValue) collect:\r\t\t\t\t[:ascii | Character value: ascii]! !\r\r\r!Character methodsFor: 'object fileIn' stamp: 'tk 1/17/2000 11:27'!\rcomeFullyUpOnReload: smartRefStream\r\t\"Use existing an Character.  Don't use the new copy.\"\r\r\t^ self class value: value! !\r\r!Character methodsFor: 'object fileIn' stamp: 'tk 2/16/2001 14:52'!\robjectForDataStream: refStrm\r\t\"I am being collected for inclusion in a segment.  Do not include Characters!!  Let them be in outPointers.\"\r\r\trefStrm insideASegment\r\t\tifFalse: [\"Normal use\" ^ self]\r\t\tifTrue: [\"recording objects to go into an ImageSegment\"\t\t\t\r\t\t\t\"remove it from references.  Do not trace.\"\r\t\t\trefStrm references removeKey: self ifAbsent: [].\r\t\t\t^ nil]\r! !\r\r\r!Character methodsFor: '*packageinfo-base' stamp: 'ab 5/31/2003 17:15'!\rescapeEntities\r\t#($< '&lt;' $> '&gt;' $& '&amp;') pairsDo:\r\t\t[:k :v |\r\t\tself = k ifTrue: [^ v]].\r\t^ String with: self! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rCharacter class\r\tinstanceVariableNames: ''!\r\r!Character class methodsFor: 'class initialization' stamp: 'dgd 8/24/2003 14:47'!\rinitialize\r\t\"Create the table of unique Characters.\"\r\tself initializeClassificationTable! !\r\r!Character class methodsFor: 'class initialization' stamp: 'dgd 8/24/2003 15:10'!\rinitializeClassificationTable\r\t\"\r\tInitialize the classification table. The classification table is a\r\tcompact encoding of upper and lower cases of characters with\r\r\t\t- bits 0-7: The lower case value of this character.\r\t\t- bits 8-15: The upper case value of this character.\r\t\t- bit 16: lowercase bit (e.g., isLowercase == true)\r\t\t- bit 17: uppercase bit (e.g., isUppercase == true)\r\r\t\"\r\t| ch1 ch2 |\r\r\tLowercaseBit := 1 bitShift: 16.\r\tUppercaseBit := 1 bitShift: 17.\r\r\t\"Initialize the letter bits (e.g., isLetter == true)\"\r\tLetterBits := LowercaseBit bitOr: UppercaseBit.\r\r\tClassificationTable := Array new: 256.\r\t\"Initialize the defaults (neither lower nor upper case)\"\r\t0 to: 255 do:[:i|\r\t\tClassificationTable at: i+1 put: (i bitShift: 8) + i.\r\t].\r\r\t\"Initialize character pairs (upper-lower case)\"\r\t#(\r\t\t\"Basic roman\"\r\t\t($A $a) \t($B $b) \t($C $c) \t($D $d) \r\t\t($E $e) \t($F $f) \t($G $g) \t($H $h) \r\t\t($I $i) \t\t($J $j) \t\t($K $k) \t($L $l) \r\t\t($M $m)\t($N $n)\t($O $o)\t($P $p) \r\t\t($Q $q) \t($R $r) \t($S $s) \t($T $t) \r\t\t($U $u)\t($V $v)\t($W $w)\t($X $x)\r\t\t($Y $y)\t($Z $z)\r\t\t\"International\"\r\t\t($ $)\t($ $)\t($ $)\t($ $)\r\t\t($ $)\t($ $)\t($ $)\t($ $)\r\t\t($ $)\t($ $)\t($ $)\t($ $)\r\t\t\"International - Spanish\"\r\t\t($ $)\t($ $)\t\t($ $)\t($ $)\r\t\t\"International - PLEASE CHECK\"\r\t\t($ $)\t($ $)\t\t($ $)\t($ $)\r\t\t($ $)\t($ $)\r\t\t($ $)\t($ $)\t($ $)\t($ $)\t($ $)\r\t) do:[:pair|\r\t\tch1 := pair first asciiValue.\r\t\tch2 := pair last asciiValue.\r\t\tClassificationTable at: ch1+1 put: (ch1 bitShift: 8) + ch2 + UppercaseBit.\r\t\tClassificationTable at: ch2+1 put: (ch1 bitShift: 8) + ch2 + LowercaseBit.\r\t].\r\r\t\"Initialize a few others for which we only have lower case versions.\"\r\t#($ $ $ $) do:[:char|\r\t\tch1 := char asciiValue.\r\t\tClassificationTable at: ch1+1 put: (ch1 bitShift: 8) + ch1 + LowercaseBit.\r\t].\r! !\r\r\r!Character class methodsFor: 'instance creation' stamp: 'ls 8/15/1998 06:56'!\rallCharacters\r\t^ (0 to: 255)\r\t\tcollect: [:v | Character value: v]\r\r\t\r! !\r\r!Character class methodsFor: 'instance creation'!\rdigitValue: x \r\t\"Answer the Character whose digit value is x. For example, answer $9 for \r\tx=9, $0 for x=0, $A for x=10, $Z for x=35.\"\r\r\t| index |\r\tindex _ x asInteger.\r\t^CharacterTable at: \r\t\t(index < 10\r\t\t\tifTrue: [48 + index]\r\t\t\tifFalse: [55 + index])\r\t\t+ 1! !\r\r!Character class methodsFor: 'instance creation'!\rnew\r\t\"Creating new characters is not allowed.\"\r\r\tself error: 'cannot create new characters'! !\r\r!Character class methodsFor: 'instance creation'!\rseparators\r\t^ #(32 \"space\"\r\t\t13 \"cr\"\r\t\t9 \"tab\"\r\t\t10 \"line feed\"\r\t\t12 \"form feed\")\r\t\tcollect: [:v | Character value: v]\r\r\t\r! !\r\r!Character class methodsFor: 'instance creation'!\rvalue: anInteger \r\t\"Answer the Character whose value is anInteger.\"\r\r\t^CharacterTable at: anInteger + 1! !\r\r\r!Character class methodsFor: 'accessing untypeable characters'!\rbackspace\r\t\"Answer the Character representing a backspace.\"\r\r\t^self value: 8! !\r\r!Character class methodsFor: 'accessing untypeable characters'!\rcr\r\t\"Answer the Character representing a carriage return.\"\r\r\t^self value: 13! !\r\r!Character class methodsFor: 'accessing untypeable characters' stamp: 'NS 7/11/2000 09:19'!\rdelete\r\t^ self value: 127! !\r\r!Character class methodsFor: 'accessing untypeable characters' stamp: 'NS 7/11/2000 09:21'!\rend\r\t^ self value: 4! !\r\r!Character class methodsFor: 'accessing untypeable characters'!\renter\r\t\"Answer the Character representing enter.\"\r\r\t^self value: 3! !\r\r!Character class methodsFor: 'accessing untypeable characters' stamp: 'sma 3/15/2000 22:33'!\reuro\r\t\"The Euro currency sign, that E with two dashes. The key code is a wild guess\"\r\r\t^ Character value: 219! !\r\r!Character class methodsFor: 'accessing untypeable characters' stamp: 'NS 7/11/2000 09:21'!\rhome\r\t^ self value: 1! !\r\r!Character class methodsFor: 'accessing untypeable characters' stamp: 'NS 7/11/2000 09:19'!\rinsert\r\t^ self value: 5! !\r\r!Character class methodsFor: 'accessing untypeable characters' stamp: 'ls 9/8/1998 22:15'!\rlf\r\t\"Answer the Character representing a linefeed.\"\r\r\t^self value: 10! !\r\r!Character class methodsFor: 'accessing untypeable characters'!\rlinefeed\r\t\"Answer the Character representing a linefeed.\"\r\r\t^self value: 10! !\r\r!Character class methodsFor: 'accessing untypeable characters' stamp: 'sma 3/11/2000 20:47'!\rnbsp\r\t\"non-breakable space.\"\r\r\t^ Character value: 202! !\r\r!Character class methodsFor: 'accessing untypeable characters'!\rnewPage\r\t\"Answer the Character representing a form feed.\"\r\r\t^self value: 12! !\r\r!Character class methodsFor: 'accessing untypeable characters'!\rspace\r\t\"Answer the Character representing a space.\"\r\r\t^self value: 32! !\r\r!Character class methodsFor: 'accessing untypeable characters'!\rtab\r\t\"Answer the Character representing a tab.\"\r\r\t^self value: 9! !\r\r\r!Character class methodsFor: 'constants' stamp: 'rhi 9/8/2000 14:57'!\ralphabet\r\t\"($a to: $z) as: String\"\r\r\t^ 'abcdefghijklmnopqrstuvwxyz' copy! !\r\r!Character class methodsFor: 'constants'!\rcharacterTable\r\t\"Answer the class variable in which unique Characters are stored.\"\r\r\t^CharacterTable! !\rRectangle subclass: #CharacterBlock\r\tinstanceVariableNames: 'stringIndex text textLine'\r\tclassVariableNames: ''\r\tpoolDictionaries: 'TextConstants'\r\tcategory: 'Graphics-Text'!\r!CharacterBlock commentStamp: '<historical>' prior: 0!\rMy instances contain information about displayed characters. They are used to return the results of methods:\r\tParagraph characterBlockAtPoint: aPoint and\r\tParagraph characterBlockForIndex: stringIndex.\rAny recomposition or movement of a Paragraph can make the instance obsolete.!\r\r\r!CharacterBlock methodsFor: 'accessing' stamp: 'di 6/7/2000 17:33'!\rcopy\r\t\"Overridden because Rectangle does a deepCopy, which goes nuts with the text\"\r\r\t^ self clone! !\r\r!CharacterBlock methodsFor: 'accessing'!\rstringIndex\r\t\"Answer the position of the receiver in the string it indexes.\"\r\r\t^stringIndex! !\r\r\r!CharacterBlock methodsFor: 'comparing'!\r< aCharacterBlock \r\t\"Answer whether the string index of the receiver precedes that of \r\taCharacterBlock.\"\r\r\t^stringIndex < aCharacterBlock stringIndex! !\r\r!CharacterBlock methodsFor: 'comparing'!\r<= aCharacterBlock \r\t\"Answer whether the string index of the receiver does not come after that \r\tof aCharacterBlock.\"\r\r\t^(self > aCharacterBlock) not! !\r\r!CharacterBlock methodsFor: 'comparing'!\r= aCharacterBlock\r\r\tself species = aCharacterBlock species\r\t\tifTrue: [^stringIndex = aCharacterBlock stringIndex]\r\t\tifFalse: [^false]! !\r\r!CharacterBlock methodsFor: 'comparing'!\r> aCharacterBlock \r\t\"Answer whether the string index of the receiver comes after that of \r\taCharacterBlock.\"\r\r\t^aCharacterBlock < self! !\r\r!CharacterBlock methodsFor: 'comparing'!\r>= aCharacterBlock \r\t\"Answer whether the string index of the receiver does not precede that of \r\taCharacterBlock.\"\r\r\t^(self < aCharacterBlock) not! !\r\r!CharacterBlock methodsFor: 'comparing' stamp: 'th 9/17/2002 11:54'!\rmax: aCharacterBlock\r\taCharacterBlock ifNil:[^self].\r\t^aCharacterBlock > self\r\t\tifTrue:[ aCharacterBlock]\r\t\tifFalse:[self].! !\r\r!CharacterBlock methodsFor: 'comparing' stamp: 'th 9/17/2002 11:54'!\rmin: aCharacterBlock\r\taCharacterBlock ifNil:[^self].\r\t^aCharacterBlock < self\r\t\tifTrue:[ aCharacterBlock]\r\t\tifFalse:[self].! !\r\r\r!CharacterBlock methodsFor: 'printing' stamp: 'di 12/2/97 19:15'!\rprintOn: aStream\r\r\taStream nextPutAll: 'a CharacterBlock with index '.\r\tstringIndex printOn: aStream.\r\t(text ~~ nil and: [text size> 0 and: [stringIndex between: 1 and: text size]])\r\t\tifTrue: [aStream nextPutAll: ' and character '.\r\t\t\t\t(text at: stringIndex) printOn: aStream].\r\taStream nextPutAll: ' and rectangle '.\r\tsuper printOn: aStream.\r\ttextLine ifNotNil: [aStream cr; nextPutAll: ' in '.\r\t\t\t\ttextLine printOn: aStream].\r! !\r\r\r!CharacterBlock methodsFor: 'private'!\rmoveBy: aPoint \r\t\"Change the corner positions of the receiver so that its area translates by \r\tthe amount defined by the argument, aPoint.\"\r\r\torigin _ origin + aPoint.\r\tcorner _ corner + aPoint! !\r\r!CharacterBlock methodsFor: 'private' stamp: 'di 10/23/97 22:33'!\rstringIndex: anInteger text: aText topLeft: topLeft extent: extent\r\r\tstringIndex _ anInteger.\r\ttext _ aText.\r\tsuper setOrigin: topLeft corner: topLeft + extent ! !\rCharacterScanner subclass: #CharacterBlockScanner\r\tinstanceVariableNames: 'characterPoint characterIndex lastCharacter lastCharacterExtent lastSpaceOrTabExtent nextLeftMargin specialWidth'\r\tclassVariableNames: ''\r\tpoolDictionaries: 'TextConstants'\r\tcategory: 'Graphics-Text'!\r!CharacterBlockScanner commentStamp: '<historical>' prior: 0!\rMy instances are used to scan text to compute the CharacterBlock for a character specified by its index in the text or its proximity to the cursor location.!\r\r\r!CharacterBlockScanner methodsFor: 'stop conditions' stamp: 'RAA 2/25/2001 14:55'!\rcr \r\t\"Answer a CharacterBlock that specifies the current location of the mouse \r\trelative to a carriage return stop condition that has just been \r\tencountered. The ParagraphEditor convention is to denote selections by \r\tCharacterBlocks, sometimes including the carriage return (cursor is at \r\tthe end) and sometimes not (cursor is in the middle of the text).\"\r\r\t((characterIndex ~= nil\r\t\tand: [characterIndex > text size])\r\t\t\tor: [(line last = text size)\r\t\t\t\tand: [(destY + line lineHeight) < characterPoint y]])\r\t\tifTrue:\t[\"When off end of string, give data for next character\"\r\t\t\t\tdestY _ destY +  line lineHeight.\r\t\t\t\tlastCharacter _ nil.\r\t\t\t\tcharacterPoint _ (nextLeftMargin ifNil: [leftMargin]) @ destY.\r\t\t\t\tlastIndex _ lastIndex + 1.\r\t\t\t\tself lastCharacterExtentSetX: 0.\r\t\t\t\t^ true].\r\t\tlastCharacter _ CR.\r\t\tcharacterPoint _ destX @ destY.\r\t\tself lastCharacterExtentSetX: rightMargin - destX.\r\t\t^true! !\r\r!CharacterBlockScanner methodsFor: 'stop conditions' stamp: 'ar 12/15/2001 23:28'!\rcrossedX\r\t\"Text display has wrapping. The scanner just found a character past the x \r\tlocation of the cursor. We know that the cursor is pointing at a character \r\tor before one.\"\r\r\t| leadingTab currentX |\r\tcharacterIndex == nil ifFalse: [\r\t\t\"If the last character of the last line is a space,\r\t\tand it crosses the right margin, then locating\r\t\tthe character block after it is impossible without this hack.\"\r\t\tcharacterIndex > text size ifTrue: [\r\t\t\tlastIndex _ characterIndex.\r\t\t\tcharacterPoint _ (nextLeftMargin ifNil: [leftMargin]) @ (destY + line lineHeight).\r\t\t\t^true]].\r\tcharacterPoint x <= (destX + (lastCharacterExtent x // 2))\r\t\tifTrue:\t[lastCharacter _ (text at: lastIndex).\r\t\t\t\tcharacterPoint _ destX @ destY.\r\t\t\t\t^true].\r\tlastIndex >= line last \r\t\tifTrue:\t[lastCharacter _ (text at: line last).\r\t\t\t\tcharacterPoint _ destX @ destY.\r\t\t\t\t^true].\r\r\t\"Pointing past middle of a character, return the next character.\"\r\tlastIndex _ lastIndex + 1.\r\tlastCharacter _ text at: lastIndex.\r\tcurrentX _ destX + lastCharacterExtent x + kern.\r\tself lastCharacterExtentSetX: (font widthOf: lastCharacter).\r\tcharacterPoint _ currentX @ destY.\r\tlastCharacter = Space ifFalse: [^ true].\r\r\t\"Yukky if next character is space or tab.\"\r\talignment = Justified ifTrue:\r\t\t[self lastCharacterExtentSetX:\r\t\t\t(lastCharacterExtent x + \t(line justifiedPadFor: (spaceCount + 1))).\r\t\t^ true].\r\r\ttrue ifTrue: [^ true].\r\t\"NOTE:  I find no value to the following code, and so have defeated it - DI\"\r\r\t\"See tabForDisplay for illumination on the following awfulness.\"\r\tleadingTab _ true.\r\tline first to: lastIndex - 1 do:\r\t\t[:index | (text at: index) ~= Tab ifTrue: [leadingTab _ false]].\r\t(alignment ~= Justified or: [leadingTab])\r\t\tifTrue:\t[self lastCharacterExtentSetX: (textStyle nextTabXFrom: currentX\r\t\t\t\t\tleftMargin: leftMargin rightMargin: rightMargin) -\r\t\t\t\t\t\tcurrentX]\r\t\tifFalse:\t[self lastCharacterExtentSetX:  (((currentX + (textStyle tabWidth -\r\t\t\t\t\t\t(line justifiedTabDeltaFor: spaceCount))) -\r\t\t\t\t\t\t\tcurrentX) max: 0)].\r\t^ true! !\r\r!CharacterBlockScanner methodsFor: 'stop conditions' stamp: 'ar 12/15/2001 23:28'!\rendOfRun\r\t\"Before arriving at the cursor location, the selection has encountered an \r\tend of run. Answer false if the selection continues, true otherwise. Set \r\tup indexes for building the appropriate CharacterBlock.\"\r\r\t| runLength lineStop |\r\t((characterIndex ~~ nil and:\r\t\t[runStopIndex < characterIndex and: [runStopIndex < text size]])\r\t\t\tor:\t[characterIndex == nil and: [lastIndex < line last]])\r\t\tifTrue:\t[\"We're really at the end of a real run.\"\r\t\t\t\trunLength _ (text runLengthFor: (lastIndex _ lastIndex + 1)).\r\t\t\t\tcharacterIndex ~~ nil\r\t\t\t\t\tifTrue:\t[lineStop _ characterIndex\t\"scanning for index\"]\r\t\t\t\t\tifFalse:\t[lineStop _ line last\t\t\t\"scanning for point\"].\r\t\t\t\t(runStopIndex _ lastIndex + (runLength - 1)) > lineStop\r\t\t\t\t\tifTrue: \t[runStopIndex _ lineStop].\r\t\t\t\tself setStopConditions.\r\t\t\t\t^false].\r\r\tlastCharacter _ text at: lastIndex.\r\tcharacterPoint _ destX @ destY.\r\t((lastCharacter = Space and: [alignment = Justified])\r\t\tor: [lastCharacter = Tab and: [lastSpaceOrTabExtent notNil]])\r\t\tifTrue: [lastCharacterExtent _ lastSpaceOrTabExtent].\r\tcharacterIndex ~~ nil\r\t\tifTrue:\t[\"If scanning for an index and we've stopped on that index,\r\t\t\t\tthen we back destX off by the width of the character stopped on\r\t\t\t\t(it will be pointing at the right side of the character) and return\"\r\t\t\t\trunStopIndex = characterIndex\r\t\t\t\t\tifTrue:\t[self characterPointSetX: destX - lastCharacterExtent x.\r\t\t\t\t\t\t\t^true].\r\t\t\t\t\"Otherwise the requested index was greater than the length of the\r\t\t\t\tstring.  Return string size + 1 as index, indicate further that off the\r\t\t\t\tstring by setting character to nil and the extent to 0.\"\r\t\t\t\tlastIndex _  lastIndex + 1.\r\t\t\t\tlastCharacter _ nil.\r\t\t\t\tself lastCharacterExtentSetX: 0.\r\t\t\t\t^true].\r\r\t\"Scanning for a point and either off the end of the line or off the end of the string.\"\r\trunStopIndex = text size\r\t\tifTrue:\t[\"off end of string\"\r\t\t\t\tlastIndex _  lastIndex + 1.\r\t\t\t\tlastCharacter _ nil.\r\t\t\t\tself lastCharacterExtentSetX: 0.\r\t\t\t\t^true].\r\t\"just off end of line without crossing x\"\r\tlastIndex _ lastIndex + 1.\r\t^true! !\r\r!CharacterBlockScanner methodsFor: 'stop conditions' stamp: 'ar 1/9/2000 13:51'!\rpaddedSpace\r\t\"When the line is justified, the spaces will not be the same as the font's \r\tspace character. A padding of extra space must be considered in trying \r\tto find which character the cursor is pointing at. Answer whether the \r\tscanning has crossed the cursor.\"\r\r\t| pad |\r\tpad _ 0.\r\tspaceCount _ spaceCount + 1.\r\tpad _ line justifiedPadFor: spaceCount.\r\tlastSpaceOrTabExtent _ lastCharacterExtent copy.\r\tself lastSpaceOrTabExtentSetX:  spaceWidth + pad.\r\t(destX + lastSpaceOrTabExtent x)  >= characterPoint x\r\t\tifTrue: [lastCharacterExtent _ lastSpaceOrTabExtent copy.\r\t\t\t\t^self crossedX].\r\tlastIndex _ lastIndex + 1.\r\tdestX _ destX + lastSpaceOrTabExtent x.\r\t^ false\r! !\r\r!CharacterBlockScanner methodsFor: 'stop conditions' stamp: 'ar 1/8/2000 14:32'!\rsetFont\r\tspecialWidth _ nil.\r\tsuper setFont! !\r\r!CharacterBlockScanner methodsFor: 'stop conditions' stamp: 'ar 12/15/2001 23:28'!\rsetStopConditions\r\t\"Set the font and the stop conditions for the current run.\"\r\t\r\tself setFont.\r\talignment = Justified ifTrue:[\r\t\t\"Make a local copy of stop conditions so we don't modify the default\"\r\t\tstopConditions == DefaultStopConditions \r\t\t\tifTrue:[stopConditions _ stopConditions copy].\r\t\tstopConditions at: Space asciiValue + 1 put: #paddedSpace]! !\r\r!CharacterBlockScanner methodsFor: 'stop conditions' stamp: 'ar 12/15/2001 23:28'!\rtab\r\t| currentX |\r\tcurrentX _ (alignment == Justified and: [self leadingTab not])\r\t\tifTrue:\t\t\"imbedded tabs in justified text are weird\"\r\t\t\t[destX + (textStyle tabWidth - (line justifiedTabDeltaFor: spaceCount)) max: destX]\r\t\tifFalse:\r\t\t\t[textStyle\r\t\t\t\tnextTabXFrom: destX\r\t\t\t\tleftMargin: leftMargin\r\t\t\t\trightMargin: rightMargin].\r\tlastSpaceOrTabExtent _ lastCharacterExtent copy.\r\tself lastSpaceOrTabExtentSetX: (currentX - destX max: 0).\r\tcurrentX >= characterPoint x\r\t\tifTrue: \r\t\t\t[lastCharacterExtent _ lastSpaceOrTabExtent copy.\r\t\t\t^ self crossedX].\r\tdestX _ currentX.\r\tlastIndex _ lastIndex + 1.\r\t^false! !\r\r\r!CharacterBlockScanner methodsFor: 'private' stamp: 'ar 12/19/2001 11:24'!\rbuildCharacterBlockIn: para\r\t| lineIndex runLength lineStop done stopCondition |\r\t\"handle nullText\"\r\t(para numberOfLines = 0 or: [text size = 0])\r\t\tifTrue:\t[^ CharacterBlock new stringIndex: 1  \"like being off end of string\"\r\t\t\t\t\ttext: para text\r\t\t\t\t\ttopLeft: (para leftMarginForDisplayForLine: 1 alignment: (alignment ifNil:[textStyle alignment]))\r\t\t\t\t\t\t\t\t@ para compositionRectangle top\r\t\t\t\t\textent: 0 @ textStyle lineGrid].\r\t\"find the line\"\r\tlineIndex _ para lineIndexOfTop: characterPoint y.\r\tdestY _ para topAtLineIndex: lineIndex.\r\tline _ para lines at: lineIndex.\r\trightMargin _ para rightMarginForDisplay.\r\r\t(lineIndex = para numberOfLines and:\r\t\t[(destY + line lineHeight) < characterPoint y])\r\t\t\tifTrue:\t[\"if beyond lastLine, force search to last character\"\r\t\t\t\t\tself characterPointSetX: rightMargin]\r\t\t\tifFalse:\t[characterPoint y < (para compositionRectangle) top\r\t\t\t\t\t\tifTrue: [\"force search to first line\"\r\t\t\t\t\t\t\t\tcharacterPoint _ (para compositionRectangle) topLeft].\r\t\t\t\t\tcharacterPoint x > rightMargin\r\t\t\t\t\t\tifTrue:\t[self characterPointSetX: rightMargin]].\r\tdestX _ (leftMargin _ para leftMarginForDisplayForLine: lineIndex alignment: (alignment ifNil:[textStyle alignment])).\r\tnextLeftMargin_ para leftMarginForDisplayForLine: lineIndex+1 alignment: (alignment ifNil:[textStyle alignment]).\r\tlastIndex _ line first.\r\r\tself setStopConditions.\t\t\"also sets font\"\r\trunLength _ (text runLengthFor: line first).\r\tcharacterIndex == nil\r\t\tifTrue:\t[lineStop _ line last  \"characterBlockAtPoint\"]\r\t\tifFalse:\t[lineStop _ characterIndex  \"characterBlockForIndex\"].\r\t(runStopIndex _ lastIndex + (runLength - 1)) > lineStop\r\t\tifTrue:\t[runStopIndex _ lineStop].\r\tlastCharacterExtent _ 0 @ line lineHeight.\r\tspaceCount _ 0. done  _ false.\r\tself handleIndentation.\r\r\t[done]\r\twhileFalse:\r\t[stopCondition _ self scanCharactersFrom: lastIndex to: runStopIndex\r\t\t\tin: text string rightX: characterPoint x\r\t\t\tstopConditions: stopConditions kern: kern.\r\r\t\"see setStopConditions for stopping conditions for character block \toperations.\"\r\tself lastCharacterExtentSetX: (font widthOf: (text at: lastIndex)).\r\t(self perform: stopCondition) ifTrue:\r\t\t[characterIndex == nil\r\t\t\tifTrue: [\"characterBlockAtPoint\"\r\t\t\t\t\t^ CharacterBlock new stringIndex: lastIndex text: text\r\t\t\t\t\t\ttopLeft: characterPoint + (font descentKern @ 0)\r\t\t\t\t\t\textent: lastCharacterExtent]\r\t\t\tifFalse: [\"characterBlockForIndex\"\r\t\t\t\t\t^ CharacterBlock new stringIndex: lastIndex text: text\r\t\t\t\t\t\ttopLeft: characterPoint + ((font descentKern) - kern @ 0)\r\t\t\t\t\t\textent: lastCharacterExtent]]]! !\r\r!CharacterBlockScanner methodsFor: 'private' stamp: 'ar 1/8/2000 14:34'!\rcharacterPointSetX: xVal\r\tcharacterPoint _ xVal @ characterPoint y! !\r\r!CharacterBlockScanner methodsFor: 'private' stamp: 'ar 1/8/2000 14:34'!\rlastCharacterExtentSetX: xVal\r\tlastCharacterExtent _ xVal @ lastCharacterExtent y! !\r\r!CharacterBlockScanner methodsFor: 'private' stamp: 'ar 1/8/2000 14:34'!\rlastSpaceOrTabExtentSetX: xVal\r\tlastSpaceOrTabExtent _ xVal @ lastSpaceOrTabExtent y! !\r\r\r!CharacterBlockScanner methodsFor: 'scanning' stamp: 'ar 5/17/2000 19:14'!\rcharacterBlockAtPoint: aPoint in: aParagraph\r\t\"Answer a CharacterBlock for character in aParagraph at point aPoint. It \r\tis assumed that aPoint has been transformed into coordinates appropriate \r\tto the text's destination form rectangle and the composition rectangle.\"\r\r\tself initializeFromParagraph: aParagraph clippedBy: aParagraph clippingRectangle.\r\tcharacterPoint _ aPoint.\r\t^self buildCharacterBlockIn: aParagraph! !\r\r!CharacterBlockScanner methodsFor: 'scanning' stamp: 'ar 5/17/2000 19:14'!\rcharacterBlockForIndex: targetIndex in: aParagraph \r\t\"Answer a CharacterBlock for character in aParagraph at targetIndex. The \r\tcoordinates in the CharacterBlock will be appropriate to the intersection \r\tof the destination form rectangle and the composition rectangle.\"\r\r\tself \r\t\tinitializeFromParagraph: aParagraph \r\t\tclippedBy: aParagraph clippingRectangle.\r\tcharacterIndex _ targetIndex.\r\tcharacterPoint _ \r\t\taParagraph rightMarginForDisplay @ \r\t\t\t(aParagraph topAtLineIndex: \r\t\t\t\t(aParagraph lineIndexOfCharacterIndex: characterIndex)).\r\t^self buildCharacterBlockIn: aParagraph! !\r\r!CharacterBlockScanner methodsFor: 'scanning' stamp: 'hmm 2/2/2001 15:07'!\rindentationLevel: anInteger\r\tsuper indentationLevel: anInteger.\r\tnextLeftMargin _ leftMargin.\r\tindentationLevel timesRepeat: [\r\t\tnextLeftMargin _ textStyle nextTabXFrom: nextLeftMargin\r\t\t\t\t\tleftMargin: leftMargin\r\t\t\t\t\trightMargin: rightMargin]! !\r\r!CharacterBlockScanner methodsFor: 'scanning' stamp: 'ar 12/16/2001 19:27'!\rplaceEmbeddedObject: anchoredMorph\r\t\"Workaround: The following should really use #textAnchorType\"\r\tanchoredMorph relativeTextAnchorPosition ifNotNil:[^true].\r\t(super placeEmbeddedObject: anchoredMorph) ifFalse: [^ false].\r\tspecialWidth _ anchoredMorph width.\r\t^ true! !\rObject subclass: #CharacterScanner\r\tinstanceVariableNames: 'destX lastIndex xTable map destY stopConditions text textStyle alignment leftMargin rightMargin font line runStopIndex spaceCount spaceWidth emphasisCode kern indentationLevel wantsColumnBreaks'\r\tclassVariableNames: 'DefaultStopConditions'\r\tpoolDictionaries: 'TextConstants'\r\tcategory: 'Graphics-Text'!\r!CharacterScanner commentStamp: '<historical>' prior: 0!\rMy instances hold the state associated with scanning text. My subclasses scan characters for specified purposes, such as computing a CharacterBlock or placing characters into Forms.!\r\r\r!CharacterScanner methodsFor: 'private' stamp: 'ar 1/8/2000 14:27'!\raddEmphasis: code\r\t\"Set the bold-ital-under-strike emphasis.\"\r\temphasisCode _ emphasisCode bitOr: code! !\r\r!CharacterScanner methodsFor: 'private' stamp: 'ar 1/8/2000 14:27'!\raddKern: kernDelta\r\t\"Set the current kern amount.\"\r\tkern _ kern + kernDelta! !\r\r!CharacterScanner methodsFor: 'private' stamp: 'ar 5/17/2000 17:13'!\rinitializeFromParagraph: aParagraph clippedBy: clippingRectangle\r\r\ttext _ aParagraph text.\r\ttextStyle _ aParagraph textStyle. \r! !\r\r!CharacterScanner methodsFor: 'private' stamp: 'ar 1/8/2000 14:27'!\rsetActualFont: aFont\r\t\"Set the basal font to an isolated font reference.\"\r\r\tfont _ aFont! !\r\r!CharacterScanner methodsFor: 'private' stamp: 'ar 12/15/2001 23:31'!\rsetAlignment: style\r\talignment _ style.\r\t! !\r\r!CharacterScanner methodsFor: 'private' stamp: 'di 9/3/2000 13:47'!\rsetFont\r\t| priorFont |\r\t\"Set the font and other emphasis.\"\r\tpriorFont _ font.\r\ttext == nil ifFalse:[\r\t\temphasisCode _ 0.\r\t\tkern _ 0.\r\t\tindentationLevel _ 0.\r\t\talignment _ textStyle alignment.\r\t\tfont _ nil.\r\t\t(text attributesAt: lastIndex forStyle: textStyle)\r\t\t\tdo: [:att | att emphasizeScanner: self]].\r\tfont == nil ifTrue:\r\t\t[self setFont: textStyle defaultFontIndex].\r\tfont _ font emphasized: emphasisCode.\r\tpriorFont ifNotNil: [destX _ destX + priorFont descentKern].\r\tdestX _ destX - font descentKern.\r\t\"NOTE: next statement should be removed when clipping works\"\r\tleftMargin ifNotNil: [destX _ destX max: leftMargin].\r\tkern _ kern - font baseKern.\r\r\t\"Install various parameters from the font.\"\r\tspaceWidth _ font widthOf: Space.\r\txTable _ font xTable.\r\tmap _ font characterToGlyphMap.\r\tstopConditions _ DefaultStopConditions.! !\r\r!CharacterScanner methodsFor: 'private' stamp: 'ar 1/8/2000 14:28'!\rsetFont: fontNumber\r\t\"Set the font by number from the textStyle.\"\r\r\tself setActualFont: (textStyle fontAt: fontNumber)! !\r\r!CharacterScanner methodsFor: 'private' stamp: 'ar 1/8/2000 14:28'!\rtext: t textStyle: ts\r\ttext _ t.\r\ttextStyle _ ts! !\r\r!CharacterScanner methodsFor: 'private' stamp: 'ar 1/8/2000 14:28'!\rtextColor: ignored\r\t\"Overridden in DisplayScanner\"! !\r\r\r!CharacterScanner methodsFor: 'scanning' stamp: 'RAA 5/4/2001 13:53'!\rcolumnBreak\r\r\t^true! !\r\r!CharacterScanner methodsFor: 'scanning' stamp: 'ar 12/17/2001 01:50'!\rembeddedObject\r\t| savedIndex |\r\tsavedIndex _ lastIndex.\r\ttext attributesAt: lastIndex do:[:attr| \r\t\tattr anchoredMorph ifNotNil:[\r\t\t\t\"Following may look strange but logic gets reversed.\r\t\t\tIf the morph fits on this line we're not done (return false for true) \r\t\t\tand if the morph won't fit we're done (return true for false)\"\r\t\t\t(self placeEmbeddedObject: attr anchoredMorph) ifFalse:[^true]]].\r\tlastIndex _ savedIndex + 1. \"for multiple(!!) embedded morphs\"\r\t^false! !\r\r!CharacterScanner methodsFor: 'scanning' stamp: 'hmm 7/15/2000 22:40'!\rhandleIndentation\r\tself indentationLevel timesRepeat: [\r\t\tself plainTab]! !\r\r!CharacterScanner methodsFor: 'scanning' stamp: 'ar 5/17/2000 18:20'!\rindentationLevel\r\t\"return the number of tabs that are currently being placed at the beginning of each line\"\r\t^indentationLevel ifNil:[0]! !\r\r!CharacterScanner methodsFor: 'scanning' stamp: 'ar 1/8/2000 14:23'!\rindentationLevel: anInteger\r\t\"set the number of tabs to put at the beginning of each line\"\r\tindentationLevel _ anInteger! !\r\r!CharacterScanner methodsFor: 'scanning' stamp: 'ar 1/8/2000 14:23'!\rleadingTab\r\t\"return true if only tabs lie to the left\"\r\tline first to: lastIndex do:\r\t\t[:i | (text at: i) == Tab ifFalse: [^ false]].\r\t^ true! !\r\r!CharacterScanner methodsFor: 'scanning' stamp: 'ar 12/31/2001 00:52'!\rmeasureString: aString inFont: aFont from: startIndex to: stopIndex\r\t\"WARNING: In order to use this method the receiver has to be set up using #initializeStringMeasurer\"\r\tdestX _ destY _ lastIndex _ 0.\r\txTable _ aFont xTable.\r\tmap _ aFont characterToGlyphMap.\r\tself scanCharactersFrom: startIndex to: stopIndex in: aString rightX: 999999 stopConditions: stopConditions kern: 0.\r\t^destX! !\r\r!CharacterScanner methodsFor: 'scanning' stamp: 'ar 12/16/2001 19:27'!\rplaceEmbeddedObject: anchoredMorph\r\t\"Place the anchoredMorph or return false if it cannot be placed.\r\tIn any event, advance destX by its width.\"\r\t| w |\r\t\"Workaround: The following should really use #textAnchorType\"\r\tanchoredMorph relativeTextAnchorPosition ifNotNil:[^true].\r\tdestX _ destX + (w _ anchoredMorph width).\r\t(destX > rightMargin and: [(leftMargin + w) <= rightMargin])\r\t\tifTrue: [\"Won't fit, but would on next line\"\r\t\t\t\t^ false].\r\tlastIndex _ lastIndex + 1.\r\tself setFont.  \"Force recalculation of emphasis for next run\"\r\t^ true! !\r\r!CharacterScanner methodsFor: 'scanning' stamp: 'ar 12/15/2001 23:28'!\rplainTab\r\t\"This is the basic method of adjusting destX for a tab.\"\r\tdestX _ (alignment == Justified and: [self leadingTab not])\r\t\tifTrue:\t\t\"embedded tabs in justified text are weird\"\r\t\t\t[destX + (textStyle tabWidth - (line justifiedTabDeltaFor: spaceCount)) max: destX]\r\t\tifFalse: \r\t\t\t[textStyle nextTabXFrom: destX\r\t\t\t\tleftMargin: leftMargin\r\t\t\t\trightMargin: rightMargin]! !\r\r!CharacterScanner methodsFor: 'scanning' stamp: 'ar 12/17/2001 02:08'!\rscanCharactersFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: kernDelta\r\t\"Primitive. This is the inner loop of text display--but see \r\tscanCharactersFrom: to:rightX: which would get the string, \r\tstopConditions and displaying from the instance. March through source \r\tString from startIndex to stopIndex. If any character is flagged with a \r\tnon-nil entry in stops, then return the corresponding value. Determine \r\twidth of each character from xTable, indexed by map. \r\tIf dextX would exceed rightX, then return stops at: 258. \r\tAdvance destX by the width of the character. If stopIndex has been\r\treached, then return stops at: 257. Optional. \r\tSee Object documentation whatIsAPrimitive.\"\r\t| ascii nextDestX char |\r\t<primitive: 103>\r\tlastIndex _ startIndex.\r\t[lastIndex <= stopIndex]\r\t\twhileTrue: \r\t\t\t[char _ (sourceString at: lastIndex).\r\t\t\tascii _ char asciiValue + 1.\r\t\t\t(stops at: ascii) == nil ifFalse: [^stops at: ascii].\r\t\t\t\"Note: The following is querying the font about the width\r\t\t\tsince the primitive may have failed due to a non-trivial\r\t\t\tmapping of characters to glyphs or a non-existing xTable.\"\r\t\t\tnextDestX _ destX + (font widthOf: char).\r\t\t\tnextDestX > rightX ifTrue: [^stops at: CrossedX].\r\t\t\tdestX _ nextDestX + kernDelta.\r\t\t\tlastIndex _ lastIndex + 1].\r\tlastIndex _ stopIndex.\r\t^stops at: EndOfRun! !\r\r\r!CharacterScanner methodsFor: 'initialize' stamp: 'ls 1/14/2002 21:26'!\rinitialize\r\tdestX _ destY _ leftMargin _ 0.! !\r\r!CharacterScanner methodsFor: 'initialize' stamp: 'ar 12/31/2001 00:52'!\rinitializeStringMeasurer\r\tstopConditions _ Array new: 258.\r\tstopConditions at: CrossedX put: #crossedX.\r\tstopConditions at: EndOfRun put: #endOfRun.\r! !\r\r\r!CharacterScanner methodsFor: 'accessing' stamp: 'ssa 8/19/2008 21:15'!\rdestX: x\r\r\tdestX := x! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rCharacterScanner class\r\tinstanceVariableNames: ''!\r\r!CharacterScanner class methodsFor: 'class initialization' stamp: 'ar 12/17/2001 02:17'!\rinitialize\r\t\"CharacterScanner initialize\"\r\t\"NewCharacterScanner initialize\"\r\t| stopConditions |\r\tstopConditions _ Array new: 258.\r\tstopConditions atAllPut: nil.\r\tstopConditions at: 1+1 put: #embeddedObject.\r\tstopConditions at: Space asciiValue + 1 put: nil.\r\tstopConditions at: Tab asciiValue + 1 put: #tab.\r\tstopConditions at: CR asciiValue + 1 put: #cr.\r\tstopConditions at: EndOfRun put: #endOfRun.\r\tstopConditions at: CrossedX put: #crossedX.\r\tDefaultStopConditions _ stopConditions.! !\rCollection subclass: #CharacterSet\r\tinstanceVariableNames: 'map'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Text'!\r!CharacterSet commentStamp: '<historical>' prior: 0!\rA set of characters.  Lookups for inclusion are very fast.!\r\r\r!CharacterSet methodsFor: 'collection ops' stamp: 'ls 8/17/1998 20:33'!\radd: aCharacter\r\tmap at: aCharacter asciiValue+1  put: 1.! !\r\r!CharacterSet methodsFor: 'collection ops' stamp: 'ls 8/17/1998 20:41'!\rdo: aBlock\r\t\"evaluate aBlock with each character in the set\"\r\r\tCharacter allCharacters do: [ :c |\r\t\t(self includes: c) ifTrue: [ aBlock value: c ] ]\r! !\r\r!CharacterSet methodsFor: 'collection ops' stamp: 'ls 8/17/1998 20:31'!\rincludes: aCharacter\r\t^(map at: aCharacter asciiValue + 1) > 0! !\r\r!CharacterSet methodsFor: 'collection ops' stamp: 'ls 8/17/1998 20:34'!\rremove: aCharacter\r\tmap at: aCharacter asciiValue + 1  put: 0! !\r\r\r!CharacterSet methodsFor: 'conversion' stamp: 'ls 8/17/1998 20:39'!\rcomplement\r\t\"return a character set containing precisely the characters the receiver does not\"\r\t| set |\r\tset _ CharacterSet allCharacters.\r\tself do: [ :c | set remove: c ].\r\t^set! !\r\r\r!CharacterSet methodsFor: 'comparison' stamp: 'tk 7/5/2001 21:58'!\r= anObject\r\t^self species == anObject species and: [\r\t\tself byteArrayMap = anObject byteArrayMap ]! !\r\r!CharacterSet methodsFor: 'comparison' stamp: 'ls 8/17/1998 20:46'!\rhash\r\t^self byteArrayMap hash! !\r\r!CharacterSet methodsFor: 'comparison' stamp: 'tk 7/5/2001 21:57'!\rspecies\r\t^CharacterSet! !\r\r\r!CharacterSet methodsFor: 'private' stamp: 'ls 8/17/1998 20:35'!\rbyteArrayMap\r\t\"return a ByteArray mapping each ascii value to a 1 if that ascii value is in the set, and a 0 if it isn't.  Intended for use by primitives only\"\r\t^map! !\r\r!CharacterSet methodsFor: 'private' stamp: 'ls 8/17/1998 20:30'!\rinitialize\r\tmap _ ByteArray new: 256 withAll: 0.! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rCharacterSet class\r\tinstanceVariableNames: ''!\r\r!CharacterSet class methodsFor: 'instance creation' stamp: 'ls 8/17/1998 20:42'!\rallCharacters\r\t\"return a set containing all characters\"\r\r\t| set |\r\tset _ self empty.\r\t0 to: 255 do: [ :ascii | set add: (Character value: ascii) ].\r\t^set! !\r\r!CharacterSet class methodsFor: 'instance creation' stamp: 'ls 8/17/1998 20:36'!\rempty\r \t\"return an empty set of characters\"\r\t^super new initialize! !\r\r!CharacterSet class methodsFor: 'instance creation' stamp: 'ls 1/3/1999 12:52'!\rnewFrom: aCollection\r\t| newCollection |\r\tnewCollection _ self new.\r\tnewCollection addAll: aCollection.\r\t^newCollection! !\r\r!CharacterSet class methodsFor: 'instance creation' stamp: 'ls 8/18/1998 00:40'!\rseparators\r\t\"return a set containing just the whitespace characters\"\r\r\t| set |\r\tset _ self empty.\r\tset addAll: Character separators.\r\t^set! !\rSharedPool subclass: #ChronologyConstants\r\tinstanceVariableNames: 'seconds offset jdn nanos'\r\tclassVariableNames: 'DayNames DaysInMonth MonthNames NanosInMillisecond NanosInSecond SecondsInDay SecondsInHour SecondsInMinute SqueakEpoch'\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Chronology'!\r!ChronologyConstants commentStamp: 'brp 3/12/2004 14:34' prior: 0!\rChronologyConstants is a SharedPool for the constants used by the Kernel-Chronology classes.!\r\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rChronologyConstants class\r\tinstanceVariableNames: ''!\r\r!ChronologyConstants class methodsFor: 'as yet unclassified' stamp: 'brp 9/25/2003 10:49'!\rinitialize\r\n\t\"ChronologyConstants initialize\" \tSqueakEpoch _ 2415386. \t\t\"Julian day number of 1 Jan 1901\" \r\n\tSecondsInDay _ 86400.\r\n\tSecondsInHour _ 3600.\r\n\tSecondsInMinute _ 60.\r\n\tNanosInSecond _ 10 raisedTo: 9.\r\n\tNanosInMillisecond _ 10 raisedTo: 6.\r\n\tDayNames _ #(Sunday Monday Tuesday Wednesday Thursday Friday Saturday).\r\n\t\t\r\n\tMonthNames _ #(January February March April May June July\r\n \t\t\tAugust September October November December).\r\n\tDaysInMonth _ #(31 28 31 30 31 30 31 31 30 31 30 31).\r\n! !\rArc subclass: #Circle\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Paths'!\r!Circle commentStamp: '<historical>' prior: 0!\rI represent a full circle. I am made from four Arcs.!\r\r\r!Circle methodsFor: 'displaying'!\rdisplayOn: aDisplayMedium at: aPoint clippingBox: clipRect rule: anInteger fillColor: aForm\r\r\t1 to: 4 do:\r\t\t[:i |\r\t\tsuper quadrant: i.\r\t\tsuper displayOn: aDisplayMedium\r\t\t\tat: aPoint\r\t\t\tclippingBox: clipRect\r\t\t\trule: anInteger\r\t\t\tfillColor: aForm]! !\r\r!Circle methodsFor: 'displaying'!\rdisplayOn: aDisplayMedium transformation: aTransformation clippingBox: clipRect rule: anInteger fillColor: aForm\r\r\t1 to: 4 do:\r\t\t[:i |\r\t\tsuper quadrant: i.\r\t\tsuper displayOn: aDisplayMedium\r\t\t\ttransformation: aTransformation\r\t\t\tclippingBox: clipRect\r\t\t\trule: anInteger\r\t\t\tfillColor: aForm]! !\r\r\r!Circle methodsFor: 'display box access'!\rcomputeBoundingBox\r\r\t^center - radius + form offset extent: form extent + (radius * 2) asPoint! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rCircle class\r\tinstanceVariableNames: ''!\r\r!Circle class methodsFor: 'examples'!\rexampleOne \r\t\"Click any button somewhere on the screen. The point will be the center\r\tof the circcle of radius 150.\"\r\r\t| aCircle aForm |\r\taForm _ Form extent: 1@30.\r\taForm fillBlack.\r\taCircle _ Circle new.\r\taCircle form: aForm.\r\taCircle radius: 150.\r\taCircle center: Sensor waitButton.\r\taCircle displayOn: Display\r\t\r\t\"Circle exampleOne\"! !\r\r!Circle class methodsFor: 'examples'!\rexampleTwo\r\t\"Designate a rectangular area that should be used as the brush for\r\tdisplaying the circle. Click any button at a point on the screen which\r\twill be the center location for the circle. The curve will be displayed\r\twith a long black form.\"\r\r\t| aCircle aForm |\r\taForm _ Form fromUser.\r\taCircle _ Circle new.\r\taCircle form: aForm.\r\taCircle radius: 150.\r\taCircle center: Sensor waitButton.\r\taCircle displayOn: Display at: 0 @ 0 rule: Form reverse\r \r\t \"Circle exampleTwo\"! !\rClassDescription subclass: #Class\r\tinstanceVariableNames: 'subclasses name classPool sharedPools environment category'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Classes'!\r!Class commentStamp: '<historical>' prior: 0!\rI add a number of facilities to those in ClassDescription:\r\tA set of all my subclasses (defined in ClassDescription, but only used here and below)\r\tA name by which I can be found in a SystemDictionary\r\tA classPool for class variables shared between this class and its metaclass\r\tA list of sharedPools which probably should be supplanted by some better mechanism.\r\rMy instances describe the representation and behavior of objects. I add more comprehensive programming support facilities to the basic attributes of Behavior and the descriptive facilities of ClassDescription.\r\rThe slot 'subclasses' is a redundant structure.  It is never used during execution, but is used by the development system to simplify or speed certain operations.  !\r\r\r!Class methodsFor: 'initialize-release' stamp: 'hg 10/30/2001 13:38'!\rdeactivate\r\t\"A remnant from the 3.3a modules work, retained . Does nothing, but may be overridden in Metaclasses.\"! !\r\r!Class methodsFor: 'initialize-release' stamp: 'ar 5/17/2003 14:14'!\rdeclare: varString \r\t\"Declare class variables common to all instances. Answer whether \r\trecompilation is advisable.\"\r\r\t| newVars conflicts |\r\tnewVars _ \r\t\t(Scanner new scanFieldNames: varString)\r\t\t\tcollect: [:x | x asSymbol].\r\tnewVars do:\r\t\t[:var | var first isLowercase\r\t\t\tifTrue: [self error: var, ' class variable name should be capitalized; proceed to include anyway.']].\r\tconflicts _ false.\r\tclassPool == nil \r\t\tifFalse: [(classPool keys reject: [:x | newVars includes: x]) do: \r\t\t\t\t\t[:var | self removeClassVarName: var]].\r\t(newVars reject: [:var | self classPool includesKey: var])\r\t\tdo: [:var | \"adding\"\r\t\t\t\"check if new vars defined elsewhere\"\r\t\t\t(self bindingOf: var) notNil\r\t\t\t\tifTrue: \r\t\t\t\t\t[self error: var , ' is defined elsewhere'.\r\t\t\t\t\tconflicts _ true]].\r\tnewVars size > 0\r\t\tifTrue: \r\t\t\t[classPool _ self classPool.\r\t\t\t\"in case it was nil\"\r\t\t\tnewVars do: [:var | classPool declare: var from: Undeclared]].\r\t^conflicts! !\r\r!Class methodsFor: 'initialize-release' stamp: 'ar 9/10/1999 17:34'!\robsolete\r\t\"Change the receiver and all of its subclasses to an obsolete class.\"\r\tself == Object \r\t\tifTrue:[^self error:'Object is NOT obsolete'].\r\tname _ 'AnObsolete' , name.\r\tObject class instSize + 1 to: self class instSize do:\r\t\t[:i | self instVarAt: i put: nil]. \"Store nil over class instVars.\"\r\tclassPool _ nil.\r\tsharedPools _ nil.\r\tself class obsolete.\r\tsuper obsolete.\r! !\r\r!Class methodsFor: 'initialize-release' stamp: 'ar 3/1/2001 22:28'!\rremoveFromSystem\r\t\"Forget the receiver from the Smalltalk global dictionary. Any existing \r\tinstances will refer to an obsolete version of the receiver.\"\r\tself removeFromSystem: true.! !\r\r!Class methodsFor: 'initialize-release' stamp: 'NS 1/16/2004 15:16'!\rremoveFromSystem: logged\r\t\"Forget the receiver from the Smalltalk global dictionary. Any existing \r\tinstances will refer to an obsolete version of the receiver.\"\r\t\r\t\"keep the class name and category for triggering the system change message. If we wait to long, then we get obsolete information which is not what we want.\"\r\r\t\"tell class to deactivate and unload itself-- two separate events in the module system\"\r\tself deactivate; unload.\r\tself superclass ifNotNil:\r\t\t[\"If we have no superclass there's nothing to be remembered\"\r\t\tself superclass addObsoleteSubclass: self].\r\tself environment forgetClass: self logged: logged.\r\tself obsolete.! !\r\r!Class methodsFor: 'initialize-release' stamp: 'sd 3/28/2003 16:09'!\rsharing: poolString \r\t\"Set up sharedPools. Answer whether recompilation is advisable.\"\r\t| oldPools found |\r\toldPools _ self sharedPools.\r\tsharedPools _ OrderedCollection new.\r\t(Scanner new scanFieldNames: poolString) do: \r\t\t[:poolName | \r\t\tsharedPools add: (self environment at: poolName asSymbol ifAbsent:[\r\t\t\t(self confirm: 'The pool dictionary ', poolName,' does not exist.',\r\t\t\t\t\t\t'\\Do you want it automatically created?' withCRs)\r\t\t\t\tifTrue:[self environment at: poolName asSymbol put: Dictionary new]\r\t\t\t\tifFalse:[^self error: poolName,' does not exist']])].\r\tsharedPools isEmpty ifTrue: [sharedPools _ nil].\r\toldPools do: [:pool | found _ false.\r\t\t\t\tself sharedPools do: [:p | p == pool ifTrue: [found _ true]].\r\t\t\t\tfound ifFalse: [^ true \"A pool got deleted\"]].\r\t^ false! !\r\r!Class methodsFor: 'initialize-release' stamp: 'NS 4/6/2004 15:32'!\rsuperclass: sup methodDict: md format: ft name: nm organization: org instVarNames: nilOrArray classPool: pool sharedPools: poolSet \r\t\"Answer an instance of me, a new class, using the arguments of the \r\tmessage as the needed information.\r\tMust only be sent to a new instance; else we would need Object flushCache.\"\r\r\tsuperclass _ sup.\r\tmethodDict _ md.\r\tformat _ ft.\r\tname _ nm.\r\tinstanceVariables _ nilOrArray.\r\tclassPool _ pool.\r\tsharedPools _ poolSet.\r\tself organization: org.! !\r\r!Class methodsFor: 'initialize-release' stamp: 'ar 7/20/1999 11:23'!\rsuperclass: aClass methodDictionary: mDict format: fmt\r\t\"Basic initialization of the receiver\"\r\tsuper superclass: aClass methodDictionary: mDict format: fmt.\r\tsubclasses _ nil. \"Important for moving down the subclasses field into Class\"\r! !\r\r!Class methodsFor: 'initialize-release' stamp: 'hg 12/12/2001 12:00'!\runload\r\t\"Sent when a the class is removed.  Does nothing, but may be overridden by (class-side) subclasses.\"\r! !\r\r\r!Class methodsFor: 'accessing'!\rclassPool\r\t\"Answer the dictionary of class variables.\"\r\r\tclassPool == nil\r\t\tifTrue: [^Dictionary new]\r\t\tifFalse: [^classPool]! !\r\r!Class methodsFor: 'accessing'!\rname\r\t\"Answer the name of the receiver.\"\r\r\tname == nil\r\t\tifTrue: [^super name]\r\t\tifFalse: [^name]! !\r\r\r!Class methodsFor: 'testing'!\rhasMethods\r\t\"Answer a Boolean according to whether any methods are defined for the \r\treceiver (includes whether there are methods defined in the receiver's \r\tmetaclass).\"\r\r\t^super hasMethods or: [self class hasMethods]! !\r\r!Class methodsFor: 'testing' stamp: 'ar 7/15/1999 15:36'!\risObsolete\r\t\"Return true if the receiver is obsolete.\"\r\t^(self environment at: name ifAbsent:[nil]) ~~ self! !\r\r!Class methodsFor: 'testing' stamp: 'tk 8/12/1999 15:47'!\risSystemDefined\r\t\"Answer true if the receiver is a system-defined class, and not a UniClass (an instance-specific lightweight class)\"\r\r\t^ self == self officialClass! !\r\r!Class methodsFor: 'testing' stamp: 'tk 8/12/1999 15:49'!\rofficialClass\r\t\"I am not a UniClass.  (See Player officialClass).  Return the class you use to make new subclasses.\"\r\r\t^ self! !\r\r\r!Class methodsFor: 'copying' stamp: 'di 2/17/2000 22:43'!\rcopy \r\t| newClass |\r\tnewClass _ self class copy new\r\t\tsuperclass: superclass\r\t\tmethodDict: self methodDict copy\r\t\tformat: format\r\t\tname: name\r\t\torganization: self organization copy\r\t\tinstVarNames: instanceVariables copy\r\t\tclassPool: classPool copy\r\t\tsharedPools: sharedPools.\r\tClass instSize+1 to: self class instSize do:\r\t\t[:offset | newClass instVarAt: offset put: (self instVarAt: offset)].\r\t^ newClass! !\r\r\r!Class methodsFor: 'class name' stamp: 'sw 12/1/2000 20:39'!\rexternalName\r\t\"Answer a name by which the receiver can be known.\"\r\r\t^ name! !\r\r!Class methodsFor: 'class name' stamp: 'sw 12/18/2000 15:50'!\rnameForViewer\r\t\"Answer the name to be shown in the header of a viewer looking at the receiver\"\r\r\t^ self name ifNil: ['Unnamed class']! !\r\r!Class methodsFor: 'class name' stamp: 'NS 1/15/2004 15:41'!\rrename: aString \r\t\"The new name of the receiver is the argument, aString.\"\r\r\t| newName |\r\t(newName _ aString asSymbol) ~= self name\r\t\tifFalse: [^ self].\r\t(self environment includesKey: newName)\r\t\tifTrue: [^ self error: newName , ' already exists'].\r\t(Undeclared includesKey: newName)\r\t\tifTrue: [self inform: 'There are references to, ' , aString printString , '\rfrom Undeclared. Check them after this change.'].\r\tself environment renameClass: self as: newName.\r\tname _ newName! !\r\r!Class methodsFor: 'class name' stamp: 'sw 12/1/2000 20:40'!\runiqueNameForReference\r\t\"Answer a unique name by which the receiver can be referred to from user scripts, for example\"\r\r\t^ name! !\r\r\r!Class methodsFor: 'instance variables' stamp: 'sw 12/26/2003 19:30'!\raddInstVarName: aString\r\t\"Add the argument, aString, as one of the receiver's instance variables.\"\r\t^(ClassBuilder new)\r\t\tname: self name\r\t\tinEnvironment: self environment\r\t\tsubclassOf: superclass\r\t\ttype: self typeOfClass\r\t\tinstanceVariableNames: self instanceVariablesString, ' ', aString\r\t\tclassVariableNames: self classVariablesString\r\t\tpoolDictionaries: self sharedPoolsString\r\t\tcategory: self category\r! !\r\r\r!Class methodsFor: 'class variables' stamp: 'NS 1/27/2004 14:19'!\raddClassVarName: aString \r\t\"Add the argument, aString, as a class variable of the receiver.\r\tSignal an error if the first character of aString is not capitalized,\r\tor if it is already a variable named in the class.\"\r\t| symbol oldState |\r\toldState _ self copy.\r\taString first isLowercase\r\t\tifTrue: [^self error: aString, ' class variable name should be capitalized; proceed to include anyway.'].\r\tsymbol _ aString asSymbol.\r\tself withAllSubclasses do: \r\t\t[:subclass | \r\t\t(subclass bindingOf: symbol) ifNotNil:[\r\t\t\t^ self error: aString \r\t\t\t\t, ' is already used as a variable name in class ' \r\t\t\t\t, subclass name]].\r\tclassPool == nil ifTrue: [classPool _ Dictionary new].\r\t(classPool includesKey: symbol) ifFalse: \r\t\t[\"Pick up any refs in Undeclared\"\r\t\tclassPool declare: symbol from: Undeclared.\r\t\tSystemChangeNotifier uniqueInstance classDefinitionChangedFrom: oldState to: self]! !\r\r!Class methodsFor: 'class variables'!\rallClassVarNames\r\t\"Answer a Set of the names of the receiver's class variables, including those\r\tdefined in the superclasses of the receiver.\"\r\r\t| aSet |\r\tsuperclass == nil\r\t\tifTrue: \r\t\t\t[^self classVarNames]  \"This is the keys so it is a new Set.\"\r\t\tifFalse: \r\t\t\t[aSet _ superclass allClassVarNames.\r\t\t\taSet addAll: self classVarNames.\r\t\t\t^aSet]! !\r\r!Class methodsFor: 'class variables'!\rclassVarNames\r\t\"Answer a Set of the names of the class variables defined in the receiver.\"\r\r\t^self classPool keys! !\r\r!Class methodsFor: 'class variables' stamp: 'jm 7/24/1999 12:58'!\rremoveClassVarName: aString \r\t\"Remove the class variable whose name is the argument, aString, from \r\tthe names defined in the receiver, a class. Create an error notification if \r\taString is not a class variable or if it is still being used in the code of \r\tthe class.\"\r\r\t| aSymbol |\r\taSymbol _ aString asSymbol.\r\t(classPool includesKey: aSymbol)\r\t\tifFalse: [^self error: aString, ' is not a class variable'].\r\tself withAllSubclasses do:[:subclass |\r\t\t(Array with: subclass with: subclass class) do:[:classOrMeta |\r\t\t\t(classOrMeta whichSelectorsReferTo: (classPool associationAt: aSymbol))\r\t\t\t\tisEmpty ifFalse: [\r\t\t\t\t\t(self confirm: (aString,' is still used in code of class ', classOrMeta name,\r\t\t\t\t\t\t'.\\Is it okay to move it to Undeclared?') withCRs)\r\t\t\t\t\t\tifTrue:[^Undeclared declare: aSymbol from: classPool]\r\t\t\t\t\t\tifFalse:[^self]]]].\r\tclassPool removeKey: aSymbol.\r\tclassPool isEmpty ifTrue: [classPool _ nil].\r! !\r\r\r!Class methodsFor: 'pool variables'!\rallSharedPools\r\t\"Answer a Set of the pools the receiver shares, including those defined  \r\tin the superclasses of the receiver.\"\r\t| aSet | \r\t^ superclass == nil\r\t\tifTrue: [self sharedPools copy]\r\t\tifFalse: [aSet _ superclass allSharedPools.\r\t\t\taSet addAll: self sharedPools.\r\t\t\taSet]! !\r\r!Class methodsFor: 'pool variables'!\rsharedPools\r\t\"Answer a Set of the pool dictionaries declared in the receiver.\"\r\r\tsharedPools == nil\r\t\tifTrue: [^OrderedCollection new]\r\t\tifFalse: [^sharedPools]! !\r\r\r!Class methodsFor: 'compiling' stamp: 'ar 5/17/2003 14:06'!\rbindingOf: varName\r\t\"Answer the binding of some variable resolved in the scope of the receiver\"\r\t| aSymbol binding |\r\taSymbol := varName asSymbol.\r\r\t\"First look in classVar dictionary.\"\r\tbinding := self classPool bindingOf: aSymbol.\r\tbinding ifNotNil:[^binding].\r\r\t\"Next look in shared pools.\"\r\tself sharedPools do:[:pool | \r\t\tbinding := pool bindingOf: aSymbol.\r\t\tbinding ifNotNil:[^binding].\r\t].\r\r\t\"Next look in declared environment.\"\r\tbinding := self environment bindingOf: aSymbol.\r\tbinding ifNotNil:[^binding].\r\r\t\"Finally look higher up the superclass chain and fail at the end.\"\r\tsuperclass == nil\r\t\tifTrue: [^ nil]\r\t\tifFalse: [^ superclass bindingOf: aSymbol].\r\r! !\r\r!Class methodsFor: 'compiling' stamp: 'ar 7/14/1999 04:56'!\rcompileAll\r\tsuper compileAll.\r\tself class compileAll.! !\r\r!Class methodsFor: 'compiling'!\rcompileAllFrom: oldClass\r\t\"Recompile all the methods in the receiver's method dictionary (not the\r\tsubclasses). Also recompile the methods in the metaclass.\"\r\r\tsuper compileAllFrom: oldClass.\r\tself class compileAllFrom: oldClass class! !\r\r!Class methodsFor: 'compiling' stamp: 'sd 3/28/2003 15:24'!\rpossibleVariablesFor: misspelled continuedFrom: oldResults\r\r\t| results |\r\tresults _ misspelled correctAgainstDictionary: self classPool continuedFrom: oldResults.\r\tself sharedPools do: [:pool | \r\t\tresults _ misspelled correctAgainstDictionary: pool continuedFrom: results ].\r\tsuperclass == nil\r\t\tifTrue: \r\t\t\t[ ^ misspelled correctAgainstDictionary: self environment continuedFrom: results ]\r\t\tifFalse:\r\t\t\t[ ^ superclass possibleVariablesFor: misspelled continuedFrom: results ]! !\r\r\r!Class methodsFor: 'subclass creation' stamp: 'ar 7/15/1999 18:57'!\rsubclass: t instanceVariableNames: f classVariableNames: d poolDictionaries: s category: cat \r\t\"This is the standard initialization message for creating a new class as a \r\tsubclass of an existing class (the receiver).\"\r\t^(ClassBuilder new)\r\t\tsuperclass: self\r\t\tsubclass: t\r\t\tinstanceVariableNames: f\r\t\tclassVariableNames: d\r\t\tpoolDictionaries: s\r\t\tcategory: cat\r! !\r\r!Class methodsFor: 'subclass creation' stamp: 'ar 7/15/1999 18:57'!\rvariableByteSubclass: t instanceVariableNames: f \r\tclassVariableNames: d poolDictionaries: s category: cat\r\t\"This is the standard initialization message for creating a new class as a \r\tsubclass of an existing class (the receiver) in which the subclass is to \r\thave indexable byte-sized nonpointer variables.\"\r\t^(ClassBuilder new)\r\t\tsuperclass: self\r\t\tvariableByteSubclass: t\r\t\tinstanceVariableNames: f\r\t\tclassVariableNames: d\r\t\tpoolDictionaries: s\r\t\tcategory: cat\r! !\r\r!Class methodsFor: 'subclass creation' stamp: 'ar 7/15/1999 18:56'!\rvariableSubclass: t instanceVariableNames: f \r\tclassVariableNames: d poolDictionaries: s category: cat\r\t\"This is the standard initialization message for creating a new class as a \r\tsubclass of an existing class (the receiver) in which the subclass is to \r\thave indexable pointer variables.\"\r\t^(ClassBuilder new)\r\t\tsuperclass: self\r\t\tvariableSubclass: t\r\t\tinstanceVariableNames: f\r\t\tclassVariableNames: d\r\t\tpoolDictionaries: s\r\t\tcategory: cat\r! !\r\r!Class methodsFor: 'subclass creation' stamp: 'ar 7/15/1999 18:56'!\rvariableWordSubclass: t instanceVariableNames: f \r\tclassVariableNames: d poolDictionaries: s category: cat\r\t\"This is the standard initialization message for creating a new class as a \r\tsubclass of an existing class (the receiver) in which the subclass is to \r\thave indexable word-sized nonpointer variables.\"\r\t^(ClassBuilder new)\r\t\tsuperclass: self\r\t\tvariableWordSubclass: t\r\t\tinstanceVariableNames: f\r\t\tclassVariableNames: d\r\t\tpoolDictionaries: s\r\t\tcategory: cat\r! !\r\r!Class methodsFor: 'subclass creation' stamp: 'dwh 11/20/1999 23:44'!\rweakSubclass: t instanceVariableNames: f \r\tclassVariableNames: d poolDictionaries: s category: cat\r\t\"This is the standard initialization message for creating a new class as a \r\tsubclass of an existing class (the receiver) in which the subclass is to \r\thave weak indexable pointer variables.\"\r\t^(ClassBuilder new)\r\t\tsuperclass: self\r\t\tweakSubclass: t\r\t\tinstanceVariableNames: f\r\t\tclassVariableNames: d\r\t\tpoolDictionaries: s\r\t\tcategory: cat! !\r\r\r!Class methodsFor: 'fileIn/Out' stamp: 'di 6/28/97 09:58'!\rfileOut\r\t\"Create a file whose name is the name of the receiver with '.st' as the \r\textension, and file a description of the receiver onto it.\"\r\t^ self fileOutAsHtml: false! !\r\r!Class methodsFor: 'fileIn/Out' stamp: 'tk 3/7/2001 13:57'!\rfileOutAsHtml: useHtml\r\t\"File a description of the receiver onto a new file whose base name is the name of the receiver.\"\r\r\t| fileStream |\r\tfileStream _ useHtml\r\t\tifTrue: [(FileStream newFileNamed: self name, FileDirectory dot, 'html') asHtml]\r\t\tifFalse: [FileStream newFileNamed: self name, FileDirectory dot, 'st'].\r\tfileStream header; timeStamp.\r\tself sharedPools size > 0 ifTrue: [\r\t\tself shouldFileOutPools\r\t\t\tifTrue: [self fileOutSharedPoolsOn: fileStream]].\r\tself fileOutOn: fileStream moveSource: false toFile: 0.\r\tfileStream trailer; close.\r\r\t\"DeepCopier new checkVariables.\"\r! !\r\r!Class methodsFor: 'fileIn/Out' stamp: 'ar 12/22/1999 17:32'!\rfileOutInitializerOn: aStream\r\t^self class fileOutInitializerOn: aStream! !\r\r!Class methodsFor: 'fileIn/Out' stamp: 'ar 12/22/1999 17:30'!\rfileOutOn: aFileStream moveSource: moveSource toFile: fileIndex \r\t\"File a description of the receiver on aFileStream. If the boolean argument,\r\tmoveSource, is true, then set the trailing bytes to the position of aFileStream and\r\tto fileIndex in order to indicate where to find the source code.\"\r\t^self fileOutOn: aFileStream moveSource: moveSource toFile: fileIndex initializing: true! !\r\r!Class methodsFor: 'fileIn/Out' stamp: 'ar 12/22/1999 17:29'!\rfileOutOn: aFileStream moveSource: moveSource toFile: fileIndex initializing: aBool\r\t\"File a description of the receiver on aFileStream. If the boolean argument,\r\tmoveSource, is true, then set the trailing bytes to the position of aFileStream and\r\tto fileIndex in order to indicate where to find the source code.\"\r\r\tTranscript cr; show: name.\r\tsuper\r\t\tfileOutOn: aFileStream\r\t\tmoveSource: moveSource\r\t\ttoFile: fileIndex.\r\tself class nonTrivial\r\t\tifTrue:\r\t\t\t[aFileStream cr; nextPutAll: '\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!!'; cr; cr.\r\t\t\tself class\r\t\t\t\tfileOutOn: aFileStream\r\t\t\t\tmoveSource: moveSource\r\t\t\t\ttoFile: fileIndex\r\t\t\t\tinitializing: aBool]! !\r\r!Class methodsFor: 'fileIn/Out' stamp: 'tpr 5/30/2003 13:01'!\rfileOutPool: aPool onFileStream: aFileStream \r\t| aPoolName aValue |\r\t(aPool  isKindOf: SharedPool class) ifTrue:[^self notify: 'we do not fileout SharedPool type shared pools for now'].\r\taPoolName _ self environment keyAtIdentityValue: aPool.\r\tTranscript cr; show: aPoolName.\r\taFileStream nextPutAll: 'Transcript show: ''' , aPoolName , '''; cr!!'; cr.\r\taFileStream nextPutAll: 'Smalltalk at: #' , aPoolName , ' put: Dictionary new!!'; cr.\r\taPool keys asSortedCollection do: [ :aKey |\r\t\taValue _ aPool at: aKey.\r\t\taFileStream nextPutAll: aPoolName , ' at: #''' , aKey asString , '''', ' put:  '.\r\t\t(aValue isKindOf: Number)\r\t\t\tifTrue: [aValue printOn: aFileStream]\r\t\t\tifFalse: [aFileStream nextPutAll: '('.\r\t\t\t\t\taValue printOn: aFileStream.\r\t\t\t\t\taFileStream nextPutAll: ')'].\r\t\taFileStream nextPutAll: '!!'; cr].\r\taFileStream cr! !\r\r!Class methodsFor: 'fileIn/Out' stamp: 'sd 3/28/2003 15:24'!\rfileOutSharedPoolsOn: aFileStream\r\t\"file out the shared pools of this class after prompting the user about each pool\"\r\t| poolsToFileOut |\r\tpoolsToFileOut _ self sharedPools select: \r\t\t[:aPool | (self shouldFileOutPool: (self environment keyAtIdentityValue: aPool))].\r\tpoolsToFileOut do: [:aPool | self fileOutPool: aPool onFileStream: aFileStream].\r\t! !\r\r!Class methodsFor: 'fileIn/Out'!\rshouldFileOutPool: aPoolName\r\t\"respond with true if the user wants to file out aPoolName\"\r\t^self confirm: ('FileOut the sharedPool ', aPoolName, '?')! !\r\r!Class methodsFor: 'fileIn/Out'!\rshouldFileOutPools\r\t\"respond with true if the user wants to file out the shared pools\"\r\t^self confirm: 'FileOut selected sharedPools?'! !\r\r\r!Class methodsFor: 'accessing class hierarchy' stamp: 'tk 10/17/1999 13:31'!\raddSubclass: aSubclass \r\t\"Make the argument, aSubclass, be one of the subclasses of the receiver. \r\tCreate an error notification if the argument's superclass is not the receiver.\"\r\t\r\taSubclass superclass ~~ self \r\t\tifTrue: [^self error: aSubclass name , ' is not my subclass'].\r\tsubclasses == nil\r\t\tifTrue:\t[subclasses _ Array with: aSubclass.\r\t\t\t\t^self].\r\tsubclasses do:[:cl| cl == aSubclass ifTrue:[^self]]. \"Already my subclass\"\r\tsubclasses _ subclasses copyWith: aSubclass.! !\r\r!Class methodsFor: 'accessing class hierarchy' stamp: 'ar 7/14/1999 10:54'!\rremoveSubclass: aSubclass \r\t\"If the argument, aSubclass, is one of the receiver's subclasses, remove it.\"\r\r\tsubclasses == nil ifFalse:\r\t\t[subclasses _  subclasses copyWithout: aSubclass.\r\t\tsubclasses isEmpty ifTrue: [subclasses _ nil]].\r! !\r\r!Class methodsFor: 'accessing class hierarchy' stamp: 'ar 7/14/1999 11:00'!\rsubclasses\r\t\"Answer a Set containing the receiver's subclasses.\"\r\r\t^subclasses == nil\r\t\tifTrue: [#()]\r\t\tifFalse: [subclasses copy]! !\r\r!Class methodsFor: 'accessing class hierarchy' stamp: 'ar 7/14/1999 11:00'!\rsubclassesDo: aBlock \r\t\"Evaluate the argument, aBlock, for each of the receiver's immediate subclasses.\"\r\tsubclasses == nil \r\t\tifFalse:[subclasses do: aBlock]! !\r\r!Class methodsFor: 'accessing class hierarchy' stamp: 'tk 8/18/1999 17:42'!\rsubclassesDoGently: aBlock \r\t\"Evaluate the argument, aBlock, for each of the receiver's immediate subclasses.\"\r\tsubclasses == nil \r\t\tifFalse: [subclasses do: aBlock]! !\r\r\r!Class methodsFor: 'private' stamp: 'ar 7/15/1999 15:37'!\rsetName: aSymbol\r\t\"Private - set the name of the class\"\r\tname _ aSymbol.! !\r\r\r!Class methodsFor: 'organization' stamp: 'di 11/16/1999 16:25'!\renvironment\r\r\tenvironment == nil ifTrue: [^ super environment].\r\t^ environment! !\r\r!Class methodsFor: 'organization' stamp: 'di 12/23/1999 11:42'!\renvironment: anEnvironment\r\r\tenvironment _ anEnvironment! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rClass class\r\tinstanceVariableNames: ''!\r\r!Class class methodsFor: 'instance creation' stamp: 'di 6/7/2000 22:01'!\rtemplate: aSystemCategoryName \r\t\"Answer an expression that can be edited and evaluated in order to define a new class.\"\r\r\t^ self templateForSubclassOf: Object name category: aSystemCategoryName ! !\r\r!Class class methodsFor: 'instance creation' stamp: 'di 6/7/2000 21:57'!\rtemplateForSubclassOf: priorClassName category: systemCategoryName \r\t\"Answer an expression that can be edited and evaluated in order to define a new class, given that the class previously looked at was as given\"\r\r\tPreferences printAlternateSyntax \r\t\tifTrue: [^ priorClassName asString, ' subclass (#NameOfSubclass)\r\tinstanceVariableNames ('''')\r\tclassVariableNames ('''')\r\tpoolDictionaries ('''')\r\tcategory (''' , systemCategoryName asString , ''')']\r\t\tifFalse: [^ priorClassName asString, ' subclass: #NameOfSubclass\r\tinstanceVariableNames: ''''\r\tclassVariableNames: ''''\r\tpoolDictionaries: ''''\r\tcategory: ''' , systemCategoryName asString , '''']! !\rObject subclass: #ClassBuilder\r\tinstanceVariableNames: 'environ classMap instVarMap progress maxClassIndex currentClassIndex'\r\tclassVariableNames: 'QuietMode'\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Classes'!\r!ClassBuilder commentStamp: 'ar 2/27/2003 22:55' prior: 0!\rResponsible for creating a new class or changing the format of an existing class (from a class definition in a browser or a fileIn). This includes validating the definition, computing the format of instances, creating or modifying the accompanying Metaclass, setting up the class and metaclass objects themselves, registering the class as a global, recompiling methods, modifying affected subclasses, mutating existing instances to the new format, and more.\r\rYou typically only need to use or modify this class, or even know how it works, when making fundamental changes to how the Smalltalk system and language works.\r\rImplementation notes:\rClassBuilder relies on the assumption that it can see ALL subclasses of some class. If there are any existing subclasses of some class, regardless of whether they have instances or not, regardless of whether they are considered obsolete or not, ClassBuilder MUST SEE THEM.\r!\r\r\r!ClassBuilder methodsFor: 'initialize' stamp: 'ar 3/3/2001 00:29'!\rdoneCompiling: aClass\r\t\"The receiver has finished modifying the class hierarchy.\r\tDo any necessary cleanup.\"\r\taClass doneCompiling.\r\tBehavior flushObsoleteSubclasses.! !\r\r!ClassBuilder methodsFor: 'initialize' stamp: 'ar 8/29/1999 12:32'!\rinitialize\r\tenviron _ Smalltalk.\r\tinstVarMap _ IdentityDictionary new.! !\r\r\r!ClassBuilder methodsFor: 'class definition' stamp: 'NS 1/21/2004 09:20'!\rclass: oldClass instanceVariableNames: instVarString unsafe: unsafe\r\t\"This is the basic initialization message to change the definition of\r\tan existing Metaclass\"\r\t| instVars newClass needNew copyOfOldClass |\r\tenviron _ oldClass environment.\r\tinstVars _ Scanner new scanFieldNames: instVarString.\r\tunsafe ifFalse:[\r\t\t\"Run validation checks so we know that we have a good chance for recompilation\"\r\t\t(self validateInstvars: instVars from: oldClass forSuper: oldClass superclass) ifFalse:[^nil].\r\t\t(self validateSubclassFormat: oldClass typeOfClass from: oldClass forSuper: oldClass superclass extra: instVars size) ifFalse:[^nil]].\r\t\"See if we need a new subclass or not\"\r\tneedNew _ self needsSubclassOf: oldClass superclass type: oldClass typeOfClass instanceVariables: instVars from: oldClass.\r\tneedNew ifNil:[^nil]. \"some error\"\r\tneedNew ifFalse:[^oldClass]. \"no new class needed\"\r\r\t\"Create the new class\"\r\tcopyOfOldClass _ oldClass copy.\r\tnewClass _ self \r\t\tnewSubclassOf: oldClass superclass \r\t\ttype: oldClass typeOfClass\r\t\tinstanceVariables: instVars\r\t\tfrom: oldClass.\r\t\t\r\tnewClass _ self recompile: false from: oldClass to: newClass mutate: false.\r\tself doneCompiling: newClass.\r\tSystemChangeNotifier uniqueInstance classDefinitionChangedFrom: copyOfOldClass to: newClass.\r\t^newClass! !\r\r!ClassBuilder methodsFor: 'class definition' stamp: 'ar 8/29/1999 15:34'!\rname: className inEnvironment: env subclassOf: newSuper type: type instanceVariableNames: instVarString classVariableNames: classVarString poolDictionaries: poolString category: category\r\t\"Define a new class in the given environment\"\r\t^self \r\t\tname: className \r\t\tinEnvironment: env \r\t\tsubclassOf: newSuper \r\t\ttype: type \r\t\tinstanceVariableNames: instVarString \r\t\tclassVariableNames: classVarString \r\t\tpoolDictionaries: poolString \r\t\tcategory: category\r\t\tunsafe: false! !\r\r!ClassBuilder methodsFor: 'class definition' stamp: 'NS 1/20/2004 19:46'!\rname: className inEnvironment: env subclassOf: newSuper type: type instanceVariableNames: instVarString classVariableNames: classVarString poolDictionaries: poolString category: category unsafe: unsafe\r\t\"Define a new class in the given environment.\r\tIf unsafe is true do not run any validation checks.\r\tThis facility is provided to implement important system changes.\"\r\t| oldClass newClass organization instVars classVars force needNew oldCategory copyOfOldClass newCategory |\r\tenviron _ env.\r\tinstVars _ Scanner new scanFieldNames: instVarString.\r\tclassVars _ (Scanner new scanFieldNames: classVarString) collect: [:x | x asSymbol].\r\r\t\"Validate the proposed name\"\r\tunsafe ifFalse:[(self validateClassName: className) ifFalse:[^nil]].\r\toldClass _ env at: className ifAbsent:[nil].\r\toldClass isBehavior \r\t\tifFalse:[oldClass _ nil]. \"Already checked in #validateClassName:\"\r\tcopyOfOldClass _ oldClass copy.\r\r\tunsafe ifFalse:[\r\t\t\"Run validation checks so we know that we have a good chance for recompilation\"\r\t\t(self validateSuperclass: newSuper forSubclass: oldClass) ifFalse:[^nil].\r\t\t(self validateInstvars: instVars from: oldClass forSuper: newSuper) ifFalse:[^nil].\r\t\t(self validateClassvars: classVars from: oldClass forSuper: newSuper) ifFalse:[^nil].\r\t\t(self validateSubclassFormat: type from: oldClass forSuper: newSuper extra: instVars size) ifFalse:[^nil]].\r\r\t\"See if we need a new subclass\"\r\tneedNew _ self needsSubclassOf: newSuper type: type instanceVariables: instVars from: oldClass.\r\tneedNew == nil ifTrue:[^nil]. \"some error\"\r\r\t(needNew and:[unsafe not]) ifTrue:[\r\t\t\"Make sure we don't redefine any dangerous classes\"\r\t\t(self tooDangerousClasses includes: oldClass name) ifTrue:[\r\t\t\tself error: oldClass name, ' cannot be changed'.\r\t\t].\r\t\t\"Check if the receiver should not be redefined\"\r\t\t(oldClass ~~ nil and:[oldClass shouldNotBeRedefined]) ifTrue:[\r\t\t\tself notify: oldClass name asText allBold, \r\t\t\t\t\t\t' should not be redefined!! \\Proceed to store over it.' withCRs]].\r\r\tneedNew ifTrue:[\r\t\t\"Create the new class\"\r\t\tnewClass _ self \r\t\t\tnewSubclassOf: newSuper \r\t\t\ttype: type \r\t\t\tinstanceVariables: instVars\r\t\t\tfrom: oldClass.\r\t\tnewClass == nil ifTrue:[^nil]. \"Some error\"\r\t\tnewClass setName: className.\r\t] ifFalse:[\r\t\t\"Reuse the old class\"\r\t\tnewClass _ oldClass.\r\t].\r\r\t\"Install the class variables and pool dictionaries... \"\r\tforce _ (newClass declare: classVarString) | (newClass sharing: poolString).\r\r\t\"... classify ...\"\r\tnewCategory _ category asSymbol.\r\torganization _ environ ifNotNil:[environ organization].\r\toldClass isNil ifFalse: [oldCategory := (organization categoryOfElement: oldClass name) asSymbol].\r\torganization classify: newClass name under: newCategory.\r\tnewClass environment: environ.\r\r\t\"... recompile ...\"\r\tnewClass _ self recompile: force from: oldClass to: newClass mutate: false.\r\r\t\"... export if not yet done ...\"\r\t(environ at: newClass name ifAbsent:[nil]) == newClass ifFalse:[\r\t\t[environ at: newClass name put: newClass]\r\t\t\ton: AttemptToWriteReadOnlyGlobal do:[:ex| ex resume: true].\r\t\tSmalltalk flushClassNameCache.\r\t].\r\r\tself doneCompiling: newClass.\r\t\r\t\"... notify interested clients ...\"\r\toldClass isNil ifTrue: [\r\t\tSystemChangeNotifier uniqueInstance classAdded: newClass inCategory: newCategory.\r\t\t^ newClass].\r\tSystemChangeNotifier uniqueInstance classDefinitionChangedFrom: copyOfOldClass to: newClass.\r\tnewCategory ~= oldCategory \r\t\tifTrue: [SystemChangeNotifier uniqueInstance class: newClass recategorizedFrom: oldCategory to: category].\r\t^newClass! !\r\r!ClassBuilder methodsFor: 'class definition' stamp: 'ar 9/22/2002 02:57'!\rneedsSubclassOf: newSuper type: type instanceVariables: instVars from: oldClass\r\t\"Answer whether we need a new subclass to conform to the requested changes\"\r\t| newFormat |\r\t\"Compute the format of the new class\"\r\tnewFormat _ \r\t\tself computeFormat: type \r\t\t\tinstSize: instVars size \r\t\t\tforSuper: newSuper \r\t\t\tccIndex: (oldClass ifNil:[0] ifNotNil:[oldClass indexIfCompact]).\r\tnewFormat == nil ifTrue:[^nil].\r\r\t\"Check if we really need a new subclass\"\r\toldClass ifNil:[^true]. \"yes, it's a new class\"\r\tnewSuper == oldClass superclass ifFalse:[^true]. \"yes, it's a superclass change\"\r\tnewFormat = oldClass format ifFalse:[^true]. \"yes, it's a format change\"\r\tinstVars = oldClass instVarNames ifFalse:[^true]. \"yes, it's an iVar change\"\r\r\t^false\r! !\r\r!ClassBuilder methodsFor: 'class definition' stamp: 'ar 2/27/2003 22:56'!\rnewSubclassOf: newSuper type: type instanceVariables: instVars from: oldClass\r\t\"Create a new subclass of the given superclass with the given specification.\"\r\t| newFormat newClass |\r\t\"Compute the format of the new class\"\r\tnewFormat _ \r\t\tself computeFormat: type \r\t\t\tinstSize: instVars size \r\t\t\tforSuper: newSuper \r\t\t\tccIndex: (oldClass ifNil:[0] ifNotNil:[oldClass indexIfCompact]).\r\r\tnewFormat == nil ifTrue:[^nil].\r\r\t(oldClass == nil or:[oldClass isMeta not]) \r\t\tifTrue:[newClass _ self privateNewSubclassOf: newSuper from: oldClass]\r\t\tifFalse:[newClass _ oldClass clone].\r\r\tnewClass \r\t\tsuperclass: newSuper\r\t\tmethodDictionary: MethodDictionary new\r\t\tformat: newFormat;\r\t\tsetInstVarNames: instVars.\r\r\toldClass ifNotNil:[\r\t\tnewClass organization: oldClass organization.\r\t\t\"Recompile the new class\"\r\t\toldClass hasMethods \r\t\t\tifTrue:[newClass compileAllFrom: oldClass].\r\t\tself recordClass: oldClass replacedBy: newClass.\r\t].\r\r\t(oldClass == nil or:[oldClass isObsolete not]) \r\t\tifTrue:[newSuper addSubclass: newClass]\r\t\tifFalse:[newSuper addObsoleteSubclass: newClass].\r\r\t^newClass! !\r\r!ClassBuilder methodsFor: 'class definition' stamp: 'NS 1/21/2004 09:53'!\rrecompile: force from: oldClass to: newClass mutate: forceMutation\r\t\"Do the necessary recompilation after changine oldClass to newClass.\r\tIf required (e.g., when oldClass ~~ newClass) mutate oldClass to newClass\r\tand all its subclasses. If forceMutation is true force a mutation even\r\tif oldClass and newClass are the same.\"\r\r\toldClass == nil ifTrue:[^ newClass].\r\r\t(newClass == oldClass and:[force not and:[forceMutation not]]) ifTrue:[\r\t\t^newClass].\r\r\tcurrentClassIndex _ 0.\r\tmaxClassIndex _ oldClass withAllSubclasses size.\r\r\t(oldClass == newClass and:[forceMutation not]) ifTrue:[\r\t\t\"Recompile from newClass without mutating\"\r\t\tself informUserDuring:[\r\t\t\tnewClass isSystemDefined ifFalse:[progress _ nil].\r\t\t\tnewClass withAllSubclassesDo:[:cl|\r\t\t\t\tself showProgressFor: cl.\r\t\t\t\tcl compileAll]].\r\t\t^newClass].\r\t\"Recompile and mutate oldClass to newClass\"\r\tself informUserDuring:[\r\t\tnewClass isSystemDefined ifFalse:[progress _ nil].\r\t\tself mutate: oldClass to: newClass.\r\t].\r\t^oldClass \"now mutated to newClass\"! !\r\r\r!ClassBuilder methodsFor: 'class format' stamp: 'ar 9/10/1999 12:55'!\rcomputeFormat: type instSize: newInstSize forSuper: newSuper ccIndex: ccIndex\r\t\"Compute the new format for making oldClass a subclass of newSuper.\r\tReturn the format or nil if there is any problem.\"\r\t| instSize isVar isWords isPointers isWeak |\r\tinstSize _ newInstSize + (newSuper ifNil:[0] ifNotNil:[newSuper instSize]).\r\tinstSize > 254 ifTrue:[\r\t\tself error: 'Class has too many instance variables (', instSize printString,')'.\r\t\t^nil].\r\ttype == #compiledMethod\r\t\tifTrue:[^CompiledMethod instSpec].\r\ttype == #normal ifTrue:[isVar _ isWeak _ false. isWords _ isPointers _ true].\r\ttype == #bytes ifTrue:[isVar _ true. isWords _ isPointers _ isWeak _ false].\r\ttype == #words ifTrue:[isVar _ isWords _ true. isPointers _ isWeak _ false].\r\ttype == #variable ifTrue:[isVar _ isPointers _ isWords _ true. isWeak _ false].\r\ttype == #weak ifTrue:[isVar _ isWeak _ isWords _ isPointers _ true].\r\t(isPointers not and:[instSize > 0]) ifTrue:[\r\t\tself error:'A non-pointer class cannot have instance variables'.\r\t\t^nil].\r\t^(self format: instSize \r\t\tvariable: isVar \r\t\twords: isWords \r\t\tpointers: isPointers \r\t\tweak: isWeak) + (ccIndex bitShift: 11).! !\r\r!ClassBuilder methodsFor: 'class format' stamp: 'ar 7/11/1999 06:39'!\rformat: nInstVars variable: isVar words: isWords pointers: isPointers weak: isWeak\r\t\"Compute the format for the given instance specfication.\"\r\t| cClass instSpec sizeHiBits fmt |\r\tself flag: #instSizeChange.\r\"\rSmalltalk browseAllCallsOn: #instSizeChange.\rSmalltalk browseAllImplementorsOf: #fixedFieldsOf:.\rSmalltalk browseAllImplementorsOf: #instantiateClass:indexableSize:.\r\"\r\"\r\tNOTE: This code supports the backward-compatible extension to 8 bits of instSize.\r\tFor now the format word is...\r\t\t<2 bits=instSize//64><5 bits=cClass><4 bits=instSpec><6 bits=instSize\\\\64><1 bit=0>\r\tBut when we revise the image format, it should become...\r\t\t<5 bits=cClass><4 bits=instSpec><8 bits=instSize><1 bit=0>\r\"\r\tsizeHiBits _ (nInstVars+1) // 64.\r\tcClass _ 0.  \"for now\"\r\tinstSpec _ isWeak\r\t\tifTrue:[4]\r\t\tifFalse:[isPointers\r\t\t\t\tifTrue: [isVar\r\t\t\t\t\t\tifTrue: [nInstVars>0 ifTrue: [3] ifFalse: [2]]\r\t\t\t\t\t\tifFalse: [nInstVars>0 ifTrue: [1] ifFalse: [0]]]\r\t\t\t\tifFalse: [isWords ifTrue: [6] ifFalse: [8]]].\r\tfmt _ sizeHiBits.\r\tfmt _ (fmt bitShift: 5) + cClass.\r\tfmt _ (fmt bitShift: 4) + instSpec.\r\tfmt _ (fmt bitShift: 6) + ((nInstVars+1)\\\\64).  \"+1 since prim size field includes header\"\r\tfmt _ (fmt bitShift: 1). \"This shift plus integer bit lets wordSize work like byteSize\"\r\t^fmt! !\r\r\r!ClassBuilder methodsFor: 'validation' stamp: 'ar 7/13/1999 05:26'!\rvalidateClassName: aString\r\t\"Validate the new class name\"\r\taString first isUppercase ifFalse:[\r\t\tself error: 'Class names must be capitalized'.\r\t\t^false].\r\tenviron at: aString ifPresent:[:old|\r\t\t(old isKindOf: Behavior) ifFalse:[\r\t\t\tself notify: aString asText allBold, \r\t\t\t\t\t\t' already exists!!\\Proceed will store over it.' withCRs]].\r\t^true! !\r\r!ClassBuilder methodsFor: 'validation' stamp: 'ar 7/15/1999 13:48'!\rvalidateClassvars: classVarArray from: oldClass forSuper: newSuper\r\t\"Check if any of the classVars of oldClass conflict with the new superclass\"\r\t| usedNames classVars temp |\r\tclassVarArray isEmpty ifTrue:[^true]. \"Okay\"\r\r\t\"Validate the class var names\"\r\tusedNames _ classVarArray asSet.\r\tusedNames size = classVarArray size \r\t\tifFalse:[\tclassVarArray do:[:var|\r\t\t\t\t\tusedNames remove: var ifAbsent:[temp _ var]].\r\t\t\t\tself error: temp,' is multiply defined'. ^false].\r\t(usedNames includesAnyOf: self reservedNames) \r\t\tifTrue:[\tself reservedNames do:[:var|\r\t\t\t\t\t(usedNames includes: var) ifTrue:[temp _ var]].\r\t\t\t\tself error: temp,' is a reserved name'. ^false].\r\r\tnewSuper == nil ifFalse:[\r\t\tusedNames _ newSuper allClassVarNames asSet.\r\t\tclassVarArray do:[:iv|\r\t\t\t(usedNames includes: iv) ifTrue:[\r\t\t\t\tnewSuper withAllSuperclassesDo:[:cl|\r\t\t\t\t\t(cl classVarNames includes: iv) ifTrue:[temp _ cl]].\r\t\t\t\tself error: iv, ' is already defined in ', temp name.\r\t\t\t\t^false]]].\r\r\toldClass == nil ifFalse:[\r\t\tusedNames _ Set new: 20.\r\t\toldClass allSubclassesDo:[:cl| usedNames addAll: cl classVarNames].\r\t\tclassVars _ classVarArray.\r\t\tnewSuper == nil ifFalse:[classVars _ classVars, newSuper allClassVarNames asArray].\r\t\tclassVars do:[:iv|\r\t\t\t(usedNames includes: iv) ifTrue:[\r\t\t\t\tself error: iv, ' is already defined in a subclass of ', oldClass name.\r\t\t\t\t^false]]].\r\t^true! !\r\r!ClassBuilder methodsFor: 'validation' stamp: 'ajh 10/17/2002 11:10'!\rvalidateInstvars: instVarArray from: oldClass forSuper: newSuper\r\t\"Check if any of the instVars of oldClass conflict with the new superclass\"\r\t| instVars usedNames temp |\r\tinstVarArray isEmpty ifTrue:[^true]. \"Okay\"\r\tnewSuper allowsSubInstVars ifFalse: [\r\t\tself error: newSuper printString, ' does not allow subclass inst vars. See allowsSubInstVars.'. ^ false].\r\r\t\"Validate the inst var names\"\r\tusedNames _ instVarArray asSet.\r\tusedNames size = instVarArray size \r\t\tifFalse:[\tinstVarArray do:[:var|\r\t\t\t\t\tusedNames remove: var ifAbsent:[temp _ var]].\r\t\t\t\tself error: temp,' is multiply defined'. ^false].\r\t(usedNames includesAnyOf: self reservedNames) \r\t\tifTrue:[\tself reservedNames do:[:var|\r\t\t\t\t\t(usedNames includes: var) ifTrue:[temp _ var]].\r\t\t\t\tself error: temp,' is a reserved name'. ^false].\r\r\tnewSuper == nil ifFalse:[\r\t\tusedNames _ newSuper allInstVarNames asSet.\r\t\tinstVarArray do:[:iv|\r\t\t\t(usedNames includes: iv) ifTrue:[\r\t\t\t\tnewSuper withAllSuperclassesDo:[:cl|\r\t\t\t\t\t(cl instVarNames includes: iv) ifTrue:[temp _ cl]].\r\t\t\t\tself error: iv,' is already defined in ', temp name.\r\t\t\t\t^false]]].\r\toldClass == nil ifFalse:[\r\t\tusedNames _ Set new: 20.\r\t\toldClass allSubclassesDo:[:cl| usedNames addAll: cl instVarNames].\r\t\tinstVars _ instVarArray.\r\t\tnewSuper == nil ifFalse:[instVars _ instVars, newSuper allInstVarNames].\r\t\tinstVars do:[:iv|\r\t\t\t(usedNames includes: iv) ifTrue:[\r\t\t\t\tself error: iv, ' is already defined in a subclass of ', oldClass name.\r\t\t\t\t^false]]].\r\t^true! !\r\r!ClassBuilder methodsFor: 'validation' stamp: 'bkv 4/2/2003 17:13'!\rvalidateSubclass: subclass canKeepLayoutFrom: oldClass forSubclassFormat: newType \r\t\"Returns whether the immediate subclasses of oldClass can keep its layout\"\r\t\"Note: Squeak does not appear to model classFormat relationships.. so I'm putting some logic here. bkv 4/2/2003\"\r\r\t \"isWeak implies isVariant\"\t\t\t\t\t\r\t (oldClass isVariable and: [ subclass isWeak ])\r\t\tifFalse: [ \"In general we discourage format mis-matches\"\r\t\t\t\t  (subclass typeOfClass == newType) \r\t\t\t\t   \tifFalse: [ self error: subclass name,' cannot be recompiled'.\r\t\t\t\t\t\t\t  ^ false ]].\r\t^ true! !\r\r!ClassBuilder methodsFor: 'validation' stamp: 'BG 1/5/2004 20:29'!\rvalidateSubclassFormat: newType from: oldClass forSuper: newSuper extra: newInstSize\r\t\"Validate the # of instVars and the format of the subclasses\"\r\t| deltaSize |\r\toldClass == nil ifTrue: [^ true]. \"No subclasses\"\r\t\"Compute the # of instvars needed for all subclasses\"\r\tdeltaSize _ newInstSize.\r\t(oldClass notNil)\r\t\tifTrue: [deltaSize _ deltaSize - oldClass instVarNames size].\r\t(newSuper notNil)\r\t\tifTrue: [deltaSize _ deltaSize + newSuper instSize].\r\t(oldClass notNil and: [oldClass superclass notNil]) \r\t\tifTrue: [deltaSize _ deltaSize - oldClass superclass instSize].\r\t(oldClass == nil)\r\t\t ifTrue: [ (deltaSize > 254)\r\t\t\t\t\tifTrue: [ self error: 'More than 254 instance variables'.\r\t\t\t\t\t\t\t^ false].\r\t\t\t\t  ^ true].\r\toldClass withAllSubclassesDo:\r\t    [:sub |  ( sub instSize + deltaSize > 254 )\r\t\t\t\t\tifTrue: [ self error: sub name,' has more than 254 instance variables'.\r\t\t\t\t\t \t\t^ false]\r\t\t].\r\r\tnewType ~~ #normal ifTrue:\r\t\t[\"And check if the immediate subclasses of oldClass can keep its layout\"\r\t\t oldClass subclassesDo: [:sub |\r\t\t\t self validateSubclass: sub canKeepLayoutFrom: oldClass forSubclassFormat: newType]\r\t\t].\r\r\t^ true! !\r\r!ClassBuilder methodsFor: 'validation' stamp: 'ar 7/15/1999 13:50'!\rvalidateSuperclass: aSuperClass forSubclass: aClass\r\t\"Check if it is okay to use aSuperClass as the superclass of aClass\"\r\taClass == nil ifTrue:[\"New class\"\r\t\t(aSuperClass == nil or:[aSuperClass isBehavior and:[aSuperClass isMeta not]])\r\t\t\tifFalse:[self error: aSuperClass name,' is not a valid superclass'.\r\t\t\t\t\t^false].\r\t\t^true].\r\taSuperClass == aClass superclass ifTrue:[^true]. \"No change\"\r\t(aClass isMeta) \"Not permitted - meta class hierarchy is derived from class hierarchy\"\r\t\tifTrue:[^self error: aClass name, ' must inherit from ', aClass superclass name].\r\t\"Check for circular references\"\r\t(aSuperClass ~~ nil and:[aSuperClass == aClass or:[aSuperClass inheritsFrom: aClass]])\r\t\tifTrue:[self error: aSuperClass name,' inherits from ', aClass name.\r\t\t\t\t^false].\r\t^true! !\r\r\r!ClassBuilder methodsFor: 'private' stamp: 'ar 8/29/1999 13:03'!\rinformUserDuring: aBlock\r\tself class isSilent ifTrue:[^aBlock value].\r\tUtilities informUserDuring:[:bar|\r\t\tprogress _ bar.\r\t\taBlock value].\r\tprogress _ nil.! !\r\r!ClassBuilder methodsFor: 'private' stamp: 'ar 2/27/2003 22:56'!\rprivateNewSubclassOf: newSuper\r\t\"Create a new meta and non-meta subclass of newSuper\"\r\t\"WARNING: This method does not preserve the superclass/subclass invariant!!\"\r\t| newSuperMeta newMeta |\r\tnewSuperMeta _ newSuper ifNil:[Class] ifNotNil:[newSuper class].\r\tnewMeta _ Metaclass new.\r\tnewMeta \r\t\tsuperclass: newSuperMeta \r\t\tmethodDictionary: MethodDictionary new \r\t\tformat: newSuperMeta format.\r\t^newMeta new\r! !\r\r!ClassBuilder methodsFor: 'private' stamp: 'ar 2/27/2003 22:56'!\rprivateNewSubclassOf: newSuper from: oldClass\r\t\"Create a new meta and non-meta subclass of newSuper using oldClass as template\"\r\t\"WARNING: This method does not preserve the superclass/subclass invariant!!\"\r\t| newSuperMeta oldMeta newMeta |\r\toldClass ifNil:[^self privateNewSubclassOf: newSuper].\r\tnewSuperMeta _ newSuper ifNil:[Class] ifNotNil:[newSuper class].\r\toldMeta _ oldClass class.\r\tnewMeta _ oldMeta clone.\r\tnewMeta \r\t\tsuperclass: newSuperMeta\r\t\tmethodDictionary: MethodDictionary new\r\t\tformat: (self computeFormat: oldMeta typeOfClass \r\t\t\t\t\tinstSize: oldMeta instVarNames size \r\t\t\t\t\tforSuper: newSuperMeta\r\t\t\t\t\tccIndex: 0);\r\t\tsetInstVarNames: oldMeta instVarNames;\r\t\torganization: oldMeta organization.\r\t\"Recompile the meta class\"\r\toldMeta hasMethods \r\t\tifTrue:[newMeta compileAllFrom: oldMeta].\r\t\"Record the meta class change\"\r\tself recordClass: oldMeta replacedBy: newMeta.\r\t\"And create a new instance\"\r\t^newMeta adoptInstance: oldClass from: oldMeta! !\r\r!ClassBuilder methodsFor: 'private' stamp: 'NS 1/27/2004 14:21'!\rrecordClass: oldClass replacedBy: newClass\r\t\"Keep the changes up to date when we're moving instVars around\"\r\t(instVarMap includesKey: oldClass name) ifTrue:[\r\t\tSystemChangeNotifier uniqueInstance classDefinitionChangedFrom: oldClass to: newClass.\r\t].! !\r\r!ClassBuilder methodsFor: 'private' stamp: 'ar 7/15/1999 13:39'!\rreservedNames\r\t\"Return a list of names that must not be used for variables\"\r\t^#('self' 'super' 'thisContext' 'true' 'false' 'nil' \r\t\tself super thisContext true false nil).! !\r\r!ClassBuilder methodsFor: 'private' stamp: 'ar 3/5/2001 12:00'!\rshowProgressFor: aClass\r\t\"Announce that we're processing aClass\"\r\tprogress == nil ifTrue:[^self].\r\taClass isObsolete ifTrue:[^self].\r\tcurrentClassIndex _ currentClassIndex + 1.\r\t(aClass hasMethods and: [aClass wantsRecompilationProgressReported]) ifTrue:\r\t\t[progress value: ('Recompiling ', aClass name,' (', currentClassIndex printString,'/', maxClassIndex printString,')')]! !\r\r!ClassBuilder methodsFor: 'private' stamp: 'ar 8/29/1999 15:43'!\rtooDangerousClasses\r\t\"Return a list of class names which will not be modified in the public interface\"\r\t^#(\r\t\t\"Object will break immediately\"\r\t\tObject\r\t\t\"Contexts and their superclasses\"\r\t\tInstructionStream ContextPart BlockContext MethodContext\r\t\t\"Superclasses of basic collections\"\r\t\tCollection SequenceableCollection ArrayedCollection\r\t\t\"Collections known to the VM\"\r\t\tArray Bitmap String Symbol ByteArray CompiledMethod TranslatedMethod\r\t\t\"Basic Numbers\"\r\t\tMagnitude Number SmallInteger Float\r\t\t\"Misc other\"\r\t\tLookupKey Association Link Point Rectangle Behavior PositionableStream UndefinedObject\r\t)\r! !\r\r\r!ClassBuilder methodsFor: 'public' stamp: 'ar 8/29/1999 15:38'!\rclass: oldClass instanceVariableNames: instVarString\r\t\"This is the basic initialization message to change the definition of\r\tan existing Metaclass\"\r\toldClass isMeta ifFalse:[^self error: oldClass name, 'is not a Metaclass'].\r\t^self class: oldClass instanceVariableNames: instVarString unsafe: false! !\r\r!ClassBuilder methodsFor: 'public' stamp: 'ar 7/19/1999 23:29'!\rsuperclass: newSuper\r\tsubclass: t instanceVariableNames: f \r\tclassVariableNames: d poolDictionaries: s category: cat \r\t\"This is the standard initialization message for creating a new class as a \r\tsubclass of an existing class.\"\r\t^self \r\t\tname: t\r\t\tinEnvironment: newSuper environment\r\t\tsubclassOf: newSuper\r\t\ttype: newSuper typeOfClass\r\t\tinstanceVariableNames: f\r\t\tclassVariableNames: d\r\t\tpoolDictionaries: s\r\t\tcategory: cat! !\r\r!ClassBuilder methodsFor: 'public' stamp: 'ar 7/19/1999 23:29'!\rsuperclass: aClass\r\tvariableByteSubclass: t instanceVariableNames: f \r\tclassVariableNames: d poolDictionaries: s category: cat\r\t\"This is the standard initialization message for creating a new class as a \r\tsubclass of an existing class in which the subclass is to \r\thave indexable byte-sized nonpointer variables.\"\r\t(aClass instSize > 0)\r\t\tifTrue: [^self error: 'cannot make a byte subclass of a class with named fields'].\r\t(aClass isVariable and: [aClass isWords])\r\t\tifTrue: [^self error: 'cannot make a byte subclass of a class with word fields'].\r\t(aClass isVariable and: [aClass isPointers])\r\t\tifTrue: [^self error: 'cannot make a byte subclass of a class with pointer fields'].\r\r\t^self \r\t\tname: t\r\t\tinEnvironment: aClass environment\r\t\tsubclassOf: aClass\r\t\ttype: #bytes\r\t\tinstanceVariableNames: f\r\t\tclassVariableNames: d\r\t\tpoolDictionaries: s\r\t\tcategory: cat! !\r\r!ClassBuilder methodsFor: 'public' stamp: 'ar 7/19/1999 23:29'!\rsuperclass: aClass\r\tvariableSubclass: t instanceVariableNames: f \r\tclassVariableNames: d poolDictionaries: s category: cat\r\t\"This is the standard initialization message for creating a new class as a \r\tsubclass of an existing class in which the subclass is to \r\thave indexable pointer variables.\"\r\taClass isBits \r\t\tifTrue: [^self error: 'cannot make a pointer subclass of a class with non-pointer fields'].\r\t^self \r\t\tname: t\r\t\tinEnvironment: aClass environment\r\t\tsubclassOf: aClass\r\t\ttype: #variable\r\t\tinstanceVariableNames: f\r\t\tclassVariableNames: d\r\t\tpoolDictionaries: s\r\t\tcategory: cat! !\r\r!ClassBuilder methodsFor: 'public' stamp: 'ar 7/19/1999 23:30'!\rsuperclass: aClass\r\tvariableWordSubclass: t instanceVariableNames: f \r\tclassVariableNames: d poolDictionaries: s category: cat\r\t\"This is the standard initialization message for creating a new class as a \r\tsubclass of an existing class in which the subclass is to \r\thave indexable word-sized nonpointer variables.\"\r\t(aClass instSize > 0)\r\t\tifTrue: [^self error: 'cannot make a word subclass of a class with named fields'].\r\t(aClass isVariable and: [aClass isBytes])\r\t\tifTrue: [^self error: 'cannot make a word subclass of a class with byte fields'].\r\t(aClass isVariable and: [aClass isPointers])\r\t\tifTrue: [^self error: 'cannot make a word subclass of a class with pointer fields'].\r\r\t^self \r\t\tname: t\r\t\tinEnvironment: aClass environment\r\t\tsubclassOf: aClass\r\t\ttype: #words\r\t\tinstanceVariableNames: f\r\t\tclassVariableNames: d\r\t\tpoolDictionaries: s\r\t\tcategory: cat! !\r\r!ClassBuilder methodsFor: 'public' stamp: 'ar 7/19/1999 23:30'!\rsuperclass: aClass\r\tweakSubclass: t instanceVariableNames: f \r\tclassVariableNames: d poolDictionaries: s category: cat\r\t\"This is the standard initialization message for creating a new class as a \r\tsubclass of an existing class (the receiver) in which the subclass is to \r\thave weak indexable pointer variables.\"\r\taClass isBits \r\t\tifTrue: [^self error: 'cannot make a pointer subclass of a class with non-pointer fields'].\r\t^self \r\t\tname: t\r\t\tinEnvironment: aClass environment\r\t\tsubclassOf: aClass\r\t\ttype: #weak\r\t\tinstanceVariableNames: f\r\t\tclassVariableNames: d\r\t\tpoolDictionaries: s\r\t\tcategory: cat! !\r\r\r!ClassBuilder methodsFor: 'class mutation' stamp: 'ar 2/27/2003 22:44'!\rmutate: oldClass to: newClass\r\t\"Mutate the old class and subclasses into newClass and subclasses.\r\tNote: This method is slightly different from: #mutate:toSuper: since\r\there we are at the root of reshaping and have two distinct roots.\"\r\t| newSubclass |\r\tself showProgressFor: oldClass.\r\t\"Convert the subclasses\"\r\toldClass subclasses do:[:oldSubclass| \r\t\tnewSubclass _ self reshapeClass: oldSubclass toSuper: newClass.\r\t\tself mutate: oldSubclass to: newSubclass.\r\t].\r\t\"And any obsolete ones\"\r\toldClass obsoleteSubclasses do:[:oldSubclass|\r\t\toldSubclass ifNotNil:[\r\t\t\tnewSubclass _ self reshapeClass: oldSubclass toSuper: newClass.\r\t\t\tself mutate: oldSubclass to: newSubclass.\r\t\t].\r\t].\r\tself update: oldClass to: newClass.\r\t^newClass! !\r\r!ClassBuilder methodsFor: 'class mutation' stamp: 'ar 9/22/2002 03:16'!\rreshapeClass: oldClass toSuper: newSuper\r\t\"Reshape the given class to the new super class. Recompile all the methods in the newly created class. Answer the new class.\"\r\t| instVars |\r\r\t\"ar 9/22/2002: The following is a left-over from some older code. \r\tI do *not* know why we uncompact oldClass here. If you do, then \r\tplease let me know so I can put a comment here...\"\r\toldClass becomeUncompact.\r\r\tinstVars _ instVarMap at: oldClass name ifAbsent:[oldClass instVarNames].\r\r\t^self newSubclassOf: newSuper \r\t\t\ttype: oldClass typeOfClass \r\t\t\tinstanceVariables: instVars \r\t\t\tfrom: oldClass! !\r\r!ClassBuilder methodsFor: 'class mutation' stamp: 'ar 2/27/2003 23:42'!\rupdate: oldClass to: newClass\r\t\"Convert oldClass, all its instances and possibly its meta class into newClass, instances of newClass and possibly its meta class. The process is surprisingly simple in its implementation and surprisingly complex in its nuances and potentially bad side effects. \r\tWe can rely on two assumptions (which are critical):\r\t\t#1: The method #updateInstancesFrom: will not create any lasting pointers to 'old' instances ('old' is quote on quote since #updateInstancesFrom: will do a become of the old vs. the new instances and therefore it will not create pointers to *new* instances before the #become: which are *old* afterwards)\r\t\t#2: The non-preemptive execution of the critical piece of code guarantees that nobody can get a hold by 'other means' (such as process interruption and reflection) on the old instances.\r\tGiven the above two, we know that after #updateInstancesFrom: there are no pointer to any old instances. After the forwarding become there will be no pointers to the old class or meta class either. Meaning that if we throw in a nice fat GC at the end of the critical block, everything will be gone (but see the comment right there). There's no need to worry.\r\t\"\r\t| meta |\r\tmeta _ oldClass isMeta.\r\t\"Note: Everything from here on will run without the ability to get interrupted\r\tto prevent any other process to create new instances of the old class.\"\r\t[\r\t\t\"Note: The following removal may look somewhat obscure and needs an explanation. When we mutate the class hierarchy we create new classes for any existing subclass. So it may look as if we don't have to remove the old class from its superclass. However, at the top of the hierarchy (the first class we reshape) that superclass itself is not newly created so therefore it will hold both the oldClass and newClass in its (obsolete or not) subclasses. Since the #become: below will transparently replace the pointers to oldClass with newClass the superclass would have newClass in its subclasses TWICE. With rather unclear effects if we consider that we may convert the meta-class hierarchy itself (which is derived from the non-meta class hierarchy).\r\t\tDue to this problem ALL classes are removed from their superclass just prior to converting them. Here, breaking the superclass/subclass invariant really doesn't matter since we will effectively remove the oldClass (become+GC) just a few lines below.\"\r\r\t\toldClass superclass removeSubclass: oldClass.\r\t\toldClass superclass removeObsoleteSubclass: oldClass.\r\r\t\t\"Convert the instances of oldClass into instances of newClass\"\r\t\tnewClass updateInstancesFrom: oldClass.\r\r\t\tmeta\r\t\t\tifTrue:[oldClass becomeForward: newClass]\r\t\t\tifFalse:[(Array with: oldClass with: oldClass class)\r\t\t\t\t\t\telementsForwardIdentityTo:\r\t\t\t\t\t\t\t(Array with: newClass with: newClass class)].\r\r\t\tSmalltalk garbageCollect.\r\r\t\t\"Warning: Read this before you even think about removing the GC. Yes, it slows us down. Quite heavily if you have a large image. However, there's no good and simple alternative here, since unfortunately, #become: does change class pointers. What happens is that after the above become all of the instances of the old class will have a class pointer identifying them as instances of newClass. If we get our hands on any of these instances we will break immediately since their expected instance layout (that of its class, e.g., newClass) will not match their actual instance layout (that of oldClass). And getting your hands on any of those instances is really simple - just reshaping one class two times in rapid succession will do it. Reflection techniques, interrupts, etc. will only add to this problem. In the case of Metaclass things get even worse since when we recompile the entire class hierarchy we will recompile both, Metaclass and its instances (and some of its instances will have the old and some the new layout).\r\r\t\tThe only easy solution to this problem would be to 'fix up' the class pointers of the old instances to point to the old class (using primitiveChangeClassTo:). But this won't work either - as we do a one-way become we would have to search the entire object memory for the oldClass and couldn't even clearly identify it unless we give it some 'special token' which sounds quite error-prone. If you really need to get rid of the GC here are some alternatives:\r\r\t\tOn the image level, one could create a copy of the oldClass before becoming it into the new class and, after becoming it, 'fix up' the old instances. That would certainly work but it sounds quite complex, as we need to make sure we're not breaking any of the superclass/subclass meta/non-meta class variants.\r\r\t\tAlternatively, fix up #becomeForward on the VM-level to 'dump the source objects' of #become. This would be quite doable (just 'convert' them into a well known special class such as bitmap) yet it has problems if (accidentally or not) one of the objects in #become: appears on 'both sides of the fence' (right now, this will work ... in a way ... even though the consequences are unclear).\r\r\t\tAnother alternative is to provide a dedicated primitive for this (instead of using it implicitly in become) which would allow us to dump all the existing instances right here. This is equivalent to a more general primitiveChangeClassTo: and might be worthwhile but it would likely have to keep in mind the differences between bits and pointer thingies etc.\r\r\t\tSince all of the alternatives seem rather complex and magical compared to a straight-forward GC it seems best to stick with the GC solution for now. If someone has a real need to fix this problem, that person will likely be motivated enough to check out the alternatives. Personally I'd probably go for #1 (copy the old class and remap the instances to it) since it's a solution that could be easily reverted from within the image if there's any problem with it.\"\r\r\t] valueUnpreemptively.\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rClassBuilder class\r\tinstanceVariableNames: ''!\r\r!ClassBuilder class methodsFor: 'accessing' stamp: 'ar 7/15/1999 18:48'!\risSilent\r\t^QuietMode == true! !\rObject subclass: #ClassCategoryReader\r\tinstanceVariableNames: 'class category changeStamp'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Classes'!\r!ClassCategoryReader commentStamp: '<historical>' prior: 0!\rI represent a mechanism for retrieving class descriptions stored on a file.!\r\r\r!ClassCategoryReader methodsFor: 'fileIn/Out' stamp: 'tk 12/15/97 16:26'!\rscanFrom: aStream \r\t\"File in methods from the stream, aStream.\"\r\t| methodText |\r\t[methodText _ aStream nextChunkText.\r\t methodText size > 0]\r\t\twhileTrue:\r\t\t[class compile: methodText classified: category\r\t\t\twithStamp: changeStamp\r\t\t\tnotifying: (SyntaxError new category: category)]! !\r\r\r!ClassCategoryReader methodsFor: 'private' stamp: '6/5/97 di'!\rsetClass: aClass category: aCategory\r\t^ self setClass: aClass category: aCategory changeStamp: String new\r! !\r\r!ClassCategoryReader methodsFor: 'private' stamp: '6/5/97 di'!\rsetClass: aClass category: aCategory changeStamp: aString\r\r\tclass _ aClass.\r\tcategory _ aCategory.\r\tchangeStamp _ aString\r! !\r\r!ClassCategoryReader methodsFor: 'private' stamp: 'ajh 1/18/2002 01:14'!\rtheClass\r\r\t^ class! !\rObject subclass: #ClassChangeRecord\r\tinstanceVariableNames: 'inForce revertable changeTypes thisDefinition priorDefinition thisName priorName thisOrganization priorOrganization thisComment priorComment thisMD priorMD methodChanges'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Changes'!\r!ClassChangeRecord commentStamp: '<historical>' prior: 0!\rA ClassChangeRecorder keeps track of most substantive changes premissible in a project, isolated or not.\r\rStructure:\rinForce\t\ta boolean\r\t\t\tTells whether these changes are in effect.\r\t\t\ttrue for all changeSets in and above the current project.\r\t\t\tIt should be sufficient only to record this for the changeSet\r\t\t\tas a whole, but this redundancy could help in error recovery.\rclassIsLocal\ta boolean\r\t\t\tTrue if and only if this class is defined in this layer of the\r\t\t\tproject structure.\rchangeTypes an identitySet\r\t\t\tSummarizes which changes have been made in this class.\r\t\t\tValues include #comment, #reorganize, #rename,\r\t\t\tand the four more summarized below.\rthisName\ta string\r\t\t\tRetains the class name for this layer.\rpriorName\ta string\r\t\t\tPreserves the prior name.\rthisComment\ta text\r\t\t\tRetains the class comment for this layer.\rpriorComment\ta text\r\t\t\tPreserves the prior comment.\rthisOrganization\ta classOrganizer\r\t\t\tRetains the class organization for this layer.\rpriorOrganization\ta classOrganizer\r\t\t\tPreserves the prior organization.\rthisMD\ta methodDictionary\r\t\t\tUsed to prepare changes for nearly atomic invocation\r\t\t\tof this layer (see below).\rpriorMD\ta methodDictionary\r\t\t\tPreserves the state of an altered class as it exists in the next\r\t\t\touter layer of the project structure.\rmethodChanges\t\ta dictionary of classChangeRecords\r\t\t\tRetains all the method changes for this layer.\r\rFour of the possible changeTypes are maintained in a mutually exclusive set, analogously to MethodChangeRecords.  Here is a simple summary of the relationship between these four changeType symbols and the recording of prior state\r\t\t\t|\tprior == nil\t\t\t|\tprior not nil\t\r\t---------\t|----------------------------\t|--------------------\r\tadd\t\t|\tadd\t\t\t\t\t|\tchange\r\t---------\t|----------------------------\t|--------------------\r\tremove\t|\taddedThenRemoved\t|\tremove\r\rA classChangeRecorder is notified of changes by the method\r\t\tnoteMethodChange: <ClassChangeRecord>.\rClassChangeRecorders are designed to invoke a set of changes relative to the definition of a class in an prior layer.  It is important that both invocation and revocation of these changes take place in a nearly atomic fashion so that interdependent changes will be adopted as a whole, and so that only one flush of the method cache should be necessary.  A further reason for revocation to be simple is that it may be requested as an attempt to recover from an error in a project that is failing.!\r\r\r!ClassChangeRecord methodsFor: 'all changes' stamp: 'di 4/2/2000 21:39'!\rallChangeTypes\r\r\t| chgs |\r\t(priorName ~~ nil and: [changeTypes includes: #rename]) ifTrue:\r\t\t[(chgs _ changeTypes copy) add: 'oldName: ' , priorName.\r\t\t^ chgs].\r\t^ changeTypes! !\r\r!ClassChangeRecord methodsFor: 'all changes' stamp: 'di 4/2/2000 21:59'!\rassimilateAllChangesIn: otherRecord\r\r\t| selector changeRecord changeType |\r\totherRecord isClassRemoval ifTrue: [^ self noteChangeType: #remove].\r\r\totherRecord allChangeTypes do:\r\t\t[:chg | self noteChangeType: chg fromClass: self realClass].\r\r\totherRecord methodChanges associationsDo:\r\t\t[:assn | selector _ assn key. changeRecord _ assn value.\r\t\tchangeType _ changeRecord changeType.\r\t\t(changeType == #remove or: [changeType == #addedThenRemoved])\r\t\t\tifTrue:\r\t\t\t\t[changeType == #addedThenRemoved\r\t\t\t\t\tifTrue: [self atSelector: selector put: #add].\r\t\t\t\tself noteRemoveSelector: selector priorMethod: nil\r\t\t\t\t\t\tlastMethodInfo: changeRecord methodInfoFromRemoval]\r\t\t\tifFalse: \r\t\t\t\t[self atSelector: selector put: changeType]].\r! !\r\r!ClassChangeRecord methodsFor: 'all changes' stamp: 'di 3/28/2000 10:59'!\rhasNoChanges\r\r\t^ changeTypes isEmpty and: [methodChanges isEmpty]! !\r\r!ClassChangeRecord methodsFor: 'all changes' stamp: 'di 3/24/2000 09:36'!\rincludesChangeType: changeType\r\r\tchangeType == #new ifTrue: [^ changeTypes includes: #add].  \"Backwd compat\"\r\t^ changeTypes includes: changeType! !\r\r!ClassChangeRecord methodsFor: 'all changes' stamp: 'di 3/28/2000 15:14'!\rnoteChangeType: changeSymbol\r\r\t^ self noteChangeType: changeSymbol fromClass: nil! !\r\r!ClassChangeRecord methodsFor: 'all changes' stamp: 'sw 4/3/2001 14:16'!\rnoteChangeType: changeSymbol fromClass: class\r\r\t(changeSymbol = #new or: [changeSymbol = #add]) ifTrue:\r\t\t[changeTypes add: #add.\r\t\tchangeTypes remove: #change ifAbsent: [].\r\t\trevertable _ false.\r\t\t^ self].\r\tchangeSymbol = #change ifTrue:\r\t\t[(changeTypes includes: #add) ifTrue: [^ self].\r\t\t^ changeTypes add: changeSymbol].\r\tchangeSymbol == #addedThenRemoved ifTrue:\r\t\t[^ self].  \"An entire class was added but then removed\"\r\tchangeSymbol = #comment ifTrue:\r\t\t[^ changeTypes add: changeSymbol].\r\tchangeSymbol = #reorganize ifTrue:\r\t\t[^ changeTypes add: changeSymbol].\r\tchangeSymbol = #rename ifTrue:\r\t\t[^ changeTypes add: changeSymbol].\r\t(changeSymbol beginsWith: 'oldName: ') ifTrue:\r\t\t[\"Must only be used when assimilating other changeSets\"\r\t\t(changeTypes includes: #add) ifTrue: [^ self].\r\t\tpriorName _ changeSymbol copyFrom: 'oldName: ' size + 1 to: changeSymbol size.\r\t\t^ changeTypes add: #rename].\r\tchangeSymbol = #remove ifTrue:\r\t\t[(changeTypes includes: #add)\r\t\t\tifTrue: [changeTypes add: #addedThenRemoved]\r\t\t\tifFalse: [changeTypes add: #remove].\r\t\t^ changeTypes removeAllFoundIn: #(add change comment reorganize)].\r\r\tself error: 'Unrecognized changeType'! !\r\r!ClassChangeRecord methodsFor: 'all changes' stamp: 'di 5/16/2000 08:43'!\rtrimHistory\r\t\"Drop non-essential history.\"\r\r\t\"Forget methods added and later removed\"\r\tmethodChanges keysAndValuesRemove:\r\t\t[:sel :chgRecord | chgRecord changeType == #addedThenRemoved].\r\r\t\"Forget renaming and reorganization of newly-added classes.\"\r\t(changeTypes includes: #add) ifTrue:\r\t\t[changeTypes removeAllFoundIn: #(rename reorganize)].\r! !\r\r\r!ClassChangeRecord methodsFor: 'isolation layers' stamp: 'di 3/29/2000 22:00'!\rinvokePhase1\r\r\t| selector changeRecord type elements |\r\trevertable ifFalse: [^ self].\r\tinForce ifTrue: [self error: 'Can invoke only when not in force.'].\r\r\t\"Do the first part of the invoke operation -- no particular hurry.\"\r\t\"Save the outer method dictionary for quick revert of method changes.\"\r\tpriorMD _ self realClass methodDict.\r\r\t\"Prepare a methodDictionary for switcheroo.\"\r\tthisMD _ self realClass methodDict copy.\r\tmethodChanges associationsDo:\r\t\t[:assn | selector _ assn key. changeRecord _ assn value.\r\t\ttype _ changeRecord changeType.\r\t\ttype = #remove ifTrue: [thisMD removeKey: selector].\r\t\ttype = #add ifTrue: [thisMD at: selector put: changeRecord currentMethod].\r\t\ttype = #change ifTrue: [thisMD at: selector put: changeRecord currentMethod].\r\t\t].\r\r\t\"Replace the original organization (and comment).\"\r\tpriorOrganization _ self realClass organization.\r\tthisOrganization elementArray copy do:\r\t\t[:sel | (thisMD includesKey: sel) ifFalse: [thisOrganization removeElement: sel]].\r\t#(DoIt DoItIn:) do: [:sel | thisMD removeKey: sel ifAbsent: []].\r\tthisOrganization elementArray size = thisMD size ifFalse:\r\t\t[elements _ thisOrganization elementArray asSet.\r\t\tthisMD keysDo:\r\t\t\t[:sel | (elements includes: sel) ifFalse:\r\t\t\t\t[thisOrganization classify: sel\r\t\t\t\t\tunder: (priorOrganization categoryOfElement: sel)]]].\r\tself realClass organization: thisOrganization.\r\r\r! !\r\r!ClassChangeRecord methodsFor: 'isolation layers' stamp: 'di 3/29/2000 14:50'!\rinvokePhase2\r\r\trevertable ifFalse: [^ self].\r\r\t\"Do the second part of the revert operation.  This must be very simple.\"\r\t\"Replace original method dicts if there are method changes.\"\r\tself realClass methodDictionary: thisMD.  \"zap.  Must flush Cache in outer loop.\"\r\tinForce _ true.\r! !\r\r!ClassChangeRecord methodsFor: 'isolation layers' stamp: 'di 3/30/2000 18:03'!\rrealClass\r\t\"Return the actual class (or meta), as determined from my name.\"\r\r\tthisName ifNil: [^ nil].\r\t(thisName endsWith: ' class')\r\t\tifTrue: [^ (Smalltalk at: (thisName copyFrom: 1 to: thisName size - 6) asSymbol\r\t\t\t\t\t\tifAbsent: [^ nil]) class]\r\t\tifFalse: [^ Smalltalk at: thisName ifAbsent: [^ nil]]! !\r\r!ClassChangeRecord methodsFor: 'isolation layers' stamp: 'di 3/29/2000 14:50'!\rrevokePhase1\r\r\trevertable ifFalse: [^ self].\r\tinForce ifFalse: [self error: 'Can revoke only when in force.'].\r\r\t\"Do the first part of the revoke operation.  This must be very simple.\"\r\t\"Replace original method dict if there are method changes.\"\r\tself realClass methodDictionary: priorMD  \"zap.  Must flush Cache in outer loop.\"! !\r\r!ClassChangeRecord methodsFor: 'isolation layers' stamp: 'di 3/29/2000 14:50'!\rrevokePhase2\r\r\trevertable ifFalse: [^ self].\r\r\t\"Replace the original organization (and comment).\"\r\tthisOrganization _ self realClass organization.\r\tself realClass organization: priorOrganization.\r\tinForce _ false.\r! !\r\r\r!ClassChangeRecord methodsFor: 'definition' stamp: 'di 3/27/2000 22:06'!\rcheckCoherence\r\t\"If I recreate the class then don't remove it\"\r\r\t(changeTypes includes: #remove) ifTrue:\r\t\t[changeTypes remove: #remove.\r\t\tchangeTypes add: #change].\r\t(changeTypes includes: #addedThenRemoved) ifTrue:\r\t\t[changeTypes remove: #addedThenRemoved.\r\t\tchangeTypes add: #add].\r! !\r\r!ClassChangeRecord methodsFor: 'definition' stamp: 'di 3/27/2000 22:08'!\rnotePriorDefinition: oldClass\r\r\toldClass ifNil: [^ self].\r\tpriorDefinition ifNil: [priorDefinition _ oldClass definition]! !\r\r!ClassChangeRecord methodsFor: 'definition' stamp: 'di 3/28/2000 09:12'!\rpriorDefinition\r\r\t^ priorDefinition! !\r\r\r!ClassChangeRecord methodsFor: 'rename' stamp: 'di 5/8/2000 20:39'!\rnoteNewName: newName\r\r\tthisName _ newName! !\r\r!ClassChangeRecord methodsFor: 'rename' stamp: 'di 3/24/2000 09:38'!\rpriorName\r\r\t^ priorName! !\r\r!ClassChangeRecord methodsFor: 'rename' stamp: 'tk 6/8/2001 09:11'!\rthisName\r\r\t^ thisName! !\r\r\r!ClassChangeRecord methodsFor: 'removal' stamp: 'di 4/4/2000 12:49'!\rforgetChangesIn: otherRecord\r\t\"See forgetAllChangesFoundIn:.  Used in culling changeSets.\"\r\r\t| cls otherMethodChanges selector actionToSubtract |\r\t(cls _ self realClass) == nil ifTrue: [^ self].  \"We can do better now, though...\"\r\totherMethodChanges _ otherRecord methodChangeTypes.\r\totherMethodChanges associationsDo:\r\t\t[:assoc | selector _ assoc key. actionToSubtract _ assoc value.\r\t\t(cls includesSelector: selector)\r\t\t\tifTrue: [(#(add change) includes: actionToSubtract)\r\t\t\t\t\tifTrue: [methodChanges removeKey: selector ifAbsent: []]]\r\t\t\tifFalse: [(#(remove addedThenRemoved) includes: actionToSubtract)\r\t\t\t\t\tifTrue: [methodChanges removeKey: selector ifAbsent: []]]].\r\tchangeTypes isEmpty ifFalse:\r\t\t[changeTypes removeAllFoundIn: otherRecord allChangeTypes.\r\t\t(changeTypes includes: #rename) ifFalse:\r\t\t\t[changeTypes removeAllSuchThat: [:x | x beginsWith: 'oldName: ']]]! !\r\r!ClassChangeRecord methodsFor: 'removal' stamp: 'di 4/1/2000 23:05'!\risClassRemoval\r\t\"NOTE: there are other removals with changeType #addedThenRemoved,\r\tbut this message is used to write out removals in fileOut, and those\r\tcases should not be written out.\"\r\r\t^ (changeTypes includes: #remove) or: [changeTypes includes: #removeClass]! !\r\r\r!ClassChangeRecord methodsFor: 'method changes' stamp: 'di 3/28/2000 10:38'!\ratSelector: selector ifAbsent: absentBlock\r\r\t^ (methodChanges at: selector ifAbsent: absentBlock)\r\t\tchangeType! !\r\r!ClassChangeRecord methodsFor: 'method changes' stamp: 'di 3/28/2000 11:01'!\ratSelector: selector put: changeType\r\r\t(self findOrMakeMethodChangeAt: selector priorMethod: nil)\r\t\tnoteChangeType: changeType! !\r\r!ClassChangeRecord methodsFor: 'method changes' stamp: 'di 3/28/2000 10:07'!\rchangedSelectors\r\t\"Return a set of the changed or removed selectors.\"\r\r\t^ methodChanges keys! !\r\r!ClassChangeRecord methodsFor: 'method changes' stamp: 'di 4/1/2000 10:45'!\rcompileAll: newClass from: oldClass\r\t\"Something about this class has changed.  Locally retained methods must be recompiled.\r\tNOTE:  You might think that if this changeSet is in force, then we can just note\r\tthe new methods but a lower change set may override and be in force which\r\twould mean that only the overriding copies go recompiled.  Just do it.\"\r\r\t| sel changeType changeRecord newMethod |\r\tmethodChanges associationsDo:\r\t\t[:assn | sel _ assn key.  changeRecord _ assn value.\r\t\tchangeType _ changeRecord changeType.\r\t\t(changeType == #add or: [changeType == #change]) ifTrue:\r\t\t\t[newMethod _ newClass\r\t\t\t\trecompileNonResidentMethod: changeRecord currentMethod\r\t\t\t\tatSelector: sel from: oldClass.\r\t\t\tchangeRecord noteNewMethod: newMethod]]! !\r\r!ClassChangeRecord methodsFor: 'method changes' stamp: 'di 3/28/2000 11:01'!\rfindOrMakeMethodChangeAt: selector priorMethod: priorMethod\r\r\t^ methodChanges at: selector\r\t\tifAbsent: [methodChanges at: selector\r\t\t\t\t\t\tput: (MethodChangeRecord new priorMethod: priorMethod)]! !\r\r!ClassChangeRecord methodsFor: 'method changes' stamp: 'di 3/29/2000 16:26'!\rinfoFromRemoval: selector\r\r\t^ (methodChanges at: selector ifAbsent: [^ nil])\r\t\tmethodInfoFromRemoval\r\r! !\r\r!ClassChangeRecord methodsFor: 'method changes' stamp: 'di 3/24/2000 09:46'!\rmethodChangeTypes\r\t\"Return an old-style dictionary of method change types.\"\r\r\t| dict selector record |\r\tdict _ IdentityDictionary new.\r\tmethodChanges associationsDo:\r\t\t[:assn | selector _ assn key.  record _ assn value.\r\t\tdict at: selector put: record changeType].\r\t^ dict! !\r\r!ClassChangeRecord methodsFor: 'method changes' stamp: 'di 4/1/2000 23:49'!\rmethodChanges\r\r\t^ methodChanges! !\r\r!ClassChangeRecord methodsFor: 'method changes' stamp: 'di 3/28/2000 23:28'!\rnoteNewMethod: newMethod selector: selector priorMethod: methodOrNil\r\r\t| methodChange |\r\tmethodChange _ self findOrMakeMethodChangeAt: selector priorMethod: methodOrNil.\r\tmethodOrNil == nil\r\t\tifTrue: [methodChange noteChangeType: #add]\r\t\tifFalse: [methodChange noteChangeType: #change].\r\tmethodChange noteNewMethod: newMethod.\r! !\r\r!ClassChangeRecord methodsFor: 'method changes' stamp: 'di 3/23/2000 23:00'!\rnoteRemoveSelector: selector priorMethod: priorMethod lastMethodInfo: infoOrNil\r\r\t| methodChange |\r\tmethodChange _ self findOrMakeMethodChangeAt: selector priorMethod: priorMethod.\r\tmethodChange changeType == #add\r\t\tifTrue: [methodChange noteChangeType: #addedThenRemoved]\r\t\tifFalse: [methodChange noteChangeType: #remove].\r\r\tinfoOrNil ifNotNil:\r\t\t[\"Save the source code pointer and category so can still browse old versions\"\r\t\tmethodChange noteMethodInfoFromRemoval: infoOrNil]\r\r! !\r\r!ClassChangeRecord methodsFor: 'method changes' stamp: 'sw 8/14/2002 11:11'!\rremoveSelector: selector\r\t\"Remove all memory of changes associated with the argument, selector, in this class.\"\r\r\tselector == #Comment\r\t\tifTrue:\r\t\t\t[changeTypes remove: #comment ifAbsent: []]\r\t\tifFalse:\r\t\t\t[methodChanges removeKey: selector ifAbsent: []]! !\r\r\r!ClassChangeRecord methodsFor: 'initialization' stamp: 'di 4/5/2000 08:11'!\rinitFor: className revertable: isRevertable\r\r\tinForce _ isRevertable.\r\tchangeTypes _ IdentitySet new.\r\tmethodChanges _ IdentityDictionary new.\r\tpriorName _ thisName _ className.\r\trevertable _ isRevertable and: [self realClass notNil].\r\trevertable ifTrue:\r\t\t[priorMD _ self realClass methodDict copy.\r\t\tpriorOrganization _ self realClass organization deepCopy].\r! !\r\r!ClassChangeRecord methodsFor: 'initialization' stamp: 'di 9/21/2000 12:34'!\rzapHistory\r\t\"Drop all recorded information not needed to simply keep track of what has been changed.\r\tSaves a lot of space.\"\r\r\tmethodChanges do: [:r | r noteNewMethod: nil].  \"Drop all refes to old methods\"\r\tthisOrganization _ nil.\r\tpriorOrganization _ nil.\r\tthisComment _ nil.\r\tpriorComment _ nil.\r\tthisMD _ nil.\r\tpriorMD _ nil.! !\rClassCategoryReader subclass: #ClassCommentReader\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Classes'!\r\r!ClassCommentReader methodsFor: 'as yet unclassified' stamp: 'sw 7/31/2002 10:40'!\rscanFrom: aStream \r\t\"File in the class comment from aStream.  Not string-i-fied, just a text, exactly as it is in the browser.  Move to changes file.\"\r\r\tclass theNonMetaClass classComment: (aStream nextChunkText) stamp: changeStamp\r\t\t\"Writes it on the disk and saves a RemoteString ref\"! !\rVersionsBrowser subclass: #ClassCommentVersionsBrowser\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Changes'!\r!ClassCommentVersionsBrowser commentStamp: 'asm 8/13/2002 23:20' prior: 0!\rA class-comment-versions-browser tool!\r\r\r!ClassCommentVersionsBrowser methodsFor: 'menu' stamp: 'asm 8/13/2002 21:33'!\rcompareToCurrentVersion\r\t\"If the current selection corresponds to a method in the system, then spawn a window showing the diffs as text\"\r\r\t| change s1 s2 |\r\tlistIndex = 0\r\t\tifTrue: [^ self].\r\tchange _ changeList at: listIndex.\r\ts1 _ classOfMethod organization classComment.\r\ts2 _ change string.\r\ts1 = s2\r\t\tifTrue: [^ self inform: 'Exact Match'].\r\t\t\t(StringHolder new\r\t\t\t\ttextContents: (TextDiffBuilder buildDisplayPatchFrom: s1 to: s2 inClass: classOfMethod  prettyDiffs: self showingPrettyDiffs))\r\t\t\t\topenLabel: 'Comparison to Current Version'! !\r\r!ClassCommentVersionsBrowser methodsFor: 'menu' stamp: 'sd 4/16/2003 08:52'!\ropenSingleMessageBrowser\r\t| mr |\r\t\"Create and schedule a message list browser populated only by the currently selected message\"\r\r\tmr _ MethodReference new\r\t\t\t\tsetStandardClass: self selectedClass\r\t\t\t\tmethodSymbol: #Comment.\r\r\tself systemNavigation \r\t\tbrowseMessageList: (Array with: mr)\r\t\tname: mr asStringOrText\r\t\tautoSelect: nil! !\r\r!ClassCommentVersionsBrowser methodsFor: 'menu' stamp: 'BG 10/28/2003 20:48'!\rversionsMenu: aMenu\r\t\"Fill aMenu with menu items appropriate to the receiver\"\r\r\t\r\t^ aMenu addList: #(\r\r\t\t('compare to current'\t\tcompareToCurrentVersion\t\t'compare selected version to the current version')\r\t\t('revert to selected version'\tfileInSelections\t\t\t\t\t'resubmit the selected version, so that it becomes the current version')\r\t\t('remove from changes'\t\tremoveMethodFromChanges\t\t'remove this method from the current change set, if present')\r\t\t('edit current method (O)'\topenSingleMessageBrowser\t\t'open a single-message browser on the current version of this method')\t\t\r\t\t-\r\t\t('toggle diffing (D)'\t\t\ttoggleDiffing\t\t\t\t\t'toggle whether or not diffs should be shown here')\r\t\t('update list'\t\t\t\treformulateList\t\t\t\t\t'reformulate the list of versions, in case it somehow got out of synch with reality')\r\t\t-\r\t\t('help...'\t\t\t\t\tofferVersionsHelp\t\t\t\t'provide an explanation of the use of this tool'))\r! !\r\r\r!ClassCommentVersionsBrowser methodsFor: 'basic function' stamp: 'asm 8/13/2002 22:26'!\rdiffedVersionContents\r\t\"Answer diffed version contents, maybe pretty maybe not\"\r\r\t| change class earlier later |\r\t(listIndex = 0\r\t\t\tor: [changeList size < listIndex])\r\t\tifTrue: [^ ''].\r\tchange _ changeList at: listIndex.\r\tlater _ change text.\r\tclass _ self selectedClass.\r\t(listIndex == changeList size or: [class == nil])\r\t\tifTrue: [^ later].\r\r\tearlier _ (changeList at: listIndex + 1) text.\r\r\t^ TextDiffBuilder buildDisplayPatchFrom: earlier to: later inClass: class prettyDiffs: self showingPrettyDiffs! !\r\r!ClassCommentVersionsBrowser methodsFor: 'basic function' stamp: 'asm 8/13/2002 21:28'!\rreformulateList\r\r     classOfMethod organization classComment ifNil: [^ self].\r\r\tself scanVersionsOf: classOfMethod.\r\tself changed: #list. \"for benefit of mvc\"\r\tlistIndex _ 1.\r\tself changed: #listIndex.\r\tself contentsChanged! !\r\r!ClassCommentVersionsBrowser methodsFor: 'basic function' stamp: 'asm 1/3/2003 16:06'!\rscanVersionsOf: class \r\t\"Scan for all past versions of the class comment of the given class\"\r\r\t| oldCommentRemoteStr sourceFilesCopy position prevPos stamp preamble tokens prevFileIndex |\r\r\tclassOfMethod _ class.\r\toldCommentRemoteStr _ class  organization commentRemoteStr.\r\tcurrentCompiledMethod _ oldCommentRemoteStr.\r\tselectorOfMethod _ #Comment.\r\tchangeList _ OrderedCollection new.\r\tlist _ OrderedCollection new.\r\tlistIndex _ 0.\r\toldCommentRemoteStr ifNil:[^ nil] ifNotNil: [oldCommentRemoteStr sourcePointer].\r\r\tsourceFilesCopy _ SourceFiles collect:\r\t\t[:x | x isNil ifTrue: [ nil ]\r\t\t\t\tifFalse: [x readOnlyCopy]].\r\tposition _ oldCommentRemoteStr position.\r\tfile _ sourceFilesCopy at: oldCommentRemoteStr sourceFileNumber.\r\t[position notNil & file notNil]\r\t\twhileTrue:\r\t\t[file position: (0 max: position-150).  \" Skip back to before the preamble\"\r\t\t[file position < (position-1)]  \"then pick it up from the front\"\r\t\t\twhileTrue: [preamble _ file nextChunk].\r\r\t\tprevPos _ nil.\r\t\tstamp _ ''.\r\t\t(preamble findString: 'commentStamp:' startingAt: 1) > 0\r\t\t\tifTrue: [tokens _ Scanner new scanTokens: preamble.\r\t\t\t\t(tokens at: tokens size-3) = #commentStamp:\r\t\t\t\tifTrue: [\"New format gives change stamp and unified prior pointer\"\r\t\t\t\t\t\tstamp _ tokens at: tokens size-2.\r\t\t\t\t\t\tprevPos _ tokens last.\r\t\t\t\t\t\tprevFileIndex _ sourceFilesCopy fileIndexFromSourcePointer: prevPos.\r\t\t\t\t\t\tprevPos _ sourceFilesCopy filePositionFromSourcePointer: prevPos]]\r\t\t\tifFalse: [\"The stamp get lost, maybe after a condenseChanges\"\r\t\t\t\t\tstamp _ '<historical>'].\r \t\tself addItem:\r\t\t\t\t(ChangeRecord new file: file position: position type: #classComment\r\t\t\t\t\t\tclass: class name category: nil meta: class stamp: stamp)\r\t\t\ttext: stamp , ' ' , class name , ' class comment'. \r\t\tprevPos = 0 ifTrue:[prevPos _ nil].\r\t\tposition _ prevPos.\r\t\tprevPos notNil \r\t\t\t\t\tifTrue:[file _ sourceFilesCopy at: prevFileIndex]].\r\tsourceFilesCopy do: [:x | x notNil ifTrue: [x close]].\r\tlistSelections _ Array new: list size withAll: false! !\r\r!ClassCommentVersionsBrowser methodsFor: 'basic function' stamp: 'asm 8/13/2002 21:33'!\rupdateListsAndCodeIn: aWindow\r\t| aComment |\r\taComment _ classOfMethod organization commentRemoteStr.\r\taComment == currentCompiledMethod\r\t\tifFalse:\r\t\t\t[\"Do not attempt to formulate if there is no source pointer.\r\t\t\tIt probably means it has been recompiled, but the source hasn't been written\r\t\t\t(as during a display of the 'save text simply?' confirmation).\"\r\t\t\taComment last ~= 0 ifTrue: [self reformulateList]].\r\t^ true\r! !\r\r\r!ClassCommentVersionsBrowser methodsFor: 'misc' stamp: 'sw 8/17/2002 21:57'!\rclassCommentIndicated\r\t\"Answer whether the receiver is pointed at a class comment\"\r\r\t^ true! !\r\r!ClassCommentVersionsBrowser methodsFor: 'misc' stamp: 'sw 8/15/2002 22:38'!\rcontentsSymbolQuints\r\t\"Answer a list of quintuplets representing information on the alternative views available in the code pane\"\r\r\t^ #(\r(source\t\t\ttogglePlainSource \t\tshowingPlainSourceString\t'source'\t\t\t'the textual source code as writen')\r(showDiffs\t\ttoggleRegularDiffing\tshowingRegularDiffsString\t'showDiffs'\t\t'the textual source diffed from its prior version'))! !\r\r!ClassCommentVersionsBrowser methodsFor: 'misc' stamp: 'asm 8/13/2002 22:14'!\rpriorSourceOrNil\r\t\"If the currently-selected method has a previous version, return its source, else return nil\"\r\t| aClass aSelector  changeRecords |\r\t(aClass _ self selectedClass) ifNil: [^ nil].\r\t(aSelector _ self selectedMessageName) ifNil: [^ nil].\r\tchangeRecords _  self class commentRecordsOf: self selectedClass.\r\t(changeRecords == nil or: [changeRecords size <= 1]) ifTrue: [^ nil].\r\t^ (changeRecords at: 2) string \r! !\r\r!ClassCommentVersionsBrowser methodsFor: 'misc' stamp: 'asm 8/13/2002 20:59'!\rselectedClass\r\t\"Answer the class currently selected in the browser.  In the case of a VersionsBrowser, the class and selector are always the same, regardless of which version is selected and indeed whether or not any entry is selected in the list pane\"\r\r\t^ classOfMethod! !\r\r!ClassCommentVersionsBrowser methodsFor: 'misc' stamp: 'sw 8/15/2002 22:35'!\rwantsPrettyDiffOption\r\t\"Answer whether pretty-diffs are meaningful for this tool\"\r\r\t^ false! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rClassCommentVersionsBrowser class\r\tinstanceVariableNames: ''!\r\r!ClassCommentVersionsBrowser class methodsFor: 'instance creation' stamp: 'asm 8/12/2002 22:46'!\rbrowseCommentOf: class\r\t| changeList |\r\tCursor read showWhile:\r\t\t[changeList _ self new scanVersionsOf: class.\r\t \t changeList ifNil: [^ self inform: 'No versions available'].\r\t\t self open: changeList name: 'Recent versions of ',class name,'''s comments' multiSelect: false ]\r! !\r\r\r!ClassCommentVersionsBrowser class methodsFor: 'utilities' stamp: 'asm 8/13/2002 22:09'!\rcommentRecordsOf: aClass\r\t\"Return a list of ChangeRecords for all versions of the method at selector. Source code can be retrieved by sending string to any one.  Return nil if the method is absent.\"\r\r\t| aList |\r\taList _ self new\r\t\t\tscanVersionsOf: aClass.\r\t^ aList ifNotNil: [aList changeList]! !\r\r!ClassCommentVersionsBrowser class methodsFor: 'utilities' stamp: 'asm 8/13/2002 20:54'!\rtimeStampFor: aSelector class: aClass reverseOrdinal: anInteger\r\t\"Answer the time stamp corresponding to some version of the given method, nil if none.  The reverseOrdinal parameter is interpreted as:  1 = current version; 2 = last-but-one version, etc.\"\r\t\r\t| aChangeList |\r\taChangeList _  self new scanVersionsOf: aClass.\r\t^ aChangeList ifNil: [nil] ifNotNil:\r\t\t[aChangeList list size >= anInteger\r\t\t\tifTrue:\r\t\t\t\t[(aChangeList changeList at: anInteger) stamp]\r\t\t\tifFalse:\r\t\t\t\t[nil]]! !\r\rBehavior subclass: #ClassDescription\r\tinstanceVariableNames: 'instanceVariables organization'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Classes'!\r!ClassDescription commentStamp: '<historical>' prior: 0!\rI add a number of facilities to basic Behaviors:\r\tNamed instance variables\r\tCategory organization for methods\r\tThe notion of a name of this class (implemented as subclass responsibility)\r\tThe maintenance of a ChangeSet, and logging changes on a file\r\tMost of the mechanism for fileOut.\r\t\rI am an abstract class, in particular, my facilities are intended for inheritance by two subclasses, Class and Metaclass.\r\rThe slots 'organization' and 'methodDict' should ONLY be accessed by message in order for things to work during ImageSegment>>discoverActiveClasses (q.v.).!\r\r\r!ClassDescription methodsFor: 'initialize-release' stamp: 'ar 11/22/1999 10:09'!\rdoneCompiling\r\t\"A ClassBuilder has finished the compilation of the receiver.\r\tThis message is a notification for a class that needs to do some\r\tcleanup / reinitialization after it has been recompiled.\"! !\r\r!ClassDescription methodsFor: 'initialize-release' stamp: 'NS 4/6/2004 15:32'!\robsolete\r\t\"Make the receiver obsolete.\"\r\tsuperclass removeSubclass: self.\r\tself organization: nil.\r\tsuper obsolete.! !\r\r!ClassDescription methodsFor: 'initialize-release' stamp: 'NS 4/6/2004 15:31'!\rsuperclass: aClass methodDictionary: mDict format: fmt\r\t\"Basic initialization of the receiver\"\r\tsuper superclass: aClass methodDictionary: mDict format: fmt.\r\tinstanceVariables _ nil.\r\tself organization: nil.! !\r\r!ClassDescription methodsFor: 'initialize-release' stamp: 'ar 3/1/2001 23:25'!\rupdateInstances: oldInstances from: oldClass isMeta: isMeta\r\t\"Recreate any existing instances of the argument, oldClass, as instances of the receiver, which is a newly changed class. Permute variables as necessary. Return the array of old instances (none of which should be pointed to legally by anyone but the array).\"\r\t\"If there are any contexts having an old instance as receiver it might crash the system because the layout has changed, and the method only knows about the old layout.\"\r\t| map variable instSize newInstances |\r\r\toldInstances isEmpty ifTrue:[^#()]. \"no instances to convert\"\r\tisMeta ifTrue: [\r\t\toldInstances size = 1 ifFalse:[^self error:'Metaclasses can only have one instance'].\r\t\tself soleInstance class == self ifTrue:[\r\t\t\t^self error:'Metaclasses can only have one instance']].\r\tmap _ self instVarMappingFrom: oldClass.\r\tvariable _ self isVariable.\r\tinstSize _ self instSize.\r\tnewInstances _ Array new: oldInstances size.\r\t1 to: oldInstances size do:[:i|\r\t\tnewInstances at: i put: (\r\t\t\tself newInstanceFrom: (oldInstances at: i) variable: variable size: instSize map: map)].\r\t\"Now perform a bulk mutation of old instances into new ones\"\r\toldInstances elementsExchangeIdentityWith: newInstances.\r\t^newInstances \"which are now old\"! !\r\r!ClassDescription methodsFor: 'initialize-release' stamp: 'BG 10/29/2003 09:09'!\rupdateInstancesFrom: oldClass\r\t\"Recreate any existing instances of the argument, oldClass, as instances of \r\tthe receiver, which is a newly changed class. Permute variables as \r\tnecessary. Return the array of old instances (none of which should be\r\tpointed to legally by anyone but the array).\"\r\t\"ar 7/15/1999: The updating below is possibly dangerous. If there are any\r\tcontexts having an old instance as receiver it might crash the system if\r\tthe new receiver in which the context is executed has a different layout.\r\tSee bottom below for a simple example:\"\r\t| oldInstances |\r\toldInstances _ oldClass allInstances asArray.\r\toldInstances _ self updateInstances: oldInstances from: oldClass isMeta: self isMeta.\r\t\"Now fix up instances in segments that are out on the disk.\"\r\t\" ImageSegment allSubInstancesDo: [:seg |\r\t\tseg segUpdateInstancesOf: oldClass toBe: self isMeta: self isMeta]. \"\r\t^oldInstances\r\r\"\t| crashingBlock class |\r\tclass _ Object subclass: #CrashTestDummy\r\t\tinstanceVariableNames: 'instVar'\r\t\tclassVariableNames: ''\r\t\tpoolDictionaries: ''\r\t\tcategory: 'Crash-Test'.\r\tclass compile:'instVar: value instVar _ value'.\r\tclass compile:'crashingBlock ^[instVar]'.\r\tcrashingBlock _ (class new) instVar: 42; crashingBlock.\r\tObject subclass: #CrashTestDummy\r\t\tinstanceVariableNames: ''\r\t\tclassVariableNames: ''\r\t\tpoolDictionaries: ''\r\t\tcategory: 'Crash-Test'.\r\tcrashingBlock.\r\tcrashingBlock value.\r\t\"\r! !\r\r\r!ClassDescription methodsFor: 'accessing' stamp: 'sd 6/27/2003 23:57'!\rclassVersion\r\t\"Default.  Any class may return a later version to inform readers that use ReferenceStream.  8/17/96 tk\"\r\t\"This method allows you to distinguish between class versions when the shape of the class \r\thasn't changed (when there's no change in the instVar names).\r\tIn the conversion methods you usually can tell by the inst var names \r\twhat old version you have. In a few cases, though, the same inst var \r\tnames were kept but their interpretation changed (like in the layoutFrame).\r\tBy changing the class version when you keep the same instVars you can \r\twarn older and newer images that they have to convert.\"\r\t^ 0! !\r\r!ClassDescription methodsFor: 'accessing' stamp: 'di 2/9/2000 17:54'!\rcomment\r\t\"Answer the receiver's comment. (If missing, supply a template) \"\r\t| aString |\r\taString _ self theNonMetaClass organization classComment.\r\taString isEmpty ifFalse: [^ aString].\r\t^\r'Main comment stating the purpose of this class and relevant relationship to other classes.\r\rPossible useful expressions for doIt or printIt.\r\rStructure:\r instVar1\t\ttype -- comment about the purpose of instVar1\r instVar2\t\ttype -- comment about the purpose of instVar2\r\rAny further useful comments about the general approach of this implementation.'! !\r\r!ClassDescription methodsFor: 'accessing' stamp: 'NS 1/27/2004 14:54'!\rcomment: aStringOrText\r\t\"Set the receiver's comment to be the argument, aStringOrText.\"\r\r\tself theNonMetaClass classComment: aStringOrText.! !\r\r!ClassDescription methodsFor: 'accessing' stamp: 'NS 1/27/2004 14:54'!\rcomment: aStringOrText stamp: aStamp\r\t\"Set the receiver's comment to be the argument, aStringOrText.\"\r\r\tself theNonMetaClass classComment: aStringOrText stamp: aStamp.! !\r\r!ClassDescription methodsFor: 'accessing' stamp: 'ls 10/28/2003 12:32'!\rhasComment\r\t\"return whether this class truly has a comment other than the default\"\r\t| org |\r\torg := self theNonMetaClass organization.\r\t^org classComment notNil and: [\r\t\torg classComment isEmpty not ].\r! !\r\r!ClassDescription methodsFor: 'accessing'!\rtheNonMetaClass\r\t\"Sent to a class or metaclass, always return the class\"\r\r\t^self! !\r\r\r!ClassDescription methodsFor: 'copying' stamp: 'di 2/17/2000 22:35'!\rcopy: sel from: class classified: cat \r\t\"Install the method associated with the first arugment, sel, a message \r\tselector, found in the method dictionary of the second argument, class, \r\tas one of the receiver's methods. Classify the message under the third \r\targument, cat.\"\r\r\t| code category |\r\t\"Useful when modifying an existing class\"\r\tcode _ class sourceMethodAt: sel.\r\tcode == nil\r\t\tifFalse: \r\t\t\t[cat == nil\r\t\t\t\tifTrue: [category _ class organization categoryOfElement: sel]\r\t\t\t\tifFalse: [category _ cat].\r\t\t\t(self methodDict includesKey: sel)\r\t\t\t\tifTrue: [code asString = (self sourceMethodAt: sel) asString \r\t\t\t\t\t\t\tifFalse: [self error: self name \r\t\t\t\t\t\t\t\t\t\t, ' ' \r\t\t\t\t\t\t\t\t\t\t, sel \r\t\t\t\t\t\t\t\t\t\t, ' will be redefined if you proceed.']].\r\t\t\tself compile: code classified: category]! !\r\r!ClassDescription methodsFor: 'copying'!\rcopyAll: selArray from: class classified: cat \r\t\"Install all the methods found in the method dictionary of the second \r\targument, class, as the receiver's methods. Classify the messages under \r\tthe third argument, cat.\"\r\r\tselArray do: \r\t\t[:s | self copy: s\r\t\t\t\tfrom: class\r\t\t\t\tclassified: cat]! !\r\r!ClassDescription methodsFor: 'copying'!\rcopyAllCategoriesFrom: aClass \r\t\"Specify that the categories of messages for the receiver include all of \r\tthose found in the class, aClass. Install each of the messages found in \r\tthese categories into the method dictionary of the receiver, classified \r\tunder the appropriate categories.\"\r\r\taClass organization categories do: [:cat | self copyCategory: cat from: aClass]! !\r\r!ClassDescription methodsFor: 'copying'!\rcopyCategory: cat from: class \r\t\"Specify that one of the categories of messages for the receiver is cat, as \r\tfound in the class, class. Copy each message found in this category.\"\r\r\tself copyCategory: cat\r\t\tfrom: class\r\t\tclassified: cat! !\r\r!ClassDescription methodsFor: 'copying'!\rcopyCategory: cat from: aClass classified: newCat \r\t\"Specify that one of the categories of messages for the receiver is the \r\tthird argument, newCat. Copy each message found in the category cat in \r\tclass aClass into this new category.\"\r\r\tself copyAll: (aClass organization listAtCategoryNamed: cat)\r\t\tfrom: aClass\r\t\tclassified: newCat! !\r\r\r!ClassDescription methodsFor: 'printing' stamp: 'lr 11/24/2003 17:21'!\rclassVariablesString\r\t\"Answer a string of my class variable names separated by spaces.\"\r\r\t^String streamContents: [ :stream | \r\t\tself classPool keys asSortedCollection \r\t\t\tdo: [ :each | stream nextPutAll: each ]\r\t\t\tseparatedBy: [ stream space ] ]! !\r\r!ClassDescription methodsFor: 'printing' stamp: 'lr 11/24/2003 17:20'!\rinstanceVariablesString\r\t\"Answer a string of my instance variable names separated by spaces.\"\r\r\t^String streamContents: [ :stream |\r\t\tself instVarNames \r\t\t\tdo: [ :each | stream nextPutAll: each ]\r\t\t\tseparatedBy: [ stream space ] ]! !\r\r!ClassDescription methodsFor: 'printing'!\rprintOn: aStream \r\r\taStream nextPutAll: self name! !\r\r!ClassDescription methodsFor: 'printing' stamp: 'MPW 1/1/1901 22:05'!\rprintOnStream: aStream \r\r\taStream print: self name! !\r\r!ClassDescription methodsFor: 'printing' stamp: 'lr 11/24/2003 17:24'!\rsharedPoolsString\r\t\"Answer a string of my shared pool names separated by spaces.\"\r\r\t^String streamContents: [ :stream |\r\t\tself sharedPools \r\t\t\tdo: [ :each |\r\t\t\t\tstream nextPutAll: (self environment \r\t\t\t\t\tkeyAtIdentityValue: each \r\t\t\t\t\tifAbsent: [ 'private' ]) ]\r\t\t\tseparatedBy: [ stream space ] ]! !\r\r!ClassDescription methodsFor: 'printing'!\rstoreOn: aStream\r\t\"Classes and Metaclasses have global names.\"\r\r\taStream nextPutAll: self name! !\r\r\r!ClassDescription methodsFor: 'instance variables'!\raddInstVarName: aString \r\t\"Add the argument, aString, as one of the receiver's instance variables.\"\r\r\tself subclassResponsibility! !\r\r!ClassDescription methodsFor: 'instance variables' stamp: 'sw 10/23/2000 18:05'!\rallInstVarNamesEverywhere\r\t\"Answer the set of inst var names used by the receiver, all superclasses, and all subclasses\"\r\r\t| aList |\r\taList _ OrderedCollection new.\r\t(self allSuperclasses , self withAllSubclasses asOrderedCollection) do:\r\t\t[:cls | aList addAll: cls instVarNames].\r\t^ aList asSet\r\r\t\"BorderedMorph allInstVarNamesEverywhere\"! !\r\r!ClassDescription methodsFor: 'instance variables' stamp: 'di 11/9/1998 20:21'!\rcheckForInstVarsOK: instVarString\r\t\"Return true if instVarString does no include any names used in a subclass\"\r\t| instVarArray |\r\tinstVarArray _ Scanner new scanFieldNames: instVarString.\r\tself allSubclasses do:\r\t\t[:cl | cl instVarNames do:\r\t\t\t[:n | (instVarArray includes: n)\r\t\t\t\tifTrue: [self error: n , ' is already used in ' , cl name.\r\t\t\t\t\t\t^ false]]].\r\t^ true! !\r\r!ClassDescription methodsFor: 'instance variables' stamp: 'sw 9/28/1999 17:04'!\rchooseInstVarAlphabeticallyThenDo: aBlock\r\t| allVars index |\r\t\"Put up a menu of all the instance variables in the receiver, presented in alphabetical order, and when the user chooses one, evaluate aBlock with the chosen variable as its parameter.\"\r\r\tallVars _ self allInstVarNames asSortedArray.\r\tallVars isEmpty ifTrue: [^ self inform: 'There are no\rinstance variables'].\r\r\tindex _ (PopUpMenu labelArray: allVars lines: #()) startUpWithCaption: 'Instance variables in\r', self name.\r\tindex = 0 ifTrue: [^ self].\r\taBlock value: (allVars at: index)! !\r\r!ClassDescription methodsFor: 'instance variables' stamp: 'ls 12/5/1999\r13:40'!\rchooseInstVarThenDo: aBlock \r\t\"Put up a menu of all the instance variables in the receiver, and when\rthe user chooses one, evaluate aBlock with the chosen variable as its\rparameter.  If the list is 6 or larger, then offer an alphabetical\rformulation as an alternative. triggered by a 'show alphabetically' item\rat the top of the list.\"\r\r\t| lines labelStream vars allVars index count offerAlpha |\r\t(count _ self allInstVarNames size) = 0 ifTrue: \r\t\t[^ self inform: 'There are no\rinstance variables.'].\r\r\tallVars _ OrderedCollection new.\r\tlines _ OrderedCollection new.\r\tlabelStream _ WriteStream on: (String new: 200).\r\r\t(offerAlpha _ count > 5)\r\t\tifTrue:\r\t\t\t[lines add: 1.\r\t\t\tallVars add: 'show alphabetically'.\r\t\t\tlabelStream nextPutAll: allVars first; cr].\r\tself withAllSuperclasses reverseDo:\r\t\t[:class |\r\t\tvars _ class instVarNames.\r\t\tvars do:\r\t\t\t[:var |\r\t\t\tlabelStream nextPutAll: var; cr.\r\t\t\tallVars add: var].\r\t\tvars isEmpty ifFalse: [lines add: allVars size]].\r\tlabelStream skip: -1 \"cut last CR\".\r\t(lines size > 0 and: [lines last = allVars size]) ifTrue:\r\t\t[lines removeLast].  \"dispense with inelegant line beneath last item\"\r\tindex _ (PopUpMenu labels: labelStream contents lines: lines)\rstartUpWithCaption: 'Instance variables in\r', self name.\r\tindex = 0 ifTrue: [^ self].\r\t(index = 1 and: [offerAlpha]) ifTrue: [^ self\rchooseInstVarAlphabeticallyThenDo: aBlock].\r\taBlock value: (allVars at: index)! !\r\r!ClassDescription methodsFor: 'instance variables' stamp: 'sw 5/27/1999 16:46'!\rclassThatDefinesInstanceVariable: instVarName\r\t(instanceVariables notNil and: [instanceVariables includes: instVarName asString]) ifTrue: [^ self]. \r\t^ superclass ifNotNil: [superclass classThatDefinesInstanceVariable: instVarName]! !\r\r!ClassDescription methodsFor: 'instance variables'!\rinstVarNames\r\t\"Answer an Array of the receiver's instance variable names.\"\r\r\tinstanceVariables == nil\r\t\tifTrue: [^#()]\r\t\tifFalse: [^instanceVariables]! !\r\r\r!ClassDescription methodsFor: 'accessing method dictionary' stamp: 'NS 1/28/2004 14:12'!\raddAndClassifySelector: selector withMethod: compiledMethod inProtocol: category notifying: requestor\r\t| priorMethodOrNil |\r\tpriorMethodOrNil _ self compiledMethodAt: selector ifAbsent: [nil].\r\tself addSelectorSilently: selector withMethod: compiledMethod.\r\tSystemChangeNotifier uniqueInstance doSilently: [self organization classify: selector under: category].\r\tpriorMethodOrNil isNil\r\t\tifTrue: [SystemChangeNotifier uniqueInstance methodAdded: compiledMethod selector: selector inProtocol: category class: self requestor: requestor]\r\t\tifFalse: [SystemChangeNotifier uniqueInstance methodChangedFrom: priorMethodOrNil to: compiledMethod selector: selector inClass: self requestor: requestor].! !\r\r!ClassDescription methodsFor: 'accessing method dictionary' stamp: 'NS 1/28/2004 14:10'!\raddSelector: selector withMethod: compiledMethod notifying: requestor\r\t| priorMethodOrNil |\r\tpriorMethodOrNil _ self compiledMethodAt: selector ifAbsent: [nil].\r\tself addSelectorSilently: selector withMethod: compiledMethod.\r\tpriorMethodOrNil isNil\r\t\tifTrue: [SystemChangeNotifier uniqueInstance methodAdded: compiledMethod selector: selector inClass: self requestor: requestor]\r\t\tifFalse: [SystemChangeNotifier uniqueInstance methodChangedFrom: priorMethodOrNil to: compiledMethod selector: selector inClass: self requestor: requestor].! !\r\r!ClassDescription methodsFor: 'accessing method dictionary' stamp: 'sw 1/5/2001 06:53'!\rallMethodCategoriesIntegratedThrough: mostGenericClass\r\t\"Answer a list of all the method categories of the receiver and all its superclasses, up through mostGenericClass\"\r\r\t| aColl |\r\taColl _ OrderedCollection new.\r\tself withAllSuperclasses do:\r\t\t[:aClass |\r\t\t\t(aClass includesBehavior: mostGenericClass)\r\t\t\t\tifTrue:\t[aColl addAll: aClass organization categories]].\r\taColl remove: 'no messages' asSymbol ifAbsent: [].\r\r\t^ (aColl asSet asSortedCollection: [:a :b | a asLowercase < b asLowercase]) asArray\r\r\"ColorTileMorph allMethodCategoriesIntegratedThrough: TileMorph\"! !\r\r!ClassDescription methodsFor: 'accessing method dictionary' stamp: 'sw 12/11/2000 14:00'!\risUniClass\r\t\"Answer whether the receiver is a uniclass.\"\r\r\t^ self name endsWithDigit! !\r\r!ClassDescription methodsFor: 'accessing method dictionary' stamp: 'di 3/7/2001 17:05'!\rrecoverFromMDFault\r\t\"This method handles methodDict faults to support, eg, discoverActiveClasses (qv).\"\r\t(organization isMemberOf: Array) ifFalse: [^ self error: 'oops'].\r\tmethodDict _ organization first.\r\torganization _ organization second.\r! !\r\r!ClassDescription methodsFor: 'accessing method dictionary' stamp: 'sd 3/28/2003 15:32'!\rrecoverFromMDFaultWithTrace\r\t\"This method handles emthodDict faults to support, eg, discoverActiveClasses (qv).\"\r\tself recoverFromMDFault.\r\tself environment at: #MDFaultDict ifPresent:\r\t\t[:faultDict | faultDict at: self name put:\r\t\t\t(String streamContents:\r\t\t\t\t[:strm | (thisContext stackOfSize: 20) do: [:item | strm print: item; cr]])]\r\r\"Execute the following statement to induce MD fault tracing.  This means that, not only will all active classes be recorded but, after a test run, MDFaultDict will contain, for every class used, a stack trace showing how it came to be used.  This statement should be executed just prior to any such text, in order to clear the traces.\r\r\tSmalltalk at: #MDFaultDict put: Dictionary new.\r\r\"! !\r\r!ClassDescription methodsFor: 'accessing method dictionary'!\rremoveCategory: aString \r\t\"Remove each of the messages categorized under aString in the method \r\tdictionary of the receiver. Then remove the category aString.\"\r\t| categoryName |\r\tcategoryName _ aString asSymbol.\r\t(self organization listAtCategoryNamed: categoryName) do:\r\t\t[:sel | self removeSelector: sel].\r\tself organization removeCategory: categoryName! !\r\r!ClassDescription methodsFor: 'accessing method dictionary' stamp: 'NS 4/7/2004 13:33'!\rremoveSelector: selector \r\t| priorMethod priorProtocol | \r\t\"Remove the message whose selector is given from the method \r\tdictionary of the receiver, if it is there. Answer nil otherwise.\"\r\r\tpriorMethod _ self compiledMethodAt: selector ifAbsent: [^ nil].\r\tpriorProtocol _ self whichCategoryIncludesSelector: selector.\r\tSystemChangeNotifier uniqueInstance doSilently: [\r\t\tself organization removeElement: selector].\r\tsuper removeSelector: selector.\r\tSystemChangeNotifier uniqueInstance \r\t\t\tmethodRemoved: priorMethod selector: selector inProtocol: priorProtocol class: self.! !\r\r!ClassDescription methodsFor: 'accessing method dictionary' stamp: 'sw 5/18/1999 10:11'!\rultimateSourceCodeAt: selector ifAbsent: aBlock\r\t\"Return the source code at selector, deferring to superclass if necessary\"\r\t^ self sourceCodeAt: selector ifAbsent:\r\t\t[superclass\r\t\t\tifNil:\r\t\t\t\t[aBlock value]\r\t\t\t ifNotNil:\r\t\t\t\t[superclass ultimateSourceCodeAt: selector ifAbsent: aBlock]]! !\r\r\r!ClassDescription methodsFor: 'organization'!\rcategory\r\t\"Answer the system organization category for the receiver.\"\r\r\t^SystemOrganization categoryOfElement: self name! !\r\r!ClassDescription methodsFor: 'organization' stamp: 'rw 8/2/2003 11:05'!\rcategory: cat \r\t\"Categorize the receiver under the system category, cat, removing it from \r\tany previous categorization.\"\r\r\t| oldCat |\r\toldCat := self category.\r\t(cat isKindOf: String)\r\t\tifTrue: [SystemOrganization classify: self name under: cat asSymbol]\r\t\tifFalse: [self errorCategoryName].\r\tSystemChangeNotifier uniqueInstance class: self recategorizedFrom: oldCat to: cat asSymbol! !\r\r!ClassDescription methodsFor: 'organization' stamp: 'BG 11/11/2003 09:51'!\rcompactOrganization\r\t\"Remove the organization of this class by message categories.\r\tThis is typically done to save space in small systems.  Classes and methods\r\tcreated or filed in subsequently will, nonetheless, be organized\"\r\r\torganization notNil\r       ifTrue: [organization updateFor: self].\r\tself isMeta ifFalse: [self class compactOrganization]! !\r\r!ClassDescription methodsFor: 'organization' stamp: 'NS 4/7/2004 13:33'!\rforgetDoIts\r\t\"get rid of old DoIt methods and bogus entries in the ClassOrganizer.\"\r\tSystemChangeNotifier uniqueInstance doSilently: [\r\t\tself organization\r\t\t\tremoveElement: #DoIt;\r\t\t\tremoveElement: #DoItIn:.\r\t].\r\tsuper forgetDoIts.! !\r\r!ClassDescription methodsFor: 'organization' stamp: 'NS 4/6/2004 15:46'!\rorganization\r\t\"Answer the instance of ClassOrganizer that represents the organization \r\tof the messages of the receiver.\"\r\r\torganization ifNil:\r\t\t[self organization: (ClassOrganizer defaultList: self methodDict keys asSortedCollection asArray)].\r\t(organization isMemberOf: Array) ifTrue:\r\t\t[self recoverFromMDFaultWithTrace].\r\t\r\t\"Making sure that subject is set correctly. It should not be necessary.\"\r\torganization ifNotNil: [organization setSubject: self].\r\t^ organization! !\r\r!ClassDescription methodsFor: 'organization' stamp: 'NS 4/6/2004 15:26'!\rorganization: aClassOrg\r\t\"Install an instance of ClassOrganizer that represents the organization of the messages of the receiver.\"\r\r\taClassOrg ifNotNil: [aClassOrg setSubject: self].\r\torganization _ aClassOrg! !\r\r!ClassDescription methodsFor: 'organization' stamp: 'di 7/17/97 00:06'!\rwhichCategoryIncludesSelector: aSelector \r\t\"Answer the category of the argument, aSelector, in the organization of \r\tthe receiver, or answer nil if the receiver does not inlcude this selector.\"\r\r\t(self includesSelector: aSelector)\r\t\tifTrue: [^ self organization categoryOfElement: aSelector]\r\t\tifFalse: [^nil]! !\r\r!ClassDescription methodsFor: 'organization' stamp: 'NS 4/6/2004 15:30'!\rzapOrganization\r\t\"Remove the organization of this class by message categories.\r\tThis is typically done to save space in small systems.  Classes and methods\r\tcreated or filed in subsequently will, nonetheless, be organized\"\r\r\tself organization: nil.\r\tself isMeta ifFalse: [self class zapOrganization]! !\r\r\r!ClassDescription methodsFor: 'compiling'!\racceptsLoggingOfCompilation\r\t\"weird name is so that it will come lexically before #compile, so that a clean build can make it through.  7/7/96 sw\"\r\r\t^ true! !\r\r!ClassDescription methodsFor: 'compiling'!\rcompile: code classified: heading \r\t\"Compile the argument, code, as source code in the context of the \r\treceiver and install the result in the receiver's method dictionary under \r\tthe classification indicated by the second argument, heading. nil is to be \r\tnotified if an error occurs. The argument code is either a string or an \r\tobject that converts to a string or a PositionableStream on an object that \r\tconverts to a string.\"\r\r\t^self\r\t\tcompile: code\r\t\tclassified: heading\r\t\tnotifying: (SyntaxError new category: heading)! !\r\r!ClassDescription methodsFor: 'compiling' stamp: 'sw 8/21/97 00:26'!\rcompile: text classified: category notifying: requestor\r\t| stamp |\r\tstamp _ self acceptsLoggingOfCompilation ifTrue: [Utilities changeStamp] ifFalse: [nil].\r\t^ self compile: text classified: category\r\t\twithStamp: stamp notifying: requestor\r\r ! !\r\r!ClassDescription methodsFor: 'compiling' stamp: 'di 5/4/2001 11:35'!\rcompile: text classified: category withStamp: changeStamp notifying: requestor\r\t^ self compile: text classified: category withStamp: changeStamp notifying: requestor logSource: self acceptsLoggingOfCompilation! !\r\r!ClassDescription methodsFor: 'compiling' stamp: 'NS 1/28/2004 14:25'!\rcompile: text classified: category withStamp: changeStamp notifying: requestor logSource: logSource\r\t| methodAndNode |\r\tmethodAndNode _ self basicCompile: text asString notifying: requestor \r\t\t\t\t\t\t\ttrailer: self defaultMethodTrailer ifFail: [^nil].\r\tlogSource ifTrue: [\r\t\tself logMethodSource: text forMethodWithNode: methodAndNode \r\t\t\tinCategory: category withStamp: changeStamp notifying: requestor.\r\t].\r\tself addAndClassifySelector: methodAndNode selector withMethod: methodAndNode \r\t\tmethod inProtocol: category notifying: requestor.\r\tself theNonMetaClass noteCompilationOf: methodAndNode selector meta: self isMeta.\r\t^ methodAndNode selector! !\r\r!ClassDescription methodsFor: 'compiling'!\rcompile: code notifying: requestor \r\t\"Refer to the comment in Behavior|compile:notifying:.\" \r\r\t^self compile: code\r\t\t classified: ClassOrganizer default\r\t\t notifying: requestor! !\r\r!ClassDescription methodsFor: 'compiling' stamp: 'NS 1/28/2004 14:45'!\rcompileSilently: code classified: category\r\t\"Compile the code and classify the resulting method in the given category, leaving no trail in the system log, nor in any change set, nor in the 'recent submissions' list. This should only be used when you know for sure that the compilation will succeed.\"\r\r\t^ self compileSilently: code classified: category notifying: nil.! !\r\r!ClassDescription methodsFor: 'compiling' stamp: 'NS 1/28/2004 14:45'!\rcompileSilently: code classified: category notifying: requestor\r\t\"Compile the code and classify the resulting method in the given category, leaving no trail in the system log, nor in any change set, nor in the 'recent submissions' list. This should only be used when you know for sure that the compilation will succeed.\"\r\r\t^ SystemChangeNotifier uniqueInstance \r\t\tdoSilently: [self compile: code classified: category withStamp: nil notifying: requestor logSource: false].! !\r\r!ClassDescription methodsFor: 'compiling' stamp: 'sw 9/25/2001 02:11'!\rnoteCompilationOf: aSelector meta: isMeta\r\t\"A hook allowing some classes to react to recompilation of certain selectors\"! !\r\r!ClassDescription methodsFor: 'compiling' stamp: 'NS 1/28/2004 14:48'!\rwantsChangeSetLogging\r\t\"Answer whether code submitted for the receiver should be remembered by the changeSet mechanism.  7/12/96 sw\"\r\r\t^ true! !\r\r!ClassDescription methodsFor: 'compiling' stamp: 'sw 7/31/2000 12:55'!\rwantsRecompilationProgressReported\r\t\"Answer whether the receiver would like progress of its recompilation reported interactively to the user.\"\r\r\t^ true! !\r\r\r!ClassDescription methodsFor: 'fileIn/Out' stamp: 'sw 9/8/1998 14:44'!\rclassComment: aString\r\t\"Store the comment, aString or Text or RemoteString, associated with the class we are orgainzing.  Empty string gets stored only if had a non-empty one before.\"\r\t^ self classComment: aString stamp: '<historical>'! !\r\r!ClassDescription methodsFor: 'fileIn/Out' stamp: 'NS 4/8/2004 11:35'!\rclassComment: aString stamp: aStamp\r\t\"Store the comment, aString or Text or RemoteString, associated with the class we are organizing.  Empty string gets stored only if had a non-empty one before.\"\r\r\t| ptr header file oldCommentRemoteStr |\r\t(aString isKindOf: RemoteString) ifTrue:\r\t\t[SystemChangeNotifier uniqueInstance classCommented: self.\r\t\t^ self organization classComment: aString stamp: aStamp].\r\r\toldCommentRemoteStr _ self organization commentRemoteStr.\r\t(aString size = 0) & (oldCommentRemoteStr == nil) ifTrue: [^ self organization classComment: nil].\r\t\t\"never had a class comment, no need to write empty string out\"\r\r\tptr _ oldCommentRemoteStr ifNil: [0] ifNotNil: [oldCommentRemoteStr sourcePointer].\r\tSourceFiles ifNotNil: [(file _ SourceFiles at: 2) ifNotNil:\r\t\t[file setToEnd; cr; nextPut: $!!.\t\"directly\"\r\t\t\"Should be saying (file command: 'H3') for HTML, but ignoring it here\"\r\t\theader _ String streamContents: [:strm | strm nextPutAll: self name;\r\t\t\tnextPutAll: ' commentStamp: '.\r\t\t\taStamp storeOn: strm.\r\t\t\tstrm nextPutAll: ' prior: '; nextPutAll: ptr printString].\r\t\tfile nextChunkPut: header]].\r\tself organization classComment: (RemoteString newString: aString onFileNumber: 2) stamp: aStamp.\r\tSystemChangeNotifier uniqueInstance classCommented: self.\r! !\r\r!ClassDescription methodsFor: 'fileIn/Out' stamp: 'sw 9/2/1998 14:22'!\rcommentStamp: changeStamp\r\tself organization commentStamp: changeStamp.\r    ^ self commentStamp: changeStamp prior: 0! !\r\r!ClassDescription methodsFor: 'fileIn/Out' stamp: 'tk 12/13/97 14:21'!\rcommentStamp: changeStamp prior: indexAndOffset\r\t\"Prior source link ignored when filing in.\"\r\r\t^ ClassCommentReader new setClass: self\r\t\t\t\tcategory: #Comment\r\t\t\t\tchangeStamp: changeStamp\r! !\r\r!ClassDescription methodsFor: 'fileIn/Out' stamp: 'di 6/7/2000 22:46'!\rdefinition\r\t\"Answer a String that defines the receiver in good old ST-80.\"\r\r\t^ self definitionST80! !\r\r!ClassDescription methodsFor: 'fileIn/Out' stamp: 'ls 10/9/2001 00:12'!\rdefinitionST80\r\t\"Answer a String that defines the receiver.\"\r\r\t| aStream path |\r\taStream _ WriteStream on: (String new: 300).\r\tsuperclass == nil\r\t\tifTrue: [aStream nextPutAll: 'ProtoObject']\r\t\tifFalse: [path _ ''.\r\t\t\t\tself environment scopeFor: superclass name from: nil\r\t\t\t\t\t\tenvtAndPathIfFound: [:envt :remotePath | path _ remotePath].\r\t\t\t\taStream nextPutAll: path , superclass name].\r\taStream nextPutAll: self kindOfSubclass;\r\t\t\tstore: self name.\r\taStream cr; tab; nextPutAll: 'instanceVariableNames: ';\r\t\t\tstore: self instanceVariablesString.\r\taStream cr; tab; nextPutAll: 'classVariableNames: ';\r\t\t\tstore: self classVariablesString.\r\taStream cr; tab; nextPutAll: 'poolDictionaries: ';\r\t\t\tstore: self sharedPoolsString.\r\taStream cr; tab; nextPutAll: 'category: ';\r\t\t\tstore: (SystemOrganization categoryOfElement: self name) asString.\r\r\tsuperclass ifNil: [ \r\t\taStream nextPutAll: '.'; cr.\r\t\taStream nextPutAll: self name.\r\t\taStream space; nextPutAll: 'superclass: nil'. ].\r\r\t^ aStream contents! !\r\r!ClassDescription methodsFor: 'fileIn/Out' stamp: 'ls 10/9/2001 00:12'!\rdefinitionST80: isST80\r\t\"Answer a String that defines the receiver.\"\r\r\t| aStream path |\r\tisST80 ifTrue: [^ self definitionST80].\r\r\taStream _ WriteStream on: (String new: 300).\r\tsuperclass == nil\r\t\tifTrue: [aStream nextPutAll: 'ProtoObject']\r\t\tifFalse: [path _ ''.\r\t\t\t\tself environment scopeFor: superclass name from: nil\r\t\t\t\t\t\tenvtAndPathIfFound: [:envt :remotePath | path _ remotePath].\r\t\t\t\taStream nextPutAll: path , superclass name].\r\taStream nextPutKeyword: self kindOfSubclass\r\t\t\twithArg: self name.\r\taStream cr; tab; nextPutKeyword: 'instanceVariableNames: '\r\t\t\twithArg: self instanceVariablesString.\r\taStream cr; tab; nextPutKeyword: 'classVariableNames: 'withArg: self classVariablesString.\r\taStream cr; tab; nextPutKeyword: 'poolDictionaries: '\r\t\t\twithArg: self sharedPoolsString.\r\taStream cr; tab; nextPutKeyword: 'category: '\r\t\t\twithArg: (SystemOrganization categoryOfElement: self name) asString.\r\r\tsuperclass ifNil: [ \r\t\taStream nextPutAll: '.'; cr.\r\t\taStream nextPutAll: self name.\r\t\taStream space; nextPutAll: 'superclass (nil)'. ].\r\r\t^ aStream contents! !\r\r!ClassDescription methodsFor: 'fileIn/Out' stamp: 'di 6/28/97 10:06'!\rfileOutCategory: catName \r\t^ self fileOutCategory: catName asHtml: false! !\r\r!ClassDescription methodsFor: 'fileIn/Out' stamp: 'di 6/28/97 10:05'!\rfileOutCategory: catName asHtml: useHtml\r\t\"FileOut the named category, possibly in Html format.\"\r\t| fileStream |\r\tfileStream _ useHtml\r\t\tifTrue: [(FileStream newFileNamed: self name , '-' , catName , '.html') asHtml]\r\t\tifFalse: [FileStream newFileNamed: self name , '-' , catName , '.st'].\r\tfileStream header; timeStamp.\r\tself fileOutCategory: catName on: fileStream moveSource: false toFile: 0.\r\tfileStream trailer; close! !\r\r!ClassDescription methodsFor: 'fileIn/Out' stamp: 'di 10/15/1999 14:45'!\rfileOutCategory: aSymbol on: aFileStream moveSource: moveSource toFile: fileIndex \r\t\"File a description of the receiver's category, aString, onto aFileStream. If \r\tmoveSource, is true, then set the method source pointer to the new file position.\r\tNote when this method is called with moveSource=true, it is condensing the\r\t.sources file, and should only write one preamble per method category.\"\r\r\t| selectors |\r\r\taFileStream cr.\r\tselectors := (aSymbol asString = ClassOrganizer allCategory)\r\t\t\t\tifTrue: [ self organization allMethodSelectors ]\r\t\t\t\tifFalse: [ self organization listAtCategoryNamed: aSymbol ].\r\r\t\"Overridden to preserve author stamps in sources file regardless\"\r\tselectors do: [:sel |\r\t\tself printMethodChunk: sel \r\t\t\twithPreamble: true\r\t\t\ton: aFileStream \r\t\t\tmoveSource: moveSource \r\t\t\ttoFile: fileIndex].\r\t^ self! !\r\r!ClassDescription methodsFor: 'fileIn/Out'!\rfileOutChangedMessages: aSet on: aFileStream \r\t\"File a description of the messages of the receiver that have been \r\tchanged (i.e., are entered into the argument, aSet) onto aFileStream.\"\r\r\tself fileOutChangedMessages: aSet\r\t\ton: aFileStream\r\t\tmoveSource: false\r\t\ttoFile: 0! !\r\r!ClassDescription methodsFor: 'fileIn/Out' stamp: 'di 6/26/97 21:41'!\rfileOutChangedMessages: aSet on: aFileStream moveSource: moveSource toFile: fileIndex \r\t\"File a description of the messages of this class that have been \r\tchanged (i.e., are entered into the argument, aSet) onto aFileStream.  If \r\tmoveSource, is true, then set the method source pointer to the new file position.\r\tNote when this method is called with moveSource=true, it is condensing the\r\t.changes file, and should only write a preamble for every method.\"\r\t| org sels |\r\t(org _ self organization) categories do: \r\t\t[:cat | \r\t\tsels _ (org listAtCategoryNamed: cat) select: [:sel | aSet includes: sel].\r\t\tsels do:\r\t\t\t[:sel |  self printMethodChunk: sel withPreamble: true on: aFileStream\r\t\t\t\t\t\t\tmoveSource: moveSource toFile: fileIndex]]! !\r\r!ClassDescription methodsFor: 'fileIn/Out' stamp: 'di 6/28/97 15:52'!\rfileOutMethod: selector\r\t\"Write source code of a single method on a file.  Make up a name for the file.\"\r\tself fileOutMethod: selector asHtml: false! !\r\r!ClassDescription methodsFor: 'fileIn/Out' stamp: 'sw 8/1/2002 14:39'!\rfileOutMethod: selector asHtml: useHtml\r\t\"Write source code of a single method on a file in .st or .html format\"\r\r\t| fileStream nameBody |\r\t(selector == #Comment) ifTrue: [^ self inform: 'Sorry, cannot file out class comment in isolation.'].\r\t(self includesSelector: selector) ifFalse: [^ self error: 'Selector ', selector asString, ' not found'].\r\tnameBody _ self name , '-' , (selector copyReplaceAll: ':' with: '').\r\tfileStream _ useHtml\r\t\tifTrue: [(FileStream newFileNamed: nameBody , '.html') asHtml]\r\t\tifFalse: [FileStream newFileNamed: nameBody , '.st'].\r\tfileStream header; timeStamp.\r\tself printMethodChunk: selector withPreamble: true\r\t\ton: fileStream moveSource: false toFile: 0.\r\tfileStream close! !\r\r!ClassDescription methodsFor: 'fileIn/Out'!\rfileOutOn: aFileStream \r\t\"File a description of the receiver on aFileStream.\"\r\r\tself fileOutOn: aFileStream\r\t\tmoveSource: false\r\t\ttoFile: 0! !\r\r!ClassDescription methodsFor: 'fileIn/Out' stamp: 'sw 1/15/98 23:38'!\rfileOutOn: aFileStream moveSource: moveSource toFile: fileIndex\r\t\"File a description of the receiver on aFileStream. If the boolean \r\targument, moveSource, is true, then set the trailing bytes to the position \r\tof aFileStream and to fileIndex in order to indicate where to find the \r\tsource code.\"\r\r\taFileStream command: 'H3'.\r\t\taFileStream nextChunkPut: self definition.\r\t\taFileStream command: '/H3'.\r\r\tself organization\r\t\tputCommentOnFile: aFileStream\r\t\tnumbered: fileIndex\r\t\tmoveSource: moveSource\r\t\tforClass: self.\r\tself organization categories do: \r\t\t[:heading |\r\t\tself fileOutCategory: heading\r\t\t\ton: aFileStream\r\t\t\tmoveSource: moveSource\r\t\t\ttoFile: fileIndex]! !\r\r!ClassDescription methodsFor: 'fileIn/Out' stamp: 'di 6/28/97 20:35'!\rfileOutOrganizationOn: aFileStream\r\t\"File a description of the receiver's organization on aFileStream.\"\r\r\taFileStream cr; nextPut: $!!.\r\taFileStream nextChunkPut: self name, ' reorganize'; cr.\r\taFileStream nextChunkPut: self organization printString; cr! !\r\r!ClassDescription methodsFor: 'fileIn/Out' stamp: 'tk 12/29/97 13:00'!\rmethodsFor: categoryName \r\t\"Answer a ClassCategoryReader for compiling the messages in the category, categoryName, of the receiver.\"\r\r\t^ ClassCategoryReader new setClass: self category: categoryName asSymbol\r\r\t\"(False methodsFor: 'logical operations') inspect\"! !\r\r!ClassDescription methodsFor: 'fileIn/Out' stamp: 'di 6/13/97 13:51'!\rmethodsFor: categoryName stamp: changeStamp \r\t^ self methodsFor: categoryName stamp: (Utilities fixStamp: changeStamp) prior: 0! !\r\r!ClassDescription methodsFor: 'fileIn/Out' stamp: 'tk 8/15/1998 22:02'!\rmethodsFor: categoryName stamp: changeStamp prior: indexAndOffset\r\t\"Prior source link ignored when filing in.\"\r\t^ ClassCategoryReader new setClass: self\r\t\t\t\tcategory: categoryName asSymbol\r\t\t\t\tchangeStamp: changeStamp\r\r\"Most importantly, return the new ClassCategoryReader, so a fileIn will let it seize control.  So method will be placed in the proper category.  See the transfer of control where ReadWriteStream fileIn calls scanFrom:\"!\r]style[(65 333 22 17)f1b,f1,f1LReadWriteStream fileIn;,f1! !\r\r!ClassDescription methodsFor: 'fileIn/Out' stamp: 'sw 1/2/2003 21:50'!\rmoveChangesTo: newFile \r\t\"Used in the process of condensing changes, this message requests that \r\tthe source code of all methods of the receiver that have been changed \r\tshould be moved to newFile.\"\r\r\t| changes |\r\tchanges _ self methodDict keys select: [:sel | (self methodDict at: sel) fileIndex > 1].\r\tself fileOutChangedMessages: changes\r\t\ton: newFile\r\t\tmoveSource: true\r\t\ttoFile: 2! !\r\r!ClassDescription methodsFor: 'fileIn/Out' stamp: 'di 4/4/1999 11:43'!\rprintCategoryChunk: category on: aFileStream withStamp: changeStamp priorMethod: priorMethod \r\t\"Print a method category preamble.  This must have a category name.\r\tIt may have an author/date stamp, and it may have a prior source link.\r\tIf it has a prior source link, it MUST have a stamp, even if it is empty.\"\r\r\"The current design is that changeStamps and prior source links are preserved in the changes file.  All fileOuts include changeStamps.  Condensing sources, however, eliminates all stamps (and links, natch).\"\r\r\taFileStream cr; command: 'H3'; nextPut: $!!.\r\taFileStream nextChunkPut: (String streamContents:\r\t\t[:strm |\r\t\tstrm nextPutAll: self name; nextPutAll: ' methodsFor: '; print: category asString.\r\t\t(changeStamp ~~ nil and:\r\t\t\t[changeStamp size > 0 or: [priorMethod ~~ nil]]) ifTrue:\r\t\t\t[strm nextPutAll: ' stamp: '; print: changeStamp].\r\t\tpriorMethod ~~ nil ifTrue:\r\t\t\t[strm nextPutAll: ' prior: '; print: priorMethod sourcePointer]]).\r\taFileStream command: '/H3'.! !\r\r!ClassDescription methodsFor: 'fileIn/Out' stamp: 'RAA 5/5/2000 09:08'!\rprintMethodChunk: selector withPreamble: doPreamble on: outStream\r\t\tmoveSource: moveSource toFile: fileIndex\r\t\"Copy the source code for the method associated with selector onto the fileStream.  If moveSource true, then also set the source code pointer of the method.\"\r\t| preamble method oldPos newPos sourceFile endPos |\r\tdoPreamble \r\t\tifTrue: [preamble _ self name , ' methodsFor: ' ,\r\t\t\t\t\t(self organization categoryOfElement: selector) asString printString]\r\t\tifFalse: [preamble _ ''].\r\tmethod _ self methodDict at: selector.\r\t((method fileIndex = 0\r\t\tor: [(SourceFiles at: method fileIndex) == nil])\r\t\tor: [(oldPos _ method filePosition) = 0])\r\t\tifTrue:\r\t\t[\"The source code is not accessible.  We must decompile...\"\r\t\tpreamble size > 0 ifTrue: [outStream cr; nextPut: $!!; nextChunkPut: preamble; cr].\r\t\toutStream nextChunkPut: (self decompilerClass new decompile: selector\r\t\t\t\t\t\t\t\t\t\t\tin: self method: method) decompileString]\r\t\tifFalse:\r\t\t[sourceFile _ SourceFiles at: method fileIndex.\r\t\tsourceFile position: oldPos.\r\t\tpreamble size > 0 ifTrue:    \"Copy the preamble\"\r\t\t\t[outStream copyPreamble: preamble from: sourceFile].\r\t\t\"Copy the method chunk\"\r\t\tnewPos _ outStream position.\r\t\toutStream copyMethodChunkFrom: sourceFile.\r\t\tsourceFile skipSeparators.      \"The following chunk may have ]style[\"\r\t\tsourceFile peek == $] ifTrue: [\r\t\t\toutStream cr; copyMethodChunkFrom: sourceFile].\r\t\tmoveSource ifTrue:    \"Set the new method source pointer\"\r\t\t\t[endPos _ outStream position.\r\t\t\tmethod checkOKToAdd: endPos - newPos at: newPos.\r\t\t\tmethod setSourcePosition: newPos inFile: fileIndex]].\r\tpreamble size > 0 ifTrue: [outStream nextChunkPut: ' '].\r\t^ outStream cr! !\r\r!ClassDescription methodsFor: 'fileIn/Out' stamp: 'NS 4/8/2004 11:32'!\rputClassCommentToCondensedChangesFile: aFileStream\r\t\"Called when condensing changes.  If the receiver has a class comment, and if that class comment does not reside in the .sources file, then write it to the given filestream, with the resulting RemoteString being reachable from the source file #2.  Note that any existing backpointer into the .sources file is lost by this process -- a situation that maybe should be fixed someday.\"\r\r\t| header aStamp aCommentRemoteStr |\r\tself isMeta ifTrue: [^ self].  \"bulletproofing only\"\r\t((aCommentRemoteStr _ self organization commentRemoteStr) isNil or:\r\t\t[aCommentRemoteStr sourceFileNumber == 1]) ifTrue: [^ self].\r\r\taFileStream cr; nextPut: $!!.\r\theader _ String streamContents: [:strm | strm nextPutAll: self name;\r\t\tnextPutAll: ' commentStamp: '.\r\t\t(aStamp _ self organization commentStamp ifNil: ['<historical>']) storeOn: strm.\r\t\tstrm nextPutAll: ' prior: 0'].\r\taFileStream nextChunkPut: header.\r\taFileStream cr.\r\tself organization classComment: (RemoteString newString: self organization classComment onFileNumber: 2 toFile: aFileStream) stamp: aStamp! !\r\r!ClassDescription methodsFor: 'fileIn/Out' stamp: 'NS 4/7/2004 23:01'!\rreorganize\r\t\"During fileIn, !!Rectangle reorganize!! allows Rectangle to seize control and treat the next chunk as its organization.  See the transfer of control where ReadWriteStream fileIn calls scanFrom:\"\r\r\t^self organization!\r]style[(10 156 22 38)f1b,f1,f1LReadWriteStream fileIn;,f1! !\r\r\r!ClassDescription methodsFor: 'private'!\rerrorCategoryName\r\tself error: 'Category name must be a String'! !\r\r!ClassDescription methodsFor: 'private' stamp: 'ar 7/11/1999 11:41'!\rinstVarMappingFrom: oldClass\r\t\"Return the mapping from instVars of oldClass to new class that is used for converting old instances of oldClass.\"\r\t| oldInstVarNames |\r\toldInstVarNames _ oldClass allInstVarNames.\r\t^self allInstVarNames \r\t\t\tcollect: [:instVarName | oldInstVarNames indexOf: instVarName].\r! !\r\r!ClassDescription methodsFor: 'private' stamp: 'NS 1/28/2004 14:22'!\rlogMethodSource: aText forMethodWithNode: aCompiledMethodWithNode inCategory: category withStamp: changeStamp notifying: requestor\r\t| priorMethodOrNil newText |\r\tpriorMethodOrNil := self compiledMethodAt: aCompiledMethodWithNode selector ifAbsent: [].\r\tnewText _ ((requestor == nil or: [requestor isKindOf: SyntaxError]) not\r\t\t\t\t\t\tand: [Preferences confirmFirstUseOfStyle])\r\t\t\tifTrue: [aText askIfAddStyle: priorMethodOrNil req: requestor]\r\t\t\tifFalse: [aText].\r\taCompiledMethodWithNode method putSource: newText\r\t\tfromParseNode: aCompiledMethodWithNode node\r\t\tclass: self category: category withStamp: changeStamp \r\t\tinFile: 2 priorMethod: priorMethodOrNil.! !\r\r!ClassDescription methodsFor: 'private' stamp: 'ar 7/10/1999 11:17'!\rnewInstanceFrom: oldInstance variable: variable size: instSize map: map\r\t\"Create a new instance of the receiver based on the given old instance.\r\tThe supplied map contains a mapping of the old instVar names into\r\tthe receiver's instVars\"\r\t| new |\r\tvariable\r\t\tifTrue: [new _ self basicNew: oldInstance basicSize]\r\t\tifFalse: [new _ self basicNew].\r\t1 to: instSize do: \r\t\t[:offset |  (map at: offset) > 0 ifTrue:\r\t\t\t[new instVarAt: offset\r\t\t\t\t\tput: (oldInstance instVarAt: (map at: offset))]].\r\tvariable \r\t\tifTrue: [1 to: oldInstance basicSize do: \r\t\t\t\t\t[:offset |\r\t\t\t\t\tnew basicAt: offset put: (oldInstance basicAt: offset)]].\r\t^new! !\r\r!ClassDescription methodsFor: 'private' stamp: 'ar 7/15/1999 17:04'!\rsetInstVarNames: instVarArray\r\t\"Private - for class initialization only\"\r\t| required |\r\trequired _ self instSize.\r\tsuperclass notNil ifTrue:[required _ required - superclass instSize].\r\tinstVarArray size = required\r\t\tifFalse:[^self error: required printString, ' instvar names are required'].\r\tinstVarArray isEmpty\r\t\tifTrue:[instanceVariables _ nil]\r\t\tifFalse:[instanceVariables _ instVarArray asArray].! !\r\r\r!ClassDescription methodsFor: 'accessing class hierarchy' stamp: 'ar 7/14/1999 10:57'!\rprintSubclassesOn: aStream level: level \r\t\"As part of the algorithm for printing a description of the receiver, print the\r\tsubclass on the file stream, aStream, indenting level times.\"\r\r\t| subclassNames |\r\taStream crtab: level.\r\taStream nextPutAll: self name.\r\taStream space; print: self instVarNames.\r\tself == Class\r\t\tifTrue: \r\t\t\t[aStream crtab: level + 1; nextPutAll: '[ ... all the Metaclasses ... ]'.\r\t\t\t^self].\r\tsubclassNames _ self subclasses asSortedCollection:[:c1 :c2| c1 name <= c2 name].\r\t\"Print subclasses in alphabetical order\"\r\tsubclassNames do:\r\t\t[:subclass | subclass printSubclassesOn: aStream level: level + 1]! !\r\r!ClassDescription methodsFor: 'accessing class hierarchy' stamp: 'di 7/21/1999 11:05'!\rsubclasses\r\t^ Array new! !\r\r!ClassDescription methodsFor: 'accessing class hierarchy' stamp: 'ar 7/10/1999 08:22'!\rsubclassesDo: aBlock\r\t\"Evaluate the argument, aBlock, for each of the receiver's immediate subclasses.\"\r\t^self subclasses do: aBlock! !\rTextDiffBuilder subclass: #ClassDiffBuilder\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-File Contents Browser'!\r\r!ClassDiffBuilder methodsFor: 'initialize'!\rsplit: aString\r\t| lines in out c |\r\tlines := OrderedCollection new.\r\tin := ReadStream on: aString.\r\tout := WriteStream on: String new.\r\t[in atEnd] whileFalse:[\r\t\t(c := in next) isSeparator ifTrue:[\r\t\t\tout nextPut: c.\r\t\t\tlines add: out contents.\r\t\t\tout reset.\r\t\t] ifFalse:[\r\t\t\tout nextPut: c.\r\t\t].\r\t].\r\tout position = 0 ifFalse:[\r\t\tlines add: out contents.\r\t].\r\t^lines! !\r\r\r!ClassDiffBuilder methodsFor: 'printing' stamp: 'nk 4/24/2004 08:49'!\rprintPatchSequence: ps on: aStream \r\t| type line |\r\tps do: [:assoc | \r\t\t\ttype := assoc key.\r\t\t\tline := assoc value.\r\t\t\taStream\r\t\t\t\twithAttributes: (self attributesOf: type)\r\t\t\t\tdo: [aStream nextPutAll: line]]! !\rHierarchyBrowser subclass: #ClassListBrowser\r\tinstanceVariableNames: 'defaultTitle'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Browser'!\r!ClassListBrowser commentStamp: '<historical>' prior: 0!\rA ClassListBrowser displays the code for an arbitrary list of classes.\r\rClassListBrowser example1.  \"all classes that have the string 'Pluggable' in their names\"\rClassListBrowser example2.  \"all classes whose names start with the letter S\"\rClassListBrowser example3.  \"all variable classes\"\rClassListBrowser example4.  \"all classes with more than 100 methods\"\rClassListBrowser example5.  \"all classes that lack class comments\"\rClassListBrowser example6.  \"all classes that have class instance variables\"\r\rClassListBrowser new initForClassesNamed: #(Browser Boolean) title: 'Browser and Boolean!!'.\r!\r\r\r!ClassListBrowser methodsFor: 'initialization' stamp: 'sw 7/18/2002 22:43'!\rinitForClassesNamed: nameList title: aTitle\r\t\"Initialize the receiver for the class-name-list and title provided\"\r\r\tself systemOrganizer: SystemOrganization.\r\tmetaClassIndicated _ false.\r\tdefaultTitle _ aTitle.\r\tclassList _ nameList copy.\r\tself class openBrowserView:  (self openSystemCatEditString: nil)\r\t\tlabel: aTitle\r\r\t\"ClassListBrowser new initForClassesNamed: #(Browser CategoryViewer) title: 'Frogs'\"! !\r\r\r!ClassListBrowser methodsFor: 'title' stamp: 'sw 7/18/2002 22:42'!\rdefaultTitle: aTitle\r\t\"Set the browser's default title\"\r\r\tdefaultTitle _ aTitle! !\r\r!ClassListBrowser methodsFor: 'title' stamp: 'sw 7/18/2002 22:43'!\rlabelString\r\t\"Answer the label strilng to use on the browser\"\r\r\t^ defaultTitle ifNil: [super labelString]! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rClassListBrowser class\r\tinstanceVariableNames: ''!\r\r!ClassListBrowser class methodsFor: 'examples' stamp: 'sw 7/27/2002 16:01'!\rexample1\r\t\"Put up a ClassListBrowser that shows all classes that have the string 'Pluggable' in their names\"\r\r\tself browseClassesSatisfying: [:cl | cl name includesSubString: 'Pluggable'] title: 'Pluggables'\r\r\"ClassListBrowser example1\"\r\t! !\r\r!ClassListBrowser class methodsFor: 'examples' stamp: 'sd 4/17/2003 21:21'!\rexample2\r\t\"Put up a ClassListBrowser that shows all classes whose names start with \r\tthe letter S\"\r\r\tself new\r\t\tinitForClassesNamed: (self systemNavigation allClasses\r\t\t\t\tcollect: [:c | c name]\r\t\t\t\tthenSelect: [:aName | aName first == $S])\r\t\ttitle: 'All classes starting with S'\r\t\"ClassListBrowser example2\"! !\r\r!ClassListBrowser class methodsFor: 'examples' stamp: 'sw 7/27/2002 16:03'!\rexample3\r\t\"Put up a ClassListBrowser that shows all Variable classes\"\r\r\tself browseClassesSatisfying:  [:c | c isVariable] title: 'All Variable classes'\r\r\"ClassListBrowser example3\"\r\t! !\r\r!ClassListBrowser class methodsFor: 'examples' stamp: 'sw 7/27/2002 16:04'!\rexample4\r\t\"Put up a ClassListBrowser that shows all classes implementing more than 100 methods\"\r\r\tself browseClassesSatisfying:\r\t\t[:c | (c selectors size + c class selectors size) > 100] title: 'Classes with more than 100 methods'\r\r\"ClassListBrowser example4\"\r\t! !\r\r!ClassListBrowser class methodsFor: 'examples' stamp: 'sw 7/27/2002 14:32'!\rexample5\r\t\"Put up a ClassListBrowser that shows all classes that lack class comments\"\r\r\tself\r\t\tbrowseClassesSatisfying: \r\t\t\t[:c | c organization classComment isEmptyOrNil] \r\t\ttitle: 'Classes lacking class comments'\r\r\"ClassListBrowser example5\"\r\t! !\r\r!ClassListBrowser class methodsFor: 'examples' stamp: 'sw 7/27/2002 14:33'!\rexample6\r\t\"Put up a ClassListBrowser that shows all classes that have class instance variables\"\r\r\tself\r\t\tbrowseClassesSatisfying: \r\t\t\t[:c | c class instVarNames size > 0]\r\t\ttitle:\r\t\t\t'Classes that define class-side instance variables'\r\r\"ClassListBrowser example6\"! !\r\r\r!ClassListBrowser class methodsFor: 'instance creation' stamp: 'sd 4/17/2003 21:21'!\rbrowseClassesSatisfying: classBlock title: aTitle\r\t\"Put up a ClassListBrowser showing all classes that satisfy the classBlock.\"\r\r\tself new\r\t\tinitForClassesNamed:\r\t\t\t(self systemNavigation allClasses select:\r\t\t\t\t\t[:c | (classBlock value: c) == true]\r\t\t\t\tthenCollect:\r\t\t\t\t\t[:c | c name])\r\t\ttitle:\r\t\t\taTitle! !\rBasicClassOrganizer subclass: #ClassOrganizer\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Classes'!\r!ClassOrganizer commentStamp: 'NS 4/6/2004 16:13' prior: 0!\rI represent method categorization information for classes.  The handling of class comments has gone through a tortuous evolution.   Grandfathered class comments (before late aug 98) have no time stamps, and historically, fileouts of class comments always substituted the timestamp reflecting the author and date/time at the moment of fileout; and historically any timestamps in a filed out class comment were dropped on the floor, with the author & time prevailing at the moment of filein being substituted.   Such grandfathered comments now go out on fileouts with '<historical>' timestamp; class comments created after the 8/98 changes will have their correct timestamps preserved, though there is not yet a decent ui for reading those stamps other than filing out and looking at the file; nor is there yet any ui for browsing and recovering past versions of such comments.  Everything in good time!!!\r\r\r!ClassOrganizer methodsFor: 'private' stamp: 'NS 4/7/2004 10:15'!\rnotifyOfChangedCategoriesFrom: oldCollectionOrNil to: newCollectionOrNil\r\t(self hasSubject and: [oldCollectionOrNil ~= newCollectionOrNil]) \r\t\tifTrue: [SystemChangeNotifier uniqueInstance classReorganized: self subject].! !\r\r!ClassOrganizer methodsFor: 'private' stamp: 'NS 4/7/2004 23:02'!\rnotifyOfChangedCategoryFrom: oldNameOrNil to: newNameOrNil\r\t(self hasSubject and: [oldNameOrNil ~= newNameOrNil]) \r\t\tifTrue: [SystemChangeNotifier uniqueInstance classReorganized: self subject].! !\r\r!ClassOrganizer methodsFor: 'private' stamp: 'NS 4/7/2004 22:52'!\rnotifyOfChangedSelector: element from: oldCategory to: newCategory\r\t(self hasSubject and: [(oldCategory ~= newCategory)]) ifTrue: [\r\t\tSystemChangeNotifier uniqueInstance selector: element recategorizedFrom: oldCategory to: newCategory inClass: self subject\r\t].! !\r\r!ClassOrganizer methodsFor: 'private' stamp: 'NS 4/12/2004 20:56'!\rnotifyOfChangedSelectorsOldDict: oldDictionaryOrNil newDict: newDictionaryOrNil\r\t| newCat |\r\t(oldDictionaryOrNil isNil and: [newDictionaryOrNil isNil])\r\t\tifTrue: [^ self].\r\t\t\r\toldDictionaryOrNil isNil ifTrue: [\r\tnewDictionaryOrNil keysAndValuesDo: [:el :cat |\r\t\tself notifyOfChangedSelector: el from: nil to: cat].\r\t\t^ self.\r\t].\r\r\tnewDictionaryOrNil isNil ifTrue: [\r\toldDictionaryOrNil keysAndValuesDo: [:el :cat |\r\t\tself notifyOfChangedSelector: el from: cat to: nil].\r\t\t^ self.\r\t].\r\t\t\r\toldDictionaryOrNil keysAndValuesDo: [:el :cat |\r\t\tnewCat _ newDictionaryOrNil at: el.\r\t\tself notifyOfChangedSelector: el from: cat to: newCat.\r\t].! !\r\r\r!ClassOrganizer methodsFor: 'accessing' stamp: 'NS 4/7/2004 10:37'!\raddCategory: catString before: nextCategory\r\t| oldCategories |\r\toldCategories _ self categories copy.\r\tSystemChangeNotifier uniqueInstance doSilently: [\r\t\tsuper addCategory: catString before: nextCategory].\r\tself notifyOfChangedCategoriesFrom: oldCategories to: self categories.! !\r\r!ClassOrganizer methodsFor: 'accessing' stamp: 'NS 4/15/2004 12:28'!\rchangeFromCategorySpecs: categorySpecs\r\t| oldDict oldCategories |\r\toldDict _ self elementCategoryDict.\r\toldCategories _ self categories copy.\r\tSystemChangeNotifier uniqueInstance doSilently: [\r\t\tsuper changeFromCategorySpecs: categorySpecs].\r\tself notifyOfChangedSelectorsOldDict: oldDict newDict: self elementCategoryDict.\r\tself notifyOfChangedCategoriesFrom: oldCategories to: self categories.! !\r\r!ClassOrganizer methodsFor: 'accessing' stamp: 'NS 4/7/2004 10:37'!\rclassify: element under: heading suppressIfDefault: aBoolean\r\t| oldCat newCat |\r\toldCat _ self categoryOfElement: element.\r\tSystemChangeNotifier uniqueInstance doSilently: [\r\t\tsuper classify: element under: heading suppressIfDefault: aBoolean].\r\tnewCat _ self categoryOfElement: element.\r\tself notifyOfChangedSelector: element from: oldCat to: newCat.! !\r\r!ClassOrganizer methodsFor: 'accessing' stamp: 'NS 4/7/2004 10:37'!\rremoveCategory: cat \r\t| oldCategories |\r\toldCategories _ self categories copy.\r\tSystemChangeNotifier uniqueInstance doSilently: [\r\t\tsuper removeCategory: cat].\r\tself notifyOfChangedCategoriesFrom: oldCategories to: self categories.! !\r\r!ClassOrganizer methodsFor: 'accessing' stamp: 'NS 4/7/2004 10:37'!\rremoveElement: element\r\t| oldCat |\r\toldCat _ self categoryOfElement: element.\r\tSystemChangeNotifier uniqueInstance doSilently: [\r\t\tsuper removeElement: element].\r\tself notifyOfChangedSelector: element from: oldCat to: (self categoryOfElement: element).! !\r\r!ClassOrganizer methodsFor: 'accessing' stamp: 'NS 4/7/2004 10:38'!\rremoveEmptyCategories\r\t| oldCategories |\r\toldCategories _ self categories copy.\r\tSystemChangeNotifier uniqueInstance doSilently: [\r\t\tsuper removeEmptyCategories].\r\tself notifyOfChangedCategoriesFrom: oldCategories to: self categories.! !\r\r!ClassOrganizer methodsFor: 'accessing' stamp: 'NS 4/7/2004 10:38'!\rrenameCategory: oldCatString toBe: newCatString\r\t| oldCat newCat oldElementsBefore oldElementsAfter |\r\toldCat _ oldCatString asSymbol.\r\tnewCat _ newCatString asSymbol.\r\toldElementsBefore _ self listAtCategoryNamed: oldCat.\r\tSystemChangeNotifier uniqueInstance doSilently: [\r\t\tsuper renameCategory: oldCatString toBe: newCatString].\r\toldElementsAfter _ (self listAtCategoryNamed: oldCat) asSet.\r\toldElementsBefore do: [:each |\r\t\t(oldElementsAfter includes: each)\r\t\t\tifFalse: [self notifyOfChangedSelector: each from: oldCat to: newCat].\r\t].\r\tself notifyOfChangedCategoryFrom: oldCat to: newCat.! !\r\r!ClassOrganizer methodsFor: 'accessing' stamp: 'NS 4/12/2004 20:57'!\rsetDefaultList: aSortedCollection\r\t| oldDict oldCategories |\r\toldDict _ self elementCategoryDict.\r\toldCategories _ self categories copy.\r\tSystemChangeNotifier uniqueInstance doSilently: [\r\t\tsuper setDefaultList: aSortedCollection].\r\tself notifyOfChangedSelectorsOldDict: oldDict newDict: self elementCategoryDict.\r\tself notifyOfChangedCategoriesFrom: oldCategories to: self categories.! !\r\r!ClassOrganizer methodsFor: 'accessing' stamp: 'NS 4/7/2004 10:38'!\rsortCategories\r\t| oldCategories |\r\toldCategories _ self categories copy.\r\tSystemChangeNotifier uniqueInstance doSilently: [\r\t\tsuper sortCategories].\r\tself notifyOfChangedCategoriesFrom: oldCategories to: self categories.! !\r\r\r!ClassOrganizer methodsFor: 'updating' stamp: 'BG 10/31/2003 20:44'!\rupdateFor: aClass\r\r  | stream selector changed |\r changed := false.\r stream := ReadStream on: elementArray copy.\r [stream atEnd]\r   whileFalse:\r     [selector := stream next.\r      (aClass methodDictionary includesKey: selector)\r         ifFalse: [self removeElement: selector.\r                   changed := true].\r     ].\r  changed ifTrue: [self removeEmptyCategories.]! !\rObject subclass: #Clipboard\r\tinstanceVariableNames: 'contents recent'\r\tclassVariableNames: 'Default'\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-ST80 Remnants'!\r!Clipboard commentStamp: '<historical>' prior: 0!\rThe Clipboard class implements a basic buffering scheme for text. The currently selected text is also exported to the OS so that text can be copied from and to other applications. Commonly only a single instance is used (the default clipboard) but applications are free to use other than the default clipboard if necessary.!\r\r\r!Clipboard methodsFor: 'initialize' stamp: 'ar 1/15/2001 18:34'!\rinitialize\r\tcontents _ '' asText.\r\trecent _ OrderedCollection new.! !\r\r\r!Clipboard methodsFor: 'accessing' stamp: 'ar 1/15/2001 18:32'!\rchooseRecentClipping  \"Clipboard chooseRecentClipping\"\r\t\"Choose by menu from among the recent clippings\"\r\r\trecent ifNil: [^ nil].\r\t^ (SelectionMenu\r\t\tlabelList: (recent collect: [:txt | ((txt asString contractTo: 50)\r\t\t\t\t\t\t\t\t\tcopyReplaceAll: Character cr asString with: '\\')\r\t\t\t\t\t\t\t\t\tcopyReplaceAll: Character tab asString with: '|'])\r\t\tselections: recent) startUp.\r\r! !\r\r!Clipboard methodsFor: 'accessing' stamp: 'RAA 2/6/2001 11:18'!\rclipboardText\r\t\"Return the text currently in the clipboard. If the system clipboard is empty, or if it differs from the Smalltalk clipboard text, use the Smalltalk clipboard. This is done since (a) the Mac clipboard gives up on very large chunks of text and (b) since not all platforms support the notion of a clipboard.\"\r\r\t| s |\r\ts _ self primitiveClipboardText.\r\t(s isEmpty or: [s = contents asString])\r\t\tifTrue: [^ contents]\r\t\tifFalse: [^ s asText]! !\r\r!Clipboard methodsFor: 'accessing' stamp: 'RAA 2/6/2001 11:21'!\rclipboardText: text\r\t\"Set text currently on the clipboard.  Also export to OS\"\r\tcontents _ text.\r\tself noteRecentClipping: text asText.\r\tself primitiveClipboardText: text asString! !\r\r\r!Clipboard methodsFor: 'primitives' stamp: 'ar 1/15/2001 18:28'!\rprimitiveClipboardText\r\t\"Get the current clipboard text. Return the empty string if the primitive fails.\"\r\t<primitive: 141>\r\t^ ''! !\r\r!Clipboard methodsFor: 'primitives' stamp: 'ar 1/15/2001 18:30'!\rprimitiveClipboardText: aString\r\t\"Set the current clipboard text to the given string.\"\r\r\t<primitive: 141>\r\t\"don't fail if the primitive is not implemented\"! !\r\r\r!Clipboard methodsFor: 'private' stamp: 'ar 1/15/2001 18:34'!\rnoteRecentClipping: text\r\t\"Keep most recent clippings in a queue for pasteRecent (paste... command)\"\r\ttext isEmpty ifTrue: [^ self].\r\ttext size > 50000 ifTrue: [^ self].\r\t(recent includes: text) ifTrue: [^ self].\r\trecent addFirst: text.\r\t[recent size > 5] whileTrue: [recent removeLast].\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rClipboard class\r\tinstanceVariableNames: ''!\r\r!Clipboard class methodsFor: 'accessing' stamp: 'ar 1/15/2001 18:45'!\rchooseRecentClipping  \"Clipboard chooseRecentClipping\"\r\t\"Choose by menu from among the recent clippings\"\r\t^self default chooseRecentClipping! !\r\r!Clipboard class methodsFor: 'accessing' stamp: 'ar 1/15/2001 18:35'!\rclipboardText \"Clipboard clipboardText\"\r\t^self default clipboardText.! !\r\r!Clipboard class methodsFor: 'accessing' stamp: 'ar 1/15/2001 18:35'!\rclipboardText: aText \r\t^self default clipboardText: aText! !\r\r!Clipboard class methodsFor: 'accessing' stamp: 'ar 1/15/2001 18:33'!\rdefault\r\t^Default ifNil:[Default _ self new].! !\r\r!Clipboard class methodsFor: 'accessing' stamp: 'ar 1/15/2001 18:48'!\rdefault: aClipboard\r\t\"So that clients can switch between different default clipboards\"\r\tDefault _ aClipboard.! !\rStringHolder subclass: #CodeHolder\r\tinstanceVariableNames: 'currentCompiledMethod contentsSymbol'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-ST80 Remnants'!\r!CodeHolder commentStamp: '<historical>' prior: 0!\rAn ancestor class for all models which can show code.  Eventually, much of the code that currently resides in StringHolder which only applies to code-holding StringHolders might get moved down here.!\r\r\r!CodeHolder methodsFor: 'annotation' stamp: 'sw 2/22/2001 10:00'!\raddPriorVersionsCountForSelector: aSelector ofClass: aClass to: aStream\r\t\"add an annotation detailing the prior versions count\"\r\t| versionsCount |\r\r\tversionsCount _ VersionsBrowser versionCountForSelector: aSelector class: aClass.\r\taStream nextPutAll: \r\t\t\t\t((versionsCount > 1\r\t\t\t\t\tifTrue:\r\t\t\t\t\t\t[versionsCount == 2 ifTrue:\r\t\t\t\t\t\t\t['1 prior version']\r\t\t\t\t\t\t\tifFalse:\r\t\t\t\t\t\t\t\t[versionsCount printString, ' prior versions']]\r\t\t\t\t\tifFalse:\r\t\t\t\t\t\t['no prior versions']), self annotationSeparator)! !\r\r!CodeHolder methodsFor: 'annotation' stamp: 'sw 1/25/2001 06:40'!\rannotation\r\t\"Provide a line of content for an annotation pane, representing information about the method associated with the selected class and selector in the receiver.\"\r\r\t|  aSelector aClass |\r\r\t((aSelector _ self selectedMessageName) == nil or: [(aClass _ self selectedClassOrMetaClass) == nil])\r\t\tifTrue: [^ '------'].\r\t^ self annotationForSelector: aSelector ofClass: aClass! !\r\r!CodeHolder methodsFor: 'annotation' stamp: 'sw 9/11/2002 21:30'!\rannotationForClassCommentFor: aClass\r\t\"Provide a line of content for an annotation pane, given that the receiver is pointing at the clas comment of the given class.\"\r\r\t| aStamp nonMeta |\r\taStamp _  (nonMeta _ aClass theNonMetaClass) organization commentStamp.\r\t^ aStamp\r\t\tifNil:\r\t\t\t[nonMeta name, ' has no class comment']\r\t\tifNotNil:\r\t\t\t['class comment for ', nonMeta name,\r\t\t\t\t(aStamp = '<historical>'\r\t\t\t\t\tifFalse:\r\t\t\t\t\t\t[' - ', aStamp]\r\t\t\t\t\tifTrue:\r\t\t\t\t\t\t[''])]! !\r\r!CodeHolder methodsFor: 'annotation' stamp: 'sw 8/26/2002 10:19'!\rannotationForClassDefinitionFor: aClass\r\t\"Provide a line of content for an annotation pane, given that the receiver is pointing at the class definition of the given class.\"\r\r\t^ 'Class definition for ', aClass name! !\r\r!CodeHolder methodsFor: 'annotation' stamp: 'sw 8/26/2002 10:19'!\rannotationForHierarchyFor: aClass\r\t\"Provide a line of content for an annotation pane, given that the receiver is pointing at the hierarchy of the given class.\"\r\r\t^ 'Hierarchy for ', aClass name! !\r\r!CodeHolder methodsFor: 'annotation' stamp: 'sd 4/29/2003 11:54'!\rannotationForSelector: aSelector ofClass: aClass \r\t\"Provide a line of content for an annotation pane, representing  \r\tinformation about the given selector and class\"\r\t| stamp sendersCount implementorsCount aCategory separator aString aList aComment aStream requestList |\r\taSelector == #Comment\r\t\tifTrue: [^ self annotationForClassCommentFor: aClass].\r\taSelector == #Definition\r\t\tifTrue: [^ self annotationForClassDefinitionFor: aClass].\r\taSelector == #Hierarchy\r\t\tifTrue: [^ self annotationForHierarchyFor: aClass].\r\taStream _ ReadWriteStream on: ''.\r\trequestList _ self annotationRequests.\r\tseparator _ requestList size > 1\r\t\t\t\tifTrue: [self annotationSeparator]\r\t\t\t\tifFalse: [''].\r\trequestList\r\t\tdo: [:aRequest | \r\t\t\taRequest == #firstComment\r\t\t\t\tifTrue: [aComment _ aClass firstCommentAt: aSelector.\r\t\t\t\t\taComment isEmptyOrNil\r\t\t\t\t\t\tifFalse: [aStream nextPutAll: aComment , separator]].\r\t\t\taRequest == #masterComment\r\t\t\t\tifTrue: [aComment _ aClass supermostPrecodeCommentFor: aSelector.\r\t\t\t\t\taComment isEmptyOrNil\r\t\t\t\t\t\tifFalse: [aStream nextPutAll: aComment , separator]].\r\t\t\taRequest == #documentation\r\t\t\t\tifTrue: [aComment _ aClass precodeCommentOrInheritedCommentFor: aSelector.\r\t\t\t\t\taComment isEmptyOrNil\r\t\t\t\t\t\tifFalse: [aStream nextPutAll: aComment , separator]].\r\t\t\taRequest == #timeStamp\r\t\t\t\tifTrue: [stamp _ self timeStamp.\r\t\t\t\t\taStream\r\t\t\t\t\t\tnextPutAll: (stamp size > 0\r\t\t\t\t\t\t\t\tifTrue: [stamp , separator]\r\t\t\t\t\t\t\t\tifFalse: ['no timeStamp' , separator])].\r\t\t\taRequest == #messageCategory\r\t\t\t\tifTrue: [aCategory _ aClass organization categoryOfElement: aSelector.\r\t\t\t\t\taCategory\r\t\t\t\t\t\tifNotNil: [\"woud be nil for a method no longer present,  \r\t\t\t\t\t\t\te.g. in a recent-submissions browser\"\r\t\t\t\t\t\t\taStream nextPutAll: aCategory , separator]].\r\t\t\taRequest == #sendersCount\r\t\t\t\tifTrue: [sendersCount _ (self systemNavigation allCallsOn: aSelector) size.\r\t\t\t\t\tsendersCount _ sendersCount == 1\r\t\t\t\t\t\t\t\tifTrue: ['1 sender']\r\t\t\t\t\t\t\t\tifFalse: [sendersCount printString , ' senders'].\r\t\t\t\t\taStream nextPutAll: sendersCount , separator].\r\t\t\taRequest == #implementorsCount\r\t\t\t\tifTrue: [implementorsCount _ self systemNavigation numberOfImplementorsOf: aSelector.\r\t\t\t\t\timplementorsCount _ implementorsCount == 1\r\t\t\t\t\t\t\t\tifTrue: ['1 implementor']\r\t\t\t\t\t\t\t\tifFalse: [implementorsCount printString , ' implementors'].\r\t\t\t\t\taStream nextPutAll: implementorsCount , separator].\r\t\t\taRequest == #priorVersionsCount\r\t\t\t\tifTrue: [self\r\t\t\t\t\t\taddPriorVersionsCountForSelector: aSelector\r\t\t\t\t\t\tofClass: aClass\r\t\t\t\t\t\tto: aStream].\r\t\t\taRequest == #priorTimeStamp\r\t\t\t\tifTrue: [stamp _ VersionsBrowser\r\t\t\t\t\t\t\t\ttimeStampFor: aSelector\r\t\t\t\t\t\t\t\tclass: aClass\r\t\t\t\t\t\t\t\treverseOrdinal: 2.\r\t\t\t\t\tstamp\r\t\t\t\t\t\tifNotNil: [aStream nextPutAll: 'prior time stamp: ' , stamp , separator]].\r\t\t\taRequest == #recentChangeSet\r\t\t\t\tifTrue: [aString _ ChangeSorter mostRecentChangeSetWithChangeForClass: aClass selector: aSelector.\r\t\t\t\t\taString size > 0\r\t\t\t\t\t\tifTrue: [aStream nextPutAll: aString , separator]].\r\t\t\taRequest == #allChangeSets\r\t\t\t\tifTrue: [aList _ ChangeSorter allChangeSetsWithClass: aClass selector: aSelector.\r\t\t\t\t\taList size > 0\r\t\t\t\t\t\tifTrue: [aList size = 1\r\t\t\t\t\t\t\t\tifTrue: [aStream nextPutAll: 'only in change set ']\r\t\t\t\t\t\t\t\tifFalse: [aStream nextPutAll: 'in change sets: '].\r\t\t\t\t\t\t\taList\r\t\t\t\t\t\t\t\tdo: [:aChangeSet | aStream nextPutAll: aChangeSet name , ' ']]\r\t\t\t\t\t\tifFalse: [aStream nextPutAll: 'in no change set'].\r\t\t\t\t\taStream nextPutAll: separator]].\r\t^ aStream contents! !\r\r!CodeHolder methodsFor: 'annotation' stamp: 'RAA 1/13/2001 07:20'!\rannotationPaneMenu: aMenu shifted: shifted\r\r\t^ aMenu \r\t\tlabels: 'change pane size'\r\t\tlines: #()\r\t\tselections: #(toggleAnnotationPaneSize)! !\r\r!CodeHolder methodsFor: 'annotation' stamp: 'sw 9/27/1999 14:13'!\rannotationRequests\r\t^ Preferences defaultAnnotationRequests! !\r\r!CodeHolder methodsFor: 'annotation' stamp: 'sw 2/22/2001 10:02'!\rannotationSeparator\r\t\"Answer the separator to be used between annotations\"\r\r\t^ '  '! !\r\r!CodeHolder methodsFor: 'annotation' stamp: 'sw 9/28/2001 08:43'!\rdefaultAnnotationPaneHeight\r\t\"Answer the receiver's preferred default height for new annotation panes.\"\r\r\t^ Preferences parameterAt: #defaultAnnotationPaneHeight ifAbsentPut: [25]! !\r\r!CodeHolder methodsFor: 'annotation' stamp: 'sw 9/28/2001 08:44'!\rdefaultButtonPaneHeight\r\t\"Answer the user's preferred default height for new button panes.\"\r\r\t^ Preferences parameterAt: #defaultButtonPaneHeight ifAbsentPut: [25]! !\r\r\r!CodeHolder methodsFor: 'categories' stamp: 'sd 2/1/2004 17:56'!\rcategoryFromUserWithPrompt: aPrompt for: aClass\r\t\"self new categoryFromUserWithPrompt: 'testing' for: SystemDictionary\"\r\r\t|  labels myCategories reject lines cats newName menuIndex |\r\tlabels _ OrderedCollection with: 'new...'.\r\tlabels addAll: (myCategories _ aClass organization categories asSortedCollection:\r\t\t[:a :b | a asLowercase < b asLowercase]).\r\treject _ myCategories asSet.\r\treject\r\t\tadd: ClassOrganizer nullCategory;\r\t\tadd: ClassOrganizer default.\r\tlines _ OrderedCollection with: 1 with: (myCategories size + 1).\r\r\taClass allSuperclasses do:\r\t\t[:cls |\r\t\t\tcats _ cls organization categories reject:\r\t\t\t\t [:cat | reject includes: cat].\r\t\t\tcats isEmpty ifFalse:\r\t\t\t\t[lines add: labels size.\r\t\t\t\tlabels addAll: (cats asSortedCollection:\r\t\t\t\t\t[:a :b | a asLowercase < b asLowercase]).\r\t\t\t\treject addAll: cats]].\r\r\tnewName _ (labels size = 1 or:\r\t\t[menuIndex _ (PopUpMenu labelArray: labels lines: lines)\r\t\tstartUpWithCaption: aPrompt.\r\t\tmenuIndex = 0 ifTrue: [^ nil].\r\t\tmenuIndex = 1])\r\t\t\tifTrue:\r\t\t\t\t[FillInTheBlank request: 'Please type new category name'\r\t\t\t\t\tinitialAnswer: 'category name']\r\t\t\tifFalse: \r\t\t\t\t[labels at: menuIndex].\r\t^ newName ifNotNil: [newName asSymbol]! !\r\r!CodeHolder methodsFor: 'categories' stamp: 'sd 2/1/2004 17:55'!\rcategoryOfCurrentMethod\r\t\"Answer the category that owns the current method.  If unable to determine a category, answer nil.\"\r\r\t| aClass aSelector |\r\t^ (aClass _ self selectedClassOrMetaClass) \r\t\tifNotNil: [(aSelector _ self selectedMessageName) \r\t\t\t            ifNotNil: [aClass whichCategoryIncludesSelector: aSelector]]! !\r\r!CodeHolder methodsFor: 'categories' stamp: 'sd 2/1/2004 17:55'!\rchangeCategory\r\t\"Present a menu of the categories of messages for the current class, \r\tand let the user choose a new category for the current message\"\r\r\t| aClass aSelector |\r\t(aClass _ self selectedClassOrMetaClass) ifNotNil:\r\t\t[(aSelector _ self selectedMessageName) ifNotNil:\r\t\t\t[(self letUserReclassify: aSelector in: aClass) ifTrue:\r\t\t\t\t[\"ChangeSet current reorganizeClass: aClass.\"\r\t\t\t\t\"Decided on further review that the above, when present, could cause more\r                    unexpected harm than good\"\r\t\t\t\tself methodCategoryChanged]]]! !\r\r!CodeHolder methodsFor: 'categories' stamp: 'sd 2/1/2004 17:54'!\rletUserReclassify: anElement in: aClass\r\t\"Put up a list of categories and solicit one from the user.  \r\tAnswer true if user indeed made a change, else false\"\r\t\r\r\t| currentCat newCat |\r\tcurrentCat _ aClass organization categoryOfElement: anElement.\r\tnewCat _ self \r\t\t\t\tcategoryFromUserWithPrompt: 'choose category (currently \"', currentCat, '\")' \r\t\t\t\tfor: aClass.\r\t(newCat ~~ nil and: [newCat ~= currentCat])\r\t\tifTrue:\r\t\t\t[aClass organization classify: anElement under: newCat suppressIfDefault: false.\r\t\t\t^ true]\r\t\tifFalse:\r\t\t\t[^ false]! !\r\r!CodeHolder methodsFor: 'categories' stamp: 'sw 9/27/1999 14:11'!\rmethodCategoryChanged\r\tself changed: #annotation! !\r\r!CodeHolder methodsFor: 'categories' stamp: 'sw 3/22/2000 23:04'!\rselectedMessageCategoryName\r\t\"Answer the name of the message category of the message of the currently selected context.\"\r\r\t^ self selectedClass organization categoryOfElement: self selectedMessageName! !\r\r\r!CodeHolder methodsFor: 'contents' stamp: 'sw 12/11/2000 10:42'!\rcommentContents\r\t\"documentation for the selected method\"\r\r\t| poss aClass aSelector |\r\t^ (poss _ (aClass _ self selectedClassOrMetaClass)\r\t\t\t\t\t\tifNil:\r\t\t\t\t\t\t\t['----']\r\t\t\t\t\t\tifNotNil:\r\t\t\t\t\t\t\t[(aSelector _ self selectedMessageName)\r\t\t\t\t\t\t\t\tifNil:\r\t\t\t\t\t\t\t\t\t['---']\r\t\t\t\t\t\t\t\tifNotNil:\r\t\t\t\t\t\t\t\t\t[(aClass precodeCommentOrInheritedCommentFor: aSelector)\", String cr, String cr, self timeStamp\"\r\"which however misses comments that are between the temps  declaration and the body of the method; those are picked up by aClass commentOrInheritedCommentFor: aSelector but that method will get false positives from comments *anywhere* in the method source\"]])\r\t\tisEmptyOrNil\r\t\t\tifTrue:\r\t\t\t\t[aSelector\r\t\t\t\t\tifNotNil:\r\t\t\t\t\t\t[((aClass methodHeaderFor: aSelector), '\r\rHas no comment') asText makeSelectorBoldIn: aClass]\r\t\t\t\t\tifNil:\r\t\t\t\t\t\t['Hamna']]\r\t\t\tifFalse:\t[aSelector\r\t\t\t\tifNotNil: [((aClass methodHeaderFor: aSelector), '\r\r', poss) asText makeSelectorBoldIn: aClass]\r\t\t\t\tifNil: [poss]]! !\r\r!CodeHolder methodsFor: 'contents' stamp: 'di 10/1/2001 22:25'!\rcontents\r\t\"Answer the source code or documentation for the selected method\"\r\r\tself showingByteCodes ifTrue:\r\t\t[^ self selectedBytecodes].\r\r\tself showingDocumentation ifTrue:\r\t\t[^ self commentContents].\r\r\t^ self selectedMessage! !\r\r!CodeHolder methodsFor: 'contents' stamp: 'rhi 12/3/2001 22:25'!\rcontentsChanged\r\r\tsuper contentsChanged.\r\tself changed: #annotation! !\r\r!CodeHolder methodsFor: 'contents' stamp: 'sw 5/20/2001 10:21'!\rcontentsSymbol\r\t\"Answer a symbol indicating what kind of content should be shown for the method; for normal showing of source code, this symbol is #source.  A nil value in the contentsSymbol slot will be set to #source by this method\"\r\r\t^ contentsSymbol ifNil: [contentsSymbol _ \r\t\tPreferences printAlternateSyntax\r\t\t\tifTrue:\r\t\t\t\t[#altSyntax]\r\t\t\tifFalse:\r\t\t\t\t[Preferences browseWithPrettyPrint\r\t\t\t\t\tifTrue:\r\t\t\t\t\t\t[Preferences colorWhenPrettyPrinting\r\t\t\t\t\t\t\tifTrue:\t[#colorPrint]\r\t\t\t\t\t\t\tifFalse:\t[#prettyPrint]]\r\t\t\t\t\tifFalse:\r\t\t\t\t\t\t[#source]]]! !\r\r!CodeHolder methodsFor: 'contents' stamp: 'sw 11/29/2000 09:51'!\rcontentsSymbol: aSymbol\r\t\"Set the contentsSymbol as indicated.  #source means to show source code, #comment means to show the first comment found in the source code\"\r\r\tcontentsSymbol _ aSymbol! !\r\r\r!CodeHolder methodsFor: 'commands' stamp: 'sw 7/30/2001 16:31'!\rabbreviatedWordingFor: aButtonSelector\r\t\"Answer the abbreviated form of wording, from a static table which you're welcome to edit.  Answer nil if there is no entry -- in which case the long firm will be used on the corresponding browser button.\"\r\r\t#(\r\t(browseMethodFull\t\t\t\t'browse')\r\t(browseSendersOfMessages\t   \t'senders')\r\t(browseMessages\t\t\t\t'impl')\r\t(browseVersions\t\t\t\t\t'vers')\r\t(methodHierarchy\t\t\t\t'inher')\r\t(classHierarchy\t\t\t\t\t'hier')\r\t(browseInstVarRefs\t\t\t\t'iVar')\r\t(browseClassVarRefs\t\t\t\t'cVar')\r\t(offerMenu\t\t\t\t\t\t'menu')) do:\r\r\t\t[:pair | pair first == aButtonSelector ifTrue: [^ pair second]].\r\t^ nil! !\r\r!CodeHolder methodsFor: 'commands' stamp: 'sd 5/23/2003 14:35'!\radoptMessageInCurrentChangeset\r\t\"Add the receiver's method to the current change set if not already there\"\r\r\tself setClassAndSelectorIn: [:cl :sel |\r\t\tcl ifNotNil:\r\t\t\t[ChangeSet current adoptSelector: sel forClass: cl.\r\t\t\tself changed: #annotation]]\r! !\r\r!CodeHolder methodsFor: 'commands' stamp: 'sd 4/16/2003 09:33'!\rbrowseImplementors\r\t\"Create and schedule a message set browser on all implementors of the currently selected message selector. Do nothing if no message is selected.\"\r\r\t| aMessageName |\r\t(aMessageName _ self selectedMessageName) ifNotNil: \r\t\t[self systemNavigation browseAllImplementorsOf: aMessageName]! !\r\r!CodeHolder methodsFor: 'commands' stamp: 'nk 6/26/2003 21:43'!\rbrowseSenders\r\t\"Create and schedule a message set browser on all senders of the currently selected message selector.  Of there is no message currently selected, offer a type-in\"\r\r\tself sendQuery: #browseAllCallsOn: to: self systemNavigation! !\r\r!CodeHolder methodsFor: 'commands' stamp: 'BG 10/28/2003 20:51'!\rcopyUpOrCopyDown\r\t\"Used to copy down code from a superclass to a subclass or vice-versa in one easy step, if you know what you're doing.  Prompt the user for which class to copy down or copy up to, then spawn a fresh browser for that class, with the existing code planted in it, and with the existing method category also established.\"\r\r\t| |\r\tSmalltalk isMorphic ifFalse: [^ self inform: \r'Sorry, for the moment you have to be in\rMorphic to use this feature.'].! !\r\r!CodeHolder methodsFor: 'commands' stamp: 'BG 10/28/2003 20:51'!\rmakeSampleInstance\r\t| aClass nonMetaClass anInstance |\r\t(aClass _ self selectedClassOrMetaClass) ifNil: [^ self].\r\tnonMetaClass _ aClass theNonMetaClass.\r\tanInstance _ self sampleInstanceOfSelectedClass.\r\t(anInstance isNil and: [nonMetaClass ~~ UndefinedObject]) ifTrue: \r\t\t[^ self inform: 'Sorry, cannot make an instance of ', nonMetaClass name].\r\r\t(Smalltalk isMorphic and: [anInstance isMorph])\r\t\tifTrue:\r\t\t\t[]\r\t\tifFalse:\r\t\t\t[anInstance inspectWithLabel: 'An instance of ', nonMetaClass name]! !\r\r!CodeHolder methodsFor: 'commands' stamp: 'sw 5/18/2001 17:51'!\rofferMenu\r\t\"Offer a menu to the user from the bar of tool buttons\"\r\r\tself offerDurableMenuFrom: #messageListMenu:shifted: shifted: false! !\r\r!CodeHolder methodsFor: 'commands' stamp: 'sw 2/27/2001 12:14'!\rofferShiftedClassListMenu\r\t\"Offer the shifted class-list menu.\"\r\r\t^ self offerMenuFrom: #classListMenu:shifted: shifted: true! !\r\r!CodeHolder methodsFor: 'commands' stamp: 'sw 2/27/2001 12:15'!\rofferUnshiftedClassListMenu\r\t\"Offer the shifted class-list menu.\"\r\r\t^ self offerMenuFrom: #classListMenu:shifted: shifted: false! !\r\r!CodeHolder methodsFor: 'commands' stamp: 'nb 6/17/2003 12:25'!\rremoveClass\r\t\"Remove the selected class from the system, at interactive user request.  Make certain the user really wants to do this, since it is not reversible.  Answer true if removal actually happened.\"\r\r\t| message  className classToRemove result |\r\tself okToChange ifFalse: [^ false].\r\tclassToRemove _ self selectedClassOrMetaClass ifNil: [Beeper beep. ^ false].\r\tclassToRemove _ classToRemove theNonMetaClass.\r\tclassName _ classToRemove name.\r\tmessage _ 'Are you certain that you\rwant to REMOVE the class ', className, '\rfrom the system?'.\r\t(result _ self confirm: message)\r\t\tifTrue: \r\t\t\t[classToRemove subclasses size > 0\r\t\t\t\tifTrue: [(self confirm: 'class has subclasses: ' , message)\r\t\t\t\t\tifFalse: [^ false]].\r\t\t\tclassToRemove removeFromSystem.\r\t\t\tself changed: #classList.\r\t\t\ttrue].\r\t^ result! !\r\r!CodeHolder methodsFor: 'commands' stamp: 'sw 3/6/2001 15:18'!\rshiftedYellowButtonActivity\r\t\"Offer the shifted selector-list menu\"\r\r\t^ self offerMenuFrom: #messageListMenu:shifted: shifted: true! !\r\r!CodeHolder methodsFor: 'commands' stamp: 'sd 4/29/2003 13:09'!\rshowUnreferencedClassVars\r\t\"Search for all class variables known to the selected class, and put up a \r\tlist of those that have no references anywhere in the system. The \r\tsearch includes superclasses, so that you don't need to navigate your \r\tway to the class that defines each class variable in order to determine \r\twhether it is unreferenced\"\r\t| cls aList aReport |\r\t(cls _ self selectedClass)\r\t\tifNil: [^ self].\r\taList _ self systemNavigation allUnreferencedClassVariablesOf: cls.\r\taList size == 0\r\t\tifTrue: [^ self inform: 'There are no unreferenced\rclass variables in\r' , cls name].\r\taReport _ String\r\t\t\t\tstreamContents: [:aStream | \r\t\t\t\t\taStream nextPutAll: 'Unreferenced class variable(s) in ' , cls name;\r\t\t\t\t\t\t cr.\r\t\t\t\t\taList\r\t\t\t\t\t\tdo: [:el | aStream tab; nextPutAll: el; cr]].\r\tTranscript cr; show: aReport.\r\t(SelectionMenu labels: aList selections: aList)\r\t\tstartUpWithCaption: 'Unreferenced\rclass variables in \r' , cls name! !\r\r!CodeHolder methodsFor: 'commands' stamp: 'sw 9/26/2001 01:55'!\rshowUnreferencedInstVars\r\t\"Search for all instance variables known to the selected class, and put up a list of those that have no references anywhere in the system.  The search includes superclasses, so that you don't need to navigate your way to the class that defines each inst variable in order to determine whether it is unreferenced\"\r\r\t| cls aList aReport |\r\t(cls _ self selectedClassOrMetaClass) ifNil: [^ self].\r\taList _ cls allUnreferencedInstanceVariables.\r\taList size == 0 ifTrue: [^ self inform: 'There are no unreferenced\rinstance variables in\r', cls name].\r\taReport _ String streamContents:\r\t\t[:aStream |\r\t\t\taStream nextPutAll: 'Unreferenced instance variable(s) in ', cls name; cr.\r\t\t\taList do: [:el | aStream tab; nextPutAll: el; cr]].\r\tTranscript cr; show: aReport.\r\t(SelectionMenu labels: aList selections: aList) startUpWithCaption: 'Unreferenced\rinstance variables in \r', cls name! !\r\r!CodeHolder methodsFor: 'commands' stamp: 'sw 2/22/2001 06:38'!\rspawn: aString \r\t\"Create and schedule a spawned message category browser for the currently selected message category.  The initial text view contains the characters in aString.  In the spawned browser, preselect the current selector (if any) as the going-in assumption, though upon acceptance this will often change\"\r\r\t| newBrowser aCategory aClass |\r\t(aClass _ self selectedClassOrMetaClass) isNil ifTrue:\r\t\t[^ aString isEmptyOrNil ifFalse: [(Workspace new contents: aString) openLabel: 'spawned workspace']].\r\r\t(aCategory _ self categoryOfCurrentMethod)\r\t\tifNil:\r\t\t\t[self buildClassBrowserEditString: aString]\r\t\tifNotNil:\r\t\t\t[newBrowser _ Browser new setClass: aClass selector: self selectedMessageName.\r\t\t\tself suggestCategoryToSpawnedBrowser: newBrowser.\r\t\t\tBrowser openBrowserView: (newBrowser openMessageCatEditString: aString)\r\t\tlabel: 'category \"', aCategory, '\" in ', \r\t\t\t\tnewBrowser selectedClassOrMetaClassName]! !\r\r!CodeHolder methodsFor: 'commands' stamp: 'sw 12/4/2000 12:07'!\rspawnFullProtocol\r\t\"Create and schedule a new protocol browser on the currently selected class or meta.\"\r\r\t| aClassOrMetaclass |\r\t(aClassOrMetaclass _ self selectedClassOrMetaClass) ifNotNil:\r       \t[ProtocolBrowser openFullProtocolForClass: aClassOrMetaclass]! !\r\r!CodeHolder methodsFor: 'commands' stamp: 'BG 10/28/2003 20:52'!\rspawnHierarchy\r\t\"Create and schedule a new hierarchy browser on the currently selected class or meta.\"\r\r\t| newBrowser aSymbol aBehavior messageCatIndex selectedClassOrMetaClass |\r\t(selectedClassOrMetaClass _ self selectedClassOrMetaClass)\r\t\tifNil: [^ self].\r\tnewBrowser _ HierarchyBrowser new initHierarchyForClass: selectedClassOrMetaClass.\r\t((aSymbol _ self selectedMessageName) notNil and: [(MessageSet isPseudoSelector: aSymbol) not])\r\t\tifTrue:\r\t\t\t[aBehavior _ selectedClassOrMetaClass.\r\t\t\tmessageCatIndex _ aBehavior organization numberOfCategoryOfElement: aSymbol.\r\t\t\tnewBrowser messageCategoryListIndex: messageCatIndex + 1.\r\t\t\tnewBrowser messageListIndex:\r\t\t\t\t((aBehavior organization listAtCategoryNumber: messageCatIndex) indexOf: aSymbol)].\r\tBrowser\r\t\topenBrowserView: (newBrowser openSystemCatEditString: nil)\r\t\tlabel: newBrowser labelString.\r\t! !\r\r!CodeHolder methodsFor: 'commands' stamp: 'sw 5/8/2000 14:24'!\rspawnProtocol\r\t| aClassOrMetaclass |\r\t\"Create and schedule a new protocol browser on the currently selected class or meta.\"\r\t(aClassOrMetaclass _ self selectedClassOrMetaClass) ifNotNil:\r       \t[ProtocolBrowser openSubProtocolForClass: aClassOrMetaclass]! !\r\r!CodeHolder methodsFor: 'commands' stamp: 'sw 3/20/2001 15:10'!\rspawnToClass: aClass\r\t\"Used to copy down code from a superclass to a subclass in one easy step, if you know what you're doing.  Spawns a new message-category browser for the indicated class, populating it with the source code seen in the current tool.\"\r\r\t| aCategory newBrowser org |\t\r\t(aCategory _ self categoryOfCurrentMethod)\r\t\tifNil:\r\t\t\t[self buildClassBrowserEditString: self contents]\r\t\tifNotNil:\r\t\t\t[((org _ aClass organization) categories includes: aCategory)\r\t\t\t\tifFalse:\t[org addCategory: aCategory].\r\t\t\tnewBrowser _ Browser new setClass: aClass selector: nil.\r\t\t\tnewBrowser selectMessageCategoryNamed: aCategory.\r\t\t\tBrowser openBrowserView: (newBrowser openMessageCatEditString: self contents)\r\t\tlabel: 'category \"', aCategory, '\" in ', \r\t\t\t\tnewBrowser selectedClassOrMetaClassName]! !\r\r!CodeHolder methodsFor: 'commands' stamp: 'sw 3/20/2001 15:11'!\rspawnToCollidingClass: aClass\r\t\"Potentially used to copy down code from a superclass to a subclass in one easy step, in the case where the given class already has its own version of code, which would consequently be clobbered if the spawned code were accepted.\"\r\r\tself inform: 'That would be destructive of\rsome pre-existing code already in that\rclass for this selector.  For the moment,\rwe will not let you do this to yourself.'! !\r\r!CodeHolder methodsFor: 'commands' stamp: 'sw 3/6/2001 15:19'!\runshiftedYellowButtonActivity\r\t\"Offer the unshifted shifted selector-list menu\"\r\r\t^ self offerMenuFrom: #messageListMenu:shifted: shifted: false! !\r\r\r!CodeHolder methodsFor: 'construction' stamp: 'sw 1/4/2001 12:34'!\rbuildClassBrowserEditString: aString \r\t\"Create and schedule a new class browser for the current selection, with initial textual contents set to aString.  This is used specifically in spawning where a class is established but a method-category is not.\"\r\r\t| newBrowser  |\r\tnewBrowser _ Browser new.\r\tnewBrowser setClass: self selectedClassOrMetaClass selector: nil.\r\tnewBrowser editSelection: #newMessage.\r\tBrowser openBrowserView: (newBrowser openOnClassWithEditString: aString)\r\t\t\tlabel: 'Class Browser: ', self selectedClassOrMetaClass name\r! !\r\r\r!CodeHolder methodsFor: 'controls' stamp: 'BG 10/29/2003 09:43'!\rbuttonWithSelector: aSelector\r\t\"If receiver has a control button with the given action selector answer it, else answer nil.  morphic only at this point\"\r\r\t^nil! !\r\r!CodeHolder methodsFor: 'controls' stamp: 'sw 5/19/2001 01:12'!\rcodePaneProvenanceString\r\t\"Answer a string that reports on code-pane-provenance\"\r\r\t| symsAndWordings |\r\t(symsAndWordings _ self contentsSymbolQuints) do:\r\t\t[:aQuad |\r\t\t\tcontentsSymbol == aQuad first ifTrue: [^ aQuad fourth]].\r\t^ symsAndWordings first fourth \"default to plain source, for example if nil as initially\"! !\r\r!CodeHolder methodsFor: 'controls' stamp: 'sw 11/13/2001 07:48'!\rcontentsSymbolQuints\r\t\"Answer a list of quintuplets representing information on the alternative views available in the code pane\r\t\tfirst element:\tthe contentsSymbol used\r\t\tsecond element:\tthe selector to call when this item is chosen.\r\t\tthird element:\tthe selector to call to obtain the wording of the menu item.\r\t\tfourth element:\tthe wording to represent this view\r\t\tfifth element:\tballoon help\r\tA hypen indicates a need for a seperator line in a menu of such choices\"\r\r\t^ #(\r(source\t\t\ttogglePlainSource \t\t\tshowingPlainSourceString\t'source'\t\t'the textual source code as writen')\r(documentation\ttoggleShowDocumentation\tshowingDocumentationString\t'documentation'\t\t'the first comment in the method')\r-\r(prettyPrint\t\ttogglePrettyPrint \t\t\tprettyPrintString\t\t\t'prettyPrint'\t\t\t'the method source presented in a standard text format')\r(colorPrint\t\ttoggleColorPrint\t\t\t\tcolorPrintString\t\t\t\t'colorPrint'\t\t\t'the method source in a standard text format with colors to distinguish structural parts') \r(altSyntax\t\ttoggleAltSyntax\t\t\t\tshowingAltSyntaxString\t\t'altSyntax'\t\t\t'alternative syntax')\r-\r(showDiffs\t\ttoggleRegularDiffing\t\tshowingRegularDiffsString\t'showDiffs'\t\t\t\t'the textual source diffed from its prior version')\r(prettyDiffs\t\ttogglePrettyDiffing\t\t\tshowingPrettyDiffsString\t'prettyDiffs'\t\t'formatted textual source diffed from formatted form of prior version')\r-\r(decompile\t\ttoggleDecompile\t\t\t\tshowingDecompileString\t\t'decompile'\t\t\t'source code decompiled from byteCodes')\r(byteCodes\t\ttoggleShowingByteCodes\t\tshowingByteCodesString\t\t'byteCodes'\t\t\t'the bytecodes that comprise the compiled method')\r-\r(tiles\t\t\ttoggleShowingTiles \t\t\tshowingTilesString\t\t\t'tiles'\t\t\t\t'universal tiles representing the method'))! !\r\r!CodeHolder methodsFor: 'controls' stamp: 'sw 1/5/2001 07:19'!\rdecorateButtons\r\t\"Change screen feedback for any buttons in the UI of the receiver that may wish it.  Initially, it is only the Inheritance button that is decorated, but one can imagine others.\"\r\r\tself decorateForInheritance ! !\r\r!CodeHolder methodsFor: 'controls' stamp: 'nk 7/6/2003 08:29'!\rdecorateForInheritance\r\t\"Check to see if the currently-viewed method has a super send or an override, and if so, change screen feedback, unless the #decorateBrowserButtons says not to.\"\r\r\t| aColor aButton flags |\r\t(aButton _ self inheritanceButton) ifNil: [^ self].\r\r\t((currentCompiledMethod isKindOf: CompiledMethod) and: [Preferences decorateBrowserButtons])\r\t\tifFalse: [^aButton offColor: Color transparent].\r\r\t\"This table duplicates the old logic, but adds two new colors for the cases where there is a superclass definition, but this method doesn't call it.\"\r\r\tflags _ 0.\r\tself isThisAnOverride ifTrue: [ flags _ flags bitOr: 4 ].\r\tcurrentCompiledMethod sendsToSuper ifTrue: [ flags _ flags bitOr: 2 ].\r\tself isThereAnOverride ifTrue: [ flags _ flags bitOr: 1 ].\r\taColor _ {\r\t\tColor transparent.\r\t\tColor tan lighter.\r\t\tColor green muchLighter.\r\t\tColor blue muchLighter.\r\t\tColor red muchLighter.\t\"has super but doesn't call it\"\r\t\t(Color r: 0.94 g: 0.823 b: 0.673).\t\"has sub; has super but doesn't call it\"\r\t\tColor green muchLighter.\r\t\tColor blue muchLighter.\r\t} at: flags + 1.\r\r\taButton offColor: aColor! !\r\r!CodeHolder methodsFor: 'controls' stamp: 'sw 1/25/2001 14:44'!\rinheritanceButton\r\t\"If receiver has an Inheritance button, answer it, else answer nil.  morphic only at this point\"\r\r\t^ self buttonWithSelector: #methodHierarchy! !\r\r!CodeHolder methodsFor: 'controls' stamp: 'nk 7/7/2003 11:39'!\roptionalButtonPairs\r\t\"Answer a tuple (formerly pairs) defining buttons, in the format:\r\t\t\tbutton label\r\t\t\tselector to send\r\t\t\thelp message\"\r\r\t| aList |\r\r\taList _ #(\r\t('browse'\t\t\tbrowseMethodFull\t\t\t'view this method in a browser')\r\t('senders' \t\t\tbrowseSendersOfMessages\t'browse senders of...')\r\t('implementors'\t\tbrowseMessages\t\t\t\t'browse implementors of...')\r\t('versions'\t\t\tbrowseVersions\t\t\t\t'browse versions')), \r\r\t(Preferences decorateBrowserButtons\r\t\tifTrue:\r\t\t\t[{#('inheritance'\t\tmethodHierarchy 'browse method inheritance\rgreen: sends to super\rtan: has override(s)\rmauve: both of the above\rpink: is an override but doesn''t call super\rpinkish tan: has override(s), also is an override but doesn''t call super' )}]\r\t\tifFalse:\r\t\t\t[{#('inheritance'\t\tmethodHierarchy\t\t\t'browse method inheritance')}]),\r\r\t#(\r\t('hierarchy'\t\tclassHierarchy\t\t\t\t'browse class hierarchy')\r\t('inst vars'\t\t\tbrowseInstVarRefs\t\t\t'inst var refs...')\r\t('class vars'\t\t\tbrowseClassVarRefs\t\t\t'class var refs...')).\r\r\t^ aList! !\r\r!CodeHolder methodsFor: 'controls' stamp: 'sw 11/13/2001 09:12'!\rsourceAndDiffsQuintsOnly\r\t\"Answer a list of quintuplets representing information on the alternative views available in the code pane for the case where the only plausible choices are showing source or either of the two kinds of diffs\"\r\r\t^ #(\r(source\t\t\ttogglePlainSource \t\tshowingPlainSourceString\t'source'\t\t\t'the textual source code as writen')\r(showDiffs\t\ttoggleRegularDiffing\tshowingRegularDiffsString\t'showDiffs'\t\t'the textual source diffed from its prior version')\r(prettyDiffs\t\ttogglePrettyDiffing\t\tshowingPrettyDiffsString\t'prettyDiffs'\t\t'formatted textual source diffed from formatted form of prior version'))! !\r\r\r!CodeHolder methodsFor: 'diffs' stamp: 'sw 9/5/2001 13:36'!\rdefaultDiffsSymbol\r\t\"Answer the code symbol to use when generically switching to diffing\"\r\r\t^ Preferences diffsWithPrettyPrint \r\t\tifTrue:\r\t\t\t[#prettyDiffs]\r\t\tifFalse:\r\t\t\t[#showDiffs]! !\r\r!CodeHolder methodsFor: 'diffs' stamp: 'sw 5/20/2001 21:14'!\rdiffFromPriorSourceFor: sourceCode \r\t\"If there is a prior version of source for the selected method, return a diff, else just return the source code\"\r\r\t| prior |\r\t^ (prior _ self priorSourceOrNil)\r\t\tifNil: [sourceCode]\r\t\tifNotNil: [TextDiffBuilder buildDisplayPatchFrom: prior to: sourceCode inClass: self selectedClass prettyDiffs: self showingPrettyDiffs]! !\r\r!CodeHolder methodsFor: 'diffs' stamp: 'BG 10/29/2003 07:56'!\rrestoreTextualCodingPane\r\t\"If the receiver is showing tiles, restore the textual coding pane\"\r\r\tcontentsSymbol _ #source.! !\r\r!CodeHolder methodsFor: 'diffs' stamp: 'sw 11/13/2001 07:49'!\rshowDiffs\r\t\"Answer whether the receiver is showing diffs of source code.  The preferred protocol here is #showingRegularDiffs, but this message is still sent by some preexisting buttons so is retained.\"\r\r\t^ contentsSymbol == #showDiffs\r! !\r\r!CodeHolder methodsFor: 'diffs' stamp: 'sw 9/5/2001 13:36'!\rshowDiffs: aBoolean\r\t\"Set whether I'm showing diffs as indicated; use the global preference to determine which kind of diffs to institute.\"\r\r\tself showingAnyKindOfDiffs\r\t\tifFalse:\r\t\t\t[aBoolean ifTrue:\r\t\t\t\t[contentsSymbol _ self defaultDiffsSymbol]]\r\t\tifTrue:\r\t\t\t[aBoolean ifFalse:\r\t\t\t\t[contentsSymbol _ #source]].\r\tself setContentsToForceRefetch.\r\tself contentsChanged! !\r\r!CodeHolder methodsFor: 'diffs' stamp: 'sw 5/22/2001 18:25'!\rshowPrettyDiffs: aBoolean\r\t\"Set whether I'm showing pretty diffs as indicated\"\r\r\tself showingPrettyDiffs\r\t\tifFalse:\r\t\t\t[aBoolean ifTrue:\r\t\t\t\t[contentsSymbol _ #prettyDiffs]]\r\t\tifTrue:\r\t\t\t[aBoolean ifFalse:\r\t\t\t\t[contentsSymbol _ #source]].\r\tself setContentsToForceRefetch.\r\tself contentsChanged! !\r\r!CodeHolder methodsFor: 'diffs' stamp: 'sw 11/13/2001 07:50'!\rshowRegularDiffs: aBoolean\r\t\"Set whether I'm showing regular diffs as indicated\"\r\r\tself showingRegularDiffs\r\t\tifFalse:\r\t\t\t[aBoolean ifTrue:\r\t\t\t\t[contentsSymbol _ #showDiffs]]\r\t\tifTrue:\r\t\t\t[aBoolean ifFalse:\r\t\t\t\t[contentsSymbol _ #source]].\r\tself setContentsToForceRefetch.\r\tself contentsChanged! !\r\r!CodeHolder methodsFor: 'diffs' stamp: 'sw 9/5/2001 13:32'!\rshowingAnyKindOfDiffs\r\t\"Answer whether the receiver is currently set to show any kind of diffs\"\r\r\t^ #(showDiffs prettyDiffs) includes: contentsSymbol! !\r\r!CodeHolder methodsFor: 'diffs' stamp: 'sw 11/13/2001 09:10'!\rshowingDiffsString\r\t\"Answer a string representing whether I'm showing diffs.  Not sent any more but retained so that prexisting buttons that sent this will not raise errors.\"\r\r\t^ (self showingRegularDiffs\r\t\tifTrue:\r\t\t\t['<yes>']\r\t\tifFalse:\r\t\t\t['<no>']), 'showDiffs'! !\r\r!CodeHolder methodsFor: 'diffs' stamp: 'sw 5/19/2001 00:07'!\rshowingPrettyDiffs\r\t\"Answer whether the receiver is showing pretty diffs of source code\"\r\r\t^ contentsSymbol == #prettyDiffs\r! !\r\r!CodeHolder methodsFor: 'diffs' stamp: 'sw 5/22/2001 16:41'!\rshowingPrettyDiffsString\r\t\"Answer a string representing whether I'm showing pretty diffs\"\r\r\t^ (self showingPrettyDiffs\r\t\tifTrue:\r\t\t\t['<yes>']\r\t\tifFalse:\r\t\t\t['<no>']), 'prettyDiffs'! !\r\r!CodeHolder methodsFor: 'diffs' stamp: 'sw 11/13/2001 07:07'!\rshowingRegularDiffs\r\t\"Answer whether the receiver is showing regular diffs of source code\"\r\r\t^ contentsSymbol == #showDiffs\r! !\r\r!CodeHolder methodsFor: 'diffs' stamp: 'sw 11/13/2001 07:43'!\rshowingRegularDiffsString\r\t\"Answer a string representing whether I'm showing regular diffs\"\r\r\t^ (self showingRegularDiffs\r\t\tifTrue:\r\t\t\t['<yes>']\r\t\tifFalse:\r\t\t\t['<no>']), 'showDiffs'! !\r\r!CodeHolder methodsFor: 'diffs' stamp: 'sw 5/18/2001 23:50'!\rtoggleColorPrint\r\t\"Toggle whether color-print is in effect in the code pane\"\r\r\tself restoreTextualCodingPane.\r\tself okToChange ifTrue:\r\t\t[self showingColorPrint\r\t\t\tifTrue:\r\t\t\t\t[contentsSymbol _ #source]\r\t\t\tifFalse:\r\t\t\t\t[contentsSymbol _ #colorPrint].\r\t\tself setContentsToForceRefetch.\r\t\tself contentsChanged]\r\r! !\r\r!CodeHolder methodsFor: 'diffs' stamp: 'sw 1/18/2001 13:58'!\rtoggleDiff\r\t\"Retained for backward compatibility with existing buttons in existing images\"\r\r\tself toggleDiffing! !\r\r!CodeHolder methodsFor: 'diffs' stamp: 'sw 11/13/2001 07:30'!\rtoggleDiffing\r\t\"Toggle whether diffs should be shown in the code pane.  If any kind of diffs were being shown, stop showing diffs.  If no kind of diffs were being shown, start showing whatever kind of diffs are called for by default.\"\r\r\t| wasShowingDiffs |\r\tself okToChange ifTrue:\r\t\t[wasShowingDiffs _ self showingAnyKindOfDiffs.\r\t\tself restoreTextualCodingPane.\r\t\tself showDiffs: wasShowingDiffs not.\r\t\tself setContentsToForceRefetch.\r\t\tself contentsChanged]\r\r! !\r\r!CodeHolder methodsFor: 'diffs' stamp: 'sw 5/18/2001 19:57'!\rtogglePlainSource\r\t\"Toggle whether plain source shown in the code pane\"\r\t\r\t| wasShowingPlainSource |\r\tself okToChange ifTrue:\r\t\t[wasShowingPlainSource _ self showingPlainSource.\r\t\tself restoreTextualCodingPane.\r\t\twasShowingPlainSource\r\t\t\tifTrue:\r\t\t\t\t[self showDocumentation: true]\r\t\t\tifFalse:\r\t\t\t\t[contentsSymbol _ #source].\r\t\tself setContentsToForceRefetch.\r\t\tself changed: #contents]\r\r! !\r\r!CodeHolder methodsFor: 'diffs' stamp: 'sw 5/19/2001 00:02'!\rtogglePrettyDiffing\r\t\"Toggle whether pretty-diffing should be shown in the code pane\"\r\r\t| wasShowingDiffs |\r\tself okToChange ifTrue:\r\t\t[wasShowingDiffs _ self showingPrettyDiffs.\r\t\tself restoreTextualCodingPane.\r\t\tself showPrettyDiffs: wasShowingDiffs not.\r\t\tself setContentsToForceRefetch.\r\t\tself contentsChanged]\r\r! !\r\r!CodeHolder methodsFor: 'diffs' stamp: 'sw 5/18/2001 19:54'!\rtogglePrettyPrint\r\t\"Toggle whether pretty-print is in effectin the code pane\"\r\r\tself restoreTextualCodingPane.\r\tself okToChange ifTrue:\r\t\t[self showingPrettyPrint\r\t\t\tifTrue:\r\t\t\t\t[contentsSymbol _ #source]\r\t\t\tifFalse:\r\t\t\t\t[contentsSymbol _ #prettyPrint].\r\t\tself setContentsToForceRefetch.\r\t\tself contentsChanged]\r\r! !\r\r!CodeHolder methodsFor: 'diffs' stamp: 'sw 11/13/2001 07:27'!\rtoggleRegularDiffing\r\t\"Toggle whether regular-diffing should be shown in the code pane\"\r\r\t| wasShowingDiffs |\r\tself okToChange ifTrue:\r\t\t[wasShowingDiffs _ self showingRegularDiffs.\r\t\tself restoreTextualCodingPane.\r\t\tself showRegularDiffs: wasShowingDiffs not.\r\t\tself setContentsToForceRefetch.\r\t\tself contentsChanged]\r\r! !\r\r!CodeHolder methodsFor: 'diffs' stamp: 'sw 11/13/2001 07:24'!\rwantsDiffFeedback\r\t\"Answer whether the receiver is showing diffs of source code\"\r\r\t^ self showingAnyKindOfDiffs! !\r\r\r!CodeHolder methodsFor: 'misc' stamp: 'nk 4/10/2001 07:52'!\rgetSelectorAndSendQuery: querySelector to: queryPerformer\r\t\"Obtain a selector relevant to the current context, and then send the querySelector to the queryPerformer with the selector obtained as its argument.  If no message is currently selected, then obtain a method name from a user type-in\"\r\r\tself getSelectorAndSendQuery: querySelector to: queryPerformer with: { }.\r! !\r\r!CodeHolder methodsFor: 'misc' stamp: 'nk 4/10/2001 07:53'!\rgetSelectorAndSendQuery: querySelector to: queryPerformer with: queryArgs\r\t\"Obtain a selector relevant to the current context, and then send the querySelector to the queryPerformer with the selector obtained and queryArgs as its arguments.  If no message is currently selected, then obtain a method name from a user type-in\"\r\r\t| strm array |\r\tstrm _ WriteStream on: (array _ Array new: queryArgs size + 1).\r\tstrm nextPut: nil.\r\tstrm nextPutAll: queryArgs.\r\r\tself selectedMessageName ifNil: [ | selector |\r\t\tselector _ FillInTheBlank request: 'Type selector:' initialAnswer: 'flag:'.\r\t\t^ selector isEmptyOrNil ifFalse: [\r\t\t\t(Symbol hasInterned: selector\r\t\t\t\tifTrue: [ :aSymbol |\r\t\t\t\t\tarray at: 1 put: aSymbol.\r\t\t\t\t\tqueryPerformer perform: querySelector withArguments: array])\r\t\t\t\tifFalse: [ self inform: 'no such selector']\r\t\t]\r\t].\r\r\tself selectMessageAndEvaluate: [:selector |\r\t\tarray at: 1 put: selector.\r\t\tqueryPerformer perform: querySelector withArguments: array\r\t]! !\r\r!CodeHolder methodsFor: 'misc' stamp: 'nk 7/6/2003 07:49'!\risThereAnOverride\r\t\"Answer whether any subclass of my selected class implements my \r\tselected selector\"\r\t| aName aClass |\r\taName _ self selectedMessageName\r\t\t\t\tifNil: [^ false].\r\taClass _ self selectedClassOrMetaClass.\r\taClass allSubclassesDo: [ :cls | (cls includesSelector: aName) ifTrue: [ ^true ]].\r\t^ false! !\r\r!CodeHolder methodsFor: 'misc' stamp: 'nk 7/6/2003 07:52'!\risThisAnOverride\r\t\"Answer whether any superclass of my selected class implements my selected selector\"\r\t| aName aClass |\r\taName _ self selectedMessageName\r\t\t\t\tifNil: [^ false].\r\taClass _ self selectedClassOrMetaClass.\r\taClass allSuperclassesDo: [ :cls | (cls includesSelector: aName) ifTrue: [ ^true ]].\r\t^ false! !\r\r!CodeHolder methodsFor: 'misc' stamp: 'sw 9/27/2001 01:26'!\rmodelWakeUpIn: aWindow\r\t\"The window has been activated.  Respond to possible changes that may have taken place while it was inactive\"\r\r\tself updateListsAndCodeIn: aWindow.\r\tself decorateButtons.\r\tself refreshAnnotation.\r\r\tsuper modelWakeUpIn: aWindow! !\r\r!CodeHolder methodsFor: 'misc' stamp: 'sw 11/13/2001 07:42'!\rokayToAccept\r\t\"Answer whether it is okay to accept the receiver's input\"\r\r\tself showingDocumentation ifTrue:\r\t\t[self inform: \r'Sorry, for the moment you can\ronly submit changes here when\ryou are showing source.  Later, you\rwill be able to edit the isolated comment\rhere and save it back, but only if YOU\rimplement it!!.'.\r\t\t^ false].\r\r\tself showingAnyKindOfDiffs ifFalse:\r\t\t[^ true]. \r\t^ SelectionMenu confirm: \r'Caution!!  You are \"showing diffs\" here, so \rthere is a danger that some of the text in the\rcode pane is contaminated by the \"diff\" display'\r\ttrueChoice: 'accept anyway -- I''ll take my chances' falseChoice: 'um, let me reconsider'\r! !\r\r!CodeHolder methodsFor: 'misc' stamp: 'sw 9/27/1999 14:09'!\rpriorSourceOrNil\r\t\"If the currently-selected method has a previous version, return its source, else return nil\"\r\t| aClass aSelector  changeRecords |\r\t(aClass _ self selectedClassOrMetaClass) ifNil: [^ nil].\r\t(aSelector _ self selectedMessageName) ifNil: [^ nil].\r\tchangeRecords _ aClass changeRecordsAt: aSelector.\r\t(changeRecords == nil or: [changeRecords size <= 1]) ifTrue: [^ nil].\r\t^ (changeRecords at: 2) string \r! !\r\r!CodeHolder methodsFor: 'misc' stamp: 'BG 11/1/2003 13:26'!\rrefreshAnnotation\r\t\"If the receiver has an annotation pane that does not bear unaccepted edits, refresh it\"\r\r\t(self dependents detect: [:m | (m inheritsFromAnyIn: #('PluggableTextView')) and: [m getTextSelector == #annotation]] ifNone: [nil]) ifNotNilDo:\r\t\t[:aPane | aPane hasUnacceptedEdits ifFalse:\r\t\t\t[aPane update: #annotation]]! !\r\r!CodeHolder methodsFor: 'misc' stamp: 'sw 5/22/2001 16:47'!\rrefusesToAcceptCode\r\t\"Answer whether receiver, given its current contentsSymbol, could accept code happily if asked to\"\r\r\t^ (#(byteCodes documentation altSyntax tiles) includes: self contentsSymbol)! !\r\r!CodeHolder methodsFor: 'misc' stamp: 'tk 9/9/2000 21:08'!\rreleaseCachedState\r\t\"Can always be found again.  Don't write on a file.\"\r\tcurrentCompiledMethod _ nil.! !\r\r!CodeHolder methodsFor: 'misc' stamp: 'sw 5/8/2000 12:34'!\rsampleInstanceOfSelectedClass\r\t| aClass |\r\t\"Return a sample instance of the class currently being pointed at\"\r\t(aClass _ self selectedClassOrMetaClass) ifNil: [^ nil].\r\t^ aClass theNonMetaClass initializedInstance! !\r\r!CodeHolder methodsFor: 'misc' stamp: 'sw 3/19/2001 06:06'!\rsendQuery: querySelector to: queryPerformer\r\t\"Apply a query to the primary selector associated with the current context.  If no such selection exists, obtain one by user type-in. Then send querySelector to queryPerformer with the selector as its argument.\"\r\r\t| aSelector aString |\r\taSelector _ self selectedMessageName ifNil:\r\t\t[aString _FillInTheBlank request: 'Type selector:' initialAnswer: 'flag:'.\r\t\t^ aString isEmptyOrNil ifFalse:\r\t\t\t[(Symbol hasInterned: aString ifTrue:\r\t\t\t\t[:aSymbol | queryPerformer perform: querySelector with: aSymbol])\r\t\t\t\tifFalse:\r\t\t\t\t\t[self inform: 'no such selector']]].\r\r\tqueryPerformer perform: querySelector with: aSelector! !\r\r!CodeHolder methodsFor: 'misc' stamp: 'sw 12/28/2000 15:32'!\rsetClassAndSelectorIn: csBlock\r\t\"Evaluate csBlock with my selected class and and selector as its arguments; provide nil arguments if I don't have a method currently selected\"\r\r\t| aName |\r\t(aName _ self selectedMessageName)\r\t\tifNil:\r\t\t\t[csBlock value: nil value: nil]\r\t\tifNotNil:\r\t\t\t[csBlock value: self selectedClassOrMetaClass value: aName]\r! !\r\r!CodeHolder methodsFor: 'misc' stamp: 'sw 2/22/2001 06:37'!\rsuggestCategoryToSpawnedBrowser: aBrowser\r\t\"aBrowser is a message-category browser being spawned from the receiver.  Tell it what it needs to know to get its category info properly set up.\"\r\r\taBrowser setOriginalCategoryIndexForCurrentMethod! !\r\r!CodeHolder methodsFor: 'misc' stamp: 'sw 3/20/2001 09:26'!\ruseSelector: incomingSelector orGetSelectorAndSendQuery: querySelector to: queryPerformer\r\t\"If incomingSelector is not nil, use it, else obtain a selector from user type-in.   Using the determined selector, send the query to the performer provided.\"\r\r\t| aSelector |\r\tincomingSelector\r\t\tifNotNil:\r\t\t\t[queryPerformer perform: querySelector with: incomingSelector]\r\t\tifNil:\r\t\t\t[aSelector _FillInTheBlank request: 'Type selector:' initialAnswer: 'flag:'.\r\t\t\taSelector isEmptyOrNil ifFalse:\r\t\t\t\t[(Symbol hasInterned: aSelector ifTrue:\r\t\t\t\t\t[:aSymbol | queryPerformer perform: querySelector with: aSymbol])\r\t\t\t\t\tifFalse:\r\t\t\t\t\t\t[self inform: 'no such selector']]]! !\r\r\r!CodeHolder methodsFor: 'self-updating' stamp: 'sw 7/31/2002 13:11'!\rdidCodeChangeElsewhere\r\t\"Determine whether the code for the currently selected method and class has been changed somewhere else.\"\r\r\t| aClass aSelector aCompiledMethod |\r\tcurrentCompiledMethod ifNil: [^ false].\r\t(aClass _ self selectedClassOrMetaClass) ifNil: [^ false].\r\t(aSelector _ self selectedMessageName) ifNil: [^ false].\r\r\taSelector == #Comment ifTrue:\r\t\t[^ currentCompiledMethod ~~ aClass organization commentRemoteStr].\r\t^ ((aCompiledMethod _ aClass compiledMethodAt: aSelector ifAbsent: [^ false]) ~~ currentCompiledMethod)\r\t\tand: [aCompiledMethod last ~= 0 \"either not yet installed\"\r\t\t\t\tor: [currentCompiledMethod last = 0 \"or these methods don't have source pointers\"]]\r\t! !\r\r!CodeHolder methodsFor: 'self-updating' stamp: 'sw 10/19/1999 08:37'!\rstepIn: aSystemWindow\r\tself updateListsAndCodeIn: aSystemWindow! !\r\r!CodeHolder methodsFor: 'self-updating' stamp: 'sw 2/14/2001 15:34'!\rupdateCodePaneIfNeeded\r\t\"If the code for the currently selected method has changed underneath me, then update the contents of my code pane unless it holds unaccepted edits\"\r\r\tself didCodeChangeElsewhere\r\t\tifTrue:\r\t\t\t[self hasUnacceptedEdits\r\t\t\t\tifFalse:\r\t\t\t\t\t[self setContentsToForceRefetch.\r\t\t\t\t\tself contentsChanged]\r\t\t\t\tifTrue:\r\t\t\t\t\t[self changed: #codeChangedElsewhere]]! !\r\r!CodeHolder methodsFor: 'self-updating' stamp: 'sw 10/19/1999 14:14'!\rupdateListsAndCodeIn: aWindow\r\tsuper updateListsAndCodeIn: aWindow.\r\tself updateCodePaneIfNeeded! !\r\r!CodeHolder methodsFor: 'self-updating' stamp: 'sw 10/20/1999 12:22'!\rwantsStepsIn: aWindow\r\t^ Preferences smartUpdating! !\r\r\r!CodeHolder methodsFor: 'what to show' stamp: 'ssa 9/3/2008 11:02'!\raddContentsTogglesTo: aMenu \r\t\"Add updating menu toggles governing contents to aMenu.\"\r\tself contentsSymbolQuints\r\t\tdo: [:aQuint | aQuint == #-\r\t\t\t\tifTrue: [aMenu addLine]\r\t\t\t\tifFalse: [Smalltalk isMorphic\r\t\t\t\t\t\tifTrue: []\r\t\t\t\t\t\tifFalse: [aMenu\r\t\t\t\t\t\t\t\tadd: (('<yes>*' match: (self perform: aQuint third)) ifTrue: ['*'] ifFalse: ['']), aQuint fourth\r\t\t\t\t\t\t\t\ttarget: self\r\t\t\t\t\t\t\t\tselector: #contentsSymbol: \r\t\t\t\t\t\t\t\targumentList: { aQuint first } ]]]! !\r\r!CodeHolder methodsFor: 'what to show' stamp: 'sw 5/22/2001 16:36'!\rcolorPrintString\r\t\"Answer whether the receiver is showing colorPrint\"\r\r\t^ (self showingColorPrint\r\t\tifTrue: ['<yes>']\r\t\tifFalse: ['<no>'])\r\t\t, 'colorPrint'! !\r\r!CodeHolder methodsFor: 'what to show' stamp: 'ssa 9/3/2008 10:29'!\rofferWhatToShowMenu\r\t\"Offer a menu governing what to show\"\r\t| aMenu |\r\tSmalltalk isMorphic\r\t\tifTrue: []\r\t\tifFalse: [aMenu := CustomMenu new.\r\t\t\tself addContentsTogglesTo: aMenu.\r\t\t\taMenu title: 'What to show' translated.\r\t\t\taMenu invokeOn: self.\r\t\t\tself changed: #contents ]! !\r\r!CodeHolder methodsFor: 'what to show' stamp: 'sw 5/22/2001 16:36'!\rprettyPrintString\r\t\"Answer whether the receiver is showing pretty-print\"\r\r\t^ ((contentsSymbol == #prettyPrint)\r\t\tifTrue:\r\t\t\t['<yes>']\r\t\tifFalse:\r\t\t\t['<no>']), 'prettyPrint'! !\r\r!CodeHolder methodsFor: 'what to show' stamp: 'sw 2/14/2001 15:25'!\rsetContentsToForceRefetch\r\t\"Set the receiver's contents such that on the next update the contents will be formulated afresh.  This is a critical and obscure difference between Browsers on the one hand and MessageSets on the other, and has over the years been the source of much confusion and much difficulty.  By centralizing the different handling here, we don't need so many idiosyncratic overrides in MessageSet any more\"\r\r\tcontents _ nil! !\r\r!CodeHolder methodsFor: 'what to show' stamp: 'sw 5/20/2001 09:26'!\rshowAltSyntax: aBoolean\r\t\"Set the decompile toggle as indicated\"\r\r\tself contentsSymbol: (aBoolean ifFalse: [#source] ifTrue: [#altSyntax])! !\r\r!CodeHolder methodsFor: 'what to show' stamp: 'sw 5/20/2001 21:13'!\rshowByteCodes: aBoolean\r\t\"Get into or out of bytecode-showoing mode\"\r\r\tself okToChange ifFalse: [^ self changed: #flash].\r\taBoolean\r\t\tifTrue:\r\t\t\t[contentsSymbol _ #byteCodes]\r\t\tifFalse:\r\t\t\t[contentsSymbol == #byteCodes ifTrue: [contentsSymbol _ #source]].\r\tself contentsChanged! !\r\r!CodeHolder methodsFor: 'what to show' stamp: 'sw 12/5/2000 11:32'!\rshowComment\r\t\"Answer whether the receiver should show documentation rather than, say, source code\"\r\r\t^ self contentsSymbol == #documentation\r! !\r\r!CodeHolder methodsFor: 'what to show' stamp: 'sw 5/20/2001 09:14'!\rshowDecompile: aBoolean\r\t\"Set the decompile toggle as indicated\"\r\r\tself contentsSymbol: (aBoolean ifFalse: [#source] ifTrue: [#decompile])! !\r\r!CodeHolder methodsFor: 'what to show' stamp: 'sw 12/5/2000 12:25'!\rshowDocumentation: aBoolean\r\t\"Set the showDocumentation toggle as indicated\"\r\r\tself contentsSymbol: (aBoolean ifFalse: [#source] ifTrue: [#documentation])! !\r\r!CodeHolder methodsFor: 'what to show' stamp: 'sw 5/20/2001 09:27'!\rshowingAltSyntax\r\t\"Answer whether the receiver should show alt syntax rather than, say, source code\"\r\r\t^ self contentsSymbol == #altSyntax\r! !\r\r!CodeHolder methodsFor: 'what to show' stamp: 'sw 5/22/2001 16:37'!\rshowingAltSyntaxString\r\t\"Answer a string characerizing whether altSyntax is showing\"\r\r\t^ (self showingAltSyntax\r\t\tifTrue:\r\t\t\t['<yes>']\r\t\tifFalse:\r\t\t\t['<no>']), 'altSyntax'! !\r\r!CodeHolder methodsFor: 'what to show' stamp: 'sw 5/18/2001 18:05'!\rshowingByteCodes\r\t\"Answer whether the receiver is showing bytecodes\"\r\r\t^ contentsSymbol == #byteCodes! !\r\r!CodeHolder methodsFor: 'what to show' stamp: 'sw 5/22/2001 18:28'!\rshowingByteCodesString\r\t\"Answer whether the receiver is showing bytecodes\"\r\r\t^ (self showingByteCodes\r\t\tifTrue:\r\t\t\t['<yes>']\r\t\tifFalse:\r\t\t\t['<no>']), 'byteCodes'! !\r\r!CodeHolder methodsFor: 'what to show' stamp: 'sw 5/18/2001 23:50'!\rshowingColorPrint\r\t\"Answer whether the receiver is showing color-pretty-print\"\r\r\t^ contentsSymbol == #colorPrint! !\r\r!CodeHolder methodsFor: 'what to show' stamp: 'sw 5/20/2001 06:52'!\rshowingDecompile\r\t\"Answer whether the receiver should show decompile rather than, say, source code\"\r\r\t^ self contentsSymbol == #decompile\r! !\r\r!CodeHolder methodsFor: 'what to show' stamp: 'sw 5/20/2001 06:50'!\rshowingDecompileString\r\t\"Answer a string characerizing whether decompilation is showing\"\r\r\t^ (self showingDecompile\r\t\tifTrue:\r\t\t\t['<yes>']\r\t\tifFalse:\r\t\t\t['<no>']), 'decompile'! !\r\r!CodeHolder methodsFor: 'what to show' stamp: 'sw 12/5/2000 12:12'!\rshowingDocumentation\r\t\"Answer whether the receiver should show documentation rather than, say, source code\"\r\r\t^ self contentsSymbol == #documentation\r! !\r\r!CodeHolder methodsFor: 'what to show' stamp: 'sw 5/18/2001 20:05'!\rshowingDocumentationString\r\t\"Answer a string characerizing whether documentation is showing\"\r\r\t^ (self showingDocumentation\r\t\tifTrue:\r\t\t\t['<yes>']\r\t\tifFalse:\r\t\t\t['<no>']), 'documentation'! !\r\r!CodeHolder methodsFor: 'what to show' stamp: 'sw 5/18/2001 19:43'!\rshowingPlainSource\r\t\"Answer whether the receiver is showing plain source\"\r\r\t^ contentsSymbol == #source! !\r\r!CodeHolder methodsFor: 'what to show' stamp: 'sw 5/22/2001 09:31'!\rshowingPlainSourceString\r\t\"Answer a string telling whether the receiver is showing plain source\"\r\r\t^ (self showingPlainSource\r\t\tifTrue:\r\t\t\t['<yes>']\r\t\tifFalse:\r\t\t\t['<no>']), 'source'! !\r\r!CodeHolder methodsFor: 'what to show' stamp: 'sw 5/18/2001 18:36'!\rshowingPrettyPrint\r\t\"Answer whether the receiver is showing pretty-print\"\r\r\t^ contentsSymbol == #prettyPrint! !\r\r!CodeHolder methodsFor: 'what to show' stamp: 'sw 12/5/2000 11:48'!\rshowingSource\r\t\"Answer whether the receiver is currently showing source code\"\r\r\t^ self contentsSymbol == #source\r! !\r\r!CodeHolder methodsFor: 'what to show' stamp: 'sw 5/20/2001 09:28'!\rtoggleAltSyntax\r\t\"Toggle the setting of the showingAltSyntax flag, unless there are unsubmitted edits that the user declines to discard\"\r\r\t| wasShowing |\r\tself okToChange ifTrue:\r\t\t[wasShowing _ self showingAltSyntax.\r\t\tself restoreTextualCodingPane.\r\t\tself showAltSyntax: wasShowing not.\r\t\tself setContentsToForceRefetch.\r\t\tself contentsChanged]\r\r! !\r\r!CodeHolder methodsFor: 'what to show' stamp: 'sw 5/20/2001 06:48'!\rtoggleDecompile\r\t\"Toggle the setting of the showingDecompile flag, unless there are unsubmitted edits that the user declines to discard\"\r\r\t| wasShowing |\r\tself okToChange ifTrue:\r\t\t[wasShowing _ self showingDecompile.\r\t\tself restoreTextualCodingPane.\r\t\tself showDecompile: wasShowing not.\r\t\tself setContentsToForceRefetch.\r\t\tself contentsChanged]\r\r! !\r\r!CodeHolder methodsFor: 'what to show' stamp: 'sw 5/18/2001 20:15'!\rtoggleShowDocumentation\r\t\"Toggle the setting of the showingDocumentation flag, unless there are unsubmitted edits that the user declines to discard\"\r\r\t| wasShowing |\r\tself okToChange ifTrue:\r\t\t[wasShowing _ self showingDocumentation.\r\t\tself restoreTextualCodingPane.\r\t\tself showDocumentation: wasShowing not.\r\t\tself setContentsToForceRefetch.\r\t\tself contentsChanged]\r\r! !\r\r!CodeHolder methodsFor: 'what to show' stamp: 'sw 5/18/2001 20:09'!\rtoggleShowingByteCodes\r\t\"Toggle whether the receiver is showing bytecodes\"\r\r\tself restoreTextualCodingPane.\r\tself showByteCodes: self showingByteCodes not.\r\tself setContentsToForceRefetch.\r\tself contentsChanged! !\r\r\r!CodeHolder methodsFor: 'tiles' stamp: 'ssa 9/3/2008 11:03'!\raddModelItemsToWindowMenu: aMenu\r\t\"Add model-related item to the window menu\"\r\r\tsuper addModelItemsToWindowMenu: aMenu. \r! !\r\r!CodeHolder methodsFor: 'tiles' stamp: 'rhi 1/4/2002 11:15'!\rshowTiles: aBoolean\r\t\"Set the showingTiles as indicated.  The fact that there are initially no senders of this reflects that fact that initially this trait is only directly settable through the UI; later there may be senders, such as if one wanted to set a system up so that all newly-opened browsers showed tiles rather than text.\"\r\r\taBoolean\r\t\tifTrue:\r\t\t\t[contentsSymbol _ #tiles]\r\t\tifFalse:\r\t\t\t[contentsSymbol == #tiles ifTrue: [contentsSymbol _ #source]].\r\tself setContentsToForceRefetch.\r\tself changed: #contents! !\r\r!CodeHolder methodsFor: 'tiles' stamp: 'sw 2/3/2001 00:10'!\rshowingTiles\r\t\"Answer whether the receiver is currently showing tiles\"\r\r\t^ contentsSymbol == #tiles\r! !\r\r!CodeHolder methodsFor: 'tiles' stamp: 'sw 5/20/2001 21:12'!\rshowingTilesString\r\t\"Answer a string characterizing whether tiles are currently showing or not\"\r\r\t^ (self showingTiles\r\t\tifTrue:\r\t\t\t['<yes>']\r\t\tifFalse:\r\t\t\t['<no>']), 'tiles'! !\r\r\r!CodeHolder methodsFor: 'categories & search pane' stamp: 'sw 3/7/2001 12:22'!\rsearchPane\r\t\"Answer the search pane associated with the receiver in its window, or nil if none.  Morphic only\"\r\r\t^ self textPaneWithSelector: #lastSearchString! !\r\r\r!CodeHolder methodsFor: 'message list' stamp: 'nk 6/19/2004 16:50'!\rdecompiledSourceIntoContents\r\t\"For backwards compatibility.\"\r\r\t^self  decompiledSourceIntoContentsWithTempNames: (Sensor leftShiftDown not) \r! !\r\r!CodeHolder methodsFor: 'message list' stamp: 'nk 6/19/2004 16:41'!\rdecompiledSourceIntoContentsWithTempNames: showTempNames \r\t\"Obtain a source string by decompiling the method's code, and place \r\tthat source string into my contents.\r\tAlso return the string.\r\tGet temps from source file if showTempNames is true.\"\r\r\t| tempNames class selector method |\r\tclass := self selectedClassOrMetaClass.\r\tselector := self selectedMessageName.\r\t\"Was method deleted while in another project?\"\r\tmethod := class compiledMethodAt: selector ifAbsent: [^ ''].\r\r\tcurrentCompiledMethod := method.\r\t(showTempNames not\r\t\t\tor: [method fileIndex > 0\r\t\t\t\t\tand: [(SourceFiles at: method fileIndex) isNil]])\r\t\tifTrue: [\r\t\t\t\"Emergency or no source file -- decompile without temp names \"\r\t\t\tcontents := (class decompilerClass new\r\t\t\t\t\t\tdecompile: selector\r\t\t\t\t\t\tin: class\r\t\t\t\t\t\tmethod: method) decompileString]\r\t\tifFalse: [tempNames := (class compilerClass new\r\t\t\t\t\t\tparse: method getSourceFromFile asString\r\t\t\t\t\t\tin: class\r\t\t\t\t\t\tnotifying: nil) tempNames.\r\t\t\tcontents := ((class decompilerClass new withTempNames: tempNames)\r\t\t\t\t\t\tdecompile: selector\r\t\t\t\t\t\tin: class\r\t\t\t\t\t\tmethod: method) decompileString].\r\tcontents := contents asText makeSelectorBoldIn: class.\r\t^ contents copy! !\r\r!CodeHolder methodsFor: 'message list' stamp: 'sw 8/16/2002 23:23'!\rselectedBytecodes\r\t\"Answer text to show in a code pane when in showing-byte-codes mode\"\r\r\t^ (self selectedClassOrMetaClass compiledMethodAt: self selectedMessageName ifAbsent: [^ '' asText]) symbolic asText! !\r\r!CodeHolder methodsFor: 'message list' stamp: 'nk 6/19/2004 16:46'!\rselectedMessage\r\t\"Answer a copy of the source code for the selected message.  This generic version is probably actually never reached, since every subclass probably reimplements and does not send to super.  In time, ideally, most, or all, reimplementors would vanish and all would defer instead to a universal version right here.  Everything in good time.\"\r\r\t| class selector method |\r\tcontents ifNotNil: [^ contents copy].\r\r\tself showingDecompile ifTrue:\r\t\t[^ self decompiledSourceIntoContentsWithTempNames: Sensor leftShiftDown not ].\r\r\tclass _ self selectedClassOrMetaClass.\r\t(class isNil or: [(selector _ self selectedMessageName) isNil]) ifTrue: [^ ''].\r\tmethod _ class compiledMethodAt: selector ifAbsent: [^ ''].\t\"method deleted while in another project\"\r\tcurrentCompiledMethod _ method.\r\r\t^ contents _ (self showComment\r\t\tifFalse: [self sourceStringPrettifiedAndDiffed]\r\t\tifTrue:\t[ self commentContents])\r\t\t\tcopy asText makeSelectorBoldIn: class! !\r\r!CodeHolder methodsFor: 'message list' stamp: 'sw 7/23/2002 13:05'!\rsourceStringPrettifiedAndDiffed\r\t\"Answer a copy of the source code for the selected message, transformed by diffing and pretty-printing exigencies\"\r\r\t| class selector sourceString |\r\tclass _ self selectedClassOrMetaClass.\r\tselector _ self selectedMessageName.\r\t(class isNil or: [selector isNil]) ifTrue: [^ 'missing'].\r\r\tsourceString _ class ultimateSourceCodeAt: selector ifAbsent: [^ 'error'].\r\tself validateMessageSource: sourceString forSelector: selector.\r\r\t(#(prettyPrint colorPrint prettyDiffs altSyntax) includes: contentsSymbol) ifTrue:\r\t\t[sourceString _ class compilerClass new\r\t\t\tformat: sourceString in: class notifying: nil contentsSymbol: contentsSymbol].\r\tself showingAnyKindOfDiffs ifTrue:\r\t\t[sourceString _ self diffFromPriorSourceFor: sourceString].\r\r\t^ sourceString! !\r\r!CodeHolder methodsFor: 'message list' stamp: 'sd 9/30/2003 14:01'!\rvalidateMessageSource: sourceString forSelector: aSelector\r\t\"Check whether there is evidence that method source is invalid\"\r\r\t| sourcesName |\r\t(self selectedClass compilerClass == Object compilerClass \r\t\t\tand: [(sourceString asString findString: aSelector keywords first ) ~= 1])\r\t\tifTrue: [sourcesName _ FileDirectory localNameFor: SmalltalkImage current sourcesName.\r\t\t\tself inform: 'There may be a problem with your sources file!!\r\rThe source code for every method should (usually) start with the\rmethod selector but this is not the case with this method!! You may\rproceed with caution but it is recommended that you get a new source file.\r\rThis can happen if you download the \"' , sourcesName  , '\" file, \ror the \".changes\" file you use, as TEXT. It must be transfered \rin BINARY mode, even if it looks like a text file, \rto preserve the CR line ends.\r\rMac users: This may have been caused by Stuffit Expander. \rTo prevent the files above to be converted to Mac line ends \rwhen they are expanded, do this: Start the program, then \rfrom Preferences... in the File menu, choose the Cross \rPlatform panel, then select \"Never\" and press OK. \rThen expand the compressed archive again.\r\r(Occasionally, the source code for a method may legitimately\rstart with a non-alphabetic character -- for example, Behavior\rmethod #formalHeaderPartsFor:.  In such rare cases, you can\rhappily disregard this warning.)'].! !\r\r\r!CodeHolder methodsFor: 'message list menu' stamp: 'sd 4/16/2003 09:33'!\rmessageListKey: aChar from: view\r\t\"Respond to a Command key.  I am a model with a code pane, and I also\r\thave a listView that has a list of methods.  The view knows how to get\r\tthe list and selection.\"\r\r\t| sel class |\r\taChar == $D ifTrue: [^ self toggleDiffing].\r\r\tsel _ self selectedMessageName.\r\taChar == $m ifTrue:  \"These next two put up a type in if no message selected\"\r\t\t[^ self useSelector: sel orGetSelectorAndSendQuery: #browseAllImplementorsOf: to: self systemNavigation].\r\taChar == $n ifTrue: \r\t\t[^ self useSelector: sel orGetSelectorAndSendQuery: #browseAllCallsOn: to: self systemNavigation].\r\r\t\"The following require a class selection\"\r\t(class _ self selectedClassOrMetaClass) ifNil: [^ self arrowKey: aChar from: view].\r\taChar == $b ifTrue: [^ Browser fullOnClass: class selector: sel].\r\taChar == $N ifTrue: [^ self browseClassRefs].\r\taChar == $i ifTrue: [^ self methodHierarchy].\r\taChar == $h ifTrue: [^ self classHierarchy].\r\taChar == $p ifTrue: [^ self browseFullProtocol].\r\r\t\"The following require a method selection\"\r\tsel ifNotNil: \r\t\t[aChar == $o ifTrue: [^ self fileOutMessage].\r\t\taChar == $c ifTrue: [^ self copySelector].\r\t\taChar == $v ifTrue: [^ self browseVersions].\r\t\taChar == $O ifTrue: [^ self openSingleMessageBrowser].\r\t\taChar == $x ifTrue: [^ self removeMessage].\r\r\t\t(aChar == $C and: [self canShowMultipleMessageCategories])\r\t\t\tifTrue: [^ self showHomeCategory]].\r\r\t^ self arrowKey: aChar from: view! !\r\r\r!CodeHolder methodsFor: 'message category functions' stamp: 'sw 10/8/2001 14:19'!\rcanShowMultipleMessageCategories\r\t\"Answer whether the receiver is capable of showing multiple message categories\"\r\r\t^ false! !\rObject subclass: #Collection\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'MutexForPicking RandomForPicking'\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Abstract'!\r!Collection commentStamp: '<historical>' prior: 0!\rI am the abstract superclass of all classes that represent a group of elements.!\r\r\r!Collection methodsFor: 'accessing' stamp: 'sma 5/12/2000 11:33'!\ranyOne\r\t\"Answer a representative sample of the receiver. This method can\r\tbe helpful when needing to preinfer the nature of the contents of \r\tsemi-homogeneous collections.\"\r\r\tself emptyCheck.\r\tself do: [:each | ^ each]! !\r\r!Collection methodsFor: 'accessing' stamp: 'sd 11/4/2003 22:05'!\ratRandom\r\t\"Answer a random element of the receiver.  Uses a shared random \r\tnumber generator owned by class Collection.  If you use this a lot, \r\tdefine your own instance of Random and use #atRandom:.  Causes \r\tan error if self has no elements.\"\r\r\t^ self class mutexForPicking critical: [\r\t\tself atRandom: self class randomForPicking ]\r\r\"Examples:\r\t#('one' 'or' 'the' 'other') atRandom\r\t(1 to: 10) atRandom\r\t'Just pick one of these letters at random' atRandom\r\t#(3 7 4 9 21) asSet atRandom\t\t(just to show it also works for Sets)\r\"! !\r\r!Collection methodsFor: 'accessing' stamp: 'sma 5/12/2000 11:41'!\rcapacity\r\t\"Answer the current capacity of the receiver.\"\r\r\t^ self size! !\r\r!Collection methodsFor: 'accessing' stamp: 'sma 5/12/2000 11:34'!\rsize\r\t\"Answer how many elements the receiver contains.\"\r\r\t| tally |\r\ttally _ 0.\r\tself do: [:each | tally _ tally + 1].\r\t^ tally! !\r\r\r!Collection methodsFor: 'adapting' stamp: 'di 11/6/1998 13:34'!\radaptToCollection: rcvr andSend: selector\r\t\"If I am involved in arithmetic with another Collection, return a Collection of\r\tthe results of each element combined with the scalar in that expression.\"\r\r\trcvr isSequenceable & self isSequenceable ifFalse:\r\t\t[self error: 'Only sequenceable collections may be combined arithmetically'].\r\t^ rcvr with: self collect:\r\t\t[:rcvrElement :myElement | rcvrElement perform: selector with: myElement]! !\r\r!Collection methodsFor: 'adapting' stamp: 'di 11/9/1998 12:16'!\radaptToNumber: rcvr andSend: selector\r\t\"If I am involved in arithmetic with a scalar, return a Collection of\r\tthe results of each element combined with the scalar in that expression.\"\r\r\t^ self collect: [:element | rcvr perform: selector with: element]! !\r\r!Collection methodsFor: 'adapting' stamp: 'di 11/6/1998 13:37'!\radaptToPoint: rcvr andSend: selector\r\t\"If I am involved in arithmetic with a scalar, return a Collection of\r\tthe results of each element combined with the scalar in that expression.\"\r\r\t^ self collect: [:element | rcvr perform: selector with: element]! !\r\r!Collection methodsFor: 'adapting' stamp: 'di 11/6/1998 13:37'!\radaptToString: rcvr andSend: selector\r\t\"If I am involved in arithmetic with a String, convert it to a Number.\"\r\t^ rcvr asNumber perform: selector with: self! !\r\r\r!Collection methodsFor: 'adding'!\radd: newObject \r\t\"Include newObject as one of the receiver's elements. Answer newObject. \r\tArrayedCollections cannot respond to this message.\"\r\r\tself subclassResponsibility! !\r\r!Collection methodsFor: 'adding' stamp: 'sma 5/12/2000 17:21'!\radd: newObject withOccurrences: anInteger\r\t\"Add newObject anInteger times to the receiver. Answer newObject.\"\r\r\tanInteger timesRepeat: [self add: newObject].\r\t^ newObject! !\r\r!Collection methodsFor: 'adding' stamp: 'sma 5/12/2000 17:26'!\raddAll: aCollection \r\t\"Include all the elements of aCollection as the receiver's elements. Answer \r\taCollection. Actually, any object responding to #do: can be used as argument.\"\r\r\taCollection do: [:each | self add: each].\r\t^ aCollection! !\r\r!Collection methodsFor: 'adding' stamp: 'sma 5/12/2000 17:23'!\raddIfNotPresent: anObject\r\t\"Include anObject as one of the receiver's elements, but only if there\r\tis no such element already. Anwser anObject.\"\r\r\t(self includes: anObject) ifFalse: [self add: anObject].\r\t^ anObject! !\r\r\r!Collection methodsFor: 'arithmetic' stamp: 'di 11/6/1998 13:53'!\r* arg\r\r\t^ arg adaptToCollection: self andSend: #*! !\r\r!Collection methodsFor: 'arithmetic' stamp: 'di 11/6/1998 13:53'!\r+ arg\r\r\t^ arg adaptToCollection: self andSend: #+! !\r\r!Collection methodsFor: 'arithmetic' stamp: 'di 11/6/1998 13:53'!\r- arg\r\r\t^ arg adaptToCollection: self andSend: #-! !\r\r!Collection methodsFor: 'arithmetic' stamp: 'di 11/6/1998 13:53'!\r/ arg\r\r\t^ arg adaptToCollection: self andSend: #/! !\r\r!Collection methodsFor: 'arithmetic' stamp: 'di 11/6/1998 13:54'!\r// arg\r\r\t^ arg adaptToCollection: self andSend: #//! !\r\r!Collection methodsFor: 'arithmetic' stamp: 'di 11/6/1998 13:54'!\r\\\\ arg\r\r\t^ arg adaptToCollection: self andSend: #\\\\! !\r\r!Collection methodsFor: 'arithmetic' stamp: 'raok 10/22/2002 00:17'!\rraisedTo: arg\r\r\t^ arg adaptToCollection: self andSend: #raisedTo:! !\r\r\r!Collection methodsFor: 'comparing' stamp: 'SqR 8/3/2000 13:36'!\rhash\r\t\"Answer an integer hash value for the receiver such that,\r\t  -- the hash value of an unchanged object is constant over time, and\r\t  -- two equal objects have equal hash values\"\r\r\t| hash |\r\r\thash _ self species hash.\r\tself size <= 10 ifTrue:\r\t\t[self do: [:elem | hash _ hash bitXor: elem hash]].\r\t^hash bitXor: self size hash! !\r\r\r!Collection methodsFor: 'converting' stamp: 'sma 5/6/2000 20:22'!\rasArray\r\t\"Answer an Array whose elements are the elements of the receiver.\r\tImplementation note: Cannot use ''Array withAll: self'' as that only\r\tworks for SequenceableCollections which support the replacement \r\tprimitive.\"\r\r\t| array index |\r\tarray _ Array new: self size.\r\tindex _ 0.\r\tself do: [:each | array at: (index _ index + 1) put: each].\r\t^ array! !\r\r!Collection methodsFor: 'converting' stamp: 'sma 5/6/2000 20:10'!\rasBag\r\t\"Answer a Bag whose elements are the elements of the receiver.\"\r\r\t^ Bag withAll: self! !\r\r!Collection methodsFor: 'converting' stamp: 'sma 5/6/2000 20:22'!\rasByteArray\r\t\"Answer a ByteArray whose elements are the elements of the receiver.\r\tImplementation note: Cannot use ''ByteArray withAll: self'' as that only\r\tworks for SequenceableCollections which support the replacement \r\tprimitive.\"\r\r\t| array index |\r\tarray _ ByteArray new: self size.\r\tindex _ 0.\r\tself do: [:each | array at: (index _ index + 1) put: each].\r\t^ array! !\r\r!Collection methodsFor: 'converting' stamp: 'sma 5/6/2000 20:26'!\rasCharacterSet\r\t\"Answer a CharacterSet whose elements are the unique elements of the receiver.\r\tThe reciever should only contain characters.\"\r\r\t^ CharacterSet newFrom: self! !\r\r!Collection methodsFor: 'converting' stamp: 'ar 9/22/2000 10:12'!\rasIdentitySet\r\t^(IdentitySet new: self size) addAll: self; yourself! !\r\r!Collection methodsFor: 'converting' stamp: 'sma 5/12/2000 17:43'!\rasOrderedCollection\r\t\"Answer an OrderedCollection whose elements are the elements of the\r\treceiver. The order in which elements are added depends on the order\r\tin which the receiver enumerates its elements. In the case of unordered\r\tcollections, the ordering is not necessarily the same for multiple \r\trequests for the conversion.\"\r\r\t^ self as: OrderedCollection! !\r\r!Collection methodsFor: 'converting' stamp: 'sma 5/6/2000 20:29'!\rasSet\r\t\"Answer a Set whose elements are the unique elements of the receiver.\"\r\r\t^ Set withAll: self! !\r\r!Collection methodsFor: 'converting' stamp: 'LC 6/18/2001 18:46'!\rasSkipList: aSortBlock \r\t\"Answer a SkipList whose elements are the elements of the \r\treceiver. The sort order is defined by the argument, aSortBlock.\"\r\r\t| skipList |\r\tskipList _ SortedCollection new: self size.\r\tskipList sortBlock: aSortBlock.\r\tskipList addAll: self.\r\t^ skipList! !\r\r!Collection methodsFor: 'converting'!\rasSortedArray\r\t\"Return a copy of the receiver in sorted order, as an Array.  6/10/96 sw\"\r\r\t^ self asSortedCollection asArray! !\r\r!Collection methodsFor: 'converting' stamp: 'sma 5/12/2000 17:44'!\rasSortedCollection\r\t\"Answer a SortedCollection whose elements are the elements of the \r\treceiver. The sort order is the default less than or equal.\"\r\r\t^ self as: SortedCollection! !\r\r!Collection methodsFor: 'converting' stamp: 'sma 5/12/2000 17:46'!\rasSortedCollection: aSortBlock \r\t\"Answer a SortedCollection whose elements are the elements of the \r\treceiver. The sort order is defined by the argument, aSortBlock.\"\r\r\t| aSortedCollection |\r\taSortedCollection _ SortedCollection new: self size.\r\taSortedCollection sortBlock: aSortBlock.\r\taSortedCollection addAll: self.\r\t^ aSortedCollection! !\r\r!Collection methodsFor: 'converting' stamp: 'hg 12/26/2001 23:53'!\rtopologicallySortedUsing: aSortBlock \r\t\"Answer a SortedCollection whose elements are the elements of the \r\treceiver, but topologically sorted. The topological order is defined \r\tby the argument, aSortBlock.\"\r\r\t| aSortedCollection |\r\taSortedCollection _ SortedCollection new: self size.\r\taSortedCollection sortBlock: aSortBlock.\r\tself do: [:each | aSortedCollection addLast: each].\t\"avoids sorting\"\r\t^ aSortedCollection sortTopologically\r! !\r\r\r!Collection methodsFor: 'copying' stamp: 'al 12/12/2003 14:31'!\r, aCollection\r\t^self copy addAll: aCollection; yourself! !\r\r!Collection methodsFor: 'copying' stamp: 'sma 5/12/2000 14:41'!\rcopyWith: newElement\r\t\"Answer a new collection with newElement added (as last\r\telement if sequenceable).\"\r\r\t^ self copy\r\t\tadd: newElement;\r\t\tyourself! !\r\r!Collection methodsFor: 'copying' stamp: 'ar 2/11/2001 01:55'!\rcopyWithDependent: newElement\r\t\"Answer a new collection with newElement added (as last\r\telement if sequenceable).\"\r\t^self copyWith: newElement! !\r\r!Collection methodsFor: 'copying' stamp: 'sma 5/12/2000 14:43'!\rcopyWithout: oldElement \r\t\"Answer a copy of the receiver that does not contain any\r\telements equal to oldElement.\"\r\r\t^ self reject: [:each | each = oldElement]\r\r\"Examples:\r\t'fred the bear' copyWithout: $e\r\t#(2 3 4 5 5 6) copyWithout: 5\r\"! !\r\r!Collection methodsFor: 'copying' stamp: 'sma 5/12/2000 18:08'!\rcopyWithoutAll: aCollection\r\t\"Answer a copy of the receiver that does not contain any elements \r\tequal to those in aCollection.\"\r\r\t^ self reject: [:each | aCollection includes: each]! !\r\r\r!Collection methodsFor: 'enumerating' stamp: 'sma 4/30/2000 11:17'!\rallSatisfy: aBlock\r\t\"Evaluate aBlock with the elements of the receiver.\r\tIf aBlock returns false for any element return false.\r\tOtherwise return true.\"\r\r\tself do: [:each | (aBlock value: each) ifFalse: [^ false]].\r\t^ true! !\r\r!Collection methodsFor: 'enumerating' stamp: 'sma 4/30/2000 11:17'!\ranySatisfy: aBlock\r\t\"Evaluate aBlock with the elements of the receiver.\r\tIf aBlock returns true for any element return true.\r\tOtherwise return false.\"\r\r\tself do: [:each | (aBlock value: each) ifTrue: [^ true]].\r\t^ false! !\r\r!Collection methodsFor: 'enumerating'!\rassociationsDo: aBlock\r\t\"Evaluate aBlock for each of the receiver's elements (key/value \r\tassociations).  If any non-association is within, the error is not caught now,\r\tbut later, when a key or value message is sent to it.\"\r\r\tself do: aBlock! !\r\r!Collection methodsFor: 'enumerating' stamp: 'sma 5/12/2000 11:45'!\rcollect: aBlock \r\t\"Evaluate aBlock with each of the receiver's elements as the argument.  \r\tCollect the resulting values into a collection like the receiver. Answer  \r\tthe new collection.\"\r\r\t| newCollection |\r\tnewCollection _ self species new.\r\tself do: [:each | newCollection add: (aBlock value: each)].\r\t^ newCollection! !\r\r!Collection methodsFor: 'enumerating' stamp: 'sma 5/12/2000 11:51'!\rcollect: collectBlock thenSelect: selectBlock\r\t\"Utility method to improve readability.\"\r\r\t^ (self collect: collectBlock) select: selectBlock! !\r\r!Collection methodsFor: 'enumerating' stamp: 'sma 5/12/2000 11:52'!\rcount: aBlock \r\t\"Evaluate aBlock with each of the receiver's elements as the argument.  \r\tAnswer the number of elements that answered true.\"\r\r\t| sum |\r\tsum _ 0.\r\tself do: [:each | (aBlock value: each) ifTrue: [sum _ sum + 1]].\r\t^ sum! !\r\r!Collection methodsFor: 'enumerating' stamp: 'sma 5/12/2000 11:20'!\rdetect: aBlock \r\t\"Evaluate aBlock with each of the receiver's elements as the argument. \r\tAnswer the first element for which aBlock evaluates to true.\"\r\r\t^ self detect: aBlock ifNone: [self errorNotFound: aBlock]! !\r\r!Collection methodsFor: 'enumerating' stamp: 'sma 5/12/2000 11:52'!\rdetect: aBlock ifNone: exceptionBlock \r\t\"Evaluate aBlock with each of the receiver's elements as the argument.  \r\tAnswer the first element for which aBlock evaluates to true. If none  \r\tevaluate to true, then evaluate the argument, exceptionBlock.\"\r\r\tself do: [:each | (aBlock value: each) ifTrue: [^ each]].\r\t^ exceptionBlock value! !\r\r!Collection methodsFor: 'enumerating'!\rdetectMax: aBlock\r\t\"Evaluate aBlock with each of the receiver's elements as the argument. \r\tAnswer the element for which aBlock evaluates to the highest magnitude.\r\tIf collection empty, return nil.  This method might also be called elect:.\"\r\r\t| maxElement maxValue val |\r\tself do: [:each | \r\t\tmaxValue == nil\r\t\t\tifFalse: [\r\t\t\t\t(val _ aBlock value: each) > maxValue ifTrue: [\r\t\t\t\t\tmaxElement _ each.\r\t\t\t\t\tmaxValue _ val]]\r\t\t\tifTrue: [\"first element\"\r\t\t\t\tmaxElement _ each.\r\t\t\t\tmaxValue _ aBlock value: each].\r\t\t\t\t\"Note that there is no way to get the first element that works \r\t\t\t\tfor all kinds of Collections.  Must test every one.\"].\r\t^ maxElement! !\r\r!Collection methodsFor: 'enumerating'!\rdetectMin: aBlock\r\t\"Evaluate aBlock with each of the receiver's elements as the argument. \r\tAnswer the element for which aBlock evaluates to the lowest number.\r\tIf collection empty, return nil.\"\r\r\t| minElement minValue val |\r\tself do: [:each | \r\t\tminValue == nil\r\t\t\tifFalse: [\r\t\t\t\t(val _ aBlock value: each) < minValue ifTrue: [\r\t\t\t\t\tminElement _ each.\r\t\t\t\t\tminValue _ val]]\r\t\t\tifTrue: [\"first element\"\r\t\t\t\tminElement _ each.\r\t\t\t\tminValue _ aBlock value: each].\r\t\t\t\t\"Note that there is no way to get the first element that works \r\t\t\t\tfor all kinds of Collections.  Must test every one.\"].\r\t^ minElement! !\r\r!Collection methodsFor: 'enumerating'!\rdetectSum: aBlock\r\t\"Evaluate aBlock with each of the receiver's elements as the argument. \r\tReturn the sum of the answers.\"\r\t| sum |\r\tsum _ 0.\r\tself do: [:each | \r\t\tsum _ (aBlock value: each) + sum].  \r\t^ sum! !\r\r!Collection methodsFor: 'enumerating' stamp: 'sma 5/12/2000 17:52'!\rdifference: aCollection\r\t\"Answer the set theoretic difference of two collections.\"\r\r\t^ self reject: [:each | aCollection includes: each]! !\r\r!Collection methodsFor: 'enumerating'!\rdo: aBlock \r\t\"Evaluate aBlock with each of the receiver's elements as the argument.\"\r\r\tself subclassResponsibility! !\r\r!Collection methodsFor: 'enumerating' stamp: 'sma 5/12/2000 11:57'!\rdo: elementBlock separatedBy: separatorBlock\r\t\"Evaluate the elementBlock for all elements in the receiver,\r\tand evaluate the separatorBlock between.\"\r\r\t| beforeFirst | \r\tbeforeFirst _ true.\r\tself do:\r\t\t[:each |\r\t\tbeforeFirst\r\t\t\tifTrue: [beforeFirst _ false]\r\t\t\tifFalse: [separatorBlock value].\r\t\telementBlock value: each]! !\r\r!Collection methodsFor: 'enumerating' stamp: 'sma 5/12/2000 11:59'!\rdo: aBlock without: anItem \r\t\"Enumerate all elements in the receiver. \r\tExecute aBlock for those elements that are not equal to the given item\"\r\r\t^ self do: [:each | anItem = each ifFalse: [aBlock value: each]]! !\r\r!Collection methodsFor: 'enumerating'!\rinject: thisValue into: binaryBlock \r\t\"Accumulate a running value associated with evaluating the argument, \r\tbinaryBlock, with the current value of the argument, thisValue, and the \r\treceiver as block arguments. For instance, to sum the numeric elements \r\tof a collection, aCollection inject: 0 into: [:subTotal :next | subTotal + \r\tnext].\"\r\r\t| nextValue |\r\tnextValue _ thisValue.\r\tself do: [:each | nextValue _ binaryBlock value: nextValue value: each].\r\t^nextValue! !\r\r!Collection methodsFor: 'enumerating' stamp: 'sma 5/12/2000 17:52'!\rintersection: aCollection\r\t\"Answer the set theoretic intersection of two collections.\"\r\r\t^ self select: [:each | aCollection includes: each]! !\r\r!Collection methodsFor: 'enumerating' stamp: 'gh 9/18/2001 15:59'!\rnoneSatisfy: aBlock\r\t\"Evaluate aBlock with the elements of the receiver.\r\tIf aBlock returns false for all elements return true.\r\tOtherwise return false\"\r\r\tself do: [:item | (aBlock value: item) ifTrue: [^ false]].\r\t^ true! !\r\r!Collection methodsFor: 'enumerating'!\rreject: aBlock \r\t\"Evaluate aBlock with each of the receiver's elements as the argument. \r\tCollect into a new collection like the receiver only those elements for \r\twhich aBlock evaluates to false. Answer the new collection.\"\r\r\t^self select: [:element | (aBlock value: element) == false]! !\r\r!Collection methodsFor: 'enumerating'!\rselect: aBlock \r\t\"Evaluate aBlock with each of the receiver's elements as the argument. \r\tCollect into a new collection like the receiver, only those elements for \r\twhich aBlock evaluates to true. Answer the new collection.\"\r\r\t| newCollection |\r\tnewCollection _ self species new.\r\tself do: [:each | (aBlock value: each) ifTrue: [newCollection add: each]].\r\t^newCollection! !\r\r!Collection methodsFor: 'enumerating' stamp: 'sma 5/12/2000 11:59'!\rselect: selectBlock thenCollect: collectBlock\r\t\"Utility method to improve readability.\"\r\r\t^ (self select: selectBlock) collect: collectBlock! !\r\r!Collection methodsFor: 'enumerating' stamp: 'sma 5/12/2000 17:54'!\runion: aCollection\r\t\"Answer the set theoretic union of two collections.\"\r\r\t^ self asSet addAll: aCollection; yourself! !\r\r\r!Collection methodsFor: 'filter streaming' stamp: 'sma 5/12/2000 12:07'!\rcontents\r\t^ self! !\r\r!Collection methodsFor: 'filter streaming' stamp: 'sma 5/12/2000 12:08'!\rflattenOnStream: aStream \r\t^ aStream writeCollection: self! !\r\r!Collection methodsFor: 'filter streaming' stamp: 'sma 5/12/2000 12:07'!\rwrite: anObject \r\t^ self add: anObject! !\r\r\r!Collection methodsFor: 'math functions' stamp: 'TAG 11/6/1998 15:51'!\rabs\r\t\"Absolute value of all elements in the collection\"\r\t^ self collect: [:a | a abs]! !\r\r!Collection methodsFor: 'math functions' stamp: 'raok 10/22/2002 00:20'!\rarcCos\r\t^self collect: [:each | each arcCos]! !\r\r!Collection methodsFor: 'math functions' stamp: 'raok 10/22/2002 00:20'!\rarcSin\r\t^self collect: [:each | each arcSin]! !\r\r!Collection methodsFor: 'math functions' stamp: 'raok 10/22/2002 00:20'!\rarcTan\r\t^self collect: [:each | each arcTan]! !\r\r!Collection methodsFor: 'math functions' stamp: 'TAG 11/6/1998 15:57'!\raverage\r\t^ self sum / self size! !\r\r!Collection methodsFor: 'math functions' stamp: 'TAG 11/6/1998 15:51'!\rceiling\r\t^ self collect: [:a | a ceiling]! !\r\r!Collection methodsFor: 'math functions' stamp: 'raok 10/22/2002 00:20'!\rcos\r\t^self collect: [:each | each cos]! !\r\r!Collection methodsFor: 'math functions' stamp: 'raok 10/22/2002 00:20'!\rdegreeCos\r\t^self collect: [:each | each degreeCos]! !\r\r!Collection methodsFor: 'math functions' stamp: 'raok 10/22/2002 00:21'!\rdegreeSin\r\t^self collect: [:each | each degreeSin]! !\r\r!Collection methodsFor: 'math functions' stamp: 'raok 10/22/2002 00:21'!\rexp\r\t^self collect: [:each | each exp]! !\r\r!Collection methodsFor: 'math functions' stamp: 'TAG 11/6/1998 15:51'!\rfloor\r\t^ self collect: [:a | a floor]! !\r\r!Collection methodsFor: 'math functions' stamp: 'raok 10/22/2002 00:21'!\rln\r\t^self collect: [:each | each ln]! !\r\r!Collection methodsFor: 'math functions' stamp: 'TAG 11/6/1998 15:52'!\rlog\r\t^ self collect: [:each | each log]! !\r\r!Collection methodsFor: 'math functions' stamp: 'TAG 11/6/1998 15:58'!\rmax\r\t^ self inject: self anyOne into: [:max :each | max max: each]! !\r\r!Collection methodsFor: 'math functions' stamp: 'TAG 11/6/1998 16:00'!\rmedian\r\t^ self asSortedCollection median! !\r\r!Collection methodsFor: 'math functions' stamp: 'TAG 11/6/1998 16:00'!\rmin\r\t^ self inject: self anyOne into: [:min :each | min min: each]! !\r\r!Collection methodsFor: 'math functions' stamp: 'TAG 11/6/1998 15:52'!\rnegated\r\t\"Negated value of all elements in the collection\"\r\t^ self collect: [:a | a negated]! !\r\r!Collection methodsFor: 'math functions' stamp: 'TAG 11/6/1998 16:00'!\rrange\r\t^ self max - self min! !\r\r!Collection methodsFor: 'math functions' stamp: 'TAG 11/6/1998 15:53'!\rreciprocal\r\t\"Return the reciever full of reciprocated elements\"\r\t^ self collect: [:a | a reciprocal]! !\r\r!Collection methodsFor: 'math functions' stamp: 'TAG 11/6/1998 15:53'!\rrounded\r\t^ self collect: [:a | a rounded]! !\r\r!Collection methodsFor: 'math functions' stamp: 'raok 10/22/2002 00:23'!\rsign\r\t^self collect: [:each | each sign]! !\r\r!Collection methodsFor: 'math functions' stamp: 'raok 10/22/2002 00:22'!\rsin\r\t^self collect: [:each | each sin]! !\r\r!Collection methodsFor: 'math functions' stamp: 'TAG 11/6/1998 15:53'!\rsqrt\r\t^ self collect: [:each | each sqrt]! !\r\r!Collection methodsFor: 'math functions' stamp: 'TAG 11/6/1998 15:53'!\rsquared\r\t^ self collect: [:each | each * each]! !\r\r!Collection methodsFor: 'math functions' stamp: 'TAG 11/6/1998 16:02'!\rsum\r\t\"This is implemented using a variant of the normal inject:into: pattern. \r\tThe reason for this is that it is not known whether we're in the normal \r\tnumber line, i.e. whether 0 is a good initial value for the sum. \r\tConsider a collection of measurement objects, 0 would be the unitless \r\tvalue and would not be appropriate to add with the unit-ed objects.\"\r\t| sum sample |\r\tsample _ self anyOne.\r\tsum _ self inject: sample into: [:accum :each | accum + each].\r\t^ sum - sample! !\r\r!Collection methodsFor: 'math functions' stamp: 'raok 10/22/2002 00:22'!\rtan\r\t^self collect: [:each | each tan]! !\r\r!Collection methodsFor: 'math functions' stamp: 'TAG 11/6/1998 15:54'!\rtruncated\r\t^ self collect: [:a | a truncated]! !\r\r\r!Collection methodsFor: 'printing' stamp: 'sma 6/1/2000 09:39'!\rprintElementsOn: aStream\r\taStream nextPut: $(.\r\tself do: [:element | aStream print: element; space].\r\tself isEmpty ifFalse: [aStream skip: -1].\r\taStream nextPut: $)! !\r\r!Collection methodsFor: 'printing' stamp: 'sma 6/1/2000 09:41'!\rprintNameOn: aStream\r\tsuper printOn: aStream! !\r\r!Collection methodsFor: 'printing' stamp: 'sma 6/1/2000 09:41'!\rprintOn: aStream \r\t\"Append a sequence of characters that identify the receiver to aStream.\"\r\r\tself printNameOn: aStream.\r\tself printElementsOn: aStream! !\r\r!Collection methodsFor: 'printing'!\rstoreOn: aStream \r\t\"Refer to the comment in Object|storeOn:.\"\r\r\t| noneYet |\r\taStream nextPutAll: '(('.\r\taStream nextPutAll: self class name.\r\taStream nextPutAll: ' new)'.\r\tnoneYet _ true.\r\tself do: \r\t\t[:each | \r\t\tnoneYet\r\t\t\tifTrue: [noneYet _ false]\r\t\t\tifFalse: [aStream nextPut: $;].\r\t\taStream nextPutAll: ' add: '.\r\t\taStream store: each].\r\tnoneYet ifFalse: [aStream nextPutAll: '; yourself'].\r\taStream nextPut: $)! !\r\r\r!Collection methodsFor: 'private'!\remptyCheck\r\r\tself isEmpty ifTrue: [self errorEmptyCollection]! !\r\r!Collection methodsFor: 'private'!\rerrorEmptyCollection\r\r\tself error: 'this collection is empty'! !\r\r!Collection methodsFor: 'private'!\rerrorNoMatch\r\r\tself error: 'collection sizes do not match'! !\r\r!Collection methodsFor: 'private' stamp: 'sma 5/12/2000 11:22'!\rerrorNotFound: anObject\r\t\"Actually, this should raise a special Exception not just an error.\"\r\r\tself error: 'Object is not in the collection.'! !\r\r!Collection methodsFor: 'private' stamp: 'yo 6/29/2004 13:14'!\rerrorNotKeyed\r\r\tself error: ('Instances of {1} do not respond to keyed accessing messages.' translated format: {self class name})\r! !\r\r!Collection methodsFor: 'private'!\rtoBraceStack: itsSize \r\t\"Push receiver's elements onto the stack of thisContext sender.  Error if receiver does\r\t not have itsSize elements or if receiver is unordered.\r\t Do not call directly: this is called by {a. b} _ ... constructs.\"\r\r\tself size ~= itsSize ifTrue:\r\t\t[self error: 'Trying to store ', self size printString,\r\t\t\t\t\t' values into ', itsSize printString, ' variables.'].\r\tthisContext sender push: itsSize fromIndexable: self! !\r\r\r!Collection methodsFor: 'removing' stamp: 'sma 5/12/2000 11:22'!\rremove: oldObject \r\t\"Remove oldObject from the receiver's elements. Answer oldObject \r\tunless no element is equal to oldObject, in which case, raise an error.\r\tArrayedCollections cannot respond to this message.\"\r\r\t^ self remove: oldObject ifAbsent: [self errorNotFound: oldObject]! !\r\r!Collection methodsFor: 'removing' stamp: 'sma 5/12/2000 11:14'!\rremove: oldObject ifAbsent: anExceptionBlock \r\t\"Remove oldObject from the receiver's elements. If several of the \r\telements are equal to oldObject, only one is removed. If no element is \r\tequal to oldObject, answer the result of evaluating anExceptionBlock. \r\tOtherwise, answer the argument, oldObject. ArrayedCollections cannot \r\trespond to this message.\"\r\r\tself subclassResponsibility! !\r\r!Collection methodsFor: 'removing' stamp: 'sma 5/12/2000 11:14'!\rremoveAll: aCollection \r\t\"Remove each element of aCollection from the receiver. If successful for \r\teach, answer aCollection. Otherwise create an error notification.\r\tArrayedCollections cannot respond to this message.\"\r\r\taCollection do: [:each | self remove: each].\r\t^ aCollection! !\r\r!Collection methodsFor: 'removing' stamp: 'sma 5/12/2000 11:16'!\rremoveAllFoundIn: aCollection \r\t\"Remove each element of aCollection which is present in the receiver \r\tfrom the receiver. Answer aCollection. No error is raised if an element\r\tisn't found. ArrayedCollections cannot respond to this message.\"\r\r\taCollection do: [:each | self remove: each ifAbsent: []].\r\t^ aCollection! !\r\r!Collection methodsFor: 'removing' stamp: 'sma 5/12/2000 11:19'!\rremoveAllSuchThat: aBlock \r\t\"Evaluate aBlock for each element and remove all that elements from\r\tthe receiver for that aBlock evaluates to true.  Use a copy to enumerate \r\tcollections whose order changes when an element is removed (i.e. Sets).\"\r\r\tself copy do: [:each | (aBlock value: each) ifTrue: [self remove: each]]! !\r\r\r!Collection methodsFor: 'testing' stamp: 'ls 3/27/2000 17:25'!\ridentityIncludes: anObject \r\t\"Answer whether anObject is one of the receiver's elements.\"\r\r\tself do: [:each | anObject == each ifTrue: [^true]].\r\t^false! !\r\r!Collection methodsFor: 'testing' stamp: 'jf 12/1/2003 15:37'!\rifEmpty: aBlock\r\t\"Evaluate the block if I'm empty\"\r\r\t^ self isEmpty ifTrue: aBlock! !\r\r!Collection methodsFor: 'testing' stamp: 'md 1/30/2004 15:11'!\rifEmpty: emptyBlock ifNotEmpty: notEmptyBlock\r\t\"Evaluate emptyBlock if I'm empty, notEmptyBlock otherwise\"\r\r\t^ self isEmpty ifTrue: emptyBlock ifFalse: [notEmptyBlock valueWithPossibleArgs: {self}]! !\r\r!Collection methodsFor: 'testing' stamp: 'md 1/30/2004 15:08'!\rifNotEmpty: aBlock\r\t\"Evaluate the block unless I'm empty\"\r\r\t^self isEmpty ifFalse: [aBlock valueWithPossibleArgs: {self}].\r! !\r\r!Collection methodsFor: 'testing' stamp: 'md 1/30/2004 15:11'!\rifNotEmpty: notEmptyBlock ifEmpty: emptyBlock\r\t\"Evaluate emptyBlock if I'm empty, notEmptyBlock otherwise\"\r\r\t^ self isEmpty ifFalse: [notEmptyBlock valueWithPossibleArgs: {self}] ifTrue: emptyBlock! !\r\r!Collection methodsFor: 'testing' stamp: 'sma 5/12/2000 14:07'!\rincludes: anObject \r\t\"Answer whether anObject is one of the receiver's elements.\"\r\r\t^ self anySatisfy: [:each | each = anObject]! !\r\r!Collection methodsFor: 'testing'!\rincludesAllOf: aCollection \r\t\"Answer whether all the elements of aCollection are in the receiver.\"\r\taCollection do: [:elem | (self includes: elem) ifFalse: [^ false]].\r\t^ true! !\r\r!Collection methodsFor: 'testing'!\rincludesAnyOf: aCollection \r\t\"Answer whether any element of aCollection is one of the receiver's elements.\"\r\taCollection do: [:elem | (self includes: elem) ifTrue: [^ true]].\r\t^ false! !\r\r!Collection methodsFor: 'testing' stamp: 'sw 8/12/97 20:59'!\rincludesSubstringAnywhere: testString\r\t\"Answer whether the receiver includes, anywhere in its nested structure, a string that has testString as a substring\"\r\tself do:\r\t\t[:element |\r\t\t\t(element isKindOf: String)\r\t\t\t\tifTrue:\r\t\t\t\t\t[(element includesSubString: testString) ifTrue: [^ true]].\r\t\t\t(element isKindOf: Collection)\r\t\t\t\tifTrue:\r\t\t\t\t\t[(element includesSubstringAnywhere: testString) ifTrue: [^ true]]].\r\t^ false\r\r\"#(first (second third) ((allSentMessages ('Elvis' includes:)))) includesSubstringAnywhere:  'lvi'\"! !\r\r!Collection methodsFor: 'testing' stamp: 'ar 8/17/1999 19:43'!\risCollection\r\t\"Return true if the receiver is some sort of Collection and responds to basic collection messages such as #size and #do:\"\r\t^true! !\r\r!Collection methodsFor: 'testing'!\risEmpty\r\t\"Answer whether the receiver contains any elements.\"\r\r\t^self size = 0! !\r\r!Collection methodsFor: 'testing' stamp: 'bf 3/10/2000 09:29'!\risEmptyOrNil\r\t\"Answer whether the receiver contains any elements, or is nil.  Useful in numerous situations where one wishes the same reaction to an empty collection or to nil\"\r\r\t^ self isEmpty! !\r\r!Collection methodsFor: 'testing' stamp: 'di 11/6/1998 09:16'!\risSequenceable\r\t^ false! !\r\r!Collection methodsFor: 'testing' stamp: 'dgd 4/4/2004 12:14'!\risZero\r\t\"Answer whether the receiver is zero\"\r\t^ false! !\r\r!Collection methodsFor: 'testing' stamp: 'sma 5/12/2000 17:49'!\rnotEmpty\r\t\"Answer whether the receiver contains any elements.\"\r\r\t^ self isEmpty not! !\r\r!Collection methodsFor: 'testing'!\roccurrencesOf: anObject \r\t\"Answer how many of the receiver's elements are equal to anObject.\"\r\r\t| tally |\r\ttally _ 0.\r\tself do: [:each | anObject = each ifTrue: [tally _ tally + 1]].\r\t^tally! !\r\r\r!Collection methodsFor: '*packageinfo-base' stamp: 'ab 9/30/2002 19:26'!\rgather: aBlock\r\t^ Array streamContents:\r\t\t[:stream |\r\t\tself do: [:ea | stream nextPutAll: (aBlock value: ea)]]! !\r\r\r!Collection methodsFor: '*connectors-truncation and round-off' stamp: 'nk 12/30/2003 15:47'!\rroundTo: quantum\r\t^self collect: [ :ea | ea roundTo: quantum ]! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rCollection class\r\tinstanceVariableNames: ''!\r\r!Collection class methodsFor: 'instance creation' stamp: 'apb 10/15/2000 22:05'!\rofSize: n\r\t\"Create a new collection of size n with nil as its elements.\r\tThis method exists because OrderedCollection new: n creates an\r\tempty collection,  not one of size n.\"\r\t^ self new: n! !\r\r!Collection class methodsFor: 'instance creation' stamp: 'sma 5/6/2000 19:58'!\rwith: anObject \r\t\"Answer an instance of me containing anObject.\"\r\r\t^ self new\r\t\tadd: anObject;\r\t\tyourself! !\r\r!Collection class methodsFor: 'instance creation' stamp: 'sma 5/6/2000 20:01'!\rwith: firstObject with: secondObject \r\t\"Answer an instance of me containing the two arguments as elements.\"\r\r\t^ self new\r\t\tadd: firstObject;\r\t\tadd: secondObject;\r\t\tyourself! !\r\r!Collection class methodsFor: 'instance creation' stamp: 'sma 5/6/2000 20:03'!\rwith: firstObject with: secondObject with: thirdObject \r\t\"Answer an instance of me containing the three arguments as elements.\"\r\r\t^ self new\r\t\tadd: firstObject;\r\t\tadd: secondObject;\r\t\tadd: thirdObject;\r\t\tyourself! !\r\r!Collection class methodsFor: 'instance creation' stamp: 'sma 5/6/2000 20:06'!\rwith: firstObject with: secondObject with: thirdObject with: fourthObject \r\t\"Answer an instance of me, containing the four arguments as the elements.\"\r\r\t^ self new\r\t\tadd: firstObject;\r\t\tadd: secondObject;\r\t\tadd: thirdObject;\r\t\tadd: fourthObject;\r\t\tyourself! !\r\r!Collection class methodsFor: 'instance creation' stamp: 'sma 5/6/2000 20:06'!\rwith: firstObject with: secondObject with: thirdObject with: fourthObject with: fifthObject\r\t\"Answer an instance of me, containing the five arguments as the elements.\"\r\r\t^ self new\r\t\tadd: firstObject;\r\t\tadd: secondObject;\r\t\tadd: thirdObject;\r\t\tadd: fourthObject;\r\t\tadd: fifthObject;\r\t\tyourself! !\r\r!Collection class methodsFor: 'instance creation' stamp: 'sma 5/6/2000 20:06'!\rwith: firstObject with: secondObject with: thirdObject with: fourthObject with: fifthObject with: sixthObject\r\t\"Answer an instance of me, containing the six arguments as the elements.\"\r\r\t^ self new\r\t\tadd: firstObject;\r\t\tadd: secondObject;\r\t\tadd: thirdObject;\r\t\tadd: fourthObject;\r\t\tadd: fifthObject;\r\t\tadd: sixthObject;\r\t\tyourself! !\r\r!Collection class methodsFor: 'instance creation' stamp: 'sma 5/6/2000 20:07'!\rwithAll: aCollection\r\t\"Create a new collection containing all the elements from aCollection.\"\r\r\t^ (self new: aCollection size)\r\t\taddAll: aCollection;\r\t\tyourself! !\r\r\r!Collection class methodsFor: 'private' stamp: 'lr 11/4/2003 12:07'!\rinitialize\r\t\"Set up a Random number generator to be used by atRandom when the \r\tuser does not feel like creating his own Random generator.\"\r\r\tRandomForPicking _ Random new.\r\tMutexForPicking _ Semaphore forMutualExclusion! !\r\r!Collection class methodsFor: 'private' stamp: 'lr 11/4/2003 12:08'!\rmutexForPicking\r\t^ MutexForPicking! !\r\r!Collection class methodsFor: 'private' stamp: 'sma 5/12/2000 12:31'!\rrandomForPicking\r\t^ RandomForPicking! !\rObject subclass: #Color\r\tinstanceVariableNames: 'rgb cachedDepth cachedBitPattern'\r\tclassVariableNames: 'Black Blue BlueShift Brown CachedColormaps ColorChart ColorNames ComponentMask ComponentMax Cyan DarkGray Gray GrayToIndexMap Green GreenShift HalfComponentMask HighLightBitmaps IndexedColors LightBlue LightBrown LightCyan LightGray LightGreen LightMagenta LightOrange LightRed LightYellow Magenta MaskingMap Orange PaleBlue PaleBuff PaleGreen PaleMagenta PaleOrange PalePeach PaleRed PaleTan PaleYellow PureBlue PureCyan PureGreen PureMagenta PureRed PureYellow RandomStream Red RedShift TranslucentPatterns Transparent VeryDarkGray VeryLightGray VeryPaleRed VeryVeryDarkGray VeryVeryLightGray White Yellow'\r\tpoolDictionaries: ''\r\tcategory: 'Graphics-Primitives'!\r!Color commentStamp: '<historical>' prior: 0!\rThis class represents abstract color, regardless of the depth of bitmap it will be shown in.  At the very last moment a Color is converted to a pixelValue that depends on the depth of the actual Bitmap inside the Form it will be used with.  The supported depths (in bits) are 1, 2, 4, 8, 16, and 32.  The number of actual colors at these depths are: 2, 4, 16, 256, 32768, and 16 million.  (See comment in BitBlt.)  To change the depth of the Display and set how many colors you can see, execute: (Display newDepth: 8).  (See comment in DisplayMedium)\r\tColor is represented as the amount of light in red, green, and blue.  White is (1.0, 1.0, 1.0) and black is (0, 0, 0).  Pure red is (1.0, 0, 0).  These colors are \"additive\".  Think of Color's instance variables as:\r\tr\tamount of red, a Float between 0.0 and 1.0.\r\tg\tamount of green, a Float between 0.0 and 1.0.\r\tb\tamount of blue, a Float between 0.0 and 1.0.\r(But, in fact, the three are encoded as values from 0 to 1023 and combined in a single integer, rgb.  The user does not need to know this.)\r\tMany colors are named.  You find a color by name by sending a message to class Color, for example (Color lightBlue).  Also, (Color red: 0.2 green: 0.6 blue: 1.0) or (Color r: 0.2 g: 0.6 b: 1.0) creates a color. (see below)\r\tA color is essentially immutable.  Once you set red, green, and blue, you cannot change them.  Instead, create a new Color and use it.\r\tApplications such as contour maps and bar graphs will want to display one of a set of shades based on a number.  Convert the range of this number to an integer from 1 to N.  Then call (Color green lightShades: N) to get an Array of colors from white to green.  Use the Array messages at:, atPin:, or atWrap: to pull out the correct color from the array.  atPin: gives the first (or last) color if the index is out of range.  atWrap: wraps around to the other end if the index is out of range.\r\tHere are some fun things to run in when your screen has color:\r\t\tPen new mandala: 30 diameter: Display height-100.\r\t\tPen new web  \"Draw with the mouse, opt-click to end\"\r\t\tDisplay fillWhite.  Pen new hilberts: 5.\r\t\tForm toothpaste: 30  \"Draw with mouse, opt-click to end\"\rYou might also want to try the comment in\r\tForm>class>examples>tinyText...\r\r\rMessages:\r\tmixed: proportion with: aColor\tAnswer this color mixed with the given color additively. The proportion, a number between 0.0 and 1.0, determines what what fraction of the receiver to use in the mix.\r\r\t+ \tadd two colors\r\t- \tsubtract two colors\r\t*\tmultiply the values of r, g, b by a number or an Array of factors.  ((Color named: #white) * 0.3) gives a darkish gray.  (aColor * #(0 0 0.9)) gives a color with slightly less blue.\r\t/\tdivide a color by a factor or an array of three factors.\r\r\terrorForDepth: d     How close the nearest color at this depth is to this abstract color.  Sum of the squares of the RGB differences, square rooted and normalized to 1.0.  Multiply by 100 to get percent.\r\r\thue\t\t\tReturns the hue of the color. On a wheel from 0 to 360 with pure red at 0 and again at 360.\r\tsaturation\tReturns the saturation of the color.  0.0 to 1.0\r\tbrightness\tReturns the brightness of the color.  0.0 to 1.0\r\r\tname    Look to see if this Color has a name.\r\tdisplay\tShow a swatch of this color tracking the cursor.\r\r\tlightShades: thisMany\t\tAn array of thisMany colors from white to the receiver. \r\tdarkShades: thisMany\t\tAn array of thisMany colors from black to the receiver.  Array is of length num.\r\tmix: color2 shades: thisMany\t\tAn array of thisMany colors from the receiver to color2.\r\twheel: thisMany\t\t\tAn array of thisMany colors around the color wheel starting and ending at the receiver.\r\r\tpixelValueForDepth: d    Returns the bits that appear be in a Bitmap of this depth for this color.  Represents the nearest available color at this depth.  Normal users do not need to know which pixelValue is used for which color. \r\rMessages to Class Color.\r\tred: r green: g blue: b\t\tReturn a color with the given r, g, and b components.\r\tr: g: b:\t\tSame as above, for fast typing.\r\r \thue: h saturation: s brightness: b\t\tCreate a color with the given hue, saturation, and brightness.\r\r\tpink\r \tblue\r\tred ...\tMany colors have messages that return an instance of Color.\r\tcanUnderstand: #brown\t  Returns true if #brown is a defined color.\r\tnames\t\tAn OrderedCollection of the names of the colors.\r\tnamed: #notAllThatGray put: aColor    Add a new color to the list and create an access message and a class variable for it.\r\tfromUser\tShows the palette of colors available at this display depth.  Click anywhere to return the color you clicked on.\r\r\thotColdShades: thisMany\tAn array of thisMany colors showing temperature from blue to red to white hot.\r\r    stdColorsForDepth: d        An Array of colors available at this depth.  For 16 bit and 32 bits, returns a ColorGenerator.  It responds to at: with a Color for that index, simulating a very big Array. \r\r   colorFromPixelValue: value depth: d    Returns a Color whose bit pattern (inside a Bitmap) at this depth is the number specified.  Normal users do not need to use this.\r\r(See also comments in these classes: Form, Bitmap, BitBlt, Pattern, MaskedForm.)!\r\r\r!Color methodsFor: 'access'!\ralpha\r\t\"Return the opacity ('alpha') value of opaque so that normal colors can be compared to TransparentColors.\"\r\r\t^ 1.0\r! !\r\r!Color methodsFor: 'access'!\rblue\r\t\"Return the blue component of this color, a float in the range [0.0..1.0].\"\r\r\t^ self privateBlue asFloat / ComponentMax! !\r\r!Color methodsFor: 'access'!\rbrightness\r\t\"Return the brightness of this color, a float in the range [0.0..1.0].\"\r\r\t^ ((self privateRed max:\r\t    self privateGreen) max:\r\t    self privateBlue) asFloat / ComponentMax! !\r\r!Color methodsFor: 'access'!\rgreen\r\t\"Return the green component of this color, a float in the range [0.0..1.0].\"\r\r\t^ self privateGreen asFloat / ComponentMax! !\r\r!Color methodsFor: 'access'!\rhue\r\t\"Return the hue of this color, an angle in the range [0.0..360.0].\"\r\r\t| r g b max min span h |\r\tr _ self privateRed.\r\tg _ self privateGreen.\r\tb _ self privateBlue. \r\r\tmax _ ((r max: g) max: b).\r\tmin _ ((r min: g) min: b).\r\tspan _ (max - min) asFloat.\r\tspan = 0.0 ifTrue: [ ^ 0.0 ].\r\r\tr = max ifTrue: [\r\t\th _ ((g - b) asFloat / span) * 60.0.\r\t] ifFalse: [\r\t\tg = max\r\t\t\tifTrue: [ h _ 120.0 + (((b - r) asFloat / span) * 60.0). ]\r\t\t\tifFalse: [ h _ 240.0 + (((r - g) asFloat / span) * 60.0). ].\r\t].\r\r\th < 0.0 ifTrue: [ h _ 360.0 + h ].\r\t^ h! !\r\r!Color methodsFor: 'access'!\rluminance\r\t\"Return the luminance of this color, a brightness value weighted by the human eye's color sensitivity.\"\r\r\t^ ((299 * self privateRed) +\r\t   (587 * self privateGreen) +\r\t   (114 * self privateBlue)) / (1000 * ComponentMax)\r! !\r\r!Color methodsFor: 'access'!\rred\r\t\"Return the red component of this color, a float in the range [0.0..1.0].\"\r\r\t^ self privateRed asFloat / ComponentMax! !\r\r!Color methodsFor: 'access'!\rsaturation\r\t\"Return the saturation of this color, a value between 0.0 and 1.0.\"\r\r\t| r g b max min |\r\tr _ self privateRed.\r\tg _ self privateGreen.\r\tb _ self privateBlue. \r\r\tmax _ min _ r.\r\tg > max ifTrue: [max _ g].\r\tb > max ifTrue: [max _ b].\r\tg < min ifTrue: [min _ g].\r\tb < min ifTrue: [min _ b].\r\r\tmax = 0\r\t\tifTrue: [ ^ 0.0 ]\r\t\tifFalse: [ ^ (max - min) asFloat / max asFloat ].\r! !\r\r\r!Color methodsFor: 'equality' stamp: 'di 1/6/1999 20:26'!\r= aColor\r\t\"Return true if the receiver equals the given color. This method handles TranslucentColors, too.\"\r\r\taColor isColor ifFalse: [^ false].\r\t^ aColor privateRGB = rgb and:\r\t\t[aColor privateAlpha = self privateAlpha]\r! !\r\r!Color methodsFor: 'equality' stamp: 'di 9/27/2000 08:07'!\rdiff: theOther\r\t\"Returns a number between 0.0 and 1.0\"\r\r\t^ ((self privateRed - theOther privateRed) abs\r\t\t+ (self privateGreen - theOther privateGreen) abs\r\t\t+ (self privateBlue - theOther privateBlue) abs)\r\t\t/ 3.0 / ComponentMax! !\r\r!Color methodsFor: 'equality'!\rhash\r\r\t^ rgb! !\r\r\r!Color methodsFor: 'queries' stamp: 'sw 9/27/2001 17:26'!\rbasicType\r\t\"Answer a symbol representing the inherent type of the receiver\"\r\r\t^ #Color! !\r\r!Color methodsFor: 'queries' stamp: 'ar 1/14/1999 15:27'!\risBitmapFill\r\t^false! !\r\r!Color methodsFor: 'queries' stamp: 'ar 11/12/1998 19:43'!\risBlack\r\t\"Return true if the receiver represents black\"\r\t^rgb = 0! !\r\r!Color methodsFor: 'queries'!\risColor\r\r\t^ true\r! !\r\r!Color methodsFor: 'queries' stamp: 'ar 6/18/1999 06:58'!\risGradientFill\r\t^false! !\r\r!Color methodsFor: 'queries' stamp: 'ar 11/12/1998 19:44'!\risGray\r\t\"Return true if the receiver represents a shade of gray\"\r\t^(self privateRed = self privateGreen) and:[self privateRed = self privateBlue]! !\r\r!Color methodsFor: 'queries' stamp: 'ar 4/20/2001 04:33'!\risOpaque\r\t^true! !\r\r!Color methodsFor: 'queries' stamp: 'ar 6/18/1999 07:57'!\risOrientedFill\r\t\"Return true if the receiver keeps an orientation (e.g., origin, direction, and normal)\"\r\t^false! !\r\r!Color methodsFor: 'queries' stamp: 'ar 11/7/1998 20:20'!\risSolidFill\r\t^true! !\r\r!Color methodsFor: 'queries' stamp: 'di 12/30/1998 14:33'!\risTranslucent\r\r\t^ false\r! !\r\r!Color methodsFor: 'queries' stamp: 'di 1/3/1999 12:23'!\risTranslucentColor\r\t\"This means: self isTranslucent, but isTransparent not\"\r\t^ false! !\r\r!Color methodsFor: 'queries'!\risTransparent\r\r\t^ false\r! !\r\r\r!Color methodsFor: 'transformations' stamp: 'di 11/2/97 14:05'!\r* aNumber\r\t\"Answer this color with its RGB multiplied by the given number. \"\r\t\"(Color brown * 2) display\"\r\r\t^ Color basicNew\r\t\tsetPrivateRed: (self privateRed * aNumber) asInteger\r\t\tgreen: (self privateGreen * aNumber) asInteger\r\t\tblue: (self privateBlue * aNumber) asInteger\r! !\r\r!Color methodsFor: 'transformations' stamp: 'di 11/2/97 14:05'!\r+ aColor\r\t\"Answer this color mixed with the given color in an additive color space.  \"\r\t\"(Color blue + Color green) display\"\r\r\t^ Color basicNew\r\t\tsetPrivateRed: self privateRed + aColor privateRed\r\t\tgreen: self privateGreen + aColor privateGreen\r\t\tblue: self privateBlue + aColor  privateBlue\r! !\r\r!Color methodsFor: 'transformations' stamp: 'di 11/2/97 14:05'!\r- aColor\r\t\"Answer aColor is subtracted from the given color in an additive color space.  \"\r\t\"(Color white - Color red) display\"\r\r\t^ Color basicNew\r\t\tsetPrivateRed: self privateRed - aColor privateRed\r\t\tgreen: self privateGreen - aColor privateGreen\r\t\tblue: self privateBlue - aColor  privateBlue\r! !\r\r!Color methodsFor: 'transformations' stamp: 'di 11/2/97 14:07'!\r/ aNumber\r\t\"Answer this color with its RGB divided by the given number. \"\r\t\"(Color red / 2) display\"\r\r\t^ Color basicNew\r\t\tsetPrivateRed: (self privateRed / aNumber) asInteger\r\t\tgreen: (self privateGreen / aNumber) asInteger\r\t\tblue: (self privateBlue / aNumber) asInteger\r! !\r\r!Color methodsFor: 'transformations' stamp: 'dew 3/19/2002 23:50'!\radjustBrightness: brightness\r\t\"Adjust the relative brightness of this color. (lowest value is 0.005 so that hue information is not lost)\"\r\r\t^ Color\r\t\th: self hue\r\t\ts: self saturation\r\t\tv: (self brightness + brightness min: 1.0 max: 0.005)\r\t\talpha: self alpha! !\r\r!Color methodsFor: 'transformations' stamp: 'dew 3/19/2002 23:51'!\radjustSaturation: saturation brightness: brightness\r\t\"Adjust the relative saturation and brightness of this color. (lowest value is 0.005 so that hue information is not lost)\"\r\r\t^ Color\r\t\th: self hue\r\t\ts: (self saturation + saturation min: 1.0 max: 0.005)\r\t\tv: (self brightness + brightness min: 1.0 max: 0.005)\r\t\talpha: self alpha! !\r\r!Color methodsFor: 'transformations' stamp: 'sma 6/25/2000 15:36'!\ralpha: alphaValue \r\t\"Answer a new Color with the given amount of opacity ('alpha').\"\r\r\talphaValue = 1.0\r\t\tifFalse: [^ TranslucentColor basicNew setRgb: rgb alpha: alphaValue]! !\r\r!Color methodsFor: 'transformations' stamp: 'tk 7/4/2000 11:55'!\ralphaMixed: proportion with: aColor \r\t\"Answer this color mixed with the given color. The proportion, a number \r\tbetween 0.0 and 1.0, determines what what fraction of the receiver to  \r\tuse in the mix. For example, 0.9 would yield a color close to the  \r\treceiver. This method uses RGB interpolation; HSV interpolation can lead \r\tto surprises.  Mixes the alphas (for transparency) also.\"\r\r\t| frac1 frac2 |\r\tfrac1 _ proportion asFloat min: 1.0 max: 0.0.\r\tfrac2 _ 1.0 - frac1.\r\t^ Color\r\t\tr: self red * frac1 + (aColor red * frac2)\r\t\tg: self green * frac1 + (aColor green * frac2)\r\t\tb: self blue * frac1 + (aColor blue * frac2)\r\t\talpha: self alpha * frac1 + (aColor alpha * frac2)! !\r\r!Color methodsFor: 'transformations' stamp: 'RAA 6/2/2000 08:47'!\ratLeastAsLuminentAs: aFloat\r\r\t| revisedColor |\r\trevisedColor _ self.\r\t[revisedColor luminance < aFloat] whileTrue: [revisedColor _ revisedColor slightlyLighter].\r\t^revisedColor\r! !\r\r!Color methodsFor: 'transformations' stamp: 'nk 3/8/2004 09:43'!\ratMostAsLuminentAs: aFloat\r\r\t| revisedColor |\r\trevisedColor _ self.\r\t[revisedColor luminance > aFloat] whileTrue: [revisedColor _ revisedColor slightlyDarker].\r\t^revisedColor\r! !\r\r!Color methodsFor: 'transformations' stamp: 'dew 3/23/2002 01:38'!\rblacker\r\r\t^ self alphaMixed: 0.8333 with: Color black\r! !\r\r!Color methodsFor: 'transformations' stamp: 'dew 3/19/2002 23:54'!\rdansDarker\r\t\"Return a darker shade of the same color.\r\tAn attempt to do better than the current darker method.\r\t(now obsolete, since darker has been changed to do this. -dew)\"\r\t^ Color h: self hue s: self saturation\r\t\tv: (self brightness - 0.16 max: 0.0)! !\r\r!Color methodsFor: 'transformations' stamp: 'dew 3/4/2002 01:40'!\rdarker\r\t\"Answer a darker shade of this color.\"\r\r\t^ self adjustBrightness: -0.08! !\r\r!Color methodsFor: 'transformations' stamp: 'dew 3/8/2002 00:13'!\rduller\r\r\t^ self adjustSaturation: -0.03 brightness: -0.2! !\r\r!Color methodsFor: 'transformations' stamp: 'dew 1/23/2002 20:19'!\rlighter\r\t\"Answer a lighter shade of this color.\"\r\r\t^ self adjustSaturation: -0.03 brightness: 0.08! !\r\r!Color methodsFor: 'transformations' stamp: 'tk 7/4/2000 12:00'!\rmixed: proportion with: aColor \r\t\"Mix with another color and do not preserve transpareny.  Only use this for extracting the RGB value and mixing it.  All other callers should use instead: \r\taColor alphaMixed: proportion with: anotherColor\r\t\"\r\r\t| frac1 frac2 |\r\tfrac1 _ proportion asFloat min: 1.0 max: 0.0.\r\tfrac2 _ 1.0 - frac1.\r\t^ Color\r\t\tr: self red * frac1 + (aColor red * frac2)\r\t\tg: self green * frac1 + (aColor green * frac2)\r\t\tb: self blue * frac1 + (aColor blue * frac2)! !\r\r!Color methodsFor: 'transformations' stamp: 'dew 1/19/2002 01:29'!\rmuchDarker\r\r\t^ self alphaMixed: 0.5 with: Color black\r! !\r\r!Color methodsFor: 'transformations' stamp: 'tk 7/4/2000 12:07'!\rmuchLighter\r\r\t^ self alphaMixed: 0.233 with: Color white\r! !\r\r!Color methodsFor: 'transformations' stamp: 'ar 6/19/1999 00:36'!\rnegated\r\t\"Return an RGB inverted color\"\r\t^Color\r\t\tr: 1.0 - self red\r\t\tg: 1.0 - self green\r\t\tb: 1.0 - self blue! !\r\r!Color methodsFor: 'transformations' stamp: 'di 9/27/2000 08:14'!\rorColorUnlike: theOther\r\t\"If this color is a lot like theOther, then return its complement, otherwide, return self\"\r\r\t(self diff: theOther) < 0.3\r\t\tifTrue: [^ theOther negated]\r\t\tifFalse: [^ self]! !\r\r!Color methodsFor: 'transformations' stamp: 'dew 3/4/2002 01:42'!\rpaler\r\t\"Answer a paler shade of this color.\"\r\r\t^ self adjustSaturation: -0.09 brightness: 0.09\r! !\r\r!Color methodsFor: 'transformations' stamp: 'dew 3/4/2002 01:43'!\rslightlyDarker\r\r\t^ self adjustBrightness: -0.03\r! !\r\r!Color methodsFor: 'transformations' stamp: 'dew 3/4/2002 01:43'!\rslightlyLighter\r\r\t^ self adjustSaturation: -0.01 brightness: 0.03! !\r\r!Color methodsFor: 'transformations' stamp: 'dew 1/19/2002 01:25'!\rslightlyWhiter\r\r\t^ self alphaMixed: 0.85 with: Color white\r! !\r\r!Color methodsFor: 'transformations' stamp: 'dew 3/4/2002 01:44'!\rtwiceDarker\r\t\"Answer a significantly darker shade of this color.\"\r\r\t^ self adjustBrightness: -0.15! !\r\r!Color methodsFor: 'transformations' stamp: 'dew 3/4/2002 01:45'!\rtwiceLighter\r\t\"Answer a significantly lighter shade of this color.\"\r\r\t^ self adjustSaturation: -0.06 brightness: 0.15! !\r\r!Color methodsFor: 'transformations' stamp: 'tk 7/4/2000 12:07'!\rveryMuchLighter\r\r\t^ self alphaMixed: 0.1165 with: Color white\r! !\r\r!Color methodsFor: 'transformations' stamp: 'dew 3/23/2002 01:38'!\rwhiter\r\r\t^ self alphaMixed: 0.8333 with: Color white\r! !\r\r\r!Color methodsFor: 'groups of shades' stamp: 'tk 6/18/96'!\rdarkShades: thisMany\r\t\"An array of thisMany colors from black to the receiver.  Array is of length num. Very useful for displaying color based on a variable in your program.  \"\r\t\"Color showColors: (Color red darkShades: 12)\"\r\r\t^ self class black mix: self shades: thisMany\r! !\r\r!Color methodsFor: 'groups of shades' stamp: 'tk 6/18/96'!\rlightShades: thisMany\r\t\"An array of thisMany colors from white to self. Very useful for displaying color based on a variable in your program.  \"\r\t\"Color showColors: (Color red lightShades: 12)\"\r\r\t^ self class white mix: self shades: thisMany\r! !\r\r!Color methodsFor: 'groups of shades' stamp: 'tk 6/18/96'!\rmix: color2 shades: thisMany\r\t\"Return an array of thisMany colors from self to color2. Very useful for displaying color based on a variable in your program.  \"\r\t\"Color showColors: (Color red mix: Color green shades: 12)\"\r\r\t| redInc greenInc blueInc rr gg bb c out |\r\tthisMany = 1 ifTrue: [^ Array with: color2].\r\tredInc _ color2 red - self red / (thisMany-1).\r\tgreenInc _ color2 green - self green / (thisMany-1).\r\tblueInc _ color2 blue - self blue / (thisMany-1).\r\trr _ self red.  gg _ self green.  bb _ self blue.\r\tout _ (1 to: thisMany) collect: [:num |\r\t\tc _ Color r: rr g: gg b: bb.\r\t\trr _ rr + redInc.\r\t\tgg _ gg + greenInc.\r\t\tbb _ bb + blueInc.\r\t\tc].\r\tout at: out size put: color2.\t\"hide roundoff errors\"\r\t^ out\r! !\r\r!Color methodsFor: 'groups of shades' stamp: 'di 10/23/2000 09:45'!\rwheel: thisMany\r\t\"An array of thisMany colors around the color wheel starting at self and ending all the way around the hue space just before self.  Array is of length thisMany.  Very useful for displaying color based on a variable in your program.  \"\r\r\t| sat bri hue step c |\r\tsat _ self saturation.\r\tbri _ self brightness.\r\thue _ self hue.\r\tstep _ 360.0 / (thisMany max: 1).\r\t^ (1 to: thisMany) collect: [:num |\r\t\tc _ Color h: hue s: sat v: bri.  \"hue is taken mod 360\"\r\t\thue _ hue + step.\r\t\tc].\r\"\r(Color wheel: 8) withIndexDo: [:c :i | Display fill: (i*10@20 extent: 10@20) fillColor: c]\r\"! !\r\r\r!Color methodsFor: 'printing' stamp: 'MPW 1/1/1901 22:14'!\rbyteEncode: aStream\r\r\taStream\r\t\tprint: '(';\r\t\tprint: self class name;\r\t\tprint: ' r: ';\r\t\twrite: (self red roundTo: 0.001);\r\t\tprint: ' g: ';\r\t\twrite: (self green roundTo: 0.001);\r\t\tprint: ' b: ';\r\t\twrite: (self blue roundTo: 0.001) ;\r\t\tprint: ')'.\r! !\r\r!Color methodsFor: 'printing' stamp: 'bf 5/25/2000 16:52'!\rprintOn: aStream\r\t| name |\r\t(name _ self name) ifNotNil:\r\t\t[^ aStream\r\t\t\tnextPutAll: 'Color ';\r\t\t\tnextPutAll: name].\r\tself storeOn: aStream.\r! !\r\r!Color methodsFor: 'printing'!\rshortPrintString\r\t\"Return a short (but less precise) print string for use where space is tight.\"\r\r\t| s |\r\ts _ WriteStream on: ''.\r\ts\r\t\tnextPutAll: '(' , self class name;\r\t\tnextPutAll: ' r: ';\r\t\tnextPutAll: (self red roundTo: 0.01) printString;\r\t\tnextPutAll: ' g: ';\r\t\tnextPutAll: (self green roundTo: 0.01) printString;\r\t\tnextPutAll: ' b: ';\r\t\tnextPutAll: (self blue roundTo: 0.01) printString;\r\t\tnextPutAll: ')'.\r\t^ s contents\r! !\r\r!Color methodsFor: 'printing' stamp: 'mir 7/21/1999 11:41'!\rstoreArrayOn: aStream\r\r\taStream nextPutAll: '#('.\r\tself storeArrayValuesOn: aStream.\r\taStream nextPutAll: ') '\r! !\r\r!Color methodsFor: 'printing' stamp: 'mir 7/21/1999 11:41'!\rstoreArrayValuesOn: aStream\r\r\t(self red roundTo: 0.001) storeOn: aStream.\r\taStream space.\r\t(self green roundTo: 0.001) storeOn: aStream.\r\taStream space.\r\t(self blue roundTo: 0.001) storeOn: aStream.\r\r! !\r\r!Color methodsFor: 'printing' stamp: 'di 9/27/2000 13:34'!\rstoreOn: aStream\r\r\taStream\r\t\tnextPutAll: '(' , self class name;\r\t\tnextPutAll: ' r: '; print: (self red roundTo: 0.001);\r\t\tnextPutAll: ' g: '; print: (self green roundTo: 0.001);\r\t\tnextPutAll: ' b: '; print: (self blue roundTo: 0.001);\r\t\tnextPutAll: ')'.\r! !\r\r\r!Color methodsFor: 'other' stamp: 'sw 2/16/98 03:42'!\rcolorForInsets\r\t^ self! !\r\r!Color methodsFor: 'other' stamp: 'tk 6/14/96'!\rdisplay\r\t\"Show a swatch of this color tracking the cursor until the next mouseClick. \"\r\t\"Color red display\"\r\t| f |\r\tf _ Form extent: 40@20 depth: Display depth.\r\tf fillColor: self.\r\tCursor blank showWhile:\r\t\t[f follow: [Sensor cursorPoint] while: [Sensor noButtonPressed]]! !\r\r!Color methodsFor: 'other' stamp: 'jm 12/4/97 10:24'!\rname\r\t\"Return this color's name, or nil if it has no name. Only returns a name if it exactly matches the named color.\"\r\r\tColorNames do:\r\t\t[:name | (Color perform: name) = self ifTrue: [^ name]].\r\t^ nil\r! !\r\r!Color methodsFor: 'other' stamp: 'ar 8/16/2001 12:47'!\rraisedColor\r\t^ self! !\r\r!Color methodsFor: 'other' stamp: 'jm 12/4/97 10:27'!\rrgbTriplet\r\t\"Color fromUser rgbTriplet\"\r\r\t^ Array\r\t\twith: (self red roundTo: 0.01)\r\t\twith: (self green roundTo: 0.01)\r\t\twith: (self blue roundTo: 0.01)\r! !\r\r\r!Color methodsFor: 'conversions' stamp: 'ar 11/2/1998 12:19'!\rasColor\r\t\"Convert the receiver into a color\"\r\t^self! !\r\r!Color methodsFor: 'conversions' stamp: 'TBn 6/15/2000 20:37'!\rasColorref\r\t\"Convert the receiver into a colorref\"\r\t^(self red * 255) asInteger + ((self green * 255) asInteger << 8) + ((self green * 255) asInteger << 16)! !\r\r!Color methodsFor: 'conversions' stamp: 'sw 10/27/1999 10:51'!\rasNontranslucentColor\r\t^ self! !\r\r!Color methodsFor: 'conversions' stamp: 'di 3/25/2000 10:13'!\rbalancedPatternForDepth: depth\r\t\"A generalization of bitPatternForDepth: as it exists.  Generates a 2x2 stipple of color.\r\tThe topLeft and bottomRight pixel are closest approx to this color\"\r\t| pv1 pv2 mask1 mask2 pv3 c |\r\t(depth == cachedDepth and:[cachedBitPattern size = 2]) ifTrue: [^ cachedBitPattern].\r\t(depth between: 4 and: 16) ifFalse: [^ self bitPatternForDepth: depth].\r\tcachedDepth _ depth.\r\tpv1 _ self pixelValueForDepth: depth.\r\"\r\tSubtract error due to pv1 to get pv2.\r\tpv2 _ (self - (err1 _ (Color colorFromPixelValue: pv1 depth: depth) - self))\r\t\t\t\t\t\tpixelValueForDepth: depth.\r\tSubtract error due to 2 pv1's and pv2 to get pv3.\r\tpv3 _ (self - err1 - err1 - ((Color colorFromPixelValue: pv2 depth: depth) - self))\r\t\t\t\t\t\tpixelValueForDepth: depth.\r\"\r\t\"Above two statements computed faster by the following...\"\r\tpv2 _ (c _ self - ((Color colorFromPixelValue: pv1 depth: depth) - self))\r\t\t\t\t\t\tpixelValueForDepth: depth.\r\tpv3 _ (c + (c - (Color colorFromPixelValue: pv2 depth: depth)))\r\t\t\t\t\t\tpixelValueForDepth: depth.\r\r\t\"Return to a 2-word bitmap that encodes a 2x2 stipple of the given pixelValues.\"\r\tmask1 _ (#(- - -\t\r\t\t\t16r01010101 - - -\t\t\t\"replicates every other 4 bits\"\r\t\t\t16r00010001 - - - - - - -\t\"replicates every other 8 bits\"\r\t\t\t16r00000001) at: depth).\t\"replicates every other 16 bits\"\r\tmask2 _ (#(- - -\t\r\t\t\t16r10101010 - - -\t\t\t\"replicates the other 4 bits\"\r\t\t\t16r01000100 - - - - - - -\t\"replicates the other 8 bits\"\r\t\t\t16r00010000) at: depth).\t\"replicates the other 16 bits\"\r\t^ cachedBitPattern _ Bitmap with: (mask1*pv1) + (mask2*pv2) with: (mask1*pv3) + (mask2*pv1)! !\r\r!Color methodsFor: 'conversions' stamp: 'hmm 4/25/2000 09:40'!\rbitPatternForDepth: depth\r\t\"Return a Bitmap, possibly containing a stipple pattern, that best represents this color at the given depth. BitBlt calls this method to convert colors into Bitmaps. The resulting Bitmap may be multiple words to represent a stipple pattern of several lines.  \"\r\t\"See also:\tpixelValueAtDepth:\t-- value for single pixel\r\t\t\t\tpixelWordAtDepth:\t-- a 32-bit word filled with the pixel value\"\r\t\"Details: The pattern for the most recently requested depth is cached.\"\r\t\"Note for depths > 2, there are stippled and non-stippled versions (generated with #balancedPatternForDepth: and #bitPatternForDepth:, respectively). The stippled versions don't work with the window bit caching of StandardSystemView, so we make sure that for these depths, only unstippled patterns are returned\"\r\r\t(depth == cachedDepth and: [depth <= 2 or: [cachedBitPattern size = 1]]) ifTrue: [^ cachedBitPattern].\r\tcachedDepth _ depth.\r\r\tdepth > 2 ifTrue: [^ cachedBitPattern _ Bitmap with: (self pixelWordForDepth: depth)].\r\tdepth = 1 ifTrue: [^ cachedBitPattern _ self halfTonePattern1].\r\tdepth = 2 ifTrue: [^ cachedBitPattern _ self halfTonePattern2].\r! !\r\r!Color methodsFor: 'conversions'!\rclosestPixelValue1\r\t\"Return the nearest approximation to this color for a monochrome Form.\"\r\r\t\"fast special cases\"\r\trgb = 0 ifTrue: [^ 1].  \"black\"\r\trgb = 16r3FFFFFFF ifTrue: [^ 0].  \"white\"\r\r\tself luminance > 0.5\r\t\tifTrue: [^ 0]  \"white\"\r\t\tifFalse: [^ 1].  \"black\"\r! !\r\r!Color methodsFor: 'conversions'!\rclosestPixelValue2\r\t\"Return the nearest approximation to this color for a 2-bit deep Form.\"\r\r\t| lum |\r\t\"fast special cases\"\r\trgb = 0 ifTrue: [^ 1].  \"black\"\r\trgb = 16r3FFFFFFF ifTrue: [^ 2].  \"opaque white\"\r\r\tlum _ self luminance.\r\tlum < 0.2 ifTrue: [^ 1].  \"black\"\r\tlum > 0.6 ifTrue: [^ 2].  \"opaque white\"\r\t^ 3  \"50% gray\"\r! !\r\r!Color methodsFor: 'conversions'!\rclosestPixelValue4\r\t\"Return the nearest approximation to this color for a 4-bit deep Form.\"\r\r\t| bIndex |\r\t\"fast special cases\"\r\trgb = 0 ifTrue: [^ 1].  \"black\"\r\trgb = 16r3FFFFFFF ifTrue: [^ 2].  \"opaque white\"\r\r\trgb = PureRed privateRGB ifTrue: [^ 4].\r\trgb = PureGreen privateRGB ifTrue: [^ 5].\r\trgb = PureBlue privateRGB ifTrue: [^ 6].\r\trgb = PureCyan privateRGB ifTrue: [^ 7].\r\trgb = PureYellow privateRGB ifTrue: [^ 8].\r\trgb = PureMagenta privateRGB ifTrue: [^ 9].\r\r\tbIndex _ (self luminance * 8.0) rounded.  \"bIndex in [0..8]\"\r\t^ #(\r\t\t1\t\"black\"\r\t\t10\t\"1/8 gray\"\r\t\t11\t\"2/8 gray\"\r\t\t12\t\"3/8 gray\"\r\t\t3\t\"4/8 gray\"\r\t\t13\t\"5/8 gray\"\r\t\t14\t\"6/8 gray\"\r\t\t15\t\"7/8 gray\"\r\t\t2\t\"opaque white\"\r\t) at: bIndex + 1.\r! !\r\r!Color methodsFor: 'conversions'!\rclosestPixelValue8\r\t\"Return the nearest approximation to this color for an 8-bit deep Form.\"\r\r\t\"fast special cases\"\r\trgb = 0 ifTrue: [^ 1].  \"black\"\r\trgb = 16r3FFFFFFF ifTrue: [^ 255].  \"white\"\r\r\tself saturation < 0.2 ifTrue: [\r\t\t^ GrayToIndexMap at: (self privateGreen >> 2) + 1.  \"nearest gray\"\r\t] ifFalse: [\r\t\t\"compute nearest entry in the color cube\"\r\t\t^ 40 +\r\t\t  ((((self privateRed * 5) + HalfComponentMask) // ComponentMask) * 36) +\r\t\t  ((((self privateBlue * 5) + HalfComponentMask) // ComponentMask) * 6) +\r\t\t  (((self privateGreen * 5) + HalfComponentMask) // ComponentMask)].\r! !\r\r!Color methodsFor: 'conversions' stamp: 'di 9/2/97 20:21'!\rdominantColor\r\t^ self! !\r\r!Color methodsFor: 'conversions' stamp: 'di 6/23/97 23:27'!\rhalfTonePattern1\r\t\"Return a halftone-pattern to approximate luminance levels on 1-bit deep Forms.\"\r\r\t| lum |\r\tlum _ self luminance.\r\tlum < 0.1 ifTrue: [^ Bitmap with: 16rFFFFFFFF]. \"black\"\r\tlum < 0.4 ifTrue: [^ Bitmap with: 16rBBBBBBBB with: 16rEEEEEEEE]. \"dark gray\"\r\tlum < 0.6 ifTrue: [^ Bitmap with: 16r55555555 with: 16rAAAAAAAA]. \"medium gray\"\r\tlum < 0.9 ifTrue: [^ Bitmap with: 16r44444444 with: 16r11111111]. \"light gray\"\r\t^ Bitmap with: 0  \"1-bit white\"\r! !\r\r!Color methodsFor: 'conversions'!\rhalfTonePattern2\r\t\"Return a halftone-pattern to approximate luminance levels on 2-bit deep Forms.\"\r\r\t| lum |\r\tlum _ self luminance.\r\tlum < 0.125 ifTrue: [^ Bitmap with: 16r55555555].  \"black\"\r\tlum < 0.25 ifTrue: [^ Bitmap with: 16r55555555 with: 16rDDDDDDDD].  \"1/8 gray\"\r\tlum < 0.375 ifTrue: [^ Bitmap with: 16rDDDDDDDD with: 16r77777777].  \"2/8 gray\"\r\tlum < 0.5 ifTrue: [^ Bitmap with: 16rFFFFFFFF with: 16r77777777].  \"3/8 gray\"\r\tlum < 0.625 ifTrue: [^ Bitmap with: 16rFFFFFFFF].  \"4/8 gray\"\r\tlum < 0.75 ifTrue: [^ Bitmap with: 16rFFFFFFFF with: 16rBBBBBBBB].  \"5/8 gray\"\r\tlum < 0.875 ifTrue: [^ Bitmap with: 16rEEEEEEEE with: 16rBBBBBBBB].  \"6/8 gray\"\r\tlum < 1.0 ifTrue: [^ Bitmap with: 16rAAAAAAAA with: 16rBBBBBBBB].  \"7/8 gray\"\r\t^ Bitmap with: 16rAAAAAAAA  \"opaque white\"\r\r\"handy expression for computing patterns for 2x2 tiles;\r set p to a string of 4 letters (e.g., 'wggw' for a gray-and-\r white checkerboard) and print the result of evaluating:\r| p d w1 w2 |\rp _ 'wggw'.\rd _ Dictionary new.\rd at: $b put: '01'.\rd at: $w put: '10'.\rd at: $g put: '11'.\rw1 _ (d at: (p at: 1)), (d at: (p at: 2)).\rw1 _ '2r', w1, w1, w1, w1, w1, w1, w1, w1, ' hex'.\rw2 _ (d at: (p at: 3)), (d at: (p at: 4)).\rw2 _ '2r', w2, w2, w2, w2, w2, w2, w2, w2, ' hex'.\rArray with: (Compiler evaluate: w1) with: (Compiler evaluate: w2) \r\"! !\r\r!Color methodsFor: 'conversions' stamp: 'tk 4/24/97'!\rindexInMap: aColorMap\r\t\"Return the index corresponding to this color in the given color map. RGB colors are truncated to 3-, 4-, or 5-bits per color component when indexing into such a colorMap.  \"\r\r\taColorMap size = 2 ifTrue: [^ (self pixelValueForDepth: 1) + 1].\r\taColorMap size = 4 ifTrue: [^ (self pixelValueForDepth: 2) + 1].\r\taColorMap size = 16 ifTrue: [^ (self pixelValueForDepth: 4) + 1].\r\taColorMap size = 256 ifTrue: [^ (self pixelValueForDepth: 8) + 1].\r\taColorMap size = 512 ifTrue: [^ (self pixelValueForDepth: 9) + 1].\r\taColorMap size = 4096 ifTrue: [^ (self pixelValueForDepth: 12) + 1].\r\taColorMap size = 32768 ifTrue: [^ (self pixelValueForDepth: 16) + 1].\r\tself error: 'unknown pixel depth'.\r! !\r\r!Color methodsFor: 'conversions' stamp: 'bf 4/18/2001 16:25'!\rmakeForegroundColor\r        \"Make a foreground color contrasting with me\"\r        ^self luminance >= 0.5\r                ifTrue: [Color black]\r                ifFalse: [Color white]! !\r\r!Color methodsFor: 'conversions' stamp: 'ar 5/15/2001 16:12'!\rpixelValue32\r\t\"Note: pixelWord not pixelValue so we include translucency\"\r\t^self pixelWordForDepth: 32! !\r\r!Color methodsFor: 'conversions' stamp: 'jm 1/26/2001 15:11'!\rpixelValueForDepth: d\r\t\"Returns an integer representing the bits that appear in a single pixel of this color in a Form of the given depth. The depth must be one of 1, 2, 4, 8, 16, or 32. Contrast with pixelWordForDepth: and bitPatternForDepth:, which return either a 32-bit word packed with the given pixel value or a multiple-word Bitmap containing a pattern. The inverse is the class message colorFromPixelValue:depth:\"\r\t\"Details: For depths of 8 or less, the result is a colorMap index. For depths of 16 and 32, it is a direct color value with 5 or 8 bits per color component.\"\r\t\"Transparency: The pixel value zero is reserved for transparent. For depths greater than 8, black maps to the darkest possible blue.\"\r\r\t| rgbBlack val |\r\td = 8 ifTrue: [^ self closestPixelValue8].  \"common case\"\r\td < 8 ifTrue: [\r\t\td = 4 ifTrue: [^ self closestPixelValue4].\r\t\td = 2 ifTrue: [^ self closestPixelValue2].\r\t\td = 1 ifTrue: [^ self closestPixelValue1]].\r\r\trgbBlack _ 1.  \"closest black that is not transparent in RGB\"\r\r\td = 16 ifTrue: [\r\t\t\"five bits per component; top bits ignored\"\r\t\tval _ (((rgb bitShift: -15) bitAnd: 16r7C00) bitOr:\r\t\t\t ((rgb bitShift: -10) bitAnd: 16r03E0)) bitOr:\r\t\t\t ((rgb bitShift: -5) bitAnd: 16r001F).\r\t\t^ val = 0 ifTrue: [rgbBlack] ifFalse: [val]].\r\r\td = 32 ifTrue: [\r\t\t\"eight bits per component; top 8 bits set to all ones (opaque alpha)\"\r\t\tval _ LargePositiveInteger new: 4.\r\t\tval at: 3 put: ((rgb bitShift: -22) bitAnd: 16rFF).\r\t\tval at: 2 put: ((rgb bitShift: -12) bitAnd: 16rFF).\r\t\tval at: 1 put: ((rgb bitShift: -2) bitAnd: 16rFF).\r\t\tval = 0 ifTrue: [val at: 1 put: 1].  \"closest non-transparent black\"\r\t\tval at: 4 put: 16rFF.  \"opaque alpha\"\r\t\t^ val].\r\r\td = 12 ifTrue: [  \"for indexing a color map with 4 bits per color component\"\r\t\tval _ (((rgb bitShift: -18) bitAnd: 16r0F00) bitOr:\r\t\t\t ((rgb bitShift: -12) bitAnd: 16r00F0)) bitOr:\r\t\t\t ((rgb bitShift: -6) bitAnd: 16r000F).\r\t\t^ val = 0 ifTrue: [rgbBlack] ifFalse: [val]].\r\r\td = 9 ifTrue: [  \"for indexing a color map with 3 bits per color component\"\r\t\tval _ (((rgb bitShift: -21) bitAnd: 16r01C0) bitOr:\r\t\t\t ((rgb bitShift: -14) bitAnd: 16r0038)) bitOr:\r\t\t\t ((rgb bitShift: -7) bitAnd: 16r0007).\r\t\t^ val = 0 ifTrue: [rgbBlack] ifFalse: [val]].\r\r\tself error: 'unknown pixel depth: ', d printString\r! !\r\r!Color methodsFor: 'conversions' stamp: 'di 11/30/1998 09:03'!\rpixelWordFor: depth filledWith: pixelValue\r\t\"Return to a 32-bit word that concatenates enough copies of the given pixel value to fill the word (i.e., 32/depth copies). Depth should be one of 1, 2, 4, 8, 16, or 32. The pixel value should be an integer in 0..2^depth-1.\"\r\t| halfword |\r\tdepth = 32 ifTrue: [^ pixelValue].\r\tdepth = 16\r\t\tifTrue: [halfword _ pixelValue]\r\t\tifFalse: [halfword _ pixelValue * \r\t\t\t\t\t(#(16rFFFF\t\t\t\t\"replicates at every bit\"\r\t\t\t\t\t\t16r5555 -\t\t\t\"replicates every 2 bits\"\r\t\t\t\t\t\t16r1111 - - -\t\t\t\"replicates every 4 bits\"\r\t\t\t\t\t\t16r0101) at: depth)\t\"replicates every 8 bits\"].\r\t^ halfword bitOr: (halfword bitShift: 16)! !\r\r!Color methodsFor: 'conversions'!\rpixelWordForDepth: depth\r\t\"Return to a 32-bit word that concatenates enough copies of the receiver's pixel value to fill the word (i.e., 32/depth copies). Depth should be one of 1, 2, 4, 8, 16, or 32. The pixel value should be an integer in 0..2^depth-1.\"\r\r\t| pixelValue |\r\tpixelValue _ self pixelValueForDepth: depth.\r\t^ self pixelWordFor: depth filledWith: pixelValue\r! !\r\r!Color methodsFor: 'conversions' stamp: 'ar 1/14/1999 15:28'!\rscaledPixelValue32\r\t\"Return the alpha scaled pixel value for depth 32\"\r\t^self pixelWordForDepth: 32! !\r\r\r!Color methodsFor: 'private'!\rattemptToMutateError\r\t\"A color is immutable. Once a color's red, green, and blue have been initialized, you cannot change them. Instead, create a new Color and use it.\"\r\r\tself error: 'Color objects are immutable once created'\r! !\r\r!Color methodsFor: 'private'!\rflushCache\r\t\"Flush my cached bit pattern.\"\r\r\tcachedDepth _ nil.\r\tcachedBitPattern _ nil.\r! !\r\r!Color methodsFor: 'private'!\rprivateAlpha\r\t\"Private!! Return the raw alpha value for opaque. Used only for equality testing.\"\r\r\t^ 255! !\r\r!Color methodsFor: 'private'!\rprivateBlue\r\t\"Private!! Return the internal representation of my blue component.\"\r\r\t^ rgb bitAnd: ComponentMask! !\r\r!Color methodsFor: 'private'!\rprivateGreen\r\t\"Private!! Return the internal representation of my green component.\r\tReplaced >> by bitShift: 0 -. SqR!! 2/25/1999 23:08\"\r\r\t^ (rgb bitShift: 0 - GreenShift) bitAnd: ComponentMask! !\r\r!Color methodsFor: 'private'!\rprivateRGB\r\t\"Private!! Return the internal representation of my RGB components.\"\r\r\t^ rgb\r! !\r\r!Color methodsFor: 'private'!\rprivateRed\r\t\"Private!! Return the internal representation of my red component.\"\r\r\t^ (rgb bitShift: 0 - RedShift) bitAnd: ComponentMask! !\r\r!Color methodsFor: 'private'!\rsetHue: hue saturation: saturation brightness: brightness\r\t\"Initialize this color to the given hue, saturation, and brightness. See the comment in the instance creation method for details.\"\r\r\t| s v hf i f p q t | \r\ts _ (saturation asFloat max: 0.0) min: 1.0.\r\tv _ (brightness asFloat max: 0.0) min: 1.0.\r\r\t\"zero saturation yields gray with the given brightness\"\r\ts = 0.0 ifTrue: [ ^ self setRed: v green: v blue: v ].\r\r\thf _ hue asFloat.\r\t(hf < 0.0 or: [hf >= 360.0])\r\t\tifTrue: [hf _ hf - ((hf quo: 360.0) asFloat * 360.0)].\r\thf _ hf / 60.0.\r\ti _ hf asInteger.  \"integer part of hue\"\r\tf _ hf fractionPart.         \"fractional part of hue\"\r\tp _ (1.0 - s) * v.\r\tq _ (1.0 - (s * f)) * v.\r\tt _ (1.0 - (s * (1.0 - f))) * v.\r\r\t0 = i ifTrue: [ ^ self setRed: v green: t blue: p ].\r\t1 = i ifTrue: [ ^ self setRed: q green: v blue: p ].\r\t2 = i ifTrue: [ ^ self setRed: p green: v blue: t ].\r\t3 = i ifTrue: [ ^ self setRed: p green: q blue: v ].\r\t4 = i ifTrue: [ ^ self setRed: t green: p blue: v ].\r\t5 = i ifTrue: [ ^ self setRed: v green: p blue: q ].\r\r\tself error: 'implementation error'.\r! !\r\r!Color methodsFor: 'private' stamp: 'di 11/2/97 12:19'!\rsetPrivateRed: r green: g blue: b\r\t\"Initialize this color's r, g, and b components to the given values in the range [0..ComponentMax].  Encoded in a single variable as 3 integers in [0..1023].\"\r\r\trgb == nil ifFalse: [self attemptToMutateError].\r\trgb _ ((r min: ComponentMask max: 0) bitShift: RedShift) +\r\t\t((g min: ComponentMask max: 0) bitShift: GreenShift) +\r\t\t (b min: ComponentMask max: 0).\r\tcachedDepth _ nil.\r\tcachedBitPattern _ nil.\r! !\r\r!Color methodsFor: 'private' stamp: 'ls 9/24/1999 20:04'!\rsetRGB: rgb0\r\trgb == nil ifFalse: [self attemptToMutateError].\r\trgb _ rgb0! !\r\r!Color methodsFor: 'private'!\rsetRed: r green: g blue: b\r\t\"Initialize this color's r, g, and b components to the given values in the range [0.0..1.0].  Encoded in a single variable as 3 integers in [0..1023].\"\r\r\trgb == nil ifFalse: [self attemptToMutateError].\r\trgb _\r\t\t(((r * ComponentMax) rounded bitAnd: ComponentMask) bitShift: RedShift) +\r\t\t(((g * ComponentMax) rounded bitAnd: ComponentMask) bitShift: GreenShift) +\r\t\t ((b * ComponentMax) rounded bitAnd: ComponentMask).\r\tcachedDepth _ nil.\r\tcachedBitPattern _ nil.\r! !\r\r!Color methodsFor: 'private'!\rsetRed: r green: g blue: b range: range\r\t\"Initialize this color's r, g, and b components to the given values in the range [0..r].\"\r\r\trgb == nil ifFalse: [self attemptToMutateError].\r\trgb _\r\t\t((((r * ComponentMask) // range) bitAnd: ComponentMask) bitShift: RedShift) +\r\t\t((((g * ComponentMask) // range) bitAnd: ComponentMask) bitShift: GreenShift) +\r\t\t (((b * ComponentMask) // range) bitAnd: ComponentMask).\r\tcachedDepth _ nil.\r\tcachedBitPattern _ nil.\r! !\r\r\r!Color methodsFor: 'copying' stamp: 'tk 8/19/1998 16:12'!\rveryDeepCopyWith: deepCopier\r\t\"Return self.  I am immutable in the Morphic world.  Do not record me.\"! !\r\r\r!Color methodsFor: 'Morphic menu' stamp: 'dgd 10/17/2003 12:10'!\raddFillStyleMenuItems: aMenu hand: aHand from: aMorph\r\t\"Add the items for changing the current fill style of the receiver\"\r\taMenu add: 'change color...' translated target: self selector: #changeColorIn:event: argument: aMorph! !\r\r!Color methodsFor: 'Morphic menu' stamp: 'ar 10/5/2000 18:50'!\rchangeColorIn: aMorph event: evt\r\t\"Note: This is just a workaround to make sure we don't use the old color inst var\"\r\taMorph changeColorTarget: aMorph selector: #fillStyle: originalColor: self hand: evt hand! !\r\r\r\r!Color methodsFor: '*morphic-Postscript Canvases'!\rencodePostscriptOn: aStream\r\r\taStream setrgbcolor:self.\r\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rColor class\r\tinstanceVariableNames: ''!\r\r!Color class methodsFor: 'instance creation' stamp: 'sw 2/26/2002 10:46'!\rcolorFrom: parm\r\t\"Return an instantiated color from parm.  If parm is already a color, return it, else return the result of my performing it if it's a symbol or, if it is a list, it can either be an array of three numbers, which will be interpreted as RGB values, or a list of symbols, the first of which is sent to me and then the others of which are in turn sent to the prior result, thus allowing entries of the form #(blue darker).  Else just return the thing\"\r\r\t| aColor firstParm |\r\t(parm isKindOf: Color) ifTrue: [^ parm].\r\t(parm isKindOf: Symbol) ifTrue: [^ self perform: parm].\r\t((parm isKindOf: SequenceableCollection) and: [parm size > 0])\r\t\tifTrue:\r\t\t\t[firstParm _ parm first.\r\t\t\t(firstParm isKindOf: Number) ifTrue:\r\t\t\t\t[^ self fromRgbTriplet: parm].\r\t\t\taColor _ self colorFrom: firstParm.\r\t\t\tparm doWithIndex:\r\t\t\t\t[:sym :ind | ind > 1 ifTrue:\r\t\t\t\t\t[aColor _ aColor perform: sym]].\r\t\t\t^ aColor].\r\t^ parm\r\r\"\rColor colorFrom: #(blue darker)\rColor colorFrom: Color blue darker\rColor colorFrom: #blue\rColor colorFrom: #(0.0 0.0 1.0)\r\"! !\r\r!Color class methodsFor: 'instance creation' stamp: 'tk 8/15/2001 11:03'!\rcolorFromPixelValue: p depth: d\r\t\"Convert a pixel value for the given display depth into a color.\"\r\t\"Details: For depths of 8 or less, the pixel value is simply looked up in a table. For greater depths, the color components are extracted and converted into a color.\"\r\r\t| r g b alpha |\r\td = 8 ifTrue: [^ IndexedColors at: (p bitAnd: 16rFF) + 1].\r\td = 4 ifTrue: [^ IndexedColors at: (p bitAnd: 16r0F) + 1].\r\td = 2 ifTrue: [^ IndexedColors at: (p bitAnd: 16r03) + 1].\r\td = 1 ifTrue: [^ IndexedColors at: (p bitAnd: 16r01) + 1].\r\r\t(d = 16) | (d = 15) ifTrue: [\r\t\t\"five bits per component\"\r\t\tr _ (p bitShift: -10) bitAnd: 16r1F.\r\t\tg _ (p bitShift: -5) bitAnd: 16r1F.\r\t\tb _ p bitAnd: 16r1F.\r\t\t(r = 0 and: [g = 0]) ifTrue: [\r\t\t\tb = 0 ifTrue: [^Color transparent].\r\t\t\tb = 1 ifTrue: [^Color black]].\r\t\t^ Color r: r g: g b: b range: 31].\r\r\td = 32 ifTrue: [\r\t\t\"eight bits per component; 8 bits of alpha\"\r\t\tr _ (p bitShift: -16) bitAnd: 16rFF.\r\t\tg _ (p bitShift: -8) bitAnd: 16rFF.\r\t\tb _ p bitAnd: 16rFF.\r\t\talpha _ p bitShift: -24.\r\t\talpha = 0 ifTrue: [^Color transparent].\r\t\t(r = 0 and: [g = 0 and: [b = 0]])  ifTrue: [^Color transparent].\r\t\talpha < 255\r\t\t\tifTrue: [^ (Color r: r g: g b: b range: 255) alpha: (alpha asFloat / 255.0)]\r\t\t\tifFalse: [^ (Color r: r g: g b: b range: 255)]].\r\r\td = 12 ifTrue: [\r\t\t\"four bits per component\"\r\t\tr _ (p bitShift: -8) bitAnd: 16rF.\r\t\tg _ (p bitShift: -4) bitAnd: 16rF.\r\t\tb _ p bitAnd: 16rF.\r\t\t^ Color r: r g: g b: b range: 15].\r\r\td = 9 ifTrue: [\r\t\t\"three bits per component\"\r\t\tr _ (p bitShift: -6) bitAnd: 16r7.\r\t\tg _ (p bitShift: -3) bitAnd: 16r7.\r\t\tb _ p bitAnd: 16r7.\r\t\t^ Color r: r g: g b: b range: 7].\r\r\tself error: 'unknown pixel depth: ', d printString\r! !\r\r!Color class methodsFor: 'instance creation' stamp: 'mir 7/21/1999 11:54'!\rfromArray: colorDef\r\tcolorDef size == 3\r\t\t\tifTrue: [^self r: (colorDef at: 1) g: (colorDef at: 2) b: (colorDef at: 3)].\r\tcolorDef size == 0\r\t\t\tifTrue: [^Color transparent].\r\tcolorDef size == 4\r\t\t\tifTrue: [^(TranslucentColor r: (colorDef at: 1) g: (colorDef at: 2) b: (colorDef at: 3)) alpha: (colorDef at: 4)].\r\tself error: 'Undefined color definition'! !\r\r!Color class methodsFor: 'instance creation' stamp: 'sw 8/8/97 22:03'!\rfromRgbTriplet: list\r\t^ self r: list first g: list second b: list last! !\r\r!Color class methodsFor: 'instance creation' stamp: 'dvf 6/16/2000 17:48'!\rfromString: aString\r\t\"for HTML color spec: #FFCCAA or white/black\"\r\t\"Color fromString: '#FFCCAA'.\r\t Color fromString: 'white'.\r\t Color fromString: 'orange'\"\r\t| aColorHex red green blue |\r\taString isEmptyOrNil ifTrue: [^ Color white].\r\taString first = $#\r\t\tifTrue: [aColorHex _ aString copyFrom: 2 to: aString size]\r\t\tifFalse: [aColorHex _ aString].\r\t[aColorHex size = 6\r\t\tifTrue:\r\t\t\t[aColorHex _ aColorHex asUppercase.\r\t\t\tred _ ('16r', (aColorHex copyFrom: 1 to: 2)) asNumber/255.\r\t\t\tgreen _ ('16r', (aColorHex copyFrom: 3 to: 4)) asNumber/255.\r\t\t\tblue _ ('16r', (aColorHex copyFrom: 5 to: 6)) asNumber/255.\r\t\t\t^ self r: red g: green b: blue]]\r\tifError: [:err :rcvr | \"not a hex color triplet\" ].\r\t\r\t\"try to match aColorHex with known named colors\"\r\taColorHex _ aColorHex asLowercase.\r\r\t^self perform: (ColorNames detect: [:i | i asString asLowercase = aColorHex]\r\t\tifNone: [#white])! !\r\r!Color class methodsFor: 'instance creation' stamp: 'jm 12/4/97 13:05'!\rgray: brightness\r\t\"Return a gray shade with the given brightness in the range [0.0..1.0].\"\r\r\t^ self basicNew setRed: brightness green: brightness blue: brightness\r! !\r\r!Color class methodsFor: 'instance creation'!\rh: hue s: saturation v: brightness\r\t\"Create a color with the given hue, saturation, and brightness. Hue is given as the angle in degrees of the color on the color circle where red is zero degrees. Saturation and brightness are numbers in [0.0..1.0] where larger values are more saturated or brighter colors. For example, (Color h: 0 s: 1 v: 1) is pure red.\"\r\t\"Note: By convention, brightness is abbreviated 'v' to to avoid confusion with blue.\"\r\r\t^ self basicNew setHue: hue saturation: saturation brightness: brightness! !\r\r!Color class methodsFor: 'instance creation' stamp: 'dew 3/19/2002 23:49'!\rh: h s: s v: v alpha: alpha\r\r\t^ (self h: h s: s v: v) alpha: alpha! !\r\r!Color class methodsFor: 'instance creation'!\rnew\r\r\t^ self r: 0.0 g: 0.0 b: 0.0! !\r\r!Color class methodsFor: 'instance creation' stamp: 'jm 12/4/97 13:04'!\rr: r g: g b: b\r\t\"Return a color with the given r, g, and b components in the range [0.0..1.0].\"\r\r\t^ self basicNew setRed: r green: g blue: b\r! !\r\r!Color class methodsFor: 'instance creation'!\rr: r g: g b: b alpha: alpha\r\r\t^ (self r: r g: g b: b) alpha: alpha! !\r\r!Color class methodsFor: 'instance creation'!\rr: r g: g b: b range: range\r\t\"Return a color with the given r, g, and b components specified as integers in the range [0..r]. This avoids the floating point arithmetic in the red:green:blue: message and is thus a bit faster for certain applications (such as computing a sequence of colors for a palette).\"\r\r\t^ self basicNew setRed: r green: g blue: b range: range! !\r\r!Color class methodsFor: 'instance creation'!\rrandom\r\t\"Return a random color that isn't too dark or under-saturated.\"\r\r\t^ self basicNew\r\t\tsetHue: (360.0 * RandomStream next)\r\t\tsaturation: (0.3 + (RandomStream next * 0.7))\r\t\tbrightness: (0.4 + (RandomStream next * 0.6))! !\r\r\r!Color class methodsFor: 'class initialization'!\rinitialize\r\t\"Color initialize\"\r\r\t\"Details: Externally, the red, green, and blue components of color\r\tare floats in the range [0.0..1.0]. Internally, they are represented\r\tas integers in the range [0..ComponentMask] packing into a\r\tsmall integer to save space and to allow fast hashing and\r\tequality testing.\r\r\tFor a general description of color representations for computer\r\tgraphics, including the relationship between the RGB and HSV\r\tcolor models used here, see Chapter 17 of Foley and van Dam,\r\tFundamentals of Interactive Computer Graphics, Addison-Wesley,\r\t1982.\"\r\r\tComponentMask _ 1023.\r\tHalfComponentMask _ 512.  \"used to round up in integer calculations\"\r\tComponentMax _ 1023.0.  \"a Float used to normalize components\"\r\tRedShift _ 20.\r\tGreenShift _ 10.\r\tBlueShift _ 0.\r\r\tPureRed\t\t _ self r: 1 g: 0 b: 0.\r\tPureGreen\t _ self r: 0 g: 1 b: 0.\r\tPureBlue\t _ self r: 0 g: 0 b: 1.\r\tPureYellow\t _ self r: 1 g: 1 b: 0.\r\tPureCyan\t _ self r: 0 g: 1 b: 1.\r\tPureMagenta _ self r: 1 g: 0 b: 1.\r\r\tRandomStream _ Random new.\r\r\tself initializeIndexedColors.\r\tself initializeGrayToIndexMap.\r\tself initializeNames.\r\tself initializeHighLights.\r! !\r\r!Color class methodsFor: 'class initialization'!\rinitializeGrayToIndexMap\r\t\"Build an array of gray values available in the 8-bit colormap. This array is indexed by a gray level between black (1) and white (256) and returns the pixel value for the corresponding gray level.\"\r\t\"Note: This method must be called after initializeIndexedColors, since it uses IndexedColors.\"\r\t\"Color initializeGrayToIndexMap\"\r\r\t| grayLevels grayIndices c distToClosest dist indexOfClosest |\r\t\"record the level and index of each gray in the 8-bit color table\"\r\tgrayLevels _ OrderedCollection new.\r\tgrayIndices _ OrderedCollection new.\r\t\"Note: skip the first entry, which is reserved for transparent\"\r\t2 to: IndexedColors size do: [:i |\r\t\tc _ IndexedColors at: i.\r\t\tc saturation = 0.0 ifTrue: [  \"c is a gray\"\r\t\t\tgrayLevels add: (c privateBlue) >> 2.  \"top 8 bits; R, G, and B are the same\"\r\t\t\tgrayIndices add: i - 1]].  \"pixel values are zero-based\"\r\tgrayLevels _ grayLevels asArray.\r\tgrayIndices _ grayIndices asArray.\r\r\t\"for each gray level in [0..255], select the closest match\"\r\tGrayToIndexMap _ ByteArray new: 256.\r\t0 to: 255 do: [:level |\r\t\tdistToClosest _ 10000.  \"greater than distance to any real gray\"\r\t\t1 to: grayLevels size do: [:i |\r\t\t\tdist _ (level - (grayLevels at: i)) abs.\r\t\t\tdist < distToClosest ifTrue: [\r\t\t\t\tdistToClosest _ dist.\r\t\t\t\tindexOfClosest _ grayIndices at: i]].\r\t\tGrayToIndexMap at: (level + 1) put: indexOfClosest].\r! !\r\r!Color class methodsFor: 'class initialization' stamp: 'tk 6/22/96'!\rinitializeHighLights\r\t\"Create a set of Bitmaps for quickly reversing areas of the screen without converting colors. \"\r\t\"Color initializeHighLights\"\r\r\t| t |\r\tt _ Array new: 32.\r\tt at: 1 put: (Bitmap with: 16rFFFFFFFF).\r\tt at: 2 put: (Bitmap with: 16rFFFFFFFF).\r\tt at: 4 put: (Bitmap with: 16r55555555).\r\tt at: 8 put: (Bitmap with: 16r7070707).\r\tt at: 16 put: (Bitmap with: 16rFFFFFFFF).\r\tt at: 32 put: (Bitmap with: 16rFFFFFFFF).\r\tHighLightBitmaps _ t.\r! !\r\r!Color class methodsFor: 'class initialization'!\rinitializeIndexedColors\r\t\"Build an array of colors corresponding to the fixed colormap used\r\t for display depths of 1, 2, 4, or 8 bits.\"\r\t\"Color initializeIndexedColors\"\r\r\t| a index grayVal |\r\ta _ Array new: 256.\r\r\t\"1-bit colors (monochrome)\"\r\ta at: 1 put: (Color r: 1.0 g: 1.0 b: 1.0).\t\t\"white or transparent\"\r\ta at: 2 put: (Color r: 0.0 g: 0.0 b: 0.0).\t\"black\"\r\r\t\"additional colors for 2-bit color\"\r\ta at: 3 put: (Color r: 1.0 g: 1.0 b: 1.0).\t\"opaque white\"\r\ta at: 4 put: (Color r: 0.5 g: 0.5 b: 0.5).\t\"1/2 gray\"\r\r\t\"additional colors for 4-bit color\"\r\ta at:  5 put: (Color r: 1.0 g: 0.0 b: 0.0).\t\"red\"\r\ta at:  6 put: (Color r: 0.0 g: 1.0 b: 0.0).\t\"green\"\r\ta at:  7 put: (Color r: 0.0 g: 0.0 b: 1.0).\t\"blue\"\r\ta at:  8 put: (Color r: 0.0 g: 1.0 b: 1.0).\t\"cyan\"\r\ta at:  9 put: (Color r: 1.0 g: 1.0 b: 0.0).\t\"yellow\"\r\ta at: 10 put: (Color r: 1.0 g: 0.0 b: 1.0).\t\"magenta\"\r\r\ta at: 11 put: (Color r: 0.125 g: 0.125 b: 0.125).\t\t\"1/8 gray\"\r\ta at: 12 put: (Color r: 0.25 g: 0.25 b: 0.25).\t\t\"2/8 gray\"\r\ta at: 13 put: (Color r: 0.375 g: 0.375 b: 0.375).\t\t\"3/8 gray\"\r\ta at: 14 put: (Color r: 0.625 g: 0.625 b: 0.625).\t\t\"5/8 gray\"\r\ta at: 15 put: (Color r: 0.75 g: 0.75 b: 0.75).\t\t\"6/8 gray\"\r\ta at: 16 put: (Color r: 0.875 g: 0.875 b: 0.875).\t\t\"7/8 gray\"\r\r\t\"additional colors for 8-bit color\"\r\t\"24 more shades of gray (1/32 increments but not repeating 1/8 increments)\"\r\tindex _ 17.\r\t1 to: 31 do: [:v |\r\t\t(v \\\\ 4) = 0 ifFalse: [\r\t\t\tgrayVal _ v / 32.0.\r\t\t\ta at: index put: (Color r: grayVal g: grayVal b: grayVal).\r\t\t\tindex _ index + 1]].\r\r\t\"The remainder of color table defines a color cube with six steps\r\t for each primary color. Note that the corners of this cube repeat\r\t previous colors, but this simplifies the mapping between RGB colors\r\t and color map indices. This color cube spans indices 40 through 255\r\t (indices 41-256 in this 1-based array).\"\r\t0 to: 5 do: [:r |\r\t\t0 to: 5 do: [:g |\r\t\t\t0 to: 5 do: [:b |\r\t\t\t\tindex _ 41 + ((36 * r) + (6 * b) + g).\r\t\t\t\tindex > 256 ifTrue: [\r\t\t\t\t\tself error: 'index out of range in color table compuation'].\r\t\t\t\ta at: index put: (Color r: r g: g b: b range: 5)]]].\r\r\tIndexedColors _ a.\r! !\r\r!Color class methodsFor: 'class initialization' stamp: 'dwh 7/7/1999 23:57'!\rinitializeNames\r\t\"Name some colors.\"\r\t\"Color initializeNames\"\r\r\tColorNames _ OrderedCollection new.\r\tself named: #black put: (Color r: 0 g: 0 b: 0).\r\tself named: #veryVeryDarkGray put: (Color r: 0.125 g: 0.125 b: 0.125).\r\tself named: #veryDarkGray put: (Color r: 0.25 g: 0.25 b: 0.25).\r\tself named: #darkGray put: (Color r: 0.375 g: 0.375 b: 0.375).\r\tself named: #gray put: (Color r: 0.5 g: 0.5 b: 0.5).\r\tself named: #lightGray put: (Color r: 0.625 g: 0.625 b: 0.625).\r\tself named: #veryLightGray put: (Color r: 0.75 g: 0.75 b: 0.75).\r\tself named: #veryVeryLightGray put: (Color r: 0.875 g: 0.875 b: 0.875).\r\tself named: #white put: (Color r: 1.0 g: 1.0 b: 1.0).\r\tself named: #red put: (Color r: 1.0 g: 0 b: 0).\r\tself named: #yellow put: (Color r: 1.0 g: 1.0 b: 0).\r\tself named: #green put: (Color r: 0 g: 1.0 b: 0).\r\tself named: #cyan put: (Color r: 0 g: 1.0 b: 1.0).\r\tself named: #blue put: (Color r: 0 g: 0 b: 1.0).\r\tself named: #magenta put: (Color r: 1.0 g: 0 b: 1.0).\r\tself named: #brown put: (Color r: 0.6 g: 0.2 b: 0).\r\tself named: #orange put: (Color r: 1.0 g: 0.6 b: 0).\r\tself named: #lightRed put: (Color r: 1.0 g: 0.8 b: 0.8).\r\tself named: #lightYellow put: (Color r: 1.0 g: 1.0 b: 0.8).\r\tself named: #lightGreen put: (Color r: 0.8 g: 1.0 b: 0.6).\r\tself named: #lightCyan put: (Color r: 0.4 g: 1.0 b: 1.0).\r\tself named: #lightBlue put: (Color r: 0.8 g: 1.0 b: 1.0).\r\tself named: #lightMagenta put: (Color r: 1.0 g: 0.8 b: 1.0).\r\tself named: #lightBrown put: (Color r: 1.0 g: 0.6 b: 0.2).\r\tself named: #lightOrange put: (Color r: 1.0 g: 0.8 b: 0.4).\r\tself named: #transparent put: (TranslucentColor new alpha: 0.0).\r\tself named: #paleBuff put: (Color r: 254 g: 250 b: 235 range: 255).\r\tself named: #paleBlue put: (Color r: 222 g: 249 b: 254 range: 255).\r\tself named: #paleYellow put: (Color r: 255 g: 255 b: 217 range: 255).\r\tself named: #paleGreen put: (Color r: 223 g: 255 b: 213 range: 255).\r\tself named: #paleRed put: (Color r: 255 g: 230 b: 230 range: 255).\r\tself named: #veryPaleRed put: (Color r: 255 g: 242 b: 242 range: 255).\r\tself named: #paleTan put: (Color r: 235 g: 224 b: 199 range: 255).\r\tself named: #paleMagenta put: (Color r: 255 g: 230 b: 255 range: 255).\r\tself named: #paleOrange put: (Color r: 253 g: 237 b: 215 range: 255).\r\tself named: #palePeach put: (Color r: 255 g: 237 b: 213 range: 255).\r\r! !\r\r!Color class methodsFor: 'class initialization' stamp: 'ar 2/16/2000 21:56'!\rinitializeTranslucentPatterns\r\t\"Color initializeTranslucentPatterns\"\r\t| mask bits pattern patternList |\r\tTranslucentPatterns _ Array new: 8.\r\t#(1 2 4 8) do:[:d|\r\t\tpatternList _ Array new: 5.\r\t\tmask _ (1 bitShift: d) - 1.\r\t\tbits _ 2 * d.\r\t\t[bits >= 32] whileFalse: [\r\t\t\tmask _ mask bitOr: (mask bitShift: bits).  \"double the length of mask\"\r\t\t\tbits _ bits + bits].\r\t\t\"0% pattern\"\r\t\tpattern _ Bitmap with: 0 with: 0.\r\t\tpatternList at: 1 put: pattern.\r\t\t\"25% pattern\"\r\t\tpattern _ Bitmap with: mask with: 0.\r\t\tpatternList at: 2 put: pattern.\r\t\t\"50% pattern\"\r\t\tpattern _ Bitmap with: mask with: mask bitInvert32.\r\t\tpatternList at: 3 put: pattern.\r\t\t\"75% pattern\"\r\t\tpattern _ Bitmap with: mask with: 16rFFFFFFFF.\r\t\tpatternList at: 4 put: pattern.\r\t\t\"100% pattern\"\r\t\tpattern _ Bitmap with: 16rFFFFFFFF with: 16rFFFFFFFF.\r\t\tpatternList at: 5 put: pattern.\r\t\tTranslucentPatterns at: d put: patternList.\r\t].! !\r\r!Color class methodsFor: 'class initialization' stamp: 'tk 6/13/96'!\rnamed: newName put: aColor\r\t\"Add a new color to the list and create an access message and a class variable for it.  The name should start with a lowercase letter.  (The class variable will start with an uppercase letter.)  (Color colorNames) returns a list of all color names.  \"\r\t| str cap sym accessor csym |\r\t(aColor isKindOf: self) ifFalse: [^ self error: 'not a Color'].\r\tstr _ newName asString.\r\tsym _ str asSymbol.\r\tcap _ str capitalized.\r\tcsym _ cap asSymbol.\r\t(self class canUnderstand: sym) ifFalse: [\r\t\t\"define access message\"\r\t\taccessor _ str, (String with: Character cr with: Character tab), \t\t\t'^', cap.\r\t\tself class compile: accessor\r\t\t\tclassified: 'named colors'].\r\t(self classPool includesKey: csym) ifFalse: [\r\t\tself addClassVarName: cap].\r\t(ColorNames includes: sym) ifFalse: [\r\t\tColorNames add: sym].\r\t^ self classPool at: csym put: aColor! !\r\r\r!Color class methodsFor: 'examples'!\rcolorRampForDepth: depth extent: aPoint\r\t\"Returns a form of the given size showing R, G, B, and gray ramps for the given depth. Useful for testing color conversions between different depths.\"\r\t\"(Color colorRampForDepth: Display depth extent: 256@80) display\"\r\t\"(Color colorRampForDepth: 32 extent: 256@80) displayOn: Display at: 0@0 rule: Form paint\"\r\r\t| f dx dy r |\r\tf _ Form extent: aPoint depth: depth.\r\tdx _ aPoint x // 256.\r\tdy _ aPoint y // 4.\r\t0 to: 255 do: [:i |\r\t\tr _ (dx * i)@0 extent: dx@dy.\r\t\tf fill: r fillColor: (Color r: i g: 0 b: 0 range: 255).\r\t\tr _ r translateBy: 0@dy.\r\t\tf fill: r fillColor: (Color r: 0 g: i b: 0 range: 255).\r\t\tr _ r translateBy: 0@dy.\r\t\tf fill: r fillColor: (Color r: 0 g: 0 b: i range: 255).\r\t\tr _ r translateBy: 0@dy.\r\t\tf fill: r fillColor: (Color r: i g: i b: i range: 255)].\r\t^ f\r! !\r\r!Color class methodsFor: 'examples' stamp: 'tk 6/19/96'!\rhotColdShades: thisMany\r\t\"An array of thisMany colors showing temperature from blue to red to white hot.  (Later improve this by swinging in hue.)  \"\r\t\"Color showColors: (Color hotColdShades: 25)\"\r\r\t| n s1 s2 s3 s4 s5 |\r\tthisMany < 5 ifTrue: [^ self error: 'must be at least 5 shades'].\r\tn _ thisMany // 5.\r\ts1 _ self white mix: self yellow shades: (thisMany - (n*4)).\r\ts2 _ self yellow mix: self red shades: n+1.\r\ts2 _ s2 copyFrom: 2 to: n+1.\r\ts3 _ self red mix: self green darker shades: n+1.\r\ts3 _ s3 copyFrom: 2 to: n+1.\r\ts4 _ self green darker mix: self blue shades: n+1.\r\ts4 _ s4 copyFrom: 2 to: n+1.\r\ts5 _ self blue mix: self black shades: n+1.\r\ts5 _ s5 copyFrom: 2 to: n+1.\r\t^ s1, s2, s3, s4, s5\r! !\r\r!Color class methodsFor: 'examples'!\rshowColorCube\r\t\"Show a 12x12x12 color cube.\"\r\t\"Color showColorCube\"\r\r\t0 to: 11 do: [:r |\r\t\t0 to: 11 do: [:g |\r\t\t\t0 to: 11 do: [:b |\t\r\t\t\t\tDisplay fill: (((r*60) + (b*5)) @ (g*5) extent: 5@5)\r\t\t\t\t\tfillColor: (Color r: r g: g b: b range: 11)]]].\r! !\r\r!Color class methodsFor: 'examples'!\rshowColors: colorList\r\t\"Display the given collection of colors across the top of the Display.\"\r\r\t| w r |\r\tw _ Display width // colorList size.\r\tr _ 0@0 extent: w@((w min: 30) max: 10).\r\tcolorList do: [:c |\r\t\tDisplay fill: r fillColor: c.\r\t\tr _ r translateBy: w@0].\r! !\r\r!Color class methodsFor: 'examples'!\rshowHSVPalettes\r\t\"Shows a palette of hues, varying the saturation and brightness for each one. Best results are with depths 16 and 32.\"\r\t\"Color showHSVPalettes\"\r\r\t| left top c |\r\tleft _ top _ 0.\r\t0 to: 179 by: 15 do: [:h |\r\t\t0 to: 10 do: [:s |\r\t\t\tleft _ (h * 4) + (s * 4).\r\t\t\t0 to: 10 do: [:v |\r\t\t\t\tc _ Color h: h s: s asFloat / 10.0 v: v asFloat / 10.0.\r\t\t\t\ttop _ (v * 4).\r\t\t\t\tDisplay fill: (left@top extent: 4@4) fillColor: c.\r\r\t\t\t\tc _ Color h: h + 180 s: s asFloat / 10.0 v: v asFloat / 10.0.\r\t\t\t\ttop _ (v * 4) + 50.\r\t\t\t\tDisplay fill: (left@top extent: 4@4) fillColor: c]]].\r! !\r\r!Color class methodsFor: 'examples'!\rshowHuesInteractively\r\t\"Shows a palette of hues at a (saturation, brightness) point determined by the mouse position. Click the mouse button to exit and return the selected (saturation, brightness) point.\"\r\t\"Color showHuesInteractively\"\r\r\t| p s v |\r\t[Sensor anyButtonPressed] whileFalse: [\r\t\tp _ Sensor cursorPoint.\r\t\ts _ p x asFloat / 300.0.\r\t\tv _ p y asFloat / 300.0.\r\t\tself showColors: (self wheel: 12 saturation: s brightness: v)].\r\t^ (s min: 1.0) @ (v min: 1.0)! !\r\r!Color class methodsFor: 'examples'!\rwheel: thisMany\r\t\"Return a collection of thisMany colors evenly spaced around the color wheel.\"\r\t\"Color showColors: (Color wheel: 12)\"\r\r\t^ Color wheel: thisMany saturation: 0.9 brightness: 0.7\r! !\r\r!Color class methodsFor: 'examples'!\rwheel: thisMany saturation: s brightness: v\r\t\"Return a collection of thisMany colors evenly spaced around the color wheel, all of the given saturation and brightness.\"\r\t\"Color showColors: (Color wheel: 12 saturation: 0.4 brightness: 1.0)\"\r\t\"Color showColors: (Color wheel: 12 saturation: 0.8 brightness: 0.5)\"\r\r\t^ (Color h: 0.0 s: s v: v) wheel: thisMany\r! !\r\r\r!Color class methodsFor: 'named colors'!\rblack\r\t^Black! !\r\r!Color class methodsFor: 'named colors'!\rblue\r\t^Blue! !\r\r!Color class methodsFor: 'named colors'!\rbrown\r\t^Brown! !\r\r!Color class methodsFor: 'named colors'!\rcyan\r\t^Cyan! !\r\r!Color class methodsFor: 'named colors'!\rdarkGray\r\t^DarkGray! !\r\r!Color class methodsFor: 'named colors'!\rgray\r\t^Gray! !\r\r!Color class methodsFor: 'named colors'!\rgreen\r\t^Green! !\r\r!Color class methodsFor: 'named colors'!\rlightBlue\r\t^LightBlue! !\r\r!Color class methodsFor: 'named colors'!\rlightBrown\r\t^LightBrown! !\r\r!Color class methodsFor: 'named colors'!\rlightCyan\r\t^LightCyan! !\r\r!Color class methodsFor: 'named colors'!\rlightGray\r\t^LightGray! !\r\r!Color class methodsFor: 'named colors'!\rlightGreen\r\t^LightGreen! !\r\r!Color class methodsFor: 'named colors'!\rlightMagenta\r\t^LightMagenta! !\r\r!Color class methodsFor: 'named colors'!\rlightOrange\r\t^LightOrange! !\r\r!Color class methodsFor: 'named colors'!\rlightRed\r\t^LightRed! !\r\r!Color class methodsFor: 'named colors'!\rlightYellow\r\t^LightYellow! !\r\r!Color class methodsFor: 'named colors'!\rmagenta\r\t^Magenta! !\r\r!Color class methodsFor: 'named colors'!\rorange\r\t^Orange! !\r\r!Color class methodsFor: 'named colors' stamp: 'dwh 7/7/1999 23:56'!\rpaleBlue\r\t^PaleBlue! !\r\r!Color class methodsFor: 'named colors' stamp: 'dwh 7/7/1999 23:56'!\rpaleBuff\r\t^PaleBuff! !\r\r!Color class methodsFor: 'named colors' stamp: 'dwh 7/7/1999 23:56'!\rpaleGreen\r\t^PaleGreen! !\r\r!Color class methodsFor: 'named colors' stamp: 'dwh 7/7/1999 23:56'!\rpaleMagenta\r\t^PaleMagenta! !\r\r!Color class methodsFor: 'named colors' stamp: 'dwh 7/7/1999 23:56'!\rpaleOrange\r\t^PaleOrange! !\r\r!Color class methodsFor: 'named colors' stamp: 'dwh 7/7/1999 23:56'!\rpalePeach\r\t^PalePeach! !\r\r!Color class methodsFor: 'named colors' stamp: 'dwh 7/7/1999 23:56'!\rpaleRed\r\t^PaleRed! !\r\r!Color class methodsFor: 'named colors' stamp: 'dwh 7/7/1999 23:56'!\rpaleTan\r\t^PaleTan! !\r\r!Color class methodsFor: 'named colors' stamp: 'dwh 7/7/1999 23:56'!\rpaleYellow\r\t^PaleYellow! !\r\r!Color class methodsFor: 'named colors'!\rred\r\t^Red! !\r\r!Color class methodsFor: 'named colors' stamp: 'wod 5/24/1998 01:56'!\rtan\r\t^  Color r: 0.8 g: 0.8 b: 0.5! !\r\r!Color class methodsFor: 'named colors'!\rtransparent\r\t^Transparent! !\r\r!Color class methodsFor: 'named colors'!\rveryDarkGray\r\t^VeryDarkGray! !\r\r!Color class methodsFor: 'named colors'!\rveryLightGray\r\t^VeryLightGray! !\r\r!Color class methodsFor: 'named colors' stamp: 'dwh 7/7/1999 23:56'!\rveryPaleRed\r\t^VeryPaleRed! !\r\r!Color class methodsFor: 'named colors'!\rveryVeryDarkGray\r\t^VeryVeryDarkGray! !\r\r!Color class methodsFor: 'named colors'!\rveryVeryLightGray\r\t^VeryVeryLightGray! !\r\r!Color class methodsFor: 'named colors'!\rwhite\r\t^White! !\r\r!Color class methodsFor: 'named colors'!\ryellow\r\t^Yellow! !\r\r\r!Color class methodsFor: 'colormaps' stamp: 'jm 5/2/1999 07:24'!\rcachedColormapFrom: sourceDepth to: destDepth\r\t\"Return a cached colormap for mapping between the given depths. Always return a real colormap, not nil; this allows the client to get an identity colormap that can then be copied and modified to do color transformations.\"\r\t\"Note: This method returns a shared, cached colormap to save time and space. Clients that need to modify a colormap returned by this method should make a copy and modify that!!\"\r\t\"Note: The colormap cache may be cleared by evaluating 'Color shutDown'.\"\r\r\t| srcIndex map |\r\tCachedColormaps class == Array ifFalse: [CachedColormaps _ (1 to: 9) collect: [:i | Array new: 32]].\r\tsrcIndex _ sourceDepth.\r\tsourceDepth > 8 ifTrue: [srcIndex _ 9].\r\t(map _ (CachedColormaps at: srcIndex) at: destDepth) ~~ nil ifTrue: [^ map].\r\r\tmap _ self computeColormapFrom: sourceDepth to: destDepth.\r\t(CachedColormaps at: srcIndex) at: destDepth put: map.\r\t^ map\r! !\r\r!Color class methodsFor: 'colormaps'!\rcolorMapIfNeededFrom: sourceDepth to: destDepth\r\t\"Return a colormap for mapping between the given depths, or nil if no colormap is needed.\"\r\t\"Note: This method returns a shared, cached colormap to save time and space. Clients that need to modify a colormap returned by this method should make a copy and modify that!!\"\r\r\tsourceDepth = destDepth ifTrue: [^ nil].  \"not needed if depths are the same\"\r\r\t(sourceDepth >= 16) & (destDepth >= 16) ifTrue: [\r\t\t\"mapping is done in BitBlt by zero-filling or truncating each color component\"\r\t\t^ nil].\r\r\t^ Color cachedColormapFrom: sourceDepth to: destDepth\r! !\r\r!Color class methodsFor: 'colormaps' stamp: 'jm 3/25/1999 19:48'!\rcomputeColormapFrom: sourceDepth to: destDepth\r\t\"Compute a colorMap for translating between the given depths. A colormap is a Bitmap whose entries contain the pixel values for the destination depth. Typical clients use cachedColormapFrom:to: instead.\"\r\r\t| map bitsPerColor |\r\tsourceDepth < 16 ifTrue: [\r\t\t\"source is 1-, 2-, 4-, or 8-bit indexed color\"\r\t\tmap _ (IndexedColors copyFrom: 1 to: (1 bitShift: sourceDepth))\r\t\t\t\t\tcollect: [:c | c pixelValueForDepth: destDepth].\r\t\tmap _ map as: Bitmap.\r\t] ifFalse: [\r\t\t\"source is 16-bit or 32-bit RGB\"\r\t\tdestDepth > 8\r\t\t\tifTrue: [bitsPerColor _ 5]  \"retain maximum color resolution\"\r\t\t\tifFalse: [bitsPerColor _ 4].\r\t\tmap _ self computeRGBColormapFor: destDepth bitsPerColor: bitsPerColor].\r\r\t\"Note: zero is transparent except when source depth is one-bit deep\"\r\tsourceDepth > 1 ifTrue: [map at: 1 put: 0].\r\t^ map\r! !\r\r!Color class methodsFor: 'colormaps' stamp: 'jm 12/4/97 15:25'!\rcomputeRGBColormapFor: destDepth bitsPerColor: bitsPerColor\r\t\"Compute a colorMap for translating from 16-bit or 32-bit RGB color to the given depth, using the given number of of bits per color component.\"\r\r\t| mask map c |\r\t(#(3 4 5) includes: bitsPerColor)\r\t\tifFalse: [self error: 'BitBlt only supports 3, 4, or 5 bits per color component'].\r\tmask _ (1 bitShift: bitsPerColor) - 1.\r\tmap _ Bitmap new: (1 bitShift: (3 * bitsPerColor)).\r\t0 to: map size - 1 do: [:i |\r\t\tc _ Color\r\t\t\tr: ((i bitShift: 0 - (2 * bitsPerColor)) bitAnd: mask)\r\t\t\tg: ((i bitShift: 0 - bitsPerColor) bitAnd: mask)\r\t\t\tb: ((i bitShift: 0) bitAnd: mask)\r\t\t\trange: mask.\r\t\tmap at: i + 1 put: (c pixelValueForDepth: destDepth)].\r\r\tmap at: 1 put: (Color transparent pixelWordForDepth: destDepth).  \"zero always transparent\"\r\t^ map\r! !\r\r\r!Color class methodsFor: 'other'!\rcolorNames\r\t\"Return a collection of color names.\"\r\r\t^ ColorNames! !\r\r!Color class methodsFor: 'other'!\rindexedColors\r\r\t^ IndexedColors! !\r\r!Color class methodsFor: 'other' stamp: 'di 3/29/1999 13:33'!\rmaskingMap: depth\r\t\"Return a color map that maps all colors except transparent to words of all ones. Used to create a mask for a Form whose transparent pixel value is zero. Cache the most recently used map.\"\r\r\t| sizeNeeded |\r\tdepth <= 8\r\t\tifTrue: [sizeNeeded _ 1 bitShift: depth]\r\t\tifFalse: [sizeNeeded _ 4096].\r\r\t(MaskingMap == nil or: [MaskingMap size ~= sizeNeeded]) ifTrue:\r\t\t[MaskingMap _ Bitmap new: sizeNeeded withAll: 16rFFFFFFFF.\r\t\tMaskingMap at: 1 put: 0.  \"transparent\"].\r\r\t^ MaskingMap\r! !\r\r!Color class methodsFor: 'other'!\rpixelScreenForDepth: depth\r\t\"Return a 50% stipple containing alternating pixels of all-zeros and all-ones to be used as a mask at the given depth.\"\r\r\t| mask bits |\r\tmask _ (1 bitShift: depth) - 1.\r\tbits _ 2 * depth.\r\t[bits >= 32] whileFalse: [\r\t\tmask _ mask bitOr: (mask bitShift: bits).  \"double the length of mask\"\r\t\tbits _ bits + bits].\r\t^ Bitmap with: mask with: mask bitInvert32\r! !\r\r!Color class methodsFor: 'other'!\rquickHighLight: depth\r\t\"Quickly return a Bitblt-ready raw colorValue for highlighting areas.  6/22/96 tk\"\r\r\t^ HighLightBitmaps at: depth! !\r\r!Color class methodsFor: 'other'!\rshutDown\r\t\"Color shutDown\"\r\r\tColorChart _ nil.\t\t\"Palette of colors for the user to pick from\"\r\tCachedColormaps _ nil.\t\"Maps to translate between color depths\"\r\tMaskingMap _ nil.\t\t\"Maps all colors except transparent to black for creating a mask\"\r! !\r\r!Color class methodsFor: 'other' stamp: 'ar 2/16/2000 21:56'!\rtranslucentMaskFor: alphaValue depth: d\r\t\"Return a pattern representing a mask usable for stipple transparency\"\r\t^(TranslucentPatterns at: d) at: ((alphaValue min: 1.0 max: 0.0) * 4) rounded + 1! !\r\r\r!Color class methodsFor: 'color from user' stamp: 'jm 12/5/97 18:35'!\rcolorPaletteForDepth: depth extent: chartExtent\r\t\"Display a palette of colors sorted horizontally by hue and vertically by lightness. Useful for eyeballing the color gamut of the display, or for choosing a color interactively.\"\r\t\"Note: It is slow to build this palette, so it should be cached for quick access.\"\r\t\"(Color colorPaletteForDepth: 16 extent: 190@60) display\"\r\r\t| basicHue x y c startHue palette transHt vSteps transCaption grayWidth hSteps |\r\tpalette _ Form extent: chartExtent depth: depth.\r\ttransCaption _ \"(DisplayText text: 'no color' asText textStyle: (TextConstants at: #ComicPlain)) form storeString\"\r\t\t(Form extent: 34@9 depth: 1\r\t\t\tfromArray: #(0 0 256 0 256 0 3808663859 2147483648 2491688266 2147483648 2491688266 0 2491688266 0 2466486578 0 0 0)\r\t\t\toffset: 0@0).\r\ttransHt _ transCaption height.\r\tpalette fillWhite: (0@0 extent: palette width@transHt).\r\tpalette fillBlack: (0@transHt extent: palette width@1).\r\ttransCaption displayOn: palette at: palette boundingBox topCenter - ((transCaption width // 2)@0).\r\tgrayWidth _ 10.\r\tstartHue _ 338.0.\r\tvSteps _ palette height - transHt // 2.\r\thSteps _ palette width - grayWidth.\r\tx _ 0.\r\tstartHue to: startHue + 360.0 by: 360.0/hSteps do: [:h |\r\t\tbasicHue _ Color h: h asFloat s: 1.0 v: 1.0.\r\t\ty _ transHt+1.\r\t\t0 to: vSteps do: [:n |\r \t\t\tc _ basicHue mixed: (n asFloat / vSteps asFloat) with: Color white.\r\t\t\tpalette fill: (x@y extent: 1@1) fillColor: c.\r\t\t\ty _ y + 1].\r\t\t1 to: vSteps do: [:n |\r \t\t\tc _ Color black mixed: (n asFloat / vSteps asFloat) with: basicHue.\r\t\t\tpalette fill: (x@y extent: 1@1) fillColor: c.\r\t\t\ty _ y + 1].\r\t\tx _ x + 1].\r\ty _ transHt + 1.\r\t1 to: vSteps * 2 do: [:n |\r \t\tc _ Color black mixed: (n asFloat / (vSteps*2) asFloat) with: Color white.\r\t\tpalette fill: (x@y extent: 10@1) fillColor: c.\r\t\ty _ y + 1].\r\t^ palette\r! !\r\r!Color class methodsFor: 'color from user' stamp: 'jm 1/19/1999 11:33'!\rcolorTest: depth extent: chartExtent colorMapper: colorMapper\r\t\"Create a palette of colors sorted horizontally by hue and vertically by lightness. Useful for eyeballing the color gamut of the display, or for choosing a color interactively.\"\r\t\"Note: It is slow to build this palette, so it should be cached for quick access.\"\r\t\"(Color colorTest: 32 extent: 570@180 colorMapper: [:c | c]) display\"\r\t\"(Color colorTest: 32 extent: 570@180 colorMapper:\r\t\t[:c | Color\r\t\t\tr: (c red * 7) asInteger / 7\r\t\t\tg: (c green * 7) asInteger / 7\r\t\t\tb: (c blue * 3) asInteger / 3]) display\"\r\t\"(Color colorTest: 32 extent: 570@180 colorMapper:\r\t\t[:c | Color\r\t\t\tr: (c red * 5) asInteger / 5\r\t\t\tg: (c green * 5) asInteger / 5\r\t\t\tb: (c blue * 5) asInteger / 5]) display\"\r\t\"(Color colorTest: 32 extent: 570@180 colorMapper:\r\t\t[:c | Color\r\t\t\tr: (c red * 15) asInteger / 15\r\t\t\tg: (c green * 15) asInteger / 15\r\t\t\tb: (c blue * 15) asInteger / 15]) display\"\r\t\"(Color colorTest: 32 extent: 570@180 colorMapper:\r\t\t[:c | Color\r\t\t\tr: (c red * 31) asInteger / 31\r\t\t\tg: (c green * 31) asInteger / 31\r\t\t\tb: (c blue * 31) asInteger / 31]) display\"\r\r\t| basicHue x y c startHue palette transHt vSteps transCaption grayWidth hSteps |\r\tpalette _ Form extent: chartExtent depth: depth.\r\ttransCaption _ \"(DisplayText text: 'no color' asText textStyle: (TextConstants at: #ComicPlain)) form storeString\"\r\t\t(Form extent: 34@9 depth: 1\r\t\t\tfromArray: #(0 0 256 0 256 0 3808663859 2147483648 2491688266 2147483648 2491688266 0 2491688266 0 2466486578 0 0 0)\r\t\t\toffset: 0@0).\r\ttransHt _ transCaption height.\r\tpalette fillWhite: (0@0 extent: palette width@transHt).\r\tpalette fillBlack: (0@transHt extent: palette width@1).\r\ttransCaption displayOn: palette at: palette boundingBox topCenter - ((transCaption width // 2)@0).\r\tgrayWidth _ 10.\r\tstartHue _ 338.0.\r\tvSteps _ palette height - transHt // 2.\r\thSteps _ palette width - grayWidth.\r\tx _ 0.\r\tstartHue to: startHue + 360.0 by: 360.0/hSteps do: [:h |\r\t\tbasicHue _ Color h: h asFloat s: 1.0 v: 1.0.\r\t\ty _ transHt+1.\r\t\t0 to: vSteps do: [:n |\r \t\t\tc _ basicHue mixed: (n asFloat / vSteps asFloat) with: Color white.\r\t\t\tc _ colorMapper value: c.\r\t\t\tpalette fill: (x@y extent: 1@1) fillColor: c.\r\t\t\ty _ y + 1].\r\t\t1 to: vSteps do: [:n |\r \t\t\tc _ Color black mixed: (n asFloat / vSteps asFloat) with: basicHue.\r\t\t\tc _ colorMapper value: c.\r\t\t\tpalette fill: (x@y extent: 1@1) fillColor: c.\r\t\t\ty _ y + 1].\r\t\tx _ x + 1].\r\ty _ transHt + 1.\r\t1 to: vSteps * 2 do: [:n |\r \t\tc _ Color black mixed: (n asFloat / (vSteps*2) asFloat) with: Color white.\r\t\tc _ colorMapper value: c.\r\t\tpalette fill: (x@y extent: 10@1) fillColor: c.\r\t\ty _ y + 1].\r\t^ palette\r! !\r\r!Color class methodsFor: 'color from user' stamp: 'di 4/13/1999 14:30'!\rfromUser\r\t\"Displays a color palette of colors, waits for a mouse click, and returns the selected color. Any pixel on the Display can be chosen, not just those in the color palette.\"\r\t\"Note: Since the color chart is cached, you may need to do 'ColorChart _ nil' after changing the oldColorPaletteForDepth:extent: method.\"\r\t\"Color fromUser\"\r\r\t| d startPt save tr oldColor c here s |\r\td _ Display depth.\r\t((ColorChart == nil) or: [ColorChart depth ~= Display depth]) \r\t\tifTrue: [ColorChart _ self oldColorPaletteForDepth: d extent: (2 * 144)@80].\r\tSensor cursorPoint y < Display center y \r\t\tifTrue: [startPt _ 0@(Display boundingBox bottom - ColorChart height)]\r\t\tifFalse: [startPt _ 0@0].\r\r\tsave _ Form fromDisplay: (startPt extent: ColorChart extent).\r\tColorChart displayAt: startPt.\r\ttr _ ColorChart extent - (50@19) corner: ColorChart extent.\r\ttr _ tr translateBy: startPt.\r\r\toldColor _ nil.\r\t[Sensor anyButtonPressed] whileFalse: [\r\t\tc _ Display colorAt: (here _ Sensor cursorPoint).\r\t\t(tr containsPoint: here)\r\t\t\tifFalse: [Display fill: (0@61+startPt extent: 20@19) fillColor: c]\r\t\t\tifTrue: [\r\t\t\t\tc _ Color transparent.\r\t\t\t\tDisplay fill: (0@61+startPt extent: 20@19) fillColor: Color white].\r\t\tc = oldColor ifFalse: [\r\t\t\tDisplay fillWhite: (20@61 + startPt extent: 135@19).\r\t\t\tc isTransparent\r\t\t\t\tifTrue: [s _ 'transparent']\r\t\t\t\tifFalse: [s _ c shortPrintString.\r\t\t\t\t\t\ts _ s copyFrom: 7 to: s size - 1].\r\t\t\ts displayAt: 20@61 + startPt.\r\t\t\toldColor _ c]].\r\tsave displayAt: startPt.\r\tSensor waitNoButton.\r\t^ c\r! !\r\r!Color class methodsFor: 'color from user' stamp: 'di 4/13/1999 14:28'!\roldColorPaletteForDepth: depth extent: paletteExtent\r\t\"Returns a form of the given size showing a color palette for the given depth.\"\r\t\"(Color oldColorPaletteForDepth: Display depth extent: 720@100) display\"\r\r\t| c p f nSteps rect w h q |\r\tf _ Form extent: paletteExtent depth: depth.\r\tf fill: f boundingBox fillColor: Color white.\r\tnSteps _ depth > 8 ifTrue: [12] ifFalse: [6].\r\tw _ paletteExtent x // (nSteps * nSteps).\r\th _ paletteExtent y - 20 // nSteps.\r\t0 to: nSteps-1 do: [:r |\r\t\t0 to: nSteps-1 do: [:g |\r\t\t\t0 to: nSteps-1 do: [:b |\r\t\t\t\tc _ Color r: r g: g b: b range: nSteps - 1.\r\t\t\t\trect _ ((r * nSteps * w) + (b * w)) @ (g * h) extent: w@(h + 1).\r\t\t\t\tf fill: rect fillColor: c]]].\r\tq _ Quadrangle origin: paletteExtent - (50@19) corner: paletteExtent.\r\tq displayOn: f.\r\t'Trans.' displayOn: f at: q origin + (9@1).\r\r\tw _ ((paletteExtent x - q width - 130) // 64) max: 1.\r\tp _ paletteExtent x - q width - (64 * w) - 1 @ (paletteExtent y - 19).\r\t0 to: 63 do:\r\t\t[:v | c _ Color r: v g: v b: v range: 63.\r\t\tf fill: ((v * w)@0 + p extent: (w + 1)@19) fillColor: c].\r\t^ f\r! !\rArrayedCollection variableWordSubclass: #ColorArray\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Arrayed'!\r\r!ColorArray methodsFor: 'accessing' stamp: 'ar 3/3/2001 20:03'!\rat: index\r\t^(super at: index) asColorOfDepth: 32! !\r\r!ColorArray methodsFor: 'accessing' stamp: 'ar 3/3/2001 20:04'!\rat: index put: aColor\r\t^super at: index put: (aColor pixelWordForDepth: 32).! !\r\r\r!ColorArray methodsFor: 'converting' stamp: 'ar 3/3/2001 20:06'!\rasColorArray\r\t^self! !\r\r!ColorArray methodsFor: 'converting' stamp: 'RAA 3/8/2001 06:24'!\rbytesPerElement\r\r\t^4! !\rForm subclass: #ColorForm\r\tinstanceVariableNames: 'colors cachedDepth cachedColormap'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Graphics-Display Objects'!\r!ColorForm commentStamp: '<historical>' prior: 0!\rColorForm is a normal Form plus a color map of up to 2^depth Colors. Typically, one reserves one entry in the color map for transparent. This allows 1, 3, 15, or 255 non-transparent colors in ColorForms of depths 1, 2, 4, and 8 bits per pixel. ColorForms don't support depths greater than 8 bits because that would require excessively large color maps with little real benefit, since 16-bit and 32-bit depths already support thousands and millions of colors.\r\rColorForms have several uses:\r  1) Precise colors. You can have up to 256 true colors, instead being limited to the 8-bit color palette.\r  2) Easy transparency. Just store (Color transparent) at the desired position in the color map.\r  3) Cheap color remapping by changing the color map.\r\rA color map is an Array of up to 2^depth Color objects. A Bitmap colorMap is automatically computed and cached for rapid display. Note that if you change the color map, you must resubmit it via the colors: method to flush this cache.\r\rColorForms can be a bit tricky. Note that:\r  a) When you BitBlt from one ColorForm to another, you must remember to copy the color map of the source ColorForm to the destination ColorForm.\r  b) A ColorForm's color map is an array of depth-independent Color objects. BitBlt requires a BitMap of actual pixel values, adjusted to the destination depth. These are different things!! ColorForms automatically maintain a cache of the BitBlt-style color map corresponding to the colors array for the last depth on which the ColorForm was displayed, so there should be little need for clients to work with BitBlt-style color maps.\r  c) The default map for 8 bit depth has black in the first entry, not transparent.  Say (cform colors at: 1 put: Color transparent).\r!\r\r\r!ColorForm methodsFor: 'accessing' stamp: 'jm 11/14/97 17:39'!\rcolors\r\t\"Return my color palette.\"\r\r\tself ensureColorArrayExists.\r\t^ colors\r! !\r\r!ColorForm methodsFor: 'accessing' stamp: 'ar 5/17/2001 15:45'!\rcolors: colorList\r\t\"Set my color palette to the given collection.\"\r\r\t| colorArray colorCount newColors |\r\tcolorList ifNil: [\r\t\tcolors _ cachedDepth _ cachedColormap _ nil.\r\t\t^ self].\r\r\tcolorArray _ colorList asArray.\r\tcolorCount _ colorArray size.\r\tnewColors _ Array new: (1 bitShift: self depth).\r\t1 to: newColors size do: [:i |\r\t\ti <= colorCount\r\t\t\tifTrue: [newColors at: i put: (colorArray at: i)]\r\t\t\tifFalse: [newColors at: i put: Color transparent]].\r\r\tcolors _ newColors.\r\tcachedDepth _ nil.\r\tcachedColormap _ nil.\r! !\r\r!ColorForm methodsFor: 'accessing' stamp: 'mir 7/21/1999 11:51'!\rcolorsFromArray: colorArray\r\t| colorList |\r\tcolorList _ colorArray collect: [:colorDef |\r\t\tColor fromArray: colorDef].\r\tself colors: colorList! !\r\r\r!ColorForm methodsFor: 'displaying' stamp: 'ar 5/14/2001 23:32'!\rdisplayOn: aDisplayMedium at: aDisplayPoint clippingBox: clipRectangle rule: rule fillColor: aForm\r\r\taDisplayMedium copyBits: self boundingBox\r\t\tfrom: self\r\t\tat: aDisplayPoint + self offset\r\t\tclippingBox: clipRectangle\r\t\trule: rule\r\t\tfillColor: aForm\r\t\tmap: (self colormapIfNeededFor: aDisplayMedium).\r! !\r\r!ColorForm methodsFor: 'displaying' stamp: 'di 7/17/97 10:04'!\rdisplayOnPort: port at: location\r\r\tport copyForm: self to: location rule: Form paint! !\r\r!ColorForm methodsFor: 'displaying' stamp: 'ar 12/14/2001 18:14'!\rmaskingMap\r\t\"Return a color map that maps all colors except transparent to words of all ones. Used to create a mask for a Form whose transparent pixel value is zero.\"\r\t| maskingMap |\r\tmaskingMap _ Bitmap new: (1 bitShift: depth) withAll: 16rFFFFFFFF.\r\t1 to: colors size do:[:i|\r\t\t(colors at: i) isTransparent ifTrue:[maskingMap at: i put: 0].\r\t].\r\tcolors size+1 to: maskingMap size do:[:i| maskingMap at: i put: 0].\r\t^maskingMap! !\r\r\r!ColorForm methodsFor: 'pixel accessing' stamp: 'jm 11/14/97 17:25'!\rcolorAt: aPoint\r\t\"Return the color of the pixel at aPoint.\"\r\r\t^ self colors at: (self pixelValueAt: aPoint) + 1\r! !\r\r!ColorForm methodsFor: 'pixel accessing' stamp: 'jm 11/14/97 17:25'!\rcolorAt: aPoint put: aColor\r\t\"Store the given color into the pixel at aPoint. The given color must match one of the colors in the receiver's colormap.\"\r\r\t| i |\r\ti _ self colors indexOf: aColor\r\t\tifAbsent: [^ self error: 'trying to use a color that is not in my colormap'].\r\tself pixelValueAt: aPoint put: i - 1.\r! !\r\r!ColorForm methodsFor: 'pixel accessing' stamp: 'tk 10/21/97 12:27'!\risTransparentAt: aPoint \r\t\"Return true if the receiver is transparent at the given point.\"\r\r\t^ (self colorAt: aPoint) isTransparent\r! !\r\r!ColorForm methodsFor: 'pixel accessing' stamp: 'ar 5/28/2000 12:06'!\rpixelValueAt: aPoint \r\t\"Return the raw pixel value at the given point. Typical clients use colorAt: to get a Color.\"\r\t\"Details: To get the raw pixel value, be sure the peeker's colorMap is nil.\"\r\r\t^ (BitBlt current bitPeekerFromForm: self) colorMap: nil; pixelAt: aPoint\r! !\r\r\r!ColorForm methodsFor: 'color manipulation' stamp: 'di 11/11/1998 13:20'!\rasGrayScale\r\t\"Return a grayscale ColorForm computed by mapping each color into its grayscale equivalent\"\r\t^ self copy colors:\r\t\t(colors collect:\r\t\t\t[:c | c isTransparent ifTrue: [c]\r\t\t\t\t\t\tifFalse: [Color gray: c luminance]])! !\r\r!ColorForm methodsFor: 'color manipulation' stamp: 'ar 5/17/2001 15:44'!\rcolormapIfNeededForDepth: destDepth\r\t\"Return a colormap for displaying the receiver at the given depth, or nil if no colormap is needed.\"\r\r\t| newMap |\r\tcolors == nil ifTrue: [\r\t\t\"use the standard colormap\"\r\t\t^ Color colorMapIfNeededFrom: self depth to: destDepth].\r\r\t(destDepth = cachedDepth and:[cachedColormap isColormap not]) \r\t\tifTrue: [^ cachedColormap].\r\tnewMap _ Bitmap new: colors size.\r\t1 to: colors size do: [:i |\r\t\tnewMap\r\t\t\tat: i\r\t\t\tput: ((colors at: i) pixelValueForDepth: destDepth)].\r\r\tcachedDepth _ destDepth.\r\t^ cachedColormap _ newMap.\r! !\r\r!ColorForm methodsFor: 'color manipulation' stamp: 'jm 4/18/98 20:34'!\rcolorsUsed\r\t\"Return a list of the colors actually used by this ColorForm.\"\r\r\t| myColor list |\r\tmyColor _ self colors.\r\tlist _ OrderedCollection new.\r\tself tallyPixelValues doWithIndex: [:count :i |\r\t\tcount > 0 ifTrue: [list add: (myColor at: i)]].\r\t^ list asArray\r! !\r\r!ColorForm methodsFor: 'color manipulation' stamp: 'jm 11/16/97 11:18'!\rensureTransparentColor\r\t\"Ensure that the receiver (a) includes Color transparent in its color map and (b) that the entry for Color transparent is the first entry in its color map.\"\r\r\t| i |\rself error: 'not yet implemented'.\r\t(colors includes: Color transparent)\r\t\tifTrue: [\r\t\t\t(colors indexOf: Color transparent) = 1 ifTrue: [^ self].\r\t\t\t\"shift the entry for color transparent\"]\r\t\tifFalse: [\r\t\t\ti _ self unusedColormapEntry.\r\t\t\ti = 0 ifTrue: [self error: 'no color map entry is available'].\r\t\t\tcolors at: i put: Color transparent.\r\t\t\t\"shift the entry for color transparent\"].\r! !\r\r!ColorForm methodsFor: 'color manipulation' stamp: 'di 8/28/1998 15:48'!\rindexOfColor: aColor\r\t\"Return the index of aColor in my color array\"\r\r\tself ensureColorArrayExists.\r\t^ colors indexOf: aColor ifAbsent: [0]! !\r\r!ColorForm methodsFor: 'color manipulation' stamp: 'jm 10/19/1998 10:52'!\rmapColor: oldColor to: newColor\r\t\"Replace all occurances of the given color with the given new color in my color map.\"\r\r\tself ensureColorArrayExists.\r\t1 to: colors size do: [:i | \r\t\t(colors at: i) = oldColor ifTrue: [colors at: i put: newColor]].\r\tself clearColormapCache.\r! !\r\r!ColorForm methodsFor: 'color manipulation' stamp: 'jm 11/16/97 09:08'!\rreplaceColor: oldColor with: newColor\r\t\"Replace all occurances of the given color with the given new color in my color map.\"\r\r\tself ensureColorArrayExists.\r\t1 to: colors size do: [:i | \r\t\t(colors at: i) = oldColor ifTrue: [colors at: i put: newColor]].\r\tself clearColormapCache.\r! !\r\r!ColorForm methodsFor: 'color manipulation' stamp: 'tk 3/2/98 15:42'!\rreplaceColorAt: aPoint with: newColor\r\t\"Replace a color map entry with newColor.  The entry replaced is the one used by aPoint.  If there are are two entries in the colorMap for the oldColor, just replace ONE!!!!  There are often two whites or two blacks, and this is what you want, when replacing one.\"\r\r\t| oldIndex |\r\tself ensureColorArrayExists.\r\toldIndex _ self pixelValueAt: aPoint.\r\tcolors at: oldIndex+1 put: newColor.\r\tself clearColormapCache.\r! !\r\r!ColorForm methodsFor: 'color manipulation' stamp: 'di 8/28/1998 15:49'!\rreplaceColorAtIndex: index with: newColor\r\t\"Replace a color map entry with newColor.\"\r\r\tself ensureColorArrayExists.\r\tcolors at: index put: newColor.\r\tcachedColormap == nil ifFalse:\r\t\t[cachedColormap at: index put: (newColor pixelValueForDepth: cachedDepth)]! !\r\r!ColorForm methodsFor: 'color manipulation' stamp: 'tk 3/2/98 11:26'!\rtransparentAllPixelsLike: aPoint\r\t\"Make all occurances of the given pixel value transparent.  Very useful when two entries in the colorMap have the same value.  This only changes ONE.\"\r\r\tself replaceColorAt: aPoint with: Color transparent.\r! !\r\r!ColorForm methodsFor: 'color manipulation' stamp: 'tk 3/2/98 11:27'!\rtransparentColor: aColor\r\t\"Make all occurances of the given color transparent.  Note: for colors like black and white, which have two entries in the colorMap, this changes BOTH of them.  Not always what you want.\"\r\r\tself replaceColor: aColor with: Color transparent.\r! !\r\r!ColorForm methodsFor: 'color manipulation' stamp: 'ar 5/28/2000 12:06'!\rtwoToneFromDisplay: aRectangle backgroundColor: bgColor\r\t\"Copy one-bit deep ColorForm from the Display using a color map that maps all colors except the background color to black. Used for caching the contents of inactive MVC windows.\"\r\r\t| map |\r\t(width = aRectangle width and: [height = aRectangle height])\r\t\tifFalse: [self setExtent: aRectangle extent depth: depth].\r\r\t\"make a color map mapping the background color\r\t to zero and all other colors to one\"\r\tmap _ Bitmap new: (1 bitShift: (Display depth min: 9)).\r\t1 to: map size do: [:i | map at: i put: 16rFFFFFFFF].\r\tmap at: (bgColor indexInMap: map) put: 0.\r\r\t(BitBlt current toForm: self)\r\t\tdestOrigin: 0@0;\r\t\tsourceForm: Display;\r\t\tsourceRect: aRectangle;\r\t\tcombinationRule: Form over;\r\t\tcolorMap: map;\r\t\tcopyBits.\r! !\r\r\r!ColorForm methodsFor: 'copying' stamp: 'RAA 8/14/2000 10:45'!\rasCursorForm\r\r\t^ (self asFormOfDepth: 32) offset: offset; as: StaticForm! !\r\r!ColorForm methodsFor: 'copying' stamp: 'di 11/12/2001 15:37'!\rblankCopyOf: aRectangle scaledBy: scale\r\r        | newForm |\r        newForm _ super blankCopyOf: aRectangle scaledBy: scale.\r        colors ifNotNil: [newForm colors: colors copy].\r        ^ newForm! !\r\r!ColorForm methodsFor: 'copying' stamp: 'ar 5/28/2000 12:06'!\rcopy: aRect\r \t\"Return a new ColorForm containing the portion of the receiver delineated by aRect.\"\r\r\t| newForm |\r\tnewForm _ self class extent: aRect extent depth: depth.\r\t((BitBlt current\r\t\tdestForm: newForm\r\t\tsourceForm: self\r\t\tfillColor: nil\r\t\tcombinationRule: Form over\r\t\tdestOrigin: 0@0\r\t\tsourceOrigin: aRect origin\r\t\textent: aRect extent\r\t\tclipRect: newForm boundingBox)\r\t\tcolorMap: nil) copyBits.\r\tcolors ifNotNil: [newForm colors: colors copy].\r\t^ newForm\r! !\r\r!ColorForm methodsFor: 'copying' stamp: 'jm 2/27/98 09:38'!\rdeepCopy\r\r\t^ self shallowCopy\r\t\tbits: bits copy;\r\t\toffset: offset copy;\r\t\tcolors: colors\r! !\r\r\r!ColorForm methodsFor: 'private' stamp: 'jm 11/16/97 09:07'!\rclearColormapCache\r\r\tcachedDepth _ nil.\r\tcachedColormap _ nil.\r! !\r\r!ColorForm methodsFor: 'private' stamp: 'jm 11/16/97 09:12'!\rdepth: bitsPerPixel\r\r\tbitsPerPixel > 8 ifTrue: [self error: 'ColorForms only support depths up to 8 bits'].\r\tsuper depth: bitsPerPixel.\r! !\r\r!ColorForm methodsFor: 'private' stamp: 'ar 5/17/2001 15:44'!\rensureColorArrayExists\r\t\"Return my color palette.\"\r\r\tcolors ifNil: [\r\t\tself depth > 8 ifTrue: [^ self error: 'ColorForms only support depths up to 8 bits'].\r\t\tself colors: (Color indexedColors copyFrom: 1 to: (1 bitShift: self depth))].\r! !\r\r!ColorForm methodsFor: 'private' stamp: 'jm 4/5/1999 10:11'!\rsetColors: colorArray cachedColormap: aBitmap depth: anInteger\r\t\"Semi-private. Set the color array, cached colormap, and cached colormap depth to avoid having to recompute the colormap when switching color palettes in animations.\"\r\r\tcolors _ colorArray.\r\tcachedDepth _ anInteger.\r\tcachedColormap _ aBitmap.\r! !\r\r!ColorForm methodsFor: 'private' stamp: 'jm 11/16/97 08:37'!\rsetExtent: extent depth: bitsPerPixel\r\t\"Create a virtual bit map with the given extent and bitsPerPixel.\"\r\r\tbitsPerPixel > 8 ifTrue: [self error: 'ColorForms only support depths up to 8 bits'].\r\tsuper setExtent: extent depth: bitsPerPixel.\r! !\r\r!ColorForm methodsFor: 'private' stamp: 'jm 2/24/98 18:53'!\runusedColormapEntry\r\t\"Return the index of an unused color map entry, or zero if there isn't one.\"\r\r\t| tallies |\r\ttallies _ self tallyPixelValues.\r\t1 to: tallies size do: [:i |\r\t\t(tallies at: i) = 0 ifTrue: [^ i]].\r\t^ 0\r! !\r\r\r!ColorForm methodsFor: 'scaling, rotation' stamp: 'ar 3/15/1999 14:28'!\rflipBy: direction centerAt: aPoint\r\t| oldColors newForm |\r\toldColors _ colors.\r\tself colors: nil.\r\tnewForm _ super flipBy: direction centerAt: aPoint.\r\tself colors: oldColors.\r\tnewForm colors: oldColors.\r\t^newForm ! !\r\r!ColorForm methodsFor: 'scaling, rotation' stamp: 'RAA 8/5/2000 18:12'!\rscaledToSize: newExtent\r\r\t\"super method did not seem to work so well on ColorForms\"\r\r\t^(self asFormOfDepth: 16) scaledToSize: newExtent! !\r\r\r!ColorForm methodsFor: 'fileIn/Out' stamp: 'ar 3/3/2001 20:07'!\rhibernate\r\t\"Make myself take up less space. See comment in Form>hibernate.\"\r\r\tsuper hibernate.\r\tself clearColormapCache.\r\tcolors ifNotNil:[colors _ colors asColorArray].! !\r\r!ColorForm methodsFor: 'fileIn/Out' stamp: 'mu 8/17/2003 00:46'!\rreadAttributesFrom: aBinaryStream\r\tsuper readAttributesFrom: aBinaryStream.\r\tcolors _ ColorArray new: (2 raisedTo: depth).\r\t1 to: colors size do: [:idx | \r\t\tcolors basicAt: idx put: (aBinaryStream nextLittleEndianNumber: 4).\r\t]. \r\t! !\r\r!ColorForm methodsFor: 'fileIn/Out' stamp: 'bf 5/25/2000 16:31'!\rstoreOn: aStream\r\taStream nextPut: $(.\r\tsuper storeOn: aStream.\r\taStream\r\t\tcr; tab;\r\t\tnextPutAll: 'colorsFromArray: #('.\r\tself colors do: [:color |\r\t\tcolor storeArrayOn: aStream].\r\taStream nextPutAll: ' ))'.! !\r\r!ColorForm methodsFor: 'fileIn/Out' stamp: 'ar 3/3/2001 20:07'!\runhibernate\r\tcolors ifNotNil:[colors _ colors asArray].\r\t^super unhibernate.\r! !\r\r!ColorForm methodsFor: 'fileIn/Out' stamp: 'mu 8/17/2003 00:42'!\rwriteAttributesOn: file\r\t| colorArray |\r\tsuper writeAttributesOn: file.\r\tcolorArray _ self colors asColorArray.\r\t1 to: (2 raisedTo: depth) do: [:idx |\r\t\tfile nextLittleEndianNumber: 4 put: (colorArray basicAt: idx).\r\t] ! !\r\r\r!ColorForm methodsFor: 'postscript generation'!\rasFormWithSingleTransparentColors\r\t| transparentIndexes |\r\ttransparentIndexes _ self transparentColorIndexes.\r\ttransparentIndexes size <= 1 ifTrue:[^self]\r\t\tifFalse:[^self mapTransparencies:transparentIndexes].! !\r\r!ColorForm methodsFor: 'postscript generation'!\rdecodeArray\r\t^self depth = 1 ifTrue:['[1 0]'] ifFalse:['[0 255]'].! !\r\r!ColorForm methodsFor: 'postscript generation'!\rgetTransparencyUnificationLUT\r\t| lut transparentIndex |\r\tlut _ Array new:colors size.\r\ttransparentIndex _ self indexOfColor:Color transparent.\r\t1 to: colors size do:\r\t\t[ :i | lut at:i put:(((colors at:i) = Color transparent) ifTrue:[transparentIndex] ifFalse:[i])].\r ! !\r\r!ColorForm methodsFor: 'postscript generation'!\rmapTransparencies:transparentIndexes\r\t^self deepCopy mapColors:transparentIndexes to:(transparentIndexes at:1).! !\r\r!ColorForm methodsFor: 'postscript generation'!\rsetColorspaceOn:aStream\r\tself depth = 1 ifTrue:[\r\t\taStream print:'/DeviceRGB setcolorspace 0 setgray'; cr.\r\t]\r\tifFalse:[\r\taStream print:'[ /Indexed /DeviceRGB ';\r\twrite:self colors size-1;\r\tprint:' <'.\r\t(self colormapIfNeededForDepth: 32 ) storeBits:20 to:0 on:aStream.\r\taStream print:'> ] setcolorspace'; cr.].\r! !\r\r!ColorForm methodsFor: 'postscript generation'!\rtransparentColorIndexes\r\t^(1 to: colors size) select: [ :index | (colors at:index) isTransparent ].\r! !\r\r\r!ColorForm methodsFor: 'color mapping' stamp: 'ar 5/17/2001 15:44'!\rcolormapIfNeededFor: destForm\r\t| newMap color pv |\r\t(self hasNonStandardPalette or:[destForm hasNonStandardPalette]) ifFalse:[\r\t\t^self colormapIfNeededForDepth: destForm depth.\r\t].\r\tcolors == nil ifTrue: [\r\t\t\"use the standard colormap\"\r\t\t^ super colormapIfNeededFor: destForm].\r\r\t(destForm depth = cachedDepth and:[cachedColormap isColormap]) \r\t\tifTrue: [^ cachedColormap].\r\tnewMap _ WordArray new: (1 bitShift: self depth).\r\t1 to: colors size do: [:i |\r\t\tcolor _ colors at: i.\r\t\tpv _ destForm pixelValueFor: color.\r\t\t(pv = 0 and:[color isTransparent not]) ifTrue:[pv _ 1].\r\t\tnewMap at: i put: pv].\r\r\tcachedDepth _ destForm depth.\r\t^cachedColormap _ ColorMap shifts: nil masks: nil colors: newMap.! !\r\r\r!ColorForm methodsFor: 'testing' stamp: 'ar 5/27/2001 16:34'!\risColorForm\r\t^true! !\r\r!ColorForm methodsFor: 'testing' stamp: 'ar 2/10/2004 17:18'!\risTranslucent\r\t\"Answer whether this form may be translucent\"\r\t^true! !\r\r\r\r!ColorForm methodsFor: '*morphic-Postscript Canvases' stamp: 'sma 6/14/2000 14:20'!\rencodePostscriptOn: aStream \r\tself unhibernate.\r\taStream print: '% form contains ';\r\t write: (colors select: [:c | c = Color transparent]) size;\r\t print: ' transparent colors';\r\t cr.\r\t^ self asFormWithSingleTransparentColors \r\t\tprintPostscript: aStream operator: (self depth = 1\r\t\t\tifTrue: ['imagemask']\r\t\t\tifFalse: [(self indexOfColor: Color transparent) printString , ' transparentimage'])! !\r\r!ColorForm methodsFor: '*morphic-Postscript Canvases'!\rprintPostscript:aStream\r\taStream nextPutAll:'% form contains '; \r\t\t\tprint:((colors select:[:c| c=Color transparent]) size); \r\t\t\tnextPutAll:' transparent colors'; cr.\r\t^self asFormWithSingleTransparentColors printPostscript:aStream operator:(self depth=1 ifTrue:['imagemask'] \r\tifFalse:[ (self indexOfColor:Color transparent) printString ,' transparentimage']) .\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rColorForm class\r\tinstanceVariableNames: ''!\r\r!ColorForm class methodsFor: 'as yet unclassified' stamp: 'nk 4/17/2004 19:44'!\rmappingWhiteToTransparentFrom: aFormOrCursor\r\t\"Return a ColorForm copied from the given Form or Cursor with white mapped to transparent.\"\r\r\t| f map |\r\taFormOrCursor depth <= 8 ifFalse: [\r\t\t^ self error: 'argument depth must be 8-bits per pixel or less'].\r\t(aFormOrCursor isColorForm) ifTrue: [\r\t\tf _ aFormOrCursor deepCopy.\r\t\tmap _ aFormOrCursor colors.\r\t] ifFalse: [\r\t\tf _ ColorForm extent: aFormOrCursor extent depth: aFormOrCursor depth.\r\t\tf copyBits: aFormOrCursor boundingBox\r\t\t\tfrom: aFormOrCursor\r\t\t\tat: 0@0\r\t\t\tclippingBox: aFormOrCursor boundingBox\r\t\t\trule: Form over\r\t\t\tfillColor: nil.\r\t\tmap _ Color indexedColors copyFrom: 1 to: (1 bitShift: aFormOrCursor depth)].\r\tmap _ map collect: [:c |\r\t\tc = Color white ifTrue: [Color transparent] ifFalse: [c]].\r\tf colors: map.\r\t^ f\r! !\r\r!ColorForm class methodsFor: 'as yet unclassified'!\rtwoToneFromDisplay: aRectangle using: oldForm backgroundColor: bgColor\r\t\"Return a 1-bit deep ColorForm copied from the given rectangle of the display. All colors except the background color will be mapped to black.\"\r\r\t| f |\r\t((oldForm ~~ nil) and: [oldForm extent = aRectangle extent]) ifTrue: [\r\t\tf _ oldForm fromDisplay: aRectangle.\r\t] ifFalse: [\r\t\tf _ ColorForm extent: aRectangle extent depth: 1.\r\t\tf twoToneFromDisplay: aRectangle backgroundColor: bgColor.\r\t\tf colors: (Array\r\t\t\twith: bgColor\r\t\t\twith: Color black)].\r\t^ f\r! !\rObject subclass: #ColorMap\r\tinstanceVariableNames: 'shifts masks colors'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Graphics-Primitives'!\r\r!ColorMap methodsFor: 'accessing' stamp: 'ar 1/16/2000 15:54'!\ralphaMask\r\t^masks at: 4! !\r\r!ColorMap methodsFor: 'accessing' stamp: 'ar 1/16/2000 15:31'!\ralphaShift\r\t^shifts at: 4! !\r\r!ColorMap methodsFor: 'accessing' stamp: 'ar 1/16/2000 15:39'!\rat: index\r\t^colors at: index! !\r\r!ColorMap methodsFor: 'accessing' stamp: 'ar 1/16/2000 15:39'!\rat: index put: value\r\t^colors at: index put: value! !\r\r!ColorMap methodsFor: 'accessing' stamp: 'ar 1/16/2000 15:31'!\rblueMask\r\t^masks at: 3! !\r\r!ColorMap methodsFor: 'accessing' stamp: 'ar 1/16/2000 15:31'!\rblueShift\r\t^shifts at: 3! !\r\r!ColorMap methodsFor: 'accessing' stamp: 'ar 2/10/2000 17:12'!\rcolors\r\t^colors! !\r\r!ColorMap methodsFor: 'accessing' stamp: 'ar 1/16/2000 15:32'!\rgreenMask\r\t^masks at: 2! !\r\r!ColorMap methodsFor: 'accessing' stamp: 'ar 1/16/2000 15:32'!\rgreenShift\r\t^shifts at: 2! !\r\r!ColorMap methodsFor: 'accessing' stamp: 'ar 5/28/2000 22:08'!\rinverseMap\r\t\"Return the inverse map of the receiver\"\r\t| newMasks newShifts |\r\tcolors ifNotNil:[^self error:'Not yet implemented'].\r\tnewMasks _ WriteStream on: (Array new: 4).\r\tnewShifts _ WriteStream on: (Array new: 4).\r\tmasks with: shifts do:[:mask :shift|\r\t\tnewMasks nextPut: (mask bitShift: shift).\r\t\tnewShifts nextPut: shift negated].\r\t^ColorMap\r\t\tshifts: newShifts contents\r\t\tmasks: newMasks contents! !\r\r!ColorMap methodsFor: 'accessing' stamp: 'ar 5/27/2000 19:16'!\rmasks\r\t^masks! !\r\r!ColorMap methodsFor: 'accessing' stamp: 'ar 1/16/2000 15:36'!\rredMask\r\t^masks at: 1! !\r\r!ColorMap methodsFor: 'accessing' stamp: 'ar 1/16/2000 15:37'!\rredShift\r\t^shifts at: 1! !\r\r!ColorMap methodsFor: 'accessing' stamp: 'ar 5/27/2000 20:48'!\rrgbaBitMasks\r\t\"Return the rgba bit masks for the receiver\"\r\t^masks asArray with: shifts collect:[:m :s| m bitShift: s]! !\r\r!ColorMap methodsFor: 'accessing' stamp: 'ar 5/27/2000 19:16'!\rshifts\r\t^shifts! !\r\r\r!ColorMap methodsFor: 'pixel mapping' stamp: 'ar 5/15/2001 16:12'!\rmapPixel: pixelValue\r\t\"Perform a forward pixel mapping operation\"\r\t| pv |\r\t(shifts == nil and:[masks == nil]) ifFalse:[\r\t\tpv _ (((pixelValue bitAnd: self redMask) bitShift: self redShift) bitOr:\r\t\t\t((pixelValue bitAnd: self greenMask) bitShift: self greenShift)) bitOr:\r\t\t\t(((pixelValue bitAnd: self blueMask) bitShift: self blueShift) bitOr:\r\t\t\t((pixelValue bitAnd: self alphaMask) bitShift: self alphaShift)).\r\t] ifTrue:[pv _ pixelValue].\r\tcolors ifNotNil:[pv _ colors at: pv].\r\t\"Need to check for translucency else Form>>paint goes gaga\"\r\tpv = 0 ifTrue:[pixelValue = 0 ifFalse:[pv _ 1]].\r\t^pv! !\r\r!ColorMap methodsFor: 'pixel mapping' stamp: 'ar 6/8/2000 20:36'!\rmappingTo: aColorMap\r\t\"Compute a new color map through the receiver and aColorMap.\r\tBoth maps are assumed to be mappings into canonical ARGB space\"\r\t| fixedMap |\r\tself = aColorMap ifTrue:[^nil]. \"No mapping needed\"\r\taColorMap isIndexed ifTrue:[^nil]. \"We can't compute mappings to an indexed map yet\"\r\tfixedMap _ self class mappingFrom: self rgbaBitMasks to: aColorMap rgbaBitMasks.\r\tself isIndexed ifFalse:[^fixedMap].\r\t\"If the receiver is indexed then we need to map the colors as well\"\r\tself flag: #untested.\r\t^ColorMap\r\t\tshifts: fixedMap shifts\r\t\tmasks: fixedMap masks\r\t\tcolors: (colors collect:[:pv| aColorMap pixelMap: pv]).\r! !\r\r!ColorMap methodsFor: 'pixel mapping' stamp: 'ar 5/15/2001 16:12'!\rpixelMap: pixelValue\r\t\"Perform a reverse pixel mapping operation\"\r\t| pv |\r\tcolors == nil\r\t\tifTrue:[pv _ pixelValue]\r\t\tifFalse:[pv _ colors at: pixelValue].\r\t(shifts == nil and:[masks == nil]) \r\t\tifFalse:[pv _ (((pv bitAnd: self redMask) bitShift: self redShift) bitOr: \r\t\t\t\t((pv bitAnd: self greenMask) bitShift: self greenShift)) bitOr:\r\t\t\t\t\t(((pv bitAnd: self blueMask) bitShift: self blueShift) bitOr: \r\t\t\t\t\t\t((pv bitAnd: self alphaMask) bitShift: self alphaShift))].\r\t\"Need to check for translucency else Form>>paint goes gaga\"\r\tpv = 0 ifTrue:[pixelValue = 0 ifFalse:[pv _ 1]].\r\t^pv! !\r\r\r!ColorMap methodsFor: 'private' stamp: 'ar 2/22/2000 16:47'!\rsetShifts: shiftArray masks: maskArray colors: colorArray\r\tshiftArray ifNotNil:[shifts _ shiftArray asIntegerArray].\r\tmaskArray ifNotNil:[masks _ maskArray asWordArray].\r\tcolorArray ifNotNil:[colors _ colorArray asWordArray].! !\r\r\r!ColorMap methodsFor: 'testing' stamp: 'ar 5/25/2000 19:41'!\risColormap\r\t^true! !\r\r!ColorMap methodsFor: 'testing' stamp: 'ar 5/27/2000 19:06'!\risFixed\r\t\"Return true if the receiver does not use a lookup mechanism for pixel mapping\"\r\t^self isIndexed not! !\r\r!ColorMap methodsFor: 'testing' stamp: 'ar 5/27/2000 19:06'!\risIndexed\r\t\"Return true if the receiver uses a lookup mechanism for pixel mapping\"\r\t^colors notNil! !\r\r\r!ColorMap methodsFor: 'comparing' stamp: 'tk 7/5/2001 21:59'!\r= aColorMap\r\t\"Return true if the receiver is equal to aColorMap\"\r\tself species == aColorMap species ifFalse:[^false].\r\tself isIndexed == aColorMap isIndexed ifFalse:[^false].\r\t^self colors = aColorMap colors and:[\r\t\tself shifts = aColorMap shifts and:[\r\t\t\tself masks = aColorMap masks]]! !\r\r!ColorMap methodsFor: 'comparing' stamp: 'ar 5/27/2000 19:29'!\rhash\r\t\"Hash is re-implemented because #= is re-implemented\"\r\t^colors hash bitXor: (shifts hash bitXor: masks hash)! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rColorMap class\r\tinstanceVariableNames: ''!\r\r!ColorMap class methodsFor: 'instance creation' stamp: 'ar 2/22/2000 14:08'!\rcolors: colorArray\r\t^self new setShifts: nil masks: nil colors: colorArray! !\r\r!ColorMap class methodsFor: 'instance creation' stamp: 'ar 5/27/2000 20:09'!\rmapBitsFrom: srcBitMask to: dstBitMask\r\t\"Return an array consisting of the shift and the mask for\r\tmapping component values out of srcBitMask and into dstBitMask.\r\tWhile this computation is somewhat complicated it eases the batch\r\tconversion of all the pixels in BitBlt.\"\r\t| srcBits dstBits srcLow srcHigh dstLow dstHigh bits mask shift |\r\t(srcBitMask = 0 or:[dstBitMask = 0]) ifTrue:[^#(0 0)]. \"Zero mask and shift\"\r\t\"Compute low and high bit position for source and dest bit mask\"\r\tsrcLow _ srcBitMask lowBit - 1.\tsrcHigh _ srcBitMask highBit.\r\tdstLow _ dstBitMask lowBit - 1.\tdstHigh _ dstBitMask highBit.\r\t\"Compute the number of bits in source and dest bit mask\"\r\tsrcBits _ srcHigh - srcLow.\t\tdstBits _ dstHigh - dstLow.\r\t\"Compute the maximum number of bits we can transfer inbetween\"\r\tbits _ srcBits min: dstBits.\r\t\"Compute the (unshifted) transfer mask\"\r\tmask _ (1 bitShift: bits) - 1.\r\t\"Shift the transfer mask to the mask the highest n bits of srcBitMask\"\r\tmask _ mask bitShift: (srcHigh - bits).\r\t\"Compute the delta shift so that the most significant bit of the\r\tsource bit mask falls on the most significant bit of the dest bit mask.\r\tNote that delta is used for #bitShift: so\r\t\tshift > 0 : shift right\r\t\tshift < 0 : shift left\r\te.g., if dstHigh > srcHigh we need to shift left and if dstHigh < srcHigh\r\twe need to shift right. This leads to:\"\r\tshift _ dstHigh - srcHigh.\r\t\"And that's all we need\"\r\t^Array with: shift with: mask! !\r\r!ColorMap class methodsFor: 'instance creation' stamp: 'ar 5/27/2000 19:41'!\rmappingFrom: srcBitMasks to: dstBitMasks\r\t\"Return a color map mapping from the array of source bit masks\r\tto the array of dest bit masks.\"\r\t| shifts masks shiftAndMask |\r\tshifts _ IntegerArray new: 4.\r\tmasks _ WordArray new: 4.\r\t1 to: 4 do:[:i|\r\t\tshiftAndMask _ self mapBitsFrom: (srcBitMasks at: i) to: (dstBitMasks at: i).\r\t\tshifts at: i put: (shiftAndMask at: 1).\r\t\tmasks at: i put: (shiftAndMask at: 2).\r\t].\r\t^self shifts: shifts masks: masks! !\r\r!ColorMap class methodsFor: 'instance creation' stamp: 'ar 5/27/2000 20:08'!\rmappingFromARGB: dstBitMasks\r\t\"Return a ColorMap mapping from canonical ARGB space into dstBitMasks\"\r\t^self mappingFrom: #(16rFF0000 16rFF00 16rFF 16rFF000000) to: dstBitMasks! !\r\r!ColorMap class methodsFor: 'instance creation' stamp: 'ar 1/16/2000 16:02'!\rshifts: shiftArray masks: maskArray\r\t^self shifts: shiftArray masks: maskArray colors: nil.! !\r\r!ColorMap class methodsFor: 'instance creation' stamp: 'ar 1/16/2000 16:02'!\rshifts: shiftArray masks: maskArray colors: colorArray\r\t^self new setShifts: shiftArray masks: maskArray colors: colorArray! !\rStandardSystemView subclass: #ColorSystemView\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Support'!\r\r!ColorSystemView methodsFor: 'as yet unclassified'!\rcacheBitsAsTwoTone\r\t^ false! !\r\r!ColorSystemView methodsFor: 'as yet unclassified' stamp: 'di 2/26/98 08:58'!\rdisplayDeEmphasized \r\t\"Display this view with emphasis off.\r\tIf windowBits is not nil, then simply BLT if possible.\"\r\tbitsValid\r\t\tifTrue: [self lock.\r\t\t\t\twindowBits displayAt: self windowOrigin]\r\t\tifFalse: [super displayDeEmphasized]\r! !\rAbstractEvent subclass: #CommentedEvent\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Change Notification'!\r\r!CommentedEvent methodsFor: 'testing' stamp: 'rw 7/1/2003 11:37'!\risCommented\r\r\t^true! !\r\r\r!CommentedEvent methodsFor: 'printing' stamp: 'rw 7/1/2003 11:37'!\rprintEventKindOn: aStream\r\r\taStream nextPutAll: 'Commented'! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rCommentedEvent class\r\tinstanceVariableNames: ''!\r\r!CommentedEvent class methodsFor: 'accessing' stamp: 'rw 7/10/2003 12:08'!\rchangeKind\r\r\t^#Commented! !\r\r!CommentedEvent class methodsFor: 'accessing' stamp: 'rw 7/10/2003 11:20'!\rsupportedKinds\r\r\t^Array with: self classKind! !\rByteArray variableByteSubclass: #CompiledMethod\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'BlockNodeCache LargeFrame SmallFrame SpecialConstants TempNameCache'\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Methods'!\r!CompiledMethod commentStamp: 'ls 7/5/2003 13:48' prior: 0!\rMy instances are methods suitable for interpretation by the virtual machine.  This is the only class in the system whose instances intermix both indexable pointer fields and indexable integer fields.\r\r\t\rThe current format of a CompiledMethod is as follows:\r\r\theader (4 bytes)\r\tliterals (4 bytes each)\r\tbytecodes  (variable)\r\ttrailer (variable)\r\rThe header is a 30-bit integer with the following format:\r\r(index 0)\t9 bits:\tmain part of primitive number   (#primitive)\r(index 9)\t8 bits:\tnumber of literals (#numLiterals)\r(index 17)\t1 bit:\twhether a large frame size is needed (#frameSize)\r(index 18)\t6 bits:\tnumber of temporary variables (#numTemps)\r(index 24)\t4 bits:\tnumber of arguments to the method (#numArgs)\r(index 28)\t1 bit:\thigh-bit of primitive number (#primitive)\r(index 29)\t1 bit:\tflag bit, ignored by the VM  (#flag)\r\r\rThe trailer has two variant formats.  In the first variant, the last byte is at least 252 and the last four bytes represent a source pointer into one of the sources files (see #sourcePointer).  In the second variant, the last byte is less than 252, and the last several bytes are a compressed version of the names of the method's temporary variables.  The number of bytes used for this purpose is the value of the last byte in the method.\r!\r\r\r!CompiledMethod methodsFor: 'initialize-release'!\rcopyWithTrailerBytes: bytes\r\"Testing:\r\t(CompiledMethod compiledMethodAt: #copyWithTrailerBytes:)\r\t\ttempNamesPut: 'copy end '\r\"\r\t| copy end start |\r\tstart _ self initialPC.\r\tend _ self endPC.\r\tcopy _ CompiledMethod newMethod: end - start + 1 + bytes size\r\t\t\t\theader: self header.\r\t1 to: self numLiterals do: [:i | copy literalAt: i put: (self literalAt: i)].\r\tstart to: end do: [:i | copy at: i put: (self at: i)].\r\t1 to: bytes size do: [:i | copy at: end + i put: (bytes at: i)].\r\t^ copy! !\r\r!CompiledMethod methodsFor: 'initialize-release' stamp: 'di 10/22/1999 13:14'!\rneedsFrameSize: newFrameSize\r\t\"Set the largeFrameBit to accomodate the newFrameSize\"\r\t| largeFrameBit header |\r\tlargeFrameBit _ 16r20000.\r\t(self numTemps + newFrameSize) > LargeFrame ifTrue:\r\t\t[^ self error: 'Cannot compile -- stack including temps is too deep'].\r\theader _ self objectAt: 1.\r\t(header bitAnd: largeFrameBit) ~= 0\r\t\tifTrue: [header _ header - largeFrameBit].\r\tself objectAt: 1 put: header\r\t\t\t+ ((self numTemps + newFrameSize) > SmallFrame\r\t\t\t\t\tifTrue: [largeFrameBit]\r\t\t\t\t\tifFalse: [0])! !\r\r\r!CompiledMethod methodsFor: 'accessing' stamp: 'rw 5/12/2003 11:12'!\rdefaultSelector \r\t\"Invent and answer an appropriate message selector (a \r\tSymbol) for me, that is, one that will parse with the correct number of \r\targuments.\"\r\r\t| aStream |\r\taStream _ WriteStream on: (String new: 16).\r\taStream nextPutAll: 'DoIt'.\r\t1 to: self numArgs do: [:i | aStream nextPutAll: 'with:'].\r\t^aStream contents asSymbol! !\r\r!CompiledMethod methodsFor: 'accessing'!\rendPC\r\t\"Answer the index of the last bytecode.\"\r\t| flagByte |\r\tflagByte _ self last.\r\tflagByte = 0 ifTrue:\r\t\t[\"If last byte = 0, may be either 0, 0, 0, 0 or just 0\"\r\t\t1 to: 4 do: [:i | (self at: self size - i) = 0 ifFalse: [^ self size - i]]].\r\tflagByte < 252 ifTrue:\r\t\t[\"Magic sources (tempnames encoded in last few bytes)\"\r\t\t^ self size - self last - 1].\r\t\"Normal 4-byte source pointer\"\r\t^ self size - 4! !\r\r!CompiledMethod methodsFor: 'accessing' stamp: 'di 1/2/1999 17:00'!\rflushCache\r\t\"Tell the interpreter to remove all references to this method from its method lookup cache, if it has one.  This primitive must be called whenever a method is defined or removed.\r\tNOTE:  Only one of two selective flush methods needs to be used.\r\tSqueak 2.2 and earlier uses 119 (See Symbol flushCache).\r\tSqueak 2.3 and later uses 116 (See CompiledMethod flushCache).\"\r\r\t<primitive: 116>\r! !\r\r!CompiledMethod methodsFor: 'accessing' stamp: 'di 10/23/1999 22:00'!\rframeSize\r\t\"Answer the size of temporary frame needed to run the receiver.\"\r\t\"NOTE:  Versions 2.7 and later use two sizes of contexts.\"\r\r\t(self header noMask: 16r20000)\r\t\tifTrue: [^ SmallFrame]\r\t\tifFalse: [^ LargeFrame]\r! !\r\r!CompiledMethod methodsFor: 'accessing'!\rinitialPC\r\t\"Answer the program counter for the receiver's first bytecode.\"\r\r\t^ (self numLiterals + 1) * 4 + 1! !\r\r!CompiledMethod methodsFor: 'accessing' stamp: 'ar 6/2/1998 16:26'!\rnumArgs\r\t\"Answer the number of arguments the receiver takes.\"\r\r\t^ (self header bitShift: -24) bitAnd: 16r0F! !\r\r!CompiledMethod methodsFor: 'accessing'!\rnumLiterals\r\t\"Answer the number of literals used by the receiver.\"\r\t\r\t^ (self header bitShift: -9) bitAnd: 16rFF! !\r\r!CompiledMethod methodsFor: 'accessing'!\rnumTemps\r\t\"Answer the number of temporary variables used by the receiver.\"\r\t\r\t^ (self header bitShift: -18) bitAnd: 16r3F! !\r\r!CompiledMethod methodsFor: 'accessing' stamp: 'ls 6/22/2000 14:35'!\rprimitive\r\t\"Answer the primitive index associated with the receiver.\r\tZero indicates that this is not a primitive method.\r\tWe currently allow 10 bits of primitive index, but they are in two places\r\tfor  backward compatibility.  The time to unpack is negligible,\r\tsince the reconstituted full index is stored in the method cache.\"\r\t| primBits |\r\tprimBits _ self header bitAnd: 16r100001FF.\r\t\r\t^ (primBits bitAnd: 16r1FF) + (primBits bitShift: -19)\r! !\r\r!CompiledMethod methodsFor: 'accessing'!\rreturnField\r\t\"Answer the index of the instance variable returned by a quick return \r\tmethod.\"\r\t| prim |\r\tprim _ self primitive.\r\tprim < 264\r\t\tifTrue: [self error: 'only meaningful for quick-return']\r\t\tifFalse: [^ prim - 264]! !\r\r!CompiledMethod methodsFor: 'accessing' stamp: 'sw 8/15/97 16:17'!\rselector\r\t\"This is slow, so don't call it frivolously\"\r\t^ self who last! !\r\r!CompiledMethod methodsFor: 'accessing' stamp: 'ajh 11/17/2001 14:30'!\rtrailer\r\r\t| end trailer |\r\tend _ self endPC.\r\ttrailer _ ByteArray new: self size - end.\r\tend + 1 to: self size do: [:i | \r\t\ttrailer at: i - end put: (self at: i)].\r\t^ trailer! !\r\r\r!CompiledMethod methodsFor: 'comparing' stamp: 'ar 8/16/2001 13:24'!\r= method\r\t| myLits otherLits |\r\t\"Answer whether the receiver implements the same code as the \r\targument, method.\"\r\t(method isKindOf: CompiledMethod) ifFalse: [^false].\r\tself size = method size ifFalse: [^false].\r\tself header = method header ifFalse: [^false].\r\tself initialPC to: self endPC do:\r\t\t[:i | (self at: i) = (method at: i) ifFalse: [^false]].\r\t(myLits _ self literals) = (otherLits _ method literals) ifFalse:\r\t\t[myLits size = otherLits size ifFalse: [^ false].\r\t\t\"Dont bother checking FFI and named primitives\"\r\t\t(#(117 120) includes: self primitive) ifTrue: [^ true].\r\t\tmyLits with: otherLits do:\r\t\t\t[:lit1 :lit2 | lit1 = lit2 ifFalse:\r\t\t\t[(lit1 isVariableBinding)\r\t\t\tifTrue:\r\t\t\t\t[\"Associations match if value is equal, since associations\r\t\t\t\tused for super may have key = nil or name of class.\"\r\t\t\t\tlit1 value == lit2 value ifFalse: [^ false]]\r\t\t\tifFalse:\r\t\t\t\t[(lit1 isMemberOf: Float)\r\t\t\t\tifTrue:\r\t\t\t\t\t[\"Floats match if values are close, due to roundoff error.\"\r\t\t\t\t\t(lit1 closeTo: lit2) ifFalse: [^ false]]\r\t\t\t\tifFalse:\r\t\t\t\t\t[\"any other discrepancy is a failure\"\r\t\t\t\t\t^ false]]]]].\r\t^ true! !\r\r\r!CompiledMethod methodsFor: 'testing' stamp: 'sw 5/3/2001 15:06'!\rhasReportableSlip\r\t\"Answer whether the receiver contains anything that should be brought to the attention of the author when filing out.   Customize the lists here to suit your preferences.  If slips do not get reported in spite of your best efforts here, make certain that the Preference 'checkForSlips' is set to true.\"\r\r\t| assoc | \r\t#(doOnlyOnce: halt halt: hottest printDirectlyToDisplay toRemove personal urgent) do:\r\t\t[:aLit | (self hasLiteral: aLit) ifTrue: [^ true]].\r\r\t#(Transcript AA BB CC DD EE) do:\r\t\t[:aSymbol | (assoc _ (Smalltalk associationAt: aSymbol ifAbsent: [nil])) ifNotNil:\r\t\t\t[(self hasLiteral: assoc) ifTrue: [^ true]]].\r\r\t^ false! !\r\r!CompiledMethod methodsFor: 'testing' stamp: 'md 11/21/2003 12:15'!\risCompiledMethod\r\r\t^ true! !\r\r!CompiledMethod methodsFor: 'testing' stamp: 'di 12/26/1998 21:31'!\risQuick\r\t\"Answer whether the receiver is a quick return (of self or of an instance \r\tvariable).\"\r\t^ self primitive between: 256 and: 519! !\r\r!CompiledMethod methodsFor: 'testing' stamp: 'ar 6/2/1998 16:11'!\risReturnField\r\t\"Answer whether the receiver is a quick return of an instance variable.\"\r\t^ self primitive between: 264 and: 519! !\r\r!CompiledMethod methodsFor: 'testing'!\risReturnSelf\r\t\"Answer whether the receiver is a quick return of self.\"\r\r\t^ self primitive = 256! !\r\r!CompiledMethod methodsFor: 'testing'!\risReturnSpecial\r\t\"Answer whether the receiver is a quick return of self or constant.\"\r\r\t^ self primitive between: 256 and: 263! !\r\r\r!CompiledMethod methodsFor: 'printing' stamp: 'sw 7/29/2002 02:24'!\rdateMethodLastSubmitted\r\t\"Answer a Date object indicating when a method was last submitted.  If there is no date stamp, return nil\"\r\t\"(CompiledMethod compiledMethodAt: #dateMethodLastSubmitted) dateMethodLastSubmitted\"\r\r\t| aStamp tokens |\r\taStamp _ self timeStamp.\r\ttokens _ aStamp findBetweenSubStrs: ' \r'.  \"space is expected delimiter, but cr is sometimes seen, though of mysterious provenance\"\r\t^ tokens size > 1\r\t\tifTrue:\r\t\t\t[[tokens second asDate] ifError: [nil]]\r\t\tifFalse:\r\t\t\t[nil]! !\r\r!CompiledMethod methodsFor: 'printing' stamp: 'sma 2/12/2000 14:01'!\rdecompileString\r\t| clAndSel cl sel |\r\tclAndSel _ self who.\r\tclAndSel = #(unknown unknown)\r\t\tifTrue:\r\t\t\t[cl _ Object.\r\t\t\tsel _ #xxxUnknown.\r\t\t\tself numArgs >= 1\r\t\t\t\tifTrue:\r\t\t\t\t\t[sel _ sel , ':'.\r\t\t\t\t\t2 to: self numArgs do: [:i | sel _ sel , 'with:'].\r\t\t\t\t\tsel _ sel asSymbol]]\r\t\tifFalse:\r\t\t\t[cl _ clAndSel first.\r\t\t\tsel _ clAndSel last].\r\t^ (cl decompilerClass new\r\t\t\tdecompile: sel in: cl method: self) decompileString! !\r\r!CompiledMethod methodsFor: 'printing' stamp: 'ajh 2/9/2003 14:17'!\rlongPrintOn: aStream\r\t\"List of all the byte codes in a method with a short description of each\" \r\r\tself longPrintOn: aStream indent: 0! !\r\r!CompiledMethod methodsFor: 'printing' stamp: 'ar 6/28/2003 00:08'!\rlongPrintOn: aStream indent: tabs\r\t\"List of all the byte codes in a method with a short description of each\" \r\r\tself isQuick ifTrue: \r\t\t[self isReturnSpecial ifTrue:\r\t\t\t[^ aStream tab: tabs; nextPutAll: 'Quick return ' , \r\t\t\t\t(#('self' 'true' 'false' 'nil' '-1' '0' '1' '2') at: self primitive - 255)].\r\t\t^ aStream nextPutAll: 'Quick return field ' , self returnField printString , ' (0-based)'].\r\r\tself primitive = 0 ifFalse: [\r\t\taStream tab: tabs.\r\t\tself printPrimitiveOn: aStream.\r\t].\r\t(InstructionPrinter on: self) indent: tabs; printInstructionsOn: aStream.\r! !\r\r!CompiledMethod methodsFor: 'printing' stamp: 'sma 6/1/2000 09:45'!\rprintOn: aStream \r\t\"Overrides method inherited from the byte arrayed collection.\"\r\r\tself printNameOn: aStream.\r\taStream space; nextPutAll: self identityHashPrintString! !\r\r!CompiledMethod methodsFor: 'printing' stamp: 'MPW 1/1/1901 22:09'!\rprintOnStream: aStream \r\t\"Overrides method inherited from the byte arrayed collection.\"\r\r\taStream print: 'a CompiledMethod'! !\r\r!CompiledMethod methodsFor: 'printing' stamp: 'ar 11/28/1999 19:37'!\rprintPrimitiveOn: aStream\r\t\"Print the primitive on aStream\"\r\t| primIndex primDecl |\r\tprimIndex _ self primitive.\r\tprimIndex = 0 ifTrue:[^self].\r\tprimIndex = 120 \"External call spec\"\r\t\tifTrue:[^aStream print: (self literalAt: 1); cr].\r\taStream nextPutAll: '<primitive: '.\r\tprimIndex = 117 ifTrue:[\r\t\tprimDecl _ self literalAt: 1.\r\t\taStream \r\t\t\tnextPut: $';\r\t\t\tnextPutAll: (primDecl at: 2);\r\t\t\tnextPut:$'.\r\t\t(primDecl at: 1) notNil ifTrue:[\r\t\t\taStream \r\t\t\t\tnextPutAll:' module:';\r\t\t\t\tnextPut:$';\r\t\t\t\tnextPutAll: (primDecl at: 1);\r\t\t\t\tnextPut:$'.\r\t\t].\r\t] ifFalse:[aStream print: primIndex].\r\taStream nextPut: $>; cr! !\r\r!CompiledMethod methodsFor: 'printing'!\rstoreOn: aStream\r\t| noneYet |\r\taStream nextPutAll: '(('.\r\taStream nextPutAll: self class name.\r\taStream nextPutAll: ' newMethod: '.\r\taStream store: self size - self initialPC + 1.\r\taStream nextPutAll: ' header: '.\r\taStream store: self header.\r\taStream nextPut: $).\r\tnoneYet _ self storeElementsFrom: self initialPC to: self endPC on: aStream.\r\t1 to: self numLiterals do:\r\t\t[:index |\r\t\tnoneYet\r\t\t\tifTrue: [noneYet _ false]\r\t\t\tifFalse: [aStream nextPut: $;].\r\t\taStream nextPutAll: ' literalAt: '.\r\t\taStream store: index.\r\t\taStream nextPutAll: ' put: '.\r\t\taStream store: (self literalAt: index)].\r\tnoneYet ifFalse: [aStream nextPutAll: '; yourself'].\r\taStream nextPut: $)! !\r\r!CompiledMethod methodsFor: 'printing' stamp: 'sw 7/29/2002 02:21'!\rtimeStamp\r\t\"Answer the authoring time-stamp for the given method, retrieved from the sources or changes file. Answer the empty string if no time stamp is available.\"\r\r\t\"(CompiledMethod compiledMethodAt: #timeStamp) timeStamp\"\r\r\t| position file preamble stamp tokens tokenCount |\r\tself fileIndex == 0 ifTrue: [^ String new].  \"no source pointer for this method\"\r\tposition _ self filePosition.\r\tfile _ SourceFiles at: self fileIndex.\r\tfile ifNil: [^ String new].  \"sources file not available\"\r\t\"file does not exist happens in secure mode\"\r\tfile _ [file readOnlyCopy] on: FileDoesNotExistException do:[:ex| nil].\r\tfile ifNil: [^ String new].\r\tfile position: (0 max: position - 150).  \"Skip back to before the preamble\"\r\t\t[file position < (position - 1)]  \"then pick it up from the front\"\r\t\t\twhileTrue: [preamble _ file nextChunk].\r\t\tstamp _ String new.\r\t\ttokens _ (preamble findString: 'methodsFor:' startingAt: 1) > 0\r\t\t\tifTrue: [Scanner new scanTokens: preamble]\r\t\t\tifFalse: [Array new  \"ie cant be back ref\"].\r\t\t(((tokenCount _ tokens size) between: 7 and: 8) and: [(tokens at: tokenCount - 5) = #methodsFor:])\r\t\t\tifTrue:\r\t\t\t\t[(tokens at: tokenCount - 3) = #stamp:\r\t\t\t\t\tifTrue: [\"New format gives change stamp and unified prior pointer\"\r\t\t\t\t\t\t\tstamp _ tokens at: tokenCount - 2]].\r\t\t((tokenCount between: 5 and: 6) and: [(tokens at: tokenCount - 3) = #methodsFor:])\r\t\t\tifTrue:\r\t\t\t\t[(tokens at: tokenCount  - 1) = #stamp:\r\t\t\t\t\tifTrue: [\"New format gives change stamp and unified prior pointer\"\r\t\t\t\t\t\tstamp _ tokens at: tokenCount]].\r\tfile close.\r\t^ stamp\r! !\r\r!CompiledMethod methodsFor: 'printing' stamp: 'dvf 8/23/2003 11:50'!\rwho\r\t\"Answer an Array of the class in which the receiver is defined and the \r\tselector to which it corresponds.\"\r\r\t| sel |\r\tself systemNavigation allBehaviorsDo: \r\t\t\t[:class | \r\t\t\t(sel := class methodDict keyAtIdentityValue: self ifAbsent: [nil]) \r\t\t\t\tifNotNil: [^Array with: class with: sel]].\r\t^Array with: #unknown with: #unknown! !\r\r\r!CompiledMethod methodsFor: 'literals' stamp: 'di 10/17/97 22:38'!\rhasLiteral: literal \r\t\"Answer whether the receiver references the argument, literal.\"\r\r\t<primitive: 132>  \"a fast primitive operation equivalent to...\"\r\r\t2 to: self numLiterals + 1 do:\r\t\t[:index |\r\t\tliteral == (self objectAt: index) ifTrue: [^ true]].\r\t^ false! !\r\r!CompiledMethod methodsFor: 'literals' stamp: 'di 8/15/97 09:51'!\rhasLiteralSuchThat: litBlock\r\t\"Answer true if litBlock returns true for any literal in this method, even if imbedded in array structure.\"\r\t| lit |\r\t2 to: self numLiterals + 1 do:\r\t\t[:index | lit _ self objectAt: index.\r\t\t(litBlock value: lit) ifTrue: [^ true].\r\t\t(lit class == Array and: [lit hasLiteralSuchThat: litBlock]) ifTrue: [^ true]].\r\t^false! !\r\r!CompiledMethod methodsFor: 'literals' stamp: 'sma 6/3/2000 21:39'!\rhasLiteralThorough: literal\r\t\"Answer true if any literal in this method is literal,\r\teven if embedded in array structure.\"\r\r\t| lit |\r\t2 to: self numLiterals + 1 do: \r\t\t[:index | \r\t\t(lit _ self objectAt: index) == literal ifTrue: [^ true].\r\t\t(lit class == Array and: [lit hasLiteral: literal]) ifTrue: [^ true]].\r\t^ false! !\r\r!CompiledMethod methodsFor: 'literals'!\rheader\r\t\"Answer the word containing the information about the form of the \r\treceiver and the form of the context needed to run the receiver.\"\r\r\t^self objectAt: 1! !\r\r!CompiledMethod methodsFor: 'literals' stamp: 'ajh 2/9/2003 13:15'!\rheaderDescription\r\t\"Answer a description containing the information about the form of the \r\treceiver and the form of the context needed to run the receiver.\"\r\r\t| s |\r\ts _ '' writeStream.\r\tself header printOn: s.\r\ts cr; nextPutAll: '\"primitive: '.\r\tself primitive printOn: s.\r\ts cr; nextPutAll: ' numArgs: '.\r\tself numArgs printOn: s.\r\ts cr; nextPutAll: ' numTemps: '.\r\tself numTemps printOn: s.\r\ts cr; nextPutAll: ' numLiterals: '.\r\tself numLiterals printOn: s.\r\ts cr; nextPutAll: ' frameSize: '.\r\tself frameSize printOn: s.\r\ts cr; nextPutAll: ' isClosureCompiled: '.\r\tself isClosureCompiled printOn: s.\r\ts nextPut: $\"; cr.\r\t^ s contents! !\r\r!CompiledMethod methodsFor: 'literals'!\rliteralAt: index \r\t\"Answer the literal indexed by the argument.\"\r\r\t^self objectAt: index + 1! !\r\r!CompiledMethod methodsFor: 'literals'!\rliteralAt: index put: value \r\t\"Replace the literal indexed by the first argument with the second \r\targument. Answer the second argument.\"\r\r\t^self objectAt: index + 1 put: value! !\r\r!CompiledMethod methodsFor: 'literals'!\rliterals\r\t\"Answer an Array of the literals referenced by the receiver.\"\r\t| literals numberLiterals |\r\tliterals _ Array new: (numberLiterals _ self numLiterals).\r\t1 to: numberLiterals do:\r\t\t[:index |\r\t\tliterals at: index put: (self objectAt: index + 1)].\r\t^literals! !\r\r!CompiledMethod methodsFor: 'literals'!\robjectAt: index \r\t\"Primitive. Answer the method header (if index=1) or a literal (if index \r\t>1) from the receiver. Essential. See Object documentation \r\twhatIsAPrimitive.\"\r\r\t<primitive: 68>\r\tself primitiveFailed! !\r\r!CompiledMethod methodsFor: 'literals'!\robjectAt: index put: value \r\t\"Primitive. Store the value argument into a literal in the receiver. An \r\tindex of 2 corresponds to the first literal. Fails if the index is less than 2 \r\tor greater than the number of literals. Answer the value as the result. \r\tNormally only the compiler sends this message, because only the \r\tcompiler stores values in CompiledMethods. Essential. See Object \r\tdocumentation whatIsAPrimitive.\"\r\r\t<primitive: 69>\r\tself primitiveFailed! !\r\r\r!CompiledMethod methodsFor: 'scanning'!\rmessages\r\t\"Answer a Set of all the message selectors sent by this method.\"\r\r\t| scanner aSet |\r\taSet _ Set new.\r\tscanner _ InstructionStream on: self.\r\tscanner\t\r\t\tscanFor: \r\t\t\t[:x | \r\t\t\tscanner addSelectorTo: aSet.\r\t\t\tfalse\t\"keep scanning\"].\r\t^aSet! !\r\r!CompiledMethod methodsFor: 'scanning'!\rreadsField: varIndex \r\t\"Answer whether the receiver loads the instance variable indexed by the \r\targument.\"\r\r\tself isReturnField ifTrue: [^self returnField + 1 = varIndex].\r\tvarIndex <= 16 ifTrue: [^ self scanFor: varIndex - 1].\r\tvarIndex <= 64 ifTrue: [^ self scanLongLoad: varIndex - 1].\r\t^ self scanVeryLongLoad: 64 offset: varIndex - 1! !\r\r!CompiledMethod methodsFor: 'scanning'!\rscanFor: byte \r\t\"Answer whether the receiver contains the argument as a bytecode.\"\r\r\t^ (InstructionStream on: self) scanFor: [:instr | instr = byte]\r\"\rSmalltalk browseAllSelect: [:m | m scanFor: 134]\r\"! !\r\r!CompiledMethod methodsFor: 'scanning'!\rscanLongLoad: extension \r\t\"Answer whether the receiver contains a long load whose extension is the \r\targument.\"\r\r\t| scanner |\r\tscanner _ InstructionStream on: self.\r\t^scanner scanFor: [:instr | instr = 128 and: [scanner followingByte = extension]]! !\r\r!CompiledMethod methodsFor: 'scanning'!\rscanLongStore: extension \r\t\"Answer whether the receiver contains a long store whose extension is \r\tthe argument.\"\r\t| scanner |\r\tscanner _ InstructionStream on: self.\r\t^scanner scanFor: \r\t\t[:instr |  (instr = 129 or: [instr = 130]) and: [scanner followingByte = extension]]! !\r\r!CompiledMethod methodsFor: 'scanning'!\rscanVeryLongLoad: extension offset: offset\r\t\"Answer whether the receiver contains a long load whose extension is the \r\targument.\"\r\t| scanner |\r\tscanner _ InstructionStream on: self.\r\t^ scanner scanFor: [:instr | (instr = 132 and: [scanner followingByte = extension])\r\t\t\t\t\t\t\t\t\t\t\tand: [scanner thirdByte = offset]]! !\r\r!CompiledMethod methodsFor: 'scanning' stamp: 'di 6/25/97 19:08'!\rscanVeryLongStore: extension offset: offset\r\t\"Answer whether the receiver contains a long load with the given offset.\r\tNote that the constant +32 is the known difference between a\r\tstore and a storePop for instVars, and it will always fail on literal variables,\r\tbut these only use store (followed by pop) anyway.\"\r\t| scanner ext |\r\tscanner _ InstructionStream on: self.\r\t^ scanner scanFor:\r\t\t[:instr | (instr = 132 and: [(ext _ scanner followingByte) = extension\r\t\t\t\t\t\t\t\t\t\t\tor: [\"might be a store/pop into rcvr\"\r\t\t\t\t\t\t\t\t\t\t\t\text = (extension+32)]])\r\t\t\t\t\t\t\tand: [scanner thirdByte = offset]]! !\r\r!CompiledMethod methodsFor: 'scanning'!\rsendsToSuper\r\t\"Answer whether the receiver sends any message to super.\"\r\t| scanner |\r\tscanner _ InstructionStream on: self.\r\t^ scanner scanFor: \r\t\t[:instr |  instr = 16r85 or: [instr = 16r84\r\t\t\t\t\t\tand: [scanner followingByte between: 16r20 and: 16r3F]]]! !\r\r!CompiledMethod methodsFor: 'scanning' stamp: 'di 12/26/1998 21:30'!\rwritesField: field \r\t\"Answer whether the receiver stores into the instance variable indexed \r\tby the argument.\"\r\r\tself isQuick ifTrue: [^ false].\r\tfield <= 8 ifTrue:\r\t\t[^ (self scanFor: 96 + field - 1) or: [self scanLongStore: field - 1]].\r\tfield <= 64 ifTrue:\r\t\t[^ self scanLongStore: field - 1].\r\t^ self scanVeryLongStore: 160 offset: field - 1! !\r\r\r!CompiledMethod methodsFor: 'source code management'!\rcacheTempNames: names\r\r\tTempNameCache _ Association key: self value: names! !\r\r!CompiledMethod methodsFor: 'source code management' stamp: 'tk 12/7/2000 12:28'!\rcheckOKToAdd: size at: filePosition\r\t\"Issue several warnings as the end of the changes file approaches its limit,\r\tand finally halt with an error when the end is reached.\"\r\r\t| fileSizeLimit margin |\r\tfileSizeLimit _ 16r2000000.\r\t3 to: 1 by: -1 do:\r\t\t[:i | margin _ i*100000.\r\t\t(filePosition + size + margin) > fileSizeLimit\r\t\t\tifTrue: [(filePosition + margin) > fileSizeLimit ifFalse:\r\t\t\t\t\t\t[self inform: 'WARNING: your changes file is within\r' , margin printString , ' characters of its size limit.\rYou should take action soon to reduce its size.\rYou may proceed.']]\r\t\t\tifFalse: [^ self]].\r\t(filePosition + size > fileSizeLimit) ifFalse: [^ self].\r\tself error: 'You have reached the size limit of the changes file.\rYou must take action now to reduce it.\rClose this error.  Do not attempt to proceed.'! !\r\r!CompiledMethod methodsFor: 'source code management' stamp: 'di 1/7/2004 15:32'!\rcopyWithTempNames: tempNames\r\t| tempStr compressed |\r\ttempStr _ String streamContents:\r\t\t[:strm | tempNames do: [:n | strm nextPutAll: n; space]].\r\tcompressed := self qCompress: tempStr firstTry: true.\r\tcompressed ifNil:\r\t\t[\"failure case (tempStr too big) will just decompile with tNN names\"\r\t\t^ self copyWithTrailerBytes: #(0 0 0 0)].\r\t^ self copyWithTrailerBytes: compressed! !\r\r!CompiledMethod methodsFor: 'source code management' stamp: 'hmm 4/26/2000 20:44'!\rfileIndex\r\t^SourceFiles fileIndexFromSourcePointer: self sourcePointer! !\r\r!CompiledMethod methodsFor: 'source code management' stamp: 'hmm 4/26/2000 20:45'!\rfilePosition\r\t^SourceFiles filePositionFromSourcePointer: self sourcePointer! !\r\r!CompiledMethod methodsFor: 'source code management' stamp: 'di 12/26/1998 22:34'!\rgetSourceFor: selector in: class\r\t\"Retrieve or reconstruct the source code for this method.\"\r\t| source flagByte |\r\tflagByte _ self last.\r\t(flagByte = 0\r\t\tor: [flagByte = 251 \"some source-less methods have flag = 251, rest = 0\"\r\t\t\tand: [((1 to: 3) collect: [:i | self at: self size - i]) = #(0 0 0)]])\r\t\tifTrue:\r\t\t[\"No source pointer -- decompile without temp names\"\r\t\t^ (class decompilerClass new decompile: selector in: class method: self)\r\t\t\tdecompileString].\r\tflagByte < 252 ifTrue:\r\t\t[\"Magic sources -- decompile with temp names\"\r\t\t^ ((class decompilerClass new withTempNames: self tempNames)\r\t\t\t\tdecompile: selector in: class method: self)\r\t\t\tdecompileString].\r\r\t\"Situation normal;  read the sourceCode from the file\"\r\t(source _ self getSourceFromFile) == nil ifFalse: [^ source].\r\r\t\"Something really wrong -- decompile blind (no temps)\"\r\t^ (class decompilerClass new decompile: selector in: class method: self)\r\t\t\tdecompileString! !\r\r!CompiledMethod methodsFor: 'source code management' stamp: 'tk 12/12/97 13:03'!\rgetSourceFromFile\r\t\"Read the source code from file, determining source file index and\r\tfile position from the last 3 bytes of this method.\"\r\t| position |\r\t(position _ self filePosition) = 0 ifTrue: [^ nil].\r\t^ (RemoteString newFileNumber: self fileIndex position: position)\r\t\t\ttext! !\r\r!CompiledMethod methodsFor: 'source code management' stamp: 'ajh 7/21/2003 09:45'!\rholdsTempNames\r\t\"Are tempNames stored in trailer bytes\"\r\r\t| flagByte |\r\tflagByte _ self last.\r\t(flagByte = 0 or: [flagByte = 251 \"some source-less methods have flag = 251, rest = 0\"\r\t\t\tand: [((1 to: 3) collect: [:i | self at: self size - i]) = #(0 0 0)]])\r\t\tifTrue: [^ false].  \"No source pointer & no temp names\"\r\tflagByte < 252 ifTrue: [^ true].  \"temp names compressed\"\r\t^ false\t\"Source pointer\"\r! !\r\r!CompiledMethod methodsFor: 'source code management' stamp: '6/5/97 di'!\rputSource: sourceStr fromParseNode: methodNode class: class category: catName\r\twithStamp: changeStamp inFile: fileIndex priorMethod: priorMethod\r\r\t^ self putSource: sourceStr fromParseNode: methodNode inFile: fileIndex withPreamble:\r\t\t\t[:file |\r\t\t\tclass printCategoryChunk: catName on: file\r\t\t\t\twithStamp: changeStamp priorMethod: priorMethod.\r\t\t\tfile cr]! !\r\r!CompiledMethod methodsFor: 'source code management' stamp: 'NS 1/16/2004 15:39'!\rputSource: sourceStr fromParseNode: methodNode inFile: fileIndex withPreamble: preambleBlock\r\t\"Store the source code for the receiver on an external file.\r\tIf no sources are available, i.e., SourceFile is nil, then store\r\ttemp names for decompilation at the end of the method.\r\tIf the fileIndex is 1, print on *.sources;  if it is 2, print on *.changes,\r\tin each case, storing a 4-byte source code pointer at the method end.\"\r\r\t| file remoteString  st80str |\r\t(SourceFiles == nil or: [(file _ SourceFiles at: fileIndex) == nil]) ifTrue:\r\t\t[^ self become: (self copyWithTempNames: methodNode tempNames)].\r\r\tSmalltalkImage current assureStartupStampLogged.\r\tfile setToEnd.\r\r\tpreambleBlock value: file.  \"Write the preamble\"\r\t(methodNode isKindOf: DialectMethodNode)\r\t\tifTrue:\r\t\t[\"This source was parsed from an alternate syntax.\r\t\tWe must convert to ST80 before logging it.\"\r\t\tst80str _ (DialectStream dialect: #ST80 contents: [:strm | methodNode printOn: strm])\r\t\t\t\t\t\tasString.\r\t\tremoteString _ RemoteString newString: st80str\r\t\t\t\t\t\tonFileNumber: fileIndex toFile: file]\r\t\tifFalse:\r\t\t[remoteString _ RemoteString newString: sourceStr\r\t\t\t\t\t\tonFileNumber: fileIndex toFile: file].\r\r\tfile nextChunkPut: ' '.\r\tInMidstOfFileinNotification signal ifFalse: [file flush].\r\tself checkOKToAdd: sourceStr size at: remoteString position.\r\tself setSourcePosition: remoteString position inFile: fileIndex! !\r\r!CompiledMethod methodsFor: 'source code management' stamp: 'di 1/7/2004 15:32'!\rqCompress: str firstTry: firstTry\r\t\"A very simple text compression routine designed for method temp names.\r\tMost common 12 chars get values 0-11 packed in one 4-bit nibble;\r\tothers get values 12-15 (2 bits) * 16 plus next nibble.\r\tLast char of str must be a space so it may be dropped without\r\tconsequence if output ends on odd nibble.\r\tNormal call is with firstTry == true.\"\r\t| charTable odd ix oddNibble names shorterStr maybe |\r\tcharTable _  \"Character encoding table must match qDecompress:\"\r\t' eatrnoislcm bdfghjkpquvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'.\r\t^ ByteArray streamContents:\r\t\t[:strm | odd _ true.  \"Flag for odd or even nibble out\"\r\t\toddNibble _ nil.\r\t\tstr do:\r\t\t\t[:char | ix _ (charTable indexOf: char) - 1.\r\t\t\t(ix <= 12 ifTrue: [Array with: ix]\r\t\t\t\tifFalse: [Array with: ix//16+12 with: ix\\\\16])\r\t\t\t\tdo:\r\t\t\t\t[:nibble | (odd _ odd not)\r\t\t\t\t\tifTrue: [strm nextPut: oddNibble*16 + nibble]\r\t\t\t\t\tifFalse: [oddNibble _ nibble]]].\r\t\tstrm position > 251 ifTrue:\r\t\t\t[\"Only values 1...251 are available for the flag byte\r\t\t\tthat signals compressed temps. See the logic in endPC.\"\r\t\t\t\"Before giving up completely, we attempt to encode most of\r\t\t\tthe temps, but with the last few shortened to tNN-style names.\"\r\t\t\tfirstTry ifFalse: [^ nil \"already tried --give up now\"].\r\t\t\tnames _ str findTokens: ' '.\r\t\t\tnames size < 8 ifTrue: [^ nil  \"weird case -- give up now\"].\r\t\t\t4 to: names size//2 by: 4 do:\r\t\t\t\t[:i | shorterStr _ String streamContents:\r\t\t\t\t\t[:s |\r\t\t\t\t\t1 to: names size - i do: [:j | s nextPutAll: (names at: j); space].\r\t\t\t\t\t1 to: i do: [:j | s nextPutAll: 't' , j printString; space]].\r\t\t\t\t(maybe _ self qCompress: shorterStr firstTry: false) ifNotNil: [^ maybe]].\r\t\t\t^ nil].\r\t\tstrm nextPut: strm position]\r\"\r  | m s |  m _ CompiledMethod new.\rs _ 'charTable odd ix oddNibble '.\r^ Array with: s size with: (m qCompress: s) size\r\twith: (m qDecompress: (m qCompress: s))\r\"\r! !\r\r!CompiledMethod methodsFor: 'source code management'!\rqDecompress: byteArray\r\t\"Decompress strings compressed by qCompress:.\r\tMost common 12 chars get values 0-11 packed in one 4-bit nibble;\r\tothers get values 12-15 (2 bits) * 16 plus next nibble\"\r\t|  charTable extended ext |\r\tcharTable _  \"Character encoding table must match qCompress:\"\r\t' eatrnoislcm bdfghjkpquvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'.\r\t^ String streamContents:\r\t\t[:strm | extended _ false.  \"Flag for 2-nibble characters\"\r\t\tbyteArray do:\r\t\t\t[:byte | \r\t\t\t(Array with: byte//16 with: byte\\\\16)\r\t\t\t\tdo:\r\t\t\t\t[:nibble | extended\r\t\t\t\t\tifTrue: [strm nextPut: (charTable at: ext*16+nibble + 1). extended _ false]\r\t\t\t\t\tifFalse: [nibble < 12 ifTrue: [strm nextPut: (charTable at: nibble + 1)]\r\t\t\t\t\t\t\t\t\tifFalse: [ext _ nibble-12.  extended _ true]]]]]! !\r\r!CompiledMethod methodsFor: 'source code management' stamp: 'hmm 4/26/2000 21:00'!\rsetSourcePointer: srcPointer\r\tsrcPointer = 0 ifTrue: [\r\t\tself at: self size put: 0.\r\t\t^self].\r\t(srcPointer between: 16r1000000 and: 16r4FFFFFF) ifFalse: [self error: 'Source pointer out of range'].\r\tself at: self size put: (srcPointer bitShift: -24) + 251.\r\t1 to: 3 do: [:i |\r\t\tself at: self size-i put: ((srcPointer bitShift: (i-3)*8) bitAnd: 16rFF)]! !\r\r!CompiledMethod methodsFor: 'source code management' stamp: 'hmm 4/26/2000 21:02'!\rsetSourcePosition: position inFile: fileIndex \r\tself setSourcePointer: (SourceFiles sourcePointerFromFileIndex: fileIndex andPosition: position)! !\r\r!CompiledMethod methodsFor: 'source code management' stamp: 'ajh 8/13/2002 18:19'!\rsourceClass\r\t\"Get my receiver class (method class) from the preamble of my source.  Return nil if not found.\"\r\r\t^ [(Compiler evaluate: (self sourceFileStream backChunk \"blank\"; backChunk \"preamble\")) theClass] on: Error do: [nil]! !\r\r!CompiledMethod methodsFor: 'source code management' stamp: 'ajh 8/13/2002 18:18'!\rsourceFileStream \r\t\"Answer the sources file stream with position set at the beginning of my source string\"\r\r\t| pos |\r\t(pos _ self filePosition) = 0 ifTrue: [^ nil].\r\t^ (RemoteString newFileNumber: self fileIndex position: pos) fileStream! !\r\r!CompiledMethod methodsFor: 'source code management' stamp: 'hmm 4/26/2000 20:44'!\rsourcePointer\r\t\"Answer the integer which can be used to find the source file and position for this method.\r\tThe returned value is either 0 (if no source is stored) or a number between 16r1000000 and 16r4FFFFFF.\r\tThe actual interpretation of this number is up to the SourceFileArray stored in the global variable SourceFiles.\"\r\r\t| pos |\r\tself last < 252 ifTrue: [^ 0  \"no source\"].\r\tpos _ self last - 251.\r\tself size - 1 to: self size - 3 by: -1 do: [:i | pos _ pos * 256 + (self at: i)].\r\t^pos! !\r\r!CompiledMethod methodsFor: 'source code management' stamp: 'ajh 7/21/2003 00:29'!\rtempNames\r\r\t| byteCount bytes |\r\tself holdsTempNames ifFalse: [\r\t\t^ (1 to: self numTemps) collect: [:i | 't', i printString]\r\t].\r\tbyteCount _ self at: self size.\r\tbyteCount = 0 ifTrue: [^ Array new].\r\tbytes _ (ByteArray new: byteCount)\r\t\treplaceFrom: 1 to: byteCount with: self \r\t\tstartingAt: self size - byteCount.\r\t^ (self qDecompress: bytes) findTokens: ' '! !\r\r\r!CompiledMethod methodsFor: 'file in/out' stamp: 'tk 10/6/2000 14:22'!\rreadDataFrom: aDataStream size: varsOnDisk\r\t\"Fill in my fields.  My header and number of literals are already installed.  Must read both objects for the literals and bytes for the bytecodes.\"\r\r\tself error: 'Must use readMethod'.! !\r\r!CompiledMethod methodsFor: 'file in/out' stamp: 'tk 8/19/1998 16:20'!\rveryDeepCopyWith: deepCopier\r\t\"Return self.  I am always shared.  Do not record me.  Only use this for blocks.  Normally methodDictionaries should not be copied this way.\"! !\r\r\r!CompiledMethod methodsFor: 'decompiling' stamp: 'ajh 5/28/2003 01:10'!\rblockNodeIn: homeMethodNode\r\t\"Return the block node for self\"\r\r\thomeMethodNode ifNil: [\r\t\t^ self decompilerClass new decompileBlock: self].\r\r\thomeMethodNode ir compiledMethod.  \"generate method\"\r\thomeMethodNode nodesDo: [:node |\r\t\t(node isBlock and:\r\t\t [node scope isInlined not and:\r\t\t  [node ir compiledMethod = self]])\r\t\t\tifTrue: [\r\t\t\t\tBlockNodeCache _ self -> node.\r\t\t\t\t^ node]\r\t].\r\tself errorNodeNotFound! !\r\r!CompiledMethod methodsFor: 'decompiling' stamp: 'ajh 2/9/2003 19:45'!\rdecompile\r\t\"Return the decompiled parse tree that represents self\"\r\r\t^ self decompileClass: nil selector: nil! !\r\r!CompiledMethod methodsFor: 'decompiling' stamp: 'ajh 2/9/2003 19:44'!\rdecompileClass: aClass selector: selector\r\t\"Return the decompiled parse tree that represents self\"\r\r\t^ self decompilerClass new decompile: selector in: aClass method: self! !\r\r!CompiledMethod methodsFor: 'decompiling' stamp: 'ar 6/28/2003 00:05'!\rdecompilerClass\r\t^Decompiler\r! !\r\r!CompiledMethod methodsFor: 'decompiling' stamp: 'ajh 2/9/2003 13:11'!\risClosureCompiled\r\t\"Return true if this method was compiled with the new closure compiler, Parser2 (compiled while Preference compileBlocksAsClosures was true).  Return false if it was compiled with the old compiler.\"\r\r\t^ self header < 0! !\r\r!CompiledMethod methodsFor: 'decompiling' stamp: 'ajh 2/9/2003 00:22'!\rmethodNode\r\t\"Return the parse tree that represents self\"\r\r\t^ self methodNodeDecompileClass: nil selector: nil! !\r\r!CompiledMethod methodsFor: 'decompiling' stamp: 'ajh 12/13/2003 18:30'!\rmethodNodeDecompileClass: aClass selector: selector\r\t\"Return the parse tree that represents self\"\r\r\t| source |\r\t^ (source _ self getSourceFromFile)\r\t\tifNil: [self decompileClass: aClass selector: selector]\r\t\tifNotNil: [self parserClass new parse: source class: (aClass ifNil: [self sourceClass])]! !\r\r!CompiledMethod methodsFor: 'decompiling' stamp: 'nk 2/20/2004 15:59'!\rmethodNodeFormattedAndDecorated: decorate\r\t\"Return the parse tree that represents self\"\r\r\t^ self methodNodeFormattedDecompileClass: nil selector: nil decorate: decorate! !\r\r!CompiledMethod methodsFor: 'decompiling' stamp: 'nk 2/20/2004 15:58'!\rmethodNodeFormattedDecompileClass: aClass selector: selector  decorate: decorated\r\t\"Return the parse tree that represents self, using pretty-printed source text if possible.\"\r\t| source sClass node |\r\tsource := self getSourceFromFile.\r\tsClass _ aClass ifNil: [self sourceClass].\r\tsource ifNil: [ ^self decompileClass: sClass selector: selector].\r\tsource _ sClass compilerClass new\r\t\t\t\t\t\tformat: source\r\t\t\t\t\t\tin: sClass\r\t\t\t\t\t\tnotifying: nil\r\t\t\t\t\t\tdecorated: decorated.\r\tnode _ sClass parserClass new\r\t\t\t\tparse: source\r\t\t\t\tclass: sClass.\r\tnode sourceText: source.\r\t^node! !\r\r!CompiledMethod methodsFor: 'decompiling' stamp: 'ar 6/28/2003 00:05'!\rparserClass\r\t^Parser! !\r\r\r!CompiledMethod methodsFor: 'breakpoints' stamp: 'emm 5/30/2002 09:22'!\rhasBreakpoint\r\t^BreakpointManager methodHasBreakpoint: self! !\r\r\r!CompiledMethod methodsFor: 'user interface' stamp: 'ajh 2/3/2003 19:18'!\rinspectorClass\r\n\r\n\t^ CompiledMethodInspector! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rCompiledMethod class\r\tinstanceVariableNames: ''!\r\r!CompiledMethod class methodsFor: 'class initialization' stamp: 'ajh 2/3/2003 21:16'!\rinitialize    \"CompiledMethod initialize\"\r\t\"Initialize class variables specifying the size of the temporary frame\r\tneeded to run instances of me.\"\r\r\tSmallFrame _ 16.\t\"Context range for temps+stack\"\r\tLargeFrame _ 56.\r\r\tself classPool at: #BlockNodeCache ifAbsentPut: [nil->nil].! !\r\r\r!CompiledMethod class methodsFor: 'instance creation' stamp: 'tk 9/9/2000 20:36'!\rbasicNew: size\r\r\tself error: 'CompiledMethods may only be created with newMethod:header:' ! !\r\r!CompiledMethod class methodsFor: 'instance creation'!\rnew\r\t\"This will not make a meaningful method, but it could be used\r\tto invoke some otherwise useful method in this class.\"\r\t^ self newMethod: 0 header: 0! !\r\r!CompiledMethod class methodsFor: 'instance creation' stamp: 'tk 1/21/2000 15:25'!\rnew: size\r\r\tself error: 'CompiledMethods may only be created with newMethod:header:'! !\r\r!CompiledMethod class methodsFor: 'instance creation' stamp: 'di 5/25/2000 06:37'!\rnewBytes: numberOfBytes trailerBytes: trailer nArgs: nArgs nTemps: nTemps nStack: stackSize nLits: nLits primitive: primitiveIndex\r\t\"Answer an instance of me. The header is specified by the message \r\targuments. The remaining parts are not as yet determined.\"\r\t| largeBit primBits method |\r\tnTemps > 64 ifTrue:\r\t\t[^ self error: 'Cannot compile -- too many temporary variables'].\t\r\tlargeBit _ (nTemps + stackSize) > SmallFrame ifTrue: [1] ifFalse: [0].\r\tprimBits _ primitiveIndex <= 16r1FF\r\t\tifTrue: [primitiveIndex]\r\t\tifFalse: [\"For now the high 2 bits of primitive no. are in high bits of header\"\r\t\t\t\t(primitiveIndex bitAnd: 16r1FF) + ((primitiveIndex bitAnd: 16r600) bitShift: 19)].\r\tmethod _ self newMethod: numberOfBytes + trailer size\r\t\theader: (nArgs bitShift: 24) +\r\t\t\t\t(nTemps bitShift: 18) +\r\t\t\t\t(largeBit bitShift: 17) +\r\t\t\t\t(nLits bitShift: 9) +\r\t\t\t\tprimBits.\r\t1 to: trailer size do:  \"Copy the source code trailer to the end\"\r\t\t[:i | method at: method size - trailer size + i put: (trailer at: i)].\r\t^ method! !\r\r!CompiledMethod class methodsFor: 'instance creation'!\rnewMethod: numberOfBytes header: headerWord \r\t\"Primitive. Answer an instance of me. The number of literals (and other \r\tinformation) is specified the headerWord. The first argument specifies \r\tthe number of fields for bytecodes in the method. Fail if either \r\targument is not a SmallInteger, or if numberOfBytes is negative. Once \r\tthe header of a method is set by this primitive, it cannot be changed in \r\tany way. Essential. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 79>\r\t(numberOfBytes isInteger and:\r\t [headerWord isInteger and:\r\t [numberOfBytes >= 0]]) ifTrue: [\r\t\t\"args okay; space must be low\"\r\t\tSmalltalk signalLowSpace.\r\t\t\"retry if user proceeds\"\r\t\t^ self newMethod: numberOfBytes header: headerWord\r\t].\r\t^self primitiveFailed! !\r\r!CompiledMethod class methodsFor: 'instance creation' stamp: 'di 5/25/2000 06:43'!\rtoReturnConstant: index trailerBytes: trailer\r\t\"Answer an instance of me that is a quick return of the constant\r\tindexed in (true false nil -1 0 1 2).\"\r\r\t^ self newBytes: 0 trailerBytes: trailer nArgs: 0 nTemps: 0 nStack: 0 nLits: 0 primitive: 256 + index\r! !\r\r!CompiledMethod class methodsFor: 'instance creation' stamp: 'di 5/25/2000 06:44'!\rtoReturnField: field trailerBytes: trailer\r\t\"Answer an instance of me that is a quick return of the instance variable \r\tindexed by the argument, field.\"\r\r\t^ self newBytes: 0 trailerBytes: trailer nArgs: 0 nTemps: 0 nStack: 0 nLits: 0 primitive: 264 + field\r! !\r\r!CompiledMethod class methodsFor: 'instance creation' stamp: 'di 5/25/2000 06:51'!\rtoReturnSelf\r\t\"Answer an instance of me that is a quick return of the instance (^self).\"\r\r\t^ self toReturnSelfTrailerBytes: #(0 0 0 0)! !\r\r!CompiledMethod class methodsFor: 'instance creation' stamp: 'di 5/25/2000 06:44'!\rtoReturnSelfTrailerBytes: trailer\r\t\"Answer an instance of me that is a quick return of the instance (^self).\"\r\r\t^ self newBytes: 0 trailerBytes: trailer nArgs: 0 nTemps: 0 nStack: 0 nLits: 0 primitive: 256\r! !\rInspector subclass: #CompiledMethodInspector\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Inspector'!\r\r!CompiledMethodInspector methodsFor: 'accessing' stamp: 'ajh 1/18/2003 13:47'!\rfieldList\r\n\r\n\t| keys |\r\n\tkeys _ OrderedCollection new.\r\n\tkeys add: 'self'.\r\n\tkeys add: 'all bytecodes'.\r\n\tkeys add: 'header'.\r\n\t1 to: object numLiterals do: [ :i |\r\n\t\tkeys add: 'literal', i printString ].\r\n\tobject initialPC to: object size do: [ :i |\r\n\t\tkeys add: i printString ].\r\n\t^ keys asArray\r\n\t! !\r\r\r!CompiledMethodInspector methodsFor: 'selecting' stamp: 'ajh 3/20/2003 00:17'!\rcontentsIsString\r\n\t\"Hacked so contents empty when deselected\"\r\n\r\n\t^ #(0 2 3) includes: selectionIndex! !\r\r!CompiledMethodInspector methodsFor: 'selecting' stamp: 'ajh 1/18/2003 13:56'!\rselection\r\n\r\n\t| bytecodeIndex |\r\n\tselectionIndex = 0 ifTrue: [^ ''].\r\n\tselectionIndex = 1 ifTrue: [^ object ].\r\n\tselectionIndex = 2 ifTrue: [^ object symbolic].\r\tselectionIndex = 3 ifTrue: [^ object headerDescription].\r\n\tselectionIndex <= (object numLiterals + 3) \r\n\t\tifTrue: [ ^ object objectAt: selectionIndex - 2 ].\r\n\tbytecodeIndex _ selectionIndex - object numLiterals - 3.\r\t^ object at: object initialPC + bytecodeIndex - 1! !\r\r!CompiledMethodInspector methodsFor: 'selecting' stamp: 'ajh 3/20/2001 11:56'!\rselectionUnmodifiable\r\t\"Answer if the current selected variable is unmodifiable via acceptance in the code pane.  For most inspectors, no selection and a selection of self (selectionIndex = 1) are unmodifiable\"\r\n\r\n\t^ true! !\rObject subclass: #CompiledMethodWithNode\r\tinstanceVariableNames: 'node method'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Compiler'!\r\r!CompiledMethodWithNode methodsFor: 'private' stamp: 'NS 1/28/2004 09:03'!\rmethod: aCompiledMethod\r\tmethod _ aCompiledMethod! !\r\r!CompiledMethodWithNode methodsFor: 'private' stamp: 'NS 1/28/2004 09:04'!\rnode: aMethodNode\r\tnode _ aMethodNode! !\r\r\r!CompiledMethodWithNode methodsFor: 'accessing' stamp: 'NS 1/28/2004 09:03'!\rmethod\r\t^ method! !\r\r!CompiledMethodWithNode methodsFor: 'accessing' stamp: 'NS 1/28/2004 09:04'!\rnode\r\t^ node! !\r\r!CompiledMethodWithNode methodsFor: 'accessing' stamp: 'NS 1/28/2004 09:04'!\rselector\r\t^ self node selector! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rCompiledMethodWithNode class\r\tinstanceVariableNames: ''!\r\r!CompiledMethodWithNode class methodsFor: 'instance creation' stamp: 'NS 1/28/2004 09:05'!\rgenerateMethodFromNode: aMethodNode trailer: bytes\r\t^ self method: (aMethodNode generate: bytes) node: aMethodNode.! !\r\r!CompiledMethodWithNode class methodsFor: 'instance creation' stamp: 'NS 1/28/2004 09:05'!\rmethod: aCompiledMethod node: aMethodNode\r\t^ self new method: aCompiledMethod; node: aMethodNode.! !\rObject subclass: #Compiler\r\tinstanceVariableNames: 'sourceStream requestor class context parserClass cacheDoItNode'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Compiler'!\r!Compiler commentStamp: '<historical>' prior: 0!\rThe compiler accepts Smalltalk source code and compiles it with respect to a given class. The user of the compiler supplies a context so that temporary variables are accessible during compilation. If there is an error, a requestor (usually a kind of StringHolderController) is sent the message notify:at:in: so that the error message can be displayed. If there is no error, then the result of compilation is a MethodNode, which is the root of a parse tree whose nodes are kinds of ParseNodes. The parse tree can be sent messages to (1) generate code for a CompiledMethod (this is done for compiling methods or evaluating expressions); (2) pretty-print the code (for formatting); or (3) produce a map from object code back to source code (used by debugger program-counter selection). See also Parser, Encoder, ParseNode.!\r\r\r!Compiler methodsFor: 'error handling'!\rinteractive \r\t\"Answer whether there is a requestor of the compiler who should be \r\tinformed that an error occurred.\"\r\r\t^ (requestor == nil or: [requestor isKindOf: SyntaxError]) not! !\r\r!Compiler methodsFor: 'error handling'!\rnotify: aString \r\t\"Refer to the comment in Object|notify:.\"\r\r\t^self notify: aString at: sourceStream position + 1! !\r\r!Compiler methodsFor: 'error handling' stamp: 'LC 1/6/2002 13:53'!\rnotify: aString at: location\r\t\"Refer to the comment in Object|notify:.\"\r\r\trequestor == nil\r\t\tifTrue: [^SyntaxErrorNotification\r\t\t\t\t\tinClass: class\r\t\t\t\t\twithCode: \r\t\t\t\t\t\t(sourceStream contents\r\t\t\t\t\t\t\tcopyReplaceFrom: location\r\t\t\t\t\t\t\tto: location - 1\r\t\t\t\t\t\t\twith: aString)\r\t\t\t\t\tdoitFlag: false]\r\t\tifFalse: [^requestor\r\t\t\t\t\tnotify: aString\r\t\t\t\t\tat: location\r\t\t\t\t\tin: sourceStream]! !\r\r\r!Compiler methodsFor: 'public access'!\rcompile: textOrStream in: aClass notifying: aRequestor ifFail: failBlock \r\t\"Answer a MethodNode for the argument, textOrStream. If the \r\tMethodNode can not be created, notify the argument, aRequestor; if \r\taRequestor is nil, evaluate failBlock instead. The MethodNode is the root \r\tof a parse tree. It can be told to generate a CompiledMethod to be \r\tinstalled in the method dictionary of the argument, aClass.\"\r\r\tself from: textOrStream\r\t\tclass: aClass\r\t\tcontext: nil\r\t\tnotifying: aRequestor.\r\t^self\r\t\ttranslate: sourceStream\r\t\tnoPattern: false\r\t\tifFail: failBlock! !\r\r!Compiler methodsFor: 'public access' stamp: 'vb 8/13/2001 23:11'!\rcompileNoPattern: textOrStream in: aClass context: aContext notifying: aRequestor ifFail: failBlock\r\t\"Similar to #compile:in:notifying:ifFail:, but the compiled code is\r\texpected to be a do-it expression, with no message pattern.\"\r\r\tself from: textOrStream\r\t\tclass: aClass\r\t\tcontext: aContext\r\t\tnotifying: aRequestor.\r\t^self\r\t\ttranslate: sourceStream\r\t\tnoPattern: true\r\t\tifFail: failBlock! !\r\r!Compiler methodsFor: 'public access' stamp: 'sd 1/19/2004 20:58'!\revaluate: aString in: aContext to: aReceiver\r\t\"evaluate aString in the given context, and return the result.  2/2/96 sw\"\r\t| result |\r\tresult _ self\r\t\t\t\tevaluate: aString\r\t\t\t\tin: aContext\r\t\t\t\tto: aReceiver\r\t\t\t\tnotifying: nil\r\t\t\t\tifFail: [^ #failedDoit].\r\t^ result! !\r\r!Compiler methodsFor: 'public access' stamp: 'NS 1/19/2004 09:05'!\revaluate: textOrStream in: aContext to: receiver notifying: aRequestor ifFail: failBlock\r\t^ self evaluate: textOrStream in: aContext to: receiver notifying: aRequestor ifFail: failBlock logged: false.! !\r\r!Compiler methodsFor: 'public access' stamp: 'NS 1/28/2004 11:19'!\revaluate: textOrStream in: aContext to: receiver notifying: aRequestor ifFail: failBlock logged: logFlag\r\t\"Compiles the sourceStream into a parse tree, then generates code into a \r\tmethod. This method is then installed in the receiver's class so that it \r\tcan be invoked. In other words, if receiver is not nil, then the text can \r\trefer to instance variables of that receiver (the Inspector uses this). If \r\taContext is not nil, the text can refer to temporaries in that context (the \r\tDebugger uses this). If aRequestor is not nil, then it will receive a \r\tnotify:at: message before the attempt to evaluate is aborted. Finally, the \r\tcompiled method is invoked from here as DoIt or (in the case of \r\tevaluation in aContext) DoItIn:. The method is subsequently removed \r\tfrom the class, but this will not get done if the invocation causes an \r\terror which is terminated. Such garbage can be removed by executing: \r\tSmalltalk allBehaviorsDo: [:cl | cl removeSelector: #DoIt; removeSelector: \r\t#DoItIn:].\"\r\r\t| methodNode method value selector |\r\tclass _ (aContext == nil ifTrue: [receiver] ifFalse: [aContext receiver]) class.\r\tself from: textOrStream class: class context: aContext notifying: aRequestor.\r\tmethodNode _ self translate: sourceStream noPattern: true ifFail:\r\t\t[^failBlock value].\r\tmethod _ methodNode generate: #(0 0 0 0).\r\tself interactive ifTrue:\r\t\t[method _ method copyWithTempNames: methodNode tempNames].\r\t\r\tselector _ context isNil\r\t\tifTrue: [#DoIt]\r\t\tifFalse: [#DoItIn:].\r\tclass addSelectorSilently: selector withMethod: method.\r\tvalue _ context isNil\r\t\tifTrue: [receiver DoIt]\r\t\tifFalse: [receiver DoItIn: context].\r\tInMidstOfFileinNotification signal \r\t\tifFalse: [class basicRemoveSelector: selector].\r\tlogFlag ifTrue: [SystemChangeNotifier uniqueInstance evaluated: sourceStream contents context: aContext].\r\t^ value.! !\r\r!Compiler methodsFor: 'public access' stamp: 'sw 5/20/2001 10:01'!\rformat: textOrStream in: aClass notifying: aRequestor contentsSymbol: aSymbol\r\t\"Compile a parse tree from the argument, textOrStream. Answer a string containing the original code, formatted nicely.  If aBoolean is true, then decorate the resulting text with color and hypertext actions\"\r\r\t| aNode |\r\tself from: textOrStream\r\t\tclass: aClass\r\t\tcontext: nil\r\t\tnotifying: aRequestor.\r\taNode _ self format: sourceStream noPattern: false ifFail: [^ nil].\r\r\taSymbol == #colorPrint\r\t\tifTrue: [^ aNode asColorizedSmalltalk80Text].\r\r\taSymbol == #altSyntax  \"Alan's current explorations for alternate syntax - 2000/2001\"\r\t\tifTrue:\r\t\t\t[^ aNode asAltSyntaxText].\r\r\t^ aNode decompileString! !\r\r!Compiler methodsFor: 'public access' stamp: 'sw 11/7/1999 00:11'!\rformat: textOrStream in: aClass notifying: aRequestor decorated: aBoolean\r\t\"Compile a parse tree from the argument, textOrStream. Answer a string containing the original code, formatted nicely.  If aBoolean is true, then decorate the resulting text with color and hypertext actions\"\r\t| aNode |\r\tself from: textOrStream\r\t\tclass: aClass\r\t\tcontext: nil\r\t\tnotifying: aRequestor.\r\taNode _ self format: sourceStream noPattern: false ifFail: [^ nil].\r\t^ aBoolean\r\t\tifTrue: [aNode decompileText]\r\t\tifFalse: [aNode decompileString]! !\r\r!Compiler methodsFor: 'public access' stamp: 'di 4/24/2000 07:46'!\rparse: textOrStream in: aClass notifying: req\r\t\"Compile the argument, textOrStream, with respect to the class, aClass, \r\tand answer the MethodNode that is the root of the resulting parse tree. \r\tNotify the argument, req, if an error occurs. The failBlock is defaulted to \r\tan empty block.\"\r\r\t^ self parse: textOrStream in: aClass notifying: req dialect: false! !\r\r!Compiler methodsFor: 'public access' stamp: 'ajh 9/14/2002 18:47'!\rparse: textOrStream in: aClass notifying: req dialect: useDialect\r        \"Compile the argument, textOrStream, with respect to the class, aClass, \r        and answer the MethodNode that is the root of the resulting parse tree. \r        Notify the argument, req, if an error occurs. The failBlock is defaulted to \r        an empty block.\"\r\r        self from: textOrStream class: aClass context: nil notifying: req.\r        ^ ((useDialect and: [RequestAlternateSyntaxSetting signal])\r                ifTrue: [self dialectParserClass]\r                ifFalse: [self parserClass]) new\r                        parse: sourceStream\r                        class: class\r                        noPattern: false\r                        context: context\r                        notifying: requestor\r                        ifFail: []! !\r\r\r!Compiler methodsFor: 'private' stamp: 'ar 6/28/2003 00:05'!\rdialectParserClass\r\t^DialectParser! !\r\r!Compiler methodsFor: 'private' stamp: 'ajh 1/21/2003 12:44'!\rformat: aStream noPattern: noPattern ifFail: failBlock\r\t| tree |\r\ttree _ \r\t\tself parserClass new\r\t\t\tparse: aStream\r\t\t\tclass: class\r\t\t\tnoPattern: noPattern\r\t\t\tcontext: context\r\t\t\tnotifying: requestor\r\t\t\tifFail: [^ failBlock value].\r\t^ tree! !\r\r!Compiler methodsFor: 'private'!\rfrom: textOrStream class: aClass context: aContext notifying: req\r\r\t(textOrStream isKindOf: PositionableStream)\r\t\tifTrue: [sourceStream _ textOrStream]\r\t\tifFalse: [sourceStream _ ReadStream on: textOrStream asString].\r\tclass _ aClass.\r\tcontext _ aContext.\r\trequestor _ req! !\r\r!Compiler methodsFor: 'private' stamp: 'ajh 1/21/2003 12:44'!\rparserClass\r\r\t^ parserClass! !\r\r!Compiler methodsFor: 'private' stamp: 'ajh 9/19/2002 02:20'!\rparserClass: aParserClass\r\r\tparserClass _ aParserClass.\r\tcacheDoItNode _ true.\r! !\r\r!Compiler methodsFor: 'private' stamp: 'ajh 1/21/2003 12:45'!\rtranslate: aStream noPattern: noPattern ifFail: failBlock\r\t| tree |\r\ttree _ \r\t\tself parserClass new\r\t\t\tparse: aStream\r\t\t\tclass: class\r\t\t\tnoPattern: noPattern\r\t\t\tcontext: context\r\t\t\tnotifying: requestor\r\t\t\tifFail: [^ failBlock value].\r\t^ tree! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rCompiler class\r\tinstanceVariableNames: ''!\r\r!Compiler class methodsFor: 'accessing' stamp: 'ajh 1/21/2003 12:39'!\rnew\r\r\t^ super new parserClass: self parserClass! !\r\r!Compiler class methodsFor: 'accessing'!\rparserClass\r\t\"Return a parser class to use for parsing method headers.\"\r\r\t^Parser! !\r\r\r!Compiler class methodsFor: 'evaluating' stamp: 'NS 1/19/2004 10:07'!\revaluate: textOrString \r\t\"See Compiler|evaluate:for:notifying:logged:. If a compilation error occurs, \r\ta Syntax Error view is created rather than notifying any requestor. \r\tCompilation is carried out with respect to nil, i.e., no object, and the \r\tinvocation is not logged.\"\r\r\t^self evaluate: textOrString for: nil logged: false! !\r\r!Compiler class methodsFor: 'evaluating'!\revaluate: textOrString for: anObject logged: logFlag \r\t\"See Compiler|evaluate:for:notifying:logged:. If a compilation error occurs, \r\ta Syntax Error view is created rather than notifying any requestor.\"\r\r\t^self evaluate: textOrString for: anObject notifying: nil logged: logFlag! !\r\r!Compiler class methodsFor: 'evaluating' stamp: 'NS 1/19/2004 09:50'!\revaluate: textOrString for: anObject notifying: aController logged: logFlag\r\t\"Compile and execute the argument, textOrString with respect to the class \r\tof anObject. If a compilation error occurs, notify aController. If both \r\tcompilation and execution are successful then, if logFlag is true, log \r\t(write) the text onto a system changes file so that it can be replayed if \r\tnecessary.\"\r\r\t^ self new\r\t\t\t\tevaluate: textOrString\r\t\t\t\tin: nil\r\t\t\t\tto: anObject\r\t\t\t\tnotifying: aController\r\t\t\t\tifFail: [^nil]\r\t\t\t\tlogged: logFlag.! !\r\r!Compiler class methodsFor: 'evaluating'!\revaluate: textOrString logged: logFlag \r\t\"See Compiler|evaluate:for:notifying:logged:. If a compilation error occurs, \r\ta Syntax Error view is created rather than notifying any requestor. \r\tCompilation is carried out with respect to nil, i.e., no object.\"\r\r\t^self evaluate: textOrString for: nil logged: logFlag! !\r\r!Compiler class methodsFor: 'evaluating'!\revaluate: textOrString notifying: aController logged: logFlag \r\t\"See Compiler|evaluate:for:notifying:logged:. Compilation is carried out \r\twith respect to nil, i.e., no object.\"\r\r\t^self evaluate: textOrString for: nil notifying: aController logged: logFlag! !\rCharacterScanner subclass: #CompositionScanner\r\tinstanceVariableNames: 'spaceX spaceIndex lineHeight baseline lineHeightAtSpace baselineAtSpace'\r\tclassVariableNames: ''\r\tpoolDictionaries: 'TextConstants'\r\tcategory: 'Graphics-Text'!\r!CompositionScanner commentStamp: '<historical>' prior: 0!\rCompositionScanners are used to measure text and determine where line breaks and space padding should occur.!\r\r\r!CompositionScanner methodsFor: 'scanning' stamp: 'hmm 7/20/2000 18:24'!\rcomposeLine: lineIndex fromCharacterIndex: startIndex inParagraph: aParagraph \r\t\"Answer an instance of TextLineInterval that represents the next line in the paragraph.\"\r\t| runLength done stopCondition |\r\tdestX _ spaceX _ leftMargin _ aParagraph leftMarginForCompositionForLine: lineIndex.\r\tdestY _ 0.\r\trightMargin _ aParagraph rightMarginForComposition.\r\tleftMargin >= rightMargin ifTrue: [self error: 'No room between margins to compose'].\r\tlastIndex _ startIndex.\t\"scanning sets last index\"\r\tlineHeight _ textStyle lineGrid.  \"may be increased by setFont:...\"\r\tbaseline _ textStyle baseline.\r\tself setStopConditions.\t\"also sets font\"\r\tself handleIndentation.\r\trunLength _ text runLengthFor: startIndex.\r\trunStopIndex _ (lastIndex _ startIndex) + (runLength - 1).\r\tline _ TextLineInterval\r\t\tstart: lastIndex\r\t\tstop: 0\r\t\tinternalSpaces: 0\r\t\tpaddingWidth: 0.\r\tspaceCount _ 0.\r\tdone _ false.\r\t[done]\r\t\twhileFalse: \r\t\t\t[stopCondition _ self scanCharactersFrom: lastIndex to: runStopIndex\r\t\t\t\tin: text string rightX: rightMargin stopConditions: stopConditions\r\t\t\t\tkern: kern.\r\t\t\t\"See setStopConditions for stopping conditions for composing.\"\r\t\t\t(self perform: stopCondition)\r\t\t\t\tifTrue: [^line lineHeight: lineHeight + textStyle leading\r\t\t\t\t\t\t\tbaseline: baseline + textStyle leading]]! !\r\r!CompositionScanner methodsFor: 'scanning' stamp: 'ar 1/8/2000 14:36'!\rsetActualFont: aFont\r\t\"Keep track of max height and ascent for auto lineheight\"\r\t| descent |\r\tsuper setActualFont: aFont.\r\tlineHeight == nil\r\t\tifTrue: [descent _ font descent.\r\t\t\t\tbaseline _ font ascent.\r\t\t\t\tlineHeight _ baseline + descent]\r\t\tifFalse: [descent _ lineHeight - baseline max: font descent.\r\t\t\t\tbaseline _ baseline max: font ascent.\r\t\t\t\tlineHeight _ lineHeight max: baseline + descent]! !\r\r\r!CompositionScanner methodsFor: 'stop conditions' stamp: 'RAA 5/4/2001 13:52'!\rcolumnBreak\r\r\t\"Answer true. Set up values for the text line interval currently being \r\tcomposed.\"\r\r\tline stop: lastIndex.\r\tspaceX _ destX.\r\tline paddingWidth: rightMargin - spaceX.\r\t^true! !\r\r!CompositionScanner methodsFor: 'stop conditions' stamp: 'ar 1/9/2000 13:54'!\rcr\r\t\"Answer true. Set up values for the text line interval currently being \r\tcomposed.\"\r\r\tline stop: lastIndex.\r\tspaceX _ destX.\r\tline paddingWidth: rightMargin - spaceX.\r\t^true! !\r\r!CompositionScanner methodsFor: 'stop conditions' stamp: 'ar 1/9/2000 13:54'!\rcrossedX\r\t\"There is a word that has fallen across the right edge of the composition \r\trectangle. This signals the need for wrapping which is done to the last \r\tspace that was encountered, as recorded by the space stop condition.\"\r\r\tspaceCount >= 1 ifTrue:\r\t\t[\"The common case. First back off to the space at which we wrap.\"\r\t\tline stop: spaceIndex.\r\t\tlineHeight _ lineHeightAtSpace.\r\t\tbaseline _ baselineAtSpace.\r\t\tspaceCount _ spaceCount - 1.\r\t\tspaceIndex _ spaceIndex - 1.\r\r\t\t\"Check to see if any spaces preceding the one at which we wrap.\r\t\t\tDouble space after punctuation, most likely.\"\r\t\t[(spaceCount > 1 and: [(text at: spaceIndex) = Space])]\r\t\t\twhileTrue:\r\t\t\t\t[spaceCount _ spaceCount - 1.\r\t\t\t\t\"Account for backing over a run which might\r\t\t\t\t\tchange width of space.\"\r\t\t\t\tfont _ text fontAt: spaceIndex withStyle: textStyle.\r\t\t\t\tspaceIndex _ spaceIndex - 1.\r\t\t\t\tspaceX _ spaceX - (font widthOf: Space)].\r\t\tline paddingWidth: rightMargin - spaceX.\r\t\tline internalSpaces: spaceCount]\r\tifFalse:\r\t\t[\"Neither internal nor trailing spaces -- almost never happens.\"\r\t\tlastIndex _ lastIndex - 1.\r\t\t[destX <= rightMargin]\r\t\t\twhileFalse:\r\t\t\t\t[destX _ destX - (font widthOf: (text at: lastIndex)).\r\t\t\t\tlastIndex _ lastIndex - 1].\r\t\tspaceX _ destX.\r\t\tline paddingWidth: rightMargin - destX.\r\t\tline stop: (lastIndex max: line first)].\r\t^true! !\r\r!CompositionScanner methodsFor: 'stop conditions' stamp: 'ar 1/9/2000 13:54'!\rendOfRun\r\t\"Answer true if scanning has reached the end of the paragraph. \r\tOtherwise step conditions (mostly install potential new font) and answer \r\tfalse.\"\r\r\t| runLength |\r\tlastIndex = text size\r\tifTrue:\t[line stop: lastIndex.\r\t\t\tspaceX _ destX.\r\t\t\tline paddingWidth: rightMargin - destX.\r\t\t\t^true]\r\tifFalse:\t[runLength _ (text runLengthFor: (lastIndex _ lastIndex + 1)).\r\t\t\trunStopIndex _ lastIndex + (runLength - 1).\r\t\t\tself setStopConditions.\r\t\t\t^false]\r! !\r\r!CompositionScanner methodsFor: 'stop conditions' stamp: 'ar 12/17/2001 02:13'!\rplaceEmbeddedObject: anchoredMorph\r\t| descent |\r\t\"Workaround: The following should really use #textAnchorType\"\r\tanchoredMorph relativeTextAnchorPosition ifNotNil:[^true].\r\t(super placeEmbeddedObject: anchoredMorph) ifFalse: [\"It doesn't fit\"\r\t\t\"But if it's the first character then leave it here\"\r\t\tlastIndex < line first ifFalse:[\r\t\t\tline stop: lastIndex-1.\r\t\t\t^ false]].\r\tdescent _ lineHeight - baseline.\r\tlineHeight _ lineHeight max: anchoredMorph height.\r\tbaseline _ lineHeight - descent.\r\tline stop: lastIndex.\r\t^ true! !\r\r!CompositionScanner methodsFor: 'stop conditions' stamp: 'BG 10/29/2003 10:20'!\rsetFont\r\tsuper setFont.\r\tstopConditions == DefaultStopConditions \r\t\tifTrue:[stopConditions _ stopConditions copy].\r\tstopConditions at: Space asciiValue + 1 put: #space.\r\twantsColumnBreaks == true ifTrue: [\r\t\tstopConditions at: \"TextComposer characterForColumnBreak asciiValue\" 1 + 1 put: #columnBreak.\r\t].\r! !\r\r!CompositionScanner methodsFor: 'stop conditions' stamp: 'ar 1/8/2000 14:37'!\rsetStopConditions\r\t\"Set the font and the stop conditions for the current run.\"\r\t\r\tself setFont! !\r\r!CompositionScanner methodsFor: 'stop conditions' stamp: 'ar 1/9/2000 13:55'!\rspace\r\t\"Record left x and character index of the space character just encounted. \r\tUsed for wrap-around. Answer whether the character has crossed the \r\tright edge of the composition rectangle of the paragraph.\"\r\r\tspaceX _ destX.\r\tdestX _ spaceX + spaceWidth.\r\tspaceIndex _ lastIndex.\r\tlineHeightAtSpace _ lineHeight.\r\tbaselineAtSpace _ baseline.\r\tlastIndex _ lastIndex + 1.\r\tspaceCount _ spaceCount + 1.\r\tdestX > rightMargin ifTrue: \t[^self crossedX].\r\t^false\r! !\r\r!CompositionScanner methodsFor: 'stop conditions' stamp: 'ar 1/9/2000 13:59'!\rtab\r\t\"Advance destination x according to tab settings in the paragraph's \r\ttextStyle. Answer whether the character has crossed the right edge of \r\tthe composition rectangle of the paragraph.\"\r\r\tdestX _ textStyle\r\t\t\t\tnextTabXFrom: destX leftMargin: leftMargin rightMargin: rightMargin.\r\tdestX > rightMargin ifTrue:\t[^self crossedX].\r\tlastIndex _ lastIndex + 1.\r\t^false\r! !\r\r\r!CompositionScanner methodsFor: 'accessing' stamp: 'ar 1/8/2000 14:35'!\rrightX\r\t\"Meaningful only when a line has just been composed -- refers to the \r\tline most recently composed. This is a subtrefuge to allow for easy \r\tresizing of a composition rectangle to the width of the maximum line. \r\tUseful only when there is only one line in the form or when each line \r\tis terminated by a carriage return. Handy for sizing menus and lists.\"\r\r\t^spaceX! !\r\r\r!CompositionScanner methodsFor: 'intialize-release' stamp: 'ar 5/17/2000 19:14'!\rforParagraph: aParagraph\r\t\"Initialize the receiver for scanning the given paragraph.\"\r\r\tself\r\t\tinitializeFromParagraph: aParagraph\r\t\tclippedBy: aParagraph clippingRectangle.\r! !\rReadWriteStream subclass: #CompressedSourceStream\r\tinstanceVariableNames: 'segmentFile segmentSize nSegments segmentTable segmentIndex dirty endOfFile'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Files'!\r!CompressedSourceStream commentStamp: 'di 11/3/2003 17:58' prior: 0!\rI implement a file format that compresses segment by segment to allow incremental writing and browsing.  Note that the file can only be written at the end.\r\rStructure:\rsegmentFile\t\tThe actual compressed file.\rsegmentSize\t\tThis is the quantum of compression.  The virtual file is sliced up\r\t\t\t\tinto segments of this size.\rnSegments\t\tThe maximum number of segments to which this file can be grown.\rendOfFile\t\tThe user's endOfFile pointer.\rsegmentTable\tWhen a file is open, this table holds the physical file positions\r\t\t\t\tof the compressed segments.\rsegmentIndex\tIndex of the most recently accessed segment.\r\rInherited from ReadWriteStream...\rcollection\t\tThe segment buffer, uncompressed\rposition\t\t\tThis is the position *local* to the current segment buffer\rreadLimit\t\tReadLimit for the current buffer\rwriteLimit\t\tWriteLimit for the current buffer\r\rGreat care must be exercised to distinguish between the position relative to the segment buffer and the full file position (and, or course, the segment file position ;-).\r\rThe implementation defaults to a buffer size of 20k, and a max file size of 34MB (conveniently chosen to be greater than the current 33MB limit of source code pointers).  The format of the file is as follows:\r\tsegmentSize\t\t4 bytes\r\tnSegments\t\t4 bytes\r\tendOfFile\t\t4 bytes\r\tsegmentTable\t4 bytes * (nSegments+1)\r\tbeginning of first compressed segment\r\rIt is possible to override the default allocation by sending the message #segmentSize:nSegments: immediately after opening a new file for writing, as follows:\r\r\tbigFile _ (CompressedSourceStream on: (FileStream newFileNamed: 'biggy.stc'))\r\t\t\tsegmentSize: 50000 maxSize: 200000000\r\rThe difference between segment table entries reveals the size of each compressed segment.  When a file is being written, it may lack the final segment, but any flush, position:, or close will force a dirty segment to be written.!\r\r\r!CompressedSourceStream methodsFor: 'open/close' stamp: 'di 11/1/2003 22:36'!\rbinary\r\tself error: 'Compressed source files are ascii to the user (though binary underneath)'! !\r\r!CompressedSourceStream methodsFor: 'open/close' stamp: 'di 11/1/2003 22:36'!\rclose\r\tself flush.\r\tsegmentFile close! !\r\r!CompressedSourceStream methodsFor: 'open/close' stamp: 'di 11/3/2003 17:54'!\ropenOn: aFile\r\t\"Open the receiver.\"\r\tsegmentFile _ aFile.\r\tsegmentFile binary.\r\tsegmentFile size > 0\r\tifTrue:\r\t\t[self readHeaderInfo.  \"If file exists, then read the parameters\"]\r\tifFalse:\r\t\t[self segmentSize: 20000 maxSize: 34000000.  \"Otherwise write default values\"]! !\r\r!CompressedSourceStream methodsFor: 'open/close' stamp: 'di 11/3/2003 10:13'!\ropenReadOnly\r\r\tsegmentFile openReadOnly! !\r\r!CompressedSourceStream methodsFor: 'open/close' stamp: 'di 11/5/2003 22:41'!\rreadHeaderInfo\r\t| valid a b |\r\tsegmentFile position: 0.\r\tsegmentSize _ segmentFile nextNumber: 4.\r\tnSegments _ segmentFile nextNumber: 4.\r\tendOfFile _ segmentFile nextNumber: 4.\r\tsegmentFile size < (nSegments+1 + 3 * 4) ifTrue: \"Check for reasonable segment info\"\r\t\t[self error: 'This file is not in valid compressed source format'].\r\tsegmentTable _ (1 to: nSegments+1) collect: [:x | segmentFile nextNumber: 4].\r\tsegmentTable first ~= self firstSegmentLoc ifTrue:\r\t\t[self error: 'This file is not in valid compressed source format'].\r\tvalid _ true.\r\t1 to: nSegments do:  \"Check that segment offsets are ascending\"\r\t\t[:i | a _ segmentTable at: i.  b _ segmentTable at: i+1.\r\t\t(a = 0 and: [b ~= 0]) ifTrue: [valid _ false].\r\t\t(a ~= 0 and: [b ~= 0]) ifTrue: [b <= a ifTrue: [valid _ false]]].\r\tvalid ifFalse:\r\t\t[self error: 'This file is not in valid compressed source format'].\r\tdirty _ false.\r\tself position: 0.! !\r\r!CompressedSourceStream methodsFor: 'open/close' stamp: 'di 11/3/2003 10:09'!\rreadOnlyCopy\r\r\t^ self class on: segmentFile readOnlyCopy! !\r\r\r!CompressedSourceStream methodsFor: 'access' stamp: 'di 11/3/2003 00:41'!\ratEnd\r\r\tposition >= readLimit ifFalse: [^ false].  \"more in segment\"\r\t^ self position >= endOfFile  \"more in file\"! !\r\r!CompressedSourceStream methodsFor: 'access' stamp: 'di 11/1/2003 22:48'!\rcontentsOfEntireFile\r\t| contents |\r\tself position: 0.\r\tcontents _ self next: self size.\r\tself close.\r\t^ contents! !\r\r!CompressedSourceStream methodsFor: 'access' stamp: 'di 11/1/2003 19:50'!\rflush\r\tdirty ifTrue:\r\t\t[\"Write buffer, compressed, to file, and also write the segment offset and eof\"\r\t\tself writeSegment].! !\r\r!CompressedSourceStream methodsFor: 'access' stamp: 'di 11/20/2003 12:03'!\rnext\r\t<primitive: 65>\r\tposition >= readLimit\r\t\tifTrue: [^ (self next: 1) at: 1]\r\t\tifFalse: [^ collection at: (position _ position + 1)]! !\r\r!CompressedSourceStream methodsFor: 'access' stamp: 'di 11/2/2003 11:45'!\rnext: n\r\t| str |\r\tn <= (readLimit - position) ifTrue:\r\t\t[\"All characters are available in buffer\"\r\t\tstr _ collection copyFrom: position + 1 to: position + n.\r\t\tposition _ position + n.\r\t\t^ str].\r\r\t\"Read limit could be segment boundary or real end of file\"\r\t(readLimit + self segmentOffset) = endOfFile ifTrue:\r\t\t[\"Real end of file -- just return what's available\"\r\t\t^ self next: readLimit - position].\r\r\t\"Read rest of segment.  Then (after positioning) read what remains\"\r\tstr _ self next: readLimit - position.\r\tself position: self position.\r\t^ str , (self next: n - str size)\r! !\r\r!CompressedSourceStream methodsFor: 'access' stamp: 'di 11/2/2003 11:27'!\rnextPut: char\r\t\"Slow, but we don't often write, and then not a lot\"\r\tself nextPutAll: char asString.\r\t^ char! !\r\r!CompressedSourceStream methodsFor: 'access' stamp: 'di 11/2/2003 12:06'!\rnextPutAll: str\r\t| n nInSeg |\r\tn _ str size.\r\tn <= (writeLimit - position) ifTrue:\r\t\t[\"All characters fit in buffer\"\r\t\tcollection replaceFrom: position + 1 to: position + n with: str.\r\t\tdirty _ true.\r\t\tposition _ position + n.\r\t\treadLimit _ readLimit max: position.\r\t\tendOfFile _ endOfFile max: self position.\r\t\t^ str].\r\r\t\"Write what fits in segment.  Then (after positioning) write what remains\"\r\tnInSeg _ writeLimit - position.\r\tnInSeg = 0\r\t\tifTrue: [self position: self position.\r\t\t\t\tself nextPutAll: str]\r\t\tifFalse: [self nextPutAll: (str first: nInSeg).\r\t\t\t\tself position: self position.\r\t\t\t\tself nextPutAll: (str allButFirst: nInSeg)]\r\t\r! !\r\r!CompressedSourceStream methodsFor: 'access' stamp: 'di 11/2/2003 09:27'!\rposition\r\r\t^ position + self segmentOffset! !\r\r!CompressedSourceStream methodsFor: 'access' stamp: 'di 11/1/2003 11:41'!\rsize\r\t^ endOfFile ifNil: [0]! !\r\r\r!CompressedSourceStream methodsFor: 'private' stamp: 'di 11/2/2003 09:35'!\rfirstSegmentLoc\r\t\"First segment follows 3 header words and segment table\"\r\t^ (3 + nSegments+1) * 4! !\r\r!CompressedSourceStream methodsFor: 'private' stamp: 'di 11/2/2003 09:24'!\rsegmentOffset\r\r\t^ segmentIndex - 1 * segmentSize! !\r\r!CompressedSourceStream methodsFor: 'private' stamp: 'di 11/5/2003 22:41'!\rsegmentSize: segSize maxSize: maxSize\r\t\"Note that this method can be called after the initial open, provided that no\r\twriting has yet taken place.  This is how to override the default segmentation.\"\r\tself size = 0 ifFalse: [self error: 'Cannot set parameters after the first write'].\r\tsegmentFile position: 0.\r\tsegmentFile nextNumber: 4 put: (segmentSize _ segSize).\r\tsegmentFile nextNumber: 4 put: (nSegments _ maxSize // segSize + 2).\r\tsegmentFile nextNumber: 4 put: (endOfFile _ 0).\r\tsegmentTable _ Array new: nSegments+1 withAll: 0.\r\tsegmentTable at: 1 put: self firstSegmentLoc.  \"Loc of first segment, always.\"\r\tsegmentTable do: [:i | segmentFile nextNumber: 4 put: i].\r\tsegmentIndex _ 1.\r\tcollection _ String new: segmentSize.\r\twriteLimit _ segmentSize.\r\treadLimit _ 0.\r\tposition _ 0.\r\tendOfFile _ 0.\r\tself writeSegment.\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rCompressedSourceStream class\r\tinstanceVariableNames: ''!\r\r!CompressedSourceStream class methodsFor: 'as yet unclassified' stamp: 'di 11/1/2003 22:58'!\ron: aFile\r\t^ self basicNew openOn: aFile! !\rInstructionStream subclass: #ContextPart\r\tinstanceVariableNames: 'stackp'\r\tclassVariableNames: 'PrimitiveFailToken QuickStep'\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Methods'!\r!ContextPart commentStamp: '<historical>' prior: 0!\rTo the instruction parsing ability of InstructionStream I add the actual semantics for execution. The execution state is stored in the indexable fields of my subclasses. This includes temporary variables and a stack of values used in evaluating expressions. The actual semantics of execution can be found in my category \"system simulation\" and \"instruction decode\". These methods exactly parallel the operation of the Smalltalk machine itself.\r\t\rThe simulator is a group of my methods that do what the Smalltalk interpreter does: execute Smalltalk bytecodes. By adding code to the simulator, you may take statistics on the running of Smalltalk methods. For example,\r\tTranscript show: (ContextPart runSimulated: [3 factorial]) printString.!\r\r\r!ContextPart methodsFor: 'accessing'!\rclient\r\t\"Answer the client, that is, the object that sent the message that created this context.\"\r\r\t^sender receiver! !\r\r!ContextPart methodsFor: 'accessing'!\rhome\r\t\"Answer the context in which the receiver was defined.\"\r\r\tself subclassResponsibility! !\r\r!ContextPart methodsFor: 'accessing'!\rmethod\r\t\"Answer the method of this context.\"\r\r\tself subclassResponsibility! !\r\r!ContextPart methodsFor: 'accessing' stamp: 'ajh 2/9/2003 00:21'!\rmethodNode\r\r\t| selector methodClass |\r\tselector _ self receiver class\r\t\tselectorAtMethod: self method\r\t\tsetClass: [:mclass | methodClass _ mclass].\r\t^ self method methodNodeDecompileClass: methodClass selector: selector! !\r\r!ContextPart methodsFor: 'accessing' stamp: 'nk 2/20/2004 16:50'!\rmethodNodeFormattedAndDecorated: decorate\r\t\"Answer a method node made from pretty-printed (and colorized, if decorate is true) source text.\"\r\r\t| selector methodClass |\r\tselector _ self receiver class\r\t\tselectorAtMethod: self method\r\t\tsetClass: [:mclass | methodClass _ mclass].\r\t^ self method methodNodeFormattedDecompileClass: methodClass selector: selector decorate: decorate! !\r\r!ContextPart methodsFor: 'accessing'!\rreceiver\r\t\"Answer the receiver of the message that created this context.\"\r\r\tself subclassResponsibility! !\r\r!ContextPart methodsFor: 'accessing'!\rtempAt: index\r\t\"Answer the value of the temporary variable whose index is the \r\targument, index.\"\r\r\tself subclassResponsibility! !\r\r!ContextPart methodsFor: 'accessing'!\rtempAt: index put: value \r\t\"Store the argument, value, as the temporary variable whose index is the \r\targument, index.\"\r\r\tself subclassResponsibility! !\r\r\r!ContextPart methodsFor: 'instruction decoding'!\rdoDup\r\t\"Simulate the action of a 'duplicate top of stack' bytecode.\"\r\r\tself push: self top! !\r\r!ContextPart methodsFor: 'instruction decoding'!\rdoPop\r\t\"Simulate the action of a 'remove top of stack' bytecode.\"\r\r\tself pop! !\r\r!ContextPart methodsFor: 'instruction decoding'!\rjump: distance \r\t\"Simulate the action of a 'unconditional jump' bytecode whose offset is \r\tthe argument, distance.\"\r\r\tpc _ pc + distance! !\r\r!ContextPart methodsFor: 'instruction decoding' stamp: 'ajh 7/6/2003 20:38'!\rjump: distance if: condition \r\t\"Simulate the action of a 'conditional jump' bytecode whose offset is the \r\targument, distance, and whose condition is the argument, condition.\"\r\r\t| bool |\r\tbool _ self pop.\r\t(bool == true or: [bool == false]) ifFalse: [\r\t\t^self\r\t\t\tsend: #mustBeBooleanIn:\r\t\t\tto: bool\r\t\t\twith: {self}\r\t\t\tsuper: false].\r\t(bool eqv: condition) ifTrue: [self jump: distance]! !\r\r!ContextPart methodsFor: 'instruction decoding' stamp: 'ajh 1/24/2003 16:35'!\rmethodReturnConstant: value \r\t\"Simulate the action of a 'return constant' bytecode whose value is the \r\targument, value. This corresponds to a source expression like '^0'.\"\r\r\t^ self return: value from: self home! !\r\r!ContextPart methodsFor: 'instruction decoding' stamp: 'ajh 1/24/2003 16:34'!\rmethodReturnReceiver\r\t\"Simulate the action of a 'return receiver' bytecode. This corresponds to \r\tthe source expression '^self'.\"\r\r\t^ self return: self receiver from: self home! !\r\r!ContextPart methodsFor: 'instruction decoding' stamp: 'ajh 1/24/2003 16:34'!\rmethodReturnTop\r\t\"Simulate the action of a 'return top of stack' bytecode. This corresponds \r\tto source expressions like '^something'.\"\r\r\t^ self return: self pop from: self home! !\r\r!ContextPart methodsFor: 'instruction decoding'!\rpopIntoLiteralVariable: value \r\t\"Simulate the action of bytecode that removes the top of the stack and \r\tstores it into a literal variable of my method.\"\r\r\tvalue value: self pop! !\r\r!ContextPart methodsFor: 'instruction decoding'!\rpopIntoReceiverVariable: offset \r\t\"Simulate the action of bytecode that removes the top of the stack and \r\tstores it into an instance variable of my receiver.\"\r\r\tself receiver instVarAt: offset + 1 put: self pop! !\r\r!ContextPart methodsFor: 'instruction decoding'!\rpopIntoTemporaryVariable: offset \r\t\"Simulate the action of bytecode that removes the top of the stack and \r\tstores it into one of my temporary variables.\"\r\r\tself home at: offset + 1 put: self pop! !\r\r!ContextPart methodsFor: 'instruction decoding'!\rpushActiveContext\r\t\"Simulate the action of bytecode that pushes the the active context on the \r\ttop of its own stack.\"\r\r\tself push: self! !\r\r!ContextPart methodsFor: 'instruction decoding'!\rpushConstant: value \r\t\"Simulate the action of bytecode that pushes the constant, value, on the \r\ttop of the stack.\"\r\r\tself push: value! !\r\r!ContextPart methodsFor: 'instruction decoding'!\rpushLiteralVariable: value \r\t\"Simulate the action of bytecode that pushes the contents of the literal \r\tvariable whose index is the argument, index, on the top of the stack.\"\r\r\tself push: value value! !\r\r!ContextPart methodsFor: 'instruction decoding'!\rpushReceiver\r\t\"Simulate the action of bytecode that pushes the active context's receiver \r\ton the top of the stack.\"\r\r\tself push: self receiver! !\r\r!ContextPart methodsFor: 'instruction decoding'!\rpushReceiverVariable: offset \r\t\"Simulate the action of bytecode that pushes the contents of the receiver's \r\tinstance variable whose index is the argument, index, on the top of the \r\tstack.\"\r\r\tself push: (self receiver instVarAt: offset + 1)! !\r\r!ContextPart methodsFor: 'instruction decoding'!\rpushTemporaryVariable: offset \r\t\"Simulate the action of bytecode that pushes the contents of the \r\ttemporary variable whose index is the argument, index, on the top of \r\tthe stack.\"\r\r\tself push: (self home at: offset + 1)! !\r\r!ContextPart methodsFor: 'instruction decoding' stamp: 'ajh 3/5/2004 03:44'!\rreturn: value from: aSender \r\t\"For simulation.  Roll back self to aSender and return value from it.  Execute any unwind blocks on the way.  ASSUMES aSender is a sender of self\"\r\r\t| newTop ctxt |\r\taSender isDead ifTrue: [\r\t\t^ self send: #cannotReturn: to: self with: {value} super: false].\r\tnewTop _ aSender sender.\r\tctxt _ self findNextUnwindContextUpTo: newTop.\r\tctxt ifNotNil: [\r\t\t^ self send: #aboutToReturn:through: to: self with: {value. ctxt} super: false].\r\tself releaseTo: newTop.\r\tnewTop ifNotNil: [newTop push: value].\r\t^ newTop\r! !\r\r!ContextPart methodsFor: 'instruction decoding' stamp: 'hmm 7/17/2001 20:52'!\rsend: selector super: superFlag numArgs: numArgs\r\t\"Simulate the action of bytecodes that send a message with selector, \r\tselector. The argument, superFlag, tells whether the receiver of the \r\tmessage was specified with 'super' in the source method. The arguments \r\tof the message are found in the top numArgs locations on the stack and \r\tthe receiver just below them.\"\r\r\t| receiver arguments answer |\r\targuments _ Array new: numArgs.\r\tnumArgs to: 1 by: -1 do: [ :i | arguments at: i put: self pop].\r\treceiver _ self pop.\r\tselector == #doPrimitive:method:receiver:args:\r\t\tifTrue: [answer _ receiver \r\t\t\t\t\tdoPrimitive: (arguments at: 1)\r\t\t\t\t\tmethod: (arguments at: 2)\r\t\t\t\t\treceiver: (arguments at: 3)\r\t\t\t\t\targs: (arguments at: 4).\r\t\t\t\tself push: answer.\r\t\t\t\t^self].\r\tQuickStep == self ifTrue: [\r\t\tQuickStep _ nil.\r\t\t^self quickSend: selector to: receiver with: arguments super: superFlag].\r\t^self send: selector to: receiver with: arguments super: superFlag! !\r\r!ContextPart methodsFor: 'instruction decoding'!\rstoreIntoLiteralVariable: value \r\t\"Simulate the action of bytecode that stores the top of the stack into a \r\tliteral variable of my method.\"\r\r\tvalue value: self top! !\r\r!ContextPart methodsFor: 'instruction decoding'!\rstoreIntoReceiverVariable: offset \r\t\"Simulate the action of bytecode that stores the top of the stack into an \r\tinstance variable of my receiver.\"\r\r\tself receiver instVarAt: offset + 1 put: self top! !\r\r!ContextPart methodsFor: 'instruction decoding'!\rstoreIntoTemporaryVariable: offset \r\t\"Simulate the action of bytecode that stores the top of the stack into one \r\tof my temporary variables.\"\r\r\tself home at: offset + 1 put: self top! !\r\r\r!ContextPart methodsFor: 'debugger access' stamp: 'ajh 9/25/2001 00:12'!\rcontextStack \r\t\"Answer an Array of the contexts on the receiver's sender chain.\"\r\r\t^self stackOfSize: 100000! !\r\r!ContextPart methodsFor: 'debugger access' stamp: 'ls 12/5/1999 13:43'!\rmclass \r\t\"Answer the class in which the receiver's method was found.\"\r\t| mclass |\r\tself receiver class selectorAtMethod: self method setClass: [:mc |\rmclass _ mc ].\r\t^mclass! !\r\r!ContextPart methodsFor: 'debugger access' stamp: 'ajh 9/7/2002 21:15'!\rmethodSelector\r\t\"Answer the selector of the method that created the receiver.\"\r\r\t^self receiver class \r\t\tselectorAtMethod: self method \r\t\tsetClass: [:ignored]! !\r\r!ContextPart methodsFor: 'debugger access'!\rpc\r\t\"Answer the index of the next bytecode to be executed.\"\r\r\t^pc! !\r\r!ContextPart methodsFor: 'debugger access'!\rrelease\r\t\"Remove information from the receiver and all of the contexts on its \r\tsender chain in order to break circularities.\"\r\r\tself releaseTo: nil! !\r\r!ContextPart methodsFor: 'debugger access'!\rreleaseTo: caller \r\t\"Remove information from the receiver and the contexts on its sender \r\tchain up to caller in order to break circularities.\"\r\r\t| c s |\r\tc _ self.\r\t[c == nil or: [c == caller]]\r\t\twhileFalse: \r\t\t\t[s _ c sender.\r\t\t\tc singleRelease.\r\t\t\tc _ s]! !\r\r!ContextPart methodsFor: 'debugger access'!\rselector\r\t\"Answer the selector of the method that created the receiver.\"\r\r\t^self receiver class \r\t\tselectorAtMethod: self method \r\t\tsetClass: [:ignored]! !\r\r!ContextPart methodsFor: 'debugger access'!\rsender\r\t\"Answer the context that sent the message that created the receiver.\"\r\r\t^sender! !\r\r!ContextPart methodsFor: 'debugger access' stamp: 'di 8/31/1999 09:42'!\rshortStack\r\t\"Answer a String showing the top ten contexts on my sender chain.\"\r\r\t^ String streamContents:\r\t\t[:strm |\r\t\t(self stackOfSize: 10)\r\t\t\tdo: [:item | strm print: item; cr]]! !\r\r!ContextPart methodsFor: 'debugger access' stamp: 'ajh 1/24/2003 00:03'!\rsingleRelease\r\t\"Remove information from the receiver in order to break circularities.\"\r\r\tstackp == nil ifFalse: [1 to: stackp do: [:i | self at: i put: nil]].\r\tsender _ nil.\r\tpc _ nil.\r! !\r\r!ContextPart methodsFor: 'debugger access' stamp: 'ar 7/9/1999 19:01'!\rsourceCode\r\t| selector methodClass |\r\tselector _ self receiver class selectorAtMethod: self method\r\t\tsetClass: [:mclass | methodClass _ mclass].\r\t^self method getSourceFor: selector in: methodClass\r\t\"Note: The above is a bit safer than\r\t\t^ methodClass sourceCodeAt: selector\r\twhich may fail if the receiver's method has been changed in\r\tthe debugger (e.g., the method is no longer in the methodDict\r\tand thus the above selector is something like #Doit:with:with:with:)\r\tbut the source code is still available.\"! !\r\r!ContextPart methodsFor: 'debugger access' stamp: 'tfei 3/20/2000 00:51'!\rstackOfSize: limit \r\t\"Answer an OrderedCollection of the top 'limit' contexts\r\t\ton the receiver's sender chain.\"\r\r\t| a stack cachedStackTop newLimit |\r\tstack _ OrderedCollection new.\r\tstack addLast: (a _ self).\r\t[(a _ a sender) ~~ nil and: [stack size < limit]]\r\t\twhileTrue:\r\t\t\t[a hideFromDebugger ifFalse: [stack addLast: a].\r\t\t\ta cachesStack ifTrue: [cachedStackTop := a cachedStackTop]].\r\t^cachedStackTop == nil \r\t\tifTrue: [stack]\r\t\tifFalse:\r\t\t\t[newLimit := limit - stack size.\r\t\t\tnewLimit > 0\r\t\t\t\tifTrue: [stack addAllLast: (cachedStackTop stackOfSize: newLimit); yourself]\r\t\t\t\tifFalse: [stack]]! !\r\r!ContextPart methodsFor: 'debugger access'!\rswapSender: coroutine \r\t\"Replace the receiver's sender with coroutine and answer the receiver's \r\tprevious sender. For use in coroutining.\"\r\r\t| oldSender |\r\toldSender _ sender.\r\tsender _ coroutine.\r\t^oldSender! !\r\r!ContextPart methodsFor: 'debugger access' stamp: 'ajh 2/9/2003 12:25'!\rtempNames\r\t\"Answer an OrderedCollection of the names of the receiver's temporary \r\tvariables, which are strings.\"\r\r\t^ self methodNode tempNames! !\r\r!ContextPart methodsFor: 'debugger access'!\rtempsAndValues\r\t\"Return a string of the temporary variabls and their current values\"\r\t| aStream |\r\taStream _ WriteStream on: (String new: 100).\r\tself tempNames\r\t\tdoWithIndex: [:title :index |\r\t\t\taStream nextPutAll: title; nextPut: $:; space; tab.\r\t\t\t(self tempAt: index) printOn: aStream.\r\t\t\taStream cr].\r\t^aStream contents! !\r\r\r!ContextPart methodsFor: 'controlling'!\ractivateMethod: newMethod withArgs: args receiver: rcvr class: class \r\t\"Answer a ContextPart initialized with the arguments.\"\r\r\t^MethodContext \r\t\tsender: self\r\t\treceiver: rcvr\r\t\tmethod: newMethod\r\t\targuments: args! !\r\r!ContextPart methodsFor: 'controlling' stamp: 'di 10/23/1999 17:03'!\rblockCopy: numArgs \r\t\"Primitive. Distinguish a block of code from its enclosing method by \r\tcreating a new BlockContext for that block. The compiler inserts into all \r\tmethods that contain blocks the bytecodes to send the message \r\tblockCopy:. Do not use blockCopy: in code that you write!! Only the \r\tcompiler can decide to send the message blockCopy:. Fail if numArgs is \r\tnot a SmallInteger. Optional. No Lookup. See Object documentation \r\twhatIsAPrimitive.\"\r\r\t<primitive: 80>\r\t^ (BlockContext newForMethod: self home method)\r\t\thome: self home\r\t\tstartpc: pc + 2\r\t\tnargs: numArgs! !\r\r!ContextPart methodsFor: 'controlling'!\rhasSender: context \r\t\"Answer whether the receiver is strictly above context on the stack.\"\r\r\t| s |\r\tself == context ifTrue: [^false].\r\ts _ sender.\r\t[s == nil]\r\t\twhileFalse: \r\t\t\t[s == context ifTrue: [^true].\r\t\t\ts _ s sender].\r\t^false! !\r\r!ContextPart methodsFor: 'controlling' stamp: 'ajh 3/25/2004 00:07'!\rjump\r\t\"Abandon thisContext and resume self instead (using the same current process).  You may want to save thisContext's sender before calling this so you can jump back to it.\r\tSelf MUST BE a top context (ie. a suspended context or a abandoned context that was jumped out of).  A top context already has its return value on its stack (see Interpreter>>primitiveSuspend and other suspending primitives).\r\tthisContext's sender is converted to a top context (by pushing a nil return value on its stack) so it can be jump back to.\"\r\r\t| top |\r\t\"Make abandoned context a top context (has return value (nil)) so it can be jumped back to\"\r\tthisContext sender push: nil.\r\r\t\"Pop self return value then return it to self (since we jump to self by returning to it)\"\r\tstackp = 0 ifTrue: [self stepToSendOrReturn].\r\tstackp = 0 ifTrue: [self push: nil].  \"must be quick return self/constant\"\r\ttop _ self pop.\r\tthisContext privSender: self.\r\t^ top! !\r\r!ContextPart methodsFor: 'controlling' stamp: 'di 1/11/1999 22:40'!\rpop\r\t\"Answer the top of the receiver's stack and remove the top of the stack.\"\r\t| val |\r\tval _ self at: stackp.\r\tself stackp: stackp - 1.\r\t^ val! !\r\r!ContextPart methodsFor: 'controlling' stamp: 'di 1/11/1999 22:39'!\rpush: val \r\t\"Push val on the receiver's stack.\"\r\r\tself stackp: stackp + 1.\r\tself at: stackp put: val! !\r\r!ContextPart methodsFor: 'controlling' stamp: 'hmm 7/17/2001 20:57'!\rquickSend: selector to: receiver with: arguments super: superFlag\r\t\"Send the given selector with arguments in an environment which closely resembles the non-simulating environment, with an interjected unwind-protected block to catch nonlocal returns.\r\tAttention: don't get lost!!\"\r\t| oldSender contextToReturnTo result lookupClass |\r\tcontextToReturnTo _ self.\r\tlookupClass _ superFlag\r\t\t\t\t\tifTrue: [(self method literalAt: self method numLiterals) value superclass]\r\t\t\t\t\tifFalse: [receiver class].\r\t[oldSender _ thisContext sender swapSender: self.\r\tresult _ receiver perform: selector withArguments: arguments inSuperclass: lookupClass.\r\tthisContext sender swapSender: oldSender] ifCurtailed: [\r\t\tcontextToReturnTo _ thisContext sender receiver.\t\"The block context returning nonlocally\"\r\t\tcontextToReturnTo jump: -1.\t\"skip to front of return bytecode causing this unwind\"\r\t\tcontextToReturnTo nextByte = 16r7C ifTrue: [\r\t\t\t\"If it was a returnTop, push the value to be returned.\r\t\t\tOtherwise the value is implicit in the bytecode\"\r\t\t\tcontextToReturnTo push: (thisContext sender tempAt: 1)].\r\t\tthisContext swapSender: thisContext home sender.\t\"Make this block return to the method's sender\"\r\t\tcontextToReturnTo].\r\tcontextToReturnTo push: result.\r\t^contextToReturnTo! !\r\r!ContextPart methodsFor: 'controlling' stamp: 'ajh 5/20/2004 17:32'!\rrestart\r\t\"Unwind thisContext to self and resume from beginning.  Execute unwind blocks when unwinding.  ASSUMES self is a sender of thisContext\"\r\r\t| ctxt unwindBlock |\r\tself isDead ifTrue: [self cannotReturn: nil to: self].\r\tself privRefresh.\r\tctxt _ thisContext.\r\t[\tctxt _ ctxt findNextUnwindContextUpTo: self.\r\t\tctxt isNil\r\t] whileFalse: [\r\t\tunwindBlock _ ctxt tempAt: 1.\r\t\tunwindBlock ifNotNil: [\r\t\t\tctxt tempAt: 1 put: nil.\r\t\t\tthisContext terminateTo: ctxt.\r\t\t\tunwindBlock value].\r\t].\r\tthisContext terminateTo: self.\r\tself jump.\r! !\r\r!ContextPart methodsFor: 'controlling' stamp: 'ajh 6/27/2003 22:17'!\rresume\r\t\"Roll back thisContext to self and resume.  Execute unwind blocks when rolling back.  ASSUMES self is a sender of thisContext\"\r\r\tself resume: nil! !\r\r!ContextPart methodsFor: 'controlling' stamp: 'ajh 5/20/2004 17:32'!\rresume: value\r\t\"Unwind thisContext to self and resume with value as result of last send.  Execute unwind blocks when unwinding.  ASSUMES self is a sender of thisContext\"\r\r\t| ctxt unwindBlock |\r\tself isDead ifTrue: [self cannotReturn: value to: self].\r\tctxt _ thisContext.\r\t[\tctxt _ ctxt findNextUnwindContextUpTo: self.\r\t\tctxt isNil\r\t] whileFalse: [\r\t\tunwindBlock _ ctxt tempAt: 1.\r\t\tunwindBlock ifNotNil: [\r\t\t\tctxt tempAt: 1 put: nil.\r\t\t\tthisContext terminateTo: ctxt.\r\t\t\tunwindBlock value].\r\t].\r\tthisContext terminateTo: self.\r\t^ value\r! !\r\r!ContextPart methodsFor: 'controlling' stamp: 'ajh 1/21/2003 19:27'!\rreturn\r\t\"Unwind until my sender is on top\"\r\r\tself return: self receiver! !\r\r!ContextPart methodsFor: 'controlling' stamp: 'ajh 5/20/2004 17:27'!\rreturn: value\r\t\"Unwind thisContext to self and return value to self's sender.  Execute any unwind blocks while unwinding.  ASSUMES self is a sender of thisContext\"\r\r\tsender ifNil: [self cannotReturn: value to: sender].\r\tsender resume: value! !\r\r!ContextPart methodsFor: 'controlling' stamp: 'ajh 5/20/2004 17:20'!\rrunUntilErrorOrReturnFrom: aSender \r\t\"ASSUMES aSender is a sender of self.  Execute self's stack until aSender returns or an unhandled exception is raised.  Return a pair containing the new top context and a possibly nil exception.  The exception is not nil if it was raised before aSender returned and it was not handled.  The exception is returned rather than openning the debugger, giving the caller the choice of how to handle it.\"\r\t\"Self is run by jumping directly to it (the active process abandons thisContext and executes self).  However, before jumping to self we insert an ensure block under aSender that jumps back to thisContext when evaluated.  We also insert an exception handler under aSender that jumps back to thisContext when an unhandled exception is raised.  In either case, the inserted ensure and exception handler are removed once control jumps back to thisContext.\"\r\r\t| error ctxt here topContext |\r\there _ thisContext.\r\r\t\"Insert ensure and exception handler contexts under aSender\"\r\terror _ nil.\r\tctxt _ aSender insertSender: (ContextPart\r\t\tcontextOn: UnhandledError do: [:ex |\r\t\t\terror ifNil: [\r\t\t\t\terror _ ex exception.\r\t\t\t\ttopContext _ thisContext.\r\t\t\t\tex resumeUnchecked: here jump]\r\t\t\tifNotNil: [ex pass]\r\t\t]).\r\tctxt _ ctxt insertSender: (ContextPart\r\t\tcontextEnsure: [error ifNil: [\r\t\t\t\ttopContext _ thisContext.\r\t\t\t\there jump]\r\t\t]).\r\tself jump.  \"Control jumps to self\"\r\r\t\"Control resumes here once above ensure block or exception handler is executed\"\r\t^ error ifNil: [\r\t\t\"No error was raised, remove ensure context by stepping until popped\"\r\t\t[ctxt isDead] whileFalse: [topContext _ topContext stepToCallee].\r\t\t{topContext. nil}\r\r\t] ifNotNil: [\r\t\t\"Error was raised, remove inserted above contexts then return signaler context\"\r\t\taSender terminateTo: ctxt sender.  \"remove above ensure and handler contexts\"\r\t\t{topContext. error}\r\t].\r! !\r\r!ContextPart methodsFor: 'controlling' stamp: 'di 11/26/1999 19:34'!\rsend: selector to: rcvr with: args super: superFlag \r\t\"Simulate the action of sending a message with selector, selector, and \r\targuments, args, to receiver. The argument, superFlag, tells whether the \r\treceiver of the message was specified with 'super' in the source method.\"\r\r\t| class meth val |\r\tclass _ superFlag\r\t\t\tifTrue: [(self method literalAt: self method numLiterals) value superclass]\r\t\t\tifFalse: [rcvr class].\r\tmeth _ class lookupSelector: selector.\r\tmeth == nil\r\t\tifTrue: [^ self send: #doesNotUnderstand:\r\t\t\t\t\tto: rcvr\r\t\t\t\t\twith: (Array with: (Message selector: selector arguments: args))\r\t\t\t\t\tsuper: superFlag]\r\t\tifFalse: [val _ self tryPrimitiveFor: meth\r\t\t\t\t\t\treceiver: rcvr\r\t\t\t\t\t\targs: args.\r\t\t\t\tval == PrimitiveFailToken ifFalse: [^ val].\r\t\t\t\t(selector == #doesNotUnderstand: and: [class == ProtoObject]) ifTrue:\r\t\t\t\t\t[^ self error: 'Simulated message ' , (args at: 1) selector\r\t\t\t\t\t\t\t\t\t, ' not understood'].\r\t\t\t\t^ self activateMethod: meth\r\t\t\t\t\twithArgs: args\r\t\t\t\t\treceiver: rcvr\r\t\t\t\t\tclass: class]! !\r\r!ContextPart methodsFor: 'controlling' stamp: 'ajh 1/24/2003 00:56'!\rterminate\r\t\"Make myself unresumable.\"\r\r\tsender _ nil.\r\tpc _ nil.\r! !\r\r!ContextPart methodsFor: 'controlling' stamp: 'ar 3/6/2001 14:26'!\rterminateTo: previousContext\r\t\"Terminate all the Contexts between me and previousContext, if previousContext is on my Context stack. Make previousContext my sender.\"\r\r\t| currentContext sendingContext |\r\t<primitive: 196>\r\t(self hasSender: previousContext) ifTrue: [\r\t\tcurrentContext _ sender.\r\t\t[currentContext == previousContext] whileFalse: [\r\t\t\tsendingContext _ currentContext sender.\r\t\t\tcurrentContext terminate.\r\t\t\tcurrentContext _ sendingContext]].\r\tsender _ previousContext! !\r\r!ContextPart methodsFor: 'controlling'!\rtop\r\t\"Answer the top of the receiver's stack.\"\r\r\t^self at: stackp! !\r\r\r!ContextPart methodsFor: 'printing' stamp: 'ajh 3/17/2003 09:25'!\rprintOn: aStream \r\t| selector class mclass |\r\tself method == nil ifTrue: [^ super printOn: aStream].\r\tselector _ \r\t\t(class _ self receiver class) \r\t\t\tselectorAtMethod: self method \r\t\t\tsetClass: [:c | mclass _ c].\r\tselector == #?\r\t\tifTrue: \r\t\t\t[aStream nextPut: $?; print: self method who.\r\t\t\t^self].\r\taStream nextPutAll: class name.\r\tmclass == class \r\t\tifFalse: \r\t\t\t[aStream nextPut: $(.\r\t\t\taStream nextPutAll: mclass name.\r\t\t\taStream nextPut: $)].\r\taStream nextPutAll: '>>'.\r\taStream nextPutAll: selector.\r\tselector = #doesNotUnderstand: ifTrue: [\r\t\taStream space.\r\t\t(self tempAt: 1) selector printOn: aStream.\r\t].\r! !\r\r\r!ContextPart methodsFor: 'system simulation'!\rstep\r\t\"Simulate the execution of the receiver's next bytecode. Answer the \r\tcontext that would be the active context after this bytecode.\"\r\r\t^self interpretNextInstructionFor: self! !\r\r!ContextPart methodsFor: 'system simulation' stamp: 'ajh 1/24/2003 22:54'!\rstepToCallee\r\t\"Step to callee or sender\"\r\r\t| ctxt |\r\tctxt _ self.\r\t[(ctxt _ ctxt step) == self] whileTrue.\r\t^ ctxt! !\r\r!ContextPart methodsFor: 'system simulation' stamp: 'hmm 7/30/2001 20:48'!\rstepToSendOrReturn\r\t\"Simulate the execution of bytecodes until either sending a message or \r\treturning a value to the receiver (that is, until switching contexts).\"\r\r\t| ctxt |\r\t[self willReallySend | self willReturn | self willStore]\r\t\twhileFalse: [\r\t\t\tctxt _ self step.\r\t\t\tctxt == self ifFalse: [self halt. \r\t\t\t\t\"Caused by mustBeBoolean handling\"\r\t\t\t\t^ctxt]]! !\r\r\r!ContextPart methodsFor: 'private' stamp: 'ajh 5/20/2004 16:27'!\ractivateReturn: aContext value: value\r\t\"Activate 'aContext return: value' in place of self, so execution will return to aContext's sender\"\r\r\t^ self\r\t\tactivateMethod: ContextPart theReturnMethod\r\t\twithArgs: {value}\r\t\treceiver: aContext\r\t\tclass: aContext class! !\r\r!ContextPart methodsFor: 'private' stamp: 'ajh 6/29/2003 15:32'!\rcannotReturn: result to: homeContext\r\t\"The receiver tried to return result to homeContext that no longer exists.\"\r\r\t^ BlockCannotReturn new\r\t\tresult: result;\r\t\tdeadHome: homeContext;\r\t\tsignal! !\r\r!ContextPart methodsFor: 'private' stamp: 'ajh 1/24/2003 00:50'!\rcut: aContext\r\t\"Cut aContext and its senders from my sender chain\"\r\r\t| ctxt callee |\r\tctxt _ self.\r\t[ctxt == aContext] whileFalse: [\r\t\tcallee _ ctxt.\r\t\tctxt _ ctxt sender.\r\t\tctxt ifNil: [aContext ifNotNil: [self error: 'aContext not a sender']].\r\t].\r\tcallee privSender: nil.\r! !\r\r!ContextPart methodsFor: 'private' stamp: 'hg 10/2/2001 20:44'!\rdoPrimitive: primitiveIndex method: meth receiver: receiver args: arguments \r\t\"Simulate a primitive method whose index is primitiveIndex.  The\r\tsimulated receiver and arguments are given as arguments to this message.\"\r\r\t| value |\r\t<primitive: 19> \"Simulation guard\"\r\t\"If successful, push result and return resuming context,\r\t\telse ^ PrimitiveFailToken\"\r\t(primitiveIndex = 19) ifTrue:[\r\t\tDebugger \r\t\t\topenContext: self\r\t\t\tlabel:'Code simulation error'\r\t\t\tcontents: nil].\r\r\t(primitiveIndex = 80 and: [receiver isKindOf: ContextPart])\r\t\tifTrue: [^self push: ((BlockContext newForMethod: receiver home method)\r\t\t\t\t\t\thome: receiver home\r\t\t\t\t\t\tstartpc: pc + 2\r\t\t\t\t\t\tnargs: (arguments at: 1))].\r\t(primitiveIndex = 81 and: [receiver isMemberOf: BlockContext])\r\t\tifTrue: [^receiver pushArgs: arguments from: self].\r\tprimitiveIndex = 83 \"afr 9/11/1998 19:50\"\r\t\tifTrue: [^ self send: arguments first to: receiver\r\t\t\t\t\twith: arguments allButFirst\r\t\t\t\t\tsuper: false].\r\tprimitiveIndex = 84 \"afr 9/11/1998 19:50\"\r\t\tifTrue: [^ self send: arguments first to: receiver\r\t\t\t\t\twith: (arguments at: 2)\r\t\t\t\t\tsuper: false].\r\targuments size > 6 ifTrue: [^ PrimitiveFailToken].\r\tprimitiveIndex = 117 \r\t\tifTrue:[value _ self tryNamedPrimitiveIn: meth for: receiver withArgs: arguments]\r\t\tifFalse:[value _ receiver tryPrimitive: primitiveIndex withArgs: arguments].\r\tvalue == PrimitiveFailToken\r\t\tifTrue: [^ PrimitiveFailToken]\r\t\tifFalse: [^ self push: value]! !\r\r!ContextPart methodsFor: 'private' stamp: 'ajh 7/21/2003 09:59'!\rinsertSender: aContext\r\t\"Insert aContext and its sender chain between me and my sender.  Return new callee of my original sender.\"\r\r\t| ctxt |\r\tctxt _ aContext bottomContext.\r\tctxt privSender: self sender.\r\tself privSender: aContext.\r\t^ ctxt! !\r\r!ContextPart methodsFor: 'private' stamp: 'ajh 1/23/2003 22:35'!\rprivSender: aContext \r\r\tsender _ aContext! !\r\r!ContextPart methodsFor: 'private' stamp: 'di 1/11/1999 10:12'!\rpush: numObjects fromIndexable: anIndexableCollection\r\t\"Push the elements of anIndexableCollection onto the receiver's stack.\r\t Do not call directly.  Called indirectly by {1. 2. 3} constructs.\"\r\r\t1 to: numObjects do:\r\t\t[:i | self push: (anIndexableCollection at: i)]! !\r\r!ContextPart methodsFor: 'private' stamp: 'di 10/23/1999 17:31'!\rstackp: newStackp\r\t\"Storing into the stack pointer is a potentially dangerous thing.\r\tThis primitive stores nil into any cells that become accessible as a result,\r\tand it performs the entire operation atomically.\"\r\t\"Once this primitive is implemented, failure code should cause an error\"\r\r\t<primitive: 76>\r\tself error: 'stackp store failure'.\r\"\r\tstackp == nil ifTrue: [stackp _ 0].\r\tnewStackp > stackp  'effectively checks that it is a number'\r\t\tifTrue: [oldStackp _ stackp.\r\t\t\t\tstackp _ newStackp.\r\t\t\t\t'Nil any newly accessible cells'\r\t\t\t\toldStackp + 1 to: stackp do: [:i | self at: i put: nil]]\r\t\tifFalse: [stackp _ newStackp]\r\"! !\r\r!ContextPart methodsFor: 'private' stamp: 'ar 5/25/2000 20:41'!\rtryNamedPrimitiveIn: aCompiledMethod for: aReceiver withArgs: arguments\r\t\"Hack. Attempt to execute the named primitive from the given compiled method\"\r\t| selector theMethod spec |\r\targuments size > 8 ifTrue:[^PrimitiveFailToken].\r\tselector _ #(\r\t\ttryNamedPrimitive \r\t\ttryNamedPrimitive: \r\t\ttryNamedPrimitive:with: \r\t\ttryNamedPrimitive:with:with: \r\t\ttryNamedPrimitive:with:with:with:\r\t\ttryNamedPrimitive:with:with:with:with:\r\t\ttryNamedPrimitive:with:with:with:with:with:\r\t\ttryNamedPrimitive:with:with:with:with:with:with:\r\t\ttryNamedPrimitive:with:with:with:with:with:with:with:) at: arguments size+1.\r\ttheMethod _ aReceiver class lookupSelector: selector.\r\ttheMethod == nil ifTrue:[^PrimitiveFailToken].\r\tspec _ theMethod literalAt: 1.\r\tspec replaceFrom: 1 to: spec size with: (aCompiledMethod literalAt: 1) startingAt: 1.\r\t^aReceiver perform: selector withArguments: arguments! !\r\r!ContextPart methodsFor: 'private' stamp: 'ar 5/25/2000 20:45'!\rtryPrimitiveFor: method receiver: receiver args: arguments \r\t\"If this method has a primitive index, then run the primitive and return its result.\r\tOtherwise (and also if the primitive fails) return PrimitiveFailToken,\r\tas an indication that the method should be activated and run as bytecodes.\"\r\t| primIndex |\r\t(primIndex _ method primitive) = 0 ifTrue: [^ PrimitiveFailToken].\r\t^ self doPrimitive: primIndex method: method receiver: receiver args: arguments! !\r\r\r!ContextPart methodsFor: 'private-exceptions' stamp: 'TPR 8/28/2000 19:27'!\rfindNextHandlerContextStarting\r\t\"Return the next handler marked context, returning nil if there is none.  Search starts with self and proceeds up to nil.\"\r\r\t| ctx |\r\t<primitive: 197>\r\tctx _ self.\r\t\t[ctx isHandlerContext ifTrue:[^ctx].\r\t\t(ctx _ ctx sender) == nil ] whileFalse.\r\t^nil! !\r\r!ContextPart methodsFor: 'private-exceptions' stamp: 'TPR 8/23/2000 16:37'!\rfindNextUnwindContextUpTo: aContext\r\t\"Return the next unwind marked above the receiver, returning nil if there is none.  Search proceeds up to but not including aContext.\"\r\r\t| ctx |\r\t<primitive: 195>\r\tctx _ self.\r\t\t[(ctx _ ctx sender) == nil or: [ctx == aContext]] whileFalse:\r\t\t[ ctx isUnwindContext ifTrue: [^ctx]].\r\t^nil! !\r\r!ContextPart methodsFor: 'private-exceptions' stamp: 'ajh 6/27/2003 20:47'!\rhandleSignal: exception\r\t\"Sent to handler (on:do:) contexts only.  If my exception class (first arg) handles exception then execute my handle block (second arg), otherwise forward this message to the next handler context.  If none left, execute exception's defaultAction (see nil>>handleSignal:).\"\r\r\t| val |\r\t(((self tempAt: 1) handles: exception) and: [self tempAt: 3]) ifFalse: [\r\t\t^ self nextHandlerContext handleSignal: exception].\r\r\texception privHandlerContext: self contextTag.\r\tself tempAt: 3 put: false.  \"disable self while executing handle block\"\r\tval _ [(self tempAt: 2) valueWithPossibleArgs: {exception}]\r\t\tensure: [self tempAt: 3 put: true].\r\tself return: val.  \"return from self if not otherwise directed in handle block\"\r! !\r\r!ContextPart methodsFor: 'private-exceptions' stamp: 'tpr 2/24/2001 21:29'!\risHandlerContext\r\t^false! !\r\r!ContextPart methodsFor: 'private-exceptions' stamp: 'TPR 8/28/2000 15:45'!\risUnwindContext\r\r\t^false! !\r\r!ContextPart methodsFor: 'private-exceptions' stamp: 'ajh 2/1/2003 00:20'!\rnextHandlerContext\r\r\t^ self sender findNextHandlerContextStarting! !\r\r\r!ContextPart methodsFor: 'private-debugger' stamp: 'tfei 3/19/2000 23:24'!\rcachesStack\r\r\t^false! !\r\r\r!ContextPart methodsFor: 'query' stamp: 'ajh 1/24/2003 12:35'!\rblockHome\r\r\t^ self! !\r\r!ContextPart methodsFor: 'query' stamp: 'ajh 7/21/2003 09:59'!\rbottomContext\r\t\"Return the last context (the first context invoked) in my sender chain\"\r\r\t^ self findContextSuchThat: [:c | c sender isNil]! !\r\r!ContextPart methodsFor: 'query' stamp: 'ajh 1/24/2003 00:12'!\rfindContextSuchThat: testBlock\r\t\"Search self and my sender chain for first one that satisfies testBlock.  Return nil if none satisfy\"\r\r\t| ctxt |\r\tctxt _ self.\r\t[ctxt isNil] whileFalse: [\r\t\t(testBlock value: ctxt) ifTrue: [^ ctxt].\r\t\tctxt _ ctxt sender.\r\t].\r\t^ nil! !\r\r!ContextPart methodsFor: 'query' stamp: 'ajh 1/24/2003 19:42'!\rhasContext: aContext \r\t\"Answer whether aContext is me or one of my senders\"\r\r\t^ (self findContextSuchThat: [:c | c == aContext]) notNil! !\r\r!ContextPart methodsFor: 'query' stamp: 'ajh 1/24/2003 00:04'!\risDead\r\t\"Has self finished\"\r\r\t^ pc isNil! !\r\r\r!ContextPart methodsFor: 'as yet unclassified' stamp: 'ssa 9/3/2008 11:42'!\rerrorReportOn: foo! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rContextPart class\r\tinstanceVariableNames: ''!\r\r!ContextPart class methodsFor: 'simulation' stamp: 'di 2/10/1999 22:15'!\rinitialize\r\r\t\"A unique object to be returned when a primitive fails during simulation\"\r\tPrimitiveFailToken _ Object new  ! !\r\r!ContextPart class methodsFor: 'simulation' stamp: 'di 2/10/1999 22:15'!\rprimitiveFailToken\r\r\t^ PrimitiveFailToken! !\r\r\r!ContextPart class methodsFor: 'instance creation' stamp: 'di 10/23/1999 17:09'!\rbasicNew: size\r\r\tself error: 'Contexts must only be created with newForMethod:'! !\r\r!ContextPart class methodsFor: 'instance creation' stamp: 'sw 5/5/2000 00:30'!\rinitializedInstance\r\t^ nil! !\r\r!ContextPart class methodsFor: 'instance creation' stamp: 'di 10/23/1999 17:09'!\rnew\r\r\tself error: 'Contexts must only be created with newForMethod:'! !\r\r!ContextPart class methodsFor: 'instance creation' stamp: 'di 10/23/1999 17:09'!\rnew: size\r\r\tself error: 'Contexts must only be created with newForMethod:'! !\r\r!ContextPart class methodsFor: 'instance creation' stamp: 'di 10/23/1999 17:55'!\rnewForMethod: aMethod\r\t\"This is the only method for creating new contexts, other than primitive cloning.\r\tAny other attempts, such as inherited methods like shallowCopy, should be\r\tavoided or must at least be rewritten to determine the proper size from the\r\tmethod being activated.  This is because asking a context its size (even basicSize!!)\r\twill not return the real object size but only the number of fields currently\r\taccessible, as determined by stackp.\"\r\r\t^ super basicNew: aMethod frameSize! !\r\r\r!ContextPart class methodsFor: 'special context creation' stamp: 'ajh 1/24/2003 14:31'!\rcontextEnsure: block\r\t\"Create an #ensure: context that is ready to return from executing its receiver\"\r\r\t| ctxt chain |\r\tctxt _ thisContext.\r\t[chain _ thisContext sender cut: ctxt. ctxt jump] ensure: block.\r\t\"jump above will resume here without unwinding chain\"\r\t^ chain! !\r\r!ContextPart class methodsFor: 'special context creation' stamp: 'ajh 1/24/2003 14:31'!\rcontextOn: exceptionClass do: block\r\t\"Create an #on:do: context that is ready to return from executing its receiver\"\r\r\t| ctxt chain |\r\tctxt _ thisContext.\r\t[chain _ thisContext sender cut: ctxt. ctxt jump] on: exceptionClass do: block.\r\t\"jump above will resume here without unwinding chain\"\r\t^ chain! !\r\r!ContextPart class methodsFor: 'special context creation' stamp: 'ajh 5/20/2004 16:25'!\rtheReturnMethod\r\r\t| meth |\r\tmeth _ self lookupSelector: #return:.\r\tmeth primitive = 0 ifFalse: [^ self error: 'expected #return: to not be a primitive'].\r\t^ meth! !\rInspector subclass: #ContextVariablesInspector\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Debugger'!\r!ContextVariablesInspector commentStamp: '<historical>' prior: 0!\rI represent a query path into the internal representation of a ContextPart. Typically this is a context at a point in the query path of a Debugger. As a StringHolder, the string I represent is the value of the currently selected variable of the observed temporary variable of the context.!\r\r\r!ContextVariablesInspector methodsFor: 'accessing'!\rfieldList \r\t\"Refer to the comment in Inspector|fieldList.\"\r\r\tobject == nil ifTrue: [^Array with: 'thisContext'].\r\t^(Array with: 'thisContext' with: 'all temp vars') , object tempNames! !\r\r!ContextVariablesInspector methodsFor: 'accessing' stamp: 'ajh 1/31/2003 15:45'!\rinspect: anObject \r\t\"Initialize the receiver so that it is inspecting anObject. There is no \r\tcurrent selection.\"\r\r\tself initialize.\r\tobject _ anObject.\r\tselectionIndex _ 0.\r\tcontents _ ''! !\r\r\r!ContextVariablesInspector methodsFor: 'selecting'!\rreplaceSelectionValue: anObject \r\t\"Refer to the comment in Inspector|replaceSelectionValue:.\"\r\r\tselectionIndex = 1\r\t\tifTrue: [^object]\r\t\tifFalse: [^object tempAt: selectionIndex - 2 put: anObject]! !\r\r!ContextVariablesInspector methodsFor: 'selecting' stamp: 'ar 5/29/1998 18:32'!\rselection \r\t\"Refer to the comment in Inspector|selection.\"\r\tselectionIndex = 0 ifTrue:[^''].\r\tselectionIndex = 1 ifTrue: [^object].\r\tselectionIndex = 2\r\t\tifTrue: [^object tempsAndValues]\r\t\tifFalse: [^object tempAt: selectionIndex - 2]! !\r\r\r!ContextVariablesInspector methodsFor: 'code'!\rdoItContext\r\r\t^object! !\r\r!ContextVariablesInspector methodsFor: 'code'!\rdoItReceiver\r\r\t^object receiver! !\rObject subclass: #ControlManager\r\tinstanceVariableNames: 'scheduledControllers activeController activeControllerProcess screenController newTopClicked'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-ST80 Remnants'!\r!ControlManager commentStamp: '<historical>' prior: 0!\rI represent the top level control over scheduling which controller of a view on the screen the user is actively using. ScheduledControllers is the global reference to an instance of me, the one attached to the Project currently being used.!\r\r\r!ControlManager methodsFor: 'initialize-release'!\rinitialize\r\t\"Initialize the receiver to refer to only the background controller.\"\r\t| screenView |\r\tscreenController _ ScreenController new.\r\tscreenView _ FormView new.\r\tscreenView model: (InfiniteForm with: Color gray) controller: screenController.\r\tscreenView window: Display boundingBox.\r\tscheduledControllers _ OrderedCollection with: screenController! !\r\r!ControlManager methodsFor: 'initialize-release'!\rrelease \r\t\"Refer to the comment in Object|release.\"\r\r\tscheduledControllers == nil\r\t\tifFalse: \r\t\t\t[scheduledControllers \r\t\t\t\tdo: [:controller | (controller isKindOf: Controller)\r\t\t\t\t\t\t\t\tifTrue: [controller view release]\r\t\t\t\t\t\t\t\tifFalse: [controller release]].\r\t\t\tscheduledControllers _ nil]! !\r\r\r!ControlManager methodsFor: 'accessing'!\ractiveController\r\t\"Answer the currently active controller.\"\r\r\t^activeController! !\r\r!ControlManager methodsFor: 'accessing' stamp: 'ar 6/5/1998 21:49'!\ractiveController: aController \r\t\"Set aController to be the currently active controller. Give the user \r\tcontrol in it.\"\r\t<primitive: 19> \"Simulation guard\"\r\tactiveController _ aController.\r\t(activeController == screenController)\r\t\tifFalse: [self promote: activeController].\r\tactiveControllerProcess _ \r\t\t\t[activeController startUp.\r\t\t\tself searchForActiveController] newProcess.\r\tactiveControllerProcess priority: Processor userSchedulingPriority.\r\tactiveControllerProcess resume! !\r\r!ControlManager methodsFor: 'accessing'!\ractiveControllerNoTerminate: aController andProcess: aProcess\r\t\"Set aController to be the currently active controller and aProcess to be \r\tthe the process that handles controller scheduling activities in the \r\tsystem. This message differs from activeController:andProcess: in that it \r\tdoes not send controlTerminate to the currently active controller.\"\r\r\tself inActiveControllerProcess\r\t\tifTrue: \r\t\t\t[aController~~nil\r\t\t\t\tifTrue: [(scheduledControllers includes: aController)\r\t\t\t\t\t\t\tifTrue: [self promote: aController]\r\t\t\t\t\t\t\tifFalse: [self error: 'Old controller not scheduled']].\r\t\t\tactiveController _ aController.\r\t\t\tactiveController == nil\r\t\t\t\tifFalse: [activeController controlInitialize].\r\t\t\tactiveControllerProcess _ aProcess.\r\t\t\tactiveControllerProcess resume]\r\t\tifFalse: \r\t\t\t[self error: 'New active controller process must be set from old one'] ! !\r\r!ControlManager methodsFor: 'accessing'!\ractiveControllerProcess\r\t\"Answer the process that is currently handling controller scheduling \r\tactivities in the system.\"\r\r\t^activeControllerProcess! !\r\r!ControlManager methodsFor: 'accessing'!\rcontrollerSatisfying: aBlock\r\t\"Return the first scheduled controller which satisfies the 1-argument boolean-valued block, or nil if none.  7/25/96 sw\"\r\r\tscheduledControllers do:\r\t\t[:aController | (aBlock value: aController) == true ifTrue: [^ aController]].\r\t^ nil! !\r\r!ControlManager methodsFor: 'accessing'!\rcontrollerWhoseModelSatisfies: aBlock\r\t\"Return the first scheduled controller whose model satisfies the 1-argument boolean-valued block, or nil if none.  5/6/96 sw\"\r\r\tscheduledControllers do:\r\t\t[:aController | (aBlock value: aController model) == true ifTrue: [^ aController]].\r\t^ nil! !\r\r!ControlManager methodsFor: 'accessing' stamp: 'sw 5/4/2001 23:20'!\rcontrollersSatisfying: aBlock\r\t\"Return a list of scheduled controllers satisfying aBlock\"\r\r\t^ (scheduledControllers ifNil: [^ #()]) select:\r\t\t[:aController | (aBlock value: aController) == true]! !\r\r!ControlManager methodsFor: 'accessing'!\rincludes: aController\r\t^ scheduledControllers includes: aController! !\r\r!ControlManager methodsFor: 'accessing'!\rnoteNewTop\r\tnewTopClicked _ true! !\r\r!ControlManager methodsFor: 'accessing'!\rscheduledControllers\r\t\"Answer a copy of the ordered collection of scheduled controllers.\"\r\r\t^scheduledControllers copy! !\r\r!ControlManager methodsFor: 'accessing' stamp: 'di 10/4/97 09:05'!\rscheduledWindowControllers\r\t\"Same as scheduled controllers, but without ScreenController.\r\tAvoids null views just after closing, eg, a debugger.\"\r\r\t^ scheduledControllers select:\r\t\t[:c | c ~~ screenController and: [c view ~~ nil]]! !\r\r!ControlManager methodsFor: 'accessing'!\rscreenController\r\t^ screenController! !\r\r!ControlManager methodsFor: 'accessing'!\rwindowOriginsInUse\r\t\"Answer a collection of the origins of windows currently on the screen in the current project.  5/21/96 sw\"\r\r\t^ self scheduledWindowControllers collect: [:aController | aController view displayBox origin].! !\r\r\r!ControlManager methodsFor: 'scheduling'!\ractivateController: aController\r\t\"Make aController, which must already be a scheduled controller, the active window.  5/8/96 sw\"\r\r\tself activeController: aController.\r\t(activeController view labelDisplayBox\r\t\tintersect: Display boundingBox) area < 200\r\t\t\tifTrue: [activeController move].\r\tProcessor terminateActive! !\r\r!ControlManager methodsFor: 'scheduling'!\ractivateTranscript\r\t\"There is known to be a Transcript open in the current project; activate it.  2/5/96 sw\"\r\r\t| itsController |\r\titsController _ scheduledControllers detect:\r\t\t\t[:controller | controller model == Transcript]\r\t\tifNone:\r\t\t\t[^ self].\r\r\tself activeController: itsController.\r\t(activeController view labelDisplayBox\r\t\t\tintersect: Display boundingBox) area < 200\r\t\t\t\tifTrue: [activeController move].\r\tProcessor terminateActive! !\r\r!ControlManager methodsFor: 'scheduling' stamp: 'di 5/19/1998 09:03'!\rfindWindow\r\t\"Present a menu of window titles, and activate the one that gets chosen.\"\r\r\t^ self findWindowSatisfying: [:c | true]! !\r\r!ControlManager methodsFor: 'scheduling' stamp: 'wod 6/17/1998 15:46'!\rfindWindowSatisfying: aBlock\r\t\"Present a menu of window titles, and activate the one that gets chosen\"\r\r\t| sortAlphabetically controllers listToUse labels index |\r\tsortAlphabetically _ Sensor shiftPressed.\r\tcontrollers _ OrderedCollection new.\r\tscheduledControllers do: [:controller |\r\t\tcontroller == screenController ifFalse:\r\t\t\t[(aBlock value: controller) ifTrue: [controllers addLast: controller]]].\r\tcontrollers size == 0 ifTrue: [^ self].\r\tlistToUse _ sortAlphabetically\r\t\tifTrue: [controllers asSortedCollection: [:a :b | a view label < b view label]]\r\t\tifFalse: [controllers].\r\tlabels _ String streamContents:\r\t\t[:strm | \r\t\t\tlistToUse do: [:controller | strm nextPutAll: (controller view label contractTo: 40); cr].\r\t\tstrm skip: -1  \"drop last cr\"].\r\tindex _ (PopUpMenu labels: labels) startUp.\r\tindex > 0 ifTrue:\r\t\t[self activateController: (listToUse at: index)].\r! !\r\r!ControlManager methodsFor: 'scheduling'!\rinActiveControllerProcess\r\t\"Answer whether the active scheduling process is the actual active \r\tprocess in the system.\"\r\r\t^activeControllerProcess == Processor activeProcess! !\r\r!ControlManager methodsFor: 'scheduling' stamp: 'ar 11/19/1998 18:31'!\rinterruptName: labelString\r\t\"Create a Notifier on the active scheduling process with the given label. Make the Notifier the active controller.\"\r\t| suspendingList newActiveController |\r\t(suspendingList _ activeControllerProcess suspendingList) == nil\r\t\tifTrue: [activeControllerProcess == Processor activeProcess\r\t\t\t\t\tifTrue: [activeControllerProcess suspend]]\r\t\tifFalse: [suspendingList remove: activeControllerProcess ifAbsent:[].\r\t\t\t\tactiveControllerProcess offList].\r\r\tactiveController ~~ nil ifTrue: [\r\t\t\"Carefully de-emphasis the current window.\"\r\t\tactiveController view topView deEmphasizeForDebugger].\r\r\tnewActiveController _\r\t\t(Debugger\r\t\t\topenInterrupt: labelString\r\t\t\tonProcess: activeControllerProcess) controller.\r\tnewActiveController centerCursorInView.\r\tself activeController: newActiveController.\r! !\r\r!ControlManager methodsFor: 'scheduling'!\rpromote: aController\r\t\"Make aController be the first scheduled controller in the ordered \r\tcollection.\"\r\t\r\tscheduledControllers remove: aController.\r\tscheduledControllers addFirst: aController! !\r\r!ControlManager methodsFor: 'scheduling' stamp: 'RAA 7/7/2000 09:22'!\rresetActiveController\r\t\"When saving a morphic project whose parent is mvc, we need to set this up first\"\r\r\tactiveController _ nil.\r\tactiveControllerProcess _ Processor activeProcess.\r! !\r\r!ControlManager methodsFor: 'scheduling' stamp: 'ar 6/5/1998 21:48'!\rscheduleActive: aController \r\t\"Make aController be scheduled as the active controller. Presumably the \r\tactive scheduling process asked to schedule this controller and that a \r\tnew process associated this controller takes control. So this is the last act \r\tof the active scheduling process.\"\r\t<primitive: 19> \"Simulation guard\"\r\tself scheduleActiveNoTerminate: aController.\r\tProcessor terminateActive! !\r\r!ControlManager methodsFor: 'scheduling'!\rscheduleActiveNoTerminate: aController \r\t\"Make aController be the active controller. Presumably the process that \r\trequested the new active controller wants to keep control to do more \r\tactivites before the new controller can take control. Therefore, do not \r\tterminate the currently active process.\"\r\r\tself schedulePassive: aController.\r\tself scheduled: aController\r\t\tfrom: Processor activeProcess! !\r\r!ControlManager methodsFor: 'scheduling'!\rscheduleOnBottom: aController \r\t\"Make aController be scheduled as a scheduled controller, but not the \r\tactive one. Put it at the end of the ordered collection of controllers.\"\r\r\tscheduledControllers addLast: aController! !\r\r!ControlManager methodsFor: 'scheduling'!\rschedulePassive: aController \r\t\"Make aController be scheduled as a scheduled controller, but not the \r\tactive one. Put it at the beginning of the ordered collection of \r\tcontrollers.\"\r\r\tscheduledControllers addFirst: aController! !\r\r!ControlManager methodsFor: 'scheduling'!\rsearchForActiveController\r\t\"Find a scheduled controller that wants control and give control to it. If \r\tnone wants control, then see if the System Menu has been requested.\"\r\t| aController |\r\tactiveController _ nil.\r\tactiveControllerProcess _ Processor activeProcess.\r\tself activeController: self nextActiveController.\r\tProcessor terminateActive! !\r\r!ControlManager methodsFor: 'scheduling' stamp: 'ajh 12/31/2001 15:15'!\rspawnNewProcess\r\r\tself activeController: self screenController! !\r\r!ControlManager methodsFor: 'scheduling'!\runschedule: aController\r\t\"Remove the view, aController, from the collection of scheduled \r\tcontrollers.\"\r\r\tscheduledControllers remove: aController ifAbsent: []! !\r\r!ControlManager methodsFor: 'scheduling'!\rwindowFromUser\r\t\"Present a menu of window titles, and returns the StandardSystemController belonging to the one that gets chosen, or nil if none\"\r\t| controllers labels index |\r\tcontrollers _ OrderedCollection new.\r\tlabels _ String streamContents:\r\t\t[:strm |\r\t\tscheduledControllers do:\r\t\t\t[:controller | controller == screenController ifFalse:\r\t\t\t\t[controllers addLast: controller.\r\t\t\t\tstrm nextPutAll: (controller view label contractTo: 40); cr]].\r\t\tstrm skip: -1  \"drop last cr\"].\r\tindex _ (PopUpMenu labels: labels) startUp.\r\t^ index > 0\r\t\tifTrue:\r\t\t\t[controllers at: index]\r\t\tifFalse:\r\t\t\t[nil]! !\r\r\r!ControlManager methodsFor: 'displaying'!\rbackgroundForm: aForm\r\tscreenController view model: aForm.\r\tScheduledControllers restore\r\"\r\tQDPen new mandala: 30 diameter: 640.\r\tScheduledControllers backgroundForm:\r\t\t(Form fromDisplay: Display boundingBox).\r\r\tScheduledControllers backgroundForm:\r\t\t(InfiniteForm with: Form gray).\r\"! !\r\r!ControlManager methodsFor: 'displaying' stamp: 'di 2/26/98 08:58'!\rrestore \r\t\"Clear the screen to gray and then redisplay all the scheduled views.  Try to be a bit intelligent about the view that wants control and not display it twice if possible.\"\r\r\tscheduledControllers first view uncacheBits.  \"assure refresh\"\r\tself unschedule: screenController; scheduleOnBottom: screenController.\r\tscreenController view window: Display boundingBox; displayDeEmphasized.\r\tself scheduledWindowControllers reverseDo:\r\t\t[:aController | aController view displayDeEmphasized].\r! !\r\r!ControlManager methodsFor: 'displaying' stamp: 'hmm 1/5/2000 07:00'!\rrestore: aRectangle\r\t\"Restore all windows visible in aRectangle\"\r\t^ self restore: aRectangle without: nil! !\r\r!ControlManager methodsFor: 'displaying' stamp: 'ssa 8/26/2008 08:55'!\rrestore: aRectangle below: index without: aView\r\t\"Restore all windows visible in aRectangle, but without aView\"\r\t| view | \r\tview := (scheduledControllers at: index) view.\r\tview == aView ifTrue: \r\t\t[index >= scheduledControllers size ifTrue: [^ self].\r\t\t^ self restore: aRectangle below: index+1 without: aView].\r\tview isNil ifTrue:[^self].\r\tview displayOn: ((BitBlt current toForm: Display) clipRect: aRectangle).\r\tindex >= scheduledControllers size ifTrue: [^ self].\r\t(aRectangle areasOutside: view windowBox) do:\r\t\t[:rect | self restore: rect below: index + 1 without: aView]! !\r\r!ControlManager methodsFor: 'displaying' stamp: 'hmm 12/30/1999 19:35'!\rrestore: aRectangle without: aView\r\t\"Restore all windows visible in aRectangle\"\r\tDisplay deferUpdates: true.\r\tself restore: aRectangle below: 1 without: aView.\r\tDisplay deferUpdates: false; forceToScreen: aRectangle! !\r\r!ControlManager methodsFor: 'displaying'!\rupdateGray\r\t\"From Georg Gollmann - 11/96.  tell the Screen Controller's model to use the currently-preferred desktop color.\"\r\r\t\"ScheduledControllers updateGray\"\r\t(screenController view model isMemberOf: InfiniteForm)\r\t\tifTrue: [screenController view model: (InfiniteForm with:\rPreferences desktopColor)]! !\r\r\r!ControlManager methodsFor: 'private'!\rnextActiveController\r\t\"Answer the controller that would like control.  \r\tIf there was a click outside the active window, it's the top window\r\tthat now has the mouse, otherwise it's just the top window.\"\r\r\t(newTopClicked notNil and: [newTopClicked])\r\t\tifTrue: [newTopClicked _ false.\r\t\t\t\t^ scheduledControllers \r\t\t\t\t\tdetect: [:aController | aController isControlWanted]\r\t\t\t\t\tifNone: [scheduledControllers first]]\r\t\tifFalse: [^ scheduledControllers first]! !\r\r!ControlManager methodsFor: 'private'!\rscheduled: aController from: aProcess\r\r\tactiveControllerProcess==aProcess\r\t\tifTrue: \r\t\t\t[activeController ~~ nil\r\t\t\t\t\tifTrue: [activeController controlTerminate].\r\t\t\taController centerCursorInView.\r\t\t\tself activeController: aController]! !\r\r!ControlManager methodsFor: 'private' stamp: 'sw 12/6/1999 23:40'!\runCacheWindows\r\tscheduledControllers ifNotNil: [scheduledControllers do:\r\t\t[:aController | aController view uncacheBits]]! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rControlManager class\r\tinstanceVariableNames: ''!\r\r!ControlManager class methodsFor: 'exchange'!\rnewScheduler: controlManager\r\t\"When switching projects, the control scheduler has to be exchanged. The \r\tactive one is the one associated with the current project.\"\r\r\tSmalltalk at: #ScheduledControllers put: controlManager.\r\tScheduledControllers restore.\r\tcontrolManager searchForActiveController! !\r\r\r!ControlManager class methodsFor: 'snapshots' stamp: 'di 2/4/1999 15:16'!\rshutDown  \"Saves space in snapshots\"\r\r\tSmalltalk isMorphic ifFalse: [ScheduledControllers unCacheWindows]! !\r\r!ControlManager class methodsFor: 'snapshots' stamp: 'di 2/4/1999 09:00'!\rstartUp\r\tSmalltalk isMorphic ifFalse: [ScheduledControllers restore]! !\rObject subclass: #Controller\r\tinstanceVariableNames: 'model view sensor lastActivityTime'\r\tclassVariableNames: 'MinActivityLapse'\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-ST80 Remnants'!\r!Controller commentStamp: '<historical>' prior: 0!\rA Controller coordinates a View, its model, and user actions. It provides scheduling (control) behavior to determine when the user wants to communicate with the model or view.!\r\r\r!Controller methodsFor: 'initialize-release'!\rinitialize\r\t\"Initialize the state of the receiver. Subclasses should include 'super \r\tinitialize' when redefining this message to insure proper initialization.\"\r\r\tsensor _ InputSensor default! !\r\r!Controller methodsFor: 'initialize-release'!\rrelease\r\t\"Breaks the cycle between the receiver and its view. It is usually not \r\tnecessary to send release provided the receiver's view has been properly \r\treleased independently.\"\r\r\tmodel _ nil.\r\tview ~~ nil\r\t\tifTrue: \r\t\t\t[view controller: nil.\r\t\t\tview _ nil]! !\r\r\r!Controller methodsFor: 'model access'!\rmodel\r\t\"Answer the receiver's model which is the same as the model of the \r\treceiver's view.\"\r\r\t^model! !\r\r!Controller methodsFor: 'model access'!\rmodel: aModel \r\t\"Controller|model: and Controller|view: are sent by View|controller: in \r\torder to coordinate the links between the model, view, and controller. In \r\tordinary usage, the receiver is created and passed as the parameter to \r\tView|controller: so that the receiver's model and view links can be set \r\tup by the view.\"\r\r\tmodel _ aModel! !\r\r\r!Controller methodsFor: 'view access'!\rinspectView\r\tview notNil ifTrue: [^ view inspect]! !\r\r!Controller methodsFor: 'view access'!\rview\r\t\"Answer the receiver's view.\"\r\r\t^view! !\r\r!Controller methodsFor: 'view access'!\rview: aView \r\t\"Controller|view: and Controller|model: are sent by View|controller: in \r\torder to coordinate the links between the model, view, and controller. In \r\tordinary usage, the receiver is created and passed as the parameter to \r\tView|controller: and the receiver's model and view links are set up \r\tautomatically by the view.\"\r\r\tview _ aView! !\r\r\r!Controller methodsFor: 'sensor access'!\rsensor\r\t\"Answer the receiver's sensor. Subclasses may use other objects that are \r\tnot instances of Sensor or its subclasses if more general kinds of \r\tinput/output functions are required.\"\r\r\t^sensor! !\r\r!Controller methodsFor: 'sensor access'!\rsensor: aSensor\r\t\"Set the receiver's sensor to aSensor.\"\r\r\tsensor _ aSensor! !\r\r\r!Controller methodsFor: 'basic control sequence'!\rcontrolInitialize\r\t\"Sent by Controller|startUp as part of the standard control sequence, it \r\tprovides a place in the standard control sequence for initializing the \r\treceiver (taking into account the current state of its model and view). It \r\tshould be redefined in subclasses to perform some specific action.\"\r\r\t^self! !\r\r!Controller methodsFor: 'basic control sequence' stamp: 'ls 7/11/1998 06:33'!\rcontrolLoop \r\t\"Sent by Controller|startUp as part of the standard control sequence. \r\tController|controlLoop sends the message Controller|isControlActive to test \r\tfor loop termination. As long as true is returned, the loop continues. \r\tWhen false is returned, the loop ends. Each time through the loop, the \r\tmessage Controller|controlActivity is sent.\"\r\r\t[self isControlActive] whileTrue: [\r\t\tself interActivityPause. self controlActivity. Processor yield]! !\r\r!Controller methodsFor: 'basic control sequence'!\rcontrolTerminate\r\t\"Provide a place in the standard control sequence for terminating the \r\treceiver (taking into account the current state of its model and view). It \r\tshould be redefined in subclasses to perform some specific action.\"\r\r\t^self! !\r\r!Controller methodsFor: 'basic control sequence' stamp: 'RAA 1/30/2001 19:06'!\rinterActivityPause\r\t\"if we are looping quickly, insert a short delay.  Thus if we are just doing UI stuff, we won't take up much CPU\"\r\t| currentTime wait |\r\tMinActivityLapse ifNotNil: [\r\t\tlastActivityTime ifNotNil: [ \r\t\t\tcurrentTime _ Time millisecondClockValue.\r\t\t\twait _ lastActivityTime + MinActivityLapse - currentTime.\r\t\t\twait > 0 ifTrue: [ \r\t\t\t\twait <= MinActivityLapse  \"big waits happen after a snapshot\"\r\t\t\t\t\tifTrue: [DisplayScreen checkForNewScreenSize.\r\t\t\t\t\t\t\t(Delay forMilliseconds: wait) wait ]. ]. ]. ].\r\r\tlastActivityTime _ Time millisecondClockValue.! !\r\r!Controller methodsFor: 'basic control sequence'!\rstartUp\r\t\"Give control to the receiver. The default control sequence is to initialize \r\t(see Controller|controlInitialize), to loop (see Controller|controlLoop), and \r\tthen to terminate (see Controller|controlTerminate). After this sequence, \r\tcontrol is returned to the sender of Control|startUp. The receiver's control \r\tsequence is used to coordinate the interaction of its view and model. In \r\tgeneral, this consists of polling the sensor for user input, testing the \r\tinput with respect to the current display of the view, and updating the \r\tmodel to reflect intended changes.\"\r\r\tself controlInitialize.\r\tself controlLoop.\r\tself controlTerminate! !\r\r!Controller methodsFor: 'basic control sequence'!\rterminateAndInitializeAround: aBlock\r\t\"1/12/96 sw\"\r\tself controlTerminate.\r\taBlock value.\r\tself controlInitialize! !\r\r\r!Controller methodsFor: 'control defaults'!\rcontrolActivity\r\t\"Pass control to the next control level (that is, to the Controller of a \r\tsubView of the receiver's view) if possible. It is sent by \r\tController|controlLoop each time through the main control loop. It should \r\tbe redefined in a subclass if some other action is needed.\"\r\r\tself controlToNextLevel! !\r\r!Controller methodsFor: 'control defaults'!\rcontrolToNextLevel\r\t\"Pass control to the next control level (that is, to the Controller of a \r\tsubView of the receiver's view) if possible. The receiver finds the \r\tsubView (if any) of its view whose inset display box (see \r\tView|insetDisplayBox) contains the sensor's cursor point. The Controller \r\tof this subView is then given control if it answers true in response to \r\tthe message Controller|isControlWanted.\"\r\r\t| aView |\r\taView _ view subViewWantingControl.\r\taView ~~ nil ifTrue: [aView controller startUp]! !\r\r!Controller methodsFor: 'control defaults' stamp: 'sma 3/11/2000 15:23'!\risControlActive\r\t\"Answer whether receiver wishes to continue evaluating its controlLoop \r\tmethod. It is sent by Controller|controlLoop in order to determine when \r\tthe receiver's control loop should terminate, and should be redefined in \r\ta subclass if some special condition for terminating the main control loop \r\tis needed.\"\r\r\t^ self viewHasCursor\r\t\tand: [sensor blueButtonPressed not\r\t\tand: [sensor yellowButtonPressed not]]! !\r\r!Controller methodsFor: 'control defaults'!\risControlWanted\r\t\"Answer whether the cursor is inside the inset display box (see \r\tView|insetDisplayBox) of the receiver's view. It is sent by \r\tController|controlNextLevel in order to determine whether or not control \r\tshould be passed to this receiver from the Controller of the superView of \r\tthis receiver's view.\"\r\r\t^self viewHasCursor! !\r\r\r!Controller methodsFor: 'cursor'!\rcenterCursorInView\r\t\"Position sensor's mousePoint (which is assumed to be connected to the \r\tcursor) to the center of its view's inset display box (see \r\tSensor|mousePoint: and View|insetDisplayBox).\"\r\r\t^sensor cursorPoint: view insetDisplayBox center! !\r\r!Controller methodsFor: 'cursor' stamp: 'sw 7/13/1999 18:42'!\rviewHasCursor\r\t\"Answer whether the cursor point of the receiver's sensor lies within the \r\tinset display box of the receiver's view (see View|insetDisplayBox). \r\tController|viewHasCursor is normally used in internal methods.\"\r\r\t^ view ifNotNil: [view containsPoint: sensor cursorPoint] ifNil: [false]! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rController class\r\tinstanceVariableNames: ''!\r\r!Controller class methodsFor: 'initialization' stamp: 'ls 7/13/1998 00:47'!\rMinActivityLapse: milliseconds\r\t\"minimum time to delay between calls to controlActivity\"\r\tMinActivityLapse _ milliseconds ifNotNil: [ milliseconds rounded ].! !\r\r!Controller class methodsFor: 'initialization' stamp: 'ssa 8/15/2008 09:40'!\rinitialize\r\t\"Controller initialize\"\r\tself MinActivityLapse: 50.! !\rStandardFileStream subclass: #CrLfFileStream\r\tinstanceVariableNames: 'lineEndConvention'\r\tclassVariableNames: 'Cr CrLf Lf LineEndDefault LineEndStrings LookAheadCount'\r\tpoolDictionaries: ''\r\tcategory: 'System-Files'!\r!CrLfFileStream commentStamp: 'ls 11/10/2002 13:32' prior: 0!\rI am the same as a regular file stream, except that when I am in text mode, I will automatically convert line endings between the underlying platform's convention, and Squeak's convention of carriage-return only.  The goal is that Squeak text files can be treated as OS text files, and vice versa.\r\rIn binary mode, I behave identically to a StandardFileStream.\r\rTo enable CrLfFileStream as the default file stream class for an entire image, modify FileStream class concreteStream .\r\r\rThere are two caveats on programming with CrLfFileStream.\r\rFirst, the choice of text mode versus binary mode affects which characters are visible in Squeak, and no longer just affects whether those characters are returned as Character's or as Integer's.  Thus the choice of mode needs to be made very carefully, and must be based on intent instead of convenience of representation.  The methods asString, asByteArray, asCharacter, and asInteger can be used to convert between character and integer representations.  (Arguably, file streams should accept either strings or characters in nextPut: and nextPutAll:, but that is not the case right now.)\r\rSecond, arithmetic on positions no longer works, because one character that Squeak sees (carriage return) could map to two characters in the underlying file (carriage return plus line feed, on MS Windows and MS DOS).  Comparison between positions still works.  (This caveat could perhaps be fixed by maintaining a map between Squeak positions and positions in the underlying file, but it is complicated.  Consider, for example, updates to the middle of the file.  Also, consider that text files are rarely updated in the middle of the file, and that general random access to a text file is rarely very useful.  If general random access with specific file counts is desired, then the file is starting to sound like a binary file instead of a text file.)\r\r!\r]style[(448 31 1371 6 32)f1,f1LFileStream class concreteStream;,f1,f1i,f1!\r\r\r!CrLfFileStream methodsFor: 'open/close' stamp: 'ar 1/20/98 16:15'!\ropen: aFileName forWrite: writeMode \r\t\"Open the receiver.  If writeMode is true, allow write, else access will be \r\tread-only. \"\r\t| result |\r\tresult _ super open: aFileName forWrite: writeMode.\r\tresult ifNotNil: [self detectLineEndConvention].\r\t^ result! !\r\r\r!CrLfFileStream methodsFor: 'access' stamp: 'ar 1/20/98 16:16'!\rascii\r\tsuper ascii.\r\tself detectLineEndConvention! !\r\r!CrLfFileStream methodsFor: 'access' stamp: 'ar 1/20/98 16:16'!\rbinary\r\tsuper binary.\r\tlineEndConvention _ nil! !\r\r!CrLfFileStream methodsFor: 'access' stamp: 'ls 7/10/1998 23:35'!\rdetectLineEndConvention\r\t\"Detect the line end convention used in this stream. The result may be either #cr, #lf or #crlf.\"\r\t| char numRead pos |\r\tself isBinary ifTrue: [^ self error: 'Line end conventions are not used on binary streams'].\r\tlineEndConvention _ LineEndDefault.\r\t\"Default if nothing else found\"\r\tnumRead _ 0.\r\tpos _ super position.\r\t[super atEnd not and: [numRead < LookAheadCount]]\r\t\twhileTrue: \r\t\t\t[char _ super next.\r\t\t\tchar = Lf\r\t\t\t\tifTrue: \r\t\t\t\t\t[super position: pos.\r\t\t\t\t\t^ lineEndConvention _ #lf].\r\t\t\tchar = Cr\r\t\t\t\tifTrue: \r\t\t\t\t\t[super peek = Lf\r\t\t\t\t\t\tifTrue: [lineEndConvention _ #crlf]\r\t\t\t\t\t\tifFalse: [lineEndConvention _ #cr].\r\t\t\t\t\tsuper position: pos.\r\t\t\t\t\t^ lineEndConvention].\r\t\t\tnumRead _ numRead + 1].\r\tsuper position: pos.\r\t^ lineEndConvention! !\r\r!CrLfFileStream methodsFor: 'access' stamp: 'ls 11/5/1998 23:37'!\rnext\r    | char secondChar |\r    char _ super next.\r    self isBinary ifTrue: [^char].\r    char == Cr ifTrue:\r        [secondChar _ super next.\r        secondChar ifNotNil: [secondChar == Lf ifFalse: [self skip: -1]].\r        ^Cr].\r    char == Lf ifTrue: [^Cr].\r    ^char! !\r\r!CrLfFileStream methodsFor: 'access' stamp: 'ls 12/29/1998 17:15'!\rnext: n\r\r\t\t| string peekChar |\r\t\tstring _ super next: n.\r\t\tstring size = 0 ifTrue: [ ^string ].\r\t\tself isBinary ifTrue: [ ^string ].\r\r\t\t\"if we just read a CR, and the next character is an LF, then skip the LF\"\r\t\t( string last = Character cr ) ifTrue: [\r\t\t\tpeekChar _ super next.\t\t\"super peek doesn't work because it relies on #next\"\r\t\t\tpeekChar ~= Character lf ifTrue: [\r\t\t\t\tsuper position: (super position - 1) ]. ].\r \r\t\tstring _ string withSqueakLineEndings.\r\r\t\tstring size = n ifTrue: [ ^string ].\r\r\t\t\"string shrunk due to embedded crlfs; make up the difference\"\r\t\t^string, (self next: n - string size)! !\r\r!CrLfFileStream methodsFor: 'access' stamp: 'ar 1/20/98 16:18'!\rnextPut: char \r\t(lineEndConvention notNil and: [char = Cr])\r\t\tifTrue: [super nextPutAll: (LineEndStrings at: lineEndConvention)]\r\t\tifFalse: [super nextPut: char].\r\t^ char! !\r\r!CrLfFileStream methodsFor: 'access' stamp: 'ar 1/20/98 16:18'!\rnextPutAll: aString \r\tsuper nextPutAll: (self convertStringFromCr: aString).\r\t^ aString\r! !\r\r!CrLfFileStream methodsFor: 'access' stamp: 'wod 6/18/1998 13:52'!\rpeek\r\t\"Answer what would be returned if the message next were sent to the receiver. If the receiver is at the end, answer nil.  \"\r\t| next pos |\r\tself atEnd ifTrue: [^ nil].\r\tpos _ self position.\r\tnext _ self next.\r\tself position: pos.\r\t^ next! !\r\r!CrLfFileStream methodsFor: 'access' stamp: 'wod 11/5/1998 14:15'!\rupTo: aCharacter\r\t| newStream char |\r\tnewStream _ WriteStream on: (String new: 100).\r\t[(char _ self next) isNil or: [char == aCharacter]]\r\t\twhileFalse: [newStream nextPut: char].\r\t^ newStream contents\r! !\r\r\r!CrLfFileStream methodsFor: 'private' stamp: 'ar 1/20/98 16:21'!\rconvertStringFromCr: aString \r\t| inStream outStream |\r\tlineEndConvention ifNil: [^ aString].\r\tlineEndConvention == #cr ifTrue: [^ aString].\r\tlineEndConvention == #lf ifTrue: [^ aString copy replaceAll: Cr with: Lf].\r\t\"lineEndConvention == #crlf\"\r\tinStream _ ReadStream on: aString.\r\toutStream _ WriteStream on: (String new: aString size).\r\t[inStream atEnd]\r\t\twhileFalse: \r\t\t\t[outStream nextPutAll: (inStream upTo: Cr).\r\t\t\t(inStream atEnd not or: [aString last = Cr])\r\t\t\t\tifTrue: [outStream nextPutAll: CrLf]].\r\t^ outStream contents! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rCrLfFileStream class\r\tinstanceVariableNames: ''!\r\r!CrLfFileStream class methodsFor: 'class initialization' stamp: 'ar 1/20/98 16:10'!\rdefaultToCR\r\t\"CrLfFileStream defaultToCR\"\r\tLineEndDefault := #cr.! !\r\r!CrLfFileStream class methodsFor: 'class initialization' stamp: 'ar 1/20/98 16:10'!\rdefaultToCRLF\r\t\"CrLfFileStream defaultToCRLF\"\r\tLineEndDefault := #crlf.! !\r\r!CrLfFileStream class methodsFor: 'class initialization' stamp: 'ar 1/20/98 16:10'!\rdefaultToLF\r\t\"CrLfFileStream defaultToLF\"\r\tLineEndDefault := #lf.! !\r\r!CrLfFileStream class methodsFor: 'class initialization' stamp: 'ar 1/20/98 16:13'!\rguessDefaultLineEndConvention\r\t\"Lets try to guess the line end convention from what we know about the path name delimiter from FileDirectory.\"\r\tFileDirectory pathNameDelimiter = $: ifTrue:[^self defaultToCR].\r\tFileDirectory pathNameDelimiter = $/ ifTrue:[^self defaultToLF].\r\tFileDirectory pathNameDelimiter = $\\ ifTrue:[^self defaultToCRLF].\r\t\"in case we don't know\"\r\t^self defaultToCR! !\r\r!CrLfFileStream class methodsFor: 'class initialization' stamp: 'di 2/4/1999 09:16'!\rinitialize\r\t\"CrLfFileStream initialize\"\r\tCr := Character cr.\r\tLf := Character lf.\r\tCrLf := String with: Cr with: Lf.\r\tLineEndStrings := Dictionary new.\r\tLineEndStrings at: #cr put: (String with: Character cr).\r\tLineEndStrings at: #lf put: (String with: Character lf).\r\tLineEndStrings at: #crlf put: (String with: Character cr with: Character lf).\r\tLookAheadCount := 2048.\r\tSmalltalk addToStartUpList: self.\r\tself startUp.! !\r\r!CrLfFileStream class methodsFor: 'class initialization' stamp: 'djp 1/28/1999 22:08'!\rstartUp\r\tself guessDefaultLineEndConvention! !\rForm subclass: #Cursor\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'BlankCursor BottomLeftCursor BottomRightCursor CornerCursor CrossHairCursor CurrentCursor DownCursor MarkerCursor MenuCursor MoveCursor NormalCursor OriginCursor ReadCursor ResizeLeftCursor ResizeTopCursor ResizeTopLeftCursor ResizeTopRightCursor RightArrowCursor SquareCursor TopLeftCursor TopRightCursor UpCursor WaitCursor WebLinkCursor WriteCursor XeqCursor'\r\tpoolDictionaries: ''\r\tcategory: 'Graphics-Display Objects'!\r!Cursor commentStamp: '<historical>' prior: 0!\rI am a Form that is a possible appearance for a mouse cursor.  My size is always 16x16, ever since the original implementation on the Alto.\r\rThere are many examples available in the \"current cursor\" category of class methods.  For example, \"Cursor normal\" and \"Cursor wait\".  For example:\r\r\tCursor wait show\r\r!\r\r\r!Cursor methodsFor: 'updating' stamp: 'ls 6/17/2002 12:00'!\rchanged: aParameter\r\t\"overriden to reinstall the cursor if it is the active cursor, in case the appearance has changed.  (Is this used anywhere?  Do cursors really change in place these days?)\"\r\tself == CurrentCursor ifTrue: [self beCursor].\r\tsuper changed: aParameter! !\r\r\r!Cursor methodsFor: 'displaying' stamp: 'ls 6/17/2002 11:56'!\rshow\r\t\"Make the hardware's mouse cursor look like the receiver\"\r\r\tSensor currentCursor: self! !\r\r!Cursor methodsFor: 'displaying' stamp: 'bf 10/13/1999 13:05'!\rshowWhile: aBlock \r\t\"While evaluating the argument, aBlock, make the receiver be the cursor \r\tshape.\"\r\r\t| oldcursor |\r\toldcursor _ Sensor currentCursor.\r\tself show.\r\t^aBlock ensure: [oldcursor show]\r! !\r\r\r!Cursor methodsFor: 'printing'!\rprintOn: aStream\r\r\tself storeOn: aStream base: 2! !\r\r\r!Cursor methodsFor: 'testing' stamp: 'bf 2/2/1999 19:34'!\rhasMask\r\t^false! !\r\r\r!Cursor methodsFor: 'converting' stamp: 'RAA 8/14/2000 10:14'!\rasCursorForm\r\t| form |\r\tform _ StaticForm extent: self extent depth: 8.\r\tform fillShape: self fillColor: Color black at: offset negated.\r\t^ form offset: offset! !\r\r!Cursor methodsFor: 'converting' stamp: 'bf 2/2/1999 19:32'!\rwithMask\r\t^CursorWithMask derivedFrom: self! !\r\r\r!Cursor methodsFor: 'primitives'!\rbeCursor\r\t\"Primitive. Tell the interpreter to use the receiver as the current cursor \r\timage. Fail if the receiver does not match the size expected by the \r\thardware. Essential. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 101>\r\tself primitiveFailed! !\r\r!Cursor methodsFor: 'primitives' stamp: 'jm 9/22/1998 23:33'!\rbeCursorWithMask: maskForm\r\t\"Primitive. Tell the interpreter to use the receiver as the current cursor image with the given mask Form. Both the receiver and the mask should have extent 16@16 and a depth of one. The mask and cursor bits are combined as follow:\r\t\t\tmask\tcursor\teffect\r\t\t\t 0\t\t  0\t\ttransparent (underlying pixel shows through)\r\t\t\t 1\t\t  1\t\topaque black\r\t\t\t 1\t\t  0\t\topaque white\r\t\t\t 0\t\t  1\t\tinvert the underlying pixel\"\r\"Essential. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 101>\r\tself primitiveFailed\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rCursor class\r\tinstanceVariableNames: ''!\r\r!Cursor class methodsFor: 'class initialization' stamp: 'JMM 10/21/2003 18:57'!\rinitBottomLeft\r\r\tBottomLeftCursor _ \r\t\t(Cursor extent: 16@16\r\t\t\tfromArray: #(\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1111111111111111\r\t\t2r1111111111111111)\r\t\t\toffset: 0@-16).\r! !\r\r!Cursor class methodsFor: 'class initialization' stamp: 'JMM 10/21/2003 18:57'!\rinitBottomRight\r\r\tBottomRightCursor _ \r\t\t(Cursor extent: 16@16\r\t\t\tfromArray: #(\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r1111111111111111\r\t\t2r1111111111111111)\r\t\t\toffset: -16@-16).\r! !\r\r!Cursor class methodsFor: 'class initialization'!\rinitCorner\r\r\tCornerCursor _ \r\t\t(Cursor \r\t\t\textent: 16@16\r\t\t\tfromArray: #(\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r1111111111111111\r\t\t2r1111111111111111)\r\t\t\toffset: -16@-16).\r! !\r\r!Cursor class methodsFor: 'class initialization' stamp: 'kfr 7/12/2003 21:02'!\rinitCrossHair\r\r\tCrossHairCursor _   \r\t\t(Cursor\r\t\t\textent: 16@16\r\t\t\tfromArray: #(\r\t\t2r0000000000000000\r\t\t2r0000000100000000\r\t\t2r0000000100000000\r\t\t2r0000000100000000\r\t\t2r0000000100000000\r\t\t2r0000000100000000\r\t\t2r0000000100000000\r\t\t2r0111111111111100\r\t\t2r0000000100000000\r\t\t2r0000000100000000\r\t\t2r0000000100000000\r\t\t2r0000000100000000\r\t\t2r0000000100000000\r\t\t2r0000000100000000\r\t\t2r0000000000000000\r\t\t2r0)\r\t\t\toffset: -7@-7).\r\t\r\t! !\r\r!Cursor class methodsFor: 'class initialization'!\rinitDown\r\r\tDownCursor  _\r\t\t     (Cursor\r\textent: 16@16\r\tfromArray: #(\r\t\t2r11000000000000\r\t\t2r11000000000000\r\t\t2r11000000000000\r\t\t2r11000000000000\r\t\t2r11000000000000\r\t\t2r11000000000000\r\t\t2r11000000000000\r\t\t2r1111110000000000\r\t\t2r111100000000000\r\t\t2r11000000000000\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0)\r\toffset: 0@0).\r! !\r\r!Cursor class methodsFor: 'class initialization'!\rinitMarker\r\r\tMarkerCursor _ \r\t\tCursor\r\t\t\textent: 16@16\r\t\t\tfromArray: #(\r\t\t2r0111000000000000\r\t\t2r1111100000000000\r\t\t2r1111100000000000\r\t\t2r0111000000000000\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0)\r\t\t\toffset: 0@0.\r! !\r\r!Cursor class methodsFor: 'class initialization' stamp: 'di 7/30/2001 10:32'!\rinitMenu \r\r\tMenuCursor  _\r\t\t        (Cursor\r\textent: 16@16\r\tfromArray: #(\r\t\t2r1111111111100000\r\t\t2r1000000000100000\r\t\t2r1010011000100000\r\t\t2r1000000000100000\r\t\t2r1101001101100000\r\t\t2r1111111111100000\r\t\t2r1000000000100000\r\t\t2r1011001010100000\r\t\t2r1000000000100000\r\t\t2r1010110010100000\r\t\t2r1000000000100000\r\t\t2r1010010100100000\r\t\t2r1000000000100000\r\t\t2r1111111111100000\r\t\t0)\r\toffset: 0@0).\r! !\r\r!Cursor class methodsFor: 'class initialization' stamp: 'kfr 7/12/2003 21:10'!\rinitMove\r\r\tMoveCursor _ \r\t\tCursor \r\t\t\textent: 16@16\r\t\t\tfromArray: #(\r\t\t2r1111111111111100\r\t\t2r1111111111111100\r\t\t2r1100001100001100\r\t\t2r1100001100001100\r\t\t2r1100001100001100\r\t\t2r1100001100001100\r\t\t2r1111111111111100\r\t\t2r1111111111111100\r\t\t2r1100001100001100\r\t\t2r1100001100001100\r\t\t2r1100001100001100\r\t\t2r1100001100001100\r\t\t2r1111111111111100\r\t\t2r1111111111111100\r          0)\r\t\t\toffset: 0@0.\r! !\r\r!Cursor class methodsFor: 'class initialization'!\rinitNormal\r\r\tNormalCursor _   \r\t\t(Cursor\r\t\t\textent: 16@16\r\t\t\tfromArray: #(\r\t\t2r1000000000000000\r\t\t2r1100000000000000\r\t\t2r1110000000000000\r\t\t2r1111000000000000\r\t\t2r1111100000000000\r\t\t2r1111110000000000\r\t\t2r1111111000000000\r\t\t2r1111100000000000\r\t\t2r1111100000000000\r\t\t2r1001100000000000\r\t\t2r0000110000000000\r\t\t2r0000110000000000\r\t\t2r0000011000000000\r\t\t2r0000011000000000\r\t\t2r0000001100000000\r\t\t2r0000001100000000)\r\toffset: 0@0).\r\r\t\r\t! !\r\r!Cursor class methodsFor: 'class initialization' stamp: 'di 10/8/1998 17:04'!\rinitNormalWithMask    \"Cursor initNormalWithMask.  Cursor normal show\"\r\t\"Next two lines work simply for any cursor...\"\r\tself initNormal.\r\tNormalCursor _ CursorWithMask derivedFrom: NormalCursor.\r\r\t\"But for a good looking cursor, you have to tweak things...\"\r\tNormalCursor _ (CursorWithMask extent: 16@16 depth: 1\r\t\t\tfromArray: #( 0 1073741824 1610612736 1879048192\r\t\t\t\t2013265920 2080374784 2113929216 2130706432\r\t\t\t\t2080374784 2080374784 1275068416 100663296\r\t\t\t\t100663296 50331648 50331648 0)\r\t\t\toffset: -1@-1)\r\t\tsetMaskForm: (Form extent: 16@16 depth: 1\r\t\t\tfromArray: #( 3221225472 3758096384 4026531840 4160749568\r\t\t\t\t4227858432 4261412864 4278190080 4286578688\r\t\t\t\t4278190080 4261412864 4261412864 3472883712\r\t\t\t\t251658240 125829120 125829120 50331648)\r\t\t\toffset: 0@0).! !\r\r!Cursor class methodsFor: 'class initialization'!\rinitOrigin\r\r\tOriginCursor _   \r\t\t(Cursor\r\t\t\textent: 16@16\r\t\t\tfromArray: #(\r\t\t2r1111111111111111\r\t\t2r1111111111111111\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000)\r\t\t\toffset: 0@0).\r! !\r\r!Cursor class methodsFor: 'class initialization' stamp: 'kfr 7/12/2003 22:55'!\rinitRead\r\r\tReadCursor _  \r\t\t(Cursor\r\t\t\textent: 16@16\r\t\t\tfromArray: #(\r\t\t2r0000000000000000\r\t\t2r0000000000000000\r\t\t2r0001000000001000\r\t\t2r0010100000010100\r\t\t2r0100000000100000\r\t\t2r1111101111100000\r\t\t2r1000010000100000\r\t\t2r1000010000100000\r\t\t2r1011010110100000\r\t\t2r0111101111000000\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0)\r\toffset: 0@0).\r! !\r\r!Cursor class methodsFor: 'class initialization' stamp: 'dew 2/14/2004 01:24'!\rinitResizeLeft\r\r\tResizeLeftCursor _ \r\t\t(Cursor extent: 16@16 fromArray: #(\r\t\t2r0000000000000000\r\t\t2r0000001001000000\r\t\t2r0000001001000000\r\t\t2r0000001001000000\r\t\t2r0000101001010000\r\t\t2r0001101001011000\r\t\t2r0011101001011100\r\t\t2r0111111001111110\r\t\t2r0011101001011100\r\t\t2r0001101001011000\r\t\t2r0000101001010000\r\t\t2r0000001001000000\r\t\t2r0000001001000000\r\t\t2r0000001001000000\r\t\t2r0000001001000000\r\t\t2r0000000000000000 )\r\toffset: -7@-7 ) withMask\r! !\r\r!Cursor class methodsFor: 'class initialization' stamp: 'kfr 4/3/2004 11:46'!\rinitResizeTop\r     \"Cursor initResizeTop\"\r\tResizeTopCursor _ \r\t\t(Cursor extent: 16@16 fromArray: #(\r\t\t2r000000100000000\r\t\t2r000001110000000\r\t\t2r000011111000000\r\t\t2r000111111100000\r\t\t2r000000100000000\r\t\t2r111111111111100\r\t\t2r000000000000000\r\t\t2r000000000000000\r\t\t2r111111111111100\r\t\t2r000000100000000\r\t\t2r000111111100000\r\t\t2r000011111000000\r\t\t2r000001110000000\r\t\t2r000000100000000\r\t\t2r000000000000000)\r\toffset: -7@-7) withMask! !\r\r!Cursor class methodsFor: 'class initialization' stamp: 'JMM 10/21/2003 18:59'!\rinitResizeTopLeft\r\r\tResizeTopLeftCursor _ \r\t\t(Cursor extent: 16@16 fromArray: #(\r\t\t2r0000000000000000\r\t\t2r0111110000010000\r\t\t2r0111100000100000\r\t\t2r0111000001000100\r\t\t2r0110100010001000\r\t\t2r0100010100010000\r\t\t2r0000001000100000\r\t\t2r0000010001000000\r\t\t2r0000100010000000\r\t\t2r0001000100100010\r\t\t2r0010001000010110\r\t\t2r0000010000001110\r\t\t2r0000100000011110\r\t\t2r0000000000111110\r\t\t2r0000000000000000\r\t\t2r0000000000000000)\r\toffset: -7@-7) withMask! !\r\r!Cursor class methodsFor: 'class initialization' stamp: 'JMM 10/21/2003 19:00'!\rinitResizeTopRight\r\r\tResizeTopRightCursor _ \r\t\t(Cursor extent: 16@16 fromArray: #(\r\t\t2r0000000000000000\r\t\t2r0000100000111110\r\t\t2r0000010000011110\r\t\t2r0010001000001110\r\t\t2r0001000100010110\r\t\t2r0000100010100010\r\t\t2r0000010001000000\r\t\t2r0000001000100000\r\t\t2r0000000100010000\r\t\t2r0100010010001000\r\t\t2r0110100001000100\r\t\t2r0111000000100000\r\t\t2r0111100000010000\r\t\t2r0111110000000000\r\t\t2r0000000000000000\r\t\t2r0000000000000000)\r\toffset: -7@-7) withMask.! !\r\r!Cursor class methodsFor: 'class initialization'!\rinitRightArrow \r\r\tRightArrowCursor  _\r\t\t      (Cursor\r\textent: 16@16\r\tfromArray: #(\r\t\t2r100000000000\r\t\t2r111000000000\r\t\t2r1111111110000000\r\t\t2r111000000000\r\t\t2r100000000000\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0)\r\toffset: 0@0).\r\t\r\t\"Cursor initRightArrow\"! !\r\r!Cursor class methodsFor: 'class initialization'!\rinitSquare\r\r\tSquareCursor _ \r\t\t(Cursor\r\t\t\textent: 16@16\r\t\t\tfromArray: #(\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0000001111000000\r\t\t2r0000001111000000\r\t\t2r0000001111000000\r\t\t2r0000001111000000\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0)\r\toffset: -8@-8).\r\r\t! !\r\r!Cursor class methodsFor: 'class initialization' stamp: 'JMM 10/21/2003 19:01'!\rinitTopLeft\r\tTopLeftCursor _ \r\t\t(Cursor extent: 16@16\r\t\t\tfromArray: #(\r\t\t2r1111111111111111\r\t\t2r1111111111111111\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000\r\t\t2r1100000000000000)\r\t\t\toffset: 0@0).\r! !\r\r!Cursor class methodsFor: 'class initialization' stamp: 'JMM 10/21/2003 19:02'!\rinitTopRight\r\tTopRightCursor _ \r\t\t(Cursor extent: 16@16\r\t\t\tfromArray: #(\r\t\t2r1111111111111111\r\t\t2r1111111111111111\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011\r\t\t2r0000000000000011)\r\t\t\toffset: -16@0).\r! !\r\r!Cursor class methodsFor: 'class initialization'!\rinitUp\r\r\tUpCursor _ \r\t\t    (Cursor\r\textent: 16@16\r\tfromArray: #(\r\t\t2r11000000000000\r\t\t2r111100000000000\r\t\t2r1111110000000000\r\t\t2r11000000000000\r\t\t2r11000000000000\r\t\t2r11000000000000\r\t\t2r11000000000000\r\t\t2r11000000000000\r\t\t2r11000000000000\r\t\t2r11000000000000\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0\r\t\t2r0)\r\toffset: 0@0).\r! !\r\r!Cursor class methodsFor: 'class initialization' stamp: 'kfr 7/12/2003 21:27'!\rinitWait\r\r\tWaitCursor _ \r\t\t  (Cursor\r\t\t\textent: 16@16\r\t\t\tfromArray: #(\r\t\t2r1111111111111100\r\t\t2r1000000000000100\r\t\t2r0100000000001000\r\t\t2r0010000000010000\r\t\t2r0001110011100000\r\t\t2r0000111111000000\r\t\t2r0000011110000000\r\t\t2r0000011110000000\r\t\t2r0000100101000000\r\t\t2r0001000100100000\r\t\t2r0010000110010000\r\t\t2r0100001111001000\r\t\t2r1000111111110100\r\t\t2r1111111111111100\r\t\t0)\r\t\t\toffset: 0@0).\r! !\r\r!Cursor class methodsFor: 'class initialization' stamp: 'kfr 7/12/2003 22:52'!\rinitWrite\r\r\tWriteCursor _ (Cursor\r\textent: 16@16\r\tfromArray: #(\r\t\t2r0000000000011000\r\t\t2r0000000000111100\r\t\t2r0000000001001000\r\t\t2r0000000010010000\r\t\t2r0000000100100000\r\t\t2r0000001001000100\r\t\t2r0000010010000100\r\t\t2r0000100100001100\r\t\t2r0001001000010000\r\t\t2r0010010000010000\r\t\t2r0111100000001000\r\t\t2r0101000011111000\r\t\t2r1110000110000000\r\t\t2r0111111100000000\r\t\t2r0\r\t\t2r0)\r\toffset: 0@0).\r! !\r\r!Cursor class methodsFor: 'class initialization'!\rinitXeq\r\r\tXeqCursor _ \r\t\t(Cursor\r\t\t\textent: 16@16\r\t\t\tfromArray: #(\r\t\t2r1000000000010000\r\t\t2r1100000000010000\r\t\t2r1110000000111000\r\t\t2r1111000111111111\r\t\t2r1111100011000110\r\t\t2r1111110001000100\r\t\t2r1111111001111100\r\t\t2r1111000001101100\r\t\t2r1101100011000110\r\t\t2r1001100010000010\r\t\t2r0000110000000000\r\t\t2r0000110000000000\r\t\t2r0000011000000000\r\t\t2r0000011000000000\r\t\t2r0000001100000000\r\t\t2r0000001100000000)\r\toffset: 0@0).\r! !\r\r!Cursor class methodsFor: 'class initialization' stamp: 'JMM 10/21/2003 19:04'!\rinitialize\r\t\"Create all the standard cursors...\"\r\t\tself initOrigin.\r\t\tself initRightArrow.\r\t\tself initMenu.\r\t\tself initCorner.\r\t\tself initRead.\r\t\tself initWrite.\r\t\tself initWait.\r\t\tBlankCursor _ Cursor new.\r\t\tself initXeq.\r\t\tself initSquare.\r\t\tself initNormalWithMask.\r\t\tself initCrossHair.\r\t\tself initMarker.\r\t\tself initUp.\r\t\tself initDown.\r\t\tself initMove.\r\t\tself initBottomLeft.\r\t\tself initBottomRight.\r\t\tself initResizeLeft.\r\t\tself initResizeTop.\r\t\tself initResizeTopLeft.\r\t\tself initResizeTopRight.\r\t\tself initTopLeft.\r\t\tself initTopRight.\r\t\tself makeCursorsWithMask.\r\r\t\t\"Cursor initialize\"\r! !\r\r!Cursor class methodsFor: 'class initialization' stamp: 'bf 2/2/1999 19:33'!\rmakeCursorsWithMask\r\t\"Cursor initialize;makeCursorsWithMask\"\r\r\tself classPool associationsDo: [:var |\r\t\tvar value hasMask\r\t\t\tifFalse: [var value: var value withMask]] ! !\r\r!Cursor class methodsFor: 'class initialization'!\rstartUp\r\tself currentCursor: self currentCursor! !\r\r\r!Cursor class methodsFor: 'instance creation'!\rextent: extentPoint fromArray: anArray offset: offsetPoint \r\t\"Answer a new instance of me with width and height specified by\r\textentPoint, offset by offsetPoint, and bits from anArray.\r\tNOTE: This has been kluged to take an array of 16-bit constants,\r\tand shift them over so they are left-justified in a 32-bit bitmap\"\r\r\textentPoint = (16 @ 16)\r\t\tifTrue: \r\t\t\t[^ super\r\t\t\t\textent: extentPoint\r\t\t\t\tfromArray: (anArray collect: [:bits | bits bitShift: 16])\r\t\t\t\toffset: offsetPoint]\r\t\tifFalse: [self error: 'cursors must be 16@16']! !\r\r!Cursor class methodsFor: 'instance creation' stamp: 'di 10/6/1998 13:53'!\rnew\r\r\t^ self extent: 16 @ 16\r\t\tfromArray: (Array new: 16 withAll: 0)\r\t\toffset: 0 @ 0\r\r\t\"Cursor new bitEdit show\"! !\r\r\r!Cursor class methodsFor: 'current cursor'!\rcurrentCursor\r\t\"Answer the instance of Cursor that is the one currently displayed.\"\r\r\t^CurrentCursor! !\r\r!Cursor class methodsFor: 'current cursor' stamp: 'di 10/6/1998 13:57'!\rcurrentCursor: aCursor \r\t\"Make the instance of cursor, aCursor, be the current cursor. Display it. \r\tCreate an error if the argument is not a Cursor.\"\r\r\t(aCursor isKindOf: self)\r\t\tifTrue: [CurrentCursor _ aCursor.\r\t\t\t\taCursor beCursor]\r\t\tifFalse: [self error: 'The new cursor must be an instance of class Cursor']! !\r\r\r!Cursor class methodsFor: 'constants'!\rblank\r\t\"Answer the instance of me that is all white.\"\r\r\t^BlankCursor! !\r\r!Cursor class methodsFor: 'constants' stamp: 'JMM 10/21/2003 19:13'!\rbottomLeft\r\t\"Cursor bottomLeft showWhile: [Sensor waitButton]\"\r\t^BottomLeftCursor\r! !\r\r!Cursor class methodsFor: 'constants' stamp: 'JMM 10/21/2003 19:13'!\rbottomRight\r\t\"Cursor bottomRight showWhile: [Sensor waitButton]\"\r\t^BottomRightCursor\r! !\r\r!Cursor class methodsFor: 'constants'!\rcorner\r\t\"Answer the instance of me that is the shape of the bottom right corner \r\tof a rectangle.\"\r\r\t^CornerCursor! !\r\r!Cursor class methodsFor: 'constants'!\rcrossHair\r\t\"Answer the instance of me that is the shape of a cross.\"\r\r\t^CrossHairCursor! !\r\r!Cursor class methodsFor: 'constants'!\rdown\r\t\"Answer the instance of me that is the shape of an arrow facing \r\tdownward.\"\r\r\t^DownCursor! !\r\r!Cursor class methodsFor: 'constants'!\rexecute\r\t\"Answer the instance of me that is the shape of an arrow slanted left \r\twith a star next to it.\"\r\r\t^XeqCursor! !\r\r!Cursor class methodsFor: 'constants'!\rmenu \r\t\"Answer the instance of me that is the shape of a menu.\"\r\r\t^MenuCursor! !\r\r!Cursor class methodsFor: 'constants'!\rmove\r\t\"Answer the instance of me that is the shape of a cross inside a square.\"\r\r\t^MoveCursor! !\r\r!Cursor class methodsFor: 'constants'!\rnormal\r\t\"Answer the instance of me that is the shape of an arrow slanted left.\"\r\r\t^NormalCursor! !\r\r!Cursor class methodsFor: 'constants'!\rorigin\r\t\"Answer the instance of me that is the shape of the top left corner of a \r\trectangle.\"\r\r\t^OriginCursor! !\r\r!Cursor class methodsFor: 'constants'!\rread\r\t\"Answer the instance of me that is the shape of eyeglasses.\"\r\r\t^ReadCursor! !\r\r!Cursor class methodsFor: 'constants'!\rrightArrow \r\t\"Answer the instance of me that is the shape of an arrow pointing to the right.\"\r\r\t^RightArrowCursor! !\r\r!Cursor class methodsFor: 'constants' stamp: 'JMM 10/21/2003 19:01'!\rtopLeft\r\t\"Cursor topLeft showWhile: [Sensor waitButton]\"\r\t^ TopLeftCursor! !\r\r!Cursor class methodsFor: 'constants' stamp: 'JMM 10/21/2003 19:02'!\rtopRight\r\t\"Cursor topRight showWhile: [Sensor waitButton]\"\r\t^ TopRightCursor! !\r\r!Cursor class methodsFor: 'constants'!\rup\r\t\"Answer the instance of me that is the shape of an arrow facing upward.\"\r\r\t^UpCursor! !\r\r!Cursor class methodsFor: 'constants' stamp: 'sw 8/15/97 13:28'!\rwait\r\t\"Answer the instance of me that is the shape of an Hourglass (was in the \r\tshape of three small balls).\"\r\r\t^WaitCursor! !\r\r!Cursor class methodsFor: 'constants'!\rwrite\r\t\"Answer the instance of me that is the shape of a pen writing.\"\r\r\t^WriteCursor! !\rCursor subclass: #CursorWithMask\r\tinstanceVariableNames: 'maskForm'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Graphics-Display Objects'!\r!CursorWithMask commentStamp: '<historical>' prior: 0!\rA Cursor which additionally has a 16x16 transparency bitmap called a \"mask\".  See the comment of beCursorWithMask: for details on how the mask is treated.!\r]style[(97 17 40)f3,f3LCursor beCursorWithMask:;,f3!\r\r\r!CursorWithMask methodsFor: 'mask' stamp: 'bf 2/2/1999 19:34'!\rhasMask\r\t^true! !\r\r!CursorWithMask methodsFor: 'mask' stamp: 'di 10/8/1998 16:46'!\rsetMaskForm: aForm\r\tmaskForm _ aForm! !\r\r!CursorWithMask methodsFor: 'mask' stamp: 'bf 2/2/1999 19:30'!\rstoreOn: aStream base: anInteger\r\r\taStream nextPut: $(.\r\tsuper storeOn: aStream base: anInteger.\r\taStream nextPutAll: ' setMaskForm: '.\r\tmaskForm storeOn: aStream base: anInteger.\r\taStream nextPut: $)! !\r\r!CursorWithMask methodsFor: 'mask' stamp: 'bf 2/2/1999 19:31'!\rwithMask\r\t^self! !\r\r\r!CursorWithMask methodsFor: 'primitives' stamp: 'di 10/6/1998 15:16'!\rbeCursor\r\tmaskForm unhibernate.\r\t^ self beCursorWithMask: maskForm! !\r\r\r!CursorWithMask methodsFor: 'converting' stamp: 'RAA 8/14/2000 10:14'!\rasCursorForm\r\t| form |\r\tform _ StaticForm extent: self extent depth: 8.\r\tform fillShape: maskForm fillColor: Color white.\r\tform fillShape: self fillColor: Color black at: offset negated.\r\t^ form offset: offset! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rCursorWithMask class\r\tinstanceVariableNames: ''!\r\r!CursorWithMask class methodsFor: 'as yet unclassified' stamp: 'di 2/18/1999 08:56'!\rderivedFrom: aForm      \"Cursor initNormalWithMask.  Cursor normal show\"\r\t\"aForm is presumably a cursor\"\r\t| cursor mask ext |\r\text _ aForm extent.\r\tcursor _ self extent: ext.\r\tcursor copy: (1@1 extent: ext) from: 0@0 in: aForm rule: Form over.\r\tmask _ Form extent: ext.\r\t(1@1) eightNeighbors do:\r\t\t[:p | mask copy: (p extent: ext) from: 0@0 in: aForm rule: Form under].\r\tcursor setMaskForm: mask.\r\tcursor offset: ((aForm offset - (1@1)) max: ext negated).\r\t^ cursor! !\rPath subclass: #CurveFitter\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Paths'!\r!CurveFitter commentStamp: '<historical>' prior: 0!\rI represent a conic section determined by three points p1, p2 and p3. I interpolate p1 and p3 and am tangent to line p1, p2 at p1 and line p3, p2 at p3.!\r\r\r!CurveFitter methodsFor: 'displaying'!\rdisplayOn: aDisplayMedium at: aPoint clippingBox: clipRect rule: anInteger fillColor: aForm\r\r\t| pa pb k s p1 p2 p3 line |\r\tline _ Line new.\r\tline form: self form.\r\tcollectionOfPoints size < 3 ifTrue: [self error: 'Curve must have three points'].\r\tp1 _ self firstPoint.\r\tp2 _ self secondPoint.\r\tp3 _ self thirdPoint.\r\ts _ Path new.\r\ts add: p1.\r\tpa _ p2 - p1.\r\tpb _ p3 - p2.\r\tk _ 5 max: pa x abs + pa y abs + pb x abs + pb y abs // 20.\r\t\"k is a guess as to how many line segments to use to approximate \r\tthe curve.\"\r\t1 to: k do: \r\t\t[:i | \r\t\ts add: pa * i // k + p1 * (k - i) + (pb * (i - 1) // k + p2 * (i - 1)) // (k - 1)].\r\ts add: p3.\r\t1 to: s size - 1 do: \r\t\t[:i | \r\t\tline beginPoint: (s at: i).\r\t\tline endPoint: (s at: i + 1).\r\t\tline displayOn: aDisplayMedium\r\t\t\tat: aPoint\r\t\t\tclippingBox: clipRect\r\t\t\trule: anInteger\r\t\t\tfillColor: aForm]! !\r\r!CurveFitter methodsFor: 'displaying' stamp: '6/9/97 10:16 di'!\rdisplayOn: aDisplayMedium transformation: aTransformation clippingBox: clipRect rule: anInteger fillColor: aForm\r\r\t| transformedPath newCurveFitter |\r\ttransformedPath _ aTransformation applyTo: self.\r\tnewCurveFitter _ CurveFitter new.\r\tnewCurveFitter firstPoint: transformedPath firstPoint.\r\tnewCurveFitter secondPoint: transformedPath secondPoint.\r\tnewCurveFitter thirdPoint: transformedPath thirdPoint.\r\tnewCurveFitter form: self form.\r\tnewCurveFitter\r\t\tdisplayOn: aDisplayMedium\r\t\tat: 0 @ 0\r\t\tclippingBox: clipRect\r\t\trule: anInteger\r\t\tfillColor: aForm! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rCurveFitter class\r\tinstanceVariableNames: ''!\r\r!CurveFitter class methodsFor: 'instance creation'!\rnew\r\r\t| newSelf | \r\tnewSelf _ super new: 3.\r\tnewSelf add: 0@0.\r\tnewSelf add: 0@0.\r\tnewSelf add: 0@0.\r\t^newSelf! !\r\r\r!CurveFitter class methodsFor: 'examples' stamp: '6/9/97 10:16 di'!\rexample\r\t\"Designate three locations on the screen by clicking any button. The\r\tcurve determined by the points will be displayed with a long black form.\"\r\r\t| aCurveFitter aForm |  \r\taForm _ Form extent: 1@30.\t\t\t\"make a long thin Form for display \"\r\taForm fillBlack.\t\t\t\t\t\t\t\"turn it black\"\r\taCurveFitter _ CurveFitter new.\r\taCurveFitter form: aForm.\t\t\t\t\t\t\"set the form for display\"\r\t\t\t\t\"collect three Points and show them on the dispaly\"\r\taCurveFitter firstPoint: Sensor waitButton. Sensor waitNoButton.\r\taForm displayOn: Display at: aCurveFitter firstPoint.\r\taCurveFitter secondPoint: Sensor waitButton. Sensor waitNoButton.\r\taForm displayOn: Display at: aCurveFitter secondPoint.\r\taCurveFitter thirdPoint: Sensor waitButton. Sensor waitNoButton.\r\taForm displayOn: Display at: aCurveFitter thirdPoint.\r\r\taCurveFitter displayOn: Display\t\t\t\t\t\"display the CurveFitter\"\r\r\t\"CurveFitter example\"! !\rSelectionMenu subclass: #CustomMenu\r\tinstanceVariableNames: 'labels dividers lastDivider title targets arguments'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Menus'!\r!CustomMenu commentStamp: '<historical>' prior: 0!\rI am used to build menus on-the-fly. I maintain lists of menu items, actions (usually symbols to be sent as messages), and menu section dividing lines to which my clients may append new entries and lines by sending me the messages:\r\r\tadd: aString action: anAction\r\taddLine\r\rAfter the menu is constructed, it may be invoked with one of the following messages:\r\r\tstartUp: initialSelection\r\tstartUp\r\rI am a subclass of ActionMenu, so I inherit a number of instance variables. The ones I am particularly concerned with are:\r\r\titems _ an OrderedCollection of strings to appear in the menu\r\tselectors _ an OrderedCollection of Symbols to be used as message selectors\r\tlineArray _ an OrderedCollection of line positions\r\tlastLine _ used to keep track of the last line to avoid making duplicate entries in lineArray!\r\r\r!CustomMenu methodsFor: 'initialize-release' stamp: 'sumim 2/10/2002 01:26'!\rinitialize\r\r\tlabels _ OrderedCollection new.\r\tselections _ OrderedCollection new.\r\tdividers _ OrderedCollection new.\r\tlastDivider _ 0.\r\ttargets _ OrderedCollection new.\r\targuments _ OrderedCollection new\t! !\r\r!CustomMenu methodsFor: 'initialize-release' stamp: 'sw 8/18/1998 12:01'!\rtitle: aTitle\r\ttitle _ aTitle! !\r\r\r!CustomMenu methodsFor: 'construction' stamp: 'dhhi 9/14/2000 22:39'!\radd: aString action: actionItem\r\t\"Add the given string as the next menu item. If it is selected, the given action (usually but not necessarily a symbol) will be returned to the client.\"\r\r\t| s |\r\taString ifNil: [^ self addLine].\r\ts _ String new: aString size + 2.\r\ts at: 1 put: Character space.\r\ts replaceFrom: 2 to: s size - 1 with: aString.\r\ts at: s size put: Character space.\r\tlabels addLast: s.\r\tselections addLast: actionItem.! !\r\r!CustomMenu methodsFor: 'construction'!\raddLine\r\t\"Append a line to the menu after the last entry. Suppress duplicate lines.\"\r\r\t(lastDivider ~= selections size) ifTrue: [\r\t\tlastDivider _ selections size.\r\t\tdividers addLast: lastDivider].! !\r\r!CustomMenu methodsFor: 'construction' stamp: 'sw 2/27/2001 07:52'!\raddList: listOfTuplesAndDashes\r\t\"Add a menu item to the receiver for each tuple in the given list of the form (<what to show> <selector>). Add a line for each dash (-) in the list.  The tuples may have an optional third element, providing balloon help for the item, but such an element is ignored in mvc.\"\r\r\tlistOfTuplesAndDashes do: [:aTuple |\r\t\taTuple == #-\r\t\t\tifTrue: [self addLine]\r\t\t\tifFalse: [self add: aTuple first action: aTuple second]]\r\r\t\"CustomMenu new addList: #(\r\t\t('apples' buyApples)\r\t\t('oranges' buyOranges)\r\t\t-\r\t\t('milk' buyMilk)); startUp\"\r\r! !\r\r!CustomMenu methodsFor: 'construction' stamp: 'sw 8/12/2002 17:14'!\raddStayUpItem\r\t\"For compatibility with MenuMorph.  Here it is a no-op\"! !\r\r!CustomMenu methodsFor: 'construction' stamp: 'sw 7/20/1999 18:47'!\rballoonTextForLastItem: aString\r\t\"Vacuous backstop provided for compatibility with MorphicMenu\"! !\r\r!CustomMenu methodsFor: 'construction' stamp: 'jm\r 8/20/1998 08:34'!\rlabels: aString font: aFont lines: anArrayOrNil\r\t\"This method allows the receiver to accept old-style SelectionMenu creation messages. It should be used only for backward compatibility during the MVC-to-Morphic transition. New code should be written using the other menu construction protocol such as addList:.\"\r\r\t| labelList linesArray |\r\tlabelList _ (aString findTokens: String cr) asArray.\r\tanArrayOrNil\r\t\tifNil: [linesArray _ #()]\r\t\tifNotNil: [linesArray _ anArrayOrNil].\r\t1 to: labelList size do: [:i |\r\t\tself add: (labelList at: i) action: (labelList at: i).\r\t\t(linesArray includes: i) ifTrue: [self addLine]].\r\tfont ifNotNil: [font _ aFont].\r! !\r\r!CustomMenu methodsFor: 'construction' stamp: 'di 8/20/1998 09:24'!\rlabels: labelList lines: linesArray selections: selectionsArray\r\t\"This method allows the receiver to accept old-style SelectionMenu creation messages. It should be used only for backward compatibility during the MVC-to-Morphic transition. New code should be written using the other menu construction protocol such as addList:.\"\r\t\"Labels can be either a sting with embedded crs, or a collection of strings.\"\r\r\t| labelArray |\r\t(labelList isMemberOf: String)\r\t\tifTrue: [labelArray _ labelList findTokens: String cr]\r\t\tifFalse: [labelArray _ labelList].\r\t1 to: labelArray size do: [:i |\r\t\tself add: (labelArray at: i) action: (selectionsArray at: i).\r\t\t(linesArray includes: i) ifTrue: [self addLine]].\r! !\r\r\r!CustomMenu methodsFor: 'invocation' stamp: 'sw 2/17/2002 04:48'!\rinvokeOn: targetObject\r\t\"Pop up this menu and return the result of sending to the target object the selector corresponding to the menu item selected by the user. Return nil if no item is selected.  If the chosen selector has arguments, obtain them from my arguments\"\r\r\t^ self invokeOn: targetObject orSendTo: nil! !\r\r!CustomMenu methodsFor: 'invocation' stamp: 'sw 11/16/2002 23:45'!\rinvokeOn: targetObject orSendTo: anObject\r\t\"Pop up this menu and return the result of sending to the target object the selector corresponding to the menu item selected by the user. Return  nil if no item is selected.  If the chosen selector has arguments, obtain appropriately.  If the recipient does not respond to the resulting message, send it to the alternate object provided\"\r\r\t| aSelector anIndex recipient |\r\t^ (aSelector _ self startUp) ifNotNil:\r\t\t[anIndex _ self selection.\r\t\trecipient _ ((targets _ self targets) isEmptyOrNil or: [anIndex > targets size])\r\t\t\tifTrue:\r\t\t\t\t[targetObject]\r\t\t\tifFalse:\r\t\t\t\t[targets at: anIndex].\r\t\taSelector numArgs == 0\r\t\t\tifTrue:\r\t\t\t\t[recipient perform: aSelector orSendTo: anObject]\r\t\t\tifFalse:\r\t\t\t\t[recipient perform: aSelector withArguments: (self arguments at: anIndex)]]! !\r\r!CustomMenu methodsFor: 'invocation'!\rstartUp\r\t\"Build and invoke this menu with no initial selection. Answer the selection associated with the menu item chosen by the user or nil if none is chosen.\"\r\r\t^ self startUp: nil! !\r\r!CustomMenu methodsFor: 'invocation' stamp: 'sw 8/18/1998 12:01'!\rstartUp: initialSelection\r\t\"Build and invoke this menu with the given initial selection. Answer the selection associated with the menu item chosen by the user or nil if none is chosen.\"\r\r\t^ self startUp: initialSelection withCaption: title! !\r\r!CustomMenu methodsFor: 'invocation'!\rstartUp: initialSelection withCaption: caption\r\t\"Build and invoke this menu with the given initial selection and caption. Answer the selection associated with the menu item chosen by the user or nil if none is chosen.\"\r\r\tself build.\r\t(initialSelection notNil) ifTrue: [self preSelect: initialSelection].\r\t^ super startUpWithCaption: caption! !\r\r!CustomMenu methodsFor: 'invocation' stamp: 'sw 7/31/97 19:31'!\rstartUpWithCaption: caption\r\t\"Build and invoke this menu with no initial selection. Answer the selection associated with the menu item chosen by the user or nil if none is chosen; use the provided caption\"\r\r\t^ self startUp: nil withCaption: caption! !\r\r\r!CustomMenu methodsFor: 'compatibility' stamp: 'ads 2/20/2003 08:59'!\radd: aString subMenu: aMenu target: target selector: aSymbol argumentList: argList\r\t\"Create a sub-menu with the given label. This isn't really a sub-menu the way Morphic does it; it'll just pop up another menu.\"\r\r\tself\r\t\tadd: aString\r\t\ttarget: aMenu\r\t\tselector: #invokeOn:\r\t\targumentList: argList asArray.! !\r\r!CustomMenu methodsFor: 'compatibility' stamp: 'sumim 2/10/2002 01:23'!\radd: aString target: target selector: aSymbol argument: arg\r\t\"Append a menu item with the given label. If the item is selected, it will send the given selector to the target object with the given argument.\"\r\r\tself add: aString\r\t\ttarget: target\r\t\tselector: aSymbol\r\t\targumentList: (Array with: arg)! !\r\r!CustomMenu methodsFor: 'compatibility' stamp: 'sumim 2/10/2002 01:18'!\radd: aString target: target selector: aSymbol argumentList: argList\r\t\"Append a menu item with the given label. If the item is selected, it will send the given selector to the target object with the given arguments. If the selector takes one more argument than the number of arguments in the given list, then the triggering event is supplied as as the last argument.\"\r\r\tself add: aString action: aSymbol.\r\ttargets addLast: target.\r\targuments addLast: argList asArray\r! !\r\r!CustomMenu methodsFor: 'compatibility' stamp: 'nk 2/15/2004 16:19'!\raddService: aService for: serviceUser\r\t\"Append a menu item with the given service. If the item is selected, it will perform the given service.\"\r\r\taService addServiceFor: serviceUser toMenu: self.! !\r\r!CustomMenu methodsFor: 'compatibility' stamp: 'nk 2/15/2004 16:02'!\raddServices2: services for: served extraLines: linesArray\r\r\tservices withIndexDo: [:service :i |\r\t\tservice addServiceFor: served toMenu: self.\r\t\t(linesArray includes: i)  ifTrue: [self addLine] ]! !\r\r!CustomMenu methodsFor: 'compatibility' stamp: 'sumim 2/10/2002 01:20'!\raddServices: services for: served extraLines: linesArray\r\r\tservices withIndexDo: [:service :i |\r\t\tself addService: service for: served.\r\t\t(linesArray includes: i) | service useLineAfter \r\t\t\tifTrue: [self addLine]]! !\r\r\r!CustomMenu methodsFor: 'private' stamp: 'sw 12/10/1999 11:21'!\rbuild\r\t\"Turn myself into an invokable ActionMenu.\"\r\r\t| stream |\r\tstream _ WriteStream on: (String new).\r\tlabels do: [:label | stream nextPutAll: label; cr].\r\t(labels isEmpty) ifFalse: [stream skip: -1].  \"remove final cr\"\r\tsuper labels: stream contents\r\t\tfont: MenuStyle defaultFont\r\t\tlines: dividers! !\r\r!CustomMenu methodsFor: 'private' stamp: 'di 4/14/1999 21:28'!\rpreSelect: action\r\t\"Pre-select and highlight the menu item associated with the given action.\"\r\r\t| i |\r\ti _ selections indexOf: action ifAbsent: [^ self].\r\tmarker ifNil: [self computeForm].\r\tmarker _ marker\r\t\talign: marker topLeft\r\t\twith: (marker left)@(frame inside top + (marker height * (i - 1))).\r\tselection _ i.! !\r\r\r!CustomMenu methodsFor: 'accessing' stamp: 'ssa 6/20/2008 14:29'!\rarguments\r\r\targuments isNil ifTrue:[arguments := OrderedCollection new].\r\t^arguments! !\r\r!CustomMenu methodsFor: 'accessing' stamp: 'ssa 6/20/2008 14:29'!\rselections\r\r\tselections isNil ifTrue:[selections := OrderedCollection new].\r\t^selections! !\r\r!CustomMenu methodsFor: 'accessing' stamp: 'ssa 6/20/2008 14:29'!\rtargets\r\r\ttargets isNil ifTrue:[targets := OrderedCollection new].\r\t^targets! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rCustomMenu class\r\tinstanceVariableNames: ''!\r\r!CustomMenu class methodsFor: 'example' stamp: 'sw 11/8/1999 17:27'!\rexample\r\t\"CustomMenu example\"\r\r\t| menu |\r\tmenu _ CustomMenu new.\r\tmenu add: 'apples' action: #apples.\r\tmenu add: 'oranges' action: #oranges.\r\tmenu addLine.\r\tmenu addLine.  \"extra lines ignored\"\r\tmenu add: 'peaches' action: #peaches.\r\tmenu addLine.\r\tmenu add: 'pears' action: #pears.\r\tmenu addLine.\r\t^ menu startUp: #apples\r\r\r\"NB:  The following is equivalent to the above, but uses the compact #fromArray: consruct:\r\t(CustomMenu fromArray:\r\t\t#(\t('apples'\t\tapples)\r\t\t\t('oranges'\t\toranges)\r\t\t\t-\r\t\t\t-\r\t\t\t('peaches'\t\tpeaches)\r\t\t\t-\r\t\t\t('pears'\t\t\tpears)\r\t\t\t-))\r\t\t\t\tstartUp: #apples\"! !\rTimespan subclass: #Date\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: 'ChronologyConstants'\r\tcategory: 'Kernel-Chronology'!\r!Date commentStamp: '<historical>' prior: 0!\rInstances of Date are Timespans with duration of 1 day.\rTheir default creation assumes a start of midnight in the local time zone.!\r\r\r!Date methodsFor: 'printing' stamp: 'brp 7/27/2003 16:07'!\rmmddyyyy\r\n\t\"Answer the receiver rendered in standard U.S.A format mm/dd/yyyy.\r\tNote that the name here is slightly misleading -- the month and day numbers don't show leading zeros, \r\tso that for example February 1 1996 is 2/1/96\"\r\n\n\r\n\t^ self printFormat: #(2 1 3 $/ 1 1)! !\r\r!Date methodsFor: 'printing' stamp: 'brp 7/27/2003 16:06'!\rprintFormat: formatArray \r\n\t\"Answer a String describing the receiver using the argument formatArray.\"\r\n\r\n\t| aStream |\r\n\taStream _ WriteStream on: (String new: 16).\r\n\tself printOn: aStream format: formatArray.\r\n\t^ aStream contents! !\r\r!Date methodsFor: 'printing' stamp: 'BP 3/23/2001 12:27'!\rprintOn: aStream\r\n\r\n\tself printOn: aStream format: #(1 2 3 $  3 1 )! !\r\r!Date methodsFor: 'printing' stamp: 'brp 7/27/2003 16:05'!\rprintOn: aStream format: formatArray \r\t\"Print a description of the receiver on aStream using the format \r\tdenoted the argument, formatArray: \r\t\n\t\t#(item item item sep monthfmt yearfmt twoDigits) \r\t\n\t\titems: 1=day 2=month 3=year will appear in the order given, \r\t\n\t\tseparated by sep which is eaither an ascii code or character. \r\t\n\t\tmonthFmt: 1=09 2=Sep 3=September \r\t\n\t\tyearFmt: 1=1996 2=96 \r\t\n\t\tdigits: (missing or)1=9 2=09. \r\t\n\tSee the examples in printOn: and mmddyy\"\r\t| gregorian twoDigits element monthFormat |\r\tgregorian _ self dayMonthYearDo: [ :d :m :y | {d. m. y} ].\r\ttwoDigits _ formatArray size > 6 and: [(formatArray at: 7) > 1].\r\t1 to: 3 do: \r\t\t[ :i | \r\t\t\telement := formatArray at: i.\r\t\t\telement = 1\r\t\t\t\tifTrue: [twoDigits\r\t\t\t\t\t\tifTrue: [aStream\r\t\t\t\t\t\t\t\tnextPutAll: (gregorian first asString\r\t\t\t\t\t\t\t\t\t\tpadded: #left\r\t\t\t\t\t\t\t\t\t\tto: 2\r\t\t\t\t\t\t\t\t\t\twith: $0)]\r\t\t\t\t\t\tifFalse: [gregorian first printOn: aStream]].\r\t\t\telement = 2\r\t\t\t\tifTrue: [monthFormat := formatArray at: 5.\r\t\t\t\t\tmonthFormat = 1\r\t\t\t\t\t\tifTrue: [twoDigits\r\t\t\t\t\t\t\t\tifTrue: [aStream\r\t\t\t\t\t\t\t\t\t\tnextPutAll: (gregorian middle asString\r\t\t\t\t\t\t\t\t\t\t\t\tpadded: #left\r\t\t\t\t\t\t\t\t\t\t\t\tto: 2\r\t\t\t\t\t\t\t\t\t\t\t\twith: $0)]\r\t\t\t\t\t\t\t\tifFalse: [gregorian middle printOn: aStream]].\r\t\t\t\t\tmonthFormat = 2\r\t\t\t\t\t\tifTrue: [aStream\r\t\t\t\t\t\t\t\tnextPutAll: ((Month nameOfMonth: gregorian middle)\r\t\t\t\t\t\t\t\t\t\tcopyFrom: 1\r\t\t\t\t\t\t\t\t\t\tto: 3)].\r\t\t\t\t\tmonthFormat = 3\r\t\t\t\t\t\tifTrue: [aStream\r\t\t\t\t\t\t\t\tnextPutAll: (Month nameOfMonth: gregorian middle)]].\r\t\t\telement = 3\r\t\t\t\tifTrue: [(formatArray at: 6)\r\t\t\t\t\t\t\t= 1\r\t\t\t\t\t\tifTrue: [gregorian last printOn: aStream]\r\t\t\t\t\t\tifFalse: [aStream\r\t\t\t\t\t\t\t\tnextPutAll: ((gregorian last \\\\ 100) asString\r\t\t\t\t\t\t\t\t\t\tpadded: #left\r\t\t\t\t\t\t\t\t\t\tto: 2\r\t\t\t\t\t\t\t\t\t\twith: $0)]].\r\t\t\ti < 3\r\t\t\t\tifTrue: [(formatArray at: 4)\r\t\t\t\t\t\t\t~= 0\r\t\t\t\t\t\tifTrue: [aStream nextPut: (formatArray at: 4) asCharacter]]]\r! !\r\r!Date methodsFor: 'printing' stamp: 'BP 3/23/2001 12:27'!\rstoreOn: aStream\r\n\r\n\taStream print: self printString; nextPutAll: ' asDate'! !\r\r\r!Date methodsFor: 'smalltalk-80' stamp: 'brp 8/23/2003 22:09'!\raddDays: dayCount \r\r\t^ (self asDateAndTime + (dayCount days)) asDate! !\r\r!Date methodsFor: 'smalltalk-80' stamp: 'brp 7/27/2003 16:08'!\rasSeconds\r\n\t\"Answer the seconds since the Squeak epoch: 1 January 1901\"\r\n\r\n\t^ start asSeconds! !\r\r!Date methodsFor: 'smalltalk-80' stamp: 'brp 7/27/2003 16:08'!\rleap\r\t\"Answer whether the receiver's year is a leap year.\"\r\r\t^ start isLeapYear ifTrue: [1] ifFalse: [0].! !\r\r!Date methodsFor: 'smalltalk-80' stamp: 'brp 1/16/2004 14:30'!\rprevious: dayName \r\t\"Answer the previous date whose weekday name is dayName.\"\r\r\t| days |\r\tdays _ 7 + self weekdayIndex - (self class dayOfWeek: dayName) \\\\ 7.\r\tdays = 0 ifTrue: [ days _ 7 ].\r\t^ self subtractDays: days\r! !\r\r!Date methodsFor: 'smalltalk-80' stamp: 'brp 7/27/2003 16:09'!\rsubtractDate: aDate \r\t\"Answer the number of days between self and aDate\"\r\r\t^ (self start - aDate asDateAndTime) days! !\r\r!Date methodsFor: 'smalltalk-80' stamp: 'brp 8/23/2003 22:05'!\rsubtractDays: dayCount \r\r\t^ (self asDateAndTime - (dayCount days)) asDate! !\r\r!Date methodsFor: 'smalltalk-80' stamp: 'brp 8/24/2003 12:04'!\rweekday\r\t\"Answer the name of the day of the week on which the receiver falls.\"\r\r\t^ self dayOfWeekName! !\r\r!Date methodsFor: 'smalltalk-80' stamp: 'brp 8/24/2003 12:04'!\rweekdayIndex\r\t\"Sunday=1, ... , Saturday=7\"\r\r\t^ self dayOfWeek! !\r\r\r!Date methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 16:10'!\rasDate\r\n\r\n\t^ self! !\r\r!Date methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 16:10'!\rdayMonthYearDo: aBlock \r\t\"Supply integers for day, month and year to aBlock and return the result\"\r\r\t^ start dayMonthYearDo: aBlock! !\r\r!Date methodsFor: 'squeak protocol' stamp: 'avi 2/21/2004 18:12'!\rmonth\r\t^ self asMonth! !\r\r!Date methodsFor: 'squeak protocol' stamp: 'avi 2/29/2004 13:10'!\rmonthIndex\r\t^ super month! !\r\r\r!Date methodsFor: 'deprecated' stamp: 'brp 8/5/2003 18:36'!\rday: dayInteger year: yearInteger\r\r\t^ self\r\t\tdeprecated: 'Obsolete'\r! !\r\r!Date methodsFor: 'deprecated' stamp: 'brp 8/5/2003 18:37'!\rfirstDayOfMonthIndex: monthIndex \r\r\t^ self\r\t\tdeprecated: 'Obsolete'\r! !\r\r!Date methodsFor: 'deprecated' stamp: 'brp 8/5/2003 18:41'!\rjulianDayNumber: anInteger\r\t\"Set the number of days elapsed since midnight GMT on January 1st, 4713 B.C.\"\r\r\tself deprecated: 'Obsolete'.\r\r! !\r\r!Date methodsFor: 'deprecated' stamp: 'brp 8/5/2003 18:34'!\rmmddyy\r\t\"Please use mmddyyyy instead, so dates in 2000 will be unambiguous\"\r\r\t^ self \r\t\tdeprecated: 'Use #mmddyyyy';\r\t\tprintFormat: #(2 1 3 $/ 1 2)\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rDate class\r\tinstanceVariableNames: ''!\r\r!Date class methodsFor: 'smalltalk-80' stamp: 'brp 8/24/2003 00:00'!\rdateAndTimeNow\r\n\t\"Answer an Array whose with Date today and Time now.\"\r\n\r\n\t^ Time dateAndTimeNow! !\r\r!Date class methodsFor: 'smalltalk-80' stamp: 'brp 7/1/2003 13:35'!\rdayOfWeek: dayName \r\r\t^ Week indexOfDay: dayName! !\r\r!Date class methodsFor: 'smalltalk-80' stamp: 'brp 7/1/2003 13:59'!\rdaysInMonth: monthName forYear: yearInteger \r\r\t^ Month daysInMonth: monthName forYear: yearInteger.\r! !\r\r!Date class methodsFor: 'smalltalk-80' stamp: 'brp 7/1/2003 13:53'!\rdaysInYear: yearInteger \r\r\t^ Year daysInYear: yearInteger.! !\r\r!Date class methodsFor: 'smalltalk-80' stamp: 'brp 1/16/2004 14:35'!\rfirstWeekdayOfMonth: month year: year\r\t\"Answer the weekday index of the first day in <month> in the <year>.\"\r\r\t^ (self newDay: 1 month: month year: year) weekdayIndex\r! !\r\r!Date class methodsFor: 'smalltalk-80' stamp: 'brp 7/27/2003 16:01'!\rfromDays: dayCount \r\t\"Days since 1 January 1901\"\r\r\t^ self julianDayNumber: dayCount + SqueakEpoch! !\r\r!Date class methodsFor: 'smalltalk-80' stamp: 'brp 7/27/2003 16:02'!\rfromSeconds: seconds\r\n\t\"Answer an instance of me which is 'seconds' seconds after January 1, 1901.\"\r\n\r\n\t^ self fromDays: ((Duration seconds: seconds) days)! !\r\r!Date class methodsFor: 'smalltalk-80' stamp: 'brp 7/1/2003 13:39'!\rindexOfMonth: aMonthName \r\r\t^ Month indexOfMonth: aMonthName.\r! !\r\r!Date class methodsFor: 'smalltalk-80' stamp: 'brp 7/1/2003 13:56'!\rleapYear: yearInteger \r\r\t^ Year leapYear: yearInteger! !\r\r!Date class methodsFor: 'smalltalk-80' stamp: 'brp 7/1/2003 13:37'!\rnameOfDay: dayIndex \r\r\t^ Week nameOfDay: dayIndex ! !\r\r!Date class methodsFor: 'smalltalk-80' stamp: 'brp 7/1/2003 13:40'!\rnameOfMonth: anIndex \r\r\t^ Month nameOfMonth: anIndex.\r! !\r\r!Date class methodsFor: 'smalltalk-80' stamp: 'brp 7/27/2003 16:02'!\rnewDay: day month: month year: year \r\n\r\n\t^ self year: year month: month day: day! !\r\r!Date class methodsFor: 'smalltalk-80' stamp: 'brp 7/27/2003 16:01'!\rnewDay: dayCount year: yearInteger\r\r\t^ self year: yearInteger day: dayCount! !\r\r!Date class methodsFor: 'smalltalk-80' stamp: 'brp 7/27/2003 16:01'!\rtoday\r\n\r\n\t^ self current! !\r\r\r!Date class methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 16:03'!\rfromString: aString\r\n\t\"Answer an instance of created from a string with format dd.mm.yyyy.\"\r\n\r\n\t^ self readFrom: aString readStream.\r\n! !\r\r!Date class methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 18:25'!\rjulianDayNumber: aJulianDayNumber\r\r\t^ self starting: (DateAndTime julianDayNumber: aJulianDayNumber)! !\r\r!Date class methodsFor: 'squeak protocol' stamp: 'brp 7/1/2003 09:21'!\rreadFrom: aStream \r\t\"Read a Date from the stream in any of the forms:  \r\t\n\t\t<day> <monthName> <year>\t\t(5 April 1982; 5-APR-82)  \r\t\n\t\t<monthName> <day> <year>\t\t(April 5, 1982)  \r\t\n\t\t<monthNumber> <day> <year>\t\t(4/5/82) \r\t\t\t<day><monthName><year>\t\t\t(5APR82)\"\r\t| day month year |\r\taStream peek isDigit\r\t\tifTrue: [day := Integer readFrom: aStream].\r\t[aStream peek isAlphaNumeric]\r\t\twhileFalse: [aStream skip: 1].\r\taStream peek isLetter\r\t\tifTrue: [\"number/name... or name...\"\r\t\t\tmonth := WriteStream\r\t\t\t\t\t\ton: (String new: 10).\r\t\t\t[aStream peek isLetter]\r\t\t\t\twhileTrue: [month nextPut: aStream next].\r\t\t\tmonth := month contents.\r\t\t\tday isNil\r\t\t\t\tifTrue: [\"name/number...\"\r\t\t\t\t\t[aStream peek isAlphaNumeric]\r\t\t\t\t\t\twhileFalse: [aStream skip: 1].\r\t\t\t\t\tday := Integer readFrom: aStream]]\r\t\tifFalse: [\"number/number...\"\r\t\t\tmonth := Month nameOfMonth: day.\r\t\t\tday := Integer readFrom: aStream].\r\t[aStream peek isAlphaNumeric]\r\t\twhileFalse: [aStream skip: 1].\r\tyear := Integer readFrom: aStream.\r\tyear < 10 ifTrue: [year := 2000 + year] \r\t\tifFalse: [ year < 1900 ifTrue: [ year := 1900 + year]].\r\r\t^ self\r\t\tyear: year\r\t\tmonth: month\r\t\tday: day! !\r\r!Date class methodsFor: 'squeak protocol' stamp: 'BP 3/23/2001 12:36'!\rstarting: aDateAndTime\r\n\r\n\t^super starting: (aDateAndTime midnight) duration: (Duration days: 1)\r\n! !\r\r!Date class methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 22:03'!\ryear: year day: dayOfYear\r\r\t^ self starting: (DateAndTime year: year day: dayOfYear)\r! !\r\r!Date class methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 22:02'!\ryear: year month: month day: day\r\n\r\n\t^ self starting: (DateAndTime year: year month: month day: day)\r\n! !\rMagnitude subclass: #DateAndTime\r\tinstanceVariableNames: 'seconds offset jdn nanos'\r\tclassVariableNames: 'LocalTimeZone'\r\tpoolDictionaries: 'ChronologyConstants'\r\tcategory: 'Kernel-Chronology'!\r!DateAndTime commentStamp: 'brp 5/13/2003 08:07' prior: 0!\rI represent a point in UTC time as defined by ISO 8601. I have zero duration.\r\n\r\n\r\nMy implementation uses three SmallIntegers\r\n and a Duration:\r\njdn\t\t- julian day number.\r\nseconds\t- number of seconds since midnight.\r\nnanos\t- the number of nanoseconds since the second.\r\n\r\noffset\t- duration from UTC.\r\n\r\nThe nanosecond attribute is almost always zero but it defined for full ISO compliance and is suitable for timestamping.\r\n!\r\r\r!DateAndTime methodsFor: 'ansi protocol' stamp: 'brp 7/9/2005 08:45'!\r+ operand\r\n\t\"operand conforms to protocol Duration\"\r\r\n\t| ticks |\r \tticks _ self ticks + (operand asDuration ticks) .\r\r\n\t^ self class basicNew\r\n\t\tticks: ticks\r\n\t\toffset: self offset; \r\n\t\tyourself.\r\n! !\r\r!DateAndTime methodsFor: 'ansi protocol' stamp: 'brp 1/9/2004 05:39'!\r- operand\r\n\t\"operand conforms to protocol DateAndTime or protocol Duration\"\r\n\r\n\t^ (operand respondsTo: #asDateAndTime)\r\n\t\tifTrue: \r\n\t\t\t[ | lticks rticks |\r\n\t\t\tlticks _ self asLocal ticks.\r\t\n\t\trticks _ operand asDateAndTime asLocal ticks.\r\n\t\t\tDuration\r\n \t\t\t\tseconds: (SecondsInDay *(lticks first - rticks first)) + \r\n\t\t\t\t\t\t\t(lticks second - rticks second)\r\n \t\t\t\tnanoSeconds: (lticks third - rticks third) ]\r\t\n\tifFalse:\r\n\t\t\n \t[ self + (operand negated) ].\r\n! !\r\r!DateAndTime methodsFor: 'ansi protocol' stamp: 'nk 3/30/2004 09:09'!\r< comparand\r\t\"comparand conforms to protocol DateAndTime,\r\tor can be converted into something that conforms.\"\r\t| lticks rticks comparandAsDateAndTime |\r\tcomparandAsDateAndTime := comparand asDateAndTime.\r\toffset = comparandAsDateAndTime offset\r\t\tifTrue: [lticks := self ticks.\r\t\t\trticks := comparandAsDateAndTime ticks]\r\t\tifFalse: [lticks := self asUTC ticks.\r\t\t\trticks := comparandAsDateAndTime asUTC ticks].\r\t^ lticks first < rticks first\r\t\tor: [lticks first > rticks first\r\t\t\t\tifTrue: [false]\r\t\t\t\tifFalse: [lticks second < rticks second\r\t\t\t\t\t\tor: [lticks second > rticks second\r\t\t\t\t\t\t\t\tifTrue: [false]\r\t\t\t\t\t\t\t\tifFalse: [lticks third < rticks third]]]]\r! !\r\r!DateAndTime methodsFor: 'ansi protocol' stamp: 'nk 3/30/2004 08:49'!\r= comparand\r\t\"comparand conforms to protocol DateAndTime,\r\tor can be converted into something that conforms.\"\r\t| comparandAsDateAndTime |\r\tself == comparand\r\t\tifTrue: [^ true].\r\t[comparandAsDateAndTime := comparand asDateAndTime]\r\t\ton: MessageNotUnderstood\r\t\tdo: [^ false].\r\t^ self offset = comparandAsDateAndTime offset\r\t\tifTrue: [self ticks = comparandAsDateAndTime ticks]\r\t\tifFalse: [self asUTC ticks = comparandAsDateAndTime asUTC ticks]\r! !\r\r!DateAndTime methodsFor: 'ansi protocol' stamp: 'brp 8/23/2003 13:11'!\rasLocal\r\n\t\r\n\r\n\t^ (self offset = self class localOffset)\r\n\r\n\t\tifTrue: [self]\r\n\t\tifFalse: [self utcOffset: self class localOffset]\r\n! !\r\r!DateAndTime methodsFor: 'ansi protocol' stamp: 'brp 8/23/2003 13:12'!\rasUTC\r\n\r\n\r\n\t^ self utcOffset: 0! !\r\r!DateAndTime methodsFor: 'ansi protocol' stamp: 'brp 8/23/2003 21:03'!\rdayOfMonth\r\n\t\"Answer which day of the month is represented by the receiver.\"\r\n\r\n\t^ self\r\n\t\tdayMonthYearDo: [ :d :m :y | d ]! !\r\r!DateAndTime methodsFor: 'ansi protocol' stamp: 'brp 8/24/2003 12:25'!\rdayOfWeek\r\n\r\n\t\"Sunday=1, ... , Saturday=7\"\r\n\r\n\t^ (jdn + 1 rem: 7) + 1! !\r\r!DateAndTime methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 07:28'!\rdayOfWeekName\r\n\r\n\t^ Week nameOfDay: self dayOfWeek\r\n! !\r\r!DateAndTime methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 07:29'!\rdayOfYear\r\n\r\n\r\n\t^ jdn - (Year year: self year) start julianDayNumber + 1\r\n! !\r\r!DateAndTime methodsFor: 'ansi protocol' stamp: 'brp 8/23/2003 15:49'!\rhash\r\n\r\n\t^ self asUTC ticks hash\r\n! !\r\r!DateAndTime methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 07:29'!\rhour\r\n\r\n\t^ self hour24\r\n! !\r\r!DateAndTime methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 07:29'!\rhour24\r\n\r\n\r\n\t^ (Duration seconds: seconds) hours\r\n! !\r\r!DateAndTime methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 07:29'!\risLeapYear\r\n\r\n\r\n\t^ Year isLeapYear: self year.\r\n! !\r\r!DateAndTime methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 07:30'!\rminute\r\n\r\n\r\n\t^ (Duration seconds: seconds) minutes\r\n! !\r\r!DateAndTime methodsFor: 'ansi protocol' stamp: 'brp 8/23/2003 21:05'!\rmonth\r\n\r\n\t^ self \r\n\t\tdayMonthYearDo: [ :d :m :y | m ].! !\r\r!DateAndTime methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 07:30'!\rmonthName\r\n\r\n\r\n\t^ Month nameOfMonth: self month\r\n! !\r\r!DateAndTime methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 07:30'!\roffset\r\n\r\n\t^ offset\r\n! !\r\r!DateAndTime methodsFor: 'ansi protocol' stamp: 'brp 8/23/2003 21:09'!\roffset: anOffset\r\n\r\n\t\"Answer a <DateAndTime> equivalent to the receiver but with its local time \r\n\tbeing offset from UTC by offset.\"\r\n\r\n\t^ self class basicNew \r\n\t\tticks: self ticks offset: anOffset asDuration;\r\n\t\tyourself\r\n\t\t! !\r\r!DateAndTime methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 07:31'!\rsecond\r\n\r\n\r\n\t^ (Duration seconds: seconds) seconds\r\n! !\r\r!DateAndTime methodsFor: 'ansi protocol' stamp: 'brp 8/23/2003 21:05'!\ryear\r\n\t^ self\r\n\t\tdayMonthYearDo: [ :d :m :y | y ]! !\r\r\r!DateAndTime methodsFor: 'squeak protocol' stamp: 'brp 8/23/2003 23:56'!\rasDate\n\r\r\t^ Date starting: self\n! !\r\r!DateAndTime methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 07:46'!\rasDateAndTime\r\n\r\n\t^ self\r\n! !\r\r!DateAndTime methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 07:47'!\rasDuration\r\n\r\n\t\"Answer the duration since midnight\"\r\n\r\n\t^ Duration seconds: seconds nanoSeconds: nanos\r\n! !\r\r!DateAndTime methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 07:47'!\rasMonth\r\n\r\n\t^ Month starting: self\r\n! !\r\r!DateAndTime methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 15:45'!\rasNanoSeconds\r\n\t\"Answer the number of nanoseconds since midnight\"\r\n\r\n\t^ self asDuration asNanoSeconds\r\n! !\r\r!DateAndTime methodsFor: 'squeak protocol' stamp: 'brp 8/24/2003 00:00'!\rasTime\n\r\r\t^ Time seconds: seconds nanoSeconds: nanos! !\r\r!DateAndTime methodsFor: 'squeak protocol' stamp: 'brp 8/24/2003 00:02'!\rasTimeStamp\r\r\t^ self as: TimeStamp! !\r\r!DateAndTime methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 07:47'!\rasYear\r\n\r\n\t^ Year starting: self\r\n! !\r\r!DateAndTime methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 15:47'!\rdayMonthYearDo: aBlock\r\n\t\"Evaluation the block with three arguments: day month, year.\"\r\n\r\n\t| l n i j dd mm yyyy |\r\n\tl := jdn + 68569.\r\n\tn := 4 * l // 146097.\r\n\tl := l - (146097 * n + 3 // 4).\r\n\ti := 4000 * (l + 1) // 1461001.\r\n\tl := l - (1461 * i // 4) + 31.\r\n\tj := 80 * l // 2447.\r\n\tdd := l - (2447 * j // 80).\r\n\tl := j // 11.\r\n\tmm := j + 2 - (12 * l).\r\n\tyyyy := 100 * (n - 49) + i + l.\r\n\r\n\t^ aBlock\r\n\t\tvalue: dd\r\n\t\tvalue: mm\r\n\t\tvalue: yyyy.! !\r\r!DateAndTime methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 07:49'!\rduration\r\n\r\n\t^ Duration zero\r\n! !\r\r!DateAndTime methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 07:49'!\rjulianDayNumber\r\n\r\n\r\n\t^ jdn\r\n! !\r\r!DateAndTime methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 15:48'!\rmidnight\r\n\t\"Answer a DateAndTime starting at midnight local time\"\r\n\r\n\t^ self\r\n\t\tdayMonthYearDo: [ :d :m :y | self class year: y month: m day: d ]! !\r\r!DateAndTime methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 07:50'!\rnanoSecond\r\n\r\n\r\n\t^ nanos\r\n! !\r\r!DateAndTime methodsFor: 'squeak protocol' stamp: 'nk 3/12/2004 10:03'!\rprintHMSOn: aStream\r\t\"Print just hh:mm:ss\"\r\taStream\r\t\tnextPutAll: (self hour asString padded: #left to: 2 with: $0);\r\t\tnextPut: $:;\r\t\tnextPutAll: (self minute asString padded: #left to: 2 with: $0);\r\t\tnextPut: $:;\r\t\tnextPutAll: (self second asString padded: #left to: 2 with: $0).\r! !\r\r!DateAndTime methodsFor: 'squeak protocol' stamp: 'nk 3/12/2004 10:38'!\rprintOn: aStream\r\t\"Print as per ISO 8601 sections 5.3.3 and 5.4.1.\r\tPrints either:\r\t\t'YYYY-MM-DDThh:mm:ss.s+ZZ:zz:z' (for positive years) or '-YYYY-MM-DDThh:mm:ss.s+ZZ:zz:z' (for negative years)\"\r\r\t^self printOn: aStream withLeadingSpace: false\r! !\r\r!DateAndTime methodsFor: 'squeak protocol' stamp: 'nk 3/12/2004 10:37'!\rprintOn: aStream withLeadingSpace: printLeadingSpaceToo\r\t\"Print as per ISO 8601 sections 5.3.3 and 5.4.1.\r\tIf printLeadingSpaceToo is false, prints either:\r\t\t'YYYY-MM-DDThh:mm:ss.s+ZZ:zz:z' (for positive years) or '-YYYY-MM-DDThh:mm:ss.s+ZZ:zz:z' (for negative years)\r\tIf printLeadingSpaceToo is true, prints either:\r\t\t' YYYY-MM-DDThh:mm:ss.s+ZZ:zz:z' (for positive years) or '-YYYY-MM-DDThh:mm:ss.s+ZZ:zz:z' (for negative years)\r\t\"\r\r\tself printYMDOn: aStream withLeadingSpace: printLeadingSpaceToo.\r\taStream nextPut: $T.\r\tself printHMSOn: aStream.\r\tself nanoSecond ~= 0 ifTrue:\r\t\t[ | z ps |\r\t\tps := self nanoSecond printString padded: #left to: 9 with: $0.\r\t\tz := ps findLast: [ :c | c asciiValue > $0 asciiValue ].\r\t\tps from: 1 to: z do: [ :c | aStream nextPut: c ] ].\r\taStream\r\t\tnextPut: (offset positive ifTrue: [$+] ifFalse: [$-]);\r\t\tnextPutAll: (offset hours abs asString padded: #left to: 2 with: $0);\r\t\tnextPut: $:;\r\t\tnextPutAll: (offset minutes abs asString padded: #left to: 2 with: $0).\r\toffset seconds = 0 ifFalse:\r\t\t[ aStream\r\t\t\tnextPut: $:;\r\t\t\tnextPutAll: (offset seconds abs truncated asString) ].\r! !\r\r!DateAndTime methodsFor: 'squeak protocol' stamp: 'nk 3/12/2004 10:29'!\rprintYMDOn: aStream withLeadingSpace: printLeadingSpaceToo\r\t\"Print just the year, month, and day on aStream.\r\r\tIf printLeadingSpaceToo is true, then print as:\r\t\t' YYYY-MM-DD' (if the year is positive) or '-YYYY-MM-DD' (if the year is negative)\r\totherwise print as:\r\t\t'YYYY-MM-DD' or '-YYYY-MM-DD' \"\r\r\t| year month day |\r\tself dayMonthYearDo: [ :d :m :y | year := y. month := m. day := d ].\r\tyear negative\r\t\tifTrue: [ aStream nextPut: $- ]\r\t\tifFalse: [ printLeadingSpaceToo ifTrue: [ aStream space ]].\r\taStream\r\t\tnextPutAll: (year abs asString padded: #left to: 4 with: $0);\r\t\tnextPut: $-;\r\t\tnextPutAll: (month asString padded: #left to: 2 with: $0);\r\t\tnextPut: $-;\r\t\tnextPutAll: (day asString padded: #left to: 2 with: $0)\r! !\r\r!DateAndTime methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 15:50'!\rto: anEnd\r\n\t\"Answer a Timespan. anEnd conforms to protocol DateAndTime or protocol Timespan\"\r\n\r\n\t^ Timespan starting: self ending: (anEnd asDateAndTime).\r\n! !\r\r!DateAndTime methodsFor: 'squeak protocol' stamp: 'brp 9/25/2003 15:57'!\rto: anEnd by: aDuration\r\n\t\"Answer a Timespan. anEnd conforms to protocol DateAndTime or protocol Timespan\"\r\n\r\n\t^ (Schedule starting: self ending: (anEnd asDateAndTime))\r\n\t\tschedule: (Array with: aDuration asDuration);\r\n\t\tyourself.\r\n! !\r\r!DateAndTime methodsFor: 'squeak protocol' stamp: 'brp 9/25/2003 16:01'!\rto: anEnd by: aDuration do: aBlock\r\n\t\"Answer a Timespan. anEnd conforms to protocol DateAndTime or protocol Timespan\"\r\n\r\n\t^ (self to: anEnd by: aDuration) scheduleDo: aBlock\r\n! !\r\r!DateAndTime methodsFor: 'squeak protocol' stamp: 'brp 8/23/2003 20:37'!\rutcOffset: anOffset\r\n\r\n\t\"Answer a <DateAndTime> equivalent to the receiver but offset from UTC by anOffset\"\r\n\r\n\t| equiv |\r\n\tequiv _ self + (anOffset asDuration - self offset).\r\n\t^ equiv ticks: (equiv ticks) offset: anOffset asDuration; yourself\r\n! !\r\r\r!DateAndTime methodsFor: 'smalltalk-80' stamp: 'brp 8/23/2003 21:03'!\rasSeconds\r\n\t\"Return the number of seconds since the Squeak epoch\"\r\n\r\n\t^ (self - (self class epoch)) asSeconds\r\n! !\r\r!DateAndTime methodsFor: 'smalltalk-80' stamp: 'brp 7/1/2003 17:53'!\rday\r\n\r\n\t^ self dayOfYear! !\r\r!DateAndTime methodsFor: 'smalltalk-80' stamp: 'brp 5/13/2003 07:48'!\rdaysInMonth\r\n\t\"Answer the number of days in the month represented by the receiver.\"\r\n\r\n\r\n\t^ self asMonth daysInMonth\r\n! !\r\r!DateAndTime methodsFor: 'smalltalk-80' stamp: 'brp 5/13/2003 07:48'!\rdaysInYear\r\n\r\n\t\"Answer the number of days in the year represented by the receiver.\"\r\n\r\n\t^ self asYear daysInYear\r\n! !\r\r!DateAndTime methodsFor: 'smalltalk-80' stamp: 'brp 7/27/2003 15:44'!\rdaysLeftInYear\r\n\t\"Answer the number of days in the year after the date of the receiver.\"\r\n\r\n\t^ self daysInYear - self dayOfYear\r\n! !\r\r!DateAndTime methodsFor: 'smalltalk-80' stamp: 'brp 7/27/2003 15:44'!\rfirstDayOfMonth\r\n\r\n\t^ self asMonth start day! !\r\r!DateAndTime methodsFor: 'smalltalk-80' stamp: 'brp 7/1/2003 18:30'!\rhours\r\n\r\n\t^ self hour! !\r\r!DateAndTime methodsFor: 'smalltalk-80' stamp: 'brp 1/7/2004 15:45'!\rminutes\r\n\r\n\t^ self minute! !\r\r!DateAndTime methodsFor: 'smalltalk-80' stamp: 'brp 5/13/2003 07:50'!\rmonthIndex\r\n\r\n\r\n\t^ self month\r\n! !\r\r!DateAndTime methodsFor: 'smalltalk-80' stamp: 'brp 7/1/2003 18:31'!\rseconds\r\n\r\n\t^ self second! !\r\r\r!DateAndTime methodsFor: 'private' stamp: 'brp 8/23/2003 15:45'!\rticks\r\n\t\"Private - answer an array with our instance variables. Assumed to be UTC \"\r\n\r\n\t^ Array with: jdn with: seconds with: nanos\r\n.! !\r\r!DateAndTime methodsFor: 'private' stamp: 'nk 3/30/2004 09:38'!\rticks: ticks offset: utcOffset\r\t\"ticks is {julianDayNumber. secondCount. nanoSeconds}\"\r\t| normalize |\r\r\tnormalize := [ :i :base | | tick div quo rem |\r\t\ttick := ticks at: i.\r\t\tdiv := tick digitDiv: base neg: tick negative.\r\t\tquo := div first normalize.\r\t\trem := div second normalize.\r\t\trem < 0 ifTrue: [ quo := quo - 1. rem := base + rem ].\r\t\tticks at: (i-1) put: ((ticks at: i-1) + quo).\r\t\tticks at: i put: rem ].\r\r\tnormalize value: 3 value: NanosInSecond.\r\tnormalize value: 2 value: SecondsInDay.\r\r\tjdn\t_ ticks first.\r\tseconds\t_ ticks second.\r\tnanos := ticks third.\r\toffset := utcOffset.\r\r\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rDateAndTime class\r\tinstanceVariableNames: ''!\r\r!DateAndTime class methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 07:32'!\rclockPrecision\r\n\t\"One nanosecond precision\"\r\n\r\n\t^ Duration nanoSeconds: 1\r\n! !\r\r!DateAndTime class methodsFor: 'ansi protocol' stamp: 'avi 2/21/2004 19:03'!\rnow\r\t^ self basicNew \r\t\tticks: (Duration \r\t\t\t\tdays: SqueakEpoch \r\t\t\t\thours: 0 \r\t\t\t\tminutes: 0 \r\t\t\t\tseconds: self totalSeconds \r\t\t\t\tnanoSeconds: 0) ticks\r\t\toffset: self localOffset;\r\t\tyourself\r! !\r\r!DateAndTime class methodsFor: 'ansi protocol' stamp: 'brp 7/27/2003 15:25'!\ryear: year day: dayOfYear hour: hour minute: minute second: second\r\n\r\n\t^ self\r\n\t\tyear: year\r\n\t\tday: dayOfYear\r\n\t\thour: hour\r\n\t\tminute: minute\r\n\t\tsecond: second\r\n\t\toffset: self localOffset.\r\n! !\r\r!DateAndTime class methodsFor: 'ansi protocol' stamp: 'brp 7/27/2003 15:28'!\ryear: year day: dayOfYear hour: hour minute: minute second: second offset: offset \r\n\t\"Return a DataAndTime\"\r\n\r\n\t| y d |\r\n\ty _ self\r\n\t\tyear: year\r\n\t\tmonth: 1\r\n\t\tday: 1\r\n\t\thour: hour\r\n\t\tminute: minute\r\n\t\tsecond: second\r\n\t\tnanoSecond: 0\r\n\t\toffset: offset.\r\n\r\n\td _ Duration days: (dayOfYear - 1).\r\n\r\n\t^ y + d! !\r\r!DateAndTime class methodsFor: 'ansi protocol' stamp: 'brp 8/23/2003 21:00'!\ryear: year month: month day: day hour: hour minute: minute second: second\r\n\t\"Return a DateAndTime\"\r\n\r\n\t^ self\r\n\t\tyear: year\r\n\t\tmonth: month\r\n\t\tday: day\r\n\t\thour: hour\r\n\t\tminute: minute\r\n\t\tsecond: second\r\n\t\toffset: self localOffset\r\n! !\r\r!DateAndTime class methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 07:36'!\ryear: year month: month day: day hour: hour minute: minute second: second offset: offset\r\n\r\n\t^ self\r\n\t\tyear: year\r\n\t\tmonth: month\r\n\t\tday: day\r\n\t\thour: hour\r\n\t\tminute: minute\r\n\t\tsecond: second\r\n\t\tnanoSecond: 0\r\n\t\toffset: offset\r\n! !\r\r\r!DateAndTime class methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 07:36'!\rcurrent\r\n\r\n\r\n\t^ self now\r\n! !\r\r!DateAndTime class methodsFor: 'squeak protocol' stamp: 'brp 9/25/2003 16:12'!\rdate: aDate time: aTime\r\n\r\n\t^ self \r\n\t\tyear: aDate year \r\n\t\tday: aDate dayOfYear \r\n\t\thour: aTime hour \r\n\t\tminute: aTime minute \r\n\t\tsecond: aTime second\r\n! !\r\r!DateAndTime class methodsFor: 'squeak protocol' stamp: 'brp` 8/24/2003 19:11'!\repoch\r\n\t\"Answer a DateAndTime representing the Squeak epoch: 1 January 1901\"\r\n\r\n\t^ self julianDayNumber: SqueakEpoch\r\n\t! !\r\r!DateAndTime class methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 07:36'!\rfromString: aString\r\n\r\n\r\n\t^ self readFrom: (ReadStream on: aString)\r\n! !\r\r!DateAndTime class methodsFor: 'squeak protocol' stamp: 'brp 8/23/2003 21:08'!\rjulianDayNumber: aJulianDayNumber\r\n\r\n\t^ self basicNew\r\n\t\tticks: aJulianDayNumber days ticks offset: self localOffset;\r\n\t\tyourself\r\n! !\r\r!DateAndTime class methodsFor: 'squeak protocol' stamp: 'brp 9/4/2003 06:40'!\rlocalOffset\r\n\t\"Answer the duration we are offset from UTC\"\r\n\r\n\t^ self localTimeZone offset\r\n! !\r\r!DateAndTime class methodsFor: 'squeak protocol' stamp: 'brp 9/4/2003 06:39'!\rlocalTimeZone\r\n\t\"Answer the local time zone\"\r\n\r\n\t^ LocalTimeZone ifNil: [ LocalTimeZone _ TimeZone default ]\r\n\r\n! !\r\r!DateAndTime class methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 17:09'!\rmidnight\r\n\r\n\t^ self now midnight\r\n! !\r\r!DateAndTime class methodsFor: 'squeak protocol' stamp: 'brp 8/23/2003 20:57'!\rnew\r\n\t\"Answer a DateAndTime representing the Squeak epoch: 1 January 1901\"\r\n\r\n\t^ self epoch\r\n\t! !\r\r!DateAndTime class methodsFor: 'squeak protocol' stamp: 'brp 8/23/2003 20:58'!\rreadFrom: aStream\r\n\t| bc year month day hour minute second nanos offset buffer ch |\r\n\r\n\r\n\taStream peek = $- ifTrue: [ aStream next. bc _ -1] ifFalse: [bc _ 1].\r\n\tyear _ (aStream upTo: $-) asInteger * bc.\r\n\tmonth _ (aStream upTo: $-) asInteger.\r\n\tday _ (aStream upTo: $T) asInteger.\r\n\thour _ (aStream upTo: $:) asInteger.\r\n \tbuffer _ '00:'. ch _ nil.\r\n\tminute _ WriteStream on: buffer.\r\n\t[ aStream atEnd | (ch = $:) | (ch = $+) | (ch = $-) ]\r\n\t\twhileFalse: [ ch _ minute nextPut: aStream next. ].\r\n\t(ch isNil or: [ch isDigit]) ifTrue: [ ch _ $: ].\r\n\tminute _ ((ReadStream on: buffer) upTo: ch) asInteger.\r\n\tbuffer _ '00.'.\r\n\tsecond _ WriteStream on: buffer.\r\n\t[ aStream atEnd | (ch = $.) | (ch = $+) | (ch = $-) ]\r\n\t\twhileFalse: [ ch _ second nextPut: aStream next. ].\r\n\t(ch isNil or: [ch isDigit]) ifTrue: [ ch _ $. ].\r\n\tsecond _ ((ReadStream on: buffer) upTo: ch) asInteger.\r\n\tbuffer _ '00000000+'.\r\n\tnanos _ WriteStream on: buffer.\r\n\t[ aStream atEnd | (ch = $+) | (ch = $-) ]\r\n\t\twhileFalse: [ ch _ nanos nextPut: aStream next. ].\r\n\t(ch isNil or: [ch isDigit]) ifTrue: [ ch _ $+ ].\r\n\tnanos _ ((ReadStream on: buffer) upTo: ch) asInteger.\r\n\taStream atEnd\r\n\t\tifTrue: [ offset _ self localOffset ]\r\n\t\r\n\tifFalse:\r\n\t\t \t[offset _ Duration fromString: (ch asString, '0:', aStream upToEnd).\r\n\t\r\n\t\t(offset = self localOffset) ifTrue: [ offset _ self localOffset ]].\r\n\t^ self\r\n\t\tyear: year\r\n\t\tmonth: month\r\n\t\tday: day\r\n\t\thour: hour\r\n\t\tminute: minute\r\n\r\n\t\tsecond: second\r\n\t\tnanoSecond:  nanos\r\n\r\n\t\toffset: offset.\r\n\r\n\r\n\t\"\t'-1199-01-05T20:33:14.321-05:00' asDateAndTime\r\n\t\t' 2002-05-16T17:20:45.00000001+01:01' asDateAndTime\r\n  \t\t' 2002-05-16T17:20:45.00000001' asDateAndTime\r\n \t\t' 2002-05-16T17:20' asDateAndTime\r\n\t\t' 2002-05-16T17:20:45' asDateAndTime\r\n\t\t' 2002-05-16T17:20:45+01:57' asDateAndTime\r\n \t\t' 2002-05-16T17:20:45-02:34' asDateAndTime\r\n \t\t' 2002-05-16T17:20:45+00:00' asDateAndTime\r\n\t\t' 1997-04-26T01:02:03+01:02:3' asDateAndTime \r\n \t\"\r\n! !\r\r!DateAndTime class methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 17:09'!\rtoday\r\n\r\n\t^ self midnight\r\n! !\r\r!DateAndTime class methodsFor: 'squeak protocol' stamp: 'brp 8/23/2003 20:53'!\ryear: year day: dayOfYear\r\n\t\"Return a DateAndTime\"\r\n\r\n\t^ self\r\n\t\tyear: year\r\n\t\tday: dayOfYear\r\n\t\thour: 0\r\n\t\tminute: 0\r\n\t\tsecond: 0! !\r\r!DateAndTime class methodsFor: 'squeak protocol' stamp: 'brp 8/23/2003 20:54'!\ryear: year month: month day: day\r\n\t\"Return a DateAndTime, midnight local time\" \t^ self\r\n \t\tyear: year\r\n \t\tmonth: month\r\n \t\tday: day\r\n \t\thour: 0\r\n\t\tminute: 0! !\r\r!DateAndTime class methodsFor: 'squeak protocol' stamp: 'brp 8/23/2003 20:54'!\ryear: year month: month day: day hour: hour minute: minute\r\n\r\n\t\"Return a DateAndTime\" \t^ self\r\n \t\tyear: year\r\n \t\tmonth: month\r\n \t\tday: day\r\n \t\thour: hour\r\n\t\tminute: minute\r\n\t\tsecond: 0! !\r\r!DateAndTime class methodsFor: 'squeak protocol' stamp: 'brp 1/7/2004 15:39'!\ryear: year month: month day: day hour: hour minute: minute second: second nanoSecond: nanoCount offset: offset\r\n\t\"Return a DateAndTime\"\r\n\r\n\t| monthIndex p q r s julianDayNumber since |\r\n\r\n\tmonthIndex _ month isInteger ifTrue: [month] ifFalse: [Month indexOfMonth: month].\r\n\tp _ (monthIndex - 14) quo: 12.\r\n\tq _ year + 4800 + p.\r\n\tr _ monthIndex - 2 - (12 * p).\r\n\ts _ (year + 4900 + p) quo: 100.\r\n\r\n\tjulianDayNumber _\r\n \t\t( (1461 * q) quo: 4 ) +\r\n\t\t\t( (367 * r) quo: 12 ) -\r\n \t\t\t\t( (3 * s) quo: 4 ) +\r\n \t\t\t\t\t( day - 32075 ).\r\n\r\n\tsince _ Duration days: julianDayNumber hours: hour \r\t\t\t\tminutes: minute seconds: second nanoSeconds: nanoCount.\r\n\r\n\t^ self basicNew\r\n \t\tticks: since ticks offset: offset;\r\n\t\tyourself.! !\r\r\r!DateAndTime class methodsFor: 'smalltalk-80' stamp: 'brp` 8/24/2003 19:09'!\rfromSeconds: seconds\r\n\t\"Answer a DateAndTime since the Squeak epoch: 1 January 1901\"\r\n\r\n\t| since |\r\n\tsince _ Duration days: SqueakEpoch hours: 0 minutes: 0 seconds: seconds.\r\n\t^ self basicNew\r\n\t\tticks: since ticks offset: self localOffset;\r\n\t\tyourself.\r\n! !\r\r!DateAndTime class methodsFor: 'smalltalk-80' stamp: 'brp 8/24/2003 00:00'!\rmillisecondClockValue\r\r\t^ Time millisecondClockValue! !\r\r!DateAndTime class methodsFor: 'smalltalk-80' stamp: 'brp 8/24/2003 00:01'!\rtotalSeconds\r\r\t^ Time totalSeconds! !\rCodeHolder subclass: #Debugger\r\tinstanceVariableNames: 'interruptedProcess interruptedController contextStack contextStackTop contextStackIndex contextStackList receiverInspector contextVariablesInspector externalInterrupt proceedValue selectingPC sourceMap tempNames savedCursor isolationHead failedProject errorWasInUIProcess labelString theMethodNode'\r\tclassVariableNames: 'ContextStackKeystrokes ErrorRecursion'\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Debugger'!\r!Debugger commentStamp: '<historical>' prior: 0!\rI represent the machine state at the time of an interrupted process. I also represent a query path into the state of the process. The debugger is typically viewed through a window that views the stack of suspended contexts, the code for, and execution point in, the currently selected message, and inspectors on both the receiver of the currently selected message, and the variables in the current context.\r\rSpecial note on recursive errors:\rSome errors affect Squeak's ability to present a debugger.  This is normally an unrecoverable situation.  However, if such an error occurs in an isolation layer, Squeak will attempt to exit from the isolation layer and then present a debugger.  Here is the chain of events in such a recovery.\r\r\t* A recursive error is detected.\r\t* The current project is queried for an isolationHead\r\t* Changes in the isolationHead are revoked\r\t* The parent project of isolated project is returned to\r\t* The debugger is opened there and execution resumes.\r\rIf the user closes that debugger, execution continues in the outer project and layer.  If, after repairing some damage, the user proceeds from the debugger, then the isolationHead is re-invoked, the failed project is re-entered, and execution resumes in that world. !\r\r\r!Debugger methodsFor: 'initialize' stamp: 'RAA 1/30/2001 13:05'!\rbuildMVCDebuggerViewLabel: aString minSize: aPoint\r\t\"Build an MVC debugger view around the receiver, and return the StandardSystemView thus created.\"\r\r\t| topView stackListView stackCodeView rcvrVarView rcvrValView ctxtVarView ctxtValView deltaY underPane annotationPane buttonsView oldContextStackIndex |\r\r\toldContextStackIndex _ contextStackIndex.\r\tself expandStack. \"Sets contextStackIndex to zero.\"\r\tcontextStackIndex _ oldContextStackIndex.\r\r\ttopView _ StandardSystemView new model: self.\r\ttopView borderWidth: 1.\r\tstackListView _ PluggableListView on: self\r\t\t\tlist: #contextStackList\r\t\t\tselected: #contextStackIndex\r\t\t\tchangeSelected: #toggleContextStackIndex:\r\t\t\tmenu: #contextStackMenu:shifted:\r\t\t\tkeystroke: #contextStackKey:from:.\r\t\tstackListView menuTitleSelector: #messageListSelectorTitle.\r\t\tstackListView window: (0 @ 0 extent: 150 @ 50).\r\t\ttopView addSubView: stackListView.\r\tdeltaY _ 0.\r\t self wantsAnnotationPane\r\t\tifTrue:\r\t\t\t[annotationPane _ PluggableTextView on: self\r\t\t\t\ttext: #annotation accept: nil readSelection: nil menu: nil.\r\t\t\tannotationPane window: (0@0 extent: 150@self optionalAnnotationHeight).\r\t\t\ttopView addSubView: annotationPane below: stackListView.\r\t\t\tdeltaY _ deltaY + self optionalAnnotationHeight.\r\t\t\tunderPane _ annotationPane]\r\t\tifFalse:\r\t\t\t[underPane _ stackListView].\r\tself wantsOptionalButtons\r\t\tifTrue:\r\t\t\t[buttonsView _ self buildMVCOptionalButtonsButtonsView.\r\t\t\tbuttonsView borderWidth: 1.\r\t\t\ttopView addSubView: buttonsView below: underPane.\r\t\t\tunderPane _ buttonsView.\r\t\t\tdeltaY _ deltaY + self optionalButtonHeight].\r\tstackCodeView _ PluggableTextView on: self\r\t\t\ttext: #contents accept: #contents:notifying:\r\t\t\treadSelection: #contentsSelection menu: #codePaneMenu:shifted:.\r\t\tstackCodeView window: (0 @ 0 extent: 150 @ (75 - deltaY)).\r\t\ttopView addSubView: stackCodeView below: underPane.\r\trcvrVarView _ PluggableListView on: self receiverInspector\r\t\t\tlist: #fieldList\r\t\t\tselected: #selectionIndex\r\t\t\tchangeSelected: #toggleIndex:\r\t\t\tmenu: #fieldListMenu:\r\t\t\tkeystroke: #inspectorKey:from:.\r\t\trcvrVarView window: (0 @ 0 extent: 25 @ (50 - deltaY)).\r\t\ttopView addSubView: rcvrVarView below: stackCodeView.\r\trcvrValView _ PluggableTextView on: self receiverInspector\r\t\t\ttext: #contents accept: #accept:\r\t\t\treadSelection: #contentsSelection menu: #codePaneMenu:shifted:.\r\t\trcvrValView window: (0 @ 0 extent: 50 @ (50 - deltaY)).\r\t\ttopView addSubView: rcvrValView toRightOf: rcvrVarView.\r\tctxtVarView _ PluggableListView on: self contextVariablesInspector\r\t\t\tlist: #fieldList\r\t\t\tselected: #selectionIndex\r\t\t\tchangeSelected: #toggleIndex:\r\t\t\tmenu: #fieldListMenu:\r\t\t\tkeystroke: #inspectorKey:from:.\r\t\tctxtVarView window: (0 @ 0 extent: 25 @ (50 - deltaY)).\r\t\ttopView addSubView: ctxtVarView toRightOf: rcvrValView.\r\tctxtValView _ PluggableTextView on: self contextVariablesInspector\r\t\t\ttext: #contents accept: #accept:\r\t\t\treadSelection: #contentsSelection menu: #codePaneMenu:shifted:.\r\t\tctxtValView window: (0 @ 0 extent: 50 @ (50 - deltaY)).\r\t\ttopView addSubView: ctxtValView toRightOf: ctxtVarView.\r\ttopView label: aString.\r\ttopView minimumSize: aPoint.\r\t^ topView! !\r\r!Debugger methodsFor: 'initialize' stamp: 'sw 1/16/2002 20:03'!\rbuildMVCNotifierButtonView\r\r\t| aView bHeight priorButton buttonView |\r\taView _ View new model: self.\r\tbHeight _ self notifierButtonHeight.\r\taView window: (0@0 extent: 350@bHeight).\r\tpriorButton _ nil.\r\tself preDebugButtonQuads do:\r\t\t[:aSpec |\r\t\t\tbuttonView _ PluggableButtonView\r\t\t\t\ton: self\r\t\t\t\tgetState: nil\r\t\t\t\taction: aSpec second.\r\t\t\tbuttonView\r\t\t\t\tlabel: aSpec first;\r\t\t\t\tinsideColor: (Color perform: aSpec third) muchLighter lighter;\r\t\t\t\tborderWidthLeft: 1 right: 1 top: 0 bottom: 0;\r\t\t\t\twindow: (0@0 extent: 117@bHeight).\r\t\t\tpriorButton\r\t\t\t\tifNil:\r\t\t\t\t\t[aView addSubView: buttonView]\r\t\t\t\tifNotNil:\r\t\t\t\t\t[aView addSubView: buttonView toRightOf: priorButton].\r\t\t\tpriorButton _ buttonView].\r\t^ aView! !\r\r!Debugger methodsFor: 'initialize' stamp: 'rhi 12/20/2000 16:50'!\rbuildMVCNotifierViewLabel: aString message: messageString minSize: aPoint\r\r\t| topView notifyView buttonView x y bHeight |\r\tself expandStack.\r\ttopView _ StandardSystemView new model: self.\r\ttopView borderWidth: 1.\r\tbuttonView _ self buildMVCNotifierButtonView.\r\ttopView addSubView: buttonView.\r\tnotifyView _ PluggableListView on: self\r\t\tlist: #contextStackList\r\t\tselected: #contextStackIndex\r\t\tchangeSelected: #debugAt:\r\t\tmenu: nil\r\t\tkeystroke: nil.\r\tx _ 350 max: (aPoint x).\r\ty _ ((4 * 15) + 16) max: (aPoint y - 16 - self optionalButtonHeight).\r\tbHeight _ self optionalButtonHeight.\r\ty _ y - bHeight.\r\tnotifyView window: (0@0 extent: x@y).\r\ttopView\r\t\taddSubView: notifyView below: buttonView;\r\t\tlabel: aString;\r\t\tminimumSize: aPoint.\r\t^ topView! !\r\r!Debugger methodsFor: 'initialize' stamp: 'hmm 7/30/2001 17:25'!\rbuildMVCOptionalButtonsButtonsView\r\r\t| aView bHeight offset aButtonView wid pairs windowWidth previousView |\r\taView _ View new model: self.\r\tbHeight _ self optionalButtonHeight.\r\twindowWidth _ 150.\r\taView window: (0@0 extent: windowWidth@bHeight).\r\toffset _ 0.\r\tpairs _ self optionalButtonPairs.\r\tpreviousView _ nil.\r\tpairs do: [:pair |\r\t\taButtonView _ PluggableButtonView on: self getState: nil action: pair second.\r\t\tpair second = pairs last second\r\t\t\tifTrue:\r\t\t\t\t[wid _ windowWidth - offset]\r\t\t\tifFalse:\r\t\t\t\t[aButtonView borderWidthLeft: 0 right: 1 top: 0 bottom: 0.\r\t\t\t\twid _ windowWidth // (pairs size)].\r\t\taButtonView\r\t\t\tlabel: pair first asParagraph;\r\t\t\tinsideColor: Color red muchLighter lighter;\r\t\t\twindow: (offset@0 extent: wid@bHeight).\r\t\toffset _ offset + wid.\r\t\tpair second = pairs first second\r\t\t\tifTrue: [aView addSubView: aButtonView]\r\t\t\tifFalse: [aView addSubView: aButtonView toRightOf: previousView].\r\t\tpreviousView _ aButtonView].\r\t^ aView! !\r\r!Debugger methodsFor: 'initialize' stamp: 'ab 2/25/2004 18:59'!\rcustomButtonSpecs\r\t\"Answer an array of elements of the form wording, selector, help-message, that characterize the custom button row of a debugger.\"\r\r\t| list |\r\tlist _ #(('Proceed'\tproceed\t\t\t\t'close the debugger and proceed.')\r\t\t('Restart'\t\trestart\t\t\t\t'reset this context to its start.')\r\t\t('Into'\t\t\tsend\t\t\t\t'step Into message sends')\r\t\t('Over'\t\t\tdoStep\t\t\t\t'step Over message sends')\r\t\t('Through'\t\tstepIntoBlock\t\t'step into a block')\r\t\t('Full Stack'\t\tfullStack\t\t\t'show full stack')\r\t\t('Where'\t\twhere\t\t\t\t'select current pc range')).\r\tPreferences restartAlsoProceeds ifTrue:\r\t\t[list _ list collect: [:each |\r\t\t\teach second == #restart\r\t\t\t\tifTrue: [each copy at: 3 put: 'proceed from the beginning of this context.'; yourself]\r\t\t\t\tifFalse: [each]]].\r\t^ list! !\r\r!Debugger methodsFor: 'initialize' stamp: 'kfr 10/4/2000 22:13'!\rdebugAt: anInteger\r\tself toggleContextStackIndex: anInteger. \r\t ^ self debug.! !\r\r!Debugger methodsFor: 'initialize' stamp: 'tk 5/9/2003 11:20'!\rinitialExtent\r\t\"Make the full debugger longer!!\"\r\r\tdependents size < 9 ifTrue: [^ super initialExtent].\t\"Pre debug window\"\r\tRealEstateAgent standardWindowExtent y < 400 \"a tiny screen\" \r\t\tifTrue: [^ super initialExtent].\r\t\r\t^ 600@700\r! !\r\r!Debugger methodsFor: 'initialize' stamp: 'sw 12/28/1999 13:07'!\rnotifierButtonHeight\r\r\t^ 18! !\r\r!Debugger methodsFor: 'initialize' stamp: 'BG 10/28/2003 20:40'!\ropenFullNoSuspendLabel: aString\r\t\"Create and schedule a full debugger with the given label. Do not terminate the current active process.\"\r\r\t| topView |\r\r\t\r\ttopView _ self buildMVCDebuggerViewLabel: aString minSize: 300@200.\r\ttopView controller openNoTerminate.\r\t^ topView\r! !\r\r!Debugger methodsFor: 'initialize' stamp: 'BG 10/28/2003 20:39'!\ropenNotifierContents: msgString label: label\r\t\"Create and schedule a notifier view with the given label and message. A notifier view shows just the message or the first several lines of the stack, with a menu that allows the user to open a full debugger if so desired.\"\r\t\"NOTE: When this method returns, a new process has been scheduled to run the windows, and thus this notifier, but the previous active porcess has not been suspended.  The sender will do this.\"\r\t| msg topView p |\r\tSensor flushKeyboard.\r\tsavedCursor _ Sensor currentCursor.\r\tSensor currentCursor: Cursor normal.\r\t(label beginsWith: 'Space is low')\r\t\tifTrue: [msg _ self lowSpaceChoices, (msgString ifNil: [''])]\r\t\tifFalse: [msg _ msgString].\r\tisolationHead ifNotNil:\r\t\t[\"We have already revoked the isolation layer -- now jump to the parent project.\"\r\t\tmsg _ self isolationRecoveryAdvice, msgString.\r\t\tfailedProject _ Project current.\r\t\tisolationHead parent enterForEmergencyRecovery].\r\r\r\r\tDisplay fullScreen.\r\ttopView _ self \r\t\tbuildMVCNotifierViewLabel: label \r\t\tmessage: thisContext sender sender shortStack \r\t\tminSize: 350@((14 * 5) + 16 + self optionalButtonHeight).\r\tScheduledControllers activeController\r\t\tifNil: [p _ Display boundingBox center]\r\t\tifNotNil: [p _ ScheduledControllers activeController view displayBox center].\r\ttopView controller openNoTerminateDisplayAt: (p max: (200@60)).\r\t^ topView! !\r\r!Debugger methodsFor: 'initialize' stamp: 'sbw 12/23/1999 09:50'!\roptionalAnnotationHeight\r\r\t^ 10! !\r\r!Debugger methodsFor: 'initialize' stamp: 'sbw 12/23/1999 08:31'!\roptionalButtonHeight\r\r\t^ 10! !\r\r!Debugger methodsFor: 'initialize' stamp: 'ssa 9/3/2008 15:34'!\roptionalButtonPairs\r\t\"Actually, return triples.  In mvc (until someone deals with this) only the custom debugger-specific buttons are shown, but in morphic, the standard code-tool buttons are provided in addition to the custom buttons\"\r\r\t^ Smalltalk isMorphic\r\t\tifFalse:\r\t\t\t[self customButtonSpecs]\r\t\tifTrue:\r\t\t\t[]! !\r\r!Debugger methodsFor: 'initialize' stamp: 'mir 11/10/2003 15:13'!\rpreDebugButtonQuads\r\n\r\n\t^Preferences eToyFriendly\r\n\t\tifTrue: [\r\n\t #(('Store log'\t\tstoreLog \tblue \t'write a log of the encountered problem' )\r\n\t\t('Abandon'\t\tabandon \tblack \t'abandon this execution by closing this window')\r\n\t\t('Debug'\t\tdebug \t\tred \t\t'bring up a debugger'))]\r\n\t\tifFalse: [\r\n\t #(('Proceed'\t\tproceed \tblue \t'continue execution' )\r\n\t\t('Abandon'\t\tabandon \tblack \t'abandon this execution by closing this window')\r\n\t\t('Debug'\t\tdebug \t\tred \t\t'bring up a debugger'))]\r\n! !\r\r!Debugger methodsFor: 'initialize' stamp: 'jm 8/20/1998 18:31'!\rrelease\r\r\tself windowIsClosing.\r\tsuper release.\r! !\r\r!Debugger methodsFor: 'initialize' stamp: 'sw 1/24/2001 21:22'!\rwantsOptionalButtons\r\t\"The debugger benefits so majorly from the optional buttons that we put them up regardless of the global setting.  Some traditionalists will want to change this method manually!!\"\r\r\t^ true! !\r\r!Debugger methodsFor: 'initialize' stamp: 'ajh 3/5/2004 21:31'!\rwindowIsClosing\r\t\"My window is being closed; clean up. Restart the low space watcher.\"\r\r\tinterruptedProcess == nil ifTrue: [^ self].\r\tinterruptedProcess terminate.\r\tinterruptedProcess _ nil.\r\tinterruptedController _ nil.\r\tcontextStack _ nil.\r\tcontextStackTop _ nil.\r\treceiverInspector _ nil.\r\tcontextVariablesInspector _ nil.\r\tSmalltalk installLowSpaceWatcher.  \"restart low space handler\"\r! !\r\r\r!Debugger methodsFor: 'accessing' stamp: 'di 10/9/1998 17:15'!\rcontents \r\t\"Depending on the current selection, different information is retrieved.\r\tAnswer a string description of that information.  This information is the\r\tmethod in the currently selected context.\"\r\r\tcontents == nil ifTrue: [^ String new].\r\t^ contents copy! !\r\r!Debugger methodsFor: 'accessing' stamp: 'ajh 3/5/2004 01:20'!\rcontents: aText notifying: aController \r\t\"The retrieved information has changed and its source must now be  \r\tupdated. In this case, the retrieved information is the method of the  \r\tselected context.\"\r\t| selector classOfMethod category h ctxt |\r\tcontextStackIndex = 0\r\t\tifTrue: [^ false].\r\tself selectedContext isExecutingBlock\r\t\tifTrue: [h := self selectedContext finalBlockHome.\r\t\t\th\r\t\t\t\tifNil: [self inform: 'Method not found for block, can''t edit'.\r\t\t\t\t\t^ false].\r\t\t\t(self confirm: 'I will have to revert to the method from\rwhich this block originated.  Is that OK?')\r\t\t\t\tifTrue: [self resetContext: h]\r\t\t\t\tifFalse: [^ false]].\r\tclassOfMethod := self selectedClass.\r\tcategory := self selectedMessageCategoryName.\r\tselector := self selectedClass parserClass new parseSelector: aText.\r\tselector == self selectedMessageName\r\t\tifFalse: [self inform: 'can''t change selector'.\r\t\t\t^ false].\r\tselector := classOfMethod\r\t\t\t\tcompile: aText\r\t\t\t\tclassified: category\r\t\t\t\tnotifying: aController.\r\tselector\r\t\tifNil: [^ false].\r\t\"compile cancelled\"\r\tcontents := aText.\r\tctxt := interruptedProcess popTo: self selectedContext.\r\tctxt == self selectedContext ifFalse: [\r\t\tself inform: 'Method saved, but current context unchanged\rbecause of unwind error. Click OK to see error'.\r\t] ifTrue: [\r\t\tinterruptedProcess\r\t\t\trestartTopWith: (classOfMethod compiledMethodAt: selector);\r\t\t \tstepToSendOrReturn.\r\t\tcontextVariablesInspector object: nil.\r\t\ttheMethodNode := Preferences browseWithPrettyPrint\r\t\t\tifTrue: [ctxt methodNodeFormattedAndDecorated: Preferences colorWhenPrettyPrinting]\r\t\t\tifFalse: [ctxt methodNode].\r\t\tsourceMap := theMethodNode sourceMap.\r\t\ttempNames := theMethodNode tempNames.\r\t].\r\tself resetContext: ctxt.\r\t^ true! !\r\r!Debugger methodsFor: 'accessing'!\rcontextVariablesInspector\r\t\"Answer the instance of Inspector that is providing a view of the \r\tvariables of the selected context.\"\r\r\t^contextVariablesInspector! !\r\r!Debugger methodsFor: 'accessing'!\rinterruptedContext\r\t\"Answer the suspended context of the interrupted process.\"\r\r\t^contextStackTop! !\r\r!Debugger methodsFor: 'accessing' stamp: 'hmm 7/16/2001 21:54'!\rlabelString\r\t^labelString! !\r\r!Debugger methodsFor: 'accessing' stamp: 'hmm 7/16/2001 21:54'!\rlabelString: aString\r\tlabelString _ aString.\r\tself changed: #relabel! !\r\r!Debugger methodsFor: 'accessing'!\rproceedValue: anObject \r\t\"Set the value to be returned to the selected context when the interrupted \r\tprocess proceeds.\"\r\r\tproceedValue _ anObject! !\r\r!Debugger methodsFor: 'accessing'!\rreceiver\r\t\"Answer the receiver of the selected context, if any. Answer nil \r\totherwise.\"\r\r\tcontextStackIndex = 0\r\t\tifTrue: [^nil]\r\t\tifFalse: [^self selectedContext receiver]! !\r\r!Debugger methodsFor: 'accessing'!\rreceiverInspector\r\t\"Answer the instance of Inspector that is providing a view of the \r\tvariables of the selected context's receiver.\"\r\r\t^receiverInspector! !\r\r\r!Debugger methodsFor: 'notifier menu' stamp: 'BG 10/28/2003 20:40'!\rdebug\r\t\"Open a full DebuggerView.\"\r\t| topView |\r\ttopView _ self topView.\r\ttopView model: nil.  \"so close won't release me.\"\r\t\r\r\ttopView controller controlTerminate.\r\ttopView deEmphasize; erase.\r\r\t\"a few hacks to get the scroll selection artifacts out when we got here by clicking in the list\"\r\ttopView subViewWantingControl ifNotNil: [\r\t\ttopView subViewWantingControl controller controlTerminate\r\t].\r\ttopView controller status: #closed.\r\r\tself openFullNoSuspendLabel: topView label.\r\ttopView controller closeAndUnscheduleNoErase.\r\tProcessor terminateActive.\r! !\r\r\r!Debugger methodsFor: 'context stack (message list)'!\rcontextStackIndex\r\t\"Answer the index of the selected context.\"\r\r\t^contextStackIndex! !\r\r!Debugger methodsFor: 'context stack (message list)'!\rcontextStackList\r\t\"Answer the array of contexts.\"\r\r\t^contextStackList! !\r\r!Debugger methodsFor: 'context stack (message list)' stamp: 'tk 4/17/1998 18:05'!\rexpandStack\r\t\"A Notifier is being turned into a full debugger.  Show a substantial amount of stack in the context pane.\"\r\r\tself newStack: (contextStackTop stackOfSize: 20).\r\tcontextStackIndex _ 0.\r\treceiverInspector _ Inspector inspect: nil.\r\tcontextVariablesInspector _ ContextVariablesInspector inspect: nil.\r\tproceedValue _ nil! !\r\r!Debugger methodsFor: 'context stack (message list)' stamp: 'ajh 9/25/2001 00:14'!\rfullyExpandStack\r\t\"Expand the stack to include all of it, rather than the first four or five\r\tcontexts.\"\r\r\tself okToChange ifFalse: [^ self].\r\tself newStack: contextStackTop contextStack.\r\tself changed: #contextStackList! !\r\r!Debugger methodsFor: 'context stack (message list)'!\rmessageListIndex\r\t\"Answer the index of the currently selected context.\"\r\r\t^contextStackIndex! !\r\r!Debugger methodsFor: 'context stack (message list)' stamp: 'nk 2/20/2004 15:55'!\rselectedMessage\r\t\"Answer the source code of the currently selected context.\"\r\tcontents := theMethodNode sourceText.\r\t^ contents := contents asText makeSelectorBold! !\r\r!Debugger methodsFor: 'context stack (message list)' stamp: 'ajh 9/7/2002 21:15'!\rselectedMessageName\r\t\"Answer the message selector of the currently selected context.\"\r\r\t^self selectedContext methodSelector! !\r\r!Debugger methodsFor: 'context stack (message list)'!\rtoggleContextStackIndex: anInteger \r\t\"If anInteger is the same as the index of the selected context, deselect it. \r\tOtherwise, the context whose index is anInteger becomes the selected \r\tcontext.\"\r\r\tself contextStackIndex: \r\t\t(contextStackIndex = anInteger\r\t\t\tifTrue: [0]\r\t\t\tifFalse: [anInteger])\r\t\toldContextWas:\r\t\t(contextStackIndex = 0\r\t\t\tifTrue: [nil]\r\t\t\tifFalse: [contextStack at: contextStackIndex])! !\r\r\r!Debugger methodsFor: 'context stack menu' stamp: 'sw 12/28/1999 13:04'!\rabandon\r\t\"abandon the debugger from its pre-debug notifier\"\r\tself abandon: self topView! !\r\r!Debugger methodsFor: 'context stack menu' stamp: 'sw 12/28/1999 13:05'!\rabandon: aTopView \r\t\"abandon the notifier represented by aTopView\"\r\taTopView controller close! !\r\r!Debugger methodsFor: 'context stack menu' stamp: 'sd 3/4/2004 20:39'!\raskForCategoryIn: aClass default: aString\r\t| categories index category |\r\tcategories := OrderedCollection with: 'new ...'. \r\tcategories addAll: (aClass allMethodCategoriesIntegratedThrough: Object).\t\r\tindex := PopUpMenu withCaption: 'Please provide a good category for the new method!!' translated\r\t\t\t\t\t\tchooseFrom: categories.\r\tindex = 0 ifTrue: [^ aString].\r\tcategory := index = 1 ifTrue: [FillInTheBlank request: 'Enter category name:']\r\t\t\t\t\t\tifFalse: [categories at: index].\r\t^ category isEmpty ifTrue: [^ aString] ifFalse: [category]! !\r\r!Debugger methodsFor: 'context stack menu' stamp: 'wod 5/15/1998 00:24'!\rbrowseMessages\r\t\"Present a menu of all messages sent by the currently selected message.\r\tOpen a message set browser of all implementors of the message chosen.\r\tDo nothing if no message is chosen.\"\r\r\tcontextStackIndex = 0 ifTrue: [^ self].\r\tsuper browseMessages.! !\r\r!Debugger methodsFor: 'context stack menu' stamp: 'wod 5/15/1998 00:23'!\rbrowseSendersOfMessages\r\t\"Present a menu of the currently selected message, as well as all\r\tmessages sent by it.  Open a message set browser of all implementors\r\tof the message chosen.\"\r\r\tcontextStackIndex = 0 ifTrue: [^ self].\r\tsuper browseSendersOfMessages! !\r\r!Debugger methodsFor: 'context stack menu' stamp: 'sw 9/14/2001 00:26'!\rbrowseVersions\r\t\"Create and schedule a message set browser on all versions of the \r\tcurrently selected message selector.\"\r\r\t| class selector |\r\tclass _ self selectedClassOrMetaClass.\r\tselector _ self selectedMessageName.\r\tVersionsBrowser\r\t\tbrowseVersionsOf: (class compiledMethodAt: selector)\r\t\tclass: self selectedClass theNonMetaClass\r\t\tmeta: class isMeta\r\t\tcategory: self selectedMessageCategoryName\r\t\tselector: selector! !\r\r!Debugger methodsFor: 'context stack menu' stamp: 'tk 4/6/98 23:00'!\rbuildMessageBrowser\r\t\"Create and schedule a message browser on the current method.\"\r\r\tcontextStackIndex = 0 ifTrue: [^ self].\r\t^ Browser\r\t\topenMessageBrowserForClass: self selectedClassOrMetaClass\r\t\tselector: self selectedMessageName\r\t\teditString: nil! !\r\r!Debugger methodsFor: 'context stack menu' stamp: 'tk 4/18/1998 09:24'!\rcontextStackKey: aChar from: view\r\t\"Respond to a keystroke in the context list\"\r\r \t| selector |\r\tselector _ ContextStackKeystrokes at: aChar ifAbsent: [nil].\r\tselector ifNil: [self messageListKey: aChar from: view]\r\t\tifNotNil: [self perform: selector]! !\r\r!Debugger methodsFor: 'context stack menu' stamp: 'ssa 9/3/2008 11:23'!\rcontextStackMenu: aMenu shifted: shifted\r\t\"Set up the menu appropriately for the context-stack-list, either shifted or unshifted as per the parameter provided\"\r\r\t^ shifted ifFalse: \r\t\t[self selectedContext selector = #doesNotUnderstand: ifTrue:\r\t\t\t[aMenu \r\t\t\t\tadd: 'implement in...' \r\t\t\t\tsubMenu: (self populateImplementInMenu: (Smalltalk isMorphic ifTrue: [] ifFalse: [CustomMenu new]))\r\t\t\t\ttarget: nil \r\t\t\t\tselector: nil \r\t\t\t\targumentList: #(nil)].\r\t\taMenu labels: \r'fullStack (f)\rrestart (r)\rproceed (p)\rstep (t)\rstep through (T)\rsend (e)\rwhere (w)\rpeel to first like this\rsenders of... (n)\rimplementors of... (m)\rinheritance (i)\rversions (v)\rinst var refs...\rinst var defs...\rclass var refs...\rclass variables\rclass refs (N)\rbrowse full (b)\rfile out \rmore...'\r\t\tlines: #(8 12 14 17 20)\r\t\tselections: #(fullStack restart proceed doStep stepIntoBlock send where peelToFirst\rbrowseSendersOfMessages browseMessages methodHierarchy browseVersions\rbrowseInstVarRefs browseInstVarDefs\rbrowseClassVarRefs browseClassVariables browseClassRefs\rbrowseMethodFull fileOutMessage \rshiftedYellowButtonActivity)]\r\r\tifTrue: [aMenu labels: \r'browse class hierarchy\rbrowse class\rbrowse method (O)\rimplementors of sent messages\rchange sets with this method\rinspect instances\rinspect subinstances\rrevert to previous version\rremove from current change set\rrevert & remove from changes\rmore...' \r\tlines: #(5 7 10)\r\tselections: #(classHierarchy browseClass \r\t\topenSingleMessageBrowser browseAllMessages findMethodInChangeSets \r\t\tinspectInstances inspectSubInstances\r\t\trevertToPreviousVersion \r\t\tremoveFromCurrentChanges revertAndForget\r\t\tunshiftedYellowButtonActivity)]\r\r! !\r\r!Debugger methodsFor: 'context stack menu' stamp: 'ajh 7/6/2003 21:06'!\rdoStep\r\t\"Send the selected message in the accessed method, and regain control \r\tafter the invoked method returns.\"\r\t\r\t| currentContext newContext |\r\tself okToChange ifFalse: [^ self].\r\tself checkContextSelection.\r\tcurrentContext _ self selectedContext.\r\tnewContext _ interruptedProcess completeStep: currentContext.\r\tnewContext == currentContext ifTrue: [\r\t\tnewContext _ interruptedProcess stepToSendOrReturn].\r\tself contextStackIndex > 1\r\t\tifTrue: [self resetContext: newContext]\r\t\tifFalse: [newContext == currentContext\r\t\t\t\tifTrue: [self changed: #contentsSelection.\r\t\t\t\t\t\tself updateInspectors]\r\t\t\t\tifFalse: [self resetContext: newContext]].\r! !\r\r!Debugger methodsFor: 'context stack menu' stamp: 'tk 4/15/1998 16:55'!\rdown\r\t\"move down the context stack to the previous (enclosing) context\"\r\r\tself toggleContextStackIndex: contextStackIndex+1! !\r\r!Debugger methodsFor: 'context stack menu' stamp: 'tk 4/17/1998 18:06'!\rfullStack\r\t\"Change from displaying the minimal stack to a full one.\"\r\r\tself contextStackList size > 20 \"Already expanded\"\r\t\tifTrue:\r\t\t\t[self changed: #flash]\r\t\tifFalse:\r\t\t\t[self contextStackIndex = 0 ifFalse: [\r\t\t\t\tself toggleContextStackIndex: self contextStackIndex].\r\t\t\tself fullyExpandStack]! !\r\r!Debugger methodsFor: 'context stack menu' stamp: 'sd 3/4/2004 20:39'!\rimplement: aMessage inClass: aClass\r\t\r\t| category |\r\tcategory := self askForCategoryIn: aClass default: 'as yet unclassified'.\r\taClass compile: aMessage createStubMethod classified: category.\r\tself selectedContext privRefreshWith: (aClass lookupSelector: aMessage selector).\r\tself resetContext: self selectedContext.\r\tself contextStackIndex: 1 oldContextWas: nil\r! !\r\r!Debugger methodsFor: 'context stack menu' stamp: 'sw 3/16/2001 17:20'!\rmessageListMenu: aMenu shifted: shifted\r\t\"The context-stack menu takes the place of the message-list menu in the debugger, so pass it on\"\r\r\t^ self contextStackMenu: aMenu shifted: shifted! !\r\r!Debugger methodsFor: 'context stack menu' stamp: 'ajh 3/4/2004 23:10'!\rpeelToFirst\r\t\"Peel the stack back to the second occurance of the currently selected message.  Very useful for an infinite recursion.  Gets back to the second call so you can see one complete recursion cycle, and how it was called at the beginning.  Also frees a lot of space!!\"\r\r\t| upperGuy meth second ctxt |\r\tcontextStackIndex = 0 ifTrue: [^ Beeper beep].\r\t\"self okToChange ifFalse: [^ self].\"\r\tupperGuy _ contextStack at: contextStackIndex.\r\tmeth _ upperGuy method.\r\tcontextStackIndex+1 to: contextStack size do: [:ind |\r\t\t(contextStack at: ind) method == meth ifTrue: [\r\t\t\tsecond _ upperGuy.\r\t\t\tupperGuy _ contextStack at: ind]].\r\tsecond ifNil: [second _ upperGuy].\r\tctxt _ interruptedProcess popTo: self selectedContext.\r\tctxt == self selectedContext\r\t\tifTrue: [self resetContext: second]\r\t\tifFalse: [self resetContext: ctxt].  \"unwind error\"\r! !\r\r!Debugger methodsFor: 'context stack menu' stamp: 'ads 2/20/2003 08:46'!\rpopulateImplementInMenu: aMenu\r\r\t| msg |\r\tmsg _ self selectedContext at: 1.\r\tself selectedContext receiver class withAllSuperclasses do:\r\t\t[:each |\r\t\taMenu add: each name target: self selector: #implement:inClass: argumentList: (Array with: msg with: each)].\r\t^ aMenu\r\r! !\r\r!Debugger methodsFor: 'context stack menu' stamp: 'di 5/5/1998 00:07'!\rproceed\r\t\"Proceed execution of the receiver's model, starting after the expression at \r\twhich an interruption occurred.\"\r\r\tSmalltalk okayToProceedEvenIfSpaceIsLow ifTrue: [\r\t\tself proceed: self topView].\r! !\r\r!Debugger methodsFor: 'context stack menu' stamp: 'ajh 1/24/2003 12:29'!\rproceed: aTopView \r\t\"Proceed from the interrupted state of the currently selected context. The \r\targument is the topView of the receiver. That view is closed.\"\r\r\tself okToChange ifFalse: [^ self].\r\tself checkContextSelection.\r\tself resumeProcess: aTopView! !\r\r!Debugger methodsFor: 'context stack menu' stamp: 'ajh 3/4/2004 23:14'!\rrestart\r\t\"Proceed from the initial state of the currently selected context. The \r\targument is a controller on a view of the receiver. That view is closed.\"\r\t\"Closing now depends on a preference #restartAlsoProceeds - hmm 9/7/2001 16:46\"\r\r\t| ctxt noUnwindError |\r\tself okToChange ifFalse: [^ self].\r\tself checkContextSelection.\r\tctxt _ interruptedProcess popTo: self selectedContext.\r\tnoUnwindError _ false.\r\tctxt == self selectedContext ifTrue: [\r\t\tnoUnwindError _ true.\r\t\tinterruptedProcess restartTop; stepToSendOrReturn].\r\tself resetContext: ctxt.\r\t(Preferences restartAlsoProceeds and: [noUnwindError]) ifTrue: [self proceed].\r! !\r\r!Debugger methodsFor: 'context stack menu' stamp: 'ajh 1/24/2003 12:29'!\rsend\r\t\"Send the selected message in the accessed method, and take control in \r\tthe method invoked to allow further step or send.\"\r\r\tself okToChange ifFalse: [^ self].\r\tself checkContextSelection.\r\tinterruptedProcess step: self selectedContext.\r\tself resetContext: interruptedProcess stepToSendOrReturn.\r! !\r\r!Debugger methodsFor: 'context stack menu' stamp: 'ajh 1/24/2003 12:46'!\rstepIntoBlock\r\t\"Send messages until you return to the present method context.\r\t Used to step into a block in the method.\"\r\r\tinterruptedProcess stepToHome: self selectedContext.\r\tself resetContext: interruptedProcess stepToSendOrReturn.! !\r\r!Debugger methodsFor: 'context stack menu' stamp: 'tk 4/15/1998 16:55'!\rup\r\t\"move up the context stack to the next (enclosed) context\"\r\r\tcontextStackIndex > 1 ifTrue: [self toggleContextStackIndex: contextStackIndex-1]! !\r\r!Debugger methodsFor: 'context stack menu' stamp: 'nk 2/6/2001 19:34'!\rwhere\r\t\"Select the expression whose evaluation was interrupted.\"\r\r\tselectingPC _ true.\r\tself contextStackIndex: contextStackIndex oldContextWas: self selectedContext\r! !\r\r\r!Debugger methodsFor: 'code pane' stamp: 'tk 4/15/1998 18:31'!\rcontentsSelection\r\r\t^ self pcRange! !\r\r!Debugger methodsFor: 'code pane'!\rdoItContext\r\t\"Answer the context in which a text selection can be evaluated.\"\r\r\tcontextStackIndex = 0\r\t\tifTrue: [^super doItContext]\r\t\tifFalse: [^self selectedContext]! !\r\r!Debugger methodsFor: 'code pane'!\rdoItReceiver\r\t\"Answer the object that should be informed of the result of evaluating a\r\ttext selection.\"\r\r\t^self receiver! !\r\r!Debugger methodsFor: 'code pane' stamp: 'tk 5/2/1998 10:04'!\rpc\r\r\t^ self pcRange! !\r\r!Debugger methodsFor: 'code pane' stamp: 'nk 2/20/2004 15:35'!\rpcRange\r\t\"Answer the indices in the source code for the method corresponding to \r\tthe selected context's program counter value.\"\r\r\t| i pc end |\r\t(selectingPC and: [contextStackIndex ~= 0])\r\t\tifFalse: [^1 to: 0].\r\tsourceMap ifNil:\r\t\t[sourceMap _ theMethodNode sourceMap.\r\t\ttempNames _ theMethodNode tempNames.\r\t\tself selectedContext method cacheTempNames: tempNames].\r\t(sourceMap size = 0 or: [ self selectedContext isDead ]) ifTrue: [^1 to: 0].\r\tSmalltalk at: #RBProgramNode ifPresent:[:nodeClass|\r\t\t(theMethodNode isKindOf: nodeClass) ifTrue: [\r\t\t\tpc _ contextStackIndex = 1\r\t\t\t\tifTrue: [self selectedContext pc]\r\t\t\t\tifFalse: [self selectedContext previousPc].\r\t\t\ti _ sourceMap findLast:[:pcRange | pcRange key <= pc].\r\t\t\ti = 0 ifTrue:[^ 1 to: 0].\r\t\t\t^ (sourceMap at: i) value\r\t\t].\r\t].\r\tpc_ self selectedContext pc -\r\t\t((\"externalInterrupt\" true and: [contextStackIndex=1])\r\t\t\tifTrue: [1]\r\t\t\tifFalse: [2]).\r\ti _ sourceMap indexForInserting: (Association key: pc value: nil).\r\ti < 1 ifTrue: [^1 to: 0].\r\ti > sourceMap size\r\t\tifTrue:\r\t\t\t[end _ sourceMap inject: 0 into:\r\t\t\t\t[:prev :this | prev max: this value last].\r\t\t\t^ end+1 to: end].\r\t^(sourceMap at: i) value! !\r\r\r!Debugger methodsFor: 'code pane menu' stamp: 'tk 4/17/1998 17:25'!\rperform: selector orSendTo: otherTarget\r\t\"Selector was just chosen from a menu by a user.  If can respond, then perform it on myself.  If not, send it to otherTarget, presumably the editPane from which the menu was invoked.\" \r\r\t| result |\r\t(#(debug proceed) includes: selector)\t\t\"When I am a notifier window\"\r\t\tifTrue: [^ self perform: selector]\r\t\tifFalse: [result _ super perform: selector orSendTo: otherTarget.\r\t\t\t\tselector == #doIt ifTrue: [\r\t\t\t\t\tresult ~~ #failedDoit ifTrue: [self proceedValue: result]].\r\t\t\t\t^ result]! !\r\r\r!Debugger methodsFor: 'message category list'!\rselectedMessageCategoryName\r\t\"Answer the name of the message category of the message of the \r\tcurrently selected context.\"\r\r\t^self selectedClass organization categoryOfElement: self selectedMessageName! !\r\r\r!Debugger methodsFor: 'class list'!\rselectedClass\r\t\"Answer the class in which the currently selected context's method was \r\tfound.\"\r\r\t^self selectedContext mclass! !\r\r!Debugger methodsFor: 'class list'!\rselectedClassOrMetaClass\r\t\"Answer the class in which the currently selected context's method was \r\tfound.\"\r\r\t^self selectedContext mclass! !\r\r\r!Debugger methodsFor: 'dependents access' stamp: 'di 1/14/1999 09:28'!\rstep \r\t\"Update the inspectors.\"\r\r\treceiverInspector ifNotNil: [receiverInspector step].\r\tcontextVariablesInspector ifNotNil: [contextVariablesInspector step].\r! !\r\r!Debugger methodsFor: 'dependents access' stamp: 'hmm 7/15/2001 19:48'!\rupdateInspectors \r\t\"Update the inspectors on the receiver's variables.\"\r\r\treceiverInspector == nil ifFalse: [receiverInspector update].\r\tcontextVariablesInspector == nil ifFalse: [contextVariablesInspector update]! !\r\r!Debugger methodsFor: 'dependents access' stamp: 'di 1/14/1999 09:25'!\rwantsSteps\r \r\t^ true! !\r\r\r!Debugger methodsFor: 'private' stamp: 'yo 8/12/2003 16:34'!\rcheckContextSelection\r\r\tcontextStackIndex = 0 ifTrue: [self contextStackIndex: 1 oldContextWas: nil].\r! !\r\r!Debugger methodsFor: 'private' stamp: 'nk 2/20/2004 16:51'!\rcontextStackIndex: anInteger oldContextWas: oldContext \r\t\"Change the context stack index to anInteger, perhaps in response to user selection.\"\r\r\t| newMethod |\r\tcontextStackIndex := anInteger.\r\tanInteger = 0\r\t\tifTrue: [currentCompiledMethod := theMethodNode := tempNames := sourceMap := contents := nil.\r\t\t\tself changed: #contextStackIndex.\r\t\t\tself decorateButtons.\r\t\t\tself contentsChanged.\r\t\t\tcontextVariablesInspector object: nil.\r\t\t\treceiverInspector object: self receiver.\r\t\t\t^ self].\r\t(newMethod := oldContext == nil\r\t\t\t\t\tor: [oldContext method ~~ (currentCompiledMethod := self selectedContext method)])\r\t\tifTrue: [tempNames := sourceMap := nil.\r\t\t\ttheMethodNode := Preferences browseWithPrettyPrint\r\t\t\t\tifTrue: [ \tself selectedContext methodNodeFormattedAndDecorated: Preferences colorWhenPrettyPrinting ]\r\t\t\t\tifFalse: [\tself selectedContext methodNode ].\r\t\t\tcontents := self selectedMessage.\r\t\t\tself contentsChanged.\r\t\t\tself pcRange\r\t\t\t\"will compute tempNamesunless noFrills\"].\r\tself changed: #contextStackIndex.\r\tself decorateButtons.\r\ttempNames == nil\r\t\tifTrue: [tempNames := self selectedClassOrMetaClass parserClass new parseArgsAndTemps: contents notifying: nil].\r\tcontextVariablesInspector object: self selectedContext.\r\treceiverInspector object: self receiver.\r\tnewMethod\r\t\tifFalse: [self changed: #contentsSelection]! !\r\r!Debugger methodsFor: 'private'!\rexternalInterrupt: aBoolean\r\r\texternalInterrupt _ aBoolean ! !\r\r!Debugger methodsFor: 'private' stamp: 'tk 8/17/2000 15:36'!\risolationRecoveryAdvice\r\t\"Return a notifier message string to be presented in case of recovery from recursive error by revoking the changes in an isolation layer.  This surely ranks as one of Squeak's longer help messages.\"\r\r\t^ 'Warning!! You have encountered a recursive error situation.\r\rDon''t panic, but do read the following advice.  If you were just fooling around, the simplest thing to do is to quit and NOT save, and restart Squeak.  If you care about recovery, then read on...\r\rIn the process of diagnosing one error, further errors occurred, making it impossible to give you a debugger to work with.  Squeak has jumped to an outer project where many of the objects and code changes that might have caused this problem are not involved in normal operation.  If you are looking at this window, chances are that this first level of recovery was successful.  If there are changes you care a lot about, try to save them now.  Then, hopefully, from the state in this debugger, you can determine what the problem was and fix it.  Do not save this image until you are confident of its recovery.\r\rYou are no longer in the world that is damaged.  The two most likely causes of recursive errors are malformed objects (for instance a corrupt value encountered in any display of the desktop) and recurring code errors (such as a change that causes errors in any attempt to display the desktop).\r\rIn the case of malformed objects, you can attempt to repair them by altering various bindings in the corrupted environment.  Open this debugger and examine the state of the objects closest to the error.\r\rIn the case of code errors, note that you are no longer in a world where the erroneous code is in effect.  The only simple option available is for you to browse to the changeSet for the project in distress, and remove one or more of the changes (later it will be possible to edit the code remotely from here).\r\rIf you feel you have repaired the problem, then you may proceed from this debugger.  This will put you back in the project that failed with the changes that failed for another try.  Note that the debugger from which you are proceeding is the second one that occurred;  you will likely find the first one waiting for you when you reenter the failed project!!  Also note that if your error occurred while displaying a morph, it may now be flagged as undisplayable (red with yellow cross);  if so, use the morph debug menu to choose ''start drawing again''.\r\rIf you have not repaired the problem, you should close this debugger and delete the failed project after retrieving whatever may be of value in it.\r\rGood luck.\r\r\t- The Squeak Fairy Godmother\r\rPS:  If you feel you need the help of a quantum mechanic, do NOT close this window.  Instead, the best thing to do (after saving anything that seems safe to save) would be to use the ''save as...'' command in the world menu, and give it a new image name, such as OOPS.  There is a good chance that someone who knows their way around Squeak can help you out.\r'! !\r\r!Debugger methodsFor: 'private' stamp: 'jm 5/1/1998 16:20'!\rlowSpaceChoices\r\t\"Return a notifier message string to be presented when space is running low.\"\r\r\t^ 'Warning!! Squeak is almost out of memory!!\r\rLow space detection is now disabled. It will be restored when you close or proceed from this error notifier. Don''t panic, but do proceed with caution.\r\rHere are some suggestions:\r\r If you suspect an infinite recursion (the same methods calling each other again and again), then close this debugger, and fix the problem.\r\r If you want this computation to finish, then make more space available (read on) and choose \"proceed\" in this debugger. Here are some ways to make more space available...\r   > Close any windows that are not needed.\r   > Get rid of some large objects (e.g., images).\r   > Leave this window on the screen, choose \"save as...\" from the screen menu, quit, restart the Squeak VM with a larger memory allocation, then restart the image you just saved, and choose \"proceed\" in this window.\r\r If you want to investigate further, choose \"debug\" in this window.  Do not use the debugger \"fullStack\" command unless you are certain that the stack is not very deep. (Trying to show the full stack will definitely use up all remaining memory if the low-space problem is caused by an infinite recursion!!).\r\r'\r! !\r\r!Debugger methodsFor: 'private'!\rnewStack: stack\r\t| oldStack diff |\r\toldStack _ contextStack.\r\tcontextStack _ stack.\r\t(oldStack == nil or: [oldStack last ~~ stack last])\r\t\tifTrue: [contextStackList _ contextStack collect: [:ctx | ctx printString].\r\t\t\t\t^ self].\r\t\"May be able to re-use some of previous list\"\r\tdiff _ stack size - oldStack size.\r\tcontextStackList _ diff <= 0\r\t\tifTrue: [contextStackList copyFrom: 1-diff to: oldStack size]\r\t\tifFalse: [diff > 1\r\t\t\t\tifTrue: [contextStack collect: [:ctx | ctx printString]]\r\t\t\t\tifFalse: [(Array with: stack first printString) , contextStackList]]! !\r\r!Debugger methodsFor: 'private' stamp: 'di 4/14/2000 16:24'!\rprocess: aProcess controller: aController context: aContext\r\r\t^ self process: aProcess controller: aController context: aContext isolationHead: nil! !\r\r!Debugger methodsFor: 'private' stamp: 'ssa 9/3/2008 11:03'!\rprocess: aProcess controller: aController context: aContext isolationHead: projectOrNil\r\r\tsuper initialize.\r\tSmalltalk at: #MessageTally ifPresentAndInMemory: [:c | c new close].\r\tcontents _ nil. \r\tinterruptedProcess _ aProcess.\r\tinterruptedController _ aController.\r\tcontextStackTop _ aContext.\r\tself newStack: (contextStackTop stackOfSize: 1).\r\tcontextStackIndex _ 1.\r\texternalInterrupt _ false.\r\tselectingPC _ true.\r\tisolationHead _ projectOrNil.\r! !\r\r!Debugger methodsFor: 'private' stamp: 'ajh 9/25/2001 00:14'!\rresetContext: aContext \r\t\"Used when a new context becomes top-of-stack, for instance when the\r\tmethod of the selected context is re-compiled, or the simulator steps or\r\treturns to a new method. There is room for much optimization here, first\r\tto save recomputing the whole stack list (and text), and secondly to avoid\r\trecomposing all that text (by editing the paragraph instead of recreating it).\"\r\r\t| oldContext |\r\toldContext _ self selectedContext.\r\tcontextStackTop _ aContext.\r\tself newStack: contextStackTop contextStack.\r\tself changed: #contextStackList.\r\tself contextStackIndex: 1 oldContextWas: oldContext.\r\tself changed: #content.! !\r\r!Debugger methodsFor: 'private' stamp: 'ssa 9/3/2008 11:04'!\rresumeProcess: aTopView \r\tSmalltalk isMorphic\r\t\tifFalse: [aTopView erase].\r\tsavedCursor\r\t\tifNotNil: [Sensor currentCursor: savedCursor].\r\tisolationHead\r\t\tifNotNil: [failedProject enterForEmergencyRecovery.\r\t\t\tisolationHead invoke.\r\t\t\tisolationHead _ nil].\r\tinterruptedProcess isTerminated ifFalse: [\r\t\tSmalltalk isMorphic\r\t\t\tifTrue: []\r\t\t\tifFalse: [ScheduledControllers activeControllerNoTerminate: interruptedController andProcess: interruptedProcess]].\r\t\"if old process was terminated, just terminate current one\"\r\tinterruptedProcess _ nil.\r\t\"Before delete, so release doesn't terminate it\"\r\tSmalltalk isMorphic\r\t\tifTrue: []\r\t\tifFalse: [aTopView controller closeAndUnscheduleNoErase].\r\tSmalltalk installLowSpaceWatcher.\r\t\"restart low space handler\"\r\terrorWasInUIProcess == false\r\t\tifFalse: [Processor terminateActive]! !\r\r!Debugger methodsFor: 'private'!\rselectedContext\r\r\tcontextStackIndex = 0\r\t\tifTrue: [^contextStackTop]\r\t\tifFalse: [^contextStack at: contextStackIndex]! !\r\r\r!Debugger methodsFor: 'as yet unclassified' stamp: 'nk 8/6/2003 13:52'!\rcodePaneMenu: aMenu shifted: shifted\r\taMenu add: 'run to here' target: self selector: #runToSelection: argument: thisContext sender receiver selectionInterval.\r\taMenu addLine.\r\tsuper codePaneMenu: aMenu shifted: shifted.\r\t^aMenu.! !\r\r!Debugger methodsFor: 'as yet unclassified' stamp: 'nk 5/31/2003 07:38'!\rrunToSelection: selectionInterval\r\t| currentContext |\r\tself pc first >= selectionInterval first ifTrue: [ ^self ].\r\tcurrentContext _ self selectedContext.\r\t[ currentContext == self selectedContext and: [ self pc first < selectionInterval first ] ] whileTrue: [ self doStep ].! !\r\r\r!Debugger methodsFor: 'breakpoints' stamp: 'emm 5/30/2002 10:08'!\rtoggleBreakOnEntry\r\t\"Install or uninstall a halt-on-entry breakpoint\"\r\r\t| selectedMethod |\r\tself selectedClassOrMetaClass isNil ifTrue:[^self].\r\tselectedMethod := self selectedClassOrMetaClass >> self selectedMessageName.\r\tselectedMethod hasBreakpoint\r\t\tifTrue:\r\t\t\t[BreakpointManager unInstall: selectedMethod]\r\t\tifFalse:\r\t\t\t[BreakpointManager \r\t\t\t\tinstallInClass: self selectedClassOrMetaClass\r\t\t\t\tselector: self selectedMessageName].! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rDebugger class\r\tinstanceVariableNames: ''!\r\r!Debugger class methodsFor: 'class initialization' stamp: 'hg 9/29/2001 20:24'!\rinitialize\r\tErrorRecursion _ false.\r\tContextStackKeystrokes _ Dictionary new\r\t\tat: $e put: #send;\r\t\tat: $t put: #doStep;\r\t\tat: $T put: #stepIntoBlock;\r\t\tat: $p put: #proceed;\r\t\tat: $r put: #restart;\r\t\tat: $f put: #fullStack;\r\t\tat: $w put: #where;\r\t\tyourself.\r\r\t\"Debugger initialize\"! !\r\r!Debugger class methodsFor: 'class initialization' stamp: 'BG 10/30/2003 20:37'!\ropenContext: aContext label: aString contents: contentsStringOrNil\r\t| isolationHead |\r\t\"Open a notifier in response to an error, halt, or notify. A notifier view just shows a short view of the sender stack and provides a menu that lets the user open a full debugger.\"\r\t<primitive: 19> \"Simulation guard\"\r\tErrorRecursion not & Preferences logDebuggerStackToFile ifTrue:\r\t\t[Smalltalk logError: aString inContext: aContext to: 'SqueakDebug.log'].\r\tErrorRecursion ifTrue:\r\t\t[ErrorRecursion _ false.\r\t\t\"(isolationHead _ CurrentProjectRefactoring currentIsolationHead)\r\t\t\tifNil: [self primitiveError: aString]\r\t\t\tifNotNil: [isolationHead revoke]\"].\r\tErrorRecursion _ true.\r\tself informExistingDebugger: aContext label: aString.\r\t(Debugger context: aContext isolationHead: nil)\r\t\topenNotifierContents: contentsStringOrNil\r\t\tlabel: aString.\r\tErrorRecursion _ false.\r\tProcessor activeProcess suspend.\r! !\r\r\r!Debugger class methodsFor: 'instance creation' stamp: 'di 4/14/2000 16:29'!\rcontext: aContext \r\t\"Answer an instance of me for debugging the active process starting with the given context.\"\r\r\t^ self context: aContext isolationHead: nil! !\r\r!Debugger class methodsFor: 'instance creation' stamp: 'di 4/14/2000 16:29'!\rcontext: aContext isolationHead: isolationHead\r\t\"Answer an instance of me for debugging the active process starting with the given context.\"\r\r\t^ self new\r\t\tprocess: Processor activeProcess\r\t\tcontroller:\r\t\t\t((Smalltalk isMorphic not and: [ScheduledControllers inActiveControllerProcess])\r\t\t\t\tifTrue: [ScheduledControllers activeController]\r\t\t\t\tifFalse: [nil])\r\t\tcontext: aContext\r\t\tisolationHead: isolationHead\r! !\r\r!Debugger class methodsFor: 'instance creation' stamp: 'hmm 8/3/2001 13:05'!\rinformExistingDebugger: aContext label: aString\r\t\"Walking the context chain, we try to find out if we're in a debugger stepping situation.\r\tIf we find the relevant contexts, we must rearrange them so they look just like they would\r\tif the methods were excuted outside of the debugger.\"\r\t| ctx quickStepMethod oldSender baseContext |\r\tctx _ thisContext.\r\tquickStepMethod _ ContextPart compiledMethodAt: #quickSend:to:with:super:.\r\t[ctx sender == nil or: [ctx sender method == quickStepMethod]] whileFalse: [ctx _ ctx sender].\r\tctx sender == nil ifTrue: [^self].\r\tbaseContext _ ctx.\r\t\"baseContext is now the context created by the #quickSend... method.\"\r\toldSender _ ctx _ ctx sender home sender.\r\t\"oldSender is the context which originally sent the #quickSend... method\"\r\t[ctx == nil or: [ctx receiver isKindOf: self]] whileFalse: [ctx _ ctx sender].\r\tctx == nil ifTrue: [^self].\r\t\"ctx is the context of the Debugger method #doStep\"\r\tctx receiver labelString: aString.\r\tctx receiver externalInterrupt: false; proceedValue: aContext receiver.\r\tbaseContext swapSender: baseContext sender sender sender.\t\"remove intervening contexts\"\r\tthisContext swapSender: oldSender.\t\"make myself return to debugger\"\r\tErrorRecursion _ false.\r\t^aContext! !\r\r\r!Debugger class methodsFor: 'opening' stamp: 'hg 10/2/2001 20:45'!\ropenInterrupt: aString onProcess: interruptedProcess\r\t\"Open a notifier in response to an interrupt. An interrupt occurs when the user types the interrupt key (cmd-. on Macs, ctrl-c or alt-. on other systems) or when the low-space watcher detects that memory is low.\"\r\t| debugger |\r\t<primitive: 19> \"Simulation guard\"\r\tdebugger _ self new.\r\tdebugger\r\t\tprocess: interruptedProcess\r\t\tcontroller: ((Smalltalk isMorphic not\r\t\t\t\t\tand: [ScheduledControllers activeControllerProcess == interruptedProcess])\r\t\t\t\t\t\tifTrue: [ScheduledControllers activeController])\r\t\tcontext: interruptedProcess suspendedContext.\r\tdebugger externalInterrupt: true.\r\rPreferences logDebuggerStackToFile ifTrue:\r\t[(aString includesSubString: 'Space') & \r\t\t(aString includesSubString: 'low') ifTrue: [\r\t\t\tSmalltalk logError: aString inContext: debugger interruptedContext to:'LowSpaceDebug.log']].\r\r\t^ debugger\r\t\topenNotifierContents: nil\r\t\tlabel: aString\r! !\r\r!Debugger class methodsFor: 'opening' stamp: 'ssa 9/3/2008 11:06'!\ropenOn: process context: context label: title contents: contentsStringOrNil fullView: bool\r\t\"Open a notifier in response to an error, halt, or notify. A notifier view just shows a short view of the sender stack and provides a menu that lets the user open a full debugger.\"\r\r\t| controller |\r\tSmalltalk isMorphic\r\t\tifTrue: []\r\t\tifFalse: [controller _ ScheduledControllers activeControllerProcess == process\r\t\t\t\tifTrue: [ScheduledControllers activeController]].\r\t[\r\t\t[\t| debugger |\r\t\t\tdebugger _ self new process: process controller: controller context: context.\r\t\t\tbool ifTrue: [debugger openFullNoSuspendLabel: title]\r\t\t\t\tifFalse: [debugger openNotifierContents: contentsStringOrNil label: title].\r\t\t\tPreferences logDebuggerStackToFile ifTrue: [\r\t\t\t\tSmalltalk logError: title inContext: context to: 'SqueakDebug.log'].\r\t\t\tSmalltalk isMorphic\r\t\t\t\tifFalse: [ScheduledControllers searchForActiveController \"needed since openNoTerminate (see debugger #open...) does not set up activeControllerProcess if activeProcess (this fork) is not the current activeControllerProcess (see #scheduled:from:)\"].\r\t\t] on: Error do: [:ex |\r\t\t\tself primitiveError: \r\t\t\t\t'Orginal error: ', \r\t\t\t\ttitle asString, '.\r\tDebugger error: ', \r\t\t\t\t([ex description] on: Error do: ['a ', ex class printString]), ':'\r\t\t]\r\t] fork.\r\tprocess suspend.\r! !\r\rInstructionStream subclass: #Decompiler\r\tinstanceVariableNames: 'constructor method instVars tempVars constTable stack statements lastPc exit lastJumpPc lastReturnPc limit hasValue blockStackBase'\r\tclassVariableNames: 'ArgumentFlag CascadeFlag CaseFlag IfNilFlag'\r\tpoolDictionaries: ''\r\tcategory: 'System-Compiler'!\r!Decompiler commentStamp: '<historical>' prior: 0!\rI decompile a method in three phases:\r\tReverser: postfix byte codes -> prefix symbolic codes (nodes and atoms)\r\tParser: prefix symbolic codes -> node tree (same as the compiler)\r\tPrinter: node tree -> text (done by the nodes)!\r\r\r!Decompiler methodsFor: 'initialize-release' stamp: 'ajh 7/21/2003 01:14'!\rinitSymbols: aClass\r\t| nTemps namedTemps |\r\tconstructor method: method class: aClass literals: method literals.\r\tconstTable _ constructor codeConstants.\r\tinstVars _ Array new: aClass instSize.\r\tnTemps _ method numTemps.\r\tnamedTemps _ tempVars ifNil: [method tempNames].\r\ttempVars _ (1 to: nTemps) collect:\r\t\t\t\t[:i | i <= namedTemps size\r\t\t\t\t\tifTrue: [constructor codeTemp: i - 1 named: (namedTemps at: i)]\r\t\t\t\t\tifFalse: [constructor codeTemp: i - 1]]! !\r\r!Decompiler methodsFor: 'initialize-release'!\rwithTempNames: tempNameArray\r\ttempVars _ tempNameArray! !\r\r\r!Decompiler methodsFor: 'control' stamp: 'tao 8/20/97 22:51'!\rblockForCaseTo: end\r\t\"Decompile a range of code as in statementsForCaseTo:, but return a block node.\"\r\t| exprs block oldBase |\r\toldBase _ blockStackBase.\r\tblockStackBase _ stack size.\r\texprs _ self statementsForCaseTo: end.\r\tblock _ constructor codeBlock: exprs returns: lastReturnPc = lastPc.\r\tblockStackBase _ oldBase.\r\tlastReturnPc _ -1.  \"So as not to mislead outer calls\"\r\t^block! !\r\r!Decompiler methodsFor: 'control'!\rblockTo: end\r\t\"Decompile a range of code as in statementsTo:, but return a block node.\"\r\t| exprs block oldBase |\r\toldBase _ blockStackBase.\r\tblockStackBase _ stack size.\r\texprs _ self statementsTo: end.\r\tblock _ constructor codeBlock: exprs returns: lastReturnPc = lastPc.\r\tblockStackBase _ oldBase.\r\tlastReturnPc _ -1.  \"So as not to mislead outer calls\"\r\t^block! !\r\r!Decompiler methodsFor: 'control'!\rcheckForBlock: receiver\r\t\"We just saw a blockCopy: message. Check for a following block.\"\r\r\t| savePc jump args argPos block |\r\treceiver == constructor codeThisContext ifFalse: [^false].\r\tsavePc _ pc.\r\t(jump _ self interpretJump) notNil\r\t\tifFalse:\r\t\t\t[pc _ savePc.  ^nil].\r\t\"Definitely a block\"\r\tjump _ jump + pc.\r\targPos _ statements size.\r\t[self willStorePop]\r\t\twhileTrue:\r\t\t\t[stack addLast: ArgumentFlag.  \"Flag for doStore:\"\r\t\t\tself interpretNextInstructionFor: self].\r\targs _ Array new: statements size - argPos.\r\t1 to: args size do:  \"Retrieve args\"\r\t\t[:i | args at: i put: statements removeLast.\r\t\t(args at: i) scope: -1  \"flag args as block temps\"].\r\tblock _ self blockTo: jump.\r\tstack addLast: (constructor codeArguments: args block: block).\r\t^true! !\r\r!Decompiler methodsFor: 'control' stamp: 'tao 8/20/97 22:51'!\rstatementsForCaseTo: end\r\t\"Decompile the method from pc up to end and return an array of\r\texpressions. If at run time this block will leave a value on the stack,\r\tset hasValue to true. If the block ends with a jump or return, set exit\r\tto the destination of the jump, or the end of the method; otherwise, set\r\texit = end. Leave pc = end.\r\tNote that stack initially contains a CaseFlag which will be removed by\r\ta subsequent Pop instruction, so adjust the StackPos accordingly.\"\r\r\t| blockPos stackPos t |\r\tblockPos _ statements size.\r\tstackPos _ stack size - 1. \"Adjust for CaseFlag\"\r\t[pc < end]\r\t\twhileTrue:\r\t\t\t[lastPc _ pc.  limit _ end.  \"for performs\"\r\t\t\tself interpretNextInstructionFor: self].\r\t\"If there is an additional item on the stack, it will be the value\r\tof this block.\"\r\t(hasValue _ stack size > stackPos)\r\t\tifTrue:\r\t\t\t[statements addLast: stack removeLast].\r\tlastJumpPc = lastPc ifFalse: [exit _ pc].\r\t^self popTo: blockPos! !\r\r!Decompiler methodsFor: 'control'!\rstatementsTo: end\r\t\"Decompile the method from pc up to end and return an array of\r\texpressions. If at run time this block will leave a value on the stack,\r\tset hasValue to true. If the block ends with a jump or return, set exit\r\tto the destination of the jump, or the end of the method; otherwise, set\r\texit = end. Leave pc = end.\"\r\r\t| blockPos stackPos t |\r\tblockPos _ statements size.\r\tstackPos _ stack size.\r\t[pc < end]\r\t\twhileTrue:\r\t\t\t[lastPc _ pc.  limit _ end.  \"for performs\"\r\t\t\tself interpretNextInstructionFor: self].\r\t\"If there is an additional item on the stack, it will be the value\r\tof this block.\"\r\t(hasValue _ stack size > stackPos)\r\t\tifTrue:\r\t\t\t[statements addLast: stack removeLast].\r\tlastJumpPc = lastPc ifFalse: [exit _ pc].\r\t^self popTo: blockPos! !\r\r\r!Decompiler methodsFor: 'instruction decoding'!\rblockReturnTop\r\t\"No action needed\"! !\r\r!Decompiler methodsFor: 'instruction decoding' stamp: 'md 11/14/2003 16:28'!\rcase: dist\r\t\"statements = keyStmts CascadeFlag keyValueBlock ... keyStmts\"\r\r\t| nextCase end thenJump stmtStream elements b node cases otherBlock |\r\tnextCase _ pc + dist.\r\tend _ limit.\r\t\"Now add CascadeFlag & keyValueBlock to statements\"\r\tstatements addLast: stack removeLast.\r\tstack addLast: CaseFlag. \"set for next pop\"\r\tstatements addLast: (self blockForCaseTo: nextCase).\r\tstack last == CaseFlag\r\t\tifTrue: \"Last case\"\r\t\t\t[\"ensure jump is within block (in case thenExpr returns wierdly I guess)\"\r\t\t\tstack removeLast. \"get rid of CaseFlag\"\r\t\t\tthenJump _ exit <= end ifTrue: [exit] ifFalse: [nextCase].\r\t\t\tstmtStream _ ReadStream on: (self popTo: stack removeLast).\r\t\t\telements _ OrderedCollection new.\r\t\t\tb _ OrderedCollection new.\r\t\t\t[stmtStream atEnd] whileFalse:\r\t\t\t\t[(node _ stmtStream next) == CascadeFlag\r\t\t\t\t\tifTrue:\r\t\t\t\t\t\t[elements addLast: (constructor\r\t\t\t\t\t\t\tcodeMessage: (constructor codeBlock: b returns: false)\r\t\t\t\t\t\t\tselector: (constructor codeSelector: #-> code: #macro)\r\t\t\t\t\t\t\targuments: (Array with: stmtStream next)).\r\t\t\t\t\t\t b _ OrderedCollection new]\r\t\t\t\t\tifFalse: [b addLast: node]].\r\t\t\tb size > 0 ifTrue: [self error: 'Bad cases'].\r\t\t\tcases _ constructor codeBrace: elements.\r\t\t\totherBlock _ self blockTo: thenJump.\r\t\t\tstack addLast:\r\t\t\t\t(constructor\r\t\t\t\t\tcodeMessage: stack removeLast\r\t\t\t\t\tselector: (constructor codeSelector: #caseOf:otherwise: code: #macro)\r\t\t\t\t\targuments: (Array with: cases with: otherBlock))]! !\r\r!Decompiler methodsFor: 'instruction decoding'!\rdoDup\r\r\tstack last == CascadeFlag\r\t\tifFalse:\r\t\t\t[\"Save position and mark cascade\"\r\t\t\tstack addLast: statements size.\r\t\t\tstack addLast: CascadeFlag].\r\tstack addLast: CascadeFlag! !\r\r!Decompiler methodsFor: 'instruction decoding' stamp: 'di 2/5/2000 09:34'!\rdoPop\r\r\tstack isEmpty ifTrue:\r\t\t[\"Ignore pop in first leg of ifNil for value\"\r\t\t^ self].\r\tstack last == CaseFlag\r\t\tifTrue: [stack removeLast]\r\t\tifFalse: [statements addLast: stack removeLast].! !\r\r!Decompiler methodsFor: 'instruction decoding'!\rdoStore: stackOrBlock\r\t\"Only called internally, not from InstructionStream. StackOrBlock is stack\r\tfor store, statements for storePop.\"\r\r\t| var expr |\r\tvar _ stack removeLast.\r\texpr _ stack removeLast.\r\tstackOrBlock addLast: (expr == ArgumentFlag\r\t\tifTrue: [var]\r\t\tifFalse: [constructor codeAssignTo: var value: expr])! !\r\r!Decompiler methodsFor: 'instruction decoding'!\rjump: dist\r\r\texit _ pc + dist.\r\tlastJumpPc _ lastPc! !\r\r!Decompiler methodsFor: 'instruction decoding' stamp: 'di 2/6/2000 08:46'!\rjump: dist if: condition\r\r\t| savePc elseDist sign elsePc elseStart end cond ifExpr thenBlock elseBlock thenJump\r\t\telseJump condHasValue b isIfNil saveStack |\r\tstack last == CascadeFlag ifTrue: [^ self case: dist].\r\telsePc _ lastPc.\r\telseStart _ pc + dist.\r\tend _ limit.\r\t\"Check for bfp-jmp to invert condition.\r\tDon't be fooled by a loop with a null body.\"\r\tsign _ condition.\r\tsavePc _ pc.\r\t((elseDist _ self interpretJump) notNil and: [elseDist >= 0 and: [elseStart = pc]])\r\t\tifTrue: [sign _ sign not.  elseStart _ pc + elseDist].\r\tpc _ savePc.\r\tifExpr _ stack removeLast.\r\t(stack size > 0 and: [stack last == IfNilFlag])\r\t\tifTrue: [stack removeLast.  isIfNil _ true]\r\t\tifFalse: [isIfNil _ false].\r\tsaveStack _ stack.\r\tstack _ OrderedCollection new.\r\tthenBlock _ self blockTo: elseStart.\r\tcondHasValue _ hasValue or: [isIfNil].\r\t\"ensure jump is within block (in case thenExpr returns)\"\r\tthenJump _ exit <= end ifTrue: [exit] ifFalse: [elseStart].\r\t\"if jump goes back, then it's a loop\"\r\tthenJump < elseStart\r\t\tifTrue:\r\t\t\t[\"Must be a while loop...\r\t\t\tthenJump will jump to the beginning of the while expr.  In the case of\r\t\t\twhile's with a block in the condition, the while expr\r\t\t\tshould include more than just the last expression: find all the\r\t\t\tstatements needed by re-decompiling.\"\r\t\t\tstack _ saveStack.\r\t\t\tpc _ thenJump.\r\t\t\tb _ self statementsTo: elsePc.\r\t\t\t\"discard unwanted statements from block\"\r\t\t\tb size - 1 timesRepeat: [statements removeLast].\r\t\t\tstatements addLast: (constructor\r\t\t\t\t\tcodeMessage: (constructor codeBlock: b returns: false)\r\t\t\t\t\tselector: (constructor codeSelector: (sign ifTrue: [#whileFalse:] ifFalse: [#whileTrue:]) code: #macro)\r\t\t\t\t\targuments: (Array with: thenBlock)).\r\t\t\tpc _ elseStart.\r\t\t\tself convertToDoLoop]\r\t\tifFalse:\r\t\t\t[\"Must be a conditional...\"\r\t\t\telseBlock _ self blockTo: thenJump.\r\t\t\telseJump _ exit.\r\t\t\t\"if elseJump is backwards, it is not part of the elseExpr\"\r\t\t\telseJump < elsePc\r\t\t\t\tifTrue: [pc _ lastPc].\r\t\t\tisIfNil\r\t\t\tifTrue: [cond _ constructor\r\t\t\t\t\t\tcodeMessage: ifExpr ifNilReceiver\r\t\t\t\t\t\tselector: (sign\r\t\t\t\t\t\t\tifTrue: [constructor codeSelector: #ifNotNil: code: #macro]\r\t\t\t\t\t\t\tifFalse: [constructor codeSelector: #ifNil: code: #macro])\r\t\t\t\t\t\targuments: (Array with: thenBlock)]\r\t\t\tifFalse: [cond _ constructor\r\t\t\t\t\t\tcodeMessage: ifExpr\r\t\t\t\t\t\tselector: (constructor codeSelector: #ifTrue:ifFalse: code: #macro)\r\t\t\t\t\t\targuments:\r\t\t\t\t\t\t\t(sign\r\t\t\t\t\t\t\t\tifTrue: [Array with: elseBlock with: thenBlock]\r\t\t\t\t\t\t\t\tifFalse: [Array with: thenBlock with: elseBlock])].\r\t\t\tstack _ saveStack.\r\t\t\tcondHasValue\r\t\t\t\tifTrue: [stack addLast: cond]\r\t\t\t\tifFalse: [statements addLast: cond]]! !\r\r!Decompiler methodsFor: 'instruction decoding'!\rmethodReturnConstant: value\r\r\tself pushConstant: value; methodReturnTop! !\r\r!Decompiler methodsFor: 'instruction decoding'!\rmethodReturnReceiver\r\r\tself pushReceiver; methodReturnTop! !\r\r!Decompiler methodsFor: 'instruction decoding' stamp: 'th 3/17/2000 20:48'!\rmethodReturnTop\r\t| last |\r\tlast _ stack removeLast \"test test\" asReturnNode.\r\tstack size > blockStackBase  \"get effect of elided pop before return\"\r\t\tifTrue: [statements addLast: stack removeLast].\r\texit _ method size + 1.\r\tlastJumpPc _ lastReturnPc _ lastPc.\r\tstatements addLast: last! !\r\r!Decompiler methodsFor: 'instruction decoding'!\rpopIntoLiteralVariable: value\r\r\tself pushLiteralVariable: value; doStore: statements! !\r\r!Decompiler methodsFor: 'instruction decoding'!\rpopIntoReceiverVariable: offset\r\r\tself pushReceiverVariable: offset; doStore: statements! !\r\r!Decompiler methodsFor: 'instruction decoding'!\rpopIntoTemporaryVariable: offset\r\r\tself pushTemporaryVariable: offset; doStore: statements! !\r\r!Decompiler methodsFor: 'instruction decoding'!\rpushActiveContext\r\r\tstack addLast: constructor codeThisContext! !\r\r!Decompiler methodsFor: 'instruction decoding'!\rpushConstant: value\r\r\t| node |\r\tnode _ value == true ifTrue: [constTable at: 2]\r\t\tifFalse: [value == false ifTrue: [constTable at: 3]\r\t\tifFalse: [value == nil ifTrue: [constTable at: 4]\r\t\tifFalse: [constructor codeAnyLiteral: value]]].\r\tstack addLast: node! !\r\r!Decompiler methodsFor: 'instruction decoding'!\rpushLiteralVariable: assoc\r\r\tstack addLast: (constructor codeAnyLitInd: assoc)! !\r\r!Decompiler methodsFor: 'instruction decoding'!\rpushReceiver\r\r\tstack addLast: (constTable at: 1)! !\r\r!Decompiler methodsFor: 'instruction decoding'!\rpushReceiverVariable: offset\r\r\t| var |\r\t(var _ instVars at: offset + 1) == nil\r\t\tifTrue:\r\t\t\t[\"Not set up yet\"\r\t\t\tinstVars at: offset + 1 put: (var _ constructor codeInst: offset)].\r\tstack addLast: var! !\r\r!Decompiler methodsFor: 'instruction decoding'!\rpushTemporaryVariable: offset\r\r\tstack addLast: (tempVars at: offset + 1)! !\r\r!Decompiler methodsFor: 'instruction decoding' stamp: 'di 1/29/2000 08:38'!\rsend: selector super: superFlag numArgs: numArgs\r\r\t| args rcvr selNode msgNode messages |\r\targs _ Array new: numArgs.\r\t(numArgs to: 1 by: -1) do:\r\t\t[:i | args at: i put: stack removeLast].\r\trcvr _ stack removeLast.\r\tsuperFlag ifTrue: [rcvr _ constructor codeSuper].\r\t(selector == #blockCopy: and: [self checkForBlock: rcvr])\r\t\tifFalse:\r\t\t\t[selNode _ constructor codeAnySelector: selector.\r\t\t\trcvr == CascadeFlag\r\t\t\t\tifTrue:\r\t\t\t\t\t[\"May actually be a cascade or an ifNil: for value.\"\r\t\t\t\t\tself willJumpIfFalse\r\t\t\t\t\t\tifTrue: \"= generated by a case macro\"\r\t\t\t\t\t\t\t[selector == #= ifTrue:\r\t\t\t\t\t\t\t\t[\" = signals a case statement...\"\r\t\t\t\t\t\t\t\tstatements addLast: args first.\r\t\t\t\t\t\t\t\tstack addLast: rcvr. \"restore CascadeFlag\"\r\t\t\t\t\t\t\t\t^ self].\r\t\t\t\t\t\t\tselector == #== ifTrue:\r\t\t\t\t\t\t\t\t[\" == signals an ifNil: for value...\"\r\t\t\t\t\t\t\t\tstack removeLast; removeLast.\r\t\t\t\t\t\t\t\trcvr _ stack removeLast.\r\t\t\t\t\t\t\t\tstack addLast: IfNilFlag;\r\t\t\t\t\t\t\t\t\taddLast: (constructor\r\t\t\t\t\t\t\t\t\t\tcodeMessage: rcvr\r\t\t\t\t\t\t\t\t\t\tselector: selNode\r\t\t\t\t\t\t\t\t\t\targuments: args).\r\t\t\t\t\t\t\t\t^ self].\r\t\t\t\t\t\t\tself error: 'bad case: ', selector]\r\t\t\t\t\t\tifFalse:\r\t\t\t\t\t\t\t[(self willJumpIfTrue and: [selector == #==]) ifTrue:\r\t\t\t\t\t\t\t\t[\" == signals an ifNotNil: for value...\"\r\t\t\t\t\t\t\t\tstack removeLast; removeLast.\r\t\t\t\t\t\t\t\trcvr _ stack removeLast.\r\t\t\t\t\t\t\t\tstack addLast: IfNilFlag;\r\t\t\t\t\t\t\t\t\taddLast: (constructor\r\t\t\t\t\t\t\t\t\t\tcodeMessage: rcvr\r\t\t\t\t\t\t\t\t\t\tselector: selNode\r\t\t\t\t\t\t\t\t\t\targuments: args).\r\t\t\t\t\t\t\t\t^ self].\r\t\t\t\t\t\t\tmsgNode _ constructor codeCascadedMessage: selNode\r\t\t\t\t\t\t\t\t\t\t\targuments: args].\r\t\t\t\t\tstack last == CascadeFlag\r\t\t\t\t\t\tifFalse:\r\t\t\t\t\t\t\t[\"Last message of a cascade\"\r\t\t\t\t\t\t\tstatements addLast: msgNode.\r\t\t\t\t\t\t\tmessages _ self popTo: stack removeLast.  \"Depth saved by first dup\"\r\t\t\t\t\t\t\tmsgNode _ constructor\r\t\t\t\t\t\t\t\tcodeCascade: stack removeLast\r\t\t\t\t\t\t\t\tmessages: messages]]\r\t\t\t\tifFalse:\r\t\t\t\t\t[msgNode _ constructor\r\t\t\t\t\t\t\t\tcodeMessage: rcvr\r\t\t\t\t\t\t\t\tselector: selNode\r\t\t\t\t\t\t\t\targuments: args].\r\t\t\tstack addLast: msgNode]! !\r\r!Decompiler methodsFor: 'instruction decoding'!\rstoreIntoLiteralVariable: assoc\r\r\tself pushLiteralVariable: assoc; doStore: stack! !\r\r!Decompiler methodsFor: 'instruction decoding'!\rstoreIntoReceiverVariable: offset\r\r\tself pushReceiverVariable: offset; doStore: stack! !\r\r!Decompiler methodsFor: 'instruction decoding'!\rstoreIntoTemporaryVariable: offset\r\r\tself pushTemporaryVariable: offset; doStore: stack! !\r\r\r!Decompiler methodsFor: 'public access'!\rdecompile: aSelector in: aClass method: aMethod\r\t\"Answer a MethodNode that is the root of the parse tree for the \r\targument, aMethod, which is the CompiledMethod associated with the \r\tmessage, aSelector. Variables are determined with respect to the \r\targument, aClass.\"\r\r\t^self\r\t\tdecompile: aSelector\r\t\tin: aClass\r\t\tmethod: aMethod\r\t\tusing: DecompilerConstructor new! !\r\r!Decompiler methodsFor: 'public access' stamp: 'LC 1/6/2002 15:50'!\rdecompileBlock: aBlock \r\t\"Original version timestamp: sn 1/26/98 18:27\r\t(Don't know who's sn?) \"\r\t\"Decompile aBlock, returning the result as a BlockNode.  \r\tShow temp names from source if available.\"\r\t\"Decompiler new decompileBlock: [3 + 4]\"\r\t| startpc end homeClass blockNode tempNames home source |\r\t(home _ aBlock home) ifNil: [^ nil].\r\tmethod _ home method.\r\t(homeClass _ home who first) == #unknown ifTrue: [^ nil].\r\tconstructor _ DecompilerConstructor new.\r\tmethod fileIndex ~~ 0\r\t\tifTrue: [\"got any source code?\"\r\t\t\tsource _ [method getSourceFromFile]\r\t\t\t\t\t\ton: Error\r\t\t\t\t\t\tdo: [:ex | ^ nil].\r\t\t\ttempNames _ ([homeClass compilerClass new\r\t\t\t\t\t\tparse: source\r\t\t\t\t\t\tin: homeClass\r\t\t\t\t\t\tnotifying: nil]\r\t\t\t\t\t\ton: (Smalltalk classNamed: 'SyntaxErrorNotification')\r\t\t\t\t\t\tdo: [:ex | ^ nil]) tempNames.\r\t\t\tself withTempNames: tempNames].\r\tself initSymbols: homeClass.\r\tstartpc _ aBlock startpc.\r\tend _ (method at: startpc - 2)\r\t\t\t\t\\\\ 16 - 4 * 256\r\t\t\t\t+ (method at: startpc - 1) + startpc - 1.\r\tstack _ OrderedCollection new: method frameSize.\r\tstatements _ OrderedCollection new: 20.\r\tsuper method: method pc: startpc - 5.\r\tblockNode _ self blockTo: end.\r\tstack isEmpty ifFalse: [self error: 'stack not empty'].\r\t^ blockNode statements first! !\r\r!Decompiler methodsFor: 'public access'!\rtempAt: offset\r\t\"Needed by BraceConstructor<PopIntoTemporaryVariable\"\r\r\t^tempVars at: offset + 1! !\r\r\r!Decompiler methodsFor: 'private' stamp: 'di 2/6/2000 11:06'!\rconvertToDoLoop\r\t\"If statements contains the pattern\r\t\tvar _ startExpr.\r\t\t[var <= limit] whileTrue: [...statements... var _ var + incConst]\r\tthen replace this by\r\t\tstartExpr to: limit by: incConst do: [:var | ...statements...]\"\r\t| initStmt toDoStmt limitStmt |\r\tstatements size < 2 ifTrue: [^ self].\r\tinitStmt _ statements at: statements size-1.\r\t(toDoStmt _ statements last toDoFromWhileWithInit: initStmt)\r\t\t== nil ifTrue: [^ self].\r\tinitStmt variable scope: -1.  \"Flag arg as block temp\"\r\tstatements removeLast; removeLast; addLast: toDoStmt.\r\r\t\"Attempt further conversion of the pattern\r\t\tlimitVar _ limitExpr.\r\t\tstartExpr to: limitVar by: incConst do: [:var | ...statements...]\r\tto\r\t\tstartExpr to: limitExpr by: incConst do: [:var | ...statements...]\"\r\tstatements size < 2 ifTrue: [^ self].\r\tlimitStmt _ statements at: statements size-1.\r\t((limitStmt isMemberOf: AssignmentNode)\r\t\tand: [limitStmt variable isTemp\r\t\tand: [limitStmt variable == toDoStmt arguments first\r\t\tand: [self methodRefersOnlyOnceToTemp: limitStmt variable fieldOffset]]])\r\t\tifFalse: [^ self].\r\ttoDoStmt arguments at: 1 put: limitStmt value.\r\tlimitStmt variable scope: -2.  \"Flag limit var so it won't print\"\r\tstatements removeLast; removeLast; addLast: toDoStmt.\r\r! !\r\r!Decompiler methodsFor: 'private' stamp: 'ajh 11/15/2003 01:21'!\rdecompile: aSelector in: aClass method: aMethod using: aConstructor\r\r\t| block |\r\tconstructor _ aConstructor.\r\tmethod _ aMethod.\r\tself initSymbols: aClass.  \"create symbol tables\"\r\tmethod isQuick\r\t\tifTrue: [block _ self quickMethod]\r\t\tifFalse: \r\t\t\t[stack _ OrderedCollection new: method frameSize.\r\t\t\tstatements _ OrderedCollection new: 20.\r\t\t\tsuper method: method pc: method initialPC.\r\t\t\tblock _ self blockTo: method endPC + 1.\r\t\t\tstack isEmpty ifFalse: [self error: 'stack not empty']].\r\t^constructor\r\t\tcodeMethod: aSelector\r\t\tblock: block\r\t\ttempVars: tempVars\r\t\tprimitive: method primitive\r\t\tclass: aClass! !\r\r!Decompiler methodsFor: 'private' stamp: 'di 2/6/2000 08:49'!\rinterpretNextInstructionFor: client\r\r\t| code varNames |\r\r\"Change false here will trace all state in Transcript.\"\rtrue ifTrue: [^ super interpretNextInstructionFor: client].\r\r\tvarNames _ Decompiler allInstVarNames.\r\tcode _ (self method at: pc) radix: 16.\r\tTranscript cr; cr; print: pc; space;\r\t\tnextPutAll: '<' , (code copyFrom: 4 to: code size) , '>'.\r\t8 to: varNames size do:\r\t\t[:i | i <= 10 ifTrue: [Transcript cr]\r\t\t\t\tifFalse: [Transcript space; space].\r\t\tTranscript nextPutAll: (varNames at: i);\r\t\t\t\tnextPutAll: ': '; print: (self instVarAt: i)].\r\tTranscript endEntry.\r\t^ super interpretNextInstructionFor: client! !\r\r!Decompiler methodsFor: 'private' stamp: 'di 2/6/2000 10:55'!\rmethodRefersOnlyOnceToTemp: offset\r\t| nRefs byteCode extension scanner |\r\tnRefs _ 0.\r\toffset <= 15\r\t\tifTrue:\r\t\t\t[byteCode _ 16 + offset.\r\t\t\t(InstructionStream on: method) scanFor:\r\t\t\t\t[:instr | instr = byteCode ifTrue: [nRefs _ nRefs + 1].\r\t\t\t\tnRefs > 1]]\r\t\tifFalse:\r\t\t\t[extension _ 64 + offset.\r\t\t\tscanner _ InstructionStream on: method.\r\t\t\tscanner scanFor:\r\t\t\t\t[:instr | (instr = 128 and: [scanner followingByte = extension])\r\t\t\t\t\t\t\tifTrue: [nRefs _ nRefs + 1].\r\t\t\t\tnRefs > 1]].\r\t^ nRefs = 1\r! !\r\r!Decompiler methodsFor: 'private'!\rpopTo: oldPos\r\r\t| t |\r\tt _ Array new: statements size - oldPos.\r\t(t size to: 1 by: -1) do:\r\t\t[:i | t at: i put: statements removeLast].\r\t^t! !\r\r!Decompiler methodsFor: 'private' stamp: 'di 12/26/1998 21:29'!\rquickMethod\r\t| |\r\tmethod isReturnSpecial\r\t\tifTrue: [^ constructor codeBlock:\r\t\t\t\t(Array with: (constTable at: method primitive - 255)) returns: true].\r\tmethod isReturnField\r\t\tifTrue: [^ constructor codeBlock:\r\t\t\t\t(Array with: (constructor codeInst: method returnField)) returns: true].\r\tself error: 'improper short method'! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rDecompiler class\r\tinstanceVariableNames: ''!\r\r!Decompiler class methodsFor: 'class initialization' stamp: 'di 1/28/2000 22:21'!\rinitialize\r\r\tCascadeFlag _ 'cascade'.  \"A unique object\"\r\tCaseFlag _ 'case'. \"Ditto\"\r\tArgumentFlag _ 'argument'.  \"Ditto\"\r\tIfNilFlag _ 'ifNil'.  \"Ditto\"\r\r\t\"Decompiler initialize\"! !\rParseNode subclass: #DecompilerConstructor\r\tinstanceVariableNames: 'method instVars nArgs literalValues tempVars'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Compiler'!\r!DecompilerConstructor commentStamp: '<historical>' prior: 0!\rI construct the node tree for a Decompiler.!\r\r\r!DecompilerConstructor methodsFor: 'initialize-release'!\rmethod: aMethod class: aClass literals: literals\r\r\tmethod _ aMethod.\r\tinstVars _ aClass allInstVarNames.\r\tnArgs _ method numArgs.\r\tliteralValues _ literals! !\r\r\r!DecompilerConstructor methodsFor: 'constructor'!\rcodeAnyLitInd: association\r\r\t^VariableNode new\r\t\tname: association key\r\t\tkey: association\r\t\tindex: 0\r\t\ttype: LdLitIndType! !\r\r!DecompilerConstructor methodsFor: 'constructor'!\rcodeAnyLiteral: value\r\r\t^LiteralNode new\r\t\tkey: value\r\t\tindex: 0\r\t\ttype: LdLitType! !\r\r!DecompilerConstructor methodsFor: 'constructor'!\rcodeAnySelector: selector\r\r\t^SelectorNode new\r\t\tkey: selector\r\t\tindex: 0\r\t\ttype: SendType! !\r\r!DecompilerConstructor methodsFor: 'constructor'!\rcodeArguments: args block: block\r\r\t^block arguments: args! !\r\r!DecompilerConstructor methodsFor: 'constructor'!\rcodeAssignTo: variable value: expression\r\r\t^AssignmentNode new variable: variable value: expression! !\r\r!DecompilerConstructor methodsFor: 'constructor' stamp: 'sma 3/3/2000 13:34'!\rcodeBlock: statements returns: returns\r\t^ BlockNode statements: statements returns: returns! !\r\r!DecompilerConstructor methodsFor: 'constructor'!\rcodeBrace: elements\r\r\t^BraceNode new elements: elements! !\r\r!DecompilerConstructor methodsFor: 'constructor' stamp: 'di 11/19/1999 11:06'!\rcodeCascade: receiver messages: messages\r\r\t^ (BraceNode new matchBraceStreamReceiver: receiver messages: messages)\r\t\tifNil: [CascadeNode new receiver: receiver messages: messages]! !\r\r!DecompilerConstructor methodsFor: 'constructor'!\rcodeCascadedMessage: selector arguments: arguments\r\r\t^self\r\t\tcodeMessage: nil\r\t\tselector: selector\r\t\targuments: arguments! !\r\r!DecompilerConstructor methodsFor: 'constructor'!\rcodeConstants\r\t\"Answer with an array of the objects representing self, true, false, nil,\r\t-1, 0, 1, 2.\"\r\r\t^(Array with: NodeSelf with: NodeTrue with: NodeFalse with: NodeNil)\r\t\t, ((-1 to: 2) collect: [:i | LiteralNode new key: i code: LdMinus1 + i + 1])! !\r\r!DecompilerConstructor methodsFor: 'constructor'!\rcodeInst: index\r\r\t^VariableNode new\r\t\tname: (instVars at: index + 1)\r\t\tindex: index\r\t\ttype: LdInstType! !\r\r!DecompilerConstructor methodsFor: 'constructor' stamp: 'sma 2/5/2000 12:37'!\rcodeMessage: receiver selector: selector arguments: arguments\r\t| symbol node |\r\tsymbol _ selector key.\r\t(node _ BraceNode new\r\t\t\tmatchBraceWithReceiver: receiver\r\t\t\tselector: symbol\r\t\t\targuments: arguments) ifNotNil: [^ node].\r\t(node _ self decodeIfNilWithReceiver: receiver\r\t\t\tselector: symbol\r\t\t\targuments: arguments) ifNotNil: [^ node].\r\t^ MessageNode new\r\t\t\treceiver: receiver selector: selector\r\t\t\targuments: arguments\r\t\t\tprecedence: symbol precedence! !\r\r!DecompilerConstructor methodsFor: 'constructor' stamp: 'ajh 11/15/2003 01:20'!\rcodeMethod: selector block: block tempVars: vars primitive: primitive class: class\r\r\t| node methodTemps |\r\tnode _ self codeSelector: selector code: nil.\r\ttempVars _ vars.\r\tmethodTemps _ tempVars select: [:t | t scope >= 0].\r\t^MethodNode new\r\t\tselector: node\r\t\targuments: (methodTemps copyFrom: 1 to: nArgs)\r\t\tprecedence: selector precedence\r\t\ttemporaries: (methodTemps copyFrom: nArgs + 1 to: methodTemps size)\r\t\tblock: block\r\t\tencoder: (Encoder new initScopeAndLiteralTables\r\t\t\t\t\ttemps: tempVars\r\t\t\t\t\tliterals: literalValues\r\t\t\t\t\tclass: class)\r\t\tprimitive: primitive! !\r\r!DecompilerConstructor methodsFor: 'constructor'!\rcodeSelector: sel code: code\r\r\t^SelectorNode new key: sel code: code! !\r\r!DecompilerConstructor methodsFor: 'constructor'!\rcodeSuper\r\r\t^NodeSuper! !\r\r!DecompilerConstructor methodsFor: 'constructor'!\rcodeTemp: index\r\r\t^ TempVariableNode new\r\t\tname: 't' , (index + 1) printString\r\t\tindex: index\r\t\ttype: LdTempType\r\t\tscope: 0! !\r\r!DecompilerConstructor methodsFor: 'constructor'!\rcodeTemp: index named: tempName\r\r\t^ TempVariableNode new\r\t\tname: tempName\r\t\tindex: index\r\t\ttype: LdTempType\r\t\tscope: 0! !\r\r!DecompilerConstructor methodsFor: 'constructor'!\rcodeThisContext\r\r\t^NodeThisContext! !\r\r!DecompilerConstructor methodsFor: 'constructor' stamp: 'di 1/28/2000 21:23'!\rdecodeIfNilWithReceiver: receiver selector: selector arguments: arguments\r\r\tselector == #ifTrue:ifFalse:\r\t\tifFalse: [^ nil].\r\t(receiver isMessage: #==\r\t\t\t\treceiver: nil\r\t\t\t\targuments: [:argNode | argNode == NodeNil])\r\t\tifFalse: [^ nil].\r\t^ (MessageNode new\r\t\t\treceiver: receiver\r\t\t\tselector: (SelectorNode new key: #ifTrue:ifFalse: code: #macro)\r\t\t\targuments: arguments\r\t\t\tprecedence: 3)\r\t\tnoteSpecialSelector: #ifNil:ifNotNil:! !\rStandardSystemController subclass: #DeferredActionStandardSystemController\r\tinstanceVariableNames: 'queue'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Process Browser'!\r!DeferredActionStandardSystemController commentStamp: '<historical>' prior: 0!\rThis is a StandardSystemController that can queue up objects to be evaluated before its control loop.!\r\r\r!DeferredActionStandardSystemController methodsFor: 'as yet unclassified' stamp: 'nk 10/28/2000 22:28'!\raddDeferredUIMessage: valuableObject \r\tqueue nextPut: valuableObject! !\r\r!DeferredActionStandardSystemController methodsFor: 'as yet unclassified' stamp: 'nk 10/28/2000 22:27'!\rcontrolActivity\r\t[queue isEmpty]\r\t\twhileFalse: [queue next value].\r\t^super controlActivity! !\r\r!DeferredActionStandardSystemController methodsFor: 'as yet unclassified' stamp: 'nk 10/28/2000 22:28'!\rinitialize\r\tsuper initialize.\r\tqueue _ SharedQueue new.! !\rObject subclass: #Delay\r\tinstanceVariableNames: 'delayDuration resumptionTime delaySemaphore beingWaitedOn'\r\tclassVariableNames: 'AccessProtect ActiveDelay ActiveDelayStartTime SuspendedDelays TimingSemaphore'\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Processes'!\r!Delay commentStamp: 'ls 10/14/2003 11:46' prior: 0!\rI am the main way that a process may pause for some amount of time.  The simplest usage is like this:\r\r\t(Delay forSeconds: 5) wait.\r\rAn instance of Delay responds to the message 'wait' by suspending the caller's process for a certain amount of time. The duration of the pause is specified when the Delay is created with the message forMilliseconds: or forSeconds:. A Delay can be used again when the current wait has finished. For example, a clock process might repeatedly wait on a one-second Delay.\r\rThe maximum delay is (SmallInteger maxVal // 2) milliseconds, or about six days. A delay in progress when an image snapshot is saved is resumed when the snapshot is re-started. Delays work across millisecond clock roll-overs.\r\r\rFor a more complex example, see  #testDelayOf:for:rect: .!\r]style[(763 22 2)f1,f1LDelay class testDelayOf:for:rect:;,f1!\r\r\r!Delay methodsFor: 'delaying' stamp: 'nk 3/14/2001 08:52'!\risExpired\r\r\t^delaySemaphore isSignaled.\r! !\r\r!Delay methodsFor: 'delaying' stamp: 'jm 9/12/97 09:10'!\rwait\r\t\"Schedule this Delay, then wait on its semaphore. The current process will be suspended for the amount of time specified when this Delay was created.\"\r\r\tself schedule.\r\tdelaySemaphore wait.\r! !\r\r\r!Delay methodsFor: 'private' stamp: 'ar 7/18/2001 20:28'!\ractivate\r\t\"Private!! Make the receiver the Delay to be awoken when the next timer interrupt occurs. This method should only be called from a block protected by the AccessProtect semaphore.\"\r\r\tActiveDelay _ self.\r\tActiveDelayStartTime _ Time millisecondClockValue.\r\tActiveDelayStartTime > resumptionTime ifTrue:[\r\t\tActiveDelay signalWaitingProcess.\r\t\tSuspendedDelays isEmpty ifTrue:[\r\t\t\tActiveDelay _ nil.\r\t\t\tActiveDelayStartTime _ nil.\r\t\t] ifFalse:[SuspendedDelays removeFirst activate].\r\t] ifFalse:[\r\t\tTimingSemaphore initSignals.\r\t\tDelay primSignal: TimingSemaphore atMilliseconds: resumptionTime.\r\t].! !\r\r!Delay methodsFor: 'private' stamp: 'jm 9/11/97 14:49'!\radjustResumptionTimeOldBase: oldBaseTime newBase: newBaseTime\r\t\"Private!! Adjust the value of the system's millisecond clock at which this Delay will be awoken. Used to adjust resumption times after a snapshot or clock roll-over.\"\r\r\tresumptionTime _ newBaseTime + (resumptionTime - oldBaseTime).\r! !\r\r!Delay methodsFor: 'private' stamp: 'jm 9/11/97 11:54'!\rresumptionTime\r\t\"Answer the value of the system's millisecondClock at which the receiver's suspended Process will resume.\"\r\r\t^ resumptionTime\r! !\r\r!Delay methodsFor: 'private' stamp: 'jm 9/12/97 11:10'!\rschedule\r\t\"Private!! Schedule this Delay, but return immediately rather than waiting. The receiver's semaphore will be signalled when its delay duration has elapsed.\"\r\r\tbeingWaitedOn ifTrue: [self error: 'This Delay has already been scheduled.'].\r\tAccessProtect critical: [\r\t\tbeingWaitedOn _ true.\r\t\tresumptionTime _ Time millisecondClockValue + delayDuration.\r\t\tActiveDelay == nil\r\t\t\tifTrue: [self activate]\r\t\t\tifFalse: [\r\t\t\t\tresumptionTime < ActiveDelay resumptionTime\r\t\t\t\t\tifTrue: [\r\t\t\t\t\t\tSuspendedDelays add: ActiveDelay.\r\t\t\t\t\t\tself activate]\r\t\t\t\t\tifFalse: [SuspendedDelays add: self]]].\r! !\r\r!Delay methodsFor: 'private' stamp: 'jm 9/12/97 08:56'!\rsetDelay: millisecondCount forSemaphore: aSemaphore\r\t\"Private!! Initialize this delay to signal the given semaphore after the given number of milliseconds.\"\r\r\tdelayDuration _ millisecondCount.\r\tdelaySemaphore _ aSemaphore.\r\tbeingWaitedOn _ false.\r! !\r\r!Delay methodsFor: 'private' stamp: 'jm 9/11/97 11:54'!\rsignalWaitingProcess\r\t\"The delay time has elapsed; signal the waiting process.\"\r\r\tbeingWaitedOn _ false.\r\tdelaySemaphore signal.\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rDelay class\r\tinstanceVariableNames: ''!\r\r!Delay class methodsFor: 'instance creation' stamp: 'jm 9/15/97 17:09'!\rforMilliseconds: anInteger\r\t\"Return a new Delay for the given number of milliseconds. Sending 'wait' to this Delay will cause the sender's process to be suspended for approximately that length of time.\"\r\r\tanInteger < 0 ifTrue: [self error: 'delay times cannot be negative'].\r\t^ self new\r\t\tsetDelay: anInteger\r\t\tforSemaphore: Semaphore new\r! !\r\r!Delay class methodsFor: 'instance creation' stamp: 'di 6/16/1999 23:04'!\rforSeconds: aNumber\r\t\"Return a new Delay for the given number of seconds. Sending 'wait' to this Delay will cause the sender's process to be suspended for approximately that length of time.\"\r\r\taNumber < 0 ifTrue: [self error: 'delay times cannot be negative'].\r\t^ self new\r\t\tsetDelay: (aNumber * 1000) asInteger\r\t\tforSemaphore: Semaphore new\r! !\r\r\r!Delay class methodsFor: 'snapshotting' stamp: 'jm 9/11/97 14:59'!\rrestoreResumptionTimes\r\t\"Private!! Restore the resumption times of all scheduled Delays after a snapshot or clock roll-over. This method should be called only while the AccessProtect semaphore is held.\"\r\r\t| newBaseTime |\r\tnewBaseTime _ Time millisecondClockValue.\r\tSuspendedDelays do: [:d | d adjustResumptionTimeOldBase: 0 newBase: newBaseTime].\r\tActiveDelay == nil ifFalse: [\r\t\tActiveDelay adjustResumptionTimeOldBase: 0 newBase: newBaseTime.\r\t\tActiveDelay activate].\r! !\r\r!Delay class methodsFor: 'snapshotting' stamp: 'jm 9/11/97 15:15'!\rsaveResumptionTimes\r\t\"Private!! Record the resumption times of all Delays relative to a base time of zero. This is done prior to snapshotting or adjusting the resumption times after a clock roll-over. This method should be called only while the AccessProtect semaphore is held.\"\r\r\t| oldBaseTime |\r\toldBaseTime _ Time millisecondClockValue.\r\tActiveDelay == nil\r\t\tifFalse: [\r\t\t\toldBaseTime < ActiveDelayStartTime\r\t\t\t\tifTrue: [oldBaseTime _ ActiveDelayStartTime].  \"clock rolled over\"\r\t\t\tActiveDelay adjustResumptionTimeOldBase: oldBaseTime newBase: 0].\r\tSuspendedDelays do:\r\t\t[:d | d adjustResumptionTimeOldBase: oldBaseTime newBase: 0].\r! !\r\r!Delay class methodsFor: 'snapshotting' stamp: 'jm 9/11/97 15:00'!\rshutDown\r\t\"Suspend the active delay, if any, before snapshotting. It will be reactived when the snapshot is resumed.\"\r\t\"Details: This prevents a timer interrupt from waking up the active delay in the midst snapshoting, since the active delay will be restarted when resuming the snapshot and we don't want to process the delay twice.\"\r\r\tAccessProtect wait.\r\tself primSignal: nil atMilliseconds: 0.\r\tself saveResumptionTimes.\r! !\r\r!Delay class methodsFor: 'snapshotting' stamp: 'jm 9/11/97 15:01'!\rstartUp\r\t\"Restart active delay, if any, when resuming a snapshot.\"\r\r\tself restoreResumptionTimes.\r\tActiveDelay == nil ifFalse: [ActiveDelay activate].\r\tAccessProtect signal.\r! !\r\r\r!Delay class methodsFor: 'timer process' stamp: 'jm 9/11/97 15:15'!\rstartTimerInterruptWatcher\r\t\"Reset the class variables that keep track of active Delays and re-start the timer interrupt watcher process. Any currently scheduled delays are forgotten.\"\r\t\"Delay startTimerInterruptWatcher\"\r\r\t| p |\r\tself primSignal: nil atMilliseconds: 0.\r\tTimingSemaphore == nil\r\t\tifFalse: [TimingSemaphore terminateProcess].\r\tTimingSemaphore _ Semaphore new.\r\tAccessProtect _ Semaphore forMutualExclusion.\r\tSuspendedDelays _ \r\t\tSortedCollection sortBlock: \r\t\t\t[:d1 :d2 | d1 resumptionTime <= d2 resumptionTime].\r\tActiveDelay _ nil.\r\tp _ [self timerInterruptWatcher] newProcess.\r\tp priority: Processor timingPriority.\r\tp resume.\r! !\r\r!Delay class methodsFor: 'timer process' stamp: 'jm 9/11/97 15:13'!\rtimerInterruptWatcher\r\t\"This loop runs in its own process. It waits for a timer interrupt and wakes up the active delay. Note that timer interrupts are only enabled when there are active delays.\"\r\r\t[true] whileTrue: [\r\t\tTimingSemaphore wait.\r\t\tAccessProtect critical: [\r\t\t\tActiveDelay == nil ifFalse: [\r\t\t\t\tActiveDelay signalWaitingProcess.\r\t\t\t\tTime millisecondClockValue < ActiveDelayStartTime\r\t\t\t\t\tifTrue: [  \"clock wrapped\"\r\t\t\t\t\t\tself saveResumptionTimes.\r\t\t\t\t\t\tself restoreResumptionTimes]].\r\t\t\tSuspendedDelays isEmpty\r\t\t\t\tifTrue: [\r\t\t\t\t\tActiveDelay _ nil.\r\t\t\t\t\tActiveDelayStartTime _ nil]\r\t\t\t\tifFalse: [\r\t\t\t\t\tSuspendedDelays removeFirst activate]]].\r! !\r\r\r!Delay class methodsFor: 'primitives' stamp: 'jm 9/11/97 10:54'!\rprimSignal: aSemaphore atMilliseconds: aSmallInteger\r\t\"Signal the semaphore when the millisecond clock reaches the value of the second argument. Fail if the first argument is neither a Semaphore nor nil. Essential. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 136>\r\tself primitiveFailed\r! !\rArray weakSubclass: #DependentsArray\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Objects'!\r!DependentsArray commentStamp: '<historical>' prior: 0!\rAn array of (weak) dependents of some object.!\r\r\r!DependentsArray methodsFor: 'copying' stamp: 'ar 2/24/2001 17:30'!\rcopyWith: newElement \r\t\"Re-implemented to not copy any niled out dependents\"\r\t^self class streamContents:[:s|\r\t\tself do:[:item| s nextPut: item].\r\t\ts nextPut: newElement].! !\r\r!DependentsArray methodsFor: 'copying' stamp: 'nk 3/11/2004 09:34'!\rsize\r\t^self inject: 0 into: [ :count :dep | dep ifNotNil: [ count _ count + 1 ]]! !\r\r\r!DependentsArray methodsFor: 'enumerating' stamp: 'nk 3/11/2004 09:34'!\rdo: aBlock\r\t\"Refer to the comment in Collection|do:.\"\r\t| dep |\r\t1 to: self basicSize do:[:i|\r\t\t(dep _ self at: i) ifNotNil:[aBlock value: dep]].! !\r\r!DependentsArray methodsFor: 'enumerating' stamp: 'ar 2/11/2001 01:50'!\rselect: aBlock \r\t\"Refer to the comment in Collection|select:.\"\r\t| aStream |\r\taStream _ WriteStream on: (self species new: self size).\r\tself do:[:obj|\r\t\t(aBlock value: obj)\r\t\t\tifTrue: [aStream nextPut: obj]].\r\t^ aStream contents! !\rWarning subclass: #Deprecation\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Exceptions Kernel'!\r!Deprecation commentStamp: 'dew 5/21/2003 17:46' prior: 0!\rThis Warning is signalled by methods which are deprecated.\r\rThe use of Object>>#deprecatedExplanation: aString and Object>>#deprecated: aBlock explanation: aString is recommended.\r\rIdiom: Imagine I want to deprecate the message #foo.\r\rfoo\r\t^ 'foo'\r\rI can replace it with:\r\rfoo\r\tself deprecatedExplanation: 'The method #foo was not good. Use Bar>>newFoo instead.'\r\t^ 'foo'\r\rOr, for certain cases such as when #foo implements a primitive, #foo can be renamed to #fooDeprecated.\r\rfooDeprecated\r\t^ <primitive>\r\rfoo\r\t^ self deprecated: [self fooDeprecated] explanation: 'The method #foo was not good. Use Bar>>newFoo instead.'\r!\r\rMethodNode subclass: #DialectMethodNode\r\tinstanceVariableNames: 'dialect'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Compiler'!\r!DialectMethodNode commentStamp: '<historical>' prior: 0!\rThe purpose of this class is to carry along with theinformation in a regular method node the further information that it was parsed from an laternate dialect of Squeak.  Which dialect that was is carried as a symbol in the dialect variable.!\r\r\r!DialectMethodNode methodsFor: 'as yet unclassified' stamp: 'di 4/13/2000 20:46'!\rsetDialect: dialectSymbol\r\r\tdialect _ dialectSymbol! !\rParser subclass: #DialectParser\r\tinstanceVariableNames: 'dialect'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Compiler'!\r!DialectParser commentStamp: '<historical>' prior: 0!\rThis Parser is part of a package designed to allow for experiments with alternatives to ST-80 syntax.  The particular alternative offered by this parser eliminates colons, left-arrows and up-arrows, and adds prefix keywords for common control constructs.\r\rST-80\t\t\t\t\t\t\t\t\tSQ-00\r-------\t\t\t\t\t\t\t\t\t-------\ra + b between: c and: c + 4\t\t\t\ta + b between (c) and (c + 4)\ra _ 3.0\t\t\t\t\t\t\t\t\tSet a to 3.0\r^ self size + 3\t\t\t\t\t\t\tReturn self size + 3\ra > b\t\t\t\t\t\t\t\t\tTest (a > b)\r\tifTrue: ['greater']\t\t\t\t\t\tifTrue ['greater']\r\tifFalse: ['less']\t\t\t\t\t\t\tifFalse ['less']\r1 to: 9 do:\t\t\t\t\t\t\t\tRepeat (1) to (9) do\r\t[:i | Transcript cr; show: i]\t\t\t\t[Set i. | Transcript cr; show (i)]\r\rThe use of prefix keywords is currently ad-hoc;  in other words they are built into the parser, and there is not a way to define a method pattern to include a prefix keyword.  Most of the work has been done to support this, though, as selectors can now have the form\r\t#:prefix:kwd1:kwd2:\rand they will respond appropriately to #keywords and #numArgs.\r\rA test method in the class ensures that every method in the system can be pretty-printed in the alternative syntax, and that compiling the resulting text produces exactly the same bytecodes as the original method.!\r\r\r!DialectParser methodsFor: 'as yet unclassified' stamp: 'di 4/23/2000 22:18'!\rassignment: varNode\r\t\" 'set' (var) 'to' (expression) => AssignmentNode.\"\r\t| loc |\r\t(loc _ varNode assignmentCheck: encoder at: prevMark + requestorOffset) >= 0\r\t\tifTrue: [^self notify: 'Cannot store into' at: loc].\r\tvarNode nowHasDef.\r\tself advance.  \" to \"\r\tself expression ifFalse: [^self expected: 'Expression'].\r\tparseNode _ AssignmentNode new\r\t\t\t\tvariable: varNode\r\t\t\t\tvalue: parseNode\r\t\t\t\tfrom: encoder.\r\t^ true! !\r\r!DialectParser methodsFor: 'as yet unclassified' stamp: 'di 6/13/2000 00:34'!\rblockExpression\r\t\"[ ({:var} |) (| {temps} |) (statements) ] => BlockNode.\"\r\r\t| variableNodes temporaryBlockVariables |\r\tvariableNodes _ OrderedCollection new.\r\r\t\"Gather parameters.\"\r\t(self matchToken: 'With') ifTrue:\r\t\t[[self match: #period]\r\t\t\twhileFalse: [variableNodes addLast: (encoder autoBind: self argumentName)]].\r\r\ttemporaryBlockVariables _ self temporaryBlockVariables.\r\tself statements: variableNodes innerBlock: true.\r\tparseNode temporaries: temporaryBlockVariables.\r\r\t(self match: #rightBracket) ifFalse: [^ self expected: 'Period or right bracket'].\r\r\t\"The scope of the parameters and temporary block variables is no longer active.\"\r\ttemporaryBlockVariables do: [:variable | variable scope: -1].\r\tvariableNodes do: [:variable | variable scope: -1]! !\r\r!DialectParser methodsFor: 'as yet unclassified' stamp: 'di 4/22/2000 17:11'!\rexpression\r\r\t^ self expressionWithInitialKeyword: ''\r! !\r\r!DialectParser methodsFor: 'as yet unclassified' stamp: 'di 6/7/2000 09:51'!\rexpressionWithInitialKeyword: kwdIfAny\r\r\t| checkpoint |\r\t(hereType == #word and: [here = 'Set' and: [tokenType == #word]]) ifTrue:\r\t\t\t[\"Parse assignment statement 'Set' var 'to' expression\"\r\t\t\tcheckpoint _ self checkpoint.\r\t\t\tself advance.\r\t\t\ttoken = 'to'\r\t\t\t\tifTrue: [^ self assignment: self variable]\r\t\t\t\tifFalse: [self revertToCheckpoint: checkpoint]].\r\tself matchKeyword\r\t\tifTrue: [\"It's an initial keyword.\"\r\t\t\t\tkwdIfAny isEmpty ifFalse: [self error: 'compiler logic error'].\r\t\t\t\t^ self expressionWithInitialKeyword: ':' , self advance , ':'].\r\thereType == #leftBrace\r\t\tifTrue: [self braceExpression]\r\t\tifFalse: [self primaryExpression ifFalse: [^ false]].\r\t(self messagePart: 3 repeat: true initialKeyword: kwdIfAny)\r\t\tifTrue: [hereType == #semicolon ifTrue: [self cascade]].\r\t^ true! !\r\r!DialectParser methodsFor: 'as yet unclassified' stamp: 'di 4/25/2000 22:36'!\rmatchKeyword\r\t\"Return true if we are looking at a keyword (and its argument).\"\r\r\thereType == #word ifFalse: [^ false].\r\ttokenType == #leftParenthesis ifTrue: [^ true].\r\ttokenType == #leftBracket ifTrue: [^ true].\r\ttokenType == #leftBrace ifTrue: [^ true].\r\t^ false! !\r\r!DialectParser methodsFor: 'as yet unclassified' stamp: 'di 6/11/2000 15:27'!\rmatchReturn\r\r\t^ self matchToken: 'Answer'! !\r\r!DialectParser methodsFor: 'as yet unclassified' stamp: 'di 4/22/2000 16:56'!\rmessagePart: level repeat: repeat\r\r\t^ self messagePart: level repeat: repeat initialKeyword: ''! !\r\r!DialectParser methodsFor: 'as yet unclassified' stamp: 'hmm 7/16/2001 20:12'!\rmessagePart: level repeat: repeat initialKeyword: kwdIfAny\r\r\t| start receiver selector args precedence words keywordStart |\r\t[receiver _ parseNode.\r\t(self matchKeyword and: [level >= 3])\r\t\tifTrue: \r\t\t\t[start _ self startOfNextToken.\r\t\t\tselector _ WriteStream on: (String new: 32).\r\t\t\tselector nextPutAll: kwdIfAny.\r\t\t\targs _ OrderedCollection new.\r\t\t\twords _ OrderedCollection new.\r\t\t\t[self matchKeyword]\r\t\t\t\twhileTrue: \r\t\t\t\t\t[keywordStart _ self startOfNextToken + requestorOffset.\r\t\t\t\t\tselector nextPutAll: self advance , ':'.\r\t\t\t\t\twords addLast: (keywordStart to: hereEnd + requestorOffset).\r\t\t\t\t\tself primaryExpression ifFalse: [^ self expected: 'Argument'].\r\t\t\t\t\targs addLast: parseNode].\r\t\t\t(Symbol hasInterned: selector contents ifTrue: [ :sym | selector _ sym])\r\t\t\t\tifFalse: [ selector _ self correctSelector: selector contents\r\t\t\t\t\t\t\t\t\t\twordIntervals: words\r\t\t\t\t\t\t\t\t\t\texprInterval: (start to: self endOfLastToken)\r\t\t\t\t\t\t\t\t\t\tifAbort: [ ^ self fail ] ].\r\t\t\tprecedence _ 3]\r\t\tifFalse: [((hereType == #binary or: [hereType == #verticalBar])\r\t\t\t\tand: [level >= 2])\r\t\t\t\tifTrue: \r\t\t\t\t\t[start _ self startOfNextToken.\r\t\t\t\t\tselector _ self advance asSymbol.\r\t\t\t\t\tself primaryExpression ifFalse: [^self expected: 'Argument'].\r\t\t\t\t\tself messagePart: 1 repeat: true.\r\t\t\t\t\targs _ Array with: parseNode.\r\t\t\t\t\tprecedence _ 2]\r\t\t\t\tifFalse: [(hereType == #word\r\t\t\t\t\t\t\tand: [(#(leftParenthesis leftBracket leftBrace) includes: tokenType) not])\r\t\t\t\t\t\tifTrue: \r\t\t\t\t\t\t\t[start _ self startOfNextToken.\r\t\t\t\t\t\t\tselector _ self advance.\r\t\t\t\t\t\t\targs _ #().\r\t\t\t\t\t\t\twords _ OrderedCollection with: (start  + requestorOffset to: self endOfLastToken + requestorOffset).\r\t\t\t\t\t\t\t(Symbol hasInterned: selector ifTrue: [ :sym | selector _ sym])\r\t\t\t\t\t\t\t\tifFalse: [ selector _ self correctSelector: selector\r\t\t\t\t\t\t\t\t\t\t\t\t\twordIntervals: words\r\t\t\t\t\t\t\t\t\t\t\t\t\texprInterval: (start to: self endOfLastToken)\r\t\t\t\t\t\t\t\t\t\t\t\t\tifAbort: [ ^ self fail ] ].\r\t\t\t\t\t\t\tprecedence _ 1]\r\t\t\t\t\t\tifFalse: [^args notNil]]].\r\tparseNode _ MessageNode new\r\t\t\t\treceiver: receiver\r\t\t\t\tselector: selector\r\t\t\t\targuments: args\r\t\t\t\tprecedence: precedence\r\t\t\t\tfrom: encoder\r\t\t\t\tsourceRange: (start to: self endOfLastToken).\r\trepeat]\r\t\twhileTrue: [].\r\t^true! !\r\r!DialectParser methodsFor: 'as yet unclassified' stamp: 'di 5/30/2000 22:01'!\rnewMethodNode\r\r\t^ DialectMethodNode new setDialect: #SQ00! !\r\r!DialectParser methodsFor: 'as yet unclassified' stamp: 'di 4/5/2000 17:02'!\rparseArgsAndTemps: aString notifying: req \r\t\"Parse the argument, aString, notifying req if an error occurs. Otherwise, \r\tanswer a two-element Array containing Arrays of strings (the argument \r\tnames and temporary variable names).\"\r\r\taString == nil ifTrue: [^#()].\r\tdoitFlag _ false.\t\t\"Don't really know if a doit or not!!\"\r\t^self initPattern: aString\r\t\tnotifying: req\r\t\treturn: [:pattern | (pattern at: 2) , self temporaries]! !\r\r!DialectParser methodsFor: 'as yet unclassified' stamp: 'di 6/11/2000 15:27'!\rpattern: fromDoit inContext: ctxt \r\t\" unarySelector | binarySelector arg | keyword arg {keyword arg} =>  \r\t{selector, arguments, precedence}.\"\r\t| args selector checkpoint |\r\tdoitFlag _ fromDoit.\r\tfromDoit ifTrue:\r\t\t\t[ctxt == nil\r\t\t\t\tifTrue: [^ {#DoIt. {}. 1}]\r\t\t\t\tifFalse: [^ {#DoItIn:. {encoder encodeVariable: 'homeContext'}. 3}]].\r\r\t\"NOTE: there is now an ambiguity between\r\tkeywordSelector (argName) -and- unarySelector (first expression).\r\tAlso, there is an amibuity (if there are no temp declarations) between\r\tkeywordSelector (argName) -and- PrefixKeyword (some expression).\r\tWe use duct tape for now.\"\r\t(hereType == #word and: [tokenType == #leftParenthesis]) ifTrue:\r\t\t[checkpoint _ self checkpoint.  \"in case we have to back out\"\r\t\tselector _ WriteStream on: (String new: 32).\r\t\t\targs _ OrderedCollection new.\r\t\t\t[hereType == #word\r\t\t\t\tand: [tokenType == #leftParenthesis\r\t\t\t\tand: [here first isLowercase\r\t\t\t\t\t\tor: [(#('Test' 'Repeat' 'Answer') includes: here) not]]]]\r\t\t\t\twhileTrue: \r\t\t\t\t\t[selector nextPutAll: self advance , ':'.  \"selector part\"\r\t\t\t\t\tself advance.  \"open paren\"\r\t\t\t\t\t(args size = 0 and: [tokenType ~~ #rightParenthesis]) ifTrue:\r\t\t\t\t\t\t[\"This is really a unary selector on a method that\r\t\t\t\t\t\tbegins with a parenthesized expression.  Back out now\"\r\t\t\t\t\t\tself revertToCheckpoint: checkpoint.\r\t\t\t\t\t\t^ {self advance asSymbol. {}. 1}].\r\t\t\t\t\targs addLast: (encoder bindArg: self argumentName).\r\t\t\t(self match: #rightParenthesis)\r\t\t\t\t\t\tifFalse: [^ self expected: 'right parenthesis']].\r\t\t\t^ {selector contents asSymbol. args. 3}].\r\r\thereType == #word ifTrue: [^ {self advance asSymbol. {}. 1}].\r\r\t(hereType == #binary or: [hereType == #verticalBar])\r\t\tifTrue: \r\t\t\t[selector _ self advance asSymbol.\r\t\t\targs _ Array with: (encoder bindArg: self argumentName).\r\t\t\t^ {selector. args. 2}].\r\r\t^ self expected: 'Message pattern'! !\r\r!DialectParser methodsFor: 'as yet unclassified' stamp: 'hmm 7/16/2001 20:09'!\rtemporaries\r\t\" [ 'Use' (variable)* '.' ]\"\r\t| vars theActualText |\r\t(self matchToken: #'Use') ifFalse: \r\t\t[\"no temps\"\r\t\tdoitFlag ifTrue: [requestor\r\t\t\t\tifNil: [tempsMark _ 1]\r\t\t\t\tifNotNil: [tempsMark _ requestor selectionInterval first].\r\t\t\t^ #()].\r\t\ttempsMark _ prevEnd+1.\r\t\ttempsMark > 0 ifTrue:\r\t\t\t[theActualText _ source contents.\r\t\t\t[tempsMark < theActualText size and: [(theActualText at: tempsMark) isSeparator]]\r\t\t\t\twhileTrue: [tempsMark _ tempsMark + 1]].\r\t\t\t^ #()].\r\tvars _ OrderedCollection new.\r\t[hereType == #word]\r\t\twhileTrue: [vars addLast: (encoder bindTemp: self advance)].\r\t(self match: #period) ifTrue: \r\t\t[tempsMark _ prevMark.\r\t\t^ vars].\r\t^ self expected: 'Period'! !\rTextStream subclass: #DialectStream\r\tinstanceVariableNames: 'dialect colorTable'\r\tclassVariableNames: 'ST80ColorTable Sq00ColorTable'\r\tpoolDictionaries: ''\r\tcategory: 'System-Compiler'!\r\r!DialectStream methodsFor: 'color/style' stamp: 'sw 5/20/2001 11:20'!\rcolorTable\r\t\"Answer the table to use to determine colors\"\r\r\t^ colorTable ifNil:\r\t\t[colorTable _ dialect == #SQ00\r\t\t\tifTrue:\r\t\t\t\t[Sq00ColorTable]\r\t\t\tifFalse:\r\t\t\t\t[ST80ColorTable]]! !\r\r!DialectStream methodsFor: 'color/style' stamp: 'sw 5/20/2001 21:05'!\rwithColor: colorSymbol emphasis: emphasisSymbol do: aBlock\r\t\"Evaluate the given block with the given color and style text attribute\"\r\r\t^ self withAttributes: {TextColor color: (Color perform: colorSymbol).\r\t\t\t\t\t\t\tTextEmphasis perform: emphasisSymbol}\r\t\tdo: aBlock! !\r\r!DialectStream methodsFor: 'color/style' stamp: 'sw 5/20/2001 11:30'!\rwithStyleFor: elementType do: aBlock\r\t\"Evaluate aBlock with appropriate emphasis and color for the given elementType\"\r\r\t| colorAndStyle |\r\tcolorAndStyle _ self colorTable at: elementType.\r\t^ self withColor: colorAndStyle first emphasis: colorAndStyle second do: aBlock! !\r\r\r!DialectStream methodsFor: 'access' stamp: 'di 4/5/2000 08:48'!\rdialect\r\r\t^ dialect! !\r\r!DialectStream methodsFor: 'access' stamp: 'di 4/5/2000 08:48'!\rsetDialect: dialectSymbol\r\r\tdialect _ dialectSymbol! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rDialectStream class\r\tinstanceVariableNames: ''!\r\r!DialectStream class methodsFor: 'class initialization' stamp: 'sw 5/20/2001 11:27'!\rinitialize\r\t\"Initialize the color tables\"\r\r\tself initializeST80ColorTable.\r\tself initializeSq00ColorTable.\r\r\"DialectStream initialize\"\r! !\r\r!DialectStream class methodsFor: 'class initialization' stamp: 'sw 5/20/2001 21:09'!\rinitializeST80ColorTable\r\t\"Initiialize the colors that characterize the ST80 dialect\"\r\r\tST80ColorTable _ IdentityDictionary new.\r\t#(\t(temporaryVariable blue italic)\r\t\t(methodArgument blue normal)\r\t\t(methodSelector black bold)\r\t\t(blockArgument red normal)\r\t\t(comment brown normal)\r\t\t(variable magenta normal)\r\t\t(literal\ttan normal)\r\t\t(keyword darkGray bold)\r\t\t(prefixKeyword veryDarkGray bold)\r\t\t(setOrReturn black bold)) do:\r\t\t\t[:aTriplet |\r\t\t\t\tST80ColorTable at: aTriplet first put: aTriplet allButFirst]\r\r\"DialectStream initialize\"! !\r\r!DialectStream class methodsFor: 'class initialization' stamp: 'sw 5/20/2001 11:25'!\rinitializeSq00ColorTable\r\t\"Initiialize the colors that characterize the Sq00 dialect\"\r\r\tSq00ColorTable _ IdentityDictionary new.\r\t#(\t(temporaryVariable black normal)\r\t\t(methodArgument black normal)\r\t\t(methodSelector black bold)\r\t\t(blockArgument black normal)\r\t\t(comment brown normal)\r\t\t(variable black normal)\r\t\t(literal\t blue normal)\r\t\t(keyword darkGray bold)\r\t\t(prefixKeyword veryDarkGray bold)\r\t\t(setOrReturn black bold)) do:\r\t\t\t[:aTriplet |\r\t\t\t\tSq00ColorTable at: aTriplet first put: aTriplet allButFirst]! !\r\r\r!DialectStream class methodsFor: 'instance creation' stamp: 'sw 5/20/2001 21:07'!\rdialect: dialectSymbol contents: blockWithArg \r\t\"Evaluate blockWithArg on a DialectStream of the given description\"\r\r\t| stream |\r\tstream _ self on: (Text new: 400).\r\tstream setDialect: dialectSymbol.\r\tblockWithArg value: stream.\r\t^ stream contents! !\rSet subclass: #Dictionary\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Unordered'!\r!Dictionary commentStamp: '<historical>' prior: 0!\rI represent a set of elements that can be viewed from one of two perspectives: a set of associations, or a container of values that are externally named where the name can be any object that responds to =. The external name is referred to as the key.  I inherit many operations from Set.!\r\r\r!Dictionary methodsFor: 'accessing'!\rassociationAt: key \r\t^ self associationAt: key ifAbsent: [self errorKeyNotFound]! !\r\r!Dictionary methodsFor: 'accessing'!\rassociationAt: key ifAbsent: aBlock \r\t\"Answer the association with the given key.\r\tIf key is not found, return the result of evaluating aBlock.\"\r\r\t| index assoc |\r\tindex _ self findElementOrNil: key.\r\tassoc _ array at: index.\r\tnil == assoc ifTrue: [ ^ aBlock value ].\r\t^ assoc! !\r\r!Dictionary methodsFor: 'accessing' stamp: 'tk 4/9/1999 10:22'!\rassociationDeclareAt: aKey\r\t\"Return an existing association, or create and return a new one.  Needed as a single message by ImageSegment.prepareToBeSaved.\"\r\r\t| existing |\r\t^ self associationAt: aKey ifAbsent: [\r\t\t(Undeclared includesKey: aKey)\r\t\t\tifTrue: \r\t\t\t\t[existing _ Undeclared associationAt: aKey.\r\t\t\t\tUndeclared removeKey: aKey.\r\t\t\t\tself add: existing]\r\t\t\tifFalse: \r\t\t\t\t[self add: aKey -> false]]! !\r\r!Dictionary methodsFor: 'accessing' stamp: 'dvf 9/17/2003 16:03'!\rassociations\r\t\"Answer a Collection containing the receiver's associations.\"\r\t| out |\r\tout _ WriteStream on: (Array new: self size).\r\tself associationsDo: [:value | out nextPut: value].\r\t^ out contents! !\r\r!Dictionary methodsFor: 'accessing'!\rat: key \r\t\"Answer the value associated with the key.\"\r\r\t^ self at: key ifAbsent: [self errorKeyNotFound]! !\r\r!Dictionary methodsFor: 'accessing' stamp: 'sma 5/12/2000 14:59'!\rat: key ifAbsent: aBlock \r\t\"Answer the value associated with the key or, if key isn't found,\r\tanswer the result of evaluating aBlock.\"\r\r\t| assoc |\r\tassoc _ array at: (self findElementOrNil: key).\r\tassoc ifNil: [^ aBlock value].\r\t^ assoc value! !\r\r!Dictionary methodsFor: 'accessing' stamp: 'sma 5/12/2000 15:01'!\rat: key ifAbsentPut: aBlock \r\t\"Return the value at the given key. \r\tIf key is not included in the receiver store the result \r\tof evaluating aBlock as new value.\"\r\r\t^ self at: key ifAbsent: [self at: key put: aBlock value]! !\r\r!Dictionary methodsFor: 'accessing' stamp: 'jm 5/15/1998 07:20'!\rat: key ifPresent: aBlock\r\t\"Lookup the given key in the receiver. If it is present, answer the value of evaluating the given block with the value associated with the key. Otherwise, answer nil.\"\r\r\t| v |\r\tv _ self at: key ifAbsent: [^ nil].\r\t^ aBlock value: v\r! !\r\r!Dictionary methodsFor: 'accessing' stamp: 'di 3/7/2001 15:29'!\rat: key ifPresentAndInMemory: aBlock\r\t\"Lookup the given key in the receiver. If it is present, answer the value of evaluating the given block with the value associated with the key. Otherwise, answer nil.\"\r\r\t| v |\r\tv _ self at: key ifAbsent: [^ nil].\r\tv isInMemory ifFalse: [^ nil].\r\t^ aBlock value: v\r! !\r\r!Dictionary methodsFor: 'accessing' stamp: 'sma 5/12/2000 15:00'!\rat: key put: anObject \r\t\"Set the value at key to be anObject.  If key is not found, create a\r\tnew entry for key and set is value to anObject. Answer anObject.\"\r\r\t| index assoc |\r\tindex _ self findElementOrNil: key.\r\tassoc _ array at: index.\r\tassoc\r\t\tifNil: [self atNewIndex: index put: (Association key: key value: anObject)]\r\t\tifNotNil: [assoc value: anObject].\r\t^ anObject! !\r\r!Dictionary methodsFor: 'accessing' stamp: 'ar 2/13/1999 21:16'!\rkeyAtIdentityValue: value \r\t\"Answer the key that is the external name for the argument, value. If \r\tthere is none, answer nil.\r\tNote: There can be multiple keys with the same value. Only one is returned.\"\r\r\t^self keyAtIdentityValue: value ifAbsent: [self errorValueNotFound]! !\r\r!Dictionary methodsFor: 'accessing' stamp: 'ar 2/13/1999 21:16'!\rkeyAtIdentityValue: value ifAbsent: exceptionBlock\r\t\"Answer the key that is the external name for the argument, value. If \r\tthere is none, answer the result of evaluating exceptionBlock.\r\tNote: There can be multiple keys with the same value. Only one is returned.\"\r \r\tself associationsDo: \r\t\t[:association | value == association value ifTrue: [^association key]].\r\t^exceptionBlock value! !\r\r!Dictionary methodsFor: 'accessing'!\rkeyAtValue: value \r\t\"Answer the key that is the external name for the argument, value. If \r\tthere is none, answer nil.\"\r\r\t^self keyAtValue: value ifAbsent: [self errorValueNotFound]! !\r\r!Dictionary methodsFor: 'accessing' stamp: 'tk 2/18/97'!\rkeyAtValue: value ifAbsent: exceptionBlock\r\t\"Answer the key that is the external name for the argument, value. If \r\tthere is none, answer the result of evaluating exceptionBlock.\r\t: Use =, not ==, so stings like 'this' can be found.  Note that MethodDictionary continues to use == so it will be fast.\"\r \r\tself associationsDo: \r\t\t[:association | value = association value ifTrue: [^association key]].\r\t^exceptionBlock value! !\r\r!Dictionary methodsFor: 'accessing'!\rkeys\r\t\"Answer a Set containing the receiver's keys.\"\r\t| aSet |\r\taSet _ Set new: self size.\r\tself keysDo: [:key | aSet add: key].\r\t^ aSet! !\r\r!Dictionary methodsFor: 'accessing' stamp: 'sma 6/18/2000 12:56'!\rkeysSortedSafely\r\t\"Answer a SortedCollection containing the receiver's keys.\"\r\t| sortedKeys |\r\tsortedKeys _ SortedCollection new: self size.\r\tsortedKeys sortBlock:\r\t\t[:x :y |  \"Should really be use <obj, string, num> compareSafely...\"\r\t\t((x isString and: [y isString])\r\t\t\tor: [x isNumber and: [y isNumber]])\r\t\t\tifTrue: [x < y]\r\t\t\tifFalse: [x class == y class\r\t\t\t\tifTrue: [x printString < y printString]\r\t\t\t\tifFalse: [x class name < y class name]]].\r\tself keysDo: [:each | sortedKeys addLast: each].\r\t^ sortedKeys reSort! !\r\r!Dictionary methodsFor: 'accessing' stamp: 'ar 7/11/1999 07:28'!\rvalues\r\t\"Answer a Collection containing the receiver's values.\"\r\t| out |\r\tout _ WriteStream on: (Array new: self size).\r\tself valuesDo: [:value | out nextPut: value].\r\t^ out contents! !\r\r\r!Dictionary methodsFor: 'testing' stamp: 'bf 8/20/1999 15:07'!\rhasContentsInExplorer\r\r\t^self isEmpty not! !\r\r!Dictionary methodsFor: 'testing'!\rincludes: anObject\r\r\tself do: [:each | anObject = each ifTrue: [^true]].\r\t^false! !\r\r!Dictionary methodsFor: 'testing' stamp: 'sw 2/14/2000 14:34'!\rincludesIdentity: anObject\r\t\"Answer whether anObject is one of the values of the receiver.  Contrast #includes: in which there is only an equality check, here there is an identity check\"\r\r\tself do: [:each | anObject == each ifTrue: [^ true]].\r\t^ false! !\r\r!Dictionary methodsFor: 'testing' stamp: 'RAA 8/23/2001 12:56'!\rincludesKey: key \r\t\"Answer whether the receiver has a key equal to the argument, key.\"\r\t\r\tself at: key ifAbsent: [^false].\r\t^true! !\r\r!Dictionary methodsFor: 'testing' stamp: 'sw 3/23/2000 01:12'!\rkeyForIdentity: anObject\r\t\"If anObject is one of the values of the receive, return its key, else return nil.  Contrast #keyAtValue: in which there is only an equality check, here there is an identity check\"\r\r\tself associationsDo: [:assoc | assoc value == anObject ifTrue: [^ assoc key]].\r\t^ nil! !\r\r!Dictionary methodsFor: 'testing'!\roccurrencesOf: anObject \r\t\"Answer how many of the receiver's elements are equal to anObject.\"\r\r\t| count |\r\tcount _ 0.\r\tself do: [:each | anObject = each ifTrue: [count _ count + 1]].\r\t^count! !\r\r\r!Dictionary methodsFor: 'adding'!\radd: anAssociation\r\t| index element |\r\tindex _ self findElementOrNil: anAssociation key.\r\telement _ array at: index.\r\telement == nil\r\t\tifTrue: [self atNewIndex: index put: anAssociation]\r\t\tifFalse: [element value: anAssociation value].\r\t^ anAssociation! !\r\r!Dictionary methodsFor: 'adding' stamp: 'raok 12/17/2003 16:01'!\raddAll: aKeyedCollection\r\taKeyedCollection == self ifFalse: [\r\t\taKeyedCollection keysAndValuesDo: [:key :value |\r\t\t\tself at: key put: value]].\r\t^aKeyedCollection! !\r\r!Dictionary methodsFor: 'adding'!\rdeclare: key from: aDictionary \r\t\"Add key to the receiver. If key already exists, do nothing. If aDictionary \r\tincludes key, then remove it from aDictionary and use its association as \r\tthe element of the receiver.\"\r\r\t(self includesKey: key) ifTrue: [^ self].\r\t(aDictionary includesKey: key)\r\t\tifTrue: \r\t\t\t[self add: (aDictionary associationAt: key).\r\t\t\taDictionary removeKey: key]\r\t\tifFalse: \r\t\t\t[self add: key -> nil]! !\r\r\r!Dictionary methodsFor: 'removing' stamp: 'di 4/4/2000 11:47'!\rkeysAndValuesRemove: keyValueBlock\r\t\"Removes all entries for which keyValueBlock returns true.\"\r\t\"When removing many items, you must not do it while iterating over the dictionary, since it may be changing.  This method takes care of tallying the removals in a first pass, and then performing all the deletions afterward.  Many places in the sytem could be simplified by using this method.\"\r\r\t| removals |\r\tremovals _ OrderedCollection new.\r\tself associationsDo:\r\t\t[:assoc | (keyValueBlock value: assoc key value: assoc value)\r\t\t\tifTrue: [removals add: assoc key]].\r \tremovals do:\r\t\t[:aKey | self removeKey: aKey]! !\r\r!Dictionary methodsFor: 'removing'!\rremove: anObject\r\r\tself shouldNotImplement! !\r\r!Dictionary methodsFor: 'removing'!\rremove: anObject ifAbsent: exceptionBlock\r\r\tself shouldNotImplement! !\r\r!Dictionary methodsFor: 'removing'!\rremoveKey: key \r\t\"Remove key from the receiver.\r\tIf key is not in the receiver, notify an error.\"\r\r\t^ self removeKey: key ifAbsent: [self errorKeyNotFound]! !\r\r!Dictionary methodsFor: 'removing'!\rremoveKey: key ifAbsent: aBlock \r\t\"Remove key (and its associated value) from the receiver. If key is not in \r\tthe receiver, answer the result of evaluating aBlock. Otherwise, answer \r\tthe value externally named by key.\"\r\r\t| index assoc |\r\tindex _ self findElementOrNil: key.\r\tassoc _ array at: index.\r\tassoc == nil ifTrue: [ ^ aBlock value ].\r\tarray at: index put: nil.\r\ttally _ tally - 1.\r\tself fixCollisionsFrom: index.\r\t^ assoc value! !\r\r!Dictionary methodsFor: 'removing'!\rremoveUnreferencedKeys   \"Undeclared removeUnreferencedKeys\"\r\r\t^ self unreferencedKeys do: [:key | self removeKey: key].! !\r\r!Dictionary methodsFor: 'removing' stamp: 'dvf 8/23/2003 11:51'!\runreferencedKeys\r\t\"TextConstants unreferencedKeys\"\r\r\t| n |\r\t^'Scanning for references . . .' \r\t\tdisplayProgressAt: Sensor cursorPoint\r\t\tfrom: 0\r\t\tto: self size\r\t\tduring: \r\t\t\t[:bar | \r\t\t\tn := 0.\r\t\t\tself keys select: \r\t\t\t\t\t[:key | \r\t\t\t\t\tbar value: (n := n + 1).\r\t\t\t\t\t(self systemNavigation allCallsOn: (self associationAt: key)) isEmpty]]! !\r\r\r!Dictionary methodsFor: 'enumerating'!\rassociationsDo: aBlock \r\t\"Evaluate aBlock for each of the receiver's elements (key/value \r\tassociations).\"\r\r\tsuper do: aBlock! !\r\r!Dictionary methodsFor: 'enumerating'!\rcollect: aBlock \r\t\"Evaluate aBlock with each of my values as the argument.  Collect the\r\tresulting values into a collection that is like me. Answer with the new\r\tcollection.\"\r\t| newCollection |\r\tnewCollection _ OrderedCollection new: self size.\r\tself do: [:each | newCollection add: (aBlock value: each)].\r\t^ newCollection! !\r\r!Dictionary methodsFor: 'enumerating'!\rdo: aBlock\r\r\tsuper do: [:assoc | aBlock value: assoc value]! !\r\r!Dictionary methodsFor: 'enumerating' stamp: 'ar 7/11/1999 08:04'!\rkeysAndValuesDo: aBlock\r\t^self associationsDo:[:assoc|\r\t\taBlock value: assoc key value: assoc value].! !\r\r!Dictionary methodsFor: 'enumerating'!\rkeysDo: aBlock \r\t\"Evaluate aBlock for each of the receiver's keys.\"\r\r\tself associationsDo: [:association | aBlock value: association key]! !\r\r!Dictionary methodsFor: 'enumerating'!\rselect: aBlock \r\t\"Evaluate aBlock with each of my values as the argument. Collect into a\r\tnew dictionary, only those associations for which aBlock evaluates to\r\ttrue.\"\r\r\t| newCollection |\r\tnewCollection _ self species new.\r\tself associationsDo: \r\t\t[:each | \r\t\t(aBlock value: each value) ifTrue: [newCollection add: each]].\r\t^newCollection! !\r\r!Dictionary methodsFor: 'enumerating' stamp: 'dtl 2/17/2003 09:48'!\rvaluesDo: aBlock \r\t\"Evaluate aBlock for each of the receiver's values.\"\r\r\tself associationsDo: [:association | aBlock value: association value]! !\r\r\r!Dictionary methodsFor: 'printing' stamp: 'MPW 1/4/1901 08:33'!\rflattenOnStream:aStream\r\t^aStream writeDictionary:self.\r! !\r\r!Dictionary methodsFor: 'printing' stamp: 'sma 6/1/2000 09:52'!\rprintElementsOn: aStream\r\taStream nextPut: $(.\r\tself keysSortedSafely do:\r\t\t[:key | aStream print: key; nextPutAll: '->'; print: (self at: key); space].\r\taStream nextPut: $)! !\r\r!Dictionary methodsFor: 'printing'!\rstoreOn: aStream\r\t| noneYet |\r\taStream nextPutAll: '(('.\r\taStream nextPutAll: self class name.\r\taStream nextPutAll: ' new)'.\r\tnoneYet _ true.\r\tself associationsDo: \r\t\t\t[:each | \r\t\t\tnoneYet\r\t\t\t\tifTrue: [noneYet _ false]\r\t\t\t\tifFalse: [aStream nextPut: $;].\r\t\t\taStream nextPutAll: ' add: '.\r\t\t\taStream store: each].\r\tnoneYet ifFalse: [aStream nextPutAll: '; yourself'].\r\taStream nextPut: $)! !\r\r\r!Dictionary methodsFor: 'private' stamp: 'raok 4/22/2002 12:09'!\rcopy\r\t\"Must copy the associations, or later store will affect both the\roriginal and the copy\"\r\r\t^ self shallowCopy withArray:\r\t\t(array collect: [:assoc |\r\t\t\tassoc ifNil: [nil]\r\t\t\t\tifNotNil: [Association key: assoc key\rvalue: assoc value]])! !\r\r!Dictionary methodsFor: 'private'!\rerrorKeyNotFound\r\r\tself error: 'key not found'! !\r\r!Dictionary methodsFor: 'private'!\rerrorValueNotFound\r\r\tself error: 'value not found'! !\r\r!Dictionary methodsFor: 'private'!\rkeyAt: index\r\t\"May be overridden by subclasses so that fixCollisions will work\"\r\t| assn |\r\tassn _ array at: index.\r\tassn == nil ifTrue: [^ nil]\r\t\t\t\tifFalse: [^ assn key]! !\r\r!Dictionary methodsFor: 'private'!\rnoCheckAdd: anObject\r\t\"Must be defined separately for Dictionary because (self findElementOrNil:) expects a key, not an association.  9/7/96 tk\"\r\r\tarray at: (self findElementOrNil: anObject key) put: anObject.\r\ttally _ tally + 1! !\r\r!Dictionary methodsFor: 'private'!\rrehash\r\t\"Smalltalk rehash.\"\r\t| newSelf |\r\tnewSelf _ self species new: self size.\r\tself associationsDo: [:each | newSelf noCheckAdd: each].\r\tarray _ newSelf array! !\r\r!Dictionary methodsFor: 'private'!\rscanFor: anObject\r\t\"Scan the key array for the first slot containing either a nil (indicating an empty slot) or an element that matches anObject. Answer the index of that slot or zero if no slot is found. This method will be overridden in various subclasses that have different interpretations for matching elements.\"\r\t| element start finish |\r\tstart _ (anObject hash \\\\ array size) + 1.\r\tfinish _ array size.\r\r\t\"Search from (hash mod size) to the end.\"\r\tstart to: finish do:\r\t\t[:index | ((element _ array at: index) == nil or: [element key = anObject])\r\t\t\tifTrue: [^ index ]].\r\r\t\"Search from 1 to where we started.\"\r\t1 to: start-1 do:\r\t\t[:index | ((element _ array at: index) == nil or: [element key = anObject])\r\t\t\tifTrue: [^ index ]].\r\r\t^ 0  \"No match AND no empty slot\"! !\r\r!Dictionary methodsFor: 'private'!\rvalueAtNewKey: aKey put: anObject atIndex: index declareFrom: aDictionary \r\t\"Support for coordinating class variable and global declarations\r\twith variables that have been put in Undeclared so as to\r\tredirect all references to the undeclared variable.\"\r\r\t(aDictionary includesKey: aKey)\r\t\tifTrue: \r\t\t\t[self atNewIndex: index \r\t\t\t\tput: ((aDictionary associationAt: aKey) value: anObject).\r\t\t\taDictionary removeKey: aKey]\r\t\tifFalse: \r\t\t\t[self atNewIndex: index put: (Association key: aKey value: anObject)]! !\r\r\r!Dictionary methodsFor: 'user interface' stamp: 'tk 4/12/1998 08:54'!\rinspect\r\t\"Open a DictionaryInspector on the receiver.  Use basicInspect to get a normal (less useful) type of inspector.\"\r\r\tDictionaryInspector openOn: self withEvalPane: true! !\r\r!Dictionary methodsFor: 'user interface' stamp: 'tk 4/12/1998 08:54'!\rinspectWithLabel: aLabel\r\t\"Open a DictionaryInspector on the receiver. Use basicInspect to get a normal (less useful) type of inspector.\"\r\r\tDictionaryInspector openOn: self withEvalPane: true withLabel: aLabel! !\r\r\r!Dictionary methodsFor: '*Compiler' stamp: 'ar 5/17/2003 14:07'!\rbindingOf: varName\r\t^self associationAt: varName ifAbsent:[nil]! !\r\r!Dictionary methodsFor: '*Compiler' stamp: 'ar 5/18/2003 20:33'!\rbindingsDo: aBlock\r\t^self associationsDo: aBlock! !\r\r\r!Dictionary methodsFor: 'comparing' stamp: 'raok 6/10/2002 15:29'!\r= aDictionary\r\t\"Two dictionaries are equal if\r\t (a) they are the same 'kind' of thing.\r\t (b) they have the same set of keys.\r\t (c) for each (common) key, they have the same value\".\r\r\t(aDictionary isKindOf: Dictionary) ifFalse: [^false].\r\tself size = aDictionary size ifFalse: [^false].\r\tself associationsDo: [:assoc|\r\t\t(aDictionary at: assoc key ifAbsent: [^false]) = assoc value\r\t\t\tifFalse: [^false]].\r\t^true\r\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rDictionary class\r\tinstanceVariableNames: ''!\r\r!Dictionary class methodsFor: 'instance creation'!\rnewFrom: aDict \r\t\"Answer an instance of me containing the same associations as aDict.\r\t Error if any key appears twice.\"\r\t| newDictionary |\r\tnewDictionary _ self new: aDict size.\r\taDict associationsDo:\r\t\t[:x |\r\t\t(newDictionary includesKey: x key)\r\t\t\tifTrue: [self error: 'Duplicate key: ', x key printString]\r\t\t\tifFalse: [newDictionary add: x]].\r\t^ newDictionary\r\r\"\tNewDictionary newFrom: {1->#a. 2->#b. 3->#c}\r\t{1->#a. 2->#b. 3->#c} as: NewDictionary\r\tNewDictionary newFrom: {1->#a. 2->#b. 1->#c}\r\t{1->#a. 2->#b. 1->#c} as: NewDictionary\r\"! !\rInspector subclass: #DictionaryInspector\r\tinstanceVariableNames: 'keyArray'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Inspector'!\r\r!DictionaryInspector methodsFor: 'accessing'!\rfieldList\r\t^ keyArray collect: [ :key | key printString ]! !\r\r!DictionaryInspector methodsFor: 'accessing'!\rinspect: aDictionary\r\t\"Initialize the receiver so that it is inspecting aDictionary. There is no \r\tcurrent selection.\"\r\r\tself initialize.\r\t(aDictionary isKindOf: Dictionary) ifFalse:\r\t\t[^ self error: 'DictionaryInspectors can only inspect dictionaries' ].\r\tobject _ aDictionary.\r\tcontents _ ''.\r\tself calculateKeyArray! !\r\r\r!DictionaryInspector methodsFor: 'selecting' stamp: 'tk 4/11/1998 13:09'!\raddEntry: aKey\r\tobject at: aKey put: nil.\r\tself calculateKeyArray.\r\tselectionIndex _ keyArray indexOf: aKey.\r\tself changed: #inspectObject.\r\tself changed: #fieldList.\r\tself update! !\r\r!DictionaryInspector methodsFor: 'selecting' stamp: 'di 3/8/2000 09:14'!\rcalculateKeyArray\r\t\"Recalculate the KeyArray from the object being inspected\"\r\r\tkeyArray _ object keysSortedSafely asArray.\r\tselectionIndex _ 0.\r! !\r\r!DictionaryInspector methodsFor: 'selecting' stamp: 'di 9/22/1998 21:25'!\rcontentsIsString\r\t\"Hacked so contents empty when deselected\"\r\r\t^ (selectionIndex = 0)! !\r\r!DictionaryInspector methodsFor: 'selecting'!\rreplaceSelectionValue: anObject\r\t^ object at: (keyArray at: selectionIndex) put: anObject! !\r\r!DictionaryInspector methodsFor: 'selecting' stamp: 'ar 12/7/1999 18:12'!\rselection\r\r\tselectionIndex = 0 ifTrue: [^ ''].\r\t^ object at: (keyArray at: selectionIndex) ifAbsent:[nil]! !\r\r!DictionaryInspector methodsFor: 'selecting'!\rselectionUnmodifiable\r\t\"For dicionary inspectors, any selection is modifiable\"\r\r\t^ selectionIndex <= 0! !\r\r\r!DictionaryInspector methodsFor: 'menu' stamp: 'tk 4/12/1998 08:15'!\raddEntry\r\t| newKey aKey |\r\r\tnewKey _ FillInTheBlank request:\r'Enter new key, then type RETURN.\r(Expression will be evaluated for value.)\rExamples:  #Fred    ''a string''   3+4'.\r\taKey _ Compiler evaluate: newKey.\r\tobject at: aKey put: nil.\r\tself calculateKeyArray.\r\tselectionIndex _ keyArray indexOf: aKey.\r\tself changed: #inspectObject.\r\tself changed: #fieldList.\r\tself update! !\r\r!DictionaryInspector methodsFor: 'menu' stamp: 'ar 1/15/2001 18:37'!\rcopyName\r\t\"Copy the name of the current variable, so the user can paste it into the window below and work with is.  If collection, do (xxx at: 1). \"\r\r\t| sel |\r\tsel _ '(self at: ', \r\t\t(String streamContents: [:strm | (keyArray at: selectionIndex) storeOn: strm]) ,\r\t\t')'.\r\tClipboard clipboardText: sel asText.\t\"no undo allowed\"! !\r\r!DictionaryInspector methodsFor: 'menu' stamp: 'ssa 9/3/2008 11:06'!\rdictionaryMenu: aMenu\r\t\"Set up the key-list menu for a dictionary inspector\"\r\r\taMenu title: 'Dictionary key'.\r\t^ aMenu addList: #(\r\t\t('inspect'\t\t\t\t\t\tinspectSelection)\r\t\t('copy name'\t\t\t\t\tcopyName)\r\t\t('references'\t\t\t\t\tselectionReferences)\r\t\t('objects pointing to this value'\tobjectReferencesToSelection)\r\t\t('senders of this key'\t\t\tsendersOfSelectedKey)\r\t\t-\r\t\t('refresh view'\t\t\t\t\tcalculateKeyArray)\r\t\t-\r\t\t('add key'\t\t\t\t\t\taddEntry)\r\t\t('rename key'\t\t\t\t\trenameEntry)\r\t\t('remove'\t\t\t\t\t\tremoveSelection)\r\t\t-\r\t\t('basic inspect'\t\t\t\t\tinspectBasic))! !\r\r!DictionaryInspector methodsFor: 'menu' stamp: 'tk 4/12/1998 08:19'!\rremoveSelection\r\tselectionIndex = 0 ifTrue: [^ self changed: #flash].\r\tobject removeKey: (keyArray at: selectionIndex).\r\tselectionIndex _ 0.\r\tcontents _ ''.\r\tself calculateKeyArray.\r\tself changed: #inspectObject.\r\tself changed: #fieldList.\r\tself changed: #selection.\r\tself changed: #selectionIndex.! !\r\r!DictionaryInspector methodsFor: 'menu' stamp: 'tk 10/18/2002 16:41'!\rrenameEntry\r\t| newKey aKey value |\r\r\tvalue _ object at: (keyArray at: selectionIndex).\r\tnewKey _ FillInTheBlank request: \r'Enter new key, then type RETURN.\r(Expression will be evaluated for value.)\rExamples:  #Fred    ''a string''   3+4'\r\t\t initialAnswer: (keyArray at: selectionIndex) printString.\r\taKey _ Compiler evaluate: newKey.\r\tobject removeKey: (keyArray at: selectionIndex).\r\tobject at: aKey put: value.\r\tself calculateKeyArray.\r\tselectionIndex _ keyArray indexOf: aKey.\r\tself changed: #inspectObject.\r\tself changed: #fieldList.\r\tself update! !\r\r!DictionaryInspector methodsFor: 'menu' stamp: 'nk 6/26/2003 21:43'!\rselectionReferences\r\t\"Create a browser on all references to the association of the current selection.\"\r\r\tself selectionIndex = 0 ifTrue: [^ self changed: #flash].\r\tobject class == MethodDictionary ifTrue: [^ self changed: #flash].\r\tself systemNavigation browseAllCallsOn: (object associationAt: (keyArray at: selectionIndex)).\r! !\r\r!DictionaryInspector methodsFor: 'menu' stamp: 'wiz 5/16/2004 13:05'!\rsendersOfSelectedKey\r\t\"Create a browser on all senders of the selected key\"\r\t| aKey |\r\tself selectionIndex = 0\r\t\tifTrue: [^ self changed: #flash].\r\t((aKey := keyArray at: selectionIndex) isKindOf: Symbol)\r\t\tifFalse: [^ self changed: #flash].\r\tobject class == MethodDictionary\r\t\tifTrue: [^ self changed: #flash].\r\tSystemNavigation default browseAllCallsOn: aKey! !\rArrayedCollection subclass: #DirectoryEntry\r\tinstanceVariableNames: 'name creationTime modificationTime dirFlag fileSize'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Files'!\r!DirectoryEntry commentStamp: '<historical>' prior: 0!\ran entry in a directory; a reference to either a file or a directory.!\r\r\r!DirectoryEntry methodsFor: 'access' stamp: 'ls 7/15/1998 21:37'!\rcreationTime\r\t\"time the entry was created.  (what's its type?)\"\r\t^creationTime! !\r\r!DirectoryEntry methodsFor: 'access' stamp: 'ls 7/15/1998 21:38'!\rfileSize\r\t\"size of the entry, if it's a file\"\r\t^fileSize! !\r\r!DirectoryEntry methodsFor: 'access' stamp: 'ls 7/15/1998 21:38'!\risDirectory\r\t\"whether this entry represents a directory\"\r\t^dirFlag! !\r\r!DirectoryEntry methodsFor: 'access' stamp: 'ls 7/15/1998 21:37'!\rmodificationTime\r\t\"time the entry was last modified\"\r\t^modificationTime! !\r\r!DirectoryEntry methodsFor: 'access' stamp: 'ls 7/15/1998 21:37'!\rname\r\t\"name of the entry\"\r\t^name! !\r\r\r!DirectoryEntry methodsFor: 'access-compatibility' stamp: 'ls 7/15/1998 22:29'!\rat: index\r\t\"compatibility interface\"\r\t\"self halt: 'old-style access to DirectoryEntry'\"\r\tindex = 1 ifTrue: [ ^self name ].\r\tindex = 2 ifTrue: [ ^self creationTime ].\r\tindex = 3 ifTrue: [ ^self modificationTime ].\r\tindex = 4 ifTrue:[ ^self isDirectory ].\r\tindex = 5 ifTrue:[ ^self fileSize ].\r\tself error: 'invalid index specified'.! !\r\r!DirectoryEntry methodsFor: 'access-compatibility' stamp: 'ls 7/15/1998 22:16'!\rsize\r\t^5! !\r\r\r!DirectoryEntry methodsFor: 'private-initialization' stamp: 'ls 7/15/1998 21:42'!\rprivateName: name0  creationTime: creationTime0  modificationTime: modificationTime0  isDirectory: isDirectory0  fileSize: fileSize0\r\tname _ name0.\r\tcreationTime _ creationTime0.\r\tmodificationTime _ modificationTime0.\r\tdirFlag _ isDirectory0.\r\tfileSize _ fileSize0.! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rDirectoryEntry class\r\tinstanceVariableNames: ''!\r\r!DirectoryEntry class methodsFor: 'instance creation' stamp: 'ls 7/15/1998 21:42'!\rfromArray: array\r\t^self name: (array at: 1) creationTime: (array at: 2) modificationTime: (array at: 3) isDirectory: (array at: 4) fileSize: (array at: 5) ! !\r\r!DirectoryEntry class methodsFor: 'instance creation' stamp: 'ls 7/15/1998 21:41'!\rname: name0  creationTime: creationTime  modificationTime: modificationTime   isDirectory: isDirectory  fileSize: fileSize\r\t^self new privateName: name0  creationTime: creationTime  modificationTime: modificationTime  isDirectory: isDirectory  fileSize: fileSize! !\rDisplayObject subclass: #DisplayMedium\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Graphics-Display Objects'!\r!DisplayMedium commentStamp: '<historical>' prior: 0!\rI am a display object which can both paint myself on a medium (displayOn: messages), and can act as a medium myself. My chief subclass is Form.!\r\r\r!DisplayMedium methodsFor: 'coloring'!\rfill: aRectangle fillColor: aForm \r\t\"Replace a rectangular area of the receiver with the pattern described by \r\taForm according to the rule over.\"\r\r\tself fill: aRectangle rule: Form over fillColor: aForm! !\r\r!DisplayMedium methodsFor: 'coloring'!\rfill: aRectangle rule: anInteger fillColor: aForm \r\t\"Replace a rectangular area of the receiver with the pattern described by \r\taForm according to the rule anInteger.\"\r\r\tself subclassResponsibility! !\r\r!DisplayMedium methodsFor: 'coloring'!\rfillBlack\r\t\"Set all bits in the receiver to black (ones).\"\r\r\tself fill: self boundingBox fillColor: Color black! !\r\r!DisplayMedium methodsFor: 'coloring'!\rfillBlack: aRectangle \r\t\"Set all bits in the receiver's area defined by aRectangle to black (ones).\"\r\r\tself fill: aRectangle rule: Form over fillColor: Color black! !\r\r!DisplayMedium methodsFor: 'coloring'!\rfillColor: aColor\r\t\"Set all pixels in the receiver to the color.  Must be a correct color for this depth of medium.  TK 1 Jun 96\"\r\r\tself fill: self boundingBox fillColor: aColor! !\r\r!DisplayMedium methodsFor: 'coloring'!\rfillGray\r\t\"Set all bits in the receiver to gray.\"\r\r\tself fill: self boundingBox fillColor: Color gray! !\r\r!DisplayMedium methodsFor: 'coloring'!\rfillGray: aRectangle\r\t\"Set all bits in the receiver's area defined by aRectangle to the gray mask.\"\r\r\tself fill: aRectangle rule: Form over fillColor: Color gray! !\r\r!DisplayMedium methodsFor: 'coloring'!\rfillShape: aShapeForm fillColor: aColor\r\t\"Fill a region corresponding to 1 bits in aShapeForm with aColor\"\r\r\t^ self fillShape: aShapeForm fillColor: aColor at: 0@0! !\r\r!DisplayMedium methodsFor: 'coloring' stamp: 'ar 5/28/2000 12:06'!\rfillShape: aShapeForm fillColor: aColor at: location\r\t\"Fill a region corresponding to 1 bits in aShapeForm with aColor\"\r\r\t((BitBlt current destForm: self sourceForm: aShapeForm fillColor: aColor\r\t\tcombinationRule: Form paint\r\t\tdestOrigin: location + aShapeForm offset sourceOrigin: 0@0\r\t\textent: self extent clipRect: self boundingBox)\r\t\tcolorMap: (Bitmap with: 0 with: 16rFFFFFFFF))\r\t\tcopyBits! !\r\r!DisplayMedium methodsFor: 'coloring'!\rfillWhite\r\t\"Set all bits in the form to white.\"\r\r\tself fill: self boundingBox fillColor: Color white.\r! !\r\r!DisplayMedium methodsFor: 'coloring'!\rfillWhite: aRectangle\r\t\"Set all bits in the receiver's area defined by aRectangle to white.\"\r\r\tself fill: aRectangle rule: Form over fillColor: Color white.\r! !\r\r!DisplayMedium methodsFor: 'coloring'!\rfillWithColor: aColor\r\t\"Fill the receiver's bounding box with the given color.\"\r\r\tself fill: self boundingBox fillColor: aColor.\r! !\r\r!DisplayMedium methodsFor: 'coloring' stamp: 'jm 6/18/1999 19:01'!\rreverse\r\t\"Change all the bits in the receiver that are white to black, and the ones \r\tthat are black to white.\"\r\r\tself fill: self boundingBox rule: Form reverse fillColor: (Color quickHighLight: self depth)! !\r\r!DisplayMedium methodsFor: 'coloring' stamp: 'jm 6/18/1999 19:00'!\rreverse: aRectangle\r\t\"Change all the bits in the receiver's area that intersects with aRectangle \r\tthat are white to black, and the ones that are black to white.\"\r\r\tself fill: aRectangle rule: Form reverse fillColor: (Color quickHighLight: self depth)! !\r\r!DisplayMedium methodsFor: 'coloring'!\rreverse: aRectangle fillColor: aMask\t\r\t\"Change all the bits in the receiver's area that intersects with aRectangle \r\taccording to the mask. Black does not necessarily turn to white, rather it \r\tchanges with respect to the rule and the bit in a corresponding mask \r\tlocation. Bound to give a surprise.\"\r\r\tself fill: aRectangle rule: Form reverse fillColor: aMask! !\r\r\r!DisplayMedium methodsFor: 'bordering'!\rborder: aRectangle width: borderWidth \r\t\"Paint a border whose rectangular area is defined by aRectangle. The \r\twidth of the border of each side is borderWidth. Uses black for \r\tdrawing the border.\"\r\r\tself border: aRectangle width: borderWidth fillColor: Color black.\r! !\r\r!DisplayMedium methodsFor: 'bordering'!\rborder: aRectangle width: borderWidth fillColor: aHalfTone \r\t\"Paint a border whose rectangular area is defined by aRectangle. The \r\twidth of the border of each side is borderWidth. Uses aHalfTone for \r\tdrawing the border.\"\r\r\tself border: aRectangle\r\t\twidthRectangle: \r\t\t\t(Rectangle\r\t\t\t\tleft: borderWidth\r\t\t\t\tright: borderWidth\r\t\t\t\ttop: borderWidth\r\t\t\t\tbottom: borderWidth)\r\t\trule: Form over\r\t\tfillColor: aHalfTone! !\r\r!DisplayMedium methodsFor: 'bordering'!\rborder: aRectangle width: borderWidth rule: combinationRule fillColor: aHalfTone \r\t\"Paint a border whose rectangular area is defined by aRectangle. The \r\twidth of the border of each side is borderWidth. Uses aHalfTone for \r\tdrawing the border.\"\r\r\tself border: aRectangle\r\t\twidthRectangle: \r\t\t\t(Rectangle\r\t\t\t\tleft: borderWidth\r\t\t\t\tright: borderWidth\r\t\t\t\ttop: borderWidth\r\t\t\t\tbottom: borderWidth)\r\t\trule: combinationRule\r\t\tfillColor: aHalfTone! !\r\r!DisplayMedium methodsFor: 'bordering'!\rborder: aRectangle widthRectangle: insets rule: combinationRule fillColor: aHalfTone\r\t\"Paint a border whose rectangular area is defined by aRectangle. The \r\twidth of each edge of the border is determined by the four coordinates \r\tof insets. Uses aHalfTone and combinationRule for drawing the border.\"\r\r\t(aRectangle areasOutside: (aRectangle insetBy: insets)) do:\r\t\t[:edgeStrip | self fill: edgeStrip rule: combinationRule fillColor: aHalfTone]! !\r\r\r!DisplayMedium methodsFor: 'displaying'!\rcopyBits: sourceRect from: sourceForm at: destOrigin clippingBox: clipRect rule: rule fillColor: aForm \r\t\"Make up a BitBlt table and copy the bits.\"\r\r\tself subclassResponsibility! !\r\r!DisplayMedium methodsFor: 'displaying' stamp: 'hmm 9/16/2000 21:27'!\rdeferUpdatesIn: aRectangle while: aBlock\r\t\"DisplayScreen overrides with something more involved...\"\r\t^aBlock value! !\r\r!DisplayMedium methodsFor: 'displaying'!\rdrawLine: sourceForm from: beginPoint to: endPoint clippingBox: clipRect rule: anInteger fillColor: aForm \r\t\"Draw line by copying the argument, sourceForm, starting at location \r\tbeginPoint and ending at endPoint, clipped by the rectangle, clipRect. \r\tThe rule and mask for copying are the arguments anInteger and aForm.\"\r\r\tself subclassResponsibility! !\rObject subclass: #DisplayObject\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Graphics-Display Objects'!\r!DisplayObject commentStamp: '<historical>' prior: 0!\rThe abstract protocol for most display primitives that are used by Views for presenting information on the screen.!\r\r\r!DisplayObject methodsFor: 'accessing'!\rextent\r\t\"Answer the point that represents the width and height of the receiver's \r\tbounding box.\"\r\r\t^self boundingBox extent! !\r\r!DisplayObject methodsFor: 'accessing'!\rheight\r\t\"Answer the number that represents the height of the receiver's \r\tbounding box.\"\r\r\t^self boundingBox height! !\r\r!DisplayObject methodsFor: 'accessing'!\roffset\r\t\"Answer the amount by which the receiver should be offset when it is \r\tdisplayed or its position is tested.\"\r\r\tself subclassResponsibility! !\r\r!DisplayObject methodsFor: 'accessing'!\roffset: aPoint \r\t\"Set the amount by which the receiver's position is offset.\"\r\r\t^self! !\r\r!DisplayObject methodsFor: 'accessing'!\rrelativeRectangle\r\t\"Answer a Rectangle whose top left corner is the receiver's offset position \r\tand whose width and height are the same as the receiver.\"\r\r\t^Rectangle origin: self offset extent: self extent! !\r\r!DisplayObject methodsFor: 'accessing'!\rwidth\r\t\"Answer the number that represents the width of the receiver's bounding \r\tbox.\"\r\r\t^self boundingBox width! !\r\r\r!DisplayObject methodsFor: 'truncation and round off'!\rrounded\r\t\"Convert the offset of the receiver to integer coordinates.\"\r\r\tself offset: self offset rounded! !\r\r\r!DisplayObject methodsFor: 'transforming'!\ralign: alignmentPoint with: relativePoint \r\t\"Translate the receiver's offset such that alignmentPoint aligns with \r\trelativePoint.\"\r\r\tself offset: (self offset translateBy: relativePoint - alignmentPoint)! !\r\r!DisplayObject methodsFor: 'transforming'!\rscaleBy: aPoint \r\t\"Scale the receiver's offset by aPoint.\"\r\r\tself offset: (self offset scaleBy: aPoint)! !\r\r!DisplayObject methodsFor: 'transforming'!\rtranslateBy: aPoint \r\t\"Translate the receiver's offset.\"\r\r\tself offset: (self offset translateBy: aPoint)! !\r\r\r!DisplayObject methodsFor: 'display box access'!\rboundingBox\r\t\"Answer the rectangular area that represents the boundaries of the \r\treceiver's space of information.\"\r\r\t^self computeBoundingBox! !\r\r!DisplayObject methodsFor: 'display box access'!\rcenter\r\r\t^ self boundingBox center! !\r\r!DisplayObject methodsFor: 'display box access'!\rcomputeBoundingBox\r\t\"Answer the rectangular area that represents the boundaries of the \r\treceiver's area for displaying information. This is the primitive for \r\tcomputing the area if it is not already known.\"\r\r\tself subclassResponsibility! !\r\r!DisplayObject methodsFor: 'display box access'!\rinitialExtent\r\t\"Included here for when a FormView is being opened\r\tas a window.  (4@4) covers border widths.\"\r\r\t^ self extent + (4@4) ! !\r\r\r!DisplayObject methodsFor: 'displaying-generic'!\rdisplayAt: aDisplayPoint \r\t\"Display the receiver located at aDisplayPoint with default settings for \r\tthe displayMedium, rule and halftone.\"\r\r\tself displayOn: Display\r\t\tat: aDisplayPoint\r\t\tclippingBox: Display boundingBox\r\t\trule: Form over\r\t\tfillColor: nil! !\r\r!DisplayObject methodsFor: 'displaying-generic'!\rdisplayOn: aDisplayMedium\r\t\"Simple default display in order to see the receiver in the upper left \r\tcorner of screen.\"\r\r\tself displayOn: aDisplayMedium at: 0 @ 0! !\r\r!DisplayObject methodsFor: 'displaying-generic'!\rdisplayOn: aDisplayMedium at: aDisplayPoint \r\t\"Display the receiver located at aDisplayPoint with default settings for \r\trule and halftone.\"\r\r\tself displayOn: aDisplayMedium\r\t\tat: aDisplayPoint\r\t\tclippingBox: aDisplayMedium boundingBox\r\t\trule: Form over\r\t\tfillColor: nil! !\r\r!DisplayObject methodsFor: 'displaying-generic'!\rdisplayOn: aDisplayMedium at: aDisplayPoint clippingBox: clipRectangle \r\t\"Display the receiver located at aDisplayPoint with default settings for \r\trule and halftone. Information to be displayed must be confined to the \r\tarea that intersects with clipRectangle.\"\r\r\tself displayOn: aDisplayMedium\r\t\tat: aDisplayPoint\r\t\tclippingBox: clipRectangle\r\t\trule: Form over\r\t\tfillColor: nil! !\r\r!DisplayObject methodsFor: 'displaying-generic'!\rdisplayOn: aDisplayMedium at: aDisplayPoint clippingBox: clipRectangle rule: ruleInteger fillColor: aForm\r\t\"This is the basic display primitive for graphic display objects. Display \r\tthe receiver located at aDisplayPoint with rule, ruleInteger, and mask, \r\taForm. Information to be displayed must be confined to the area that \r\tintersects with clipRectangle.\"\r\r\tself subclassResponsibility! !\r\r!DisplayObject methodsFor: 'displaying-generic'!\rdisplayOn: aDisplayMedium at: aDisplayPoint rule: ruleInteger\r\t\"Display the receiver located at aPoint with default setting for the \r\thalftone and clippingBox.\"\r\r\tself displayOn: aDisplayMedium\r\t\tat: aDisplayPoint\r\t\tclippingBox: aDisplayMedium boundingBox\r\t\trule: ruleInteger\r\t\tfillColor: nil! !\r\r!DisplayObject methodsFor: 'displaying-generic'!\rdisplayOn: aDisplayMedium transformation: displayTransformation clippingBox: clipRectangle \r\t\"Display primitive for the receiver where a DisplayTransformation is \r\tprovided as an argument. Alignment is defaulted to the receiver's \r\trectangle. Information to be displayed must be confined to the area that \r\tintersects with clipRectangle.\"\r\r\tself displayOn: aDisplayMedium\r\t\ttransformation: displayTransformation\r\t\tclippingBox: clipRectangle\r\t\talign: self relativeRectangle center\r\t\twith: self relativeRectangle center\r\t\trule: Form over\r\t\tfillColor: nil! !\r\r!DisplayObject methodsFor: 'displaying-generic'!\rdisplayOn: aDisplayMedium transformation: displayTransformation clippingBox: clipRectangle align: alignmentPoint with: relativePoint \r\t\"Display primitive where a DisplayTransformation is provided as an \r\targument, rule is over and mask is Form black. Information to be \r\tdisplayed must be confined to the area that intersects with clipRectangle.\"\r\r\tself displayOn: aDisplayMedium\r\t\ttransformation: displayTransformation\r\t\tclippingBox: clipRectangle\r\t\talign: alignmentPoint\r\t\twith: relativePoint\r\t\trule: Form over\r\t\tfillColor: nil! !\r\r!DisplayObject methodsFor: 'displaying-generic'!\rdisplayOn: aDisplayMedium transformation: displayTransformation clippingBox: clipRectangle align: alignmentPoint with: relativePoint rule: ruleInteger fillColor: aForm \r\t\"Display the receiver where a DisplayTransformation is provided as an \r\targument, rule is ruleInteger and mask is aForm. Translate by \r\trelativePoint-alignmentPoint. Information to be displayed must be \r\tconfined to the area that intersects with clipRectangle.\"\r\r\t| absolutePoint |\r\tabsolutePoint _ displayTransformation applyTo: relativePoint.\r\tself displayOn: aDisplayMedium\r\t\tat: (absolutePoint - alignmentPoint) \r\t\tclippingBox: clipRectangle \r\t\trule: ruleInteger \r\t\tfillColor: aForm ! !\r\r!DisplayObject methodsFor: 'displaying-generic'!\rdisplayOn: aDisplayMedium transformation: displayTransformation clippingBox: clipRectangle fixedPoint: aPoint \r\t\"Display the receiver where a DisplayTransformation is provided as an \r\targument, rule is over and mask is Form black. No translation. \r\tInformation to be displayed must be confined to the area that intersects \r\twith clipRectangle.\"\r\r\tself displayOn: aDisplayMedium\r\t\ttransformation: displayTransformation\r\t\tclippingBox: clipRectangle\r\t\talign: aPoint\r\t\twith: aPoint\r\t\trule: Form over\r\t\tfillColor: nil! !\r\r!DisplayObject methodsFor: 'displaying-generic'!\rdisplayOn: aDisplayMedium transformation: displayTransformation clippingBox: clipRectangle rule: ruleInteger fillColor: aForm \r\t\"Display the receiver where a DisplayTransformation is provided as an \r\targument, rule is ruleInteger and mask is aForm. No translation. \r\tInformation to be displayed must be confined to the area that intersects \r\twith clipRectangle.\"\r\r\tself displayOn: aDisplayMedium\r\t\ttransformation: displayTransformation\r\t\tclippingBox: clipRectangle\r\t\talign: self relativeRectangle origin\r\t\twith: self relativeRectangle origin\r\t\trule: ruleInteger\r\t\tfillColor: aForm! !\r\r!DisplayObject methodsFor: 'displaying-generic'!\rdisplayOnPort: aPort \r\tself displayOnPort: aPort at: 0@0! !\r\r!DisplayObject methodsFor: 'displaying-generic' stamp: 'jm 10/21/97 16:56'!\rdisplayOnPort: port at: location rule: rule\r\r\tport copyForm: self to: location rule: rule.\r! !\r\r!DisplayObject methodsFor: 'displaying-generic'!\rfollowCursor\r\t\"Just show the Form following the mouse. 6/21/96 tk\"\r\tCursor blank showWhile:\r\t\t[self follow: [Sensor cursorPoint] while: [Sensor noButtonPressed]]\r! !\r\r\r!DisplayObject methodsFor: 'displaying-Display'!\rdisplay \r\t\"Display the receiver on the Display at location 0,0.\"\r\r\tself displayOn: Display! !\r\r!DisplayObject methodsFor: 'displaying-Display'!\rfollow: locationBlock while: durationBlock\r   \"Move an image around on the Display. Restore the background\r   continuously without causing flashing. The argument, locationBlock,\r   supplies each new location, and the argument, durationBlock, supplies\r   true to continue, and then false to stop.\r   8/20/96 sw: call follow:while:bitsBehind: to do the real work.  Note that th\rmethod\r   now returns the final bits behind as method value.\"\r \r   | bitsBehind loc |\r   bitsBehind _ Form fromDisplay: ((loc _ locationBlock value) extent: self extent).\r   ^ self follow: locationBlock while: durationBlock bitsBehind: bitsBehind startingLoc: loc! !\r\r!DisplayObject methodsFor: 'displaying-Display' stamp: 'ar 5/28/2000 12:06'!\rfollow: locationBlock while: durationBlock bitsBehind: initialBitsBehind startingLoc: loc\r   \"Move an image around on the Display. Restore the background continuously without causing flashing. The argument, locationBlock, supplies each new location, and the argument, durationBlock, supplies true to continue or false to stop. This variant takes the bitsBehind as an input argument, and returns the final saved saved bits as method value.\"\r\r   | location rect1 save1 save1Blt buffer bufferBlt newLoc rect2 bothRects |\r   location _ loc.\r   rect1 _ location extent: self extent.\r   save1 _ initialBitsBehind.\r   save1Blt _ BitBlt current toForm: save1.\r   buffer _ Form extent: self extent*2 depth: Display depth.  \"Holds overlapping region\"\r   bufferBlt _ BitBlt current toForm: buffer.\r   Display deferUpdates: true.\r   self displayOn: Display at: location rule: Form paint.\r   Display deferUpdates: false; forceToScreen: (location extent: self extent).\r   [durationBlock value] whileTrue: [\r\t\tnewLoc _ locationBlock value.\r\t\tnewLoc ~= location ifTrue: [\r\t\t\trect2 _ newLoc extent: self extent.\r\t\t\tbothRects _ rect1 merge: rect2.\r\t\t\t(rect1 intersects: rect2)\r\t\t\t\tifTrue: [  \"when overlap, buffer background for both rectangles\"\r\t\t\t\t\tbufferBlt copyFrom: bothRects in: Display to: 0@0.\r\t\t\t\t\tbufferBlt copyFrom: save1 boundingBox in: save1 to: rect1 origin - bothRects origin.\r\t\t\t\t\t\"now buffer is clean background; get new bits for save1\"\r\t\t\t\t\tsave1Blt copy: (0@0 extent: self extent) from: rect2 origin - bothRects origin in: buffer.\r\t\t\t\t\tself displayOnPort: bufferBlt at: rect2 origin - bothRects origin rule: Form paint.\r\t\t\t\t\tDisplay deferUpdates: true.\r\t\t\t\t\tDisplay copy: bothRects from: 0@0 in: buffer rule: Form over.\r\t\t\t\t\tDisplay deferUpdates: false; forceToScreen: bothRects]\r\t\t\t\tifFalse: [  \"when no overlap, do the simple thing (both rects might be too big)\"\r\t\t\t\t\tDisplay deferUpdates: true.\r\t\t\t\t\tDisplay copy: (location extent: save1 extent) from: 0@0 in: save1 rule: Form over.\r\t\t\t\t\tsave1Blt copyFrom: rect2 in: Display to: 0@0.\r\t\t\t\t\tself displayOn: Display at: newLoc rule: Form paint.\r\t\t\t\t\tDisplay deferUpdates: false; \r\t\t\t\t\t\tforceToScreen: (location extent: save1 extent); \r\t\t\t\t\t\tforceToScreen: (newLoc extent: self extent)].\r\t\t\tlocation _ newLoc.\r\t\t\trect1 _ rect2]].\r\r\t^ save1 displayOn: Display at: location\r! !\r\r!DisplayObject methodsFor: 'displaying-Display' stamp: 'di 9/12/97 11:09'!\risTransparent\r\t^ false! !\r\r!DisplayObject methodsFor: 'displaying-Display'!\rslideFrom: startPoint to: stopPoint nSteps: nSteps \r\t\"does not display at the first point, but does at the last\"\r\t| i p delta |\r\ti_0.  p_ startPoint.\r\tdelta _ (stopPoint-startPoint) // nSteps.\r\t^ self follow: [p_ p+delta]\r\t\twhile: [(i_i+1) < nSteps]! !\r\r!DisplayObject methodsFor: 'displaying-Display' stamp: 'jm 10/22/97 07:43'!\rslideFrom: startPoint to: stopPoint nSteps: nSteps delay: milliSecs\r\t\"Slide this object across the display over the given number of steps, pausing for the given number of milliseconds after each step.\"\r\t\"Note: Does not display at the first point, but does at the last.\"\r\r\t| i p delta |\r\ti _ 0.\r\tp _ startPoint.\r\tdelta _ (stopPoint - startPoint) / nSteps asFloat.\r\t^ self\r\t\tfollow: [(p _ p + delta) truncated]\r\t\twhile: [\r\t\t\t(Delay forMilliseconds: milliSecs) wait.\r\t\t\t(i _ i + 1) < nSteps]\r! !\r\r!DisplayObject methodsFor: 'displaying-Display' stamp: 'di 10/19/97 12:05'!\rslideFrom: startPoint to: stopPoint nSteps: nSteps delay: milliSecs andStay: stayAtEnd\r\t\"Does not display at the first point, but does at the last.\r\tMoreover, if stayAtEnd is true, it leaves the dragged image at the stopPoint\"\r\t| i done |\r\ti _ 0.\r\t^ self follow: [startPoint + ((stopPoint-startPoint) * i // nSteps)]\r\t\twhile: [milliSecs ifNotNil: [(Delay forMilliseconds: milliSecs) wait].\r\t\t\t\t((done _ (i _ i+1) > nSteps) and: [stayAtEnd])\r\t\t\t\t\tifTrue: [^ self \"Return without clearing the image\"].\r\t\t\t\tdone not]! !\r\r!DisplayObject methodsFor: 'displaying-Display' stamp: 'sr 6/6/2000 05:37'!\rslideWithFirstFrom: startPoint to: stopPoint nSteps: nSteps delay: milliSecs \r\t\"Slide this object across the display over the given number of steps, \r\tpausing for the given number of milliseconds after each step.\"\r\t\"Note: Does display at the first point and at the last.\"\r\t| i p delta |\r\ti _ 0.\r\tdelta _ stopPoint - startPoint / nSteps asFloat.\r\tp _ startPoint - delta.\r\t^ self follow: [(p _ p + delta) truncated]\r\t\twhile: \r\t\t\t[(Delay forMilliseconds: milliSecs) wait.\r\t\t\t(i _ i + 1) <= nSteps]! !\r\r\r!DisplayObject methodsFor: 'fileIn/Out'!\rwriteOnFileNamed: fileName \r\t\"Saves the receiver on the file fileName in the format:\r\t\tfileCode, depth, extent, offset, bits.\"\r\t| file |\r\tfile _ FileStream newFileNamed: fileName.\r\tfile binary.\r\tfile nextPut: 2.  \"file code = 2\"\r\tself writeOn: file.\r\tfile close\r\"\r | f |\r[(f _ Form fromUser) boundingBox area>25] whileTrue:\r\t[f writeOnFileNamed: 'test.form'.\r\t(Form newFromFileNamed: 'test.form') display].\r\"! !\r\r!DisplayObject methodsFor: 'fileIn/Out' stamp: 'tk 2/19/1999 07:20'!\rwriteUncompressedOnFileNamed: fileName \r\t\"Saves the receiver on the file fileName in the format:\r\t\tfileCode, depth, extent, offset, bits.\"\r\t| file |\r\tfile _ FileStream newFileNamed: fileName.\r\tfile binary.\r\tfile nextPut: 2.  \"file code = 2\"\r\tself writeUncompressedOn: file.\r\tfile close\r\"\r | f |\r[(f _ Form fromUser) boundingBox area>25] whileTrue:\r\t[f writeUncompressedOnFileNamed: 'test.form'.\r\t(Form fromBinaryStream: (FileStream oldFileNamed: 'test.form')) display].\r\"! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rDisplayObject class\r\tinstanceVariableNames: ''!\r\r!DisplayObject class methodsFor: 'fileIn/Out' stamp: 'mdr 8/31/2000 19:11'!\rcollectionFromFileNamed: fileName \r\t\"Answer a collection of Forms read from the external file \r\tnamed fileName. The file format is: fileCode, {depth, extent, offset, bits}.\"\r\r\t| formList f fileCode |\r\tformList _ OrderedCollection new.\r\tf _ (FileStream readOnlyFileNamed: fileName) binary.\r\tfileCode _ f next.\r\tfileCode = 1\r\t\tifTrue: [\r\t\t\t[f atEnd] whileFalse: [formList add: (self new readFromOldFormat: f)]]\r\t\tifFalse: [\r\t\t\tfileCode = 2 ifFalse: [self error: 'unknown Form file format'. ^ formList].\r\t\t\t[f atEnd] whileFalse: [formList add: (self new readFrom: f)]].\r\tf close.\r\t^ formList\r! !\r\r!DisplayObject class methodsFor: 'fileIn/Out'!\rwriteCollection: coll onFileNamed: fileName \r\t\"Saves a collection of Forms on the file fileName in the format:\r\t\tfileCode, {depth, extent, offset, bits}.\"\r\t| file |\r\tfile _ FileStream newFileNamed: fileName.\r\tfile binary.\r\tfile nextPut: 2.  \"file code = 2\"\r\tcoll do: [:f | f writeOn: file].\r\tfile close\r\"\r | f c | c _ OrderedCollection new.\r[(f _ Form fromUser) boundingBox area>25] whileTrue: [c add: f].\rForm writeCollection: c onFileNamed: 'test.forms'.\rc _ Form collectionFromFileNamed: 'test.forms'.\r1 to: c size do: [:i | (c at: i) displayAt: 0@(i*100)].\r\"! !\rCharacterScanner subclass: #DisplayScanner\r\tinstanceVariableNames: 'bitBlt lineY runX foregroundColor backgroundColor fillBlt lineHeight paragraph paragraphColor morphicOffset ignoreColorChanges'\r\tclassVariableNames: ''\r\tpoolDictionaries: 'TextConstants'\r\tcategory: 'Graphics-Text'!\r!DisplayScanner commentStamp: '<historical>' prior: 0!\rMy instances are used to scan text and display it on the screen or in a hidden form.!\r\r\r!DisplayScanner methodsFor: 'scanning' stamp: 'ar 12/17/2001 13:28'!\rplaceEmbeddedObject: anchoredMorph\r\tanchoredMorph relativeTextAnchorPosition ifNotNil:[\r\t\tanchoredMorph position: \r\t\t\tanchoredMorph relativeTextAnchorPosition +\r\t\t\t(anchoredMorph owner textBounds origin x @ 0)\r\t\t\t- (0@morphicOffset y) + (0@lineY).\r\t\t^true\r\t].\r\t(super placeEmbeddedObject: anchoredMorph) ifFalse: [^ false].\r\tanchoredMorph isMorph ifTrue: [\r\t\tanchoredMorph position: ((destX - anchoredMorph width)@lineY) - morphicOffset\r\t] ifFalse: [\r\t\tdestY _ lineY.\r\t\trunX _ destX.\r\t\tanchoredMorph \r\t\t\tdisplayOn: bitBlt destForm \r\t\t\tat: destX - anchoredMorph width @ destY\r\t\t\tclippingBox: bitBlt clipRect\r\t].\r\t^ true! !\r\r\r!DisplayScanner methodsFor: 'private' stamp: 'ar 5/17/2000 19:26'!\rsetDestForm: df\r\tbitBlt setDestForm: df.! !\r\r!DisplayScanner methodsFor: 'private' stamp: 'di 9/3/2000 16:13'!\rsetFont \r\tforegroundColor _ paragraphColor.\r\tsuper setFont.  \"Sets font and emphasis bits, and maybe foregroundColor\"\r\tfont installOn: bitBlt foregroundColor: foregroundColor backgroundColor: Color transparent.\r\ttext ifNotNil:[destY _ lineY + line baseline - font ascent]! !\r\r!DisplayScanner methodsFor: 'private' stamp: 'ar 1/8/2000 14:51'!\rtextColor: textColor\r\tignoreColorChanges ifTrue: [^ self].\r\tforegroundColor _ textColor! !\r\r\r!DisplayScanner methodsFor: 'stop conditions' stamp: 'ar 1/8/2000 14:42'!\rcr\r\t\"When a carriage return is encountered, simply increment the pointer \r\tinto the paragraph.\"\r\r\tlastIndex_ lastIndex + 1.\r\t^false! !\r\r!DisplayScanner methodsFor: 'stop conditions' stamp: 'di 9/3/2000 16:24'!\rcrossedX\r\t\"This condition will sometimes be reached 'legally' during display, when, \r\tfor instance the space that caused the line to wrap actually extends over \r\tthe right boundary. This character is allowed to display, even though it \r\tis technically outside or straddling the clipping ectangle since it is in \r\tthe normal case not visible and is in any case appropriately clipped by \r\tthe scanner.\"\r\r\t^ true ! !\r\r!DisplayScanner methodsFor: 'stop conditions' stamp: 'di 9/3/2000 16:24'!\rendOfRun\r\t\"The end of a run in the display case either means that there is actually \r\ta change in the style (run code) to be associated with the string or the \r\tend of this line has been reached.\"\r\t| runLength |\r\tlastIndex = line last ifTrue: [^true].\r\trunX _ destX.\r\trunLength _ text runLengthFor: (lastIndex _ lastIndex + 1).\r\trunStopIndex _ lastIndex + (runLength - 1) min: line last.\r\tself setStopConditions.\r\t^ false! !\r\r!DisplayScanner methodsFor: 'stop conditions' stamp: 'di 9/3/2000 16:20'!\rpaddedSpace\r\t\"Each space is a stop condition when the alignment is right justified. \r\tPadding must be added to the base width of the space according to \r\twhich space in the line this space is and according to the amount of \r\tspace that remained at the end of the line when it was composed.\"\r\r\tspaceCount _ spaceCount + 1.\r\tdestX _ destX + spaceWidth + (line justifiedPadFor: spaceCount).\r\tlastIndex _ lastIndex + 1.\r\t^ false! !\r\r!DisplayScanner methodsFor: 'stop conditions' stamp: 'hmm 7/16/2000 08:23'!\rplainTab\r\t| oldX |\r\toldX _ destX.\r\tsuper plainTab.\r\tfillBlt == nil ifFalse:\r\t\t[fillBlt destX: oldX destY: destY width: destX - oldX height: font height; copyBits]! !\r\r!DisplayScanner methodsFor: 'stop conditions' stamp: 'ar 12/15/2001 23:28'!\rsetStopConditions\r\t\"Set the font and the stop conditions for the current run.\"\r\t\r\tself setFont.\r\talignment = Justified ifTrue:[\r\t\t\"Make a local copy of stop conditions so we don't modify the default\"\r\t\tstopConditions == DefaultStopConditions \r\t\t\tifTrue:[stopConditions _ stopConditions copy].\r\t\tstopConditions at: Space asciiValue + 1 put: #paddedSpace]! !\r\r!DisplayScanner methodsFor: 'stop conditions' stamp: 'hmm 7/16/2000 08:23'!\rtab\r\tself plainTab.\r\tlastIndex _ lastIndex + 1.\r\t^ false! !\r\r\r!DisplayScanner methodsFor: 'MVC-compatibility' stamp: 'BG 12/15/2003 13:02'!\rdisplayLines: linesInterval in: aParagraph clippedBy: visibleRectangle\r\t\"The central display routine. The call on the primitive \r\t(scanCharactersFrom:to:in:rightX:) will be interrupted according to an \r\tarray of stop conditions passed to the scanner at which time the code to \r\thandle the stop condition is run and the call on the primitive continued \r\tuntil a stop condition returns true (which means the line has \r\tterminated).\"\r\t| runLength done stopCondition leftInRun startIndex string lastPos |\r\t\"leftInRun is the # of characters left to scan in the current run;\r\t\twhen 0, it is time to call 'self setStopConditions'\"\r\tmorphicOffset _ 0@0.\r\tleftInRun _ 0.\r\tself initializeFromParagraph: aParagraph clippedBy: visibleRectangle.\r\tignoreColorChanges _ false.\r\tparagraph _ aParagraph.\r\tforegroundColor _ paragraphColor _ aParagraph foregroundColor.\r\tbackgroundColor _ aParagraph backgroundColor.\r\taParagraph backgroundColor isTransparent\r\t\tifTrue: [fillBlt _ nil]\r\t\tifFalse: [fillBlt _ bitBlt copy.  \"Blt to fill spaces, tabs, margins\"\r\t\t\t\tfillBlt sourceForm: nil; sourceOrigin: 0@0.\r\t\t\t\tfillBlt fillColor: aParagraph backgroundColor].\r\trightMargin _ aParagraph rightMarginForDisplay.\r\tlineY _ aParagraph topAtLineIndex: linesInterval first.\r\tbitBlt destForm deferUpdatesIn: visibleRectangle while: [\r\t\tlinesInterval do: \r\t\t\t[:lineIndex | \r\t\t\tleftMargin _ aParagraph leftMarginForDisplayForLine: lineIndex alignment: (alignment ifNil:[textStyle alignment]).\r\t\t\tdestX _ (runX _ leftMargin).\r\t\t\tline _ aParagraph lines at: lineIndex.\r\t\t\tlineHeight _ line lineHeight.\r\t\t\tfillBlt == nil ifFalse:\r\t\t\t\t[fillBlt destX: visibleRectangle left destY: lineY\r\t\t\t\t\twidth: visibleRectangle width height: lineHeight; copyBits].\r\t\t\tlastIndex _ line first.\r\t\t\tleftInRun <= 0\r\t\t\t\tifTrue: [self setStopConditions.  \"also sets the font\"\r\t\t\t\t\t\tleftInRun _ text runLengthFor: line first].\r\t\t\tdestY _ lineY + line baseline - font ascent.  \"Should have happened in setFont\"\r\t\t\trunLength _ leftInRun.\r\t\t\trunStopIndex _ lastIndex + (runLength - 1) min: line last.\r\t\t\tleftInRun _ leftInRun - (runStopIndex - lastIndex + 1).\r\t\t\tspaceCount _ 0.\r\t\t\tdone _ false.\r\t\t\tstring _ text string.\r\t\t\tself handleIndentation.\r\t\t\t[done] whileFalse:[\r\t\t\t\tstartIndex _ lastIndex.\r\t\t\t\tlastPos _ destX@destY.\r\t\t\t\tstopCondition _ self scanCharactersFrom: lastIndex to: runStopIndex\r\t\t\t\t\t\t\tin: string rightX: rightMargin stopConditions: stopConditions\r\t\t\t\t\t\t\tkern: kern.\r\t\t\t\tlastIndex >= startIndex ifTrue:[\r\t\t\t\t\tfont displayString: string on: bitBlt \r\t\t\t\t\t\tfrom: startIndex to: lastIndex at: lastPos kern: kern].\r\t\t\t\t\"see setStopConditions for stopping conditions for displaying.\"\r\t\t\t\tdone _ self perform: stopCondition].\r\t\t\tfillBlt == nil ifFalse:\r\t\t\t\t[kern ~= 0\r                           ifTrue: [destX := destX - kern].\r\t\t\t\tfillBlt destX: destX destY: lineY width: visibleRectangle right-destX height: lineHeight; copyBits].\r\t\t\tlineY _ lineY + lineHeight]]! !\r\r!DisplayScanner methodsFor: 'MVC-compatibility' stamp: 'BEO 8/7/2002 16:13'!\rinitializeFromParagraph: aParagraph clippedBy: clippingRectangle\r\r\tsuper initializeFromParagraph: aParagraph clippedBy: clippingRectangle.\r\tbitBlt _ BitBlt current toForm: aParagraph destinationForm.\r\tbitBlt sourceX: 0; width: 0.\t\"Init BitBlt so that the first call to a primitive will not fail\"\r\tbitBlt combinationRule:\r\t\t((Display depth = 1)\r\t\t\tifTrue:\r\t\t\t\t[aParagraph rule]\r\t\t\tifFalse:\r\t\t\t\t[Form paint]).\r\tbitBlt colorMap:\r\t\t(Bitmap with: 0      \"Assumes 1-bit deep fonts\"\r\t\t\t\twith: (bitBlt destForm pixelValueFor: aParagraph foregroundColor)).\r\tbitBlt clipRect: clippingRectangle! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rDisplayScanner class\r\tinstanceVariableNames: ''!\r\r!DisplayScanner class methodsFor: 'queries' stamp: 'ar 5/17/2000 17:39'!\rdefaultFont\r\t^ TextStyle defaultFont! !\rForm subclass: #DisplayScreen\r\tinstanceVariableNames: 'clippingBox extraRegions'\r\tclassVariableNames: 'DeferringUpdates DisplayChangeSignature ScreenSave'\r\tpoolDictionaries: ''\r\tcategory: 'Graphics-Display Objects'!\r!DisplayScreen commentStamp: '<historical>' prior: 0!\rThere is only one instance of me, Display. It is a global and is used to handle general user requests to deal with the whole display screen. \r\tAlthough I offer no protocol, my name provides a way to distinguish this special instance from all other Forms. This is useful, for example, in dealing with saving and restoring the system.\r\tTo change the depth of your Display...\r\t\tDisplay newDepth: 16.\r\t\tDisplay newDepth: 8.\r\t\tDisplay newDepth: 1.\rValid display depths are 1, 2, 4, 8, 16 and 32.  It is suggested that you run with your monitors setting the same, for better speed and color fidelity.  Note that this can add up to 4Mb for the Display form.  Finally, note that newDepth: ends by executing a 'ControlManager restore' which currently terminates the active process, so nothing that follows in the doit will get executed.\r\rDepths 1, 2, 4 and 8 bits go through a color map to put color on the screen, but 16 and 32-bit color use the pixel values directly for RGB color (5 and 8 bits per, respectivlely).  The color choice an be observed by executing Color fromUser in whatever depth you are using.\r!\r\r\r!DisplayScreen methodsFor: 'displaying' stamp: 'ar 5/28/2000 12:07'!\rcopyBits: rect from: sf at: destOrigin clippingBox: clipRect rule: cr fillColor: hf \r\t(BitBlt current\r\t\tdestForm: self\r\t\tsourceForm: sf\r\t\tfillColor: hf\r\t\tcombinationRule: cr\r\t\tdestOrigin: destOrigin\r\t\tsourceOrigin: rect origin\r\t\textent: rect extent\r\t\tclipRect: (clipRect intersect: clippingBox)) copyBits! !\r\r!DisplayScreen methodsFor: 'displaying' stamp: 'ar 5/28/2000 12:07'!\rcopyBits: rect from: sf at: destOrigin clippingBox: clipRect rule: cr fillColor: hf map: map\r\t((BitBlt current\r\t\tdestForm: self\r\t\tsourceForm: sf\r\t\tfillColor: hf\r\t\tcombinationRule: cr\r\t\tdestOrigin: destOrigin\r\t\tsourceOrigin: rect origin\r\t\textent: rect extent\r\t\tclipRect: (clipRect intersect: clippingBox)) colorMap: map) copyBits! !\r\r!DisplayScreen methodsFor: 'displaying' stamp: 'jm 5/22/1998 01:23'!\rflash: aRectangle \r\t\"Flash the area of the screen defined by the given rectangle.\"\r\r\tself reverse: aRectangle.\r\tself forceDisplayUpdate.\r\t(Delay forMilliseconds: 100) wait.\r\tself reverse: aRectangle.\r\tself forceDisplayUpdate.\r! !\r\r\r!DisplayScreen methodsFor: 'other'!\rboundingBox\r\tclippingBox == nil\r\t\tifTrue: [clippingBox _ super boundingBox].\r\t^ clippingBox! !\r\r!DisplayScreen methodsFor: 'other'!\rclippingTo: aRect do: aBlock\r\t\"Display clippingTo: Rectangle fromUser do:\r\t[ScheduledControllers restore: Display fullBoundingBox]\"\r\t| saveClip |\r\tsaveClip _ clippingBox.\r\tclippingBox _ aRect.\r\taBlock value.\r\tclippingBox _ saveClip! !\r\r!DisplayScreen methodsFor: 'other' stamp: 'hmm 6/18/2000 19:16'!\rdeferUpdates: aBoolean\r\t| wasDeferred |\r\t\"Set the deferUpdates flag in the virtual machine. When this flag is true, BitBlt operations on the Display are not automatically propagated to the screen. If this underlying platform does not support deferred updates, this primitive will fail. Answer whether updates were deferred before if the primitive succeeds, nil if it fails.\"\r\r\twasDeferred _ DeferringUpdates == true.\r\tDeferringUpdates _ aBoolean.\r\t^(self primitiveDeferUpdates: aBoolean) ifNotNil: [wasDeferred]! !\r\r!DisplayScreen methodsFor: 'other' stamp: 'hmm 2/2/2001 10:14'!\rdeferUpdatesIn: aRectangle while: aBlock\r\t| result |\r\t(self deferUpdates: true) ifTrue: [^aBlock value].\r\tresult _ aBlock value.\r\tself deferUpdates: false.\r\tself forceToScreen: aRectangle.\r\t^result! !\r\r!DisplayScreen methodsFor: 'other' stamp: 'jm 5/21/1998 23:48'!\rforceDisplayUpdate\r\t\"On platforms that buffer screen updates, force the screen to be updated immediately. On other platforms, or if the primitive is not implemented, do nothing.\"\r\r\t<primitive: 231>\r\t\"do nothing if primitive fails\"! !\r\r!DisplayScreen methodsFor: 'other' stamp: 'jm 5/19/1998 17:50'!\rforceToScreen: aRectangle\r\t\"Force the given rectangular section of the Display to be copied to the screen. The primitive call does nothing if the primitive is not implemented. Typically used when the deferUpdates flag in the virtual machine is on; see deferUpdates:.\"\r\r\tself primShowRectLeft: aRectangle left\r\t\tright: aRectangle right\r\t\ttop: aRectangle top\r\t\tbottom: aRectangle bottom.\r! !\r\r!DisplayScreen methodsFor: 'other'!\rfullBoundingBox\r\t^ super boundingBox! !\r\r!DisplayScreen methodsFor: 'other'!\rfullScreen   \"Display fullScreen\"\r\r\tScreenSave notNil ifTrue: [Display _ ScreenSave].\r\tclippingBox _ super boundingBox! !\r\r!DisplayScreen methodsFor: 'other' stamp: 'sd 6/7/2003 19:46'!\rfullScreenMode: aBoolean\r\t\"On platforms that support it, set full-screen mode to the value of the argument. (Note: you'll need to restore the Display after calling this primitive.\"\r\t\"Display fullScreenMode: true. Display newDepth: Display depth\"\r\r\t<primitive: 233>\r\tself primitiveFailed\r! !\r\r!DisplayScreen methodsFor: 'other'!\rheight\r\t^ self boundingBox height! !\r\r!DisplayScreen methodsFor: 'other' stamp: 'ar 5/5/1999 23:44'!\rnewDepth: pixelSize\r\"\r\tDisplay newDepth: 8.\r\tDisplay newDepth: 1.\r\"\r\t(self supportsDisplayDepth: pixelSize)\r\t\tifFalse:[^self inform:'Display depth ', pixelSize printString, ' is not supported on this system'].\r\tself newDepthNoRestore: pixelSize.\r\tself restore.! !\r\r!DisplayScreen methodsFor: 'other' stamp: 'hmm 6/18/2000 19:14'!\rprimitiveDeferUpdates: aBoolean\r\t\"Set the deferUpdates flag in the virtual machine. When this flag is true, BitBlt operations on the Display are not automatically propagated to the screen. If this underlying platform does not support deferred updates, this primitive will fail. Answer the receiver if the primitive succeeds, nil if it fails.\"\r\r\t<primitive: 126>\r\t^ nil  \"answer nil if primitive fails\"\r! !\r\r!DisplayScreen methodsFor: 'other'!\rreplacedBy: aForm do: aBlock\r\t\"Permits normal display to draw on aForm instead of the display.\"\r\r\tScreenSave _ self.\r\tDisplay _ aForm.\r\taBlock value.\r\tDisplay _ self.\r\tScreenSave _ nil.! !\r\r!DisplayScreen methodsFor: 'other' stamp: 'BG 10/28/2003 20:53'!\rrestore\r\tSmalltalk isMorphic\r\t\tifTrue: []\r\t\tifFalse: [ScheduledControllers unCacheWindows; restore].! !\r\r!DisplayScreen methodsFor: 'other' stamp: 'BG 10/28/2003 20:53'!\rrestoreAfter: aBlock\r\t\"Evaluate the block, wait for a mouse click, and then restore the screen.\"\r\r\taBlock value.\r\tSensor waitButton.\r\tSmalltalk isMorphic\r\t\tifTrue: []\r\t\tifFalse: [(ScheduledControllers restore; activeController) view emphasize]! !\r\r!DisplayScreen methodsFor: 'other' stamp: 'ar 5/17/2001 21:02'!\rsupportedDisplayDepths\r\t\"Return all pixel depths supported on the current host platform.\"\r\t^#(1 2 4 8 16 32 -1 -2 -4 -8 -16 -32) select: [:d | self supportsDisplayDepth: d]! !\r\r!DisplayScreen methodsFor: 'other' stamp: 'ar 5/5/1999 23:45'!\rsupportsDisplayDepth: pixelDepth\r\t\"Return true if this pixel depth is supported on the current host platform.\r\tPrimitive. Optional.\"\r\t<primitive: 91>\r\t^#(1 2 4 8 16 32) includes: pixelDepth! !\r\r!DisplayScreen methodsFor: 'other'!\rusableArea\r\t\"Answer the usable area of the receiver.  5/22/96 sw.\"\r\r\t^ self boundingBox deepCopy! !\r\r!DisplayScreen methodsFor: 'other'!\rwidth\r\t^ self boundingBox width! !\r\r\r!DisplayScreen methodsFor: 'private'!\rbeDisplay\r\t\"Primitive. Tell the interpreter to use the receiver as the current display \r\timage. Fail if the form is too wide to fit on the physical display. \r\tEssential. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 102>\r\tself primitiveFailed! !\r\r!DisplayScreen methodsFor: 'private' stamp: 'di 3/3/1999 10:00'!\rcopyFrom: aForm\r\t\"Take on all state of aForm, with complete sharing\"\r\r\tsuper copyFrom: aForm.\r\tclippingBox _ super boundingBox! !\r\r!DisplayScreen methodsFor: 'private' stamp: 'ar 5/25/2000 23:43'!\rfindAnyDisplayDepth\r\t\"Return any display depth that is supported on this system.\"\r\t^self findAnyDisplayDepthIfNone:[\r\t\t\"Ugh .... now this is a biggie - a system that does not support\r\t\tany of the Squeak display depths at all.\"\r\t\tSmalltalk\r\t\t\tlogError:'Fatal error: This system has no support for any display depth at all.'\r\t\t\tinContext: thisContext\r\t\t\tto: 'SqueakDebug.log'.\r\t\tSmalltalk quitPrimitive. \"There is no way to continue from here\"\r\t].! !\r\r!DisplayScreen methodsFor: 'private' stamp: 'ar 5/17/2001 21:03'!\rfindAnyDisplayDepthIfNone: aBlock\r\t\"Return any display depth that is supported on this system.\r\tIf there is none, evaluate aBlock.\"\r\t#(1 2 4 8 16 32 -1 -2 -4 -8 -16 -32) do:[:bpp|\r\t\t(self supportsDisplayDepth: bpp) ifTrue:[^bpp].\r\t].\r\t^aBlock value! !\r\r!DisplayScreen methodsFor: 'private' stamp: 'ar 5/17/2001 15:44'!\rnewDepthNoRestore: pixelSize\r\t\"Change depths.  Check if there is enough space!!  , di\"\r\t| area need |\r\tpixelSize = depth ifTrue: [^ self  \"no change\"].\r\tpixelSize abs < self depth ifFalse:\r\t\t[\"Make sure there is enough space\"\r\t\tarea _ Display boundingBox area. \"pixels\"\r\t\tSmalltalk isMorphic ifFalse:\r\t\t\t[ScheduledControllers scheduledWindowControllers do:\r\t\t\t\t[:aController | \"This should be refined...\"\r\t\t\t\taController view cacheBitsAsTwoTone ifFalse:\r\t\t\t\t\t[area _ area + aController view windowBox area]]].\r\t\tneed _ (area * (pixelSize abs - self depth) // 8)  \"new bytes needed\"\r\t\t\t\t+ Smalltalk lowSpaceThreshold.\r\t\t(Smalltalk garbageCollectMost <= need\r\t\t\tand: [Smalltalk garbageCollect <= need])\r\t\t\tifTrue: [self error: 'Insufficient free space']].\r\tself setExtent: self extent depth: pixelSize.\r\tSmalltalk isMorphic ifFalse: [ScheduledControllers updateGray].\r\tDisplayScreen startUp! !\r\r!DisplayScreen methodsFor: 'private' stamp: 'jm 6/3/1998 13:00'!\rprimRetryShowRectLeft: l right: r top: t bottom: b\r\t\"Copy the given rectangular section of the Display to to the screen. This primitive is not implemented on all platforms. Do nothing if it fails. \"\r\r\t<primitive: 127>\r\t\"do nothing if primitive fails\"\r! !\r\r!DisplayScreen methodsFor: 'private' stamp: 'jm 6/3/1998 13:02'!\rprimShowRectLeft: l right: r top: t bottom: b\r\t\"Copy the given rectangular section of the Display to to the screen. This primitive is not implemented on all platforms. If this fails, retry integer coordinates.\"\r\r\t<primitive: 127>\r\t\"if this fails, coerce coordinates to integers and try again\"\r\tself primRetryShowRectLeft: l truncated\r\t\tright: r rounded\r\t\ttop: t truncated\r\t\tbottom: b rounded.\r! !\r\r!DisplayScreen methodsFor: 'private' stamp: 'RAA 11/27/1999 15:48'!\rsetExtent: aPoint depth: bitsPerPixel  \"DisplayScreen startUp\"\r\t\"This method is critical.  If the setExtent fails, there will be no\r\tproper display on which to show the error condition...\"\r\t\"ar 5/1/1999: ... and that is exactly why we check for the available display depths first.\"\r\r\t\"RAA 27 Nov 99 - if depth and extent are the same and acceptable, why go through this.\r\talso - record when we change so worlds can tell if it is time to repaint\"\r\r\t(depth == bitsPerPixel and: [aPoint = self extent and: \r\t\t\t\t\t[self supportsDisplayDepth: bitsPerPixel]]) ifFalse: [\r\t\tbits _ nil.  \"Free up old bitmap in case space is low\"\r\t\tDisplayChangeSignature _ (DisplayChangeSignature ifNil: [0]) + 1.\r\t\t(self supportsDisplayDepth: bitsPerPixel)\r\t\t\tifTrue:[super setExtent: aPoint depth: bitsPerPixel]\r\t\t\tifFalse:[\"Search for a suitable depth\"\r\t\t\t\t\tsuper setExtent: aPoint depth: self findAnyDisplayDepth].\r\t].\r\tclippingBox _ super boundingBox! !\r\r\r!DisplayScreen methodsFor: 'initialize-release' stamp: 'ar 5/26/2000 00:07'!\rrelease\r\t\"I am no longer Display. Release any resources if necessary\"! !\r\r!DisplayScreen methodsFor: 'initialize-release' stamp: 'ar 5/28/2000 11:25'!\rshutDown \r\t\"Minimize Display memory saved in image\"\r\tself setExtent: 240@120 depth: depth! !\r\r\r!DisplayScreen methodsFor: 'testing' stamp: 'ar 5/25/2000 23:34'!\risDisplayScreen\r\t^true! !\r\r\r!DisplayScreen methodsFor: 'blitter defaults' stamp: 'ar 5/28/2000 12:01'!\rdefaultBitBltClass\r\t\"Return the BitBlt version to use when I am active\"\r\t^BitBlt! !\r\r!DisplayScreen methodsFor: 'blitter defaults' stamp: 'BG 10/29/2003 08:33'!\rdefaultCanvasClass\r\t\"Return the WarpBlt version to use when I am active\"\r\t^BitBlt! !\r\r!DisplayScreen methodsFor: 'blitter defaults' stamp: 'ar 5/28/2000 12:01'!\rdefaultWarpBltClass\r\t\"Return the WarpBlt version to use when I am active\"\r\t^WarpBlt! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rDisplayScreen class\r\tinstanceVariableNames: ''!\r\r!DisplayScreen class methodsFor: 'display box access'!\rboundingBox\r\t\"Answer the bounding box for the form representing the current display \r\tscreen.\"\r\r\t^Display boundingBox! !\r\r!DisplayScreen class methodsFor: 'display box access' stamp: 'BG 10/28/2003 20:54'!\rcheckForNewScreenSize\r\t\"Check whether the screen size has changed and if so take appropriate actions\"\r\r\tDisplay extent = DisplayScreen actualScreenSize ifTrue: [^ self].\r\tDisplayScreen startUp.\r\tSmalltalk isMorphic\r\t\tifTrue:\r\t\t\t[]\r\t\tifFalse:\r\t\t\t[ScheduledControllers restore; searchForActiveController]! !\r\r\r!DisplayScreen class methodsFor: 'snapshots'!\ractualScreenSize\r\t<primitive: 106>\r\t^ 640@480! !\r\r!DisplayScreen class methodsFor: 'snapshots' stamp: 'ar 5/28/2000 11:26'!\rshutDown \r\t\"Minimize Display memory saved in image\"\r\tDisplay shutDown.! !\r\r!DisplayScreen class methodsFor: 'snapshots' stamp: 'ar 5/17/2001 15:50'!\rstartUp  \"DisplayScreen startUp\"\r\tDisplay setExtent: self actualScreenSize depth: Display nativeDepth.\r\tDisplay beDisplay! !\rDisplayObject subclass: #DisplayText\r\tinstanceVariableNames: 'text textStyle offset form foreColor backColor'\r\tclassVariableNames: ''\r\tpoolDictionaries: 'TextConstants'\r\tcategory: 'Graphics-Display Objects'!\r!DisplayText commentStamp: '<historical>' prior: 0!\rI represent Text whose emphasis changes are mapped to a set of fonts. My instances have an offset used in determining screen placement for displaying. They get used two different ways in the system. In the user interface, they mainly hold onto some text which is viewed by some form of ParagraphEditor. However, as a DisplayObject, they may need to display efficiently, so my instances have a cache for the bits.!\r\r\r!DisplayText methodsFor: 'accessing'!\ralignedTo: alignPointSelector\r\t\"Return a copy with offset according to alignPointSelector which is one of...\r\t#(topLeft, topCenter, topRight, leftCenter, center, etc)\"\r\t| boundingBox |\r\tboundingBox _ 0@0 corner: self form extent.\r\t^ self shallowCopy offset: (0@0) - (boundingBox perform: alignPointSelector)! !\r\r!DisplayText methodsFor: 'accessing'!\rfontsUsed\r\t\"Return a list of all fonts used currently in this text.  8/19/96 tk\"\r\r\t^ text runs values asSet collect: [:each | textStyle fontAt: each]! !\r\r!DisplayText methodsFor: 'accessing'!\rform \r\t\"Answer the form into which the receiver's display bits are cached.\"\r\r\tform == nil ifTrue: [self composeForm].\r\t^form! !\r\r!DisplayText methodsFor: 'accessing'!\rlineGrid\r\t\"Answer the relative space between lines of the receiver's text.\"\r\r\t^textStyle lineGrid! !\r\r!DisplayText methodsFor: 'accessing'!\rnumberOfLines \r\t\"Answer the number of lines of text in the receiver.\"\r\r\t^self height // text lineGrid! !\r\r!DisplayText methodsFor: 'accessing'!\roffset \r\t\"Refer to the comment in DisplayObject|offset.\"\r\r\t^offset! !\r\r!DisplayText methodsFor: 'accessing'!\roffset: aPoint \r\t\"Refer to the comment in DisplayObject|offset:.\"\r\r\toffset _ aPoint! !\r\r!DisplayText methodsFor: 'accessing'!\rstring\r\t\"Answer the string of the characters displayed by the receiver.\"\r\r\t^text string! !\r\r!DisplayText methodsFor: 'accessing'!\rtext \r\t\"Answer the text displayed by the receiver.\"\r\r\t^text! !\r\r!DisplayText methodsFor: 'accessing'!\rtext: aText \r\t\"Set the receiver to display the argument, aText.\"\r\t\r\ttext _ aText.\r\tform _ nil.\r\tself changed.\r\t! !\r\r!DisplayText methodsFor: 'accessing'!\rtextStyle \r\t\"Answer the style by which the receiver displays its text.\"\r\r\t^textStyle! !\r\r!DisplayText methodsFor: 'accessing'!\rtextStyle: aTextStyle \r\t\"Set the style by which the receiver should display its text.\"\r\r\ttextStyle _ aTextStyle.\r\tform _ nil.\r\tself changed.\r\t! !\r\r\r!DisplayText methodsFor: 'displaying' stamp: 'yo 6/23/2003 20:05'!\rdisplayOn: aDisplayMedium at: aDisplayPoint clippingBox: clipRectangle rule: ruleInteger fillColor: aForm\r\t\"For TT font, rule 34 is used if possible.\"\r\t\"Refer to the comment in \r\tDisplayObject|displayOn:at:clippingBox:rule:mask:.\"\r\r\t| form1 rule |\r\tform1 _ self form.\r\trule _ (ruleInteger = Form over and: [backColor isTransparent])\r\t\t\t\tifTrue: [form1 depth = 32 ifTrue: [rule _ 34] ifFalse: [Form paint]]\r\t\t\t\tifFalse: [ruleInteger].\r\tform1 depth = 32 ifTrue: [rule _ 34].\r\tform1\r\t\tdisplayOn: aDisplayMedium\r\t\tat: aDisplayPoint + offset\r\t\tclippingBox: clipRectangle\r\t\trule: rule\r\t\tfillColor: aForm! !\r\r!DisplayText methodsFor: 'displaying'!\rdisplayOn: aDisplayMedium transformation: displayTransformation clippingBox: clipRectangle align: alignmentPoint with: relativePoint rule: ruleInteger fillColor: aForm \r\t\"Refer to the comment in \r\tDisplayObject|displayOn:transformation:clippingBox:align:with:rule:mask:.\"\r\r\t| absolutePoint |\r\tabsolutePoint _ displayTransformation applyTo: relativePoint.\r\tabsolutePoint _ absolutePoint x asInteger @ absolutePoint y asInteger.\r\tself displayOn: aDisplayMedium\r\t\tat: absolutePoint - alignmentPoint\r\t\tclippingBox: clipRectangle\r\t\trule: ruleInteger\r\t\tfillColor: aForm! !\r\r!DisplayText methodsFor: 'displaying'!\rdisplayOnPort: aPort at: location\r\tself form displayOnPort: aPort at: location + offset! !\r\r\r!DisplayText methodsFor: 'display box access'!\rboundingBox \r\t\"Refer to the comment in DisplayObject|boundingBox.\"\r\r\t^self form boundingBox! !\r\r!DisplayText methodsFor: 'display box access'!\rcomputeBoundingBox \r\t\"Compute minimum enclosing rectangle around characters.\"\r\r\t| character font width carriageReturn lineWidth lineHeight |\r\tcarriageReturn _ Character cr.\r\twidth _ lineWidth _ 0.\r\tfont _ textStyle defaultFont.\r\tlineHeight _ textStyle lineGrid.\r\t1 to: text size do: \r\t\t[:i | \r\t\tcharacter _ text at: i.\r\t\tcharacter = carriageReturn\r\t\t  ifTrue: \r\t\t\t[lineWidth _ lineWidth max: width.\r\t\t\tlineHeight _ lineHeight + textStyle lineGrid.\r\t\t\twidth _ 0]\r\t\t  ifFalse: [width _ width + (font widthOf: character)]].\r\tlineWidth _ lineWidth max: width.\r\t^offset extent: lineWidth @ lineHeight! !\r\r\r!DisplayText methodsFor: 'converting' stamp: 'tk 10/21/97 12:28'!\rasParagraph\r\t\"Answer a Paragraph whose text and style are identical to that of the \r\treceiver.\"\r\t| para |\r\tpara _ Paragraph withText: text style: textStyle.\r\tpara foregroundColor: foreColor backgroundColor: backColor.\r\tbackColor isTransparent ifTrue: [para rule: Form paint].\r\t^ para! !\r\r\r!DisplayText methodsFor: 'private' stamp: 'BG 10/28/2003 20:54'!\rcomposeForm\r\t\r\tSmalltalk isMorphic\r\t\tifTrue:\r\t\t\t[]\r\t\tifFalse: [form _ self asParagraph asForm]! !\r\r!DisplayText methodsFor: 'private'!\rsetText: aText textStyle: aTextStyle offset: aPoint\r\r\ttext _ aText.\r\ttextStyle _ aTextStyle.\r\toffset _ aPoint.\r\tform _ nil! !\r\r\r!DisplayText methodsFor: 'color'!\rbackgroundColor\r\tbackColor == nil ifTrue: [^ Color transparent].\r\t^ backColor! !\r\r!DisplayText methodsFor: 'color'!\rforegroundColor\r\tforeColor == nil ifTrue: [^ Color black].\r\t^ foreColor! !\r\r!DisplayText methodsFor: 'color'!\rforegroundColor: cf backgroundColor: cb\r\tforeColor _ cf.\r\tbackColor _ cb! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rDisplayText class\r\tinstanceVariableNames: ''!\r\r!DisplayText class methodsFor: 'instance creation'!\rtext: aText \r\t\"Answer an instance of me such that the text displayed is aText \r\taccording to the system's default text style.\"\r\r\t^self new\r\t\tsetText: aText\r\t\ttextStyle: DefaultTextStyle copy\r\t\toffset: 0 @ 0! !\r\r!DisplayText class methodsFor: 'instance creation'!\rtext: aText textStyle: aTextStyle \r\t\"Answer an instance of me such that the text displayed is aText \r\taccording to the style specified by aTextStyle.\"\r\r\t^self new\r\t\tsetText: aText\r\t\ttextStyle: aTextStyle\r\t\toffset: 0 @ 0! !\r\r!DisplayText class methodsFor: 'instance creation'!\rtext: aText textStyle: aTextStyle offset: aPoint \r\t\"Answer an instance of me such that the text displayed is aText \r\taccording to the style specified by aTextStyle. The display of the \r\tinformation should be offset by the amount given as the argument, \r\taPoint.\"\r\r\t^self new\r\t\tsetText: aText\r\t\ttextStyle: aTextStyle\r\t\toffset: aPoint! !\r\r\r!DisplayText class methodsFor: 'examples' stamp: 'tk 11/28/2001 16:03'!\rexample\r\t\"Continually prints two lines of text wherever you point with the cursor.  Terminate by pressing any button on the\r\tmouse.\"\r\t| tx |\r\ttx _ 'this is a line of characters and\rthis is the second line.' asDisplayText.\r\ttx foregroundColor: Color black backgroundColor: Color transparent.\r\ttx _ tx alignedTo: #center.\r\t[Sensor anyButtonPressed]\r\t\twhileFalse:\r\t\t\t[tx displayOn: Display at: Sensor cursorPoint]\r\r\t\"DisplayText example.\"! !\rView subclass: #DisplayTextView\r\tinstanceVariableNames: 'rule mask editParagraph centered'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Views'!\r!DisplayTextView commentStamp: '<historical>' prior: 0!\rI represent a view of an instance of DisplayText.!\r\r\r!DisplayTextView methodsFor: 'initialize-release'!\rinitialize \r\t\"Refer to the comment in View|initialize.\"\r\r\tsuper initialize.\r\tcentered _ false! !\r\r\r!DisplayTextView methodsFor: 'accessing'!\rcentered\r\r\tcentered _ true.\r\tself centerText! !\r\r!DisplayTextView methodsFor: 'accessing'!\rfillColor\r\t\"Answer an instance of class Form that is to be used as the mask when \r\tdisplaying the receiver's model (a DisplayText).\"\r\r\t^ mask! !\r\r!DisplayTextView methodsFor: 'accessing'!\rfillColor: aForm \r\t\"Set aForm to be the mask used when displaying the receiver's model.\"\r\r\tmask _ aForm! !\r\r!DisplayTextView methodsFor: 'accessing'!\risCentered\r\r\t^centered! !\r\r!DisplayTextView methodsFor: 'accessing'!\rmask\r\t\"Answer an instance of class Form that is to be used as the mask when \r\tdisplaying the receiver's model (a DisplayText).\"\r\r\t^ mask! !\r\r!DisplayTextView methodsFor: 'accessing'!\rrule\r\t\"Answer a number from 0 to 15 that indicates which of the sixteen \r\tdisplay rules is to be used when copying the receiver's model (a \r\tDisplayText) onto the display screen.\"\r\r\trule == nil\r\t\tifTrue: [^self defaultRule]\r\t\tifFalse: [^rule]! !\r\r!DisplayTextView methodsFor: 'accessing'!\rrule: anInteger \r\t\"Set anInteger to be the rule used when displaying the receiver's model.\"\r\r\trule _ anInteger! !\r\r\r!DisplayTextView methodsFor: 'controller access'!\rdefaultController \r\t\"Refer to the comment in View|defaultController.\"\r\r\t^self defaultControllerClass newParagraph: editParagraph! !\r\r!DisplayTextView methodsFor: 'controller access'!\rdefaultControllerClass \r\t\"Refer to the comment in View|defaultControllerClass.\"\r\r\t^ParagraphEditor! !\r\r\r!DisplayTextView methodsFor: 'window access'!\rdefaultWindow \r\t\"Refer to the comment in View|defaultWindow.\"\r\r\t^self inverseDisplayTransform: (editParagraph boundingBox expandBy: 6 @ 6)! !\r\r!DisplayTextView methodsFor: 'window access'!\rwindow: aWindow \r\t\"Refer to the comment in View|window:.\"\r\r\tsuper window: aWindow.\r\tself centerText! !\r\r\r!DisplayTextView methodsFor: 'model access'!\rmodel: aDisplayText \r\t\"Refer to the comment in View|model:.\"\r\r\tsuper model: aDisplayText.\r\teditParagraph _ model asParagraph.\r\tself centerText! !\r\r\r!DisplayTextView methodsFor: 'displaying'!\rdisplay \r\t\"Refer to the comment in View|display.\"\r\r\tself isUnlocked ifTrue: [self positionText].\r\tsuper display! !\r\r!DisplayTextView methodsFor: 'displaying'!\rdisplayView \r\t\"Refer to the comment in View|displayView.\"\r\r\tself clearInside.\r\t(self controller isKindOf: ParagraphEditor )\r\t\tifTrue: [controller changeParagraph: editParagraph].\r\teditParagraph foregroundColor: self foregroundColor\r\t\t\t\tbackgroundColor: self backgroundColor.\r\tself isCentered\r\t\tifTrue: \r\t\t\t[editParagraph displayOn: Display\r\t\t\t\ttransformation: self displayTransformation\r\t\t\t\tclippingBox: self insetDisplayBox\r\t\t\t\tfixedPoint: editParagraph boundingBox center]\r\t\tifFalse: \r\t\t\t[editParagraph displayOn: Display]! !\r\r!DisplayTextView methodsFor: 'displaying'!\runcacheBits\r\t\"Normally only sent to a StandardSystemView, but for casees where a DisplayTextView is used alone, without a superview, in which we make this a no-op, put in so that the Character Recognizer doesn't fail.  8/9/96 sw\"! !\r\r\r!DisplayTextView methodsFor: 'deEmphasizing'!\rdeEmphasizeView \r\t\"Refer to the comment in View|deEmphasizeView.\"\r\r\t(self controller isKindOf: ParagraphEditor)\r\t \tifTrue: [controller deselect]! !\r\r\r!DisplayTextView methodsFor: 'private'!\rcenterText\r\r\tself isCentered\r\t\tifTrue: \r\t\t\t[editParagraph\r\t\t\t\talign: editParagraph boundingBox center\r\t\t\t\twith: self getWindow center]! !\r\r!DisplayTextView methodsFor: 'private'!\rdefaultRule\r\r\t^Form over! !\r\r!DisplayTextView methodsFor: 'private'!\rpositionText\r\r\t| box |\r\tbox _ (self displayBox insetBy: 6@6) origin extent: editParagraph boundingBox extent.\r\teditParagraph wrappingBox: box clippingBox: box.\r\tself centerText! !\r\r\r!DisplayTextView methodsFor: 'lock access'!\rlock \r\t\"Refer to the comment in View|lock.  Must do what would be done by displaying...\"\r\r\tself isUnlocked ifTrue: [self positionText].\r\tsuper lock! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rDisplayTextView class\r\tinstanceVariableNames: ''!\r\r!DisplayTextView class methodsFor: 'examples'!\rexample2\t\r\t\"Create a standarad system view with two parts, one editable, the other not.\"\r\t| topView aDisplayTextView |\r\ttopView _ StandardSystemView new.\r\ttopView label: 'Text Editor'.\r\taDisplayTextView _ self new model: 'test string label' asDisplayText.\r\taDisplayTextView controller: NoController new.\r\taDisplayTextView window: (0 @ 0 extent: 100 @ 100).\r\taDisplayTextView borderWidthLeft: 2 right: 0 top: 2 bottom: 2.\r\ttopView addSubView: aDisplayTextView.\r\r\taDisplayTextView _ self new model: 'test string' asDisplayText.\r\taDisplayTextView window: (0 @ 0 extent: 100 @ 100).\r\taDisplayTextView borderWidth: 2.\r\ttopView\r\t\taddSubView: aDisplayTextView\r\t\talign: aDisplayTextView viewport topLeft\r\t\twith: topView lastSubView viewport topRight.\r\ttopView controller open\r\r\t\"DisplayTextView example2\"! !\r\r!DisplayTextView class methodsFor: 'examples'!\rexample3\t\r\t\"Create a passive view of some text on the screen.\"\r\t| view |\r\tview_ self new model: 'this is a test of one line\rand the second line' asDisplayText.\r\tview translateBy: 100@100.\t\r\tview borderWidth: 2.\r\tview display.\r\tview release\r\r\t\"DisplayTextView example3\"! !\r\r!DisplayTextView class methodsFor: 'examples'!\rexample4\t\r\t\"Create four passive views of some text on the screen with fat borders.\"\r\t| view |\r\tview_ self new model: 'this is a test of one line\rand the second line' asDisplayText.\r\tview translateBy: 100@100.\t\r\tview borderWidth: 5.\r\tview display.\r\t3 timesRepeat: [view translateBy: 100@100. view display].\r\tview release\r\r\t\"DisplayTextView example4\"! !\rAbstractEvent subclass: #DoItEvent\r\tinstanceVariableNames: 'context'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Change Notification'!\r\r!DoItEvent methodsFor: 'testing' stamp: 'rw 7/14/2003 10:15'!\risDoIt\r\r\t^true! !\r\r\r!DoItEvent methodsFor: 'printing' stamp: 'rw 7/14/2003 10:15'!\rprintEventKindOn: aStream\r\r\taStream nextPutAll: 'DoIt'! !\r\r\r!DoItEvent methodsFor: 'private-accessing' stamp: 'rw 7/14/2003 11:29'!\rcontext: aContext\r\r\tcontext := aContext! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rDoItEvent class\r\tinstanceVariableNames: ''!\r\r!DoItEvent class methodsFor: 'accessing' stamp: 'rw 7/14/2003 10:19'!\rchangeKind\r\r\t^#DoIt! !\r\r!DoItEvent class methodsFor: 'accessing' stamp: 'NS 1/20/2004 12:23'!\rsupportedKinds\r\t^ Array with: self expressionKind! !\r\r\r!DoItEvent class methodsFor: 'instance creation' stamp: 'NS 1/19/2004 09:47'!\rexpression: stringOrStream context: aContext\r\t| instance |\r\tinstance := self item: stringOrStream kind: AbstractEvent expressionKind.\r\tinstance context: aContext.\r\t^instance! !\rFileDirectory subclass: #DosFileDirectory\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Files'!\r!DosFileDirectory commentStamp: '<historical>' prior: 0!\rI represent a DOS or Windows FileDirectory.\r!\r\r\r!DosFileDirectory methodsFor: 'as yet unclassified' stamp: 'di 6/18/1998 08:57'!\rcheckName: aFileName fixErrors: fixing\r\t\"Check if the file name contains any invalid characters\"\r\t| fName badChars hasBadChars |\r\tfName _ super checkName: aFileName fixErrors: fixing.\r\tbadChars _ #( $: $< $> $| $/ $\\ $? $* $\") asSet.\r\thasBadChars _ fName includesAnyOf: badChars.\r\t(hasBadChars and:[fixing not]) ifTrue:[^self error:'Invalid file name'].\r\thasBadChars ifFalse:[^ fName].\r\t^ fName collect:\r\t\t[:char | (badChars includes: char) \r\t\t\t\tifTrue:[$#] \r\t\t\t\tifFalse:[char]]! !\r\r!DosFileDirectory methodsFor: 'as yet unclassified' stamp: 'bf 3/21/2000 17:06'!\rsetPathName: pathString\r\t\"Ensure pathString is absolute - relative directories aren't supported on all platforms.\"\r\r\t(pathString isEmpty\r\t\tor: [pathString first = $\\\r\t\t\tor: [pathString size >= 2 and: [pathString second = $: and: [pathString first isLetter]]]])\r\t\t\t\tifTrue: [^ super setPathName: pathString].\r\r\tself error: 'Fully qualified path expected'! !\r\r\r!DosFileDirectory methodsFor: 'path access' stamp: 'je 11/8/2000 20:02'!\rdriveName\r\r   \"return a possible drive letter and colon at the start of a Path name, empty string otherwise\"\r\r   | firstTwoChars |\r\r   ( pathName size >= 2 ) ifTrue: [\r      firstTwoChars _ (pathName copyFrom: 1 to: 2).\r      (self class isDrive: firstTwoChars) ifTrue: [^firstTwoChars]\r   ].\r   ^''! !\r\r!DosFileDirectory methodsFor: 'path access' stamp: 'nk 7/18/2004 17:26'!\rfullNameFor: fileName\r\t\"Return a corrected, fully-qualified name for the given file name. If the given name is already a full path (i.e., it contains a delimiter character), assume it is already a fully-qualified name. Otherwise, prefix it with the path to this directory. In either case, correct the local part of the file name.\"\r\tfileName ifNil:[^fileName].\r\t\"Check for fully qualified names\"\r\t((fileName size >= 2 and: [fileName first isLetter and: [fileName second = $:]])\r\t\tor: [(fileName beginsWith: '\\\\') and: [(fileName occurrencesOf: $\\) >= 2]])\r\t\t\tifTrue:[^fileName].\r\t^super fullNameFor: fileName! !\r\r!DosFileDirectory methodsFor: 'path access' stamp: 'je 11/8/2000 19:57'!\rfullPathFor: path\r\t\"Return the fully-qualified path name for the given file.\"\r\tpath isEmpty ifTrue:[^pathName].\r\t(path at: 1) = $\\ ifTrue:[\r\t\t(path size >= 2 and:[(path at: 2) = $\\]) ifTrue:[^path]. \"e.g., \\\\pipe\\\"\r\t\t^self driveName , path \"e.g., \\windows\\\"].\r\t(path size >= 2 and:[(path at: 2) = $: and:[path first isLetter]])\r\t\tifTrue:[^path]. \"e.g., c:\"\r\t^pathName, self slash, path! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rDosFileDirectory class\r\tinstanceVariableNames: ''!\r\r!DosFileDirectory class methodsFor: 'platform specific' stamp: 'ar 5/1/1999 01:48'!\risCaseSensitive\r\t\"Return true if file names are treated case sensitive\"\r\t^false! !\r\r!DosFileDirectory class methodsFor: 'platform specific' stamp: 'ar 3/6/2004 03:46'!\risDrive: fullName\r\t\"Answer whether the given full name describes a 'drive', e.g., one of the root directories of a Win32 file system. We allow two forms here - the classic one where a drive is specified by a letter followed by a colon, e.g., 'C:', 'D:' etc. and the network share form starting with double-backslashes e.g., '\\\\server'.\"\r\t^ (fullName size = 2 and: [fullName first isLetter and: [fullName last = $:]])\r\t\tor: [(fullName beginsWith: '\\\\') and: [(fullName occurrencesOf: $\\) = 2]]! !\r\r!DosFileDirectory class methodsFor: 'platform specific' stamp: 'jm 5/8/1998 20:45'!\rmaxFileNameLength\r\r\t^ 255\r! !\r\r!DosFileDirectory class methodsFor: 'platform specific' stamp: 'jm 12/4/97 22:57'!\rpathNameDelimiter\r\r\t^ $\\\r! !\r\r!DosFileDirectory class methodsFor: 'platform specific' stamp: 'ar 3/6/2004 04:14'!\rsplitName: fullName to: pathAndNameBlock\r\t\"Take the file name and convert it to the path name of a directory and a local file name within that directory. \r\tIMPORTANT NOTE: For 'drives', e.g., roots of the file system on Windows we treat the full name of that 'drive' as the local name rather than the path. This is because conceptually, all of these 'drives' hang off the virtual root of the entire Squeak file system, specified by FileDirectory root. In order to be consistent with, e.g., \r\r\t\tDosFileDirectory localNameFor: 'C:\\Windows' -> 'Windows'\r\t\tDosFileDirectory dirPathFor: 'C:\\Windows' -> 'C:'\r\r\twe expect the following to be true:\r\r\t\tDosFileDirectory localNameFor: 'C:' -> 'C:'\r\t\tDosFileDirectory dirPathFor: 'C:'. -> ''\r\t\tDosFileDirectory localNameFor: '\\\\server' -> '\\\\server'.\r\t\tDosFileDirectory dirPathFor: '\\\\server' -> ''.\r\r\tso that in turn the following relations hold:\r\r\t\t| fd |\r\t\tfd := DosFileDirectory on: 'C:\\Windows'.\r\t\tfd containingDirectory includes: fd localName.\r\t\tfd := DosFileDirectory on: 'C:'.\r\t\tfd containingDirectory includes: fd localName.\r\t\tfd := DosFileDirectory on: '\\\\server'.\r\t\tfd containingDirectory includes: fd localName.\r\t\"\r\t(self isDrive: fullName)\r\t\tifTrue: [^ pathAndNameBlock value:''  value: fullName].\r\t^ super splitName: fullName to: pathAndNameBlock! !\rModel subclass: #DualChangeSorter\r\tinstanceVariableNames: 'leftCngSorter rightCngSorter'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Changes'!\r!DualChangeSorter commentStamp: '<historical>' prior: 0!\rThis class presents a view of a two change sets at once, and supports copying changes between change sets.\r!\r\r\r!DualChangeSorter methodsFor: 'initialization' stamp: 'di 5/20/1998 21:44'!\rokToChange\r\t^ leftCngSorter okToChange & rightCngSorter okToChange! !\r\r!DualChangeSorter methodsFor: 'initialization' stamp: 'ssa 9/3/2008 11:07'!\ropen\r\t| topView |\r\r\tleftCngSorter _ ChangeSorter new myChangeSet: ChangeSet current.\r\tleftCngSorter parent: self.\r\trightCngSorter _ ChangeSorter new myChangeSet: \r\t\t\tChangeSorter secondaryChangeSet.\r\trightCngSorter parent: self.\r\r\ttopView _ (StandardSystemView new) model: self; borderWidth: 1.\r\ttopView label: leftCngSorter label.\r\ttopView minimumSize: 300 @ 200.\r\tleftCngSorter openView: topView offsetBy: 0@0.\r\trightCngSorter openView: topView offsetBy: 360@0.\r\ttopView controller open.\r! !\r\r!DualChangeSorter methodsFor: 'initialization'!\rrelease\r\tleftCngSorter release.\r\trightCngSorter release.! !\r\r\r!DualChangeSorter methodsFor: 'other'!\risLeftSide: theOne\r\t\"Which side am I?\"\r\t^ theOne == leftCngSorter! !\r\r!DualChangeSorter methodsFor: 'other' stamp: 'sd 5/23/2003 14:38'!\rlabelString\r\t\"The window label\"\r\r\t| leftName rightName changesName |\r\tleftName _ leftCngSorter changeSetCategory categoryName.\r\trightName _ rightCngSorter changeSetCategory categoryName.\r\tchangesName _ 'Changes go to \"', ChangeSet current name,  '\"'.\r\t^ ((leftName ~~ #All) or: [rightName ~~ #All])\r\t\tifTrue:\r\t\t\t['(', leftName, ') - ', changesName, ' - (', rightName, ')']\r\t\tifFalse:\r\t\t\t[changesName]! !\r\r!DualChangeSorter methodsFor: 'other' stamp: 'tk 5/8/1998 16:30'!\rmodelWakeUp\r\t\"A window with me as model is being entered.  Make sure I am up-to-date with the changeSets.\"\r\r\t\"Dumb way\"\r\tleftCngSorter canDiscardEdits \r\t\tifTrue: [leftCngSorter update]\t\"does both\"\r\t\tifFalse: [rightCngSorter update].\r! !\r\r!DualChangeSorter methodsFor: 'other'!\rother: theOne\r\t\"Return the other side's ChangeSorter\"\r\t^ theOne == leftCngSorter\r\t\tifTrue: [rightCngSorter]\r\t\tifFalse: [leftCngSorter]! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rDualChangeSorter class\r\tinstanceVariableNames: ''!\r\r!DualChangeSorter class methodsFor: 'opening' stamp: 'sw 3/24/1999 17:50'!\ropen\r\t\"Open a new instance of the receiver's class\"\r\r\tself new open! !\r\r\r\r!DualChangeSorter class methodsFor: 'class initialization' stamp: 'asm 4/10/2003 12:44'!\rregisterInFlapsRegistry\r\t\"Register the receiver in the system's flaps registry\"\r\tself environment\r\t\tat: #Flaps\r\t\tifPresent: [:cl | cl registerQuad: #(DualChangeSorter\t\tprototypicalToolWindow\t\t'Change Sorter'\t\t'Shows two change sets side by side')\r\t\t\t\t\t\tforFlapNamed: 'Tools']! !\r\r!DualChangeSorter class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 12:33'!\runload\r\t\"Unload the receiver from global registries\"\r\r\tself environment at: #Flaps ifPresent: [:cl |\r\tcl unregisterQuadsWithReceiver: self] ! !\rMagnitude subclass: #Duration\r\tinstanceVariableNames: 'nanos seconds'\r\tclassVariableNames: ''\r\tpoolDictionaries: 'ChronologyConstants'\r\tcategory: 'Kernel-Chronology'!\r!Duration commentStamp: '<historical>' prior: 0!\rI represent a duration of time. I have nanosecond precision\r\n!\r\r\r!Duration methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 07:59'!\r* operand\r\n\t\"operand is a Number\" \t^ self class nanoSeconds: ( (self asNanoSeconds * operand) asInteger).\r\n! !\r\r!Duration methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 07:59'!\r+ operand\r\n\r\n\t\"operand is a Duration\" \t^ self class nanoSeconds: (self asNanoSeconds + operand asNanoSeconds)\r\n! !\r\r!Duration methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 07:59'!\r- operand\r\n\t\"operand is a Duration\" \t^ self + operand negated\r\n! !\r\r!Duration methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 08:00'!\r/ operand\r\n\r\n\t\"operand is a Duration or a Number\"\r\n\r\n\r\n\t^ operand isNumber\r\n\t\tifTrue: [ self class nanoSeconds: (self asNanoSeconds / operand) asInteger ]\r\n\t\tifFalse: [ self asNanoSeconds / operand asDuration asNanoSeconds ]\r\n.\r\n! !\r\r!Duration methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 08:00'!\r< comparand\r\n\r\n\t^ self asNanoSeconds < comparand asNanoSeconds\r\n! !\r\r!Duration methodsFor: 'ansi protocol' stamp: 'brp 1/9/2004 06:25'!\r= comparand \r\n\t\"Answer whether the argument is a <Duration> representing the same \r\n\tperiod of time as the receiver.\"\r\n\r\n\t^ self == comparand\r\n\t\tifTrue: [true]\r\n\t\tifFalse: \r\n\t\t\t[self species = comparand species \r\n\t\t\t\tifTrue: [self asNanoSeconds = comparand asNanoSeconds]\r\n\t\t\t\tifFalse: [false] ]! !\r\r!Duration methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 08:01'!\rabs\r\n\r\n\t^ self class seconds: seconds abs nanoSeconds: nanos abs\r\n! !\r\r!Duration methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 08:01'!\rasDuration\r\n\r\n\t^ self\r\n! !\r\r!Duration methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 08:01'!\rasSeconds\r\n\r\n\r\n\t^ seconds\r\n! !\r\r!Duration methodsFor: 'ansi protocol' stamp: 'brp 1/7/2004 16:20'!\rdays\r\n\r\n\t\"Answer the number of days the receiver represents.\"\r\n\r\n\t^ seconds quo: SecondsInDay\r\n! !\r\r!Duration methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 08:01'!\rhash \t^seconds bitXor: nanos\r\n! !\r\r!Duration methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 08:01'!\rhours\r\n\t\"Answer the number of hours the receiver represents.\"\r\n\r\n\r\n\t^ (seconds rem: SecondsInDay) quo: SecondsInHour\r\n! !\r\r!Duration methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 08:01'!\rminutes\r\n\r\n\t\"Answer the number of minutes the receiver represents.\"\r\n\r\n\r\n\t^ (seconds rem: SecondsInHour) quo: SecondsInMinute\r\n! !\r\r!Duration methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 08:02'!\rnegated\r\n\r\n\t^ self class seconds: seconds negated nanoSeconds: nanos negated\r\n! !\r\r!Duration methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 08:02'!\rnegative\r\n\r\n\r\n\t^ self positive not\r\n! !\r\r!Duration methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 08:02'!\rpositive\r\n\r\n\r\n\t^ seconds = 0 ifTrue: [ nanos positive ] ifFalse: [ seconds positive ]\r\n! !\r\r!Duration methodsFor: 'ansi protocol' stamp: 'brp 8/23/2003 10:03'!\rseconds\r\n\t\"Answer the number of seconds the receiver represents.\"\r\n\r\n\t^ (seconds rem: SecondsInMinute) + (nanos / NanosInSecond)! !\r\r\r!Duration methodsFor: 'initialize-release' stamp: 'nk 3/30/2004 10:01'!\rinitialize\r\tself seconds: 0 nanoSeconds: 0.\r! !\r\r\r!Duration methodsFor: 'squeak protocol' stamp: 'brp 9/25/2003 14:29'!\r// operand\r\n\r\n\t\"operand is a Duration or a Number\"\r\n\r\n\r\n\t^ operand isNumber\r\n\t\tifTrue: [ self class nanoSeconds: (self asNanoSeconds // operand) asInteger ]\r\n\t\tifFalse: [ self asNanoSeconds // operand asDuration asNanoSeconds ]\r\n! !\r\r!Duration methodsFor: 'squeak protocol' stamp: 'brp 9/25/2003 15:07'!\r\\\\ operand\r\n\r\n\t\"modulo. Remainder defined in terms of //. Answer a Duration with the \r\n\tsame sign as aDuration. operand is a Duration or a Number.\"\r\n\r\n\t^ operand isNumber\r\n\t\tifTrue: [ self class nanoSeconds: (self asNanoSeconds \\\\ operand) ]\r\n\t\tifFalse: [ self - (operand * (self // operand)) ]\r\n! !\r\r!Duration methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 08:03'!\rasNanoSeconds\r\n\r\n\t^ (seconds * NanosInSecond) + nanos\r\n! !\r\r!Duration methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 08:03'!\rnanoSeconds\r\n\r\n\r\n\t^ nanos\r\n! !\r\r!Duration methodsFor: 'squeak protocol' stamp: 'brp 9/25/2003 13:22'!\rprintOn: aStream\r\n\t\"Format as per ANSI 5.8.2.16: [-]D:HH:MM:SS[.S]\" \t| d h m s n |\r\n\td _ self days abs.\r\n\th _ self hours abs.\r\n\tm _ self minutes abs.\r\n \ts _ self seconds abs truncated.\r\n\tn _ self nanoSeconds abs. \tself negative ifTrue: [ aStream nextPut: $- ].\r\n\td printOn: aStream. aStream nextPut: $:.\r\n\th < 10 ifTrue: [ aStream nextPut: $0. ].\r\n\th printOn: aStream. aStream nextPut: $:.\r\n\tm < 10 ifTrue: [ aStream nextPut: $0. ].\r\n\tm printOn: aStream. aStream nextPut: $:.\r\n\ts < 10 ifTrue: [ aStream nextPut: $0. ].\r\n\ts printOn: aStream.\r\n\tn = 0 ifFalse:\r\n\t\t[ | z ps |\r\n\t\taStream nextPut: $..\r\n\t\tps _ n printString padded: #left to: 9 with: $0. \r\n\t\tz _ ps findLast: [ :c | c asciiValue > $0 asciiValue ].\r\n\t\tps from: 1 to: z do: [ :c | aStream nextPut: c ] ].\r\n! !\r\r!Duration methodsFor: 'squeak protocol' stamp: 'brp 9/25/2003 15:42'!\rroundTo: aDuration\r\n\t\"e.g. if the receiver is 5 minutes, 37 seconds, and aDuration is 2 minutes, answer 6 minutes.\"\r\n\r\n\t^ self class nanoSeconds: (self asNanoSeconds roundTo: aDuration asNanoSeconds)\r\n\r\n! !\r\r!Duration methodsFor: 'squeak protocol' stamp: 'brp 9/25/2003 15:38'!\rtruncateTo: aDuration\r\n\t\"e.g. if the receiver is 5 minutes, 37 seconds, and aDuration is 2 minutes, answer 4 minutes.\"\r\n\r\n\t^ self class\r\n\t\tnanoSeconds: (self asNanoSeconds truncateTo: aDuration asNanoSeconds)\r\n\r\n! !\r\r\r!Duration methodsFor: 'private' stamp: 'brp 7/27/2003 15:08'!\rseconds: secondCount nanoSeconds: nanoCount \r\n\t\"Private - only used by Duration class\"\r\n\r\n\tseconds _ secondCount.\r\n\tnanos _ nanoCount! !\r\r!Duration methodsFor: 'private' stamp: 'brp 9/25/2003 14:42'!\rstoreOn: aStream\r\n\r\n\taStream\r\n\t\tnextPut: $(;\r\n\t\tnextPutAll: self className;\r\n\t\tnextPutAll: ' seconds: ';\r\n\t\tprint: seconds;\r\n\t\tnextPutAll: ' nanoSeconds: ';\r\n\t\tprint: nanos;\r\n\t\tnextPut: $).\r\n! !\r\r!Duration methodsFor: 'private' stamp: 'brp 8/23/2003 20:31'!\rticks\r\n\t\"Answer an array {days. seconds. nanoSeconds}. Used by DateAndTime and Time\"\r\n\r\n\t^ Array \r\n\t\twith: self days\r\n\t\twith: (self hours * 3600) + (self minutes * 60 ) + (self seconds truncated)\r\n\t\twith: self nanoSeconds! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rDuration class\r\tinstanceVariableNames: ''!\r\r!Duration class methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 07:55'!\rdays: days hours: hours minutes: minutes seconds: seconds\r\n\r\n\t^ self days: days hours: hours minutes: minutes seconds: seconds nanoSeconds: 0.! !\r\r!Duration class methodsFor: 'ansi protocol' stamp: 'nk 3/30/2004 10:05'!\rseconds: aNumber\r\r\t^ (self basicNew) seconds: aNumber nanoSeconds: 0; yourself.\r! !\r\r!Duration class methodsFor: 'ansi protocol' stamp: 'nk 3/30/2004 10:06'!\rzero\r\r\t^ (self basicNew) seconds: 0 nanoSeconds: 0; yourself.\r! !\r\r\r!Duration class methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 15:00'!\rdays: aNumber\r\n\r\n\t^ self days: aNumber hours: 0 minutes: 0 seconds: 0 nanoSeconds: 0! !\r\r!Duration class methodsFor: 'squeak protocol' stamp: 'brp 1/7/2004 15:38'!\rdays: days hours: hours minutes: minutes seconds: seconds nanoSeconds: nanos\r\r \t^ self nanoSeconds: \r\n\t\t\t( ( (days * SecondsInDay) \r\n\t\t\t\t+ (hours * SecondsInHour)\r\n\t\t\t\t\t+ (minutes * SecondsInMinute) \r\n\t\t\t\t\t\t+ seconds ) * NanosInSecond )\r\n\t\t\t\t\t\t\t+ nanos.\r\n! !\r\r!Duration class methodsFor: 'squeak protocol' stamp: 'brp 5/16/2003 11:29'!\rfromString: aString\r\n\r\n\r\n\t^ self readFrom: (ReadStream on: aString)\r\n! !\r\r!Duration class methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 15:00'!\rhours: aNumber\r\n\r\n\r\n\t^ self days: 0 hours: aNumber minutes: 0 seconds: 0 nanoSeconds: 0! !\r\r!Duration class methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 15:01'!\rminutes: aNumber\r\n\r\n\t^ self days: 0 hours: 0 minutes: aNumber seconds: 0 nanoSeconds: 0! !\r\r!Duration class methodsFor: 'squeak protocol' stamp: 'brp 5/21/2003 08:27'!\rnanoSeconds: nanos\r\n\r\n\t^ self new\r\n\t\tseconds: (nanos quo: NanosInSecond) \r\n\t\tnanoSeconds: (nanos rem: NanosInSecond) rounded;\r\n\t\tyourself.\r\n! !\r\r!Duration class methodsFor: 'squeak protocol' stamp: 'brp 8/23/2003 12:47'!\rreadFrom: aStream\r\n\t\"Formatted as per ANSI 5.8.2.16: [-]D:HH:MM:SS[.S]\r\n\tTo assiste DateAndTime>>#readFrom: SS may be unpadded or absent.\"\r\n\r\n\t| sign days hours minutes seconds nanos ws ch |\r\n\tsign _ (aStream peekFor: $-) ifTrue: [-1] ifFalse: [1].\r\n\r\n\tdays _ (aStream upTo: $:) asInteger sign: sign.\r\n\thours _ (aStream upTo: $:) asInteger sign: sign.\r\n\tminutes _ (aStream upTo: $:) asInteger sign: sign.\r\n\r\n\taStream atEnd \r\n\t\tifTrue: [seconds _ 0. nanos _ 0]\r\n\t\tifFalse: \r\n\t\t\t[ ws _ String new writeStream.\r\n\t\t\t[ch _ aStream next. (ch isNil) | (ch = $.)]\r\n\t\t\t\twhileFalse: [ ws nextPut: ch ].\r\n\t\t\tseconds _ ws contents asInteger sign: sign.\r\n\t\t\tws reset.\r\n\t\t\t9 timesRepeat: \r\n\t\t\t\t[ ch _ aStream next. \r\n\t\t\t\tws nextPut: (ch ifNil: [$0] ifNotNil: [ch]) ].\r\n\t\t\tnanos _ ws contents asInteger sign: sign].\r\n\r\n\t^ self days: days hours: hours minutes: minutes seconds: seconds nanoSeconds: nanos.\r\n\r\n\t\"\t'0:00:00:00' asDuration\r\n\t\t'0:00:00:00.000000001' asDuration\r\n\t\t'0:00:00:00.999999999' asDuration\r\n\t\t'0:00:00:00.100000000' asDuration\r\n\t\t'0:00:00:00.10' asDuration\r\n\t\t'0:00:00:00.1' asDuration\r\n\t\t'0:00:00:01' asDuration\r\n\t\t'0:12:45:45' asDuration\r\n\t\t'1:00:00:00' asDuration\r\n\t\t'365:00:00:00' asDuration\r\n\t\t'-7:09:12:06.10' asDuration\r\n\t\t'+0:01:02' asDuration\r\n\t\t'+0:01:02:3' asDuration\r\n \t\"\r\n! !\r\r!Duration class methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 15:01'!\rseconds: seconds nanoSeconds: nanos\r\n\r\n\t^ self days: 0 hours: 0 minutes: 0 seconds: seconds nanoSeconds: nanos\r\n! !\r\r!Duration class methodsFor: 'squeak protocol' stamp: 'brp 8/6/2003 18:54'!\rweeks: aNumber\r\n\r\n\t^ self days: (aNumber * 7) hours: 0 minutes: 0 seconds: 0 nanoSeconds: 0\r\n! !\rObjectWithDocumentation subclass: #ElementCategory\r\tinstanceVariableNames: 'categoryName keysInOrder elementDictionary'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Protocols-Kernel'!\r!ElementCategory commentStamp: '<historical>' prior: 0!\rElementCategory\r\t\rContains a list of elements that affords keyed access but also has an inherent order.\r\rAdd items to the category by sending it elementAt:put:.\rObtain the elements in order by sending #elementsInOrder\rObtain the value of an element at a given key by sending #elementAt:!\r\r\r!ElementCategory methodsFor: 'elements' stamp: 'sw 12/1/2000 22:46'!\relementAt: aKey\r\t\"Answer the element at the given key\"\r\r\t^ elementDictionary at: aKey ifAbsent: [nil]! !\r\r!ElementCategory methodsFor: 'elements' stamp: 'sw 1/26/2001 22:54'!\relementAt: sym put: element\r\t\"Add symbol at the end of my sorted list (unless it is already present), and put the element in the dictionary\"\r\r\t(keysInOrder includes: sym) ifFalse: [keysInOrder add: sym].\r\t^ elementDictionary at: sym put: element! !\r\r!ElementCategory methodsFor: 'elements' stamp: 'sw 9/12/2001 22:59'!\relementSymbol\r\t\"Answer the element symbol for the receiver.  Here, the categoryName dominates\"\r\r\t^ categoryName! !\r\r!ElementCategory methodsFor: 'elements' stamp: 'sw 12/1/2000 22:47'!\relementsInOrder\r\t\"Answer the elements in order\"\r\r\t^ keysInOrder collect: [:aKey | elementDictionary at: aKey]! !\r\r!ElementCategory methodsFor: 'elements' stamp: 'sw 4/3/2001 11:06'!\rfasterElementAt: sym put: element\r\t\"Add symbol at the end of my sorted list and put the element in the dictionary.  This variant adds the key at the end of the keys list without checking whether it already exists.\"\r\r\tkeysInOrder add: sym.\r\t^ elementDictionary at: sym put: element! !\r\r!ElementCategory methodsFor: 'elements' stamp: 'sw 4/11/2001 20:08'!\rremoveElementAt: aKey\r\t\"Remove the element at the given key\"\r\r\telementDictionary removeKey: aKey ifAbsent: [^ self].\r\tkeysInOrder remove: aKey ifAbsent: []! !\r\r\r!ElementCategory methodsFor: 'copying' stamp: 'sw 12/1/2000 22:45'!\rcopy\r\t\"Answer a copy of the receiver\"\r\r\t^ super copy copyFrom: self! !\r\r!ElementCategory methodsFor: 'copying' stamp: 'sw 12/1/2000 22:46'!\rcopyFrom: donor\r\t\"Copy the receiver's contents from the donor\"\r\r\tkeysInOrder _ donor keysInOrder.\r\telementDictionary _ donor copyOfElementDictionary! !\r\r!ElementCategory methodsFor: 'copying' stamp: 'sw 12/1/2000 22:46'!\rcopyOfElementDictionary\r\t\"Answer a copy of the element dictionary\"\r\r\t^ elementDictionary copy! !\r\r\r!ElementCategory methodsFor: 'keys' stamp: 'sw 12/11/2000 15:36'!\rincludesKey: aKey\r\t\"Answer whether the receiver's dictionary holds the given key\"\r\r\t^ elementDictionary includesKey: aKey! !\r\r!ElementCategory methodsFor: 'keys' stamp: 'sw 12/1/2000 22:47'!\rkeysInOrder\r\t\"Answer the keys in their sorted order\"\r\r\t^ keysInOrder copy! !\r\r\r!ElementCategory methodsFor: 'category name' stamp: 'sw 1/26/2001 22:45'!\rcategoryName\r\t\"Answer the formal name of the category\"\r\r\t^ categoryName! !\r\r!ElementCategory methodsFor: 'category name' stamp: 'sw 1/26/2001 22:46'!\rcategoryName: aName\r\t\"Set the category name\"\r\r\tcategoryName _ aName! !\r\r\r!ElementCategory methodsFor: 'initialization' stamp: 'sw 3/30/2001 00:12'!\raddCategoryItem: anItem\r\t\"Add the item at the end, obtaining its key from itself (it must respond to #categoryName)\"\r\r\tself elementAt: anItem categoryName put: anItem! !\r\r!ElementCategory methodsFor: 'initialization' stamp: 'sw 3/28/2001 19:46'!\rclear\r\t\"Clear the receiber's keysInOrder and elementDictionary\"\r\r\tkeysInOrder _ OrderedCollection new.\r\telementDictionary _ IdentityDictionary new! !\r\r!ElementCategory methodsFor: 'initialization' stamp: 'sw 3/28/2001 19:47'!\rinitialize\r\t\"Initialize the receiver (automatically called when instances are created via 'new')\"\r\r\tsuper initialize.\r\tself clear! !\r\r\r!ElementCategory methodsFor: 'printing' stamp: 'sw 1/26/2001 22:47'!\rprintOn: aStream\r\t\"Append to the argument, aStream, a sequence of characters that identifies the receiver.\"\r\r\tsuper printOn: aStream.\r\tcategoryName ifNotNil: [aStream nextPutAll: ' named ', categoryName asString]! !\r\r\r!ElementCategory methodsFor: 'translation' stamp: 'dgd 12/4/2003 20:22'!\rtranslated\r\t\"answer the receiver translated to the current language\"\r\t\r\t^ self class new categoryName: categoryName asString translated asSymbol! !\rObject subclass: #ElementTranslation\r\tinstanceVariableNames: 'wording helpMessage naturalLanguageSymbol'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Protocols-Kernel'!\r\r!ElementTranslation methodsFor: 'access' stamp: 'sw 5/22/2001 10:34'!\rhelpMessage\r\t\"Answer the helpMessage\"\r\r\t^ helpMessage! !\r\r!ElementTranslation methodsFor: 'access' stamp: 'sw 5/22/2001 10:33'!\rwording\r\t\"Answer the wording\"\r\r\t^ wording! !\r\r\r!ElementTranslation methodsFor: 'initialization' stamp: 'sw 9/12/2001 23:00'!\rlanguage\r\t\"Answer the natural language symbol of the receiver\"\r\r\t^ naturalLanguageSymbol ifNil: [naturalLanguageSymbol _ #English]! !\r\r!ElementTranslation methodsFor: 'initialization' stamp: 'sw 9/12/2001 10:15'!\rwording: aWording helpMessage: aHelpMessage language: aLanguageSymbol\r\t\"Set state directly\"\r\r\twording _ aWording.\r\thelpMessage _ aHelpMessage.\r\tnaturalLanguageSymbol _ aLanguageSymbol! !\r\r\r!ElementTranslation methodsFor: 'printing' stamp: 'sw 9/12/2001 16:08'!\rprintOn: aStream\r\t\"Print the receiver on the stream\"\r\r\taStream nextPutAll: '('.\r\tsuper printOn: aStream.\r\taStream nextPutAll: ' language: ', naturalLanguageSymbol asString, ' wording: ', wording asString, ')'! !\r\r\r!ElementTranslation methodsFor: 'translation' stamp: 'dgd 12/4/2003 20:22'!\rtranslated\r\t\"answer the receiver translated to the current language\"\r\t| translatedWording translatedHelpMessage |\r\t\r\ttranslatedWording := wording isNil\r\t\t\t\tifFalse: [wording asString translated].\r\ttranslatedHelpMessage := helpMessage isNil\r\t\t\t\tifFalse: [helpMessage asString translated].\r\t\"\"\r\t^ self class new\r\t\twording: translatedWording\r\t\thelpMessage: translatedHelpMessage\r\t\tlanguage: self currentWorld currentNaturalLanguage! !\rParseNode subclass: #Encoder\r\tinstanceVariableNames: 'scopeTable nTemps supered requestor class literalStream selectorSet litIndSet litSet sourceRanges globalSourceRanges'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Compiler'!\r!Encoder commentStamp: '<historical>' prior: 0!\rI encode names and literals into tree nodes with byte codes for the compiler. Byte codes for literals are not assigned until the tree-sizing pass of the compiler, because only then is it known which literals are actually needed. I also keep track of sourceCode ranges during parsing and code generation so I can provide an inverse map for the debugger.!\r\r\r!Encoder methodsFor: 'initialize-release'!\rfillDict: dict with: nodeClass mapping: keys to: codeArray\r\t| codeStream |\r\tcodeStream _ ReadStream on: codeArray.\r\tkeys do: \r\t\t[:key | dict \r\t\t\t\tat: key\r\t\t\t\tput:  (nodeClass new name: key key: key code: codeStream next)]! !\r\r!Encoder methodsFor: 'initialize-release' stamp: 'di 12/4/1999 22:22'!\rinit: aClass context: aContext notifying: req\r\t| node n homeNode indexNode |\r\trequestor _ req.\r\tclass _ aClass.\r\tnTemps _ 0.\r\tsupered _ false.\r\tself initScopeAndLiteralTables.\r\tn _ -1.\r\tclass allInstVarNames do: \r\t\t[:variable | \r\t\tnode _ VariableNode new\r\t\t\t\t\tname: variable\r\t\t\t\t\tindex: (n _ n + 1)\r\t\t\t\t\ttype: LdInstType.\r\t\tscopeTable at: variable put: node].\r\taContext == nil\r\t\tifFalse: \r\t\t\t[homeNode _ self bindTemp: 'homeContext'.\r\t\t\t\"first temp = aContext passed as arg\"\r\t\t\tn _ 0.\r\t\t\taContext tempNames do: \r\t\t\t\t[:variable | \r\t\t\t\tindexNode _ self encodeLiteral: (n _ n + 1).\r\t\t\t\tnode _ MessageAsTempNode new\r\t\t\t\t\t\t\treceiver: homeNode\r\t\t\t\t\t\t\tselector: #tempAt:\r\t\t\t\t\t\t\targuments: (Array with: indexNode)\r\t\t\t\t\t\t\tprecedence: 3\r\t\t\t\t\t\t\tfrom: self.\r\t\t\t\tscopeTable at: variable put: node]].\r\tsourceRanges _ Dictionary new: 32.\r\tglobalSourceRanges _ OrderedCollection new: 32.\r! !\r\r!Encoder methodsFor: 'initialize-release'!\rinitScopeAndLiteralTables\r\r\tscopeTable _ StdVariables copy.\r\tlitSet _ StdLiterals copy.\r\tselectorSet _ StdSelectors copy.\r\tlitIndSet _ Dictionary new: 16.\r\tliteralStream _ WriteStream on: (Array new: 32)! !\r\r!Encoder methodsFor: 'initialize-release'!\rnoteSuper\r\r\tsupered _ true! !\r\r!Encoder methodsFor: 'initialize-release'!\rrelease\r\r\trequestor _ nil! !\r\r!Encoder methodsFor: 'initialize-release' stamp: 'ajh 7/21/2003 00:53'!\rtemps: tempVars literals: lits class: cl \r\t\"Decompile.\"\r\r\tsupered _ false.\r\tclass _ cl.\r\tnTemps _ tempVars size.\r\ttempVars do: [:node | scopeTable at: node name put: node].\r\tliteralStream _ ReadStream on: lits.\r\tliteralStream position: lits size.\r\tsourceRanges _ Dictionary new: 32.\r\tglobalSourceRanges _ OrderedCollection new: 32.\r! !\r\r\r!Encoder methodsFor: 'encoding'!\rcantStoreInto: varName\r\r\t^StdVariables includesKey: varName! !\r\r!Encoder methodsFor: 'encoding'!\rencodeLiteral: object\r\r\t^self\r\t\tname: object\r\t\tkey: (class literalScannedAs: object notifying: self)\r\t\tclass: LiteralNode\r\t\ttype: LdLitType\r\t\tset: litSet! !\r\r!Encoder methodsFor: 'encoding'!\rencodeSelector: selector\r\r\t^self\r\t\tname: selector\r\t\tkey: selector\r\t\tclass: SelectorNode\r\t\ttype: SendType\r\t\tset: selectorSet! !\r\r!Encoder methodsFor: 'encoding' stamp: 'di 12/4/1999 20:09'!\rencodeVariable: name\r\t^ self encodeVariable: name sourceRange: nil ifUnknown: [ self undeclared: name ]! !\r\r!Encoder methodsFor: 'encoding' stamp: 'RAA 2/5/2001 10:44'!\rencodeVariable: name sourceRange: range ifUnknown: action\r\t| varNode |\r\tvarNode _ scopeTable at: name\r\t\t\tifAbsent: \r\t\t\t\t[(self lookupInPools: name \r\t\t\t\t\tifFound: [:assoc | varNode _ self global: assoc name: name])\r\t\t\t\t\tifTrue: [varNode]\r\t\t\t\t\tifFalse: [action value]].\r\trange ifNotNil: [\r\t\tname first isUppercase ifTrue:\r\t\t\t[globalSourceRanges addLast: { name. range. false }]. ].\r\r\t(varNode isTemp and: [varNode scope < 0]) ifTrue: [\r\t\tOutOfScopeNotification signal ifFalse: [ ^self notify: 'out of scope'].\r\t].\r\t^ varNode! !\r\r!Encoder methodsFor: 'encoding'!\rlitIndex: literal\r\t| p |\r\tp _ literalStream position.\r\tp = 256 ifTrue:\r\t\t[self notify: 'More than 256 literals referenced. \rYou must split or otherwise simplify this method.\rThe 257th literal is: ', literal printString. ^nil].\r\t\t\"Would like to show where it is in the source code, \r\t\t but that info is hard to get.\"\r\tliteralStream nextPut: literal.\r\t^ p! !\r\r!Encoder methodsFor: 'encoding' stamp: 'di 1/7/2000 15:24'!\rsharableLitIndex: literal\r\t\"Special access prevents multiple entries for post-allocated super send special selectors\"\r\t| p |\r\tp _ literalStream originalContents indexOf: literal.\r\tp = 0 ifFalse: [^ p-1].\r\t^ self litIndex: literal\r! !\r\r!Encoder methodsFor: 'encoding' stamp: 'tk 4/20/1999 15:41'!\rundeclared: name\r\r\t| sym |\r\trequestor interactive ifTrue: [\r\t\trequestor requestor == #error: ifTrue: [requestor error: 'Undeclared'].\r\t\t^ self notify: 'Undeclared'].\r\tTranscript show: ' (' , name , ' is Undeclared) '.\r\tsym _ name asSymbol.\r\tUndeclared at: sym put: nil.\r\t^self global: (Undeclared associationAt: sym) name: sym! !\r\r\r!Encoder methodsFor: 'temps'!\rautoBind: name \r\t\"Declare a block argument as a temp if not already declared.\"\r\t| node |\r\tnode _ scopeTable \r\t\t\tat: name\r\t\t\tifAbsent: \r\t\t\t\t[(self lookupInPools: name ifFound: [:assoc | assoc])\r\t\t\t\t\tifTrue: [self notify: 'Name already used in a Pool or Global'].\r\t\t\t\t^ (self reallyBind: name) nowHasDef nowHasRef scope: 1].\r\tnode isTemp\r\t\tifTrue: [node scope >= 0 ifTrue:\r\t\t\t\t\t[^ self notify: 'Name already used in this method'].\r\t\t\t\tnode nowHasDef nowHasRef scope: 1]\r\t\tifFalse: [^ self notify: 'Name already used in this class'].\r\t^node! !\r\r!Encoder methodsFor: 'temps' stamp: 'di 10/12/1999 16:53'!\rbindAndJuggle: name\r\r\t| node nodes first thisCode |\r\tnode _ self reallyBind: name.\r\r\t\"Declared temps must precede block temps for decompiler and debugger to work right\"\r\tnodes _ self tempNodes.\r\t(first _ nodes findFirst: [:n | n scope > 0]) > 0 ifTrue:\r\t\t[node == nodes last ifFalse: [self error: 'logic error'].\r\t\tthisCode _ (nodes at: first) code.\r\t\tfirst to: nodes size - 1 do:\r\t\t\t[:i | (nodes at: i) key: (nodes at: i) key\r\t\t\t\t\t\t\tcode: (nodes at: i+1) code].\r\t\tnodes last key: nodes last key code: thisCode].\r\t\r\t^ node! !\r\r!Encoder methodsFor: 'temps' stamp: 'jm 9/18/97 21:06'!\rbindArg: name \r\t\"Declare an argument.\"\r\t| node |\r\tnTemps >= 15\r\t\tifTrue: [^self notify: 'Too many arguments'].\r\tnode _ self bindTemp: name.\r\t^ node nowHasDef nowHasRef! !\r\r!Encoder methodsFor: 'temps' stamp: 'crl 2/26/1999 12:18'!\rbindBlockTemp: name \r\t\"Declare a temporary block variable; complain if it's not a field or class variable.\"\r\r\t| node |\r\r\tnode _ scopeTable at: name ifAbsent: [^self reallyBind: name].\r\tnode isTemp\r\t\tifTrue: [\r\t\t\tnode scope >= 0 ifTrue: [^ self notify: 'Name already used in this method'].\r\t\t\tnode scope: 0]\r\t\tifFalse: [^self notify: 'Name already used in this class'].\r\t^node\r! !\r\r!Encoder methodsFor: 'temps' stamp: 'ar 7/12/1999 00:24'!\rbindTemp: name \r\t\"Declare a temporary; error not if a field or class variable.\"\r\tscopeTable at: name ifPresent:[:node|\r\t\t\"When non-interactive raise the error only if its a duplicate\"\r\t\t(node isTemp or:[requestor interactive])\r\t\t\tifTrue:[^self notify:'Name is already defined']\r\t\t\tifFalse:[Transcript show: '(', name, ' is shadowed)']].\r\t^self reallyBind: name! !\r\r!Encoder methodsFor: 'temps'!\rmaxTemp\r\r\t^nTemps! !\r\r!Encoder methodsFor: 'temps'!\rnewTemp: name\r\r\tnTemps _ nTemps + 1.\r\t^ TempVariableNode new\r\t\tname: name\r\t\tindex: nTemps - 1\r\t\ttype: LdTempType\r\t\tscope: 0! !\r\r\r!Encoder methodsFor: 'results'!\rallLiterals\r\tsupered ifTrue: [self litIndex: (self associationFor: class)].\r\t^ literalStream contents! !\r\r!Encoder methodsFor: 'results' stamp: 'ar 2/13/1999 21:18'!\rassociationFor: aClass\r\r\t| name |\r\tname _ Smalltalk keyAtIdentityValue: aClass ifAbsent: [^Association new value: aClass].\r\t^Smalltalk associationAt: name! !\r\r!Encoder methodsFor: 'results'!\rliterals\r\t\"Should only be used for decompiling primitives\"\r\t^ literalStream contents! !\r\r!Encoder methodsFor: 'results' stamp: 'di 10/12/1999 16:12'!\rtempNames \r\r\t^ self tempNodes collect:\r\t\t[:node | (node isMemberOf: MessageAsTempNode)\r\t\t\t\t\tifTrue: [scopeTable keyAtValue: node]\r\t\t\t\t\tifFalse: [node key]]! !\r\r!Encoder methodsFor: 'results' stamp: 'di 10/12/1999 15:31'!\rtempNodes \r\t| tempNodes |\r\ttempNodes _ SortedCollection sortBlock: [:n1 :n2 | n1 code <= n2 code].\r\tscopeTable associationsDo:\r\t\t[:assn | assn value isTemp ifTrue: [tempNodes add: assn value]].\r\t^ tempNodes! !\r\r!Encoder methodsFor: 'results' stamp: 'di 10/12/1999 17:15'!\runusedTempNames \r\t| unused name |\r\tunused _ OrderedCollection new.\r\tscopeTable associationsDo:\r\t\t[:assn | (assn value isUnusedTemp)\r\t\t\tifTrue: [name _ assn value key.\r\t\t\t\t\tname ~= 'homeContext' ifTrue: [unused add: name]]].\r\t^ unused! !\r\r\r!Encoder methodsFor: 'error handling'!\rnotify: string\r\t\"Put a separate notifier on top of the requestor's window\"\r\t| req |\r\trequestor == nil\r\t\tifFalse: \r\t\t\t[req _ requestor.\r\t\t\tself release.\r\t\t\treq notify: string].\r\t^false! !\r\r!Encoder methodsFor: 'error handling'!\rnotify: string at: location\r\r\t| req |\r\trequestor == nil\r\t\tifFalse: \r\t\t\t[req _ requestor.\r\t\t\tself release.\r\t\t\treq notify: string at: location].\r\t^false! !\r\r!Encoder methodsFor: 'error handling'!\rrequestor: req\r\t\"Often the requestor is a BrowserCodeController\"\r\trequestor _ req! !\r\r\r!Encoder methodsFor: 'source mapping'!\rnoteSourceRange: range forNode: node\r\r\tsourceRanges at: node put: range! !\r\r!Encoder methodsFor: 'source mapping' stamp: 'RAA 8/21/1999 06:52'!\rrawSourceRanges\r\r\t^ sourceRanges ! !\r\r!Encoder methodsFor: 'source mapping'!\rsourceMap\r\t\"Answer with a sorted set of associations (pc range).\"\r\r\t^ (sourceRanges keys collect: \r\t\t[:key |  Association key: key pc value: (sourceRanges at: key)])\r\t\t\tasSortedCollection! !\r\r\r!Encoder methodsFor: 'private'!\rclassEncoding\r\t\"This is a hack so that the parser may findout what class it was parsing for when it wants to create a syntax error view.\"\r\t^ class! !\r\r!Encoder methodsFor: 'private' stamp: 'ar 8/14/2001 23:12'!\rglobal: ref name: name\r\r\t^self\r\t\tname: name\r\t\tkey: ref\r\t\tclass: LiteralVariableNode\r\t\ttype: LdLitIndType\r\t\tset: litIndSet! !\r\r!Encoder methodsFor: 'private' stamp: 'ar 5/17/2003 14:16'!\rlookupInPools: varName ifFound: assocBlock\r\r\tSymbol hasInterned: varName ifTrue:[:sym|\r\t\t(class bindingOf: sym) ifNotNilDo:[:assoc| \r\t\t\tassocBlock value: assoc.\r\t\t\t^true].\r\t\t(Preferences valueOfFlag: #lenientScopeForGlobals)  \"**Temporary**\"\r\t\t\tifTrue: [^ Smalltalk lenientScopeHas: sym ifTrue: assocBlock]\r\t\t\tifFalse: [^ false]].\r\t(class bindingOf: varName) ifNotNilDo:[:assoc|\r\t\tassocBlock value: assoc.\r\t\t^true].\r\t^false! !\r\r!Encoder methodsFor: 'private'!\rname: name key: key class: leafNodeClass type: type set: dict\r\r\t| node |\r\t^dict \r\t\tat: key\r\t\tifAbsent: \r\t\t\t[node _ leafNodeClass new\r\t\t\t\t\t\tname: name\r\t\t\t\t\t\tkey: key\r\t\t\t\t\t\tindex: nil\r\t\t\t\t\t\ttype: type.\r\t\t\tdict at: key put: node.\r\t\t\t^node]! !\r\r!Encoder methodsFor: 'private'!\rpossibleVariablesFor: proposedVariable\r\r\t| results |\r\tresults _ proposedVariable correctAgainstDictionary: scopeTable\r\t\t\t\t\t\t\t\tcontinuedFrom: nil.\r\tproposedVariable first isUppercase ifTrue:\r\t\t[ results _ class possibleVariablesFor: proposedVariable\r\t\t\t\t\t\tcontinuedFrom: results ].\r\t^ proposedVariable correctAgainst: nil continuedFrom: results.\r! !\r\r!Encoder methodsFor: 'private'!\rreallyBind: name\r\r\t| node |\r\tnode _ self newTemp: name.\r\tscopeTable at: name put: node.\r\t^node! !\rError subclass: #EndOfStream\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Exceptions Extensions'!\r!EndOfStream commentStamp: '<historical>' prior: 0!\rSignalled when ReadStream>>next encounters a premature end.!\r\r\r!EndOfStream methodsFor: 'description' stamp: 'hh 5/17/2000 00:30'!\risResumable\r\t\"EndOfStream is resumable, so ReadStream>>next can answer\"\r\r\t^ true! !\r\r\r!EndOfStream methodsFor: 'exceptionDescription' stamp: 'RAA 5/17/2000 03:10'!\rdefaultAction\r\t\"Answer ReadStream>>next default reply.\"\r\r\t^ nil! !\rException subclass: #Error\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Exceptions Kernel'!\r!Error commentStamp: '<historical>' prior: 0!\r>From the ANSI standard:\rThis protocol describes the behavior of instances of class Error. These are used to represent error conditions that prevent the normal continuation of processing. Actual error exceptions used by an application may be subclasses of this class.\rAs Error is explicitly specified  to be subclassable, conforming implementations must implement its behavior in a non-fragile manner.\r\rAdditional notes:\rError>defaultAction uses an explicit test for the presence of the Debugger class to decide whether or not it is in development mode.  In the future, TFEI hopes to enhance the semantics of #defaultAction to improve support for pluggable default handlers.!\r\r\r!Error methodsFor: 'private' stamp: 'ajh 2/1/2003 00:54'!\risResumable\r\t\"Determine whether an exception is resumable.\"\r\r\t^ false! !\r\r\r!Error methodsFor: 'exceptionDescription' stamp: 'ajh 9/4/2002 19:24'!\rdefaultAction\r\t\"No one has handled this error, but now give them a chance to decide how to debug it.  If none handle this either then open debugger (see UnhandedError-defaultAction)\"\r\r\tUnhandledError signalForException: self! !\rObject subclass: #EventManager\r\tinstanceVariableNames: 'actionMap'\r\tclassVariableNames: 'ActionMaps'\r\tpoolDictionaries: ''\r\tcategory: 'System-Object Events'!\r\r!EventManager methodsFor: 'copying' stamp: 'reThink 3/3/2001 10:22'!\rcopy\r\r\t| answer |\r\tanswer := super copy.\r\tanswer release.\r\t^answer! !\r\r\r!EventManager methodsFor: 'accessing' stamp: 'reThink 2/18/2001 15:37'!\ractionMap\r\r    ^actionMap == nil\r        ifTrue: [self createActionMap]\r        ifFalse: [actionMap]! !\r\r!EventManager methodsFor: 'accessing' stamp: 'reThink 3/3/2001 10:07'!\rchangedEventSelector\r\r\t^#changed:! !\r\r!EventManager methodsFor: 'accessing' stamp: 'reThink 2/18/2001 15:39'!\rreleaseActionMap\r\r    actionMap := nil! !\r\r!EventManager methodsFor: 'accessing' stamp: 'reThink 3/3/2001 10:07'!\rupdateEventSelector\r\r\t^#update:! !\r\r!EventManager methodsFor: 'accessing' stamp: 'reThink 2/18/2001 15:38'!\rupdateableActionMap\r\r    actionMap == nil\r        ifTrue: [actionMap := self createActionMap].\r    ^actionMap! !\r\r\r!EventManager methodsFor: 'dependents access' stamp: 'reThink 3/3/2001 10:07'!\raddDependent: anObject\r\t\"Make the given object one of the receiver's dependents.\"\r\r\tself\r\t\twhen: self changedEventSelector\r\t\tsend: self updateEventSelector\r\t\tto: anObject.\r\t^anObject! !\r\r!EventManager methodsFor: 'dependents access' stamp: 'reThink 3/3/2001 10:07'!\rbreakDependents\r\t\"Remove all of the receiver's dependents.\"\r\r\tself removeActionsForEvent: self changedEventSelector! !\r\r!EventManager methodsFor: 'dependents access' stamp: 'reThink 3/3/2001 10:18'!\rdependents\r\r\t^(self actionSequenceForEvent: self changedEventSelector) asSet\r\t\tcollect:\r\t\t\t[:each | each receiver]! !\r\r!EventManager methodsFor: 'dependents access' stamp: 'reThink 3/3/2001 10:07'!\rremoveDependent: anObject\r\t\"Remove the given object as one of the receiver's dependents.\"\r\r\tself \r\t\tremoveActionsWithReceiver: anObject\r\t\tforEvent: self changedEventSelector.\r\t^ anObject! !\r\r\r!EventManager methodsFor: 'updating' stamp: 'reThink 3/3/2001 10:20'!\rchanged: aParameter \r\t\"Receiver changed. The change is denoted by the argument aParameter. \r\tUsually the argument is a Symbol that is part of the dependent's change \r\tprotocol. Inform all of the dependents.\"\r\r\tself \r\t\ttriggerEvent: self changedEventSelector\r\t\twith: aParameter! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rEventManager class\r\tinstanceVariableNames: ''!\r\r!EventManager class methodsFor: 'accessing' stamp: 'reThink 2/18/2001 14:42'!\ractionMapFor: anObject\r\r    ^self actionMaps\r        at: anObject\r        ifAbsent: [self createActionMap]! !\r\r!EventManager class methodsFor: 'accessing' stamp: 'rww 10/2/2001 07:20'!\ractionMaps\r\r\tActionMaps == nil\r\t\tifTrue: [ActionMaps := WeakIdentityKeyDictionary new].\r\t^ActionMaps! !\r\r!EventManager class methodsFor: 'accessing' stamp: 'reThink 2/25/2001 08:52'!\rupdateableActionMapFor: anObject\r\r    ^self actionMaps\r        at: anObject\r        ifAbsentPut: [self createActionMap]! !\r\r\r!EventManager class methodsFor: 'releasing' stamp: 'reThink 2/18/2001 15:34'!\rreleaseActionMapFor: anObject\r\r\tself actionMaps\r\t\tremoveKey: anObject\r\t\tifAbsent: []! !\r\r\r!EventManager class methodsFor: 'initialize-release' stamp: 'rw 2/10/2002 13:09'!\rflushEvents\r\t\"Object flushEvents\"\r\t| msgSet |\r\tself actionMaps keysAndValuesDo:[:rcvr :evtDict| rcvr ifNotNil:[\r\t\t\"make sure we don't modify evtDict while enumerating\"\r\t\tevtDict keys do:[:evtName|\r\t\t\tmsgSet _ evtDict at: evtName ifAbsent:[nil].\r\t\t\t(msgSet == nil) ifTrue:[rcvr removeActionsForEvent: evtName]]]].\r\tEventManager actionMaps finalizeValues. ! !\rInputSensor subclass: #EventSensor\r\tinstanceVariableNames: 'mouseButtons mousePosition keyboardBuffer interruptKey interruptSemaphore eventQueue inputSemaphore lastEventPoll hasInputSemaphore'\r\tclassVariableNames: 'EventPollPeriod EventTicklerProcess'\r\tpoolDictionaries: 'EventSensorConstants'\r\tcategory: 'Kernel-Processes'!\r!EventSensor commentStamp: 'nk 4/13/2004 11:18' prior: 0!\rEventSensor is a replacement for InputSensor based on a set of (optional) event primitives. An EventSensor updates its state when events are received so that all state based users of Sensor (e.g., Sensor keyboard, Sensor leftShiftDown, Sensor mouseButtons) will work exactly as before, by moving the current VM mechanisms into EventSensor itself. An optional input semaphore is part of the new design.\r\rFor platforms that support true asynchronous event notification, the semaphore will be signaled to indicate pending events.\rOn platforms that do not support asynchronous notifications about events, the UI will have to poll EventSensor periodically to read events from the VM.\r\rInstance variables:\r\tmouseButtons <Integer>\t- mouse button state as replacement for primMouseButtons\r\tmousePosition <Point>\t- mouse position as replacement for primMousePt\r\tkeyboardBuffer <SharedQueue>\t- keyboard input buffer\r\tinterruptKey <Integer>\t\t\t- currently defined interrupt key\r\tinterruptSemaphore <Semaphore>\t- the semaphore signaled when the interruptKey is detected\r\teventQueue <SharedQueue>\t- an optional event queue for event driven applications\r\tinputSemaphore <Semaphore>- the semaphore signaled by the VM if asynchronous event notification is supported\r\tlastEventPoll <Integer>\t\t- the last millisecondClockValue at which we called fetchMoreEvents\r\thasInputSemaphore <Boolean>\t- true if my inputSemaphore has actually been signaled at least once.\r\rClass variables:\r\tEventPollPeriod <Integer>\t- the number of milliseconds to wait between polling for more events in the userInterruptHandler.\r\tEventTicklerProcess <Process>\t- the process that makes sure that events are polled for often enough (at least every EventPollPeriod milliseconds).\r\rEvent format:\rThe current event format is very simple. Each event is recorded into an 8 element array. All events must provide some SmallInteger ID (the first field in the event buffer) and a time stamp (the second field in the event buffer), so that the difference between the time stamp of an event and the current time can be reported.\r\rCurrently, the following events are defined:\r\rNull event\r=============\rThe Null event is returned when the ST side asks for more events but no more events are available.\rStructure:\r[1]\t\t- event type 0\r[2-8]\t- unused\r\rMouse event structure\r==========================\rMouse events are generated when mouse input is detected.\rStructure:\r[1]\t- event type 1\r[2]\t- time stamp\r[3]\t- mouse x position\r[4]\t- mouse y position\r[5]\t- button state; bitfield with the following entries:\r\t\t1\t-\tyellow (e.g., right) button\r\t\t2\t-\tblue (e.g., middle) button\r\t\t4\t-\tred (e.g., left) button\r\t\t[all other bits are currently undefined]\r[6]\t- modifier keys; bitfield with the following entries:\r\t\t1\t-\tshift key\r\t\t2\t-\tctrl key\r\t\t4\t-\t(Mac specific) option key\r\t\t8\t-\tCmd/Alt key\r\t\t[all other bits are currently undefined]\r[7]\t- reserved.\r[8]\t- reserved.\r\rKeyboard events\r====================\rKeyboard events are generated when keyboard input is detected.\r[1]\t- event type 2\r[2]\t- time stamp\r[3]\t- character code\r\t\tFor now the character code is in Mac Roman encoding.\r[4]\t- press state; integer with the following meaning\r\t\t0\t-\tcharacter\r\t\t1\t-\tkey press (down)\r\t\t2\t- \tkey release (up)\r[5]\t- modifier keys (same as in mouse events)\r[6]\t- reserved.\r[7]\t- reserved.\r[8]\t- reserved.\r!\r\r\r!EventSensor methodsFor: 'accessing' stamp: 'ar 7/23/2000 14:37'!\reventQueue\r\t\"Return the current event queue\"\r\t^eventQueue! !\r\r!EventSensor methodsFor: 'accessing' stamp: 'nk 4/12/2004 19:36'!\reventTicklerProcess\r\t\"Answer my event tickler process, if any\"\r\t^EventTicklerProcess! !\r\r!EventSensor methodsFor: 'accessing' stamp: 'ar 2/6/2004 14:48'!\rflushAllButDandDEvents\r\t| newQueue oldQueue  |\r\t\r\tnewQueue _ SharedQueue new.\r\tself eventQueue ifNil: \r\t\t[eventQueue := newQueue.\r\t\t^self].\r\toldQueue _ self eventQueue.\r\t[oldQueue size > 0] whileTrue: \r\t\t[| item type | \r\t\titem _ oldQueue next.\r\t\ttype _ item at: 1.\r\t\ttype = EventTypeDragDropFiles ifTrue: [ newQueue nextPut: item]].\r\teventQueue := newQueue.\r! !\r\r!EventSensor methodsFor: 'accessing' stamp: 'ar 2/7/2001 17:13'!\rflushEvents\r\teventQueue ifNotNil:[eventQueue flush].! !\r\r\r!EventSensor methodsFor: 'initialize' stamp: 'nk 4/12/2004 19:21'!\rinitialize\r\t\"Initialize the receiver\"\r\tmouseButtons := 0.\r\tmousePosition := 0 @ 0.\r\tkeyboardBuffer := SharedQueue new.\r\tself setInterruptKey: (interruptKey ifNil: [$. asciiValue bitOr: 16r0800 ]). \t\"cmd-.\"\r\tinterruptSemaphore := (Smalltalk specialObjectsArray at: 31) ifNil: [Semaphore new].\r\tself flushAllButDandDEvents.\r\tinputSemaphore := Semaphore new.\r\thasInputSemaphore := false.! !\r\r!EventSensor methodsFor: 'initialize' stamp: 'nk 4/12/2004 20:13'!\rshutDown\r\tsuper shutDown.\r\tEventTicklerProcess ifNotNil: [\r\t\tEventTicklerProcess terminate.\r\t\tEventTicklerProcess _ nil. ].\r\tinputSemaphore ifNotNil:[Smalltalk unregisterExternalObject: inputSemaphore].\r! !\r\r!EventSensor methodsFor: 'initialize' stamp: 'BG 8/18/2004 12:12'!\rstartUp\r\t\"Run the I/O process\"\r\tself initialize.\r\tself primSetInputSemaphore: (Smalltalk registerExternalObject: inputSemaphore).\r\tsuper startUp.\r\tself installEventTickler.\r\t\" Smalltalk isMorphic ifTrue:[self flushAllButDandDEvents]. \"\r\r\t\"Attempt to discover whether the input semaphore is actually being signaled.\"\r\thasInputSemaphore := false.\r\tinputSemaphore initSignals.\r! !\r\r\r!EventSensor methodsFor: 'mouse' stamp: 'ar 5/18/2003 18:27'!\rcreateMouseEvent\r\t\"create and return a new mouse event from the current mouse \r\tposition; this is useful for restarting normal event queue \r\tprocessing after manual polling\"\r\r\t| buttons modifiers pos mapped eventBuffer |\r\teventBuffer _ Array new: 8.\r\tbuttons _ self primMouseButtons.\r\tpos _ self primMousePt.\r\tmodifiers _ buttons bitShift: -3.\r\tbuttons _ buttons bitAnd: 7.\r\tmapped _ self mapButtons: buttons modifiers: modifiers.\r\teventBuffer\r\t\tat: 1\r\t\tput: EventTypeMouse;\r\t\t at: 2 put: Time millisecondClockValue;\r\t\t at: 3 put: pos x;\r\t\t at: 4 put: pos y;\r\t\t at: 5 put: mapped;\r\t\t at: 6 put: modifiers.\r\t^ eventBuffer! !\r\r\r!EventSensor methodsFor: 'private' stamp: 'nk 4/12/2004 20:16'!\reventTickler\r\t\"Poll infrequently to make sure that the UI process is not been stuck. \r\tIf it has been stuck, then spin the event loop so that I can detect the \r\tinterrupt key.\"\r\t| delay |\r\tdelay := Delay forMilliseconds: self class eventPollPeriod.\r\tself lastEventPoll.\t\"ensure not nil.\"\r\t[| delta | \r\t[ delay wait.\r\tdelta := Time millisecondClockValue - lastEventPoll.\r\t(delta < 0\r\t\t\tor: [delta > self class eventPollPeriod])\r\t\tifTrue: [\"force check on rollover\"\r\t\t\tself fetchMoreEvents]] on: Error do: [:ex | ].\r\ttrue ] whileTrue.! !\r\r!EventSensor methodsFor: 'private' stamp: 'di 10/1/2001 20:52'!\rflushNonKbdEvents\r\teventQueue ifNil: [^ self].\r\teventQueue flushAllSuchThat:\r\t\t[:buf | (self isKbdEvent: buf) not]\r! !\r\r!EventSensor methodsFor: 'private' stamp: 'nk 6/21/2004 10:40'!\rinstallEventTickler\r\t\"Initialize the interrupt watcher process. Terminate the old process if any.\"\r\t\"Sensor installEventTickler\"\r\r\tEventTicklerProcess ifNotNil: [EventTicklerProcess terminate].\r\tEventTicklerProcess _ [self eventTickler] forkAt: Processor lowIOPriority.\r! !\r\r!EventSensor methodsFor: 'private' stamp: 'di 10/1/2001 20:51'!\risKbdEvent: buf\r\t^ (buf at: 1) = EventTypeKeyboard and: [(buf at: 4) = EventKeyChar]! !\r\r!EventSensor methodsFor: 'private' stamp: 'nk 3/18/2004 13:21'!\rlastEventPoll\r\t\"Answer the last clock value at which fetchMoreEvents was called.\"\r\t^lastEventPoll ifNil: [ lastEventPoll _ Time millisecondClockValue ]! !\r\r!EventSensor methodsFor: 'private' stamp: 'ar 7/23/2000 00:34'!\rprimInterruptSemaphore: aSemaphore \r\t\"Primitive. Install the argument as the semaphore to be signalled whenever the user presses the interrupt key. The semaphore will be signaled once each time the interrupt key is pressed.\"\r\tinterruptSemaphore _ aSemaphore.\r\t\"backward compatibility: use the old primitive which is obsolete now\"\r\tsuper primInterruptSemaphore: aSemaphore! !\r\r!EventSensor methodsFor: 'private' stamp: 'ar 2/6/2004 14:41'!\rprimKbdNext\r\t\"Allows for use of old Sensor protocol to get at the keyboard,\r\tas when running kbdTest or the InterpreterSimulator in Morphic\"\r\t| evtBuf |\r\tself fetchMoreEvents.\r\tkeyboardBuffer isEmpty ifFalse:[^ keyboardBuffer next].\r\teventQueue ifNotNil:\r\t\t[evtBuf _ eventQueue nextOrNilSuchThat: [:buf | self isKbdEvent: buf].\r\t\tself flushNonKbdEvents].\r\t^ evtBuf ifNotNil: [evtBuf at: 3]\r! !\r\r!EventSensor methodsFor: 'private' stamp: 'ar 2/6/2004 14:41'!\rprimKbdPeek\r\t\"Allows for use of old Sensor protocol to get at the keyboard,\r\tas when running kbdTest or the InterpreterSimulator in Morphic\"\r\t| char |\r\tself fetchMoreEvents.\r\tkeyboardBuffer isEmpty ifFalse: [^ keyboardBuffer peek].\r\tchar _ nil.\r\teventQueue ifNotNil:\r\t\t[eventQueue nextOrNilSuchThat:  \"NOTE: must not return out of this block, so loop to end\"\r\t\t\t[:buf | (self isKbdEvent: buf) ifTrue: [char ifNil: [char _ buf at: 3]].\r\t\t\tfalse  \"NOTE: block value must be false so Queue won't advance\"]].\r\t^ char! !\r\r!EventSensor methodsFor: 'private' stamp: 'ar 2/6/2004 14:42'!\rprimMouseButtons\r\tself fetchMoreEvents.\r\tself flushNonKbdEvents.\r\t^ mouseButtons! !\r\r!EventSensor methodsFor: 'private' stamp: 'ar 2/6/2004 14:41'!\rprimMousePt\r\tself fetchMoreEvents.\r\tself flushNonKbdEvents.\r\t^ mousePosition! !\r\r!EventSensor methodsFor: 'private' stamp: 'ls 10/23/2000 14:14'!\rprimSetInterruptKey: anInteger\r\t\"Primitive. Register the given keycode as the user interrupt key. The low byte of the keycode is the ISO character and its next four bits are the Smalltalk modifer bits <cmd><opt><ctrl><shift>.\"\r\tinterruptKey _ anInteger.\r\t\"backward compatibility: use the old primitive which is obsolete now\"\r\tsuper primSetInterruptKey: anInteger! !\r\r\r!EventSensor methodsFor: 'private-I/O' stamp: 'nk 4/12/2004 20:01'!\rfetchMoreEvents\r\t\"Fetch more events from the VM\"\r\t| eventBuffer type |\r\r\t\"Reset input semaphore so clients can wait for the next events after this one.\"\r\tinputSemaphore isSignaled\r\t\tifTrue: [ hasInputSemaphore _ true.\r\t\t\tinputSemaphore initSignals ].\r\r\t\"Remember the last time that I checked for events.\"\r\tlastEventPoll := Time millisecondClockValue.\r\r\teventBuffer := Array new: 8.\r\t[self primGetNextEvent: eventBuffer.\r\ttype := eventBuffer at: 1.\r\ttype = EventTypeNone]\r\t\twhileFalse: [self processEvent: eventBuffer].\r! !\r\r!EventSensor methodsFor: 'private-I/O' stamp: 'ar 7/30/2000 18:12'!\rmapButtons: buttons modifiers: modifiers\r\t\"Map the buttons to yellow or blue based on the given modifiers.\r\tIf only the red button is pressed, then map\r\t\tCtrl-RedButton -> BlueButton.\r\t\tCmd-RedButton -> YellowButton.\r\t\"\r\t(buttons = RedButtonBit)\r\t\tifFalse:[^buttons].\r\t(modifiers allMask: CtrlKeyBit) \r\t\tifTrue:[^BlueButtonBit].\r\t(modifiers allMask: CommandKeyBit) \r\t\tifTrue:[^YellowButtonBit].\r\t^buttons! !\r\r!EventSensor methodsFor: 'private-I/O' stamp: 'ar 8/16/2000 22:06'!\rprimGetNextEvent: array\r\t\"Store the next OS event available into the provided array.\r\tEssential. If the VM is not event driven the ST code will fall\r\tback to the old-style mechanism and use the state based\r\tprimitives instead.\"\r\t| kbd buttons modifiers pos mapped |\r\t<primitive: 94>\r\t\"Simulate the events\"\r\tarray at: 1 put: EventTypeNone. \"assume no more events\"\r\r\t\"First check for keyboard\"\r\tkbd _ super primKbdNext.\r\tkbd = nil ifFalse:[\r\t\t\"simulate keyboard event\"\r\t\tarray at: 1 put: EventTypeKeyboard. \"evt type\"\r\t\tarray at: 2 put: Time millisecondClockValue. \"time stamp\"\r\t\tarray at: 3 put: (kbd bitAnd: 255). \"char code\"\r\t\tarray at: 4 put: EventKeyChar. \"key press/release\"\r\t\tarray at: 5 put: (kbd bitShift: -8). \"modifier keys\"\r\t\t^self].\r\r\t\"Then check for mouse\"\r\tbuttons _ super primMouseButtons.\r\tpos _ super primMousePt.\r\tmodifiers _ buttons bitShift: -3.\r\tbuttons _ buttons bitAnd: 7.\r\tmapped _ self mapButtons: buttons modifiers: modifiers.\r\t(pos = mousePosition and:[(mapped bitOr: (modifiers bitShift: 3)) = mouseButtons])\r\t\tifTrue:[^self].\r\tarray \r\t\tat: 1 put: EventTypeMouse;\r\t\tat: 2 put: Time millisecondClockValue;\r\t\tat: 3 put: pos x;\r\t\tat: 4 put: pos y;\r\t\tat: 5 put: mapped;\r\t\tat: 6 put: modifiers.\r! !\r\r!EventSensor methodsFor: 'private-I/O' stamp: 'ar 7/30/2000 18:16'!\rprimSetInputSemaphore: semaIndex\r\t\"Set the input semaphore the VM should use for asynchronously signaling the availability of events. Primitive. Optional.\"\r\t<primitive: 93>\r\t^nil! !\r\r!EventSensor methodsFor: 'private-I/O' stamp: 'nk 2/11/2002 12:18'!\rprocessEvent: evt\r\t\"Process a single event. This method is run at high priority.\"\r\t| type |\r\ttype _ evt at: 1.\r\r\t\"Check if the event is a user interrupt\"\r\t(type = EventTypeKeyboard and:[(evt at: 4) = 0 and:[\r\t\t((evt at: 3) bitOr: ((evt at: 5) bitShift: 8)) = interruptKey]])\r\t\t\t ifTrue:[\"interrupt key is meta - not reported as event\"\r\t\t\t\t\t^interruptSemaphore signal].\r\r\t\"Store the event in the queue if there's any\"\r\ttype = EventTypeMouse ifTrue:\r\t\t[evt at: 5 put: (ButtonDecodeTable at: (evt at: 5) + 1)].\r\r\ttype = EventTypeKeyboard ifTrue:\r\t\t[\"swap ctrl/alt keys\"\r\t\tKeyDecodeTable at: { evt at: 3 . evt at: 5 } ifPresent: [:a |\r\t\t\tevt at: 3 put: a first;\r\t\t\t\tat: 5 put: a second]].\r\r\tself queueEvent: evt.\r\r\t\"Update state for InputSensor.\"\r\tEventTypeMouse = type ifTrue:[self processMouseEvent: evt].\r\tEventTypeKeyboard = type ifTrue:[self processKeyboardEvent: evt]! !\r\r!EventSensor methodsFor: 'private-I/O' stamp: 'nk 4/11/2001 18:28'!\rprocessKeyboardEvent: evt\r\t\"process a keyboard event, updating InputSensor state\"\r\t| charCode pressCode |\r\t\"Never update keyboardBuffer if we have an eventQueue active\"\r\tmouseButtons _ (mouseButtons bitAnd: 7) bitOr: ((evt at: 5) bitShift: 3).\r\teventQueue ifNotNil:[^self]. \r\tcharCode _ evt at: 3.\r\tcharCode = nil ifTrue:[^self]. \"extra characters not handled in MVC\"\r\tpressCode _ evt at: 4.\r\tpressCode = EventKeyChar ifFalse:[^self]. \"key down/up not handled in MVC\"\r\t\"mix in modifiers\"\r\tcharCode _ charCode bitOr: ((evt at: 5) bitShift: 8).\r\tkeyboardBuffer nextPut: charCode.! !\r\r!EventSensor methodsFor: 'private-I/O' stamp: 'ar 8/16/2000 22:07'!\rprocessMouseEvent: evt\r\t\"process a mouse event, updating InputSensor state\"\r\t| modifiers buttons mapped |\r\tmousePosition _ (evt at: 3) @ (evt at: 4).\r\tbuttons _ evt at: 5.\r\tmodifiers _ evt at: 6.\r\tmapped _ self mapButtons: buttons modifiers: modifiers.\r\tmouseButtons _ mapped bitOr: (modifiers bitShift: 3).! !\r\r!EventSensor methodsFor: 'private-I/O' stamp: 'ar 7/23/2000 14:55'!\rqueueEvent: evt\r\t\"Queue the given event in the event queue (if any).\r\tNote that the event buffer must be copied since it\r\twill be reused later on.\"\r\teventQueue ifNil:[^self].\r\teventQueue nextPut: evt clone.! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rEventSensor class\r\tinstanceVariableNames: ''!\r\r!EventSensor class methodsFor: 'class initialization' stamp: 'nk 4/12/2004 18:55'!\reventPollPeriod\r\t^EventPollPeriod ifNil: [ EventPollPeriod _ 500 ].! !\r\r!EventSensor class methodsFor: 'class initialization' stamp: 'ar 7/23/2000 15:06'!\rinstall\t\"EventSensor install\"\r\t\"Install an EventSensor in place of the current Sensor.\"\r\t| newSensor |\r\tSensor shutDown.\r\tnewSensor _ self new.\r\tnewSensor startUp.\r\t\"Note: We must use #become: here to replace all references to the old sensor with the new one, since Sensor is referenced from all the existing controllers.\"\r\tSensor becomeForward: newSensor. \"done\"! !\rSharedPool subclass: #EventSensorConstants\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'BlueButtonBit CommandKeyBit CtrlKeyBit EventKeyChar EventKeyDown EventKeyUp EventTypeDragDropFiles EventTypeKeyboard EventTypeMouse EventTypeNone OptionKeyBit RedButtonBit ShiftKeyBit YellowButtonBit'\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Processes'!\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rEventSensorConstants class\r\tinstanceVariableNames: ''!\r\r!EventSensorConstants class methodsFor: 'pool initialization' stamp: 'ar 5/18/2003 18:26'!\rinitialize\r\t\"EventSensorConstants initialize\"\r\tRedButtonBit := 4.\r\tBlueButtonBit := 2.\r\tYellowButtonBit := 1.\r\r\tShiftKeyBit := 1.\r\tCtrlKeyBit := 2.\r\tOptionKeyBit := 4.\r\tCommandKeyBit := 8.\r\r\t\"Types of events\"\r\tEventTypeNone := 0.\r\tEventTypeMouse := 1.\r\tEventTypeKeyboard := 2.\r\tEventTypeDragDropFiles := 3.\r\r\t\"Press codes for keyboard events\"\r\tEventKeyChar := 0.\r\tEventKeyDown := 1.\r\tEventKeyUp := 2.\r! !\rObject subclass: #Exception\r\tinstanceVariableNames: 'messageText tag signalContext handlerContext outerContext'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Exceptions Kernel'!\r!Exception commentStamp: '<historical>' prior: 0!\rThis is the main class used to implement the exception handling system (EHS).  It plays two distinct roles:  that of the exception, and that of the exception handler.  More specifically, it implements the bulk of the protocols laid out in the ANSI specification - those protocol names are reflected in the message categories.\r\rException is an abstract class.  Instances should neither be created nor trapped.  In most cases, subclasses should inherit from Error or Notification rather than directly from Exception.\r\rIn implementing this EHS, The Fourth Estate Inc. incorporated some ideas and code from Craig Latta's EHS.  His insights were crucial in allowing us to implement BlockContext>>valueUninterruptably (and by extension, #ensure: and #ifCurtailed:), and we imported the following methods with little or no modification:\r\rContextPart>>terminateTo:\rContextPart>>terminate\rMethodContext>>receiver:\rMethodContext>>answer:\r\rThanks, Craig!!!\r\r\r!Exception methodsFor: 'handling' stamp: 'ajh 2/1/2003 01:33'!\rpass\r\t\"Yield control to the enclosing exception action for the receiver.\"\r\r\thandlerContext nextHandlerContext handleSignal: self! !\r\r!Exception methodsFor: 'handling' stamp: 'ajh 1/13/2002 15:09'!\rresume\r\t\"Return from the message that signaled the receiver.\"\r\r\tself resume: nil! !\r\r!Exception methodsFor: 'handling' stamp: 'ajh 1/13/2002 15:14'!\rresume: resumptionValue\r\t\"Return resumptionValue as the value of the signal message.\"\r\r\tself isResumable ifFalse: [IllegalResumeAttempt signal].\r\tself resumeUnchecked: resumptionValue! !\r\r!Exception methodsFor: 'handling' stamp: 'ajh 6/27/2003 22:30'!\rresumeUnchecked: resumptionValue\r\t\"Return resumptionValue as the value of #signal, unless this was called after an #outer message, then return resumptionValue as the value of #outer.\"\r\r\t| ctxt |\r\touterContext ifNil: [\r\t\tsignalContext return: resumptionValue\r\t] ifNotNil: [\r\t\tctxt _ outerContext.\r\t\touterContext _ ctxt tempAt: 1. \"prevOuterContext in #outer\"\r\t\tctxt return: resumptionValue\r\t].\r! !\r\r!Exception methodsFor: 'handling' stamp: 'ajh 9/30/2001 15:33'!\rreturn\r\t\"Return nil as the value of the block protected by the active exception handler.\"\r\r\tself return: nil! !\r\r!Exception methodsFor: 'handling' stamp: 'ajh 1/29/2003 13:37'!\rreturn: returnValue\r\t\"Return the argument as the value of the block protected by the active exception handler.\"\r\r\thandlerContext return: returnValue! !\r\r\r!Exception methodsFor: 'printing' stamp: 'pnm 8/16/2000 14:53'!\rdescription\r\t\"Return a textual description of the exception.\"\r\r\t| desc mt |\r\tdesc := self class name asString.\r\t^(mt := self messageText) == nil\r\t\tifTrue: [desc]\r\t\tifFalse: [desc, ': ', mt]! !\r\r!Exception methodsFor: 'printing' stamp: 'ajh 9/30/2001 15:33'!\rmessageText\r\t\"Return an exception's message text.\"\r\r\t^messageText! !\r\r!Exception methodsFor: 'printing' stamp: 'ajh 9/30/2001 15:33'!\rprintOn: stream\r\r\tstream nextPutAll: self description! !\r\r!Exception methodsFor: 'printing' stamp: 'ajh 10/22/2001 14:24'!\rreceiver\r\r\t^ self signalerContext receiver! !\r\r!Exception methodsFor: 'printing' stamp: 'ar 6/28/2003 00:13'!\rsignalerContext\r\t\"Find the first sender of signal(:)\"\r\r\t^ signalContext findContextSuchThat: [:ctxt |\r\t\t(ctxt receiver == self or: [ctxt receiver == self class]) not]! !\r\r\r!Exception methodsFor: 'signaling' stamp: 'ajh 9/30/2001 15:33'!\rmessageText: signalerText\r\t\"Set an exception's message text.\"\r\r\tmessageText := signalerText! !\r\r!Exception methodsFor: 'signaling' stamp: 'ajh 2/1/2003 01:33'!\rsignal\r\t\"Ask ContextHandlers in the sender chain to handle this signal.  The default is to execute and return my defaultAction.\"\r\r\tsignalContext _ thisContext contextTag.\r\t^ thisContext nextHandlerContext handleSignal: self! !\r\r!Exception methodsFor: 'signaling' stamp: 'ajh 9/30/2001 20:13'!\rsignal: signalerText\r\t\"Signal the occurrence of an exceptional condition with a specified textual description.\"\r\r\tself messageText: signalerText.\r\t^ self signal! !\r\r\r!Exception methodsFor: 'priv handling' stamp: 'ajh 9/30/2001 15:33'!\rdefaultAction\r\t\"The default action taken if the exception is signaled.\"\r\r\tself subclassResponsibility! !\r\r!Exception methodsFor: 'priv handling' stamp: 'ajh 2/1/2003 00:58'!\risResumable\r\t\"Determine whether an exception is resumable.\"\r\r\t^ true! !\r\r!Exception methodsFor: 'priv handling' stamp: 'ajh 1/29/2003 13:44'!\rprivHandlerContext: aContextTag\r\r\thandlerContext _ aContextTag! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rException class\r\tinstanceVariableNames: ''!\r\r!Exception class methodsFor: 'exceptionInstantiator' stamp: 'ajh 9/30/2001 21:54'!\rsignal\r\t\"Signal the occurrence of an exceptional condition.\"\r\r\t^ self new signal! !\r\r!Exception class methodsFor: 'exceptionInstantiator' stamp: 'ajh 9/30/2001 21:54'!\rsignal: signalerText\r\t\"Signal the occurrence of an exceptional condition with a specified textual description.\"\r\r\t^ self new signal: signalerText! !\r\r\r!Exception class methodsFor: 'exceptionSelector' stamp: 'ajh 9/30/2001 15:33'!\r, anotherException\r\t\"Create an exception set.\"\r\r\t^ExceptionSet new\r\t\tadd: self;\r\t\tadd: anotherException;\r\t\tyourself! !\r\r!Exception class methodsFor: 'exceptionSelector' stamp: 'ajh 8/5/2003 11:33'!\rhandles: exception\r\t\"Determine whether an exception handler will accept a signaled exception.\"\r\r\t^ exception isKindOf: self! !\rObject subclass: #ExceptionSet\r\tinstanceVariableNames: 'exceptions'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Exceptions Kernel'!\r!ExceptionSet commentStamp: '<historical>' prior: 0!\rAn ExceptionSet is a grouping of exception handlers which acts as a single handler.  Within the group, the most recently added handler will be the last handler found during a handler search (in the case where more than one handler in the group is capable of handling a given exception). !\r\r\r!ExceptionSet methodsFor: 'private' stamp: 'tfei 7/16/1999 1:07'!\radd: anException\r\r\texceptions add: anException! !\r\r!ExceptionSet methodsFor: 'private' stamp: 'tfei 3/23/1999 14:07'!\rinitialize\r\r\texceptions := OrderedCollection new! !\r\r\r!ExceptionSet methodsFor: 'exceptionSelector' stamp: 'tfei 6/4/1999 18:37'!\r, anException\r\t\"Return an exception set that contains the receiver and the argument exception. This is commonly used to specify a set of exception selectors for an exception handler.\"\r\r\tself add: anException.\r\t^self! !\r\r!ExceptionSet methodsFor: 'exceptionSelector' stamp: 'pnm 8/16/2000 15:15'!\rhandles: anException\r\t\"Determine whether an exception handler will accept a signaled exception.\"\r\r\texceptions do:\r\t\t[:ex |\r\t\t(ex handles: anException)\r\t\t\tifTrue: [^true]].\r\t^false! !\rObject subclass: #ExternalSemaphoreTable\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'ProtectTable'\r\tpoolDictionaries: ''\r\tcategory: 'System-Support'!\r!ExternalSemaphoreTable commentStamp: '<historical>' prior: 0!\rBy John M McIntosh johnmci@smalltalkconsulting.com\rThis class was written to mange the external semaphore table. When I was writing a Socket test server I discovered various race conditions on the access to the externalSemaphore table. This new class uses class side methods to restrict access using a mutex semaphore. It seemed cleaner to deligate the reponsibility here versus adding more code and another class variable to SystemDictionary \r\rNote that in Smalltalk recreateSpecialObjectsArray we still directly play with the table.!\r\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rExternalSemaphoreTable class\r\tinstanceVariableNames: ''!\r\r!ExternalSemaphoreTable class methodsFor: 'accessing' stamp: 'JMM 6/6/2000 20:36'!\rclearExternalObjects\r\t\"Clear the array of objects that have been registered for use in non-Smalltalk code.\"\r\r\tProtectTable critical: [Smalltalk specialObjectsArray at: 39 put: Array new].\r! !\r\r!ExternalSemaphoreTable class methodsFor: 'accessing' stamp: 'JMM 6/6/2000 20:44'!\rregisterExternalObject: anObject\r\t^ ProtectTable critical: [self safelyRegisterExternalObject: anObject]\r! !\r\r!ExternalSemaphoreTable class methodsFor: 'accessing' stamp: 'JMM 6/6/2000 20:57'!\rsafelyRegisterExternalObject: anObject\r\t\"Register the given object in the external objects array and return its index. If it is already there, just return its index.\"\r\r\t| objects firstEmptyIndex obj sz newObjects |\r\tobjects _ Smalltalk specialObjectsArray at: 39.\r\r\t\"find the first empty slot\"\r\tfirstEmptyIndex _ 0.\r\t1 to: objects size do: [:i |\r\t\tobj _ objects at: i.\r\t\tobj == anObject ifTrue: [^ i].  \"object already there, just return its index\"\r\t\t(obj == nil and: [firstEmptyIndex = 0]) ifTrue: [firstEmptyIndex _ i]].\r\r\t\"if no empty slots, expand the array\"\r\tfirstEmptyIndex = 0 ifTrue: [\r\t\tsz _ objects size.\r\t\tnewObjects _ objects species new: sz + 20.  \"grow linearly\"\r\t\tnewObjects replaceFrom: 1 to: sz with: objects startingAt: 1.\r\t\tfirstEmptyIndex _ sz + 1.\r\t\tSmalltalk specialObjectsArray at: 39 put: newObjects.\r\t\tobjects _ newObjects].\r\r\tobjects at: firstEmptyIndex put: anObject.\r\t^ firstEmptyIndex\r! !\r\r!ExternalSemaphoreTable class methodsFor: 'accessing' stamp: 'JMM 6/6/2000 20:59'!\rsafelyUnregisterExternalObject: anObject\r\t\"Unregister the given object in the external objects array. Do nothing if it isn't registered.\r\tJMM change to return if we clear the element, since it should only appear once in the array\"\r\r\t| objects |\r\tanObject ifNil: [^ self].\r\tobjects _ Smalltalk specialObjectsArray at: 39.\r\t1 to: objects size do: [:i |\r\t\t(objects at: i) == anObject ifTrue: \r\t\t[objects at: i put: nil.\r\t\t^self]].\r! !\r\r!ExternalSemaphoreTable class methodsFor: 'accessing' stamp: 'JMM 6/6/2000 20:45'!\runregisterExternalObject: anObject\r\tProtectTable critical: [self safelyUnregisterExternalObject: anObject]\r! !\r\r\r!ExternalSemaphoreTable class methodsFor: 'initialize' stamp: 'JMM 6/6/2000 20:32'!\rinitialize\r\tProtectTable _ Semaphore forMutualExclusion! !\rObject subclass: #FakeClassPool\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Browser'!\r!FakeClassPool commentStamp: '<historical>' prior: 0!\rThe sole purpose of this class is to allow the Browser code pane to evaluate the class variables of the class whose method it is showing.  It does this by stuffing a pointer to the classpool dictionary of the class being shown into its own classpool.  It does this just around a doIt in the code pane.  An instance of FakeClasspool is then used as the receiver of the doIt.!\r\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rFakeClassPool class\r\tinstanceVariableNames: ''!\r\r!FakeClassPool class methodsFor: 'as yet unclassified' stamp: 'di 5/10/1998 21:32'!\radopt: classOrNil\r\t\"Temporarily use the classPool and sharedPools of another class\"\r\tclassOrNil == nil\r\t\tifTrue: [classPool _ nil.\r\t\t\t\tsharedPools _ nil]\r\t\tifFalse: [classPool _ classOrNil classPool.\r\t\t\t\tsharedPools _ classOrNil sharedPools]\r! !\rBoolean subclass: #False\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Objects'!\r!False commentStamp: '<historical>' prior: 0!\rFalse defines the behavior of its single instance, false -- logical negation. Notice how the truth-value checks become direct message sends, without the need for explicit testing.\r\rBe aware however that most of these methods are not sent as real messages in normal use. Most are inline coded by the compiler as test and jump bytecodes - avoiding the overhead of the full message sends. So simply redefining these methods here will have no effect.!\r\r\r!False methodsFor: 'logical operations'!\r& alternativeObject \r\t\"Evaluating conjunction -- answer false since receiver is false.\"\r\r\t^self! !\r\r!False methodsFor: 'logical operations'!\rnot\r\t\"Negation -- answer true since the receiver is false.\"\r\r\t^true! !\r\r!False methodsFor: 'logical operations'!\r| aBoolean \r\t\"Evaluating disjunction (OR) -- answer with the argument, aBoolean.\"\r\r\t^aBoolean! !\r\r\r!False methodsFor: 'controlling'!\rand: alternativeBlock \r\t\"Nonevaluating conjunction -- answer with false since the receiver is false.\"\r\r\t^self! !\r\r!False methodsFor: 'controlling'!\rifFalse: alternativeBlock \r\t\"Answer the value of alternativeBlock. Execution does not actually\r\treach here because the expression is compiled in-line.\"\r\r\t^alternativeBlock value! !\r\r!False methodsFor: 'controlling'!\rifFalse: falseAlternativeBlock ifTrue: trueAlternativeBlock \r\t\"Answer the value of falseAlternativeBlock. Execution does not\r\tactually reach here because the expression is compiled in-line.\"\r\r\t^falseAlternativeBlock value! !\r\r!False methodsFor: 'controlling'!\rifTrue: alternativeBlock \r\t\"Since the condition is false, answer the value of the false alternative, \r\twhich is nil. Execution does not actually reach here because the\r\texpression is compiled in-line.\"\r\r\t^nil! !\r\r!False methodsFor: 'controlling'!\rifTrue: trueAlternativeBlock ifFalse: falseAlternativeBlock \r\t\"Answer the value of falseAlternativeBlock. Execution does not\r\tactually reach here because the expression is compiled in-line.\"\r\r\t^falseAlternativeBlock value! !\r\r!False methodsFor: 'controlling'!\ror: alternativeBlock \r\t\"Nonevaluating disjunction -- answer value of alternativeBlock.\"\r\r\t^alternativeBlock value! !\r\r\r!False methodsFor: 'printing'!\rprintOn: aStream \r\r\taStream nextPutAll: 'false'! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rFalse class\r\tinstanceVariableNames: ''!\r\r!False class methodsFor: 'as yet unclassified' stamp: 'sw 5/8/2000 11:09'!\rinitializedInstance\r\t^ false! !\rBrowser subclass: #FileContentsBrowser\r\tinstanceVariableNames: 'packages infoString'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-File Contents Browser'!\r!FileContentsBrowser commentStamp: '<historical>' prior: 0!\rI am a class browser view on a fileout (either a source file (.st) or change set (.cs)). I do not actually load the code into to the system, nor do I alter the classes in the image. Use me to vet code in a comfortable way before loading it into your image.\r\rFrom a FileList, I can be invoked by selecting a source file and selecting the \"browse code\" menu item from the yellow button menu.\r\rI use PseudoClass, PseudoClassOrganizers, and PseudoMetaclass to model the class structure of the source file.!\r\r\r!FileContentsBrowser methodsFor: 'accessing'!\rcontents\r\tself updateInfoView.\r\t(editSelection == #newClass and:[self selectedPackage notNil])\r\t\tifTrue: [^self selectedPackage packageInfo].\r\teditSelection == #editClass\r\t\tifTrue:[^self modifiedClassDefinition].\r\t^super contents! !\r\r!FileContentsBrowser methodsFor: 'accessing' stamp: 'sw 5/23/2001 14:28'!\rcontents: input notifying: aController \r\t\"The retrieved information has changed and its source must now be \r\tupdated. The information can be a variety of things, depending on the \r\tlist selections (such as templates for class or message definition, methods) \r\tor the user menu commands (such as definition, comment, hierarchy). \r\tAnswer the result of updating the source.\"\r\r\t| aString aText theClass |\r\taString _ input asString.\r\taText _ input asText.\r\r\teditSelection == #editComment \r\t\tifTrue: [theClass _ self selectedClass.\r\t\t\t\ttheClass ifNil: [self inform: 'You must select a class\rbefore giving it a comment.'.\r\t\t\t\t^ false].\r\t\t\t\ttheClass comment: aText. ^ true].\r\teditSelection == #editMessageCategories \r\t\tifTrue: [^ self changeMessageCategories: aString].\r\r\tself inform:'You cannot change the current selection'.\r\t^false\r! !\r\r!FileContentsBrowser methodsFor: 'accessing'!\rpackages\r\t^packages! !\r\r!FileContentsBrowser methodsFor: 'accessing'!\rpackages: aDictionary\r\tpackages := aDictionary.! !\r\r!FileContentsBrowser methodsFor: 'accessing'!\rselectedPackage\r\t| cat |\r\tcat := self selectedSystemCategoryName.\r\tcat isNil ifTrue:[^nil].\r\t^self packages at: cat asString ifAbsent:[nil]! !\r\r\r!FileContentsBrowser methodsFor: 'removing' stamp: 'wod 5/24/1998 20:37'!\rremoveClass\r\t| class |\r\tclassListIndex = 0 ifTrue: [^ self].\r\tclass _ self selectedClass.\r\t(self confirm:'Are you certain that you\rwant to delete the class ', class name, '?') ifFalse:[^self].\r\tself selectedPackage removeClass: class.\r\tself classListIndex: 0.\r\tself changed: #classList.! !\r\r!FileContentsBrowser methodsFor: 'removing' stamp: 'ar 8/2/2003 21:00'!\rremoveMessage\r\t| messageName |\r\tmessageListIndex = 0\r\t\tifTrue: [^ self].\r\tself okToChange\r\t\tifFalse: [^ self].\r\tmessageName _ self selectedMessageName.\r\t(self selectedClass confirmRemovalOf: messageName)\r\t\tifFalse: [^ false].\r\tself selectedClassOrMetaClass removeMethod: self selectedMessageName.\r\tself messageListIndex: 0.\r\tself setClassOrganizer.\r\t\"In case organization not cached\"\r\tself changed: #messageList! !\r\r!FileContentsBrowser methodsFor: 'removing' stamp: 'wod 5/24/1998 20:51'!\rremoveMessageCategory\r\t\"If a message category is selected, create a Confirmer so the user can \r\tverify that the currently selected message category should be removed\r \tfrom the system. If so, remove it.\"\r\r\t| messageCategoryName |\r\tmessageCategoryListIndex = 0 ifTrue: [^ self].\r\tself okToChange ifFalse: [^ self].\r\tmessageCategoryName _ self selectedMessageCategoryName.\r\t(self messageList size = 0\r\t\tor: [self confirm: 'Are you sure you want to\rremove this method category \rand all its methods?']) ifFalse: [^ self].\r\tself selectedClassOrMetaClass removeCategory: messageCategoryName.\r\tself messageCategoryListIndex: 0.\r\tself changed: #messageCategoryList.! !\r\r!FileContentsBrowser methodsFor: 'removing' stamp: 'wod 5/24/1998 20:52'!\rremovePackage\r\tsystemCategoryListIndex = 0 ifTrue: [^ self].\r\tself okToChange ifFalse: [^ self].\r\t(self confirm: 'Are you sure you want to\rremove this package \rand all its classes?') ifFalse:[^self].\r\t(systemOrganizer listAtCategoryNamed: self selectedSystemCategoryName) do:[:el|\r\t\tsystemOrganizer removeElement: el].\r\tself packages removeKey: self selectedPackage packageName.\r\tsystemOrganizer removeCategory: self selectedSystemCategoryName.\r\tself systemCategoryListIndex: 0.\r\tself changed: #systemCategoryList! !\r\r!FileContentsBrowser methodsFor: 'removing' stamp: 'wod 2/3/1999 18:47'!\rremoveUnmodifiedCategories\r\t| theClass |\r\tself okToChange ifFalse: [^self].\r\ttheClass _ self selectedClass.\r\ttheClass isNil ifTrue: [^self].\r\tCursor wait showWhile:\r\t\t[theClass removeUnmodifiedMethods: theClass selectors.\r\t\ttheClass metaClass removeUnmodifiedMethods: theClass metaClass selectors].\r\tself messageCategoryListIndex: 0.\r\tself changed: #messageCategoryList.! !\r\r!FileContentsBrowser methodsFor: 'removing' stamp: 'wod 5/24/1998 20:37'!\rremoveUnmodifiedClasses\r\t| packageList |\r\tself okToChange ifFalse:[^self].\r\tpackageList := self selectedPackage isNil\r\t\t\t\t\t\tifTrue:[self packages] \r\t\t\t\t\t\tifFalse:[Array with: self selectedPackage].\r\tpackageList do:[:package|\r\t\tpackage classes copy do:[:theClass|\r\t\t\tCursor wait showWhile:[\r\t\t\t\ttheClass removeAllUnmodified.\r\t\t\t].\r\t\t\ttheClass hasChanges ifFalse:[\r\t\t\t\tpackage removeClass: theClass.\r\t\t\t].\r\t\t]].\r\tself classListIndex: 0.\r\tself changed: #classList.! !\r\r!FileContentsBrowser methodsFor: 'removing' stamp: 'wod 2/3/1999 18:47'!\rremoveUnmodifiedMethods\r\t| theClass cat |\r\tself okToChange ifFalse:[^self].\r\ttheClass := self selectedClassOrMetaClass.\r\ttheClass isNil ifTrue:[^self].\r\tcat := self selectedMessageCategoryName.\r\tcat isNil ifTrue:[^self].\r\tCursor wait showWhile:[\r\t\ttheClass removeUnmodifiedMethods: (theClass organization listAtCategoryNamed: cat).\r\t].\r\tself messageListIndex: 0.\r\tself changed: #messageList.! !\r\r\r!FileContentsBrowser methodsFor: 'class list' stamp: 'sma 5/6/2000 18:48'!\rbrowseMethodFull\r\t| myClass |\r\t(myClass _ self selectedClassOrMetaClass) ifNotNil:\r\t\t[Browser fullOnClass: myClass realClass selector: self selectedMessageName]! !\r\r!FileContentsBrowser methodsFor: 'class list'!\rclassList\r\t\"Answer an array of the class names of the selected category. Answer an \r\tempty array if no selection exists.\"\r\r\t(systemCategoryListIndex = 0 or:[self selectedPackage isNil])\r\t\tifTrue: [^Array new]\r\t\tifFalse: [^self selectedPackage classes keys asSortedCollection].! !\r\r!FileContentsBrowser methodsFor: 'class list'!\rfindClass\r\t| pattern foundClass classNames index foundPackage |\r\tself okToChange ifFalse: [^ self classNotFound].\r\tpattern _ (FillInTheBlank request: 'Class Name?') asLowercase.\r\tpattern isEmpty ifTrue: [^ self].\r\tclassNames := Set new.\r\tself packages do:[:p| classNames addAll: p classes keys].\r\tclassNames := classNames asArray select: \r\t\t[:n | (n asLowercase indexOfSubCollection: pattern startingAt: 1) > 0].\r\tclassNames isEmpty ifTrue: [^ self].\r\tindex _ classNames size == 1\r\t\t\t\tifTrue:\t[1]\r\t\t\t\tifFalse:\t[(PopUpMenu labelArray: classNames lines: #()) startUp].\r\tindex = 0 ifTrue: [^ self].\r\tfoundPackage := nil.\r\tfoundClass := nil.\r\tself packages do:[:p| \r\t\t(p classes includesKey: (classNames at: index)) ifTrue:[\r\t\t\tfoundClass := p classes at: (classNames at: index).\r\t\t\tfoundPackage := p]].\r\tfoundClass isNil ifTrue:[^self].\r \tself systemCategoryListIndex: (self systemCategoryList indexOf: foundPackage packageName asSymbol).\r\tself classListIndex: (self classList indexOf: foundClass name). ! !\r\r!FileContentsBrowser methodsFor: 'class list' stamp: 'wod 5/24/1998 20:37'!\rrenameClass\r\t| oldName newName |\r\tclassListIndex = 0 ifTrue: [^ self].\r\tself okToChange ifFalse: [^ self].\r\toldName _ self selectedClass name.\r\tnewName _ (self request: 'Please type new class name'\r\t\t\t\t\t\tinitialAnswer: oldName) asSymbol.\r\t(newName isEmpty or:[newName = oldName]) ifTrue: [^ self].\r\t(self selectedPackage classes includesKey: newName)\r\t\tifTrue: [^ self error: newName , ' already exists in the package'].\r\tsystemOrganizer classify: newName under: self selectedSystemCategoryName.\r\tsystemOrganizer removeElement: oldName.\r\tself selectedPackage renameClass: self selectedClass to: newName.\r\tself changed: #classList.\r\tself classListIndex: ((systemOrganizer listAtCategoryNamed: self selectedSystemCategoryName) indexOf: newName).\r! !\r\r!FileContentsBrowser methodsFor: 'class list'!\rselectedClass\r\t\"Answer the class that is currently selected. Answer nil if no selection \r\texists.\"\r\r\tself selectedClassName == nil ifTrue: [^nil].\r\t^self selectedPackage classAt: self selectedClassName! !\r\r\r!FileContentsBrowser methodsFor: 'edit pane' stamp: 'dew 9/22/2001 23:06'!\rselectedBytecodes\r\t\"Compile the source code for the selected message selector and extract and return\r\tthe bytecode listing.\"\r\t| class selector |\r\tclass _ self selectedClassOrMetaClass.\r\tselector _ self selectedMessageName.\r\tcontents _ class sourceCodeAt: selector.\r\tcontents _ Compiler new\r\t\t\t\t\tparse: contents\r\t\t\t\t\tin: class\r\t\t\t\t\tnotifying: nil.\r\tcontents _ contents generate: #(0 0 0 0).\r\t^ contents symbolic asText! !\r\r!FileContentsBrowser methodsFor: 'edit pane' stamp: 'sw 11/13/2001 08:41'!\rselectedMessage\r\t\"Answer a copy of the source code for the selected message selector.\"\r\r\t| class selector |\r\tclass _ self selectedClassOrMetaClass.\r\tselector _ self selectedMessageName.\r\tcontents _ class sourceCodeAt: selector.\r\tPreferences browseWithPrettyPrint ifTrue: [contents _ Compiler new\r\t\t\t\t\tformat: contents\r\t\t\t\t\tin: class\r\t\t\t\t\tnotifying: nil\r\t\t\t\t\tdecorated: Preferences colorWhenPrettyPrinting].\r\tself showingAnyKindOfDiffs ifTrue:\r\t\t[contents _ self\r\t\t\tmethodDiffFor: contents\r\t\t\tclass: self selectedClass\r\t\t\tselector: self selectedMessageName\r\t\t\tmeta: self metaClassIndicated].\r\t^ contents asText makeSelectorBoldIn: class! !\r\r\r!FileContentsBrowser methodsFor: 'diffs' stamp: 'sw 5/20/2001 21:03'!\rmethodDiffFor: aString class: aPseudoClass selector: selector meta: meta \r\t\"Answer the diff between the current copy of the given class/selector/meta for the string provided\"\r\r\t| theClass source |\r\ttheClass _ Smalltalk\r\t\t\t\tat: aPseudoClass name\r\t\t\t\tifAbsent: [^ aString copy].\r\tmeta\r\t\tifTrue: [theClass _ theClass class].\r\t(theClass includesSelector: selector)\r\t\tifFalse: [^ aString copy].\r\tsource _ theClass sourceCodeAt: selector.\r\t^ Cursor wait\r\t\tshowWhile: [TextDiffBuilder buildDisplayPatchFrom: source to: aString inClass: theClass prettyDiffs: self showingPrettyDiffs]! !\r\r!FileContentsBrowser methodsFor: 'diffs'!\rmodifiedClassDefinition\r\t| pClass rClass old new diff |\r\tpClass := self selectedClassOrMetaClass.\r\tpClass hasDefinition ifFalse:[^pClass definition].\r\trClass := Smalltalk at: self selectedClass name asSymbol ifAbsent:[nil].\r\trClass isNil ifTrue:[^pClass definition].\r\tself metaClassIndicated ifTrue:[ rClass := rClass class].\r\told := rClass definition.\r\tnew := pClass definition.\r\tCursor wait showWhile:[\r\t\tdiff := ClassDiffBuilder buildDisplayPatchFrom: old to: new\r\t].\r\t^diff! !\r\r\r!FileContentsBrowser methodsFor: 'fileIn/fileOut'!\rfileInClass\r\tCursor read showWhile:[\r\t\tself selectedClass fileIn.\r\t].! !\r\r!FileContentsBrowser methodsFor: 'fileIn/fileOut' stamp: 'wod 6/16/1998 17:14'!\rfileInMessage\r\t\r\tself selectedMessageName ifNil: [^self].\r\tCursor read showWhile: [\r\t\tself selectedClassOrMetaClass fileInMethod: self selectedMessageName.\r\t].! !\r\r!FileContentsBrowser methodsFor: 'fileIn/fileOut' stamp: 'wod 2/3/1999 18:46'!\rfileInMessageCategories\r\tCursor read showWhile:[\r\t\tself selectedClassOrMetaClass fileInCategory: self selectedMessageCategoryName.\r\t].! !\r\r!FileContentsBrowser methodsFor: 'fileIn/fileOut' stamp: 'wod 5/13/1998 12:50'!\rfileInPackage\r\tCursor read showWhile:[\r\t\tself selectedPackage fileIn.\r\t].! !\r\r!FileContentsBrowser methodsFor: 'fileIn/fileOut' stamp: 'nb 6/17/2003 12:25'!\rfileIntoNewChangeSet\r\t| p ff |\r\t(p _ self selectedPackage) ifNil: [^ Beeper beep].\r\tff _ StandardFileStream readOnlyFileNamed: p fullPackageName.\r\tChangeSorter newChangesFromStream: ff named: p packageName! !\r\r!FileContentsBrowser methodsFor: 'fileIn/fileOut'!\rfileOutClass\r\tCursor write showWhile:[\r\t\tself selectedClass fileOut.\r\t].! !\r\r!FileContentsBrowser methodsFor: 'fileIn/fileOut' stamp: 'wod 6/16/1998 17:14'!\rfileOutMessage\r\r\tself selectedMessageName ifNil: [^self].\r\tCursor write showWhile: [\r\t\tself selectedClassOrMetaClass fileOutMethod: self selectedMessageName].! !\r\r!FileContentsBrowser methodsFor: 'fileIn/fileOut' stamp: 'wod 2/3/1999 18:46'!\rfileOutMessageCategories\r\tCursor write showWhile:[\r\t\tself selectedClassOrMetaClass fileOutCategory: self selectedMessageCategoryName.\r\t].! !\r\r!FileContentsBrowser methodsFor: 'fileIn/fileOut' stamp: 'wod 5/13/1998 14:19'!\rfileOutPackage\r\tCursor write showWhile:[\r\t\tself selectedPackage fileOut.\r\t].! !\r\r\r!FileContentsBrowser methodsFor: 'infoView' stamp: 'sma 5/6/2000 19:19'!\rextraInfo\r\t^ (self\r\t\tmethodDiffFor: (self selectedClassOrMetaClass sourceCodeAt: self selectedMessageName)\r\t\tclass: self selectedClass\r\t\tselector: self selectedMessageName\r\t\tmeta: self metaClassIndicated) unembellished\r\t\t\tifTrue: [' - identical']\r\t\t\tifFalse: [' - modified']! !\r\r!FileContentsBrowser methodsFor: 'infoView'!\rinfoString\r\t^infoString isNil\r\t\tifTrue:[infoString := StringHolder new]\r\t\tifFalse:[infoString]! !\r\r!FileContentsBrowser methodsFor: 'infoView' stamp: 'sma 5/6/2000 18:26'!\rinfoViewContents\r\t| theClass |\r\teditSelection == #newClass ifTrue: [^ self packageInfo: self selectedPackage].\r\tself selectedClass isNil ifTrue: [^ ''].\r\ttheClass _ Smalltalk at: self selectedClass name asSymbol ifAbsent: [].\r\teditSelection == #editClass ifTrue: [^ theClass notNil\r\t\t\tifTrue: ['Class exists already in the system']\r\t\t\tifFalse: ['New class']].\r\teditSelection == #editMessage ifFalse: [^ ''].\r\t(theClass notNil and: [self metaClassIndicated])\r\t\tifTrue: [theClass _ theClass class].\r\t^ (theClass notNil and: [theClass includesSelector: self selectedMessageName])\r\t\tifTrue: ['Method already exists' , self extraInfo]\r\t\tifFalse: ['New method']! !\r\r!FileContentsBrowser methodsFor: 'infoView'!\rpackageInfo: p\r\t| nClasses newClasses oldClasses |\r\tp isNil ifTrue:[^''].\r\tnClasses := newClasses := oldClasses := 0.\r\tp classes do:[:cls|\r\t\tnClasses := nClasses + 1.\r\t\t(Smalltalk includesKey: (cls name asSymbol))\r\t\t\tifTrue:[oldClasses := oldClasses + 1]\r\t\t\tifFalse:[newClasses := newClasses + 1]].\r\t^nClasses printString,' classes (', newClasses printString, ' new / ', oldClasses printString, ' modified)'! !\r\r!FileContentsBrowser methodsFor: 'infoView' stamp: 'BG 10/28/2003 20:55'!\rupdateInfoView\r\r\tSmalltalk isMorphic \r\t\tifFalse: [\r\t\t\tself infoString contents: self infoViewContents.\r\t\t\tself infoString changed].! !\r\r\r!FileContentsBrowser methodsFor: 'metaclass' stamp: 'asm 10/6/2003 11:29'!\rselectedClassOrMetaClass\r\t\"Answer the selected class or metaclass.\"\r\r\t| cls |\r\tself metaClassIndicated\r\t\tifTrue: [^ (cls _ self selectedClass) ifNotNil: [cls metaClass]]\r\t\tifFalse: [^ self selectedClass]! !\r\r!FileContentsBrowser methodsFor: 'metaclass'!\rsetClassOrganizer\r\t\"Install whatever organization is appropriate\"\r\t| theClass |\r\tclassOrganizer _ nil.\r\tmetaClassOrganizer _ nil.\r\tclassListIndex = 0 ifTrue: [^ self].\r\tclassOrganizer _ (theClass _ self selectedClass) organization.\r\tmetaClassOrganizer _ theClass metaClass organization.\r! !\r\r\r!FileContentsBrowser methodsFor: 'other' stamp: 'bkv 8/13/2003 23:59'!\rbrowseSenders\r\t\"Create and schedule a message set browser on all senders of the \r\tcurrently selected message selector. Do nothing if no message is selected.\"\r\r\tmessageListIndex ~= 0 \r\t\tifTrue: [self systemNavigation browseAllCallsOn: self selectedMessageName]! !\r\r!FileContentsBrowser methodsFor: 'other' stamp: 'dew 9/20/2001 19:03'!\rbrowseVersions\r\t\"Create and schedule a message set browser on all versions of the \r\tcurrently selected message selector.\"\r\t| class selector |\r\t(selector _ self selectedMessageName) ifNotNil:\r\t\t[class _ self selectedClassOrMetaClass.\r\t\t(class exists and: [class realClass includesSelector: selector]) ifTrue:\r\t\t\t[VersionsBrowser\r\t\t\t\tbrowseVersionsOf: (class realClass compiledMethodAt: selector)\r\t\t\t\tclass: class realClass theNonMetaClass\r\t\t\t\tmeta: class realClass isMeta\r\t\t\t\tcategory: self selectedMessageCategoryName\r\t\t\t\tselector: selector]]! !\r\r!FileContentsBrowser methodsFor: 'other'!\rchangeMessageCategories: aString \r\t\"The characters in aString represent an edited version of the the message \r\tcategories for the selected class. Update this information in the system \r\tand inform any dependents that the categories have been changed. This \r\tmessage is invoked because the user had issued the categories command \r\tand edited the message categories. Then the user issued the accept \r\tcommand.\"\r\r\tself classOrMetaClassOrganizer changeFromString: aString.\r\tself unlock.\r\tself editClass.\r\tself classListIndex: classListIndex.\r\t^ true! !\r\r!FileContentsBrowser methodsFor: 'other' stamp: 'asm 5/30/2003 18:11'!\rdidCodeChangeElsewhere\r\t\"Determine whether the code for the currently selected method and class has been changed somewhere else.\"\r\r\t| aClass |\r\t(aClass _ self selectedClassOrMetaClass) ifNil: [^ false].\r\r\t(aClass isKindOf: PseudoClass) ifTrue: [^ false]. \"class not installed\"\r\t^super didCodeChangeElsewhere! !\r\r!FileContentsBrowser methodsFor: 'other' stamp: 'sw 10/1/2001 11:16'!\rlabelString\r\t\"Answer the string for the window title\"\r\r\t^ 'File Contents Browser ', (self selectedSystemCategoryName ifNil: [''])! !\r\r!FileContentsBrowser methodsFor: 'other' stamp: 'sma 2/6/2000 12:27'!\rmethodHierarchy\r\t(self selectedClassOrMetaClass isNil or:\r\t\t[self selectedClassOrMetaClass hasDefinition])\r\t\t\tifFalse: [super methodHierarchy]! !\r\r\r!FileContentsBrowser methodsFor: 'creation' stamp: 'BG 10/28/2003 20:55'!\rcreateViews\r\t\"Create a pluggable version of all the views for a Browser, including views and controllers.\"\r\r\t| hasSingleFile width topView packageListView classListView switchView messageCategoryListView messageListView browserCodeView infoView |\r\tcontentsSymbol _ self defaultDiffsSymbol.  \"#showDiffs or #prettyDiffs\"\r\t\r\t(hasSingleFile _ self packages size = 1)\r\t\tifTrue: [width _ 150]\r\t\tifFalse: [width _ 200].\r\r\t(topView _ StandardSystemView new) \r\t\tmodel: self;\r\t\tborderWidth: 1.\r\t\t\"label and minSize taken care of by caller\"\r\t\r\thasSingleFile \r\t\tifTrue: [\r\t\t\tself systemCategoryListIndex: 1.\r\t\t\tpackageListView _ PluggableListView on: self\r\t\t\t\tlist: #systemCategorySingleton\r\t\t\t\tselected: #indexIsOne \r\t\t\t\tchangeSelected: #indexIsOne:\r\t\t\t\tmenu: #packageListMenu:\r\t\t\t\tkeystroke: #packageListKey:from:.\r\t\t\tpackageListView window: (0 @ 0 extent: width @ 12)]\r\t\tifFalse: [\r\t\t\tpackageListView _ PluggableListView on: self\r\t\t\t\tlist: #systemCategoryList\r\t\t\t\tselected: #systemCategoryListIndex\r\t\t\t\tchangeSelected: #systemCategoryListIndex:\r\t\t\t\tmenu: #packageListMenu:\r\t\t\t\tkeystroke: #packageListKey:from:.\r\t\t\tpackageListView window: (0 @ 0 extent: 50 @ 70)].\r\ttopView addSubView: packageListView.\r\r\tclassListView _ PluggableListView on: self\r\t\tlist: #classList\r\t\tselected: #classListIndex\r\t\tchangeSelected: #classListIndex:\r\t\tmenu: #classListMenu:\r\t\tkeystroke: #classListKey:from:.\r\tclassListView window: (0 @ 0 extent: 50 @ 62).\r\thasSingleFile \r\t\tifTrue: [topView addSubView: classListView below: packageListView]\r\t\tifFalse: [topView addSubView: classListView toRightOf: packageListView].\r\r\tswitchView _ self buildInstanceClassSwitchView.\r\tswitchView borderWidth: 1.\r\ttopView addSubView: switchView below: classListView.\r\r\tmessageCategoryListView _ PluggableListView on: self\r\t\tlist: #messageCategoryList\r\t\tselected: #messageCategoryListIndex\r\t\tchangeSelected: #messageCategoryListIndex:\r\t\tmenu: #messageCategoryMenu:.\r\tmessageCategoryListView window: (0 @ 0 extent: 50 @ 70).\r\ttopView addSubView: messageCategoryListView toRightOf: classListView.\r\r\tmessageListView _ PluggableListView on: self\r\t\tlist: #messageList\r\t\tselected: #messageListIndex\r\t\tchangeSelected: #messageListIndex:\r\t\tmenu: #messageListMenu:\r\t\tkeystroke: #messageListKey:from:.\r\tmessageListView window: (0 @ 0 extent: 50 @ 70).\r\ttopView addSubView: messageListView toRightOf: messageCategoryListView.\r\r\tbrowserCodeView _ PluggableTextView on: self \r\t\t\ttext: #contents accept: #contents:notifying:\r\t\t\treadSelection: #contentsSelection menu: #codePaneMenu:shifted:.\r\tbrowserCodeView window: (0@0 extent: width@110).\r\ttopView \r\t\taddSubView: browserCodeView \r\t\tbelow: (hasSingleFile \r\t\t\tifTrue: [switchView]\r\t\t\tifFalse: [packageListView]).\r\r\tinfoView _ StringHolderView new\r\t\tmodel: self infoString;\r\t\twindow: (0@0 extent: width@12);\r\t\tborderWidth: 1.\r\ttopView addSubView: infoView below: browserCodeView.\r\r\t^ topView\r! !\r\r\r!FileContentsBrowser methodsFor: 'menus' stamp: 'sma 5/6/2000 18:36'!\rclassListMenu: aMenu\r\r\t^ aMenu \r\t\tlabels:\r'definition\rcomment\rbrowse full (b)\rclass refs (N)\rfileIn\rfileOut\rrename...\rremove\rremove existing'\r\t\tlines: #(2 4 6 8)\r\t\tselections: #(editClass editComment browseMethodFull browseClassRefs fileInClass fileOutClass renameClass removeClass removeUnmodifiedCategories) \r\r! !\r\r!FileContentsBrowser methodsFor: 'menus' stamp: 'tpr 3/11/2001 21:26'!\rclassListMenu: aMenu shifted: ignored\r\t\"Answer the class list menu, ignoring the state of the shift key in this case\"\r\r\t^ self classListMenu: aMenu! !\r\r!FileContentsBrowser methodsFor: 'menus' stamp: 'sw 11/13/2001 09:12'!\rcontentsSymbolQuints\r\t\"Answer a list of quintuplets representing information on the alternative views available in the code pane.  For the file-contents browser, the choices are restricted to source and the two diffing options\"\r\r\t^ self sourceAndDiffsQuintsOnly! !\r\r!FileContentsBrowser methodsFor: 'menus' stamp: 'wod 5/13/1998 17:39'!\rmessageCategoryMenu: aMenu\r\r\t^ aMenu \r\t\tlabels:\r'fileIn\rfileOut\rreorganize\radd item...\rrename...\rremove\rremove existing'\r\t\tlines: #(2 3 6)\r\t\tselections: #(fileInMessageCategories fileOutMessageCategories editMessageCategories addCategory renameCategory removeMessageCategory removeUnmodifiedMethods)! !\r\r!FileContentsBrowser methodsFor: 'menus' stamp: 'sma 2/6/2000 12:28'!\rmessageListMenu: aMenu\r\r\t^ aMenu \r\t\tlabels:\r'fileIn\rfileOut\rsenders (n)\rimplementors (m)\rmethod inheritance (h)\rversions (v)\rremove'\r\t\tlines: #(2 6)\r\t\tselections: #(fileInMessage fileOutMessage\rbrowseSenders browseImplementors methodHierarchy browseVersions\rremoveMessage).! !\r\r!FileContentsBrowser methodsFor: 'menus' stamp: 'sma 4/22/2000 20:52'!\rpackageListMenu: aMenu\r\t^ aMenu \r\t\tlabels:\r'find class... (f)\rfileIn\rfile into new changeset\rfileOut\rremove\rremove existing'\r\t\tlines: #(1 4 5)\r\t\tselections: #(findClass fileInPackage fileIntoNewChangeSet fileOutPackage removePackage removeUnmodifiedClasses)! !\r\r\r!FileContentsBrowser methodsFor: 'keys' stamp: 'sma 5/6/2000 18:48'!\rclassListKey: aChar from: view\r\taChar == $b ifTrue: [^ self browseMethodFull].\r\taChar == $N ifTrue: [^ self browseClassRefs].\r\tself packageListKey: aChar from: view! !\r\r!FileContentsBrowser methodsFor: 'keys' stamp: 'sma 5/6/2000 18:50'!\rmessageListKey: aChar from: view\r\taChar == $b ifTrue: [^ self browseMethodFull].\r\tsuper messageListKey: aChar from: view! !\r\r!FileContentsBrowser methodsFor: 'keys' stamp: 'sma 2/6/2000 12:05'!\rpackageListKey: aChar from: view\r\taChar == $f ifTrue: [^ self findClass].\r\tself arrowKey: aChar from: view! !\r\r\r!FileContentsBrowser methodsFor: 'initialize-release' stamp: 'dew 9/15/2001 16:19'!\rdefaultBrowserTitle\r\t^ 'File Contents Browser'! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rFileContentsBrowser class\r\tinstanceVariableNames: ''!\r\r!FileContentsBrowser class methodsFor: 'instance creation' stamp: 'nb 6/17/2003 12:25'!\rbrowseFile: aFilename\r\t\"Open a file contents browser on a file of the given name\"\r\r\taFilename ifNil: [^ Beeper beep].\r\tself browseFiles: (Array with: aFilename)! !\r\r!FileContentsBrowser class methodsFor: 'instance creation' stamp: 'dew 8/2/2000 20:02'!\rbrowseFiles: fileList\r\r\t| package organizer packageDict browser |\r\tCursor wait showWhile: [\r\t\tpackageDict _ Dictionary new.\r\t\torganizer _ SystemOrganizer defaultList: Array new.\r\t\tfileList do: [:fileName |\r\t\t\tpackage _ FilePackage fromFileNamed: fileName.\r\t\t\tpackageDict \r\t\t\t\tat: package packageName \r\t\t\t\tput: package.\r\t\t\torganizer \r\t\t\t\tclassifyAll: package classes keys \r\t\t\t\tunder: package packageName].\r\t\t(browser := self new)\r\t\t\tsystemOrganizer: organizer;\r\t\t\tpackages: packageDict].\r\tself\r\t\topenBrowserView: browser createViews\r\t\tlabel: 'File Contents Browser'.\r! !\r\r!FileContentsBrowser class methodsFor: 'instance creation' stamp: 'nk 2/17/2004 19:26'!\rbrowseStream: aStream\r\r\tself browseStream: aStream named: aStream name! !\r\r!FileContentsBrowser class methodsFor: 'instance creation' stamp: 'nk 2/17/2004 19:25'!\rbrowseStream: aStream named: aString\r\r\t| package organizer packageDict browser |\r\tCursor wait showWhile: [\r\t\tpackageDict _ Dictionary new.\r\t\torganizer _ SystemOrganizer defaultList: Array new.\r\t\tpackage _ (FilePackage new fullName: aString; fileInFrom: aStream).\r\t\tpackageDict \r\t\t\tat: package packageName \r\t\t\tput: package.\r\t\torganizer \r\t\t\tclassifyAll: package classes keys \r\t\t\tunder: package packageName.\r\t\t(browser := self new)\r\t\t\tsystemOrganizer: organizer;\r\t\t\tpackages: packageDict].\r\tself\r\t\topenBrowserView: browser createViews\r\t\tlabel: 'File Contents Browser'.\r! !\r\r!FileContentsBrowser class methodsFor: 'instance creation' stamp: 'nk 2/17/2004 19:18'!\rfileReaderServicesForFile: fullName suffix: suffix\r\r\t((FileStream isSourceFileSuffix: suffix) or: [ suffix = '*' ])\r\t\tifTrue: [ ^Array with: self serviceBrowseCode].\r\r\t^(fullName endsWith: 'cs.gz')\r\t\tifTrue: [ Array with: self serviceBrowseCompressedCode ]\r\t\tifFalse: [#()]\r! !\r\r!FileContentsBrowser class methodsFor: 'instance creation' stamp: 'SD 11/14/2001 22:13'!\rselectAndBrowseFile: aFileList\r\t\"When no file are selected you can ask to browse several of them\"\r\r\t| selectionPattern files |\r\tselectionPattern := FillInTheBlank request:'What files?' initialAnswer: aFileList pattern.\r\tfiles _ (aFileList directory fileNamesMatching: selectionPattern) \r\t\t\t\tcollect: [:each | aFileList directory fullNameFor: each].\r\tFileContentsBrowser browseFiles: files.\r\r\r! !\r\r!FileContentsBrowser class methodsFor: 'instance creation' stamp: 'nk 4/29/2004 10:35'!\rserviceBrowseCode\r\t\"Answer the service of opening a file-contents browser\"\r\r\t^ (SimpleServiceEntry\r\t\tprovider: self \r\t\tlabel: 'code-file browser'\r\t\tselector: #browseStream:\r\t\tdescription: 'open a \"file-contents browser\" on this file, allowing you to view and selectively load its code'\r\t\tbuttonLabel: 'code')\r\t\targumentGetter: [ :fileList | fileList readOnlyStream ]! !\r\r!FileContentsBrowser class methodsFor: 'instance creation' stamp: 'nk 4/29/2004 10:35'!\rserviceBrowseCompressedCode\r\t\"Answer a service for opening a changelist browser on a file\"\r\r\t^ (SimpleServiceEntry \r\t\tprovider: self \r\t\tlabel: 'code-file browser'\r\t\tselector: #browseCompressedCodeStream:\r\t\tdescription: 'open a \"file-contents browser\" on this file, allowing you to view and selectively load its code'\r\t\tbuttonLabel: 'code')\r\t\targumentGetter: [ :fileList | fileList readOnlyStream ]! !\r\r!FileContentsBrowser class methodsFor: 'instance creation' stamp: 'sd 2/1/2002 21:40'!\rservices\r\r\t^ Array with: self serviceBrowseCode\r\r! !\r\r\r\r!FileContentsBrowser class methodsFor: 'class initialization' stamp: 'hg 8/3/2000 18:17'!\rinitialize\r\r\tFileList registerFileReader: self! !\r\r!FileContentsBrowser class methodsFor: 'class initialization' stamp: 'SD 11/15/2001 22:21'!\runload\r\r\tFileList unregisterFileReader: self ! !\rObject subclass: #FileDirectory\r\tinstanceVariableNames: 'pathName'\r\tclassVariableNames: 'DefaultDirectory DirectoryClass StandardMIMEMappings'\r\tpoolDictionaries: ''\r\tcategory: 'System-Files'!\r!FileDirectory commentStamp: '<historical>' prior: 0!\rA FileDirectory represents a folder or directory in the underlying platform's file system. It carries a fully-qualified path name for the directory it represents, and can enumerate the files and directories within that directory.\r\rA FileDirectory can be thought of as a Dictionary whose keys are the local names of files in that directory, and whose values are directory \"entries\". Each entry is an array of five items:\r\r\t<name> <creationTime> <modificationTime> <dirFlag> <fileSize>\r\rThe times are given in seconds, and can be converted to a time and date via Time>dateAndTimeFromSeconds:. See the comment in lookupEntry:... which provides primitive access to this information.\r!\r\r\r!FileDirectory methodsFor: 'path access' stamp: 'ar 12/18/1999 01:01'!\rfullPathFor: path\r\t^path isEmpty ifTrue:[pathName] ifFalse:[path]! !\r\r!FileDirectory methodsFor: 'path access' stamp: 'tk 5/18/1998 22:29'!\ron: fullPath\r\t\"Return another instance\"\r\r\t^ self class on: fullPath! !\r\r!FileDirectory methodsFor: 'path access' stamp: 'jm 12/5/97 12:18'!\rpathName\r\t\"Return the path from the root of the file system to this directory.\"\r\r\t^ pathName\r! !\r\r!FileDirectory methodsFor: 'path access' stamp: 'jm 12/5/97 12:19'!\rpathNameDelimiter\r\t\"Return the delimiter character for this kind of directory. This depends on the current platform.\"\r\r\t^ self class pathNameDelimiter\r! !\r\r!FileDirectory methodsFor: 'path access' stamp: 'jm 12/5/97 12:17'!\rpathParts\r\t\"Return the path from the root of the file system to this directory as an array of directory names.\"\r\r\t^ pathName findTokens: self pathNameDelimiter asString\r! !\r\r!FileDirectory methodsFor: 'path access' stamp: 'ar 12/18/1999 00:36'!\rslash\r\t^self class slash! !\r\r\r!FileDirectory methodsFor: 'file stream creation' stamp: 'tk 5/19/1998 09:03'!\rfileNamed: localFileName\r\t\"Open the file with the given name in this directory for writing.\"\r\r\t^ FileStream concreteStream fileNamed: (self fullNameFor: localFileName)\r! !\r\r!FileDirectory methodsFor: 'file stream creation' stamp: 'dew 10/26/2000 02:08'!\rforceNewFileNamed: localFileName\r\t\"Open the file with the given name in this directory for writing.  If it already exists, delete it first without asking.\"\r\r\t^ FileStream concreteStream forceNewFileNamed: (self fullNameFor: localFileName)\r! !\r\r!FileDirectory methodsFor: 'file stream creation' stamp: 'tk 5/19/1998 09:03'!\rnewFileNamed: localFileName\r\t\"Create a new file with the given name in this directory.\"\r\r\t^ FileStream concreteStream newFileNamed: (self fullNameFor: localFileName)\r! !\r\r!FileDirectory methodsFor: 'file stream creation' stamp: 'tk 5/19/1998 09:03'!\roldFileNamed: localFileName\r\t\"Open the existing file with the given name in this directory.\"\r\r\t^ FileStream concreteStream oldFileNamed: (self fullNameFor: localFileName)\r! !\r\r!FileDirectory methodsFor: 'file stream creation' stamp: 'tpr 10/13/2003 12:34'!\roldFileOrNoneNamed: fileName\r\t\"If the file exists, answer a read-only FileStream on it. If it doesn't, answer nil.\"\r\r\t^ FileStream oldFileOrNoneNamed: fileName\r! !\r\r!FileDirectory methodsFor: 'file stream creation' stamp: 'tk 5/19/1998 09:03'!\rreadOnlyFileNamed: localFileName\r\t\"Open the existing file with the given name in this directory for read-only access.\"\r\r\t^ FileStream concreteStream readOnlyFileNamed: (self fullNameFor: localFileName)\r! !\r\r\r!FileDirectory methodsFor: 'enumeration' stamp: 'jm 1/5/98 20:49'!\rcontainingDirectory\r\t\"Return the directory containing this directory.\"\r\r\t^ FileDirectory on: (FileDirectory dirPathFor: pathName)\r! !\r\r!FileDirectory methodsFor: 'enumeration' stamp: 'tpr 10/13/2003 10:58'!\rdirectoryEntryFor: filenameOrPath\r\t\"Answer the directory entry for the given file or path. Sorta like a poor man's stat().\"\r\t| fName dir |\r\tDirectoryClass splitName: filenameOrPath to:[:filePath :name |\r\t\tfName _ name.\r\t\tfilePath isEmpty\r\t\t\tifTrue: [dir _ self]\r\t\t\tifFalse: [dir _ FileDirectory on: filePath]].\r\tself isCaseSensitive \r\t\tifTrue:[^dir entries detect:[:entry| entry name = fName] ifNone:[nil]]\r\t\tifFalse:[^dir entries detect:[:entry| entry name sameAs: fName] ifNone:[nil]]! !\r\r!FileDirectory methodsFor: 'enumeration' stamp: 'jm 12/5/97 15:46'!\rdirectoryNamed: localFileName\r\t\"Return the subdirectory of this directory with the given name.\"\r\r\t^ FileDirectory on: (self fullNameFor: localFileName)\r! !\r\r!FileDirectory methodsFor: 'enumeration' stamp: 'jm 12/5/97 15:44'!\rdirectoryNames\r\t\"Return a collection of names for the subdirectories of this directory.\"\r\t\"FileDirectory default directoryNames\"\r\r\t^ (self entries select: [:entry | entry at: 4])\r\t\tcollect: [:entry | entry first]\r! !\r\r!FileDirectory methodsFor: 'enumeration' stamp: 'jm 12/5/97 12:23'!\rentries\r\t\"Return a collection of directory entries for the files and directories in this directory. Each entry is a five-element array: (<name><creationTime><modificationTime><dirFlag><fileSize>). See primLookupEntryIn:index: for further details.\"\r\t\"FileDirectory default entries\"\r\r\t^ self directoryContentsFor: pathName\r! !\r\r!FileDirectory methodsFor: 'enumeration' stamp: 'jm 12/5/97 15:39'!\rfileAndDirectoryNames\r\t\"FileDirectory default fileAndDirectoryNames\"\r\r\t^ self entries collect: [:entry | entry first]\r! !\r\r!FileDirectory methodsFor: 'enumeration' stamp: 'jm 12/5/97 15:44'!\rfileNames\r\t\"Return a collection of names for the files (but not directories) in this directory.\"\r\t\"FileDirectory default fileNames\"\r\r\t^ (self entries select: [:entry | (entry at: 4) not])\r\t\tcollect: [:entry | entry first]\r! !\r\r!FileDirectory methodsFor: 'enumeration' stamp: 'ar 3/15/2001 23:20'!\rfullName\r\t\"Return the full name of this directory.\"\r\r\t^pathName! !\r\r!FileDirectory methodsFor: 'enumeration' stamp: 'jm 12/5/97 15:39'!\rkeysDo: nameBlock\r\t\"Evaluate the given block for each file or directory name in this directory.\"\r\r\t^ self fileAndDirectoryNames do: nameBlock\r! !\r\r!FileDirectory methodsFor: 'enumeration' stamp: 'ar 2/6/2001 15:48'!\rlocalName\r\t\"Return the local name of this directory.\"\r\r\t^FileDirectory localNameFor: pathName! !\r\r\r!FileDirectory methodsFor: 'testing' stamp: 'tpr 2/17/2004 19:56'!\rdirectoryExists: filenameOrPath\r\t\"Answer true if a directory of the given name exists. The given name may be either a full path name or a local directory within this directory.\"\r\t\"FileDirectory default directoryExists: FileDirectory default pathName\"\r\r\t| fName dir |\r\tDirectoryClass splitName: filenameOrPath to:\r\t\t[:filePath :name |\r\t\t\tfName _ name.\r\t\t\tfilePath isEmpty\r\t\t\t\tifTrue: [dir _ self]\r\t\t\t\tifFalse: [dir _ self directoryNamed: filePath]].\r\r\t^dir exists and: [\r\t\tself isCaseSensitive \r\t\t\tifTrue:[dir directoryNames includes: fName]\r\t\t\tifFalse:[dir directoryNames anySatisfy: [:name| name sameAs: fName]]].\r! !\r\r!FileDirectory methodsFor: 'testing' stamp: 'nk 11/30/2002 14:06'!\rexists\r\"Answer whether the directory exists\"\r\r\t| result |\r\tresult _ self primLookupEntryIn: pathName index: 1.\r\t^ result ~= #badDirectoryPath! !\r\r!FileDirectory methodsFor: 'testing' stamp: 'tpr 10/13/2003 10:59'!\rfileExists: filenameOrPath\r\t\"Answer true if a file of the given name exists. The given name may be either a full path name or a local file within this directory.\"\r\t\"FileDirectory default fileExists: Smalltalk sourcesName\"\r\r\t| fName dir |\r\tDirectoryClass splitName: filenameOrPath to:\r\t\t[:filePath :name |\r\t\t\tfName _ name.\r\t\t\tfilePath isEmpty\r\t\t\t\tifTrue: [dir _ self]\r\t\t\t\tifFalse: [dir _ FileDirectory on: filePath]].\r\tself isCaseSensitive \r\t\tifTrue:[^dir fileNames includes: fName]\r\t\tifFalse:[^dir fileNames anySatisfy: [:name| name sameAs: fName]].\t! !\r\r!FileDirectory methodsFor: 'testing' stamp: 'di 11/21/1999 20:17'!\rincludesKey: localName\r\t\"Answer true if this directory includes a file or directory of the given name. Note that the name should be a local file name, in contrast with fileExists:, which takes either local or full-qualified file names.\"\r\t\"(FileDirectory on: Smalltalk vmPath) includesKey: 'SqueakV2.sources'\"\r\tself isCaseSensitive\r\t\tifTrue:[^ self fileAndDirectoryNames includes: localName]\r\t\tifFalse:[^ self fileAndDirectoryNames anySatisfy: [:str| str sameAs: localName]].! !\r\r!FileDirectory methodsFor: 'testing' stamp: 'ar 5/30/2001 21:42'!\risAFileNamed: fName\r\t^FileStream isAFileNamed: (self fullNameFor: fName)! !\r\r!FileDirectory methodsFor: 'testing' stamp: 'ar 5/1/1999 01:51'!\risCaseSensitive\r\t\"Return true if file names are treated case sensitive\"\r\t^self class isCaseSensitive! !\r\r\r!FileDirectory methodsFor: 'file operations' stamp: 'MPH 10/15/2000 12:43'!\rcopyFile: fileStream1 toFile: fileStream2\r\t| buffer |\r\tbuffer _ String new: 50000.\r\t[fileStream1 atEnd] whileFalse:\r\t\t[fileStream2 nextPutAll: (fileStream1 nextInto: buffer)].\r! !\r\r!FileDirectory methodsFor: 'file operations' stamp: 'dew 10/26/2000 02:23'!\rcopyFileWithoutOverwriteConfirmationNamed: fileName1 toFileNamed: fileName2\r\t\"Copy the contents of the existing file with the first name into a file with the second name (which may or may not exist). If the second file exists, force an overwrite without confirming.  Both files are assumed to be in this directory.\"\r\t\"FileDirectory default copyFileWithoutOverwriteConfirmationNamed: 'todo.txt' toFileNamed: 'todocopy.txt'\"\r\r\t| file1 file2 |\r\tfileName1 = fileName2 ifTrue: [^ self].\r\tfile1 _ (self readOnlyFileNamed: fileName1) binary.\r\tfile2 _ (self forceNewFileNamed: fileName2) binary.\r\tself copyFile: file1 toFile: file2.\r\tfile1 close.\r\tfile2 close.! !\r\r!FileDirectory methodsFor: 'file operations' stamp: 'jm 12/4/97 22:55'!\rcreateDirectory: localFileName\r\t\"Create a directory with the given name in this directory. Fail if the name is bad or if a file or directory with that name already exists.\"\r\r \tself primCreateDirectory: (self fullNameFor: localFileName).\r! !\r\r!FileDirectory methodsFor: 'file operations' stamp: 'jm 4/9/1999 18:02'!\rdeleteDirectory: localDirName\r\t\"Delete the directory with the given name in this directory. Fail if the path is bad or if a directory by that name does not exist.\"\r\r \tself primDeleteDirectory: (self fullNameFor: localDirName).\r! !\r\r!FileDirectory methodsFor: 'file operations' stamp: 'jm 12/5/97 16:33'!\rdeleteFileNamed: localFileName\r\t\"Delete the file with the given name in this directory.\"\r\r\tself deleteFileNamed: localFileName ifAbsent: [].\r! !\r\r!FileDirectory methodsFor: 'file operations' stamp: 'ar 12/12/2001 15:56'!\rdeleteFileNamed: localFileName ifAbsent: failBlock\r\t\"Delete the file of the given name if it exists, else evaluate failBlock.\r\tIf the first deletion attempt fails do a GC to force finalization of any lost references. ar 3/21/98 17:53\"\r\t| fullName |\r\tfullName _ self fullNameFor: localFileName.\r\t(StandardFileStream \r\t\tretryWithGC:[self primDeleteFileNamed: (self fullNameFor: localFileName)]\r\t\tuntil:[:result| result notNil]\r\t\tforFileNamed: fullName) == nil\r\t\t\tifTrue: [^failBlock value].\r! !\r\r!FileDirectory methodsFor: 'file operations' stamp: 'tpr 10/13/2003 10:59'!\rfileOrDirectoryExists: filenameOrPath\r\t\"Answer true if either a file or a directory file of the given name exists. The given name may be either a full path name or a local name within this directory.\"\r\t\"FileDirectory default fileOrDirectoryExists: Smalltalk sourcesName\"\r\r\t| fName dir |\r\tDirectoryClass splitName: filenameOrPath to:\r\t\t[:filePath :name |\r\t\t\tfName _ name.\r\t\t\tfilePath isEmpty\r\t\t\t\tifTrue: [dir _ self]\r\t\t\t\tifFalse: [dir _ FileDirectory on: filePath]].\r\r\t^ (dir includesKey: fName) or: [ fName = '' and:[ dir entries size > 1]]! !\r\r!FileDirectory methodsFor: 'file operations' stamp: 'ar 12/12/2001 15:57'!\rrename: oldFileName toBe: newFileName\r\t| selection oldName newName |\r\t\"Rename the file of the given name to the new name. Fail if there is no file of the old name or if there is an existing file with the new name.\"\r\t\"Modified for retry after GC ar 3/21/98 18:09\"\r\toldName _ self fullNameFor: oldFileName.\r\tnewName _ self fullNameFor: newFileName.\r\t(StandardFileStream \r\t\tretryWithGC:[self primRename: oldName to: newName]\r\t\tuntil:[:result| result notNil]\r\t\tforFileNamed: oldName) ~~ nil ifTrue:[^self].\r\t(self fileExists: oldFileName) ifFalse:[\r\t\t^self error:'Attempt to rename a non-existent file'.\r\t].\r\t(self fileExists: newFileName) ifTrue:[\r\t\tselection _ (PopUpMenu labels:\r'delete old version\rcancel')\r\t\t\t\tstartUpWithCaption: 'Trying to rename a file to be\r', newFileName , '\rand it already exists.'.\r\t\tselection = 1 ifTrue:\r\t\t\t[self deleteFileNamed: newFileName.\r\t\t\t^ self rename: oldFileName toBe: newFileName]].\r\t^self error:'Failed to rename file'.! !\r\r!FileDirectory methodsFor: 'file operations' stamp: 'jm 3/27/98 06:40'!\rsetMacFileNamed: fileName type: typeString creator: creatorString\r\t\"Set the Macintosh file type and creator info for the file with the given name. Fails if the file does not exist or if the type and creator type arguments are not strings of length 4. Does nothing on other platforms (where the underlying primitive is a noop).\"\r\t\"FileDirectory default setMacFileNamed: 'foo' type: 'TEXT' creator: 'ttxt'\"\r\r \tself primSetMacFileNamed: (self fullNameFor: fileName)\r\t\ttype: typeString\r\t\tcreator: creatorString.\r! !\r\r\r!FileDirectory methodsFor: 'file name utilities' stamp: 'jm 5/8/1998 20:48'!\rcheckName: aFileName fixErrors: fixing\r\t\"Check a string aFileName for validity as a file name. Answer the original file name if it is valid. If the name is not valid (e.g., it is too long or contains illegal characters) and fixing is false, raise an error. If fixing is true, fix the name (usually by truncating and/or tranforming characters), and answer the corrected name. The default behavior is just to truncate the name to the maximum length for this platform. Subclasses can do any kind of checking and correction appropriate for their platform.\"\r\r\t| maxLength |\r\taFileName size = 0 ifTrue: [self error: 'zero length file name'].\r\tmaxLength _ self class maxFileNameLength.\r\taFileName size > maxLength ifTrue: [\r\t\tfixing\r\t\t\tifTrue: [^ aFileName contractTo: maxLength]\r\t\t\tifFalse: [self error: 'file name is too long']].\r\r\t^ aFileName\r! !\r\r!FileDirectory methodsFor: 'file name utilities' stamp: 'jm 12/4/97 21:01'!\rfileNamesMatching: pat\r\t\"FileDirectory default fileNamesMatching: '*'\"\r\r\t^ self fileNames select: [:name | pat match: name]\r! !\r\r!FileDirectory methodsFor: 'file name utilities' stamp: 'tpr 10/13/2003 10:59'!\rfullNameFor: fileName\r\t\"Return a corrected, fully-qualified name for the given file name. If the given name is already a full path (i.e., it contains a delimiter character), assume it is already a fully-qualified name. Otherwise, prefix it with the path to this directory. In either case, correct the local part of the file name.\"\r\t\"Details: Note that path relative to a directory, such as '../../foo' are disallowed by this algorithm.  Also note that this method is tolerent of a nil argument -- is simply returns nil in this case.\"\r\r\t| correctedLocalName prefix |\r\tfileName ifNil: [^ nil].\r\tDirectoryClass splitName: fileName to:\r\t\t[:filePath :localName |\r\t\t\tcorrectedLocalName _ localName isEmpty \r\t\t\t\tifFalse: [self checkName: localName fixErrors: true]\r\t\t\t\tifTrue: [localName].\r\t\t\tprefix _ self fullPathFor: filePath].\r\tprefix isEmpty\r\t\tifTrue: [^correctedLocalName].\r\tprefix last = self pathNameDelimiter\r\t\tifTrue:[^ prefix, correctedLocalName]\r\t\tifFalse:[^ prefix, self slash, correctedLocalName]! !\r\r!FileDirectory methodsFor: 'file name utilities' stamp: 'djp 10/27/1999 09:01'!\rnextNameFor: baseFileName extension: extension\r\t\"Assumes a file name includes a version number encoded as '.' followed by digits \r\tpreceding the file extension.  Increment the version number and answer the new file name.\r\tIf a version number is not found, set the version to 1 and answer a new file name\"\r\r\t| files splits version |\r\r\tfiles _ self fileNamesMatching: (baseFileName,'*', self class dot, extension).\r\tsplits _ files \r\t\t\tcollect: [:file | self splitNameVersionExtensionFor: file]\r\t\t\tthenSelect: [:split | (split at: 1) = baseFileName].\r\tsplits _ splits asSortedCollection: [:a :b | (a at: 2) < (b at: 2)].\r\tsplits isEmpty \r\t\t\tifTrue: [version _ 1]\r\t\t\tifFalse: [version _ (splits last at: 2) + 1].\r\t^ (baseFileName, '.', version asString, self class dot, extension) asFileName! !\r\r!FileDirectory methodsFor: 'file name utilities' stamp: 'djp 10/27/1999 08:58'!\rsplitNameVersionExtensionFor: fileName\r\t\" answer an array with the root name, version # and extension.\r\tSee comment in nextSequentialNameFor: for more details\"\r\r\t| baseName version extension i j |\r\r\tbaseName _ self class baseNameFor: fileName.\r\textension _ self class extensionFor: fileName.\r\ti _ j _ baseName findLast: [:c | c isDigit not].\r\ti = 0\r\t\tifTrue: [version _ 0]\r\t\tifFalse:\r\t\t\t[(baseName at: i) = $.\r\t\t\t\tifTrue:\r\t\t\t\t\t[version _ (baseName copyFrom: i+1 to: baseName size) asNumber.\r\t\t\t\t\tj _ j - 1]\r\t\t\t\tifFalse: [version _ 0].\r\t\t\tbaseName _ baseName copyFrom: 1 to: j].\r\t^ Array with: baseName with: version with: extension! !\r\r!FileDirectory methodsFor: 'file name utilities' stamp: 'gk 2/10/2004 13:23'!\rurl\r\t\"Convert my path into a file:// type url String.\"\r\t\r\t^self asUrl toText! !\r\r\r!FileDirectory methodsFor: 'printing' stamp: 'jm 12/4/97 19:41'!\rprintOn: aStream \r\t\"Refer to the comment in Object|printOn:.\"\r\r\taStream nextPutAll: self class name.\r\taStream nextPutAll: ' on '.\r\tpathName printOn: aStream.\r! !\r\r\r!FileDirectory methodsFor: 'private' stamp: 'ar 5/30/2001 20:49'!\rdirectoryContentsFor: fullPath\r\t\"Return a collection of directory entries for the files and directories in the directory with the given path. See primLookupEntryIn:index: for further details.\"\r\t\"FileDirectory default directoryContentsFor: ''\"\r\r\t| entries index done entryArray |\r\tentries _ OrderedCollection new: 200.\r\tindex _ 1.\r\tdone _ false.\r\t[done] whileFalse: [\r\t\tentryArray _ self primLookupEntryIn: fullPath index: index.\r\t\t#badDirectoryPath = entryArray ifTrue: [\r\t\t\t^(InvalidDirectoryError pathName: pathName) signal].\r\t\tentryArray == nil\r\t\t\tifTrue: [done _ true]\r\t\t\tifFalse: [entries addLast: (DirectoryEntry fromArray: entryArray)].\r\t\tindex _ index + 1].\r\r\t^ entries asArray\r! !\r\r!FileDirectory methodsFor: 'private' stamp: 'ar 2/2/2001 15:09'!\rprimCreateDirectory: fullPath\r\t\"Create a directory named by the given path. Fail if the path is bad or if a file or directory by that name already exists.\"\r\r \t<primitive: 'primitiveDirectoryCreate' module: 'FilePlugin'>\r\tself primitiveFailed\r! !\r\r!FileDirectory methodsFor: 'private' stamp: 'ar 2/2/2001 15:09'!\rprimDeleteDirectory: fullPath\r\t\"Delete the directory named by the given path. Fail if the path is bad or if a directory by that name does not exist.\"\r\r \t<primitive: 'primitiveDirectoryDelete' module: 'FilePlugin'>\r\tself primitiveFailed\r! !\r\r!FileDirectory methodsFor: 'private' stamp: 'ar 2/2/2001 15:09'!\rprimDeleteFileNamed: aFileName\r\t\"Delete the file of the given name. Return self if the primitive succeeds, nil otherwise.\"\r\r\t<primitive: 'primitiveFileDelete' module: 'FilePlugin'>\r\t^ nil\r! !\r\r!FileDirectory methodsFor: 'private' stamp: 'ar 2/2/2001 15:09'!\rprimLookupEntryIn: fullPath index: index\r\t\"Look up the index-th entry of the directory with the given fully-qualified path (i.e., starting from the root of the file hierarchy) and return an array containing:\r\r\t<name> <creationTime> <modificationTime> <dirFlag> <fileSize>\r\r\tThe empty string enumerates the top-level files or drives. (For example, on Unix, the empty path enumerates the contents of '/'. On Macs and PCs, it enumerates the mounted volumes/drives.)\r\r\tThe creation and modification times are in seconds since the start of the Smalltalk time epoch. DirFlag is true if the entry is a directory. FileSize the file size in bytes or zero for directories. The primitive returns nil when index is past the end of the directory. It fails if the given path is bad.\"\r\r \t<primitive: 'primitiveDirectoryLookup' module: 'FilePlugin'>\r\t^ #badDirectoryPath\r\r! !\r\r!FileDirectory methodsFor: 'private' stamp: 'ar 2/2/2001 15:09'!\rprimRename: oldFileFullName to: newFileFullName \r\t\"Rename the file of the given name to the new name. Fail if there is no file of the old name or if there is an existing file with the new name.\r\tChanged to return nil instead of failing ar 3/21/98 18:04\"\r\r\t<primitive: 'primitiveFileRename' module: 'FilePlugin'>\r\t^nil! !\r\r!FileDirectory methodsFor: 'private' stamp: 'ar 2/2/2001 15:09'!\rprimSetMacFileNamed: fileName type: typeString creator: creatorString\r\t\"Set the Macintosh file type and creator info for the file with the given name. Fails if the file does not exist or if the type and creator type arguments are not strings of length 4. This primitive is Mac specific; it is a noop on other platforms.\"\r\r \t<primitive: 'primitiveDirectorySetMacTypeAndCreator' module: 'FilePlugin'>\r\tself primitiveFailed\r! !\r\r!FileDirectory methodsFor: 'private' stamp: 'jm 12/4/97 22:44'!\rsetPathName: pathString\r\r\tpathName _ pathString.\r! !\r\r\r!FileDirectory methodsFor: 'file directory' stamp: 'hg 2/2/2002 16:37'!\rassureExistence\r\t\"Make sure the current directory exists. If necessary, create all parts in between\"\r\r\tself containingDirectory assureExistenceOfPath: self localName! !\r\r!FileDirectory methodsFor: 'file directory' stamp: 'nk 3/13/2003 10:18'!\rassureExistenceOfPath: localPath\r\t\"Make sure the local directory exists. If necessary, create all parts in between\"\r\tlocalPath isEmpty ifTrue: [ ^self ]. \"Assumed to exist\"\r\t(self directoryExists: localPath) ifTrue: [^ self]. \"exists\"\r\t\"otherwise check parent first and then create local dir\"\r\tself containingDirectory assureExistenceOfPath: self localName.\r\tself createDirectory: localPath! !\r\r!FileDirectory methodsFor: 'file directory' stamp: 'RAA 7/28/2000 13:47'!\rlocalNameFor: fullName\r\t\"Return the local part the given name.\"\r\r\t^self class localNameFor: fullName! !\r\r!FileDirectory methodsFor: 'file directory' stamp: 'tk 12/13/1999 18:55'!\rsleep\r\t\"Leave the FileList window.  Do nothing.  Disk directories do not have to be shut down.\"\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rFileDirectory class\r\tinstanceVariableNames: ''!\r\r!FileDirectory class methodsFor: 'instance creation' stamp: 'jm 12/4/97 19:24'!\rdefault\r\t\"Answer the default directory.\"\r\r\t^ DefaultDirectory\r! !\r\r!FileDirectory class methodsFor: 'instance creation' stamp: 'ls 9/10/1998 00:59'!\rforFileName: aString\r\r\t| path |\r\tpath _ self dirPathFor: aString.\r\tpath isEmpty ifTrue: [^ self default].\r\t^ self on: path\r! !\r\r!FileDirectory class methodsFor: 'instance creation' stamp: 'tpr 10/13/2003 10:49'!\ron: pathString\r\t\"Return a new file directory for the given path, of the appropriate FileDirectory subclass for the current OS platform.\"\r\r\t| pathName |\r\tDirectoryClass ifNil: [self setDefaultDirectoryClass].\r\t\"If path ends with a delimiter (: or /) then remove it\"\r\t((pathName _ pathString) endsWith: self pathNameDelimiter asString) ifTrue: [\r\t\tpathName _ pathName copyFrom: 1 to: pathName size - 1].\r\t^ DirectoryClass new setPathName: pathName\r! !\r\r!FileDirectory class methodsFor: 'instance creation' stamp: 'jm 12/4/97 23:29'!\rroot\r\t\"Answer the root directory.\"\r\r\t^ self on: ''\r! !\r\r\r!FileDirectory class methodsFor: 'name utilities' stamp: 'tpr 3/6/2004 20:18'!\rbaseNameFor: fileName\r\t\"Return the given file name without its extension, if any. We have to remember that many (most?) OSs allow extension separators within directory names and so the leaf filename needs to be extracted, trimmed and rejoined. Yuck\"\r\t\"The test is \r\t\tFileDirectory baseNameFor: ((FileDirectory default directoryNamed: 'foo.bar') fullNameFor:'blim.blam') \r\t\tshould end 'foo.bar/blim' (or as appropriate for your platform AND\r\t\tFileDirectory baseNameFor: ((FileDirectory default directoryNamed: 'foo.bar') fullNameFor:'blim')\r\t\tshould be the same and NOT  'foo'\r\t\tOh, and FileDirectory baseNameFor: 'foo.bar' should be 'foo' not '/foo' \"\r\r\t| delim i leaf |\r\tself splitName: fileName to: [:path : fn|\r\t\t\r\t\tdelim _ DirectoryClass extensionDelimiter.\r\t\ti _ fn findLast: [:c | c = delim].\r\t\tleaf _ i = 0\r\t\t\tifTrue: [fn]\r\t\t\tifFalse: [fn copyFrom: 1 to: i - 1].\r\t\tpath isEmpty ifTrue:[^leaf].\r\t\t^path, self slash, leaf]\r! !\r\r!FileDirectory class methodsFor: 'name utilities' stamp: 'TPR 5/10/1998 21:32'!\rchangeSuffix\r\"if 'changes' is not suitable, override this message to return something that is ok\"\r\t^'changes'! !\r\r!FileDirectory class methodsFor: 'name utilities' stamp: 'jf 2/7/2004 17:22'!\rcheckName: fileName fixErrors: flag\r\t\"Check a string fileName for validity as a file name on the current default file system. Answer the original file name if it is valid. If the name is not valid (e.g., it is too long or contains illegal characters) and fixing is false, raise an error. If fixing is true, fix the name (usually by truncating and/or tranforming characters), and answer the corrected name. The default behavior is to truncate the name to 31 chars. Subclasses can do any kind of checking and correction appropriate to the underlying platform.\"\r\r\t^ DefaultDirectory\r\t\tcheckName: fileName\r\t\tfixErrors: flag\r! !\r\r!FileDirectory class methodsFor: 'name utilities' stamp: 'tpr 10/13/2003 10:59'!\rdirPathFor: fullName \r\t\"Return the directory part the given name.\"\r\tDirectoryClass\r\t\tsplitName: fullName\r\t\tto: [:dirPath :localName | ^ dirPath]! !\r\r!FileDirectory class methodsFor: 'name utilities' stamp: 'ar 4/7/2002 15:47'!\rdirectoryEntryFor: filenameOrPath\r\t^self default directoryEntryFor: filenameOrPath! !\r\r!FileDirectory class methodsFor: 'name utilities'!\rextensionFor: fileName\r\t\"Return the extension of given file name, if any.\"\r\r\t| delim i |\r\tdelim _ DirectoryClass extensionDelimiter.\r\ti _ fileName findLast: [:c | c = delim].\r\ti = 0\r\t\tifTrue: [^ '']\r\t\tifFalse: [^ fileName copyFrom: i + 1 to: fileName size].\r! !\r\r!FileDirectory class methodsFor: 'name utilities' stamp: 'TPR 5/10/1998 21:31'!\rimageSuffix\r\"if 'image' is not suitable, override this message to return something that is ok\"\r\t^'image'! !\r\r!FileDirectory class methodsFor: 'name utilities' stamp: 'tpr 10/13/2003 10:59'!\rlocalNameFor: fullName \r\t\"Return the local part the given name.\"\r\tDirectoryClass\r\t\tsplitName: fullName\r\t\tto: [:dirPath :localName | ^ localName]! !\r\r!FileDirectory class methodsFor: 'name utilities' stamp: 'bf 3/22/2000 18:04'!\rsplitName: fullName to: pathAndNameBlock\r\t\"Take the file name and convert it to the path name of a directory and a local file name within that directory. FileName must be of the form: <dirPath><delimiter><localName>, where <dirPath><delimiter> is optional. The <dirPath> part may contain delimiters.\"\r\r\t| delimiter i dirName localName |\r\tdelimiter _ self pathNameDelimiter.\r\t(i _ fullName findLast: [:c | c = delimiter]) = 0\r\t\tifTrue:\r\t\t\t[dirName _ String new.\r\t\t\tlocalName _ fullName]\r\t\tifFalse:\r\t\t\t[dirName _ fullName copyFrom: 1 to: (i - 1 max: 1).\r\t\t\tlocalName _ fullName copyFrom: i + 1 to: fullName size].\r\r\t^ pathAndNameBlock value: dirName value: localName! !\r\r!FileDirectory class methodsFor: 'name utilities' stamp: 'ssa 9/3/2008 11:25'!\rstartUp\r\t\"Establish the platform-specific FileDirectory subclass. Do any platform-specific startup.\"\r\tself setDefaultDirectoryClass.\r\r\tself setDefaultDirectory: (self dirPathFor: SmalltalkImage current imageName).\r\r\tPreferences startInUntrustedDirectory \r\t\tifTrue:[\r\t\t\t\tDefaultDirectory assureExistence].\r\tSmalltalkImage current openSourceFiles.\r! !\r\r\r!FileDirectory class methodsFor: 'create/delete file' stamp: 'tk 1/13/98 17:21'!\rdeleteFilePath: fullPathToAFile\r\t\"Delete the file after finding its directory\"\r\r\t| dir |\r\tdir _ self on: (self dirPathFor: fullPathToAFile).\r\tdir deleteFileNamed: (self localNameFor: fullPathToAFile).\r! !\r\r\r!FileDirectory class methodsFor: 'system start up' stamp: 'tpr 10/9/2003 16:27'!\ropenChanges: changesName forImage: imageName\r\"find the changes file by looking in\ra) the directory derived from the image name\rb) the DefaultDirectory (which will normally be the directory derived from the image name or the SecurityManager's choice)\rIf an old file is not found in either place, check for a read-only file in the same places. If that fails, return nil\"\r\t| changes fd |\r\t\"look for the changes file or an alias to it in the image directory\"\r\tfd _ FileDirectory on: (FileDirectory dirPathFor: imageName).\r\t(fd fileExists: changesName)\r\t\tifTrue: [changes _ fd oldFileNamed: changesName].\r\tchanges ifNotNil:[^changes].\r\r\t\"look for the changes in the default directory\"\r\tfd _ DefaultDirectory.\r\t(fd fileExists: changesName)\r\t\tifTrue: [changes _ fd oldFileNamed: changesName].\r\tchanges ifNotNil:[^changes].\r\r\t\"look for read-only changes in the image directory\"\r\tfd _ FileDirectory on: (FileDirectory dirPathFor: imageName).\r\t(fd fileExists: changesName)\r\t\tifTrue: [changes _ fd readOnlyFileNamed: changesName].\r\tchanges ifNotNil:[^changes].\r\r\t\"look for read-only changes in the default directory\"\r\tfd _ DefaultDirectory.\r\t(fd fileExists: changesName)\r\t\tifTrue: [changes _ fd readOnlyFileNamed: changesName].\r\t\"this may be nil if the last try above failed to open a file\"\r\t^changes\r! !\r\r!FileDirectory class methodsFor: 'system start up' stamp: 'tpr 12/15/2003 12:02'!\ropenSources: sourcesName andChanges: changesName forImage: imageName \r\t\"Open the changes and sources files and install them in SourceFiles. Inform the user of problems regarding write permissions or CR/CRLF mixups.\"\r\t\"Note: SourcesName and imageName are full paths; changesName is a  \r\tlocal name.\"\r\t| sources changes msg wmsg |\r\tmsg _ 'Squeak cannot locate &fileRef.\r\rPlease check that the file is named properly and is in the\rsame directory as this image.  \rFurther explanation can found\rin the startup window, ''How Squeak Finds Source Code''.'.\r\twmsg _ 'Squeak cannot write to &fileRef.\r\rPlease check that you have write permission for this file.\r\rYou won''t be able to save this image correctly until you fix this.'.\r\r\tsources _ self openSources: sourcesName forImage: imageName.\r\tchanges _ self openChanges: changesName forImage: imageName.\r\r\t((sources == nil or: [sources atEnd])\r\t\t\tand: [Preferences valueOfFlag: #warnIfNoSourcesFile])\r\t\tifTrue: [SmalltalkImage current platformName = 'Mac OS'\r\t\t\t\tifTrue: [msg _ msg , '\rMake sure the sources file is not an Alias.'].\rself inform: (msg copyReplaceAll: '&fileRef' with: 'the sources file named ' , sourcesName)].\r\r\t(changes == nil\r\t\t\tand: [Preferences valueOfFlag: #warnIfNoChangesFile])\r\t\tifTrue: [self inform: (msg copyReplaceAll: '&fileRef' with: 'the changes file named ' , changesName)].\r\r\t((Preferences valueOfFlag: #warnIfNoChangesFile) and: [changes notNil])\r\t\tifTrue: [changes isReadOnly\r\t\t\t\tifTrue: [self inform: (wmsg copyReplaceAll: '&fileRef' with: 'the changes file named ' , changesName)].\r\r\t\t\t((changes next: 200)\r\t\t\t\t\tincludesSubString: String crlf)\r\t\t\t\tifTrue: [self inform: 'The changes file named ' , changesName , '\rhas been injured by an unpacking utility.  Crs were changed to CrLfs.\rPlease set the preferences in your decompressing program to \r\"do not convert text files\" and unpack the system again.']].\r\r\tSourceFiles _ Array with: sources with: changes! !\r\r!FileDirectory class methodsFor: 'system start up' stamp: 'tpr 2/17/2004 19:59'!\ropenSources: fullSourcesName forImage: imageName \r\"We first do a check to see if a compressed version ofthe sources file is present.\rOpen the .sources file read-only after searching in:\ra) the directory where the VM lives\rb) the directory where the image came from\rc) the DefaultDirectory (which is likely the same as b unless the SecurityManager has changed it).\r\"\r\r\t| sources fd sourcesName |\r\t(fullSourcesName endsWith: 'sources') ifTrue:\r\t\t[\"Look first for a sources file in compressed format.\"\r\t\tsources _ self openSources: (fullSourcesName allButLast: 7) , 'stc'\r\t\t\t\t\t\tforImage: imageName.\r\t\tsources ifNotNil: [^ CompressedSourceStream on: sources]].\r\r\tsourcesName _ FileDirectory localNameFor: fullSourcesName.\r\t\"look for the sources file or an alias to it in the VM's directory\"\r\tfd _ FileDirectory on: SmalltalkImage current vmPath.\r\t(fd fileExists: sourcesName)\r\t\tifTrue: [sources _ fd readOnlyFileNamed: sourcesName].\r\tsources ifNotNil: [^ sources].\r\t\"look for the sources file or an alias to it in the image directory\"\r\tfd _ FileDirectory on: (FileDirectory dirPathFor: imageName).\r\t(fd fileExists: sourcesName)\r\t\tifTrue: [sources _ fd readOnlyFileNamed: sourcesName].\r\tsources ifNotNil: [^ sources].\r\t\"look for the sources in the current directory\"\r\tfd _ DefaultDirectory.\r\t(fd fileExists: sourcesName)\r\t\tifTrue: [sources _ fd readOnlyFileNamed: sourcesName].\r\t\"sources may still be nil here\"\r\t^sources\r! !\r\r!FileDirectory class methodsFor: 'system start up' stamp: 'tpr 10/13/2003 10:49'!\rsetDefaultDirectory: directoryName\r\t\"Initialize the default directory to the directory supplied. This method is called when the image starts up, very early in the #startUp sequence.\"\r\tDefaultDirectory _ self on: directoryName.! !\r\r!FileDirectory class methodsFor: 'system start up' stamp: 'tpr 10/13/2003 10:39'!\rsetDefaultDirectoryClass\r\t\"Initialize the default directory class to suit this platform. This method is called when the image starts up - it needs to be right at the front of the list of the startup sequence\"\r\r\tDirectoryClass _ self activeDirectoryClass\r! !\r\r!FileDirectory class methodsFor: 'system start up' stamp: 'sd 11/16/2003 13:13'!\rshutDown\r\r\tSmalltalkImage current closeSourceFiles.\r! !\r\r\r!FileDirectory class methodsFor: 'platform specific' stamp: 'jm 3/27/98 08:17'!\rdot\r\t\"Return a one-character string containing the filename extension delimiter for this platform (i.e., the local equivalent of 'dot')\"\r\r\t^ self extensionDelimiter asString\r! !\r\r!FileDirectory class methodsFor: 'platform specific' stamp: 'jm 3/27/98 06:57'!\rextensionDelimiter\r\t\"Return the character used to delimit filename extensions on this platform. Most platforms use the period (.) character.\"\r\r\t^ $.\r! !\r\r!FileDirectory class methodsFor: 'platform specific' stamp: 'ar 5/1/1999 01:48'!\risCaseSensitive\r\t\"Return true if file names are treated case sensitive\"\r\t^true! !\r\r!FileDirectory class methodsFor: 'platform specific' stamp: 'jm 5/8/1998 20:45'!\rmaxFileNameLength\r\r\t^ 31\r! !\r\r!FileDirectory class methodsFor: 'platform specific' stamp: 'TPR 5/12/1998 22:49'!\rpathNameDelimiter\r\"return the active directory class's directory seperator character\"\r\t^ DirectoryClass pathNameDelimiter! !\r\r!FileDirectory class methodsFor: 'platform specific' stamp: 'ar 4/18/1999 18:18'!\rslash\r\t^ self pathNameDelimiter asString! !\r\r\r!FileDirectory class methodsFor: 'private' stamp: 'TPR 5/10/1998 21:47'!\ractiveDirectoryClass\r\t\"Return the concrete FileDirectory subclass for the platform on which we are currently running.\"\r\r\tFileDirectory allSubclasses do: [:class |\r\t\tclass isActiveDirectoryClass ifTrue: [^ class]].\r\r\t\"no responding subclass; use FileDirectory\"\r\t^ FileDirectory\r! !\r\r!FileDirectory class methodsFor: 'private' stamp: 'TPR 5/10/1998 21:40'!\risActiveDirectoryClass\r\t\"Does this class claim to be that properly active subclass of FileDirectory for this platform?\r\tDefault test is whether the primPathNameDelimiter matches the one for this class. Other tests are possible\"\r\r\t^self pathNameDelimiter = self primPathNameDelimiter\r! !\r\r!FileDirectory class methodsFor: 'private' stamp: 'ar 2/2/2001 15:09'!\rprimPathNameDelimiter\r\t\"Return the path delimiter for the underlying platform's file system.\"\r\r \t<primitive: 'primitiveDirectoryDelimitor' module: 'FilePlugin'>\r\tself primitiveFailed\r! !\rFileStreamException subclass: #FileDoesNotExistException\r\tinstanceVariableNames: 'readOnly'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Exceptions Kernel'!\r\r!FileDoesNotExistException methodsFor: 'accessing' stamp: 'mir 7/25/2000 16:41'!\rreadOnly\r\t^readOnly == true! !\r\r!FileDoesNotExistException methodsFor: 'accessing' stamp: 'mir 7/25/2000 16:40'!\rreadOnly: aBoolean\r\treadOnly _ aBoolean! !\r\r\r!FileDoesNotExistException methodsFor: 'exceptionDescription' stamp: 'mir 7/25/2000 18:22'!\rdefaultAction\r\t\"The default action taken if the exception is signaled.\"\r\r\r\t^self readOnly\r\t\tifTrue: [StandardFileStream readOnlyFileDoesNotExistUserHandling: self fileName]\r\t\tifFalse: [StandardFileStream fileDoesNotExistUserHandling: self fileName]\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rFileDoesNotExistException class\r\tinstanceVariableNames: ''!\r\r!FileDoesNotExistException class methodsFor: 'examples' stamp: 'mir 2/29/2000 11:44'!\rexample\r\t\"FileDoesNotExistException example\"\r\r\t| result |\r\tresult _ [(StandardFileStream readOnlyFileNamed: 'error42.log') contentsOfEntireFile]\r\t\ton: FileDoesNotExistException\r\t\tdo: [:ex | 'No error log'].\r\tTranscript show: result; cr! !\rFileStreamException subclass: #FileExistsException\r\tinstanceVariableNames: 'fileClass'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Exceptions Kernel'!\r\r!FileExistsException methodsFor: 'accessing' stamp: 'LC 10/24/2001 21:49'!\rfileClass\r\t^ fileClass ifNil: [StandardFileStream]! !\r\r!FileExistsException methodsFor: 'accessing' stamp: 'LC 10/24/2001 21:42'!\rfileClass: aClass\r\tfileClass _ aClass! !\r\r\r!FileExistsException methodsFor: 'exceptionDescription' stamp: 'LC 10/24/2001 21:50'!\rdefaultAction\r\t\"The default action taken if the exception is signaled.\"\r\r\t^ self fileClass fileExistsUserHandling: self fileName\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rFileExistsException class\r\tinstanceVariableNames: ''!\r\r!FileExistsException class methodsFor: 'exceptionInstantiator' stamp: 'LC 10/24/2001 21:50'!\rfileName: aFileName fileClass: aClass \r\t^ self new\r\t\tfileName: aFileName;\r\t\tfileClass: aClass! !\rStringHolder subclass: #FileList\r\tinstanceVariableNames: 'fileName directory volList volListIndex list listIndex pattern sortMode brevityState'\r\tclassVariableNames: 'FileReaderRegistry RecentDirs'\r\tpoolDictionaries: ''\r\tcategory: 'Tools-FileList'!\r!FileList commentStamp: 'nk 11/26/2002 11:52' prior: 0!\rI am model that can be used to navigate the host file system. By omitting the volume list, file list, and template panes from the view, I can also be used as the model for an editor on an individual file.\r\rThe FileList now provides a registration mechanism to which any tools the filelist uses ***MUST*** register.  This way it is possible to dynamically load or unload a new tool and have the FileList automatically updated.  This change supports a decomposition of Squeak and removes a problem with dead reference to classes after a major shrink.\r\rTools should implement the following methods (look for implementors in the image):\r\r#fileReaderServicesForFile:suffix: (appropriate services for given file, takes a file name and a lowercased suffix)\r\r#services (all provided services, to be displayed in full list)\r\rThese methods both return a collection of SimpleServiceEntry instances.  These contain a class, a menu label and a method selector having one argument.  They may also provide separate button labels and description.\r\rThe argument to the specified method will be a string representing the full name of a file when one is selected or the file list itself when there is no selected file.\r\rTools must register with the FileList calling the class method #registerFileReader: when they load. They also must call #unregisterFileReader: when they unload.\r\rThere is a testSuite called FileListTest that presents some examples. \r\rStef (I do not like really this distinction passing always a file list could be better)\r\r\rOld Comments: \r\r\rFileLists can now see FTP servers anywhere on the net.  In the volume list menu: \rfill in server info...\t\tGives you a form to register a new ftp server you want to use.\ropen server...\t\tChoose a server to connect to.\rlocal disk\t\t\tGo back to looking at your local volume.\r\r\rStill undone (you can contribute code):\r[ ] Using a Proxy server to get out through a firewall.  What is the convention for proxy servers with FTP?\r[ ] Fill in the date and size info in the list of remote files.  Allow sorting by it.  New smarts needed in (ServerDirectory fileNameFormattedFrom:sizePad:sortMode:).\r[ ] Currently the FileList has no way to delete a directory.  Since you can't select a directory without going into it, it would have to be deleting the current directory.  Which would usually be empty.!\r\r\r!FileList methodsFor: 'drag''n''drop' stamp: 'nk 6/19/2003 10:08'!\racceptDroppingMorph: aTransferMorph event: evt inMorph: dest\r\t| oldName oldEntry destDirectory newName newEntry baseName response |\r\tdestDirectory _ self dropDestinationDirectory: dest event: evt.\r\toldName _ aTransferMorph passenger.\r\tbaseName _ FileDirectory localNameFor: oldName.\r\tnewName _ destDirectory fullNameFor: baseName.\r\tnewName = oldName ifTrue: [ \"Transcript nextPutAll: 'same as old name'; cr.\" ^ true ].\r\toldEntry _ FileDirectory directoryEntryFor: oldName.\r\tnewEntry _ FileDirectory directoryEntryFor: newName.\r\tnewEntry ifNotNil: [ | msg |\r\t\tmsg _ String streamContents: [ :s |\r\t\t\ts nextPutAll: 'destination file ';\r\t\t\t\tnextPutAll: newName;\r\t\t\t\tnextPutAll: ' exists already,';\r\t\t\t\tcr;\r\t\t\t\tnextPutAll: 'and is ';\r\t\t\t\tnextPutAll: (oldEntry modificationTime < newEntry modificationTime\r\t\t\t\t\tifTrue: [ 'newer' ] ifFalse: [ 'not newer' ]);\r\t\t\t\tnextPutAll: ' than source file ';\r\t\t\t\tnextPutAll: oldName;\r\t\t\t\tnextPut: $.;\r\t\t\t\tcr;\r\t\t\t\tnextPutAll: 'Overwrite file ';\r\t\t\t\tnextPutAll: newName;\r\t\t\t\tnextPut: $?\r\t\t].\r\t\tresponse _ self confirm: msg.\r\t\tresponse ifFalse: [ ^false ].\r\t].\r\r\taTransferMorph shouldCopy\r\t\tifTrue: [ self primitiveCopyFileNamed: oldName to: newName ]\r\t\tifFalse: [ directory rename: oldName toBe: newName ].\r\r\tself updateFileList; fileListIndex: 0.\r\r\taTransferMorph source model ~= self\r\t\tifTrue: [ aTransferMorph source model updateFileList; fileListIndex: 0 ].\r\t\"Transcript nextPutAll: 'copied'; cr.\"\r\t^true! !\r\r!FileList methodsFor: 'drag''n''drop' stamp: 'nk 6/14/2003 12:58'!\rdragPassengerFor: item inMorph: dragSource\r\t^self directory fullNameFor: ((self fileNameFromFormattedItem: item contents copy)\r\t\tcopyReplaceAll: self folderString with: '').\r! !\r\r!FileList methodsFor: 'drag''n''drop' stamp: 'nk 6/14/2003 11:16'!\rdragTransferTypeForMorph: aMorph\r\t^#file! !\r\r!FileList methodsFor: 'drag''n''drop' stamp: 'nk 6/15/2003 13:07'!\rdropDestinationDirectory: dest event: evt \r\t\"Answer a FileDirectory representing the drop destination in the volume list morph dest\"\r\t| index dir delim path |\r\tindex _ volList indexOf: (dest itemFromPoint: evt position) contents.\r\tindex = 1\r\t\tifTrue: [dir _ FileDirectory on: '']\r\t\tifFalse: [delim _ directory pathNameDelimiter.\r\t\t\tpath _ String\r\t\t\t\t\t\tstreamContents: [:str | \r\t\t\t\t\t\t\t2\r\t\t\t\t\t\t\t\tto: index\r\t\t\t\t\t\t\t\tdo: [:d | \r\t\t\t\t\t\t\t\t\tstr nextPutAll: (volList at: d) withBlanksTrimmed.\r\t\t\t\t\t\t\t\t\td < index\r\t\t\t\t\t\t\t\t\t\tifTrue: [str nextPut: delim]].\r\t\t\t\t\t\t\tnil].\r\t\t\tdir _ directory on: path].\r\t^ dir! !\r\r!FileList methodsFor: 'drag''n''drop' stamp: 'nk 6/15/2003 21:58'!\risDirectoryList: aMorph\r\t^aMorph getListSelector == #volumeList! !\r\r!FileList methodsFor: 'drag''n''drop' stamp: 'nk 6/12/2004 16:17'!\rprimitiveCopyFileNamed: srcName to: dstName \r\t\"Copied from VMMaker code.\r\tThis really ought to be a facility in file system. The major annoyance \r\there is that file types and permissions are not handled by current \r\tSqueak code.\r\tNOTE that this will clobber the destination file!!\"\r\t| buffer src dst |\r\t<primitive: 'primitiveFileCopyNamedTo' module:'FileCopyPlugin'> \"primitiveExternalCall\" \r\t\"If the plugin doesn't do it, go the slow way and lose the filetype info\"\r\t\"This method may signal FileDoesNotExistException if either the source or \r\tdest files cannnot be opened; possibly permissions or bad name problems\"\r\t[[src _ FileStream readOnlyFileNamed: srcName]\r\t\ton: FileDoesNotExistException\r\t\tdo: [^ self error: ('could not open file ', srcName)].\r\t[dst _ FileStream forceNewFileNamed: dstName]\r\t\ton: FileDoesNotExistException\r\t\tdo: [^ self error: ('could not open file ', dstName)].\r\tbuffer _ String new: 50000.\r\t[src atEnd]\r\t\twhileFalse: [dst\r\t\t\t\tnextPutAll: (src nextInto: buffer)]]\r\t\tensure: [src\r\t\t\t\tifNotNil: [src close].\r\t\t\tdst\r\t\t\t\tifNotNil: [dst close]]! !\r\r\r!FileList methodsFor: 'file list'!\rfileList\r\t\"Answer the list of files in the current volume.\"\r\r\t^ list! !\r\r!FileList methodsFor: 'file list'!\rfileListIndex\r\t\"Answer the index of the currently selected file.\"\r\r\t^ listIndex! !\r\r!FileList methodsFor: 'file list' stamp: 'BG 10/29/2003 10:05'!\rfileListIndex: anInteger\r\t\"Select the file name having the given index, and display its contents.\"\r\r\t| item name |\r\tself okToChange ifFalse: [^ self].\r\tlistIndex := anInteger.\r\tlistIndex = 0 \r\t\tifTrue: [fileName := nil]\r\t\tifFalse:\r\t\t\t[item := self fileNameFromFormattedItem: (list at: anInteger).\r\t\t\t(item endsWith: self folderString)\r\t\t\t\tifTrue:\r\t\t\t\t\t[\"remove [...] folder string and open the folder\"\r\t\t\t\t\tname := item copyFrom: 1 to: item size - self folderString size.\r\t\t\t\t\tlistIndex := 0.\r\t\t\t\t\tbrevityState := #FileList.\r\t\t\t\t\tself addPath: name.\r\t\t\t\t\tname first = $^\r\t\t\t\t\t\tifTrue: [self halt. \"self directory: (ServerDirectory serverNamed: name allButFirst)\"]\r\t\t\t\t\t\tifFalse: [volListIndex = 1 ifTrue: [name _ name, directory slash].\r\t\t\t\t\t\t\tself directory: (directory directoryNamed: name)]]\r\t\t\t\tifFalse: [fileName := item]].  \"open the file selected\"\r\r\tbrevityState := #needToGetBrief.\r\tself changed: #fileListIndex.\r\tself changed: #contents.\r\tself updateButtonRow! !\r\r!FileList methodsFor: 'file list' stamp: 'sd 2/14/2002 16:58'!\rfileName\r\r\t^ fileName! !\r\r!FileList methodsFor: 'file list' stamp: 'nk 4/29/2004 10:34'!\rreadOnlyStream\r\t\"Answer a read-only stream on the selected file. For the various stream-reading services.\"\r\r\t^self directory ifNotNilDo: [ :dir | dir readOnlyFileNamed: self fileName ]! !\r\r\r!FileList methodsFor: 'file list menu' stamp: 'RAA 2/2/2002 08:18'!\rdirAndFileName\r\r\t^{directory. fileName}! !\r\r!FileList methodsFor: 'file list menu' stamp: 'dgd 9/19/2003 11:20'!\rfileContentsMenu: aMenu shifted: shifted\r\t\"Construct aMenu to have items appropriate for the file browser's code pane, given the shift state provided\"\r\r\t| shiftMenu services maybeLine extraLines |\r\tshifted ifTrue:\r\t\t[shiftMenu _ ParagraphEditor shiftedYellowButtonMenu.\r\t\t^ aMenu \r\t\t\tlabels: shiftMenu labelString \r\t\t\tlines: shiftMenu lineArray\r\t\t\tselections: shiftMenu selections].\r\tfileName ifNotNil:\r\t\t[services _ OrderedCollection new.\r\t\t(#(briefHex briefFile needToGetBriefHex needToGetBrief) includes: brevityState) ifTrue:\r\t\t\t[services add: self serviceGet].\r\t\t(#(fullHex briefHex needToGetFullHex needToGetBriefHex) includes: brevityState) ifFalse:\r\t\t\t[services add: self serviceGetHex].\r\t\tmaybeLine _ services size.\r\t\t(#('st' 'cs') includes: self suffixOfSelectedFile) ifTrue:\r\t\t\t[services addAll:\r\t\t\t\t(self servicesFromSelectorSpecs:\r\t\t\t\t\t#(fileIntoNewChangeSet: fileIn: browseChangesFile: browseFile:))].\r\r\t\textraLines _ OrderedCollection new.\r\t\tmaybeLine > 0 ifTrue: [extraLines add: maybeLine].\r\t\tservices size > maybeLine ifTrue: [extraLines add: services size].\r\t\taMenu \r\t\t\taddServices: services\r\t\t\tfor: self fullName\r\t\t\textraLines: extraLines].\r\r\taMenu addList: {\r\t\t\t{'find...(f)' translated.\t\t#find}.\r\t\t\t{'find again (g)' translated.\t\t#findAgain}.\r\t\t\t{'set search string (h)' translated.\t#setSearchString}.\r\t\t\t#-.\r\t\t\t{'do again (j)' translated.\t\t#again}.\r\t\t\t{'undo (z)' translated.\t\t\t#undo}.\r\t\t\t#-.\r\t\t\t{'copy (c)' translated.\t\t\t#copySelection}.\r\t\t\t{'cut (x)' translated.\t\t\t#cut}.\r\t\t\t{'paste (v)' translated.\t\t#paste}.\r\t\t\t{'paste...' translated.\t\t\t#pasteRecent}.\r\t\t\t#-.\r\t\t\t{'do it (d)' translated.\t\t#doIt}.\r\t\t\t{'print it (p)' translated.\t\t#printIt}.\r\t\t\t{'inspect it (i)' translated.\t\t#inspectIt}.\r\t\t\t{'fileIn selection (G)' translated.\t#fileItIn}.\r\t\t\t#-.\r\t\t\t{'accept (s)' translated.\t\t#accept}.\r\t\t\t{'cancel (l)' translated.\t\t#cancel}.\r\t\t\t#-.\r\t\t\t{'more...' translated.\t\t\t#shiftedYellowButtonActivity}}.\r\r\r\t^ aMenu\r! !\r\r!FileList methodsFor: 'file list menu' stamp: 'LEG 10/24/2001 15:37'!\rfileListMenu: aMenu\r\r\tfileName\r\t\tifNil: [^ self noFileSelectedMenu: aMenu]\r\t\tifNotNil: [^ self fileSelectedMenu: aMenu].\r! !\r\r!FileList methodsFor: 'file list menu' stamp: 'nk 11/16/2002 13:00'!\rfileSelectedMenu: aMenu\r\r\t| firstItems secondItems thirdItems n1 n2 n3 services |\r\tfirstItems _ self itemsForFile: self fullName.\r\tsecondItems _ self itemsForAnyFile.\r\tthirdItems _ self itemsForNoFile.\r\tn1 _ firstItems size.\r\tn2 _ n1 + secondItems size.\r\tn3 _ n2 + thirdItems size.\r\tservices _ firstItems, secondItems, thirdItems, self serviceAllFileOptions.\r\tservices do: [ :svc | svc addDependent: self ].\r\t^ aMenu \r\t\taddServices2: services \r\t\tfor: self\r\t\textraLines: (Array with: n1 with: n2 with: n3)\r! !\r\r!FileList methodsFor: 'file list menu' stamp: 'ssa 9/3/2008 11:18'!\rfullFileListMenu: aMenu shifted: aBoolean\r\t\"Fill the menu with all possible items for the file list pane, regardless of selection.\"\r\r\t| services servicesPlus extraLines linePointer |\r\taMenu title: 'all possible file operations'.\r\tservicesPlus := self servicesFromSelectorSpecs:  #(\r\t\tfromFileName: openFromFile:  \r\t\t-\r\t\topenOn: fileIntoNewChangeSet: fileIn: browseChangesFile: browseRecentLogOnPath:\r\t\t-\r\t\tviewContents: saveContents: openOn:\r\t\t-\r\t\t\r\t\tremoveLineFeeds: ).\r\textraLines _ OrderedCollection new.\r\tlinePointer _ 1.\r\tservices _ OrderedCollection new.\r\tservicesPlus doWithIndex:\r\t\t[:svc :ind |\r\t\t\tsvc == #-\r\t\t\t\tifTrue:\r\t\t\t\t\t[extraLines add: linePointer - 1]\r\t\t\t\tifFalse:\r\t\t\t\t\t[services add: svc.\r\t\t\t\t\tlinePointer _ linePointer + 1]].\r\taMenu \r\t\taddServices: services \r\t\tfor: self fullName\r\t\textraLines: extraLines! !\r\r!FileList methodsFor: 'file list menu' stamp: 'sw 11/8/2003 13:32'!\ritemsForAnyFile\r\t\"Answer a list of universal services that could apply to any file\"\r\t\r\t| services |\r\tservices := OrderedCollection new: 4.\r\tservices add: self serviceCopyName. \r\tservices add: self serviceRenameFile. \r\tservices add: self serviceDeleteFile.\r\tservices add: self serviceViewContentsInWorkspace.\r\t^ services! !\r\r!FileList methodsFor: 'file list menu' stamp: 'nk 12/7/2002 12:56'!\ritemsForFile: fullName\r\t\"Answer a list of services appropriate for a file of the given full name\"\r\t| suffix |\r\tsuffix _ self class suffixOf: fullName.\r\t^ (self class itemsForFile: fullName) , (self myServicesForFile: fullName suffix: suffix)! !\r\r!FileList methodsFor: 'file list menu' stamp: 'sd 1/31/2002 12:08'!\ritemsForNoFile\r\r\t| services |\r\tservices := OrderedCollection new: 6.\r\tservices add: self serviceSortByName.\r\tservices add: self serviceSortBySize.\r\tservices add: (self serviceSortByDate useLineAfter: true).\r\t(self isFileSelected not and: [self class isReaderNamedRegistered: #FileContentsBrowser])\r\t\t\tifTrue:[ services add: (self serviceBrowseCodeFiles useLineAfter: true)].\r\tservices add: self serviceAddNewFile.\r\tservices add: self serviceAddNewDirectory.\r\t^ services\r\r\t\t! !\r\r!FileList methodsFor: 'file list menu' stamp: 'BG 11/2/2003 21:04'!\rmyServicesForFile: fullName suffix: suffix\r\r\t^(FileStream isSourceFileSuffix: suffix)\r\t\tifTrue: [ #() ]\r\t\tifFalse: [ #() ]! !\r\r!FileList methodsFor: 'file list menu' stamp: 'SD 11/8/2001 20:34'!\rnoFileSelectedMenu: aMenu\r\r\t^ aMenu\r\t\taddServices: self itemsForNoFile \r\t\tfor: self\r\t\textraLines: #()\r\t\t\r! !\r\r!FileList methodsFor: 'file list menu' stamp: 'sw 2/27/2001 13:52'!\rofferAllFileOptions\r\t\"Put up a menu offering all possible file options, whatever the suffix of the current selection may be.  Specially useful if you're wanting to keep the menu up\"\r\r\tself offerMenuFrom: #fullFileListMenu:shifted: shifted: true! !\r\r!FileList methodsFor: 'file list menu' stamp: 'nk 12/7/2002 12:57'!\rsuffixOfSelectedFile\r\t\"Answer the file extension of the receiver's selected file\"\r\t^ self class suffixOf: self fullName.! !\r\r\r!FileList methodsFor: 'file menu action' stamp: 'dgd 12/27/2003 12:18'!\raddNew: aString byEvaluating: aBlock\r\t\"A parameterization of earlier versions of #addNewDirectory and\r\t#addNewFile.  Fixes the bug in each that pushing the cancel button\r\tin the FillInTheBlank dialog gave a walkback.\"\r\r\t| response newName index ending |\r\tself okToChange ifFalse: [^ self].\r\t(response := FillInTheBlank\r\t\t\t\t\t\trequest: ('New {1} Name?' translated format: {aString translated})\r\t\t\t\t\t\tinitialAnswer: ('{1}Name' translated format: {aString translated}))\r\t\tisEmpty ifTrue: [^ self].\r\tnewName := response asFileName.\r\tCursor wait showWhile: [\r\t\taBlock value: newName].\r\tself updateFileList.\r\tindex := list indexOf: newName.\r\tindex = 0 ifTrue: [ending := ') ',newName.\r\t\tindex := list findFirst: [:line | line endsWith: ending]].\r\tself fileListIndex: index.\r! !\r\r!FileList methodsFor: 'file menu action' stamp: 'sge 11/28/1999 09:04'!\raddNewDirectory\r\tself \r\t\taddNew: 'Directory'\r\t\tbyEvaluating: [:newName | directory createDirectory: newName]\r! !\r\r!FileList methodsFor: 'file menu action' stamp: 'sge 11/28/1999 09:04'!\raddNewFile\r\tself \r\t\taddNew: 'File'\r\t\tbyEvaluating: [:newName | (directory newFileNamed: newName) close]\r! !\r\r!FileList methodsFor: 'file menu action' stamp: 'dgd 9/21/2003 17:37'!\rdeleteFile\r\t\"Delete the currently selected file\"\r\tlistIndex = 0 ifTrue: [^ self].\r\t(self confirm: ('Really delete {1}?' translated format:{fileName})) ifFalse: [^ self].\r\tdirectory deleteFileNamed: fileName.\r\tself updateFileList.\r\tbrevityState _ #FileList.\r\tself get! !\r\r!FileList methodsFor: 'file menu action' stamp: 'jm 5/3/1998 18:03'!\rget\r\t\"Get contents of file again, it may have changed. Do this by making the cancel string be the contents, and doing a cancel.\"\r\r\tCursor read showWhile: [\r\t\tself okToChange ifFalse: [^ nil].\r\t\tbrevityState == #briefHex\r\t\t\tifTrue: [brevityState _ #needToGetFullHex]\r\t\t\tifFalse: [brevityState _ #needToGetFull].\r\t\tself changed: #contents].\r! !\r\r!FileList methodsFor: 'file menu action' stamp: 'jm 5/3/1998 18:04'!\rgetHex\r\t\"Get contents of file again, and display in Hex. Do this by making the cancel string be the contents, and doing a cancel.\"\r\r\tCursor read showWhile: [\r\t\tbrevityState _ #needToGetBriefHex.\r\t\tself changed: #contents].\r! !\r\r!FileList methodsFor: 'file menu action' stamp: 'dgd 12/27/2003 12:20'!\rrenameFile\r\t\"Rename the currently selected file\"\r\t| newName response |\r\tlistIndex = 0 ifTrue: [^ self].\r\tself okToChange ifFalse: [^ self].\r\t(response _ FillInTheBlank request: 'NewFileName?' translated\r \t\t\t\t\tinitialAnswer: fileName)\r\t\tisEmpty ifTrue: [^ self].\r\tnewName _ response asFileName.\r\tnewName = fileName ifTrue: [^ self].\r\tdirectory rename: fileName toBe: newName.\r\tself updateFileList.\r\tlistIndex _ list findFirst: [:item | (self fileNameFromFormattedItem: item) = newName].\r\tlistIndex > 0 ifTrue: [fileName _ newName].\r\tself changed: #fileListIndex.\r! !\r\r!FileList methodsFor: 'file menu action' stamp: 'di 4/15/98 12:36'!\rsortByDate\r\tself resort: #date! !\r\r!FileList methodsFor: 'file menu action' stamp: 'di 4/15/98 12:37'!\rsortByName\r\tself resort: #name! !\r\r!FileList methodsFor: 'file menu action' stamp: 'di 4/15/98 12:36'!\rsortBySize\r\tself resort: #size! !\r\r!FileList methodsFor: 'file menu action' stamp: 'sd 2/1/2002 20:02'!\rspawn: code\r\t\"Open a simple Edit window\"\r\r\tlistIndex = 0 ifTrue: [^ self].\r\tself class openEditorOn: (directory readOnlyFileNamed: fileName)\r\t\t\t\t\"read only just for initial look\"\r\t\t\teditString: code! !\r\r\r!FileList methodsFor: 'initialization' stamp: 'sw 11/30/2002 00:05'!\rbuttonSelectorsToSuppress\r\t\"Answer a list of action selectors whose corresponding services we would prefer *not* to have appear in the filelist's button pane; this can be hand-jimmied to suit personal taste.\"\r\r\t^ #(removeLineFeeds: addFileToNewZip: compressFile: putUpdate:)! !\r\r!FileList methodsFor: 'initialization' stamp: 'BG 12/13/2002 15:32'!\rdirectory: dir\r\t\"Set the path of the volume to be displayed.\"\r\r\tself okToChange ifFalse: [^ self].\r\r\tself modelSleep.\r\tdirectory _ dir.\r\tself modelWakeUp.\r\r\tsortMode == nil ifTrue: [sortMode _ #date].\r\tvolList _ ((Array with: '[]'), directory pathParts)  \"Nesting suggestion from RvL\"\r\t\t\twithIndexCollect: [:each :i | ( String new: i-1 withAll: $ ), each].\r\tvolListIndex := volList size.\r\tself changed: #relabel.\r\tself changed: #volumeList.\r\tself pattern: pattern! !\r\r!FileList methodsFor: 'initialization' stamp: 'sw 2/26/2002 00:37'!\rdynamicButtonServices\r\t\"Answer services for buttons that may come and go in the button pane, depending on selection\"\r\r\t^ fileName isEmptyOrNil\r\t\tifTrue:\r\t\t\t[#()]\r\t\tifFalse:\r\t\t\t[ | toReject |\r\t\t\t\ttoReject _ self buttonSelectorsToSuppress.\r\t\t\t\t(self itemsForFile: self fullName) reject:\r\t\t\t\t\t[:svc | toReject includes: svc selector]]! !\r\r!FileList methodsFor: 'initialization' stamp: 'tk 5/18/1998 17:22'!\rlabelString\r\t^ directory pathName contractTo: 50! !\r\r!FileList methodsFor: 'initialization' stamp: 'tk 12/17/1999 18:00'!\rmodelSleep\r\t\"User has exited or collapsed the window -- close any remote connection.\"\r\r\tdirectory ifNotNil: [directory sleep]! !\r\r!FileList methodsFor: 'initialization' stamp: 'BG 10/29/2003 10:06'!\rmodelWakeUp\r\t\"User has entered or expanded the window -- reopen any remote connection.\"\r\r\"\t(directory isKindOf: ServerDirectory) \r\t\tifTrue: [directory wakeUp] \" \"It would be good to implement a null method wakeUp on the root of directory\"! !\r\r!FileList methodsFor: 'initialization' stamp: 'sbw 12/30/1999 15:53'!\roptionalButtonHeight\r\r\t^ 15! !\r\r!FileList methodsFor: 'initialization' stamp: 'sw 2/17/2002 00:07'!\roptionalButtonSpecs\r\t\"Answer a list of services underlying the optional buttons in their initial inception.\"\r\r\t^ {self serviceSortByName. self serviceSortByDate. self serviceSortBySize}! !\r\r!FileList methodsFor: 'initialization' stamp: 'sw 2/17/2002 05:39'!\roptionalButtonView\r\t\"Answer a view of optional buttons\"\r\r\t| aView bHeight windowWidth offset previousView aButtonView wid services sel allServices |\r\taView _ View new model: self.\r\tbHeight _ self optionalButtonHeight.\r\twindowWidth _ 120.\r\taView window: (0 @ 0 extent: windowWidth @ bHeight).\r\toffset _ 0.\r\tallServices _ self universalButtonServices.\r\tservices _ allServices copyFrom: 1 to: (allServices size min: 5).\r\tpreviousView _ nil.\r\tservices\r\t\tdo: [:service | sel _ service selector.\r\t\taButtonView _ sel asString numArgs = 0\r\t\t\tifTrue: [PluggableButtonView\r\t\t\t\t\ton: service provider\r\t\t\t\t\tgetState: (service extraSelector == #none\r\t\t\t\t\t\t\tifFalse: [service extraSelector])\r\t\t\t\t\taction: sel]\r\t\t\tifFalse: [PluggableButtonView\r\t\t\t\t\ton: service provider\r\t\t\t\t\tgetState: (service extraSelector == #none\r\t\t\t\t\t\t\tifFalse: [service extraSelector])\r\t\t\t\t\taction: sel\r\t\t\t\t\tgetArguments: #fullName\r\t\t\t\t\tfrom: self].\r\t\tservice selector = services last selector\r\t\t\tifTrue: [wid _ windowWidth - offset]\r\t\t\tifFalse: [aButtonView\r\t\t\t\t\tborderWidthLeft: 0\r\t\t\t\t\tright: 1\r\t\t\t\t\ttop: 0\r\t\t\t\t\tbottom: 0.\r\t\t\t\twid _ windowWidth // services size - 2].\r\t\taButtonView label: service buttonLabel asParagraph;\r\t\t\twindow: (offset @ 0 extent: wid @ bHeight).\r\t\toffset _ offset + wid.\r\t\tservice selector = services first selector\r\t\t\tifTrue: [aView addSubView: aButtonView]\r\t\t\tifFalse: [aView addSubView: aButtonView toRightOf: previousView].\r\t\tpreviousView _ aButtonView].\r\t^ aView! !\r\r!FileList methodsFor: 'initialization' stamp: 'di 5/11/1999 22:25'!\rrelease\r\r\tself modelSleep! !\r\r!FileList methodsFor: 'initialization' stamp: 'tk 5/21/1998 12:28'!\rsetFileStream: aStream\r\t\"Used to initialize a spawned file editor.  Sets directory too.\"\r\r\tself directory: aStream directory.\r\tfileName _ aStream localName.\r\tpattern _ '*'.\r\tlistIndex _ 1.  \"pretend a file is selected\"\r\taStream close.\r\tbrevityState _ #needToGetBrief.\r\tself changed: #contents.\r! !\r\r!FileList methodsFor: 'initialization' stamp: 'sw 2/17/2002 05:38'!\runiversalButtonServices\r\t\"Answer a list of services underlying the universal buttons in their initial inception.  For the moment, only the sorting buttons are shown.\"\r\r\t^ {self serviceSortByName. self serviceSortByDate. self serviceSortBySize}! !\r\r!FileList methodsFor: 'initialization' stamp: 'BG 10/28/2003 20:45'!\rupdateButtonRow\r\t\"Dynamically update the contents of the button row, if any.\"\r\r! !\r\r\r!FileList methodsFor: 'menu messages' stamp: 'ar 1/15/2001 18:38'!\rcopyName\r\r\tlistIndex = 0 ifTrue: [^ self].\r\tClipboard clipboardText: self fullName asText.\r! !\r\r\r!FileList methodsFor: 'own services' stamp: 'sw 2/15/2002 19:07'!\rserviceAddNewDirectory\r\t\"Answer a service entry characterizing the 'add new directory' command\"\r\r\t^ SimpleServiceEntry \r\t\tprovider: self \r\t\tlabel: 'add new directory' \r\t\tselector: #addNewDirectory\r\t\tdescription: 'adds a new, empty directory (folder)' ! !\r\r!FileList methodsFor: 'own services' stamp: 'sw 2/11/2002 23:36'!\rserviceAddNewFile\r\t\"Answer a service entry characterizing the 'add new file' command\"\r\r\t^ SimpleServiceEntry provider: self label: 'add new file' selector: #addNewFile description: 'create a new,. empty file, and add it to the current directory.'! !\r\r!FileList methodsFor: 'own services' stamp: 'sd 1/31/2002 22:12'!\rserviceAllFileOptions\r\r\t^ {SimpleServiceEntry provider: self label: 'more...' selector: #offerAllFileOptions description: 'show all the options available'}! !\r\r!FileList methodsFor: 'own services' stamp: 'sw 2/17/2002 01:36'!\rserviceBroadcastUpdate\r\t\"Answer a service for broadcasting a file as an update\"\r\r\t^ SimpleServiceEntry\r\t\tprovider: self \r\t\tlabel: 'broadcast as update'\r\t\tselector: #putUpdate:\r\t\tdescription: 'broadcast file as update'\r\t\tbuttonLabel: 'broadcast'! !\r\r!FileList methodsFor: 'own services' stamp: 'sd 1/31/2002 22:24'!\rserviceBrowseCodeFiles\r\r\tself flag: #stef.\r\t\"Here we are breaking the registration mechanism by a direct reference to the fileContentsBrowser.\r\tThe problem is that service is waiting for a filename and here this specific vicous service is used \r\twhen no file is selected. I think that we should change that\"\r\r\t^  SimpleServiceEntry \r\t\tprovider: FileContentsBrowser\r\t\tlabel: 'browse code files' \r\t\tselector: #selectAndBrowseFile:! !\r\r!FileList methodsFor: 'own services' stamp: 'sd 1/31/2002 22:16'!\rserviceCopyName\r\r\t^ (SimpleServiceEntry provider: self label: 'copy name to clipboard' selector: #copyName description:'copy name to clipboard' )! !\r\r!FileList methodsFor: 'own services' stamp: 'sd 1/31/2002 21:17'!\rserviceDeleteFile\r\r\t^ (SimpleServiceEntry provider: self label: 'delete' selector: #deleteFile)\r\t\t\tdescription: 'delete the seleted item'! !\r\r!FileList methodsFor: 'own services' stamp: 'sw 2/16/2002 01:39'!\rserviceGet\r\t\"Answer a service for getting the entire file\"\r\r\t^  (SimpleServiceEntry \r\t\t\tprovider: self \r\t\t\tlabel: 'get entire file' \r\t\t\tselector: #get\r\t\t\tdescription: 'if the file has only been partially read in, because it is very large, read the entire file in at this time.')! !\r\r!FileList methodsFor: 'own services' stamp: 'sd 2/1/2002 20:50'!\rserviceGetHex\r\r\t^  (SimpleServiceEntry \r\t\t\tprovider: self \r\t\t\tlabel: 'view as hex' \r\t\t\tselector: #getHex\r\t\t\tdescription: 'view as hex')\r\t\t\t\r! !\r\r!FileList methodsFor: 'own services' stamp: 'sd 1/31/2002 22:15'!\rserviceRenameFile\r\r\t^ (SimpleServiceEntry provider: self label: 'rename' selector: #renameFile description: 'rename file')! !\r\r!FileList methodsFor: 'own services' stamp: 'sw 2/16/2002 01:39'!\rserviceSortByDate\r\t\"Answer a service for sorting by date\"\r\r\t^  (SimpleServiceEntry new\r\t\t\tprovider: self \r\t\t\tlabel: 'by date' \r\t\t\tselector: #sortByDate \r\t\t\tdescription: 'sort entries by date')\r\t\textraSelector: #sortingByDate;\r\t\tbuttonLabel: 'date'! !\r\r!FileList methodsFor: 'own services' stamp: 'sw 2/16/2002 01:39'!\rserviceSortByName\r\t\"Answer a service for soring by name\"\r\r\t^ (SimpleServiceEntry new\r\t\tprovider: self label: 'by name' selector: #sortByName \r\t\tdescription: 'sort entries by name')\r\t\textraSelector: #sortingByName;\r\t\tbuttonLabel: 'name'! !\r\r!FileList methodsFor: 'own services' stamp: 'sw 2/16/2002 01:40'!\rserviceSortBySize\r\t\"Answer a service for sorting by size\"\r\r\t^  (SimpleServiceEntry \r\t\t\tprovider: self \r\t\t\tlabel: 'by size' \r\t\t\tselector: #sortBySize\r\t\t\tdescription: 'sort entries by size')\r\t\t\t\textraSelector: #sortingBySize;\r\t\t\t\tbuttonLabel: 'size'! !\r\r!FileList methodsFor: 'own services' stamp: 'sw 11/8/2003 13:34'!\rserviceViewContentsInWorkspace\r\t\"Answer a service for viewing the contents of a file in a workspace\"\r\t\r\t^ (SimpleServiceEntry provider: self label: 'workspace with contents' selector: #viewContentsInWorkspace)\r\t\t\tdescription: 'open a new Workspace whose contents are set to the contents of this file'! !\r\r!FileList methodsFor: 'own services' stamp: 'sw 2/15/2002 20:19'!\rservicesFromSelectorSpecs: symbolArray\r\t\"Answer an array of services represented by the incoming symbols, eliminating any that do not have a currently-registered service.  Pass the symbol #- along unchanged to serve as a separator between services\"\r\r\t\"FileList new servicesFromSelectorSpecs: #(fileIn: fileIntoNewChangeSet: browseChangesFile:)\"\r\r\t| res services col | \r\tcol := OrderedCollection new.\r\tservices := self class allRegisteredServices, (self myServicesForFile: #dummy suffix: '*').\r\tsymbolArray do: \r\t\t[:sel | \r\t\t\tsel == #-\r\t\t\t\tifTrue:\r\t\t\t\t\t[col add: sel]\r\t\t\t\tifFalse:\r\t\t\t\t\t[res := services\r\t\t\t\t\t\t\tdetect: [:each | each selector = sel] ifNone: [nil].\r\t\t\t\t\tres notNil\r\t\t\t\t\t\t\tifTrue: [col add: res]]].\r\t^ col! !\r\r!FileList methodsFor: 'own services' stamp: 'sw 11/8/2003 13:39'!\rviewContentsInWorkspace\r\t\"View the contents of my selected file in a new workspace\"\r\t\r\t| aString aFileStream aName |\r\taString _ (aFileStream _ directory readOnlyFileNamed: self fullName) contentsOfEntireFile.\r\taName _ aFileStream localName.\r\taFileStream close.\r\t(Workspace new contents: aString) openLabel: 'Workspace from ', aName! !\r\r\r!FileList methodsFor: 'to be transformed in registration' stamp: 'sw 11/30/2002 15:38'!\rperform: selector orSendTo: otherTarget \r\t\"Selector was just chosen from a menu by a user.\r\tIf it's one of the three sort-by items, handle it specially.\r\tIf I can respond myself, then perform it on myself. \r\tIf not, send it to otherTarget, presumably the editPane from which the menu was invoked.\"\r\r\t^ (#(sortByDate sortBySize sortByName) includes: selector)\r\t\tifTrue:\r\t\t\t[self resort: selector]\r\t\tifFalse:\r\t\t\t[(#(get getHex copyName openImageInWindow importImage renameFile deleteFile addNewFile) includes: selector)\r\t\t\t\tifTrue: [self perform: selector]\r\t\t\t\tifFalse: [super perform: selector orSendTo: otherTarget]]! !\r\r!FileList methodsFor: 'to be transformed in registration' stamp: 'BG 10/29/2003 10:07'!\rremoveServer\r\r\t| choice names |\r\tself flag: #ViolateNonReferenceToOtherClasses.\r\tnames := #(). \"ServerDirectory serverNames asSortedArray.\"\r\tchoice := (SelectionMenu labelList: names selections: names) startUp.\r\tchoice == nil ifTrue: [^ self].\r\t\"ServerDirectory removeServerNamed: choice\"! !\r\r!FileList methodsFor: 'to be transformed in registration' stamp: 'BG 10/29/2003 10:04'!\rvolumeMenu: aMenu\r\t^ aMenu labels:\r'recent...\rremove server...\rdelete directory...'\r\t\tlines: # (1 2)\r\t\tselections: #(recentDirs removeServer deleteDirectory)\r! !\r\r\r!FileList methodsFor: 'updating' stamp: 'sw 11/30/2002 16:49'!\rupdate: aParameter\r\t\"Receive a change notice from an object of whom the receiver is a dependent\"\r\r\t(aParameter == #fileListChanged) ifTrue: [self updateFileList].\r\tsuper update: aParameter! !\r\r\r!FileList methodsFor: 'volume list and pattern' stamp: 'tpr 11/28/2003 11:44'!\rdeleteDirectory\r\t\"Remove the currently selected directory\"\r\t| localDirName |\r\tdirectory entries size = 0 ifFalse:[^self inform:'Directory must be empty'].\r\tlocalDirName _ directory localName.\r\t(self confirm: 'Really delete ' , localDirName , '?') ifFalse: [^ self].\r\tself volumeListIndex: self volumeListIndex-1.\r\tdirectory deleteDirectory: localDirName.\r\tself updateFileList.! !\r\r!FileList methodsFor: 'volume list and pattern' stamp: 'SD 11/11/2001 13:59'!\rdirectory\r\r\t^ directory! !\r\r!FileList methodsFor: 'volume list and pattern' stamp: 'ls 7/25/1998 01:15'!\rfileNameFormattedFrom: entry sizePad: sizePad\r\t\"entry is a 5-element array of the form:\r\t\t(name creationTime modificationTime dirFlag fileSize)\"\r\t| sizeStr nameStr dateStr |\r\tnameStr _ (entry at: 4)\r\t\tifTrue: [entry first , self folderString]\r\t\tifFalse: [entry first].\r\tdateStr _ ((Date fromSeconds: (entry at: 3) )\r\t\t\t\t\tprintFormat: #(3 2 1 $. 1 1 2)) , ' ' ,\r\t\t\t\t(String streamContents: [:s |\r\t\t\t\t\t(Time fromSeconds: (entry at: 3) \\\\ 86400)\r\t\t\t\t\t\tprint24: true on: s]).\r\tsizeStr _ (entry at: 5) asStringWithCommas.\r\tsortMode = #name ifTrue:\r\t\t[^ nameStr , '    (' , dateStr , ' ' , sizeStr , ')'].\r\tsortMode = #date ifTrue:\r\t\t[^ '(' , dateStr , ' ' , sizeStr , ') ' , nameStr].\r\tsortMode = #size ifTrue:\r\t\t[^ '(' , ((sizeStr size to: sizePad) collect: [:i | $ ]) , sizeStr , ' ' , dateStr , ') ' , nameStr].\r! !\r\r!FileList methodsFor: 'volume list and pattern' stamp: 'BG 10/29/2003 10:06'!\rlistForPattern: pat\r\t\"Make the list be those file names which match the pattern.\"\r\r\t| sizePad newList |\r\tnewList _ (self entriesMatching: pat) asSortedCollection: self sortBlock.\r\tsizePad _ (newList inject: 0 into: [:mx :entry | mx max: (entry at: 5)])\r\t\t\t\t\tasStringWithCommas size - 1.\r\tnewList _ newList collect: [ :e | self fileNameFormattedFrom: e sizePad: sizePad ].\r\r\tvolList size = 1 ifTrue:\r\t\t[\"Include known servers along with other desktop volumes\" \r\t\t^ newList asArray \",\r\t\t(ServerDirectory serverNames collect: [:n | '^' , n , self folderString])\"].\r\t^ newList asArray! !\r\r!FileList methodsFor: 'volume list and pattern' stamp: 'tk 4/7/98 15:26'!\rpattern\r\r\t^ pattern ifNil: ['*']\r! !\r\r!FileList methodsFor: 'volume list and pattern' stamp: 'jm 5/3/1998 19:01'!\rpattern: textOrStringOrNil\r\r\ttextOrStringOrNil\r\t\tifNil: [pattern _ '*']\r\t\tifNotNil: [pattern _ textOrStringOrNil asString].\r\tself updateFileList.\r\t^ true\r! !\r\r!FileList methodsFor: 'volume list and pattern' stamp: 'sw 3/6/1999 11:39'!\rveryDeepFixupWith: deepCopier\r\tsuper veryDeepFixupWith: deepCopier.\r\tvolListIndex _ 1.\r\tself directory: FileDirectory default.\r\tself updateFileList! !\r\r!FileList methodsFor: 'volume list and pattern' stamp: 'jm 5/3/1998 18:20'!\rvolumeList\r\t\"Answer the current list of volumes.\"\r\r\t^ volList\r! !\r\r!FileList methodsFor: 'volume list and pattern' stamp: 'jm 5/3/1998 18:21'!\rvolumeListIndex\r\t\"Answer the index of the currently selected volume.\"\r\r\t^ volListIndex\r! !\r\r!FileList methodsFor: 'volume list and pattern' stamp: 'sw 2/21/2002 02:01'!\rvolumeListIndex: index\r\t\"Select the volume name having the given index.\"\r\r\t| delim path |\r\tvolListIndex := index.\r\tindex = 1 \r\t\tifTrue: [self directory: (FileDirectory on: '')]\r\t\tifFalse: [delim := directory pathNameDelimiter.\r\t\t\t\tpath := String streamContents: [:strm |\r\t\t\t\t\t2 to: index do: [:i |\r\t\t\t\t\t\tstrm nextPutAll: (volList at: i) withBlanksTrimmed.\r\t\t\t\t\t\ti < index ifTrue: [strm nextPut: delim]]].\r\t\t\t\tself directory: (directory on: path)].\r\tbrevityState := #FileList.\r\tself addPath: path.\r\tself changed: #fileList.\r\tself changed: #contents.\r\tself updateButtonRow! !\r\r\r!FileList methodsFor: 'private' stamp: 'stp 12/11/1999 20:05'!\raddPath: aString\r\t\"Add the given string to the list of recently visited directories.\"\r\r\t| full |\r\taString ifNil: [^self].\r\tfull := String streamContents: \r\t\t[ :strm | 2 to: volList size do: \r\t\t\t[ :i | strm nextPutAll: (volList at: i) withBlanksTrimmed.\r\t\t\tstrm nextPut: FileDirectory pathNameDelimiter]].\r\tfull := full, aString.\r\"Remove and super-directories of aString from the collection.\"\r\tRecentDirs removeAllSuchThat: [ :aDir | ((aDir, '*') match: full)].\r\r\"If a sub-directory is in the list, do nothing.\"\r\t(RecentDirs detect: [ :aDir | ((full, '*') match: aDir)] ifNone: [nil])\r\t\tifNotNil: [^self].\r\r\t[RecentDirs size >= 10]\r\t\twhileTrue: [RecentDirs removeFirst].\r\tRecentDirs addLast: full! !\r\r!FileList methodsFor: 'private' stamp: 'di 8/16/1998 09:26'!\rcontents\r\t\"Answer the contents of the file, reading it first if needed.\"\r\t\"Possible brevityState values:\r\t\tFileList,\r\t\tfullFile, briefFile, needToGetFull, needToGetBrief,\r\t\tfullHex, briefHex, needToGetFullHex, needToGetBriefHex\"\r\r\t(listIndex = 0) | (brevityState == #FileList) ifTrue: [^ self defaultContents].  \"no file selected\"\r\tbrevityState == #fullFile ifTrue: [^ contents].\r\tbrevityState == #fullHex ifTrue: [^ contents].\r\tbrevityState == #briefFile ifTrue: [^ contents].\r\tbrevityState == #briefHex ifTrue: [^ contents].\r\r\tbrevityState == #needToGetFullHex ifTrue: [^ self readContentsHex: false].\r\tbrevityState == #needToGetBriefHex ifTrue: [^ self readContentsHex: true].\r\r\tbrevityState == #needToGetFull ifTrue: [^ self readContentsBrief: false].\r\tbrevityState == #needToGetBrief ifTrue: [^ self readContentsBrief: true].  \"default\"\r\r\tself halt: 'unknown state ' , brevityState printString! !\r\r!FileList methodsFor: 'private' stamp: 'dgd 12/27/2003 12:22'!\rdefaultContents\r\tcontents _ list == nil\r\t\tifTrue: [String new]\r\t\tifFalse: [String streamContents:\r\t\t\t\t\t[:s | s nextPutAll: 'NO FILE SELECTED' translated; cr.\r\t\t\t\t\ts nextPutAll: '  -- Folder Summary --' translated; cr.\r\t\t\t\t\tlist do: [:item | s nextPutAll: item; cr]]].\r\tbrevityState _ #FileList.\r\t^ contents! !\r\r!FileList methodsFor: 'private' stamp: 'sma 11/11/2000 17:00'!\rentriesMatching: patternString\r\t\"Answer a list of directory entries which match the patternString.\r\tThe patternString may consist of multiple patterns separated by ';'.\r\tEach pattern can include a '*' or '#' as wildcards - see String>>match:\"\r\r\t| entries patterns |\r\tentries _ directory entries.\r\tpatterns _ patternString findTokens: ';'.\r\t(patterns anySatisfy: [:each | each = '*'])\r\t\tifTrue: [^ entries].\r\t^ entries select: [:entry | \r\t\tentry isDirectory or: [patterns anySatisfy: [:each | each match: entry first]]]! !\r\r!FileList methodsFor: 'private' stamp: 'rhi 9/8/2001 02:17'!\rfileNameFromFormattedItem: item\r\t\"Extract fileName and folderString from a formatted fileList item string\"\r\r\t| from to |\r\tself sortingByName\r\t\tifTrue: [\r\t\t\tfrom _ item lastIndexOf: $( ifAbsent: [0].\r\t\t\tto _ item lastIndexOf: $) ifAbsent: [0]]\r\t\tifFalse: [\r\t\t\tfrom _ item indexOf: $( ifAbsent: [0].\r\t\t\tto _ item indexOf: $) ifAbsent: [0]].\r\t^ (from * to = 0\r\t\tifTrue: [item]\r\t\tifFalse: [item copyReplaceFrom: from to: to with: '']) withBlanksTrimmed! !\r\r!FileList methodsFor: 'private'!\rfolderString\r\t^ ' [...]'! !\r\r!FileList methodsFor: 'private' stamp: 'sw 1/7/2003 17:08'!\rfullName\r\t\"Answer the full name for the currently selected file; answer nil if no file is selected.\"\r\r\t^ fileName ifNotNil: [directory\r\t\tifNil:\r\t\t\t[FileDirectory default fullNameFor: fileName]\r\t\tifNotNil:\r\t\t\t[directory fullNameFor: fileName]]\r! !\r\r!FileList methodsFor: 'private' stamp: 'SD 11/14/2001 21:59'!\risFileSelected\r\t\"return if a file is currently selected\"\r\r\t^ fileName isNil not! !\r\r!FileList methodsFor: 'private' stamp: 'BG 11/11/2003 14:21'!\rlistForPatterns: anArray\r\t\"Make the list be those file names which match the pattern.\"\r\r\t| sizePad newList |\r\tnewList _ Set new.\r\tanArray do: [ :pat | newList addAll: (self entriesMatching: pat) ].\r\tnewList _ (SortedCollection sortBlock: self sortBlock) addAll: newList; yourself.\r\tsizePad _ (newList inject: 0 into: [:mx :entry | mx max: (entry at: 5)])\r\t\t\t\t\tasStringWithCommas size - 1.\r\tnewList _ newList collect: [ :e | self fileNameFormattedFrom: e sizePad: sizePad ].\r\r\tvolList size = 1 ifTrue:\r\t\t[\"Include known servers along with other desktop volumes\" \r\t\t\"^ newList asArray ,\r\t\t(ServerDirectory serverNames collect: [:n | '^' , n , self folderString])\"].\r\t^ newList asArray! !\r\r!FileList methodsFor: 'private' stamp: 'dgd 12/27/2003 12:24'!\rput: aText\r\t\"Private - put the supplied text onto the file\"\r\r\t| ff type |\r\tbrevityState == #fullFile ifTrue:\r\t\t[ff _ directory newFileNamed: self fullName.\r\t\tCursor write showWhile: [ff nextPutAll: aText asString; close].\r\t\tfileName = ff localName \r\t\t\tifTrue: [contents _ aText asString]\r\t\t\tifFalse: [self updateFileList].\t\t\"user renamed the file\"\r\t\t^ true  \"accepted\"].\r\r\tlistIndex = 0 ifTrue:\r\t\t[self inform: 'No fileName is selected' translated.\r\t\t^ false  \"failed\"].\r\ttype _ 'These'.\r\tbrevityState = #briefFile ifTrue: [type _ 'Abbreviated'].\r\tbrevityState = #briefHex ifTrue: [type _ 'Abbreviated'].\r\tbrevityState = #fullHex ifTrue: [type _ 'Hexadecimal'].\r\tbrevityState = #FileList ifTrue: [type _ 'Directory'].\r\tself inform: ('{1} contents cannot\rmeaningfully be saved at present.' translated format:{type translated}).\r\t^ false  \"failed\"\r! !\r\r!FileList methodsFor: 'private' stamp: 'BG 10/29/2003 10:07'!\rreadContentsBrief: brevityFlag\r\t\"Read the contents of the receiver's selected file, unless it is too long, in which case show just the first 5000 characters. Don't create a file if it doesn't already exist.\"\r\t| f fileSize first5000 |\r\r\tbrevityFlag ifTrue: [\r\t\t\"(directory isKindOf: ServerDirectory) ifTrue: [^ self readServerBrief]\"].\r\tf _ directory oldFileOrNoneNamed: self fullName.\r\tf ifNil: [^ 'For some reason, this file cannot be read'].\r\t(brevityFlag not or: [(fileSize _ f size) <= 100000]) ifTrue:\r\t\t[contents _ f contentsOfEntireFile.\r\t\tbrevityState _ #fullFile.   \"don't change till actually read\"\r\t\t^ contents].\r\r\t\"if brevityFlag is true, don't display long files when first selected\"\r\tfirst5000 _ f next: 5000.\r\tf close.\r\tcontents _ 'File ''', fileName, ''' is ', fileSize printString, ' bytes long.\rYou may use the ''get'' command to read the entire file.\r\rHere are the first 5000 characters...\r------------------------------------------\r', first5000 , '\r------------------------------------------\r... end of the first 5000 characters.'.\r\tbrevityState _ #briefFile.   \"don't change till actually read\"\r\t^ contents.\r! !\r\r!FileList methodsFor: 'private' stamp: 'dgd 12/27/2003 12:11'!\rreadContentsHex: brevity\r\t\"retrieve the contents from the external file unless it is too long.\r\t  Don't create a file here.  Check if exists.\"\r\t| f size data hexData s |\r\r\tf := directory oldFileOrNoneNamed: self fullName. \r\tf == nil ifTrue: [^ 'For some reason, this file cannot be read' translated].\r\t((size := f size)) > 5000 & brevity\r\t\tifTrue: [data := f next: 10000. f close. brevityState := #briefHex]\r\t\tifFalse: [data := f contentsOfEntireFile. brevityState := #fullHex].\r\r\ts := WriteStream on: (String new: data size*4).\r\t0 to: data size-1 by: 16 do:\r\t\t[:loc | s nextPutAll: loc hex; space;\r\t\t\tnextPut: $(; print: loc; nextPut: $); space; tab.\r\t\tloc+1 to: (loc+16 min: data size) do: [:i | s nextPutAll: (data at: i) hex; space].\r\t\ts cr].\r\thexData := s contents.\r\r\t^ contents := ((size > 5000) & brevity\r\t\tifTrue: ['File ''{1}'' is {2} bytes long.\rYou may use the ''get'' command to read the entire file.\r\rHere are the first 5000 characters...\r------------------------------------------\r{3}\r------------------------------------------\r... end of the first 5000 characters.' translated format: {fileName. size. hexData}]\r\t\tifFalse: [hexData]).\r! !\r\r!FileList methodsFor: 'private' stamp: 'dgd 12/27/2003 12:09'!\rreadServerBrief\r\t| lString sizeStr fsize ff first5000 parts |\r\t\"If file on server is known to be long, just read the beginning.  Cheat badly by reading the fileList string.\"\r\r\tlistIndex = 0 ifTrue: [^ self].\r\t\"Get size from file list entry\"\r\tlString := list at: listIndex.\r\tparts := lString findTokens: '()'.\r\tsortMode = #name ifTrue: [sizeStr := (parts second findTokens: ' ') third].\r\tsortMode = #date ifTrue: [sizeStr := (parts first findTokens: ' ') third].\r\tsortMode = #size ifTrue: [sizeStr := (parts first findTokens: ' ') first].\r\tfsize := (sizeStr copyWithout: $,) asNumber.\r\r\tfsize <= 50000 ifTrue:\r\t\t[ff := directory oldFileOrNoneNamed: self fullName.\r\t\tff ifNil: [^ 'For some reason, this file cannot be read' translated].\r\t\tcontents := ff contentsOfEntireFile.\r\t\tbrevityState := #fullFile.   \"don't change till actually read\"\r\t\t^ contents].\r\r\t\"if brevityFlag is true, don't display long files when first selected\"\r\tfirst5000 := directory getOnly: 3500 from: fileName.\r\tcontents := 'File ''{1}'' is {2} bytes long.\rYou may use the ''get'' command to read the entire file.\r\rHere are the first 3500 characters...\r------------------------------------------\r{3}\r------------------------------------------\r... end of the first 3500 characters.' translated format: {fileName. sizeStr. first5000}.\r\tbrevityState := #briefFile.   \"don't change till actually read\"\r\t^ contents.\r\r! !\r\r!FileList methodsFor: 'private' stamp: 'stp 12/11/1999 20:03'!\rrecentDirs\r\t\"Put up a menu and let the user select from the list of recently visited directories.\"\r\r\t| dirName |\r\tRecentDirs isEmpty ifTrue: [^self].\r\tdirName := (SelectionMenu selections: RecentDirs) startUp.\r\tdirName == nil ifTrue: [^self].\r\tself directory: (FileDirectory on: dirName)! !\r\r!FileList methodsFor: 'private' stamp: 'SD 11/8/2001 21:11'!\rregisteredFileReaderClasses\r\t\"return the list of classes that provide file reader services\"\r\r\t^ self class registeredFileReaderClasses! !\r\r!FileList methodsFor: 'private' stamp: 'sw 11/30/2002 16:34'!\rresort: newMode\r\t\"Re-sort the list of files.\"\r\r\t| name |\r\tlistIndex > 0\r\t\tifTrue: [name _ self fileNameFromFormattedItem: (list at: listIndex)].\r\tsortMode _ newMode.\r\tself pattern: pattern.\r\tname ifNotNil: [\r\t\tfileName _ name.\r\t\tlistIndex _ list findFirst: [:item | (self fileNameFromFormattedItem: item) = name. ].\r\t\tself changed: #fileListIndex].\r\tlistIndex = 0 ifTrue: [self changed: #contents].\r\tself updateButtonRow\r! !\r\r!FileList methodsFor: 'private' stamp: 'sma 11/11/2000 17:04'!\rsortBlock\r\t\"Answer block to decide what order to display the directory entries.\"\r\r\t^ [ :x :y |\r\t\t\t(x isDirectory = y isDirectory) \r\t\t\t\tifTrue: [  \r\t\t\t\t\t\"sort by user-specified criterion\"\r\t\t\t\t\tsortMode = #name \r\t\t\t\t\t\tifTrue: [(x name compare: y name) <= 2]\r\t\t\t\t\t\tifFalse: [ sortMode = #date\r\t\t\t\t\t\t\tifTrue: [ x modificationTime = y modificationTime\r\t\t\t\t\t\t\t\t\tifTrue: [ (x name compare: y name) <= 2 ]\r\t\t\t\t\t\t\t\t\tifFalse: [ x modificationTime > y modificationTime ] ]\r\t\t\t\t\t\t\tifFalse: [ \"size\"\r\t\t\t\t\t\t\t\tx fileSize = y fileSize \r\t\t\t\t\t\t\t\t\tifTrue: [ (x name compare: y name) <= 2 ]\r\t\t\t\t\t\t\t\t\tifFalse: [ x fileSize > y fileSize ] ] ] ]\r\t\t\t\tifFalse: [\r\t\t\t\t\t\"directories always precede files\"\r\t\t\t\t\tx isDirectory ] ]! !\r\r!FileList methodsFor: 'private' stamp: 'sw 1/7/2000 15:58'!\rsortingByDate\r\t^ sortMode == #date! !\r\r!FileList methodsFor: 'private' stamp: 'sw 1/7/2000 15:57'!\rsortingByName\r\t^ sortMode == #name! !\r\r!FileList methodsFor: 'private' stamp: 'sw 1/7/2000 15:58'!\rsortingBySize\r\t^ sortMode == #size! !\r\r!FileList methodsFor: 'private' stamp: 'nk 12/10/2002 07:57'!\rupdateFileList\r\t\"Update my files list with file names in the current directory  \r\tthat match the pattern.\r\tThe pattern string may have embedded newlines or semicolons; these separate different patterns.\"\r\t| patterns |\r\tpatterns _ OrderedCollection new.\r\tCursor wait showWhile: [\r\t(pattern findTokens: (String with: Character cr with: Character lf with: $;))\r\t\tdo: [ :each |\r\t\t\t(each includes: $*) | (each includes: $#)\r\t\t\t\t\tifTrue: [ patterns add: each]\r\t\t\t\t\tifFalse: [each isEmpty\r\t\t\t\t\t\t\t\t\t\tifTrue: [ patterns add: '*']\r\t\t\t\t\t\t\t\t\t\tifFalse: [ patterns add: '*' , each , '*']]].\r\r\tlist _ self listForPatterns: patterns.\r\tlistIndex _ 0.\r\tvolListIndex _ volList size.\r\tfileName _ nil.\r\tcontents _ ''.\r\tself changed: #volumeListIndex.\r\tself changed: #fileList.\r\tself updateButtonRow]! !\r\r\r!FileList methodsFor: 'obsolete methods' stamp: 'BG 10/28/2003 20:56'!\rloadCRDictionary\r\r\tself error: 'should not be used keep for temporary documentation'.\r\tSmalltalk isMorphic ifFalse: \r\t\t[self beep.\r\t\t^ self inform: 'Only available within morphic'].! !\r\r!FileList methodsFor: 'obsolete methods' stamp: 'BG 10/28/2003 20:55'!\rloadCRDisplayProperties\r\r\tself error: 'should not be used keep for temporary documentation'.\r\tSmalltalk isMorphic ifFalse: \r\t\t[self beep.\r\t\t^ self inform: 'Only available within morphic'].! !\r\r!FileList methodsFor: 'obsolete methods' stamp: 'BG 10/28/2003 20:56'!\ropenModelintoAlice\r\t\"If a Wonderland exists, load this model into it as an actor.  If it doesn't, make one first\"\r\r\tself error: 'should not be used keep for temporary documentation'.\r\tSmalltalk isMorphic ifFalse: [^self error: 'Only works in Morphic -  sorry!!'].\r\r\t! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rFileList class\r\tinstanceVariableNames: ''!\r\r!FileList class methodsFor: 'instance creation' stamp: 'sw 9/28/2001 09:21'!\rdefaultButtonPaneHeight\r\t\"Answer the user's preferred default height for new button panes.\"\r\r\t^ Preferences\r\t\tparameterAt: #defaultButtonPaneHeight\r\t\tifAbsentPut: [25]! !\r\r!FileList class methodsFor: 'instance creation' stamp: 'BG 10/28/2003 20:56'!\ropen\r\t\"Open a view of an instance of me on the default directory.\"\r\t\"FileList open\"\r\t| dir aFileList topView volListView templateView fileListView fileContentsView underPane pHeight |\r\t\r\tdir _ FileDirectory default.\r\taFileList _ self new directory: dir.\r\ttopView _ StandardSystemView new.\r\ttopView\r\t\tmodel: aFileList;\r\t\tlabel: dir pathName;\r\t\tminimumSize: 200@200.\r\ttopView borderWidth: 1.\r\r\tvolListView _ PluggableListView on: aFileList\r\t\tlist: #volumeList\r\t\tselected: #volumeListIndex\r\t\tchangeSelected: #volumeListIndex:\r\t\tmenu: #volumeMenu:.\r\tvolListView autoDeselect: false.\r\tvolListView window: (0@0 extent: 80@45).\r\ttopView addSubView: volListView.\r\r\ttemplateView _ PluggableTextView on: aFileList\r\t\ttext: #pattern\r\t\taccept: #pattern:.\r\ttemplateView askBeforeDiscardingEdits: false.\r\ttemplateView window: (0@0 extent: 80@15).\r\ttopView addSubView: templateView below: volListView.\r\r\taFileList wantsOptionalButtons\r\t\tifTrue:\r\t\t\t[underPane _ aFileList optionalButtonView.\r\t\t\tunderPane isNil\r\t\t\t\tifTrue: [pHeight _ 60]\r\t\t\t\tifFalse: [\r\t\t\t\t\ttopView addSubView: underPane toRightOf: volListView.\r\t\t\t\t\tpHeight _ 60 - aFileList optionalButtonHeight]]\r\t\tifFalse:\r\t\t\t[underPane _ nil.\r\t\t\tpHeight _ 60].\r\r\tfileListView _ PluggableListView on: aFileList\r\t\tlist: #fileList\r\t\tselected: #fileListIndex\r\t\tchangeSelected: #fileListIndex:\r\t\tmenu: #fileListMenu:.\r\tfileListView window: (0@0 extent: 120@pHeight).\r\tunderPane isNil\r\t\tifTrue: [topView addSubView: fileListView toRightOf: volListView]\r\t\tifFalse: [topView addSubView: fileListView below: underPane].\r\tfileListView controller terminateDuringSelect: true.  \"Pane to left may change under scrollbar\"\r\r\tfileContentsView _ PluggableTextView on: aFileList\r\t\ttext: #contents accept: #put:\r\t\treadSelection: #contentsSelection menu: #fileContentsMenu:shifted:.\r\tfileContentsView window: (0@0 extent: 200@140).\r\ttopView addSubView: fileContentsView below: templateView.\r\r\ttopView controller open! !\r\r!FileList class methodsFor: 'instance creation' stamp: 'BG 10/28/2003 20:41'!\ropenEditorOn: aFileStream editString: editString\r\t\"Open an editor on the given FileStream.\"\r\r\t| fileModel topView fileContentsView |\r\r\tfileModel _ FileList new setFileStream: aFileStream.\t\"closes the stream\"\r\ttopView _ StandardSystemView new.\r\ttopView\r\t\tmodel: fileModel;\r\t\tlabel: aFileStream fullName;\r\t\tminimumSize: 180@120.\r\ttopView borderWidth: 1.\r\r\tfileContentsView _ PluggableTextView on: fileModel \r\t\ttext: #contents accept: #put:\r\t\treadSelection: #contentsSelection menu: #fileContentsMenu:shifted:.\r\tfileContentsView window: (0@0 extent: 180@120).\r\ttopView addSubView: fileContentsView.\r\teditString ifNotNil: [fileContentsView editString: editString.\r\t\t\tfileContentsView hasUnacceptedEdits: true].\r\r\ttopView controller open.\r! !\r\r!FileList class methodsFor: 'instance creation' stamp: 'SD 11/8/2001 21:20'!\ropenFileDirectly\r\r\t| aResult |\r\t(aResult _ StandardFileMenu oldFile) ifNotNil:\r\t\t[self openEditorOn: (aResult directory readOnlyFileNamed: aResult name) editString: nil]! !\r\r\r!FileList class methodsFor: 'class initialization' stamp: 'dvf 8/23/2003 12:17'!\rinitialize\r\t\"FileList initialize\"\r\r\tRecentDirs := OrderedCollection new.\r\t(self systemNavigation allClassesImplementing: #fileReaderServicesForFile:suffix:) do: \t\t[:providerMetaclass |\r\t\t\tself registerFileReader: providerMetaclass soleInstance]! !\r\r!FileList class methodsFor: 'class initialization' stamp: 'asm 4/10/2003 12:47'!\rregisterInFlapsRegistry\r\t\"Register the receiver in the system's flaps registry\"\r\tself environment\r\t\tat: #Flaps\r\t\tifPresent: [:cl | cl registerQuad: #(FileList\t\t\t\t\tprototypicalToolWindow\t\t'File List'\t\t\t'A File List is a tool for browsing folders and files on disks and on ftp types.') \r\t\t\t\t\t\tforFlapNamed: 'Tools']! !\r\r!FileList class methodsFor: 'class initialization' stamp: 'asm 4/08/2003 12:15'!\runload\r\t\"Unload the receiver from global registries\"\r\r\tself environment at: #Flaps ifPresent: [:cl |\r\tcl unregisterQuadsWithReceiver: self] ! !\r\r\r!FileList class methodsFor: 'file reader registration' stamp: 'sd 2/1/2002 21:30'!\rallRegisteredServices\r\t\"self allRegisteredServices\"\r\r\t| col |\r\tcol := OrderedCollection new.\r\tself registeredFileReaderClasses do: [:each | col addAll: (each services)].\r\t^ col! !\r\r!FileList class methodsFor: 'file reader registration' stamp: 'sd 1/31/2002 21:42'!\rdetectService: aBlock ifNone: anotherBlock\r\t\"self detectService: [:each | each selector = #fileIn:] ifNone: [nil]\"\r\r\t^ self allRegisteredServices\r\t\t\tdetect: aBlock\r\t\t\tifNone: anotherBlock! !\r\r!FileList class methodsFor: 'file reader registration' stamp: 'SD 11/11/2001 13:53'!\risReaderNamedRegistered: aSymbol\r\t\"return if a given reader class has been registered. Note that this is on purpose that the argument is\r\ta symbol and not a class\"\r\r\t ^ (self registeredFileReaderClasses collect: [:each | each name]) includes: aSymbol\r! !\r\r!FileList class methodsFor: 'file reader registration' stamp: 'nk 12/7/2002 12:53'!\ritemsForFile: fullName\r\t\"Answer a list of services appropriate for a file of the given full name\"\r\r\t| services suffix |\r\tsuffix _ self suffixOf: fullName.\r\tservices _ OrderedCollection new.\r\tself registeredFileReaderClasses do: [:reader |\r\t\treader ifNotNil: [services addAll: (reader fileReaderServicesForFile: fullName suffix: suffix)]].\r\t^ services! !\r\r!FileList class methodsFor: 'file reader registration' stamp: 'SD 11/8/2001 21:17'!\rregisterFileReader: aProviderClass\r\t\"register the given class as providing services for reading files\"\r\r\t| registeredReaders |\r\tregisteredReaders := self registeredFileReaderClasses.\r\t(registeredReaders includes: aProviderClass) \r\t\t\tifFalse: [ registeredReaders addLast: aProviderClass ]! !\r\r!FileList class methodsFor: 'file reader registration' stamp: 'SD 11/8/2001 21:11'!\rregisteredFileReaderClasses\r\t\r\tFileReaderRegistry ifNil: [FileReaderRegistry _ OrderedCollection new].\r\t^ FileReaderRegistry\r\r\t! !\r\r!FileList class methodsFor: 'file reader registration' stamp: 'nk 12/7/2002 12:52'!\rsuffixOf: aName\r\t\"Answer the file extension of the given file\"\r\t^ aName\r\t\tifNil:\r\t\t\t['']\r\t\tifNotNil:\r\t\t\t[(FileDirectory extensionFor: aName) asLowercase]! !\r\r!FileList class methodsFor: 'file reader registration' stamp: 'SD 11/8/2001 21:18'!\runregisterFileReader: aProviderClass\r\t\"unregister the given class as providing services for reading files\"\r\r\tself registeredFileReaderClasses remove: aProviderClass ifAbsent: [nil]! !\r\rSimpleServiceEntry subclass: #FileModifyingSimpleServiceEntry\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-FileList'!\r!FileModifyingSimpleServiceEntry commentStamp: 'nk 11/26/2002 12:03' prior: 0!\rI represent a service that may change the contents of a directory.\rSuch changes include:\r* file creation\r* file deletion\r* file modification!\r\r\r!FileModifyingSimpleServiceEntry methodsFor: 'as yet unclassified' stamp: 'nk 11/26/2002 12:08'!\rperformServiceFor: anObject\r\t| retval |\r\tretval _ super performServiceFor: anObject.\r\tself changed: #fileListChanged.\r\t^retval\t\"is this used anywhere?\"! !\rObject subclass: #FilePackage\r\tinstanceVariableNames: 'fullName sourceSystem classes doIts classOrder'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-File Contents Browser'!\r\r!FilePackage methodsFor: 'accessing'!\rclassAt: className\r\t^self classes at: className! !\r\r!FilePackage methodsFor: 'accessing'!\rclasses\r\t^classes! !\r\r!FilePackage methodsFor: 'accessing' stamp: 'pnm\r8/23/2000 17:10'!\rfullName: aString\r\tfullName := aString! !\r\r!FilePackage methodsFor: 'accessing'!\rfullPackageName\r\t^fullName! !\r\r!FilePackage methodsFor: 'accessing'!\rpackageInfo\r\t^String streamContents:[:s|\r\t\ts nextPutAll:'Package: '.\r\t\ts nextPutAll: self fullPackageName; cr; cr.\r\t\tsourceSystem isEmpty ifFalse:[\r\t\t\ts nextPutAll: sourceSystem; cr; cr].\r\t\tdoIts isEmpty ifFalse:[\r\t\t\ts nextPutAll:'Unresolvable doIts:'; cr; cr.\r\t\t\tdoIts do:[:chgRec|\r\t\t\t\ts nextPut:$!!; nextPutAll: chgRec string; nextPut: $!!; cr]]].! !\r\r!FilePackage methodsFor: 'accessing' stamp: 'pnm\r8/23/2000 17:12'!\rpackageName\r\t^FileDirectory localNameFor: self fullPackageName! !\r\r!FilePackage methodsFor: 'accessing'!\rremoveClass: aPseudoClass\r\t(self classes removeKey: aPseudoClass name).\r\tclassOrder copy do:[:cls|\r\t\tcls name = aPseudoClass name ifTrue:[ classOrder remove: cls].\r\t].! !\r\r!FilePackage methodsFor: 'accessing' stamp: 'ar 2/5/2004 15:11'!\rremoveDoIts\r\tdoIts := OrderedCollection new.! !\r\r!FilePackage methodsFor: 'accessing'!\rrenameClass: aPseudoClass to: newName\r\t| oldName |\r\toldName := aPseudoClass name.\r\tself classes removeKey: oldName.\r\tself classes at: newName put: aPseudoClass.\r\taPseudoClass renameTo: newName.! !\r\r\r!FilePackage methodsFor: 'initialize' stamp: 'ar 2/5/2004 15:14'!\rfromFileNamed: aName\r\t| stream |\r\tfullName := aName.\r\tstream := FileStream readOnlyFileNamed: aName.\r\t[self fileInFrom: stream] ensure:[stream close].! !\r\r!FilePackage methodsFor: 'initialize' stamp: 'pnm\r8/23/2000 14:48'!\rinitialize\r\tclasses := Dictionary new.\r\tclassOrder := OrderedCollection new.\r\tsourceSystem := ''.\r\tdoIts := OrderedCollection new.! !\r\r\r!FilePackage methodsFor: 'private'!\rclassDefinition: string with: chgRec\r\t| tokens theClass |\r\ttokens := Scanner new scanTokens: string.\r\ttokens size = 11 ifFalse:[^doIts add: chgRec].\r\ttheClass := self getClass: (tokens at: 3).\r\ttheClass definition: string.\r\tclassOrder add: theClass.! !\r\r!FilePackage methodsFor: 'private'!\rgetClass: className\r\t| pseudoClass |\r\t(classes includesKey: className) ifTrue:[\r\t\t^classes at: className.\r\t].\r\tpseudoClass := PseudoClass new.\r\tpseudoClass name: className.\r\tclasses at: className put: pseudoClass.\r\t^pseudoClass.! !\r\r!FilePackage methodsFor: 'private'!\rmetaClassDefinition: string with: chgRec\r\t| tokens theClass |\r\ttokens := Scanner new scanTokens: string.\r\ttheClass := self getClass: (tokens at: 1).\r\ttheClass metaClass definition: string.\r\tclassOrder add: theClass metaClass.! !\r\r!FilePackage methodsFor: 'private'!\rmsgClassComment: string with: chgRec\r\t| tokens theClass |\r\ttokens := Scanner new scanTokens: string.\r\t(tokens size = 3 and:[(tokens at: 3) class == String]) ifTrue:[\r\t\ttheClass := self getClass: tokens first.\r\t\t^theClass commentString: tokens last].\r\t(tokens size = 4 and:[(tokens at: 3) asString = 'class' and:[(tokens at: 4) class == String]]) ifTrue:[\r\t\ttheClass := self getClass: tokens first.\r\t\ttheClass metaClass commentString: tokens last].\r! !\r\r!FilePackage methodsFor: 'private'!\rpossibleSystemSource: chgRec\r\t| tokens |\r\tsourceSystem isEmpty ifTrue:[\r\t\ttokens := Scanner new scanTokens: chgRec string.\r\t\t(tokens size = 1 and:[tokens first class == String]) ifTrue:[\r\t\t\tsourceSystem := tokens first.\r\t\t\t^self]].\r\tdoIts add: chgRec.! !\r\r!FilePackage methodsFor: 'private'!\rremovedMethod: string with: chgRec\r\t| class tokens |\r\ttokens := Scanner new scanTokens: string.\r\t(tokens size = 3 and:[(tokens at: 2) == #removeSelector: ]) ifTrue:[\r\t\tclass := self getClass: (tokens at: 1).\r\t\t^class removeSelector: (tokens at: 3).\r\t].\r\t(tokens size = 4 and:[(tokens at: 2) == #class and:[(tokens at: 3) == #removeSelector:]]) ifTrue:[\r\t\tclass := self getClass: (tokens at: 1).\r\t\t^class metaClass removeSelector: (tokens at: 4).\r\t].\r\tdoIts add: chgRec! !\r\r\r!FilePackage methodsFor: 'change record types'!\rclassComment: chgRec\r\r\t(self getClass: chgRec methodClassName) classComment: chgRec! !\r\r!FilePackage methodsFor: 'change record types'!\rdoIt: chgRec\r\t| string |\r\tstring := chgRec string.\r\t('*ubclass:*instanceVariableNames:*classVariableNames:*poolDictionaries:*category:*'\r\t\tmatch: string) ifTrue:[^self classDefinition: string with: chgRec].\r\t('* class*instanceVariableNames:*'\r\t\tmatch: string) ifTrue:[^self metaClassDefinition: string with: chgRec].\r\t('* removeSelector: *'\r\t\tmatch: string) ifTrue:[^self removedMethod: string with: chgRec].\r\t('* comment:*'\r\t\tmatch: string) ifTrue:[^self msgClassComment: string with: chgRec].\r\t('* initialize'\r\t\tmatch: string) ifTrue:[^self]. \"Initialization is done based on class>>initialize\"\r\t('''From *'\r\t\tmatch: string) ifTrue:[^self possibleSystemSource: chgRec].\r\tdoIts add: chgRec.! !\r\r!FilePackage methodsFor: 'change record types'!\rmethod: chgRec\r\t(self getClass: chgRec methodClassName) methodChange: chgRec! !\r\r!FilePackage methodsFor: 'change record types'!\rpreamble: chgRec\r\tself doIt: chgRec! !\r\r\r!FilePackage methodsFor: 'fileIn/fileOut' stamp: 'wod 4/15/98 15:57'!\raskForDoits\r\t| menu choice choices |\r\tchoices := #('do not process' 'at the beginning' 'at the end' 'cancel').\r\tmenu _ SelectionMenu selections: choices.\r\tchoice := nil.\r\t[choices includes: choice] whileFalse: [\r\t\tchoice _ menu startUpWithCaption: \r'The package contains unprocessed doIts.\rWhen would like to process those?'].\r\t^choices indexOf: choice! !\r\r!FilePackage methodsFor: 'fileIn/fileOut' stamp: 'wod 4/15/98 16:00'!\rfileIn\r\t| doitsMark |\r\tdoitsMark := 1.\r\tdoIts isEmpty ifFalse:[doitsMark := self askForDoits].\r\tdoitsMark = 4 ifTrue: [^nil].\r\tdoitsMark = 2 ifTrue:[self fileInDoits].\r\tclassOrder do:[:cls|\r\t\tcls fileInDefinition.\r\t].\r\tclasses do:[:cls|\r\t\tTranscript cr; show:'Filing in ', cls name.\r\t\tcls fileInMethods.\r\t\tcls hasMetaclass ifTrue:[cls metaClass fileInMethods].\r\t].\r\tdoitsMark = 3 ifTrue:[self fileInDoits].! !\r\r!FilePackage methodsFor: 'fileIn/fileOut'!\rfileInDoits\r\tdoIts do:[:chgRec| chgRec fileIn].! !\r\r!FilePackage methodsFor: 'fileIn/fileOut' stamp: 'tk 3/7/2001 13:57'!\rfileOut\r\t| fileName stream |\r\tfileName := FillInTheBlank request: 'Enter the file name' initialAnswer:''.\r\tstream := FileStream newFileNamed: fileName.\r\tsourceSystem isEmpty ifFalse:[\r\t\tstream nextChunkPut: sourceSystem printString;cr ].\r\tself fileOutOn: stream.\r\tstream cr; cr.\r\tself classes do:[:cls|\r\t\tcls needsInitialize ifTrue:[\r\t\t\tstream cr; nextChunkPut: cls name,' initialize']].\r\tstream cr.\r\tstream close.\r\r\t\"DeepCopier new checkVariables.\"\r! !\r\r!FilePackage methodsFor: 'fileIn/fileOut'!\rfileOutDoits: aStream\r\tdoIts do:[:chgRec| chgRec fileOutOn: aStream].! !\r\r!FilePackage methodsFor: 'fileIn/fileOut' stamp: 'wod 4/15/98 15:59'!\rfileOutOn: aStream\r\t| doitsMark |\r\tdoitsMark := 1.\r\tdoIts isEmpty ifFalse:[doitsMark := self askForDoits].\r\tdoitsMark = 4 ifTrue: [^nil].\r\tdoitsMark = 2 ifTrue:[self fileOutDoits: aStream].\r\tclassOrder do:[:cls|\r\t\tcls fileOutDefinitionOn: aStream.\r\t].\r\tclasses do:[:cls|\r\t\tcls fileOutMethodsOn: aStream.\r\t\tcls hasMetaclass ifTrue:[cls metaClass fileOutMethodsOn: aStream].\r\t].\r\tdoitsMark = 3 ifTrue:[self fileOutDoits: aStream].! !\r\r\r!FilePackage methodsFor: 'reading' stamp: 'pnm\r8/23/2000 17:24'!\rfileInFrom: aStream\r\t| chgRec changes |\r\tchanges := (ChangeList new scanFile: aStream from: 0\rto: aStream size) changeList.\r\taStream close.\r\t('Processing ', self packageName) \r\t\tdisplayProgressAt: Sensor cursorPoint\r\t\tfrom: 1\r\t\tto: changes size\r\t\tduring:[:bar|\r\t\t\t1 to: changes size do:[:i|\r\t\t\t\tbar value: i.\r\t\t\t\tchgRec := changes at: i.\r\t\t\t\tself perform: (chgRec type copyWith: $:) asSymbol\rwith: chgRec.\r\t\t\t].\r\t\t].! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rFilePackage class\r\tinstanceVariableNames: ''!\r\r!FilePackage class methodsFor: 'instance creation'!\rfromFileNamed: aName\r\t^self new fromFileNamed: aName! !\rReadWriteStream subclass: #FileStream\r\tinstanceVariableNames: 'rwmode'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Files'!\r!FileStream commentStamp: '<historical>' prior: 0!\rI represent a Stream that accesses a FilePage from a File. One use for my instance is to access larger \"virtual Strings\" than can be stored contiguously in main memory. I restrict the objects stored and retrieved to be Integers or Characters. An end of file pointer terminates reading; it can be extended by writing past it, or the file can be explicitly truncated.\r\t\rTo use the file system for most applications, you typically create a FileStream. This is done by sending a message to a FileDirectory (file:, oldFile:, newFile:, rename:newName:) which creates an instance of me. Accesses to the file are then done via my instance.\r\r*** On DOS, files cannot be shortened!!  ***  To overwrite a file with a shorter one, first delete the old file (FileDirectory deleteFilePath: 'Hard Disk:aFolder:dataFolder:foo') or (aFileDirectory deleteFileNamed: 'foo').  Then write your new shorter version.!\r\r\r!FileStream methodsFor: 'accessing' stamp: 'ar 8/6/2001 18:34'!\rcontents\r\t\"Return the contents of the receiver. Do not close or otherwise touch the receiver. Return data in whatever mode the receiver is in (e.g., binary or text).\"\r\t| s savePos |\r\tsavePos _ self position.\r\tself position: 0.\r\ts _ self next: self size.\r\tself position: savePos.\r\t^s! !\r\r!FileStream methodsFor: 'accessing'!\rcontentsOfEntireFile\r\t\"Read all of the contents of the receiver.\"\r\r\t| s binary |\r\tself readOnly.\r\tbinary _ self isBinary.\r\tself reset.\t\"erases knowledge of whether it is binary\"\r\tbinary ifTrue: [self binary].\r\ts _ self next: self size.\r\tself close.\r\t^s! !\r\r!FileStream methodsFor: 'accessing'!\rnext\r\r\t(position >= readLimit and: [self atEnd])\r\t\tifTrue: [^nil]\r\t\tifFalse: [^collection at: (position _ position + 1)]! !\r\r!FileStream methodsFor: 'accessing'!\rnext: anInteger\r\r\t| newCollection howManyRead increment |\r\tnewCollection _ collection species new: anInteger.\r\thowManyRead _ 0.\r\t[howManyRead < anInteger] whileTrue:\r\t\t[self atEnd ifTrue:\r\t\t\t[(howManyRead + 1) to: anInteger do: [:i | newCollection at: i put: (self next)].\r\t\t\t^newCollection].\r\t\tincrement _ (readLimit - position) min: (anInteger - howManyRead).\r\t\tnewCollection replaceFrom: (howManyRead + 1)\r\t\t\tto: (howManyRead _ howManyRead + increment)\r\t\t\twith: collection\r\t\t\tstartingAt: (position + 1).\r\t\tposition _ position + increment].\r\t^newCollection! !\r\r!FileStream methodsFor: 'accessing'!\rnextPut: aByte\r\t\"1/31/96 sw: subclassResponsibility\"\r\r\tself subclassResponsibility! !\r\r!FileStream methodsFor: 'accessing'!\rnextPutAll: aCollection\r\t\"1/31/96 sw: made subclass responsibility\"\r\r\tself subclassResponsibility! !\r\r!FileStream methodsFor: 'accessing'!\rsize\r\t\"Answer the size of the file in characters.\r\t 1/31/96 sw: made subclass responsibility\"\r\r\tself subclassResponsibility! !\r\r\r!FileStream methodsFor: 'testing'!\ratEnd\r\t\"Answer true if the current position is >= the end of file position.\r\t 1/31/96 sw: subclassResponsibility\"\r\r\tself subclassResponsibility! !\r\r\r!FileStream methodsFor: 'positioning'!\rposition\r\t\"Answer the current character position in the file.\r\t 1/31/96 sw: subclassResponsibility\"\r\r\tself subclassResponsibility! !\r\r!FileStream methodsFor: 'positioning'!\rposition: pos\r\t\"Set the current character position in the file to pos.\r\t 1/31/96 sw: made subclassResponsibility\"\r\r\tself subclassResponsibility! !\r\r!FileStream methodsFor: 'positioning'!\rreset\r\t\"Set the current character position to the beginning of the file.\r\t 1/31/96 sw: subclassResponsibility\"\r\r\tself subclassResponsibility! !\r\r!FileStream methodsFor: 'positioning'!\rsetToEnd\r\t\"Set the current character position to the end of the File. The same as\r\tself position: self size.  1/31/96 sw: made subclassResponsibility\"\r\r\tself subclassResponsibility! !\r\r!FileStream methodsFor: 'positioning'!\rskip: n\r\t\"Set the character position to n characters from the current position.\r\tError if not enough characters left in the file\r\t1/31/96 sw: made subclassResponsibility.\"\r \r\tself subclassResponsibility! !\r\r\r!FileStream methodsFor: 'printing' stamp: 'tk 12/5/2001 09:12'!\rlongPrintOn: aStream\r\t\"Do nothing, so it will print short.  Called to print the error file.  If the error was in a file operation, we can't read the contents of that file.  Just print its name instead.\"\r! !\r\r!FileStream methodsFor: 'printing' stamp: 'tk 12/5/2001 09:32'!\rlongPrintOn: aStream limitedTo: sizeLimit indent: indent\r\r\t\"Do nothing, so it will print short.  Called to print the error file.  If the error was in a file operation, we can't read the contents of that file.  Just print its name instead.\"\r\r\taStream cr! !\r\r!FileStream methodsFor: 'printing'!\rprintOn: aStream\r\r\tsuper printOn: aStream.\r\taStream nextPutAll: ' on '.\r\tself file printOn: aStream! !\r\r\r!FileStream methodsFor: 'editing' stamp: 'di 5/20/1998 23:20'!\redit\r\t\"Create and schedule an editor on this file.\"\r\r\tFileList openEditorOn: self editString: nil.\r! !\r\r\r!FileStream methodsFor: 'file open/close' stamp: 'jm 9/21/1998 13:02'!\rclose\r\t\"Close this file.\"\r\r\tself subclassResponsibility\r! !\r\r!FileStream methodsFor: 'file open/close' stamp: 'jm 9/21/1998 13:02'!\rclosed\r\t\"Answer true if this file is closed.\"\r\r\tself subclassResponsibility\r! !\r\r!FileStream methodsFor: 'file open/close' stamp: 'jm 9/21/1998 13:03'!\rflush\r\t\"When writing, flush the current buffer out to disk.\"\r\r\tself subclassResponsibility\r! !\r\r!FileStream methodsFor: 'file open/close' stamp: 'jm 9/21/1998 13:04'!\rreopen\r\t\"Ensure that the receiver is open, re-open it if necessary.\"\r\t\"Details: Files that were open when a snapshot occurs are no longer valid when the snapshot is resumed. This operation re-opens the file if that has happened.\"\r\r\tself subclassResponsibility\r! !\r\r\r!FileStream methodsFor: 'file modes' stamp: 'jm 9/21/1998 13:01'!\rascii\r\t\"Set this file to ascii (text) mode.\"\r\r\tself subclassResponsibility\r! !\r\r!FileStream methodsFor: 'file modes' stamp: 'jm 9/21/1998 12:59'!\rbinary\r\t\"Set this file to binary mode.\"\r\r\tself subclassResponsibility\r! !\r\r!FileStream methodsFor: 'file modes' stamp: 'jm 9/21/1998 12:59'!\rreadOnly\r\t\"Set this file's mode to read-only.\"\r\r\tself subclassResponsibility\r! !\r\r!FileStream methodsFor: 'file modes' stamp: 'jm 9/21/1998 13:01'!\rtext\r\t\"Set this file to text (ascii) mode.\"\r\r\tself ascii.\r! !\r\r\r!FileStream methodsFor: 'file accessing'!\rfile\r\t\"Answer the file for the page the receiver is streaming over.\r\t 1/31/96 sw: made subclass responsibility\"\r\r\tself subclassResponsibility! !\r\r!FileStream methodsFor: 'file accessing' stamp: 'jm 12/5/97 12:53'!\rlocalName\r\r\t^ FileDirectory localNameFor: self name\r! !\r\r!FileStream methodsFor: 'file accessing'!\rname\r\t\"Answer the name of the file for the page the receiver is streaming over.  1/31/96 sw: made subclassResponsibility\"\r\r\tself subclassResponsibility! !\r\r!FileStream methodsFor: 'file accessing' stamp: 'gk 2/10/2004 13:21'!\rurl\r\t\"Convert my path into a file:// type url String.\"\r\t\r\t^self asUrl toText! !\r\r\r!FileStream methodsFor: 'fileIn/Out' stamp: 'sw 11/19/1998 16:42'!\rfileIn\r\t\"Guarantee that the receiver is readOnly before fileIn for efficiency and\r\tto eliminate remote sharing conflicts.\"\r\r\tself readOnly.\r\tself fileInAnnouncing: 'Loading ', self localName! !\r\r!FileStream methodsFor: 'fileIn/Out' stamp: 'di 10/31/2001 12:07'!\rfileIntoNewChangeSet\r\t\"File all of my contents into a new change set.\" \r\r\tself readOnly.\r\tChangeSorter newChangesFromStream: self named: (self localName)\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rFileStream class\r\tinstanceVariableNames: ''!\r\r!FileStream class methodsFor: 'instance creation'!\rfileNamed: fileName \r\t^ self concreteStream fileNamed: (self fullName: fileName)! !\r\r!FileStream class methodsFor: 'instance creation' stamp: 'tpr 10/16/2001 12:49'!\rforceNewFileNamed: fileName\r \t\"Create a new file with the given name, and answer a stream opened for writing on that file. If the file already exists, delete it without asking before creating the new file.\"\r\r\t^self concreteStream forceNewFileNamed: fileName! !\r\r!FileStream class methodsFor: 'instance creation'!\rfullName: fileName\r\t^ FileDirectory default fullNameFor: fileName! !\r\r!FileStream class methodsFor: 'instance creation' stamp: 'TPR 8/26/1999 10:49'!\risAFileNamed: fName\r\t\"return whether a file exists with the given name\"\r\t^self concreteStream isAFileNamed: (self fullName: fName)! !\r\r!FileStream class methodsFor: 'instance creation' stamp: 'di 2/15/98 14:03'!\rnew\r\t^ self basicNew! !\r\r!FileStream class methodsFor: 'instance creation'!\rnewFileNamed: fileName \r\t^ self concreteStream newFileNamed: (self fullName: fileName)! !\r\r!FileStream class methodsFor: 'instance creation'!\roldFileNamed: fileName \r\t^ self concreteStream oldFileNamed: (self fullName: fileName)! !\r\r!FileStream class methodsFor: 'instance creation' stamp: 'jm 5/8/1998 21:53'!\roldFileOrNoneNamed: fileName\r\t\"If the file exists, answer a read-only FileStream on it. If it doesn't, answer nil.\"\r\r\t| fullName |\r\tfullName _ self fullName: fileName.\r\t(self concreteStream isAFileNamed: fullName)\r\t\tifTrue: [^ self concreteStream readOnlyFileNamed: fullName]\r\t\tifFalse: [^ nil].\r! !\r\r!FileStream class methodsFor: 'instance creation'!\rreadOnlyFileNamed: fileName \r\t^ self concreteStream readOnlyFileNamed: (self fullName: fileName)! !\r\r\r!FileStream class methodsFor: 'concrete classes' stamp: 'ls 7/11/1998 02:58'!\rconcreteStream\r\t\"Who should we really direct class queries to?  \"\r\t^ StandardFileStream  \"may change this to CrLfFileStream\"! !\r\r\r!FileStream class methodsFor: 'initialize-release' stamp: 'hg 8/3/2000 18:00'!\rinitialize\r\r\tFileList registerFileReader: self! !\r\r\r!FileStream class methodsFor: 'file reader services' stamp: 'ssa 9/3/2008 10:33'!\rfileIn: fullName\r\t\"File in the entire contents of the file specified by the name provided\"\r\r\t| fn ff |\r\tfullName ifNil: [^ Beeper beep].\r\tff _ self readOnlyFileNamed: (fn _ fullName).\r\t((FileDirectory extensionFor: fn) sameAs: 'html') ifTrue: [ff _ ff asHtml].\r\tff fileIn! !\r\r!FileStream class methodsFor: 'file reader services' stamp: 'nk 7/16/2003 15:49'!\rfileReaderServicesForFile: fullName suffix: suffix\r\t\"Answer services for the given file\"\r\r\t^ ((self isSourceFileSuffix: suffix) or: [ suffix = '*' ])\r\t\tifTrue:\r\t\t\t[{self serviceRemoveLineFeeds.\r\t\t\tself serviceFileIn}]\r\t\tifFalse:\r\t\t\t[#()]! !\r\r!FileStream class methodsFor: 'file reader services' stamp: 'hg 8/3/2000 18:13'!\risSourceFileSuffix: suffix\r\r\t^(suffix = 'st') | (suffix = 'cs') | (suffix = '*')\r! !\r\r!FileStream class methodsFor: 'file reader services' stamp: 'LEG 10/24/2001 23:35'!\rremoveLineFeeds: fullName\r\t| fileContents |\r\tfileContents _ (CrLfFileStream readOnlyFileNamed: fullName) contentsOfEntireFile.\r\t(StandardFileStream newFileNamed: fullName) \r\t\tnextPutAll: fileContents;\r\t\tclose.! !\r\r!FileStream class methodsFor: 'file reader services' stamp: 'sw 2/17/2002 01:38'!\rserviceFileIn\r\t\"Answer a service for filing in an entire file\"\r\r\t^ SimpleServiceEntry \r\t\tprovider: self \r\t\tlabel: 'fileIn entire file'\r\t\tselector: #fileIn:\r\t\tdescription: 'file in the entire contents of the file, which is expected to contain Smalltalk code in fileout (\"chunk\") format'\r\t\tbuttonLabel: 'filein'! !\r\r!FileStream class methodsFor: 'file reader services' stamp: 'nk 11/26/2002 12:49'!\rserviceRemoveLineFeeds\r\t\"Answer a service for removing linefeeds from a file\"\r\r\t^ FileModifyingSimpleServiceEntry\r\t\tprovider: self \r\t\tlabel: 'remove line feeds'\r\t\tselector: #removeLineFeeds:\t\r\t\tdescription: 'remove line feeds in file'\r\t\tbuttonLabel: 'remove lfs'! !\r\r!FileStream class methodsFor: 'file reader services' stamp: 'sd 2/1/2002 22:28'!\rservices\r\r\t^ Array \r\t\t\twith: self serviceRemoveLineFeeds\r\t\t\twith: self serviceFileIn\r\t! !\r\r\r!FileStream class methodsFor: 'class initialization' stamp: 'SD 11/15/2001 22:21'!\runload\r\r\tFileList unregisterFileReader: self ! !\rError subclass: #FileStreamException\r\tinstanceVariableNames: 'fileName'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Exceptions Kernel'!\r\r!FileStreamException methodsFor: 'exceptionBuilder' stamp: 'mir 2/23/2000 20:13'!\rfileName: aFileName\r\tfileName _ aFileName! !\r\r\r!FileStreamException methodsFor: 'exceptionDescription' stamp: 'mir 2/25/2000 17:29'!\rfileName\r\t^fileName! !\r\r!FileStreamException methodsFor: 'exceptionDescription' stamp: 'mir 2/23/2000 20:13'!\risResumable\r\t\"Determine whether an exception is resumable.\"\r\r\t^true! !\r\r!FileStreamException methodsFor: 'exceptionDescription' stamp: 'mir 2/23/2000 20:14'!\rmessageText\r\t\r\t\"Return an exception's message text.\"\r\r\t^messageText == nil\r\t\tifTrue: [fileName printString]\r\t\tifFalse: [messageText]! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rFileStreamException class\r\tinstanceVariableNames: ''!\r\r!FileStreamException class methodsFor: 'exceptionInstantiator' stamp: 'mir 2/23/2000 20:12'!\rfileName: aFileName\r\t^self new fileName: aFileName! !\rStringHolder subclass: #FillInTheBlank\r\tinstanceVariableNames: 'acceptOnCR done responseUponCancel'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Menus'!\r!FillInTheBlank commentStamp: '<historical>' prior: 0!\rI represent a prompt for string input from the user. The user is asked to type in and edit a string. The resulting string is supplied as the argument to a client-supplied action block.\r!\r\r\r!FillInTheBlank methodsFor: 'initialize-release' stamp: 'sw 1/31/2000 14:42'!\rinitialize\r\r\tsuper initialize.\r\tacceptOnCR _ false.\r\tdone _ false.\r\tresponseUponCancel _ ''\r! !\r\r\r!FillInTheBlank methodsFor: 'accessing' stamp: 'jm 4/28/1998 06:18'!\racceptOnCR\r\t\"Answer whether a carriage return should cause input to be accepted.\"\r\r\t^ acceptOnCR\r! !\r\r!FillInTheBlank methodsFor: 'accessing' stamp: 'jm 4/28/1998 06:18'!\racceptOnCR: aBoolean\r\r\tacceptOnCR _ aBoolean.\r! !\r\r!FillInTheBlank methodsFor: 'accessing' stamp: 'jm 5/6/1998 15:13'!\rdone\r\t\"Answer whether the user has ended the interaction.\"\r\r\t^ done\r! !\r\r!FillInTheBlank methodsFor: 'accessing' stamp: 'jm 5/6/1998 15:13'!\rdone: aBoolean\r\r\tdone _ aBoolean.\r! !\r\r!FillInTheBlank methodsFor: 'accessing' stamp: 'sw 1/31/2000 14:45'!\rresponseUponCancel: resp\r\tresponseUponCancel _ resp! !\r\r!FillInTheBlank methodsFor: 'accessing' stamp: 'sw 1/31/2000 14:47'!\rsetResponseForCancel\r\tself contents: responseUponCancel! !\r\r\r!FillInTheBlank methodsFor: 'object fileIn' stamp: 'RAA 12/20/2000 17:59'!\rconvertToCurrentVersion: varDict refStream: smartRefStrm\r\t\r\tvarDict at: 'responseUponCancel' ifAbsent: [responseUponCancel _ ''].\r\t^super convertToCurrentVersion: varDict refStream: smartRefStrm.\r\r! !\r\r\r!FillInTheBlank methodsFor: 'private' stamp: 'sma 6/18/2000 10:54'!\rshow: fillInView\r\t| savedArea |\r\tsavedArea _ Form fromDisplay: fillInView displayBox.\r\tfillInView display.\r\tcontents isEmpty\r\t\tifFalse: [fillInView lastSubView controller selectFrom: 1 to: contents size].\r\t(fillInView lastSubView containsPoint: Sensor cursorPoint)\r\t\tifFalse: [fillInView lastSubView controller centerCursorInView].\r\tfillInView controller startUp.\r\tfillInView release.\r\tsavedArea displayOn: Display at: fillInView viewport topLeft.\r\t^ contents! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rFillInTheBlank class\r\tinstanceVariableNames: ''!\r\r!FillInTheBlank class methodsFor: 'instance creation' stamp: 'BG 10/28/2003 20:57'!\rmultiLineRequest: queryString centerAt: aPoint initialAnswer: defaultAnswer answerHeight: answerHeight\r\t\"Create a multi-line instance of me whose question is queryString with\r\tthe given initial answer. Invoke it centered at the given point, and\r\tanswer the string the user accepts.  Answer nil if the user cancels.  An\r\tempty string returned means that the ussr cleared the editing area and\r\tthen hit 'accept'.  Because multiple lines are invited, we ask that the user\r\tuse the ENTER key, or (in morphic anyway) hit the 'accept' button, to \r\tsubmit; that way, the return key can be typed to move to the next line.\r\tNOTE: The ENTER key does not work on Windows platforms.\"\r\r\t\"FillInTheBlank\r\t\tmultiLineRequest:\r'Enter several lines; end input by accepting\ror canceling via menu or press Alt+s/Alt+l'\r\t\tcenterAt: Display center\r\t\tinitialAnswer: 'Once upon a time...'\r\t\tanswerHeight: 200\"\r\r\t| model fillInView |\r\t\r\r\tmodel _ self new initialize.\r\tmodel contents: defaultAnswer.\r\tmodel responseUponCancel: nil.\r\tmodel acceptOnCR: false.\r\tfillInView _\r\t\tself fillInTheBlankViewClass\r\t\t\tmultiLineOn: model\r\t\t\tmessage: queryString\r\t\t\tcenterAt: aPoint\r\t\t\tanswerHeight: answerHeight.\r\t^ model show: fillInView! !\r\r!FillInTheBlank class methodsFor: 'instance creation' stamp: 'ar 3/18/2001 00:53'!\rrequest: queryString \r\t\"Create an instance of me whose question is queryString. Invoke it \r\tcentered at the cursor, and answer the string the user accepts. Answer \r\tthe empty string if the user cancels.\"\r\r\t\"FillInTheBlank request: 'Your name?'\"\r\r\t^ self\r\t\trequest: queryString\r\t\tinitialAnswer: ''\r\t\tcenterAt: (ActiveHand ifNil:[Sensor]) cursorPoint! !\r\r!FillInTheBlank class methodsFor: 'instance creation' stamp: 'ar 3/18/2001 00:54'!\rrequest: queryString initialAnswer: defaultAnswer \r\t\"Create an instance of me whose question is queryString with the given \r\tinitial answer. Invoke it centered at the given point, and answer the \r\tstring the user accepts. Answer the empty string if the user cancels.\"\r\r\t\"FillInTheBlank \r\t\trequest: 'What is your favorite color?' \r\t\tinitialAnswer: 'red, no blue. Ahhh!!'\"\r\r\t^ self\r\t\trequest: queryString\r\t\tinitialAnswer: defaultAnswer\r\t\tcenterAt: (ActiveHand ifNil:[Sensor]) cursorPoint! !\r\r!FillInTheBlank class methodsFor: 'instance creation' stamp: 'BG 10/28/2003 20:57'!\rrequest: queryString initialAnswer: defaultAnswer centerAt: aPoint\r\t\"Create an instance of me whose question is queryString with the given\r\tinitial answer. Invoke it centered at the given point, and answer the\r\tstring the user accepts. Answer the empty string if the user cancels.\"\r\r\t\"FillInTheBlank\r\t\trequest: 'Type something, then type CR.'\r\t\tinitialAnswer: 'yo ho ho!!'\r\t\tcenterAt: Display center\"\r\r\t| model fillInView |\r\t\r\r\tmodel _ self new initialize.\r\tmodel contents: defaultAnswer.\r\tfillInView _\r\t\tself fillInTheBlankViewClass\r\t\t\ton: model\r\t\t\tmessage: queryString\r\t\t\tcenterAt: aPoint.\r\t^ model show: fillInView! !\r\r\r!FillInTheBlank class methodsFor: 'private' stamp: 'sma 6/18/2000 10:47'!\rfillInTheBlankViewClass\r\t\"By factoring out this class references, it becomes possible to discard \r\tMVC by simply removing this class.  All calls to this method needs\r\tto be protected by 'Smalltalk isMorphic' tests.\"\r\r\t^ FillInTheBlankView! !\rStringHolderController subclass: #FillInTheBlankController\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Support'!\r!FillInTheBlankController commentStamp: '<historical>' prior: 0!\rI am the controller for a FillInTheBlankView. Based on a flag in the view, I can either accept the input string when a carriage return is typed, or I can allow multiple lines of input that is accepted by either typing enter or by invoking the 'accept' command.\r!\r\r\r!FillInTheBlankController methodsFor: 'basic control sequence' stamp: 'th 9/17/2002 16:46'!\rcontrolInitialize\r\r\tmodel acceptOnCR ifFalse: [^ super controlInitialize].\r\tself setMark: self markBlock stringIndex.\r\tself setPoint: self pointBlock stringIndex.\r\tself initializeSelection.\r\tbeginTypeInBlock _ nil.\r! !\r\r!FillInTheBlankController methodsFor: 'basic control sequence' stamp: 'jm 5/6/1998 15:11'!\rcontrolTerminate\r\r\t| topController |\r\tsuper controlTerminate.\r\ttopController _ view topView controller.\r\ttopController ifNotNil: [topController close].\r! !\r\r\r!FillInTheBlankController methodsFor: 'control defaults' stamp: 'sma 3/11/2000 14:45'!\risControlActive\r\t^ self isControlWanted! !\r\r!FillInTheBlankController methodsFor: 'control defaults' stamp: 'sma 3/11/2000 14:45'!\risControlWanted\r\t^ model done not! !\r\r\r!FillInTheBlankController methodsFor: 'other' stamp: 'jm 5/6/1998 15:13'!\raccept\r\r\tsuper accept.\r\tmodel done: true.\r! !\r\r!FillInTheBlankController methodsFor: 'other' stamp: 'sw 1/31/2000 14:47'!\rcancel\r\r\tmodel setResponseForCancel.\r\tsuper cancel.\r\tmodel done: true.\r! !\r\r!FillInTheBlankController methodsFor: 'other' stamp: 'jm 4/28/1998 06:25'!\rdispatchOnCharacter: char with: typeAheadStream\r\t\"Accept the current input if the user hits the carriage return or the enter key.\"\r\r\t(model acceptOnCR and:\r\t [(char = Character cr) | (char = Character enter)])\r\t\tifTrue: [\r\t\t\tsensor keyboard.  \"absorb the character\"\r\t\t\tself accept.\r\t\t\t^ true]\r\t\tifFalse: [\r\t\t\t^ super dispatchOnCharacter: char with: typeAheadStream].\r! !\r\r!FillInTheBlankController methodsFor: 'other' stamp: 'jm 4/28/1998 08:01'!\rprocessYellowButton\r\t\"Suppress yellow-button menu if acceptOnCR is true.\"\r\r\tmodel acceptOnCR ifFalse: [^ super processYellowButton].\r! !\rStringHolderView subclass: #FillInTheBlankView\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Support'!\r!FillInTheBlankView commentStamp: '<historical>' prior: 0!\rI am a view of a FillInTheBlank. I display a query and an editable view of the user's reply string.\r!\r\r\r!FillInTheBlankView methodsFor: 'controller access' stamp: 'jm 4/28/1998 06:37'!\rdefaultControllerClass\r\r\t^ FillInTheBlankController\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rFillInTheBlankView class\r\tinstanceVariableNames: ''!\r\r!FillInTheBlankView class methodsFor: 'instance creation' stamp: 'jm 4/28/1998 08:35'!\rmultiLineOn: aFillInTheBlank message: queryString centerAt: aPoint answerHeight: answerHeight\r\t\"Answer an instance of me on aFillInTheBlank asking the question queryString. Allow the reply to be multiple lines, and make the user input view the given height.\"\r\r\t| messageView answerView topView |\r\tmessageView _ DisplayTextView new\r\t\tmodel: queryString asDisplayText;\r\t\tborderWidthLeft: 2 right: 2 top: 2 bottom: 0;\r\t\tcontroller: NoController new.\r\tmessageView\r\t\twindow: (0@0 extent: (messageView window extent max: 200@30));\r\t\tcentered.\r\tanswerView _ self new\r\t\tmodel: aFillInTheBlank;\r\t\twindow: (0@0 extent: (messageView window width@answerHeight));\r\t\tborderWidth: 2.\r\ttopView _ View new model: aFillInTheBlank.\r\ttopView controller: ModalController new.\r\ttopView addSubView: messageView.\r\ttopView addSubView: answerView below: messageView.\r\ttopView align: topView viewport center with: aPoint.\r\ttopView window:\r\t\t(0 @ 0 extent:\r\t\t\t(messageView window width) @\r\t\t\t  (messageView window height + answerView window height)).\r\ttopView translateBy:\r\t\t(topView displayBox amountToTranslateWithin: Display boundingBox).\r\t^ topView\r! !\r\r!FillInTheBlankView class methodsFor: 'instance creation' stamp: 'jm 4/28/1998 08:22'!\ron: aFillInTheBlank message: queryString centerAt: aPoint\r\t\"Answer an instance of me on aFillInTheBlank for a single line of input in response to the question queryString.\"\r\r\taFillInTheBlank acceptOnCR: true.\r\t^ self\r\t\tmultiLineOn: aFillInTheBlank\r\t\tmessage: queryString\r\t\tcenterAt: aPoint\r\t\tanswerHeight: 40\r! !\rNumber variableWordSubclass: #Float\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'E Epsilon Halfpi Infinity Ln10 Ln2 MaxVal MaxValLn MinValLogBase2 NaN NegativeInfinity NegativeZero Pi RadiansPerDegree Sqrt2 Twopi'\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Numbers'!\r!Float commentStamp: '<historical>' prior: 0!\rMy instances represent IEEE-754 floating-point double-precision numbers.  They have about 16 digits of accuracy and their range is between plus and minus 10^307. Some valid examples are:\r\t\r\t8.0 13.3 0.3 2.5e6 1.27e-30 1.27e-31 -12.987654e12\r\rMainly: no embedded blanks, little e for tens power, and a digit on both sides of the decimal point.  It is actually possible to specify a radix for Squeak Float constants.  This is great for teaching about numbers, but may be confusing to the average reader:\r\r\t3r20.2 --> 6.66666666666667\r\t8r20.2 --> 16.25\r\rIf you don't have access to the definition of IEEE-754, you can figure out what is going on by printing various simple values in Float hex.  It may help you to know that the basic format is...\r\tsign\t\t1 bit\r\texponent\t11 bits with bias of 1023 (16r3FF) to produce an exponent\r\t\t\t\t\t\tin the range -1023 .. +1024\r\t\t\t\t- 16r000:\r\t\t\t\t\tsignificand = 0: Float zero\r\t\t\t\t\tsignificand ~= 0: Denormalized number (exp = -1024, no hidden '1' bit)\r\t\t\t\t- 16r7FF:\r\t\t\t\t\tsignificand = 0: Infinity\r\t\t\t\t\tsignificand ~= 0: Not A Number (NaN) representation\r\tmantissa\t53 bits, but only 52 are stored (20 in the first word, 32 in the second).  This is because a normalized mantissa, by definition, has a 1 to the right of its floating point, and IEEE-754 omits this redundant bit to gain an extra bit of precision instead.  People talk about the mantissa without its leading one as the FRACTION, and with its leading 1 as the SIGNFICAND.\r\rThe single-precision format is...\r\tsign\t\t1 bit\r\texponent\t8 bits, with bias of 127, to represent -126 to +127\r                    - 0x0 and 0xFF reserved for Float zero (mantissa is ignored)\r                    - 16r7F reserved for Float underflow/overflow (mantissa is ignored)\r\tmantissa\t24 bits, but only 23 are stored\rThis format is used in FloatArray (qv), and much can be learned from the conversion routines, Float asIEEE32BitWord, and Float class fromIEEE32Bit:.\r\rThanks to Rich Harmon for asking many questions and to Tim Olson, Bruce Cohen, Rick Zaccone and others for the answers that I have collected here.!\r]style[(680 9 1189 21 6 26 149)f1,f1LFloat hex;,f1,f1LFloat asIEEE32BitWord;,f1,f1LFloat class fromIEEE32Bit:;,f1!\r\r\r!Float methodsFor: 'arithmetic' stamp: 'di 11/6/1998 13:54'!\r* aNumber \r\t\"Primitive. Answer the result of multiplying the receiver by aNumber.\r\tFail if the argument is not a Float. Essential. See Object documentation\r\twhatIsAPrimitive.\"\r\r\t<primitive: 49>\r\t^ aNumber adaptToFloat: self andSend: #*! !\r\r!Float methodsFor: 'arithmetic' stamp: 'di 11/6/1998 13:22'!\r+ aNumber \r\t\"Primitive. Answer the sum of the receiver and aNumber. Essential.\r\tFail if the argument is not a Float. See Object documentation\r\twhatIsAPrimitive.\"\r\r\t<primitive: 41>\r\t^ aNumber adaptToFloat: self andSend: #+! !\r\r!Float methodsFor: 'arithmetic' stamp: 'di 11/6/1998 13:55'!\r- aNumber \r\t\"Primitive. Answer the difference between the receiver and aNumber.\r\tFail if the argument is not a Float. Essential. See Object documentation\r\twhatIsAPrimitive.\"\r\r\t<primitive: 42>\r\t^ aNumber adaptToFloat: self andSend: #-! !\r\r!Float methodsFor: 'arithmetic' stamp: 'hh 10/3/2000 11:46'!\r/ aNumber \r\t\"Primitive. Answer the result of dividing receiver by aNumber.\r\tFail if the argument is not a Float. Essential. See Object documentation\r\twhatIsAPrimitive.\"\r\r\t<primitive: 50>\r\taNumber isZero ifTrue: [^(ZeroDivide dividend: self) signal].\r\t^ aNumber adaptToFloat: self andSend: #/! !\r\r!Float methodsFor: 'arithmetic'!\rabs\r\t\"This is faster than using Number abs.\"\r\tself < 0.0\r\t\tifTrue: [^ 0.0 - self]\r\t\tifFalse: [^ self]! !\r\r!Float methodsFor: 'arithmetic'!\rnegated\r\t\"Answer a Number that is the negation of the receiver.\"\r\r\t^0.0 - self! !\r\r!Float methodsFor: 'arithmetic' stamp: 'RAH 4/25/2000 19:49'!\rreciprocal\r\t#Numeric.\r\t\"Changed 200/01/19 For ANSI <number> support.\"\r\tself = 0 ifTrue: [\"<- Chg\"\r\t\t^ (ZeroDivide dividend: self) signal\"<- Chg\"].\r\t\"<- Chg\"\r\t^ 1.0 / self! !\r\r\r!Float methodsFor: 'mathematical functions'!\rarcCos\r\t\"Answer the angle in radians.\"\r\r\t^ Halfpi - self arcSin! !\r\r!Float methodsFor: 'mathematical functions' stamp: 'jsp 2/25/1999 11:15'!\rarcSin\r\t\"Answer the angle in radians.\"\r\r\t((self < -1.0) or: [self > 1.0]) ifTrue: [self error: 'Value out of range'].\r\t((self = -1.0) or: [self = 1.0])\r\t\tifTrue: [^ Halfpi * self]\r\t\tifFalse: [^ (self / (1.0 - (self * self)) sqrt) arcTan]! !\r\r!Float methodsFor: 'mathematical functions'!\rarcTan\r\t\"Answer the angle in radians.\r\t Optional. See Object documentation whatIsAPrimitive.\"\r\r\t| theta eps step sinTheta cosTheta |\r\t<primitive: 57>\r\r\t\"Newton-Raphson\"\r\tself < 0.0 ifTrue: [ ^ 0.0 - (0.0 - self) arcTan ].\r\r\t\"first guess\"\r\ttheta _ (self * Halfpi) / (self + 1.0).\r\r\t\"iterate\"\r\teps _ Halfpi * Epsilon.\r\tstep _ theta.\r\t[(step * step) > eps] whileTrue: [\r\t\tsinTheta _ theta sin.\r\t\tcosTheta _ theta cos.\r\t\tstep _ (sinTheta * cosTheta) - (self * cosTheta * cosTheta).\r\t\ttheta _ theta - step].\r\t^ theta! !\r\r!Float methodsFor: 'mathematical functions' stamp: 'jsp 3/30/1999 12:38'!\rarcTan: denominator\r\t\"Answer the angle in radians.\r\t Optional. See Object documentation whatIsAPrimitive.\"\r\r\t| result |\r\r\t(self = 0.0) ifTrue: [ (denominator > 0.0) ifTrue: [ result _ 0 ]\r\t\t\t\t\t\t\t\t\t\t    ifFalse: [ result _ Pi ]\r\t\t\t\t\t\t]\r\t\t\t    ifFalse: [(denominator = 0.0)\r\t\t\t\t\tifTrue: [ (self > 0.0) ifTrue: [ result _ Halfpi ]\r\t\t\t\t\t\t\t\t\t\t\t\tifFalse: [ result _ Halfpi negated ]\r\t\t\t\t\t\t\t]\r\t\t\t\t\tifFalse: [ (denominator > 0) ifTrue: [ result _ (self / denominator) arcTan ]\r\t\t\t\t\t\t\t\t ifFalse: [ result _ ((self / denominator) arcTan) + Pi ]\r\t\t\t\t\t\t\t].\r\t\t\t\t\t\t].\r\t\r\t^ result.! !\r\r!Float methodsFor: 'mathematical functions'!\rcos\r\t\"Answer the cosine of the receiver taken as an angle in radians.\"\r\r\t^ (self + Halfpi) sin! !\r\r!Float methodsFor: 'mathematical functions'!\rdegreeCos\r\t\"Answer the cosine of the receiver taken as an angle in degrees.\"\r\r\t^ self degreesToRadians cos! !\r\r!Float methodsFor: 'mathematical functions'!\rdegreeSin\r\t\"Answer the sine of the receiver taken as an angle in degrees.\"\r\r\t^ self degreesToRadians sin! !\r\r!Float methodsFor: 'mathematical functions'!\rexp\r\t\"Answer E raised to the receiver power.\r\t Optional. See Object documentation whatIsAPrimitive.\" \r\r\t| base fract correction delta div |\r\t<primitive: 59>\r\r\t\"Taylor series\"\r\t\"check the special cases\"\r\tself < 0.0 ifTrue: [^ (self negated exp) reciprocal].\r\tself = 0.0 ifTrue: [^ 1].\r\tself abs > MaxValLn ifTrue: [self error: 'exp overflow'].\r\r\t\"get first approximation by raising e to integer power\"\r\tbase _ E raisedToInteger: (self truncated).\r\r\t\"now compute the correction with a short Taylor series\"\r\t\"fract will be 0..1, so correction will be 1..E\"\r\t\"in the worst case, convergance time is logarithmic with 1/Epsilon\"\r\tfract _ self fractionPart.\r\tfract = 0.0 ifTrue: [ ^ base ].  \"no correction required\"\r\r\tcorrection _ 1.0 + fract.\r\tdelta _ fract * fract / 2.0.\r\tdiv _ 2.0.\r\t[delta > Epsilon] whileTrue: [\r\t\tcorrection _ correction + delta.\r\t\tdiv _ div + 1.0.\r\t\tdelta _ delta * fract / div].\r\tcorrection _ correction + delta.\r\t^ base * correction! !\r\r!Float methodsFor: 'mathematical functions' stamp: 'jm 3/27/98 06:28'!\rfloorLog: radix\r\t\"Answer the floor of the log base radix of the receiver.\"\r\r\t^ (self log: radix) floor\r! !\r\r!Float methodsFor: 'mathematical functions'!\rln\r\t\"Answer the natural logarithm of the receiver.\r\t Optional. See Object documentation whatIsAPrimitive.\"\r\r\t| expt n mant x div pow delta sum eps |\r\t<primitive: 58>\r\r\t\"Taylor series\"\r\tself <= 0.0 ifTrue: [self error: 'ln is only defined for x > 0.0'].\r\r\t\"get a rough estimate from binary exponent\"\r\texpt _ self exponent.\r\tn _ Ln2 * expt.\r\tmant _ self timesTwoPower: 0 - expt.\r\r\t\"compute fine correction from mantinssa in Taylor series\"\r\t\"mant is in the range [0..2]\"\r\t\"we unroll the loop to avoid use of abs\"\r\tx _ mant - 1.0.\r\tdiv _ 1.0.\r\tpow _ delta _ sum _ x.\r\tx _ x negated.  \"x <= 0\"\r\teps _ Epsilon * (n abs + 1.0).\r\t[delta > eps] whileTrue: [\r\t\t\"pass one: delta is positive\"\r\t\tdiv _ div + 1.0.\r\t\tpow _ pow * x.\r\t\tdelta _ pow / div.\r\t\tsum _ sum + delta.\r\t\t\"pass two: delta is negative\"\r\t\tdiv _ div + 1.0.\r\t\tpow _ pow * x.\r\t\tdelta _ pow / div.\r\t\tsum _ sum + delta].\r\r\t^ n + sum\r\r\t\"2.718284 ln 1.0\"! !\r\r!Float methodsFor: 'mathematical functions'!\rlog\r\t\"Answer the base 10 logarithm of the receiver.\"\r\r\t^ self ln / Ln10! !\r\r!Float methodsFor: 'mathematical functions' stamp: 'AFi 11/23/2002 21:06'!\rraisedTo: aNumber\r\t\"Answer the receiver raised to aNumber.\"\r\r\taNumber isInteger ifTrue:\r\t\t[\"Do the special case of integer power\"\r\t\t^ self raisedToInteger: aNumber].\r\tself < 0.0 ifTrue:\r\t\t[ ArithmeticError signal: ' raised to a non-integer power' ].\r\t0.0 = aNumber ifTrue: [^ 1.0].\t\t\t\t\"special case for exponent = 0.0\"\r\t(self= 0.0) | (aNumber = 1.0) ifTrue: [^ self].\t\"special case for self = 1.0\"\r\t^ (self ln * aNumber asFloat) exp\t\t\t\"otherwise use logarithms\"\r! !\r\r!Float methodsFor: 'mathematical functions' stamp: 'tao 4/19/98 23:22'!\rreciprocalFloorLog: radix \r\t\"Quick computation of (self log: radix) floor, when self < 1.0.\r\tAvoids infinite recursion problems with denormalized numbers\"\r\r\t| adjust scale n |\r\tadjust _ 0.\r\tscale _ 1.0.\r\t[(n _ radix / (self * scale)) isInfinite]\r\t\twhileTrue:\r\t\t\t[scale _ scale * radix.\r\t\t\tadjust _ adjust + 1].\r\t^ ((n floorLog: radix) + adjust) negated! !\r\r!Float methodsFor: 'mathematical functions' stamp: 'tao 10/15/97 14:23'!\rreciprocalLogBase2\r\t\"optimized for self = 10, for use in conversion for printing\"\r\r\t^ self = 10.0\r\t\tifTrue: [Ln2 / Ln10]\r\t\tifFalse: [Ln2 / self ln]! !\r\r!Float methodsFor: 'mathematical functions'!\rsin\r\t\"Answer the sine of the receiver taken as an angle in radians.\r\t Optional. See Object documentation whatIsAPrimitive.\"\r\r\t| sum delta self2 i |\r\t<primitive: 56>\r\r\t\"Taylor series\"\r\t\"normalize to the range [0..Pi/2]\"\r\tself < 0.0 ifTrue: [^ (0.0 - ((0.0 - self) sin))].\r\tself > Twopi ifTrue: [^ (self \\\\ Twopi) sin].\r\tself > Pi ifTrue: [^ (0.0 - (self - Pi) sin)].\r\tself > Halfpi ifTrue: [^ (Pi - self) sin].\r\r\t\"unroll loop to avoid use of abs\"\r\tsum _ delta _ self.\r\tself2 _ 0.0 - (self * self).\r\ti _ 2.0.\r\t[delta > Epsilon] whileTrue: [\r\t\t\"once\"\r\t\tdelta _ (delta * self2) / (i * (i + 1.0)).\r\t\ti _ i + 2.0.\r\t\tsum _ sum + delta.\r\t\t\"twice\"\r\t\tdelta _ (delta * self2) / (i * (i + 1.0)).\r\t\ti _ i + 2.0.\r\t\tsum _ sum + delta].\r\t^ sum! !\r\r!Float methodsFor: 'mathematical functions' stamp: 'RAH 4/25/2000 19:49'!\rsqrt\r\t\"Answer the square root of the receiver. \r\t Optional. See Object documentation whatIsAPrimitive.\"\r\t| exp guess eps delta |\r\t<primitive: 55>\r\t#Numeric.\r\t\"Changed 200/01/19 For ANSI <number> support.\"\r\t\"Newton-Raphson\"\r\tself <= 0.0\r\t\tifTrue: [self = 0.0\r\t\t\t\tifTrue: [^ 0.0]\r\t\t\t\tifFalse: [\"v Chg\"\r\t\t\t\t\t^ FloatingPointException signal: 'undefined if less than zero.']].\r\t\"first guess is half the exponent\"\r\texp := self exponent // 2.\r\tguess := self timesTwoPower: 0 - exp.\r\t\"get eps value\"\r\teps := guess * Epsilon.\r\teps := eps * eps.\r\tdelta := self - (guess * guess) / (guess * 2.0).\r\t[delta * delta > eps]\r\t\twhileTrue: \r\t\t\t[guess := guess + delta.\r\t\t\tdelta := self - (guess * guess) / (guess * 2.0)].\r\t^ guess! !\r\r!Float methodsFor: 'mathematical functions'!\rtan\r\t\"Answer the tangent of the receiver taken as an angle in radians.\"\r\r\t^ self sin / self cos! !\r\r!Float methodsFor: 'mathematical functions'!\rtimesTwoPower: anInteger \r\t\"Primitive. Answer with the receiver multiplied by 2.0 raised\r\tto the power of the argument.\r\tOptional. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 54>\r\r\tanInteger < -29 ifTrue: [^ self * (2.0 raisedToInteger: anInteger)].\r\tanInteger < 0 ifTrue: [^ self / (1 bitShift: (0 - anInteger)) asFloat].\r\tanInteger < 30 ifTrue: [^ self * (1 bitShift: anInteger) asFloat].\r\t^ self * (2.0 raisedToInteger: anInteger)! !\r\r\r!Float methodsFor: 'comparing' stamp: 'di 11/6/1998 13:55'!\r< aNumber \r\t\"Primitive. Compare the receiver with the argument and return true\r\tif the receiver is less than the argument. Otherwise return false.\r\tFail if the argument is not a Float. Essential. See Object documentation\r\twhatIsAPrimitive.\"\r\r\t<primitive: 43>\r\t^ aNumber adaptToFloat: self andSend: #<! !\r\r!Float methodsFor: 'comparing' stamp: 'di 11/6/1998 13:55'!\r<= aNumber \r\t\"Primitive. Compare the receiver with the argument and return true\r\tif the receiver is less than or equal to the argument. Otherwise return\r\tfalse. Fail if the argument is not a Float. Optional. See Object\r\tdocumentation whatIsAPrimitive.\"\r\r\t<primitive: 45>\r\t^ aNumber adaptToFloat: self andSend: #<=! !\r\r!Float methodsFor: 'comparing' stamp: 'di 11/6/1998 13:56'!\r= aNumber \r\t\"Primitive. Compare the receiver with the argument and return true\r\tif the receiver is equal to the argument. Otherwise return false.\r\tFail if the argument is not a Float. Essential. See Object documentation\r\twhatIsAPrimitive.\"\r\r\t<primitive: 47>\r\taNumber isNumber ifFalse: [^ false].\r\t^ aNumber adaptToFloat: self andSend: #=! !\r\r!Float methodsFor: 'comparing' stamp: 'di 11/6/1998 13:57'!\r> aNumber \r\t\"Primitive. Compare the receiver with the argument and return true\r\tif the receiver is greater than the argument. Otherwise return false.\r\tFail if the argument is not a Float. Essential. See Object documentation\r\twhatIsAPrimitive.\"\r\r\t<primitive: 44>\r\t^ aNumber adaptToFloat: self andSend: #>! !\r\r!Float methodsFor: 'comparing' stamp: 'di 11/6/1998 13:57'!\r>= aNumber \r\t\"Primitive. Compare the receiver with the argument and return true\r\tif the receiver is greater than or equal to the argument. Otherwise return\r\tfalse. Fail if the argument is not a Float. Optional. See Object documentation \r\twhatIsAPrimitive. \"\r\r\t<primitive: 46>\r\t^ aNumber adaptToFloat: self andSend: #>! !\r\r!Float methodsFor: 'comparing' stamp: 'tk 11/27/1999 21:47'!\rcloseTo: num\r\t\"are these two numbers close?\"\r\t| fuzz ans |\r\tnum isNumber ifFalse: [\r\t\t[ans _ self = num] ifError: [:aString :aReceiver | ^ false].\r\t\t^ ans].\r\tself = 0.0 ifTrue: [^ num abs < 0.0001].\r\tnum = 0.0 ifTrue: [^ self abs < 0.0001].\r\tself isNaN == num isNaN ifFalse: [^ false].\r\tself isInfinite == num isInfinite ifFalse: [^ false].\r\tfuzz := (self abs max: num abs) * 0.0001.\r\t^ (self - num) abs <= fuzz! !\r\r!Float methodsFor: 'comparing' stamp: 'jm 4/28/1998 01:04'!\rhash\r\t\"Hash is reimplemented because = is implemented. Both words of the float are used; 8 bits are removed from each end to clear most of the exponent regardless of the byte ordering. (The bitAnd:'s ensure that the intermediate results do not become a large integer.) Slower than the original version in the ratios 12:5 to 2:1 depending on values. (DNS, 11 May, 1997)\"\r\r\t^ (((self basicAt: 1) bitAnd: 16r00FFFF00) +\r\t   ((self basicAt: 2) bitAnd: 16r00FFFF00)) bitShift: -8\r! !\r\r!Float methodsFor: 'comparing'!\r~= aNumber \r\t\"Primitive. Compare the receiver with the argument and return true\r\tif the receiver is not equal to the argument. Otherwise return false.\r\tFail if the argument is not a Float. Optional. See Object documentation\r\twhatIsAPrimitive.\"\r\r\t<primitive: 48>\r\t^super ~= aNumber! !\r\r\r!Float methodsFor: 'testing' stamp: 'bf 8/20/1999 12:56'!\rhasContentsInExplorer\r\r\t^false! !\r\r!Float methodsFor: 'testing'!\risFloat\r\t^ true! !\r\r!Float methodsFor: 'testing' stamp: 'jm 4/30/1998 13:50'!\risInfinite\r\t\"Return true if the receiver is positive or negative infinity.\"\r\r\t^ self = Infinity or: [self = NegativeInfinity]\r! !\r\r!Float methodsFor: 'testing'!\risLiteral\r\r\t^true! !\r\r!Float methodsFor: 'testing' stamp: 'tao 10/10/97 16:39'!\risNaN\r\t\"simple, byte-order independent test for Not-a-Number\"\r\r\t^ self ~= self! !\r\r!Float methodsFor: 'testing' stamp: 'ar 6/9/2000 18:56'!\risPowerOfTwo\r\t\"Return true if the receiver is an integral power of two.\r\tFloats never return true here.\"\r\t^false! !\r\r!Float methodsFor: 'testing'!\risZero\r\t^self = 0.0! !\r\r!Float methodsFor: 'testing' stamp: 'jm 4/28/1998 01:10'!\rsign\r\t\"Answer 1 if the receiver is greater than 0, -1 if less than 0, else 0.\r\tHandle IEEE-754 negative-zero by reporting a sign of -1\"\r\r\tself > 0 ifTrue: [^ 1].\r\t(self < 0 or: [((self at: 1) bitShift: -31) = 1]) ifTrue: [^ -1].\r\t^ 0! !\r\r\r!Float methodsFor: 'truncation and round off'!\rexponent\r\t\"Primitive. Consider the receiver to be represented as a power of two\r\tmultiplied by a mantissa (between one and two). Answer with the\r\tSmallInteger to whose power two is raised. Optional. See Object\r\tdocumentation whatIsAPrimitive.\"\r\r\t| positive |\r\t<primitive: 53>\r\tself >= 1.0 ifTrue: [^self floorLog: 2].\r\tself > 0.0\r\t\tifTrue: \r\t\t\t[positive _ (1.0 / self) exponent.\r\t\t\tself = (1.0 / (1.0 timesTwoPower: positive))\r\t\t\t\tifTrue: [^positive negated]\r\t\t\t\tifFalse: [^positive negated - 1]].\r\tself = 0.0 ifTrue: [^-1].\r\t^self negated exponent! !\r\r!Float methodsFor: 'truncation and round off'!\rfractionPart\r\t\"Primitive. Answer a Float whose value is the difference between the \r\treceiver and the receiver's asInteger value. Optional. See Object \r\tdocumentation whatIsAPrimitive.\"\r\r\t<primitive: 52>\r\t^self - self truncated asFloat! !\r\r!Float methodsFor: 'truncation and round off'!\rintegerPart\r\t\"Answer a Float whose value is the receiver's truncated value.\"\r\r\t^self - self fractionPart! !\r\r!Float methodsFor: 'truncation and round off' stamp: 'tk 12/30/2000 20:04'!\rreduce\r    \"If self is close to an integer, return that integer\"\r\r    (self closeTo: self rounded) ifTrue: [^ self rounded]! !\r\r!Float methodsFor: 'truncation and round off'!\rrounded\r\t\"Answer the integer nearest the receiver.\"\r\r\tself >= 0.0\r\t\tifTrue: [^(self + 0.5) truncated]\r\t\tifFalse: [^(self - 0.5) truncated]! !\r\r!Float methodsFor: 'truncation and round off' stamp: 'tao 4/19/98 13:14'!\rsignificand\r\r\t^ self timesTwoPower: (self exponent negated)! !\r\r!Float methodsFor: 'truncation and round off' stamp: 'tao 4/19/98 14:27'!\rsignificandAsInteger\r\r\t| exp sig |\r\texp _ self exponent.\r\tsig _ (((self at: 1) bitAnd: 16r000FFFFF) bitShift: 32) bitOr: (self at: 2).\r\texp > -1023\r\t\tifTrue: [sig _ sig bitOr: (1 bitShift: 52)].\r\t^ sig.! !\r\r!Float methodsFor: 'truncation and round off' stamp: 'di 7/1/1998 23:01'!\rtruncated\r\t\"Answer with a SmallInteger equal to the value of the receiver without \r\tits fractional part. The primitive fails if the truncated value cannot be \r\trepresented as a SmallInteger. In that case, the code below will compute \r\ta LargeInteger truncated value.\r\tEssential. See Object documentation whatIsAPrimitive. \"\r\r\t<primitive: 51>\r\t(self isInfinite or: [self isNaN]) ifTrue: [self error: 'Cannot truncate this number'].\r\r\tself abs < 2.0e16\r\t\tifTrue: [\"Fastest way when it may not be an integer\"\r\t\t\t\t^ (self quo: 1073741823.0) * 1073741823 + (self rem: 1073741823.0) truncated]\r\t\tifFalse: [^ self asTrueFraction.  \"Extract all bits of the mantissa and shift if necess\"]! !\r\r\r!Float methodsFor: 'converting' stamp: 'di 11/6/1998 13:38'!\radaptToFraction: rcvr andSend: selector\r\t\"If I am involved in arithmetic with a Fraction, convert it to a Float.\"\r\t^ rcvr asFloat perform: selector with: self! !\r\r!Float methodsFor: 'converting' stamp: 'di 11/6/1998 13:07'!\radaptToInteger: rcvr andSend: selector\r\t\"If I am involved in arithmetic with an Integer, convert it to a Float.\"\r\t^ rcvr asFloat perform: selector with: self! !\r\r!Float methodsFor: 'converting' stamp: 'RAH 4/25/2000 19:49'!\radaptToScaledDecimal: receiverScaledDecimal andSend: arithmeticOpSelector \r\t\"Convert receiverScaledDecimal to a Float and do the arithmetic. \r\treceiverScaledDecimal arithmeticOpSelector self.\"\r\t#Numeric.\r\t\"add 200/01/19 For ScaledDecimal support.\"\r\t^ receiverScaledDecimal asFloat perform: arithmeticOpSelector with: self! !\r\r!Float methodsFor: 'converting'!\rasApproximateFraction\r\t\"Answer a Fraction approximating the receiver. This conversion uses the \r\tcontinued fraction method to approximate a floating point number.\"\r\r\t| num1 denom1 num2 denom2 int frac newD temp |\r\tnum1 _ self asInteger.\t\"The first of two alternating numerators\"\r\tdenom1 _ 1.\t\t\"The first of two alternating denominators\"\r\tnum2 _ 1.\t\t\"The second numerator\"\r\tdenom2 _ 0.\t\t\"The second denominator--will update\"\r\tint _ num1.\t\t\"The integer part of self\"\r\tfrac _ self fractionPart.\t\t\"The fractional part of self\"\r\t[frac = 0]\r\t\twhileFalse: \r\t\t\t[\"repeat while the fractional part is not zero\"\r\t\t\tnewD _ 1.0 / frac.\t\t\t\"Take reciprocal of the fractional part\"\r\t\t\tint _ newD asInteger.\t\t\"get the integer part of this\"\r\t\t\tfrac _ newD fractionPart.\t\"and save the fractional part for next time\"\r\t\t\ttemp _ num2.\t\t\t\t\"Get old numerator and save it\"\r\t\t\tnum2 _ num1.\t\t\t\t\"Set second numerator to first\"\r\t\t\tnum1 _ num1 * int + temp.\t\"Update first numerator\"\r\t\t\ttemp _ denom2.\t\t\t\t\"Get old denominator and save it\"\r\t\t\tdenom2 _ denom1.\t\t\t\"Set second denominator to first\"\r\t\t\tdenom1 _ int * denom1 + temp.\t\t\"Update first denominator\"\r\t\t\t10000000000.0 < denom1\r\t\t\t\tifTrue: \r\t\t\t\t\t[\"Is ratio past float precision?  If so, pick which \r\t\t\t\t\tof the two ratios to use\"\r\t\t\t\t\tnum2 = 0.0 \r\t\t\t\t\t\tifTrue: [\"Is second denominator 0?\"\r\t\t\t\t\t\t\t\t^ Fraction numerator: num1 denominator: denom1].\r\t\t\t\t\t^ Fraction numerator: num2 denominator: denom2]].\r\t\"If fractional part is zero, return the first ratio\"\r\tdenom1 = 1\r\t\tifTrue: [\"Am I really an Integer?\"\r\t\t\t\t^ num1 \"Yes, return Integer result\"]\r\t\tifFalse: [\"Otherwise return Fraction result\"\r\t\t\t\t^ Fraction numerator: num1 denominator: denom1]! !\r\r!Float methodsFor: 'converting'!\rasFloat\r\t\"Answer the receiver itself.\"\r\r\t^self! !\r\r!Float methodsFor: 'converting' stamp: 'sma 5/3/2000 21:46'!\rasFraction\r\t^ self asTrueFraction ! !\r\r!Float methodsFor: 'converting' stamp: 'di 2/8/1999 12:51'!\rasIEEE32BitWord\r\t\"Convert the receiver into a 32 bit Integer value representing the same number in IEEE 32 bit format. Used for conversion in FloatArrays only.\"\r\t| word1 word2 sign mantissa exponent destWord |\r\tself = 0.0 ifTrue:[^0].\r\tword1 _ self basicAt: 1.\r\tword2 _ self basicAt: 2.\r\tmantissa _ (word2 bitShift: -29) + ((word1 bitAnd:  16rFFFFF) bitShift: 3).\r\texponent _ ((word1 bitShift: -20) bitAnd: 16r7FF) - 1023 + 127.\r\texponent < 0 ifTrue:[^0]. \"Underflow\"\r\texponent > 254 ifTrue:[\"Overflow\"\r\t\texponent _ 255.\r\t\tmantissa _ 0].\r\tsign _ word1 bitAnd: 16r80000000.\r\tdestWord _ (sign bitOr: (exponent bitShift: 23)) bitOr: mantissa.\r\t^ destWord! !\r\r!Float methodsFor: 'converting' stamp: 'di 7/1/1998 22:20'!\rasTrueFraction\r\t\" Answer a fraction that EXACTLY represents self,\r\t  a double precision IEEE floating point number.\r\t  Floats are stored in the same form on all platforms.\r\t  (Does not handle gradual underflow or NANs.)\r\t  By David N. Smith with significant performance\r\t  improvements by Luciano Esteban Notarfrancesco.\r\t  (Version of 11April97)\"\r\t| shifty sign expPart exp fraction fractionPart result zeroBitsCount |\r\tself isInfinite ifTrue: [self error: 'Cannot represent infinity as a fraction'].\r\tself isNaN ifTrue: [self error: 'Cannot represent Not-a-Number as a fraction'].\r\r\t\" Extract the bits of an IEEE double float \"\r\tshifty := ((self basicAt: 1) bitShift: 32) + (self basicAt: 2).\r\r\t\" Extract the sign and the biased exponent \"\r\tsign := (shifty bitShift: -63) = 0 ifTrue: [1] ifFalse: [-1].\r\texpPart := (shifty bitShift: -52) bitAnd: 16r7FF.\r\r\t\" Extract fractional part; answer 0 if this is a true 0.0 value \"\r\tfractionPart := shifty bitAnd:  16r000FFFFFFFFFFFFF.\r\t( expPart=0 and: [ fractionPart=0 ] ) ifTrue: [ ^ 0  ].\r\r\t\" Replace omitted leading 1 in fraction \"\r\tfraction := fractionPart bitOr: 16r0010000000000000.\r\r\t\"Unbias exponent: 16r3FF is bias; 52 is fraction width\"\r\texp := 16r3FF + 52 - expPart.\r\r\t\" Form the result. When exp>52, the exponent is adjusted by\r\t  the number of trailing zero bits in the fraction to minimize\r\t  the (huge) time otherwise spent in #gcd:. \"\r\texp negative\r\t\tifTrue: [\r\t\t\tresult := sign * fraction bitShift: exp negated ]\r\t\tifFalse:\t[\r\t\t\tzeroBitsCount _ fraction lowBit - 1.\r\t\t\texp := exp - zeroBitsCount.\r\t\t\texp <= 0\r\t\t\t\tifTrue: [\r\t\t\t\t\tzeroBitsCount := zeroBitsCount + exp.\r\t\t\t\t\t\"exp := 0.\"   \" Not needed; exp not\rrefernced again \"\r\t\t\t\t\tresult := sign * fraction bitShift:\rzeroBitsCount negated ]\r\t\t\t\tifFalse: [\r\t\t\t\t\tresult := Fraction\r\t\t\t\t\t\tnumerator: (sign * fraction\rbitShift: zeroBitsCount negated)\r\t\t\t\t\t\tdenominator: (1 bitShift:\rexp) ] ].\r\r\t\"Low cost validation omitted after extensive testing\"\r\t\"(result asFloat = self) ifFalse: [self error: 'asTrueFraction validation failed'].\"\r\t^ result ! !\r\r!Float methodsFor: 'converting'!\rdegreesToRadians\r\t\"Answer the receiver in radians. Assumes the receiver is in degrees.\"\r\r\t^self * RadiansPerDegree! !\r\r!Float methodsFor: 'converting' stamp: 'tao 10/10/97 16:38'!\risInf\r\t\"simple, byte-order independent test for +/- Infinity\"\r\r\t^ self = (self * 1.5 + 1.0)! !\r\r!Float methodsFor: 'converting'!\rradiansToDegrees\r\t\"Answer the receiver in degrees. Assumes the receiver is in radians.\"\r\r\t^self / RadiansPerDegree! !\r\r\r!Float methodsFor: 'copying'!\rdeepCopy\r\r\t^self copy! !\r\r!Float methodsFor: 'copying'!\rshallowCopy\r\r\t^self + 0.0! !\r\r!Float methodsFor: 'copying' stamp: 'tk 8/19/1998 16:08'!\rveryDeepCopyWith: deepCopier\r\t\"Return self.  Do not record me.\"\r\r\t^ self clone! !\r\r\r!Float methodsFor: 'printing' stamp: 'tao 4/22/98 11:58'!\rabsPrintOn: aStream base: base\r\t\"Print my value on a stream in the given base.  Assumes that my value is strictly\r\tpositive; negative numbers, zero, and NaNs have already been handled elsewhere.\r\tBased upon the algorithm outlined in:\r\tRobert G. Burger and R. Kent Dybvig\r\tPrinting Floating Point Numbers Quickly and Accurately\r\tACM SIGPLAN 1996 Conference on Programming Language Design and Implementation\r\tJune 1996.\r\tThis version performs all calculations with Floats instead of LargeIntegers, and loses\r\tabout 3 lsbs of accuracy compared to an exact conversion.\"\r\r\t| significantBits fBase exp baseExpEstimate r s mPlus mMinus scale d tc1 tc2 fixedFormat decPointCount |\r\tself isInfinite ifTrue: [aStream nextPutAll: 'Infinity'. ^ self].\r\tsignificantBits _ 50.  \"approximately 3 lsb's of accuracy loss during conversion\"\r\tfBase _ base asFloat.\r\texp _ self exponent.\r\tbaseExpEstimate _ (exp * fBase reciprocalLogBase2 - 1.0e-10) ceiling.\r\texp >= 0\r\t\tifTrue:\r\t\t\t[r _ self.\r\t\t\ts _ 1.0.\r\t\t\tmPlus _ 1.0 timesTwoPower: exp - significantBits.\r\t\t\tmMinus _ self significand ~= 1.0 ifTrue: [mPlus] ifFalse: [mPlus / 2.0]]\r\t\tifFalse:\r\t\t\t[r _ self timesTwoPower: significantBits.\r\t\t\ts _ 1.0 timesTwoPower:  significantBits.\r\t\t\tmMinus _ 1.0 timesTwoPower: (exp max: -1024).\r\t\t\tmPlus _\r\t\t\t\t(exp = MinValLogBase2) | (self significand ~= 1.0)\r\t\t\t\t\tifTrue: [mMinus]\r\t\t\t\t\tifFalse: [mMinus * 2.0]].\r\tbaseExpEstimate >= 0\r\t\tifTrue:\r\t\t\t[s _ s * (fBase raisedToInteger: baseExpEstimate).\r\t\t\texp = 1023\r\t\t\t\tifTrue:   \"scale down to prevent overflow to Infinity during conversion\"\r\t\t\t\t\t[r _ r / fBase.\r\t\t\t\t\ts _ s / fBase.\r\t\t\t\t\tmPlus _ mPlus / fBase.\r\t\t\t\t\tmMinus _ mMinus / fBase]]\r\t\tifFalse:\r\t\t\t[exp < -1023\r\t\t\t\tifTrue:   \"scale up to prevent denorm reciprocals overflowing to Infinity\"\r\t\t\t\t\t[d _ (53 * fBase reciprocalLogBase2 - 1.0e-10) ceiling.\r\t\t\t\t\tscale _ fBase raisedToInteger: d.\r\t\t\t\t\tr _ r * scale.\r\t\t\t\t\tmPlus _ mPlus * scale.\r\t\t\t\t\tmMinus _ mMinus * scale.\r\t\t\t\t\tscale _ fBase raisedToInteger: (baseExpEstimate + d) negated]\r\t\t\t\tifFalse:\r\t\t\t\t[scale _ fBase raisedToInteger: baseExpEstimate negated].\r\t\t\ts _ s / scale].\r\t(r + mPlus >= s)\r\t\tifTrue: [baseExpEstimate _ baseExpEstimate + 1]\r\t\tifFalse:\r\t\t\t[s _ s / fBase].\r\t(fixedFormat _ baseExpEstimate between: -3 and: 6)\r\t\tifTrue:\r\t\t\t[decPointCount _ baseExpEstimate.\r\t\t\tbaseExpEstimate <= 0\r\t\t\t\tifTrue: [aStream nextPutAll: ('0.000000' truncateTo: 2 - baseExpEstimate)]]\r\t\tifFalse:\r\t\t\t[decPointCount _ 1].\r\t[d _ (r / s) truncated.\r\tr _ r - (d * s).\r\t(tc1 _ r <= mMinus) | (tc2 _ r + mPlus >= s)] whileFalse:\r\t\t[aStream nextPut: (Character digitValue: d).\r\t\tr _ r * fBase.\r\t\tmPlus _ mPlus * fBase.\r\t\tmMinus _ mMinus * fBase.\r\t\tdecPointCount _ decPointCount - 1.\r\t\tdecPointCount = 0 ifTrue: [aStream nextPut: $.]].\r\ttc2 ifTrue:\r\t\t[tc1 not | (tc1 & (r*2.0 >= s)) ifTrue: [d _ d + 1]].\r\taStream nextPut: (Character digitValue: d).\r\tdecPointCount > 0\r\t\tifTrue:\r\t\t[decPointCount - 1 to: 1 by: -1 do: [:i | aStream nextPut: $0].\r\t\taStream nextPutAll: '.0'].\r\tfixedFormat ifFalse:\r\t\t[aStream nextPut: $e.\r\t\taStream nextPutAll: (baseExpEstimate - 1) printString]! !\r\r!Float methodsFor: 'printing'!\rhex  \"If ya really want to know...\"\r\t| word nibble |\r\t^ String streamContents:\r\t\t[:strm |\r\t\t1 to: 2 do:\r\t\t\t[:i | word _ self at: i.\r\t\t\t1 to: 8 do: \r\t\t\t\t[:s | nibble _ (word bitShift: -8+s*4) bitAnd: 16rF.\r\t\t\t\tstrm nextPut: ('0123456789ABCDEF' at: nibble+1)]]]\r\"\r(-2.0 to: 2.0) collect: [:f | f hex]\r\"! !\r\r!Float methodsFor: 'printing' stamp: 'tao 4/19/98 23:31'!\rprintOn: aStream base: base\r\t\"Handle sign, zero, and NaNs; all other values passed to absPrintOn:base:\" \r\r\tself isNaN ifTrue: [aStream nextPutAll: 'NaN'. ^ self]. \"check for NaN before sign\"\r\tself > 0.0\r\t\tifTrue: [self absPrintOn: aStream base: base]\r\t\tifFalse:\r\t\t\t[self sign = -1\r\t\t\t\tifTrue: [aStream nextPutAll: '-'].\r\t\t\tself = 0.0\r\t\t\t\tifTrue: [aStream nextPutAll: '0.0'. ^ self]\r\t\t\t\tifFalse: [self negated absPrintOn: aStream base: base]]! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rFloat class\r\tinstanceVariableNames: ''!\r\r!Float class methodsFor: 'class initialization' stamp: 'jm 4/30/1998 13:48'!\rinitialize\r\t\"Float initialize\"\r\t\"Constants from Computer Approximations, pp. 182-183:\r\t\tPi = 3.14159265358979323846264338327950288\r\t\tPi/2 = 1.57079632679489661923132169163975144\r\t\tPi*2 = 6.28318530717958647692528676655900576\r\t\tPi/180 = 0.01745329251994329576923690768488612\r\t\t2.0 ln = 0.69314718055994530941723212145817657\r\t\t2.0 sqrt = 1.41421356237309504880168872420969808\"\r\r\tPi _ 3.14159265358979323846264338327950288.\r\tHalfpi _ Pi / 2.0.\r\tTwopi _ Pi * 2.0.\r\tRadiansPerDegree _ Pi / 180.0.\r\r\tLn2 _ 0.69314718055994530941723212145817657.\r\tLn10 _ 10.0 ln.\r\tSqrt2 _ 1.41421356237309504880168872420969808.\r\tE _ 2.718281828459045235360287471353.\r\r\tEpsilon _ 0.000000000001.  \"Defines precision of mathematical functions\"\r\r\tMaxVal _ 1.7976931348623159e308.\r\tMaxValLn _ 709.782712893384.\r\tMinValLogBase2 _ -1074.\r\r\tInfinity _ MaxVal * MaxVal.\r\tNegativeInfinity _ 0.0 - Infinity.\r\tNaN _ Infinity - Infinity.\r\tNegativeZero _ 1.0 / Infinity negated.\r! !\r\r\r!Float class methodsFor: 'instance creation' stamp: 'di 2/8/1999 12:58'!\rfromIEEE32Bit: word\r\t\"Convert the given 32 bit word (which is supposed to be a positive 32bit value) from a 32bit IEEE floating point representation into an actual Squeak float object (being 64bit wide). Should only be used for conversion in FloatArrays or likewise objects.\"\r\t| sign mantissa exponent newFloat |\r\tword negative ifTrue: [^ self error:'Cannot deal with negative numbers'].\r\tword = 0 ifTrue:[^ 0.0].\r\tmantissa _ word bitAnd:  16r7FFFFF.\r\texponent _ ((word bitShift: -23) bitAnd: 16rFF) - 127.\r\tsign _ word bitAnd: 16r80000000.\r\r\texponent = 128 ifTrue:[\"Either NAN or INF\"\r\t\tmantissa = 0 ifFalse:[^ Float nan].\r\t\tsign = 0 \r\t\t\tifTrue:[^ Float infinity]\r\t\t\tifFalse:[^ Float infinity negated]].\r\r\t\"Create new float\"\r\tnewFloat _ self new: 2.\r\tnewFloat basicAt: 1 put: ((sign bitOr: (1023 + exponent bitShift: 20)) bitOr: (mantissa bitShift: -3)).\r\tnewFloat basicAt: 2 put: ((mantissa bitAnd: 7) bitShift: 29).\r\t^newFloat! !\r\r!Float class methodsFor: 'instance creation'!\rreadFrom: aStream \r\t\"Answer a new Float as described on the stream, aStream.\"\r\r\t^(super readFrom: aStream) asFloat! !\r\r\r!Float class methodsFor: 'constants' stamp: 'tao 4/23/98 11:37'!\rinfinity\r\t\"Answer the value used to represent an infinite magnitude\"\r\r\t^ Infinity! !\r\r!Float class methodsFor: 'constants' stamp: 'tao 4/23/98 11:38'!\rnan\r\t\"Answer the canonical value used to represent Not-A-Number\"\r\r\t^ NaN! !\r\r!Float class methodsFor: 'constants' stamp: 'tao 4/23/98 12:05'!\rnegativeZero\r\r\t^ NegativeZero! !\r\r!Float class methodsFor: 'constants' stamp: 'RAH 4/25/2000 19:49'!\rone\r\t#Numeric.\r\t\"add 200/01/19 For <number> protocol support.\"\r\t^ 1.0! !\r\r!Float class methodsFor: 'constants'!\rpi\r\t\"Answer the constant, Pi.\"\r\r\t^Pi! !\r\r\r!Float class methodsFor: 'plugin generation' stamp: 'bf 3/16/2000 19:06'!\rccg: cg emitLoadFor: aString from: anInteger on: aStream\r\r\tcg emitLoad: aString asFloatValueFrom: anInteger on: aStream! !\r\r!Float class methodsFor: 'plugin generation' stamp: 'acg 10/5/1999 06:05'!\rccg: cg generateCoerceToOopFrom: aNode on: aStream\r\r\tcg generateCoerceToFloatObjectFrom: aNode on: aStream! !\r\r!Float class methodsFor: 'plugin generation' stamp: 'acg 10/5/1999 06:10'!\rccg: cg generateCoerceToValueFrom: aNode on: aStream\r\r\tcg generateCoerceToFloatValueFrom: aNode on: aStream! !\r\r!Float class methodsFor: 'plugin generation' stamp: 'acg 9/18/1999 17:08'!\rccg: cg prolog: aBlock expr: aString index: anInteger\r\r\t^cg ccgLoad: aBlock expr: aString asFloatValueFrom: anInteger! !\r\r!Float class methodsFor: 'plugin generation' stamp: 'acg 9/20/1999 11:22'!\rccgCanConvertFrom: anObject\r\r\t^anObject class == self! !\r\r!Float class methodsFor: 'plugin generation' stamp: 'acg 9/17/1999 01:09'!\rccgDeclareCForVar: aSymbolOrString\r\r\t^'double ', aSymbolOrString! !\rArrayedCollection variableWordSubclass: #FloatArray\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Arrayed'!\r!FloatArray commentStamp: '<historical>' prior: 0!\rFloatArrays store 32bit IEEE floating point numbers.!\r\r\r!FloatArray methodsFor: 'accessing' stamp: 'ar 2/2/2001 15:47'!\rat: index\r\t<primitive: 'primitiveAt' module: 'FloatArrayPlugin'>\r\t^Float fromIEEE32Bit: (self basicAt: index)! !\r\r!FloatArray methodsFor: 'accessing' stamp: 'ar 2/2/2001 15:47'!\rat: index put: value\r\t<primitive: 'primitiveAtPut' module: 'FloatArrayPlugin'>\r\tvalue isFloat \r\t\tifTrue:[self basicAt: index put: value asIEEE32BitWord]\r\t\tifFalse:[self at: index put: value asFloat].\r\t^value! !\r\r!FloatArray methodsFor: 'accessing' stamp: 'ar 11/2/1998 12:19'!\rdefaultElement\r\t\"Return the default element of the receiver\"\r\t^0.0! !\r\r\r!FloatArray methodsFor: 'arithmetic' stamp: 'ar 9/14/1998 22:33'!\r* anObject\r\t^self clone *= anObject! !\r\r!FloatArray methodsFor: 'arithmetic' stamp: 'ar 9/14/1998 22:49'!\r*= anObject\r\t^anObject isNumber\r\t\tifTrue:[self primMulScalar: anObject asFloat]\r\t\tifFalse:[self primMulArray: anObject]! !\r\r!FloatArray methodsFor: 'arithmetic' stamp: 'ar 9/14/1998 22:33'!\r+ anObject\r\t^self clone += anObject! !\r\r!FloatArray methodsFor: 'arithmetic' stamp: 'ar 9/14/1998 22:48'!\r+= anObject\r\t^anObject isNumber\r\t\tifTrue:[self primAddScalar: anObject asFloat]\r\t\tifFalse:[self primAddArray: anObject]! !\r\r!FloatArray methodsFor: 'arithmetic' stamp: 'ar 9/14/1998 22:33'!\r- anObject\r\t^self clone -= anObject! !\r\r!FloatArray methodsFor: 'arithmetic' stamp: 'ar 9/14/1998 22:49'!\r-= anObject\r\t^anObject isNumber\r\t\tifTrue:[self primSubScalar: anObject asFloat]\r\t\tifFalse:[self primSubArray: anObject]! !\r\r!FloatArray methodsFor: 'arithmetic' stamp: 'ar 9/14/1998 22:34'!\r/ anObject\r\t^self clone /= anObject! !\r\r!FloatArray methodsFor: 'arithmetic' stamp: 'ar 10/7/1998 19:58'!\r/= anObject\r\t^anObject isNumber\r\t\tifTrue:[self primDivScalar: anObject asFloat]\r\t\tifFalse:[self primDivArray: anObject]! !\r\r!FloatArray methodsFor: 'arithmetic' stamp: 'ar 9/7/2001 23:07'!\radaptToNumber: rcvr andSend: selector\r\t\"If I am involved in arithmetic with a Number. If possible,\r\tconvert it to a float and perform the (more efficient) primitive operation.\"\r\tselector == #+ ifTrue:[^self + rcvr].\r\tselector == #* ifTrue:[^self * rcvr].\r\tselector == #- ifTrue:[^self negated += rcvr].\r\tselector == #/ ifTrue:[^self * (1.0 / rcvr)].\r\t^super adaptToNumber: rcvr andSend: selector! !\r\r!FloatArray methodsFor: 'arithmetic' stamp: 'ar 9/7/2001 23:04'!\rnegated\r\t^self clone *= -1! !\r\r\r!FloatArray methodsFor: 'comparing' stamp: 'ar 2/2/2001 15:47'!\r= aFloatArray \r\t| length |\r\t<primitive: 'primitiveEqual' module: 'FloatArrayPlugin'>\r\taFloatArray class = self class ifFalse: [^ false].\r\tlength _ self size.\r\tlength = aFloatArray size ifFalse: [^ false].\r\t1 to: self size do: [:i | (self at: i)\r\t\t\t= (aFloatArray at: i) ifFalse: [^ false]].\r\t^ true! !\r\r!FloatArray methodsFor: 'comparing' stamp: 'ar 5/3/2001 13:02'!\rhash\r\t| result |\r\t<primitive:'primitiveHashArray' module: 'FloatArrayPlugin'>\r\tresult _ 0.\r\t1 to: self size do:[:i| result _ result + (self basicAt: i) ].\r\t^result bitAnd: 16r1FFFFFFF! !\r\r\r!FloatArray methodsFor: 'primitives-plugin' stamp: 'ar 2/2/2001 15:47'!\rprimAddArray: floatArray\r\r\t<primitive: 'primitiveAddFloatArray' module: 'FloatArrayPlugin'>\r\t1 to: self size do:[:i| self at: i put: (self at: i) + (floatArray at: i)].! !\r\r!FloatArray methodsFor: 'primitives-plugin' stamp: 'ar 2/2/2001 15:47'!\rprimAddScalar: scalarValue\r\r\t<primitive: 'primitiveAddScalar' module: 'FloatArrayPlugin'>\r\t1 to: self size do:[:i| self at: i put: (self at: i) + scalarValue].! !\r\r!FloatArray methodsFor: 'primitives-plugin' stamp: 'ar 2/2/2001 15:47'!\rprimDivArray: floatArray\r\r\t<primitive: 'primitiveDivFloatArray' module: 'FloatArrayPlugin'>\r\t1 to: self size do:[:i| self at: i put: (self at: i) / (floatArray at: i)].! !\r\r!FloatArray methodsFor: 'primitives-plugin' stamp: 'ar 2/2/2001 15:47'!\rprimDivScalar: scalarValue\r\r\t<primitive: 'primitiveDivScalar' module: 'FloatArrayPlugin'>\r\t1 to: self size do:[:i| self at: i put: (self at: i) / scalarValue].! !\r\r!FloatArray methodsFor: 'primitives-plugin' stamp: 'ar 2/2/2001 15:47'!\rprimMulArray: floatArray\r\r\t<primitive: 'primitiveMulFloatArray' module: 'FloatArrayPlugin'>\r\t1 to: self size do:[:i| self at: i put: (self at: i) * (floatArray at: i)].! !\r\r!FloatArray methodsFor: 'primitives-plugin' stamp: 'ar 2/2/2001 15:47'!\rprimMulScalar: scalarValue\r\r\t<primitive: 'primitiveMulScalar' module: 'FloatArrayPlugin'>\r\t1 to: self size do:[:i| self at: i put: (self at: i) * scalarValue].! !\r\r!FloatArray methodsFor: 'primitives-plugin' stamp: 'ar 2/2/2001 15:47'!\rprimSubArray: floatArray\r\r\t<primitive: 'primitiveSubFloatArray' module: 'FloatArrayPlugin'>\r\t1 to: self size do:[:i| self at: i put: (self at: i) - (floatArray at: i)].! !\r\r!FloatArray methodsFor: 'primitives-plugin' stamp: 'ar 2/2/2001 15:47'!\rprimSubScalar: scalarValue\r\r\t<primitive: 'primitiveSubScalar' module: 'FloatArrayPlugin'>\r\t1 to: self size do:[:i| self at: i put: (self at: i) - scalarValue].! !\r\r!FloatArray methodsFor: 'primitives-plugin' stamp: 'jcg 6/12/2003 17:54'!\rsum\r\r\t<primitive: 'primitiveSum' module: 'FloatArrayPlugin'>\r\t^ super sum! !\r\r\r!FloatArray methodsFor: 'converting' stamp: 'ar 9/14/1998 23:46'!\rasFloatArray\r\t^self! !\r\r\r!FloatArray methodsFor: 'private' stamp: 'ar 10/9/1998 11:27'!\rreplaceFrom: start to: stop with: replacement startingAt: repStart \r\t\"Primitive. This destructively replaces elements from start to stop in the receiver starting at index, repStart, in the collection, replacement. Answer the receiver. Range checks are performed in the primitive only. Optional. See Object documentation whatIsAPrimitive.\"\r\t<primitive: 105>\r\tsuper replaceFrom: start to: stop with: replacement startingAt: repStart! !\r\r\r!FloatArray methodsFor: 'user interface' stamp: 'ar 2/13/1999 21:33'!\rinspect\r\t\"Open a OrderedCollectionInspector on the receiver.  Use basicInspect to get a normal (less useful) type of inspector.\"\r\r\tOrderedCollectionInspector openOn: self withEvalPane: true! !\r\r!FloatArray methodsFor: 'user interface' stamp: 'ar 2/13/1999 21:33'!\rinspectWithLabel: aLabel\r\t\"Open a OrderedCollectionInspector on the receiver. Use basicInspect to get a normal (less useful) type of inspector.\"\r\r\tOrderedCollectionInspector openOn: self withEvalPane: true withLabel: aLabel! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rFloatArray class\r\tinstanceVariableNames: ''!\r\r!FloatArray class methodsFor: 'plugin generation' stamp: 'acg 9/17/1999 01:17'!\rccg: cg emitLoadFor: aString from: anInteger on: aStream\r\r\tcg emitLoad: aString asFloatPtrFrom: anInteger on: aStream! !\r\r!FloatArray class methodsFor: 'plugin generation' stamp: 'acg 9/18/1999 17:07'!\rccg: cg prolog: aBlock expr: aString index: anInteger\r\r\t^cg ccgLoad: aBlock expr: aString asWBFloatPtrFrom: anInteger! !\r\r!FloatArray class methodsFor: 'plugin generation' stamp: 'acg 9/17/1999 01:14'!\rccgDeclareCForVar: aSymbolOrString\r\r\t^'float *', aSymbolOrString! !\rArithmeticError subclass: #FloatingPointException\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Exceptions Kernel'!\rDisplayMedium subclass: #Form\r\tinstanceVariableNames: 'bits width height depth offset'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Graphics-Display Objects'!\r!Form commentStamp: 'ls 1/4/2004 17:16' prior: 0!\rA rectangular array of pixels, used for holding images.  All pictures, including character images are Forms.  The depth of a Form is how many bits are used to specify the color at each pixel.  The actual bits are held in a Bitmap, whose internal structure is different at each depth.  Class Color allows you to deal with colors without knowing how they are actually encoded inside a Bitmap.\r\t  The supported depths (in bits) are 1, 2, 4, 8, 16, and 32.  The number of actual colors at these depths are: 2, 4, 16, 256, 32768, and 16 million.\r\tForms are indexed starting at 0 instead of 1; thus, the top-left pixel of a Form has coordinates 0@0.\r\tForms are combined using BitBlt.  See the comment in class BitBlt.  Forms that repeat many times to fill a large destination are InfiniteForms.\r\r\tcolorAt: x@y\t\tReturns the abstract Color at this location\r\tdisplayAt: x@y\t\tshows this form on the screen\r\tdisplayOn: aMedium at: x@y\tshows this form in a Window, a Form, or other DisplayMedium\r\tfillColor: aColor\t\tSet all the pixels to the color.\r\tedit\t\tlaunch an editor to change the bits of this form.\r\tpixelValueAt: x@y\tThe encoded color.  The encoding depends on the depth.\r!\r]style[(223 6 62 5 374 6 11 23 64 12 382)f1,f1LBitmap Definition;,f1,f1LColor Definition;,f1,f1LBitBlt Definition;,f1,f1LBitBlt Comment;,f1,f1LInfiniteForm Definition;,f1!\r\r\r\r!Form methodsFor: 'accessing'!\rbits\r\t\"Answer the receiver's Bitmap containing its bits.\"\r\r\t^ bits! !\r\r!Form methodsFor: 'accessing'!\rbits: aBitmap \r\t\"Reset the Bitmap containing the receiver's bits.\"\r\r\tbits _ aBitmap! !\r\r!Form methodsFor: 'accessing' stamp: 'ar 5/17/2001 15:41'!\rbitsSize\r\t| pixPerWord |\r\tdepth == nil ifTrue: [depth _ 1].\r\tpixPerWord _ 32 // self depth.\r\t^ width + pixPerWord - 1 // pixPerWord * height! !\r\r!Form methodsFor: 'accessing' stamp: 'tk 3/9/97'!\rcenter\r\t\"Note that offset is ignored here.  Are we really going to embrace offset?  \"\r\t^ (width @ height) // 2! !\r\r!Form methodsFor: 'accessing' stamp: 'ar 5/28/2000 12:03'!\rdefaultCanvasClass\r\t\"Return the default canvas used for drawing onto the receiver\"\r\t^Display defaultCanvasClass! !\r\r!Form methodsFor: 'accessing' stamp: 'ar 5/17/2001 15:45'!\rdepth\r\t^ depth < 0 ifTrue:[0-depth] ifFalse:[depth]! !\r\r!Form methodsFor: 'accessing'!\rdepth: bitsPerPixel\r\t(bitsPerPixel > 32 or:\r\t\t[(bitsPerPixel bitAnd: bitsPerPixel-1) ~= 0])\r\t\tifTrue: [self halt: 'bitsPerPixel must be 1, 2, 4, 8, 16 or 32'].\r\tdepth _ bitsPerPixel! !\r\r!Form methodsFor: 'accessing' stamp: 'ar 5/27/2000 16:56'!\rdisplayScreen\r\t\"Return the display screen the receiver is allocated on. \r\tForms in general are Squeak internal and not allocated on any particular display.\"\r\t^nil! !\r\r!Form methodsFor: 'accessing'!\rextent\r\t^ width @ height! !\r\r!Form methodsFor: 'accessing'!\rform\r\t\"Answer the receiver's form.  For vanilla Forms, this degenerates to self.  Makes several methods that operate on both Forms and MaskedForms much more straightforward.   6/1/96 sw\"\r\r\t^ self! !\r\r!Form methodsFor: 'accessing' stamp: 'ar 5/28/2000 12:03'!\rgetCanvas\r\t\"Return a Canvas that can be used to draw onto the receiver\"\r\t^self defaultCanvasClass on: self! !\r\r!Form methodsFor: 'accessing' stamp: 'ar 5/28/2000 00:48'!\rhasBeenModified\r\t\"Return true if something *might* have been drawn into the receiver\"\r\t^(bits == nil or:[bits class == ByteArray]) not\r\t\"Read the above as: If the receiver has forgotten its contents (bits == nil) \r\tor is still hibernated it can't be modified.\"! !\r\r!Form methodsFor: 'accessing' stamp: 'ar 5/28/2000 00:48'!\rhasBeenModified: aBool\r\t\"Change the receiver to reflect the modification state\"\r\taBool ifTrue:[^self unhibernate].\r\tself shouldPreserveContents\r\t\tifTrue:[self hibernate]\r\t\tifFalse:[bits _ nil]! !\r\r!Form methodsFor: 'accessing'!\rheight\r\t^ height! !\r\r!Form methodsFor: 'accessing' stamp: 'ar 5/17/2001 15:50'!\rnativeDepth\r\t\"Return the 'native' depth of the receiver, e.g., including the endianess\"\r\t^depth! !\r\r!Form methodsFor: 'accessing' stamp: 'ar 2/16/2000 22:00'!\roffset\r\t^offset ifNil:[0@0]! !\r\r!Form methodsFor: 'accessing'!\roffset: aPoint\r\r\toffset _ aPoint! !\r\r!Form methodsFor: 'accessing'!\rsize\r\t\"Should no longer be used -- use bitsSize instead.  length of variable part of instance.\"\r\t^ super size! !\r\r!Form methodsFor: 'accessing'!\rwidth\r\t^ width! !\r\r\r!Form methodsFor: 'analyzing'!\rcgForPixelValue: pv orNot: not\r\t\"Return the center of gravity for all pixels of value pv.\r\tNote:  If orNot is true, then produce the center of gravity for all pixels\r\tthat are DIFFERENT from the supplied (background) value\"\r\t| pixCount weighted xAndY |\r\txAndY _ (Array with: (self xTallyPixelValue: pv orNot: not)\r\t\t\t\t\twith: (self yTallyPixelValue: pv orNot: not)) collect:\r\t\t[:profile |\t\"For both x and y profiles...\"\r\t\tpixCount _ 0.  weighted _ 0.\r\t\tprofile doWithIndex:\r\t\t\t[:t :i | pixCount _ pixCount + t.\r\t\t\tweighted _ weighted + (t*i)].\r\t\tpixCount = 0  \"Produce average of nPixels weighted by coordinate\"\r\t\t\tifTrue: [0.0]\r\t\t\tifFalse: [weighted asFloat / pixCount asFloat - 1.0]].\r\r\t^ xAndY first @ xAndY last\r\"\r| f cg |\r[Sensor anyButtonPressed] whileFalse:\r\t[f _ Form fromDisplay: (Sensor cursorPoint extent: 50@50).\r\tcg _ f cgForPixelValue: (Color black pixelValueForDepth: f depth) orNot: false.\r\tf displayAt: 0@0.\r\tDisplay fill: (cg extent: 2@2) fillColor: Color red].\r\tScheduledControllers restore\r\"! !\r\r!Form methodsFor: 'analyzing' stamp: 'jm 12/5/97 19:48'!\rcolorsUsed\r\t\"Return a list of the Colors this form uses.\"\r\r\t| tallies tallyDepth usedColors |\r\ttallies _ self tallyPixelValues.\r\ttallyDepth _ (tallies size log: 2) asInteger.\r\tusedColors _ OrderedCollection new.\r\ttallies doWithIndex: [:count :i |\r\t\tcount > 0 ifTrue: [\r\t\t\tusedColors add: (Color colorFromPixelValue: i - 1 depth: tallyDepth)]].\r\t^ usedColors asArray\r! !\r\r!Form methodsFor: 'analyzing' stamp: 'ar 5/17/2001 15:40'!\rdominantColor\r\t| tally max maxi |\r\tself depth > 16 ifTrue:\r\t\t[^(self asFormOfDepth: 16) dominantColor].\r\ttally _ self tallyPixelValues.\r\tmax _ maxi _ 0.\r\ttally withIndexDo: [:n :i | n > max ifTrue: [max _ n. maxi _ i]].\r\t^ Color colorFromPixelValue: maxi - 1 depth: self depth! !\r\r!Form methodsFor: 'analyzing'!\rinnerPixelRectFor: pv orNot: not\r\t\"Return a rectangle describing the smallest part of me that includes \r\tall pixels of value pv.\r\tNote:  If orNot is true, then produce a copy that includes all pixels\r\tthat are DIFFERENT from the supplied (background) value\"\r\r\t| xTally yTally |\r\txTally _ self xTallyPixelValue: pv orNot: not.\r\tyTally _ self yTallyPixelValue: pv orNot: not.\r\t^ ((xTally findFirst: [:t | t>0]) - 1) @ ((yTally findFirst: [:t | t>0]) - 1)\r\t\tcorner:\r\t\t\t(xTally findLast: [:t | t>0])@(yTally findLast: [:t | t>0])! !\r\r!Form methodsFor: 'analyzing' stamp: 'ar 5/17/2001 15:40'!\rpixelCompare: aRect with: otherForm at: otherLoc\r\t\"Compare the selected bits of this form (those within aRect) against\r\tthose in a similar rectangle of otherFrom.  Return the sum of the\r\tabsolute value of the differences of the color values of every pixel.\r\tObviously, this is most useful for rgb (16- or 32-bit) pixels but,\r\tin the case of 8-bits or less, this will return the sum of the differing\r\tbits of the corresponding pixel values (somewhat less useful)\"\r\t| pixPerWord temp |\r\tpixPerWord _ 32//self depth.\r\t(aRect left\\\\pixPerWord = 0 and: [aRect right\\\\pixPerWord = 0]) ifTrue:\r\t\t[\"If word-aligned, use on-the-fly difference\"\r\t\t^ (BitBlt current toForm: self) copy: aRect from: otherLoc in: otherForm\r\t\t\t\tfillColor: nil rule: 32].\r\t\"Otherwise, combine in a word-sized form and then compute difference\"\r\ttemp _ self copy: aRect.\r\ttemp copy: aRect from: otherLoc in: otherForm rule: 21.\r\t^ (BitBlt current toForm: temp) copy: aRect from: otherLoc in: nil\r\t\t\t\tfillColor: (Bitmap with: 0) rule: 32\r\"  Dumb example prints zero only when you move over the original rectangle...\r | f diff | f _ Form fromUser.\r[Sensor anyButtonPressed] whileFalse:\r\t[diff _ f pixelCompare: f boundingBox\r\t\twith: Display at: Sensor cursorPoint.\r\tdiff printString , '        ' displayAt: 0@0]\r\"! !\r\r!Form methodsFor: 'analyzing' stamp: 'ar 5/17/2001 15:42'!\rprimCountBits\r\t\"Count the non-zero pixels of this form.\"\r\tself depth > 8 ifTrue:\r\t\t[^(self asFormOfDepth: 8) primCountBits].\r\t^ (BitBlt current toForm: self)\r\t\tfillColor: (Bitmap with: 0);\r\t\tdestRect: (0@0 extent: width@height);\r\t\tcombinationRule: 32;\r\t\tcopyBits! !\r\r!Form methodsFor: 'analyzing' stamp: 'ar 5/17/2001 15:37'!\rrectangleEnclosingPixelsNotOfColor: aColor\r\t\"Answer the smallest rectangle enclosing all the pixels of me that are different from the given color. Useful for extracting a foreground graphic from its background.\"\r\r\t| cm slice copyBlt countBlt top bottom newH left right |\r\t\"map the specified color to 1 and all others to 0\"\r\tcm _ Bitmap new: (1 bitShift: (self depth min: 15)).\r\tcm primFill: 1.\r\tcm at: (aColor indexInMap: cm) put: 0.\r\r\t\"build a 1-pixel high horizontal slice and BitBlts for counting pixels of interest\"\r\tslice _ Form extent: width@1 depth: 1.\r\tcopyBlt _ (BitBlt current toForm: slice)\r\t\tsourceForm: self;\r\t\tcombinationRule: Form over;\r\t\tdestX: 0 destY: 0 width: width height: 1;\r\t\tcolorMap: cm.\r\tcountBlt _ (BitBlt current toForm: slice)\r\t\tfillColor: (Bitmap with: 0);\r\t\tdestRect: (0@0 extent: slice extent);\r\t\tcombinationRule: 32.\r\r\t\"scan in from top and bottom\"\r\ttop _ (0 to: height)\r\t\tdetect: [:y |\r\t\t\tcopyBlt sourceOrigin: 0@y; copyBits.\r\t\t\tcountBlt copyBits > 0]\r\t\tifNone: [^ 0@0 extent: 0@0].\r\tbottom _ (height - 1 to: top by: -1)\r\t\tdetect: [:y |\r\t\t\tcopyBlt sourceOrigin: 0@y; copyBits.\r\t\t\tcountBlt copyBits > 0].\r\r\t\"build a 1-pixel wide vertical slice and BitBlts for counting pixels of interest\"\r\tnewH _ bottom - top + 1.\r\tslice _ Form extent: 1@newH depth: 1.\r\tcopyBlt _ (BitBlt current toForm: slice)\r\t\tsourceForm: self;\r\t\tcombinationRule: Form over;\r\t\tdestX: 0 destY: 0 width: 1 height: newH;\r\t\tcolorMap: cm.\r\tcountBlt _ (BitBlt current toForm: slice)\r\t\tfillColor: (Bitmap with: 0);\r\t\tdestRect: (0@0 extent: slice extent);\r\t\tcombinationRule: 32.\r\r\t\"scan in from left and right\"\r\tleft _ (0 to: width)\r\t\tdetect: [:x |\r\t\t\tcopyBlt sourceOrigin: x@top; copyBits.\r\t\t\tcountBlt copyBits > 0].\r\tright _ (width - 1 to: left by: -1)\r\t\tdetect: [:x |\r\t\t\tcopyBlt sourceOrigin: x@top; copyBits.\r\t\t\tcountBlt copyBits > 0].\r\r\t^ left@top corner: (right + 1)@(bottom + 1)\r! !\r\r!Form methodsFor: 'analyzing' stamp: 'jm 6/18/1999 18:41'!\rtallyPixelValues\r\t\"Answer a Bitmap whose elements contain the number of pixels in this Form with the pixel value corresponding to their index. Note that the pixels of multiple Forms can be tallied together using tallyPixelValuesInRect:into:.\"\r\r\t^ self tallyPixelValuesInRect: self boundingBox\r\t\tinto: (Bitmap new: (1 bitShift: (self depth min: 15)))\r\"\rMove a little rectangle around the screen and print its tallies...\r | r tallies nonZero |\rCursor blank showWhile: [\r[Sensor anyButtonPressed] whileFalse:\r\t[r _ Sensor cursorPoint extent: 10@10.\r\tDisplay border: (r expandBy: 2) width: 2 rule: Form reverse fillColor: nil.\r\ttallies _ (Display copy: r) tallyPixelValues.\r\tnonZero _ (1 to: tallies size) select: [:i | (tallies at: i) > 0]\r\t\t\tthenCollect: [:i | (tallies at: i) -> (i-1)].\r\tnonZero printString , '          ' displayAt: 0@0.\r\tDisplay border: (r expandBy: 2) width: 2 rule: Form reverse fillColor: nil]]\r\"\r! !\r\r!Form methodsFor: 'analyzing' stamp: 'ar 5/28/2000 12:09'!\rtallyPixelValuesInRect: destRect into: valueTable\r\t\"Tally the selected pixels of this Form into valueTable, a Bitmap of depth 2^depth similar to a color map. Answer valueTable.\"\r\r\t(BitBlt current toForm: self)\r\t\tsourceForm: self;  \"src must be given for color map ops\"\r\t\tsourceOrigin: 0@0;\r\t\ttallyMap: valueTable;\r\t\tcombinationRule: 33;\r\t\tdestRect: destRect;\r\t\tcopyBits.\r\t^ valueTable\r\r\"\rMove a little rectangle around the screen and print its tallies...\r | r tallies nonZero |\rCursor blank showWhile: [\r[Sensor anyButtonPressed] whileFalse:\r\t[r _ Sensor cursorPoint extent: 10@10.\r\tDisplay border: (r expandBy: 2) width: 2 rule: Form reverse fillColor: nil.\r\ttallies _ (Display copy: r) tallyPixelValues.\r\tnonZero _ (1 to: tallies size) select: [:i | (tallies at: i) > 0]\r\t\t\tthenCollect: [:i | (tallies at: i) -> (i-1)].\r\tnonZero printString , '          ' displayAt: 0@0.\r\tDisplay border: (r expandBy: 2) width: 2 rule: Form reverse fillColor: nil]]\r\"! !\r\r!Form methodsFor: 'analyzing' stamp: 'ar 5/28/2000 12:09'!\rxTallyPixelValue: pv orNot: not\r\t\"Return an array of the number of pixels with value pv by x-value.\r\tNote that if not is true, then this will tally those different from pv.\"\r\t| cm slice countBlt copyBlt |\r\tcm _ self newColorMap.\t\t\"Map all colors but pv to zero\"\r\tnot ifTrue: [cm atAllPut: 1].\t\t\"... or all but pv to one\"\r\tcm at: pv+1 put: 1 - (cm at: pv+1).\r\tslice _ Form extent: 1@height.\r\tcopyBlt _ (BitBlt current destForm: slice sourceForm: self\r\t\t\t\thalftoneForm: nil combinationRule: Form over\r\t\t\t\tdestOrigin: 0@0 sourceOrigin: 0@0 extent: 1 @ slice height\r\t\t\t\tclipRect: slice boundingBox) colorMap: cm.\r\tcountBlt _ (BitBlt current toForm: slice)\r\t\t\t\tfillColor: (Bitmap with: 0);\r\t\t\t\tdestRect: (0@0 extent: slice extent);\r\t\t\t\tcombinationRule: 32.\r\t^ (0 to: width-1) collect:\r\t\t[:x |\r\t\tcopyBlt sourceOrigin: x@0; copyBits.\r\t\tcountBlt copyBits]! !\r\r!Form methodsFor: 'analyzing' stamp: 'ar 5/28/2000 12:09'!\ryTallyPixelValue: pv orNot: not\r\t\"Return an array of the number of pixels with value pv by y-value.\r\tNote that if not is true, then this will tally those different from pv.\"\r\t| cm slice copyBlt countBlt |\r\tcm _ self newColorMap.\t\t\"Map all colors but pv to zero\"\r\tnot ifTrue: [cm atAllPut: 1].\t\t\"... or all but pv to one\"\r\tcm at: pv+1 put: 1 - (cm at: pv+1).\r\tslice _ Form extent: width@1.\r\tcopyBlt _ (BitBlt current destForm: slice sourceForm: self\r\t\t\t\thalftoneForm: nil combinationRule: Form over\r\t\t\t\tdestOrigin: 0@0 sourceOrigin: 0@0 extent: slice width @ 1\r\t\t\t\tclipRect: slice boundingBox) colorMap: cm.\r\tcountBlt _ (BitBlt current toForm: slice)\r\t\t\t\tfillColor: (Bitmap with: 0);\r\t\t\t\tdestRect: (0@0 extent: slice extent);\r\t\t\t\tcombinationRule: 32.\r\t^ (0 to: height-1) collect:\r\t\t[:y |\r\t\tcopyBlt sourceOrigin: 0@y; copyBits.\r\t\tcountBlt copyBits]! !\r\r\r!Form methodsFor: 'bordering' stamp: 'ar 5/28/2000 12:07'!\rborder: rect width: borderWidth rule: rule fillColor: fillColor\r        \"Paint a border whose rectangular area is defined by rect. The\rwidth of the border of each side is borderWidth. Uses fillColor for drawing\rthe border.\"\r        | blt |\r        blt _ (BitBlt current toForm: self) combinationRule: rule; fillColor: fillColor.\r        blt sourceOrigin: 0@0.\r        blt destOrigin: rect origin.\r        blt width: rect width; height: borderWidth; copyBits.\r        blt destY: rect corner y - borderWidth; copyBits.\r        blt destY: rect origin y + borderWidth.\r        blt height: rect height - borderWidth - borderWidth; width:\rborderWidth; copyBits.\r        blt destX: rect corner x - borderWidth; copyBits! !\r\r!Form methodsFor: 'bordering' stamp: 'ar 5/17/2001 15:42'!\rborderFormOfWidth: borderWidth sharpCorners: sharpen\r\t\"Smear this form around and then subtract the original to produce\r\tan outline.  If sharpen is true, then cause right angles to be outlined\r\tby right angles (takes an additional diagonal smears ANDed with both\r\thorizontal and vertical smears).\"\r\t| smearForm bigForm smearPort all cornerForm cornerPort nbrs |\r\tself depth > 1 ifTrue: [self halt]. \"Only meaningful for B/W forms.\"\r\tbigForm _ self deepCopy.\r\tall _ bigForm boundingBox.\r\tsmearForm _ Form extent: self extent.\r\tsmearPort _ BitBlt current toForm: smearForm.\r\tsharpen ifTrue:\r\t\t[cornerForm _ Form extent: self extent.\r\t\tcornerPort _ BitBlt current toForm: cornerForm].\r\tnbrs _ (0@0) fourNeighbors.\r\t1 to: borderWidth do:\r\t\t[:i |  \"Iterate to get several layers of 'skin'\"\r\t\tnbrs do:\r\t\t\t[:d |  \"Smear the self in 4 directions to grow each layer of skin\"\r\t\t\tsmearPort copyForm: bigForm to: d rule: Form under].\r\t\tsharpen ifTrue:\r\t\t\t[\"Special treatment to smear sharp corners\"\r\t\t\tnbrs with: ((2 to: 5) collect: [:i2 | nbrs atWrap: i2]) do:\r\t\t\t\t[:d1 :d2 |\r\t\t\t\t\"Copy corner points diagonally\"\r\t\t\t\tcornerPort copyForm: bigForm to: d1+d2 rule: Form over.\r\t\t\t\t\"But only preserve if there were dots on either side\"\r\t\t\t\tcornerPort copyForm: bigForm to: d1+d1+d2 rule: Form and.\r\t\t\t\tcornerPort copyForm: bigForm to: d1+d2+d2 rule: Form and.\r\t\t\t\tsmearPort copyForm: cornerForm to: 0@0 rule: Form under].\r\t\t\t].\r\t\tbigForm copy: all from: 0@0 in: smearForm rule: Form over.\r\t\t].\r\t\"Now erase the original shape to obtain the outline\"\r\tbigForm copy: all from: 0@0 in: self rule: Form erase.\r\t^ bigForm! !\r\r!Form methodsFor: 'bordering'!\rborderWidth: anInteger \r\t\"Set the width of the border for the receiver to be anInteger and paint it \r\tusing black as the border color.\"\r\r\tself border: self boundingBox width: anInteger fillColor: Color black! !\r\r!Form methodsFor: 'bordering'!\rborderWidth: anInteger color: aMask\r\t\"Set the width of the border for the receiver to be anInteger and paint it \r\tusing aMask as the border color.\"\r\r\tself border: self boundingBox width: anInteger fillColor: aMask! !\r\r!Form methodsFor: 'bordering'!\rborderWidth: anInteger fillColor: aMask\r\t\"Set the width of the border for the receiver to be anInteger and paint it \r\tusing aMask as the border color.\"\r\r\tself border: self boundingBox width: anInteger fillColor: aMask! !\r\r!Form methodsFor: 'bordering' stamp: 'di 10/21/2001 09:39'!\rshapeBorder: aColor width: borderWidth\r\t\"A simplified version for shapes surrounded by transparency (as SketchMorphs).\r\tNote also this returns a new form that may be larger, and does not affect the original.\"\r\t| shapeForm borderForm newForm |\r\tnewForm _ Form extent: self extent + (borderWidth*2) depth: self depth.\r\tnewForm fillColor: Color transparent.\r\tself displayOn: newForm at: (0@0) + borderWidth.\r\t\"First identify the shape in question as a B/W form\"\r\tshapeForm _ (newForm makeBWForm: Color transparent) reverse.\r\t\"Now find the border of that shape\"\r\tborderForm _ shapeForm borderFormOfWidth: borderWidth sharpCorners: false.\r\t\"Finally use that shape as a mask to paint the border with color\"\r\t^ newForm fillShape: borderForm fillColor: aColor! !\r\r!Form methodsFor: 'bordering'!\rshapeBorder: aColor width: borderWidth interiorPoint: interiorPoint\r\tsharpCorners: sharpen internal: internal\r\t\"Identify the shape (region of identical color) at interiorPoint,\r\tand then add an outline of width=borderWidth and color=aColor.\r\tIf sharpen is true, then cause right angles to be outlined by\r\tright angles.  If internal is true, then produce a border that lies\r\twithin the identified shape.  Thus one can put an internal border\r\taround the whole background, thus effecting a normal border\r\taround every other foreground image.\"\r\t| shapeForm borderForm interiorColor |\r\t\"First identify the shape in question as a B/W form\"\r\tinteriorColor _ self colorAt: interiorPoint.\r\tshapeForm _ (self makeBWForm: interiorColor) reverse\r\t\t\t\tfindShapeAroundSeedBlock:\r\t\t\t\t\t[:form | form pixelValueAt: interiorPoint put: 1].\r\t\"Reverse the image to grow the outline inward\"\r\tinternal ifTrue: [shapeForm reverse].\r\t\"Now find the border fo that shape\"\r\tborderForm _ shapeForm borderFormOfWidth: borderWidth sharpCorners: sharpen.\r\t\"Finally use that shape as a mask to paint the border with color\"\r\tself fillShape: borderForm fillColor: aColor! !\r\r\r!Form methodsFor: 'color mapping' stamp: 'ar 5/15/2001 16:16'!\rbalancedPatternFor: aColor\r\t\"Return the pixel word for representing the given color on the receiver\"\r\tself hasNonStandardPalette\r\t\tifTrue:[^self bitPatternFor: aColor]\r\t\tifFalse:[^aColor balancedPatternForDepth: self depth]! !\r\r!Form methodsFor: 'color mapping' stamp: 'ar 5/15/2001 16:16'!\rbitPatternFor: aColor\r\t\"Return the pixel word for representing the given color on the receiver\"\r\taColor isColor ifFalse:[^aColor bitPatternForDepth: self depth].\r\tself hasNonStandardPalette\r\t\tifTrue:[^Bitmap with: (self pixelWordFor: aColor)]\r\t\tifFalse:[^aColor bitPatternForDepth: self depth]! !\r\r!Form methodsFor: 'color mapping' stamp: 'ar 5/15/2001 16:16'!\rcolormapFromARGB\r\t\"Return a ColorMap mapping from canonical ARGB space into the receiver.\r\tNote: This version is optimized for Squeak forms.\"\r\t| map nBits |\r\tself hasNonStandardPalette \r\t\tifTrue:[^ColorMap mappingFromARGB: self rgbaBitMasks].\r\tself depth <= 8 ifTrue:[\r\t\tmap _ Color colorMapIfNeededFrom: 32 to: self depth.\r\t\tmap size = 512 ifTrue:[nBits _ 3].\r\t\tmap size = 4096 ifTrue:[nBits _ 4].\r\t\tmap size = 32768 ifTrue:[nBits _ 5].\r\t\t^ColorMap\r\t\t\tshifts: (Array \r\t\t\t\t\t\twith: 3 * nBits - 24\r\t\t\t\t\t\twith: 2 * nBits - 16\r\t\t\t\t\t\twith: 1 * nBits - 8\r\t\t\t\t\t\twith: 0)\r\t\t\tmasks: (Array\r\t\t\t\t\t\twith: (1 << nBits) - 1 << (24 - nBits)\r\t\t\t\t\t\twith: (1 << nBits) - 1 << (16 - nBits)\r\t\t\t\t\t\twith: (1 << nBits) - 1 << (8 - nBits)\r\t\t\t\t\t\twith: 0)\r\t\t\tcolors: map].\r\tself depth = 16 ifTrue:[\r\t\t^ColorMap\r\t\t\tshifts: #(-9 -6 -3 0)\r\t\t\tmasks: #(16rF80000 16rF800 16rF8 0)].\r\tself depth = 32 ifTrue:[\r\t\t^ColorMap\r\t\t\tshifts: #(0 0 0 0)\r\t\t\tmasks: #(16rFF0000 16rFF00 16rFF 16rFF000000)].\r\tself error:'Bad depth'! !\r\r!Form methodsFor: 'color mapping' stamp: 'ar 5/16/2001 22:23'!\rcolormapIfNeededFor: destForm\r\t\"Return a ColorMap mapping from the receiver to destForm.\"\r\t(self hasNonStandardPalette or:[destForm hasNonStandardPalette]) \r\t\tifTrue:[^self colormapFromARGB mappingTo: destForm colormapFromARGB]\r\t\tifFalse:[^self colormapIfNeededForDepth: destForm depth]! !\r\r!Form methodsFor: 'color mapping' stamp: 'ar 5/17/2001 15:42'!\rcolormapIfNeededForDepth: destDepth\r\t\"Return a colormap for displaying the receiver at the given depth, or nil if no colormap is needed.\"\r\r\tself depth = destDepth ifTrue: [^ nil].  \"not needed if depths are the same\"\r\t^ Color colorMapIfNeededFrom: self depth to: destDepth\r! !\r\r!Form methodsFor: 'color mapping' stamp: 'ar 5/15/2001 16:16'!\rcolormapToARGB\r\t\"Return a ColorMap mapping from the receiver into canonical ARGB space.\"\r\tself hasNonStandardPalette \r\t\tifTrue:[^self colormapFromARGB inverseMap].\r\tself depth <= 8 ifTrue:[\r\t\t^ColorMap\r\t\t\tshifts: #(0 0 0 0)\r\t\t\tmasks: #(16rFF0000 16rFF00 16rFF 16rFF000000)\r\t\t\tcolors: (Color colorMapIfNeededFrom: self depth to: 32)].\r\tself depth = 16 ifTrue:[\r\t\t^ColorMap \r\t\t\tshifts: #( 9 6 3 0) \r\t\t\tmasks: #(16r7C00 16r3E0 16r1F 0)].\r\tself depth = 32 ifTrue:[\r\t\t^ColorMap\r\t\t\tshifts: #(0 0 0 0) \r\t\t\tmasks: #(16rFF0000 16rFF00 16rFF 16rFF000000)].\r\tself error:'Bad depth'! !\r\r!Form methodsFor: 'color mapping'!\rmakeBWForm: foregroundColor\r\t\"Map this form into a B/W form with 1's in the foreground regions.\"\r\t| bwForm map |\r\tbwForm _ Form extent: self extent.\r\tmap _ self newColorMap.  \"All non-foreground go to 0's\"\r\tmap at: (foregroundColor indexInMap: map) put: 1.\r\tbwForm copyBits: self boundingBox from: self at: 0@0 colorMap: map.\r\t^ bwForm! !\r\r!Form methodsFor: 'color mapping' stamp: 'ar 5/17/2001 15:38'!\rmapColor: oldColor to: newColor\r\t\"Make all pixels of the given color in this Form to the given new color.\"\r\t\"Warnings: This method modifies the receiver. It may lose some color accuracy on 32-bit Forms, since the transformation uses a color map with only 15-bit resolution.\"\r\r\t| map |\r\tmap _ (Color cachedColormapFrom: self depth to: self depth) copy.\r\tmap at: (oldColor indexInMap: map) put: (newColor pixelWordForDepth: self depth).\r\t(BitBlt current toForm: self)\r\t\tsourceForm: self;\r\t\tsourceOrigin: 0@0;\r\t\tcombinationRule: Form over;\r\t\tdestX: 0 destY: 0 width: width height: height;\r\t\tcolorMap: map;\r\t\tcopyBits.\r! !\r\r!Form methodsFor: 'color mapping' stamp: 'ar 5/17/2001 15:40'!\rmapColors: oldColorBitsCollection to: newColorBits\r\t\"Make all pixels of the given color in this Form to the given new color.\"\r\t\"Warnings: This method modifies the receiver. It may lose some color accuracy on 32-bit Forms, since the transformation uses a color map with only 15-bit resolution.\"\r\r\t| map |\r\tself depth < 16\r\t\tifTrue: [map _ (Color cachedColormapFrom: self depth to: self depth) copy]\r\t\tifFalse: [\r\t\t\t\"use maximum resolution color map\"\r\t\t\t\"source is 16-bit or 32-bit RGB; use colormap with 5 bits per color component\"\r\t\t\tmap _ Color computeRGBColormapFor: self depth bitsPerColor: 5].\r\toldColorBitsCollection do:[ :oldColor | map at: oldColor put: newColorBits].\r\r\t(BitBlt current toForm: self)\r\t\tsourceForm: self;\r\t\tsourceOrigin: 0@0;\r\t\tcombinationRule: Form over;\r\t\tdestX: 0 destY: 0 width: width height: height;\r\t\tcolorMap: map;\r\t\tcopyBits.\r! !\r\r!Form methodsFor: 'color mapping' stamp: 'ar 12/14/2001 18:11'!\rmaskingMap\r\t\"Return a color map that maps all colors except transparent to words of all ones. Used to create a mask for a Form whose transparent pixel value is zero.\"\r\t^Color maskingMap: self depth! !\r\r!Form methodsFor: 'color mapping' stamp: 'ar 5/17/2001 15:41'!\rnewColorMap \r\t\"Return an uninitialized color map array appropriate to this Form's depth.\"\r\r\t^ Bitmap new: (1 bitShift: (self depth min: 15))\r! !\r\r!Form methodsFor: 'color mapping' stamp: 'ar 5/15/2001 16:16'!\rpixelValueFor: aColor\r\t\"Return the pixel word for representing the given color on the receiver\"\r\tself hasNonStandardPalette\r\t\tifTrue:[^self colormapFromARGB mapPixel: (aColor pixelValueForDepth: 32)]\r\t\tifFalse:[^aColor pixelValueForDepth: self depth]! !\r\r!Form methodsFor: 'color mapping' stamp: 'ar 5/15/2001 16:16'!\rpixelWordFor: aColor\r\t\"Return the pixel word for representing the given color on the receiver\"\r\t| basicPattern |\r\tself hasNonStandardPalette \r\t\tifFalse:[^aColor pixelWordForDepth: self depth].\r\tbasicPattern _ self pixelValueFor: aColor.\r\tself depth = 32 \r\t\tifTrue:[^basicPattern]\r\t\tifFalse:[^aColor pixelWordFor: self depth filledWith: basicPattern]! !\r\r!Form methodsFor: 'color mapping' stamp: 'di 10/16/2001 15:23'!\rreducedPaletteOfSize: nColors\r\t\"Return an array of colors of size nColors, such that those colors\r\trepresent well the pixel values actually found in this form.\"\r\t| threshold tallies colorTallies dist delta palette cts top cluster |\r\ttallies _ self tallyPixelValues.  \"An array of tallies for each pixel value\"\r\tthreshold _ width * height // 500.\r\r\t\"Make an array of (color -> tally) for all tallies over threshold\"\r\tcolorTallies _ Array streamContents:\r\t\t[:s | tallies withIndexDo:\r\t\t\t[:v :i | v >= threshold ifTrue:\r\t\t\t\t[s nextPut: (Color colorFromPixelValue: i-1 depth: depth) -> v]]].\r\r\t\"Extract a set of clusters by picking the top tally, and then removing all others\r\twhose color is within dist of it.  Iterate the process, adjusting dist until we get nColors.\"\r\tdist _ 0.2.  delta _ dist / 2.\r\t\t[cts _ colorTallies copy.\r\t\tpalette _ Array streamContents: [:s |\r\t\t\t[cts isEmpty] whileFalse:\r\t\t\t\t[top _ cts detectMax: [:a | a value].\r\t\t\t\tcluster _ cts select: [:a | (a key diff: top key) < dist].\r\t\t\t\ts nextPut: top key -> (cluster detectSum: [:a | a value]).\r\t\t\t\tcts _ cts copyWithoutAll: cluster]].\r\t\tpalette size = nColors or: [delta < 0.001]]\r\t\twhileFalse:\r\t\t\t[palette size > nColors\r\t\t\t\tifTrue: [dist _ dist + delta]\r\t\t\t\tifFalse: [dist _ dist - delta].\r\t\t\tdelta _ delta / 2].\r\t^ palette collect: [:a | a key]\r! !\r\r!Form methodsFor: 'color mapping' stamp: 'ar 5/27/2000 20:14'!\rrgbaBitMasks\r\t\"Return the masks for specifying the R,G,B, and A components in the receiver\"\r\tself depth <= 8\r\t\tifTrue:[^#(16rFF0000 16rFF00 16rFF 16rFF000000)].\r\tself depth = 16\r\t\tifTrue:[^#(16r7C00 16r3E0 16r1F 16r0)].\r\tself depth = 32\r\t\tifTrue:[^#(16rFF0000 16rFF00 16rFF 16rFF000000)].\r\tself error:'Bad depth for form'! !\r\r\r!Form methodsFor: 'converting' stamp: 'jm 11/12/97 19:28'!\ras8BitColorForm\r\t\"Simple conversion of zero pixels to transparent.  Force it to 8 bits.\"\r\r\t| f map |\r\tf _ ColorForm extent: self extent depth: 8.\r\tself displayOn: f at: self offset negated.\r\tmap _ Color indexedColors copy.\r\tmap at: 1 put: Color transparent.\r\tf colors: map.\r\tf offset: self offset.\r\t^ f\r! !\r\r!Form methodsFor: 'converting' stamp: 'RAA 8/14/2000 10:13'!\rasCursorForm\r\r\t^ self as: StaticForm! !\r\r!Form methodsFor: 'converting' stamp: 'ar 6/16/2002 17:44'!\rasFormOfDepth: d\r\t| newForm |\r\td = self depth ifTrue:[^self].\r\tnewForm _ Form extent: self extent depth: d.\r\t(BitBlt current toForm: newForm)\r\t\tcolorMap: (self colormapIfNeededFor: newForm);\r\t\tcopy: (self boundingBox)\r\t\tfrom: 0@0 in: self\r\t\tfillColor: nil rule: Form over.\r\t^newForm! !\r\r!Form methodsFor: 'converting' stamp: 'ar 5/17/2001 15:39'!\rasGrayScale\r\t\"Assume the receiver is a grayscale image. Return a grayscale ColorForm computed by extracting the brightness levels of one color component. This technique allows a 32-bit Form to be converted to an 8-bit ColorForm to save space while retaining a full 255 levels of gray. (The usual colormapping technique quantizes to 8, 16, or 32 levels, which loses information.)\"\r\t| f32 srcForm result map bb grays |\r\tself depth = 32 ifFalse: [\r\t\tf32 _ Form extent: width@height depth: 32.\r\t\tself displayOn: f32.\r\t\t^ f32 asGrayScale].\r\tself unhibernate.\r\tsrcForm _ Form extent: (width * 4)@height depth: 8.\r\tsrcForm bits: bits.\r\tresult _ ColorForm extent: width@height depth: 8.\r\tmap _ Bitmap new: 256.\r\t2 to: 256 do: [:i | map at: i put: i - 1].\r\tmap at: 1 put: 1.  \"map zero pixel values to near-black\"\r\tbb _ (BitBlt current toForm: result)\r\t\tsourceForm: srcForm;\r\t\tcombinationRule: Form over;\r\t\tcolorMap: map.\r\t0 to: width - 1 do: [:dstX |\r\t\tbb  sourceRect: (((dstX * 4) + 2)@0 extent: 1@height);\r\t\t\tdestOrigin: dstX@0;\r\t\t\tcopyBits].\r\r\t\"final BitBlt to zero-out pixels that were truely transparent in the original\"\r\tmap _ Bitmap new: 512.\r\tmap at: 1 put: 16rFF.\r\t(BitBlt current toForm: result)\r\t\tsourceForm: self;\r\t\tsourceRect: self boundingBox;\r\t\tdestOrigin: 0@0;\r\t\tcombinationRule: Form erase;\r\t\tcolorMap: map;\r\t\tcopyBits.\r\t\r\tgrays _ (0 to: 255) collect: [:brightness | Color gray: brightness asFloat / 255.0].\r\tgrays at: 1 put: Color transparent.\r\tresult colors: grays.\r\t^ result\r! !\r\r!Form methodsFor: 'converting' stamp: 'jm 4/5/1999 19:20'!\rcolorReduced\r\t\"Return a color-reduced ColorForm version of the receiver, if possible, or the receiver itself if not.\"\r\r\t| tally tallyDepth colorCount newForm cm oldPixelValues newFormColors nextColorIndex c |\r\ttally _ self tallyPixelValues asArray.\r\ttallyDepth _ (tally size log: 2) asInteger.\r\tcolorCount _ 0.\r\ttally do: [:n | n > 0 ifTrue: [colorCount _ colorCount + 1]].\r\t(tally at: 1) = 0 ifTrue: [colorCount _ colorCount + 1].  \"include transparent\"\r\tcolorCount > 256 ifTrue: [^ self].  \"cannot reduce\"\r\tnewForm _ self formForColorCount: colorCount.\r\r\t\"build an array of just the colors used, and a color map to translate\r\t old pixel values to their indices into this color array\"\r\tcm _ Bitmap new: tally size.\r\toldPixelValues _ self colormapIfNeededForDepth: 32.\r\tnewFormColors _ Array new: colorCount.\r\tnewFormColors at: 1 put: Color transparent.\r\tnextColorIndex _ 2.\r\t2 to: cm size do: [:i |\r\t\t(tally at: i) > 0 ifTrue: [\r\t\t\toldPixelValues = nil\r\t\t\t\tifTrue: [c _ Color colorFromPixelValue: i - 1 depth: tallyDepth]\r\t\t\t\tifFalse: [c _ Color colorFromPixelValue: (oldPixelValues at: i) depth: 32].\r\t\t\tnewFormColors at: nextColorIndex put: c.\r\t\t\tcm at: i put: nextColorIndex - 1.  \"pixel values are zero-based indices\"\r\t\t\tnextColorIndex _ nextColorIndex + 1]].\r\r\t\"copy pixels into new ColorForm, mapping to new pixel values\"\r\tnewForm copyBits: self boundingBox\r\t\tfrom: self\r\t\tat: 0@0\r\t\tclippingBox: self boundingBox\r\t\trule: Form over\r\t\tfillColor: nil\r\t\tmap: cm.\r\tnewForm colors: newFormColors.\r\tnewForm offset: offset.\r\t^ newForm\r! !\r\r!Form methodsFor: 'converting' stamp: 'di 10/16/2001 19:23'!\rcopyWithColorsReducedTo: nColors\r\t\"Note: this has not been engineered.\r\tThere are better solutions in the literature.\"\r\t| palette colorMap pc closest |\r\tpalette _ self reducedPaletteOfSize: nColors.\r\tcolorMap _ (1 to: (1 bitShift: depth)) collect:\r\t\t[:i | pc _ Color colorFromPixelValue: i-1 depth: depth.\r\t\tclosest _ palette detectMin: [:c | c diff: pc].\r\t\tclosest pixelValueForDepth: depth].\r\t^ self deepCopy copyBits: self boundingBox from: self at: 0@0 colorMap: (colorMap as: Bitmap)\r\t\t! !\r\r!Form methodsFor: 'converting' stamp: 'ar 7/23/1999 17:04'!\rorderedDither32To16\r\t\"Do an ordered dithering for converting from 32 to 16 bit depth.\"\r\t| ditherMatrix ii out inBits outBits index pv dmv r di dmi dmo g b pvOut outIndex |\r\tself depth = 32 ifFalse:[^self error:'Must be 32bit for this'].\r\tditherMatrix _ #(\t0\t8\t2\t10\r\t\t\t\t\t\t12\t4\t14\t6\r\t\t\t\t\t\t3\t11\t1\t9\r\t\t\t\t\t\t15\t7\t13\t5).\r\tii _ (0 to: 31) collect:[:i| i].\r\tout _ Form extent: self extent depth: 16.\r\tinBits _ self bits.\r\toutBits _ out bits.\r\tindex _ outIndex _ 0.\r\tpvOut _ 0.\r\t0 to: self height-1 do:[:y|\r\t\t0 to: self width-1 do:[:x|\r\t\t\tpv _ inBits at: (index _ index + 1).\r\t\t\tdmv _ ditherMatrix at: (y bitAnd: 3) * 4 + (x bitAnd: 3) + 1.\r\t\t\tr _ pv bitAnd: 255.\tdi _ r * 496 bitShift: -8.\r\t\t\tdmi _ di bitAnd: 15.\tdmo _ di bitShift: -4.\r\t\t\tr _ dmv < dmi ifTrue:[ii at: 2+dmo] ifFalse:[ii at: 1+dmo].\r\t\t\tg _ (pv bitShift: -8) bitAnd: 255.\tdi _ g * 496 bitShift: -8.\r\t\t\tdmi _ di bitAnd: 15.\tdmo _ di bitShift: -4.\r\t\t\tg _ dmv < dmi ifTrue:[ii at: 2+dmo] ifFalse:[ii at: 1+dmo].\r\t\t\tb _ (pv bitShift: -16) bitAnd: 255.\tdi _ b * 496 bitShift: -8.\r\t\t\tdmi _ di bitAnd: 15.\tdmo _ di bitShift: -4.\r\t\t\tb _ dmv < dmi ifTrue:[ii at: 2+dmo] ifFalse:[ii at: 1+dmo].\r\t\t\tpvOut _ (pvOut bitShift: 16) + \r\t\t\t\t\t\t(b bitShift: 10) + (g bitShift: 5) + r.\r\t\t\t(x bitAnd: 1) = 1 ifTrue:[\r\t\t\t\toutBits at: (outIndex _ outIndex+1) put: pvOut.\r\t\t\t\tpvOut _ 0].\r\t\t].\r\t\t(self width bitAnd: 1) = 1 ifTrue:[\r\t\t\toutBits at: (outIndex _ outIndex+1) put: (pvOut bitShift: -16).\r\t\t\tpvOut _ 0].\r\t].\r\t^out! !\r\r\r!Form methodsFor: 'copying' stamp: 'RAA 9/28/1999 11:20'!\rblankCopyOf: aRectangle scaledBy: scale\r\r        ^ self class extent: (aRectangle extent * scale) truncated depth: depth! !\r\r!Form methodsFor: 'copying' stamp: 'ar 6/9/2000 18:59'!\rcontentsOfArea: aRect\r \t\"Return a new form which derives from the portion of the original form delineated by aRect.\"\r\t^self contentsOfArea: aRect \r\t\tinto: (self class extent: aRect extent depth: depth).! !\r\r!Form methodsFor: 'copying' stamp: 'ar 6/9/2000 19:00'!\rcontentsOfArea: aRect into: newForm\r \t\"Return a new form which derives from the portion of the original form delineated by aRect.\"\r\t^ newForm copyBits: aRect from: self at: 0@0\r\t\tclippingBox: newForm boundingBox rule: Form over fillColor: nil! !\r\r!Form methodsFor: 'copying'!\rcopy: aRect\r \t\"Return a new form which derives from the portion of the original form delineated by aRect.\"\r\t| newForm |\r\tnewForm _ self class extent: aRect extent depth: depth.\r\t^ newForm copyBits: aRect from: self at: 0@0\r\t\tclippingBox: newForm boundingBox rule: Form over fillColor: nil! !\r\r!Form methodsFor: 'copying' stamp: 'ar 5/28/2000 12:08'!\rcopy: destRectangle from: sourcePt in: sourceForm rule: rule \r\t\"Make up a BitBlt table and copy the bits.\"\r\t(BitBlt current toForm: self)\r\t\tcopy: destRectangle\r\t\tfrom: sourcePt in: sourceForm\r\t\tfillColor: nil rule: rule! !\r\r!Form methodsFor: 'copying'!\rcopy: sourceRectangle from: sourceForm to: destPt rule: rule\r\t^ self copy: (destPt extent: sourceRectangle extent)\r\t\tfrom: sourceRectangle topLeft in: sourceForm rule: rule! !\r\r!Form methodsFor: 'copying' stamp: 'ar 5/28/2000 12:08'!\rcopyBits: sourceForm at: destOrigin translucent: factor\r\t\"Make up a BitBlt table and copy the bits with the given colorMap.\"\r\t(BitBlt current \r\t\tdestForm: self\r\t\tsourceForm: sourceForm\r\t\thalftoneForm: nil\r\t\tcombinationRule: 30\r\t\tdestOrigin: destOrigin\r\t\tsourceOrigin: 0@0\r\t\textent: sourceForm extent\r\t\tclipRect: self boundingBox)\r\t\tcopyBitsTranslucent: ((0 max: (factor*255.0) asInteger) min: 255)\r\"\r | f f2 f3 | f _ Form fromUser. f2 _ Form fromDisplay: (0@0 extent: f extent). f3 _ f2 deepCopy.\r0.0 to: 1.0 by: 1.0/32 do:\r\t[:t | f3 _ f2 deepCopy. f3 copyBits: f at: 0@0 translucent: t.\r\tf3 displayAt: 0@0. (Delay forMilliseconds: 100) wait].\r\"! !\r\r!Form methodsFor: 'copying' stamp: 'ar 5/28/2000 12:08'!\rcopyBits: sourceRect from: sourceForm at: destOrigin clippingBox: clipRect rule: rule fillColor: aForm \r\t\"Make up a BitBlt table and copy the bits.\"\r\r\t(BitBlt current \r\t\tdestForm: self\r\t\tsourceForm: sourceForm\r\t\tfillColor: aForm\r\t\tcombinationRule: rule\r\t\tdestOrigin: destOrigin\r\t\tsourceOrigin: sourceRect origin\r\t\textent: sourceRect extent\r\t\tclipRect: clipRect) copyBits! !\r\r!Form methodsFor: 'copying' stamp: 'ar 5/28/2000 12:08'!\rcopyBits: sourceRect from: sourceForm at: destOrigin clippingBox: clipRect rule: rule fillColor: aForm map: map\r\t\"Make up a BitBlt table and copy the bits.  Use a colorMap.\"\r\r\t((BitBlt current \r\t\tdestForm: self\r\t\tsourceForm: sourceForm\r\t\tfillColor: aForm\r\t\tcombinationRule: rule\r\t\tdestOrigin: destOrigin\r\t\tsourceOrigin: sourceRect origin\r\t\textent: sourceRect extent\r\t\tclipRect: clipRect) colorMap: map) copyBits! !\r\r!Form methodsFor: 'copying' stamp: 'ar 5/28/2000 12:08'!\rcopyBits: sourceRect from: sourceForm at: destOrigin colorMap: map \r\t\"Make up a BitBlt table and copy the bits with the given colorMap.\"\r\t((BitBlt current \r\t\tdestForm: self\r\t\tsourceForm: sourceForm\r\t\thalftoneForm: nil\r\t\tcombinationRule: Form over\r\t\tdestOrigin: destOrigin\r\t\tsourceOrigin: sourceRect origin\r\t\textent: sourceRect extent\r\t\tclipRect: self boundingBox) colorMap: map) copyBits! !\r\r!Form methodsFor: 'copying' stamp: 'jm 2/27/98 09:35'!\rdeepCopy\r\r\t^ self shallowCopy\r\t\tbits: bits copy;\r\t\toffset: offset copy\r! !\r\r!Form methodsFor: 'copying' stamp: 'tk 8/19/1998 16:11'!\rveryDeepCopyWith: deepCopier\r\t\"Return self.  I am immutable in the Morphic world.  Do not record me.\"\r\t^ self! !\r\r\r!Form methodsFor: 'display box access'!\rboundingBox\r\t^ Rectangle origin: 0 @ 0\r\t\t\tcorner: width @ height! !\r\r!Form methodsFor: 'display box access'!\rcomputeBoundingBox\r\t^ Rectangle origin: 0 @ 0\r\t\t\tcorner: width @ height! !\r\r\r!Form methodsFor: 'displaying' stamp: 'ar 2/13/2001 22:13'!\rdisplayInterpolatedIn: aRectangle on: aForm\r\t\"Display the receiver on aForm, using interpolation if necessary.\r\t\tForm fromUser displayInterpolatedOn: Display.\r\tNote: When scaling we attempt to use bilinear interpolation based\r\ton the 3D engine. If the engine is not there then we use WarpBlt.\r\t\"\r\t| engine adjustedR |\r\tself extent = aRectangle extent ifTrue:[^self displayOn: aForm at: aRectangle origin].\r\tSmalltalk at: #B3DRenderEngine \r\t\tifPresent:[:engineClass| engine _ (engineClass defaultForPlatformOn: aForm)].\r\tengine ifNil:[\r\t\t\"We've got no bilinear interpolation. Use WarpBlt instead\"\r\t\t(WarpBlt current toForm: aForm)\r\t\t\tsourceForm: self destRect: aRectangle;\r\t\t\tcombinationRule: 3;\r\t\t\tcellSize: 2;\r\t\t\twarpBits.\r\t\t^self\r\t].\r\r\t\"Otherwise use the 3D engine for our purposes\"\r\r\t\"there seems to be a slight bug in B3D which the following adjusts for\"\r\tadjustedR _ (aRectangle withRight: aRectangle right + 1) translateBy: 0@1.\r\tengine viewport: adjustedR.\r\tengine material: ((Smalltalk at: #B3DMaterial) new emission: Color white).\r\tengine texture: self.\r\tengine render: ((Smalltalk at: #B3DIndexedQuadMesh) new plainTextureRect).\r\tengine finish.! !\r\r!Form methodsFor: 'displaying' stamp: 'ar 2/13/2001 22:12'!\rdisplayInterpolatedOn: aForm\r\t\"Display the receiver on aForm, using interpolation if necessary.\r\t\tForm fromUser displayInterpolatedOn: Display.\r\tNote: When scaling we attempt to use bilinear interpolation based\r\ton the 3D engine. If the engine is not there then we use WarpBlt.\r\t\"\r\t| engine |\r\tself extent = aForm extent ifTrue:[^self displayOn: aForm].\r\tSmalltalk at: #B3DRenderEngine \r\t\tifPresent:[:engineClass| engine _ (engineClass defaultForPlatformOn: aForm)].\r\tengine ifNil:[\r\t\t\"We've got no bilinear interpolation. Use WarpBlt instead\"\r\t\t(WarpBlt current toForm: aForm)\r\t\t\tsourceForm: self destRect: aForm boundingBox;\r\t\t\tcombinationRule: 3;\r\t\t\tcellSize: 2;\r\t\t\twarpBits.\r\t\t^self\r\t].\r\t\"Otherwise use the 3D engine for our purposes\"\r\tengine viewport: aForm boundingBox.\r\tengine material: ((Smalltalk at: #B3DMaterial) new emission: Color white).\r\tengine texture: self.\r\tengine render: ((Smalltalk at: #B3DIndexedQuadMesh) new plainTextureRect).\r\tengine finish.! !\r\r!Form methodsFor: 'displaying' stamp: 'ar 5/14/2001 23:33'!\rdisplayOn: aDisplayMedium at: aDisplayPoint clippingBox: clipRectangle rule: rule fillColor: aForm\r\r\taDisplayMedium copyBits: self boundingBox\r\t\tfrom: self\r\t\tat: aDisplayPoint + self offset\r\t\tclippingBox: clipRectangle\r\t\trule: rule\r\t\tfillColor: aForm\r\t\tmap: (self colormapIfNeededFor: aDisplayMedium).\r! !\r\r!Form methodsFor: 'displaying'!\rdisplayOn: aDisplayMedium transformation: displayTransformation clippingBox: clipRectangle align: alignmentPoint with: relativePoint rule: ruleInteger fillColor: aForm \r\t\"Graphically, it means nothing to scale a Form by floating point values.  \r\tBecause scales and other display parameters are kept in floating point to \r\tminimize round off errors, we are forced in this routine to round off to the \r\tnearest integer.\"\r\r\t| absolutePoint scale magnifiedForm |\r\tabsolutePoint _ displayTransformation applyTo: relativePoint.\r\tabsolutePoint _ absolutePoint x asInteger @ absolutePoint y asInteger.\r\tdisplayTransformation noScale\r\t\tifTrue: [magnifiedForm _ self]\r\t\tifFalse: \r\t\t\t[scale _ displayTransformation scale.\r\t\t\tscale _ scale x @ scale y.\r\t\t\t(1@1 = scale)\r\t\t\t\t\tifTrue: [scale _ nil. magnifiedForm _ self]\r\t\t\t\t\tifFalse: [magnifiedForm _ self magnify: self boundingBox by: scale]].\r\tmagnifiedForm\r\t\tdisplayOn: aDisplayMedium\r\t\tat: absolutePoint - alignmentPoint\r\t\tclippingBox: clipRectangle\r\t\trule: ruleInteger\r\t\tfillColor: aForm! !\r\r!Form methodsFor: 'displaying'!\rdisplayOnPort: port at: location\r\tport copyForm: self to: location rule: Form over! !\r\r!Form methodsFor: 'displaying' stamp: 'ar 5/17/2001 15:40'!\rdisplayResourceFormOn: aForm\r\t\"a special display method for blowing up resource thumbnails\"\r\t| engine tx cmap blitter |\r\tself extent = aForm extent ifTrue:[^self displayOn: aForm].\r\tSmalltalk at: #B3DRenderEngine ifPresentAndInMemory:\r\t\t[:engineClass | engine _ engineClass defaultForPlatformOn: aForm].\r\tengine ifNil:[\r\t\t\"We've got no bilinear interpolation. Use WarpBlt instead\"\r\t\t(WarpBlt current toForm: aForm)\r\t\t\tsourceForm: self destRect: aForm boundingBox;\r\t\t\tcombinationRule: 3;\r\t\t\tcellSize: 2;\r\t\t\twarpBits.\r\t\t^self\r\t].\r\ttx _ self asTexture.\r\t(blitter _ BitBlt current toForm: tx)\r\t\tsourceForm: self; destRect: aForm boundingBox;\r\t\tsourceOrigin: 0@0;\r\t\tcombinationRule: Form paint.\r\t\"map transparency to current World background color\"\r\t(World color respondsTo: #pixelWordForDepth:) ifTrue: [\r\t\tcmap _ Bitmap new: (self depth <= 8 ifTrue: [1 << self depth] ifFalse: [4096]).\r\t\tcmap at: 1 put: (tx pixelWordFor: World color).\r\t\tblitter colorMap: cmap.\r\t].\r\tblitter copyBits.\r\tengine viewport: aForm boundingBox.\r\tengine material: ((Smalltalk at: #B3DMaterial) new emission: Color white).\r\tengine texture: tx.\r\tengine render: ((Smalltalk at: #B3DIndexedQuadMesh) new plainTextureRect).\r\tengine finish.\r\t\"the above, using bilinear interpolation doesn't leave transparent pixel values intact\"\r\t(WarpBlt current toForm: aForm)\r\t\tsourceForm: self destRect: aForm boundingBox;\r\t\tcombinationRule: Form and;\r\t\tcolorMap: (Color maskingMap: self depth);\r\t\twarpBits.! !\r\r!Form methodsFor: 'displaying' stamp: 'ar 3/2/2001 21:32'!\rdisplayScaledOn: aForm\r\t\"Display the receiver on aForm, scaling if necessary.\r\t\tForm fromUser displayScaledOn: Display.\r\t\"\r\tself extent = aForm extent ifTrue:[^self displayOn: aForm].\r\t(WarpBlt current toForm: aForm)\r\t\tsourceForm: self destRect: aForm boundingBox;\r\t\tcombinationRule: Form paint;\r\t\tcellSize: 2;\r\t\twarpBits.! !\r\r!Form methodsFor: 'displaying' stamp: 'ar 5/28/2000 12:08'!\rdrawLine: sourceForm from: beginPoint to: endPoint clippingBox: clipRect rule: anInteger fillColor: aForm \r\t\"Refer to the comment in \r\tDisplayMedium|drawLine:from:to:clippingBox:rule:mask:.\" \r\t\r\t| dotSetter |\r\t\"set up an instance of BitBlt for display\"\r\tdotSetter _ BitBlt current\r\t\tdestForm: self\r\t\tsourceForm: sourceForm\r\t\tfillColor: aForm\r\t\tcombinationRule: anInteger\r\t\tdestOrigin: beginPoint\r\t\tsourceOrigin: 0 @ 0\r\t\textent: sourceForm extent\r\t\tclipRect: clipRect.\r\tdotSetter drawFrom: beginPoint to: endPoint! !\r\r!Form methodsFor: 'displaying' stamp: 'ar 5/28/2000 12:08'!\rpaintBits: sourceForm at: destOrigin translucent: factor\r\t\"Make up a BitBlt table and copy the bits with the given colorMap.\"\r\t(BitBlt current destForm: self\r\t\tsourceForm: sourceForm\r\t\thalftoneForm: nil\r\t\tcombinationRule: 31\r\t\tdestOrigin: destOrigin\r\t\tsourceOrigin: 0@0\r\t\textent: sourceForm extent\r\t\tclipRect: self boundingBox)\r\t\tcopyBitsTranslucent: ((0 max: (factor*255.0) asInteger) min: 255)\r\"\r | f f2 f3 | f _ Form fromUser. f replaceColor: f peripheralColor withColor: Color transparent.\rf2 _ Form fromDisplay: (0@0 extent: f extent). f3 _ f2 deepCopy.\r0.0 to: 1.0 by: 1.0/32 do:\r\t[:t | f3 _ f2 deepCopy. f3 paintBits: f at: 0@0 translucent: t.\r\tf3 displayAt: 0@0. (Delay forMilliseconds: 100) wait].\r\"! !\r\r!Form methodsFor: 'displaying' stamp: 'BG 10/28/2003 20:58'!\rsetAsBackground\r\t\"Set this form as a background image.\"\r\r\tSmalltalk isMorphic \r\t\t\r\t\tifFalse:\r\t\t\t[ScheduledControllers screenController model form: self.\r\t\t\tDisplay restoreAfter: []]! !\r\r\r\r!Form methodsFor: 'encoding' stamp: 'RAA 7/29/2000 09:01'!\raddDeltasFrom: previousForm\r\r\t(BitBlt \r\t\tdestForm: self \r\t\tsourceForm: previousForm \r\t\tfillColor: nil \r\t\tcombinationRule: Form reverse\r\t\tdestOrigin: 0@0\r\t\tsourceOrigin: 0@0\r\t\textent: self extent \r\t\tclipRect: self boundingBox) copyBits.\r\t^self! !\r\r!Form methodsFor: 'encoding' stamp: 'RAA 7/29/2000 09:01'!\rdeltaFrom: previousForm\r\r\t| newForm |\r\tnewForm _ previousForm deepCopy.\r\t(BitBlt \r\t\tdestForm: newForm \r\t\tsourceForm: self \r\t\tfillColor: nil \r\t\tcombinationRule: Form reverse \r\t\tdestOrigin: 0@0\r\t\tsourceOrigin: 0@0\r\t\textent: self extent \r\t\tclipRect: self boundingBox) copyBits.\r\t^newForm! !\r\r!Form methodsFor: 'encoding' stamp: 'RAA 8/1/2000 06:15'!\rdeltaFrom: smallerForm at: offsetInMe\r\r\t| newForm |\r\tnewForm _ smallerForm deepCopy.\r\t(BitBlt \r\t\tdestForm: newForm \r\t\tsourceForm: self \r\t\tfillColor: nil \r\t\tcombinationRule: Form reverse \r\t\tdestOrigin: 0@0\r\t\tsourceOrigin: offsetInMe\r\t\textent: smallerForm extent \r\t\tclipRect: newForm boundingBox) copyBits.\r\t^newForm! !\r\r!Form methodsFor: 'encoding' stamp: 'RAA 8/13/2000 15:32'!\rencodeForRemoteCanvas\r\t| header binaryForm |\r\t\"encode into a bitstream for use with RemoteCanvas.  The format does not require invoking the Compiler\"\r\theader := String streamContents: [ :str |\r\tstr \"nextPutAll: 'F|';\"\r\t\tnextPutAll: self depth printString;\r\t\tnextPut: $,;\r\t\tnextPutAll: self width printString;\r\t\tnextPut: $,;\r\t\tnextPutAll: self height printString;\r\t\tnextPut: $|. ].\r\r\tbinaryForm := ByteArray streamContents: [ :str |\r\t\tself unhibernate.\r\t\tbits writeOn: str. ].\r\r\t^header, binaryForm asString\r! !\r\r\r!Form methodsFor: 'fileIn/Out' stamp: 'di 8/5/1998 11:37'!\rhibernate\r\t\"Replace my bitmap with a compactly encoded representation (a ByteArray).  It is vital that BitBlt and any other access to the bitmap (such as writing to a file) not be used when in this state.  Since BitBlt will fail if the bitmap size is wrong (not = bitsSize), we do not allow replacement by a byteArray of the same (or larger) size.\"\r\r\t\"NOTE: This method copies code from Bitmap compressToByteArray so that it can\r\tnil out the old bits during the copy, thus avoiding 2x need for extra storage.\"\r\t| compactBits lastByte |\r\t(bits isMemberOf: Bitmap) ifFalse: [^ self  \"already hibernated or weird state\"].\r\tcompactBits _ ByteArray new: (bits size*4) + 7 + (bits size//1984*3).\r\tlastByte _ bits compress: bits toByteArray: compactBits.\r\tlastByte < (bits size*4) ifTrue:\r\t\t[bits _ nil.  \"Let GC reclaim the old bits before the copy if necessary\"\r\t\tbits _ compactBits copyFrom: 1 to: lastByte]! !\r\r!Form methodsFor: 'fileIn/Out' stamp: 'di 3/15/1999 14:50'!\rprintOn: aStream\r    aStream\r        nextPutAll: self class name;\r        nextPut: $(; print: width;\r        nextPut: $x; print: height;\r        nextPut: $x; print: depth;\r        nextPut: $).\r! !\r\r!Form methodsFor: 'fileIn/Out' stamp: 'mu 8/17/2003 00:44'!\rreadAttributesFrom: aBinaryStream\r\t| offsetX offsetY |\r\tdepth _ aBinaryStream next.\r\t(self depth isPowerOfTwo and: [self depth between: 1 and: 32])\r\t\tifFalse: [self error: 'invalid depth; bad Form file?'].\r\twidth _ aBinaryStream nextWord.\r\theight _ aBinaryStream nextWord.\r\toffsetX  _ aBinaryStream nextWord.\r\toffsetY _ aBinaryStream nextWord.\r\toffsetX > 32767 ifTrue: [offsetX _ offsetX - 65536].\r\toffsetY > 32767 ifTrue: [offsetY _ offsetY - 65536].\r\toffset _ Point x: offsetX y: offsetY.\r\t\r! !\r\r!Form methodsFor: 'fileIn/Out' stamp: 'mu 8/17/2003 00:43'!\rreadBitsFrom: aBinaryStream\r\t\r\tbits _ Bitmap newFromStream: aBinaryStream.\r\tbits size = self bitsSize ifFalse: [self error: 'wrong bitmap size; bad Form file?'].\r\t^ self\r! !\r\r!Form methodsFor: 'fileIn/Out' stamp: 'mu 8/17/2003 00:44'!\rreadFrom: aBinaryStream\r\t\"Reads the receiver from the given binary stream with the format:\r\t\tdepth, extent, offset, bits.\"\r\tself readAttributesFrom: aBinaryStream.\r\tself readBitsFrom: aBinaryStream! !\r\r!Form methodsFor: 'fileIn/Out' stamp: 'jm 3/27/98 16:54'!\rreadFromOldFormat: aBinaryStream\r\t\"Read a Form in the original ST-80 format.\"\r\r\t| w h offsetX offsetY newForm theBits pos |\r\tself error: 'this method must be updated to read into 32-bit word bitmaps'.\r\tw _ aBinaryStream nextWord.\r\th _ aBinaryStream nextWord.\r\toffsetX  _ aBinaryStream nextWord.\r\toffsetY _ aBinaryStream nextWord.\r\toffsetX > 32767 ifTrue: [offsetX _ offsetX - 65536].\r\toffsetY > 32767 ifTrue: [offsetY _ offsetY - 65536].\r\tnewForm _ Form extent: w @ h offset: offsetX @ offsetY.\r\ttheBits _ newForm bits.\r\tpos _ 0.\r\t1 to: w + 15 // 16 do: [:j |\r\t\t1 to: h do: [:i |\r\t\t\ttheBits at: (pos _ pos+1) put: aBinaryStream nextWord]].\r\tnewForm bits: theBits.\r\t^ newForm\r! !\r\r!Form methodsFor: 'fileIn/Out' stamp: 'ar 2/24/2001 22:39'!\rreplaceByResource: aForm\r\t\"Replace the receiver by some resource that just got loaded\"\r\t(self extent = aForm extent and:[self depth = aForm depth]) ifTrue:[\r\t\tbits _ aForm bits.\r\t].! !\r\r!Form methodsFor: 'fileIn/Out' stamp: 'nk 12/31/2003 16:06'!\rstore15To24HexBitsOn:aStream\r\r\t| buf i lineWidth |\r\r\t\"write data for 16-bit form, optimized for encoders writing directly to files to do one single file write rather than 12. I'm not sure I understand the significance of the shifting pattern, but I think I faithfully translated it from the original\"\r\r\tlineWidth _ 0.\r\tbuf _ String new: 12.\r\tbits do: [:word | \r\t\ti _ 0.\r\t\t\"upper pixel\"\r\t\tbuf at: (i _ i + 1) put: ((word bitShift: -27) bitAnd: 15) asHexDigit.\r\t\tbuf at: (i _ i + 1) put: ((word bitShift: -32) bitAnd: 8) asHexDigit.\r\r\t\tbuf at: (i _ i + 1) put: ((word bitShift: -22) bitAnd: 15) asHexDigit.\r\t\tbuf at: (i _ i + 1) put: ((word bitShift: -27) bitAnd: 8) asHexDigit.\r\r\t\tbuf at: (i _ i + 1) put: ((word bitShift: -17) bitAnd: 15) asHexDigit.\r\t\tbuf at: (i _ i + 1) put: ((word bitShift: -22) bitAnd: 8) asHexDigit.\r\r\t\t\"lower pixel\"\r\r\t\tbuf at: (i _ i + 1) put: ((word bitShift: -11) bitAnd: 15) asHexDigit.\r\t\tbuf at: (i _ i + 1) put: ((word bitShift: -16) bitAnd: 8) asHexDigit.\r\r\t\tbuf at: (i _ i + 1) put: ((word bitShift: -6) bitAnd: 15) asHexDigit.\r\t\tbuf at: (i _ i + 1) put: ((word bitShift: -11) bitAnd: 8) asHexDigit.\r\r\t\tbuf at: (i _ i + 1) put: ((word bitShift: -1) bitAnd: 15) asHexDigit.\r\t\tbuf at: (i _ i + 1) put: ((word bitShift: -6) bitAnd: 8) asHexDigit.\r\t\taStream nextPutAll: buf.\r\t\tlineWidth _ lineWidth + 12.\r\t\tlineWidth > 100 ifTrue: [ aStream cr. lineWidth _ 0 ].\r\t\t\"#( 31 26 21 15 10 5 )  do:[:startBit | ]\"\r\t].! !\r\r!Form methodsFor: 'fileIn/Out'!\rstore32To24HexBitsOn:aStream\r\t^self storeBits:20 to:0 on:aStream.! !\r\r!Form methodsFor: 'fileIn/Out'!\rstoreBits:startBit to:stopBit on:aStream\r\tbits storeBits:startBit to:stopBit on:aStream.! !\r\r!Form methodsFor: 'fileIn/Out'!\rstoreBitsOn:aStream base:anInteger\r\tbits do: [:word | \r\t\tanInteger = 10\r\t\t\tifTrue: [aStream space]\r\t\t\tifFalse: [aStream crtab: 2].\r\t\tword printOn: aStream base: anInteger].\r! !\r\r!Form methodsFor: 'fileIn/Out'!\rstoreHexBitsOn:aStream\r\t^self storeBits:28 to:0 on:aStream.! !\r\r!Form methodsFor: 'fileIn/Out'!\rstoreOn: aStream\r\r\tself storeOn: aStream base: 10! !\r\r!Form methodsFor: 'fileIn/Out'!\rstoreOn: aStream base: anInteger \r\t\"Store the receiver out as an expression that can be evaluated to recreate a Form with the same contents as the original.\"\r\r\tself unhibernate.\r\taStream nextPut: $(.\r\taStream nextPutAll: self species name.\r\taStream crtab: 1.\r\taStream nextPutAll: 'extent: '.\r\tself extent printOn: aStream.\r\taStream crtab: 1.\r\taStream nextPutAll: 'depth: '.\r\tself depth printOn: aStream.\r\taStream crtab: 1.\r\taStream nextPutAll: 'fromArray: #('.\r\tself storeBitsOn:aStream base:anInteger.\r\taStream nextPut: $).\r\taStream crtab: 1.\r\taStream nextPutAll: 'offset: '.\r\tself offset printOn: aStream.\r\taStream nextPut: $).\r! !\r\r!Form methodsFor: 'fileIn/Out' stamp: 'ar 3/3/2001 15:50'!\runhibernate\r\t\"If my bitmap has been compressed into a ByteArray,\r\tthen expand it now, and return true.\"\r\t| resBits |\r\tbits isForm ifTrue:[\r\t\tresBits _ bits.\r\t\tbits _ Bitmap new: self bitsSize.\r\t\tresBits displayResourceFormOn: self.\r\t\t^true].\r\tbits == nil ifTrue:[bits _ Bitmap new: self bitsSize. ^true].\r\t(bits isMemberOf: ByteArray)\r\t\tifTrue: [bits _ Bitmap decompressFromByteArray: bits. ^ true].\r\t^ false! !\r\r!Form methodsFor: 'fileIn/Out' stamp: 'mu 8/17/2003 00:35'!\rwriteAttributesOn: file\r\tself unhibernate.\r\tfile nextPut: depth.\r\tfile nextWordPut: width.\r\tfile nextWordPut: height.\r\tfile nextWordPut: ((self offset x) >=0\r\t\t\t\t\tifTrue: [self offset x]\r\t\t\t\t\tifFalse: [self offset x + 65536]).\r\tfile nextWordPut: ((self offset y) >=0\r\t\t\t\t\tifTrue: [self offset y]\r\t\t\t\t\tifFalse: [self offset y + 65536]).\r\t! !\r\r!Form methodsFor: 'fileIn/Out' stamp: 'mu 8/17/2003 00:35'!\rwriteBitsOn: file\r\tbits writeOn: file! !\r\r!Form methodsFor: 'fileIn/Out' stamp: 'mu 8/17/2003 00:36'!\rwriteOn: file\r\t\"Write the receiver on the file in the format\r\t\tdepth, extent, offset, bits.\"\r\tself writeAttributesOn: file.\r\tself writeBitsOn: file! !\r\r!Form methodsFor: 'fileIn/Out' stamp: 'di 7/6/1998 23:00'!\rwriteOnMovie: file\r\t\"Write just my bits on the file.\"\r\tself unhibernate.\r\tbits writeUncompressedOn: file! !\r\r!Form methodsFor: 'fileIn/Out' stamp: 'tk 2/19/1999 07:30'!\rwriteUncompressedOn: file\r\t\"Write the receiver on the file in the format depth, extent, offset, bits.  Warning:  Caller must put header info on file!!  Use writeUncompressedOnFileNamed: instead.\"\r\tself unhibernate.\r\tfile binary.\r\tfile nextPut: depth.\r\tfile nextWordPut: width.\r\tfile nextWordPut: height.\r\tfile nextWordPut: ((self offset x) >=0\r\t\t\t\t\tifTrue: [self offset x]\r\t\t\t\t\tifFalse: [self offset x + 65536]).\r\tfile nextWordPut: ((self offset y) >=0\r\t\t\t\t\tifTrue: [self offset y]\r\t\t\t\t\tifFalse: [self offset y + 65536]).\r\tbits writeUncompressedOn: file! !\r\r\r!Form methodsFor: 'filling' stamp: 'di 2/19/1999 07:07'!\ranyShapeFill\r\t\"Fill the interior of the outermost outlined region in the receiver, a 1-bit deep form.  Typically the resulting form is used with fillShape:fillColor: to paint a solid color.  See also convexShapeFill:\"\r\r\t| shape |\r\t\"Draw a seed line around the edge and fill inward from the outside.\"\r\tshape _ self findShapeAroundSeedBlock: [:f | f borderWidth: 1].\r\t\"Reverse so that this becomes solid in the middle\"\r\tshape _ shape reverse.\r\t\"Finally erase any bits from the original so the fill is only elsewhere\"\r\tshape copy: shape boundingBox from: self to: 0@0 rule: Form erase.\r\t^ shape! !\r\r!Form methodsFor: 'filling'!\rbitPatternForDepth: suspectedDepth\r\t\"Only called when a Form is being used as a fillColor.  Use a Pattern or InfiniteForm instead for this purpose.\r\tInterpret me as an array of (32/depth) Color pixelValues.  BitBlt aligns the first element of this array with the top scanline of the destinationForm, the second with the second, and so on, cycling through the color array as necessary. 6/18/96 tk\"\r\r\t^ self! !\r\r!Form methodsFor: 'filling' stamp: 'di 9/11/1998 16:25'!\rconvexShapeFill: aMask \r\t\"Fill the interior of the outtermost outlined region in the receiver.  The outlined region must not be concave by more than 90 degrees.  Typically aMask is Color black, to produce a solid fill. then the resulting form is used with fillShape: to paint a solid color.  See also anyShapeFill\"\r\t| destForm tempForm |\r\tdestForm _ Form extent: self extent.  destForm fillBlack.\r\ttempForm _ Form extent: self extent.\r\t(0@0) fourNeighbors do:\r\t\t[:dir |  \"Smear self in all 4 directions, and AND the result\"\r\t\tself displayOn: tempForm at: (0@0) - self offset.\r\t\ttempForm smear: dir distance: (dir dotProduct: tempForm extent) abs.\r\t\ttempForm displayOn: destForm at: 0@0\r\t\t\tclippingBox: destForm boundingBox\r\t\t\trule: Form and fillColor: nil].\r\tdestForm displayOn: self at: 0@0\r\t\tclippingBox: self boundingBox\r\t\trule: Form over fillColor: aMask! !\r\r!Form methodsFor: 'filling' stamp: 'di 10/17/2001 10:09'!\reraseShape: bwForm\r\t\"use bwForm as a mask to clear all pixels where bwForm has 1's\"\r\t((BitBlt current destForm: self sourceForm: bwForm \r\t\tfillColor: nil\r\t\tcombinationRule: Form erase1bitShape\t\"Cut a hole in the picture with my mask\"\r\t\tdestOrigin: bwForm offset \r\t\tsourceOrigin: 0@0\r\t\textent: self extent clipRect: self boundingBox)\r\t\tcolorMap: (Bitmap with: 0 with: 16rFFFFFFFF))\r\t\tcopyBits.\r! !\r\r!Form methodsFor: 'filling' stamp: 'ar 5/28/2000 12:08'!\rfill: aRectangle rule: anInteger fillColor: aForm \r\t\"Replace a rectangular area of the receiver with the pattern described by aForm \r\taccording to the rule anInteger.\"\r\t(BitBlt current toForm: self)\r\t\tcopy: aRectangle\r\t\tfrom: 0@0 in: nil\r\t\tfillColor: aForm rule: anInteger! !\r\r!Form methodsFor: 'filling'!\rfillFromXColorBlock: colorBlock\r\t\"Horizontal Gradient Fill.\r\tSupply relative x in [0.0 ... 1.0] to colorBlock,\r\tand paint each pixel with the color that comes back\"\r\t| xRel |\r\t0 to: width-1 do:\r\t\t[:x |  xRel _ x asFloat / (width-1) asFloat.\r\t\tself fill: (x@0 extent: 1@height) \r\t\t\tfillColor: (colorBlock value: xRel)]\r\"\r((Form extent: 100@100 depth: Display depth)\r\tfillFromXColorBlock: [:x | Color r: x g: 0.0 b: 0.5]) display\r\"! !\r\r!Form methodsFor: 'filling' stamp: 'ar 5/17/2001 15:38'!\rfillFromXYColorBlock: colorBlock\r\t\"General Gradient Fill.\r\tSupply relative x and y in [0.0 ... 1.0] to colorBlock,\r\tand paint each pixel with the color that comes back\"\r\t| poker yRel xRel |\r\tpoker _ BitBlt current bitPokerToForm: self.\r\t0 to: height-1 do:\r\t\t[:y | yRel _ y asFloat / (height-1) asFloat.\r\t\t0 to: width-1 do:\r\t\t\t[:x |  xRel _ x asFloat / (width-1) asFloat.\r\t\t\tpoker pixelAt: x@y\r\t\t\t\tput: ((colorBlock value: xRel value: yRel) pixelWordForDepth: self depth)]]\r\"\r | d |\r((Form extent: 100@20 depth: Display depth)\r\tfillFromXYColorBlock:\r\t[:x :y | d _ 1.0 - (x - 0.5) abs - (y - 0.5) abs.\r\tColor r: d g: 0 b: 1.0-d]) display\r\"! !\r\r!Form methodsFor: 'filling'!\rfillFromYColorBlock: colorBlock\r\t\"Vertical Gradient Fill.\r\tSupply relative y in [0.0 ... 1.0] to colorBlock,\r\tand paint each pixel with the color that comes back\"\r\t| yRel |\r\t0 to: height-1 do:\r\t\t[:y |  yRel _ y asFloat / (height-1) asFloat.\r\t\tself fill: (0@y extent: width@1) \r\t\t\tfillColor: (colorBlock value: yRel)]\r\"\r((Form extent: 100@100 depth: Display depth)\r\tfillFromYColorBlock: [:y | Color r: y g: 0.0 b: 0.5]) display\r\"! !\r\r!Form methodsFor: 'filling' stamp: 'ar 5/17/2001 15:38'!\rfindShapeAroundSeedBlock: seedBlock\r\t\"Build a shape that is black in any region marked by seedBlock. \r\tSeedBlock will be supplied a form, in which to blacken various\r\tpixels as 'seeds'.  Then the seeds are smeared until \r\tthere is no change in the smear when it fills the region, ie,\r\twhen smearing hits a black border and thus goes no further.\"\r\t| smearForm previousSmear all count smearPort |\r\tself depth > 1 ifTrue: [self halt]. \"Only meaningful for B/W forms.\"\r\tall _ self boundingBox.\r\tsmearForm _ Form extent: self extent.\r\tsmearPort _ BitBlt current toForm: smearForm.\r\tseedBlock value: smearForm.\t\t\"Blacken seeds to be smeared\"\r\tsmearPort copyForm: self to: 0@0 rule: Form erase.  \"Clear any in black\"\r\tpreviousSmear _ smearForm deepCopy.\r\tcount _ 1.\r\t[count = 10 and:   \"check for no change every 10 smears\"\r\t\t[count _ 1.\r\t\tpreviousSmear copy: all from: 0@0 in: smearForm rule: Form reverse.\r\t\tpreviousSmear isAllWhite]]\r\t\twhileFalse: \r\t\t\t[smearPort copyForm: smearForm to: 1@0 rule: Form under.\r\t\t\tsmearPort copyForm: smearForm to: -1@0 rule: Form under.\r\t\t\t\"After horiz smear, trim around the region border\"\r\t\t\tsmearPort copyForm: self to: 0@0 rule: Form erase.\r\t\t\tsmearPort copyForm: smearForm to: 0@1 rule: Form under.\r\t\t\tsmearPort copyForm: smearForm to: 0@-1 rule: Form under.\r\t\t\t\"After vert smear, trim around the region border\"\r\t\t\tsmearPort copyForm: self to: 0@0 rule: Form erase.\r\t\t\tcount _ count+1.\r\t\t\tcount = 9 ifTrue: \"Save penultimate smear for comparison\"\r\t\t\t\t[previousSmear copy: all from: 0@0 in: smearForm rule: Form over]].\r\t\"Now paint the filled region in me with aHalftone\"\r\t^ smearForm! !\r\r!Form methodsFor: 'filling' stamp: 'ar 5/14/2001 23:46'!\rfloodFill2: aColor at: interiorPoint\r\t\"Fill the shape (4-connected) at interiorPoint.  The algorithm is based on Paul Heckbert's 'A Seed Fill Algorithm', Graphic Gems I, Academic Press, 1990.\r\tNOTE: This is a less optimized variant for flood filling which is precisely along the lines of Heckbert's algorithm. For almost all cases #floodFill:at: will be faster (see the comment there) but this method is left in both as reference and as a fallback if such a strange case is encountered in reality.\"\r\t| peeker poker stack old new x y top x1 x2 dy left goRight |\r\tpeeker _ BitBlt current bitPeekerFromForm: self.\r\tpoker _ BitBlt current bitPokerToForm: self.\r\tstack _ OrderedCollection new: 50.\r\t\"read old pixel value\"\r\told _ peeker pixelAt: interiorPoint.\r\t\"compute new value\"\r\tnew _ self pixelValueFor: aColor.\r\told = new ifTrue:[^self]. \"no point, is there?!!\"\r\r\tx _ interiorPoint x.\r\ty _ interiorPoint y.\r\t(y >= 0 and:[y < height]) ifTrue:[\r\t\tstack addLast: {y. x. x. 1}. \"y, left, right, dy\"\r\t\tstack addLast: {y+1. x. x. -1}].\r\t[stack isEmpty] whileFalse:[\r\t\ttop _ stack removeLast.\r\t\ty _ top at: 1. x1 _ top at: 2. x2 _ top at: 3. dy _ top at: 4.\r\t\ty _ y + dy.\r\t\t\"Segment of scanline (y-dy) for x1 <= x <= x2 was previously filled.\r\t\tNow explore adjacent pixels in scanline y.\"\r\t\tx _ x1.\r\t\t[x >= 0 and:[(peeker pixelAt: x@y) = old]] whileTrue:[\r\t\t\tpoker pixelAt: x@y put: new.\r\t\t\tx _ x - 1].\r\t\tgoRight _ x < x1.\r\t\tleft _ x+1.\r\t\t(left < x1 and:[y-dy >= 0 and:[y-dy < height]]) \r\t\t\tifTrue:[stack addLast: {y. left. x1-1. 0-dy}].\r\t\tgoRight ifTrue:[x _ x1 + 1].\r\t\t[\r\t\t\tgoRight ifTrue:[\r\t\t\t\t[x < width and:[(peeker pixelAt: x@y) = old]] whileTrue:[\r\t\t\t\t\tpoker pixelAt: x@y put: new.\r\t\t\t\t\tx _ x + 1].\r\t\t\t\t(y+dy >= 0 and:[y+dy < height]) \r\t\t\t\t\tifTrue:[stack addLast: {y. left. x-1. dy}].\r\t\t\t\t(x > (x2+1) and:[y-dy >= 0 and:[y-dy >= 0]]) \r\t\t\t\t\tifTrue:[stack addLast: {y. x2+1. x-1. 0-dy}]].\r\t\t\t[(x _ x + 1) <= x2 and:[(peeker pixelAt: x@y) ~= old]] whileTrue.\r\t\t\tleft _ x.\r\t\t\tgoRight _ true.\r\t\tx <= x2] whileTrue.\r\t].\r! !\r\r!Form methodsFor: 'filling' stamp: 'di 10/20/2001 10:09'!\rfloodFillMapFrom: sourceForm to: scanlineForm mappingColorsWithin: dist to: centerPixVal\r\t\"This is a helper routine for floodFill.  It's written for clarity (scanning the entire\r\tmap using colors) rather than speed (which would require hacking rgb components\r\tin the nieghborhood of centerPixVal.  Note that some day a better proximity metric\r\twould be (h s v) where tolerance could be reduced in hue.\"\r\r\t| colorMap centerColor |\r\tscanlineForm depth = 32 ifFalse: [self error: 'depth 32 assumed'].\r\t\"First get a modifiable identity map\"\r\tcolorMap _ \t(Color cachedColormapFrom: sourceForm depth to: scanlineForm depth) copy.\r\tcenterColor _ Color colorFromPixelValue: (centerPixVal bitOr: 16rFFe6) depth: scanlineForm depth.\r\t\"Now replace all entries that are close to the centerColor\"\r\t1 to: colorMap size do:\r\t\t[:i | ((Color colorFromPixelValue: ((colorMap at: i) bitOr: 16rFFe6) depth: scanlineForm depth)\r\t\t\t\tdiff: centerColor) <= dist ifTrue: [colorMap at: i put: centerPixVal]].\r\t^ colorMap! !\r\r!Form methodsFor: 'filling' stamp: 'di 10/17/2001 10:10'!\rshapeFill: aColor interiorPoint: interiorPoint\r\t\"Identify the shape (region of identical color) at interiorPoint,\r\tand then fill that shape with the new color, aColor\r\t: modified di's original method such that it returns the bwForm, for potential use by the caller\"\r\r\t| bwForm interiorPixVal map ppd color ind |\r\tself depth = 1 ifTrue:\r\t\t[^ self shapeFill: aColor\r\t\t\tseedBlock: [:form | form pixelValueAt: interiorPoint put: 1]].\r\r\t\"First map this form into a B/W form with 0's in the interior region.\"\r\t\t\"bwForm _ self makeBWForm: interiorColor.\"\t\"won't work for two whites\"\r\tinteriorPixVal _ self pixelValueAt: interiorPoint.\r\tbwForm _ Form extent: self extent.\r\tmap _ Bitmap new: (1 bitShift: (self depth min: 12)).  \"Not calling newColorMap.  All \r\t\t\tnon-foreground go to 0.  Length is 2 to 4096.\"\r\tppd _ self depth.\t\"256 long color map in depth 8 is not one of the following cases\"\r\t3 to: 5 do: [:bitsPerColor | \r\t\t(2 raisedTo: bitsPerColor*3) = map size \r\t\t\tifTrue: [ppd _ bitsPerColor*3]].\t\"ready for longer maps than 512\"\r\r\tppd <= 8\r\t\tifTrue: [map at: interiorPixVal+1 put: 1]\r\t\tifFalse: [interiorPixVal = 0 \r\t\t\tifFalse: [color _ Color colorFromPixelValue: interiorPixVal depth: self depth.\r\t\t\t\tind _ color pixelValueForDepth: ppd.\r\t\t\t\tmap at: ind+1 put: 1]\r\t\t\tifTrue: [map at: 1 put: 1]].\r\tbwForm copyBits: self boundingBox from: self at: 0@0 colorMap: map.\r\tbwForm reverse.  \"Make interior region be 0's\"\r\r\t\"Now fill the interior region and return that shape\"\r\tbwForm _ bwForm findShapeAroundSeedBlock:\r\t\t\t\t\t[:form | form pixelValueAt: interiorPoint put: 1].\r\r\t\"Finally use that shape as a mask to flood the region with color\"\r\tself eraseShape: bwForm.\r\tself fillShape: bwForm fillColor: aColor.\r\t^ bwForm! !\r\r!Form methodsFor: 'filling' stamp: 'ar 5/17/2001 15:38'!\rshapeFill: aColor seedBlock: seedBlock\r\tself depth > 1 ifTrue: [self error: 'This call only meaningful for B/W forms'].\r\t(self findShapeAroundSeedBlock: seedBlock)\r\t\tdisplayOn: self at: 0@0 clippingBox: self boundingBox\r\t\trule: Form under fillColor: aColor ! !\r\r\r!Form methodsFor: 'image manipulation' stamp: 'ar 5/17/2001 15:40'!\rreplaceColor: oldColor withColor: newColor\r\t\"Replace one color with another everywhere is this form\"\r\r\t| cm newInd target ff |\r\tself depth = 32\r\t\tifTrue: [cm _ (Color  cachedColormapFrom: 16 to: 32) copy]\r\t\tifFalse: [cm _ Bitmap new: (1 bitShift: (self depth min: 15)).\r\t\t\t\t1 to: cm size do: [:i | cm at: i put: i - 1]].\r\tnewInd _ newColor pixelValueForDepth: self depth.\r\tcm at: (oldColor pixelValueForDepth: (self depth min: 16))+1 put: newInd.\r\ttarget _ newColor isTransparent \r\t\tifTrue: [ff _ Form extent: self extent depth: depth.\r\t\t\tff fillWithColor: newColor.  ff]\r\t\tifFalse: [self].\r\t(BitBlt current toForm: target)\r\t\tsourceForm: self;\r\t\tsourceOrigin: 0@0;\r\t\tcombinationRule: Form paint;\r\t\tdestX: 0 destY: 0 width: width height: height;\r\t\tcolorMap: cm;\r\t\tcopyBits.\r\tnewColor = Color transparent \r\t\tifTrue: [target displayOn: self].! !\r\r!Form methodsFor: 'image manipulation' stamp: 'ar 5/28/2000 12:09'!\rsmear: dir distance: dist\r\t\"Smear any black pixels in this form in the direction dir in Log N steps\"\r\t| skew bb |\r\tbb _ BitBlt current destForm: self sourceForm: self fillColor: nil\r\t\tcombinationRule: Form under destOrigin: 0@0 sourceOrigin: 0@0\r\t\textent: self extent clipRect: self boundingBox.\r\tskew _ 1.\r\t[skew < dist] whileTrue:\r\t\t[bb destOrigin: dir*skew; copyBits.\r\t\tskew _ skew+skew]! !\r\r!Form methodsFor: 'image manipulation' stamp: 'jm 6/30/1999 15:36'!\rtrimBordersOfColor: aColor\r\t\"Answer a copy of this Form with each edge trimmed in to the first pixel that is not of the given color. (That is, border strips of the given color are removed).\"\r\r\t| r |\r\tr _ self rectangleEnclosingPixelsNotOfColor: aColor.\r\t^ self copy: r\r! !\r\r\r!Form methodsFor: 'initialize-release' stamp: 'ar 5/17/2001 22:54'!\rallocateForm: extentPoint\r\t\"Allocate a new form which is similar to the receiver and can be used for accelerated blts\"\r\t^Form extent: extentPoint depth: self nativeDepth! !\r\r!Form methodsFor: 'initialize-release' stamp: 'ar 5/26/2000 00:46'!\rfinish\r\t\"If there are any pending operations on the receiver complete them. Do not return before all modifications have taken effect.\"! !\r\r!Form methodsFor: 'initialize-release' stamp: 'ar 5/26/2000 00:45'!\rflush\r\t\"If there are any pending operations on the receiver start doing them. In time, they will show up on the receiver but not necessarily immediately after this method returns.\"! !\r\r!Form methodsFor: 'initialize-release'!\rfromDisplay: aRectangle \r\t\"Create a virtual bit map from a user specified rectangular area on the \r\tdisplay screen. Reallocates bitmap only if aRectangle ~= the receiver's \r\textent.\"\r\r\t(width = aRectangle width and: [height = aRectangle height])\r\t\tifFalse: [self setExtent: aRectangle extent depth: depth].\r\tself\r\t\tcopyBits: (aRectangle origin extent: self extent)\r\t\tfrom: Display\r\t\tat: 0 @ 0\r\t\tclippingBox: self boundingBox\r\t\trule: Form over\r\t\tfillColor: nil! !\r\r!Form methodsFor: 'initialize-release' stamp: 'ar 5/28/2000 18:45'!\rshutDown\r\t\"The system is going down. Try to preserve some space\"\r\tself hibernate! !\r\r!Form methodsFor: 'initialize-release' stamp: 'ar 6/16/2002 18:39'!\rswapEndianness\r\t\"Swap from big to little endian pixels and vice versa\"\r\tdepth := 0 - depth.! !\r\r\r!Form methodsFor: 'other' stamp: 'ar 12/12/2003 18:24'!\rfixAlpha\r\t\"Fix the alpha channel if the receiver is 32bit\"\r\t| bb |\r\tself depth = 32 ifFalse:[^self].\r\tbb := BitBlt toForm: self.\r\tbb combinationRule: 40 \"fixAlpha:with:\".\r\tbb copyBits.! !\r\r!Form methodsFor: 'other' stamp: 'jm 9/27/97 21:02'!\rformForColorCount: colorCount\r\t\"Return a ColorForm of sufficient depth to represent the given number of colors. The maximum number of colors is 256.\"\r\r\tcolorCount > 256 ifTrue: [^ self error: 'too many colors'].\r\r\tcolorCount > 16 ifTrue: [^ ColorForm extent: self extent depth: 8].\r\tcolorCount > 4 ifTrue: [^ ColorForm extent: self extent depth: 4].\r\tcolorCount > 2 ifTrue: [^ ColorForm extent: self extent depth: 2].\r\t^ ColorForm extent: self extent depth: 1\r! !\r\r!Form methodsFor: 'other' stamp: 'sw 5/3/2001 16:23'!\rgraphicForViewerTab\r\t\"Answer the graphic to be used in the tab of a viewer open on me\"\r\r\t^ self! !\r\r!Form methodsFor: 'other' stamp: 'jm 1/6/98 10:37'!\rprimPrintHScale: hScale vScale: vScale landscape: aBoolean\r\t\"On platforms that support it, this primitive prints the receiver, assumed to be a Form, to the default printer.\"\r\t\"(Form extent: 10@10) primPrintHScale: 1.0 vScale: 1.0 landscape: true\"\r\r\t<primitive: 232>\r\tself primitiveFailed\r! !\r\r!Form methodsFor: 'other' stamp: 'RAA 1/30/2002 16:42'!\rrelativeTextAnchorPosition\r\r\t^nil\t\t\"so forms can be in TextAnchors\"! !\r\r\r!Form methodsFor: 'pixel access' stamp: 'ar 5/17/2001 15:42'!\rcolorAt: aPoint\r\t\"Return the color in the pixel at the given point.  \"\r\r\t^ Color \r\t\tcolorFromPixelValue: (self pixelValueAt: aPoint)\r\t\tdepth: self depth\r! !\r\r!Form methodsFor: 'pixel access' stamp: 'ar 5/14/2001 23:46'!\rcolorAt: aPoint put: aColor\r\t\"Store a Color into the pixel at coordinate aPoint.  \"\r\r\tself pixelValueAt: aPoint put: (self pixelValueFor: aColor).\r\r\"[Sensor anyButtonPressed] whileFalse:\r\t[Display colorAt: Sensor cursorPoint put: Color red]\"\r! !\r\r!Form methodsFor: 'pixel access' stamp: 'ar 5/17/2001 15:39'!\risTransparentAt: aPoint \r\t\"Return true if the receiver is transparent at the given point.\"\r\r\tself depth = 1 ifTrue: [^ false].  \"no transparency at depth 1\"\r\t^ (self pixelValueAt: aPoint) = (self pixelValueFor: Color transparent)\r! !\r\r!Form methodsFor: 'pixel access' stamp: 'ar 5/28/2000 12:08'!\rpixelValueAt: aPoint \r\t\"Return the raw pixel value at the given point. This pixel value depends on the receiver's depth. Typical clients use colorAt: to get a Color.  \"\r\r\t^ (BitBlt current bitPeekerFromForm: self) pixelAt: aPoint\r! !\r\r!Form methodsFor: 'pixel access' stamp: 'ar 5/28/2000 12:08'!\rpixelValueAt: aPoint put: pixelValue\r\t\"Store the given raw pixel value at the given point. Typical clients use colorAt:put: to store a color. \"\r\r\t(BitBlt current bitPokerToForm: self) pixelAt: aPoint put: pixelValue.\r! !\r\r\r!Form methodsFor: 'postscript generation' stamp: 'ar 5/17/2001 15:36'!\rbitsPerComponent\r\t^self depth <= 8 ifTrue:[self depth] ifFalse:[8].\r! !\r\r!Form methodsFor: 'postscript generation' stamp: 'mpw 11/14/1999 22:22'!\rbytesPerRow\r\t^ self numComponents * self paddedWidth * self bitsPerComponent / 8.! !\r\r!Form methodsFor: 'postscript generation' stamp: 'ar 5/17/2001 15:39'!\rdecodeArray\r\t^self depth <= 8 ifTrue:['[1 0]'] ifFalse:['[0 1 0 1 0 1 ]'].\r! !\r\r!Form methodsFor: 'postscript generation' stamp: 'RAA 4/20/2001 15:40'!\rencodePostscriptOn: aStream \r\tself unhibernate.\r\r\t\"since current Postscript support treats 8-bit forms as 0 to 255 gray scale, convert\r\tto 16 first so we get more faithful results\"\r\r\tself depth <= 8 ifTrue: [^(self asFormOfDepth: 16) encodePostscriptOn: aStream].\r\r\t^ self printPostscript: aStream operator: (self depth = 1\r\t\t\tifTrue: ['imagemask']\r\t\t\tifFalse: ['image'])! !\r\r!Form methodsFor: 'postscript generation' stamp: 'ar 5/17/2001 15:43'!\rnumComponents\r\t^self depth <= 8 ifTrue:[1] ifFalse:[3].\r! !\r\r!Form methodsFor: 'postscript generation'!\rpaddedWidth\r\t^ (self width + (self rowPadding-1)// self rowPadding) * self rowPadding.! !\r\r!Form methodsFor: 'postscript generation' stamp: 'nk 12/31/2003 15:46'!\rprintPostscript: aStream operator: operator \r\taStream preserveStateDuring: \r\t\t\t[:inner | \r\t\t\tinner rectclip: (0 @ 0 extent: width @ height).\r\t\t\tself setColorspaceOn: inner.\r\t\t\tinner\r\t\t\t\tprint: '[ ';\r\t\t\t\tcr;\r\t\t\t\tprint: '/ImageType 1';\r\t\t\t\tcr;\r\t\t\t\tprint: '/ImageMatrix [1 0 0 1 0 0]';\r\t\t\t\tcr;\r\t\t\t\tprint: '/MultipleDataSources false';\r\t\t\t\tcr;\r\t\t\t\tprint: '/DataSource level1 { { currentfile ';\r\t\t\t\twrite: self bytesPerRow;\r\t\t\t\tprint: ' string readhexstring pop }} bind { currentfile /ASCIIHexDecode filter } ifelse';\r\t\t\t\tcr;\r\t\t\t\tprint: '/Width ';\r\t\t\t\twrite: self paddedWidth;\r\t\t\t\tcr;\r\t\t\t\tprint: '/Height ';\r\t\t\t\twrite: self height;\r\t\t\t\tcr;\r\t\t\t\tprint: '/Decode ';\r\t\t\t\tprint: self decodeArray;\r\t\t\t\tcr;\r\t\t\t\tprint: '/BitsPerComponent ';\r\t\t\t\twrite: self bitsPerComponent;\r\t\t\t\tcr;\r\t\t\t\tprint: 'makeDict ';\r\t\t\t\tprint: operator;\r\t\t\t\tcr.\r\t\t\tself storePostscriptHexOn: inner.\r\t\t\tinner\r\t\t\t\tprint: $>;\r\t\t\t\tcr.\r\t\t\tinner cr].\r\taStream cr! !\r\r!Form methodsFor: 'postscript generation' stamp: 'mpw 11/15/1999 08:34'!\rrowPadding\r\t^ 32 // self depth! !\r\r!Form methodsFor: 'postscript generation'!\rsetColorspaceOn:aStream\r\tself numComponents = 1 ifTrue:[aStream print:'/DeviceGray setcolorspace 0 setgray'; cr.]\r\t\tifFalse:[aStream print:'/DeviceRGB setcolorspace'; cr.].! !\r\r!Form methodsFor: 'postscript generation' stamp: 'nk 12/31/2003 15:46'!\rstorePostscriptHexOn: inner \r\tself depth <= 8 ifTrue: [self storeHexBitsOn: inner].\r\tself depth = 16 ifTrue: [self store15To24HexBitsOn: inner].\r\tself depth = 32 ifTrue: [self store32To24HexBitsOn: inner]! !\r\r\r!Form methodsFor: 'resources' stamp: 'ar 12/9/2002 16:04'!\rreadNativeResourceFrom: byteStream\r\t| img aStream |\r\t(byteStream isKindOf: FileStream) ifTrue:[\r\t\t\"Ugly, but ImageReadWriter will send #reset which is implemented as #reopen and we may not be able to do so.\"\r\t\taStream _ RWBinaryOrTextStream with: byteStream contents.\r\t] ifFalse:[\r\t\taStream _ byteStream.\r\t].\r\timg _ [ImageReadWriter formFromStream: aStream] on: Error do:[:ex| nil].\r\timg ifNil:[^nil].\r\t(img isColorForm and:[self isColorForm]) ifTrue:[\r\t\t| cc |\r\t\tcc := img colors.\r\t\timg colors: nil.\r\t\timg displayOn: self.\r\t\timg colors: cc.\r\t] ifFalse:[\r\t\timg displayOn: self.\r\t].\r\timg _ nil.! !\r\r!Form methodsFor: 'resources' stamp: 'sd 6/28/2003 09:48'!\rreadResourceFrom: aStream\r\t\"Store a resource representation of the receiver on aStream.\r\tMust be specific to the receiver so that no code is filed out.\"\r\t| bitsSize msb |\r\t(aStream next: 4) asString = self resourceTag \r\t\tifFalse:[\taStream position: aStream position - 4.\r\t\t\t\t^self readNativeResourceFrom: aStream].\r\twidth _ aStream nextNumber: 4.\r\theight _ aStream nextNumber: 4.\r\tdepth _ aStream nextNumber: 4.\r\tbitsSize _ aStream nextNumber: 4.\r\tbitsSize = 0 ifFalse:[\r\t\tbits _ aStream next: bitsSize.\r\t\t^self].\r\tmsb _ (aStream nextNumber: 4) = 1.\r\tbitsSize _ aStream nextNumber: 4.\r\tbits _ Bitmap new: self bitsSize.\r\t(Form extent: width@height depth: depth bits: (aStream next: bitsSize * 4))\r\t\tdisplayOn: self.\r\tmsb = Smalltalk isBigEndian ifFalse:[\r\t\tBitmap swapBytesIn: bits from: 1 to: bits size.\r\t].! !\r\r!Form methodsFor: 'resources' stamp: 'ar 2/27/2001 14:56'!\rresourceTag\r\t^'FORM'! !\r\r!Form methodsFor: 'resources' stamp: 'sd 9/30/2003 13:41'!\rstoreResourceOn: aStream\r\t\"Store a resource representation of the receiver on aStream.\r\tMust be specific to the receiver so that no code is filed out.\"\r\tself hibernate.\r\taStream nextPutAll: self resourceTag asByteArray. \"tag\"\r\taStream nextNumber: 4 put: width.\r\taStream nextNumber: 4 put: height.\r\taStream nextNumber: 4 put: depth.\r\t(bits isMemberOf: ByteArray) ifFalse:[\r\t\t\"must store bitmap\"\r\t\taStream nextNumber: 4 put: 0. \"tag\"\r\t\taStream nextNumber: 4 put: (SmalltalkImage current  isBigEndian ifTrue:[1] ifFalse:[0]).\r\t].\r\taStream nextNumber: 4 put: bits size.\r\taStream nextPutAll: bits.\r! !\r\r\r!Form methodsFor: 'scaling, rotation' stamp: 'ar 5/14/2001 23:33'!\rflipBy: direction centerAt: aPoint\r\t\"Return a copy of the receiver flipped either #vertical or #horizontal.\"\r\t| newForm quad |\r\tnewForm _ self class extent: self extent depth: depth.\r\tquad _ self boundingBox innerCorners.\r\tquad _ (direction = #vertical ifTrue: [#(2 1 4 3)] ifFalse: [#(4 3 2 1)])\r\t\tcollect: [:i | quad at: i].\r\t(WarpBlt current toForm: newForm)\r\t\tsourceForm: self;\r\t\tcolorMap: (self colormapIfNeededFor: newForm);\r\t\tcombinationRule: 3;\r\t\tcopyQuad: quad toRect: newForm boundingBox.\r\tnewForm offset: (self offset flipBy: direction centerAt: aPoint).\r\t^ newForm\r\"\r[Sensor anyButtonPressed] whileFalse:\r\t[((Form fromDisplay: (Sensor cursorPoint extent: 130@66))\r\t\t\tflipBy: #vertical centerAt: 0@0) display]\r\"\r\"Consistency test...\r | f f2 p | [Sensor anyButtonPressed] whileFalse:\r\t[f _ Form fromDisplay: ((p _ Sensor cursorPoint) extent: 31@41).\r\tDisplay fillBlack: (p extent: 31@41).\r\tf2 _ f flipBy: #vertical centerAt: 0@0.\r\t(f2 flipBy: #vertical centerAt: 0@0) displayAt: p]\r\"\r! !\r\r!Form methodsFor: 'scaling, rotation'!\rmagnify: aRectangle by: scale \r\t\"Answer a Form created as a scaling of the receiver.\r\tScale may be a Float, and may be greater or less than 1.0.\"\r\t^ self magnify: aRectangle by: scale smoothing: 1\r\r\"Dynamic test...\r[Sensor anyButtonPressed] whileFalse:\r\t[(Display magnify: (Sensor cursorPoint extent: 31@41) by: 5@3) display]\r\"\r\"Scaling test...\r| f cp | f _ Form fromDisplay: (Rectangle originFromUser: 100@100).\rDisplay restoreAfter: [Sensor waitNoButton.\r[Sensor anyButtonPressed] whileFalse:\r\t[cp _ Sensor cursorPoint.\r\t(f magnify: f boundingBox by: (cp x asFloat@cp y asFloat)/f extent) display]]\r\"\r\"Consistency test...\r | f f2 p | [Sensor anyButtonPressed] whileFalse:\r\t[f _ Form fromDisplay: ((p _ Sensor cursorPoint) extent: 31@41).\r\tDisplay fillBlack: (p extent: 31@41).\r\tf2 _ f magnify: f boundingBox by: 5@3.\r\t(f2 shrink: f2 boundingBox by: 5@3) displayAt: p]\r\"\r! !\r\r!Form methodsFor: 'scaling, rotation' stamp: 'ar 5/14/2001 23:33'!\rmagnify: aRectangle by: scale smoothing: cellSize\r        \"Answer a Form created as a scaling of the receiver.\r        Scale may be a Float, and may be greater or less than 1.0.\"\r        | newForm |\r        newForm _ self blankCopyOf: aRectangle scaledBy: scale.\r        (WarpBlt current toForm: newForm)\r                sourceForm: self;\r                colorMap: (self colormapIfNeededFor: newForm);\r                cellSize: cellSize;  \"installs a new colormap if cellSize > 1\"\r                combinationRule: 3;\r                copyQuad: aRectangle innerCorners toRect: newForm boundingBox.\r        ^ newForm\r\r\"Dynamic test...\r[Sensor anyButtonPressed] whileFalse:\r        [(Display magnify: (Sensor cursorPoint extent: 131@81) by: 0.5 smoothing: 2) display]\r\"\r\"Scaling test...\r| f cp | f _ Form fromDisplay: (Rectangle originFromUser: 100@100).\rDisplay restoreAfter: [Sensor waitNoButton.\r[Sensor anyButtonPressed] whileFalse:\r        [cp _ Sensor cursorPoint.\r        (f magnify: f boundingBox by: (cp x asFloat@cp y asFloat)/f extent smoothing: 2) display]]\r\"! !\r\r!Form methodsFor: 'scaling, rotation' stamp: 'di 8/17/1998 22:17'!\rmagnifyBy: scale \r\t\"Answer a Form created as a scaling of the receiver.\r\tScale may be a Float, and may be greater or less than 1.0.\"\r\r\t^ self magnify: self boundingBox by: scale\r\t\t\tsmoothing: (scale < 1 ifTrue: [2] ifFalse: [1])! !\r\r!Form methodsFor: 'scaling, rotation'!\rrotateBy: deg\r\t\"Rotate the receiver by the indicated number of degrees.\"\r\t\"rot is the destination form, bit enough for any angle.\"\r\r\t^ self rotateBy: deg smoothing: 1\r\"\r | a f |  f _ Form fromDisplay: (0@0 extent: 200@200).  a _ 0.\r[Sensor anyButtonPressed] whileFalse:\r\t[((Form fromDisplay: (Sensor cursorPoint extent: 130@66))\r\t\trotateBy: (a _ a+5)) display].\rf display\r\"! !\r\r!Form methodsFor: 'scaling, rotation' stamp: 'ar 5/14/2001 23:33'!\rrotateBy: direction centerAt: aPoint\r\t\"Return a rotated copy of the receiver. \r\tdirection = #none, #right, #left, or #pi\"\r\t| newForm quad rot |\r\tdirection == #none ifTrue: [^ self].\r\tnewForm _ self class extent: (direction = #pi ifTrue: [width@height]\r\t\t\t\t\t\t\t\t\t\t\tifFalse: [height@width]) depth: depth.\r\tquad _ self boundingBox innerCorners.\r\trot _ #(right pi left) indexOf: direction.\r\t(WarpBlt current toForm: newForm)\r\t\tsourceForm: self;\r\t\tcolorMap: (self colormapIfNeededFor: newForm);\r\t\tcombinationRule: 3;\r\t\tcopyQuad: ((1+rot to: 4+rot) collect: [:i | quad atWrap: i])\r\t\t\t toRect: newForm boundingBox.\r\tnewForm offset: (self offset rotateBy: direction centerAt: aPoint).\r\t^ newForm\r\"\r[Sensor anyButtonPressed] whileFalse:\r\t[((Form fromDisplay: (Sensor cursorPoint extent: 130@66))\r\t\trotateBy: #left centerAt: 0@0) display]\r\"\r\"Consistency test...\r | f f2 p | [Sensor anyButtonPressed] whileFalse:\r\t[f _ Form fromDisplay: ((p _ Sensor cursorPoint) extent: 31@41).\r\tDisplay fillBlack: (p extent: 31@41).\r\tf2 _ f rotateBy: #left centerAt: 0@0.\r\t(f2 rotateBy: #right centerAt: 0@0) displayAt: p]\r\"\r! !\r\r!Form methodsFor: 'scaling, rotation' stamp: 'ar 5/14/2001 23:33'!\rrotateBy: deg magnify: scale smoothing: cellSize\r\t\"Rotate the receiver by the indicated number of degrees and magnify.  \"\r\t\"rot is the destination form, big enough for any angle.\"\r\r\t| side rot warp r1 pts p bigSide |\r\tside _ 1 + ((width*width) + (height*height)) asFloat sqrt asInteger.\r\tbigSide _ (side * scale) rounded.\r\trot _ Form extent: bigSide@bigSide depth: self depth.\r\twarp _ (WarpBlt current toForm: rot)\r\t\tsourceForm: self;\r\t\tcolorMap: (self colormapIfNeededFor: rot);\r\t\tcellSize: cellSize;  \"installs a new colormap if cellSize > 1\"\r\t\tcombinationRule: Form paint.\r\tr1 _ (0@0 extent: side@side) align: (side@side)//2 with: self boundingBox center.\r\r\t\"Rotate the corners of the source rectangle.\" \r\tpts _ r1 innerCorners collect:\r\t\t[:pt | p _ pt - r1 center.\r\t\t(r1 center x asFloat + (p x asFloat*deg degreeCos) + (p y asFloat*deg degreeSin)) @\r\t\t(r1 center y asFloat - (p x asFloat*deg degreeSin) + (p y asFloat*deg degreeCos))].\r\twarp copyQuad: pts toRect: rot boundingBox.\r\t^ rot\r\"\r | a f |  f _ Form fromDisplay: (0@0 extent: 200@200).  a _ 0.\r[Sensor anyButtonPressed] whileFalse:\r\t[((Form fromDisplay: (Sensor cursorPoint extent: 130@66))\r\t\trotateBy: (a _ a+5) magnify: 0.75 smoothing: 2) display].\rf display\r\"! !\r\r!Form methodsFor: 'scaling, rotation' stamp: 'ar 5/14/2001 23:34'!\rrotateBy: deg smoothing: cellSize\r\t\"Rotate the receiver by the indicated number of degrees.\"\r\t\"rot is the destination form, bit enough for any angle.\"\r\t| side rot warp r1 pts p center |\r\tside _ 1 + ((width*width) + (height*height)) asFloat sqrt asInteger.\r\trot _ Form extent: side@side depth: self depth.\r\tcenter _ rot extent // 2.\r\r\t\"Now compute the sin and cos constants for the rotation angle.\" \r\twarp _ (WarpBlt current toForm: rot)\r\t\tsourceForm: self;\r\t\tcolorMap: (self colormapIfNeededFor: rot);\r\t\tcellSize: cellSize;  \"installs a new colormap if cellSize > 1\"\r\t\tcombinationRule: Form over.\r\tr1 _ rot boundingBox align: center with: self boundingBox center.\r\r\tpts _ r1 innerCorners collect:\r\t\t[:pt | p _ pt - r1 center.\r\t\t(r1 center x asFloat + (p x asFloat*deg degreeCos) + (p y asFloat*deg degreeSin)) @\r\t\t(r1 center y asFloat - (p x asFloat*deg degreeSin) + (p y asFloat*deg degreeCos))].\r\twarp copyQuad: pts toRect: rot boundingBox.\r\t^ rot\r\"\r | a f |  f _ Form fromDisplay: (0@0 extent: 200@200).  a _ 0.\r[Sensor anyButtonPressed] whileFalse:\r\t[((Form fromDisplay: (Sensor cursorPoint extent: 130@66))\r\t\trotateBy: (a _ a+5) smoothing: 2) display].\rf display\r\"! !\r\r!Form methodsFor: 'scaling, rotation' stamp: 'RAA 7/13/2000 12:09'!\rscaledToSize: newExtent\r\r\t| scale |\r\r\tnewExtent = self extent ifTrue: [^self].\r\tscale _ newExtent x / self width min: newExtent y / self height.\r\t^self magnify: self boundingBox by: scale smoothing: 2.\r! !\r\r!Form methodsFor: 'scaling, rotation'!\rshrink: aRectangle by: scale \r\t| scalePt |\r\tscalePt _ scale asPoint.\r\t^ self magnify: aRectangle by: (1.0 / scalePt x asFloat) @ (1.0 / scalePt y asFloat)! !\r\r\r!Form methodsFor: 'testing' stamp: 'RAA 1/19/2001 15:04'!\rappearsToBeSameCostumeAs: anotherForm\r\r\t(anotherForm isKindOf: self class) ifFalse: [^false].\r\tanotherForm depth = self depth ifFalse: [^false].\r\t^anotherForm bits = bits\r! !\r\r!Form methodsFor: 'testing' stamp: 'ar 5/15/2001 16:14'!\rhasNonStandardPalette\r\t\"Return true if the receiver has a non-standard palette.\r\tNon-standard means that RGBA components may be located\r\tat positions differing from the standard Squeak RGBA layout\r\tat the receiver's depth.\"\r\t^false! !\r\r!Form methodsFor: 'testing' stamp: 'di 3/2/98 12:42'!\risAllWhite\r\t\"Answer whether all bits in the receiver are white (=0).\"\r\r\tself unhibernate.\r\t1 to: bits size do: [:i | (bits at: i) = 0 ifFalse: [^ false]].\r\t^ true! !\r\r!Form methodsFor: 'testing' stamp: 'ar 5/17/2001 15:46'!\risBigEndian\r\t\"Return true if the receiver contains big endian pixels, meaning the left-most pixel is stored in the most significant bits of a word.\"\r\t^depth > 0! !\r\r!Form methodsFor: 'testing' stamp: 'ar 5/28/2000 14:58'!\risBltAccelerated: ruleInteger for: sourceForm\r\t\"Return true if the receiver can perform accelerated blts operations by itself\"\r\t^false! !\r\r!Form methodsFor: 'testing' stamp: 'ar 5/28/2000 15:04'!\risDisplayScreen\r\t^false! !\r\r!Form methodsFor: 'testing' stamp: 'ar 5/27/2000 16:54'!\risExternalForm\r\t^false! !\r\r!Form methodsFor: 'testing' stamp: 'ar 5/28/2000 14:58'!\risFillAccelerated: ruleInteger for: aColor\r\t\"Return true if the receiver can perform accelerated fill operations by itself\"\r\t^false! !\r\r!Form methodsFor: 'testing' stamp: 'ar 10/30/2000 23:23'!\risForm\r\t^true! !\r\r!Form methodsFor: 'testing' stamp: 'ar 5/17/2001 15:47'!\risLittleEndian\r\t\"Return true if the receiver contains little endian pixels, meaning the left-most pixel is stored in the least significant bits of a word.\"\r\t^depth < 0! !\r\r!Form methodsFor: 'testing' stamp: 'RAA 8/14/2000 10:00'!\risStatic\r\r\t^false! !\r\r!Form methodsFor: 'testing' stamp: 'ar 2/10/2004 17:18'!\risTranslucent\r\t\"Answer whether this form may be translucent\"\r\t^self depth = 32! !\r\r!Form methodsFor: 'testing' stamp: 'ar 5/28/2000 14:58'!\rshouldPreserveContents\r\t\"Return true if the receiver should preserve it's contents when flagged to be clean. Most forms can not be trivially restored by some drawing operation but some may.\"\r\t^true! !\r\r\r!Form methodsFor: 'transitions' stamp: 'jm 5/21/1998 23:46'!\rfadeImage: otherImage at: topLeft\r\tindexAndMaskDo: indexAndMaskBlock\r\t\"This fade uses halftones as a blending hack.\r\tZeros in the halftone produce the original image (self), and \r\tones in the halftone produce the 'otherImage'.\r\tIndexAndMaskBlock gets evaluated prior to each cycle,\r\tand the resulting boolean determines whether to continue cycling.\"\r\t| index imageRect maskForm resultForm |\r\timageRect _ otherImage boundingBox.\r\tresultForm _ self copy: (topLeft extent: imageRect extent).\r\tmaskForm _ Form extent: 32@32.\r\tindex _ 0.\r\t[indexAndMaskBlock value: (index _ index+1) value: maskForm]\r\twhileTrue:\r\t\t[maskForm reverse.\r\t\tresultForm copyBits: imageRect from: resultForm at: 0@0\r\t\t\tclippingBox: imageRect rule: Form over fillColor: maskForm.\r\t\tmaskForm reverse.\r\t\tresultForm copyBits: imageRect from: otherImage at: 0@0\r\t\t\tclippingBox: imageRect rule: Form under fillColor: maskForm.\r\t\tself copyBits: imageRect from: resultForm at: topLeft\r\t\t\t\tclippingBox: self boundingBox rule: Form over fillColor: nil.\r\t\tDisplay forceDisplayUpdate]! !\r\r!Form methodsFor: 'transitions' stamp: 'ar 5/17/2001 15:42'!\rfadeImageCoarse: otherImage at: topLeft\r\t\"Display fadeImageCoarse: (Form fromDisplay: (40@40 extent: 300@300)) reverse at: 40@40\"\r\t| pix j d |\r\td _ self depth.\r\t^ self fadeImage: otherImage at: topLeft indexAndMaskDo:\r\t\t[:i :mask |\r\t\ti=1 ifTrue: [pix _ (1 bitShift: d) - 1.\r\t\t\t\t\t1 to: 8//d-1 do: [:q | pix _ pix bitOr: (pix bitShift: d*4)]].\r\t\ti <= 16 ifTrue:\r\t\t[j _ i-1//4+1.\r\t\t(0 to: 28 by: 4) do: [:k |\r\t\t\tmask bits at: j+k\r\t\t\t\tput: ((mask bits at: j+k) bitOr: (pix bitShift: i-1\\\\4*d))].\r\t\t\"mask display.\" true]\r\t\tifFalse: [false]]! !\r\r!Form methodsFor: 'transitions' stamp: 'ar 5/17/2001 15:41'!\rfadeImageFine: otherImage at: topLeft\r\t\"Display fadeImageFine: (Form fromDisplay: (40@40 extent: 300@300)) reverse at: 40@40\"\r\t| pix j ii d |\r\td _ self depth.\r\t^ self fadeImage: otherImage at: topLeft indexAndMaskDo:\r\t\t[:i :mask |\r\t\ti=1 ifTrue: [pix _ (1 bitShift: d) - 1.\r\t\t\t\t\t1 to: 8//d-1 do:\r\t\t\t\t\t\t[:q | pix _ pix bitOr: (pix bitShift: d*4)]].\r\t\ti <= 16 ifTrue:\r\t\t[ii _ #(0 10 2 8 7 13 5 15 1 11 3 9 6 12 4 14) at: i.\r\t\tj _ ii//4+1.\r\t\t(0 to: 28 by: 4) do:\r\t\t\t[:k | mask bits at: j+k put:\r\t\t\t\t((mask bits at: j+k) bitOr: (pix bitShift: ii\\\\4*d))].\r\t\ttrue]\r\t\tifFalse: [false]]! !\r\r!Form methodsFor: 'transitions'!\rfadeImageHor: otherImage at: topLeft\r\t\"Display fadeImageHor: (Form fromDisplay: (10@10 extent: 300@300)) reverse at: 10@10\"\r\t^ self fadeImage: otherImage at: topLeft indexAndMaskDo:\r\t\t[:i :mask |\r\t\tmask fill: (0@(mask height//2-i) extent: mask width@(i*2)) fillColor: Color black.\r\t\t(i*2) <= mask width]! !\r\r!Form methodsFor: 'transitions'!\rfadeImageHorFine: otherImage at: topLeft\r\t\"Display fadeImageHorFine: (Form fromDisplay: (10@10 extent: 300@300)) reverse at: 10@10\"\r\t^ self fadeImage: otherImage at: topLeft indexAndMaskDo:\r\t\t[:i :mask |\r\t\tmask fill: (0@(i-1) extent: mask width@1) fillColor: Color black.\r\t\tmask fill: (0@(i-1+16) extent: mask width@1) fillColor: Color black.\r\t\t(i*2) <= mask width]! !\r\r!Form methodsFor: 'transitions'!\rfadeImageSquares: otherImage at: topLeft \r\t\"Display fadeImageSquares: (Form fromDisplay: (40@40 extent: 300@300)) reverse at: 40@40\"\r\t^ self fadeImage: otherImage at: topLeft indexAndMaskDo:\r\t\t[:i :mask |\r\t\tmask fill: ((16-i) asPoint extent: (i*2) asPoint) fillColor: Color black.\r\t\ti <= 16]! !\r\r!Form methodsFor: 'transitions' stamp: 'ar 5/17/2001 15:39'!\rfadeImageVert: otherImage at: topLeft\r\t\"Display fadeImageVert: (Form fromDisplay: (10@10 extent: 300@300)) reverse at: 10@10\"\r\t| d |\r\td _ self depth.\r\t^ self fadeImage: otherImage at: topLeft indexAndMaskDo:\r\t\t[:i :mask |\r\t\tmask fill: ((mask width//2//d-i*d)@0 extent: i*2*d@mask height) fillColor: Color black.\r\t\ti <= (mask width//d)]! !\r\r!Form methodsFor: 'transitions' stamp: 'jm 6/1/1998 10:55'!\rpageImage: otherImage at: topLeft corner: corner\r\t\"Produce a page-turning illusion that gradually reveals otherImage\r\tlocated at topLeft in this form.  Corner specifies which corner, as\r\t\t1=topLeft, 2=topRight, 3=bottomRight, 4=bottomLeft.\"\r\t| bb maskForm resultForm delta maskLoc maskRect stepSize cornerSel smallRect |\r\tstepSize _ 10.\r\tbb _ otherImage boundingBox.\r\tresultForm _ self copy: (topLeft extent: bb extent).\r\tmaskForm _ Form extent: ((otherImage width min: otherImage height) + stepSize) asPoint.\r\r\t\"maskLoc _ starting loc rel to topLeft\"\r\totherImage width > otherImage height\r\t\tifTrue: [\"wide image; motion is horizontal.\"\r\t\t\t\t(corner between: 2 and: 3) not ifTrue:\r\t\t\t\t\t[\"motion is to the right\"\r\t\t\t\t\tdelta _ 1@0.\r\t\t\t\t\tmaskLoc _ bb topLeft - (corner = 1\r\t\t\t\t\t\tifTrue: [maskForm width@0]\r\t\t\t\t\t\tifFalse: [maskForm width@stepSize])]\r\t\t\t\t\tifFalse:\r\t\t\t\t\t[\"motion is to the left\"\r\t\t\t\t\tdelta _ -1@0.\r\t\t\t\t\tmaskLoc _ bb topRight - (corner = 2\r\t\t\t\t\t\tifTrue: [0@0]\r\t\t\t\t\t\tifFalse: [0@stepSize])]]\r\t\tifFalse: [\"tall image; motion is vertical.\"\r\t\t\t\tcorner <= 2 ifTrue:\r\t\t\t\t\t[\"motion is downward\"\r\t\t\t\t\tdelta _ 0@1.\r\t\t\t\t\tmaskLoc _ bb topLeft - (corner = 1\r\t\t\t\t\t\tifTrue: [0@maskForm height]\r\t\t\t\t\t\tifFalse: [stepSize@maskForm height])]\r\t\t\t\t\tifFalse:\r\t\t\t\t\t[\"motion is upward\"\r\t\t\t\t\tdelta _ 0@-1.\r\t\t\t\t\tmaskLoc _ bb bottomLeft - (corner = 3\r\t\t\t\t\t\tifTrue: [stepSize@0]\r\t\t\t\t\t\tifFalse: [0@0])]].\r\r\t\"Build a solid triangle in the mask form\"\r\t(Pen newOnForm: maskForm) in: [:p |\r\t\tcorner even  \"Draw 45-degree line\"\r\t\t\tifTrue: [p place: 0@0; turn: 135; go: maskForm width*3//2]\r\t\t\tifFalse: [p place: 0@(maskForm height-1); turn: 45; go: maskForm width*3//2]].\r\tmaskForm smear: delta negated distance: maskForm width.\r\t\"Copy the mask to full resolution for speed.  Make it be the reversed\r\tso that it can be used for ORing in the page-corner color\"\r\tmaskForm _ (Form extent: maskForm extent depth: otherImage depth)\r\t\tcopyBits: maskForm boundingBox from: maskForm at: 0@0\r\t\tcolorMap: (Bitmap with: 16rFFFFFFFF with: 0).\r\r\t\"Now move the triangle maskForm across the resultForm selecting the\r\ttriangular part of otherImage to display, and across the resultForm,\r\tselecting the part of the original image to erase.\"\r\tcornerSel _ #(topLeft topRight bottomRight bottomLeft) at: corner.\r\t1 to: (otherImage width + otherImage height // stepSize)+1 do:\r\t\t[:i |\t\t\"Determine the affected square\"\r\t\tmaskRect _ (maskLoc extent: maskForm extent) intersect: bb.\r\t\t((maskLoc x*delta x) + (maskLoc y*delta y)) < 0 ifTrue:\r\t\t\t[smallRect _ 0@0 extent: (maskRect width min: maskRect height) asPoint.\r\t\t\tmaskRect _ smallRect align: (smallRect perform: cornerSel)\r\t\t\t\t\t\t\t\twith: (maskRect perform: cornerSel)].\r\r\t\t\"AND otherForm with triangle mask, and OR into result\"\r\t\tresultForm copyBits: bb from: otherImage at: 0@0\r\t\t\t\tclippingBox: maskRect rule: Form over fillColor: nil.\r\t\tresultForm copyBits: maskForm boundingBox from: maskForm at: maskLoc\r\t\t\t\tclippingBox: maskRect rule: Form erase fillColor: nil.\r\t\tresultForm copyBits: maskForm boundingBox from: maskForm at: maskLoc\r\t\t\t\tclippingBox: maskRect rule: Form under fillColor: Color lightBrown.\r\r\t\t\"Now update Display in a single BLT.\"\r\t\tself copyBits: maskRect from: resultForm at: topLeft + maskRect topLeft\r\t\t\t\tclippingBox: self boundingBox rule: Form over fillColor: nil.\r\t\tDisplay forceDisplayUpdate.\r\t\tmaskLoc _ maskLoc + (delta*stepSize)]\r\"\r1 to: 4 do: [:corner | Display pageImage:\r\t\t\t\t(Form fromDisplay: (10@10 extent: 200@300)) reverse\r\t\t\tat: 10@10 corner: corner]\r\"\r! !\r\r!Form methodsFor: 'transitions' stamp: 'ar 5/28/2000 12:12'!\rpageWarp: otherImage at: topLeft forward: forward\r\t\"Produce a page-turning illusion that gradually reveals otherImage\r\tlocated at topLeft in this form.\r\tforward == true means turn pages toward you, else away. [ignored for now]\"\r\t| pageRect oldPage nSteps buffer p leafRect sourceQuad warp oldBottom d |\r\tpageRect _ otherImage boundingBox.\r\toldPage _ self copy: (pageRect translateBy: topLeft).\r\t(forward ifTrue: [oldPage] ifFalse: [otherImage])\r\t\tborder: pageRect\r\t\twidthRectangle: (Rectangle\r\t\t\t\tleft: 0\r\t\t\t\tright: 2\r\t\t\t\ttop: 1\r\t\t\t\tbottom: 1)\r\t\trule: Form over\r\t\tfillColor: Color black.\r\toldBottom _ self copy: ((pageRect bottomLeft + topLeft) extent: (pageRect width@(pageRect height//4))).\r\tnSteps _ 8.\r\tbuffer _ Form extent: otherImage extent + (0@(pageRect height//4)) depth: self depth.\r\td _ pageRect topLeft + (0@(pageRect height//4)) - pageRect topRight.\r\t1 to: nSteps-1 do:\r\t\t[:i | forward\r\t\t\tifTrue: [buffer copy: pageRect from: otherImage to: 0@0 rule: Form over.\r\t\t\t\t\tp _ pageRect topRight + (d * i // nSteps)]\r\t\t\tifFalse: [buffer copy: pageRect from: oldPage to: 0@0 rule: Form over.\r\t\t\t\t\tp _ pageRect topRight + (d * (nSteps-i) // nSteps)].\r\t\tbuffer copy: oldBottom boundingBox from: oldBottom to: pageRect bottomLeft rule: Form over.\r\t\tleafRect _ pageRect topLeft corner: p x @ (pageRect bottom + p y).\r\t\tsourceQuad _ Array with: pageRect topLeft\r\t\t\twith: pageRect bottomLeft + (0@p y)\r\t\t\twith: pageRect bottomRight\r\t\t\twith: pageRect topRight - (0@p y).\r\t\twarp _ (WarpBlt current toForm: buffer)\r\t\t\t\tclipRect: leafRect;\r\t\t\t\tsourceForm: (forward ifTrue: [oldPage] ifFalse: [otherImage]);\r\t\t\t\tcombinationRule: Form paint.\r\t\twarp copyQuad: sourceQuad toRect: leafRect.\r\t\tself copy: buffer boundingBox from: buffer to: topLeft rule: Form over.\r\t\tDisplay forceDisplayUpdate].\r\r\tbuffer copy: pageRect from: otherImage to: 0@0 rule: Form over.\r\tbuffer copy: oldBottom boundingBox from: oldBottom to: pageRect bottomLeft rule: Form over.\r\tself copy: buffer boundingBox from: buffer to: topLeft rule: Form over.\r\tDisplay forceDisplayUpdate.\r\"\r1 to: 4 do: [:corner | Display pageWarp:\r\t\t\t\t(Form fromDisplay: (10@10 extent: 200@300)) reverse\r\t\t\tat: 10@10 forward: false]\r\"\r! !\r\r!Form methodsFor: 'transitions' stamp: 'jm 5/21/1998 23:46'!\rslideImage: otherImage at: topLeft delta: delta\r\t\"Display slideImage: (Form fromDisplay: (40@40 extent: 300@300)) reverse\r\t\tat: 40@40 delta: 3@-4\"\r\t| bb nSteps clipRect |\r\tbb _ otherImage boundingBox.\r\tclipRect _ topLeft extent: otherImage extent.\r\tnSteps _ 1.\r\tdelta x = 0 ifFalse: [nSteps _ nSteps max: (bb width//delta x abs) + 1].\r\tdelta y = 0 ifFalse: [nSteps _ nSteps max: (bb height//delta y abs) + 1].\r\t1 to: nSteps do:\r\t\t\t[:i | self copyBits: bb from: otherImage\r\t\t\t\tat: delta*(i-nSteps) + topLeft\r\t\t\t\tclippingBox: clipRect rule: Form paint fillColor: nil.\r\t\t\tDisplay forceDisplayUpdate]! !\r\r!Form methodsFor: 'transitions' stamp: 'jm 6/18/1998 12:57'!\rwipeImage: otherImage at: topLeft clippingBox: clipBox rectForIndex: rectForIndexBlock\r\r\t| i clipRect t rectOrList waitTime |\r\ti _ 0.\r\tclipRect _ topLeft extent: otherImage extent.\r\tclipBox ifNotNil: [clipRect _ clipRect intersect: clipBox].\r\t[rectOrList _ rectForIndexBlock value: (i _ i + 1).\r\t rectOrList == nil]\r\t\twhileFalse: [\r\t\t\tt _ Time millisecondClockValue.\r\t\t\trectOrList asOrderedCollection do: [:r |\r\t\t\t\tself copyBits: r from: otherImage at: topLeft + r topLeft\r\t\t\t\t\tclippingBox: clipRect rule: Form over fillColor: nil].\r\t\t\tDisplay forceDisplayUpdate.\r\t\t\twaitTime _ 3 - (Time millisecondClockValue - t).\r\t\t\twaitTime > 0 ifTrue:\r\t\t\t\t[\"(Delay forMilliseconds: waitTime) wait\"]].\r! !\r\r!Form methodsFor: 'transitions' stamp: 'jm 10/16/97 15:21'!\rwipeImage: otherImage at: topLeft delta: delta\r\t\"Display wipeImage: (Form fromDisplay: (40@40 extent: 300@300)) reverse\r\t\tat: 40@40 delta: 0@-2\"\r\r\tself wipeImage: otherImage at: topLeft delta: delta clippingBox: nil.\r! !\r\r!Form methodsFor: 'transitions' stamp: 'jm 10/16/97 15:17'!\rwipeImage: otherImage at: topLeft delta: delta clippingBox: clipBox\r\r\t| wipeRect bb nSteps |\r\tbb _ otherImage boundingBox.\r\twipeRect _ delta x = 0\r\t\tifTrue:\r\t\t[delta y = 0 ifTrue: [nSteps _ 1. bb \"allow 0@0\"] ifFalse: [\r\t\tnSteps _ bb height//delta y abs + 1.  \"Vertical movement\"\r\t\tdelta y > 0\r\t\t\tifTrue: [bb topLeft extent: bb width@delta y]\r\t\t\tifFalse: [bb bottomLeft+delta extent: bb width@delta y negated]]]\r\t\tifFalse:\r\t\t[nSteps _ bb width//delta x abs + 1.  \"Horizontal movement\"\r\t\tdelta x > 0\r\t\t\tifTrue: [bb topLeft extent: delta x@bb height]\r\t\t\tifFalse: [bb topRight+delta extent: delta x negated@bb height]].\r\t^ self wipeImage: otherImage at: topLeft clippingBox: clipBox rectForIndex:\r\t\t[:i | i <= nSteps\r\t\t\tifTrue: [wipeRect translateBy: (delta* (i-1))]\r\t\t\tifFalse: [nil]]! !\r\r!Form methodsFor: 'transitions' stamp: 'di 1/28/1999 09:20'!\rzoomIn: goingIn orOutTo: otherImage at: topLeft vanishingPoint: vp \r\t\"Display zoomInTo: (Form fromDisplay: (40@40 extent: 300@300)) reverse at: 40@40.\r\tDisplay zoomOutTo: (Form fromDisplay: (40@40 extent: 300@300)) reverse at: 40@40.\"\r\t| nSteps j bigR lilR minTime startTime lead |\r\tnSteps _ 16.\r\tminTime _ 500.  \"milliseconds\"\r\tstartTime _ Time millisecondClockValue.\r\t^ self wipeImage: otherImage at: topLeft clippingBox: nil rectForIndex:\r\t\t[:i | \"i runs from 1 to nsteps\"\r\t\ti > nSteps\r\t\t\tifTrue: [nil \"indicates all done\"]\r\t\t\tifFalse:\r\t\t\t[\"If we are going too fast, delay for a bit\"\r\t\t\tlead _ startTime + (i-1*minTime//nSteps) - Time millisecondClockValue.\r\t\t\tlead > 10 ifTrue: [(Delay forMilliseconds: lead) wait].\r\r\t\t\t\"Return an array with the difference rectangles for this step.\"\r\t\t\tj _ goingIn ifTrue: [i] ifFalse: [nSteps+1-i].\r\t\t\tbigR _ vp - (vp*(j)//nSteps) corner:\r\t\t\t\tvp + (otherImage extent-vp*(j)//nSteps).\r\t\t\tlilR _ vp - (vp*(j-1)//nSteps) corner:\r\t\t\t\tvp + (otherImage extent-vp*(j-1)//nSteps).\r\t\t\tbigR areasOutside: lilR]]! !\r\r!Form methodsFor: 'transitions' stamp: 'di 3/2/98 09:14'!\rzoomInTo: otherImage at: topLeft\r\t\"Display zoomInTo: (Form fromDisplay: (40@40 extent: 300@300)) reverse at: 40@40\"\r\t^ self zoomIn: true orOutTo: otherImage at: topLeft\r\t\tvanishingPoint: otherImage extent//2+topLeft! !\r\r!Form methodsFor: 'transitions' stamp: 'di 3/2/98 09:15'!\rzoomOutTo: otherImage at: topLeft\r\t\"Display zoomOutTo: (Form fromDisplay: (40@40 extent: 300@300)) reverse at: 40@40\"\r\t^ self zoomIn: false orOutTo: otherImage at: topLeft\r\t\tvanishingPoint: otherImage extent//2+topLeft! !\r\r\r!Form methodsFor: 'private' stamp: 'tk 3/13/2000 15:21'!\rhackBits: bitThing\r\t\"This method provides an initialization so that BitBlt may be used, eg, to \r\tcopy ByteArrays and other non-pointer objects efficiently.\r\tThe resulting form looks 4 wide, 8 deep, and bitThing-size-in-words high.\"\r\twidth _ 4.\r\tdepth _ 8.\r\tbitThing class isBits ifFalse: [self error: 'bitThing must be a non-pointer object'].\r\tbitThing class isBytes\r\t\tifTrue: [height _ bitThing basicSize // 4]\r\t\tifFalse: [height _ bitThing basicSize].\r\tbits _ bitThing! !\r\r!Form methodsFor: 'private'!\rinitFromArray: array\r\t\"Fill the bitmap from array.  If the array is shorter,\r\tthen cycle around in its contents until the bitmap is filled.\"\r\t| ax aSize array32 i j word16 |\r\tax _ 0.\r\taSize _ array size.\r\taSize > bits size ifTrue:\r\t\t[\"backward compatibility with old 16-bit bitmaps and their forms\"\r\t\tarray32 _ Array new: height * (width + 31 // 32).\r\t\ti _ j _ 0.\r\t\t1 to: height do:\r\t\t\t[:y | 1 to: width+15//16 do:\r\t\t\t\t[:x16 | word16 _ array at: (i _ i + 1).\r\t\t\t\tx16 odd ifTrue: [array32 at: (j _ j+1) put: (word16 bitShift: 16)]\r\t\t\t\t\t\tifFalse: [array32 at: j put: ((array32 at: j) bitOr: word16)]]].\r\t\t^ self initFromArray: array32].\r\t1 to: bits size do:\r\t\t[:index |\r\t\t(ax _ ax + 1) > aSize ifTrue: [ax _ 1].\r\t\tbits at: index put: (array at: ax)]! !\r\r!Form methodsFor: 'private' stamp: 'ar 12/19/2000 16:23'!\rprivateFloodFillValue: aColor\r\t\"Private. Compute the pixel value in the receiver's depth but take into account implicit color conversions by BitBlt.\"\r\t| f1 f2 bb |\r\tf1 _ Form extent: 1@1 depth: depth.\r\tf2 _ Form extent: 1@1 depth: 32.\r\tbb _ BitBlt toForm: f1.\r\tbb fillColor: aColor; \r\t\tdestRect: (0@0 corner: 1@1); \r\t\tcombinationRule: 3; \r\t\tcopyBits.\r\tbb _ BitBlt toForm: f2.\r\tbb sourceForm: f1; \r\t\tsourceOrigin: 0@0;\r\t\tdestRect: (0@0 corner: 1@1);\r\t\tcombinationRule: 3;\r\t\tcopyBits.\r\t^f2 pixelValueAt: 0@0.! !\r\r!Form methodsFor: 'private' stamp: '6/9/97 16:10 di'!\rsetExtent: extent depth: bitsPerPixel\r\t\"Create a virtual bit map with the given extent and bitsPerPixel.\"\r\r\twidth _ extent x asInteger.\r\twidth < 0 ifTrue: [width _ 0].\r\theight _ extent y asInteger.\r\theight < 0 ifTrue: [height _ 0].\r\tdepth _ bitsPerPixel.\r\tbits _ Bitmap new: self bitsSize! !\r\r!Form methodsFor: 'private' stamp: 'ar 5/28/2000 15:49'!\rsetExtent: extent depth: bitsPerPixel bits: bitmap\r\t\"Create a virtual bit map with the given extent and bitsPerPixel.\"\r\r\twidth _ extent x asInteger.\r\twidth < 0 ifTrue: [width _ 0].\r\theight _ extent y asInteger.\r\theight < 0 ifTrue: [height _ 0].\r\tdepth _ bitsPerPixel.\r\t(bits isNil or:[self bitsSize = bitmap size]) ifFalse:[^self error:'Bad dimensions'].\r\tbits _ bitmap! !\r\r!Form methodsFor: 'private' stamp: 'ar 10/30/2000 23:22'!\rsetResourceBits: aForm\r\t\"Private. Really. Used for setting the 'resource bits' when externalizing some form\"\r\tbits _ aForm.! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rForm class\r\tinstanceVariableNames: ''!\r\r!Form class methodsFor: 'instance creation' stamp: 'ar 5/28/2000 12:07'!\rdotOfSize: diameter\r\t\"Create a form which contains a round black dot.\"\r\t| radius form bb rect centerX centerY centerYBias centerXBias radiusSquared xOverY maxy dx |\r\tradius _ diameter//2.\r\tform _ self extent: diameter@diameter offset: (0@0) - (radius@radius).\t\r\tbb _ (BitBlt current toForm: form)\r\t\tsourceX: 0; sourceY: 0;\r\t\tcombinationRule: Form over;\r\t\tfillColor: Color black.\r\trect _ form boundingBox.\r\tcenterX _ rect center x.\r\tcenterY _ rect center y.\r\tcenterYBias _ rect height odd ifTrue: [0] ifFalse: [1].\r\tcenterXBias _ rect width odd ifTrue: [0] ifFalse: [1].\r\tradiusSquared _ (rect height asFloat / 2.0) squared - 0.01.\r\txOverY _ rect width asFloat / rect height asFloat.\r\tmaxy _ rect height - 1 // 2.\r\r\t\"First do the inner fill, and collect x values\"\r\t0 to: maxy do:\r\t\t[:dy |\r\t\tdx _ ((radiusSquared - (dy * dy) asFloat) sqrt * xOverY) truncated.\r\t\tbb\tdestX: centerX - centerXBias - dx\r\t\t\tdestY: centerY - centerYBias - dy\r\t\t\twidth: dx + dx + centerXBias + 1\r\t\t\theight: 1;\r\t\t\tcopyBits.\r\t\tbb\tdestY: centerY + dy;\r\t\t\tcopyBits].\r\t^ form\r\"\rTime millisecondsToRun:\r\t[1 to: 20 do: [:i | (Form dotOfSize: i) displayAt: (i*20)@(i*20)]]\r\"! !\r\r!Form class methodsFor: 'instance creation' stamp: 'jm 3/27/98 16:27'!\rextent: extentPoint\r\t\"Answer an instance of me with a blank bitmap of depth 1.\"\r\r\t^ self extent: extentPoint depth: 1\r! !\r\r!Form class methodsFor: 'instance creation' stamp: 'jm 3/27/98 16:36'!\rextent: extentPoint depth: bitsPerPixel\r\t\"Answer an instance of me with blank bitmap of the given dimensions and depth.\"\r\r\t^ self basicNew setExtent: extentPoint depth: bitsPerPixel\r! !\r\r!Form class methodsFor: 'instance creation' stamp: 'ar 10/9/1998 23:44'!\rextent: extentPoint depth: bitsPerPixel bits: aBitmap\r\t\"Answer an instance of me with blank bitmap of the given dimensions and depth.\"\r\r\t^ self basicNew setExtent: extentPoint depth: bitsPerPixel bits: aBitmap! !\r\r!Form class methodsFor: 'instance creation' stamp: 'jm 3/27/98 16:35'!\rextent: extentPoint depth: bitsPerPixel fromArray: anArray offset: offsetPoint \r\t\"Answer an instance of me with a pixmap of the given depth initialized from anArray.\"\r\r\t^ (self extent: extentPoint depth: bitsPerPixel)\r\t\toffset: offsetPoint;\r\t\tinitFromArray: anArray\r! !\r\r!Form class methodsFor: 'instance creation' stamp: 'jm 3/27/98 16:33'!\rextent: extentPoint fromArray: anArray offset: offsetPoint \r\t\"Answer an instance of me of depth 1 with bitmap initialized from anArray.\"\r\r\t^ (self extent: extentPoint depth: 1)\r\t\toffset: offsetPoint;\r\t\tinitFromArray: anArray\r! !\r\r!Form class methodsFor: 'instance creation' stamp: 'jm 3/27/98 16:28'!\rextent: extentPoint fromStipple: fourNibbles\r\t\"Answer an instance of me with bitmap initialized from\r\ta repeating 4x4 bit stipple encoded in a 16-bit constant.\"\r\t| nibble |\r\t^ (self extent: extentPoint depth: 1)\r\t\tinitFromArray: ((1 to: 4) collect:\r\t\t\t\t[:i | nibble _ (fourNibbles bitShift: -4*(4-i)) bitAnd: 16rF.\r\t\t\t\t16r11111111 * nibble])  \"fill 32 bits with each 4-bit nibble\"\r! !\r\r!Form class methodsFor: 'instance creation' stamp: 'jm 3/27/98 16:26'!\rextent: extentPoint offset: offsetPoint \r\t\"Answer an instance of me with a blank bitmap of depth 1.\"\r\r\t^ (self extent: extentPoint depth: 1) offset: offsetPoint\r! !\r\r!Form class methodsFor: 'instance creation' stamp: 'BG 11/11/2003 14:19'!\rfromBinaryStream: aBinaryStream\r\t\"Read a Form or ColorForm from given file, using the first byte of the file to guess its format. Currently handles: GIF, uncompressed BMP, and both old and new DisplayObject writeOn: formats, JPEG, and PCX. Return nil if the file could not be read or was of an unrecognized format.\"\r\r\t| firstByte |\r\taBinaryStream binary.\r\tfirstByte _ aBinaryStream next.\r\tfirstByte = 1 ifTrue: [\r\t\t\"old Squeakform format\"\r\t\t^ self new readFromOldFormat: aBinaryStream].\r\tfirstByte = 2 ifTrue: [\r\t\t\"new Squeak form format\"\r\t\t^ self new readFrom: aBinaryStream].\r\r\t\"Try for JPG, GIF, or PCX...\"\r\t\"Note: The following call closes the stream.\"\r  self halt.\r\"\t^ ImageReadWriter formFromStream: aBinaryStream \"\r! !\r\r!Form class methodsFor: 'instance creation'!\rfromDisplay: aRectangle \r\t\"Answer an instance of me with bitmap initialized from the area of the \r\tdisplay screen defined by aRectangle.\"\r\r\t^ (self extent: aRectangle extent depth: Display depth)\r\t\tfromDisplay: aRectangle! !\r\r!Form class methodsFor: 'instance creation'!\rfromDisplay: aRectangle using: oldForm\r\t\"Like fromDisplay: only if oldForm is the right size, copy into it and answer it instead.\"\r\r\t((oldForm ~~ nil) and: [oldForm extent = aRectangle extent])\r\t\tifTrue:\r\t\t\t[oldForm fromDisplay: aRectangle.\r\t\t\t ^ oldForm]\r\t\tifFalse:\r\t\t\t[^ self fromDisplay: aRectangle]! !\r\r!Form class methodsFor: 'instance creation' stamp: 'BG 10/28/2003 20:58'!\rfromFileNamed: fileName\r\t\"Read a Form or ColorForm from the given file.\"\r\r\t| file form |\r\tfile _ (FileStream readOnlyFileNamed: fileName) binary.\r\tform _ self fromBinaryStream: file.\r\t\r\tfile close.\r\t^ form\r! !\r\r!Form class methodsFor: 'instance creation'!\rfromUser\r\t\"Answer an instance of me with bitmap initialized from the area of the \r\tdisplay screen designated by the user. The grid for selecting an area is \r\t1@1.\"\r\r\t^self fromUser: 1 @ 1! !\r\r!Form class methodsFor: 'instance creation'!\rfromUser: aPoint \r\t\"Answer an instance of me with bitmap initialized from the area of the \r\tdisplay screen designated by the user. The grid for selecting an area is \r\taPoint.\"\r\r\t^ self fromDisplay: (Rectangle fromUser: aPoint)! !\r\r!Form class methodsFor: 'instance creation' stamp: 'jm 12/5/97 19:32'!\rfromUserWithExtent: anExtent\r\t\"Answer an instance of me with bitmap initialized from the area of the \r\tdisplay screen whose origin is designated by the user and whose size is anExtent\"\r\r\t^ self fromDisplay: (Rectangle originFromUser: anExtent)\r\r\"(Form fromUserWithExtent: 50@50) displayAt: 10@10\"! !\r\r\r!Form class methodsFor: 'mode constants'!\rand\r\t\"Answer the integer denoting the logical 'and' combination rule.\"\r\r\t^1! !\r\r!Form class methodsFor: 'mode constants'!\rblend\r\t\"Answer the integer denoting BitBlt's alpha blend combination rule.\"\r\t^24! !\r\r!Form class methodsFor: 'mode constants' stamp: 'di 12/31/1998 14:02'!\rblendAlpha\r\t\"Answer the integer denoting BitBlt's blend-with-constant-alpha rule.\"\r\r\t^ 30! !\r\r!Form class methodsFor: 'mode constants'!\rerase\r\t\"Answer the integer denoting mode erase.\"\r\r\t^4! !\r\r!Form class methodsFor: 'mode constants'!\rerase1bitShape\r\t\"Answer the integer denoting mode erase.\"\r\r\t^ 26! !\r\r!Form class methodsFor: 'mode constants'!\roldErase1bitShape\r\t\"Answer the integer denoting mode erase.\"\r\r\t^ 17! !\r\r!Form class methodsFor: 'mode constants'!\roldPaint\r\t\"Answer the integer denoting the 'paint' combination rule.\"\r\r\t^16! !\r\r!Form class methodsFor: 'mode constants'!\rover\r\t\"Answer the integer denoting mode over.\"\r\r\t^3! !\r\r!Form class methodsFor: 'mode constants'!\rpaint\r\t\"Answer the integer denoting the 'paint' combination rule.\"\r\r\t^25! !\r\r!Form class methodsFor: 'mode constants' stamp: 'di 12/31/1998 14:02'!\rpaintAlpha\r\t\"Answer the integer denoting BitBlt's paint-with-constant-alpha rule.\"\r\r\t^ 31! !\r\r!Form class methodsFor: 'mode constants'!\rreverse\r\t\"Answer the integer denoting mode reverse.\"\r\r\t^6! !\r\r!Form class methodsFor: 'mode constants' stamp: 'hg 1/29/2001 17:28'!\rrgbMul\r\t\"Answer the integer denoting 'Multiply each color component, \r\t their values regarded as fractions of 1' rule.\"\r\r\t^ 37! !\r\r!Form class methodsFor: 'mode constants'!\runder\r\t\"Answer the integer denoting mode under.\"\r\r\t^7! !\r\r\r!Form class methodsFor: 'examples'!\rexampleBorder    \"Form exampleBorder\"\r\t\"This example demonstrates the border finding algorithm. Start\r\tby having the user sketch on the screen (end with option-click) and then select a rectangular\r\tarea of the screen which includes all of the area to be filled. Finally,\r\t(with crosshair cursor), the user points at the interior of the region to be\r\toutlined, and the region begins with that place as its seed.\"\r\t| f r interiorPoint |\r\tForm exampleSketch.\t\t\"sketch a little area with an enclosed region\"\r\tr _ Rectangle fromUser.\r\tf _ Form fromDisplay: r.\r\tCursor crossHair showWhile:\r\t\t[interiorPoint _ Sensor waitButton - r origin].\r\tCursor execute showWhile:\r\t\t[f shapeBorder: Color blue width: 2 interiorPoint: interiorPoint\r\t\t\tsharpCorners: false internal: false].\r\tf displayOn: Display at: r origin\t! !\r\r!Form class methodsFor: 'examples'!\rexampleEdits\r\t\"In Form category editing are messages edit and bitEdit that make it possible to \r\tcreate editors on instances of Form. \r\t \r\tThis is the general form editor:\r\t| f | \r\tf _ Form fromUser. \r\tf edit. \r\t \r\tThis is the general bit editor:\r\t| f | \r\tf _ Form fromUser. \r\tf bitEdit.\"! !\r\r!Form class methodsFor: 'examples'!\rexampleMagnify\r\r\t| f m |\r\tf _ Form fromUser.\r\tm _ f magnify: f boundingBox by: 5 @ 5.\r\tm displayOn: Display at: Sensor waitButton\r\r\t\"Form exampleMagnify.\"! !\r\r!Form class methodsFor: 'examples'!\rexampleShrink\r\r\t| f s |\r\tf _ Form fromUser.\r\ts _ f shrink: f boundingBox by: 2 @ 5.\r\ts displayOn: Display at: Sensor waitButton\t\r\r\t\"Form exampleShrink.\"! !\r\r!Form class methodsFor: 'examples'!\rexampleSketch\r\t\"This is a simple drawing algorithm to get a sketch on the display screen.\r\tDraws whenever mouse button down.  Ends with option-click.\"\r\t| aPen color |\r\taPen _ Pen new.\r\tcolor _ 0.\r\t[Sensor yellowButtonPressed]\r\t\twhileFalse:\r\t\t[aPen place: Sensor cursorPoint; color: (color _ color + 1).\r\t\t[Sensor redButtonPressed]\r\t\t\twhileTrue: [aPen goto: Sensor cursorPoint]].\r\tSensor waitNoButton.\r\r\t\"Form exampleSketch\"! !\r\r!Form class methodsFor: 'examples'!\rexampleSpaceFill    \"Form exampleSpaceFill\"\r\t\"This example demonstrates the area filling algorithm. Starts by having\r\tthe user sketch on the screen (ended by option-click) and then select a rectangular\r\tarea of the screen which includes all of the area to be filled. Finally,\r\t(with crosshair cursor), the user points at the interior of some region to be\r\tfilled, and the filling begins with that place as its seed.\"\r\t| f r interiorPoint |\r\tForm exampleSketch.\t\t\"sketch a little area with an enclosed region\"\r\tr _ Rectangle fromUser.\r\tf _ Form fromDisplay: r.\r\tCursor crossHair showWhile:\r\t\t[interiorPoint _ Sensor waitButton - r origin].\r\tCursor execute showWhile:\r\t\t[f shapeFill: Color gray interiorPoint: interiorPoint].\r\tf displayOn: Display at: r origin\t! !\r\r!Form class methodsFor: 'examples'!\rmakeStar  \"See the similar example in OpaqueForm\"\r\t| sampleForm pen |\r\tsampleForm _ Form extent: 50@50.  \"Make a form\"\r\tpen _ Pen newOnForm: sampleForm.\r\tpen place: 24@50; turn: 18.\t\t\"Draw a 5-pointed star on it.\"\r\t1 to: 5 do: [:i | pen go: 19; turn: 72; go: 19; turn: -144].\r\t^ sampleForm\r\"\rForm makeStar follow: [Sensor cursorPoint]\r\t\t\t\twhile: [Sensor noButtonPressed]\r\"! !\r\r!Form class methodsFor: 'examples' stamp: 'tk 7/4/2000 12:08'!\rtoothpaste: diam\t\t\"Display restoreAfter: [Form toothpaste: 30]\"\r\t\"Draws wormlike lines by laying down images of spheres.\r\tSee Ken Knowlton, Computer Graphics, vol. 15 no. 4 p352.\r\tDraw with mouse button down; terminate by option-click.\"\r\t| facade ball filter point queue port color q colors colr colr2 |\r\tcolors _ Display depth = 1\r\t\tifTrue: [Array with: Color black]\r\t\tifFalse: [Color red wheel: 12].\r\tfacade _ Form extent: diam@diam offset: (diam//-2) asPoint.\r\t(Form dotOfSize: diam) displayOn: facade\r\t\t\tat: (diam//2) asPoint clippingBox: facade boundingBox\r\t\t\trule: Form under fillColor: Color white.\r\t#(1 2 3) do:\r\t\t[:x |  \"simulate facade by circles of gray\"\r\t\t(Form dotOfSize: x*diam//5) displayOn: facade\r\t\t\tat: (diam*2//5) asPoint clippingBox: facade boundingBox\r\t\t\trule: Form under\r\t\t\tfillColor: (Color perform: \r\t\t\t\t\t(#(black gray lightGray) at: x)).\r\t\t\"facade displayAt: 50*x@50\"].\r\tball _ Form dotOfSize: diam.\r\tcolor _ 8.\r\t[ true ] whileTrue:\r\t\t[port _ BitBlt current toForm: Display.\r\t\t\"Expand 1-bit forms to any pixel depth\"\r\t\tport colorMap: (Bitmap with: 0 with: 16rFFFFFFFF).\r\t\tqueue _ OrderedCollection new: 32.\r\t\t16 timesRepeat: [queue addLast: -20@-20].\r\t\tSensor waitButton.\r\t\tSensor yellowButtonPressed ifTrue: [^ self].\r\t\tfilter _ Sensor cursorPoint.\r\t\tcolr _ colors atWrap: (color _ color + 5).  \"choose increment relatively prime to colors size\"\r\t\tcolr2 _ colr alphaMixed: 0.3 with: Color white.\r\t\t[Sensor redButtonPressed or: [queue size > 0]] whileTrue:\r\t\t\t[filter _ filter * 4 + Sensor cursorPoint // 5.\r\t\t\tpoint _ Sensor redButtonPressed\r\t\t\t\tifTrue: [filter] ifFalse: [-20@-20].\r\t\t\tport copyForm: ball to: point rule: Form paint fillColor: colr.\r\t\t\t(q _ queue removeFirst) == nil ifTrue: [^ self].\t\"exit\"\r\t\t\tDisplay depth = 1\r\t\t\t\tifTrue: [port copyForm: facade to: q rule: Form erase]\r\t\t\t\tifFalse: [port copyForm: facade to: q rule: Form paint fillColor: colr2].\r\t\t\tSensor redButtonPressed ifTrue: [queue addLast: point]]].\r! !\r\r!Form class methodsFor: 'examples'!\rxorHack: size  \"Display restoreAfter: [Form xorHack: 256]\"\r\t\"Draw a smiley face or stick figure, and end with option-click.\r\tThereafter image gets 'processed' as long as you have button down.\r\tIf you stop at just the right time, you'll see you figure upside down,\r\tand at the end of a full cycle, you'll see it perfectly restored.\r\tDude -- this works in color too!!\"\r\t| rect form i bb |\r\trect _ 5@5 extent: size@size.\r\tDisplay fillWhite: rect; border: (rect expandBy: 2) width: 2.\r\tDisplay border: (rect topRight - (0@2) extent: rect extent*2 + 4) width: 2.\r\tForm exampleSketch.\r\tform _ Form fromDisplay: rect.\r\tbb _ form boundingBox.\r\ti _ 0.\r\t[Sensor yellowButtonPressed] whileFalse:\r\t\t[[Sensor redButtonPressed] whileTrue:\r\t\t\t[i _ i + 1.\r\t\t\t(Array with: 0@1 with: 0@-1 with: 1@0 with: -1@0) do:\r\t\t\t\t[:d | form copyBits: bb from: form at: d\r\t\t\t\t\tclippingBox: bb rule: Form reverse fillColor: nil].\r\t\t\tform displayAt: rect topLeft.\r\t\t\ti+2\\\\size < 4 ifTrue: [(Delay forMilliseconds: 300) wait]].\r\t\t(form magnify: form boundingBox by: 2@2) displayAt: rect topRight + (2@0).\r\t\tSensor waitButton].! !\r\r\r!Form class methodsFor: 'shut down' stamp: 'ar 5/28/2000 23:35'!\rshutDown  \"Form shutDown\"\r\t\"Compress all instances in the system.  Will decompress on demand...\"\r\tForm allInstancesDo: [:f | f hibernate].\r\tColorForm allInstancesDo: [:f | f hibernate].! !\r\r\r!Form class methodsFor: 'BMP file reading' stamp: 'ar 6/16/2002 17:41'!\rfromBMPFile: aBinaryStream\r\t\"Obsolete\"\r\t^self fromBinaryStream: aBinaryStream.! !\r\r!Form class methodsFor: 'BMP file reading' stamp: 'ar 6/16/2002 17:41'!\rfromBMPFileNamed: fileName\r\t\"Obsolete\"\r\t^self fromFileNamed: fileName\r! !\r\r\r!Form class methodsFor: 'initialize-release' stamp: 'hg 8/3/2000 16:25'!\rinitialize\r\r\tFileList registerFileReader: self! !\r\r\r!Form class methodsFor: 'fileIn/Out' stamp: 'hg 8/3/2000 16:26'!\ropenAsBackground: fullName\r\t\"Set an image as a background image.  Support Squeak's common file format \r\t(GIF, JPG, PNG, 'Form stoteOn: (run coded)' and BMP)\"\r\r\t(self fromFileNamed: fullName) setAsBackground! !\r\r!Form class methodsFor: 'fileIn/Out' stamp: 'BG 10/28/2003 20:58'!\ropenImageInWindow: fullName\r\t\"Handle five file formats: GIF, JPG, PNG, Form stoteOn: (run coded), and BMP.\r\tFail if file format is not recognized.\"\r\r\t| image myStream |\r\r\tmyStream _ (FileStream readOnlyFileNamed: fullName) binary.\r\timage _ self fromBinaryStream: myStream.\r\tmyStream close.\r\r\t\r\tSmalltalk isMorphic\r\t\tifFalse: [FormView open: image named: fullName]! !\r\r!Form class methodsFor: 'fileIn/Out' stamp: 'sw 2/17/2002 01:38'!\rserviceImageAsBackground\r\t\"Answer a service for setting the desktop background from a given graphical file's contents\"\r\r\t^ SimpleServiceEntry \r\t\tprovider: self \r\t\tlabel: 'use graphic as background'\r\t\tselector: #openAsBackground:\r\t\tdescription: 'use the graphic as the background for the desktop'\r\t\tbuttonLabel: 'background'! !\r\r!Form class methodsFor: 'fileIn/Out' stamp: 'sw 2/17/2002 00:31'!\rserviceOpenImageInWindow\r\t\"Answer a service for opening a graphic in a window\"\r\r\t^ SimpleServiceEntry \r\t\tprovider: self \r\t\tlabel: 'open graphic in a window'\r\t\tselector: #openImageInWindow:\r\t\tdescription: 'open a graphic file in a window'\r\t\tbuttonLabel: 'open'! !\r\r\r!Form class methodsFor: 'class initialization' stamp: 'SD 11/15/2001 22:21'!\runload\r\r\tFileList unregisterFileReader: self ! !\rView subclass: #FormView\r\tinstanceVariableNames: 'rule mask'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Views'!\r!FormView commentStamp: '<historical>' prior: 0!\rI represent a view of a Form.!\r\r\r!FormView methodsFor: 'accessing'!\rfillColor\r\t\"Answer an instance of class Form that is the mask used when displaying \r\tthe receiver's model (a Form) on the display screen (see BitBlt for the \r\tmeaning of this mask).\"\r\r\t^ mask! !\r\r!FormView methodsFor: 'accessing'!\rfillColor: aForm \r\t\"Set the display mask for displaying the receiver's model to be the \r\targument, aForm.\"\r\r\tmask _ aForm! !\r\r!FormView methodsFor: 'accessing'!\rmask\r\t\"Answer an instance of class Form that is the mask used when displaying \r\tthe receiver's model (a Form) on the display screen (see BitBlt for the \r\tmeaning of this mask).\"\r\r\t^ mask! !\r\r!FormView methodsFor: 'accessing'!\rrule\r\t\"Answer a number from 0 to 15 that indicates which of the sixteen \r\tdisplay rules (logical function of two boolean values) is to be used when \r\tcopying the receiver's model (a Form) onto the display screen.\"\r\r\trule == nil\r\t\tifTrue: [^self defaultRule]\r\t\tifFalse: [^rule]! !\r\r!FormView methodsFor: 'accessing'!\rrule: anInteger \r\t\"Set the display rule for the receiver to be the argument, anInteger.\"\r\r\trule _ anInteger! !\r\r\r!FormView methodsFor: 'controller access' stamp: 'ssa 10/8/2008 13:14'!\rdefaultControllerClass  ^ NoController! !\r\r\r!FormView methodsFor: 'model access'!\rchangeValueAt: location put: anInteger\r\t\"The receiver's model is a form which has an array of bits. Change the \r\tbit at index, location, to be anInteger (either 1 or 0). Inform all objects \r\tthat depend on the model that it has changed.\"\r\r\tmodel pixelValueAt: location put: anInteger.\r\tmodel changed: self! !\r\r\r!FormView methodsFor: 'window access'!\rdefaultWindow \r\t\"Refer to the comment in View|defaultWindow.\"\r\r\t^(Rectangle origin: 0 @ 0 extent: model extent)\r\t\texpandBy: borderWidth! !\r\r!FormView methodsFor: 'window access'!\rwindowBox\r\t\"For comaptibility with Control manager (see senders)\"\r\t^ self insetDisplayBox! !\r\r\r!FormView methodsFor: 'displaying'!\rdisplayOn: aPort\r\tmodel displayOnPort: aPort at: self displayBox origin! !\r\r!FormView methodsFor: 'displaying' stamp: 'hmm 7/21/97 20:45'!\rdisplayView \r\t\"Refer to the comment in View|displayView.\"\r\r\t| oldOffset |\r\tsuper displayView.\r\tinsideColor == nil ifFalse: [Display fill: self insetDisplayBox fillColor: insideColor].\r\toldOffset _ model offset.\r\tmodel offset: \"borderWidth origin\" 0@0.\r\tmodel\r\t\tdisplayOn: Display\r\t\ttransformation: self displayTransformation\r\t\tclippingBox: self insetDisplayBox\r\t\trule: self rule\r\t\tfillColor: self fillColor.\r\tmodel offset: oldOffset! !\r\r!FormView methodsFor: 'displaying'!\runcacheBits\r\t\"Placed vacuously here so that when ControlManager>>restore calls uncacheBits for a project with no windows, we don't hang.  1/24/96 sw\"! !\r\r!FormView methodsFor: 'displaying'!\rupdateDisplay\r\t\"overridden by subclass\"! !\r\r\r!FormView methodsFor: 'updating'!\rupdate: aFormView \r\t\"Refer to the comment in View|update:.\"\r\r\tself == aFormView ifFalse: [self display]! !\r\r\r!FormView methodsFor: 'menu messages'!\raccept\r\t\"The receiver's model is set to the working version, the one in which \r\tedits are carried out.\"\r\r\t^self! !\r\r!FormView methodsFor: 'menu messages'!\rcancel\r\t\"Set the working form to be a copy of the model.\"\r\r\t^self! !\r\r\r!FormView methodsFor: 'private'!\rdefaultRule \r\t\"The default display rule is 3=over or storing.\"\r\r\t^Form over! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rFormView class\r\tinstanceVariableNames: ''!\r\r!FormView class methodsFor: 'examples'!\rexampleOne\r\t\"Frame a Form (specified by the user) with a border of 2 bits in width and display it offset 60 x 40 from the cornor of the display screen. \"\r\t| f view |\r\tf _ Form fromUser.\r\tview _ self new model: f.\r\tview translateBy: 60 @ 40.\r\tview borderWidth: 2.\r\tview display.\r\tview release\r\r\t\"FormView exampleOne\"! !\r\r!FormView class methodsFor: 'examples'!\rexampleTwo\r\t\"Frame a Form (specified by the user) that is scaled by 2. The border is 2 bits in width. Displays at location 60, 40.\"\r\t| f view |\r\tf _ Form fromUser.\r\tview _ self new model: f.\r\tview scaleBy: 2.0.\r\tview translateBy: 60 @ 40.\r\tview borderWidth: 2.\r\tview display.\r\tview release\r\r\t\"FormView exampleTwo\"! !\r\r!FormView class methodsFor: 'examples' stamp: 'BG 12/5/2003 14:45'!\ropen: aForm named: aString\r\t\"FormView open: ((Form extent: 100@100) borderWidth: 1) named: 'Squeak' \"\r\t\"Open a window whose model is aForm and whose label is aString.\"\r\t| topView aView |\r\ttopView _ StandardSystemView new.\r\ttopView model: aForm.\r\ttopView label: aString.\r\ttopView minimumSize: aForm extent;\r\t          maximumSize: aForm extent.\r\taView _ FormView new.\r\taView model: aForm.\r\taView window: (aForm boundingBox expandBy: 2).\r\taView borderWidthLeft: 2 right: 2 top: 2 bottom: 2.\r\ttopView addSubView: aView.\r\ttopView controller open! !\rNumber subclass: #Fraction\r\tinstanceVariableNames: 'numerator denominator'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Numbers'!\r!Fraction commentStamp: '<historical>' prior: 0!\rFraction provides methods for dealing with fractions like 1/3 as fractions (not as 0.33333...).  All public arithmetic operations answer reduced fractions (see examples).\r\rinstance variables: 'numerator denominator '\r\rExamples: (note the parentheses required to get the right answers in Smalltalk and Squeak):\r\r(2/3) + (2/3)\r(2/3) + (1/2)\t\t \"answers shows the reduced fraction\" \r(2/3) raisedToInteger: 5\t\t \"fractions also can have exponents\"\r!\r\r\r!Fraction methodsFor: 'arithmetic' stamp: 'di 11/6/1998 13:58'!\r* aNumber \r\t\"Answer the result of multiplying the receiver by aNumber.\"\r\t| d1 d2 |\r\taNumber isFraction ifTrue: \r\t\t[d1 _ numerator gcd: aNumber denominator.\r\t\td2 _ denominator gcd: aNumber numerator.\r\t\t(d2 = denominator and: [d1 = aNumber denominator])\r\t\t\tifTrue: [^ numerator // d1 * (aNumber numerator // d2)].\r\t\t^ Fraction numerator: numerator // d1 * (aNumber numerator // d2)\r\t\t\t\tdenominator: denominator // d2 * (aNumber denominator // d1)].\r\t^ aNumber adaptToFraction: self andSend: #*! !\r\r!Fraction methodsFor: 'arithmetic' stamp: 'di 11/6/1998 13:58'!\r+ aNumber \r\t\"Answer the sum of the receiver and aNumber.\"\r\t| n d d1 d2 |\r\taNumber isFraction ifTrue: \r\t\t[d _ denominator gcd: aNumber denominator.\r\t\tn _ numerator * (d1 _ aNumber denominator // d) + (aNumber numerator * (d2 _ denominator // d)).\r\t\td1 _ d1 * d2.\r\t\tn _ n // (d2 _ n gcd: d).\r\t\t(d _ d1 * (d // d2)) = 1 ifTrue: [^ n].\r\t\t^ Fraction numerator: n denominator: d].\r\t^ aNumber adaptToFraction: self andSend: #+! !\r\r!Fraction methodsFor: 'arithmetic' stamp: 'di 11/6/1998 13:58'!\r- aNumber\r\t\"Answer the difference between the receiver and aNumber.\"\r\taNumber isFraction ifTrue:\r\t\t[^ self + aNumber negated].\r\t^ aNumber adaptToFraction: self andSend: #-! !\r\r!Fraction methodsFor: 'arithmetic' stamp: 'di 11/6/1998 13:58'!\r/ aNumber\r\t\"Answer the result of dividing the receiver by aNumber.\"\r\taNumber isFraction\r\t\tifTrue: [^self * aNumber reciprocal].\r\t^ aNumber adaptToFraction: self andSend: #/! !\r\r!Fraction methodsFor: 'arithmetic'!\rnegated \r\t\"Refer to the comment in Number|negated.\"\r\r\t^ Fraction\r\t\tnumerator: numerator negated\r\t\tdenominator: denominator! !\r\r!Fraction methodsFor: 'arithmetic' stamp: 'RAH 4/25/2000 19:49'!\rreciprocal\r\t\"Refer to the comment in Number|reciprocal.\"\r\t#Numeric.\r\t\"Changed 200/01/19 For ANSI <number> support.\"\r\tnumerator = 0 ifTrue: [^ (ZeroDivide dividend: self) signal\"<- Chg\"].\r\tnumerator = 1 ifTrue: [^ denominator].\r\tnumerator = -1 ifTrue: [^ denominator negated].\r\t^ Fraction numerator: denominator denominator: numerator! !\r\r\r!Fraction methodsFor: 'comparing' stamp: 'di 11/6/1998 13:58'!\r< aNumber\r\taNumber isFraction ifTrue:\r\t\t[^ numerator * aNumber denominator < (aNumber numerator * denominator)].\r\t^ aNumber adaptToFraction: self andSend: #<! !\r\r!Fraction methodsFor: 'comparing' stamp: 'di 8/31/1999 10:33'!\r= aNumber\r\taNumber isNumber ifFalse: [^ false].\r\taNumber isFraction\r\t\tifTrue: [numerator = 0 ifTrue: [^ aNumber numerator = 0].\r\t\t\t\t^ (numerator * aNumber denominator) =\r\t\t\t\t\t(aNumber numerator * denominator)\r\t\t\t\t\"Note: used to just compare num and denom,\r\t\t\t\t\tbut this fails for improper fractions\"].\r\t^ aNumber adaptToFraction: self andSend: #=! !\r\r!Fraction methodsFor: 'comparing' stamp: 'SqR 8/3/2000 13:33'!\rhash\r\t\"Hash is reimplemented because = is implemented.\"\r\r\t^numerator hash bitXor: denominator hash! !\r\r\r!Fraction methodsFor: 'truncation and round off'!\rtruncated \r\t\"Refer to the comment in Number|truncated.\"\r\r\t^numerator quo: denominator! !\r\r\r!Fraction methodsFor: 'converting' stamp: 'di 11/6/1998 13:10'!\radaptToInteger: rcvr andSend: selector\r\t\"If I am involved in arithmetic with an Integer, convert it to a Fraction.\"\r\t^ rcvr asFraction perform: selector with: self! !\r\r!Fraction methodsFor: 'converting' stamp: 'RAH 4/25/2000 19:49'!\radaptToScaledDecimal: receiverScaledDecimal andSend: arithmeticOpSelector \r\t\"Convert receiverScaledDecimal to a Fraction and do the arithmetic. \r\treceiverScaledDecimal arithmeticOpSelector self.\"\r\t#Numeric.\r\t\"add 200/01/19 For ScaledDecimal support.\"\r\t^ receiverScaledDecimal asFraction perform: arithmeticOpSelector with: self! !\r\r!Fraction methodsFor: 'converting' stamp: 'mrm 10/10/2000 22:58'!\rasFloat\r\t\"Answer a Float that closely approximates the value of the receiver.\r\tIdeally, answer the Float that most closely approximates the receiver.\"\r\r\t| nScaleBits dScaleBits nScaled dScaled |\r\r\t\"Scale the numerator by throwing away all but the\r\ttop 8 digits (57 to 64 significant bits) then making that a Float.\r\tThis keeps all of the precision of a Float (53 significand bits) but\r\tguarantees that we do not exceed the range representable as a Float\r\t(about 2 to the 1024th)\"\r\r\tnScaleBits _ 8 * ((numerator digitLength - 8) max: 0).\r\tnScaled _ (numerator bitShift: nScaleBits negated) asFloat.\r\r\t\"Scale the denominator the same way.\"\r\tdScaleBits _ 8 * ((denominator digitLength - 8) max: 0).\r\tdScaled _ (denominator bitShift: dScaleBits negated) asFloat.\r\r\t\"Divide the scaled numerator and denominator to make the \rright mantissa, then scale to correct the exponent.\"\r\t^ (nScaled / dScaled) timesTwoPower: (nScaleBits - dScaleBits).! !\r\r!Fraction methodsFor: 'converting'!\rasFraction\t\r\t\"Answer the receiver itself.\"\r\r\t^self! !\r\r!Fraction methodsFor: 'converting'!\risFraction\r\t^ true! !\r\r\r!Fraction methodsFor: 'printing'!\rprintOn: aStream\r\r\taStream nextPut: $(.\r\tnumerator printOn: aStream.\r\taStream nextPut: $/.\r\tdenominator printOn: aStream.\r\taStream nextPut: $).\r! !\r\r\r!Fraction methodsFor: 'private'!\rdenominator\r\r\t^denominator! !\r\r!Fraction methodsFor: 'private'!\rnumerator\r\r\t^numerator! !\r\r!Fraction methodsFor: 'private'!\rreduced\r\r\t| gcd numer denom |\r\tnumerator = 0 ifTrue: [^0].\r\tgcd _ numerator gcd: denominator.\r\tnumer _ numerator // gcd.\r\tdenom _ denominator // gcd.\r\tdenom = 1 ifTrue: [^numer].\r\t^Fraction numerator: numer denominator: denom! !\r\r!Fraction methodsFor: 'private' stamp: 'tfei 4/12/1999 12:45'!\rsetNumerator: n denominator: d\r\r\td = 0\r\t\tifTrue: [^(ZeroDivide dividend: n) signal]\r\t\tifFalse: \r\t\t\t[numerator _ n asInteger.\r\t\t\tdenominator _ d asInteger abs. \"keep sign in numerator\"\r\t\t\td < 0 ifTrue: [numerator _ numerator negated]]! !\r\r\r!Fraction methodsFor: 'mathematical functions' stamp: 'LC 4/22/1998 14:03'!\rraisedToInteger: anInteger \r\t\"See Number | raisedToInteger:\"\r\tanInteger = 0 ifTrue: [^ 1].\r\tanInteger < 0 ifTrue: [^ self reciprocal raisedToInteger: anInteger negated].\r\t^ Fraction numerator: (numerator raisedToInteger: anInteger)\r\t\tdenominator: (denominator raisedToInteger: anInteger)! !\r\r!Fraction methodsFor: 'mathematical functions' stamp: 'LC 4/22/1998 14:05'!\rsquared\r\t\"See Fraction (Number) | squared\"\r\t^ Fraction numerator: numerator squared denominator: denominator squared! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rFraction class\r\tinstanceVariableNames: ''!\r\r!Fraction class methodsFor: 'instance creation' stamp: 'di 8/31/1999 10:16'!\rnumerator: numInteger denominator: denInteger \r\t\"Answer an instance of me (numInteger/denInteger).\r\tNOTE: This primitive initialization method will not reduce improper fractions,\r\tso normal usage should be coded as, eg,\r\t\t(Fraction numerator: a denominator: b) reduced\r\tor, more simply, as\r\t\ta / b.\"\r\r\t^self new setNumerator: numInteger denominator: denInteger! !\r\r\r!Fraction class methodsFor: 'constants' stamp: 'RAH 4/25/2000 19:49'!\rone\r\t#Numeric.\r\t\"add 200/01/19 For <number> protocol support.\"\r\t^ self numerator: 1 denominator: 1! !\rImageReadWriter subclass: #GIFReadWriter\r\tinstanceVariableNames: 'width height bitsPerPixel colorPalette rowByteSize xpos ypos pass interlace codeSize clearCode eoiCode freeCode maxCode prefixTable suffixTable remainBitCount bufByte bufStream transparentIndex mapOf32 localColorTable delay loopCount offset'\r\tclassVariableNames: 'Extension ImageSeparator Terminator'\r\tpoolDictionaries: ''\r\tcategory: 'Graphics-Files'!\r!GIFReadWriter commentStamp: '<historical>' prior: 0!\rCopyright (c) Kazuki Yasumatsu, 1995. All rights reserved.\r\rUsed with permission.  Modified for use in Squeak.!\r\r\r!GIFReadWriter methodsFor: 'accessing' stamp: 'bf 5/29/2003 01:43'!\rdelay: aNumberOrNil\r\t\"Set delay for next image in hundredth (1/100) of seconds\"\r\tdelay := aNumberOrNil! !\r\r!GIFReadWriter methodsFor: 'accessing' stamp: 'bf 5/29/2003 01:39'!\rloopCount: aNumber\r\t\"Set looping. This must be done before any image is written!!\"\r\tloopCount := aNumber! !\r\r!GIFReadWriter methodsFor: 'accessing' stamp: 'sd 1/30/2004 15:18'!\rnextImage\r\t\"Read in the next GIF image from the stream. Read it all into\rmemory first for speed.\"\r\r\t| f thisImageColorTable |\r\tstream class == ReadWriteStream ifFalse: [\r\t\tstream binary.\r\t\tself on: (ReadWriteStream with: (stream contentsOfEntireFile))].\r\r\tlocalColorTable _ nil.\r\tself readHeader.\r\tf _ self readBody.\r\tself close.\r\tf == nil ifTrue: [^ self error: 'corrupt GIF file'].\r\r\tthisImageColorTable _ localColorTable ifNil: [colorPalette].\r\ttransparentIndex ifNotNil: [\r\t\ttransparentIndex + 1 > thisImageColorTable size ifTrue: [\r\t\t\tthisImageColorTable _ thisImageColorTable \r\t\t\t\tforceTo: transparentIndex + 1 \r\t\t\t\tpaddingWith: Color white\r\t\t].\r\t\tthisImageColorTable at: transparentIndex + 1 put: Color transparent\r\t].\r\tf colors: thisImageColorTable.\r\t^ f\r! !\r\r!GIFReadWriter methodsFor: 'accessing' stamp: 'nk 4/17/2004 19:44'!\rnextPutImage: aForm\r\r\t| f newF |\r\taForm unhibernate.\r\tf _ aForm colorReduced.  \"minimize depth\"\r\tf depth > 8 ifTrue: [\r\t\t\"Not enough color space; do it the hard way.\"\r\t\tf _ f asFormOfDepth: 8].\r\tf depth < 8 ifTrue: [\r\t\t\"writeBitData: expects depth of 8\"\r\t\tnewF _ f class extent: f extent depth: 8.\r\t\t(f isColorForm)\r\t\t\tifTrue: [\r\t\t\t\tnewF\r\t\t\t\t\tcopyBits: f boundingBox\r\t\t\t\t\tfrom: f at: 0@0\r\t\t\t\t\tclippingBox: f boundingBox\r\t\t\t\t\trule: Form over\r\t\t\t\t\tfillColor: nil\r\t\t\t\t\tmap: nil.\r\t\t\t\tnewF colors: f colors]\r\t\t\tifFalse: [f displayOn: newF].\r\t\tf _ newF].\r\t(f isColorForm)\r\t\tifTrue: [\r\t\t\t(f colorsUsed includes: Color transparent) ifTrue: [\r\t\t\t\ttransparentIndex _ (f colors indexOf: Color transparent) - 1]]\r\t\tifFalse: [transparentIndex _ nil].\r\twidth _ f width.\r\theight _ f height.\r\tbitsPerPixel _ f depth.\r\tcolorPalette _ f colormapIfNeededForDepth: 32.\r\tinterlace _ false.\r\tself writeHeader.\r\tself writeBitData: f bits.\r! !\r\r!GIFReadWriter methodsFor: 'accessing' stamp: '6/18/97 13:18 '!\rsetStream: aStream\r\t\"Feed it in from an existing source\"\r\tstream _ aStream! !\r\r!GIFReadWriter methodsFor: 'accessing' stamp: 'di 9/15/1998 09:53'!\runderstandsImageFormat\r\t^('abc' collect: [:x | stream next asCharacter]) = 'GIF'! !\r\r\r!GIFReadWriter methodsFor: 'private-encoding'!\rflushCode\r\tself flushBits! !\r\r!GIFReadWriter methodsFor: 'private-encoding' stamp: 'tk 9/14/97 16:25'!\rreadPixelFrom: bits\r\t\"Since bits is a Bitmap with 32 bit values, watch out for the\rpadding at the end of each row.  But, GIF format already wants padding to\r32 bit boundary!!  OK as is.  tk 9/14/97\"\r\r\t| pixel |\r\typos >= height ifTrue: [^nil].\r\tpixel _ bits byteAt: (ypos * rowByteSize + xpos + 1).\r\tself updatePixelPosition.\r\t^pixel! !\r\r!GIFReadWriter methodsFor: 'private-encoding' stamp: 'bf 5/29/2003 01:21'!\rwriteBitData: bits\r\t\"using modified Lempel-Ziv Welch algorithm.\"\r\r\t| maxBits maxMaxCode tSize initCodeSize ent tShift fCode pixel index disp nomatch |\r\tpass _ 0.\r\txpos _ 0.\r\typos _ 0.\r\trowByteSize _ width * 8 + 31 // 32 * 4.\r\tremainBitCount _ 0.\r\tbufByte _ 0.\r\tbufStream _ WriteStream on: (ByteArray new: 256).\r\r\tmaxBits _ 12.\r\tmaxMaxCode _ 1 bitShift: maxBits.\r\ttSize _ 5003.\r\tprefixTable _ Array new: tSize.\r\tsuffixTable _ Array new: tSize.\r\r\tinitCodeSize _ bitsPerPixel <= 1 ifTrue: [2] ifFalse: [bitsPerPixel].\r\tself nextPut: initCodeSize.\r\tself setParameters: initCodeSize.\r\r\ttShift _ 0.\r\tfCode _ tSize.\r\t[fCode < 65536] whileTrue:\r\t\t[tShift _ tShift + 1.\r\t\tfCode _ fCode * 2].\r\ttShift _ 8 - tShift.\r\t1 to: tSize do: [:i | suffixTable at: i put: -1].\r\r\tself writeCodeAndCheckCodeSize: clearCode.\r\tent _ self readPixelFrom: bits.\r\t[(pixel _ self readPixelFrom: bits) == nil] whileFalse:\r\t\t[\r\t\tfCode _ (pixel bitShift: maxBits) + ent.\r\t\tindex _ ((pixel bitShift: tShift) bitXor: ent) + 1.\r\t\t(suffixTable at: index) = fCode\r\t\t\tifTrue: [ent _ prefixTable at: index]\r\t\t\tifFalse:\r\t\t\t\t[nomatch _ true.\r\t\t\t\t(suffixTable at: index) >= 0\r\t\t\t\t\tifTrue:\r\t\t\t\t\t\t[disp _ tSize - index + 1.\r\t\t\t\t\t\tindex = 1 ifTrue: [disp _ 1].\r\t\t\t\t\t\t\"probe\"\r\t\t\t\t\t\t[(index _ index - disp) < 1 ifTrue: [index _ index + tSize].\r\t\t\t\t\t\t(suffixTable at: index) = fCode\r\t\t\t\t\t\t\tifTrue:\r\t\t\t\t\t\t\t\t[ent _ prefixTable at: index.\r\t\t\t\t\t\t\t\tnomatch _ false.\r\t\t\t\t\t\t\t\t\"continue whileFalse:\"].\r\t\t\t\t\t\tnomatch and: [(suffixTable at: index) > 0]]\r\t\t\t\t\t\t\twhileTrue: [\"probe\"]].\r\t\t\t\t\"nomatch\"\r\t\t\t\tnomatch ifTrue:\r\t\t\t\t\t[self writeCodeAndCheckCodeSize: ent.\r\t\t\t\t\tent _ pixel.\r\t\t\t\t\tfreeCode < maxMaxCode\r\t\t\t\t\t\tifTrue:\r\t\t\t\t\t\t\t[prefixTable at: index put: freeCode.\r\t\t\t\t\t\t\tsuffixTable at: index put: fCode.\r\t\t\t\t\t\t\tfreeCode _ freeCode + 1]\r\t\t\t\t\t\tifFalse:\r\t\t\t\t\t\t\t[self writeCodeAndCheckCodeSize: clearCode.\r\t\t\t\t\t\t\t1 to: tSize do: [:i | suffixTable at: i put: -1].\r\t\t\t\t\t\t\tself setParameters: initCodeSize]]]].\r\tprefixTable _ suffixTable _ nil.\r\tself writeCodeAndCheckCodeSize: ent.\r\tself writeCodeAndCheckCodeSize: eoiCode.\r\tself flushCode.\r\r\tself nextPut: 0.\t\"zero-length packet\"\r! !\r\r!GIFReadWriter methodsFor: 'private-encoding'!\rwriteCode: aCode\r\tself nextBitsPut: aCode! !\r\r!GIFReadWriter methodsFor: 'private-encoding'!\rwriteCodeAndCheckCodeSize: aCode\r\tself writeCode: aCode.\r\tself checkCodeSize! !\r\r!GIFReadWriter methodsFor: 'private-encoding' stamp: 'bf 5/29/2003 01:38'!\rwriteHeader\r\r\t| byte |\r\tstream position = 0 ifTrue: [\r\t\t\"For first image only\"\r\t\tself nextPutAll: 'GIF89a' asByteArray.\r\t\tself writeWord: width.\t\"Screen Width\"\r\t\tself writeWord: height.\t\"Screen Height\"\r\t\tbyte _ 16r80.  \"has color map\"\r\t\tbyte _ byte bitOr: ((bitsPerPixel - 1) bitShift: 5).  \"color resolution\"\r\t\tbyte _ byte bitOr: bitsPerPixel - 1.  \"bits per pixel\"\r\t\tself nextPut: byte.\r\t\tself nextPut: 0.\t\t\"background color.\"\r\t\tself nextPut: 0.\t\t\"reserved\"\r\t\tcolorPalette do: [:pixelValue |\r\t\t\tself\tnextPut: ((pixelValue bitShift: -16) bitAnd: 255);\r\t\t\t\tnextPut: ((pixelValue bitShift: -8) bitAnd: 255);\r\t\t\t\tnextPut: (pixelValue bitAnd: 255)].\r\t\tloopCount notNil ifTrue: [\r\t\t\t\"Write a Netscape loop chunk\"\r\t\t\tself nextPut: Extension.\r\t\t\tself nextPutAll: #(255 11 78 69 84 83 67 65 80 69 50 46 48 3 1) asByteArray.\r\t\t\tself writeWord: loopCount.\r\t\t\tself nextPut: 0]].\r\r\tdelay notNil | transparentIndex notNil ifTrue: [\r\t\tself nextPut: Extension;\r\t\t\tnextPutAll: #(16rF9 4) asByteArray;\r\t\t\tnextPut: (transparentIndex isNil ifTrue: [0] ifFalse: [9]);\r\t\t\twriteWord: (delay isNil ifTrue: [0] ifFalse: [delay]);\r\t\t\tnextPut: (transparentIndex isNil ifTrue: [0] ifFalse: [transparentIndex]);\r\t\t\tnextPut: 0].\r\r\tself nextPut: ImageSeparator.\r\tself writeWord: 0.\t\t\"Image Left\"\r\tself writeWord: 0.\t\t\"Image Top\"\r\tself writeWord: width.\t\"Image Width\"\r\tself writeWord: height.\t\"Image Height\"\r\tbyte _ interlace ifTrue: [16r40] ifFalse: [0].\r\tself nextPut: byte.\r! !\r\r!GIFReadWriter methodsFor: 'private-encoding'!\rwriteWord: aWord\r\tself nextPut: (aWord bitAnd: 255).\r\tself nextPut: ((aWord bitShift: -8) bitAnd: 255).\r\t^aWord! !\r\r\r!GIFReadWriter methodsFor: 'private-decoding' stamp: 'mir 11/19/2003 12:19'!\rreadBitData\r\t\"using modified Lempel-Ziv Welch algorithm.\"\r\r\t| outCodes outCount bitMask initCodeSize code curCode oldCode inCode finChar i bytes f c packedBits hasLocalColor localColorSize maxOutCodes |\r\r\tmaxOutCodes _ 4096.\r\toffset := self readWord@self readWord. \"Image Left@Image Top\"\r\twidth _ self readWord.\r\theight _ self readWord.\r\r\t\"---\r\tLocal Color Table Flag        1 Bit\r\tInterlace Flag                1 Bit\r\tSort Flag                     1 Bit\r\tReserved                      2 Bits\r\tSize of Local Color Table     3 Bits\r\t----\"\r\tpackedBits _ self next.\r\tinterlace _ (packedBits bitAnd: 16r40) ~= 0.\r\thasLocalColor _ (packedBits bitAnd: 16r80) ~= 0.\r\tlocalColorSize _ 1 bitShift: ((packedBits bitAnd: 16r7) + 1).\r\thasLocalColor ifTrue: [localColorTable _ self readColorTable: localColorSize].\r\r\tpass _ 0.\r\txpos _ 0.\r\typos _ 0.\r\trowByteSize _ ((width + 3) // 4) * 4.\r\tremainBitCount _ 0.\r\tbufByte _ 0.\r\tbufStream _ ReadStream on: ByteArray new.\r\r\toutCodes _ ByteArray new: maxOutCodes + 1.\r\toutCount _ 0.\r\tbitMask _ (1 bitShift: bitsPerPixel) - 1.\r\tprefixTable _ Array new: 4096.\r\tsuffixTable _ Array new: 4096.\r\r\tinitCodeSize _ self next.\r\r\tself setParameters: initCodeSize.\r\tbitsPerPixel > 8 ifTrue: [^self error: 'never heard of a GIF that deep'].\r\tbytes _ ByteArray new: rowByteSize * height.\r\t[(code _ self readCode) = eoiCode] whileFalse:\r\t\t[code = clearCode\r\t\t\tifTrue:\r\t\t\t\t[self setParameters: initCodeSize.\r\t\t\t\tcurCode _ oldCode _ code _ self readCode.\r\t\t\t\tfinChar _ curCode bitAnd: bitMask.\r\t\t\t\t\"Horrible hack to avoid running off the end of the bitmap.  Seems to cure problem reading some gifs!!? tk 6/24/97 20:16\"\r\t\t\t\txpos = 0 ifTrue: [\r\t\t\t\t\t\typos < height ifTrue: [\r\t\t\t\t\t\t\tbytes at: (ypos * rowByteSize) + xpos + 1 put: finChar]]\r\t\t\t\t\tifFalse: [bytes at: (ypos * rowByteSize) + xpos + 1 put: finChar].\r\t\t\t\tself updatePixelPosition]\r\t\t\tifFalse:\r\t\t\t\t[curCode _ inCode _ code.\r\t\t\t\tcurCode >= freeCode ifTrue:\r\t\t\t\t\t[curCode _ oldCode.\r\t\t\t\t\toutCodes at: (outCount _ outCount + 1) put: finChar].\r\t\t\t\t[curCode > bitMask] whileTrue:\r\t\t\t\t\t[outCount > maxOutCodes\r\t\t\t\t\t\tifTrue: [^self error: 'corrupt GIF file (OutCount)'].\r\t\t\t\t\toutCodes at: (outCount _ outCount + 1)\r\t\t\t\t\t\tput: (suffixTable at: curCode + 1).\r\t\t\t\t\tcurCode _ prefixTable at: curCode + 1].\r\t\t\t\tfinChar _ curCode bitAnd: bitMask.\r\t\t\t\toutCodes at: (outCount _ outCount + 1) put: finChar.\r\t\t\t\ti _ outCount.\r\t\t\t\t[i > 0] whileTrue:\r\t\t\t\t\t[\"self writePixel: (outCodes at: i) to: bits\"\r\t\t\t\t\tbytes at: (ypos * rowByteSize) + xpos + 1 put: (outCodes at: i).\r\t\t\t\t\tself updatePixelPosition.\r\t\t\t\t\ti _ i - 1].\r\t\t\t\toutCount _ 0.\r\t\t\t\tprefixTable at: freeCode + 1 put: oldCode.\r\t\t\t\tsuffixTable at: freeCode + 1 put: finChar.\r\t\t\t\toldCode _ inCode.\r\t\t\t\tfreeCode _ freeCode + 1.\r\t\t\t\tself checkCodeSize]].\r\tprefixTable _ suffixTable _ nil.\r\r\tf _ ColorForm extent: width@height depth: 8.\r\tf bits copyFromByteArray: bytes.\r\t\"Squeak can handle depths 1, 2, 4, and 8\"\r\tbitsPerPixel > 4 ifTrue: [^ f].\r\t\"reduce depth to save space\"\r\tc _ ColorForm extent: width@height\r\t\tdepth: (bitsPerPixel = 3 ifTrue: [4] ifFalse: [bitsPerPixel]).\r\tf displayOn: c.\r\t^ c\r! !\r\r!GIFReadWriter methodsFor: 'private-decoding' stamp: 'KLC 1/25/2004 14:04'!\rreadBody\r\t\"Read the GIF blocks. Modified to return a form.  \"\r\r\t| form extype block blocksize packedFields delay1 |\r\tform _ nil.\r\t[stream atEnd] whileFalse: [\r\t\tblock _ self next.\r\t\tblock = Terminator ifTrue: [^ form].\r\t\tblock = ImageSeparator ifTrue: [\r\t\t\tform isNil\r\t\t\t\tifTrue: [form _ self readBitData]\r\t\t\t\tifFalse: [self skipBitData].\r\t\t] ifFalse: [\r\t\t\tblock = Extension\r\t\t\t\tifFalse: [^ form \"^ self error: 'Unknown block type'\"].\r\t\t\t\"Extension block\"\r\t\t\textype _ self next.\t\"extension type\"\r\t\t\textype = 16rF9 ifTrue: [  \"graphics control\"\r\t\t\t\tself next = 4 ifFalse: [^ form \"^ self error: 'corrupt GIF file'\"].\r\t\t\t\t\"====\r\t\t\t\tReserved                      3 Bits\r\t\t\t\tDisposal Method               3 Bits\r\t\t\t\tUser Input Flag               1 Bit\r\t\t\t\tTransparent Color Flag        1 Bit\r\t\t\t\t===\"\r \r\t\t\t\tpackedFields _ self next.\r\t\t\t\tdelay1 := self next.\t\"delay time 1\"\r\t\t\t\tdelay := (self next*256 + delay1) *10.\t \"delay time 2\"\r\t\t\t\ttransparentIndex _ self next.\r\t\t\t\t(packedFields bitAnd: 1) = 0 ifTrue: [transparentIndex _ nil].\r\t\t\t\tself next = 0 ifFalse: [^ form \"^ self error: 'corrupt GIF file'\"].\r\t\t\t] ifFalse: [\r\t\t\t\t\"Skip blocks\"\r\t\t\t\t[(blocksize _ self next) > 0]\r\t\t\t\t\twhileTrue: [\r\t\t\t\t\t\t\"Read the block and ignore it and eat the block terminator\"\r\t\t\t\t\t\tself next: blocksize]]]]! !\r\r!GIFReadWriter methodsFor: 'private-decoding'!\rreadCode\r\t^self nextBits! !\r\r!GIFReadWriter methodsFor: 'private-decoding' stamp: 'RAA 4/25/2001 08:48'!\rreadColorTable: numberOfEntries\r\r\t| array r g b |\r\r\tarray _ Array new: numberOfEntries.\r\t1 to: array size do: [ :i |\r\t\tr _ self next.  \r\t\tg _ self next.  \r\t\tb _ self next.\r\t\tarray at: i put: (Color r: r g: g b: b range: 255)\r\t].\r\t^array! !\r\r!GIFReadWriter methodsFor: 'private-decoding' stamp: 'RAA 4/25/2001 08:49'!\rreadHeader\r\t| is89 byte hasColorMap |\r\t(self hasMagicNumber: 'GIF87a' asByteArray)\r\t\tifTrue: [is89 _ false]\r\t\tifFalse: [(self hasMagicNumber: 'GIF89a' asByteArray)\r\t\t\tifTrue: [is89 _ true]\r\t\t\tifFalse: [^ self error: 'This does not appear to be a GIF file']].\r\tself readWord.\t\"skip Screen Width\"\r\tself readWord.\t\"skip Screen Height\"\r\tbyte _ self next.\r\thasColorMap _ (byte bitAnd: 16r80) ~= 0.\r\tbitsPerPixel _ (byte bitAnd: 7) + 1.\r\tbyte _ self next.\t\"skip background color.\"\r\tself next ~= 0\r\t\tifTrue: [is89\r\t\t\tifFalse: [^self error: 'corrupt GIF file (screen descriptor)']].\r\thasColorMap\r\t\tifTrue:\r\t\t\t[colorPalette _ self readColorTable: (1 bitShift: bitsPerPixel)]\r\t\tifFalse:\r\t\t\t[\"Transcript cr; show: 'GIF file does not have a color map.'.\"\r\t\t\tcolorPalette _ nil \"Palette monochromeDefault\"].! !\r\r!GIFReadWriter methodsFor: 'private-decoding'!\rreadWord\r\t^self next + (self next bitShift: 8)! !\r\r!GIFReadWriter methodsFor: 'private-decoding'!\rskipBitData\r\t| misc blocksize |\r\tself readWord.  \"skip Image Left\"\r\tself readWord.  \"skip Image Top\"\r\tself readWord.  \"width\"\r\tself readWord.  \"height\"\r\tmisc _ self next.\r\t(misc bitAnd: 16r80) = 0 ifFalse: [ \"skip colormap\"\r\t\t1 to: (1 bitShift: (misc bitAnd: 7) + 1) do: [:i |\r\t\t\tself next; next; next]].\r\tself next.  \"minimum code size\"\r\t[(blocksize _ self next) > 0]\r\t\twhileTrue: [self next: blocksize]! !\r\r\r!GIFReadWriter methodsFor: 'private-bits access'!\rflushBits\r\tremainBitCount = 0 ifFalse:\r\t\t[self nextBytePut: bufByte.\r\t\tremainBitCount _ 0].\r\tself flushBuffer! !\r\r!GIFReadWriter methodsFor: 'private-bits access'!\rnextBits\r\t| integer readBitCount shiftCount byte |\r\tinteger _ 0.\r\tremainBitCount = 0\r\t\tifTrue:\r\t\t\t[readBitCount _ 8.\r\t\t\tshiftCount _ 0]\r\t\tifFalse:\r\t\t\t[readBitCount _ remainBitCount.\r\t\t\tshiftCount _ remainBitCount - 8].\r\t[readBitCount < codeSize]\r\t\twhileTrue:\r\t\t\t[byte _ self nextByte.\r\t\t\tbyte == nil ifTrue: [^eoiCode].\r\t\t\tinteger _ integer + (byte bitShift: shiftCount).\r\t\t\tshiftCount _ shiftCount + 8.\r\t\t\treadBitCount _ readBitCount + 8].\r\t(remainBitCount _ readBitCount - codeSize) = 0\r\t\tifTrue:\t[byte _ self nextByte]\r\t\tifFalse:\t[byte _ self peekByte].\r\tbyte == nil ifTrue: [^eoiCode].\r\t^(integer + (byte bitShift: shiftCount)) bitAnd: maxCode! !\r\r!GIFReadWriter methodsFor: 'private-bits access'!\rnextBitsPut: anInteger\r\t| integer writeBitCount shiftCount |\r\tshiftCount _ 0.\r\tremainBitCount = 0\r\t\tifTrue:\r\t\t\t[writeBitCount _ 8.\r\t\t\tinteger _ anInteger]\r\t\tifFalse:\r\t\t\t[writeBitCount _ remainBitCount.\r\t\t\tinteger _ bufByte + (anInteger bitShift: 8 - remainBitCount)].\r\t[writeBitCount < codeSize]\r\t\twhileTrue:\r\t\t\t[self nextBytePut: ((integer bitShift: shiftCount) bitAnd: 255).\r\t\t\tshiftCount _ shiftCount - 8.\r\t\t\twriteBitCount _ writeBitCount + 8].\r\t(remainBitCount _ writeBitCount - codeSize) = 0\r\t\tifTrue: [self nextBytePut: (integer bitShift: shiftCount)]\r\t\tifFalse: [bufByte _ integer bitShift: shiftCount].\r\t^anInteger! !\r\r\r!GIFReadWriter methodsFor: 'private-packing'!\rfillBuffer\r\t| packSize |\r\tpackSize _ self next.\r\tbufStream _ ReadStream on: (self next: packSize)! !\r\r!GIFReadWriter methodsFor: 'private-packing'!\rflushBuffer\r\tbufStream isEmpty ifTrue: [^self].\r\tself nextPut: bufStream size.\r\tself nextPutAll: bufStream contents.\r\tbufStream _ WriteStream on: (ByteArray new: 256)! !\r\r!GIFReadWriter methodsFor: 'private-packing'!\rnextByte\r\tbufStream atEnd\r\t\tifTrue:\r\t\t\t[self atEnd ifTrue: [^nil].\r\t\t\tself fillBuffer].\r\t^bufStream next! !\r\r!GIFReadWriter methodsFor: 'private-packing'!\rnextBytePut: aByte\r\tbufStream nextPut: aByte.\r\tbufStream size >= 254 ifTrue: [self flushBuffer]! !\r\r!GIFReadWriter methodsFor: 'private-packing'!\rpeekByte\r\tbufStream atEnd\r\t\tifTrue:\r\t\t\t[self atEnd ifTrue: [^nil].\r\t\t\tself fillBuffer].\r\t^bufStream peek! !\r\r\r!GIFReadWriter methodsFor: 'private'!\rcheckCodeSize\r\t(freeCode > maxCode and: [codeSize < 12])\r\t\tifTrue:\r\t\t\t[codeSize _ codeSize + 1.\r\t\t\tmaxCode _ (1 bitShift: codeSize) - 1]! !\r\r!GIFReadWriter methodsFor: 'private'!\rsetParameters: initCodeSize\r\tclearCode _ 1 bitShift: initCodeSize.\r\teoiCode _ clearCode + 1.\r\tfreeCode _ clearCode + 2.\r\tcodeSize _ initCodeSize + 1.\r\tmaxCode _ (1 bitShift: codeSize) - 1! !\r\r!GIFReadWriter methodsFor: 'private'!\rupdatePixelPosition\r\t(xpos _ xpos + 1) >= width ifFalse: [^self].\r\txpos _ 0.\r\tinterlace\r\t\tifFalse: [ypos _ ypos + 1. ^self].\r\tpass = 0 ifTrue:\r\t\t[(ypos _ ypos + 8) >= height\r\t\t\tifTrue:\r\t\t\t\t[pass _ pass + 1.\r\t\t\t\typos _ 4].\r\t\t^self].\r\tpass = 1 ifTrue:\r\t\t[(ypos _ ypos + 8) >= height\r\t\t\tifTrue:\r\t\t\t\t[pass _ pass + 1.\r\t\t\t\typos _ 2].\r\t\t^self].\r\tpass = 2 ifTrue:\r\t\t[(ypos _ ypos + 4) >= height\r\t\t\tifTrue:\r\t\t\t\t[pass _ pass + 1.\r\t\t\t\typos _ 1].\r\t\t^self].\r\tpass = 3 ifTrue:\r\t\t[ypos _ ypos + 2.\r\t\t^self].\r\r\t^self error: 'can''t happen'! !\r\r\r!GIFReadWriter methodsFor: 'stream access' stamp: 'bf 5/29/2003 01:23'!\rclose\r\t\"Write terminator\"\r\tself nextPut: Terminator.\r\t^super close! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rGIFReadWriter class\r\tinstanceVariableNames: ''!\r\r!GIFReadWriter class methodsFor: 'class initialization'!\rinitialize\r\t\"GIFReadWriter initialize\"\r\r\tImageSeparator _ $, asInteger.\r\tExtension _ $!! asInteger.\r\tTerminator _ $; asInteger.\r! !\r\r\r!GIFReadWriter class methodsFor: 'examples' stamp: 'bf 5/29/2003 01:56'!\rexampleAnim\r\t\"GIFReadWriter exampleAnim\"\r\r\t| writer extent center |\r\twriter := GIFReadWriter on: (FileStream newFileNamed: 'anim.gif').\r\twriter loopCount: 20.\t\t\"Repeat 20 times\"\r\twriter delay: 10.\t\t\"Wait 10/100 seconds\"\r\textent := 42@42.\r\tcenter := extent / 2.\r\tCursor write showWhile: [\r\t\t[2 to: center x - 1 by: 2 do: [:r |\r\t\t\t\"Make a fancy anim without using Canvas - inefficient as hell\"\r\t\t\t| image |\r\t\t\timage := ColorForm extent: extent depth: 8.\r\t\t\t0.0 to: 359.0 do: [:theta | image colorAt: (center + (Point r: r degrees: theta)) rounded put: Color red].\r\t\t\twriter nextPutImage: image]\r\t\t]\tensure: [writer close]].! !\r\r!GIFReadWriter class methodsFor: 'examples' stamp: 'sd 9/27/2003 19:01'!\rgrabScreenAndSaveOnDisk  \r\t\"GIFReaderWriter grabScreenAndSaveOnDisk\"\r\r\t| form fileName |\r\tform _ Form fromUser.\r\tform bits size = 0 ifTrue: [^ self beep].\r\tfileName _ FileDirectory default nextNameFor: 'Squeak' extension: 'gif'.\r\tUtilities informUser: 'Writing ' , fileName\r\t\tduring: [GIFReadWriter putForm: form onFileNamed: fileName].! !\r\r\r!GIFReadWriter class methodsFor: 'image reading/writing' stamp: 'asm 12/11/2003 21:29'!\rtypicalFileExtensions\r\t\"Answer a collection of file extensions (lowercase) which files that I can \r\tread might commonly have\"\r\r\tself\r\t\tallSubclasses detect: [:cls | cls wantsToHandleGIFs ]\r\t\t\t\t\t ifNone: [\"if none of my subclasses wants , then i''ll have to do\"\r\t\t\t\t\t\t\t^ #('gif' )].\r\t^ #( )! !\r\r!GIFReadWriter class methodsFor: 'image reading/writing' stamp: 'asm 12/11/2003 21:29'!\rwantsToHandleGIFs\r\t^ false! !\rException subclass: #Halt\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Exceptions Extensions'!\r!Halt commentStamp: '<historical>' prior: 0!\rHalt is provided to support Object>>halt.!\r\r\r!Halt methodsFor: 'description' stamp: 'tfei 5/10/1999 14:24'!\risResumable\r\r\t^true! !\r\r\r!Halt methodsFor: 'priv handling' stamp: 'ajh 8/5/2003 11:30'!\rdefaultAction\r\t\"No one has handled this error, but now give them a chance to decide how to debug it.  If none handle this either then open debugger (see UnhandedError-defaultAction)\"\r\r\tUnhandledError signalForException: self! !\rBrowser subclass: #HierarchyBrowser\r\tinstanceVariableNames: 'classList centralClass'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Browser'!\r\r!HierarchyBrowser methodsFor: 'initialization' stamp: 'sw 5/8/2000 01:28'!\rchanged: sym\r\tsym == #classList ifTrue: [self updateAfterClassChange].\r\tsuper changed: sym! !\r\r!HierarchyBrowser methodsFor: 'initialization' stamp: 'tk 4/3/98 11:09'!\rclassListIndex: newIndex\r\t\"Cause system organization to reflect appropriate category\"\r\t| newClassName ind |\r\tnewIndex ~= 0 ifTrue:\r\t\t[newClassName _ (classList at: newIndex) copyWithout: $ .\r\t\tsystemCategoryListIndex _\r\t\t\tsystemOrganizer numberOfCategoryOfElement: newClassName].\r\tind _ super classListIndex: newIndex.\r\tself changed: #systemCategorySingleton.\r\t^ ind! !\r\r!HierarchyBrowser methodsFor: 'initialization' stamp: 'dew 9/15/2001 16:19'!\rdefaultBrowserTitle\r\t^ 'Hierarchy Browser'! !\r\r!HierarchyBrowser methodsFor: 'initialization'!\rinitAlphabeticListing\r\t| tab stab index |\r\tself systemOrganizer: SystemOrganization.\r\tmetaClassIndicated _ false.\r\tclassList _ Smalltalk classNames.! !\r\r!HierarchyBrowser methodsFor: 'initialization' stamp: 'sw 5/8/2000 01:02'!\rinitHierarchyForClass: aClassOrMetaClass\r\t| tab stab index nonMetaClass |\r\tcentralClass _ aClassOrMetaClass.\r\tnonMetaClass _ aClassOrMetaClass theNonMetaClass.\r\tself systemOrganizer: SystemOrganization.\r\tmetaClassIndicated _ aClassOrMetaClass isMeta.\r\tclassList _ OrderedCollection new.\r\ttab _ ''.\r\tnonMetaClass allSuperclasses reverseDo: \r\t\t[:aClass | \r\t\tclassList add: tab , aClass name.\r\t\ttab _ tab , '  '].\r\tindex _ classList size + 1.\r\tnonMetaClass allSubclassesWithLevelDo:\r\t\t[:aClass :level |\r\t\tstab _ ''.  1 to: level do: [:i | stab _ stab , '  '].\r\t\tclassList add: tab , stab , aClass name]\r\t \tstartingLevel: 0.\r\tself classListIndex: index! !\r\r!HierarchyBrowser methodsFor: 'initialization' stamp: 'tk 4/5/98 10:29'!\ropenEditString: aString\r\t\"Create a pluggable version of all the views for a HierarchyBrowser, including views and controllers.  The top list view is of the currently selected system class category--a single item list.\"\r\r\t^ self openSystemCatEditString: aString! !\r\r!HierarchyBrowser methodsFor: 'initialization' stamp: 'sw 11/8/1999 09:38'!\rpotentialClassNames\r\t\"Answer the names of all the classes that could be viewed in this browser\"\r\t^ self classList collect:\r\t\t[:aName | aName copyWithout: $ ]! !\r\r!HierarchyBrowser methodsFor: 'initialization'!\rselectClass: classNotMeta\r\t| name |\r\tname _ classNotMeta name.\r\tself classListIndex: (self classList findFirst:\r\t\t\t[:each | (each endsWith: name)\r\t\t\t\t\tand: [each size = name size\r\t\t\t\t\t\t\tor: [(each at: each size - name size) isSeparator]]])! !\r\r!HierarchyBrowser methodsFor: 'initialization' stamp: 'sw 12/4/96'!\rselectedClassName\r\t\"Answer the name of the class currently selected.   di\r\t  bug fix for the case where name cannot be found -- return nil rather than halt\"\r\r\t| aName |\r\taName _ super selectedClassName.\r\t^ aName == nil\r\t\tifTrue:\r\t\t\t[aName]\r\t\tifFalse:\r\t\t\t[(aName copyWithout: $ ) asSymbol]! !\r\r!HierarchyBrowser methodsFor: 'initialization' stamp: 'di 4/26/2000 20:20'!\rsystemCategorySingleton\r\r\t| cls |\r\tcls _ self selectedClass.\r\t^ cls ifNil: [Array new]\r\t\tifNotNil: [Array with: cls category]! !\r\r!HierarchyBrowser methodsFor: 'initialization' stamp: 'rhi 12/2/2001 21:32'!\rupdateAfterClassChange\r\t\"It is possible that some the classes comprising the hierarchy have changed, so reinitialize the entire browser.\"\r\r\t(centralClass notNil and: [centralClass isObsolete not])\r\t\tifTrue: [self initHierarchyForClass: centralClass]! !\r\r\r!HierarchyBrowser methodsFor: 'menu messages' stamp: 'tk 4/7/98 13:53'!\rbuildClassBrowserEditString: aString \r\t\"Create and schedule a new class browser for the current selection, if one \r\texists, with initial textual contents set to aString.\"\r\r\tself spawnHierarchy! !\r\r!HierarchyBrowser methodsFor: 'menu messages' stamp: 'tk 4/3/98 11:22'!\rremoveSystemCategory\r\t\"If a class category is selected, create a Confirmer so the user can \r\tverify that the currently selected class category and all of its classes\r \tshould be removed from the system. If so, remove it.\"\r\r\tself inform: 'Use a normal Browser, in which you can see \rthe entire category you are trying to remove.'! !\r\r!HierarchyBrowser methodsFor: 'menu messages' stamp: 'sw 11/8/1999 13:35'!\rsystemCatSingletonKey: aChar from: aView\r\t^ self systemCatListKey: aChar from: aView! !\r\r!HierarchyBrowser methodsFor: 'menu messages' stamp: 'sw 11/8/1999 14:08'!\rsystemCatSingletonMenu: aMenu\r\r\t^ aMenu labels:\r'find class... (f)\rbrowse\rprintOut\rfileOut\rupdate\rrename...\rremove' \r\tlines: #(1 4)\r\tselections:\r\t\t#(findClass buildSystemCategoryBrowser\r\t\tprintOutSystemCategory fileOutSystemCategory updateSystemCategories\r\t\t renameSystemCategory removeSystemCategory )\r! !\r\r\r!HierarchyBrowser methodsFor: 'class list' stamp: 'sw 3/24/2002 01:55'!\rassureSelectionsShow\r\t\"This is a workaround for the fact that a hierarchy browser, when launched, often does not show the selected class\"\r\r\t| saveCatIndex saveMsgIndex |\r\tsaveCatIndex _ messageCategoryListIndex.\r\tsaveMsgIndex _ messageListIndex.\r\tself classListIndex: classListIndex.\r\tself messageCategoryListIndex: saveCatIndex.\r\tself messageListIndex: saveMsgIndex! !\r\r!HierarchyBrowser methodsFor: 'class list' stamp: 'mir 3/22/2000 13:02'!\rclassList\r\tclassList _ classList select: [:each | Smalltalk includesKey: each withBlanksTrimmed asSymbol].\r\t^ classList! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rHierarchyBrowser class\r\tinstanceVariableNames: ''!\r\r!HierarchyBrowser class methodsFor: 'as yet unclassified' stamp: 'dew 9/15/2001 16:19'!\rnewFor: aClass\r\t\"Open a new HierarchyBrowser on the given class\"\r\t|  newBrowser |\r\tnewBrowser _ HierarchyBrowser new initHierarchyForClass: aClass.\r\tBrowser openBrowserView: (newBrowser openSystemCatEditString: nil)\r\t\tlabel: newBrowser labelString\r\r\"HierarchyBrowser newFor: Boolean\"! !\r\r!HierarchyBrowser class methodsFor: 'as yet unclassified' stamp: 'sw 10/23/2000 18:20'!\rnewFor: aClass labeled: aLabel\r\t\"Open a new HierarchyBrowser on the given class, using aLabel as the window title.\"\r\r\t|  newBrowser |\r\tnewBrowser _ HierarchyBrowser new initHierarchyForClass: aClass.\r\tBrowser openBrowserView: (newBrowser openSystemCatEditString: nil)\r\t\tlabel: aLabel\r\r\"HierarchyBrowser newFor: Boolean labeled: 'Testing'\"! !\rBag subclass: #IdentityBag\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Unordered'!\r!IdentityBag commentStamp: '<historical>' prior: 0!\rLike a Bag, except that items are compared with #== instead of #= .\r\rSee the comment of IdentitySet for more information.\r!\r]style[(88 11 23)f3,f3LIdentitySet Comment;,f3!\r\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rIdentityBag class\r\tinstanceVariableNames: ''!\r\r!IdentityBag class methodsFor: 'instance creation' stamp: 'nk 3/17/2001 09:53'!\rcontentsClass\r\t^IdentityDictionary! !\rDictionary subclass: #IdentityDictionary\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Unordered'!\r!IdentityDictionary commentStamp: 'ls 06/15/02 22:35' prior: 0!\rLike a Dictionary, except that keys are compared with #== instead of #= .\r\rSee the comment of IdentitySet for more information.!\r]style[(94 11 22)f1,f1LIdentitySet Comment;,f1!\r\r\r!IdentityDictionary methodsFor: 'private' stamp: 'di 12/1/1999 20:54'!\rkeyAtValue: value ifAbsent: exceptionBlock\r\t\"Answer the key that is the external name for the argument, value. If \r\tthere is none, answer the result of evaluating exceptionBlock.\"\r \r\tself associationsDo: \r\t\t[:association | value == association value ifTrue: [^ association key]].\r\t^ exceptionBlock value! !\r\r!IdentityDictionary methodsFor: 'private' stamp: 'di 10/1/97 20:51'!\rkeys\r\t\"Answer a Set containing the receiver's keys.\"\r\t| aSet |\r\taSet _ IdentitySet new: self size.\r\tself keysDo: [:key | aSet add: key].\r\t^ aSet! !\r\r!IdentityDictionary methodsFor: 'private' stamp: 'jm 2/18/98 13:18'!\rscanFor: anObject\r\t\"Scan the key array for the first slot containing either a nil (indicating an empty slot) or an element that matches anObject. Answer the index of that slot or zero if no slot is found. This method will be overridden in various subclasses that have different interpretations for matching elements.\"\r\t| finish hash start element |\r\tfinish _ array size.\r\tfinish > 4096\r\t\tifTrue: [hash _ anObject identityHash * (finish // 4096)]\r\t\tifFalse: [hash _ anObject identityHash].\r\tstart _ (hash \\\\ array size) + 1.\r\r\t\"Search from (hash mod size) to the end.\"\r\tstart to: finish do:\r\t\t[:index | ((element _ array at: index) == nil or: [element key == anObject])\r\t\t\tifTrue: [^ index ]].\r\r\t\"Search from 1 to where we started.\"\r\t1 to: start-1 do:\r\t\t[:index | ((element _ array at: index) == nil or: [element key == anObject])\r\t\t\tifTrue: [^ index ]].\r\r\t^ 0  \"No match AND no empty slot\"! !\rSet subclass: #IdentitySet\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Unordered'!\r!IdentitySet commentStamp: 'sw 1/14/2003 22:35' prior: 0!\rThe same as a Set, except that items are compared using #== instead of #=.\r\rAlmost any class named IdentityFoo is the same as Foo except for the way items are compared.  In Foo, #= is used, while in IdentityFoo, #== is used.  That is, identity collections will treat items as the same only if they have the same identity.\r\rFor example, note that copies of a string are equal:\r\r\t('abc' copy) = ('abc' copy)\r\rbut they are not identitcal:\r\r\t('abc' copy) == ('abc' copy)\r\rA regular Set will only include equal objects once:\r\r\t| aSet |\r\taSet := Set new.\r\taSet add: 'abc' copy.\r\taSet add: 'abc' copy.\r\taSet\r\r\rAn IdentitySet will include multiple equal objects if they are not identical:\r\r\t| aSet |\r\taSet := IdentitySet new.\r\taSet add: 'abc' copy.\r\taSet add: 'abc' copy.\r\taSet\r!\r\r\r!IdentitySet methodsFor: 'private' stamp: 'jm 2/18/98 13:19'!\rscanFor: anObject\r\t\"Scan the key array for the first slot containing either a nil (indicating an empty slot) or an element that matches anObject. Answer the index of that slot or zero if no slot is found. This method will be overridden in various subclasses that have different interpretations for matching elements.\"\r\t| finish hash start element |\r\tfinish _ array size.\r\tfinish > 4096\r\t\tifTrue: [hash _ anObject identityHash * (finish // 4096)]\r\t\tifFalse: [hash _ anObject identityHash].\r\tstart _ (hash \\\\ array size) + 1.\r\r\t\"Search from (hash mod size) to the end.\"\r\tstart to: finish do:\r\t\t[:index | ((element _ array at: index) == nil or: [element == anObject])\r\t\t\tifTrue: [^ index ]].\r\r\t\"Search from 1 to where we started.\"\r\t1 to: start-1 do:\r\t\t[:index | ((element _ array at: index) == nil or: [element == anObject])\r\t\t\tifTrue: [^ index ]].\r\r\t^ 0  \"No match AND no empty slot\"! !\r\r\r!IdentitySet methodsFor: 'converting' stamp: 'ar 9/22/2000 10:13'!\rasIdentitySet\r\t^self! !\rException subclass: #IllegalResumeAttempt\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Exceptions Kernel'!\r!IllegalResumeAttempt commentStamp: '<historical>' prior: 0!\rThis class is private to the EHS implementation.  An instance of it is signaled whenever an attempt is made to resume from an exception which answers false to #isResumable.!\r\r\r!IllegalResumeAttempt methodsFor: 'comment' stamp: 'ajh 9/4/2002 19:24'!\rdefaultAction\r\t\"No one has handled this error, but now give them a chance to decide how to debug it.  If none handle this either then open debugger (see UnhandedError-defaultAction)\"\r\r\tUnhandledError signalForException: self! !\r\r!IllegalResumeAttempt methodsFor: 'comment' stamp: 'ajh 2/1/2003 00:57'!\risResumable\r\t\r\t^ false! !\rObject subclass: #ImageReadWriter\r\tinstanceVariableNames: 'stream'\r\tclassVariableNames: 'ImageNotStoredSignal MagicNumberErrorSignal'\r\tpoolDictionaries: ''\r\tcategory: 'Graphics-Files'!\r!ImageReadWriter commentStamp: '<historical>' prior: 0!\rCopyright (c) Kazuki Yasumatsu, 1995. All rights reserved.\r\rI am an abstract class to provide for encoding and/or decoding an image on a stream.\r\rInstance Variables:\r\tstream\t\t<ReadStream | WriteStream>\tstream for image storages\r\rClass Variables:\r\tImageNotStoredSignal\t\t<Signal>\timage not stored error signal\r\tMagicNumberErrorSignal\t\t<Signal>\tmagic number error signal\r\rSubclasses must implement the following messages:\r\taccessing\r\t\tnextImage\r\t\tnextPutImage:\r\ttesting\r\t\tcanUnderstand         (added tao 10/26/97)!\r\r\r!ImageReadWriter methodsFor: 'accessing'!\rnextImage\r\t\"Dencoding an image on stream and answer the image.\"\r\r\t^self subclassResponsibility! !\r\r!ImageReadWriter methodsFor: 'accessing'!\rnextPutImage: anImage\r\t\"Encoding anImage on stream.\"\r\r\t^self subclassResponsibility! !\r\r\r!ImageReadWriter methodsFor: 'stream access'!\ratEnd\r\r\t^stream atEnd! !\r\r!ImageReadWriter methodsFor: 'stream access' stamp: 'sd 1/30/2004 15:18'!\rclose\r\t\r\tstream close! !\r\r!ImageReadWriter methodsFor: 'stream access'!\rcontents\r\r\t^stream contents! !\r\r!ImageReadWriter methodsFor: 'stream access'!\rcr\r\r\t^stream nextPut: Character cr asInteger! !\r\r!ImageReadWriter methodsFor: 'stream access'!\rlf\r\t\"PPM and PBM are used LF as CR.\"\r\r\t^stream nextPut: Character lf asInteger! !\r\r!ImageReadWriter methodsFor: 'stream access'!\rnext\r\r\t^stream next! !\r\r!ImageReadWriter methodsFor: 'stream access'!\rnext: size\r\r\t^stream next: size! !\r\r!ImageReadWriter methodsFor: 'stream access'!\rnextLong\r\t\"Read a 32-bit quantity from the input stream.\"\r\r\t^(stream next bitShift: 24) + (stream next bitShift: 16) +\r\t\t(stream next bitShift: 8) + stream next! !\r\r!ImageReadWriter methodsFor: 'stream access'!\rnextLongPut: a32BitW\r\t\"Write out a 32-bit integer as 32 bits.\"\r\r\tstream nextPut: ((a32BitW bitShift: -24) bitAnd: 16rFF).\r\tstream nextPut: ((a32BitW bitShift: -16) bitAnd: 16rFF).\r\tstream nextPut: ((a32BitW bitShift: -8) bitAnd: 16rFF).\r\tstream nextPut: (a32BitW bitAnd: 16rFF).\r\t^a32BitW! !\r\r!ImageReadWriter methodsFor: 'stream access'!\rnextPut: aByte\r\r\t^stream nextPut: aByte! !\r\r!ImageReadWriter methodsFor: 'stream access'!\rnextPutAll: aByteArray\r\r\t^stream nextPutAll: aByteArray! !\r\r!ImageReadWriter methodsFor: 'stream access'!\rnextWord\r\t\"Read a 16-bit quantity from the input stream.\"\r\r\t^(stream next bitShift: 8) + stream next! !\r\r!ImageReadWriter methodsFor: 'stream access'!\rnextWordPut: a16BitW\r\t\"Write out a 16-bit integer as 16 bits.\"\r\r\tstream nextPut: ((a16BitW bitShift: -8) bitAnd: 16rFF).\r\tstream nextPut: (a16BitW bitAnd: 16rFF).\r\t^a16BitW! !\r\r!ImageReadWriter methodsFor: 'stream access' stamp: 'tao 10/23/97 18:00'!\rpeekFor: aValue\r\r\t^stream peekFor: aValue! !\r\r!ImageReadWriter methodsFor: 'stream access'!\rposition\r\r\t^stream position! !\r\r!ImageReadWriter methodsFor: 'stream access'!\rposition: anInteger\r\r\t^stream position: anInteger! !\r\r!ImageReadWriter methodsFor: 'stream access'!\rsize\r\r\t^stream size! !\r\r!ImageReadWriter methodsFor: 'stream access'!\rskip: anInteger\r\r\t^stream skip: anInteger! !\r\r!ImageReadWriter methodsFor: 'stream access'!\rspace\r\r\t^stream nextPut: Character space asInteger! !\r\r!ImageReadWriter methodsFor: 'stream access'!\rtab\r\r\t^stream nextPut: Character tab asInteger! !\r\r\r!ImageReadWriter methodsFor: 'private'!\rchangePadOfBits: bits width: width height: height depth: depth from: oldPad\rto: newPad\r\t\"Change padding size of bits.\"\r\r\t| srcRowByteSize dstRowByteSize newBits srcRowBase rowEndOffset |\r\t(#(8 16 32) includes: oldPad)\r\t\tifFalse: [^self error: 'Invalid pad: ', oldPad printString].\r\t(#(8 16 32) includes: newPad)\r\t\tifFalse: [^self error: 'Invalid pad: ', newPad printString].\r\tsrcRowByteSize _ width * depth + oldPad - 1 // oldPad * (oldPad / 8).\r\tsrcRowByteSize * height = bits size\r\t\tifFalse: [^self error: 'Incorrect bitmap array size.'].\r\tdstRowByteSize _ width * depth + newPad - 1 // newPad * (newPad / 8).\r\tnewBits _ ByteArray new: dstRowByteSize * height.\r\tsrcRowBase _ 1.\r\trowEndOffset _ dstRowByteSize - 1.\r\t1 to: newBits size by: dstRowByteSize do:\r\t\t[:dstRowBase |\r\t\tnewBits replaceFrom: dstRowBase\r\t\t\tto: dstRowBase + rowEndOffset\r\t\t\twith: bits\r\t\t\tstartingAt: srcRowBase.\r\t\tsrcRowBase _ srcRowBase + srcRowByteSize].\r\t^newBits! !\r\r!ImageReadWriter methodsFor: 'private'!\rhasMagicNumber: aByteArray\r\t| position |\r\tposition _ stream position.\r\t((stream size - position) >= aByteArray size and:\r\t[(stream next: aByteArray size)  = aByteArray])\r\t\tifTrue: [^true].\r\tstream position: position.\r\t^false! !\r\r!ImageReadWriter methodsFor: 'private' stamp: 'sd 1/30/2004 15:18'!\ron: aStream\r\t(stream _ aStream) reset.\r\tstream binary.\r\t\"Note that 'reset' makes a file be text.  Must do this after.\"! !\r\r!ImageReadWriter methodsFor: 'private'!\runpackBits: bits depthTo8From: depth with: width height: height pad: pad\r\t\"Unpack bits of depth 1, 2, or 4 image to it of depth 8 image.\"\r\r\t| bitMask pixelInByte bitsWidth upBitsWidth stopWidth\r\t trailingSize upBits bitIndex upBitIndex val |\r\t(#(1 2 4) includes: depth)\r\t\tifFalse: [^self error: 'depth must be 1, 2, or 4'].\r\t(#(8 16 32) includes: pad)\r\t\tifFalse: [^self error: 'pad must be 8, 16, or 32'].\r\tbitMask _ (1 bitShift: depth) - 1.\r\tpixelInByte _ 8 / depth.\r\tbitsWidth _ width * depth + pad - 1 // pad * (pad / 8).\r\tupBitsWidth _ width * 8 + pad - 1 // pad * (pad / 8).\r\tstopWidth _ width * depth + 7 // 8.\r\ttrailingSize _ width - (stopWidth - 1 * pixelInByte).\r\tupBits _ ByteArray new: upBitsWidth * height.\r\t1 to: height do: [:i |\r\t\tbitIndex _ i - 1 * bitsWidth.\r\t\tupBitIndex _ i - 1 * upBitsWidth.\r\t\t1 to: stopWidth - 1 do: [:j |\r\t\t\tval _ bits at: (bitIndex _ bitIndex + 1).\r\t\t\tupBitIndex _ upBitIndex + pixelInByte.\r\t\t\t1 to: pixelInByte do: [:k |\r\t\t\t\tupBits at: (upBitIndex - k + 1) put: (val bitAnd: bitMask).\r\t\t\t\tval _ val bitShift: depth negated]].\r\t\tval _ (bits at: (bitIndex _ bitIndex + 1))\r\t\t\t\tbitShift: depth negated * (pixelInByte - trailingSize).\r\t\tupBitIndex _ upBitIndex + trailingSize.\r\t\t1 to: trailingSize do: [:k |\r\t\t\tupBits at: (upBitIndex - k + 1) put: (val bitAnd: bitMask).\r\t\t\tval _ val bitShift: depth negated]].\r\t^ upBits\r! !\r\r\r!ImageReadWriter methodsFor: 'testing' stamp: 'tao 10/27/97 09:26'!\runderstandsImageFormat\r\t\"Test to see if the image stream format is understood by this decoder.\r\tThis should be implemented in each subclass of ImageReadWriter so that\r\ta proper decoder can be selected without ImageReadWriter having to know\r\tabout all possible image file types.\"\r\r\t^ false! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rImageReadWriter class\r\tinstanceVariableNames: ''!\r\r!ImageReadWriter class methodsFor: 'instance creation'!\ron: aStream\r\t\"Answer an instance of the receiver for encoding and/or decoding images on the given.\"\r\r\t^ self new on: aStream\r! !\r\r\r!ImageReadWriter class methodsFor: 'image reading/writing' stamp: 'nk 7/16/2003 17:59'!\rallTypicalFileExtensions\r\t\"Answer a collection of file extensions (lowercase) which files that my subclasses can read might commonly have\"\r\t\"ImageReadWriter allTypicalFileExtensions\"\r\t| extensions |\r\textensions _ Set new.\r\tself allSubclassesDo: [ :cls | extensions addAll: cls typicalFileExtensions ].\r\t^extensions! !\r\r!ImageReadWriter class methodsFor: 'image reading/writing' stamp: 'ls 9/15/1998 19:08'!\rformFromFileNamed: fileName\r\t\"Answer a ColorForm stored on the file with the given name.\"\r\t| stream |\r\tstream _ FileStream readOnlyFileNamed: fileName.\r\t^self formFromStream: stream! !\r\r!ImageReadWriter class methodsFor: 'image reading/writing' stamp: 'sd 1/30/2004 15:18'!\rformFromStream: aBinaryStream\r\t\"Answer a ColorForm stored on the given stream.  closes the stream\"\r\t| reader readerClass form  |\r\r\treaderClass _ self withAllSubclasses\r\t\tdetect: [:subclass | subclass understandsImageFormat: aBinaryStream]\r\t\tifNone: [\r\t\t\taBinaryStream close.\r\t\t\t^self error: 'image format not recognized'].\r\treader _ readerClass new on: aBinaryStream reset.\r\tCursor read showWhile: [\r\t\tform _ reader nextImage.\r\t\treader close].\r\t^ form\r! !\r\r!ImageReadWriter class methodsFor: 'image reading/writing'!\rputForm: aForm onFileNamed: fileName\r\t\"Store the given form on a file of the given name.\"\r\r\t| writer |\r\twriter _ self on: (FileStream newFileNamed: fileName) binary.\r\tCursor write showWhile: [writer nextPutImage: aForm].\r\twriter close.\r! !\r\r!ImageReadWriter class methodsFor: 'image reading/writing' stamp: 'tk\r9/13/97 16:13'!\rputForm: aForm onStream: aWriteStream\r\t\"Store the given form on a file of the given name.\"\r\r\t| writer |\r\twriter _ self on: aWriteStream.\r\tCursor write showWhile: [writer nextPutImage: aForm].\r\twriter close.\r! !\r\r!ImageReadWriter class methodsFor: 'image reading/writing' stamp: 'nk 7/16/2003 17:55'!\rtypicalFileExtensions\r\t\"Answer a collection of file extensions (lowercase) which files that I can read might commonly have\"\r\t^#()! !\r\r!ImageReadWriter class methodsFor: 'image reading/writing' stamp: 'ar 6/16/2002 17:33'!\runderstandsImageFormat: aStream\r\t^(self new on: aStream) understandsImageFormat! !\rNotification subclass: #InMidstOfFileinNotification\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Exceptions Kernel'!\r\r!InMidstOfFileinNotification methodsFor: 'as yet unclassified' stamp: 'RAA 5/28/2001 17:07'!\rdefaultAction\r\r\tself resume: false! !\rDisplayObject subclass: #InfiniteForm\r\tinstanceVariableNames: 'patternForm'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Graphics-Display Objects'!\r!InfiniteForm commentStamp: '<historical>' prior: 0!\rI represent a Form obtained by replicating a pattern form indefinitely in all directions.!\r\r\r!InfiniteForm methodsFor: 'accessing' stamp: 'mjg 7/9/2001 14:12'!\rasColor\r\t^ patternForm dominantColor! !\r\r!InfiniteForm methodsFor: 'accessing'!\rasForm\r\t^ patternForm! !\r\r!InfiniteForm methodsFor: 'accessing' stamp: 'di 9/2/97 20:21'!\rdominantColor\r\t^ patternForm dominantColor! !\r\r!InfiniteForm methodsFor: 'accessing'!\roffset \r\t\"Refer to the comment in DisplayObject|offset.\"\r\r\t^0 @ 0! !\r\r\r!InfiniteForm methodsFor: 'displaying' stamp: 'sw 2/16/98 03:42'!\rcolorForInsets\r\t^ Color transparent! !\r\r!InfiniteForm methodsFor: 'displaying' stamp: 'nk 4/17/2004 19:48'!\rdisplayOn: aDisplayMedium at: aDisplayPoint clippingBox: clipRectangle rule: ruleInteger fillColor: aForm\r\t\"This is the real display message, but it doesn't get used until the new\r\tdisplay protocol is installed.\"\r\t| targetBox patternBox bb |\r\t(patternForm isForm) ifFalse:\r\t\t[^ aDisplayMedium fill: clipRectangle rule: ruleInteger fillColor: patternForm].\r\r\t\"Do it iteratively\"\r\ttargetBox _ aDisplayMedium boundingBox intersect: clipRectangle.\r\tpatternBox _ patternForm boundingBox.\r\tbb _ BitBlt current destForm: aDisplayMedium sourceForm: patternForm fillColor: aForm\r\t\tcombinationRule: ruleInteger destOrigin: 0@0 sourceOrigin: 0@0\r\t\textent: patternBox extent clipRect: clipRectangle.\r\tbb colorMap:\r\t\t(patternForm colormapIfNeededFor: aDisplayMedium).\r\t(targetBox left truncateTo: patternBox width)\r\t\tto: targetBox right - 1 by: patternBox width do:\r\t\t[:x |\r\t\t(targetBox top truncateTo: patternBox height)\r\t\t\tto: targetBox bottom - 1 by: patternBox height do:\r\t\t\t[:y |\r\t\t\tbb destOrigin: x@y; copyBits]]! !\r\r!InfiniteForm methodsFor: 'displaying' stamp: 'nk 4/17/2004 19:48'!\rdisplayOnPort: aPort at: offset\r\r\t| targetBox patternBox savedMap top left |\r\r\tself flag: #bob.\r\r\t\"this *may* not get called at the moment. I have been trying to figure out the right way for this to work and am using #displayOnPort:offsetBy: as my current offering - Bob\"\r\r\t(patternForm isForm) ifFalse: [\r\t\t\"patternForm is a Pattern or Color; just use it as a mask for BitBlt\"\r\t\t^ aPort fill: aPort clipRect fillColor: patternForm rule: Form over].\r\r\t\"do it iteratively\"\r\ttargetBox _ aPort clipRect.\r\tpatternBox _ patternForm boundingBox.\r\tsavedMap _ aPort colorMap.\r\taPort sourceForm: patternForm;\r\t\tfillColor: nil;\r\t\tcombinationRule: Form paint;\r\t\tsourceRect: (0@0 extent: patternBox extent);\r\t\tcolorMap: (patternForm colormapIfNeededFor: aPort destForm).\r\ttop _ (targetBox top truncateTo: patternBox height) \"- (offset y \\\\ patternBox height)\".\r\tleft _  (targetBox left truncateTo: patternBox width) \"- (offset x \\\\ patternBox width)\".\r\tleft to: (targetBox right - 1) by: patternBox width do:\r\t\t[:x | top to: (targetBox bottom - 1) by: patternBox height do:\r\t\t\t[:y | aPort destOrigin: x@y; copyBits]].\r\taPort colorMap: savedMap.\r! !\r\r!InfiniteForm methodsFor: 'displaying' stamp: 'ar 8/16/2001 12:47'!\rraisedColor\r\t^ Color transparent! !\r\r\r!InfiniteForm methodsFor: 'display box access'!\rcomputeBoundingBox \r\t\"Refer to the comment in DisplayObject|computeBoundingBox.\"\r\r\t^0 @ 0 corner: SmallInteger maxVal @ SmallInteger maxVal! !\r\r\r!InfiniteForm methodsFor: 'private'!\rform: aForm\r\r\tpatternForm _ aForm! !\r\r\r!InfiniteForm methodsFor: 'fillstyle protocol' stamp: 'bolot 9/15/1999 10:13'!\rbitPatternForDepth: suspectedDepth\r\t^ patternForm! !\r\r!InfiniteForm methodsFor: 'fillstyle protocol' stamp: 'ar 7/2/1999 14:56'!\rdirection\r\t^patternForm width @ 0! !\r\r!InfiniteForm methodsFor: 'fillstyle protocol' stamp: 'ar 7/2/1999 14:54'!\rform\r\t\"Bitmap fills respond to #form\"\r\t^patternForm! !\r\r!InfiniteForm methodsFor: 'fillstyle protocol' stamp: 'ar 7/2/1999 14:54'!\risBitmapFill\r\t^true! !\r\r!InfiniteForm methodsFor: 'fillstyle protocol' stamp: 'ar 7/2/1999 14:54'!\risGradientFill\r\t^false! !\r\r!InfiniteForm methodsFor: 'fillstyle protocol' stamp: 'ar 7/2/1999 14:59'!\risOrientedFill\r\t^true! !\r\r!InfiniteForm methodsFor: 'fillstyle protocol' stamp: 'ar 7/2/1999 14:54'!\risSolidFill\r\t^false! !\r\r!InfiniteForm methodsFor: 'fillstyle protocol' stamp: 'ar 9/2/1999 14:32'!\risTranslucent\r\t\"Return true since the bitmap may be translucent and we don't really want to check\"\r\t^true! !\r\r!InfiniteForm methodsFor: 'fillstyle protocol' stamp: 'ar 7/2/1999 14:57'!\rnormal\r\t^0 @ patternForm height! !\r\r!InfiniteForm methodsFor: 'fillstyle protocol' stamp: 'ar 7/2/1999 14:56'!\rorigin\r\t^0@0! !\r\r\r!InfiniteForm methodsFor: 'as yet unclassified' stamp: 'RAA 6/1/2000 10:50'!\raddFillStyleMenuItems: aMenu hand: aHand from: aMorph\r\t\"Add the items for changing the current fill style of the receiver\"\r\r\t\"prevents a walkback when control menu is built for morph with me as color\"! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rInfiniteForm class\r\tinstanceVariableNames: ''!\r\r!InfiniteForm class methodsFor: 'instance creation'!\rwith: aForm \r\t\"Answer an instance of me whose pattern form is the argument, aForm.\"\r\r\t^self new form: aForm! !\rObject subclass: #InputSensor\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'ButtonDecodeTable InterruptSemaphore InterruptWatcherProcess KeyDecodeTable'\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Processes'!\r!InputSensor commentStamp: '<historical>' prior: 0!\rAn InputSensor is an interface to the user input devices.\rThere is at least one (sub)instance of InputSensor named Sensor in the system.\r\rClass variables:\r\rButtonDecodeTable <ByteArray> - maps mouse buttons as reported by the VM to ones reported in the events.\r\rKeyDecodeTable <Dictionary<SmallInteger->SmallInteger>> - maps some keys and their modifiers to other keys (used for instance to map Ctrl-X to Alt-X)\r\rInterruptSemaphore <Semaphore> - signalled by the the VM and/or the event loop upon receiving an interrupt keystroke.\r\rInterruptWatcherProcess <Process> - waits on the InterruptSemaphore and then responds as appropriate.!\r\r\r!InputSensor methodsFor: 'accessing' stamp: 'ar 10/11/2000 17:34'!\reventQueue\r\t^nil! !\r\r!InputSensor methodsFor: 'accessing' stamp: 'ar 10/11/2000 17:35'!\reventQueue: aSharedQueue\r! !\r\r!InputSensor methodsFor: 'accessing' stamp: 'JMM 10/5/2001 12:54'!\rflushAllButDandDEvents! !\r\r\r!InputSensor methodsFor: 'cursor' stamp: 'di 4/13/2000 12:15'!\rcurrentCursor\r\t\"The current cursor is maintained in class Cursor.\"\r\r\t^ Cursor currentCursor! !\r\r!InputSensor methodsFor: 'cursor' stamp: 'di 4/13/2000 12:16'!\rcurrentCursor: newCursor \r\t\"The current cursor is maintained in class Cursor.\"\r\r\tCursor currentCursor: newCursor.! !\r\r!InputSensor methodsFor: 'cursor'!\rcursorPoint\r\t\"Answer a Point indicating the cursor location.\"\r\r\t^self mousePoint! !\r\r!InputSensor methodsFor: 'cursor'!\rcursorPoint: aPoint \r\t\"Set aPoint to be the current cursor location.\"\r\r\t^self primCursorLocPut: aPoint! !\r\r\r!InputSensor methodsFor: 'initialize' stamp: 'ar 9/26/2000 21:35'!\rflushEvents\r\t\"Do nothing\"! !\r\r!InputSensor methodsFor: 'initialize' stamp: 'nk 4/12/2004 19:45'!\rshutDown\r\tInterruptWatcherProcess ifNotNil: [\r\t\tInterruptWatcherProcess terminate.\r\t\tInterruptWatcherProcess _ nil ].! !\r\r!InputSensor methodsFor: 'initialize' stamp: 'ar 7/23/2000 00:00'!\rstartUp\r\tself installInterruptWatcher.! !\r\r\r!InputSensor methodsFor: 'keyboard'!\rflushKeyboard\r\t\"Remove all characters from the keyboard buffer.\"\r\r\t[self keyboardPressed]\r\t\twhileTrue: [self keyboard]! !\r\r!InputSensor methodsFor: 'keyboard'!\rkeyboard\r\t\"Answer the next character from the keyboard.\"\r\r\t^ self characterForKeycode: self primKbdNext! !\r\r!InputSensor methodsFor: 'keyboard'!\rkeyboardPeek\r\t\"Answer the next character in the keyboard buffer without removing it, or nil if it is empty.\"\r\r\t^ self characterForKeycode: self primKbdPeek! !\r\r!InputSensor methodsFor: 'keyboard'!\rkeyboardPressed\r\t\"Answer true if keystrokes are available.\"\r\r\t^self primKbdPeek notNil! !\r\r\r!InputSensor methodsFor: 'modifier keys'!\rcommandKeyPressed\r\t\"Answer whether the command key on the keyboard is being held down.\"\r\r\t^ self primMouseButtons anyMask: 64! !\r\r!InputSensor methodsFor: 'modifier keys'!\rcontrolKeyPressed\r\t\"Answer whether the control key on the keyboard is being held down.\"\r\r\t^ self primMouseButtons anyMask: 16! !\r\r!InputSensor methodsFor: 'modifier keys'!\rleftShiftDown\r\t\"Answer whether the shift key on the keyboard is being held down. The name of this message is a throwback to the Alto, which had independent left and right shift keys.\"\r\r\t^ self primMouseButtons anyMask: 8! !\r\r!InputSensor methodsFor: 'modifier keys' stamp: 'jm 5/21/1998 16:13'!\rshiftPressed\r\t\"Answer whether the shift key on the keyboard is being held down.\"\r\r\t^ self primMouseButtons anyMask: 8\r! !\r\r\r!InputSensor methodsFor: 'mouse' stamp: 'nk 3/17/2004 07:24'!\ranyButtonPressed\r\t\"Answer whether at least one mouse button is currently being pressed.\"\r\r\t^ self primMouseButtons anyMask: 7\r! !\r\r!InputSensor methodsFor: 'mouse' stamp: 'nk 3/17/2004 07:24'!\rblueButtonPressed\r\t\"Answer whether only the blue mouse button is being pressed. \r\tThis is the third mouse button or cmd+click on the Mac.\"\r\r\t^ (self primMouseButtons bitAnd: 7) = 1\r! !\r\r!InputSensor methodsFor: 'mouse'!\rmousePoint\r\t\"Answer a Point indicating the coordinates of the current mouse location.\"\r\r\t^self primMousePt! !\r\r!InputSensor methodsFor: 'mouse' stamp: 'nk 3/17/2004 07:02'!\rnoButtonPressed\r\t\"Answer whether any mouse button is not being pressed.\"\r\r\t^self anyButtonPressed not\r! !\r\r!InputSensor methodsFor: 'mouse' stamp: 'nk 3/17/2004 07:16'!\rredButtonPressed\r\t\"Answer true if only the red mouse button is being pressed.\r\tThis is the first mouse button, usually the left one.\"\r\r\t^ (self primMouseButtons bitAnd: 7) = 4\r! !\r\r!InputSensor methodsFor: 'mouse' stamp: 'nk 3/17/2004 07:22'!\rwaitButton\r\t\"Wait for the user to press any mouse button and then answer with the \r\tcurrent location of the cursor.\"\r\r\t| delay |\r\tdelay _ Delay forMilliseconds: 50.\r\t[self anyButtonPressed] whileFalse: [ delay wait ].\r\t^self cursorPoint\r! !\r\r!InputSensor methodsFor: 'mouse' stamp: 'nk 3/17/2004 07:22'!\rwaitButtonOrKeyboard\r\t\"Wait for the user to press either any mouse button or any key. \r\tAnswer the current cursor location or nil if a keypress occured.\"\r\r\t| delay |\r\tdelay := Delay forMilliseconds: 50.\r\t[self anyButtonPressed]\r\t\twhileFalse: [delay wait.\r\t\t\tself keyboardPressed\r\t\t\t\tifTrue: [^ nil]].\r\t^ self cursorPoint\r! !\r\r!InputSensor methodsFor: 'mouse' stamp: 'nk 3/17/2004 07:25'!\rwaitNoButton\r\t\"Wait for the user to release any mouse button and then answer the current location of the cursor.\"\r\r\t| delay |\r\tdelay _ Delay forMilliseconds: 50.\r\t[self anyButtonPressed] whileTrue: [ delay wait].\r\t^self cursorPoint\r! !\r\r!InputSensor methodsFor: 'mouse' stamp: 'nk 3/17/2004 07:05'!\ryellowButtonPressed\r\t\"Answer whether only the yellow mouse button is being pressed. \r\tThis is the second mouse button or option+click on the Mac.\"\r\r\t^ (self primMouseButtons bitAnd: 7) = 2\r! !\r\r\r!InputSensor methodsFor: 'tablet' stamp: 'jm 4/13/1999 11:02'!\rtabletExtent\r\t\"Answer the full tablet extent in tablet coordinates.\"\r\r\t| params |\r\tparams _ self primTabletGetParameters: 1.\r\tparams ifNil: [^ self error: 'no tablet available'].\r\t^ (params at: 1)@(params at: 2)\r! !\r\r!InputSensor methodsFor: 'tablet' stamp: 'jm 4/13/1999 11:12'!\rtabletPoint\r\t\"Answer the current position of the first tablet pointing device (pen, puck, or eraser) in tablet coordinates.\"\r\r\t| data |\r\tdata _ self primTabletRead: 1.  \"state of first/primary pen\"\r\t^ (data at: 3) @ (data at: 4)\r! !\r\r!InputSensor methodsFor: 'tablet' stamp: 'jm 4/12/1999 13:05'!\rtabletPressure\r\t\"Answer the current pressure of the first tablet pointing device (pen, puck, or eraser), a number between 0.0 (no pressure) and 1.0 (max pressure)\"\r\r\t| params data |\r\tparams _ self primTabletGetParameters: 1.\r\tparams ifNil: [^ self].\r\tdata _ self primTabletRead: 1.  \"state of first/primary pen\"\r\t^ (data at: 10) asFloat / ((params at: 10) - 1)\r! !\r\r\r!InputSensor methodsFor: 'user interrupts' stamp: 'nk 4/12/2004 19:36'!\reventTicklerProcess\r\t\"Answer my event tickler process, if any\"\r\t^nil! !\r\r!InputSensor methodsFor: 'user interrupts' stamp: 'nk 6/21/2004 10:41'!\rinstallInterruptWatcher\r\t\"Initialize the interrupt watcher process. Terminate the old process if any.\"\r\t\"Sensor installInterruptWatcher\"\r\r\tInterruptWatcherProcess ifNotNil: [InterruptWatcherProcess terminate].\r\tInterruptSemaphore _ Semaphore new.\r\tInterruptWatcherProcess _ [self userInterruptWatcher] forkAt: Processor lowIOPriority.\r\tself primInterruptSemaphore: InterruptSemaphore.! !\r\r!InputSensor methodsFor: 'user interrupts' stamp: 'nk 10/28/2000 20:33'!\rinterruptWatcherProcess\r\t\"Answer my interrupt watcher process, if any\"\r\t^InterruptWatcherProcess! !\r\r!InputSensor methodsFor: 'user interrupts'!\rsetInterruptKey: anInteger\r\t\"Register the given keycode as the user interrupt key.\"\r\r\tself primSetInterruptKey: anInteger.\r! !\r\r!InputSensor methodsFor: 'user interrupts' stamp: 'di 2/4/1999 15:24'!\ruserInterruptWatcher\r\t\"Wait for user interrupts and open a notifier on the active process when one occurs.\"\r\r\t[true] whileTrue: [\r\t\tInterruptSemaphore wait.\r\t\tDisplay deferUpdates: false.\r\t\tSmalltalk at: #SoundPlayer ifPresent: [:theClass | theClass shutDown].\r\t\tSmalltalk handleUserInterrupt]\r! !\r\r\r!InputSensor methodsFor: 'private'!\rcharacterForKeycode: keycode\r\t\"Map the given keycode to a Smalltalk character object. Encoding:\r\t\tA keycode is 12 bits:   <4 modifer bits><8 bit ISO character>\r\t\tModifier bits are:       <command><option><control><shift>\"\r\r\t\"NOTE: the command and option keys are specific to the Macintosh and may not have equivalents on other platforms.\"\r\r\tkeycode = nil ifTrue: [ ^nil ].\r\tkeycode class = Character ifTrue: [ ^keycode ].  \"to smooth the transition!!\"\r\t^ Character value: (keycode bitAnd: 16rFF)! !\r\r!InputSensor methodsFor: 'private'!\rprimCursorLocPut: aPoint\r\t\"If the primitive fails, try again with a rounded point.\"\r\r\t<primitive: 91>\r\t^ self primCursorLocPutAgain: aPoint rounded! !\r\r!InputSensor methodsFor: 'private'!\rprimCursorLocPutAgain: aPoint\r\t\"Do nothing if primitive is not implemented.\"\r\r\t<primitive: 91>\r\t^ self! !\r\r!InputSensor methodsFor: 'private' stamp: 'ar 7/23/2000 15:38'!\rprimInterruptSemaphore: aSemaphore \r\t\"Primitive. Install the argument as the semaphore to be signalled whenever the user presses the interrupt key. The semaphore will be signaled once each time the interrupt key is pressed.\"\r\r\t<primitive: 134>\r\t^self primitiveFailed\r\"Note: This primitive is obsolete with the new event driven architecture in which EventSensor can handle the interrupts itself. However, for supporting older images running on newer VMs the primitive must still be implemented.\"! !\r\r!InputSensor methodsFor: 'private'!\rprimKbdNext\r\t<primitive: 108>\r\t^ nil! !\r\r!InputSensor methodsFor: 'private'!\rprimKbdPeek\r\t<primitive: 109>\r\t^ nil! !\r\r!InputSensor methodsFor: 'private'!\rprimMouseButtons\r\t<primitive: 107>\r\t^ 0! !\r\r!InputSensor methodsFor: 'private'!\rprimMousePt\r\t\"Primitive. Poll the mouse to find out its position. Return a Point. Fail if\r\tevent-driven tracking is used instead of polling. Optional. See Object\r\tdocumentation whatIsAPrimitive.\"\r\r\t<primitive: 90>\r\t^ 0@0! !\r\r!InputSensor methodsFor: 'private' stamp: 'ar 7/23/2000 15:38'!\rprimSetInterruptKey: anInteger\r\t\"Primitive. Register the given keycode as the user interrupt key. The low byte of the keycode is the ISO character and its next four bits are the Smalltalk modifer bits <cmd><opt><ctrl><shift>.\"\r\r\t<primitive: 133>\r\t^self primitiveFailed\r\"Note: This primitive is obsolete with the new event driven architecture in which EventSensor can handle the interrupts itself. However, for supporting older images running on newer VMs the primitive must still be implemented.\"! !\r\r!InputSensor methodsFor: 'private' stamp: 'ar 2/2/2001 15:09'!\rprimTabletGetParameters: cursorIndex\r\t\"Answer the pen tablet parameters. For parameters that differ from cursor to cursor, answer those associated with the cursor having the given index. Answer nil if there is no pen tablet. The parameters are:\r\t1. tablet width, in tablet units\r\t2. tablet height, in tablet units\r\t3. number of tablet units per inch\r\t4. number of cursors (pens, pucks, etc; some tablets have more than one)\r\t5. this cursor index\r\t6. and 7. x scale and x offset for scaling tablet coordintes (e.g., to fit the screen)\r\t8. and 9. y scale and y offset for scaling tablet coordintes  (e.g., to fit the screen)\r\t10. number of pressure levels\r\t11. presure threshold needed close pen tip switch \r\t12. number of pen tilt angles\"\r\r\t<primitive: 'primitiveGetTabletParameters' module: 'JoystickTabletPlugin'>\r\t^ nil\r! !\r\r!InputSensor methodsFor: 'private' stamp: 'ar 2/2/2001 15:09'!\rprimTabletRead: cursorIndex\r\t\"Answer the pen tablet data for the cursor having the given index. Answer nil if there is no pen tablet. The data is:\r\t1. index of the cursor to which this data applies\r\t2. timestamp of the last state chance for this cursor\r\t3., 4., and 5. x, y, and z coordinates of the cursor (z is typically 0)\r\t6. and 7. xTilt and yTilt of the cursor; (signed)\r\t8. type of cursor (0 = unknown, 1 = pen, 2 = puck, 3 = eraser)\r\t9. cursor buttons\r\t10. cursor pressure, downward\r\t11. cursor pressure, tangential\r\t12. flags\"\r\r\t<primitive: 'primitiveReadTablet' module: 'JoystickTabletPlugin'>\r\tself primitiveFailed\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rInputSensor class\r\tinstanceVariableNames: ''!\r\r!InputSensor class methodsFor: 'public'!\rdefault\r\t\"Answer the default system InputSensor, Sensor.\"\r\r\t^ Sensor! !\r\r!InputSensor class methodsFor: 'public' stamp: 'nk 7/11/2002 07:09'!\rinstallDuplicateKeyEntryFor: c\r\t| key |\r\tkey _ c asInteger.\r\t\"first do control->alt key\"\r\tKeyDecodeTable at: { key bitAnd: 16r9F . 2 } put: { key . 8 }.\r\t\"then alt->alt key\"\r\tKeyDecodeTable at: { key . 8 } put: { key . 8 }\r! !\r\r!InputSensor class methodsFor: 'public' stamp: 'nk 2/11/2002 12:39'!\rinstallSwappedKeyEntryFor: c\r\t| key |\r\tkey _ c asInteger.\r\t\"first do control->alt key\"\r\tKeyDecodeTable at: { key bitAnd: 16r9F . 2 } put: { key . 8 }.\r\t\"then alt->control key\"\r\tKeyDecodeTable at: { key . 8 } put: { key bitAnd: 16r9F . 2 }! !\r\r\r!InputSensor class methodsFor: 'class initialization' stamp: 'nk 7/11/2002 07:41'!\rdefaultCrossPlatformKeys\r\t\"Answer a list of key letters that are used for common editing operations\r\ton different platforms.\"\r\t^{ $c . $x . $v . $a . $s . $f . $g . $z }\r! !\r\r!InputSensor class methodsFor: 'class initialization' stamp: 'nk 7/11/2002 07:41'!\rinstallKeyDecodeTable\r\t\"Create a decode table that swaps some keys if \r\tPreferences swapControlAndAltKeys is set\"\r\tKeyDecodeTable _ Dictionary new.\r\tPreferences duplicateControlAndAltKeys \r\t\tifTrue: [ self defaultCrossPlatformKeys do:\r\t\t\t\t[ :c | self installDuplicateKeyEntryFor: c ] ].\r\tPreferences swapControlAndAltKeys \r\t\tifTrue: [ self defaultCrossPlatformKeys do:\r\t\t\t\t[ :c | self installSwappedKeyEntryFor: c ] ].\r! !\r\r!InputSensor class methodsFor: 'class initialization' stamp: 'nk 2/10/2002 11:55'!\rinstallMouseDecodeTable\r\t\"Create a decode table that swaps the lowest-order 2 bits if \r\tPreferences swapMouseButtons is set\"\r\tButtonDecodeTable _ Preferences swapMouseButtons\r\t\t\t\tifTrue: [ByteArray withAll:\r\t\t\t\t\t\t\t((0 to: 255) collect: [:ea |\r\t\t\t\t\t\t\t\t((ea bitAnd: 1) << 1\r\t\t\t\t\t\t\t\t\tbitOr: (ea bitAnd: 2) >> 1)\r\t\t\t\t\t\t\t\t\t\tbitOr: (ea bitAnd: 16rFC) ])]\r\t\t\t\tifFalse: [ByteArray\r\t\t\t\t\t\twithAll: (0 to: 255)]! !\r\r\r!InputSensor class methodsFor: 'system startup' stamp: 'nk 6/21/2004 10:36'!\rshutDown\r\tself default shutDown.! !\r\r!InputSensor class methodsFor: 'system startup' stamp: 'nk 2/10/2002 11:57'!\rstartUp\r\t\r\tself installMouseDecodeTable.\r\tself installKeyDecodeTable.\r\tself default startUp! !\rStringHolder subclass: #Inspector\r\tinstanceVariableNames: 'object selectionIndex timeOfLastListUpdate selectionUpdateTime'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Inspector'!\r!Inspector commentStamp: '<historical>' prior: 0!\rI represent a query path into the internal representation of an object. As a StringHolder, the string I represent is the value of the currently selected variable of the observed object.!\r\r\r!Inspector methodsFor: 'accessing'!\rbaseFieldList\r\t\"Answer an Array consisting of 'self'\r\tand the instance variable names of the inspected object.\"\r\r\t^ (Array with: 'self' with: 'all inst vars')\r\t\t\t, object class allInstVarNames! !\r\r!Inspector methodsFor: 'accessing'!\rfieldList\r\t\"Answer the base field list plus an abbreviated list of indices.\"\r\r\tobject class isVariable ifFalse: [^ self baseFieldList].\r\t^ self baseFieldList ,\r\t\t(object basicSize <= (self i1 + self i2)\r\t\t\tifTrue: [(1 to: object basicSize)\r\t\t\t\t\t\tcollect: [:i | i printString]]\r\t\t\tifFalse: [(1 to: self i1) , (object basicSize-(self i2-1) to: object basicSize)\r\t\t\t\t\t\tcollect: [:i | i printString]])! !\r\r!Inspector methodsFor: 'accessing'!\ri1\r\t\"This is the max index shown before skipping to the \r\tlast i2 elements of very long arrays\"\r\t^ 100! !\r\r!Inspector methodsFor: 'accessing'!\ri2\r\t\"This is the number of elements to show at the end\r\tof very long arrays\"\r\t^ 10! !\r\r!Inspector methodsFor: 'accessing' stamp: 'sw 5/22/96'!\rinitialExtent\r\t\"Answer the desired extent for the receiver when it is first opened on the screen.  \"\r\r\t^ 250 @ 200! !\r\r!Inspector methodsFor: 'accessing' stamp: 'ajh 2/3/2003 19:19'!\rinspect: anObject \r\t\"Initialize the receiver so that it is inspecting anObject. There is no \r\tcurrent selection.\"\r\r\t| c |\r\tc _ anObject inspectorClass.\r\t(self class ~= c and: [self class format = c format]) ifTrue: [\r\t\tself primitiveChangeClassTo: c basicNew].\r\tself initialize.\r\tobject _ anObject.\r\tselectionIndex _ 0.\r\tcontents _ ''! !\r\r!Inspector methodsFor: 'accessing' stamp: 'svp 3/14/2000 21:57'!\rmodelWakeUpIn: aWindow\r\t| newText |\r\tself updateListsAndCodeIn: aWindow.\r\tnewText _ self contentsIsString\r\t\tifTrue: [newText _ self selection]\r\t\tifFalse: [\"keep it short to reduce time to compute it\"\r\t\t\tself selectionPrintString ].\r\tnewText = contents ifFalse:\r\t\t[contents _ newText.\r\t\tself changed: #contents]! !\r\r!Inspector methodsFor: 'accessing' stamp: 'sw 10/30/1999 23:59'!\rnoteSelectionIndex: anInteger for: aSymbol\r\taSymbol == #fieldList\r\t\tifTrue:\r\t\t\t[selectionIndex _ anInteger]! !\r\r!Inspector methodsFor: 'accessing'!\robject\r\t\"Answer the object being inspected by the receiver.\"\r\r\t^object! !\r\r!Inspector methodsFor: 'accessing' stamp: 'hg 10/14/2001 16:20'!\robject: anObject \r\t\"Set anObject to be the object being inspected by the receiver.\"\r\r\t| oldIndex |\r\tanObject == object\r\t\tifTrue: [self update]\r\t\tifFalse:\r\t\t\t[oldIndex _ selectionIndex <= 2 ifTrue: [selectionIndex] ifFalse: [0].\r\t\t\tself inspect: anObject.\r\t\t\toldIndex _ oldIndex min: self fieldList size.\r\t\t\tself changed: #inspectObject.\r\t\t\toldIndex > 0\r\t\t\t\tifTrue: [self toggleIndex: oldIndex].\r\t\t\tself changed: #fieldList.\r\t\t\tself changed: #contents]! !\r\r!Inspector methodsFor: 'accessing' stamp: 'tk 4/18/1998 15:37'!\rselectedClass\r\t\"Answer the class of the receiver's current selection\"\r\r\tself selectionUnmodifiable ifTrue: [^ object class].\r\t^ self selection class! !\r\r!Inspector methodsFor: 'accessing' stamp: 'svp 3/14/2000 21:57'!\rstepAt: millisecondClockValue in: aWindow\r\t| newText |\r\r\t(Preferences smartUpdating and: [(millisecondClockValue - self timeOfLastListUpdate) > 8000]) \"Not more often than once every 8 seconds\"\r\t\tifTrue:\r\t\t\t[self updateListsAndCodeIn: aWindow.\r\t\t\ttimeOfLastListUpdate _ millisecondClockValue].\r\r\tnewText _ self contentsIsString\r\t\tifTrue: [newText _ self selection]\r\t\tifFalse: [\"keep it short to reduce time to compute it\"\r\t\t\tself selectionPrintString ].\r\tnewText = contents ifFalse:\r\t\t[contents _ newText.\r\t\tself changed: #contents]! !\r\r!Inspector methodsFor: 'accessing' stamp: 'sma 6/15/2000 16:48'!\rstepTimeIn: aSystemWindow\r\t^ (selectionUpdateTime ifNil: [0]) * 10 max: 1000! !\r\r!Inspector methodsFor: 'accessing' stamp: 'sw 10/20/1999 15:54'!\rtimeOfLastListUpdate\r\t^ timeOfLastListUpdate ifNil: [timeOfLastListUpdate _ 0]! !\r\r!Inspector methodsFor: 'accessing' stamp: 'tk 4/10/1998 11:28'!\rtrash\r\t\"What goes in the bottom pane\"\r\t^ ''! !\r\r!Inspector methodsFor: 'accessing' stamp: 'tk 6/11/1998 22:23'!\rtrash: newText\r\t\"Don't save it\"\r\t^ true! !\r\r!Inspector methodsFor: 'accessing' stamp: 'hmm 7/12/2001 20:35'!\rupdate\r\t\"Reshow contents, assuming selected value may have changed.\"\r\r\tselectionIndex = 0\r\t\tifFalse:\r\t\t\t[self contentsIsString\r\t\t\t\tifTrue: [contents _ self selection]\r\t\t\t\tifFalse: [contents _ self selectionPrintString].\r\t\t\tself changed: #contents.\r\t\t\tself changed: #selection.\r\t\t\tself changed: #selectionIndex]! !\r\r!Inspector methodsFor: 'accessing' stamp: 'di 1/13/1999 14:36'!\rwantsSteps\r\t^ true! !\r\r\r!Inspector methodsFor: 'selecting' stamp: 'tk 4/13/1998 09:19'!\raccept: aString\r\r\t| result |\r\tresult _ self doItReceiver class evaluatorClass new\r\t\t\t\tevaluate: (ReadStream on: aString)\r\t\t\t\tin: self doItContext\r\t\t\t\tto: self doItReceiver\r\t\t\t\tnotifying: nil\t\"fix this\"\r\t\t\t\tifFail:  [^ false].\r\tresult == #failedDoit ifFalse: \r\t\t\t[contents _ result printString.\r\t\t\tself replaceSelectionValue: result.\t\"may put contents back\"\r\t\t\tself changed: #contents.\r\t\t\t^ true].\r\t^ false! !\r\r!Inspector methodsFor: 'selecting' stamp: 'di 9/22/1998 21:24'!\rcontentsIsString\r\t\"Hacked so contents empty when deselected and = long printString when item 2\"\r\r\t^ (selectionIndex = 2) | (selectionIndex = 0)! !\r\r!Inspector methodsFor: 'selecting' stamp: 'tk 4/13/1998 09:23'!\rreplaceSelectionValue: anObject \r\t\"The receiver has a list of variables of its inspected object. One of these \r\tis selected. The value of the selected variable is set to the value, \r\tanObject.\"\r\t| basicIndex si |\r\tselectionIndex <= 2 ifTrue: [\r\t\tself toggleIndex: (si _ selectionIndex).  \r\t\tself toggleIndex: si.\r\t\t^ object].\r\tobject class isVariable\r\t\tifFalse: [^ object instVarAt: selectionIndex - 2 put: anObject].\r\tbasicIndex _ selectionIndex - 2 - object class instSize.\r\t(object basicSize <= (self i1 + self i2)  or: [basicIndex <= self i1])\r\t\tifTrue: [^object basicAt: basicIndex put: anObject]\r\t\tifFalse: [^object basicAt: object basicSize - (self i1 + self i2) + basicIndex\r\t\t\t\t\tput: anObject]! !\r\r!Inspector methodsFor: 'selecting' stamp: 'hg 10/8/2000 14:46'!\rselectedSlotName\r\r\t^ self fieldList at: self selectionIndex! !\r\r!Inspector methodsFor: 'selecting' stamp: 'tk 4/10/1998 17:57'!\rselection\r\t\"The receiver has a list of variables of its inspected object.\r\tOne of these is selected. Answer the value of the selected variable.\"\r\t| basicIndex |\r\tselectionIndex = 0 ifTrue: [^ ''].\r\tselectionIndex = 1 ifTrue: [^ object].\r\tselectionIndex = 2 ifTrue: [^ object longPrintString].\r\t(selectionIndex - 2) <= object class instSize\r\t\tifTrue: [^ object instVarAt: selectionIndex - 2].\r\tbasicIndex _ selectionIndex - 2 - object class instSize.\r\t(object basicSize <= (self i1 + self i2)  or: [basicIndex <= self i1])\r\t\tifTrue: [^ object basicAt: basicIndex]\r\t\tifFalse: [^ object basicAt: object basicSize - (self i1 + self i2) + basicIndex]! !\r\r!Inspector methodsFor: 'selecting'!\rselectionIndex\r\t\"The receiver has a list of variables of its inspected object. One of these \r\tis selected. Answer the index into the list of the selected variable.\"\r\r\t^selectionIndex! !\r\r!Inspector methodsFor: 'selecting' stamp: 'sma 6/15/2000 16:45'!\rselectionPrintString\r\t| text nm |\r\tselectionUpdateTime _ [text _ [self selection printStringLimitedTo: 5000]\r\t\ton: Error do: \r\t\t[nm _ self selectionIndex < 3\r\t\t\t\t\tifTrue: ['self']\r\t\t\t\t\tifFalse: [self selectedSlotName].\r\t\ttext _ ('<error in printString: evaluate \"' , nm , ' printString\" to debug>') asText.\r\t\ttext\r\t\t\taddAttribute: TextColor red\r\t\t\tfrom: 1\r\t\t\tto: text size.\r\t\ttext]] timeToRun.\r\t^ text! !\r\r!Inspector methodsFor: 'selecting'!\rselectionUnmodifiable\r\t\"Answer if the current selected variable is modifiable via acceptance in the code pane.  For most inspectors, no selection and a selection of self (selectionIndex = 1) are unmodifiable\"\r\r\t^ selectionIndex <= 2! !\r\r!Inspector methodsFor: 'selecting' stamp: 'sma 6/15/2000 16:50'!\rtoggleIndex: anInteger\r\t\"The receiver has a list of variables of its inspected object. One of these \r\tis selected. If anInteger is the index of this variable, then deselect it. \r\tOtherwise, make the variable whose index is anInteger be the selected \r\titem.\"\r\r\tselectionUpdateTime _ 0.\r\tselectionIndex = anInteger\r\t\tifTrue: \r\t\t\t[\"same index, turn off selection\"\r\t\t\tselectionIndex _ 0.\r\t\t\tcontents _ '']\r\t\tifFalse:\r\t\t\t[\"different index, new selection\"\r\t\t\tselectionIndex _ anInteger.\r\t\t\tself contentsIsString\r\t\t\t\tifTrue: [contents _ self selection]\r\t\t\t\tifFalse: [contents _ self selectionPrintString]].\r\tself changed: #selection.\r\tself changed: #contents.\r\tself changed: #selectionIndex.! !\r\r\r!Inspector methodsFor: 'code'!\rdoItReceiver\r\t\"Answer the object that should be informed of the result of evaluating a\r\ttext selection.\"\r\r\t^object! !\r\r\r!Inspector methodsFor: 'menu commands' stamp: 'BG 10/29/2003 08:14'!\raddCollectionItemsTo: aMenu\r\t\"If the current selection is an appropriate collection, add items to aMenu that cater to that kind of selection\"\r\r\t| sel |\r\t((((sel _ self selection) isMemberOf: Array) or: [sel isMemberOf: OrderedCollection]) and: \r\t\t[sel size > 0]) ifTrue: [\r\t\t\taMenu addList: #(\r\t\t\t\t('inspect element...'\t\t\t\t\tinspectElement))].\r! !\r\r!Inspector methodsFor: 'menu commands' stamp: 'BG 10/28/2003 21:00'!\rbrowseFullProtocol\r\t\"Open up a protocol-category browser on the value of the receiver's current selection.  If in mvc, an old-style protocol browser is opened instead.\"\r\r\tSmalltalk isMorphic ifFalse: [^ self spawnProtocol].! !\r\r!Inspector methodsFor: 'menu commands' stamp: 'nk 7/24/2003 10:11'!\rchasePointers\r\t| saved |\r\tself selectionIndex == 0 ifTrue: [^ self changed: #flash].\r\tsaved _ self object.\r\t[self object: nil.\r\t(Smalltalk includesKey: #PointerFinder)\r\t\tifTrue: [PointerFinder on: saved]\r\t\tifFalse: [self objectReferencesToSelection]]\r\t\tensure: [self object: saved]! !\r\r!Inspector methodsFor: 'menu commands' stamp: 'tk 4/10/1998 17:53'!\rclassOfSelection\r\t\"Answer the class of the receiver's current selection\"\r\r\tself selectionUnmodifiable ifTrue: [^ object class].\r\t^ self selection class! !\r\r!Inspector methodsFor: 'menu commands' stamp: 'sd 4/15/2003 16:14'!\rclassVarRefs\r\t\"Request a browser of methods that store into a chosen instance variable\"\r\r\t| aClass |\r\t(aClass _ self classOfSelection) ifNotNil:\r\t\t[self systemNavigation  browseClassVarRefs: aClass].\r! !\r\r!Inspector methodsFor: 'menu commands' stamp: 'ar 1/15/2001 18:38'!\rcopyName\r\t\"Copy the name of the current variable, so the user can paste it into the window below and work with is.  If collection, do (xxx at: 1). \"\r\r\t| sel aClass |\r\tself selectionUnmodifiable ifTrue: [^ self changed: #flash].\r\t(aClass _ self object class) isVariable ifTrue: [^ self changed: #flash].\r\r\tsel _ aClass allInstVarNames at: selectionIndex - 2.\r\t(self selection isKindOf: Collection) ifTrue: [sel _ '(',sel,' at: 1)'].\r\tClipboard clipboardText: sel asText.\t\"no undo allowed\"! !\r\r!Inspector methodsFor: 'menu commands' stamp: 'sd 4/15/2003 16:14'!\rdefsOfSelection\r\t\"Open a browser on all defining references to the selected instance variable, if that's what currently selected. \"\r\t| aClass sel |\r\r\tself selectionUnmodifiable ifTrue: [^ self changed: #flash].\r\t(aClass _ self object class) isVariable ifTrue: [^ self changed: #flash].\r\r\tsel _ aClass allInstVarNames at: self selectionIndex - 2.\r\tself systemNavigation  browseAllStoresInto: sel from: aClass! !\r\r!Inspector methodsFor: 'menu commands' stamp: 'BG 10/28/2003 21:00'!\rfieldListMenu: aMenu\r\t\"Arm the supplied menu with items for the field-list of the receiver\"\r\r\r\r\taMenu addList: #(\r\t\t('inspect (i)'\t\t\t\t\t\tinspectSelection)).\r\r\tself addCollectionItemsTo: aMenu.\r\r\taMenu addList: #(\r\t\t-\r\t\t('method refs to this inst var'\t\treferencesToSelection)\r\t\t('methods storing into this inst var'\tdefsOfSelection)\r\t\t('objects pointing to this value'\t\tobjectReferencesToSelection)\r\t\t('chase pointers'\t\t\t\t\tchasePointers)\r\t\t-\r\t\t('browse full (b)'\t\t\t\t\tbrowseMethodFull)\r\t\t('browse class'\t\t\t\t\t\tbrowseClass)\r\t\t('browse hierarchy'\t\t\t\t\tclassHierarchy)\r\t\t('browse protocol (p)'\t\t\t\tbrowseFullProtocol)\r\t\t-\r\t\t('inst var refs...'\t\t\t\t\tbrowseInstVarRefs)\r\t\t('inst var defs...'\t\t\t\t\tbrowseInstVarDefs)\r\t\t('class var refs...'\t\t\t\t\tclassVarRefs)\r\t\t('class variables'\t\t\t\t\tbrowseClassVariables)\r\t\t('class refs (N)'\t\t\t\t\t\tbrowseClassRefs)\r\t\t-\r\t\t('copy name (c)'\t\t\t\t\tcopyName)\t\t\r\t\t('basic inspect'\t\t\t\t\t\tinspectBasic)).\r\r\r\t^ aMenu\r\r\r\"\t\t\t-\r\t\t\t('alias for this value'\t\t\taliasForValue)\r\t\t\t('watcher for this slot'\t\t\twatcherForSlot)\"\r\r! !\r\r!Inspector methodsFor: 'menu commands' stamp: 'tk 4/12/1998 08:49'!\rinspectBasic\r\t\"Bring up a non-special inspector\"\r\r\tselectionIndex = 0 ifTrue: [^ object basicInspect].\r\tself selection basicInspect! !\r\r!Inspector methodsFor: 'menu commands' stamp: 'BG 11/1/2003 22:25'!\rinspectElement\r\t| sel selSize countString count |\r\t\"Create and schedule an Inspector on an element of the receiver's model's currently selected collection.\"\r\r\tself selectionIndex = 0 ifTrue: [^ self changed: #flash].\r\t((sel _ self selection) isKindOf: SequenceableCollection) ifFalse:\r\t\t[\r\t\t^ sel inspect].\r\t(selSize _ sel size) == 1 ifTrue: [^ sel first inspect].\r\tselSize <= 15 ifTrue:\r\t\t[count _ (SelectionMenu selections: (1 to: selSize) asArray) startUpWithCaption: 'which element?'.\r\t\tcount ifNil: [^ self] ifNotNil: [^ (sel at: count) inspect]].\r\r\tcountString _ FillInTheBlank request: 'Which element? (1 - ', selSize printString, ')' initialAnswer: '1'.\r\tcountString isEmptyOrNil ifTrue: [^ self].\r\tcount _ Integer readFrom: (ReadStream on: countString).\r\t(count > 0 and: [count <= selSize])\r\t\tifTrue:\r\t\t\t[(sel  at: count) inspect]\r\t\tifFalse:\r\t\t\t[self beep]! !\r\r!Inspector methodsFor: 'menu commands' stamp: 'sw 1/14/2000 13:39'!\rinspectSelection\r\t\"Create and schedule an Inspector on the receiver's model's currently selected object.\"\r\r\tself selectionIndex = 0 ifTrue: [^ self changed: #flash].\r\t^ self selection inspect! !\r\r!Inspector methodsFor: 'menu commands' stamp: 'BG 8/18/2004 17:07'!\rinspectorKey: aChar from: view\r\t\"Respond to a Command key issued while the cursor is over my field list\"\r\r\taChar == $i ifTrue: [^ self selection inspect].\r\taChar == $I ifTrue: [^ self selection explore].\r\taChar == $b ifTrue:\t[^ self browseMethodFull].\r\taChar == $h ifTrue:\t[^ self classHierarchy].\r\taChar == $c ifTrue: [^ self copyName].\r\taChar == $p ifTrue: [^ self browseFullProtocol].\r\taChar == $N ifTrue: [^ self browseClassRefs].\r\t\"aChar == $t ifTrue: [^ self tearOffTile].\"\r\taChar == $v ifTrue: [^ self viewerForValue].\r\r\t^ self arrowKey: aChar from: view! !\r\r!Inspector methodsFor: 'menu commands' stamp: 'sd 4/16/2003 11:41'!\robjectReferencesToSelection\r\t\"Open a list inspector on all the objects that point to the value of the selected instance variable, if any.  \"\r\r\tself selectionIndex == 0 ifTrue: [^ self changed: #flash].\r\tself systemNavigation\r\t\tbrowseAllObjectReferencesTo: self selection\r\t\texcept: (Array with: self object)\r\t\tifNone: [:obj | self changed: #flash].\r! !\r\r!Inspector methodsFor: 'menu commands' stamp: 'sd 4/15/2003 16:14'!\rreferencesToSelection\r\t\"Open a browser on all references to the selected instance variable, if that's what currently selected.  1/25/96 sw\"\r\t| aClass sel |\r\r\tself selectionUnmodifiable ifTrue: [^ self changed: #flash].\r\t(aClass _ self object class) isVariable ifTrue: [^ self changed: #flash].\r\r\tsel _ aClass allInstVarNames at: self selectionIndex - 2.\r\tself systemNavigation   browseAllAccessesTo: sel from: aClass! !\r\r!Inspector methodsFor: 'menu commands' stamp: 'sw 12/11/2000 15:52'!\rspawnFullProtocol\r\t\"Spawn a window showing full protocol for the receiver's selection\"\r\r\t| objectToRepresent |\r\tobjectToRepresent _ self selectionIndex == 0 ifTrue: [object] ifFalse: [self selection].\r\tProtocolBrowser openFullProtocolForClass: objectToRepresent class! !\r\r!Inspector methodsFor: 'menu commands' stamp: 'sw 12/11/2000 15:52'!\rspawnProtocol\r\t\"Spawn a protocol on browser on the receiver's selection\"\r\r\t| objectToRepresent |\r\tobjectToRepresent _ self selectionIndex == 0 ifTrue: [object] ifFalse: [self selection].\r\tProtocolBrowser openSubProtocolForClass: objectToRepresent class! !\r\r!Inspector methodsFor: 'menu commands' stamp: 'sw 10/23/2000 18:27'!\rviewerForValue\r\t\"Open up a viewer on the value of the receiver's current selection\"\r\r\t| objectToRepresent |\r\tobjectToRepresent _ self selectionIndex == 0 ifTrue: [object] ifFalse: [self selection].\r\tobjectToRepresent beViewed\r\t! !\r\r\r!Inspector methodsFor: 'object fileIn' stamp: 'RAA 12/20/2000 17:47'!\rconvertToCurrentVersion: varDict refStream: smartRefStrm\r\t\r\ttimeOfLastListUpdate ifNil: [timeOfLastListUpdate _ 0].\r\t^super convertToCurrentVersion: varDict refStream: smartRefStrm.\r\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rInspector class\r\tinstanceVariableNames: ''!\r\r!Inspector class methodsFor: 'instance creation' stamp: 'sw 1/19/1999 14:38'!\rhorizontalDividerProportion\r\t^ 0.3! !\r\r!Inspector class methodsFor: 'instance creation'!\rinspect: anObject \r\t\"Answer an instance of me to provide an inspector for anObject.\"\r\r\t^self new inspect: anObject! !\r\r!Inspector class methodsFor: 'instance creation'!\ropenOn: anObject withEvalPane: withEval \r\t\"Create and schedule an instance of me on the model, anInspector. \"\r\r\t^ self openOn: anObject withEvalPane: withEval withLabel: anObject defaultLabelForInspector! !\r\r!Inspector class methodsFor: 'instance creation' stamp: 'BG 10/28/2003 14:56'!\ropenOn: anObject withEvalPane: withEval withLabel: label\r\n        \r\n        ^ self openOn: anObject \r\n                withEvalPane: withEval \r\n                withLabel: label \r\n                valueViewClass: PluggableTextView\r\n! !\r\r!Inspector class methodsFor: 'instance creation' stamp: 'di 2/16/2000 10:52'!\ropenOn: anObject withEvalPane: withEval withLabel: label valueViewClass: valueViewClass\r\t| topView inspector listView valueView evalView |\r\tinspector _ self inspect: anObject.\r\ttopView _ StandardSystemView new model: inspector.\r\ttopView borderWidth: 1.\r\r\tlistView _ PluggableListView on: inspector\r\t\tlist: #fieldList\r\t\tselected: #selectionIndex\r\t\tchangeSelected: #toggleIndex:\r\t\tmenu: #fieldListMenu:\r\t\tkeystroke: #inspectorKey:from:.\r\t(inspector isMemberOf: DictionaryInspector)\r\t\tifTrue: [listView menu: #dictionaryMenu:].\r\tlistView window: (0 @ 0 extent: 40 @ 40).\r\ttopView addSubView: listView.\r\r\tvalueView _ valueViewClass new.\r\t\t\"PluggableTextView or PluggableFormView\"\r\t(valueView respondsTo: #getText) ifTrue: [\r\t\tvalueView on: inspector \r\t\t\ttext: #contents accept: #accept:\r\t\t\treadSelection: #contentsSelection menu: #codePaneMenu:shifted:].\r\t(valueViewClass inheritsFrom: FormView) ifTrue: [\r\t\tvalueView model: inspector].\r\tvalueView window: (0 @ 0 extent: 75 @ 40).\r\ttopView addSubView: valueView toRightOf: listView.\r\t\r\twithEval ifTrue:\r\t\t[evalView _ PluggableTextView new on: inspector \r\t\t\ttext: #trash accept: #trash:\r\t\t\treadSelection: #contentsSelection menu: #codePaneMenu:shifted:.\r\t\tevalView window: (0 @ 0 extent: 115 @ 20).\r\t\tevalView askBeforeDiscardingEdits: false.\r\t\ttopView addSubView: evalView below: listView].\r\ttopView label: label.\r\ttopView minimumSize: 180 @ 120.\r\ttopView setUpdatablePanesFrom: #(fieldList).\r\ttopView controller open! !\r\r!Inspector class methodsFor: 'instance creation' stamp: 'sw 1/19/1999 14:38'!\rverticalDividerProportion\r\t^ 0.7! !\rInspector subclass: #InspectorBrowser\r\tinstanceVariableNames: 'fieldList msgList msgListIndex'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Inspector'!\r\r!InspectorBrowser methodsFor: 'as yet unclassified' stamp: 'di 4/16/1998 15:51'!\rfieldList\r\tfieldList ifNotNil: [^ fieldList].\r\t^ (fieldList _ super fieldList)! !\r\r!InspectorBrowser methodsFor: 'as yet unclassified' stamp: 'di 4/16/1998 15:52'!\rinspect: anObject \r\t\"Initialize the receiver so that it is inspecting anObject.\"\r\tfieldList _ nil.\r\tsuper inspect: anObject.\r\tmsgListIndex _ 0.\r\tself changed: #msgText! !\r\r!InspectorBrowser methodsFor: 'as yet unclassified' stamp: 'di 4/17/1998 10:19'!\rmsgList\r\tmsgList ifNotNil: [^ msgList].\r\t^ (msgList _ object class selectors asSortedCollection asArray)! !\r\r!InspectorBrowser methodsFor: 'as yet unclassified' stamp: 'di 4/16/1998 14:18'!\rmsgListIndex \r\t^msgListIndex! !\r\r!InspectorBrowser methodsFor: 'as yet unclassified' stamp: 'di 4/16/1998 14:38'!\rmsgText\r\tmsgListIndex = 0 ifTrue: [^ nil].\r\t^ object class sourceCodeAt: (msgList at: msgListIndex)! !\r\r!InspectorBrowser methodsFor: 'as yet unclassified' stamp: 'di 4/18/1998 09:48'!\rstep\r\t| list fieldString msg |\r\t(list _ super fieldList) = fieldList ifFalse:\r\t\t[fieldString _ selectionIndex > 0 ifTrue: [fieldList at: selectionIndex] ifFalse: [nil].\r\t\tfieldList _ list.\r\t\tselectionIndex _ fieldList indexOf: fieldString ifAbsent: [0].\r\t\tself changed: #fieldList.\r\t\tself changed: #selectionIndex].\r\tlist _ msgList.  msgList _ nil.  \"force recomputation\"\r\t\tlist = self msgList ifFalse:\r\t\t[msg _ msgListIndex > 0 ifTrue: [list at: msgListIndex] ifFalse: [nil].\r\t\tmsgListIndex _ msgList indexOf: msg ifAbsent: [0].\r\t\tself changed: #msgList.\r\t\tself changed: #msgListIndex].\r\tsuper step! !\r\r!InspectorBrowser methodsFor: 'as yet unclassified' stamp: 'di 1/14/1999 09:01'!\rwantsSteps\r\t^ true! !\rObject subclass: #InstructionClient\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Methods'!\r!InstructionClient commentStamp: 'md 4/8/2003 12:50' prior: 0!\rMy job is to make it easier to implement clients for InstructionStream. See InstVarRefLocator\ras an example. !\r\r\r!InstructionClient methodsFor: 'instruction decoding' stamp: 'md 4/8/2003 13:02'!\rblockReturnTop\r\t\"Return Top Of Stack bytecode.\"\r\r! !\r\r!InstructionClient methodsFor: 'instruction decoding' stamp: 'md 4/8/2003 13:02'!\rdoDup\r\t\"Duplicate Top Of Stack bytecode.\"\r\r! !\r\r!InstructionClient methodsFor: 'instruction decoding' stamp: 'md 4/8/2003 13:02'!\rdoPop\r\t\"Remove Top Of Stack bytecode.\"\r! !\r\r!InstructionClient methodsFor: 'instruction decoding' stamp: 'md 4/8/2003 13:02'!\rjump: offset\r\t\"Unconditional Jump bytecode.\"\r\r! !\r\r!InstructionClient methodsFor: 'instruction decoding' stamp: 'md 4/8/2003 13:02'!\rjump: offset if: condition \r\t\"Conditional Jump bytecode.\"\r\r! !\r\r!InstructionClient methodsFor: 'instruction decoding' stamp: 'md 4/8/2003 13:02'!\rmethodReturnConstant: value \r\t\"Return Constant bytecode.\"\r! !\r\r!InstructionClient methodsFor: 'instruction decoding' stamp: 'md 4/8/2003 13:02'!\rmethodReturnReceiver\r\t\"Return Self bytecode.\"\r! !\r\r!InstructionClient methodsFor: 'instruction decoding' stamp: 'md 4/8/2003 13:03'!\rmethodReturnTop\r\t\"Return Top Of Stack bytecode.\"\r! !\r\r!InstructionClient methodsFor: 'instruction decoding' stamp: 'md 4/8/2003 13:03'!\rpopIntoLiteralVariable: anAssociation \r\t\"Remove Top Of Stack And Store Into Literal Variable bytecode.\"\r! !\r\r!InstructionClient methodsFor: 'instruction decoding' stamp: 'md 4/8/2003 13:03'!\rpopIntoReceiverVariable: offset \r\t\"Remove Top Of Stack And Store Into Instance Variable bytecode.\"\r! !\r\r!InstructionClient methodsFor: 'instruction decoding' stamp: 'md 4/8/2003 13:03'!\rpopIntoTemporaryVariable: offset \r\t\"Remove Top Of Stack And Store Into Temporary Variable bytecode.\"\r! !\r\r!InstructionClient methodsFor: 'instruction decoding' stamp: 'md 4/8/2003 13:03'!\rpushActiveContext\r\t\"Push Active Context On Top Of Its Own Stack bytecode.\"\r! !\r\r!InstructionClient methodsFor: 'instruction decoding' stamp: 'md 4/8/2003 13:03'!\rpushConstant: value\r\t\"Push Constant, value, on Top Of Stack bytecode.\"\r! !\r\r!InstructionClient methodsFor: 'instruction decoding' stamp: 'md 4/8/2003 13:03'!\rpushLiteralVariable: anAssociation\r\t\"Push Contents Of anAssociation On Top Of Stack bytecode.\"\r! !\r\r!InstructionClient methodsFor: 'instruction decoding' stamp: 'md 4/8/2003 13:03'!\rpushReceiver\r\t\"Push Active Context's Receiver on Top Of Stack bytecode.\"\r! !\r\r!InstructionClient methodsFor: 'instruction decoding' stamp: 'md 4/8/2003 13:03'!\rpushReceiverVariable: offset\r\t\"Push Contents Of the Receiver's Instance Variable Whose Index \r\tis the argument, offset, On Top Of Stack bytecode.\"\r! !\r\r!InstructionClient methodsFor: 'instruction decoding' stamp: 'md 4/8/2003 13:04'!\rpushTemporaryVariable: offset\r\t\"Push Contents Of Temporary Variable Whose Index Is the \r\targument, offset, On Top Of Stack bytecode.\"\r! !\r\r!InstructionClient methodsFor: 'instruction decoding' stamp: 'md 4/8/2003 13:04'!\rsend: selector super: supered numArgs: numberArguments\r\t\"Send Message With Selector, selector, bytecode. The argument, \r\tsupered, indicates whether the receiver of the message is specified with \r\t'super' in the source method. The arguments of the message are found in \r\tthe top numArguments locations on the stack and the receiver just \r\tbelow them.\"\r! !\r\r!InstructionClient methodsFor: 'instruction decoding' stamp: 'md 4/8/2003 13:04'!\rstoreIntoLiteralVariable: anAssociation \r\t\"Store Top Of Stack Into Literal Variable Of Method bytecode.\"\r! !\r\r!InstructionClient methodsFor: 'instruction decoding' stamp: 'md 4/8/2003 13:04'!\rstoreIntoReceiverVariable: offset \r\t\"Store Top Of Stack Into Instance Variable Of Method bytecode.\"\r! !\r\r!InstructionClient methodsFor: 'instruction decoding' stamp: 'md 4/8/2003 13:04'!\rstoreIntoTemporaryVariable: offset \r\t\"Store Top Of Stack Into Temporary Variable Of Method bytecode.\"\r! !\rInstructionClient subclass: #InstructionPrinter\r\tinstanceVariableNames: 'method scanner stream oldPC indent'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Methods'!\r!InstructionPrinter commentStamp: 'md 4/8/2003 12:47' prior: 0!\rMy instances can print the object code of a CompiledMethod in symbolic format. They print into an instance variable, stream, and uses oldPC to determine how many bytes to print in the listing. The variable method  is used to hold the method being printed.!\r\r\r!InstructionPrinter methodsFor: 'accessing' stamp: 'ajh 6/27/2003 22:25'!\rindent\r\r\t^ indent ifNil: [0]! !\r\r!InstructionPrinter methodsFor: 'accessing' stamp: 'md 4/8/2003 11:20'!\rmethod\r\t^method.! !\r\r!InstructionPrinter methodsFor: 'accessing' stamp: 'md 4/8/2003 11:20'!\rmethod: aMethod\r\tmethod :=  aMethod.! !\r\r\r!InstructionPrinter methodsFor: 'initialize-release' stamp: 'ajh 2/9/2003 14:16'!\rindent: numTabs\r\r\tindent _ numTabs! !\r\r!InstructionPrinter methodsFor: 'initialize-release' stamp: 'md 4/8/2003 11:19'!\rprintInstructionsOn: aStream \r\t\"Append to the stream, aStream, a description of each bytecode in the \r\tinstruction stream.\"\r\t\r\t| end |\r\tstream _ aStream.\r\tscanner _ InstructionStream on: method.\r\tend _ method endPC.\r\toldPC _ scanner pc.\r\t[scanner pc <= end]\r\t\twhileTrue: [scanner interpretNextInstructionFor: self]! !\r\r\r!InstructionPrinter methodsFor: 'instruction decoding'!\rblockReturnTop\r\t\"Print the Return Top Of Stack bytecode.\"\r\r\tself print: 'blockReturn'! !\r\r!InstructionPrinter methodsFor: 'instruction decoding'!\rdoDup\r\t\"Print the Duplicate Top Of Stack bytecode.\"\r\r\tself print: 'dup'! !\r\r!InstructionPrinter methodsFor: 'instruction decoding' stamp: 'md 4/8/2003 12:14'!\rdoPop\r\t\"Print the Remove Top Of Stack bytecode.\"\r\r\tself print: 'pop'! !\r\r!InstructionPrinter methodsFor: 'instruction decoding' stamp: 'md 4/8/2003 11:13'!\rjump: offset\r\t\"Print the Unconditional Jump bytecode.\"\r\r\tself print: 'jumpTo: ' , (scanner pc + offset) printString! !\r\r!InstructionPrinter methodsFor: 'instruction decoding' stamp: 'md 4/8/2003 11:13'!\rjump: offset if: condition \r\t\"Print the Conditional Jump bytecode.\"\r\r\tself print: \r\t\t(condition\r\t\t\tifTrue: ['jumpTrue: ']\r\t\t\tifFalse: ['jumpFalse: '])\r\t\t\t, (scanner pc + offset) printString! !\r\r!InstructionPrinter methodsFor: 'instruction decoding'!\rmethodReturnConstant: value \r\t\"Print the Return Constant bytecode.\"\r\r\tself print: 'return: ' , value printString! !\r\r!InstructionPrinter methodsFor: 'instruction decoding'!\rmethodReturnReceiver\r\t\"Print the Return Self bytecode.\"\r\r\tself print: 'returnSelf'! !\r\r!InstructionPrinter methodsFor: 'instruction decoding'!\rmethodReturnTop\r\t\"Print the Return Top Of Stack bytecode.\"\r\r\tself print: 'returnTop'! !\r\r!InstructionPrinter methodsFor: 'instruction decoding'!\rpopIntoLiteralVariable: anAssociation \r\t\"Print the Remove Top Of Stack And Store Into Literal Variable bytecode.\"\r\r\tself print: 'popIntoLit: ' , anAssociation key! !\r\r!InstructionPrinter methodsFor: 'instruction decoding'!\rpopIntoReceiverVariable: offset \r\t\"Print the Remove Top Of Stack And Store Into Instance Variable \r\tbytecode.\"\r\r\tself print: 'popIntoRcvr: ' , offset printString! !\r\r!InstructionPrinter methodsFor: 'instruction decoding'!\rpopIntoTemporaryVariable: offset \r\t\"Print the Remove Top Of Stack And Store Into Temporary Variable \r\tbytecode.\"\r\r\tself print: 'popIntoTemp: ' , offset printString! !\r\r!InstructionPrinter methodsFor: 'instruction decoding'!\rpushActiveContext\r\t\"Print the Push Active Context On Top Of Its Own Stack bytecode.\"\r\r\tself print: 'pushThisContext: '! !\r\r!InstructionPrinter methodsFor: 'instruction decoding'!\rpushLiteralVariable: anAssociation\r\t\"Print the Push Contents Of anAssociation On Top Of Stack bytecode.\"\r\r\tself print: 'pushLit: ' , anAssociation key! !\r\r!InstructionPrinter methodsFor: 'instruction decoding'!\rpushReceiver\r\t\"Print the Push Active Context's Receiver on Top Of Stack bytecode.\"\r\r\tself print: 'self'! !\r\r!InstructionPrinter methodsFor: 'instruction decoding'!\rpushReceiverVariable: offset\r\t\"Print the Push Contents Of the Receiver's Instance Variable Whose Index \r\tis the argument, offset, On Top Of Stack bytecode.\"\r\r\tself print: 'pushRcvr: ' , offset printString! !\r\r!InstructionPrinter methodsFor: 'instruction decoding'!\rpushTemporaryVariable: offset\r\t\"Print the Push Contents Of Temporary Variable Whose Index Is the \r\targument, offset, On Top Of Stack bytecode.\"\r\r\tself print: 'pushTemp: ' , offset printString! !\r\r!InstructionPrinter methodsFor: 'instruction decoding'!\rsend: selector super: supered numArgs: numberArguments\r\t\"Print the Send Message With Selector, selector, bytecode. The argument, \r\tsupered, indicates whether the receiver of the message is specified with \r\t'super' in the source method. The arguments of the message are found in \r\tthe top numArguments locations on the stack and the receiver just \r\tbelow them.\"\r\r\tself print: (supered ifTrue: ['superSend: '] ifFalse: ['send: ']) , selector! !\r\r!InstructionPrinter methodsFor: 'instruction decoding'!\rstoreIntoLiteralVariable: anAssociation \r\t\"Print the Store Top Of Stack Into Literal Variable Of Method bytecode.\"\r\r\tself print: 'storeIntoLit: ' , anAssociation key! !\r\r!InstructionPrinter methodsFor: 'instruction decoding'!\rstoreIntoReceiverVariable: offset \r\t\"Print the Store Top Of Stack Into Instance Variable Of Method bytecode.\"\r\r\tself print: 'storeIntoRcvr: ' , offset printString! !\r\r!InstructionPrinter methodsFor: 'instruction decoding'!\rstoreIntoTemporaryVariable: offset \r\t\"Print the Store Top Of Stack Into Temporary Variable Of Method \r\tbytecode.\"\r\r\tself print: 'storeIntoTemp: ' , offset printString! !\r\r\r!InstructionPrinter methodsFor: 'printing' stamp: 'ajh 6/27/2003 22:26'!\rprint: instruction \r\t\"Append to the receiver a description of the bytecode, instruction.\" \r\r\t| code |\r\tstream tab: self indent; print: oldPC; space.\r\tstream nextPut: $<.\r\toldPC to: scanner pc - 1 do: \r\t\t[:i | \r\t\tcode _ (method at: i) radix: 16.\r\t\tstream nextPut: \r\t\t\t(code size < 5\r\t\t\t\tifTrue: [$0]\r\t\t\t\tifFalse: [code at: 4]).\r\t\tstream nextPut: code last; space].\r\tstream skip: -1.\r\tstream nextPut: $>.\r\tstream space.\r\tstream nextPutAll: instruction.\r\tstream cr.\r\toldPC _ scanner pc.\r\t\"(InstructionPrinter compiledMethodAt: #print:) symbolic.\"\r! !\r\r!InstructionPrinter methodsFor: 'printing' stamp: 'ajh 6/27/2003 22:26'!\rpushConstant: obj\r\t\"Print the Push Constant, obj, on Top Of Stack bytecode.\"\r\r\tself print: 'pushConstant: ' , (String streamContents: [:s |\r\t\t(obj isKindOf: LookupKey)\r\t\t\tifFalse: [s withStyleFor: #literal do: [obj printOn: s]]\r\t\t\tifTrue: [obj key\r\t\t\t\tifNotNil: [s nextPutAll: '##'; nextPutAll: obj key]\r\t\t\t\tifNil: [s nextPutAll: '###'; nextPutAll: obj value soleInstance name]]\r\t]).\r\r\t(obj isKindOf: CompiledMethod) ifTrue: [\r\t\tobj longPrintOn: stream indent: self indent + 2. ^ self].\r\tSmalltalk at: #BlockClosure ifPresent:[:aClass|\r\t\t(obj isKindOf: aClass) ifTrue: [\r\t\t\tobj method longPrintOn: stream indent: self indent + 2. ^ self]].! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rInstructionPrinter class\r\tinstanceVariableNames: ''!\r\r!InstructionPrinter class methodsFor: 'printing' stamp: 'md 4/8/2003 11:19'!\ron: aMethod\r\t^self new method: aMethod.\r\t! !\r\r!InstructionPrinter class methodsFor: 'printing'!\rprintClass: class \r\t\"Create a file whose name is the argument followed by '.bytes'. Store on \r\tthe file the symbolic form of the compiled methods of the class.\"\r\t| file |\r\tfile _ FileStream newFileNamed: class name , '.bytes'.\r\tclass selectors do: \r\t\t[:sel | \r\t\tfile cr; nextPutAll: sel; cr.\r\t\t(self on: (class compiledMethodAt: sel)) printInstructionsOn: file].\r\tfile close\r\t\"InstructionPrinter printClass: Parser.\"\r! !\rObject subclass: #InstructionStream\r\tinstanceVariableNames: 'sender pc'\r\tclassVariableNames: 'SpecialConstants'\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Methods'!\r!InstructionStream commentStamp: '<historical>' prior: 0!\rMy instances can interpret the byte-encoded Smalltalk instruction set. They maintain a program counter (pc) for streaming through CompiledMethods. My subclasses are Contexts, which inherit this capability. They store the return pointer in the instance variable sender, and the current position in their method in the instance variable pc. For other users, sender can hold a method to be similarly interpreted. The unclean re-use of sender to hold the method was to avoid a trivial subclass for the stand-alone scanning function.!\r\r\r!InstructionStream methodsFor: 'testing'!\rwillJumpIfFalse\r\t\"Answer whether the next bytecode is a jump-if-false.\"\r\r\t| byte |\r\tbyte _ self method at: pc.\r\t^(byte between: 152 and: 159) or: [byte between: 172 and: 175]! !\r\r!InstructionStream methodsFor: 'testing' stamp: 'di 1/29/2000 14:42'!\rwillJumpIfTrue \r\t\"Answer whether the next bytecode is a jump-if-true.\"\r \r\t| byte |\r\tbyte _ self method at: pc.\r\t^ byte between: 168 and: 171! !\r\r!InstructionStream methodsFor: 'testing' stamp: 'sn 8/22/97 21:55'!\rwillReallySend\r\t\"Answer whether the next bytecode is a real message-send,\r\tnot blockCopy:.\"\r\r\t| byte |\r\tbyte _ self method at: pc.\r\tbyte < 128 ifTrue: [^false].\r\tbyte == 200 ifTrue: [^false].\r\tbyte >= 176 ifTrue: [^true].\t\"special send or short send\"\r\t^byte between: 131 and: 134\t\"long sends\"! !\r\r!InstructionStream methodsFor: 'testing'!\rwillReturn\r\t\"Answer whether the next bytecode is a return.\"\r\r\t^(self method at: pc) between: 120 and: 125! !\r\r!InstructionStream methodsFor: 'testing' stamp: 'hmm 7/15/2001 22:00'!\rwillStore\r\t\"Answer whether the next bytecode is a store or store-pop\"\r\r\t| byte |\r\tbyte _ self method at: pc.\r\t^(byte between: 96 and: 132) and: [\r\t\tbyte <= 111 or: [byte >= 129 and: [\r\t\t\tbyte <= 130 or: [byte = 132 and: [\r\t\t\t\t(self method at: pc+1) >= 160]]]]]! !\r\r!InstructionStream methodsFor: 'testing'!\rwillStorePop\r\t\"Answer whether the next bytecode is a store-pop.\"\r\r\t| byte |\r\tbyte _ self method at: pc.\r\t^byte = 130 or: [byte between: 96 and: 111]! !\r\r\r!InstructionStream methodsFor: 'decoding' stamp: 'ajh 7/29/2001 20:45'!\ratEnd\r\r\t^ pc > self method endPC! !\r\r!InstructionStream methodsFor: 'decoding'!\rinterpretJump\r\r\t| byte |\r\tbyte _ self method at: pc.\r\t(byte between: 144 and: 151) ifTrue:\r\t\t[pc _ pc + 1. ^byte - 143].\r\t(byte between: 160 and: 167) ifTrue:\r\t\t[pc _ pc + 2. ^(byte - 164) * 256 + (self method at: pc - 1)].\r\t^nil! !\r\r!InstructionStream methodsFor: 'decoding'!\rinterpretNextInstructionFor: client \r\t\"Send to the argument, client, a message that specifies the type of the \r\tnext instruction.\"\r\r\t| byte type offset method |\r\tmethod _ self method.  \r\tbyte _ method at: pc.\r\ttype _ byte // 16.  \r\toffset _ byte \\\\ 16.  \r\tpc _ pc+1.\r\ttype=0 ifTrue: [^client pushReceiverVariable: offset].\r\ttype=1 ifTrue: [^client pushTemporaryVariable: offset].\r\ttype=2 ifTrue: [^client pushConstant: (method literalAt: offset+1)].\r\ttype=3 ifTrue: [^client pushConstant: (method literalAt: offset+17)].\r\ttype=4 ifTrue: [^client pushLiteralVariable: (method literalAt: offset+1)].\r\ttype=5 ifTrue: [^client pushLiteralVariable: (method literalAt: offset+17)].\r\ttype=6 \r\t\tifTrue: [offset<8\r\t\t\t\t\tifTrue: [^client popIntoReceiverVariable: offset]\r\t\t\t\t\tifFalse: [^client popIntoTemporaryVariable: offset-8]].\r\ttype=7\r\t\tifTrue: [offset=0 ifTrue: [^client pushReceiver].\r\t\t\t\toffset<8 ifTrue: [^client pushConstant: (SpecialConstants at: offset)].\r\t\t\t\toffset=8 ifTrue: [^client methodReturnReceiver].\r\t\t\t\toffset<12 ifTrue: [^client methodReturnConstant: \r\t\t\t\t\t\t\t\t\t\t\t\t(SpecialConstants at: offset-8)].\r\t\t\t\toffset=12 ifTrue: [^client methodReturnTop].\r\t\t\t\toffset=13 ifTrue: [^client blockReturnTop].\r\t\t\t\toffset>13 ifTrue: [^self error: 'unusedBytecode']].\r\ttype=8 ifTrue: [^self interpretExtension: offset in: method for: client].\r\ttype=9\r\t\tifTrue:  \"short jumps\"\r\t\t\t[offset<8 ifTrue: [^client jump: offset+1].\r\t\t\t^client jump: offset-8+1 if: false].\r\ttype=10 \r\t\tifTrue:  \"long jumps\"\r\t\t\t[byte_ method at: pc.  pc_ pc+1.\r\t\t\toffset<8 ifTrue: [^client jump: offset-4*256 + byte].\r\t\t\t^client jump: (offset bitAnd: 3)*256 + byte if: offset<12].\r\ttype=11 \r\t\tifTrue: \r\t\t\t[^client \r\t\t\t\tsend: (Smalltalk specialSelectorAt: offset+1) \r\t\t\t\tsuper: false\r\t\t\t\tnumArgs: (Smalltalk specialNargsAt: offset+1)].\r\ttype=12 \r\t\tifTrue: \r\t\t\t[^client \r\t\t\t\tsend: (Smalltalk specialSelectorAt: offset+17) \r\t\t\t\tsuper: false\r\t\t\t\tnumArgs: (Smalltalk specialNargsAt: offset+17)].\r\ttype>12\r\t\tifTrue: \r\t\t\t[^client send: (method literalAt: offset+1) \r\t\t\t\t\tsuper: false\r\t\t\t\t\tnumArgs: type-13]! !\r\r\r!InstructionStream methodsFor: 'scanning'!\raddSelectorTo: set \r\t\"If this instruction is a send, add its selector to set.\"\r\r\t| byte literalNumber byte2 |\r\tbyte _ self method at: pc.\r\tbyte < 128 ifTrue: [^self].\r\tbyte >= 176\r\t\tifTrue: \r\t\t\t[\"special byte or short send\"\r\t\t\tbyte >= 208\r\t\t\t\tifTrue: [set add: (self method literalAt: (byte bitAnd: 15) + 1)]\r\t\t\t\tifFalse: [set add: (Smalltalk specialSelectorAt: byte - 176 + 1)]]\r\t\tifFalse: \r\t\t\t[(byte between: 131 and: 134)\r\t\t\t\tifTrue: \r\t\t\t\t\t[byte2 _ self method at: pc + 1.\r\t\t\t\t\tbyte = 131 ifTrue: [set add: (self method literalAt: byte2 \\\\ 32 + 1)].\r\t\t\t\t\tbyte = 132 ifTrue: [byte2 < 64 ifTrue: [set add: (self method literalAt: (self method at: pc + 2) + 1)]].\r\t\t\t\t\tbyte = 133 ifTrue: [set add: (self method literalAt: byte2 \\\\ 32 + 1)].\r\t\t\t\t\tbyte = 134 ifTrue: [set add: (self method literalAt: byte2 \\\\ 64 + 1)]]]! !\r\r!InstructionStream methodsFor: 'scanning'!\rfollowingByte\r\t\"Answer the next bytecode.\"\r\r\t^self method at: pc + 1! !\r\r!InstructionStream methodsFor: 'scanning'!\rmethod\r\t\"Answer the compiled method that supplies the receiver's bytecodes.\"\r\r\t^sender\t\t\"method access when used alone (not as part of a context)\"! !\r\r!InstructionStream methodsFor: 'scanning'!\rnextByte\r\t\"Answer the next bytecode.\"\r\r\t^self method at: pc! !\r\r!InstructionStream methodsFor: 'scanning' stamp: 'ajh 7/18/2003 21:32'!\rnextInstruction\r\t\"Return the next bytecode instruction as a message that an InstructionClient would understand.  This advances the pc by one instruction.\"\r\r\t^ self interpretNextInstructionFor: MessageCatcher new! !\r\r!InstructionStream methodsFor: 'scanning'!\rpc\r\t\"Answer the index of the next bytecode.\"\r\r\t^pc! !\r\r!InstructionStream methodsFor: 'scanning' stamp: 'ajh 7/18/2003 21:29'!\rpreviousPc\r\r\t| currentPc dummy prevPc |\r\tcurrentPc _ pc.\r\tpc _ self method initialPC.\r\tdummy _ MessageCatcher new.\r\t[pc = currentPc] whileFalse: [\r\t\tprevPc _ pc.\r\t\tself interpretNextInstructionFor: dummy.\r\t].\r\t^ prevPc! !\r\r!InstructionStream methodsFor: 'scanning'!\rscanFor: scanBlock \r\t\"Answer the index of the first bytecode for which scanBlock answer true \r\twhen supplied with that bytecode.\"\r\r\t| method end byte type |\r\tmethod _ self method.\r\tend _ method endPC.\r\t[pc <= end]\r\t\twhileTrue: \r\t\t\t[(scanBlock value: (byte _ method at: pc)) ifTrue: [^true].\r\t\t\ttype _ byte // 16.\r\t\t\tpc _ \r\t\t\t\ttype = 8\r\t\t\t\t\tifTrue: [\"extensions\"\r\t\t\t\t\t\t\tpc + (#(2 2 2 2 3 2 2 1 1 1 ) at: byte \\\\ 16 + 1)]\r\t\t\t\t\tifFalse: [type = 10\r\t\t\t\t\t\t\t\tifTrue: [pc + 2\"long jumps\"]\r\t\t\t\t\t\t\t\tifFalse: [pc + 1]]].\r\t^false! !\r\r!InstructionStream methodsFor: 'scanning' stamp: 'hmm 7/29/2001 21:25'!\rskipBackBeforeJump\r\t\"Assuming that the receiver is positioned jast after a jump, skip back one or two bytes, depending on the size of the previous jump instruction.\"\r\t| strm short |\r\tstrm _ InstructionStream on: self method.\r\t(strm scanFor: [:byte |\r\t\t((short _ byte between: 152 and: 159) or: [byte between: 168 and: 175])\r\t\t\tand: [strm pc = (short ifTrue: [pc-1] ifFalse: [pc-2])]]) ifFalse: [self error: 'Where''s the jump??'].\r\tself jump: (short ifTrue: [-1] ifFalse: [-2]).\r! !\r\r!InstructionStream methodsFor: 'scanning'!\rthirdByte\r\t\"Answer the next bytecode.\"\r\r\t^self method at: pc + 2! !\r\r\r!InstructionStream methodsFor: 'private'!\rinterpretExtension: offset in: method for: client\r\t| type offset2 byte2 byte3 |\r\toffset <=6 ifTrue: \r\t\t[\"Extended op codes 128-134\"\r\t\tbyte2 _ method at: pc.\r\t\tpc _ pc + 1.\r\t\toffset <= 2 ifTrue:\r\t\t\t[\"128-130:  extended pushes and pops\"\r\t\t\ttype _ byte2 // 64.\r\t\t\toffset2 _ byte2 \\\\ 64.\r\t\t\toffset = 0 ifTrue: \r\t\t\t\t[type = 0 ifTrue: [^ client pushReceiverVariable: offset2].\r\t\t\t\ttype = 1 ifTrue: [^ client pushTemporaryVariable: offset2].\r\t\t\t\ttype = 2  ifTrue: [^ client pushConstant: (method literalAt: offset2 + 1)].\r\t\t\t\ttype = 3 ifTrue: [^ client pushLiteralVariable: (method literalAt: offset2 + 1)]].\r\t\t\toffset = 1 ifTrue: \r\t\t\t\t[type = 0 ifTrue: [^ client storeIntoReceiverVariable: offset2].\r\t\t\t\ttype = 1 ifTrue: [^ client storeIntoTemporaryVariable: offset2].\r\t\t\t\ttype = 2 ifTrue: [self error: 'illegalStore'].\r\t\t\t\ttype = 3 ifTrue: [^ client storeIntoLiteralVariable: (method literalAt: offset2 + 1)]].\r\t\t\toffset = 2 ifTrue: \r\t\t\t\t[type = 0 ifTrue: [^ client popIntoReceiverVariable: offset2].\r\t\t\t\ttype = 1 ifTrue: [^ client popIntoTemporaryVariable: offset2].\r\t\t\t\ttype = 2 ifTrue: [self error: 'illegalStore'].\r\t\t\t\ttype = 3  ifTrue: [^ client popIntoLiteralVariable: (method literalAt: offset2 + 1)]]].\r\t\t\"131-134: extended sends\"\r\t\toffset = 3 ifTrue:  \"Single extended send\"\r\t\t\t[^ client send: (method literalAt: byte2 \\\\ 32 + 1)\r\t\t\t\t\tsuper: false numArgs: byte2 // 32].\r\t\toffset = 4 ifTrue:    \"Double extended do-anything\"\r\t\t\t[byte3 _ method at: pc.  pc _ pc + 1.\r\t\t\ttype _ byte2 // 32.\r\t\t\ttype = 0 ifTrue: [^ client send: (method literalAt: byte3 + 1)\r\t\t\t\t\t\t\t\t\tsuper: false numArgs: byte2 \\\\ 32].\r\t\t\ttype = 1 ifTrue: [^ client send: (method literalAt: byte3 + 1)\r\t\t\t\t\t\t\t\t\tsuper: true numArgs: byte2 \\\\ 32].\r\t\t\ttype = 2 ifTrue: [^ client pushReceiverVariable: byte3].\r\t\t\ttype = 3 ifTrue: [^ client pushConstant: (method literalAt: byte3 + 1)].\r\t\t\ttype = 4 ifTrue: [^ client pushLiteralVariable: (method literalAt: byte3 + 1)].\r\t\t\ttype = 5 ifTrue: [^ client storeIntoReceiverVariable: byte3].\r\t\t\ttype = 6 ifTrue: [^ client popIntoReceiverVariable: byte3].\r\t\t\ttype = 7 ifTrue: [^ client storeIntoLiteralVariable: (method literalAt: byte3 + 1)]].\r\t\toffset = 5 ifTrue:  \"Single extended send to super\"\r\t\t\t[^ client send: (method literalAt: byte2 \\\\ 32 + 1)\r\t\t\t\t\tsuper: true numArgs: byte2 // 32].\r\t\toffset = 6 ifTrue:   \"Second extended send\"\r\t\t\t[^ client send: (method literalAt: byte2 \\\\ 64 + 1)\r\t\t\t\t\tsuper: false numArgs: byte2 // 64]].\r\toffset = 7 ifTrue: [^ client doPop].\r\toffset = 8 ifTrue: [^ client doDup].\r\toffset = 9 ifTrue: [^ client pushActiveContext].\r\tself error: 'unusedBytecode'! !\r\r!InstructionStream methodsFor: 'private'!\rmethod: method pc: startpc\r\r\tsender _ method. \r\t\"allows this class to stand alone as a method scanner\"\r\tpc _ startpc! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rInstructionStream class\r\tinstanceVariableNames: ''!\r\r!InstructionStream class methodsFor: 'class initialization'!\rinitialize\r\t\"Initialize an array of special constants returned by single-bytecode returns.\"\r\r\tSpecialConstants _ \r\t\t(Array with: true with: false with: nil)\r\t\t\t, (Array with: -1 with: 0 with: 1 with: 2)\t\r\t\"InstructionStream initialize.\"\r! !\r\r\r!InstructionStream class methodsFor: 'instance creation'!\ron: method \r\t\"Answer an instance of me on the argument, method.\"\r\r\t^self new method: method pc: method initialPC! !\rNumber subclass: #Integer\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Numbers'!\r!Integer commentStamp: '<historical>' prior: 0!\rI am a common abstract superclass for all Integer implementations. My implementation subclasses are SmallInteger, LargePositiveInteger, and LargeNegativeInteger.\r\t\rInteger division consists of:\r\t/\texact division, answers a fraction if result is not a whole integer\r\t//\tanswers an Integer, rounded towards negative infinity\r\t\\\\\tis modulo rounded towards negative infinity\r\tquo: truncated division, rounded towards zero!\r\r\r!Integer methodsFor: 'testing'!\reven \r\t\"Refer to the comment in Number|even.\"\r\r\t^((self digitAt: 1) bitAnd: 1) = 0! !\r\r!Integer methodsFor: 'testing'!\risInteger\r\t\"True for all subclasses of Integer.\"\r\r\t^ true! !\r\r!Integer methodsFor: 'testing' stamp: 'ar 6/9/2000 18:56'!\risPowerOfTwo\r\t\"Return true if the receiver is an integral power of two.\"\r\t^ (self bitAnd: self-1) = 0! !\r\r\r!Integer methodsFor: 'arithmetic' stamp: 'di 11/6/1998 13:59'!\r* aNumber\r\t\"Refer to the comment in Number * \" \r\taNumber isInteger ifTrue:\r\t\t[^ self digitMultiply: aNumber \r\t\t\t\t\tneg: self negative ~~ aNumber negative].\r\t^ aNumber adaptToInteger: self andSend: #*! !\r\r!Integer methodsFor: 'arithmetic' stamp: 'di 11/6/1998 13:59'!\r+ aNumber\r\t\"Refer to the comment in Number + \"\r\taNumber isInteger ifTrue:\r\t\t[self negative == aNumber negative\r\t\t\tifTrue: [^ (self digitAdd: aNumber) normalize]\r\t\t\tifFalse: [^ self digitSubtract: aNumber]].\r\t^ aNumber adaptToInteger: self andSend: #+! !\r\r!Integer methodsFor: 'arithmetic' stamp: 'di 11/6/1998 13:59'!\r- aNumber\r\t\"Refer to the comment in Number - \"\r\taNumber isInteger ifTrue:\r\t\t[self negative == aNumber negative\r\t\t\tifTrue: [^ self digitSubtract: aNumber]\r\t\t\tifFalse: [^ (self digitAdd: aNumber) normalize]].\r\t^ aNumber adaptToInteger: self andSend: #-! !\r\r!Integer methodsFor: 'arithmetic' stamp: 'di 11/6/1998 14:00'!\r/ aNumber\r\t\"Refer to the comment in Number / \"\r\t| quoRem |\r\taNumber isInteger ifTrue:\r\t\t[quoRem _ self digitDiv: aNumber abs\t\"*****I've added abs here*****\"\r\t\t\t\t\t\tneg: self negative ~~ aNumber negative.\r\t\t(quoRem at: 2) = 0\r\t\t\tifTrue: [^ (quoRem at: 1) normalize]\r\t\t\tifFalse: [^ (Fraction numerator: self denominator: aNumber) reduced]].\r\t^ aNumber adaptToInteger: self andSend: #/! !\r\r!Integer methodsFor: 'arithmetic' stamp: 'RAH 4/25/2000 19:49'!\r// aNumber \r\t| q |\r\t#Numeric.\r\t\"Changed 200/01/19 For ANSI support.\"\r\taNumber = 0 ifTrue: [^ (ZeroDivide dividend: self) signal\"<- Chg\"].\r\tself = 0 ifTrue: [^ 0].\r\tq := self quo: aNumber.\r\t\"Refer to the comment in Number|//.\"\r\t(q negative\r\t\tifTrue: [q * aNumber ~= self]\r\t\tifFalse: [q = 0 and: [self negative ~= aNumber negative]])\r\t\tifTrue: [^ q - 1\"Truncate towards minus infinity.\"]\r\t\tifFalse: [^ q]! !\r\r!Integer methodsFor: 'arithmetic'!\ralignedTo: anInteger\r\t\"Answer the smallest number not less than receiver that is a multiple of anInteger.\"\r\r\t^(self+anInteger-1//anInteger)*anInteger\r\r\"5 alignedTo: 2\"\r\"12 alignedTo: 3\"! !\r\r!Integer methodsFor: 'arithmetic' stamp: 'di 11/6/1998 14:00'!\rquo: aNumber \r\t\"Refer to the comment in Number quo: \"\r\t| ng quo |\r\taNumber isInteger ifTrue: \r\t\t[ng _ self negative == aNumber negative == false.\r\t\tquo _ (self digitDiv:\r\t\t\t(aNumber class == SmallInteger\r\t\t\t\tifTrue: [aNumber abs]\r\t\t\t\tifFalse: [aNumber])\r\t\t\tneg: ng) at: 1.\r\t\t^ quo normalize].\r\t^ aNumber adaptToInteger: self andSend: #quo:! !\r\r\r!Integer methodsFor: 'comparing' stamp: 'di 11/6/1998 14:00'!\r< aNumber\r\taNumber isInteger ifTrue:\r\t\t[self negative == aNumber negative\r\t\t\tifTrue: [self negative\r\t\t\t\t\t\tifTrue: [^ (self digitCompare: aNumber) > 0]\r\t\t\t\t\t\tifFalse: [^ (self digitCompare: aNumber) < 0]]\r\t\t\tifFalse: [^ self negative]].\r\t^ aNumber adaptToInteger: self andSend: #<! !\r\r!Integer methodsFor: 'comparing' stamp: 'di 11/6/1998 14:00'!\r= aNumber\r\taNumber isNumber ifFalse: [^ false].\r\taNumber isInteger ifTrue:\r\t\t[aNumber negative == self negative\r\t\t\tifTrue: [^ (self digitCompare: aNumber) = 0]\r\t\t\tifFalse: [^ false]].\r\t^ aNumber adaptToInteger: self andSend: #=! !\r\r!Integer methodsFor: 'comparing' stamp: 'di 11/6/1998 14:00'!\r> aNumber\r\taNumber isInteger ifTrue:\r\t\t[self negative == aNumber negative\r\t\t\tifTrue: [self negative\r\t\t\t\t\t\tifTrue: [^(self digitCompare: aNumber) < 0]\r\t\t\t\t\t\tifFalse: [^(self digitCompare: aNumber) > 0]]\r\t\t\tifFalse: [^ aNumber negative]].\r\t^ aNumber adaptToInteger: self andSend: #>! !\r\r!Integer methodsFor: 'comparing'!\rhash\r\t\"Hash is reimplemented because = is implemented.\"\r\r\t^(self lastDigit bitShift: 8) + (self digitAt: 1)! !\r\r\r!Integer methodsFor: 'truncation and round off' stamp: 'lr 11/4/2003 12:14'!\ratRandom\r\t\"Answer a random integer from 1 to self.  This implementation uses a\r\tshared generator. Heavy users should their own implementation or use\r\tInterval>atRandom: directly.\"\r\r\tself = 0 ifTrue: [ ^0 ].\r\tself < 0 ifTrue: [ ^self negated atRandom negated ].\r\t^Collection mutexForPicking critical: [\r\t\tself atRandom: Collection randomForPicking ]! !\r\r!Integer methodsFor: 'truncation and round off' stamp: 'sma 5/12/2000 12:35'!\ratRandom: aGenerator\r\t\"Answer a random integer from 1 to self picked from aGenerator.\"\r\r\t^ aGenerator nextInt: self! !\r\r!Integer methodsFor: 'truncation and round off'!\rceiling \r\t\"Refer to the comment in Number|ceiling.\"! !\r\r!Integer methodsFor: 'truncation and round off'!\rfloor \r\t\"Refer to the comment in Number|floor.\"! !\r\r!Integer methodsFor: 'truncation and round off'!\rnormalize \r\t\"SmallInts OK; LgInts override\"\r\t^ self! !\r\r!Integer methodsFor: 'truncation and round off'!\rrounded \r\t\"Refer to the comment in Number|rounded.\"! !\r\r!Integer methodsFor: 'truncation and round off'!\rtruncated \r\t\"Refer to the comment in Number|truncated.\"! !\r\r\r!Integer methodsFor: 'enumerating'!\rtimesRepeat: aBlock \r\t\"Evaluate the argument, aBlock, the number of times represented by the \r\treceiver.\"\r\r\t| count |\r\tcount _ 1.\r\t[count <= self]\r\t\twhileTrue: \r\t\t\t[aBlock value.\r\t\t\tcount _ count + 1]! !\r\r\r!Integer methodsFor: 'mathematical functions' stamp: 'di 4/22/1998 14:45'!\rfactorial\r\t\"Answer the factorial of the receiver.\"\r\r\tself = 0 ifTrue: [^ 1].\r\tself > 0 ifTrue: [^ self * (self - 1) factorial].\r\tself error: 'Not valid for negative integers'! !\r\r!Integer methodsFor: 'mathematical functions' stamp: 'LC 6/17/1998 19:22'!\rgcd: anInteger\r\t\"See Knuth, Vol 2, 4.5.2, Algorithm L\"\r\t\"Initialize\"\r\t| higher u v k uHat vHat a b c d vPrime vPrimePrime q t |\r\thigher _ SmallInteger maxVal highBit.\r\tu _ self abs max: (v _ anInteger abs).\r\tv _ self abs min: v.\r\t[v class == SmallInteger]\r\t\twhileFalse: \r\t\t\t[(uHat _ u bitShift: (k _ higher - u highBit)) class == SmallInteger\r\t\t\t\tifFalse: \r\t\t\t\t\t[k _ k - 1.\r\t\t\t\t\tuHat _ uHat bitShift: -1].\r\t\t\tvHat _ v bitShift: k.\r\t\t\ta _ 1.\r\t\t\tb _ 0.\r\t\t\tc _ 0.\r\t\t\td _ 1.\r\t\t\t\"Test quotient\"\r\t\t\t[(vPrime _ vHat + d) ~= 0\r\t\t\t\tand: [(vPrimePrime _ vHat + c) ~= 0 and: [(q _ uHat + a // vPrimePrime) = (uHat + b // vPrime)]]]\r\t\t\t\twhileTrue: \r\t\t\t\t\t[\"Emulate Euclid\"\r\t\t\t\t\tc _ a - (q * (a _ c)).\r\t\t\t\t\td _ b - (q * (b _ d)).\r\t\t\t\t\tvHat _ uHat - (q * (uHat _ vHat))].\r\t\t\t\"Multiprecision step\"\r\t\t\tb = 0\r\t\t\t\tifTrue: \r\t\t\t\t\t[v _ u rem: (u _ v)]\r\t\t\t\tifFalse: \r\t\t\t\t\t[t _ u * a + (v * b).\r\t\t\t\t\tv _ u * c + (v * d).\r\t\t\t\t\tu _ t]].\r\t^ v gcd: u! !\r\r!Integer methodsFor: 'mathematical functions'!\rlcm: n \r\t\"Answer the least common multiple of the receiver and n.\"\r\r\t^self // (self gcd: n) * n! !\r\r!Integer methodsFor: 'mathematical functions' stamp: 'tk 7/30/97 13:08'!\rtake: kk\r\t\"Return the number of combinations of (self) elements taken kk at a time.  For 6 take 3, this is 6*5*4 / (1*2*3).  Zero outside of Pascal's triangle.  Use a trick to go faster.\"\r\t\" 6 take: 3  \"\r\r\t| num denom |\r\tkk < 0 ifTrue: [^ 0].\r\tkk > self ifTrue: [^ 0].\r\tnum _ 1.\r\tself to: (kk max: self-kk) + 1 by: -1 do: [:factor | num _ num * factor].\r\tdenom _ 1.\r\t1 to: (kk min: self-kk) do: [:factor | denom _ denom * factor].\r\t^ num // denom! !\r\r\r!Integer methodsFor: 'bit manipulation'!\r<< shiftAmount  \"left shift\"\r\tshiftAmount < 0 ifTrue: [self error: 'negative arg'].\r\t^ self bitShift: shiftAmount! !\r\r!Integer methodsFor: 'bit manipulation' stamp: 'dwh 8/18/1999 21:57'!\r>> shiftAmount  \"right shift\"\r\tshiftAmount < 0 ifTrue: [self error: 'negative arg'].\r\t^ self bitShift: 0 - shiftAmount! !\r\r!Integer methodsFor: 'bit manipulation'!\rallMask: mask \r\t\"Treat the argument as a bit mask. Answer whether all of the bits that \r\tare 1 in the argument are 1 in the receiver.\"\r\r\t^mask = (self bitAnd: mask)! !\r\r!Integer methodsFor: 'bit manipulation' stamp: 'sr 11/29/2000 14:32'!\ranyBitOfMagnitudeFrom: start to: stopArg \r\t\"Tests for any magnitude bits in the interval from start to stopArg.\"\r\t\"Primitive fixed in LargeIntegers v1.2. If you have an earlier version \r\tcomment out the primitive call (using this ST method then).\"\r\t| magnitude firstDigitIx lastDigitIx rightShift leftShift stop |\r\t<primitive: 'primAnyBitFromTo' module:'LargeIntegers'>\r\tstart < 1 | (stopArg < 1)\r\t\tifTrue: [^ self error: 'out of range'].\r\tmagnitude _ self abs.\r\tstop _ stopArg min: magnitude highBit.\r\tstart > stop\r\t\tifTrue: [^ false].\r\tfirstDigitIx _ start - 1 // 8 + 1.\r\tlastDigitIx _ stop - 1 // 8 + 1.\r\trightShift _ (start - 1 \\\\ 8) negated.\r\tleftShift _ 7 - (stop - 1 \\\\ 8).\r\tfirstDigitIx = lastDigitIx\r\t\tifTrue: [| digit mask | \r\t\t\tmask _ (255 bitShift: rightShift negated)\r\t\t\t\t\t\tbitAnd: (255 bitShift: leftShift negated).\r\t\t\tdigit _ magnitude digitAt: firstDigitIx.\r\t\t\t^ (digit bitAnd: mask)\r\t\t\t\t~= 0].\r\t((magnitude digitAt: firstDigitIx)\r\t\t\tbitShift: rightShift)\r\t\t\t~= 0\r\t\tifTrue: [^ true].\r\tfirstDigitIx + 1\r\t\tto: lastDigitIx - 1\r\t\tdo: [:ix | (magnitude digitAt: ix)\r\t\t\t\t\t~= 0\r\t\t\t\tifTrue: [^ true]].\r\t(((magnitude digitAt: lastDigitIx)\r\t\t\tbitShift: leftShift)\r\t\t\tbitAnd: 255)\r\t\t\t~= 0\r\t\tifTrue: [^ true].\r\t^ false! !\r\r!Integer methodsFor: 'bit manipulation'!\ranyMask: mask \r\t\"Treat the argument as a bit mask. Answer whether any of the bits that \r\tare 1 in the argument are 1 in the receiver.\"\r\r\t^0 ~= (self bitAnd: mask)! !\r\r!Integer methodsFor: 'bit manipulation' stamp: 'sr 3/13/2000 17:47'!\rbitAnd: n \r\t\"Answer an Integer whose bits are the logical AND of the receiver's bits  \r\tand those of the argument, n.\"\r\t| norm |\r\t<primitive: 'primDigitBitAnd' module:'LargeIntegers'>\r\tnorm _ n normalize.\r\t^ self\r\t\tdigitLogic: norm\r\t\top: #bitAnd:\r\t\tlength: (self digitLength max: norm digitLength)! !\r\r!Integer methodsFor: 'bit manipulation' stamp: 'di 4/30/1998 10:32'!\rbitClear: aMask \r\t\"Answer an Integer equal to the receiver, except with all bits cleared that are set in aMask.\"\r\r\t^ (self bitOr: aMask) - aMask! !\r\r!Integer methodsFor: 'bit manipulation' stamp: 'wb 4/28/1998 12:17'!\rbitInvert\r\t\"Answer an Integer whose bits are the logical negation of the receiver's bits.\r\tNumbers are interpreted as having 2's-complement representation.\"\r\r\t^ -1 - self! !\r\r!Integer methodsFor: 'bit manipulation'!\rbitInvert32\r\t\"Answer the 32-bit complement of the receiver.\"\r\r\t^ self bitXor: 16rFFFFFFFF! !\r\r!Integer methodsFor: 'bit manipulation' stamp: 'sr 3/13/2000 17:47'!\rbitOr: n \r\t\"Answer an Integer whose bits are the logical OR of the receiver's bits  \r\tand those of the argument, n.\"\r\t| norm |\r\t<primitive: 'primDigitBitOr' module:'LargeIntegers'>\r\tnorm _ n normalize.\r\t^ self\r\t\tdigitLogic: norm\r\t\top: #bitOr:\r\t\tlength: (self digitLength max: norm digitLength)! !\r\r!Integer methodsFor: 'bit manipulation' stamp: 'sr 6/9/2000 10:09'!\rbitShift: shiftCount \r\t\"Answer an Integer whose value (in twos-complement representation) is  \r\tthe receiver's value (in twos-complement representation) shifted left by \r\tthe number of bits indicated by the argument. Negative arguments  \r\tshift right. Zeros are shifted in from the right in left shifts.\"\r\t| magnitudeShift |\r\tmagnitudeShift _ self bitShiftMagnitude: shiftCount.\r\t^ ((self negative and: [shiftCount negative])\r\t\tand: [self anyBitOfMagnitudeFrom: 1 to: shiftCount negated])\r\t\tifTrue: [magnitudeShift - 1]\r\t\tifFalse: [magnitudeShift]! !\r\r!Integer methodsFor: 'bit manipulation' stamp: 'sr 6/9/2000 14:02'!\rbitShiftMagnitude: shiftCount \r\t\"Answer an Integer whose value (in magnitude representation) is  \r\tthe receiver's value (in magnitude representation) shifted left by  \r\tthe number of bits indicated by the argument. Negative arguments\r\tshift right. Zeros are shifted in from the right in left shifts.\"\r\t| rShift |\r\t<primitive: 'primDigitBitShiftMagnitude' module:'LargeIntegers'>\r\tshiftCount >= 0 ifTrue: [^ self digitLshift: shiftCount].\r\trShift _ 0 - shiftCount.\r\t^ (self\r\t\tdigitRshift: (rShift bitAnd: 7)\r\t\tbytes: (rShift bitShift: -3)\r\t\tlookfirst: self digitLength) normalize! !\r\r!Integer methodsFor: 'bit manipulation' stamp: 'sr 3/13/2000 17:47'!\rbitXor: n \r\t\"Answer an Integer whose bits are the logical XOR of the receiver's bits  \r\tand those of the argument, n.\"\r\t| norm |\r\t<primitive: 'primDigitBitXor' module:'LargeIntegers'>\r\tnorm _ n normalize.\r\t^ self\r\t\tdigitLogic: norm\r\t\top: #bitXor:\r\t\tlength: (self digitLength max: norm digitLength)! !\r\r!Integer methodsFor: 'bit manipulation' stamp: 'sr 6/8/2000 02:13'!\rhighBit\r\t\"Answer the index of the high order bit of the receiver, or zero if the  \r\treceiver is zero. Raise an error if the receiver is negative, since  \r\tnegative integers are defined to have an infinite number of leading 1's \r\tin 2's-complement arithmetic. Use >>highBitOfMagnitude if you want to  \r\tget the highest bit of the magnitude.\"\r\r\t^ self subclassResponsibility! !\r\r!Integer methodsFor: 'bit manipulation' stamp: 'sr 6/8/2000 01:55'!\rhighBitOfMagnitude\r\t\"Answer the index of the high order bit of the magnitude of the  \r\treceiver, or zero if the receiver is zero.\"\r\t^ self subclassResponsibility! !\r\r!Integer methodsFor: 'bit manipulation' stamp: 'jm 2/19/98 12:11'!\rlowBit\r\t\"Answer the index of the low order bit of this number.\"\r\t| index |\r\tself = 0 ifTrue: [ ^ 0 ].\r\tindex := 1.\r\t[ (self digitAt: index) = 0 ]\r\t\twhileTrue:\r\t\t\t[ index := index + 1 ].\r\t^ (self digitAt: index) lowBit + (8 * (index - 1))! !\r\r!Integer methodsFor: 'bit manipulation'!\rnoMask: mask \r\t\"Treat the argument as a bit mask. Answer whether none of the bits that \r\tare 1 in the argument are 1 in the receiver.\"\r\r\t^0 = (self bitAnd: mask)! !\r\r\r!Integer methodsFor: 'converting' stamp: 'di 11/6/1998 13:43'!\radaptToFraction: rcvr andSend: selector\r\t\"If I am involved in arithmetic with a Fraction, convert me to a Fraction.\"\r\t^ rcvr perform: selector with: self asFraction! !\r\r!Integer methodsFor: 'converting' stamp: 'RAH 4/25/2000 19:49'!\radaptToScaledDecimal: receiverScaledDecimal andSend: arithmeticOpSelector \r\t\"Convert me to a ScaledDecimal and do the arithmetic. \r\treceiverScaledDecimal arithmeticOpSelector self.\"\r\t#Numeric.\r\t\"add 200/01/19 For ScaledDecimal support.\"\r\t^ receiverScaledDecimal perform: arithmeticOpSelector with: (self asScaledDecimal: 0)! !\r\r!Integer methodsFor: 'converting'!\rasCharacter\r\t\"Answer the Character whose value is the receiver.\"\r\r\t^Character value: self! !\r\r!Integer methodsFor: 'converting' stamp: 'ar 10/31/1998 23:04'!\rasColorOfDepth: d\r\t\"Return a color value representing the receiver as color of the given depth\"\r\t^Color colorFromPixelValue: self depth: d! !\r\r!Integer methodsFor: 'converting' stamp: 'di 1/13/1999 12:45'!\rasFloat\r\t\"Answer a Float that represents the value of the receiver.\r\tOptimized to process only the significant digits of a LargeInteger.\r\tSqR: 11/30/1998 21:11\"\r\r\t| sum firstByte shift |\r\tshift _ 0.\r\tsum _ 0.0.\r\tfirstByte _ self size - 7 max: 1.\r\tfirstByte to: self size do:\r\t\t[:byteIndex | \r\t\tsum _ ((self digitAt: byteIndex) asFloat timesTwoPower: shift) + sum.\r\t\tshift _ shift + 8].\r\t^sum * self sign asFloat timesTwoPower: firstByte - 1 * 8! !\r\r!Integer methodsFor: 'converting'!\rasFraction\r\t\"Answer a Fraction that represents value of the the receiver.\"\r\r\t^Fraction numerator: self denominator: 1! !\r\r!Integer methodsFor: 'converting' stamp: 'ls 5/26/1998 20:53'!\rasHexDigit\r\t^'0123456789ABCDEF' at: self+1! !\r\r!Integer methodsFor: 'converting'!\rasInteger\r\t\"Answer with the receiver itself.\"\r\r\t^self\r\r! !\r\r!Integer methodsFor: 'converting' stamp: 'RAH 4/25/2000 19:49'!\rasScaledDecimal: scaleNotUsed \r\t\"The number of significant digits of the answer is the same as the \r\tnumber of decimal digits in the receiver.  The scale of the answer is 0.\"\r\t#Numeric.\r\t\"add 200/01/19 For <integer> protocol.\"\r\t^ ScaledDecimal newFromNumber: self scale: 0! !\r\r!Integer methodsFor: 'converting' stamp: 'brp 5/13/2003 10:12'!\rasYear\r\r\n\t^ Year year: self \n! !\r\r\r!Integer methodsFor: 'printing' stamp: 'sw 11/24/1998 14:53'!\rasStringWithCommas\r\t\"123456789 asStringWithCommas\"\r\t\"-123456789 asStringWithCommas\"\r\t| digits |\r\tdigits _ self abs printString.\r\t^ String streamContents:\r\t\t[:strm | \r\t\tself sign = -1 ifTrue: [strm nextPut: $-].\r\t\t1 to: digits size do: \r\t\t\t[:i | strm nextPut: (digits at: i).\r\t\t\t(i < digits size and: [(i - digits size) \\\\ 3 = 0])\r\t\t\t\tifTrue: [strm nextPut: $,]]]! !\r\r!Integer methodsFor: 'printing' stamp: 'sw 11/13/1999 23:00'!\rasTwoCharacterString\r\t\"Answer a two-character string representing the receiver, with leading zero if required.  Intended for use with integers in the range 0 to 99, but plausible replies given for other values too\"\r\r\t^ (self >= 0 and: [self < 10])\r\t\tifTrue:\t['0', self printString]\r\t\tifFalse:\t[self printString copyFrom: 1 to: 2]\r\r\r\"\r2 asTwoCharacterString\r11 asTwoCharacterString\r1943 asTwoCharacterString\r0 asTwoCharacterString\r-2 asTwoCharacterString\r-234 asTwoCharacterString\r\"! !\r\r!Integer methodsFor: 'printing' stamp: 'tk 4/1/2002 11:30'!\rasWords\r\t\"SmallInteger maxVal asWords\"\r\t| mils minus three num answer milCount |\r\tself = 0 ifTrue: [^'zero'].\r\tmils _ #('' ' thousand' ' million' ' billion' ' trillion' ' quadrillion' ' quintillion' ' sextillion' ' septillion' ' octillion' ' nonillion' ' decillion' ' undecillion' ' duodecillion' ' tredecillion' ' quattuordecillion' ' quindecillion' ' sexdecillion' ' septendecillion' ' octodecillion' ' novemdecillion' ' vigintillion').\r\tnum _ self.\r\tminus _ ''.\r\tself < 0 ifTrue: [\r\t\tminus _ 'negative '.\r\t\tnum _ num negated.\r\t].\r\tanswer _ String new.\r\tmilCount _ 1.\r\t[num > 0] whileTrue: [\r\t\tthree _ (num \\\\ 1000) threeDigitName.\r\t\tnum _ num // 1000.\r\t\tthree isEmpty ifFalse: [\r\t\t\tanswer isEmpty ifFalse: [\r\t\t\t\tanswer _ ', ',answer\r\t\t\t].\r\t\t\tanswer _ three,(mils at: milCount),answer.\r\t\t].\r\t\tmilCount _ milCount + 1.\r\t].\r\t^minus,answer! !\r\r!Integer methodsFor: 'printing'!\rhex\r\t^ self printStringBase: 16! !\r\r!Integer methodsFor: 'printing'!\rhex8  \"16r3333 hex8\"\r\t| hex |\r\thex _ self hex.  \"16rNNN\"\r\thex size < 11\r\t\tifTrue: [^ hex copyReplaceFrom: 4 to: 3\r\t\t\t\t\t\t with: ('00000000' copyFrom: 1 to: 11-hex size)]\r\t\tifFalse: [^ hex]! !\r\r!Integer methodsFor: 'printing'!\risLiteral\r\r\t^true! !\r\r!Integer methodsFor: 'printing' stamp: 'gk 11/26/2003 10:26'!\rprintOn: aStream base: base\r\t\"Print a representation of the receiver on the stream\r\t<aStream> in base <base> where\r\t2 <= <baseInteger> <= 16. If <base> is other than 10\r\tit is written first separated by $r followed by the number\r\tlike for example: 16rFCE2\"\r\t\r\t| current letters digits quo i |\r\tself < 0 ifTrue: [\r\t\taStream nextPut: $-.\r\t\t^self negated printOn: aStream base: base].\r\tdigits _ '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'.\r\tbase = 10 ifFalse: [aStream print: base; nextPut: $r].\r\tcurrent _ self.\r\ti _ self digitLength * 8.\r\tletters _ String new: i.\r\t[current < base] whileFalse: \r\t\t[quo _ current quo: base.\r\t\tletters at: i put: (digits at: (current - (quo * base)) + 1).\r\t\ti _ i - 1.\r\t\tcurrent _ quo].\r\tletters at: i put: (digits at: current + 1).\r\taStream nextPutAll: (letters copyFrom: i to: letters size)! !\r\r!Integer methodsFor: 'printing'!\rradix: radix \r\t\"Answer a String representing the receiver as a base radix integer.\"\r\r\t^ self printStringBase: radix! !\r\r\r!Integer methodsFor: 'system primitives' stamp: 'tk 3/24/1999 20:26'!\rlastDigit\r\t\"Answer the last digit of the integer base 256.  LargePositiveInteger uses bytes of base two number, and each is a 'digit'.\"\r\r\t^self digitAt: self digitLength! !\r\r!Integer methodsFor: 'system primitives'!\rreplaceFrom: start to: stop with: replacement startingAt: repStart\r\t| j |  \"Catches failure if LgInt replace primitive fails\"\r\tj _ repStart.\r\tstart to: stop do:\r\t\t[:i |\r\t\tself digitAt: i put: (replacement digitAt: j).\r\t\tj _ j+1]! !\r\r\r!Integer methodsFor: 'private'!\rcopyto: x\r\t| stop |\r\tstop _ self digitLength min: x digitLength.\r\t^ x replaceFrom: 1 to: stop with: self startingAt: 1! !\r\r!Integer methodsFor: 'private' stamp: 'sr 1/23/2000 05:41'!\rdigitAdd: arg \r\t| len arglen accum sum |\r\t<primitive: 'primDigitAdd' module:'LargeIntegers'>\r\taccum _ 0.\r\t(len _ self digitLength) < (arglen _ arg digitLength) ifTrue: [len _ arglen].\r\t\"Open code max: for speed\"\r\tsum _ Integer new: len neg: self negative.\r\t1 to: len do: \r\t\t[:i | \r\t\taccum _ (accum bitShift: -8)\r\t\t\t\t\t+ (self digitAt: i) + (arg digitAt: i).\r\t\tsum digitAt: i put: (accum bitAnd: 255)].\r\taccum > 255\r\t\tifTrue: \r\t\t\t[sum _ sum growby: 1.\r\t\t\tsum at: sum digitLength put: (accum bitShift: -8)].\r\t^ sum! !\r\r!Integer methodsFor: 'private' stamp: 'sr 1/23/2000 05:43'!\rdigitCompare: arg \r\t\"Compare the magnitude of self with that of arg.   \r\tReturn a code of 1, 0, -1 for self >, = , < arg\"\r\t| len arglen argDigit selfDigit |\r\t<primitive: 'primDigitCompare' module:'LargeIntegers'>\r\tlen _ self digitLength.\r\t(arglen _ arg digitLength) ~= len\r\t\tifTrue: [arglen > len\r\t\t\t\tifTrue: [^ -1]\r\t\t\t\tifFalse: [^ 1]].\r\t[len > 0]\r\t\twhileTrue: \r\t\t\t[(argDigit _ arg digitAt: len) ~= (selfDigit _ self digitAt: len)\r\t\t\t\tifTrue: [argDigit < selfDigit\r\t\t\t\t\t\tifTrue: [^ 1]\r\t\t\t\t\t\tifFalse: [^ -1]].\r\t\t\tlen _ len - 1].\r\t^ 0! !\r\r!Integer methodsFor: 'private' stamp: 'sr 6/8/2000 01:28'!\rdigitDiv: arg neg: ng \r\t\"Answer with an array of (quotient, remainder).\"\r\t| quo rem ql d div dh dnh dl qhi qlo j l hi lo r3 a t |\r\t<primitive: 'primDigitDivNegative' module:'LargeIntegers'>\r\targ = 0 ifTrue: [^ (ZeroDivide dividend: self) signal].\r\t\"TFEI added this line\"\r\tl _ self digitLength - arg digitLength + 1.\r\tl <= 0 ifTrue: [^ Array with: 0 with: self].\r\t\"shortcut against #highBit\"\r\td _ 8 - arg lastDigit highBitOfPositiveReceiver.\r\tdiv _ arg digitLshift: d.\r\tdiv _ div growto: div digitLength + 1.\r\t\"shifts so high order word is >=128\"\r\trem _ self digitLshift: d.\r\trem digitLength = self digitLength ifTrue: [rem _ rem growto: self digitLength + 1].\r\t\"makes a copy and shifts\"\r\tquo _ Integer new: l neg: ng.\r\tdl _ div digitLength - 1.\r\t\"Last actual byte of data\"\r\tql _ l.\r\tdh _ div digitAt: dl.\r\tdnh _ dl = 1\r\t\t\t\tifTrue: [0]\r\t\t\t\tifFalse: [div digitAt: dl - 1].\r\t1 to: ql do: \r\t\t[:k | \r\t\t\"maintain quo*arg+rem=self\"\r\t\t\"Estimate rem/div by dividing the leading to bytes of rem by dh.\"\r\t\t\"The estimate is q = qhi*16+qlo, where qhi and qlo are nibbles.\"\r\t\tj _ rem digitLength + 1 - k.\r\t\t\"r1 _ rem digitAt: j.\"\r\t\t(rem digitAt: j)\r\t\t\t= dh\r\t\t\tifTrue: [qhi _ qlo _ 15\r\t\t\t\t\"i.e. q=255\"]\r\t\t\tifFalse: \r\t\t\t\t[\"Compute q = (r1,r2)//dh, t = (r1,r2)\\\\dh.  \r\t\t\t\tNote that r1,r2 are bytes, not nibbles.  \r\t\t\t\tBe careful not to generate intermediate results exceeding 13  \r\t\t\t\tbits.\"\r\t\t\t\t\"r2 _ (rem digitAt: j - 1).\"\r\t\t\t\tt _ ((rem digitAt: j)\r\t\t\t\t\t\t\tbitShift: 4)\r\t\t\t\t\t\t\t+ ((rem digitAt: j - 1)\r\t\t\t\t\t\t\t\t\tbitShift: -4).\r\t\t\t\tqhi _ t // dh.\r\t\t\t\tt _ (t \\\\ dh bitShift: 4)\r\t\t\t\t\t\t\t+ ((rem digitAt: j - 1)\r\t\t\t\t\t\t\t\t\tbitAnd: 15).\r\t\t\t\tqlo _ t // dh.\r\t\t\t\tt _ t \\\\ dh.\r\t\t\t\t\"Next compute (hi,lo) _ q*dnh\"\r\t\t\t\thi _ qhi * dnh.\r\t\t\t\tlo _ qlo * dnh + ((hi bitAnd: 15)\r\t\t\t\t\t\t\t\tbitShift: 4).\r\t\t\t\thi _ (hi bitShift: -4)\r\t\t\t\t\t\t\t+ (lo bitShift: -8).\r\t\t\t\tlo _ lo bitAnd: 255.\r\t\t\t\t\"Correct overestimate of q.  \r\t\t\t\tMax of 2 iterations through loop -- see Knuth vol. 2\"\r\t\t\t\tr3 _ j < 3\r\t\t\t\t\t\t\tifTrue: [0]\r\t\t\t\t\t\t\tifFalse: [rem digitAt: j - 2].\r\t\t\t\t[(t < hi\r\t\t\t\t\tor: [t = hi and: [r3 < lo]])\r\t\t\t\t\tand: \r\t\t\t\t\t\t[\"i.e. (t,r3) < (hi,lo)\"\r\t\t\t\t\t\tqlo _ qlo - 1.\r\t\t\t\t\t\tlo _ lo - dnh.\r\t\t\t\t\t\tlo < 0\r\t\t\t\t\t\t\tifTrue: \r\t\t\t\t\t\t\t\t[hi _ hi - 1.\r\t\t\t\t\t\t\t\tlo _ lo + 256].\r\t\t\t\t\t\thi >= dh]]\r\t\t\t\t\twhileTrue: [hi _ hi - dh].\r\t\t\t\tqlo < 0\r\t\t\t\t\tifTrue: \r\t\t\t\t\t\t[qhi _ qhi - 1.\r\t\t\t\t\t\tqlo _ qlo + 16]].\r\t\t\"Subtract q*div from rem\"\r\t\tl _ j - dl.\r\t\ta _ 0.\r\t\t1 to: div digitLength do: \r\t\t\t[:i | \r\t\t\thi _ (div digitAt: i)\r\t\t\t\t\t\t* qhi.\r\t\t\tlo _ a + (rem digitAt: l) - ((hi bitAnd: 15)\r\t\t\t\t\t\t\tbitShift: 4) - ((div digitAt: i)\r\t\t\t\t\t\t\t* qlo).\r\t\t\trem digitAt: l put: lo - (lo // 256 * 256).\r\t\t\t\"sign-tolerant form of (lo bitAnd: 255)\"\r\t\t\ta _ lo // 256 - (hi bitShift: -4).\r\t\t\tl _ l + 1].\r\t\ta < 0\r\t\t\tifTrue: \r\t\t\t\t[\"Add div back into rem, decrease q by 1\"\r\t\t\t\tqlo _ qlo - 1.\r\t\t\t\tl _ j - dl.\r\t\t\t\ta _ 0.\r\t\t\t\t1 to: div digitLength do: \r\t\t\t\t\t[:i | \r\t\t\t\t\ta _ (a bitShift: -8)\r\t\t\t\t\t\t\t\t+ (rem digitAt: l) + (div digitAt: i).\r\t\t\t\t\trem digitAt: l put: (a bitAnd: 255).\r\t\t\t\t\tl _ l + 1]].\r\t\tquo digitAt: quo digitLength + 1 - k put: (qhi bitShift: 4)\r\t\t\t\t+ qlo].\r\trem _ rem\r\t\t\t\tdigitRshift: d\r\t\t\t\tbytes: 0\r\t\t\t\tlookfirst: dl.\r\t^ Array with: quo with: rem! !\r\r!Integer methodsFor: 'private' stamp: 'hmm 1/7/2002 20:55'!\rdigitLogic: arg op: op length: len\r\t| result neg1 neg2 rneg z1 z2 rz b1 b2 b |\r\tneg1 _ self negative.\r\tneg2 _ arg negative.\r\trneg _ \r\t\t((neg1 ifTrue: [-1] ifFalse: [0])\r\t\t\tperform: op \r\t\t\twith: (neg2\r\t\t\t\t\tifTrue: [-1]\r\t\t\t\t\tifFalse: [0])) < 0.\r\tresult _ Integer new: len neg: rneg.\r\trz _ z1 _ z2 _ true.\r\t1 to: result digitLength do: \r\t\t[:i | \r\t\tb1 _ self digitAt: i.\r\t\tneg1 \r\t\t\tifTrue: [b1 _ z1\r\t\t\t\t\t\tifTrue: [b1 = 0\r\t\t\t\t\t\t\t\t\tifTrue: [0]\r\t\t\t\t\t\t\t\t\tifFalse: \r\t\t\t\t\t\t\t\t\t\t[z1 _ false.\r\t\t\t\t\t\t\t\t\t\t256 - b1]]\r\t\t\t\t\t\tifFalse: [255 - b1]].\r\t\tb2 _ arg digitAt: i.\r\t\tneg2 \r\t\t\tifTrue: [b2 _ z2\r\t\t\t\t\t\tifTrue: [b2 = 0\r\t\t\t\t\t\t\t\t\tifTrue: [0]\r\t\t\t\t\t\t\t\t\tifFalse: \r\t\t\t\t\t\t\t\t\t\t[z2 _ false.\r\t\t\t\t\t\t\t\t\t\t256 - b2]]\r\t\t\t\t\t\tifFalse: [255 - b2]].\r\t\tb _ b1 perform: op with: b2.\r\t\tresult \r\t\t\tdigitAt: i \r\t\t\tput: (rneg\r\t\t\t\t\tifTrue: [rz ifTrue: [b = 0\r\t\t\t\t\t\t\t\t\t\tifTrue: [0]\r\t\t\t\t\t\t\t\t\t\tifFalse:\r\t\t\t\t\t\t\t\t\t\t\t[rz _ false.\r\t\t\t\t\t\t\t\t\t\t\t256 - b]]\r\t\t\t\t\t\t\t\tifFalse: [255 - b]]\r\t\t\t\tifFalse: [b])].\r\t^ result normalize! !\r\r!Integer methodsFor: 'private' stamp: 'sr 6/8/2000 01:30'!\rdigitLshift: shiftCount \r\t| carry rShift mask len result digit byteShift bitShift highBit |\r\t(highBit _ self highBitOfMagnitude) = 0 ifTrue: [^ 0].\r\tlen _ highBit + shiftCount + 7 // 8.\r\tresult _ Integer new: len neg: self negative.\r\tbyteShift _ shiftCount // 8.\r\tbitShift _ shiftCount \\\\ 8.\r\tbitShift = 0 ifTrue: [\"Fast version for byte-aligned shifts\"\r\t\t^ result\r\t\t\treplaceFrom: byteShift + 1\r\t\t\tto: len\r\t\t\twith: self\r\t\t\tstartingAt: 1].\r\tcarry _ 0.\r\trShift _ bitShift - 8.\r\tmask _ 255 bitShift: 0 - bitShift.\r\t1 to: byteShift do: [:i | result digitAt: i put: 0].\r\t1 to: len - byteShift do: \r\t\t[:i | \r\t\tdigit _ self digitAt: i.\r\t\tresult digitAt: i + byteShift put: (((digit bitAnd: mask)\r\t\t\t\tbitShift: bitShift)\r\t\t\t\tbitOr: carry).\r\t\tcarry _ digit bitShift: rShift].\r\t^ result! !\r\r!Integer methodsFor: 'private' stamp: 'sr 1/23/2000 05:46'!\rdigitMultiply: arg neg: ng \r\t| prod prodLen carry digit k ab |\r\t<primitive: 'primDigitMultiplyNegative' module:'LargeIntegers'>\r\t(arg digitLength = 1 and: [(arg digitAt: 1)\r\t\t\t= 0])\r\t\tifTrue: [^ 0].\r\t(self digitLength = 1 and: [(self digitAt: 1)\r\t\t\t= 0])\r\t\tifTrue: [^ 0].\r\tprodLen _ self digitLength + arg digitLength.\r\tprod _ Integer new: prodLen neg: ng.\r\t\"prod starts out all zero\"\r\t1 to: self digitLength do: [:i | (digit _ self digitAt: i) ~= 0\r\t\t\tifTrue: \r\t\t\t\t[k _ i.\r\t\t\t\tcarry _ 0.\r\t\t\t\t\"Loop invariant: 0<=carry<=0377, k=i+j-1\"\r\t\t\t\t1 to: arg digitLength do: \r\t\t\t\t\t[:j | \r\t\t\t\t\tab _ (arg digitAt: j)\r\t\t\t\t\t\t\t\t* digit + carry + (prod digitAt: k).\r\t\t\t\t\tcarry _ ab bitShift: -8.\r\t\t\t\t\tprod digitAt: k put: (ab bitAnd: 255).\r\t\t\t\t\tk _ k + 1].\r\t\t\t\tprod digitAt: k put: carry]].\r\t^ prod normalize! !\r\r!Integer methodsFor: 'private'!\rdigitRshift: anInteger bytes: b lookfirst: a \r\t \"Shift right 8*b+anInteger bits, 0<=n<8.\r\tDiscard all digits beyond a, and all zeroes at or below a.\"\r\t| n x r f m digit count i |\r\tn _ 0 - anInteger.\r\tx _ 0.\r\tf _ n + 8.\r\ti _ a.\r\tm _ 255 bitShift: 0 - f.\r\tdigit _ self digitAt: i.\r\t[((digit bitShift: n) bitOr: x) = 0 and: [i ~= 1]] whileTrue:\r\t\t[x _ digit bitShift: f \"Can't exceed 8 bits\".\r\t\ti _ i - 1.\r\t\tdigit _ self digitAt: i].\r\ti <= b ifTrue: [^Integer new: 0 neg: self negative].  \"All bits lost\"\r\tr _ Integer new: i - b neg: self negative.\r\tcount _ i.\r\tx _ (self digitAt: b + 1) bitShift: n.\r\tb + 1 to: count do:\r\t\t[:j | digit _ self digitAt: j + 1.\r\t\tr digitAt: j - b put: (((digit bitAnd: m) bitShift: f) bitOr: x) \r\t\t\t\"Avoid values > 8 bits\".\r\t\tx _ digit bitShift: n].\r\t^r! !\r\r!Integer methodsFor: 'private' stamp: 'sr 1/23/2000 05:46'!\rdigitSubtract: arg \r\t| smaller larger z sum sl al ng |\r\t<primitive: 'primDigitSubtract' module:'LargeIntegers'>\r\tsl _ self digitLength.\r\tal _ arg digitLength.\r\t(sl = al\r\t\tifTrue: \r\t\t\t[[(self digitAt: sl)\r\t\t\t\t= (arg digitAt: sl) and: [sl > 1]]\r\t\t\t\twhileTrue: [sl _ sl - 1].\r\t\t\tal _ sl.\r\t\t\t(self digitAt: sl)\r\t\t\t\t< (arg digitAt: sl)]\r\t\tifFalse: [sl < al])\r\t\tifTrue: \r\t\t\t[larger _ arg.\r\t\t\tsmaller _ self.\r\t\t\tng _ self negative == false.\r\t\t\tsl _ al]\r\t\tifFalse: \r\t\t\t[larger _ self.\r\t\t\tsmaller _ arg.\r\t\t\tng _ self negative].\r\tsum _ Integer new: sl neg: ng.\r\tz _ 0.\r\t\"Loop invariant is -1<=z<=1\"\r\t1 to: sl do: \r\t\t[:i | \r\t\tz _ z + (larger digitAt: i) - (smaller digitAt: i).\r\t\tsum digitAt: i put: z - (z // 256 * 256).\r\t\t\"sign-tolerant form of (z bitAnd: 255)\"\r\t\tz _ z // 256].\r\t^ sum normalize! !\r\r!Integer methodsFor: 'private'!\rgrowby: n\r\r\t^self growto: self digitLength + n! !\r\r!Integer methodsFor: 'private'!\rgrowto: n\r\r\t^self copyto: (self species new: n)! !\r\r\r!Integer methodsFor: 'benchmarks' stamp: 'jm 11/20/1998 07:06'!\rbenchFib  \"Handy send-heavy benchmark\"\r\t\"(result // seconds to run) = approx calls per second\"\r\t\" | r t |\r\t  t _ Time millisecondsToRun: [r _ 26 benchFib].\r\t  (r * 1000) // t\"\r\t\"138000 on a Mac 8100/100\"\r\t^ self < 2\r\t\tifTrue: [1] \r\t\tifFalse: [(self-1) benchFib + (self-2) benchFib + 1]\r! !\r\r!Integer methodsFor: 'benchmarks' stamp: 'di 4/11/1999 11:20'!\rbenchmark  \"Handy bytecode-heavy benchmark\"\r\t\"(500000 // time to run) = approx bytecodes per second\"\r\t\"5000000 // (Time millisecondsToRun: [10 benchmark]) * 1000\"\r\t\"3059000 on a Mac 8100/100\"\r    | size flags prime k count |\r    size _ 8190.\r    1 to: self do:\r        [:iter |\r        count _ 0.\r        flags _ (Array new: size) atAllPut: true.\r        1 to: size do:\r            [:i | (flags at: i) ifTrue:\r                [prime _ i+1.\r                k _ i + prime.\r                [k <= size] whileTrue:\r                    [flags at: k put: false.\r                    k _ k + prime].\r                count _ count + 1]]].\r    ^ count! !\r\r!Integer methodsFor: 'benchmarks' stamp: 'dwh 11/21/1999 16:40'!\rtinyBenchmarks\r\t\"Report the results of running the two tiny Squeak benchmarks.\r\tar 9/10/1999: Adjusted to run at least 1 sec to get more stable results\"\r\t\"0 tinyBenchmarks\"\r\t\"On a 292 MHz G3 Mac: 22727272 bytecodes/sec; 984169 sends/sec\"\r\t\"On a 400 MHz PII/Win98:  18028169 bytecodes/sec; 1081272 sends/sec\"\r\t| t1 t2 r n1 n2 |\r\tn1 _ 1.\r\t[t1 _ Time millisecondsToRun: [n1 benchmark].\r\tt1 < 1000] whileTrue:[n1 _ n1 * 2]. \"Note: #benchmark's runtime is about O(n)\"\r\r\tn2 _ 28.\r\t[t2 _ Time millisecondsToRun: [r _ n2 benchFib].\r\tt2 < 1000] whileTrue:[n2 _ n2 + 1]. \r\t\"Note: #benchFib's runtime is about O(k^n),\r\t\twhere k is the golden number = (1 + 5 sqrt) / 2 = 1.618....\"\r\r\t^ ((n1 * 500000 * 1000) // t1) printString, ' bytecodes/sec; ',\r\t  ((r * 1000) // t2) printString, ' sends/sec'! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rInteger class\r\tinstanceVariableNames: ''!\r\r!Integer class methodsFor: 'instance creation' stamp: 'tk 4/20/1999 14:18'!\rbasicNew\r\r\tself == Integer ifTrue: [\r\t\t^ self error: 'Integer is an abstract class.  Make a concrete subclass.'].\r\t^ super basicNew! !\r\r!Integer class methodsFor: 'instance creation' stamp: 'sw 5/8/2000 11:05'!\rinitializedInstance\r\t^ 2468! !\r\r!Integer class methodsFor: 'instance creation' stamp: 'tk 4/18/1999 22:01'!\rnew\r\r\tself == Integer ifTrue: [\r\t\t^ self error: 'Integer is an abstract class.  Make a concrete subclass.'].\r\t^ super new! !\r\r!Integer class methodsFor: 'instance creation'!\rnew: length neg: neg\r\t\"Answer an instance of a large integer whose size is length. neg is a flag \r\tdetermining whether the integer is negative or not.\"\r\r\tneg \r\t\tifTrue: [^LargeNegativeInteger new: length]\r\t\tifFalse: [^LargePositiveInteger new: length]! !\r\r!Integer class methodsFor: 'instance creation'!\rreadFrom: aStream \r\t\"Answer a new Integer as described on the stream, aStream.\r\tEmbedded radix specifiers not allowed - use Number readFrom: for that.\"\r\t^self readFrom: aStream base: 10! !\r\r!Integer class methodsFor: 'instance creation' stamp: 'ls 6/23/1999 20:37'!\rreadFrom: aStream base: base \r\t\"Answer an instance of one of my concrete subclasses. Initial minus sign \r\taccepted, and bases > 10 use letters A-Z. Embedded radix specifiers not \r\tallowed--use Number readFrom: for that. Answer zero (not an error) if \r\tthere are no digits.\"\r\r\t| digit value neg startPos |\r\tneg _ aStream peekFor: $-.\r\tneg ifFalse: [aStream peekFor: $+].\r\tvalue _ 0.\r\tstartPos _ aStream position.\r\t[aStream atEnd]\r\t\twhileFalse: \r\t\t\t[digit _ aStream next digitValue.\r\t\t\t(digit < 0 or: [digit >= base])\r\t\t\t\tifTrue: \r\t\t\t\t\t[aStream skip: -1.\r\t\t\t\t\taStream position = startPos ifTrue: [self error: 'At least one digit expected here'].\r\t\t\t\t\tneg ifTrue: [^ value negated].\r\t\t\t\t\t^ value]\r\t\t\t\tifFalse: [value _ value * base + digit]].\r\tneg ifTrue: [^ value negated].\r\t^ value! !\r\r\r!Integer class methodsFor: 'prime numbers' stamp: 'ar 10/6/2001 02:38'!\rlargePrimesUpTo: max do: aBlock\r\t\"Evaluate aBlock with all primes up to maxValue.\r\tThe Algorithm is adapted from http://www.rsok.com/~jrm/printprimes.html\r\tIt encodes prime numbers much more compactly than #primesUpTo: \r\t38.5 integer per byte (2310 numbers per 60 byte) allow for some fun large primes.\r\t(all primes up to SmallInteger maxVal can be computed within ~27MB of memory;\r\tthe regular #primesUpTo: would require 4 *GIGA*bytes).\r\tNote: The algorithm could be re-written to produce the first primes (which require\r\tthe longest time to sieve) faster but only at the cost of clarity.\"\r\r\t| limit flags maskBitIndex bitIndex maskBit byteIndex index primesUpTo2310 indexLimit |\r\tlimit _ max asInteger - 1.\r\tindexLimit _ max sqrt truncated + 1.\r\t\"Create the array of flags.\"\r\tflags _ ByteArray new: (limit + 2309) // 2310 * 60 + 60.\r\tflags atAllPut: 16rFF. \"set all to true\"\r\r\t\"Compute the primes up to 2310\"\r\tprimesUpTo2310 _ self primesUpTo: 2310.\r\r\t\"Create a mapping from 2310 integers to 480 bits (60 byte)\"\r\tmaskBitIndex _ Array new: 2310.\r\tbitIndex _ -1. \"for pre-increment\"\r\tmaskBitIndex at: 1 put: (bitIndex _ bitIndex + 1).\r\tmaskBitIndex at: 2 put: (bitIndex _ bitIndex + 1).\r\r\t1 to: 5 do:[:i| aBlock value: (primesUpTo2310 at: i)].\r\r\tindex _ 6.\r\t2 to: 2309 do:[:n|\r\t\t[(primesUpTo2310 at: index) < n] \r\t\t\twhileTrue:[index _ index + 1].\r\t\tn = (primesUpTo2310 at: index) ifTrue:[\r\t\t\tmaskBitIndex at: n+1 put: (bitIndex _ bitIndex + 1).\r\t\t] ifFalse:[\r\t\t\t\"if modulo any of the prime factors of 2310, then could not be prime\"\r\t\t\t(n \\\\ 2 = 0 or:[n \\\\ 3 = 0 or:[n \\\\ 5 = 0 or:[n \\\\ 7 = 0 or:[n \\\\ 11 = 0]]]]) \r\t\t\t\tifTrue:[maskBitIndex at: n+1 put: 0]\r\t\t\t\tifFalse:[maskBitIndex at: n+1 put: (bitIndex _ bitIndex + 1)].\r\t\t].\r\t].\r\r\t\"Now the real work begins...\r\tStart with 13 since multiples of 2,3,5,7,11 are handled by the storage method;\r\tincrement by 2 for odd numbers only.\"\r\t13 to: limit by: 2 do:[:n|\r\t\t(maskBit _ maskBitIndex at: (n \\\\ 2310 + 1)) = 0 ifFalse:[\"not a multiple of 2,3,5,7,11\"\r\t\t\tbyteIndex _ n // 2310 * 60 + (maskBit-1 bitShift: -3) + 1.\r\t\t\tbitIndex _ 1 bitShift: (maskBit bitAnd: 7).\r\t\t\t((flags at: byteIndex) bitAnd: bitIndex) = 0 ifFalse:[\"not marked -- n is prime\"\r\t\t\t\taBlock value: n.\r\t\t\t\t\"Start with n*n since any integer < n has already been sieved \r\t\t\t\t(e.g., any multiple of n with a number k < n has been cleared \r\t\t\t\twhen k was sieved); add 2 * i to avoid even numbers and\r\t\t\t\tmark all multiples of this prime. Note: n < indexLimit below\r\t\t\t\tlimits running into LargeInts -- nothing more.\"\r\t\t\t\tn < indexLimit ifTrue:[\r\t\t\t\t\tindex _ n * n.\r\t\t\t\t\t(index bitAnd: 1) = 0 ifTrue:[index _ index + n].\r\t\t\t\t\t[index <= limit] whileTrue:[\r\t\t\t\t\t\t(maskBit _ maskBitIndex at: (index \\\\ 2310 + 1)) = 0 ifFalse:[\r\t\t\t\t\t\t\tbyteIndex _ (index // 2310 * 60) + (maskBit-1 bitShift: -3) + 1.\r\t\t\t\t\t\t\tmaskBit _ 255 - (1 bitShift: (maskBit bitAnd: 7)).\r\t\t\t\t\t\t\tflags at: byteIndex put: ((flags at: byteIndex) bitAnd: maskBit).\r\t\t\t\t\t\t].\r\t\t\t\t\t\tindex _ index + (2 * n)].\r\t\t\t\t].\r\t\t\t].\r\t\t].\r\t].\r! !\r\r!Integer class methodsFor: 'prime numbers' stamp: 'ar 10/6/2001 19:33'!\rprimesUpTo: max\r\t\"Return a list of prime integers up to the given integer.\"\r\t\"Integer primesUpTo: 100\"\r\t^Array streamContents:[:s| self primesUpTo: max do:[:prime| s nextPut: prime]]! !\r\r!Integer class methodsFor: 'prime numbers' stamp: 'ar 10/6/2001 19:33'!\rprimesUpTo: max do: aBlock\r\t\"Compute aBlock with all prime integers up to the given integer.\"\r\t\"Integer primesUpTo: 100\"\r\r\t| limit flags prime k |\r\tlimit _ max asInteger - 1.\r\t\"Fall back into #largePrimesUpTo:do: if we'd require more than 100k of memory; \r\tthe alternative will only requre 1/154th of the amount we need here and is almost as fast.\"\r\tlimit > 25000 ifTrue:[^self largePrimesUpTo: max do: aBlock].\r\tflags _ (Array new: limit) atAllPut: true.\r\t1 to: limit do: [:i |\r\t\t(flags at: i) ifTrue: [\r\t\t\tprime _ i + 1.\r\t\t\tk _ i + prime.\r\t\t\t[k <= limit] whileTrue: [\r\t\t\t\tflags at: k put: false.\r\t\t\t\tk _ k + prime].\r\t\t\taBlock value: prime]].\r! !\r\r\r!Integer class methodsFor: 'constants' stamp: 'RAH 4/25/2000 19:49'!\rone\r\t#Numeric.\r\t\"add 200/01/19 For <number> protocol support.\"\r\t^ 1! !\rArrayedCollection variableWordSubclass: #IntegerArray\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Arrayed'!\r!IntegerArray commentStamp: '<historical>' prior: 0!\rIntegerArrays store 32bit signed Integer values.\rNegative values are stored as 2's complement.!\r\r\r!IntegerArray methodsFor: 'accessing' stamp: 'ar 3/3/2001 22:40'!\rat: index\r\t| word |\r\t<primitive: 165>\r\tword _ self basicAt: index.\r\tword < 16r3FFFFFFF ifTrue:[^word]. \"Avoid LargeInteger computations\"\r\t^word >= 16r80000000\t\"Negative?!!\"\r\t\tifTrue:[\"word - 16r100000000\"\r\t\t\t\t(word bitInvert32 + 1) negated]\r\t\tifFalse:[word]! !\r\r!IntegerArray methodsFor: 'accessing' stamp: 'ar 3/3/2001 22:40'!\rat: index put: anInteger\r\t| word |\r\t<primitive: 166>\r\tanInteger < 0\r\t\tifTrue:[\"word _ 16r100000000 + anInteger\"\r\t\t\t\tword _ (anInteger + 1) negated bitInvert32]\r\t\tifFalse:[word _ anInteger].\r\tself  basicAt: index put: word.\r\t^anInteger! !\r\r!IntegerArray methodsFor: 'accessing' stamp: 'ar 3/3/2001 23:34'!\ratAllPut: anInteger\r\t| word |\r\tanInteger < 0\r\t\tifTrue:[\"word _ 16r100000000 + anInteger\"\r\t\t\t\tword _ (anInteger + 1) negated bitInvert32]\r\t\tifFalse:[word _ anInteger].\r\tself primFill: word.! !\r\r!IntegerArray methodsFor: 'accessing' stamp: 'ar 11/2/1998 12:19'!\rdefaultElement\r\t\"Return the default element of the receiver\"\r\t^0! !\r\r\r!IntegerArray methodsFor: 'converting' stamp: 'ar 10/10/1998 16:18'!\rasIntegerArray\r\t^self! !\r\r\r!IntegerArray methodsFor: 'private' stamp: 'ar 3/3/2001 23:34'!\rprimFill: aPositiveInteger\r\t\"Fill the receiver, an indexable bytes or words object, with the given positive integer. The range of possible fill values is [0..255] for byte arrays and [0..(2^32 - 1)] for word arrays.\"\r\r\t<primitive: 145>\r\tself errorImproperStore.! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rIntegerArray class\r\tinstanceVariableNames: ''!\r\r!IntegerArray class methodsFor: 'plugin generation' stamp: 'acg 9/17/1999 01:17'!\rccg: cg emitLoadFor: aString from: anInteger on: aStream\r\r\tcg emitLoad: aString asIntPtrFrom: anInteger on: aStream! !\r\r!IntegerArray class methodsFor: 'plugin generation' stamp: 'acg 9/25/1999 15:00'!\rccg: cg prolog: aBlock expr: aString index: anInteger\r\r\t^cg \r\t\tccgLoad: aBlock \r\t\texpr: aString \r\t\tasIntPtrFrom: anInteger\r\t\tandThen: (cg ccgValBlock: 'isWords')! !\r\r!IntegerArray class methodsFor: 'plugin generation' stamp: 'acg 9/17/1999 01:18'!\rccgDeclareCForVar: aSymbolOrString\r\r\t^'int *', aSymbolOrString! !\rSequenceableCollection subclass: #Interval\r\tinstanceVariableNames: 'start stop step'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Sequenceable'!\r!Interval commentStamp: '<historical>' prior: 0!\rI represent a finite arithmetic progression.!\r\r\r!Interval methodsFor: 'accessing'!\rat: anInteger \r\t\"Answer the anInteger'th element.\"\r\r\t(anInteger >= 1 and: [anInteger <= self size])\r\t\tifTrue: [^start + (step * (anInteger - 1))]\r\t\tifFalse: [self errorSubscriptBounds: anInteger]! !\r\r!Interval methodsFor: 'accessing'!\rat: anInteger put: anObject \r\t\"Storing into an Interval is not allowed.\"\r\r\tself error: 'you can not store into an interval'! !\r\r!Interval methodsFor: 'accessing' stamp: 'stp 8/19/2000 23:52'!\rextent \r\t\"Answer the max - min of the receiver interval.\"\r\t\"(10 to: 50) extent\"\r\r\t^stop - start! !\r\r!Interval methodsFor: 'accessing'!\rfirst \r\t\"Refer to the comment in SequenceableCollection|first.\"\r\r\t^start! !\r\r!Interval methodsFor: 'accessing' stamp: 'rpj 11/30/1999 11:04'!\rincludes: aNumber\r\t\"Determine if aNumber is an element of this interval.\"\r\t^ (self rangeIncludes: aNumber) and: [ self valuesInclude: aNumber ]! !\r\r!Interval methodsFor: 'accessing'!\rincrement\r\t\"Answer the receiver's interval increment.\"\r\r\t^step! !\r\r!Interval methodsFor: 'accessing'!\rlast \r\t\"Refer to the comment in SequenceableCollection|last.\"\r\r\t^stop - (stop - start \\\\ step)! !\r\r!Interval methodsFor: 'accessing' stamp: 'di 12/6/1999 11:00'!\rrangeIncludes: aNumber\r\t\"Return true if the number lies in the interval between start and stop.\"\r\r\tstep >= 0\r\t\tifTrue: [^ aNumber between: start and: stop]\r\t\tifFalse: [^ aNumber between: stop and: start]\r! !\r\r!Interval methodsFor: 'accessing' stamp: 'sma 5/12/2000 11:38'!\rsize\r\t\"Answer how many elements the receiver contains.\"\r\r\tstep < 0\r\t\tifTrue: [start < stop\r\t\t\t\tifTrue: [^ 0]\r\t\t\t\tifFalse: [^ stop - start // step + 1]]\r\t\tifFalse: [stop < start\r\t\t\t\tifTrue: [^ 0]\r\t\t\t\tifFalse: [^ stop - start // step + 1]]! !\r\r\r!Interval methodsFor: 'comparing' stamp: 'rhi 8/14/2003 10:08'!\r= anObject\r\r\t^ self == anObject\r\t\tifTrue: [true]\r\t\tifFalse: [anObject isInterval\r\t\t\tifTrue: [start = anObject first\r\t\t\t\tand: [step = anObject increment\r\t\t\t\t\tand: [self last = anObject last]]]\r\t\t\tifFalse: [super = anObject]]! !\r\r!Interval methodsFor: 'comparing'!\rhash\r\t\"Hash is reimplemented because = is implemented.\"\r\r\t^(((start hash bitShift: 2)\r\t\tbitOr: stop hash)\r\t\tbitShift: 1)\r\t\tbitOr: self size! !\r\r!Interval methodsFor: 'comparing'!\rhashMappedBy: map\r\t\"My hash is independent of my oop.\"\r\r\t^self hash! !\r\r\r!Interval methodsFor: 'adding'!\radd: newObject \r\t\"Adding to an Interval is not allowed.\"\r\r\tself shouldNotImplement! !\r\r\r!Interval methodsFor: 'removing'!\rremove: newObject \r\t\"Removing from an Interval is not allowed.\"\r\r\tself error: 'elements cannot be removed from an Interval'! !\r\r\r!Interval methodsFor: 'copying'!\rcopy\r\t\"Return a copy of me. Override the superclass because my species is\r\tArray and copy, as inherited from SequenceableCollection, uses\r\tcopyFrom:to:, which creates a new object of my species.\"\r\r\t^self shallowCopy! !\r\r!Interval methodsFor: 'copying' stamp: 'sma 3/3/2000 13:18'!\rshallowCopy\r\t\"Without this method, #copy would return an array instead of a new interval.\r\tThe whole problem is burried in the class hierarchy and every fix will worsen\r\tthe problem, so once the whole issue is resolved one should come back to this \r\tmethod fix it.\"\r\r\t^ self class from: start to: stop by: step! !\r\r\r!Interval methodsFor: 'enumerating'!\rcollect: aBlock\r\t| nextValue result |\r\tresult _ self species new: self size.\r\tnextValue _ start.\r\t1 to: result size do:\r\t\t[:i |\r\t\tresult at: i put: (aBlock value: nextValue).\r\t\tnextValue _ nextValue + step].\r\t^ result! !\r\r!Interval methodsFor: 'enumerating'!\rdo: aBlock\r\r\t| aValue |\r\taValue _ start.\r\tstep < 0\r\t\tifTrue: [[stop <= aValue]\r\t\t\t\twhileTrue: \r\t\t\t\t\t[aBlock value: aValue.\r\t\t\t\t\taValue _ aValue + step]]\r\t\tifFalse: [[stop >= aValue]\r\t\t\t\twhileTrue: \r\t\t\t\t\t[aBlock value: aValue.\r\t\t\t\t\taValue _ aValue + step]]! !\r\r!Interval methodsFor: 'enumerating' stamp: 'dtl 5/31/2003 16:45'!\rpermutationsDo: aBlock\r\t\"Repeatly value aBlock with a single copy of the receiver. Reorder the copy\r\tso that aBlock is presented all (self size factorial) possible permutations.\"\r\t\"(1 to: 4) permutationsDo: [:each | Transcript cr; show: each printString]\"\r\r\tself asArray permutationsDo: aBlock\r! !\r\r!Interval methodsFor: 'enumerating'!\rreverseDo: aBlock \r\t\"Evaluate aBlock for each element of my interval, in reverse order.\"\r\r\t| aValue |\r\taValue _ stop.\r\tstep < 0\r\t\tifTrue: [[start >= aValue]\r\t\t\t\twhileTrue: \r\t\t\t\t\t[aBlock value: aValue.\r\t\t\t\t\taValue _ aValue - step]]\r\t\tifFalse: [[start <= aValue]\r\t\t\t\twhileTrue: \r\t\t\t\t\t[aBlock value: aValue.\r\t\t\t\t\taValue _ aValue - step]]! !\r\r\r!Interval methodsFor: 'printing' stamp: 'sma 6/1/2000 09:50'!\rprintOn: aStream\r\taStream nextPut: $(;\r\t print: start;\r\t nextPutAll: ' to: ';\r\t print: stop.\r\tstep ~= 1 ifTrue: [aStream nextPutAll: ' by: '; print: step].\r\taStream nextPut: $)! !\r\r!Interval methodsFor: 'printing'!\rstoreOn: aStream \r\t\"This is possible because we know numbers store and print the same.\"\r\r\tself printOn: aStream! !\r\r\r!Interval methodsFor: 'private'!\rsetFrom: startInteger to: stopInteger by: stepInteger\r\r\tstart _ startInteger.\r\tstop _ stopInteger.\r\tstep _ stepInteger! !\r\r!Interval methodsFor: 'private'!\rspecies\r\r\t^Array! !\r\r!Interval methodsFor: 'private' stamp: 'di 4/24/2000 13:56'!\rvaluesInclude: aNumber\r\t\"Private - answer whether or not aNumber is one of the enumerated values in this interval.\"\r\r\t| val |\r\tval _ (aNumber - self first) asFloat / self increment.\r\t^ val fractionPart abs < (step * 1.0e-10)! !\r\r\r!Interval methodsFor: 'testing' stamp: 'rhi 8/12/2003 09:52'!\risInterval\r\r\t^ true! !\r\r\r!Interval methodsFor: 'arithmetic' stamp: 'ajh 3/13/2003 15:45'!\r+ number\r\r\t^ start + number to: stop + number by: step! !\r\r!Interval methodsFor: 'arithmetic' stamp: 'ajh 3/13/2003 15:46'!\r- number\r\r\t^ start - number to: stop - number by: step! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rInterval class\r\tinstanceVariableNames: ''!\r\r!Interval class methodsFor: 'instance creation'!\rfrom: startInteger to: stopInteger \r\t\"Answer an instance of me, starting at startNumber, ending at \r\tstopNumber, and with an interval increment of 1.\"\r\r\t^self new\r\t\tsetFrom: startInteger\r\t\tto: stopInteger\r\t\tby: 1! !\r\r!Interval class methodsFor: 'instance creation'!\rfrom: startInteger to: stopInteger by: stepInteger \r\t\"Answer an instance of me, starting at startNumber, ending at \r\tstopNumber, and with an interval increment of stepNumber.\"\r\r\t^self new\r\t\tsetFrom: startInteger\r\t\tto: stopInteger\r\t\tby: stepInteger! !\r\r!Interval class methodsFor: 'instance creation'!\rnew\r\t\"Primitive. Create and answer with a new instance of the receiver\r\t(a class) with no indexable fields. Fail if the class is indexable. Override\r\tSequenceableCollection new. Essential. See Object documentation\r\twhatIsAPrimitive.\"\r\r\t<primitive: 70>\r\tself isVariable ifTrue: [ ^ self new: 0 ].\r\t\"space must be low\"\r\tSmalltalk signalLowSpace.\r\t^ self new  \"retry if user proceeds\"\r! !\r\r!Interval class methodsFor: 'instance creation' stamp: 'md 1/14/2004 11:42'!\rnewFrom: aCollection \r\t\"Answer an instance of me containing the same elements as aCollection.\"\r\r    | newInterval n |\r\r    (n := aCollection size) <= 1 ifTrue: [\r\t\tn = 0 ifTrue: [^self from: 1 to: 0].\r\t\t^self from: aCollection first to: aCollection last].\r    \tnewInterval := self from: aCollection first to: aCollection last\r\tby: (aCollection last - aCollection first) // (n - 1).\r\taCollection ~= newInterval\r\t\tifTrue: [self error: 'The argument is not an arithmetic progression'].\r\t^newInterval\r\r\"\tInterval newFrom: {1. 2. 3}\r\t{33. 5. -23} as: Interval\r\t{33. 5. -22} as: Interval    (an error)\r\t(-4 to: -12 by: -1) as: Interval\r\"! !\rError subclass: #InvalidDirectoryError\r\tinstanceVariableNames: 'pathName'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Exceptions Kernel'!\r\r!InvalidDirectoryError methodsFor: 'accessing' stamp: 'ar 5/30/2001 20:44'!\rpathName\r\t^pathName! !\r\r!InvalidDirectoryError methodsFor: 'accessing' stamp: 'ar 5/30/2001 20:45'!\rpathName: badPathName\r\tpathName _ badPathName! !\r\r\r!InvalidDirectoryError methodsFor: 'exceptionDescription' stamp: 'ar 5/30/2001 20:49'!\rdefaultAction\r\t\"Return an empty list as the default action of signaling the occurance of an invalid directory.\"\r\t^#()! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rInvalidDirectoryError class\r\tinstanceVariableNames: ''!\r\r!InvalidDirectoryError class methodsFor: 'exceptionInstantiator' stamp: 'ar 5/30/2001 20:49'!\rpathName: badPathName\r\t^self new pathName: badPathName! !\rLargePositiveInteger variableByteSubclass: #LargeNegativeInteger\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Numbers'!\r!LargeNegativeInteger commentStamp: '<historical>' prior: 0!\rJust like LargePositiveInteger, but represents a negative number.!\r\r\r!LargeNegativeInteger methodsFor: 'arithmetic'!\rabs\r\t^ self negated! !\r\r!LargeNegativeInteger methodsFor: 'arithmetic'!\rnegated\r\t^ self copyto: (LargePositiveInteger new: self digitLength)! !\r\r\r!LargeNegativeInteger methodsFor: 'bit manipulation' stamp: 'sr 6/8/2000 02:10'!\rhighBit\r\t\"Answer the index of the high order bit of the receiver, or zero if the  \r\treceiver is zero. Raise an error if the receiver is negative, since  \r\tnegative integers are defined to have an infinite number of leading 1's \r\tin 2's-complement arithmetic. Use >>highBitOfMagnitude if you want to  \r\tget the highest bit of the magnitude.\"\r\r\t^ self shouldNotImplement! !\r\r\r!LargeNegativeInteger methodsFor: 'converting' stamp: 'ar 5/17/2000 16:10'!\rnormalize\r\t\"Check for leading zeroes and return shortened copy if so\"\r\t| sLen val len oldLen minVal |\r\t<primitive: 'primNormalizeNegative' module:'LargeIntegers'>\r\t\"First establish len = significant length\"\r\tlen _ oldLen _ self digitLength.\r\t[len = 0 ifTrue: [^0].\r\t(self digitAt: len) = 0]\r\t\twhileTrue: [len _ len - 1].\r\r\t\"Now check if in SmallInteger range\"\r\tsLen _ 4  \"SmallInteger minVal digitLength\".\r\tlen <= sLen ifTrue:\r\t\t[minVal _ SmallInteger minVal.\r\t\t(len < sLen\r\t\t\tor: [(self digitAt: sLen) < minVal lastDigit])\r\t\t\tifTrue: [\"If high digit less, then can be small\"\r\t\t\t\t\tval _ 0.\r\t\t\t\t\tlen to: 1 by: -1 do:\r\t\t\t\t\t\t[:i | val _ (val *256) - (self digitAt: i)].\r\t\t\t\t\t^ val].\r\t\t1 to: sLen do:  \"If all digits same, then = minVal\"\r\t\t\t[:i | (self digitAt: i) = (minVal digitAt: i)\r\t\t\t\t\tifFalse: [\"Not so; return self shortened\"\r\t\t\t\t\t\t\tlen < oldLen\r\t\t\t\t\t\t\t\tifTrue: [^ self growto: len]\r\t\t\t\t\t\t\t\tifFalse: [^ self]]].\r\t\t^ minVal].\r\r\t\"Return self, or a shortened copy\"\r\tlen < oldLen\r\t\tifTrue: [^ self growto: len]\r\t\tifFalse: [^ self]! !\r\r\r!LargeNegativeInteger methodsFor: 'testing' stamp: 'di 4/23/1998 11:18'!\rnegative\r\t\"Answer whether the receiver is mathematically negative.\"\r\r\t^ true! !\r\r!LargeNegativeInteger methodsFor: 'testing' stamp: 'di 4/23/1998 11:00'!\rpositive\r\t\"Answer whether the receiver is positive or equal to 0. (ST-80 protocol).\r\tSee also strictlyPositive\"\r\r\t^ false! !\r\r!LargeNegativeInteger methodsFor: 'testing' stamp: 'jm 3/27/98 06:19'!\rsign\r\t\"Optimization. Answer -1 since receiver is less than 0.\"\r\r\t^ -1\r! !\r\r!LargeNegativeInteger methodsFor: 'testing' stamp: 'di 4/23/1998 11:03'!\rstrictlyPositive\r\t\"Answer whether the receiver is mathematically positive.\"\r\r\t^ false! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rLargeNegativeInteger class\r\tinstanceVariableNames: ''!\r\r!LargeNegativeInteger class methodsFor: 'as yet unclassified' stamp: 'sw 5/8/2000 12:05'!\rinitializedInstance\r\t^ -9876543210987654321 copy! !\rInteger variableByteSubclass: #LargePositiveInteger\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Numbers'!\r!LargePositiveInteger commentStamp: '<historical>' prior: 0!\rI represent positive integers of more than 30 bits (ie, >= 1073741824).  These values are beyond the range of SmallInteger, and are encoded here as an array of 8-bit digits.  Care must be taken, when new values are computed, that any result that COULD BE a SmallInteger IS a SmallInteger (see normalize).\r\rNote that the bit manipulation primitives, bitAnd:, bitShift:, etc., = and ~= run without failure (and therefore fast) if the value fits in 32 bits.  This is a great help to the simulator.!\r\r\r!LargePositiveInteger methodsFor: 'arithmetic'!\r* anInteger \r\t\"Primitive. Multiply the receiver by the argument and answer with an\r\tInteger result. Fail if either the argument or the result is not a\r\tSmallInteger or a LargePositiveInteger less than 2-to-the-30th (1073741824). Optional. See\r\tObject documentation whatIsAPrimitive. \"\r\r\t<primitive: 29>\r\t^super * anInteger! !\r\r!LargePositiveInteger methodsFor: 'arithmetic'!\r+ anInteger \r\t\"Primitive. Add the receiver to the argument and answer with an\r\tInteger result. Fail if either the argument or the result is not a\r\tSmallInteger or a LargePositiveInteger less than 2-to-the-30th (1073741824). Optional. See\r\tObject documentation whatIsAPrimitive.\"\r\r\t<primitive: 21>\r\t^super + anInteger! !\r\r!LargePositiveInteger methodsFor: 'arithmetic'!\r- anInteger \r\t\"Primitive. Subtract the argument from the receiver and answer with an\r\tInteger result. Fail if either the argument or the result is not a\r\tSmallInteger or a LargePositiveInteger less than 2-to-the-30th (1073741824). Optional. See\r\tObject documentation whatIsAPrimitive.\"\r\r\t<primitive: 22>\r\t^super - anInteger! !\r\r!LargePositiveInteger methodsFor: 'arithmetic'!\r/ anInteger \r\t\"Primitive. Divide the receiver by the argument and answer with the\r\tresult if the division is exact. Fail if the result is not a whole integer.\r\tFail if the argument is 0. Fail if either the argument or the result is not\r\ta SmallInteger or a LargePositiveInteger less than 2-to-the-30th (1073741824). Optional. See\r\tObject documentation whatIsAPrimitive. \"\r\r\t<primitive: 30>\r\t^super / anInteger! !\r\r!LargePositiveInteger methodsFor: 'arithmetic'!\r// anInteger \r\t\"Primitive. Divide the receiver by the argument and return the result.\r\tRound the result down towards negative infinity to make it a whole\r\tinteger. Fail if the argument is 0. Fail if either the argument or the\r\tresult is not a SmallInteger or a LargePositiveInteger less than 2-to-the-30th (1073741824).\r\tOptional. See Object documentation whatIsAPrimitive. \"\r\r\t<primitive: 32>\r\t^super // anInteger! !\r\r!LargePositiveInteger methodsFor: 'arithmetic'!\r\\\\ anInteger \r\t\"Primitive. Take the receiver modulo the argument. The result is the\r\tremainder rounded towards negative infinity, of the receiver divided\r\tby the argument. Fail if the argument is 0. Fail if either the argument\r\tor the result is not a SmallInteger or a LargePositiveInteger less than\r\t2-to-the-30th (1073741824). Optional. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 31>\r\t^super \\\\ anInteger! !\r\r!LargePositiveInteger methodsFor: 'arithmetic'!\rabs! !\r\r!LargePositiveInteger methodsFor: 'arithmetic'!\rnegated \r\t^ (self copyto: (LargeNegativeInteger new: self digitLength))\r\t\tnormalize  \"Need to normalize to catch SmallInteger minVal\"! !\r\r!LargePositiveInteger methodsFor: 'arithmetic'!\rquo: anInteger \r\t\"Primitive. Divide the receiver by the argument and return the result.\r\tRound the result down towards zero to make it a whole integer. Fail if\r\tthe argument is 0. Fail if either the argument or the result is not a\r\tSmallInteger or a LargePositiveInteger less than 2-to-the-30th (1073741824). Optional. See\r\tObject documentation whatIsAPrimitive.\"\r\r\t<primitive: 33>\r\t^super quo: anInteger! !\r\r\r!LargePositiveInteger methodsFor: 'bit manipulation'!\rbitAnd: anInteger \r\t\"Primitive. Answer an Integer whose bits are the logical AND of the\r\treceiver's bits and those of the argument. Fail if the receiver or argument\r\tis greater than 32 bits. See Object documentation whatIsAPrimitive.\"\r\t<primitive: 14>\r\t^ super bitAnd: anInteger! !\r\r!LargePositiveInteger methodsFor: 'bit manipulation'!\rbitOr: anInteger \r\t\"Primitive. Answer an Integer whose bits are the logical OR of the\r\treceiver's bits and those of the argument. Fail if the receiver or argument\r\tis greater than 32 bits. See Object documentation whatIsAPrimitive.\"\r\t<primitive: 15>\r\t^ super bitOr: anInteger! !\r\r!LargePositiveInteger methodsFor: 'bit manipulation'!\rbitShift: anInteger \r\t\"Primitive. Answer an Integer whose value (in twos-complement \r\trepresentation) is the receiver's value (in twos-complement\r\trepresentation) shifted left by the number of bits indicated by the\r\targument. Negative arguments shift right. Zeros are shifted in from the\r\tright in left shifts. The sign bit is extended in right shifts.\r\tFail if the receiver or result is greater than 32 bits.\r\tSee Object documentation whatIsAPrimitive.\"\r\t<primitive: 17>\r\t^super bitShift: anInteger! !\r\r!LargePositiveInteger methodsFor: 'bit manipulation'!\rbitXor: anInteger \r\t\"Primitive. Answer an Integer whose bits are the logical XOR of the\r\treceiver's bits and those of the argument. Fail if the receiver or argument\r\tis greater than 32 bits. See Object documentation whatIsAPrimitive.\"\r\t<primitive: 16>\r\t^ super bitXor: anInteger! !\r\r!LargePositiveInteger methodsFor: 'bit manipulation' stamp: 'SqR 9/18/2000 15:17'!\rhashMultiply\r\t\"Truncate to 28 bits and try again\"\r\r\t^(self bitAnd: 16rFFFFFFF) hashMultiply! !\r\r!LargePositiveInteger methodsFor: 'bit manipulation' stamp: 'sr 6/8/2000 02:11'!\rhighBit\r\t\"Answer the index of the high order bit of the receiver, or zero if the  \r\treceiver is zero. Raise an error if the receiver is negative, since  \r\tnegative integers are defined to have an infinite number of leading 1's \r\tin 2's-complement arithmetic. Use >>highBitOfMagnitude if you want to  \r\tget the highest bit of the magnitude.\"\r\t^ self highBitOfMagnitude! !\r\r!LargePositiveInteger methodsFor: 'bit manipulation' stamp: 'sr 6/8/2000 02:15'!\rhighBitOfMagnitude\r\t\"Answer the index of the high order bit of the magnitude of the  \r\treceiver, or zero if the receiver is zero.  \r\tThis method is used for LargeNegativeIntegers as well,  \r\tsince Squeak's LargeIntegers are sign/magnitude.\"\r\t| realLength lastDigit |\r\trealLength _ self digitLength.\r\t[(lastDigit _ self digitAt: realLength) = 0]\r\t\twhileTrue: [(realLength _ realLength - 1) = 0 ifTrue: [^ 0]].\r\t^ lastDigit highBitOfPositiveReceiver + (8 * (realLength - 1))! !\r\r\r!LargePositiveInteger methodsFor: 'testing' stamp: 'di 4/23/1998 11:18'!\rnegative\r\t\"Answer whether the receiver is mathematically negative.\"\r\r\t^ false! !\r\r!LargePositiveInteger methodsFor: 'testing' stamp: 'di 4/23/1998 11:00'!\rpositive\r\t\"Answer whether the receiver is positive or equal to 0. (ST-80 protocol).\r\tSee also strictlyPositive\"\r\r\t^ true! !\r\r!LargePositiveInteger methodsFor: 'testing' stamp: 'jm 3/27/98 06:19'!\rsign\r\t\"Optimization. Answer 1 since receiver is greater than 0.\"\r\r\t^ 1\r! !\r\r!LargePositiveInteger methodsFor: 'testing' stamp: 'di 4/23/1998 11:02'!\rstrictlyPositive\r\t\"Answer whether the receiver is mathematically positive.\"\r\r\t^ true! !\r\r\r!LargePositiveInteger methodsFor: 'comparing'!\r< anInteger \r\t\"Primitive. Compare the receiver with the argument and answer true if\r\tthe receiver is less than the argument. Otherwise answer false. Fail if the\r\targument is not a SmallInteger or a LargePositiveInteger less than 2-to-the-30th (1073741824).\r\tOptional. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 23>\r\t^super < anInteger! !\r\r!LargePositiveInteger methodsFor: 'comparing'!\r<= anInteger \r\t\"Primitive. Compare the receiver with the argument and answer true if\r\tthe receiver is less than or equal to the argument. Otherwise answer false.\r\tFail if the argument is not a SmallInteger or a LargePositiveInteger less\r\tthan 2-to-the-30th (1073741824). Optional. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 25>\r\t^super <= anInteger! !\r\r!LargePositiveInteger methodsFor: 'comparing'!\r= anInteger \r\t\"Primitive. Compare the receiver with the argument and answer true if\r\tthe receiver is equal to the argument. Otherwise answer false. Fail if the\r\treceiver or argument is negative or greater than 32 bits.\r\tOptional. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 7>\r\t^ super = anInteger! !\r\r!LargePositiveInteger methodsFor: 'comparing'!\r> anInteger \r\t\"Primitive. Compare the receiver with the argument and answer true if\r\tthe receiver is greater than the argument. Otherwise answer false. Fail if\r\tthe argument is not a SmallInteger or a LargePositiveInteger less than\r\t2-to-the-30th (1073741824). Optional. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 24>\r\t^super > anInteger! !\r\r!LargePositiveInteger methodsFor: 'comparing'!\r>= anInteger \r\t\"Primitive. Compare the receiver with the argument and answer true if\r\tthe receiver is greater than or equal to the argument. Otherwise answer\r\tfalse. Fail if the argument is not a SmallInteger or a LargePositiveInteger\r\tless than 2-to-the-30th (1073741824). Optional. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 26>\r\t^super >= anInteger! !\r\r!LargePositiveInteger methodsFor: 'comparing' stamp: 'SqR 8/13/2002 10:52'!\rhash\r\r\t^ByteArray\r\t\thashBytes: self\r\t\tstartingWith: self species hash! !\r\r!LargePositiveInteger methodsFor: 'comparing'!\r~= anInteger \r\t\"Primitive. Compare the receiver with the argument and answer true if\r\tthe receiver is equal to the argument. Otherwise answer false. Fail if the\r\treceiver or argument is negative or greater than 32 bits.\r\tOptional. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 8>\r\t^ super ~= anInteger! !\r\r\r!LargePositiveInteger methodsFor: 'converting' stamp: 'ar 5/17/2000 16:09'!\rnormalize\r\t\"Check for leading zeroes and return shortened copy if so\"\r\t| sLen val len oldLen |\r\t<primitive: 'primNormalizePositive' module:'LargeIntegers'>\r\t\"First establish len = significant length\"\r\tlen _ oldLen _ self digitLength.\r\t[len = 0 ifTrue: [^0].\r\t(self digitAt: len) = 0]\r\t\twhileTrue: [len _ len - 1].\r\r\t\"Now check if in SmallInteger range\"\r\tsLen _ SmallInteger maxVal digitLength.\r\t(len <= sLen\r\t\tand: [(self digitAt: sLen) <= (SmallInteger maxVal digitAt: sLen)])\r\t\tifTrue: [\"If so, return its SmallInt value\"\r\t\t\t\tval _ 0.\r\t\t\t\tlen to: 1 by: -1 do:\r\t\t\t\t\t[:i | val _ (val *256) + (self digitAt: i)].\r\t\t\t\t^ val].\r\r\t\"Return self, or a shortened copy\"\r\tlen < oldLen\r\t\tifTrue: [^ self growto: len]\r\t\tifFalse: [^ self]! !\r\r\r!LargePositiveInteger methodsFor: 'system primitives' stamp: 'tk 3/24/1999 20:28'!\rdigitAt: index \r\t\"Primitive. Answer the value of an indexable field in the receiver.   LargePositiveInteger uses bytes of base two number, and each is a 'digit' base 256.  Fail if the argument (the index) is not an Integer or is out of bounds. Essential.  See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 60>\r\tself digitLength < index\r\t\tifTrue: [^0]\r\t\tifFalse: [^super at: index]! !\r\r!LargePositiveInteger methodsFor: 'system primitives'!\rdigitAt: index put: value \r\t\"Primitive. Store the second argument (value) in the indexable field of \r\tthe receiver indicated by index. Fail if the value is negative or is larger \r\tthan 255. Fail if the index is not an Integer or is out of bounds. Answer \r\tthe value that was stored. Essential. See Object documentation \r\twhatIsAPrimitive.\"\r\r\t<primitive: 61>\r\t^super at: index put: value! !\r\r!LargePositiveInteger methodsFor: 'system primitives'!\rdigitLength\r\t\"Primitive. Answer the number of indexable fields in the receiver. This \r\tvalue is the same as the largest legal subscript. Essential. See Object \r\tdocumentation whatIsAPrimitive.\"\r\r\t<primitive: 62>\r\tself primitiveFailed! !\r\r!LargePositiveInteger methodsFor: 'system primitives'!\rreplaceFrom: start to: stop with: replacement startingAt: repStart \r\t\"Primitive. This destructively replaces elements from start to stop in the receiver starting at index, repStart, in the collection, replacement. Answer the receiver. Range checks are performed in the primitive only. Optional. See Object documentation whatIsAPrimitive.\"\r\t<primitive: 105>\r\t^ super replaceFrom: start to: stop with: replacement startingAt: repStart! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rLargePositiveInteger class\r\tinstanceVariableNames: ''!\r\r!LargePositiveInteger class methodsFor: 'testing' stamp: 'sw 5/8/2000 12:05'!\rinitializedInstance\r\t^ 12345678901234567 copy! !\rParseNode subclass: #LeafNode\r\tinstanceVariableNames: 'key code'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Compiler'!\r!LeafNode commentStamp: '<historical>' prior: 0!\rI represent a leaf node of the compiler parse tree. I am abstract.\r\t\rTypes (defined in class ParseNode):\r\t1 LdInstType (which uses class VariableNode)\r\t2 LdTempType (which uses class VariableNode)\r\t3 LdLitType (which uses class LiteralNode)\r\t4 LdLitIndType (which uses class VariableNode)\r\t5 SendType (which uses class SelectorNode).\r\rNote that Squeak departs slightly from the Blue Book bytecode spec.\r\rIn order to allow access to more than 63 literals and instance variables,\rbytecode 132 has been redefined as DoubleExtendedDoAnything:\r\t\tbyte2\t\t\t\tbyte3\t\t\tOperation\r(hi 3 bits)  (lo 5 bits)\r\t0\t\tnargs\t\t\tlit index\t\t\tSend Literal Message 0-255\r\t1\t\tnargs\t\t\tlit index\t\t\tSuper-Send Lit Msg 0-255\r\t2\t\tignored\t\t\trcvr index\t\tPush Receiver Variable 0-255\r\t3\t\tignored\t\t\tlit index\t\t\tPush Literal Constant 0-255\r\t4\t\tignored\t\t\tlit index\t\t\tPush Literal Variable 0-255\r\t5\t\tignored\t\t\trcvr index\t\tStore Receiver Variable 0-255\r\t6\t\tignored\t\t\trcvr index\t\tStore-pop Receiver Variable 0-255\r\t7\t\tignored\t\t\tlit index\t\t\tStore Literal Variable 0-255\r\r\tThis has allowed bytecode 134 also to be redefined as a second extended send\r\tthat can access literals up to 64 for nargs up to 3 without needing three bytes.\r\tIt is just like 131, except that the extension byte is aallllll instead of aaalllll,\r\twhere aaa are bits of argument count, and lll are bits of literal index.!\r\r\r!LeafNode methodsFor: 'initialize-release'!\rkey: object code: byte\r\r\tkey _ object.\r\tcode _ byte! !\r\r!LeafNode methodsFor: 'initialize-release'!\rkey: object index: i type: type\r\r\tself key: object code: (self code: i type: type)! !\r\r!LeafNode methodsFor: 'initialize-release'!\rname: ignored key: object code: byte\r\r\tkey _ object.\r\tcode _ byte! !\r\r!LeafNode methodsFor: 'initialize-release'!\rname: literal key: object index: i type: type\r\r\tself key: object\r\t\tindex: i\r\t\ttype: type! !\r\r\r!LeafNode methodsFor: 'accessing'!\rkey\r\r\t^key! !\r\r\r!LeafNode methodsFor: 'code generation'!\rcode\r\r\t^code! !\r\r!LeafNode methodsFor: 'code generation'!\remitForEffect: stack on: strm\r\r\t^self! !\r\r!LeafNode methodsFor: 'code generation'!\remitLong: mode on: aStream \r\t\"Emit extended variable access.\"\r\t| type index |\r\tcode < 256\r\t\tifTrue:\r\t\t\t[code < 16\r\t\t\tifTrue: [type _ 0.\r\t\t\t\t\tindex _ code]\r\t\t\tifFalse: [code < 32\r\t\t\t\t\tifTrue: [type _ 1.\r\t\t\t\t\t\t\tindex _ code - 16]\r\t\t\t\t\tifFalse: [code < 96\r\t\t\t\t\t\t\tifTrue: [type _ code // 32 + 1.\r\t\t\t\t\t\t\t\t\tindex _ code \\\\ 32]\r\t\t\t\t\t\t\tifFalse: [self error: \r\t\t\t\t\t\t\t\t\t'Sends should be handled in SelectorNode']]]]\r\t\tifFalse: \r\t\t\t[index _ code \\\\ 256.\r\t\t\ttype _ code // 256 - 1].\r\tindex <= 63 ifTrue:\r\t\t[aStream nextPut: mode.\r\t\t^ aStream nextPut: type * 64 + index].\r\t\"Compile for Double-exetended Do-anything instruction...\"\r\tmode = LoadLong ifTrue:\r\t\t[aStream nextPut: DblExtDoAll.\r\t\taStream nextPut: (#(64 0 96 128) at: type+1).  \"Cant be temp (type=1)\"\r\t\t^ aStream nextPut: index].\r\tmode = Store ifTrue:\r\t\t[aStream nextPut: DblExtDoAll.\r\t\taStream nextPut: (#(160 0 0 224) at: type+1).  \"Cant be temp or const (type=1 or 2)\"\r\t\t^ aStream nextPut: index].\r\tmode = StorePop ifTrue:\r\t\t[aStream nextPut: DblExtDoAll.\r\t\taStream nextPut: (#(192 0 0 0) at: type+1).  \"Can only be inst\"\r\t\t^ aStream nextPut: index].\r! !\r\r!LeafNode methodsFor: 'code generation'!\rreserve: encoder \r\t\"If this is a yet unused literal of type -code, reserve it.\"\r\r\tcode < 0 ifTrue: [code _ self code: (encoder litIndex: key) type: 0 - code]! !\r\r!LeafNode methodsFor: 'code generation'!\rsizeForEffect: encoder\r\r\t^0! !\r\r!LeafNode methodsFor: 'code generation'!\rsizeForValue: encoder\r\tself reserve: encoder.\r\tcode < 256 ifTrue: [^ 1].\r\t(code \\\\ 256) <= 63 ifTrue: [^ 2].\r\t^ 3! !\r\r\r!LeafNode methodsFor: 'private'!\rcode: index type: type\r\r\tindex isNil \r\t\tifTrue: [^type negated].\r\t(CodeLimits at: type) > index \r\t\tifTrue: [^(CodeBases at: type) + index].\r\t^type * 256 + index! !\r\r\r!LeafNode methodsFor: 'copying' stamp: 'tk 10/20/2000 11:45'!\rveryDeepFixupWith: deepCopier\r\t\"If fields were weakly copied, fix them here.  If they were in the tree being copied, fix them up, otherwise point to the originals!!!!\"\r\rsuper veryDeepFixupWith: deepCopier.\rkey _ deepCopier references at: key ifAbsent: [key].\r! !\r\r!LeafNode methodsFor: 'copying' stamp: 'tk 10/20/2000 11:41'!\rveryDeepInner: deepCopier\r\t\"Copy all of my instance variables.  Some need to be not copied at all, but shared.  \tWarning!!!!  Every instance variable defined in this class must be handled.  We must also implement veryDeepFixupWith:.  See DeepCopier class comment.\"\r\rsuper veryDeepInner: deepCopier.\r\"key _ key.\t\tWeakly copied\"\rcode _ code veryDeepCopyWith: deepCopier.\r! !\rWriteStream subclass: #LimitedWriteStream\r\tinstanceVariableNames: 'limit limitBlock'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Streams'!\r!LimitedWriteStream commentStamp: '<historical>' prior: 0!\rA LimitedWriteStream is a specialized WriteStream that has a maximum size of the collection it streams over. When this limit is reached a special limitBlock is executed. This can for example be used to \"bail out\" of lengthy streaming operations before they have finished.  For a simple example take a look at the universal Object printString.\r\rThe message SequenceableCollection class streamContents:limitedTo: creates a LimitedWriteStream. In this case it prevents very large (or possibly recursive) object structures to \"overdo\" their textual representation. !\r]style[(323 18 15 54 151)f1,f1LObject printString;,f1,f1LSequenceableCollection class streamContents:limitedTo:;,f1!\r\r\r!LimitedWriteStream methodsFor: 'as yet unclassified' stamp: 'BG 3/13/2004 13:18'!\rnextPutAll: aCollection\r\r\t| newEnd |\r\tcollection class == aCollection class ifFalse:\r\t\t[^ super nextPutAll: aCollection ].\r\r\tnewEnd _ position + aCollection size.\r\tnewEnd > limit ifTrue: [\r\t\tsuper nextPutAll: (aCollection copyFrom: 1 to: (limit - position max: 0)).\r\t\t^ limitBlock value.\r\t].\r\tnewEnd > writeLimit ifTrue: [\r\t\tself growTo: newEnd + 10\r\t].\r\r\tcollection replaceFrom: position+1 to: newEnd  with: aCollection startingAt: 1.\r\tposition _ newEnd.! !\r\r!LimitedWriteStream methodsFor: 'as yet unclassified' stamp: 'di 10/28/2001 12:49'!\rpastEndPut: anObject\r\tcollection size >= limit ifTrue: [limitBlock value].  \"Exceptional return\"\r\t^ super pastEndPut: anObject! !\r\r!LimitedWriteStream methodsFor: 'as yet unclassified' stamp: 'di 6/20/97 09:07'!\rsetLimit: sizeLimit limitBlock: aBlock\r\t\"Limit the numer of elements this stream will write...\"\r\tlimit _ sizeLimit.\r\t\"Execute this (typically ^ contents) when that limit is exceded\"\r\tlimitBlock _ aBlock! !\r\r\r!LimitedWriteStream methodsFor: 'accessing' stamp: 'BG 3/13/2004 16:03'!\rnextPut: anObject \r\t\"Ensure that the limit is not exceeded\"\r\r position >= limit ifTrue: [limitBlock value]\r    ifFalse: [super nextPut: anObject].\r! !\rObject subclass: #LimitingLineStreamWrapper\r\tinstanceVariableNames: 'stream line limitingBlock position'\r\tclassVariableNames: ''\r\tpoolDictionaries: 'TextConstants'\r\tcategory: 'Collections-Streams'!\r!LimitingLineStreamWrapper commentStamp: '<historical>' prior: 0!\rI'm a wrapper for a stream optimized for line-by-line access using #nextLine. My instances can be nested.\r\rI read one line ahead. Reading terminates when the stream ends, or if the limitingBlock evaluated with the line answers true. To skip the delimiting line for further reading use #skipThisLine.\r\rCharacter-based reading (#next) is permitted, too. Send #updatePosition when switching from line-based reading.\r\rSee examples at the class side.\r\r--bf 2/19/1999 12:52!\r\r\r!LimitingLineStreamWrapper methodsFor: 'accessing' stamp: 'bf 11/24/1998 14:25'!\rdelimiter: aString\r\t\"Set limitBlock to check for a delimiting string. Be unlimiting if nil\"\r\r\tself limitingBlock: (aString caseOf: {\r\t\t[nil] -> [[:aLine | false]].\r\t\t[''] -> [[:aLine | aLine size = 0]]\r\t} otherwise: [[:aLine | aLine beginsWith: aString]])\r! !\r\r!LimitingLineStreamWrapper methodsFor: 'accessing' stamp: 'bf 11/24/1998 19:16'!\rlimitingBlock: aBlock\r\t\"The limitingBlock is evaluated with a line to check if this line terminates the stream\"\r\r\tlimitingBlock _ aBlock fixTemps.\r\tself updatePosition! !\r\r!LimitingLineStreamWrapper methodsFor: 'accessing' stamp: 'bf 2/19/1999 11:45'!\rlinesUpToEnd\r\r\t| elements ln |\r\telements _ OrderedCollection new.\r\t[(ln _ self nextLine) isNil] whileFalse: [ \r\t\telements add: ln].\r\t^elements! !\r\r!LimitingLineStreamWrapper methodsFor: 'accessing' stamp: 'bf 11/24/1998 14:37'!\rnext\r\t\"Provide character-based access\"\r\r\tposition isNil ifTrue: [^nil].\r\tposition < line size ifTrue: [^line at: (position _ position + 1)].\r\tline _ stream nextLine.\r\tself updatePosition.\r\t^ Character cr! !\r\r!LimitingLineStreamWrapper methodsFor: 'accessing' stamp: 'bf 11/24/1998 14:09'!\rnextLine\r\r\t| thisLine |\r\tself atEnd ifTrue: [^nil].\r\tthisLine _ line.\r\tline _ stream nextLine.\r\t^thisLine\r! !\r\r!LimitingLineStreamWrapper methodsFor: 'accessing' stamp: 'bf 11/24/1998 16:53'!\rskipThisLine\r\r\tline _ stream nextLine.\r\tself updatePosition.\r! !\r\r!LimitingLineStreamWrapper methodsFor: 'accessing' stamp: 'bf 2/19/1999 11:47'!\rupToEnd\r\r\t| ln |\r\t^String streamContents: [:strm |\r\t\t[(ln _ self nextLine) isNil] whileFalse: [ \r\t\t\tstrm nextPutAll: ln; cr]]! !\r\r!LimitingLineStreamWrapper methodsFor: 'accessing' stamp: 'bf 11/24/1998 14:37'!\rupdatePosition\r\t\"Call this before doing character-based access\"\r\r\tposition _ self atEnd ifFalse: [0]! !\r\r\r!LimitingLineStreamWrapper methodsFor: 'testing' stamp: 'bf 11/13/1998 16:55'!\ratEnd\r\r\t^line isNil or: [limitingBlock value: line]! !\r\r\r!LimitingLineStreamWrapper methodsFor: 'stream protocol' stamp: 'bf 11/13/1998 17:00'!\rclose\r\t^stream close! !\r\r\r!LimitingLineStreamWrapper methodsFor: 'printing' stamp: 'bf 11/24/1998 13:39'!\rprintOn: aStream\r\r\tsuper printOn: aStream.\r\taStream nextPutAll: ' on '.\r\tstream printOn: aStream! !\r\r\r!LimitingLineStreamWrapper methodsFor: 'private' stamp: 'bf 11/24/1998 14:30'!\rsetStream: aStream delimiter: aString\r\r\tstream _ aStream.\r\tline _ stream nextLine.\r\tself delimiter: aString.\t\"sets position\"\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rLimitingLineStreamWrapper class\r\tinstanceVariableNames: ''!\r\r!LimitingLineStreamWrapper class methodsFor: 'instance creation' stamp: 'bf 11/24/1998 14:31'!\ron: aStream delimiter: aString\r\r\t^self new setStream: aStream delimiter: aString\r! !\r\r\r!LimitingLineStreamWrapper class methodsFor: 'examples' stamp: 'bf 2/19/1999 11:48'!\rexample1\r\t\"LimitingLineStreamWrapper example1\"\r\t\"Separate chunks of text delimited by a special string\"\r\t| inStream msgStream messages |\r\tinStream _ self exampleStream.\r\tmsgStream _ LimitingLineStreamWrapper on: inStream delimiter: 'From '.\r\tmessages _ OrderedCollection new.\r\t[inStream atEnd] whileFalse: [\r\t\tmsgStream skipThisLine.\r\t\tmessages add: msgStream upToEnd].\r\t^messages\r\t\t\t! !\r\r!LimitingLineStreamWrapper class methodsFor: 'examples' stamp: 'bf 2/19/1999 12:46'!\rexample2\r\t\"LimitingLineStreamWrapper example2\"\r\t\"Demo nesting wrappers - get header lines from some messages\"\r\t| inStream msgStream headers headerStream |\r\tinStream _ self exampleStream.\r\tmsgStream _ LimitingLineStreamWrapper on: inStream delimiter: 'From '.\r\theaders _ OrderedCollection new.\r\t[inStream atEnd] whileFalse: [\r\t\tmsgStream skipThisLine. \"Skip From\"\r\t\theaderStream _ LimitingLineStreamWrapper on: msgStream delimiter: ''.\r\t\theaders add: headerStream linesUpToEnd.\r\t\t[msgStream nextLine isNil] whileFalse. \"Skip Body\"\r\t].\r\t^headers\r\t\t\t! !\r\r!LimitingLineStreamWrapper class methodsFor: 'examples' stamp: 'bf 2/19/1999 12:44'!\rexampleStream\r\t^ReadStream on:\r'From me@somewhere\rFrom: me\rTo: you\rSubject: Test\r\rTest\r\rFrom you@elsewhere\rFrom: you\rTo: me\rSubject: Re: test\r\rokay\r'! !\rPath subclass: #Line\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Paths'!\r!Line commentStamp: '<historical>' prior: 0!\rI represent the line segment specified by two points.!\r\r\r!Line methodsFor: 'accessing'!\rbeginPoint\r\t\"Answer the first end point of the receiver.\"\r\r\t^self first! !\r\r!Line methodsFor: 'accessing'!\rbeginPoint: aPoint \r\t\"Set the first end point of the receiver to be the argument, aPoint. \r\tAnswer aPoint.\"\r\r\tself at: 1 put: aPoint.\r\t^aPoint! !\r\r!Line methodsFor: 'accessing'!\rendPoint\r\t\"Answer the last end point of the receiver.\"\r\r\t^self last! !\r\r!Line methodsFor: 'accessing'!\rendPoint: aPoint \r\t\"Set the first end point of the receiver to be the argument, aPoint. \r\tAnswer aPoint.\"\r\r\tself at: 2 put: aPoint.\r\t^aPoint! !\r\r\r!Line methodsFor: 'displaying'!\rdisplayOn: aDisplayMedium at: aPoint clippingBox: clipRect rule: anInteger fillColor: aForm \r\t\"The form associated with this Path will be displayed, according  \r\tto one of the sixteen functions of two logical variables (rule), at  \r\teach point on the Line. Also the source form will be first anded  \r\twith aForm as a mask. Does not effect the state of the Path.\"\r\r\tcollectionOfPoints size < 2 ifTrue: [self error: 'a line must have two points'].\r\taDisplayMedium\r\t\tdrawLine: self form\r\t\tfrom: self beginPoint + aPoint\r\t\tto: self endPoint + aPoint\r\t\tclippingBox: clipRect\r\t\trule: anInteger\r\t\tfillColor: aForm! !\r\r!Line methodsFor: 'displaying'!\rdisplayOn: aDisplayMedium transformation: aTransformation clippingBox: clipRect rule: anInteger fillColor: aForm\r\r\t| newPath newLine |\r\tnewPath _ aTransformation applyTo: self.\r\tnewLine _ Line new.\r\tnewLine beginPoint: newPath firstPoint.\r\tnewLine endPoint: newPath secondPoint.\r\tnewLine form: self form.\r\tnewLine\r\t\tdisplayOn: aDisplayMedium\r\t\tat: 0 @ 0\r\t\tclippingBox: clipRect\r\t\trule: anInteger\r\t\tfillColor: aForm! !\r\r!Line methodsFor: 'displaying'!\rdisplayOnPort: aPort at: aPoint \r\taPort sourceForm: self form; combinationRule: Form under; fillColor: nil.\r\taPort drawFrom: collectionOfPoints first + aPoint\r\t\tto: collectionOfPoints last + aPoint! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rLine class\r\tinstanceVariableNames: ''!\r\r!Line class methodsFor: 'instance creation'!\rnew\r\r\t| newSelf | \r\tnewSelf _ super new: 2.\r\tnewSelf add: 0@0.\r\tnewSelf add: 0@0.\r\t^newSelf! !\r\r\r!Line class methodsFor: 'examples'!\rexample\r\t\"Designate two places on the screen by clicking any mouse button. A\r\tstraight path with a square black form will be displayed connecting the\r\ttwo selected points.\"\r\r\t| aLine aForm |  \r\taForm _ Form extent: 20@20.\t\t\"make a form one quarter of inch square\"\r\taForm fillBlack.\t\t\t\t\t\t\t\"turn it black\"\r\taLine _ Line new.\r\taLine form: aForm.\t\t\t\t\t\t\"use the black form for display\"\r\taLine beginPoint: Sensor waitButton. Sensor waitNoButton.\r\taForm displayOn: Display at: aLine beginPoint.\t\r\taLine endPoint: Sensor waitButton.\r\taLine displayOn: Display.\t\t\t\t\"display the line\"\r\r\t\"Line example\"! !\rPath subclass: #LinearFit\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Paths'!\r!LinearFit commentStamp: '<historical>' prior: 0!\rI represent a piece-wise linear approximation to a set of points in the plane.!\r\r\r!LinearFit methodsFor: 'displaying' stamp: 'jrm 9/7/1999 22:16'!\rdisplayOn: aDisplayMedium at: aPoint clippingBox: clipRect rule: anInteger\rfillColor: aForm\r \r\t| line |\r\tline _ Line new.\r\tline form: self form.\r\t1 to: self size - 1 do: \r\t\t[:i | \r\t\tline beginPoint: (self at: i).\r\t\tline endPoint: (self at: i + 1).\r\t\tline displayOn: aDisplayMedium\r\t\t\tat: aPoint\r\t\t\tclippingBox: clipRect\r\t\t\trule: anInteger\r\t\t\tfillColor: aForm]! !\r\r!LinearFit methodsFor: 'displaying' stamp: 'jrm 9/7/1999 23:00'!\rdisplayOn: aDisplayMedium transformation: aTransformation clippingBox:\rclipRect rule: anInteger fillColor: aForm \r\r\t| transformedPath |\r\t\"get the scaled and translated Path.\"\r\ttransformedPath _ aTransformation applyTo: self.\r\ttransformedPath\r\t\tdisplayOn: aDisplayMedium\r\t\tat: 0 @ 0\r\t\tclippingBox: clipRect\r\t\trule: anInteger\r\t\tfillColor: aForm! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rLinearFit class\r\tinstanceVariableNames: ''!\r\r!LinearFit class methodsFor: 'examples'!\rexample\r\t\"Select points on a Path using the red button. Terminate by selecting\r\tany other button. Creates a Path from the points and displays it as a\r\tpiece-wise linear approximation.\" \r\r\t| aLinearFit aForm flag |\r\taLinearFit _ LinearFit new.\r\taForm _ Form extent: 1 @ 40.\r\taForm  fillBlack.\r\taLinearFit form: aForm.\r\tflag _ true.\r\t[flag] whileTrue:\r\t\t[Sensor waitButton.\r\t\t Sensor redButtonPressed\r\t\t\tifTrue: [aLinearFit add: Sensor waitButton. Sensor waitNoButton.\r\t\t\t\t\taForm displayOn: Display at: aLinearFit last]\r\t\t\tifFalse: [flag_false]].\r\taLinearFit displayOn: Display\r\r\t\"LinearFit example\"! !\rObject subclass: #Link\r\tinstanceVariableNames: 'nextLink'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Support'!\r!Link commentStamp: '<historical>' prior: 0!\rAn instance of me is a simple record of a pointer to another Link. I am an abstract class; my concrete subclasses, for example, Process, can be stored in a LinkedList structure.!\r\r\r!Link methodsFor: 'accessing'!\rnextLink\r\t\"Answer the link to which the receiver points.\"\r\r\t^nextLink! !\r\r!Link methodsFor: 'accessing'!\rnextLink: aLink \r\t\"Store the argument, aLink, as the link to which the receiver refers. \r\tAnswer aLink.\"\r\r\t^nextLink _ aLink! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rLink class\r\tinstanceVariableNames: ''!\r\r!Link class methodsFor: 'instance creation' stamp: 'apb 10/3/2000 15:55'!\rnextLink: aLink \r\t\"Answer an instance of me referring to the argument, aLink.\"\r\r\t^self new nextLink: aLink; yourself! !\rSequenceableCollection subclass: #LinkedList\r\tinstanceVariableNames: 'firstLink lastLink'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Sequenceable'!\r!LinkedList commentStamp: '<historical>' prior: 0!\rI represent a collection of links, which are containers for other objects. Using the message sequence addFirst:/removeLast causes the receiver to behave as a stack; using addLast:/removeFirst causes the receiver to behave as a queue.!\r\r\r!LinkedList methodsFor: 'accessing' stamp: 'ajh 8/6/2002 15:46'!\rat: index\r\r\t| i |\r\ti _ 0.\r\tself do: [:link |\r\t\t(i _ i + 1) = index ifTrue: [^ link]].\r\t^ self errorSubscriptBounds: index! !\r\r!LinkedList methodsFor: 'accessing'!\rfirst\r\t\"Answer the first link. Create an error notification if the receiver is \r\tempty.\"\r\r\tself emptyCheck.\r\t^firstLink! !\r\r!LinkedList methodsFor: 'accessing'!\rlast\r\t\"Answer the last link. Create an error notification if the receiver is \r\tempty.\"\r\r\tself emptyCheck.\r\t^lastLink! !\r\r\r!LinkedList methodsFor: 'testing'!\risEmpty\r\r\t^firstLink == nil! !\r\r\r!LinkedList methodsFor: 'adding'!\radd: aLink \r\t\"Add aLink to the end of the receiver's list. Answer aLink.\"\r\r\t^self addLast: aLink! !\r\r!LinkedList methodsFor: 'adding' stamp: 'ajh 8/22/2002 14:17'!\radd: link before: otherLink\r\r\t| aLink |\r\tfirstLink == otherLink ifTrue: [^ self addFirst: link].\r\taLink _ firstLink.\r\t[aLink == nil] whileFalse: [\r\t\taLink nextLink == otherLink ifTrue: [\r\t\t\tlink nextLink: aLink nextLink.\r\t\t\taLink nextLink: link.\r\t\t\t^ link\r\t\t].\r\t\t aLink _ aLink nextLink.\r\t].\r\t^ self errorNotFound: otherLink! !\r\r!LinkedList methodsFor: 'adding'!\raddFirst: aLink \r\t\"Add aLink to the beginning of the receiver's list. Answer aLink.\"\r\r\tself isEmpty ifTrue: [lastLink _ aLink].\r\taLink nextLink: firstLink.\r\tfirstLink _ aLink.\r\t^aLink! !\r\r!LinkedList methodsFor: 'adding'!\raddLast: aLink \r\t\"Add aLink to the end of the receiver's list. Answer aLink.\"\r\r\tself isEmpty\r\t\tifTrue: [firstLink _ aLink]\r\t\tifFalse: [lastLink nextLink: aLink].\r\tlastLink _ aLink.\r\t^aLink! !\r\r\r!LinkedList methodsFor: 'removing'!\rremove: aLink ifAbsent: aBlock  \r\t\"Remove aLink from the receiver. If it is not there, answer the result of\r\tevaluating aBlock.\"\r\r\t| tempLink |\r\taLink == firstLink\r\t\tifTrue: [firstLink _ aLink nextLink.\r\t\t\t\taLink == lastLink\r\t\t\t\t\tifTrue: [lastLink _ nil]]\r\t\tifFalse: [tempLink _ firstLink.\r\t\t\t\t[tempLink == nil ifTrue: [^aBlock value].\r\t\t\t\t tempLink nextLink == aLink]\r\t\t\t\t\twhileFalse: [tempLink _ tempLink nextLink].\r\t\t\t\ttempLink nextLink: aLink nextLink.\r\t\t\t\taLink == lastLink\r\t\t\t\t\tifTrue: [lastLink _ tempLink]].\r\taLink nextLink: nil.\r\t^aLink! !\r\r!LinkedList methodsFor: 'removing'!\rremoveFirst\r\t\"Remove the first element and answer it. If the receiver is empty, create \r\tan error notification.\"\r\r\t| oldLink |\r\tself emptyCheck.\r\toldLink _ firstLink.\r\tfirstLink == lastLink\r\t\tifTrue: [firstLink _ nil. lastLink _ nil]\r\t\tifFalse: [firstLink _ oldLink nextLink].\r\toldLink nextLink: nil.\r\t^oldLink! !\r\r!LinkedList methodsFor: 'removing'!\rremoveLast\r\t\"Remove the receiver's last element and answer it. If the receiver is \r\tempty, create an error notification.\"\r\r\t| oldLink aLink |\r\tself emptyCheck.\r\toldLink _ lastLink.\r\tfirstLink == lastLink\r\t\tifTrue: [firstLink _ nil. lastLink _ nil]\r\t\tifFalse: [aLink _ firstLink.\r\t\t\t\t[aLink nextLink == oldLink] whileFalse:\r\t\t\t\t\t[aLink _ aLink nextLink].\r\t\t\t\t aLink nextLink: nil.\r\t\t\t\t lastLink _ aLink].\r\toldLink nextLink: nil.\r\t^oldLink! !\r\r\r!LinkedList methodsFor: 'enumerating'!\rdo: aBlock\r\r\t| aLink |\r\taLink _ firstLink.\r\t[aLink == nil] whileFalse:\r\t\t[aBlock value: aLink.\r\t\t aLink _ aLink nextLink]! !\r\r!LinkedList methodsFor: 'enumerating' stamp: 'ajh 8/6/2002 16:39'!\rspecies\r\r\t^ Array! !\rScrollController subclass: #ListController\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Support'!\r!ListController commentStamp: '<historical>' prior: 0!\rI am a kind of ScrollController that assumes that the view is a kind of ListView. Therefore, scrolling means moving the items in a textual list (menu) up or down. In addition, I provide the red button activity of determining when the red button is selecting an item in the list.!\r\r\r!ListController methodsFor: 'control defaults' stamp: 'bf 4/14/1999 12:41'!\rcontrolActivity\r\tself scrollByKeyboard ifTrue: [^self].\r\tself processKeyboard.\r\tsuper controlActivity.\r! !\r\r\r!ListController methodsFor: 'marker adjustment'!\rcomputeMarkerRegion \r\t\"Refer to the comment in ScrollController|computeMarkerRegion.\"\r\r\t| viewList |\r\tviewList _ view list.\r\tviewList compositionRectangle height = 0\r\t\tifTrue: [^ 0@0 extent: Preferences scrollBarWidth@scrollBar inside height].\r\t^ 0@0 extent: Preferences scrollBarWidth@\r\t\t\t((viewList clippingRectangle height asFloat /\r\t\t\t\t\t\tviewList compositionRectangle height *\r\t\t\t\t\t\t\tscrollBar inside height)\r\t\t\t\t\trounded min: scrollBar inside height)! !\r\r!ListController methodsFor: 'marker adjustment'!\rmarkerDelta\r\r\t| viewList |\r\tviewList _ view list.\r\tviewList compositionRectangle height == 0 ifTrue: [\r\t\t^ (marker top - scrollBar inside top) - scrollBar inside height\r\t].\r\t^ (marker top - scrollBar inside top) -\r\t\t((viewList clippingRectangle top -\r\t\t\t\tviewList compositionRectangle top) asFloat /\r\t\t\tviewList compositionRectangle height asFloat *\r\t\t\tscrollBar inside height asFloat) rounded\r! !\r\r\r!ListController methodsFor: 'scrolling'!\rscrollAmount \r\t\"Refer to the comment in ScrollController|scrollAmount.\"\r\r\t^sensor cursorPoint y - scrollBar inside top! !\r\r!ListController methodsFor: 'scrolling'!\rscrollView: anInteger \r\t\"Scroll the view and highlight the selection if it just came into view\"\r\t| wasClipped |\r\twasClipped _ view isSelectionBoxClipped.\r\t(view scrollBy: anInteger)\r\t\tifTrue: [view isSelectionBoxClipped ifFalse:\r\t\t\t\t\t[wasClipped ifTrue:  \"Selection came into view\"\r\t\t\t\t\t\t[view displaySelectionBox]].\r\t\t\t\t^ true]\r\t\tifFalse: [^ false]! !\r\r!ListController methodsFor: 'scrolling'!\rviewDelta \r\t\"Refer to the comment in ScrollController|viewDelta.\"\r\r\t| viewList |\r\tviewList _ view list.\r\t^(viewList clippingRectangle top -\r\t\t\tviewList compositionRectangle top -\r\t\t\t((marker top - scrollBar inside top) asFloat /\r\t\t\t\tscrollBar inside height asFloat *\r\t\t\t\tviewList compositionRectangle height asFloat))\r\t\troundTo: viewList lineGrid! !\r\r\r!ListController methodsFor: 'selecting' stamp: 'tk 4/1/98 10:33'!\rredButtonActivity\r\t| noSelectionMovement oldSelection selection nextSelection pt scrollFlag firstTime |\r\tnoSelectionMovement _ true.\r\tscrollFlag _ false.\r\toldSelection _ view selection.\r\tfirstTime _ true.\r\t[sensor redButtonPressed | firstTime]\r\t\twhileTrue: \r\t\t\t[selection _ view findSelection: (pt _ sensor cursorPoint).\r\t\t\tfirstTime _ false.\r\t\t\tselection == nil ifTrue:  \"Maybe out of box - check for auto-scroll\"\r\t\t\t\t\t[pt y < view insetDisplayBox top ifTrue:\r\t\t\t\t\t\t[self scrollView: view list lineGrid.\r\t\t\t\t\t\tscrollFlag _ true.\r\t\t\t\t\t\tselection _ view firstShown].\r\t\t\t\t\tpt y > view insetDisplayBox bottom ifTrue:\r\t\t\t\t\t\t[self scrollView: view list lineGrid negated.\r\t\t\t\t\t\tscrollFlag _ true.\r\t\t\t\t\t\tselection _ view lastShown]].\r\t\t\tselection == nil ifFalse:\r\t\t\t\t\t[view moveSelectionBox: (nextSelection _ selection).\r\t\t\t\t\tnextSelection ~= oldSelection\r\t\t\t\t\t\tifTrue: [noSelectionMovement _ false]]].\r\tnextSelection ~~ nil & (nextSelection = oldSelection\r\t\t\tifTrue: [noSelectionMovement]\r\t\t\tifFalse: [true]) ifTrue: [self changeModelSelection: nextSelection].\r\tscrollFlag ifTrue: [self moveMarker]! !\r\r\r!ListController methodsFor: 'private'!\rchangeModelSelection: anInteger\r\tmodel toggleListIndex: anInteger! !\r\r\r!ListController methodsFor: 'menu messages' stamp: 'acg 9/18/1999 14:09'!\rprocessKeyboard\r\t\"Derived from a Martin Pammer submission, 02/98\"\r\r     | keyEvent oldSelection nextSelection max min howMany |\r\tsensor keyboardPressed ifFalse: [^ self].\r\r     keyEvent := sensor keyboard asciiValue.\r     oldSelection := view selection.\r     nextSelection := oldSelection.\r     max := view maximumSelection.\r     min := view minimumSelection.\r     howMany := view clippingBox height // view list lineGrid.\r\r     keyEvent == 31 ifTrue:\r\t\t[\"down-arrow; move down one, wrapping to top if needed\"\r\t\tnextSelection := oldSelection + 1.\r\t\tnextSelection > max ifTrue: [nextSelection _ 1]].\r\r     keyEvent == 30 ifTrue:\r\t\t[\"up arrow; move up one, wrapping to bottom if needed\"\r\t\tnextSelection := oldSelection - 1.\r\t\tnextSelection < 1 ifTrue: [nextSelection _ max]].\r\r     keyEvent == 1  ifTrue: [nextSelection := 1].  \"home\"\r     keyEvent == 4  ifTrue: [nextSelection := max].   \"end\"\r     keyEvent == 11 ifTrue: [nextSelection := min max: (oldSelection -\rhowMany)].  \"page up\"\r     keyEvent == 12  ifTrue: [nextSelection := (oldSelection + howMany)\rmin: max].  \"page down\"\r     nextSelection = oldSelection  ifFalse:\r\t\t[model okToChange\r\t\t\tifTrue:\r\t\t\t\t[self changeModelSelection: nextSelection.\r\t\t\t\tself moveMarker]]\r\t\t\t! !\rParagraph subclass: #ListParagraph\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'ListStyle'\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Support'!\r!ListParagraph commentStamp: '<historical>' prior: 0!\rI represent a special type of Paragraph that is used in the list panes of a browser.  I  avoid all the composition done by more general Paragraphs, because I know the structure of my Text.!\r\r\r!ListParagraph methodsFor: 'composition'!\rcomposeAll\r\t\"No composition is necessary once the ListParagraph is created.\"\r\t\r\tlastLine isNil ifTrue: [lastLine _ 0].\t\r\t\t\"Because composeAll is called once in the process of creating the ListParagraph.\"\r\t^compositionRectangle width! !\r\r\r!ListParagraph methodsFor: 'private'!\rtrimLinesTo: lastLineInteger\r\t\"Since ListParagraphs are not designed to be changed, we can cut back the\r\t\tlines field to lastLineInteger.\"\r\tlastLine _ lastLineInteger.\r\tlines _ lines copyFrom: 1 to: lastLine! !\r\r!ListParagraph methodsFor: 'private' stamp: 'di 7/13/97 16:56'!\rwithArray: anArray \r\t\"Modifies self to contain the list of strings in anArray\"\r\t| startOfLine endOfLine lineIndex aString |\r\tlines _ Array new: 20.\r\tlastLine _ 0.\r\tstartOfLine _ 1.\r\tendOfLine _ 1.\r\tlineIndex _ 0.\r\tanArray do: \r\t\t[:item | \r\t\tendOfLine _ startOfLine + item size.\t\t\"this computation allows for a cr after each line...\"\r\t\t\t\t\t\t\t\t\t\t\t\t\"...but later we will adjust for no cr after last line\"\r\t\tlineIndex _ lineIndex + 1.\r\t\tself lineAt: lineIndex put:\r\t\t\t((TextLineInterval start: startOfLine stop: endOfLine\r\t\t\t\tinternalSpaces: 0 paddingWidth: 0)\r\t\t\t\tlineHeight: textStyle lineGrid baseline: textStyle baseline).\r\t\tstartOfLine _ endOfLine + 1].\r\tendOfLine _ endOfLine - 1.\t\t\"endOfLine is now the total size of the text\"\r\tself trimLinesTo: lineIndex.\r\taString _ String new: endOfLine.\r\tanArray with: lines do: \r\t\t[:item :interval | \r\t\taString\r\t\t\treplaceFrom: interval first\r\t\t\tto: interval last - 1\r\t\t\twith: item asString\r\t\t\tstartingAt: 1.\r\t\tinterval last <= endOfLine ifTrue: [aString at: interval last put: Character cr]].\r\tlineIndex > 0 ifTrue: [(lines at: lineIndex) stop: endOfLine].\t\"adjust for no cr after last line\"\r\tself text: aString asText.\r\tanArray with: lines do: \r\t\t[:item :interval |  item isText ifTrue:\r\t\t\t[text replaceFrom: interval first to: interval last - 1 with: item]].\r\tself updateCompositionHeight! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rListParagraph class\r\tinstanceVariableNames: ''!\r\r!ListParagraph class methodsFor: 'instance creation' stamp: 'jm 9/20/1998 17:10'!\rwithArray: anArray style: aTextStyleOrNil\r\t\"Convert an array of strings into a ListParagraph using the given TextStyle.\"\r\r\taTextStyleOrNil\r\t\tifNil: [^ (super withText: Text new style: ListStyle) withArray: anArray]\r\t\tifNotNil: [^ (super withText: Text new style: aTextStyleOrNil) withArray: anArray].\r! !\r\r\r!ListParagraph class methodsFor: 'initialization' stamp: 'sw 12/10/1999 10:37'!\rinitialize \r\t\"ListParagraph initialize\"\r\t| aFont |\r\t\"Allow different line spacing for lists\"\r\taFont _ Preferences standardListFont.\r\tListStyle _ aFont textStyle copy consistOnlyOf: aFont.\r\tListStyle gridForFont: 1 withLead: 1! !\r\r\r!ListParagraph class methodsFor: 'style' stamp: 'sw 12/10/1999 10:43'!\rstandardListStyle\r\t^ ListStyle! !\rView subclass: #ListView\r\tinstanceVariableNames: 'list selection topDelimiter bottomDelimiter isEmpty textStyle'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Support'!\r!ListView commentStamp: '<historical>' prior: 0!\rI am an abstract View of a list of items. I provide support for storing a selection of one item, as well as formatting the list for presentation on the screen. My instances' default controller is ListController.!\r\r\r!ListView methodsFor: 'initialize-release'!\rinitialize \r\t\"Refer to the comment in View|initialize.\"\r\r\tsuper initialize.\r\ttopDelimiter _ '------------'.\r\tbottomDelimiter _ '------------'.\r\tisEmpty _ true.\r\tself list: Array new! !\r\r\r!ListView methodsFor: 'font access' stamp: 'sw 12/9/1999 18:07'!\rfont\r\t^ self assuredTextStyle fontNamed: textStyle fontNames first\r! !\r\r!ListView methodsFor: 'font access' stamp: 'jm 9/20/1998 19:44'!\rfont: aFontOrNil\r\r\taFontOrNil\r\t\tifNil: [textStyle _ nil]\r\t\tifNotNil: [\r\t\t\ttextStyle _ TextStyle fontArray: (Array with: aFontOrNil).\r\t\t\ttextStyle gridForFont: 1 withLead: 1].\r\tself changed: #list.  \"update display\"\r! !\r\r\r!ListView methodsFor: 'list access' stamp: 'sw 12/10/1999 10:43'!\rassuredTextStyle\r\t^ textStyle ifNil:\r\t\t[textStyle _  ListParagraph standardListStyle]\r! !\r\r!ListView methodsFor: 'list access'!\rlist\r\t\"Answer the list of items the receiver displays.\"\r\r\t^list! !\r\r!ListView methodsFor: 'list access' stamp: 'sw 12/9/1999 18:06'!\rlist: anArray \r\t\"Set the list of items the receiver displays to be anArray.\"\r\t| arrayCopy i |\r\tisEmpty _ anArray isEmpty.\r\tarrayCopy _ Array new: (anArray size + 2).\r\tarrayCopy at: 1 put: topDelimiter.\r\tarrayCopy at: arrayCopy size put: bottomDelimiter.\r\ti _ 2.\r\tanArray do: [:el | arrayCopy at: i put: el. i _ i+1].\r\tarrayCopy _ arrayCopy copyWithout: nil.\r\tlist _ ListParagraph withArray: arrayCopy style: self assuredTextStyle.\r\tselection _ 0.\r\tself positionList.\r! !\r\r!ListView methodsFor: 'list access'!\rreset\r\t\"Set the list of items displayed to be empty.\"\r\r\tisEmpty _ true.\r\tself list: Array new! !\r\r!ListView methodsFor: 'list access'!\rresetAndDisplayView\r\t\"Set the list of items displayed to be empty and redisplay the receiver.\"\r\r\tisEmpty\r\t\tifFalse: \r\t\t\t[self reset.\r\t\t\tself displayView]! !\r\r!ListView methodsFor: 'list access'!\rselection: selIndex\r\tselection _ selIndex! !\r\r\r!ListView methodsFor: 'delimiters'!\rbottomDelimiter\r\t\"Answer the string used to indicate the bottom of the list.\"\r\r\t^bottomDelimiter! !\r\r!ListView methodsFor: 'delimiters'!\rbottomDelimiter: aString \r\t\"Set the string used to indicate the bottom of the list.\"\r\r\tbottomDelimiter _ aString! !\r\r!ListView methodsFor: 'delimiters'!\rnoBottomDelimiter\r\t\"Set the string used to indicate the bottom of the list to be nothing.\"\r\r\tbottomDelimiter _ nil! !\r\r!ListView methodsFor: 'delimiters'!\rnoTopDelimiter\r\t\"Set the string used to indicate the top of the list to be nothing.\"\r\r\ttopDelimiter _ nil! !\r\r!ListView methodsFor: 'delimiters'!\rtopDelimiter\r\t\"Answer the string used to indicate the top of the list.\"\r\r\t^topDelimiter! !\r\r!ListView methodsFor: 'delimiters'!\rtopDelimiter: aString \r\t\"Set the string used to indicate the top of the list.\"\r\r\ttopDelimiter _ aString! !\r\r\r!ListView methodsFor: 'displaying'!\rdeEmphasizeSelectionBox\r\tself displaySelectionBox! !\r\r!ListView methodsFor: 'displaying'!\rdisplay \r\t\"Refer to the comment in View.display.\"\r\t(self isUnlocked and: [self clippingBox ~= list clippingRectangle])\r\t\tifTrue:  \"Recompose the list if the window changed\"\r\t\t\t[selection isNil ifTrue: [selection _ 0].\r\t\t\tself positionList].\r\tsuper display! !\r\r!ListView methodsFor: 'displaying'!\rdisplaySelectionBox\r\t\"If the receiver has a selection and that selection is visible on the display \r\tscreen, then highlight it.\"\r\tselection ~= 0 ifTrue:\r\t\t[Display reverse: (self selectionBox intersect: self clippingBox)]! !\r\r!ListView methodsFor: 'displaying'!\rdisplayView \r\t\"Refer to the comment in View|displayView.\"\r\r\tself clearInside.\r\tlist foregroundColor: self foregroundColor\r\t\tbackgroundColor: self backgroundColor.\r\tlist displayOn: Display! !\r\r!ListView methodsFor: 'displaying'!\rscrollBy: anInteger \r\t\"Scroll up by this amount adjusted by lineSpacing and list limits\"\r\t| maximumAmount minimumAmount amount wasClipped |\r\tmaximumAmount _ 0 max:\r\t\tlist clippingRectangle top - list compositionRectangle top.\r\tminimumAmount _ 0 min:\r\t\tlist clippingRectangle bottom - list compositionRectangle bottom.\r\tamount _ (anInteger min: maximumAmount) max: minimumAmount.\r\tamount ~= 0\r\t\tifTrue: [list scrollBy: amount negated.  ^ true]\r\t\tifFalse: [^ false]  \"Return false if no scrolling took place\"! !\r\r!ListView methodsFor: 'displaying'!\rscrollSelectionIntoView\r\t\"Selection is assumed to be on and clipped out of view.\r\tUses controller scrollView to keep selection right\"\r\t| delta |\r\t(delta _ self insetDisplayBox bottom - self selectionBox bottom) < 0\r\t\tifTrue: [^ self controller scrollView: delta - (list lineGrid-1)]. \"up\"\r\t(delta _ self insetDisplayBox top - self selectionBox top) > 0\r\t\tifTrue: [^ self controller scrollView: delta + 1] \"down\"! !\r\r\r!ListView methodsFor: 'deEmphasizing'!\rdeEmphasizeView \r\t\"Refer to the comment in View|deEmphasizeView.\"\r\t^ self deEmphasizeSelectionBox! !\r\r!ListView methodsFor: 'deEmphasizing'!\remphasizeView \r\t\"List emphasis is its own inverse.\"\r\t^ self deEmphasizeView! !\r\r\r!ListView methodsFor: 'controller access'!\rdefaultControllerClass \r\t\"Refer to the comment in View|defaultControllerClass.\"\r\r\t^ListController! !\r\r\r!ListView methodsFor: 'display box access'!\rboundingBox \r\t\"Refer to the comment in View|boundingBox.\"\r\r\t^list boundingBox! !\r\r!ListView methodsFor: 'display box access' stamp: 'mkd 11/4/1999 14:31'!\risSelectionBoxClipped\r        \"Answer whether there is a selection and whether the selection is visible \r        on the screen.\"\r\r        ^ selection ~= 0 and:\r\t\t\t[(self selectionBox intersects: \r                       (self clippingBox insetBy: (Rectangle left: 0 right: 0 top: 1 bottom: 0))) not]! !\r\r\r!ListView methodsFor: 'clipping box access'!\rclippingBox\r\t\"Answer the rectangle in which the model can be displayed--this is the \r\tinsetDisplayBox inset by the height of a line for an item.\"\r\r\t^self insetDisplayBox insetBy: \r\t\t(Rectangle\r\t\t\tleft: 0\r\t\t\tright: 0\r\t\t\ttop: 0\r\t\t\tbottom: self insetDisplayBox height \\\\ list lineGrid)! !\r\r\r!ListView methodsFor: 'selecting'!\rdeselect\r\t\"If the receiver has a selection, then it is highlighted. Remove the \r\thighlighting.\"\r\r\tselection ~= 0 ifTrue: [Display reverse: (self selectionBox intersect: self clippingBox)]! !\r\r!ListView methodsFor: 'selecting'!\rfindSelection: aPoint \r\t\"Determine which selection is displayed in an area containing the point, \r\taPoint. Answer the selection if one contains the point, answer nil \r\totherwise.\"\r\r\t| trialSelection |\r\t(self clippingBox containsPoint: aPoint) ifFalse: [^nil].\r\ttrialSelection _ aPoint y - list compositionRectangle top // list lineGrid + 1.\r\ttopDelimiter == nil ifFalse: [trialSelection _ trialSelection - 1].\r\t(trialSelection < 1) | (trialSelection > self maximumSelection)\r\t\tifTrue: [^ nil]\r\t\tifFalse: [^ trialSelection]! !\r\r!ListView methodsFor: 'selecting'!\rmaximumSelection\r\t\"Answer which selection is the last possible one.\"\r\t^ list numberOfLines\r\t\t- (topDelimiter == nil ifTrue: [0] ifFalse: [1])\r\t\t- (bottomDelimiter == nil ifTrue: [0] ifFalse: [1])! !\r\r!ListView methodsFor: 'selecting'!\rminimumSelection\r\t\"Answer which selection is the first possible one.\"\r\t^ 1! !\r\r!ListView methodsFor: 'selecting'!\rmoveSelectionBox: anInteger \r\t\"Presumably the selection has changed to be anInteger. Deselect the \r\tprevious selection and display the new one, highlighted.\"\r\r\tselection ~= anInteger\r\t\tifTrue: \r\t\t\t[self deselect.\r\t\t\tselection _ anInteger.\r\t\t\tself displaySelectionBox].\r\tself isSelectionBoxClipped\r\t\tifTrue: [self scrollSelectionIntoView]! !\r\r!ListView methodsFor: 'selecting' stamp: 'di 5/22/1998 00:25'!\rnumSelectionsInView\r\t^ self clippingBox height // self list lineGrid! !\r\r!ListView methodsFor: 'selecting'!\rselection\r\t\"Answer the receiver's current selection.\"\r\r\t^selection! !\r\r!ListView methodsFor: 'selecting'!\rselectionBox\r\t\"Answer the rectangle in which the current selection is displayed.\"\r\r\t^(self insetDisplayBox left @ (list compositionRectangle top + self selectionBoxOffset) \r\t\textent: self insetDisplayBox width @ list lineGrid)\r\t\tinsetBy: (Rectangle left: 1 right: 1 top: 1 bottom: 0)! !\r\r!ListView methodsFor: 'selecting'!\rselectionBoxOffset\r\t\"Answer an integer that determines the y position for the display box of \r\tthe current selection.\"\r\r\t^ (selection - 1 + (topDelimiter == nil ifTrue: [0] ifFalse: [1]))\r\t\t* list lineGrid! !\r\r\r!ListView methodsFor: 'updating'!\rupdate: aSymbol \r\t\"Refer to the comment in View|update:.\"\r\r\taSymbol == #list\r\t\tifTrue: \r\t\t\t[self list: model list.\r\t\t\tself displayView.\r\t\t\t^self].\r\taSymbol == #listIndex\r\t\tifTrue: \r\t\t\t[self moveSelectionBox: model listIndex.\r\t\t\t^self]! !\r\r\r!ListView methodsFor: 'private'!\rfirstShown\r\t\"Return the index of the top item currently visible\"\r\t| trial |\r\ttrial _ self findSelection: self insetDisplayBox topLeft.\r\t^ trial == nil\r\t\tifTrue: [1]\r\t\tifFalse: [trial]! !\r\r!ListView methodsFor: 'private'!\rlastShown\r\t\"Return the index of the bottom item currently visible\"\r\t| trial bottomMargin |\r\tbottomMargin _ self insetDisplayBox height \\\\ list lineGrid.\r\ttrial _ self findSelection: self insetDisplayBox bottomLeft - (0@bottomMargin).\r\ttrial == nil\r\t\tifTrue: [trial _ self findSelection: self insetDisplayBox bottomLeft\r\t\t\t\t\t- (0@(list lineGrid+bottomMargin))].\r\t^ trial == nil\r\t\tifTrue: [list numberOfLines - 2]\r\t\tifFalse: [trial]! !\r\r!ListView methodsFor: 'private'!\rpositionList\r\r\tlist wrappingBox: self wrappingBox clippingBox: self clippingBox ! !\r\r!ListView methodsFor: 'private'!\rwrappingBox\r\r\t| aRectangle |\r\taRectangle _ self insetDisplayBox. \r\tselection = 0\r\t\tifTrue: [^aRectangle topLeft + (4 @ 0) extent: list compositionRectangle extent]\r\t\tifFalse: [^aRectangle left + 4 @ \r\t\t\t\t\t(aRectangle top - \r\t\t\t\t\t\t(self selectionBoxOffset \r\t\t\t\t\t\t\tmin: ((list height - aRectangle height \r\t\t\t\t\t\t\t\t\t+ list lineGrid truncateTo: list lineGrid)\r\t\t\t\t\t\t\tmax: 0))) \r\t\t\t\t\textent: list compositionRectangle extent]! !\r\r\r!ListView methodsFor: 'lock access'!\rlock\r\t\"Refer to the comment in view|lock.  Must do at least what display would do to lock the view.\"\r\r\t(self isUnlocked and: [self clippingBox ~= list clippingRectangle])\r\t\tifTrue:  \"Recompose the list if the window changed\"\r\t\t\t[self positionList].\r\tsuper lock! !\rDictionary subclass: #LiteralDictionary\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Compiler'!\r!LiteralDictionary commentStamp: '<historical>' prior: 0!\rA LiteralDictionary, like an IdentityDictionary, has a special test for equality.  In this case it is simple equality between objects of like class.  This allows equal Float or String literals to be shared without the possibility of erroneously sharing, say, 1 and 1.0!\r\r\r!LiteralDictionary methodsFor: 'as yet unclassified' stamp: 'yo 1/27/2001 05:06'!\rarrayEquality: x and: y\r\r\tx size = y size ifFalse: [^ false].\r\tx with: y do: [:e1 :e2 | \r\t\t(self literalEquality: e1 and: e2) ifFalse: [^ false]\r\t].\r\t^true.\r! !\r\r!LiteralDictionary methodsFor: 'as yet unclassified' stamp: 'yo 1/27/2001 05:13'!\rliteralEquality: x and: y\r\r\t^ (x class = Array and: [y class = Array]) ifTrue: [\r\t\tself arrayEquality: x and: y.\r\t] ifFalse: [\r\t\t(x class == y class) and: [x = y]\r\t].\r! !\r\r!LiteralDictionary methodsFor: 'as yet unclassified' stamp: 'yo 1/27/2001 05:10'!\rscanFor: anObject\r\t\"Scan the key array for the first slot containing either a nil (indicating an empty slot) or an element that matches anObject. Answer the index of that slot or zero if no slot is found. This method will be overridden in various subclasses that have different interpretations for matching elements.\"\r\t| element start finish |\r\tstart _ (anObject hash \\\\ array size) + 1.\r\tfinish _ array size.\r\r\t\"Search from (hash mod size) to the end.\"\r\tstart to: finish do:\r\t\t[:index | ((element _ array at: index) == nil\r\t\t\t\t\tor: [self literalEquality: element key and: anObject])\r\t\t\t\t\tifTrue: [^ index ]].\r\r\t\"Search from 1 to where we started.\"\r\t1 to: start-1 do:\r\t\t[:index | ((element _ array at: index) == nil\r\t\t\t\t\tor: [self literalEquality: element key and: anObject])\r\t\t\t\t\tifTrue: [^ index ]].\r\r\t^ 0  \"No match AND no empty slot\"! !\rLeafNode subclass: #LiteralNode\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Compiler'!\r!LiteralNode commentStamp: '<historical>' prior: 0!\rI am a parse tree leaf representing a literal string or number.!\r\r\r!LiteralNode methodsFor: 'code generation'!\remitForValue: stack on: strm\r\r\tcode < 256\r\t\tifTrue: [strm nextPut: code]\r\t\tifFalse: [self emitLong: LoadLong on: strm].\r\tstack push: 1! !\r\r\r!LiteralNode methodsFor: 'testing'!\risConstantNumber\r\t^ key isNumber! !\r\r!LiteralNode methodsFor: 'testing' stamp: 'di 4/5/2000 11:13'!\risLiteral\r\r\t^ true! !\r\r!LiteralNode methodsFor: 'testing'!\risSpecialConstant\r\t^ code between: LdTrue and: LdMinus1+3! !\r\r!LiteralNode methodsFor: 'testing'!\rliteralValue\r\r\t^key! !\r\r\r!LiteralNode methodsFor: 'printing' stamp: 'ar 8/16/2001 13:27'!\rprintOn: aStream indent: level\r\r\t(key isVariableBinding)\r\t\tifTrue:\r\t\t\t[key key isNil\r\t\t\t\tifTrue:\r\t\t\t\t\t[aStream nextPutAll: '###';\r\t\t\t\t\t \tnextPutAll: key value soleInstance name]\r\t\t\t\tifFalse:\r\t\t\t\t\t[aStream nextPutAll: '##';\r\t\t\t\t\t\tnextPutAll: key key]]\r\t\tifFalse:\r\t\t\t[aStream withStyleFor: #literal\r\t\t\t\t\tdo: [key storeOn: aStream]]! !\rVariableNode subclass: #LiteralVariableNode\r\tinstanceVariableNames: 'splNode'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Compiler'!\r\r!LiteralVariableNode methodsFor: 'code generation' stamp: 'ar 8/16/2001 12:12'!\remitLoad: stack on: strm\r\tsplNode ifNil:[^super emitLoad: stack on: strm].\r\tcode < 256\r\t\tifTrue: [strm nextPut: code]\r\t\tifFalse: [self emitLong: LoadLong on: strm].\r\tstack push: 1.! !\r\r!LiteralVariableNode methodsFor: 'code generation' stamp: 'ar 8/16/2001 12:12'!\remitStore: stack on: strm\r\tsplNode ifNil:[^super emitStore: stack on: strm].\r\tsplNode\r\t\t\temit: stack\r\t\t\targs: 1\r\t\t\ton: strm\r\t\t\tsuper: false.! !\r\r!LiteralVariableNode methodsFor: 'code generation' stamp: 'ar 8/16/2001 12:12'!\remitStorePop: stack on: strm\r\tsplNode ifNil:[^super emitStorePop: stack on: strm].\r\tself emitStore: stack on: strm.\r\tstrm nextPut: Pop.\r\tstack pop: 1.! !\r\r!LiteralVariableNode methodsFor: 'code generation' stamp: 'ar 8/21/2001 13:21'!\rsizeForStore: encoder\r\t| index |\r\t(key isVariableBinding and:[key isSpecialWriteBinding]) \r\t\tifFalse:[^super sizeForStore: encoder].\r\tcode < 0 ifTrue:[\r\t\tindex _ self index.\r\t\tcode _ self code: index type: LdLitType].\r\tsplNode _ encoder encodeSelector: #value:.\r\t^(splNode size: encoder args: 1 super: false) + (super sizeForValue: encoder)! !\r\r!LiteralVariableNode methodsFor: 'code generation' stamp: 'ar 8/21/2001 13:21'!\rsizeForStorePop: encoder\r\t| index |\r\t(key isVariableBinding and:[key isSpecialWriteBinding]) \r\t\tifFalse:[^super sizeForStorePop: encoder].\r\tcode < 0 ifTrue:[\r\t\tindex _ self index.\r\t\tcode _ self code: index type: LdLitType].\r\tsplNode _ encoder encodeSelector: #value:.\r\t^(splNode size: encoder args: 1 super: false) + (super sizeForValue: encoder) + 1! !\rMagnitude subclass: #LookupKey\r\tinstanceVariableNames: 'key'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Support'!\r!LookupKey commentStamp: '<historical>' prior: 0!\rI represent a key for looking up entries in a data structure. Subclasses of me, such as Association, typically represent dictionary entries.!\r\r\r!LookupKey methodsFor: 'accessing'!\rkey\r\t\"Answer the lookup key of the receiver.\"\r\r\t^key! !\r\r!LookupKey methodsFor: 'accessing'!\rkey: anObject \r\t\"Store the argument, anObject, as the lookup key of the receiver.\"\r\r\tkey _ anObject! !\r\r!LookupKey methodsFor: 'accessing' stamp: 'ajh 3/24/2003 21:14'!\rname\r\r\t^ self key isString\r\t\tifTrue: [self key]\r\t\tifFalse: [self key printString]! !\r\r\r!LookupKey methodsFor: 'comparing'!\r< aLookupKey \r\t\"Refer to the comment in Magnitude|<.\"\r\r\t^key < aLookupKey key! !\r\r!LookupKey methodsFor: 'comparing'!\r= aLookupKey\r\r\tself species = aLookupKey species\r\t\tifTrue: [^key = aLookupKey key]\r\t\tifFalse: [^false]! !\r\r!LookupKey methodsFor: 'comparing'!\rhash\r\t\"Hash is reimplemented because = is implemented.\"\r\r\t^key hash! !\r\r!LookupKey methodsFor: 'comparing'!\rhashMappedBy: map\r\t\"Answer what my hash would be if oops changed according to map.\"\r\r\t^key hashMappedBy: map! !\r\r!LookupKey methodsFor: 'comparing' stamp: 'di 9/27/97 20:45'!\ridentityHashMappedBy: map\r\t\"Answer what my hash would be if oops changed according to map.\"\r\r\t^ key identityHashMappedBy: map! !\r\r\r!LookupKey methodsFor: 'printing'!\rprintOn: aStream\r\r\tkey printOn: aStream! !\r\r\r!LookupKey methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 02:35'!\rwriteOnFilterStream: aStream\r\r\taStream write:key.! !\r\r\r!LookupKey methodsFor: 'testing' stamp: 'ar 8/14/2001 22:39'!\risVariableBinding\r\t\"Return true if I represent a literal variable binding\"\r\t^true! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rLookupKey class\r\tinstanceVariableNames: ''!\r\r!LookupKey class methodsFor: 'instance creation'!\rkey: aKey \r\t\"Answer an instance of me with the argument as the lookup up.\"\r\r\t^self new key: aKey! !\rFileDirectory subclass: #MacFileDirectory\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'TypeToMimeMappings'\r\tpoolDictionaries: ''\r\tcategory: 'System-Files'!\r!MacFileDirectory commentStamp: '<historical>' prior: 0!\rI represent a Macintosh FileDirectory.\r!\r\r\r!MacFileDirectory methodsFor: 'file operations' stamp: 'nk 3/13/2003 09:01'!\rfullPathFor: path\r\t\"Return the fully-qualified path name for the given file.\"\r\tpath isEmptyOrNil ifTrue: [^ pathName].\r\t(self class isAbsolute: path) ifTrue: [^ path].\r\tpathName = ''\t\t\t\"Root dir?\"\r\t\tifTrue: [ ^path].\r\t^(path first = $:)\r\t\tifTrue: [ pathName, path ]\r\t\tifFalse: [pathName , ':' , path]! !\r\r\r!MacFileDirectory methodsFor: 'as yet unclassified' stamp: 'hmm 3/25/2004 21:57'!\rfullNameFor: fileName\r\t\"Return a corrected, fully-qualified name for the given file name. If the given name is already a full path (i.e., it contains a delimiter character), assume it is already a fully-qualified name. Otherwise, prefix it with the path to this directory. In either case, correct the local part of the file name.\"\r\t\"Details: Note that path relative to a directory, such as '../../foo' are disallowed by this algorithm.  Also note that this method is tolerent of a nil argument -- is simply returns nil in this case.\"\r\t\"Fix by hmm: for a file in the root directory of a volume on MacOS, the filePath (name of the directory) is not  recognizable as an absolute path anymore (it has no delimiters). Therefore, the original fileName is tested for absoluteness, and the filePath is only made absolute if the original fileName was not absolute\"\r\r\t| correctedLocalName prefix |\r\tfileName isEmptyOrNil ifTrue: [^ fileName].\r\tDirectoryClass splitName: fileName to:\r\t\t[:filePath :localName |\r\t\t\tcorrectedLocalName _ localName isEmpty \r\t\t\t\tifFalse: [self checkName: localName fixErrors: true]\r\t\t\t\tifTrue: [localName].\r\t\t\tprefix _ (DirectoryClass isAbsolute: fileName)\r\t\t\t\t\t\tifTrue: [filePath]\r\t\t\t\t\t\tifFalse: [self fullPathFor: filePath]].\r\tprefix isEmpty\r\t\tifTrue: [^correctedLocalName].\r\tprefix last = self pathNameDelimiter\r\t\tifTrue:[^ prefix, correctedLocalName]\r\t\tifFalse:[^ prefix, self slash, correctedLocalName]! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rMacFileDirectory class\r\tinstanceVariableNames: ''!\r\r!MacFileDirectory class methodsFor: 'platform specific' stamp: 'md 10/26/2003 13:06'!\risActiveDirectoryClass\r\t^ super isActiveDirectoryClass\r\t\tand: [(SmalltalkImage current getSystemAttribute: 1201) isNil\r\t\t\t\tor: [(SmalltalkImage current getSystemAttribute: 1201) asNumber <= 31]]! !\r\r!MacFileDirectory class methodsFor: 'platform specific' stamp: 'di 5/11/1999 08:53'!\risCaseSensitive\r\t\"Mac OS ignores the case of file names\"\r\t^ false! !\r\r!MacFileDirectory class methodsFor: 'platform specific' stamp: 'hg 9/28/2001 15:23'!\rmaxFileNameLength\r\r\t^31! !\r\r!MacFileDirectory class methodsFor: 'platform specific' stamp: 'jm 12/4/97 22:57'!\rpathNameDelimiter\r\r\t^ $:\r! !\r\r\r!MacFileDirectory class methodsFor: 'class initialization' stamp: 'nk 12/5/2002 11:17'!\risAbsolute: fileName\r\t\"Return true if the given fileName is absolute. The rules are:\r\rIf a path begins with a colon, it is relative.\rOtherwise,\r  If it contains a colon anywhere, it is absolute and the first component is the volume name.\r  Otherwise,\r    It is relative.\"\r\r\t^fileName first ~= $:\r\t\tand: [ fileName includes: $: ]! !\rMacFileDirectory subclass: #MacHFSPlusFileDirectory\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Files'!\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rMacHFSPlusFileDirectory class\r\tinstanceVariableNames: ''!\r\r!MacHFSPlusFileDirectory class methodsFor: 'platform specific' stamp: 'md 10/26/2003 13:06'!\risActiveDirectoryClass\r\t\"Ok, lets see if we support HFS Plus file names, the long ones\"\r\r\t^ (self pathNameDelimiter = self primPathNameDelimiter) and: [(SmalltalkImage current  getSystemAttribute: 1201) notNil and: [(SmalltalkImage current getSystemAttribute: 1201) asNumber > 31]]! !\r\r!MacHFSPlusFileDirectory class methodsFor: 'platform specific' stamp: 'JMM 11/14/1935 00:02'!\rmaxFileNameLength\r\r\t^ 255! !\rObject subclass: #Magnitude\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Magnitudes'!\r!Magnitude commentStamp: '<historical>' prior: 0!\rMagnitude has methods for dealing with linearly ordered collections.\r\rSubclasses represent dates, times, and numbers.\r\rExample for interval-testing (answers a Boolean):\r\t7 between: 5 and: 10 \r\rNo instance-variables.\r!\r\r\r!Magnitude methodsFor: 'comparing'!\r< aMagnitude \r\t\"Answer whether the receiver is less than the argument.\"\r\r\t^self subclassResponsibility! !\r\r!Magnitude methodsFor: 'comparing'!\r<= aMagnitude \r\t\"Answer whether the receiver is less than or equal to the argument.\"\r\r\t^(self > aMagnitude) not! !\r\r!Magnitude methodsFor: 'comparing'!\r= aMagnitude \r\t\"Compare the receiver with the argument and answer with true if the \r\treceiver is equal to the argument. Otherwise answer false.\"\r\r\t^self subclassResponsibility! !\r\r!Magnitude methodsFor: 'comparing'!\r> aMagnitude \r\t\"Answer whether the receiver is greater than the argument.\"\r\r\t^aMagnitude < self! !\r\r!Magnitude methodsFor: 'comparing'!\r>= aMagnitude \r\t\"Answer whether the receiver is greater than or equal to the argument.\"\r\r\t^(self < aMagnitude) not! !\r\r!Magnitude methodsFor: 'comparing'!\rbetween: min and: max \r\t\"Answer whether the receiver is less than or equal to the argument, max, \r\tand greater than or equal to the argument, min.\"\r\r\t^self >= min and: [self <= max]! !\r\r!Magnitude methodsFor: 'comparing'!\rhash\r\t\"Hash must be redefined whenever = is redefined.\"\r\r\t^self subclassResponsibility! !\r\r!Magnitude methodsFor: 'comparing'!\rhashMappedBy: map\r\t\"My hash is independent of my oop.\"\r\r\t^self hash! !\r\r\r!Magnitude methodsFor: 'testing'!\rmax: aMagnitude \r\t\"Answer the receiver or the argument, whichever has the greater \r\tmagnitude.\"\r\r\tself > aMagnitude\r\t\tifTrue: [^self]\r\t\tifFalse: [^aMagnitude]! !\r\r!Magnitude methodsFor: 'testing'!\rmin: aMagnitude \r\t\"Answer the receiver or the argument, whichever has the lesser \r\tmagnitude.\"\r\r\tself < aMagnitude\r\t\tifTrue: [^self]\r\t\tifFalse: [^aMagnitude]! !\r\r!Magnitude methodsFor: 'testing'!\rmin: aMin max: aMax \r\r\t^ (self min: aMin) max: aMax! !\rCollection subclass: #Matrix\r\tinstanceVariableNames: 'nrows ncols contents'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Unordered'!\r!Matrix commentStamp: '<historical>' prior: 0!\rI represent a two-dimensional array, rather like Array2D.\rThere are three main differences between me and Array2D:\r(1) Array2D inherits from ArrayedCollection, but isn't one.  A lot of things that should work\r    do not work in consequence of this.\r(2) Array2D uses \"at: column at: row\" index order, which means that nothing you write using\r    it is likely to work either.  I use the almost universal \"at: row at: column\" order, so it is\r    much easier to adapt code from other languages without going doolally.\r(3) Array2D lets you specify the class of the underlying collection, I don't.\r\rStructure:\r  nrows : a non-negative integer saying how many rows there are.\r  ncols : a non-negative integer saying how many columns there are.\r  contents : an Array holding the elements in row-major order.  That is, for a 2x3 array\r    the contents are (11 12 13 21 22 23).  Array2D uses column major order.\r\r    You can specify the class of 'contents' when you create a new Array2D,\r    but Matrix always gives you an Array.\r\r    There is a reason for this.  In strongly typed languages like Haskell and Clean,\r    'unboxed arrays' save you both space AND time.  But in Squeak, while\r    WordArray and FloatArray and so on do save space, it costs time to use them.\r    A LOT of time.  I've measured aFloatArray sum running nearly twice as slow as\r    anArray sum.  The reason is that whenever you fetch an element from an Array,\r    that's all that happens, but when you fetch an element from aFloatArray, a whole\r    new Float gets allocated to hold the value.  This takes time and churns memory.\r    So the paradox is that if you want fast numerical stuff, DON'T use unboxed arrays!!\r\r    Another reason for always insisting on an Array is that letting it be something\r    else would make things like #, and #,, rather more complicated.  Always using Array\r    is the simplest thing that could possibly work, and it works rather well.\r\rI was trying to patch Array2D to make more things work, but just couldn't get my head\raround the subscript order.  That's why I made Matrix.\r\rElement-wise matrix arithmetic works; you can freely mix matrices and numbers but\rdon't try to mix matrices and arrays (yet).\rMatrix multiplication, using the symbol +* (derived from APL's +.x), works between\r(Matrix or Array) +* (Matrix or Array).  Don't try to use a number as an argument of +*.\rMatrix * Number and Number * Matrix work fine, so you don't need +* with numbers.\r\rStill to come: oodles of stuff.  Gaussian elimination maybe, other stuff probably not.\r!\r\r\r!Matrix methodsFor: 'accessing' stamp: 'raok 10/21/2002 22:37'!\ranyOne\r\t^contents anyOne! !\r\r!Matrix methodsFor: 'accessing' stamp: 'raok 10/21/2002 22:37'!\rat: row at: column\r\t^contents at: (self indexForRow: row andColumn: column)! !\r\r!Matrix methodsFor: 'accessing' stamp: 'raok 10/21/2002 22:40'!\rat: row at: column put: value\r\t^contents at: (self indexForRow: row andColumn: column) put: value! !\r\r!Matrix methodsFor: 'accessing' stamp: 'raok 10/21/2002 22:42'!\ratAllPut: value\r\tcontents atAllPut: value! !\r\r!Matrix methodsFor: 'accessing' stamp: 'raok 10/21/2002 22:43'!\ratRandom\r\t^contents atRandom\r! !\r\r!Matrix methodsFor: 'accessing' stamp: 'raok 10/21/2002 22:43'!\ratRandom: aGenerator\r\t^contents atRandom: aGenerator! !\r\r!Matrix methodsFor: 'accessing' stamp: 'raok 10/21/2002 22:44'!\rcolumnCount\r\t^ncols! !\r\r!Matrix methodsFor: 'accessing' stamp: 'raok 10/21/2002 22:48'!\ridentityIndexOf: anElement\r\t^self identityIndexOf: anElement ifAbsent: [0@0]\r! !\r\r!Matrix methodsFor: 'accessing' stamp: 'raok 10/21/2002 22:48'!\ridentityIndexOf: anElement ifAbsent: anExceptionBlock\r\t^self rowAndColumnForIndex:\r\t\t (contents identityIndexOf: anElement ifAbsent: [^anExceptionBlock value])\r! !\r\r!Matrix methodsFor: 'accessing' stamp: 'raok 11/22/2002 13:13'!\rindexOf: anElement\r\t\"If there are integers r, c such that (self at: r at: c) = anElement,\r\t answer some such r@c, otherwise answer 0@0.  This kind of perverse\r\t result is provided by analogy with SequenceableCollection>>indexOf:.\r\t The order in which the receiver are searched is UNSPECIFIED except\r\t that it is the same as the order used by #indexOf:ifAbsent: and #readStream.\"\r\r\t^self indexOf: anElement ifAbsent: [0@0]\r! !\r\r!Matrix methodsFor: 'accessing' stamp: 'raok 11/22/2002 13:10'!\rindexOf: anElement ifAbsent: anExceptionBlock\r\t\"If there are integers r, c such that (self at: r at: c) = anElement,\r\t answer some such r@c, otherwise answer the result of anExceptionBlock.\"\r\r\t^self rowAndColumnForIndex:\r\t\t (contents indexOf: anElement ifAbsent: [^anExceptionBlock value])\r! !\r\r!Matrix methodsFor: 'accessing' stamp: 'raok 10/21/2002 22:49'!\rreplaceAll: oldObject with: newObject\r\tcontents replaceAll: oldObject with: newObject! !\r\r!Matrix methodsFor: 'accessing' stamp: 'raok 10/21/2002 22:44'!\rrowCount\r\t^nrows! !\r\r!Matrix methodsFor: 'accessing' stamp: 'raok 10/21/2002 22:49'!\rsize\r\t^contents size! !\r\r\r!Matrix methodsFor: 'accessing rows/columns' stamp: 'raok 10/21/2002 23:32'!\ratRow: row\r\t(row between: 1 and: nrows)\r\t\tifFalse: [self error: '1st subscript out of range'].\r\t^contents copyFrom: (row-1)*ncols+1 to: row*ncols! !\r\r!Matrix methodsFor: 'accessing rows/columns' stamp: 'raok 11/22/2002 12:42'!\ratRow: row put: aCollection\r\t|p|\r\r\taCollection size = ncols ifFalse: [self error: 'wrong row size'].\r\tp _ (self indexForRow: row andColumn: 1)-1.\r\taCollection do: [:each | contents at: (p _ p+1) put: each].\r\t^aCollection! !\r\r!Matrix methodsFor: 'accessing rows/columns' stamp: 'raok 10/22/2002 00:13'!\rtransposed\r\tself assert: [nrows = ncols].\r\t^self indicesCollect: [:row :column | self at: column at: row]! !\r\r\r!Matrix methodsFor: 'adding' stamp: 'raok 10/21/2002 22:53'!\radd: newObject\r\tself shouldNotImplement! !\r\r\r!Matrix methodsFor: 'arithmetic' stamp: 'raok 10/22/2002 20:01'!\r+* aCollection\r\t\"Premultiply aCollection by self.  aCollection should be an Array or Matrix.\r\t The name of this method is APL's +.x squished into Smalltalk syntax.\"\r\r\t^aCollection preMultiplyByMatrix: self\r! !\r\r!Matrix methodsFor: 'arithmetic' stamp: 'raok 11/28/2002 14:22'!\rpreMultiplyByArray: a\r\t\"Answer a +* self where a is an Array.\"\r\r\tnrows = 1 ifFalse: [self error: 'dimensions do not conform'].\r\t^Matrix rows: a size columns: ncols tabulate: [:row :col |\r\t\t(a at: row) * (contents at: col)]\r! !\r\r!Matrix methodsFor: 'arithmetic' stamp: 'raok 10/22/2002 20:02'!\rpreMultiplyByMatrix: m\r\t\"Answer m +* self where m is a Matrix.\"\r\t|s|\r\r\tnrows = m columnCount ifFalse: [self error: 'dimensions do not conform'].\r\t^Matrix rows: m rowCount columns: ncols tabulate: [:row :col |\r\t\ts _ 0.\r\t\t1 to: nrows do: [:k | s _ (m at: row at: k) * (self at: k at: col) + s].\r\t\ts]! !\r\r\r!Matrix methodsFor: 'comparing' stamp: 'raok 11/22/2002 12:58'!\r= aMatrix\r\t^aMatrix class == self class and: [\r\t aMatrix rowCount = nrows and: [\r\t aMatrix columnCount = ncols and: [\r\t aMatrix privateContents = contents]]]! !\r\r!Matrix methodsFor: 'comparing' stamp: 'raok 11/22/2002 13:14'!\rhash\r\t\"I'm really not sure what would be a good hash function here.\r\t The essential thing is that it must be compatible with #=, and\r\t this satisfies that requirement.\"\r\r\t^contents hash! !\r\r\r!Matrix methodsFor: 'converting' stamp: 'raok 10/21/2002 22:57'!\rasArray\r\t^contents shallowCopy! !\r\r!Matrix methodsFor: 'converting' stamp: 'raok 10/21/2002 22:57'!\rasBag\r\t^contents asBag! !\r\r!Matrix methodsFor: 'converting' stamp: 'raok 10/21/2002 22:58'!\rasByteArray\r\t^contents asByteArray! !\r\r!Matrix methodsFor: 'converting' stamp: 'raok 10/21/2002 22:58'!\rasCharacterSet\r\t^contents asCharacterSet! !\r\r!Matrix methodsFor: 'converting' stamp: 'raok 10/21/2002 23:00'!\rasFloatArray\r\t^contents asFloatArray! !\r\r!Matrix methodsFor: 'converting' stamp: 'raok 10/21/2002 22:58'!\rasIdentitySet\r\t^contents asIdentitySet! !\r\r!Matrix methodsFor: 'converting' stamp: 'raok 10/21/2002 23:00'!\rasIntegerArray\r\t^contents asIntegerArray! !\r\r!Matrix methodsFor: 'converting' stamp: 'raok 10/21/2002 22:58'!\rasOrderedCollection\r\t^contents asOrderedCollection! !\r\r!Matrix methodsFor: 'converting' stamp: 'raok 10/21/2002 22:58'!\rasSet\r\t^contents asSet! !\r\r!Matrix methodsFor: 'converting' stamp: 'raok 10/21/2002 22:58'!\rasSortedArray\r\t^contents asSortedArray! !\r\r!Matrix methodsFor: 'converting' stamp: 'raok 10/21/2002 22:59'!\rasSortedCollection\r\t^contents asSortedCollection! !\r\r!Matrix methodsFor: 'converting' stamp: 'raok 10/21/2002 22:59'!\rasSortedCollection: aBlock\r\t^contents asSortedCollection: aBlock! !\r\r!Matrix methodsFor: 'converting' stamp: 'raok 10/21/2002 23:00'!\rasWordArray\r\t^contents asWordArray! !\r\r!Matrix methodsFor: 'converting' stamp: 'raok 11/22/2002 13:02'!\rreadStream\r\t\"Answer a ReadStream that returns all the elements of the receiver\r\t in some UNSPECIFIED order.\"\r\r\t^ReadStream on: contents! !\r\r\r!Matrix methodsFor: 'copying' stamp: 'raok 11/22/2002 12:57'!\r, aMatrix\r\t\"Answer a new matrix having the same number of rows as the receiver and aMatrix,\r\t its columns being the columns of the receiver followed by the columns of aMatrix.\"\r\t|newCont newCols anArray oldCols a b c|\r\r\tself assert: [nrows = aMatrix rowCount].\r\tnewCont _ Array new: self size + aMatrix size.\r\tanArray _ aMatrix privateContents.\r\toldCols _ aMatrix columnCount.\r\tnewCols _ ncols + oldCols.\r\ta _ b _ c _ 1.\r\t1 to: nrows do: [:r |\r\t\tnewCont replaceFrom: a to: a+ncols-1 with: contents startingAt: b.\r\t\tnewCont replaceFrom: a+ncols to: a+newCols-1 with: anArray startingAt: c.\r\t\ta _ a + newCols.\r\t\tb _ b + ncols.\r\t\tc _ c + oldCols].\r\t^self class rows: nrows columns: newCols contents: newCont\r\t\t\r! !\r\r!Matrix methodsFor: 'copying' stamp: 'raok 10/21/2002 23:07'!\rcopy\r\t^self class rows: nrows columns: ncols contents: contents copy! !\r\r!Matrix methodsFor: 'copying' stamp: 'raok 10/21/2002 23:07'!\rshallowCopy\r\t^self class rows: nrows columns: ncols contents: contents shallowCopy! !\r\r!Matrix methodsFor: 'copying' stamp: 'raok 10/21/2002 23:27'!\rshuffled\r\t^self class rows: nrows columns: ncols contents: (contents shuffled)! !\r\r!Matrix methodsFor: 'copying' stamp: 'raok 10/21/2002 23:27'!\rshuffledBy: aRandom\r\t^self class rows: nrows columns: ncols contents: (contents shuffledBy: aRandom)! !\r\r\r!Matrix methodsFor: 'enumerating' stamp: 'raok 10/21/2002 23:41'!\rcollect: aBlock\r\t\"Answer a new matrix with transformed elements; transformations should be independent.\"\r\r\t^self class rows: nrows columns: ncols contents: (contents collect: aBlock)! !\r\r!Matrix methodsFor: 'enumerating' stamp: 'raok 10/21/2002 23:42'!\rdifference: aCollection\r\t\"Union is in because the result is always a Set.\r\t Difference and intersection are out because the result is like the receiver,\r\t and with irregular seleection that cannot be.\"\r\tself shouldNotImplement! !\r\r!Matrix methodsFor: 'enumerating' stamp: 'raok 10/21/2002 23:40'!\rdo: aBlock\r\t\"Pass elements to aBlock one at a time in row-major order.\"\r\tcontents do: aBlock! !\r\r!Matrix methodsFor: 'enumerating' stamp: 'raok 10/23/2002 20:57'!\rindicesCollect: aBlock\r\t|r i|\r\r\tr _ Array new: nrows * ncols.\r\ti _ 0.\r\t1 to: nrows do: [:row |\r\t\t1 to: ncols do: [:column |\r\t\t\tr at: (i _ i+1) put: (aBlock value: row value: column)]].\r\t^self class rows: nrows columns: ncols contents: r! !\r\r!Matrix methodsFor: 'enumerating' stamp: 'raok 10/21/2002 23:42'!\rintersection: aCollection\r\t\"Union is in because the result is always a Set.\r\t Difference and intersection are out because the result is like the receiver,\r\t and with irregular seleection that cannot be.\"\r\tself shouldNotImplement! !\r\r!Matrix methodsFor: 'enumerating' stamp: 'raok 10/21/2002 23:42'!\rreject: aBlock\r\tself shouldNotImplement! !\r\r!Matrix methodsFor: 'enumerating' stamp: 'raok 10/21/2002 23:42'!\rselect: aBlock\r\tself shouldNotImplement! !\r\r!Matrix methodsFor: 'enumerating' stamp: 'raok 10/22/2002 00:15'!\rwith: aCollection collect: aBlock\r\t\"aCollection must support #at:at: and be at least as large as the receiver.\"\r\r\t^self withIndicesCollect: [:each :row :column |\r\t\taBlock value: each value: (aCollection at: row at: column)]\r! !\r\r!Matrix methodsFor: 'enumerating' stamp: 'raok 10/21/2002 23:53'!\rwith: aCollection do: aBlock\r\t\"aCollection must support #at:at: and be at least as large as the receiver.\"\r\r\tself withIndicesDo: [:each :row :column |\r\t\taBlock value: each value: (aCollection at: row at: column)].\r! !\r\r!Matrix methodsFor: 'enumerating' stamp: 'raok 10/21/2002 23:52'!\rwithIndicesCollect: aBlock\r\t|i r|\r\r\ti _ 0.\r\tr _ contents shallowCopy.\r\t1 to: nrows do: [:row |\r\t\t1 to: ncols do: [:column |\r\t\t\ti _ i+1.\r\t\t\tr at: i put: (aBlock value: (r at: i) value: row value: column)]].\r\t^self class rows: nrows columns: ncols contents: r\r! !\r\r!Matrix methodsFor: 'enumerating' stamp: 'raok 10/21/2002 23:52'!\rwithIndicesDo: aBlock\r\t|i|\r\r\ti _ 0.\r\t1 to: nrows do: [:row |\r\t\t1 to: ncols do: [:column |\r\t\t\taBlock value: (contents at: (i _ i+1)) value: row value: column]].\r! !\r\r\r!Matrix methodsFor: 'printing' stamp: 'raok 10/21/2002 23:22'!\rstoreOn: aStream\r\taStream nextPut: $(; nextPutAll: self class name;\r\t\tnextPutAll: ' rows: '; store: nrows;\r\t\tnextPutAll: ' columns: '; store: ncols;\r\t\tnextPutAll: ' contents: '; store: contents;\r\t\tnextPut: $)! !\r\r\r!Matrix methodsFor: 'removing' stamp: 'raok 10/21/2002 22:54'!\rremove: anObject ifAbsent: anExceptionBlock\r\tself shouldNotImplement! !\r\r\r!Matrix methodsFor: 'testing' stamp: 'raok 10/21/2002 23:24'!\ridentityIncludes: anObject\r\t^contents identityIncludes: anObject! !\r\r!Matrix methodsFor: 'testing' stamp: 'raok 10/21/2002 23:23'!\rincludes: anObject\r\t^contents includes: anObject! !\r\r!Matrix methodsFor: 'testing' stamp: 'raok 10/21/2002 23:24'!\rincludesAllOf: aCollection\r\t^contents includesAllOf: aCollection! !\r\r!Matrix methodsFor: 'testing' stamp: 'raok 10/21/2002 23:24'!\rincludesAnyOf: aCollection\r\t^contents includesAnyOf: aCollection! !\r\r!Matrix methodsFor: 'testing' stamp: 'raok 11/22/2002 13:03'!\risSequenceable\r\t\"LIE so that arithmetic on matrices will work.\r\t What matters for arithmetic is not that there should be random indexing\r\t but that the structure should be stable and independent of the values of\r\t the elements.  #isSequenceable is simply the wrong question to ask.\"\r\t^true! !\r\r!Matrix methodsFor: 'testing' stamp: 'raok 10/21/2002 23:25'!\roccurrencesOf: anObject\r\t^contents occurrencesOf: anObject! !\r\r\r!Matrix methodsFor: 'private' stamp: 'raok 10/21/2002 22:40'!\rindexForRow: row andColumn: column\r\t(row between: 1 and: nrows)\r\t\tifFalse: [self error: '1st subscript out of range'].\r\t(column between: 1 and: ncols)\r\t\tifFalse: [self error: '2nd subscript out of range'].\r\t^(row-1) * ncols + column! !\r\r!Matrix methodsFor: 'private' stamp: 'raok 11/22/2002 12:56'!\rprivateContents\r\t\"Only used in #, #,, and #= so far.\r\t It used to be called #contents, but that clashes with Collection>>contents.\"\r\r\t^contents! !\r\r!Matrix methodsFor: 'private' stamp: 'raok 10/21/2002 22:47'!\rrowAndColumnForIndex: index\r\t|t|\r\r\tt _ index - 1.\r\t^(t // ncols + 1)@(t \\\\ ncols + 1)! !\r\r!Matrix methodsFor: 'private' stamp: 'raok 10/21/2002 23:05'!\rrows: rows columns: columns contents: anArray\r\tself assert: [rows isInteger and: [rows >= 0]].\r\tself assert: [columns isInteger and: [columns >= 0]].\r\tself assert: [rows * columns = anArray size].\r\tnrows _ rows.\r\tncols _ columns.\r\tcontents _ anArray.\r\t^self! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rMatrix class\r\tinstanceVariableNames: ''!\r\r!Matrix class methodsFor: 'instance creation' stamp: 'raok 10/22/2002 00:06'!\rnew: dim\r\t\"Answer a dim*dim matrix.  Is this an abuse of #new:?  The argument is NOT a size.\"\r\t^self rows: dim columns: dim! !\r\r!Matrix class methodsFor: 'instance creation' stamp: 'raok 10/22/2002 00:04'!\rrows: rows columns: columns\r\t^self rows: rows columns: columns contents: (Array new: rows*columns)! !\r\r!Matrix class methodsFor: 'instance creation' stamp: 'raok 10/22/2002 19:51'!\rrows: rows columns: columns tabulate: aBlock\r\t\"Answer a new Matrix of the given dimensions where\r\t result at: i at: j     is   aBlock value: i value: j\"\r\t|a i|\r\r\ta _ Array new: rows*columns.\r\ti _ 0.\r\t1 to: rows do: [:row |\r\t\t1 to: columns do: [:column |\r\t\t\ta at: (i _ i+1) put: (aBlock value: row value: column)]].\r\t^self rows: rows columns: columns contents: a\r! !\r\r\r!Matrix class methodsFor: 'private' stamp: 'raok 10/21/2002 23:06'!\rrows: rows columns: columns contents: contents\r\t^self new rows: rows columns: columns contents: contents! !\rObject subclass: #Message\r\tinstanceVariableNames: 'selector args lookupClass'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Methods'!\r!Message commentStamp: '<historical>' prior: 0!\rI represent a selector and its argument values.\r\t\rGenerally, the system does not use instances of Message for efficiency reasons. However, when a message is not understood by its receiver, the interpreter will make up an instance of me in order to capture the information involved in an actual message transmission. This instance is sent it as an argument with the message doesNotUnderstand: to the receiver.!\r\r\r!Message methodsFor: 'accessing'!\rargument\r\t\"Answer the first (presumably sole) argument\"\r\r\t^args at: 1! !\r\r!Message methodsFor: 'accessing'!\rargument: newValue\r\t\"Change the first argument to newValue and answer self\"\r\r\targs at: 1 put: newValue! !\r\r!Message methodsFor: 'accessing'!\rarguments\r\t\"Answer the arguments of the receiver.\"\r\r\t^args! !\r\r!Message methodsFor: 'accessing' stamp: 'ajh 10/9/2001 16:32'!\rlookupClass\r\r\t^ lookupClass! !\r\r!Message methodsFor: 'accessing'!\rselector\r\t\"Answer the selector of the receiver.\"\r\r\t^selector! !\r\r!Message methodsFor: 'accessing'!\rsends: aSelector\r\t\"answer whether this message's selector is aSelector\"\r\r\t^selector == aSelector! !\r\r\r!Message methodsFor: 'printing' stamp: 'ajh 10/9/2001 15:31'!\rprintOn: stream\r\r\targs isEmpty ifTrue: [^ stream nextPutAll: selector].\r\targs with: selector keywords do: [:arg :word |\r\t\tstream nextPutAll: word.\r\t\tstream space.\r\t\targ printOn: stream.\r\t\tstream space.\r\t].\r\tstream skip: -1.\r! !\r\r!Message methodsFor: 'printing' stamp: 'sma 6/1/2000 10:01'!\rstoreOn: aStream \r\t\"Refer to the comment in Object|storeOn:.\"\r\r\taStream nextPut: $(;\r\t nextPutAll: self class name;\r\t nextPutAll: ' selector: ';\r\t store: selector;\r\t nextPutAll: ' arguments: ';\r\t store: args;\r\t nextPut: $)! !\r\r\r!Message methodsFor: 'private' stamp: 'ajh 3/9/2003 19:25'!\rsetSelector: aSymbol\r\r\tselector _ aSymbol.\r! !\r\r!Message methodsFor: 'private'!\rsetSelector: aSymbol arguments: anArray\r\r\tselector _ aSymbol.\r\targs _ anArray! !\r\r\r!Message methodsFor: 'sending' stamp: 'di 3/25/1999 21:54'!\rsentTo: receiver\r\t\"answer the result of sending this message to receiver\"\r\r\tlookupClass == nil\r\t\tifTrue: [^ receiver perform: selector withArguments: args]\r\t\tifFalse: [^ receiver perform: selector withArguments: args inSuperclass: lookupClass]! !\r\r\r!Message methodsFor: 'stub creation' stamp: 'ads 7/21/2003 17:33'!\rcreateStubMethod\r\t| argNames aOrAn argName arg argClassName |\r\targNames _ Set new.\r\t^ String streamContents: [ :s |\r\t\tself selector keywords doWithIndex: [ :key :i |\r\t\t\ts nextPutAll: key.\r\t\t\t((key last = $:) or: [self selector isInfix]) ifTrue: [\r\t\t\t\targ _ self arguments at: i.\r\t\t\t\targClassName _ (arg isKindOf: Class) ifTrue: ['Class'] ifFalse: [arg class name].\r\t\t\t\taOrAn _ argClassName first isVowel ifTrue: ['an'] ifFalse: ['a'].\r\t\t\t\targName _ aOrAn, argClassName.\r\t\t\t\t[argNames includes: argName] whileTrue: [argName _ argName, i asString].\r\t\t\t\targNames add: argName.\r\t\t\t\ts nextPutAll: ' '; nextPutAll: argName; space\r\t\t\t].\r\t\t].\r\t\ts cr; tab.\r\t\ts nextPutAll: 'self shouldBeImplemented'\r\t]! !\r\r\r!Message methodsFor: 'as yet unclassified' stamp: 'md 11/14/2003 17:37'!\rpushReceiver! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rMessage class\r\tinstanceVariableNames: ''!\r\r!Message class methodsFor: 'instance creation'!\rselector: aSymbol\r\t\"Answer an instance of me with unary selector, aSymbol.\"\r\r\t^self new setSelector: aSymbol arguments: (Array new: 0)! !\r\r!Message class methodsFor: 'instance creation'!\rselector: aSymbol argument: anObject \r\t\"Answer an instance of me whose selector is aSymbol and single \r\targument is anObject.\"\r\r\t^self new setSelector: aSymbol arguments: (Array with: anObject)! !\r\r!Message class methodsFor: 'instance creation'!\rselector: aSymbol arguments: anArray \r\t\"Answer an instance of me with selector, aSymbol, and arguments, \r\tanArray.\"\r\r\t^self new setSelector: aSymbol arguments: anArray! !\rMessageNode subclass: #MessageAsTempNode\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Compiler'!\r!MessageAsTempNode commentStamp: '<historical>' prior: 0!\rThis node represents accesses to temporary variables for do-its in the debugger.  Since they execute in another context, they must send a message to the original context to access the value of the temporary variable in that context.!\r\r\r!MessageAsTempNode methodsFor: 'access to remote temps' stamp: 'di 3/22/1999 09:38'!\rasStorableNode: encoder\r\t\"This node is a message masquerading as a temporary variable.\r\tIt currently has the form {homeContext tempAt: offset}.\r\tWe need to generate code for {expr storeAt: offset inTempFrame: homeContext},\r\twhere the expr, the block argument, is already on the stack.\r\tThis, in turn will get turned into {homeContext tempAt: offset put: expr}\r\tat runtime if nobody disturbs storeAt:inTempFrame: in Object (not clean)\"\r\t^ MessageAsTempNode new\r\t\treceiver: nil  \"suppress code generation for reciever already on stack\"\r\t\tselector: #storeAt:inTempFrame:\r\t\targuments: (arguments copyWith: receiver)\r\t\tprecedence: precedence\r\t\tfrom: encoder! !\r\r!MessageAsTempNode methodsFor: 'access to remote temps' stamp: 'di 10/12/1999 17:29'!\rcode\r\t\"Allow synthetic temp nodes to be sorted by code\"\r\t^ arguments first literalValue! !\r\r!MessageAsTempNode methodsFor: 'access to remote temps' stamp: 'di 3/22/1999 09:39'!\remitStorePop: stack on: codeStream\r\t\"This node has the form {expr storeAt: offset inTempFrame: homeContext},\r\twhere the expr, the block argument, is already on the stack.\"\r\t^ self emitForEffect: stack on: codeStream! !\r\r!MessageAsTempNode methodsFor: 'access to remote temps' stamp: 'di 3/22/1999 09:35'!\risTemp\r\t\"Masquerading for debugger access to temps.\"\r\t^ true! !\r\r!MessageAsTempNode methodsFor: 'access to remote temps' stamp: 'di 3/22/1999 09:39'!\rnowHasDef\r\t\"For compatibility with temp scope protocol\"\r! !\r\r!MessageAsTempNode methodsFor: 'access to remote temps' stamp: 'di 3/22/1999 09:39'!\rnowHasRef\r\t\"For compatibility with temp scope protocol\"\r! !\r\r!MessageAsTempNode methodsFor: 'access to remote temps' stamp: 'di 3/22/1999 09:39'!\rscope\r\t\"For compatibility with temp scope protocol\"\r\t^ -1! !\r\r!MessageAsTempNode methodsFor: 'access to remote temps' stamp: 'di 3/22/1999 09:39'!\rscope: ignored\r\t\"For compatibility with temp scope protocol\"\r! !\r\r!MessageAsTempNode methodsFor: 'access to remote temps' stamp: 'di 3/22/1999 09:39'!\rsizeForStorePop: encoder\r\t\"This node has the form {expr storeAt: offset inTempFrame: homeContext},\r\twhere the expr, the block argument, is already on the stack.\"\r\t^ self sizeForEffect: encoder! !\r\r!MessageAsTempNode methodsFor: 'access to remote temps' stamp: 'di 3/22/1999 09:40'!\rstore: expr from: encoder \r\t\"ctxt tempAt: n -> ctxt tempAt: n put: expr (see Assignment).\r\tFor assigning into temps of a context being debugged.\"\r\r\tselector key ~= #tempAt: \r\t\tifTrue: [^self error: 'cant transform this message'].\r\t^ MessageAsTempNode new\r\t\treceiver: receiver\r\t\tselector: #tempAt:put:\r\t\targuments: (arguments copyWith: expr)\r\t\tprecedence: precedence\r\t\tfrom: encoder! !\rProtoObject subclass: #MessageCatcher\r\tinstanceVariableNames: 'echoToTranscript'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Contexts'!\r!MessageCatcher commentStamp: '<historical>' prior: 0!\rAny message sent to me is returned as a Message object.\r\r\"Message catcher\" creates an instance of me.\r!\r\r\r!MessageCatcher methodsFor: 'as yet unclassified' stamp: 'ajh 9/26/2002 12:24'!\rdoesNotUnderstand: aMessage\r\r\techoToTranscript == true ifTrue: [Transcript show: aMessage printString; cr].\r\t^ aMessage! !\rMessageSet subclass: #MessageNames\r\tinstanceVariableNames: 'searchString selectorList selectorListIndex'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Browser'!\r\r!MessageNames methodsFor: 'search' stamp: 'sd 4/20/2003 14:28'!\rcomputeSelectorListFromSearchString\r\t\"Compute selector list from search string\"\r\t| raw sorted |\r\tsearchString _ searchString asString copyWithout: $ .\r\tselectorList _ Cursor wait\r\t\t\t\tshowWhile: [raw _ Symbol selectorsContaining: searchString.\r\t\t\t\t\tsorted _ raw as: SortedCollection.\r\t\t\t\t\tsorted\r\t\t\t\t\t\tsortBlock: [:x :y | x asLowercase <= y asLowercase].\r\t\t\t\t\tsorted asArray].\r\tselectorList size > 19\r\t\tifFalse: [\"else the following filtering is considered too expensive. This 19  \r\t\t\tshould be a system-maintained Parameter, someday\"\r\t\t\tselectorList _ self systemNavigation allSelectorsWithAnyImplementorsIn: selectorList].\r\t^ selectorList! !\r\r!MessageNames methodsFor: 'search' stamp: 'sw 7/28/2001 00:32'!\rdoSearchFrom: aPane\r\t\"The user hit the Search button -- treat it as a synonym for the user having hit the Return or Enter (or cmd-s) in the type-in pane\"\r\r\taPane accept.\r\taPane selectAll! !\r\r!MessageNames methodsFor: 'search' stamp: 'sw 7/28/2001 00:43'!\rsearchString\r\t\"Answer the current searchString, initializing it if need be\"\r\r\t| pane |\r\tsearchString isEmptyOrNil ifTrue:\r\t\t[searchString _ 'type here, then hit Search'.\r\t\tpane _ self containingWindow findDeepSubmorphThat:\r\t\t\t[:m | m knownName = 'Search'] ifAbsent: [\"this happens during window creation\" ^ searchString].\r\t\t\tpane setText: searchString.\r\t\t\tpane setTextMorphToSelectAllOnMouseEnter.\r\t\t\tpane selectAll].\r\t^ searchString! !\r\r!MessageNames methodsFor: 'search' stamp: 'sw 7/28/2001 02:18'!\rsearchString: aString notifying: aController\r\t\"Take what the user typed and find all selectors containing it\"\r\r\tsearchString _ aString asString copyWithout: $ .\r\tself containingWindow setLabel: 'Message names containing \"', searchString asLowercase, '\"'.\r\tselectorList _ nil.\r\tself changed: #selectorList.\r\tself changed: #messageList.\r\t^ true! !\r\r!MessageNames methodsFor: 'search' stamp: 'sd 4/20/2003 14:28'!\rshowOnlyImplementedSelectors\r\t\"Caution -- can be slow!! Filter my selector list down such that it only  \r\tshows selectors that are actually implemented somewhere in the system.\"\r\tself okToChange\r\t\tifTrue: [Cursor wait\r\t\t\t\tshowWhile: [selectorList _ self systemNavigation allSelectorsWithAnyImplementorsIn: selectorList.\r\t\t\t\t\tself changed: #selectorList.\r\t\t\t\t\tself changed: #messageList]]! !\r\r\r!MessageNames methodsFor: 'selection' stamp: 'sw 7/24/2001 01:46'!\rselection\r\t\"Answer the item in the list that is currently selected, or nil if no selection is present\"\r\r\t^ self messageList at: messageListIndex ifAbsent: [nil]! !\r\r\r!MessageNames methodsFor: 'selector list' stamp: 'sd 4/19/2003 12:12'!\rmessageList\r\t\"Answer the receiver's message list, computing it if necessary. The way \r\tto force a recomputation is to set the messageList to nil\"\r\tmessageList\r\t\tifNil: [messageList _ selectorListIndex == 0\r\t\t\t\t\t\tifTrue: [#()]\r\t\t\t\t\t\tifFalse: [self systemNavigation\r\t\t\t\t\t\t\t\tallImplementorsOf: (selectorList at: selectorListIndex)].\r\t\t\tself\r\t\t\t\tmessageListIndex: (messageList size > 0\r\t\t\t\t\t\tifTrue: [1]\r\t\t\t\t\t\tifFalse: [0])].\r\t^ messageList! !\r\r!MessageNames methodsFor: 'selector list' stamp: 'sw 7/24/2001 01:46'!\rselectorList\r\t\"Answer the selectorList\"\r\r\tselectorList ifNil:\r\t\t[self computeSelectorListFromSearchString.\r\t\tselectorListIndex _  selectorList size > 0\r\t\t\tifTrue:\t[1]\r\t\t\tifFalse: [0].\r\t\tmessageList _ nil].\r\t^ selectorList! !\r\r!MessageNames methodsFor: 'selector list' stamp: 'sw 7/24/2001 01:55'!\rselectorListIndex\r\t\"Answer the selectorListIndex\"\r\r\t^ selectorListIndex! !\r\r!MessageNames methodsFor: 'selector list' stamp: 'sw 7/24/2001 01:59'!\rselectorListIndex: anInteger \r\t\"Set the selectorListIndex as specified, and propagate consequences\"\r\r\tselectorListIndex _ anInteger.\r\tselectorListIndex = 0\r\t\tifTrue: [^ self].\r\tmessageList _ nil.\r\tself changed: #selectorListIndex.\r\tself changed: #messageList! !\r\r!MessageNames methodsFor: 'selector list' stamp: 'sw 7/24/2001 01:58'!\rselectorListMenu: aMenu\r\t\"Answer the menu associated with the selectorList\"\r\r\taMenu addList: #(\r\t\t('senders (n)'\t\t\t\tbrowseSenders\t\t'browse senders of the chosen selector')\r\t\t('copy selector to clipboard'\tcopyName\t\t\t'copy the chosen selector to the clipboard, for subsequent pasting elsewhere')\r\t\t-\r\t\t('show only implemented selectors'\tshowOnlyImplementedSelectors\t\t'remove from the selector-list all symbols that do not represent implemented methods')).\r\r\t^ aMenu! !\r\r!MessageNames methodsFor: 'selector list' stamp: 'sw 7/24/2001 01:47'!\rselectorListMenuTitle\r\t\"Answer the title to supply for the menu belonging to the selector-list pane\"\r\r\t^ 'Click on any item in the list\rto see all implementors of it'! !\r\r\r!MessageNames methodsFor: 'initialization' stamp: 'sw 7/24/2001 01:35'!\rselectorListKey: aChar from: view\r\t\"Respond to a Command key in the message-list pane.\"\r\r\taChar == $n ifTrue: [^ self browseSenders].\r\taChar == $c ifTrue: [^ self copyName].\r\taChar == $b ifTrue: [^ self browseMethodFull].\r! !\r\r\r!MessageNames methodsFor: 'message list menu' stamp: 'sw 8/15/2002 17:24'!\rcopyName\r\t\"Copy the current selector to the clipboard\"\r\r\t| selector |\r\t(selector _ self selectorList at: selectorListIndex ifAbsent: [nil]) ifNotNil:\r\t\t[Clipboard clipboardText: selector asString asText]! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rMessageNames class\r\tinstanceVariableNames: ''!\r\r!MessageNames class methodsFor: 'instance creation' stamp: 'sw 7/28/2001 00:56'!\rprototypicalToolWindow\r\t\"Answer an example of myself seen in a tool window, for the benefit of parts-launching tools\"\r\r\t^ self methodBrowserSearchingFor: nil! !\r\r\r\r!MessageNames class methodsFor: 'class initialization' stamp: 'asm 4/10/2003 12:53'!\rinitialize\r\r\tself registerInFlapsRegistry.\t! !\r\r!MessageNames class methodsFor: 'class initialization' stamp: 'asm 4/10/2003 12:53'!\rregisterInFlapsRegistry\r\t\"Register the receiver in the system's flaps registry\"\r\tself environment\r\t\tat: #Flaps\r\t\tifPresent: [:cl | cl registerQuad: #(MessageNames\t\t\tprototypicalToolWindow\t\t'Message Names'\t\t'A tool for finding, viewing, and editing all methods whose names contain a given character sequence.')\r\t\t\t\t\t\tforFlapNamed: 'Tools']! !\r\r!MessageNames class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 12:37'!\runload\r\t\"Unload the receiver from global registries\"\r\r\tself environment at: #FileList ifPresent: [:cl |\r\tcl unregisterFileReader: self].\r\tself environment at: #Flaps ifPresent: [:cl |\r\tcl unregisterQuadsWithReceiver: self] ! !\rParseNode subclass: #MessageNode\r\tinstanceVariableNames: 'receiver selector precedence special arguments sizes equalNode caseErrorNode'\r\tclassVariableNames: 'MacroEmitters MacroPrinters MacroSelectors MacroSizers MacroTransformers StdTypers ThenFlag'\r\tpoolDictionaries: ''\r\tcategory: 'System-Compiler'!\r!MessageNode commentStamp: '<historical>' prior: 0!\rI represent a receiver and its message.\r\t\rPrecedence codes:\r\t1 unary\r\t2 binary\r\t3 keyword\r\t4 other\r\t\rIf special>0, I compile special code in-line instead of sending messages with literal methods as remotely copied contexts.!\r\r\r!MessageNode methodsFor: 'initialize-release' stamp: 'di 6/6/2000 23:24'!\rreceiver: rcvr selector: selNode arguments: args precedence: p \r\t\"Decompile.\"\r\r\tself receiver: rcvr\r\t\targuments: args\r\t\tprecedence: p.\r\tself noteSpecialSelector: selNode key.\r\tselector _ selNode.\r\t\"self pvtCheckForPvtSelector: encoder\"\r\t\"We could test code being decompiled, but the compiler should've checked already. And where to send the complaint?\"! !\r\r!MessageNode methodsFor: 'initialize-release' stamp: 'di 6/6/2000 23:27'!\rreceiver: rcvr selector: aSelector arguments: args precedence: p from: encoder \r\t\"Compile.\"\r\r\t| theSelector |\r\tself receiver: rcvr\r\t\targuments: args\r\t\tprecedence: p.\r\taSelector = #:Repeat:do:\r\t\tifTrue: [theSelector _ #do:]\r\t\tifFalse: [theSelector _ aSelector].\r\tself noteSpecialSelector: theSelector.\r\t(self transform: encoder)\r\t\tifTrue: \r\t\t\t[selector isNil\r\t\t\t\tifTrue: [selector _ SelectorNode new \r\t\t\t\t\t\t\tkey: (MacroSelectors at: special)\r\t\t\t\t\t\t\tcode: #macro]]\r\t\tifFalse: \r\t\t\t[selector _ encoder encodeSelector: theSelector.\r\t\t\trcvr == NodeSuper ifTrue: [encoder noteSuper]].\r\tself pvtCheckForPvtSelector: encoder! !\r\r!MessageNode methodsFor: 'initialize-release'!\rreceiver: rcvr selector: selName arguments: args precedence: p from: encoder sourceRange: range \r\t\"Compile.\"\r\r\tencoder noteSourceRange: range forNode: self.\r\t^self\r\t\treceiver: rcvr\r\t\tselector: selName\r\t\targuments: args\r\t\tprecedence: p\r\t\tfrom: encoder! !\r\r!MessageNode methodsFor: 'initialize-release' stamp: 'tk 10/26/2000 15:37'!\rselector: sel\r\tselector _ sel! !\r\r\r!MessageNode methodsFor: 'testing'!\rcanCascade\r\r\t^(receiver == NodeSuper or: [special > 0]) not! !\r\r!MessageNode methodsFor: 'testing'!\risComplex\r\t\r\t^(special between: 1 and: 10) or: [arguments size > 2 or: [receiver isComplex]]! !\r\r!MessageNode methodsFor: 'testing'!\risMessage: selSymbol receiver: rcvrPred arguments: argsPred\r\t\"Answer whether selector is selSymbol, and the predicates rcvrPred and argsPred\r\t evaluate to true with respect to receiver and the list of arguments.  If selSymbol or\r\t either predicate is nil, it means 'don't care'.  Note that argsPred takes numArgs\r\t arguments.  All block arguments are ParseNodes.\"\r\r\t^(selSymbol isNil or: [selSymbol==selector key]) and:\r\t\t[(rcvrPred isNil or: [rcvrPred value: receiver]) and:\r\t\t\t[(argsPred isNil or: [argsPred valueWithArguments: arguments])]]! !\r\r!MessageNode methodsFor: 'testing'!\risReturningIf\r\r\t^(special between: 3 and: 4)\r\t\tand: [arguments first returns and: [arguments last returns]]! !\r\r!MessageNode methodsFor: 'testing'!\rtoDoIncrement: variable\r\t(receiver = variable and: [selector key = #+]) \r\t\tifFalse: [^ nil].\r\targuments first isConstantNumber\r\t\tifTrue: [^ arguments first]\r\t\tifFalse: [^ nil]! !\r\r!MessageNode methodsFor: 'testing'!\rtoDoLimit: variable\r\t(receiver = variable and: [selector key = #<= or: [selector key = #>=]]) \r\t\tifTrue: [^ arguments first]\r\t\tifFalse: [^ nil]! !\r\r\r!MessageNode methodsFor: 'cascading'!\rcascadeReceiver\r\t\"Nil out rcvr (to indicate cascade) and return what it had been.\"\r\r\t| rcvr |\r\trcvr _ receiver.\r\treceiver _ nil.\r\t^rcvr! !\r\r\r!MessageNode methodsFor: 'macro transformations' stamp: 'di 6/11/2000 16:09'!\rnoteSpecialSelector: selectorSymbol\r\t\" special > 0 denotes specially treated messages. \"\r\r\t\"Deconvert initial keywords from SQ2K\"\r\tspecial _ #(:Test:Yes: :Test:No: :Test:Yes:No: :Test:No:Yes:\r\t\t\t\tand: or:\r\t\t\t\t:Until:do: :While:do: whileFalse whileTrue\r\t\t\t\t:Repeat:to:do: :Repeat:to:by:do:\r\t\t\t\t) indexOf: selectorSymbol.\r\tspecial > 0 ifTrue: [^ self].\r\r\tspecial _ MacroSelectors indexOf: selectorSymbol.\r! !\r\r!MessageNode methodsFor: 'macro transformations' stamp: 'sma 3/3/2000 13:37'!\rtoDoFromWhileWithInit: initStmt\r\t\"Return nil, or a to:do: expression equivalent to this whileTrue:\"\r\t| variable increment limit toDoBlock body test |\r\t(selector key == #whileTrue:\r\t\tand: [(initStmt isMemberOf: AssignmentNode) and:\r\t\t\t\t[initStmt variable isTemp]])\r\t\tifFalse: [^ nil].\r\tbody _ arguments last statements.\r\tvariable _ initStmt variable.\r\tincrement _ body last toDoIncrement: variable.\r\t(increment == nil or: [receiver statements size ~= 1])\r\t\tifTrue: [^ nil].\r\ttest _ receiver statements first.\r\t\"Note: test chould really be checked that <= or >= comparison\r\tjibes with the sign of the (constant) increment\"\r\t((test isMemberOf: MessageNode)\r\t\tand: [(limit _ test toDoLimit: variable) notNil])\r\t\tifFalse: [^ nil].\r\ttoDoBlock _ BlockNode statements: body allButLast returns: false.\r\ttoDoBlock arguments: (Array with: variable).\r\t^ MessageNode new\r\t\treceiver: initStmt value\r\t\tselector: (SelectorNode new key: #to:by:do: code: #macro)\r\t\targuments: (Array with: limit with: increment with: toDoBlock)\r\t\tprecedence: precedence! !\r\r!MessageNode methodsFor: 'macro transformations'!\rtransform: encoder\r\tspecial = 0 ifTrue: [^false].\r\t(self perform: (MacroTransformers at: special) with: encoder)\r\t\tifTrue: \r\t\t\t[^true]\r\t\tifFalse: \r\t\t\t[special _ 0. ^false]! !\r\r!MessageNode methodsFor: 'macro transformations'!\rtransformAnd: encoder\r\t(self transformBoolean: encoder)\r\t\tifTrue: \r\t\t\t[arguments _ \r\t\t\t\tArray \r\t\t\t\t\twith: (arguments at: 1)\r\t\t\t\t\twith: (BlockNode withJust: NodeFalse).\r\t\t\t^true]\r\t\tifFalse: \r\t\t\t[^false]! !\r\r!MessageNode methodsFor: 'macro transformations'!\rtransformBoolean: encoder\r\t^self\r\t\tcheckBlock: (arguments at: 1)\r\t\tas: 'argument'\r\t\tfrom: encoder! !\r\r!MessageNode methodsFor: 'macro transformations'!\rtransformIfFalse: encoder\r\t(self transformBoolean: encoder)\r\t\tifTrue: \r\t\t\t[arguments _ \r\t\t\t\tArray \r\t\t\t\t\twith: (BlockNode withJust: NodeNil)\r\t\t\t\t\twith: (arguments at: 1).\r\t\t\t^true]\r\t\tifFalse:\r\t\t\t[^false]! !\r\r!MessageNode methodsFor: 'macro transformations' stamp: 'acg 1/28/2000 00:48'!\rtransformIfFalseIfTrue: encoder\r\t((self checkBlock: (arguments at: 1) as: 'False arg' from: encoder)\r\t\tand: [self checkBlock: (arguments at: 2) as: 'True arg' from: encoder])\r\t\tifTrue: \r\t\t\t[selector _ #ifTrue:ifFalse:.\r\t\t\targuments swap: 1 with: 2.\r\t\t\t^true]\r\t\tifFalse: \r\t\t\t[^false]! !\r\r!MessageNode methodsFor: 'macro transformations' stamp: 'di 4/24/2000 13:32'!\rtransformIfNil: encoder\r\r\t(self transformBoolean: encoder) ifFalse: [^ false].\r\t(MacroSelectors at: special) = #ifNotNil:\r\tifTrue:\r\t\t[(self checkBlock: arguments first as: 'ifNotNil arg' from: encoder) ifFalse: [^ false].\r\r\t\t\"Transform 'ifNotNil: [stuff]' to 'ifNil: [nil] ifNotNil: [stuff]'.\r\t\tSlightly better code and more consistent with decompilation.\"\r\t\tself noteSpecialSelector: #ifNil:ifNotNil:.\r\t\tselector _ SelectorNode new key: (MacroSelectors at: special) code: #macro.\r\t\targuments _ {BlockNode withJust: NodeNil. arguments first}.\r\t\t(self transform: encoder) ifFalse: [self error: 'compiler logic error'].\r\t\t^ true]\r\tifFalse:\r\t\t[^ self checkBlock: arguments first as: 'ifNil arg' from: encoder]\r! !\r\r!MessageNode methodsFor: 'macro transformations' stamp: 'acg 1/28/2000 21:49'!\rtransformIfNilIfNotNil: encoder\r\t((self checkBlock: (arguments at: 1) as: 'Nil arg' from: encoder)\r\t\tand: [self checkBlock: (arguments at: 2) as: 'NotNil arg' from: encoder])\r\t\tifTrue: \r\t\t\t[selector _ SelectorNode new key: #ifTrue:ifFalse: code: #macro.\r\t\t\treceiver _ MessageNode new\r\t\t\t\treceiver: receiver\r\t\t\t\tselector: #==\r\t\t\t\targuments: (Array with: NodeNil)\r\t\t\t\tprecedence: 2\r\t\t\t\tfrom: encoder.\r\t\t\t^true]\r\t\tifFalse: \r\t\t\t[^false]! !\r\r!MessageNode methodsFor: 'macro transformations' stamp: 'acg 1/28/2000 21:50'!\rtransformIfNotNilIfNil: encoder\r\t((self checkBlock: (arguments at: 1) as: 'NotNil arg' from: encoder)\r\t\tand: [self checkBlock: (arguments at: 2) as: 'Nil arg' from: encoder])\r\t\tifTrue: \r\t\t\t[selector _ SelectorNode new key: #ifTrue:ifFalse: code: #macro.\r\t\t\treceiver _ MessageNode new\r\t\t\t\treceiver: receiver\r\t\t\t\tselector: #==\r\t\t\t\targuments: (Array with: NodeNil)\r\t\t\t\tprecedence: 2\r\t\t\t\tfrom: encoder.\r\t\t\targuments swap: 1 with: 2.\r\t\t\t^true]\r\t\tifFalse: \r\t\t\t[^false]! !\r\r!MessageNode methodsFor: 'macro transformations'!\rtransformIfTrue: encoder\r\t(self transformBoolean: encoder)\r\t\tifTrue: \r\t\t\t[arguments _ \r\t\t\t\tArray \r\t\t\t\t\twith: (arguments at: 1)\r\t\t\t\t\twith: (BlockNode withJust: NodeNil).\r\t\t\t^true]\r\t\tifFalse: \r\t\t\t[^false]! !\r\r!MessageNode methodsFor: 'macro transformations' stamp: 'acg 1/27/2000 22:29'!\rtransformIfTrueIfFalse: encoder\r\t^(self checkBlock: (arguments at: 1) as: 'True arg' from: encoder)\r\t\tand: [self checkBlock: (arguments at: 2) as: 'False arg' from: encoder]! !\r\r!MessageNode methodsFor: 'macro transformations'!\rtransformOr: encoder\r\t(self transformBoolean: encoder)\r\t\tifTrue: \r\t\t\t[arguments _ \r\t\t\t\tArray \r\t\t\t\t\twith: (BlockNode withJust: NodeTrue)\r\t\t\t\t\twith: (arguments at: 1).\r\t\t\t^true]\r\t\tifFalse: \r\t\t\t[^false]! !\r\r!MessageNode methodsFor: 'macro transformations' stamp: 'hmm 7/15/2001 22:22'!\rtransformToDo: encoder\r\t\" var _ rcvr. L1: [var <= arg1] Bfp(L2) [block body. var _ var + inc] \rJmp(L1) L2: \"\r\t| limit increment block initStmt test incStmt limitInit blockVar myRange blockRange |\r\t\"First check for valid arguments\"\r\t((arguments last isMemberOf: BlockNode)\r\t\t\tand: [arguments last numberOfArguments = 1])\r\t\tifFalse: [^ false].\r\targuments last firstArgument isVariableReference\r\t\tifFalse: [^ false]. \"As with debugger remote vars\"\r\targuments size = 3\r\t\tifTrue: [increment _ arguments at: 2.\r\t\t\t\t(increment isConstantNumber and:\r\t\t\t\t\t[increment literalValue ~= 0]) ifFalse: [^ false]]\r\t\tifFalse: [increment _ encoder encodeLiteral: 1].\r\targuments size < 3 ifTrue:   \"transform to full form\"\r\t\t[selector _ SelectorNode new key: #to:by:do: code: #macro].\r\r\t\"Now generate auxiliary structures\"\r\tmyRange _ encoder rawSourceRanges at: self ifAbsent: [1 to: 0].\r\tblock _ arguments last.\r\tblockRange _ encoder rawSourceRanges at: block ifAbsent: [1 to: 0].\r\tblockVar _ block firstArgument.\r\tinitStmt _ AssignmentNode new variable: blockVar value: receiver.\r\tlimit _ arguments at: 1.\r\tlimit isVariableReference | limit isConstantNumber\r\t\tifTrue: [limitInit _ nil]\r\t\tifFalse:  \"Need to store limit in a var\"\r\t\t\t[limit _ encoder autoBind: blockVar key , 'LimiT'.\r\t\t\tlimit scope: -2.  \"Already done parsing block\"\r\t\t\tlimitInit _ AssignmentNode new\r\t\t\t\t\tvariable: limit\r\t\t\t\t\tvalue: (arguments at: 1)].\r\ttest _ MessageNode new receiver: blockVar\r\t\t\tselector: (increment key > 0 ifTrue: [#<=] ifFalse: [#>=])\r\t\t\targuments: (Array with: limit)\r\t\t\tprecedence: precedence from: encoder\r\t\t\tsourceRange: (myRange first to: blockRange first).\r\tincStmt _ AssignmentNode new\r\t\t\tvariable: blockVar\r\t\t\tvalue: (MessageNode new\r\t\t\t\treceiver: blockVar selector: #+\r\t\t\t\targuments: (Array with: increment)\r\t\t\t\tprecedence: precedence from: encoder)\r\t\t\tfrom: encoder\r\t\t\tsourceRange: (myRange last to: myRange last).\r\targuments _ (Array with: limit with: increment with: block)\r\t\t, (Array with: initStmt with: test with: incStmt with: limitInit).\r\t^ true! !\r\r!MessageNode methodsFor: 'macro transformations'!\rtransformWhile: encoder\r\t(self checkBlock: receiver as: 'receiver' from: encoder)\r\t\tifFalse: [^ false].\r\targuments size = 0   \"transform bodyless form to body form\"\r\t\tifTrue: [selector _ SelectorNode new\r\t\t\t\t\tkey: (special = 10 ifTrue: [#whileTrue:] ifFalse: [#whileFalse:])\r\t\t\t\t\tcode: #macro.\r\t\t\t\targuments _ Array with: (BlockNode withJust: NodeNil).\r\t\t\t\t^ true]\r\t\tifFalse: [^ self transformBoolean: encoder]! !\r\r\r!MessageNode methodsFor: 'code generation' stamp: 'tao 8/20/97 22:24'!\remitCase: stack on: strm value: forValue\r\r\t| braceNode sizeStream thenSize elseSize |\r\tforValue not\r\t\tifTrue: [^super emitForEffect: stack on: strm].\r\tbraceNode _ arguments first.\r\tsizeStream _ ReadStream on: sizes.\r\treceiver emitForValue: stack on: strm.\r\tbraceNode casesForwardDo:\r\t\t[:keyNode :valueNode :last |\r\t\tthenSize _ sizeStream next.\r\t\telseSize _ sizeStream next.\r\t\tlast ifFalse: [strm nextPut: Dup. stack push: 1].\r\t\tkeyNode emitForEvaluatedValue: stack on: strm.\r\t\tequalNode emit: stack args: 1 on: strm.\r\t\tself emitBranchOn: false dist: thenSize pop: stack on: strm.\r\t\tlast ifFalse: [strm nextPut: Pop. stack pop: 1].\r\t\tvalueNode emitForEvaluatedValue: stack on: strm.\r\t\tlast ifTrue: [stack pop: 1].\r\t\tvalueNode returns ifFalse: [self emitJump: elseSize on: strm]].\r\targuments size = 2\r\t\tifTrue:\r\t\t\t[arguments last emitForEvaluatedValue: stack on: strm] \"otherwise: [...]\"\r\t\tifFalse:\r\t\t\t[NodeSelf emitForValue: stack on: strm.\r\t\t\tcaseErrorNode emit: stack args: 0 on: strm]! !\r\r!MessageNode methodsFor: 'code generation' stamp: 'hmm 7/28/2001 14:39'!\remitForEffect: stack on: strm\r\t\"For #ifTrue:ifFalse: and #whileTrue: / #whileFalse: style messages, the pc is set to the jump instruction, so that mustBeBoolean exceptions can be shown correctly.\"\r\tspecial > 0\r\t\tifTrue: \r\t\t\t[pc _ 0.\r\t\t\tself perform: (MacroEmitters at: special) with: stack with: strm with: false]\r\t\tifFalse: \r\t\t\t[super emitForEffect: stack on: strm]! !\r\r!MessageNode methodsFor: 'code generation' stamp: 'hmm 7/28/2001 14:40'!\remitForValue: stack on: strm\r\t\"For #ifTrue:ifFalse: and #whileTrue: / #whileFalse: style messages, the pc is set to the jump instruction, so that mustBeBoolean exceptions can be shown correctly.\"\r\tspecial > 0\r\t\tifTrue: \r\t\t\t[pc _ 0.\r\t\t\tself perform: (MacroEmitters at: special) with: stack with: strm with: true]\r\t\tifFalse: \r\t\t\t[receiver ~~ nil ifTrue: [receiver emitForValue: stack on: strm].\r\t\t\targuments do: [:argument | argument emitForValue: stack on: strm].\r\t\t\tselector\r\t\t\t\temit: stack\r\t\t\t\targs: arguments size\r\t\t\t\ton: strm\r\t\t\t\tsuper: receiver == NodeSuper.\r\t\t\tpc _ strm position]! !\r\r!MessageNode methodsFor: 'code generation' stamp: 'hmm 7/28/2001 14:23'!\remitIf: stack on: strm value: forValue\r\t| thenExpr thenSize elseExpr elseSize |\r\tthenSize _ sizes at: 1.\r\telseSize _ sizes at: 2.\r\t(forValue not and: [(elseSize*thenSize) > 0])\r\t\tifTrue:  \"Two-armed IFs forEffect share a single pop\"\r\t\t\t[^ super emitForEffect: stack on: strm].\r\tthenExpr _ arguments at: 1.\r\telseExpr _ arguments at: 2.\r\treceiver emitForValue: stack on: strm.\r\tforValue\r\t\tifTrue:  \"Code all forValue as two-armed\"\r\t\t\t[self emitBranchOn: false dist: thenSize pop: stack on: strm.\r\t\t\tpc _ strm position.\r\t\t\tthenExpr emitForEvaluatedValue: stack on: strm.\r\t\t\tstack pop: 1.  \"then and else alternate; they don't accumulate\"\r\t\t\tthenExpr returns not\r\t\t\t\tifTrue:  \"Elide jump over else after a return\"\r\t\t\t\t\t[self emitJump: elseSize on: strm].\r\t\t\telseExpr emitForEvaluatedValue: stack on: strm]\r\t\tifFalse:  \"One arm is empty here (two-arms code forValue)\"\r\t\t\t[thenSize > 0\r\t\t\t\tifTrue:\r\t\t\t\t\t[self emitBranchOn: false dist: thenSize pop: stack on: strm.\r\t\t\t\t\tpc _ strm position.\r\t\t\t\t\tthenExpr emitForEvaluatedEffect: stack on: strm]\r\t\t\t\tifFalse:\r\t\t\t\t\t[self emitBranchOn: true dist: elseSize pop: stack on: strm.\r\t\t\t\t\tpc _ strm position.\r\t\t\t\t\telseExpr emitForEvaluatedEffect: stack on: strm]]! !\r\r!MessageNode methodsFor: 'code generation' stamp: 'ajh 7/31/2003 11:26'!\remitIfNil: stack on: strm value: forValue\r\r\t| theNode theSize theSelector |\r\ttheNode _ arguments first.\r\ttheSize _ sizes at: 1.\r\ttheSelector _ #ifNotNil:.\r\treceiver emitForValue: stack on: strm.\r\tforValue ifTrue: [strm nextPut: Dup. stack push: 1].\r\tstrm nextPut: LdNil. stack push: 1.\r\tequalNode emit: stack args: 1 on: strm.\r\tself \r\t\temitBranchOn: (selector key == theSelector)\r\t\tdist: theSize \r\t\tpop: stack \r\t\ton: strm.\r\tpc _ strm position.\r\tforValue \r\t\tifTrue: \r\t\t\t[strm nextPut: Pop. stack pop: 1.\r\t\t\ttheNode emitForEvaluatedValue: stack on: strm]\t\r\t\tifFalse: [theNode emitForEvaluatedEffect: stack on: strm].! !\r\r!MessageNode methodsFor: 'code generation' stamp: 'hmm 7/28/2001 14:42'!\remitToDo: stack on: strm value: forValue \r\t\" var _ rcvr. L1: [var <= arg1] Bfp(L2) [block body. var _ var + inc] Jmp(L1) L2: \"\r\t| loopSize initStmt limitInit test block incStmt blockSize |\r\tinitStmt _ arguments at: 4.\r\tlimitInit _ arguments at: 7.\r\ttest _ arguments at: 5.\r\tblock _ arguments at: 3.\r\tincStmt _ arguments at: 6.\r\tblockSize _ sizes at: 1.\r\tloopSize _ sizes at: 2.\r\tlimitInit == nil\r\t\tifFalse: [limitInit emitForEffect: stack on: strm].\r\tinitStmt emitForEffect: stack on: strm.\r\ttest emitForValue: stack on: strm.\r\tself emitBranchOn: false dist: blockSize pop: stack on: strm.\r\tpc _ strm position.\r\tblock emitForEvaluatedEffect: stack on: strm.\r\tincStmt emitForEffect: stack on: strm.\r\tself emitJump: 0 - loopSize on: strm.\r\tforValue ifTrue: [strm nextPut: LdNil. stack push: 1]! !\r\r!MessageNode methodsFor: 'code generation' stamp: 'hmm 7/28/2001 14:36'!\remitWhile: stack on: strm value: forValue \r\t\" L1: ... Bfp(L2)|Btp(L2) ... Jmp(L1) L2: \"\r\t| cond stmt stmtSize loopSize |\r\tcond _ receiver.\r\tstmt _ arguments at: 1.\r\tstmtSize _ sizes at: 1.\r\tloopSize _ sizes at: 2.\r\tcond emitForEvaluatedValue: stack on: strm.\r\tself emitBranchOn: (selector key == #whileFalse:)  \"Bfp for whileTrue\"\r\t\t\t\t\tdist: stmtSize pop: stack on: strm.   \"Btp for whileFalse\"\r\tpc _ strm position.\r\tstmt emitForEvaluatedEffect: stack on: strm.\r\tself emitJump: 0 - loopSize on: strm.\r\tforValue ifTrue: [strm nextPut: LdNil. stack push: 1]! !\r\r!MessageNode methodsFor: 'code generation'!\rpc\r\t\"Used by encoder source mapping.\"\r\r\tpc==nil ifTrue: [^0] ifFalse: [^pc]! !\r\r!MessageNode methodsFor: 'code generation' stamp: 'tao 8/20/97 22:25'!\rsizeCase: encoder value: forValue\r\r\t| braceNode sizeIndex thenSize elseSize |\r\tforValue not\r\t\tifTrue: [^super sizeForEffect: encoder].\r\tequalNode _ encoder encodeSelector: #=.\r\tbraceNode _ arguments first.\r\tsizes _ Array new: 2 * braceNode numElements.\r\tsizeIndex _ sizes size.\r\telseSize _ arguments size = 2\r\t\tifTrue:\r\t\t\t[arguments last sizeForEvaluatedValue: encoder] \"otherwise: [...]\"\r\t\tifFalse:\r\t\t\t[caseErrorNode _ encoder encodeSelector: #caseError.\r\t\t\t 1 + (caseErrorNode size: encoder args: 0 super: false)]. \"self caseError\"\r\tbraceNode casesReverseDo:\r\t\t[:keyNode :valueNode :last |\r\t\tsizes at: sizeIndex put: elseSize.\r\t\tthenSize _ valueNode sizeForEvaluatedValue: encoder.\r\t\tlast ifFalse: [thenSize _ thenSize + 1]. \"Pop\"\r\t\tvalueNode returns ifFalse: [thenSize _ thenSize + (self sizeJump: elseSize)].\r\t\tsizes at: sizeIndex-1 put: thenSize.\r\t\tlast ifFalse: [elseSize _ elseSize + 1]. \"Dup\"\r\t\telseSize _ elseSize + (keyNode sizeForEvaluatedValue: encoder) +\r\t\t\t(equalNode size: encoder args: 1 super: false) +\r\t\t\t(self sizeBranchOn: false dist: thenSize) + thenSize.\r\t\tsizeIndex _ sizeIndex - 2].\r\t^(receiver sizeForValue: encoder) + elseSize\r! !\r\r!MessageNode methodsFor: 'code generation'!\rsizeForEffect: encoder\r\r\tspecial > 0 \r\t\tifTrue: [^self perform: (MacroSizers at: special) with: encoder with: false].\r\t^super sizeForEffect: encoder! !\r\r!MessageNode methodsFor: 'code generation'!\rsizeForValue: encoder\r\t| total argSize |\r\tspecial > 0 \r\t\tifTrue: [^self perform: (MacroSizers at: special) with: encoder with: true].\r\treceiver == NodeSuper\r\t\tifTrue: [selector _ selector copy \"only necess for splOops\"].\r\ttotal _ selector size: encoder args: arguments size super: receiver == NodeSuper.\r\treceiver == nil \r\t\tifFalse: [total _ total + (receiver sizeForValue: encoder)].\r\tsizes _ arguments collect: \r\t\t\t\t\t[:arg | \r\t\t\t\t\targSize _ arg sizeForValue: encoder.\r\t\t\t\t\ttotal _ total + argSize.\r\t\t\t\t\targSize].\r\t^total! !\r\r!MessageNode methodsFor: 'code generation'!\rsizeIf: encoder value: forValue\r\t| thenExpr elseExpr branchSize thenSize elseSize |\r\tthenExpr _ arguments at: 1.\r\telseExpr _ arguments at: 2.\r\t(forValue\r\t\tor: [(thenExpr isJust: NodeNil)\r\t\tor: [elseExpr isJust: NodeNil]]) not\r\t\t\t\"(...not ifTrue: avoids using ifFalse: alone during this compile)\"\r\t\tifTrue:  \"Two-armed IFs forEffect share a single pop\"\r\t\t\t[^ super sizeForEffect: encoder].\r\tforValue\r\t\tifTrue:  \"Code all forValue as two-armed\"\r\t\t\t[elseSize _ elseExpr sizeForEvaluatedValue: encoder.\r\t\t\tthenSize _ (thenExpr sizeForEvaluatedValue: encoder)\r\t\t\t\t\t+ (thenExpr returns\r\t\t\t\t\t\tifTrue: [0]  \"Elide jump over else after a return\"\r\t\t\t\t\t\tifFalse: [self sizeJump: elseSize]).\r\t\t\tbranchSize _ self sizeBranchOn: false dist: thenSize]\r\t\tifFalse:  \"One arm is empty here (two-arms code forValue)\"\r\t\t\t[(elseExpr isJust: NodeNil)\r\t\t\t\tifTrue:\r\t\t\t\t\t[elseSize _ 0.\r\t\t\t\t\tthenSize _ thenExpr sizeForEvaluatedEffect: encoder.\r\t\t\t\t\tbranchSize _ self sizeBranchOn: false dist: thenSize]\r\t\t\t\tifFalse:\r\t\t\t\t\t[thenSize _ 0.\r\t\t\t\t\telseSize _ elseExpr sizeForEvaluatedEffect: encoder.\r\t\t\t\t\tbranchSize _ self sizeBranchOn: true dist: elseSize]].\r\tsizes _ Array with: thenSize with: elseSize.\r\t^ (receiver sizeForValue: encoder) + branchSize\r\t\t\t+ thenSize + elseSize! !\r\r!MessageNode methodsFor: 'code generation' stamp: 'acg 1/28/2000 22:00'!\rsizeIfNil: encoder value: forValue\r\r\t| theNode theSize theSelector |\r\tequalNode _ encoder encodeSelector: #==.\r\tsizes _ Array new: 1.\r\ttheNode _ arguments first.\r\ttheSelector _ #ifNotNil:.\r\tforValue\r\t\tifTrue:\r\t\t\t[sizes at: 1 put: (theSize _ (1 \"pop\" + (theNode sizeForEvaluatedValue: encoder))).\r\t\t\t ^(receiver sizeForValue: encoder) +\r\t\t\t\t2 \"Dup. LdNil\" +\r\t\t\t\t(equalNode size: encoder args: 1 super: false) +\r\t\t\t\t(self \r\t\t\t\t\tsizeBranchOn: (selector key == theSelector) \r\t\t\t\t\tdist: theSize) +\r\t\t\t\ttheSize]\r\t\tifFalse:\r\t\t\t[sizes at: 1 put: (theSize _ (theNode sizeForEvaluatedEffect: encoder)).\r\t\t\t ^(receiver sizeForValue: encoder) +\r\t\t\t\t1 \"LdNil\" +\r\t\t\t\t(equalNode size: encoder args: 1 super: false) +\r\t\t\t\t(self \r\t\t\t\t\tsizeBranchOn: (selector key == theSelector) \r\t\t\t\t\tdist: theSize) +\r\t\t\t\ttheSize]\r\r! !\r\r!MessageNode methodsFor: 'code generation'!\rsizeToDo: encoder value: forValue \r\t\" var _ rcvr. L1: [var <= arg1] Bfp(L2) [block body. var _ var + inc] Jmp(L1) L2: \"\r\t| loopSize initStmt test block incStmt blockSize blockVar initSize limitInit |\r\tblock _ arguments at: 3.\r\tblockVar _ block firstArgument.\r\tinitStmt _ arguments at: 4.\r\ttest _ arguments at: 5.\r\tincStmt _ arguments at: 6.\r\tlimitInit _ arguments at: 7.\r\tinitSize _ initStmt sizeForEffect: encoder.\r\tlimitInit == nil\r\t\tifFalse: [initSize _ initSize + (limitInit sizeForEffect: encoder)].\r\tblockSize _ (block sizeForEvaluatedEffect: encoder)\r\t\t\t+ (incStmt sizeForEffect: encoder) + 2.  \"+2 for Jmp backward\"\r\tloopSize _ (test sizeForValue: encoder)\r\t\t\t+ (self sizeBranchOn: false dist: blockSize)\r\t\t\t+ blockSize.\r\tsizes _ Array with: blockSize with: loopSize.\r\t^ initSize + loopSize\r\t\t\t+ (forValue ifTrue: [1] ifFalse: [0])    \" +1 for value (push nil) \"! !\r\r!MessageNode methodsFor: 'code generation'!\rsizeWhile: encoder value: forValue \r\t\"L1: ... Bfp(L2) ... Jmp(L1) L2: nil (nil for value only);\r\tjustStmt, wholeLoop, justJump.\"\r\t| cond stmt stmtSize loopSize branchSize |\r\tcond _ receiver.\r\tstmt _ arguments at: 1.\r\tstmtSize _ (stmt sizeForEvaluatedEffect: encoder) + 2.\r\tbranchSize _ self sizeBranchOn: (selector key == #whileFalse:)  \"Btp for whileFalse\"\r\t\t\t\t\tdist: stmtSize.\r\tloopSize _ (cond sizeForEvaluatedValue: encoder)\r\t\t\t+ branchSize + stmtSize.\r\tsizes _ Array with: stmtSize with: loopSize.\r\t^ loopSize    \" +1 for value (push nil) \"\r\t\t+ (forValue ifTrue: [1] ifFalse: [0])! !\r\r\r!MessageNode methodsFor: 'printing' stamp: 'RAA 2/15/2001 19:25'!\rmacroPrinter\r\r\tspecial > 0 ifTrue: [^MacroPrinters at: special].\r\t^nil\r! !\r\r!MessageNode methodsFor: 'printing'!\rprecedence\r\r\t^precedence! !\r\r!MessageNode methodsFor: 'printing' stamp: 'di 4/24/2000 10:32'!\rprintCaseOn: aStream indent: level \r\t\"receiver caseOf: {[key]->[value]. ...} otherwise: [otherwise]\"\r\t| braceNode otherwise extra |\r\tbraceNode _ arguments first.\r\totherwise _ arguments last.\r\t(arguments size = 1 or: [otherwise isJustCaseError])\r\t\tifTrue: [otherwise _ nil].\r\treceiver\r\t\tprintOn: aStream\r\t\tindent: level\r\t\tprecedence: 3.\r\taStream dialect = #SQ00 ifTrue: [aStream nextPutAll: ' caseOf (']\r\t\tifFalse: [aStream nextPutAll: ' caseOf: '].\r\tbraceNode isVariableReference ifTrue: [braceNode printOn: aStream indent: level]\r\t\tifFalse: \r\t\t\t[aStream nextPutAll: '{';\r\t\t\t\t crtab: level + 1.\r\t\t\tbraceNode\r\t\t\t\tcasesForwardDo: \r\t\t\t\t\t[:keyNode :valueNode :last | \r\t\t\t\t\tkeyNode printOn: aStream indent: level + 1.\r\t\t\t\t\taStream nextPutAll: ' -> '.\r\t\t\t\t\tvalueNode isComplex\r\t\t\t\t\t\tifTrue: \r\t\t\t\t\t\t\t[aStream crtab: level + 2.\r\t\t\t\t\t\t\textra _ 1]\r\t\t\t\t\t\tifFalse: [extra _ 0].\r\t\t\t\t\tvalueNode printOn: aStream indent: level + 1 + extra.\r\t\t\t\t\tlast ifTrue: [aStream nextPut: $}]\r\t\t\t\t\t\tifFalse: [aStream nextPut: $.;\r\t\t\t\t\t\t\t\t crtab: level + 1]]].\r\taStream dialect = #SQ00 ifTrue: [aStream nextPutAll: ')'].\r\totherwise isNil\r\t\tifFalse: \r\t\t\t[aStream dialect = #SQ00 ifTrue: [aStream crtab: level + 1;\r\t\t\t\t\t nextPutAll: ' otherwise (']\r\t\t\t\tifFalse: [aStream crtab: level + 1;\r\t\t\t\t\t\t nextPutAll: ' otherwise: '].\r\t\t\totherwise isComplex\r\t\t\t\tifTrue: \r\t\t\t\t\t[aStream crtab: level + 2.\r\t\t\t\t\textra _ 1]\r\t\t\t\tifFalse: [extra _ 0].\r\t\t\totherwise printOn: aStream indent: level + 1 + extra.\r\t\t\taStream dialect = #SQ00 ifTrue: [aStream nextPutAll: ')']]! !\r\r!MessageNode methodsFor: 'printing' stamp: 'di 5/1/2000 23:20'!\rprintIfNil: aStream indent: level\r\r\tself printReceiver: receiver on: aStream indent: level.\r\r\t^self printKeywords: selector key\r\t\targuments: (Array with: arguments first)\r\t\ton: aStream indent: level! !\r\r!MessageNode methodsFor: 'printing' stamp: 'di 5/1/2000 23:20'!\rprintIfNilNotNil: aStream indent: level\r\r\tself printReceiver: receiver ifNilReceiver on: aStream indent: level.\r\r\t(arguments first isJust: NodeNil) ifTrue:\r\t\t[^ self printKeywords: #ifNotNil:\r\t\t\t\targuments: { arguments second }\r\t\t\t\ton: aStream indent: level].\r\t(arguments second isJust: NodeNil) ifTrue:\r\t\t[^ self printKeywords: #ifNil:\r\t\t\t\targuments: { arguments first }\r\t\t\t\ton: aStream indent: level].\r\t^ self printKeywords: #ifNil:ifNotNil:\r\t\t\targuments: arguments\r\t\t\ton: aStream indent: level! !\r\r!MessageNode methodsFor: 'printing' stamp: 'RAA 2/16/2001 15:12'!\rprintIfOn: aStream indent: level\r\r\taStream dialect = #SQ00 ifTrue:\r\t\t[\"Convert to if-then-else\"\r\t\t(arguments last isJust: NodeNil) ifTrue:\r\t\t\t[aStream withStyleFor: #prefixKeyword do: [aStream nextPutAll: 'Test '].\r\t\t\tself printParenReceiver: receiver on: aStream indent: level + 1.\r\t\t\t^ self printKeywords: #Yes: arguments: (Array with: arguments first)\r\t\t\t\t\t\ton: aStream indent: level prefix: true].\r\t\t(arguments last isJust: NodeFalse) ifTrue:\r\t\t\t[self printReceiver: receiver on: aStream indent: level.\r\t\t\t^ self printKeywords: #and: arguments: (Array with: arguments first)\r\t\t\t\t\t\ton: aStream indent: level].\r\t\t(arguments first isJust: NodeNil) ifTrue:\r\t\t\t[aStream withStyleFor: #prefixKeyword do: [aStream nextPutAll: 'Test '].\r\t\t\tself printParenReceiver: receiver on: aStream indent: level + 1.\r\t\t\t^ self printKeywords: #No: arguments: (Array with: arguments last)\r\t\t\t\t\t\ton: aStream indent: level prefix: true].\r\t\t(arguments first isJust: NodeTrue) ifTrue:\r\t\t\t[self printReceiver: receiver on: aStream indent: level.\r\t\t\t^ self printKeywords: #or: arguments: (Array with: arguments last)\r\t\t\t\t\t\ton: aStream indent: level].\r\t\taStream withStyleFor: #prefixKeyword do: [aStream nextPutAll: 'Test '].\r\t\tself printParenReceiver: receiver on: aStream indent: level + 1.\r\t\t^ self printKeywords: #Yes:No: arguments: arguments\r\t\t\t\t\t\ton: aStream indent: level prefix: true].\r\r\treceiver ifNotNil: [\r\t\treceiver printOn: aStream indent: level + 1 precedence: precedence.\r\t].\r\t(arguments last isJust: NodeNil) ifTrue:\r\t\t[^ self printKeywords: #ifTrue: arguments: (Array with: arguments first)\r\t\t\t\t\ton: aStream indent: level].\r\t(arguments last isJust: NodeFalse) ifTrue:\r\t\t[^ self printKeywords: #and: arguments: (Array with: arguments first)\r\t\t\t\t\ton: aStream indent: level].\r\t(arguments first isJust: NodeNil) ifTrue:\r\t\t[^ self printKeywords: #ifFalse: arguments: (Array with: arguments last)\r\t\t\t\t\ton: aStream indent: level].\r\t(arguments first isJust: NodeTrue) ifTrue:\r\t\t[^ self printKeywords: #or: arguments: (Array with: arguments last)\r\t\t\t\t\ton: aStream indent: level].\r\tself printKeywords: #ifTrue:ifFalse: arguments: arguments\r\t\t\t\t\ton: aStream indent: level! !\r\r!MessageNode methodsFor: 'printing' stamp: 'di 6/11/2000 15:08'!\rprintKeywords: key arguments: args on: aStream indent: level\r\r\t^ self printKeywords: key arguments: args on: aStream indent: level prefix: false\r! !\r\r!MessageNode methodsFor: 'printing' stamp: 'di 6/11/2000 15:07'!\rprintKeywords: key arguments: args on: aStream indent: level prefix: isPrefix\r\t| keywords indent noColons arg kwd hasBrackets doCrTab |\r\targs size = 0 ifTrue: [aStream space; nextPutAll: key. ^ self].\r\tkeywords _ key keywords.\r\tnoColons _ aStream dialect = #SQ00 and: [keywords first endsWith: ':'].\r\tdoCrTab _ args size > 2 or:\r\t\t[{receiver} , args\r\t\t\tinject: false\r\t\t\tinto: [:was :thisArg |\r\t\t\t\twas or: [(thisArg isKindOf: BlockNode)\r\t\t\t\t\tor: [(thisArg isKindOf: MessageNode) and: [thisArg precedence >= 3]]]]].\r\t1 to: (args size min: keywords size) do:\r\t\t[:i | arg _ args at: i.  kwd _ keywords at: i.\r\t\tdoCrTab\r\t\t\tifTrue: [aStream crtab: level+1. indent _ 1] \"newline after big args\"\r\t\t\tifFalse: [aStream space. indent _ 0].\r\t\tnoColons\r\t\t\tifTrue: [aStream withStyleFor: (isPrefix ifTrue: [#prefixKeyword] ifFalse: [#keyword])\r\t\t\t\t\t\tdo: [aStream nextPutAll: kwd allButLast; space].\r\t\t\t\t\thasBrackets _ (arg isKindOf: BlockNode) or: [arg isKindOf: BlockNode].\r\t\t\t\t\thasBrackets ifFalse: [aStream nextPutAll: '(']]\r\t\t\tifFalse: [aStream nextPutAll: kwd; space].\r\t\targ printOn: aStream indent: level + 1 + indent\r\t\t\t \tprecedence: (precedence = 2 ifTrue: [1] ifFalse: [precedence]).\r\t\tnoColons\r\t\t\tifTrue: [hasBrackets ifFalse: [aStream nextPutAll: ')']]]! !\r\r!MessageNode methodsFor: 'printing' stamp: 'RAA 2/16/2001 15:12'!\rprintOn: aStream indent: level\r\r\t| leadingKeyword |\r\r\"may not need this check anymore - may be fixed by the #receiver: change\"\r\tspecial ifNil: [^aStream nextPutAll: '** MessageNode with nil special **'].\r\r\r\t(special > 0)\r\t\tifTrue: [self perform: self macroPrinter with: aStream with: level]\r\t\tifFalse: [selector key first = $:\r\t\t\t\tifTrue: [leadingKeyword _ selector key keywords first.\r\t\t\t\t\t\taStream nextPutAll: leadingKeyword; space.\r\t\t\t\t\t\tself printReceiver: receiver on: aStream indent: level.\r\t\t\t\t\t\tself printKeywords: (selector key allButFirst: leadingKeyword size + 1) arguments: arguments\r\t\t\t\t\t\t\ton: aStream indent: level]\r\t\t\t\tifFalse: [(aStream dialect = #SQ00 and: [selector key == #do:])\r\t\t\t\t\t\tifTrue: [\"Add prefix keyword\"\r\t\t\t\t\t\t\t\taStream withStyleFor: #prefixKeyword do: [aStream nextPutAll: 'Repeat '].\r\t\t\t\t\t\t\t\tself printParenReceiver: receiver on: aStream indent: level + 1.\r\t\t\t\t\t\t\t\tself printKeywords: selector key arguments: arguments\r\t\t\t\t\t\t\t\t\ton: aStream indent: level prefix: true]\r\t\t\t\t\t\tifFalse: [self printReceiver: receiver on: aStream indent: level.\r\t\t\t\t\t\t\t\tself printKeywords: selector key arguments: arguments\r\t\t\t\t\t\t\t\t\ton: aStream indent: level]]]! !\r\r!MessageNode methodsFor: 'printing' stamp: 'di 5/30/2000 23:17'!\rprintOn: strm indent: level precedence: outerPrecedence\r\r\t| parenthesize |\r\tparenthesize _ precedence > outerPrecedence\r\t\tor: [outerPrecedence = 3 and: [precedence = 3 \"both keywords\"]].\r\tparenthesize\r\t\tifTrue: [strm nextPutAll: '('.\r\t\t\t\tself printOn: strm indent: level.\r\t\t\t\tstrm nextPutAll: ')']\r\t\tifFalse: [self printOn: strm indent: level]! !\r\r!MessageNode methodsFor: 'printing' stamp: 'di 6/7/2000 08:28'!\rprintParenReceiver: rcvr on: aStream indent: level\r\t\t\t\t\t\r\t(rcvr isKindOf: BlockNode) ifTrue:\r\t\t[^ rcvr printOn: aStream indent: level].\r\taStream nextPutAll: '('.\r\trcvr printOn: aStream indent: level.\r\taStream nextPutAll: ')'\r! !\r\r!MessageNode methodsFor: 'printing' stamp: 'di 5/30/2000 23:06'!\rprintReceiver: rcvr on: aStream indent: level\r\t\t\t\t\t\r\trcvr ifNil: [^ self].\r\r\t\"Force parens around keyword receiver of kwd message\"\r\t(precedence = 3 and: [aStream dialect = #SQ00])\r\t\tifTrue: [rcvr printOn: aStream indent: level precedence: precedence - 1]\r\t\tifFalse: [rcvr printOn: aStream indent: level precedence: precedence]\r! !\r\r!MessageNode methodsFor: 'printing' stamp: 'di 6/11/2000 15:12'!\rprintToDoOn: aStream indent: level\r\r\t| limitNode |\r\taStream dialect = #SQ00\r\t\tifTrue: [\"Add prefix keyword\"\r\t\t\t\taStream withStyleFor: #prefixKeyword do: [aStream nextPutAll: 'Repeat '].\r\t\t\t\tself printParenReceiver: receiver on: aStream indent: level + 1]\r\t\tifFalse: [self printReceiver: receiver on: aStream indent: level].\r\r\t(arguments last == nil or: [(arguments last isMemberOf: AssignmentNode) not])\r\t\tifTrue: [limitNode _ arguments first]\r\t\tifFalse: [limitNode _ arguments last value].\r\t(selector key = #to:by:do:\r\t\t\tand: [(arguments at: 2) isConstantNumber\r\t\t\t\tand: [(arguments at: 2) key = 1]])\r\t\tifTrue: [self printKeywords: #to:do:\r\t\t\t\t\targuments: (Array with: limitNode with: (arguments at: 3))\r\t\t\t\t\ton: aStream indent: level prefix: true]\r\t\tifFalse: [self printKeywords: selector key\r\t\t\t\t\targuments: (Array with: limitNode) , arguments allButFirst\r\t\t\t\t\ton: aStream indent: level prefix: true]! !\r\r!MessageNode methodsFor: 'printing' stamp: 'di 6/11/2000 15:12'!\rprintWhileOn: aStream indent: level\r\r\taStream dialect = #SQ00\r\t\tifTrue: [\"Add prefix keyword\"\r\t\t\t\taStream withStyleFor: #prefixKeyword\r\t\t\t\t\t\tdo: [aStream nextPutAll: (selector key == #whileTrue:\r\t\t\t\t\t\t\t\t\tifTrue: ['While '] ifFalse: ['Until '])].\r\t\t\t\tself printParenReceiver: receiver on: aStream indent: level + 1.\r\t\t\t\tself printKeywords: #do: arguments: arguments\r\t\t\t\t\ton: aStream indent: level prefix: true]\r\t\tifFalse: [self printReceiver: receiver on: aStream indent: level.\r\t\t\t\t(arguments first isJust: NodeNil) ifTrue:\r\t\t\t\t\t\t[selector _ SelectorNode new\r\t\t\t\t\t\t\t\tkey: (selector key == #whileTrue:\r\t\t\t\t\t\t\t\t\tifTrue: [#whileTrue] ifFalse: [#whileFalse])\r\t\t\t\t\t\t\t\tcode: #macro.\r\t\t\t\t\t\targuments _ Array new].\r\t\t\t\tself printKeywords: selector key arguments: arguments\r\t\t\t\t\ton: aStream indent: level]! !\r\r\r!MessageNode methodsFor: 'private' stamp: 'hg 10/2/2001 21:08'!\rcheckBlock: node as: nodeName from: encoder\r\r\tnode canBeSpecialArgument ifTrue: [^node isMemberOf: BlockNode].\r\t((node isKindOf: BlockNode) and: [node numberOfArguments > 0])\r\t\tifTrue:\t[^encoder notify: '<- ', nodeName , ' of ' ,\r\t\t\t\t\t(MacroSelectors at: special) , ' must be a 0-argument block']\r\t\tifFalse: [^encoder notify: '<- ', nodeName , ' of ' ,\r\t\t\t\t\t(MacroSelectors at: special) , ' must be a block or variable']! !\r\r!MessageNode methodsFor: 'private' stamp: 'acg 1/28/2000 00:57'!\rifNilReceiver\r\r\t^receiver! !\r\r!MessageNode methodsFor: 'private' stamp: 'tk 8/2/1999 18:40'!\rpvtCheckForPvtSelector: encoder\r\t\"If the code being compiled is trying to send a private message (e.g. 'pvtCheckForPvtSelector:') to anyone other than self, then complain to encoder.\"\r\r\tselector isPvtSelector ifTrue:\r\t\t[receiver isSelfPseudoVariable ifFalse:\r\t\t\t[encoder notify: 'Private messages may only be sent to self']].! !\r\r!MessageNode methodsFor: 'private'!\rreceiver: rcvr arguments: args precedence: p\r\r\treceiver _ rcvr.\r\targuments _ args.\r\tsizes _ Array new: arguments size.\r\tprecedence _ p! !\r\r!MessageNode methodsFor: 'private'!\rtransformCase: encoder\r\r\t| caseNode |\r\tcaseNode _ arguments first.\r\t(caseNode isKindOf: BraceNode)\r\t\tifTrue:\r\t\t\t[^(caseNode blockAssociationCheck: encoder) and:\r\t\t\t \t[arguments size = 1 or:\r\t\t\t\t\t[self checkBlock: arguments last as: 'otherwise arg' from: encoder]]].\r\t(caseNode canBeSpecialArgument and: [(caseNode isMemberOf: BlockNode) not])\r\t\tifTrue:\r\t\t\t[^false]. \"caseOf: variable\"\r\t^encoder notify: 'caseOf: argument must be a brace construct or a variable'! !\r\r\r!MessageNode methodsFor: 'equation translation'!\rarguments\r\t^arguments! !\r\r!MessageNode methodsFor: 'equation translation' stamp: 'tk 10/27/2000 15:11'!\rarguments: list\r\targuments _ list! !\r\r!MessageNode methodsFor: 'equation translation'!\rreceiver\r\t^receiver! !\r\r!MessageNode methodsFor: 'equation translation' stamp: 'RAA 2/14/2001 14:07'!\rreceiver: val\r\t\"14 feb 2001 - removed return arrow\"\r\r\treceiver _ val! !\r\r!MessageNode methodsFor: 'equation translation'!\rselector\r\t^selector! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rMessageNode class\r\tinstanceVariableNames: ''!\r\r!MessageNode class methodsFor: 'class initialization' stamp: 'acg 1/28/2000 21:58'!\rinitialize\t\t\"MessageNode initialize\"\r\tMacroSelectors _ \r\t\t#(ifTrue: ifFalse: ifTrue:ifFalse: ifFalse:ifTrue:\r\t\t\tand: or:\r\t\t\twhileFalse: whileTrue: whileFalse whileTrue\r\t\t\tto:do: to:by:do:\r\t\t\tcaseOf: caseOf:otherwise:\r\t\t\tifNil: ifNotNil:  ifNil:ifNotNil: ifNotNil:ifNil:).\r\tMacroTransformers _ \r\t\t#(transformIfTrue: transformIfFalse: transformIfTrueIfFalse: transformIfFalseIfTrue:\r\t\t\ttransformAnd: transformOr:\r\t\t\ttransformWhile: transformWhile: transformWhile: transformWhile:\r\t\t\ttransformToDo: transformToDo:\r\t\t\ttransformCase: transformCase:\r\t\t\ttransformIfNil: transformIfNil:  transformIfNilIfNotNil: transformIfNotNilIfNil:).\r\tMacroEmitters _ \r\t\t#(emitIf:on:value: emitIf:on:value: emitIf:on:value: emitIf:on:value:\r\t\t\temitIf:on:value: emitIf:on:value:\r\t\t\temitWhile:on:value: emitWhile:on:value: emitWhile:on:value: emitWhile:on:value:\r\t\t\temitToDo:on:value: emitToDo:on:value:\r\t\t\temitCase:on:value: emitCase:on:value:\r\t\t\temitIfNil:on:value: emitIfNil:on:value: emitIf:on:value: emitIf:on:value:).\r\tMacroSizers _ \r\t\t#(sizeIf:value: sizeIf:value: sizeIf:value: sizeIf:value:\r\t\t\tsizeIf:value: sizeIf:value:\r\t\t\tsizeWhile:value: sizeWhile:value: sizeWhile:value: sizeWhile:value:\r\t\t\tsizeToDo:value: sizeToDo:value:\r\t\t\tsizeCase:value: sizeCase:value:\r\t\t\tsizeIfNil:value: sizeIfNil:value: sizeIf:value: sizeIf:value: ).\r\tMacroPrinters _ \r\t\t#(printIfOn:indent: printIfOn:indent: printIfOn:indent: printIfOn:indent:\r\t\t\tprintIfOn:indent: printIfOn:indent:\r\t\t\tprintWhileOn:indent: printWhileOn:indent: printWhileOn:indent: printWhileOn:indent:\r\t\t\tprintToDoOn:indent: printToDoOn:indent:\r\t\t\tprintCaseOn:indent: printCaseOn:indent:\r\t\t\tprintIfNil:indent: printIfNil:indent: printIfNilNotNil:indent: printIfNilNotNil:indent:)! !\rError subclass: #MessageNotUnderstood\r\tinstanceVariableNames: 'message receiver'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Exceptions Kernel'!\r!MessageNotUnderstood commentStamp: '<historical>' prior: 0!\rThis exception is provided to support Object>>doesNotUnderstand:.!\r\r\r!MessageNotUnderstood methodsFor: 'exceptionBuilder' stamp: 'pnm 8/16/2000 15:03'!\rmessage: aMessage\r\r\tmessage := aMessage! !\r\r!MessageNotUnderstood methodsFor: 'exceptionBuilder' stamp: 'ab 8/22/2003 11:56'!\rmessageText\r\t\"Return an exception's message text.\"\r\r\t^messageText == nil\r\t\tifTrue:\r\t\t\t[message == nil\r\t\t\t\tifTrue: [super messageText]\r\t\t\t\tifFalse: [message lookupClass printString, '>>', message selector asString]]\r\t\tifFalse: [messageText]! !\r\r!MessageNotUnderstood methodsFor: 'exceptionBuilder' stamp: 'ajh 10/9/2001 16:38'!\rreceiver: obj\r\r\treceiver _ obj! !\r\r\r!MessageNotUnderstood methodsFor: 'exceptionDescription' stamp: 'tfei 6/4/1999 18:30'!\risResumable\r\t\"Determine whether an exception is resumable.\"\r\r\t^true! !\r\r!MessageNotUnderstood methodsFor: 'exceptionDescription' stamp: 'ajh 10/9/2001 16:39'!\rreceiver\r\t\"Answer the receiver that did not understand the message\"\r\r\t^ receiver! !\rBrowser subclass: #MessageSet\r\tinstanceVariableNames: 'messageList autoSelectString growable'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Browser'!\r!MessageSet commentStamp: '<historical>' prior: 0!\rI represent a query path of the retrieval result of making a query about methods in the system. The result is a set of methods, denoted by a message selector and the class in which the method was found. As a StringHolder, the string I represent is the source code of the currently selected method. I am typically viewed in a Message Set Browser consisting of a MessageListView and a BrowserCodeView.!\r\r\r!MessageSet methodsFor: 'message list' stamp: 'BG 11/1/2003 14:51'!\raddExtraShiftedItemsTo: aMenu\r\t\"The shifted selector-list menu is being built.  Add items specific to MessageSet\"\r\r\tself growable ifTrue:\r\t\t[aMenu addList: #(\r\t\t\t-\r\t\t\t('remove from this browser'\t\tremoveMessageFromBrowser)\r\t\t\t)].\r\taMenu add: 'sort by date' action: #sortByDate! !\r\r!MessageSet methodsFor: 'message list' stamp: 'tk 5/1/2001 18:14'!\raddItem: classAndMethod\r\t\"Append a classAndMethod string to the list.  Select the new item.\"\r\r\t\"Do some checks on the input?\"\r\tself okToChange ifFalse: [^ self].\r\tmessageList add: classAndMethod.\r\tself changed: #messageList.\r\tself messageListIndex: messageList size.! !\r\r!MessageSet methodsFor: 'message list' stamp: 'sw 1/28/2001 20:56'!\rgrowable\r\t\"Answer whether the receiver is capable of growing/shrinking dynamically\"\r\r\t^ growable ~~ false! !\r\r!MessageSet methodsFor: 'message list' stamp: 'sw 12/6/2000 07:12'!\rgrowable: aBoolean\r\t\"Give or take away the growable trait; when a message set is growable, methods submitted within it will be added to its message list\"\r\r\tgrowable _ aBoolean! !\r\r!MessageSet methodsFor: 'message list'!\rmessageList\r\t\"Answer the current list of messages.\"\r\r\t^messageList! !\r\r!MessageSet methodsFor: 'message list' stamp: 'nk 2/14/2004 15:10'!\rmessageListIndex: anInteger \r\t\"Set the index of the selected item to be anInteger.\"\r\r\tmessageListIndex _ anInteger.\r\tcontents _ \r\t\tmessageListIndex ~= 0\r\t\t\tifTrue: [self selectedMessage]\r\t\t\tifFalse: [''].\r\tself changed: #messageListIndex.\t \"update my selection\"\r\tself editSelection: #editMessage.\r\tself contentsChanged.\r\t(messageListIndex ~= 0 and: [autoSelectString notNil])\r\t\tifTrue: [self changed: #autoSelect].\r\tself decorateButtons\r! !\r\r!MessageSet methodsFor: 'message list' stamp: 'sbw 12/30/1999 17:19'!\roptionalButtonHeight\r\r\t^ 15! !\r\r!MessageSet methodsFor: 'message list' stamp: 'sma 3/3/2000 11:17'!\rselectedMessageName\r\t\"Answer the name of the currently selected message.\"\r\t\"wod 6/16/1998: answer nil if none are selected.\"\r\r\tmessageListIndex = 0 ifTrue: [^ nil].\r\t^ self setClassAndSelectorIn: [:class :selector | ^ selector]! !\r\r!MessageSet methodsFor: 'message list' stamp: 'sw 8/1/2002 18:18'!\rsortByDate\r\t\"Sort the message-list by date of time-stamp\"\r\r\t| assocs aCompiledMethod aDate inOrder |\r\tassocs _ messageList collect:\r\t\t[:aRef |\r\t\t\taDate _ aRef methodSymbol == #Comment\r\t\t\t\tifTrue:\r\t\t\t\t\t[aRef actualClass organization dateCommentLastSubmitted]\r\t\t\t\tifFalse:\r\t\t\t\t\t[aCompiledMethod _ aRef actualClass compiledMethodAt: aRef methodSymbol ifAbsent: [nil].\r\t\t\t\t\taCompiledMethod ifNotNil: [aCompiledMethod dateMethodLastSubmitted]].\r\t\t\taRef -> (aDate ifNil: [Date fromString: '01/01/1996'])].  \"The dawn of Squeak history\"\r\tinOrder _ assocs asSortedCollection:\r\t\t[:a :b | a value < b value].\r\r\tmessageList _ inOrder asArray collect: [:assoc | assoc key].\r\tself changed: #messageList! !\r\r\r!MessageSet methodsFor: 'message functions' stamp: 'sw 12/11/2000 15:51'!\rdeleteFromMessageList: aMessage\r\t\"Delete the given message from the receiver's message list\"\r\r\tmessageList _ messageList copyWithout: aMessage! !\r\r!MessageSet methodsFor: 'message functions' stamp: 'sw 2/24/1999 18:31'!\rmethodCategoryChanged\r\tself changed: #annotation! !\r\r!MessageSet methodsFor: 'message functions' stamp: 'sw 12/1/2000 11:54'!\rreformulateList\r\t\"The receiver's messageList has been changed; rebuild it\"\r\r\tsuper reformulateList.\r\tself initializeMessageList: messageList.\r\tself changed: #messageList.\r\tself changed: #messageListIndex.\r\tself contentsChanged\r! !\r\r!MessageSet methodsFor: 'message functions' stamp: 'nk 6/26/2003 21:44'!\rremoveMessage\r\t\"Remove the selected message from the system. 1/15/96 sw\"\r\t| messageName confirmation |\r\tmessageListIndex = 0\r\t\tifTrue: [^ self].\r\tself okToChange\r\t\tifFalse: [^ self].\r\tmessageName _ self selectedMessageName.\r\tconfirmation _ self systemNavigation  confirmRemovalOf: messageName on: self selectedClassOrMetaClass.\r\tconfirmation == 3\r\t\tifTrue: [^ self].\r\tself selectedClassOrMetaClass removeSelector: messageName.\r\tself deleteFromMessageList: self selection.\r\tself reformulateList.\r\tconfirmation == 2\r\t\tifTrue: [self systemNavigation browseAllCallsOn: messageName]! !\r\r!MessageSet methodsFor: 'message functions' stamp: 'sw 1/12/2001 00:19'!\rremoveMessageFromBrowser\r\t\"Remove the selected message from the browser.\"\r\r\tmessageListIndex = 0 ifTrue: [^ self].\r\tself deleteFromMessageList: self selection.\r\tself reformulateList.\r\tself adjustWindowTitleAfterFiltering\r! !\r\r\r!MessageSet methodsFor: 'class list'!\rmetaClassIndicated\r\t\"Answer the boolean flag that indicates whether\r\tthis is a class method.\"\r\r\t^ self selectedClassOrMetaClass isMeta! !\r\r!MessageSet methodsFor: 'class list'!\rselectedClass \r\t\"Return the base class for the current selection.  1/17/96 sw fixed up so that it doesn't fall into a debugger in a msg browser that has no message selected\"\r\r\t| aClass |\r\t^ (aClass _ self selectedClassOrMetaClass) == nil\r\t\tifTrue:\r\t\t\t[nil]\r\t\tifFalse:\r\t\t\t[aClass theNonMetaClass]! !\r\r!MessageSet methodsFor: 'class list' stamp: 'tk 4/4/98 18:50'!\rselectedClassName\r\t\"Answer the name of class of the currently selected message. Answer nil if no selection \r\texists.\"\r\r\t| cls |\r\t(cls _ self selectedClass) ifNil: [^ nil].\r\t^ cls name! !\r\r!MessageSet methodsFor: 'class list'!\rselectedClassOrMetaClass\r\t\"Answer the currently selected class (or metaclass).\"\r\tmessageListIndex = 0 ifTrue: [^nil].\r\tself setClassAndSelectorIn: [:c :s | ^c]! !\r\r!MessageSet methodsFor: 'class list'!\rselectedMessageCategoryName \r\t\"Answer the name of the selected message category or nil.\"\r\tmessageListIndex = 0 ifTrue: [^ nil].\r\t^ self selectedClassOrMetaClass organization categoryOfElement: self selectedMessageName! !\r\r\r!MessageSet methodsFor: 'contents' stamp: 'di 10/1/2001 22:26'!\rcontents\r\t\"Answer the contents of the receiver\"\r\r\t^ contents == nil\r\t\tifTrue: [currentCompiledMethod _ nil. '']\r\t\tifFalse: [messageListIndex = 0 \r\t\t\tifTrue: [currentCompiledMethod _ nil. contents]\r\t\t\tifFalse: [self showingByteCodes\r\t\t\t\tifTrue: [self selectedBytecodes]\r\t\t\t\tifFalse: [self selectedMessage]]]! !\r\r!MessageSet methodsFor: 'contents' stamp: 'nk 6/19/2004 16:47'!\rselectedMessage\r\t\"Answer the source method for the currently selected message.\"\r\r\t| source |\r\tself setClassAndSelectorIn: [:class :selector | \r\t\tclass ifNil: [^ 'Class vanished'].\r\t\tselector first isUppercase ifTrue:\r\t\t\t[selector == #Comment ifTrue:\r\t\t\t\t[currentCompiledMethod _ class organization commentRemoteStr.\r\t\t\t\t^ class comment].\r\t\t\tselector == #Definition ifTrue:\r\t\t\t\t[^ class definitionST80: Preferences printAlternateSyntax not].\r\t\t\tselector == #Hierarchy ifTrue: [^ class printHierarchy]].\r\t\tsource _ class sourceMethodAt: selector ifAbsent:\r\t\t\t[currentCompiledMethod _ nil.\r\t\t\t^ 'Missing'].\r\r\t\tself showingDecompile ifTrue:\r\t\t\t[^ self decompiledSourceIntoContentsWithTempNames: Sensor leftShiftDown not ].\r\r\t\tcurrentCompiledMethod _ class compiledMethodAt: selector ifAbsent: [nil].\r\t\tself showingDocumentation ifTrue:\r\t\t\t[^ self commentContents].\r\r\tsource _ self sourceStringPrettifiedAndDiffed.\r\t^ source asText makeSelectorBoldIn: class]! !\r\r!MessageSet methodsFor: 'contents' stamp: 'sw 2/14/2001 15:25'!\rsetContentsToForceRefetch\r\t\"Set the receiver's contents such that on the next update the contents will be formulated afresh.  This is a critical and obscure difference between Browsers on the one hand and MessageSets on the other, and has over the years been the source of much confusion and much difficulty.  By centralizing the different handling here, we don't need so many idiosyncratic overrides in MessageSet any more\"\r\r\tcontents _ ''! !\r\r\r!MessageSet methodsFor: 'private' stamp: 'sw 1/11/2001 09:16'!\radjustWindowTitleAfterFiltering\r\t\"Set the title of the receiver's window, if any, to reflect the just-completed filtering\"\r\r\t| aWindow existingLabel newLabel |\r\r\t(aWindow _ self containingWindow) ifNil: [^ self].\r\t(existingLabel _ aWindow label) isEmptyOrNil ifTrue: [^ self].\r\t(((existingLabel size < 3) or: [existingLabel last ~~ $]]) or: [(existingLabel at: (existingLabel size - 1)) isDigit not]) ifTrue: [^ self].\r\texistingLabel size to: 1 by: -1 do:\r\t\t[:anIndex | ((existingLabel at: anIndex) == $[) ifTrue:\r\t\t\t[newLabel _ (existingLabel copyFrom: 1 to: anIndex),\r\t\t\t\t'Filtered: ',\r\t\t\t\tmessageList size printString,\r\t\t\t\t']'.\r\t\t\t^ aWindow setLabel: newLabel]]\r\t\t\t\r\r! !\r\r!MessageSet methodsFor: 'private'!\rautoSelectString\r\t\"Return the string to be highlighted when making new selections\"\r\t^ autoSelectString! !\r\r!MessageSet methodsFor: 'private'!\rautoSelectString: aString\r\t\"Set the string to be highlighted when making new selections\"\r\tautoSelectString _ aString! !\r\r!MessageSet methodsFor: 'private' stamp: 'sw 7/31/2002 12:58'!\rcontents: aString notifying: aController \r\t\"Compile the code in aString. Notify aController of any syntax errors. \r\tAnswer false if the compilation fails. Otherwise, if the compilation \r\tcreated a new method, deselect the current selection. Then answer true.\"\r\r\t| category selector class oldSelector |\r\tself okayToAccept ifFalse: [^ false].\r\tself setClassAndSelectorIn: [:c :os | class _ c.  oldSelector _ os].\r\tclass ifNil: [^ false].\r\t(oldSelector ~~ nil and: [oldSelector first isUppercase]) ifTrue:\r\t\t[oldSelector = #Comment ifTrue:\r\t\t\t[class comment: aString stamp: Utilities changeStamp.\r\t\t\tself changed: #annotation.\r \t\t\tself clearUserEditFlag.\r\t\t\t^ false].\r\t\toldSelector = #Definition ifTrue:\r\t\t\t[\"self defineClass: aString notifying: aController.\"\r\t\t\tclass subclassDefinerClass\r\t\t\t\tevaluate: aString\r\t\t\t\tnotifying: aController\r\t\t\t\tlogged: true.\r\t\t\tself clearUserEditFlag.\r \t\t\t^ false].\r\t\toldSelector = #Hierarchy ifTrue:\r\t\t\t[self inform: 'To change the hierarchy, edit the class definitions'. \r\t\t\t^ false]].\r\t\"Normal method accept\"\r\tcategory _ class organization categoryOfElement: oldSelector.\r\tselector _ class compile: aString\r\t\t\t\tclassified: category\r\t\t\t\tnotifying: aController.\r\tselector == nil ifTrue: [^ false].\r\tself noteAcceptanceOfCodeFor: selector.\r\tselector == oldSelector ifFalse:\r\t\t[self reformulateListNoting: selector].\r\tcontents _ aString copy.\r\tself changed: #annotation.\r\t^ true! !\r\r!MessageSet methodsFor: 'private' stamp: 'ff 12/13/2003 02:38'!\rinitializeMessageList: anArray\r\t| s |\r\r\tmessageList _ OrderedCollection new.\r\tanArray do: [ :each |\r\t\tMessageSet \r\t\t\tparse: each  \r\t\t\ttoClassAndSelector: [ :class :sel |\r\t\t\t\tclass ifNotNil: [\r\t\t\t\t\ts _ class name , ' ' , sel , ' {' , \r\t\t\t\t\t\t((class organization categoryOfElement: sel) ifNil: ['']) , '}'.\r\t\t\t\t\tmessageList add: (\r\t\t\t\t\t\tMethodReference new\r\t\t\t\t\t\t\tsetClass: class  \r\t\t\t\t\t\t\tmethodSymbol: sel \r\t\t\t\t\t\t\tstringVersion: s\r\t\t\t\t\t)\r\t\t\t\t]\r\t\t\t]\r\t].\r\tmessageListIndex _ messageList isEmpty ifTrue: [0 ] ifFalse: [1].\r\tcontents _ ''! !\r\r!MessageSet methodsFor: 'private' stamp: 'sw 6/13/2001 00:59'!\ropenAsMorphNamed: labelString inWorld: aWorld\r\t\"Open the receiver in a morphic window in the given world\"\r\r\t(self inMorphicWindowLabeled: labelString) openInWorld: aWorld! !\r\r!MessageSet methodsFor: 'private' stamp: 'sw 12/28/2000 14:28'!\rselection\r\t\"Answer the item in the list that is currently selected, or nil if no selection is present\"\r\r\t^ messageList at: messageListIndex ifAbsent: [nil]! !\r\r!MessageSet methodsFor: 'private' stamp: 'RAA 5/29/2001 10:12'!\rsetClassAndSelectorIn: csBlock\r\t| sel |\r\t\"Decode strings of the form <className> [class] <selectorName>.\"\r\r\tself flag: #mref.\t\"compatibility with pre-MethodReference lists\"\r\r\tsel _ self selection.\r\t^(sel isKindOf: MethodReference) ifTrue: [\r\t\tsel setClassAndSelectorIn: csBlock\r\t] ifFalse: [\r\t\tMessageSet parse: sel toClassAndSelector: csBlock\r\t]! !\r\r!MessageSet methodsFor: 'private' stamp: 'sw 1/11/2001 09:18'!\rsetFilteredList: newList\r\t\"Establish newList as the new list if appropriate, and adjust the window title accordingly; if the new list is of the same size as the old, warn and do nothing\"\r\r\tnewList size == 0\r\t\tifTrue:\r\t\t\t[^ self inform: 'Nothing would be left in the list if you did that'].\r\tnewList size == messageList size\r\t\tifTrue:\r\t\t\t[^ self inform: 'That leaves the list unchanged'].\r\tself initializeMessageList: newList.\r\tself adjustWindowTitleAfterFiltering! !\r\r\r!MessageSet methodsFor: 'filtering' stamp: 'sw 1/19/2001 16:47'!\raugmentMessageList\r\t\"Allow the user to add to the list of messages.\"\r\r\tself notYetImplemented\r! !\r\r!MessageSet methodsFor: 'filtering' stamp: 'sw 1/11/2001 09:33'!\rfilterFrom: aBlock\r\t\"Filter the receiver's list down to only those items that satisfy aBlock, which takes a class an a selector as its arguments.\"\r\r\t| newList |\r\tnewList _ messageList select:\r\t\t[:anElement |\r\t\t\tself class parse: anElement toClassAndSelector: aBlock].\r\tself setFilteredList: newList! !\r\r!MessageSet methodsFor: 'filtering' stamp: 'sw 6/6/2001 12:55'!\rfilterToAnyChangeSet\r\t\"Filter down only to messages present in ANY change set\"\r\r\tself filterFrom:\r\t\t[:aClass :aSelector |\r\t\t\tChangeSorter doesAnyChangeSetHaveClass: aClass andSelector: aSelector]\r! !\r\r!MessageSet methodsFor: 'filtering' stamp: 'sw 8/10/2001 14:45'!\rfilterToCommentedMethods\r\t\"Filter the receiver's list down to only those items which have comments\"\r\r\tself filterFrom:\r\t\t[:aClass :aSelector |\r\t\t\t(aClass selectors includes: aSelector) and:\r\t\t\t\t\t\t[(aClass firstPrecodeCommentFor: aSelector) isEmptyOrNil not]]! !\r\r!MessageSet methodsFor: 'filtering' stamp: 'sw 2/14/2001 18:30'!\rfilterToCurrentAuthor\r\t\"Filter down only to messages with my initials as most recent author\"\r\r\t| myInitials aMethod aTimeStamp |\r\t(myInitials _ Utilities authorInitialsPerSe) ifNil: [^ self inform: 'No author initials set in this image'].\r\tself filterFrom:\r\t\t[:aClass :aSelector |\r\t\t\t(aClass notNil and: [aSelector notNil]) and:\t\t\t\r\t\t\t\t[aMethod _ aClass compiledMethodAt: aSelector ifAbsent: [nil].\r\t\t\t\taMethod notNil and:\r\t\t\t\t\t[(aTimeStamp _ Utilities timeStampForMethod: aMethod) notNil and:\r\t\t\t\t\t\t[aTimeStamp beginsWith: myInitials]]]]! !\r\r!MessageSet methodsFor: 'filtering' stamp: 'sd 5/23/2003 14:38'!\rfilterToCurrentChangeSet\r\t\"Filter the receiver's list down to only those items in the current change set\"\r\r\tself filterFrom:\r\t\t[:aClass :aSelector |\r\t\t\t(aClass notNil and: [aSelector notNil]) and:\r\t\t\t\t[(ChangeSet current atSelector: aSelector class: aClass) ~~ #none]]! !\r\r!MessageSet methodsFor: 'filtering' stamp: 'sw 8/10/2001 14:33'!\rfilterToImplementorsOf\r\t\"Filter the receiver's list down to only those items with a given selector\"\r\r\t| aFragment inputWithBlanksTrimmed |\r\r\taFragment _ FillInTheBlank request: 'type selector:' initialAnswer: ''.\r\taFragment  isEmptyOrNil ifTrue: [^ self].\r\tinputWithBlanksTrimmed _ aFragment withBlanksTrimmed.\r\tSymbol hasInterned: inputWithBlanksTrimmed ifTrue:\r\t\t[:aSymbol | \r\t\t\tself filterFrom:\r\t\t\t\t[:aClass :aSelector |\r\t\t\t\t\taSelector == aSymbol]]! !\r\r!MessageSet methodsFor: 'filtering' stamp: 'sw 6/6/2001 15:14'!\rfilterToMessagesInChangesFile\r\t\"Filter down only to messages whose source code risides in the Changes file.  This allows one to ignore long-standing methods that live in the .sources file.\"\r\r\t| cm |\r\tself filterFrom:\r\t\t[:aClass :aSelector |\r\t\t\taClass notNil and: [aSelector notNil and:\r\t\t\t\t[(self class isPseudoSelector: aSelector) not and:\r\t\t\t\t\t[(cm _ aClass compiledMethodAt: aSelector ifAbsent: [nil]) notNil and:\r\t\t\t\t\t[cm fileIndex ~~ 1]]]]]! !\r\r!MessageSet methodsFor: 'filtering' stamp: 'sw 6/6/2001 15:15'!\rfilterToMessagesInSourcesFile\r\t\"Filter down only to messages whose source code resides in the .sources file.\"\r\r\t| cm |\r\tself filterFrom: [:aClass :aSelector |\r\t\t(aClass notNil and: [aSelector notNil]) and:\r\t\t\t[(self class isPseudoSelector: aSelector) not and:\r\t\t\t\t[(cm _ aClass compiledMethodAt: aSelector ifAbsent: [nil]) notNil and:\r\t\t\t\t\t[cm fileIndex == 1]]]]! !\r\r!MessageSet methodsFor: 'filtering' stamp: 'sw 6/6/2001 14:10'!\rfilterToMessagesThat\r\t\"Allow the user to type in a block which will be\"\r\r\t| reply |\r\treply _ FillInTheBlank\r\t\tmultiLineRequest: 'Type your block here'\r\t\tcenterAt: Sensor cursorPoint\r\t\tinitialAnswer: '[:aClass :aSelector |\r\t\r\t]'\r\t\tanswerHeight: 200.\r\treply isEmptyOrNil ifTrue: [^ self].\r\tself filterFrom: (Compiler evaluate: reply)\r! !\r\r!MessageSet methodsFor: 'filtering' stamp: 'sw 2/13/2001 12:02'!\rfilterToMessagesWithHardenedClasses\r\t\"Filter the receiver's list down to only those items representing methods of hardened classes, as opposed to uniclasses\"\r\r\tself filterFrom:\r\t\t[:aClass :aSelector |\r\t\t\t(aClass notNil and: [aSelector notNil]) and:\r\t\t\t\t[aClass isUniClass not]]! !\r\r!MessageSet methodsFor: 'filtering' stamp: 'sw 8/12/2001 22:25'!\rfilterToMessagesWithPriorVersions\r\t\"Filter down only to messages which have at least one prior version\"\r\r\tself filterFrom:\r\t\t[:aClass :aSelector |\r\t\t\t(aClass notNil and: [aSelector notNil]) and:\r\t\t\t\t[(self class isPseudoSelector: aSelector) not and:\r\t\t\t\t\t[(VersionsBrowser versionCountForSelector: aSelector class: aClass) > 1]]]! !\r\r!MessageSet methodsFor: 'filtering' stamp: 'sw 6/6/2001 15:12'!\rfilterToMessagesWithoutPriorVersions\r\t\"Filter down only to messages which have no prior version stored\"\r\r\tself filterFrom:\r\t\t[:aClass :aSelector |\r\t\t\t(aClass notNil and: [aSelector notNil]) and:\r\t\t\t\t[(self class isPseudoSelector: aSelector) not and:\r\t\t\t\t\t[(VersionsBrowser versionCountForSelector: aSelector class: aClass) <= 1]]]! !\r\r!MessageSet methodsFor: 'filtering' stamp: 'sw 6/6/2001 13:07'!\rfilterToNotAnyChangeSet\r\t\"Filter down only to messages present in NO change set\"\r\r\tself filterFrom:\r\t\t[:aClass :aSelector |\r\t\t\t(ChangeSorter doesAnyChangeSetHaveClass: aClass andSelector: aSelector) not]\r! !\r\r!MessageSet methodsFor: 'filtering' stamp: 'sw 2/14/2001 18:24'!\rfilterToNotCurrentAuthor\r\t\"Filter down only to messages not stamped with my initials\"\r\r\t| myInitials aMethod aTimeStamp |\r\t(myInitials _ Utilities authorInitialsPerSe) ifNil: [^ self inform: 'No author initials set in this image'].\r\tself filterFrom:\r\t\t[:aClass :aSelector |\r\t\t\t(aClass notNil and: [aSelector notNil]) and:\t\t\t\r\t\t\t\t[aMethod _ aClass compiledMethodAt: aSelector ifAbsent: [nil].\r\t\t\t\taMethod notNil and:\r\t\t\t\t\t[(aTimeStamp _ Utilities timeStampForMethod: aMethod) isNil or:\r\t\t\t\t\t\t[(aTimeStamp beginsWith: myInitials) not]]]]! !\r\r!MessageSet methodsFor: 'filtering' stamp: 'sd 5/23/2003 14:38'!\rfilterToNotCurrentChangeSet\r\t\"Filter the receiver's list down to only those items not in the current change set\"\r\r\tself filterFrom:\r\t\t[:aClass :aSelector |\r\t\t\t(aClass notNil and: [aSelector notNil]) and:\r\t\t\t\t[(ChangeSet current atSelector: aSelector class: aClass) == #none]]! !\r\r!MessageSet methodsFor: 'filtering' stamp: 'sw 8/10/2001 14:34'!\rfilterToNotImplementorsOf\r\t\"Filter the receiver's list down to only those items whose selector is NOT one solicited from the user.\"\r\r\t| aFragment inputWithBlanksTrimmed |\r\r\taFragment _ FillInTheBlank request: 'type selector: ' initialAnswer: ''.\r\taFragment  isEmptyOrNil ifTrue: [^ self].\r\tinputWithBlanksTrimmed _ aFragment withBlanksTrimmed.\r\tSymbol hasInterned: inputWithBlanksTrimmed ifTrue:\r\t\t[:aSymbol | \r\t\t\tself filterFrom:\r\t\t\t\t[:aClass :aSelector |\r\t\t\t\t\taSelector ~~ aSymbol]]! !\r\r!MessageSet methodsFor: 'filtering' stamp: 'sw 8/12/2001 13:11'!\rfilterToNotSendersOf\r\t\"Filter the receiver's list down to only those items which do not send a given selector\"\r\r\t| aFragment inputWithBlanksTrimmed aMethod |\r\r\taFragment _ FillInTheBlank request: 'type selector:' initialAnswer: ''.\r\taFragment  isEmptyOrNil ifTrue: [^ self].\r\tinputWithBlanksTrimmed _ aFragment withBlanksTrimmed.\r\tSymbol hasInterned: inputWithBlanksTrimmed ifTrue:\r\t\t[:aSymbol | \r\t\t\tself filterFrom:\r\t\t\t\t[:aClass :aSelector |\r\t\t\t\t\t(aMethod _ aClass compiledMethodAt: aSelector) isNil or:\r\t\t\t\t\t\t[(aMethod hasLiteralThorough: aSymbol) not]]]! !\r\r!MessageSet methodsFor: 'filtering' stamp: 'sw 1/19/2001 15:58'!\rfilterToSendersOf\r\t\"Filter the receiver's list down to only those items which send a given selector\"\r\r\t| aFragment inputWithBlanksTrimmed aMethod |\r\r\taFragment _ FillInTheBlank request: 'type selector:' initialAnswer: ''.\r\taFragment  isEmptyOrNil ifTrue: [^ self].\r\tinputWithBlanksTrimmed _ aFragment withBlanksTrimmed.\r\tSymbol hasInterned: inputWithBlanksTrimmed ifTrue:\r\t\t[:aSymbol | \r\t\t\tself filterFrom:\r\t\t\t\t[:aClass :aSelector |\r\t\t\t\t\t(aMethod _ aClass compiledMethodAt: aSelector) notNil and:\r\t\t\t\t\t\t[aMethod hasLiteralThorough: aSymbol]]]\r\r! !\r\r!MessageSet methodsFor: 'filtering' stamp: 'sw 8/10/2001 14:43'!\rfilterToUncommentedMethods\r\t\"Filter the receiver's list down to only those items which lack comments\"\r\r\tself filterFrom:\r\t\t[:aClass :aSelector |\r\t\t\t(aClass selectors includes: aSelector) and:\r\t\t\t\t\t\t[(aClass firstPrecodeCommentFor: aSelector) isEmptyOrNil]]! !\r\r!MessageSet methodsFor: 'filtering' stamp: 'sd 4/29/2003 12:24'!\rfilterToUnsentMessages\r\t\"Filter the receiver's list down to only those items which have no  \r\tsenders\"\r\tself\r\t\tfilterFrom: [:aClass :aSelector | (self systemNavigation allCallsOn: aSelector) isEmpty]! !\r\r\r!MessageSet methodsFor: 'message category functions' stamp: 'sw 10/8/2001 14:10'!\rcanShowMultipleMessageCategories\r\t\"Answer whether the receiver is capable of showing multiple message categories\"\r\r\t^ false! !\r\r\r!MessageSet methodsFor: 'metaclass' stamp: 'sw 8/15/2002 22:23'!\rclassCommentIndicated\r\t\"Answer true iff we're viewing the class comment.\"\r\r\t^ self selectedMessageName == #Comment! !\r\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rMessageSet class\r\tinstanceVariableNames: ''!\r\r!MessageSet class methodsFor: 'instance creation'!\rmessageList: anArray \r\t\"Answer an instance of me with message list anArray.\"\r\r\t^self new initializeMessageList: anArray! !\r\r!MessageSet class methodsFor: 'instance creation' stamp: 'BG 10/29/2003 08:40'!\ropen: aMessageSet name: aString \r\t\"Create a standard system view for the messageSet, aMessageSet, whose label is aString.\"\r\t| topView aListView aBrowserCodeView aTextView underPane y buttonsView winWidth |\r\r\twinWidth _ 200.\r\ttopView _ (StandardSystemView new) model: aMessageSet.\r\ttopView label: aString.\r\ttopView minimumSize: winWidth @ 120.\r\ttopView borderWidth: 1.\r\r\taListView _ PluggableListView on: aMessageSet\r\t\tlist: #messageList\r\t\tselected: #messageListIndex\r\t\tchangeSelected: #messageListIndex:\r\t\tmenu: #messageListMenu:shifted:\r\t\tkeystroke: #messageListKey:from:.\r\taListView  menuTitleSelector: #messageListSelectorTitle.\r\taListView window: (0 @ 0 extent: winWidth @ 100).\r\ttopView addSubView: aListView.\r\r\taMessageSet  wantsAnnotationPane\r\t\tifTrue:\r\t\t\t[aTextView _ PluggableTextView on: aMessageSet \r\t\t\ttext: #annotation accept: nil\r\t\t\treadSelection: nil menu: nil.\r\t\t\taTextView window: (0 @ 0 extent: winWidth @ 24).\r\t\t\ttopView addSubView: aTextView below: aListView.\r\t\t\tunderPane _ aTextView.\r\t\t\ty _ 300 - 24.\r\t\t\taTextView askBeforeDiscardingEdits: false]\r\t\tifFalse:\r\t\t\t[underPane _ aListView.\r\t\t\ty _ 300].\r\r\taMessageSet wantsOptionalButtons ifTrue:\r\t\t[buttonsView _ aMessageSet buildOptionalButtonsView.\r\t\ttopView addSubView: buttonsView below: underPane.\r\t\tunderPane _ buttonsView.\r\t\ty _ y - aMessageSet optionalButtonHeight].\r\r\taBrowserCodeView _ PluggableTextView on: aMessageSet \r\t\t\ttext: #contents accept: #contents:notifying:\r\t\t\treadSelection: #contentsSelection menu: #codePaneMenu:shifted:.\r\taBrowserCodeView window: (0 @ 0 extent: winWidth @ y).\r\ttopView addSubView: aBrowserCodeView below: underPane.\r\ttopView setUpdatablePanesFrom: #(messageList).\r\ttopView controller open! !\r\r!MessageSet class methodsFor: 'instance creation'!\ropenMessageList: anArray name: aString \r\t\"Create a standard system view for the message set on the list, anArray. \r\tThe label of the view is aString.\"\r\r\tself open: (self messageList: anArray) name: aString! !\r\r!MessageSet class methodsFor: 'instance creation' stamp: 'ssa 9/3/2008 11:07'!\ropenMessageList: messageList name: labelString autoSelect: autoSelectString\r\t\"Open a system view for a MessageSet on messageList. \r\t 1/24/96 sw: the there-are-no msg now supplied by my sender\"\r\r\t| messageSet |\r\tmessageSet _ self messageList: messageList.\r\tmessageSet autoSelectString: autoSelectString.\r\tScheduledControllers scheduleActive: (self open: messageSet name: labelString)! !\r\r\r!MessageSet class methodsFor: 'utilities' stamp: 'RAA 5/29/2001 10:19'!\rextantMethodsIn: aListOfMethodRefs\r\t\"Answer the subset of the incoming list consisting only of those message markers that refer to methods actually in the current image\"\r\r\r\tself flag: #mref.\t\"may be removed in second round\"\r\r\r\t^ aListOfMethodRefs select: [:aToken |\r\t\tself \r\t\t\tparse: aToken \r\t\t\ttoClassAndSelector: [ :aClass :aSelector |\r\t\t\t\taClass notNil and: [aClass includesSelector: aSelector]\r\t\t\t]\r\t]! !\r\r!MessageSet class methodsFor: 'utilities' stamp: 'sw 6/6/2001 15:09'!\risPseudoSelector: aSelector\r\t\"Answer whether the given selector is a special marker\"\r\r\t^ #(Comment Definition Hierarchy) includes: aSelector! !\r\r!MessageSet class methodsFor: 'utilities' stamp: 'bkv 4/2/2003 11:33'!\rparse: methodRef toClassAndSelector: csBlock\r\t\"Decode strings of the form <className> [class] <selectorName>.\"\r\r\t| tuple cl |\r\r\r\tself flag: #mref.\t\"compatibility with pre-MethodReference lists\"\r\r\tmethodRef ifNil: [^ csBlock value: nil value: nil].\r\t(methodRef isKindOf: MethodReference) ifTrue: [\r\t\t^methodRef setClassAndSelectorIn: csBlock\r\t].\r\tmethodRef isEmpty ifTrue: [^ csBlock value: nil value: nil].\r\ttuple _ methodRef asString findTokens: ' .'.\r\tcl _ Smalltalk atOrBelow: tuple first asSymbol ifAbsent: [^ csBlock value: nil value: nil].\r\t(tuple size = 2 or: [tuple size > 2 and: [(tuple at: 2) ~= 'class']])\r\t\tifTrue: [^ csBlock value: cl value: (tuple at: 2) asSymbol]\r\t\tifFalse: [^ csBlock value: cl class value: (tuple at: 3) asSymbol]! !\r\rMagnitude subclass: #MessageTally\r\tinstanceVariableNames: 'class method tally receivers senders time gcStats maxClassNameSize maxClassPlusSelectorSize maxTabs'\r\tclassVariableNames: 'DefaultPollPeriod ObservedProcess Timer'\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Debugger'!\r!MessageTally commentStamp: 'nk 3/8/2004 12:43' prior: 0!\rMy instances observe and report the amount of time spent in methods.\r\rNOTE: a higher-level user interface (combining the MessageTally result tree with a method browser) is available from TimeProfileBrowser.\r\rMessageTally provides two different strategies available for profiling:\r\r* spyOn: and friends use a high-priority Process to interrupt the block or process being spied on at periodic intervals. The interrupted call stack is then examined for caller information.\r\r* tallySends: and friends use the interpreter simulator to run the block, recording every method call.\r\rThe two give you different results:\r\r* spyOn: gives you a view of where the time is being spent in your program, at least on a rough statistical level (assuming you've run the block for long enough and have a high enough poll rate). If you're trying to optimize your code, start here and optimize the methods where most of the time is being spent first.\r\r* tallySends: gives you accurate counts of how many times methods get called, and by exactly which route. If you're debugging, or trying to figure out if a given method is getting called too many times, this is your tool.\r\rYou can change the printing format (that is, the whitespace and string compression) by using these instance methods: \r\tmaxClassNameSize:\r\tmaxClassPlusSelectorSize:\r\tmaxTabs:\r\rYou can change the default polling period (initially set to 1) by calling\r\tMessageTally defaultPollPeriod: numberOfMilliseconds\r\rQ: How do you interpret MessageTally>>tallySends\rA: The methods #tallySends and #spyOn: measure two very different quantities, but broken down in the same who-called-who format.  #spyOn: is approximate, but more indicative of real time spent, whereas #tallySends is exact and a precise record of how many times each method got executed.!\r\r\r!MessageTally methodsFor: 'comparing'!\r< aMessageTally \r\t\"Refer to the comment in Magnitude|<.\"\r\r\t^tally > aMessageTally tally! !\r\r!MessageTally methodsFor: 'comparing' stamp: 'tk 7/5/2001 22:05'!\r= aMessageTally\r\r\tself species == aMessageTally species ifFalse: [^ false].\r\t^ aMessageTally method == method! !\r\r!MessageTally methodsFor: 'comparing'!\r> aMessageTally \r\t\"Refer to the comment in Magnitude|>.\"\r\r\t^tally < aMessageTally tally! !\r\r!MessageTally methodsFor: 'comparing'!\rhash\r\t\"Hash is reimplemented because = is implemented.\"\r\r\t^method asOop! !\r\r!MessageTally methodsFor: 'comparing' stamp: 'tk 7/5/2001 22:04'!\rspecies\r\t^MessageTally! !\r\r\r!MessageTally methodsFor: 'initialize-release'!\rclose\r\r\t(Timer isMemberOf: Process) ifTrue: [Timer terminate].\r\tTimer _ ObservedProcess _ nil.\r\tclass _ method _ tally _ receivers _ nil! !\r\r!MessageTally methodsFor: 'initialize-release' stamp: 'nk 3/8/2004 12:29'!\rinitialize\r\tmaxClassNameSize _ self class defaultMaxClassNameSize.\r\tmaxClassPlusSelectorSize _ self class defaultMaxClassPlusSelectorSize.\r\tmaxTabs _ self class defaultMaxTabs.! !\r\r\r!MessageTally methodsFor: 'printing' stamp: 'nk 3/8/2004 12:14'!\rprintOn: aStream \r\t| aSelector className aClass |\r\t(class isNil or: [method isNil]) ifTrue: [^super printOn: aStream].\r\taSelector := class selectorAtMethod: method setClass: [:c | aClass := c].\r\tclassName := aClass name contractTo: self maxClassNameSize.\r\taStream\r\t\tnextPutAll: className;\r\t\tnextPutAll: ' >> ';\r\t\tnextPutAll: (aSelector \r\t\t\t\t\tcontractTo: self maxClassPlusSelectorSize - className size)! !\r\r\r!MessageTally methodsFor: 'printing format' stamp: 'nk 3/8/2004 12:29'!\rmaxClassNameSize\r\t^maxClassNameSize! !\r\r!MessageTally methodsFor: 'printing format' stamp: 'nk 3/8/2004 12:29'!\rmaxClassPlusSelectorSize\r\t^maxClassPlusSelectorSize! !\r\r\r!MessageTally methodsFor: 'reporting' stamp: 'stp 05/08/1999 12:06'!\rtally\r\t\"Answer the receiver's number of tally.\"\r\r\t^tally! !\r\r!MessageTally methodsFor: 'reporting' stamp: 'stp 05/08/1999 11:47'!\rtime\r\t\"Answer the receiver's run time.\"\r\r\t^time! !\r\r\r!MessageTally methodsFor: 'private'!\rmethod\r\r\t^method! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rMessageTally class\r\tinstanceVariableNames: ''!\r\r!MessageTally class methodsFor: 'defaults' stamp: 'nk 3/8/2004 12:27'!\rdefaultMaxClassNameSize\r\t\"Return the default maximum width of the class name alone\"\r\t^30! !\r\r!MessageTally class methodsFor: 'defaults' stamp: 'nk 3/8/2004 12:27'!\rdefaultMaxClassPlusSelectorSize\r\t\"Return the default maximum width of the class plus selector together (not counting the '>>')\"\r\t^60! !\r\r!MessageTally class methodsFor: 'defaults' stamp: 'nk 3/8/2004 12:26'!\rdefaultMaxTabs\r\t\"Return the default number of tabs after which leading white space is compressed\"\r\t^18! !\rClassDescription subclass: #Metaclass\r\tinstanceVariableNames: 'thisClass'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Classes'!\r!Metaclass commentStamp: '<historical>' prior: 0!\rMy instances add instance-specific behavior to various class-describing objects in the system. This typically includes messages for initializing class variables and instance creation messages particular to a class. There is only one instance of a particular Metaclass, namely the class which is being described. A Metaclass shares the class variables of its instance.\r\t\r[Subtle] In general, the superclass hierarchy for metaclasses parallels that for classes. Thus,\r\tInteger superclass == Number, and\r\tInteger class superclass == Number class.\rHowever there is a singularity at Object. Here the class hierarchy terminates, but the metaclass hierarchy must wrap around to Class, since ALL metaclasses are subclasses of Class. Thus,\r\tObject superclass == nil, and\r\tObject class superclass == Class.\r\r[Subtle detail] A class is know by name to an environment.  Typically this is the SystemDictionary named Smalltalk.  If we ever make lightweight classes that are not in Smalltalk, they must be in some environment.  Specifically, the code that sets 'wasPresent' in name:inEnvironment:subclassOf:instanceVariableNames:variable:words:pointers:classVariableNames:poolDictionaries:category:comment:changed: must continue to work.!\r\r\r!Metaclass methodsFor: 'initialize-release' stamp: 'ar 7/13/1999 04:52'!\radoptInstance: oldInstance from: oldMetaClass \r\t\"Recreate any existing instances of the argument, oldClass, as instances of \r\tthe receiver, which is a newly changed class. Permute variables as \r\tnecessary.\"\r\tthisClass class == self ifTrue:[^self error:'Metaclasses have only one instance'].\r\toldMetaClass isMeta ifFalse:[^self error:'Argument must be Metaclass'].\r\toldInstance class == oldMetaClass ifFalse:[^self error:'Not the class of argument'].\r\t^thisClass _ self \r\t\tnewInstanceFrom: oldInstance \r\t\tvariable: self isVariable \r\t\tsize: self instSize \r\t\tmap: (self instVarMappingFrom: oldMetaClass)! !\r\r!Metaclass methodsFor: 'initialize-release' stamp: 'ar 7/15/1999 18:56'!\rinstanceVariableNames: instVarString \r\t\"Declare additional named variables for my instance.\"\r\t^(ClassBuilder new)\r\t\tclass: self\r\t\tinstanceVariableNames: instVarString! !\r\r\r!Metaclass methodsFor: 'accessing' stamp: 'ar 7/11/1999 08:14'!\rallInstances\r\tthisClass class == self ifTrue:[^Array with: thisClass].\r\t^super allInstances! !\r\r!Metaclass methodsFor: 'accessing' stamp: 'ar 7/11/1999 05:19'!\renvironment\r\t^thisClass environment! !\r\r!Metaclass methodsFor: 'accessing'!\risMeta\r\t^ true! !\r\r!Metaclass methodsFor: 'accessing' stamp: 'tk 6/17/1998 09:48'!\risSystemDefined\r\t\"Answer false if I am a UniClass (an instance-specific lightweight class)\"\r\r\t^ true! !\r\r!Metaclass methodsFor: 'accessing'!\rname\r\t\"Answer a String that is the name of the receiver, either 'Metaclass' or \r\tthe name of the receiver's class followed by ' class'.\"\r\r\tthisClass == nil\r\t\tifTrue: [^'a Metaclass']\r\t\tifFalse: [^thisClass name , ' class']! !\r\r!Metaclass methodsFor: 'accessing'!\rsoleInstance\r\t\"The receiver has only one instance. Answer it.\"\r\r\t^thisClass! !\r\r!Metaclass methodsFor: 'accessing'!\rtheNonMetaClass\r\t\"Sent to a class or metaclass, always return the class\"\r\r\t^thisClass! !\r\r\r!Metaclass methodsFor: 'copying'!\rcopy\r\t\"Make a copy of the receiver without a list of subclasses. Share the \r\treference to the sole instance.\"\r\r\t| copy t |\r\tt _ thisClass.\r\tthisClass _ nil.\r\tcopy _ super copy.\r\tthisClass _ t.\r\t^copy! !\r\r!Metaclass methodsFor: 'copying' stamp: 'tk 8/19/1998 16:16'!\rveryDeepCopyWith: deepCopier\r\t\"Return self.  Must be created, not copied.  Do not record me.\"! !\r\r\r!Metaclass methodsFor: 'instance creation' stamp: 'nk 11/9/2003 10:00'!\rnew\r\t\"The receiver can only have one instance. Create it or complain that\r\tone already exists.\"\r\r\tthisClass class ~~ self\r\t\tifTrue: [^thisClass _ self basicNew]\r\t\tifFalse: [self error: 'A Metaclass should only have one instance!!']! !\r\r\r!Metaclass methodsFor: 'instance variables'!\raddInstVarName: aString \r\t\"Add the argument, aString, as one of the receiver's instance variables.\"\r\r\t| fullString |\r\tfullString _ aString.\r\tself instVarNames do: [:aString2 | fullString _ aString2 , ' ' , fullString].\r\tself instanceVariableNames: fullString! !\r\r\r!Metaclass methodsFor: 'pool variables'!\rclassPool\r\t\"Answer the dictionary of class variables.\"\r\r\t^thisClass classPool! !\r\r\r!Metaclass methodsFor: 'class hierarchy' stamp: 'ar 9/19/2002 23:44'!\raddObsoleteSubclass: aClass\r\t\"Do nothing.\"! !\r\r!Metaclass methodsFor: 'class hierarchy' stamp: 'ar 7/11/1999 15:43'!\raddSubclass: aClass\r\t\"Do nothing.\"! !\r\r!Metaclass methodsFor: 'class hierarchy' stamp: 'ar 9/19/2002 23:44'!\robsoleteSubclasses\r\t\"Answer the receiver's subclasses.\"\r\tthisClass == nil ifTrue:[^#()].\r\t^thisClass obsoleteSubclasses \r\t\tselect:[:aSubclass| aSubclass isMeta not] \r\t\tthenCollect:[:aSubclass| aSubclass class]\r\r\t\"Metaclass allInstancesDo:\r\t\t[:m | Compiler evaluate: 'subclasses_nil' for: m logged: false]\"! !\r\r!Metaclass methodsFor: 'class hierarchy' stamp: 'ar 9/19/2002 23:44'!\rremoveObsoleteSubclass: aClass\r\t\"Do nothing.\"! !\r\r!Metaclass methodsFor: 'class hierarchy' stamp: 'ar 7/11/1999 15:43'!\rremoveSubclass: aClass\r\t\"Do nothing.\"! !\r\r!Metaclass methodsFor: 'class hierarchy' stamp: 'ar 7/14/1999 11:19'!\rsubclasses\r\t\"Answer the receiver's subclasses.\"\r\tthisClass == nil ifTrue:[^#()].\r\t^thisClass subclasses \r\t\tselect:[:aSubclass| aSubclass isMeta not] \r\t\tthenCollect:[:aSubclass| aSubclass class]\r\r\t\"Metaclass allInstancesDo:\r\t\t[:m | Compiler evaluate: 'subclasses_nil' for: m logged: false]\"! !\r\r!Metaclass methodsFor: 'class hierarchy' stamp: 'ar 7/9/1999 14:11'!\rsubclassesDo: aBlock\r\t\"Evaluate aBlock for each of the receiver's immediate subclasses.\"\r\tthisClass subclassesDo:[:aSubclass|\r\t\t\"The following test is for Class class which has to exclude\r\t\tthe Metaclasses being subclasses of Class.\"\r\t\taSubclass isMeta ifFalse:[aBlock value: aSubclass class]].! !\r\r!Metaclass methodsFor: 'class hierarchy' stamp: 'tk 8/18/1999 17:37'!\rsubclassesDoGently: aBlock\r\t\"Evaluate aBlock for each of the receiver's immediate subclasses.\"\r\tthisClass subclassesDo: [:aSubclass |\r\t\t\"The following test is for Class class which has to exclude\r\t\t\tthe Metaclasses being subclasses of Class.\"\r\t\taSubclass isInMemory ifTrue: [\r\t\t\taSubclass isMeta ifFalse: [aBlock value: aSubclass class]]].! !\r\r\r!Metaclass methodsFor: 'compiling'!\racceptsLoggingOfCompilation\r\t\"Answer whether the receiver's method submisions and class defintions should be logged to the changes file and to the current change set.  The metaclass follows the rule of the class itself.  6/18/96 sw\"\r\r\t^ thisClass acceptsLoggingOfCompilation! !\r\r!Metaclass methodsFor: 'compiling' stamp: 'ar 5/18/2003 18:13'!\rbindingOf: varName\r\r\t^thisClass classBindingOf: varName! !\r\r!Metaclass methodsFor: 'compiling'!\rpossibleVariablesFor: misspelled continuedFrom: oldResults\r\r\t^ thisClass possibleVariablesFor: misspelled continuedFrom: oldResults\r! !\r\r!Metaclass methodsFor: 'compiling'!\rwantsChangeSetLogging\r\t\"Answer whether code submitted for the receiver should be remembered by the changeSet mechanism.The metaclass follows the rule of the class itself.  7/12/96 sw\"\r\r\t^ thisClass wantsChangeSetLogging! !\r\r!Metaclass methodsFor: 'compiling' stamp: 'sw 7/31/2000 14:29'!\rwantsRecompilationProgressReported\r\t\"The metaclass follows the rule of the class itself.\"\r\r\t^ thisClass wantsRecompilationProgressReported! !\r\r\r!Metaclass methodsFor: 'fileIn/Out' stamp: 'sma 6/25/2000 16:30'!\rdefinitionST80\r\t\"Refer to the comment in ClassDescription|definition.\"\r\r\t^ String streamContents: \r\t\t[:strm |\r\t\tstrm print: self;\r\t\t\tcrtab;\r\t\t\tnextPutAll: 'instanceVariableNames: ';\r\t\t\tstore: self instanceVariablesString]! !\r\r!Metaclass methodsFor: 'fileIn/Out' stamp: 'di 6/7/2000 22:50'!\rdefinitionST80: isST80\r\t\"Refer to the comment in ClassDescription|definition.\"\r\r\tisST80 ifTrue: [^ self definitionST80].\r\r\t^ String streamContents: \r\t\t[:strm |\r\t\tstrm print: self;\r\t\t\tnextPutKeyword: ' instanceVariableNames: '\r\t\t\t\twithArg: self instanceVariablesString]! !\r\r!Metaclass methodsFor: 'fileIn/Out' stamp: 'di 2/17/2000 22:33'!\rfileOutInitializerOn: aStream\r\t(self methodDict includesKey: #initialize) ifTrue: \r\t\t[aStream cr.\r\t\taStream nextChunkPut: thisClass name , ' initialize'].! !\r\r!Metaclass methodsFor: 'fileIn/Out' stamp: 'ar 12/22/1999 17:31'!\rfileOutOn: aFileStream moveSource: moveSource toFile: fileIndex\r\t^self fileOutOn: aFileStream moveSource: moveSource toFile: fileIndex initializing: true! !\r\r!Metaclass methodsFor: 'fileIn/Out' stamp: 'di 2/17/2000 22:33'!\rfileOutOn: aFileStream moveSource: moveSource toFile: fileIndex initializing: aBool\r\tsuper fileOutOn: aFileStream\r\t\tmoveSource: moveSource\r\t\ttoFile: fileIndex.\r\t(aBool and:[moveSource not and: [self methodDict includesKey: #initialize]]) ifTrue: \r\t\t[aFileStream cr.\r\t\taFileStream cr.\r\t\taFileStream nextChunkPut: thisClass name , ' initialize'.\r\t\taFileStream cr]! !\r\r!Metaclass methodsFor: 'fileIn/Out' stamp: 'di 2/17/2000 22:33'!\rnonTrivial \r\t\"Answer whether the receiver has any methods or instance variables.\"\r\r\t^ self instVarNames size > 0 or: [self methodDict size > 0]! !\r\r\r!Metaclass methodsFor: 'testing' stamp: 'ar 9/10/1999 17:41'!\rcanZapMethodDictionary\r\t\"Return true if it is safe to zap the method dictionary on #obsolete\"\r\tthisClass == nil\r\t\tifTrue:[^true]\r\t\tifFalse:[^thisClass canZapMethodDictionary]! !\r\r!Metaclass methodsFor: 'testing' stamp: 'ar 7/11/1999 07:27'!\risObsolete\r\t\"Return true if the receiver is obsolete\"\r\t^thisClass == nil \"Either no thisClass\"\r\t\tor:[thisClass class ~~ self \"or I am not the class of thisClass\"\r\t\t\tor:[thisClass isObsolete]] \"or my instance is obsolete\"! !\r\r\r!Metaclass methodsFor: 'enumerating' stamp: 'ar 7/15/1999 16:43'!\rallInstancesDo: aBlock\r\t\"There should be only one\"\r\tthisClass class == self ifTrue:[^aBlock value: thisClass].\r\t^super allInstancesDo: aBlock! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rMetaclass class\r\tinstanceVariableNames: ''!\r\r!Metaclass class methodsFor: 'anti-corruption' stamp: 'di 11/24/1999 13:30'!\risScarySelector: newbieSelector\r\r\t\"Return true if newbieSelector is already a part of Metaclass protocol.\"\r\t(Metaclass includesSelector: newbieSelector) ifTrue: [^ true].\r\t(ClassDescription includesSelector: newbieSelector) ifTrue: [^ true].\r\t(Behavior includesSelector: newbieSelector) ifTrue: [^ true].\r\t^ false\r! !\rObject subclass: #MethodChangeRecord\r\tinstanceVariableNames: 'changeType currentMethod infoFromRemoval'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Changes'!\r!MethodChangeRecord commentStamp: '<historical>' prior: 0!\rMethodChangeRecords are used to record method changes.  Here is a simple summary of the relationship between the changeType symbol and the recording of prior state\r\r\t\t\t|\tprior == nil\t\t\t|\tprior not nil\t\r\t---------\t|----------------------------\t|--------------------\r\tadd\t\t|\tadd\t\t\t\t\t|\tchange\r\t---------\t|----------------------------\t|--------------------\r\tremove\t|\taddedThenRemoved\t|\tremove\r\rStructure:\rchangeType\t\t\tsymbol -- as summarized above\rcurrentMethod\tmethod\r\t\t\t\tThis is the current version of the method.\r\t\t\t\tIt can be used to assert this change upon entry to a layer. \rinfoFromRemoval -- an array of size 2.\r\t\t\t\tThe first element is the source index of the last version of the method.\r\t\t\t\tThe second element is the category in which it was defined, so it\r\t\t\t\tcan be put back there if re-accepted from a version browser.\r\rNote that the above states each have an associated revoke action:\r\tadd --> remove\r\tchange --> change back\r\tremove --> add back\r\taddedThenRemoved --> no change\rHowever all of these are accomplished trivially by restoring the original method dictionary.!\r\r\r!MethodChangeRecord methodsFor: 'as yet unclassified' stamp: 'di 4/1/2000 12:02'!\rchangeType\r\r\t^ changeType! !\r\r!MethodChangeRecord methodsFor: 'as yet unclassified' stamp: 'di 3/28/2000 23:34'!\rcurrentMethod\r\r\t^ currentMethod! !\r\r!MethodChangeRecord methodsFor: 'as yet unclassified' stamp: 'di 4/1/2000 12:02'!\rmethodInfoFromRemoval\r\t\"Return an array with the source index of the last version of the method,\r\tand the category in which it was defined (so it can be put back there if\r\tre-accepted from a version browser).\"\r\r\t(changeType == #remove or: [changeType == #addedThenRemoved])\r\t\tifTrue: [^ infoFromRemoval]\r\t\tifFalse: [^ nil]! !\r\r!MethodChangeRecord methodsFor: 'as yet unclassified' stamp: 'di 4/4/2000 11:05'!\rnoteChangeType: newChangeType\r\r\t(changeType == #addedThenRemoved and: [newChangeType == #change])\r\t\tifTrue: [changeType _ #add]\r\t\tifFalse: [changeType _ newChangeType]! !\r\r!MethodChangeRecord methodsFor: 'as yet unclassified' stamp: 'di 4/1/2000 11:05'!\rnoteMethodInfoFromRemoval: info\r\t\"Store an array with the source index of the last version of the method,\r\tand the category in which it was defined (so it can be put back there if\r\tre-accepted from a version browser).\"\r\r\tinfoFromRemoval _ info! !\r\r!MethodChangeRecord methodsFor: 'as yet unclassified' stamp: 'di 3/28/2000 23:32'!\rnoteNewMethod: newMethod\r\r\tcurrentMethod _ newMethod! !\r\r!MethodChangeRecord methodsFor: 'as yet unclassified' stamp: 'di 4/1/2000 12:02'!\rprintOn: strm\r\r\tsuper printOn: strm.\r\tstrm nextPutAll: ' ('; print: changeType; nextPutAll: ')'! !\r\r!MethodChangeRecord methodsFor: 'as yet unclassified' stamp: 'di 4/1/2000 10:47'!\rpriorMethod: ignored\r\r\t\"We do not save original versions of changed methods because we only\r\trevoke changes at the level of entire classes, and that is done by\r\trestoration of the entire methodDictionary.\"! !\rContextPart variableSubclass: #MethodContext\r\tinstanceVariableNames: 'method receiverMap receiver'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Methods'!\r!MethodContext commentStamp: '<historical>' prior: 0!\rMy instances hold all the dynamic state associated with the execution of a CompiledMethod. In addition to their inherited state, this includes the receiver, a method, and temporary space in the variable part of the context.\r\t\rMethodContexts, though normal in their variable size, are actually only used in two sizes, small and large, which are determined by the temporary space required by the method being executed.\r\rMethodContexts must only be created using the method newForMethod:.  Note that it is impossible to determine the real object size of a MethodContext except by asking for the frameSize of its method.  Any fields above the stack pointer (stackp) are truly invisible -- even (and especially!!) to the garbage collector.  Any store into stackp other than by the primitive method stackp: is potentially fatal.!\r\r\r!MethodContext methodsFor: 'initialize-release' stamp: 'ajh 1/23/2003 20:27'!\rprivRefresh\r\t\"Reinitialize the receiver so that it is in the state it was at its creation.\"\r\r\tpc _ method initialPC.\r\tself stackp: method numTemps.\r\tmethod numArgs+1 to: method numTemps\r\t\tdo: [:i | self tempAt: i put: nil]! !\r\r!MethodContext methodsFor: 'initialize-release' stamp: 'ajh 5/22/2003 16:28'!\rprivRefreshWith: aCompiledMethod \r\t\"Reinitialize the receiver as though it had been for a different method. \r\tUsed by a Debugger when one of the methods to which it refers is \r\trecompiled.\"\r\r\tmethod _ aCompiledMethod.\r\treceiverMap _ nil.\r\tself privRefresh! !\r\r\r!MethodContext methodsFor: 'accessing' stamp: 'ajh 1/31/2003 16:55'!\rblockHome\r\t\"If executing closure, search senders for method containing my closure method.  If not found return nil.\"\r\r\t| m |\r\tself isExecutingBlock ifFalse: [^ self].\r\tself sender ifNil: [^ nil].\r\tm _ self method.\r\t^ self sender findContextSuchThat: [:c | c method hasLiteralThorough: m]! !\r\r!MethodContext methodsFor: 'accessing' stamp: 'ajh 1/31/2003 23:29'!\rfinalBlockHome\r\t\"If executing closure, search senders for original method containing my closure method.  If not found return nil.\"\r\r\t| h |\r\tself isExecutingBlock ifFalse: [^ self].\r\t^ (h _ self blockHome) ifNotNil: [h finalBlockHome]! !\r\r!MethodContext methodsFor: 'accessing'!\rhome \r\t\"Refer to the comment in ContextPart|home.\"\r\r\t^self! !\r\r!MethodContext methodsFor: 'accessing' stamp: 'ar 6/28/2003 00:04'!\risExecutingBlock\r\t\"Is this executing a block versus a method\"\r\r\t| r |\r\tSmalltalk at: #BlockClosure ifPresent:[:aClass|\r\t\t^((r _ self receiver) isKindOf: aClass) and: [r method == self method]\r\t].\r\t^false! !\r\r!MethodContext methodsFor: 'accessing'!\rmethod\r\r\t^method! !\r\r!MethodContext methodsFor: 'accessing' stamp: 'ajh 2/9/2003 00:08'!\rmethodNode\r\r\t| h |\r\t^ self isExecutingBlock\r\t\tifTrue: [self method blockNodeIn: ((h _ self blockHome) ifNotNil: [h methodNode])]\r\t\tifFalse: [super methodNode]! !\r\r!MethodContext methodsFor: 'accessing'!\rreceiver \r\t\"Refer to the comment in ContextPart|receiver.\"\r\r\t^receiver! !\r\r!MethodContext methodsFor: 'accessing'!\rtempAt: index \r\t\"Refer to the comment in ContextPart|tempAt:.\"\r\r\t^self at: index! !\r\r!MethodContext methodsFor: 'accessing'!\rtempAt: index put: value \r\t\"Refer to the comment in ContextPart|tempAt:put:.\"\r\r\t^self at: index put: value! !\r\r\r!MethodContext methodsFor: 'private' stamp: 'di 1/14/1999 22:30'!\rinstVarAt: index put: value\r\tindex = 3 ifTrue: [self stackp: value. ^ value].\r\t^ super instVarAt: index put: value! !\r\r!MethodContext methodsFor: 'private' stamp: 'ikp 12/23/1999 15:56'!\rsetSender: s receiver: r method: m arguments: args \r\t\"Create the receiver's initial state.\"\r\r\tsender _ s.\r\treceiver _ r.\r\tmethod _ m.\r\treceiverMap _ nil.\r\tpc _ method initialPC.\r\tself stackp: method numTemps.\r\t1 to: args size do: [:i | self at: i put: (args at: i)]! !\r\r!MethodContext methodsFor: 'private' stamp: 'ajh 8/13/2002 13:34'!\rstartpc\r\r\t^ self method initialPC! !\r\r\r!MethodContext methodsFor: 'private-exceptions' stamp: 'hg 10/2/2001 20:43'!\rcannotReturn: result\r\r\tDebugger\r\t\topenContext: thisContext\r\t\tlabel: 'computation has been terminated'\r\t\tcontents: nil! !\r\r!MethodContext methodsFor: 'private-exceptions' stamp: 'tpr 2/24/2001 22:05'!\risHandlerContext\r\"is this context for  method that is marked?\"\r\t^method primitive = 199! !\r\r!MethodContext methodsFor: 'private-exceptions' stamp: 'tpr 2/24/2001 22:05'!\risUnwindContext\r\"is this context for  method that is marked?\"\r\t^method primitive = 198! !\r\r!MethodContext methodsFor: 'private-exceptions' stamp: 'tfei 3/23/1999 13:00'!\rreceiver: r\r\r\treceiver := r! !\r\r\r!MethodContext methodsFor: 'private-debugger' stamp: 'tfei 3/19/2000 23:55'!\rcachedStackTop\r\t\"WARNING - this method depends on a very dirty trick, viz. snitching information off the variable stack of a particular CompiledMethod.  So if you add/remove a temp in BlockContext>>valueUninterruptably, this method will fail, probably with some horrible consequences I'd rather not think through just now ... assumption is that the variable declaration in that method looks like:\r\t\t| sendingContext result homeSender |\"\r\r\t^self tempAt: 3! !\r\r!MethodContext methodsFor: 'private-debugger' stamp: 'ajh 1/24/2003 23:38'!\rcachesStack\r\r\t^ false\r\t\"^self selector == #valueUninterruptably\r\t\tand: [self receiver class == BlockContext]\"! !\r\r!MethodContext methodsFor: 'private-debugger' stamp: 'tfei 3/20/2000 00:24'!\rhideFromDebugger\r\r\t| sndr sndrHome |\r\t^self cachesStack\r\t\tor: [(sndr := self sender) ~~ nil\r\t\t\tand: [(sndrHome := sndr home) ~~ nil\r\t\t\t\tand: [sndrHome cachesStack]]]! !\r\r\r!MethodContext methodsFor: 'printing' stamp: 'ajh 1/31/2003 20:34'!\rprintOn: aStream\r\r\t| h |\r\tself isExecutingBlock ifFalse: [^ super printOn: aStream].\r\th _ self blockHome.\r\th ifNil: [^ aStream nextPutAll: '[]'].\r\taStream nextPutAll: '[] from '.\r\th printOn: aStream! !\r\r!MethodContext methodsFor: 'printing' stamp: 'emm 5/30/2002 14:07'!\rprintString\r\t\"Answer an emphasized string in case of a breakpoint method\"\r\r\t^self method hasBreakpoint\r\t\tifTrue:[(super printString , ' [break]') asText allBold]\r\t\tifFalse:[super printString]! !\r\r!MethodContext methodsFor: 'printing' stamp: 'LC 1/6/2002 11:13'!\rwho\r\t| sel mcls |\r\tself method ifNil: [^ Array with: #unknown with: #unknown].\r\tsel _ self receiver class\r\t\t\tselectorAtMethod: self method \r\t\t\tsetClass: [:c | mcls _ c].\r\tsel == #? ifTrue: [^ self method who].\r\t^ Array with: mcls with: sel\r! !\r\r\r!MethodContext methodsFor: 'closure support' stamp: 'ar 6/28/2003 00:15'!\rcontextTag\r\t\"Context tags may be used for referring to contexts instead of contexts themselves as they can be copied and will continue to work in other processes (continuations). By default, we use the context itself to as its tag.\"\r\t^self! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rMethodContext class\r\tinstanceVariableNames: ''!\r\r!MethodContext class methodsFor: 'instance creation' stamp: 'di 10/23/1999 17:06'!\rsender: s receiver: r method: m arguments: args \r\t\"Answer an instance of me with attributes set to the arguments.\"\r\r\t^(self newForMethod: m) setSender: s receiver: r method: m arguments: args! !\rDictionary variableSubclass: #MethodDictionary\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Methods'!\r!MethodDictionary commentStamp: '<historical>' prior: 0!\rI am just like a normal Dictionary, except that I am implemented differently.  Each Class has an instances of MethodDictionary to hold the correspondence between selectors (names of methods) and methods themselves.\r\rIn a normal Dictionary, the instance variable 'array' holds an array of Associations.  Since there are thousands of methods in the system, these Associations waste space.  \r\rEach MethodDictionary is a variable object, with the list of keys (selector Symbols) in the variable part of the instance.  The variable 'array' holds the values, which are CompiledMethods.!\r\r\r!MethodDictionary methodsFor: 'accessing'!\radd: anAssociation\r\t^ self at: anAssociation key put: anAssociation value! !\r\r!MethodDictionary methodsFor: 'accessing'!\rat: key ifAbsent: aBlock\r\r\t| index |\r\tindex _ self findElementOrNil: key.\r\t(self basicAt: index) == nil ifTrue: [ ^ aBlock value ].\r\t^ array at: index! !\r\r!MethodDictionary methodsFor: 'accessing' stamp: 'ar 10/12/2000 17:25'!\rat: key put: value\r\t\"Set the value at key to be value.\"\r\t| index |\r\tindex _ self findElementOrNil: key.\r\t(self basicAt: index) == nil\r\t\tifTrue: \r\t\t\t[tally _ tally + 1.\r\t\t\tself basicAt: index put: key]\r\t\tifFalse:\r\t\t\t[(array at: index) flushCache].\r\tarray at: index put: value.\r\tself fullCheck.\r\t^ value! !\r\r!MethodDictionary methodsFor: 'accessing' stamp: 'tk 6/30/2000 00:14'!\rincludesKey: aSymbol\r\t\"This override assumes that pointsTo is a fast primitive\"\r\r\taSymbol ifNil: [^ false].\r\t^ super pointsTo: aSymbol! !\r\r!MethodDictionary methodsFor: 'accessing' stamp: 'ar 2/13/1999 21:17'!\rkeyAtIdentityValue: value ifAbsent: exceptionBlock\r\t\"Answer the key whose value equals the argument, value. If there is\r\tnone, answer the result of evaluating exceptionBlock.\"\r\t| theKey |\r\t1 to: self basicSize do:\r\t\t[:index |\r\t\tvalue == (array at: index)\r\t\t\tifTrue:\r\t\t\t\t[(theKey _ self basicAt: index) == nil\r\t\t\t\t\tifFalse: [^ theKey]]].\r\t^ exceptionBlock value! !\r\r!MethodDictionary methodsFor: 'accessing' stamp: 'ar 2/13/1999 21:00'!\rkeyAtValue: value ifAbsent: exceptionBlock\r\t\"Answer the key whose value equals the argument, value. If there is\r\tnone, answer the result of evaluating exceptionBlock.\"\r\t| theKey |\r\t1 to: self basicSize do:\r\t\t[:index |\r\t\tvalue = (array at: index)\r\t\t\tifTrue:\r\t\t\t\t[(theKey _ self basicAt: index) == nil\r\t\t\t\t\tifFalse: [^ theKey]]].\r\t^ exceptionBlock value! !\r\r\r!MethodDictionary methodsFor: 'removing'!\rremoveKey: key ifAbsent: errorBlock \r\t\"The interpreter might be using this MethodDict while\r\tthis method is running!!  Therefore we perform the removal\r\tin a copy, and then atomically become that copy\"\r\t| copy |\r\tcopy _ self copy.\r\tcopy removeDangerouslyKey: key ifAbsent: [^ errorBlock value].\r\tself become: copy! !\r\r\r!MethodDictionary methodsFor: 'enumeration'!\rassociationsDo: aBlock \r\t| key |\r\ttally = 0 ifTrue: [^ self].\r\t1 to: self basicSize do:\r\t\t[:i | (key _ self basicAt: i) == nil ifFalse:\r\t\t\t[aBlock value: (Association key: key\r\t\t\t\t\t\t\t\t\tvalue: (array at: i))]]! !\r\r!MethodDictionary methodsFor: 'enumeration' stamp: 'to 1/14/98 10:13'!\rdo: aBlock \r\ttally = 0 ifTrue: [^ self].\r\t1 to: self basicSize do:\r\t\t[:i | (self basicAt: i) == nil ifFalse:\r\t\t\t[aBlock value: (array at: i)]]\r! !\r\r!MethodDictionary methodsFor: 'enumeration' stamp: 'ar 7/11/1999 08:05'!\rkeysAndValuesDo: aBlock \r\t\"Enumerate the receiver with all the keys and values passed to the block\"\r\t| key |\r\ttally = 0 ifTrue: [^ self].\r\t1 to: self basicSize do:\r\t\t[:i | (key _ self basicAt: i) == nil ifFalse:\r\t\t\t[aBlock value: key value: (array at: i)]\r\t\t]! !\r\r!MethodDictionary methodsFor: 'enumeration'!\rkeysDo: aBlock \r\t| key |\r\ttally = 0 ifTrue: [^ self].\r\t1 to: self basicSize do:\r\t\t[:i | (key _ self basicAt: i) == nil\r\t\t\tifFalse: [aBlock value: key]]! !\r\r!MethodDictionary methodsFor: 'enumeration' stamp: 'ar 7/11/1999 07:29'!\rvaluesDo: aBlock \r\t| value |\r\ttally = 0 ifTrue: [^ self].\r\t1 to: self basicSize do:\r\t\t[:i | (value _ array at: i) == nil\r\t\t\tifFalse: [aBlock value: value]]! !\r\r\r!MethodDictionary methodsFor: 'private' stamp: 'tk 8/21/97 16:26'!\rcopy\r\t^ self shallowCopy withArray: array shallowCopy! !\r\r!MethodDictionary methodsFor: 'private' stamp: 'di 11/4/97 20:11'!\rgrow \r\t| newSelf key |\r\tnewSelf _ self species new: self basicSize.  \"This will double the size\"\r\t1 to: self basicSize do:\r\t\t[:i | key _ self basicAt: i.\r\t\tkey == nil ifFalse: [newSelf at: key put: (array at: i)]].\r\tself become: newSelf! !\r\r!MethodDictionary methodsFor: 'private'!\rkeyAt: index\r\r\t^ self basicAt: index! !\r\r!MethodDictionary methodsFor: 'private'!\rrehash \r\t| newSelf key |\r\tnewSelf _ self species new: self size.\r\t1 to: self basicSize do:\r\t\t[:i | key _ self basicAt: i.\r\t\tkey == nil ifFalse: [newSelf at: key put: (array at: i)]].\r\tself become: newSelf! !\r\r!MethodDictionary methodsFor: 'private' stamp: 'RAA 12/17/2000 11:11'!\rrehashWithoutBecome\r\t| newSelf key |\r\tnewSelf _ self species new: self size.\r\t1 to: self basicSize do:\r\t\t[:i | key _ self basicAt: i.\r\t\tkey == nil ifFalse: [newSelf at: key put: (array at: i)]].\r\t^newSelf! !\r\r!MethodDictionary methodsFor: 'private'!\rremoveDangerouslyKey: key ifAbsent: aBlock\r\t\"This is not really dangerous.  But if normal removal\r\twere done WHILE a MethodDict were being used, the\r\tsystem might crash.  So instead we make a copy, then do\r\tthis operation (which is NOT dangerous in a copy that is\r\tnot being used), and then use the copy after the removal.\"\r\r\t| index element |\r\tindex _ self findElementOrNil: key.\r\t(self basicAt: index) == nil ifTrue: [ ^ aBlock value ].\r\telement _ array at: index.\r\tarray at: index put: nil.\r\tself basicAt: index put: nil.\r\ttally _ tally - 1.\r\tself fixCollisionsFrom: index.\r\t^ element! !\r\r!MethodDictionary methodsFor: 'private'!\rscanFor: anObject\r\t\"Scan the key array for the first slot containing either a nil (indicating an empty slot) or an element that matches anObject. Answer the index of that slot or zero if no slot is found. This method will be overridden in various subclasses that have different interpretations for matching elements.\"\r\t| element start finish |\r\tstart _ (anObject identityHash \\\\ array size) + 1.\r\tfinish _ array size.\r\r\t\"Search from (hash mod size) to the end.\"\r\tstart to: finish do:\r\t\t[:index | ((element _ self basicAt: index) == nil or: [element == anObject])\r\t\t\tifTrue: [^ index ]].\r\r\t\"Search from 1 to where we started.\"\r\t1 to: start-1 do:\r\t\t[:index | ((element _ self basicAt: index) == nil or: [element == anObject])\r\t\t\tifTrue: [^ index ]].\r\r\t^ 0  \"No match AND no empty slot\"! !\r\r!MethodDictionary methodsFor: 'private'!\rswap: oneIndex with: otherIndex\r\t| element |\r\telement _ self basicAt: oneIndex.\r\tself basicAt: oneIndex put: (self basicAt: otherIndex).\r\tself basicAt: otherIndex put: element.\r\tsuper swap: oneIndex with: otherIndex.\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rMethodDictionary class\r\tinstanceVariableNames: ''!\r\r!MethodDictionary class methodsFor: 'instance creation' stamp: 'RAA 5/29/2001 09:53'!\rnew\r\t\"change the default size to be a bit bigger to help reduce the number of #grows while filing in\"\r\t^self new: 16! !\r\r!MethodDictionary class methodsFor: 'instance creation' stamp: 'di 11/4/97 20:11'!\rnew: nElements\r\t\"Create a Dictionary large enough to hold nElements without growing.\r\tNote that the basic size must be a power of 2.\r\tIt is VITAL (see grow) that size gets doubled if nElements is a power of 2\"\r\t| size |\r\tsize _ 1 bitShift: nElements highBit.\r\t^ (self basicNew: size) init: size! !\rObject subclass: #MethodFinder\r\tinstanceVariableNames: 'data answers selector argMap thisData mapStage mapList expressions cachedClass cachedArgNum cachedSelectorLists'\r\tclassVariableNames: 'AddAndRemove Approved Blocks Dangerous'\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Methods'!\r!MethodFinder commentStamp: '<historical>' prior: 0!\rFind a method in the system from a set of examples.  Done by brute force, trying every possible selector.  Errors are skipped over using ( [3 + 'xyz'] ifError: [^ false] ).\rSubmit an array of the form ((data1 data2) answer  (data1 data2) answer).\r\r\tMethodFinder methodFor: #( (4 3) 7  (0 5) 5  (5 5) 10).\r\ranswer:  'data1 + data2'\r\rMore generally, use the brace notation to construct live examples.\r\rThe program tries data1 as the receiver, and\r\ttries all other permutations of the data for the receiver and args, and\r\ttries leaving out one argument, and\r\tuses all selectors data understands, and\r\tuses all selectors in all od data's superclasses.\r\rFloating point values must be precise to 0.01 percent, or (X * 0.0001).\r\rIf you get an error, you have probably discovered a selector that needs to be removed from the Approved list.  See MethodFinder.initialize.  Please email the Squeak Team.\r\rOnly considers 0, 1, 2, and 3 argument messages.  The argument data may have 1 to 5 entries, but only a max of 4 used at a time.  For now, we only test messages that use given number of args or one fewer.  For example, this data (100 true 0.6) would test the receiver plus two args, and the receiver plus one arg, but not any other patterns.\r\rThree sets of selectors:  Approved, AddAndRemove, and Blocks selectors.  When testing a selector in AddAndRemove, deepCopy the receiver.  We do not handle selectors that modify an argument (printOn: etc.).  Blocks is a set of (selector argNumber) where that argument must be a block.\r\rFor perform, the selector is tested.  It must be in the Approved list.\r\rdo: is not on the Approved list.  It does not produce a result that can be tested.  Type 'do' into the upper pane of the Selector Finder to find messages list that.\r\r[Later, allow the user to supply a block that tests the answer, not just the literal answer.]\r\tMethodFinder methodFor: { { true. [3]. [4]}. 3}. \rLater allow this to work without the blocks around 3 and 4.!\r\r\r!MethodFinder methodsFor: 'initialize' stamp: 'tk 7/1/2000 23:11'!\rcleanInputs: dataAndAnswerString\r\t\"Find an remove common mistakes.  Complain when ill formed.\"\r\r| fixed ddd rs places |\rddd _ dataAndAnswerString.\rfixed _ false.\r\rrs _ ReadStream on: ddd, ' '.\rplaces _ OrderedCollection new.\r[rs upToAll: '#true'.  rs atEnd] whileFalse: [places addFirst: rs position-4]. \rplaces do: [:pos | ddd _ ddd copyReplaceFrom: pos to: pos with: ''.\r\tfixed _ true]. \t\"remove #\"\r\rrs _ ReadStream on: ddd.\rplaces _ OrderedCollection new.\r[rs upToAll: '#false'.  rs atEnd] whileFalse: [places addFirst: rs position-5]. \rplaces do: [:pos | ddd _ ddd copyReplaceFrom: pos to: pos with: ''.\r\tfixed _ true]. \t\"remove #\"\r\rfixed ifTrue: [self inform: '#(true false) are Symbols, not Booleans.  \rNext time use { true. false }.'].\r\rfixed _ false.\rrs _ ReadStream on: ddd.\rplaces _ OrderedCollection new.\r[rs upToAll: '#nil'.  rs atEnd] whileFalse: [places addFirst: rs position-3]. \rplaces do: [:pos | ddd _ ddd copyReplaceFrom: pos to: pos with: ''.\r\tfixed _ true]. \t\"remove #\"\r\rfixed ifTrue: [self inform: '#nil is a Symbol, not the authentic UndefinedObject.  \rNext time use nil instead of #nil'].\r\r^ ddd\r! !\r\r!MethodFinder methodsFor: 'initialize' stamp: 'md 11/14/2003 16:47'!\rcopy: mthFinder addArg: aConstant\r\t| more |\r\t\"Copy inputs and answers, add an additional data argument to the inputs.  The same constant for every example\"\r\r\tmore _ Array with: aConstant.\r\tdata _ mthFinder data collect: [:argList | argList, more].\r\tanswers _ mthFinder answers.\r\tself load: nil.\r! !\r\r!MethodFinder methodsFor: 'initialize' stamp: 'tk 5/18/2001 19:23'!\rinitialize\r\t\"The methods we are allowed to use.  (MethodFinder new initialize) \"\r\r\tApproved _ Set new.\r\tAddAndRemove _ Set new.\r\tBlocks _ Set new.\r\t\"These modify an argument and are not used by the MethodFinder: longPrintOn: printOn: storeOn: sentTo: storeOn:base: printOn:base: absPrintExactlyOn:base: absPrintOn:base: absPrintOn:base:digitCount: writeOn: writeScanOn: possibleVariablesFor:continuedFrom: printOn:format:\"\r\r\"Object\"  \r\t#(\"in class, instance creation\" categoryForUniclasses chooseUniqueClassName initialInstance isSystemDefined newFrom: officialClass readCarefullyFrom:\r\"accessing\" at: basicAt: basicSize bindWithTemp: in: size yourself \r\"testing\" basicType ifNil: ifNil:ifNotNil: ifNotNil: ifNotNil:ifNil: isColor isFloat isFraction isInMemory isInteger isMorph isNil isNumber isPoint isPseudoContext isText isTransparent isWebBrowser knownName notNil pointsTo: wantsSteps \r\"comparing\" = == closeTo: hash hashMappedBy: identityHash identityHashMappedBy: identityHashPrintString ~= ~~ \r\"copying\" clone copy shallowCopy \r\"dependents access\" canDiscardEdits dependents hasUnacceptedEdits \r\"updating\" changed changed: okToChange update: windowIsClosing \r\"printing\" fullPrintString isLiteral longPrintString printString storeString stringForReadout stringRepresentation \r\"class membership\" class isKindOf: isKindOf:orOf: isMemberOf: respondsTo: xxxClass \r\"error handling\" \r\"user interface\" addModelMenuItemsTo:forMorph:hand: defaultBackgroundColor defaultLabelForInspector fullScreenSize initialExtent modelWakeUp mouseUpBalk: newTileMorphRepresentative windowActiveOnFirstClick windowReqNewLabel: \r\"system primitives\" asOop instVarAt: instVarNamed: \r\"private\" \r\"associating\" -> \r\"converting\" as: asOrderedCollection asString \r\"casing\" caseOf: caseOf:otherwise: \r\"binding\" bindingOf: \r\"macpal\" contentsChanged currentEvent currentHand currentWorld flash ifKindOf:thenDo: instanceVariableValues scriptPerformer \r\"flagging\" flag: \r\"translation support\" \"objects from disk\" \"finalization\" ) do: [:sel | Approved add: sel].\r\t#(at:add: at:modify: at:put: basicAt:put: \"NOT instVar:at:\"\r\"message handling\" perform: perform:orSendTo: perform:with: perform:with:with: perform:with:with:with: perform:withArguments: perform:withArguments:inSuperclass: \r) do: [:sel | AddAndRemove add: sel].\r\r\"Boolean, True, False, UndefinedObject\"  \r\t#(\"logical operations\" & eqv: not xor: |\r\"controlling\" and: ifFalse: ifFalse:ifTrue: ifTrue: ifTrue:ifFalse: or:\r\"copying\" \r\"testing\" isEmptyOrNil) do: [:sel | Approved add: sel].\r\r\"Behavior\" \r\t#(\"initialize-release\"\r\"accessing\" compilerClass decompilerClass evaluatorClass format methodDict parserClass sourceCodeTemplate subclassDefinerClass\r\"testing\" instSize instSpec isBits isBytes isFixed isPointers isVariable isWeak isWords\r\"copying\"\r\"printing\" defaultNameStemForInstances printHierarchy\r\"creating class hierarchy\"\r\"creating method dictionary\"\r\"instance creation\" basicNew basicNew: new new:\r\"accessing class hierarchy\" allSubclasses allSubclassesWithLevelDo:startingLevel: allSuperclasses subclasses superclass withAllSubclasses withAllSuperclasses\r\"accessing method dictionary\" allSelectors changeRecordsAt: compiledMethodAt: compiledMethodAt:ifAbsent: firstCommentAt: lookupSelector: selectors selectorsDo: selectorsWithArgs: \"slow but useful ->\" sourceCodeAt: sourceCodeAt:ifAbsent: sourceMethodAt: sourceMethodAt:ifAbsent:\r\"accessing instances and variables\" allClassVarNames allInstVarNames allSharedPools classVarNames instVarNames instanceCount sharedPools someInstance subclassInstVarNames\r\"testing class hierarchy\" inheritsFrom: kindOfSubclass\r\"testing method dictionary\" canUnderstand: classThatUnderstands: hasMethods includesSelector: scopeHas:ifTrue: whichClassIncludesSelector: whichSelectorsAccess: whichSelectorsReferTo: whichSelectorsReferTo:special:byte: whichSelectorsStoreInto:\r\"enumerating\"\r\"user interface\"\r\"private\" indexIfCompact) do: [:sel | Approved add: sel].\r\r\"ClassDescription\"\r\t#(\"initialize-release\" \r\"accessing\" classVersion isMeta name theNonMetaClass\r\"copying\" \r\"printing\" classVariablesString instanceVariablesString sharedPoolsString\r\"instance variables\" checkForInstVarsOK: \r\"method dictionary\" \r\"organization\" category organization whichCategoryIncludesSelector:\r\"compiling\" acceptsLoggingOfCompilation wantsChangeSetLogging\r\"fileIn/Out\" definition\r\"private\" ) do: [:sel | Approved add: sel].\r\r\"Class\"\r\t#(\"initialize-release\" \r\"accessing\" classPool\r\"testing\"\r\"copying\" \r\"class name\" \r\"instance variables\" \r\"class variables\" classVarAt: classVariableAssociationAt:\r\"pool variables\" \r\"compiling\" \r\"subclass creation\" \r\"fileIn/Out\" ) do: [:sel | Approved add: sel]. \r\r\"Metaclass\"\r\t#(\"initialize-release\" \r\"accessing\" isSystemDefined soleInstance\r\"copying\" \"instance creation\" \"instance variables\"  \"pool variables\" \"class hierarchy\"  \"compiling\"\r\"fileIn/Out\"  nonTrivial ) do: [:sel | Approved add: sel].\r\r\"Context, BlockContext\"\r\t#(receiver client method receiver tempAt: \r\"debugger access\" mclass pc selector sender shortStack sourceCode tempNames tempsAndValues\r\"controlling\"  \"printing\" \"system simulation\" \r\"initialize-release\" \r\"accessing\" hasMethodReturn home numArgs\r\"evaluating\" value value:ifError: value:value: value:value:value: value:value:value:value: valueWithArguments:\r\"controlling\"  \"scheduling\"  \"instruction decoding\"  \"printing\" \"private\"  \"system simulation\" ) do: [:sel | Approved add: sel].\r\t#(value: \"<- Association has it as a store\" ) do: [:sel | AddAndRemove add: sel].\r\r\"Message\"\r\t#(\"inclass, instance creation\" selector: selector:argument: selector:arguments:\r\"accessing\" argument argument: arguments sends:\r\"printing\" \"sending\" ) do: [:sel | Approved add: sel].\r\t#(\"private\" setSelector:arguments:) do: [:sel | AddAndRemove add: sel].\r\r\"Magnitude\"\r\t#(\"comparing\" < <= > >= between:and:\r\"testing\" max: min: min:max: ) do: [:sel | Approved add: sel].\r\r\"Date, Time\"\r\t#(\"in class, instance creation\" fromDays: fromSeconds: fromString: newDay:month:year: newDay:year: today\r\t\"in class, general inquiries\" dateAndTimeNow dayOfWeek: daysInMonth:forYear: daysInYear: firstWeekdayOfMonth:year: indexOfMonth: leapYear: nameOfDay: nameOfMonth:\r\"accessing\" day leap monthIndex monthName weekday year\r\"arithmetic\" addDays: subtractDate: subtractDays:\r\"comparing\"\r\"inquiries\" dayOfMonth daysInMonth daysInYear daysLeftInYear firstDayOfMonth previous:\r\"converting\" asSeconds\r\"printing\" mmddyy mmddyyyy printFormat: \r\"private\" firstDayOfMonthIndex: weekdayIndex \r\t\"in class, instance creation\" fromSeconds: now \r\t\"in class, general inquiries\" dateAndTimeFromSeconds: dateAndTimeNow millisecondClockValue millisecondsToRun: totalSeconds\r\"accessing\" hours minutes seconds\r\"arithmetic\" addTime: subtractTime:\r\"comparing\"\r\"printing\" intervalString print24 \r\"converting\") do: [:sel | Approved add: sel].\r\t#(\"private\" hours: hours:minutes:seconds: day:year: \r\t\t ) do: [:sel | AddAndRemove add: sel].\r\r\"Number\"\r\t#(\"in class\" readFrom:base: \r\"arithmetic\" * + - / // \\\\ abs negated quo: reciprocal rem:\r\"mathematical functions\" arcCos arcSin arcTan arcTan: cos exp floorLog: ln log log: raisedTo: raisedToInteger: sin sqrt squared tan\r\"truncation and round off\" ceiling detentBy:atMultiplesOf:snap: floor roundTo: roundUpTo: rounded truncateTo: truncated\r\"comparing\"\r\"testing\" even isDivisibleBy: isInf isInfinite isNaN isZero negative odd positive sign strictlyPositive\r\"converting\" @ asInteger asNumber asPoint asSmallAngleDegrees degreesToRadians radiansToDegrees\r\"intervals\" to: to:by: \r\"printing\" printStringBase: storeStringBase: ) do: [:sel | Approved add: sel].\r\r\"Integer\"\r\t#(\"in class\" primesUpTo:\r\"testing\" isPowerOfTwo\r\"arithmetic\" alignedTo:\r\"comparing\"\r\"truncation and round off\" atRandom normalize\r\"enumerating\" timesRepeat:\r\"mathematical functions\" degreeCos degreeSin factorial gcd: lcm: take:\r\"bit manipulation\" << >> allMask: anyMask: bitAnd: bitClear: bitInvert bitInvert32 bitOr: bitShift: bitXor: lowBit noMask:\r\"converting\" asCharacter asColorOfDepth: asFloat asFraction asHexDigit\r\"printing\" asStringWithCommas hex hex8 radix:\r\"system primitives\" lastDigit replaceFrom:to:with:startingAt:\r\"private\" \"benchmarks\" ) do: [:sel | Approved add: sel].\r\r\"SmallInteger, LargeNegativeInteger, LargePositiveInteger\"\r\t#(\"arithmetic\" \"bit manipulation\" highBit \"testing\" \"comparing\" \"copying\" \"converting\" \"printing\" \r\"system primitives\" digitAt: digitLength \r\"private\" fromString:radix: ) do: [:sel | Approved add: sel].\r\t#(digitAt:put: ) do: [:sel | AddAndRemove add: sel].\r\r\"Float\"\r\t#(\"arithmetic\"\r\"mathematical functions\" reciprocalFloorLog: reciprocalLogBase2 timesTwoPower:\r\"comparing\" \"testing\"\r\"truncation and round off\" exponent fractionPart integerPart significand significandAsInteger\r\"converting\" asApproximateFraction asIEEE32BitWord asTrueFraction\r\"copying\") do: [:sel | Approved add: sel].\r\r\"Fraction, Random\"\r\t#(denominator numerator reduced next nextValue) do: [:sel | Approved add: sel].\r\t#(setNumerator:denominator:) do: [:sel | AddAndRemove add: sel].\r\r\"Collection\"\r\t#(\"accessing\" anyOne\r\"testing\" includes: includesAllOf: includesAnyOf: includesSubstringAnywhere: isEmpty isSequenceable occurrencesOf:\r\"enumerating\" collect: collect:thenSelect: count: detect: detect:ifNone: detectMax: detectMin: detectSum: inject:into: reject: select: select:thenCollect:\r\"converting\" asBag asCharacterSet asSet asSortedArray asSortedCollection asSortedCollection:\r\"printing\"\r\"private\" maxSize\r\"arithmetic\"\r\"math functions\" average max median min range sum) do: [:sel | Approved add: sel].\r\t#(\"adding\" add: addAll: addIfNotPresent:\r\"removing\" remove: remove:ifAbsent: removeAll: removeAllFoundIn: removeAllSuchThat: remove:ifAbsent:) do: [:sel | AddAndRemove add: sel].\r\r\"SequenceableCollection\"\r\t#(\"comparing\" hasEqualElements:\r\"accessing\" allButFirst allButLast at:ifAbsent: atAll: atPin: atRandom: atWrap: fifth first fourth identityIndexOf: identityIndexOf:ifAbsent: indexOf: indexOf:ifAbsent: indexOf:startingAt:ifAbsent: indexOfSubCollection:startingAt: indexOfSubCollection:startingAt:ifAbsent: last second sixth third\r\"removing\"\r\"copying\" , copyAfterLast: copyAt:put: copyFrom:to: copyReplaceAll:with: copyReplaceFrom:to:with: copyUpTo: copyUpToLast: copyWith: copyWithout: copyWithoutAll: forceTo:paddingWith: shuffled sortBy:\r\"enumerating\" collectWithIndex: findFirst: findLast: pairsCollect: with:collect: withIndexCollect: polynomialEval:\r\"converting\" asArray asDictionary asFloatArray asIntegerArray asStringWithCr asWordArray reversed\r\"private\" copyReplaceAll:with:asTokens: ) do: [:sel | Approved add: sel].\r\t#( swap:with:) do: [:sel | AddAndRemove add: sel].\r\r\"ArrayedCollection, Bag\"\r\t#(\"private\" defaultElement \r\"sorting\" isSorted\r\"accessing\" cumulativeCounts sortedCounts sortedElements \"testing\" \"adding\" add:withOccurrences: \"removing\" \"enumerating\" \r\t) do: [:sel | Approved add: sel].\r\t#( mergeSortFrom:to:by: sort sort: add: add:withOccurrences:\r\"private\" setDictionary ) do: [:sel | AddAndRemove add: sel].\r\r\"Other messages that modify the receiver\"\r\t#(atAll:put: atAll:putAll: atAllPut: atWrap:put: replaceAll:with: replaceFrom:to:with:  removeFirst removeLast) do: [:sel | AddAndRemove add: sel].\r\r\tself initialize2.\r\r\"\rMethodFinder new initialize.\rMethodFinder new organizationFiltered: Set\r\"\r\r! !\r\r!MethodFinder methodsFor: 'initialize' stamp: 'ads 3/29/2003 17:12'!\rinitialize2\r\t\"The methods we are allowed to use.  (MethodFinder new initialize) \"\r\r\"Set\"\r\t#(\"in class\" sizeFor:\r\"testing\" \"adding\" \"removing\" \"enumerating\"\r\"private\" array findElementOrNil: \r\"accessing\" someElement) do: [:sel | Approved add: sel].\r\r\"Dictionary, IdentityDictionary, IdentitySet\"\r\t#(\"accessing\" associationAt: associationAt:ifAbsent: at:ifPresent: keyAtIdentityValue: keyAtIdentityValue:ifAbsent: keyAtValue: keyAtValue:ifAbsent: keys\r\"testing\" includesKey: ) do: [:sel | Approved add: sel].\r\t#(removeKey: removeKey:ifAbsent:\r) do: [:sel | AddAndRemove add: sel].\r\r\"LinkedList, Interval, MappedCollection\"\r\t#(\"in class\"  from:to: from:to:by:\r\"accessing\" contents) do: [:sel | Approved add: sel].\r\t#(\r\"adding\" addFirst: addLast:) do: [:sel | AddAndRemove add: sel].\r\r\"OrderedCollection, SortedCollection\"\r\t#(\"accessing\" after: before:\r\"copying\" copyEmpty\r\"adding\"  growSize\r\"removing\" \"enumerating\" \"private\" \r\"accessing\" sortBlock) do: [:sel | Approved add: sel].\r\t#(\"adding\" add:after: add:afterIndex: add:before: addAllFirst: addAllLast: addFirst: addLast:\r\"removing\" removeAt: removeFirst removeLast\r\"accessing\" sortBlock:) do: [:sel | AddAndRemove add: sel].\r\r\"Character\"\r\t#(\"in class, instance creation\" allCharacters digitValue: new separators\r\t\"accessing untypeable characters\" backspace cr enter lf linefeed nbsp newPage space tab\r\t\"constants\" alphabet characterTable\r\"accessing\" asciiValue digitValue\r\"comparing\"\r\"testing\" isAlphaNumeric isDigit isLetter isLowercase isSafeForHTTP isSeparator isSpecial isUppercase isVowel tokenish\r\"copying\"\r\"converting\" asIRCLowercase asLowercase asUppercase\r\t) do: [:sel | Approved add: sel].\r\r\"String\"\r\t#(\"in class, instance creation\" crlf fromPacked:\r\t\"primitives\" findFirstInString:inSet:startingAt: indexOfAscii:inString:startingAt: \t\"internet\" valueOfHtmlEntity:\r\"accessing\" byteAt: endsWithDigit findAnySubStr:startingAt: findBetweenSubStrs: findDelimiters:startingAt: findString:startingAt: findString:startingAt:caseSensitive: findTokens: findTokens:includes: findTokens:keep: includesSubString: includesSubstring:caseSensitive: indexOf:startingAt: indexOfAnyOf: indexOfAnyOf:ifAbsent: indexOfAnyOf:startingAt: indexOfAnyOf:startingAt:ifAbsent: lineCorrespondingToIndex: lineCount lineNumber: skipAnySubStr:startingAt: skipDelimiters:startingAt: startsWithDigit\r\"comparing\" alike: beginsWith: caseSensitiveLessOrEqual: charactersExactlyMatching: compare: crc16 endsWith: endsWithAnyOf: sameAs: startingAt:match:startingAt:\r\"copying\" copyReplaceTokens:with: padded:to:with:\r\"converting\" asByteArray asDate asDisplayText asFileName asHtml asLegalSelector asPacked asParagraph asText asTime asUnHtml asUrl asUrlRelativeTo: capitalized compressWithTable: contractTo: correctAgainst: encodeForHTTP initialIntegerOrNil keywords quoted sansPeriodSuffix splitInteger stemAndNumericSuffix substrings surroundedBySingleQuotes truncateWithElipsisTo: withBlanksTrimmed withFirstCharacterDownshifted withNoLineLongerThan: withSeparatorsCompacted withoutLeadingDigits withoutTrailingBlanks\r\"displaying\" \"printing\"\r\"system primitives\" compare:with:collated: \r\"Celeste\" withCRs\r\"internet\" decodeMimeHeader decodeQuotedPrintable unescapePercents withInternetLineEndings withSqueakLineEndings withoutQuoting\r\"testing\" isAllSeparators lastSpacePosition\r\"paragraph support\" indentationIfBlank:\r\"arithmetic\" ) do: [:sel | Approved add: sel].\r\t#(byteAt:put: translateToLowercase match:) do: [:sel | AddAndRemove add: sel].\r\r\"Symbol\"\r\t#(\"in class, private\" hasInterned:ifTrue:\r\t\"access\" morePossibleSelectorsFor: possibleSelectorsFor: selectorsContaining: thatStarts:skipping:\r\"accessing\" \"comparing\" \"copying\" \"converting\" \"printing\" \r\"testing\" isInfix isKeyword isPvtSelector isUnary) do: [:sel | Approved add: sel].\r\r\"Array\"\r\t#(\"comparing\" \"converting\" evalStrings \r\"printing\" \"private\" hasLiteralSuchThat:) do: [:sel | Approved add: sel].\r\r\"Array2D\"\r\t#(\"access\" at:at: atCol: atCol:put: atRow: extent extent:fromArray: height width width:height:type:) do: [:sel | Approved add: sel].\r\t#(at:at:add: at:at:put: atRow:put: ) do: [:sel | AddAndRemove add: sel].\r\r\"ByteArray\"\r\t#(\"accessing\" doubleWordAt: wordAt: \r\"platform independent access\" longAt:bigEndian: shortAt:bigEndian: unsignedLongAt:bigEndian: unsignedShortAt:bigEndian: \r\"converting\") do: [:sel | Approved add: sel].\r\t#(doubleWordAt:put: wordAt:put: longAt:put:bigEndian: shortAt:put:bigEndian: unsignedLongAt:put:bigEndian: unsignedShortAt:put:bigEndian:\r\t) do: [:sel | AddAndRemove add: sel].\r\r\"FloatArray\"\t\t\"Dont know what happens when prims not here\"\r\tfalse ifTrue: [#(\"accessing\" \"arithmetic\" *= += -= /=\r\"comparing\"\r\"primitives-plugin\" primAddArray: primAddScalar: primDivArray: primDivScalar: primMulArray: primMulScalar: primSubArray: primSubScalar:\r\"primitives-translated\" primAddArray:withArray:from:to: primMulArray:withArray:from:to: primSubArray:withArray:from:to:\r\"converting\" \"private\" \"user interface\") do: [:sel | Approved add: sel].\r\t].\r\r\"IntegerArray, WordArray\"\r\"RunArray\"\r\t#(\"in class, instance creation\" runs:values: scanFrom:\r\"accessing\" runLengthAt: \r\"adding\" \"copying\"\r\"private\" runs values) do: [:sel | Approved add: sel].\r\t#(coalesce addLast:times: repeatLast:ifEmpty: repeatLastIfEmpty:\r\t\t) do: [:sel | AddAndRemove add: sel].\r\r\"Stream  -- many operations change its state\"\r\t#(\"testing\" atEnd) do: [:sel | Approved add: sel].\r\t#(\"accessing\" next: nextMatchAll: nextMatchFor: upToEnd\rnext:put: nextPut: nextPutAll: \"printing\" print: printHtml:\r\t) do: [:sel | AddAndRemove add: sel].\r\r\"PositionableStream\"\r\t#(\"accessing\" contentsOfEntireFile originalContents peek peekFor: \"testing\"\r\"positioning\" position ) do: [:sel | Approved add: sel].\r\t#(nextDelimited: nextLine upTo: position: reset resetContents setToEnd skip: skipTo: upToAll: ) do: [:sel | AddAndRemove add: sel].\r\t\"Because it is so difficult to test the result of an operation on a Stream (you have to supply another Stream in the same state), we don't support Streams beyond the basics.  We want to find the messages that convert Streams to other things.\"\r\r\"ReadWriteStream\"\r\t#(\"file status\" closed) do: [:sel | Approved add: sel].\r\t#(\"accessing\" next: on: ) do: [:sel | AddAndRemove add: sel].\r\r\"WriteStream\"\r\t#(\"in class, instance creation\" on:from:to: with: with:from:to:\r\t\t) do: [:sel | Approved add: sel].\r\t#(\"positioning\" resetToStart\r\"character writing\" crtab crtab:) do: [:sel | AddAndRemove add: sel].\r\r\"LookupKey, Association, Link\"\r\t#(\"accessing\" key nextLink) do: [:sel | Approved add: sel].\r\t#(key: key:value: nextLink:) do: [:sel | AddAndRemove add: sel].\r\r\"Point\"\r\t#(\"in class, instance creation\" r:degrees: x:y:\r\"accessing\" x y \"comparing\" \"arithmetic\" \"truncation and round off\"\r\"polar coordinates\" degrees r theta\r\"point functions\" bearingToPoint: crossProduct: dist: dotProduct: eightNeighbors flipBy:centerAt: fourNeighbors grid: nearestPointAlongLineFrom:to: nearestPointOnLineFrom:to: normal normalized octantOf: onLineFrom:to: onLineFrom:to:within: quadrantOf: rotateBy:centerAt: transposed unitVector\r\"converting\" asFloatPoint asIntegerPoint corner: extent: rect:\r\"transforming\" adhereTo: rotateBy:about: scaleBy: scaleFrom:to: translateBy: \"copying\"\r\"interpolating\" interpolateTo:at:) do: [:sel | Approved add: sel].\r\r\"Rectangle\"\r\t#(\"in class, instance creation\" center:extent: encompassing: left:right:top:bottom: \r\tmerging: origin:corner: origin:extent: \r\"accessing\" area bottom bottomCenter bottomLeft bottomRight boundingBox center corner corners innerCorners left leftCenter origin right rightCenter top topCenter topLeft topRight\r\"comparing\"\r\"rectangle functions\" adjustTo:along: amountToTranslateWithin: areasOutside: bordersOn:along: encompass: expandBy: extendBy: forPoint:closestSideDistLen: insetBy: insetOriginBy:cornerBy: intersect: merge: pointNearestTo: quickMerge: rectanglesAt:height: sideNearestTo: translatedToBeWithin: withBottom: withHeight: withLeft: withRight: withSide:setTo: withTop: withWidth:\r\"testing\" containsPoint: containsRect: hasPositiveExtent intersects: isTall isWide\r\"truncation and round off\"\r\"transforming\" align:with: centeredBeneath: newRectFrom: squishedWithin: \"copying\"\r\t) do: [:sel | Approved add: sel].\r\r\"Color\"\r\t#(\"in class, instance creation\" colorFrom: colorFromPixelValue:depth: fromRgbTriplet: gray: h:s:v: r:g:b: r:g:b:alpha: r:g:b:range:\r\t\"named colors\" black blue brown cyan darkGray gray green lightBlue lightBrown lightCyan lightGray lightGreen lightMagenta lightOrange lightRed lightYellow magenta orange red transparent veryDarkGray veryLightGray veryVeryDarkGray veryVeryLightGray white yellow\r\t\"other\" colorNames indexedColors pixelScreenForDepth: quickHighLight:\r\"access\" alpha blue brightness green hue luminance red saturation\r\"equality\"\r\"queries\" isBitmapFill isBlack isGray isSolidFill isTranslucent isTranslucentColor\r\"transformations\" alpha: dansDarker darker lighter mixed:with: muchLighter slightlyDarker slightlyLighter veryMuchLighter alphaMixed:with:\r\"groups of shades\" darkShades: lightShades: mix:shades: wheel:\r\"printing\" shortPrintString\r\"other\" colorForInsets rgbTriplet\r\"conversions\" asB3DColor asColor balancedPatternForDepth: bitPatternForDepth: closestPixelValue1 closestPixelValue2 closestPixelValue4 closestPixelValue8 dominantColor halfTonePattern1 halfTonePattern2 indexInMap: pixelValueForDepth: pixelWordFor:filledWith: pixelWordForDepth: scaledPixelValue32\r\"private\" privateAlpha privateBlue privateGreen privateRGB privateRed \"copying\"\r\t) do: [:sel | Approved add: sel].\r\r\"\tFor each selector that requires a block argument, add (selector argNum) \r\t\tto the set Blocks.\"\r\"ourClasses _ #(Object Boolean True False UndefinedObject Behavior ClassDescription Class Metaclass MethodContext BlockContext Message Magnitude Date Time Number Integer SmallInteger LargeNegativeInteger LargePositiveInteger Float Fraction Random Collection SequenceableCollection ArrayedCollection Bag Set Dictionary IdentityDictionary IdentitySet LinkedList Interval MappedCollection OrderedCollection SortedCollection Character String Symbol Array Array2D ByteArray FloatArray IntegerArray WordArray RunArray Stream PositionableStream ReadWriteStream WriteStream LookupKey Association Link Point Rectangle Color).\rourClasses do: [:clsName | cls _ Smalltalk at: clsName.\r\t(cls selectors) do: [:aSel |\r\t\t((Approved includes: aSel) or: [AddAndRemove includes: aSel]) ifTrue: [\r\t\t\t(cls formalParametersAt: aSel) withIndexDo: [:tName :ind |\r\t\t\t\t(tName endsWith: 'Block') ifTrue: [\r\t\t\t\t\tBlocks add: (Array with: aSel with: ind)]]]]].\r\"\r#((timesRepeat: 1 ) (indexOf:ifAbsent: 2 ) (pairsCollect: 1 ) (mergeSortFrom:to:by: 3 ) (ifNotNil:ifNil: 1 ) (ifNotNil:ifNil: 2 ) (ifNil: 1 ) (at:ifAbsent: 2 ) (ifNil:ifNotNil: 1 ) (ifNil:ifNotNil: 2 ) (ifNotNil: 1 ) (at:modify: 2 ) (identityIndexOf:ifAbsent: 2 ) (sort: 1 ) (sortBlock: 1 ) (detectMax: 1 ) (repeatLastIfEmpty: 1 ) (allSubclassesWithLevelDo:startingLevel: 1 ) (keyAtValue:ifAbsent: 2 ) (in: 1 ) (ifTrue: 1 ) (or: 1 ) (select: 1 ) (inject:into: 2 ) (ifKindOf:thenDo: 2 ) (forPoint:closestSideDistLen: 2 ) (value:ifError: 2 ) (selectorsDo: 1 ) (removeAllSuchThat: 1 ) (keyAtIdentityValue:ifAbsent: 2 ) (detectMin: 1 ) (detect:ifNone: 1 ) (ifTrue:ifFalse: 1 ) (ifTrue:ifFalse: 2 ) (detect:ifNone: 2 ) (hasLiteralSuchThat: 1 ) (indexOfAnyOf:ifAbsent: 2 ) (reject: 1 ) (newRectFrom: 1 ) (removeKey:ifAbsent: 2 ) (at:ifPresent: 2 ) (associationAt:ifAbsent: 2 ) (withIndexCollect: 1 ) (repeatLast:ifEmpty: 2 ) (findLast: 1 ) (indexOf:startingAt:ifAbsent: 3 ) (remove:ifAbsent: 2 ) (ifFalse:ifTrue: 1 ) (ifFalse:ifTrue: 2 ) (caseOf:otherwise: 2 ) (count: 1 ) (collect: 1 ) (sortBy: 1 ) (and: 1 ) (asSortedCollection: 1 ) (with:collect: 2 ) (sourceCodeAt:ifAbsent: 2 ) (detect: 1 ) (scopeHas:ifTrue: 2 ) (collectWithIndex: 1 ) (compiledMethodAt:ifAbsent: 2 ) (bindWithTemp: 1 ) (detectSum: 1 ) (indexOfSubCollection:startingAt:ifAbsent: 3 ) (findFirst: 1 ) (sourceMethodAt:ifAbsent: 2 ) (collect:thenSelect: 1 ) (collect:thenSelect: 2 ) (select:thenCollect: 1 ) (select:thenCollect: 2 ) (ifFalse: 1 ) (indexOfAnyOf:startingAt:ifAbsent: 3 ) (indentationIfBlank: 1 ) ) do: [:anArray |\r\tBlocks add: anArray].\r\rself initialize3.\r\r\"\rMethodFinder new initialize.\rMethodFinder new organizationFiltered: TranslucentColor class \r\"\r\"Do not forget class messages for each of these classes\"\r! !\r\r!MethodFinder methodsFor: 'initialize' stamp: 'tk 4/1/2002 11:33'!\rinitialize3\r\t\"additional selectors to consider\"\r\r#(asWords threeDigitName ) do: [:sel | Approved add: sel].! !\r\r!MethodFinder methodsFor: 'initialize' stamp: 'tk 12/29/2000 13:22'!\rload: dataWithAnswers\r\t\"Find a function that takes the data and gives the answers.  Odd list entries are data for it, even ones are the answers.  nil input means data and answers were supplied already.\"\r\"  (MethodFinder new) load: #( (4 3) 7  (-10 5) -5  (-3 11) 8);\r\t\tfindMessage  \"\r\rdataWithAnswers ifNotNil: [\r\tdata _ Array new: dataWithAnswers size // 2.\r\t1 to: data size do: [:ii | data at: ii put: (dataWithAnswers at: ii*2-1)].\r\tanswers _ Array new: data size.\r\t1 to: answers size do: [:ii | answers at: ii put: (dataWithAnswers at: ii*2)]].\rdata do: [:list | \r\t(list isKindOf: SequenceableCollection) ifFalse: [\r\t\t^ self inform: 'first and third items are not Arrays'].\r\t].\rargMap _ (1 to: data first size) asArray.\rdata do: [:list | list size = argMap size ifFalse: [\r\t\tself inform: 'data arrays must all be the same size']].\rargMap size > 4 ifTrue: [self inform: 'No more than a receiver and \rthree arguments allowed'].\r\t\"Really only test receiver and three args.\" \rthisData _ data copy.\rmapStage _ mapList _ nil.\r! !\r\r!MethodFinder methodsFor: 'initialize' stamp: 'tk 4/24/1999 19:34'!\rtest3\r\t\"find the modification of the caracter table\"\r\r\t(#x at: 1) asciiValue = 120 ifFalse: [self error: 'Character table mod'].! !\r\r\r!MethodFinder methodsFor: 'arg maps' stamp: 'tk 5/18/1999 14:46'!\rmakeAllMaps \r\t\"Make a giant list of all permutations of the args.  To find the function, we will try these permutations of the input data.  receiver, args.\"\r\r\t| ii |\r\tmapList _ Array new: argMap size factorial.\r\tii _ 1.\r\targMap permutationsDo: [:perm |\r\t\tmapList at: ii put: perm copy.\r\t\tii _ ii + 1].\r\tmapStage _ 1.\t\"about to be bumped\"! !\r\r!MethodFinder methodsFor: 'arg maps' stamp: 'tk 4/24/1999 19:29'!\rmapData \r\t\"Force the data through the map (permutation) to create the data to test.\"\r\r\tthisData _ data collect: [:realData |\r\t\t\t\t\targMap collect: [:ind | realData at: ind]].\r\t\t! !\r\r!MethodFinder methodsFor: 'arg maps' stamp: 'tk 5/24/1999 16:31'!\rpermuteArgs \r\t\"Run through ALL the permutations.  First one was as presented.\"\r\r\tdata first size <= 1 ifTrue: [^ false].\t\"no other way\"\r\tmapList ifNil: [self makeAllMaps].\r\tmapStage _ mapStage + 1.\r\tmapStage > mapList size ifTrue: [^ false].\r\targMap _ mapList at: mapStage.\r\tself mapData.\r\t^ true\r\t! !\r\r\r!MethodFinder methodsFor: 'search' stamp: 'tk 1/8/2001 18:18'!\rexceptions\r\t\"Handle some very slippery selectors.\r\tasSymbol -- want to be able to produce it, but do not want to make every string submitted into a Symbol!!\" \r\r\t| aSel |\r\tanswers first class == Symbol ifFalse: [^ self].\r\tthisData first first class == String ifFalse: [^ self].\r\taSel _ #asSymbol.\r\t(self testPerfect: aSel) ifTrue: [\r\t\tselector add: aSel.\r\t\texpressions add: (String streamContents: [:strm | \r\t\t\tstrm nextPutAll: 'data', argMap first printString.\r\t\t\taSel keywords doWithIndex: [:key :ind |\r\t\t\t\tstrm nextPutAll: ' ',key.\r\t\t\t\t(key last == $:) | (key first isLetter not)\r\t\t\t\t\tifTrue: [strm nextPutAll: ' data', \r\t\t\t\t\t\t(argMap at: ind+1) printString]]])].\r! !\r\r!MethodFinder methodsFor: 'search' stamp: 'tk 1/8/2001 18:35'!\rfindMessage\r\t\"Control the search.\"\r\r\tdata do: [:alist |\r\t\t(alist isKindOf: SequenceableCollection) ifFalse: [\r\t\t\t^ OrderedCollection with: 'first and third items are not Arrays']].\r\tApproved ifNil: [self initialize].\t\"Sets of allowed selectors\"\r\texpressions _ OrderedCollection new.\r\tself search: true.\t\"multi\"\r\texpressions isEmpty ifTrue: [^ OrderedCollection with: 'no single method does that function'].\r\texpressions class = String ifTrue: [^ OrderedCollection with: expressions].\r \t^ expressions! !\r\r!MethodFinder methodsFor: 'search' stamp: 'tk 4/12/2001 10:47'!\rinsertConstants\r\t\"see if one of several known expressions will do it. C is the constant we discover here.\"\r\t\"C  data1+C  data1*C  data1//C  (data1*C1 + C2) (data1 = C) (data1 ~= C) (data1 <= C) (data1 >= C) \r (data1 mod C)\"\r\r\tthisData size >= 2 ifFalse: [^ false].\t\"need 2 examples\"\r\t(thisData at: 1) size = 1 ifFalse: [^ false].\t\"only one arg, data1\"\r\r\tself const ifTrue: [^ true].\r\tself constUsingData1Value ifTrue: [^ true].\r\t\t\"(data1 ?? const), where const is one of the values of data1\"\r\t\t\" == ~~ ~= = <= >= \"\r\r\tself allNumbers ifFalse: [^ false].\r\tself constMod ifTrue: [^ true].\r\tself constPlus ifTrue: [^ true].\r\tself constMult ifTrue: [^ true].\r\tself constDiv ifTrue: [^ true].\r\tself constLinear ifTrue: [^ true].\r\t^ false! !\r\r!MethodFinder methodsFor: 'search' stamp: 'tk 12/29/2000 12:54'!\rsearch: multi\r\t\"if Multi is true, collect all selectors that work.\"\r\t| old |\r\tselector _ OrderedCollection new.\t\"list of them\"\r\told _ Preferences autoAccessors.\r\tPreferences disableGently: #autoAccessors.\r\tself simpleSearch.\r\tmulti not & (selector isEmpty not) ifTrue:\r\t\t[old ifTrue: [Preferences enableGently: #autoAccessors].\r\t\t^ selector].\r\r\t[self permuteArgs] whileTrue:\r\t\t[self simpleSearch.\r\t\tmulti not & (selector isEmpty not) ifTrue:\r\t\t\t[old ifTrue: [Preferences enableGently: #autoAccessors].\r\t\t\t^ selector]].\r\r\tself insertConstants.\r\told ifTrue: [Preferences enableGently: #autoAccessors].\r\t\"(selector isEmpty not) ifTrue: [^ selector]].    expression is the answer, not a selector\"\r\t^ #()! !\r\r!MethodFinder methodsFor: 'search' stamp: 'tk 1/8/2001 17:53'!\rsearchForOne\r\t\"Look for and return just one answer\"\r\r\texpressions _ OrderedCollection new.\r\tself search: false.\t\"non-multi\"\r\t^ expressions\r\t\t\t! !\r\r!MethodFinder methodsFor: 'search' stamp: 'tk 1/8/2001 18:17'!\rsimpleSearch\r\t\"Run through first arg's class' selectors, looking for one that works.\"\r\r| class supers listOfLists |\rself exceptions.\rclass _ thisData first first class.\r\"Cache the selectors for the receiver class\"\r(class == cachedClass and: [cachedArgNum = ((argMap size) - 1)]) \r\tifTrue: [listOfLists _ cachedSelectorLists]\r\tifFalse: [supers _ class withAllSuperclasses.\r\t\tlistOfLists _ OrderedCollection new.\r\t\tsupers do: [:cls |\r\t\t\tlistOfLists add: (cls selectorsWithArgs: (argMap size) - 1)].\r\t\tcachedClass _ class.\r\t\tcachedArgNum _ (argMap size) - 1.\r\t\tcachedSelectorLists _ listOfLists].\rlistOfLists do: [:selectorList |\r\tselectorList do: [:aSel |\r\t\t(selector includes: aSel) ifFalse: [\r\t\t\t((Approved includes: aSel) or: [AddAndRemove includes: aSel]) ifTrue: [\r\t\t\t\t(self testPerfect: aSel) ifTrue: [\r\t\t\t\t\tselector add: aSel.\r\t\t\t\t\texpressions add: (String streamContents: [:strm | \r\t\t\t\t\t\tstrm nextPutAll: 'data', argMap first printString.\r\t\t\t\t\t\taSel keywords doWithIndex: [:key :ind |\r\t\t\t\t\t\t\tstrm nextPutAll: ' ',key.\r\t\t\t\t\t\t\t(key last == $:) | (key first isLetter not)\r\t\t\t\t\t\t\t\tifTrue: [strm nextPutAll: ' data', \r\t\t\t\t\t\t\t\t\t(argMap at: ind+1) printString]]])\r\t\t\t\t\t]]]]].\r! !\r\r!MethodFinder methodsFor: 'search' stamp: 'tk 4/30/1999 14:22'!\rtestPerfect: aSelector\r\t\"Try this selector!! Return true if it answers every example perfectly.  Take the args in the order they are.  Do not permute them.  Survive errors.  later cache arg lists.\"\r\r| sz argList val rec activeSel perform |\r\t\"Transcript cr; show: aSelector.\t\tdebug\"\rperform _ aSelector beginsWith: 'perform:'.\rsz _ argMap size.\r1 to: thisData size do: [:ii | \"each example set of args\"\r\targList _ (thisData at: ii) copyFrom: 2 to: sz.\r\tperform\r\t\tifFalse: [activeSel _ aSelector]\r\t\tifTrue: [activeSel _ argList first.\t\"what will be performed\"\r\t\t\t((Approved includes: activeSel) or: [AddAndRemove includes: activeSel])\r\t\t\t\tifFalse: [^ false].\t\"not approved\"\r\t\t\taSelector == #perform:withArguments: \r\t\t\t\tifTrue: [activeSel numArgs = (argList at: 2) basicSize \"avoid error\" \r\t\t\t\t\t\t\tifFalse: [^ false]]\r\t\t\t\tifFalse: [activeSel numArgs = (aSelector numArgs - 1) \r\t\t\t\t\t\t\tifFalse: [^ false]]].\r\t1 to: sz do: [:num | \r\t\t(Blocks includes: (Array with: activeSel with: num)) ifTrue: [\r\t\t\t(argList at: num) class == BlockContext ifFalse: [^ false]]].\r\trec _ (AddAndRemove includes: activeSel) \r\t\t\tifTrue: [(thisData at: ii) first class == Symbol ifTrue: [^ false].\r\t\t\t\t\t\t\"vulnerable to modification\"\r\t\t\t\t(thisData at: ii) first copyTwoLevel] \t\"protect from damage\"\r\t\t\tifFalse: [(thisData at: ii) first].\r\tval _ [rec perform: aSelector withArguments: argList] \r\t\t\t\tifError: [:aString :aReceiver | \r\t\t\t\t\t\t\t\"self test3.\"\r\t\t\t\t\t\t\t\"self test2: (thisData at: ii).\"\r\t\t\t\t\t\t\t^ false].\r\t\"self test3.\"\r\t\"self test2: (thisData at: ii).\"\r\t((answers at: ii) closeTo: val) ifFalse: [^ false].\r\t].\r^ true! !\r\r\r!MethodFinder methodsFor: 'access' stamp: 'tk 12/29/2000 13:39'!\ranswers\r\r\t^ answers! !\r\r!MethodFinder methodsFor: 'access' stamp: 'tk 12/29/2000 13:39'!\rdata\r\r\t^ data! !\r\r!MethodFinder methodsFor: 'access' stamp: 'tk 12/29/2000 13:20'!\rexpressions\r\t^ expressions! !\r\r!MethodFinder methodsFor: 'access' stamp: 'tk 1/4/2001 17:18'!\rselectors\r\t\"Note the inst var does not have an S on the end\"\r\r\t^ selector! !\r\r\r!MethodFinder methodsFor: 'find a constant' stamp: 'tk 12/29/2000 22:34'!\rallNumbers\r\t\"Return true if all answers and all data are numbers.\"\r\r\tanswers do: [:aa | aa isNumber ifFalse: [^ false]].\r\tthisData do: [:vec |\r\t\t\tvec do: [:nn | nn isNumber ifFalse: [^ false]]].\r\t^ true! !\r\r!MethodFinder methodsFor: 'find a constant' stamp: 'tk 1/18/2001 22:45'!\rconst\r\t| const |\r\t\"See if (^ constant) is the answer\"\r\r\t\"quick test\"\r\t((const _ answers at: 1) closeTo: (answers at: 2)) ifFalse: [^ false].\r\t3 to: answers size do: [:ii | (const closeTo: (answers at: ii)) ifFalse: [^ false]].\r\texpressions add: '^ ', const printString.\r\tselector add: #yourself.\r\t^ true! !\r\r!MethodFinder methodsFor: 'find a constant' stamp: 'tk 1/8/2001 17:49'!\rconstDiv\r\t| const subTest got |\r\t\"See if (data1 // C) is the answer\"\r\r\tconst _ ((thisData at: 1) at: 1) // (answers at: 1).  \"May not be right!!\"\r\tgot _ (subTest _ MethodFinder new copy: self addArg: const) \r\t\t\t\tsearchForOne isEmpty not.\r\tgot ifFalse: [^ false]. \r\r\t\"replace data2 with const in expressions\"\r\tsubTest expressions do: [:exp |\r\t\texpressions add: (exp copyReplaceAll: 'data2' with: const printString)].\r\tselector addAll: subTest selectors.\r\t^ true! !\r\r!MethodFinder methodsFor: 'find a constant' stamp: 'tk 1/8/2001 17:47'!\rconstLinear\r\t| const subTest got denom num slope offset |\r\t\"See if (data1 * C1) + C2 is the answer.  In the form  #(C2 C1) polynomialEval: data1 \"\r\r\tdenom _ ((thisData at: 2) at: 1) - ((thisData at: 1) at: 1).\r\tdenom = 0 ifTrue: [^ false].   \"will divide by it\"\r\tnum _ (answers at: 2) - (answers at: 1).\r\r    slope := (num asFloat / denom) reduce.\r    offset := ((answers at: 2) - (((thisData at: 2) at: 1) * slope)) reduce.\r\r\tconst _ Array with: offset with: slope.\r\tgot _ (subTest _ MethodFinder new copy: self addArg: const) \r\t\t\t\tsearchForOne isEmpty not.\r\tgot ifFalse: [^ false]. \r\r\t\"replace data2 with const in expressions\"\r\tsubTest expressions do: [:exp |\r\t\texpressions add: (exp copyReplaceAll: 'data2' with: const printString)].\r\tselector addAll: subTest selectors.\r\t^ true! !\r\r!MethodFinder methodsFor: 'find a constant' stamp: 'tk 1/18/2001 22:46'!\rconstMod\r\t| subTest low |\r\t\"See if mod, (data1 \\\\ C) is the answer\"\r\r\tlow _ answers max.\r\tlow+1 to: low+20 do: [:const |\r\t\tsubTest _ MethodFinder new copy: self addArg: const.\r\t\t(subTest testPerfect: #\\\\) ifTrue: [\r\t\t\texpressions add: 'data1 \\\\ ', const printString.\r\t\t\tselector add: #\\\\.\r\t\t\t^ true]].\r\t^ false! !\r\r!MethodFinder methodsFor: 'find a constant' stamp: 'tk 1/8/2001 17:49'!\rconstMult\r\t| const subTest got |\r\t\"See if (data1 * C) is the answer\"\r\r\t((thisData at: 1) at: 1) = 0 ifTrue: [^ false].\r\tconst _ ((answers at: 1) asFloat / ((thisData at: 1) at: 1)) reduce.\r\tgot _ (subTest _ MethodFinder new copy: self addArg: const) \r\t\t\t\tsearchForOne isEmpty not.\r\tgot ifFalse: [^ false]. \r\r\t\"replace data2 with const in expressions\"\r\tsubTest expressions do: [:exp |\r\t\texpressions add: (exp copyReplaceAll: 'data2' with: const printString)].\r\tselector addAll: subTest selectors.\r\t^ true! !\r\r!MethodFinder methodsFor: 'find a constant' stamp: 'tk 1/8/2001 17:48'!\rconstPlus\r\t| const subTest got |\r\t\"See if (data1 + C) is the answer\"\r\r\tconst _ (answers at: 1) - ((thisData at: 1) at: 1).\r\tgot _ (subTest _ MethodFinder new copy: self addArg: const) \r\t\t\t\tsearchForOne isEmpty not.\r\tgot ifFalse: [^ false]. \r\r\t\"replace data2 with const in expressions\"\r\tsubTest expressions do: [:exp |\r\t\texpressions add: (exp copyReplaceAll: 'data2' with: const printString)].\r\tselector addAll: subTest selectors.\r\t^ true! !\r\r!MethodFinder methodsFor: 'find a constant' stamp: 'tk 4/9/2001 17:59'!\rconstUsingData1Value\r\t| const subTest got |\r\t\"See if (data1 <= C) or (data1 >= C) is the answer\"\r\r\t\"quick test\"\r\t((answers at: 1) class superclass == Boolean) ifFalse: [^ false].\r\t2 to: answers size do: [:ii | \r\t\t((answers at: ii) class superclass == Boolean) ifFalse: [^ false]].\r\r\tthisData do: [:datums | \r\t\tconst _ datums first.\t\"use data as a constant!!\"\r\t\tgot _ (subTest _ MethodFinder new copy: self addArg: const) \r\t\t\t\t\tsearchForOne isEmpty not.\r\t\tgot ifTrue: [\r\t\t\t\"replace data2 with const in expressions\"\r\t\t\tsubTest expressions do: [:exp |\r\t\t\t\texpressions add: (exp copyReplaceAll: 'data2' with: const printString)].\r\t\t\tselector addAll: subTest selectors.\r\t\t\t^ true]].\r\t^ false! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rMethodFinder class\r\tinstanceVariableNames: ''!\r\r!MethodFinder class methodsFor: 'as yet unclassified' stamp: 'BG 10/29/2003 09:52'!\rmethodFor: dataAndAnswers\r\t\"Return a Squeak expression that computes these answers.  (This method is called by the comment in the bottom pane of a MethodFinder.  Do not delete this method.)\"\r\r\t| resultOC resultString |\r\tresultOC _ (self new) load: dataAndAnswers; findMessage.\r\tresultString _ String streamContents: [:strm |\r\t\tresultOC do: [:exp | strm nextPut: $(; nextPutAll: exp; nextPut: $); space]].\r\t\r\t^ resultString! !\rCodeHolder subclass: #MethodHolder\r\tinstanceVariableNames: 'methodClass methodSelector'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-ST80 Remnants'!\r\r!MethodHolder methodsFor: 'menu' stamp: 'dgd 8/30/2003 21:54'!\raddModelMenuItemsTo: aCustomMenu forMorph: aMorph hand: aHandMorph\r\taCustomMenu addLine.\r\taCustomMenu add: 'whose script is this?' translated target: self action: #identifyScript\r\t! !\r\r!MethodHolder methodsFor: 'menu' stamp: 'ssa 9/4/2008 15:23'!\rdoItReceiver\r\t\"If there is an instance associated with me, answer it, for true mapping of self.  If not, then do what other code-bearing tools do, viz. give access to the class vars.\"\r\r\r\t^ self selectedClass ifNil: [FakeClassPool new]! !\r\r\r!MethodHolder methodsFor: 'miscellaneous' stamp: 'sw 3/28/2002 00:36'!\rchangeMethodSelectorTo: aSelector\r\t\"Change my method selector as noted.  Reset currentCompiledMethod\"\r\r\tmethodSelector _ aSelector.\r\tcurrentCompiledMethod _ methodClass compiledMethodAt: aSelector ifAbsent: [nil]! !\r\r!MethodHolder methodsFor: 'miscellaneous' stamp: 'tk 8/30/2000 13:07'!\rcompiledMethod\r\r\t^ methodClass compiledMethodAt: methodSelector! !\r\r!MethodHolder methodsFor: 'miscellaneous' stamp: 'sw 10/23/1999 23:01'!\ridentifyScript\r\t| msg aPlayer |\r\tmsg _ methodClass isUniClass\r\t\tifTrue:\r\t\t\t[aPlayer _ methodClass someInstance.\r\t\t\taPlayer costume\r\t\t\t\tifNotNil:\r\t\t\t\t\t['This holds code for a script\rnamed ', methodSelector, ' belonging\rto an object named ', aPlayer externalName]\r\t\t\t\tifNil:\r\t\t\t\t\t['This formerly held code for a script\rnamed ', methodSelector, ' for a Player\rwho once existed but now is moribund.']]\r\t\tifFalse:\r\t\t\t['This holds code for the method\rnamed ', methodSelector, '\rfor class ', methodClass name].\r\tself inform: msg! !\r\r!MethodHolder methodsFor: 'miscellaneous' stamp: 'sw 10/21/1999 13:05'!\rmethodClass: aClass methodSelector: aSelector\r\tmethodClass _ aClass.\r\tmethodSelector _ aSelector.\r\tcurrentCompiledMethod _ aClass compiledMethodAt: aSelector ifAbsent: [nil]! !\r\r!MethodHolder methodsFor: 'miscellaneous' stamp: 'tk 8/30/2000 13:08'!\rversions\r\t\"Return a VersionsBrowser (containing a list of ChangeRecords) of older versions of this method.\"\r\r\t^ VersionsBrowser new scanVersionsOf: self compiledMethod\r\t\t\tclass: self selectedClass \r\t\t\tmeta: methodClass isMeta \r\t\t\tcategory: self selectedMessageCategoryName\r\t\t\t\t\"(classOfMethod whichCategoryIncludesSelector: selectorOfMethod)\"\r\t\t\tselector: methodSelector! !\r\r\r!MethodHolder methodsFor: 'contents' stamp: 'nk 6/19/2004 16:47'!\rcontents\r\t\"Answer the contents, with due respect for my contentsSymbol\"\r\r\tcontents _ methodClass sourceCodeAt: methodSelector ifAbsent: [''].\r\tcurrentCompiledMethod _ methodClass compiledMethodAt: methodSelector ifAbsent: [nil].\r\r\tself showingDecompile ifTrue:\r\t\t\t[^ self decompiledSourceIntoContentsWithTempNames: Sensor leftShiftDown not ].\r\r\tself showingDocumentation ifTrue:\r\t\t[^ self commentContents].\r\r\t^ contents _ self sourceStringPrettifiedAndDiffed asText makeSelectorBoldIn: methodClass! !\r\r!MethodHolder methodsFor: 'contents' stamp: 'sw 10/21/1999 13:06'!\rcontents: input notifying: aController \r\t| selector |\r\t(selector _ Parser new parseSelector: input asText) ifNil:\r\t\t[self inform: 'Sorry - invalid format for the \rmethod name and arguments -- cannot accept.'.\r\t\t^ false].\r\r\tselector == methodSelector ifFalse:\r\t\t[self inform:\r'You cannot change the name of\rthe method here -- it must continue\rto be ', methodSelector.\r\t\t^ false].\r\r\tselector _ methodClass\r\t\t\t\tcompile: input asText\r\t\t\t\tclassified: self selectedMessageCategoryName\r\t\t\t\tnotifying: aController.\r\tselector == nil ifTrue: [^ false].\r\tcontents _ input asString copy.\r\tcurrentCompiledMethod _ methodClass compiledMethodAt: methodSelector.\r\t^ true! !\r\r\r!MethodHolder methodsFor: 'selection' stamp: 'sw 10/21/1999 09:40'!\rselectedClass\r\t^ methodClass theNonMetaClass! !\r\r!MethodHolder methodsFor: 'selection' stamp: 'sw 10/27/1999 14:30'!\rselectedClassOrMetaClass\r\t^ methodClass! !\r\r!MethodHolder methodsFor: 'selection' stamp: 'sw 10/21/1999 10:16'!\rselectedMessageCategoryName\r\t^ methodClass organization categoryOfElement: methodSelector! !\r\r!MethodHolder methodsFor: 'selection' stamp: 'sw 10/21/1999 09:39'!\rselectedMessageName\r\t^ methodSelector! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rMethodHolder class\r\tinstanceVariableNames: ''!\r\r!MethodHolder class methodsFor: 'instance creation' stamp: 'sw 10/23/2000 18:55'!\rmakeIsolatedCodePaneForClass: aClass selector: aSelector\r\t\"Create, and place in the morphic Hand, an isolated code pane bearing source code for the given class and selector\"\r\r\t(self isolatedCodePaneForClass: aClass selector: aSelector) openInHand! !\rObjectWithDocumentation subclass: #MethodInterface\r\tinstanceVariableNames: 'selector argumentVariables resultSpecification receiverType attributeKeywords defaultStatus'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Protocols-Kernel'!\r!MethodInterface commentStamp: '<historical>' prior: 0!\rA MethodInterface describes the interface for a single method.  The most generic form is not bound to any particular class or object but rather describes an idealized interface.\r\r\tselector\t\t\t\t\tA symbol - the selector being described\r\targumentSpecifications\tA list of specifications for the formal arguments of the method\r\tresultSpecification \t\tA characterization of the return value of the method\r\tuserLevel\t\t\t\t\r\tattributeKeywords\t\tA list of symbols, comprising keywords that the user wishes to\r\t\t\t\t\t\t\t\tsee on the screen for this method\r\tdefaultStatus\t\t\tThe status to apply to new instances of the class by default\r\t\t\t\t\t\t\t(#ticking, #paused, #normal, etc.)\r\r\r!\r\r\r!MethodInterface methodsFor: 'initialization' stamp: 'sw 3/10/2001 00:38'!\rargumentVariables\r\t\"Answer the list of argumentVariables of the interface\"\r\r\t^ argumentVariables ifNil: [argumentVariables _ OrderedCollection new]! !\r\r!MethodInterface methodsFor: 'initialization' stamp: 'sw 3/9/2001 17:00'!\rinitialize\r\t\"Initialize the receiver\"\r\r\tsuper initialize.\r\tattributeKeywords _ OrderedCollection new.\r\tdefaultStatus _ #normal.\r\targumentVariables _ OrderedCollection new\r! !\r\r\r!MethodInterface methodsFor: 'access' stamp: 'sw 3/8/2001 16:29'!\rcompanionSetterSelector\r\t\"If there is a companion setter selector, anwer it, else answer nil\"\r\r\t^ resultSpecification ifNotNil:\r\t\t[resultSpecification companionSetterSelector]! !\r\r!MethodInterface methodsFor: 'access' stamp: 'sw 9/13/2001 16:42'!\relementSymbol\r\t\"Answer the element symbol, for the purposes of translation\"\r\r\t^ selector! !\r\r!MethodInterface methodsFor: 'access' stamp: 'sw 9/12/2001 14:05'!\relementWording\r\t\"Answer the wording to be shown on friendly tiles representing the receiver; by default, it is just the same as the method selector itself, but anything special-cased via #wordingForOperator:, and all getters/setters of slots, are transformed into somethingfriendlier here\"\r\r\t^ self translatedToPrevailingLanguage wording! !\r\r!MethodInterface methodsFor: 'access' stamp: 'sw 4/5/2001 22:21'!\rprintOn: aStream\r\t\"print the receiver on a stream.  Overridden to provide details about wording, selector, result type, and companion setter.\"\r\r\tsuper printOn: aStream.\r\taStream nextPutAll: ' - wording: ''', self elementWording asString, ''' selector: #', selector asString.\r\tself argumentVariables size > 0 ifTrue:\r\t\t[aStream nextPutAll: 'Arguments: '.\r\t\targumentVariables doWithIndex:\r\t\t\t[:aVariable :anIndex | \r\t\t\t\taStream nextPutAll: 'argument #', anIndex printString, ' name = ', aVariable variableName asString, ', type = ', aVariable variableType]].\r\tresultSpecification ifNotNil:\r\t\t[aStream nextPutAll: ' result type = ', resultSpecification resultType asString.\r\t\tresultSpecification companionSetterSelector ifNotNil:\r\t\t\t[aStream nextPutAll: ' setter = ', resultSpecification companionSetterSelector asString]]\r\t! !\r\r!MethodInterface methodsFor: 'access' stamp: 'sw 3/10/2001 00:38'!\rresultType\r\t\"Answer the result type\"\r\r\t^ resultSpecification\r\t\tifNotNil:\r\t\t\t[resultSpecification type]\r\t\tifNil:\r\t\t\t[#unknown]! !\r\r!MethodInterface methodsFor: 'access' stamp: 'sw 1/23/2001 18:37'!\rselector\r\t\"Answer the receiver's selector\"\r\r\t^ selector! !\r\r\r!MethodInterface methodsFor: 'initialize-release' stamp: 'ar 3/3/2001 19:38'!\rreleaseCachedState\r\t\"Sent by player\"! !\rParseNode subclass: #MethodNode\r\tinstanceVariableNames: 'selectorOrFalse precedence arguments block literals primitive encoder temporaries sourceText'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Compiler'!\r!MethodNode commentStamp: '<historical>' prior: 0!\rI am the root of the parse tree.!\r\r\r!MethodNode methodsFor: 'initialize-release' stamp: 'tk 8/3/1999 12:47'!\rblock\r\t^ block! !\r\r!MethodNode methodsFor: 'initialize-release' stamp: 'ajh 1/24/2003 17:37'!\rselector: symbol\r\r\tselectorOrFalse _ symbol! !\r\r!MethodNode methodsFor: 'initialize-release'!\rselector: selOrFalse arguments: args precedence: p temporaries: temps block: blk encoder: anEncoder primitive: prim \r\t\"Initialize the receiver with respect to the arguments given.\"\r\r\tencoder _ anEncoder.\r\tselectorOrFalse _ selOrFalse.\r\tprecedence _ p.\r\targuments _ args.\r\ttemporaries _ temps.\r\tblock _ blk.\r\tprimitive _ prim! !\r\r!MethodNode methodsFor: 'initialize-release' stamp: 'ajh 1/22/2003 17:53'!\rsourceText: stringOrText\r\r\tsourceText _ stringOrText! !\r\r\r!MethodNode methodsFor: 'code generation'!\rencoder\r\t^ encoder! !\r\r!MethodNode methodsFor: 'code generation' stamp: 'di 5/25/2000 06:48'!\rgenerate: trailer \r\t\"The receiver is the root of a parse tree. Answer a CompiledMethod. The\r\targument, trailer, is the references to the source code that is stored with \r\tevery CompiledMethod.\"\r\r\t| blkSize nLits stack strm nArgs method |\r\tself generate: trailer ifQuick: \r\t\t[:m |  method _ m.\r\t\tmethod cacheTempNames: self tempNames.\r\t\t^ method].\r\tnArgs _ arguments size.\r\tblkSize _ block sizeForEvaluatedValue: encoder.\r\tliterals _ encoder allLiterals.\r\t(nLits _ literals size) > 255\r\t\tifTrue: [^self error: 'Too many literals referenced'].\r\tmethod _ CompiledMethod\t\"Dummy to allocate right size\"\r\t\t\t\tnewBytes: blkSize\r\t\t\t\ttrailerBytes: trailer \r\t\t\t\tnArgs: nArgs\r\t\t\t\tnTemps: encoder maxTemp\r\t\t\t\tnStack: 0\r\t\t\t\tnLits: nLits\r\t\t\t\tprimitive: primitive.\r\tstrm _ ReadWriteStream with: method.\r\tstrm position: method initialPC - 1.\r\tstack _ ParseStack new init.\r\tblock emitForEvaluatedValue: stack on: strm.\r\tstack position ~= 1 ifTrue: [^self error: 'Compiler stack\rdiscrepancy'].\r\tstrm position ~= (method size - trailer size) \r\t\tifTrue: [^self error: 'Compiler code size discrepancy'].\r\tmethod needsFrameSize: stack size.\r\t1 to: nLits do: [:lit | method literalAt: lit put: (literals at: lit)].\r\tmethod cacheTempNames: self tempNames.\r\t^ method! !\r\r!MethodNode methodsFor: 'code generation' stamp: 'di 5/25/2000 06:45'!\rgenerate: trailer ifQuick: methodBlock\r\t| v |\r\t(primitive = 0 and: [arguments size = 0 and: [block isQuick]])\r\t\tifFalse: [^ self].\r\tv _ block code.\r\tv < 0\r\t\tifTrue: [^ self].\r\tv = LdSelf\r\t\tifTrue: [^ methodBlock value: (CompiledMethod toReturnSelfTrailerBytes: trailer)].\r\t(v between: LdTrue and: LdMinus1 + 3)\r\t\tifTrue: [^ methodBlock value: (CompiledMethod toReturnConstant: v - LdSelf trailerBytes: trailer)].\r\tv < ((CodeBases at: LdInstType) + (CodeLimits at: LdInstType))\r\t\tifTrue: [^ methodBlock value: (CompiledMethod toReturnField: v trailerBytes: trailer)].\r\tv // 256 = 1\r\t\tifTrue: [^ methodBlock value: (CompiledMethod toReturnField: v \\\\ 256 trailerBytes: trailer)]! !\r\r!MethodNode methodsFor: 'code generation' stamp: 'ajh 3/24/2003 14:51'!\rgenerateNative: trailer \r\t\"The receiver is the root of a parse tree. Answer a CompiledMethod. The\r\targument, trailer, is the references to the source code that is stored with \r\tevery CompiledMethod.\"\r\r\t| blkSize nLits stack strm nArgs method |\r\tself generate: trailer ifQuick: \r\t\t[:m |  method _ m.\r\t\tmethod cacheTempNames: self tempNames.\r\t\t^ method].\r\tnArgs _ arguments size.\r\tblkSize _ block sizeForEvaluatedValue: encoder.\r\tliterals _ encoder allLiterals.\r\t(nLits _ literals size) > 255\r\t\tifTrue: [^self error: 'Too many literals referenced'].\r\tmethod _ CompiledMethod\t\"Dummy to allocate right size\"\r\t\t\t\tnewBytes: blkSize\r\t\t\t\ttrailerBytes: trailer \r\t\t\t\tnArgs: nArgs\r\t\t\t\tnTemps: encoder maxTemp\r\t\t\t\tnStack: 0\r\t\t\t\tnLits: nLits\r\t\t\t\tprimitive: primitive.\r\tstrm _ ReadWriteStream with: method.\r\tstrm position: method initialPC - 1.\r\tstack _ ParseStack new init.\r\tblock emitForEvaluatedValue: stack on: strm.\r\tstack position ~= 1 ifTrue: [^self error: 'Compiler stack\rdiscrepancy'].\r\tstrm position ~= (method size - trailer size) \r\t\tifTrue: [^self error: 'Compiler code size discrepancy'].\r\tmethod needsFrameSize: stack size.\r\t1 to: nLits do: [:lit | method literalAt: lit put: (literals at: lit)].\r\tmethod cacheTempNames: self tempNames.\r\t^ method! !\r\r!MethodNode methodsFor: 'code generation' stamp: 'ajh 7/6/2003 15:25'!\rparserClass\r\t\"Which parser produces this class of parse node\"\r\r\t^ Parser! !\r\r!MethodNode methodsFor: 'code generation'!\rselector \r\t\"Answer the message selector for the method represented by the receiver.\"\r\r\t(selectorOrFalse isMemberOf: Symbol)\r\t\tifTrue: [^selectorOrFalse].\r\t^selectorOrFalse key! !\r\r!MethodNode methodsFor: 'code generation' stamp: 'ajh 7/6/2003 15:26'!\rsourceMap\r\t\"Answer a SortedCollection of associations of the form: pc (byte offset in me) -> sourceRange (an Interval) in source text.\"\r\r\t| methNode |\r\tmethNode _ self.\r\tsourceText ifNil: [\r\t\t\"No source, use decompile string as source to map from\"\r\t\tmethNode _ self parserClass new\r\t\t\tparse: self decompileString\r\t\t\tclass: self methodClass\r\t].\r\tmethNode generateNative: #(0 0 0 0).  \"set bytecodes to map to\"\r\t^ methNode encoder sourceMap! !\r\r\r!MethodNode methodsFor: 'converting' stamp: 'sw 5/20/2001 10:01'!\rasAltSyntaxText \r\t\"Answer a string description of the parse tree whose root is the receiver, using the alternative syntax\"\r\r\t^ DialectStream\r\t\tdialect: #SQ00\r\t\tcontents: [:strm | self printOn: strm]! !\r\r!MethodNode methodsFor: 'converting' stamp: 'sw 5/20/2001 10:00'!\rasColorizedSmalltalk80Text\r\t\"Answer a colorized Smalltalk-80-syntax string description of the parse tree whose root is the receiver.\"\r\r\t^ DialectStream\r\t\tdialect: #ST80\r\t\tcontents: [:strm | self printOn: strm]! !\r\r!MethodNode methodsFor: 'converting' stamp: 'di 4/13/2000 21:09'!\rdecompileString \r\t\"Answer a string description of the parse tree whose root is the receiver.\"\r\r\t^ (DialectStream dialect: #ST80 contents: [:strm | self printOn: strm])\r\t\tasString\r! !\r\r!MethodNode methodsFor: 'converting' stamp: 'di 4/5/2000 10:07'!\rdecompileText \r\t\"Answer a string description of the parse tree whose root is the receiver.\"\r\r\t^ DialectStream\r\t\tdialect: (Preferences printAlternateSyntax ifTrue: [#SQ00] ifFalse: [#ST80])\r\t\tcontents: [:strm | self printOn: strm]! !\r\r\r!MethodNode methodsFor: 'printing' stamp: 'ajh 1/22/2003 17:39'!\rmethodClass\r\r\t^ encoder classEncoding! !\r\r!MethodNode methodsFor: 'printing' stamp: 'di 6/13/2000 00:46'!\rprintOn: aStream \r\r\tprecedence = 1\r\t\tifTrue: \r\t\t\t[aStream nextPutAll: self selector]\r\t\tifFalse: \r\t\t\t[self selector keywords with: arguments do: \r\t\t\t\t[:kwd :arg | \r\t\t\t\taStream dialect = #SQ00\r\t\t\t\t\tifTrue: [(kwd endsWith: ':')\r\t\t\t\t\t\t\tifTrue: [aStream withStyleFor: #methodSelector\r\t\t\t\t\t\t\t\t\tdo: [aStream nextPutAll: kwd allButLast].\r\t\t\t\t\t\t\t\t\taStream nextPutAll: ' (']\r\t\t\t\t\t\t\tifFalse: [aStream withStyleFor: #methodSelector\r\t\t\t\t\t\t\t\t\tdo: [aStream nextPutAll: kwd].\r\t\t\t\t\t\t\t\t\taStream space]]\r\t\t\t\t\tifFalse: [aStream nextPutAll: kwd; space].\r\t\t\t\taStream withStyleFor: #methodArgument\r\t\t\t\t\tdo: [aStream nextPutAll: arg key].\r\t\t\t\t(aStream dialect = #SQ00 and: [kwd endsWith: ':'])\r\t\t\t\t\tifTrue: [aStream nextPutAll: ') ']\r\t\t\t\t\tifFalse: [aStream space]]].\r\tcomment == nil ifFalse: \r\t\t\t[aStream crtab: 1.\r\t\t\tself printCommentOn: aStream indent: 1].\r\ttemporaries size > 0 ifTrue: \r\t\t\t[aStream crtab: 1.\r\t\t\taStream dialect = #SQ00\r\t\t\t\tifTrue: [aStream withStyleFor: #setOrReturn do: [aStream nextPutAll: 'Use']]\r\t\t\t\tifFalse: [aStream nextPutAll: '|'].\r\t\t\taStream withStyleFor: #temporaryVariable\r\t\t\t\tdo: [temporaries do: \r\t\t\t\t\t\t[:temp | aStream space; nextPutAll: temp key]].\r\t\t\taStream dialect = #SQ00\r\t\t\t\tifTrue: [aStream nextPutAll: '.']\r\t\t\t\tifFalse: [aStream nextPutAll: ' |']].\r\tprimitive > 0 ifTrue:\r\t\t\t[(primitive between: 255 and: 519) ifFalse:  \" Dont decompile <prim> for, eg, ^ self \"\r\t\t\t\t[aStream crtab: 1.\r\t\t\t\tself printPrimitiveOn: aStream]].\r\taStream crtab: 1.\r\t^ block printStatementsOn: aStream indent: 0! !\r\r!MethodNode methodsFor: 'printing' stamp: 'ar 2/13/2001 21:15'!\rprintPrimitiveOn: aStream \r\t\"Print the primitive on aStream\"\r\t| primIndex primDecl |\r\tprimIndex _ primitive.\r\tprimIndex = 0\r\t\tifTrue: [^ self].\r\tprimIndex = 120\r\t\tifTrue: [\"External call spec\"\r\t\t\t^ aStream print: encoder literals first].\r\taStream nextPutAll: '<primitive: '.\r\tprimIndex = 117\r\t\tifTrue: [primDecl _ encoder literals at: 1.\r\t\t\taStream nextPut: $';\r\t\t\t\t\r\t\t\t\tnextPutAll: (primDecl at: 2);\r\t\t\t\t nextPut: $'.\r\t\t\t(primDecl at: 1) notNil\r\t\t\t\tifTrue: [aStream nextPutAll: ' module:';\r\t\t\t\t\t\t nextPut: $';\r\t\t\t\t\t\t\r\t\t\t\t\t\tnextPutAll: (primDecl at: 1);\r\t\t\t\t\t\t nextPut: $']]\r\t\tifFalse: [aStream print: primIndex].\r\taStream nextPut: $>.\r\tSmalltalk at: #Interpreter ifPresent:[:cls|\r\t\taStream nextPutAll: ' \"'\r\t\t\t\t, ((cls classPool at: #PrimitiveTable)\r\t\t\t\t\t\tat: primIndex + 1) , '\" '].! !\r\r!MethodNode methodsFor: 'printing' stamp: 'ajh 1/24/2003 17:41'!\rsourceText\r\r\t^ sourceText ifNil: [self printString]! !\r\r!MethodNode methodsFor: 'printing'!\rtempNames\r\t^ encoder tempNames! !\r\r\r!MethodNode methodsFor: 'tiles' stamp: 'RAA 8/20/1999 19:56'!\rrawSourceRanges\r\r\tself generate: #(0 0 0 0).\r\t^encoder rawSourceRanges! !\rObject subclass: #MethodReference\r\tinstanceVariableNames: 'classSymbol classIsMeta methodSymbol stringVersion'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Browser'!\r\r!MethodReference methodsFor: 'queries' stamp: 'RAA 5/28/2001 07:42'!\ractualClass \r\r\t| actualClass |\r\r\tactualClass _ Smalltalk atOrBelow: classSymbol ifAbsent: [^nil].\r\tclassIsMeta ifTrue: [^actualClass class].\r\t^actualClass\r\r! !\r\r!MethodReference methodsFor: 'queries' stamp: 'RAA 5/28/2001 06:19'!\rasStringOrText\r\r\t^stringVersion! !\r\r!MethodReference methodsFor: 'queries' stamp: 'RAA 5/28/2001 08:11'!\rclassIsMeta\r\r\t^classIsMeta! !\r\r!MethodReference methodsFor: 'queries' stamp: 'RAA 5/28/2001 08:10'!\rclassSymbol\r\r\t^classSymbol! !\r\r!MethodReference methodsFor: 'queries' stamp: 'cwp 7/7/2003 17:44'!\risValid\r\t\"Answer whether the receiver represents a current selector or Comment\"\r\r\t| aClass |\r\t(#(DoIt DoItIn:) includes: methodSymbol) ifTrue: [^ false].\r\t(aClass _ self actualClass) ifNil: [^ false].\r\t^ (aClass includesSelector: methodSymbol) or:\r\t\t[methodSymbol == #Comment]! !\r\r!MethodReference methodsFor: 'queries' stamp: 'RAA 5/28/2001 08:10'!\rmethodSymbol\r\r\t^methodSymbol! !\r\r!MethodReference methodsFor: 'queries' stamp: 'sw 11/5/2001 00:53'!\rprintOn: aStream\r\t\"Print the receiver on a stream\"\r\r\tsuper printOn: aStream.\r\taStream nextPutAll: ' ', self actualClass name, ' >> ', methodSymbol! !\r\r\r!MethodReference methodsFor: 'setting' stamp: 'RAA 5/28/2001 08:06'!\rsetClass: aClass methodSymbol: methodSym stringVersion: aString \r\r\tclassSymbol _ aClass theNonMetaClass name.\r\tclassIsMeta _ aClass isMeta.\r\tmethodSymbol _ methodSym.\r\tstringVersion _ aString.! !\r\r!MethodReference methodsFor: 'setting' stamp: 'RAA 5/28/2001 07:34'!\rsetClassAndSelectorIn: csBlock\r\r\t^csBlock value: self actualClass value: methodSymbol! !\r\r!MethodReference methodsFor: 'setting' stamp: 'RAA 5/28/2001 06:04'!\rsetClassSymbol: classSym classIsMeta: isMeta methodSymbol: methodSym stringVersion: aString \r\r\tclassSymbol _ classSym.\r\tclassIsMeta _ isMeta.\r\tmethodSymbol _ methodSym.\r\tstringVersion _ aString.! !\r\r!MethodReference methodsFor: 'setting' stamp: 'RAA 5/28/2001 11:34'!\rsetStandardClass: aClass methodSymbol: methodSym\r\r\tclassSymbol _ aClass theNonMetaClass name.\r\tclassIsMeta _ aClass isMeta.\r\tmethodSymbol _ methodSym.\r\tstringVersion _ aClass name , ' ' , methodSym.! !\r\r\r!MethodReference methodsFor: 'string version' stamp: 'RAA 5/29/2001 14:44'!\rstringVersion\r\r\t^stringVersion! !\r\r!MethodReference methodsFor: 'string version' stamp: 'RAA 5/29/2001 14:44'!\rstringVersion: aString\r\r\tstringVersion _ aString! !\r\r\r!MethodReference methodsFor: 'comparisons' stamp: 'RAA 5/28/2001 11:56'!\r<= anotherMethodReference\r\r\tclassSymbol < anotherMethodReference classSymbol ifTrue: [^true].\r\tclassSymbol > anotherMethodReference classSymbol ifTrue: [^false].\r\tclassIsMeta = anotherMethodReference classIsMeta ifFalse: [^classIsMeta not].\r\t^methodSymbol <= anotherMethodReference methodSymbol\r! !\r\r!MethodReference methodsFor: 'comparisons' stamp: 'dgd 3/7/2003 13:18'!\r= anotherMethodReference \r\t\"Answer whether the receiver and the argument represent the \r\tsame object.\"\r\t^ self species == anotherMethodReference species\r\t\tand: [self classSymbol = anotherMethodReference classSymbol]\r\t\tand: [self classIsMeta = anotherMethodReference classIsMeta]\r\t\tand: [self methodSymbol = anotherMethodReference methodSymbol]! !\r\r!MethodReference methodsFor: 'comparisons' stamp: 'dgd 3/8/2003 11:54'!\rhash\r\t\"Answer a SmallInteger whose value is related to the receiver's  \r\tidentity.\"\r\t^ (self species hash bitXor: self classSymbol hash)\r\t\tbitXor: self methodSymbol hash! !\r\r\r!MethodReference methodsFor: '*packageinfo-base' stamp: 'ab 5/23/2003 22:58'!\rcategory\r\n\t^ self actualClass organization categoryOfElement: methodSymbol! !\r\r!MethodReference methodsFor: '*packageinfo-base' stamp: 'ab 5/23/2003 22:58'!\rsourceCode\r\t^ self actualClass sourceCodeAt: methodSymbol! !\rController subclass: #ModalController\r\tinstanceVariableNames: 'modeActive'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Framework'!\r!ModalController commentStamp: '<historical>' prior: 0!\rI am a controller that puts the poor user into a mode by not relinquishing control. However, I do pass control onto my underlings. Some underling is expected to end the mode by sending me 'close'. Watch out Larry Tesler, the mode lives on...\r!\r\r\r!ModalController methodsFor: 'as yet unclassified' stamp: 'jm 5/1/1998 07:05'!\rclose\r\t\"This is how we leave the mode.\" \r\r\tmodeActive _ false.\r! !\r\r!ModalController methodsFor: 'as yet unclassified' stamp: 'jm 5/1/1998 07:02'!\rcontrolInitialize\r\r\tmodeActive _ true.\r\t^ super controlInitialize\r! !\r\r!ModalController methodsFor: 'as yet unclassified' stamp: 'jm 5/1/1998 07:00'!\risControlActive\r\r\t^ modeActive\r! !\r\r!ModalController methodsFor: 'as yet unclassified' stamp: 'jm 5/1/1998 07:00'!\risControlWanted\r\r\t^ modeActive\r! !\rStandardSystemView subclass: #ModalSystemWindowView\r\tinstanceVariableNames: 'modalBorder'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-FileList'!\r!ModalSystemWindowView commentStamp: '<historical>' prior: 0!\rI am a view for a Modal System Window.  I vary from StandardSystemView, of which I am a subclass in a few ways:\r\r\t(1) I use ModalController as my default controller;\r\t(2) When asked to update with the symbol #close, I direct the controller to close;\r\t(3) I display a slightly different title bar with no control boxes.!\r\r\r!ModalSystemWindowView methodsFor: 'initialize-release' stamp: 'acg 2/18/2000 20:41'!\rborderWidth: anObject\r\r\tmodalBorder _ false.\r\t^super borderWidth: anObject! !\r\r!ModalSystemWindowView methodsFor: 'initialize-release' stamp: 'acg 2/19/2000 00:50'!\rinitialize \r\t\"Refer to the comment in View|initialize.\"\r\tsuper initialize.\r\tself borderWidth: 5.\r\tself noLabel.\r\tmodalBorder _ true.! !\r\r\r!ModalSystemWindowView methodsFor: 'modal dialog' stamp: 'BG 12/13/2002 11:33'!\rdoModalDialog\r\r\t| savedArea |\r\tself resizeInitially.\r\tself resizeTo: \r\t\t((self windowBox)\r\t\t\talign: self windowBox center\r\t\t\twith: Display boundingBox aboveCenter).\r\tsavedArea _ Form fromDisplay: self windowBox.\r\tself displayEmphasized.\r\tself controller startUp.\r\tself release.\r\tsavedArea displayOn: Display at: self windowOrigin.\r! !\r\r\r!ModalSystemWindowView methodsFor: 'controller access' stamp: 'acg 2/9/2000 00:58'!\rdefaultControllerClass\r\r\t^ModalController! !\r\r\r!ModalSystemWindowView methodsFor: 'label access' stamp: 'acg 2/9/2000 08:35'!\rbackgroundColor\r\t^Color lightYellow! !\r\r\r!ModalSystemWindowView methodsFor: 'displaying' stamp: 'acg 2/18/2000 20:24'!\rdisplay\r\r\tsuper display.\r\tself displayLabelBackground: false.\r\tself displayLabelText.\r! !\r\r!ModalSystemWindowView methodsFor: 'displaying' stamp: 'acg 2/19/2000 00:59'!\rdisplayBorder\r\t\"Display the receiver's border (using the receiver's borderColor).\"\r\r\tmodalBorder ifFalse: [^super displayBorder].\r\r\tDisplay\r\t\tborder: self displayBox\r\t\twidthRectangle: (1@1 corner: 2@2)\r\t\trule: Form over\r\t\tfillColor: Color black.\r\tDisplay\r\t\tborder: (self displayBox insetBy: (1@1 corner: 2@2))\r\t\twidthRectangle: (4@4 corner: 3@3)\r\t\trule: Form over\r\t\tfillColor: (Color r: 16rEA g: 16rEA b: 16rEA).\r! !\r\r!ModalSystemWindowView methodsFor: 'displaying' stamp: 'acg 2/9/2000 07:21'!\rdisplayLabelBoxes\r\t\"Modal dialogs don't have closeBox or growBox.\"\r! !\r\r\r!ModalSystemWindowView methodsFor: 'model access' stamp: 'acg 2/9/2000 00:57'!\rupdate: aSymbol\r\taSymbol = #close\r\t\tifTrue: [^self controller close].\r\t^super update: aSymbol! !\rObject subclass: #Model\r\tinstanceVariableNames: 'dependents'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Objects'!\r!Model commentStamp: '<historical>' prior: 0!\rProvides a superclass for classes that function as models.  The only behavior provided is fast dependents maintenance, which bypasses the generic DependentsFields mechanism.  1/23/96 sw!\r\r\r!Model methodsFor: 'dependents' stamp: 'sma 2/29/2000 19:26'!\rcanDiscardEdits\r\t\"Answer true if none of the views on this model has unaccepted edits that matter.\"\r\r\tdependents ifNil: [^ true].\r\t^ super canDiscardEdits\r! !\r\r!Model methodsFor: 'dependents' stamp: 'BG 10/29/2003 08:37'!\rcontainingWindow\r\t\"Answer the window that holds the receiver.  The dependents technique is odious and may not be airtight, if multiple windows have the same model.\"\r\r\t^ self dependents detect:\r\t\t[:d | (d isKindOf: StandardSystemView) and: [d model == self]] ifNone: [nil]! !\r\r!Model methodsFor: 'dependents' stamp: 'jm 3/24/98 15:12'!\rhasUnacceptedEdits\r\t\"Answer true if any of the views on this model has unaccepted edits.\"\r\r\tdependents == nil ifTrue: [^ false].\r\t^ super hasUnacceptedEdits\r! !\r\r!Model methodsFor: 'dependents' stamp: 'sma 2/29/2000 19:54'!\rmyDependents\r\t^ dependents! !\r\r!Model methodsFor: 'dependents' stamp: 'sma 2/29/2000 19:54'!\rmyDependents: aCollectionOrNil\r\tdependents _ aCollectionOrNil! !\r\r!Model methodsFor: 'dependents' stamp: 'BG 10/28/2003 21:00'!\rtopView\r\t\"Find the first top view on me. Is there any danger of their being two with the same model?  Any danger from ungarbage collected old views?  Ask if schedulled?\"\r\r\tdependents ifNil: [^ nil].\r\t\r\tdependents do: [:v | v superView ifNil: [v model == self ifTrue: [^ v]]].\r\t^ nil\r! !\r\r\r!Model methodsFor: 'text links' stamp: 'RAA 5/29/2001 11:14'!\raddItem: classAndMethod\r\t\"Make a linked message list and put this method in it\"\r\t| list |\r\r\tself flag: #mref.\t\"classAndMethod is a String\"\r\r\tMessageSet \r\t\tparse: classAndMethod  \r\t\ttoClassAndSelector: [ :class :sel |\r\t\t\tclass ifNil: [^self].\r\t\t\tlist _ OrderedCollection with: (\r\t\t\t\tMethodReference new\r\t\t\t\t\tsetClass: class  \r\t\t\t\t\tmethodSymbol: sel \r\t\t\t\t\tstringVersion: classAndMethod\r\t\t\t).\r\t\t\tMessageSet \r\t\t\t\topenMessageList: list \r\t\t\t\tname: 'Linked by HyperText'.\r\t\t]\r\r! !\r\r\r!Model methodsFor: 'menus' stamp: 'di 4/11/98 11:34'!\rperform: selector orSendTo: otherTarget\r\t\"Selector was just chosen from a menu by a user.  If can respond, then perform it on myself.  If not, send it to otherTarget, presumably the editPane from which the menu was invoked.\" \r\r\t\"default is that the editor does all\"\r\t^ otherTarget perform: selector.! !\r\r!Model methodsFor: 'menus' stamp: 'tk 4/17/1998 17:28'!\rselectedClass\r\t\"All owners of TextViews are asked this during a doIt\"\r\t^ nil! !\r\r!Model methodsFor: 'menus' stamp: 'zz 3/2/2004 23:49'!\rstep\r\t\"Default for morphic models is no-op\"! !\r\r!Model methodsFor: 'menus' stamp: 'sw 12/15/2000 13:21'!\rtrash\r\t\"What should be displayed if a trash pane is restored to initial state\"\r\r\t^ ''! !\r\r!Model methodsFor: 'menus' stamp: 'sw 12/15/2000 13:21'!\rtrash: ignored\r\t\"Whatever the user submits to the trash, it need not be saved.\"\r\r\t^ true! !\r\r\r!Model methodsFor: 'keyboard' stamp: 'BG 10/29/2003 08:54'!\rarrowKey: aChar from: view\r\t\"Process the up and down arrows in a list pane.  Note that the listView tells us what index variable, how to get the list, and how to move the index.  Derived from a Martin Pammer submission, 02/98\"\r\r     | keyEvent oldSelection nextSelection max min howMany |\r\r\t(#(1 4 11 12 30 31) includes: (keyEvent _ aChar asciiValue)) ifFalse:\r\t\t[\r\t\t\t^ self].\r\r     oldSelection := view getCurrentSelectionIndex.\r     nextSelection := oldSelection.\r     max := view maximumSelection.\r     min := view minimumSelection.\r     howMany := view numSelectionsInView.\t\"get this exactly??\"\r\r     keyEvent == 31 ifTrue:\r\t\t[\"down-arrow; move down one, wrapping to top if needed\"\r\t\tnextSelection := oldSelection + 1.\r\t\tnextSelection > max ifTrue: [nextSelection _ 1]].\r\r     keyEvent == 30 ifTrue:\r\t\t[\"up arrow; move up one, wrapping to bottom if needed\"\r\t\tnextSelection := oldSelection - 1.\r\t\tnextSelection < 1 ifTrue: [nextSelection _ max]].\r\r     keyEvent == 1  ifTrue: [nextSelection := 1].  \"home\"\r     keyEvent == 4  ifTrue: [nextSelection := max].   \"end\"\r     keyEvent == 11 ifTrue: [nextSelection := min max: (oldSelection - howMany)].  \"page up\"\r     keyEvent == 12  ifTrue: [nextSelection := (oldSelection + howMany) min: max].  \"page down\"\r     nextSelection = oldSelection  ifFalse:\r\t\t[self okToChange\r\t\t\tifTrue:\r\t\t\t\t[view changeModelSelection: nextSelection.\r\t\t\t\t\"view controller moveMarker\"]]\r\t\t\t! !\r\r\r!Model methodsFor: 'copying' stamp: 'tk 10/21/2002 12:59'!\rveryDeepFixupWith: deepCopier \r\t\"See if the dependents are being copied also.  If so, point at the new copies.  (The dependent has self as its model.)\r\tDependents handled in class Object, when the model is not a Model, are fixed up in Object veryDeepCopy.\"\r\r\t| originalDependents refs newDependent |\r\tsuper veryDeepFixupWith: deepCopier.\r\toriginalDependents _ dependents.\r\toriginalDependents ifNil: [\r\t\t^self.\r\t\t].\r\tdependents _ nil.\r\trefs _ deepCopier references.\r\toriginalDependents\r\t\tdo: [:originalDependent | \r\t\t\tnewDependent _ refs\r\t\t\t\t\t\tat: originalDependent\r\t\t\t\t\t\tifAbsent: [].\r\t\t\tnewDependent\r\t\t\t\tifNotNil: [self addDependent: newDependent]]!\r]style[(29 206 19 395)f1b,f1,f1LObject veryDeepCopy;,f1! !\r\r!Model methodsFor: 'copying' stamp: 'RB 9/20/2001 16:25'!\rveryDeepInner: deepCopier\r\t\"Shallow copy dependents and fix them later\"\r! !\rModifiedEvent subclass: #ModifiedClassDefinitionEvent\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Change Notification'!\r\r!ModifiedClassDefinitionEvent methodsFor: 'accessing' stamp: 'NS 1/20/2004 19:30'!\rclassVarNames\r\t^ item classVarNames asSet! !\r\r!ModifiedClassDefinitionEvent methodsFor: 'accessing' stamp: 'NS 1/20/2004 19:29'!\rinstVarNames\r\t^ item instVarNames asSet! !\r\r!ModifiedClassDefinitionEvent methodsFor: 'accessing' stamp: 'NS 1/20/2004 19:30'!\roldClassVarNames\r\t^ oldItem classVarNames asSet! !\r\r!ModifiedClassDefinitionEvent methodsFor: 'accessing' stamp: 'NS 1/20/2004 19:29'!\roldInstVarNames\r\t^ oldItem instVarNames asSet! !\r\r!ModifiedClassDefinitionEvent methodsFor: 'accessing' stamp: 'NS 1/20/2004 19:31'!\roldSharedPools\r\t^ oldItem sharedPools! !\r\r!ModifiedClassDefinitionEvent methodsFor: 'accessing' stamp: 'NS 1/20/2004 19:31'!\rsharedPools\r\t^ item sharedPools! !\r\r!ModifiedClassDefinitionEvent methodsFor: 'accessing' stamp: 'NS 1/20/2004 19:28'!\rsuperclass\r\t^ item superclass! !\r\r\r!ModifiedClassDefinitionEvent methodsFor: 'testing' stamp: 'NS 1/26/2004 09:33'!\ranyChanges\r\t^ self isSuperclassModified or: [self areInstVarsModified or: [self areClassVarsModified or: [self areSharedPoolsModified]]]! !\r\r!ModifiedClassDefinitionEvent methodsFor: 'testing' stamp: 'NS 1/20/2004 19:31'!\rareClassVarsModified\r\t^ self classVarNames ~= self oldClassVarNames! !\r\r!ModifiedClassDefinitionEvent methodsFor: 'testing' stamp: 'NS 1/20/2004 19:30'!\rareInstVarsModified\r\t^ self instVarNames ~= self oldInstVarNames! !\r\r!ModifiedClassDefinitionEvent methodsFor: 'testing' stamp: 'NS 1/20/2004 19:32'!\rareSharedPoolsModified\r\t^ self sharedPools ~= self oldSharedPools! !\r\r!ModifiedClassDefinitionEvent methodsFor: 'testing' stamp: 'NS 1/20/2004 19:29'!\risSuperclassModified\r\t^ item superclass ~~ oldItem superclass! !\r\r\r!ModifiedClassDefinitionEvent methodsFor: 'printing' stamp: 'NS 1/21/2004 09:25'!\rprintOn: aStream\r\tsuper printOn: aStream.\r\taStream\r\t\tnextPutAll: ' Super: ';\r\t\tprint: self isSuperclassModified;\r\t\tnextPutAll: ' InstVars: ';\r\t\tprint: self areInstVarsModified;\r\t\tnextPutAll: ' ClassVars: ';\r\t\tprint: self areClassVarsModified;\r\t\tnextPutAll: ' SharedPools: ';\r\t\tprint: self areSharedPoolsModified.! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rModifiedClassDefinitionEvent class\r\tinstanceVariableNames: ''!\r\r!ModifiedClassDefinitionEvent class methodsFor: 'instance creation' stamp: 'NS 1/20/2004 11:52'!\rclassDefinitionChangedFrom: oldClass to: newClass\r\t| instance |\r\tinstance := self item: newClass kind: self classKind.\r\tinstance oldItem: oldClass.\r\t^instance! !\r\r\r!ModifiedClassDefinitionEvent class methodsFor: 'accessing' stamp: 'NS 1/20/2004 12:26'!\rsupportedKinds\r\t\"All the kinds of items that this event can take.\"\r\t\r\t^ Array with: self classKind! !\rAbstractEvent subclass: #ModifiedEvent\r\tinstanceVariableNames: 'oldItem'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Change Notification'!\r\r!ModifiedEvent methodsFor: 'testing' stamp: 'NS 1/19/2004 15:09'!\risModified\r\r\t^true! !\r\r\r!ModifiedEvent methodsFor: 'printing' stamp: 'NS 1/19/2004 15:10'!\rprintEventKindOn: aStream\r\r\taStream nextPutAll: 'Modified'! !\r\r!ModifiedEvent methodsFor: 'printing' stamp: 'NS 1/19/2004 17:57'!\rprintOn: aStream\r\tsuper printOn: aStream.\r\taStream\r\t\tnextPutAll: ' oldItem: ';\r\t\tprint: oldItem.! !\r\r\r!ModifiedEvent methodsFor: 'accessing' stamp: 'NS 1/19/2004 15:08'!\roldItem\r\t^ oldItem! !\r\r\r!ModifiedEvent methodsFor: 'private-accessing' stamp: 'NS 1/19/2004 15:08'!\roldItem: anItem\r\toldItem _ anItem! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rModifiedEvent class\r\tinstanceVariableNames: ''!\r\r!ModifiedEvent class methodsFor: 'accessing' stamp: 'NS 1/19/2004 15:10'!\rchangeKind\r\r\t^#Modified! !\r\r!ModifiedEvent class methodsFor: 'accessing' stamp: 'NS 1/20/2004 12:25'!\rsupportedKinds\r\t\"All the kinds of items that this event can take.\"\r\t\r\t^ Array with: self classKind with: self methodKind with: self categoryKind with: self protocolKind! !\r\r\r!ModifiedEvent class methodsFor: 'instance creation' stamp: 'NS 1/20/2004 19:37'!\rclassDefinitionChangedFrom: oldClass to: newClass\r\t^ ModifiedClassDefinitionEvent classDefinitionChangedFrom: oldClass to: newClass! !\r\r!ModifiedEvent class methodsFor: 'instance creation' stamp: 'NS 1/27/2004 11:40'!\rmethodChangedFrom: oldMethod to: newMethod selector: aSymbol inClass: aClass requestor: requestor\r\t| instance |\r\tinstance := self method: newMethod selector: aSymbol class: aClass requestor: requestor.\r\tinstance oldItem: oldMethod.\r\t^ instance! !\rTimespan subclass: #Month\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: 'ChronologyConstants'\r\tcategory: 'Kernel-Chronology'!\r!Month commentStamp: 'brp 5/13/2003 09:48' prior: 0!\rI represent a month.!\r\r\r!Month methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 09:04'!\rasMonth\r\r\t^ self\n! !\r\r!Month methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 09:05'!\rdaysInMonth\r\r\t^ self duration days.! !\r\r!Month methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 09:05'!\rindex\r\r\t^ self monthIndex\n! !\r\r!Month methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 09:05'!\rname\n\r\r\t^ self monthName\n! !\r\r!Month methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 09:05'!\rprintOn: aStream\n\r\r\taStream nextPutAll: self monthName, ' ', self year printString.! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rMonth class\r\tinstanceVariableNames: ''!\r\r!Month class methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 16:22'!\rmonth: month year: year\r\t\"Create a Month for the given <year> and <month>.\r\t<month> may be a number or a String with the\r\tname of the month. <year> should be with 4 digits.\"\r\r\t^ self starting: (DateAndTime year: year month: month day: 1)\r! !\r\r!Month class methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 16:21'!\rreadFrom: aStream\r\r\t| m y c |\r\n\tm _ (ReadWriteStream with: '') reset.\r\n\t[(c _ aStream next) isSeparator] whileFalse: [m nextPut: c].\r\n\t[(c _ aStream next) isSeparator] whileTrue.\r\n\ty _ (ReadWriteStream with: '') reset.\r\n\ty nextPut: c.\r\n\t[aStream atEnd] whileFalse: [y nextPut: aStream next].\r\r\n\t^ self \r\t\tmonth: m contents\r\t\tyear: y contents\r\r\"Month readFrom: 'July 1998' readStream\"\r! !\r\r!Month class methodsFor: 'squeak protocol' stamp: 'brp 7/1/2003 13:59'!\rstarting: aDateAndTime duration: aDuration \r\t\"Override - a each month has a defined duration\"\r\t| start adjusted days |\r\tstart _ aDateAndTime asDateAndTime.\r\tadjusted _ DateAndTime\r\t\t\t\tyear: start year\r\t\t\t\tmonth: start month\r\t\t\t\tday: 1.\r\tdays _ self daysInMonth: adjusted month forYear: adjusted year.\r\t^ super\r\t\tstarting: adjusted\r\t\tduration: (Duration days: days)! !\r\r\r!Month class methodsFor: 'smalltalk-80' stamp: 'brp 7/27/2003 16:27'!\rdaysInMonth: indexOrName forYear: yearInteger \r\r\t| index |\r\tindex _ indexOrName isInteger \r\t\t\t\tifTrue: [indexOrName]\r\t\t\t\tifFalse: [self indexOfMonth: indexOrName].\r\t^ (DaysInMonth at: index)\r\t\t\t+ ((index = 2\r\t\t\t\t\tand: [Year isLeapYear: yearInteger])\r\t\t\t\t\t\tifTrue: [1] ifFalse: [0])! !\r\r!Month class methodsFor: 'smalltalk-80' stamp: 'brp 8/23/2003 09:29'!\rindexOfMonth: aMonthName\n\r\r\t1 to: 12 do: [ :i |  (aMonthName, '*' match: (MonthNames at: i)) ifTrue: [^i] ].\r\n\tself error: aMonthName , ' is not a recognized month name'.! !\r\r!Month class methodsFor: 'smalltalk-80' stamp: 'brp 5/13/2003 09:02'!\rnameOfMonth: anIndex\r\r\t^ MonthNames at: anIndex.! !\rController subclass: #MouseMenuController\r\tinstanceVariableNames: 'redButtonMenu redButtonMessages'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-ST80 Remnants'!\r!MouseMenuController commentStamp: '<historical>' prior: 0!\rI am a Controller that modifies the scheduling of user activities so that the three mouse buttons can be used to make selections or display menus. The menu items are unary messages to the value of sending my instance the message menuMessageReceiver.!\r\r\r!MouseMenuController methodsFor: 'initialize-release' stamp: 'sma 3/11/2000 15:54'!\rrelease\r\tsuper release.\r\tredButtonMenu release! !\r\r!MouseMenuController methodsFor: 'initialize-release' stamp: 'sma 3/11/2000 15:54'!\rreset\r\t\"Eliminate references to all mouse button menus.\"\r\r\tredButtonMenu _ nil.\r\tredButtonMessages _ nil! !\r\r\r!MouseMenuController methodsFor: 'control defaults' stamp: 'sma 3/11/2000 15:28'!\rcontrolActivity\r\t\"Refer to the comment in Controller|controlActivity.\"\r\t| cursorPoint |\r\tcursorPoint _ sensor cursorPoint.\r\tsuper controlActivity.\r\t(cursorPoint = sensor cursorPoint and: [self viewHasCursor])\r\t\tifTrue: \r\t\t\t[sensor redButtonPressed ifTrue: [^ self redButtonActivity].\r\t\t\tsensor yellowButtonPressed ifTrue: [^ self yellowButtonActivity].\r\t\t\tsensor blueButtonPressed ifTrue: [^ self blueButtonActivity]]! !\r\r!MouseMenuController methodsFor: 'control defaults' stamp: 'sma 3/11/2000 11:24'!\risControlActive \r\t\"In contrast to class Controller, only blue button but not yellow button\r\tevents will end the receiver's control loop.\"\r\r\t^ self viewHasCursor and: [sensor blueButtonPressed not]! !\r\r\r!MouseMenuController methodsFor: 'menu setup'!\rredButtonMenu: aSystemMenu redButtonMessages: anArray \r\t\"Initialize the pop-up menu that should appear when the user presses the \r\tred mouse button to be aSystemMenu. The corresponding messages that \r\tshould be sent are listed in the array, anArray.\"\r\r\tredButtonMenu release.\r\tredButtonMenu _ aSystemMenu.\r\tredButtonMessages _ anArray! !\r\r\r!MouseMenuController methodsFor: 'menu messages' stamp: 'sma 3/11/2000 15:01'!\rblueButtonActivity\r\t\"This normally opens the window menu. It is a no-op here\r\tas only the StandardSystemController deals with that kind\r\tof menus.\"! !\r\r!MouseMenuController methodsFor: 'menu messages'!\rperformMenuMessage: aSelector\r\t\"Perform a menu command by sending self the message aSelector.\r\t Default does nothing special.\"\r\r\t^self perform: aSelector! !\r\r!MouseMenuController methodsFor: 'menu messages' stamp: 'sma 3/11/2000 14:56'!\rredButtonActivity\r\t\"Determine which item in the red button pop-up menu is selected. If one \r\tis selected, then send the corresponding message to the object designated \r\tas the menu message receiver.\"\r\r\t| index |\r\tredButtonMenu ~~ nil\r\t\tifTrue: \r\t\t\t[index _ redButtonMenu startUp.\r\t\t\tindex ~= 0 \r\t\t\t\tifTrue: [self perform: (redButtonMessages at: index)]]\r\t\tifFalse: [super controlActivity]! !\r\r!MouseMenuController methodsFor: 'menu messages' stamp: 'sma 3/11/2000 14:59'!\ryellowButtonActivity\r\t\"This normally opens a popup menu. Determine the selected\r\titem and, if one is selected, then send the corresponding message\r\tto either the model or the receiver.\"\r\r\t^ self pluggableYellowButtonActivity: sensor leftShiftDown! !\r\r\r!MouseMenuController methodsFor: 'pluggable menus' stamp: 'sma 3/11/2000 12:36'!\rgetPluggableYellowButtonMenu: shiftKeyState\r\t^ view getMenu: shiftKeyState! !\r\r!MouseMenuController methodsFor: 'pluggable menus' stamp: 'sw 2/17/2002 04:35'!\rpluggableYellowButtonActivity: shiftKeyState\r\t\"Invoke the model's popup menu.\"\r\r\t| menu |\r\t(menu _ self getPluggableYellowButtonMenu: shiftKeyState)\r\t\tifNil:\r\t\t\t[sensor waitNoButton]\r\t\tifNotNil:\r\t\t\t[self terminateAndInitializeAround:\r\t\t\t\t[menu invokeOn: model orSendTo: self]]! !\r\r!MouseMenuController methodsFor: 'pluggable menus' stamp: 'sw 3/22/2001 12:03'!\rshiftedTextPaneMenuRequest\r\t\"The user chose the more... branch from the text-pane menu.\"\r\r\t^ self pluggableYellowButtonActivity: true! !\r\r!MouseMenuController methodsFor: 'pluggable menus' stamp: 'sma 3/11/2000 12:37'!\rshiftedYellowButtonActivity\r\t\"Invoke the model's special popup menu.\"\r\r\t^ self pluggableYellowButtonActivity: true! !\r\r!MouseMenuController methodsFor: 'pluggable menus' stamp: 'sma 3/11/2000 12:37'!\runshiftedYellowButtonActivity\r\t\"Invoke the model's normal popup menu.\"\r\r\t^ self pluggableYellowButtonActivity: false! !\rController subclass: #NoController\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Framework'!\r!NoController commentStamp: '<historical>' prior: 0!\rI represent a controller that never wants control. I am the controller for views that are non-interactive.!\r\r\r!NoController methodsFor: 'basic control sequence'!\rstartUp\r\t\"I do nothing.\"\r\r\t^self! !\r\r\r!NoController methodsFor: 'control defaults'!\risControlActive \r\t\"Refer to the comment in Controller|isControlActive.\"\r\r\t^false! !\r\r!NoController methodsFor: 'control defaults'!\risControlWanted \r\t\"Refer to the comment in Controller|isControlWanted.\"\r\r\t^false! !\rError subclass: #NonBooleanReceiver\r\tinstanceVariableNames: 'object'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Exceptions Kernel'!\r\r!NonBooleanReceiver methodsFor: 'accessing' stamp: 'hmm 7/29/2001 21:30'!\robject\r\t^object! !\r\r!NonBooleanReceiver methodsFor: 'accessing' stamp: 'hmm 7/29/2001 21:30'!\robject: anObject\r\tobject _ anObject! !\r\r\r!NonBooleanReceiver methodsFor: 'signaledException' stamp: 'hmm 7/29/2001 21:37'!\risResumable\r\r\t^true! !\rException subclass: #Notification\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Exceptions Kernel'!\r!Notification commentStamp: '<historical>' prior: 0!\rA Notification is an indication that something interesting has occurred.  If it is not handled, it will pass by without effect.!\r\r\r!Notification methodsFor: 'exceptionDescription' stamp: 'pnm 8/16/2000 15:04'!\rdefaultAction\r\t\"No action is taken. The value nil is returned as the value of the message that signaled the exception.\"\r\r\t^nil! !\r\r!Notification methodsFor: 'exceptionDescription' stamp: 'tfei 6/4/1999 18:17'!\risResumable\r\t\"Answer true. Notification exceptions by default are specified to be resumable.\"\r\r\t^true! !\rMagnitude subclass: #Number\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Numbers'!\r!Number commentStamp: '<historical>' prior: 0!\rClass Number holds the most general methods for dealing with numbers. Subclasses Float, Fraction, and Integer, and their subclasses, provide concrete representations of a numeric quantity.\r\rAll of Number's subclasses participate in a simple type coercion mechanism that supports mixed-mode arithmetic and comparisons.  It works as follows:  If\r\tself<typeA> op: arg<typeB>\rfails because of incompatible types, then it is retried in the following guise:\r\t(arg adaptTypeA: self) op: arg adaptToTypeA.\rThis gives the arg of typeB an opportunity to resolve the incompatibility, knowing exactly what two types are involved.  If self is more general, then arg will be converted, and viceVersa.  This mechanism is extensible to any new number classes that one might wish to add to Squeak.  The only requirement is that every subclass of Number must support a pair of conversion methods specific to each of the other subclasses of Number.!\r\r\r!Number methodsFor: 'arithmetic'!\r* aNumber \r\t\"Answer the result of multiplying the receiver by aNumber.\"\r\r\tself subclassResponsibility! !\r\r!Number methodsFor: 'arithmetic'!\r+ aNumber \r\t\"Answer the sum of the receiver and aNumber.\"\r\r\tself subclassResponsibility! !\r\r!Number methodsFor: 'arithmetic'!\r- aNumber \r\t\"Answer the difference between the receiver and aNumber.\"\r\r\tself subclassResponsibility! !\r\r!Number methodsFor: 'arithmetic'!\r/ aNumber \r\t\"Answer the result of dividing the receiver by aNumber.\"\r\r\tself subclassResponsibility! !\r\r!Number methodsFor: 'arithmetic'!\r// aNumber \r\t\"Integer quotient defined by division with truncation toward negative \r\tinfinity. 9//4 = 2, -9//4 = -3. -0.9//0.4 = -3. \\\\ answers the remainder \r\tfrom this division.\"\r\r\t^(self / aNumber) floor! !\r\r!Number methodsFor: 'arithmetic'!\r\\\\ aNumber \r\t\"modulo. Remainder defined in terms of //. Answer a Number with the \r\tsame sign as aNumber. e.g. 9\\\\4 = 1, -9\\\\4 = 3, 9\\\\-4 = -3, 0.9\\\\0.4 = 0.1.\"\r\r\t^self - (self // aNumber * aNumber)! !\r\r!Number methodsFor: 'arithmetic'!\rabs\r\t\"Answer a Number that is the absolute value (positive magnitude) of the \r\treceiver.\"\r\r\tself < 0\r\t\tifTrue: [^self negated]\r\t\tifFalse: [^self]! !\r\r!Number methodsFor: 'arithmetic'!\rnegated\r\t\"Answer a Number that is the negation of the receiver.\"\r\r\t^0 - self! !\r\r!Number methodsFor: 'arithmetic'!\rquo: aNumber \r\t\"Integer quotient defined by division with truncation toward zero. -9 quo: \r\t4 = -2, -0.9 quo: 0.4 = -2. rem: answers the remainder from this division.\"\r\r\t^(self / aNumber) truncated! !\r\r!Number methodsFor: 'arithmetic' stamp: 'RAH 4/25/2000 19:49'!\rreciprocal\r\t\"Answer 1 divided by the receiver. Create an error notification if the \r\treceiver is 0.\"\r\t#Numeric.\r\t\"Changed 200/01/19 For ANSI <number> support.\"\r\tself = 0 ifTrue: [^ (ZeroDivide dividend: self) signal\"<- Chg\"].\r\t^ 1 / self! !\r\r!Number methodsFor: 'arithmetic'!\rrem: aNumber \r\t\"Remainder defined in terms of quo:. Answer a Number with the same \r\tsign as self. e.g. 9 rem: 4 = 1, -9 rem: 4 = -1. 0.9 rem: 0.4 = 0.1.\"\r\r\t^self - ((self quo: aNumber) * aNumber)! !\r\r\r!Number methodsFor: 'mathematical functions'!\rarcCos \r\t\"The receiver is the cosine of an angle. Answer the angle measured in \r\tradians.\"\r\r\t^self asFloat arcCos! !\r\r!Number methodsFor: 'mathematical functions'!\rarcSin\r\t\"The receiver is the sine of an angle. Answer the angle measured in \r\tradians.\"\r\r\t^self asFloat arcSin! !\r\r!Number methodsFor: 'mathematical functions'!\rarcTan\r\t\"The receiver is the tangent of an angle. Answer the angle measured in \r\tradians.\"\r\r\t^self asFloat arcTan! !\r\r!Number methodsFor: 'mathematical functions' stamp: 'jsp 2/24/1999 15:20'!\rarcTan: denominator\r\t\"The receiver is the tangent of an angle. Answer the angle measured in \r\tradians.\"\r\r\t^(self asFloat) arcTan: denominator.! !\r\r!Number methodsFor: 'mathematical functions'!\rcos\r\t\"The receiver represents an angle measured in radians. Answer its cosine.\"\r\r\t^self asFloat cos! !\r\r!Number methodsFor: 'mathematical functions' stamp: 'sd 3/5/2004 10:04'!\rdegreeCos\r\t\"Answer the cosine of the receiver taken as an angle in degrees.\"\r\t\r\t^ (90 + self) degreeSin! !\r\r!Number methodsFor: 'mathematical functions' stamp: 'sd 3/5/2004 10:04'!\rdegreeSin\r\t\"Answer the sine of the receiver taken as an angle in degrees.\"\r\t\r\t^ self asFloat degreesToRadians sin! !\r\r!Number methodsFor: 'mathematical functions'!\rexp\r\t\"Answer the exponential of the receiver as a floating point number.\"\r\r\t^self asFloat exp! !\r\r!Number methodsFor: 'mathematical functions' stamp: 'jm 3/27/98 06:16'!\rfloorLog: radix\r\t\"Answer the floor of the log base radix of the receiver.\"\r\r\t^ self asFloat floorLog: radix\r! !\r\r!Number methodsFor: 'mathematical functions' stamp: 'ar 8/31/2000 20:05'!\rinterpolateTo: aNumber at: param\r\t^self + (aNumber - self * param)! !\r\r!Number methodsFor: 'mathematical functions'!\rln\r\t\"Answer the natural log of the receiver.\"\r\r\t^self asFloat ln! !\r\r!Number methodsFor: 'mathematical functions' stamp: 'di 9/8/1998 17:10'!\rlog\r\t\"Answer the base-10 log of the receiver.\"\r\r\t^self asFloat log! !\r\r!Number methodsFor: 'mathematical functions'!\rlog: aNumber \r\t\"Answer the log base aNumber of the receiver.\"\r\r\t^self ln / aNumber ln! !\r\r!Number methodsFor: 'mathematical functions' stamp: 'RJ 3/15/1999 19:35'!\rraisedTo: aNumber \r\t\"Answer the receiver raised to aNumber.\"\r\r\taNumber isInteger ifTrue:\r\t\t[\"Do the special case of integer power\"\r\t\t^ self raisedToInteger: aNumber].\r\tself < 0 ifTrue:\r\t\t[ self error: self printString, ' raised to a non-integer power' ].\r\taNumber = 0 ifTrue: [^ 1].\t\t\"Special case of exponent=0\"\r\t(self = 0) | (aNumber = 1) ifTrue:\r\t\t[^ self].\t\t\t\t\t\t\"Special case of exponent=1\"\r\t^ (aNumber * self ln) exp\t\t\"Otherwise use logarithms\"! !\r\r!Number methodsFor: 'mathematical functions' stamp: 'RAH 4/25/2000 19:49'!\rraisedToInteger: operand \r\t\"Answer the receiver raised to the power operand, an Integer.\"\r\t| count result |\r\t#Numeric.\r\t\"Changed 200/01/19 For ANSI <number> support.\"\r\toperand isInteger ifFalse: [^ ArithmeticError signal: 'parameter is not an Integer'\"<- Chg\"].\r\toperand = 0 ifTrue: [^ self class one].\r\toperand = 1 ifTrue: [^ self].\r\toperand < 0 ifTrue: [^ (self raisedToInteger: operand negated) reciprocal].\r\tcount := 1.\r\t[(count := count + count) < operand] whileTrue.\r\tresult := self class one.\r\t[count > 0]\r\t\twhileTrue: \r\t\t\t[result := result * result.\r\t\t\t(operand bitAnd: count)\r\t\t\t\t= 0 ifFalse: [result := result * self].\r\t\t\tcount := count bitShift: -1].\r\t^ result! !\r\r!Number methodsFor: 'mathematical functions'!\rsin\r\t\"The receiver represents an angle measured in radians. Answer its sine.\"\r\r\t^self asFloat sin! !\r\r!Number methodsFor: 'mathematical functions'!\rsqrt\r\t\"Answer the square root of the receiver.\"\r\r\t^self asFloat sqrt! !\r\r!Number methodsFor: 'mathematical functions'!\rsquared\r\t\"Answer the receiver multipled by itself.\"\r\r\t^self * self! !\r\r!Number methodsFor: 'mathematical functions'!\rtan\r\t\"The receiver represents an angle measured in radians. Answer its \r\ttangent.\"\r\r\t^self asFloat tan! !\r\r\r!Number methodsFor: 'truncation and round off'!\rceiling\r\t\"Answer the integer nearest the receiver toward positive infinity.\"\r\r\tself <= 0.0\r\t\tifTrue: [^self truncated]\r\t\tifFalse: [^self negated floor negated]! !\r\r!Number methodsFor: 'truncation and round off' stamp: 'di 2/19/98 21:58'!\rdetentBy: detent atMultiplesOf: grid snap: snap\r\t\"Map all values that are within detent/2 of any multiple of grid to that multiple.  Otherwise, if snap is true, return self, meaning that the values in the dead zone will never be returned.  If snap is false, then expand the range between dead zones so that it covers the range between multiples of the grid, and scale the value by that factor.\"\r\t| r1 r2 |\r\tr1 _ self roundTo: grid.  \"Nearest multiple of grid\"\r\t(self roundTo: detent) = r1 ifTrue: [^ r1].  \"Snap to that multiple...\"\r\tsnap ifTrue: [^ self].  \"...or return self\"\r\r\tr2 _ self < r1  \"Nearest end of dead zone\"\r\t\tifTrue: [r1 - (detent asFloat/2)]\r\t\tifFalse: [r1 + (detent asFloat/2)].\r\t\"Scale values between dead zones to fill range between multiples\"\r\t^ r1 + ((self - r2) * grid asFloat / (grid - detent))\r\"\r\t(170 to: 190 by: 2) collect: [:a | a detentBy: 10 atMultiplesOf: 90 snap: true] \t(170 to: 190 by: 2) collect: [:a | a detentBy: 10 atMultiplesOf: 90 snap: false]\r\t(3.9 to: 4.1 by: 0.02) collect: [:a | a detentBy: 0.1 atMultiplesOf: 1.0 snap: true] \t(-3.9 to: -4.1 by: -0.02) collect: [:a | a detentBy: 0.1 atMultiplesOf: 1.0 snap: false]\r\"! !\r\r!Number methodsFor: 'truncation and round off'!\rfloor\r\t\"Answer the integer nearest the receiver toward negative infinity.\"\r\r\t| truncation |\r\ttruncation _ self truncated.\r\tself >= 0 ifTrue: [^truncation].\r\tself = truncation\r\t\tifTrue: [^truncation]\r\t\tifFalse: [^truncation - 1]! !\r\r!Number methodsFor: 'truncation and round off' stamp: 'RAH 4/25/2000 19:49'!\rfractionPart\r\t\"Answer the fractional part of the receiver.\"\r\t#Numeric.\r\t\"2000/03/04  Harmon R. Added ANSI <number> protocol\"\r\t^ self - self truncated! !\r\r!Number methodsFor: 'truncation and round off' stamp: 'RAH 4/25/2000 19:49'!\rintegerPart\r\t\"Answer the integer part of the receiver.\"\r\t#Numeric.\r\t\"2000/03/04  Harmon R. Added ANSI <number> protocol\"\r\t^ self truncated! !\r\r!Number methodsFor: 'truncation and round off'!\rreduce\r    \"If self is close to an integer, return that integer\"\r    ^ self! !\r\r!Number methodsFor: 'truncation and round off' stamp: 'di 10/4/1999 08:08'!\rroundTo: quantum \r\t\"Answer the nearest number that is a multiple of quantum.\"\r\r\t^(self / quantum) rounded * quantum! !\r\r!Number methodsFor: 'truncation and round off'!\rroundUpTo: aNumber \r\t\"Answer the next multiple of aNumber toward infinity that is nearest the \r\treceiver.\"\r\r\t^(self/aNumber) ceiling * aNumber! !\r\r!Number methodsFor: 'truncation and round off'!\rrounded\r\t\"Answer the integer nearest the receiver.\"\r\r\t^(self + (self sign / 2)) truncated! !\r\r!Number methodsFor: 'truncation and round off'!\rtruncateTo: aNumber \r\t\"Answer the next multiple of aNumber toward zero that is nearest the \r\treceiver.\"\r\r\t^(self quo: aNumber)\r\t\t* aNumber! !\r\r!Number methodsFor: 'truncation and round off'!\rtruncated\r\t\"Answer an integer nearest the receiver toward zero.\"\r\r\t^self quo: 1! !\r\r\r!Number methodsFor: 'testing' stamp: 'sw 9/27/2001 17:26'!\rbasicType\r\t\"Answer a symbol representing the inherent type of the receiver\"\r\r\t^ #Number! !\r\r!Number methodsFor: 'testing'!\reven\r\t\"Answer whether the receiver is an even number.\"\r\r\t^self \\\\ 2 = 0! !\r\r!Number methodsFor: 'testing' stamp: 'sw 12/30/1998 13:21'!\risDivisibleBy: aNumber\r\taNumber = 0 ifTrue: [^ false].\r\taNumber isInteger ifFalse: [^ false].\r\t^ (self \\\\ aNumber) = 0! !\r\r!Number methodsFor: 'testing' stamp: 'tao 10/10/97 16:36'!\risInf\r\t^ false! !\r\r!Number methodsFor: 'testing' stamp: 'tao 4/19/98 23:33'!\risInfinite\r\r\t^ false! !\r\r!Number methodsFor: 'testing' stamp: 'tao 10/10/97 16:36'!\risNaN\r\t^ false! !\r\r!Number methodsFor: 'testing'!\risNumber\r\t^ true! !\r\r!Number methodsFor: 'testing'!\risZero\r\t^self = 0! !\r\r!Number methodsFor: 'testing' stamp: 'di 4/23/1998 11:18'!\rnegative\r\t\"Answer whether the receiver is mathematically negative.\"\r\r\t^ self < 0! !\r\r!Number methodsFor: 'testing'!\rodd\r\t\"Answer whether the receiver is an odd number.\"\r\r\t^self even == false! !\r\r!Number methodsFor: 'testing' stamp: 'di 4/23/1998 11:17'!\rpositive\r\t\"Answer whether the receiver is positive or equal to 0. (ST-80 protocol).\r\tSee also strictlyPositive\"\r\r\t^ self >= 0! !\r\r!Number methodsFor: 'testing'!\rsign\r\t\"Answer 1 if the receiver is greater than 0, -1 if less than 0, else 0.\"\r\r\tself > 0 ifTrue: [^1].\r\tself < 0 ifTrue: [^-1].\r\t^0! !\r\r!Number methodsFor: 'testing' stamp: 'di 4/23/1998 11:02'!\rstrictlyPositive\r\t\"Answer whether the receiver is mathematically positive.\"\r\r\t^ self > 0! !\r\r\r!Number methodsFor: 'converting'!\r@ y \r\t\"Primitive. Answer a Point whose x value is the receiver and whose y \r\tvalue is the argument. Optional. No Lookup. See Object documentation \r\twhatIsAPrimitive.\"\r\r\t<primitive: 18>\r\t^Point x: self y: y! !\r\r!Number methodsFor: 'converting' stamp: 'di 11/6/1998 13:43'!\radaptToCollection: rcvr andSend: selector\r\t\"If I am involved in arithmetic with a Collection, return a Collection of\r\tthe results of each element combined with me in that expression.\"\r\r\t^ rcvr collect: [:element | element perform: selector with: self]! !\r\r!Number methodsFor: 'converting' stamp: 'di 11/6/1998 13:21'!\radaptToFloat: rcvr andSend: selector \r\t\"If I am involved in arithmetic with a Float, convert me to a Float.\"\r\t^ rcvr perform: selector with: self asFloat! !\r\r!Number methodsFor: 'converting' stamp: 'di 11/6/1998 13:44'!\radaptToFraction: rcvr andSend: selector\r\t\"If I am involved in arithmetic with a Fraction, convert us and evaluate exprBlock.\"\r\t^ self subclassResponsibility! !\r\r!Number methodsFor: 'converting' stamp: 'di 11/6/1998 13:44'!\radaptToInteger: rcvr andSend: selector\r\t\"If I am involved in arithmetic with a Integer, convert us and evaluate exprBlock.\"\r\t^ self subclassResponsibility! !\r\r!Number methodsFor: 'converting' stamp: 'di 11/6/1998 13:44'!\radaptToPoint: rcvr andSend: selector\r\t\"If I am involved in arithmetic with a Point, convert me to a Point.\"\r\t^ rcvr perform: selector with: self@self! !\r\r!Number methodsFor: 'converting' stamp: 'RAH 4/25/2000 19:49'!\radaptToScaledDecimal: receiverScaledDecimal andSend: arithmeticOpSelector \r\t\"Do any required conversion and then the arithmetic. \r\treceiverScaledDecimal arithmeticOpSelector self.\"\r\t#Numeric.\r\t\"add 200/01/19 For ScaledDecimal support.\"\r\t^ self subclassResponsibility! !\r\r!Number methodsFor: 'converting' stamp: 'di 11/6/1998 13:45'!\radaptToString: rcvr andSend: selector\r\t\"If I am involved in arithmetic with a String, convert it to a Number.\"\r\t^ rcvr asNumber perform: selector with: self! !\r\r!Number methodsFor: 'converting' stamp: 'brp 5/13/2003 10:13'!\rasDuration\r\n\r\n\t^ Duration nanoSeconds: self asInteger\r\n! !\r\r!Number methodsFor: 'converting'!\rasInteger\r\t\"Answer an Integer nearest the receiver toward zero.\"\r\r\t^self truncated! !\r\r!Number methodsFor: 'converting' stamp: 'sw 2/16/1999 18:15'!\rasNumber\r\t^ self! !\r\r!Number methodsFor: 'converting'!\rasPoint\r\t\"Answer a Point with the receiver as both coordinates; often used to \r\tsupply the same value in two dimensions, as with symmetrical gridding \r\tor scaling.\"\r\r\t^self @ self! !\r\r!Number methodsFor: 'converting' stamp: 'RAH 4/25/2000 19:49'!\rasScaledDecimal: scale \r\t\"Answer a scaled decimal number, with a fractional precision of scale, \r\tapproximating the receiver.\"\r\t#Numeric.\r\t\"add 200/01/19 For number protocol.\"\r\t^ ScaledDecimal newFromNumber: self scale: scale! !\r\r!Number methodsFor: 'converting' stamp: 'sw 9/8/97 16:30'!\rasSmallAngleDegrees\r\t\"Return the receiver normalized to lie within the range (-180, 180)\"\r\r\t| pos |\r\tpos _ self \\\\ 360.\r\tpos > 180 ifTrue: [pos _ pos - 360].\r\t^ pos\r\r\"#(-500 -300 -150 -5 0 5 150 300 500 1200) collect: [:n | n asSmallAngleDegrees]\"! !\r\r!Number methodsFor: 'converting' stamp: 'brp 1/9/2004 06:12'!\rday\r\n\r\n\t^ self sign days! !\r\r!Number methodsFor: 'converting' stamp: 'brp 5/16/2003 07:56'!\rdays\r\n\r\n\t^ Duration days: self! !\r\r!Number methodsFor: 'converting'!\rdegreesToRadians\r\t\"The receiver is assumed to represent degrees. Answer the conversion to \r\tradians.\"\r\r\t^self asFloat degreesToRadians! !\r\r!Number methodsFor: 'converting' stamp: 'brp 1/9/2004 06:28'!\rhour\r\n\r\n\t^ self sign hours\r\n! !\r\r!Number methodsFor: 'converting' stamp: 'brp 5/16/2003 07:56'!\rhours\r\n\r\n\t^ Duration hours: self! !\r\r!Number methodsFor: 'converting' stamp: 'brp 1/9/2004 06:16'!\rminute\r\n\r\n\t^ self sign minutes\r\n! !\r\r!Number methodsFor: 'converting' stamp: 'brp 5/16/2003 07:56'!\rminutes\r\n\r\n\t^ Duration minutes: self! !\r\r!Number methodsFor: 'converting' stamp: 'brp 1/9/2004 06:27'!\rnanoSecond\r\n\r\n\t^ self sign nanoSeconds\r\n! !\r\r!Number methodsFor: 'converting' stamp: 'brp 5/16/2003 08:52'!\rnanoSeconds\r\n\r\n\t^ Duration nanoSeconds: self.! !\r\r!Number methodsFor: 'converting'!\rradiansToDegrees\r\t\"The receiver is assumed to represent radians. Answer the conversion to \r\tdegrees.\"\r\r\t^self asFloat radiansToDegrees! !\r\r!Number methodsFor: 'converting' stamp: 'brp 1/9/2004 06:17'!\rsecond\r\n\r\n\t^ self sign seconds\r\n! !\r\r!Number methodsFor: 'converting' stamp: 'brp 5/16/2003 07:57'!\rseconds\r\n\r\n\t^ Duration seconds: self! !\r\r!Number methodsFor: 'converting' stamp: 'brp 5/21/2003 08:20'!\rsign: aNumber\r\n\t\"Return a Number with the same sign as aNumber\"\r\n\r\n\t^ aNumber positive ifTrue: [self abs] ifFalse: [self abs negated].! !\r\r\r!Number methodsFor: 'intervals'!\rto: stop\r\t\"Answer an Interval from the receiver up to the argument, stop, \r\tincrementing by 1.\"\r\r\t^Interval from: self to: stop by: 1! !\r\r!Number methodsFor: 'intervals'!\rto: stop by: step\r\t\"Answer an Interval from the receiver up to the argument, stop, \r\tincrementing by step.\"\r\r\t^Interval from: self to: stop by: step! !\r\r!Number methodsFor: 'intervals' stamp: 'tao 1/30/1999 08:58'!\rto: stop by: step do: aBlock \r\t\"Normally compiled in-line, and therefore not overridable.\r\tEvaluate aBlock for each element of the interval (self to: stop by: \rstep).\"\r\t| nextValue |\r\tnextValue _ self.\r\tstep = 0 ifTrue: [self error: 'step must be non-zero'].\r\tstep < 0\r\t\tifTrue: [[stop <= nextValue]\r\t\t\t\twhileTrue: \r\t\t\t\t\t[aBlock value: nextValue.\r\t\t\t\t\tnextValue _ nextValue + step]]\r\t\tifFalse: [[stop >= nextValue]\r\t\t\t\twhileTrue: \r\t\t\t\t\t[aBlock value: nextValue.\r\t\t\t\t\tnextValue _ nextValue + step]]! !\r\r!Number methodsFor: 'intervals'!\rto: stop do: aBlock \r\t\"Normally compiled in-line, and therefore not overridable.\r\tEvaluate aBlock for each element of the interval (self to: stop by: 1).\"\r\t| nextValue |\r\tnextValue _ self.\r\t[nextValue <= stop]\r\t\twhileTrue: \r\t\t\t[aBlock value: nextValue.\r\t\t\tnextValue _ nextValue + 1]! !\r\r\r!Number methodsFor: 'printing'!\rdefaultLabelForInspector\r\t\"Answer the default label to be used for an Inspector window on the receiver.\"\r\r\t^ super defaultLabelForInspector, ': ', self printString! !\r\r!Number methodsFor: 'printing' stamp: 'sw 6/29/1999 21:10'!\risOrAreStringWith: aNoun\r\t| result |\r\tresult _ self = 1\r\t\tifTrue:\r\t\t\t[' is one ']\r\t\tifFalse:\r\t\t\t[self = 0\r\t\t\t\tifTrue:\r\t\t\t\t\t[' are no ']\r\t\t\t\tifFalse:\r\t\t\t\t\t[' are ', self printString, ' ']].\r\tresult _ result, aNoun.\r\tself = 1 ifFalse: [result _ result, 's'].\r\t^ result\r\r\"#(0 1 2 98.6) do:\r\t[:num | Transcript cr; show: 'There', (num isOrAreStringWith: 'way'), ' to skin a cat']\"! !\r\r!Number methodsFor: 'printing'!\rprintOn: aStream\r\t\"Default print radix is 10\"\r\tself printOn: aStream base: 10! !\r\r!Number methodsFor: 'printing'!\rprintStringBase: base\r\t^ String streamContents:\r\t\t[:strm | self printOn: strm base: base]! !\r\r!Number methodsFor: 'printing'!\rstoreOn: aStream \r\t\"Normal printing is OK for storing\"\r\tself printOn: aStream! !\r\r!Number methodsFor: 'printing'!\rstoreOn: aStream base: base\r\t\"Append my printed representation to aStream, incuding the base.\"\r\r\tself printOn: aStream base: base! !\r\r!Number methodsFor: 'printing'!\rstoreStringBase: base\r\t^ String streamContents: [:strm | self storeOn: strm base: base]! !\r\r!Number methodsFor: 'printing' stamp: 'sw 7/1/1998 12:33'!\rstringForReadout\r\t^ self rounded printString! !\r\r\r!Number methodsFor: 'comparing' stamp: 'tk 4/16/1999 18:26'!\rcloseTo: num\r\t\"are these two numbers close?\"\r\r\t| ans |\r\tnum isFloat ifTrue: [^ num closeTo: self asFloat].\r\t[ans _ self = num] ifError: [:aString :aReceiver | ^ false].\r\t^ ans! !\r\r\r!Number methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 00:07'!\rbyteEncode:aStream\r\t^aStream writeNumber:self.\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rNumber class\r\tinstanceVariableNames: ''!\r\r!Number class methodsFor: 'instance creation' stamp: 'bf 12/9/1998 19:21'!\rreadFrom: stringOrStream \r\t\"Answer a number as described on aStream.  The number may\r\tinclude a leading radix specification, as in 16rFADE\"\r\t| value base aStream sign |\r\taStream _ (stringOrStream isMemberOf: String)\r\t\tifTrue: [ReadStream on: stringOrStream]\r\t\tifFalse: [stringOrStream].\r\t(aStream nextMatchAll: 'NaN') ifTrue: [^ Float nan].\r\tsign _ (aStream peekFor: $-) ifTrue: [-1] ifFalse: [1].\r\t(aStream nextMatchAll: 'Infinity') ifTrue: [^ Float infinity * sign].\r\tbase _ 10.\r\tvalue _ Integer readFrom: aStream base: base.\r\t(aStream peekFor: $r)\r\t\tifTrue: \r\t\t\t[\"<base>r<integer>\"\r\t\t\t(base _ value) < 2 ifTrue: [^self error: 'Invalid radix'].\r\t\t\t(aStream peekFor: $-) ifTrue: [sign _ sign negated].\r\t\t\tvalue _ Integer readFrom: aStream base: base].\r\t^ self readRemainderOf: value from: aStream base: base withSign: sign.! !\r\r!Number class methodsFor: 'instance creation' stamp: 'tao 4/23/98 12:24'!\rreadFrom: stringOrStream base: base\r\t\"Answer a number as described on aStream in the given number base.\"\r\r\t| aStream sign |\r\taStream _ (stringOrStream isMemberOf: String)\r\t\tifTrue: [ReadStream on: stringOrStream]\r\t\tifFalse: [stringOrStream].\r\t(aStream nextMatchAll: 'NaN') ifTrue: [^ Float nan].\r\tsign _ (aStream peekFor: $-) ifTrue: [-1] ifFalse: [1].\r\t(aStream nextMatchAll: 'Infinity') ifTrue: [^ Float infinity * sign].\r\t^ self readRemainderOf: (Integer readFrom: aStream base: base)\r\t\t\tfrom: aStream base: base withSign: sign! !\r\r!Number class methodsFor: 'instance creation' stamp: 'RAH 4/25/2000 19:49'!\rreadRemainderOf: integerPart from: aStream base: base withSign: sign \r\t\"Read optional fractional part and exponent, and return the final result\"\r\t| value fraction fractionDigits fracpos peekChar scale |\r\t#Numeric.\r\t\"Changed 200/01/19 For ANSI Numeric Literals support.\"\r\tvalue := integerPart.\r\tfractionDigits := 0.\r\t(aStream peekFor: $.)\r\t\tifTrue: [\"<integer>.<fraction>\"\r\t\t\t(aStream atEnd not and: [aStream peek digitValue between: 0 and: base - 1])\r\t\t\t\tifTrue: \r\t\t\t\t\t[fracpos := aStream position.\r\t\t\t\t\tfraction := Integer readFrom: aStream base: base.\r\t\t\t\t\tfraction := fraction asFloat / (base raisedTo: aStream position - fracpos).\r\t\t\t\t\tfractionDigits := aStream position - fracpos.\r\t\t\t\t\tvalue := value asFloat + fraction]\r\t\t\t\tifFalse: \r\t\t\t\t\t[\"oops - just <integer>.\"\r\t\t\t\t\taStream skip: -1.\r\t\t\t\t\t\"un-gobble the period\"\r\t\t\t\t\t^ value * sign\"Number readFrom: '3r-22.2'\"]].\r\tpeekChar := aStream peek.\r\t\"<number>(e|d|q)<exponent>>\"\r\tpeekChar = $e | (peekChar = $d) | (peekChar = $q)\r\t\tifTrue: \r\t\t\t[aStream next.\r\t\t\tvalue := value * (base raisedTo: (Integer readFrom: aStream))]\r\t\tifFalse: [peekChar = $s\r\t\t\t\tifTrue: \r\t\t\t\t\t[\"<number>s[<scale>]\"\r\t\t\t\t\taStream next.\r\t\t\t\t\t(aStream atEnd not and: [\"<number>s<scale>\"\r\t\t\t\t\t\taStream peek digitValue between: 0 and: 10])\r\t\t\t\t\t\tifTrue: [scale := Integer readFrom: aStream].\r\t\t\t\t\tscale isNil\r\t\t\t\t\t\tifTrue: [\"<number>s\"\r\t\t\t\t\t\t\tfractionDigits = 0\r\t\t\t\t\t\t\t\tifTrue: [\"<integer>s\"\r\t\t\t\t\t\t\t\t\tscale := 0]\r\t\t\t\t\t\t\t\tifFalse: [\"<integer>.<fraction>s\"\r\t\t\t\t\t\t\t\t\tscale := fractionDigits]].\r\t\t\t\t\tvalue := ScaledDecimal newFromNumber: value scale: scale]].\r\t(value isFloat\r\t\tand: [value = 0.0 and: [sign = -1]])\r\t\tifTrue: [^ Float negativeZero]\r\t\tifFalse: [^ value * sign]! !\rProtoObject subclass: #Object\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'DependentsFields'\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Objects'!\r!Object commentStamp: '<historical>' prior: 0!\rObject is the root class for almost all of the other classes in the class hierarchy. The exceptions are ProtoObject (the superclass of Object) and its subclasses.\r\rClass Object provides default behavior common to all normal objects, such as access, copying, comparison, error handling, message sending, and reflection. Also utility messages that all objects should respond to are defined here.\r\rObject has no instance variables, nor should any be added. This is due to several classes of objects that inherit from Object that have special implementations (SmallInteger and UndefinedObject for example) or the VM knows about and depends on the structure and layout of certain standard classes.\r\rClass Variables:\r\tDependentsFields\t\tan IdentityDictionary\r\t\tProvides a virtual 'dependents' field so that any object may have one\r\t\tor more dependent views, synchronized by the changed:/update: protocol.\r\t\tNote that class Model has a real slot for its dependents, and overrides\r\t\tthe associated protocol with more efficient implementations.\r\tEventsFields\t\t\tan IdentityDictionary that maps each object to its dependents.\r\t\tRegisters a message send (consisting of a selector and a receiver object)\r\t\twhich should be performed when anEventSymbol is triggered by the receiver.\r\t\tPart of a new event notification framework which could eventually replace\r\t\tthe existing changed/update mechanism.  It is intended to be compatible\r\t\twith Dolphin Smalltalk and VSE as much as possible.\r\rBecause Object is the root of the inheritance tree, methods are often defined in Object to give all objects special behaviors needed by certain subsystems or applications, or to respond to certain general test messages such as isMorph.!\r\r\r\r!Object methodsFor: 'accessing' stamp: 'sw 4/30/1998 12:18'!\raddInstanceVarNamed: aName withValue: aValue\r\t\"Add an instance variable named aName and give it value aValue\"\r\tself class addInstVarName: aName asString.\r\tself instVarAt: self class instSize put: aValue! !\r\r!Object methodsFor: 'accessing' stamp: 'yo 6/29/2004 11:39'!\rat: index \r\t\"Primitive. Assumes receiver is indexable. Answer the value of an \r\tindexable element in the receiver. Fail if the argument index is not an \r\tInteger or is out of bounds. Essential. See Object documentation \r\twhatIsAPrimitive.\"\r\r\t<primitive: 60>\r\tindex isInteger ifTrue:\r\t\t[self class isVariable\r\t\t\tifTrue: [self errorSubscriptBounds: index]\r\t\t\tifFalse: [self errorNotIndexable]].\r\tindex isNumber\r\t\tifTrue: [^self at: index asInteger]\r\t\tifFalse: [self errorNonIntegerIndex]! !\r\r!Object methodsFor: 'accessing'!\rat: index modify: aBlock\r\t\"Replace the element of the collection with itself transformed by the block\"\r\t^ self at: index put: (aBlock value: (self at: index))! !\r\r!Object methodsFor: 'accessing' stamp: 'yo 6/29/2004 13:08'!\rat: index put: value \r\t\"Primitive. Assumes receiver is indexable. Store the argument value in \r\tthe indexable element of the receiver indicated by index. Fail if the \r\tindex is not an Integer or is out of bounds. Or fail if the value is not of \r\tthe right type for this kind of collection. Answer the value that was \r\tstored. Essential. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 61>\r\tindex isInteger ifTrue:\r\t\t[self class isVariable\r\t\t\tifTrue: [(index >= 1 and: [index <= self size])\r\t\t\t\t\tifTrue: [self errorImproperStore]\r\t\t\t\t\tifFalse: [self errorSubscriptBounds: index]]\r\t\t\tifFalse: [self errorNotIndexable]].\r\tindex isNumber\r\t\tifTrue: [^self at: index asInteger put: value]\r\t\tifFalse: [self errorNonIntegerIndex]! !\r\r!Object methodsFor: 'accessing'!\rbasicAt: index \r\t\"Primitive. Assumes receiver is indexable. Answer the value of an \r\tindexable element in the receiver. Fail if the argument index is not an \r\tInteger or is out of bounds. Essential. Do not override in a subclass. See \r\tObject documentation whatIsAPrimitive.\"\r\r\t<primitive: 60>\r\tindex isInteger ifTrue: [self errorSubscriptBounds: index].\r\tindex isNumber\r\t\tifTrue: [^self basicAt: index asInteger]\r\t\tifFalse: [self errorNonIntegerIndex]! !\r\r!Object methodsFor: 'accessing'!\rbasicAt: index put: value \r\t\"Primitive. Assumes receiver is indexable. Store the second argument \r\tvalue in the indexable element of the receiver indicated by index. Fail \r\tif the index is not an Integer or is out of bounds. Or fail if the value is \r\tnot of the right type for this kind of collection. Answer the value that \r\twas stored. Essential. Do not override in a subclass. See Object \r\tdocumentation whatIsAPrimitive.\"\r\r\t<primitive: 61>\r\tindex isInteger\r\t\tifTrue: [(index >= 1 and: [index <= self size])\r\t\t\t\t\tifTrue: [self errorImproperStore]\r\t\t\t\t\tifFalse: [self errorSubscriptBounds: index]].\r\tindex isNumber\r\t\tifTrue: [^self basicAt: index asInteger put: value]\r\t\tifFalse: [self errorNonIntegerIndex]! !\r\r!Object methodsFor: 'accessing'!\rbasicSize\r\t\"Primitive. Answer the number of indexable variables in the receiver. \r\tThis value is the same as the largest legal subscript. Essential. Do not \r\toverride in any subclass. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 62>\r\t\"The number of indexable fields of fixed-length objects is 0\"\r\t^0\t! !\r\r!Object methodsFor: 'accessing'!\rbindWithTemp: aBlock\r\t^ aBlock value: self value: nil! !\r\r!Object methodsFor: 'accessing' stamp: 'md 12/12/2003 16:25'!\rdoIfNotNil: aBlock\r\tself deprecated: 'use ifNotNilDo:'.\r\t^ self ifNotNilDo: aBlock\r! !\r\r!Object methodsFor: 'accessing' stamp: 'di 11/8/2000 21:04'!\rifNotNilDo: aBlock\r\t\"Evaluate the given block with the receiver as its argument.\"\r\r\t^ aBlock value: self\r! !\r\r!Object methodsFor: 'accessing' stamp: 'ajh 1/21/2003 12:59'!\rin: aBlock\r\t\"Evaluate the given block with the receiver as its argument.\"\r\r\t^ aBlock value: self\r! !\r\r!Object methodsFor: 'accessing' stamp: 'sw 10/17/2000 11:15'!\rpresenter\r\t\"Answer the presenter object associated with the receiver.  For morphs, there is in effect a clear containment hierarchy of presenters (accessed via their association with PasteUpMorphs); for arbitrary objects the hook is simply via the current world, at least at present.\"\r\r\t^ self currentWorld presenter! !\r\r!Object methodsFor: 'accessing'!\rreadFromString: aString\r\t\"Create an object based on the contents of aString.\"\r\r\t^self readFrom: (ReadStream on: aString)! !\r\r!Object methodsFor: 'accessing' stamp: 'di 3/29/1999 13:10'!\rsize\r\t\"Primitive. Answer the number of indexable variables in the receiver. \r\tThis value is the same as the largest legal subscript. Essential. See Object \r\tdocumentation whatIsAPrimitive.\"\r\r\t<primitive: 62>\r\tself class isVariable ifFalse: [self errorNotIndexable].\r\t^ 0! !\r\r!Object methodsFor: 'accessing'!\ryourself\r\t\"Answer self.\"! !\r\r\r!Object methodsFor: 'associating'!\r-> anObject\r\t\"Answer an Association between self and anObject\"\r\r\t^Association new key: self value: anObject! !\r\r\r!Object methodsFor: 'binding'!\rbindingOf: aString\r\t^nil! !\r\r\r!Object methodsFor: 'casing'!\rcaseOf: aBlockAssociationCollection\r\t\"The elements of aBlockAssociationCollection are associations between blocks.\r\t Answer the evaluated value of the first association in aBlockAssociationCollection\r\t whose evaluated key equals the receiver.  If no match is found, report an error.\"\r\r\t^ self caseOf: aBlockAssociationCollection otherwise: [self caseError]\r\r\"| z | z _ {[#a]->[1+1]. ['b' asSymbol]->[2+2]. [#c]->[3+3]}. #b caseOf: z\"\r\"| z | z _ {[#a]->[1+1]. ['d' asSymbol]->[2+2]. [#c]->[3+3]}. #b caseOf: z\"\r\"The following are compiled in-line:\"\r\"#b caseOf: {[#a]->[1+1]. ['b' asSymbol]->[2+2]. [#c]->[3+3]}\"\r\"#b caseOf: {[#a]->[1+1]. ['d' asSymbol]->[2+2]. [#c]->[3+3]}\"! !\r\r!Object methodsFor: 'casing'!\rcaseOf: aBlockAssociationCollection otherwise: aBlock\r\t\"The elements of aBlockAssociationCollection are associations between blocks.\r\t Answer the evaluated value of the first association in aBlockAssociationCollection\r\t whose evaluated key equals the receiver.  If no match is found, answer the result\r\t of evaluating aBlock.\"\r\r\taBlockAssociationCollection associationsDo:\r\t\t[:assoc | (assoc key value = self) ifTrue: [^assoc value value]].\r\t^ aBlock value\r\r\"| z | z _ {[#a]->[1+1]. ['b' asSymbol]->[2+2]. [#c]->[3+3]}. #b caseOf: z otherwise: [0]\"\r\"| z | z _ {[#a]->[1+1]. ['d' asSymbol]->[2+2]. [#c]->[3+3]}. #b caseOf: z otherwise: [0]\"\r\"The following are compiled in-line:\"\r\"#b caseOf: {[#a]->[1+1]. ['b' asSymbol]->[2+2]. [#c]->[3+3]} otherwise: [0]\"\r\"#b caseOf: {[#a]->[1+1]. ['d' asSymbol]->[2+2]. [#c]->[3+3]} otherwise: [0]\"! !\r\r\r!Object methodsFor: 'class membership'!\rclass\r\t\"Primitive. Answer the object which is the receiver's class. Essential. See \r\tObject documentation whatIsAPrimitive.\"\r\r\t<primitive: 111>\r\tself primitiveFailed! !\r\r!Object methodsFor: 'class membership' stamp: 'sw 9/27/2001 15:51'!\rinheritsFromAnyIn: aList\r\t\"Answer whether the receiver inherits from any class represented by any element in the list.  The elements of the list can be classes, class name symbols, or strings representing possible class names.  This allows speculative membership tests to be made even when some of the classes may not be known to the current image, and even when their names are not interned symbols.\"\r\r\t| aClass |\r\taList do:\r\t\t[:elem | Symbol hasInterned: elem asString ifTrue: \r\t\t\t[:elemSymbol | (((aClass _ Smalltalk at: elemSymbol ifAbsent: [nil]) isKindOf: Class)\r\t\t\t\t\t\tand: [self isKindOf: aClass])\r\t\t\t\tifTrue:\r\t\t\t\t\t[^ true]]].\r\t^ false\r\r\r\"\r{3.  true. 'olive'} do:\r\t[:token |\r\t\t {{#Number. #Boolean}. {Number.  Boolean }.  {'Number'. 'Boolean'}} do:\r\t\t\t[:list |\r\t\t\t\tTranscript cr; show: token asString, ' list element provided as a ', list first class name, ' - ', (token inheritsFromAnyIn: list) asString]]\r\"! !\r\r!Object methodsFor: 'class membership'!\risKindOf: aClass \r\t\"Answer whether the class, aClass, is a superclass or class of the receiver.\"\r\r\tself class == aClass\r\t\tifTrue: [^true]\r\t\tifFalse: [^self class inheritsFrom: aClass]! !\r\r!Object methodsFor: 'class membership' stamp: 'sw 2/16/98 02:08'!\risKindOf: aClass orOf: anotherClass\r\t\"Answer whether either of the classes, aClass or anotherClass,, is a superclass or class of the receiver.  A convenience; could be somewhat optimized\"\r\t^ (self isKindOf: aClass) or: [self isKindOf: anotherClass]! !\r\r!Object methodsFor: 'class membership'!\risMemberOf: aClass \r\t\"Answer whether the receiver is an instance of the class, aClass.\"\r\r\t^self class == aClass! !\r\r!Object methodsFor: 'class membership'!\rrespondsTo: aSymbol \r\t\"Answer whether the method dictionary of the receiver's class contains \r\taSymbol as a message selector.\"\r\r\t^self class canUnderstand: aSymbol! !\r\r!Object methodsFor: 'class membership' stamp: 'tk 10/21/1998 12:38'!\rxxxClass\r\t\"For subclasses of nil, such as ObjectOut\"\r\t^ self class! !\r\r\r!Object methodsFor: 'comparing'!\r= anObject \r\t\"Answer whether the receiver and the argument represent the same \r\tobject. If = is redefined in any subclass, consider also redefining the \r\tmessage hash.\"\r\r\t^self == anObject! !\r\r!Object methodsFor: 'comparing' stamp: 'tk 4/16/1999 18:26'!\rcloseTo: anObject\r\t\"Answer whether the receiver and the argument represent the same\r\tobject. If = is redefined in any subclass, consider also redefining the\r\tmessage hash.\"\r\r\t| ans |\r\t[ans _ self = anObject] ifError: [:aString :aReceiver | ^ false].\r\t^ ans! !\r\r!Object methodsFor: 'comparing'!\rhash\r\t\"Answer a SmallInteger whose value is related to the receiver's identity.\r\tMay be overridden, and should be overridden in any classes that define = \"\r\r\t^ self identityHash! !\r\r!Object methodsFor: 'comparing' stamp: 'pm 9/23/97 09:36'!\rhashMappedBy: map\r\t\"Answer what my hash would be if oops changed according to map.\"\r\r\t^map newHashFor: self! !\r\r!Object methodsFor: 'comparing' stamp: 'di 9/27/97 20:23'!\ridentityHashMappedBy: map\r\t\"Answer what my hash would be if oops changed according to map.\"\r\r\t^map newHashFor: self! !\r\r!Object methodsFor: 'comparing' stamp: 'sw 8/20/1998 12:34'!\ridentityHashPrintString\r\t\"'fred' identityHashPrintString\"\r\r\t^ '(', self identityHash printString, ')'! !\r\r!Object methodsFor: 'comparing' stamp: 'ajh 2/2/2002 15:02'!\rliteralEqual: other\r\r\t^ self class == other class and: [self = other]! !\r\r!Object methodsFor: 'comparing'!\r~= anObject \r\t\"Answer whether the receiver and the argument do not represent the \r\tsame object.\"\r\r\t^self = anObject == false! !\r\r\r!Object methodsFor: 'converting' stamp: 'di 11/9/1998 12:15'!\radaptToFloat: rcvr andSend: selector\r\t\"If no method has been provided for adapting an object to a Float,\r\tthen it may be adequate to simply adapt it to a number.\"\r\t^ self adaptToNumber: rcvr andSend: selector! !\r\r!Object methodsFor: 'converting' stamp: 'di 11/9/1998 12:14'!\radaptToFraction: rcvr andSend: selector\r\t\"If no method has been provided for adapting an object to a Fraction,\r\tthen it may be adequate to simply adapt it to a number.\"\r\t^ self adaptToNumber: rcvr andSend: selector! !\r\r!Object methodsFor: 'converting' stamp: 'di 11/9/1998 12:15'!\radaptToInteger: rcvr andSend: selector\r\t\"If no method has been provided for adapting an object to a Integer,\r\tthen it may be adequate to simply adapt it to a number.\"\r\t^ self adaptToNumber: rcvr andSend: selector! !\r\r!Object methodsFor: 'converting'!\ras: aSimilarClass\r\t\"Create an object of class aSimilarClass that has similar contents to the receiver.\"\r\r\t^ aSimilarClass newFrom: self! !\r\r!Object methodsFor: 'converting' stamp: 'rw 4/27/2002 07:48'!\rasActionSequence\r\r\t^WeakActionSequence with: self! !\r\r!Object methodsFor: 'converting' stamp: 'rw 7/20/2003 16:03'!\rasActionSequenceTrappingErrors\r\r\t^WeakActionSequenceTrappingErrors with: self! !\r\r!Object methodsFor: 'converting' stamp: 'sma 5/12/2000 17:39'!\rasOrderedCollection\r\t\"Answer an OrderedCollection with the receiver as its only element.\"\r\r\t^ OrderedCollection with: self! !\r\r!Object methodsFor: 'converting'!\rasString\r\t\"Answer a string that represents the receiver.\"\r\r\t^ self printString ! !\r\r!Object methodsFor: 'converting' stamp: 'ajh 3/11/2003 10:27'!\rasStringOrText\r\t\"Answer a string that represents the receiver.\"\r\r\t^ self printString ! !\r\r!Object methodsFor: 'converting' stamp: 'RAA 8/2/1999 12:41'!\rcomplexContents\r\r\t^self! !\r\r!Object methodsFor: 'converting' stamp: 'ajh 7/6/2003 20:37'!\rmustBeBoolean\r\t\"Catches attempts to test truth of non-Booleans.  This message is sent from the VM.  The sending context is rewound to just before the jump causing this exception.\"\r\r\t^ self mustBeBooleanIn: thisContext sender! !\r\r!Object methodsFor: 'converting' stamp: 'ajh 7/6/2003 20:40'!\rmustBeBooleanIn: context\r\t\"context is the where the non-boolean error occurred. Rewind context to before jump then raise error.\"\r\r\t| proceedValue |\r\tcontext skipBackBeforeJump.\r\tproceedValue _ NonBooleanReceiver new\r\t\tobject: self;\r\t\tsignal: 'proceed for truth.'.\r\t^ proceedValue ~~ false! !\r\r!Object methodsFor: 'converting' stamp: 'sw 3/26/2001 12:12'!\rprintDirectlyToDisplay\r\t\"For debugging: write the receiver's printString directly to the display at (0, 100); senders of this are detected by the check-for-slips mechanism.\"\r\r\tself asString displayAt: 0@100\r\r\"StringMorph someInstance printDirectlyToDisplay\"! !\r\r!Object methodsFor: 'converting' stamp: 'RAA 3/31/1999 12:13'!\rwithoutListWrapper\r\r\t^self! !\r\r\r!Object methodsFor: 'copying'!\rclone\r\r\t<primitive: 148>\r\tself primitiveFailed! !\r\r!Object methodsFor: 'copying' stamp: 'ajh 8/18/2001 21:25'!\rcopy\r\t\"Answer another instance just like the receiver. Subclasses typically override postCopy; they typically do not override shallowCopy.\"\r\r\t^self shallowCopy postCopy! !\r\r!Object methodsFor: 'copying' stamp: 'tk 8/20/1998 16:01'!\rcopyAddedStateFrom: anotherObject\r\t\"Copy over the values of instance variables added by the receiver's class from anotherObject to the receiver.  These will be remapped in mapUniClasses, if needed.\"\r\r\tself class superclass instSize + 1 to: self class instSize do:\r\t\t[:index | self instVarAt: index put: (anotherObject instVarAt: index)]! !\r\r!Object methodsFor: 'copying' stamp: 'tpr 2/14/2004 21:53'!\rcopyFrom: anotherObject\r\t\"Copy to myself all instance variables I have in common with anotherObject.  This is dangerous because it ignores an object's control over its own inst vars.  \"\r\r\t| mine his |\r\t<primitive: 168>\r\tmine _ self class allInstVarNames.\r\this _ anotherObject class allInstVarNames.\r\t1 to: (mine size min: his size) do: [:ind |\r\t\t(mine at: ind) = (his at: ind) ifTrue: [\r\t\t\tself instVarAt: ind put: (anotherObject instVarAt: ind)]].\r\tself class isVariable & anotherObject class isVariable ifTrue: [\r\t\t1 to: (self basicSize min: anotherObject basicSize) do: [:ind |\r\t\t\tself basicAt: ind put: (anotherObject basicAt: ind)]].! !\r\r!Object methodsFor: 'copying' stamp: 'ajh 5/23/2002 00:38'!\rcopySameFrom: otherObject\r\t\"Copy to myself all instance variables named the same in otherObject.\r\tThis ignores otherObject's control over its own inst vars.\"\r\r\t| myInstVars otherInstVars match |\r\tmyInstVars _ self class allInstVarNames.\r\totherInstVars _ otherObject class allInstVarNames.\r\tmyInstVars doWithIndex: [:each :index |\r\t\t(match _ otherInstVars indexOf: each) > 0 ifTrue:\r\t\t\t[self instVarAt: index put: (otherObject instVarAt: match)]].\r\t1 to: (self basicSize min: otherObject basicSize) do: [:i |\r\t\tself basicAt: i put: (otherObject basicAt: i)].\r! !\r\r!Object methodsFor: 'copying' stamp: 'tk 4/20/1999 14:44'!\rcopyTwoLevel\r\t\"one more level than a shallowCopy\"\r\r\t| newObject class index |\r\tclass _ self class.\r\tnewObject _ self clone.\r\tnewObject == self ifTrue: [^ self].\r\tclass isVariable\r\t\tifTrue: \r\t\t\t[index _ self basicSize.\r\t\t\t[index > 0]\r\t\t\t\twhileTrue: \r\t\t\t\t\t[newObject basicAt: index put: (self basicAt: index) shallowCopy.\r\t\t\t\t\tindex _ index - 1]].\r\tindex _ class instSize.\r\t[index > 0]\r\t\twhileTrue: \r\t\t\t[newObject instVarAt: index put: (self instVarAt: index) shallowCopy.\r\t\t\tindex _ index - 1].\r\t^newObject! !\r\r!Object methodsFor: 'copying'!\rdeepCopy\r\t\"Answer a copy of the receiver with its own copy of each instance \r\tvariable.\"\r\r\t| newObject class index |\r\tclass _ self class.\r\t(class == Object) ifTrue: [^self].\r\tclass isVariable\r\t\tifTrue: \r\t\t\t[index _ self basicSize.\r\t\t\tnewObject _ class basicNew: index.\r\t\t\t[index > 0]\r\t\t\t\twhileTrue: \r\t\t\t\t\t[newObject basicAt: index put: (self basicAt: index) deepCopy.\r\t\t\t\t\tindex _ index - 1]]\r\t\tifFalse: [newObject _ class basicNew].\r\tindex _ class instSize.\r\t[index > 0]\r\t\twhileTrue: \r\t\t\t[newObject instVarAt: index put: (self instVarAt: index) deepCopy.\r\t\t\tindex _ index - 1].\r\t^newObject! !\r\r!Object methodsFor: 'copying' stamp: 'hg 11/23/1999 13:43'!\rinitialDeepCopierSize\r\t\"default value is 4096; other classes may override this, esp. for smaller (=faster) sizes\"\r\r\t^4096! !\r\r!Object methodsFor: 'copying' stamp: 'ajh 1/27/2003 18:45'!\rpostCopy\r\t\"self is a shallow copy, subclasses should copy fields as necessary to complete the full copy\"\r\r\t^ self! !\r\r!Object methodsFor: 'copying' stamp: 'jm 11/14/97 11:08'!\rshallowCopy\r\t\"Answer a copy of the receiver which shares the receiver's instance variables.\"\r\t| class newObject index |\r\t<primitive: 148>\r\tclass _ self class.\r\tclass isVariable\r\t\tifTrue: \r\t\t\t[index _ self basicSize.\r\t\t\tnewObject _ class basicNew: index.\r\t\t\t[index > 0]\r\t\t\t\twhileTrue: \r\t\t\t\t\t[newObject basicAt: index put: (self basicAt: index).\r\t\t\t\t\tindex _ index - 1]]\r\t\tifFalse: [newObject _ class basicNew].\r\tindex _ class instSize.\r\t[index > 0]\r\t\twhileTrue: \r\t\t\t[newObject instVarAt: index put: (self instVarAt: index).\r\t\t\tindex _ index - 1].\r\t^ newObject! !\r\r!Object methodsFor: 'copying' stamp: 'tk 5/13/2003 19:39'!\rveryDeepCopyUsing: copier\r\t\"Do a complete tree copy using a dictionary.  An object in the tree twice is only copied once.  All references to the object in the copy of the tree will point to the new copy.\r\tSame as veryDeepCopy except copier (with dictionary) is supplied.\r\t** do not delete this method, even if it has no callers **\"\r\r\t| new refs newDep newModel |\r\tnew _ self veryDeepCopyWith: copier.\r\tcopier mapUniClasses.\r\tcopier references associationsDo: [:assoc | \r\t\tassoc value veryDeepFixupWith: copier].\r\t\"Fix dependents\"\r\trefs _ copier references.\r\tDependentsFields associationsDo: [:pair |\r\t\tpair value do: [:dep | \r\t\t\t(newDep _ refs at: dep ifAbsent: [nil]) ifNotNil: [\r\t\t\t\tnewModel _ refs at: pair key ifAbsent: [pair key].\r\t\t\t\tnewModel addDependent: newDep]]].\r\t^ new! !\r\r!Object methodsFor: 'copying' stamp: 'tk 3/11/2003 14:12'!\rveryDeepCopyWith: deepCopier\r\t\"Copy me and the entire tree of objects I point to.  An object in the tree twice is copied once, and both references point to him.  deepCopier holds a dictionary of objects we have seen.  Some classes refuse to be copied.  Some classes are picky about which fields get deep copied.\"\r\t| class index sub subAss new uc sup has mine |\r\tdeepCopier references at: self ifPresent: [:newer | ^ newer]. \t\"already did him\"\r\tclass _ self class.\r\tclass isMeta ifTrue: [^ self].\t\t\"a class\"\r\tnew _ self clone.\r\t(class isSystemDefined not and: [deepCopier newUniClasses \"allowed\"]) ifTrue: [\r\t\tuc _ deepCopier uniClasses at: class ifAbsent: [nil].\r\t\tuc ifNil: [\r\t\t\tdeepCopier uniClasses at: class put: (uc _ self copyUniClassWith: deepCopier).\r\t\t\tdeepCopier references at: class put: uc].\t\"remember\"\r\t\tnew _ uc new.\r\t\tnew copyFrom: self].\t\"copy inst vars in case any are weak\"\r\tdeepCopier references at: self put: new.\t\"remember\"\r\t(class isVariable and: [class isPointers]) ifTrue: \r\t\t[index _ self basicSize.\r\t\t[index > 0] whileTrue: \r\t\t\t[sub _ self basicAt: index.\r\t\t\t(subAss _ deepCopier references associationAt: sub ifAbsent: [nil])\r\t\t\t\tifNil: [new basicAt: index put: (sub veryDeepCopyWith: deepCopier)]\r\t\t\t\tifNotNil: [new basicAt: index put: subAss value].\r\t\t\tindex _ index - 1]].\r\t\"Ask each superclass if it wants to share (weak copy) any inst vars\"\r\tnew veryDeepInner: deepCopier.\t\t\"does super a lot\"\r\r\t\"other superclasses want all inst vars deep copied\"\r\tsup _ class.  index _ class instSize.\r\t[has _ sup compiledMethodAt: #veryDeepInner: ifAbsent: [nil].\r\thas _ has ifNil: [class isSystemDefined not \"is a uniClass\"] ifNotNil: [true].\r\tmine _ sup instVarNames.\r\thas ifTrue: [index _ index - mine size]\t\"skip inst vars\"\r\t\tifFalse: [1 to: mine size do: [:xx |\r\t\t\t\tsub _ self instVarAt: index.\r\t\t\t\t(subAss _ deepCopier references associationAt: sub ifAbsent: [nil])\r\t\t\t\t\t\t\"use association, not value, so nil is an exceptional value\"\r\t\t\t\t\tifNil: [new instVarAt: index put: \r\t\t\t\t\t\t\t\t(sub veryDeepCopyWith: deepCopier)]\r\t\t\t\t\tifNotNil: [new instVarAt: index put: subAss value].\r\t\t\t\tindex _ index - 1]].\r\t(sup _ sup superclass) == nil] whileFalse.\r\tnew rehash.\t\"force Sets and Dictionaries to rehash\"\r\t^ new\r! !\r\r!Object methodsFor: 'copying' stamp: 'tk 1/6/1999 17:39'!\rveryDeepFixupWith: deepCopier\r\t\"I have no fields and no superclass.  Catch the super call.\"\r! !\r\r!Object methodsFor: 'copying' stamp: 'tk 9/4/2001 10:30'!\rveryDeepInner: deepCopier\r\t\"No special treatment for inst vars of my superclasses.  Override when some need to be weakly copied.  Object>>veryDeepCopyWith: will veryDeepCopy any inst var whose class does not actually define veryDeepInner:\"\r! !\r\r\r!Object methodsFor: 'creation' stamp: 'sw 1/29/2002 21:43'!\rasMorph\r\t\"Open a morph, as best one can, on the receiver\"\r\r\t^ self asString asMorph\r\r\t\"\r234 asMorph\r(ScriptingSystem formAtKey: #TinyMenu) asMorph\r'fred' asMorph\r\"\r\r! !\r\r!Object methodsFor: 'creation' stamp: 'sw 1/29/2002 21:45'!\ropenAsMorph\r\t\"Open a morph, as best one can, on the receiver\"\r\r\t^ self asMorph openInHand\r\r\"\r234 openAsMorph\r(ScriptingSystem formAtKey: #TinyMenu) openAsMorph\r'fred' openAsMorph\r\"! !\r\r\r!Object methodsFor: 'dependents access' stamp: 'ar 2/11/2001 01:55'!\raddDependent: anObject\r\t\"Make the given object one of the receiver's dependents.\"\r\r\t| dependents |\r\tdependents _ self dependents.\r\t(dependents includes: anObject) ifFalse:\r\t\t[self myDependents: (dependents copyWithDependent: anObject)].\r\t^ anObject! !\r\r!Object methodsFor: 'dependents access' stamp: 'sma 2/29/2000 19:53'!\rbreakDependents\r\t\"Remove all of the receiver's dependents.\"\r\r\tself myDependents: nil! !\r\r!Object methodsFor: 'dependents access' stamp: 'sma 2/29/2000 19:26'!\rcanDiscardEdits\r\t\"Answer true if none of the views on this model has unaccepted edits that matter.\"\r\r\tself dependents\r\t\tdo: [:each | each canDiscardEdits ifFalse: [^ false]]\r\t\twithout: self.\r\t^ true! !\r\r!Object methodsFor: 'dependents access' stamp: 'sma 2/29/2000 19:58'!\rdependents\r\t\"Answer a collection of objects that are 'dependent' on the receiver;\r\t that is, all objects that should be notified if the receiver changes.\"\r\r\t^ self myDependents ifNil: [#()]! !\r\r!Object methodsFor: 'dependents access' stamp: 'sma 2/29/2000 19:59'!\rhasUnacceptedEdits\r\t\"Answer true if any of the views on this object has unaccepted edits.\"\r\r\tself dependents\r\t\tdo: [:each | each hasUnacceptedEdits ifTrue: [^ true]]\r\t\twithout: self.\r\t^ false! !\r\r!Object methodsFor: 'dependents access' stamp: 'sma 2/29/2000 19:55'!\rmyDependents\r\t\"Private. Answer a list of all the receiver's dependents.\"\r\r\t^ DependentsFields at: self ifAbsent: []! !\r\r!Object methodsFor: 'dependents access' stamp: 'sma 2/29/2000 19:52'!\rmyDependents: aCollectionOrNil\r\t\"Private. Set (or remove) the receiver's dependents list.\"\r\r\taCollectionOrNil\r\t\tifNil: [DependentsFields removeKey: self ifAbsent: []]\r\t\tifNotNil: [DependentsFields at: self put: aCollectionOrNil]! !\r\r!Object methodsFor: 'dependents access' stamp: 'reThink 2/18/2001 17:06'!\rrelease\r\t\"Remove references to objects that may refer to the receiver. This message \r\tshould be overridden by subclasses with any cycles, in which case the \r\tsubclass should also include the expression super release.\"\r\r\tself releaseActionMap! !\r\r!Object methodsFor: 'dependents access' stamp: 'sma 2/29/2000 20:23'!\rremoveDependent: anObject\r\t\"Remove the given object as one of the receiver's dependents.\"\r\r\t| dependents |\r\tdependents _ self dependents reject: [:each | each == anObject].\r\tself myDependents: (dependents isEmpty ifFalse: [dependents]).\r\t^ anObject! !\r\r\r!Object methodsFor: 'deprecated' stamp: 'md 12/12/2003 17:02'!\rbeep: soundName\r\t\"Make the given sound, unless the making of sound is disabled in Preferences.\"\r\r\tself deprecated: 'Use SampledSound>>playSoundNamed: instead.'.\r\tPreferences soundsEnabled\r\t\tifTrue: [self playSoundNamed: soundName]\r! !\r\r!Object methodsFor: 'deprecated' stamp: 'gk 2/24/2004 08:50'!\rbeepPrimitive\r\t\"Deprecated. Beep in the absence of sound support.\"\r\t\r\tself deprecated: 'Use Beeper class>>beep or Beeper class>>beepPrimitive instead.'.\r\tBeeper beepPrimitive! !\r\r\r!Object methodsFor: 'drag and drop' stamp: 'bh 9/16/2001 18:10'!\racceptDroppingMorph: transferMorph event: evt inMorph: dstListMorph \r\t\r\t^false.! !\r\r!Object methodsFor: 'drag and drop' stamp: 'mir 5/16/2000 11:35'!\rdragAnimationFor: item transferMorph: transferMorph \r\t\"Default do nothing\"! !\r\r!Object methodsFor: 'drag and drop' stamp: 'panda 4/28/2000 16:20'!\rdragPassengerFor: item inMorph: dragSource \r\t^item! !\r\r!Object methodsFor: 'drag and drop' stamp: 'panda 4/28/2000 16:11'!\rdragTransferType\r\t^nil! !\r\r!Object methodsFor: 'drag and drop' stamp: 'panda 4/28/2000 16:05'!\rdragTransferTypeForMorph: dragSource \r\t^nil! !\r\r!Object methodsFor: 'drag and drop' stamp: 'mir 5/8/2000 17:19'!\rwantsDroppedMorph: aMorph event: anEvent inMorph: destinationLM \r\t^false! !\r\r\r!Object methodsFor: 'error handling' stamp: 'sma 5/6/2000 19:35'!\rassert: aBlock\r\t\"Throw an assertion error if aBlock does not evaluates to true.\"\r\r\taBlock value ifFalse: [AssertionFailure signal: 'Assertion failed']! !\r\r!Object methodsFor: 'error handling'!\rcaseError\r\t\"Report an error from an in-line or explicit case statement.\"\r\r\tself error: 'Case not found, and no otherwise clause'! !\r\r!Object methodsFor: 'error handling' stamp: 'sma 5/28/2000 15:48'!\rconfirm: queryString\r\t\"Put up a yes/no menu with caption queryString. Answer true if the \r\tresponse is yes, false if no. This is a modal question--the user must \r\trespond yes or no.\"\r\r\t\"nil confirm: 'Are you hungry?'\"\r\r\t^ PopUpMenu confirm: queryString! !\r\r!Object methodsFor: 'error handling' stamp: 'sma 5/28/2000 15:55'!\rconfirm: aString orCancel: cancelBlock\r\t\"Put up a yes/no/cancel menu with caption aString. Answer true if  \r\tthe response is yes, false if no. If cancel is chosen, evaluate  \r\tcancelBlock. This is a modal question--the user must respond yes or no.\"\r\r\t^ PopUpMenu confirm: aString orCancel: cancelBlock! !\r\r!Object methodsFor: 'error handling' stamp: 'dew 10/6/2003 18:20'!\rdeprecated: anExplanationString\r\t\"Warn that the sending method has been deprecated.\"\r\r\tPreferences showDeprecationWarnings ifTrue:\r\t\t[Deprecation signal: thisContext sender printString, ' has been deprecated. ', anExplanationString]! !\r\r!Object methodsFor: 'error handling' stamp: 'dew 10/7/2003 00:26'!\rdeprecated: anExplanationString block: aBlock \r\t \"Warn that the sender has been deprecated.  Answer the value of aBlock on resumption.  (Note that #deprecated: is usually the preferred method.)\"\r\r\tPreferences showDeprecationWarnings ifTrue:\r\t\t[Deprecation\r\t\t\tsignal: thisContext sender printString, ' has been deprecated. ', anExplanationString].\r\t^ aBlock value.\r! !\r\r!Object methodsFor: 'error handling' stamp: 'sd 11/13/2003 21:11'!\rdeprecated: aBlock explanation: aString \r\t \"This method is OBSOLETE.  Use #deprecated:block: instead.\"\r\tself deprecated: 'Use Object>>deprecated:block: instead of deprecated:explanation:.'.\r\r\tPreferences showDeprecationWarnings ifTrue:\r\t\t[Deprecation\r\t\t\tsignal: ('{1} has been deprecated. {2}' translated format: {thisContext sender printString. aString})].\r\t^ aBlock value.\r! !\r\r!Object methodsFor: 'error handling' stamp: 'sd 11/13/2003 21:10'!\rdeprecatedExplanation: aString\r     \"This method is OBSOLETE.  Use #deprecated: instead.\"\r\tself deprecated: 'Use Object>>deprecated: instead of deprecatedExplanation:.'.\r\r\tPreferences showDeprecationWarnings ifTrue:\r\t\t[Deprecation signal: ('{1} has been deprecated. {2}' translated format: {thisContext sender printString. aString})]! !\r\r!Object methodsFor: 'error handling' stamp: 'ajh 10/9/2001 17:21'!\rdoesNotUnderstand: aMessage \r\t \"Handle the fact that there was an attempt to send the given message to the receiver but the receiver does not understand this message (typically sent from the machine when a message is sent to the receiver and no method is defined for that selector).\"\r\t\"Testing: (3 activeProcess)\"\r\r\t(Preferences autoAccessors and: [self tryToDefineVariableAccess: aMessage])\r\t\tifTrue: [^ aMessage sentTo: self].\r\r\t^ MessageNotUnderstood new \r\t\tmessage: aMessage;\r\t\treceiver: self;\r\t\tsignal! !\r\r!Object methodsFor: 'error handling' stamp: 'tfei 4/12/1999 12:55'!\rerror: aString \r\t\"Throw a generic Error exception.\"\r\r\t^Error new signal: aString! !\r\r!Object methodsFor: 'error handling' stamp: 'ar 2/13/2001 20:49'!\rexternalCallFailed\r\t\"A call to an external function has failed.\"\r\t^(Smalltalk at: #ExternalFunction ifAbsent:[^self error: 'FFI not installed'])\r\t\texternalCallFailed! !\r\r!Object methodsFor: 'error handling' stamp: 'tfei 4/12/1999 12:54'!\rhalt\r\t\"This is the typical message to use for inserting breakpoints during \r\tdebugging. It behaves like halt:, but does not call on halt: in order to \r\tavoid putting this message on the stack. Halt is especially useful when \r\tthe breakpoint message is an arbitrary one.\"\r\r\tHalt signal! !\r\r!Object methodsFor: 'error handling' stamp: 'tfei 4/12/1999 12:59'!\rhalt: aString \r\t\"This is the typical message to use for inserting breakpoints during \r\tdebugging. It creates and schedules a Notifier with the argument, \r\taString, as the label.\"\r\t\r\tHalt new signal: aString! !\r\r!Object methodsFor: 'error handling' stamp: 'bf 9/27/1999 17:14'!\rhandles: exception\r\t\"This method exists to break an endless loop in Exception>>findHandlerFrom: if the exception\ris invalid\"\r\t^false! !\r\r!Object methodsFor: 'error handling' stamp: 'hg 10/2/2001 20:49'!\rnotify: aString \r\t\"Create and schedule a Notifier with the argument as the message in \r\torder to request confirmation before a process can proceed.\"\r\r\tWarning signal: aString\r\r\t\"nil notify: 'confirmation message'\"! !\r\r!Object methodsFor: 'error handling'!\rnotify: aString at: location\r\t\"Create and schedule a Notifier with the argument as the message in \r\torder to request confirmation before a process can proceed. Subclasses can\r\toverride this and insert an error message at location within aString.\"\r\r\tself notify: aString\r\r\t\"nil notify: 'confirmation message' at: 12\"! !\r\r!Object methodsFor: 'error handling' stamp: 'sw 5/23/2001 13:43'!\rnotifyWithLabel: aString \r\t\"Create and schedule a Notifier with aString as the window label as well as the contents of the window, in  order to request confirmation before a process can proceed.\"\r\r\tDebugger\r\t\topenContext: thisContext\r\t\tlabel: aString\r\t\tcontents: aString\r\r\t\"nil notifyWithLabel: 'let us see if this works'\"! !\r\r!Object methodsFor: 'error handling'!\rprimitiveFailed\r\t\"Announce that a primitive has failed and there is no appropriate \r\tSmalltalk code to run.\"\r\r\tself error: 'a primitive has failed'! !\r\r!Object methodsFor: 'error handling' stamp: 'AFi 2/8/2003 22:52'!\rshouldBeImplemented\r\t\"Announce that this message should be implemented\"\r\r\tself error: 'This message should be implemented'! !\r\r!Object methodsFor: 'error handling'!\rshouldNotImplement\r\t\"Announce that, although the receiver inherits this message, it should \r\tnot implement it.\"\r\r\tself error: 'This message is not appropriate for this object'! !\r\r!Object methodsFor: 'error handling' stamp: 'ajh 9/7/2002 21:20'!\rsubclassResponsibility\r\t\"This message sets up a framework for the behavior of the class' subclasses.\r\tAnnounce that the subclass should have implemented this message.\"\r\r\tself error: 'My subclass should have overridden ', thisContext sender methodSelector printString! !\r\r!Object methodsFor: 'error handling' stamp: 'tk 6/18/2001 15:04'!\rtryToDefineVariableAccess: aMessage\r\t\"See if the message just wants to get at an instance variable of this class.  Ask the user if its OK.  If so, define the message to read or write that instance or class variable and retry.\"\r\t| ask newMessage sel canDo classOrSuper |\r\taMessage arguments size > 1 ifTrue: [^ false].\r\tsel _ aMessage selector asString.\t\"works for 0 args\"\r\taMessage arguments size = 1 ifTrue: [\r\t\tsel last = $: ifFalse: [^ false].\r\t\tsel _ sel copyWithout: $:].\r\tcanDo _ false.  classOrSuper _ self class.\r\t[((classOrSuper instVarNames includes: sel) \t\r\t\tifTrue: [canDo _ true. nil]\r\t\tifFalse: [classOrSuper _ classOrSuper superclass]) == nil] whileFalse.\r\tcanDo ifFalse: [classOrSuper _ self class.\r\t\t[((classOrSuper classVarNames includes: sel) \t\r\t\t\tifTrue: [canDo _ true. nil]\r\t\t\tifFalse: [classOrSuper _ classOrSuper superclass]) == nil] whileFalse].\r\tcanDo ifFalse: [^ false].\r\r\task _ self confirm: 'A ', thisContext sender sender receiver \r\t\tclass printString, ' wants to ', \r\t\t(aMessage arguments size = 1 ifTrue: ['write into'] ifFalse: ['read from']), '\r', sel ,' in class ', classOrSuper printString, '.\rDefine a this access message?'.\r\task ifTrue: [\r\t\taMessage arguments size = 1 \r\t\t\tifTrue: [newMessage _ aMessage selector, ' anObject\r\t', sel, ' _ anObject']\r\t\t\tifFalse: [newMessage _ aMessage selector, '\r\t^', aMessage selector].\r\t\tclassOrSuper compile: newMessage classified: 'accessing' notifying: nil].\r\t^ ask! !\r\r\r!Object methodsFor: 'evaluating' stamp: 'reThink 3/12/2001 18:14'!\rvalue\r\r\t^self! !\r\r!Object methodsFor: 'evaluating' stamp: 'reThink 2/18/2001 15:23'!\rvalueWithArguments: aSequenceOfArguments\r\r\t^self! !\r\r\r!Object methodsFor: 'events-accessing' stamp: 'nk 12/20/2002 17:48'!\ractionForEvent: anEventSelector\r    \"Answer the action to be evaluated when <anEventSelector> has been triggered.\"\r\r\t| actions |\r\tactions := self actionMap\r\t\tat: anEventSelector asSymbol\r\t\tifAbsent: [nil].\r\tactions ifNil: [^nil].\r\t^ actions asMinimalRepresentation! !\r\r!Object methodsFor: 'events-accessing' stamp: 'nk 12/20/2002 17:48'!\ractionForEvent: anEventSelector\rifAbsent: anExceptionBlock\r    \"Answer the action to be evaluated when <anEventSelector> has been triggered.\"\r\r\t| actions |\r\tactions := self actionMap\r\t\tat: anEventSelector asSymbol\r\t\tifAbsent: [nil].\r\tactions ifNil: [^anExceptionBlock value].\r\t^ actions asMinimalRepresentation! !\r\r!Object methodsFor: 'events-accessing' stamp: 'reThink 2/18/2001 14:43'!\ractionMap\r\r\t^EventManager actionMapFor: self! !\r\r!Object methodsFor: 'events-accessing' stamp: 'rw 4/27/2002 08:35'!\ractionSequenceForEvent: anEventSelector\r\r    ^(self actionMap\r        at: anEventSelector asSymbol\r        ifAbsent: [^WeakActionSequence new])\r            asActionSequence! !\r\r!Object methodsFor: 'events-accessing' stamp: 'SqR 6/28/2001 13:19'!\ractionsDo: aBlock\r\r\tself actionMap do: aBlock! !\r\r!Object methodsFor: 'events-accessing' stamp: 'rw 2/10/2002 13:05'!\rcreateActionMap\r\r\t^IdentityDictionary new! !\r\r!Object methodsFor: 'events-accessing' stamp: 'SqR 2/19/2001 14:04'!\rhasActionForEvent: anEventSelector\r    \"Answer true if there is an action associated with anEventSelector\"\r\r    ^(self actionForEvent: anEventSelector) notNil! !\r\r!Object methodsFor: 'events-accessing' stamp: 'reThink 2/18/2001 15:29'!\rsetActionSequence: actionSequence\rforEvent: anEventSelector\r\r    | action |\r    action := actionSequence asMinimalRepresentation.\r    action == nil\r        ifTrue:\r            [self removeActionsForEvent: anEventSelector]\r        ifFalse:\r            [self updateableActionMap\r                at: anEventSelector asSymbol\r                put: action]! !\r\r!Object methodsFor: 'events-accessing' stamp: 'reThink 2/25/2001 08:50'!\rupdateableActionMap\r\r\t^EventManager updateableActionMapFor: self! !\r\r\r!Object methodsFor: 'events-registering' stamp: 'reThink 2/18/2001 15:04'!\rwhen: anEventSelector evaluate: anAction \r\r\t| actions |\r\tactions := self actionSequenceForEvent: anEventSelector.\r\t(actions includes: anAction)\r\t\tifTrue: [^ self].\r\tself \r\t\tsetActionSequence: (actions copyWith: anAction)\r\t\tforEvent: anEventSelector! !\r\r!Object methodsFor: 'events-registering' stamp: 'rww 12/30/2002 10:37'!\rwhen: anEventSelector\rsend: aMessageSelector\rto: anObject\r \r    self\r        when: anEventSelector\r        evaluate: (WeakMessageSend\r            receiver: anObject\r            selector: aMessageSelector)! !\r\r!Object methodsFor: 'events-registering' stamp: 'rww 12/30/2002 10:37'!\rwhen: anEventSelector\rsend: aMessageSelector\rto: anObject\rwith: anArg\r \r    self\r        when: anEventSelector\r        evaluate: (WeakMessageSend\r            receiver: anObject\r            selector: aMessageSelector\r\t\targuments: (Array with: anArg))! !\r\r!Object methodsFor: 'events-registering' stamp: 'rww 12/30/2002 10:37'!\rwhen: anEventSelector\rsend: aMessageSelector\rto: anObject\rwithArguments: anArgArray\r \r    self\r        when: anEventSelector\r        evaluate: (WeakMessageSend\r            receiver: anObject\r            selector: aMessageSelector\r\t\targuments: anArgArray)! !\r\r\r!Object methodsFor: 'events-removing' stamp: 'reThink 2/18/2001 15:33'!\rreleaseActionMap\r\r\tEventManager releaseActionMapFor: self! !\r\r!Object methodsFor: 'events-removing' stamp: 'reThink 2/18/2001 15:31'!\rremoveAction: anAction\rforEvent: anEventSelector\r\r    self\r        removeActionsSatisfying: [:action | action = anAction]\r        forEvent: anEventSelector! !\r\r!Object methodsFor: 'events-removing' stamp: 'reThink 2/18/2001 15:33'!\rremoveActionsForEvent: anEventSelector\r\r    | map |\r    map := self actionMap.\r    map removeKey: anEventSelector asSymbol ifAbsent: [].\r    map isEmpty\r        ifTrue: [self releaseActionMap]! !\r\r!Object methodsFor: 'events-removing' stamp: 'nk 8/25/2003 21:46'!\rremoveActionsSatisfying: aBlock\r\r\tself actionMap keys do:\r\t\t[:eachEventSelector |\r\t\t\tself\r   \t\t\t\tremoveActionsSatisfying: aBlock\r\t\t\t\tforEvent: eachEventSelector\r\t\t]! !\r\r!Object methodsFor: 'events-removing' stamp: 'reThink 2/18/2001 15:31'!\rremoveActionsSatisfying: aOneArgBlock \rforEvent: anEventSelector\r\r    self\r        setActionSequence:\r            ((self actionSequenceForEvent: anEventSelector)\r                reject: [:anAction | aOneArgBlock value: anAction])\r        forEvent: anEventSelector! !\r\r!Object methodsFor: 'events-removing' stamp: 'rw 7/29/2003 17:18'!\rremoveActionsWithReceiver: anObject\r\r\tself actionMap copy keysDo:\r\t\t[:eachEventSelector |\r\t\t\tself\r   \t\t\t\tremoveActionsSatisfying: [:anAction | anAction receiver == anObject]\r\t\t\t\tforEvent: eachEventSelector\r\t\t]! !\r\r!Object methodsFor: 'events-removing' stamp: 'reThink 2/18/2001 15:36'!\rremoveActionsWithReceiver: anObject\rforEvent: anEventSelector\r\r    self\r        removeActionsSatisfying:\r            [:anAction |\r            anAction receiver == anObject]\r        forEvent: anEventSelector! !\r\r\r!Object methodsFor: 'events-triggering' stamp: 'reThink 2/18/2001 15:22'!\rtriggerEvent: anEventSelector\r\t\"Evaluate all actions registered for <anEventSelector>. Return the value of the last registered action.\"\r\r    ^(self actionForEvent: anEventSelector) value! !\r\r!Object methodsFor: 'events-triggering' stamp: 'reThink 2/18/2001 17:09'!\rtriggerEvent: anEventSelector\rifNotHandled: anExceptionBlock\r\t\"Evaluate all actions registered for <anEventSelector>. Return the value of the last registered action.\"\r\r    ^(self \r\t\tactionForEvent: anEventSelector\r\t\tifAbsent: [^anExceptionBlock value]) value\r! !\r\r!Object methodsFor: 'events-triggering' stamp: 'reThink 2/18/2001 14:59'!\rtriggerEvent: anEventSelector\rwith: anObject\r\r    ^self \r\t\ttriggerEvent: anEventSelector\r\t\twithArguments: (Array with: anObject)! !\r\r!Object methodsFor: 'events-triggering' stamp: 'reThink 2/18/2001 14:59'!\rtriggerEvent: anEventSelector\rwith: anObject\rifNotHandled: anExceptionBlock\r\r    ^self \r\t\ttriggerEvent: anEventSelector\r\t\twithArguments: (Array with: anObject)\r\t\tifNotHandled: anExceptionBlock! !\r\r!Object methodsFor: 'events-triggering' stamp: 'reThink 2/18/2001 15:21'!\rtriggerEvent: anEventSelector\rwithArguments: anArgumentList\r\r    ^(self actionForEvent: anEventSelector)\r        valueWithArguments: anArgumentList! !\r\r!Object methodsFor: 'events-triggering' stamp: 'reThink 2/18/2001 15:21'!\rtriggerEvent: anEventSelector\rwithArguments: anArgumentList\rifNotHandled: anExceptionBlock\r\r    ^(self \r\t\tactionForEvent: anEventSelector\r\t\tifAbsent: [^anExceptionBlock value])\r        valueWithArguments: anArgumentList! !\r\r\r!Object methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 00:42'!\rbyteEncode:aStream\r\tself flattenOnStream:aStream.\r! !\r\r!Object methodsFor: 'filter streaming'!\rdrawOnCanvas:aStream\r\tself flattenOnStream:aStream.\r! !\r\r!Object methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 01:31'!\relementSeparator\r\t^nil.! !\r\r!Object methodsFor: 'filter streaming'!\rencodePostscriptOn:aStream\r\tself byteEncode:aStream.\r! !\r\r!Object methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 00:07'!\rflattenOnStream:aStream\r\tself writeOnFilterStream:aStream.\r! !\r\r!Object methodsFor: 'filter streaming' stamp: 'mpw 6/22/1930 22:56'!\rfullDrawPostscriptOn:aStream\r\t^aStream fullDraw:self.\r! !\r\r!Object methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 01:51'!\rprintOnStream:aStream\r\tself byteEncode:aStream.\r! !\r\r!Object methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 00:49'!\rputOn:aStream\r\t^aStream nextPut:self.\r! !\r\r!Object methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 01:53'!\rstoreOnStream:aStream\r\tself printOnStream:aStream.\r! !\r\r!Object methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 00:06'!\rwriteOnFilterStream:aStream\r\taStream writeObject:self.\r! !\r\r\r!Object methodsFor: 'finalization' stamp: 'ar 3/21/98 16:26'!\ractAsExecutor\r\t\"Prepare the receiver to act as executor for any resources associated with it\"\r\tself breakDependents! !\r\r!Object methodsFor: 'finalization' stamp: 'ar 3/20/98 22:19'!\rexecutor\r\t\"Return an object which can act as executor for finalization of the receiver\"\r\t^self shallowCopy actAsExecutor! !\r\r!Object methodsFor: 'finalization' stamp: 'ar 5/19/2003 20:10'!\rfinalizationRegistry\r\t\"Answer the finalization registry associated with the receiver.\"\r\t^WeakRegistry default! !\r\r!Object methodsFor: 'finalization' stamp: 'ar 3/21/98 16:27'!\rfinalize\r\t\"Finalize the resource associated with the receiver. This message should only be sent during the finalization process. There is NO garantuee that the resource associated with the receiver hasn't been free'd before so take care that you don't run into trouble - this all may happen with interrupt priority.\"! !\r\r!Object methodsFor: 'finalization' stamp: 'ar 3/21/98 18:38'!\rretryWithGC: execBlock until: testBlock\r\t\"Retry execBlock as long as testBlock returns false. Do an incremental GC after the first try, a full GC after the second try.\"\r\t| blockValue |\r\tblockValue := execBlock value.\r\t(testBlock value: blockValue) ifTrue:[^blockValue].\r\tSmalltalk garbageCollectMost.\r\tblockValue := execBlock value.\r\t(testBlock value: blockValue) ifTrue:[^blockValue].\r\tSmalltalk garbageCollect.\r\t^execBlock value.! !\r\r!Object methodsFor: 'finalization' stamp: 'ar 5/19/2003 20:14'!\rtoFinalizeSend: aSelector to: aFinalizer with: aResourceHandle\r\t\"When I am finalized (e.g., garbage collected) close the associated resource handle by sending aSelector to the appropriate finalizer (the guy who knows how to get rid of the resource).\r\tWARNING: Neither the finalizer nor the resource handle are allowed to reference me. If they do, then I will NEVER be garbage collected. Since this cannot be validated here, it is up to the client to make sure this invariant is not broken.\"\r\tself == aFinalizer ifTrue:[self error: 'I cannot finalize myself'].\r\tself == aResourceHandle ifTrue:[self error: 'I cannot finalize myself'].\r\t^self finalizationRegistry add: self executor:\r\t\t(ObjectFinalizer new\r\t\t\treceiver: aFinalizer\r\t\t\tselector: aSelector\r\t\t\targument: aResourceHandle)! !\r\r\r!Object methodsFor: 'flagging' stamp: 'sw 8/4/97 16:49'!\risThisEverCalled\r\t^ self isThisEverCalled: thisContext sender printString! !\r\r!Object methodsFor: 'flagging'!\risThisEverCalled: msg\r\t\"Send this message, with some useful printable argument, from methods or branches of methods which you believe are never reached.  2/5/96 sw\"\r\r\tself halt: 'This is indeed called: ', msg printString! !\r\r!Object methodsFor: 'flagging' stamp: 'jm 3/18/98 17:23'!\rlogEntry\r\r\tTranscript show: 'Entered ', thisContext sender printString; cr.\r! !\r\r!Object methodsFor: 'flagging' stamp: 'jm 3/18/98 17:23'!\rlogExecution\r\r\tTranscript show: 'Executing ', thisContext sender printString; cr.\r! !\r\r!Object methodsFor: 'flagging' stamp: 'jm 3/18/98 17:22'!\rlogExit\r\r\tTranscript show:  'Exited ', thisContext sender printString; cr.\r! !\r\r\r!Object methodsFor: 'macpal' stamp: 'sw 5/7/1998 23:00'!\rcodeStrippedOut: messageString\r\t\"When a method is stripped out for external release, it is replaced by a method that calls this\"\r\r\tself halt: 'Code stripped out -- ', messageString, '-- do not proceed.'! !\r\r!Object methodsFor: 'macpal' stamp: 'sw 1/28/1999 17:31'!\rcontentsChanged\r\tself changed: #contents! !\r\r!Object methodsFor: 'macpal' stamp: 'ar 3/18/2001 00:03'!\rcurrentEvent\r\t\"Answer the current Morphic event.  This method never returns nil.\"\r\t^ActiveEvent ifNil:[self currentHand lastEvent]! !\r\r!Object methodsFor: 'macpal' stamp: 'ar 3/18/2001 00:03'!\rcurrentHand\r\t\"Return a usable HandMorph -- the one associated with the object's current environment.  This method will always return a hand, even if it has to conjure one up as a last resort.  If a particular hand is actually handling events at the moment (such as a remote hand or a ghost hand), it will be returned.\"\r\r\t^ActiveHand! !\r\r!Object methodsFor: 'macpal' stamp: 'BG 10/29/2003 08:43'!\rcurrentWorld\r\t\"Answer a morphic world that is the current UI focus.\r\t\tIf in an embedded world, it's that world.\r\t\tIf in a morphic project, it's that project's world.  \r\t\tIf in an mvc project, it is the topmost morphic-mvc-window's worldMorph. \r\t\tIf in an mvc project that has no morphic-mvc-windows, then it's just some existing worldmorph instance.\r\t\tIf in an mvc project in a Squeak that has NO WorldMorph instances, one is created.\r\r\tThis method will never return nil, it will always return its best effort at returning a relevant world morph, but if need be -- if there are no worlds anywhere, it will create a new one.\"\r\r\t| aView aSubview |\r\tActiveWorld ifNotNil:[^ActiveWorld].\r\tWorld ifNotNil:[^World].\r\taView _ ScheduledControllers controllerSatisfying:\r\t\t[:ctrl | (aSubview _ ctrl view firstSubView) notNil and:\r\t\t\t[aSubview model isMorph and: [aSubview model isWorldMorph]]].\r\t^aView\r\t\tifNotNil:\r\t\t\t[aSubview model]\r\t\tifNil:\r\t\t\t[].! !\r\r!Object methodsFor: 'macpal' stamp: 'jm 5/6/1998 22:35'!\rflash\r\t\"Do nothing.\"\r! !\r\r!Object methodsFor: 'macpal' stamp: 'sw 10/13/97 16:38'!\rifKindOf: aClass thenDo: aBlock\r\t^ (self isKindOf: aClass) ifTrue: [aBlock value: self]! !\r\r!Object methodsFor: 'macpal' stamp: 'sw 6/16/1998 15:07'!\rinstanceVariableValues\r\t\"Answer a collection whose elements are the values of those instance variables of the receiver which were added by the receiver's class\"\r\t| c |\r\tc _ OrderedCollection new.\r\tself class superclass instSize + 1 to: self class instSize do:\r\t\t[:i | c add: (self instVarAt: i)].\r\t^ c! !\r\r!Object methodsFor: 'macpal' stamp: 'sw 3/20/2001 13:29'!\risUniversalTiles\r\t\"Return true if I (my world) uses universal tiles.  This message can be called in places where the current World is not known, such as when writing out a project.  For more information about the project-writing subtlety addressed by this protocol, kindly contact Ted Kaehler.\"\r\r\t^ Preferences universalTiles! !\r\r!Object methodsFor: 'macpal' stamp: 'sw 10/24/2000 07:04'!\robjectRepresented\r\t\"most objects represent themselves; this provides a hook for aliases to grab on to\"\r\r\t^ self! !\r\r!Object methodsFor: 'macpal' stamp: 'gk 2/23/2004 20:51'!\rplaySoundNamed: soundName\r\t\"Deprecated.\r\tPlay the sound with the given name.\"\r\r\tself deprecated: 'Use \"SoundService default playSoundNamed: aName\" instead.'.\r\tSoundService default playSoundNamed: soundName! !\r\r!Object methodsFor: 'macpal' stamp: 'sw 5/22/2001 18:31'!\rrefusesToAcceptCode\r\t\"Answer whether the receiver is a code-bearing instrument which at the moment refuses to allow its contents to be submitted\"\r\r\t^ false\r\t! !\r\r!Object methodsFor: 'macpal' stamp: 'jm 2/24/1999 12:40'!\rscriptPerformer\r\r\t^ self\r! !\r\r!Object methodsFor: 'macpal' stamp: 'sw 3/20/2001 13:40'!\rslotInfo\r\t\"Answer a list of slot-information objects.  Initally only provides useful info for players\"\r\r\t^ Dictionary new! !\r\r\r!Object methodsFor: 'message handling' stamp: 'di 3/26/1999 07:52'!\rperform: aSymbol \r\t\"Send the unary selector, aSymbol, to the receiver.\r\tFail if the number of arguments expected by the selector is not zero.\r\tPrimitive. Optional. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 83>\r\t^ self perform: aSymbol withArguments: (Array new: 0)! !\r\r!Object methodsFor: 'message handling' stamp: 'sw 10/30/1998 18:27'!\rperform: selector orSendTo: otherTarget\r\t\"If I wish to intercept and handle selector myself, do it; else send it to otherTarget\"\r\t^ otherTarget perform: selector! !\r\r!Object methodsFor: 'message handling' stamp: 'di 3/26/1999 07:52'!\rperform: aSymbol with: anObject \r\t\"Send the selector, aSymbol, to the receiver with anObject as its argument.\r\tFail if the number of arguments expected by the selector is not one.\r\tPrimitive. Optional. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 83>\r\t^ self perform: aSymbol withArguments: (Array with: anObject)! !\r\r!Object methodsFor: 'message handling' stamp: 'di 3/26/1999 07:52'!\rperform: aSymbol with: firstObject with: secondObject \r\t\"Send the selector, aSymbol, to the receiver with the given arguments.\r\tFail if the number of arguments expected by the selector is not two.\r\tPrimitive. Optional. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 83>\r\t^ self perform: aSymbol withArguments: (Array with: firstObject with: secondObject)! !\r\r!Object methodsFor: 'message handling' stamp: 'di 3/26/1999 07:51'!\rperform: aSymbol with: firstObject with: secondObject with: thirdObject \r\t\"Send the selector, aSymbol, to the receiver with the given arguments.\r\tFail if the number of arguments expected by the selector is not three.\r\tPrimitive. Optional. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 83>\r\t^ self perform: aSymbol\r\t\twithArguments: (Array with: firstObject with: secondObject with: thirdObject)! !\r\r!Object methodsFor: 'message handling' stamp: 'di 3/26/1999 07:55'!\rperform: selector withArguments: argArray \r\t\"Send the selector, aSymbol, to the receiver with arguments in argArray.\r\tFail if the number of arguments expected by the selector \r\tdoes not match the size of argArray.\r\tPrimitive. Optional. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 84>\r\t^ self perform: selector withArguments: argArray inSuperclass: self class! !\r\r!Object methodsFor: 'message handling' stamp: 'di 3/26/1999 08:00'!\rperform: selector withArguments: argArray inSuperclass: lookupClass\r\t\"NOTE:  This is just like perform:withArguments:, except that\r\tthe message lookup process begins, not with the receivers's class,\r\tbut with the supplied superclass instead.  It will fail if lookupClass\r\tcannot be found among the receiver's superclasses.\r\tPrimitive. Essential. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 100>\r\t(selector isMemberOf: Symbol)\r\t\tifFalse: [^ self error: 'selector argument must be a Symbol'].\r\t(selector numArgs = argArray size)\r\t\tifFalse: [^ self error: 'incorrect number of arguments'].\r\t(self class == lookupClass or: [self class inheritsFrom: lookupClass])\r\t\tifFalse: [^ self error: 'lookupClass is not in my inheritance chain'].\r\tself primitiveFailed! !\r\r!Object methodsFor: 'message handling' stamp: 'NS 1/28/2004 11:19'!\rwithArgs: argArray executeMethod: compiledMethod\r\t\"Execute compiledMethod against the receiver and args in argArray\"\r\r\t| selector |\r\t<primitive: 188>\r\tselector _ Symbol new.\r\tself class addSelectorSilently: selector withMethod: compiledMethod.\r\t^ [self perform: selector withArguments: argArray]\r\t\tensure: [self class basicRemoveSelector: selector]! !\r\r\r!Object methodsFor: 'objects from disk' stamp: 'tk 4/8/1999 12:46'!\rcomeFullyUpOnReload: smartRefStream\r\t\"Normally this read-in object is exactly what we want to store. 7/26/96 tk\"\r\r\t^ self! !\r\r!Object methodsFor: 'objects from disk' stamp: 'RAA 12/20/2000 16:51'!\rconvertToCurrentVersion: varDict refStream: smartRefStrm\r\r\t\"subclasses should implement if they wish to convert old instances to modern ones\"! !\r\r!Object methodsFor: 'objects from disk' stamp: 'RAA 1/10/2001 14:02'!\rindexIfCompact\r\r\t^0\t\t\"helps avoid a #respondsTo: in publishing\"! !\r\r!Object methodsFor: 'objects from disk' stamp: 'tk 2/24/1999 11:08'!\robjectForDataStream: refStrm\r    \"Return an object to store on an external data stream.\"\r\r    ^ self! !\r\r!Object methodsFor: 'objects from disk' stamp: 'tk 4/8/1999 12:05'!\rreadDataFrom: aDataStream size: varsOnDisk\r\t\"Fill in the fields of self based on the contents of aDataStream.  Return self.\r\t Read in the instance-variables written by Object>>storeDataOn:.\r\t NOTE: This method must send beginReference: before reading any objects from aDataStream that might reference it.\r\t Allow aDataStream to have fewer inst vars.  See SmartRefStream.\"\r\t| cntInstVars cntIndexedVars |\r\r\tcntInstVars _ self class instSize.\r\tself class isVariable\r\t\tifTrue: [cntIndexedVars _ varsOnDisk - cntInstVars.\r\t\t\t\tcntIndexedVars < 0 ifTrue: [\r\t\t\t\t\tself error: 'Class has changed too much.  Define a convertxxx method']]\r\t\tifFalse: [cntIndexedVars _ 0.\r\t\t\t\tcntInstVars _ varsOnDisk]. \t\"OK if fewer than now\"\r\r\taDataStream beginReference: self.\r\t1 to: cntInstVars do:\r\t\t[:i | self instVarAt: i put: aDataStream next].\r\t1 to: cntIndexedVars do:\r\t\t[:i | self basicAt: i put: aDataStream next].\r\t\"Total number read MUST be equal to varsOnDisk!!\"\r\t^ self\t\"If we ever return something other than self, fix calls \r\t\t\ton (super readDataFrom: aDataStream size: anInteger)\"! !\r\r\r\r!Object methodsFor: 'printing' stamp: 'di 6/20/97 08:57'!\rfullPrintString\r\t\"Answer a String whose characters are a description of the receiver.\"\r\r\t^ String streamContents: [:s | self printOn: s]! !\r\r!Object methodsFor: 'printing'!\risLiteral\r\t\"Answer whether the receiver has a literal text form recognized by the \r\tcompiler.\"\r\r\t^false! !\r\r!Object methodsFor: 'printing' stamp: 'sma 6/1/2000 09:28'!\rlongPrintOn: aStream\r\t\"Append to the argument, aStream, the names and values of all \r\tof the receiver's instance variables.\"\r\r\tself class allInstVarNames doWithIndex:\r\t\t[:title :index |\r\t\taStream nextPutAll: title;\r\t\t nextPut: $:;\r\t\t space;\r\t\t tab;\r\t\t print: (self instVarAt: index);\r\t\t cr]! !\r\r!Object methodsFor: 'printing' stamp: 'tk 10/19/2001 11:18'!\rlongPrintOn: aStream limitedTo: sizeLimit indent: indent\r\t\"Append to the argument, aStream, the names and values of all of the receiver's instance variables.  Limit is the length limit for each inst var.\"\r\r\tself class allInstVarNames doWithIndex:\r\t\t[:title :index |\r\t\tindent timesRepeat: [aStream tab].\r\t\taStream nextPutAll: title;\r\t\t nextPut: $:;\r\t\t space;\r\t\t tab;\r\t\t nextPutAll: \r\t\t\t((self instVarAt: index) printStringLimitedTo: (sizeLimit -3 -title size max: 1));\r\t\t cr]! !\r\r!Object methodsFor: 'printing' stamp: 'tk 10/16/2001 19:41'!\rlongPrintString\r\t\"Answer a String whose characters are a description of the receiver.\"\r\t\r\t| str |\r\tstr _ String streamContents: [:aStream | self longPrintOn: aStream].\r\t\"Objects without inst vars should return something\"\r\t^ str isEmpty ifTrue: [self printString, String cr] ifFalse: [str]! !\r\r!Object methodsFor: 'printing' stamp: 'sw 3/7/2001 13:14'!\rnominallyUnsent: aSelectorSymbol\r\t\"From within the body of a method which is not formally sent within the system, but which you intend to have remain in the system (for potential manual invocation, or for documentation, or perhaps because it's sent by commented-out-code that you anticipate uncommenting out someday, send this message, with the selector itself as the argument.\r\rThis will serve two purposes:\r\r\t(1)  The method will not be returned by searches for unsent selectors (because it, in a manner of speaking, sends itself).\r\t(2)\tYou can locate all such methods by browsing senders of #nominallyUnsent:\"\r\r\tfalse ifTrue: [self flag: #nominallyUnsent:]    \"So that this method itself will appear to be sent\"\r! !\r\r!Object methodsFor: 'printing' stamp: 'sma 6/1/2000 09:31'!\rprintOn: aStream\r\t\"Append to the argument, aStream, a sequence of characters that  \r\tidentifies the receiver.\"\r\r\t| title |\r\ttitle _ self class name.\r\taStream\r\t\tnextPutAll: (title first isVowel ifTrue: ['an '] ifFalse: ['a ']);\r\t\tnextPutAll: title! !\r\r!Object methodsFor: 'printing' stamp: 'sma 6/1/2000 09:22'!\rprintString\r\t\"Answer a String whose characters are a description of the receiver. \r\tIf you want to print without a character limit, use fullPrintString.\"\r\r\t^ self printStringLimitedTo: 50000! !\r\r!Object methodsFor: 'printing' stamp: 'tk 5/7/1999 16:20'!\rprintStringLimitedTo: limit\r\t\"Answer a String whose characters are a description of the receiver.\r\tIf you want to print without a character limit, use fullPrintString.\"\r\t| limitedString |\r\tlimitedString _ String streamContents: [:s | self printOn: s] limitedTo: limit.\r\tlimitedString size < limit ifTrue: [^ limitedString].\r\t^ limitedString , '...etc...'! !\r\r!Object methodsFor: 'printing' stamp: 'sw 10/17/2000 11:16'!\rreportableSize\r\t\"Answer a string that reports the size of the receiver -- useful for showing in a list view, for example\"\r\r\t^ (self basicSize + self class instSize) printString! !\r\r!Object methodsFor: 'printing'!\rstoreOn: aStream \r\t\"Append to the argument aStream a sequence of characters that is an \r\texpression whose evaluation creates an object similar to the receiver.\"\r\r\taStream nextPut: $(.\r\tself class isVariable\r\t\tifTrue: [aStream nextPutAll: '(', self class name, ' basicNew: ';\r\t\t\t\t\tstore: self basicSize;\r\t\t\t\t\tnextPutAll: ') ']\r\t\tifFalse: [aStream nextPutAll: self class name, ' basicNew'].\r\t1 to: self class instSize do:\r\t\t[:i |\r\t\taStream nextPutAll: ' instVarAt: ';\r\t\t\tstore: i;\r\t\t\tnextPutAll: ' put: ';\r\t\t\tstore: (self instVarAt: i);\r\t\t\tnextPut: $;].\r\t1 to: self basicSize do:\r\t\t[:i |\r\t\taStream nextPutAll: ' basicAt: ';\r\t\t\tstore: i;\r\t\t\tnextPutAll: ' put: ';\r\t\t\tstore: (self basicAt: i);\r\t\t\tnextPut: $;].\r\taStream nextPutAll: ' yourself)'\r! !\r\r!Object methodsFor: 'printing' stamp: 'di 6/20/97 09:12'!\rstoreString\r\t\"Answer a String representation of the receiver from which the receiver \r\tcan be reconstructed.\"\r\r\t^ String streamContents: [:s | self storeOn: s]! !\r\r!Object methodsFor: 'printing' stamp: 'sw 5/2/1998 13:55'!\rstringForReadout\r\t^ self stringRepresentation! !\r\r!Object methodsFor: 'printing'!\rstringRepresentation\r\t\"Answer a string that represents the receiver.  For most objects this is simply its printString, but for strings themselves, it's themselves.  6/12/96 sw\"\r\r\t^ self printString ! !\r\r\r!Object methodsFor: 'scripting' stamp: 'ar 3/17/2001 20:11'!\radaptedToWorld: aWorld\r\t\"If I refer to a world or a hand, return the corresponding items in the new world.\"\r\t^self! !\r\r!Object methodsFor: 'scripting' stamp: 'RAA 3/5/2001 18:13'!\rcontentsGetz: x\r\r\tself contents: x! !\r\r!Object methodsFor: 'scripting' stamp: 'sw 3/10/2000 13:57'!\rdefaultFloatPrecisionFor: aGetSelector\r\t\"Answer a number indicating the default float precision to be used in a numeric readout for which the receiver is the model.\"\r\r\t^ 1! !\r\r!Object methodsFor: 'scripting' stamp: 'RAA 3/9/2001 17:08'!\revaluateUnloggedForSelf: aCodeString\r\r\t^Compiler evaluate:\r\t\taCodeString\r\t\tfor: self\r\t\tlogged: false! !\r\r!Object methodsFor: 'scripting' stamp: 'sw 2/6/2003 18:05'!\rmethodInterfacesForCategory: aCategorySymbol inVocabulary: aVocabulary limitClass: aLimitClass\r\n\t\"Return a list of methodInterfaces for the receiver in the given category, given a vocabulary.  aCategorySymbol is the inherent category symbol, not necessarily the wording as expressed in the vocabulary.\"\r\n\r\n\t| categorySymbol |\r\n\tcategorySymbol _ aCategorySymbol asSymbol.\r\n\r\n\t(categorySymbol == ScriptingSystem nameForInstanceVariablesCategory) ifTrue:\t\t\"user-defined instance variables\"\r\n\t\t[^ self methodInterfacesForInstanceVariablesCategoryIn: aVocabulary].\r\n\r\n\t(categorySymbol == ScriptingSystem nameForScriptsCategory) ifTrue:\t\t\t\t\t\t\"user-defined scripts\"\r\n\t\t[^ self methodInterfacesForScriptsCategoryIn: aVocabulary].\r\n\r\n\t^ (self usableMethodInterfacesIn: (aVocabulary methodInterfacesInCategory: (aVocabulary translatedWordingFor: categorySymbol) forInstance: self ofClass: self class limitClass: aLimitClass))   \"all others\"! !\r\r!Object methodsFor: 'scripting' stamp: 'sw 8/3/2001 13:54'!\rmethodInterfacesForInstanceVariablesCategoryIn: aVocabulary\r\t\"Return a collection of methodInterfaces for the instance-variables category.  The vocabulary parameter, at present anyway, is not used.  And for non-players, the method is at present vacuous in any case\"\r\r\t^  OrderedCollection new! !\r\r!Object methodsFor: 'scripting' stamp: 'sw 8/3/2001 13:53'!\rmethodInterfacesForScriptsCategoryIn: aVocabulary\r\t\"Answer a list of method interfaces for the category #scripts, as seen in a viewer or other tool.  The vocabulary argument is not presently used.  Also, at present, only Players really do anyting interesting here.\"\r\r\t^ OrderedCollection new! !\r\r!Object methodsFor: 'scripting' stamp: 'RAA 2/16/2001 19:37'!\rselfWrittenAsIll\r\r\t^self! !\r\r!Object methodsFor: 'scripting' stamp: 'RAA 2/16/2001 19:38'!\rselfWrittenAsIm\r\r\t^self! !\r\r!Object methodsFor: 'scripting' stamp: 'RAA 2/16/2001 19:37'!\rselfWrittenAsMe\r\r\t^self! !\r\r!Object methodsFor: 'scripting' stamp: 'RAA 2/16/2001 19:37'!\rselfWrittenAsMy\r\r\t^self! !\r\r!Object methodsFor: 'scripting' stamp: 'RAA 2/16/2001 19:38'!\rselfWrittenAsThis\r\r\t^self! !\r\r\r\r!Object methodsFor: 'system primitives'!\rasOop\r\t\"Primitive. Answer a SmallInteger whose value is half of the receiver's \r\tobject pointer (interpreting object pointers as 16-bit signed quantities). \r\tFail if the receiver is a SmallInteger. Essential. See Object documentation \r\twhatIsAPrimitive.\"\r\r\t<primitive: 75>\r\tself primitiveFailed! !\r\r!Object methodsFor: 'system primitives' stamp: 'di 1/9/1999 15:19'!\rbecomeForward: otherObject \r\t\"Primitive. All variables in the entire system that used to point\r\tto the receiver now point to the argument.\r\tFails if either argument is a SmallInteger.\"\r\r\t(Array with: self)\r\t\telementsForwardIdentityTo:\r\t\t\t(Array with: otherObject)! !\r\r!Object methodsFor: 'system primitives' stamp: 'zz 3/3/2004 23:53'!\rbecomeForward: otherObject copyHash: copyHash\r\t\"Primitive. All variables in the entire system that used to point to the receiver now point to the argument.\r\tIf copyHash is true, the argument's identity hash bits will be set to those of the receiver.\r\tFails if either argument is a SmallInteger.\"\r\r\t(Array with: self)\r\t\telementsForwardIdentityTo:\r\t\t\t(Array with: otherObject)\r\t\t\t\tcopyHash: copyHash! !\r\r!Object methodsFor: 'system primitives' stamp: 'sw 10/16/2000 10:59'!\rclassName\r\t\"Answer a string characterizing the receiver's class, for use in list views for example\"\r\r\t^ self class name asString! !\r\r!Object methodsFor: 'system primitives' stamp: 'sw 10/16/2000 11:04'!\rcreationStamp\r\t\"Answer a string which reports the creation particulars of the receiver.  Intended perhaps for list views, but this is presently a feature not easily accessible\"\r\r\t^ '<no creation stamp>'! !\r\r!Object methodsFor: 'system primitives'!\rinstVarAt: index \r\t\"Primitive. Answer a fixed variable in an object. The numbering of the \r\tvariables corresponds to the named instance variables. Fail if the index \r\tis not an Integer or is not the index of a fixed variable. Essential. See \r\tObject documentation whatIsAPrimitive.\"\r\r\t<primitive: 73>\r\t\"Access beyond fixed variables.\"\r\t^self basicAt: index - self class instSize\t\t! !\r\r!Object methodsFor: 'system primitives'!\rinstVarAt: anInteger put: anObject \r\t\"Primitive. Store a value into a fixed variable in the receiver. The \r\tnumbering of the variables corresponds to the named instance variables. \r\tFail if the index is not an Integer or is not the index of a fixed variable. \r\tAnswer the value stored as the result. Using this message violates the \r\tprinciple that each object has sovereign control over the storing of \r\tvalues into its instance variables. Essential. See Object documentation \r\twhatIsAPrimitive.\"\r\r\t<primitive: 74>\r\t\"Access beyond fixed fields\"\r\t^self basicAt: anInteger - self class instSize put: anObject! !\r\r!Object methodsFor: 'system primitives' stamp: 'sw 10/16/2000 11:09'!\rinstVarNamed: aString\r\t\"Return the value of the instance variable in me with that name.  Slow and unclean, but very useful. \"\r\r\t^ self instVarAt: (self class allInstVarNames indexOf: aString asString)\r\r\r! !\r\r!Object methodsFor: 'system primitives' stamp: 'sw 10/16/2000 11:10'!\rinstVarNamed: aString put: aValue\r\t\"Store into the value of the instance variable in me of that name.  Slow and unclean, but very useful. \"\r\r\t^ self instVarAt: (self class allInstVarNames indexOf: aString asString) put: aValue\r! !\r\r!Object methodsFor: 'system primitives' stamp: 'sw 10/17/2000 11:12'!\roopString\r\t\"Answer a string that represents the oop of the receiver\"\r\r\t^ self asOop printString! !\r\r!Object methodsFor: 'system primitives' stamp: 'ar 3/2/2001 01:34'!\rprimitiveChangeClassTo: anObject\r\t\"Primitive. Change the class of the receiver into the class of the argument given that the format of the receiver matches the format of the argument's class. Fail if receiver or argument are SmallIntegers, or the receiver is an instance of a compact class and the argument isn't, or when the argument's class is compact and the receiver isn't, or when the format of the receiver is different from the format of the argument's class, or when the arguments class is fixed and the receiver's size differs from the size that an instance of the argument's class should have.\r\tNote: The primitive will fail in most cases that you think might work. This is mostly because of a) the difference between compact and non-compact classes, and b) because of differences in the format. As an example, '(Array new: 3) primitiveChangeClassTo: Morph basicNew' would fail for three of the reasons mentioned above. Array is compact, Morph is not (failure #1). Array is variable and Morph is fixed (different format - failure #2). Morph is a fixed-field-only object and the array is too short (failure #3).\r\tThe facility is really provided for certain, very specific applications (mostly related to classes changing shape) and not for casual use.\"\r\r\t<primitive: 115>\r\tself primitiveFailed! !\r\r!Object methodsFor: 'system primitives'!\rsomeObject\r\t\"Primitive. Answer the first object in the enumeration of all\r\t objects.\"\r\r\t<primitive: 138>\r\tself primitiveFailed.! !\r\r\r!Object methodsFor: 'testing' stamp: 'sw 9/26/2001 11:58'!\rbasicType\r\t\"Answer a symbol representing the inherent type of the receiver\"\r\r\t^ #Object! !\r\r!Object methodsFor: 'testing' stamp: 'sw 5/3/2001 16:19'!\rbeViewed\r\t\"Open up a viewer on the receiver.  The Presenter is invited to decide just how to present this viewer\"\r\r\tself uniqueNameForReference.  \"So the viewer will have something nice to refer to\"\r\tself presenter viewObject: self! !\r\r!Object methodsFor: 'testing' stamp: 'sw 10/16/2000 11:01'!\rcostumes\r\t\"Answer a list of costumes associated with the receiver.  The appearance of this method in class Object serves only as a backstop, probably only transitionally\"\r\r\t^ nil! !\r\r!Object methodsFor: 'testing' stamp: 'sw 1/12/98 18:09'!\rhaltIfNil! !\r\r!Object methodsFor: 'testing' stamp: 'ar 7/9/1999 18:18'!\risBehavior\r\t\"Return true if the receiver is a behavior.\r\tNote: Do not override in any class except behavior.\"\r\t^false! !\r\r!Object methodsFor: 'testing' stamp: 'ajh 1/21/2003 13:15'!\risBlock\r\r\t^ false! !\r\r!Object methodsFor: 'testing' stamp: 'md 11/21/2003 12:14'!\risBlockClosure\r\r\t^ false! !\r\r!Object methodsFor: 'testing' stamp: 'ar 8/17/1999 19:43'!\risCollection\r\t\"Return true if the receiver is some sort of Collection and responds to basic collection messages such as #size and #do:\"\r\t^false! !\r\r!Object methodsFor: 'testing'!\risColor\r\t\"Answer true if receiver is a Color. False by default.\"\r\r\t^ false\r! !\r\r!Object methodsFor: 'testing' stamp: 'nk 4/17/2004 19:43'!\risColorForm\r\t^false! !\r\r!Object methodsFor: 'testing' stamp: 'md 11/21/2003 12:14'!\risCompiledMethod\r\r\t^ false! !\r\r!Object methodsFor: 'testing' stamp: 'di 11/9/1998 09:38'!\risFloat\r\t\"Overridden to return true in Float, natch\"\r\t^ false! !\r\r!Object methodsFor: 'testing' stamp: 'ar 10/30/2000 23:22'!\risForm\r\t^false! !\r\r!Object methodsFor: 'testing' stamp: 'len 1/13/98 21:18'!\risFraction\r\t\"Answer true if the receiver is a Fraction.\"\r\r\t^ false! !\r\r!Object methodsFor: 'testing' stamp: 'rhi 8/14/2003 08:51'!\risHeap\r\r\t^ false! !\r\r!Object methodsFor: 'testing'!\risInteger\r\t\"Overridden to return true in Integer.\"\r\r\t^ false! !\r\r!Object methodsFor: 'testing' stamp: 'rhi 8/12/2003 09:52'!\risInterval\r\r\t^ false! !\r\r!Object methodsFor: 'testing' stamp: 'nk 4/25/2002 08:04'!\risMessageSend\r\t^false\r! !\r\r!Object methodsFor: 'testing'!\risMorph\r\r\t^ false! !\r\r!Object methodsFor: 'testing' stamp: 'ar 9/13/2000 15:37'!\risMorphicEvent\r\t^false! !\r\r!Object methodsFor: 'testing' stamp: 'gm 2/22/2003 12:56'!\risMorphicModel\r\t\"Return true if the receiver is a morphic model\"\r\t^false\r! !\r\r!Object methodsFor: 'testing'!\risNumber\r\t\"Overridden to return true in Number, natch\"\r\t^ false! !\r\r!Object methodsFor: 'testing' stamp: 'di 11/6/1998 08:04'!\risPoint\r\t\"Overridden to return true in Point.\"\r\r\t^ false! !\r\r!Object methodsFor: 'testing' stamp: 'ikp 9/26/97 14:45'!\risPseudoContext\r\t^false! !\r\r!Object methodsFor: 'testing' stamp: 'ar 12/23/1999 15:43'!\risStream\r\t\"Return true if the receiver responds to the stream protocol\"\r\t^false\r! !\r\r!Object methodsFor: 'testing' stamp: 'sma 6/15/2000 15:48'!\risString\r\t\"Overridden to return true in String, natch\"\r\t^ false! !\r\r!Object methodsFor: 'testing' stamp: 'md 4/30/2003 15:30'!\risSymbol\r\t^ false ! !\r\r!Object methodsFor: 'testing' stamp: 'jam 3/9/2003 15:10'!\risSystemWindow\r\"answer whatever the receiver is a SystemWindow\"\r\t^ false! !\r\r!Object methodsFor: 'testing'!\risText\r\t^ false! !\r\r!Object methodsFor: 'testing' stamp: 'tk 10/21/97 12:45'!\risTransparent\r\t^ false! !\r\r!Object methodsFor: 'testing' stamp: 'ar 8/14/2001 23:19'!\risVariableBinding\r\t\"Return true if I represent a literal variable binding\"\r\t^false\r\t! !\r\r!Object methodsFor: 'testing' stamp: 'ls 7/14/1998 21:45'!\risWebBrowser\r\t\"whether this object is a web browser.  See class: Scamper\"\r\t^false! !\r\r!Object methodsFor: 'testing' stamp: 'sw 10/27/2000 06:58'!\rknownName\r\t\"If a formal name has been handed out for this object, answer it, else nil\"\r\t\r\t^ Preferences capitalizedReferences\r\t\tifTrue:\r\t\t\t[References keyAtValue: self ifAbsent: [nil]]\r\t\tifFalse:\r\t\t\t[nil]! !\r\r!Object methodsFor: 'testing' stamp: 'sw 9/27/96'!\rname\r\t\"Answer a name for the receiver.  This is used generically in the title of certain inspectors, such as the referred-to inspector, and specificially by various subsystems.  By default, we let the object just print itself out..  \"\r\r\t^ self printString! !\r\r!Object methodsFor: 'testing' stamp: 'sw 11/19/2001 13:28'!\rnameForViewer\r\t\"Answer a name to be shown in a Viewer that is viewing the receiver\"\r\r\t| aName |\r\t(aName _ self uniqueNameForReferenceOrNil) ifNotNil: [^ aName].\r\t(aName _ self knownName) ifNotNil: [^ aName].\r\r\t^ [(self asString copyWithout: Character cr) truncateTo:  27] ifError:\r\t\t[:msg :rcvr | ^ self class name printString]! !\r\r!Object methodsFor: 'testing'!\rnotNil\r\t\"Coerces nil to false and everything else to true.\"\r\r\t^true! !\r\r!Object methodsFor: 'testing' stamp: 'sw 2/27/2002 14:55'!\rrenameTo: newName\r\t\"If the receiver has an inherent idea about its own name, it should take action here.  Any object that might be pointed to in the References dictionary might get this message sent to it upon reload\"! !\r\r!Object methodsFor: 'testing' stamp: 'sw 1/18/2001 13:43'!\rshowDiffs\r\t\"Answer whether the receiver, serving as the model of a text-bearing entity, is 'showing differences' -- if it is, the editor may wish to show special feedback\"\r\r\t^ false! !\r\r!Object methodsFor: 'testing' stamp: 'sw 10/20/1999 14:52'!\rstepAt: millisecondClockValue in: aWindow\r\r\t^ self stepIn: aWindow! !\r\r!Object methodsFor: 'testing' stamp: 'sw 10/19/1999 08:16'!\rstepIn: aWindow\r\r\t^ self step! !\r\r!Object methodsFor: 'testing' stamp: 'sw 10/19/1999 08:21'!\rstepTime\r\t\r\t^ 1000 \"milliseconds -- default backstop for objects serving as models of system windows\"! !\r\r!Object methodsFor: 'testing' stamp: 'sw 10/19/1999 08:22'!\rstepTimeIn: aSystemWindow\r\t\r\t^ 1000 \"milliseconds -- default backstop for objects serving as models of system windows\"! !\r\r!Object methodsFor: 'testing' stamp: 'sw 5/3/2001 18:22'!\rvocabularyDemanded\r\t\"Answer a vocabulary that the receiver insists be used when it is looked at in a Viewer.  This allows specific classes to insist on specific custom vocabularies\"\r\r\t^ nil! !\r\r!Object methodsFor: 'testing' stamp: 'sw 11/13/2001 07:26'!\rwantsDiffFeedback\r\t\"Answer whether the receiver, serving as the model of a text-bearing entity, would like for 'diffs' green pane-border feedback to be shown\"\r\r\t^ false! !\r\r!Object methodsFor: 'testing' stamp: 'di 1/8/1999 15:04'!\rwantsSteps\r\t\"Overridden by morphic classes whose instances want to be stepped,\r\tor by model classes who want their morphic views to be stepped.\"\r\r\t^ false! !\r\r!Object methodsFor: 'testing' stamp: 'sw 10/19/1999 08:26'!\rwantsStepsIn: aSystemWindow\r\t\r\t^ self wantsSteps! !\r\r\r!Object methodsFor: 'translation support'!\rinline: inlineFlag\r\t\"For translation only; noop when running in Smalltalk.\"! !\r\r!Object methodsFor: 'translation support'!\rvar: varSymbol declareC: declString\r\t\"For translation only; noop when running in Smalltalk.\"! !\r\r\r!Object methodsFor: 'undo' stamp: 'di 9/11/2000 20:32'!\rcapturedState\r\t\"May be overridden in subclasses.\"\r\r\t^ self shallowCopy\r! !\r\r!Object methodsFor: 'undo' stamp: 'di 9/12/2000 08:15'!\rredoFromCapturedState: st \r\t\"May be overridden in subclasses.  See also capturedState\"\r\r\tself undoFromCapturedState: st  \"Simple cases are symmetric\"\r! !\r\r!Object methodsFor: 'undo' stamp: 'sw 11/16/2000 14:42'!\rrefineRedoTarget: target selector: aSymbol arguments: arguments in: refineBlock \r\t\"Any object can override this method to refine its redo specification\"\r\r\t^ refineBlock\r\t\tvalue: target\r\t\tvalue: aSymbol\r\t\tvalue: arguments! !\r\r!Object methodsFor: 'undo' stamp: 'sw 11/16/2000 14:42'!\rrefineUndoTarget: target selector: aSymbol arguments: arguments in: refineBlock \r\t\"Any object can override this method to refine its undo specification\"\r\r\t^ refineBlock\r\t\tvalue: target\r\t\tvalue: aSymbol\r\t\tvalue: arguments! !\r\r!Object methodsFor: 'undo' stamp: 'di 9/11/2000 20:32'!\rundoFromCapturedState: st \r\t\"May be overridden in subclasses.  See also capturedState\"\r\r\tself copyFrom: st\r! !\r\r\r!Object methodsFor: 'updating'!\rchanged\r\t\"Receiver changed in a general way; inform all the dependents by \r\tsending each dependent an update: message.\"\r\r\tself changed: self! !\r\r!Object methodsFor: 'updating'!\rchanged: aParameter \r\t\"Receiver changed. The change is denoted by the argument aParameter. \r\tUsually the argument is a Symbol that is part of the dependent's change \r\tprotocol. Inform all of the dependents.\"\r\r\tself dependents do: [:aDependent | aDependent update: aParameter]! !\r\r!Object methodsFor: 'updating' stamp: 'nk 2/17/2004 11:12'!\rchanged: anAspect with: anObject\r\t\"Receiver changed. The change is denoted by the argument anAspect. \r\tUsually the argument is a Symbol that is part of the dependent's change \r\tprotocol. Inform all of the dependents. Also pass anObject for additional information.\"\r\r\tself dependents do: [:aDependent | aDependent update: anAspect with: anObject]! !\r\r!Object methodsFor: 'updating' stamp: 'sw 10/12/1999 18:15'!\rhandledListVerification\r\t\"When a self-updating PluggableListMorph lazily checks to see the state of affairs, it first gives its model an opportunity to handle the list verification itself (this is appropriate for some models, such as VersionsBrowser); if a list's model has indeed handled things itself, it returns true here\"\r\r\t^ false! !\r\r!Object methodsFor: 'updating' stamp: 'sw 10/31/1999 00:15'!\rnoteSelectionIndex: anInteger for: aSymbol\r\t\"backstop\"! !\r\r!Object methodsFor: 'updating'!\rokToChange\r\t\"Allows a controller to ask this of any model\"\r\t^ true! !\r\r!Object methodsFor: 'updating' stamp: 'sma 2/29/2000 20:05'!\rupdate: aParameter \r\t\"Receive a change notice from an object of whom the receiver is a \r\tdependent. The default behavior is to do nothing; a subclass might want \r\tto change itself in some way.\"\r\r\t^ self! !\r\r!Object methodsFor: 'updating' stamp: 'nk 2/17/2004 11:13'!\rupdate: anAspect with: anObject\r\t\"Receive a change notice from an object of whom the receiver is a \r\tdependent. The default behavior is to call update:,\r\twhich by default does nothing; a subclass might want \r\tto change itself in some way.\"\r\r\t^ self update: anAspect! !\r\r!Object methodsFor: 'updating' stamp: 'sw 10/19/1999 14:39'!\rupdateListsAndCodeIn: aWindow\r\tself canDiscardEdits ifFalse: [^ self].\r\taWindow updatablePanes do: [:aPane | aPane verifyContents]! !\r\r!Object methodsFor: 'updating' stamp: 'jm 8/20/1998 18:26'!\rwindowIsClosing\r\t\"This message is used to inform a models that its window is closing. Most models do nothing, but some, such as the Debugger, must do some cleanup. Note that this mechanism must be used with care by models that support multiple views, since one view may be closed while others left open.\"\r! !\r\r\r!Object methodsFor: 'user interface' stamp: 'sw 10/4/1999 08:13'!\raddModelItemsToWindowMenu: aMenu\r\t\"aMenu is being constructed to be presented to the user in response to the user's pressing on the menu widget in the title bar of a morphic window.  Here, the model is given the opportunity to add any model-specific items to the menu, whose default target is the SystemWindow itself.\"! !\r\r!Object methodsFor: 'user interface' stamp: 'sw 10/5/1998 14:39'!\raddModelMenuItemsTo: aCustomMenu forMorph: aMorph hand: aHandMorph \r\t\"The receiver serves as the model for aMorph; a menu is being constructed for the morph, and here the receiver is able to add its own items\"\r! !\r\r!Object methodsFor: 'user interface' stamp: 'sma 11/12/2000 11:43'!\rasExplorerString\r\t^ self printString! !\r\r!Object methodsFor: 'user interface' stamp: 'gk 2/24/2004 08:49'!\rbeep\r\t\"Deprecated.\"\r\t\r\tself deprecated: 'Use Beeper class>>beep instead.'.\r\tBeeper beep! !\r\r!Object methodsFor: 'user interface' stamp: 'sw 7/13/1999 15:53'!\rdefaultBackgroundColor\r\t\"Answer the color to be used as the base window color for a window whose model is an object of the receiver's class\"\r\t\r\t^ Preferences windowColorFor: self class name! !\r\r!Object methodsFor: 'user interface'!\rdefaultLabelForInspector\r\t\"Answer the default label to be used for an Inspector window on the receiver.\"\r\r\t^ self class name! !\r\r!Object methodsFor: 'user interface' stamp: 'sw 8/15/97 17:25'!\rfullScreenSize\r\t\"Answer the size to which a window displaying the receiver should be set\"\r\t| adj |\r\tadj _ (3 * Preferences scrollBarWidth) @ 0.\r\t^ Rectangle origin: adj extent: (DisplayScreen actualScreenSize - adj)! !\r\r!Object methodsFor: 'user interface' stamp: 'RAA 6/21/1999 11:27'!\rhasContentsInExplorer\r\r\t^self basicSize > 0 or: [self class allInstVarNames isEmpty not]\r! !\r\r!Object methodsFor: 'user interface' stamp: 'sma 5/28/2000 15:59'!\rinform: aString\r\t\"Display a message for the user to read and then dismiss. 6/9/96 sw\"\r\r\taString isEmptyOrNil ifFalse: [PopUpMenu inform: aString]! !\r\r!Object methodsFor: 'user interface'!\rinitialExtent\r\t\"Answer the desired extent for the receiver when a view on it is first opened on the screen. \r\t5/22/96 sw: in the absence of any override, obtain from RealEstateAgent\"\r\r\t^ RealEstateAgent standardWindowExtent! !\r\r!Object methodsFor: 'user interface'!\rinspectWithLabel: aLabel\r\tInspector openOn: self withEvalPane: true withLabel: aLabel! !\r\r!Object methodsFor: 'user interface' stamp: 'sw 6/12/2001 11:09'!\rlaunchPartVia: aSelector\r\t\"Obtain a morph by sending aSelector to self, and attach it to the morphic hand.  This provides a general protocol for parts bins\"\r\r\t| aMorph |\r\taMorph _ self perform: aSelector.\r\taMorph setProperty: #beFullyVisibleAfterDrop toValue: true.\r\taMorph openInHand! !\r\r!Object methodsFor: 'user interface' stamp: 'ar 12/14/2001 20:08'!\rlaunchPartVia: aSelector label: aString\r\t\"Obtain a morph by sending aSelector to self, and attach it to the morphic hand.  This provides a general protocol for parts bins\"\r\r\t| aMorph |\r\taMorph _ self perform: aSelector.\r\taMorph setNameTo: aString.\r\taMorph setProperty: #beFullyVisibleAfterDrop toValue: true.\r\taMorph openInHand! !\r\r!Object methodsFor: 'user interface' stamp: 'di 5/11/1999 22:26'!\rmodelSleep\r\t\"A window with me as model is being exited or collapsed or closed.\r\tDefault response is no-op\" ! !\r\r!Object methodsFor: 'user interface' stamp: 'di 5/11/1999 22:01'!\rmodelWakeUp\r\t\"A window with me as model is being entered or expanded.  Default response is no-op\" ! !\r\r!Object methodsFor: 'user interface' stamp: 'sw 10/16/1999 22:45'!\rmodelWakeUpIn: aWindow\r\t\"A window with me as model is being entered or expanded.  Default response is no-op\" \r\tself modelWakeUp! !\r\r!Object methodsFor: 'user interface' stamp: 'sw 3/8/1999 15:27'!\rmouseUpBalk: evt\r\t\"A button I own got a mouseDown, but the user moved out before letting up.  Certain kinds of objects (so-called 'radio buttons', for example, and other structures that must always have some selection, e.g. PaintBoxMorph) wish to take special action in this case; this default does nothing.\"\r! !\r\r!Object methodsFor: 'user interface' stamp: 'jcg 11/1/2001 13:13'!\rnotYetImplemented\r\tself inform: 'Not yet implemented (', thisContext sender printString, ')'! !\r\r!Object methodsFor: 'user interface' stamp: 'di 6/10/1998 15:06'!\rwindowActiveOnFirstClick\r\t\"Return true if my window should be active on first click.\"\r\r\t^ false! !\r\r!Object methodsFor: 'user interface' stamp: 'di 6/10/1998 15:06'!\rwindowReqNewLabel: labelString\r\t\"My window's title has been edited.\r\tReturn true if this is OK, and override for further behavior.\"\r\r\t^ true! !\r\r\r!Object methodsFor: 'viewer' stamp: 'sw 10/16/2000 10:35'!\rassureUniClass\r\t\"If the receiver is not yet an instance of a uniclass, create a uniclass for it and make the receiver become an instance of that class.\"\r\r\t| anInstance |\r\tself belongsToUniClass ifTrue: [^ self].\r\tanInstance _ self class instanceOfUniqueClass.\r\tself become: (self as: anInstance class).\r\t^ anInstance! !\r\r!Object methodsFor: 'viewer' stamp: 'sw 10/16/2000 10:41'!\rbelongsToUniClass\r\t\"Answer whether the receiver belongs to a uniclass.  For the moment (this is not entirely satisfactory) this is precisely equated with the classname ending in a digit\"\r\r\t^ self class name endsWithDigit! !\r\r!Object methodsFor: 'viewer' stamp: 'sw 12/11/2000 15:37'!\rbrowseOwnClassSubProtocol\r\t\"Open up a ProtocolBrowser on the subprotocol of the receiver\"\r\r\tProtocolBrowser openSubProtocolForClass: self class\r! !\r\r!Object methodsFor: 'viewer' stamp: 'sw 8/3/2001 22:08'!\rcategoriesForVocabulary: aVocabulary limitClass: aLimitClass\r\t\"Answer a list of categories of methods for the receiver when using the given vocabulary, given that one considers only methods that are implemented not further away than aLimitClass\"\r\r\t^ aVocabulary categoryListForInstance: self ofClass: self class limitClass: aLimitClass! !\r\r!Object methodsFor: 'viewer' stamp: 'sw 10/25/2000 07:20'!\rchooseNewNameForReference\r\t\"Offer an opportunity for the receiver, presumed already to be known in the References registry, to be renamed\"\r\r\t|  nameSym current newName |\r\tcurrent _ References keyAtValue: self ifAbsent: [^ self error: 'not found in References'].\r\r\tnewName _ FillInTheBlank request: 'Please enter new name' initialAnswer: current.\r\t\"Want to user some better way of determining the validity of the chosen identifier, and also want to give more precise diagnostic if the string the user types in is not acceptable.  Work to be done here.\"\r\r\tnewName isEmpty ifTrue: [^ nil].\r\t((Scanner isLiteralSymbol: newName) and: [(newName includes: $:) not])\r\t\tifTrue:\r\t\t\t[nameSym _ newName capitalized asSymbol.\r\t\t\t(((References includesKey:  nameSym) not and:\r\t\t\t\t[(Smalltalk includesKey: nameSym) not]) and:\r\t\t\t\t\t\t[(ScriptingSystem allKnownClassVariableNames includes: nameSym) not])\r\t\t\t\t\tifTrue:\r\t\t\t\t\t\t[(References associationAt: current) key: nameSym.\r\t\t\t\t\t\tReferences rehash.\r\t\t\t\t\t\t^ nameSym]].\r\tself inform: 'Sorry, that name is not available.'.\r\t^ nil! !\r\r!Object methodsFor: 'viewer' stamp: 'sw 2/14/2000 14:24'!\rdefaultNameStemForInstances\r\t\"Answer a basis for names of default instances of the receiver.  The default is to let the class specify, but certain instances will want to override.  (PasteUpMorphs serving as Worlds come to mind\"\r\r\t^ self class defaultNameStemForInstances! !\r\r!Object methodsFor: 'viewer' stamp: 'sw 5/22/2001 16:53'!\relementTypeFor: aStringOrSymbol vocabulary: aVocabulary\r\t\"Answer a symbol characterizing what kind of element aStringOrSymbol represents.  Realistically, at present, this always just returns #systemScript; a prototyped but not-incorporated architecture supported use of a leading colon to characterize an inst var of a system class, and for the moment we still see its remnant here.\"\r\r\tself flag: #deferred.  \"a loose end in the non-player case\"\r\t^ #systemScript! !\r\r!Object methodsFor: 'viewer' stamp: 'sw 5/4/2001 07:04'!\rexternalName\r\t\"Answer an external name by which the receiver is known.  Generic implementation here is a transitional backstop. probably\"\r\r\t^ self nameForViewer! !\r\r!Object methodsFor: 'viewer' stamp: 'sw 5/4/2001 07:06'!\rgraphicForViewerTab\r\t\"When a Viewer is open on the receiver, its tab needs some graphic to show to the user.  Answer a form or a morph to serve that purpose.  A generic image is used for arbitrary objects, but note my reimplementors\"\r\t\r\t^ ScriptingSystem formAtKey: 'Image'! !\r\r!Object methodsFor: 'viewer' stamp: 'sw 5/4/2001 07:08'!\rhasUserDefinedSlots\r\t\"Answer whether the receiver has any user-defined slots, in the omniuser sense of the term.  This is needed to allow Viewers to look at any object, not just at Players.\"\r\r\t^ false! !\r\r!Object methodsFor: 'viewer' stamp: 'sw 9/26/2001 11:58'!\rinitialTypeForSlotNamed: aName\r\t\"Answer the initial type to be ascribed to the given instance variable\"\r\r\t^ #Object! !\r\r!Object methodsFor: 'viewer' stamp: 'ar 5/26/2001 16:13'!\risPlayerLike\r\t\"Return true if the receiver is a player-like object\"\r\t^false! !\r\r!Object methodsFor: 'viewer' stamp: 'sw 10/24/2000 11:36'!\rnewScriptorAround: aPhraseTileMorph\r\t\"Sprout a scriptor around aPhraseTileMorph, thus making a new script.  This is where generalized scriptors will be threaded in\"\r\r\t^ nil! !\r\r!Object methodsFor: 'viewer' stamp: 'sw 1/22/2001 15:20'!\rrenameScript: oldSelector\r\t\"prompt the user for a new selector and apply it.  Presently only works for players\"\r\r\tself notYetImplemented! !\r\r!Object methodsFor: 'viewer' stamp: 'sw 10/17/2000 11:27'!\runiqueInstanceVariableNameLike: aString excluding: takenNames\r\t\"Answer a nice instance-variable name to be added to the receiver which resembles aString, making sure it does not coincide with any element in takenNames\"\r\r\t| okBase uniqueName usedNames |\r\tusedNames _ self class allInstVarNamesEverywhere.\r\tusedNames removeAllFoundIn: self class instVarNames.\r\tusedNames addAll: takenNames.\r\tokBase _ Utilities wellFormedInstanceVariableNameFrom: aString.\r\r\tuniqueName _ Utilities keyLike: okBase satisfying: \r\t\t[:aKey | (usedNames includes: aKey) not].\r\r\t^ uniqueName! !\r\r!Object methodsFor: 'viewer' stamp: 'sw 11/21/2001 15:16'!\runiqueNameForReference\r\t\"Answer a nice name by which the receiver can be referred to by other objects.  At present this uses a global References dictionary to hold the database of references, but in due course this will need to acquire some locality\"\r\r\t| aName nameSym stem knownClassVars |\r\t(aName _ self uniqueNameForReferenceOrNil) ifNotNil: [^ aName].\r\t(stem _ self knownName) ifNil:\r\t\t[stem _ self defaultNameStemForInstances asString].\r\tstem _ stem select: [:ch | ch isLetter or: [ch isDigit]].\r\tstem size == 0 ifTrue: [stem _ 'A'].\r\tstem first isLetter ifFalse:\r\t\t[stem _ 'A', stem].\r\tstem _ stem capitalized.\r\tknownClassVars _ ScriptingSystem allKnownClassVariableNames.\r\taName _ Utilities keyLike:  stem satisfying:\r\t\t[:jinaLake |\r\t\t\tnameSym _ jinaLake asSymbol.\r\t\t\t ((References includesKey:  nameSym) not and:\r\t\t\t\t[(Smalltalk includesKey: nameSym) not]) and:\r\t\t\t\t\t\t[(knownClassVars includes: nameSym) not]].\r\r\tReferences at: (aName _ aName asSymbol) put: self.\r\t^ aName! !\r\r!Object methodsFor: 'viewer' stamp: 'sw 3/15/2004 23:53'!\runiqueNameForReferenceFrom: proposedName\r\t\"Answer a satisfactory symbol, similar to the proposedName but obeying the rules, to represent the receiver\"\r\r\t| aName nameSym stem okay |\r\tproposedName = self uniqueNameForReferenceOrNil \r\t\tifTrue: [^ proposedName].  \"No change\"\r\r\tstem _ proposedName select: [:ch | ch isLetter or: [ch isDigit]].\r\tstem size == 0 ifTrue: [stem _ 'A'].\r\tstem first isLetter ifFalse:\r\t\t[stem _ 'A', stem].\r\tstem _ stem capitalized.\r\taName _ Utilities keyLike: stem satisfying:\r\t\t[:jinaLake |\r\t\t\tnameSym _ jinaLake asSymbol.\r\t\t\tokay _ true.\r\t\t\tself class scopeHas: nameSym ifTrue: [:x | okay _ false \"don't use it\"].\r\t\t\tokay].\r\t^ aName asSymbol! !\r\r!Object methodsFor: 'viewer' stamp: 'sw 3/15/2004 23:01'!\runiqueNameForReferenceOrNil\r\t\"If the receiver has a unique name for reference, return it here, else return nil\"\r\r\t^ References keyAtValue: self ifAbsent: [nil]! !\r\r!Object methodsFor: 'viewer' stamp: 'ar 5/16/2001 01:40'!\rupdateThresholdForGraphicInViewerTab\r\t\"When a Viewer is open on the receiver, its tab needs some graphic to show to the user. Computing this graphic can take quite some time so we want to make the update frequency depending on how long it takes to compute the thumbnail. The threshold returned by this method defines that the viewer will update at most every 'threshold * timeItTakesToDraw' milliseconds. Thus, if the time for computing the receiver's thumbnail is 200 msecs and the the threshold is 10, the viewer will update at most every two seconds.\"\r\t^20 \"seems to be a pretty good general choice\"! !\r\r!Object methodsFor: 'viewer' stamp: 'sw 3/9/2001 13:48'!\rusableMethodInterfacesIn: aListOfMethodInterfaces\r\t\"Filter aList, returning a subset list of apt phrases\"\r\r\t^ aListOfMethodInterfaces\r! !\r\r\r\r!Object methodsFor: 'private'!\rerrorImproperStore\r\t\"Create an error notification that an improper store was attempted.\"\r\r\tself error: 'Improper store into indexable object'! !\r\r!Object methodsFor: 'private'!\rerrorNonIntegerIndex\r\t\"Create an error notification that an improper object was used as an index.\"\r\r\tself error: 'only integers should be used as indices'! !\r\r!Object methodsFor: 'private' stamp: 'yo 6/29/2004 11:37'!\rerrorNotIndexable\r\t\"Create an error notification that the receiver is not indexable.\"\r\r\tself error: ('Instances of {1} are not indexable' translated format: {self class name})! !\r\r!Object methodsFor: 'private'!\rerrorSubscriptBounds: index \r\t\"Create an error notification that an improper integer was used as an index.\"\r\r\tself error: 'subscript is out of bounds: ' , index printString! !\r\r!Object methodsFor: 'private' stamp: 'BG 10/28/2003 21:01'!\rprimitiveError: aString \r\t\"This method is called when the error handling results in a recursion in \r\tcalling on error: or halt or halt:.\"\r\r\t| context |\r\tSensor eventQueue: nil. \"Or else we won't get keyboard and possibly run out of memory\"\r\t(String\r\t\tstreamContents: \r\t\t\t[:s |\r\t\t\ts nextPutAll: '***System error handling failed***'.\r\t\t\ts cr; nextPutAll: aString.\r\t\t\tcontext _ thisContext sender sender.\r\t\t\t20 timesRepeat: [context == nil ifFalse: [s cr; print: (context _ context sender)]].\r\t\t\ts cr; nextPutAll: '-------------------------------'.\r\t\t\ts cr; nextPutAll: 'Type CR to enter an emergency evaluator.'.\r\t\t\ts cr; nextPutAll: 'Type any other character to restart.'])\r\t\tdisplayAt: 0 @ 0.\r\t[Sensor keyboardPressed] whileFalse.\r\tSensor keyboard = Character cr ifTrue: [Transcripter emergencyEvaluator].\r\tSmalltalk isMorphic\r\t\tifFalse: [ScheduledControllers searchForActiveController]! !\r\r!Object methodsFor: 'private'!\rspecies\r\t\"Answer the preferred class for reconstructing the receiver.  For example, \r\tcollections create new collections whenever enumeration messages such as \r\tcollect: or select: are invoked.  The new kind of collection is determined by \r\tthe species of the original collection.  Species and class are not always the \r\tsame.  For example, the species of Interval is Array.\"\r\r\t^self class! !\r\r!Object methodsFor: 'private'!\rstoreAt: offset inTempFrame: aContext\r\t\"This message had to get sent to an expression already on the stack\r\tas a Block argument being accessed by the debugger.\r\tJust re-route it to the temp frame.\"\r\t^ aContext tempAt: offset put: self! !\r\r\r!Object methodsFor: '*system-support' stamp: 'dvf 8/23/2003 12:27'!\rsystemNavigation\r\r\t^ SystemNavigation default! !\r\r\r!Object methodsFor: 'Breakpoint' stamp: 'bkv 7/1/2003 12:33'!\rbreak\r\n\t\"This is a simple message to use for inserting breakpoints during debugging.\r\n\tThe debugger is opened by sending a signal. This gives a chance to restore\r\n\tinvariants related to multiple processes.\"\r\n\r\n\tBreakPoint signal.\r\n\r\n\t\"nil break.\"! !\r\r\r!Object methodsFor: 'inspecting' stamp: 'ajh 1/31/2003 15:49'!\rbasicInspect\r\t\"Create and schedule an Inspector in which the user can examine the \r\treceiver's variables. This method should not be overriden.\"\r\r\tBasicInspector openOn: self withEvalPane: false! !\r\r!Object methodsFor: 'inspecting' stamp: 'ajh 2/3/2003 19:19'!\rinspect\r\t\"Create and schedule an Inspector in which the user can examine the receiver's variables.\"\r\r\tself inspectorClass openOn: self withEvalPane: true! !\r\r!Object methodsFor: 'inspecting' stamp: 'ajh 2/3/2003 19:18'!\rinspectorClass\r\r\t^ Inspector! !\r\r\r!Object methodsFor: '*sunit-preload' stamp: 'jp 3/17/2003 09:58'!\rsunitAddDependent: anObject\r \r        self addDependent: anObject! !\r\r!Object methodsFor: '*sunit-preload' stamp: 'jp 3/17/2003 09:58'!\rsunitChanged: anAspect\r \r        self changed: anAspect! !\r\r!Object methodsFor: '*sunit-preload' stamp: 'jp 3/17/2003 09:58'!\rsunitRemoveDependent: anObject\r \r        self removeDependent: anObject! !\r\r\r!Object methodsFor: '*tools-browser' stamp: 'mu 3/6/2004 15:13'!\rbrowse\r\tself systemNavigation browseClass: self class! !\r\r!Object methodsFor: '*tools-browser' stamp: 'mu 3/11/2004 16:00'!\rbrowseHierarchy\r\tself systemNavigation browseHierarchy: self class! !\r\r\r!Object methodsFor: 'debugging' stamp: 'ssa 8/8/2008 17:25'!\rprint\r\r\tTranscript cr;show: self printString! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rObject class\r\tinstanceVariableNames: ''!\r\r!Object class methodsFor: 'instance creation' stamp: 'sw 1/23/2003 09:45'!\rcategoryForUniclasses\r\n\t\"Answer the default system category into which to place unique-class instances\"\r\n\r\n\t^ 'UserObjects'! !\r\r!Object class methodsFor: 'instance creation' stamp: 'sw 7/28/97 15:56'!\rchooseUniqueClassName\r\t| i className |\r\ti _ 1.\r\t[className _ (self name , i printString) asSymbol.\r\t Smalltalk includesKey: className]\r\t\twhileTrue: [i _ i + 1].\r\t^ className! !\r\r!Object class methodsFor: 'instance creation' stamp: 'tk 8/22/1998 08:22'!\rinitialInstance\r\t\"Answer the first instance of the receiver, generate an error if there is one already\"\r\t\"self instanceCount > 0 ifTrue: [self error: 'instance(s) already exist.'].\"\r\t\t\"Debugging test that is very slow\"\r\t^ self new! !\r\r!Object class methodsFor: 'instance creation' stamp: 'sw 5/5/2000 09:30'!\rinitializedInstance\r\t^ self new! !\r\r!Object class methodsFor: 'instance creation' stamp: 'sw 10/16/2000 10:58'!\rinstanceOfUniqueClass\r\t\"Answer an instance of a unique subclass of the receiver\"\r\r\t^ self instanceOfUniqueClassWithInstVarString: '' andClassInstVarString: ''! !\r\r!Object class methodsFor: 'instance creation' stamp: 'tk 8/22/1998 08:27'!\rinstanceOfUniqueClassWithInstVarString: instVarString andClassInstVarString: classInstVarString\r\t\"Create a unique class for the receiver, and answer an instance of it\"\r\r\t^ (self newUniqueClassInstVars: instVarString \r\t\tclassInstVars: classInstVarString) initialInstance! !\r\r!Object class methodsFor: 'instance creation' stamp: 'sw 10/23/1999 22:51'!\risUniClass\r\t^ false! !\r\r!Object class methodsFor: 'instance creation' stamp: 'ajh 5/23/2002 00:35'!\rnewFrom: aSimilarObject\r\t\"Create an object that has similar contents to aSimilarObject.\r\tIf the classes have any instance varaibles with the same names, copy them across.\r\tIf this is bad for a class, override this method.\"\r\r\t^ (self isVariable\r\t\tifTrue: [self basicNew: aSimilarObject basicSize]\r\t\tifFalse: [self basicNew]\r\t  ) copySameFrom: aSimilarObject! !\r\r!Object class methodsFor: 'instance creation' stamp: 'tk 6/29/1998 12:11'!\rnewUniqueClassInstVars: instVarString classInstVars: classInstVarString\r\t\"Create a unique class for the receiver\"\r\r\t| aName aClass |\r\tself isSystemDefined ifFalse:\r\t\t[^ superclass newUniqueClassInstVars: instVarString classInstVars: classInstVarString].\r\taName _ self chooseUniqueClassName.\r\taClass _ self subclass: aName instanceVariableNames: instVarString \r\t\tclassVariableNames: '' poolDictionaries: '' category: self categoryForUniclasses.\r\tclassInstVarString size > 0 ifTrue:\r\t\t[aClass class instanceVariableNames: classInstVarString].\r\t^ aClass! !\r\r!Object class methodsFor: 'instance creation' stamp: 'sw 7/28/97 15:56'!\rnewUserInstance\r\t\"Answer an instance of an appropriate class to serve as a user object in the containment hierarchy\"\r\r\t^ self instanceOfUniqueClass! !\r\r!Object class methodsFor: 'instance creation' stamp: 'tk 4/20/1999 15:46'!\rreadCarefullyFrom: textOrString\r\t\"Create an object based on the contents of textOrString.  Return an error instead of putting up a SyntaxError window.\"\r\r\t| object ok |\r\tok _ (textOrString isKindOf: Stream) or: [textOrString isKindOf: String].\r\t(ok or: [textOrString isKindOf: Text]) ifFalse: [^ self error: 'expected String or Text'].\r\tobject _ Compiler evaluate: textOrString for: nil \r\t\t\t\tnotifying: #error: \"signal we want errors\" logged: false.\r\t(object isKindOf: self) ifFalse: [self error: self name, ' expected'].\r\t^object! !\r\r!Object class methodsFor: 'instance creation' stamp: 'tk 4/18/1999 07:05'!\rreadFrom: aStream\r\t\"Create an object based on the contents of aStream.\"\r\r\t| object ok |\r\tok _ (aStream isKindOf: Stream) or: [aStream isKindOf: String].\r\t(ok or: [aStream isKindOf: Text]) ifFalse: [^ self error: 'expected String or Text'].\r\tobject _ Compiler evaluate: aStream.\r\t(object isKindOf: self) ifFalse: [self error: self name, ' expected'].\r\t^object! !\r\r\r!Object class methodsFor: 'documentation'!\rhowToModifyPrimitives\r\t\"You are allowed to write methods which specify primitives, but please use \r\tcaution.  If you make a subclass of a class which contains a primitive method, \r\tthe subclass inherits the primitive.  The message which is implemented \r\tprimitively may be overridden in the subclass (E.g., see at:put: in String's \r\tsubclass Symbol).  The primitive behavior can be invoked using super (see \r\tSymbol string:). \r\t \r\tA class which attempts to mimic the behavior of another class without being \r\tits subclass may or may not be able to use the primitives of the original class.  \r\tIn general, if the instance variables read or written by a primitive have the \r\tsame meanings and are in the same fields in both classes, the primitive will \r\twork.  \r\r\tFor certain frequently used 'special selectors', the compiler emits a \r\tsend-special-selector bytecode instead of a send-message bytecode.  \r\tSpecial selectors were created because they offer two advantages.  Code \r\twhich sends special selectors compiles into fewer bytes than normal.  For \r\tsome pairs of receiver classes and special selectors, the interpreter jumps \r\tdirectly to a primitive routine without looking up the method in the class.  \r\tThis is much faster than a normal message lookup. \r\t \r\tA selector which is a special selector solely in order to save space has a \r\tnormal behavior.  Methods whose selectors are special in order to \r\tgain speed contain the comment, 'No Lookup'.  When the interpreter \r\tencounters a send-special-selector bytecode, it checks the class of the \r\treceiver and the selector.  If the class-selector pair is a no-lookup pair, \r\tthen the interpreter swiftly jumps to the routine which implements the \r\tcorresponding primitive.  (A special selector whose receiver is not of the \r\tright class to make a no-lookup pair, is looked up normally).  The pairs are \r\tlisted below.  No-lookup methods contain a primitive number specification, \r\t<primitive: xx>, which is redundant.  Since the method is not normally looked \r\tup, deleting the primitive number specification cannot prevent this \r\tprimitive from running.  If a no-lookup primitive fails, the method is looked \r\tup normally, and the expressions in it are executed. \r\t \r\tNo Lookup pairs of (class, selector) \r\t \r\tSmallInteger with any of\t\t+ - * /  \\\\  bitOr: bitShift: bitAnd:  // \r\tSmallInteger with any of\t\t=  ~=  >  <  >=  <= \r\tAny class with\t\t\t\t\t== \r\tAny class with \t\t\t\t\t@ \r\tPoint with either of\t\t\t\tx y \r\tContextPart with\t\t\t\t\tblockCopy: \r\tBlockContext with either of \t\tvalue value:\r\t\"\r\r\tself error: 'comment only'! !\r\r!Object class methodsFor: 'documentation'!\rwhatIsAPrimitive\r\t\"Some messages in the system are responded to primitively. A primitive   \r\tresponse is performed directly by the interpreter rather than by evaluating   \r\texpressions in a method. The methods for these messages indicate the   \r\tpresence of a primitive response by including <primitive: xx> before the   \r\tfirst expression in the method.   \r\t  \r\tPrimitives exist for several reasons. Certain basic or 'primitive' \r\toperations cannot be performed in any other way. Smalltalk without \r\tprimitives can move values from one variable to another, but cannot add two \r\tSmallIntegers together. Many methods for arithmetic and comparison \r\tbetween numbers are primitives. Some primitives allow Smalltalk to \r\tcommunicate with I/O devices such as the disk, the display, and the keyboard. \r\tSome primitives exist only to make the system run faster; each does the same \r\tthing as a certain Smalltalk method, and its implementation as a primitive is \r\toptional.  \r\t  \r\tWhen the Smalltalk interpreter begins to execute a method which specifies a \r\tprimitive response, it tries to perform the primitive action and to return a \r\tresult. If the routine in the interpreter for this primitive is successful, \r\tit will return a value and the expressions in the method will not be evaluated. \r\tIf the primitive routine is not successful, the primitive 'fails', and the \r\tSmalltalk expressions in the method are executed instead. These \r\texpressions are evaluated as though the primitive routine had not been \r\tcalled.  \r\t  \r\tThe Smalltalk code that is evaluated when a primitive fails usually \r\tanticipates why that primitive might fail. If the primitive is optional, the \r\texpressions in the method do exactly what the primitive would have done (See \r\tNumber @). If the primitive only works on certain classes of arguments, the \r\tSmalltalk code tries to coerce the argument or appeals to a superclass to find \r\ta more general way of doing the operation (see SmallInteger +). If the \r\tprimitive is never supposed to fail, the expressions signal an error (see \r\tSmallInteger asFloat).  \r\t  \r\tEach method that specifies a primitive has a comment in it. If the primitive is \r\toptional, the comment will say 'Optional'. An optional primitive that is not \r\timplemented always fails, and the Smalltalk expressions do the work \r\tinstead.  \r\t \r\tIf a primitive is not optional, the comment will say, 'Essential'. Some \r\tmethods will have the comment, 'No Lookup'. See Object \r\thowToModifyPrimitives for an explanation of special selectors which are \r\tnot looked up.  \r\t  \r\tFor the primitives for +, -, *, and bitShift: in SmallInteger, and truncated \r\tin Float, the primitive constructs and returns a 16-bit \r\tLargePositiveInteger when the result warrants it. Returning 16-bit \r\tLargePositiveIntegers from these primitives instead of failing is \r\toptional in the same sense that the LargePositiveInteger arithmetic \r\tprimitives are optional. The comments in the SmallInteger primitives say, \r\t'Fails if result is not a SmallInteger', even though the implementor has the \r\toption to construct a LargePositiveInteger. For further information on \r\tprimitives, see the 'Primitive Methods' part of the chapter on the formal \r\tspecification of the interpreter in the Smalltalk book.\"\r\r\tself error: 'comment only'! !\r\r\r!Object class methodsFor: 'private' stamp: 'mir 8/22/2001 15:20'!\rreleaseExternalSettings\r\t\"Do nothing as a default\"! !\r\r\r!Object class methodsFor: 'objects from disk' stamp: 'tk 1/8/97'!\rcreateFrom: aSmartRefStream size: varsOnDisk version: instVarList\r\t\"Create an instance of me so objects on the disk can be read in.  Tricky part is computing the size if variable.  Inst vars will be filled in later.  \"\r\r\t^ self isVariable\r\t\tifFalse: [self basicNew]\r\t\tifTrue: [\"instVarList is names of old class's inst vars plus a version number\" \r\t\t\t\tself basicNew: (varsOnDisk - (instVarList size - 1))]\r! !\r\r\r!Object class methodsFor: 'plugin generation' stamp: 'acg 9/17/1999 01:05'!\rccg: cg emitLoadFor: aString from: anInteger on: aStream\r\r\tcg emitLoad: aString asNakedOopFrom: anInteger on: aStream! !\r\r!Object class methodsFor: 'plugin generation' stamp: 'acg 9/20/1999 13:01'!\rccg: cg generateCoerceToOopFrom: aNode on: aStream\r\r\tcg emitCExpression: aNode on: aStream! !\r\r!Object class methodsFor: 'plugin generation' stamp: 'acg 10/5/1999 06:10'!\rccg: cg generateCoerceToValueFrom: aNode on: aStream\r\r\tcg emitCExpression: aNode on: aStream! !\r\r!Object class methodsFor: 'plugin generation' stamp: 'acg 9/18/1999 16:09'!\rccg: cg prolog: aBlock expr: aString index: anInteger\r\r\t^cg ccgLoad: aBlock expr: aString asKindOf: self from: anInteger! !\r\r!Object class methodsFor: 'plugin generation' stamp: 'acg 9/20/1999 11:12'!\rccgCanConvertFrom: anObject\r\r\t^anObject isKindOf: self! !\r\r!Object class methodsFor: 'plugin generation' stamp: 'acg 9/17/1999 00:19'!\rccgDeclareCForVar: aSymbolOrString\r\r\t^'int ', aSymbolOrString! !\r\r\r!Object class methodsFor: 'class initialization' stamp: 'ar 2/11/2001 02:00'!\rflushDependents\r\tDependentsFields keysAndValuesDo:[:key :dep|\r\t\tkey ifNotNil:[key removeDependent: nil].\r\t].\r\tDependentsFields finalizeValues.! !\r\r!Object class methodsFor: 'class initialization' stamp: 'rw 2/10/2002 13:09'!\rflushEvents\r\t\"Object flushEvents\"\r\r\tEventManager flushEvents. ! !\r\r!Object class methodsFor: 'class initialization' stamp: 'rww 10/2/2001 07:35'!\rinitialize\r\t\"Object initialize\"\r\tDependentsFields ifNil:[self initializeDependentsFields].! !\r\r!Object class methodsFor: 'class initialization' stamp: 'ar 2/11/2001 01:41'!\rinitializeDependentsFields\r\t\"Object initialize\"\r\tDependentsFields _ WeakIdentityKeyDictionary new.\r! !\r\r!Object class methodsFor: 'class initialization' stamp: 'ar 2/11/2001 01:45'!\rreInitializeDependentsFields\r\t\"Object reInitializeDependentsFields\"\r\t| oldFields |\r\toldFields _ DependentsFields.\r\tDependentsFields _ WeakIdentityKeyDictionary new.\r\toldFields keysAndValuesDo:[:obj :deps|\r\t\tdeps do:[:d| obj addDependent: d]].\r! !\rObject subclass: #ObjectFinalizer\r\tinstanceVariableNames: 'receiver selector arguments'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Finalization'!\r\r!ObjectFinalizer methodsFor: 'initialize' stamp: 'ar 5/19/2003 20:12'!\rreceiver: aReceiver selector: aSelector argument: anObject\r\treceiver := aReceiver.\r\tselector := aSelector.\r\targuments := Array with: anObject! !\r\r\r!ObjectFinalizer methodsFor: 'finalization' stamp: 'ar 5/19/2003 20:13'!\rfinalize\r\t\"Finalize the resource associated with the receiver. This message should only be sent during the finalization process. There is NO garantuee that the resource associated with the receiver hasn't been free'd before so take care that you don't run into trouble - this all may happen with interrupt priority.\"\r\t[receiver perform: selector withArguments: arguments] \r\t\ton: Error do:[:ex| ex return].\r! !\rObject subclass: #ObjectWithDocumentation\r\tinstanceVariableNames: 'authoringStamp properties elementSymbol naturalLanguageTranslations'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Protocols-Kernel'!\r!ObjectWithDocumentation commentStamp: '<historical>' prior: 0!\rObjectWithDocumentation - an abstract superclass for objects that allows maintenance of an authoring stamp, a body of documentation, and a properties dictionary.\rThe Properties implementation has not happened yet -- it would closely mirror the implemenation of properties in the MorphExtension, for example.!\r\r\r!ObjectWithDocumentation methodsFor: 'initialization' stamp: 'sw 1/29/2001 09:28'!\rinitialize\r\t\"Initialize the receiver (automatically called when instances are created via 'new')\"\r\r\tauthoringStamp _ Utilities changeStampPerSe\r! !\r\r\r!ObjectWithDocumentation methodsFor: 'documentation' stamp: 'sw 11/5/2001 15:36'!\rdocumentation: maneno\r\t\"Set the receiver's documentation, in the current langauge\"\r\r\t| wording |\r\twording _ self wording.\r\tself absorbTranslation: (ElementTranslation new wording: wording  helpMessage: maneno language: #English) ! !\r\r\r!ObjectWithDocumentation methodsFor: 'queries' stamp: 'sw 9/12/2001 14:36'!\rdocumentation\r\t\"Answer the receiver's documentation\"\r\r\t^ self translatedToPrevailingLanguage helpMessage! !\r\r!ObjectWithDocumentation methodsFor: 'queries' stamp: 'sw 9/12/2001 15:13'!\rwording\r\t\"Answer the receiver's wording\"\r\r\t^ self translatedToPrevailingLanguage wording! !\r\r\r!ObjectWithDocumentation methodsFor: 'translation' stamp: 'sw 9/12/2001 23:03'!\rabsorbTranslation: anElementTranslation\r\t\"Absorb the given translation, which could overlay a prior version\"\r\r\tnaturalLanguageTranslations ifNil:\r\t\t[naturalLanguageTranslations _ OrderedCollection new].\r\tnaturalLanguageTranslations removeAllSuchThat:\r\t\t[:tr | tr language == anElementTranslation language].\r\tnaturalLanguageTranslations add: anElementTranslation! !\r\r!ObjectWithDocumentation methodsFor: 'translation' stamp: 'dgd 2/24/2004 20:02'!\rtranslatedToLanguage: languageSymbol \r\t\"Answer an ElementTranslation object in the prevailing natural  \r\tlanguage, or, if none found, in English\"\r\t| fallback elSym el wrd doc |\r\telSym := self elementSymbol.\r\t^ naturalLanguageTranslations isEmptyOrNil\r\t\tifTrue: [(el := self elementSymbol)\r\t\t\t\tifNotNil: [((el beginsWith: 'get')\r\t\t\t\t\t\t\tand: [elSym size > 3])\r\t\t\t\t\t\tifTrue: [wrd := (elSym copyFrom: 4 to: elSym size) withFirstCharacterDownshifted.\r\t\t\t\t\t\t\tdoc := 'get value of ' , elSym]\r\t\t\t\t\t\tifFalse: [((elSym beginsWith: 'set')\r\t\t\t\t\t\t\t\t\tand: [elSym size > 4])\r\t\t\t\t\t\t\t\tifTrue: [wrd := (elSym copyFrom: 4 to: elSym size - 1) withFirstCharacterDownshifted.\r\t\t\t\t\t\t\t\t\tdoc := 'set value of ' , elSym]\r\t\t\t\t\t\t\t\tifFalse: [wrd := ScriptingSystem wordingForOperator: elSym.\r\t\t\t\t\t\t\t\t\tdoc := nil]]].\r\t\t\t^ ElementTranslation new\r\t\t\t\twording: wrd\r\t\t\t\thelpMessage: doc\r\t\t\t\tlanguage: #English]\r\t\tifFalse: [naturalLanguageTranslations\r\t\t\t\tdo: [:aTranslation | \r\t\t\t\t\taTranslation language == languageSymbol\r\t\t\t\t\t\tifTrue: [^ aTranslation].\r\t\t\t\t\taTranslation language == #English\r\t\t\t\t\t\tifTrue: [fallback := aTranslation]].\r\t\t\tfallback\r\t\t\t\tifNil: [ElementCategory new categoryName: elSym]]! !\r\r!ObjectWithDocumentation methodsFor: 'translation' stamp: 'dgd 12/4/2003 19:09'!\rtranslatedToPrevailingLanguage\r\t\"Answer an ElementTranslation object in the prevailing natural language, or, if none found, in English\"\r\r\t^ Preferences translationWithBabel\r\t\t\tifTrue:[ self translatedToPrevailingLanguageUsingBabel ]\r\t\t\tifFalse:[ self translatedToLanguage:self currentWorld currentNaturalLanguage]\r! !\r\r!ObjectWithDocumentation methodsFor: 'translation' stamp: 'dgd 12/4/2003 19:14'!\rtranslatedToPrevailingLanguageUsingBabel\r\t\"Answer an ElementTranslation object in the prevailing natural  \r\tlanguage using the Babel mechanism\"\r\t| elSym |\r\telSym := self elementSymbol.\r\t\"\"\r\telSym isNil\r\t\tifFalse: [\"\"\r\t\t\t((elSym beginsWith: 'get')\r\t\t\t\t\tand: [elSym size > 3])\r\t\t\t\tifTrue: [\"\"\r\t\t\t\t\t^ ElementTranslation new\r\t\t\t\t\t\twording: (elSym allButFirst: 3) withFirstCharacterDownshifted translated\r\t\t\t\t\t\thelpMessage: ('get value of {1}' translated format: {elSym})\r\t\t\t\t\t\tlanguage: self currentWorld currentNaturalLanguage].\r\t\t\t\"\"\r\t\t\t((elSym beginsWith: 'set')\r\t\t\t\t\tand: [elSym size > 4])\r\t\t\t\tifTrue: [\"\"\r\t\t\t\t\t^ ElementTranslation new\r\t\t\t\t\t\twording: (elSym allButFirst: 3) withFirstCharacterDownshifted translated\r\t\t\t\t\t\thelpMessage: ('set value of {1}' translated format: {elSym})\r\t\t\t\t\t\tlanguage: self currentWorld currentNaturalLanguage]].\r\t\"\"\r\t^ (self translatedToLanguage: #English) translated! !\r\r\r!ObjectWithDocumentation methodsFor: 'miscellaneous' stamp: 'sw 9/12/2001 23:03'!\relementSymbol\r\t\"Answer the receiver's element symbol\"\r\r\t^ elementSymbol! !\rSwitch subclass: #OneOnSwitch\r\tinstanceVariableNames: 'connection'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Menus'!\r!OneOnSwitch commentStamp: '<historical>' prior: 0!\rI am a kind of Switch that can be connected to some related object, typically to a collection of my instances. When my instance is created, its connection is set to a particular object. When the object changes because an Switch it refers to is turned on, an update message is broadcasted. All the connected OneOnSwitches, except the changed one, turn off. This allows OneOnSwitches to maintain the constraint that at most one of them will be on at any time. OneOnSwitches can thus be made to act like \"car radio\" switches.!\r\r\r!OneOnSwitch methodsFor: 'initialize-release'!\rrelease\r\r\tsuper release.\r\tself isConnectionSet ifTrue: [connection removeDependent: self]! !\r\r\r!OneOnSwitch methodsFor: 'state'!\rturnOn\r\t\"Does nothing if it is already on. If it is not, it is set to 'on', its\r\tdependents are \tnotified of the change, its connection is notified, and\r\tits action is executed.\"\r\r\tself isOff\r\t\tifTrue: \r\t\t\t[on _ true.\r\t\t\tself changed.\r\t\t\tself notifyConnection.\r\t\t\tself doAction: onAction]! !\r\r\r!OneOnSwitch methodsFor: 'connection'!\rconnection\r\t\"Answer the object that connects the receiver to other Switches.\"\r\r\t^connection! !\r\r!OneOnSwitch methodsFor: 'connection'!\risConnectionSet\r\t\"Answer whether the receiver is connected to an object that coordinates \r\tupdates among switches.\"\r\r\tconnection == nil\r\t\tifTrue: [^false]\r\t\tifFalse: [^true]! !\r\r!OneOnSwitch methodsFor: 'connection'!\rnotifyConnection\r\t\"Send the receiver's connection (if it exists) the message 'changed: self' in \r\torder for the connection to broadcast the change to other objects \r\tconnected by the connection.\"\r\t\r\tself isConnectionSet ifTrue: [self connection changed: self]! !\r\r\r!OneOnSwitch methodsFor: 'updating'!\rupdate: aOneOnSwitch \r\t\"Does nothing if aOneOnSwitch is identical to this object. If it is not, this \r\tobject is turned off. This message is sent by the connection (an Object)\r\twhen some related OneOnSwitch (possibly this one) has changed. This\r\tallows a group of related OneOnSwitches to maintain the constraint that\r\tat most one will be on at any time.\"\r\r\tself ~~ aOneOnSwitch ifTrue: [self turnOff]! !\rSequenceableCollection subclass: #OrderedCollection\r\tinstanceVariableNames: 'array firstIndex lastIndex'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Sequenceable'!\r!OrderedCollection commentStamp: '<historical>' prior: 0!\rI represent a collection of objects ordered by the collector.!\r\r\r!OrderedCollection methodsFor: 'accessing'!\rat: anInteger \r\t\"Answer my element at index anInteger. at: is used by a knowledgeable\r\tclient to access an existing element\"\r\r\t(anInteger < 1 or: [anInteger + firstIndex - 1 > lastIndex])\r\t\tifTrue: [self errorNoSuchElement]\r\t\tifFalse: [^ array at: anInteger + firstIndex - 1]! !\r\r!OrderedCollection methodsFor: 'accessing'!\rat: anInteger put: anObject \r\t\"Put anObject at element index anInteger. at:put: cannot be used to\r\tappend, front or back, to an ordered collection; it is used by a\r\tknowledgeable client to replace an element.\"\r\r\t| index |\r\tindex _ anInteger asInteger.\r\t(index < 1 or: [index + firstIndex - 1 > lastIndex])\r\t\tifTrue: [self errorNoSuchElement]\r\t\tifFalse: [^array at: index + firstIndex - 1 put: anObject]! !\r\r!OrderedCollection methodsFor: 'accessing' stamp: 'sma 5/12/2000 11:42'!\rcapacity\r\t\"Answer the current capacity of the receiver.\"\r\r\t^ array size! !\r\r!OrderedCollection methodsFor: 'accessing'!\rinspect\r\t\"Open an OrderedCollectionInspector on the receiver.\r\tUse basicInspect to get a normal type of inspector.\"\r\r\tOrderedCollectionInspector openOn: self withEvalPane: true! !\r\r!OrderedCollection methodsFor: 'accessing' stamp: 'sma 5/12/2000 11:39'!\rsize\r\t\"Answer how many elements the receiver contains.\"\r\r\t^ lastIndex - firstIndex + 1! !\r\r\r!OrderedCollection methodsFor: 'copying'!\rcopyEmpty\r\t\"Answer a copy of the receiver that contains no elements.\"\r\r\t^self species new! !\r\r!OrderedCollection methodsFor: 'copying' stamp: 'di 12/12/2000 10:15'!\rcopyFrom: startIndex to: endIndex \r\t\"Answer a copy of the receiver that contains elements from position\r\tstartIndex to endIndex.\"\r\r\t| targetCollection |\r\tendIndex < startIndex ifTrue: [^self species new: 0].\r\ttargetCollection _ self species new: endIndex + 1 - startIndex.\r\tstartIndex to: endIndex do: [:index | targetCollection addLast: (self at: index)].\r\t^ targetCollection! !\r\r!OrderedCollection methodsFor: 'copying'!\rcopyReplaceFrom: start to: stop with: replacementCollection \r\t\"Answer a copy of the receiver with replacementCollection's elements in\r\tplace of the receiver's start'th to stop'th elements. This does not expect\r\ta 1-1 map from replacementCollection to the start to stop elements, so it\r\twill do an insert or append.\"\r\r\t| newOrderedCollection delta startIndex stopIndex |\r\t\"if start is less than 1, ignore stop and assume this is inserting at the front. \r\tif start greater than self size, ignore stop and assume this is appending. \r\totherwise, it is replacing part of me and start and stop have to be within my \r\tbounds. \"\r\tdelta _ 0.\r\tstartIndex _ start.\r\tstopIndex _ stop.\r\tstart < 1\r\t\tifTrue: [startIndex _ stopIndex _ 0]\r\t\tifFalse: [startIndex > self size\r\t\t\t\tifTrue: [startIndex _ stopIndex _ self size + 1]\r\t\t\t\tifFalse: \r\t\t\t\t\t[(stopIndex < (startIndex - 1) or: [stopIndex > self size])\r\t\t\t\t\t\tifTrue: [self errorOutOfBounds].\r\t\t\t\t\tdelta _ stopIndex - startIndex + 1]].\r\tnewOrderedCollection _ \r\t\tself species new: self size + replacementCollection size - delta.\r\t1 to: startIndex - 1 do: [:index | newOrderedCollection add: (self at: index)].\r\t1 to: replacementCollection size do: \r\t\t[:index | newOrderedCollection add: (replacementCollection at: index)].\r\tstopIndex + 1 to: self size do: [:index | newOrderedCollection add: (self at: index)].\r\t^newOrderedCollection! !\r\r!OrderedCollection methodsFor: 'copying'!\rcopyWith: newElement \r\t\"Answer a copy of the receiver that is 1 bigger than the receiver and \r\tincludes the argument, newElement, at the end.\"\r\r\t| newCollection |\r\tnewCollection _ self copy.\r\tnewCollection add: newElement.\r\t^newCollection! !\r\r!OrderedCollection methodsFor: 'copying' stamp: 'sw 1/26/96'!\rreversed\r\t\"Answer a copy of the receiver with element order reversed.  \"\r\t| newCol |\r\tnewCol _ self species new.\r\tself reverseDo:\r\t\t[:elem | newCol addLast: elem].\r\t^ newCol\r\r\"#(2 3 4 'fred') reversed\"! !\r\r\r!OrderedCollection methodsFor: 'adding'!\radd: newObject\r\r\t^self addLast: newObject! !\r\r!OrderedCollection methodsFor: 'adding'!\radd: newObject after: oldObject \r\t\"Add the argument, newObject, as an element of the receiver. Put it in \r\tthe sequence just succeeding oldObject. Answer newObject.\"\r\t\r\t| index |\r\tindex _ self find: oldObject.\r\tself insert: newObject before: index + 1.\r\t^newObject! !\r\r!OrderedCollection methodsFor: 'adding' stamp: 'di 3/15/1999 14:01'!\radd: newObject afterIndex: index \r\t\"Add the argument, newObject, as an element of the receiver. Put it in \r\tthe sequence just after index. Answer newObject.\"\r\r\tself insert: newObject before: firstIndex + index.\r\t^ newObject! !\r\r!OrderedCollection methodsFor: 'adding'!\radd: newObject before: oldObject \r\t\"Add the argument, newObject, as an element of the receiver. Put it in \r\tthe sequence just preceding oldObject. Answer newObject.\"\r\t\r\t| index |\r\tindex _ self find: oldObject.\r\tself insert: newObject before: index.\r\t^newObject! !\r\r!OrderedCollection methodsFor: 'adding' stamp: 'BG 1/9/2004 12:30'!\radd: newObject beforeIndex: index \r \"Add the argument, newObject, as an element of the receiver. Put it in \r the sequence just before index. Answer newObject.\"\r\r self add: newObject afterIndex: index - 1.\r ^ newObject! !\r\r!OrderedCollection methodsFor: 'adding' stamp: 'sma 5/12/2000 11:26'!\raddAll: aCollection \r\t\"Add each element of aCollection at my end. Answer\taCollection.\"\r\r\t^ self addAllLast: aCollection! !\r\r!OrderedCollection methodsFor: 'adding'!\raddAllFirst: anOrderedCollection \r\t\"Add each element of anOrderedCollection at the beginning of the \r\treceiver. Answer anOrderedCollection.\"\r\r\tanOrderedCollection reverseDo: [:each | self addFirst: each].\r\t^anOrderedCollection! !\r\r!OrderedCollection methodsFor: 'adding' stamp: 'sw 3/1/2001 11:03'!\raddAllFirstUnlessAlreadyPresent: anOrderedCollection \r\t\"Add each element of anOrderedCollection at the beginning of the receiver, preserving the order, but do not add any items that are already in the receiver.  Answer anOrderedCollection.\"\r\r\tanOrderedCollection reverseDo:\r\t\t[:each | (self includes: each) ifFalse: [self addFirst: each]].\r\t^ anOrderedCollection! !\r\r!OrderedCollection methodsFor: 'adding'!\raddAllLast: anOrderedCollection \r\t\"Add each element of anOrderedCollection at the end of the receiver. \r\tAnswer anOrderedCollection.\"\r\r\tanOrderedCollection do: [:each | self addLast: each].\r\t^anOrderedCollection! !\r\r!OrderedCollection methodsFor: 'adding'!\raddFirst: newObject \r\t\"Add newObject to the beginning of the receiver. Answer newObject.\"\r\r\tfirstIndex = 1 ifTrue: [self makeRoomAtFirst].\r\tfirstIndex _ firstIndex - 1.\r\tarray at: firstIndex put: newObject.\r\t^ newObject! !\r\r!OrderedCollection methodsFor: 'adding'!\raddLast: newObject \r\t\"Add newObject to the end of the receiver. Answer newObject.\"\r\r\tlastIndex = array size ifTrue: [self makeRoomAtLast].\r\tlastIndex _ lastIndex + 1.\r\tarray at: lastIndex put: newObject.\r\t^ newObject! !\r\r!OrderedCollection methodsFor: 'adding' stamp: 'ajh 5/22/2003 12:03'!\rat: index ifAbsentPut: block\r\t\"Return value at index, however, if value does not exist (nil or out of bounds) then add block's value at index (growing self if necessary)\"\r\r\t| v |\r\tindex <= self size ifTrue: [\r\t\t^ (v _ self at: index)\r\t\t\tifNotNil: [v]\r\t\t\tifNil: [self at: index put: block value]\r\t].\r\t[self size < index] whileTrue: [self add: nil].\r\t^ self at: index put: block value! !\r\r!OrderedCollection methodsFor: 'adding'!\rgrow\r\t\"Become larger. Typically, a subclass has to override this if the subclass\r\tadds instance variables.\"\r\t| newArray |\r\tnewArray _ Array new: self size + self growSize.\r\tnewArray replaceFrom: 1 to: array size with: array startingAt: 1.\r\tarray _ newArray! !\r\r!OrderedCollection methodsFor: 'adding'!\rgrowSize\r\t^ array size max: 2! !\r\r\r!OrderedCollection methodsFor: 'removing'!\rremove: oldObject ifAbsent: absentBlock\r\r\t| index |\r\tindex _ firstIndex.\r\t[index <= lastIndex]\r\t\twhileTrue: \r\t\t\t[oldObject = (array at: index)\r\t\t\t\tifTrue: \r\t\t\t\t\t[self removeIndex: index.\r\t\t\t\t\t^ oldObject]\r\t\t\t\tifFalse: [index _ index + 1]].\r\t^ absentBlock value! !\r\r!OrderedCollection methodsFor: 'removing' stamp: 'raok 4/27/2001 15:35'!\rremoveAllSuchThat: aBlock \r\t\"Remove each element of the receiver for which aBlock evaluates to true.\r\tThe method in Collection is O(N^2), this is O(N).\"\r\r\t| n |\r\tn _ firstIndex.\r\tfirstIndex to: lastIndex do: [:index |\r\t    (aBlock value: (array at: index)) ifFalse: [\r\t\t\tarray at: n put: (array at: index).\r\t\t\tn _ n + 1]].\r\tn to: lastIndex do: [:index | array at: index put: nil].\r\tlastIndex _ n - 1! !\r\r!OrderedCollection methodsFor: 'removing' stamp: 'ar 5/22/2000 12:19'!\rremoveAt: index\r\t| removed |\r\tremoved _ self at: index.\r\tself removeIndex: index + firstIndex - 1.\r\t^removed! !\r\r!OrderedCollection methodsFor: 'removing'!\rremoveFirst\r\t\"Remove the first element of the receiver and answer it. If the receiver is \r\tempty, create an error notification.\"\r\t| firstObject |\r\tself emptyCheck.\r\tfirstObject _ array at: firstIndex.\r\tarray at: firstIndex put: nil.\r\tfirstIndex _ firstIndex + 1.\r\t^ firstObject! !\r\r!OrderedCollection methodsFor: 'removing' stamp: 'ajh 6/22/2003 14:37'!\rremoveFirst: n\r\t\"Remove first n object into an array\"\r\r\t| list |\r\tlist _ Array new: n.\r\t1 to: n do: [:i |\r\t\tlist at: i put: self removeFirst].\r\t^ list! !\r\r!OrderedCollection methodsFor: 'removing'!\rremoveLast\r\t\"Remove the last element of the receiver and answer it. If the receiver is \r\tempty, create an error notification.\"\r\t| lastObject |\r\tself emptyCheck.\r\tlastObject _ array at: lastIndex.\r\tarray at: lastIndex put: nil.\r\tlastIndex _ lastIndex - 1.\r\t^ lastObject! !\r\r!OrderedCollection methodsFor: 'removing' stamp: 'ajh 6/22/2003 14:36'!\rremoveLast: n\r\t\"Remove last n object into an array with last in last position\"\r\r\t| list |\r\tlist _ Array new: n.\r\tn to: 1 by: -1 do: [:i |\r\t\tlist at: i put: self removeLast].\r\t^ list! !\r\r\r!OrderedCollection methodsFor: 'enumerating' stamp: 'sma 2/5/2000 15:22'!\rcollect: aBlock \r\t\"Evaluate aBlock with each of my elements as the argument. Collect the \r\tresulting values into a collection that is like me. Answer the new \r\tcollection. Override superclass in order to use addLast:, not at:put:.\"\r\r\t| newCollection |\r\tnewCollection _ self species new: self size.\r\tfirstIndex to: lastIndex do:\r\t\t[:index |\r\t\tnewCollection addLast: (aBlock value: (array at: index))].\r\t^ newCollection! !\r\r!OrderedCollection methodsFor: 'enumerating' stamp: 'bf 5/18/2000 17:34'!\rcollect: aBlock from: fromIndex to: toIndex\r\t\"Override superclass in order to use addLast:, not at:put:.\"\r\t| result |\r\t(fromIndex < 1 or:[toIndex + firstIndex - 1 > lastIndex])\r\t\tifTrue: [^self errorNoSuchElement].\r\tresult _ self species new: toIndex - fromIndex + 1.\r\tfirstIndex + fromIndex - 1 to: firstIndex + toIndex - 1 do:\r\t\t[:index | result addLast: (aBlock value: (array at: index))].\r\t^ result\r! !\r\r!OrderedCollection methodsFor: 'enumerating'!\rdo: aBlock \r\t\"Override the superclass for performance reasons.\"\r\t| index |\r\tindex _ firstIndex.\r\t[index <= lastIndex]\r\t\twhileTrue: \r\t\t\t[aBlock value: (array at: index).\r\t\t\tindex _ index + 1]! !\r\r!OrderedCollection methodsFor: 'enumerating'!\rreverseDo: aBlock \r\t\"Override the superclass for performance reasons.\"\r\t| index |\r\tindex _ lastIndex.\r\t[index >= firstIndex]\r\t\twhileTrue: \r\t\t\t[aBlock value: (array at: index).\r\t\t\tindex _ index - 1]! !\r\r!OrderedCollection methodsFor: 'enumerating' stamp: 'sma 2/5/2000 15:13'!\rselect: aBlock \r\t\"Evaluate aBlock with each of my elements as the argument. Collect into\r\ta new collection like the receiver, only those elements for which aBlock\r\tevaluates to true.\"\r\r\t| newCollection element |\r\tnewCollection _ self copyEmpty.\r\tfirstIndex to: lastIndex do:\r\t\t[:index |\r\t\t(aBlock value: (element _ array at: index))\r\t\t\tifTrue: [newCollection addLast: element]].\r\t^ newCollection! !\r\r!OrderedCollection methodsFor: 'enumerating' stamp: 'di 8/31/1999 13:13'!\rwith: otherCollection collect: twoArgBlock \r\t\"Collect and return the result of evaluating twoArgBlock with \r\tcorresponding elements from this collection and otherCollection.\"\r\t| result |\r\totherCollection size = self size ifFalse: [self error: 'otherCollection must be the same size'].\r\tresult _ self species new: self size.\r\t1 to: self size do:\r\t\t[:index | result addLast: (twoArgBlock value: (self at: index)\r\t\t\t\t\t\t\t\t\tvalue: (otherCollection at: index))].\r\t^ result! !\r\r!OrderedCollection methodsFor: 'enumerating' stamp: 'bf 5/16/2000 16:30'!\rwithIndexCollect: elementAndIndexBlock \r\t\"Just like with:collect: except that the iteration index supplies the second argument to the block. Override superclass in order to use addLast:, not at:put:.\"\r\r\t| newCollection |\r\tnewCollection _ self species new: self size.\r\tfirstIndex to: lastIndex do:\r\t\t[:index |\r\t\tnewCollection addLast: (elementAndIndexBlock\r\t\t\tvalue: (array at: index)\r\t\t\tvalue: index - firstIndex + 1)].\r\t^ newCollection! !\r\r\r!OrderedCollection methodsFor: 'private'!\rcollector  \"Private\"\r\t^ array! !\r\r!OrderedCollection methodsFor: 'private'!\rerrorConditionNotSatisfied\r\r\tself error: 'no element satisfies condition'! !\r\r!OrderedCollection methodsFor: 'private'!\rerrorNoSuchElement\r\r\tself error: 'attempt to index non-existent element in an ordered collection'! !\r\r!OrderedCollection methodsFor: 'private' stamp: 'BG 1/9/2004 12:26'!\rfind: oldObject\r  \"  This method answers an index in the range firstIndex .. lastIndex, which is meant for internal use only.\r     Never use this method in your code, the methods for public use are:\r        #indexOf:\r        #indexOf:ifAbsent: \"\r\r\t| index |\r\tindex _ firstIndex.\r\t[index <= lastIndex]\r\t\twhileTrue:\r\t\t\t[(array at: index) = oldObject ifTrue: [^ index].\r\t\t\tindex _ index + 1].\r\tself errorNotFound: oldObject! !\r\r!OrderedCollection methodsFor: 'private' stamp: 'BG 1/9/2004 12:29'!\rinsert: anObject before: spot\r\r  \"  spot is an index in the range firstIndex .. lastIndex, such an index is not known from outside the collection. \r     Never use this method in your code, it is meant for private use by OrderedCollection only.\r     The methods for use are:\r        #add:before:   to insert an object before another object\r        #add:beforeIndex:   to insert an object before a given position. \"\r\t| \"index\" delta spotIndex|\r\tspotIndex _ spot.\r\tdelta _ spotIndex - firstIndex.\r\tfirstIndex = 1\r\t\tifTrue: \r\t\t\t[self makeRoomAtFirst.\r\t\t\tspotIndex _ firstIndex + delta].\r\tfirstIndex _ firstIndex - 1.\r\tarray\r\t\treplaceFrom: firstIndex\r\t\tto: spotIndex - 2\r\t\twith: array\r\t\tstartingAt: firstIndex + 1.\r\tarray at: spotIndex - 1 put: anObject.\r\"\tindex _ firstIndex _ firstIndex - 1.\r\t[index < (spotIndex - 1)]\r\t\twhileTrue: \r\t\t\t[array at: index put: (array at: index + 1).\r\t\t\tindex _ index + 1].\r\tarray at: index put: anObject.\"\r\t^ anObject! !\r\r!OrderedCollection methodsFor: 'private'!\rmakeRoomAtFirst\r\t| delta index |\r\tdelta _ array size - self size.\r\tdelta = 0 ifTrue: \r\t\t\t[self grow.\r\t\t\tdelta _ array size - self size].\r\tlastIndex = array size ifTrue: [^ self]. \"just in case we got lucky\"\r\tindex _ array size.\r\t[index > delta]\r\t\twhileTrue: \r\t\t\t[array at: index put: (array at: index - delta + firstIndex - 1).\r\t\t\tarray at: index - delta + firstIndex - 1 put: nil.\r\t\t\tindex _ index - 1].\r\tfirstIndex _ delta + 1.\r\tlastIndex _ array size! !\r\r!OrderedCollection methodsFor: 'private'!\rmakeRoomAtLast\r\t| newLast delta |\r\tnewLast _ self size.\r\tarray size - self size = 0 ifTrue: [self grow].\r\t(delta _ firstIndex - 1) = 0 ifTrue: [^ self].\r\t\"we might be here under false premises or grow did the job for us\"\r\t1 to: newLast do:\r\t\t[:index |\r\t\tarray at: index put: (array at: index + delta).\r\t\tarray at: index + delta put: nil].\r\tfirstIndex _ 1.\r\tlastIndex _ newLast! !\r\r!OrderedCollection methodsFor: 'private' stamp: 'BG 1/9/2004 12:28'!\rremoveIndex: removedIndex\r  \"  removedIndex is an index in the range firstIndex .. lastIndex, such an index is not known from outside the collection.\r    Never use this method in your code, it is meant for private use by OrderedCollection only.\r     The method for public use is:\r        #removeAt: \"\r\r\tarray \r\t\treplaceFrom: removedIndex \r\t\tto: lastIndex - 1 \r\t\twith: array \r\t\tstartingAt: removedIndex+1.\r\tarray at: lastIndex put: nil.\r\tlastIndex _ lastIndex - 1.! !\r\r!OrderedCollection methodsFor: 'private' stamp: 'di 11/14/97 12:54'!\rreset\r\tfirstIndex _ array size // 3 max: 1.\r\tlastIndex _ firstIndex - 1! !\r\r!OrderedCollection methodsFor: 'private' stamp: 'ar 4/16/1999 07:59'!\rresetTo: index\r\tfirstIndex _ index.\r\tlastIndex _ firstIndex - 1! !\r\r!OrderedCollection methodsFor: 'private' stamp: 'di 11/14/97 12:54'!\rsetCollection: anArray\r\tarray _ anArray.\r\tself reset! !\r\r!OrderedCollection methodsFor: 'private' stamp: 'apb 10/15/2000 18:10'!\rsetContents: anArray\r\tarray _ anArray.\r\tfirstIndex _ 1.\r\tlastIndex _ array size.! !\r\r\r!OrderedCollection methodsFor: 'testing' stamp: 'bf 8/20/1999 15:08'!\rhasContentsInExplorer\r\r\t^self isEmpty not! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rOrderedCollection class\r\tinstanceVariableNames: ''!\r\r!OrderedCollection class methodsFor: 'instance creation' stamp: 'sma 5/12/2000 17:41'!\rnew\r\t^ self new: 10! !\r\r!OrderedCollection class methodsFor: 'instance creation' stamp: 'sma 5/12/2000 17:42'!\rnew: anInteger \r\t^ super new setCollection: (Array new: anInteger)! !\r\r!OrderedCollection class methodsFor: 'instance creation'!\rnewFrom: aCollection \r\t\"Answer an instance of me containing the same elements as aCollection.\"\r\r\t| newCollection |\r\tnewCollection _ self new: aCollection size.\r\tnewCollection addAll: aCollection.\r\t^newCollection\r\r\"\tOrderedCollection newFrom: {1. 2. 3}\r\t{1. 2. 3} as: OrderedCollection\r\t{4. 2. 7} as: SortedCollection\r\"! !\r\r!OrderedCollection class methodsFor: 'instance creation' stamp: 'apb 10/15/2000 22:02'!\rofSize: n\r\t\"Create a new collection of size n with nil as its elements.\r\tThis method exists because OrderedCollection new: n creates an\r\tempty collection,  not one of size n.\"\r\t| collection |\r\tcollection _ self new: n.\r\tcollection setContents: (collection collector).\r\t^ collection\r! !\rInspector subclass: #OrderedCollectionInspector\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Inspector'!\r\r!OrderedCollectionInspector methodsFor: 'as yet unclassified' stamp: 'dew 9/19/2001 03:27'!\rfieldList\r\tobject ifNil: [ ^ OrderedCollection new].\r\t^ self baseFieldList ,\r\t\t(object size <= (self i1 + self i2)\r\t\t\tifTrue: [(1 to: object size)\r\t\t\t\t\t\tcollect: [:i | i printString]]\r\t\t\tifFalse: [(1 to: self i1) , (object size-(self i2-1) to: object size)\r\t\t\t\t\t\tcollect: [:i | i printString]])\r\"\rOrderedCollection new inspect\r(OrderedCollection newFrom: #(3 5 7 123)) inspect\r(OrderedCollection newFrom: (1 to: 1000)) inspect\r\"! !\r\r!OrderedCollectionInspector methodsFor: 'as yet unclassified' stamp: 'sw 9/16/97 22:38'!\rreplaceSelectionValue: anObject \r\t\"The receiver has a list of variables of its inspected object. One of these \r\tis selected. The value of the selected variable is set to the value, anObject.\"\r\r\t(selectionIndex - 2) <= object class instSize\r\t\tifTrue: [^ super replaceSelectionValue: anObject].\r\tobject at: self selectedObjectIndex put: anObject! !\r\r!OrderedCollectionInspector methodsFor: 'as yet unclassified' stamp: 'sw 9/16/97 22:28'!\rselectedObjectIndex\r\t\"Answer the index of the inspectee's collection that the current selection refers to.\"\r\r\t| basicIndex |\r\tbasicIndex _ selectionIndex - 2 - object class instSize.\r\t^ (object size <= (self i1 + self i2)  or: [basicIndex <= self i1])\r\t\tifTrue: [basicIndex]\r\t\tifFalse: [object size - (self i1 + self i2) + basicIndex]! !\r\r!OrderedCollectionInspector methodsFor: 'as yet unclassified' stamp: 'sw 9/16/97 22:39'!\rselection\r\t\"The receiver has a list of variables of its inspected object.\r\tOne of these is selected. Answer the value of the selected variable.\"\r\r\t(selectionIndex - 2) <= object class instSize\r\t\tifTrue: [^ super selection].\r\t^ object at: self selectedObjectIndex! !\rNotification subclass: #OutOfScopeNotification\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Exceptions Kernel'!\r\r!OutOfScopeNotification methodsFor: 'as yet unclassified' stamp: 'RAA 2/5/2001 10:41'!\rdefaultAction\r\r\tself resume: false! !\rBrowser subclass: #PackagePaneBrowser\r\tinstanceVariableNames: 'package packageListIndex packageList'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Browser'!\r!PackagePaneBrowser commentStamp: '<historical>' prior: 0!\rA package browser represents a hierarchical query path through an organization of class and method information.   It parses class categories into a two-level hierarchy on the first '-' character, giving \"packages\" (e.g.,  Magnitude, Collections, Graphics, etc.), and \"categories\" (e.g., Magnitude-General and Magnitude-Number).\r\rInstance Variables:\r\tpackage  <Symbol> the \"category header,\" e.g., #Magnitudes or #Collections\r\tpackageListIndex <Integer> The index in the package list\r\tpackageList  <OrderedCollection of String> the list of package names\r!\r\r\r!PackagePaneBrowser methodsFor: 'initialize-release' stamp: 'sw 1/13/2000 16:45'!\rdefaultBrowserTitle\r\t^ 'Package Browser'! !\r\r!PackagePaneBrowser methodsFor: 'initialize-release' stamp: 'stp 10/06/1998 22:02'!\rsystemOrganizer: aSystemOrganizer \r\t\"Initialize the receiver as a perspective on the system organizer, \r\taSystemOrganizer. Typically there is only one--the system variable \r\tSystemOrganization.\"\r\r\tsuper systemOrganizer: aSystemOrganizer .\r\tpackageListIndex := 0! !\r\r\r!PackagePaneBrowser methodsFor: 'package list' stamp: 'JF 7/30/2003 12:35'!\rcategoryExistsForPackage\r\t^ self hasPackageSelected\r\t\tand: [(systemOrganizer categories indexOf: self package asSymbol) ~= 0]\r! !\r\r!PackagePaneBrowser methodsFor: 'package list' stamp: 'JF 7/30/2003 12:24'!\rhasPackageSelected\r\r\t^ packageListIndex ~= 0! !\r\r!PackagePaneBrowser methodsFor: 'package list' stamp: 'BG 10/30/2003 21:09'!\ropenEditString: aString\r\t\"Create a pluggable version of all the views for a Browser, including views and controllers.\"\r\t\"PackageBrowser openBrowser\"\r\r\t| packageListView systemCategoryListView classListView messageCategoryListView\r\t  messageListView browserCodeView topView switchView annotationPane underPane y optionalButtonsView |\r\r\ttopView := StandardSystemView new model: self.\r\ttopView borderWidth: 1.  \"label and minSize taken care of by caller\"\r\r\tpackageListView := PluggableListView on: self\r\t\tlist: #packageList\r\t\tselected: #packageListIndex\r\t\tchangeSelected: #packageListIndex:\r\t\tmenu: #packageMenu:.\r\tpackageListView window: (0 @ 0 extent: 20 @ 70).\r\ttopView addSubView: packageListView.\r\r\tsystemCategoryListView := PluggableListView on: self\r\t\tlist: #systemCategoryList\r\t\tselected: #systemCategoryListIndex\r\t\tchangeSelected: #systemCategoryListIndex:\r\t\tmenu: #systemCategoryMenu:.\r\tsystemCategoryListView window: (20 @ 0 extent: 30 @ 70).\r\ttopView addSubView: systemCategoryListView.\r\r\tclassListView := PluggableListView on: self\r\t\tlist: #classList\r\t\tselected: #classListIndex\r\t\tchangeSelected: #classListIndex:\r\t\tmenu: #classListMenu:shifted:.\r\tclassListView window: (0 @ 0 extent: 50 @ 62).\r\ttopView addSubView: classListView toRightOf: systemCategoryListView.\r\r\tswitchView := self buildInstanceClassSwitchView.\r\tswitchView borderWidth: 1.\r\ttopView addSubView: switchView below: classListView.\r\r\tmessageCategoryListView := PluggableListView on: self\r\t\tlist: #messageCategoryList\r\t\tselected: #messageCategoryListIndex\r\t\tchangeSelected: #messageCategoryListIndex:\r\t\tmenu: #messageCategoryMenu:.\r\tmessageCategoryListView window: (0 @ 0 extent: 50 @ 70).\r\ttopView addSubView: messageCategoryListView toRightOf: classListView.\r\r\tmessageListView := PluggableListView on: self\r\t\tlist: #messageList\r\t\tselected: #messageListIndex\r\t\tchangeSelected: #messageListIndex:\r\t\tmenu: #messageListMenu:shifted:\r\t\tkeystroke: #messageListKey:from:.\r\tmessageListView window: (0 @ 0 extent: 50 @ 70).\r\ttopView addSubView: messageListView toRightOf: messageCategoryListView.\r\r\tself wantsAnnotationPane\r\t\tifTrue:\r\t\t\t[annotationPane _ PluggableTextView on: self\r\t\t\t\ttext: #annotation accept: nil\r\t\t\t\treadSelection: nil menu: nil.\r\t\t\tannotationPane window: (0@0 extent: 200@self optionalAnnotationHeight).\r\t\t\ttopView addSubView: annotationPane below: packageListView.\r\t\t\tunderPane _ annotationPane.\r\t\t\ty _ 110 - self optionalAnnotationHeight]\r\t\tifFalse:\r\t\t\t[underPane _ packageListView.\r\t\t\ty _ 110].\r\r\tself wantsOptionalButtons ifTrue:\r\t\t[optionalButtonsView _ self buildOptionalButtonsView.\r\t\toptionalButtonsView borderWidth: 1.\r\t\ttopView addSubView: optionalButtonsView below: underPane.\r\t\tunderPane _ optionalButtonsView.\r\t\ty _ y - self optionalButtonHeight].\r\r\tbrowserCodeView := PluggableTextView on: self \r\t\t\ttext: #contents accept: #contents:notifying:\r\t\t\treadSelection: #contentsSelection menu: #codePaneMenu:shifted:.\r\tbrowserCodeView window: (0@0 extent: 200@y).\r\ttopView addSubView: browserCodeView below: underPane.\r\taString ifNotNil: [browserCodeView editString: aString.\r\t\t\tbrowserCodeView hasUnacceptedEdits: true].\r\t^ topView! !\r\r!PackagePaneBrowser methodsFor: 'package list' stamp: 'JF 7/30/2003 12:25'!\rpackage\r\t\"Answer the receiver's 'package'.\"\r\r\t^ self hasPackageSelected\r\t\tifFalse: [nil]\r\t\tifTrue: [self packageList at: packageListIndex]\r! !\r\r!PackagePaneBrowser methodsFor: 'package list' stamp: 'stp 10/05/1998 20:36'!\rpackageList\r\t\"Answer a list of the packages in the current system organization.\"\r\r\t| str cats stream |\r\tstr := Set new: 100.\r\tstream := WriteStream on: (Array new: 100).\r\tsystemOrganizer categories do:\r\t\t[ :categ | \r\t\tcats := categ asString copyUpTo: $-.\r\t\t(str includes: cats) ifFalse: \r\t\t\t[str add: cats.\r\t\t\tstream nextPut: cats]].\r\t^stream contents! !\r\r!PackagePaneBrowser methodsFor: 'package list' stamp: 'stp 10/05/1998 19:48'!\rpackageListIndex\r\t\"Answer the index of the current package selection.\"\r\r\t^packageListIndex! !\r\r!PackagePaneBrowser methodsFor: 'package list' stamp: 'stp 12/01/1998 02:46'!\rpackageListIndex: anInteger \r\t\"Set anInteger to be the index of the current package selection.\"\r\r\tpackageListIndex := anInteger.\r\tanInteger = 0\r\t\tifFalse: [package := self packageList at: packageListIndex].\r\tmessageCategoryListIndex := 0.\r\tsystemCategoryListIndex := 0.\r\tmessageListIndex := 0.\r\tclassListIndex := 0.\r\tself setClassOrganizer.\r\tself changed: #packageSelectionChanged.\r\tself changed: #packageListIndex.\t\"update my selection\"\r\tself changed: #systemCategoryList.\t\"update the category list\"\r\tself systemCategoryListIndex: 0.\t\"update category list selection\"\r! !\r\r!PackagePaneBrowser methodsFor: 'package list' stamp: 'stp 10/06/1998 19:59'!\rpackageMenu: aMenu\r\t\"Answer a Menu of operations on class packages to be \r\tdisplayed when the operate menu button is pressed.\"\r\r\t^aMenu\r\t\t\tlabels: 'find class...\\recent classes...\\reorganize\\update' withCRs\r\t\t\tlines: #(2)\r\t\t\tselections: #(#findClass #recent #editSystemCategories #updatePackages)! !\r\r!PackagePaneBrowser methodsFor: 'package list' stamp: 'nk 2/14/2004 15:09'!\rupdatePackages\r\t\"Update the contents of the package list.\"\r\r\tself editSelection: #none.\r\tself changed: #packageList.\r\tself changed: #package.\r\tself packageListIndex: 0 ! !\r\r\r!PackagePaneBrowser methodsFor: 'system category list' stamp: 'JF 7/30/2003 12:23'!\rhasSystemCategorySelected\r\t^ systemCategoryListIndex ~= 0! !\r\r!PackagePaneBrowser methodsFor: 'system category list' stamp: 'stp 01/13/2000 12:59'!\rselectCategoryForClass: theClass\r\t\"Set the package and category lists to display the given class.\"\r\r\t| cat |\r\tcat := theClass category.\r\tself packageListIndex: (self packageList indexOf: (cat copyUpTo: $-)).\t\r\tself systemCategoryListIndex: (self systemCategoryList indexOf: \r\t\t\t(cat copyFrom: ((cat indexOf: $- ifAbsent: [0]) + 1) to: cat size)).! !\r\r!PackagePaneBrowser methodsFor: 'system category list' stamp: 'di 12/20/1999 20:16'!\rselectedSystemCategoryName\r\t\"Answer the name of the selected system category or nil.\"\r\r\tsystemCategoryListIndex = 0\r\t\tifTrue: [^nil].\r\tpackageListIndex = 0\r\t\tifTrue: [^ self systemCategoryList at: systemCategoryListIndex].\r\t^ self package , '-' , (self systemCategoryList at: systemCategoryListIndex)! !\r\r!PackagePaneBrowser methodsFor: 'system category list' stamp: 'di 12/16/1999 16:14'!\rsystemCategoryList\r\t\"Answer the sequenceable collection containing the class categories that \r\tthe receiver accesses.\"\r\r\t| prefix |\r\tpackageListIndex = 0 ifTrue: [^ systemOrganizer categories].\r\tprefix := self package, '-'.\r\t^ Array streamContents:\r\t\t[:strm |\r\t\tsystemOrganizer categories do: \r\t\t\t[ :cat | (cat beginsWith: prefix) ifTrue:\r\t\t\t\t[strm nextPut: (cat copyFrom: prefix size + 1 to: cat size)]]]! !\r\r\r!PackagePaneBrowser methodsFor: 'class list' stamp: 'JF 7/30/2003 12:26'!\rclassList\r\t\"Answer an array of the class names of the selected category. Answer an \r\tempty array if no selection exists.\"\r\r\t^ self hasSystemCategorySelected \r\t\tifFalse:\r\t\t\t[self packageClasses]\r\t\tifTrue: [systemOrganizer listAtCategoryNumber:\r\t\t\t(systemOrganizer categories indexOf: self selectedSystemCategoryName asSymbol)]! !\r\r!PackagePaneBrowser methodsFor: 'class list' stamp: 'JF 7/30/2003 12:36'!\rpackageClasses\r\t^ self categoryExistsForPackage\r\t\tifFalse: [Array new]\r\t\tifTrue:\r\t\t\t[systemOrganizer listAtCategoryNumber:\r\t\t\t\t(systemOrganizer categories indexOf: self package asSymbol)]! !\r\r!PackagePaneBrowser methodsFor: 'class list' stamp: 'ak 6/4/2000 09:07'!\rselectedClass\r\t\"Answer the class that is currently selected. Answer nil if no selection \r\texists.\"\r\r\t| name envt |\r\t(name _ self selectedClassName) ifNil: [^ nil].\r\t\"(envt _ self selectedEnvironment) ifNil: [^ nil].\"\r\tenvt_(Smalltalk environmentForCategory: self selectedSystemCategoryName).\r\t^ envt at: name! !\r\r\r!PackagePaneBrowser methodsFor: 'dragNDrop util' stamp: 'ls 6/22/2001 23:21'!\rdstCategoryDstListMorph: dstListMorph internal: internal \r\t| dropItem |\r\t^ internal & (dstListMorph getListSelector == #systemCategoryList)\r\t\tifTrue: [(dropItem _ dstListMorph potentialDropItem) ifNotNil: [(self package , '-' , dropItem) asSymbol]]\r\t\tifFalse: [self selectedSystemCategoryName]! !\r\r\r!PackagePaneBrowser methodsFor: 'dragNDrop' stamp: 'mir 5/29/2000 11:54'!\rchangeCategoryForClass: class srcSystemCategory: srcSystemCategorySel atListMorph: dstListMorph internal: internal copy: copyFlag \r\t\"only move semantic\"\r\t| newClassCategory success |\r\tself flag: #stringSymbolProblem.\r\tsuccess _ copyFlag not ifFalse: [^ false].\r\tnewClassCategory _ self dstCategoryDstListMorph: dstListMorph internal: internal.\r\t(success _ newClassCategory notNil & (newClassCategory ~= class category))\r\t\tifTrue: \r\t\t\t[class category: newClassCategory.\r\t\t\tself changed: #classList.\r\t\t\tinternal ifFalse: [self selectClass: class]].\r\t^ success! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rPackagePaneBrowser class\r\tinstanceVariableNames: ''!\r\r\r\r!PackagePaneBrowser class methodsFor: 'class initialization' stamp: 'asm 4/10/2003 13:15'!\rinitialize\r\r\tself registerInFlapsRegistry.! !\r\r!PackagePaneBrowser class methodsFor: 'class initialization' stamp: 'asm 4/10/2003 13:15'!\rregisterInFlapsRegistry\r\t\"Register the receiver in the system's flaps registry\"\r\tself environment\r\t\tat: #Flaps\r\t\tifPresent: [:cl | cl registerQuad: #(PackagePaneBrowser\tprototypicalToolWindow\t\t'Packages'\t\t\t'Package Browser:  like a System Browser, except that if has extra level of categorization in the top-left pane, such that class-categories are further organized into groups called \"packages\"') \r\t\t\t\t\t\tforFlapNamed: 'Tools']! !\r\r!PackagePaneBrowser class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 12:38'!\runload\r\t\"Unload the receiver from global registries\"\r\r\tself environment at: #Flaps ifPresent: [:cl |\r\tcl unregisterQuadsWithReceiver: self] ! !\rDisplayText subclass: #Paragraph\r\tinstanceVariableNames: 'clippingRectangle compositionRectangle destinationForm rule mask marginTabsLevel lines lastLine'\r\tclassVariableNames: ''\r\tpoolDictionaries: 'TextConstants'\r\tcategory: 'ST80-Support'!\r!Paragraph commentStamp: '<historical>' prior: 0!\rI represent displayable text that has been decoraged with margin alignment, line leading, and tab settings.!\r\r\r!Paragraph methodsFor: 'accessing'!\rbackgroundColor\r\tbackColor == nil ifTrue: [^ Color white].\r\t^ backColor! !\r\r!Paragraph methodsFor: 'accessing'!\rclippingRectangle \r\t\"Answer the rectangle, defined in absolute coordinates, whose \r\tintersection with the destinationForm is the area in which the characters \r\tare constrained to display.\"\r\r\t^clippingRectangle! !\r\r!Paragraph methodsFor: 'accessing' stamp: 'di 10/5/97 15:33'!\rclippingRectangle: clipRect \r\tclippingRectangle _ clipRect! !\r\r!Paragraph methodsFor: 'accessing'!\rcompositionRectangle\r\t\"Answer the rectangle whose width is the dimension, modified by \r\tindents and tabsLevels, against which line wraparound is measured. The \r\theight of the compositionRectangle is reset each time recomposition is \r\trequired.\"\r\r\t^compositionRectangle! !\r\r!Paragraph methodsFor: 'accessing'!\rcompositionRectangle: compRectangle \r\t\"Set the rectangle whose width is the dimension, modified by indents and \r\ttabsLevels, against which line wraparound is measured.\"\r\r\tcompositionRectangle _ compRectangle.\r\tself composeAll! !\r\r!Paragraph methodsFor: 'accessing'!\rdestinationForm \r\t \"Answer the Form into which the characters are scanned.\"\r\r\t^destinationForm! !\r\r!Paragraph methodsFor: 'accessing'!\rfillColor \r\t\"Answer the Form with which each character is combined by the scanner \r\tbefore applying the rule for display.\"\r\r\t^mask! !\r\r!Paragraph methodsFor: 'accessing'!\rfillColor: maskForm \r\t\"Set the argument, maskForm, to be the form with which each character \r\tis combined by the scanner before applying the rule for display.\"\r\r\tmask _ maskForm! !\r\r!Paragraph methodsFor: 'accessing'!\rheight \r\t\"Answer the height of the composition rectangle.\"\r\r\t^compositionRectangle height! !\r\r!Paragraph methodsFor: 'accessing'!\rindentationOfLineIndex: lineIndex ifBlank: aBlock\r\t\"Answer the number of leading tabs in the line at lineIndex.  If there are\r\t no visible characters, pass the number of tabs to aBlock and return its value.\r\t If the line is word-wrap overflow, back up a line and recur.\"\r\r\t| arrayIndex first last reader leadingTabs lastSeparator cr tab ch |\r\tcr _ Character cr.\r\ttab _ Character tab.\r\tarrayIndex _ lineIndex.\r\t[first _ (lines at: arrayIndex) first.\r\t first > 1 and: [(text string at: first - 1) ~~ cr]] whileTrue: \"word wrap\"\r\t\t[arrayIndex _ arrayIndex - 1].\r\tlast _ (lines at: lastLine) last.\r\treader _ ReadStream on: text string from: first to: last.\r\tleadingTabs _ 0.\r\t[reader atEnd not and: [(ch _ reader next) == tab]]\r\t\twhileTrue: [leadingTabs _ leadingTabs + 1].\r\tlastSeparator _ first - 1 + leadingTabs.\r\t[reader atEnd not and: [ch isSeparator and: [ch ~~ cr]]]\r\t\twhileTrue: [lastSeparator _ lastSeparator + 1. ch _ reader next].\r\tlastSeparator = last | (ch == cr)\r\t\tifTrue: [^aBlock value: leadingTabs].\r\t^leadingTabs! !\r\r!Paragraph methodsFor: 'accessing'!\rmask \r\t\"Answer the Form with which each character is combined by the scanner \r\tbefore applying the rule for display.\"\r\r\t^mask! !\r\r!Paragraph methodsFor: 'accessing'!\rnumberOfLines \r\t\"Answer the number of lines of text in the receiver.\"\r\r\t^lastLine! !\r\r!Paragraph methodsFor: 'accessing' stamp: 'ar 5/18/2000 18:34'!\rreplaceFrom: start to: stop with: aText displaying: displayBoolean\r\t\"Replace the receiver's text starting at position start, stopping at stop, by \r\tthe characters in aText. It is expected that most requirements for \r\tmodifications to the receiver will call this code. Certainly all cut's or \r\tpaste's.\" \r\r\t| compositionScanner obsoleteLines obsoleteLastLine firstLineIndex lastLineIndex\r\tstartLine stopLine replacementRange visibleRectangle startIndex newLine done\r\tnewStop obsoleteY newY moveRectangle |\r\r\ttext replaceFrom: start to: stop with: aText.\t\t\"Update the text.\"\r\tlastLine = 0 ifTrue:\r\t\t[\"if lines have never been set up, measure them and display\r\t\tall the lines falling in the visibleRectangle\"\r\t\tself composeAll.\r\t\tdisplayBoolean ifTrue: [^ self displayLines: (1 to: lastLine)]].\r\r\t\"save -- things get pretty mashed as we go along\"\r\tobsoleteLines _ lines copy.\r\tobsoleteLastLine _ lastLine.\r\r\t\"find the starting and stopping lines\"\r\tfirstLineIndex _ startLine _ self lineIndexOfCharacterIndex: start.\r\tstopLine _ self lineIndexOfCharacterIndex: stop.\r\r\t\"how many characters being inserted or deleted\r\t\t-- negative if aText size is < characterInterval size.\"\r\treplacementRange _ aText size - (stop - start + 1).\r\t\"Give ourselves plenty of elbow room.\"\r\tcompositionRectangle _ compositionRectangle withHeight: (textStyle lineGrid * 9999).\r\t\"build a boundingBox of the actual screen space in question -- we'll need it later\"\r\tvisibleRectangle _ (clippingRectangle intersect: compositionRectangle)\r\t\t\t\t\t\t\tintersect: destinationForm boundingBox.\r\tcompositionScanner _ CompositionScanner new forParagraph: self.\t\t\"Initialize a scanner.\"\r\r\t\"If the starting line is not also the first line, then measuring must commence from line preceding the one in which characterInterval start appears.  For example, deleting a line with only a carriage return may move characters following the deleted portion of text into the line preceding the deleted line.\"\r\tstartIndex _ (lines at: firstLineIndex) first.\r\tstartLine > 1\r\t\tifTrue: \t[newLine _ compositionScanner composeLine: startLine - 1\r\t\t\t\t\t\tfromCharacterIndex: (lines at: startLine - 1) first\r\t\t\t\t\t\tinParagraph: self.\r\t\t\t\t(lines at: startLine - 1) = newLine\r\t\t\t\t\tifFalse:\t[\"start in line preceding the one with the starting character\"\r\t\t\t\t\t\t\tstartLine _ startLine - 1.\r\t\t\t\t\t\t\tself lineAt: startLine put: newLine.\r\t\t\t\t\t\t\tstartIndex _ newLine last + 1]].\r\tstartIndex > text size ifTrue:\r\t\t[\"nil lines after a deletion -- remeasure last line below\"\r\t\tself trimLinesTo: (firstLineIndex - 1 max: 0).\r\t\ttext size = 0 ifTrue:\r\t\t\t[\"entire text deleted -- clear visibleRectangle and return.\"\r\t\t\tdisplayBoolean ifTrue: [destinationForm fill: visibleRectangle rule: rule fillColor: self backgroundColor].\r\t\t\tself updateCompositionHeight.\r\t\t\t^self]].\r\r\t\"Now we really get to it.\"\r\tdone _ false.\r\tlastLineIndex _ stopLine.\r\t[done or: [startIndex > text size]]\r\t\twhileFalse: \r\t\t[self lineAt: firstLineIndex put:\r\t\t\t(newLine _ compositionScanner composeLine: firstLineIndex\r\t\t\t\t\t\t\tfromCharacterIndex: startIndex inParagraph: self).\r\t\t[(lastLineIndex > obsoleteLastLine\r\t\t\tor: [\"no more old lines to compare with?\"\r\t\t\t\tnewLine last <\r\t\t\t\t\t(newStop _ (obsoleteLines at: lastLineIndex) last + replacementRange)])\r\t\t\t  \tor: [done]]\r\t\t\twhileFalse: \r\t\t\t[newStop = newLine last\r\t\t\t\tifTrue:\t[\"got the match\"\r\t\t\t\t\t\t\"get source and dest y's for moving the unchanged lines\"\r\t\t\t\t\t\tobsoleteY _ self topAtLineIndex: lastLineIndex + 1\r\t\t\t\t\t\t\t\t\tusing: obsoleteLines and: obsoleteLastLine.\r\t\t\t\t\t\tnewY _ self topAtLineIndex: firstLineIndex + 1.\r\t\t\t\t\t\tstopLine _ firstLineIndex.\r\t\t\t\t\t\tdone _ true.\r\t\t\t\t\t\t\t\"Fill in the new line vector with the old unchanged lines.\r\t\t\t\t\t\t\tUpdate their starting and stopping indices on the way.\"\r\t\t\t\t\t\t((lastLineIndex _ lastLineIndex + 1) to: obsoleteLastLine) do:\r\t\t\t\t\t\t\t[:upDatedIndex | \r\t\t\t\t\t\t\tself lineAt: (firstLineIndex _ firstLineIndex + 1) \r\t\t\t\t\t\t\t\tput: ((obsoleteLines at: upDatedIndex)\r\t\t\t\t\t\t\t  \t\tslide: replacementRange)].\r\t\t\t\t\t\t\t\"trim off obsolete lines, if any\"\r\t\t\t\t\t\tself trimLinesTo: firstLineIndex]\r\t\t\t\tifFalse:\t[lastLineIndex _ lastLineIndex + 1]].\r\t\tstartIndex _ newLine last + 1.\r\t\tfirstLineIndex _ firstLineIndex + 1].\r\r\t\"Now the lines are up to date -- Whew!!.  What remains is to move\r\tthe 'unchanged' lines and display those which have changed.\"\r\tdisplayBoolean   \"Not much to do if not displaying\"\r\t\tifFalse: [^ self updateCompositionHeight].\r\tstartIndex > text size ifTrue:\r\t\t[\"If at the end of previous lines simply display lines from the line in\r\t\twhich the first character of the replacement occured through the\r\t\tend of the paragraph.\"\r\t\tself updateCompositionHeight.\r\t\tself displayLines:\r\t\t\t(startLine to: (stopLine _ firstLineIndex min: lastLine)).\r\t\tdestinationForm  \"Clear out area at the bottom\"\r\t\t\tfill: ((visibleRectangle left @ (self topAtLineIndex: lastLine + 1)\r\t\t\t\t\t\textent: visibleRectangle extent)\r\t\t\t\t\tintersect: visibleRectangle)\r\t\t\trule: rule fillColor: self backgroundColor]\r\t\tifFalse:\r\t\t[newY ~= obsoleteY ifTrue:\r\t\t\t[\"Otherwise first move the unchanged lines within\r\t\t\tthe visibleRectangle with a good old bitblt.\"\r\t\t\tmoveRectangle _\r\t\t\t\tvisibleRectangle left @ (obsoleteY max: visibleRectangle top)\r\t\t\t\t\tcorner: visibleRectangle corner.\r\t\t\tdestinationForm copyBits: moveRectangle from: destinationForm\r\t\t\t\tat: moveRectangle origin + (0 @ (newY-obsoleteY))\r\t\t\t\tclippingBox: visibleRectangle\r\t\t\t\trule: Form over fillColor: nil].\r\r\t\t\"Then display the altered lines.\"\r\t\tself displayLines: (startLine to: stopLine).\r\r\t\tnewY < obsoleteY\r\t\t\tifTrue:\r\t\t\t[(self topAtLineIndex: obsoleteLastLine+1 using: obsoleteLines and: obsoleteLastLine) > visibleRectangle bottom\r\t\t\t\tifTrue:\r\t\t\t\t[\"A deletion may have 'pulled' previously undisplayed lines\r\t\t\t\tinto the visibleRectangle.  If so, display them.\"\r\t\t\t\tself displayLines:\r\t\t\t\t\t((self lineIndexOfTop: visibleRectangle bottom - (obsoleteY - newY))\r\t\t\t\t\t\tto: (self lineIndexOfTop: visibleRectangle bottom))].\r\t\t\t\"Clear out obsolete material at the bottom of the visibleRectangle.\"\r\t\t\tdestinationForm\r\t\t\t\tfill: ((visibleRectangle left @ ((self bottomAtLineIndex: lastLine) + 1)\r\t\t\t\t\t\textent: visibleRectangle extent)\r\t\t\t\t\tintersect: visibleRectangle)  \"How about just corner: ??\"\r\t\t\t\trule: rule fillColor: self backgroundColor].\r\r\t\t(newY > obsoleteY and: [obsoleteY < visibleRectangle top])\r\t\t\tifTrue:\r\t\t\t\t[\"An insertion may have 'pushed' previously undisplayed lines\r\t\t\t\tinto the visibleRectangle.  If so, display them.\"\r\t\t\t\tself displayLines:\r\t\t\t\t\t((self lineIndexOfTop: visibleRectangle top)\r\t\t\t\t\t\tto: (self lineIndexOfTop: visibleRectangle top + (newY-obsoleteY)))].\r\r\t\tself updateCompositionHeight]! !\r\r!Paragraph methodsFor: 'accessing'!\rrule \r\t\"Answer the rule according to which character display behaves. For \r\texample, rule may equal over, under, reverse.\"\r\r\t^rule! !\r\r!Paragraph methodsFor: 'accessing'!\rrule: ruleInteger \r\t\"Set the rule according to which character display behaves.\"\r\r\trule _ ruleInteger! !\r\r!Paragraph methodsFor: 'accessing' stamp: 'sw 10/29/1999 18:11'!\rstringAtLineNumber: aNumber\r\t(aNumber > lastLine or: [aNumber < 1]) ifTrue: [^ nil].\r\t^ (text string copyFrom: (lines at: aNumber) first to: (lines at: aNumber) last) copyWithout: Character cr! !\r\r!Paragraph methodsFor: 'accessing'!\rtext: aText \r\t\"Set the argument, aText, to be the text for the receiver.\"\r\r\ttext _ aText.\r\tself composeAll! !\r\r\r!Paragraph methodsFor: 'displaying'!\rdisplayOn: aDisplayMedium\r\t\"Because Paragraphs cache so much information, computation is avoided\r\tand displayAt: 0@0 is not appropriate here.\"\r\r\tself displayOn: aDisplayMedium\r\t\tat: compositionRectangle topLeft\r\t\tclippingBox: clippingRectangle\r\t\trule: rule\r\t\tfillColor: mask! !\r\r!Paragraph methodsFor: 'displaying'!\rdisplayOn: aDisplayMedium at: aPoint\r\t\"Use internal clippingRect; destination cliping is done during actual display.\"\r\r\tself displayOn: aDisplayMedium at: aPoint\r\t\tclippingBox: (clippingRectangle translateBy: aPoint - compositionRectangle topLeft)\r\t\trule: rule fillColor: mask! !\r\r!Paragraph methodsFor: 'displaying'!\rdisplayOn: aDisplayMedium at: aDisplayPoint clippingBox: clipRectangle rule: ruleInteger fillColor: aForm\r\t\"Default display message when aDisplayPoint is in absolute screen\r\tcoordinates.\"\r\r\trule _ ruleInteger.\r\tmask _ aForm.\r\tclippingRectangle _ clipRectangle.\r\tcompositionRectangle _ aDisplayPoint extent: compositionRectangle extent.\r\t(lastLine == nil or: [lastLine < 1]) ifTrue: [self composeAll].\r\tself displayOn: aDisplayMedium lines: (1 to: lastLine)! !\r\r!Paragraph methodsFor: 'displaying'!\rdisplayOn: aDisplayMedium transformation: displayTransformation clippingBox: clipRectangle align: alignmentPoint with: relativePoint rule: ruleInteger fillColor: aForm \r\r\tself\t\t\t\t\"Assumes offset has been set!!!!!!!!!!\"\r\t  displayOn: aDisplayMedium\r\t  at: (offset \r\t\t\t+ (displayTransformation applyTo: relativePoint) \r\t\t\t- alignmentPoint) rounded\r\t  clippingBox: clipRectangle\r\t  rule: ruleInteger\r\t  fillColor: aForm.\r\t! !\r\r\r!Paragraph methodsFor: 'display box access'!\rboundingBox\r\r\t^offset extent: compositionRectangle extent! !\r\r!Paragraph methodsFor: 'display box access'!\rcomputeBoundingBox\r\r\t^offset extent: compositionRectangle extent! !\r\r\r!Paragraph methodsFor: 'composition' stamp: 'ar 5/18/2000 18:34'!\rcomposeAll\r\t\"Compose a collection of characters into a collection of lines.\"\r\r\t| startIndex stopIndex lineIndex maximumRightX compositionScanner |\r\tlines _ Array new: 32.\r\tlastLine _ 0.\r\tmaximumRightX _ 0.\r\ttext size = 0\r\t\tifTrue:\r\t\t\t[compositionRectangle _ compositionRectangle withHeight: 0.\r\t\t\t^maximumRightX].\r\tstartIndex _ lineIndex _ 1.\r\tstopIndex _ text size.\r\tcompositionScanner _ CompositionScanner new forParagraph: self.\r\t[startIndex > stopIndex] whileFalse: \r\t\t[self lineAt: lineIndex \r\t\t\t\tput: (compositionScanner composeLine: lineIndex \r\t\t\t\t\t\t\t\t\t\tfromCharacterIndex: startIndex \r\t\t\t\t\t\t\t\t\t\tinParagraph: self).\r\t\t maximumRightX _ compositionScanner rightX max: maximumRightX.\r\t\t startIndex _ (lines at: lineIndex) last + 1.\r\t\t lineIndex _ lineIndex + 1].\r\tself updateCompositionHeight.\r\tself trimLinesTo: lineIndex - 1.\r\t^ maximumRightX! !\r\r!Paragraph methodsFor: 'composition'!\rwrappingBox: compositionRect clippingBox: clippingRect \r\t\"Set the composition rectangle for the receiver so that the lines wrap \r\twithin the rectangle, compositionRect, and the display of the text is \r\tclipped by the rectangle, clippingRect.\"\r\r\tself compositionRectangle: compositionRect copy\r\t\t\t\ttext: text\r\t\t\t\tstyle: textStyle\r\t\t\t\toffset: offset.\r\tclippingRectangle _ clippingRect copy! !\r\r\r!Paragraph methodsFor: 'character location' stamp: 'ar 5/18/2000 18:33'!\rcharacterBlockAtPoint: aPoint \r\t\"Answer a CharacterBlock for characters in the text at point aPoint. It is \r\tassumed that aPoint has been transformed into coordinates appropriate to \r\tthe receiver's destinationForm rectangle and the compositionRectangle.\"\r\r\t^CharacterBlockScanner new characterBlockAtPoint: aPoint in: self! !\r\r!Paragraph methodsFor: 'character location' stamp: 'ar 5/18/2000 18:33'!\rcharacterBlockForIndex: targetIndex \r\t\"Answer a CharacterBlock for character in the text at targetIndex. The \r\tcoordinates in the CharacterBlock will be appropriate to the intersection \r\tof the destinationForm rectangle and the compositionRectangle.\"\r\r\t^CharacterBlockScanner new characterBlockForIndex: targetIndex in: self! !\r\r!Paragraph methodsFor: 'character location' stamp: 'di 10/5/1998 12:59'!\rdefaultCharacterBlock\r\t^ CharacterBlock new stringIndex: 1 text: text\r\t\t\ttopLeft: compositionRectangle topLeft extent: 0 @ 0! !\r\r\r!Paragraph methodsFor: 'selecting' stamp: 'ar 5/28/2000 12:10'!\rcaretFormForDepth: depth\r\t\"Return a caret form for the given depth.\"\r\t\"(Paragraph new caretFormForDepth: Display depth) displayOn: Display at: 0@0 rule: Form reverse\"\r\r\t| box f bb map |\r\tbox _ CaretForm boundingBox.\r\tf _ Form extent: box extent depth: depth.\r\tmap _ (Color cachedColormapFrom: CaretForm depth to: depth) copy.\r\tmap at: 1 put: (Color transparent pixelValueForDepth: depth).\r\tmap at: 2 put: (Color quickHighLight: depth) first.  \"pixel value for reversing\"\r\tbb _ BitBlt current toForm: f.\r\tbb\r\t\tsourceForm: CaretForm;\r\t\tsourceRect: box;\r\t\tdestOrigin: 0@0;\r\t\tcolorMap: map;\r \t\tcombinationRule: Form over;\r\t\tcopyBits.\r\t^ f! !\r\r!Paragraph methodsFor: 'selecting' stamp: 'dvf 10/1/2003 13:28'!\rclickAt: clickPoint for: model controller: aController\r\t\"Give sensitive text a chance to fire.  Display flash: (100@100 extent: 100@100).\"\r\t| startBlock action range box boxes |\r\taction _ false.\r\tstartBlock _ self characterBlockAtPoint: clickPoint.\r\t(text attributesAt: startBlock stringIndex forStyle: textStyle) \r\t\tdo: [:att | att mayActOnClick ifTrue:\r\t\t\t\t[range _ text rangeOf: att startingAt: startBlock stringIndex.\r\t\t\t\tboxes _ self selectionRectsFrom: (self characterBlockForIndex: range first) \r\t\t\t\t\t\t\tto: (self characterBlockForIndex: range last+1).\r\t\t\t\tbox _ boxes detect: [:each | each containsPoint: clickPoint]\r\t\t\t\t\t\t\tifNone: [^ action].\r\t\t\t\tUtilities awaitMouseUpIn: box repeating: []\r\t\t\t\t\tifSucceed: [aController terminateAndInitializeAround:\r\t\t\t\t\t\t\t\t[(att actOnClickFor: model in: self at: clickPoint editor: aController) ifTrue: [action _ true]]]]].\r\t^ action! !\r\r!Paragraph methodsFor: 'selecting'!\rextendSelectionAt: beginBlock endBlock: endBlock \r\t\"Answer with an Array of two CharacterBlocks that represent the text \r\tselection that the user makes.\"\r\t\r\t(self characterBlockAtPoint: Sensor cursorPoint) <= beginBlock\r\t\tifTrue: [^self mouseMovedFrom: beginBlock \r\t\t\t\t\tpivotBlock: endBlock\r\t\t\t\t\tshowingCaret: (beginBlock = endBlock)]\r\t\tifFalse: [^self mouseMovedFrom: endBlock \r\t\t\t\t\tpivotBlock: beginBlock\r\t\t\t\t\tshowingCaret: (beginBlock = endBlock)]\r! !\r\r!Paragraph methodsFor: 'selecting' stamp: 'th 9/19/2002 17:27'!\rextendSelectionMark: markBlock pointBlock: pointBlock \r\t\"Answer with an Array of two CharacterBlocks that represent the text \r\tselection that the user makes.\"\r\ttrue \r\t\tifTrue:[^self mouseMovedFrom: pointBlock\r\t\t\t\t\tpivotBlock: markBlock\r\t\t\t\t\tshowingCaret:(pointBlock = markBlock)]\r\t\tifFalse:\r\t\t[\t| beginBlock endBlock |\r\t\t\tbeginBlock _ markBlock min: pointBlock.\r\t\t\tendBlock _ markBlock max: endBlock.\r\t\r\t\t\t(self characterBlockAtPoint: Sensor cursorPoint) <= beginBlock\r\t\t\t\tifTrue: [^self mouseMovedFrom: beginBlock \r\t\t\t\t\t\t\tpivotBlock: endBlock\r\t\t\t\t\t\t\tshowingCaret: (beginBlock = endBlock)]\r\t\t\t\tifFalse: [^self mouseMovedFrom: endBlock \r\t\t\t\t\t\t\tpivotBlock: beginBlock\r\t\t\t\t\t\t\tshowingCaret: (beginBlock = endBlock)]\r\t\t]\r! !\r\r!Paragraph methodsFor: 'selecting' stamp: 'jm 7/1/1999 12:31'!\rhiliteRect: rect\r\r\t| highlightColor |\r\thighlightColor _ Color quickHighLight: destinationForm depth.\r\trect ifNotNil: [\r\t\tdestinationForm\r\t\t\tfill: rect\r\t\t\trule: Form reverse\r\t\t\tfillColor: highlightColor.\r\t\t\"destinationForm\r\t\t\tfill: (rect translateBy: 1@1)\r\t\t\trule: Form reverse\r\t\t\tfillColor: highlightColor\" ].\r! !\r\r!Paragraph methodsFor: 'selecting' stamp: 'jm 7/8/97 12:25'!\rmouseMovedFrom: beginBlock pivotBlock: pivotBlock showingCaret: caretOn \r\t| startBlock stopBlock showingCaret |\r\tstopBlock _ startBlock _ beginBlock.\r\tshowingCaret _ caretOn.\r\t[Sensor redButtonPressed]\r\t\twhileTrue: \r\t\t\t[stopBlock _ self characterBlockAtPoint: Sensor cursorPoint.\r\t\t\tstopBlock = startBlock\r\t\t\t\tifFalse: \r\t\t\t\t\t[showingCaret\r\t\t\t\t\t\tifTrue: \r\t\t\t\t\t\t\t[showingCaret _ false.\r\t\t\t\t\t\t\tself reverseFrom: pivotBlock to: pivotBlock].\r\t\t\t((startBlock >= pivotBlock and: [stopBlock >= pivotBlock])\r\t\t\t\tor: [startBlock <= pivotBlock and: [stopBlock <= pivotBlock]])\r\t\t\t\tifTrue: \r\t\t\t\t\t[self reverseFrom: startBlock to: stopBlock.\r\t\t\t\t\tstartBlock _ stopBlock]\r\t\t\t\tifFalse: \r\t\t\t\t\t[self reverseFrom: startBlock to: pivotBlock.\r\t\t\t\t\tself reverseFrom: pivotBlock to: stopBlock.\r\t\t\t\t\tstartBlock _ stopBlock].\r\t\t\t(clippingRectangle containsRect: stopBlock) ifFalse:\r\t\t\t\t[stopBlock top < clippingRectangle top\r\t\t\t\tifTrue: [self scrollBy: stopBlock top - clippingRectangle top\r\t\t\t\t\t\twithSelectionFrom: pivotBlock to: stopBlock]\r\t\t\t\tifFalse: [self scrollBy: stopBlock bottom + textStyle lineGrid - clippingRectangle bottom\r\t\t\t\t\t\twithSelectionFrom: pivotBlock to: stopBlock]]]].\r\tpivotBlock = stopBlock ifTrue:\r\t\t[showingCaret ifFalse:  \"restore caret\"\r\t\t\t[self reverseFrom: pivotBlock to: pivotBlock]].\r\t^ Array with: pivotBlock with: stopBlock! !\r\r!Paragraph methodsFor: 'selecting'!\rmouseSelect\r\t\"Answer with an Array of two CharacterBlocks that represent the text \r\tselection that the user makes.  Return quickly if the button is noticed up\r\tto make double-click more responsive.\"\r\r\t| pivotBlock startBlock stopBlock origPoint stillDown |\r\tstillDown _ Sensor redButtonPressed.\r\tpivotBlock _ startBlock _ stopBlock _\r\t\tself characterBlockAtPoint: (origPoint _ Sensor cursorPoint).\r\tstillDown _ stillDown and: [Sensor redButtonPressed].\r\tself reverseFrom: startBlock to: startBlock.\r\t[stillDown and: [Sensor cursorPoint = origPoint]] whileTrue:\r\t\t[stillDown _ Sensor redButtonPressed].\r\t(stillDown and: [clippingRectangle containsPoint: Sensor cursorPoint])\r\t\tifFalse: [^Array with: pivotBlock with: stopBlock].\r\t^ self mouseMovedFrom: startBlock \r\t\tpivotBlock: pivotBlock\r\t\tshowingCaret: true! !\r\r!Paragraph methodsFor: 'selecting'!\rmouseSelect: clickPoint \r\t\"Track text selection and answer with an Array of two CharacterBlocks.\"\r\t| startBlock |\r\tstartBlock _ self characterBlockAtPoint: clickPoint.\r\tself reverseFrom: startBlock to: startBlock.\r\t^ self mouseMovedFrom: startBlock \r\t\tpivotBlock: startBlock\r\t\tshowingCaret: true! !\r\r!Paragraph methodsFor: 'selecting'!\rreverseFrom: characterBlock1 to: characterBlock2 \r\t\"Reverse area between the two character blocks given as arguments.\"\r\t| visibleRectangle initialRectangle interiorRectangle finalRectangle lineNo baseline caret |\r\tcharacterBlock1 = characterBlock2 ifTrue:\r\t\t[lineNo _ self lineIndexOfCharacterIndex: characterBlock1 stringIndex.\r\t\tbaseline _ lineNo = 0 ifTrue: [textStyle baseline]\r\t\t\t\t\t\t\tifFalse: [(lines at: lineNo) baseline].\r\t\tcaret _ self caretFormForDepth: Display depth.\r\t\t^ caret  \"Use a caret to indicate null selection\"\r\t\t\t\tdisplayOn: destinationForm\r\t\t\t\tat: characterBlock1 topLeft + (-3 @ baseline)\r\t\t\t\tclippingBox: clippingRectangle\r\t\t\t\trule: (false \"Display depth>8\" ifTrue: [9 \"not-reverse\"]\r\t\t\t\t\t\t\t\t\tifFalse: [Form reverse])\r\t\t\t\tfillColor: nil].\r\tvisibleRectangle _ \r\t\t(clippingRectangle intersect: compositionRectangle)\r\t\t\t\"intersect: destinationForm boundingBox\" \"not necessary\".\r\tcharacterBlock1 top = characterBlock2 top\r\t\tifTrue: [characterBlock1 left < characterBlock2 left\r\t\t\t\t\tifTrue: \r\t\t\t\t\t\t[initialRectangle _ \r\t\t\t\t\t\t\t(characterBlock1 topLeft corner: characterBlock2 bottomLeft)\r\t\t\t\t\t\t\t\tintersect: visibleRectangle]\r\t\t\t\t\tifFalse: \r\t\t\t\t\t\t[initialRectangle _ \r\t\t\t\t\t\t\t(characterBlock2 topLeft corner: characterBlock1 bottomLeft)\r\t\t\t\t\t\t\t\tintersect: visibleRectangle]]\r\t\tifFalse: [characterBlock1 top < characterBlock2 top\r\t\t\t\t\tifTrue: \r\t\t\t\t\t\t[initialRectangle _ \r\t\t\t\t\t\t\t(characterBlock1 topLeft \r\t\t\t\t\t\t\t\tcorner: visibleRectangle right @ characterBlock1 bottom)\r\t\t\t\t\t\t\t\tintersect: visibleRectangle.\r\t\t\t\t\t\tcharacterBlock1 bottom = characterBlock2 top\r\t\t\t\t\t\t\tifTrue: \r\t\t\t\t\t\t\t\t[finalRectangle _ \r\t\t\t\t\t\t\t\t\t(visibleRectangle left @ characterBlock2 top \r\t\t\t\t\t\t\t\t\t\tcorner: characterBlock2 bottomLeft)\r\t\t\t\t\t\t\t\t\t\tintersect: visibleRectangle]\r\t\t\t\t\t\t\tifFalse: \r\t\t\t\t\t\t\t\t[interiorRectangle _ \r\t\t\t\t\t\t\t\t\t(visibleRectangle left @ characterBlock1 bottom\r\t\t\t\t\t\t\t\t\t\tcorner: visibleRectangle right \r\t\t\t\t\t\t\t\t\t\t\t\t\t\t@ characterBlock2 top)\r\t\t\t\t\t\t\t\t\t\tintersect: visibleRectangle.\r\t\t\t\t\t\t\t\tfinalRectangle _ \r\t\t\t\t\t\t\t\t\t(visibleRectangle left @ characterBlock2 top \r\t\t\t\t\t\t\t\t\t\tcorner: characterBlock2 bottomLeft)\r\t\t\t\t\t\t\t\t\t\tintersect: visibleRectangle]]\r\t\t\t\tifFalse: \r\t\t\t\t\t[initialRectangle _ \r\t\t\t\t\t\t(visibleRectangle left @ characterBlock1 top \r\t\t\t\t\t\t\tcorner: characterBlock1 bottomLeft)\r\t\t\t\t\t\t\tintersect: visibleRectangle.\r\t\t\t\t\tcharacterBlock1 top = characterBlock2 bottom\r\t\t\t\t\t\tifTrue: \r\t\t\t\t\t\t\t[finalRectangle _ \r\t\t\t\t\t\t\t\t(characterBlock2 topLeft \r\t\t\t\t\t\t\t\t\tcorner: visibleRectangle right \r\t\t\t\t\t\t\t\t\t\t\t\t@ characterBlock2 bottom)\r\t\t\t\t\t\t\t\t\tintersect: visibleRectangle]\r\t\t\t\t\t\tifFalse: \r\t\t\t\t\t\t\t[interiorRectangle _ \r\t\t\t\t\t\t\t\t(visibleRectangle left @ characterBlock2 bottom \r\t\t\t\t\t\t\t\t\tcorner: visibleRectangle right @ characterBlock1 top)\r\t\t\t\t\t\t\t\t\tintersect: visibleRectangle.\r\t\t\t\t\t\t\tfinalRectangle _ \r\t\t\t\t\t\t\t\t(characterBlock2 topLeft \r\t\t\t\t\t\t\t\t\tcorner: visibleRectangle right \r\t\t\t\t\t\t\t\t\t\t\t\t@ characterBlock2 bottom)\r\t\t\t\t\t\t\t\t\tintersect: visibleRectangle]]].\r\tself hiliteRect: initialRectangle.\r\tself hiliteRect: interiorRectangle.\r\tself hiliteRect: finalRectangle.! !\r\r!Paragraph methodsFor: 'selecting' stamp: 'di 12/1/97 04:43'!\rselectionRectsFrom: characterBlock1 to: characterBlock2 \r\t\"Return an array of rectangles representing the area between the two character blocks given as arguments.\"\r\t| visibleRectangle initialRectangle interiorRectangle finalRectangle lineNo baseline |\r\tcharacterBlock1 = characterBlock2 ifTrue:\r\t\t[lineNo _ self lineIndexOfCharacterIndex: characterBlock1 stringIndex.\r\t\tbaseline _ lineNo = 0 ifTrue: [textStyle baseline]\r\t\t\t\t\t\t\tifFalse: [(lines at: lineNo) baseline].\r\t\t^ Array with: (characterBlock1 topLeft extent: 1 @ baseline)].\r\tvisibleRectangle _ clippingRectangle intersect: compositionRectangle.\r\tcharacterBlock1 top = characterBlock2 top\r\t\tifTrue: [characterBlock1 left < characterBlock2 left\r\t\t\t\t\tifTrue: \r\t\t\t\t\t\t[initialRectangle _ \r\t\t\t\t\t\t\t(characterBlock1 topLeft corner: characterBlock2 bottomLeft)\r\t\t\t\t\t\t\t\tintersect: visibleRectangle]\r\t\t\t\t\tifFalse: \r\t\t\t\t\t\t[initialRectangle _ \r\t\t\t\t\t\t\t(characterBlock2 topLeft corner: characterBlock1 bottomLeft)\r\t\t\t\t\t\t\t\tintersect: visibleRectangle]]\r\t\tifFalse: [characterBlock1 top < characterBlock2 top\r\t\t\t\t\tifTrue: \r\t\t\t\t\t\t[initialRectangle _ \r\t\t\t\t\t\t\t(characterBlock1 topLeft \r\t\t\t\t\t\t\t\tcorner: visibleRectangle right @ characterBlock1 bottom)\r\t\t\t\t\t\t\t\tintersect: visibleRectangle.\r\t\t\t\t\t\tcharacterBlock1 bottom = characterBlock2 top\r\t\t\t\t\t\t\tifTrue: \r\t\t\t\t\t\t\t\t[finalRectangle _ \r\t\t\t\t\t\t\t\t\t(visibleRectangle left @ characterBlock2 top \r\t\t\t\t\t\t\t\t\t\tcorner: characterBlock2 bottomLeft)\r\t\t\t\t\t\t\t\t\t\tintersect: visibleRectangle]\r\t\t\t\t\t\t\tifFalse: \r\t\t\t\t\t\t\t\t[interiorRectangle _ \r\t\t\t\t\t\t\t\t\t(visibleRectangle left @ characterBlock1 bottom\r\t\t\t\t\t\t\t\t\t\tcorner: visibleRectangle right \r\t\t\t\t\t\t\t\t\t\t\t\t\t\t@ characterBlock2 top)\r\t\t\t\t\t\t\t\t\t\tintersect: visibleRectangle.\r\t\t\t\t\t\t\t\tfinalRectangle _ \r\t\t\t\t\t\t\t\t\t(visibleRectangle left @ characterBlock2 top \r\t\t\t\t\t\t\t\t\t\tcorner: characterBlock2 bottomLeft)\r\t\t\t\t\t\t\t\t\t\tintersect: visibleRectangle]]\r\t\t\t\tifFalse: \r\t\t\t\t\t[initialRectangle _ \r\t\t\t\t\t\t(visibleRectangle left @ characterBlock1 top \r\t\t\t\t\t\t\tcorner: characterBlock1 bottomLeft)\r\t\t\t\t\t\t\tintersect: visibleRectangle.\r\t\t\t\t\tcharacterBlock1 top = characterBlock2 bottom\r\t\t\t\t\t\tifTrue: \r\t\t\t\t\t\t\t[finalRectangle _ \r\t\t\t\t\t\t\t\t(characterBlock2 topLeft \r\t\t\t\t\t\t\t\t\tcorner: visibleRectangle right \r\t\t\t\t\t\t\t\t\t\t\t\t@ characterBlock2 bottom)\r\t\t\t\t\t\t\t\t\tintersect: visibleRectangle]\r\t\t\t\t\t\tifFalse: \r\t\t\t\t\t\t\t[interiorRectangle _ \r\t\t\t\t\t\t\t\t(visibleRectangle left @ characterBlock2 bottom \r\t\t\t\t\t\t\t\t\tcorner: visibleRectangle right @ characterBlock1 top)\r\t\t\t\t\t\t\t\t\tintersect: visibleRectangle.\r\t\t\t\t\t\t\tfinalRectangle _ \r\t\t\t\t\t\t\t\t(characterBlock2 topLeft \r\t\t\t\t\t\t\t\t\tcorner: visibleRectangle right \r\t\t\t\t\t\t\t\t\t\t\t\t@ characterBlock2 bottom)\r\t\t\t\t\t\t\t\t\tintersect: visibleRectangle]]].\r\t^ (Array with: initialRectangle with: interiorRectangle with: finalRectangle)\r\t\t\tselect: [:rect | rect notNil]! !\r\r\r!Paragraph methodsFor: 'scrolling'!\rscrollBy: heightToMove \r\t^ self scrollBy: heightToMove withSelectionFrom: nil to: nil! !\r\r!Paragraph methodsFor: 'scrolling' stamp: 'hmm 9/16/2000 21:30'!\rscrollBy: heightToMove withSelectionFrom: startBlock to: stopBlock \r\t\"Translate the composition rectangle up (dy<0) by heightToMove.\r\tRepainting text as necessary, and selection if blocks not nil.\r\tReturn true unless scrolling limits have been reached.\"\r\t| max min amount |\r\tmax _ 0 max: \"cant scroll up more than dist to (top of) bottom line\"\r\t\tcompositionRectangle bottom - textStyle lineGrid - clippingRectangle top.\r\tmin _ 0 min: \"cant scroll down more than top is above clipRect\"\r\t\tcompositionRectangle top - clippingRectangle top.\r\tamount _ ((heightToMove truncateTo: textStyle lineGrid) min: max) max: min.\r\tamount ~= 0\r\t\tifTrue: [destinationForm deferUpdatesIn: clippingRectangle while: [\r\t\t\t\t\tself scrollUncheckedBy: amount\r\t\t\t\t\t\twithSelectionFrom: startBlock to: stopBlock].\r\t\t\t\t^ true]\r\t\tifFalse: [^ false]! !\r\r!Paragraph methodsFor: 'scrolling'!\rscrollDelta\r\t\"By comparing this before and after, you know if scrolling happened\"\r\t^ clippingRectangle top - compositionRectangle top! !\r\r!Paragraph methodsFor: 'scrolling'!\rscrollUncheckedBy: heightToMove withSelectionFrom: startBlock to: stopBlock \r\t\"Scroll by the given amount.  Copy bits where possible, display the rest.\r\tIf selection blocks are not nil, then select the newly visible text as well.\"\r\t| savedClippingRectangle delta |\r\tdelta _ 0 @ (0 - heightToMove).\r\tcompositionRectangle _ compositionRectangle translateBy: delta.\r\tstartBlock == nil ifFalse:\r\t\t[startBlock moveBy: delta.\r\t\tstopBlock moveBy: delta].\r\tsavedClippingRectangle _ clippingRectangle.\r\tclippingRectangle _ clippingRectangle intersect: Display boundingBox.\r\theightToMove abs >= clippingRectangle height\r\t  ifTrue: \r\t\t[\"Entire visible region must be repainted\"\r\t\tself displayLines: (1 to: lastLine) affectedRectangle: clippingRectangle]\r\t  ifFalse:\r\t\t[\"Copy bits where possible / display the rest\"\r\t\tdestinationForm\r\t\t\tcopyBits: clippingRectangle from: destinationForm\r\t\t\tat: clippingRectangle topLeft + delta\r\t\t\tclippingBox: clippingRectangle\r\t\t\trule: Form over fillColor: nil.\r\t\t\"Set clippingRectangle to 'vacated' area for lines 'pulled' into view.\"\r\t\tclippingRectangle _ heightToMove < 0\r\t\t\tifTrue:  \"On the top\"\r\t\t\t\t[clippingRectangle topLeft corner: clippingRectangle topRight + delta]\r\t\t\tifFalse:  \"At the bottom\"\r\t\t\t\t[clippingRectangle bottomLeft + delta corner: clippingRectangle bottomRight].\r\t\tself displayLines: (1 to: lastLine)   \"Refresh vacated region\"\r\t\t\taffectedRectangle: clippingRectangle].\r\tstartBlock == nil ifFalse:\r\t\t[self reverseFrom: startBlock to: stopBlock].\r\t\"And restore the clippingRectangle to its original value. \"\r\tclippingRectangle _ savedClippingRectangle! !\r\r\r!Paragraph methodsFor: 'alignment'!\rcentered \r\t\"Set the alignment for the style with which the receiver displays its text \r\tso that text is centered in the composition rectangle.\"\r\r\ttextStyle alignment: Centered! !\r\r!Paragraph methodsFor: 'alignment'!\rjustified \r\t\"Set the alignment for the style with which the receiver displays its text \r\tso that the characters in each of text end on an even border in the \r\tcomposition rectangle.\"\r\r\ttextStyle alignment: Justified! !\r\r!Paragraph methodsFor: 'alignment'!\rleftFlush \r\t\"Set the alignment for the style with which the receiver displays its text \r\tso that the characters in each of text begin on an even border in the \r\tcomposition rectangle. This is also known as ragged-right.\"\r\r\ttextStyle alignment: LeftFlush! !\r\r!Paragraph methodsFor: 'alignment'!\rrightFlush \r\t\"Set the alignment for the style with which the receiver displays its text \r\tso that the characters in each of text end on an even border in the \r\tcomposition rectangle but the beginning of each line does not. This is \r\talso known as ragged-left.\"\r\r\ttextStyle alignment: RightFlush! !\r\r!Paragraph methodsFor: 'alignment'!\rtoggleAlignment \r\t\"Set the alignment for the style with which the receiver displays its text \r\tso that it moves from centered to justified to leftFlush to rightFlush and \r\tback to centered again.\"\r\r\ttextStyle alignment: textStyle alignment + 1! !\r\r\r!Paragraph methodsFor: 'indicating'!\rflash \r\t\"Complement twice the visible area in which the receiver displays.\"\r\r\tDisplay flash: clippingRectangle! !\r\r!Paragraph methodsFor: 'indicating'!\routline \r\t\"Display a border around the visible area in which the receiver presents \r\tits text.\"\r\r\tclippingRectangle bottom <= compositionRectangle bottom\r\t  ifTrue: [Display \r\t\t\t\tborder: (clippingRectangle intersect: compositionRectangle) \r\t\t\t\twidth: 2]\r\t  ifFalse: [Display \r\t\t\t\tborder: (clippingRectangle intersect: destinationForm boundingBox)\r\t\t\t\twidth: 2].\r\t! !\r\r\r!Paragraph methodsFor: 'utilities'!\rclearVisibleRectangle \r\t\"Display the area in which the receiver presents its text so that the area \r\tis all one tone--in this case, all white.\"\r\r\tdestinationForm\r\t  fill: clippingRectangle\r\t  rule: rule\r\t  fillColor: self backgroundColor! !\r\r!Paragraph methodsFor: 'utilities'!\rdeepCopy\r\t\"Don't want to copy the destForm (Display) or fonts in the TextStyle.  9/13/96 tk\"\r\r\t| new |\r\tnew _ self copy.\r\tnew textStyle: textStyle copy.\r\tnew destinationForm: destinationForm.\r\tnew lines: lines copy.\r\tnew text: text deepCopy.\r\t^ new! !\r\r!Paragraph methodsFor: 'utilities'!\rdestinationForm: destForm\r\tdestinationForm _ destForm! !\r\r!Paragraph methodsFor: 'utilities'!\rfit\r\t\"Make the bounding rectangle of the receiver contain all the text without \r\tchanging the width of the receiver's composition rectangle.\"\r\r\t[(self lineIndexOfTop: clippingRectangle top) = 1]\r\t\twhileFalse: [self scrollBy: (0-1)*textStyle lineGrid].\r\tself updateCompositionHeight.\r\tclippingRectangle _ clippingRectangle withBottom: compositionRectangle bottom! !\r\r!Paragraph methodsFor: 'utilities'!\rlines: lineArray\r\tlines _ lineArray! !\r\r!Paragraph methodsFor: 'utilities'!\rvisibleRectangle \r\t\"May be less than the clippingRectangle if text ends part way down.\r\tAlso some fearful history includes Display intersection;\r\tit shouldn't be necessary\"\r\r\t^ (clippingRectangle intersect: compositionRectangle)\r\t\tintersect: destinationForm boundingBox! !\r\r\r!Paragraph methodsFor: 'converting' stamp: 'yo 6/23/2003 19:05'!\rasForm\r\t\"Answer a Form made up of the bits that represent the receiver's displayable text.\"\r\t| theForm oldBackColor oldForeColor |\r\ttextStyle isTTCStyle ifTrue: [\r\t\ttheForm _  (Form extent: compositionRectangle extent depth: 32)\r\t\toffset: offset.\r\t] ifFalse: [\r\t\ttheForm _ (ColorForm extent: compositionRectangle extent)\r\t\t\toffset: offset;\r\t\t\tcolors: (Array\r\t\t\t\twith: (backColor == nil ifTrue: [Color transparent] ifFalse: [backColor])\r\t\t\t\twith: (foreColor == nil ifTrue: [Color black] ifFalse: [foreColor])).\r\t].\r\toldBackColor _ backColor.\r\toldForeColor _ foreColor.\r\tbackColor _ Color white.\r\tforeColor _ Color black.\r\tself displayOn: theForm\r\t\tat: 0@0\r\t\tclippingBox: theForm boundingBox\r\t\trule: Form over\r\t\tfillColor: nil.\r\tbackColor _ oldBackColor.\r\tforeColor _ oldForeColor.\r\t^ theForm\r\r\"Example:\r| p |\rp _ 'Abc' asParagraph.\rp foregroundColor: Color red backgroundColor: Color black.\rp asForm displayOn: Display at: 30@30 rule: Form over\"\r! !\r\r!Paragraph methodsFor: 'converting'!\rasString\r\t\"Answer the string of characters of the receiver's text.\"\r\r\t^text string! !\r\r!Paragraph methodsFor: 'converting'!\rasText\r\t\"Answer the receiver's text.\"\r\r\t^text! !\r\r\r!Paragraph methodsFor: 'private'!\rbottomAtLineIndex: lineIndex \r\t\"Answer the bottom y of given line.\"\r\t| y |\r\ty _ compositionRectangle top.\r\tlastLine = 0 ifTrue: [^ y + textStyle lineGrid].\r\t1 to: (lineIndex min: lastLine) do:\r\t\t[:i | y _ y + (lines at: i) lineHeight].\r\t^ y\r! !\r\r!Paragraph methodsFor: 'private' stamp: 'tk 9/30/96'!\rcompositionRectangle: compositionRect text: aText style: aTextStyle offset: aPoint\r\r\tcompositionRectangle _ compositionRect copy.\r\ttext _ aText.\r\ttextStyle _ aTextStyle.\r\trule _ DefaultRule.\r\tmask _ nil.\t\t\"was DefaultMask \"\r\tmarginTabsLevel _ 0.\r\tdestinationForm _ Display.\r\toffset _ aPoint.\r\t^self composeAll! !\r\r!Paragraph methodsFor: 'private'!\rcompositionRectangleDelta\r\t\"A handy number -- mostly for scrolling.\"\r\r\t^compositionRectangle top - clippingRectangle top! !\r\r!Paragraph methodsFor: 'private'!\rdisplayLines: linesInterval \r\t^ self displayLines: linesInterval\r\t\taffectedRectangle: self visibleRectangle! !\r\r!Paragraph methodsFor: 'private' stamp: 'ar 5/18/2000 18:34'!\rdisplayLines: linesInterval affectedRectangle: affectedRectangle\r\t\"This is the first level workhorse in the display portion of the TextForm routines.\r\tIt checks to see which lines in the interval are actually visible, has the\r\tCharacterScanner display only those, clears out the areas in which display will\r\toccur, and clears any space remaining in the visibleRectangle following the space\r\toccupied by lastLine.\"\r\r\t| lineGrid topY firstLineIndex lastLineIndex lastLineIndexBottom |\r\r\t\"Save some time by only displaying visible lines\"\r\tfirstLineIndex _ self lineIndexOfTop: affectedRectangle top.\r\tfirstLineIndex < linesInterval first ifTrue: [firstLineIndex _ linesInterval first].\r\tlastLineIndex _ self lineIndexOfTop: affectedRectangle bottom - 1.\r\tlastLineIndex > linesInterval last ifTrue:\r\t\t\t[linesInterval last > lastLine\r\t\t \t\tifTrue: [lastLineIndex _ lastLine]\r\t\t  \t\tifFalse: [lastLineIndex _ linesInterval last]].\r\tlastLineIndexBottom _ (self bottomAtLineIndex: lastLineIndex).\r\t((Rectangle \r\t\torigin: affectedRectangle left @ (topY _ self topAtLineIndex: firstLineIndex) \r\t\tcorner: affectedRectangle right @ lastLineIndexBottom)\r\t  intersects: affectedRectangle)\r\t\tifTrue: [ \" . . . (skip to clear-below if no lines displayed)\"\r\t\t\t\tDisplayScanner new\r\t\t\t\t\tdisplayLines: (firstLineIndex to: lastLineIndex)\r\t\t\t\t\tin: self clippedBy: affectedRectangle].\r\tlastLineIndex = lastLine ifTrue: \r\t\t [destinationForm  \"Clear out white space below last line\"\r\t\t \tfill: (affectedRectangle left @ (lastLineIndexBottom max: affectedRectangle top)\r\t\t\t\tcorner: affectedRectangle bottomRight)\r\t\t \trule: rule fillColor: self backgroundColor]! !\r\r!Paragraph methodsFor: 'private'!\rdisplayOn: aDisplayMedium lines: lineInterval\r\r\t| saveDestinationForm |\r\tsaveDestinationForm _ destinationForm.\r\tdestinationForm _ aDisplayMedium.\r\tself displayLines: lineInterval.\r\tdestinationForm _ saveDestinationForm! !\r\r!Paragraph methodsFor: 'private'!\rleftMarginForCompositionForLine: lineIndex \r\t\"Build the left margin for composition of a line. Depends upon\r\tmarginTabsLevel and the indent.\"\r\r\t| indent |\r\tlineIndex = 1\r\t\tifTrue: [indent _ textStyle firstIndent]\r\t\tifFalse: [indent _ textStyle restIndent].\r\t^indent + (textStyle leftMarginTabAt: marginTabsLevel)! !\r\r!Paragraph methodsFor: 'private' stamp: 'ar 12/15/2001 23:29'!\rleftMarginForDisplayForLine: lineIndex alignment: alignment\r\t\"Build the left margin for display of a line. Depends upon\r\tleftMarginForComposition, compositionRectangle left and the alignment.\"\r\r\t| pad |\r\t(alignment = LeftFlush or: [alignment = Justified])\r\t\tifTrue: \r\t\t\t[^compositionRectangle left \r\t\t\t\t+ (self leftMarginForCompositionForLine: lineIndex)].\r\t\"When called from character location code and entire string has been cut,\r\tthere are no valid lines, hence following nil check.\"\r\t(lineIndex <= lines size and: [(lines at: lineIndex) notNil])\r\t\tifTrue: \r\t\t\t[pad _ (lines at: lineIndex) paddingWidth]\r\t\tifFalse: \r\t\t\t[pad _ \r\t\t\t\tcompositionRectangle width - textStyle firstIndent - textStyle rightIndent].\r\talignment = Centered \r\t\tifTrue: \r\t\t\t[^compositionRectangle left \r\t\t\t\t+ (self leftMarginForCompositionForLine: lineIndex) + (pad // 2)].\r\talignment = RightFlush \r\t\tifTrue:\r\t\t\t[^compositionRectangle left \r\t\t\t\t+ (self leftMarginForCompositionForLine: lineIndex) + pad].\r\tself error: ['no such alignment']! !\r\r!Paragraph methodsFor: 'private'!\rlineAt: indexInteger put: aTextLineInterval \r\t\"Store a line, track last, and grow lines if necessary.\"\r\tindexInteger > lastLine ifTrue: [lastLine _ indexInteger].\r\tlastLine > lines size ifTrue: [lines _ lines , (Array new: lines size)].\r\t^lines at: indexInteger put: aTextLineInterval! !\r\r!Paragraph methodsFor: 'private'!\rlineIndexOfCharacterIndex: characterIndex \r\t\"Answer the line index for a given characterIndex.\"\r\r\t1 to: lastLine do: \r\t\t[:lineIndex | \r\t\t(lines at: lineIndex) last >= characterIndex ifTrue: [^lineIndex]].\r\t^lastLine! !\r\r!Paragraph methodsFor: 'private'!\rlineIndexOfTop: top \r\t\"Answer the line index at a given top y.\"\r\t| y line |\r\tlastLine = 0 ifTrue: [^ 1].\r\ty _ compositionRectangle top.\r\t1 to: lastLine do:\r\t\t[:i | line _ lines at: i.\r\t\t(y _ y + line lineHeight) > top ifTrue: [^ i]].\r\t^ lastLine\r! !\r\r!Paragraph methodsFor: 'private'!\rlines\r\r\t^lines! !\r\r!Paragraph methodsFor: 'private'!\rmoveBy: delta\r\tcompositionRectangle _ compositionRectangle translateBy: delta.\r\tclippingRectangle _ clippingRectangle translateBy: delta.\r! !\r\r!Paragraph methodsFor: 'private'!\rrightMarginForComposition\r\t\"Build the right margin for a line. Depends upon compositionRectangle\r\twidth, marginTabsLevel, and right indent.\"\r\r\t^compositionRectangle width \r\t\t- (textStyle rightMarginTabAt: marginTabsLevel) \r\t\t- textStyle rightIndent! !\r\r!Paragraph methodsFor: 'private'!\rrightMarginForDisplay \r\t\"Build the right margin for a line. Depends upon compositionRectangle\r\trightSide, marginTabsLevel, and right indent.\"\r\r\t^compositionRectangle right - \r\t\ttextStyle rightIndent - (textStyle rightMarginTabAt: marginTabsLevel)! !\r\r!Paragraph methodsFor: 'private'!\rsetWithText: aText style: aTextStyle \r\t\"Set text and adjust bounding rectangles to fit.\"\r\r\t| shrink compositionWidth unbounded |\r\tunbounded _ Rectangle origin: 0 @ 0 extent: 9999@9999.\r\tcompositionWidth _ self\r\t\tsetWithText: aText style: aTextStyle compositionRectangle: unbounded clippingRectangle: unbounded.\r\tcompositionRectangle _ compositionRectangle withWidth: compositionWidth.\r\tclippingRectangle _ compositionRectangle copy.\r\tshrink _ unbounded width - compositionWidth.\r\t\"Shrink padding widths accordingly\"\r\t1 to: lastLine do:\r\t\t[:i | (lines at: i) paddingWidth: (lines at: i) paddingWidth - shrink]! !\r\r!Paragraph methodsFor: 'private'!\rsetWithText: aText style: aTextStyle compositionRectangle: compRect clippingRectangle: clipRect \r\t\"Set text and using supplied parameters. Answer max composition width.\"\r\r\tclippingRectangle _ clipRect copy.\r\t^self\r\t\tcompositionRectangle: compRect\r\t\ttext: aText\r\t\tstyle: aTextStyle\r\t\toffset: 0 @ 0! !\r\r!Paragraph methodsFor: 'private'!\rsetWithText: aText style: aTextStyle compositionRectangle: compRect clippingRectangle: clipRect foreColor: cf backColor: cb\r\t\"Set text and using supplied parameters. Answer max composition width.\"\r\r\tclippingRectangle _ clipRect copy.\r\tself foregroundColor: cf backgroundColor: cb.\r\t^ self\r\t\tcompositionRectangle: compRect\r\t\ttext: aText\r\t\tstyle: aTextStyle\r\t\toffset: 0 @ 0! !\r\r!Paragraph methodsFor: 'private'!\rtopAtLineIndex: lineIndex \r\t\"Answer the top y of given line.\"\r\t| y |\r\ty _ compositionRectangle top.\r\tlastLine = 0 ifTrue: [lineIndex > 0 ifTrue: [^ y + textStyle lineGrid]. ^ y].\r\t1 to: (lineIndex-1 min: lastLine) do:\r\t\t[:i | y _ y + (lines at: i) lineHeight].\r\t^ y\r! !\r\r!Paragraph methodsFor: 'private'!\rtopAtLineIndex: lineIndex using: otherLines and: otherLastLine\r\t\"Answer the top y of given line.\"\r\t| y |\r\ty _ compositionRectangle top.\r\totherLastLine = 0 ifTrue: [^ y].\r\t1 to: (lineIndex-1 min: otherLastLine) do:\r\t\t[:i | y _ y + (otherLines at: i) lineHeight].\r\t^ y\r! !\r\r!Paragraph methodsFor: 'private'!\rtrimLinesTo: lastLineInteger\r\r\t(lastLineInteger + 1 to: lastLine) do: [:i | lines at: i put: nil].\r\t(lastLine _ lastLineInteger) < (lines size // 2) \r\t\tifTrue: [lines _ lines copyFrom: 1 to: lines size - (lines size // 2)]! !\r\r!Paragraph methodsFor: 'private'!\rupdateCompositionHeight\r\t\"Mainly used to insure that intersections with compositionRectangle work.\" \r\r\tcompositionRectangle _ compositionRectangle withHeight:\r\t\t(self bottomAtLineIndex: lastLine) - compositionRectangle top.\r\t(text size ~= 0 and: [(text at: text size) = CR])\r\t\tifTrue: [compositionRectangle _ compositionRectangle withHeight:\r\t\t\t\t\tcompositionRectangle height + (lines at: lastLine) lineHeight]! !\r\r!Paragraph methodsFor: 'private' stamp: 'di 8/30/97 11:14'!\rwithClippingRectangle: clipRect do: aBlock\r\t| saveClip |\r\tsaveClip _ clippingRectangle.\r\tclippingRectangle _ clipRect.\r\t\taBlock value.\r\tclippingRectangle _ saveClip! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rParagraph class\r\tinstanceVariableNames: ''!\r\r!Paragraph class methodsFor: 'instance creation'!\rnew\r\t\"Do not allow an uninitialized view. Create with text that has no\r\tcharacters.\"\r\r\t^self withText: '' asText! !\r\r!Paragraph class methodsFor: 'instance creation'!\rwithText: aText \r\t\"Answer an instance of me with text set to aText and style set to the \r\tsystem's default text style.\"\r\r\t^self withText: aText style: DefaultTextStyle copy! !\r\r!Paragraph class methodsFor: 'instance creation'!\rwithText: aText style: aTextStyle \r\t\"Answer an instance of me with text set to aText and style set to \r\taTextStyle.\"\r\r\t^super new setWithText: aText style: aTextStyle! !\r\r!Paragraph class methodsFor: 'instance creation'!\rwithText: aText style: aTextStyle compositionRectangle: compRect clippingRectangle: clipRect foreColor: c1 backColor: c2\r\t\"Answer an instance of me with text set to aText and style set to \r\taTextStyle, composition rectangle is compRect and the clipping rectangle \r\tis clipRect.\"\r\t| para |\r\tpara _ super new.\r\tpara setWithText: aText\r\t\tstyle: aTextStyle\r\t\tcompositionRectangle: compRect\r\t\tclippingRectangle: clipRect\r\t\tforeColor: c1 backColor: c2.\r\t^para! !\r\r\r!Paragraph class methodsFor: 'examples' stamp: 'tk 9/30/96'!\rexample\r\t\"This simple example illustrates how to display a few lines of text on the screen at the current cursor point.  \r\tFixed. \"\r\r\t| para point |\r\tpoint _ Sensor waitButton.\r\tpara _ 'This is the first line of characters\rand this is the second line.' asParagraph.\r\tpara displayOn: Display at: point.\r\r\t\"Paragraph example\"! !\rScrollController subclass: #ParagraphEditor\r\tinstanceVariableNames: 'paragraph startBlock stopBlock beginTypeInBlock emphasisHere initialText selectionShowing otherInterval lastParenLocation'\r\tclassVariableNames: 'ChangeText CmdActions FindText Keyboard ShiftCmdActions TextEditorYellowButtonMenu UndoInterval UndoMessage UndoParagraph UndoSelection Undone'\r\tpoolDictionaries: 'TextConstants'\r\tcategory: 'Kernel-ST80 Remnants'!\r!ParagraphEditor commentStamp: '<historical>' prior: 0!\rI am a Controller for editing a Paragraph. I am a kind of ScrollController, so that more text can be created for the Paragraph than can be viewed on the screen. Editing messages are sent by issuing commands from a yellow button menu or from keys on the keyboard. My instances keep control as long as the cursor is within the view when the red or yellow mouse button is pressed; they give up control if the blue button is pressed.!\r\r\r!ParagraphEditor methodsFor: 'initialize-release'!\rchangeParagraph: aParagraph \r\t\"Install aParagraph as the one to be edited by the receiver.\"\r\r\tUndoParagraph == paragraph ifTrue: [UndoParagraph _ nil].\r\tparagraph _ aParagraph.\r\tself resetState! !\r\r!ParagraphEditor methodsFor: 'initialize-release' stamp: 'th 10/21/2003 15:49'!\rresetState \r\t\"Establish the initial conditions for editing the paragraph: place caret \r\tbefore first character, set the emphasis to that of the first character,\r\tand save the paragraph for purposes of canceling.\"\r\r\tstopBlock _ paragraph defaultCharacterBlock.\r\tself pointBlock: stopBlock copy.\r\tbeginTypeInBlock _ nil.\r\tUndoInterval _ otherInterval _ 1 to: 0.\r\tself setEmphasisHere.\r\tselectionShowing _ false.\r\tinitialText _ paragraph text copy! !\r\r!ParagraphEditor methodsFor: 'initialize-release' stamp: 'di 5/15/2000 13:51'!\rstateArray\r\t^ {ChangeText.\r\t\tFindText.\r\t\tUndoInterval.\r\t\tUndoMessage.\r\t\tUndoParagraph.\r\t\tUndoSelection.\r\t\tUndone.\r\t\tself selectionInterval.\r\t\tself startOfTyping.\r\t\temphasisHere}! !\r\r!ParagraphEditor methodsFor: 'initialize-release' stamp: 'di 10/5/1998 17:03'!\rstateArrayPut: stateArray\r\t| sel |\r\tChangeText _ stateArray at: 1.\r\tFindText _ stateArray at: 2.\r\tUndoInterval _ stateArray at: 3.\r\tUndoMessage _ stateArray at: 4.\r\tUndoParagraph _ stateArray at: 5.\r\tUndoSelection _ stateArray at: 6.\r\tUndone _ stateArray at: 7.\r\tsel _ stateArray at: 8.\r\tself selectFrom: sel first to: sel last.\r\tbeginTypeInBlock _ stateArray at: 9.\r\temphasisHere _ stateArray at: 10.! !\r\r\r!ParagraphEditor methodsFor: 'accessing' stamp: 'tk 4/21/1998 09:55'!\rinitialText\r\t^ initialText! !\r\r!ParagraphEditor methodsFor: 'accessing'!\rreplace: oldInterval with: newText and: selectingBlock \r\t\"Replace the text in oldInterval with newText and execute selectingBlock to establish the new selection.  Create an undoAndReselect:redoAndReselect: undoer to allow perfect undoing.\"\r\r\t| undoInterval |\r\tundoInterval _ self selectionInterval.\r\tundoInterval = oldInterval ifFalse: [self selectInterval: oldInterval].\r\tUndoSelection _ self selection.\r\tself zapSelectionWith: newText.\r\tselectingBlock value.\r\totherInterval _ self selectionInterval.\r\tself undoer: #undoAndReselect:redoAndReselect: with: undoInterval with: otherInterval! !\r\r!ParagraphEditor methodsFor: 'accessing'!\rreplaceSelectionWith: aText\r\t\"Remember the selection text in UndoSelection.\r\t Deselect, and replace the selection text by aText.\r\t Remember the resulting selectionInterval in UndoInterval and PriorInterval.\r\t Set up undo to use UndoReplace.\"\r\r\tbeginTypeInBlock ~~ nil ifTrue: [^self zapSelectionWith: aText]. \"called from old code\"\r\tUndoSelection _ self selection.\r\tself zapSelectionWith: aText.\r\tself undoer: #undoReplace! !\r\r!ParagraphEditor methodsFor: 'accessing'!\rsetSearch: aString\r\t\"Set the FindText and ChangeText to seek aString; except if already seeking aString, leave ChangeText alone so again will repeat last replacement.\"\r\r\tFindText string = aString\r\t\tifFalse: [FindText _ ChangeText _ aString asText]! !\r\r!ParagraphEditor methodsFor: 'accessing'!\rtext\r\t\"Answer the text of the paragraph being edited.\"\r\r\t^paragraph text! !\r\r!ParagraphEditor methodsFor: 'accessing' stamp: 'jm 3/18/98 20:38'!\ruserHasEdited\r\t\"Note that the user has edited my text. Here it is just a noop so that the Character Recognizer won't fail when used with a vanilla ParagrahEditor.\"\r! !\r\r\r!ParagraphEditor methodsFor: 'controlling'!\rcontrolInitialize\r\r\tsuper controlInitialize.\r\tself recomputeInterval.\r\tself initializeSelection.\r\tbeginTypeInBlock _ nil! !\r\r!ParagraphEditor methodsFor: 'controlling'!\rcontrolTerminate\r\r\tself closeTypeIn.  \"Must call to establish UndoInterval\"\r\tsuper controlTerminate.\r\tself deselect! !\r\r!ParagraphEditor methodsFor: 'controlling' stamp: 'sma 3/11/2000 15:17'!\rnormalActivity\r\tself processKeyboard.\r\tself processMouseButtons! !\r\r\r!ParagraphEditor methodsFor: 'scrolling'!\rcomputeMarkerRegion \r\t\"Refer to the comment in ScrollController|computeMarkerRegion.\"\r\r\tparagraph compositionRectangle height = 0\r\t\tifTrue:\t[^0@0 extent: Preferences scrollBarWidth @ scrollBar inside height]\r\t\tifFalse:\t[^0@0 extent:\r\t\t\t\t\tPreferences scrollBarWidth \r\t\t\t\t\t\t@ ((paragraph clippingRectangle height asFloat /\r\t\t\t\t\t\t\tself scrollRectangleHeight * scrollBar inside height) rounded\r\t\t\t\t\t\t\tmin: scrollBar inside height)]! !\r\r!ParagraphEditor methodsFor: 'scrolling'!\rmarkerDelta\r\r\t^marker top - scrollBar top - ((paragraph clippingRectangle top -\r\t\tparagraph compositionRectangle top) asFloat /\r\t\t\t(self scrollRectangleHeight max: 1) asFloat *\r\t\t\t\tscrollBar height asFloat) rounded! !\r\r!ParagraphEditor methodsFor: 'scrolling'!\rscrollAmount \r\t\"Refer to the comment in ScrollController|scrollAmount.\"\r\r\t^sensor cursorPoint y - scrollBar top! !\r\r!ParagraphEditor methodsFor: 'scrolling'!\rscrollBar\r\t^ scrollBar! !\r\r!ParagraphEditor methodsFor: 'scrolling' stamp: 'BG 12/12/2003 15:31'!\rscrollBy: heightToMove\r\t\"Move the paragraph by heightToMove, and reset the text selection.\"\r\t^ paragraph scrollBy: heightToMove withSelectionFrom: self pointBlock to: self markBlock! !\r\r!ParagraphEditor methodsFor: 'scrolling'!\rscrollRectangleHeight\r\r\t^paragraph compositionRectangle height \r\t\t+ paragraph lineGrid! !\r\r!ParagraphEditor methodsFor: 'scrolling'!\rscrollToBottom\r\t\"Scroll so that the tail end of the text is visible in the view.  5/6/96 sw\"\r\r\tself scrollView: (paragraph clippingRectangle bottom \r\t\t- paragraph compositionRectangle bottom)! !\r\r!ParagraphEditor methodsFor: 'scrolling'!\rscrollToTop\r\t\"Scroll so that the paragraph is at the top of the view.\"\r\r\tself scrollView: (paragraph clippingRectangle top \r\t\t- paragraph compositionRectangle top)! !\r\r!ParagraphEditor methodsFor: 'scrolling'!\rscrollView: anInteger \r\t\"Paragraph scrolling uses opposite polarity\"\r\t^ self scrollBy: anInteger negated! !\r\r!ParagraphEditor methodsFor: 'scrolling'!\rupdateMarker\r\t\"A variation of computeMarkerRegion--only redisplay the marker in the scrollbar if an actual change has occurred in the positioning of the paragraph.\"\r\tself moveMarkerTo: self computeMarkerRegion! !\r\r!ParagraphEditor methodsFor: 'scrolling'!\rviewDelta \r\t\"Refer to the comment in ScrollController|viewDelta.\"\r\r\t^paragraph clippingRectangle top \r\t\t- paragraph compositionRectangle top \r\t\t- ((marker top - scrollBar inside top) asFloat \r\t\t\t\t/ scrollBar inside height asFloat * self scrollRectangleHeight asFloat)\r\t\t\troundTo: paragraph lineGrid! !\r\r\r!ParagraphEditor methodsFor: 'sensor access'!\rprocessBlueButton\r\t\"The user pressed the blue button on the mouse. Determine what action \r\tto take.\"\r\r\t^self! !\r\r!ParagraphEditor methodsFor: 'sensor access'!\rprocessKeyboard\r\t\"Determine whether the user pressed the keyboard. If so, read the keys.\"\r\r\tsensor keyboardPressed ifTrue: [self readKeyboard]! !\r\r!ParagraphEditor methodsFor: 'sensor access'!\rprocessMouseButtons\r\t\"Determine whether the user pressed any mouse button. For each possible \r\tbutton, determine what actions to take.\"\r\r\tsensor redButtonPressed ifTrue: [self processRedButton].\r\tsensor yellowButtonPressed ifTrue: [self processYellowButton].\r\tsensor blueButtonPressed ifTrue: [self processBlueButton]! !\r\r!ParagraphEditor methodsFor: 'sensor access' stamp: 'th 9/19/2002 18:24'!\rprocessRedButton\r\t\"The user pressed a red mouse button, meaning create a new text \r\tselection. Highlighting the selection is carried out by the paragraph \r\titself. Double clicking causes a selection of the area between the nearest \r\tenclosing delimitors.\"\r\r\t|  selectionBlocks clickPoint oldDelta oldInterval previousMarkBlock previousPointBlock |\r\r\tclickPoint _ sensor cursorPoint.\r\t(view containsPoint: clickPoint) ifFalse: [^ self].\r\t(paragraph clickAt: clickPoint for: model controller: self) ifTrue: [^ self].\r\toldInterval _ self selectionInterval.\r\tpreviousMarkBlock _ self markBlock.\r\tpreviousPointBlock _ self pointBlock.\r\toldDelta _ paragraph scrollDelta.\r\tsensor leftShiftDown\r\t\tifFalse:\r\t\t\t[self deselect.\r\t\t\tself closeTypeIn.\r\t\t\tselectionBlocks _ paragraph mouseSelect: clickPoint]\r\t\tifTrue:\r\t\t\t[selectionBlocks _ paragraph extendSelectionMark: self markBlock pointBlock: self pointBlock.\r\t\t\tself closeTypeIn].\r\tselectionShowing _ true.\r\tself markBlock: (selectionBlocks at: 1).\r\tself pointBlock: (selectionBlocks at: 2).\r\t(self hasCaret\r\t\tand: [previousMarkBlock = self markBlock and: [previousPointBlock = self pointBlock]])\r\t\tifTrue: [self selectWord].\r\toldDelta ~= paragraph scrollDelta \"case of autoscroll\"\r\t\t\tifTrue: [self updateMarker].\r\tself setEmphasisHere.\r\t(self isDisjointFrom: oldInterval) ifTrue:\r\t\t[otherInterval _ oldInterval]! !\r\r!ParagraphEditor methodsFor: 'sensor access'!\rprocessYellowButton\r\t\"User pressed the yellow button on the mouse. Determine what actions to \r\ttake.\"\r\r\tself yellowButtonActivity! !\r\r\r!ParagraphEditor methodsFor: 'displaying'!\rdisplay\r\t\"Redisplay the paragraph.\"\r\r\t| selectionState |\r\tselectionState _ selectionShowing.\r\tself deselect.\r\tparagraph foregroundColor: view foregroundColor\r\t\t\tbackgroundColor: view backgroundColor;\r\t\t\tdisplayOn: Display.\r\tselectionState ifTrue: [self select]! !\r\r!ParagraphEditor methodsFor: 'displaying'!\rflash\r\t\"Causes the view of the paragraph to complement twice in succession.\"\r\r\tparagraph flash! !\r\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'jm 5/3/1998 19:19'!\raccept\r\t\"Save the current text of the text being edited as the current acceptable version for purposes of canceling.\"\r\r\tinitialText _ paragraph text copy.\r! !\r\r!ParagraphEditor methodsFor: 'menu messages'!\ragain\r\t\"Text substitution. If the left shift key is down, the substitution is made \r\tthroughout the entire Paragraph. Otherwise, only the next possible \r\tsubstitution is made.\r\tUndoer & Redoer: #undoAgain:andReselect:typedKey:.\"\r\r\t\"If last command was also 'again', use same keys as before\"\r\tself againOrSame: (UndoMessage sends: #undoAgain:andReselect:typedKey:)! !\r\r!ParagraphEditor methodsFor: 'menu messages'!\ralign\r\t\"Align text according to the next greater alignment value--cycling among \r\tleft flush, right flush, center, justified.  No effect on the undoability of the pre\r\tpreceding command.\"\r\r\tparagraph toggleAlignment.\r\tparagraph displayOn: Display.\r\tself recomputeInterval! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'sw 4/24/2001 12:22'!\rbrowseChangeSetsWithSelector\r\t\"Determine which, if any, change sets have at least one change for the selected selector, independent of class\"\r\r\t| aSelector |\r\tself lineSelectAndEmptyCheck: [^ self].\r\t(aSelector _ self selectedSelector) == nil ifTrue: [^ view flash].\r\tself terminateAndInitializeAround: [ChangeSorter browseChangeSetsWithSelector: aSelector]! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'sd 1/16/2004 21:14'!\rbrowseClassFromIt\r\t\"Launch a hierarchy browser for the class indicated by the current selection.  If multiple classes matching the selection exist, let the user choose among them.\"\r\r\t| aClass |\r\tself lineSelectAndEmptyCheck: [^ self].\r\r\taClass _ Utilities classFromPattern: (self selection string copyWithout: Character cr) withCaption: 'choose a class to browse...'.\r\taClass ifNil: [^ view flash].\r\r\tself terminateAndInitializeAround:\r\t\t[self systemNavigation spawnHierarchyForClass: aClass selector: nil]! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'sd 4/16/2003 09:42'!\rbrowseIt\r\t\"Launch a browser for the current selection, if appropriate\"\r\r\t| aSymbol anEntry brow |\r\r\tPreferences alternativeBrowseIt ifTrue: [^ self browseClassFromIt].\r\r\tself lineSelectAndEmptyCheck: [^ self].\r\t(aSymbol _ self selectedSymbol) isNil ifTrue: [^ view flash].\r\r\tself terminateAndInitializeAround:\r\t\t[aSymbol first isUppercase\r\t\t\tifTrue:\r\t\t\t\t[anEntry _ (Smalltalk\r\t\t\t\t\tat: aSymbol\r\t\t\t\t\tifAbsent:\r\t\t\t\t\t\t[ self systemNavigation browseAllImplementorsOf: aSymbol.\r\t\t\t\t\t\t^ nil]).\r\t\t\t\tanEntry isNil ifTrue: [^ view flash].\r\t\t\t\t(anEntry isKindOf: Class)\r\t\t\t\t\tifFalse:\t[anEntry _ anEntry class].\r\t\t\t\tbrow _ Preferences browseToolClass new.\r\t\t\t\tbrow setClass: anEntry selector: nil.\r\t\t\t\tbrow class\r\t\t\t\t\topenBrowserView: (brow openEditString: nil)\r\t\t\t\t\tlabel: 'System Browser']\r\t\t\tifFalse:\r\t\t\t\t[ self systemNavigation browseAllImplementorsOf: aSymbol]]! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'di 6/23/1998 11:08'!\rbrowseItHere\r\t\"Retarget the receiver's window to look at the selected class, if appropriate.  3/1/96 sw\"\r\t| aSymbol foundClass b |\r\t(((b _ model) isKindOf: Browser) and: [b couldBrowseAnyClass])\r\t\tifFalse: [^ view flash].\r\tmodel okToChange ifFalse: [^ view flash].\r\tself selectionInterval isEmpty ifTrue: [self selectWord].\r\t(aSymbol _ self selectedSymbol) isNil ifTrue: [^ view flash].\r\r\tself terminateAndInitializeAround:\r\t\t[foundClass _ (Smalltalk at: aSymbol ifAbsent: [nil]).\r\t\t\tfoundClass isNil ifTrue: [^ view flash].\r\t\t\t(foundClass isKindOf: Class)\r\t\t\t\tifTrue:\r\t\t\t\t\t[model systemCategoryListIndex: \r\t\t\t\t\t\t(model systemCategoryList indexOf: foundClass category).\r\t\tmodel classListIndex: (model classList indexOf: foundClass name)]]! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'sw 1/15/98 12:57'!\rcancel \r\t\"Restore the text of the paragraph to be the text saved since initialization \r\tor the last accept.  Undoer & Redoer: undoAndReselect:redoAndReselect:.\r\tThis used to call controlTerminate and controlInitialize but this seemed illogical.\r\tSure enough, nobody overrode them who had cancel in the menu, and if\r\tanybody really cared they could override cancel.\"\r\r\tUndoSelection _ paragraph text.\r\tself undoer: #undoAndReselect:redoAndReselect: with: self selectionInterval with: (1 to: 0).\r\tview ifNotNil: [view clearInside].\r\tself changeParagraph: (paragraph text: initialText).\r\tUndoParagraph _ paragraph.\r\totherInterval _ UndoInterval _ 1 to: initialText size. \"so undo will replace all\"\r\tparagraph displayOn: Display.\r\tself selectAt: 1.\r\tself scrollToTop\r! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'ar 12/17/2001 12:54'!\rchangeAlignment\r\t| aList reply  |\r\taList _ #(leftFlush centered justified rightFlush).\r\treply _ (SelectionMenu labelList: aList selections: aList) startUp.\r\treply ifNil:[^self].\r\tself setAlignment: reply.\r\tparagraph composeAll.\r\tself recomputeSelection.\r\tself mvcRedisplay.\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'fc 2/19/2004 22:09'!\rchangeEmphasis\r\t| aList reply  |\r\taList _ #(normal bold italic narrow underlined struckOut).\r\treply _ (SelectionMenu labelList: aList selections: aList) startUp.\r\treply ~~ nil ifTrue:\r\t\t[self setEmphasis: reply.\r\t\tparagraph composeAll.\r\t\tself recomputeSelection.\r\t\tself mvcRedisplay].\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'fc 2/19/2004 22:09'!\rchangeEmphasisOrAlignment\r\t| aList reply  |\r\taList _ #(normal bold italic narrow underlined struckOut leftFlush centered rightFlush justified).\r\treply _ (SelectionMenu labelList: aList lines: #(6) selections: aList) startUp.\r\treply ~~ nil ifTrue:\r\t\t[(#(leftFlush centered rightFlush justified) includes: reply)\r\t\t\tifTrue:\r\t\t\t\t[paragraph perform: reply.\r\t\t\t\tself recomputeInterval]\r\t\t\tifFalse:\r\t\t\t\t[self setEmphasis: reply.\r\t\t\t\tparagraph composeAll.\r\t\t\t\tself recomputeSelection.\r\t\t\t\tself mvcRedisplay]].\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'md 10/22/2003 15:27'!\rchangeStyle\r\t\"Let user change styles for the current text pane  \r\t Moved from experimentalCommand to its own method  \"\r\r\t| aList reply style |\r\taList _ StrikeFont actualFamilyNames.\r\taList addFirst: 'DefaultTextStyle'.\r\treply _ (SelectionMenu labelList: aList lines: #(1) selections: aList) startUp.\r\treply ifNotNil:\r\t\t[(style _ TextStyle named: reply) ifNil: [Beeper beep. ^ true].\r\t\tparagraph textStyle: style copy.\r\t\tparagraph composeAll.\r\t\tself recomputeSelection.\r\t\tself mvcRedisplay].\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'RAA 3/15/2001 12:10'!\rchangeStyleTo: aNewStyle\r\r\tparagraph textStyle: aNewStyle.\r\tparagraph composeAll.\r\tself recomputeSelection.\r! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'sw 9/27/1999 11:54'!\rchooseAlignment\r\tself changeAlignment! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'sd 4/15/2003 22:40'!\rclassCommentsContainingIt\r\t\"Open a browser class comments which contain the current selection somewhere in them.\"\r\r\tself lineSelectAndEmptyCheck: [^ self].\r\tself terminateAndInitializeAround: [\r\t\tself systemNavigation browseClassCommentsWithString: self selection string]! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'dvf 8/23/2003 11:51'!\rclassNamesContainingIt\r\t\"Open a browser on classes whose names contain the selected string\"\r\r\tself lineSelectAndEmptyCheck: [^self].\r\tself systemNavigation \r\t\tbrowseClassesWithNamesContaining: self selection string\r\t\tcaseSensitive: Sensor leftShiftDown! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'ar 1/15/2001 18:37'!\rclipboardText\r\r\t^ Clipboard clipboardText! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'ar 1/15/2001 18:38'!\rclipboardText: text\r\r\t^ Clipboard clipboardText: text! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'ar 1/15/2001 18:38'!\rclipboardTextPut: text\r\r\t^ Clipboard clipboardText: text! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'di 11/23/1998 15:21'!\rcompareToClipboard\r\t\"Check to see if whether the receiver's text is the same as the text currently on the clipboard, and inform the user.\"\r\t| s1 s2 |\r\ts1 _ self clipboardText string.\r\ts2 _ paragraph text string.\r\ts1 = s2 ifTrue: [^ self inform: 'Exact match'].\r\r\t(StringHolder new textContents:\r\t\t(TextDiffBuilder buildDisplayPatchFrom: s1 to: s2))\r\t\topenLabel: 'Comparison to Clipboard Text'! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'sw 8/1/97 15:09'!\rcopySelection\r\t\"Copy the current selection and store it in the paste buffer, unless a caret.  Undoer & Redoer: undoCutCopy\"\r\r\tself lineSelectAndEmptyCheck: [^ self].\r\r\t\"Simulate 'substitute: self selection' without locking the controller\"\r\tUndoSelection _ self selection.\r\tself undoer: #undoCutCopy: with: self clipboardText.\r\tUndoInterval _ self selectionInterval.\r\tself clipboardTextPut: UndoSelection! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'sw 8/1/97 16:33'!\rcut\r\t\"Cut out the current selection and redisplay the paragraph if necessary.  Undoer & Redoer: undoCutCopy:\"\r\r\tself lineSelectAndEmptyCheck: [^ self].\r\r\tself replaceSelectionWith: self nullText. \r\tself undoer: #undoCutCopy: with: self clipboardText.\r\tself clipboardTextPut: UndoSelection! !\r\r!ParagraphEditor methodsFor: 'menu messages'!\rexchange\r\t\"See comment in exchangeWith:\"\r\r\tself exchangeWith: otherInterval! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'sma 5/28/2000 09:34'!\rexperimentalCommand\r\t\"Use for experimental command-key implementation.  Using this, \r\tyou can try things out without forever needing to reinitialize the \r\tParagraphEditor.\"\r\r\tself prettyPrint.\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'ls 10/10/1999\r11:36'!\rexplain\r\t\"Try to shed some light on what kind of entity the current selection\ris. \r\tThe selection must be a single token or construct. Insert the answer\rafter \r\tthe selection. Send private messages whose names begin with 'explain' \r\tthat return a string if they recognize the selection, else nil.\"\r\r\t| string tiVars cgVars selectors delimitors numbers sorry reply symbol\r|\rCursor execute showWhile: \r\t\t\t[sorry _ '\"Sorry, I can''t explain that.  Please select a single\rtoken, construct, or special character.'.\r\t\t\tsorry _ sorry , (view canDiscardEdits\r\t\t\t\t\t\t\tifFalse: ['  Also, please cancel or accept.\"']\r\t\t\t\t\t\t\tifTrue: ['\"']).\r\t\t\t(string _ self selection asString) isEmpty\r\t\t\t\tifTrue: [reply _ '']\r\t\t\t\tifFalse: [string _ self explainScan: string.\r\t\t\t\t\t\"Remove space, tab, cr\"\r\t\t\t\t\t\"Temps and Instance vars need only test strings that are all\rletters\"\r\t\t\t\t\t(string detect: [:char | (char isLetter or: [char isDigit]) not]\r\t\t\t\t\t\tifNone: []) ifNil: \r\t\t\t\t\t\t\t[tiVars _ self explainTemp: string.\r\t\t\t\t\t\t\ttiVars == nil ifTrue: [tiVars _ self explainInst: string]].\r\t\t\t\t\t(tiVars == nil and: [model respondsTo: #explainSpecial:])\r\t\t\t\t\t\tifTrue: [tiVars _ model explainSpecial: string].\r\t\t\t\t\ttiVars == nil\r\t\t\t\t\t\tifTrue: [tiVars _ '']\r\t\t\t\t\t\tifFalse: [tiVars _ tiVars , '\\' withCRs].\r\t\t\t\t\t\"Context, Class, Pool, and Global vars, and Selectors need \r\t\t\t\t\tonly test symbols\"\r\t\t\t\t\t(Symbol hasInterned: string ifTrue: [:s | symbol _ s])\r\t\t\t\t\t\tifTrue: [cgVars _ self explainCtxt: symbol.\r\t\t\t\t\t\t\tcgVars == nil\r\t\t\t\t\t\t\t\tifTrue: [cgVars _ self explainClass: symbol.\r\t\t\t\t\t\t\t\t\tcgVars == nil ifTrue: [cgVars _ self explainGlobal: symbol]].\r\t\t\t\t\t\t\t\"See if it is a Selector (sent here or not)\"\r\t\t\t\t\t\t\tselectors _ self explainMySel: symbol.\r\t\t\t\t\t\t\tselectors == nil\r\t\t\t\t\t\t\t\tifTrue: \r\t\t\t\t\t\t\t\t\t[selectors _ self explainPartSel: string.\r\t\t\t\t\t\t\t\t\tselectors == nil ifTrue: [\r\t\t\t\t\t\t\t\t\t\tselectors _ self explainAnySel: symbol]]]\r\t\t\t\t\t\tifFalse: [selectors _ self explainPartSel: string].\r\t\t\t\t\tcgVars == nil\r\t\t\t\t\t\tifTrue: [cgVars _ '']\r\t\t\t\t\t\tifFalse: [cgVars _ cgVars , '\\' withCRs].\r\t\t\t\t\tselectors == nil\r\t\t\t\t\t\tifTrue: [selectors _ '']\r\t\t\t\t\t\tifFalse: [selectors _ selectors , '\\' withCRs].\r\t\t\t\t\tstring size = 1\r\t\t\t\t\t\tifTrue: [\"single special characters\"\r\t\t\t\t\t\t\tdelimitors _ self explainChar: string]\r\t\t\t\t\t\tifFalse: [\"matched delimitors\"\r\t\t\t\t\t\t\tdelimitors _ self explainDelimitor: string].\r\t\t\t\t\tnumbers _ self explainNumber: string.\r\t\t\t\t\tnumbers == nil ifTrue: [numbers _ ''].\r\t\t\t\t\tdelimitors == nil ifTrue: [delimitors _ ''].\r\t\t\t\t\treply _ tiVars , cgVars , selectors , delimitors , numbers].\r\t\t\treply size = 0 ifTrue: [reply _ sorry].\r\t\t\tself afterSelectionInsertAndSelect: reply]! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'di 9/7/1999 08:41'!\rfileItIn\r\t\"Make a Stream on the text selection and fileIn it.\r\t 1/24/96 sw: moved here from FileController; this function can be useful from any text window that shows stuff in chunk format\"\r\r\t| selection |\r\tselection _ self selection.\r\tself terminateAndInitializeAround:\r\t\t[(ReadWriteStream on: selection string from: 1 to: selection size) fileIn].\r! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'di 10/5/1998 21:55'!\rfind\r\t\"Prompt the user for a string to search for, and search the receiver from the current selection onward for it.  1/26/96 sw\"\r\r\t| reply |\r\treply _ FillInTheBlank request: 'Find what? ' initialAnswer: ''.\r\treply size == 0 ifTrue: [^ self].\r\tself setSearch: reply.\r\tChangeText _ FindText.  \"Implies no replacement to againOnce: method\"\r\tself againOrSame: true\r\t\r! !\r\r!ParagraphEditor methodsFor: 'menu messages'!\rfindAgain\r\t\"Find the text-to-find again.  1/24/96 sw\"\r\r\tself againOrSame: true! !\r\r!ParagraphEditor methodsFor: 'menu messages'!\rfit\r\t\"Make the bounding rectangle of the paragraph contain all the text while \r\t not changing the width of the view of the paragraph.  No effect on undoability\r\t of the preceding command.\"\r\r\tparagraph clearVisibleRectangle.\r\tparagraph fit.\r\tparagraph displayOn: Display; outline.\r\tself recomputeInterval! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'sd 4/16/2003 09:42'!\rimplementorsOfIt\r\t\"Open an implementors browser on the selected selector\"\r\r\t| aSelector |\r\tself lineSelectAndEmptyCheck: [^ self].\r\t(aSelector _ self selectedSelector) == nil ifTrue: [^ view flash].\r\tself terminateAndInitializeAround: [ self systemNavigation browseAllImplementorsOf: aSelector]! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'th 9/19/2002 18:12'!\rlineSelectAndEmptyCheck: returnBlock\r\t\"If the current selection is an insertion point, expand it to be the entire current line; if after that's done the selection is still empty, then evaluate the returnBlock, which will typically consist of '[^ self]' in the caller -- check senders of this method to understand this.\"\r\r\tself selectLine.  \"if current selection is an insertion point, then first select the entire line in which occurs before proceeding\"\r\tself hasSelection ifFalse: [self flash.  ^ returnBlock value]! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'sd 4/16/2003 19:31'!\rmethodNamesContainingIt\r\t\"Open a browser on methods names containing the selected string\"\r\r\tself lineSelectAndEmptyCheck: [^ self].\r\tCursor wait showWhile:\r\t\t[self terminateAndInitializeAround: [self systemNavigation browseMethodsWhoseNamesContain: self selection string withBlanksTrimmed]].\r\tCursor normal show! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'sd 4/15/2003 22:35'!\rmethodSourceContainingIt\r\t\"Open a browser on methods which contain the current selection in their source (case-sensitive full-text search of source).   EXTREMELY slow!!\"\r\r\tself lineSelectAndEmptyCheck: [^ self].\r\t(self confirm: 'This will take a few minutes.\rShall I proceed?') ifFalse: [^ self].\r\tself systemNavigation browseMethodsWithSourceString: self selection string! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'sd 4/16/2003 19:28'!\rmethodStringsContainingit\r\t\"Open a browser on methods which contain the current selection as part of a string constant.\"\r\r\tself lineSelectAndEmptyCheck: [^ self].\r\tself terminateAndInitializeAround: [self systemNavigation browseMethodsWithString: self selection string]! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'di 10/2/97 11:34'!\rmvcRedisplay\r\t\"Overridable by subclasses that do their own display\"\r\tDisplay fill: paragraph clippingRectangle \r\t\t\tfillColor: view backgroundColor.\t\"very brute force\"\r\tself display! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'th 9/20/2002 11:21'!\rpaste\r\t\"Paste the text from the shared buffer over the current selection and \r\tredisplay if necessary.  Undoer & Redoer: undoAndReselect.\"\r\r\tself replace: self selectionInterval with: self clipboardText and:\r\t\t[self selectAt: self pointIndex]! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'ar 1/15/2001 18:36'!\rpasteRecent\r\t\"Paste an item chose from RecentClippings.\"\r\r\t| clipping |\r\t(clipping _ Clipboard chooseRecentClipping) ifNil: [^ self].\r\tClipboard clipboardText: clipping.\r\t^ self paste! !\r\r!ParagraphEditor methodsFor: 'menu messages'!\rperformMenuMessage: aSelector\r\t\"If a menu command is invoked, typeIn must be closed first, the selection\r\t must be unhighlighted before and rehighlighted after, and the marker\r\t must be updated.\"\r\r\tself closeTypeIn.\r\tself deselect.\r\tsuper performMenuMessage: aSelector.\r\tself selectAndScroll.\r\tself updateMarker! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'sd 1/19/2004 20:59'!\rpresentSpecialMenu\r\t\"Present a list of expressions, and if the user chooses one, evaluate it in the context of the receiver, a ParagraphEditor.  Primarily for debugging, this provides a convenient way to talk to the various views, controllers, and models associated with any text pane\"\r\r\t| reply items |\r\tself terminateAndInitializeAround:\r\t\t[reply _ (PopUpMenu labelArray: (items _ self specialMenuItems) lines: #()) startUp.\r\t\treply = 0 ifTrue: [^ self].\r\t\tCompiler new evaluate: (items at: reply) in: [] to: self]\r\t! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'sma 5/28/2000 09:40'!\rprettyPrint\r\tself prettyPrint: false! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'sma 5/28/2000 09:41'!\rprettyPrint: decorated\r\t\"Reformat the contents of the receiver's view (a Browser).\"\r\r\t| selectedClass newText |\r\tmodel selectedMessageCategoryName ifNil: [^ view flash].\r\tselectedClass _ model selectedClassOrMetaClass.\r\tnewText _ selectedClass compilerClass new\r\t\tformat: self text\r\t\tin: selectedClass\r\t\tnotifying: self\r\t\tdecorated: decorated.\r\tnewText ifNotNil:\r\t\t[self deselect; selectInvisiblyFrom: 1 to: paragraph text size.\r\t\tself replaceSelectionWith: (newText asText makeSelectorBoldIn: selectedClass).\r\t\tself selectAt: 1]! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'sma 5/28/2000 09:40'!\rprettyPrintWithColor\r\tself prettyPrint: true! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'dew 3/7/2000 21:06'!\rprinterSetup\r\t\r\tTextPrinter defaultTextPrinter inspect\r! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'sd 4/16/2003 11:47'!\rreferencesToIt\r\t\"Open a references browser on the selected symbol\"\r\r\t| aSymbol |\r\tself selectLine.\r\t((aSymbol _ self selectedSymbol) == nil or:\r\t\t[(Smalltalk includesKey: aSymbol) not])\r\t\t\tifTrue: [^ view flash].\r\r\tself terminateAndInitializeAround: [self systemNavigation browseAllCallsOn: (Smalltalk associationAt: self selectedSymbol)]! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'BG 11/1/2003 14:27'!\rsaveContentsInFile\r\t\"Save the receiver's contents string to a file, prompting the user for a file-name.  Suggest a reasonable file-name.\"\r\r\t| fileName stringToSave parentWindow labelToUse suggestedName lastIndex |\r\tstringToSave _ paragraph text string.\r\tstringToSave size == 0 ifTrue: [^ self inform: 'nothing to save.'].\r\tparentWindow _ self model dependents\r\t\t\t\t\t\tdetect: [:dep | dep isKindOf: StandardSystemView]\r\t\t\t\t\t\tifNone: [nil].\r\tlabelToUse _ parentWindow\r\t\tifNil: \t\t['Untitled']\r\t\tifNotNil: \t[parentWindow label].\r\tsuggestedName _ nil.\r\t#(('Decompressed contents of: '\t\t'.gz')) do:  \"can add more here...\"\r\t\t[:leaderTrailer |\r\t\t\t(labelToUse beginsWith: leaderTrailer first) ifTrue:\r\t\t\t\t[suggestedName _ labelToUse copyFrom: leaderTrailer first size + 1 to: labelToUse size.\r\t\t\t\t(labelToUse endsWith: leaderTrailer last)\r\t\t\t\t\tifTrue:\r\t\t\t\t\t\t[suggestedName _ suggestedName copyFrom: 1 to: suggestedName size - leaderTrailer last size]\r\t\t\t\t\tifFalse:\r\t\t\t\t\t\t[lastIndex _ suggestedName lastIndexOf: $. ifAbsent: [0].\r\t\t\t\t\t\t(lastIndex = 0 or: [lastIndex = 1]) ifFalse:\r\t\t\t\t\t\t\t[suggestedName _ suggestedName copyFrom: 1 to: lastIndex - 1]]]].\r\r\tsuggestedName ifNil:\r\t\t[suggestedName _ labelToUse, '.text'].\r\t\t\t\r\tfileName _ FillInTheBlank request: 'File name?'\r\t\t\tinitialAnswer: suggestedName.\r\tfileName isEmptyOrNil ifFalse:\r\t\t[(FileStream newFileNamed: fileName) nextPutAll: stringToSave; close]! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'bf 10/13/1999 09:09'!\rselectedSelector\r\t\"Try to make a selector out of the current text selection\"\r\t^self selection string findSelector! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'th 9/19/2002 18:27'!\rselectedSymbol\r\t\"Return the currently selected symbol, or nil if none.  Spaces, tabs and returns are ignored\"\r\r\t| aString |\r\tself hasCaret ifTrue: [^ nil].\r\taString _ self selection string copyWithoutAll:\r\t\t{Character space.  Character cr.  Character tab}.\r\taString size == 0 ifTrue: [^ nil].\r\tSymbol hasInterned: aString  ifTrue: [:sym | ^ sym].\r\r\t^ nil! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'gm 2/16/2003 20:38'!\rsendContentsToPrinter\r\t| textToPrint printer parentWindow |\r\ttextToPrint := paragraph text.\r\ttextToPrint size == 0 ifTrue: [^self inform: 'nothing to print.'].\r\tprinter := TextPrinter defaultTextPrinter.\r\tparentWindow := self model dependents \r\t\t\t\tdetect: [:dep | dep isSystemWindow]\r\t\t\t\tifNone: [nil].\r\tparentWindow isNil \r\t\tifTrue: [printer documentTitle: 'Untitled']\r\t\tifFalse: [printer documentTitle: parentWindow label].\r\tprinter printText: textToPrint! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'sd 4/16/2003 19:30'!\rsendersOfIt\r\t\"Open a senders browser on the selected selector\"\r\r\t| aSelector |\r\tself lineSelectAndEmptyCheck: [^ self].\r\t(aSelector _ self selectedSelector) == nil ifTrue: [^ view flash].\r\tself terminateAndInitializeAround: [self systemNavigation browseAllCallsOn: aSelector]! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'th 9/18/2002 17:28'!\rsetAlignment: aSymbol\r\t| attr interval |\r\tattr _ TextAlignment perform: aSymbol.\r\tinterval _ self encompassLine: self selectionInterval.\r\tparagraph replaceFrom: interval first to: interval last with:\r\t\t((paragraph text copyFrom: interval first to: interval last) addAttribute: attr) displaying: true.\r! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'th 9/19/2002 18:27'!\rsetSearchString\r\t\"Make the current selection, if any, be the current search string.\"\r\tself hasCaret ifTrue: [view flash. ^ self].\r\tself setSearch:  self selection string! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'di 5/20/1998 22:41'!\rspawn\r\t\"Create and schedule a message browser for the code of the model's \r\tselected message. Retain any edits that have not yet been accepted.\"\r\t| code |\r\tcode _ paragraph text string.\r\tself cancel.\r\tmodel spawn: code.! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'di 9/7/1999 08:44'!\rspawnWorkspace\r\t| toUse |\r\tself selectLine.\r\ttoUse _ self selection asString.\r\ttoUse size > 0 ifFalse:\r\t\t[toUse _ paragraph text string.\r\t\ttoUse size > 0 ifFalse: [^ self flash]].\r\t\"NB: BrowserCodeController's version does a cancel here\"\r\tself terminateAndInitializeAround:\r\t\t[Utilities openScratchWorkspaceLabeled: 'Untitled' contents: toUse]! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'sw 4/29/96'!\rspecialMenuItems\r\t\"Refer to comment under #presentSpecialMenu.  .\r\t : added objectsReferencingIt,\"\r\r\t^ #(\t'Transcript cr; show: ''testing'''\r\t\t\t'view superView model inspect'\r\t\t\t'view superView model browseObjClass'\r\t\t\t'view display'\r\t\t\t'self inspect'\r\t\t\t'view backgroundColor: Color fromUser'\r\t\t\t'view topView inspect'\r\t\t\t'self compareToClipboard'\r\t\t\t'view insideColor: Form white'\r\t\t\t'self objectsReferencingIt'\r\t\t) ! !\r\r!ParagraphEditor methodsFor: 'menu messages' stamp: 'SqR 11/14/2000 12:15'!\rundo\r\t\"Reset the state of the paragraph prior to the previous edit.\r\t If another ParagraphEditor instance did that edit, UndoInterval is invalid;\r\t just recover the contents of the undo-buffer at the start of the paragraph.\"\r\r\tsensor flushKeyboard. \"a way to flush stuck keys\"\r\tself closeTypeIn.\r\r\tUndoParagraph == paragraph ifFalse: \"Can't undo another paragraph's edit\"\r\t\t[UndoMessage _ Message selector: #undoReplace.\r\t\tUndoInterval _ 1 to: 0.\r\t\tUndone _ true].\r\tUndoInterval ~= self selectionInterval ifTrue: \"blink the actual target\"\r\t\t[self selectInterval: UndoInterval; deselect].\r\r\t\"Leave a signal of which phase is in progress\"\r\tUndoParagraph _ Undone ifTrue: [#redoing] ifFalse: [#undoing].\r\tUndoMessage sentTo: self.\r\tUndoParagraph _ paragraph! !\r\r\r!ParagraphEditor methodsFor: 'explain' stamp: 'nk 6/26/2003 22:02'!\rexplainAnySel: symbol \r\t\"Is this any message selector?\"\r\r\t| list reply |\r\tlist _ self systemNavigation allClassesImplementing: symbol.\r\tlist size = 0 ifTrue: [^nil].\r\tlist size < 12\r\t\tifTrue: [reply _ ' is a message selector which is defined in these classes ' , list printString]\r\t\tifFalse: [reply _ ' is a message selector which is defined in many classes'].\r\t^'\"' , symbol , reply , '.\"' , '\\' withCRs, 'SystemNavigation new browseAllImplementorsOf: #' , symbol! !\r\r!ParagraphEditor methodsFor: 'explain' stamp: 'di 1/30/2002 21:09'!\rexplainChar: string\r\t\"Does string start with a special character?\"\r\r\t| char |\r\tchar _ string at: 1.\r\tchar = $. ifTrue: [^'\"Period marks the end of a Smalltalk statement.  A period in the middle of a number means a decimal point.  (The number is an instance of class Float).\"'].\r\tchar = $' ifTrue: [^'\"The characters between two single quotes are made into an instance of class String\"'].\r\tchar = $\" ifTrue: [^'\"Double quotes enclose a comment.  Smalltalk ignores everything between double quotes.\"'].\r\tchar = $# ifTrue: [^'\"The characters following a hash mark are made into an instance of class Symbol.  If parenthesis follow a hash mark, an instance of class Array is made.  It contains literal constants.\"'].\r\t(char = $( or: [char = $)]) ifTrue: [^'\"Expressions enclosed in parenthesis are evaluated first\"'].\r\t(char = $[ or: [char = $]]) ifTrue: [^'\"The code inside square brackets is an unevaluated block of code.  It becomes an instance of BlockContext and is usually passed as an argument.\"'].\r\t(char = ${ or: [char = $}]) ifTrue: [^ '\"A sequence of expressions separated by periods, when enclosed in curly braces, are evaluated to yield the elements of a new Array\"'].\r\t(char = $< or: [char = $>]) ifTrue: [^'\"<primitive: xx> means that this method is usually preformed directly by the virtual machine.  If this method is primitive, its Smalltalk code is executed only when the primitive fails.\"'].\r\tchar = $^ ifTrue: [^'\"Uparrow means return from this method.  The value returned is the expression following the ^\"'].\r\tchar = $| ifTrue: [^'\"Vertical bars enclose the names of the temporary variables used in this method.  In a block, the vertical bar separates the argument names from the rest of the code.\"'].\r\tchar = $_ ifTrue: [^'\"Left arrow means assignment.  The value of the expression after the left arrow is stored into the variable before it.\"'].\r\tchar = $; ifTrue: [^'\"Semicolon means cascading.  The message after the semicolon is sent to the same object which received the message before the semicolon.\"'].\r\tchar = $: ifTrue: [^'\"A colon at the end of a keyword means that an argument is expected to follow.  Methods which take more than one argument have selectors with more than one keyword.  (One keyword, ending with a colon, appears before each argument).', '\\\\' withCRs, 'A colon before a variable name just inside a block means that the block takes an agrument.  (When the block is evaluated, the argument will be assigned to the variable whose name appears after the colon).\"'].\r\tchar = $$ ifTrue: [^'\"The single character following a dollar sign is made into an instance of class Character\"'].\r\tchar = $- ifTrue: [^'\"A minus sign in front of a number means a negative number.\"'].\r\tchar = $e ifTrue: [^'\"An e in the middle of a number means that the exponent follows.\"'].\r\tchar = $r ifTrue: [^'\"An r in the middle of a bunch of digits is an instance of Integer expressed in a certain radix.  The digits before the r denote the base and the digits after it express a number in that base.\"'].\r\tchar = Character space ifTrue: [^'\"the space Character\"'].\r\tchar = Character tab ifTrue: [^'\"the tab Character\"'].\r\tchar = Character cr ifTrue: [^'\"the carriage return Character\"'].\r\t^nil! !\r\r!ParagraphEditor methodsFor: 'explain' stamp: 'nk 6/10/2004 07:02'!\rexplainClass: symbol \r\t\"Is symbol a class variable or a pool variable?\"\r\t| class reply classes |\r\t(model respondsTo: #selectedClassOrMetaClass)\r\t\tifFalse: [^ nil].\r\t(class _ model selectedClassOrMetaClass) ifNil: [^ nil].\r\t\"no class is selected\"\r\t(class isKindOf: Metaclass)\r\t\tifTrue: [class _ class soleInstance].\r\tclasses _ (Array with: class)\r\t\t\t\t, class allSuperclasses.\r\t\"class variables\"\r\treply _ classes detect: [:each | (each classVarNames detect: [:name | symbol = name]\r\t\t\t\t\tifNone: [])\r\t\t\t\t\t~~ nil]\r\t\t\t\tifNone: [].\r\treply == nil ifFalse: [^ '\"is a class variable, defined in class ' , reply printString , '\"\\' withCRs , 'SystemNavigation new browseAllCallsOn: (' , reply printString , ' classPool associationAt: #' , symbol , ').'].\r\t\"pool variables\"\r\tclasses do: [:each | (each sharedPools\r\t\t\tdetect: [:pool | (pool includesKey: symbol)\r\t\t\t\t\tand: \r\t\t\t\t\t\t[reply _ pool.\r\t\t\t\t\t\ttrue]]\r\t\t\tifNone: [])\r\t\t\t~~ nil].\r\treply\r\t\tifNil: [(Undeclared includesKey: symbol)\r\t\t\t\tifTrue: [^ '\"is an undeclared variable.' , '\"\\' withCRs , 'SystemNavigation new browseAllCallsOn: (Undeclared associationAt: #' , symbol , ').']]\r\t\tifNotNil: \r\t\t\t[classes _ WriteStream on: Array new.\r\t\t\tself systemNavigation\r\t\t\t\tallBehaviorsDo: [:each | (each sharedPools\r\t\t\t\t\t\tdetect: \r\t\t\t\t\t\t\t[:pool | \r\t\t\t\t\t\t\tpool == reply]\r\t\t\t\t\t\tifNone: [])\r\t\t\t\t\t\t~~ nil ifTrue: [classes nextPut: each]].\r\t\t\t\"Perhaps not print whole list of classes if too long. (unlikely)\"\r\t\t\t^ '\"is a pool variable from the pool ' , (Smalltalk keyAtIdentityValue: reply) asString , ', which is used by the following classes ' , classes contents printString , '\"\\' withCRs , 'SystemNavigation new browseAllCallsOn: (' , (Smalltalk keyAtIdentityValue: reply) asString , ' bindingOf: #' , symbol , ').'].\r\t^ nil! !\r\r!ParagraphEditor methodsFor: 'explain' stamp: 'sw 5/3/1998 14:32'!\rexplainCtxt: symbol \r\t\"Is symbol a context variable?\"\r\r\t| reply classes text cls |\r\tsymbol = #nil ifTrue: [reply _ '\"is a constant.  It is the only instance of class UndefinedObject.  nil is the initial value of all variables.\"'].\r\tsymbol = #true ifTrue: [reply _ '\"is a constant.  It is the only instance of class True and is the receiver of many control messages.\"'].\r\tsymbol = #false ifTrue: [reply _ '\"is a constant.  It is the only instance of class False and is the receiver of many control messages.\"'].\r\tsymbol = #thisContext ifTrue: [reply _ '\"is a context variable.  Its value is always the MethodContext which is executing this method.\"'].\r\t(model respondsTo: #selectedClassOrMetaClass) ifTrue: [\r\t\tcls _ model selectedClassOrMetaClass].\r\tcls ifNil: [^ reply].\t  \"no class known\"\r\tsymbol = #self ifTrue: \r\t\t\t[classes _ cls withAllSubclasses.\r\t\t\tclasses size > 12\r\t\t\t\tifTrue: [text _ cls printString , ' or a subclass']\r\t\t\t\tifFalse: \r\t\t\t\t\t[classes _ classes printString.\r\t\t\t\t\ttext _ 'one of these classes' , (classes copyFrom: 4 to: classes size)].\r\t\t\treply _ '\"is the receiver of this message; an instance of ' , text , '\"'].\r\tsymbol = #super ifTrue: [reply _ '\"is just like self.  Messages to super are looked up in the superclass (' , cls superclass printString , ')\"'].\r\t^reply! !\r\r!ParagraphEditor methodsFor: 'explain' stamp: 'tpr 5/29/2003 20:07'!\rexplainGlobal: symbol \r\t\"Is symbol a global variable?\"\r\t| reply classes |\r\treply _ Smalltalk at: symbol ifAbsent: [^nil].\r\t(reply class == Dictionary or:[reply isKindOf: SharedPool class])\r\t\tifTrue: \r\t\t\t[classes _ Set new.\r\t\t\tself systemNavigation allBehaviorsDo: [:each | (each sharedPools detect: [:pool | pool == reply]\r\t\t\t\t\tifNone: [])\r\t\t\t\t\t~~ nil ifTrue: [classes add: each]].\r\t\t\tclasses _ classes printString.\r\t\t\t^'\"is a global variable.  It is a pool which is used by the following classes ' , (classes allButFirst: 5) , '\"'].\r\t(reply isKindOf: Behavior)\r\t\tifTrue: [^'\"is a global variable.  ' , symbol , ' is a class in category ', reply category,\r\t\t\t'.\"', '\\' withCRs, 'Browser newOnClass: ' , symbol , '.'].\r\tsymbol == #Smalltalk ifTrue: [^'\"is a global.  Smalltalk is the only instance of SystemDictionary and holds all global variables.\"'].\r\t^'\"is a global variable.  ' , symbol , ' is ' , reply printString , '\"'! !\r\r!ParagraphEditor methodsFor: 'explain' stamp: 'tpr 5/12/2004 16:22'!\rexplainInst: string \r\t\"Is string an instance variable of this class?\"\r\t| classes cls |\r\r\t(model respondsTo: #selectedClassOrMetaClass) ifTrue: [\r\t\tcls _ model selectedClassOrMetaClass].\r\tcls ifNil: [^ nil].\t  \"no class known\"\r\tclasses _ (Array with: cls)\r\t\t\t\t, cls allSuperclasses.\r\tclasses _ classes detect: [:each | (each instVarNames\r\t\t\tdetect: [:name | name = string] ifNone: [])\r\t\t\t~~ nil] ifNone: [^nil].\r\tclasses _ classes printString.\r\t^ '\"is an instance variable of the receiver; defined in class ' , classes , \r\t\t'\"\\' withCRs , classes , ' systemNavigation browseAllAccessesTo: ''' , string , ''' from: ', classes, '.'! !\r\r!ParagraphEditor methodsFor: 'explain' stamp: 'nb 5/6/2003 16:54'!\rexplainMySel: symbol \r\t\"Is symbol the selector of this method?  Is it sent by this method?  If \r\tnot, then expalin will call (explainPartSel:) to see if it is a fragment of a \r\tselector sent here.  If not, explain will call (explainAnySel:) to catch any \r\tselector. \"\r\r\t| lits classes msg |\r\t(model respondsTo: #selectedMessageName) ifFalse: [^ nil].\r\t(msg _ model selectedMessageName) ifNil: [^nil].\t\"not in a message\"\r\tclasses _ self systemNavigation allClassesImplementing: symbol.\r\tclasses size > 12\r\t\tifTrue: [classes _ 'many classes']\r\t\tifFalse: [classes _ 'these classes ' , classes printString].\r\tmsg = symbol\r\t\tifTrue: [^ '\"' , symbol , ' is the selector of this very method!!  It is defined in ',\r\t\t\tclasses , '.  To see the other definitions, go to the message list pane, get the menu from the top of the scroll bar, and select ''implementors of...''.\"']\r\t\tifFalse: \r\t\t\t[lits _ (model selectedClassOrMetaClass compiledMethodAt:\r\t\t\t\tmsg) messages.\r\t\t\t(lits detect: [:each | each == symbol]\r\t\t\t\tifNone: [])\r\t\t\t\t== nil ifTrue: [^nil].\r\t\t\t^ '\"' , symbol , ' is a message selector which is defined in ', classes , '.  To see the definitions, go to the message list pane, get the menu from the top of the scroll bar, and select ''implementors of...''.\"'].! !\r\r!ParagraphEditor methodsFor: 'explain' stamp: 'apb 1/5/2000 16:56'!\rexplainNumber: string \r\t\"Is string a Number?\"\r\r\t| strm c |\r\t(c _ string at: 1) isDigit ifFalse: [(c = $- and: [string size > 1 and: [(string at: 2) isDigit]])\r\t\t\tifFalse: [^nil]].\r\tstrm _ ReadStream on: string.\r\tc _ Number readFrom: strm.\r\tstrm atEnd ifFalse: [^nil].\r\tc printString = string\r\t\tifTrue: [^'\"' , string , ' is a ' , c class name , '\"']\r\t\tifFalse: [^'\"' , string , ' (= ' , c printString , ') is a ' , c class name , '\"']! !\r\r!ParagraphEditor methodsFor: 'explain' stamp: 'nb 5/6/2003 16:54'!\rexplainPartSel: string \r\t\"Is this a fragment of a multiple-argument selector sent in this method?\"\r\t| lits whole reply classes s msg |\r\r\t(model respondsTo: #selectedMessageName) ifFalse: [^ nil].\r\t(msg _ model selectedMessageName) ifNil: [^ nil].  \"not in a message\"\r\tstring last == $: ifFalse: [^ nil].\r\t\"Name of this method\"\r\tlits _ Array with: msg.\r\t(whole _ lits detect: [:each | (each keywords detect: [:frag | frag = string]\r\t\t\t\t\tifNone: []) ~~ nil]\r\t\t\t\tifNone: []) ~~ nil\r\t\tifTrue: [reply _ ', which is the selector of this very method!!'.\r\t\t\ts _ '.  To see the other definitions, go to the message list pane, get the menu from the top of the scroll bar, and select ''implementors of...''.\"']\r\t\tifFalse: \r\t\t\t[\"Selectors called from this method\"\r\t\t\tlits _ (model selectedClassOrMetaClass compiledMethodAt:\r\t\t\t\tmsg) messages.\r\t\t\t(whole _ lits detect: [:each | (each keywords detect: [:frag | frag = string]\r\t\t\t\t\t\t\tifNone: []) ~~ nil]\r\t\t\t\t\t\tifNone: []) ~~ nil\r\t\t\t\tifFalse: [string = 'primitive:'\r\t\t\t\t\tifTrue: [^self explainChar: '<']\r\t\t\t\t\tifFalse: [^nil]].\r\t\t\treply _ '.'.\r\t\t\ts _ '.  To see the definitions, go to the message list pane, get the menu from the top of the scroll bar, and select ''implementors of...''.\"'].\r\tclasses _ self systemNavigation allClassesImplementing: whole.\r\tclasses size > 12\r\t\tifTrue: [classes _ 'many classes']\r\t\tifFalse: [classes _ 'these classes ' , classes printString].\r\t^ '\"' , string , ' is one part of the message selector ' , whole, reply , '  It is defined in ' , classes , s! !\r\r!ParagraphEditor methodsFor: 'explain'!\rexplainScan: string \r\t\"Remove beginning and trailing space, tab, cr.\r\t 1/15/96 sw: copied intact from BrowserCodeController\"\r\r\t| c beg end |\r\tbeg _ 1.\r\tend _ string size.\r\t\r\t[beg = end ifTrue: [^string copyFrom: 1 to: 1].\r\t\"if all blank, tell about the first\"\r\tc _ string at: beg.\r\tc = Character space or: [c = Character tab or: [c = Character cr]]]\r\t\twhileTrue: [beg _ beg + 1].\r\t\r\t[c _ string at: end.\r\tc = Character space or: [c = Character tab or: [c = Character cr]]]\r\t\twhileTrue: [end _ end - 1].\r\t^string copyFrom: beg to: end\t\"Return purely visible characters\"! !\r\r!ParagraphEditor methodsFor: 'explain' stamp: 'tk 4/1/98 14:19'!\rexplainTemp: string \r\t\"Is string the name of a temporary variable (or block argument variable)?\"\r\r\t| selectedClass tempNames i reply methodNode method msg |\r\t(model respondsTo: #selectedMessageName) ifFalse: [^ nil].\r\t(msg _ model selectedMessageName) ifNil: [^nil].\t\"not in a message\"\r\tselectedClass _ model selectedClassOrMetaClass.\r\ttempNames _ selectedClass parserClass new \r\t\t\tparseArgsAndTemps: model selectedMessage notifying: nil.\r\tmethod _ selectedClass compiledMethodAt: msg.\r\t(i _ tempNames findFirst: [:each | each = string]) = 0 ifTrue: [\r\t\t(method numTemps > tempNames size)\r\t\t\tifTrue: \r\t\t\t\t[\"It must be an undeclared block argument temporary\"\r\t\t\t\tmethodNode _ selectedClass compilerClass new\r\t\t\t\t\t\t\tparse: model selectedMessage\r\t\t\t\t\t\t\tin: selectedClass\r\t\t\t\t\t\t\tnotifying: nil.\r\t\t\t\ttempNames _ methodNode tempNames]\r\t\t\tifFalse: [^nil]].\r\t(i _ tempNames findFirst: [:each | each = string]) > 0 ifTrue: [i > method numArgs\r\t\t\tifTrue: [reply _ '\"is a temporary variable in this method\"']\r\t\t\tifFalse: [reply _ '\"is an argument to this method\"']].\r\t^reply! !\r\r\r!ParagraphEditor methodsFor: 'editing keys'!\ralign: characterStream \r\t\"Triggered by Cmd-u;  cycle through alignment alternatives.  8/11/96 sw\"\r\r\tsensor keyboard.\t\t\"flush character\"\r\tself align.\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'editing keys'!\rbrowseIt: characterStream \r\t\"Triggered by Cmd-B; browse the thing represented by the current selection, if plausible.  1/18/96 sw\"\r\r\tsensor keyboard.\t\t\"flush character\"\r\tself browseIt.\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'editing keys'!\rbrowseItHere: characterStream \r\t\"Triggered by Cmd-shift-B; browse the thing represented by the current selection, if plausible, in the receiver's own window.  3/1/96 sw\"\r\r\tsensor keyboard.\t\t\"flush character\"\r\tself browseItHere.\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'editing keys' stamp: 'di 9/7/1999 08:40'!\rcancel: characterStream \r\t\"Cancel unsubmitted changes.  Flushes typeahead.  1/12/96 sw\r\t 1/22/96 sw: put in control terminate/init\"\r\r\tsensor keyboard.\r\tself terminateAndInitializeAround: [self cancel].\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'editing keys' stamp: 'BG 10/29/2003 08:00'!\rchangeEmphasis: characterStream \r\t\"Change the emphasis of the current selection or prepare to accept characters with the change in emphasis. Emphasis change amounts to a font change.  Keeps typeahead.\"\r\t| keyCode attribute oldAttributes index thisSel colors extras indexOfOldAttributes |\t\t \"control 0..9 -> 0..9\"\r\tkeyCode _ ('0123456789-=' indexOf: sensor keyboard ifAbsent: [1]) - 1.\r\r\t\"grab the old set of attributes\"\r\tindexOfOldAttributes _\r\t\tstartBlock stringIndex < stopBlock stringIndex\r\t\t\tifTrue: [ startBlock stringIndex ]\r\t\t\tifFalse: [\r\t\t\t\t\"if selection is empty, look on character to the left; this is consistent with setEmphasisHere\"\r\t\t\t\t(startBlock stringIndex - 1) max: 1 ].\r\toldAttributes _ paragraph text attributesAt: indexOfOldAttributes forStyle: paragraph textStyle.\r\r\tthisSel _ self selection.\r\r\t\"Decipher keyCodes for Command 0-9...\"\r\t(keyCode between: 1 and: 5) ifTrue:\r\t\t[attribute _ TextFontChange fontNumber: keyCode].\r\tkeyCode = 6 ifTrue:\r\t\t[colors _ #(black magenta red yellow green blue cyan white).\r\t\textras _ false \"not a system window\"\r\t\t\t\tifTrue: [#()]\r\t\t\t\tifFalse: [#('Link to comment of class' 'Link to definition of class' \r\t\t\t\t\t\t'Link to hierarchy of class' 'Link to method')].\r\t\tindex _ (PopUpMenu labelArray: colors , #('choose color...' 'Do it' 'Print it'), \r\t\t\textras, #('be a web URL link' \r\t\t\t'Edit hidden info' 'Copy hidden info')\r\t\t\t\t\t\t\tlines: (Array with: colors size +1)) startUp.\r\t\tindex = 0 ifTrue: [^ true].\r\t\tindex <= colors size\r\t\tifTrue:\r\t\t\t[attribute _ TextColor color: (Color perform: (colors at: index))]\r\t\tifFalse:\r\t\t\t[index _ index - colors size - 1.\t\"Re-number!!!!!!\"\r\t\t\tindex = 0 ifTrue: [attribute _ self chooseColor].\r\t\t\tindex = 1 ifTrue: [attribute _ TextDoIt new.\r\t\t\t\tthisSel _ attribute analyze: self selection asString].\r\t\t\tindex = 2 ifTrue: [attribute _ TextPrintIt new.\r\t\t\t\tthisSel _ attribute analyze: self selection asString].\r\t\t\t(extras size = 0) & (index > 2) ifTrue: [index _ index + 5].\t\"skip those\"\r\t\t\tindex = 3 ifTrue: [attribute _ TextLink new. \r\t\t\t\tthisSel _ attribute analyze: self selection asString with: 'Comment'].\r\t\t\tindex = 4 ifTrue: [attribute _ TextLink new. \r\t\t\t\tthisSel _ attribute analyze: self selection asString with: 'Definition'].\r\t\t\tindex = 5 ifTrue: [attribute _ TextLink new. \r\t\t\t\tthisSel _ attribute analyze: self selection asString with: 'Hierarchy'].\r\t\t\tindex = 6 ifTrue: [attribute _ TextLink new. \r\t\t\t\tthisSel _ attribute analyze: self selection asString].\r\t\t\"\tindex = 7 ifTrue: [attribute _ TextURL new. \r\t\t\t\tthisSel _ attribute analyze: self selection asString]. \"\r\t\t\tindex = 8 ifTrue: [\"Edit hidden info\"\r\t\t\t\tthisSel _ self hiddenInfo.\t\"includes selection\"\r\t\t\t\tattribute _ TextEmphasis normal].\r\t\t\tindex = 9 ifTrue: [\"Copy hidden info\"\r\t\t\t\tself copyHiddenInfo.  ^ true].\t\"no other action\"\r\t\tthisSel ifNil: [^ true]].\t\"Could not figure out what to link to\"\r\t\t].\r\t(keyCode between: 7 and: 11) ifTrue:\r\t\t[sensor leftShiftDown\r\t\tifTrue:\r\t\t\t[keyCode = 10 ifTrue: [attribute _ TextKern kern: -1].\r\t\t\tkeyCode = 11 ifTrue: [attribute _ TextKern kern: 1]]\r\t\tifFalse:\r\t\t\t[attribute _ TextEmphasis perform:\r\t\t\t\t\t(#(bold italic narrow underlined struckOut) at: keyCode - 6).\r\t\t\toldAttributes do:\r\t\t\t\t[:att | (att dominates: attribute) ifTrue: [attribute turnOff]]]].\r\t(keyCode = 0) ifTrue:\r\t\t[attribute _ TextEmphasis normal].\r\r\tbeginTypeInBlock ~~ nil\r\t\tifTrue:  \"only change emphasisHere while typing\"\r\t\t\t[self insertTypeAhead: characterStream]\r\t\tifFalse:\r\t\t\t[self replaceSelectionWith: (thisSel asText addAttribute: attribute)].\r\r\temphasisHere _ \tText addAttribute: attribute toArray: oldAttributes.\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'editing keys' stamp: 'di 5/28/1998 11:58'!\rchangeLfToCr: characterStream \r\t\"Replace all LFs by CRs.\r\tTriggered by Cmd-U -- useful when getting code from FTP sites\"\r\t| cr lf |\r\tsensor keyboard.\t\t\"flush the triggering cmd-key character\"\r\tcr _ Character cr.  lf _ Character linefeed.\r\tself replaceSelectionWith: (Text fromString:\r\t\t\t(self selection string collect: [:c | c = lf ifTrue: [cr] ifFalse: [c]])).\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'editing keys' stamp: 'tk 5/7/2001 09:11'!\rchooseColor\r\t\"Make a new Text Color Attribute, let the user pick a color, and return the attribute.  This is the non-Morphic version.\"\r\r\t^ TextColor color: (Color fromUser)! !\r\r!ParagraphEditor methodsFor: 'editing keys' stamp: 'di 9/7/1999 08:31'!\rcompareToClipboard: characterStream \r\t\"Compare the receiver to the text on the clipboard.  Flushes typeahead.  5/1/96 sw\"\r\r\tsensor keyboard.\t\r\tself terminateAndInitializeAround: [self compareToClipboard].\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'editing keys' stamp: 'tk 5/7/2001 08:47'!\rcopyHiddenInfo\r\t\"In TextLinks, TextDoits, TextColor, and TextURLs, there is hidden\rinfo.  Copy that to the clipboard.  You can paste it and see what it is.\rUsually enclosed in <>.\"\r\r\t^ self clipboardTextPut: self hiddenInfo asText! !\r\r!ParagraphEditor methodsFor: 'editing keys'!\rcopySelection: characterStream \r\t\"Copy the current text selection.  Flushes typeahead.\"\r\r\tsensor keyboard.\t\t\"flush character\"\r\tself copySelection.\r\t^true! !\r\r!ParagraphEditor methodsFor: 'editing keys'!\rcut: characterStream \r\t\"Cut out the current text selection.  Flushes typeahead.\"\r\r\tsensor keyboard.\t\t\"flush character\"\r\tself cut.\r\t^true! !\r\r!ParagraphEditor methodsFor: 'editing keys' stamp: 'di 9/7/1999 08:23'!\rdoIt: characterStream \r\t\"Called when user hits cmd-d.  Select the current line, if relevant, then evaluate and execute.  2/1/96 sw.\r\t2/29/96 sw: don't call selectLine; it's done by doIt now\"\r\r\tsensor keyboard.\t\r\tself terminateAndInitializeAround: [self doIt].\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'editing keys' stamp: 'th 9/20/2002 11:41'!\rduplicate: characterStream\r\t\"Paste the current selection over the prior selection, if it is non-overlapping and\r\t legal.  Flushes typeahead.  Undoer & Redoer: undoAndReselect.\"\r\r\tsensor keyboard.\r\tself closeTypeIn.\r\t(self hasSelection and: [self isDisjointFrom: otherInterval])\r\t\tifTrue: \"Something to duplicate\"\r\t\t\t[self replace: otherInterval with: self selection and:\r\t\t\t\t[self selectAt: self pointIndex]]\r\t\tifFalse:\r\t\t\t[view flash].\r\t^true! !\r\r!ParagraphEditor methodsFor: 'editing keys' stamp: 'th 9/19/2002 18:01'!\renclose: characterStream\r\t\"Insert or remove bracket characters around the current selection.\r\t Flushes typeahead.\"\r\r\t| char left right startIndex stopIndex oldSelection which text |\r\tchar _ sensor keyboard.\r\tself closeTypeIn.\r\tstartIndex _ self startIndex.\r\tstopIndex _ self stopIndex.\r\toldSelection _ self selection.\r\twhich _ '([<{\"''' indexOf: char ifAbsent: [ ^true ].\r\tleft _ '([<{\"''' at: which.\r\tright _ ')]>}\"''' at: which.\r\ttext _ paragraph text.\r\t((startIndex > 1 and: [stopIndex <= text size])\r\t\tand:\r\t\t[(text at: startIndex-1) = left and: [(text at: stopIndex) = right]])\r\t\tifTrue:\r\t\t\t[\"already enclosed; strip off brackets\"\r\t\t\tself selectFrom: startIndex-1 to: stopIndex.\r\t\t\tself replaceSelectionWith: oldSelection]\r\t\tifFalse:\r\t\t\t[\"not enclosed; enclose by matching brackets\"\r\t\t\tself replaceSelectionWith:\r\t\t\t\t(Text string: (String with: left), oldSelection string ,(String with: right)\r\t\t\t\t\temphasis: emphasisHere).\r\t\t\tself selectFrom: startIndex+1 to: stopIndex].\r\t^true! !\r\r!ParagraphEditor methodsFor: 'editing keys'!\rexchange: characterStream\r\t\"Exchange the current and prior selections.  Keeps typeahead.\"\r\r\tsensor keyboard.\t \"Flush character\"\r\tself closeTypeIn: characterStream.\r\tself exchange.\r\t^true! !\r\r!ParagraphEditor methodsFor: 'editing keys' stamp: 'sw 4/24/2001 12:28'!\rfileItIn: characterStream \r\t\"File in the selection; invoked via a keyboard shortcut, -- for now, cmd-shift-G.\"\r\r\tsensor keyboard.\t\t\"flush character\"\r\tself terminateAndInitializeAround: [self fileItIn].\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'editing keys' stamp: 'th 9/18/2002 16:31'!\rhiddenInfo\r\t\"In TextLinks, TextDoits, TextColor, and TextURLs, there is hidden info.  Return the entire string that was used by Cmd-6 to create this text attribute.  Usually enclosed in < >.\"\r\r\t| attrList |\r\tattrList _ paragraph text attributesAt: (self pointIndex +\rself markIndex)//2 forStyle: paragraph textStyle.\r\tattrList do: [:attr |\r\t\t(attr isKindOf: TextAction) ifTrue:\r\t\t\t[^ self selection asString, '<', attr info, '>']].\r\t\"If none of the above\"\r\tattrList do: [:attr |\r\t\tattr class == TextColor ifTrue:\r\t\t\t[^ self selection asString, '<', attr color printString, '>']].\r\t^ self selection asString, '[No hidden info]'! !\r\r!ParagraphEditor methodsFor: 'editing keys'!\rimplementorsOfIt: characterStream \r\t\"Triggered by Cmd-m; browse implementors of the selector represented by the current selection, if plausible. 2/1/96 sw\"\r\r\tsensor keyboard.\t\t\"flush character\"\r\tself implementorsOfIt.\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'editing keys' stamp: 'th 9/18/2002 16:28'!\rinOutdent: characterStream delta: delta\r\t\"Add/remove a tab at the front of every line occupied by the selection. Flushes typeahead.  Derived from work by Larry Tesler back in December 1985.  Now triggered by Cmd-L and Cmd-R.  2/29/96 sw\"\r\r\t| cr realStart realStop lines startLine stopLine start stop adjustStart indentation size numLines inStream newString outStream |\r\tsensor keyboard.  \"Flush typeahead\"\r\tcr _ Character cr.\r\r\t\"Operate on entire lines, but remember the real selection for re-highlighting later\"\r\trealStart _ self startIndex.\r\trealStop _ self stopIndex - 1.\r\r\t\"Special case a caret on a line of its own, including weird case at end of paragraph\"\r\t(realStart > realStop and:\r\t\t\t\t[realStart < 2 or: [(paragraph string at: realStart - 1) == cr]])\r\t\tifTrue:\r\t\t\t[delta < 0\r\t\t\t\tifTrue:\r\t\t\t\t\t[view flash]\r\t\t\t\tifFalse:\r\t\t\t\t\t[self replaceSelectionWith: Character tab asSymbol asText.\r\t\t\t\t\tself selectAt: realStart + 1].\r\t\t\t^true].\r\r\tlines _ paragraph lines.\r\tstartLine _ paragraph lineIndexOfCharacterIndex: realStart.\r\tstopLine _ paragraph lineIndexOfCharacterIndex: (realStart max: realStop).\r\tstart _ (lines at: startLine) first.\r\tstop _ (lines at: stopLine) last.\r\t\r\t\"Pin the start of highlighting unless the selection starts a line\"\r\tadjustStart _ realStart > start.\r\r\t\"Find the indentation of the least-indented non-blank line; never outdent more\"\r\tindentation _ (startLine to: stopLine) inject: 1000 into:\r\t\t[:m :l |\r\t\tm _ m min: (paragraph indentationOfLineIndex: l ifBlank: [:tabs | 1000])].\t\t\t\r\r\tsize _  stop + 1 - start.\r\tnumLines _ stopLine + 1 - startLine.\r\tinStream _ ReadStream on: paragraph string from: start to: stop.\r\r\tnewString _ String new: size + ((numLines * delta) max: 0).\r\toutStream _ ReadWriteStream on: newString.\r\r\t\"This subroutine does the actual work\"\r\tself indent: delta fromStream: inStream toStream: outStream.\r\r\t\"Adjust the range that will be highlighted later\"\r\tadjustStart ifTrue: [realStart _ (realStart + delta) max: start].\r\trealStop _ realStop + outStream position - size.\r\r\t\"Prepare for another iteration\"\r\tindentation _ indentation + delta.\r\tsize _ outStream position.\r\tinStream _ outStream setFrom: 1 to: size.\r\r\toutStream == nil\r\t\tifTrue: \t\"tried to outdent but some line(s) were already left flush\"\r\t\t\t[view flash]\r\t\tifFalse:\r\t\t\t[self selectInvisiblyFrom: start to: stop.\r\t\t\tsize = newString size ifFalse: [newString _ outStream contents].\r\t\t\tself replaceSelectionWith: newString asText].\r\tself selectFrom: realStart to: realStop. \t\"highlight only the original range\"\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'editing keys'!\rindent: characterStream\r\t\"Add a tab at the front of every line occupied by the selection. Flushes typeahead.  Invoked from keyboard via cmd-shift-R.  2/29/96 sw\"\r\r\t^ self inOutdent: characterStream delta: 1! !\r\r!ParagraphEditor methodsFor: 'editing keys' stamp: 'di 9/7/1999 08:25'!\rinspectIt: characterStream \r\t\"Inspect the selection -- invoked via cmd-i.  If there is no current selection, use the current line.  1/17/96 sw\r\t 2/29/96 sw: don't call selectLine; it's done by inspectIt now\"\r\r\tsensor keyboard.\t\t\"flush character\"\r\tself terminateAndInitializeAround: [self inspectIt].\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'editing keys' stamp: 'di 5/28/1998 12:06'!\rmakeCapitalized: characterStream \r\t\"Force the current selection to uppercase.  Triggered by Cmd-X.\"\r\t| prev |\r\tsensor keyboard.\t\t\"flush the triggering cmd-key character\"\r\tprev _ $-.  \"not a letter\"\r\tself replaceSelectionWith: (Text fromString:\r\t\t\t(self selection string collect:\r\t\t\t\t[:c | prev _ prev isLetter ifTrue: [c asLowercase] ifFalse: [c asUppercase]])).\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'editing keys' stamp: 'di 5/28/1998 12:00'!\rmakeLowercase: characterStream \r\t\"Force the current selection to lowercase.  Triggered by Cmd-X.\"\r\r\tsensor keyboard.\t\t\"flush the triggering cmd-key character\"\r\tself replaceSelectionWith: (Text fromString: (self selection string asLowercase)).\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'editing keys' stamp: 'ls 11/10/2002 12:11'!\rmakeUppercase: characterStream \r\t\"Force the current selection to uppercase.  Triggered by Cmd-Y.\"\r\r\tsensor keyboard.\t\t\"flush the triggering cmd-key character\"\r\tself replaceSelectionWith: (Text fromString: (self selection string asUppercase)).\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'editing keys' stamp: 'sw 8/1/97 15:18'!\rmethodNamesContainingIt: characterStream \r\t\"Browse methods whose selectors containing the selection in their names\"\r\r\tsensor keyboard.\t\t\"flush character\"\r\tself methodNamesContainingIt.\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'editing keys' stamp: 'sw 9/9/97 16:44'!\rmethodStringsContainingIt: characterStream \r\t\"Invoked from cmd-E -- open a browser on all methods holding string constants containing it.  Flushes typeahead. \"\r\r\tsensor keyboard.\t\r\tself methodStringsContainingit.\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'editing keys'!\rnoop: characterStream \r\t\"Unimplemented keyboard command; just ignore it.\"\r\r\tsensor keyboard.\t  \"flush character\"\r\t^ true\r! !\r\r!ParagraphEditor methodsFor: 'editing keys' stamp: 'sw 1/19/2000 11:14'!\rofferFontMenu\r\t\"Present a menu of available fonts, and if one is chosen, apply it to the current selection.  \r\tUse only names of Fonts of this paragraph  \"\r\r\t| aList reply |\r\taList _ paragraph textStyle fontNamesWithPointSizes.\r\treply _ (SelectionMenu labelList: aList selections: aList) startUp.\r\treply ~~ nil ifTrue:\r\t\t[self replaceSelectionWith:\r\t\t\t(Text string: self selection asString \r\t\t\t\tattribute: (TextFontChange fontNumber: (aList indexOf: reply)))] ! !\r\r!ParagraphEditor methodsFor: 'editing keys'!\rofferFontMenu: characterStream \r\t\"The user typed the command key that requests a font change; Offer the font menu.  5/27/96 sw\r\t Keeps typeahead.  (?? should flush?)\"\r\r\tsensor keyboard.\t\t\"flush character\"\r\tself closeTypeIn: characterStream.\r\tself offerFontMenu.\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'editing keys'!\routdent: characterStream\r\t\"Remove a tab from the front of every line occupied by the selection. Flushes typeahead.  Invoked from keyboard via cmd-shift-L.  2/29/96 sw\"\r\r\t^ self inOutdent: characterStream delta: -1! !\r\r!ParagraphEditor methodsFor: 'editing keys'!\rpaste: characterStream \r\t\"Replace the current text selection by the text in the shared buffer.\r\t Keeps typeahead.\"\r\r\tsensor keyboard.\t\t\"flush character\"\r\tself closeTypeIn: characterStream.\r\tself paste.\r\t^true! !\r\r!ParagraphEditor methodsFor: 'editing keys' stamp: 'th 9/19/2002 18:48'!\rpasteInitials: characterStream \r\t\"Replace the current text selection by an authorship name/date stamp; invoked by cmd-shift-v, easy way to put an authorship stamp in the comments of an editor.\r\t Keeps typeahead.\"\r\r\tsensor keyboard.\t\t\"flush character\"\r\tself closeTypeIn: characterStream.\r\tself replace: self selectionInterval with: (Text fromString: Utilities changeStamp) and: [self selectAt: self stopIndex].\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'editing keys' stamp: 'di 9/7/1999 08:25'!\rprintIt: characterStream \r\t\"Print the results of evaluting the selection -- invoked via cmd-p.  If there is no current selection, use the current line.  1/17/96 sw\r\t 2/29/96 sw: don't call selectLine now, since it's called by doIt\"\r\r\tsensor keyboard.\t\t\"flush character\"\r\tself terminateAndInitializeAround: [self printIt].\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'editing keys'!\rreferencesToIt: characterStream \r\t\"Triggered by Cmd-N; browse references to the current selection\"\r\r\tsensor keyboard.\t\t\"flush character\"\r\tself referencesToIt.\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'editing keys' stamp: 'di 9/7/1999 08:43'!\rsave: characterStream\r\t\"Submit the current text.  Equivalent to 'accept' 1/18/96 sw\r\t Keeps typeahead.\"\r\r\tsensor keyboard.\t\t\"flush character\"\r\tself closeTypeIn: characterStream.\r\tself terminateAndInitializeAround: [self accept].\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'editing keys'!\rsendersOfIt: characterStream \r\t\"Triggered by Cmd-n; browse implementors of the selector represented by the current selection, if plausible. 2/1/96 sw\"\r\r\tsensor keyboard.\t\t\"flush character\"\r\tself sendersOfIt.\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'editing keys' stamp: 'yo 5/27/2004 13:56'!\rsetEmphasis: emphasisSymbol\r\t\"Change the emphasis of the current selection.\"\r\r\t| oldAttributes attribute |\r\toldAttributes _ paragraph text attributesAt: self selectionInterval first forStyle: paragraph textStyle.\r\r\tattribute _ TextEmphasis perform: emphasisSymbol.\r\t(emphasisSymbol == #normal) \r\t\tifFalse:\t[oldAttributes do:\t\r\t\t\t[:att | (att dominates: attribute) ifTrue: [attribute turnOff]]].\r\tself replaceSelectionWith: (self selection addAttribute: attribute)! !\r\r!ParagraphEditor methodsFor: 'editing keys' stamp: 'th 9/18/2002 16:20'!\rshiftEnclose: characterStream\r\t\"Insert or remove bracket characters around the current selection.\r\t Flushes typeahead.\"\r\r\t| char left right startIndex stopIndex oldSelection which text |\r\tchar _ sensor keyboard.\r\tchar = $9 ifTrue: [ char _ $( ].\r\tchar = $, ifTrue: [ char _ $< ].\r\tchar = $[ ifTrue: [ char _ ${ ].\r\tchar = $' ifTrue: [ char _ $\" ].\r\tchar asciiValue = 27 ifTrue: [ char _ ${ ].\t\"ctrl-[\"\r\r\tself closeTypeIn.\r\tstartIndex _ self startIndex.\r\tstopIndex _ self stopIndex.\r\toldSelection _ self selection.\r\twhich _ '([<{\"''' indexOf: char ifAbsent: [1].\r\tleft _ '([<{\"''' at: which.\r\tright _ ')]>}\"''' at: which.\r\ttext _ paragraph text.\r\t((startIndex > 1 and: [stopIndex <= text size])\r\t\tand:\r\t\t[(text at: startIndex-1) = left and: [(text at: stopIndex) = right]])\r\t\tifTrue:\r\t\t\t[\"already enclosed; strip off brackets\"\r\t\t\tself selectFrom: startIndex-1 to: stopIndex.\r\t\t\tself replaceSelectionWith: oldSelection]\r\t\tifFalse:\r\t\t\t[\"not enclosed; enclose by matching brackets\"\r\t\t\tself replaceSelectionWith:\r\t\t\t\t(Text string: (String with: left), oldSelection string ,(String with: right)\r\t\t\t\t\temphasis: emphasisHere).\r\t\t\tself selectFrom: startIndex+1 to: stopIndex].\r\t^true! !\r\r!ParagraphEditor methodsFor: 'editing keys' stamp: 'di 9/7/1999 08:43'!\rspawnIt: characterStream\r\t\"Triggered by Cmd-o; spawn a new code window, if it makes sense.\"\r\r\tsensor keyboard.\r\tself terminateAndInitializeAround: [self spawn].\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'editing keys' stamp: 'th 9/19/2002 18:00'!\rswapChars: characterStream \r\t\"Triggered byCmd-Y;.  Swap two characters, either those straddling the insertion point, or the two that comprise the selection.  Suggested by Ted Kaehler.  \"\r\r\t| currentSelection aString chars |\r\tsensor keyboard.\t\t\"flush the triggering cmd-key character\"\r\t(chars _ self selection) size == 0\r\t\tifTrue:\r\t\t\t[currentSelection _ self pointIndex.\r\t\t\tself selectMark: currentSelection - 1 point: currentSelection]\r\t\tifFalse:\r\t\t\t[chars size == 2\r\t\t\t\tifFalse:\r\t\t\t\t\t[view flash.  ^ true]\r\t\t\t\tifTrue:\r\t\t\t\t\t[currentSelection _ self pointIndex - 1]].\r\taString _ self selection string.\r\tself replaceSelectionWith: (Text string: aString reversed emphasis: emphasisHere).\r\tself selectAt: currentSelection + 1.\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'editing keys' stamp: 'sw 11/2/1998 15:50'!\rtempCommand: characterStream \r\t\"Experimental.  Triggered by Cmd-t; put trial cmd-key commands here to see how they work, before hanging them on their own cmd accelerators.\"\r\tSensor keyboard.\r\tself experimentalCommand.\r\t^ true\r\r\t\"sensor keyboard.\r\tself spawnWorkspace.\r\t^ true\"! !\r\r!ParagraphEditor methodsFor: 'editing keys'!\rundo: characterStream \r\t\"Undo the last edit.  Keeps typeahead, so undo twice is a full redo.\"\r\r\tsensor keyboard. \t\"flush character\"\r\tself closeTypeIn: characterStream.\r\tself undo.\r\t^true! !\r\r\r!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 1/21/2000 18:51'!\rcomment\r\t\"All key actions that are neither editing nor typing actions have to\r\tsend closeTypeIn at first. See comment in openTypeIn closeTypeIn\"! !\r\r!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 11/18/2002 17:08'!\rcursorDown: characterStream \r\r\t\"Private - Move cursor from position in current line to same position in\r\tnext line. If next line too short, put at end. If shift key down,\r\tselect.\"\r\tself closeTypeIn: characterStream.\r\tself \r\t\tmoveCursor:[:position | self\r\t\t\t\tsameColumn: position\r\t\t\t\tnewLine:[:line | line + 1]\r\t\t\t\tforward: true]\r\t\tforward: true\r\t\tspecialBlock:[:dummy | dummy].\r\t^true! !\r\r!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 10/28/2003 10:47'!\rcursorEnd: characterStream \r\r\t\"Private - Move cursor end of current line.\"\r\t| string |\r\tself closeTypeIn: characterStream.\r\tstring _ paragraph text string.\r\tself\r\t\tmoveCursor:\r\t\t\t[:position | Preferences wordStyleCursorMovement\r\t\t\t\tifTrue:[| targetLine |\r\t\t\t\t\ttargetLine _ paragraph lines at:(paragraph lineIndexOfCharacterIndex: position).\r\t\t\t\t\ttargetLine = paragraph lines last\r\t\t\t\t\t\tifTrue:[targetLine last + 1]\r\t\t\t\t\t\tifFalse:[targetLine last]]\r\t\t\t\tifFalse:[\r\t\t\t\t\tstring\r\t\t\t\t\t\tindexOf: Character cr\r\t\t\t\t\t\tstartingAt: position\r\t\t\t\t\t\tifAbsent:[string size + 1]]]\r\t\tforward: true\r\t\tspecialBlock:[:dummy | string size + 1].\r\t^true! !\r\r!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 9/20/2002 12:14'!\rcursorHome: characterStream \r\r\t\"Private - Move cursor from position in current line to beginning of\r\tcurrent line. If control key is pressed put cursor at beginning of text\"\r\r\t| string |\r\r\tstring _ paragraph text string.\r\tself\r\t\tmoveCursor: [ :position | Preferences wordStyleCursorMovement\r\t\t\t\tifTrue:[\r\t\t\t\t\t(paragraph lines at:(paragraph lineIndexOfCharacterIndex: position)) first]\r\t\t\t\tifFalse:[\r\t\t\t\t\t(string\r\t\t\t\t\t\tlastIndexOf: Character cr\r\t\t\t\t\t\tstartingAt: position - 1\r\t\t\t\t\t\tifAbsent:[0]) + 1]]\r\t\tforward: false\r\t\tspecialBlock: [:dummy | 1].\r\t^true! !\r\r!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 9/19/2002 20:07'!\rcursorLeft: characterStream \r\t\"Private - Move cursor left one character if nothing selected, otherwise \r\tmove cursor to beginning of selection. If the shift key is down, start \r\tselecting or extending current selection. Don't allow cursor past \r\tbeginning of text\"\r\r\tself closeTypeIn: characterStream.\r\tself\r\t\tmoveCursor:[:position | position - 1 max: 1]\r\t\tforward: false\r\t\tspecialBlock:[:position | self previousWord: position].\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 11/18/2002 17:09'!\rcursorPageDown: characterStream \r\r\tself closeTypeIn: characterStream.\r\tself \r\t\tmoveCursor: [:position |\r\t\t\tself\r\t\t\t\tsameColumn: position\r\t\t\t\tnewLine:[:lineNo | lineNo + self pageHeight]\r\t\t\t\tforward: true]\r\t\tforward: true\r\t\tspecialBlock:[:dummy | dummy].\r\t^true! !\r\r!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 11/18/2002 17:09'!\rcursorPageUp: characterStream \r\r\tself closeTypeIn: characterStream.\r\tself \r\t\tmoveCursor: [:position |\r\t\t\tself\r\t\t\t\tsameColumn: position\r\t\t\t\tnewLine:[:lineNo | lineNo - self pageHeight]\r\t\t\t\tforward: false]\r\t\tforward: false\r\t\tspecialBlock:[:dummy | dummy].\r\t^true! !\r\r!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 9/19/2002 20:01'!\rcursorRight: characterStream \r\t\"Private - Move cursor right one character if nothing selected, \r\totherwise move cursor to end of selection. If the shift key is down, \r\tstart selecting characters or extending already selected characters. \r\tDon't allow cursor past end of text\"\r\r\tself closeTypeIn: characterStream.\r\tself\r\t\tmoveCursor: [:position | position + 1]\r\t\tforward: true\r\t\tspecialBlock:[:position | self nextWord: position].\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 11/18/2002 17:15'!\rcursorUp: characterStream \r\r\"Private - Move cursor from position in current line to same position in\rprior line. If prior line too short, put at end\"\r\r\tself closeTypeIn: characterStream.\r\tself\r\t\tmoveCursor: [:position | self\r\t\t\t\tsameColumn: position\r\t\t\t\tnewLine:[:line | line - 1]\r\t\t\t\tforward: false]\r\t\tforward: false\r\t\tspecialBlock:[:dummy | dummy].\r\t^true! !\r\r!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'BG 10/28/2003 21:01'!\rescapeToDesktop: characterStream \r\t\"Pop up a morph to field keyboard input in the context of the desktop\"\r\r\t\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'dvf 12/8/2001 00:46'!\rraiseContextMenu: characterStream \r\t\"AFAIK, this is never called in morphic, because a subclass overrides it. Which is good, because a ParagraphEditor doesn't know about Morphic and thus duplicates the text-editing actions that really belong in the specific application, not the controller. So the context menu this would raise is likely to be out of date.\"\r\tself yellowButtonActivity.\r\t^true! !\r\r!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 1/21/2000 18:55'!\rselectCurrentTypeIn: characterStream \r\t\"Select what would be replaced by an undo (e.g., the last typeIn).\"\r\r\t| prior |\r\r\tself closeTypeIn: characterStream.\r\tprior _ otherInterval.\r\tsensor keyboard.\t\t\"flush character\"\r\tself closeTypeIn: characterStream.\r\tself selectInterval: UndoInterval.\r\totherInterval _ prior.\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'sma 12/15/1999 11:46'!\rselectWord: characterStream\r\tsensor keyboard.\r\tself closeTypeIn: characterStream.\r\tself selectWord.\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'th 1/21/2000 18:55'!\rsetSearchString: characterStream\r\t\"Establish the current selection as the current search string.\"\r\r\t| aString |\r\tself closeTypeIn: characterStream.\r\tsensor keyboard.\r\tself lineSelectAndEmptyCheck: [^ true].\r\taString _  self selection string.\r\taString size == 0\r\t\tifTrue:\r\t\t\t[self flash]\r\t\tifFalse:\r\t\t\t[self setSearch: aString].\r\t^ true! !\r\r\r!ParagraphEditor methodsFor: 'typing/selecting keys' stamp: 'th 9/20/2002 11:22'!\rargAdvance: characterStream\r\t\"Invoked by Ctrl-a.  Useful after Ctrl-q.\r\t Search forward from the end of the selection for a colon followed by\r\t\ta space.  Place the caret after the space.  If none are found, place the\r\t\tcaret at the end of the text.  Does not affect the undoability of the \r\t \tprevious command.\"\r\r\t| start |\r\tsensor keyboard.\t\t\"flush character\"\r\tself closeTypeIn: characterStream.\r\tstart _ paragraph text findString: ': ' startingAt: self stopIndex.\r\tstart = 0 ifTrue: [start _ paragraph text size + 1].\r\tself selectAt: start + 2.\r\t^true! !\r\r!ParagraphEditor methodsFor: 'typing/selecting keys' stamp: 'th 10/21/2003 15:46'!\rbackWord: characterStream \r\t\"If the selection is not a caret, delete it and leave it in the backspace buffer.\r\t Else if there is typeahead, delete it.\r\t Else, delete the word before the caret.\"\r\r\t| startIndex |\r\tsensor keyboard.\r\tcharacterStream isEmpty\r\t\tifTrue:\r\t\t\t[self hasCaret\r\t\t\t\tifTrue: \"a caret, delete at least one character\"\r\t\t\t\t\t[startIndex _ 1 max: self markIndex - 1.\r\t\t\t\t\t[startIndex > 1 and:\r\t\t\t\t\t\t[(paragraph text at: startIndex - 1) asCharacter tokenish]]\r\t\t\t\t\t\twhileTrue:\r\t\t\t\t\t\t\t[startIndex _ startIndex - 1]]\r\t\t\t\tifFalse: \"a non-caret, just delete it\"\r\t\t\t\t\t[startIndex _ self markIndex].\r\t\t\tself backTo: startIndex]\r\t\tifFalse:\r\t\t\t[characterStream reset].\r\t^false! !\r\r!ParagraphEditor methodsFor: 'typing/selecting keys' stamp: 'th 9/19/2002 18:23'!\rbackspace: characterStream \r\t\"Backspace over the last character.\"\r\r\t| startIndex |\r\tsensor leftShiftDown ifTrue: [^ self backWord: characterStream].\r\tcharacterStream isEmpty\r\t\tifTrue:\r\t\t\t[startIndex _ self markIndex +\r\t\t\t\t(self hasCaret ifTrue: [0] ifFalse: [1]).\r\t\t\t[sensor keyboardPressed and:\r\t\t\t [sensor keyboardPeek asciiValue = 8]] whileTrue: [\r\t\t\t\t\"process multiple backspaces\"\r\t\t\t\tsensor keyboard.\r\t\t\t\tstartIndex _ 1 max: startIndex - 1.\r\t\t\t].\r\t\t\tself backTo: startIndex]\r\t\tifFalse:\r\t\t\t[sensor keyboard.\r\t\t\tcharacterStream skip: -1].\r\t^false! !\r\r!ParagraphEditor methodsFor: 'typing/selecting keys'!\rchangeStyle: characterStream \r\t\"Put up the style-change menu\"\r\r\tsensor keyboard.\t\t\"flush character\"\r\tself closeTypeIn: characterStream.\r\tself changeStyle.\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'typing/selecting keys' stamp: 'th 9/20/2002 11:25'!\rcrWithIndent: characterStream \r\t\"Replace the current text selection with CR followed by as many tabs\r\tas on the current line (+/- bracket count) -- initiated by Shift-Return.\"\r\t| char s i tabCount |\r\tsensor keyboard.\t\t\"flush character\"\r\ts _ paragraph string.\r\ti _ self stopIndex.\r\ttabCount _ 0.\r\t[(i _ i-1) > 0 and: [(char _ s at: i) ~= Character cr]]\r\t\twhileTrue:  \"Count tabs and brackets (but not a leading bracket)\"\r\t\t[(char = Character tab and: [i < s size and: [(s at: i+1) ~= $[ ]]) ifTrue: [tabCount _ tabCount + 1].\r\t\tchar = $[ ifTrue: [tabCount _ tabCount + 1].\r\t\tchar = $] ifTrue: [tabCount _ tabCount - 1]].\r\tcharacterStream crtab: tabCount.  \"Now inject CR with tabCount tabs\"\r\t^ false! !\r\r!ParagraphEditor methodsFor: 'typing/selecting keys' stamp: 'sw 4/30/2001 21:20'!\rcursorTopHome: characterStream \r\t\"Put cursor at beginning of text -- invoked from cmd-H shortcut, useful for keyboards that have no home key.\"\r\t\r\tsensor keyboard.\r\tself selectAt: 1.\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'typing/selecting keys'!\rdisplayIfFalse: characterStream \r\t\"Replace the current text selection with the text 'ifFalse:'--initiated by \r\tctrl-f.\"\r\r\tsensor keyboard.\t\t\"flush character\"\r\tcharacterStream nextPutAll: 'ifFalse:'.\r\t^false! !\r\r!ParagraphEditor methodsFor: 'typing/selecting keys'!\rdisplayIfTrue: characterStream \r\t\"Replace the current text selection with the text 'ifTrue:'--initiated by \r\tctrl-t.\"\r\r\tsensor keyboard.\t\t\"flush character\"\r\tcharacterStream nextPutAll: 'ifTrue:'.\r\t^false! !\r\r!ParagraphEditor methodsFor: 'typing/selecting keys'!\rdoAgainMany: characterStream \r\t\"Do the previous thing again repeatedly. 1/26/96 sw\"\r\r\tsensor keyboard.\t\t\"flush character\"\r\tself closeTypeIn: characterStream.\r\tself againOrSame: (UndoMessage sends: #undoAgain:andReselect:typedKey:) many: true.\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'typing/selecting keys'!\rdoAgainOnce: characterStream \r\t\"Do the previous thing again once. 1/26/96 sw\"\r\r\tsensor keyboard.\t\t\"flush character\"\r\tself closeTypeIn: characterStream.\r\tself again.\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'typing/selecting keys'!\rfind: characterStream\r\t\"Prompt the user for what to find, then find it, searching from the current selection onward.  1/24/96 sw\"\r\r\tsensor keyboard.\t\t\"flush character\"\r\tself closeTypeIn: characterStream.\r\tself find.\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'typing/selecting keys'!\rfindAgain: characterStream \r\t\"Find the desired text again.  1/24/96 sw\"\r\r\tsensor keyboard.\t\t\"flush character\"\r\tself closeTypeIn: characterStream.\r\tself findAgain.\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'typing/selecting keys' stamp: 'th 9/18/2002 11:39'!\rforwardDelete: characterStream\r\t\"Delete forward over the next character.\r\t  Make Undo work on the whole type-in, not just the one char.\r\twod 11/3/1998: If there was a selection use #zapSelectionWith: rather than #backspace: which was 'one off' in deleting the selection. Handling of things like undo or typeIn area were not fully considered.\"\r\t| startIndex usel upara uinterval ind stopIndex |\r\tstartIndex _ self mark.\r\tstartIndex > paragraph text size ifTrue:\r\t\t[sensor keyboard.\r\t\t^ false].\r\tself hasSelection ifTrue:\r\t\t[\"there was a selection\"\r\t\tsensor keyboard.\r\t\tself zapSelectionWith: self nullText.\r\t\t^ false].\r\t\"Null selection - do the delete forward\"\r\tbeginTypeInBlock == nil\t\"no previous typing.  openTypeIn\"\r\t\tifTrue: [self openTypeIn. UndoSelection _ self nullText].\r\tuinterval _ UndoInterval deepCopy.\r\tupara _ UndoParagraph deepCopy.\r\tstopIndex := startIndex.\r\t(sensor keyboard asciiValue = 127 and: [sensor leftShiftDown])\r\t\tifTrue: [stopIndex := (self nextWord: stopIndex) - 1].\r\tself selectFrom: startIndex to: stopIndex.\r\tself replaceSelectionWith: self nullText.\r\tself selectFrom: startIndex to: startIndex-1.\r\tUndoParagraph _ upara.  UndoInterval _ uinterval.\r\tUndoMessage selector == #noUndoer ifTrue: [\r\t\t(UndoSelection isText) ifTrue: [\r\t\t\tusel _ UndoSelection.\r\t\t\tind _ startIndex. \"UndoInterval startIndex\"\r\t\t\tusel replaceFrom: usel size + 1 to: usel size with:\r\t\t\t\t(UndoParagraph text copyFrom: ind to: ind).\r\t\t\tUndoParagraph text replaceFrom: ind to: ind with:\rself nullText]].\r\t^false! !\r\r!ParagraphEditor methodsFor: 'typing/selecting keys'!\rnormalCharacter: characterStream \r\t\"A nonspecial character is to be added to the stream of characters.\"\r\r\tcharacterStream nextPut: sensor keyboard.\r\t^false! !\r\r!ParagraphEditor methodsFor: 'typing/selecting keys' stamp: 'th 9/19/2002 18:25'!\rquerySymbol: characterStream\r\t\"Invoked by Ctrl-q to query the Symbol table and display alternate symbols.\r\t See comment in completeSymbol:lastOffering: for details.\"\r\r\tsensor keyboard.\t\t\"flush character\"\r\tself closeTypeIn: characterStream.\t\"keep typeahead\"\r\tself hasCaret\r\t\tifTrue: \"Ctrl-q typed when a caret\"\r\t\t\t[self perform: #completeSymbol:lastOffering: withArguments:\r\t\t\t\t((UndoParagraph == paragraph and: [UndoMessage sends: #undoQuery:lastOffering:])\r\t\t\t\t\tifTrue: [UndoMessage arguments] \"repeated Ctrl-q\"\r\t\t\t\t\tifFalse: [Array with: nil with: nil])] \"initial Ctrl-q\"\r\t\tifFalse: \"Ctrl-q typed when statements were highlighted\"\r\t\t\t[view flash].\r\t^true! !\r\r!ParagraphEditor methodsFor: 'typing/selecting keys'!\rsearch: characterStream\r\t\"Invoked by Ctrl-S.  Same as 'again', but always uses the existing FindText\r\t and ChangeText regardless of the last edit.\"\r\r\tsensor keyboard.\t\t\"flush character\"\r\tself closeTypeIn: characterStream.\r\tself againOrSame: true. \"true means use same keys\"\r\t^true! !\r\r!ParagraphEditor methodsFor: 'typing/selecting keys' stamp: 'sw 8/29/2000 14:58'!\rselectAll\r\t\"Make the selection be all the characters of the receiver\"\r\r\tself selectFrom: 1 to: paragraph text string size! !\r\r!ParagraphEditor methodsFor: 'typing/selecting keys'!\rselectAll: characterStream \r\t\"select everything, invoked by cmd-a.  1/17/96 sw\"\r\r\tsensor keyboard.\t\t\"flush character\"\r\tself closeTypeIn: characterStream.\r\tself selectFrom: 1 to: paragraph text string size.\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'typing/selecting keys' stamp: 'th 9/19/2002 17:34'!\rsimulatedBackspace\r\t\"Backspace over the last character, derived from hand-char recognition.  2/5/96 sw\"\r\r\t| startIndex |\r\tstartIndex _ self markIndex + (self hasSelection ifTrue: [1] ifFalse: [0]).\r\r\tstartIndex _ 1 max: startIndex - 1.\r\tself backTo: startIndex.\r\t^ false! !\r\r\r!ParagraphEditor methodsFor: 'typing support' stamp: 'th 9/19/2002 17:36'!\rbackTo: startIndex\r\t\"During typing, backspace to startIndex.  Deleted characters fall into three\r\t clusters, from left to right in the text: (1) preexisting characters that were\r\t backed over; (2) newly typed characters that were backed over (excluding\r\t typeahead, which never even appears); (3) preexisting characters that\r\t were highlighted before typing began.  If typing has not yet been opened,\r\t open it and watch for the first and third cluster.  If typing has been opened,\r\t watch for the first and second cluster.  Save characters from the first and third\r\t cluster in UndoSelection.  Tally characters from the first cluster in UndoMessage's parameter.\r\t Delete all the clusters.  Do not alter Undoer or UndoInterval (except via\r\t openTypeIn).  The code is shorter than the comment.\"\r\r\t| saveLimit newBackovers |\r\tsaveLimit _ beginTypeInBlock\r\t\tifNil: [self openTypeIn. UndoSelection _ self nullText. self stopIndex]\r\t\tifNotNil: [self startOfTyping].\r\tself setMark: startIndex.\r\tstartIndex < saveLimit ifTrue:\r\t\t[newBackovers _ self startOfTyping - startIndex.\r\t\tbeginTypeInBlock _ self startIndex.\r\t\tUndoSelection replaceFrom: 1 to: 0 with:\r\t\t\t(paragraph text copyFrom: startIndex to: saveLimit - 1).\r\t\tUndoMessage argument: (UndoMessage argument ifNil: [1]) + newBackovers].\r\tself zapSelectionWith: self nullText.\r\tself unselect! !\r\r!ParagraphEditor methodsFor: 'typing support' stamp: 'th 9/19/2002 17:40'!\rcloseTypeIn\r\t\"See comment in openTypeIn.  It is important to call closeTypeIn before executing\r\t any non-typing key, making a new selection, etc.  It is called automatically for\r\t menu commands.\r\t Typing commands can call 'closeTypeIn: aCharacterStream' instead of this to\r\t save typeahead.  Undoer & Redoer: undoAndReselect:redoAndReselect:.\"\r\r\t| begin stop |\r\tbeginTypeInBlock == nil ifFalse:\r\t\t[(UndoMessage sends: #noUndoer) ifTrue: \"should always be true, but just in case...\"\r\t\t\t[begin _ self startOfTyping.\r\t\t\tstop _ self stopIndex.\r\t\t\tself undoer: #undoAndReselect:redoAndReselect:\r\t\t\t\twith: (begin + UndoMessage argument to: begin + UndoSelection size - 1)\r\t\t\t\twith: (stop to: stop - 1).\r\t\t\tUndoInterval _ begin to: stop - 1].\r\t\tbeginTypeInBlock _ nil]! !\r\r!ParagraphEditor methodsFor: 'typing support'!\rcloseTypeIn: characterStream\r\t\"Call instead of closeTypeIn when you want typeahead to be inserted before the\r\t control character is executed, e.g., from Ctrl-V.\"\r\r\tself insertTypeAhead: characterStream.\r\tself closeTypeIn! !\r\r!ParagraphEditor methodsFor: 'typing support' stamp: 'di 9/7/1999 11:26'!\rdispatchOnEnterWith: typeAheadStream\r\t\"Enter key hit.  Treat is as an 'accept', viz a synonym for cmd-s.  If cmd key is down, treat is as a synonym for print-it. \"\r\r\tsensor keyboard.  \"consume enter key\"\r\tself terminateAndInitializeAround: [\r\tsensor commandKeyPressed\r\t\tifTrue:\r\t\t\t[self printIt.]\r\t\tifFalse: \r\t\t\t[self closeTypeIn: typeAheadStream.\r\t\t\tself accept].\r\t].\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'typing support' stamp: 'di 6/14/1998 13:08'!\rdoneTyping\r\tbeginTypeInBlock _ nil! !\r\r!ParagraphEditor methodsFor: 'typing support' stamp: 'th 9/17/2002 16:23'!\rinsertTypeAhead: typeAhead\r\ttypeAhead position = 0 ifFalse:\r\t\t[self zapSelectionWith: (Text string: typeAhead contents emphasis: emphasisHere).\r\t\ttypeAhead reset.\r\t\tself unselect]! !\r\r!ParagraphEditor methodsFor: 'typing support' stamp: 'th 9/18/2002 16:48'!\ropenTypeIn\r\t\"Set up UndoSelection to null text (to be added to by readKeyboard and backTo:),\r\t beginTypeInBlock to keep track of the leftmost backspace, and UndoParameter to tally\r\t how many deleted characters were backspaced over rather than 'cut'.\r\t You can't undo typing until after closeTypeIn.\"\r\r\tbeginTypeInBlock == nil ifTrue:\r\t\t[UndoSelection _ self nullText.\r\t\tself undoer: #noUndoer with: 0.\r\t\tbeginTypeInBlock _ self startIndex]! !\r\r!ParagraphEditor methodsFor: 'typing support' stamp: 'th 9/19/2002 18:26'!\rreadKeyboard\r\t\"Key struck on the keyboard. Find out which one and, if special, carry \r\tout the associated special action. Otherwise, add the character to the \r\tstream of characters.  Undoer & Redoer: see closeTypeIn.\"\r\r\t| typeAhead char |\r\ttypeAhead _ WriteStream on: (String new: 128).\r\t[sensor keyboardPressed] whileTrue: \r\t\t[self deselect.\r\t\t [sensor keyboardPressed] whileTrue: \r\t\t\t[char _ sensor keyboardPeek.\r\t\t\t(self dispatchOnCharacter: char with: typeAhead) ifTrue:\r\t\t\t\t[self doneTyping.\r\t\t\t\tself setEmphasisHere.\r\t\t\t\t^self selectAndScroll; updateMarker].\r\t\t\tself openTypeIn].\r\t\tself hasSelection ifTrue: \"save highlighted characters\"\r\t\t\t[UndoSelection _ self selection]. \r\t\tself zapSelectionWith: \r\t\t\t(Text string: typeAhead contents emphasis: emphasisHere).\r\t\ttypeAhead reset.\r\t\tself unselect.\r\t\tsensor keyboardPressed ifFalse: \r\t\t\t[self selectAndScroll.\r\t\t\tsensor keyboardPressed\r\t\t\t\tifFalse: [self updateMarker]]]! !\r\r!ParagraphEditor methodsFor: 'typing support' stamp: 'th 9/18/2002 16:49'!\rsetEmphasisHere\r\r\temphasisHere _ (paragraph text attributesAt: (self pointIndex - 1 max: 1) forStyle: paragraph textStyle)\r\t\t\t\t\tselect: [:att | att mayBeExtended]! !\r\r!ParagraphEditor methodsFor: 'typing support' stamp: 'th 9/17/2002 16:23'!\rsimulatedKeystroke: char\r\t\"Accept char as if it were struck on the keyboard.  This version does not yet deal with command keys, and achieves update in the receiver's typically inactive window via the sledge-hammer of uncache-bits.\"\r\r\tself deselect.\r\tself openTypeIn.\r\tself markBlock = self pointBlock ifFalse: [UndoSelection _ self selection].\r\tself zapSelectionWith:\r\t\t(Text string: char asString emphasis: emphasisHere).\r\tself userHasEdited.\r\tself unselect.\r\tself selectAndScroll.\r\tself updateMarker.\r\tview ifNotNil:\r\t\t[view topView uncacheBits\r\t\t\"in mvc, this makes sure the recognized character shows up in the pane right now; in morphic, a different mechanism is used for the same effect -- see TextMorphEditor method #recognizeCharactersWhileMouseIn:\"]\r! !\r\r!ParagraphEditor methodsFor: 'typing support' stamp: 'di 10/6/1998 08:45'!\rstartOfTyping\r\t\"Compatibility during change from characterBlock to integer\"\r\tbeginTypeInBlock == nil ifTrue: [^ nil].\r\tbeginTypeInBlock isNumber ifTrue: [^ beginTypeInBlock].\r\t\"Last line for compatibility during change from CharacterBlock to Integer.\"\r\t^ beginTypeInBlock stringIndex\r\t! !\r\r\r!ParagraphEditor methodsFor: 'undoers'!\rundoAgain: indices andReselect: home typedKey: wasTypedKey\r\t\"The last command was again.  Undo it. Redoer: itself.\"\r\r\t| findSize substText index subject |\r\t(self isRedoing & wasTypedKey) ifTrue: \"redelete search key\"\r\t\t[self selectInterval: home.\r\t\tself zapSelectionWith: self nullText].\r\r\tfindSize _ (self isRedoing ifTrue: [FindText] ifFalse: [ChangeText]) size.\r\tsubstText _ self isUndoing ifTrue: [FindText] ifFalse: [ChangeText].\r\t(self isUndoing ifTrue: [indices size to: 1 by: -1] ifFalse: [1 to: indices size]) do:\r\t\t[:i |\r\t\tindex _ indices at: i.\r\t\t(subject _ index to: index + findSize - 1) = self selectionInterval ifFalse:\r\t\t\t[self selectInterval: subject].\r\t\tFindText == ChangeText ifFalse: [self zapSelectionWith: substText]].\r\r\tself isUndoing\r\t\tifTrue:  \"restore selection to where it was when 'again' was invoked\"\r\t\t\t[wasTypedKey\r\t\t\t\tifTrue: \"search started by typing key at a caret; restore it\"\r\t\t\t\t\t[self selectAt: home first.\r\t\t\t\t\tself zapSelectionWith: FindText.\r\t\t\t\t\tself selectAt: home last + 1]\r\t\t\t\tifFalse: [self selectInterval: home]].\r\r\tself undoMessage: UndoMessage forRedo: self isUndoing! !\r\r!ParagraphEditor methodsFor: 'undoers'!\rundoAndReselect: undoHighlight redoAndReselect: redoHighlight\r\t\"Undo typing, cancel, paste, and other operations that are like replaces\r\t but the selection is not the whole restored text after undo, redo, or both.\r\t undoHighlight is selected after this phase and redoHighlight after the next phase.\r\tRedoer: itself.\"\r\r\tself replace: self selectionInterval with: UndoSelection and:\r\t\t[self selectInterval: undoHighlight].\r\tself undoMessage: (UndoMessage argument: redoHighlight) forRedo: self isUndoing\r! !\r\r!ParagraphEditor methodsFor: 'undoers'!\rundoCutCopy: oldPasteBuffer\r\t\"Undo of a cut, copy, or any edit that changed CurrentSelection.  Be sure\r\t undo-copy does not lock the model.  Redoer: itself, so never isRedoing.\"\r\r\t| recentCut |\r\trecentCut _ self clipboardText.\t\r\tUndoSelection size = UndoInterval size\r\t\tifFalse: [self replaceSelectionWith: UndoSelection].\r\tself clipboardTextPut: oldPasteBuffer.\r\tself undoer: #undoCutCopy: with: recentCut! !\r\r!ParagraphEditor methodsFor: 'undoers' stamp: 'th 9/19/2002 18:46'!\rundoQuery: hintText lastOffering: selectorOrNil\r\t\"Undo ctrl-q.  selectorOrNil (if not nil) is the previously offered selector.\r\t hintText is the original hint.  Redoer: completeSymbol.\"\r\r\tself zapSelectionWith: UndoSelection.\r\tself undoMessage: (Message selector: #completeSymbol:lastOffering: arguments: UndoMessage arguments) forRedo: true.\r\tself selectAt: self stopIndex! !\r\r!ParagraphEditor methodsFor: 'undoers'!\rundoReplace\r\t\"Undo of any command that replaced a selection by other text that it left\r\t highlighted, and that is undone and redone by simple reversal of the\r\t operation.  This is the most common Undoer; call replaceSelectionWith:\r\t to get this setup.  Redoer: itself, so never isRedoing.\"\r\r\tself replaceSelectionWith: UndoSelection! !\r\r\r!ParagraphEditor methodsFor: 'undo support'!\risDoing\r\t\"Call from a doer/undoer/redoer any time to see which it is.\"\r\r\t^(self isUndoing | self isRedoing) not! !\r\r!ParagraphEditor methodsFor: 'undo support'!\risRedoing\r\t\"Call from a doer/undoer/redoer any time to see which it is.\"\r\r\t^UndoParagraph == #redoing! !\r\r!ParagraphEditor methodsFor: 'undo support'!\risUndoing\r\t\"Call from a doer/undoer/redoer any time to see which it is.\"\r\r\t^UndoParagraph == #undoing! !\r\r!ParagraphEditor methodsFor: 'undo support'!\rnoUndoer\r\t\"The Undoer to use when the command can not be undone.  Checked for\r\t specially by readKeyboard.\"\r\r\tUndoMessage _ Message selector: #noUndoer! !\r\r!ParagraphEditor methodsFor: 'undo support'!\rundoMessage: aMessage forRedo: aBoolean\r\t\"Call this from an undoer/redoer to set up UndoMessage as the\r\t corresponding redoer/undoer.  Also set up UndoParagraph, as well\r\t as the state variable Undone.  It is assumed that UndoInterval has been\r\t established (generally by zapSelectionWith:) and that UndoSelection has been\r\t saved (generally by replaceSelectionWith: or replace:With:and:).\"\r\r\tself isDoing ifTrue: [UndoParagraph _ paragraph].\r\tUndoMessage _ aMessage.\r\tUndone _ aBoolean! !\r\r!ParagraphEditor methodsFor: 'undo support'!\rundoer: aSelector\r\t\"See comment in undoMessage:.  Use this version when aSelector has no arguments, and you are doing or redoing and want to prepare for undoing.\"\r\r\tself undoMessage: (Message selector: aSelector) forRedo: false! !\r\r!ParagraphEditor methodsFor: 'undo support'!\rundoer: aSelector with: arg1\r\t\"See comment in undoMessage:.  Use this version when aSelector has one argument, and you are doing or redoing and want to prepare for undoing.\"\r\r\tself undoMessage: (Message selector: aSelector argument: arg1) forRedo: false! !\r\r!ParagraphEditor methodsFor: 'undo support'!\rundoer: aSelector with: arg1 with: arg2\r\t\"See comment in undoMessage:.  Use this version when aSelector has two arguments, and you are doing or redoing and want to prepare for undoing.\"\r\r\tself undoMessage: (Message selector: aSelector arguments: (Array with: arg1 with: arg2)) forRedo: false! !\r\r!ParagraphEditor methodsFor: 'undo support'!\rundoer: aSelector with: arg1 with: arg2 with: arg3\r\t\"See comment in undoMessage:.  Use this version when aSelector has three arguments, and you are doing or redoing and want to prepare for undoing.\"\r\r\tself undoMessage: (Message selector: aSelector arguments: (Array with: arg1 with: arg2 with: arg3)) forRedo: false! !\r\r\r!ParagraphEditor methodsFor: 'current selection'!\rdeselect\r\t\"If the text selection is visible on the screen, reverse its highlight.\"\r\r\tselectionShowing ifTrue: [self reverseSelection]! !\r\r!ParagraphEditor methodsFor: 'current selection'!\rinitializeSelection\r\t\"Do the initial activity when starting up the receiver. For example, in the \r\tParagraphEditor highlight the current selection.\"\r\r\tself select! !\r\r!ParagraphEditor methodsFor: 'current selection' stamp: 'th 9/20/2002 11:41'!\rrecomputeInterval\r\t\"The same characters are selected but their coordinates may have changed.\"\r\r\tself computeIntervalFrom: self mark to: self pointIndex - 1! !\r\r!ParagraphEditor methodsFor: 'current selection'!\rrecomputeSelection\r\t\"Redetermine the selection according to the start and stop block indices; \r\tdo not highlight.\"\r\r\tself deselect; recomputeInterval! !\r\r!ParagraphEditor methodsFor: 'current selection' stamp: 'BG 12/12/2003 12:50'!\rreverseSelection\r\t\"Reverse the valence of the current selection highlighting.\"\r\tselectionShowing _ selectionShowing not.\r\tparagraph reverseFrom: self pointBlock to: self markBlock! !\r\r!ParagraphEditor methodsFor: 'current selection'!\rselect\r\t\"If the text selection is visible on the screen, highlight it.\"\r\r\tselectionShowing ifFalse: [self reverseSelection]! !\r\r!ParagraphEditor methodsFor: 'current selection' stamp: 'th 9/19/2002 18:47'!\rselectAndScroll\r\t\"Scroll until the selection is in the view and then highlight it.\"\r\t| lineHeight deltaY clippingRectangle endBlock |\r\tself select.\r\tendBlock _ self stopBlock.\r\tlineHeight _ paragraph textStyle lineGrid.\r\tclippingRectangle _ paragraph clippingRectangle.\r\tdeltaY _ endBlock top - clippingRectangle top.\r\tdeltaY >= 0 \r\t\tifTrue: [deltaY _ endBlock bottom - clippingRectangle bottom max: 0].\r\t\t\t\t\t\t\"check if stopIndex below bottom of clippingRectangle\"\r\tdeltaY ~= 0 \r\t\tifTrue: [self scrollBy: (deltaY abs + lineHeight - 1 truncateTo: lineHeight)\r\t\t\t\t\t\t\t\t\t* deltaY sign]! !\r\r!ParagraphEditor methodsFor: 'current selection' stamp: 'th 9/19/2002 18:48'!\rselectAndScrollToTop\r\t\"Scroll until the selection is in the view and then highlight it.\"\r\t| lineHeight deltaY clippingRectangle |\r\tself select.\r\tlineHeight _ paragraph textStyle lineGrid.\r\tclippingRectangle _ paragraph clippingRectangle.\r\tdeltaY _ self stopBlock top - clippingRectangle top.\r\tdeltaY ~= 0 \r\t\tifTrue: [self scrollBy: (deltaY abs + lineHeight - 1 truncateTo: lineHeight)\r\t\t\t\t\t\t\t\t\t* deltaY sign]! !\r\r\r!ParagraphEditor methodsFor: 'new selection' stamp: 'th 9/18/2002 14:37'!\radjustSelection: directionBlock\r\t\"Helper function for Cursor movement. Always moves point thus allowing selections to shrink. \"\r\t\"See also expandSelection:\"\r\t\"Accepts a one argument Block that computes the new postion given an old one.\"\r\t| newPosition |\r\tnewPosition _ directionBlock value: self pointIndex.\r\tself selectMark: self markIndex point: newPosition.\r\t^true.! !\r\r!ParagraphEditor methodsFor: 'new selection' stamp: 'th 10/28/2003 12:11'!\rafterSelectionInsertAndSelect: aString\r\r\tself insertAndSelect: aString at: self stopIndex ! !\r\r!ParagraphEditor methodsFor: 'new selection' stamp: 'th 9/17/2002 16:11'!\rcomputeIntervalFrom: start to: stop\r\t\"Select the designated characters, inclusive.  Make no visual changes.\"\r\r\tself setMark: start.\r\tself setPoint: stop + 1.! !\r\r!ParagraphEditor methodsFor: 'new selection' stamp: 'di 5/6/1998 15:21'!\rcorrectFrom: start to: stop with: aString\r\t\"Make a correction in the model that the user has authorised from somewhere else in the system (such as from the compilier).  The user's selection is not changed, only corrected.\"\r\t| wasShowing userSelection delta loc |\r\taString = '#insert period' ifTrue:\r\t\t[loc _ start.\r\t\t[(loc _ loc-1)>0 and: [(paragraph text string at: loc) isSeparator]]\r\t\t\twhileTrue: [loc _ loc-1].\r\t\t^ self correctFrom: loc+1 to: loc with: '.'].\r\t(wasShowing _ selectionShowing) ifTrue: [ self reverseSelection ].\r\tuserSelection _ self selectionInterval.\r\r\tself selectInvisiblyFrom: start to: stop.\r\tself replaceSelectionWith: aString asText.\r\r\tdelta _ aString size - (stop - start + 1).\r\tself selectInvisiblyFrom:\r\t\tuserSelection first + (userSelection first > start ifFalse: [ 0 ] ifTrue: [ delta ])\r\t\tto: userSelection last + (userSelection last > start ifFalse: [ 0 ] ifTrue: [ delta ]).\r\twasShowing ifTrue: [ self reverseSelection ].\r! !\r\r!ParagraphEditor methodsFor: 'new selection' stamp: 'th 9/19/2002 17:21'!\rencompassLine: anInterval\r\t\"Return an interval that encompasses the entire line\"\r\t| string left right |\r\tstring _ paragraph text string.\r\tleft _ (string lastIndexOf: Character cr startingAt: anInterval first - 1 ifAbsent:[0]) + 1.\r\tright _ (string indexOf: Character cr startingAt: anInterval last + 1 ifAbsent: [string size + 1]) - 1.\r\t^left to: right! !\r\r!ParagraphEditor methodsFor: 'new selection' stamp: 'di 12/17/1998 09:41'!\rinsertAndSelect: aString at: anInteger\r\r\tself replace: (anInteger to: anInteger - 1)\r\t\twith: (Text string: (' ' , aString)\r\t\t\t\t\tattributes: emphasisHere)\r\t\tand: [self selectAndScroll]! !\r\r!ParagraphEditor methodsFor: 'new selection' stamp: 'di 5/6/1998 15:25'!\rnextTokenFrom: start direction: dir\r\t\"simple token-finder for compiler automated corrections\"\r\t| loc str |\r\tloc _ start + dir.\r\tstr _ paragraph text string.\r\t[(loc between: 1 and: str size) and: [(str at: loc) isSeparator]]\r\t\twhileTrue: [loc _ loc + dir].\r\t^ loc! !\r\r!ParagraphEditor methodsFor: 'new selection' stamp: 'di 5/20/1998 08:31'!\rnotify: aString at: anInteger in: aStream \r\t\"The compilation of text failed. The syntax error is noted as the argument, \r\taString. Insert it in the text at starting character position anInteger.\"\r\r\tself insertAndSelect: aString at: (anInteger max: 1)! !\r\r!ParagraphEditor methodsFor: 'new selection'!\rselectAt: characterIndex \r\t\"Deselect, then place the caret before the character at characterIndex.\r\t Be sure it is in view.\"\r\r\tself selectFrom: characterIndex to: characterIndex - 1! !\r\r!ParagraphEditor methodsFor: 'new selection' stamp: 'th 9/18/2002 16:50'!\rselectFrom: start to: stop\r\t\"Deselect, then select the specified characters inclusive.\r\t Be sure the selection is in view.\"\r\r\t(start = self startIndex and: [stop + 1 = self stopIndex]) ifFalse:\r\t\t[self deselect.\r\t\tself selectInvisiblyFrom: start to: stop].\r\tself selectAndScroll! !\r\r!ParagraphEditor methodsFor: 'new selection'!\rselectInterval: anInterval\r\t\"Deselect, then select the specified characters inclusive.\r\t Be sure the selection is in view.\"\r\r\tself selectFrom: anInterval first to: anInterval last! !\r\r!ParagraphEditor methodsFor: 'new selection' stamp: 'di 5/9/1998 20:59'!\rselectInvisiblyFrom: start to: stop\r\t\"Select the designated characters, inclusive.  Make no visual changes.\"\r\r\t^ self computeIntervalFrom: start to: stop! !\r\r!ParagraphEditor methodsFor: 'new selection' stamp: 'th 9/18/2002 14:17'!\rselectInvisiblyMark: mark point: point\r\t\"Select the designated characters, inclusive.  Make no visual changes.\"\r\r\t^ self computeIntervalFrom: mark to: point! !\r\r!ParagraphEditor methodsFor: 'new selection' stamp: 'th 9/19/2002 17:17'!\rselectLine\r\t\"Make the receiver's selection, if it currently consists of an insertion point only, encompass the current line.\"\r\tself hasSelection ifTrue:[^self].\r\tself selectInterval: (self encompassLine: self selectionInterval)! !\r\r!ParagraphEditor methodsFor: 'new selection' stamp: 'th 9/18/2002 14:18'!\rselectMark: mark point: point\r\t\"Deselect, then select the specified characters inclusive.\r\t Be sure the selection is in view.\"\r\r\t(mark =  self markIndex and: [point + 1 = self pointIndex]) ifFalse:\r\t\t[self deselect.\r\t\tself selectInvisiblyMark: mark point: point].\r\tself selectAndScroll! !\r\r!ParagraphEditor methodsFor: 'new selection' stamp: 'th 9/19/2002 18:49'!\rselectPrecedingIdentifier\r\t\"Invisibly select the identifier that ends at the end of the selection, if any.\"\r\r\t| string sep stop tok |\r\ttok _ false.\r\tstring _ paragraph text string.\r\tstop _ self stopIndex - 1.\r\t[stop > 0 and: [(string at: stop) isSeparator]] whileTrue: [stop _ stop - 1].\r\tsep _ stop.\r\t[sep > 0 and: [(string at: sep) tokenish]] whileTrue: [tok _ true. sep _ sep - 1].\r\ttok ifTrue: [self selectInvisiblyFrom: sep + 1 to: stop]! !\r\r!ParagraphEditor methodsFor: 'new selection' stamp: 'th 9/18/2002 16:51'!\rselectWord\r\t\"Select delimited text or word--the result of double-clicking.\"\r\r\t| openDelimiter closeDelimiter direction match level leftDelimiters rightDelimiters\r\tstring here hereChar start stop |\r\tstring _ paragraph text string.\r\there _ self pointIndex.\r\t(here between: 2 and: string size)\r\t\tifFalse: [\"if at beginning or end, select entire string\"\r\t\t\t^self selectFrom: 1 to: string size].\r\tleftDelimiters _ '([{<''\"\r'.\r\trightDelimiters _ ')]}>''\"\r'.\r\topenDelimiter _ string at: here - 1.\r\tmatch _ leftDelimiters indexOf: openDelimiter.\r\tmatch > 0\r\t\tifTrue: \r\t\t\t[\"delimiter is on left -- match to the right\"\r\t\t\tstart _ here.\r\t\t\tdirection _ 1.\r\t\t\there _ here - 1.\r\t\t\tcloseDelimiter _ rightDelimiters at: match]\r\t\tifFalse: \r\t\t\t[openDelimiter _ string at: here.\r\t\t\tmatch _ rightDelimiters indexOf: openDelimiter.\r\t\t\tmatch > 0\r\t\t\t\tifTrue: \r\t\t\t\t\t[\"delimiter is on right -- match to the left\"\r\t\t\t\t\tstop _ here - 1.\r\t\t\t\t\tdirection _ -1.\r\t\t\t\t\tcloseDelimiter _ leftDelimiters at: match]\r\t\t\t\tifFalse: [\"no delimiters -- select a token\"\r\t\t\t\t\tdirection _ -1]].\r\tlevel _ 1.\r\t[level > 0 and: [direction > 0\r\t\t\tifTrue: [here < string size]\r\t\t\tifFalse: [here > 1]]]\r\t\twhileTrue: \r\t\t\t[hereChar _ string at: (here _ here + direction).\r\t\t\tmatch = 0\r\t\t\t\tifTrue: [\"token scan goes left, then right\"\r\t\t\t\t\thereChar tokenish\r\t\t\t\t\t\tifTrue: [here = 1\r\t\t\t\t\t\t\t\tifTrue: \r\t\t\t\t\t\t\t\t\t[start _ 1.\r\t\t\t\t\t\t\t\t\t\"go right if hit string start\"\r\t\t\t\t\t\t\t\t\tdirection _ 1]]\r\t\t\t\t\t\tifFalse: [direction < 0\r\t\t\t\t\t\t\t\tifTrue: \r\t\t\t\t\t\t\t\t\t[start _ here + 1.\r\t\t\t\t\t\t\t\t\t\"go right if hit non-token\"\r\t\t\t\t\t\t\t\t\tdirection _ 1]\r\t\t\t\t\t\t\t\tifFalse: [level _ 0]]]\r\t\t\t\tifFalse: [\"bracket match just counts nesting level\"\r\t\t\t\t\thereChar = closeDelimiter\r\t\t\t\t\t\tifTrue: [level _ level - 1\"leaving nest\"]\r\t\t\t\t\t\tifFalse: [hereChar = openDelimiter \r\t\t\t\t\t\t\t\t\tifTrue: [level _ level + 1\"entering deeper nest\"]]]].\r\r\tlevel > 0 ifTrue: [\"in case ran off string end\"\there _ here + direction].\r\tdirection > 0\r\t\tifTrue: [self selectFrom: start to: here - 1]\r\t\tifFalse: [self selectFrom: here + 1 to: stop]! !\r\r\r!ParagraphEditor methodsFor: 'private' stamp: 'th 9/19/2002 18:48'!\ragainOnce: indices\r\t\"Find the next occurrence of FindText.  If none, answer false.\r\tAppend the start index of the occurrence to the stream indices, and, if\r\tChangeText is not the same object as FindText, replace the occurrence by it.\r\tNote that the search is case-sensitive for replacements, otherwise not.\"\r\r\t| where |\r\twhere _ paragraph text findString: FindText startingAt: self stopIndex\r\t\t\t\tcaseSensitive: ((ChangeText ~~ FindText) or: [Preferences caseSensitiveFinds]).\r\twhere = 0 ifTrue: [^ false].\r\tself deselect; selectInvisiblyFrom: where to: where + FindText size - 1.\r\tChangeText ~~ FindText ifTrue: [self zapSelectionWith: ChangeText].\r\tindices nextPut: where.\r\tself selectAndScroll.\r\t^ true! !\r\r!ParagraphEditor methodsFor: 'private'!\ragainOrSame: useOldKeys\r\t\"Subroutine of search: and again.  If useOldKeys, use same FindText and ChangeText as before.\r\t 1/26/96 sw: real worked moved to againOrSame:many:\"\r\r\t^ self againOrSame: useOldKeys many: sensor leftShiftDown! !\r\r!ParagraphEditor methodsFor: 'private' stamp: 'th 9/18/2002 16:53'!\ragainOrSame: useOldKeys many: many\r\t\"Subroutine of search: and again.  If useOldKeys, use same FindText and ChangeText as before.  If many is true, do it repeatedly.  Created 1/26/96 sw by adding the many argument to #againOrSame.\"\r\r\t|  home indices wasTypedKey |\r\r\thome _ self selectionInterval.  \"what was selected when 'again' was invoked\"\r\r\t\"If new keys are to be picked...\"\r\tuseOldKeys ifFalse: \"Choose as FindText...\"\r\t\t[FindText _ UndoSelection.  \"... the last thing replaced.\"\r\t\t\"If the last command was in another paragraph, ChangeText is set...\"\r\t\tparagraph == UndoParagraph ifTrue: \"... else set it now as follows.\"\r\t\t\t[UndoInterval ~= home ifTrue: [self selectInterval: UndoInterval]. \"blink\"\r\t\t\tChangeText _ ((UndoMessage sends: #undoCutCopy:) and: [self hasSelection])\r\t\t\t\tifTrue: [FindText] \"== objects signal no model-locking by 'undo copy'\"\r\t\t\t\tifFalse: [self selection]]]. \"otherwise, change text is last-replaced text\"\r\r\t(wasTypedKey _ FindText size = 0)\r\t\tifTrue: \"just inserted at a caret\"\r\t\t\t[home _ self selectionInterval.\r\t\t\tself replaceSelectionWith: self nullText.  \"delete search key...\"\r\t\t\tFindText _ ChangeText] \"... and search for it, without replacing\"\r\t\tifFalse: \"Show where the search will start\"\r\t\t\t[home last = self selectionInterval last ifFalse:\r\t\t\t\t[self selectInterval: home]].\r\r\t\"Find and Change, recording start indices in the array\"\r\tindices _ WriteStream on: (Array new: 20). \"an array to store change locs\"\r\t[(self againOnce: indices) & many] whileTrue. \"<-- this does the work\"\r\tindices isEmpty ifTrue:  \"none found\"\r\t\t[self flash.\r\t\twasTypedKey ifFalse: [^self]].\r\r\t(many | wasTypedKey) ifFalse: \"after undo, select this replacement\"\r\t\t[home _ self startIndex to:\r\t\t\tself startIndex + UndoSelection size - 1].\r\r\tself undoer: #undoAgain:andReselect:typedKey: with: indices contents with: home with: wasTypedKey! !\r\r!ParagraphEditor methodsFor: 'private' stamp: 'th 9/19/2002 18:16'!\rcompleteSymbol: hintText lastOffering: selectorOrNil\r\t\"Invoked by Ctrl-q when there is only a caret.\r\t\tDo selector-completion, i.e., try to replace the preceding identifier by a\r\t\tselector that begins with those characters & has as many keywords as possible.\r\t \tLeave two spaces after each colon (only one after the last) as space for\r\t\targuments.  Put the caret after the space after the first keyword.  If the\r\t\tuser types Ctrl-q again immediately, choose a different selector.\r\t Undoer: #undoQuery:lastOffering:; Redoer: itself.\r\tIf redoing, just redisplay the last offering, selector[OrNil].\"\r\r\t| firstTime input prior caret newStart sym kwds outStream |\r\tfirstTime _ self isRedoing\r\t\tifTrue: [prior _ sym _ selectorOrNil. true]\r\t\tifFalse: [hintText isNil].\r\tfirstTime\r\t\tifTrue: \"Initial Ctrl-q (or redo)\"\t\t\t\t\t\r\t\t\t[caret _ self startIndex.\r\t\t\tself selectPrecedingIdentifier.\r\t\t\tinput _ self selection]\r\t\tifFalse: \"Repeated Ctrl-q\"\r\t\t\t[caret _ UndoInterval first + hintText size.\r\t\t\tself selectInvisiblyFrom: UndoInterval first to: UndoInterval last.\r\t\t\tinput _ hintText.\r\t\t\tprior _ selectorOrNil].\r\t(input size ~= 0 and: [sym ~~ nil or:\r\t\t\t[(sym _ Symbol thatStarts: input string skipping: prior) ~~ nil]])\r\t\tifTrue: \"found something to offer\"\r\t\t\t[newStart _ self startIndex.\r\t\t\toutStream _ WriteStream on: (String new: 2 * sym size).\r\t\t\t1 to: (kwds _ sym keywords) size do:\r\t\t\t\t[:i |\r\t\t\t\toutStream nextPutAll: (kwds at: i).\r\t\t\t\ti = 1 ifTrue: [caret _ newStart + outStream contents size + 1].\r\t\t\t\toutStream nextPutAll:\r\t\t\t\t\t(i < kwds size ifTrue: ['  '] ifFalse: [' '])].\r\t\t\tUndoSelection _ input.\r\t\t\tself deselect; zapSelectionWith: outStream contents asText.\r\t\t\tself undoer: #undoQuery:lastOffering: with: input with: sym]\r\t\tifFalse: \"no more matches\"\r\t\t\t[firstTime ifFalse: \"restore original text & set up for a redo\"\r\t\t\t\t[UndoSelection _ self selection.\r\t\t\t\tself deselect; zapSelectionWith: input.\r\t\t\t\tself undoer: #completeSymbol:lastOffering: with: input with: prior.\r\t\t\t\tUndone _ true].\r\t\t\tview flash].\r\tself selectAt: caret! !\r\r!ParagraphEditor methodsFor: 'private' stamp: 'th 9/18/2002 16:49'!\rexchangeWith: prior\r\t\"If the prior selection is non-overlapping and legal, exchange the text of\r\t it with the current selection and leave the currently selected text selected\r\t in the location of the prior selection (or leave a caret after a non-caret if it was\r\t exchanged with a caret).  If both selections are carets, flash & do nothing.\r\t Don't affect the paste buffer.  Undoer: itself; Redoer: Undoer.\"\r\r\t| start stop before selection priorSelection delta altInterval |\r\tstart _ self startIndex.\r\tstop _ self stopIndex - 1.\r\t((prior first <= prior last) | (start <= stop) \"Something to exchange\" and:\r\t\t\t[self isDisjointFrom: prior])\r\t\tifTrue:\r\t\t\t[before _ prior last < start.\r\t\t\tselection _ self selection.\r\t\t\tpriorSelection _ paragraph text copyFrom: prior first to: prior last.\r\r\t\t\tdelta _ before ifTrue: [0] ifFalse: [priorSelection size - selection size].\r\t\t\tself zapSelectionWith: priorSelection.\r\t\t\tself selectFrom: prior first + delta to: prior last + delta.\r\r\t\t\tdelta _ before ifTrue: [stop - prior last] ifFalse: [start - prior first].\r\t\t\tself zapSelectionWith: selection.\r\t\t\taltInterval _ prior first + delta to: prior last + delta.\r\t\t\tself undoer: #exchangeWith: with: altInterval.\r\t\t\t\"If one was a caret, make it otherInterval & leave the caret after the other\"\r\t\t\tprior first > prior last ifTrue: [self selectAt: UndoInterval last + 1].\r\t\t\totherInterval _ start > stop\r\t\t\t\tifTrue: [self selectAt: altInterval last + 1. UndoInterval]\r\t\t\t\tifFalse: [altInterval]]\r\t\tifFalse:\r\t\t\t[view flash]! !\r\r!ParagraphEditor methodsFor: 'private' stamp: 'raok 11/15/2001 14:01'!\rexplainDelimitor: string\r\t\"Is string enclosed in delimitors?\"\r\r\t| str |\r\t(string at: 1) isLetter ifTrue: [^nil].  \"only special chars\"\r\t(string first = string last) ifTrue:\r\t\t\t[^ self explainChar: (String with: string first)]\r\t\tifFalse:\r\t\t\t[(string first = $( and: [string last = $)]) ifTrue:\r\t\t\t\t[^ self explainChar: (String with: string first)].\r\t\t\t(string first = $[ and: [string last = $]]) ifTrue:\r\t\t\t\t[^ self explainChar: (String with: string first)].\r\t\t\t(string first = ${ and: [string last = $}]) ifTrue:\r\t\t\t\t[^ self explainChar: (String with: string first)].\r\t\t\t(string first = $< and: [string last = $>]) ifTrue:\r\t\t\t\t[^ self explainChar: (String with: string first)].\r\t\t\t(string first = $# and: [string last = $)]) ifTrue:\r\t\t\t\t[^'\"An instance of class Array.  The Numbers, Characters, or Symbols between the parenthesis are the elements of the Array.\"'].\r\t\t\tstring first = $# ifTrue:\r\t\t\t\t[^'\"An instance of class Symbol.\"'].\r\t\t\t(string first = $$ and: [string size = 2]) ifTrue:\r\t\t\t\t[^'\"An instance of class Character.  This one is the character ', (String with: string last), '.\"'].\r\t\t\t(string first = $:) ifTrue:\r\t\t\t\t[str _ string allButFirst.\r\t\t\t\t(self explainTemp: str) ~~ nil ifTrue:\r\t\t\t\t\t[^'\"An argument to this block will be bound to the temporary variable ',\r\t\t\t\t\t\tstr, '.\"']]].\r\t^ nil! !\r\r!ParagraphEditor methodsFor: 'private' stamp: 'tk 7/14/2000 12:15'!\rgetPluggableYellowButtonMenu: shiftKeyState\r\t| customMenu |\r\t^ ((view ~~ nil) and: [(customMenu _ view getMenu: shiftKeyState) notNil])\r\t\tifTrue: [customMenu]\r\t\tifFalse:\r\t\t\t[shiftKeyState\r\t\t\t\tifTrue: [self class shiftedYellowButtonMenu]\r\t\t\t\tifFalse: [self class yellowButtonMenu]]! !\r\r!ParagraphEditor methodsFor: 'private'!\rindent: delta fromStream: inStream toStream: outStream\r\t\"Append the contents of inStream to outStream, adding or deleting delta or -delta\r\t tabs at the beginning, and after every CR except a final CR.  Do not add tabs\r\t to totally empty lines, and be sure nothing but tabs are removed from lines.\"\r\r\t| ch skip cr tab prev atEnd |\r\tcr _ Character cr.\r\ttab _ Character tab.\r\tdelta > 0\r\t\tifTrue: \"shift right\"\r\t\t\t[prev _ cr.\r\t\t\t [ch _ (atEnd _ inStream atEnd) ifTrue: [cr] ifFalse: [inStream next].\r\t\t\t  (prev == cr and: [ch ~~ cr]) ifTrue:\r\t\t\t\t[delta timesRepeat: [outStream nextPut: tab]].\r\t\t\t  atEnd]\r\t\t\t\twhileFalse:\r\t\t\t\t\t[outStream nextPut: ch.\r\t\t\t\t\tprev _ ch]]\r\t\tifFalse: \"shift left\"\r\t\t\t[skip _ delta. \"a negative number\"\r\t\t\t [inStream atEnd] whileFalse:\r\t\t\t\t[((ch _ inStream next) == tab and: [skip < 0]) ifFalse:\r\t\t\t\t\t[outStream nextPut: ch].\r\t\t\t\tskip _ ch == cr ifTrue: [delta] ifFalse: [skip + 1]]]! !\r\r!ParagraphEditor methodsFor: 'private' stamp: 'cmm 4/9/2004 14:00'!\risDisjointFrom: anInterval\r\t\"Answer true if anInterval is a caret not touching or within the current\r\t interval, or if anInterval is a non-caret that does not overlap the current\r\t selection.\"\r\r\t| fudge |\r\tfudge _ anInterval size = 0 ifTrue: [1] ifFalse: [0].\r\t^(anInterval last + fudge < self startIndex or:\r\t\t\t[anInterval first - fudge >= self stopIndex])\r! !\r\r!ParagraphEditor methodsFor: 'private' stamp: 'th 11/24/2002 17:13'!\rlines\r\t\"Other than my member paragraph i compute lines based on logical\r\tline breaks, not optical (which may change due to line wrapping of the editor)\"\r\t| lines string index lineIndex stringSize |\r\tstring _ paragraph text string.\r\t\"Empty strings have no lines at all. Think of something.\"\r\tstring isEmpty ifTrue:[^{#(1 0 0)}].\r\tstringSize _ string size.\r\tlines _ OrderedCollection new: (string size // 15).\r\tindex _ 0.\r\tlineIndex _ 0.\r\tstring linesDo:[:line |\r\t\tlines addLast: (Array\r\t\t\twith: (index _ index + 1)\r\t\t\twith: (lineIndex _ lineIndex + 1)\r\t\t\twith: (index _ index + line size min: stringSize))].\r\t\"Special workaround for last line empty.\"\r\tstring last == Character cr\r\t\"lines last last < stringSize\" ifTrue:[lines addLast:{stringSize +1. lineIndex+1. stringSize}].\r\t^lines! !\r\r!ParagraphEditor methodsFor: 'private' stamp: 'th 9/19/2002 19:57'!\rmoveCursor: directionBlock forward: forward specialBlock: specialBlock\r\t\"Private - Move cursor.\r\tdirectionBlock is a one argument Block that computes the new Position from a given one.\r\tspecialBlock is a one argumentBlock that computes the new position from a given one under the alternate semantics.\r\tNote that directionBlock always is evaluated first.\"\r\t| shift indices newPosition |\r\tshift _ sensor leftShiftDown.\r\tindices _ self setIndices: shift forward: forward.\r\tnewPosition _ directionBlock value: (indices at: #moving).\r\t(sensor commandKeyPressed or:[sensor controlKeyPressed])\r\t\tifTrue: [newPosition _ specialBlock value: newPosition].\r\tsensor keyboard.\r\tshift\r\t\tifTrue: [self selectMark: (indices at: #fixed) point: newPosition - 1]\r\t\tifFalse: [self selectAt: newPosition]! !\r\r!ParagraphEditor methodsFor: 'private' stamp: 'sma 12/15/1999 11:32'!\rnextWord: position\r\t| string index |\r\tstring _ paragraph text string.\r\tindex _ position.\r\t[(index between: 1 and: string size) and: [(string at: index) isAlphaNumeric]]\r\t\twhileTrue: [index _ index + 1].\r\t[(index between: 1 and: string size) and: [(string at: index) isAlphaNumeric not]]\r\t\twhileTrue: [index _ index + 1].\r\t^ index! !\r\r!ParagraphEditor methodsFor: 'private'!\rnullText\r\r\t^Text string: '' emphasis: emphasisHere! !\r\r!ParagraphEditor methodsFor: 'private' stamp: 'th 9/20/2002 11:09'!\rpageHeight\r\t| howManyLines visibleHeight totalHeight ratio |\r\thowManyLines _ paragraph numberOfLines.\r\tvisibleHeight _ self visibleHeight.\r\ttotalHeight _ self totalTextHeight.\r\tratio _ visibleHeight / totalHeight.\r\t^(ratio * howManyLines) rounded - 2! !\r\r!ParagraphEditor methodsFor: 'private' stamp: 'sma 12/15/1999 11:33'!\rpreviousWord: position\r\t| string index |\r\tstring _ paragraph text string.\r\tindex _ position.\r\t[(index between: 1 and: string size) and: [(string at: index) isAlphaNumeric not]]\r\t\twhileTrue: [index _ index - 1].\r\t[(index between: 1 and: string size) and: [(string at: index) isAlphaNumeric]]\r\t\twhileTrue: [index _ index - 1].\r\t^ index + 1! !\r\r!ParagraphEditor methodsFor: 'private' stamp: 'BG 4/29/2004 11:19'!\rsameColumn: start newLine: lineBlock forward: isForward\r\t\"Private - Compute the index in my text\r\twith the line number derived from lineBlock,\"\r\t\" a one argument block accepting the old line number.\r\tThe position inside the line will be preserved as good as possible\"\r\t\"The boolean isForward is used in the border case to determine if\r\twe should move to the beginning or the end of the line.\"\r\t| wordStyle column currentLine offsetAtTargetLine targetEOL lines numberOfLines currentLineNumber targetLineNumber |\r\twordStyle _ Preferences wordStyleCursorMovement.\r\twordStyle\r\t\tifTrue: [\r\t\t\tlines _ paragraph lines.\r\t\t\tnumberOfLines := paragraph numberOfLines.\r\t\t\tcurrentLineNumber  _ paragraph lineIndexOfCharacterIndex: start.\r\t\t\tcurrentLine _ lines at: currentLineNumber]\r\t\tifFalse: [\r\t\t\tlines _ self lines.\r\t\t\tnumberOfLines := lines size.\r\t\t\tcurrentLine _ lines\r\t\t\t\tdetect:[:lineInterval | lineInterval last >= start]\r\t\t\t\tifNone:[lines last].\r\t\t\tcurrentLineNumber _ currentLine second].\r\tcolumn _ start - currentLine first.\r\ttargetLineNumber _ ((lineBlock value: currentLineNumber) max: 1) min: numberOfLines.\r\toffsetAtTargetLine _ (lines at: targetLineNumber) first.\r\ttargetEOL _ (lines at: targetLineNumber) last + (targetLineNumber == numberOfLines ifTrue:[1]ifFalse:[0]).\r\ttargetLineNumber == currentLineNumber\r\t\"No movement or movement failed. Move to beginning or end of line.\"\r\t\tifTrue:[^isForward\r\t\t\tifTrue:[targetEOL]\r\t\t\tifFalse:[offsetAtTargetLine]].\r\t^offsetAtTargetLine + column min: targetEOL.! !\r\r!ParagraphEditor methodsFor: 'private' stamp: 'th 9/19/2002 19:02'!\rsetIndices: shiftPressed forward: forward\r\t\"Little helper method that sets the moving and fixed indices according to some flags.\"\r\t| indices |\r\tindices _ Dictionary new.\r\t(shiftPressed and:[Preferences selectionsMayShrink])\r\t\tifTrue: [\r\t\t\tindices at: #moving put: self pointIndex.\r\t\t\tindices at: #fixed put: self markIndex\r\t\t] ifFalse: [\r\t\t\tforward\r\t\t\t\tifTrue:[\r\t\t\t\t\tindices at: #moving put: self stopIndex.\r\t\t\t\t\tindices at: #fixed put: self startIndex.\r\t\t\t\t] ifFalse: [\r\t\t\t\t\tindices at: #moving put: self startIndex.\r\t\t\t\t\tindices at: #fixed put: self stopIndex.\r\t\t\t\t]\r\t\t].\r\t^indices! !\r\r\r!ParagraphEditor methodsFor: 'do-its' stamp: 'vb 8/13/2001 23:41'!\rcompileSelectionFor: anObject in: evalContext\r\r\t| methodNode method |\r\tmethodNode _ [Compiler new\r\t\tcompileNoPattern: self selectionAsStream\r\t\tin: anObject class\r\t\tcontext: evalContext\r\t\tnotifying: self\r\t\tifFail: [^nil]]\r\t\t\ton: OutOfScopeNotification\r\t\t\tdo: [:ex | ex resume: true].\r\tmethod _ methodNode generate: #(0 0 0 0).\r\t^method copyWithTempNames: methodNode tempNames! !\r\r!ParagraphEditor methodsFor: 'do-its' stamp: 'NS 1/28/2004 11:19'!\rdebug: aCompiledMethod receiver: anObject in: evalContext\r\r\t| selector guineaPig debugger context |\r\tselector _ evalContext isNil ifTrue: [#DoIt] ifFalse: [#DoItIn:].\r\tanObject class addSelectorSilently: selector withMethod: aCompiledMethod.\r\tguineaPig _ evalContext isNil\r\t\tifTrue: [[anObject DoIt] newProcess]\r\t\tifFalse: [[anObject DoItIn: evalContext] newProcess].\r\tcontext _ guineaPig suspendedContext.\r\tdebugger _ Debugger new\r\t\tprocess: guineaPig\r\t\tcontroller: ((Smalltalk isMorphic not and: [ScheduledControllers inActiveControllerProcess])\r\t\t\t\tifTrue: [ScheduledControllers activeController]\r\t\t\t\tifFalse: [nil])\r\t\tcontext: context\r\t\tisolationHead: nil.\r\tdebugger openFullNoSuspendLabel: 'Debug it'.\r\t[debugger interruptedContext method == aCompiledMethod]\r\t\twhileFalse: [debugger send].\r\tanObject class basicRemoveSelector: selector! !\r\r!ParagraphEditor methodsFor: 'do-its' stamp: 'vb 8/13/2001 23:38'!\rdebugIt\r\r\t| method receiver context |\r\t(model respondsTo: #doItReceiver) \r\t\tifTrue: \r\t\t\t[FakeClassPool adopt: model selectedClass.\r\t\t\treceiver _ model doItReceiver.\r\t\t\tcontext _ model doItContext]\r\t\tifFalse:\r\t\t\t[receiver _ context _ nil].\r\tself lineSelectAndEmptyCheck: [^self].\r\tmethod _ self compileSelectionFor: receiver in: context.\r\tmethod notNil ifTrue:\r\t\t[self debug: method receiver: receiver in: context].\r\tFakeClassPool adopt: nil! !\r\r!ParagraphEditor methodsFor: 'do-its' stamp: 'di 5/10/1998 21:38'!\rdoIt\r\t\"Set the context to include pool vars of the model.  Then evaluate.\"\r\t^ self evaluateSelection.\r! !\r\r!ParagraphEditor methodsFor: 'do-its' stamp: 'gk 3/3/2004 17:15'!\revaluateSelection\r\t\"Treat the current selection as an expression; evaluate it and return the result\"\r\t| result rcvr ctxt |\r\tself lineSelectAndEmptyCheck: [^ ''].\r\r\t(model respondsTo: #doItReceiver) \r\t\tifTrue: [FakeClassPool adopt: model selectedClass.  \"Include model pool vars if any\"\r\t\t\t\trcvr _ model doItReceiver.\r\t\t\t\tctxt _ model doItContext]\r\t\tifFalse: [rcvr _ ctxt _ nil].\r\tresult _ [\r\t\trcvr class evaluatorClass new \r\t\t\tevaluate: self selectionAsStream\r\t\t\tin: ctxt\r\t\t\tto: rcvr\r\t\t\tnotifying: self\r\t\t\tifFail: [FakeClassPool adopt: nil. ^ #failedDoit]\r\t\t\tlogged: true.\r\t] \r\t\ton: OutOfScopeNotification \r\t\tdo: [ :ex | ex resume: true].\r\tFakeClassPool adopt: nil.\r\t^ result! !\r\r!ParagraphEditor methodsFor: 'do-its' stamp: 'di 9/7/1999 11:25'!\rinspectIt\r\t\"1/13/96 sw: minor fixup\"\r\t| result |\r\tresult _ self evaluateSelection.\r\t((result isKindOf: FakeClassPool) or: [result == #failedDoit])\r\t\t\tifTrue: [view flash]\r\t\t\tifFalse: [result inspect].\r! !\r\r!ParagraphEditor methodsFor: 'do-its' stamp: 'sd 4/16/2003 11:41'!\robjectsReferencingIt\r\t\"Open a list inspector on all objects that reference the object that results when the current selection is evaluated.  \"\r\t| result |\r\tself terminateAndInitializeAround: [\r\tresult _ self evaluateSelection.\r\t((result isKindOf: FakeClassPool) or: [result == #failedDoit])\r\t\tifTrue: [view flash]\r\t\tifFalse: [self systemNavigation\r\t\t\t\t\tbrowseAllObjectReferencesTo: result\r\t\t\t\t\texcept: #()\r\t\t\t\t\tifNone: [:obj | view topView flash]].\r\t]! !\r\r!ParagraphEditor methodsFor: 'do-its' stamp: 'di 5/10/1998 21:52'!\rprintIt\r\t\"Treat the current text selection as an expression; evaluate it. Insert the \r\tdescription of the result of evaluation after the selection and then make \r\tthis description the new text selection.\"\r\t| result |\r\tresult _ self evaluateSelection.\r\t((result isKindOf: FakeClassPool) or: [result == #failedDoit])\r\t\t\tifTrue: [view flash]\r\t\t\tifFalse: [self afterSelectionInsertAndSelect: result printString]! !\r\r\r!ParagraphEditor methodsFor: 'as yet unclassified' stamp: 'BG 6/1/2003 09:43'!\rofferMenuFromEsc: aStream\r   sensor keyboard. \" consume the character \"\r   self yellowButtonActivity.\r  ^true \"tell the caller that the character was processed \"! !\r\r!ParagraphEditor methodsFor: 'as yet unclassified' stamp: 'sbw 10/13/1999 22:40'!\rtotalTextHeight\r\r\t^paragraph boundingBox height! !\r\r!ParagraphEditor methodsFor: 'as yet unclassified' stamp: 'sbw 10/13/1999 22:33'!\rvisibleHeight\r\r\t^paragraph clippingRectangle height! !\r\r\r!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/19/2002 18:22'!\rhasCaret\r\t^self markBlock = self pointBlock! !\r\r!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/19/2002 18:22'!\rhasSelection\r\t^self hasCaret not! !\r\r!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/17/2002 16:13'!\rmark\r\t^ self markBlock stringIndex! !\r\r!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 10/21/2003 15:49'!\rmarkBlock\r\t^ stopBlock! !\r\r!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 10/21/2003 15:49'!\rmarkBlock: aCharacterBlock\r\tstopBlock _ aCharacterBlock.\r! !\r\r!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/18/2002 12:31'!\rmarkIndex\r\t^ self markBlock stringIndex! !\r\r!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 10/21/2003 15:49'!\rpointBlock\r\t^ startBlock! !\r\r!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 10/21/2003 15:49'!\rpointBlock: aCharacterBlock\r\tstartBlock _ aCharacterBlock.\r! !\r\r!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/18/2002 12:31'!\rpointIndex\r\t^ self pointBlock stringIndex! !\r\r!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/18/2002 17:28'!\rselection\r\t\"Answer the text in the paragraph that is currently selected.\"\r\r\t^paragraph text copyFrom: self startIndex to: self stopIndex - 1 ! !\r\r!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/19/2002 18:10'!\rselectionAsStream\r\t\"Answer a ReadStream on the text in the paragraph that is currently \r\tselected.\"\r\r\t^ReadWriteStream\r\t\ton: paragraph string\r\t\tfrom: self startIndex\r\t\tto: self stopIndex - 1! !\r\r!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/18/2002 16:18'!\rselectionInterval\r\t\"Answer the interval that is currently selected.\"\r\r\t^self startIndex to: self stopIndex - 1 ! !\r\r!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/17/2002 13:02'!\rsetMark: anIndex\r\tself markBlock: (paragraph characterBlockForIndex: anIndex)\r! !\r\r!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/17/2002 13:02'!\rsetPoint: anIndex\r\tself pointBlock: (paragraph characterBlockForIndex: anIndex)\r! !\r\r!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/17/2002 16:10'!\rstartBlock\r\t^ self pointBlock min: self markBlock! !\r\r!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/17/2002 13:10'!\rstartBlock: aCharacterBlock\r\tself markBlock: aCharacterBlock! !\r\r!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/18/2002 14:27'!\rstartIndex\r\t^ self startBlock stringIndex! !\r\r!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/17/2002 16:14'!\rstopBlock\r\t^ self pointBlock max: self markBlock! !\r\r!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/17/2002 13:10'!\rstopBlock: aCharacterBlock\r\tself pointBlock: aCharacterBlock! !\r\r!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/18/2002 14:27'!\rstopIndex\r\t^ self stopBlock stringIndex! !\r\r!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/17/2002 16:23'!\runselect\r\tself markBlock: self pointBlock copy.! !\r\r!ParagraphEditor methodsFor: 'accessing-selection' stamp: 'th 9/19/2002 18:12'!\rzapSelectionWith: aText\r\t\"Deselect, and replace the selection text by aText.\r\t Remember the resulting selectionInterval in UndoInterval and otherInterval.\r\t Do not set up for undo.\"\r\r\t| start stop |\r\tself deselect.\r\tstart _ self startIndex.\r\tstop _ self stopIndex.\r\t(aText isEmpty and: [stop > start]) ifTrue:\r\t\t[\"If deleting, then set emphasisHere from 1st character of the deletion\"\r\t\temphasisHere _ (paragraph text attributesAt: start forStyle: paragraph textStyle)\r\t\t\t\t\tselect: [:att | att mayBeExtended]].\r\t(start = stop and: [aText size = 0]) ifFalse:\r\t\t[paragraph\r\t\t\treplaceFrom: start\r\t\t\tto: stop - 1\r\t\t\twith: aText\r\t\t\tdisplaying: true.\r\t\tself computeIntervalFrom: start to: start + aText size - 1.\r\t\tUndoInterval _ otherInterval _ self selectionInterval]! !\r\r\r!ParagraphEditor methodsFor: 'parenblinking' stamp: 'AB 1/7/2002 03:51'!\rblinkParenAt: parenLocation \r\tself text\r\t\taddAttribute: TextEmphasis bold\r\t\tfrom: parenLocation\r\t\tto: parenLocation.\r\tlastParenLocation _ parenLocation.! !\r\r!ParagraphEditor methodsFor: 'parenblinking' stamp: 'AB 1/7/2002 04:03'!\rblinkPrevParen\r\t| openDelimiter closeDelimiter level string here hereChar |\r\tstring _ paragraph text string.\r\there _ startBlock stringIndex.\r\topenDelimiter _ sensor keyboardPeek.\r\tcloseDelimiter _ '([{' at: (')]}' indexOf: openDelimiter).\r\tlevel _ 1.\r\t[level > 0 and: [here > 2]]\r\t\twhileTrue:\r\t\t\t[hereChar _ string at: (here _ here - 1).\r\t\t\thereChar = closeDelimiter\r\t\t\t\tifTrue:\r\t\t\t\t\t[level _ level - 1.\r\t\t\t\t\tlevel = 0\r\t\t\t\t\t\tifTrue: [^ self blinkParenAt: here]]\r\t\t\t\tifFalse:\r\t\t\t\t\t[hereChar = openDelimiter\r\t\t\t\t\t\tifTrue: [level _ level + 1]]].! !\r\r!ParagraphEditor methodsFor: 'parenblinking' stamp: 'AB 1/10/2002 00:30'!\rclearParens\r\tlastParenLocation ifNotNil:\r\t\t[self text string size >= lastParenLocation ifTrue: [\r\t\t\tself text\r\t\t\t\tremoveAttribute: TextEmphasis bold\r\t\t\t\tfrom: lastParenLocation\r\t\t\t\tto: lastParenLocation]]\r! !\r\r!ParagraphEditor methodsFor: 'parenblinking' stamp: 'AB 1/8/2002 03:30'!\rdispatchOnCharacter: char with: typeAheadStream\r\t\"Carry out the action associated with this character, if any.\r\tType-ahead is passed so some routines can flush or use it.\"\r\r\t| honorCommandKeys |\r\tself clearParens.\r  \r\tchar asciiValue = 13 ifTrue: [\r\t\t^ sensor controlKeyPressed\r\t\t\tifTrue: [self normalCharacter: typeAheadStream]\r\t\t\tifFalse: [self crWithIndent: typeAheadStream]].\r\r\t((honorCommandKeys _ Preferences cmdKeysInText) and: [char = Character enter])\r\t\tifTrue: [^ self dispatchOnEnterWith: typeAheadStream].\r\r\t\"Special keys overwrite crtl+key combinations - at least on Windows. To resolve this\r\tconflict, assume that keys other than cursor keys aren't used together with Crtl.\" \r\t((self class specialShiftCmdKeys includes: char asciiValue) and: [char asciiValue < 27])\r\t\tifTrue: [^ sensor controlKeyPressed\r\t\t\tifTrue: [self perform: (ShiftCmdActions at: char asciiValue + 1) with: typeAheadStream]\r\t\t\tifFalse: [self perform: (CmdActions at: char asciiValue + 1) with: typeAheadStream]].\r\r\t\"backspace, and escape keys (ascii 8 and 27) are command keys\"\r\t((honorCommandKeys and: [sensor commandKeyPressed]) or: [self class specialShiftCmdKeys includes: char asciiValue]) ifTrue:\r\t\t[^ sensor leftShiftDown\r\t\t\tifTrue:\r\t\t\t\t[self perform: (ShiftCmdActions at: char asciiValue + 1) with: typeAheadStream]\r\t\t\tifFalse:\r\t\t\t\t[self perform: (CmdActions at: char asciiValue + 1) with: typeAheadStream]].\r\r\t\"the control key can be used to invoke shift-cmd shortcuts\"\r\t(honorCommandKeys and: [sensor controlKeyPressed])\r\t\tifTrue:\r\t\t\t[^ self perform: (ShiftCmdActions at: char asciiValue + 1) with: typeAheadStream].\r\r\t(')]}' includes: char)\r\t\tifTrue: [self blinkPrevParen].\r\r\t^ self perform: #normalCharacter: with: typeAheadStream! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rParagraphEditor class\r\tinstanceVariableNames: ''!\r\r!ParagraphEditor class methodsFor: 'class initialization' stamp: 'sw 5/27/2000 00:03'!\rabandonChangeText\r\t\"Call this to get out of the maddening situation in which the system keeps aggressively trying to do a replacement that you no longer wish to make, every time you make choose a new method in a list.\"\r\tChangeText _ FindText\r\r\t\"ParagraphEditor abandonChangeText\"\r! !\r\r!ParagraphEditor class methodsFor: 'class initialization' stamp: 'ar 1/15/2001 18:47'!\rinitialize \r\t\"Initialize the keyboard shortcut maps and the shared buffers\r\tfor copying text across views and managing again and undo.\r\tMarked this method changed to trigger reinit\" \r \r\t\"ParagraphEditor initialize\"\r\r\tUndoSelection _ FindText _ ChangeText _ Text new.\r\tUndoMessage _ Message selector: #halt.\r\r\tself initializeCmdKeyShortcuts.\r\tself initializeShiftCmdKeyShortcuts.\r\tself initializeTextEditorMenus\r! !\r\r!ParagraphEditor class methodsFor: 'class initialization' stamp: 'BG 10/28/2003 17:46'!\rinitializeTextEditorMenus\r\t\"Initialize the yellow button pop-up menu and corresponding messages.\"\r\t\"ParagraphEditor initializeTextEditorMenus\"\r\r\tTextEditorYellowButtonMenu _ SelectionMenu\r\t\tlabels:\r'find...(f)\rfind again (g)\rset search string (h)\rdo again (j)\rundo (z)\rcopy (c)\rcut (x)\rpaste (v)\rpaste...\rdo it (d)\rprint it (p)\rinspect it (i)\rdebug it\raccept (s)\rcancel (l)\rshow bytecodes\rmore...'\r\t\tlines: #(3 5 9 13 15 16)\r\t\tselections: #(find findAgain setSearchString again undo copySelection cut paste pasteRecent doIt printIt inspectIt debugIt accept cancel showBytecodes shiftedTextPaneMenuRequest).! !\r\r!ParagraphEditor class methodsFor: 'class initialization' stamp: 'BG 11/1/2003 14:29'!\rshiftedYellowButtonMenu\r\t\"Answer the menu to be presented when the yellow button is pressed while the shift key is down\"\r\r\t^ SelectionMenu fromArray: #(\r\t\t('set font... (k)'\t\t\t\t\tofferFontMenu)\r\t\t('set style... (K)'\t\t\t\t\tchangeStyle)\r\t\t('set alignment...'\t\t\t\tchooseAlignment)\r\t\t-\r\t\t('explain'\t\t\t\t\t\texplain)\r\t\t('pretty print'\t\t\t\t\tprettyPrint)\r\t\t('pretty print with color'\t\tprettyPrintWithColor)\r\t\t('file it in (G)'\t\t\t\t\tfileItIn)\r\t\t('recognizer (r)'\t\t\t\t\trecognizeCharacters)\r\t\t('spawn (o)'\t\t\t\t\t\tspawn)\r\"\t\t-\r\t\t('definition of word'\t\t\t\twordDefinition)\r\t\t('verify spelling of word'\t\tverifyWordSpelling)\r\t\t('spell check it'\t\t\t\t\tspellCheckIt)\t\r\t\t('translate it'\t\t\t\t\ttranslateIt)\r\t\t('choose language'\t\t\t\tlanguagePrefs) \"\r\t\t-\r\t\t('browse it (b)'\t\t\t\t\tbrowseIt)\r\t\t('senders of it (n)'\t\t\t\tsendersOfIt)\r\t\t('implementors of it (m)'\t\timplementorsOfIt)\r\t\t('references to it (N)'\t\t\treferencesToIt)\r\t\t-\r\t\t('selectors containing it (W)'\t\tmethodNamesContainingIt)\r\t\t('method strings with it (E)'\t\tmethodStringsContainingit)\r\t\t('method source with it'\t\t\tmethodSourceContainingIt)\r\t\t('class names containing it'\t\tclassNamesContainingIt)\r\t\t('class comments with it'\t\tclassCommentsContainingIt)\r\t\t('change sets with it'\t\t\tbrowseChangeSetsWithSelector)\r\t\t-\r\t\t('save contents to file...'\t\t\tsaveContentsInFile)\r\t\t-\r\t\t('special menu...'\t\t\t\tpresentSpecialMenu)\r\t\t('more...'\t\t\t\t\t\tyellowButtonActivity))! !\r\r!ParagraphEditor class methodsFor: 'class initialization' stamp: 'tk 3/31/98 16:25'!\ryellowButtonMenu\r\r\t^ TextEditorYellowButtonMenu! !\r\r!ParagraphEditor class methodsFor: 'class initialization' stamp: 'di 4/17/1999 00:33'!\ryellowButtonMessages\r\r\t^ TextEditorYellowButtonMenu selections! !\r\r\r!ParagraphEditor class methodsFor: 'instance creation'!\rnew\r\t\"Answer a new instance of me with a null Paragraph to be edited.\"\r\r\t| aParagraphEditor |\r\taParagraphEditor _ super new.\r\taParagraphEditor initialize.\r\taParagraphEditor changeParagraph: '' asParagraph.\r\t^aParagraphEditor! !\r\r!ParagraphEditor class methodsFor: 'instance creation'!\rnewParagraph: aParagraph \r\t\"Answer an instance of me with aParagraph as the text to be edited.\"\r\r\t| aParagraphEditor |\r\taParagraphEditor _ super new.\r\taParagraphEditor initialize.\r\taParagraphEditor changeParagraph: aParagraph.\r\t^aParagraphEditor! !\r\r\r!ParagraphEditor class methodsFor: 'keyboard shortcut tables' stamp: 'sw 12/7/2001 22:54'!\rinitializeCmdKeyShortcuts\r\t\"Initialize the (unshifted) command-key (or alt-key) shortcut table.\"\r\r\t\"NOTE: if you don't know what your keyboard generates, use Sensor kbdTest\"\r\r\t\"ParagraphEditor initialize\"\r\r\t| cmdMap cmds |\r\tcmdMap := Array new: 256 withAll: #noop:.\t\"use temp in case of a crash\"\r\tcmdMap at: 1 + 1 put: #cursorHome:.\t\"home key\"\r\tcmdMap at: 4 + 1 put: #cursorEnd:.\t\"end key\"\r\tcmdMap at: 8 + 1 put: #backspace:.\t\"ctrl-H or delete key\"\r\tcmdMap at: 11 + 1 put: #cursorPageUp:.\t\"page up key\"\r\tcmdMap at: 12 + 1 put: #cursorPageDown:.\t\"page down key\"\r\tcmdMap at: 13 + 1 put: #crWithIndent:.\t\"cmd-Return\"\r\tcmdMap at: 27 + 1 put: #offerMenuFromEsc:.\t\"escape key\"\r\tcmdMap at: 28 + 1 put: #cursorLeft:.\t\"left arrow key\"\r\tcmdMap at: 29 + 1 put: #cursorRight:.\t\"right arrow key\"\r\tcmdMap at: 30 + 1 put: #cursorUp:.\t\"up arrow key\"\r\tcmdMap at: 31 + 1 put: #cursorDown:.\t\"down arrow key\"\r\tcmdMap at: 32 + 1 put: #selectWord:.\t\"space bar key\"\r\tcmdMap at: 127 + 1 put: #forwardDelete:.\t\"del key\"\r\t'0123456789-=' \r\t\tdo: [:char | cmdMap at: char asciiValue + 1 put: #changeEmphasis:].\r\t'([{''\"<' do: [:char | cmdMap at: char asciiValue + 1 put: #enclose:].\r\tcmdMap at: $, asciiValue + 1 put: #shiftEnclose:.\r\tcmds := #($a #selectAll: $b #browseIt: $c #copySelection: $d #doIt: $e #exchange: $f #find: $g #findAgain: $h #setSearchString: $i #inspectIt: $j #doAgainOnce: $k #offerFontMenu: $l #cancel: $m #implementorsOfIt: $n #sendersOfIt: $o #spawnIt: $p #printIt: $q #querySymbol: $r #recognizer: $s #save: $t #tempCommand: $u #align: $v #paste: $w #backWord: $x #cut: $y #swapChars: $z #undo:).\r\t1 to: cmds size\r\t\tby: 2\r\t\tdo: [:i | cmdMap at: (cmds at: i) asciiValue + 1 put: (cmds at: i + 1)].\r\tCmdActions := cmdMap! !\r\r!ParagraphEditor class methodsFor: 'keyboard shortcut tables' stamp: 'sw 12/9/2001 21:33'!\rinitializeShiftCmdKeyShortcuts \r\t\"Initialize the shift-command-key (or control-key) shortcut table.\"\r\t\"NOTE: if you don't know what your keyboard generates, use Sensor kbdTest\"\r\t\"wod 11/3/1998: Fix setting of cmdMap for shifted keys to actually use the \r\tcapitalized versions of the letters.\r\tTPR 2/18/99: add the plain ascii values back in for those VMs that don't return the shifted values.\"\r\r\t| cmdMap cmds |\r\r\t\"shift-command and control shortcuts\"\r\tcmdMap _ Array new: 256 withAll: #noop:.  \"use temp in case of a crash\"\r\tcmdMap at: ( 1 + 1) put: #cursorHome:.\t\t\t\"home key\"\r\tcmdMap at: ( 4 + 1) put: #cursorEnd:.\t\t\t\"end key\"\r\tcmdMap at: ( 8 + 1) put: #forwardDelete:.\t\t\"ctrl-H or delete key\"\r\tcmdMap at: (11 + 1) put: #cursorPageUp:.\t\t\"page up key\"\r\tcmdMap at: (12 + 1) put: #cursorPageDown:.\t\t\"page down key\"\r\tcmdMap at: (13 + 1) put: #crWithIndent:.\t\t\t\"ctrl-Return\"\r\tcmdMap at: (27 + 1) put: #offerMenuFromEsc:.\t\"escape key\"\r\tcmdMap at: (28 + 1) put: #cursorLeft:.\t\t\t\"left arrow key\"\r\tcmdMap at: (29 + 1) put: #cursorRight:.\t\t\t\"right arrow key\"\r\tcmdMap at: (30 + 1) put: #cursorUp:.\t\t\t\"up arrow key\"\r\tcmdMap at: (31 + 1) put: #cursorDown:.\t\t\t\"down arrow key\"\r\tcmdMap at: (32 + 1) put: #selectWord:.\t\t\t\"space bar key\"\r\tcmdMap at: (45 + 1) put: #changeEmphasis:.\t\t\"cmd-sh-minus\"\r\tcmdMap at: (61 + 1) put: #changeEmphasis:.\t\t\"cmd-sh-plus\"\r\tcmdMap at: (127 + 1) put: #forwardDelete:.\t\t\"del key\"\r\r\t\"Note: Command key overrides shift key, so, for example, cmd-shift-9 produces $9 not $(\"\r\t'9[,''' do: [ :char | cmdMap at: (char asciiValue + 1) put: #shiftEnclose: ].\t\"({< and double-quote\"\r\t\"Note: Must use cmd-9 or ctrl-9 to get '()' since cmd-shift-9 is a Mac FKey command.\"\r\r\t\"NB: sw 12/9/2001 commented out the idiosyncratic line just below, which was grabbing shift-esc in the text editor and hence which argued with the wish to have shift-esc be a universal gesture for escaping the local context and calling up the desktop menu.\"  \r\t\"cmdMap at: (27 + 1) put: #shiftEnclose:.\" \t\"ctrl-[\"\r\r\t\"'\"\"''(' do: [ :char | cmdMap at: (char asciiValue + 1) put: #enclose:].\"\r\r\tcmds _ #(\r\t\t$a\targAdvance:\r\t\t$b\tbrowseItHere:\r\t\t$c\tcompareToClipboard:\r\t\t$d\tduplicate:\r\t\t$e\tmethodStringsContainingIt:\r\t\t$f\tdisplayIfFalse:\r\t\t$g\tfileItIn:\r\t\t$h\tcursorTopHome:\r\t\t$i\texploreIt:\r\t\t$j\tdoAgainMany:\r\t\t$k\tchangeStyle:\r\t\t$l\toutdent:\r\t\t$m\tselectCurrentTypeIn:\r\t\t$n\treferencesToIt:\r\t\t$p\tmakeProjectLink:\r\t\t$r\tindent:\r\t\t$s\tsearch:\r\t\t$t\tdisplayIfTrue:\r\t\t$u\tchangeLfToCr:\r\t\t$v\tpasteInitials:\r\t\t$w\tmethodNamesContainingIt:\r\t\t$x\tmakeLowercase:\r\t\t$y\tmakeUppercase:\r\t\t$z\tmakeCapitalized:\r\t).\r\t1 to: cmds size by: 2 do: [ :i |\r\t\tcmdMap at: ((cmds at: i) asciiValue + 1) put: (cmds at: i + 1).\t\t\"plain keys\"\r\t\tcmdMap at: ((cmds at: i) asciiValue - 32 + 1) put: (cmds at: i + 1).\t\t\"shifted keys\"\r\t\tcmdMap at: ((cmds at: i) asciiValue - 96 + 1) put: (cmds at: i + 1).\t\t\"ctrl keys\"\r\t].\r\tShiftCmdActions _ cmdMap! !\r\r!ParagraphEditor class methodsFor: 'keyboard shortcut tables' stamp: 'sbw 10/8/1999 21:42'!\rspecialShiftCmdKeys\r\r\"Private - return array of key codes that represent single keys acting\ras if shift-command were also being pressed\"\r\r^#(\r\t1\t\"home\"\r\t3\t\"enter\"\r\t4\t\"end\"\r\t8\t\"backspace\"\r\t11\t\"page up\"\r\t12\t\"page down\"\r\t27\t\"escape\"\r\t28\t\"left arrow\"\r\t29\t\"right arrow\"\r\t30\t\"up arrow\"\r\t31\t\"down arrow\"\r\t127\t\"delete\"\r\t)! !\rObject subclass: #ParseNode\r\tinstanceVariableNames: 'comment pc'\r\tclassVariableNames: 'Bfp BtpLong CodeBases CodeLimits DblExtDoAll Dup EndMethod EndRemote Jmp JmpLimit JmpLong LdFalse LdInstLong LdInstType LdLitIndType LdLitType LdMinus1 LdNil LdSelf LdSuper LdTempType LdThisContext LdTrue LoadLong LongLongDoAll NodeFalse NodeNil NodeSelf NodeSuper NodeThisContext NodeTrue Pop Send SendLimit SendLong SendLong2 SendPlus SendType ShortStoP StdLiterals StdSelectors StdVariables Store StorePop'\r\tpoolDictionaries: ''\r\tcategory: 'System-Compiler'!\r!ParseNode commentStamp: '<historical>' prior: 0!\rThis superclass of most compiler/decompiler classes declares common class variables, default messages, and the code emitters for jumps. Some of the class variables are initialized here; the rest are initialized in class VariableNode.!\r\r\r!ParseNode methodsFor: 'testing'!\rassignmentCheck: encoder at: location\r\t\"For messageNodes masquerading as variables for the debugger.\r\tFor now we let this through - ie we allow stores ev\r\tinto args.  Should check against numArgs, though.\"\r\t^ -1! !\r\r!ParseNode methodsFor: 'testing'!\rcanBeSpecialArgument\r\t\"Can I be an argument of (e.g.) ifTrue:?\"\r\r\t^false! !\r\r!ParseNode methodsFor: 'testing'!\rcanCascade\r\r\t^false! !\r\r!ParseNode methodsFor: 'testing'!\risComplex\r\t\"Used for pretty printing to determine whether to start a new line\"\r\r\t^false! !\r\r!ParseNode methodsFor: 'testing'!\risConstantNumber  \"Overridden in LiteralNode\"\r\t^false! !\r\r!ParseNode methodsFor: 'testing' stamp: 'di 4/5/2000 11:14'!\risLiteral\r\r\t^ false! !\r\r!ParseNode methodsFor: 'testing'!\risMessage: selSymbol receiver: rcvrPred arguments: argsPred\r\t\"See comment in MessageNode.\"\r\r\t^false! !\r\r!ParseNode methodsFor: 'testing'!\risReturnSelf\r\r\t^false! !\r\r!ParseNode methodsFor: 'testing'!\risReturningIf\r\r\t^false! !\r\r!ParseNode methodsFor: 'testing' stamp: 'tk 8/2/1999 18:39'!\risSelfPseudoVariable\t\r\t\"Overridden in VariableNode.\"\r\t^false! !\r\r!ParseNode methodsFor: 'testing'!\risSpecialConstant\r\t^ false! !\r\r!ParseNode methodsFor: 'testing' stamp: 'di 10/12/1999 15:28'!\risTemp\r\t^ false! !\r\r!ParseNode methodsFor: 'testing'!\risUndefTemp\r\t^ false! !\r\r!ParseNode methodsFor: 'testing'!\risUnusedTemp\r\t^ false! !\r\r!ParseNode methodsFor: 'testing'!\risVariableReference\r\r\t^false! !\r\r!ParseNode methodsFor: 'testing'!\rnowHasDef  \"Ignored in all but VariableNode\"! !\r\r!ParseNode methodsFor: 'testing'!\rnowHasRef  \"Ignored in all but VariableNode\"! !\r\r!ParseNode methodsFor: 'testing'!\rtoDoIncrement: ignored\r\t\"Only meant for Messages or Assignments - else return nil\"\r\t^ nil! !\r\r\r!ParseNode methodsFor: 'code generation'!\remitBranchOn:\rcondition dist: dist pop: stack on: strm\r\tstack pop: 1.\r\tdist = 0 ifTrue: [^ strm nextPut: Pop].\r\tcondition\r\t\tifTrue: [self emitLong: dist code: BtpLong on: strm]\r\t\tifFalse: [self emitShortOrLong: dist code: Bfp on: strm]! !\r\r!ParseNode methodsFor: 'code generation'!\remitForEffect: stack on: strm\r\r\tself emitForValue: stack on: strm.\r\tstrm nextPut: Pop.\r\tstack pop: 1! !\r\r!ParseNode methodsFor: 'code generation'!\remitForReturn: stack on: strm\r\r\tself emitForValue: stack on: strm.\r\tstrm nextPut: EndMethod! !\r\r!ParseNode methodsFor: 'code generation'!\remitJump: dist on: strm\r\r\tdist = 0 ifFalse: [self emitShortOrLong: dist code: Jmp on: strm]! !\r\r!ParseNode methodsFor: 'code generation'!\remitLong: dist code: longCode on: aStream \r\t\"Force a two-byte jump.\"\r\t| code distance |\r\tcode _ longCode.\r\tdistance _ dist.\r\tdistance < 0\r\t\tifTrue: \r\t\t\t[distance _ distance + 1024.\r\t\t\tcode _ code - 4]\r\t\tifFalse: \r\t\t\t[distance > 1023 ifTrue: [distance _ -1]].\r\tdistance < 0\r\t\tifTrue: \r\t\t\t[self error: 'A block compiles more than 1K bytes of code']\r\t\tifFalse: \r\t\t\t[aStream nextPut: distance // 256 + code.\r\t\t\taStream nextPut: distance \\\\ 256]! !\r\r!ParseNode methodsFor: 'code generation'!\remitShortOrLong: dist code: shortCode on: strm\r\t(1 <= dist and: [dist <= JmpLimit])\r\t\tifTrue: [strm nextPut: shortCode + dist - 1]\r\t\tifFalse: [self emitLong: dist code: shortCode + (JmpLong-Jmp) on: strm]! !\r\r!ParseNode methodsFor: 'code generation' stamp: 'hmm 7/15/2001 21:34'!\rpc\r\t\"Used by encoder source mapping.\"\r\r\tpc==nil ifTrue: [^0] ifFalse: [^pc]! !\r\r!ParseNode methodsFor: 'code generation'!\rsizeBranchOn: condition dist: dist\r\tdist = 0 ifTrue: [^1].\r\t^ condition\r\t\tifTrue: [2]  \"Branch on true is always 2 bytes\"\r\t\tifFalse: [self sizeShortOrLong: dist]! !\r\r!ParseNode methodsFor: 'code generation'!\rsizeForEffect: encoder\r\r\t^(self sizeForValue: encoder) + 1! !\r\r!ParseNode methodsFor: 'code generation'!\rsizeForReturn: encoder\r\r\t^(self sizeForValue: encoder) + 1! !\r\r!ParseNode methodsFor: 'code generation'!\rsizeJump: dist\r\r\tdist = 0 ifTrue: [^0].\r\t^self sizeShortOrLong: dist! !\r\r!ParseNode methodsFor: 'code generation'!\rsizeShortOrLong: dist\r\r\t(1 <= dist and: [dist <= JmpLimit])\r\t\tifTrue: [^1].\r\t^2! !\r\r\r!ParseNode methodsFor: 'encoding'!\rencodeSelector: selector\r\r\t^nil! !\r\r\r!ParseNode methodsFor: 'comment'!\rcomment\r\r\t^comment! !\r\r!ParseNode methodsFor: 'comment'!\rcomment: newComment\r\r\tcomment _ newComment! !\r\r\r!ParseNode methodsFor: 'converting'!\rasReturnNode\r\r\t^ReturnNode new expr: self! !\r\r\r!ParseNode methodsFor: 'printing' stamp: 'di 4/5/2000 15:11'!\rprintCommentOn: aStream indent: indent \r\t| thisComment |\r\tcomment == nil ifTrue: [^ self].\r\taStream withStyleFor: #comment\r\t\tdo: [1 to: comment size do: \r\t\t\t\t[:index | \r\t\t\t\tindex > 1 ifTrue: [aStream crtab: indent].\r\t\t\t\taStream nextPut: $\".\r\t\t\t\tthisComment _ comment at: index.\r\t\t\t\tself printSingleComment: thisComment\r\t\t\t\t\ton: aStream\r\t\t\t\t\tindent: indent.\r\t\t\t\taStream nextPut: $\"]].\r\tcomment _ nil! !\r\r!ParseNode methodsFor: 'printing' stamp: 'di 4/19/2000 11:58'!\rprintOn: aStream \r\t\"Refer to the comment in Object|printOn:.\"\r\r\taStream nextPutAll: '{'.\r\taStream nextPutAll: ((DialectStream dialect: #ST80\r\t\t\t\t\t\t\t\tcontents: [:strm | self printOn: strm indent: 0])\r\t\t\t\t\t\t\tasString).\r\taStream nextPutAll: '}'! !\r\r!ParseNode methodsFor: 'printing'!\rprintOn: aStream indent: anInteger \r\t\"If control gets here, avoid recursion loop.\"\r\r\tsuper printOn: aStream! !\r\r!ParseNode methodsFor: 'printing'!\rprintOn: aStream indent: level precedence: p\r\r\tself printOn: aStream indent: level! !\r\r\r!ParseNode methodsFor: 'private' stamp: 'sma 5/28/2000 10:47'!\rnextWordFrom: aStream setCharacter: aBlock\r\t| outStream char |\r\toutStream _ WriteStream on: (String new: 16).\r\t[(aStream peekFor: Character space) \r\t\tor: [aStream peekFor: Character tab]] whileTrue.\r\t[aStream atEnd\r\t\tor:\r\t\t\t[char _ aStream next.\r\t\t\tchar = Character cr or: [char = Character space]]]\r\t\twhileFalse: [outStream nextPut: char].\r\taBlock value: char.\r\t^ outStream contents! !\r\r!ParseNode methodsFor: 'private' stamp: 'sma 5/28/2000 10:45'!\rprintSingleComment: aString on: aStream indent: indent \r\t\"Print the comment string, assuming it has been indented indent tabs.\r\tBreak the string at word breaks, given the widths in the default\r\tfont, at 450 points.\"\r\r\t| readStream word position lineBreak font wordWidth tabWidth spaceWidth lastChar |\r\treadStream _ ReadStream on: aString.\r\tfont _ TextStyle default defaultFont.\r\ttabWidth _ TextConstants at: #DefaultTab.\r\tspaceWidth _ font widthOf: Character space.\r\tposition _ indent * tabWidth.\r\tlineBreak _ 450.\r\t[readStream atEnd]\r\t\twhileFalse: \r\t\t\t[word _ self nextWordFrom: readStream setCharacter: [:lc | lastChar _ lc].\r\t\t\twordWidth _ word inject: 0 into: [:width :char | width + (font widthOf: char)].\r\t\t\tposition _ position + wordWidth.\r\t\t\tposition > lineBreak\r\t\t\t\tifTrue: \r\t\t\t\t\t[aStream crtab: indent.\r\t\t\t\t\tposition _ indent * tabWidth + wordWidth + spaceWidth.\r\t\t\t\t\tlastChar = Character cr\r\t\t\t\t\t\tifTrue: [[readStream peekFor: Character tab] whileTrue].\r\t\t\t\t\tword isEmpty ifFalse: [aStream nextPutAll: word; space]]\r\t\t\t\tifFalse: \r\t\t\t\t\t[aStream nextPutAll: word.\r\t\t\t\t\treadStream atEnd\r\t\t\t\t\t\tifFalse: \r\t\t\t\t\t\t\t[position _ position + spaceWidth.\r\t\t\t\t\t\t\taStream space].\r\t\t\t\t\tlastChar = Character cr\r\t\t\t\t\t\tifTrue: \r\t\t\t\t\t\t\t[aStream crtab: indent.\r\t\t\t\t\t\t\tposition _ indent * tabWidth.\r\t\t\t\t\t\t\t[readStream peekFor: Character tab] whileTrue]]]! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rParseNode class\r\tinstanceVariableNames: ''!\r\r!ParseNode class methodsFor: 'class initialization'!\rinitialize\r\t\"ParseNode initialize. VariableNode initialize\"\r\tLdInstType _ 1.\r\tLdTempType _ 2.\r\tLdLitType _ 3.\r\tLdLitIndType _ 4.\r\tSendType _ 5.\r\tCodeBases _ #(0 16 32 64 208 ).\r\tCodeLimits _ #(16 16 32 32 16 ).\r\tLdSelf _ 112.\r\tLdTrue _ 113.\r\tLdFalse _ 114.\r\tLdNil _ 115.\r\tLdMinus1 _ 116.\r\tLoadLong _ 128.\r\tStore _ 129.\r\tStorePop _ 130.\r\tShortStoP _ 96.\r\tSendLong _ 131.\r\tDblExtDoAll _ 132.\r\tSendLong2 _ 134.\r\tLdSuper _ 133.\r\tPop _ 135.\r\tDup _ 136.\r\tLdThisContext _ 137.\r\tEndMethod _ 124.\r\tEndRemote _ 125.\r\tJmp _ 144.\r\tBfp _ 152.\r\tJmpLimit _ 8.\r\tJmpLong _ 164.  \"code for jmp 0\"\r\tBtpLong _ 168.\r\tSendPlus _ 176.\r\tSend _ 208.\r\tSendLimit _ 16! !\rObject subclass: #ParseStack\r\tinstanceVariableNames: 'position length'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Compiler'!\r!ParseStack commentStamp: '<historical>' prior: 0!\rI keep track of the current and high position of the stack that will be needed by code being compiled.!\r\r\r!ParseStack methodsFor: 'initialize-release'!\rinit\r\r\tlength _ position _ 0! !\r\r\r!ParseStack methodsFor: 'accessing'!\rpop: n\r\r\t(position _ position - n) < 0 \r\t\tifTrue: [self error: 'Parse stack underflow']! !\r\r!ParseStack methodsFor: 'accessing'!\rpush: n\r\r\t(position _ position + n) > length \r\t\tifTrue: [length _ position]! !\r\r!ParseStack methodsFor: 'accessing'!\rsize\r\r\t^length! !\r\r\r!ParseStack methodsFor: 'results'!\rposition\r\r\t^position! !\r\r\r!ParseStack methodsFor: 'printing'!\rprintOn: aStream\r\t\r\tsuper printOn: aStream.\r\taStream nextPutAll: ' at '; print: position; nextPutAll: ' of '; print: length! !\rScanner subclass: #Parser\r\tinstanceVariableNames: 'here hereType hereMark hereEnd prevMark prevEnd encoder requestor parseNode failBlock requestorOffset tempsMark doitFlag'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Compiler'!\r!Parser commentStamp: '<historical>' prior: 0!\rI parse Smalltalk syntax and create a MethodNode that is the root of the parse tree. I look one token ahead.!\r\r\r!Parser methodsFor: 'public access'!\rencoder\r\t^ encoder! !\r\r!Parser methodsFor: 'public access' stamp: 'ajh 1/22/2003 16:51'!\rparse: sourceStreamOrString class: behavior\r\r\t^ self parse: sourceStreamOrString readStream class: behavior\r\t\tnoPattern: false context: nil notifying: nil ifFail: [self parseError]! !\r\r!Parser methodsFor: 'public access' stamp: 'BG 11/27/2003 10:27'!\rparse: sourceStream class: class noPattern: noPattern context: ctxt notifying: req ifFail: aBlock \r        \"Answer a MethodNode for the argument, sourceStream, that is the root of \r        a parse tree. Parsing is done with respect to the argument, class, to find \r        instance, class, and pool variables; and with respect to the argument, \r        ctxt, to find temporary variables. Errors in parsing are reported to the \r        argument, req, if not nil; otherwise aBlock is evaluated. The argument \r        noPattern is a Boolean that is true if the the sourceStream does not \r        contain a method header (i.e., for DoIts).\"\r\r         | methNode repeatNeeded myStream parser s p |\r        (req notNil and: [RequestAlternateSyntaxSetting signal and: [(sourceStream isKindOf: FileStream) not]])\r                ifTrue: [parser _ self as: DialectParser]\r                ifFalse: [parser _ self].\r        myStream _ sourceStream.\r        [repeatNeeded _ false.\r\t   p _ myStream position.\r\t   s _ myStream upToEnd.\r\t   myStream position: p.\r        parser init: myStream notifying: req failBlock: [^ aBlock value].\r        doitFlag _ noPattern.\r        failBlock_ aBlock.\r        [methNode _ parser method: noPattern context: ctxt\r                                encoder: (Encoder new init: class context: ctxt notifying: parser)] \r                on: ParserRemovedUnusedTemps \r                do: \r                        [ :ex | repeatNeeded _ true.\r                        myStream _ ReadStream on: requestor text string.\r                        ex resume].\r        repeatNeeded] whileTrue.\r        encoder _ failBlock _ requestor _ parseNode _ nil. \"break cycles & mitigate refct overflow\"\r\t   methNode sourceText: s.\r        ^ methNode! !\r\r!Parser methodsFor: 'public access' stamp: 'RAA 6/14/2000 13:50'!\rparseArgsAndTemps: aString notifying: req \r        \"Parse the argument, aString, notifying req if an error occurs. Otherwise, \r        answer a two-element Array containing Arrays of strings (the argument \r        names and temporary variable names).\"\r\r        (req notNil and: [RequestAlternateSyntaxSetting signal]) ifTrue:\r                [^ (self as: DialectParser) parseArgsAndTemps: aString notifying: req].\r        aString == nil ifTrue: [^#()].\r        doitFlag _ false.               \"Don't really know if a doit or not!!\"\r        ^self initPattern: aString\r                notifying: req\r                return: [:pattern | (pattern at: 2) , self temporaries]! !\r\r!Parser methodsFor: 'public access'!\rparseSelector: aString \r\t\"Answer the message selector for the argument, aString, which should \r\tparse successfully up to the temporary declaration or the end of the \r\tmethod header.\"\r\r\t^self\r\t\tinitPattern: aString\r\t\tnotifying: nil\r\t\treturn: [:pattern | pattern at: 1]! !\r\r\r!Parser methodsFor: 'expression types'!\rargumentName\r\r\thereType == #word\r\t\tifFalse: [^self expected: 'Argument name'].\r\t^self advance! !\r\r!Parser methodsFor: 'expression types' stamp: 'hmm 7/16/2001 18:47'!\rassignment: varNode\r\t\" var '_' expression => AssignmentNode.\"\r\t| loc start |\r\t(loc _ varNode assignmentCheck: encoder at: prevMark + requestorOffset) >= 0\r\t\tifTrue: [^self notify: 'Cannot store into' at: loc].\r\tstart _ self startOfNextToken.\r\tvarNode nowHasDef.\r\tself advance.\r\tself expression ifFalse: [^self expected: 'Expression'].\r\tparseNode _ AssignmentNode new\r\t\t\t\tvariable: varNode\r\t\t\t\tvalue: parseNode\r\t\t\t\tfrom: encoder\r\t\t\t\tsourceRange: (start to: self endOfLastToken).\r\t^true! !\r\r!Parser methodsFor: 'expression types' stamp: 'hmm 7/17/2001 21:03'!\rblockExpression\r\t\"[ ({:var} |) (| {temps} |) (statements) ] => BlockNode.\"\r\r\t| variableNodes temporaryBlockVariables start |\r\r\tvariableNodes _ OrderedCollection new.\r\tstart _ prevMark + requestorOffset.\r\t\"Gather parameters.\"\r\t[self match: #colon] whileTrue: [variableNodes addLast: (encoder autoBind: self argumentName)].\r\t(variableNodes size > 0 & (hereType ~~ #rightBracket) and: [(self match: #verticalBar) not]) ifTrue: [^self expected: 'Vertical bar'].\r\r\ttemporaryBlockVariables _ self temporaryBlockVariables.\r\tself statements: variableNodes innerBlock: true.\r\tparseNode temporaries: temporaryBlockVariables.\r\r\t(self match: #rightBracket) ifFalse: [^self expected: 'Period or right bracket'].\r\r\tencoder noteSourceRange: (self endOfLastToken to: self endOfLastToken) forNode: parseNode.\r\r\t\"The scope of the parameters and temporary block variables is no longer active.\"\r\ttemporaryBlockVariables do: [:variable | variable scope: -1].\r\tvariableNodes do: [:variable | variable scope: -1]! !\r\r!Parser methodsFor: 'expression types' stamp: 'di 3/8/2000 09:36'!\rbraceExpression\r\t\" { elements } => BraceNode.\"\r\r\t| elements locations loc more |\r\telements _ OrderedCollection new.\r\tlocations _ OrderedCollection new.\r\tself advance.\r\tmore _ hereType ~~ #rightBrace.\r\t[more]\r\t\twhileTrue: \r\t\t\t[loc _ hereMark + requestorOffset.\r\t\t\tself expression\r\t\t\t\tifTrue: \r\t\t\t\t\t[elements addLast: parseNode.\r\t\t\t\t\tlocations addLast: loc]\r\t\t\t\tifFalse:\r\t\t\t\t\t[^self expected: 'Variable or expression'].\r\t\t\t(self match: #period)\r\t\t\t\tifTrue: [more _ hereType ~~ #rightBrace]\r\t\t\t\tifFalse: [more _ false]].\r\tparseNode _ BraceNode new elements: elements sourceLocations: locations.\r\t(self match: #rightBrace)\r\t\tifFalse: [^self expected: 'Period or right brace'].\r\t^true! !\r\r!Parser methodsFor: 'expression types'!\rcascade\r\t\" {; message} => CascadeNode.\"\r\r\t| rcvr msgs |\r\tparseNode canCascade\r\t\tifFalse: [^self expected: 'Cascading not'].\r\trcvr _ parseNode cascadeReceiver.\r\tmsgs _ OrderedCollection with: parseNode.\r\t[self match: #semicolon]\r\t\twhileTrue: \r\t\t\t[parseNode _ rcvr.\r\t\t\t(self messagePart: 3 repeat: false)\r\t\t\t\tifFalse: [^self expected: 'Cascade'].\r\t\t\tparseNode canCascade\r\t\t\t\tifFalse: [^self expected: '<- No special messages'].\r\t\t\tparseNode cascadeReceiver.\r\t\t\tmsgs addLast: parseNode].\r\tparseNode _ CascadeNode new receiver: rcvr messages: msgs! !\r\r!Parser methodsFor: 'expression types' stamp: 'di 11/19/1999 07:43'!\rexpression\r\r\t(hereType == #word and: [tokenType == #leftArrow])\r\t\tifTrue: [^ self assignment: self variable].\r\thereType == #leftBrace\r\t\tifTrue: [self braceExpression]\r\t\tifFalse: [self primaryExpression ifFalse: [^ false]].\r\t(self messagePart: 3 repeat: true)\r\t\tifTrue: [hereType == #semicolon ifTrue: [self cascade]].\r\t^ true! !\r\r!Parser methodsFor: 'expression types'!\rmessagePart: level repeat: repeat\r\r\t| start receiver selector args precedence words keywordStart |\r\t[receiver _ parseNode.\r\t(hereType == #keyword and: [level >= 3])\r\t\tifTrue: \r\t\t\t[start _ self startOfNextToken.\r\t\t\tselector _ WriteStream on: (String new: 32).\r\t\t\targs _ OrderedCollection new.\r\t\t\twords _ OrderedCollection new.\r\t\t\t[hereType == #keyword]\r\t\t\t\twhileTrue: \r\t\t\t\t\t[keywordStart _ self startOfNextToken + requestorOffset.\r\t\t\t\t\tselector nextPutAll: self advance.\r\t\t\t\t\twords addLast: (keywordStart to: self endOfLastToken + requestorOffset).\r\t\t\t\t\tself primaryExpression ifFalse: [^self expected: 'Argument'].\r\t\t\t\t\tself messagePart: 2 repeat: true.\r\t\t\t\t\targs addLast: parseNode].\r\t\t\t(Symbol hasInterned: selector contents ifTrue: [ :sym | selector _ sym])\r\t\t\t\tifFalse: [ selector _ self correctSelector: selector contents\r\t\t\t\t\t\t\t\t\t\twordIntervals: words\r\t\t\t\t\t\t\t\t\t\texprInterval: (start to: self endOfLastToken)\r\t\t\t\t\t\t\t\t\t\tifAbort: [ ^ self fail ] ].\r\t\t\tprecedence _ 3]\r\t\tifFalse: [((hereType == #binary or: [hereType == #verticalBar])\r\t\t\t\tand: [level >= 2])\r\t\t\t\tifTrue: \r\t\t\t\t\t[start _ self startOfNextToken.\r\t\t\t\t\tselector _ self advance asSymbol.\r\t\t\t\t\tself primaryExpression ifFalse: [^self expected: 'Argument'].\r\t\t\t\t\tself messagePart: 1 repeat: true.\r\t\t\t\t\targs _ Array with: parseNode.\r\t\t\t\t\tprecedence _ 2]\r\t\t\t\tifFalse: [hereType == #word\r\t\t\t\t\t\tifTrue: \r\t\t\t\t\t\t\t[start _ self startOfNextToken.\r\t\t\t\t\t\t\tselector _ self advance.\r\t\t\t\t\t\t\targs _ #().\r\t\t\t\t\t\t\twords _ OrderedCollection with: (start  + requestorOffset to: self endOfLastToken + requestorOffset).\r\t\t\t\t\t\t\t(Symbol hasInterned: selector ifTrue: [ :sym | selector _ sym])\r\t\t\t\t\t\t\t\tifFalse: [ selector _ self correctSelector: selector\r\t\t\t\t\t\t\t\t\t\t\t\t\twordIntervals: words\r\t\t\t\t\t\t\t\t\t\t\t\t\texprInterval: (start to: self endOfLastToken)\r\t\t\t\t\t\t\t\t\t\t\t\t\tifAbort: [ ^ self fail ] ].\r\t\t\t\t\t\t\tprecedence _ 1]\r\t\t\t\t\t\tifFalse: [^args notNil]]].\r\tparseNode _ MessageNode new\r\t\t\t\treceiver: receiver\r\t\t\t\tselector: selector\r\t\t\t\targuments: args\r\t\t\t\tprecedence: precedence\r\t\t\t\tfrom: encoder\r\t\t\t\tsourceRange: (start to: self endOfLastToken).\r\trepeat]\r\t\twhileTrue: [].\r\t^true! !\r\r!Parser methodsFor: 'expression types' stamp: 'di 5/30/2000 22:06'!\rmethod: doit context: ctxt encoder: encoderToUse\r\t\" pattern [ | temporaries ] block => MethodNode.\"\r\r\t| sap blk prim temps messageComment methodNode |\r\tencoder _ encoderToUse.\r\tsap _ self pattern: doit inContext: ctxt.\r\t\"sap={selector, arguments, precedence}\"\r\t(sap at: 2) do: [:argNode | argNode isArg: true].\r\ttemps _ self temporaries.\r\tmessageComment _ currentComment.\r\tcurrentComment _ nil.\r\tprim _ doit ifTrue: [0] ifFalse: [self primitive].\r\tself statements: #() innerBlock: doit.\r\tblk _ parseNode.\r\tdoit ifTrue: [blk returnLast]\r\t\tifFalse: [blk returnSelfIfNoOther].\r\thereType == #doIt ifFalse: [^self expected: 'Nothing more'].\r\tself interactive ifTrue: [self removeUnusedTemps].\r\tmethodNode _ self newMethodNode comment: messageComment.\r\t^ methodNode\r\t\tselector: (sap at: 1)\r\t\targuments: (sap at: 2)\r\t\tprecedence: (sap at: 3)\r\t\ttemporaries: temps\r\t\tblock: blk\r\t\tencoder: encoder\r\t\tprimitive: prim! !\r\r!Parser methodsFor: 'expression types' stamp: 'di 5/30/2000 21:59'!\rnewMethodNode\r\r\t^ MethodNode new! !\r\r!Parser methodsFor: 'expression types' stamp: 'di 4/5/2000 16:52'!\rpattern: fromDoit inContext: ctxt \r\t\" unarySelector | binarySelector arg | keyword arg {keyword arg} =>  \r\t{selector, arguments, precedence}.\"\r\t| args selector |\r\tdoitFlag _ fromDoit.\r\tfromDoit ifTrue:\r\t\t\t[ctxt == nil\r\t\t\t\tifTrue: [^ {#DoIt. {}. 1}]\r\t\t\t\tifFalse: [^ {#DoItIn:. {encoder encodeVariable: 'homeContext'}. 3}]].\r\r\thereType == #word ifTrue: [^ {self advance asSymbol. {}. 1}].\r\r\t(hereType == #binary or: [hereType == #verticalBar])\r\t\tifTrue: \r\t\t\t[selector _ self advance asSymbol.\r\t\t\targs _ Array with: (encoder bindArg: self argumentName).\r\t\t\t^ {selector. args. 2}].\r\r\thereType == #keyword\r\t\tifTrue: \r\t\t\t[selector _ WriteStream on: (String new: 32).\r\t\t\targs _ OrderedCollection new.\r\t\t\t[hereType == #keyword]\r\t\t\t\twhileTrue: \r\t\t\t\t\t[selector nextPutAll: self advance.\r\t\t\t\t\targs addLast: (encoder bindArg: self argumentName)].\r\t\t\t^ {selector contents asSymbol. args. 3}].\r\r\t^ self expected: 'Message pattern'! !\r\r!Parser methodsFor: 'expression types'!\rprimaryExpression \r\thereType == #word \r\t\tifTrue: \r\t\t\t[parseNode _ self variable.\r\t\t\t(parseNode isUndefTemp and: [self interactive])\r\t\t\t\tifTrue: [self queryUndefined].\r\t\t\tparseNode nowHasRef.\r\t\t\t^ true].\r\thereType == #leftBracket\r\t\tifTrue: \r\t\t\t[self advance.\r\t\t\tself blockExpression.\r\t\t\t^true].\r\thereType == #leftBrace\r\t\tifTrue: \r\t\t\t[self braceExpression.\r\t\t\t^true].\r\thereType == #leftParenthesis\r\t\tifTrue: \r\t\t\t[self advance.\r\t\t\tself expression ifFalse: [^self expected: 'expression'].\r\t\t\t(self match: #rightParenthesis)\r\t\t\t\tifFalse: [^self expected: 'right parenthesis'].\r\t\t\t^true].\r\t(hereType == #string or: [hereType == #number or: [hereType == #literal]])\r\t\tifTrue: \r\t\t\t[parseNode _ encoder encodeLiteral: self advance.\r\t\t\t^true].\r\t(here == #- and: [tokenType == #number])\r\t\tifTrue: \r\t\t\t[self advance.\r\t\t\tparseNode _ encoder encodeLiteral: self advance negated.\r\t\t\t^true].\r\t^false! !\r\r!Parser methodsFor: 'expression types' stamp: 'di 6/7/2000 08:45'!\rstatements: argNodes innerBlock: inner\r\r\t| stmts returns start more blockComment |\r\tstmts _ OrderedCollection new.\r\t\"give initial comment to block, since others trail statements\"\r\tblockComment _ currentComment.\r\tcurrentComment _ nil.\r\treturns _ false.\r\tmore _ hereType ~~ #rightBracket.\r\t[more]\r\t\twhileTrue: \r\t\t[start _ self startOfNextToken.\r\t\t(returns _ self matchReturn)\r\t\t\tifTrue: \r\t\t\t\t[self expression\r\t\t\t\t\tifFalse: [^self expected: 'Expression to return'].\r\t\t\t\tself addComment.\r\t\t\t\tstmts addLast: (parseNode isReturningIf\r\t\t\t\t\tifTrue: [parseNode]\r\t\t\t\t\tifFalse: [ReturnNode new\r\t\t\t\t\t\t\texpr: parseNode\r\t\t\t\t\t\t\tencoder: encoder\r\t\t\t\t\t\t\tsourceRange: (start to: self endOfLastToken)])]\r\t\t\tifFalse: \r\t\t\t\t[self expression\r\t\t\t\t\tifTrue: \r\t\t\t\t\t\t[self addComment.\r\t\t\t\t\t\tstmts addLast: parseNode]\r\t\t\t\t\tifFalse: \r\t\t\t\t\t\t[self addComment.\r\t\t\t\t\t\tstmts size = 0\r\t\t\t\t\t\t\tifTrue: \r\t\t\t\t\t\t\t\t[stmts addLast: \r\t\t\t\t\t\t\t\t\t(encoder encodeVariable:\r\t\t\t\t\t\t\t\t\t\t(inner ifTrue: ['nil'] ifFalse: ['self']))]]].\r\t\treturns \r\t\t\tifTrue: \r\t\t\t\t[self match: #period.\r\t\t\t\t(hereType == #rightBracket or: [hereType == #doIt])\r\t\t\t\t\tifFalse: [^self expected: 'End of block']].\r\t\tmore _ returns not and: [self match: #period]].\r\tparseNode _ BlockNode new\r\t\t\t\targuments: argNodes\r\t\t\t\tstatements: stmts\r\t\t\t\treturns: returns\r\t\t\t\tfrom: encoder.\r\tparseNode comment: blockComment.\r\t^ true! !\r\r!Parser methodsFor: 'expression types' stamp: 'sw 9/6/2001 15:30'!\rtemporaries\r\t\" [ '|' (variable)* '|' ]\"\r\t| vars theActualText |\r\t(self match: #verticalBar) ifFalse: \r\t\t[\"no temps\"\r\t\tdoitFlag ifTrue: [requestor\r\t\t\t\tifNil: [tempsMark _ 1]\r\t\t\t\tifNotNil: [tempsMark _ requestor selectionInterval first].\r\t\t\t^ #()].\r\t\ttempsMark _ (prevEnd ifNil: [0]) + 1.\r\t\ttempsMark _ hereMark\t\"formerly --> prevMark + prevToken\".\r\r\t\ttempsMark > 0 ifTrue:\r\t\t\t[theActualText _ source contents.\r\t\t\t[tempsMark < theActualText size and: [(theActualText at: tempsMark) isSeparator]]\r\t\t\t\twhileTrue: [tempsMark _ tempsMark + 1]].\r\t\t\t^ #()].\r\tvars _ OrderedCollection new.\r\t[hereType == #word]\r\t\twhileTrue: [vars addLast: (encoder bindTemp: self advance)].\r\t(self match: #verticalBar) ifTrue: \r\t\t[tempsMark _ prevMark.\r\t\t^ vars].\r\t^ self expected: 'Vertical bar'! !\r\r!Parser methodsFor: 'expression types' stamp: 'crl 2/26/1999 12:22'!\rtemporaryBlockVariables\r\t\"Scan and answer temporary block variables.\"\r\r\t| variables |\r\r\t(self match: #verticalBar) ifFalse: [\r\t\t\"There are't any temporary variables.\"\r\t\t^#()].\r\r\tvariables _ OrderedCollection new.\r\t[hereType == #word] whileTrue: [variables addLast: (encoder bindBlockTemp: self advance)].\r\t(self match: #verticalBar) ifTrue: [^variables].\r\t^self expected: 'Vertical bar'! !\r\r!Parser methodsFor: 'expression types' stamp: 'di 12/4/1999 21:04'!\rvariable\r\r\t| varName varStart varEnd |\r\tvarStart _ self startOfNextToken + requestorOffset.\r\tvarName _ self advance.\r\tvarEnd _ self endOfLastToken + requestorOffset.\r\t^ encoder encodeVariable: varName\r\t\tsourceRange: (varStart to: varEnd)\r\t\tifUnknown: [self correctVariable: varName interval: (varStart to: varEnd)]! !\r\r\r!Parser methodsFor: 'scanning' stamp: 'hmm 7/16/2001 20:12'!\radvance\r\t| this |\r\tprevMark _ hereMark.\r\tprevEnd _ hereEnd.\r\tthis _ here.\r\there _ token.\r\thereType _ tokenType.\r\thereMark _ mark.\r\thereEnd _ source position - (source atEnd ifTrue: [hereChar == 30 asCharacter ifTrue: [0] ifFalse: [1]] ifFalse: [2]).\r\tself scanToken.\r\t\"Transcript show: 'here: ', here printString, ' mark: ', hereMark printString, ' end: ', hereEnd printString; cr.\"\r\t^this! !\r\r!Parser methodsFor: 'scanning' stamp: 'hmm 7/16/2001 19:23'!\rendOfLastToken\r\r\t^ prevEnd ifNil: [mark]! !\r\r!Parser methodsFor: 'scanning'!\rmatch: type \r\t\"Answer with true if next tokens type matches.\"\r\r\thereType == type\r\t\tifTrue: \r\t\t\t[self advance.\r\t\t\t^true].\r\t^false! !\r\r!Parser methodsFor: 'scanning' stamp: 'di 6/7/2000 08:44'!\rmatchReturn\r\r\t^ self match: #upArrow! !\r\r!Parser methodsFor: 'scanning'!\rmatchToken: thing \r\t\"Matches the token, not its type.\"\r\r\there = thing ifTrue: [self advance. ^true].\r\t^false! !\r\r!Parser methodsFor: 'scanning'!\rstartOfNextToken\r\t\"Return starting position in source of next token.\"\r\r\thereType == #doIt ifTrue: [^source position + 1].\r\t^hereMark! !\r\r\r!Parser methodsFor: 'temps'!\rbindArg: name\r\r\t^ self bindTemp: name! !\r\r!Parser methodsFor: 'temps'!\rbindTemp: name\r\r\t^name! !\r\r\r!Parser methodsFor: 'error handling' stamp: 'hmm 7/18/2001 21:45'!\rexpected: aString \r\t\"Notify a problem at token 'here'.\"\r\r\ttokenType == #doIt ifTrue: [hereMark _ hereMark + 1].\r\thereType == #doIt ifTrue: [hereMark _ hereMark + 1].\r\t^ self notify: aString , ' expected' at: hereMark + requestorOffset! !\r\r!Parser methodsFor: 'error handling'!\rfail\r\r\t| exitBlock |\r\tencoder == nil\r\t\tifFalse: [encoder release. encoder _ nil]. \"break cycle\"\r\texitBlock _ failBlock.\r\tfailBlock _ nil.\r\t^exitBlock value! !\r\r!Parser methodsFor: 'error handling'!\rinteractive\r\r\t^ (requestor == nil or: [requestor isKindOf: SyntaxError]) not! !\r\r!Parser methodsFor: 'error handling'!\rnotify: aString \r\t\"Notify problem at token before 'here'.\"\r\r\t^self notify: aString at: prevMark + requestorOffset! !\r\r!Parser methodsFor: 'error handling' stamp: 'LC 1/6/2002 14:30'!\rnotify: string at: location\r\trequestor isNil\r\t\tifTrue: [(encoder == self or: [encoder isNil]) ifTrue: [^ self fail  \"failure setting up syntax error\"].\r\t\t\t\tSyntaxErrorNotification\r\t\t\t\t\tinClass: encoder classEncoding\r\t\t\t\t\twithCode: \r\t\t\t\t\t\t(source contents\r\t\t\t\t\t\t\tcopyReplaceFrom: location\r\t\t\t\t\t\t\tto: location - 1\r\t\t\t\t\t\t\twith: string , ' ->')\r\t\t\t\t\tdoitFlag: doitFlag]\r\t\tifFalse: [requestor\r\t\t\t\t\tnotify: string , ' ->'\r\t\t\t\t\tat: location\r\t\t\t\t\tin: source].\r\t^self fail! !\r\r!Parser methodsFor: 'error handling' stamp: 'di 2/9/1999 15:43'!\roffEnd: aString \r\t\"Notify a problem beyond 'here' (in lookAhead token). Don't be offEnded!!\"\r\r\trequestorOffset == nil\r\t\tifTrue: [^ self notify: aString at: mark]\r\t\tifFalse: [^ self notify: aString at: mark + requestorOffset]\r! !\r\r\r!Parser methodsFor: 'error correction' stamp: 'di 12/1/2000 14:39'!\rcorrectSelector: proposedKeyword wordIntervals: spots exprInterval: expInt ifAbort: abortAction\r\t\"Correct the proposedKeyword to some selector symbol, correcting the original text if such action is indicated.  abortAction is invoked if the proposedKeyword couldn't be converted into a valid selector.  Spots is an ordered collection of intervals within the test stream of the for each of the keyword parts.\"\r\r\t| alternatives aStream choice correctSelector userSelection lines firstLine |\r\t\"If we can't ask the user, assume that the keyword will be defined later\"\r\tself interactive ifFalse: [ ^ proposedKeyword asSymbol ].\r\r\tuserSelection _ requestor selectionInterval.\r\trequestor selectFrom: spots first first to: spots last last.\r\trequestor select.\r\talternatives _ Symbol possibleSelectorsFor: proposedKeyword.\r\r\taStream _ WriteStream on: (String new: 200).\r\taStream nextPutAll: (proposedKeyword contractTo: 35); cr.\r\tfirstLine _ 1.\r \talternatives do:\r\t\t[:sel | aStream nextPutAll: (sel contractTo: 35); nextPut: Character cr].\r\taStream nextPutAll: 'cancel'.\r\tlines _ Array with: firstLine with: (alternatives size + firstLine).\r\t\r\tchoice _ (PopUpMenu labels: aStream contents lines: lines)\r\t\tstartUpWithCaption: \r'Unknown selector, please \rconfirm, correct, or cancel'.\r\r\t(choice = 0) | (choice > (lines at: 2))\r\t\tifTrue: [ ^ abortAction value ].\r\r\trequestor deselect.\r\trequestor selectInvisiblyFrom: userSelection first to: userSelection last.\r\r\tchoice = 1 ifTrue: [ ^ proposedKeyword asSymbol ].\r\tcorrectSelector _ alternatives at: choice - 1.\r\tself substituteSelector: correctSelector keywords wordIntervals: spots.\r\t((proposedKeyword last ~~ $:) and: [correctSelector last == $:]) ifTrue: [\r\t\t^ abortAction value].\r\t^ correctSelector.\r! !\r\r!Parser methodsFor: 'error correction' stamp: 'md 3/13/2004 17:12'!\rcorrectVariable: proposedVariable interval: spot\r\t\"Correct the proposedVariable to a known variable, or declare it as a new\r\tvariable if such action is requested.  We support declaring lowercase\r\tvariables as temps or inst-vars, and uppercase variables as Globals or \r\tClassVars, depending on whether the context is nil (class=UndefinedObject).\r\tSpot is the interval within the test stream of the variable.\r\trr 3/4/2004 10:26 : adds the option to define a new class. \"\r\r\t| tempIvar labels actions lines alternatives binding userSelection choice action |\r\r\t\"Check if this is an i-var, that has been corrected already (ugly)\"\r\t(encoder classEncoding instVarNames includes: proposedVariable) ifTrue: [\r\t\t^LiteralVariableNode new \r\t\t\tname: proposedVariable index: (encoder classEncoding instVarNames indexOf: proposedVariable) - 1 type: 1;\r\t\t\tyourself ].\r\r\t\"If we can't ask the user for correction, make it undeclared\"\r\tself interactive \r\t\tifFalse: [ ^encoder undeclared: proposedVariable ].\r\r\t\"First check to see if the requestor knows anything about the variable\"\r\ttempIvar _ proposedVariable first isLowercase.\r\t(tempIvar and: [ (binding _ requestor bindingOf: proposedVariable) notNil ])\r\t\tifTrue: [ ^encoder global: binding name: proposedVariable ].\r\tuserSelection _ requestor selectionInterval.\r\trequestor selectFrom: spot first to: spot last.\r\trequestor select.\r\r\t\"Build the menu with alternatives\"\r\tlabels _ OrderedCollection new. actions _ OrderedCollection new. lines _ OrderedCollection new.\r\talternatives _ encoder possibleVariablesFor: proposedVariable.\r\ttempIvar \r\t\tifTrue: [ \r\t\t\tlabels add: 'declare temp'. \r\t\t\tactions add: [ self declareTempAndPaste: proposedVariable ].\r\t\t\tlabels add: 'declare instance'.\r\t\t\tactions add: [ self declareInstVar: proposedVariable ] ]\r\t\tifFalse: [ \r\t\t\tlabels add: 'define new class'.\r\t\t\tactions add: [self defineClass: proposedVariable].\r\t\t\tlabels add: 'declare global'.\r\t\t\tactions add: [ self declareGlobal: proposedVariable ].\r\t\t\tencoder classEncoding == UndefinedObject ifFalse: [ \r\t\t\t\tlabels add: 'declare class variable'.\r\t\t\t\tactions add: [ self declareClassVar: proposedVariable ] ] ].\r\tlines add: labels size.\r\talternatives do: [ :each | \r\t\tlabels add: each.\r\t\tactions add: [ \r\t\t\tself substituteWord: each wordInterval: spot offset: 0.\r\t\t\tencoder encodeVariable: each ] fixTemps ].\r\tlines add: labels size.\r\tlabels add: 'cancel'.\r\r\t\"Display the pop-up menu\"\r\tchoice _ (PopUpMenu labelArray: labels asArray lines: lines asArray)\r\t\tstartUpWithCaption: 'Unknown variable: ', proposedVariable, ' please correct, or cancel:'.\r\taction _ actions at: choice ifAbsent: [ ^self fail ].\r\r\t\"Execute the selected action\"\r\trequestor deselect.\r\trequestor selectInvisiblyFrom: userSelection first to: userSelection last.\r\t^action value! !\r\r!Parser methodsFor: 'error correction'!\rdeclareClassVar: name\r\t| sym class |\r\tsym _ name asSymbol.\r\tclass _ encoder classEncoding.\r\tclass _ class theNonMetaClass.\t\t\"not the metaclass\"\r\tclass addClassVarName: name.\r\t^ encoder global: (class classPool associationAt: sym)\r\t\t\tname: sym! !\r\r!Parser methodsFor: 'error correction'!\rdeclareGlobal: name\r\t| sym |\r\tsym _ name asSymbol.\r\tSmalltalk at: sym put: nil.\r\t^ encoder global: (Smalltalk associationAt: sym) name: sym! !\r\r!Parser methodsFor: 'error correction' stamp: 'rr 3/6/2004 16:07'!\rdeclareInstVar: name\r\t\" rr 3/6/2004 16:06 : adds the line to correctly compute the index. uncommented the option in \r\tthe caller.\"\r\t| index |\r\tencoder classEncoding addInstVarName: name.\r\tindex _ encoder classEncoding instVarNames indexOf: name.\r\tencoder classEncoding allSuperclassesDo: [:cls | index := index + cls instVarNames size].\r\t^LiteralVariableNode new\r\t\tname: name index: index - 1 type: 1;\r\t\tyourself\r\t\t! !\r\r!Parser methodsFor: 'error correction' stamp: 'RAA 6/5/2001 11:57'!\rdeclareTempAndPaste: name\r\t| insertion delta theTextString characterBeforeMark |\r\r\ttheTextString _ requestor text string.\r\tcharacterBeforeMark _ theTextString at: tempsMark-1 ifAbsent: [$ ].\r\t(theTextString at: tempsMark) = $| ifTrue: [\r  \t\t\"Paste it before the second vertical bar\"\r\t\tinsertion _ name, ' '.\r\t\tcharacterBeforeMark isSeparator ifFalse: [\finsertion _ ' ', insertion].\r\t\tdelta _ 0.\r\t] ifFalse: [\r\t\t\"No bars - insert some with CR, tab\"\r\t\tinsertion _ '| ' , name , ' |',String cr.\r\t\tdelta _ 2.\t\"the bar and CR\"\r\t\tcharacterBeforeMark = Character tab ifTrue: [\r\t\t\tinsertion _ insertion , String tab.\r\t\t\tdelta _ delta + 1.\t\"the tab\"\r\t\t].\r\t].\r\ttempsMark _ tempsMark +\r\t\t(self substituteWord: insertion\r\t\t\twordInterval: (tempsMark to: tempsMark-1)\r\t\t\toffset: 0) - delta.\r\t^ encoder bindAndJuggle: name! !\r\r!Parser methodsFor: 'error correction' stamp: 'rr 3/4/2004 10:57'!\rdefineClass: className \r\t\"prompts the user to define a new class,\r\tasks for it's category, and lets the users edit further\r\tthe definition\"\r\t| sym  cat def d2 |\r\tsym := className asSymbol.\r\tcat := FillInTheBlank request: 'Enter class category : ' initialAnswer: 'Unknown'.\r\tcat ifEmpty: [cat := 'Unknown'].\r\tdef := 'Object subclass: #', sym, '\r\t\tinstanceVariableNames: '''' \r\t\tclassVariableNames: ''''\r\t\tpoolDictionaries: ''''\r\t\tcategory: ''' , cat, ''''.\r\td2 := FillInTheBlank request: 'Edit class definition : ' initialAnswer: def.\r\td2 ifEmpty: [d2 := def].\r\tCompiler evaluate: d2.\r\t^ encoder global: (Smalltalk associationAt: sym) name: sym! !\r\r!Parser methodsFor: 'error correction'!\rqueryUndefined\r\t| varStart varName | \r\tvarName _ parseNode key.\r\tvarStart _ self endOfLastToken + requestorOffset - varName size + 1.\r\trequestor selectFrom: varStart to: varStart + varName size - 1; select.\r\t((PopUpMenu labels:\r'yes\rno') startUpWithCaption:\r\t\t((varName , ' appears to be\rundefined at this point.\rProceed anyway?') asText makeBoldFrom: 1 to: varName size))\r\t\t= 1 ifFalse: [^ self fail]! !\r\r!Parser methodsFor: 'error correction' stamp: 'sw 5/23/2001 13:55'!\rremoveUnusedTemps\r\t\"Scan for unused temp names, and prompt the user about the prospect of removing each one found\"\r\r\t| str end start madeChanges | \r\tmadeChanges _ false.\r\tstr _ requestor text string.\r\t((tempsMark between: 1 and: str size)\r\t\tand: [(str at: tempsMark) = $|]) ifFalse: [^ self].\r\tencoder unusedTempNames do:\r\t\t[:temp |\r\t\t((PopUpMenu labels: 'yes\\no' withCRs) startUpWithCaption:\r\t\t\t((temp , ' appears to be\runused in this method.\rOK to remove it?') asText makeBoldFrom: 1 to: temp size))\r\t\t\t= 1\r\t\tifTrue:\r\t\t[(encoder encodeVariable: temp) isUndefTemp\r\t\t\tifTrue:\r\t\t\t[end _ tempsMark.\r\t\t\t[\"Beginning at right temp marker...\"\r\t\t\tstart _ end - temp size + 1.\r\t\t\tend < temp size or: [temp = (str copyFrom: start to: end)\r\t\t\t\t\tand: [(str at: start-1) isSeparator & (str at: end+1) isSeparator]]]\r\t\t\twhileFalse:\r\t\t\t\t[\"Search left for the unused temp\"\r\t\t\t\tend _ requestor nextTokenFrom: end direction: -1].\r\t\t\tend < temp size ifFalse:\r\t\t\t\t[(str at: start-1) = $  ifTrue: [start _ start-1].\r\t\t\t\trequestor correctFrom: start to: end with: ''.\r\t\t\t\tstr _ str copyReplaceFrom: start to: end with: ''. \r\t\t\t\tmadeChanges _ true.\r\t\t\t\ttempsMark _ tempsMark - (end-start+1)]]\r\t\t\tifFalse:\r\t\t\t[self inform:\r'You''ll first have to remove the\rstatement where it''s stored into']]].\r\tmadeChanges ifTrue: [ParserRemovedUnusedTemps signal]! !\r\r!Parser methodsFor: 'error correction'!\rsubstituteSelector: selectorParts wordIntervals: spots\r\t\"Substitute the correctSelector into the (presuamed interactive) receiver.\"\r\t| offset |\r\toffset _ 0.\r\tselectorParts with: spots do:\r\t\t[ :word :interval |\r\t\toffset _ self substituteWord: word wordInterval: interval offset: offset ]\r! !\r\r!Parser methodsFor: 'error correction'!\rsubstituteWord: correctWord wordInterval: spot offset: o\r\t\"Substitute the correctSelector into the (presuamed interactive) receiver.\"\r\r\trequestor correctFrom: (spot first + o)\r\t\t\t\t\tto: (spot last + o)\r\t\t\t\t\twith: correctWord.\r\r\trequestorOffset _ requestorOffset + correctWord size - spot size.\r\t^ o + correctWord size - spot size! !\r\r\r!Parser methodsFor: 'private'!\raddComment\r\r\tparseNode ~~ nil\r\t\tifTrue: \r\t\t\t[parseNode comment: currentComment.\r\t\t\tcurrentComment _ nil]! !\r\r!Parser methodsFor: 'private'!\rinit: sourceStream notifying: req failBlock: aBlock\r\r\trequestor _ req.\r\tfailBlock _ aBlock.\r\tsuper scan: sourceStream.\r\tprevMark _ hereMark _ mark.\r\trequestorOffset _ 0.\r\tself advance! !\r\r!Parser methodsFor: 'private'!\rinitPattern: aString notifying: req return: aBlock\r\r\t| result |\r\tself\r\t\tinit: (ReadStream on: aString asString)\r\t\tnotifying: req\r\t\tfailBlock: [^nil].\r\tencoder _ self.\r\tresult _ aBlock value: (self pattern: false inContext: nil).\r\tencoder _ failBlock _ nil.  \"break cycles\"\r\t^result! !\r\r\r!Parser methodsFor: 'primitives'!\rallocateLiteral: lit\r\tencoder litIndex: lit! !\r\r!Parser methodsFor: 'primitives' stamp: 'md 11/14/2003 16:53'!\rexternalFunctionDeclaration\r\t\"Parse the function declaration for a call to an external library.\"\r\t| descriptorClass callType retType externalName args argType module fn |\r\tdescriptorClass _ Smalltalk at: #ExternalFunction ifAbsent:[nil].\r\tdescriptorClass == nil ifTrue:[^0].\r\tcallType _ descriptorClass callingConventionFor: here.\r\tcallType == nil ifTrue:[^0].\r\t\"Parse return type\"\r\tself advance.\r\tretType _ self externalType: descriptorClass.\r\tretType == nil ifTrue:[^self expected:'return type'].\r\t\"Parse function name or index\"\r\texternalName _ here.\r\t(self match: #string) \r\t\tifTrue:[externalName _ externalName asSymbol]\r\t\tifFalse:[(self match:#number) ifFalse:[^self expected:'function name or index']].\r\t(self matchToken:'(' asSymbol) ifFalse:[^self expected:'argument list'].\r\targs _ WriteStream on: Array new.\r\t[here == #')'] whileFalse:[\r\t\targType _ self externalType: descriptorClass.\r\t\targType == nil ifTrue:[^self expected:'argument'].\r\t\targType isVoid & argType isPointerType not ifFalse:[args nextPut: argType].\r\t].\r\t(self matchToken:')' asSymbol) ifFalse:[^self expected:')'].\r\t(self matchToken: 'module:') ifTrue:[\r\t\tmodule _ here.\r\t\t(self match: #string) ifFalse:[^self expected: 'String'].\r\t\tmodule _ module asSymbol].\r\tSmalltalk at: #ExternalLibraryFunction ifPresent:[:xfn|\r\t\tfn _ xfn name: externalName \r\t\t\t\tmodule: module \r\t\t\t\tcallType: callType\r\t\t\t\treturnType: retType\r\t\t\t\targumentTypes: args contents.\r\t\tself allocateLiteral: fn.\r\t].\r\t^120! !\r\r!Parser methodsFor: 'primitives' stamp: 'ar 12/2/1999 16:49'!\rexternalType: descriptorClass\r\t\"Parse an return an external type\"\r\t| xType |\r\txType _ descriptorClass atomicTypeNamed: here.\r\txType == nil ifTrue:[\"Look up from class scope\"\r\t\tSymbol hasInterned: here ifTrue:[:sym|\r\t\t\txType _ descriptorClass structTypeNamed: sym]].\r\txType == nil ifTrue:[\r\t\t\"Raise an error if user is there\"\r\t\tself interactive ifTrue:[^nil].\r\t\t\"otherwise go over it silently\"\r\t\txType _ descriptorClass forceTypeNamed: here].\r\tself advance.\r\t(self matchToken:#*)\r\t\tifTrue:[^xType asPointerType]\r\t\tifFalse:[^xType]! !\r\r!Parser methodsFor: 'primitives'!\rprimitive\r\t| n |\r\t(self matchToken: #<) ifFalse: [^ 0].\r\tn _ self primitiveDeclarations.\r\t(self matchToken: #>) ifFalse: [^ self expected: '>'].\r\t^ n! !\r\r!Parser methodsFor: 'primitives' stamp: 'ar 11/16/1999 22:01'!\rprimitiveDeclarations\r\t| prim module |\r\t(self matchToken: 'primitive:') ifFalse:[^self externalFunctionDeclaration].\r\tprim _ here.\r\t(self match: #number) ifTrue:[^prim].\t\"Indexed primitives\"\r\t(self match: #string) ifFalse:[^self expected:'Integer or String'].\r\t(self matchToken: 'module:') ifTrue:[\r\t\tmodule _ here.\r\t\t(self match: #string) ifFalse:[^self expected: 'String'].\r\t\tmodule _ module asSymbol].\r\t(self allocateLiteral: (Array with: module with: prim asSymbol with: 0 with: 0)).\r\t^117! !\rNotification subclass: #ParserRemovedUnusedTemps\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Compiler'!\rDisplayObject subclass: #Path\r\tinstanceVariableNames: 'form collectionOfPoints'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Paths'!\r!Path commentStamp: '<historical>' prior: 0!\rI am the abstract superclass of the Graphic spatial primitives. I represent an ordered sequence of Points. Spatial primitives are used to generate \"trajectories\" such as lines and circles.!\r\r\r!Path methodsFor: 'accessing'!\rat: index \r\t\"Answer the point on the receiver's path at position index.\"\r\r\t^collectionOfPoints at: index! !\r\r!Path methodsFor: 'accessing'!\rat: index put: aPoint \r\t\"Store the argument, aPoint, as the point on the receiver's path at position\r\tindex.\"\r\r\t^collectionOfPoints at: index put: aPoint! !\r\r!Path methodsFor: 'accessing'!\rfirst\r\t\"Answer the first point on the receiver's path; included to correspond to \r\tOrderedCollection protocol.\"\r\r\t^collectionOfPoints first! !\r\r!Path methodsFor: 'accessing'!\rfirstPoint\r\t\"Answer the first point on the receiver's path.\"\r\r\t^collectionOfPoints first! !\r\r!Path methodsFor: 'accessing'!\rfirstPoint: aPoint \r\t\"Replace the first element of the receiver with the new value aPoint. \r\tAnswer the argument aPoint.\"\r\r\tcollectionOfPoints at: 1 put: aPoint.\r\t^aPoint! !\r\r!Path methodsFor: 'accessing'!\rform\r\t\"Answer the receiver's form, or, if form is nil, then answer a 1 x 1 black \r\tform (a black dot).\"\r\r\t| aForm |\r\tform == nil\r\t\tifTrue: \r\t\t\t[aForm _ Form extent: 1 @ 1.\r\t\t\taForm fillBlack.\r\t\t\t^aForm]\r\t\tifFalse: \r\t\t\t[^form]! !\r\r!Path methodsFor: 'accessing'!\rform: aForm \r\t\"Make the argument, aForm, be the receiver's form.\"\r\r\tform _ aForm! !\r\r!Path methodsFor: 'accessing'!\rlast\r\t\"Answer the last point on the receiver's path; included to correspond to \r\tOrderedCollection protocol.\"\r\r\t^collectionOfPoints last! !\r\r!Path methodsFor: 'accessing'!\roffset\r\t\"There are basically two kinds of display objects in the system: those\r\tthat, when asked to transform themselves, create a new object; and those\r\tthat side effect themselves by maintaining a record of the transformation\r\trequest (typically an offset). Path, like Rectangle and Point, is a display\r\tobject of the first kind.\"\r\r\tself shouldNotImplement! !\r\r!Path methodsFor: 'accessing'!\rsecondPoint\r\t\"Answer the second element of the receiver.\"\r\r\t^collectionOfPoints at: 2! !\r\r!Path methodsFor: 'accessing'!\rsecondPoint: aPoint \r\t\"Replace the second element of the receiver with the new value aPoint. \r\tAnswer the argument aPoint.\"\r\r\tcollectionOfPoints at: 2 put: aPoint.\r\t^aPoint! !\r\r!Path methodsFor: 'accessing'!\rsize\r\t\"Answer the length of the receiver.\"\r\r\t^collectionOfPoints size! !\r\r!Path methodsFor: 'accessing'!\rthirdPoint\r\t\"Answer the third element of the receiver.\"\r\r\t^collectionOfPoints at: 3! !\r\r!Path methodsFor: 'accessing'!\rthirdPoint: aPoint \r\t\"Replace the third element of the receiver with the new value aPoint. \r\tAnswer the argument aPoint.\"\r\r\tcollectionOfPoints at: 3 put: aPoint.\r\t^aPoint! !\r\r\r!Path methodsFor: 'testing'!\risEmpty\r\r\t^collectionOfPoints isEmpty! !\r\r\r!Path methodsFor: 'displaying'!\rdisplayOn: aDisplayMedium at: aDisplayPoint clippingBox: clipRectangle rule: ruleInteger fillColor: aForm \r\t\"Display this Path--offset by aPoint, clipped by clipRect and the form \r\tassociated with this Path will be displayedr according to one of the sixteen \r\tfunctions of two logical variables (rule). Also the source form will be first \r\tanded with aForm as a mask. Does not effect the state of the Path\"\r\r\tcollectionOfPoints do: \r\t\t[:element | \r\t\tself form\r\t\t\tdisplayOn: aDisplayMedium\r\t\t\tat: element + aDisplayPoint\r\t\t\tclippingBox: clipRectangle\r\t\t\trule: ruleInteger\r\t\t\tfillColor: aForm]! !\r\r!Path methodsFor: 'displaying'!\rdisplayOn: aDisplayMedium transformation: displayTransformation clippingBox: clipRectangle rule: ruleInteger fillColor: aForm \r\t\"Displays this path, translated and scaled by aTransformation. Get the\r\tscaled and translated Path.\"\r\r\t| newPath transformedPath |\r\ttransformedPath _ displayTransformation applyTo: self.\r\tnewPath _ Path new.\r\ttransformedPath do: [:point | newPath add: point].\r\tnewPath form: self form.\r\tnewPath\r\t\tdisplayOn: aDisplayMedium\r\t\tat: 0 @ 0\r\t\tclippingBox: clipRectangle\r\t\trule: ruleInteger\r\t\tfillColor: aForm! !\r\r\r!Path methodsFor: 'display box access'!\rcomputeBoundingBox \r\t\"Refer to the comment in DisplayObject|computeBoundingBox.\"\r\r\t| box |\r\tbox _ Rectangle origin: (self at: 1) extent: 0 @ 0.\r\tcollectionOfPoints do: \r\t\t[:aPoint | box _ box merge: (Rectangle origin: aPoint extent: 0 @ 0)].\r\t^box! !\r\r\r!Path methodsFor: 'transforming' stamp: 'jrm 9/1/1999 21:26'!\rscaleBy: aPoint \r\t\"Answers a new Path scaled by aPoint. Does not affect the current data in \r\tthis Path.\"\r\r\t| newPath | \r\tnewPath _ self species new: self size. \r\tnewPath form: self form.\r\tcollectionOfPoints do: [:element | newPath add: (element scaleBy: aPoint)].\r\t^newPath! !\r\r!Path methodsFor: 'transforming' stamp: 'jrm 9/1/1999 21:28'!\rtranslateBy: aPoint \r\t\"Answers a new Path whose elements are translated by aPoint. Does not\r\taffect the elements of this Path.\"\r\r\t| newPath |\r\tnewPath _ self species new: self size.\r\tnewPath form: self form.\r\tcollectionOfPoints do: [:element | newPath add: (element translateBy: aPoint)].\r\t^newPath! !\r\r\r!Path methodsFor: 'adding'!\radd: aPoint \r\t\"Include aPoint as one of the receiver's elements.\"\r\r\tcollectionOfPoints add: aPoint! !\r\r\r!Path methodsFor: 'removing' stamp: 'di 4/4/2000 12:33'!\rremoveAllSuchThat: aBlock \r\t\"Evaluate aBlock for each element of the receiver.\r\tRemove each element for which aBlock evaluates to true.\"\r\r\tcollectionOfPoints removeAllSuchThat: aBlock.\r! !\r\r\r!Path methodsFor: 'enumerating'!\rcollect: aBlock \r\t\"Evaluate aBlock with each of the receiver's elements as the argument. \r\tCollect the resulting values into a path that is like the receiver. Answer \r\tthe new path.\"\r\r\t| newCollection |\r\tnewCollection _ collectionOfPoints collect: aBlock.\r\tnewCollection form: self form.\r\t^newCollection! !\r\r!Path methodsFor: 'enumerating'!\rselect: aBlock \r\t\"Evaluate aBlock with each of the receiver's elements as the argument. \r\tCollect into a new path like the receiver only those elements for which \r\taBlock evaluates to true. Answer the new path.\"\r\r\t| newCollection |\r\tnewCollection _ collectionOfPoints select: aBlock.\r\tnewCollection form: self form.\r\t^newCollection! !\r\r\r!Path methodsFor: 'private'!\rinitializeCollectionOfPoints\r\r\tcollectionOfPoints _ OrderedCollection new! !\r\r!Path methodsFor: 'private'!\rinitializeCollectionOfPoints: anInteger\r\r\tcollectionOfPoints _ OrderedCollection new: anInteger! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rPath class\r\tinstanceVariableNames: ''!\r\r!Path class methodsFor: 'instance creation'!\rnew\r\r\t^self basicNew initializeCollectionOfPoints! !\r\r!Path class methodsFor: 'instance creation'!\rnew: anInteger\r\r\t^self basicNew initializeCollectionOfPoints: anInteger! !\r\r\r!Path class methodsFor: 'examples'!\rexample\r\t\"Creates a Path from mousePoints and displays it several ways on the display screen. Messes up the display. For learning about class Path, just select the code below and execute it to create a path and see it redisplayed in another place on the screen. Each path displays using a different form. A path is indicated by pressing the red mouse button in a sequence; press any other mouse button to terminate. \"\r\r\t| aPath aForm pl fl flag |\r\taForm _ Form extent: 2 @ 40.\t\t\"creates a form one inch long\"\r\taForm fillBlack.\t\t\t\t\t\t\t\"turns it black\"\r\taPath _ Path new.\r\taPath form: aForm.\t\t\t\t\t\t\"use the long black form for displaying\"\r\tflag _ true.\r\t[flag]\r\t\twhileTrue: \r\t\t\t[Sensor waitButton.\r\t\t\tSensor redButtonPressed\r\t\t\t\tifTrue: \r\t\t\t\t\t[aPath add: Sensor waitButton.\r\t\t\t\t\tSensor waitNoButton.\r\t\t\t\t\taForm displayOn: Display at: aPath last]\r\t\t\t\tifFalse: [flag _ false]].\r\tDisplay fillWhite.\r\taPath displayOn: Display.\t\t\t\"the original path\"\r\tpl _ aPath translateBy: 0 @ 100.\r\tfl _ Form extent: 40 @ 40.\r\tfl fillGray.\r\tpl form: fl.\r\tpl displayOn: Display.\t\t\t\t\"the translated path\"\r\tSensor waitNoButton\r\r\t\"Path example\"! !\rBitBlt subclass: #Pen\r\tinstanceVariableNames: 'location direction penDown'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Graphics-Primitives'!\r!Pen commentStamp: '<historical>' prior: 0!\rMy instances can scribble on the screen or some other Form, drawing and printing at any angle. Since I am a BitBlt, the drawing can be done with an arbitary source Form.\r!\r\r\r!Pen methodsFor: 'initialize-release' stamp: 'jm 4/28/1998 04:02'!\rdefaultNib: widthInteger \r\t\"Nib is the tip of a pen. This sets up the pen, with a nib of width widthInteger. You can also set the shape of the pen nib using:\r\t\troundNib: widthInteger, or\r\t\tsquareNib: widthInteger, or\r\t\tsourceForm: aForm\"\r\"Example:\r\t| bic |\r\tbic _ Pen new sourceForm: Cursor normal.\r\tbic combinationRule: Form paint; turn: 90.\r\t10 timesRepeat: [bic down; go: 3; up; go: 10].\"\r\r\tself color: Color black.\r\tself squareNib: widthInteger.\r! !\r\r!Pen methodsFor: 'initialize-release' stamp: 'jm 4/28/1998 04:03'!\rroundNib: diameter\r\t\"Makes this pen draw with a round dot of the given diameter.\"\r\r\tself sourceForm: (Form dotOfSize: diameter).\r\tcombinationRule _ Form paint.\r! !\r\r!Pen methodsFor: 'initialize-release' stamp: 'jm 4/28/1998 04:03'!\rsquareNib: widthInteger \r\t\"Makes this pen draw with a square nib of the given width.\"\r\r\tself sourceForm: (Form extent: widthInteger @widthInteger) fillBlack.\r\tself combinationRule: Form over.  \"a bit faster than paint mode\"\r! !\r\r\r!Pen methodsFor: 'accessing' stamp: 'ssa 2/25/2008 19:58'!\rdestForm: aForm\r\r\tdestForm := aForm! !\r\r!Pen methodsFor: 'accessing'!\rdirection\r\t\"Answer the receiver's current direction. 0 is towards the top of the\r\tscreen.\"\r\r\t^direction! !\r\r!Pen methodsFor: 'accessing'!\rlocation\r\t\"Answer where the receiver is currently located.\"\r\r\t^location! !\r\r\r!Pen methodsFor: 'operations' stamp: 'jm 4/28/1998 03:40'!\rcolor: aColorOrInteger\r\t\"Set the pen to the given color or to a color chosen from a fixed set of colors.\"\r\r\t| count c |\r\taColorOrInteger isInteger\r\t\tifTrue: [\r\t\t\tdestForm depth = 1 ifTrue: [^ self fillColor: Color black].\r\t\t\tcount _ 19.  \"number of colors in color wheel\"\r\t\t\tc _ (Color red wheel: count) at: ((aColorOrInteger * 7) \\\\ count) + 1]\r\t\tifFalse: [c _ aColorOrInteger].  \"assume aColorOrInteger is a Color\"\r\tself fillColor: c.\r! !\r\r!Pen methodsFor: 'operations'!\rdown\r\t\"Set the state of the receiver's pen to down (drawing).\"\r\r\tpenDown _ true! !\r\r!Pen methodsFor: 'operations'!\rgo: distance \r\t\"Move the pen in its current direction a number of bits equal to the \r\targument, distance. If the pen is down, a line will be drawn using the \r\treceiver's form source as the shape of the drawing brush.\"\r\r\tself goto: (direction degreeCos @ direction degreeSin) * distance + location! !\r\r!Pen methodsFor: 'operations' stamp: 'di 11/4/97 20:11'!\rgoto: aPoint \r\t\"Move the receiver to position aPoint. If the pen is down, a line will be \r\tdrawn from the current position to the new one using the receiver's \r\tform source as the shape of the drawing brush. The receiver's set \r\tdirection does not change.\"\r\t| old |\r\told _ location.\r\tlocation _ aPoint.\r\tpenDown ifTrue: [self drawFrom: old rounded\r\t\t\t\t\t\t\t\tto: location rounded]\r\r\t\"NOTE:  This should be changed so it does NOT draw the first point, so as\r\tnot to overstrike at line junctions.  At the same time, place should draw\r\ta single dot if the pen is down, as should down (put-pen-down) if it\r\twas not down before.\"! !\r\r!Pen methodsFor: 'operations'!\rhome\r\t\"Place the receiver at the center of its frame.\"\r\tlocation _ destForm boundingBox center! !\r\r!Pen methodsFor: 'operations'!\rnorth\r\t\"Set the receiver's direction to facing toward the top of the display screen.\"\r\r\tdirection _ 270! !\r\r!Pen methodsFor: 'operations'!\rplace: aPoint \r\t\"Set the receiver at position aPoint. No lines are drawn.\"\r\r\tlocation _ aPoint! !\r\r!Pen methodsFor: 'operations' stamp: 'ar 5/28/2000 12:10'!\rprint: str withFont: font\r\t\"Print the given string in the given font at the current heading\"\r\t| lineStart form charStart rowStart scale wasDown bb pix |\r\tscale _ sourceForm width.\r\twasDown _ penDown.\r\tlineStart _ location.\r\tstr do:\r\t\t[:char |\r\t\tchar = Character cr ifTrue:\r\t\t\t[self place: lineStart; up; turn: 90; go: font height*scale; turn: -90; down]\r\t\tifFalse:\r\t\t\t[form _ font characterFormAt: char.\r\t\t\tcharStart _ location.\rwasDown ifTrue: [\r\t\t\tself up; turn: -90; go: font descent*scale; turn: 90; down.\r\t\t\t0 to: form height-1 do:\r\t\t\t\t[:y |\r\t\t\t\trowStart _ location.\r\t\t\t\tbb _ BitBlt current bitPeekerFromForm: form.\r\t\t\t\tpix _ RunArray newFrom:\r\t\t\t\t\t((0 to: form width-1) collect: [:x | bb pixelAt: x@y]).\r\t\t\t\tpix runs with: pix values do:\r\t\t\t\t\t[:run :value |\r\t\t\t\t\tvalue = 0\r\t\t\t\t\t\tifTrue: [self up; go: run*scale; down]\r\t\t\t\t\t\tifFalse: [self go: run*scale]].\r\t\t\t\tself place: rowStart; up; turn: 90; go: scale; turn: -90; down].\r].\r\t\t\tself place: charStart; up; go: form width*scale; down].\r\t\t\t].\r\twasDown ifFalse: [self up]\r\"\rDisplay restoreAfter:\r[Pen new squareNib: 2; color: Color red; turn: 45;\r\tprint: 'The owl and the pussycat went to sea\rin a beautiful pea green boat.' withFont: TextStyle defaultFont]\r\"! !\r\r!Pen methodsFor: 'operations'!\rturn: degrees \r\t\"Change the direction that the receiver faces by an amount equal to the \r\targument, degrees.\"\r\r\tdirection _ direction + degrees! !\r\r!Pen methodsFor: 'operations'!\rup\r\t\"Set the state of the receiver's pen to up (no drawing).\"\r\r\tpenDown _ false! !\r\r\r!Pen methodsFor: 'geometric designs' stamp: 'di 6/11/1998 22:01'!\rdragon: n  \"Display restoreAfter: [Display fillWhite. Pen new dragon: 10].\"\r\t\"Display restoreAfter: [Display fillWhite. 1 to: 4 do:\r\t\t\t\t[:i | Pen new color: i; turn: 90*i; dragon: 10]]\"\r\t\"Draw a dragon curve of order n in the center of the screen.\"\r\tn = 0\r\t\tifTrue: [self go: 5]\r\t\tifFalse: [n > 0\r\t\t\t\tifTrue: [self dragon: n - 1; turn: 90; dragon: 1 - n]\r\t\t\t\tifFalse: [self dragon: -1 - n; turn: -90; dragon: 1 + n]]\r! !\r\r!Pen methodsFor: 'geometric designs'!\rhilbert: n side: s \r\t\"Draw an nth level Hilbert curve with side length s in the center of the \r\tscreen. Write directly into the display's bitmap only. A Hilbert curve is \r\ta space-filling curve.\"\r\r\t| a m |\r\tn = 0 ifTrue: [^self turn: 180].\r\tn > 0\r\t\tifTrue: \r\t\t\t[a _ 90.\r\t\t\tm _ n - 1]\r\t\tifFalse: \r\t\t\t[a _ -90.\r\t\t\tm _ n + 1].\r\tself turn: a.\r\tself hilbert: 0 - m side: s.\r\tself turn: a; go: s.\r\tself hilbert: m side: s.\r\tself turn: 0 - a; go: s; turn: 0 - a.\r\tself hilbert: m side: s.\r\tself go: s; turn: a.\r\tself hilbert: 0 - m side: s.\r\tself turn: a\r\t\" \r\t(Pen new) hilbert: 3 side: 8. \r\t(Pen new sourceForm: Cursor wait) combinationRule: Form under; \r\thilbert: 3 side: 25.\r\t\"! !\r\r!Pen methodsFor: 'geometric designs'!\rhilberts: n   \"Display restoreAfter: [Display fillWhite.  Pen new hilberts: 5]\"\r\t\"Draws n levels of nested Hilbert curves\"\r\t| s |\r\tself up; turn: 90; go: 128; down.\r\t1 to: n do: \r\t\t[:i | \r\t\ts _ 256 bitShift: 0 - i.\r\t\tself defaultNib: n - i * 2 + 1.\r\t\tself color: i+1.\r\t\tself up; go: 0 - s / 2; turn: -90; go: s / 2; turn: 90; down.\r\t\tself hilbert: i side: s.\r\t\tself go: s.\r\t\tself hilbert: i side: s.\r\t\tself go: s]! !\r\r!Pen methodsFor: 'geometric designs'!\rmandala: npoints\r\t\"Display restoreAfter: [Pen new mandala: 30]\"\r\t\"On a circle of diameter d, place npoints number of points. Draw all \tpossible connecting lines between the circumferential points.\"\r\t| l points d |\r\tDisplay fillWhite.\r\td _ Display height-50.\r\tl _ 3.14 * d / npoints.\r\tself home; up; turn: -90; go: d // 2; turn: 90; go: 0 - l / 2; down.\r\tpoints _ Array new: npoints.\r\t1 to: npoints do: \r\t\t[:i | \r\t\tpoints at: i put: location rounded.\r\t\tself go: l; turn: 360.0 / npoints].\r\tnpoints // 2\r\t\tto: 1\r\t\tby: -1\r\t\tdo: \r\t\t\t[:i | \r\t\t\tself color: i.\r\t\t\t1 to: npoints do: \r\t\t\t\t[:j | \r\t\t\t\tself place: (points at: j).\r\t\t\t\tself goto: (points at: j + i - 1 \\\\ npoints + 1)]]\r! !\r\r!Pen methodsFor: 'geometric designs' stamp: 'jm 5/6/1998 22:26'!\rspiral: n angle: a \r\t\"Draw a double squiral (see Papert, MindStorms), where each design is made\r\tby moving the receiver a distance of n after turning the amount + or -a.\"\r\r\t1 to: n do: \r\t\t[:i | \r\t\tself color: i * 2.\r\t\tself go: i; turn: a]\r\"\r\tDisplay restoreAfter: [\r\t\tDisplay fillWhite. Pen new spiral: 200 angle: 89; home; spiral: 200 angle: -89].\r\"! !\r\r!Pen methodsFor: 'geometric designs' stamp: 'jm 8/1/97 11:42'!\rweb   \"Display restoreAfter: [Pen new web]\"\r\t\"Draw pretty web-like patterns from the mouse movement on the screen.\r\tPress the mouse button to draw, option-click to exit.\r\tBy Dan Ingalls and Mark Lentczner. \"\r\t| history newPoint ancientPoint lastPoint filter color |\r\t\"self erase.\"\r\tcolor _ 1.\r\t[ true ] whileTrue:\r\t\t[ history _ OrderedCollection new.\r\t\tSensor waitButton.\r\t\tSensor yellowButtonPressed ifTrue: [^ self].\r\t\tfilter _ lastPoint _ Sensor mousePoint.\r\t\t20 timesRepeat: [ history addLast: lastPoint ].\r\t\tself color: (color _ color + 1).\r\t\t[ Sensor redButtonPressed ] whileTrue: \r\t\t\t[ newPoint _ Sensor mousePoint.\r\t\t\t(newPoint = lastPoint) ifFalse:\r\t\t\t\t[ ancientPoint _ history removeFirst.\r\t\t\t\tfilter _ filter * 4 + newPoint // 5.\r\t\t\t\tself place: filter.\r\t\t\t\tself goto: ancientPoint.\r\t\t\t\tlastPoint _ newPoint.\r\t\t\t\thistory addLast: filter ] ] ]! !\r\r\r!Pen methodsFor: 'private' stamp: 'di 6/11/1998 16:09'!\rlocation: aPoint direction: aFloat penDown: aBoolean\r\tlocation _ aPoint.\r\tdirection _ aFloat.\r\tpenDown _ aBoolean! !\r\r!Pen methodsFor: 'private'!\rsourceForm: aForm\r\t(aForm depth = 1 and: [destForm depth > 1])\r\t\tifTrue: [\"Map 1-bit source to all ones for color mask\"\r\t\t\t\tcolorMap _ Bitmap with: 0 with: 16rFFFFFFFF]\r\t\tifFalse: [colorMap _ nil].\r\t^ super sourceForm: aForm! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rPen class\r\tinstanceVariableNames: ''!\r\r!Pen class methodsFor: 'instance creation'!\rnew\r\t^ self newOnForm: Display! !\r\r!Pen class methodsFor: 'instance creation'!\rnewOnForm: aForm\r\t| pen |\r\tpen _ super new.\r\tpen setDestForm: aForm.\r\tpen sourceOrigin: 0@0.\r\tpen home.\r\tpen defaultNib: 1.\r\tpen north.\r\tpen down.\r\t^ pen! !\r\r\r!Pen class methodsFor: 'examples' stamp: 'jm 5/6/1998 22:28'!\rexample\r\t\"Draw a spiral with a pen that is 2 pixels wide.\"\r\t\"Display restoreAfter: [Pen example]\"\r\r\t| bic |\r\tbic _ self new.\r\tbic defaultNib: 2.\r\tbic color: Color blue.\r\tbic combinationRule: Form over.\r\t1 to: 100 do: [:i | bic go: i*4. bic turn: 89].\r! !\r\r\r!Pen class methodsFor: 'tablet drawing examples' stamp: 'ar 5/14/2001 23:35'!\rfeltTip: width cellSize: cellSize\r\t\"Warning: This example potentially uses a large amount of memory--it creates a Form with cellSize squared bits for every Display pixel.\"\r\t\"In this example, all drawing is done into a large, monochrome Form and then scaled down onto the Display using smoothing. The larger the cell size, the more possible shades of gray can be generated, and the smoother the resulting line appears. A cell size of 8 yields 64 possible grays, while a cell size of 16 gives 256 levels, which is about the maximum number of grays that the human visual system can distinguish. The width parameter determines the maximum line thickness. Requires the optional tablet support primitives which may not be supported on all platforms. Works best in full screen mode. Shift-mouse to exit.\" \r\t\"Pen feltTip: 2.7 cellSize: 8\"\r\r\t| tabletScale bitForm pen warp p srcR dstR nibSize startP r |\r\ttabletScale _ self tabletScaleFactor.\r\tbitForm _ Form extent: Display extent * cellSize depth: 1.\r\tpen _ Pen newOnForm: bitForm.\r\tpen color: Color black.\r\twarp _ (WarpBlt current toForm: Display)\r\t\tsourceForm: bitForm;\r\t\tcolorMap: (bitForm colormapIfNeededFor: Display);\r\t\tcellSize: cellSize;\r\t\tcombinationRule: Form over.\r\tDisplay fillColor: Color white.\r\tDisplay restoreAfter: [\r\t\t[Sensor shiftPressed and: [Sensor anyButtonPressed]] whileFalse: [\r\t\t\tp _ (Sensor tabletPoint * cellSize * tabletScale) rounded.\r\t\t\tnibSize _ (Sensor tabletPressure * (cellSize * width)) rounded.\r\t\t     nibSize > 0\r\t\t\t\tifTrue: [\r\t\t\t\t\tpen squareNib: nibSize.\r\t\t\t\t\tstartP _ pen location.\r\t\t\t\t\tpen goto: p.\r\t\t\t\t\tr _ startP rect: pen location.\r\t\t\t\t\tdstR _ (r origin // cellSize) corner: ((r corner + nibSize + (cellSize - 1)) // cellSize).\r\t\t\t\t\tsrcR _ (dstR origin * cellSize) corner: (dstR corner * cellSize).\r\t\t\t\t\twarp copyQuad: srcR innerCorners toRect: dstR]\r\t\t\t\tifFalse: [\r\t\t\t\t\tpen place: p]]].\r! !\r\r!Pen class methodsFor: 'tablet drawing examples' stamp: 'jm 4/13/1999 11:20'!\rinkBrush\r\t\"Similar to simplePressurePen, but this example uses the average of the recent pen pressure values. The effect is that of a Japanese ink brush that comes up gradually off the paper as the brush is lifted, causing end (and beginning) of each stroke to taper. Requires the optional tablet support primitives which may not be supported on all platforms. Works best in full screen mode. Shift-mouse to exit.\" \r\t\"Pen inkBrush\"\r\r\t| tabletScale historyMSecs pressureHistory pen now currentPressure sum averagePressure p |\r\ttabletScale _ self tabletScaleFactor.\r\thistoryMSecs _ 120.\r\tpressureHistory _ OrderedCollection new.\r\tpen _ Pen newOnForm: Display.\r\tpen color: Color black.\r\tDisplay fillColor: Color white.\r\tDisplay restoreAfter: [\r\t\t[Sensor shiftPressed and: [Sensor anyButtonPressed]] whileFalse: [\r\t\t\t\"compute the average pressure over last historyMSecs milliseconds\"\r\t\t\tnow _ Time millisecondClockValue.\r\t\t\tcurrentPressure _ (20.0 * Sensor tabletPressure) rounded.\r\t\t\tpressureHistory addLast: (Array with: now with: currentPressure).\r\t\t\t[pressureHistory size > 0 and:\r\t\t\t [(pressureHistory first first + historyMSecs) < now]]\r\t\t\t\twhileTrue: [pressureHistory removeFirst].  \"prune old entries\"\r\t\t\tsum _ pressureHistory inject: 0 into: [:t :e | t + e last].\r\t\t\taveragePressure _ sum // pressureHistory size.\r\r\t\t\tp _ (Sensor tabletPoint * tabletScale) rounded.\r\t\t     averagePressure > 0\r\t\t\t\tifTrue: [\r\t\t\t\t\tpen roundNib: averagePressure.\r\t\t\t\t\tpen goto: p]\r\t\t\t\tifFalse: [\r\t\t\t\t\tpen place: p]]].\r! !\r\r!Pen class methodsFor: 'tablet drawing examples' stamp: 'jm 4/13/1999 11:13'!\rsimplePressurePen\r\t\"An example of using a pressure sensitive pen to control the thickness of the pen. This requires the optional tablet support primitives which may not be supported on all platforms. Works best in full screen mode. Shift-mouse to exit.\" \r\t\"Pen simplePressurePen\"\r\r\t| tabletScale pen pressure p |\r\ttabletScale _ self tabletScaleFactor.\r\tpen _ Pen newOnForm: Display.\r\tpen color: Color black.\r\tDisplay fillColor: Color white.\r\tDisplay restoreAfter: [\r\t\t[Sensor shiftPressed and: [Sensor anyButtonPressed]] whileFalse: [\r\t\t\tp _ (Sensor tabletPoint * tabletScale) rounded.\r\t\t\tpressure _ (15.0 * Sensor tabletPressure) rounded.\r\t\t     pressure > 0\r\t\t\t\tifTrue: [\r\t\t\t\t\tpen roundNib: pressure.\r\t\t\t\t\tpen goto: p]\r\t\t\t\tifFalse: [\r\t\t\t\t\tpen place: p]]].\r! !\r\r!Pen class methodsFor: 'tablet drawing examples' stamp: 'jm 4/13/1999 11:12'!\rtabletScaleFactor\r\t\"Answer a Point that scales tablet coordinates to Display coordinates, where the full extent of the tablet maps to the extent of the entire Display.\"\r\r\t| tabletExtent |\r\ttabletExtent _ Sensor tabletExtent.\r\t^ (Display width asFloat / tabletExtent x) @ (Display height asFloat / tabletExtent y)\r! !\r\r!Pen class methodsFor: 'tablet drawing examples' stamp: 'jm 4/12/1999 12:51'!\rtestMouseTracking\r\t\"A very simple example of drawing using the mouse. Compare the tracking speed of this example with that of testTabletTracking. Mouse down to draw a stroke, shift-mouse to exit.\" \r\t\"Pen testMouseTracking\"\r\r\t| pen p |\r\tpen _ Pen newOnForm: Display.\r\tpen roundNib: 8.\r\tpen color: Color black.\r\tDisplay fillColor: Color white.\r\tDisplay restoreAfter: [\r\t\t[Sensor shiftPressed and: [Sensor anyButtonPressed]] whileFalse: [\r\t\t\tp _ Sensor cursorPoint.\r\t\t     Sensor anyButtonPressed\r\t\t\t\tifTrue: [pen goto: p]\r\t\t\t\tifFalse: [\r\t\t\t\t\tpen color: Color random.\r\t\t\t\t\tpen place: p]]].\r! !\r\r!Pen class methodsFor: 'tablet drawing examples' stamp: 'jm 4/13/1999 11:21'!\rtestTabletTracking\r\t\"A very simple example of drawing using the pen of a digitizing tablet such as a Wacom ArtZ tablet. This requires the optional tablet support primitives which may not be supported on all platforms. Compare the tracking speed of this example with that of testMouseTracking. On a Macintosh, the tablet primitives provide roughly 120 samples/second versus only 60 mouse samples/second, and the difference is noticable. Works best in full screen mode. Mouse down to draw a stroke, shift-mouse to exit.\" \r\t\"Pen testTabletTracking\"\r\r\t| tabletScale pen p |\r\ttabletScale _ self tabletScaleFactor.\r\tpen _ Pen newOnForm: Display.\r\tpen roundNib: 8.\r\tpen color: Color black.\r\tDisplay fillColor: Color white.\r\tDisplay restoreAfter: [\r\t\t[Sensor shiftPressed and: [Sensor anyButtonPressed]] whileFalse: [\r\t\t\tp _ (Sensor tabletPoint * tabletScale) rounded.\r\t\t     Sensor tabletPressure > 0\r\t\t\t\tifTrue: [pen goto: p]\r\t\t\t\tifFalse: [\r\t\t\t\t\tpen color: Color random.\r\t\t\t\t\tpen place: p]]].\r! !\rController subclass: #PluggableButtonController\r\tinstanceVariableNames: 'selector arguments shownAsComplemented'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Pluggable Views'!\r!PluggableButtonController commentStamp: '<historical>' prior: 0!\rThe controller for Buttons.  Not meant to be used with buttons that have mouseOver feeback when the button is not pressed.  Use mouseEnter/mouseLeave for that. !\r\r\r!PluggableButtonController methodsFor: 'basic control sequence' stamp: 'acg 3/13/2000 08:49'!\rcontrolInitialize \r\t\"Provide feedback indicating that button has been entered with the mouse down. If triggerOnMouseDown is true, then do the button action on mouse down--and don't bother with the feedback since the action happens immediately.\"\r\r\tsensor anyButtonPressed ifFalse: [^ self].\r\tview triggerOnMouseDown\r\t\tifTrue: [sensor yellowButtonPressed \r\t\t\tifTrue: [self yellowButtonActivity]\r\t\t\tifFalse: [view performAction]]\r\t\tifFalse: [view toggleMouseOverFeedback.\r\t\t\t\t shownAsComplemented _ true]! !\r\r!PluggableButtonController methodsFor: 'basic control sequence' stamp: 'acg 3/13/2000 08:44'!\rcontrolTerminate \r\t\"Reverse the feedback displayed by controlInitialize, if any. Perform the button action if necessary.\"\r\r\tview ifNotNil:\r\t\t[view triggerOnMouseDown\r\t\t\tifFalse:\r\t\t\t\t[shownAsComplemented ifTrue: [view toggleMouseOverFeedback].\r\t\t\t\tself viewHasCursor ifTrue: [view performAction]]]! !\r\r\r!PluggableButtonController methodsFor: 'control defaults' stamp: 'sma 5/28/2000 16:29'!\rcontrolActivity \r\r\tshownAsComplemented ifNil: [^ self].\r\tshownAsComplemented = self viewHasCursor\r\t\tifFalse:\r\t\t\t[view ifNotNil: [view toggleMouseOverFeedback]. \r\t\t\tshownAsComplemented _ shownAsComplemented not]! !\r\r!PluggableButtonController methodsFor: 'control defaults' stamp: 'acg 3/13/2000 08:26'!\risControlActive \r\r\t^ sensor anyButtonPressed! !\r\r!PluggableButtonController methodsFor: 'control defaults' stamp: 'tk 4/29/1998 10:47'!\risControlWanted\r\r\t\"sensor flushKeyboard.\"\r\tself viewHasCursor & sensor anyButtonPressed ifFalse: [^ false].\r\tview askBeforeChanging\r\t\tifTrue: [^ model okToChange]  \"ask before changing\"\r\t\tifFalse: [^ true].\r! !\r\r\r!PluggableButtonController methodsFor: 'button activity' stamp: 'di 9/7/1999 08:44'!\ryellowButtonActivity\r\t\"Invoke the model's menu.  This is option-click, NOT the normal button press.\"\r\t| menu |\r\tmenu _ view getMenu: false.\r\tmenu == nil\r\t\tifTrue: [sensor waitNoButton]\r\t\tifFalse: [self terminateAndInitializeAround: [menu invokeOn: model]].\r! !\rView subclass: #PluggableButtonView\r\tinstanceVariableNames: 'label getStateSelector actionSelector getLabelSelector getMenuSelector shortcutCharacter askBeforeChanging triggerOnMouseDown complemented argumentsProvider argumentsSelector'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Pluggable Views'!\r!PluggableButtonView commentStamp: '<historical>' prior: 0!\rA PluggableButtonView is a combination of an indicator for a boolean value stored in its model and an action button. The action of a button is often, but not always, to toggle the boolean value that it shows. Its pluggable selectors are:\r\r\t\tgetStateSelector\t\tfetch a boolean value from the model\r\t\tactionSelector\t\tinvoke this button's action on the model\r\rEither of the above selectors can be nil, meaning that the model does not supply behavior for the given action, and the default behavior should be used. For example, if getStateSelector is nil, then this button shows the state of a read-only boolean that is always false.\r\rThe model informs a pluggable view of changes by sending #changed: to itself with getStateSelector as a parameter. The view tells the model when the button is pressed by sending actionSelector.\r\rOptions:\r\taskBeforeChanging\t\thave model ask user before allowing change that could lose edits\r\ttriggerOnMouseDown\tdo button action on mouse down (vs. up) transition\r\tshortcutCharacter\t\ta place to record an optional shortcut key\r\r!\r\r\r!PluggableButtonView methodsFor: 'initialize-release' stamp: 'jm 5/2/1998 15:20'!\rinitialize\r\r \tsuper initialize.\r\tlabel _ nil.\r\tgetStateSelector _ nil.\r\tactionSelector _ nil.\r\tgetLabelSelector _ nil.\r\tgetMenuSelector _ nil.\r\tshortcutCharacter _ nil.\r\taskBeforeChanging _ false.\r\ttriggerOnMouseDown _ false.\r\tcomplemented _ false.\r! !\r\r!PluggableButtonView methodsFor: 'initialize-release' stamp: 'sw 2/17/2002 05:32'!\ron: anObject getState: getStateSel action: actionSel getArguments: getArgumentsSel from: argsProvidor label: labelSel menu: menuSel\r\r\tself initialize.\r\tself model: anObject.\r\tgetStateSelector _ getStateSel.\r\tactionSelector _ actionSel.\r\targumentsSelector _ getArgumentsSel.\r\targumentsProvider _ argsProvidor.\r\tgetLabelSelector _ labelSel.\r\tgetMenuSelector _ menuSel! !\r\r!PluggableButtonView methodsFor: 'initialize-release' stamp: 'tk 4/29/1998 11:18'!\ron: anObject getState: getStateSel action: actionSel label: labelSel menu: menuSel\r\r\tself initialize.\r\tself model: anObject.\r\tgetStateSelector _ getStateSel.\r\tactionSelector _ actionSel.\r\tgetLabelSelector _ labelSel.\r\tgetMenuSelector _ menuSel.! !\r\r\r!PluggableButtonView methodsFor: 'accessing' stamp: 'jrm 6/1/1998 21:53'!\raction: aSymbol \r\t\"Set actionSelector to be the action defined by aSymbol.\"\r\r\tactionSelector _ aSymbol\r! !\r\r!PluggableButtonView methodsFor: 'accessing' stamp: 'jm 4/2/98 18:53'!\raskBeforeChanging\r\r\t^ askBeforeChanging\r! !\r\r!PluggableButtonView methodsFor: 'accessing' stamp: 'jm 4/7/98 19:17'!\raskBeforeChanging: aBoolean\r\t\"If this preference is turned on, then give the model an opportunity to ask the user before accepting a change that might cause unaccepted edits to be lost.\"\r\r\taskBeforeChanging _ aBoolean.\r! !\r\r!PluggableButtonView methodsFor: 'accessing' stamp: 'jm 4/2/98 17:38'!\rlabel\r\t\"Answer the DisplayObject used as this button's label.\"\r\r\t^ label\r! !\r\r!PluggableButtonView methodsFor: 'accessing' stamp: 'nk 4/17/2004 19:49'!\rlabel: aStringOrDisplayObject \r\t\"Label this button with the given String or DisplayObject.\"\r\r\t((aStringOrDisplayObject isKindOf: Paragraph)\r\tor: [aStringOrDisplayObject isForm])\r\t\tifTrue: [label _ aStringOrDisplayObject]\r\t\tifFalse: [label _ aStringOrDisplayObject asParagraph].\r\tself centerLabel.\r! !\r\r!PluggableButtonView methodsFor: 'accessing' stamp: 'jm 4/2/98 17:43'!\rshortcutCharacter\r\t\"Return the Character to be used as a shortcut to turn on this switch, or nil if this switch doesn't have a keyboard shortcut.\"\r\r\t^ shortcutCharacter\r! !\r\r!PluggableButtonView methodsFor: 'accessing' stamp: 'jm 4/2/98 17:43'!\rshortcutCharacter: aCharacter \r\t\"Set the character to be used as a keyboard shortcut for turning on this switch.\"\r\r\tshortcutCharacter _ aCharacter.\r! !\r\r!PluggableButtonView methodsFor: 'accessing' stamp: 'jm 4/2/98 19:26'!\rtriggerOnMouseDown\r\r\t^ triggerOnMouseDown\r! !\r\r!PluggableButtonView methodsFor: 'accessing' stamp: 'jm 4/7/98 19:16'!\rtriggerOnMouseDown: aBoolean\r\t\"If this preference is turned on, then trigger my action immediately when the mouse goes down.\"\r\r\ttriggerOnMouseDown _ aBoolean.\r! !\r\r\r!PluggableButtonView methodsFor: 'controller access' stamp: 'jm 4/2/98 17:39'!\rdefaultControllerClass \r\r\t^ PluggableButtonController\r! !\r\r\r!PluggableButtonView methodsFor: 'displaying' stamp: 'jm 4/2/98 18:49'!\rdeEmphasizeView \r\r\tself getModelState ifTrue: [self displayNormal].\r! !\r\r!PluggableButtonView methodsFor: 'displaying'!\rdisplay\r\t\"Sets the PluggableButtonView mode to 'normal', displays the border, displays the inside and, if its model is 'on', complements the inside.\"\r\r\tself displayBorder.\r\tself displayView.\r! !\r\r!PluggableButtonView methodsFor: 'displaying' stamp: 'jm 4/4/98 20:49'!\rdisplayComplemented\r\t\"Complement the receiver if it isn't already.\"\r\r\tcomplemented ifFalse: [\r\t\tcomplemented _ true.\r\t\tDisplay reverse: self insetDisplayBox].\r! !\r\r!PluggableButtonView methodsFor: 'displaying' stamp: 'jm 4/2/98 18:43'!\rdisplayNormal\r\t\"Complement the receiver if its mode is 'complemented'.\"\r\r\tcomplemented ifTrue: [\r\t\tcomplemented _ false.\r\t\tDisplay reverse: self insetDisplayBox].\r! !\r\r!PluggableButtonView methodsFor: 'displaying' stamp: 'acg 2/23/2000 00:18'!\rdisplayView\r\r\t\"Displays this switch and its label, if any.\"\r\r\tself clearInside.\r\tlabel ifNotNil: [\r\t\t(label isKindOf: Paragraph) ifTrue: [\r\t\t\tlabel foregroundColor: self foregroundColor\r\t\t\t\t backgroundColor: self backgroundColor].\r\t\tlabel displayOn: Display\r\t\t\t\tat: label boundingBox topLeft\r\t\t\t\tclippingBox: self insetDisplayBox].\r\tcomplemented _ false.! !\r\r!PluggableButtonView methodsFor: 'displaying' stamp: 'jm 4/4/98 20:41'!\remphasizeView \r\r\tself getModelState ifTrue: [self displayComplemented].\r! !\r\r!PluggableButtonView methodsFor: 'displaying' stamp: 'jm 4/5/98 12:54'!\rtoggleMouseOverFeedback\r\t\"Complement the label (or a portion of the displayBox if no label is defined) to show that the mouse is over this button. This feedback can be removed by a second call to this method.\"\r\r\tDisplay reverse: self insetDisplayBox fillColor: Color gray.\r\tDisplay reverse: (self insetDisplayBox insetBy: 2) fillColor: Color gray.\r! !\r\r\r!PluggableButtonView methodsFor: 'other' stamp: 'jm 4/7/98 19:12'!\rdefaultWindow\r\t\"Return a rectangle large enough to contain this button's label. If this button is label-less, just return the standard View default window.\"\r\r\tlabel == nil\r\t\tifTrue: [^ super defaultWindow]\r\t\tifFalse: [^ label boundingBox expandBy: 6].\r! !\r\r!PluggableButtonView methodsFor: 'other' stamp: 'sw 2/17/2002 05:32'!\rperformAction\r\t\"Inform the model that this button has been pressed. Sent by the controller when this button is pressed.\"\r\r\targumentsSelector\r\t\tifNil:\r\t\t\t[actionSelector ifNotNil:\r\t\t\t\t[model perform: actionSelector]]\r\t\tifNotNil:\r\t\t\t[model perform: actionSelector\r\t\t\t\twithArguments:\r\t\t\t\t\t(Array with: (argumentsProvider perform: argumentsSelector))]! !\r\r!PluggableButtonView methodsFor: 'other' stamp: 'tk 4/27/1998 21:23'!\rupdate: aParameter \r\r\taParameter == getLabelSelector ifTrue: [\r\t\tgetLabelSelector ifNotNil: [\r\t\t\tself label: (model perform: getLabelSelector).\r\t\t\tself displayView]].\r\tself getModelState \r\t\tifTrue: [self displayComplemented]\r\t\tifFalse: [self displayNormal].\r! !\r\r!PluggableButtonView methodsFor: 'other' stamp: 'jm 4/7/98 19:12'!\rwindow: aWindow\r\t\"Center my label when my window changes.\"\r\r\tsuper window: aWindow.\r\tself centerLabel.\r! !\r\r\r!PluggableButtonView methodsFor: 'private' stamp: 'nk 4/17/2004 19:49'!\rcenterAlignLabelWith: aPoint\r\t\"Align the center of the label with aPoint.\"\r\r\t| alignPt |\r\talignPt _ label boundingBox center.\r\t(label isKindOf: Paragraph) ifTrue: \r\t\t[alignPt _ alignPt + (0@(label textStyle leading))]. \r\t(label isForm)\r\t  ifTrue: [label offset: 0 @ 0].\r\tlabel align: alignPt with: aPoint\r! !\r\r!PluggableButtonView methodsFor: 'private' stamp: 'acg 2/23/2000 00:10'!\rcenterLabel\r\t\"If there is a label, align its center with the center of the insetDisplayBox\"\r\r\tlabel ifNotNil: \r\t\t[self centerAlignLabelWith: self insetDisplayBox center].\r! !\r\r!PluggableButtonView methodsFor: 'private' stamp: 'di 6/26/1998 11:04'!\rgetMenu: shiftKeyDown\r\t\"Answer the menu for this view, supplying an empty menu to be filled in. If the menu selector takes an extra argument, pass in the current state of the shift key.\"\r\r\t| menu |\r\tgetMenuSelector == nil ifTrue: [^ nil].\r\tmenu _ CustomMenu new.\r\tgetMenuSelector numArgs = 1\r\t\tifTrue: [^ model perform: getMenuSelector with: menu].\r\tgetMenuSelector numArgs = 2\r\t\tifTrue: [^ model perform: getMenuSelector with: menu with: shiftKeyDown].\r\t^ self error: 'The getMenuSelector must be a 1- or 2-keyword symbol'\r! !\r\r!PluggableButtonView methodsFor: 'private' stamp: 'jm 4/4/98 20:50'!\rgetModelState\r\t\"Answer the result of sending the receiver's model the getStateSelector message.\"\r\r\tgetStateSelector == nil\r\t\tifTrue: [^ false]\r\t\tifFalse: [^ model perform: getStateSelector].\r! !\r\r!PluggableButtonView methodsFor: 'private' stamp: 'acg 2/23/2000 00:09'!\rinsetDisplayBox\r\t\"Answer the receiver's inset display box. The inset display box is the \r\tintersection of the receiver's window, tranformed to display coordinates, \r\tand the inset display box of the superView, inset by the border width. \r\tThe inset display box represents the region of the display screen in \r\twhich the inside of the receiver (all except the border) is displayed. If \r\tthe receiver is totally clipped by the display screen and its superView, \r\tthe resulting Rectangle will be invalid.\"\r\r\tinsetDisplayBox ifNil: \r\t\t[insetDisplayBox _ self computeInsetDisplayBox.\r\t\t self centerLabel].\r\t^insetDisplayBox! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rPluggableButtonView class\r\tinstanceVariableNames: ''!\r\r!PluggableButtonView class methodsFor: 'instance creation' stamp: 'jm 8/14/1998 16:19'!\ron: anObject\r\r\t^ self on: anObject getState: #isOn action: #switch\r! !\r\r!PluggableButtonView class methodsFor: 'instance creation' stamp: 'tk 4/29/1998 11:19'!\ron: anObject getState: getStateSel action: actionSel\r\r\t^ self new\r\t\ton: anObject\r\t\tgetState: getStateSel\r\t\taction: actionSel\r\t\tlabel: nil\r\t\tmenu: nil! !\r\r!PluggableButtonView class methodsFor: 'instance creation' stamp: 'sumim 2/15/2002 17:18'!\ron: anObject getState: getStateSel action: actionSel getArguments: getArgumentsSel from: argsProvidor\r\r\t^ self new\r\t\ton: anObject\r\t\tgetState: getStateSel\r\t\taction: actionSel\r\t\tgetArguments: getArgumentsSel\r\t\tfrom: argsProvidor\r\t\tlabel: nil\r\t\tmenu: nil! !\r\r!PluggableButtonView class methodsFor: 'instance creation' stamp: 'tk 4/29/1998 11:19'!\ron: anObject getState: getStateSel action: actionSel label: labelSel\r\r\t^ self new\r\t\ton: anObject\r\t\tgetState: getStateSel\r\t\taction: actionSel\r\t\tlabel: labelSel\r\t\tmenu: nil! !\r\r!PluggableButtonView class methodsFor: 'instance creation' stamp: 'tk 4/29/1998 11:18'!\ron: anObject getState: getStateSel action: actionSel label: labelSel menu: menuSel\r\r\t^ self new\r\t\ton: anObject\r\t\tgetState: getStateSel\r\t\taction: actionSel\r\t\tlabel: labelSel\r\t\tmenu: menuSel! !\r\r\r!PluggableButtonView class methodsFor: 'example' stamp: 'jm 4/7/98 19:55'!\rexample\r\t\"PluggableButtonView example\"\r\r\t| s1 s2 s3 b1 b2 b3 topView |\r\ts1 _ Switch new.\r\ts2 _ Switch new turnOn.\r\ts3 _ Switch new.\r\ts2 onAction: [s3 turnOff].\r\ts3 onAction: [s2 turnOff].\r\tb1 _ (PluggableButtonView on: s1 getState: #isOn action: #switch) label: 'S1'.\r\tb2 _ (PluggableButtonView on: s2 getState: #isOn action: #turnOn) label: 'S2'.\r\tb3 _ (PluggableButtonView on: s3 getState: #isOn action: #turnOn) label: 'S3'.\r\tb1 borderWidth: 1.\r\tb2 borderWidth: 1.\r\tb3 borderWidth: 1.\r\ttopView _ StandardSystemView new\r\t\tlabel: 'Switch Test';\r\t\taddSubView: b1;\r\t\taddSubView: b2 toRightOf: b1;\r\t\taddSubView: b3 toRightOf: b2.\r\ttopView controller open.\r! !\rDictionary subclass: #PluggableDictionary\r\tinstanceVariableNames: 'hashBlock equalBlock'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Unordered'!\r!PluggableDictionary commentStamp: '<historical>' prior: 0!\rClass PluggableDictionary allows the redefinition of hashing and equality by clients. This is in particular useful if the clients know about specific properties of the objects stored in the dictionary. See the class comment of PluggableSet for an example.\r\rInstance variables:\r\thashBlock\t<BlockContext>\tA one argument block used for hashing the elements.\r\tequalBlock\t<BlockContext>\tA two argument block used for comparing the elements.\r!\r\r\r!PluggableDictionary methodsFor: 'accessing' stamp: 'ar 11/12/1998 18:46'!\requalBlock\r\t\"Return the block used for comparing the elements in the receiver.\"\r\t^equalBlock! !\r\r!PluggableDictionary methodsFor: 'accessing' stamp: 'ar 11/27/1998 23:55'!\requalBlock: aBlock\r\t\"Set a new equality block. The block must accept two arguments and return true if the argumets are considered to be equal, false otherwise\"\r\tequalBlock _ aBlock.! !\r\r!PluggableDictionary methodsFor: 'accessing' stamp: 'ar 11/12/1998 18:46'!\rhashBlock\r\t\"Return the block used for hashing the elements in the receiver.\"\r\t^hashBlock! !\r\r!PluggableDictionary methodsFor: 'accessing' stamp: 'ar 11/12/1998 18:46'!\rhashBlock: aBlock\r\t\"Set a new hash block. The block must accept one argument and must return the hash value of the given argument.\"\r\thashBlock _ aBlock.! !\r\r!PluggableDictionary methodsFor: 'accessing' stamp: 'dvf 6/10/2000\r19:34'!\rkeys\r\t\"Answer a Set containing the receiver's keys.\"\r\t| aSet |\r\taSet _ PluggableSet new: self size.\r\tself equalBlock ifNotNil: [aSet equalBlock: self equalBlock fixTemps].\r\tself hashBlock ifNotNil: [aSet hashBlock: self hashBlock fixTemps].\r\tself keysDo: [:key | aSet add: key].\r\t^ aSet! !\r\r\r!PluggableDictionary methodsFor: 'copying' stamp: 'ar 11/12/1998 18:48'!\rcopy\r\t^super copy postCopyBlocks! !\r\r!PluggableDictionary methodsFor: 'copying' stamp: 'dvf 6/10/2000 19:35'!\rpostCopyBlocks\r\thashBlock _ hashBlock copy.\r\tequalBlock _ equalBlock copy.\r\t\"Fix temps in case we're referring to outside stuff\"\r\thashBlock ifNotNil: [hashBlock fixTemps].\r\tequalBlock ifNotNil: [equalBlock fixTemps]! !\r\r\r!PluggableDictionary methodsFor: 'private' stamp: 'dvf 6/11/2000 01:33'!\rscanFor: anObject \r\t\"Scan the key array for the first slot containing either a nil\r(indicating \r\t  an empty slot) or an element that matches anObject. Answer the index \r\t  \r\tof that slot or zero if no slot is found. This  method will be\roverridden   \r\tin various subclasses that have different interpretations for matching \r \r\telements.\"\r\t| element start finish |\r\tstart _ (hashBlock ifNil: [anObject hash]\r\t\t\t\tifNotNil: [hashBlock value: anObject])\r\t\t\t\t\\\\ array size + 1.\r\tfinish _ array size.\r\t\"Search from (hash mod size) to the end.\"\r\tstart to: finish do: [:index | ((element _ array at: index) == nil or:\r[equalBlock ifNil: [element key = anObject]\r\t\t\t\tifNotNil: [equalBlock value: element key value: anObject]])\r\t\t\tifTrue: [^ index]].\r\t\"Search from 1 to where we started.\"\r\t1 to: start - 1 do: [:index | ((element _ array at: index) == nil or:\r[equalBlock ifNil: [element key = anObject]\r\t\t\t\tifNotNil: [equalBlock value: element key value: anObject]])\r\t\t\tifTrue: [^ index]].\r\t^ 0\"No match AND no empty slot\"! !\rFileList subclass: #PluggableFileList\r\tinstanceVariableNames: 'accepted fileFilterBlock canAcceptBlock validateBlock newFiles prompt resultBlock'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-FileList'!\r!PluggableFileList commentStamp: '<historical>' prior: 0!\rI am a model for a modal dialog akin to \"Standard File Services\" on various modern GUI operating systems.  My protocol includes some methods to maintain upward compatibility with StandardFileMenu, which I hope to replace.\r\rSample doIts:\r\r\t\"StandardFileDialog getFolder\"-- ask user to select folder, answer corresponding FileDirectory\r\t\"StandardFileDialog getFile\"\t-- ask user to select file, answer corresponding FileStream\r\t\"StandardFileDialog putFile\"\t-- ask user to create new file, answer FileStream\r\r  In addition to the instance variables inhereted from FileList, of which I am a subclass, I am pluggable via the following instance variables:\r\rprompt\t\t\t<String>\r\tDisplay a prompt between the buttons.\r\rresultBlock\t\t<BlockContext>\r\tPassed a file directory and a file name, answer the result to be answered by the dialog.\t\r\rcanAcceptBlock\t<BlockContext>\t\r\tAnswer whether the accept button should be \"active\"\r\rfileFilterBlock\t<BlockContext>\t\r\tPassed a file directory entry, answer whether the entry should be added to the list.  The list can be further filtered (but not expanded) by the user through the pattern.\r\rvalidateBlock\t<BlockContent>\r\tPassed a file directory entry, a file name and a collection of newly created files, answer whether the dialog selection is valid.  validateBlock is checked after the user has pressed accept, for example to ask if the user really meant to delete a file.\r\rnewFiles\t\t<OrderedCollection>\r\r\tnewFiles is an OrderedCollection of fileNames of files added by the user to the current directory since the user last entered same!\r\r\r!PluggableFileList methodsFor: 'initialize-release' stamp: 'acg 2/12/2000 21:44'!\rdefaultBackgroundColor\r\r\t^Color lightYellow! !\r\r!PluggableFileList methodsFor: 'initialize-release' stamp: 'acg 2/12/2000 14:52'!\rinitialize\r\r\tprompt _ 'Select File'.\r\tdirectory _ FileDirectory default.\r\tnewFiles _ OrderedCollection new.\r\tfileFilterBlock _ PluggableFileList allFilesAndFoldersFileFilter.\r\tcanAcceptBlock _ PluggableFileList fileNameSelectedAcceptBlock.\r\tresultBlock _ PluggableFileList pathNameResultBlock.\r\tvalidateBlock _ PluggableFileList checkExistingFileValidateBlock.\r! !\r\r!PluggableFileList methodsFor: 'initialize-release' stamp: 'acg 2/9/2000 01:28'!\ropen\r\r\t^self openLabel: directory pathName! !\r\r!PluggableFileList methodsFor: 'initialize-release' stamp: 'acg 2/19/2000 01:10'!\ropenLabel: aString\r\t\"Open a view of an instance of me.\"\r\t\"StandardFileDialog new open\"\r\t| topView volListView templateView fileListView fileStringView leftButtonView middleButtonView rightButtonView |\r\t\r\tself directory: directory.\r\ttopView _ (PluggableFileListView new)\r\t\tmodel: self.\r\r\tvolListView _ PluggableListView on: self\r\t\tlist: #volumeList\r\t\tselected: #volumeListIndex\r\t\tchangeSelected: #volumeListIndex:\r\t\tmenu: #volumeMenu:.\r\tvolListView autoDeselect: false.\r\tvolListView window: (0@0 extent: 80@45).\r\ttopView addSubView: volListView.\r\r\ttemplateView _ PluggableTextView on: self\r\t\ttext: #pattern\r\t\taccept: #pattern:.\r\ttemplateView askBeforeDiscardingEdits: false.\r\ttemplateView window: (0@0 extent: 80@15).\r\ttopView addSubView: templateView below: volListView.\r\r\tfileListView _ PluggableListView on: self\r\t\tlist: #fileList\r\t\tselected: #fileListIndex\r\t\tchangeSelected: #fileListIndex:\r\t\tmenu: #fileListMenu:.\r\tfileListView window: (0@0 extent: 120@60).\r\r\ttopView addSubView: fileListView toRightOf: volListView.\r\r\tfileListView controller terminateDuringSelect: true.  \"Pane to left may change under scrollbar\"\r\r\t\"fileStringView _ PluggableTextView on: self\r\t\ttext: #fileString\r\t\taccept: #fileString:.\r\tfileStringView askBeforeDiscardingEdits: false.\r\tfileStringView window: (0@0 extent: 200@15).\r\ttopView addSubView: fileStringView below: templateView.\"\r\tfileStringView _ templateView.\r\r\r\tleftButtonView _ PluggableButtonView \r\t\ton: self\r\t\tgetState: nil\r\t\taction: #leftButtonPressed.\r\tleftButtonView\r\t\tlabel: 'Cancel';\r\t\tbackgroundColor: Color red;\r\t\tborderWidth: 3;\r\t\twindow: (0@0 extent: 50@15).\r\r\tmiddleButtonView _ PluggableButtonView\r\t\ton: self\r\t\tgetState: nil\r\t\taction: nil.\r\tmiddleButtonView\r\t\tlabel: prompt;\r\t\twindow: (0@0 extent: 100@15);\r\t\tborderWidth: 1;\r\t\tcontroller: NoController new.\r\r\trightButtonView _ PluggableButtonView\r\t\ton: self\r\t\tgetState: nil\r\t\taction: #rightButtonPressed.\r\trightButtonView\r\t\tlabel: 'Accept';\r\t\tbackgroundColor: (self canAccept ifTrue: [Color green] ifFalse: [Color lightYellow]);\r\t\tborderWidth: (self canAccept ifTrue: [3] ifFalse: [1]);\r\t\twindow: (0@0 extent: 50@15).\r\tself canAccept ifFalse: [rightButtonView controller: NoController new].\r\r\ttopView acceptButtonView: rightButtonView.\r\r\ttopView\r\t\taddSubView: leftButtonView below: fileStringView;\r\t\taddSubView: middleButtonView toRightOf: leftButtonView;\r\t\taddSubView: rightButtonView toRightOf: middleButtonView.\r\r\tself changed: #getSelectionSel.\r\ttopView doModalDialog.\r\t\r\t^self result\r! !\r\r\r!PluggableFileList methodsFor: 'accessing' stamp: 'acg 2/13/2000 15:33'!\rbeAccepted\r\r\t^accepted _ true! !\r\r!PluggableFileList methodsFor: 'accessing' stamp: 'acg 2/9/2000 09:10'!\rcanAccept\r\r\t^canAcceptBlock value: directory value: fileName! !\r\r!PluggableFileList methodsFor: 'accessing' stamp: 'acg 2/9/2000 00:52'!\rcanAcceptBlock: aBlock\r\r\t^canAcceptBlock _ aBlock! !\r\r!PluggableFileList methodsFor: 'accessing' stamp: 'acg 2/9/2000 07:33'!\rfileFilterBlock: aBlock\r\r\t^fileFilterBlock _ aBlock! !\r\r!PluggableFileList methodsFor: 'accessing' stamp: 'acg 2/18/2000 21:21'!\rfileListIndex\r\r\tself changed: #fileString.\r\t^super fileListIndex! !\r\r!PluggableFileList methodsFor: 'accessing' stamp: 'acg 2/18/2000 21:21'!\rfileVolumeIndex\r\r\tself changed: #fileString.\r\t^super fileVolumeIndex! !\r\r!PluggableFileList methodsFor: 'accessing' stamp: 'acg 2/9/2000 00:28'!\rprompt: aString\r\r\t prompt _ aString! !\r\r!PluggableFileList methodsFor: 'accessing' stamp: 'acg 2/9/2000 00:31'!\rresultBlock: aBlock\r\r\t^resultBlock _ aBlock! !\r\r!PluggableFileList methodsFor: 'accessing' stamp: 'acg 2/13/2000 15:28'!\rvalidate\r\r\t^validateBlock value: directory value: fileName value: newFiles! !\r\r!PluggableFileList methodsFor: 'accessing' stamp: 'acg 2/10/2000 08:02'!\rvalidateBlock: aBlock\r\r\t^validateBlock _ aBlock! !\r\r\r!PluggableFileList methodsFor: 'accepting/cancelling' stamp: 'acg 2/9/2000 01:05'!\rleftButtonPressed\r\r\taccepted _ false.\r\tself changed: #close.\r! !\r\r!PluggableFileList methodsFor: 'accepting/cancelling' stamp: 'acg 2/14/2000 22:40'!\rleftButtonState\r\r\t^true! !\r\r!PluggableFileList methodsFor: 'accepting/cancelling' stamp: 'acg 2/9/2000 00:38'!\rresult\r\r\taccepted ifFalse: [^nil].\r\t^resultBlock value: directory value: fileName! !\r\r!PluggableFileList methodsFor: 'accepting/cancelling' stamp: 'acg 2/10/2000 07:58'!\rrightButtonPressed\r\r\t(canAcceptBlock value: directory value: fileName) ifFalse: [^nil].\r\t(validateBlock value: directory value: fileName value: newFiles) ifFalse: [^nil].\r\taccepted _ true.\r\tself changed: #close! !\r\r!PluggableFileList methodsFor: 'accepting/cancelling' stamp: 'acg 2/14/2000 22:43'!\rrightButtonState\r\r\t^self canAccept! !\r\r\r!PluggableFileList methodsFor: 'file list menu' stamp: 'acg 2/10/2000 07:47'!\raddNew: aString byEvaluating: aBlock\r\t\"A parameterization of earlier versions of #addNewDirectory and\r\t#addNewFile.  Fixes the bug in each that pushing the cancel button\r\tin the FillInTheBlank dialog gave a walkback.\"\r\r\t| response newName index ending |\r\tself okToChange ifFalse: [^ self].\r\t(response _ FillInTheBlank request: 'New ',aString,' Name?'\r \t\t\t\t\tinitialAnswer: aString,'Name')\r\t\tisEmpty ifTrue: [^ self].\r\tnewName _ response asFileName.\r\tCursor wait showWhile: [\r\t\taBlock value: newName].\r\tself updateFileList.\r\tindex _ list indexOf: newName.\r\tindex = 0 ifTrue: [ending _ ') ',newName.\r\t\tindex _ list findFirst: [:line | line endsWith: ending]].\r\tself fileListIndex: index.\r\tnewFiles add: newName\r! !\r\r!PluggableFileList methodsFor: 'file list menu' stamp: 'asm 8/25/2003 18:37'!\rfileSelectedMenu: aMenu\r\t| firstItems secondItems thirdItems n1 n2 n3 services |\r\tfirstItems _ self itemsForFile: self fullName asLowercase.\r\tsecondItems _ self itemsForAnyFile.\r\tthirdItems _ self itemsForNoFile.\r\tn1 _ firstItems size.\r\tn2 _ n1 + secondItems size.\r\tn3 _ n2 + thirdItems size.\r\tservices _ firstItems, secondItems, thirdItems, \r\t\t\t(OrderedCollection with: (SimpleServiceEntry provider: self label: 'more...' selector: #offerAllFileOptions)).\r\t^ aMenu \r\t\taddServices2: services \r\t\tfor: self\r\t\textraLines: (Array with: n1 with: n2 with: n3)\r! !\r\r!PluggableFileList methodsFor: 'file list menu' stamp: 'BG 12/13/2002 10:00'!\ritemsForNoFile\r\r   ^(OrderedCollection new: 5)\r        add: self serviceSortByName;\r        add: self serviceSortBySize;\r        add: self serviceSortByDate;\r        add: self serviceAddNewFile;\r        add: self serviceAddNewDirectory;\r        yourself! !\r\r!PluggableFileList methodsFor: 'file list menu' stamp: 'BG 10/29/2003 10:08'!\rlistForPattern: pat\r\t\"Make the list be those file names which match the pattern.\"\r\t| entries sizePad newList allFiles |\r\tentries _ directory entries select: fileFilterBlock.\r\tsizePad _ (entries inject: 0 into: [:mx :entry | mx max: (entry at: 5)])\r\t\t\t\t\tasStringWithCommas size - 1.\r\r\tnewList _ (SortedCollection new: 30) sortBlock: self sortBlock.\r\r\tallFiles _ pat = '*'.\r\tentries do:\r\t\t[:entry | \"<dirflag><name><creationTime><modificationTime><fileSize>\"\r\t\t(allFiles or: [entry isDirectory or: [pat match: entry first]]) ifTrue:\r\t\t\t[newList add: entry]].\r\r\tnewList _ newList collect: [ :e | self fileNameFormattedFrom: e sizePad: sizePad ].\r\r\tvolList size = 1 ifTrue:\r\t\t[\"Include known servers along with other desktop volumes\" \r\t\t^ newList asArray\" ,\r\t\t(ServerDirectory serverNames collect: [:n | '^' , n , self folderString])\"].\r\tnewFiles _ OrderedCollection new.\r\t^ newList asArray.! !\r\r\r!PluggableFileList methodsFor: 'file string' stamp: 'acg 2/18/2000 21:23'!\rfileString\r\r\tfileName ifNil: [^directory pathName].\r\t^directory fullNameFor: fileName! !\r\r!PluggableFileList methodsFor: 'file string' stamp: 'acg 2/19/2000 01:02'!\rfileString: aString\r\r\t\"| textName index ending |\r\ttextName _ aString asString.\r\t(FileDirectory default fileExists: textName) ifTrue:\r\t\t[self directory: (FileDirectory forFileName: textName).\r\t\t index _ list indexOf: (FileDirectory localNameFor: textName).\r\t\t index = 0 ifTrue: \r\t\t\t[ending _ ') ', (FileDirectory localNameFor: textName).\r\t\t  \t index _ list findFirst: [:line | line endsWith: ending]].\r\t\t self fileListIndex: index].\r\t(FileDirectory default directoryExists: textName) ifTrue:\r\t\t[self directory: (FileDirectory on: textName)].\"\r\tself changed: #fileString.\r\tself changed: #contents.\r\t^true! !\r\r\r!PluggableFileList methodsFor: 'StandardFileMenu' stamp: 'ar 3/18/2001 00:55'!\rstartUpWithCaption: captionOrNil\r\t\"Display the menu, slightly offset from the cursor,\r\tso that a slight tweak is required to confirm any action.\"\r\t^ self startUpWithCaption: captionOrNil at: (ActiveHand ifNil:[Sensor cursorPoint]).! !\r\r!PluggableFileList methodsFor: 'StandardFileMenu' stamp: 'acg 2/12/2000 15:35'!\rstartUpWithCaption: aString at: location\r\r\tself prompt: aString.\r\t^self open! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rPluggableFileList class\r\tinstanceVariableNames: ''!\r\r!PluggableFileList class methodsFor: 'instance creation' stamp: 'acg 2/12/2000 14:52'!\rgetFilePathNameDialog\r\r\t^(self new)\r\t\tvalidateBlock: PluggableFileList alwaysValidateBlock;\r\t\tyourself! !\r\r!PluggableFileList class methodsFor: 'instance creation' stamp: 'acg 2/12/2000 14:52'!\rgetFilePathNameDialogWithExistenceCheck\r\r\t^(self new)\r\t\tprompt: 'Select New File:';\r\t\tvalidateBlock: PluggableFileList checkExistingFileValidateBlock;\r\t\tyourself! !\r\r!PluggableFileList class methodsFor: 'instance creation' stamp: 'acg 2/12/2000 14:52'!\rgetFolderDialog\r\r\t^(self new)\r\t\tprompt: 'Select a Folder';\r\t\tfileFilterBlock: PluggableFileList allFoldersFileFilter;\r\t\tcanAcceptBlock: PluggableFileList alwaysAcceptBlock;\r\t\tresultBlock: PluggableFileList directoryResultBlock;\r\t\tvalidateBlock: PluggableFileList alwaysValidateBlock;\r\t\tyourself! !\r\r!PluggableFileList class methodsFor: 'instance creation' stamp: 'acg 2/9/2000 00:34'!\ropen\r\r\t^self new open! !\r\r\r!PluggableFileList class methodsFor: 'standard dialog operations' stamp: 'acg 2/10/2000 08:24'!\rgetFile\r\r\t| result |\r\tresult _ self getFilePathName.\r\t^result ifNotNil: [FileStream oldFileNamed: result]! !\r\r!PluggableFileList class methodsFor: 'standard dialog operations' stamp: 'acg 2/10/2000 08:31'!\rgetFilePathName\r\r\t^self getFilePathNameDialog open! !\r\r!PluggableFileList class methodsFor: 'standard dialog operations' stamp: 'acg 2/10/2000 08:29'!\rgetFilePathNameWithExistenceCheck\r\r\t^self getFilePathNameDialogWithExistenceCheck open! !\r\r!PluggableFileList class methodsFor: 'standard dialog operations' stamp: 'acg 2/9/2000 01:16'!\rgetFolder\r\r\t^self getFolderDialog open! !\r\r!PluggableFileList class methodsFor: 'standard dialog operations' stamp: 'acg 2/10/2000 08:29'!\rputFile\r\r\t| result |\r\tresult _ self getFilePathNameWithExistenceCheck.\r\t^result ifNotNil: \r\t\t[FileDirectory deleteFilePath: result.\r\t\t FileStream newFileNamed: result]! !\r\r\r!PluggableFileList class methodsFor: 'resultBlocks' stamp: 'acg 2/10/2000 08:19'!\rdirectoryResultBlock\r\r\t^[:theDirectory :theFileName | theDirectory]! !\r\r!PluggableFileList class methodsFor: 'resultBlocks' stamp: 'acg 2/10/2000 08:07'!\rfileNameResultBlock\r\r\t^[:theDirectory :theFileName | theFileName]! !\r\r!PluggableFileList class methodsFor: 'resultBlocks' stamp: 'acg 2/10/2000 08:07'!\rpathNameResultBlock\r\r\t^[:theDirectory :theFileName | \r\t\ttheFileName \r\t\t\tifNil: [theDirectory pathName]\r\t\t\tifNotNil: [theDirectory fullNameFor: theFileName]].\r! !\r\r!PluggableFileList class methodsFor: 'resultBlocks' stamp: 'acg 2/12/2000 15:08'!\rsfmResultBlock\r\r\t^[:theDirectory :theFileName | \r\t\tStandardFileMenuResult directory: theDirectory name: theFileName]! !\r\r\r!PluggableFileList class methodsFor: 'canAcceptBlocks' stamp: 'acg 2/10/2000 08:18'!\ralwaysAcceptBlock\r\r\t^[:theDirectory :theFileName | true]! !\r\r!PluggableFileList class methodsFor: 'canAcceptBlocks' stamp: 'acg 2/10/2000 08:10'!\rfileNameSelectedAcceptBlock\r\r\t^[:theDirectory :theFileName | theFileName isNil not]! !\r\r\r!PluggableFileList class methodsFor: 'validateBlocks' stamp: 'acg 2/10/2000 08:27'!\ralwaysValidateBlock\r\r\t^[:theDirectory :theFileName :theNewFiles | true].! !\r\r!PluggableFileList class methodsFor: 'validateBlocks' stamp: 'acg 2/12/2000 14:52'!\rcheckExistingFileValidateBlock\r\r\t^[:theDirectory :theFileName :theNewFiles | \r\t\t(theNewFiles includes: theFileName) or:\r\t\t\t[(PluggableFileList okToOverwrite: theFileName)]].! !\r\r!PluggableFileList class methodsFor: 'validateBlocks' stamp: 'acg 2/12/2000 14:52'!\rexistingFileValidateBlock\r\r\t^[:theDirectory :theFileName :theNewFiles | \r\t\t(theNewFiles includes: theFileName) or:\r\t\t\t[(PluggableFileList okToOverwrite: theFileName)]].! !\r\r!PluggableFileList class methodsFor: 'validateBlocks' stamp: 'acg 2/10/2000 08:05'!\rokToOpen: aFileNameString without: aSuffixString\r\r\t\"Answer whether user confirms that it is ok to overwrite the file named in aString\"\r\t^ 1 = ((PopUpMenu\r\t\tlabels:\r'overwrite that file\rselect another file')\r\t\tstartUpWithCaption: aFileNameString, '\ralready exists.')\r! !\r\r!PluggableFileList class methodsFor: 'validateBlocks' stamp: 'acg 2/10/2000 07:55'!\rokToOverwrite: aString\r\r\t\"Answer whether user confirms that it is ok to overwrite the file named in aString\"\r\t^ 1 = ((PopUpMenu\r\t\tlabels:\r'overwrite that file\rselect another file')\r\t\tstartUpWithCaption: aString, '\ralready exists.')\r! !\r\r\r!PluggableFileList class methodsFor: 'fileFilterBlocks' stamp: 'acg 2/10/2000 08:16'!\rallFilesAndFoldersFileFilter\r\r\t^[:each | true]! !\r\r!PluggableFileList class methodsFor: 'fileFilterBlocks' stamp: 'acg 2/10/2000 08:17'!\rallFoldersFileFilter\r\r\t^[:each | each isDirectory]! !\r\r\r!PluggableFileList class methodsFor: 'StandardFileMenu' stamp: 'BG 12/13/2002 15:31'!\rnewFileMenu: aDirectory\r\r\t\"For compatibility with StandardFileMenu for now, answer a StandardFileMenuResult\"\r\t^(self getFilePathNameDialogWithExistenceCheck)\r\t\tresultBlock: self sfmResultBlock;\r\t\tdirectory: aDirectory;\r\t\tyourself! !\r\r!PluggableFileList class methodsFor: 'StandardFileMenu' stamp: 'BG 12/13/2002 15:32'!\roldFileMenu: aDirectory\r\r\t\"For compatibility with StandardFileMenu for now, answer a StandardFileMenuResult\"\r\t^(self getFilePathNameDialog)\r\t\tresultBlock: self sfmResultBlock;\r\t\tdirectory: aDirectory;\r\t\tyourself! !\rModalSystemWindowView subclass: #PluggableFileListView\r\tinstanceVariableNames: 'acceptButtonView'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-FileList'!\r!PluggableFileListView commentStamp: '<historical>' prior: 0!\rI provide aview for PluggableFileList!\r\r\r!PluggableFileListView methodsFor: 'as yet unclassified' stamp: 'acg 2/9/2000 08:57'!\racceptButtonView: aView\r\r\t^acceptButtonView _ aView! !\r\r!PluggableFileListView methodsFor: 'as yet unclassified' stamp: 'acg 2/18/2000 20:52'!\rlabel: aString\r\r\tsuper label: aString.\r\tself noLabel! !\r\r!PluggableFileListView methodsFor: 'as yet unclassified' stamp: 'acg 2/9/2000 08:55'!\rupdate: aSymbol\r\t(aSymbol = #volumeListIndex or: [aSymbol = #fileListIndex])\r\t\tifTrue: [self updateAcceptButton].\r\t^super update: aSymbol! !\r\r!PluggableFileListView methodsFor: 'as yet unclassified' stamp: 'acg 2/9/2000 09:40'!\rupdateAcceptButton\r\r\tself model canAccept\r\t\tifTrue:\r\t\t\t[acceptButtonView\r\t\t\t\tbackgroundColor: Color green;\r\t\t\t\tborderWidth: 3;\r\t\t\t\tcontroller: acceptButtonView defaultController]\r\t\tifFalse:\r\t\t\t[acceptButtonView\r\t\t\t\tbackgroundColor: Color lightYellow;\r\t\t\t\tborderWidth: 1;\r\t\t\t\tcontroller: NoController new].\r\tacceptButtonView display.! !\rListController subclass: #PluggableListController\r\tinstanceVariableNames: 'terminateDuringSelect'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Pluggable Views'!\r\r!PluggableListController methodsFor: 'initialization' stamp: 'di 5/25/1998 10:15'!\rinitialize\r\tsuper initialize.\r\tself terminateDuringSelect: false! !\r\r\r!PluggableListController methodsFor: 'control defaults' stamp: 'tk 4/1/98 09:40'!\rredButtonActivity\r\tmodel okToChange   \"Don't change selection if model refuses to unlock\"\r\t\tifTrue: [^ super redButtonActivity]! !\r\r\r!PluggableListController methodsFor: 'private' stamp: 'di 5/25/1998 10:20'!\rchangeModelSelection: anInteger\r\t\"Let the view handle this.\"\r\r\tterminateDuringSelect ifTrue: [self controlTerminate].\r\tview changeModelSelection: anInteger.\r\tterminateDuringSelect ifTrue: [self controlInitialize].! !\r\r!PluggableListController methodsFor: 'private' stamp: 'sma 3/11/2000 15:38'!\rprocessKeyboard\r\tsensor keyboardPressed\r\t\tifTrue: [view handleKeystroke: sensor keyboard]\r\t\tifFalse: [super processKeyboard]! !\r\r!PluggableListController methodsFor: 'private' stamp: 'di 5/25/1998 10:14'!\rterminateDuringSelect: trueOrFalse\r\tterminateDuringSelect _ trueOrFalse! !\rPluggableListController subclass: #PluggableListControllerOfMany\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Pluggable Views'!\r\r!PluggableListControllerOfMany methodsFor: 'control defaults' stamp: 'tpr 10/4/2001 22:19'!\rredButtonActivity\r\t| selection firstHit turningOn lastSelection pt scrollFlag |\r\tmodel okToChange ifFalse: [^ self].\r\t\t\"Don't change selection if model refuses to unlock\"\r\tfirstHit _ true.\r\tscrollFlag _ false.\r\tlastSelection _ 0.\r\t[sensor redButtonPressed] whileTrue: \r\t\t[selection _ view findSelection: (pt _ sensor cursorPoint).\r\t\tselection == nil ifTrue:  \"Maybe out of box - check for auto-scroll\"\r\t\t\t[pt y < view insetDisplayBox top ifTrue:\r\t\t\t\t[self scrollView: view list lineGrid.\r\t\t\t\tscrollFlag _ true.\r\t\t\t\tselection _ view firstShown].\r\t\t\tpt y > view insetDisplayBox bottom ifTrue:\r\t\t\t\t[self scrollView: view list lineGrid negated.\r\t\t\t\tscrollFlag _ true.\r\t\t\t\tselection _ view lastShown]].\r\t\t(selection == nil or: [selection = lastSelection]) ifFalse: \r\t\t\t[firstHit ifTrue:\r\t\t\t\t[firstHit _ false.\r\t\t\t\tturningOn _ (view listSelectionAt: selection) not].\r\t\t\tview selection: selection.\r\t\t\t(view listSelectionAt: selection) == turningOn ifFalse:\r\t\t\t\t[view displaySelectionBox.\r\t\t\t\tview listSelectionAt: selection put: turningOn].\r\t\t\tlastSelection _ selection]].\r\tselection notNil ifTrue:\r\t\t[\"Normal protocol delivers change, so unchange first (ugh)\"\r\t\tview listSelectionAt: selection put: (view listSelectionAt: selection) not.\r\t\tself changeModelSelection: selection].\r\tscrollFlag ifTrue: [self moveMarker]! !\r\r\r!PluggableListControllerOfMany methodsFor: 'scrolling' stamp: 'tk 4/8/98 11:09'!\rscrollView: anInteger \r\t\"Need to minimize the selections which get recomputed\"\r\t| oldLimit |\r\toldLimit _ anInteger > 0\r\t\tifTrue: [view firstShown]\r\t\tifFalse: [view lastShown].\r\t(view scrollBy: anInteger)\r\t\tifTrue: [anInteger > 0  \"Highlight selections brought into view\"\r\t\t\t\t\tifTrue: [view highlightFrom: view firstShown\r\t\t\t\t\t\t\t\tto: (oldLimit-1 min: view lastShown)]\r\t\t\t\t\tifFalse: [view highlightFrom: (oldLimit+1 max: view firstShown)\r\t\t\t\t\t\t\t\tto: view lastShown].\r\t\t\t\t^ true]\r\t\tifFalse: [^ false]! !\rListView subclass: #PluggableListView\r\tinstanceVariableNames: 'getListSelector getSelectionSelector setSelectionSelector getMenuSelector getMenuTitleSelector keystrokeActionSelector autoDeselect items'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Pluggable Views'!\r!PluggableListView commentStamp: '<historical>' prior: 0!\rA pluggable list view gets its content from the model. This allows the same kind of view to be used in different situations, thus avoiding a proliferation of gratuitous view and controller classes. Selector usage is:\r\r\t\tgetListSel\t\tfetch the list of items (strings) to be displayed\r\t\tgetSelectionSel\tget the currently selected item\r\t\tsetSelectionSel\tset the currently selected item (takes an argument)\r\t\tgetMenuSel\t\tget the pane-specific, 'yellow-button' menu\r\t\tkeyActionSel\tprocess a keystroke typed in this pane (takes an argument)\r\r\tAny of the above selectors can be nil, meaning that the model does not supply behavior for the given action, and the default behavior should be used. However, if getListSel is nil, the default behavior just provides an empty list, which makes for a rather dull list view!!\r\r\tThe model informs a pluggable view of changes by sending #changed: to itself with getListSel or getSelectionSel as a parameter. The view informs the model of selection changes by sending setSelectionSel to it with the newly selected item as a parameter, and invokes menu and keyboard actions on the model via getMenuSel and keyActionSel.\r\r\tPluggability allows a single model object to have pluggable list views on multiple aspects of itself. For example, an object representing one personal music library might be organized as a three-level hierarchy: the types of music, the titles within a given type, and the songs on a given title. Pluggability allows one to easily build a multipane browser for this object with separate list views for the music type, title, and song.\r\r\tAutoDeselect is a feature, normally set to true, that will tell the model that there is no selection if you click on an item that is currently selected.  If autoDeselect is false, then the model will simply be told to select the same item again.!\r\r\r!PluggableListView methodsFor: 'initialization' stamp: 'di 4/10/98 09:56'!\rautoDeselect: trueOrFalse\r\t\"Enable/disable autoDeselect (see class comment)\"\r\tautoDeselect _ trueOrFalse.! !\r\r!PluggableListView methodsFor: 'initialization' stamp: 'jm 9/20/1998 19:48'!\rfont: aFontOrNil\r\r\tsuper font: aFontOrNil.\r\tself list: self getList.  \"update display\"\r! !\r\r!PluggableListView methodsFor: 'initialization' stamp: 'di 6/20/2001 09:58'!\rlist: arrayOfStrings\r\t\"Set the receivers items to be the given list of strings\r\tThe instance variable 'items' holds the original list. The instance variable 'list' is a paragraph constructed from this list.\"\r\r\t((items == arrayOfStrings) \"fastest\" or: [items = arrayOfStrings]) ifTrue: [^ self].\r\titems _ arrayOfStrings.\r\tisEmpty _ arrayOfStrings isEmpty.\r\r\t\"add top and bottom delimiters\"\r\tlist _ ListParagraph\r\t\twithArray:\r\t\t\t(Array streamContents: [:s |\r\t\t\t\ts nextPut: topDelimiter.\r\t\t\t\tarrayOfStrings do:\r\t\t\t\t\t[:item | item == nil ifFalse:\r\t\t\t\t\t\t[(item isMemberOf: MethodReference)  \"A very specific fix for MVC\"\r\t\t\t\t\t\t\tifTrue: [s nextPut: item asStringOrText]\r\t\t\t\t\t\t\tifFalse: [s nextPut: item]]].\r\t\t\t\ts nextPut: bottomDelimiter])\r\t\t style: self assuredTextStyle.\r\r\tselection _ self getCurrentSelectionIndex.\r\tself positionList.! !\r\r!PluggableListView methodsFor: 'initialization' stamp: 'tk 4/12/1998 08:25'!\rmenu: getMenuSel\r\r\tgetMenuSelector _ getMenuSel! !\r\r!PluggableListView methodsFor: 'initialization' stamp: 'sw 8/18/1998 12:04'!\rmenuTitleSelector: getMenuTitleSel\r\tgetMenuTitleSelector _ getMenuTitleSel! !\r\r!PluggableListView methodsFor: 'initialization' stamp: 'di 4/10/98 09:55'!\ron: anObject list: getListSel selected: getSelectionSel changeSelected: setSelectionSel menu: getMenuSel keystroke: keyActionSel\r\r\tself model: anObject.\r\tgetListSelector _ getListSel.\r\tgetSelectionSelector _ getSelectionSel.\r\tsetSelectionSelector _ setSelectionSel.\r\tgetMenuSelector _ getMenuSel.\r\tkeystrokeActionSelector _ keyActionSel.\r\tautoDeselect _ true.\r\tself borderWidth: 1.\r\tself list: self getList.! !\r\r\r!PluggableListView methodsFor: 'model access' stamp: 'di 5/6/1998 20:52'!\rchangeModelSelection: anInteger\r\t\"Change the model's selected item index to be anInteger.\"\r\t| newIndex |\r\tnewIndex _ anInteger.\r\t(autoDeselect == nil or: [autoDeselect]) ifTrue:\r\t\t[getSelectionSelector ifNotNil:\r\t\t\t[(model perform: getSelectionSelector) = anInteger ifTrue:\r\t\t\t\t[\"Click on existing selection deselects\"\r\t\t\t\tnewIndex _ 0]]].\r\r\tsetSelectionSelector ifNotNil:\r\t\t[model perform: setSelectionSelector with: newIndex].! !\r\r!PluggableListView methodsFor: 'model access' stamp: 'di 5/6/1998 20:52'!\rgetCurrentSelectionIndex\r\t\"Answer the index of the current selection.\"\r\r\tgetSelectionSelector == nil ifTrue: [^ 0].\r\t^ model perform: getSelectionSelector! !\r\r!PluggableListView methodsFor: 'model access'!\rgetList \r\t\"Answer the list to be displayed.\"\r\r\t| lst |\r\tgetListSelector == nil ifTrue: [^ #()].\r\tlst _ model perform: getListSelector.\r\tlst == nil ifTrue: [^ #()].\r\t^ lst! !\r\r!PluggableListView methodsFor: 'model access' stamp: 'tk 4/2/98 13:36'!\rgetListSelector\r\t^ getListSelector! !\r\r!PluggableListView methodsFor: 'model access' stamp: 'sw 8/18/1998 12:07'!\rgetMenu: shiftKeyDown\r\t\"Answer the menu for this text view, supplying an empty menu to be filled in. If the menu selector takes an extra argument, pass in the current state of the shift key.\"\r\t| menu aMenu |\r\tgetMenuSelector == nil ifTrue: [^ nil].\r\tmenu _ CustomMenu new.\r\tgetMenuSelector numArgs = 1\r\t\tifTrue:\r\t\t\t[aMenu _ model perform: getMenuSelector with: menu.\r\t\t\tgetMenuTitleSelector ifNotNil: [aMenu title: (model perform: getMenuTitleSelector)].\r\t\t\t^ aMenu].\r\tgetMenuSelector numArgs = 2\r\t\tifTrue: [aMenu _ model perform: getMenuSelector with: menu with: shiftKeyDown.\r\t\t\t\tgetMenuTitleSelector ifNotNil: [aMenu title: (model perform: getMenuTitleSelector)].\r\t\t\t\t^ aMenu].\r\t^ self error: 'The getMenuSelector must be a 1- or 2-keyword symbol'! !\r\r!PluggableListView methodsFor: 'model access' stamp: 'tk 4/21/1998 08:26'!\rhandleKeystroke: aCharacter\r\t\"Answer the menu for this list view.\"\r\r\t| args |\r\tkeystrokeActionSelector == nil ifTrue: [^ nil].\r\tcontroller controlTerminate.\r\t(args _ keystrokeActionSelector numArgs) = 1\r\t\tifTrue: [model perform: keystrokeActionSelector with: aCharacter.\r\t\t\t\t^ controller controlInitialize].\r\targs = 2\r\t\tifTrue: [model perform: keystrokeActionSelector with: aCharacter with: self.\r\t\t\t\t^ controller controlInitialize].\r\t^ self error: 'The keystrokeActionSelector must be a 1- or 2-keyword symbol'! !\r\r!PluggableListView methodsFor: 'model access' stamp: 'sw 10/9/1998 08:24'!\rsetSelectionSelectorIs: aSelector\r\t^ aSelector == setSelectionSelector! !\r\r\r!PluggableListView methodsFor: 'controller access' stamp: 'jm 3/11/98 17:17'!\rdefaultControllerClass \r\r\t^ PluggableListController\r! !\r\r\r!PluggableListView methodsFor: 'updating' stamp: 'di 5/25/1998 10:24'!\rupdate: aSymbol \r\t\"Refer to the comment in View|update:.\"\r\taSymbol == getListSelector ifTrue:\r\t\t[self list: self getList.\r\t\tself displayView.\r\t\tself displaySelectionBox.\r\t\t^self].\r\taSymbol == getSelectionSelector ifTrue:\r\t\t[^ self moveSelectionBox: self getCurrentSelectionIndex].\r! !\r\r!PluggableListView methodsFor: 'updating' stamp: 'BG 1/22/2004 13:15'!\rverifyContents\r\t| newItems existingSelection anIndex |\r\t\"Called on window reactivation to react to possible structural changes.  Update contents if necessary.\"\r\r\tnewItems _ self getList.\r\t((items == newItems) \"fastest\" or: [items = newItems]) ifTrue: [^ self].\r\tself flash.  \"list has changed beneath us; could get annoying, but hell\"\r\texistingSelection _ list stringAtLineNumber: (selection + (topDelimiter ifNil: [0] ifNotNil: [1])).  \"account for cursed ------ row\"\r\tself list: newItems.\r\r\t(newItems size > 0 and: [newItems first isKindOf: Symbol]) ifTrue:\r\t\t[existingSelection _ existingSelection asSymbol].\r\t(anIndex _ newItems indexOf: existingSelection ifAbsent: [nil])\r\t\tifNotNil:\r\t\t\t[model noteSelectionIndex: anIndex for: getListSelector.]\r\t\tifNil:\r\t\t\t[self changeModelSelection: 0].\r\tselection := 0. \" to display the list without selection \"\r\tself displayView.\r\tself update: getSelectionSelector.\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rPluggableListView class\r\tinstanceVariableNames: ''!\r\r!PluggableListView class methodsFor: 'instance creation' stamp: 'tk 4/17/1998 20:41'!\ron: anObject list: getListSel selected: getSelectionSel changeSelected: setSelectionSel\r\t\"Create a 'pluggable' list view on the given model parameterized by the given message selectors. See aboutPluggability comment.\"\r\r\t^ self new\r\t\ton: anObject\r\t\tlist: getListSel\r\t\tselected: getSelectionSel\r\t\tchangeSelected: setSelectionSel\r\t\tmenu: nil\r\t\tkeystroke: #arrowKey:from:\t\t\"default\"\r! !\r\r!PluggableListView class methodsFor: 'instance creation' stamp: 'tk 4/17/1998 20:41'!\ron: anObject list: getListSel selected: getSelectionSel changeSelected: setSelectionSel menu: getMenuSel\r\t\"Create a 'pluggable' list view on the given model parameterized by the given message selectors. See aboutPluggability comment.\"\r\r\t^ self new\r\t\ton: anObject\r\t\tlist: getListSel\r\t\tselected: getSelectionSel\r\t\tchangeSelected: setSelectionSel\r\t\tmenu: getMenuSel\r\t\tkeystroke: #arrowKey:from:\t\t\"default\"\r\r! !\r\r!PluggableListView class methodsFor: 'instance creation'!\ron: anObject list: getListSel selected: getSelectionSel changeSelected: setSelectionSel menu: getMenuSel keystroke: keyActionSel\r\t\"Create a 'pluggable' list view on the given model parameterized by the given message selectors. See aboutPluggability comment.\"\r\r\t^ self new\r\t\ton: anObject\r\t\tlist: getListSel\r\t\tselected: getSelectionSel\r\t\tchangeSelected: setSelectionSel\r\t\tmenu: getMenuSel\r\t\tkeystroke: keyActionSel\r! !\rPluggableListView subclass: #PluggableListViewByItem\r\tinstanceVariableNames: 'itemList'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Pluggable Views'!\r\r!PluggableListViewByItem methodsFor: 'as yet unclassified' stamp: 'di 5/6/1998 16:28'!\rchangeModelSelection: anInteger\r\t\"Change the model's selected item to be the one at the given index.\"\r\t| item |\r\tsetSelectionSelector ifNotNil: [\r\t\titem _ (anInteger = 0 ifTrue: [nil] ifFalse: [itemList at: anInteger]).\r\t\tmodel perform: setSelectionSelector with: item].\r! !\r\r!PluggableListViewByItem methodsFor: 'as yet unclassified' stamp: 'di 5/6/1998 16:27'!\rgetCurrentSelectionIndex\r\t\"Answer the index of the current selection.\"\r\t| item |\r\tgetSelectionSelector == nil ifTrue: [^ 0].\r\titem _ model perform: getSelectionSelector.\r\t^ itemList findFirst: [ :x | x = item]\r! !\r\r!PluggableListViewByItem methodsFor: 'as yet unclassified' stamp: 'sw 12/9/1999 18:07'!\rlist: arrayOfStrings\r\t\"Set the receivers items to be the given list of strings.\"\r\t\"Note: the instance variable 'items' holds the original list.\r\t The instance variable 'list' is a paragraph constructed from\r\t this list.\"\r\r\titemList _ arrayOfStrings.\r\tisEmpty _ arrayOfStrings isEmpty.\r\r\t\"add top and bottom delimiters\"\r\tlist _ ListParagraph\r\t\twithArray:\r\t\t\t(Array streamContents: [:s |\r\t\t\t\ts nextPut: topDelimiter.\r\t\t\t\tarrayOfStrings do: [:item | item == nil ifFalse: [s nextPut: item]].\r\t\t\t\ts nextPut: bottomDelimiter])\r\t\t style: self assuredTextStyle.\r\r\tselection _ self getCurrentSelectionIndex.\r\tself positionList.! !\rPluggableListView subclass: #PluggableListViewOfMany\r\tinstanceVariableNames: 'getSelectionListSelector setSelectionListSelector'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Pluggable Views'!\r\r!PluggableListViewOfMany methodsFor: 'displaying' stamp: 'tpr 10/4/2001 21:34'!\rdeEmphasizeView \r\t\"Refer to the comment in View|deEmphasizeView.\"\r\tselection _ 0.\r\t1 to: self maximumSelection do:\r\t\t[:i | selection _ i.\r\t\t(self listSelectionAt: i) ifTrue: [self deEmphasizeSelectionBox]].\r\tselection _ 0! !\r\r!PluggableListViewOfMany methodsFor: 'displaying' stamp: 'tpr 10/4/2001 21:34'!\rhighlightFrom: start to: stop\r\t(start == nil or: [stop == nil]) ifTrue: [^ self displayView].\r\tstart to: stop do:\r\t\t[:i | selection _ i.\r\t\t(self listSelectionAt: selection) ifTrue: [self displaySelectionBox]].\r\tselection _ 0! !\r\r!PluggableListViewOfMany methodsFor: 'displaying' stamp: 'tk 4/6/98 20:42'!\rscrollBy: anInteger\r\t\"This is a possible way to intercept what ListOfManyController did to get multiple selections to show.  Feel to replace this.\"\r\r\t| ans |\r\tans _ super scrollBy: anInteger.\r\"\tself displaySelectionBox.\"\r\t^ ans! !\r\r\r!PluggableListViewOfMany methodsFor: 'selecting' stamp: 'tpr 10/4/2001 22:17'!\rlistSelectionAt: index\r\tgetSelectionListSelector ifNil:[^false].\r\t^model perform: getSelectionListSelector with: index! !\r\r!PluggableListViewOfMany methodsFor: 'selecting' stamp: 'tpr 10/4/2001 22:17'!\rlistSelectionAt: index put: value\r\tsetSelectionListSelector ifNil:[^false].\r\t^model perform: setSelectionListSelector with: index with: value! !\r\r!PluggableListViewOfMany methodsFor: 'selecting' stamp: 'tk 4/6/98 15:43'!\rmoveSelectionBox: anInteger \r\t\"Presumably the selection has changed to be anInteger. Deselect the \r\tprevious selection and display the new one, highlighted.\"\r\tselection ~= anInteger\r\t\tifTrue: \r\t\t\t[selection _ anInteger.\r\t\t\tself displaySelectionBox]! !\r\r!PluggableListViewOfMany methodsFor: 'selecting' stamp: 'tk 4/6/98 15:43'!\rselection\r\t\"Have to override normal controller smarts about deselection\"\r\t^ 0! !\r\r\r!PluggableListViewOfMany methodsFor: 'updating' stamp: 'tk 4/8/98 13:12'!\rupdate: aSymbol \r\taSymbol == getListSelector\r\t\tifTrue: [self list: self getList.\r\t\t\t^ self displayView; emphasizeView].\r\taSymbol == getSelectionSelector\r\t\tifTrue: [^ self displayView; emphasizeView].\r\taSymbol == #allSelections\r\t\tifTrue: [^ self displayView; emphasizeView].\r\t^ super update: aSymbol! !\r\r\r!PluggableListViewOfMany methodsFor: 'controller access' stamp: 'di 5/17/1998 22:48'!\rdefaultControllerClass \r\r\t^ PluggableListControllerOfMany\r! !\r\r\r!PluggableListViewOfMany methodsFor: 'initialization' stamp: 'tpr 10/8/2001 20:53'!\ron: anObject list: listSel primarySelection: getSelectionSel changePrimarySelection: setSelectionSel listSelection: getListSel changeListSelection: setListSel menu: getMenuSel keystroke: keyActionSel\r\t\"setup a whole load of pluggability options\"\r\tgetSelectionListSelector _ getListSel.\r\tsetSelectionListSelector _ setListSel.\r\tsuper on: anObject list: listSel selected: getSelectionSel changeSelected: setSelectionSel menu: getMenuSel keystroke: keyActionSel\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rPluggableListViewOfMany class\r\tinstanceVariableNames: ''!\r\r!PluggableListViewOfMany class methodsFor: 'instance creation' stamp: 'tpr 10/8/2001 20:53'!\ron: anObject list: listSel primarySelection: getSelectionSel changePrimarySelection: setSelectionSel listSelection: getListSel changeListSelection: setListSel menu: getMenuSel\r\t^ self new\r\t\ton: anObject\r\t\tlist: listSel\r\t\tprimarySelection: getSelectionSel\r\t\tchangePrimarySelection: setSelectionSel\r\t\tlistSelection: getListSel\r\t\tchangeListSelection: setListSel\r\t\tmenu: getMenuSel\r\t\tkeystroke: #arrowKey:from:\t\t\"default\"! !\r\r!PluggableListViewOfMany class methodsFor: 'instance creation' stamp: 'tpr 10/8/2001 20:52'!\ron: anObject list: listSel primarySelection: getSelectionSel changePrimarySelection: setSelectionSel listSelection: getListSel changeListSelection: setListSel menu: getMenuSel keystroke: keyActionSel \r\t^ self new\r\t\ton: anObject\r\t\tlist: listSel\r\t\tprimarySelection: getSelectionSel\r\t\tchangePrimarySelection: setSelectionSel\r\t\tlistSelection: getListSel\r\t\tchangeListSelection: setListSel\r\t\tmenu: getMenuSel\r\t\tkeystroke: keyActionSel! !\rSet subclass: #PluggableSet\r\tinstanceVariableNames: 'hashBlock equalBlock'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Unordered'!\r!PluggableSet commentStamp: '<historical>' prior: 0!\rPluggableSets allow the redefinition of hashing and equality by clients. This is in particular useful if the clients know about specific properties of the objects stored in the set which in turn can heavily improve the performance of sets and dictionaries.\r\rInstance variables:\r\thashBlock\t<BlockContext>\tA one argument block used for hashing the elements.\r\tequalBlock\t<BlockContext>\tA two argument block used for comparing the elements.\r\rExample: Adding 1000 integer points in the range (0@0) to: (100@100) to a set.\r\r\t| rnd set max pt |\r\tset _ Set new: 1000.\r\trnd _ Random new.\r\tmax _ 100.\r\tTime millisecondsToRun:[\r\t\t1 to: 1000 do:[:i|\r\t\t\tpt _ (rnd next * max) truncated @ (rnd next * max) truncated.\r\t\t\tset add: pt.\r\t\t].\r\t].\r\rThe above is way slow since the default hashing function of points leads to an awful lot of collisions in the set. And now the same, with a somewhat different hash function:\r\r\t| rnd set max pt |\r\tset _ PluggableSet new: 1000.\r\tset hashBlock:[:item| (item x bitShift: 16) + item y].\r\trnd _ Random new.\r\tmax _ 100.\r\tTime millisecondsToRun:[\r\t\t1 to: 1000 do:[:i|\r\t\t\tpt _ (rnd next * max) truncated @ (rnd next * max) truncated.\r\t\t\tset add: pt.\r\t\t].\r\t].\r!\r\r\r!PluggableSet methodsFor: 'accessing' stamp: 'ar 11/12/1998 18:43'!\requalBlock\r\t\"Return the block used for comparing the elements in the receiver.\"\r\t^equalBlock! !\r\r!PluggableSet methodsFor: 'accessing' stamp: 'ar 11/27/1998 23:55'!\requalBlock: aBlock\r\t\"Set a new equality block. The block must accept two arguments and return true if the argumets are considered equal, false otherwise\"\r\tequalBlock _ aBlock.! !\r\r!PluggableSet methodsFor: 'accessing' stamp: 'ar 11/12/1998 18:43'!\rhashBlock\r\t\"Return the block used for hashing the elements in the receiver.\"\r\t^hashBlock! !\r\r!PluggableSet methodsFor: 'accessing' stamp: 'ar 11/12/1998 19:02'!\rhashBlock: aBlock\r\t\"Set a new hash block. The block must accept one argument and return the hash value of the given argument.\"\r\thashBlock _ aBlock.! !\r\r\r!PluggableSet methodsFor: 'copying' stamp: 'ar 11/12/1998 18:47'!\rcopy\r\t^super copy postCopyBlocks! !\r\r!PluggableSet methodsFor: 'copying' stamp: 'dvf 6/10/2000 19:34'!\rpostCopyBlocks\r\thashBlock _ hashBlock copy.\r\tequalBlock _ equalBlock copy.\r\t\"Fix temps in case we're referring to outside stuff\"\r\thashBlock ifNotNil: [hashBlock fixTemps].\r\tequalBlock ifNotNil: [equalBlock fixTemps]! !\r\r\r!PluggableSet methodsFor: 'private' stamp: 'dvf 6/11/2000 00:54'!\rscanFor: anObject \r\t\"Scan the key array for the first slot containing either a nil\r(indicating \r\t  an empty slot) or an element that matches anObject. Answer the index \r\t  \r\tof that slot or zero if no slot is found. This  method will be\roverridden   \r\tin various subclasses that have different interpretations for matching \r \r\telements.\"\r\t| element start finish |\r\tstart _ (hashBlock ifNil: [anObject hash]\r\t\t\t\tifNotNil: [hashBlock value: anObject])\r\t\t\t\t\\\\ array size + 1.\r\tfinish _ array size.\r\t\"Search from (hash mod size) to the end.\"\r\tstart to: finish do: [:index | ((element _ array at: index) == nil or:\r[equalBlock ifNil: [element = anObject]\r\t\t\t\tifNotNil: [equalBlock value: element value: anObject]])\r\t\t\tifTrue: [^ index]].\r\t\"Search from 1 to where we started.\"\r\t1 to: start - 1 do: [:index | ((element _ array at: index) == nil or:\r[equalBlock ifNil: [element = anObject]\r\t\t\t\tifNotNil: [equalBlock value: element value: anObject]])\r\t\t\tifTrue: [^ index]].\r\t^ 0\"No match AND no empty slot\"! !\rStringHolderController subclass: #PluggableTextController\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Pluggable Views'!\r\r!PluggableTextController methodsFor: 'transcript' stamp: 'di 6/3/1998 20:46'!\rappendEntry\r\t\"Append the text in the model's writeStream to the editable text. \"\r\tself deselect.\r\tparagraph text size > model characterLimit ifTrue:\r\t\t[\"Knock off first half of text\"\r\t\tself selectInvisiblyFrom: 1 to: paragraph text size // 2.\r\t\tself replaceSelectionWith: Text new].\r\tself selectInvisiblyFrom: paragraph text size + 1 to: paragraph text size.\r\tself replaceSelectionWith: model contents asText.\r\tself selectInvisiblyFrom: paragraph text size + 1 to: paragraph text size! !\r\r!PluggableTextController methodsFor: 'transcript' stamp: 'sma 3/15/2000 21:39'!\rbsText\r\tself changeText: (self text copyFrom: 1 to: (self text size - 1 max: 0))! !\r\r!PluggableTextController methodsFor: 'transcript' stamp: 'di 5/13/1998 14:16'!\rchangeText: aText\r\t\"The paragraph to be edited is changed to aText.\"\r\tparagraph text: aText.\r\tself resetState.\r\tself selectInvisiblyFrom: paragraph text size + 1 to: paragraph text size.\r\tself selectAndScroll.\r\tself deselect! !\r\r!PluggableTextController methodsFor: 'transcript' stamp: 'di 6/3/1998 20:42'!\rdoOccluded: actionBlock\r\t| paneRect rectSet bottomStrip |\r\tpaneRect _ paragraph clippingRectangle.\r\tparagraph withClippingRectangle: (paneRect withHeight: 0)\r\t\tdo: [actionBlock value.\r\t\t\tself scrollIn: paneRect].\r\tview topView isCollapsed ifTrue: [^ self].\r\trectSet _ self visibleAreas.\r\tbottomStrip _ paneRect withTop: paragraph compositionRectangle bottom + 1.\r\trectSet do:\r\t\t[:rect |\r\t\t(bottomStrip intersects: rect) ifTrue:\r\t\t\t[\"The subsequent displayOn should clear this strip but it doesnt\"\r\t\t\tDisplay fill: (bottomStrip intersect: rect)\r\t\t\t\t\tfillColor: paragraph backgroundColor].\r\t\tparagraph withClippingRectangle: rect\r\t\t\t\tdo: [paragraph displayOn: Display]]! !\r\r!PluggableTextController methodsFor: 'transcript' stamp: 'th 9/20/2002 11:26'!\rscrollIn: scrollRect\r\t\"Altered from selectAndScroll so can use with null clipRect\"\r\t\"Scroll until the selection is in the view and then highlight it.\"\r\t| deltaY |\r\tdeltaY _ self stopBlock top - scrollRect top.\r\tdeltaY >= 0 \r\t\tifTrue: [deltaY _ self stopBlock bottom - scrollRect bottom max: 0].\r\t\t\t\t\t\t\"check if stopIndex below bottom of scrollRect\"\r\tdeltaY ~= 0 \r\t\tifTrue: [self scrollBy: (deltaY abs + paragraph lineGrid - 1) * deltaY sign]! !\r\r!PluggableTextController methodsFor: 'transcript' stamp: 'di 5/7/1998 22:23'!\rvisibleAreas\r\t\"Transcript dependents last controller visibleAreas\"\r\t| visibleAreas rect remnants myTopController |\r\tmyTopController _ self view topView controller.\r\tvisibleAreas _ Array with: view insetDisplayBox.\r\tmyTopController view uncacheBits.\r\tScheduledControllers scheduledWindowControllers do:\r\t\t[:c | c == myTopController ifTrue: [^ visibleAreas].\r\t\trect _ c view windowBox.\r\t\tremnants _ OrderedCollection new.\r\t\tvisibleAreas do: [:a | remnants addAll: (a areasOutside: rect)].\r\t\tvisibleAreas _ remnants].\r\t^ visibleAreas! !\r\r\r!PluggableTextController methodsFor: 'as yet unclassified' stamp: 'dgd 9/21/2003 17:47'!\raccept \r\tview hasUnacceptedEdits ifFalse: [^ view flash].\r\tview hasEditingConflicts ifTrue:\r\t\t[(self confirm: \r'Caution!! This method may have been\rchanged elsewhere since you started\rediting it here.  Accept anyway?' translated) ifFalse: [^ self flash]].\r\r\t(view setText: paragraph text from: self) ifTrue:\r\t\t[initialText _ paragraph text copy.\r\t\tview ifNotNil: [view hasUnacceptedEdits: false]]    .\r! !\r\r!PluggableTextController methodsFor: 'as yet unclassified' stamp: 'tk 3/31/98 20:49'!\ruserHasEdited\r\t\"Note that the user has edited my text.\"\r\r\tview hasUnacceptedEdits: true! !\r\r!PluggableTextController methodsFor: 'as yet unclassified' stamp: 'tk 3/31/98 20:49'!\ruserHasNotEdited\r\t\"Note that my text is free of user edits.\"\r\r\tview hasUnacceptedEdits: false! !\r\r\r!PluggableTextController methodsFor: 'accessing-selection' stamp: 'th 9/19/2002 18:37'!\rselectForTopFrom: start to: stop\r\t\"Deselect, then select the specified characters inclusive.\r\t Be sure the selection is in view.\"\r\r\tself selectFrom: start to: stop scroll: #selectAndScrollToTop! !\r\r!PluggableTextController methodsFor: 'accessing-selection' stamp: 'th 9/19/2002 18:37'!\rselectFrom: start to: stop\r\t\"Deselect, then select the specified characters inclusive.\r\t Be sure the selection is in view.\"\r\r\tself selectFrom: start to: stop scroll: #selectAndScroll! !\r\r!PluggableTextController methodsFor: 'accessing-selection' stamp: 'th 9/19/2002 18:35'!\rselectFrom: start to: stop scroll: scrollCommand\r\t\"Deselect, then select the specified characters inclusive.\r\t Be sure the selection is in view.\"\r\r\t(start = self startIndex and: [stop + 1 = self stopIndex]) ifFalse:\r\t\t[view superView ifNotNil: [self deselect].\r\t\tself selectInvisiblyFrom: start to: stop].\r\tview superView ifNotNil: [self perform: scrollCommand]! !\rStringHolderView subclass: #PluggableTextView\r\tinstanceVariableNames: 'getTextSelector setTextSelector getSelectionSelector getMenuSelector hasEditingConflicts'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Pluggable Views'!\r!PluggableTextView commentStamp: '<historical>' prior: 0!\rA PluggableTextView gets its content from the model. This allows the same kind of view to be used in different situations, thus avoiding a proliferation of gratuitous view and controller classes. See the class comment for PluggableListView.\r\rSelectors are:\r\r\t\tgetTextSel\t\tfetch the original text from the model\r\t\tsetTextSel\t\tsubmit new text to the model when user \"accepts\"\r\t\tgetSelectionSel\tget the current text selection range\r\t\tgetMenuSel\t\tget the pane-specific, 'yellow-button' menu\r\r\tAny of the above selectors can be nil, meaning that the model does not supply behavior for the given action, and the default behavior should be used. For example, if setTextSel is nil then this view is consider read-only.\r\r\tThe model informs a pluggable view of changes by sending #changed: to itself with getTextSel as a parameter. The view informs the model of selection changes by sending setTextSel to it with the newly selected item as a parameter, and invokes menu actions on the model via getMenuSel.\r!\r\r\r!PluggableTextView methodsFor: 'initialization' stamp: 'jm 3/29/98 07:24'!\rdefaultControllerClass \r\r\t^ PluggableTextController\r! !\r\r!PluggableTextView methodsFor: 'initialization' stamp: 'sw 10/29/1999 21:02'!\rinitialize \r\tsuper initialize.\r\thasEditingConflicts _ false! !\r\r!PluggableTextView methodsFor: 'initialization' stamp: 'tk 4/6/98 10:51'!\ron: anObject text: getTextSel accept: setTextSel readSelection: getSelectionSel menu: getMenuSel\r\r\tself model: anObject.\r\tgetTextSelector _ getTextSel.\r\tsetTextSelector _ setTextSel.\r\tgetSelectionSelector _ getSelectionSel.\r\tgetMenuSelector _ getMenuSel.\r\tself borderWidth: 1.\r\tself editString: self getText.\r\tself setSelection: self getSelection.\r\r! !\r\r!PluggableTextView methodsFor: 'initialization' stamp: 'jm 3/29/98 07:25'!\rsetSelection: sel\r\r\tcontroller selectFrom: sel first to: sel last.\r! !\r\r\r!PluggableTextView methodsFor: 'model access' stamp: 'di 6/26/1998 11:06'!\rgetMenu: shiftKeyDown\r\t\"Answer the menu for this text view, supplying an empty menu to be filled in. If the menu selector takes an extra argument, pass in the current state of the shift key.\"\r\r\t| menu |\r\tgetMenuSelector == nil ifTrue: [^ nil].\r\tmenu _ CustomMenu new.\r\tgetMenuSelector numArgs = 1\r\t\tifTrue: [^ model perform: getMenuSelector with: menu].\r\tgetMenuSelector numArgs = 2\r\t\tifTrue: [^ model perform: getMenuSelector with: menu with: shiftKeyDown].\r\t^ self error: 'The getMenuSelector must be a 1- or 2-keyword symbol'! !\r\r!PluggableTextView methodsFor: 'model access' stamp: 'sw 1/16/1999 14:31'!\rgetSelection\r\t\"Answer the model's selection interval.\"\r\r\tgetSelectionSelector == nil ifTrue: [^ 1 to: 0].  \"null selection\"\r\t^ getSelectionSelector ifNotNil: [model perform: getSelectionSelector]\r! !\r\r!PluggableTextView methodsFor: 'model access' stamp: 'tk 4/1/98 08:32'!\rgetText \r\t\"Answer the list to be displayed.\"\r\t| txt |\r\tgetTextSelector == nil ifTrue: [^ Text new].\r\ttxt _ model perform: getTextSelector.\r\ttxt == nil ifTrue: [^ Text new].\r\tself hasUnacceptedEdits: false.\t\"clean now\"\r\t^ txt! !\r\r!PluggableTextView methodsFor: 'model access' stamp: 'tk 3/31/98 15:58'!\rgetTextSelector\r\t\"This is sent to the model to find out what text to display\"\r\r\t^ getTextSelector! !\r\r!PluggableTextView methodsFor: 'model access' stamp: 'jm 5/3/1998 19:29'!\risReadOnlyView\r\r\t^ setTextSelector == nil\r! !\r\r!PluggableTextView methodsFor: 'model access' stamp: 'jm\r 8/20/1998 11:55'!\rmodel: aLockedModel \r\t\"Refer to the comment in View|model:.\"\r \r\tself model: aLockedModel controller: controller.\r\tself editString: self getText.\r! !\r\r!PluggableTextView methodsFor: 'model access' stamp: 'di 3/10/98 13:51'!\rsetText: textToAccept from: ctlr\r\t\"Inform the model of text to be accepted, and return true if OK.\r\tAny errors should be reported to the controller, ctlr.\"\r\tsetTextSelector == nil ifTrue: [^ true].\r\tsetTextSelector numArgs = 2\r\t\tifTrue: [^ model perform: setTextSelector with: textToAccept with: ctlr]\r\t\tifFalse: [^ model perform: setTextSelector with: textToAccept]! !\r\r!PluggableTextView methodsFor: 'model access' stamp: 'di 4/27/1998 12:46'!\rupdateDisplayContents\r\r\tself editString: self getText.\r\tself displayView.\r\tself setSelection: self getSelection.\r! !\r\r\r!PluggableTextView methodsFor: 'updating' stamp: 'sw 10/29/1999 21:03'!\rhasEditingConflicts\r\t\"Return true if a conflicting edit to the same code (typically) is known to have occurred after the current contents started getting edited\"\r\r\t^ hasEditingConflicts == true! !\r\r!PluggableTextView methodsFor: 'updating' stamp: 'sw 10/29/1999 21:04'!\rhasEditingConflicts: aBoolean\r\thasEditingConflicts _ aBoolean! !\r\r!PluggableTextView methodsFor: 'updating' stamp: 'sw 10/29/1999 21:04'!\rhasUnacceptedEdits: aBoolean\r\tsuper hasUnacceptedEdits: aBoolean.\r\taBoolean ifFalse: [hasEditingConflicts _ false]! !\r\r!PluggableTextView methodsFor: 'updating' stamp: 'tk 5/23/2001 12:26'!\rupdate: aSymbol\r\t\"Refer to the comment in View|update:. Do nothing if the given symbol does not match any action. \"\r\r\taSymbol == #wantToChange ifTrue:\r\t\t\t[self canDiscardEdits ifFalse: [self promptForCancel].  ^ self].\r\taSymbol == #flash ifTrue: [^ controller flash].\r\taSymbol == getTextSelector ifTrue: [^ self updateDisplayContents].\r\taSymbol == getSelectionSelector ifTrue: [^ self setSelection: self getSelection].\r\taSymbol == #clearUserEdits ifTrue: [^ self hasUnacceptedEdits: false].\r\t(aSymbol == #autoSelect and: [getSelectionSelector ~~ nil]) ifTrue:\r\t\t\t[ParagraphEditor abandonChangeText.\t\"no replacement!!\"\r\t\t\t^ controller setSearch: model autoSelectString;\r\t\t\t\t\tagainOrSame: true].\r\taSymbol == #appendEntry ifTrue:\r\t\t\t[^ controller doOccluded: [controller appendEntry]].\r\taSymbol == #clearText ifTrue:\r\t\t\t[^ controller doOccluded:\r\t\t\t\t[controller changeText: Text new]].\r\taSymbol == #bs ifTrue:\r\t\t\t[^ controller doOccluded:\r\t\t\t\t[controller bsText]].\r\taSymbol == #codeChangedElsewhere ifTrue:\r\t\t\t[^ self hasEditingConflicts: true]\r\r! !\r\r\r!PluggableTextView methodsFor: 'object fileIn' stamp: 'RAA 12/20/2000 17:48'!\rconvertToCurrentVersion: varDict refStream: smartRefStrm\r\t\r\thasEditingConflicts ifNil: [hasEditingConflicts _ false].\r\t^super convertToCurrentVersion: varDict refStream: smartRefStrm.\r\r! !\r\r\r!PluggableTextView methodsFor: 'controller access' stamp: 'BG 11/26/2003 16:06'!\rselectionInterval\r\r  ^self controller selectionInterval! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rPluggableTextView class\r\tinstanceVariableNames: ''!\r\r!PluggableTextView class methodsFor: 'instance creation' stamp: 'jm 3/29/98 07:24'!\ron: anObject text: getTextSel accept: setTextSel\r\r\t^ self on: anObject\r\t\ttext: getTextSel\r\t\taccept: setTextSel\r\t\treadSelection: nil\r\t\tmenu: nil\r! !\r\r!PluggableTextView class methodsFor: 'instance creation' stamp: 'jm 3/29/98 07:24'!\ron: anObject text: getTextSel accept: setTextSel readSelection: getSelectionSel menu: getMenuSel\r\r\t^ self new on: anObject\r\t\ttext: getTextSel\r\t\taccept: setTextSel\r\t\treadSelection: getSelectionSel\r\t\tmenu: getMenuSel\r! !\rObject subclass: #Point\r\tinstanceVariableNames: 'x y'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Graphics-Primitives'!\r!Point commentStamp: '<historical>' prior: 0!\rI represent an x-y pair of numbers usually designating a location on the screen.!\r\r\r!Point methodsFor: 'accessing'!\rx\r\t\"Answer the x coordinate.\"\r\r\t^x! !\r\r!Point methodsFor: 'accessing'!\ry\r\t\"Answer the y coordinate.\"\r\r\t^y! !\r\r\r!Point methodsFor: 'arithmetic' stamp: 'di 11/6/1998 14:01'!\r* arg \r\t\"Answer a Point that is the product of the receiver and arg.\"\r\r\targ isPoint ifTrue: [^ (x * arg x) @ (y * arg y)].\r\t^ arg adaptToPoint: self andSend: #*! !\r\r!Point methodsFor: 'arithmetic' stamp: 'di 11/6/1998 14:01'!\r+ arg \r\t\"Answer a Point that is the sum of the receiver and arg.\"\r\r\targ isPoint ifTrue: [^ (x + arg x) @ (y + arg y)].\r\t^ arg adaptToPoint: self andSend: #+! !\r\r!Point methodsFor: 'arithmetic' stamp: 'di 11/6/1998 14:02'!\r- arg \r\t\"Answer a Point that is the difference of the receiver and arg.\"\r\r\targ isPoint ifTrue: [^ (x - arg x) @ (y - arg y)].\r\t^ arg adaptToPoint: self andSend: #-! !\r\r!Point methodsFor: 'arithmetic' stamp: 'di 11/6/1998 14:02'!\r/ arg \r\t\"Answer a Point that is the quotient of the receiver and arg.\"\r\r\targ isPoint ifTrue: [^ (x / arg x) @ (y / arg y)].\r\t^ arg adaptToPoint: self andSend: #/! !\r\r!Point methodsFor: 'arithmetic' stamp: 'di 11/6/1998 14:02'!\r// arg \r\t\"Answer a Point that is the quotient of the receiver and arg.\"\r\r\targ isPoint ifTrue: [^ (x // arg x) @ (y // arg y)].\r\t^ arg adaptToPoint: self andSend: #//! !\r\r!Point methodsFor: 'arithmetic' stamp: 'di 11/6/1998 14:02'!\r\\\\ arg \r\t\"Answer a Point that is the mod of the receiver and arg.\"\r\r\targ isPoint ifTrue: [^ (x \\\\ arg x) @ (y \\\\ arg y)].\r\t^ arg adaptToPoint: self andSend: #\\\\! !\r\r!Point methodsFor: 'arithmetic'!\rabs\r\t\"Answer a Point whose x and y are the absolute values of the receiver's x \r\tand y.\"\r\r\t^ x abs @ y abs! !\r\r\r!Point methodsFor: 'comparing'!\r< aPoint \r\t\"Answer whether the receiver is above and to the left of aPoint.\"\r\r\t^x < aPoint x and: [y < aPoint y]! !\r\r!Point methodsFor: 'comparing'!\r<= aPoint \r\t\"Answer whether the receiver is neither below nor to the right of aPoint.\"\r\r\t^x <= aPoint x and: [y <= aPoint y]! !\r\r!Point methodsFor: 'comparing'!\r= aPoint\r\r\tself species = aPoint species\r\t\tifTrue: [^x = aPoint \r\t\"Refer to the comment in Object|=.\" x and: [y = aPoint y]]\r\t\tifFalse: [^false]! !\r\r!Point methodsFor: 'comparing'!\r> aPoint \r\t\"Answer whether the receiver is below and to the right of aPoint.\"\r\r\t^x > aPoint x and: [y > aPoint y]! !\r\r!Point methodsFor: 'comparing'!\r>= aPoint \r\t\"Answer whether the receiver is neither above nor to the left of aPoint.\"\r\r\t^x >= aPoint x and: [y >= aPoint y]! !\r\r!Point methodsFor: 'comparing' stamp: 'SqR 11/3/2000 17:08'!\rhash\r\t\"Hash is reimplemented because = is implemented.\"\r\r\t^(x hash hashMultiply + y hash) hashMultiply! !\r\r!Point methodsFor: 'comparing'!\rhashMappedBy: map\r\t\"My hash is independent of my oop.\"\r\r\t^self hash! !\r\r!Point methodsFor: 'comparing'!\rmax: aPoint \r\t\"Answer the lower right corner of the rectangle uniquely defined by the \r\treceiver and the argument, aPoint.\"\r\r\t^ (x max: aPoint x) @ (y max: aPoint y)! !\r\r!Point methodsFor: 'comparing'!\rmin: aPoint \r\t\"Answer the upper left corner of the rectangle uniquely defined by the \r\treceiver and the argument, aPoint.\"\r\r\t^ (x min: aPoint x) @ (y min: aPoint y)! !\r\r!Point methodsFor: 'comparing'!\rmin: aMin max: aMax \r\r\t^ (self min: aMin) max: aMax! !\r\r\r!Point methodsFor: 'converting' stamp: 'di 11/6/1998 13:45'!\radaptToCollection: rcvr andSend: selector\r\t\"If I am involved in arithmetic with a Collection, return a Collection of\r\tthe results of each element combined with me in that expression.\"\r\r\t^ rcvr collect: [:element | element perform: selector with: self]! !\r\r!Point methodsFor: 'converting' stamp: 'di 11/9/1998 12:44'!\radaptToNumber: rcvr andSend: selector\r\t\"If I am involved in arithmetic with an Integer, convert it to a Point.\"\r\t^ rcvr@rcvr perform: selector with: self! !\r\r!Point methodsFor: 'converting' stamp: 'di 11/6/1998 13:47'!\radaptToString: rcvr andSend: selector\r\t\"If I am involved in arithmetic with a String, convert it to a Number.\"\r\t^ rcvr asNumber perform: selector with: self! !\r\r!Point methodsFor: 'converting'!\rasFloatPoint\r\t^ x asFloat @ y asFloat! !\r\r!Point methodsFor: 'converting'!\rasIntegerPoint\r\t^ x asInteger @ y asInteger! !\r\r!Point methodsFor: 'converting'!\rasPoint\r\t\"Answer the receiver itself.\"\r\r\t^self! !\r\r!Point methodsFor: 'converting'!\rcorner: aPoint \r\t\"Answer a Rectangle whose origin is the receiver and whose corner is \r\taPoint. This is one of the infix ways of expressing the creation of a \r\trectangle.\"\r\r\t^Rectangle origin: self corner: aPoint! !\r\r!Point methodsFor: 'converting'!\rextent: aPoint \r\t\"Answer a Rectangle whose origin is the receiver and whose extent is \r\taPoint. This is one of the infix ways of expressing the creation of a \r\trectangle.\"\r\r\t^Rectangle origin: self extent: aPoint! !\r\r!Point methodsFor: 'converting' stamp: 'di 11/6/1998 07:45'!\risPoint\r\t^ true! !\r\r!Point methodsFor: 'converting' stamp: 'di 12/3/97 19:00'!\rrect: aPoint \r\t\"Answer a Rectangle that encompasses the receiver and aPoint.\r\tThis is the most general infix way to create a rectangle.\"\r\r\t^ Rectangle \r\t\torigin: (self min: aPoint)\r\t\tcorner: (self max: aPoint)! !\r\r\r!Point methodsFor: 'copying'!\rdeepCopy\r\t\"Implemented here for better performance.\"\r\r\t^x deepCopy @ y deepCopy! !\r\r!Point methodsFor: 'copying' stamp: 'tk 8/19/1998 16:05'!\rveryDeepCopyWith: deepCopier\r\t\"Return self.  I am immutable in the Morphic world.  Do not record me.\"! !\r\r\r!Point methodsFor: 'geometry' stamp: 'laza 1/24/2000 03:44'!\risInsideCircle: a with: b with: c \r\t\"Returns TRUE if self is inside the circle defined by the     \r\tpoints a, b, c. See Guibas and Stolfi (1985) p.107\"\r\t^ (a dotProduct: a)\r\t\t* (b triangleArea: c with: self) - ((b dotProduct: b)\r\t\t\t* (a triangleArea: c with: self)) + ((c dotProduct: c)\r\t\t\t* (a triangleArea: b with: self)) - ((self dotProduct: self)\r\t\t\t* (a triangleArea: b with: c)) > 0.0! !\r\r!Point methodsFor: 'geometry' stamp: 'laza 1/6/2000 10:30'!\rsideOf: otherPoint \r\t\"Returns #left, #right or #center if the otherPoint lies to the left, right \r\tor on the line given by the vector from 0@0 to self\"\r\t| side |\r\tside _ (self crossProduct: otherPoint) sign.\r\t^ {#right. #center. #left} at: side + 2\r! !\r\r!Point methodsFor: 'geometry' stamp: 'ar 4/6/2000 18:37'!\rto: end1 intersects: start2 to: end2 \r\t\"Returns true if the linesegment from start1 (=self) to end1 intersects      \r\t    with the segment from start2 to end2, otherwise false.\"\r\t| start1 sideStart sideEnd |\r\tstart1 _ self.\r\t(((start1 = start2 or: [end1 = end2])\r\t\tor: [start1 = end2])\r\t\tor: [start2 = end1])\r\t\tifTrue: [^ true].\r\tsideStart _ start1 to: end1 sideOf: start2.\r\tsideEnd _ start1 to: end1 sideOf: end2.\r\tsideStart = sideEnd ifTrue: [^ false].\r\tsideStart _ start2 to: end2 sideOf: start1.\r\tsideEnd _ start2 to: end2 sideOf: end1.\r\tsideStart = sideEnd ifTrue: [^ false].\r\t^ true! !\r\r!Point methodsFor: 'geometry' stamp: 'laza 1/5/2000 11:50'!\rto: end sideOf: otherPoint \r\t\"Returns #left, #right, #center if the otherPoint lies to the left, right or on the line given by the vector from self to end\"\r\t^ end - self sideOf: otherPoint - self! !\r\r!Point methodsFor: 'geometry' stamp: 'laza 1/17/2000 15:47'!\rtriangleArea: b with: c\r\t\"Returns twice the area of the oriented triangle (a, b, c), i.e., the   \r\tarea is positive if the triangle is oriented counterclockwise\"\r\t^ b x - self x * (c y - self y) - (b y - self y * (c x - self x))! !\r\r\r!Point methodsFor: 'interpolating' stamp: 'jsp 3/22/1999 16:31'!\rinterpolateTo: end at: amountDone\r\t\"Interpolate between the instance and end after the specified amount has been done (0 - 1).\"\r\r\t^ self + ((end - self) * amountDone).! !\r\r\r!Point methodsFor: 'point functions' stamp: 'sw 2/15/98 02:27'!\rbearingToPoint: anotherPoint\r    \"Return the bearing, in degrees, from the receiver to anotherPoint.\r     Adapted from Playground, where the ultimate provenance of the algorithm was a wild earlier method of Jay Fenton's which I never checked carefully, but the thing has always seemed to work\"\r\r    | deltaX deltaY  |\r    deltaX := anotherPoint x -  x.\r    deltaY := anotherPoint y - y.\r\r    deltaX abs < 0.001\r        ifTrue:\r            [^ deltaY > 0 ifTrue: [180] ifFalse: [0]].\r\r    ^ ((deltaX >= 0 ifTrue: [90] ifFalse: [270])\r            - ((deltaY / deltaX) arcTan negated * 57.2957795131)) rounded\r! !\r\r!Point methodsFor: 'point functions' stamp: 'ar 10/30/1998 03:05'!\rcrossProduct: aPoint \r\t\"Answer a number that is the cross product of the receiver and the \r\targument, aPoint.\"\r\r\t^ (x * aPoint y) - (y * aPoint x)! !\r\r!Point methodsFor: 'point functions'!\rdist: aPoint \r\t\"Answer the distance between aPoint and the receiver.\"\r\r\t^(aPoint - self) r! !\r\r!Point methodsFor: 'point functions' stamp: 'di 9/11/1998 16:22'!\rdotProduct: aPoint \r\t\"Answer a number that is the dot product of the receiver and the \r\targument, aPoint. That is, the two points are multipled and the \r\tcoordinates of the result summed.\"\r\r\t^ (x * aPoint x) + (y * aPoint y)! !\r\r!Point methodsFor: 'point functions'!\reightNeighbors\r\t^ (Array with: self + (1@0)\r\t\twith: self + (1@1)\r\t\twith: self + (0@1)\r\t\twith: self + (-1@1)) ,\r\t(Array with: self + (-1@0)\r\t\twith: self + (-1@-1)\r\t\twith: self + (0@-1)\r\t\twith: self + (1@-1))\r! !\r\r!Point methodsFor: 'point functions' stamp: 'di 6/11/97 16:08'!\rflipBy: direction centerAt: c\r\t\"Answer a Point which is flipped according to the direction about the point c.\r\tDirection must be #vertical or #horizontal.\"\r\tdirection == #vertical ifTrue: [^ x @ (c y * 2 - y)].\r\tdirection == #horizontal ifTrue: [^ (c x * 2 - x) @ y].\r\tself error: 'unrecognizable direction'! !\r\r!Point methodsFor: 'point functions'!\rfourNeighbors\r\t^ Array with: self + (1@0)\r\t\twith: self + (0@1)\r\t\twith: self + (-1@0)\r\t\twith: self + (0@-1)\r! !\r\r!Point methodsFor: 'point functions'!\rgrid: aPoint \r\t\"Answer a Point to the nearest rounded grid modules specified by aPoint.\"\r\r\t| newX newY |\r\tnewX _ x + (aPoint x // 2) truncateTo: aPoint x.\r\tnewY _ y + (aPoint y // 2) truncateTo: aPoint y.\r\t^newX @ newY! !\r\r!Point methodsFor: 'point functions' stamp: 'ar 5/22/2001 23:46'!\rinsideTriangle: p1 with: p2 with: p3\r\t\"Return true if the receiver is within the triangle defined by the three coordinates.\r\tNote: This method computes the barycentric coordinates for the receiver and tests those coordinates.\"\r\t| p0 b0 b1 b2 b3 |\r\tp0 _ self.\r\tb0 _ ((p2 x - p1 x) * (p3 y - p1 y)) - ((p3 x - p1 x) * (p2 y - p1 y)).\r\tb0 isZero ifTrue:[^false]. \"degenerate\"\r\tb0 _ 1.0 / b0.\r\tb1 _ (((p2 x - p0 x) * (p3 y - p0 y)) - ((p3 x - p0 x) * (p2 y - p0 y))) * b0.\r\tb2 _ (((p3 x - p0 x) * (p1 y - p0 y)) - ((p1 x - p0 x) * (p3 y - p0 y))) * b0.\r\tb3 _ (((p1 x - p0 x) * (p2 y - p0 y)) - ((p2 x - p0 x) * (p1 y - p0 y))) * b0.\r\tb1 < 0.0 ifTrue:[^false].\r\tb2 < 0.0 ifTrue:[^false].\r\tb3 < 0.0 ifTrue:[^false].\r\t^true\r\r! !\r\r!Point methodsFor: 'point functions' stamp: 'di 12/1/97 12:37'!\rnearestPointAlongLineFrom: p1 to: p2\r\t\"Note this will give points beyond the endpoints.\r\tStreamlined by Gerardo Richarte 11/3/97\"\r\t| x21 y21 t x1 y1 |\r\tp1 x = p2 x ifTrue: [^ p1 x @ y].\r\tp1 y = p2 y ifTrue: [^ x @ p1 y].\r\tx1 _ p1 x asFloat.\r\ty1 _ p1 y asFloat.\r\tx21 _ p2 x asFloat - x1.\r\ty21 _ p2 y asFloat - y1.\r\tt _ ((y asFloat - y1 / x21) + (x asFloat - x1 / y21))\r\t\t\t/ ((x21 / y21) + (y21 / x21)).\r\t^ (x1 + (t * x21)) @ (y1 + (t * y21))\r\"\r\t| old new |\r\tPen new place: 200@100; goto: (old _ 500@300).\r\tDisplay reverse: (old extent: 10@10).\r\t[Sensor anyButtonPressed] whileFalse:\r\t\t[(new _ (Sensor cursorPoint nearestPointAlongLineFrom: 200@100 to: 500@300) )\r\t\t\t= old ifFalse:\r\t\t\t\t[Display reverse: (old extent: 10@10).\r\t\t\t\tDisplay reverse: ((old _ new) extent: 10@10)]]\r\"\r! !\r\r!Point methodsFor: 'point functions' stamp: 'di 12/1/97 12:40'!\rnearestPointOnLineFrom: p1 to: p2\r\t\"This will not give points beyond the endpoints\"\r\t^ (self nearestPointAlongLineFrom: p1 to: p2)\r\t\tadhereTo: (p1 rect: p2)! !\r\r!Point methodsFor: 'point functions'!\rnormal\r\t\"Answer a Point representing the unit vector rotated 90 deg clockwise.\"\r\r\t| n |\r\tn _ y negated @ x.\r\t^n / (n x * n x + (n y * n y)) sqrt! !\r\r!Point methodsFor: 'point functions' stamp: 'ar 8/26/2001 22:15'!\rnormalized\r\t\"Optimized for speed -- ar 8/26/2001\"\r\t| r |\r\tr _ ((x*x) + (y * y)) sqrt.\r\t^(x / r) @ (y / r)! !\r\r!Point methodsFor: 'point functions' stamp: 'laza 12/13/1999 11:43'!\roctantOf: otherPoint \r\t\"Return 1..8 indicating relative direction to otherPoint.  \r\t1=ESE, 2=SSE, ... etc. clockwise to 8=ENE\"\r\t\"[Sensor anyButtonPressed] whileFalse: [(Display boundingBox center \r\toctantOf: Sensor cursorPoint) printString displayAt: 0@0]\"\r\t| quad moreHoriz |\r\t(x = otherPoint x and: [y > otherPoint y])\r\t\tifTrue: [^ 6].\r\t\"special case\"\r\t(y = otherPoint y and: [x < otherPoint x])\r\t\tifTrue: [^ 8].\r\tquad _ self quadrantOf: otherPoint.\r\tmoreHoriz _ (x - otherPoint x) abs >= (y - otherPoint y) abs.\r\t(quad even eqv: moreHoriz)\r\t\tifTrue: [^ quad * 2]\r\t\tifFalse: [^ quad * 2 - 1]! !\r\r!Point methodsFor: 'point functions' stamp: 'di 12/1/97 12:12'!\ronLineFrom: p1 to: p2\r\t^ self onLineFrom: p1 to: p2 within: 2! !\r\r!Point methodsFor: 'point functions' stamp: 'jm 2/24/98 08:34'!\ronLineFrom: p1 to: p2 within: epsilon\r\t\"Answer true if the receiver lies on the given line segment between p1 and p2 within a small epsilon.\"\r\r\t\"is this point within the box spanning p1 and p2 expanded by epsilon? (optimized)\"\r\tp1 x < p2 x\r\t\tifTrue: [\r\t\t\t((x < (p1 x - epsilon)) or: [x > (p2 x + epsilon)]) ifTrue: [^ false]]\r\t\tifFalse: [\r\t\t\t((x < (p2 x - epsilon)) or: [x > (p1 x + epsilon)]) ifTrue: [^ false]].\r\tp1 y < p2 y\r\t\tifTrue: [\r\t\t\t((y < (p1 y - epsilon)) or: [y > (p2 y + epsilon)]) ifTrue: [^ false]]\r\t\tifFalse: [\r\t\t\t((y < (p2 y - epsilon)) or: [y > (p1 y + epsilon)]) ifTrue: [^ false]].\r\r\t\"it's in the box; is it on the line?\"\r\t^ (self dist: (self nearestPointAlongLineFrom: p1 to: p2)) <= epsilon! !\r\r!Point methodsFor: 'point functions' stamp: '6/9/97 14:51 di'!\rquadrantOf: otherPoint\r\t\"Return 1..4 indicating relative direction to otherPoint.\r\t1 is downRight, 2=downLeft, 3=upLeft, 4=upRight\"\r\t^ x <= otherPoint x\r\t\tifTrue: [y < otherPoint y ifTrue: [1] ifFalse: [4]]\r\t\tifFalse: [y <= otherPoint y ifTrue: [2] ifFalse: [3]]\r\"\r[Sensor anyButtonPressed] whileFalse:\r\t[(Display boundingBox center quadrantOf: Sensor cursorPoint) printString displayAt: 0@0]\r\"! !\r\r!Point methodsFor: 'point functions' stamp: 'di 6/11/97 15:12'!\rrotateBy: direction centerAt: c\r\t\"Answer a Point which is rotated according to direction, about the point c.\r\tDirection must be one of #right (CW), #left (CCW) or #pi (180 degrees).\"\r\t| offset |\r\toffset _ self - c.\r\tdirection == #right ifTrue: [^ (offset y negated @ offset x) + c].\r\tdirection == #left ifTrue: [^ (offset y @ offset x negated) + c].\r\tdirection == #pi ifTrue: [^ c - offset].\r\tself error: 'unrecognizable direction'! !\r\r!Point methodsFor: 'point functions' stamp: 'ar 4/18/1999 05:17'!\rsortsBefore: otherPoint\r\t\"Return true if the receiver sorts before the other point\"\r\t^y = otherPoint y\r\t\tifTrue:[x <= otherPoint x]\r\t\tifFalse:[y <= otherPoint y]! !\r\r!Point methodsFor: 'point functions' stamp: 'ar 5/23/2001 21:29'!\rsquaredDistanceTo: aPoint\r\t\"Answer the distance between aPoint and the receiver.\"\r\t| delta |\r\tdelta _ aPoint - self.\r\t^delta dotProduct: delta! !\r\r!Point methodsFor: 'point functions' stamp: 'ar 11/12/1998 01:44'!\rtransposed\r\t^y@x! !\r\r\r!Point methodsFor: 'polar coordinates' stamp: 'di 6/12/97 12:18'!\rdegrees\r\t\"Answer the angle the receiver makes with origin in degrees. right is 0; down is 90.\"\r\t| tan theta |\r\tx = 0\r\t\tifTrue: [y >= 0\r\t\t\t\tifTrue: [^ 90.0]\r\t\t\t\tifFalse: [^ 270.0]]\r\t\tifFalse: \r\t\t\t[tan _ y asFloat / x asFloat.\r\t\t\ttheta _ tan arcTan.\r\t\t\tx >= 0\r\t\t\t\tifTrue: [y >= 0\r\t\t\t\t\t\tifTrue: [^ theta radiansToDegrees]\r\t\t\t\t\t\tifFalse: [^ 360.0 + theta radiansToDegrees]]\r\t\t\t\tifFalse: [^ 180.0 + theta radiansToDegrees]]! !\r\r!Point methodsFor: 'polar coordinates'!\rr\r\t\"Answer the receiver's radius in polar coordinate system.\"\r\r\t^(self dotProduct: self) sqrt! !\r\r!Point methodsFor: 'polar coordinates'!\rtheta\r\t\"Answer the angle the receiver makes with origin in radians. right is 0; \r\tdown is 90.\"\r\r\t| tan theta |\r\tx = 0\r\t\tifTrue: [y >= 0\r\t\t\t\tifTrue: [^1.5708\"90.0 degreesToRadians\"]\r\t\t\t\tifFalse: [^4.71239\"270.0 degreesToRadians\"]]\r\t\tifFalse: \r\t\t\t[tan _ y asFloat / x asFloat.\r\t\t\ttheta _ tan arcTan.\r\t\t\tx >= 0\r\t\t\t\tifTrue: [y >= 0\r\t\t\t\t\t\tifTrue: [^theta]\r\t\t\t\t\t\tifFalse: [^360.0 degreesToRadians + theta]]\r\t\t\t\tifFalse: [^180.0 degreesToRadians + theta]]! !\r\r\r!Point methodsFor: 'printing' stamp: 'sw 9/27/2001 17:26'!\rbasicType\r\t\"Answer a symbol representing the inherent type of the receiver\"\r\r\t^ #Point! !\r\r!Point methodsFor: 'printing'!\rprintOn: aStream \r\t\"The receiver prints on aStream in terms of infix notation.\"\r\r\tx printOn: aStream.\r\taStream nextPut: $@.\r\ty printOn: aStream! !\r\r!Point methodsFor: 'printing'!\rstoreOn: aStream \r\t\"x@y printed form is good for storing too\"\r\tself printOn: aStream! !\r\r\r!Point methodsFor: 'private' stamp: 'ar 4/4/1999 00:40'!\rbitShiftPoint: bits\r\tx _ x bitShift: bits.\r\ty _ y bitShift: bits.! !\r\r!Point methodsFor: 'private' stamp: 'tk 10/4/2001 16:16'!\rsetR: rho degrees: degrees \r\r\t| radians |\r\tradians _ degrees asFloat degreesToRadians.\r\tx _ rho asFloat * radians cos.\r\ty _ rho asFloat * radians sin.! !\r\r!Point methodsFor: 'private' stamp: 'sw 3/21/2000 13:24'!\rsetX: xValue setY: yValue\r\r\tx _ xValue.\r\ty _ yValue! !\r\r\r!Point methodsFor: 'transforming' stamp: 'di 4/30/1998 11:16'!\radhereTo: aRectangle\r\t\"If the receiver lies outside aRectangle, return the nearest point on the boundary of the rectangle, otherwise return self.\"\r\r\t(aRectangle containsPoint: self) ifTrue: [^ self].\r\t^ ((x max: aRectangle left) min: aRectangle right)\r\t\t@ ((y max: aRectangle top) min: aRectangle bottom)! !\r\r!Point methodsFor: 'transforming' stamp: 'ar 8/26/2001 22:14'!\rnegated\r\t\"Answer a point whose x and y coordinates are the negatives of those of the receiver.  6/6/96 sw\"\r\t\"Optimized for speed -- ar 8/26/2001\"\r\t^ (0 - x) @ (0 - y)! !\r\r!Point methodsFor: 'transforming'!\rrotateBy: angle about: center\r\t\"Even though Point.theta is measured CW, this rotates with the more conventional CCW interpretateion of angle.\"\r\r\t| p r theta |\r\tp _ self - center.\r\tr _ p r.\r\ttheta _ angle asFloat - p theta.\r\t^ (center x asFloat + (r * theta cos)) @\r\t  (center y asFloat - (r * theta sin))! !\r\r!Point methodsFor: 'transforming'!\rscaleBy: factor \r\t\"Answer a Point scaled by factor (an instance of Point).\"\r\r\t^(factor x * x) @ (factor y * y)! !\r\r!Point methodsFor: 'transforming' stamp: 'di 12/4/97 14:34'!\rscaleFrom: rect1 to: rect2\r\t\"Produce a point stretched according to the stretch from rect1 to rect2\"\r\t^ rect2 topLeft + (((x-rect1 left) * rect2 width // rect1 width)\r\t\t\t\t\t@ ((y-rect1 top) * rect2 height // rect1 height))! !\r\r!Point methodsFor: 'transforming'!\rtranslateBy: delta \r\t\"Answer a Point translated by delta (an instance of Point).\"\r\r\t^(delta x + x) @ (delta y + y)! !\r\r\r!Point methodsFor: 'truncation and round off' stamp: 'jm 6/3/1998 12:21'!\rrounded\r\t\"Answer a Point that is the receiver's x and y rounded. Answer the receiver if its coordinates are already integral.\"\r\r\t(x isInteger and: [y isInteger]) ifTrue: [^ self].\r\t^ x rounded @ y rounded\r! !\r\r!Point methodsFor: 'truncation and round off'!\rtruncateTo: grid\r\t\"Answer a Point that is the receiver's x and y truncated to grid x and \r\tgrid y.\"\r\t| gridPoint |\r\tgridPoint _ grid asPoint.\r\t^(x truncateTo: gridPoint x) @ (y truncateTo: gridPoint y)! !\r\r!Point methodsFor: 'truncation and round off' stamp: 'jm 5/29/1998 15:53'!\rtruncated\r\t\"Answer a Point whose x and y coordinates are integers. Answer the receiver if its coordinates are already integral.\"\r\r\t(x isInteger and: [y isInteger]) ifTrue: [^ self].\r\t^ x truncated @ y truncated\r! !\r\r\r!Point methodsFor: 'testing' stamp: 'ar 10/29/2000 19:02'!\risZero\r\t^x isZero and:[y isZero]! !\r\r\r\r!Point methodsFor: '*morphic-Postscript Canvases'!\rencodePostscriptOn:aStream \r\taStream writePoint:self.! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rPoint class\r\tinstanceVariableNames: ''!\r\r!Point class methodsFor: 'instance creation' stamp: 'sw 9/20/97 15:34'!\rfromUser\r\tSensor waitNoButton.\r\tCursor crossHair show.\r\tSensor waitButton.\r\tCursor normal show.\r\t^ Sensor cursorPoint\r\r\"Point fromUser\"! !\r\r!Point class methodsFor: 'instance creation' stamp: 'tk 10/4/2001 16:17'!\rr: rho degrees: degrees\r\t\"Answer an instance of me with polar coordinates rho and theta.\"\r\r\t^self new setR: rho degrees: degrees! !\r\r!Point class methodsFor: 'instance creation'!\rx: xInteger y: yInteger \r\t\"Answer an instance of me with coordinates xInteger and yInteger.\"\r\r\t^self new setX: xInteger setY: yInteger! !\rModel subclass: #PointerFinder\r\tinstanceVariableNames: 'goal parents toDo toDoNext hasGemStone pointerList objectList parentsSize todoSize depth pointerListIndex'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Debugger'!\r!PointerFinder commentStamp: '<historical>' prior: 0!\rI can search for reasons why a certain object isn't garbage collected.  I'm a quick port of a VisualWorks program written by Hans-Martin Mosner.  Call me as shown below.  I'll search for a path from a global variable to the given object, presenting it in a small morphic UI.\r\rExamples:\r\tPointerFinder on: self currentHand\r\tPointerFinder on: StandardSystemView someInstance\r\rNow, let's see why this image contains more HandMorphs as expected...\r\rHandMorph allInstancesDo: [:e | PointerFinder on: e]!\r\r\r!PointerFinder methodsFor: 'application' stamp: 'sma 6/6/2000 18:58'!\rbuildList\r\t| list obj parent object key |\r\tlist := OrderedCollection new.\r\tobj := goal.\r\t\r\t[list addFirst: obj.\r\tobj := parents at: obj ifAbsent: [].\r\tobj == nil] whileFalse.\r\tlist removeFirst.\r\tparent := Smalltalk.\r\tobjectList := OrderedCollection new.\r\tpointerList := OrderedCollection new.\r\t[list isEmpty]\r\t\twhileFalse: \r\t\t\t[object := list removeFirst.\r\t\t\tkey := nil.\r\t\t\t(parent isKindOf: Dictionary)\r\t\t\t\tifTrue: [list size >= 2\r\t\t\t\t\t\tifTrue: \r\t\t\t\t\t\t\t[key := parent keyAtValue: list second ifAbsent: [].\r\t\t\t\t\t\t\tkey == nil\r\t\t\t\t\t\t\t\tifFalse: \r\t\t\t\t\t\t\t\t\t[object := list removeFirst; removeFirst.\r\t\t\t\t\t\t\t\t\tpointerList add: key printString , ' -> ' , object class name]]].\r\t\t\tkey == nil\r\t\t\t\tifTrue: \r\t\t\t\t\t[parent class == object ifTrue: [key := 'CLASS'].\r\t\t\t\t\tkey == nil ifTrue: [1 to: parent class instSize do: [:i | key == nil ifTrue: [(parent instVarAt: i)\r\t\t\t\t\t\t\t\t\t== object ifTrue: [key := parent class allInstVarNames at: i]]]].\r\t\t\t\t\tkey == nil ifTrue: [1 to: parent basicSize do: [:i | key == nil ifTrue: [(parent basicAt: i)\r\t\t\t\t\t\t\t\t\t== object ifTrue: [key := i printString]]]].\r\t\t\t\t\tkey == nil ifTrue: [(parent isMorph and: [object isKindOf: Array]) ifTrue: [key := 'submorphs?']].\r\t\t\t\t\tkey == nil ifTrue: [key := '???'].\r\t\t\t\t\tpointerList add: key , ': ' , object class name].\r\t\t\tobjectList add: object.\r\t\t\tparent := object]! !\r\r!PointerFinder methodsFor: 'application' stamp: 'sma 6/6/2000 23:08'!\rfollow: anObject from: parentObject\r\tanObject == goal\r\t\tifTrue: \r\t\t\t[parents at: anObject put: parentObject.\r\t\t\t^ true].\r\tanObject isLiteral ifTrue: [^ false].\r\tanObject class isPointers ifFalse: [^ false].\r\tanObject class isWeak ifTrue: [^ false].\r\t(parents includesKey: anObject)\r\t\tifTrue: [^ false].\r\tparents at: anObject put: parentObject.\r\ttoDoNext add: anObject.\r\t^ false! !\r\r!PointerFinder methodsFor: 'application' stamp: 'sma 6/6/2000 10:01'!\rfollowObject: anObject\r\t(self follow: anObject class from: anObject)\r\t\tifTrue: [^ true].\r\t1 to: anObject class instSize do:\r\t\t[:i |\r\t\t(self follow: (anObject instVarAt: i) from: anObject)\r\t\t\tifTrue: [^ true]].\r\t1 to: anObject basicSize do:\r\t\t[:i |\r\t\t(self follow: (anObject basicAt: i) from: anObject)\r\t\t\tifTrue: [^ true]].\r\t^ false! !\r\r!PointerFinder methodsFor: 'application' stamp: 'sma 6/6/2000 09:52'!\rgoal: anObject\r\tgoal _ anObject! !\r\r!PointerFinder methodsFor: 'application' stamp: 'sma 6/7/2000 00:19'!\rinitialize\r\tparents _ IdentityDictionary new: 20000.\r\tparents at: Smalltalk put: nil.\r\tparents at: Processor put: nil.\r\tparents at: self put: nil.\r\r\ttoDo _ OrderedCollection new: 5000.\r\ttoDo add: Smalltalk.\r\ttoDoNext _ OrderedCollection new: 5000! !\r\r!PointerFinder methodsFor: 'application' stamp: 'sma 6/7/2000 00:19'!\risLiteral\r\t\"Horrible hack to omit other Pointer Finders from scanning.\"\r\r\t^ true! !\r\r!PointerFinder methodsFor: 'application' stamp: 'sma 6/7/2000 00:17'!\rsearch\r\tSmalltalk garbageCollect.\r\r\tself initialize.\r\t\r\tCursor wait showWhile: [\r\t\t[[toDo isEmpty or: [self followObject: toDo removeFirst]] whileFalse.\r\t\ttoDo isEmpty and: [toDoNext isEmpty not]]\r\t\t\twhileTrue: \r\t\t\t\t[toDo _ toDoNext.\r\t\t\t\ttoDoNext _ OrderedCollection new: 5000]].\r\r\tself buildList! !\r\r!PointerFinder methodsFor: 'application' stamp: 'sma 6/6/2000 19:10'!\rupdate\r\t('done: ' , parents size asString , ' todo: ' , toDo size asString , '   ') displayAt: 0@0! !\r\r\r!PointerFinder methodsFor: 'morphic ui' stamp: 'sma 6/7/2000 00:23'!\rarrowKey: key from: aController\r\tkey = $i ifTrue: [^ self inspectObject].\r\t^ super arrowKey: key from: aController! !\r\r!PointerFinder methodsFor: 'morphic ui' stamp: 'sma 6/6/2000 23:48'!\rinitialExtent\r\t^ 300 @ 300! !\r\r!PointerFinder methodsFor: 'morphic ui' stamp: 'nb 6/17/2003 12:25'!\rinspectObject\r\tpointerListIndex = 0 ifTrue: [^ Beeper beep].\r\t(objectList at: pointerListIndex) inspect! !\r\r!PointerFinder methodsFor: 'morphic ui' stamp: 'sma 6/7/2000 00:15'!\rperform: selector orSendTo: otherTarget\r\tselector == #inspectObject ifTrue: [^ self inspectObject].\r\tselector == #searchAgain ifTrue: [^ self searchAgain].\r\t^ super perform: selector orSendTo: otherTarget! !\r\r!PointerFinder methodsFor: 'morphic ui' stamp: 'sma 6/6/2000 23:49'!\rpointerList\r\t^ pointerList asArray! !\r\r!PointerFinder methodsFor: 'morphic ui' stamp: 'sma 6/6/2000 23:27'!\rpointerListIndex\r\t^ pointerListIndex ifNil: [0]! !\r\r!PointerFinder methodsFor: 'morphic ui' stamp: 'sma 6/6/2000 23:51'!\rpointerListIndex: anInteger\r\tpointerListIndex _ anInteger.\r\tself changed: #pointerListIndex! !\r\r!PointerFinder methodsFor: 'morphic ui' stamp: 'sma 6/7/2000 00:16'!\rsearchAgain\r\tself pointerListIndex: 0.\r\tself search.\r\tself changed: #pointerList! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rPointerFinder class\r\tinstanceVariableNames: ''!\r\r!PointerFinder class methodsFor: 'instance creation' stamp: 'sma 6/6/2000 23:52'!\ron: anObject\r\t^ self new goal: anObject; search; open! !\rObject subclass: #PopUpMenu\r\tinstanceVariableNames: 'labelString font lineArray frame form marker selection'\r\tclassVariableNames: 'CacheMenuForms MenuStyle'\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Menus'!\r!PopUpMenu commentStamp: '<historical>' prior: 0!\rI represent a list of items. My instances are presented on the display screen in a rectangular area. The user points to an item, pressing a mouse button; the item is highlighted. When the button is released, the highlighted item indicates the selection.!\r\r\r!PopUpMenu methodsFor: 'accessing' stamp: 'sma 5/28/2000 11:44'!\rcenter\r\t\"Answer the point at the center of the receiver's rectangular area.\"\r\r\t^ frame center! !\r\r!PopUpMenu methodsFor: 'accessing' stamp: 'di 4/20/1999 14:33'!\rframeHeight\r\t\"Designed to avoid the entire frame computation (includes MVC form),\r\tsince the menu may well end up being displayed in Morphic anyway.\"\r\t| nItems |\r\tframe ifNotNil: [^ frame height].\r\tnItems _ 1 + (labelString occurrencesOf: Character cr).\r\t^ (nItems * MenuStyle lineGrid) + 4 \"border width\"! !\r\r!PopUpMenu methodsFor: 'accessing' stamp: 'sma 5/28/2000 14:55'!\rlabelString\r\t^ labelString! !\r\r!PopUpMenu methodsFor: 'accessing' stamp: 'sma 5/28/2000 14:55'!\rlineArray\r\t^ lineArray! !\r\r!PopUpMenu methodsFor: 'accessing' stamp: 'sma 5/28/2000 12:32'!\rnItems\r\t^ (labelString occurrencesOf: Character cr) + 1! !\r\r!PopUpMenu methodsFor: 'accessing' stamp: 'sw 3/12/2002 21:37'!\rstartUpLeftFlush\r\t\"Build and invoke this menu with no initial selection.  By Jerry Archibald, 4/01.\r\tIf in MVC, align menus items with the left margin.\r\tAnswer the selection associated with the menu item chosen by the user or nil if none is chosen.  \r\tThe mechanism for getting left-flush appearance in mvc leaves a tiny possibility for misadventure: if the user, in mvc, puts up the jump-to-project menu, then hits cmd period while it is up, then puts up a second jump-to-project menu before dismissing or proceeding through the debugger, it's possible for mvc popup-menus thereafter to appear left-aligned rather than centered; this very unlikely condition can be cleared by evaluating 'PopUpMenu alignment: 2'\"\r\r\t| saveAlignment result |\r\tSmalltalk isMorphic ifFalse:\r\t\t[saveAlignment _ PopUpMenu alignment.\r\t\tPopUpMenu leftFlush].\r\t[result _ self startUp] ensure:\r\t\t[Smalltalk isMorphic ifFalse:\r\t\t\t[PopUpMenu alignment: saveAlignment]].\r\t^ result! !\r\r\r!PopUpMenu methodsFor: 'basic control sequence' stamp: 'sma 6/1/2000 13:04'!\rcontrolActivity\r\t\"Do whatever a menu must do - now with keyboard support.\"\r\r\t| didNotMove downPos |\r\tdidNotMove _ true.\r\tSensor anyButtonPressed\r\t\tifFalse:\r\t\t\t[didNotMove _ false.\r\t\t\tSensor waitButtonOrKeyboard]. \r\t\r\tSensor keyboardPressed ifFalse: [self manageMarker].\r\t(didNotMove and: [selection = 0])\r\t\tifTrue:\r\t\t\t[downPos _ Sensor cursorPoint.\r\t\t\t[didNotMove and: [Sensor anyButtonPressed]]\r\t\t\t\twhileTrue:\r\t\t\t\t\t[(downPos dist: Sensor cursorPoint) < 2 ifFalse: [didNotMove _ false]].\r\t\t\tdidNotMove ifTrue: [Sensor waitButtonOrKeyboard]].\r\r\t[Sensor keyboardPressed] whileTrue:\r\t\t[self readKeyboard ifTrue: [^ self].\r\t\tSensor waitButtonOrKeyboard].\r\r\t[Sensor anyButtonPressed] whileTrue: [self manageMarker]! !\r\r!PopUpMenu methodsFor: 'basic control sequence' stamp: 'sma 6/1/2000 10:55'!\rreadKeyboard\r\t\"Keyboard support for menus. ESC will abort the menu, Space or CR\r\twill select an item. Cursor up and cursor down will change the\r\tselection. Any other key will either select an item whose label starts\r\twith that character or select the next matching label.\r\tAnswer true if the menu should be closed and false otherwise.\"\r\r\t| ch labels occurences |\r\tch _ Sensor keyboard asciiValue.\r\t(ch = 13 or: [ch = 32]) ifTrue: [^ true].\r\tch = 27 ifTrue: [self setSelection: 0. ^ true].\r\tch = 30\r\t\tifTrue:\r\t\t\t[self setSelection: (selection <= 1\r\t\t\t\tifTrue: [self nItems]\r\t\t\t\tifFalse: [selection - 1])].\r\tch = 31 ifTrue: [self setSelection: selection \\\\ self nItems + 1].\r\tch _ ch asCharacter asLowercase.\r\tlabels _ labelString findTokens: Character cr asString.\r\toccurences _ 0.\r\t1 + selection to: selection + labels size do:\r\t\t[:index |\r\t\t| i | i _ index - 1 \\\\ labels size + 1.\r\t\t(labels at: i) withBlanksTrimmed first asLowercase = ch\r\t\t\tifTrue: [(occurences _ occurences + 1) = 1 ifTrue: [self setSelection: i]]].\r\t^ occurences = 1! !\r\r!PopUpMenu methodsFor: 'basic control sequence'!\rstartUp\r\t\"Display and make a selection from the receiver as long as the button \r\tis pressed. Answer the current selection.\"\r\t\r\t^ self startUpWithCaption: nil! !\r\r!PopUpMenu methodsFor: 'basic control sequence' stamp: 'ar 3/18/2001 00:55'!\rstartUpCenteredWithCaption: captionOrNil\r\t\"Differs from startUpWithCaption: by appearing with cursor in the menu,\r\tand thus ready to act on mouseUp, without requiring user tweak to confirm\"\r\t^ self startUpWithCaption: captionOrNil at: (ActiveHand ifNil:[Sensor]) cursorPoint - (20@0)! !\r\r!PopUpMenu methodsFor: 'basic control sequence' stamp: 'sw 12/17/2001 17:26'!\rstartUpSegmented: segmentHeight withCaption: captionOrNil at: location allowKeyboard: aBoolean\r\t\"This menu is too big to fit comfortably on the screen.\r\tBreak it up into smaller chunks, and manage the relative indices.\r\tInspired by a special-case solution by Reinier van Loon.  The boolean parameter indicates whether the menu should be given keyboard focus (if in morphic)\"\r\r\"\r(PopUpMenu labels: (String streamContents: [:s | 1 to: 100 do: [:i | s print: i; cr]. s skip: -1])\r\t\tlines: (5 to: 100 by: 5)) startUpWithCaption: 'Give it a whirl...'.\r\"\r\t| nLines nLinesPer allLabels from to subset subLines index |\r\tframe ifNil: [self computeForm].\r\tallLabels := labelString findTokens: Character cr asString.\r\tnLines _ allLabels size.\r\tlineArray ifNil: [lineArray _ Array new].\r\tnLinesPer _ segmentHeight // marker height - 3.\r\tfrom := 1.\r\t[ true ] whileTrue:\r\t\t[to := (from + nLinesPer) min: nLines.\r\t\tsubset := allLabels copyFrom: from to: to.\r\t\tsubset add: (to = nLines ifTrue: ['start over...'] ifFalse: ['more...'])\r\t\t\tbefore: subset first.\r\t\tsubLines _ lineArray select: [:n | n >= from] thenCollect: [:n | n - (from-1) + 1].\r\t\tsubLines _ (Array with: 1) , subLines.\r\t\tindex := (PopUpMenu labels: subset asStringWithCr lines: subLines)\r\t\t\t\t\tstartUpWithCaption: captionOrNil at: location allowKeyboard: aBoolean.\r\t\tindex = 1\r\t\t\tifTrue: [from := to + 1.\r\t\t\t\t\tfrom > nLines ifTrue: [ from := 1 ]]\r\t\t\tifFalse: [index = 0 ifTrue: [^ 0].\r\t\t\t\t\t^ from + index - 2]]! !\r\r!PopUpMenu methodsFor: 'basic control sequence' stamp: 'ar 3/18/2001 00:55'!\rstartUpWithCaption: captionOrNil\r\t\"Display the menu, slightly offset from the cursor,\r\tso that a slight tweak is required to confirm any action.\"\r\t^ self startUpWithCaption: captionOrNil at: (ActiveHand ifNil:[Sensor]) cursorPoint! !\r\r!PopUpMenu methodsFor: 'basic control sequence' stamp: 'ar 12/27/2001 22:47'!\rstartUpWithCaption: captionOrNil at: location\r\t\"Display the menu, with caption if supplied. Wait for the mouse button to go down,\r\tthen track the selection as long as the button is pressed. When the button is released, \r\tanswer the index of the current selection, or zero if the mouse is not released over \r\tany menu item. Location specifies the desired topLeft of the menu body rectangle.\"\r\r\t\t^ self startUpWithCaption: captionOrNil at: location allowKeyboard: Preferences menuKeyboardControl! !\r\r!PopUpMenu methodsFor: 'basic control sequence' stamp: 'BG 10/28/2003 21:02'!\rstartUpWithCaption: captionOrNil at: location allowKeyboard: aBoolean\r\t\"Display the menu, with caption if supplied. Wait for the mouse button to go down, then track the selection as long as the button is pressed. When the button is released,\r\tAnswer the index of the current selection, or zero if the mouse is not released over  any menu item. Location specifies the desired topLeft of the menu body rectangle. The final argument indicates whether the menu should seize the keyboard focus in order to allow the user to navigate it via the keyboard.\"\r\r\t| maxHeight |\r\tmaxHeight _ Display height*3//4.\r\tself frameHeight > maxHeight ifTrue:\r\t\t[^ self\r\t\t\tstartUpSegmented: maxHeight\r\t\t\twithCaption: captionOrNil\r\t\t\tat: location\r\t\t\tallowKeyboard: aBoolean].\r\r\r\r\tframe ifNil: [self computeForm].\r\tCursor normal showWhile:\r\t\t[self\r\t\t\tdisplayAt: location\r\t\t\twithCaption: captionOrNil\r\t\t\tduring: [self controlActivity]].\r\t^ selection! !\r\r\r!PopUpMenu methodsFor: 'displaying' stamp: 'sw 12/10/1999 09:55'!\rdisplayAt: aPoint withCaption: captionOrNil during: aBlock\r\t\"Display the receiver just to the right of aPoint while aBlock is evaluated.  If the receiver is forced off screen, display it just to the right.\"\r\t| delta savedArea captionForm captionSave outerFrame captionText tFrame frameSaveLoc captionBox |\r\tmarker ifNil: [self computeForm].\r\tframe _ frame align: marker leftCenter with: aPoint + (2@0).\r\touterFrame _ frame.\r\tcaptionOrNil notNil ifTrue:\r\t\t[captionText _ (DisplayText\r\t\t\t\ttext: captionOrNil asText\r\t\t\t\ttextStyle: MenuStyle copy centered)\r\t\t\t\t\tforegroundColor: Color black\r\t\t\t\t\tbackgroundColor: Color white.\r\t\ttFrame _ captionText boundingBox insetBy: -2.\r\t\touterFrame _ frame merge: (tFrame align: tFrame bottomCenter\r\t\t\t\t\twith: frame topCenter + (0@2))].\r\tdelta _ outerFrame amountToTranslateWithin: Display boundingBox.\r\tframe right > Display boundingBox right\r\t\tifTrue: [delta _ 0 - frame width @ delta y].\r\tframe _ frame translateBy: delta.\r\tcaptionOrNil notNil ifTrue:\r\t\t[captionForm _ captionText form.\r\t\tcaptionBox _ captionForm boundingBox expandBy: 4.\r\t\tcaptionBox _ captionBox align: captionBox bottomCenter\r\t\t\t\t\t\t\t\twith: frame topCenter + (0@2).\r\t\tcaptionSave _ Form fromDisplay: captionBox.\r\t\tDisplay border: captionBox width: 4 fillColor: Color white.\r\t\tDisplay border: captionBox width: 2 fillColor: Color black.\r\t\tcaptionForm displayAt: captionBox topLeft + 4].\r\tmarker _ marker align: marker leftCenter with: aPoint + delta +  (2@0).\r\tsavedArea _ Form fromDisplay: frame.\r\tself menuForm displayOn: Display at: (frameSaveLoc _ frame topLeft).\r\tselection ~= 0 ifTrue: [Display reverse: marker].\r\tCursor normal showWhile: [aBlock value].\r\tsavedArea displayOn: Display at: frameSaveLoc.\r\tcaptionOrNil notNil ifTrue:\r\t\t[captionSave displayOn: Display at: captionBox topLeft]! !\r\r\r!PopUpMenu methodsFor: 'marker adjustment' stamp: 'di 4/13/1999 17:42'!\rmanageMarker\r\t\"If the cursor is inside the receiver's frame, then highlight the marked \r\titem. Otherwise no item is to be marked.\"\r\t| pt |\r\t\"Don't let pt get far from display box, so scrolling will go all the way\"\r\tpt _ Sensor cursorPoint adhereTo: (Display boundingBox expandBy: 1).\r\t(frame inside containsPoint: pt)\r\t\tifTrue: [\"Need to cache the form for reasonable scrolling performance\"\r\t\t\t\t((Display boundingBox insetBy: 0@3) containsPoint: pt)\r\t\t\t\t\tifFalse: [pt _ pt - (self scrollIntoView: pt)].\r\t\t\t\tself markerOn: pt]\r\t\tifFalse: [self markerOff]! !\r\r!PopUpMenu methodsFor: 'marker adjustment' stamp: 'sma 5/28/2000 15:27'!\rmarkerOff\r\t\"No item is selected. Reverse the highlight if any item has been marked \r\tas selected.\"\r\r\tself setSelection: 0! !\r\r!PopUpMenu methodsFor: 'marker adjustment' stamp: 'sma 6/1/2000 13:01'!\rmarkerOn: aPoint \r\t\"The item whose bounding area contains aPoint should be marked as \r\tselected. Highlight its area and set the selection to its index.\"\r\r\tselection = 0 | (marker containsPoint: aPoint) not \r\t\tifTrue: [selection = 0 & (marker containsPoint: aPoint)\r\t\t\t\t\tifTrue: [Display reverse: marker]\r\t\t\t\t\tifFalse: \r\t\t\t\t\t\t[selection > 0 ifTrue: [Display reverse: marker].\r\t\t\t\t\t\tmarker _ \r\t\t\t\t\t\t\tmarker \r\t\t\t\t\t\t\t\talign: marker topLeft \r\t\t\t\t\t\t\t\twith: marker left @ (self markerTop: aPoint).\r\t\t\t\t\t\tDisplay reverse: marker]].\r\tselection _ marker top - frame top // marker height + 1! !\r\r!PopUpMenu methodsFor: 'marker adjustment'!\rmarkerTop: aPoint \r\t\"Answer aPoint, gridded to lines in the receiver.\"\r\r\t^(aPoint y - frame inside top truncateTo: font height) + frame inside top! !\r\r!PopUpMenu methodsFor: 'marker adjustment' stamp: 'di 3/9/98 19:46'!\rscrollIntoView: cursorLoc\r\t| dy |\r\tdy _ 0.\r\tcursorLoc y < 2 ifTrue: [dy _ font height].\r\tcursorLoc y > (Display height-3) ifTrue: [dy _ font height negated].\r\tdy = 0 ifTrue: [^ 0@0].\r\tself markerOff.\r\tframe _ frame translateBy: 0@dy.\r\tmarker _ marker translateBy: 0@dy.\r\tself menuForm displayOn: Display at: frame topLeft.\r\t^ 0@dy! !\r\r\r!PopUpMenu methodsFor: 'private' stamp: 'BG 8/17/2005 18:01'!\rcomputeForm\r\t\"Compute and answer a Form to be displayed for this menu.\"\r\r\t| borderInset paraForm menuForm inside |\r\tborderInset _ 4@4.\r\tparaForm _ (DisplayText text: (Text string: labelString attribute: TextEmphasis normal) textStyle: MenuStyle) form.\r\tmenuForm _ Form extent: paraForm extent + (borderInset * 2) depth: paraForm depth.\r      menuForm fill: (0 @ 0 extent: menuForm  extent)\r                        rule: Form over\r                        fillColor: Color white.\r\tmenuForm borderWidth: 2.\r\tparaForm displayOn: menuForm at: borderInset.\r\tlineArray == nil ifFalse:\r\t\t[lineArray do:\r\t\t\t[ :line |\r\t\t\tmenuForm fillBlack: (4 @ ((line * font height) + borderInset y)\r\t\t\t\textent: (menuForm width - 8 @ 1))]].\r\r\tframe _ Quadrangle new.\r\tframe region: menuForm boundingBox.\r\tframe borderWidth: 4.\r\tinside _ frame inside.\r\tmarker _ inside topLeft extent: (inside width @ MenuStyle lineGrid).\r\tselection _ 1.\r\r\t^ form _ menuForm\r! !\r\r!PopUpMenu methodsFor: 'private'!\rcomputeLabelParagraph\r\t\"Answer a Paragraph containing this menu's labels, one per line and centered.\"\r\r\t^ Paragraph withText: labelString asText style: MenuStyle! !\r\r!PopUpMenu methodsFor: 'private' stamp: 'di 4/13/1999 16:21'!\rlabels: aString font: aFont lines: anArray\r\r\tlabelString _ aString.\r\tfont _ aFont.\r\tlineArray _ anArray.\r! !\r\r!PopUpMenu methodsFor: 'private' stamp: 'di 4/13/1999 17:51'!\rmenuForm\r\t\"Answer a Form to be displayed for this menu.\"\r\r\tform == nil ifTrue: [self computeForm].\r\t^ form! !\r\r!PopUpMenu methodsFor: 'private' stamp: 'BG 8/17/2005 17:57'!\rrescan\r\t\"Cause my form to be recomputed after a font change.\"\r\r\tlabelString == nil ifTrue: [labelString _ 'NoText!!'].\r\tself labels: labelString font: (MenuStyle fontAt: MenuStyle defaultFontIndex) lines: lineArray.\r\tframe _ marker _ form _ nil.\r\r\t\"PopUpMenu allSubInstancesDo: [:m | m rescan]\"! !\r\r\r!PopUpMenu methodsFor: 'selecting' stamp: 'sma 5/28/2000 12:27'!\rselection\r\t\"Answer the current selection.\"\r\r\t^ selection! !\r\r!PopUpMenu methodsFor: 'selecting' stamp: 'sma 6/1/2000 11:01'!\rsetSelection: index\r\t| newSelection |\r\tselection = index ifTrue: [^ self].\r\tnewSelection _ (0 max: index) min: frame height // marker height.\r\tselection > 0 ifTrue: [Display reverse: marker].\r\tmarker _ marker translateBy: 0 @ (newSelection - selection * marker height).\r\tselection _ newSelection.\r\tselection > 0 ifTrue: [Display reverse: marker]! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rPopUpMenu class\r\tinstanceVariableNames: ''!\r\r!PopUpMenu class methodsFor: 'class initialization' stamp: 'jla 4/2/2001 20:41'!\ralignment\r\r\t^ MenuStyle alignment! !\r\r!PopUpMenu class methodsFor: 'class initialization' stamp: 'jla 4/2/2001 20:46'!\ralignment: anAlignment\r\r\t^ MenuStyle alignment: anAlignment! !\r\r!PopUpMenu class methodsFor: 'class initialization' stamp: 'BG 8/17/2005 18:01'!\rinitialize  \"PopUpMenu initialize\"\r\t(MenuStyle _ TextStyle default copy)\r\t\tdefaultFontIndex: 3;\r\t\tgridForFont: MenuStyle defaultFontIndex withLead: 0;\r\t\tcentered.\r\tPopUpMenu allSubInstancesDo: [:m | m rescan]! !\r\r!PopUpMenu class methodsFor: 'class initialization' stamp: 'jla 4/2/2001 20:56'!\rleftFlush\r\r\tMenuStyle leftFlush! !\r\r!PopUpMenu class methodsFor: 'class initialization' stamp: 'sw 4/17/2001 13:12'!\rsetMenuFontTo: aFont\r\t\"Set the menu font as indicated\"\r\r\tMenuStyle _ aFont textStyle copy consistOnlyOf: aFont.\r\tMenuStyle \r\t\tgridForFont: 1 withLead: 0;\r\t\tcentered.\r\tself allSubInstancesDo: [:m | m rescan]! !\r\r\r!PopUpMenu class methodsFor: 'instance creation' stamp: 'sma 5/28/2000 15:44'!\rlabelArray: labelArray\r\t\"Answer an instance of me whose items are in labelArray.\"\r\r\t^ self labelArray: labelArray lines: nil! !\r\r!PopUpMenu class methodsFor: 'instance creation' stamp: 'sma 5/28/2000 15:43'!\rlabelArray: labelArray lines: lineArray\r\t\"Answer an instance of me whose items are in labelArray, with lines \r\tdrawn after each item indexed by anArray. 2/1/96 sw\"\r\r\tlabelArray isEmpty ifTrue: [self error: 'Menu must not be zero size'].\r\t^ self\r\t\tlabels: (String streamContents: \r\t\t\t[:stream |\r\t\t\tlabelArray do: [:each | stream nextPutAll: each; cr].\r\t\t\tstream skip: -1 \"remove last CR\"])\r\t\tlines: lineArray\r\r\"Example:\r\t(PopUpMenu labelArray: #('frog' 'and' 'toad') lines: #()) startUp\"! !\r\r!PopUpMenu class methodsFor: 'instance creation' stamp: 'sma 5/28/2000 15:36'!\rlabels: aString\r\t\"Answer an instance of me whose items are in aString.\"\r\r\t^ self labels: aString lines: nil! !\r\r!PopUpMenu class methodsFor: 'instance creation' stamp: 'sw 12/6/1999 17:55'!\rlabels: aString lines: anArray\r\t\"Answer an instance of me whose items are in aString, with lines drawn \r\tafter each item indexed by anArray.\"\r\r\t^ self new\r\t\tlabels: aString\r\t\tfont: MenuStyle defaultFont\r\t\tlines: anArray! !\r\r!PopUpMenu class methodsFor: 'instance creation' stamp: 'tk 7/12/2000 17:29'!\rwithCaption: cap chooseFrom: labels\r\t\"Simply put up a menu.  Get the args in the right order with the caption first.  labels may be either an array of items or a string with CRs in it.  May use backslashes for returns.\"\r\r\t(labels isKindOf: String) \r\t\tifTrue: [^ (self labels: labels withCRs lines: nil) startUpWithCaption: cap withCRs]\r\t\tifFalse: [^ (self labelArray: labels lines: nil) startUpWithCaption: cap withCRs]! !\r\r\r!PopUpMenu class methodsFor: 'dialogs' stamp: 'dgd 9/5/2003 18:24'!\rconfirm: queryString\r\t\"Put up a yes/no menu with caption queryString. Answer true if the \r\tresponse is yes, false if no. This is a modal question--the user must \r\trespond yes or no.\"\r\r\t\"PopUpMenu confirm: 'Are you hungry?'\"\r\r\t^ self confirm: queryString trueChoice: 'Yes' translated falseChoice: 'No' translated! !\r\r!PopUpMenu class methodsFor: 'dialogs' stamp: 'dgd 9/5/2003 18:23'!\rconfirm: queryString orCancel: cancelBlock\r\t\"Put up a yes/no/cancel menu with caption aString. Answer true if  \r\tthe response is yes, false if no. If cancel is chosen, evaluate  \r\tcancelBlock. This is a modal question--the user must respond yes or no.\"\r\r\t\"PopUpMenu confirm: 'Reboot universe' orCancel: [^'Nevermind']\"\r\r\t| menu choice |\r\tmenu _ PopUpMenu labelArray: {'Yes' translated. 'No' translated. 'Cancel' translated}.\r\tchoice _ menu startUpWithCaption: queryString.\r\tchoice = 1 ifTrue: [^ true].\r\tchoice = 2 ifTrue: [^ false].\r\t^ cancelBlock value! !\r\r!PopUpMenu class methodsFor: 'dialogs' stamp: 'sma 6/5/2000 09:12'!\rconfirm: queryString trueChoice: trueChoice falseChoice: falseChoice\r\t\"Put up a yes/no menu with caption queryString. The actual wording \r\tfor the two choices will be as provided in the trueChoice and \r\tfalseChoice parameters. Answer true if the response is the true-choice, \r\tfalse if it's the false-choice.\r\tThis is a modal question -- the user must respond one way or the other.\"\r\r\t\"PopUpMenu \r\t\tconfirm: 'Are you hungry?'\r\t\ttrueChoice: 'yes, I''m famished'\r\t\tfalseChoice: 'no, I just ate'\"\r\r\t| menu choice |\r\tmenu _ PopUpMenu labelArray: {trueChoice. falseChoice}.\r\t[(choice _ menu startUpWithCaption: queryString) isNil] whileTrue.\r\t^ choice = 1! !\r\r!PopUpMenu class methodsFor: 'dialogs' stamp: 'dgd 9/5/2003 18:34'!\rinform: aString\r\t\"PopUpMenu inform: 'I like Squeak'\"\r\r\t(PopUpMenu labels: ' OK ' translated) startUpWithCaption: aString! !\r\r!PopUpMenu class methodsFor: 'dialogs' stamp: 'sma 5/28/2000 15:57'!\rnotify: message\r\t\"Deprecated. Use #inform: instead.\"\r\r\tself inform: message! !\rStream subclass: #PositionableStream\r\tinstanceVariableNames: 'collection position readLimit'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Streams'!\r!PositionableStream commentStamp: '<historical>' prior: 0!\rI represent an accessor for a sequence of objects (a collection) that are externally named by indices so that the point of access can be repositioned. I am abstract in that I do not implement the messages next and nextPut: which are inherited from my superclass Stream.!\r\r\r!PositionableStream methodsFor: 'accessing' stamp: 'ajh 1/18/2002 01:03'!\rback\r\t\"Go back one element and return it.  Use indirect messages in case I am a StandardFileStream\"\r\r\tself position = 0 ifTrue: [self errorCantGoBack].\r\tself position = 1 ifTrue: [self position: 0.  ^ nil].\r\tself skip: -2.\r\t^ self next\r! !\r\r!PositionableStream methodsFor: 'accessing'!\rcontents\r\t\"Answer with a copy of my collection from 1 to readLimit.\"\r\r\t^collection copyFrom: 1 to: readLimit! !\r\r!PositionableStream methodsFor: 'accessing' stamp: 'sw 3/10/98 13:55'!\rcontentsOfEntireFile\r\t\"For non-file streams\"\r\t^ self contents! !\r\r!PositionableStream methodsFor: 'accessing' stamp: 'tk 9/23/2001 01:14'!\rlast\r\t\"Return the final element in the receiver\"\r\r\t^ collection at: position! !\r\r!PositionableStream methodsFor: 'accessing' stamp: 'sw 3/10/98 13:55'!\rnext: anInteger \r\t\"Answer the next anInteger elements of my collection. Must override \r\tbecause default uses self contents species, which might involve a large \r\tcollection.\"\r\r\t| newArray |\r\tnewArray _ collection species new: anInteger.\r\t1 to: anInteger do: [:index | newArray at: index put: self next].\r\t^newArray! !\r\r!PositionableStream methodsFor: 'accessing' stamp: 'ar 12/23/1999 14:58'!\rnext: n into: aCollection\r\t\"Read n objects into the given collection.\r\tReturn aCollection or a partial copy if less than\r\tn elements have been read.\"\r\t^self next: n into: aCollection startingAt: 1! !\r\r!PositionableStream methodsFor: 'accessing' stamp: 'ar 12/23/1999 14:54'!\rnext: n into: aCollection startingAt: startIndex\r\t\"Read n objects into the given collection. \r\tReturn aCollection or a partial copy if less than\r\tn elements have been read.\"\r\t| obj |\r\t0 to: n-1 do:[:i|\r\t\t(obj _ self next) == nil ifTrue:[^aCollection copyFrom: 1 to: startIndex+i-1].\r\t\taCollection at: startIndex+i put: obj].\r\t^aCollection! !\r\r!PositionableStream methodsFor: 'accessing' stamp: 'tk 3/27/98 08:44'!\rnextDelimited: terminator\r\t\"Answer the contents of the receiver, up to the next terminator character. Doubled terminators indicate an embedded terminator character.  For example: 'this '' was a quote'. Start postioned before the initial terminator.\"\r\r\t| out ch |\r\tout _ WriteStream on: (String new: 1000).\r\tself atEnd ifTrue: [^ ''].\r\tself next == terminator ifFalse: [self skip: -1].\t\"absorb initial terminator\"\r\t[(ch _ self next) == nil] whileFalse: [\r\t\t(ch == terminator) ifTrue: [\r\t\t\tself peek == terminator ifTrue: [\r\t\t\t\tself next.  \"skip doubled terminator\"\r\t\t\t] ifFalse: [\r\t\t\t\t^ out contents  \"terminator is not doubled; we're done!!\"\r\t\t\t].\r\t\t].\r\t\tout nextPut: ch.\r\t].\r\t^ out contents! !\r\r!PositionableStream methodsFor: 'accessing' stamp: 'ar 12/23/1999 14:53'!\rnextInto: aCollection\r\t\"Read the next elements of the receiver into aCollection.\r\tReturn aCollection or a partial copy if less than aCollection\r\tsize elements have been read.\"\r\t^self next: aCollection size into: aCollection startingAt: 1.! !\r\r!PositionableStream methodsFor: 'accessing' stamp: 'bf 11/24/1998 13:35'!\rnextLine\r\t\"Answer next line (may be empty), or nil if at end\"\r\r\tself atEnd ifTrue: [^nil].\r\t^self upTo: Character cr! !\r\r!PositionableStream methodsFor: 'accessing' stamp: 'nk 3/18/2004 08:52'!\rnextWordsInto: aBitmap \r\t\"Fill the word based buffer from my collection. \r\tStored on stream as Big Endian. Optimized for speed. \r\tRead in BigEndian, then restoreEndianness.\"\r\t| blt pos source byteSize |\r\tcollection class isBytes\r\t\tifFalse: [^ self next: aBitmap size into: aBitmap startingAt: 1].\r\r\tbyteSize := aBitmap byteSize.\r\t\"is the test on collection basicSize \\\\ 4 necessary?\"\r\t((self position bitAnd: 3) = 0 and: [ (collection basicSize bitAnd: 3) = 0])\r\t\tifTrue: [source := collection.\r\t\t\tpos := self position.\r\t\t\tself skip: byteSize]\r\t\tifFalse: [\"forced to copy it into a buffer\"\r\t\t\tsource := self next: byteSize.\r\t\t\tpos := 0].\r\r\t\"Now use BitBlt to copy the bytes to the bitmap.\"\r\tblt := (BitBlt current\r\t\t\t\ttoForm: (Form new hackBits: aBitmap))\r\t\t\t\tsourceForm: (Form new hackBits: source).\r\tblt combinationRule: Form over. \"store\"\r\tblt sourceX: 0;\r\t\t sourceY: pos // 4;\r\t\t height: byteSize // 4;\r\t\t width: 4.\r\tblt destX: 0;\r\t\t destY: 0.\r\tblt copyBits.\r\r\t\"And do whatever the bitmap needs to do to convert from big-endian order.\"\r\taBitmap restoreEndianness.\r\r\t^ aBitmap \t\"May be WordArray, ColorArray, etc\"\r! !\r\r!PositionableStream methodsFor: 'accessing'!\roriginalContents\r\t\"Answer the receiver's actual contents collection, NOT a copy.  1/29/96 sw\"\r\r\t^ collection! !\r\r!PositionableStream methodsFor: 'accessing'!\rpeek\r\t\"Answer what would be returned if the message next were sent to the \r\treceiver. If the receiver is at the end, answer nil.\"\r\r\t| nextObject |\r\tself atEnd ifTrue: [^nil].\r\tnextObject _ self next.\r\tposition _ position - 1.\r\t^nextObject! !\r\r!PositionableStream methodsFor: 'accessing' stamp: 'ajh 1/18/2002 01:02'!\rpeekBack\r\t\"Return the element at the previous position, without changing position.  Use indirect messages in case self is a StandardFileStream.\"\r\r\t| element |\r\telement _ self back.\r\tself skip: 1.\r\t^ element! !\r\r!PositionableStream methodsFor: 'accessing'!\rpeekFor: anObject \r\t\"Answer false and do not move over the next element if it is not equal to \r\tthe argument, anObject, or if the receiver is at the end. Answer true \r\tand increment the position for accessing elements, if the next element is \r\tequal to anObject.\"\r\r\t| nextObject |\r\tself atEnd ifTrue: [^false].\r\tnextObject _ self next.\r\t\"peek for matching element\"\r\tanObject = nextObject ifTrue: [^true].\r\t\"gobble it if found\"\r\tposition _ position - 1.\r\t^false! !\r\r!PositionableStream methodsFor: 'accessing'!\rupTo: anObject \r\t\"Answer a subcollection from the current access position to the \r\toccurrence (if any, but not inclusive) of anObject in the receiver. If \r\tanObject is not in the collection, answer the entire rest of the receiver.\"\r\t| newStream element |\r\tnewStream _ WriteStream on: (collection species new: 100).\r\t[self atEnd or: [(element _ self next) = anObject]]\r\t\twhileFalse: [newStream nextPut: element].\r\t^newStream contents! !\r\r!PositionableStream methodsFor: 'accessing' stamp: 'tk 7/18/1999 17:10'!\rupToAll: aCollection\r\t\"Answer a subcollection from the current access position to the occurrence (if any, but not inclusive) of aCollection. If aCollection is not in the stream, answer the entire rest of the stream.\"\r\r\t| startPos endMatch result |\r\tstartPos _ self position.\r\t(self match: aCollection) \r\t\tifTrue: [endMatch _ self position.\r\t\t\tself position: startPos.\r\t\t\tresult _ self next: endMatch - startPos - aCollection size.\r\t\t\tself position: endMatch.\r\t\t\t^ result]\r\t\tifFalse: [self position: startPos.\r\t\t\t^ self upToEnd]! !\r\r!PositionableStream methodsFor: 'accessing' stamp: 'BG 2/19/2004 14:06'!\rupToEnd\r\t\"Answer a subcollection from the current access position through the last element of the receiver.\"\r\r\t| newStream |\r\tnewStream _ WriteStream on: (collection species new: 100).\r\t[self atEnd] whileFalse: [ newStream nextPut: self next ].\r\t^ newStream contents! !\r\r\r!PositionableStream methodsFor: 'testing'!\ratEnd\r\t\"Primitive. Answer whether the receiver can access any more objects.\r\tOptional. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 67>\r\t^position >= readLimit! !\r\r!PositionableStream methodsFor: 'testing' stamp: 'ar 1/2/2000 17:24'!\risBinary\r\t\"Return true if the receiver is a binary byte stream\"\r\t^collection class == ByteArray! !\r\r!PositionableStream methodsFor: 'testing'!\risEmpty\r\t\"Answer whether the receiver's contents has no elements.\"\r\r\t^position = 0! !\r\r\r!PositionableStream methodsFor: 'positioning' stamp: 'hmm 10/22/1999 21:18'!\rmatch: subCollection\r\t\"Set the access position of the receiver to be past the next occurrence of the subCollection. Answer whether subCollection is found.  No wildcards, and case does matter.\"\r\r\t| pattern startMatch |\r\tpattern _ ReadStream on: subCollection.\r\tstartMatch _ nil.\r\t[pattern atEnd] whileFalse: \r\t\t[self atEnd ifTrue: [^ false].\r\t\t(self next) = (pattern next) \r\t\t\tifTrue: [pattern position = 1 ifTrue: [startMatch _ self position]]\r\t\t\tifFalse: [pattern position: 0.\r\t\t\t\t\tstartMatch ifNotNil: [\r\t\t\t\t\t\tself position: startMatch.\r\t\t\t\t\t\tstartMatch _ nil]]].\r\t^ true\r\r! !\r\r!PositionableStream methodsFor: 'positioning'!\rposition\r\t\"Answer the current position of accessing the sequence of objects.\"\r\r\t^position! !\r\r!PositionableStream methodsFor: 'positioning'!\rposition: anInteger \r\t\"Set the current position for accessing the objects to be anInteger, as long \r\tas anInteger is within the bounds of the receiver's contents. If it is not, \r\tcreate an error notification.\"\r\r\tanInteger >= 0 & (anInteger <= readLimit)\r\t\tifTrue: [position _ anInteger]\r\t\tifFalse: [self positionError]! !\r\r!PositionableStream methodsFor: 'positioning'!\rreset\r\t\"Set the receiver's position to the beginning of the sequence of objects.\"\r\r\tposition _ 0! !\r\r!PositionableStream methodsFor: 'positioning' stamp: 'sw 3/10/98 13:55'!\rresetContents\r\t\"Set the position and limits to 0.\"\r\r\tposition _ 0.\r\treadLimit _ 0! !\r\r!PositionableStream methodsFor: 'positioning'!\rsetToEnd\r\t\"Set the position of the receiver to the end of the sequence of objects.\"\r\r\tposition _ readLimit! !\r\r!PositionableStream methodsFor: 'positioning' stamp: 'RAH 6/29/2000 05:44'!\rskip: anInteger \r\t\"Skips the next amount objects in the receiver's future sequence values.\"\r\t\"2000/06/23 Harmon, R. Changed for ANSI <gettableStream> protocol.\"\r\t#Stream.\r\r\tself position: (self position + (anInteger min: (self contents size - self position)))\r! !\r\r!PositionableStream methodsFor: 'positioning'!\rskipTo: anObject \r\t\"Set the access position of the receiver to be past the next occurrence of \r\tanObject. Answer whether anObject is found.\"\r\r\t[self atEnd]\r\t\twhileFalse: [self next = anObject ifTrue: [^true]].\r\t^false! !\r\r\r!PositionableStream methodsFor: 'fileIn/Out' stamp: 'ajh 1/18/2002 01:02'!\rbackChunk\r\t\"Answer the contents of the receiver back to the previous terminator character.  Doubled terminators indicate an embedded terminator character.\"\r\t| terminator out ch |\r\tterminator _ $!!.\r\tout _ WriteStream on: (String new: 1000).\r\t[(ch _ self back) == nil] whileFalse: [\r\t\t(ch == terminator) ifTrue: [\r\t\t\tself peekBack == terminator ifTrue: [\r\t\t\t\tself back.  \"skip doubled terminator\"\r\t\t\t] ifFalse: [\r\t\t\t\t^ out contents reversed  \"we're done!!\"\r\t\t\t].\r\t\t].\r\t\tout nextPut: ch.\r\t].\r\t^ out contents reversed! !\r\r!PositionableStream methodsFor: 'fileIn/Out' stamp: 'sd 5/23/2003 14:40'!\rcheckForPreamble: chunk\r\t((chunk beginsWith: '\"Change Set:') and: [ChangeSet current preambleString == nil])\r\t\tifTrue: [ChangeSet current preambleString: chunk].\r\t((chunk beginsWith: '\"Postscript:') and: [ChangeSet current postscriptString == nil])\r\t\tifTrue: [ChangeSet current postscriptString: chunk].\r\t\t\t\t\t\t\t\r! !\r\r!PositionableStream methodsFor: 'fileIn/Out'!\rcommand: aString\r\t\"Overridden by HtmlFileStream to append commands directly without translation.  4/5/96 tk\"\r\t\"We ignore any HTML commands.  Do nothing\"! !\r\r!PositionableStream methodsFor: 'fileIn/Out' stamp: 'di 2/3/98 14:44'!\rcopyMethodChunkFrom: aStream\r\t\"Copy the next chunk from aStream (must be different from the receiver).\"\r\t| chunk |\r\tchunk _ aStream nextChunkText.\r\tchunk runs values size = 1 \"Optimize for unembellished text\"\r\t\tifTrue: [self nextChunkPut: chunk asString]\r\t\tifFalse: [self nextChunkPutWithStyle: chunk]! !\r\r!PositionableStream methodsFor: 'fileIn/Out' stamp: 'di 6/28/97 09:16'!\rcopyPreamble: preamble from: aStream\r\t\"Look for a changeStamp for this method by peeking backward.\r\tWrite a method preamble, with that stamp if found.\"\r\t| terminator methodPos p last50 stamp i |\r\tterminator _ $!!.\r\r\t\"Look back to find stamp in old preamble, such as...\r\tPolygon methodsFor: 'private' stamp: 'di 6/25/97 21:42' prior: 34957598!! \"\r\tmethodPos _ aStream position.\r\taStream position: (p _ 0 max: methodPos-50).\r\tlast50 _ aStream next: methodPos - p.\r\tstamp _ String new.\r\t(i _ last50 findString: 'stamp:' startingAt: 1) > 0 ifTrue:\r\t\t[stamp _ (last50 copyFrom: i+8 to: last50 size) copyUpTo: $'].\r\r\t\"Write the new preamble, with old stamp if any.\"\r\tself cr; nextPut: terminator.\r\tself nextChunkPut: (String streamContents:\r\t\t[:strm |\r\t\tstrm nextPutAll: preamble.\r\t\tstamp size > 0 ifTrue:\r\t\t\t[strm nextPutAll: ' stamp: '; print: stamp]]).\r\tself cr! !\r\r!PositionableStream methodsFor: 'fileIn/Out' stamp: 'mir 7/26/2000 13:28'!\rfileIn\r\t\"This is special for reading expressions from text that has been formatted \r\twith exclamation delimitors. The expressions are read and passed to the \r\tCompiler. Answer the result of compilation.\"\r\r\t^ self fileInAnnouncing: 'Reading ' , self name! !\r\r!PositionableStream methodsFor: 'fileIn/Out' stamp: 'NS 1/28/2004 11:22'!\rfileInAnnouncing: announcement \r\t\"This is special for reading expressions from text that has been formatted \r\twith exclamation delimitors. The expressions are read and passed to the \r\tCompiler. Answer the result of compilation.  Put up a progress report with\r     the given announcement as the title.\"\r\r\t| val chunk |\r\tannouncement \r\t\tdisplayProgressAt: Sensor cursorPoint\r\t\tfrom: 0\r\t\tto: self size\r\t\tduring: \r\t\t\t[:bar | \r\t\t\t[self atEnd] whileFalse: \r\t\t\t\t\t[bar value: self position.\r\t\t\t\t\tself skipSeparators.\r\t\t\t\t\t\r\t\t\t\t\t[val := (self peekFor: $!!) \r\t\t\t\t\t\t\t\tifTrue: [(Compiler evaluate: self nextChunk logged: false) scanFrom: self]\r\t\t\t\t\t\t\t\tifFalse: \r\t\t\t\t\t\t\t\t\t[chunk := self nextChunk.\r\t\t\t\t\t\t\t\t\tself checkForPreamble: chunk.\r\t\t\t\t\t\t\t\t\tCompiler evaluate: chunk logged: true]] \r\t\t\t\t\t\t\ton: InMidstOfFileinNotification\r\t\t\t\t\t\t\tdo: [:ex | ex resume: true].\r\t\t\t\t\tself skipStyleChunk].\r\t\t\tself close].\r\t\"Note:  The main purpose of this banner is to flush the changes file.\"\r\tSmalltalkImage current logChange: '----End fileIn of ' , self name , '----'.\r\tself flag: #ThisMethodShouldNotBeThere.\t\"sd\"\r\tSmalltalk forgetDoIts.\r\t^val! !\r\r!PositionableStream methodsFor: 'fileIn/Out'!\rheader\r\t\"If the stream requires a standard header, override this message.  See HtmlFileStream\"! !\r\r!PositionableStream methodsFor: 'fileIn/Out' stamp: 'di 2/3/98 14:29'!\rnextChunk\r\t\"Answer the contents of the receiver, up to the next terminator character. Doubled terminators indicate an embedded terminator character.\"\r\t| terminator out ch |\r\tterminator _ $!!.\r\tout _ WriteStream on: (String new: 1000).\r\tself skipSeparators.\r\t[(ch _ self next) == nil] whileFalse: [\r\t\t(ch == terminator) ifTrue: [\r\t\t\tself peek == terminator ifTrue: [\r\t\t\t\tself next.  \"skip doubled terminator\"\r\t\t\t] ifFalse: [\r\t\t\t\t^ out contents  \"terminator is not doubled; we're done!!\"\r\t\t\t].\r\t\t].\r\t\tout nextPut: ch.\r\t].\r\t^ out contents! !\r\r!PositionableStream methodsFor: 'fileIn/Out' stamp: 'di 1/13/98 16:54'!\rnextChunkText\r\t\"Deliver the next chunk as a Text.  Decode the following ]style[ chunk if present.  Position at start of next real chunk.\"\r\t| string runsRaw strm runs peek |\r\t\"Read the plain text\"\r\tstring _ self nextChunk.\r\t\r\t\"Test for ]style[ tag\"\r\tpeek _ self skipSeparatorsAndPeekNext.\r\tpeek = $] ifFalse: [^ string asText].  \"no tag\"\r\t(self upTo: $[) = ']style' ifFalse: [^ string asText].  \"different tag\"\r\r\t\"Read and decode the style chunk\"\r\trunsRaw _ self nextChunk.\t\"style encoding\"\r\tstrm _ ReadStream on: runsRaw from: 1 to: runsRaw size.\r\truns _ RunArray scanFrom: strm.\r\r\t^ Text basicNew setString: string setRunsChecking: runs.\r! !\r\r!PositionableStream methodsFor: 'fileIn/Out' stamp: 'di 6/13/97 12:00'!\rskipSeparators\r\t[self atEnd]\r\t\twhileFalse:\r\t\t[self next isSeparator ifFalse: [^ self position: self position-1]]! !\r\r!PositionableStream methodsFor: 'fileIn/Out' stamp: 'di 1/13/98 16:08'!\rskipSeparatorsAndPeekNext\r\t\"A special function to make nextChunk fast\"\r\t| peek |\r\t[self atEnd]\r\t\twhileFalse:\r\t\t[(peek _ self next) isSeparator\r\t\t\tifFalse: [self position: self position-1. ^ peek]]! !\r\r!PositionableStream methodsFor: 'fileIn/Out' stamp: 'tk 12/29/97 12:37'!\rskipStyleChunk\r\t\"Get to the start of the next chunk that is not a style for the previous chunk\"\r\r\t| pos |\r\tpos _ self position.\r\tself skipSeparators.\r\tself peek == $] \r\t\tifTrue: [(self upTo: $[) = ']text' \t\"old -- no longer needed\"\r\t\t\t\t\"now positioned past the open bracket\"\r\t\t\tifFalse: [self nextChunk]]\t\"absorb ]style[ and its whole chunk\"\r\t\t\t\t\r\t\tifFalse: [self position: pos]\t\"leave untouched\"\r! !\r\r!PositionableStream methodsFor: 'fileIn/Out'!\rtrailer\r\t\"If the stream requires a standard trailer, override this message.  See HtmlFileStream\"! !\r\r!PositionableStream methodsFor: 'fileIn/Out'!\runCommand\r\t\"If this read stream is at a <, then skip up to just after the next >.  For removing html commands.\"\r\t| char |\r\t[self peek = $<] whileTrue: [\"begin a block\"\r\t\t[self atEnd == false and: [self next ~= $>]] whileTrue.\r\t\t\"absorb characters\"\r\t\t].\r ! !\r\r\r!PositionableStream methodsFor: 'private'!\ron: aCollection\r\r\tcollection _ aCollection.\r\treadLimit _ aCollection size.\r\tposition _ 0.\r\tself reset! !\r\r!PositionableStream methodsFor: 'private'!\rpositionError\r\t\"Since I am not necessarily writable, it is up to my subclasses to override \r\tposition: if expanding the collection is preferrable to giving this error.\"\r\r\tself error: 'Attempt to set the position of a PositionableStream out of bounds'! !\r\r!PositionableStream methodsFor: 'private'!\rsetFrom: newStart to: newStop\r\r\tposition _ newStart - 1.\r\treadLimit _ newStop! !\r\r\r!PositionableStream methodsFor: 'nonhomogeneous accessing' stamp: 'sw 3/10/98 13:55'!\rnextInt32\r\t\"Read a 32-bit signed integer from the next 4 bytes\"\r\t| s |\r\ts _ 0.\r\t1 to: 4 do: [:i | s _ (s bitShift: 8) + self next].\r\t(s bitAnd: 16r80000000) = 0\r\t\tifTrue: [^ s]\r\t\tifFalse: [^ -1 - s bitInvert32]! !\r\r!PositionableStream methodsFor: 'nonhomogeneous accessing' stamp: 'sw 3/10/98 13:55'!\rnextInt32Put: int32\r\t\"Write a signed integer to the next 4 bytes\"\r\t| pos |\r\tpos _ int32 < 0\r\t\tifTrue: [(0-int32) bitInvert32 + 1]\r\t\tifFalse: [int32].\r\t1 to: 4 do: [:i | self nextPut: (pos digitAt: 5-i)].\r\t^ int32! !\r\r!PositionableStream methodsFor: 'nonhomogeneous accessing' stamp: 'jm 4/9/98 21:36'!\rnextLittleEndianNumber: n \r\t\"Answer the next n bytes as a positive Integer or LargePositiveInteger, where the bytes are ordered from least significant to most significant.\"\r\r\t| bytes s |\r\tbytes _ self next: n.\r\ts _ 0.\r\tn to: 1 by: -1 do: [:i | s _ (s bitShift: 8) bitOr: (bytes at: i)].\r\t^ s\r! !\r\r!PositionableStream methodsFor: 'nonhomogeneous accessing' stamp: 'di 12/6/1999 10:13'!\rnextLittleEndianNumber: n put: value\r\t\"Answer the next n bytes as a positive Integer or LargePositiveInteger, where the bytes are ordered from least significant to most significant.\"\r\t| bytes |\r\tbytes _ ByteArray new: n.\r\t1 to: n do: [: i | bytes at: i put: (value digitAt: i)].\r\tself nextPutAll: bytes! !\r\r!PositionableStream methodsFor: 'nonhomogeneous accessing'!\rnextNumber: n \r\t\"Answer the next n bytes as a positive Integer or LargePositiveInteger.\"\r\t| s |\r\ts _ 0.\r\t1 to: n do: \r\t\t[:i | s _ (s bitShift: 8) bitOr: self next asInteger].\r\t^ s normalize! !\r\r!PositionableStream methodsFor: 'nonhomogeneous accessing' stamp: 'sw 3/10/98 13:55'!\rnextNumber: n put: v \r\t\"Append to the receiver the argument, v, which is a positive \r\tSmallInteger or a LargePositiveInteger, as the next n bytes.\r\tPossibly pad with leading zeros.\"\r\r\t1 to: n do: [:i | self nextPut: (v digitAt: n+1-i)].\r\t^ v\r! !\r\r!PositionableStream methodsFor: 'nonhomogeneous accessing' stamp: 'sw 3/10/98 13:55'!\rnextWord\r\t\"Answer the next two bytes from the receiver as an Integer.\"\r\r\t| high low |\r\thigh _ self next.\r\t\thigh==nil ifTrue: [^false].\r\tlow _ self next.\r\t\tlow==nil ifTrue: [^false].\r\t^(high asInteger bitShift: 8) + low asInteger! !\r\r!PositionableStream methodsFor: 'nonhomogeneous accessing' stamp: 'sw 3/10/98 13:55'!\rnextWordPut: aWord \r\t\"Append to the receiver an Integer as the next two bytes.\"\r\r\tself nextPut: ((aWord bitShift: -8) bitAnd: 255).\r\tself nextPut: (aWord bitAnd: 255).\r\t^aWord! !\r\r\r!PositionableStream methodsFor: 'data get/put' stamp: 'jm 9/5/2001 07:35'!\rstring\r\t\"Answer the next string from this (binary) stream.\"\r\r\t| size |\r\tsize _ self uint16.\r\t^ (self next: size) asString\r! !\r\r!PositionableStream methodsFor: 'data get/put' stamp: 'jm 9/5/2001 12:09'!\rstring: aString\r\t\"Store the given string on this (binary) stream. The string must contain 65535 or fewer characters.\"\r\r\taString size > 16rFFFF ifTrue: [self error: 'string too long for this format'].\r\tself uint16: aString size.\r\tself nextPutAll: aString asByteArray.\r! !\r\r!PositionableStream methodsFor: 'data get/put' stamp: 'jm 8/20/2001 07:53'!\ruint16\r\t\"Answer the next unsigned, 16-bit integer from this (binary) stream.\"\r\r\t| n |\r\tn _ self next.\r\tn _ (n bitShift: 8) + (self next).\r\t^ n\r! !\r\r!PositionableStream methodsFor: 'data get/put' stamp: 'jm 8/20/2001 07:53'!\ruint16: anInteger\r\t\"Store the given unsigned, 16-bit integer on this (binary) stream.\"\r\r\t(anInteger < 0) | (anInteger >= 16r10000)\r\t\tifTrue: [self error: 'outside unsigned 16-bit integer range'].\r\r\tself nextPut: (anInteger digitAt: 2).\r\tself nextPut: (anInteger digitAt: 1).\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rPositionableStream class\r\tinstanceVariableNames: ''!\r\r!PositionableStream class methodsFor: 'instance creation'!\ron: aCollection \r\t\"Answer an instance of me, streaming over the elements of aCollection.\"\r\r\t^self basicNew on: aCollection! !\r\r!PositionableStream class methodsFor: 'instance creation'!\ron: aCollection from: firstIndex to: lastIndex \r\t\"Answer an instance of me, streaming over the elements of aCollection \r\tstarting with the element at firstIndex and ending with the one at \r\tlastIndex.\"\r\r\t^self basicNew on: (aCollection copyFrom: firstIndex to: lastIndex)! !\rObject subclass: #Preference\r\tinstanceVariableNames: 'name value defaultValue helpString localToProject categoryList changeInformee changeSelector'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Support'!\r!Preference commentStamp: 'sw 1/14/2003 22:33' prior: 0!\rRepresents a true/false flag that is under user control and which can be interrogated by a call to Preferences\r\r\tname \t\t\t\ta symbol, the formal name of the preference.\r\tvalue\t\t\t\ta boolean, the current value\r\tdefaultValue\t\tthe default value of the preference\r\thelpString \t\t\tstring or text, constituting the help message\r\tlocalToProject\t\tboolean, whether each project holds its own version\r\tcategoryList\t\t\tlist of categories under which to offer this\r\tchangeInformee \twhom, if anyone, to inform if the value changes:\r\tchangeSelector \t\twhat selector to send to the changeInformee when the value changes!\r\r\r!Preference methodsFor: 'initialization' stamp: 'sw 3/5/2002 14:12'!\rname: aName defaultValue: aValue helpString: aString localToProject: projectBoolean categoryList: aList changeInformee: informee changeSelector:  aChangeSelector\r\t\"Initialize the preference from the given values.  There is an extra tolerence here for the symbols #true, #false, and #nil, which are interpreted, when appropriate, as meaning true, false, and nil\"\r\r\tname _ aName asSymbol.\r\tdefaultValue _ aValue == true or: [aValue = #true].\r\tvalue _ defaultValue.\r\thelpString _ aString.\r\tlocalToProject _ projectBoolean == true or: [projectBoolean = #true].\r\tcategoryList _ (aList ifNil: [OrderedCollection with: #unclassified]) collect:\r\t\t[:elem | elem asSymbol].\r\r\tchangeInformee _ (informee == nil or: [informee == #nil])\r\t\t\t\t\t\tifTrue: [nil]\r\t\t\t\t\t\tifFalse:\t[(informee isKindOf: Symbol)\r\t\t\t\t\t\t\tifTrue:\r\t\t\t\t\t\t\t\t[Smalltalk at: informee]\r\t\t\t\t\t\t\tifFalse:\r\t\t\t\t\t\t\t\t[informee]].\r\tchangeSelector  _ aChangeSelector! !\r\r\r!Preference methodsFor: 'menu' stamp: 'sw 4/13/2001 00:01'!\rcopyName\r\t\"Copy the name of the given preference to the clipboard\"\r\r\tClipboard clipboardText: name asString asText! !\r\r!Preference methodsFor: 'menu' stamp: 'sw 4/10/2001 15:02'!\rname\r\t\"Answer this preference's name\"\r\r\t^ name! !\r\r\r!Preference methodsFor: 'value' stamp: 'sw 4/10/2001 15:01'!\rdefaultValue\r\t\"Answer this preference's defaultValue\"\r\r\t^ defaultValue! !\r\r!Preference methodsFor: 'value' stamp: 'sw 4/10/2001 15:35'!\rpreferenceValue\r\t\"Answer the current value of the preference\"\r\r\t^ value! !\r\r!Preference methodsFor: 'value' stamp: 'sw 4/12/2001 23:28'!\rpreferenceValue: aValue\r\t\"set the value as indicated, and invoke the change selector if appropriate\"\r\r\t| oldValue |\r\toldValue _ value.\r\tvalue _ aValue.\r\toldValue ~~ value ifTrue:\r\t\t[self notifyInformeeOfChange]! !\r\r!Preference methodsFor: 'value' stamp: 'sw 4/12/2001 23:28'!\rrawValue: aValue\r\t\"set the value as indicated, with no side effects\"\r\r\tvalue _ aValue! !\r\r!Preference methodsFor: 'value' stamp: 'sw 4/12/2001 00:04'!\rrestoreDefaultValue\r\t\"restore the default value to the preference\"\r\r\tvalue _ defaultValue! !\r\r!Preference methodsFor: 'value' stamp: 'sw 4/12/2001 00:04'!\rtogglePreferenceValue\r\t\"Toggle whether the value of the preference\"\r\r\tvalue _ value not.\r\tself notifyInformeeOfChange! !\r\r\r!Preference methodsFor: 'local to project' stamp: 'sw 4/10/2001 01:14'!\rlocalToProject\r\t\"Answer whether this preference is project-local\"\r\r\t^ localToProject! !\r\r\r!Preference methodsFor: 'change notification' stamp: 'sw 4/12/2001 00:03'!\rnotifyInformeeOfChange\r\t\"If there is a changeInformee, notify her that I have changed value\"\r\r\tchangeInformee ifNotNil: [changeInformee perform: changeSelector]! !\r\r\r!Preference methodsFor: 'debugging' stamp: 'sw 4/13/2001 00:05'!\rprintOn: aStream\r\t\"Print a string decribing the receiver to the given stream\"\r\r\tsuper printOn: aStream.\r\taStream nextPutAll: name storeString, ' ', value storeString! !\r\r\r!Preference methodsFor: 'as yet unclassified' stamp: 'BG 10/31/2003 14:32'!\rchangeInformee\r\r  ^changeInformee! !\r\r!Preference methodsFor: 'as yet unclassified' stamp: 'BG 10/31/2003 14:47'!\rdeleteInformee\r\r  changeInformee := nil! !\rObject subclass: #Preferences\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'DesktopColor DictionaryOfPreferences Parameters'\r\tpoolDictionaries: ''\r\tcategory: 'System-Support'!\r!Preferences commentStamp: '<historical>' prior: 0!\rA general mechanism to store preference choices.  The default setup treats any symbol as a potential boolean flag; flags unknown to the preference dictionary are always returned as false.  \r\r\tTo open the control panel:\t\tPreferences openFactoredPanel\r\tTo read how to use the panel (and how to make a preference be per-project):\r\t\t Preferences giveHelpWithPreferences\r\rAll messages are on the class side.\r\rTo query a a preference:\r\tPreferences logDebuggerStackToFile\ror some people prefer the more verbose\r\tPreferences valueOfFlag: #logDebuggerStackToFile\r\rYou can make up a new preference any time.  Do not define a new message in Preferences class. Accessor methods are compiled automatically when you add a preference as illustrated below:\r\rTo add a preference (e.g. in the Postscript of a fileout):\r\tPreferences addPreference: #samplePreference categories: #(general browsing)\r\t\tdefault: true balloonHelp: 'This is an example of a preference added by a do-it'\r\t\tprojectLocal: false changeInformee: nil changeSelector: nil.\r\rTo change a preference programatically:\r\tPreferences disable: #logDebuggerStackToFile.\rOr to turn it on,\r\tPreferences enable: #logDebuggerStackToFile.\r!\r]style[(220 29 81 35 812)f1,f1dPreferences openFactoredPanel;;,f1,f1dPreferences giveHelpWithPreferences;;,f1!\r\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rPreferences class\r\tinstanceVariableNames: ''!\r\r!Preferences class methodsFor: 'add preferences' stamp: 'sw 4/10/2001 14:55'!\raddPreference: prefSymbol categories: categoryList default: defaultValue balloonHelp: helpString \r\t\"Add an item repreesenting the given preference symbol to the system\"\r\r\tself addPreference: prefSymbol  categories: categoryList  default:  defaultValue balloonHelp: helpString  projectLocal: false  changeInformee: nil changeSelector: nil! !\r\r!Preferences class methodsFor: 'add preferences' stamp: 'sw 8/19/2001 08:28'!\raddPreference: prefSymbol categories: categoryList default: aValue balloonHelp: helpString projectLocal: localBoolean changeInformee: informeeSymbol  changeSelector: aChangeSelector\r\t\"Add or replace a preference as indicated.  Reuses the preexisting Preference object for this symbol, if there is one, so that UI artifacts that interact with it will remain valid.\"\r\r\t| aPreference |\r\taPreference _ DictionaryOfPreferences at: prefSymbol ifAbsent: [Preference new].\r\taPreference name: prefSymbol defaultValue: aValue helpString: helpString localToProject: localBoolean categoryList: categoryList changeInformee: informeeSymbol changeSelector:  aChangeSelector.\r\tDictionaryOfPreferences at: prefSymbol put: aPreference.\r\tself compileAccessMethodForPreference: aPreference! !\r\r!Preferences class methodsFor: 'add preferences' stamp: 'sw 2/5/2001 22:20'!\raddPreference: prefSymbol category: categorySymbol default: defaultValue balloonHelp: helpString \r\t\"Add the given preference, putting it in the given category, with the given default value, and with the given balloon help\"\r\r\tself addPreference: prefSymbol categories: {categorySymbol} default: defaultValue balloonHelp: helpString ! !\r\r\r!Preferences class methodsFor: 'fonts' stamp: 'laza 3/25/2004 23:10'!\rchooseCodeFont\r\t\"Not currently sent, but once protocols are sorted out so that we can disriminate on whether a text object being launched is for code or not, will be reincorporated\"\r\r\tself chooseFontWithPrompt: 'standard code font' andSendTo: self withSelector: #setCodeFontTo: highlight: self standardCodeFont.! !\r\r!Preferences class methodsFor: 'fonts' stamp: 'BG 8/18/2004 14:53'!\rchooseFontWithPrompt: aPrompt andSendTo: aReceiver withSelector: aSelector highlight: currentFont\r\tTextStyle mvcPromptForFont: aPrompt andSendTo: aReceiver withSelector: aSelector! !\r\r!Preferences class methodsFor: 'fonts' stamp: 'laza 3/25/2004 23:11'!\rchooseListFont\r\tself chooseFontWithPrompt: 'standard list font' andSendTo: self withSelector: #setListFontTo: highlight: self standardListFont! !\r\r!Preferences class methodsFor: 'fonts' stamp: 'laza 3/25/2004 23:11'!\rchooseMenuFont\r\tself chooseFontWithPrompt: 'standard menu font' andSendTo: self withSelector: #setMenuFontTo: highlight: self standardMenuFont! !\r\r!Preferences class methodsFor: 'fonts' stamp: 'laza 3/25/2004 23:11'!\rchooseSystemFont\r\tself chooseFontWithPrompt: 'Default text font' andSendTo: self withSelector: #setSystemFontTo: highlight: (TextConstants at: #DefaultTextStyle) defaultFont! !\r\r!Preferences class methodsFor: 'fonts' stamp: 'laza 3/25/2004 23:11'!\rchooseWindowTitleFont\r\tself chooseFontWithPrompt: 'window title font' andSendTo: self withSelector: #setWindowTitleFontTo: highlight: self windowTitleFont! !\r\r!Preferences class methodsFor: 'fonts' stamp: 'BG 10/30/2003 21:20'!\rpresentMvcFontConfigurationMenu\r\t| aMenu result |\r\taMenu _ CustomMenu new.\r\taMenu title: 'Standard System Fonts'.\r\taMenu add: 'default text font...' action: #chooseSystemFont.\r\taMenu add: 'list font...' action: #chooseListFont.\r\taMenu add: 'menu font...' action: #chooseMenuFont.\r\taMenu add: 'window-title font...' action: #chooseWindowTitleFont.\r\t\"aMenu add: 'code font...' action: #chooseCodeFont.\"\r\taMenu addLine.\r\taMenu add: 'restore default font choices' action: #restoreDefaultFonts.\r\r\t(result _ aMenu startUp) ifNotNil:\r\t\t[self perform: result]\r! !\r\r!Preferences class methodsFor: 'fonts' stamp: 'BG 10/30/2003 21:20'!\rrestoreDefaultFonts\r\t\"Preferences restoreDefaultFonts\"\r\t#(\t(setButtonFontTo:\t\tComicBold\t\t16)\r\t\t\"(setCodeFontTo:\t\t\tNewYork\t\t12)\"  \"Later\"\r\t\t(setListFontTo:\t\t\tNewYork\t\t12)\r\t\t(setMenuFontTo:\t\t\tNewYork\t\t12)\r\t\t(setWindowTitleFontTo:\tNewYork\t\t15)\r\t\t(setSystemFontTo:\t\tNewYork\t\t12)) do:\r\t\t\t[:triplet |\r\t\t\t\tself perform: triplet first with: (StrikeFont familyName: triplet second size: triplet third)].\r\r\tSmalltalk at: #BalloonMorph ifPresent:\r\t\t[:thatClass | thatClass setBalloonFontTo: (StrikeFont familyName: #ComicPlain size: 12)].\r\r\t\"Note:  The standardCodeFont is not currently used -- the default font is instead; later hopefully we can split the code font out as  a separate choice, but only after we're able to have the protocols reorganized such that we can know whether it's code or not when we launch the text object.\r\r\tNote:  The standard button font is reset by this code but is not otherwise settable by a public UI (too many things can go afoul) \"! !\r\r!Preferences class methodsFor: 'fonts' stamp: 'sw 12/8/1999 22:06'!\rsetButtonFontTo: aFont\r\tParameters at: #standardButtonFont put: aFont! !\r\r!Preferences class methodsFor: 'fonts' stamp: 'BG 10/28/2003 19:52'!\rsetCodeFontTo: aFont\r\t\"Not currently sent, but once protocols are sorted out so that we can discriminate on whether a text object being launched is for code or not, might deserve to be reincorporated\"\r\r\tParameters at: #standardCodeFont put: aFont.\r! !\r\r!Preferences class methodsFor: 'fonts' stamp: 'BG 10/28/2003 19:52'!\rsetListFontTo: aFont\r\t\"Set the list font as indicated\"\r\r\tParameters at: #standardListFont put: aFont.\r\tListParagraph initialize.\r! !\r\r!Preferences class methodsFor: 'fonts' stamp: 'sw 12/8/1999 18:04'!\rsetMenuFontTo: aFont\r\r\tParameters at: #standardMenuFont put: aFont.\r\tPopUpMenu setMenuFontTo: aFont! !\r\r!Preferences class methodsFor: 'fonts' stamp: 'BG 10/28/2003 19:52'!\rsetSystemFontTo: aFont\r\t\"Establish the default text font and style\"\r\r\t| aStyle newDefaultStyle |\r\taFont ifNil: [^ self].\r\taStyle _ aFont textStyle ifNil: [^ self].\r\tnewDefaultStyle _ aStyle copy.\r\tnewDefaultStyle defaultFontIndex: (aStyle fontIndexOf: aFont).\r\tTextConstants at: #DefaultTextStyle put: newDefaultStyle.\r! !\r\r!Preferences class methodsFor: 'fonts' stamp: 'BG 10/28/2003 19:52'!\rsetWindowTitleFontTo: aFont\r\t\"Set the window-title font to be as indicated\"\r\r\tParameters at: #windowTitleFont put: aFont.\r\tStandardSystemView setLabelStyle.! !\r\r!Preferences class methodsFor: 'fonts' stamp: 'sw 12/8/1999 16:13'!\rstandardButtonFont\r\t\"Answer an attractive font to use for buttons\"\r\t\"Answer the font to be used for textual flap tab labels\"\r\t^ Parameters at: #standardButtonFont ifAbsent:\r\t\t[Parameters at: #standardButtonFont put: (StrikeFont familyName: #ComicBold size: 16)]! !\r\r!Preferences class methodsFor: 'fonts' stamp: 'sw 12/8/1999 16:58'!\rstandardCodeFont\r\t\"Answer the font to be used in code\"\r\r\t ^ Parameters at: #standardCodeFont ifAbsent:\r\t\t[Parameters at: #standardCodeFont put: TextStyle defaultFont]! !\r\r!Preferences class methodsFor: 'fonts' stamp: 'sw 12/8/1999 16:09'!\rstandardListFont\r\t\"Answer the font to be used in lists\"\r\r\t ^ Parameters at: #standardListFont ifAbsent:\r\t\t[Parameters at: #standardListFont put: TextStyle defaultFont]! !\r\r!Preferences class methodsFor: 'fonts' stamp: 'sw 12/8/1999 16:58'!\rstandardMenuFont\r\t\"Answer the font to be used in menus\"\r\r\t ^ Parameters at: #standardMenuFont ifAbsent:\r\t\t[Parameters at: #standardMenuFont put: TextStyle defaultFont]! !\r\r!Preferences class methodsFor: 'fonts' stamp: 'sw 12/8/1999 16:10'!\rwindowTitleFont\r\t\"Answer the standard font to use for window titles\"\r\t^  Parameters at: #windowTitleFont ifAbsent:\r\t\t[Parameters at: #windowTitleFont put: (StrikeFont familyName: #NewYork size: 15)]! !\r\r\r!Preferences class methodsFor: 'get/set' stamp: 'sw 4/12/2001 23:29'!\rdisable: aSymbol\r\t\"Shorthand access to enabling a preference of the given name.  If there is none in the image, conjure one up\"\r\r\t| aPreference |\r\taPreference _ self preferenceAt: aSymbol ifAbsent:\r\t\t[self addPreference: aSymbol category: 'unclassified' default: false balloonHelp: 'this preference was added idiosyncratically and has no help message.'.\r\t\tself preferenceAt: aSymbol].\r\taPreference preferenceValue: false! !\r\r!Preferences class methodsFor: 'get/set' stamp: 'sw 1/19/2000 13:51'!\rdisableGently: preferenceNameSymbol\r\t\"Unlike #disable:, this on does not reset the CategoryInfo cache\"\r\tself setPreference: preferenceNameSymbol toValue: false! !\r\r!Preferences class methodsFor: 'get/set' stamp: 'sw 11/11/1998 11:40'!\rdoesNotUnderstand: aMessage\r\t\"Look up the message selector as a flag.\"\r\taMessage arguments size > 0 ifTrue: [^ super doesNotUnderstand: aMessage].\r\t^ self valueOfFlag: aMessage selector\r! !\r\r!Preferences class methodsFor: 'get/set' stamp: 'sw 1/19/2000 13:53'!\renableGently: preferenceNameSymbol\r\t\"Unlike #enable:, this one does not reset the CategoryInfo cache\"\r\tself setPreference: preferenceNameSymbol toValue: true! !\r\r!Preferences class methodsFor: 'get/set' stamp: 'sw 4/12/2001 23:29'!\rsetPreference: prefSymbol toValue: aBoolean\r\t\"Set the given preference to the given value, and answer that value\"\r\r\t^ (self preferenceAt: prefSymbol ifAbsent: [^ aBoolean]) preferenceValue: aBoolean! !\r\r!Preferences class methodsFor: 'get/set' stamp: 'sw 4/12/2001 00:04'!\rtogglePreference: prefSymbol\r\t\"Toggle the given preference\"\r\r\t(self preferenceAt: prefSymbol ifAbsent: [self error: 'unknown preference: ', prefSymbol]) togglePreferenceValue! !\r\r!Preferences class methodsFor: 'get/set' stamp: 'sw 4/13/2001 01:07'!\rvalueOfFlag: aFlagName\r\t\"Answer the value of the given flag\"\r\r\t^ (self preferenceAt: aFlagName ifAbsent: [^ false]) preferenceValue! !\r\r!Preferences class methodsFor: 'get/set' stamp: 'sw 4/13/2001 01:07'!\rvalueOfFlag: aFlagName ifAbsent: booleanValuedBlock\r\t\"Answer the value of the given flag\"\r\r\t^ (self preferenceAt: aFlagName ifAbsent: [^ booleanValuedBlock value]) preferenceValue! !\r\r\r!Preferences class methodsFor: 'hard-coded prefs' stamp: 'ar 1/31/2001 17:06'!\rbrowseToolClass\r\t^ Preferences browserShowsPackagePane\r\t\tifTrue:\r\t\t\t[PackagePaneBrowser]\r\t\tifFalse:\r\t\t\t[Browser]! !\r\r!Preferences class methodsFor: 'hard-coded prefs' stamp: 'programmatic 7/15/1999 09:55'!\rcmdKeysInText\r\t\"compiled programatically -- return hard-coded preference value\"\r\t^ true! !\r\r\r!Preferences class methodsFor: 'initialization' stamp: 'sw 4/10/2001 15:28'!\rchooseInitialSettings\r\t\"Restore the default choices for all of the standard Preferences.\"\r\r\tself allPreferenceObjects do:\r\t\t[:aPreference |\r\t\t\taPreference restoreDefaultValue].\r\tProject current installProjectPreferences! !\r\r!Preferences class methodsFor: 'initialization' stamp: 'NS 1/28/2004 14:43'!\rcompileAccessMethodForPreference: aPreference\r\t\"Compile an accessor method for the given preference\"\r\r\tself class compileSilently: (aPreference name, '\r\t^ self valueOfFlag: #', aPreference name, ' ifAbsent: [', aPreference defaultValue storeString, ']') classified: 'standard queries'! !\r\r\r!Preferences class methodsFor: 'misc' stamp: 'sw 10/6/1999 15:20'!\raddModelItemsToWindowMenu: aMenu\r\taMenu addLine.\r\taMenu add: 'restore default preference settings' target: self action: #chooseInitialSettings.\r\taMenu add: 'restore default text highlighting' target: self action: #initializeTextHighlightingParameters! !\r\r!Preferences class methodsFor: 'misc' stamp: 'sw 1/4/2001 06:56'!\rsetFlag: prefSymbol toValue: aBoolean during: aBlock\r\t\"Set the flag to the given value for the duration of aBlock\"\r\r\t| existing |\r\texisting _ self valueOfFlag: prefSymbol.\r\texisting == aBoolean ifFalse: [self setPreference: prefSymbol toValue: aBoolean].\r\taBlock value.\r\texisting == aBoolean ifFalse: [self setPreference: prefSymbol toValue: existing]! !\r\r!Preferences class methodsFor: 'misc' stamp: 'dgd 10/17/2003 12:14'!\rsoundEnablingString\r\t^ self soundsEnabled\r\t\tifFalse:\r\t\t\t['turn sound on' translated]\r\t\tifTrue:\r\t\t\t['turn sound off' translated]! !\r\r!Preferences class methodsFor: 'misc' stamp: 'dgd 9/21/2003 13:46'!\rstaggerPolicyString\r\t\"Answer the string to be shown in a menu to represent the \r\tstagger-policy status\"\r\t^ ((self valueOfFlag: #reverseWindowStagger)\r\t\tifTrue: ['<yes>']\r\t\tifFalse: ['<no>']), 'stagger windows' translated! !\r\r!Preferences class methodsFor: 'misc' stamp: 'sw 6/11/1999 20:49'!\rtoggleWindowPolicy\r\tself togglePreference: #reverseWindowStagger! !\r\r!Preferences class methodsFor: 'misc' stamp: 'sw 8/29/2000 16:12'!\rwantsChangeSetLogging\r\t\"Answer whether method changes in the receiver should be logged to current change set.  This circumlocution avoids such logging for programmatically-compiled methods in Preferences, removing an annoyance\"\r\r\t^ Utilities authorInitialsPerSe  ~= 'programmatic'! !\r\r\r!Preferences class methodsFor: 'parameters' stamp: 'sw 2/17/1999 00:40'!\rdefaultAnnotationRequests\r\t^ Parameters at: #MethodAnnotations ifAbsent:\r\t\t[self setDefaultAnnotationInfo]\r\t\"Preferences annotationInfo\"! !\r\r!Preferences class methodsFor: 'parameters' stamp: 'sma 6/1/2000 12:08'!\rdefaultAuthorName\r\t\"Answer the author name to be planted, by default, in a changeset-preamble template.  You can hard-code this to hold your name, thus saving you time when writing the preambles of subsequent changesets\"\r\r\t^ Utilities authorName! !\r\r!Preferences class methodsFor: 'parameters' stamp: 'jhm 10/15/97 17:31'!\rdesktopColor\r\t\"Answer the desktop color. Initialize it if necessary.\"\r\t\r\tDesktopColor == nil ifTrue: [DesktopColor _ Color gray].\r\t^ DesktopColor\r! !\r\r!Preferences class methodsFor: 'parameters' stamp: 'jhm 10/15/97 17:31'!\rdesktopColor: aColor\r\t\"Record a new desktop color preference.\"\r\r\tDesktopColor _ aColor.\r! !\r\r!Preferences class methodsFor: 'parameters' stamp: 'sw 2/7/2001 14:37'!\rparameterAt: aKey ifAbsent: aBlock\r\t\"Answer the parameter saved at the given key; if there is no such key in the Parameters dictionary, evaluate aBlock\"\r\r\t^ Parameters at: aKey ifAbsent: [aBlock value]! !\r\r!Preferences class methodsFor: 'parameters' stamp: 'sw 9/28/2001 08:40'!\rparameterAt: aKey ifAbsentPut: defaultValueBlock\r\t\"Return the Parameter setting at the given key.  If there is no entry for this key in the Parameters dictionary, create one with the value of defaultValueBlock as its value\"\r\r\t^ Parameters at: aKey ifAbsentPut: defaultValueBlock! !\r\r!Preferences class methodsFor: 'parameters'!\rscrollBarColor\r\t\"Answer the preferred color for scroll bar elevators.\"\r\r\t^ Color gray! !\r\r!Preferences class methodsFor: 'parameters'!\rscrollBarWidth\r\t\"Answer the preferred width for scroll bars.\"\r\r\t^ 8! !\r\r!Preferences class methodsFor: 'parameters' stamp: 'sw 2/17/1999 00:41'!\rsetDefaultAnnotationInfo\r\t\"Preferences setDefaultAnnotationInfo\"\r\t^ Parameters at: #MethodAnnotations put: #(timeStamp messageCategory implementorsCount allChangeSets)! !\r\r!Preferences class methodsFor: 'parameters' stamp: 'stp 01/13/2000 13:29'!\rsetParameter: paramName to: paramValue\r\t\"Set the given field in the parameters dictionary.\"\r\r\tParameters at: paramName put: paramValue! !\r\r\r!Preferences class methodsFor: 'personalization' stamp: 'sw 4/18/2002 18:02'!\rrestorePersonalPreferences\r\t\"Restore all the user's saved personal preference settings\"\r\r\t| savedPrefs |\r\tsavedPrefs _ self parameterAt: #PersonalDictionaryOfPreferences ifAbsent: [^ self inform: 'There are no personal preferences saved in this image yet'].\r\r\tsavedPrefs associationsDo:\r\t\t[:assoc | (self preferenceAt: assoc key ifAbsent: [nil]) ifNotNilDo:\r\t\t\t[:pref | pref preferenceValue: assoc value preferenceValue]]! !\r\r\r!Preferences class methodsFor: 'preference-object access' stamp: 'sw 4/13/2001 00:06'!\rallPreferenceObjects\r\t\"Answer a list of all the Preference objects registered in the system\"\r\r\t^ DictionaryOfPreferences values! !\r\r!Preferences class methodsFor: 'preference-object access' stamp: 'sw 4/13/2001 01:06'!\rpreferenceAt: aSymbol\r\t\"Answer the Preference object at the given symbol, or nil if not there\"\r\r\t^ DictionaryOfPreferences at: aSymbol ifAbsent: [nil]! !\r\r!Preferences class methodsFor: 'preference-object access' stamp: 'sw 4/13/2001 01:06'!\rpreferenceAt: aSymbol ifAbsent: aBlock\r\t\"Answer the Preference object at the given symbol, or the value of aBlock if not present\"\r\r\t^ DictionaryOfPreferences at: aSymbol ifAbsent: [aBlock value]! !\r\r\r!Preferences class methodsFor: 'preferences panel' stamp: 'sw 9/15/1999 09:15'!\rinitialExtent\r\t^ (Preferences inboardScrollbars and: [Smalltalk isMorphic])\r\t\tifFalse:\r       \t\t[219 @ 309]\r\t\tifTrue:\r\t\t\t[232 @ 309]! !\r\r!Preferences class methodsFor: 'preferences panel' stamp: 'sw 4/11/2001 23:55'!\rinspectPreferences\r\t\"Open a window on the current preferences dictionary, allowing the user to inspect and change the current preference settings.  This is fallen back upon if Morphic is not present\"\r\t\"Preferences inspectPreferences\"\r\r\tDictionaryOfPreferences inspectWithLabel: 'Preferences'\r! !\r\r!Preferences class methodsFor: 'preferences panel' stamp: 'BG 10/30/2003 21:17'!\ropenPreferencesInspector\r\t\"Open a window on the current set of preferences choices, allowing the user to view and change their settings\"\r\t\r\tself inspectPreferences! !\r\r\r!Preferences class methodsFor: 'standard queries'!\ralphabeticalProjectMenu\r\t^ self\r\t\tvalueOfFlag: #alphabeticalProjectMenu\r\t\tifAbsent: [false]! !\r\r!Preferences class methodsFor: 'standard queries'!\ralternativeBrowseIt\r\t^ self\r\t\tvalueOfFlag: #alternativeBrowseIt\r\t\tifAbsent: [false]! !\r\r!Preferences class methodsFor: 'standard queries'!\rannotationPanes\r\t^ self\r\t\tvalueOfFlag: #annotationPanes\r\t\tifAbsent: [false]! !\r\r!Preferences class methodsFor: 'standard queries'!\ransiAssignmentOperatorWhenPrettyPrinting\r\t^ self\r\t\tvalueOfFlag: #ansiAssignmentOperatorWhenPrettyPrinting\r\t\tifAbsent: [true]! !\r\r!Preferences class methodsFor: 'standard queries'!\rautoAccessors\r\t^ self\r\t\tvalueOfFlag: #autoAccessors\r\t\tifAbsent: [false]! !\r\r!Preferences class methodsFor: 'standard queries'!\rautomaticPlatformSettings\r\t^ self\r\t\tvalueOfFlag: #automaticPlatformSettings\r\t\tifAbsent: [true]! !\r\r!Preferences class methodsFor: 'standard queries'!\rbrowseWithPrettyPrint\r\t^ self\r\t\tvalueOfFlag: #browseWithPrettyPrint\r\t\tifAbsent: [false]! !\r\r!Preferences class methodsFor: 'standard queries'!\rbrowserShowsPackagePane\r\t^ self\r\t\tvalueOfFlag: #browserShowsPackagePane\r\t\tifAbsent: [false]! !\r\r!Preferences class methodsFor: 'standard queries'!\rcapitalizedReferences\r\t^ self\r\t\tvalueOfFlag: #capitalizedReferences\r\t\tifAbsent: [true]! !\r\r!Preferences class methodsFor: 'standard queries'!\rcaseSensitiveFinds\r\t^ self\r\t\tvalueOfFlag: #caseSensitiveFinds\r\t\tifAbsent: [false]! !\r\r!Preferences class methodsFor: 'standard queries'!\rchangeSetVersionNumbers\r\t^ self\r\t\tvalueOfFlag: #changeSetVersionNumbers\r\t\tifAbsent: [true]! !\r\r!Preferences class methodsFor: 'standard queries'!\rcheckForSlips\r\t^ self\r\t\tvalueOfFlag: #checkForSlips\r\t\tifAbsent: [true]! !\r\r!Preferences class methodsFor: 'standard queries'!\rclickOnLabelToEdit\r\t^ self\r\t\tvalueOfFlag: #clickOnLabelToEdit\r\t\tifAbsent: [false]! !\r\r!Preferences class methodsFor: 'standard queries'!\rcmdDotEnabled\r\t^ self\r\t\tvalueOfFlag: #cmdDotEnabled\r\t\tifAbsent: [true]! !\r\r!Preferences class methodsFor: 'standard queries'!\rcolorWhenPrettyPrinting\r\t^ self\r\t\tvalueOfFlag: #colorWhenPrettyPrinting\r\t\tifAbsent: [false]! !\r\r!Preferences class methodsFor: 'standard queries'!\rconfirmFirstUseOfStyle\r\t^ self\r\t\tvalueOfFlag: #confirmFirstUseOfStyle\r\t\tifAbsent: [true]! !\r\r!Preferences class methodsFor: 'standard queries'!\rconversionMethodsAtFileOut\r\t^ self\r\t\tvalueOfFlag: #conversionMethodsAtFileOut\r\t\tifAbsent: [false]! !\r\r!Preferences class methodsFor: 'standard queries'!\rcpuWatcherEnabled\r\t^ self\r\t\tvalueOfFlag: #cpuWatcherEnabled\r\t\tifAbsent: [false]! !\r\r!Preferences class methodsFor: 'standard queries'!\rdecorateBrowserButtons\r\t^ self\r\t\tvalueOfFlag: #decorateBrowserButtons\r\t\tifAbsent: [false]! !\r\r!Preferences class methodsFor: 'standard queries'!\rdiffsInChangeList\r\t^ self\r\t\tvalueOfFlag: #diffsInChangeList\r\t\tifAbsent: [true]! !\r\r!Preferences class methodsFor: 'standard queries'!\rdiffsWithPrettyPrint\r\t^ self\r\t\tvalueOfFlag: #diffsWithPrettyPrint\r\t\tifAbsent: [false]! !\r\r!Preferences class methodsFor: 'standard queries'!\rduplicateControlAndAltKeys\r\t^ self\r\t\tvalueOfFlag: #duplicateControlAndAltKeys\r\t\tifAbsent: [false]! !\r\r!Preferences class methodsFor: 'standard queries'!\reToyFriendly\r\t^ self\r\t\tvalueOfFlag: #eToyFriendly\r\t\tifAbsent: [false]! !\r\r!Preferences class methodsFor: 'standard queries'!\rignoreStyleIfOnlyBold\r\t^ self\r\t\tvalueOfFlag: #ignoreStyleIfOnlyBold\r\t\tifAbsent: [true]! !\r\r!Preferences class methodsFor: 'standard queries'!\rinboardScrollbars\r\t^ self\r\t\tvalueOfFlag: #inboardScrollbars\r\t\tifAbsent: [false]! !\r\r!Preferences class methodsFor: 'standard queries'!\rlogDebuggerStackToFile\r\t^ self\r\t\tvalueOfFlag: #logDebuggerStackToFile\r\t\tifAbsent: [true]! !\r\r!Preferences class methodsFor: 'standard queries'!\rmenuKeyboardControl\r\t^ self\r\t\tvalueOfFlag: #menuKeyboardControl\r\t\tifAbsent: [true]! !\r\r!Preferences class methodsFor: 'standard queries'!\roptionalButtons\r\t^ self\r\t\tvalueOfFlag: #optionalButtons\r\t\tifAbsent: [false]! !\r\r!Preferences class methodsFor: 'standard queries'!\rprintAlternateSyntax\r\t^ self\r\t\tvalueOfFlag: #printAlternateSyntax\r\t\tifAbsent: [false]! !\r\r!Preferences class methodsFor: 'standard queries'!\rprojectZoom\r\t^ self\r\t\tvalueOfFlag: #projectZoom\r\t\tifAbsent: [true]! !\r\r!Preferences class methodsFor: 'standard queries'!\rprojectsSentToDisk\r\t^ self\r\t\tvalueOfFlag: #projectsSentToDisk\r\t\tifAbsent: [false]! !\r\r!Preferences class methodsFor: 'standard queries'!\rrestartAlsoProceeds\r\t^ self\r\t\tvalueOfFlag: #restartAlsoProceeds\r\t\tifAbsent: [true]! !\r\r!Preferences class methodsFor: 'standard queries'!\rreverseWindowStagger\r\t^ self\r\t\tvalueOfFlag: #reverseWindowStagger\r\t\tifAbsent: [true]! !\r\r!Preferences class methodsFor: 'standard queries'!\rselectionsMayShrink\r\t^ self\r\t\tvalueOfFlag: #selectionsMayShrink\r\t\tifAbsent: [true]! !\r\r!Preferences class methodsFor: 'standard queries'!\rshowDeprecationWarnings\r\t^ self\r\t\tvalueOfFlag: #showDeprecationWarnings\r\t\tifAbsent: [false]! !\r\r!Preferences class methodsFor: 'standard queries'!\rshowSharedFlaps\r\t^ self\r\t\tvalueOfFlag: #showSharedFlaps\r\t\tifAbsent: [true]! !\r\r!Preferences class methodsFor: 'standard queries'!\rsmartUpdating\r\t^ self\r\t\tvalueOfFlag: #smartUpdating\r\t\tifAbsent: [true]! !\r\r!Preferences class methodsFor: 'standard queries'!\rsoundsEnabled\r\t^ self\r\t\tvalueOfFlag: #soundsEnabled\r\t\tifAbsent: [true]! !\r\r!Preferences class methodsFor: 'standard queries'!\rstartInUntrustedDirectory\r\t^ self\r\t\tvalueOfFlag: #startInUntrustedDirectory\r\t\tifAbsent: [false]! !\r\r!Preferences class methodsFor: 'standard queries'!\rswapControlAndAltKeys\r\t^ self\r\t\tvalueOfFlag: #swapControlAndAltKeys\r\t\tifAbsent: [false]! !\r\r!Preferences class methodsFor: 'standard queries'!\rswapMouseButtons\r\t^ self\r\t\tvalueOfFlag: #swapMouseButtons\r\t\tifAbsent: [false]! !\r\r!Preferences class methodsFor: 'standard queries'!\rthoroughSenders\r\t^ self\r\t\tvalueOfFlag: #thoroughSenders\r\t\tifAbsent: [true]! !\r\r!Preferences class methodsFor: 'standard queries'!\rtimeStampsInMenuTitles\r\t^ self\r\t\tvalueOfFlag: #timeStampsInMenuTitles\r\t\tifAbsent: [false]! !\r\r!Preferences class methodsFor: 'standard queries'!\rtranslationWithBabel\r\t^ self\r\t\tvalueOfFlag: #translationWithBabel\r\t\tifAbsent: [false]! !\r\r!Preferences class methodsFor: 'standard queries'!\rtwentyFourHourFileStamps\r\t^ self\r\t\tvalueOfFlag: #twentyFourHourFileStamps\r\t\tifAbsent: [true]! !\r\r!Preferences class methodsFor: 'standard queries'!\runiversalTiles\r\t^ self\r\t\tvalueOfFlag: #universalTiles\r\t\tifAbsent: [false]! !\r\r!Preferences class methodsFor: 'standard queries'!\rwarnIfNoChangesFile\r\t^ self\r\t\tvalueOfFlag: #warnIfNoChangesFile\r\t\tifAbsent: [true]! !\r\r!Preferences class methodsFor: 'standard queries'!\rwarnIfNoSourcesFile\r\t^ self\r\t\tvalueOfFlag: #warnIfNoSourcesFile\r\t\tifAbsent: [true]! !\r\r!Preferences class methodsFor: 'standard queries'!\rwarningForMacOSFileNameLength\r\t^ self\r\t\tvalueOfFlag: #warningForMacOSFileNameLength\r\t\tifAbsent: [false]! !\r\r!Preferences class methodsFor: 'standard queries'!\rwordStyleCursorMovement\r\t^ self\r\t\tvalueOfFlag: #wordStyleCursorMovement\r\t\tifAbsent: [true]! !\r\r\r!Preferences class methodsFor: 'text highlighting' stamp: 'sw 9/7/1999 13:07'!\rinitializeTextHighlightingParameters\r\t\"Preferences initializeTextHighlightingParameters\"\r\tParameters at: #insertionPointColor put: (Color r: 0.4 g: 1.0 b: 0).\r\tParameters at: #textHighlightColor put: (Color r: 0.4 g: 1.0 b: 0).! !\r\r!Preferences class methodsFor: 'text highlighting' stamp: 'sw 9/7/1999 12:53'!\rinsertionPointColor\r\t^ Parameters at: #insertionPointColor! !\r\r!Preferences class methodsFor: 'text highlighting' stamp: 'sw 9/7/1999 12:53'!\rtextHighlightColor\r\t^ Parameters at: #textHighlightColor! !\r\r\r!Preferences class methodsFor: 'themes' stamp: 'sw 5/2/2002 10:45'!\rpersonal\r\t\"Settings saved (by sometime earlier having hit the 'Save Current Settings as my Personal Preferences' in a Preferences panel) as my personal preferences\"\r\r\tself restorePersonalPreferences! !\r\r\r!Preferences class methodsFor: 'window colors' stamp: 'sw 2/26/2002 13:56'!\rinstallBrightWindowColors\r\t\"Install the factory-provided default window colors for all tools\"\r\r\t\"Preferences installBrightWindowColors\"\r\r\tself installWindowColorsVia: [:aSpec | aSpec brightColor]! !\r\r!Preferences class methodsFor: 'window colors' stamp: 'sw 2/26/2002 13:59'!\rinstallWindowColorsVia: colorSpecBlock\r\t\"Install windows colors using colorSpecBlock to deliver the color source for each element; the block is handed a WindowColorSpec object\"\r\r\t\"Preferences installBrightWindowColors\"\r\t| windowColorDict |\r\t(Parameters includesKey: #windowColors) ifFalse:\r\t\t[Parameters at: #windowColors put: IdentityDictionary new].\r\twindowColorDict _ Parameters at: #windowColors.\r\r\tself windowColorTable do:\r\t\t[:aColorSpec |\r\t\t\twindowColorDict at: aColorSpec classSymbol put: (Color colorFrom: (colorSpecBlock value: aColorSpec))]! !\r\r!Preferences class methodsFor: 'window colors' stamp: 'sw 7/13/1999 16:03'!\rwindowColorFor: aModelClassName\r\t| classToCheck windowColors |\r\t(Parameters includesKey: #windowColors) ifFalse:\r\t\t[Parameters at: #windowColors put: IdentityDictionary new.\r\t\tself installBrightWindowColors].\r\tclassToCheck _ Smalltalk at: aModelClassName.\r\twindowColors _ Parameters at: #windowColors.\r\t[windowColors includesKey: classToCheck name]\r\t\twhileFalse:\r\t\t\t[classToCheck _ classToCheck superclass].\r\t^ windowColors at: classToCheck name ifAbsent: [Color white]\r\t! !\r\r!Preferences class methodsFor: 'window colors' stamp: 'dvf 8/23/2003 12:18'!\rwindowColorTable\r\t\"Answer a list of WindowColorSpec objects, one for each tool to be represented in the window-color panel\"\r\t\r\t^ (((self systemNavigation allClassesImplementing: #windowColorSpecification) collect:\r\t\t[:aClass | aClass theNonMetaClass windowColorSpecification]) asSortedCollection:\r\t\t\t[:specOne :specTwo | specOne wording < specTwo wording]) asArray\r\r\"Preferences windowColorTable\"! !\r\r\r!Preferences class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 10:18'!\rinitialize\r\r\tself registerInFlapsRegistry.\t! !\r\r!Preferences class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 10:20'!\rregisterInFlapsRegistry\r\t\"Register the receiver in the system's flaps registry\"\r\tself environment\r\t\tat: #Flaps\r\t\tifPresent: [:cl | cl registerQuad: #(Preferences\tpreferencesControlPanel\t'Preferences'\t'Allows you to control numerous options')\r\t\t\t\t\t\tforFlapNamed: 'Tools'.\r\t\t\t\t\t\tcl registerQuad: #(Preferences\t\t\tannotationEditingWindow\t'Annotations'\t\t'Allows you to specify the annotations to be shown in the annotation panes of browsers, etc.')\r\t\t\t\t\t\tforFlapNamed: 'Tools'.]! !\r\r!Preferences class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 12:38'!\runload\r\t\"Unload the receiver from global registries\"\r\r\tself environment at: #Flaps ifPresent: [:cl |\r\tcl unregisterQuadsWithReceiver: self] ! !\r\r\r!Preferences class methodsFor: 'as yet unclassified' stamp: 'BG 10/31/2003 14:46'!\rremoveObsoleteInstances\r \"Preferences removeObsoleteInstances\"\r    | oc |\r oc := OrderedCollection new.\r\rPreference allInstances\r  collect: [:item | ( item changeInformee notNil and: [item changeInformee isObsolete])\r         ifTrue: [item deleteInformee]\r          ].! !\rTextDiffBuilder subclass: #PrettyTextDiffBuilder\r\tinstanceVariableNames: 'sourceClass'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-File Contents Browser'!\r\r!PrettyTextDiffBuilder methodsFor: 'initialize' stamp: 'nk 10/29/2000 12:16'!\rsourceClass: aClass\r\tsourceClass _ aClass.! !\r\r!PrettyTextDiffBuilder methodsFor: 'initialize' stamp: 'nk 10/29/2000 12:20'!\rsplit: aString \r\t| formatted |\r\tformatted _ sourceClass compilerClass new\rformat: aString\r\t\t\t\tin: sourceClass\r\t\t\t\tnotifying: nil\r\t\t\t\tdecorated: false.\r\t^super split: formatted! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rPrettyTextDiffBuilder class\r\tinstanceVariableNames: ''!\r\r!PrettyTextDiffBuilder class methodsFor: 'instance creation' stamp: 'nk 10/29/2000 12:35'!\rfrom: srcString to: dstString inClass: srcClass \r\t^ (self new sourceClass: srcClass) from: srcString to: dstString\r\t\t!\r]style[(6 9 5 9 10 8 6 4 18 8 8 9 5 9 3)f1b,f1cblack;b,f1b,f1cblack;b,f1b,f1cblack;b,f1,f1cblack;,f1,f1cblack;,f1,f1cblack;,f1,f1cblack;,f1! !\rLink subclass: #Process\r\tinstanceVariableNames: 'suspendedContext priority myList errorHandler name'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Processes'!\r!Process commentStamp: '<historical>' prior: 0!\rI represent an independent path of control in the system. This path of control may be stopped (by sending the message suspend) in such a way that it can later be restarted (by sending the message resume). When any one of several paths of control can be advanced, the single instance of ProcessorScheduler named Processor determines which one will actually be advanced partly using the value of priority.\r\r(If anyone ever makes a subclass of Process, be sure to use allSubInstances in anyProcessesAbove:.)!\r\r\r!Process methodsFor: 'changing process state' stamp: 'tpr 2/14/2001 10:00'!\rprimitiveResume\r\t\"Primitive. Allow the process that the receiver represents to continue. Put \r\tthe receiver in line to become the activeProcess. Fail if the receiver is \r\talready waiting in a queue (in a Semaphore or ProcessScheduler). \r\tEssential. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 87>\r\tself primitiveFailed! !\r\r!Process methodsFor: 'changing process state' stamp: 'ajh 7/20/2003 22:51'!\rprimitiveSuspend\r\t\"Primitive. Stop the process that self represents in such a way \r\tthat it can be restarted at a later time (by sending #resume).\r\tASSUMES self is the active process.\r\tEssential. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 88>\r\tself primitiveFailed! !\r\r!Process methodsFor: 'changing process state' stamp: 'tpr 2/14/2001 10:03'!\rresume\r\t\"Allow the process that the receiver represents to continue. Put  \r\tthe receiver in line to become the activeProcess. Check for a nil \r\tsuspendedContext, which indicates a previously terminated Process that \r\twould cause a vm crash if the resume attempt were permitted\"\r\r\tsuspendedContext ifNil: [^ self primitiveFailed].\r\t^ self primitiveResume! !\r\r!Process methodsFor: 'changing process state' stamp: 'ajh 7/20/2003 22:47'!\rsuspend\r\t\"Stop the process that the receiver represents in such a way \r\tthat it can be restarted at a later time (by sending the receiver the \r\tmessage resume). If the receiver represents the activeProcess, suspend it. \r\tOtherwise remove the receiver from the list of waiting processes.\"\r\r\tself isActiveProcess ifTrue: [\r\t\tmyList _ nil.\r\t\tself primitiveSuspend.\r\t] ifFalse: [\r\t\tmyList ifNotNil: [\r\t\t\tmyList remove: self ifAbsent: [].\r\t\t\tmyList _ nil].\r\t]\r! !\r\r!Process methodsFor: 'changing process state' stamp: 'nk 6/21/2004 14:07'!\rterminate \r\t\"Stop the process that the receiver represents forever.  Unwind to execute pending ensure:/ifCurtailed: blocks before terminating.\"\r\r\t| ctxt unwindBlock |\r\tself isActiveProcess ifTrue: [\r\t\tctxt _ thisContext.\r\t\t[\tctxt _ ctxt findNextUnwindContextUpTo: nil.\r\t\t\tctxt isNil\r\t\t] whileFalse: [\r\t\t\tunwindBlock _ ctxt tempAt: 1.\r\t\t\tunwindBlock ifNotNil: [\r\t\t\t\tctxt tempAt: 1 put: nil.\r\t\t\t\tthisContext terminateTo: ctxt.\r\t\t\t\tunwindBlock value].\r\t\t].\r\t\tthisContext terminateTo: nil.\r\t\tmyList _ nil.\r\t\tself primitiveSuspend.\r\t] ifFalse: [\r\t\tmyList ifNotNil: [\r\t\t\tmyList remove: self ifAbsent: [].\r\t\t\tmyList _ nil].\r\t\tsuspendedContext ifNotNil: [\r\t\t\tctxt _ self popTo: suspendedContext bottomContext.\r\t\t\tctxt == suspendedContext bottomContext ifFalse: [\r\t\t\t\tself debug: ctxt title: 'Unwind error during termination']].\r\t].\r! !\r\r\r!Process methodsFor: 'changing suspended state' stamp: 'ajh 1/24/2003 16:14'!\ractivateReturn: aContext value: value\r\t\"Activate 'aContext return: value', so execution will return to aContext's sender\"\r\r\t^ suspendedContext _ suspendedContext activateReturn: aContext value: value! !\r\r!Process methodsFor: 'changing suspended state' stamp: 'ajh 3/5/2004 03:13'!\rcomplete: aContext \r\t\"Run self until aContext is popped or an unhandled error is raised.  Return self's new top context, unless an unhandled error was raised then return the signaler context (rather than open a debugger).\"\r\t\r\t| ctxt pair error |\r\tctxt _ suspendedContext.\r\tsuspendedContext _ nil.  \"disable this process while running its stack in active process below\"\r\tpair _ ctxt runUntilErrorOrReturnFrom: aContext.\r\tsuspendedContext _ pair first.\r\terror _ pair second.\r\terror ifNotNil: [^ error signalerContext].\r\t^ suspendedContext! !\r\r!Process methodsFor: 'changing suspended state' stamp: 'ajh 1/24/2003 10:16'!\rcompleteStep: aContext \r\t\"Resume self until aContext is on top, or if already on top, complete next step\"\r\r\t| callee |\r\tself suspendedContext == aContext ifFalse: [\r\t\t^ self complete: (self calleeOf: aContext)].\r\tcallee _ self step.\r\tcallee == aContext ifTrue: [^ callee].\r\taContext isDead ifTrue: [^ self suspendedContext].  \"returned\"\r\t^ self complete: callee  \"finish send\"! !\r\r!Process methodsFor: 'changing suspended state' stamp: 'ajh 3/5/2004 03:26'!\rpopTo: aContext \r\t\"Pop self down to aContext by remote returning from aContext's callee.  Unwind blocks will be executed on the way.\r\tThis is done by pushing a new context on top which executes 'aContext callee return' then resuming self until aContext is reached.  This way any errors raised in an unwind block will get handled by senders in self and not by senders in the activeProcess.\r\tIf an unwind block raises an error that is not handled then the popping stops at the error and the signalling context is returned, othewise aContext is returned.\"\r\r\t| callee |\r\tself == Processor activeProcess\r\t\tifTrue: [^ self error: 'The active process cannot pop contexts'].\r\tcallee _ (self calleeOf: aContext) ifNil: [^ aContext].  \"aContext is on top\"\r\t^ self return: callee value: callee receiver! !\r\r!Process methodsFor: 'changing suspended state' stamp: 'ajh 1/23/2003 20:40'!\rrestartTop\r\t\"Rollback top context and replace with new method.  Assumes self is suspended\"\r\r\tsuspendedContext privRefresh! !\r\r!Process methodsFor: 'changing suspended state' stamp: 'ajh 1/23/2003 20:33'!\rrestartTopWith: method\r\t\"Rollback top context and replace with new method.  Assumes self is suspended\"\r\r\tsuspendedContext privRefreshWith: method.\r! !\r\r!Process methodsFor: 'changing suspended state' stamp: 'ajh 3/5/2004 03:26'!\rreturn: aContext value: value\r\t\"Pop thread down to aContext's sender.  Execute any unwind blocks on the way.  See #popTo: comment and #runUntilErrorOrReturnFrom: for more details.\"\r\r\tsuspendedContext == aContext ifTrue: [\r\t\t^ suspendedContext _ aContext return: value from: aContext].\r\tself activateReturn: aContext value: value.\r\t^ self complete: aContext.\r! !\r\r!Process methodsFor: 'changing suspended state' stamp: 'ajh 1/24/2003 10:17'!\rstep\r\r\t^ suspendedContext _ suspendedContext step! !\r\r!Process methodsFor: 'changing suspended state' stamp: 'ajh 1/31/2003 14:45'!\rstep: aContext \r\t\"Resume self until aContext is on top, or if already on top, do next step\"\r\r\t^ self suspendedContext == aContext\r\t\tifTrue: [self step]\r\t\tifFalse: [self complete: (self calleeOf: aContext)]! !\r\r!Process methodsFor: 'changing suspended state' stamp: 'ajh 1/23/2003 22:06'!\rstepToCallee\r\t\"Step until top context changes\"\r\r\t| ctxt |\r\tctxt _ suspendedContext.\r\t[ctxt == suspendedContext] whileTrue: [\r\t\tsuspendedContext _ suspendedContext step].\r\t^ suspendedContext! !\r\r!Process methodsFor: 'changing suspended state' stamp: 'ajh 7/18/2003 22:13'!\rstepToHome: aContext \r\t\"Resume self until the home of top context is aContext.  Top context may be a block context.\"\r\r\t| home ctxt |\r\thome _ aContext home.\r\t[\tctxt _ self step.\r\t\thome == ctxt home.\r\t] whileFalse: [\r\t\thome isDead ifTrue: [^ self suspendedContext].\r\t].\r\t^ self suspendedContext! !\r\r!Process methodsFor: 'changing suspended state' stamp: 'ajh 1/24/2003 10:17'!\rstepToSendOrReturn\r\r\t^ suspendedContext _ suspendedContext stepToSendOrReturn! !\r\r\r!Process methodsFor: 'accessing' stamp: 'ajh 1/24/2003 14:53'!\rcalleeOf: aContext\r\t\"Return the context whose sender is aContext.  Return nil if aContext is on top.  Raise error if aContext is not in process chain.\"\r\r\tsuspendedContext == aContext ifTrue: [^ nil].\r\t^ (suspendedContext findContextSuchThat: [:c | c sender == aContext])\r\t\tifNil: [self error: 'aContext not in process chain']! !\r\r!Process methodsFor: 'accessing' stamp: 'ajh 1/24/2003 19:44'!\risActiveProcess\r\r\t^ self == Processor activeProcess! !\r\r!Process methodsFor: 'accessing' stamp: 'nk 10/28/2000 19:55'!\risSuspended\r\t^myList isNil! !\r\r!Process methodsFor: 'accessing' stamp: 'ajh 3/4/2004 22:18'!\risTerminated\r\r\tself isActiveProcess ifTrue: [^ false].\r\t^ suspendedContext isNil or: [\r\t\tsuspendedContext == suspendedContext bottomContext and: [\r\t\t\tsuspendedContext pc > suspendedContext startpc]]! !\r\r!Process methodsFor: 'accessing' stamp: 'svp 12/5/2002 14:42'!\rname\r\n\r\n\t^name ifNil: [ self hash asString forceTo: 5 paddingStartWith: $ ]! !\r\r!Process methodsFor: 'accessing' stamp: 'svp 12/5/2002 14:42'!\rname: aString\r\n\r\n\tname _ aString! !\r\r!Process methodsFor: 'accessing'!\roffList\r\t\"Inform the receiver that it has been taken off a list that it was \r\tsuspended on. This is to break a backpointer.\"\r\r\tmyList _ nil! !\r\r!Process methodsFor: 'accessing'!\rpriority\r\t\"Answer the priority of the receiver.\"\r\r\t^priority! !\r\r!Process methodsFor: 'accessing' stamp: 'ar 7/8/2001 17:04'!\rpriority: anInteger \r\t\"Set the receiver's priority to anInteger.\"\r\t(anInteger >= Processor lowestPriority and:[anInteger <= Processor highestPriority])\r\t\tifTrue: [priority _ anInteger]\r\t\tifFalse: [self error: 'Invalid priority: ', anInteger printString]! !\r\r!Process methodsFor: 'accessing'!\rsuspendedContext\r\t\"Answer the context the receiver has suspended.\"\r\r\t^suspendedContext! !\r\r!Process methodsFor: 'accessing'!\rsuspendingList\r\t\"Answer the list on which the receiver has been suspended.\"\r\r\t^myList! !\r\r\r!Process methodsFor: 'printing' stamp: 'nk 10/28/2000 07:33'!\rbrowserPrintString\r\t^self browserPrintStringWith: suspendedContext! !\r\r!Process methodsFor: 'printing' stamp: 'svp 12/5/2002 14:45'!\rbrowserPrintStringWith: anObject \r\t| stream |\r\tstream _ WriteStream\r\t\t\t\ton: (String new: 100).\r\tstream nextPut: $(.\r\tpriority printOn: stream.\r\tself isSuspended\r\t\tifTrue: [stream nextPut: $s].\r\tstream nextPutAll: ') '.\r\tstream nextPutAll: self name.\r\tstream nextPut: $:.\r\tstream space.\r\tstream nextPutAll: anObject asString.\r\t^ stream contents! !\r\r!Process methodsFor: 'printing' stamp: 'ajh 10/2/2001 14:36'!\rlongPrintOn: stream\r\r\t| ctxt |\r\tsuper printOn: stream.\r\tstream cr.\r\tctxt _ self suspendedContext.\r\t[ctxt == nil] whileFalse: [\r\t\tstream space.\r\t\tctxt printOn: stream.\r\t\tstream cr.\r\t\tctxt _ ctxt sender.\r\t].\r! !\r\r!Process methodsFor: 'printing'!\rprintOn: aStream\r\r\tsuper printOn: aStream.\r\taStream nextPutAll: ' in '.\r\tsuspendedContext printOn: aStream! !\r\r\r!Process methodsFor: 'private'!\rsuspendedContext: aContext\r\r\tsuspendedContext _ aContext! !\r\r\r!Process methodsFor: 'objects from disk' stamp: 'tk 9/28/2000 15:46'!\robjectForDataStream: refStrm\r\t\"I am not allowed to be written on an object file.\"\r\r\trefStrm replace: self with: nil.\r\t^ nil! !\r\r\r!Process methodsFor: 'debugging' stamp: 'nk 10/29/2000 13:43'!\rdebug\r\tself debugWithTitle: 'Debug'.! !\r\r!Process methodsFor: 'debugging' stamp: 'ajh 7/20/2003 23:54'!\rdebug: context title: title\r\t\"Open debugger on self with context shown on top\"\r\r\tself debug: context title: title full: false.\r! !\r\r!Process methodsFor: 'debugging' stamp: 'ajh 7/20/2003 23:53'!\rdebug: context title: title full: bool\r\t\"Open debugger on self with context shown on top\"\r\r\t| topCtxt |\r\ttopCtxt _ self isActiveProcess ifTrue: [thisContext] ifFalse: [self suspendedContext].\r\t(topCtxt hasContext: context) ifFalse: [^ self error: 'context not in process'].\r\tDebugger openOn: self context: context label: title contents: nil fullView: bool.\r! !\r\r!Process methodsFor: 'debugging' stamp: 'ajh 7/20/2003 23:55'!\rdebugWithTitle: title\r\t\"Open debugger on self\"\r\r\t| context |\r\tcontext _ self isActiveProcess ifTrue: [thisContext] ifFalse: [self suspendedContext].\r\tself debug: context title: title full: true.\r! !\r\r\r!Process methodsFor: 'signaling' stamp: 'svp 9/19/2003 18:41'!\rpvtSignal: anException list: aList\r\t\"Private. This method is used to signal an exception from another\r\tprocess...the receiver must be the active process.  If the receiver \r\twas previously waiting on a Semaphore, then return the process\r\tto the waiting state after signaling the exception and if the Semaphore\r\thas not been signaled in the interim\"\r\r\t\"Since this method is not called in a normal way, we need to take care\r\tthat it doesn't directly return to the caller (because I believe that could\r\thave the potential to push an unwanted object on the caller's stack).\"\r\r\t| blocker |\r\tself isActiveProcess ifFalse: [^self].\r\tanException signal.\r\tblocker := Semaphore new.\r\t[self suspend.\r\tsuspendedContext := suspendedContext swapSender: nil.\r\taList class == Semaphore \r\t\tifTrue:\r\t\t\t[aList isSignaled\r\t\t\t\tifTrue: \r\t\t\t\t\t[aList wait.  \"Consume the signal that would have restarted the receiver\"\r\t\t\t\t\tself resume]\r\t\t\t\tifFalse:\r\t\t\t\t\t[\"Add us back to the Semaphore's list (and remain blocked)\"\r\t\t\t\t\tmyList := aList.\r\t\t\t\t\taList add: self]]\r\t\tifFalse: [self resume]] fork.\r\tblocker wait.\r\r\r! !\r\r!Process methodsFor: 'signaling' stamp: 'svp 9/19/2003 18:42'!\rsignal: anException\r\t\"Signal an exception in the receiver process...if the receiver is currently\r\tsuspended, the exception will get signaled when the receiver is resumed.  If \r\tthe receiver is blocked on a Semaphore, it will be immediately re-awakened\r\tand the exception will be signaled; if the exception is resumed, then the receiver\r\twill return to a blocked state unless the blocking Semaphore has excess signals\"\r\r\t\"If we are the active process, go ahead and signal the exception\"\r\tself isActiveProcess ifTrue: [^anException signal].\r\r\t\"Add a new method context to the stack that will signal the exception\"\r\tsuspendedContext := MethodContext\r\t\tsender: suspendedContext\r\t\treceiver: self\r\t\tmethod: (self class methodDict at: #pvtSignal:list:)\r\t\targuments: (Array with: anException with: myList).\r\r\t\"If we are on a list to run, then suspend and restart the receiver \r\t(this lets the receiver run if it is currently blocked on a semaphore).  If\r\twe are not on a list to be run (i.e. this process is suspended), then when the\r\tprocess is resumed, it will signal the exception\"\r\r\tmyList ifNotNil: [self suspend; resume].! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rProcess class\r\tinstanceVariableNames: ''!\r\r!Process class methodsFor: 'instance creation'!\rforContext: aContext priority: anInteger \r\t\"Answer an instance of me that has suspended aContext at priority \r\tanInteger.\"\r\r\t| newProcess |\r\tnewProcess _ self new.\r\tnewProcess suspendedContext: aContext.\r\tnewProcess priority: anInteger.\r\t^newProcess! !\rModel subclass: #ProcessBrowser\r\tinstanceVariableNames: 'selectedProcess selectedContext methodText processList processListIndex stackList stackListIndex sourceMap selectedClass selectedSelector searchString autoUpdateProcess deferredMessageRecipient lastUpdate startedCPUWatcher'\r\tclassVariableNames: 'Browsers SuspendedProcesses'\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Process Browser'!\r!ProcessBrowser commentStamp: '<historical>' prior: 0!\rChange Set:\t\tProcessBrowser\rDate:\t\t\t14 March 2000\rAuthor:\t\t\tNed Konz\r\remail: ned@bike-nomad.com\r\rThis is distributed under the Squeak License.\r\rAdded 14 March:\r\tCPUWatcher integration\r\tautomatically start and stop CPUWatcher\r\tadded CPUWatcher to process list menu\r\rAdded 29 October:\r\tMVC version\r\t2.8, 2.7 compatibility\r\trearranged menus\r\tadded pointer inspection and chasing\r\tadded suspend/resume\r\trecognized more well-known processes\r\tmisc. bug fixes\r\rAdded 26 October: highlight pc in source code\rAdded 27 October: added 'signal semaphore'\radded 'inspect receiver', 'explore receiver', 'message tally' to stack list menu\radded 'find context', 'next context' to process list menu\radded 'change priority' and 'debug' choices to process list menu\r\r27 October mods by Bob Arning:\r\ralters process display in Ned's ProcessBrowser to \r- show process priority\r- drop 'a Process in' that appears on each line\r- show in priority order\r- prettier names for known processes\r- fix to Utilities to forget update downloading process when it ends (1 less dead\rprocess)\r- correct stack dump for the active process\r!\r\r\r!ProcessBrowser methodsFor: 'accessing'!\rprocessList\r\t^ processList! !\r\r!ProcessBrowser methodsFor: 'accessing'!\rprocessListIndex\r\t^ processListIndex! !\r\r!ProcessBrowser methodsFor: 'accessing'!\rprocessListIndex: index \r\tprocessListIndex _ index.\r\tselectedProcess _ processList\r\t\t\t\tat: index\r\t\t\t\tifAbsent: [].\r\tself updateStackList.\r\tself changed: #processListIndex.! !\r\r!ProcessBrowser methodsFor: 'accessing' stamp: 'nk 2/16/2001 13:39'!\rselectedMethod\r\t^ methodText ifNil: [methodText _ selectedContext\r\t\t\t\t\t\tifNil: ['']\r\t\t\t\t\t\tifNotNil: [| pcRange | \r\t\t\t\t\t\t\tmethodText _ [ selectedContext sourceCode ]\r\t\t\t\t\t\t\t\tifError: [ :err :rcvr | 'error getting method text' ].\r\t\t\t\t\t\t\tpcRange _ self pcRange.\r\t\t\t\t\t\t\tmethodText asText\r\t\t\t\t\t\t\t\taddAttribute: TextColor red\r\t\t\t\t\t\t\t\tfrom: pcRange first\r\t\t\t\t\t\t\t\tto: pcRange last;\r\t\t\t\t\t\t\t\t\r\t\t\t\t\t\t\t\taddAttribute: TextEmphasis bold\r\t\t\t\t\t\t\t\tfrom: pcRange first\r\t\t\t\t\t\t\t\tto: pcRange last]]! !\r\r!ProcessBrowser methodsFor: 'accessing' stamp: 'ajh 9/7/2002 21:22'!\rselectedSelector\r\t\"Answer the class in which the currently selected context's method was  \r\tfound.\"\r\t^ selectedSelector\r\t\tifNil: [selectedSelector _ selectedContext receiver\r\t\t\t\tifNil: [| who | \r\t\t\t\t\twho _ selectedContext method.\r\t\t\t\t\tselectedClass _ who first.\r\t\t\t\t\twho last]\r\t\t\t\tifNotNil: [selectedContext methodSelector]]! !\r\r!ProcessBrowser methodsFor: 'accessing'!\rstackList\r\t^ stackList! !\r\r!ProcessBrowser methodsFor: 'accessing'!\rstackListIndex\r\t^ stackListIndex! !\r\r!ProcessBrowser methodsFor: 'accessing' stamp: 'nk 10/28/2000 08:57'!\rstackListIndex: index \r\tstackListIndex _ index.\r\tselectedContext _ nil.\r\t(stackList notNil\r\t\t\tand: [index > 0])\r\t\tifTrue: [selectedContext _ stackList\r\t\t\t\t\t\tat: index\r\t\t\t\t\t\tifAbsent: []].\r\tsourceMap _ nil.\r\tselectedClass _ nil.\r\tselectedSelector _ nil.\r\tmethodText _ nil.\r\tself changed: #stackListIndex.\r\tself changed: #selectedMethod! !\r\r!ProcessBrowser methodsFor: 'accessing' stamp: 'nk 10/28/2000 08:36'!\rtext\r\t^methodText! !\r\r\r!ProcessBrowser methodsFor: 'initialize-release' stamp: 'nk 10/31/2001 10:54'!\rinitialize\r\tmethodText _ ''.\r\tstackListIndex _ 0.\r\tsearchString _ ''.\r\tlastUpdate _ 0.\r\tstartedCPUWatcher _ Preferences cpuWatcherEnabled and: [ self startCPUWatcher ].\r\tself updateProcessList; processListIndex: 1! !\r\r!ProcessBrowser methodsFor: 'initialize-release' stamp: 'nk 3/14/2001 09:26'!\rstartCPUWatcher\r\t\"Answers whether I started the CPUWatcher\"\r\r\t| pw |\r\tpw _ Smalltalk at: #CPUWatcher ifAbsent: [ ^self ].\r\tpw ifNotNil: [\r\t\tpw isMonitoring ifFalse: [\r\t\t\tpw startMonitoringPeriod: 5 rate: 100 threshold: 0.85.\r\t\t\tself setUpdateCallbackAfter: 7.\r\t\t\t^true\r\t\t]\r\t].\r\t^false\r! !\r\r!ProcessBrowser methodsFor: 'initialize-release' stamp: 'nk 3/14/2001 09:26'!\rstopCPUWatcher\r\t| pw |\r\tpw _ Smalltalk at: #CPUWatcher ifAbsent: [ ^self ].\r\tpw ifNotNil: [\r\t\tpw stopMonitoring.\r\t\tself updateProcessList.\r\t\tstartedCPUWatcher _ false.\t\"so a manual restart won't be killed later\"\r\t]\r! !\r\r!ProcessBrowser methodsFor: 'initialize-release' stamp: 'nk 3/14/2001 08:03'!\rwindowIsClosing\r\tstartedCPUWatcher ifTrue: [ CPUWatcher stopMonitoring ]! !\r\r\r!ProcessBrowser methodsFor: 'menus' stamp: 'nk 10/26/2000 23:31'!\rselectedClass\r\t\"Answer the class in which the currently selected context's method was  \r\tfound.\"\r\t^ selectedClass\r\t\tifNil: [selectedClass _ selectedContext receiver\r\t\t\t\tifNil: [| who | \r\t\t\t\t\twho _ selectedContext method who.\r\t\t\t\t\tselectedSelector _ who last.\r\t\t\t\t\twho first]\r\t\t\t\tifNotNil: [selectedContext mclass]]! !\r\r\r!ProcessBrowser methodsFor: 'message handling' stamp: 'nk 10/28/2000 20:53'!\rperform: selector orSendTo: otherTarget \r\t\"Selector was just chosen from a menu by a user. If can respond, then  \r\tperform it on myself. If not, send it to otherTarget, presumably the  \r\teditPane from which the menu was invoked.\"\r\t(self respondsTo: selector)\r\t\tifTrue: [^ self perform: selector]\r\t\tifFalse: [^ super perform: selector orSendTo: otherTarget]! !\r\r\r!ProcessBrowser methodsFor: 'process actions' stamp: 'nk 3/8/2001 17:02'!\rchangePriority\r\t| str newPriority nameAndRules |\r\tnameAndRules _ self nameAndRulesForSelectedProcess.\r\tnameAndRules third\r\t\tifFalse: [PopUpMenu inform: 'Nope, won''t change priority of ' , nameAndRules first.\r\t\t\t^ self].\r\tstr _ FillInTheBlank request: 'New priority' initialAnswer: selectedProcess priority asString.\r\tnewPriority _ str asNumber asInteger.\r\tnewPriority\r\t\tifNil: [^ self].\r\t(newPriority < 1\r\t\t\tor: [newPriority > Processor highestPriority])\r\t\tifTrue: [PopUpMenu inform: 'Bad priority'.\r\t\t\t^ self].\r\tself class setProcess: selectedProcess toPriority: newPriority.\r\tself updateProcessList! !\r\r!ProcessBrowser methodsFor: 'process actions' stamp: 'nk 10/29/2000 10:18'!\rchasePointers\r\t| saved |\r\tselectedProcess\r\t\tifNil: [^ self].\r\tsaved _ selectedProcess.\r\t[selectedProcess _ nil.\r\t(Smalltalk includesKey: #PointerFinder)\r\t\tifTrue: [PointerFinder on: saved]\r\t\tifFalse: [self inspectPointers]]\r\t\tensure: [selectedProcess _ saved]! !\r\r!ProcessBrowser methodsFor: 'process actions' stamp: 'nk 3/8/2001 16:37'!\rdebugProcess\r\t| nameAndRules |\r\tnameAndRules _ self nameAndRulesForSelectedProcess.\r\tnameAndRules third\r\t\tifFalse: [PopUpMenu inform: 'Nope, won''t debug ' , nameAndRules first.\r\t\t\t^ self].\r\tself class debugProcess: selectedProcess.! !\r\r!ProcessBrowser methodsFor: 'process actions' stamp: 'nk 10/29/2000 10:17'!\rinspectPointers\r\t| tc pointers |\r\tselectedProcess\r\t\tifNil: [^ self].\r\ttc _ thisContext.\r\t\t\tpointers _ Smalltalk pointersTo: selectedProcess except: {self processList. tc. self}.\r\t\t\tpointers isEmpty\r\t\t\t\tifTrue: [^ self].\r\t\t\tOrderedCollectionInspector\r\t\t\t\topenOn: pointers\r\t\t\t\twithEvalPane: false\r\t\t\t\twithLabel: 'Objects pointing to ' , selectedProcess browserPrintString\r! !\r\r!ProcessBrowser methodsFor: 'process actions' stamp: 'nk 3/8/2001 13:35'!\rnameAndRulesFor: aProcess \r\t\"Answer a nickname and two flags: allow-stop, and allow-debug\"\r\taProcess == autoUpdateProcess ifTrue: [ ^{'my auto-update process'. true. true} ].\r\t^self class nameAndRulesFor: aProcess \r! !\r\r!ProcessBrowser methodsFor: 'process actions' stamp: 'nk 10/28/2000 20:31'!\rnameAndRulesForSelectedProcess\r\t\"Answer a nickname and two flags: allow-stop, and allow-debug\"\r\t^self nameAndRulesFor: selectedProcess! !\r\r!ProcessBrowser methodsFor: 'process actions' stamp: 'nk 3/8/2001 13:23'!\rresumeProcess\r\tselectedProcess\r\t\tifNil: [^ self].\r\tself class resumeProcess: selectedProcess.\r\tself updateProcessList! !\r\r!ProcessBrowser methodsFor: 'process actions' stamp: 'nk 10/29/2000 09:58'!\rsignalSemaphore\r\t(selectedProcess suspendingList isKindOf: Semaphore)\r\t\tifFalse: [^ self].\r\t[selectedProcess suspendingList signal] fork.\r\t(Delay forMilliseconds: 300) wait.\r\t\"Hate to make the UI wait, but it's convenient...\"\r\tself updateProcessList! !\r\r!ProcessBrowser methodsFor: 'process actions' stamp: 'nk 3/8/2001 13:21'!\rsuspendProcess\r\t| nameAndRules |\r\tselectedProcess isSuspended\r\t\tifTrue: [^ self].\r\tnameAndRules _ self nameAndRulesForSelectedProcess.\r\tnameAndRules second\r\t\tifFalse: [PopUpMenu inform: 'Nope, won''t suspend ' , nameAndRules first.\r\t\t\t^ self].\r\tself class suspendProcess: selectedProcess.\r\tself updateProcessList! !\r\r!ProcessBrowser methodsFor: 'process actions' stamp: 'nk 3/8/2001 13:25'!\rterminateProcess\r\t| nameAndRules |\r\tnameAndRules _ self nameAndRulesForSelectedProcess.\r\tnameAndRules second\r\t\tifFalse: [PopUpMenu inform: 'Nope, won''t kill ' , nameAndRules first.\r\t\t\t^ self].\r\tself class terminateProcess: selectedProcess.\t\r\tself updateProcessList! !\r\r!ProcessBrowser methodsFor: 'process actions' stamp: 'nk 10/29/2000 08:56'!\rwasProcessSuspendedByProcessBrowser: aProcess\r\t^self class suspendedProcesses includesKey: aProcess! !\r\r\r!ProcessBrowser methodsFor: 'process list' stamp: 'nk 10/27/2000 09:24'!\rexploreProcess\r\tselectedProcess explore! !\r\r!ProcessBrowser methodsFor: 'process list' stamp: 'nk 10/27/2000 11:53'!\rfindContext\r\t| initialProcessIndex initialStackIndex found |\r\tinitialProcessIndex _ self processListIndex.\r\tinitialStackIndex _ self stackListIndex.\r\tsearchString _ FillInTheBlank request: 'Enter a string to search for in the process stack lists' initialAnswer: searchString.\r\tsearchString isEmpty\r\t\tifTrue: [^ false].\r\tself processListIndex: 1.\r\tself stackListIndex: 1.\r\tfound _ self nextContext.\r\tfound\r\t\tifFalse: [self processListIndex: initialProcessIndex.\r\t\t\tself stackListIndex: initialStackIndex].\r\t^ found! !\r\r!ProcessBrowser methodsFor: 'process list'!\rinspectProcess\r\tselectedProcess inspect! !\r\r!ProcessBrowser methodsFor: 'process list' stamp: 'nk 10/27/2000 11:52'!\rnextContext\r\t| initialProcessIndex initialStackIndex found |\r\tsearchString isEmpty ifTrue: [ ^false ].\r\tinitialProcessIndex _ self processListIndex.\r\tinitialStackIndex _ self stackListIndex.\r\tfound _ false.\r\tinitialProcessIndex\r\t\tto: self processList size\r\t\tdo: [:pi | found\r\t\t\t\tifFalse: [self processListIndex: pi.\r\t\t\t\t\tself stackNameList\r\t\t\t\t\t\twithIndexDo: [:name :si | (found not\r\t\t\t\t\t\t\t\t\tand: [pi ~= initialProcessIndex\r\t\t\t\t\t\t\t\t\t\t\tor: [si > initialStackIndex]])\r\t\t\t\t\t\t\t\tifTrue: [(name includesSubString: searchString)\r\t\t\t\t\t\t\t\t\t\tifTrue: [self stackListIndex: si.\r\t\t\t\t\t\t\t\t\t\t\tfound _ true]]]]].\r\tfound\r\t\tifFalse: [self processListIndex: initialProcessIndex.\r\t\t\tself stackListIndex: initialStackIndex].\r\t^ found! !\r\r!ProcessBrowser methodsFor: 'process list' stamp: 'nk 10/28/2000 08:19'!\rnotify: errorString at: location in: aStream \r\t\"A syntax error happened when I was trying to highlight my pc. \r\tRaise a signal so that it can be ignored.\"\r\tWarning signal: 'syntax error'!\r]style[(8 11 5 8 5 7 3 107 2 7 23)f1b,f1cblack;b,f1b,f1cblack;b,f1b,f1cblack;b,f1,f1c142040000,f1,f1cblack;,f1! !\r\r!ProcessBrowser methodsFor: 'process list' stamp: 'nk 10/28/2000 20:30'!\rprettyNameForProcess: aProcess \r\t| nameAndRules |\r\tnameAndRules _ self nameAndRulesFor: aProcess.\r\t^ aProcess browserPrintStringWith: nameAndRules first! !\r\r!ProcessBrowser methodsFor: 'process list' stamp: 'nk 10/29/2000 10:20'!\rprocessListKey: aKey from: aView \r\t^ aKey caseOf: {\r\t\t[$i] -> [self inspectProcess].\r\t\t[$I] -> [self exploreProcess].\r\t\t[$c] -> [self chasePointers].\r\t\t[$P] -> [self inspectPointers].\r\t\t[$t] -> [self terminateProcess].\r\t\t[$r] -> [self resumeProcess].\r\t\t[$s] -> [self suspendProcess].\r\t\t[$d] -> [self debugProcess].\r\t\t[$p] -> [self changePriority].\r\t\t[$m] -> [self messageTally].\r\t\t[$f] -> [self findContext].\r\t\t[$g] -> [self nextContext].\r\t\t[$a] -> [self toggleAutoUpdate].\r\t\t[$u] -> [self updateProcessList].\r\t\t[$S] -> [self signalSemaphore].\r\t\t[$k] -> [self moreStack]}\r\t\t otherwise: [self arrowKey: aKey from: aView]! !\r\r!ProcessBrowser methodsFor: 'process list' stamp: 'LC 1/7/2002 16:35'!\rprocessListMenu: menu \r\t| pw |\r\r\tselectedProcess\r\t\tifNotNil: [| nameAndRules | \r\t\t\tnameAndRules _ self nameAndRulesForSelectedProcess.\r\t\t\tmenu addList: {{'inspect (i)'. #inspectProcess}. {'explore (I)'. #exploreProcess}. {'inspect Pointers (P)'. #inspectPointers}}.\r\t(Smalltalk includesKey: #PointerFinder)\r\t\tifTrue: [ menu add: 'chase pointers (c)' action: #chasePointers.  ].\r\t\t\tnameAndRules second\r\t\t\t\tifTrue: [menu add: 'terminate (t)' action: #terminateProcess.\r\t\t\t\t\tselectedProcess isSuspended\r\t\t\t\t\t\tifTrue: [menu add: 'resume (r)' action: #resumeProcess]\r\t\t\t\t\t\tifFalse: [menu add: 'suspend (s)' action: #suspendProcess]].\r\t\t\tnameAndRules third\r\t\t\t\tifTrue: [menu addList: {{'change priority (p)'. #changePriority}. {'debug (d)'. #debugProcess}}].\r\t\t\tmenu addList: {{'profile messages (m)'. #messageTally}}.\r\t\t\t(selectedProcess suspendingList isKindOf: Semaphore)\r\t\t\t\tifTrue: [menu add: 'signal Semaphore (S)' action: #signalSemaphore].\r\t\t\tmenu add: 'full stack (k)' action: #moreStack.\r\t\t\tmenu addLine].\r\r\tmenu addList: {{'find context... (f)'. #findContext}. {'find again (g)'. #nextContext}}.\r\tmenu addLine.\r\r\tmenu\r\t\tadd: (self isAutoUpdating\r\t\t\t\tifTrue: ['turn off auto-update (a)']\r\t\t\t\tifFalse: ['turn on auto-update (a)'])\r\t\taction: #toggleAutoUpdate.\r\tmenu add: 'update list (u)' action: #updateProcessList.\r\r\tpw _ Smalltalk at: #CPUWatcher ifAbsent: [].\r\tpw ifNotNil: [\r\t\tmenu addLine.\r\t\tpw isMonitoring\r\t\t\t\tifTrue: [ menu add: 'stop CPUWatcher' action: #stopCPUWatcher ]\r\t\t\t\tifFalse: [ menu add: 'start CPUWatcher' action: #startCPUWatcher  ]\r\t].\r\r\t^ menu! !\r\r!ProcessBrowser methodsFor: 'process list' stamp: 'nk 6/21/2004 09:59'!\rprocessNameList\r\t\"since processList is a WeakArray, we have to strengthen the result\"\r\t| pw tally |\r\tpw _ Smalltalk at: #CPUWatcher ifAbsent: [ ].\r\ttally _ pw ifNotNil: [ pw current ifNotNil: [ pw current tally ] ].\r\t^ (processList asOrderedCollection\r\t\tcopyWithout: nil)\r\t\tcollect: [:each | | percent |\r\t\t\tpercent _ tally\r\t\t\t\tifNotNil: [ ((((tally occurrencesOf: each) * 100.0 / tally size) roundTo: 1)\r\t\t\t\t\t\tasString padded: #left to: 2 with: $ ), '% '  ]\r\t\t\t\tifNil: [ '' ].\r\t\t\tpercent, (self prettyNameForProcess: each)\r\t\t] ! !\r\r!ProcessBrowser methodsFor: 'process list' stamp: 'ajh 7/21/2003 10:11'!\rupdateProcessList\r\t| oldSelectedProcess newIndex now |\r\tnow _ Time millisecondClockValue.\r\tnow - lastUpdate < 500\r\t\tifTrue: [^ self].\r\t\"Don't update too fast\"\r\tlastUpdate _ now.\r\toldSelectedProcess _ selectedProcess.\r\tprocessList _ selectedProcess _ selectedSelector _ nil.\r\tSmalltalk garbageCollectMost.\r\t\"lose defunct processes\"\r\r\tprocessList _ Process allSubInstances\r\t\t\t\treject: [:each | each isTerminated].\r\tprocessList _ processList\r\t\t\t\tsortBy: [:a :b | a priority >= b priority].\r\tprocessList _ WeakArray withAll: processList.\r\tnewIndex _ processList\r\t\t\t\tindexOf: oldSelectedProcess\r\t\t\t\tifAbsent: [0].\r\tself changed: #processNameList.\r\tself processListIndex: newIndex! !\r\r\r!ProcessBrowser methodsFor: 'stack list' stamp: 'nk 10/28/2000 16:49'!\rbrowseContext\r\tselectedContext\r\t\tifNil: [^ self].\r\tBrowser newOnClass: self selectedClass selector: self selectedSelector!\r]style[(13 30 4 4 7 42 4 17)f1b,f1,f1cblack;,f1,f1cblack;,f1,f1cblack;,f1! !\r\r!ProcessBrowser methodsFor: 'stack list' stamp: 'RAA 10/27/2000 15:21'!\rchangeStackListTo: aCollection \r\r        stackList _ aCollection.\r        self changed: #stackNameList.\r        self stackListIndex: 0! !\r\r!ProcessBrowser methodsFor: 'stack list' stamp: 'nk 10/27/2000 09:28'!\rexploreContext\r\tselectedContext explore! !\r\r!ProcessBrowser methodsFor: 'stack list' stamp: 'nk 10/27/2000 09:41'!\rexploreReceiver\r\tselectedContext ifNotNil: [ selectedContext receiver explore ]! !\r\r!ProcessBrowser methodsFor: 'stack list' stamp: 'nk 7/8/2000 20:23'!\rinspectContext\r\tselectedContext inspect! !\r\r!ProcessBrowser methodsFor: 'stack list' stamp: 'nk 10/27/2000 09:41'!\rinspectReceiver\r\tselectedContext\r\t\tifNotNil: [selectedContext receiver inspect]! !\r\r!ProcessBrowser methodsFor: 'stack list' stamp: 'BG 10/29/2003 10:17'!\rmessageTally\r\t| secString secs |\r\tsecString _ FillInTheBlank request: 'Profile for how many seconds?' initialAnswer: '4'.\r\tsecs _ secString asNumber asInteger.\r\t(secs isNil\r\t\t\tor: [secs isZero])\r\t\tifTrue: [^ self].\r\t! !\r\r!ProcessBrowser methodsFor: 'stack list' stamp: 'nk 10/28/2000 12:13'!\rmoreStack\r\tself updateStackList: 2000! !\r\r!ProcessBrowser methodsFor: 'stack list' stamp: 'nk 7/4/2003 19:55'!\rpcRange\r\t\"Answer the indices in the source code for the method corresponding to  \r\tthe selected context's program counter value.\"\r\t| i methodNode pc end tempNames |\r\tmethodText isEmptyOrNil\r\t\tifTrue: [^ 1 to: 0].\r\tsourceMap == nil\r\t\tifTrue: [self selectedClass == #unknown\r\t\t\t\tifTrue: [^ 1 to: 0].\r\t\t\t[[methodNode _ self selectedClass compilerClass new\r\t\t\t\t\t\tparse: methodText\r\t\t\t\t\t\tin: self selectedClass\r\t\t\t\t\t\tnotifying: self ]\r\t\t\t\ton: Warning\r\t\t\t\tdo: [:ex | \r\t\t\t\t\tmethodText _ ('(syntax error) ' , ex description , String cr , methodText) asText.\r\t\t\t\t\tex return]]\r\t\t\t\ton: Error\r\t\t\t\tdo: [:ex | \r\t\t\t\t\tmethodText _ ('(parse error) ' , ex description , String cr , methodText) asText.\r\t\t\t\t\tex return].\r\t\t\tmethodNode\r\t\t\t\tifNil: [sourceMap _ nil.\r\t\t\t\t\t^ 1 to: 0].\r\t\t\tsourceMap _ methodNode sourceMap.\r\t\t\ttempNames _ methodNode tempNames.\r\t\t\tselectedContext method cacheTempNames: tempNames].\r\t(sourceMap size = 0 or: [ selectedContext isDead ])\r\t\tifTrue: [^ 1 to: 0].\r\tpc _ selectedContext pc.\r\tpc _ pc - 2.\r\ti _ sourceMap\r\t\t\t\tindexForInserting: (Association key: pc value: nil).\r\ti < 1\r\t\tifTrue: [^ 1 to: 0].\r\ti > sourceMap size\r\t\tifTrue: [end _ sourceMap\r\t\t\t\t\t\tinject: 0\r\t\t\t\t\t\tinto: [:prev :this | prev max: this value last].\r\t\t\t^ end + 1 to: end].\r\t^ (sourceMap at: i) value! !\r\r!ProcessBrowser methodsFor: 'stack list' stamp: 'nk 10/28/2000 16:53'!\rstackListMenu: aMenu \r\t| menu |\r\tselectedContext\r\t\tifNil: [^ aMenu].\r\tmenu _ aMenu\r\t\t\t\tlabels: 'inspect context (c)\rexplore context (C)\rinspect receiver (i)\rexplore receiver (I)\rbrowse (b)'\r\t\t\t\tlines: #(2 4 )\r\t\t\t\tselections: #(#inspectContext #exploreContext #inspectReceiver #exploreReceiver #browseContext ).\r\t^ menu! !\r\r!ProcessBrowser methodsFor: 'stack list' stamp: 'nk 10/28/2000 16:18'!\rstackNameList\r\t^ stackList\r\t\tifNil: [#()]\r\t\tifNotNil: [stackList\r\t\t\t\tcollect: [:each | each asString]]! !\r\r!ProcessBrowser methodsFor: 'stack list' stamp: 'nk 7/8/2000 20:24'!\rupdateStackList\r\tself updateStackList: 20! !\r\r!ProcessBrowser methodsFor: 'stack list' stamp: 'nk 10/28/2000 09:00'!\rupdateStackList: depth \r\t| suspendedContext oldHighlight |\r\tselectedProcess\r\t\tifNil: [^ self changeStackListTo: nil].\r\t(stackList notNil and: [ stackListIndex > 0 ])\r\t\tifTrue: [oldHighlight _ stackList at: stackListIndex].\r\tselectedProcess == Processor activeProcess\r\t\tifTrue: [self\r\t\t\t\tchangeStackListTo: (thisContext stackOfSize: depth)]\r\t\tifFalse: [suspendedContext _ selectedProcess suspendedContext.\r\t\t\tsuspendedContext\r\t\t\t\tifNil: [self changeStackListTo: nil]\r\t\t\t\tifNotNil: [self\r\t\t\t\t\t\tchangeStackListTo: (suspendedContext stackOfSize: depth)]].\r\tself\r\t\tstackListIndex: (stackList\r\t\t\t\tifNil: [0]\r\t\t\t\tifNotNil: [stackList indexOf: oldHighlight])!\r]style[(17 5 4 30 4 15 13 4 20 3 29 14 3 4 12 12 3 9 5 14 4 15 4 9 26 4 25 11 14 5 15 16 3 15 22 16 13 4 20 3 17 4 27 16 14 5 6 4 20 9 13 1 17 9 10 12 2)f1b,f1cblack;b,f1,f1cblack;,f1,f1cblack;,f1,f1cblack;,f1,f1cblack;,f1,f1cblack;,f1,f1cblue;,f1,f1cblack;,f1,f1cblack;,f1,f1cblack;,f1,f1cblack;,f1,f1cblack;,f1,f1cblack;,f1,f1cblack;,f1,f1cblack;,f1,f1cblack;,f1,f1cblack;,f1,f1cblack;,f1,f1cblack;,f1,f1cblack;,f1,f1cblack;,f1,f1cblack;,f1,f1cblack;,f1,f1cblack;,f1,f1cblack;,f1,f1cblue;,f1,f1cblack;,f1,f1cblack;,f1! !\r\r\r!ProcessBrowser methodsFor: 'updating' stamp: 'nk 10/28/2000 21:48'!\risAutoUpdating\r\t^autoUpdateProcess notNil and: [ autoUpdateProcess isSuspended  not ]! !\r\r!ProcessBrowser methodsFor: 'updating' stamp: 'nk 6/18/2003 07:20'!\risAutoUpdatingPaused\r\t^autoUpdateProcess notNil and: [ autoUpdateProcess isSuspended ]! !\r\r!ProcessBrowser methodsFor: 'updating' stamp: 'nk 6/18/2003 07:20'!\rpauseAutoUpdate\r\tself isAutoUpdating\r\t\tifTrue: [ autoUpdateProcess suspend ].\r\tself updateProcessList! !\r\r!ProcessBrowser methodsFor: 'updating' stamp: 'nk 3/14/2001 09:08'!\rsetUpdateCallbackAfter: seconds\r\r\t\tdeferredMessageRecipient ifNotNil: [ | d |\r\t\t\td _ Delay forSeconds: seconds.\r\t\t\t[  d wait.\r\t\t\t\td _ nil.\r\t\t\t\tdeferredMessageRecipient addDeferredUIMessage: [self updateProcessList]\r\t\t\t] fork\r\t\t]! !\r\r!ProcessBrowser methodsFor: 'updating' stamp: 'nk 6/18/2003 07:21'!\rstartAutoUpdate\r\tself isAutoUpdatingPaused ifTrue: [ ^autoUpdateProcess resume ].\r\tself isAutoUpdating\r\t\tifFalse: [| delay | \r\t\t\tdelay _ Delay forSeconds: 2.\r\t\t\tautoUpdateProcess _ [[self hasView]\r\t\t\t\t\t\twhileTrue: [delay wait.\r\t\t\t\t\t\t\tdeferredMessageRecipient ifNotNil: [\r\t\t\t\t\t\t\t\tdeferredMessageRecipient addDeferredUIMessage: [self updateProcessList]]\r\t\t\t\t\t\t\tifNil: [ self updateProcessList ]].\r\t\t\t\t\tautoUpdateProcess _ nil] fork].\r\tself updateProcessList! !\r\r!ProcessBrowser methodsFor: 'updating' stamp: 'nk 6/18/2003 07:22'!\rstopAutoUpdate\r\tautoUpdateProcess ifNotNil: [\r\t\tautoUpdateProcess terminate.\r\t\tautoUpdateProcess _ nil].\r\tself updateProcessList! !\r\r!ProcessBrowser methodsFor: 'updating' stamp: 'nk 10/28/2000 21:50'!\rtoggleAutoUpdate\r\tself isAutoUpdating\r\t\tifTrue: [ self stopAutoUpdate ]\r\t\tifFalse: [ self startAutoUpdate ].\r! !\r\r\r!ProcessBrowser methodsFor: 'views' stamp: 'nk 10/28/2000 11:44'!\rhasView\r\t^self dependents isEmptyOrNil not! !\r\r!ProcessBrowser methodsFor: 'views' stamp: 'nk 3/14/2001 09:04'!\ropenAsMVC\r\t\"Create a pluggable version of me, answer a window\"\r\t| window processListView stackListView methodTextView |\r\twindow _ StandardSystemView new model: self controller: (deferredMessageRecipient _ DeferredActionStandardSystemController new).\r\twindow borderWidth: 1.\r\tprocessListView _ PluggableListView\r\t\t\t\ton: self\r\t\t\t\tlist: #processNameList\r\t\t\t\tselected: #processListIndex\r\t\t\t\tchangeSelected: #processListIndex:\r\t\t\t\tmenu: #processListMenu:\r\t\t\t\tkeystroke: #processListKey:from:.\r\tprocessListView\r\t\twindow: (0 @ 0 extent: 300 @ 200).\r\twindow addSubView: processListView.\r\tstackListView _ PluggableListView\r\t\t\t\ton: self\r\t\t\t\tlist: #stackNameList\r\t\t\t\tselected: #stackListIndex\r\t\t\t\tchangeSelected: #stackListIndex:\r\t\t\t\tmenu: #stackListMenu:\r\t\t\t\tkeystroke: #stackListKey:from:.\r\tstackListView\r\t\twindow: (300 @ 0 extent: 300 @ 200).\r\twindow addSubView: stackListView toRightOf: processListView.\r\tmethodTextView _ PluggableTextView\r\t\t\t\ton: self\r\t\t\t\ttext: #selectedMethod\r\t\t\t\taccept: nil\r\t\t\t\treadSelection: nil\r\t\t\t\tmenu: nil.\r\tmethodTextView askBeforeDiscardingEdits: false.\r\tmethodTextView\r\t\twindow: (0 @ 200 corner: 600 @ 400).\r\twindow addSubView: methodTextView below: processListView.\r\twindow setUpdatablePanesFrom: #(#processNameList #stackNameList ).\r\twindow label: 'Process Browser'.\r\twindow minimumSize: 300 @ 200.\r\twindow subViews\r\t\tdo: [:each | each controller].\r\twindow controller open.\r\tstartedCPUWatcher ifTrue: [ self setUpdateCallbackAfter: 7 ].\r\t^ window! !\r\r!ProcessBrowser methodsFor: 'views' stamp: 'nk 10/28/2000 16:53'!\rstackListKey: aKey from: aView \r\t^ aKey caseOf: {\r\t\t[$c] -> [self inspectContext].\r\t\t[$C] -> [self exploreContext].\r\t\t[$i] -> [self inspectReceiver].\r\t\t[$I] -> [self exploreReceiver].\r\t\t[$b] -> [self browseContext]}\r\t\t otherwise: [self arrowKey: aKey from: aView]! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rProcessBrowser class\r\tinstanceVariableNames: ''!\r\r!ProcessBrowser class methodsFor: 'instance creation' stamp: 'BG 10/29/2003 00:38'!\ropen\r\t\"ProcessBrowser open\"\r\t\"Create and schedule a ProcessBrowser.\"\r\tSmalltalk garbageCollect.\r\t^ Smalltalk isMorphic\r\t\tifTrue: [ ]\r\t\tifFalse: [ self new openAsMVC ]! !\r\r\r!ProcessBrowser class methodsFor: 'process control' stamp: 'nk 3/8/2001 17:09'!\rdebugProcess: aProcess\r\tself resumeProcess: aProcess.\r\taProcess debugWithTitle: 'Interrupted from the Process Browser'.\r! !\r\r!ProcessBrowser class methodsFor: 'process control' stamp: 'ssa 9/3/2008 11:08'!\risUIProcess: aProcess\r\t^aProcess == ScheduledControllers activeControllerProcess ! !\r\r!ProcessBrowser class methodsFor: 'process control' stamp: 'nk 4/12/2004 19:37'!\rnameAndRulesFor: aProcess \r\t\"Answer a nickname and two flags: allow-stop, and allow-debug\"\r\t^ [aProcess caseOf: {\r\t\t[] -> [{'no process'. false. false}].\r\t\t[Smalltalk lowSpaceWatcherProcess] -> [{'the low space watcher'. false. false}].\r\t\t[WeakArray runningFinalizationProcess] -> [{'the WeakArray finalization process'. false. false}].\r\t\t[Processor activeProcess] -> [{'the UI process'. false. true}].\r\t\t[Processor backgroundProcess] -> [{'the idle process'. false. false}].\r\t\t[Sensor interruptWatcherProcess] -> [{'the user interrupt watcher'. false. false}].\r\t\t[Sensor eventTicklerProcess] -> [{'the event tickler'. false. false}].\r\t\t[Project uiProcess] -> [{'the inactive Morphic UI process'. false. false}].\r\t\t[Smalltalk\r\t\t\tat: #SoundPlayer\r\t\t\tifPresent: [:sp | sp playerProcess]] -> [{'the Sound Player'. false. false}].\r\t\t[ScheduledControllers\r\t\t\tifNotNil: [ScheduledControllers activeControllerProcess]] -> [{'the inactive MVC controller process'. false. true}].\r\t\t[Smalltalk\r\t\t\tat: #CPUWatcher\r\t\t\tifPresent: [:cw | cw currentWatcherProcess]] -> [{'the CPUWatcher'. false. false}]}\r\t\t otherwise: \r\t\t\t[(aProcess priority = Processor timingPriority\r\t\t\t\t\tand: [aProcess suspendedContext receiver == Delay])\r\t\t\t\tifTrue: [{'the timer interrupt watcher'. false. false}]\r\t\t\t\tifFalse: [{aProcess suspendedContext asString. true. true}]]]\r\t\tifError: [:err :rcvr | {aProcess suspendedContext asString. true. true}]! !\r\r!ProcessBrowser class methodsFor: 'process control' stamp: 'nk 2/12/2002 10:09'!\rresumeProcess: aProcess\r\t| priority |\r\tpriority _ self suspendedProcesses\r\t\t\t\tremoveKey: aProcess\r\t\t\t\tifAbsent: [aProcess priority].\r\taProcess priority: priority.\r\taProcess suspendedContext ifNotNil: [ aProcess resume ]\r! !\r\r!ProcessBrowser class methodsFor: 'process control' stamp: 'nk 3/8/2001 17:07'!\rsetProcess: aProcess toPriority: priority\r\t| oldPriority |\r\toldPriority _ self suspendedProcesses at: aProcess ifAbsent: [ ].\r\toldPriority ifNotNil: [ self suspendedProcesses at: aProcess put: priority ].\r\taProcess priority: priority.\r\t^oldPriority! !\r\r!ProcessBrowser class methodsFor: 'process control' stamp: 'dew 9/16/2001 01:53'!\rsuspendProcess: aProcess\r\t| priority |\r\tpriority _ aProcess priority.\r\tself suspendedProcesses at: aProcess put: priority.\r\t\"Need to take the priority down below the caller's\r\tso that it can keep control after signaling the Semaphore\"\r\t(aProcess suspendingList isKindOf: Semaphore)\r\t\tifTrue: [aProcess priority: Processor lowestPriority.\r\t\t\taProcess suspendingList signal].\r\t[aProcess suspend]\r\t\ton: Error\r\t\tdo: [:ex | self suspendedProcesses removeKey: aProcess].\r\taProcess priority: priority.\r! !\r\r!ProcessBrowser class methodsFor: 'process control' stamp: 'nk 10/29/2000 08:55'!\rsuspendedProcesses\r\t\"Answer a collection of processes that my instances have suspended.  \r\tThis is so that they don't get garbage collected.\"\r\t^ SuspendedProcesses\r\t\tifNil: [SuspendedProcesses _ IdentityDictionary new]! !\r\r!ProcessBrowser class methodsFor: 'process control' stamp: 'nk 3/8/2001 13:25'!\rterminateProcess: aProcess\r\taProcess ifNotNil: [\r\t\tself suspendedProcesses\r\t\t\tremoveKey: aProcess\r\t\t\tifAbsent: [].\r\t\taProcess terminate\r\t].\r! !\r\r!ProcessBrowser class methodsFor: 'process control' stamp: 'nk 3/8/2001 13:26'!\rwasProcessSuspendedByProcessBrowser: aProcess\r\t^self suspendedProcesses includesKey: aProcess! !\r\r\r!ProcessBrowser class methodsFor: 'CPU utilization' stamp: 'nk 3/14/2001 08:59'!\rdumpTallyOnTranscript: tally\r\t\"tally is from ProcessorScheduler>>tallyCPUUsageFor:\r\tDumps lines with percentage of time, hash of process, and a friendly name\"\r\r\ttally sortedCounts do: [ :assoc | | procName |\r\t\tprocName _ (self nameAndRulesFor: assoc value) first.\r\t\tTranscript print: (((assoc key / tally size) * 100.0) roundTo: 1);\r\t\t\tnextPutAll: '%   ';\r\t\t\tprint: assoc value identityHash; space;\r\t\t\tnextPutAll: procName;\r\t\t\tcr.\r\t].\r\tTranscript flush.! !\r\r!ProcessBrowser class methodsFor: 'CPU utilization' stamp: 'nk 3/8/2001 12:49'!\rtallyCPUUsageFor: seconds\r\t\"Compute CPU usage using a 10-msec sample for the given number of seconds,\r\tthen dump the usage statistics on the Transcript. The UI is free to continue, meanwhile\"\r\t\"ProcessBrowser tallyCPUUsageFor: 10\"\r\t^self tallyCPUUsageFor: seconds every: 10! !\r\r!ProcessBrowser class methodsFor: 'CPU utilization' stamp: 'BG 10/29/2003 01:07'!\rtallyCPUUsageFor: seconds every: msec\r\t\"Compute CPU usage using a msec millisecond sample for the given number of seconds,\r\tthen dump the usage statistics on the Transcript. The UI is free to continue, meanwhile\"\r\t\"ProcessBrowser tallyCPUUsageFor: 10 every: 100\"\r\r\t| promise |\r\tpromise _ Processor tallyCPUUsageFor: seconds every: msec.\r\r\t[ | tally |\r\t\ttally _ promise value.\r\t\tSmalltalk isMorphic\r\t\t\tifTrue: [ ]\r\t\t\tifFalse: [ [ Transcript open ] forkAt: Processor userSchedulingPriority.\r\t\t\t\t\t[ (Delay forSeconds: 1) wait.\r\t\t\t\t\tself dumpTallyOnTranscript: tally ] forkAt: Processor userSchedulingPriority.]\r\t] fork.! !\r\r\r!ProcessBrowser class methodsFor: 'class initialization' stamp: 'nk 6/18/2003 07:31'!\rinitialize\r\t\"ProcessBrowser initialize\"\r\tBrowsers ifNil: [ Browsers _ WeakSet new ].\r\tSuspendedProcesses ifNil: [ SuspendedProcesses _ IdentityDictionary new ].\r\tSmalltalk addToStartUpList: self.\r\tSmalltalk addToShutDownList: self.\r\tself registerInFlapsRegistry.! !\r\r!ProcessBrowser class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 10:22'!\rregisterInFlapsRegistry\r\t\"Register the receiver in the system's flaps registry\"\r\tself environment\r\t\tat: #Flaps\r\t\tifPresent: [:cl | \tcl registerQuad: #(ProcessBrowser\t\t\tprototypicalToolWindow\t\t'Processes'\t\t\t'A Process Browser shows you all the running processes')\r\t\t\t\t\t\tforFlapNamed: 'Tools'.]! !\r\r!ProcessBrowser class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 12:39'!\runload\r\t\"Unload the receiver from global registries\"\r\r\tself environment at: #Flaps ifPresent: [:cl |\r\tcl unregisterQuadsWithReceiver: self] ! !\r\r\r!ProcessBrowser class methodsFor: 'as yet unclassified' stamp: 'nk 6/18/2003 07:32'!\rshutDown\r\tBrowsers do: [ :ea | ea isAutoUpdating ifTrue: [ ea pauseAutoUpdate ]]! !\r\r!ProcessBrowser class methodsFor: 'as yet unclassified' stamp: 'nk 6/18/2003 07:32'!\rstartUp\r\tBrowsers do: [ :ea | ea isAutoUpdatingPaused ifTrue: [ ea startAutoUpdate ]]! !\rObject subclass: #ProcessorScheduler\r\tinstanceVariableNames: 'quiescentProcessLists activeProcess'\r\tclassVariableNames: 'BackgroundProcess HighIOPriority LowIOPriority SystemBackgroundPriority SystemRockBottomPriority TimingPriority UserBackgroundPriority UserInterruptPriority UserSchedulingPriority'\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Processes'!\r!ProcessorScheduler commentStamp: '<historical>' prior: 0!\rMy single instance, named Processor, coordinates the use of the physical processor by all Processes requiring service.!\r\r\r!ProcessorScheduler methodsFor: 'accessing'!\ractivePriority\r\t\"Answer the priority level of the currently running Process.\"\r\r\t^activeProcess priority! !\r\r!ProcessorScheduler methodsFor: 'accessing'!\ractiveProcess\r\t\"Answer the currently running Process.\"\r\r\t^activeProcess! !\r\r!ProcessorScheduler methodsFor: 'accessing' stamp: 'nk 10/27/2000 16:27'!\rbackgroundProcess\r\t\"Answer the background process\"\r\t^ BackgroundProcess! !\r\r!ProcessorScheduler methodsFor: 'accessing'!\rhighestPriority\r\t\"Answer the number of priority levels currently available for use.\"\r\r\t^quiescentProcessLists size! !\r\r\r!ProcessorScheduler methodsFor: 'removing'!\rremove: aProcess ifAbsent: aBlock \r\t\"Remove aProcess from the list on which it is waiting for the processor \r\tand answer aProcess. If it is not waiting, evaluate aBlock.\"\r\r\t(quiescentProcessLists at: aProcess priority)\r\t\tremove: aProcess ifAbsent: aBlock.\r\t^aProcess! !\r\r\r!ProcessorScheduler methodsFor: 'process state change'!\rterminateActive\r\t\"Terminate the process that is currently running.\"\r\r\tactiveProcess terminate! !\r\r!ProcessorScheduler methodsFor: 'process state change' stamp: 'tpr 4/28/2004 17:53'!\ryield\r\t\"Give other Processes at the current priority a chance to run.\"\r\r\t| semaphore |\r\r\t<primitive: 167>\r\tsemaphore _ Semaphore new.\r\t[semaphore signal] fork.\r\tsemaphore wait! !\r\r\r!ProcessorScheduler methodsFor: 'priority names'!\rlowIOPriority\r\t\"Answer the priority at which most input/output processes should run. \r\tExamples are the process handling input from the user (keyboard, \r\tpointing device, etc.) and the process distributing input from a network.\"\r\r\t^LowIOPriority! !\r\r!ProcessorScheduler methodsFor: 'priority names' stamp: 'ar 7/8/2001 17:02'!\rlowestPriority\r\t\"Return the lowest priority that is allowed with the scheduler\"\r\t^SystemRockBottomPriority! !\r\r!ProcessorScheduler methodsFor: 'priority names'!\rtimingPriority\r\t\"Answer the priority at which the system processes keeping track of real \r\ttime should run.\"\r\r\t^TimingPriority! !\r\r!ProcessorScheduler methodsFor: 'priority names'!\ruserInterruptPriority\r\t\"Answer the priority at which user processes desiring immediate service \r\tshould run. Processes run at this level will preempt the window \r\tscheduler and should, therefore, not consume the processor forever.\"\r\r\t^UserInterruptPriority! !\r\r!ProcessorScheduler methodsFor: 'priority names'!\ruserSchedulingPriority\r\t\"Answer the priority at which the window scheduler should run.\"\r\r\t^UserSchedulingPriority! !\r\r\r!ProcessorScheduler methodsFor: 'CPU usage tally' stamp: 'nk 3/8/2001 12:56'!\rnextReadyProcess\r\tquiescentProcessLists reverseDo: [ :list |\r\t\tlist isEmpty ifFalse: [ | proc |\r\t\t\tproc _ list first.\r\t\t\tproc suspendedContext ifNotNil: [ ^proc ]]].\r\t^nil! !\r\r!ProcessorScheduler methodsFor: 'CPU usage tally' stamp: 'nk 3/8/2001 12:48'!\rtallyCPUUsageFor: seconds\r\t\"Start a high-priority process that will tally the next ready process for the given\r\tnumber of seconds. Answer a Block that will return the tally (a Bag) after the task\r\tis complete\" \r\t^self tallyCPUUsageFor: seconds every: 10\r! !\r\r!ProcessorScheduler methodsFor: 'CPU usage tally' stamp: 'nk 3/17/2001 10:06'!\rtallyCPUUsageFor: seconds every: msec\r\t\"Start a high-priority process that will tally the next ready process for the given\r\tnumber of seconds. Answer a Block that will return the tally (a Bag) after the task\r\tis complete\" \r\t| tally sem delay endDelay |\r\ttally _ IdentityBag new: 200.\r\tdelay _ Delay forMilliseconds: msec truncated.\r\tendDelay _ Delay forSeconds: seconds.\r\tendDelay schedule.\r\tsem _ Semaphore new.\r\t[\r\t\t[ endDelay isExpired ] whileFalse: [\r\t\t\tdelay wait.\r\t\t\ttally add: Processor nextReadyProcess\r\t\t].\r\t\tsem signal.\r\t] forkAt: self highestPriority.\r\r\t^[ sem wait. tally ]! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rProcessorScheduler class\r\tinstanceVariableNames: ''!\r\r!ProcessorScheduler class methodsFor: 'class initialization' stamp: 'ar 7/8/2001 16:39'!\rinitialize\r     \r\tSystemRockBottomPriority _ 10.\r\tSystemBackgroundPriority _ 20.\r\tUserBackgroundPriority _ 30.\r\tUserSchedulingPriority _ 40.\r\tUserInterruptPriority _ 50.\r\tLowIOPriority _ 60.\r\tHighIOPriority _ 70.\r\tTimingPriority _ 80.\r\r\t\"ProcessorScheduler initialize.\"! !\r\r\r!ProcessorScheduler class methodsFor: 'instance creation'!\rnew\r\t\"New instances of ProcessorScheduler should not be created.\"\r\r\tself error:\r'New ProcessSchedulers should not be created since\rthe integrity of the system depends on a unique scheduler'! !\r\r\r!ProcessorScheduler class methodsFor: 'background process' stamp: 'jm 9/11/97 10:44'!\ridleProcess\r\t\"A default background process which is invisible.\"\r\r\t[true] whileTrue:\r\t\t[self relinquishProcessorForMicroseconds: 1000]! !\r\r!ProcessorScheduler class methodsFor: 'background process' stamp: 'jm 9/3/97 11:17'!\rrelinquishProcessorForMicroseconds: anInteger\r\t\"Platform specific. This primitive is used to return processor cycles to the host operating system when Squeak's idle process is running (i.e., when no other Squeak process is runnable). On some platforms, this primitive causes the entire Squeak application to sleep for approximately the given number of microseconds. No Squeak process can run while the Squeak application is sleeping, even if some external event makes it runnable. On the Macintosh, this primitive simply calls GetNextEvent() to give other applications a chance to run. On platforms without a host operating system, it does nothing. This primitive should not be used to add pauses to a Squeak process; use a Delay instead.\"\r\r\t<primitive: 230>\r\t\"don't fail if primitive is not implemented, just do nothing\"\r! !\r\r!ProcessorScheduler class methodsFor: 'background process' stamp: 'di 2/4/1999 08:45'!\rstartUp\r\t\"Install a background process of the lowest possible priority that is always runnable.\"\r\t\"Details: The virtual machine requires that there is aways some runnable process that can be scheduled; this background process ensures that this is the case.\"\r\r\tSmalltalk installLowSpaceWatcher.\r\tBackgroundProcess == nil ifFalse: [BackgroundProcess terminate].\r\tBackgroundProcess _ [self idleProcess] newProcess.\r\tBackgroundProcess priority: SystemRockBottomPriority.\r\tBackgroundProcess resume.\r! !\rException subclass: #ProgressInitiationException\r\tinstanceVariableNames: 'workBlock maxVal minVal aPoint progressTitle'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Exceptions Kernel'!\r!ProgressInitiationException commentStamp: '<historical>' prior: 0!\rI provide a way to alter the behavior of the old-style progress notifier in String. See examples in:\r\rProgressInitiationException testWithout.\rProgressInitiationException testWith.\r!\r\r\r!ProgressInitiationException methodsFor: 'as yet unclassified' stamp: 'RAA 6/6/2000 18:46'!\rdefaultAction\r\r\t| delta savedArea captionText textFrame barFrame outerFrame result range lastW w |\r\tbarFrame _ aPoint - (75@10) corner: aPoint + (75@10).\r\tcaptionText _ DisplayText text: progressTitle asText allBold.\r\tcaptionText\r\t\tforegroundColor: Color black\r\t\tbackgroundColor: Color white.\r\ttextFrame _ captionText boundingBox insetBy: -4.\r\ttextFrame _ textFrame align: textFrame bottomCenter\r\t\t\t\t\twith: barFrame topCenter + (0@2).\r\touterFrame _ barFrame merge: textFrame.\r\tdelta _ outerFrame amountToTranslateWithin: Display boundingBox.\r\tbarFrame _ barFrame translateBy: delta.\r\ttextFrame _ textFrame translateBy: delta.\r\touterFrame _ outerFrame translateBy: delta.\r\tsavedArea _ Form fromDisplay: outerFrame.\r\tDisplay fillBlack: barFrame; fillWhite: (barFrame insetBy: 2).\r\tDisplay fillBlack: textFrame; fillWhite: (textFrame insetBy: 2).\r\tcaptionText displayOn: Display at: textFrame topLeft + (4@4).\r\trange _ maxVal = minVal ifTrue: [1] ifFalse: [maxVal - minVal].  \"Avoid div by 0\"\r\tlastW _ 0.\r\tresult _ workBlock value:  \"Supply the bar-update block for evaluation in the work block\"\r\t\t[:barVal |\r\t\tw _ ((barFrame width-4) asFloat * ((barVal-minVal) asFloat / range min: 1.0)) asInteger.\r\t\tw ~= lastW ifTrue: [\r\t\t\tDisplay fillGray: (barFrame topLeft + (2@2) extent: w@16).\r\t\t\tlastW _ w]].\r\tsavedArea displayOn: Display at: outerFrame topLeft.\r\tself resume: result! !\r\r!ProgressInitiationException methodsFor: 'as yet unclassified' stamp: 'RAA 5/15/2000 11:43'!\rdisplay: argString at: argPoint from: argMinVal to: argMaxVal during: argWorkBlock\r\r\tprogressTitle _ argString.\r\taPoint _ argPoint.\r\tminVal _ argMinVal.\r\tmaxVal _ argMaxVal.\r\tworkBlock _ argWorkBlock.\r\t^self signal! !\r\r!ProgressInitiationException methodsFor: 'as yet unclassified' stamp: 'RAA 5/15/2000 12:39'!\risResumable\r\t\r\t^true! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rProgressInitiationException class\r\tinstanceVariableNames: ''!\r\r!ProgressInitiationException class methodsFor: 'signalling' stamp: 'ajh 1/22/2003 23:51'!\rdisplay: aString at: aPoint from: minVal to: maxVal during: workBlock\r\r\t^ self new\r\t\tdisplay: aString at: aPoint from: minVal to: maxVal during: workBlock! !\rModel subclass: #Project\r\tinstanceVariableNames: 'world changeSet transcript parentProject previousProject displayDepth viewSize thumbnail nextProject guards projectParameters isolatedHead inForce version urlList environment lastDirectory lastSavedAtSeconds projectPreferenceFlagDictionary resourceManager'\r\tclassVariableNames: 'AllProjects CurrentProject GoalFreePercent GoalNotMoreThan UIProcess'\r\tpoolDictionaries: ''\r\tcategory: 'System-Support'!\r!Project commentStamp: '<historical>' prior: 0!\rA Project stores the state of a complete Squeak desktop, including the windows, and the currently active changeSet.  A project knows who its parent project is.  When you change projects, whether by entering or exiting, the screen state of the project being exited is saved in that project.\r\rA project is retained by its view in the parent world.  It is effectively named by the name of its changeSet, which can be changed either by renaming in a changeSorter, or by editing the label of its view from the parent project.\r\rAs the site of major context switch, Projects are the locus of swapping between the old MVC and the new Morphic worlds.  The distinction is based on whether the variable 'world' contains a WorldMorph or a ControlManager.\r\rSaving and Loading\rProjects may be stored on the disk in external format.  (Project named: 'xxx') exportSegment, or choose 'store project on file...'.  \rProjects may be loaded from a server and stored back.  Storing on a server never overwrites;  it always makes a new version.  A project remembers the url of where it lives in urlList.  The list is length one, for now.  The url may point to a local disk instead of a server.  All projects that the user looks at, are cached in the Squeaklet folder.  Sorted by server.  The cache holds the most recent version only.  \r\rIsolation\rWhen you accept a method, the entire system feels the change, except projects that are \"isolated\".  In an isolated project, all new global variables (including new classes) are stored in the project-local environment, and all changes to preexisting classes are revoked when you leave the project.  When you enter another project, that project's changes are invoked.  Invocation and revocation are handled efficiently by swapping pointers.  To make a project be isolated, choose 'isolate changes of this project' from the 'changes...' section of the screen menu.  You can use an isolated project for making dangerous change to a system, and you can get out if it crashes.  A foreign application can have the separate environment it wants.  Also, you can freeze part of the system for a demo that you don't want to disturb.  An isolated project shares methods with all subprojects inside it, unless they are isolated themselves.   Each isolated project is the head of a tree of projects with which it shares all methods.\r\rYou may 'assert' all changes ever made in the current project to take effect above this project.  This amounts to exporting all the globals in the current environment, and zapping the revocation lists to that the current state of the world will remain in force upon exit from this project.\r\r[Later: A project may be 'frozen'.  Asserts do not apply to it after that.  (Great for demos.)  You should be informed when an assert was blocked in a frozen project.]\r\rClass definitions are layered by the isolation mechanism.  You are only allowed to change the shape of a class in projects that lie within its isolation scope.  All versions of the methods are recompiled, in all projects.  If you remove an inst var that is in use in an isolated project, it will become an Undeclared global.  It is best not to remove an inst var when it is being used in another isolated project. [If we recompile them all, why can't we diagnose the problem before allowing the change??]\r\rSenders and Implementors do not see versions of a method in isolated projects.  [again, we might want to make this possible at a cost].  When you ask for versions of a method, you will not get the history in other isolated projects.\r\rMoving methods and classes between changeSets, and merging changeSets has no effect on which methods are in force.  But, when you look at a changeSet from a different isolated project, the methods will contain code that is not in force.  A changeSet is just a list of method names, and does not keep separate copies of any code.\r\rWhen finer grained assertion is needed, use the method (aProject assertClass: aClass from: thisProject warn: warnConflicts).\r\rHow isolated changes work: The first time a class changes, store its MethodDictionary object.  Keep parallel arrays of associations to Classes and MethodDictionaries.  Traverse these and install them when you enter an \"ioslated project\".  When you leave, store this project's own MethodDictionaries there.\r\tTo do an assert, we must discover which methods changed here, and which changed only in the project we are asserting into.  There is one copy of the 'virgin' method dictionaries in the system.  It is always being temporarily stored by the currently inForce isolated project.\r\risolatedHead - true for the top project, and for each isolated project.  false or nil for any subproject that shares all methods with its parent project.\r\rinForce -  true if my methods are installed now.  false if I am dormant. [is this equivalent to self == Project Current?]\r\rclassArray - list of associations to classes \r\rmethodDictArray - the method dictionaries of those classes before we started changing methods.  They hang onto the original compiledMethods.  (If this project is dormant, it contains the method dictionaries of those classes as they will be here, in this project).\r\rorgArray - the class organizations of the classes in classArray.\r\rUsingIsolation (class variable) - No longer used.\r\rWhen you want to save a project in export format from within that very project, it gets tricky.  We set two flags in parentProject, exit to it, and let parentProject write the project.  ProjectViewMorph in parentProject checks in its step method, does the store, clears the flags, and reenters the subProject.\r\r!\r\r\r!Project methodsFor: 'initialization' stamp: 'sw 11/5/1998 21:28'!\rbackgroundColorForMvcProject\r\t^ Color r: 1.0 g: 1.0 b: 0.065! !\r\r!Project methodsFor: 'initialization' stamp: 'ssa 9/3/2008 11:08'!\rdefaultBackgroundColor\r\t^ self isMorphic\r\t\tifTrue: []\r\t\tifFalse: [self backgroundColorForMvcProject]! !\r\r!Project methodsFor: 'initialization'!\rinitialExtent\r\t^ (Display extent // 6) + (0@17)! !\r\r!Project methodsFor: 'initialization' stamp: 'di 4/14/1999 13:55'!\rinitialProject\r\tself saveState.\r\tparentProject _ self.\r\tpreviousProject _ nextProject _ nil! !\r\r!Project methodsFor: 'initialization' stamp: 'di 4/6/2001 10:30'!\rinitialize\r\t\"Initialize the project, seting the CurrentProject as my parentProject and initializing my project preferences from those of the CurrentProject\"\r\r\tchangeSet _ ChangeSet new.\r\ttranscript _ TranscriptStream new.\r\tdisplayDepth _ Display depth.\r\tparentProject _ CurrentProject.\r\tisolatedHead _ false.\r\tself initializeProjectPreferences\r! !\r\r!Project methodsFor: 'initialization' stamp: 'ar 5/16/2001 17:08'!\rinstallNewDisplay: extent depth: depth\r\t\"When entering a new project, install a new Display if necessary.\"\r\t^Display setExtent: extent depth: depth! !\r\r!Project methodsFor: 'initialization' stamp: 'RAA 6/21/2000 22:59'!\rsetChangeSet: aChangeSet\r\r\tisolatedHead == true ifTrue: [^ self].  \"ChangeSet of an isolated project cannot be changed\"\r\tchangeSet _ aChangeSet\r! !\r\r!Project methodsFor: 'initialization' stamp: 'di 3/29/2000 14:16'!\rsetProjectHolder: aProject\r\r\tself initialize.\r\tworld _ ControlManager new.\r! !\r\r!Project methodsFor: 'initialization' stamp: 'di 6/10/1998 13:54'!\rwindowActiveOnFirstClick\r\r\t^ true! !\r\r!Project methodsFor: 'initialization' stamp: 'di 6/12/1998 15:58'!\rwindowReqNewLabel: newLabel\r\tnewLabel isEmpty ifTrue: [^ false].\r\tnewLabel = changeSet name ifTrue: [^ true].\r\t(ChangeSorter changeSetNamed: newLabel) == nil\r\t\tifFalse: [self inform: 'Sorry that name is already used'.\r\t\t\t\t^ false].\r\tchangeSet name: newLabel.\r\t^ true! !\r\r\r!Project methodsFor: 'accessing' stamp: 'tk 4/5/2000 16:29'!\rchangeSet\r\t^ changeSet! !\r\r!Project methodsFor: 'accessing' stamp: 'jla 5/28/2001 21:50'!\rchildren\r\t\"Answer a list of all the subprojects of the receiver\"\r\t\r\t| children |\r\tchildren _ OrderedCollection new.\r\tProject allProjects do: [ :p | \r\t\t(self == p parent and: [self ~~ p]) ifTrue:\r\t\t\t[ children add: p ]].\r\t^ children\r\r\"\rProject topProject children\r\"! !\r\r!Project methodsFor: 'accessing'!\rdisplayDepth: newDepth\r\tdisplayDepth _ newDepth! !\r\r!Project methodsFor: 'accessing' stamp: 'tk 2/24/2000 13:51'!\renvironment\r\t^ environment! !\r\r!Project methodsFor: 'accessing' stamp: 'RAA 6/3/2000 10:23'!\risCurrentProject\r\r\t^self == CurrentProject! !\r\r!Project methodsFor: 'accessing' stamp: 'tk 9/22/1999 18:32'!\risMorphic\r\t\"Complexity is because #isMVC is lazily installed\"\r\t^ world isInMemory \r\t\tifTrue: [world isMorph]\r\t\tifFalse: [(self projectParameters at: #isMVC ifAbsent: [false]) not]! !\r\r!Project methodsFor: 'accessing' stamp: 'di 3/29/2000 15:37'!\risTopProject\r\t\"Return true only if this is the top project (its own parent).\r\tAlso include the test here for malformed project hierarchy.\"\r\r\tparentProject == self ifTrue: [^ true].\r\tparentProject == nil ifTrue: [self error: 'No project should have a nil parent'].\r\t^ false! !\r\r!Project methodsFor: 'accessing' stamp: 'tk 6/26/1998 22:17'!\rlabelString\r\t^ changeSet name! !\r\r!Project methodsFor: 'accessing' stamp: 'di 7/19/1999 15:06'!\rname\r\tchangeSet == nil ifTrue: [^ 'no name'].\r\t^ changeSet name! !\r\r!Project methodsFor: 'accessing' stamp: 'jla 5/28/2001 20:01'!\rnameAdjustedForDepth\r\t\"Answer the name of the project, prepended with spaces reflecting the receiver's depth from the top project\"\r\t\"\tProject current nameAdjustedForDepth\t\"\r\r\t| stream |\r\tstream _ WriteStream on: String new.\r\tself depth timesRepeat: \r\t  [2 timesRepeat: [stream nextPut: $ ]].\r\tstream nextPutAll: self name.\r\t^ stream contents! !\r\r!Project methodsFor: 'accessing' stamp: 'sw 2/15/1999 12:12'!\rnextProject\r\t^ nextProject\r! !\r\r!Project methodsFor: 'accessing' stamp: 'di 3/6/98 10:22'!\rparent\r\t^ parentProject! !\r\r!Project methodsFor: 'accessing' stamp: 'jm 5/20/1998 23:31'!\rpreviousProject\r\t^ previousProject\r! !\r\r!Project methodsFor: 'accessing'!\rprojectChangeSet\r\t^ changeSet! !\r\r!Project methodsFor: 'accessing' stamp: 'ssa 9/3/2008 11:21'!\rrenameTo: newName\r\t| |\r\tnewName = self name\r\t\tifFalse: [\r\t\t\tversion _ nil.\r\t\t\tself changeSet name: newName.\r\t\t\t].! !\r\r!Project methodsFor: 'accessing' stamp: 'di 4/14/1999 13:59'!\rsetParent: newParent\r\r\tparentProject _ newParent.\r\tnextProject _ previousProject _ nil.! !\r\r!Project methodsFor: 'accessing' stamp: 'di 1/21/98 11:06'!\rsetViewSize: aPoint\r\tviewSize _ aPoint! !\r\r!Project methodsFor: 'accessing' stamp: 'di 1/21/98 11:07'!\rthumbnail\r\t^ thumbnail! !\r\r!Project methodsFor: 'accessing' stamp: 'jla 5/28/2001 21:51'!\rwithChildrenDo: aBlock\r\t\"Evaluate the block first with the receiver as argument, then, recursively and depth first, with each of the receiver's children as argument\"\r\t\r\taBlock value: self.\r\tself children do: [:p | \r\t\tp withChildrenDo:\r\t\t\t[:c | aBlock value: c]]! !\r\r!Project methodsFor: 'accessing'!\rworld\r\t^ world! !\r\r\r!Project methodsFor: 'menu messages' stamp: 'BG 10/28/2003 21:03'!\rassureNavigatorPresenceMatchesPreference\r\t\"Make sure that the current project conforms to the presence/absence of the navigator\"\r\r\tSmalltalk isMorphic ifFalse: [^ self].! !\r\r!Project methodsFor: 'menu messages' stamp: 'tk 10/26/1999 14:25'!\renter\r\t\"Enter the new project\"\r\tself enter: (CurrentProject parent == self) revert: false saveForRevert: false.! !\r\r!Project methodsFor: 'menu messages' stamp: 'ssa 9/3/2008 11:09'!\renter: returningFlag revert: revertFlag saveForRevert: saveForRevert \r\t\"Install my ChangeSet, Transcript, and scheduled views as current \r\tglobals. If returningFlag is true, we will return to the project from \r\twhence the current project was entered; don't change its \r\tpreviousProject link in this case. \r\tIf saveForRevert is true, save the ImageSegment of the project being \r\tleft. If revertFlag is true, make stubs for the world of the project being \r\tleft. If revertWithoutAsking is true in the project being left, then \r\talways revert.\"\r\t| showZoom old forceRevert response seg newProcess |\r\tself isCurrentProject\r\t\tifTrue: [^ self].\r\t\"Check the guards\"\r\tguards\r\t\tifNotNil: [guards := guards\r\t\t\t\t\t\treject: [:obj | obj isNil].\r\t\t\tguards\r\t\t\t\tdo: [:obj | obj okayToEnterProject\r\t\t\t\t\t\tifFalse: [^ self]]].\r\tCurrentProject world triggerEvent: #aboutToLeaveWorld.\r\tforceRevert := false.\r\tCurrentProject rawParameters\r\t\tifNil: [revertFlag\r\t\t\t\tifTrue: [^ self inform: 'nothing to revert to']]\r\t\tifNotNil: [saveForRevert\r\t\t\t\tifFalse: [forceRevert := CurrentProject projectParameters\r\t\t\t\t\t\t\t\tat: #revertWithoutAsking\r\t\t\t\t\t\t\t\tifAbsent: [false]]].\r\tforceRevert not & revertFlag\r\t\tifTrue: [response := SelectionMenu\r\t\t\t\t\t\tconfirm: 'Are you sure you want to destroy this Project\\ and revert to an older version?\\\\(From the parent project, click on this project''s thumbnail.)' withCRs\r\t\t\t\t\t\ttrueChoice: 'Revert to saved version'\r\t\t\t\t\t\tfalseChoice: 'Cancel'.\r\t\t\tresponse\r\t\t\t\tifFalse: [^ self]].\r\trevertFlag | forceRevert\r\t\tifTrue: [seg := CurrentProject projectParameters\r\t\t\t\t\t\tat: #revertToMe\r\t\t\t\t\t\tifAbsent: [^ self inform: 'nothing to revert to']]\r\t\tifFalse: [CurrentProject finalExitActions.\r\t\t\tCurrentProject makeThumbnail.\r\t\t\treturningFlag == #specialReturn\r\t\t\t\tifTrue: [ProjectHistory forget: CurrentProject.\r\t\t\t\t\t\"this guy is irrelevant\"\r\t\t\t\t\tProject forget: CurrentProject]\r\t\t\t\tifFalse: [ProjectHistory remember: CurrentProject]].\r\trevertFlag | saveForRevert | forceRevert\r\t\tifFalse: [(Preferences valueOfFlag: #projectsSentToDisk)\r\t\t\t\tifTrue: [self storeToMakeRoom]].\r\tCurrentProject abortResourceLoading.\r\tCurrentProject saveProjectPreferences.\r\t\"Update the display depth and make a thumbnail of the current project\"\r\tCurrentProject displayDepth: Display depth.\r\told := CurrentProject.\r\t\"for later\"\r\t\"Show the project transition. \r\tNote: The project zoom is run in the context of the old project, \r\tso that eventual errors can be handled accordingly\"\r\tdisplayDepth == nil\r\t\tifTrue: [displayDepth := Display depth].\r\tself installNewDisplay: Display extent depth: displayDepth.\r\t(showZoom := self showZoom)\r\t\tifTrue: [self displayZoom: CurrentProject parent ~~ self].\r\t(world isMorph\r\t\t\tand: [world hasProperty: #letTheMusicPlay])\r\t\tifTrue: [world removeProperty: #letTheMusicPlay]\r\t\tifFalse: [Smalltalk\r\t\t\t\tat: #ScorePlayer\r\t\t\t\tifPresentAndInMemory: [:playerClass | playerClass\r\t\t\t\t\t\tallSubInstancesDo: [:player | player pause]]].\r\treturningFlag == #specialReturn\r\t\tifTrue: [old removeChangeSetIfPossible.\r\t\t\t\"keep this stuff from accumulating\"\r\t\t\tnextProject := nil]\r\t\tifFalse: [returningFlag\r\t\t\t\tifTrue: [nextProject := CurrentProject]\r\t\t\t\tifFalse: [previousProject := CurrentProject]].\r\tCurrentProject saveState.\r\tCurrentProject isolationHead == self isolationHead\r\t\tifFalse: [self invokeFrom: CurrentProject].\r\tCurrentProject := self.\r\tself installProjectPreferences.\r\tChangeSet newChanges: changeSet.\r\tTranscriptStream newTranscript: transcript.\r\tSensor flushKeyboard.\r\tProjectHistory remember: CurrentProject.\r\tworld isMorph\r\t\tifTrue: []\r\t\tifFalse: [World := nil.\r\t\t\t\"Signifies MVC\"\r\t\t\tSmalltalk at: #ScheduledControllers put: world].\r\tsaveForRevert\r\t\tifTrue: [Smalltalk garbageCollect.\r\t\t\t\"let go of pointers\"\r\t\t\told storeSegment.\r\t\t\t\"result _\"\r\t\t\told world isInMemory\r\t\t\t\tifTrue: ['Can''t seem to write the project.']\r\t\t\t\tifFalse: [old projectParameters at: #revertToMe put: old world xxxSegment clone].\r\t\t\t'Project written.'].\r\t\"original is for coming back in and continuing.\"\r\trevertFlag | forceRevert\r\t\tifTrue: [seg clone revert].\r\t\"non-cloned one is for reverting again later\"\r\tself removeParameter: #exportState.\r\t\"Complete the enter: by launching a new process\"\r\tworld isMorph\r\t\tifFalse: [newProcess := [ScheduledControllers resetActiveController.\r\t\t\t\t\t\"in case of walkback in #restore\"\r\t\t\t\t\tshowZoom\r\t\t\t\t\t\tifFalse: [ScheduledControllers restore].\r\t\t\t\t\tScheduledControllers searchForActiveController] fixTemps newProcess priority: Processor userSchedulingPriority.\r\t\t\tnewProcess resume.\r\t\t\t\"lose the current process and its referenced morphs\"\r\t\t\tProcessor terminateActive]! !\r\r!Project methodsFor: 'menu messages' stamp: 'BG 10/30/2003 21:26'!\renterForEmergencyRecovery\r\t\"This version of enter invokes an absolute minimum of mechanism.\r\tAn unrecoverable error has been detected in an isolated project.\r\tIt is assumed that the old changeSet has already been revoked.\r\tNo new process gets spawned here.  This will happen in the debugger.\"\r\r\tself isCurrentProject ifTrue: [^ self].\r\tCurrentProject saveState.\r\tCurrentProject _ self.\r\tDisplay newDepthNoRestore: displayDepth.\r\tSmalltalk newChanges: changeSet.\r\tTranscriptStream newTranscript: transcript.\r\r\r\tworld isMorph\r\t\tifTrue:\r\t\t\t[\"Entering a Morphic project\"\r\t\t\tWorld _ world.\r\t\t\tworld install.\r\t\t\tworld triggerOpeningScripts]\r\t\tifFalse:\r\t\t\t[\"Entering an MVC project\"\r\t\t\tWorld _ nil.\r\t\t\tSmalltalk at: #ScheduledControllers put: world.\r\t\t\tScheduledControllers restore].\r\tUIProcess _ Processor activeProcess.\r! !\r\r!Project methodsFor: 'menu messages'!\rfileOut\r\tchangeSet fileOut! !\r\r!Project methodsFor: 'menu messages' stamp: 'BG 10/29/2003 01:09'!\rfinalExitActions\r\r\tworld isMorph ifTrue: [\r\t].\r! !\r\r!Project methodsFor: 'menu messages' stamp: 'sw 4/19/2001 12:58'!\rinstallProjectPreferences\r\t\"Install the settings of all preferences presently held individually by projects in the receiver's projectPreferenceFlagDictionary\"\r\r\t| localValue |\r\tPreferences allPreferenceObjects do:\r\t\t[:aPreference | \r\t\t\taPreference localToProject ifTrue:\r\t\t\t\t[localValue _ self projectPreferenceFlagDictionary at: aPreference name ifAbsent: [nil].\r\t\t\t\tlocalValue ifNotNil:\r\t\t\t\t\t[aPreference rawValue: localValue]]]! !\r\r!Project methodsFor: 'menu messages' stamp: 'BG 10/28/2003 20:07'!\rmakeThumbnail\r\t\"Make a thumbnail image of this project from the Display.\"\r\r\tworld isMorph ifTrue: [world displayWorldSafely]. \"clean pending damage\"\r\tviewSize ifNil: [viewSize _ Display extent // 8].\r\tthumbnail _ Form extent: viewSize depth: Display depth.\r\t(WarpBlt current toForm: thumbnail)\r\t\t\tsourceForm: Display;\r\t\t\tcellSize: 2;  \"installs a colormap\"\r\t\t\tcombinationRule: Form over;\r\t\t\tcopyQuad: (Display boundingBox) innerCorners\r\t\t\ttoRect: (0@0 extent: viewSize).\r\r\t^thumbnail\r! !\r\r!Project methodsFor: 'menu messages' stamp: 'sw 4/12/2001 22:29'!\rsaveProjectPreferences\r\t\"Preserve the settings of all preferences presently held individually by projects in the receiver's projectPreferenceFlagDictionary\"\r\r\tPreferences allPreferenceObjects do:\r\t\t[:aPreference | \r\t\t\taPreference localToProject ifTrue:\r\t\t\t\t[projectPreferenceFlagDictionary at: aPreference name put: aPreference preferenceValue]]! !\r\r!Project methodsFor: 'menu messages' stamp: 'BG 11/26/2003 23:15'!\rsaveState\r\t\"Save the current state in me prior to leaving this project\"\r\tchangeSet := ChangeSet current.\r\tthumbnail\r\t\tifNotNil: [thumbnail hibernate].\r\tSmalltalk isMorphic\r\t\tifFalse: [world := ScheduledControllers.\r\t\t\tScheduledControllers unCacheWindows].\r\tSensor flushAllButDandDEvents.\r\t\"Will be reinstalled by World>>install\"\r\ttranscript := Transcript! !\r\r!Project methodsFor: 'menu messages' stamp: 'BG 10/29/2003 09:53'!\rviewLocFor: exitedProject\r\t\"Look for a view of the exitedProject, and return its center\"\r\t| ctlr |\r\tworld isMorph\r\t\tifTrue: []\r\t\tifFalse: [ctlr _ world controllerWhoseModelSatisfies:\r\t\t\t\t\t\t\t[:p | p == exitedProject].\r\t\t\t\tctlr ifNotNil: [^ ctlr view windowBox center]].\r\r\t^ Sensor cursorPoint.  \"default result\"\r\r! !\r\r\r!Project methodsFor: 'release' stamp: 'di 9/28/1999 23:46'!\raddDependent: aMorph\r\r\t\"Projects do not keep track of their dependents, lest they point into other projects and thus foul up the tree structure for image segmentation.\"\r\r\t^ self  \"Ignore this request\"! !\r\r!Project methodsFor: 'release' stamp: 'sw 7/6/1998 11:16'!\rcanDiscardEdits\r\t\"Don't regard a window of mine as one to be discarded as part of a 'closeUnchangedWindows' sweep\"\r\r\t^ false! !\r\r!Project methodsFor: 'release' stamp: 'RAA 5/10/2001 12:58'!\rdeletingProject: aProject\r\t\"Clear my previousProject link if it points at the given Project, which is being deleted.\"\r\r\tself flag: #bob.\t\t\"zapping projects\"\r\r\tparentProject == aProject ifTrue: [\r\t\tparentProject _ parentProject parent\r\t].\r\tpreviousProject == aProject\r\t\tifTrue: [previousProject _ nil].\r\tnextProject == aProject\r\t\tifTrue:\t[nextProject _ nil]\r! !\r\r!Project methodsFor: 'release' stamp: 'ssa 9/3/2008 11:09'!\rokToChange\r\t\"Answer whether the window in which the project is housed can be dismissed -- which is destructive. We never clobber a project without confirmation\"\r\r\t| ok |\r\tself subProjects size  >0 ifTrue:\r\t\t[self inform: \r'The project ', self name printString, '\rcontains sub-projects.  You must remove these\rexplicitly before removing their parent.'.\r\t\t^ false].\r\tok _ world isMorph not and: [world scheduledControllers size <= 1].\r\tok ifFalse: [self isMorphic ifTrue:\r\t\t[]].  \"view from elsewhere.  just delete it.\"\r\tok _ (self confirm:\r'Really delete the project\r', self name printString, '\rand all its windows?').\r\t\t\r\tok ifFalse: [^ false].\r\r\r\r\tself removeChangeSetIfPossible.\r\t\"do this last since it will render project inaccessible to #allProjects and their ilk\"\r\tProjectHistory forget: self.\r\tProject deletingProject: self.\r\t^ true\r! !\r\r!Project methodsFor: 'release' stamp: 'RAA 6/7/2000 09:24'!\rrelease\r\r\tself flag: #bob.\t\"this can be trouble if Projects are reused before garbage collection\"\r\tworld == nil ifFalse:\r\t\t[world release.\r\t\tworld _ nil].\r\t^ super release! !\r\r!Project methodsFor: 'release' stamp: 'RAA 5/10/2001 13:06'!\rremoveChangeSetIfPossible\r\r\t| itsName |\r\r\tchangeSet ifNil: [^self].\r\tchangeSet isEmpty ifFalse: [^self].\r\t(changeSet projectsBelongedTo copyWithout: self) isEmpty ifFalse: [^self].\r\titsName _ changeSet name.\r\tChangeSorter removeChangeSet: changeSet.\r\t\"Transcript cr; show: 'project change set ', itsName, ' deleted.'\"\r! !\r\r!Project methodsFor: 'release' stamp: 'BG 10/28/2003 21:04'!\rsubProjects\r\t\"Answer a list of all the subprojects  of the receiver.  This is nastily idiosyncratic.\"\r\r\t^ self isMorphic\r\t\t\r\t\tifFalse:\r\t\t\t[(world controllersSatisfying:\r\t\t\t\t\t[:m | m model isKindOf: Project])\r\t\t\t\tcollect:\r\t\t\t\t\t[:c | c model]]\r! !\r\r\r!Project methodsFor: 'printing' stamp: 'jm 5/21/1998 07:40'!\rprintOn: aStream\r\r\taStream nextPutAll: 'a Project(', self name, ')'.\r! !\r\r\r!Project methodsFor: 'file in/out' stamp: 'BG 10/29/2003 00:50'!\rbeep\r\t! !\r\r!Project methodsFor: 'file in/out' stamp: 'BG 10/29/2003 08:18'!\rcurrentVersionNumber\r\r\tversion ifNil: [^0].\r\tversion isInteger ifTrue:[^version].\r\t\"version _ Base64MimeConverter decodeInteger: version unescapePercents.\"\r\t^version! !\r\r!Project methodsFor: 'file in/out' stamp: 'ar 2/27/2001 13:44'!\rprojectExtension\r\t^self class projectExtension! !\r\r!Project methodsFor: 'file in/out' stamp: 'tk 10/26/1999 14:23'!\rrevert\r\t| |\r\t\"Exit this project and do not save it.  Warn user unless in dangerous projectRevertNoAsk mode.  Exit to the parent project.  Do a revert on a clone of the segment, to allow later reverts.\"\r\r\tprojectParameters ifNil: [^ self inform: 'nothing to revert to'].\r\tparentProject enter: false revert: true saveForRevert: false.\r\t\"does not return!!\"\r! !\r\r!Project methodsFor: 'file in/out' stamp: 'BG 10/29/2003 09:10'!\rsaveAs\r\t\"Forget where stored before, and store.  Will ask user where.\"\r\r\t\"self forgetExistingURL.\r\tself storeOnServer. \"! !\r\r!Project methodsFor: 'file in/out' stamp: 'BG 10/29/2003 09:16'!\rstoreSegment\r\t\"Store my project out on the disk as an ImageSegment.  Keep the outPointers in memory.  Name it <project name>.seg.  *** Caller must be holding (Project alInstances) to keep subprojects from going out. ***\"\r\r(World == world) ifTrue: [^ false]. \r\t\"self inform: 'Can''t send the current world out'.\"\rworld isInMemory ifFalse: [^ false].  \"already done\"\rworld isMorph ifFalse: [\r\tself projectParameters at: #isMVC put: true.\r\t^ false].\t\"Only Morphic projects for now\"\rworld ifNil: [^ false].  world presenter ifNil: [^ false].\r\r! !\r\r!Project methodsFor: 'file in/out' stamp: 'md 10/22/2003 17:54'!\rstoreToMakeRoom\r\t\"Write out enough projects to fulfill the space goals.\r\tInclude the size of the project about to come in.\"\r\r\t| params memoryEnd goalFree cnt gain proj skip tried |\r\tGoalFreePercent ifNil: [GoalFreePercent _ 33].\r\tGoalNotMoreThan ifNil: [GoalNotMoreThan _ 20000000].\r\tparams _ SmalltalkImage current  getVMParameters.\r\tmemoryEnd\t_ params at: 3.\r\"\tyoungSpaceEnd\t_ params at: 2.\r\tfree _ memoryEnd - youngSpaceEnd.\r\"\r\tgoalFree _ GoalFreePercent asFloat / 100.0 * memoryEnd.\r\tgoalFree _ goalFree min: GoalNotMoreThan.\r\tworld isInMemory ifFalse: [\"enough room to bring it in\"\r\t\tgoalFree _ goalFree + (self projectParameters at: #segmentSize ifAbsent: [0])].\r\tcnt _ 30.\r\tgain _ Smalltalk garbageCollectMost.\r\t\"skip a random number of projects that are in memory\"\r\tproj _ self.  skip _ 6 atRandom.\r\t[proj _ proj nextInstance ifNil: [Project someInstance].\r\t\tproj world isInMemory ifTrue: [skip _ skip - 1].\r\t\tskip > 0] whileTrue.\r\tcnt _ 0.  tried _ 0.\r\r\t[gain > goalFree] whileFalse: [\r\t\tproj _ proj nextInstance ifNil: [Project someInstance].\r\t\tproj storeSegment ifTrue: [\"Yes, did send its morphs to the disk\"\r\t\t\tgain _ gain + (proj projectParameters at: #segmentSize \r\t\t\t\t\t\tifAbsent: [20000]).\t\"a guess\"\r\t\t\tBeeper beep.\r\t\t\t(cnt _ cnt + 1) > 5 ifTrue: [^ self]].\t\"put out 5 at most\"\r\t\t(tried _ tried + 1) > 23 ifTrue: [^ self]].\t\"don't get stuck in a loop\"! !\r\r!Project methodsFor: 'file in/out' stamp: 'mir 6/25/2001 10:55'!\rurl\r\t| firstURL |\r\t\"compose my url on the server\"\r\r\turlList isEmptyOrNil ifTrue: [^''].\r\tfirstURL _ urlList first.\r\tfirstURL isEmpty\r\t\tifFalse: [\r\t\t\tfirstURL last == $/\r\t\t\t\tifFalse: [firstURL _ firstURL, '/']].\r\t^ firstURL, self versionedFileName\r! !\r\r!Project methodsFor: 'file in/out' stamp: 'mir 6/21/2001 15:45'!\rversionForFileName\r\t\"Project current versionForFileName\"\r\t^self class versionForFileName: self currentVersionNumber! !\r\r!Project methodsFor: 'file in/out' stamp: 'mir 6/21/2001 15:43'!\rversionedFileName\r\t\"Project current versionedFileName\"\r\t^String streamContents:[:s|\r\t\ts nextPutAll: self name.\r\t\ts nextPutAll: FileDirectory dot.\r\t\ts nextPutAll: self versionForFileName.\r\t\ts nextPutAll: FileDirectory dot.\r\t\ts nextPutAll: self projectExtension.\r\t]\r! !\r\r\r!Project methodsFor: 'object fileIn' stamp: 'RAA 12/20/2000 17:49'!\rconvertToCurrentVersion: varDict refStream: smartRefStrm\r\t\r\tisolatedHead ifNil: [isolatedHead _ false].\r\tinForce ifNil: [inForce _ false].\r\t^super convertToCurrentVersion: varDict refStream: smartRefStrm.\r\r! !\r\r\r!Project methodsFor: 'project parameters' stamp: 'sw 4/24/2001 11:58'!\rinitializeProjectParameters\r\t\"Initialize the project parameters.\"\r\r\tprojectParameters _ IdentityDictionary new.\r\t^ projectParameters! !\r\r!Project methodsFor: 'project parameters' stamp: 'di 11/16/2001 21:08'!\rinitializeProjectPreferences\r\t\"Initialize the project's preferences from currently-prevailing preferences that are currently being held in projects in this system\"\r\t\r\tprojectPreferenceFlagDictionary _ Project current projectPreferenceFlagDictionary deepCopy.    \"Project overrides in the new project start out being the same set of overrides in the calling project\"\r\r\tPreferences allPreferenceObjects do:  \"in case we missed some\"\r\t\t[:aPreference |\r\t\t\taPreference localToProject ifTrue:\r\t\t\t\t[(projectPreferenceFlagDictionary includesKey: aPreference name) ifFalse:\r\t\t\t[projectPreferenceFlagDictionary at: aPreference name put: aPreference preferenceValue]]].\r\r\tself isMorphic ifFalse: [self flapsSuppressed: true].\r\t(Project current projectParameterAt: #disabledGlobalFlapIDs  ifAbsent: [nil]) ifNotNilDo:\r\t\t[:idList | self projectParameterAt: #disabledGlobalFlapIDs put: idList copy]\r! !\r\r!Project methodsFor: 'project parameters' stamp: 'sw 2/16/2001 22:35'!\rnoteThatParameter: prefSymbol justChangedTo: aBoolean\r\t\"Provides a hook so that a user's toggling of a project parameter might precipitate some immediate action\"\r\r! !\r\r!Project methodsFor: 'project parameters' stamp: 'ar 5/25/2000 23:23'!\rparameterAt: aSymbol ifAbsent: aBlock\r\tprojectParameters ifNil:[^aBlock value].\r\t^projectParameters at: aSymbol ifAbsent: aBlock! !\r\r!Project methodsFor: 'project parameters' stamp: 'sw 2/15/2001 14:32'!\rprojectParameterAt: aSymbol ifAbsent: aBlock\r\t\"Answer the project parameter stored at the given symbol, or the result of evaluating the block\"\r\r\t^ self projectParameters at: aSymbol ifAbsent: [aBlock value]! !\r\r!Project methodsFor: 'project parameters' stamp: 'sw 2/17/2001 21:36'!\rprojectParameterAt: aSymbol put: aValue\r\t\"Set the given project parameter to the given value\"\r\r\tself projectParameters at: aSymbol put: aValue.\r\tself noteThatParameter: aSymbol justChangedTo: aValue.\r\t^ aValue! !\r\r!Project methodsFor: 'project parameters' stamp: 'sw 4/22/1999 15:14'!\rprojectParameters\r\t^ projectParameters ifNil: [self initializeProjectParameters]! !\r\r!Project methodsFor: 'project parameters' stamp: 'sw 2/16/2001 22:25'!\rprojectPreferenceAt: aSymbol ifAbsent: aBlock\r\t\"Answer the project preference stored at the given symbol, or the result of evaluating the block\"\r\r\t^ self projectPreferenceFlagDictionary at: aSymbol ifAbsent: [aBlock value]! !\r\r!Project methodsFor: 'project parameters' stamp: 'sw 2/16/2001 22:23'!\rprojectPreferenceFlagDictionary\r\t\"Answer the dictionary that holds the project preferences, creating it if necessary\"\r\r\t^ projectPreferenceFlagDictionary ifNil: [projectPreferenceFlagDictionary _ IdentityDictionary new]! !\r\r!Project methodsFor: 'project parameters' stamp: 'tk 10/26/1999 13:55'!\rrawParameters\r\t^ projectParameters! !\r\r!Project methodsFor: 'project parameters' stamp: 'ar 6/2/1999 05:29'!\rremoveParameter: aKey\r\tprojectParameters ifNil:[^self].\r\tprojectParameters removeKey: aKey ifAbsent:[].! !\r\r\r!Project methodsFor: 'flaps support' stamp: 'BG 10/29/2003 08:42'!\rflapsSuppressed: aBoolean\r\t\"Make the setting of the flag that governs whether global flaps are suppressed in the project be as indicated and add or remove the actual flaps\"\r\r\tself projectPreferenceFlagDictionary at: #showSharedFlaps put: aBoolean not.\r\tself == Project current  \"Typical case\"\r\t\tifTrue:\r\t\t\t[Preferences setPreference: #showSharedFlaps toValue: aBoolean not]\r\t\tifFalse:   \"Anomalous case where this project is not the current one.\"\r\t\t\t[aBoolean\r\t\t\t\tifTrue:\t\t\r\t\t\t\t\t[]\r\r\t\t\t\tifFalse:\r\t\t\t\t\t[Smalltalk isMorphic  ifTrue:\r\t\t\t\t\t\t[]]].\r\tProject current assureNavigatorPresenceMatchesPreference! !\r\r!Project methodsFor: 'flaps support' stamp: 'sw 4/24/2001 11:02'!\rshowSharedFlaps\r\t\"Answer whether shared flaps are shown or suppressed in this project\"\r\r\t| result |\r\tresult _ Preferences showSharedFlaps.\r\t^ self == Project current\r\t\tifTrue:\r\t\t\t[result]\r\t\tifFalse:\r\t\t\t[self projectPreferenceAt: #showSharedFlaps ifAbsent: [result]]! !\r\r\r!Project methodsFor: 'displaying' stamp: 'ar 5/28/2000 19:43'!\rdisplayZoom: entering\r\t\"Show the project transition when entering a new project\"\r\t| newDisplay vanishingPoint |\r\t\"Play the flash transition if any.\"\r\tself projectParameters at: #flashTransition ifPresent:[:dict|\r\t\tdict at: CurrentProject ifPresent:[:player| ^player playProjectTransitionFrom: CurrentProject to: self entering: entering]].\r\t\"Show animated zoom to new display\"\r\tnewDisplay _ self imageForm.\r\tentering\r\t\tifTrue: [vanishingPoint _ Sensor cursorPoint]\r\t\tifFalse: [vanishingPoint _ self viewLocFor: CurrentProject].\r\tDisplay zoomIn: entering orOutTo: newDisplay at: 0@0\r\t\t\tvanishingPoint: vanishingPoint.! !\r\r!Project methodsFor: 'displaying' stamp: 'ar 6/2/1999 01:58'!\rimageForm\r\t^self imageFormOfSize: Display extent\r\t\tdepth: (displayDepth ifNil:[Display depth])! !\r\r!Project methodsFor: 'displaying' stamp: 'BG 10/29/2003 08:31'!\rimageFormOfSize: extentPoint depth: d\r\t| newDisplay |\r\tnewDisplay _ DisplayScreen extent: extentPoint depth: d.\r\tDisplay replacedBy: newDisplay do:[\r\t\tworld restore. \"MVC\"\r\t].\r\t^newDisplay! !\r\r!Project methodsFor: 'displaying' stamp: 'sw 1/12/2000 18:44'!\rshowZoom\r\t\"Decide if user wants a zoom transition, and if there is enough memory to do it.\"\r\r\t^ Preferences projectZoom and:\r\t\t\"Only show zoom if there is room for both displays plus a megabyte\"\r\t\t[Smalltalk garbageCollectMost > \r\t\t\t\t\t\t(Display boundingBox area*displayDepth //8+1000000)]! !\r\r\r!Project methodsFor: 'isolation layers' stamp: 'di 4/1/2000 09:22'!\rcompileAll: newClass from: oldClass\r\t\"Make sure that shadowed methods in isolation layers get recompiled.\r\tTraversal is done elsewhere.  This simply handles the current project.\"\r\r\tisolatedHead == true ifFalse: [^ self].   \"only isolated projects need to act on this.\"\r\t\r\tchangeSet compileAll: newClass from: oldClass! !\r\r!Project methodsFor: 'isolation layers' stamp: 'RAA 9/27/2000 18:53'!\rcompileAllIsolated: newClass from: oldClass\r\t\"Whenever a recompile is needed in a class, look in other isolated projects for saved methods and recompile them also.\r\tAt the time this method is called, the recompilation has already been done for the project now in force.\"\r\r\tProject allProjects do: [:proj | proj compileAll: newClass from: oldClass].\r\r! !\r\r!Project methodsFor: 'isolation layers' stamp: 'di 3/29/2000 16:04'!\rinvoke\r\t\"Install all methods changed here into method dictionaries.\r\tMake my versions be the ones that will be called.\"\r\r\tisolatedHead ifFalse: [^ self error: 'This isnt an isolation layer.'].\r\tinForce ifTrue: [^ self error: 'This layer is already in force.'].\r\tchangeSet invoke.\t\r\tinForce _ true.! !\r\r!Project methodsFor: 'isolation layers' stamp: 'di 3/29/2000 15:49'!\rinvokeFrom: otherProject\r\t\"Revoke the changes in force for this project, and then invoke those in force for otherProject.  This method shortens the process to the shortest path up then down through the isolation layers.\"\r\r\t| pathUp pathDown |\r\tpathUp _ otherProject layersToTop.  \"Full paths to top\"\r\tpathDown _ self layersToTop.\r\r\t\"Shorten paths to nearest common ancestor\"\r\t[pathUp isEmpty not\r\t\tand: [pathDown isEmpty not\r\t\tand: [pathUp last == pathDown last]]]\r\t\twhileTrue: [pathUp removeLast.  pathDown removeLast].\r\r\t\"Now revoke changes up from otherProject and invoke down to self.\"\r\tpathUp do: [:p | p revoke].\r\tpathDown reverseDo: [:p | p invoke].\r! !\r\r!Project methodsFor: 'isolation layers' stamp: 'di 4/4/2000 21:10'!\risolationHead\r\t\"Go up the parent chain and find the nearest isolated project.\"\r\r\tisolatedHead == true ifTrue: [^ self].\r\tself isTopProject ifTrue: [^ nil].\r\t^ parentProject isolationHead! !\r\r!Project methodsFor: 'isolation layers' stamp: 'di 3/29/2000 17:00'!\risolationSet\r\r\t\"Return the changeSet for this isolation layer or nil\"\r\tisolatedHead == true ifTrue: [^ changeSet].\r\tself isTopProject ifTrue: [^ nil].  \"At the top, but not isolated\"\r\t^ parentProject isolationSet\r\r! !\r\r!Project methodsFor: 'isolation layers' stamp: 'di 3/29/2000 15:40'!\rlayersToTop\r\t\"Return an OrderedCollection of all the projects that are isolation layers from this one up to the top of the project hierarchy, inclusive.\"\r\r\t| layers |\r\tself isTopProject\r\t\tifTrue: [layers _ OrderedCollection new]\r\t\tifFalse: [layers _ parentProject layersToTop].\r\tisolatedHead ifTrue: [layers addFirst: self].\r\t^ layers\r! !\r\r!Project methodsFor: 'isolation layers' stamp: 'di 3/29/2000 16:06'!\rrevoke\r\t\"Take back all methods changed here.\r\tInstall the original method dictionaries and organizations.\r\tThe orignal method versions will now be the ones used.\"\r\r\tisolatedHead ifFalse: [^ self error: 'This isnt an isolation layer.'].\r\tinForce ifFalse: [^ self error: 'This layer should have been in force.'].\r\tchangeSet revoke.\t\r\tinForce _ false.\r! !\r\r\r!Project methodsFor: 'OBSOLETE' stamp: 'RAA 6/3/2000 19:01'!\robsolete\r\r\tself flag: #obsolete.\r\t\"instance variable \r\t\texitFlag is no longer used\r\t\tactiveProcess is on the way out\r\t\"! !\r\r\r!Project methodsFor: 'resources' stamp: 'ar 3/2/2001 17:25'!\rabortResourceLoading\r\t\"Abort loading resources\"\r\tresourceManager ifNil:[^self].\r\tresourceManager stopDownload.! !\r\r\r!Project methodsFor: 'active process' stamp: 'jla 4/2/2001 15:12'!\rdepth\r\t\"Return the depth of this project from the top.\r\t topProject = 0, next = 1, etc.\"\r\t\"Project current depth.\"\r\r\t| depth topProject project |\r\tdepth _ 0.\r\ttopProject _ Project topProject.\r\tproject _ self.\r\t\r\t[project ~= topProject]\r\t\twhileTrue:\r\t\t\t[project _ project parent.\r\t\t\tdepth _ depth + 1].\r\t^ depth! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rProject class\r\tinstanceVariableNames: ''!\r\r!Project class methodsFor: 'class initialization' stamp: 'RAA 6/3/2000 18:50'!\rinitialize\r\t\"This is the Top Project.\"   \r\r\tCurrentProject ifNil:\r\t\t[CurrentProject _ super new initialProject.\r\t\tProject spawnNewProcessAndTerminateOld: true].\r\r\t\"Project initialize\"! !\r\r!Project class methodsFor: 'class initialization' stamp: 'RAA 12/17/2000 12:37'!\rrebuildAllProjects\r\t\"Project rebuildAllProjects\"\r\r\tAllProjects _ nil.\r\tself allProjects.! !\r\r\r!Project class methodsFor: 'instance creation' stamp: 'RAA 11/16/2000 12:07'!\rnew\r\r\t| new |\r\r\tnew _ super new.\r\tnew setProjectHolder: CurrentProject.\r\tself addingProject: new.\r\t^new! !\r\r!Project class methodsFor: 'instance creation' stamp: 'RAA 9/27/2000 13:41'!\ruiProcess\r\r\t^ UIProcess! !\r\r\r!Project class methodsFor: 'utilities' stamp: 'ssa 9/3/2008 11:11'!\raddItem: item toMenu: menu selection: action project: aProject\r\tmenu add: item action: action! !\r\r!Project class methodsFor: 'utilities' stamp: 'RAA 11/16/2000 12:04'!\raddingProject: newProject\r\r\t(self allProjects includes: newProject) ifTrue: [^self].\r\tAllProjects _ self allProjects copyWith: newProject.! !\r\r!Project class methodsFor: 'utilities' stamp: 'di 6/10/1999 11:30'!\rallNamesAndProjects\r\t^ (self allProjects asSortedCollection: [:p1 :p2 | p1 name asLowercase < p2 name asLowercase]) collect:\r\t\t[:aProject | Array with: aProject name with: aProject]! !\r\r!Project class methodsFor: 'utilities' stamp: 'RAA 11/13/2000 17:14'!\rallProjects\r\r\t^AllProjects ifNil: [\r\t\tSmalltalk garbageCollect.\r\t\tAllProjects _ self allSubInstances select: [:p | p name notNil].\r\t].! !\r\r!Project class methodsFor: 'utilities' stamp: 'jla 5/28/2001 21:48'!\rallProjectsOrdered\r\t\"Answer a list of all projects in hierarchical order, depth first\"\r\t\r\t| allProjects  |\r\tallProjects _ OrderedCollection new.\r\tProject topProject withChildrenDo:\r\t\t[:p | allProjects add: p].\r\t^ allProjects\r\r\"\rProject allProjectsOrdered\r\"! !\r\r!Project class methodsFor: 'utilities' stamp: 'sw 11/24/2002 10:57'!\rbuildJumpToMenu: menu\r\t\"Make the supplied menu offer a list of potential projects, consisting of:\r\t\t*\tThe previous-project chain\r\t\t*\tThe next project, if any\r\t\t*\tThe parent project, if any\r\t\t*\tAll projects, alphabetically or hierarchically\"\r\r\t| prev listed i next  toAdd |\r\tlisted _ OrderedCollection with: CurrentProject.\r\ti _ 0.\r\r\t\"The previous Project chain\"\r\tprev _ CurrentProject previousProject.\r\t[(prev ~~ nil and: [(listed includes: prev) not])] whileTrue:\r\t  [i _ i + 1.\r\t\tlisted add: prev.\r\t\tself \taddItem: prev name , ' (back ' , i printString , ')'\r\t\t\t\ttoMenu: menu \r\t\t\t\tselection: ('%back' , i printString) \r\t\t\t\tproject: prev.\r\t\tprev _ prev previousProject].\r\ti > 0 ifTrue: [menu addLine].\r\r\r\t\"Then the next Project\"\r\t(((next _ CurrentProject nextProject) ~~ nil) and: [(listed includes: next) not]) ifTrue:\r\t\t[self\taddItem: (next name, ' (forward 1)') \r\t\t\t\ttoMenu: menu \r\t\t\t\tselection: next name \r\t\t\t\tproject: next]. \r\tnext ~~ nil ifTrue: [menu addLine].\r\r\t\"Then the parent\"\r\tCurrentProject isTopProject ifFalse: \r\t\t[self\taddItem: CurrentProject parent name , ' (parent)' \r\t\t\t\ttoMenu: menu \r\t\t\t\tselection: #parent \r\t\t\t\tproject: CurrentProject parent.\r\t\t  menu addLine].\r\r\t\"Finally all the projects, in hierarchical or alphabetical order:\"\r\t(Preferences alphabeticalProjectMenu\r\t\t\tifTrue:\r\t\t\t\t[Project allNamesAndProjects]\r\t\t\tifFalse:\r\t\t\t\t[Project hierarchyOfNamesAndProjects]) do:\r\r\t\t[:aPair | \r\t\t\ttoAdd _ aPair last isCurrentProject\r\t\t\t\tifTrue:\r\t\t\t\t  [aPair first, ' (current)']\r\t\t\t\tifFalse:\r\t\t\t\t  [aPair first].\r\t\t\tself\taddItem: toAdd \r\t\t\t\ttoMenu: menu \r\t\t\t\tselection: aPair first \r\t\t\t\tproject: aPair last].\r\t^ menu! !\r\r!Project class methodsFor: 'utilities' stamp: 'BG 10/29/2003 09:18'!\rdeletingProject: outgoingProject\r\r\t\r\tProject allProjects do: [:p | p deletingProject: outgoingProject].\t\"ones that are in\"\r\t\r\r\tAllProjects _ self allProjects copyWithout: outgoingProject.! !\r\r!Project class methodsFor: 'utilities' stamp: 'RAA 12/26/2000 12:42'!\rforget: aProject\r\r\tAllProjects _ self allProjects reject: [ :x | x == aProject].\r! !\r\r!Project class methodsFor: 'utilities' stamp: 'jla 5/28/2001 21:43'!\rhierarchyOfNamesAndProjects\r\t\"Answer a list of all project names, with each entry preceded by white space commensurate with its depth beneath the top project\"\r\t\r\t^ self allProjectsOrdered collect:\r\t\t[:project | Array with: project nameAdjustedForDepth with: project]! !\r\r!Project class methodsFor: 'utilities' stamp: 'BG 10/28/2003 21:04'!\rinterruptName: labelString\r\t\"Create a Notifier on the active scheduling process with the given label.\"\r\t\r\tSmalltalk isMorphic ifFalse:\r\t\t[^ ScheduledControllers interruptName: labelString].! !\r\r!Project class methodsFor: 'utilities' stamp: 'jla 4/2/2001 20:34'!\rjumpToProject\t\t\"Project jumpToProject\"\r\t\"Present a list of potential projects and enter the one selected.\"\r\r\tself jumpToSelection: (self buildJumpToMenu: CustomMenu new) startUpLeftFlush! !\r\r!Project class methodsFor: 'utilities' stamp: 'jla 4/2/2001 15:57'!\rjumpToSelection: selection\r\t\"Enter the project corresponding to this menu selection.\"\r\t\r\t\"Project jumpToProject\"\r\t| nBack prev pr |\r\tselection ifNil: [^ self].\r\t(selection beginsWith: '%back') ifTrue:\r\t\t[nBack _ (selection copyFrom: 6 to: selection size) asNumber.\r\t\tprev _ CurrentProject previousProject.\r\t\t1 to: nBack-1 do:\r\t\t\t[:i | prev ifNotNil: [prev _ prev previousProject]].\r\t\tprev ifNotNil: [prev enter: true revert: false saveForRevert: false]].\r\tselection = #parent ifTrue:\r\t\t[CurrentProject parent enter: false revert: false saveForRevert: false.\r\t\t^ self].\r\t(pr _ Project namedWithDepth: selection) ifNil: [^ self].\r\tpr enter: false revert: false saveForRevert: false! !\r\r!Project class methodsFor: 'utilities' stamp: 'tk 3/10/2000 21:10'!\rnamed: projName\r\t\"Answer the project with the given name, or nil if there is no project of that given name.\"\r\t\"(Project named: 'New Changes') enter\"\r\r\t^ self allProjects\r\t\tdetect: [:proj | proj name = projName]\r\t\tifNone: [nil]\r! !\r\r!Project class methodsFor: 'utilities' stamp: 'jla 4/2/2001 15:57'!\rnamedWithDepth: projName\r\t\"Answer the project with the given name, or nil if there is no project of that given name.\"\r\t\"(Project named: 'New Changes') enter\"\r\r\t^ self allProjects\r\t\tdetect: [:proj | \r\t\t\t  proj name = projName or:\r\t\t\t\t[proj nameAdjustedForDepth = projName]]\r\t\tifNone: [nil]! !\r\r!Project class methodsFor: 'utilities' stamp: 'RAA 6/3/2000 18:28'!\rresumeProcess: aProcess\r\t\"Adopt aProcess as the project process -- probably because of proceeding from a debugger\"\r\r\tUIProcess _ aProcess.\r\tUIProcess resume! !\r\r!Project class methodsFor: 'utilities' stamp: 'tk 10/26/1999 14:25'!\rreturnToPreviousProject\r\t\"Return to the project from which this project was entered. Do nothing if the current project has no link to its previous project.\"\r\r\t| prevProj |\r\tprevProj _ CurrentProject previousProject.\r\tprevProj ifNotNil: [prevProj enter: true revert: false saveForRevert: false].\r! !\r\r!Project class methodsFor: 'utilities' stamp: 'RAA 6/3/2000 18:49'!\rspawnNewProcess\r\r\tUIProcess _ [\r\t\t[World doOneCycle.  Processor yield.  false] whileFalse: [].\r\t] newProcess priority: Processor userSchedulingPriority.\r\tUIProcess resume! !\r\r!Project class methodsFor: 'utilities' stamp: 'RAA 6/3/2000 18:49'!\rspawnNewProcessAndTerminateOld: terminate\r\r\tself spawnNewProcess.\r\tterminate\r\t\tifTrue: [Processor terminateActive]\r\t\tifFalse: [Processor activeProcess suspend]! !\r\r!Project class methodsFor: 'utilities' stamp: 'RAA 9/27/2000 19:00'!\rtopProject\r\t\"Answer the top project.  There is only one\"\r\r\t^ self allProjects detect: [:p | p isTopProject]! !\r\r!Project class methodsFor: 'utilities' stamp: 'mir 6/21/2001 15:44'!\rversionForFileName: version\r\t\"Project versionForFileName: 7\"\r\t| v |\r\t^String streamContents:[:s|\r\t\tv _ version printString.\r\t\tv size < 3 ifTrue:[v _ '0', v].\r\t\tv size < 3 ifTrue:[v _ '0', v].\r\t\ts nextPutAll: v.\r\t]\r! !\r\r\r!Project class methodsFor: 'constants'!\rcurrent\r\t\"Answer the project that is currently being used.\"\r\r\t^CurrentProject! !\r\r\r!Project class methodsFor: 'squeaklet on server' stamp: 'ar 2/27/2001 13:43'!\rprojectExtension\r\t^'pr'! !\rStandardSystemController subclass: #ProjectController\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Support'!\r\r!ProjectController methodsFor: 'control activity' stamp: 'tk 10/26/1999 14:26'!\rredButtonActivity\r\t| index |\r\tview isCollapsed ifTrue: [^ super redButtonActivity].\r\t(view insetDisplayBox containsPoint: Sensor cursorPoint)\r\t\tifFalse: [^ super redButtonActivity].\r\tindex _ (PopUpMenu labelArray: #('enter' 'jump to project...') lines: #()) \r\t\tstartUpCenteredWithCaption: nil.\r\tindex = 0 ifTrue: [^ self].\r\r\t\"save size on enter for thumbnail on exit\"\r\tmodel setViewSize: view insetDisplayBox extent.\r\tindex = 1 ifTrue: [^ model enter: false revert: false saveForRevert: false].\r\tindex = 2 ifTrue: [Project jumpToProject. ^ self].\r! !\rModel subclass: #ProjectHistory\r\tinstanceVariableNames: 'mostRecent'\r\tclassVariableNames: 'ChangeCounter CurrentHistory'\r\tpoolDictionaries: ''\r\tcategory: 'System-Support'!\r\r!ProjectHistory methodsFor: 'as yet unclassified' stamp: 'RAA 7/10/2000 15:57'!\rchanged\r\r\tChangeCounter _ (ChangeCounter ifNil: [0]) + 1.\r\tsuper changed.! !\r\r!ProjectHistory methodsFor: 'as yet unclassified' stamp: 'RAA 9/27/2000 20:27'!\rforget: aProject\r\r\t| newTuple |\r\tnewTuple _ {\r\t\taProject name.\r\t\taProject thumbnail.\r\t\taProject url.\r\t\tWeakArray with: aProject.\r\t}.\r\tmostRecent _ mostRecent reject: [ :each |\r\t\teach fourth first == aProject or: [\r\t\t\teach fourth first isNil & (each first = newTuple first)\r\t\t].\r\t].\r\tself changed.\r\t^newTuple! !\r\r!ProjectHistory methodsFor: 'as yet unclassified' stamp: 'RAA 7/10/2000 15:27'!\rinitialize\r\r\tmostRecent _ OrderedCollection new.\r! !\r\r!ProjectHistory methodsFor: 'as yet unclassified' stamp: 'RAA 7/12/2000 10:17'!\rremember: aProject\r\r\t| newTuple |\r\r\tnewTuple _ self forget: aProject.\r\tmostRecent addFirst: newTuple.\r\tmostRecent size > 10 ifTrue: [mostRecent _ mostRecent copyFrom: 1 to: 10].\r\tself changed! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rProjectHistory class\r\tinstanceVariableNames: ''!\r\r!ProjectHistory class methodsFor: 'as yet unclassified' stamp: 'RAA 7/10/2000 15:27'!\rcurrentHistory\r\r\t^CurrentHistory ifNil: [CurrentHistory _ self new initialize].! !\r\r!ProjectHistory class methodsFor: 'as yet unclassified' stamp: 'RAA 7/12/2000 10:16'!\rforget: aProject\r\r\tself currentHistory forget: aProject\r! !\r\r!ProjectHistory class methodsFor: 'as yet unclassified' stamp: 'RAA 7/10/2000 15:31'!\rremember: aProject\r\r\tself currentHistory remember: aProject\r! !\rStandardSystemView subclass: #ProjectView\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'ArmsLengthCmd'\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Support'!\r\r!ProjectView methodsFor: 'initialization'!\rdefaultControllerClass\r\t^ ProjectController! !\r\r!ProjectView methodsFor: 'initialization' stamp: 'sw 8/4/1998 19:15'!\rmaybeRelabel: newLabel\r\t\"If the change set name given by newLabel is already in use, do nothing; else relabel the view\"\r\r\t(newLabel isEmpty or: [newLabel = self label])\r\t\tifTrue: [^ self].\r\t(ChangeSorter changeSetNamed: newLabel) == nil\r\t\tifFalse: [^ self].\r\tself relabel: newLabel! !\r\r!ProjectView methodsFor: 'initialization' stamp: 'di 5/6/1998 17:03'!\rrelabel: newLabel\r\t(newLabel isEmpty or: [newLabel = self label])\r\t\tifTrue: [^ self].\r\t(ChangeSorter changeSetNamed: newLabel) == nil\r\t\tifFalse: [self inform: 'Sorry that name is already used'.\r\t\t\t\t^ self].\r\tmodel projectChangeSet name: newLabel.\r\tsuper relabel: newLabel! !\r\r!ProjectView methodsFor: 'initialization' stamp: 'sw 1/11/2000 15:30'!\runcacheBits\r\tsuper uncacheBits.\r\tself label ~=  model name ifTrue: [self setLabelTo: model name]! !\r\r\r!ProjectView methodsFor: 'displaying' stamp: 'tk 4/19/2000 17:15'!\rarmsLengthCommand: aCommand\r\t\"Set up a save to be done after the subproject exits to here.  displayOn: checks it.\"\r\r\tArmsLengthCmd _ aCommand.! !\r\r!ProjectView methodsFor: 'displaying'!\rcacheBitsAsTwoTone\r\t^ false! !\r\r!ProjectView methodsFor: 'displaying' stamp: 'tk 6/21/2000 16:22'!\rdisplayDeEmphasized\r\t| cmd |\r\t\"Display this view with emphasis off.  Check for a command that\rcould not be executed in my subproject.  Once it is done, remove the\rtrigger.\"\r\r\tsuper displayDeEmphasized.\r\tArmsLengthCmd ifNil: [^ self].\r\tArmsLengthCmd first == model ifFalse: [^ self].\t\"not ours\"\r\tcmd _ ArmsLengthCmd second.\r\tArmsLengthCmd _ nil.\r\tmodel \"project\" perform: cmd.\r\tmodel \"project\" enter.\r! !\r\r!ProjectView methodsFor: 'displaying' stamp: 'sw 1/11/2000 15:32'!\rdisplayView\r\tsuper displayView.\r\tself label = model name\r\t\tifFalse: [self setLabelTo: model name].\r\tself isCollapsed ifTrue: [^ self].\r\tmodel thumbnail ifNil: [^ self].\r\tself insetDisplayBox extent = model thumbnail extent\r\t\tifTrue: [model thumbnail displayAt: self insetDisplayBox topLeft]\r\t\tifFalse: [(model thumbnail\r\t\t\t\t\tmagnify: model thumbnail boundingBox\r\t\t\t\t\tby: self insetDisplayBox extent asFloatPoint / model thumbnail extent) \t\t\t\tdisplayAt: self insetDisplayBox topLeft]\r! !\r\r!ProjectView methodsFor: 'displaying' stamp: 'sw 9/14/1998 13:01'!\rrelease\r\tsuper release.\r\tSmalltalk garbageCollect! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rProjectView class\r\tinstanceVariableNames: ''!\r\r!ProjectView class methodsFor: 'as yet unclassified'!\ropen: aProject \r\t\"Answer an instance of me for the argument, aProject. It is created on the\r\tdisplay screen.\"\r\t| topView |\r\ttopView _ self new model: aProject.\r\ttopView minimumSize: 50 @ 30.\r\ttopView borderWidth: 2.\r\ttopView controller open! !\r\r!ProjectView class methodsFor: 'as yet unclassified' stamp: 'RAA 7/25/2000 10:35'!\ropenAndEnter: aProject \r\t\"Answer an instance of me for the argument, aProject. It is created on \r\tthe display screen.\"\r\t| topView |\r\ttopView _ self new model: aProject.\r\ttopView minimumSize: 50 @ 30.\r\ttopView borderWidth: 2.\r\ttopView window: (RealEstateAgent initialFrameFor: topView world: nil).\r\tScheduledControllers schedulePassive: topView controller.\r\taProject\r\t\tenter: false\r\t\trevert: false\r\t\tsaveForRevert: false! !\rProtoObject subclass: #ProtoObject\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Objects'.\rProtoObject superclass: nil!\r!ProtoObject commentStamp: '<historical>' prior: 0!\rProtoObject establishes minimal behavior required of any object in Squeak, even objects that should balk at normal object behavior. Generally these are proxy objects designed to read themselves in from the disk, or to perform some wrapper behavior, before responding to a message. Current examples are ObjectOut and ImageSegmentRootStub, and one could argue that ObjectTracer should also inherit from this class.\r\rProtoObject has no instance variables, nor should any be added.!\r\r\r!ProtoObject methodsFor: 'testing' stamp: 'md 11/24/1999 19:23'!\rifNil: nilBlock\r\t\"Return self, or evaluate the block if I'm == nil (q.v.)\"\r\r\t^ self! !\r\r!ProtoObject methodsFor: 'testing' stamp: 'md 11/24/1999 19:25'!\rifNil: nilBlock ifNotNil: ifNotNilBlock\r\t\"Evaluate the block, unless I'm == nil (q.v.)\"\r\r\t^ ifNotNilBlock value! !\r\r!ProtoObject methodsFor: 'testing' stamp: 'md 11/24/1999 19:25'!\rifNotNil: ifNotNilBlock\r\t\"Evaluate the block, unless I'm == nil (q.v.)\"\r\r\t^ ifNotNilBlock value! !\r\r!ProtoObject methodsFor: 'testing' stamp: 'md 11/24/1999 19:25'!\rifNotNil: ifNotNilBlock ifNil: nilBlock \r\t\"If I got here, I am not nil, so evaluate the block ifNotNilBlock\"\r\r\t^ ifNotNilBlock value! !\r\r!ProtoObject methodsFor: 'testing' stamp: 'md 11/24/1999 19:57'!\risInMemory\r\t\"All normal objects are.\"\r\t^ true! !\r\r!ProtoObject methodsFor: 'testing' stamp: 'md 11/24/1999 19:26'!\risNil\r\t\"Coerces nil to true and everything else to false.\"\r\r\t^false! !\r\r!ProtoObject methodsFor: 'testing' stamp: 'md 11/24/1999 19:58'!\rpointsTo: anObject\r\t\"This method returns true if self contains a pointer to anObject,\r\t\tand returns false otherwise\"\r\t<primitive: 132>\r\t1 to: self class instSize do:\r\t\t[:i | (self instVarAt: i) == anObject ifTrue: [^ true]].\r\t1 to: self basicSize do:\r\t\t[:i | (self basicAt: i) == anObject ifTrue: [^ true]].\r\t^ false! !\r\r\r!ProtoObject methodsFor: 'comparing' stamp: 'md 11/24/1999 19:27'!\r== anObject \r\t\"Primitive. Answer whether the receiver and the argument are the same \r\tobject (have the same object pointer). Do not redefine the message == in \r\tany other class!! Essential. No Lookup. Do not override in any subclass. \r\tSee Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 110>\r\tself primitiveFailed! !\r\r!ProtoObject methodsFor: 'comparing' stamp: 'md 11/24/1999 19:27'!\ridentityHash\r\t\"Answer a SmallInteger whose value is related to the receiver's identity.\r\tThis method must not be overridden, except by SmallInteger.\r\tPrimitive. Fails if the receiver is a SmallInteger. Essential.\r\tSee Object documentation whatIsAPrimitive.\r\r\tDo not override.\"\r\r\t<primitive: 75>\r\tself primitiveFailed! !\r\r!ProtoObject methodsFor: 'comparing' stamp: 'md 11/24/1999 19:27'!\r~~ anObject\r\t\"Answer whether the receiver and the argument are not the same object \r\t(do not have the same object pointer).\"\r\r\tself == anObject\r\t\tifTrue: [^ false]\r\t\tifFalse: [^ true]! !\r\r\r!ProtoObject methodsFor: 'system primitives' stamp: 'md 11/24/1999 19:30'!\rbecome: otherObject \r\t\"Primitive. Swap the object pointers of the receiver and the argument.\r\tAll variables in the entire system that used to point to the \r\treceiver now point to the argument, and vice-versa.\r\tFails if either object is a SmallInteger\"\r\r\t(Array with: self)\r\t\telementsExchangeIdentityWith:\r\t\t\t(Array with: otherObject)! !\r\r!ProtoObject methodsFor: 'system primitives' stamp: 'ajh 1/13/2002 17:02'!\rcannotInterpret: aMessage \r\t \"Handle the fact that there was an attempt to send the given message to the receiver but a null methodDictionary was encountered while looking up the message selector.  Hopefully this is the result of encountering a stub for a swapped out class which induces this exception on purpose.\"\r\r\"If this is the result of encountering a swap-out stub, then simulating the lookup in Smalltalk should suffice to install the class properly, and the message may be resent.\"\r\r\t(self class lookupSelector: aMessage selector) == nil ifFalse:\r\t\t[\"Simulated lookup succeeded -- resend the message.\"\r\t\t^ aMessage sentTo: self].\r\r\t\"Could not recover by simulated lookup -- it's an error\"\r\tError signal: 'MethodDictionary fault'.\r\r\t\"Try again in case an error handler fixed things\"\r\t^ aMessage sentTo: self! !\r\r!ProtoObject methodsFor: 'system primitives' stamp: 'ajh 10/9/2001 17:20'!\rdoesNotUnderstand: aMessage\r\r\t^ MessageNotUnderstood new \r\t\tmessage: aMessage;\r\t\treceiver: self;\r\t\tsignal! !\r\r!ProtoObject methodsFor: 'system primitives' stamp: 'md 11/24/1999 19:58'!\rnextInstance\r\t\"Primitive. Answer the next instance after the receiver in the \r\tenumeration of all instances of this class. Fails if all instances have been \r\tenumerated. Essential. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 78>\r\t^nil! !\r\r!ProtoObject methodsFor: 'system primitives' stamp: 'md 11/24/1999 19:58'!\rnextObject\r\t\"Primitive. Answer the next object after the receiver in the \r\tenumeration of all objects. Return 0 when all objects have been \r\tenumerated.\"\r\r\t<primitive: 139>\r\tself primitiveFailed.! !\r\r\r!ProtoObject methodsFor: 'objects from disk' stamp: 'md 11/24/1999 20:03'!\rrehash\r\t\"Do nothing.  Here so sending this to a Set does not have to do a time consuming respondsTo:\"! !\r\r\r!ProtoObject methodsFor: 'debugging' stamp: 'sw 10/26/2000 14:29'!\rdoOnlyOnce: aBlock\r\t\"If the 'one-shot' mechanism is armed, evaluate aBlock once and disarm the one-shot mechanism.  To rearm the mechanism, evaluate  'self rearmOneShot' manually.\"\r\r\t(Smalltalk at: #OneShotArmed ifAbsent: [true])\r\t\tifTrue:\r\t\t\t[Smalltalk at: #OneShotArmed put: false.\r\t\t\taBlock value]! !\r\r!ProtoObject methodsFor: 'debugging' stamp: 'sw 4/28/2000 14:41'!\rflag: aSymbol\r\t\"Send this message, with a relevant symbol as argument, to flag a message for subsequent retrieval.  For example, you might put the following line in a number of messages:\r\tself flag: #returnHereUrgently\r\tThen, to retrieve all such messages, browse all senders of #returnHereUrgently.\"! !\r\r\r!ProtoObject methodsFor: 'initialize-release' stamp: 'md 11/18/2003 10:33'!\rinitialize\r\t\"Subclasses should redefine this method to perform initializations on instance creation\"! !\r\r\r!ProtoObject methodsFor: 'apply primitives' stamp: 'ajh 1/31/2003 22:20'!\rtryNamedPrimitive\r\t\"This method is a template that the Smalltalk simulator uses to \r\texecute primitives. See Object documentation whatIsAPrimitive.\"\r\t<primitive:'' module:''>\r\t^ ContextPart primitiveFailToken! !\r\r!ProtoObject methodsFor: 'apply primitives' stamp: 'ajh 1/31/2003 22:20'!\rtryNamedPrimitive: arg1\r\t\"This method is a template that the Smalltalk simulator uses to \r\texecute primitives. See Object documentation whatIsAPrimitive.\"\r\t<primitive:'' module:''>\r\t^ ContextPart primitiveFailToken! !\r\r!ProtoObject methodsFor: 'apply primitives' stamp: 'ajh 1/31/2003 22:20'!\rtryNamedPrimitive: arg1 with: arg2\r\t\"This method is a template that the Smalltalk simulator uses to \r\texecute primitives. See Object documentation whatIsAPrimitive.\"\r\t<primitive:'' module:''>\r\t^ ContextPart primitiveFailToken! !\r\r!ProtoObject methodsFor: 'apply primitives' stamp: 'ajh 1/31/2003 22:20'!\rtryNamedPrimitive: arg1 with: arg2 with: arg3\r\t\"This method is a template that the Smalltalk simulator uses to \r\texecute primitives. See Object documentation whatIsAPrimitive.\"\r\t<primitive:'' module:''>\r\t^ ContextPart primitiveFailToken! !\r\r!ProtoObject methodsFor: 'apply primitives' stamp: 'ajh 1/31/2003 22:20'!\rtryNamedPrimitive: arg1 with: arg2 with: arg3 with: arg4\r\t\"This method is a template that the Smalltalk simulator uses to \r\texecute primitives. See Object documentation whatIsAPrimitive.\"\r\t<primitive:'' module:''>\r\t^ ContextPart primitiveFailToken! !\r\r!ProtoObject methodsFor: 'apply primitives' stamp: 'ajh 1/31/2003 22:21'!\rtryNamedPrimitive: arg1 with: arg2 with: arg3 with: arg4 with: arg5\r\t\"This method is a template that the Smalltalk simulator uses to \r\texecute primitives. See Object documentation whatIsAPrimitive.\"\r\t<primitive:'' module:''>\r\t^ ContextPart primitiveFailToken! !\r\r!ProtoObject methodsFor: 'apply primitives' stamp: 'ajh 1/31/2003 22:21'!\rtryNamedPrimitive: arg1 with: arg2 with: arg3 with: arg4 with: arg5 with: arg6\r\t\"This method is a template that the Smalltalk simulator uses to \r\texecute primitives. See Object documentation whatIsAPrimitive.\"\r\t<primitive:'' module:''>\r\t^ ContextPart primitiveFailToken! !\r\r!ProtoObject methodsFor: 'apply primitives' stamp: 'ajh 1/31/2003 22:21'!\rtryNamedPrimitive: arg1 with: arg2 with: arg3 with: arg4 with: arg5 with: arg6 with: arg7\r\t\"This method is a template that the Smalltalk simulator uses to \r\texecute primitives. See Object documentation whatIsAPrimitive.\"\r\t<primitive:'' module:''>\r\t^ ContextPart primitiveFailToken! !\r\r!ProtoObject methodsFor: 'apply primitives' stamp: 'ajh 1/31/2003 22:21'!\rtryNamedPrimitive: arg1 with: arg2 with: arg3 with: arg4 with: arg5 with: arg6 with: arg7 with: arg8\r\t\"This method is a template that the Smalltalk simulator uses to \r\texecute primitives. See Object documentation whatIsAPrimitive.\"\r\t<primitive:'' module:''>\r\t^ ContextPart primitiveFailToken! !\r\r!ProtoObject methodsFor: 'apply primitives' stamp: 'ajh 1/31/2003 22:21'!\rtryPrimitive: primIndex withArgs: argumentArray\r\t\"This method is a template that the Smalltalk simulator uses to \r\texecute primitives. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 118>\r\t^ ContextPart primitiveFailToken! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rProtoObject class\r\tinstanceVariableNames: ''!\r\r!ProtoObject class methodsFor: 'as yet unclassified' stamp: 'sw 5/5/2000 09:31'!\rinitializedInstance\r\t^ nil! !\rMessageSet subclass: #ProtocolBrowser\r\tinstanceVariableNames: 'selectedClass selectedSelector'\r\tclassVariableNames: 'TextMenu'\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Browser'!\r!ProtocolBrowser commentStamp: '<historical>' prior: 0!\rAn instance of ProtocolBrowser shows the methods a class understands--inherited or implemented at this level--as a \"flattened\" list.!\r\r\r!ProtocolBrowser methodsFor: 'accessing' stamp: 'di 7/13/97 16:33'!\rgetList\r\t\"Answer the receiver's message list.\"\r\t^ messageList! !\r\r!ProtocolBrowser methodsFor: 'accessing' stamp: 'sw 1/28/2001 21:01'!\rgrowable\r\t\"Answer whether the receiver is subject to manual additions and deletions\"\r\r\t^ false! !\r\r!ProtocolBrowser methodsFor: 'accessing' stamp: 'di 7/13/97 16:33'!\rlist\r\t\"Answer the receiver's message list.\"\r\t^ messageList! !\r\r!ProtocolBrowser methodsFor: 'accessing' stamp: 'di 7/13/97 16:35'!\rselector\r\t\"Answer the receiver's selected selector.\"\r\t^ selectedSelector! !\r\r!ProtocolBrowser methodsFor: 'accessing' stamp: 'di 7/13/97 16:35'!\rselector: aString\r\t\"Set the currently selected message selector to be aString.\"\r\tselectedSelector := aString.\r\tself changed: #selector! !\r\r!ProtocolBrowser methodsFor: 'accessing' stamp: 'di 7/13/97 16:35'!\rsetSelector: aString\r\t\"Set the currently selected message selector to be aString.\"\r\tselectedSelector := aString! !\r\r\r!ProtocolBrowser methodsFor: 'private' stamp: 'nk 8/18/2001 18:16'!\rinitListFrom: selectorCollection highlighting: aClass \r\t\"Make up the messageList with items from aClass in boldface.\"\r\t| defClass item |\r\r\tmessageList := OrderedCollection new.\r\tselectorCollection do: [ :selector |  \r\t\tdefClass := aClass whichClassIncludesSelector: selector.\r\t\titem _ selector, '     (' , defClass name , ')'.\r\t\tdefClass == aClass ifTrue: [item _ item asText allBold].\r\t\tmessageList add: (\r\t\t\tMethodReference new\r\t\t\t\tsetClass: defClass \r\t\t\t\tmethodSymbol: selector \r\t\t\t\tstringVersion: item\r\t\t)\r\t].\r\tselectedClass _ aClass.! !\r\r!ProtocolBrowser methodsFor: 'private' stamp: 'di 7/13/97 16:26'!\ron: aClass \r\t\"Initialize with the entire protocol for the class, aClass.\"\r\tself initListFrom: aClass allSelectors asSortedCollection\r\t\thighlighting: aClass! !\r\r!ProtocolBrowser methodsFor: 'private' stamp: 'di 11/26/1999 19:39'!\ronSubProtocolOf: aClass \r\t\"Initialize with the entire protocol for the class, aClass,\r\t\tbut excluding those inherited from Object.\"\r\t| selectors |\r\tselectors := Set new.\r\taClass withAllSuperclasses do:\r\t\t[:each | (each == Object or: [each == ProtoObject]) \r\t\t\tifFalse: [selectors addAll: each selectors]].\r\tself initListFrom: selectors asSortedCollection\r\t\thighlighting: aClass! !\r\r!ProtocolBrowser methodsFor: 'private' stamp: 'RAA 5/28/2001 11:07'!\rsetClassAndSelectorIn: csBlock\r\t\"Decode strings of the form    <selectorName> (<className> [class])\"\r\r\t| i classAndSelString selString sel |\r\r\tsel _ self selection ifNil: [^ csBlock value: nil value: nil].\r\t(sel isKindOf: MethodReference) ifTrue: [\r\t\tsel setClassAndSelectorIn: csBlock\r\t] ifFalse: [\r\t\tselString _ sel asString.\r\t\ti _ selString indexOf: $(.\r\t\t\"Rearrange to  <className> [class] <selectorName> , and use MessageSet\"\r\t\tclassAndSelString _ (selString copyFrom: i + 1 to: selString size - 1) , ' ' ,\r\t\t\t\t\t\t\t(selString copyFrom: 1 to: i - 1) withoutTrailingBlanks.\r\t\tMessageSet parse: classAndSelString toClassAndSelector: csBlock.\r\t].\r! !\r\r\r!ProtocolBrowser methodsFor: 'class list' stamp: 'nk 4/10/2001 08:16'!\rselectedClassOrMetaClass\r\t^selectedClass! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rProtocolBrowser class\r\tinstanceVariableNames: ''!\r\r!ProtocolBrowser class methodsFor: 'instance creation' stamp: 'di 7/13/97 15:15'!\ropenFullProtocolForClass: aClass \r\t\"Create and schedule a browser for the entire protocol of the class.\"\r\t\"ProtocolBrowser openFullProtocolForClass: ProtocolBrowser.\"\r\t| aPBrowser label |\r\taPBrowser := ProtocolBrowser new on: aClass.\r\tlabel := 'Entire protocol of: ', aClass name.\r\tself open: aPBrowser name: label! !\r\r!ProtocolBrowser class methodsFor: 'instance creation' stamp: 'di 7/13/97 15:15'!\ropenSubProtocolForClass: aClass \r\t\"Create and schedule a browser for the entire protocol of the class.\"\r\t\"ProtocolBrowser openSubProtocolForClass: ProtocolBrowser.\"\r\t| aPBrowser label |\r\taPBrowser := ProtocolBrowser new onSubProtocolOf: aClass.\r\tlabel := 'Sub-protocol of: ', aClass name.\r\tself open: aPBrowser name: label! !\rObject subclass: #PseudoClass\r\tinstanceVariableNames: 'name definition organization source metaClass'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-File Contents Browser'!\r!PseudoClass commentStamp: '<historical>' prior: 0!\rI provide an inert model of a Class, used by FileContentsBrowser to manipulate filedout code. Instead of a method dictionary or selectors onto CompiledMethods, I have a dictionary (\"source\") of selectors onto ChangeRecords, which were, in the case of FileContentsBrowser, parsed from a source or change set file.!\r\r\r!PseudoClass methodsFor: 'class'!\rclassComment: aChangeRecord\r\tself organization classComment: aChangeRecord! !\r\r!PseudoClass methodsFor: 'class' stamp: 'di 1/13/1999 12:00'!\rclassPool \r\tself exists ifFalse: [^ nil].\r\t^ self realClass classPool! !\r\r!PseudoClass methodsFor: 'class' stamp: 'BJP 4/23/2001 13:50'!\rcomment\r\t| rStr |\r\trStr := self organization commentRemoteStr.\r\t^rStr isNil\r\t\tifTrue:[self name,' has not been commented in this file']\r\t\tifFalse:[rStr string]! !\r\r!PseudoClass methodsFor: 'class'!\rcomment: aString\r\tself commentString: aString.! !\r\r!PseudoClass methodsFor: 'class' stamp: 'ar 2/5/2004 15:18'!\rcommentString\r\t^self comment asString! !\r\r!PseudoClass methodsFor: 'class'!\rcommentString: aString\r\tself classComment: aString asText. \"Just wrap it\"! !\r\r!PseudoClass methodsFor: 'class' stamp: 'LC 10/8/2001 04:46'!\rdefinition\r\t| link linkText defText |\r\t^definition ifNil:\r\t\t[defText _ Text fromString: 'There is no class definition for '.\r\t\tlink _ TextLink new.\r\t\tlinkText _ link analyze: self name with: 'Definition'.\r\t\tlinkText _ Text string: (linkText ifNil: ['']) attribute: link.\r\t\tdefText append: linkText; append: ' in this file'].! !\r\r!PseudoClass methodsFor: 'class'!\rdefinition: aString\r\tdefinition := aString! !\r\r!PseudoClass methodsFor: 'class'!\rmetaClass\r\t^metaClass ifNil:[metaClass := PseudoMetaclass new name: (self name)].! !\r\r!PseudoClass methodsFor: 'class' stamp: 'nk 2/18/2004 18:30'!\rrenameTo: aString\r\r\tself hasDefinition ifTrue:[\r\t\tself isMeta ifTrue:[\r\t\t\tself definition: (self definition\r\t\t\t\tcopyReplaceAll: name,' class'\r\t\t\t\twith: aString, ' class').\r\t\t] ifFalse:[\r\t\t\tself definition: (self definition \r\t\t\t\t\tcopyReplaceAll:'ubclass: #',name\r\t\t\t\t\twith:'ubclass: #', aString)]].\r\tname := aString.\r\tmetaClass ifNotNil:[metaClass renameTo: aString].! !\r\r!PseudoClass methodsFor: 'class' stamp: 'di 1/13/1999 12:00'!\rsharedPools \r\tself exists ifFalse: [^ nil].\r\t^ self realClass sharedPools! !\r\r\r!PseudoClass methodsFor: 'accessing' stamp: 'nk 4/29/2004 06:59'!\rallCallsOn\r\t^ (self realClass ifNil: [ ^#() ]) allCallsOn! !\r\r!PseudoClass methodsFor: 'accessing' stamp: 'sma 6/16/1999 22:59'!\rallInstVarNames\r\t^#()! !\r\r!PseudoClass methodsFor: 'accessing' stamp: 'nk 2/18/2004 18:32'!\rallSuperclasses\r\t^ (self realClass ifNil: [ ^#() ]) allSuperclasses! !\r\r!PseudoClass methodsFor: 'accessing' stamp: 'sma 4/28/2000 17:24'!\rcompilerClass\r\t^ (Smalltalk at: name ifAbsent: [^ Compiler]) compilerClass! !\r\r!PseudoClass methodsFor: 'accessing'!\rfullName\r\t^self name! !\r\r!PseudoClass methodsFor: 'accessing' stamp: 'nk 3/9/2004 10:24'!\rinstVarNames\r\t^ #()! !\r\r!PseudoClass methodsFor: 'accessing'!\rname\r\t^name! !\r\r!PseudoClass methodsFor: 'accessing'!\rname: anObject\r\tname _ anObject! !\r\r!PseudoClass methodsFor: 'accessing' stamp: 'NS 4/6/2004 15:46'!\rorganization\r\torganization ifNil: [organization _ PseudoClassOrganizer defaultList: SortedCollection new].\r\r\t\"Making sure that subject is set correctly. It should not be necessary.\"\r\torganization setSubject: self.\r\t^ organization! !\r\r!PseudoClass methodsFor: 'accessing' stamp: 'nk 2/18/2004 18:32'!\rrealClass\r\t^Smalltalk at: self name asSymbol ifAbsent: []! !\r\r!PseudoClass methodsFor: 'accessing' stamp: 'wod 5/19/1998 17:42'!\rtheNonMetaClass\r\t\"Sent to a class or metaclass, always return the class\"\r\r\t^self! !\r\r\r!PseudoClass methodsFor: 'removing'!\rremoveAllUnmodified\r\t| stClass |\r\tself exists ifFalse:[^self].\r\tself removeUnmodifiedMethods: self selectors.\r\tstClass := self realClass.\r\t(self hasDefinition and:[stClass definition = self definition]) ifTrue:[definition := nil].\r\t(self hasComment and:[stClass comment asString = self commentString]) ifTrue:[ self classComment: nil].\r\tmetaClass isNil ifFalse:[metaClass removeAllUnmodified].! !\r\r!PseudoClass methodsFor: 'removing'!\rremoveUnmodifiedMethods: aCollection\r\t| stClass |\r\tself exists ifFalse:[^self].\r\tstClass := self realClass.\r\taCollection do:[:sel|\r\t\t(self sourceCodeAt: sel) = (stClass sourceCodeAt: sel ifAbsent:['']) asString ifTrue:[\r\t\t\tself removeMethod: sel.\r\t\t].\r\t].\r\tself organization removeEmptyCategories.! !\r\r\r!PseudoClass methodsFor: 'private' stamp: 'nk 2/18/2004 18:33'!\rallSubclassesWithLevelDo: classAndLevelBlock startingLevel: level\r\t^ (self realClass ifNil: [ ^self ])  allSubclassesWithLevelDo: classAndLevelBlock startingLevel: level! !\r\r!PseudoClass methodsFor: 'private'!\rconfirmRemovalOf: aString\r\t^self confirm:'Remove ',aString,' ?'! !\r\r!PseudoClass methodsFor: 'private'!\revaluate: aString\r\t^Compiler evaluate: aString for: nil logged: true! !\r\r!PseudoClass methodsFor: 'private'!\rmakeSureSuperClassExists: aString\r\t| theClass |\r\ttheClass := Smalltalk at: (aString asSymbol) ifAbsent:[nil].\r\ttheClass ifNotNil:[^true].\r\t^self confirm: 'The super class ',aString,' does not exist in the system. Use nil instead?'.! !\r\r!PseudoClass methodsFor: 'private' stamp: 'ajh 1/21/2003 13:03'!\rparserClass\r\r\t^ Compiler parserClass! !\r\r\r!PseudoClass methodsFor: 'testing'!\rexists\r\t^(Smalltalk at: self name asSymbol ifAbsent:[^false]) isKindOf: Behavior! !\r\r!PseudoClass methodsFor: 'testing'!\rhasChanges\r\r\tself sourceCode isEmpty ifFalse:[^true].\r\tself organization hasNoComment ifFalse:[^true].\r\tdefinition isNil ifFalse:[^true].\r\tmetaClass isNil ifFalse:[^metaClass hasChanges].\r\t^false! !\r\r!PseudoClass methodsFor: 'testing'!\rhasComment\r\t^self organization commentRemoteStr notNil! !\r\r!PseudoClass methodsFor: 'testing'!\rhasDefinition\r\t^definition notNil! !\r\r!PseudoClass methodsFor: 'testing'!\rhasMetaclass\r\t^metaClass notNil! !\r\r!PseudoClass methodsFor: 'testing' stamp: 'nk 2/18/2004 18:30'!\risMeta\r\t^false! !\r\r!PseudoClass methodsFor: 'testing'!\rneedsInitialize\r\t^self hasMetaclass and:[\r\t\tself metaClass selectors includes: #initialize]! !\r\r\r!PseudoClass methodsFor: 'fileIn/fileOut'!\rfileIn\r\t\"FileIn the receiver\"\r\tself hasDefinition ifTrue:[self fileInDefinition].\r\tself fileInMethods: self selectors.\r\tmetaClass ifNotNil:[metaClass fileIn].\r\tself needsInitialize ifTrue:[\r\t\tself evaluate: self name,' initialize'.\r\t].! !\r\r!PseudoClass methodsFor: 'fileIn/fileOut'!\rfileInCategory: aCategory\r\t^self fileInMethods: (self organization listAtCategoryNamed: aCategory)! !\r\r!PseudoClass methodsFor: 'fileIn/fileOut'!\rfileInDefinition\r\t(self makeSureSuperClassExists: (definition copyUpTo: Character space)) ifFalse:[^self].\r\tself hasDefinition ifTrue:[\r\t\tTranscript cr; show:'Defining ', self name.\r\t\tself evaluate: self definition].\r\tself exists ifFalse:[^self].\r\tself hasComment ifTrue:[self realClass classComment: self comment].! !\r\r!PseudoClass methodsFor: 'fileIn/fileOut'!\rfileInMethod: selector\r\t^self fileInMethods: (Array with: selector)! !\r\r!PseudoClass methodsFor: 'fileIn/fileOut'!\rfileInMethods\r\t^self fileInMethods: self selectors! !\r\r!PseudoClass methodsFor: 'fileIn/fileOut'!\rfileInMethods: aCollection\r\t\"FileIn all methods with selectors taken from aCollection\"\r\t| theClass cat |\r\tself exists ifFalse:[^self classNotDefined].\r\ttheClass := self realClass.\r\taCollection do:[:sel|\r\t\tcat := self organization categoryOfElement: sel.\r\t\tcat = self removedCategoryName ifFalse:[\r\t\t\ttheClass \r\t\t\t\tcompile: (self sourceCodeAt: sel) \r\t\t\t\tclassified: cat\r\t\t\t\twithStamp: (self stampAt: sel)\r\t\t\t\tnotifying: nil.\r\t\t].\r\t].! !\r\r!PseudoClass methodsFor: 'fileIn/fileOut'!\rfileOut\r\t| f |\r\tf := (FileStream newFileNamed: self name,'.st').\r\tself fileOutOn: f.\r\tself needsInitialize ifTrue:[\r\t\tf cr; nextChunkPut: self name,' initialize'.\r\t].\r\tf close! !\r\r!PseudoClass methodsFor: 'fileIn/fileOut'!\rfileOutCategory: categoryName\r\t| f |\r\tf := (FileStream newFileNamed: self name,'-',categoryName,'.st').\r\tself fileOutMethods: (self organization listAtCategoryNamed: categoryName)\r\t\t\ton: f.\r\tf close\r! !\r\r!PseudoClass methodsFor: 'fileIn/fileOut' stamp: 'hg 9/6/2000 12:45'!\rfileOutDefinitionOn: aStream\r\tself hasDefinition ifFalse:[^self].\r\taStream nextChunkPut: self definition; cr.\r\tself hasComment\r\t\tifTrue:\r\t\t\t[aStream cr.\r\t\t\tself organization commentRemoteStr fileOutOn:\raStream]! !\r\r!PseudoClass methodsFor: 'fileIn/fileOut'!\rfileOutMethod: selector\r\t| f |\r\tf := (FileStream newFileNamed: self name,'-', selector, '.st').\r\tself fileOutMethods: (Array with: selector)\r\t\t\ton: f.\r\tf close! !\r\r!PseudoClass methodsFor: 'fileIn/fileOut' stamp: 'ar 2/7/2004 01:04'!\rfileOutMethods: aCollection on: aStream\r\t\"FileOut all methods with selectors taken from aCollection\"\r\t| cat categories |\r\tcategories := Dictionary new.\r\taCollection do:[:sel|\r\t\tcat := self organization categoryOfElement: sel.\r\t\tcat = self removedCategoryName ifFalse:[\r\t\t\t(categories includesKey: cat) \r\t\t\t\tifFalse:[categories at: cat put: Set new].\r\t\t\t(categories at: cat) add: sel].\r\t].\r\tcategories associationsDo:[:assoc|\r\t\tcat := assoc key.\r\t\tassoc value do:[:sel|\r\t\t\taStream cr.\r\t\t\t(self sourceCode at: sel) fileOutOn: aStream.\r\t\t].\r\t].! !\r\r!PseudoClass methodsFor: 'fileIn/fileOut'!\rfileOutMethodsOn: aStream\r\t^self fileOutMethods: self selectors on: aStream.! !\r\r!PseudoClass methodsFor: 'fileIn/fileOut'!\rfileOutOn: aStream\r\t\"FileOut the receiver\"\r\tself fileOutDefinitionOn: aStream.\r\tmetaClass ifNotNil:[metaClass fileOutDefinitionOn: aStream].\r\tself fileOutMethods: self selectors on: aStream.\r\tmetaClass ifNotNil:[metaClass fileOutMethods: metaClass selectors on: aStream].! !\r\r\r!PseudoClass methodsFor: 'errors'!\rclassNotDefined\r\t^self inform: self name,' is not defined in the system.\rYou have to define this class first.'.! !\r\r\r!PseudoClass methodsFor: 'categories'!\rremoveCategory: selector\r\t(self organization listAtCategoryNamed: selector) do:[:sel|\r\t\tself organization removeElement: sel.\r\t\tself sourceCode removeKey: sel.\r\t].\r\tself organization removeCategory: selector.! !\r\r!PseudoClass methodsFor: 'categories'!\rremovedCategoryName\r\t^'*** removed methods ***' asSymbol! !\r\r!PseudoClass methodsFor: 'categories'!\rwhichCategoryIncludesSelector: aSelector \r\t\"Answer the category of the argument, aSelector, in the organization of \r\tthe receiver, or answer nil if the receiver does not inlcude this selector.\"\r\r\t^ self organization categoryOfElement: aSelector! !\r\r\r!PseudoClass methodsFor: 'methods' stamp: 'sma 6/1/2000 14:54'!\raddMethodChange: aChangeRecord\r\t| selector |\r\tselector _ self parserClass new parseSelector: aChangeRecord string.\r\tself organization classify: selector under: aChangeRecord category.\r\tself sourceCodeAt: selector put: aChangeRecord! !\r\r!PseudoClass methodsFor: 'methods'!\rmethodChange: aChangeRecord\r\taChangeRecord isMetaClassChange ifTrue:[\r\t\t^self metaClass addMethodChange: aChangeRecord.\r\t] ifFalse:[\r\t\t^self addMethodChange: aChangeRecord.\r\t].\r! !\r\r!PseudoClass methodsFor: 'methods'!\rremoveMethod: selector\r\tself organization removeElement: selector.\r\tself sourceCode removeKey: selector.\r! !\r\r!PseudoClass methodsFor: 'methods'!\rremoveSelector: aSelector\r\t| catName |\r\tcatName := self removedCategoryName.\r\tself organization addCategory: catName before: self organization categories first.\r\tself organization classify: aSelector under: catName.\r\tself sourceCodeAt: aSelector put:'methodWasRemoved' asText.! !\r\r!PseudoClass methodsFor: 'methods'!\rselectors\r\t^self sourceCode keys! !\r\r!PseudoClass methodsFor: 'methods'!\rsourceCode\r\t^source ifNil:[source := Dictionary new]! !\r\r!PseudoClass methodsFor: 'methods'!\rsourceCodeAt: sel\r\t^(self sourceCode at: sel) string! !\r\r!PseudoClass methodsFor: 'methods'!\rsourceCodeAt: sel put: object\r\tself sourceCode at: sel put: object! !\r\r!PseudoClass methodsFor: 'methods'!\rsourceCodeTemplate\r\t^''! !\r\r!PseudoClass methodsFor: 'methods'!\rstampAt: selector\r\t^(self sourceCode at: selector) stamp! !\r\r\r!PseudoClass methodsFor: 'printing' stamp: 'sma 6/17/1999 00:00'!\rliteralScannedAs: scannedLiteral notifying: requestor \r\t^ scannedLiteral! !\r\r!PseudoClass methodsFor: 'printing' stamp: 'ar 2/5/2004 16:04'!\rprintOn: aStream\r\tsuper printOn: aStream.\r\taStream nextPut:$(; print: name; nextPut:$)! !\r\r\r!PseudoClass methodsFor: 'testing method dictionary' stamp: 'ar 5/17/2003 14:06'!\rbindingOf: varName\r\tself exists ifTrue:[\r\t\t(self realClass bindingOf: varName) ifNotNilDo:[:binding| ^binding].\r\t].\r\t^Smalltalk bindingOf: varName asSymbol! !\rBasicClassOrganizer subclass: #PseudoClassOrganizer\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-File Contents Browser'!\r\r!PseudoClassOrganizer methodsFor: 'comment accessing' stamp: 'NS 4/6/2004 16:44'!\rclassComment\r\t\"Answer the comment associated with the object that refers to the receiver.\"\r\tclassComment == nil ifTrue: [^''].\r\t^classComment! !\r\r!PseudoClassOrganizer methodsFor: 'comment accessing' stamp: 'NS 4/6/2004 16:44'!\rclassComment: aChangeRecord\r\tclassComment := aChangeRecord! !\r\r\r!PseudoClassOrganizer methodsFor: 'accessing' stamp: 'NS 4/6/2004 12:27'!\rsetDefaultList: aCollection\r\tsuper setDefaultList: aCollection.\r\tself classComment: nil.! !\rProtoObject variableSubclass: #PseudoContext\r\tinstanceVariableNames: 'fixed fields never accessed from smalltalk'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Methods'.\rPseudoContext superclass: nil!\r!PseudoContext commentStamp: '<historical>' prior: 0!\rI represent cached context state within the virtual machine.  I have the same format as normal method and block contexts, but my fields are never referenced directly from Smalltalk.  Whenever a message is sent to me I will magically transform myself into a real context which will respond to all the usual messages.\r\tI rely on the fact that block and method contexts have exactly the same number of fixed fields.!\r\r\r!PseudoContext methodsFor: 'testing' stamp: 'ikp 9/26/97 14:45'!\risPseudoContext\r\t^true! !\r\r\r!PseudoContext methodsFor: 'system primitives' stamp: 'ikp 10/20/97 15:36'!\rnextObject\r\t\"See Object>>nextObject.\"\r\r\t<primitive: 139>\r\tself primitiveFailed.! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rPseudoContext class\r\tinstanceVariableNames: ''!\r\r!PseudoContext class methodsFor: 'class initialization' stamp: 'ikp 1/10/98 02:33'!\rinitialize\r\t\"It's tricky to do the necessary stuff with the regular file-in machinery.\"\r\r\tPseudoContext superclass = nil\r\t\tifFalse: [\r\t\t\t(Smalltalk confirm: 'Shall I convert PseudoContext into a compact subclass of nil?\r(\"yes\" is almost always the correct response)')\r\t\t\t\tifTrue: [\r\t\t\t\t\tPseudoContext becomeCompact.\r\t\t\t\t\tPseudoContext superclass removeSubclass: PseudoContext.\r\t\t\t\t\tPseudoContext superclass: nil]].\r\tSmalltalk recreateSpecialObjectsArray.\r\tSmalltalk specialObjectsArray size = 41\r\t\tifFalse: [self error: 'Please check size of special objects array!!']! !\r\r\r!PseudoContext class methodsFor: 'filing out' stamp: 'ikp 9/26/97 14:45'!\rdefinition\r\t\"Our superclass is really nil, but this causes problems when we try to become compact\r\tafter filing in for the first time.  Fake the superclass as Object, and repair the situation\r\tduring class initialisation.\"\r\t| defn |\r\tdefn _ super definition.\r\t^(defn beginsWith: 'nil ')\r\t\tifTrue: ['Object' , (defn copyFrom: 4 to: defn size)]\r\t\tifFalse: [defn].! !\rPseudoClass subclass: #PseudoMetaclass\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-File Contents Browser'!\r\r!PseudoMetaclass methodsFor: 'accessing'!\rfullName\r\t^self name,' class'! !\r\r!PseudoMetaclass methodsFor: 'accessing'!\rrealClass\r\t^super realClass class! !\r\r!PseudoMetaclass methodsFor: 'accessing' stamp: 'FBS 3/4/2004 14:17'!\rtheNonMetaClass\r\t\"Sent to a class or metaclass, always return the class\"\r\r\t^self realClass theNonMetaClass! !\r\r\r!PseudoMetaclass methodsFor: 'testing' stamp: 'nk 2/18/2004 18:30'!\risMeta\r\t^true! !\rRectangle subclass: #Quadrangle\r\tinstanceVariableNames: 'borderWidth borderColor insideColor'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Graphics-Primitives'!\r!Quadrangle commentStamp: '<historical>' prior: 0!\rI represent a particular kind of Rectangle that has a border and inside color.!\r\r\r!Quadrangle methodsFor: 'initialize-release'!\rinitialize\r\t\"Initialize the region to a null Rectangle, the borderWidth to 1, the \r\tborderColor to black, and the insideColor to white.\"\r\r\torigin _ 0 @ 0.\r\tcorner _ 0 @ 0.\r\tborderWidth _ 1.\r\tborderColor _ Color black.\r\tinsideColor _ Color white.\r! !\r\r\r!Quadrangle methodsFor: 'bordering'!\rborderWidth\r\t\"Answer the borderWidth of the receiver.\"\r\r\t^borderWidth! !\r\r!Quadrangle methodsFor: 'bordering'!\rborderWidth: anInteger \r\t\"Set the borderWidth of the receiver to anInteger.\"\r\r\tborderWidth _ anInteger! !\r\r!Quadrangle methodsFor: 'bordering'!\rborderWidthLeft: anInteger1 right: anInteger2 top: anInteger3 bottom: anInteger4\r\t\"Set the border width of the receiver to a Rectangle that represents the \r\tleft, right, top, and bottom border widths.\"\r\r\tborderWidth _ anInteger1 @ anInteger3 corner: anInteger2 @ anInteger4! !\r\r!Quadrangle methodsFor: 'bordering'!\rinside\r\t\"Answer a Rectangle that is the receiver inset by the borderWidth.\"\r\r\t^self insetBy: borderWidth! !\r\r!Quadrangle methodsFor: 'bordering'!\rinsideColor\r\t\"Answer the form that is the insideColor of the receiver.\"\r\r\t^insideColor! !\r\r!Quadrangle methodsFor: 'bordering'!\rinsideColor: aColor \r\t\"Set the insideColor of the receiver to aColor, a Form.\"\r\r\tinsideColor _ aColor! !\r\r!Quadrangle methodsFor: 'bordering'!\rregion\r\t\"Answer a Rectangle that defines the area of the receiver.\"\r\r\t^origin corner: corner! !\r\r!Quadrangle methodsFor: 'bordering'!\rregion: aRectangle \r\t\"Set the rectangular area of the receiver to aRectangle.\"\r\r\torigin _ aRectangle origin.\r\tcorner _ aRectangle corner! !\r\r\r!Quadrangle methodsFor: 'rectangle functions'!\rintersect: aRectangle \r\t\"Answer a new Quadrangle whose region is the intersection of the \r\treceiver's area and aRectangle.\r\t 5/24/96 sw: removed hard-coded class name so subclasses can gain same functionality.\"\r\r\t^ self class\r\t \tregion: (super intersect: aRectangle)\r\t\tborderWidth: borderWidth\r\t\tborderColor: borderColor\r\t\tinsideColor: insideColor! !\r\r\r!Quadrangle methodsFor: 'transforming'!\ralign: aPoint1 with: aPoint2 \r\t\"Answer a new Quadrangle translated by aPoint2 - aPoint1.\r\t 5/24/96 sw: removed hard-coded class name so subclasses can gain same functionality.\"\r\r\t^ self class\r\t\tregion: (super translateBy: aPoint2 - aPoint1)\r\t\tborderWidth: borderWidth\r\t\tborderColor: borderColor\r\t\tinsideColor: insideColor! !\r\r!Quadrangle methodsFor: 'transforming'!\ralignedTo: alignPointSelector\r\t\"Return a copy with offset according to alignPointSelector which is one of...\r\t#(topLeft, topCenter, topRight, leftCenter, center, etc)\r\t 5/24/96 sw: removed hard-coded class name so subclasses can gain same functionality.\"\r\r\t^ self class\r\t\tregion: (super translateBy: (0@0) - (self perform: alignPointSelector))\r\t\tborderWidth: borderWidth\r\t\tborderColor: borderColor\r\t\tinsideColor: insideColor! !\r\r!Quadrangle methodsFor: 'transforming'!\rscaleBy: aPoint \r\t\"Answer a new Quadrangle scaled by aPoint.\r\t 5/24/96 sw: removed hard-coded class name so subclasses can gain same functionality.\"\r\r\t^ self class\r\t\tregion: (super scaleBy: aPoint)\r\t\tborderWidth: borderWidth\r\t\tborderColor: borderColor\r\t\tinsideColor: insideColor! !\r\r!Quadrangle methodsFor: 'transforming'!\rtranslateBy: aPoint \r\t\"Answer a new Quadrangle translated by aPoint.\r\t 5/24/96 sw: removed hard-coded class name so subclasses can gain same functionality.\"\r\r\t^ self class\r\t\tregion: (super translateBy: aPoint)\r\t\tborderWidth: borderWidth\r\t\tborderColor: borderColor\r\t\tinsideColor: insideColor! !\r\r\r!Quadrangle methodsFor: 'displaying-generic'!\rdisplayOn: aDisplayMedium\r\t\"Display the border and insideRegion of the receiver.\"\r\r\tborderWidth ~~ 0\r\t\tifTrue:\t[aDisplayMedium\r\t\t\t\tborder: self region\r\t\t\t\twidthRectangle: borderWidth\r\t\t\t\trule: Form over\r\t\t\t\tfillColor: borderColor].\r\tinsideColor ~~ nil\r\t\tifTrue:\t[aDisplayMedium fill: self inside fillColor: insideColor]! !\r\r!Quadrangle methodsFor: 'displaying-generic'!\rdisplayOn: aDisplayMedium transformation: aWindowingTransformation clippingBox: aRectangle\r\t\"Display the border and region of the receiver so that it is scaled and \r\ttranslated with respect to aWindowingTransformation. The displayed \r\tinformation should be clipped so that only information with the area \r\tdetermined by aRectangle is displayed.\"\r\r\t| screenRectangle |\r\tscreenRectangle _ \r\t\t(aWindowingTransformation applyTo: self) intersect: aRectangle.\r\tborderWidth ~~ 0 & (insideColor ~~ nil)\r\t\tifTrue: \r\t\t\t[aDisplayMedium fill: screenRectangle fillColor: Color black \"borderColor\".\r\t\t\taDisplayMedium\r\t\t\t\tfill: (screenRectangle insetBy: borderWidth)\r\t\t\t\tfillColor: insideColor]! !\r\r!Quadrangle methodsFor: 'displaying-generic'!\rdisplayOnPort: aPort at: p\r\t\"Display the border and insideRegion of the receiver.\"\r\r\t(insideColor == nil or: [borderWidth <= 0])\r\t\tifFalse: [aPort fill: (self region translateBy: p) \r\t\t\tfillColor: borderColor rule: Form over].\r\tinsideColor == nil\r\t\tifFalse: [aPort fill: (self inside translateBy: p) \r\t\t\tfillColor: insideColor rule: Form over]! !\r\r\r!Quadrangle methodsFor: 'displaying-Display'!\rdisplay \r\t\"Display the border and insideRegion of the receiver on the Display.\"\r\r\tself displayOn: Display! !\r\r\r!Quadrangle methodsFor: 'private'!\rsetRegion: aRectangle borderWidth: anInteger borderColor: aMask1 insideColor: aMask2\r\r\torigin _ aRectangle origin.\r\tcorner _ aRectangle corner.\r\tborderWidth _ anInteger.\r\tborderColor _ aMask1.\r\tinsideColor _ aMask2! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rQuadrangle class\r\tinstanceVariableNames: ''!\r\r!Quadrangle class methodsFor: 'instance creation'!\rregion: aRectangle borderWidth: anInteger borderColor: aMask1 insideColor: aMask2\r\t\"Answer an instance of me with rectangle, border width and color, and \r\tinside color determined by the arguments.\"\r\r\t^super new\r\t\tsetRegion: aRectangle\r\t\tborderWidth: anInteger\r\t\tborderColor: aMask1\r\t\tinsideColor: aMask2! !\rReadWriteStream subclass: #RWBinaryOrTextStream\r\tinstanceVariableNames: 'isBinary'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Streams'!\r!RWBinaryOrTextStream commentStamp: '<historical>' prior: 0!\rA simulation of a FileStream, but living totally in memory.  Hold the contents of a file or web page from the network.  Can then fileIn like a normal FileStream.\r\rNeed to be able to switch between binary and text, as a FileStream does, without recopying the whole collection.  Convert to binary upon input and output.  Always keep as text internally.!\r\r\r!RWBinaryOrTextStream methodsFor: 'as yet unclassified' stamp: 'tk 6/25/97 13:22'!\rascii\r\tisBinary _ false! !\r\r!RWBinaryOrTextStream methodsFor: 'as yet unclassified' stamp: 'tk 6/20/97 19:46'!\rbinary\r\tisBinary _ true! !\r\r!RWBinaryOrTextStream methodsFor: 'as yet unclassified' stamp: 'tk 6/21/97 12:49'!\rcontents\r\t\"Answer with a copy of my collection from 1 to readLimit.\"\r\r\t| newArray |\r\tisBinary ifFalse: [^ super contents].\t\"String\"\r\treadLimit _ readLimit max: position.\r\tnewArray _ ByteArray new: readLimit.\r\t^ newArray replaceFrom: 1\r\t\tto: readLimit\r\t\twith: collection\r\t\tstartingAt: 1.! !\r\r!RWBinaryOrTextStream methodsFor: 'as yet unclassified' stamp: 'jm 11/4/97 08:25'!\rcontentsOfEntireFile\r\t\"For compatibility with file streams.\"\r\r\t^ self contents! !\r\r!RWBinaryOrTextStream methodsFor: 'as yet unclassified' stamp: 'tk 6/20/97 19:47'!\risBinary\r\t^ isBinary! !\r\r!RWBinaryOrTextStream methodsFor: 'as yet unclassified' stamp: 'tk 12/13/97 13:07'!\rnext\r\r\t| byte |\r\t^ isBinary \r\t\t\tifTrue: [byte _ super next.\r\t\t\t\t byte ifNil: [nil] ifNotNil: [byte asciiValue]]\r\t\t\tifFalse: [super next].\r! !\r\r!RWBinaryOrTextStream methodsFor: 'as yet unclassified' stamp: 'tk 2/7/2000 15:34'!\rnext: anInteger \r\t\"Answer the next anInteger elements of my collection. Must override to get class right.\"\r\r\t| newArray |\r\tnewArray _ (isBinary ifTrue: [ByteArray] ifFalse: [String]) new: anInteger.\r\t^ self nextInto: newArray! !\r\r!RWBinaryOrTextStream methodsFor: 'as yet unclassified' stamp: 'ls 3/27/2000 22:24'!\rnext: n into: aCollection startingAt: startIndex\r\t\"Read n objects into the given collection. \r\tReturn aCollection or a partial copy if less than n elements have been read.\"\r\t\"Overriden for efficiency\"\r\t| max |\r\tmax _ (readLimit - position) min: n.\r\taCollection \r\t\treplaceFrom: startIndex \r\t\tto: startIndex+max-1\r\t\twith: collection\r\t\tstartingAt: position+1.\r\tposition _ position + max.\r\tmax = n\r\t\tifTrue:[^aCollection]\r\t\tifFalse:[^aCollection copyFrom: 1 to: startIndex+max-1]! !\r\r!RWBinaryOrTextStream methodsFor: 'as yet unclassified' stamp: 'tk 6/20/97 07:38'!\rnextPut: charOrByte\r\r\tsuper nextPut: charOrByte asCharacter! !\r\r!RWBinaryOrTextStream methodsFor: 'as yet unclassified' stamp: 'tk 6/21/97 13:04'!\rreset\r\t\"Set the receiver's position to the beginning of the sequence of objects.\"\r\r\tsuper reset.\r\tisBinary ifNil: [isBinary _ false].\r\tcollection class == ByteArray ifTrue: [\"Store as String and convert as needed.\"\r\t\tcollection _ collection asString.\r\t\tisBinary _ true].\r! !\r\r!RWBinaryOrTextStream methodsFor: 'as yet unclassified' stamp: 'tk 6/20/97 19:47'!\rtext\r\tisBinary _ false! !\r\r!RWBinaryOrTextStream methodsFor: 'as yet unclassified' stamp: 'ar 3/5/2001 12:12'!\rupToEnd\r\t\"Must override to get class right.\"\r\t| newArray |\r\tnewArray _ (isBinary ifTrue: [ByteArray] ifFalse: [String]) new: self size - self position.\r\t^ self nextInto: newArray! !\r\r\r!RWBinaryOrTextStream methodsFor: 'writing' stamp: 'ar 8/12/2003 16:54'!\rnextPutAll: aCollection\r\t^super nextPutAll: aCollection asString! !\rObject subclass: #Random\r\tinstanceVariableNames: 'seed a m q r'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Numbers'!\r!Random commentStamp: 'md 4/26/2003 16:32' prior: 0!\rThis Random Number Generator graciously contributed by David N. Smith.  It is an adaptation of the Park-Miller RNG which uses Floats to avoid the need for LargeInteger arithmetic.\r\rIf you just want a quick random integer, use:\r\t\t10 atRandom\rEvery integer interval can give a random number:\r\t\t(6 to: 12) atRandom\rSequenceableCollections can give randomly selected elements:\r\t\t'pick one of these letters randomly' atRandom\rSequenceableCollections also respond to shuffled, as in:\r\t\t($A to: $Z) shuffled\r\rThe correct way to use class Random is to store one in an instance or class variable:\r\t\tmyGenerator _ Random new.\rThen use it every time you need another number between 0.0 and 1.0 (excluding)\r\t\tmyGenerator next\rYou can also generate a positive integer\r\t\tmyGenerator nextInt: 10!\r\r\r!Random methodsFor: 'initialization' stamp: 'di 8/6/1999 15:32'!\rinitialize\r\t\" Set a reasonable Park-Miller starting seed \"\r\t[seed := (Time millisecondClockValue bitAnd: 16r3FFFFFFF) bitXor: self hash.\r\tseed = 0] whileTrue: [\"Try again if ever get a seed = 0\"].\r\r\ta := 16r000041A7 asFloat.    \" magic constant =      16807 \"\r\tm := 16r7FFFFFFF asFloat.    \" magic constant = 2147483647 \"\r\tq := (m quo: a) asFloat.\r\tr  := (m \\\\ a) asFloat.\r! !\r\r\r!Random methodsFor: 'accessing' stamp: 'sma 5/12/2000 12:25'!\rnext\r\t\"Answer a random Float in the interval [0 to 1).\"\r\r\t^ (seed _ self nextValue) / m! !\r\r!Random methodsFor: 'accessing' stamp: 'sma 5/12/2000 12:45'!\rnext: anInteger\r\t^ self next: anInteger into: (Array new: anInteger)! !\r\r!Random methodsFor: 'accessing' stamp: 'sma 5/12/2000 12:46'!\rnext: anInteger into: anArray\r\t1 to: anInteger do: [:index | anArray at: index put: self next].\r\t^ anArray! !\r\r!Random methodsFor: 'accessing' stamp: 'dns 8/26/2001 18:43'!\rnextInt: anInteger\r\t\"Answer a random integer in the interval [1, anInteger].\"\r\r\tanInteger strictlyPositive ifFalse: [ self error: 'Range must be positive' ].\r\t^ (self next * anInteger) truncated + 1! !\r\r\r!Random methodsFor: 'private' stamp: 'sma 5/12/2000 12:28'!\rnextValue\r\t\"This method generates random instances of Integer \tin the interval\r\t0 to 16r7FFFFFFF. This method does NOT update the seed; repeated sends\r\tanswer the same value.\r\tThe algorithm is described in detail in 'Random Number Generators: \r\tGood Ones Are Hard to Find' by Stephen K. Park and Keith W. Miller \r\t(Comm. Asso. Comp. Mach., 31(10):1192--1201, 1988).\"\r\r\t| lo hi aLoRHi answer |\r\thi _ (seed quo: q) asFloat.\r\tlo _ seed - (hi * q).  \" = seed rem: q\"  \r\taLoRHi _ (a * lo) - (r * hi).\r\tanswer _ (aLoRHi > 0.0)\r\t\tifTrue:  [aLoRHi]\r\t\tifFalse: [aLoRHi + m].\r\t^ answer! !\rPluggableTextController subclass: #ReadOnlyTextController\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Pluggable Views'!\r\r!ReadOnlyTextController methodsFor: 'as yet unclassified' stamp: 'di 5/7/1998 13:41'!\raccept \r\t\"Overridden to allow accept of clean text\"\r\t(view setText: paragraph text from: self) ifTrue:\r\t\t[initialText _ paragraph text copy.\r\t\tview ifNotNil: [view hasUnacceptedEdits: false]].\r! !\r\r!ReadOnlyTextController methodsFor: 'as yet unclassified' stamp: 'di 5/7/1998 14:02'!\ruserHasEdited\r\t\"Ignore this -- I stay clean\"! !\r\r!ReadOnlyTextController methodsFor: 'as yet unclassified' stamp: 'di 5/7/1998 13:45'!\rzapSelectionWith: aText\r\tview flash  \"no edits allowed\"! !\rLookupKey subclass: #ReadOnlyVariableBinding\r\tinstanceVariableNames: 'value'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Support'!\r\r!ReadOnlyVariableBinding methodsFor: 'accessing' stamp: 'ar 8/14/2001 23:09'!\rvalue\r\t^value! !\r\r!ReadOnlyVariableBinding methodsFor: 'accessing' stamp: 'ar 8/17/2001 18:03'!\rvalue: aValue\r\t(AttemptToWriteReadOnlyGlobal signal: 'Cannot store into read-only bindings') == true ifTrue:[\r\t\tvalue _ aValue.\r\t].! !\r\r\r!ReadOnlyVariableBinding methodsFor: 'testing' stamp: 'ar 8/14/2001 23:08'!\risSpecialWriteBinding\r\t\"Return true if this variable binding is write protected, e.g., should not be accessed primitively but rather by sending #value: messages\"\r\t^true! !\r\r\r!ReadOnlyVariableBinding methodsFor: 'private' stamp: 'ar 8/14/2001 23:11'!\rprivateSetKey: aKey value: aValue\r\tkey _ aKey.\r\tvalue _ aValue! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rReadOnlyVariableBinding class\r\tinstanceVariableNames: ''!\r\r!ReadOnlyVariableBinding class methodsFor: 'instance creation' stamp: 'ar 8/14/2001 23:11'!\rkey: key value: aValue\r\t^self new privateSetKey: key value: aValue! !\rPositionableStream subclass: #ReadStream\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Streams'!\r!ReadStream commentStamp: '<historical>' prior: 0!\rI represent an accessor for a sequence of objects that can only read objects from the sequence.!\r\r\r!ReadStream methodsFor: 'accessing'!\rascii! !\r\r!ReadStream methodsFor: 'accessing'!\rbinary! !\r\r!ReadStream methodsFor: 'accessing'!\rnext\r\t\"Primitive. Answer the next object in the Stream represented by the\r\treceiver. Fail if the collection of this stream is not an Array or a String.\r\tFail if the stream is positioned at its end, or if the position is out of\r\tbounds in the collection. Optional. See Object documentation\r\twhatIsAPrimitive.\"\r\r\t<primitive: 65>\r\tposition >= readLimit\r\t\tifTrue: [^nil]\r\t\tifFalse: [^collection at: (position _ position + 1)]! !\r\r!ReadStream methodsFor: 'accessing' stamp: 'ls 8/16/1998 00:46'!\rnext: anInteger \r\t\"Answer the next anInteger elements of my collection.  overriden for efficiency\"\r\r\t| ans endPosition |\r\r\tendPosition _ position + anInteger  min:  readLimit.\r\tans _ collection copyFrom: position+1 to: endPosition.\r\tposition _ endPosition.\r\t^ans\r! !\r\r!ReadStream methodsFor: 'accessing' stamp: 'ar 12/23/1999 15:01'!\rnext: n into: aCollection startingAt: startIndex\r\t\"Read n objects into the given collection. \r\tReturn aCollection or a partial copy if less than\r\tn elements have been read.\"\r\t| max |\r\tmax _ (readLimit - position) min: n.\r\taCollection \r\t\treplaceFrom: startIndex \r\t\tto: startIndex+max-1\r\t\twith: collection\r\t\tstartingAt: position+1.\r\tposition _ position + max.\r\tmax = n\r\t\tifTrue:[^aCollection]\r\t\tifFalse:[^aCollection copyFrom: 1 to: startIndex+max-1]! !\r\r!ReadStream methodsFor: 'accessing'!\rnextPut: anObject\r\r\tself shouldNotImplement! !\r\r!ReadStream methodsFor: 'accessing' stamp: 'ajh 9/5/2002 22:11'!\rreadStream\r\t\"polymorphic with SequenceableCollection.  Return self\"\r\r\t^ self! !\r\r!ReadStream methodsFor: 'accessing' stamp: 'ar 11/2/1998 12:20'!\rsize\r\t\"Compatibility with other streams (e.g., FileStream)\"\r\t^readLimit! !\r\r!ReadStream methodsFor: 'accessing' stamp: 'ls 9/12/1998 00:59'!\rupTo: anObject\r\t\"fast version using indexOf:\"\r\t| start end |\r\r\tstart _ position+1.\r\tend _ collection indexOf: anObject startingAt: start ifAbsent: [ 0 ].\r\r\t\"not present--return rest of the collection\"\t\r\tend = 0 ifTrue: [ ^self upToEnd ].\r\r\t\"skip to the end and return the data passed over\"\r\tposition _ end.\r\t^collection copyFrom: start to: (end-1)! !\r\r!ReadStream methodsFor: 'accessing' stamp: 'ls 9/12/1998 00:59'!\rupToEnd\r\t| start |\r\r\tstart _ position+1.\r\tposition _ collection size.\r\t^collection copyFrom: start to: position! !\r\r\r!ReadStream methodsFor: 'private'!\ron: aCollection from: firstIndex to: lastIndex\r\r\t| len |\r\tcollection _ aCollection.\r\treadLimit _  lastIndex > (len _ collection size)\r\t\t\t\t\t\tifTrue: [len]\r\t\t\t\t\t\tifFalse: [lastIndex].\r\tposition _ firstIndex <= 1\r\t\t\t\tifTrue: [0]\r\t\t\t\tifFalse: [firstIndex - 1]! !\r\r\r!ReadStream methodsFor: 'file stream compatibility' stamp: 'nk 12/13/2002 12:00'!\rlocalName\r\t^'ReadStream'! !\r\r!ReadStream methodsFor: 'file stream compatibility' stamp: 'nk 12/13/2002 12:01'!\ropenReadOnly! !\r\r!ReadStream methodsFor: 'file stream compatibility' stamp: 'nk 12/13/2002 12:00'!\rreadOnly! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rReadStream class\r\tinstanceVariableNames: ''!\r\r!ReadStream class methodsFor: 'instance creation'!\ron: aCollection from: firstIndex to: lastIndex \r\t\"Answer with a new instance streaming over a copy of aCollection from\r\tfirstIndex to lastIndex.\"\r\r\t^self basicNew\r\t\ton: aCollection\r\t\tfrom: firstIndex\r\t\tto: lastIndex! !\rWriteStream subclass: #ReadWriteStream\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Streams'!\r!ReadWriteStream commentStamp: '<historical>' prior: 0!\rI represent an accessor for a sequence of objects. My instances can both read and store objects.!\r\r\r!ReadWriteStream methodsFor: 'accessing'!\rcontents\r\t\"Answer with a copy of my collection from 1 to readLimit.\"\r\r\treadLimit _ readLimit max: position.\r\t^collection copyFrom: 1 to: readLimit! !\r\r!ReadWriteStream methodsFor: 'accessing'!\rname\r\t^ 'a stream'   \"for fileIn compatibility\"! !\r\r!ReadWriteStream methodsFor: 'accessing'!\rnext\r\t\"Primitive. Return the next object in the Stream represented by the\r\treceiver. Fail if the collection of this stream is not an Array or a String.\r\tFail if the stream is positioned at its end, or if the position is out of\r\tbounds in the collection. Optional. See Object documentation\r\twhatIsAPrimitive.\"\r\r\t<primitive: 65>\r\t\"treat me as a FIFO\"\r\tposition >= readLimit\r\t\tifTrue: [^nil]\r\t\tifFalse: [^collection at: (position _ position + 1)]! !\r\r!ReadWriteStream methodsFor: 'accessing' stamp: 'ar 8/5/2003 02:23'!\rnext: anInteger \r\t\"Answer the next anInteger elements of my collection.  overriden for efficiency\"\r\r\t| ans endPosition |\r\treadLimit := readLimit max: position.\r\r\tendPosition _ position + anInteger  min:  readLimit.\r\tans _ collection copyFrom: position+1 to: endPosition.\r\tposition _ endPosition.\r\t^ans\r! !\r\r\r!ReadWriteStream methodsFor: 'file status'!\rclose\r\t\"Presumably sets the status of the receiver to be closed. This message does \r\tnothing at this level, but is included for FileStream compatibility.\"\r\r\t^self! !\r\r!ReadWriteStream methodsFor: 'file status'!\rclosed\r\t\"If you have close (for FileStream compatibility), you must respond to closed.  The result in nonsense here.  TK 29 May 96\"\r\r\t^ false! !\r\r\r!ReadWriteStream methodsFor: 'fileIn/Out' stamp: 'sd 5/23/2003 14:41'!\rfileOutChanges\r\t\"Append to the receiver a description of all class changes.\"\r\tCursor write showWhile:\r\t\t[self header; timeStamp.\r\t\tChangeSet current fileOutOn: self.\r\t\tself trailer; close]! !\r\r\r!ReadWriteStream methodsFor: 'converting' stamp: 'ajh 9/14/2002 20:37'!\rreadStream\r\t\"polymorphic with SequenceableCollection.  Return self\"\r\r\t^ self! !\r\r\r!ReadWriteStream methodsFor: 'testing' stamp: 'tk 11/29/2001 12:47'!\r= other\r\r\t(self class == ReadWriteStream and: [other class == ReadWriteStream]) ifFalse: [\r\t\t^ super = other].\t\"does an identity test.  Don't read contents of FileStream\"\r\t^ self position = other position and: [self contents = other contents]! !\r\r!ReadWriteStream methodsFor: 'testing' stamp: 'tk 12/2/2001 17:13'!\rhash\r\r\tself class == ReadWriteStream ifFalse: [^ super hash].\r\t^ (self position + readLimit + 53) hash! !\rObject subclass: #RealEstateAgent\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'ReverseStaggerOffset StaggerOffset StaggerOrigin StandardSize StandardWindowOrigins'\r\tpoolDictionaries: ''\r\tcategory: 'System-Support'!\r!RealEstateAgent commentStamp: '<historical>' prior: 0!\rResponsible for real-estate management on the screen, which is to say, controlling where new windows appear, with what sizes, etc.  5/20/96 sw!\r\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rRealEstateAgent class\r\tinstanceVariableNames: ''!\r\r!RealEstateAgent class methodsFor: 'as yet unclassified' stamp: 'BG 10/29/2003 09:53'!\rassignCollapseFrameFor: aSSView \r\t\"Offer up a location along the left edge of the screen for a collapsed SSView. Make sure it doesn't overlap any other collapsed frames.\"\r\r\t| grid otherFrames topLeft viewBox collapsedFrame extent newFrame verticalBorderDistance top |\r\tgrid _ 8.\r\tverticalBorderDistance _ 8.\r\taSSView isMorph\r\t\tifTrue: []\r\t\tifFalse: [otherFrames _ ScheduledControllers scheduledWindowControllers\r\t\t\t\t\t\tcollect: [:aController | aController view ~= aSSView ifTrue: [aController view collapsedFrame]]\r\t\t\t\t\t\tthenSelect: [:rect | rect notNil].\r\t\t\t\tviewBox _ Display boundingBox].\r\tcollapsedFrame _ aSSView collapsedFrame.\r\textent _ collapsedFrame notNil\r\t\t\t\tifTrue: [collapsedFrame extent]\r\t\t\t\tifFalse: [aSSView isMorph\r\t\t\t\t\tifTrue: [aSSView getRawLabel width + aSSView labelWidgetAllowance @ (aSSView labelHeight + 2)]\r\t\t\t\t\tifFalse: [(aSSView labelText extent x + 70) @ aSSView labelHeight\r\t\t\t\t\t\t\tmin: aSSView labelDisplayBox extent]].\r\tcollapsedFrame notNil\r\t\tifTrue: [(otherFrames anySatisfy: [:f | collapsedFrame intersects: f])\r\t\t\t\tifFalse: [\"non overlapping\"\r\t\t\t\t\t^ collapsedFrame]].\r\ttop _ viewBox top + verticalBorderDistance.\r\t[topLeft _ viewBox left @ top.\r\tnewFrame _ topLeft extent: extent.\r\tnewFrame bottom <= (viewBox height - verticalBorderDistance)]\r\t\twhileTrue: \r\t\t\t[(otherFrames anySatisfy: [:w | newFrame intersects: w])\r\t\t\t\tifFalse: [\"no overlap\"\r\t\t\t\t\t^ newFrame].\r\t\t\ttop _ top + grid].\r\t\"If all else fails... (really to many wins here)\"\r\t^ 0 @ 0 extent: extent! !\r\r!RealEstateAgent class methodsFor: 'as yet unclassified' stamp: 'ssa 9/3/2008 10:48'!\rassignCollapsePointFor: aSSView\r\t\"Offer up a location along the left edge of the screen for a collapsed SSView.\r\tMake sure it doesn't overlap any other collapsed frames.\"\r\r\t| grid otherFrames y free topLeft viewBox |\r\tgrid _ 24.  \"should be mult of 8, since manual move is gridded by 8\"\r\taSSView isMorph\r\t\tifTrue: []\r\t\tifFalse: [otherFrames _ ScheduledControllers scheduledWindowControllers\r\t\t\t\t\tcollect: [:aController | aController view collapsedFrame]\r\t\t\t\t\tthenSelect: [:rect | rect notNil].\r\t\t\t\tviewBox _ Display boundingBox].\r\ty _ viewBox top.\r\t[(y _ y + grid) <= (viewBox height - grid)]\r\t\twhileTrue:\r\t\t[topLeft _ viewBox left@y.\r\t\tfree _ true.\r\t\totherFrames do: [:w | free _ free & (topLeft ~= w topLeft)].\r\t\tfree ifTrue: [^ topLeft]].\r\t\"If all else fails...\"\r\t^ 0 @ 0! !\r\r!RealEstateAgent class methodsFor: 'as yet unclassified' stamp: 'BG 10/29/2003 09:54'!\rinitialFrameFor: aView initialExtent: initialExtent world: aWorld\r\t\"Find a plausible initial screen area for the supplied view, which should be a StandardSystemView, taking into account the 'reverseWindowStagger' Preference, the size needed, and other windows currently on the screen.\"\r\r\t| allOrigins screenRight screenBottom putativeOrigin putativeFrame allowedArea staggerOrigin otherFrames |\r\r\tPreferences reverseWindowStagger ifTrue:\r\t\t[^ self strictlyStaggeredInitialFrameFor: aView initialExtent: initialExtent world: aWorld].\r\r\tallowedArea _ self maximumUsableAreaInWorld: aWorld.\r\tscreenRight _ allowedArea right.\r\tscreenBottom _ allowedArea bottom.\r\r\totherFrames _ Smalltalk isMorphic\r\t\tifTrue: []\r\t\tifFalse: [ScheduledControllers scheduledWindowControllers\r\t\t\t\tselect: [:aController | aController view ~~ nil]\r\t\t\t\tthenCollect: [:aController | aController view isCollapsed\r\t\t\t\t\t\t\t\tifTrue: [aController view expandedFrame]\r\t\t\t\t\t\t\t\tifFalse: [aController view displayBox]]].\r\r\tallOrigins _ otherFrames collect: [:f | f origin].\r\t(self standardPositionsInWorld: aWorld) do:  \"First see if one of the standard positions is free\"\r\t\t[:aPosition | (allOrigins includes: aPosition)\r\t\t\tifFalse:\r\t\t\t\t[^ (aPosition extent: initialExtent) squishedWithin: allowedArea]].\r\r\tstaggerOrigin _ (self standardPositionsInWorld: aWorld) first.  \"Fallback: try offsetting from top left\"\r\tputativeOrigin _ staggerOrigin.\r\r\t[putativeOrigin _ putativeOrigin + StaggerOffset.\r\tputativeFrame _ putativeOrigin extent: initialExtent.\r\t(putativeFrame bottom < screenBottom) and:\r\t\t\t\t\t[putativeFrame right < screenRight]]\r\t\t\t\twhileTrue:\r\t\t\t\t\t[(allOrigins includes: putativeOrigin)\r\t\t\t\t\t\tifFalse:\r\t\t\t\t\t\t\t[^ (putativeOrigin extent: initialExtent) squishedWithin: allowedArea]].\r\t^ (self scrollBarSetback @ self screenTopSetback extent: initialExtent) squishedWithin: allowedArea! !\r\r!RealEstateAgent class methodsFor: 'as yet unclassified' stamp: 'RAA 5/25/2000 08:13'!\rinitialFrameFor: aView world: aWorld\r\t\"Find a plausible initial screen area for the supplied view.  See called method.\"\r\r\t^ self initialFrameFor: aView initialExtent: aView initialExtent world: aWorld! !\r\r!RealEstateAgent class methodsFor: 'as yet unclassified' stamp: 'tk 11/26/1998 09:34'!\rinitialize\r\t\"Initialize the class variables in the receiver.  5/22/96 sw\"\r\t\"RealEstateAgent initialize\"\r\r\tStaggerOffset _ 6 @ 20.\r\tReverseStaggerOffset _ -6 @ 20.\r\tStaggerOrigin _ 200 @ 30.\r\tStandardSize _ 600@400.! !\r\r!RealEstateAgent class methodsFor: 'as yet unclassified' stamp: 'ssa 9/3/2008 11:11'!\rmaximumUsableArea\r\r\t| allowedArea |\r\tallowedArea _ Display usableArea.\r\t^allowedArea\r! !\r\r!RealEstateAgent class methodsFor: 'as yet unclassified' stamp: 'RAA 5/25/2000 08:42'!\rmaximumUsableAreaInWorld: aWorldOrNil\r\r\t| allowedArea |\r\tallowedArea _ Display usableArea.\r\taWorldOrNil ifNotNil: [allowedArea _ allowedArea intersect: aWorldOrNil viewBox].\r\t^allowedArea\r! !\r\r!RealEstateAgent class methodsFor: 'as yet unclassified' stamp: 'ssa 9/3/2008 11:12'!\rscreenTopSetback\r\tSmalltalk isMorphic\r\t\tifTrue: []\r\t\tifFalse: [^ 18]! !\r\r!RealEstateAgent class methodsFor: 'as yet unclassified' stamp: 'ssa 9/3/2008 11:12'!\rscrollBarSetback\r\tSmalltalk isMorphic\r\t\tifTrue: []  \"width = 16; inset from border by 3\"\r\t\tifFalse: [^ 24]! !\r\r!RealEstateAgent class methodsFor: 'as yet unclassified' stamp: 'RAA 5/25/2000 08:43'!\rstandardPositionsInWorld: aWorldOrNil\r\t\"Return a list of standard window positions -- this may have one, two, or four of them, depending on the size and shape of the display screen.  \"\r\r\t| anArea aList  midX midY |\r\r\tanArea _ self maximumUsableAreaInWorld: aWorldOrNil.\r\r\tmidX _ self scrollBarSetback +   ((anArea width - self scrollBarSetback)  // 2).\r\tmidY _ self screenTopSetback + ((anArea height - self screenTopSetback) // 2).\r\taList _ OrderedCollection with: (self scrollBarSetback @ self screenTopSetback).\r\tself windowColumnsDesired > 1\r\t\tifTrue:\r\t\t\t[aList add: (midX @ self screenTopSetback)].\r\tself windowRowsDesired > 1\r\t\tifTrue:\r\t\t\t[aList add: (self scrollBarSetback @ (midY+self screenTopSetback)).\r\t\t\tself windowColumnsDesired > 1 ifTrue:\r\t\t\t\t[aList add: (midX @ (midY+self screenTopSetback))]].\r\t^ aList! !\r\r!RealEstateAgent class methodsFor: 'as yet unclassified' stamp: 'RAA 11/21/1999 22:55'!\rstandardWindowExtent\r\t\"Answer the standard default extent for new windows.  \"\r\r\t| effectiveExtent width strips height grid allowedArea maxLevel |\r\teffectiveExtent _ self maximumUsableArea extent\r\t\t\t\t\t- (self scrollBarSetback @ self screenTopSetback).\r\tPreferences reverseWindowStagger ifTrue:\r\t\t[\"NOTE: following copied from strictlyStaggeredInitialFrameFor:\"\r\t\tallowedArea _ self maximumUsableArea insetBy: (\r\t\t\tself scrollBarSetback @ self screenTopSetback extent: 0@0\r\t\t).\r\t\t\"Number to be staggered at each corner (less on small screens)\"\r\t\tmaxLevel _ allowedArea area > 300000 ifTrue: [3] ifFalse: [2].\r\t\t\"Amount by which to stagger (less on small screens)\"\r\t\tgrid _ allowedArea area > 500000 ifTrue: [40] ifFalse: [20].\r\t\t^ (allowedArea extent - (grid*(maxLevel+1*2) + (grid//2))) min: StandardSize \"600@400\"].\r\twidth _ (strips _ self windowColumnsDesired) > 1\r\t\tifTrue:\r\t\t\t[effectiveExtent x // strips]\r\t\tifFalse:\r\t\t\t[(3 * effectiveExtent x) // 4].\r\theight _ (strips _ self windowRowsDesired) > 1\r\t\tifTrue:\r\t\t\t[effectiveExtent y // strips]\r\t\tifFalse:\r\t\t\t[(3 * effectiveExtent y) //4].\r\t^ width @ height\r\r\"RealEstateAgent standardWindowExtent\"! !\r\r!RealEstateAgent class methodsFor: 'as yet unclassified' stamp: 'BG 10/29/2003 09:54'!\rstrictlyStaggeredInitialFrameFor: aStandardSystemView initialExtent: initialExtent world: aWorld\r\t\"This method implements a staggered window placement policy that I (di) like.\r\tBasically it provides for up to 4 windows, staggered from each of the 4 corners.\r\tThe windows are staggered so that there will always be a corner visible.\"\r\r\t| allowedArea grid initialFrame otherFrames cornerSel corner delta putativeCorner free maxLevel |\r\r\tallowedArea _(self maximumUsableAreaInWorld: aWorld)\r\t\tinsetBy: (self scrollBarSetback @ self screenTopSetback extent: 0@0).\r\t\r\t\"Number to be staggered at each corner (less on small screens)\"\r\tmaxLevel _ allowedArea area > 300000 ifTrue: [3] ifFalse: [2].\r\t\"Amount by which to stagger (less on small screens)\"\r\tgrid _ allowedArea area > 500000 ifTrue: [40] ifFalse: [20].\r\tinitialFrame _ 0@0 extent: ((initialExtent\r\t\t\t\t\t\t\t\"min: (allowedArea extent - (grid*(maxLevel+1*2) + (grid//2))))\r\t\t\t\t\t\t\tmin: 600@400\")).\r\totherFrames _ Smalltalk isMorphic\r\t\tifTrue: []\r\t\tifFalse: [ScheduledControllers scheduledWindowControllers\r\t\t\t\tselect: [:aController | aController view ~~ nil]\r\t\t\t\tthenCollect: [:aController | aController view isCollapsed\r\t\t\t\t\t\t\t\tifTrue: [aController view expandedFrame]\r\t\t\t\t\t\t\t\tifFalse: [aController view displayBox]]].\r\t0 to: maxLevel do:\r\t\t[:level | \r\t\t1 to: 4 do:\r\t\t\t[:ci | cornerSel _ #(topLeft topRight bottomRight bottomLeft) at: ci.\r\t\t\tcorner _ allowedArea perform: cornerSel.\r\t\t\t\"The extra grid//2 in delta helps to keep title tabs distinct\"\r\t\t\tdelta _ (maxLevel-level*grid+(grid//2)) @ (level*grid).\r\t\t\t1 to: ci-1 do: [:i | delta _ delta rotateBy: #right centerAt: 0@0]. \"slow way\"\r\t\t\tputativeCorner _ corner + delta.\r\t\t\tfree _ true.\r\t\t\totherFrames do:\r\t\t\t\t[:w |\r\t\t\t\tfree _ free & ((w perform: cornerSel) ~= putativeCorner)].\r\t\t\tfree ifTrue:\r\t\t\t\t[^ (initialFrame align: (initialFrame perform: cornerSel)\r\t\t\t\t\t\t\t\twith: putativeCorner)\r\t\t\t\t\t\t squishedWithin: allowedArea]]].\r\t\"If all else fails...\"\r\t^ (self scrollBarSetback @ self screenTopSetback extent: initialFrame extent)\r\t\tsquishedWithin: allowedArea! !\r\r!RealEstateAgent class methodsFor: 'as yet unclassified' stamp: 'RAA 11/21/1999 22:54'!\rwindowColumnsDesired\r\t\"Answer how many separate vertical columns of windows are wanted.  5/22/96 sw\"\r\t^ Preferences reverseWindowStagger\r\t\tifTrue:\r\t\t\t[1]\r\t\tifFalse:\r\t\t\t[(self maximumUsableArea width > 640)\r\t\t\t\tifTrue:\r\t\t\t\t\t[2]\r\t\t\t\tifFalse:\r\t\t\t\t\t[1]]! !\r\r!RealEstateAgent class methodsFor: 'as yet unclassified' stamp: 'RAA 11/21/1999 22:54'!\rwindowRowsDesired\r\t\"Answer how many separate horizontal rows of windows are wanted.  5/22/96 sw\"\r\t^ Preferences reverseWindowStagger\r\t\tifTrue:\r\t\t\t[1]\r\t\tifFalse:\r\t\t\t[(self maximumUsableArea height > 480)\r\t\t\t\tifTrue:\r\t\t\t\t\t[2]\r\t\t\t\tifFalse:\r\t\t\t\t\t[1]]! !\rAbstractEvent subclass: #RecategorizedEvent\r\tinstanceVariableNames: 'oldCategory'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Change Notification'!\r\r!RecategorizedEvent methodsFor: 'testing' stamp: 'rw 7/1/2003 19:51'!\risRecategorized\r\r\t^true! !\r\r\r!RecategorizedEvent methodsFor: 'printing' stamp: 'rw 7/2/2003 09:12'!\rprintEventKindOn: aStream\r\r\taStream nextPutAll: 'Recategorized'! !\r\r\r!RecategorizedEvent methodsFor: 'accessing' stamp: 'rw 7/1/2003 20:08'!\roldCategory: aCategoryName\r\r\toldCategory := aCategoryName! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rRecategorizedEvent class\r\tinstanceVariableNames: ''!\r\r!RecategorizedEvent class methodsFor: 'accessing' stamp: 'rw 7/10/2003 12:09'!\rchangeKind\r\r\t^#Recategorized! !\r\r!RecategorizedEvent class methodsFor: 'accessing' stamp: 'rw 7/10/2003 11:20'!\rsupportedKinds\r\r\t^Array with: self classKind with: self methodKind! !\r\r\r!RecategorizedEvent class methodsFor: 'instance creation' stamp: 'rw 7/9/2003 14:21'!\rclass: aClass category: cat oldCategory: oldName\r\r\t^(self class: aClass category: cat) oldCategory: oldName! !\r\r!RecategorizedEvent class methodsFor: 'instance creation' stamp: 'rw 7/31/2003 16:35'!\rmethod: aMethod protocol: prot class: aClass oldProtocol: oldName\r\r\t^(self method: aMethod protocol: prot class: aClass) oldCategory: oldName! !\rMessageSet subclass: #RecentMessageSet\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Browser'!\r!RecentMessageSet commentStamp: 'sw 8/1/2002 17:40' prior: 0!\rRecentMessageSet is a message set that shows the most recently-submitted methods, in chronological order.!\r\r\r!RecentMessageSet methodsFor: 'contents' stamp: 'sw 10/19/1999 17:33'!\rcontents: c notifying: n\r\t| result |\r\tresult _ super contents: c notifying: n.\r\tresult == true ifTrue:\r\t\t[self reformulateList].\r\t^ result! !\r\r\r!RecentMessageSet methodsFor: 'update' stamp: 'sw 1/28/2001 20:59'!\rgrowable\r\t\"Answer whether the receiver can be changed by manual additions & deletions\"\r\r\t^ false! !\r\r!RecentMessageSet methodsFor: 'update' stamp: 'RAA 5/29/2001 10:19'!\rreformulateList\r\t| myList |\r\t\"Reformulate the receiver's list.  Exclude methods now deleted\"\r\r\tmyList _ Utilities recentMethodSubmissions reversed select: [ :each | each isValid].\r\tself initializeMessageList: myList.\r\tself messageListIndex: (messageList size min: 1).\t\"0 or 1\"\r\tself changed: #messageList.\r\tself changed: #messageListIndex! !\r\r!RecentMessageSet methodsFor: 'update' stamp: 'RAA 5/29/2001 10:42'!\rupdateListsAndCodeIn: aWindow\r\r\t| recentFromUtilities |\r\t\"RAA 20 june 2000 - a recent change to how messages were displayed in the list caused them not to match what was stored in Utilities. This caused the recent submissions to be continuously updated. The hack below fixed that problem\"\r\r\tself flag: #mref.\t\"in second pass, use simpler test\"\r\r\tself canDiscardEdits ifFalse: [^ self].\r\trecentFromUtilities _ Utilities mostRecentlySubmittedMessage,' '.\r\t(messageList first asStringOrText asString beginsWith: recentFromUtilities)\r\t\tifFalse:\r\t\t\t[self reformulateList]\r\t\tifTrue:\r\t\t\t[self updateCodePaneIfNeeded]! !\r\r\r!RecentMessageSet methodsFor: 'selection'!\rmaybeSetSelection\r\t\"After a browser's message list is changed, this message is dispatched to the model, to give it a chance to refigure a selection\"\t\r\tself messageListIndex: 1! !\r\r\r!RecentMessageSet methodsFor: 'message list' stamp: 'sw 7/28/2002 23:20'!\raddExtraShiftedItemsTo: aMenu\r\t\"The shifted selector-list menu is being built.  Overridden here to defeat the presence of the items that add or change order, since RecentMessageSet defines methods & order explicitly based on external criteria\"\r\r\taMenu add: 'set size of recent history...' action: #setRecentHistorySize! !\r\r!RecentMessageSet methodsFor: 'message list' stamp: 'sw 7/28/2002 23:50'!\rsetRecentHistorySize\r\t\"Let the user specify the recent history size\"\r\r\t| aReply aNumber |\r\taReply _ FillInTheBlank request: 'How many recent methods\rshould be maintained?' initialAnswer: Utilities numberOfRecentSubmissionsToStore asString.\r\taReply isEmptyOrNil ifFalse:\r\t\t[aNumber _ aReply asNumber rounded.\r\t\t(aNumber > 1 and: [aNumber <= 1000])\r\t\t\tifTrue:\r\t\t\t\t[Utilities numberOfRecentSubmissionsToStore: aNumber.\r\t\t\t\tself inform: 'Okay, ', aNumber asString, ' is the new size of the recent method history']\r\t\t\tifFalse:\r\t\t\t\t[self inform: 'Sorry, must be a number between 2 & 1000']]\r\t\t\t! !\r\r\r!RecentMessageSet methodsFor: 'message functions' stamp: 'BG 11/1/2003 13:27'!\rmessageListMenu: aMenu shifted: shifted\r\t\"Answer the message-list menu\"\r\r\tshifted ifTrue: [^ self shiftedMessageListMenu: aMenu].\r\taMenu addList:#(\r\t\t\t('browse full (b)' \t\t\t\t\t\tbrowseMethodFull)\r\t\t\t('browse hierarchy (h)'\t\t\t\t\tclassHierarchy)\r\t\t\t('browse method (O)'\t\t\t\t\topenSingleMessageBrowser)\r\t\t\t('browse protocol (p)'\t\t\t\t\tbrowseFullProtocol)\r\t\t\t-\r\t\t\t('fileOut (o)'\t\t\t\t\t\t\tfileOutMessage)\r\t\t\t('printOut'\t\t\t\t\t\t\t\tprintOutMessage)\r\t\t\t('copy selector (c)'\t\t\t\t\t\tcopySelector)\r\t\t\t-\r\t\t\t('senders of... (n)'\t\t\t\t\t\tbrowseSendersOfMessages)\r\t\t\t('implementors of... (m)'\t\t\t\t\tbrowseMessages)\r\t\t\t('inheritance (i)'\t\t\t\t\t\tmethodHierarchy)\r\t\t\t('versions (v)'\t\t\t\t\t\t\tbrowseVersions)\r\t\t\t-\r\t\t\t('inst var refs...'\t\t\t\t\t\tbrowseInstVarRefs)\r\t\t\t('inst var defs...'\t\t\t\t\t\tbrowseInstVarDefs)\r\t\t\t('class var refs...'\t\t\t\t\t\tbrowseClassVarRefs)\r\t\t\t('class variables'\t\t\t\t\t\tbrowseClassVariables)\r\t\t\t('class refs (N)'\t\t\t\t\t\t\tbrowseClassRefs)\r\t\t\t-\r\t\t\t('remove method (x)'\t\t\t\t\tremoveMessage)\r\t\t\t('remove from RecentSubmissions'\t\tremoveFromRecentSubmissions)\r\t\t\t-\r\t\t\t('more...'\t\t\t\t\t\t\t\tshiftedYellowButtonActivity)).\r\t^ aMenu! !\r\r!RecentMessageSet methodsFor: 'message functions' stamp: 'sw 9/26/2002 18:09'!\rremoveFromRecentSubmissions\r\t\"Remove the currently-selected method from the RecentSubmissions list\"\r\r\t| aClass methodSym |\r\t((aClass _ self selectedClassOrMetaClass) notNil and: [(methodSym _ self selectedMessageName) notNil])\r\t\tifTrue: \r\t\t\t[Utilities purgeFromRecentSubmissions: (MethodReference new setStandardClass: aClass methodSymbol: methodSym).\r\t\t\tself reformulateList]! !\rObject subclass: #Rectangle\r\tinstanceVariableNames: 'origin corner'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Graphics-Primitives'!\r!Rectangle commentStamp: '<historical>' prior: 0!\rI represent a rectangular area of the screen. Arithmetic functions take points as arguments and carry out scaling and translating operations to create new instances of me. Rectangle functions create new instances by determining intersections of rectangles with rectangles.!\r\r\r!Rectangle methodsFor: 'accessing' stamp: 'acg 2/23/2000 00:52'!\raboveCenter\r\t\"Answer the point slightly above the center of the receiver.\"\r\r\t^self topLeft + self bottomRight // (2@3)! !\r\r!Rectangle methodsFor: 'accessing' stamp: 'di 11/17/2001 14:01'!\rarea\r\t\"Answer the receiver's area, the product of width and height.\"\r\t| w |\r\t(w _ self width) <= 0 ifTrue: [^ 0].\r\t^ w * self height max: 0! !\r\r!Rectangle methodsFor: 'accessing'!\rbottom\r\t\"Answer the position of the receiver's bottom horizontal line.\"\r\r\t^corner y! !\r\r!Rectangle methodsFor: 'accessing' stamp: 'ar 10/26/2000 22:17'!\rbottom: aNumber\r\t^origin corner: corner x @ aNumber! !\r\r!Rectangle methodsFor: 'accessing'!\rbottomCenter\r\t\"Answer the point at the center of the bottom horizontal line of the \r\treceiver.\"\r\r\t^self center x @ self bottom! !\r\r!Rectangle methodsFor: 'accessing'!\rbottomLeft\r\t\"Answer the point at the left edge of the bottom horizontal line of the \r\treceiver.\"\r\r\t^origin x @ corner y! !\r\r!Rectangle methodsFor: 'accessing'!\rbottomRight\r\t\"Answer the point at the right edge of the bottom horizontal line of the \r\treceiver.\"\r\r\t^corner! !\r\r!Rectangle methodsFor: 'accessing'!\rboundingBox\r\t^ self! !\r\r!Rectangle methodsFor: 'accessing'!\rcenter\r\t\"Answer the point at the center of the receiver.\"\r\r\t^self topLeft + self bottomRight // 2! !\r\r!Rectangle methodsFor: 'accessing'!\rcorner\r\t\"Answer the point at the bottom right corner of the receiver.\"\r\r\t^corner! !\r\r!Rectangle methodsFor: 'accessing'!\rcorners\r\t\"Return an array of corner points in the order of a quadrilateral spec for WarpBlt.\"\r\r\t^ Array\r\t\twith: self topLeft\r\t\twith: self bottomLeft\r\t\twith: self bottomRight\r\t\twith: self topRight\r! !\r\r!Rectangle methodsFor: 'accessing'!\rextent\r\t\"Answer with a rectangle with origin 0@0 and corner the receiver's \r\twidth @ the receiver's height.\"\r\r\t^corner - origin! !\r\r!Rectangle methodsFor: 'accessing'!\rheight\r\t\"Answer the height of the receiver.\"\r\r\t^corner y - origin y! !\r\r!Rectangle methodsFor: 'accessing'!\rinnerCorners\r\t\"Return an array of inner corner points,\r\tie, the most extreme pixels included,\r\tin the order of a quadrilateral spec for WarpBlt\"\r\t| r1 |\r\tr1 _ self topLeft corner: self bottomRight - (1@1).\r\t^ Array with: r1 topLeft with: r1 bottomLeft with: r1 bottomRight with: r1 topRight! !\r\r!Rectangle methodsFor: 'accessing'!\rleft\r\t\"Answer the position of the receiver's left vertical line.\"\r\r\t^origin x! !\r\r!Rectangle methodsFor: 'accessing' stamp: 'ar 10/26/2000 22:16'!\rleft: aNumber\r\t^aNumber @ origin y corner: corner! !\r\r!Rectangle methodsFor: 'accessing'!\rleftCenter\r\t\"Answer the point at the center of the receiver's left vertical line.\"\r\r\t^self left @ self center y! !\r\r!Rectangle methodsFor: 'accessing'!\rorigin\r\t\"Answer the point at the top left corner of the receiver.\"\r\r\t^origin! !\r\r!Rectangle methodsFor: 'accessing'!\rright\r\t\"Answer the position of the receiver's right vertical line.\"\r\r\t^corner x! !\r\r!Rectangle methodsFor: 'accessing' stamp: 'ar 10/26/2000 22:17'!\rright: aNumber\r\t^origin corner: aNumber @ corner y! !\r\r!Rectangle methodsFor: 'accessing'!\rrightCenter\r\t\"Answer the point at the center of the receiver's right vertical line.\"\r\r\t^self right @ self center y! !\r\r!Rectangle methodsFor: 'accessing'!\rtop\r\t\"Answer the position of the receiver's top horizontal line.\"\r\r\t^origin y! !\r\r!Rectangle methodsFor: 'accessing' stamp: 'ar 10/26/2000 22:17'!\rtop: aNumber\r\t^origin x @ aNumber corner: corner! !\r\r!Rectangle methodsFor: 'accessing'!\rtopCenter\r\t\"Answer the point at the center of the receiver's top horizontal line.\"\r\r\t^self center x @ self top! !\r\r!Rectangle methodsFor: 'accessing'!\rtopLeft\r\t\"Answer the point at the top left corner of the receiver's top horizontal line.\"\r\r\t^origin\r! !\r\r!Rectangle methodsFor: 'accessing'!\rtopRight\r\t\"Answer the point at the top right corner of the receiver's top horizontal \r\tline.\"\r\r\t^corner x @ origin y! !\r\r!Rectangle methodsFor: 'accessing'!\rwidth\r\t\"Answer the width of the receiver.\"\r\r\t^corner x - origin x! !\r\r\r!Rectangle methodsFor: 'comparing'!\r= aRectangle \r\t\"Answer true if the receiver's species, origin and corner match aRectangle's.\"\r\r\tself species = aRectangle species\r\t\tifTrue: [^origin = aRectangle origin and: [corner = aRectangle corner]]\r\t\tifFalse: [^false]! !\r\r!Rectangle methodsFor: 'comparing'!\rhash\r\t\"Hash is reimplemented because = is implemented.\"\r\r\t^origin hash bitXor: corner hash! !\r\r!Rectangle methodsFor: 'comparing'!\rhashMappedBy: map\r\t\"My hash is independent of my oop.\"\r\r\t^self hash! !\r\r\r!Rectangle methodsFor: 'rectangle functions' stamp: 'di 10/22/1998 16:11'!\radjustTo: newRect along: side \r\t\"Return a copy adjusted to fit a neighbor that has changed size.\"\r\tside = #left ifTrue: [^ self withRight: newRect left].\r\tside = #right ifTrue: [^ self withLeft: newRect right].\r\tside = #top ifTrue: [^ self withBottom: newRect top].\r\tside = #bottom ifTrue: [^ self withTop: newRect bottom].! !\r\r!Rectangle methodsFor: 'rectangle functions' stamp: 'ar 1/5/2002 18:04'!\rallAreasOutsideList: aCollection do: aBlock\r\t\"Enumerate aBlock with all areas of the receiver not overlapping \r\tany rectangle in the given collection\"\r\t^self allAreasOutsideList: aCollection startingAt: 1 do: aBlock! !\r\r!Rectangle methodsFor: 'rectangle functions' stamp: 'ar 1/5/2002 18:03'!\rallAreasOutsideList: aCollection startingAt: startIndex do: aBlock\r\t\"Enumerate aBlock with all areas of the receiver not overlapping \r\tany rectangle in the given collection\"\r\t| yOrigin yCorner aRectangle index rr |\r\tindex _ startIndex.\r\r\t\"Find the next intersecting rectangle from aCollection\"\r\t[index <= aCollection size ifFalse:[^aBlock value: self].\r\taRectangle _ aCollection at: index.\r\torigin <= aRectangle corner and: [aRectangle origin <= corner]] \r\t\twhileFalse:[index _ index + 1].\r\r\t\"aRectangle is intersecting; process it\"\r\taRectangle origin y > origin y \r\t\tifTrue: [rr _ origin corner: corner x @ (yOrigin _ aRectangle origin y).\r\t\t\t\trr allAreasOutsideList: aCollection startingAt: index+1 do: aBlock]\r\t\tifFalse: [yOrigin _ origin y].\r\taRectangle corner y < corner y\r\t\tifTrue: [rr _ origin x @ (yCorner _ aRectangle corner y) corner: corner.\r\t\t\t\trr allAreasOutsideList: aCollection startingAt: index+1 do: aBlock]\r\t\tifFalse: [yCorner _ corner y].\r\taRectangle origin x > origin x \r\t\tifTrue: [rr _ origin x @ yOrigin corner: aRectangle origin x @ yCorner.\r\t\t\t\trr allAreasOutsideList: aCollection startingAt: index+1 do: aBlock].\r\taRectangle corner x < corner x \r\t\tifTrue: [rr _ aRectangle corner x @ yOrigin corner: corner x @ yCorner.\r\t\t\t\trr allAreasOutsideList: aCollection startingAt: index+1 do: aBlock].! !\r\r!Rectangle methodsFor: 'rectangle functions'!\ramountToTranslateWithin: aRectangle\r\t\"Answer a Point, delta, such that self + delta is forced within aRectangle.\"\r\t\"Altered so as to prefer to keep self topLeft inside when all of self\r\tcannot be made to fit 7/27/96 di\"\r\t| dx dy |\r\tdx _ 0.  dy _ 0.\r\tself right > aRectangle right ifTrue: [dx _ aRectangle right - self right].\r\tself bottom > aRectangle bottom ifTrue: [dy _ aRectangle bottom - self bottom].\r\t(self left + dx) < aRectangle left ifTrue: [dx _ aRectangle left - self left].\r\t(self top + dy) < aRectangle top ifTrue: [dy _ aRectangle top - self top].\r\t^ dx@dy! !\r\r!Rectangle methodsFor: 'rectangle functions'!\rareasOutside: aRectangle\r\t\"Answer an Array of Rectangles comprising the parts of the receiver not \r\tintersecting aRectangle.\"\r\r\t| areas yOrigin yCorner |\r\t\"Make sure the intersection is non-empty\"\r\t(origin <= aRectangle corner and: [aRectangle origin <= corner])\r\t\tifFalse: [^Array with: self].\r\tareas _ OrderedCollection new.\r\taRectangle origin y > origin y\r\t\tifTrue: [areas addLast: (origin corner: corner x @ (yOrigin _ aRectangle origin y))]\r\t\tifFalse: [yOrigin _ origin y].\r\taRectangle corner y < corner y\r\t\tifTrue: [areas addLast: (origin x @ (yCorner _ aRectangle corner y) corner: corner)]\r\t\tifFalse: [yCorner _ corner y].\r\taRectangle origin x > origin x \r\t\tifTrue: [areas addLast: (origin x @ yOrigin corner: aRectangle origin x @ yCorner)].\r\taRectangle corner x < corner x \r\t\tifTrue: [areas addLast: (aRectangle corner x @ yOrigin corner: corner x @ yCorner)].\r\t^areas! !\r\r!Rectangle methodsFor: 'rectangle functions' stamp: 'di 10/21/1998 16:00'!\rbordersOn: her along: herSide \r\t(herSide = #right and: [self left = her right])\r\t| (herSide = #left and: [self right = her left])\r\t\tifTrue:\r\t\t[^ (self top max: her top) < (self bottom min: her bottom)].\r\t(herSide = #bottom and: [self top = her bottom])\r\t| (herSide = #top and: [self bottom = her top])\r\t\tifTrue:\r\t\t[^ (self left max: her left) < (self right min: her right)].\r\t^ false! !\r\r!Rectangle methodsFor: 'rectangle functions'!\rencompass: aPoint \r\t\"Answer a Rectangle that contains both the receiver and aPoint.  5/30/96 sw\"\r\r\t^ Rectangle \r\t\torigin: (origin min: aPoint)\r\t\tcorner: (corner max:  aPoint)! !\r\r!Rectangle methodsFor: 'rectangle functions'!\rexpandBy: delta \r\t\"Answer a Rectangle that is outset from the receiver by delta. delta is a \r\tRectangle, Point, or scalar.\"\r\r\t(delta isKindOf: Rectangle)\r\t\tifTrue: [^Rectangle \r\t\t\t\t\torigin: origin - delta origin \r\t\t\t\t\tcorner: corner + delta corner]\r\t\tifFalse: [^Rectangle \r\t\t\t\t\torigin: origin - delta \r\t\t\t\t\tcorner: corner + delta]! !\r\r!Rectangle methodsFor: 'rectangle functions'!\rextendBy: delta \r\t\"Answer a Rectangle with the same origin as the receiver, but whose corner is offset by delta. delta is a \r\tRectangle, Point, or scalar.\"\r\r\t(delta isKindOf: Rectangle)\r\t\tifTrue: [^Rectangle \r\t\t\t\t\torigin: origin\r\t\t\t\t\tcorner: corner + delta corner]\r\t\tifFalse: [^Rectangle \r\t\t\t\t\torigin: origin\r\t\t\t\t\tcorner: corner + delta]! !\r\r!Rectangle methodsFor: 'rectangle functions' stamp: 'di 10/21/1998 16:11'!\rforPoint: aPoint closestSideDistLen: sideDistLenBlock\r\t\"Evaluate the block with my side (symbol) closest to aPoint,\r\t\tthe approx distance of aPoint from that side, and\r\t\tthe length of the side (or 0 if aPoint is beyond the side)\"\r\t| side |\r\tside _ self sideNearestTo: aPoint.\r\tside == #right ifTrue:\r\t\t[^ sideDistLenBlock value: side value: (self right - aPoint x) abs\r\t\t\tvalue: ((aPoint y between: self top and: self bottom)\r\t\t\t\t\t\tifTrue: [self height] ifFalse: [0])].\r\tside == #left ifTrue:\r\t\t[^ sideDistLenBlock value: side value: (self left - aPoint x) abs\r\t\t\tvalue: ((aPoint y between: self top and: self bottom)\r\t\t\t\t\t\tifTrue: [self height] ifFalse: [0])].\r\tside == #bottom ifTrue:\r\t\t[^ sideDistLenBlock value: side value: (self bottom - aPoint y) abs\r\t\t\tvalue: ((aPoint x between: self left and: self right)\r\t\t\t\t\t\tifTrue: [self width] ifFalse: [0])].\r\tside == #top ifTrue:\r\t\t[^ sideDistLenBlock value: side value: (self top - aPoint y) abs\r\t\t\tvalue: ((aPoint x between: self left and: self right)\r\t\t\t\t\t\tifTrue: [self width] ifFalse: [0])].! !\r\r!Rectangle methodsFor: 'rectangle functions'!\rinsetBy: delta \r\t\"Answer a Rectangle that is inset from the receiver by delta. delta is a \r\tRectangle, Point, or scalar.\"\r\r\t(delta isKindOf: Rectangle)\r\t\tifTrue: [^Rectangle \r\t\t\t\t\torigin: origin + delta origin \r\t\t\t\t\tcorner: corner - delta corner]\r\t\tifFalse: [^Rectangle \r\t\t\t\t\torigin: origin + delta \r\t\t\t\t\tcorner: corner - delta]! !\r\r!Rectangle methodsFor: 'rectangle functions'!\rinsetOriginBy: originDeltaPoint cornerBy: cornerDeltaPoint \r\t\"Answer a Rectangle that is inset from the receiver by a given amount in \r\tthe origin and corner.\"\r\r\t^Rectangle\r\t\torigin: origin + originDeltaPoint\r\t\tcorner: corner - cornerDeltaPoint! !\r\r!Rectangle methodsFor: 'rectangle functions' stamp: 'ar 11/12/2000 19:10'!\rintersect: aRectangle \r\t\"Answer a Rectangle that is the area in which the receiver overlaps with \r\taRectangle. Optimized for speed; old code read:\r\t\t^Rectangle \r\t\t\torigin: (origin max: aRectangle origin)\r\t\t\tcorner: (corner min: aRectangle corner)\r\t\"\r\t| aPoint left right top bottom |\r\taPoint _ aRectangle origin.\r\taPoint x > origin x ifTrue:[left _ aPoint x] ifFalse:[left _ origin x].\r\taPoint y > origin y ifTrue:[top _ aPoint y] ifFalse:[top _ origin y].\r\taPoint _ aRectangle corner.\r\taPoint x < corner x ifTrue:[right _ aPoint x] ifFalse:[right _ corner x].\r\taPoint y < corner y ifTrue:[bottom _ aPoint y] ifFalse:[bottom _ corner y].\r\t^Rectangle\r\t\torigin: (left@top)\r\t\tcorner: (right@bottom)\r! !\r\r!Rectangle methodsFor: 'rectangle functions'!\rmerge: aRectangle \r\t\"Answer a Rectangle that contains both the receiver and aRectangle.\"\r\r\t^Rectangle \r\t\torigin: (origin min: aRectangle origin)\r\t\tcorner: (corner max: aRectangle corner)! !\r\r!Rectangle methodsFor: 'rectangle functions' stamp: 'ar 10/29/2000 02:41'!\routsetBy: delta \r\t\"Answer a Rectangle that is outset from the receiver by delta. delta is a \r\tRectangle, Point, or scalar.\"\r\r\t(delta isKindOf: Rectangle)\r\t\tifTrue: [^Rectangle \r\t\t\t\t\torigin: origin - delta origin \r\t\t\t\t\tcorner: corner + delta corner]\r\t\tifFalse: [^Rectangle \r\t\t\t\t\torigin: origin - delta \r\t\t\t\t\tcorner: corner + delta]! !\r\r!Rectangle methodsFor: 'rectangle functions' stamp: 'di 4/30/1998 11:22'!\rpointNearestTo: aPoint\r\t\"Return the point on my border closest to aPoint\"\r\t| side |\r\t(self containsPoint: aPoint)\r\t\tifTrue:\r\t\t\t[side _ self sideNearestTo: aPoint.\r\t\t\tside == #right ifTrue: [^ self right @ aPoint y].\r\t\t\tside == #left ifTrue: [^ self left @ aPoint y].\r\t\t\tside == #bottom ifTrue: [^ aPoint x @ self bottom].\r\t\t\tside == #top ifTrue: [^ aPoint x @ self top]]\r\t\tifFalse:\r\t\t\t[^ aPoint adhereTo: self]! !\r\r!Rectangle methodsFor: 'rectangle functions'!\rquickMerge: aRectangle \r\t\"Answer the receiver if it encloses the given rectangle or the merge of the two rectangles if it doesn't. THis method is an optimization to reduce extra rectangle creations.\"\r\r\t| useRcvr rOrigin rCorner minX maxX minY maxY |\r\tuseRcvr _ true.\r\trOrigin _ aRectangle topLeft.\r\trCorner _ aRectangle bottomRight.\r\tminX _ rOrigin x < origin x ifTrue: [useRcvr _ false. rOrigin x] ifFalse: [origin x].\r\tmaxX _ rCorner x > corner x ifTrue: [useRcvr _ false. rCorner x] ifFalse: [corner x].\r\tminY _ rOrigin y < origin y ifTrue: [useRcvr _ false. rOrigin y] ifFalse: [origin y].\r\tmaxY _ rCorner y > corner y ifTrue: [useRcvr _ false. rCorner y] ifFalse: [corner y].\r\r\tuseRcvr\r\t\tifTrue: [^ self]\r\t\tifFalse: [^ Rectangle origin: minX@minY corner: maxX@maxY].\r! !\r\r!Rectangle methodsFor: 'rectangle functions' stamp: 'di 10/20/97 23:01'!\rrectanglesAt: y height: ht\r\t(y+ht) > self bottom ifTrue: [^ Array new].\r\t^ Array with: (origin x @ y corner: corner x @ (y+ht))! !\r\r!Rectangle methodsFor: 'rectangle functions' stamp: 'di 10/21/1998 15:09'!\rsideNearestTo: aPoint\r\t| distToLeft distToRight distToTop distToBottom closest side |\r\tdistToLeft _ aPoint x - self left.\r\tdistToRight _ self right - aPoint x.\r\tdistToTop _ aPoint y - self top.\r\tdistToBottom _ self bottom - aPoint y.\r\tclosest _ distToLeft. side _ #left.\r\tdistToRight < closest ifTrue: [closest _ distToRight. side _ #right].\r\tdistToTop < closest ifTrue: [closest _ distToTop. side _ #top].\r\tdistToBottom < closest ifTrue: [closest _ distToBottom. side _ #bottom].\r\t^ side\r\"\r | r | r _ Rectangle fromUser.\rDisplay border: r width: 1.\r[Sensor anyButtonPressed] whileFalse:\r\t[(r sideNearestTo: Sensor cursorPoint) , '      ' displayAt: 0@0]\r\"! !\r\r!Rectangle methodsFor: 'rectangle functions' stamp: 'ssa 8/15/2008 11:39'!\rsubDivideBy: aPoint\r\t\"Answer a collection of rectangles which divide the receiver evenly into aPoint x columns and aPoint y rows.  Answer the new rectangles left to right then down.  Yes, this method could be much shorter, but I tried to minimize duplications of arithmetic for efficiency.\"\r\t\"(0@0 corner: 100@100) subDivideBy: 4@2\"\r\t\r\t| rows columns eachWidth eachHeight subRegions rowTop baseIndex myLeft rowBottom columnLeft columnRight |\r\tcolumns _ aPoint x.\r\trows _ aPoint y.\r\teachWidth _ self width / columns.\r\teachHeight _ self height / rows.\r\tsubRegions _ Array new: columns * rows.\r\trowTop _ self top.\r\tbaseIndex _ 0.\r\tmyLeft _ self left.\r\t1 to: rows do: [:rowNumber |\r\t\trowBottom _ rowTop + eachHeight.\r\t\tcolumnLeft _ myLeft.\r\t\tcolumnRight _ columnLeft + eachWidth.\r\t\t1 to: columns do: [:columnNumber |\r\t\t\tsubRegions \r\t\t\t\tat: baseIndex + columnNumber\r\t\t\t\tput: (self species origin: columnLeft @ rowTop corner: columnRight @ rowBottom).\r\t\t\tcolumnLeft _ columnRight.\r\t\t\tcolumnRight _ columnRight + eachWidth].\r\t\trowTop _ rowBottom.\r\t\trowBottom _ rowBottom + eachHeight.\r\t\tbaseIndex _ baseIndex + columns].\r\t^subRegions\r! !\r\r!Rectangle methodsFor: 'rectangle functions' stamp: 'ssa 8/15/2008 12:24'!\rsubDivideRoundedBy: aPoint\r\t\"ssa - round the orign and extent points\"\r\t\"Answer a collection of rectangles which divide the receiver evenly into aPoint x columns and aPoint y rows.  Answer the new rectangles left to right then down.  Yes, this method could be much shorter, but I tried to minimize duplications of arithmetic for efficiency.\"\r\t\"(0@0 corner: 100@100) subDivideBy: 4@2\"\r\t\r\t| rows columns eachWidth eachHeight subRegions rowTop baseIndex myLeft rowBottom columnLeft columnRight |\r\tcolumns _ aPoint x.\r\trows _ aPoint y.\r\teachWidth _ self width / columns.\r\teachHeight _ self height / rows.\r\tsubRegions _ Array new: columns * rows.\r\trowTop _ self top.\r\tbaseIndex _ 0.\r\tmyLeft _ self left.\r\t1 to: rows do: [:rowNumber |\r\t\trowBottom _ rowTop + eachHeight.\r\t\tcolumnLeft _ myLeft.\r\t\tcolumnRight _ columnLeft + eachWidth.\r\t\t1 to: columns do: [:columnNumber |\r\t\t\tsubRegions \r\t\t\t\tat: baseIndex + columnNumber\r\t\t\t\tput: (self species origin: columnLeft @ rowTop corner: columnRight @ rowBottom) rounded.\r\t\t\tcolumnLeft _ columnRight.\r\t\t\tcolumnRight _ columnRight + eachWidth].\r\t\trowTop _ rowBottom.\r\t\trowBottom _ rowBottom + eachHeight.\r\t\tbaseIndex _ baseIndex + columns].\r\t^subRegions\r! !\r\r!Rectangle methodsFor: 'rectangle functions'!\rtranslatedToBeWithin: aRectangle\r\t\"Answer a copy of the receiver that does not extend beyond aRectangle.  7/8/96 sw\"\r\r\t^ self translateBy: (self amountToTranslateWithin: aRectangle)! !\r\r!Rectangle methodsFor: 'rectangle functions'!\rwithBottom: y \r\t\"Return a copy of me with a different bottom y\"\r\t^ origin x @ origin y corner: corner x @ y! !\r\r!Rectangle methodsFor: 'rectangle functions'!\rwithHeight: height \r\t\"Return a copy of me with a different height\"\r\t^ origin corner: corner x @ (origin y + height)! !\r\r!Rectangle methodsFor: 'rectangle functions'!\rwithLeft: x \r\t\"Return a copy of me with a different left x\"\r\t^ x @ origin y corner: corner x @ corner y! !\r\r!Rectangle methodsFor: 'rectangle functions'!\rwithRight: x \r\t\"Return a copy of me with a different right x\"\r\t^ origin x @ origin y corner: x @ corner y! !\r\r!Rectangle methodsFor: 'rectangle functions'!\rwithSide: side setTo: value  \"return a copy with side set to value\"\r\t^ self perform: (#(withLeft: withRight: withTop: withBottom: )\r\t\t\t\t\t\t\tat: (#(left right top bottom) indexOf: side))\r\t\twith: value! !\r\r!Rectangle methodsFor: 'rectangle functions' stamp: 'di 9/8/1999 21:25'!\rwithSideOrCorner: side setToPoint: newPoint\r\t\"Return a copy with side set to newPoint\"\r\r\t^ self withSideOrCorner: side setToPoint: newPoint minExtent: 0@0! !\r\r!Rectangle methodsFor: 'rectangle functions' stamp: 'bf 9/10/1999 16:16'!\rwithSideOrCorner: side setToPoint: newPoint minExtent: minExtent\r\t\"Return a copy with side set to newPoint\"\r\t^self withSideOrCorner: side setToPoint: newPoint minExtent: minExtent\r\t\tlimit: ((#(left top) includes: side) ifTrue: [SmallInteger minVal] ifFalse: [SmallInteger maxVal])! !\r\r!Rectangle methodsFor: 'rectangle functions' stamp: 'bf 9/10/1999 16:07'!\rwithSideOrCorner: side setToPoint: newPoint minExtent: minExtent limit: limit\r\t\"Return a copy with side set to newPoint\"\r\tside = #top ifTrue: [^ self withTop: (newPoint y min: corner y - minExtent y max: limit + minExtent y)].\r\tside = #bottom ifTrue: [^ self withBottom: (newPoint y min: limit - minExtent y max: origin y + minExtent y)].\r\tside = #left ifTrue: [^ self withLeft: (newPoint x min: corner x - minExtent x max: limit + minExtent x)].\r\tside = #right ifTrue: [^ self withRight: (newPoint x min: limit - minExtent x max: origin x + minExtent x)].\r\tside = #topLeft ifTrue: [^ (newPoint min: corner - minExtent) corner: self bottomRight].\r\tside = #bottomRight ifTrue: [^ self topLeft corner: (newPoint max: origin + minExtent)].\r\tside = #bottomLeft ifTrue: [^ self topRight rect: ((newPoint x min: corner x - minExtent x) @ (newPoint y max: origin y + minExtent y))].\r\tside = #topRight ifTrue: [^ self bottomLeft rect: ((newPoint x max: origin x + minExtent x) @ (newPoint y min: corner y - minExtent y))].! !\r\r!Rectangle methodsFor: 'rectangle functions'!\rwithTop: y \r\t\"Return a copy of me with a different top y\"\r\t^ origin x @ y corner: corner x @ corner y! !\r\r!Rectangle methodsFor: 'rectangle functions'!\rwithWidth: width \r\t\"Return a copy of me with a different width\"\r\t^ origin corner: (origin x + width) @ corner y! !\r\r\r!Rectangle methodsFor: 'testing'!\rcontainsPoint: aPoint \r\t\"Answer whether aPoint is within the receiver.\"\r\r\t^origin <= aPoint and: [aPoint < corner]! !\r\r!Rectangle methodsFor: 'testing'!\rcontainsRect: aRect\r\t\"Answer whether aRect is within the receiver (OK to coincide).\"\r\r\t^ aRect origin >= origin and: [aRect corner <= corner]\r! !\r\r!Rectangle methodsFor: 'testing'!\rhasPositiveExtent\r\t^ (corner x > origin x) and: [corner y > origin y]! !\r\r!Rectangle methodsFor: 'testing' stamp: 'ar 9/10/2000 15:29'!\rintersects: aRectangle \r\t\"Answer whether aRectangle intersects the receiver anywhere.\"\r\t\"Optimized; old code answered:\r\t\t(origin max: aRectangle origin) < (corner min: aRectangle corner)\"\r\r\t| rOrigin rCorner |\r\trOrigin _ aRectangle origin.\r\trCorner _ aRectangle corner.\r\trCorner x <= origin x\tifTrue: [^ false].\r\trCorner y <= origin y\tifTrue: [^ false].\r\trOrigin x >= corner x\tifTrue: [^ false].\r\trOrigin y >= corner y\tifTrue: [^ false].\r\t^ true\r! !\r\r!Rectangle methodsFor: 'testing'!\risTall\r\t^ self height > self width! !\r\r!Rectangle methodsFor: 'testing'!\risWide\r\t^ self width > self height! !\r\r!Rectangle methodsFor: 'testing' stamp: 'ar 10/29/2000 19:03'!\risZero\r\t^origin isZero and:[corner isZero]! !\r\r\r!Rectangle methodsFor: 'truncation and round off'!\rrounded\r\t\"Answer a Rectangle whose origin and corner are rounded.\"\r\r\t^Rectangle origin: origin rounded corner: corner rounded! !\r\r!Rectangle methodsFor: 'truncation and round off'!\rtruncateTo: grid\r\t\"Answer a Rectangle whose origin and corner are truncated to grid x and grid y.\"\r\r\t^Rectangle origin: (origin truncateTo: grid)\r\t\t\t\tcorner: (corner truncateTo: grid)! !\r\r!Rectangle methodsFor: 'truncation and round off' stamp: 'jm 5/29/1998 15:53'!\rtruncated\r\t\"Answer a Rectangle whose origin and corner have any fractional parts removed. Answer the receiver if its coordinates are already integral.\"\r\r\t(origin x isInteger and:\r\t[origin y isInteger and:\r\t[corner x isInteger and:\r\t[corner y isInteger]]])\r\t\tifTrue: [^ self].\r\r\t^ Rectangle origin: origin truncated corner: corner truncated\r! !\r\r\r!Rectangle methodsFor: 'transforming'!\ralign: aPoint1 with: aPoint2 \r\t\"Answer a Rectangle that is a translated by aPoint2 - aPoint1.\"\r\r\t^self translateBy: aPoint2 - aPoint1! !\r\r!Rectangle methodsFor: 'transforming'!\rcenteredBeneath: aRectangle\r\t \"Move the reciever so that its top center point coincides with the bottom center point of aRectangle.  5/20/96 sw:\"\r\r\t^ self align: self topCenter with: aRectangle bottomCenter! !\r\r!Rectangle methodsFor: 'transforming' stamp: 'di 6/11/97 16:24'!\rflipBy: direction centerAt: aPoint \r\t\"Return a copy flipped #vertical or #horizontal, about aPoint.\"\r\t^ (origin flipBy: direction centerAt: aPoint)\r\t\trect: (corner flipBy: direction centerAt: aPoint)! !\r\r!Rectangle methodsFor: 'transforming' stamp: 'ssa 9/3/2008 11:12'!\rnewRectButtonPressedDo: newRectBlock \r\t\"Track the outline of a new rectangle until mouse button \r\tchanges. newFrameBlock produces each new rectangle from the \r\tprevious. Only tracks while mouse is down.\"\r\t| rect newRect buttonNow delay |\r\tdelay _ Delay forMilliseconds: 10.\r\tbuttonNow _ Sensor anyButtonPressed.\r\trect _ self.\r\tDisplay\r\t\tborder: rect\r\t\twidth: 2\r\t\trule: Form reverse\r\t\tfillColor: Color gray.\r\t[buttonNow]\r\t\twhileTrue: [delay wait.\r\t\t\tbuttonNow _ Sensor anyButtonPressed.\r\t\t\tnewRect _ newRectBlock value: rect.\r\t\t\tnewRect = rect\r\t\t\t\tifFalse: [Display\r\t\t\t\t\t\tborder: rect\r\t\t\t\t\t\twidth: 2\r\t\t\t\t\t\trule: Form reverse\r\t\t\t\t\t\tfillColor: Color gray.\r\t\t\t\t\tDisplay\r\t\t\t\t\t\tborder: newRect\r\t\t\t\t\t\twidth: 2\r\t\t\t\t\t\trule: Form reverse\r\t\t\t\t\t\tfillColor: Color gray.\r\t\t\t\t\trect _ newRect]].\r\tDisplay\r\t\tborder: rect\r\t\twidth: 2\r\t\trule: Form reverse\r\t\tfillColor: Color gray.\r\t\" pay the price for reading the sensor directly ; get this party started \"\r\tSmalltalk isMorphic\r\t\tifTrue: [].\r\tSensor processEvent: Sensor createMouseEvent.\r\t^ rect! !\r\r!Rectangle methodsFor: 'transforming' stamp: 'ssa 9/3/2008 11:12'!\rnewRectFrom: newRectBlock\r\t\"Track the outline of a new rectangle until mouse button changes.\r\tnewFrameBlock produces each new rectangle from the previous\"\r\t| rect newRect buttonStart buttonNow delay |\r\tdelay _ Delay forMilliseconds: 10.\r\tbuttonStart _ buttonNow _ Sensor anyButtonPressed.\r\trect _ self.\r\tDisplay border: rect width: 2 rule: Form reverse fillColor: Color gray.\r\t[buttonNow == buttonStart] whileTrue: \r\t\t[delay wait.\r\t\tbuttonNow _ Sensor anyButtonPressed.\r\t\tnewRect _ newRectBlock value: rect.\r\t\tnewRect = rect ifFalse:\r\t\t\t[Display border: rect width: 2 rule: Form reverse fillColor: Color gray.\r\t\t\tDisplay border: newRect width: 2 rule: Form reverse fillColor: Color gray.\r\t\t\trect _ newRect]].\r\tDisplay border: rect width: 2 rule: Form reverse fillColor: Color gray.\r\t\" pay the price for reading the sensor directly ; get this party started \"\r\r\tSensor processEvent: Sensor createMouseEvent.\r\t^ rect! !\r\r!Rectangle methodsFor: 'transforming' stamp: 'di 6/11/97 15:11'!\rrotateBy: direction centerAt: aPoint\r\t\"Return a copy rotated #right, #left, or #pi about aPoint\"\r\t^ (origin rotateBy: direction centerAt: aPoint)\r\t\trect: (corner rotateBy: direction centerAt: aPoint)! !\r\r!Rectangle methodsFor: 'transforming'!\rscaleBy: scale \r\t\"Answer a Rectangle scaled by scale, a Point or a scalar.\"\r\r\t^Rectangle origin: origin * scale corner: corner * scale! !\r\r!Rectangle methodsFor: 'transforming' stamp: 'ssa 8/27/2008 04:43'!\rscaleByRect: scale \r\t\"Answer a Rectangle scaled by scale, a rectangle.\"\r\r\t^Rectangle origin: origin * scale origin corner: corner * scale corner! !\r\r!Rectangle methodsFor: 'transforming'!\rscaleFrom: rect1 to: rect2\r\t\"Produce a rectangle stretched according to the stretch from rect1 to rect2\"\r\t^ (origin scaleFrom: rect1 to: rect2)\r\t\tcorner: (corner scaleFrom: rect1 to: rect2)! !\r\r!Rectangle methodsFor: 'transforming' stamp: 'sw 5/21/96'!\rsquishedWithin: aRectangle\r\t\"Return an adjustment of the receiver that fits within aRectangle by reducing its size, not by changing its origin.  \"\r\r\t^ origin corner: (corner min: aRectangle bottomRight)\r\r\"(50 @ 50 corner: 160 @ 100) squishedWithin:  (20 @ 10 corner: 90 @ 85)\"\r! !\r\r!Rectangle methodsFor: 'transforming'!\rtranslateBy: factor \r\t\"Answer a Rectangle translated by factor, a Point or a scalar.\"\r\r\t^Rectangle origin: origin + factor corner: corner + factor! !\r\r!Rectangle methodsFor: 'transforming' stamp: 'nk 7/5/2003 08:31'!\rtranslatedAndSquishedToBeWithin: aRectangle\r\t\"Return an adjustment of the receiver that fits within aRectangle by\r\t\t- translating it to be within aRectangle if necessary, then\r\t\t- reducing its size, if necessary\"\r\r\t^ (self translatedToBeWithin: aRectangle) squishedWithin: aRectangle! !\r\r\r!Rectangle methodsFor: 'printing'!\rprintOn: aStream \r\t\"Refer to the comment in Object|printOn:.\"\r\r\torigin printOn: aStream.\r\taStream nextPutAll: ' corner: '.\r\tcorner printOn: aStream! !\r\r!Rectangle methodsFor: 'printing' stamp: 'MPW 1/4/1901 08:18'!\rpropertyListOn: aStream \r\t\" {x=a; y=b; width=c; height=d} \"\r\taStream print:'{ x='; write:origin x;\r\t\t\tprint:' y='; write:origin y;\r\t\t\tprint:' width='; write:self extent x;\r\t\t\tprint:' height='; write:self extent y;\r\t\t\tprint:'};'.\r! !\r\r!Rectangle methodsFor: 'printing'!\rstoreOn: aStream \r\t\"printed form is good for storing too\"\r\tself printOn: aStream! !\r\r\r!Rectangle methodsFor: 'private'!\rsetOrigin: topLeft corner: bottomRight\r\torigin _ topLeft.\r\tcorner _ bottomRight! !\r\r\r!Rectangle methodsFor: 'FMP' stamp: 'RAA 6/1/1999 17:41'!\rdeltaToEnsureInOrCentered: r extra: aNumber\r\r\t| dX dY halfXDiff halfYDiff |\r\tdX _ dY _ 0.\r\thalfXDiff _ (r width - self width * aNumber) truncated.\r\thalfYDiff _ (r height - self height  * aNumber) truncated.\r\tself left < r left\r\t\tifTrue: [dX _ self left - r left - halfXDiff]\r\t\tifFalse: [self right > r right ifTrue: [dX _ self right - r right + halfXDiff]].\r\tself top < r top\r\t\tifTrue: [dY _ self top - r top - halfYDiff]\r\t\tifFalse: [self bottom > r bottom ifTrue: [dY _ self bottom - r bottom + halfYDiff]].\r\t^dX @ dY\r! !\r\r\r!Rectangle methodsFor: '*nebraska-Morphic-Remote' stamp: 'RAA 7/31/2000 16:39'!\rencodeForRemoteCanvasB\r\r\t| encoded |\r\r\tencoded := Bitmap new: 4.\r\tencoded at: 1 put: origin x asInteger.\r\tencoded at: 2 put: origin y asInteger.\r\tencoded at: 3 put: corner x asInteger.\r\tencoded at: 4 put: corner y asInteger.\r\r\t^encoded! !\r\r\r!Rectangle methodsFor: '*morphic-Postscript Canvases' stamp: 'mpw 8/9/1930 08:00'!\rencodePostscriptOn:aStream \r\taStream write:self origin; print:' '; write:self extent; print:' '.! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rRectangle class\r\tinstanceVariableNames: ''!\r\r!Rectangle class methodsFor: 'instance creation' stamp: 'tk 3/9/97'!\rcenter: centerPoint extent: extentPoint \r\t\"Answer an instance of me whose center is centerPoint and width \r\tby height is extentPoint.  \"\r\r\t^self origin: centerPoint - (extentPoint//2) extent: extentPoint! !\r\r!Rectangle class methodsFor: 'instance creation' stamp: 'di 12/1/97 10:42'!\rencompassing: listOfPoints\r\t\"A number of callers of encompass: should use this method.\"\r\t| topLeft bottomRight |\r\ttopLeft _ bottomRight _ nil.\r\tlistOfPoints do:\r\t\t[:p | topLeft == nil\r\t\t\tifTrue: [topLeft _ bottomRight _ p]\r\t\t\tifFalse: [topLeft _ topLeft min: p.\r\t\t\t\t\tbottomRight _ bottomRight max: p]].\r\t^ topLeft corner: bottomRight! !\r\r!Rectangle class methodsFor: 'instance creation'!\rfromUser\r\t\"Answer an instance of me that is determined by having the user \r\tdesignate the top left and bottom right corners. The gridding for user \r\tselection is 1@1.\"\r\r\t^self fromUser: 1 @ 1! !\r\r!Rectangle class methodsFor: 'instance creation'!\rfromUser: gridPoint\r\t\"Answer a Rectangle that is determined by having the user \r\tdesignate the top left and bottom right corners. \r\tThe cursor reamins linked with the sensor, but\r\tthe outline is kept gridded.\"\r\t| originRect |\r\toriginRect _ Cursor origin showWhile: \r\t\t[((Sensor cursorPoint grid: gridPoint) extent: 0@0) newRectFrom:\r\t\t\t[:f | (Sensor cursorPoint grid: gridPoint) extent: 0@0]].\r\t^ Cursor corner showWhile:\r\t\t[originRect newRectFrom:\r\t\t\t[:f | f origin corner: (Sensor cursorPoint grid: gridPoint)]]! !\r\r!Rectangle class methodsFor: 'instance creation'!\rleft: leftNumber right: rightNumber top: topNumber bottom: bottomNumber \r\t\"Answer an instance of me whose left, right, top, and bottom coordinates \r\tare determined by the arguments.\"\r\r\t^ self new setOrigin: leftNumber @ topNumber corner: rightNumber @ bottomNumber! !\r\r!Rectangle class methodsFor: 'instance creation' stamp: 'btr 2/14/2003 16:29'!\rmerging: listOfRects \r\t\"A number of callers of merge: should use this method.\"\r\t| minX minY maxX maxY |\r\tlistOfRects\r\t\tdo: [:r | minX\r\t\t\t\tifNil: [minX _ r topLeft x. minY _ r topLeft y.\r\t\t\t\t\tmaxX _ r bottomRight x. maxY _ r bottomRight y]\r\t\t\t\tifNotNil: [minX _ minX min: r topLeft x. minY _ minY min: r topLeft y.\r\t\t\t\t\tmaxX _ maxX max: r bottomRight x. maxY _ maxY max: r bottomRight y]].\r\t^ minX@minY corner: maxX@maxY! !\r\r!Rectangle class methodsFor: 'instance creation'!\rorigin: originPoint corner: cornerPoint \r\t\"Answer an instance of me whose corners (top left and bottom right) are \r\tdetermined by the arguments.\"\r\r\t^self new setOrigin: originPoint corner: cornerPoint! !\r\r!Rectangle class methodsFor: 'instance creation'!\rorigin: originPoint extent: extentPoint \r\t\"Answer an instance of me whose top left corner is originPoint and width \r\tby height is extentPoint.\"\r\r\t^self new setOrigin: originPoint corner: originPoint + extentPoint! !\r\r!Rectangle class methodsFor: 'instance creation'!\roriginFromUser: extentPoint \r\t\"Answer an instance of me that is determined by having the user \r\tdesignate the top left corner. The width and height are determined by \r\textentPoint. The gridding for user selection is 1@1.\"\r\r\t^self originFromUser: extentPoint grid: 1 @ 1! !\r\r!Rectangle class methodsFor: 'instance creation'!\roriginFromUser: extentPoint grid: gridPoint \r\t\"Answer an instance of me that is determined by having the user \r\tdesignate the top left corner. The width and height are determined by \r\textentPoint. The gridding for user selection is scaleFactor. Assumes that \r\tthe sender has determined an extent that is a proper multiple of \r\tscaleFactor.\"\r\r\t^ Cursor origin showWhile: \r\t\t[((Sensor cursorPoint grid: gridPoint) extent: extentPoint) newRectFrom:\r\t\t\t[:f | (Sensor cursorPoint grid: gridPoint) extent: extentPoint]].\r! !\rObject subclass: #RemoteString\r\tinstanceVariableNames: 'sourceFileNumber filePositionHi'\r\tclassVariableNames: 'CurrentTextAttStructure CurrentTextAttVersion TextAttributeStructureVersions'\r\tpoolDictionaries: ''\r\tcategory: 'System-Files'!\r!RemoteString commentStamp: '<historical>' prior: 0!\rMy instances provide an external file reference to a piece of text.  It may be the sourceCode of a method, or the class comments of a class.\r\rThe changes file or file-in file usually has a chunk that is just the source string of a method:\r\rmax: aNumber\r\t^ self > aNumber ifTrue: [self] ifFalse: [aNumber]!!\r\rI can return either a String or a Text.  Some a chunk is followed by a second chunk (beginning with ]style[) containing style information.  The encoding is like this:\r\rmax: aNumber\r\t^ self > aNumber ifTrue: [self] ifFalse: [aNumber]!!\r]style[(14 50 312)f1,f1b,f1LInteger +;i!!\r\rAllowed TextAttributes are TextFontChange, TextEmphasis, TextColor, TextDoIt, TextKern, TextLink, TextURL.  TextFontReference and TextAnchor are not supported.\r\rSee PositionableStream nextChunkText and RunArray class scanFrom:.!\r]style[(748 32 5 24 1)f1,f1LPositionableStream nextChunkText;,f1,f1LRunArray class scanFrom:;,f1!\r\r\r!RemoteString methodsFor: 'accessing' stamp: 'ajh 1/18/2002 01:04'!\rfileStream \r\t\"Answer the file stream with position set at the beginning of my string\"\r\r\t| theFile |\r\t(sourceFileNumber == nil or: [(SourceFiles at: sourceFileNumber) == nil]) ifTrue: [^ nil].\r\ttheFile _ SourceFiles at: sourceFileNumber.\r\ttheFile position: filePositionHi.\r\t^ theFile! !\r\r!RemoteString methodsFor: 'accessing' stamp: 'nk 11/26/2002 12:05'!\rlast\r\t^self string ifNotNilDo: [ :s | s last ]! !\r\r!RemoteString methodsFor: 'accessing'!\rposition \r\t\"Answer the location of the string on a file.\"\r\r\t^ filePositionHi! !\r\r!RemoteString methodsFor: 'accessing' stamp: 'hmm 4/26/2000 21:28'!\rsetSourcePointer: aSourcePointer\r\tsourceFileNumber _ SourceFiles fileIndexFromSourcePointer: aSourcePointer.\r\tfilePositionHi _ SourceFiles filePositionFromSourcePointer: aSourcePointer! !\r\r!RemoteString methodsFor: 'accessing'!\rsourceFileNumber\r\t\"Answer the index of the file on which the string is stored.\"\r\r\t^sourceFileNumber! !\r\r!RemoteString methodsFor: 'accessing' stamp: 'hmm 4/26/2000 20:47'!\rsourcePointer\r\tsourceFileNumber ifNil: [^ 0].\r\t^SourceFiles sourcePointerFromFileIndex: sourceFileNumber andPosition: filePositionHi! !\r\r!RemoteString methodsFor: 'accessing' stamp: 'di 1/13/98 16:57'!\rstring \r\t\"Answer the receiver's string if remote files are enabled.\"\r\t| theFile |\r\t(sourceFileNumber == nil or: [(SourceFiles at: sourceFileNumber) == nil]) ifTrue: [^''].\r\ttheFile _ SourceFiles at: sourceFileNumber.\r\ttheFile position: filePositionHi.\r\t^ theFile nextChunk! !\r\r!RemoteString methodsFor: 'accessing' stamp: 'tk 1/21/95 17:55'!\rtext \r\t\"Answer the receiver's string asText if remote files are enabled.\"\r\t| theFile |\r\t(sourceFileNumber == nil or: [(SourceFiles at: sourceFileNumber) == nil]) ifTrue: [^ nil].\r\ttheFile _ SourceFiles at: sourceFileNumber.\r\ttheFile position: filePositionHi.\r\t^ theFile nextChunkText! !\r\r\r!RemoteString methodsFor: 'private'!\rfileNumber: fileNumber position: position \r\r\tsourceFileNumber _ fileNumber.\r\tfilePositionHi _ position! !\r\r!RemoteString methodsFor: 'private'!\rstring: aString onFileNumber: fileNumber\r\t\"Store this as my string if source files exist.\"\r\t| theFile |\r\t(SourceFiles at: fileNumber) == nil ifFalse: \r\t\t[theFile _ SourceFiles at: fileNumber.\r\t\ttheFile setToEnd; cr.\r\t\tself string: aString onFileNumber: fileNumber toFile: theFile]! !\r\r!RemoteString methodsFor: 'private' stamp: 'tk 12/12/97 10:41'!\rstring: aStringOrText onFileNumber: fileNumber toFile: aFileStream \r\t\"Store this as the receiver's text if source files exist. If aStringOrText is a Text, store a marker with the string part, and then store the runs of TextAttributes in the next chunk.\"\r\r\t| position |\r\tposition _ aFileStream position.\r\tself fileNumber: fileNumber position: position.\r\taFileStream nextChunkPutWithStyle: aStringOrText\r\t\"^ self\t\t(important)\"! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rRemoteString class\r\tinstanceVariableNames: ''!\r\r!RemoteString class methodsFor: 'as yet unclassified' stamp: 'tk 12/11/97 10:35'!\rinitialize\r\t\"Derive the current TextAttributes classes object structure\"\r\r\tself new makeNewTextAttVersion! !\r\r!RemoteString class methodsFor: 'as yet unclassified'!\rnewFileNumber: sourceIndex position: anInteger \r\t\"Answer an instance of me fora file indexed by sourceIndex, at the \r\tposition anInteger. Assume that the string is already stored on the file \r\tand the instance will be used to access it.\"\r\r\t^self new fileNumber: sourceIndex position: anInteger! !\r\r!RemoteString class methodsFor: 'as yet unclassified'!\rnewString: aString onFileNumber: sourceIndex \r\t\"Answer an instance of me for string, aString, on file indexed by \r\tsourceIndex. Put the string on the file and create the remote reference.\"\r\r\t^self new string: aString onFileNumber: sourceIndex! !\r\r!RemoteString class methodsFor: 'as yet unclassified'!\rnewString: aString onFileNumber: sourceIndex toFile: aFileStream\r\t\"Answer an instance of me for string, aString, on file indexed by \r\tsourceIndex. Put the string on the file, aFileStream, and create the \r\tremote reference. Assume that the index corresponds properly to \r\taFileStream.\"\r\r\t^self new string: aString onFileNumber: sourceIndex toFile: aFileStream! !\rAbstractEvent subclass: #RemovedEvent\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Change Notification'!\r\r!RemovedEvent methodsFor: 'testing' stamp: 'rw 6/30/2003 08:35'!\risRemoved\r\r\t^true! !\r\r\r!RemovedEvent methodsFor: 'printing' stamp: 'rw 6/30/2003 09:31'!\rprintEventKindOn: aStream\r\r\taStream nextPutAll: 'Removed'! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rRemovedEvent class\r\tinstanceVariableNames: ''!\r\r!RemovedEvent class methodsFor: 'accessing' stamp: 'rw 7/10/2003 12:09'!\rchangeKind\r\r\t^#Removed! !\r\r!RemovedEvent class methodsFor: 'accessing' stamp: 'NS 1/20/2004 12:28'!\rsupportedKinds\r\t\"All the kinds of items that this event can take.\"\r\t\r\t^ Array with: self classKind with: self methodKind with: self categoryKind with: self protocolKind! !\rAbstractEvent subclass: #RenamedEvent\r\tinstanceVariableNames: 'newName oldName'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Change Notification'!\r\r!RenamedEvent methodsFor: 'printing' stamp: 'rw 7/1/2003 11:34'!\rprintEventKindOn: aStream\r\r\taStream nextPutAll: 'Renamed'! !\r\r\r!RenamedEvent methodsFor: 'testing' stamp: 'rw 7/1/2003 11:34'!\risRenamed\r\r\t^true! !\r\r\r!RenamedEvent methodsFor: 'accessing' stamp: 'NS 1/27/2004 12:18'!\rnewName\r\t^ newName! !\r\r!RenamedEvent methodsFor: 'accessing' stamp: 'NS 1/27/2004 12:18'!\rnewName: aName\r\r\tnewName := aName! !\r\r!RenamedEvent methodsFor: 'accessing' stamp: 'rw 7/1/2003 12:01'!\roldName: aName\r\r\toldName := aName! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rRenamedEvent class\r\tinstanceVariableNames: ''!\r\r!RenamedEvent class methodsFor: 'accessing' stamp: 'rw 7/10/2003 12:09'!\rchangeKind\r\r\t^#Renamed! !\r\r!RenamedEvent class methodsFor: 'accessing' stamp: 'NS 1/20/2004 12:30'!\rsupportedKinds\r\t\"All the kinds of items that this event can take.\"\r\t\r\t^ Array with: self classKind with: self categoryKind with: self protocolKind! !\r\r\r!RenamedEvent class methodsFor: 'instance creation' stamp: 'NS 1/27/2004 12:19'!\rclass: aClass category: cat oldName: oldName newName: newName\r\r\t^(self class: aClass category: cat) oldName: oldName; newName: newName! !\rAbstractEvent subclass: #ReorganizedEvent\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Change Notification'!\r\r!ReorganizedEvent methodsFor: 'testing' stamp: 'NS 1/27/2004 12:44'!\risReorganized\r\t^ true! !\r\r\r!ReorganizedEvent methodsFor: 'printing' stamp: 'NS 1/27/2004 12:44'!\rprintEventKindOn: aStream\r\r\taStream nextPutAll: 'Reorganized'! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rReorganizedEvent class\r\tinstanceVariableNames: ''!\r\r!ReorganizedEvent class methodsFor: 'accessing' stamp: 'NS 1/27/2004 12:46'!\rchangeKind\r\r\t^#Reorganized! !\r\r!ReorganizedEvent class methodsFor: 'accessing' stamp: 'NS 1/27/2004 12:46'!\rsupportedKinds\r\r\t^Array with: self classKind! !\rNotification subclass: #RequestAlternateSyntaxSetting\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Exceptions Kernel'!\r!RequestAlternateSyntaxSetting commentStamp: '<historical>' prior: 0!\rI provide a way to override the current setting of the alternate syntax preference. I am used when filing in code to insure that the Smalltalk-80 preference is used regardless of what the user likes to see in her browsers.!\r\r\r!RequestAlternateSyntaxSetting methodsFor: 'as yet unclassified' stamp: 'RAA 6/14/2000 13:41'!\rdefaultAction\r\r        self resume: Preferences printAlternateSyntax! !\rParseNode subclass: #ReturnNode\r\tinstanceVariableNames: 'expr'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Compiler'!\r!ReturnNode commentStamp: '<historical>' prior: 0!\rI represent an expression of the form ^expr.!\r\r\r!ReturnNode methodsFor: 'initialize-release'!\rexpr: e\r\r\texpr _ e! !\r\r!ReturnNode methodsFor: 'initialize-release'!\rexpr: e encoder: encoder sourceRange: range\r\r\texpr _ e.\r\tencoder noteSourceRange: range forNode: self! !\r\r\r!ReturnNode methodsFor: 'converting'!\rasReturnNode! !\r\r\r!ReturnNode methodsFor: 'testing'!\risReturnSelf\r\r\t^expr == NodeSelf! !\r\r!ReturnNode methodsFor: 'testing'!\risSpecialConstant\r\r\t^expr isSpecialConstant! !\r\r!ReturnNode methodsFor: 'testing'!\risVariableReference\r\r\t^expr isVariableReference! !\r\r\r!ReturnNode methodsFor: 'code generation'!\rcode\r\r\t^expr code! !\r\r!ReturnNode methodsFor: 'code generation'!\remitForReturn: stack on: strm\r\r\texpr emitForReturn: stack on: strm.\r\tpc _ strm position! !\r\r!ReturnNode methodsFor: 'code generation'!\remitForValue: stack on: strm\r\r\texpr emitForReturn: stack on: strm.\r\tpc _ strm position! !\r\r!ReturnNode methodsFor: 'code generation'!\rpc\r\t\"Used by encoder source mapping.\"\r\r\t^pc! !\r\r!ReturnNode methodsFor: 'code generation'!\rsizeForReturn: encoder\r\r\t^expr sizeForReturn: encoder! !\r\r!ReturnNode methodsFor: 'code generation'!\rsizeForValue: encoder\r\r\t^expr sizeForReturn: encoder! !\r\r\r!ReturnNode methodsFor: 'printing' stamp: 'di 6/11/2000 15:28'!\rprintOn: aStream indent: level\r\r\taStream dialect = #SQ00\r\t\tifTrue: [\"Add prefix keyword\"\r\t\t\t\taStream withStyleFor: #setOrReturn do: [aStream nextPutAll: 'Answer '].\r\t\t\t\texpr printOn: aStream indent: level]\r\t\tifFalse: [aStream nextPutAll: '^ '.\r\t\t\t\texpr printOn: aStream indent: level].\r\texpr printCommentOn: aStream indent: level.\r! !\rArrayedCollection subclass: #RunArray\r\tinstanceVariableNames: 'runs values lastIndex lastRun lastOffset'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Arrayed'!\r!RunArray commentStamp: '<historical>' prior: 0!\rMy instances provide space-efficient storage of data which tends to be constant over long runs of the possible indices. Essentially repeated values are stored singly and then associated with a \"run\" length that denotes the number of consecutive occurrences of the value.\r\rMy two important variables are\r\truns\tAn array of how many elements are in each run\r\tvalues\tAn array of what the value is over those elements\r\rThe variables lastIndex, lastRun and lastOffset cache the last access\rso that streaming through RunArrays is not an N-squared process.\r\rMany complexities of access can be bypassed by using the method\r\tRunArray withStartStopAndValueDo:!\r]style[(615 33)f1,f1LRunArray withStartStopAndValueDo:;!\r\r\r!RunArray methodsFor: 'accessing' stamp: 'di 1/15/1999 00:04'!\r= otherArray \r\t\"Test if all my elements are equal to those of otherArray\"\r\r\t(otherArray isMemberOf: RunArray) ifFalse: [^ self hasEqualElements: otherArray].\r\r\t\"Faster test between two RunArrays\"\r \t^ (runs hasEqualElements: otherArray runs)\r\t\tand: [values hasEqualElements: otherArray values]! !\r\r!RunArray methodsFor: 'accessing'!\rat: index\r\r\tself at: index setRunOffsetAndValue: [:run :offset :value | ^value]! !\r\r!RunArray methodsFor: 'accessing' stamp: 'ar 10/16/2001 18:56'!\rfirst\r\t^values at: 1! !\r\r!RunArray methodsFor: 'accessing' stamp: 'ar 10/16/2001 18:56'!\rlast\r\t^values at: values size! !\r\r!RunArray methodsFor: 'accessing'!\rrunLengthAt: index \r\t\"Answer the length remaining in run beginning at index.\"\r\r\tself at: index \r\t\tsetRunOffsetAndValue: [:run :offset :value | ^(runs at: run) - offset]! !\r\r!RunArray methodsFor: 'accessing'!\rsize\r\t| size |\r\tsize _ 0.\r\t1 to: runs size do: [:i | size _ size + (runs at: i)].\r\t^size! !\r\r!RunArray methodsFor: 'accessing' stamp: 'di 11/10/97 13:34'!\rwithStartStopAndValueDo: aBlock\r\t| start stop |\r\tstart _ 1.\r\truns with: values do:\r\t\t[:len : val | stop _ start + len - 1.\r\t\taBlock value: start value: stop value: val.\r\t\tstart _ stop + 1]\r\t\t! !\r\r\r!RunArray methodsFor: 'adding' stamp: 'ar 10/16/2001 18:47'!\raddFirst: value\r\t\"Add value as the first element of the receiver.\"\r\tlastIndex _ nil.  \"flush access cache\"\r\t(runs size=0 or: [values first ~= value])\r\t  ifTrue:\r\t\t[runs _ {1}, runs.\r\t\tvalues _ {value}, values]\r\t  ifFalse:\r\t\t[runs at: 1 put: runs first+1]! !\r\r!RunArray methodsFor: 'adding' stamp: 'ar 10/16/2001 20:25'!\raddLast: value\r\t\"Add value as the last element of the receiver.\"\r\tlastIndex _ nil.  \"flush access cache\"\r\t(runs size=0 or: [values last ~= value])\r\t  ifTrue:\r\t\t[runs _ runs copyWith: 1.\r\t\tvalues _ values copyWith: value]\r\t  ifFalse:\r\t\t[runs at: runs size put: runs last+1]! !\r\r!RunArray methodsFor: 'adding' stamp: 'ar 10/16/2001 18:47'!\raddLast: value  times: times\r\t\"Add value as the last element of the receiver, the given number of times\"\r\ttimes = 0 ifTrue: [ ^self ].\r\tlastIndex _ nil.  \"flush access cache\"\r\t(runs size=0 or: [values last ~= value])\r\t  ifTrue:\r\t\t[runs _ runs copyWith: times.\r\t\tvalues _ values copyWith: value]\r\t  ifFalse:\r\t\t[runs at: runs size put: runs last+times]! !\r\r!RunArray methodsFor: 'adding' stamp: 'tk 1/28/98 09:28'!\rcoalesce\r\t\"Try to combine adjacent runs\"\r\t| ind |\r\tind _ 2.\r\t[ind > values size] whileFalse: [\r\t\t(values at: ind-1) = (values at: ind) \r\t\t\tifFalse: [ind _ ind + 1]\r\t\t\tifTrue: [\"two are the same, combine them\"\r\t\t\t\tvalues _ values copyReplaceFrom: ind to: ind with: #().\r\t\t\t\truns at: ind-1 put: (runs at: ind-1) + (runs at: ind).\r\t\t\t\truns _ runs copyReplaceFrom: ind to: ind with: #().\r\t\t\t\t\"self error: 'needed to combine runs' \"]].\r\t\t\t! !\r\r!RunArray methodsFor: 'adding' stamp: 'BG 6/12/2003 11:07'!\rrangeOf: attr startingAt: startPos\r\t\"Answer an interval that gives the range of attr at index position  startPos. An empty interval with start value startPos is returned when the attribute attr is not present at position startPos.  self size > 0 is assumed, it is the responsibility of the caller to test for emptiness of self.\rNote that an attribute may span several adjancent runs. \"\r\r\tself at: startPos \r\t\tsetRunOffsetAndValue: \r            [:run :offset :value | \r               ^(value includes: attr)\r                  ifFalse: [startPos to: startPos - 1]\r                  ifTrue:\r                    [ | firstRelevantPosition lastRelevantPosition idxOfCandidateRun |\r                     lastRelevantPosition := startPos - offset + (runs at: run) - 1.\r                     firstRelevantPosition := startPos - offset.\r                     idxOfCandidateRun := run + 1.\r                     [idxOfCandidateRun <= runs size \r                             and: [(values at: idxOfCandidateRun) includes: attr]]\r                        whileTrue:\r                          [lastRelevantPosition := lastRelevantPosition + (runs at: idxOfCandidateRun).\r                           idxOfCandidateRun := idxOfCandidateRun + 1]. \r                     idxOfCandidateRun := run - 1.\r                     [idxOfCandidateRun >= 1 \r                             and: [(values at: idxOfCandidateRun) includes: attr]]\r                        whileTrue:\r                          [firstRelevantPosition := firstRelevantPosition - (runs at: idxOfCandidateRun).\r                           idxOfCandidateRun := idxOfCandidateRun - 1]. \r \r                    firstRelevantPosition to: lastRelevantPosition]\r\t\t  ]! !\r\r!RunArray methodsFor: 'adding' stamp: 'ar 10/16/2001 18:48'!\rrepeatLast: times  ifEmpty: defaultBlock\r\t\"add the last value back again, the given number of times.  If we are empty, add (defaultBlock value)\"\r\ttimes = 0 ifTrue: [^self ].\r\tlastIndex _ nil.  \"flush access cache\"\r\t(runs size=0)\r\t  ifTrue:\r\t\t[runs _ runs copyWith: times.\r\t\tvalues _ values copyWith: defaultBlock value]\r\t  ifFalse:\r\t\t[runs at: runs size put: runs last+times] ! !\r\r!RunArray methodsFor: 'adding' stamp: 'ar 10/16/2001 18:48'!\rrepeatLastIfEmpty: defaultBlock\r\t\"add the last value back again.  If we are empty, add (defaultBlock value)\"\r\tlastIndex _ nil.  \"flush access cache\"\r\t(runs size=0)\r\t  ifTrue:[\r\t\t runs _ runs copyWith: 1.\r\t\tvalues _ values copyWith: defaultBlock value]\r\t  ifFalse:\r\t\t[runs at: runs size put: runs last+1]! !\r\r\r!RunArray methodsFor: 'copying' stamp: 'ar 10/16/2001 18:57'!\r, aRunArray \r\t\"Answer a new RunArray that is a concatenation of the receiver and\r\taRunArray.\"\r\r\t| new newRuns |\r\t(aRunArray isMemberOf: RunArray)\r\t\tifFalse: \r\t\t\t[new _ self copy.\r\t\t\t\"attempt to be sociable\"\r\t\t\taRunArray do: [:each | new addLast: each].\r\t\t\t^new].\r\truns size = 0 ifTrue: [^aRunArray copy].\r\taRunArray runs size = 0 ifTrue: [^self copy].\r\t(values at: values size) ~= (aRunArray values at: 1)\r\t\tifTrue: [^RunArray\r\t\t\t\t\truns: runs , aRunArray runs\r\t\t\t\t\tvalues: values , aRunArray values].\r\tnewRuns _ runs\r\t\t\t\t\tcopyReplaceFrom: runs size\r\t\t\t\t\tto: runs size\r\t\t\t\t\twith: aRunArray runs.\r\tnewRuns at: runs size put: (runs at: runs size) + (aRunArray runs at: 1).\r\t^RunArray\r\t\truns: newRuns\r\t\tvalues: \r\t\t\t(values\r\t\t\t\tcopyReplaceFrom: values size\r\t\t\t\tto: values size\r\t\t\t\twith: aRunArray values)! !\r\r!RunArray methodsFor: 'copying' stamp: 'ls 10/10/1999 13:15'!\rcopyFrom: start to: stop\r\t| newRuns run1 run2 offset1 offset2 | \r\tstop < start ifTrue: [^RunArray new].\r\tself at: start setRunOffsetAndValue: [:r :o :value1 | run1 _ r. offset1\r_ o.  value1].\r\tself at: stop setRunOffsetAndValue: [:r :o :value2 | run2 _ r. offset2\r_ o. value2].\r\trun1 = run2\r\t\tifTrue: \r\t\t\t[newRuns _ Array with: offset2 - offset1 + 1]\r\t\tifFalse: \r\t\t\t[newRuns _ runs copyFrom: run1 to: run2.\r\t\t\tnewRuns at: 1 put: (newRuns at: 1) - offset1.\r\t\t\tnewRuns at: newRuns size put: offset2 + 1].\r\t^RunArray runs: newRuns values: (values copyFrom: run1 to: run2)! !\r\r!RunArray methodsFor: 'copying'!\rcopyReplaceFrom: start to: stop with: replacement\r\r\t^(self copyFrom: 1 to: start - 1)\r\t\t, replacement \r\t\t, (self copyFrom: stop + 1 to: self size)! !\r\r\r!RunArray methodsFor: 'printing' stamp: 'sma 6/1/2000 09:47'!\rprintOn: aStream\r\tself printNameOn: aStream.\r\taStream\r\t\tnextPutAll: ' runs: ';\r\t\tprint: runs;\r\t\tnextPutAll: ' values: ';\r\t\tprint: values! !\r\r!RunArray methodsFor: 'printing'!\rstoreOn: aStream\r\r\taStream nextPut: $(.\r\taStream nextPutAll: self class name.\r\taStream nextPutAll: ' runs: '.\r\truns storeOn: aStream.\r\taStream nextPutAll: ' values: '.\r\tvalues storeOn: aStream.\r\taStream nextPut: $)! !\r\r!RunArray methodsFor: 'printing'!\rwriteOn: aStream\r\r\taStream nextWordPut: runs size.\r\t1 to: runs size do:\r\t\t[:x |\r\t\taStream nextWordPut: (runs at: x).\r\t\taStream nextWordPut: (values at: x)]! !\r\r!RunArray methodsFor: 'printing' stamp: 'tk 12/16/97 09:18'!\rwriteScanOn: strm\r\t\"Write out the format used for text runs in source files. (14 50 312)f1,f1b,f1LInteger +;i\"\r\r\tstrm nextPut: $(.\r\truns do: [:rr | rr printOn: strm.  strm space].\r\tstrm skip: -1; nextPut: $).\r\tvalues do: [:vv |\r\t\tvv do: [:att | att writeScanOn: strm].\r\t\tstrm nextPut: $,].\r\tstrm skip: -1.  \"trailing comma\"! !\r\r\r!RunArray methodsFor: 'private'!\rat: index setRunOffsetAndValue: aBlock \r\t\"Supply all run information to aBlock.\"\r\t\"Tolerates index=0 and index=size+1 for copyReplace: \"\r\t| run limit offset |\r\tlimit _ runs size.\r\t(lastIndex == nil or: [index < lastIndex])\r\t\tifTrue:  \"cache not loaded, or beyond index - start over\"\r\t\t\t[run _ 1.\r\t\t\toffset _ index-1]\r\t\tifFalse:  \"cache loaded and before index - start at cache\"\r\t\t\t[run _ lastRun.\r\t\t\toffset _ lastOffset + (index-lastIndex)].\r\t[run <= limit and: [offset >= (runs at: run)]]\r\t\twhileTrue: \r\t\t\t[offset _ offset - (runs at: run).\r\t\t\trun _ run + 1].\r\tlastIndex _ index.  \"Load cache for next access\"\r\tlastRun _ run.\r\tlastOffset _ offset.\r\trun > limit\r\t\tifTrue: \r\t\t\t[\"adjustment for size+1\"\r\t\t\trun _ run - 1.\r\t\t\toffset _ offset + (runs at: run)].\r\t^aBlock\r\t\tvalue: run\t\"an index into runs and values\"\r\t\tvalue: offset\t\"zero-based offset from beginning of this run\"\r\t\tvalue: (values at: run)\t\"value for this run\"! !\r\r!RunArray methodsFor: 'private'!\rmapValues: mapBlock\r\t\"NOTE: only meaningful to an entire set of runs\"\r\tvalues _ values collect: [:val | mapBlock value: val]! !\r\r!RunArray methodsFor: 'private'!\rruns\r\r\t^runs! !\r\r!RunArray methodsFor: 'private' stamp: 'ar 10/16/2001 18:47'!\rsetRuns: newRuns setValues: newValues\r\tlastIndex _ nil.  \"flush access cache\"\r\truns _ newRuns asArray.\r\tvalues _ newValues asArray.! !\r\r!RunArray methodsFor: 'private'!\rvalues\r\t\"Answer the values in the receiver.\"\r\r\t^values! !\r\r\r!RunArray methodsFor: 'enumerating' stamp: 'ar 12/17/2001 00:00'!\rrunsFrom: start to: stop do: aBlock\r\t\"Evaluate aBlock with all existing runs in the range from start to stop\"\r\t| run value index |\r\tstart > stop ifTrue:[^self].\r\tself at: start setRunOffsetAndValue:[:firstRun :offset :firstValue|\r\t\trun _ firstRun.\r\t\tvalue _ firstValue.\r\t\tindex _ start + (runs at: run) - offset.\r\t\t[aBlock value: value.\r\t\tindex <= stop] whileTrue:[\r\t\t\trun _ run + 1.\r\t\t\tvalue _ values at: run.\r\t\t\tindex _ index + (runs at: run)]].\r! !\r\r\r!RunArray methodsFor: 'converting' stamp: 'BG 6/8/2003 15:17'!\rreversed\r\n\r\n  ^self class runs: runs reversed values: values reversed! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rRunArray class\r\tinstanceVariableNames: ''!\r\r!RunArray class methodsFor: 'instance creation' stamp: 'ar 10/16/2001 19:03'!\rnew\r\r\t^self runs: Array new values: Array new! !\r\r!RunArray class methodsFor: 'instance creation' stamp: 'ar 10/16/2001 19:04'!\rnew: size withAll: value \r\t\"Answer a new instance of me, whose every element is equal to the\r\targument, value.\"\r\r\tsize = 0 ifTrue: [^self new].\r\t^self runs: (Array with: size) values: (Array with: value)! !\r\r!RunArray class methodsFor: 'instance creation'!\rnewFrom: aCollection \r\t\"Answer an instance of me containing the same elements as aCollection.\"\r\r\t| newCollection |\r\tnewCollection _ self new.\r\taCollection do: [:x | newCollection addLast: x].\r\t^newCollection\r\r\"\tRunArray newFrom: {1. 2. 2. 3}\r\t{1. $a. $a. 3} as: RunArray\r\t({1. $a. $a. 3} as: RunArray) values\r\"! !\r\r!RunArray class methodsFor: 'instance creation'!\rreadFrom: aStream\r\t\"Answer an instance of me as described on the stream, aStream.\"\r\r\t| size runs values |\r\tsize _ aStream nextWord.\r\truns _ Array new: size.\r\tvalues _ Array new: size.\r\t1 to: size do:\r\t\t[:x |\r\t\truns at: x put: aStream nextWord.\r\t\tvalues at: x put: aStream nextWord].\r\t^ self runs: runs values: values! !\r\r!RunArray class methodsFor: 'instance creation'!\rruns: newRuns values: newValues \r\t\"Answer an instance of me with runs and values specified by the \r\targuments.\"\r\r\t| instance |\r\tinstance _ self basicNew.\r\tinstance setRuns: newRuns setValues: newValues.\r\t^instance! !\r\r!RunArray class methodsFor: 'instance creation' stamp: 'ssa 9/3/2008 11:15'!\rscanFrom: strm\r\t\"Read the style section of a fileOut or sources file.  nextChunk has already been done.  We need to return a RunArray of TextAttributes of various kinds.  These are written by the implementors of writeScanOn:\"\r\t| rr vv aa this |\r\t(strm peekFor: $( ) ifFalse: [^ nil].\r\trr _ OrderedCollection new.\r\t[strm skipSeparators.\r\t strm peekFor: $)] whileFalse: \r\t\t[rr add: (Number readFrom: strm)].\r\tvv _ OrderedCollection new.\t\"Value array\"\r\taa _ OrderedCollection new.\t\"Attributes list\"\r\t[(this _ strm next) == nil] whileFalse: [\r\t\tthis == $, ifTrue: [vv add: aa asArray.  aa _ OrderedCollection new].\r\t\tthis == $a ifTrue: [aa add: \r\t\t\t(TextAlignment new alignment: (Integer readFrom: strm))].\r\t\tthis == $f ifTrue: [aa add: \r\t\t\t(TextFontChange new fontNumber: (Integer readFrom: strm))].\r\t\tthis == $F ifTrue: [aa add: (TextFontReference new toFont: \r\t\t\t(StrikeFont familyName: (strm upTo: $#) size: (Integer readFrom: strm)))].\r\t\tthis == $b ifTrue: [aa add: (TextEmphasis bold)].\r\t\tthis == $i ifTrue: [aa add: (TextEmphasis italic)].\r\t\tthis == $u ifTrue: [aa add: (TextEmphasis underlined)].\r\t\tthis == $= ifTrue: [aa add: (TextEmphasis struckOut)].\r\t\tthis == $n ifTrue: [aa add: (TextEmphasis normal)].\r\t\tthis == $- ifTrue: [aa add: (TextKern kern: -1)].\r\t\tthis == $+ ifTrue: [aa add: (TextKern kern: 1)].\r\t\tthis == $c ifTrue: [aa add: (TextColor scanFrom: strm)]. \"color\"\r\t\tthis == $L ifTrue: [aa add: (TextLink scanFrom: strm)].\t\"L not look like 1\"\r\t\"\tthis == $R ifTrue: [aa add: (TextURL scanFrom: strm)].\"\r\t\t\t\t\"R capitalized so it can follow a number\"\r\t\"\tthis == $q ifTrue: [aa add: (TextSqkPageLink scanFrom: strm)]. \"\r\t\"\tthis == $p ifTrue: [aa add: (TextSqkProjectLink scanFrom: strm)]. \"\r\t\tthis == $P ifTrue: [aa add: (TextPrintIt scanFrom: strm)].\r\t\tthis == $d ifTrue: [aa add: (TextDoIt scanFrom: strm)].\r\t\t\"space, cr do nothing\"\r\t\t].\r\taa size > 0 ifTrue: [vv add: aa asArray].\r\t^ self runs: rr asArray values: vv asArray\r\"\rRunArray scanFrom: (ReadStream on: '(14 50 312)f1,f1b,f1LInteger +;i')\r\"! !\rNumber subclass: #ScaledDecimal\r\tinstanceVariableNames: 'fraction scale'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Numbers'!\r!ScaledDecimal commentStamp: '<historical>' prior: 0!\rScaledDecimal provides a numeric representation of fixed point decimal numbers able to accurately represent decimal fractions.  It supports unbounded precision, with no limit to the number of digits before and after the decimal point.\r\tScaledDecimal complies with the ANSI protocols:\r\r\tObject\r\tnumber\r\tScaledDecimal\r\t????\r#todo. \"finish protocol list.\"\r\rImplementation Notes:\r\r\tI implemented ScaledDecimal with the decimal fraction stored in instance variables numerator and denominator, and the number of digits after the decimal point in fractionalDigit as a positive Integer.  I implemented operations by first coercing the aurguments to fractions, doing the operations, then coercing the result to the proper numeric representation when necessary and scale.  This is because I assume the Fraction class is more likely to implement them correctly.  \r\rRichard A. Harmon\r!\r\r\r!ScaledDecimal methodsFor: 'converting' stamp: 'RAH 4/25/2000 19:49'!\radaptToFraction: receiver andSend: arithmeticOpSelector \r\t\"Convert me to a Fraction and do the arithmetic. \r\treceiver arithmeticOpSelector self.\"\r\t^ receiver perform: arithmeticOpSelector with: fraction! !\r\r!ScaledDecimal methodsFor: 'converting' stamp: 'RAH 4/25/2000 19:49'!\radaptToInteger: receiver andSend: arithmeticOpSelector \r\t\"Convert receiver to a ScaledDecimal and do the arithmetic. \r\treceiver arithmeticOpSelector self.\"\r\t^ (receiver asScaledDecimal: 0)\r\t\tperform: arithmeticOpSelector with: self! !\r\r!ScaledDecimal methodsFor: 'converting' stamp: 'RAH 4/25/2000 19:49'!\rasFloat\r\t\"Reimplementation - Number 'converting' method.\"\r\t^ fraction asFloat! !\r\r!ScaledDecimal methodsFor: 'converting' stamp: 'RAH 4/25/2000 19:49'!\rasFraction\r\t\"Implementation - Number 'converting' method.\"\r\t^ fraction! !\r\r!ScaledDecimal methodsFor: 'converting' stamp: 'RAH 4/25/2000 19:49'!\rasScaledDecimal: scaleIn \r\t\"Reimplementation - Number 'converting' method.\"\r\t^ ScaledDecimal newFromNumber: fraction scale: scaleIn! !\r\r\r!ScaledDecimal methodsFor: 'printing' stamp: 'RAH 4/25/2000 19:49'!\rprintOn: aStream \r\t\"Reimplementation - Object 'printing' method.\"\r\t| aFraction tmpFractionPart |\r\tself < 0 ifTrue: [aStream nextPut: $-].\r\taFraction := fraction abs.\r\taStream nextPutAll: aFraction truncated printString.\r\tscale = 0 ifTrue: [^ aStream nextPutAll: 's0'].\r\taStream nextPut: $..\r\ttmpFractionPart := aFraction fractionPart.\r\t1 to: scale\r\t\tdo: \r\t\t\t[:dummy | \r\t\t\ttmpFractionPart := tmpFractionPart * 10.\r\t\t\taStream nextPut: (Character digitValue: tmpFractionPart truncated).\r\t\t\ttmpFractionPart := tmpFractionPart fractionPart].\r\taStream nextPut: $s.\r\tscale printOn: aStream! !\r\r!ScaledDecimal methodsFor: 'printing' stamp: 'RAH 4/25/2000 19:49'!\rprintString\r\t\"Reimplementation - Number 'printing' method.\"\r\t| tempStream |\r\ttempStream := WriteStream on: (String new: 10).\r\tself printOn: tempStream.\r\t^ tempStream contents! !\r\r\r!ScaledDecimal methodsFor: 'arithmetic' stamp: 'AFi 11/23/2002 19:12'!\r* operand \r\t\"Implementation of Number 'arithmetic' method.\"\r\t(operand isKindOf: ScaledDecimal) ifTrue: [^ ScaledDecimal newFromNumber: fraction * operand asFraction scale: (scale max: operand scale)].\r\t^ operand adaptToScaledDecimal: self andSend: #*! !\r\r!ScaledDecimal methodsFor: 'arithmetic' stamp: 'AFi 11/23/2002 19:12'!\r+ operand \r\t\"Implementation of Number 'arithmetic' method.\"\r\t(operand isKindOf: ScaledDecimal) ifTrue: [^ ScaledDecimal newFromNumber: fraction + operand asFraction scale: (scale max: operand scale)].\r\t^ operand adaptToScaledDecimal: self andSend: #+! !\r\r!ScaledDecimal methodsFor: 'arithmetic' stamp: 'AFi 11/23/2002 19:12'!\r- operand \r\t\"Implementation of Number 'arithmetic' method.\"\r\t(operand isKindOf: ScaledDecimal) ifTrue: [^ ScaledDecimal newFromNumber: fraction - operand asFraction scale: (scale max: operand scale)].\r\t^ operand adaptToScaledDecimal: self andSend: #-! !\r\r!ScaledDecimal methodsFor: 'arithmetic' stamp: 'AFi 11/23/2002 19:12'!\r/ operand \r\t\"Implementation of Number 'arithmetic' method.\"\r\t#ScalDec.\r\t\"Protocol: ANSI <number>.\"\r\toperand = 0 ifTrue: [^ (ZeroDivide dividend: self) signal].\r\t(operand isKindOf: ScaledDecimal) ifTrue: [^ ScaledDecimal newFromNumber: fraction / operand asFraction scale: (scale max: operand scale)].\r\t^ operand adaptToScaledDecimal: self andSend: #/! !\r\r!ScaledDecimal methodsFor: 'arithmetic' stamp: 'RAH 4/25/2000 19:49'!\r// operand \r\t\"Answer the integer quotient after dividing the receiver by operand \r\twith truncation towards negative infinity.\"\r\t^ fraction // operand! !\r\r!ScaledDecimal methodsFor: 'arithmetic' stamp: 'RAH 4/25/2000 19:49'!\rnegated\r\t\"Reimplementation of Number 'arithmetic' method.\"\r\t^ ScaledDecimal newFromNumber: fraction negated scale: scale! !\r\r!ScaledDecimal methodsFor: 'arithmetic' stamp: 'RAH 4/25/2000 19:49'!\rreciprocal\r\t\"Reimplementation of Number 'arithmetic' method.\"\r\tself = 0 ifTrue: [^ (ZeroDivide dividend: 1) signal].\r\t^ ScaledDecimal newFromNumber: fraction reciprocal scale: scale! !\r\r\r!ScaledDecimal methodsFor: 'truncation and round off' stamp: 'RAH 4/25/2000 19:49'!\rfractionPart\r\t\"Answer the fractional part of the receiver.\"\r\t^ ScaledDecimal newFromNumber: fraction fractionPart scale: scale! !\r\r!ScaledDecimal methodsFor: 'truncation and round off' stamp: 'RAH 4/25/2000 19:49'!\rintegerPart\r\t\"Answer the fractional part of the receiver.\"\r\t^ ScaledDecimal newFromNumber: fraction integerPart scale: scale! !\r\r!ScaledDecimal methodsFor: 'truncation and round off' stamp: 'RAH 4/25/2000 19:49'!\rtruncated\r\t\"Reimplementation of Number 'truncation and round off' method.\"\r\t^ fraction truncated! !\r\r\r!ScaledDecimal methodsFor: 'comparing' stamp: 'AFi 11/23/2002 19:12'!\r< operand \r\t\"Implementation of Number 'comparing' method.\"\r\t(operand isKindOf: ScaledDecimal) ifTrue: [^ fraction < operand asFraction].\r\t^ operand adaptToScaledDecimal: self andSend: #<! !\r\r!ScaledDecimal methodsFor: 'comparing' stamp: 'AFi 11/23/2002 19:13'!\r= comparand \r\t\"Implementation of Number 'comparing' method.\"\r\tcomparand isNumber ifFalse: [^ false].\r\t(comparand isKindOf: ScaledDecimal) ifTrue: [^ fraction = comparand asFraction].\r\t^ comparand adaptToScaledDecimal: self andSend: #=! !\r\r!ScaledDecimal methodsFor: 'comparing' stamp: 'RAH 4/25/2000 19:49'!\rhash\r\t\"Reimplementation of Object 'comparing' method.\"\r\t^ fraction hash! !\r\r!ScaledDecimal methodsFor: 'comparing' stamp: 'RAH 4/25/2000 19:49'!\risZero\r\t\"Answer whether the receiver is equal to its class' zero\"\r\t^ fraction numerator = 0! !\r\r\r!ScaledDecimal methodsFor: 'private' stamp: 'RAH 4/25/2000 19:49'!\rdenominator\r\t\"Private - Answer an Integer, the denominator part of the receiver.\"\r\t^ fraction denominator! !\r\r!ScaledDecimal methodsFor: 'private' stamp: 'RAH 4/25/2000 19:49'!\rnumerator\r\t\"Private - Answer an Integer, the numerator part of the receiver.\"\r\t^ fraction numerator! !\r\r!ScaledDecimal methodsFor: 'private' stamp: 'RAH 4/25/2000 19:49'!\rscale\r\t\"Private - Answer a integer which represents the total number of digits \r\tused to represent the fraction part of the receiver, including trailing \r\tzeroes. \"\r\t^ scale! !\r\r!ScaledDecimal methodsFor: 'private' stamp: 'RAH 4/25/2000 19:49'!\rsetFraction: fractionIn scale: scaleIn \r\t\"Private - Set the fraction to fractionIn and the total number of digits \r\tused to represent the fraction part of the receiver, including trailing \r\tzeroes, to the Integer scaleIn.\"\r\tfraction := fractionIn.\r\tscale := scaleIn! !\r\r\r!ScaledDecimal methodsFor: 'mathematical functions' stamp: 'RAH 4/25/2000 19:49'!\rsquared\r\t\"Reimplementation - Number 'mathematical functions' method.\"\r\t\"not used ->\"\r\t^ ScaledDecimal newFromNumber: fraction squared scale: scale! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rScaledDecimal class\r\tinstanceVariableNames: ''!\r\r!ScaledDecimal class methodsFor: 'instance creation' stamp: 'RAH 4/25/2000 19:49'!\rnewFromNumber: aNumber scale: scaleIn \r\t\"Answer a new instance of me.\"\r\t| temp |\r\ttemp := self basicNew.\r\ttemp setFraction: aNumber asFraction scale: scaleIn.\r\t^ temp! !\r\r\r!ScaledDecimal class methodsFor: 'constants' stamp: 'RAH 4/25/2000 19:49'!\rone\r\t\"Answer the receiver's representation of one.\"\r\t^ self newFromNumber: 1 scale: 0! !\r\r!ScaledDecimal class methodsFor: 'constants' stamp: 'RAH 4/25/2000 19:49'!\rzero\r\t\"Answer the receiver's representation of zero.\"\r\t^ self newFromNumber: 0 scale: 0! !\rObject subclass: #Scanner\r\tinstanceVariableNames: 'source mark hereChar aheadChar token tokenType currentComment buffer typeTable'\r\tclassVariableNames: 'TypeTable'\r\tpoolDictionaries: ''\r\tcategory: 'System-Compiler'!\r!Scanner commentStamp: '<historical>' prior: 0!\rI scan a string or text, picking out Smalltalk syntactic tokens. I look one character ahead. I put each token found into the instance variable, token, and its type (a Symbol) into the variable, tokenType. At the end of the input stream, I pretend to see an endless sequence of special characters called doits.!\r\r\r!Scanner methodsFor: 'initialize-release'!\rinitScanner\r\r\tbuffer _ WriteStream on: (String new: 40).\r\ttypeTable _ TypeTable! !\r\r!Scanner methodsFor: 'initialize-release'!\rscan: inputStream \r\t\"Bind the input stream, fill the character buffers and first token buffer.\"\r\r\tsource _ inputStream.\r\tself step.\r\tself step.\r\tself scanToken! !\r\r\r!Scanner methodsFor: 'public access'!\rscanFieldNames: stringOrArray\r\t\"Answer an Array of Strings that are the identifiers in the input string, \r\tstringOrArray. If passed an Array, just answer with that Array, i.e., \r\tassume it has already been scanned.\"\r\r\t| strm |\r\t(stringOrArray isMemberOf: Array)\r\t\tifTrue: [^stringOrArray].\r\tself scan: (ReadStream on: stringOrArray asString).\r\tstrm _ WriteStream on: (Array new: 10).\r\t[tokenType = #doIt]\r\t\twhileFalse: \r\t\t\t[tokenType = #word ifTrue: [strm nextPut: token].\r\t\t\tself scanToken].\r\t^strm contents\r\r\t\"Scanner new scanFieldNames: 'abc  def ghi' ('abc' 'def' 'ghi' )\"! !\r\r!Scanner methodsFor: 'public access'!\rscanTokens: textOrString \r\t\"Answer an Array that has been tokenized as though the input text, \r\ttextOrString, had appeared between the array delimitors #( and ) in a \r\tSmalltalk literal expression.\"\r\r\tself scan: (ReadStream on: textOrString asString).\r\tself scanLitVec.\r\t^token\r\r\t\"Scanner new scanTokens: 'identifier keyword: 8r31 ''string'' .'\"! !\r\r\r!Scanner methodsFor: 'expression types'!\radvance\r\r\t| prevToken |\r\tprevToken _ token.\r\tself scanToken.\r\t^prevToken! !\r\r!Scanner methodsFor: 'expression types' stamp: 'di 4/23/2000 22:15'!\rcheckpoint\r\t\"Return a copy of all changeable state.  See revertToCheckpoint:\"\r\r\t^ {self clone. source clone. currentComment copy}! !\r\r!Scanner methodsFor: 'expression types' stamp: 'di 4/23/2000 22:11'!\rrevertToCheckpoint: checkpoint\r\t\"Revert to the state when checkpoint was made.\"\r\r\t| myCopy |\r\tmyCopy _ checkpoint first.\r\t1 to: self class instSize do:\r\t\t[:i | self instVarAt: i put: (myCopy instVarAt: i)].\r\tsource _ checkpoint second.\r\tcurrentComment _ checkpoint third! !\r\r!Scanner methodsFor: 'expression types' stamp: 'avi 2/16/2004 21:28'!\rscanLitVec\r\r\t| s |\r\ts _ WriteStream on: (Array new: 16).\r\t[tokenType = #rightParenthesis or: [tokenType = #doIt]]\r\t\twhileFalse: \r\t\t\t[tokenType = #leftParenthesis\r\t\t\t\tifTrue: \r\t\t\t\t\t[self scanToken; scanLitVec]\r\t\t\t\tifFalse: \r\t\t\t\t\t[tokenType = #word | (tokenType = #keyword) | (tokenType = #colon)\r\t\t\t\t\t\tifTrue: \r\t\t\t\t\t\t\t[self scanLitWord.\r\t\t\t\t\t\t\ttoken = #true ifTrue: [token _ true].\r\t\t\t\t\t\t\ttoken = #false ifTrue: [token _ false].\r\t\t\t\t\t\t\ttoken = #nil ifTrue: [token _ nil]]\r\t\t\t\t\t\tifFalse:\r\t\t\t\t\t\t\t[(token == #- \r\t\t\t\t\t\t\t\t\tand: [(typeTable at: hereChar asciiValue) = #xDigit])\r\t\t\t\t\t\t\t\tifTrue: \r\t\t\t\t\t\t\t\t\t[self scanToken.\r\t\t\t\t\t\t\t\t\ttoken _ token negated]]].\r\t\t\ts nextPut: token.\r\t\t\tself scanToken].\r\ttoken _ s contents! !\r\r!Scanner methodsFor: 'expression types'!\rscanLitWord\r\t\"Accumulate keywords and asSymbol the result.\"\r\r\t| t |\r\t[(typeTable at: hereChar asciiValue) = #xLetter]\r\t\twhileTrue: \r\t\t\t[t _ token.\r\t\t\tself xLetter.\r\t\t\ttoken _ t , token].\r\ttoken _ token asSymbol! !\r\r!Scanner methodsFor: 'expression types'!\rscanToken\r\r\t[(tokenType _ typeTable at: hereChar asciiValue) == #xDelimiter]\r\t\twhileTrue: [self step].  \"Skip delimiters fast, there almost always is one.\"\r\tmark _ source position - 1.\r\t(tokenType at: 1) = $x \"x as first letter\"\r\t\tifTrue: [self perform: tokenType \"means perform to compute token & type\"]\r\t\tifFalse: [token _ self step asSymbol \"else just unique the first char\"].\r\t^token! !\r\r!Scanner methodsFor: 'expression types'!\rstep\r\r\t| c |\r\tc _ hereChar.\r\thereChar _ aheadChar.\r\tsource atEnd\r\t\tifTrue: [aheadChar _ 30 asCharacter \"doit\"]\r\t\tifFalse: [aheadChar _ source next].\r\t^c! !\r\r\r!Scanner methodsFor: 'multi-character scans' stamp: 'SqR 8/23/2000 16:20'!\rxBinary\r\r\ttokenType _ #binary.\r\ttoken _ self step asSymbol.\r\t[(typeTable at: hereChar asciiValue) = #xBinary and: [hereChar ~= $-]]\r\t\twhileTrue: [token _ (token , (String with: self step)) asSymbol]! !\r\r!Scanner methodsFor: 'multi-character scans' stamp: 'md 11/14/2003 17:14'!\rxColon\t\t\"Allow := for assignment by converting to #_ \"\r\taheadChar = $= ifTrue:\r\t\t[self step.\r\t\ttokenType _ #leftArrow.\r\t\tself step.\r\t\t^ token _ #'_'].\r\t\"Otherwise, just do what normal scan of colon would do\"\r\ttokenType _ #colon.\r\t^ token _ self step asSymbol! !\r\r!Scanner methodsFor: 'multi-character scans'!\rxDelimiter\r\t\"Ignore blanks, etc.\"\r\r\tself scanToken! !\r\r!Scanner methodsFor: 'multi-character scans' stamp: 'tao 4/23/98 12:55'!\rxDigit\r\t\"Form a number.\"\r\r\ttokenType _ #number.\r\t(aheadChar = 30 asCharacter and: [source atEnd\r\t\t\tand:  [source skip: -1. source next ~= 30 asCharacter]])\r\t\tifTrue: [source skip: -1 \"Read off the end last time\"]\r\t\tifFalse: [source skip: -2].\r\ttoken _ [Number readFrom: source] ifError: [:err :rcvr | self offEnd: err].\r\tself step; step! !\r\r!Scanner methodsFor: 'multi-character scans'!\rxDollar\r\t\"Form a Character literal.\"\r\r\tself step. \"pass over $\"\r\ttoken _ self step.\r\ttokenType _ #number \"really should be Char, but rest of compiler doesn't know\"! !\r\r!Scanner methodsFor: 'multi-character scans' stamp: 'wod 1/10/98 00:43'!\rxDoubleQuote\r    \"Collect a comment.\"\r    \"wod 1/10/98: Allow 'empty' comments by testing the first character\rfor $\"\" rather than blindly adding it to the comment being collected.\"\r    | aStream stopChar |\r    stopChar _ 30 asCharacter.\r    aStream _ WriteStream on: (String new: 200).\r    self step.\r    [hereChar == $\"]\r        whileFalse:\r            [(hereChar == stopChar and: [source atEnd])\r                ifTrue: [^self offEnd: 'Unmatched comment quote'].\r            aStream nextPut: self step.].\r    self step.\r    currentComment == nil\r        ifTrue: [currentComment _ OrderedCollection with: aStream\rcontents]\r        ifFalse: [currentComment add: aStream contents].\r    self scanToken! !\r\r!Scanner methodsFor: 'multi-character scans' stamp: 'di 4/22/2000 16:36'!\rxLetter\r\t\"Form a word or keyword.\"\r\r\t| type |\r\tbuffer reset.\r\t[(type _ typeTable at: hereChar asciiValue) == #xLetter or: [type == #xDigit]]\r\t\twhileTrue:\r\t\t\t[\"open code step for speed\"\r\t\t\tbuffer nextPut: hereChar.\r\t\t\thereChar _ aheadChar.\r\t\t\tsource atEnd\r\t\t\t\tifTrue: [aheadChar _ 30 asCharacter \"doit\"]\r\t\t\t\tifFalse: [aheadChar _ source next]].\r\t(type == #colon or: [type == #xColon and: [aheadChar ~= $=]])\r\t\tifTrue: \r\t\t\t[buffer nextPut: self step.\r\t\t\t[\"Allow any number of embedded colons in literal symbols\"\r\t\t\t(typeTable at: hereChar asciiValue) == #xColon]\r\t\t\t\twhileTrue: [buffer nextPut: self step].\r\t\t\ttokenType _ #keyword]\r\t\tifFalse: \r\t\t\t[tokenType _ #word].\r\ttoken _ buffer contents! !\r\r!Scanner methodsFor: 'multi-character scans' stamp: 'hmm 7/18/2001 21:55'!\rxLitQuote\r\t\"Symbols and vectors: #(1 (4 5) 2 3) #ifTrue:ifFalse: #'abc'.\"\r\r\t| start |\r\tstart _ mark.\r\tself step. \"litQuote\"\r\tself scanToken.\r\ttokenType = #leftParenthesis\r\t\tifTrue: \r\t\t\t[self scanToken; scanLitVec.\r\t\t\tmark _ start+1.\r\t\t\ttokenType == #doIt\r\t\t\t\tifTrue: [self offEnd: 'Unmatched parenthesis']]\r\t\tifFalse: \r\t\t\t[(#(word keyword colon ) includes: tokenType) \r\t\t\t\tifTrue:\r\t\t\t\t\t[self scanLitWord]\r\t\t\t\tifFalse:\r\t\t\t\t\t[(tokenType==#literal)\r\t\t\t\t\t\tifTrue:\r\t\t\t\t\t\t\t[(token isMemberOf: Symbol)\r\t\t\t\t\t\t\t\tifTrue: \"##word\"\r\t\t\t\t\t\t\t\t\t[token _ token \"May want to move toward ANSI here\"]]\r\t\t\t\t\t\tifFalse:\r\t\t\t\t\t\t\t[tokenType==#string ifTrue: [token _ token asSymbol]]]].\r\tmark _ start.\r\ttokenType _ #literal\r\r\"\t#(Pen)\r\t#Pen\r\t#'Pen'\r\t##Pen\r\t###Pen\r\"! !\r\r!Scanner methodsFor: 'multi-character scans'!\rxSingleQuote\r\t\"String.\"\r\r\tself step.\r\tbuffer reset.\r\t[hereChar = $' \r\t\tand: [aheadChar = $' \r\t\t\t\tifTrue: [self step. false]\r\t\t\t\tifFalse: [true]]]\r\t\twhileFalse: \r\t\t\t[buffer nextPut: self step.\r\t\t\t(hereChar = 30 asCharacter and: [source atEnd])\r\t\t\t\tifTrue: [^self offEnd: 'Unmatched string quote']].\r\tself step.\r\ttoken _ buffer contents.\r\ttokenType _ #string! !\r\r\r!Scanner methodsFor: 'error handling'!\rnotify: string \r\t\"Refer to the comment in Object|notify:.\" \r\tself error: string! !\r\r!Scanner methodsFor: 'error handling'!\roffEnd: aString \r\t\"Parser overrides this\"\r\r\t^self notify: aString! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rScanner class\r\tinstanceVariableNames: ''!\r\r!Scanner class methodsFor: 'class initialization' stamp: 'dgd 8/24/2003 14:55'!\rinitialize\r\t| newTable |\r\tnewTable _ Array new: 256 withAll: #xBinary. \"default\"\r\tnewTable atAll: #(9 10 12 13 32 ) put: #xDelimiter. \"tab lf ff cr space\"\r\tnewTable atAll: ($0 asciiValue to: $9 asciiValue) put: #xDigit.\r\r\t1 to: 255\r\t\tdo: [:index |\r\t\t\t(Character value: index) isLetter\r\t\t\t\tifTrue: [newTable at: index put: #xLetter]].\r\r\tnewTable at: 30 put: #doIt.\r\tnewTable at: $\" asciiValue put: #xDoubleQuote.\r\tnewTable at: $# asciiValue put: #xLitQuote.\r\tnewTable at: $$ asciiValue put: #xDollar.\r\tnewTable at: $' asciiValue put: #xSingleQuote.\r\tnewTable at: $: asciiValue put: #xColon.\r\tnewTable at: $( asciiValue put: #leftParenthesis.\r\tnewTable at: $) asciiValue put: #rightParenthesis.\r\tnewTable at: $. asciiValue put: #period.\r\tnewTable at: $; asciiValue put: #semicolon.\r\tnewTable at: $[ asciiValue put: #leftBracket.\r\tnewTable at: $] asciiValue put: #rightBracket.\r\tnewTable at: ${ asciiValue put: #leftBrace.\r\tnewTable at: $} asciiValue put: #rightBrace.\r\tnewTable at: $^ asciiValue put: #upArrow.\r\tnewTable at: $_ asciiValue put: #leftArrow.\r\tnewTable at: $| asciiValue put: #verticalBar.\r\tTypeTable _ newTable \"bon voyage!!\"\r\r\t\"Scanner initialize\"! !\r\r\r!Scanner class methodsFor: 'instance creation'!\rnew\r\r\t^super new initScanner! !\r\r\r!Scanner class methodsFor: 'testing' stamp: 'bf 4/27/2000 12:56'!\risLiteralSymbol: aSymbol \r\t\"Test whether a symbol can be stored as # followed by its characters.  \r\tSymbols created internally with asSymbol may not have this property, \r\te.g. '3' asSymbol.\"\r\t| i ascii type |\r\ti _ aSymbol size.\r\ti = 0 ifTrue: [^ false].\r\ti = 1 ifTrue: [('$''\"()#0123456789' includes: (aSymbol at: 1))\r\t\tifTrue: [^ false] ifFalse: [^ true]].\r\tascii _ (aSymbol at: 1) asciiValue.\r\t\"TypeTable should have been origined at 0 rather than 1 ...\"\r\tascii = 0 ifTrue: [^ false].\r\ttype _ TypeTable at: ascii.\r\t(type == #xColon or: [type == #verticalBar]) ifTrue: [^ i = 1].\r\ttype == #xBinary ifTrue: \r\t\t\t[[i > 1]\r\t\t\t\twhileTrue: \r\t\t\t\t\t[ascii _ (aSymbol at: i) asciiValue.\r\t\t\t\t\tascii = 0 ifTrue: [^ false].\r\t\t\t\t\t(TypeTable at: ascii) == #xBinary ifFalse: [^ false].\r\t\t\t\t\ti _ i - 1].\r\t\t\t^ true].\r\ttype == #xLetter ifTrue: \r\t\t\t[[i > 1]\r\t\t\t\twhileTrue: \r\t\t\t\t\t[ascii _ (aSymbol at: i) asciiValue.\r\t\t\t\t\tascii = 0 ifTrue: [^ false].\r\t\t\t\t\ttype _ TypeTable at: ascii.\r\t\t\t\t\t(type == #xLetter or: [type == #xDigit or: [type == #xColon]])\r\t\t\t\t\t\tifFalse: [^ false].\r\t\t\t\t\ti _ i - 1].\r\t\t\t^ true].\r\t^ false! !\rTimespan subclass: #Schedule\r\tinstanceVariableNames: 'schedule'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Chronology'!\r!Schedule commentStamp: 'brp 5/13/2003 09:48' prior: 0!\rI represent a powerful class for implementing recurring schedules.!\r\r\r!Schedule methodsFor: 'enumerating' stamp: 'brp 5/13/2003 09:50'!\rbetween: aStart and: anEnd do: aBlock\r\r\n\t| element end i |\r\tend _ self end min: anEnd.\r\telement _ self start.\n\t\r\ti _ 1.\r\t[ element < aStart ] whileTrue:\r\t\n\t[ element _ element + (schedule at: i).\r\n\t\ti _ i + 1. (i > schedule size) ifTrue: [i _ 1]].\r\n\ti _ 1.\r\n\t[ element <= end ] whileTrue:\r\t\n\t[ aBlock value: element.\r\t\telement _ element + (schedule at: i).\r\n\t\ti _ i + 1.\r\t\t(i > schedule size) ifTrue: [i _ 1]]\n.\r! !\r\r!Schedule methodsFor: 'enumerating' stamp: 'brp 5/13/2003 09:50'!\rschedule\r\t^ schedule\n! !\r\r!Schedule methodsFor: 'enumerating' stamp: 'brp 5/13/2003 09:50'!\rschedule: anArrayOfDurations\r\r\tschedule _ anArrayOfDurations\n! !\r\r!Schedule methodsFor: 'enumerating' stamp: 'brp 5/13/2003 09:51'!\rscheduleDo: aBlock\r\r\tself between: (self start) and: (self end) do: aBlock.\n! !\r\r\r!Schedule methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 09:38'!\rincludes: aDateAndTime\r\r\n\t| dt |\r\n\tdt _ aDateAndTime asDateAndTime.\r\n\tself scheduleDo: [ :e | e = dt ifTrue: [^true] ].\r\n\t^ false.\n! !\rController subclass: #ScreenController\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'LastScreenModeSelected'\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-ST80 Remnants'!\r!ScreenController commentStamp: '<historical>' prior: 0!\rI am the controller for the parts of the display screen that have no view on them. I only provide a standard yellow button menu. I view (a FormView of) an infinite gray form.  (ScheduledControllers screenController) is the way to find me.!\r\r\r!ScreenController methodsFor: 'control defaults' stamp: 'sma 3/11/2000 12:21'!\rcontrolActivity\r\t\"Any button opens the screen's menu.\r\tIf the shift key is down, do find window.\"\r\r\tsensor leftShiftDown ifTrue: [^ self findWindow].\r\t(self projectScreenMenu invokeOn: self) ifNil: [super controlActivity]! !\r\r!ScreenController methodsFor: 'control defaults' stamp: 'sma 3/11/2000 12:06'!\risControlActive\r\t^ self isControlWanted! !\r\r!ScreenController methodsFor: 'control defaults' stamp: 'sma 3/11/2000 12:05'!\risControlWanted\r\t^ self viewHasCursor and: [sensor anyButtonPressed]! !\r\r\r!ScreenController methodsFor: 'menu messages' stamp: 'sw 2/15/1999 16:18'!\raboutThisSystem \r\tSmalltalk aboutThisSystem! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'sw 6/11/1999 20:25'!\rbitCachingString\r\t^ StandardSystemView cachingBits\r\t\tifTrue: ['don''t save bits (compact)']\r\t\tifFalse: ['save bits (fast)']! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'sd 5/23/2003 15:17'!\rbrowseChangedMessages\r\tChangeSet  browseChangedMessages! !\r\r!ScreenController methodsFor: 'menu messages'!\rbrowseRecentLog\r\t\"Open a changelist browser on changes submitted since the last snapshot.  1/17/96 sw\"\r\r\tChangeList browseRecentLog! !\r\r!ScreenController methodsFor: 'menu messages'!\rbrowseRecentSubmissions\r\t\"Open a method-list browser on recently-submitted methods.  5/16/96 sw\"\r\r\tUtilities browseRecentSubmissions! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'sw 6/11/1999 20:50'!\rchangeWindowPolicy\r\tPreferences toggleWindowPolicy! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'tk 4/13/1998 23:12'!\rchooseDirtyBrowser\r\t\"Put up a list of browsers with unsubmitted edits and activate the one selected by the user, if any.\"\r\t\"ScheduledControllers screenController chooseDirtyBrowser\"\r\r\tScheduledControllers findWindowSatisfying:\r\t\t[:c | (c model isKindOf: Browser) and: [c model canDiscardEdits not]].\r ! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'tk 4/13/1998 23:13'!\rchooseDirtyWindow\r\t\"Put up a list of windows with unaccepted edits and let the user chose one to activate.\"\r\t\"ScheduledControllers screenController chooseDirtyWindow\"\r\r\tScheduledControllers findWindowSatisfying:\r\t\t[:c | c model canDiscardEdits not].\r! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'tk 4/13/1998 23:13'!\rcloseUnchangedWindows\r\t\"Close any window that doesn't have unaccepted input.\"\r\r\t| clean |\r\t(SelectionMenu confirm:\r'Do you really want to close all windows\rexcept those with unaccepted edits?')\r\t\tifFalse: [^ self].\r\r\tclean _ ScheduledControllers scheduledControllers select:\r\t\t[:c | c model canDiscardEdits and: [(c isKindOf: ScreenController) not]].\r\tclean do: [:c | c closeAndUnscheduleNoTerminate].\r\tself restoreDisplay.\r! !\r\r!ScreenController methodsFor: 'menu messages'!\rcollapseAll\r\t\"Collapses all open windows\"\r\tScheduledControllers scheduledControllers do:\r\t\t[:controller | controller == self ifFalse:\r\t\t\t[controller view isCollapsed ifFalse:\r\t\t\t\t\t[controller collapse.\r\t\t\t\t\tcontroller view deEmphasize]]]! !\r\r!ScreenController methodsFor: 'menu messages'!\rcommonRequests \r\t\"Put up a popup of common requests, and perform whatever the user request.  2/1/96 sw\"\r\tUtilities offerCommonRequests! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'sw 12/10/1999 11:29'!\rconfigureFonts\r\tPreferences presentMvcFontConfigurationMenu! !\r\r!ScreenController methodsFor: 'menu messages'!\reditPreferences\r\t\"Open up a Preferences inspector.  2/7/96 sw\"\r\r\tPreferences openPreferencesInspector! !\r\r!ScreenController methodsFor: 'menu messages'!\remergencyCollapse\r\t\"Emergency collapse of a selected window\"\r\t| controller |\r\t(controller _ ScheduledControllers windowFromUser) notNil\r\t\tifTrue:\r\t\t\t[controller collapse.\r\t\t\tcontroller view deEmphasize]! !\r\r!ScreenController methodsFor: 'menu messages'!\rexpandAll\r\t\"Reopens all collapsed windows\"\r\tScheduledControllers scheduledControllers reverseDo:\r\t\t[:controller | controller == self ifFalse:\r\t\t\t[controller view isCollapsed\r\t\t\t\tifTrue:  [controller view expand]\r\t\t\t\tifFalse: [controller view displayDeEmphasized]]]! !\r\r!ScreenController methodsFor: 'menu messages'!\rfastWindows\r\tStandardSystemView cachingBits\r\t\tifTrue: [StandardSystemView dontCacheBits]\r\t\tifFalse: [StandardSystemView doCacheBits]! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'sw 2/3/2000 16:23'!\rfileForRecentLog\r\tSmalltalk writeRecentToFile! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'sd 1/16/2004 21:32'!\rfileOutChanges\r\tChangeSet current verboseFileOut.! !\r\r!ScreenController methodsFor: 'menu messages'!\rfindWindow\r\t\"Put up a menu of all windows on the screen, and let the user select one.\r\t 1/18/96 sw: the real work devolved to ControlManager>>findWindowSatisfying:\"\r\r\tScheduledControllers findWindowSatisfying: [:c | true]! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'nk 6/17/2003 14:39'!\rfontSizeSummary\r\tTextStyle fontSizeSummary! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'sd 6/7/2003 19:49'!\rfullScreenOff\r\r\tDisplay fullScreenMode: (LastScreenModeSelected _ false).\r\tDisplayScreen checkForNewScreenSize.\r\tself restoreDisplay.\r! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'sd 6/7/2003 19:49'!\rfullScreenOn\r\r\tDisplay fullScreenMode: (LastScreenModeSelected _ true).\r\tDisplayScreen checkForNewScreenSize.\r\tself restoreDisplay.! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'nk 2/15/2004 09:37'!\rgarbageCollect\r\t\"Do a garbage collection, and report results to the user.\"\r\r\tUtilities garbageCollectAndReport! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'jm 5/20/1998 23:28'!\rjumpToProject\r\r\tProject jumpToProject.\r! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'sd 5/23/2003 14:41'!\rlookForSlips\r\tChangeSet current lookForSlips! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'sw 7/18/1999 20:54'!\rlookUpDefinition\r\tUtilities lookUpDefinition! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'sw 9/4/1998 10:17'!\rnewChangeSet\r\tChangeSorter newChangeSet! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'tk 4/6/98 23:14'!\ropenBrowser \r\t\"Create and schedule a Browser view for browsing code.\"\r\r\tBrowser openBrowser! !\r\r!ScreenController methodsFor: 'menu messages'!\ropenChangeManager\r\t\"Open a dual change sorter.  For looking at two change sets at once.\"\r\tDualChangeSorter new open! !\r\r!ScreenController methodsFor: 'menu messages'!\ropenCommandKeyHelp\r\t\"1/18/96 sw Open a window that explains command-keys\"\r\r\tUtilities openCommandKeyHelp! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'sw 6/9/1999 12:30'!\ropenFile\r\tFileList openFileDirectly! !\r\r!ScreenController methodsFor: 'menu messages'!\ropenFileList\r\t\"Create and schedule a FileList view for specifying files to access.\"\r\r\tFileList open! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'ar 1/31/2001 17:06'!\ropenPackageBrowser \r\t\"Create and schedule a Browser view for browsing code.\"\r\r\tPackagePaneBrowser openBrowser! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'ssa 9/4/2008 15:11'!\ropenProcessBrowser\r\t\"Create and schedule\"\r\r\tProcessBrowser  open! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'sw 4/24/2001 12:00'!\ropenProject \r\t\"Create and schedule a Project.\"\r\r\t| proj |\r\tSmalltalk at: #ProjectView ifPresent:\r\t\t[:c | proj _ Project new.\r\t\tc open: proj].\r! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'tk 8/31/1998 16:18'!\ropenSelectorBrowser\r\t\"Create and schedule a selector fragment window.\"\r\r\tSelectorBrowser new open! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'sw 7/6/1998 18:59'!\ropenSimpleChangeSorter\r\tChangeSorter new open! !\r\r!ScreenController methodsFor: 'menu messages'!\ropenStandardWorkspace\r\t\"Open a standard, throwaway window chock full of useful expressions.  1/17/96 sw\"\r\r\tUtilities openStandardWorkspace! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'di 5/8/1998 12:49'!\ropenTranscript \r\t\"Create and schedule the System Transcript.\"\r\tTranscript open! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'tk 5/4/1998 17:25'!\ropenWorkspace \r\t\"Create and schedule workspace.\"\r\r\tWorkspace open! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'sd 11/16/2003 14:17'!\rquit\r\tSmalltalkImage current\r\t\tsnapshot:\r\t\t\t(self confirm: 'Save changes before quitting?' translated\r\t\t\t\torCancel: [^ self])\r\t\tandQuit: true! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'ssa 9/3/2008 11:12'!\rrestoreDisplay \r\t\"Clear the screen to gray and then redisplay all the scheduled views.\"\r\r\tDisplay extent = DisplayScreen actualScreenSize\r\t\tifFalse:\r\t\t\t[DisplayScreen startUp.\r\t\t\tScheduledControllers unCacheWindows].\r\tScheduledControllers restore! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'jm 5/22/1998 06:45'!\rreturnToPreviousProject\r\r\tProject returnToPreviousProject.\r! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'sd 11/16/2003 13:17'!\rsaveAs\r\t^ SmalltalkImage current saveAs! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'sw 5/10/96'!\rsetAuthorInitials\r\t\"Put up a dialog allowing the user to specify the author's initials.  \"\r\tUtilities setAuthorInitials! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'sw 11/26/96'!\rsetDesktopColor\r\t\"Let the user choose a new color for the desktop.   Based on an idea by Georg Gollmann.   \"\r\r\tPreferences desktopColor: Color fromUser.\r\tScheduledControllers updateGray; restore! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'bf 9/18/1999 20:01'!\rsetDisplayDepth\r\t\"Let the user choose a new depth for the display. \"\r\t| result |\r\t(result _ (SelectionMenu selections: Display supportedDisplayDepths) startUpWithCaption: 'Choose a display depth\r(it is currently ' , Display depth printString , ')') == nil ifFalse:\r\t\t[Display newDepth: result]! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'sd 11/16/2003 14:17'!\rsnapshot\r\tSmalltalkImage current snapshot: true andQuit: false! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'sd 11/16/2003 14:17'!\rsnapshotAndQuit\r\t\"Snapshot and quit without bother the user further.  2/4/96 sw\"\r\r\tSmalltalkImage current\r\t\tsnapshot: true\r\t\tandQuit: true! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'sw 6/11/1999 20:01'!\rsoundEnablingString\r\t^ Preferences soundEnablingString! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'bf 3/16/2000 18:26'!\rsoundOnOrOff\r\tPreferences setPreference: #soundsEnabled\r\t\ttoValue: Preferences soundsEnabled not! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'sw 6/11/1999 20:23'!\rstaggerPolicyString\r\t^ Preferences staggerPolicyString! !\r\r!ScreenController methodsFor: 'menu messages' stamp: 'sd 9/30/2003 13:53'!\rvmStatistics\r\t\"Open a string view on a report of vm statistics\"\r\r\t(StringHolder new contents: SmalltalkImage current  vmStatisticsReportString)\r\t\topenLabel: 'VM Statistics'! !\r\r\r!ScreenController methodsFor: 'cursor'!\rcenterCursorInView\r\t\"Override so this doesn't happen when taking control\"! !\r\r\r!ScreenController methodsFor: 'nested menus' stamp: 'BG 10/30/2003 21:19'!\rappearanceMenu \r\t\"Answer the appearance menu to be put up as a screen submenu\"\r\r\t^ SelectionMenu labelList:\r\t\t#('system fonts...'\r\t\t\t'full screen on'\r\t\t\t'full screen off'\r\t\t\t'set display depth...'\r\t\t\t'set desktop color...' ) \r\r\t\tlines: #(1 3)\r\t\tselections: #( configureFonts\rfullScreenOn fullScreenOff setDisplayDepth setDesktopColor)\r\"\rScreenController new appearanceMenu startUp\r\"! !\r\r!ScreenController methodsFor: 'nested menus' stamp: 'BG 10/30/2003 20:39'!\rchangesMenu\r\n\t\"Answer a menu for changes-related items\"\r\n\t^ SelectionMenu labelList:\r\n\t\t#(\t'simple change sorter'\r\n\t\t\t'dual change sorter'\r\n\r\n\t\t\t'file out current change set'\r\n\t\t\t'create new change set...'\r\n\t\t\t'browse changed methods'\r\n\t\t\t'check change set for slips'\r\n\r\n\t\t\r\n\t\t\t'browse recent submissions'\r\n\t\t\t'recently logged changes...'\r\n\t\t\t'recent log file...'\r\n\t\t\t)\r\n\t\tlines: #(2 6 )\r\n\t\tselections: #(\r\nopenSimpleChangeSorter openChangeManager\r\nfileOutChanges newChangeSet browseChangedMessages lookForSlips\r\nbrowseRecentSubmissions browseRecentLog fileForRecentLog)\r\n\"\r\nScreenController new changesMenu startUp\r\n\"! !\r\r!ScreenController methodsFor: 'nested menus' stamp: 'BG 11/2/2003 20:57'!\rhelpMenu \r\n\t\"Answer the help menu to be put up as a screen submenu\"\r\n\r\n\t^ SelectionMenu labelList:\r\n\t\t#(\t'about this system...'\r\n\t\t\t'preferences...'\r\n\r\n\t\t\t'command-key help'\r\n\t\t\t'font size summary'\r\n\t\t\t'useful expressions'\r\n\t\t\t'view graphical imports'),\r\n\r\n\t\t\t(Array with: (Preferences soundsEnabled\r\n\t\t\t\t\t\t\tifFalse: ['turn sound on']\r\n\t\t\t\t\t\t\tifTrue: ['turn sound off'])) ,\r\n\r\n\t\t#(\t'definition for...'\r\n\t\t\t'set author initials...'\r\n\t\t\t'vm statistics'\r\n\t\t\t'space left')\r\n\t\tlines: #(2 4 8)\r\n\t\tselections: #( aboutThisSystem \r\neditPreferences  openCommandKeyHelp fontSizeSummary openStandardWorkspace viewImageImports\r\n soundOnOrOff  lookUpDefinition setAuthorInitials vmStatistics garbageCollect)\r\n\"\r\nScreenController new helpMenu startUp\r\n\"! !\r\r!ScreenController methodsFor: 'nested menus' stamp: 'ssa 9/4/2008 15:11'!\ropenMenu\r\n\t^ SelectionMenu labelList:\r\n\t\t#(\t'browser'\r\n\t\t\t'package browser'\r\n\t\t\t'method finder'\r\t\t\t'process browser'\r\n\t\t\t'workspace'\r\n\t\t\t'file list'\r\n\t\t\t'file...'\r\n\t\t\t'transcript'\r\n\r\n\t\t\t'simple change sorter'\r\n\t\t\t'dual change sorter'\r\n\r\n\t\t\t'mvc project'\r\n\t\t\t)\r\n\t\tlines: #(8 10 )\r\n\t\tselections: #(\r\nopenBrowser openPackageBrowser openSelectorBrowser openProcessBrowser openWorkspace openFileList openFile openTranscript \r\nopenSimpleChangeSorter openChangeManager\r\nopenProject    )\r\n\"\r\nScreenController  new openMenu startUp\r\n\"! !\r\r!ScreenController methodsFor: 'nested menus' stamp: 'sma 3/11/2000 12:23'!\rpopUpMenuFor: aSymbol\r\t(self perform: aSymbol) invokeOn: self! !\r\r!ScreenController methodsFor: 'nested menus' stamp: 'sw 7/13/1999 18:07'!\rpresentAppearanceMenu\r\tself popUpMenuFor: #appearanceMenu! !\r\r!ScreenController methodsFor: 'nested menus' stamp: 'sw 7/6/1998 21:14'!\rpresentChangesMenu\r\tself popUpMenuFor: #changesMenu! !\r\r!ScreenController methodsFor: 'nested menus' stamp: 'sw 7/6/1998 21:15'!\rpresentHelpMenu\r\tself popUpMenuFor: #helpMenu! !\r\r!ScreenController methodsFor: 'nested menus' stamp: 'sw 7/6/1998 21:15'!\rpresentOpenMenu\r\tself popUpMenuFor: #openMenu! !\r\r!ScreenController methodsFor: 'nested menus' stamp: 'sw 7/6/1998 21:16'!\rpresentWindowMenu\r\tself popUpMenuFor: #windowMenu! !\r\r!ScreenController methodsFor: 'nested menus' stamp: 'BG 10/28/2003 10:38'!\rprojectScreenMenu\r\n\t\"Answer the project screen menu.\"\r\n\r\n\t^ SelectionMenu labelList:\r\n\t\t#(\t'previous project'\r\n\t\t\t'jump to project...'\r\n\t\t\t'restore display'\r\n\r\n\t\t\t'open...'\r\n\t\t\t'windows...'\r\n\t\t\t'changes...'\r\n\t\t\t'help...'\r\n\t\t\t'appearance...'\r\n\t\t\t'do...'\r\n\r\n\t\t\t'save'\r\n\t\t\t'save as...'\r\n\t\t\t'save and quit'\r\n\t\t\t'quit')\r\n\t\tlines: #(3 9)\r\n\t\tselections: #(\r\nreturnToPreviousProject jumpToProject restoreDisplay\r\npresentOpenMenu presentWindowMenu presentChangesMenu presentHelpMenu presentAppearanceMenu commonRequests\r\nsnapshot saveAs snapshotAndQuit quit )\r\n\"\r\nScreenController new projectScreenMenu startUp\r\n\"! !\r\r!ScreenController methodsFor: 'nested menus' stamp: 'BG 10/28/2003 10:57'!\rwindowMenu\r\n\t\"Answer a menu for windows-related items.  \"\r\n\r\n\t^ SelectionMenu labelList:\r\n\t\t#(\t'find window...'\r\n\t\t\t'find changed browsers...'\r\n\t\t\t'find changed windows...'\r\n\r\n\t\t\t'collapse all windows'\r\n\t\t\t'expand all windows'\r\n\t\t\t'close unchanged windows' ) , \r\n\t\t\t(Array\r\n\t\t\t\twith: self bitCachingString\r\n\t\t\t\twith: self staggerPolicyString)\r\n\t\tlines: #(3 6)\r\n\t\tselections: #(\r\nfindWindow chooseDirtyBrowser chooseDirtyWindow\r\ncollapseAll expandAll closeUnchangedWindows\r\nfastWindows changeWindowPolicy)\r\n\"\r\nScreenController new windowMenu startUp\r\n\"! !\r\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rScreenController class\r\tinstanceVariableNames: ''!\r\r!ScreenController class methodsFor: 'as yet unclassified' stamp: 'RAA 7/15/2000 09:28'!\rlastScreenModeSelected\r\r\t^LastScreenModeSelected! !\rMouseMenuController subclass: #ScrollController\r\tinstanceVariableNames: 'scrollBar marker savedArea menuBar savedMenuBarArea'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-ST80 Remnants'!\r!ScrollController commentStamp: '<historical>' prior: 0!\rI represent control for scrolling using a scrollBar. I am a MouseMenuController that creates a scrollBar, rather than menus. My subclasses add the button menus. I keep control as long as the cursor is inside the view or the scrollBar area.\r\t\rA scrollBar is a rectangular area representing the length of the information being viewed. It contains an inner rectangle whose top y-coordinate represents the relative position of the information visible on the screen with respect to all of the information, and whose size represents the relative amount of that information visible on the screen. The user controls which part of the information is visible by pressing the red button. If the cursor is to the right of the inner rectangle, the window onto the visible information moves upward, if the cursor is to the left, the window moves downward, and if the cursor is inside, the inner rectangle is grabbed and moved to a desired position.!\r\r\r!ScrollController methodsFor: 'initialize-release'!\rinitialize\r\tsuper initialize.\r\tscrollBar _ Quadrangle new.\r\tscrollBar borderWidthLeft: 2 right: 0 top: 2 bottom: 2.\r\tmarker _ Quadrangle new.\r\tmarker insideColor: Preferences scrollBarColor.\r\tmenuBar _ Quadrangle new.\r\tmenuBar borderWidthLeft:  2 right: 0 top: 2 bottom: 2.! !\r\r\r!ScrollController methodsFor: 'basic control sequence'!\rcontrolInitialize\r\t\"Recompute scroll bars.  Save underlying image unless it is already saved.\"\r\t| |\r\tsuper controlInitialize.\r\tscrollBar region: (0 @ 0 extent: 24 @ view apparentDisplayBox height).\r\tscrollBar insideColor: view backgroundColor.\r\tmarker region: self computeMarkerRegion.\r\tscrollBar _ scrollBar align: scrollBar topRight with: view apparentDisplayBox topLeft.\r\tmarker _ marker align: marker topCenter with: self upDownLine @ (scrollBar top + 2).\r\tsavedArea isNil ifTrue: [savedArea _ Form fromDisplay: scrollBar].\r\tscrollBar displayOn: Display.\r\r\t\"Show a border around yellow-button (menu) region\"\r\"\r\tyellowBar _ Rectangle left: self yellowLine right: scrollBar right + 1\r\t\ttop: scrollBar top bottom: scrollBar bottom.\r\tDisplay border: yellowBar width: 1 mask: Form veryLightGray.\r\"\r\tself moveMarker\r! !\r\r!ScrollController methodsFor: 'basic control sequence'!\rcontrolTerminate\r\r\tsuper controlTerminate.\r\tsavedArea notNil \t\r\t\tifTrue: \r\t\t\t[savedArea displayOn: Display at: scrollBar topLeft.\r\t\t\tsavedArea _ nil].! !\r\r\r!ScrollController methodsFor: 'control defaults' stamp: 'sma 3/11/2000 15:17'!\rcontrolActivity\r\tself scrollByKeyboard ifTrue: [^ self].\r\tself scrollBarContainsCursor\r\t\tifTrue: [self scroll]\r\t\tifFalse: [self normalActivity]! !\r\r!ScrollController methodsFor: 'control defaults' stamp: 'ar 3/24/2000 00:45'!\risControlActive \r\tsuper isControlActive ifTrue: [^ true].\r\tsensor blueButtonPressed ifTrue: [^ false].\r\t^ (scrollBar inside merge: view insetDisplayBox) containsPoint: sensor cursorPoint! !\r\r!ScrollController methodsFor: 'control defaults' stamp: 'sma 3/11/2000 15:31'!\risControlWanted\r\t^ self viewHasCursor! !\r\r!ScrollController methodsFor: 'control defaults' stamp: 'sma 3/11/2000 15:16'!\rnormalActivity\r\tsuper controlActivity! !\r\r\r!ScrollController methodsFor: 'scrolling'!\ranyButtonActivity\r\t\"deal with red button down in scrollBar beyond yellowLine\"\r\r\tself yellowButtonActivity! !\r\r!ScrollController methodsFor: 'scrolling'!\rdownLine\r\t\"if cursor before downLine, display down cursor and scroll down on button down\"\r\r\t^scrollBar left + 6 ! !\r\r!ScrollController methodsFor: 'scrolling' stamp: 'ls 7/11/1998 06:33'!\rscroll\r\t\"Check to see whether the user wishes to jump, scroll up, or scroll down.\"\r\t| savedCursor |\r\tsavedCursor _ sensor currentCursor.\r\t\t\t[self scrollBarContainsCursor]\r\t\t\t\twhileTrue: \r\t\t\t\t\t[self interActivityPause.\r\t\t\t\t\tsensor cursorPoint x <= self downLine\r\t\t\t\t\t\t\t\tifTrue: [self scrollDown]\r\t\t\t\t\t\t\t\tifFalse: [sensor cursorPoint x <= self upLine\r\t\t\t\t\t\t\t\t\t\tifTrue: [self scrollAbsolute]\r\t\t\t\t\t\t\t\t\t\tifFalse: [sensor cursorPoint x <= self yellowLine\r\t\t\t\t\t\t\t\t\t\t\t\tifTrue: [self scrollUp]\r\t\t\t\t\t\t\t\t\t\t\t\tifFalse: [sensor cursorPoint x <= scrollBar right\r\t\t\t\t\t\t\t\t\t\t\t\t\t\tifTrue: \"Might not be, with touch pen\"\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t[self changeCursor: Cursor menu.\r\t\t\t\t\t\t\t\t\t\t\t\t\t\tsensor anyButtonPressed \r\t\t\t\t\t\t\t\t\t\t\t\t\t\tifTrue: [self changeCursor: savedCursor. \r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tself anyButtonActivity]]]]]].\r\tsavedCursor show! !\r\r!ScrollController methodsFor: 'scrolling'!\rscrollAmount\r\t\"Answer the number of bits of y-coordinate should be scrolled. This is a \r\tdefault determination based on the view's preset display transformation.\"\r\r\t^((view inverseDisplayTransform: sensor cursorPoint)\r\t\t- (view inverseDisplayTransform: scrollBar inside topCenter)) y! !\r\r!ScrollController methodsFor: 'scrolling' stamp: 'th 12/11/1999 16:57'!\rscrollByKeyboard\r\t| keyEvent |\r\tkeyEvent _ sensor keyboardPeek.\r\tkeyEvent ifNil: [^ false].\r\t(sensor controlKeyPressed or:[sensor commandKeyPressed]) ifFalse: [^ false].\r\tkeyEvent asciiValue = 30\r\t\tifTrue: \r\t\t\t[sensor keyboard.\r\t\t\tself scrollViewDown ifTrue: [self moveMarker].\r\t\t\t^ true].\r\tkeyEvent asciiValue = 31\r\t\tifTrue: \r\t\t\t[sensor keyboard.\r\t\t\tself scrollViewUp ifTrue: [self moveMarker].\r\t\t\t^ true].\r\t^ false! !\r\r!ScrollController methodsFor: 'scrolling'!\rscrollView\r\t\"The scroll bar jump method was used so that the view should be \r\tupdated to correspond to the location of the scroll bar gray area.\r\tReturn true only if scrolling took place.\"\r\t^ self scrollView: self viewDelta! !\r\r!ScrollController methodsFor: 'scrolling'!\rscrollView: anInteger \r\t\"Tell the reciever's view to scroll by anInteger amount.\r\tReturn true only if scrolling actually resulted.\"\r\t(view scrollBy: 0 @ \r\t\t\t\t((anInteger min: view window top - view boundingBox top)\r\t\t\t\t\t\tmax: view window top - view boundingBox bottom))\r\t\tifTrue: [view clearInside; display.  ^ true]\r\t\tifFalse: [^ false]! !\r\r!ScrollController methodsFor: 'scrolling'!\rscrollViewDown\r\t\"Scroll the receiver's view down the default amount.\r\tReturn true only if scrolling actually took place.\"\r\t^ self scrollView: self scrollAmount! !\r\r!ScrollController methodsFor: 'scrolling'!\rscrollViewUp\r\t\"Scroll the receiver's view up the default amount.\r\tReturn true only if scrolling actually took place.\"\r\t^ self scrollView: self scrollAmount negated! !\r\r!ScrollController methodsFor: 'scrolling'!\rupDownLine\r\t\"Check to see whether the user wishes to jump, scroll up, or scroll down.\"\r\r\t^scrollBar left + 12! !\r\r!ScrollController methodsFor: 'scrolling'!\rupLine\r\t\"if cursor beyond upLine, display up cursor and scroll up on button down\"\r\r\t^scrollBar left + 12! !\r\r!ScrollController methodsFor: 'scrolling'!\rviewDelta\r\t\"Answer an integer that indicates how much the view should be scrolled. \r\tThe scroll bar has been moved and now the view must be so the amount \r\tto scroll is computed as a ratio of the current scroll bar position.\"\r\r\t^view window top - view boundingBox top -\r\t\t((marker top - scrollBar inside top) asFloat /\r\t\t\tscrollBar inside height asFloat *\r\t\t\t\tview boundingBox height asFloat) rounded! !\r\r!ScrollController methodsFor: 'scrolling'!\ryellowLine\r\t\"Check to see whether the user wishes to jump, scroll up, or scroll down.\"\r\r\t^scrollBar left + 16! !\r\r\r!ScrollController methodsFor: 'cursor'!\rchangeCursor: aCursor \r\t\"The current cursor should be set to be aCursor.\"\r\r\tsensor currentCursor ~~ aCursor ifTrue: [aCursor show]! !\r\r!ScrollController methodsFor: 'cursor'!\rmarkerContainsCursor\r\t\"Answer whether the gray area inside the scroll bar area contains the \r\tcursor.\"\r\r\t^marker inside containsPoint: sensor cursorPoint! !\r\r!ScrollController methodsFor: 'cursor'!\rmenuBarContainsCursor\r\t\"Answer whether the cursor is anywhere within the menu bar area.\"\r\r\t^ menuBar notNil and:\r\t\t\t[menuBar containsPoint: sensor cursorPoint]! !\r\r!ScrollController methodsFor: 'cursor'!\rscrollBarContainsCursor\r\t\"Answer whether the cursor is anywhere within the scroll bar area.\"\r\r\t^scrollBar containsPoint: sensor cursorPoint! !\r\r\r!ScrollController methodsFor: 'marker adjustment'!\rcomputeMarkerRegion\r\t\"Answer the rectangular area in which the gray area of the scroll bar \r\tshould be displayed.\"\r\r\t^0@0 extent: Preferences scrollBarWidth @\r\t\t\t((view window height asFloat /\r\t\t\t\t\t\tview boundingBox height *\r\t\t\t\t\t\t\tscrollBar inside height)\r\t\t\t\t rounded min: scrollBar inside height)! !\r\r!ScrollController methodsFor: 'marker adjustment'!\rmarkerDelta\r\t^ marker top \r\t\t- scrollBar inside top  \r\t\t- ((view window top - view boundingBox top) asFloat \r\t\t\t/ view boundingBox height asFloat *\r\t\t\t\tscrollBar inside height asFloat) rounded! !\r\r!ScrollController methodsFor: 'marker adjustment'!\rmarkerRegion: aRectangle \r\t\"Set the area defined by aRectangle as the marker. Fill it with gray tone.\"\r\r\tDisplay fill: marker fillColor: scrollBar insideColor.\r\tmarker region: aRectangle.\r\tmarker _ marker align: marker topCenter \r\t\t\twith: self upDownLine @ (scrollBar top + 2) ! !\r\r!ScrollController methodsFor: 'marker adjustment'!\rmoveMarker\r\t\"The view window has changed. Update the marker.\"\r\r\tself moveMarker: self markerDelta negated anchorMarker: nil! !\r\r!ScrollController methodsFor: 'marker adjustment'!\rmoveMarker: anInteger anchorMarker: anchorMarker\r\t\"Update the marker so that is is translated by an amount corresponding to \r\ta distance of anInteger, constrained within the boundaries of the scroll \r\tbar.  If anchorMarker ~= nil, display the border around the area where the\r\tmarker first went down.\"\r\r\tDisplay fill: marker fillColor: scrollBar insideColor.\r\tanchorMarker = nil\r\t\tifFalse: [Display border: anchorMarker width: 1 fillColor: Color gray].\r\tmarker _ marker translateBy: 0 @\r\t\t\t\t((anInteger min: scrollBar inside bottom - marker bottom) max:\r\t\t\t\t\tscrollBar inside top - marker top).\r\tmarker displayOn: Display! !\r\r!ScrollController methodsFor: 'marker adjustment'!\rmoveMarkerTo: aRectangle \r\t\"Same as markerRegion: aRectangle; moveMarker, except a no-op if the marker\r\t would not move.\"\r\r\t(aRectangle height = marker height and: [self viewDelta = 0]) ifFalse:\r\t\t[self markerRegion: aRectangle.\r\t\tself moveMarker]! !\r\r\r!ScrollController methodsFor: 'private'!\rscrollAbsolute\r\t| markerOutline oldY markerForm |\r\tself changeCursor: Cursor rightArrow.\r\r\toldY _ -1.\r\tsensor anyButtonPressed ifTrue: \r\t  [markerOutline _ marker deepCopy.\r\t  markerForm _ Form fromDisplay: marker.\r\t  Display fill: marker fillColor: scrollBar insideColor.\r\t  Display border: markerOutline width: 1 fillColor: Color gray.\r\t  markerForm \r\t\tfollow: \r\t\t\t[oldY ~= sensor cursorPoint y\r\t\t\t\tifTrue: \r\t\t\t\t\t[oldY _ sensor cursorPoint y.\r\t\t\t\t\tmarker _ marker translateBy: \r\t\t\t\t\t  0 @ ((oldY - marker center y \r\t\t\t\t\t\tmin: scrollBar inside bottom - marker bottom) \r\t\t\t\t\t\tmax: scrollBar inside top - marker top).\r\t\t\t\t\tself scrollView].\r\t\t\t\tmarker origin] \r\t\twhile: [sensor anyButtonPressed].\r\r\t  Display fill: markerOutline fillColor: scrollBar insideColor.\r\t  self moveMarker]! !\r\r!ScrollController methodsFor: 'private'!\rscrollDown\r\t| markerForm firstTime |\r\tself changeCursor: Cursor down.\r\tsensor anyButtonPressed ifTrue:\r\t  [markerForm _ Form fromDisplay: marker.\r\t  Display fill: marker fillColor: scrollBar insideColor.\r\t  firstTime _ true.\r\t  markerForm \r\t\tfollow: \r\t\t\t[self scrollViewDown ifTrue:\r\t\t\t\t[marker _ marker translateBy: 0 @\r\t\t\t\t\t((self markerDelta negated \r\t\t\t\t\t\tmin: scrollBar inside bottom - marker bottom) \r\t\t\t\t\t\tmax: scrollBar inside top - marker top).\r\t\t\t\tfirstTime\r\t\t\t\t\tifTrue: [\r\t\t\t\t\t\t\"pause before scrolling repeatedly\"\r\t\t\t\t\t\t(Delay forMilliseconds: 250) wait.\r\t\t\t\t\t\tfirstTime _ false.\r\t\t\t\t\t] ifFalse: [\r\t\t\t\t\t\t(Delay forMilliseconds: 50) wait.\r\t\t\t\t\t].\r\t\t\t\t].\r\t\t\tmarker origin] \r\t\twhile: [sensor anyButtonPressed].\r\t  self moveMarker.]! !\r\r!ScrollController methodsFor: 'private'!\rscrollUp\r\t| markerForm firstTime |\r\tself changeCursor: Cursor up.\r\tsensor anyButtonPressed ifTrue:\r\t  [markerForm _ Form fromDisplay: marker.\r\t  Display fill: marker fillColor: scrollBar insideColor.\r\t  firstTime _ true.\r\t  markerForm \r\t\tfollow: \r\t\t\t[self scrollViewUp ifTrue:\r\t\t\t\t[marker _ marker translateBy: 0 @\r\t\t\t\t\t((self markerDelta negated \r\t\t\t\t\t\tmin: scrollBar inside bottom - marker bottom) \r\t\t\t\t\t\tmax: scrollBar inside top - marker top).\r\t\t\t\tfirstTime\r\t\t\t\t\tifTrue: [\r\t\t\t\t\t\t\"pause before scrolling repeatedly\"\r\t\t\t\t\t\t(Delay forMilliseconds: 250) wait.\r\t\t\t\t\t\tfirstTime _ false.\r\t\t\t\t\t] ifFalse: [\r\t\t\t\t\t\t(Delay forMilliseconds: 50) wait.\r\t\t\t\t\t].\r\t\t\t\t].\r\t\t\tmarker origin] \r\t\twhile: [sensor anyButtonPressed].\r\t  self moveMarker.]! !\rCompositionScanner subclass: #SegmentScanner\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: 'TextConstants'\r\tcategory: 'Graphics-Text'!\r\r!SegmentScanner methodsFor: 'as yet unclassified' stamp: 'ar 5/18/2000 16:48'!\rsetFont\r\tsuper setFont.\r\t\"Make a local copy of stop conditions so we don't modify the default\"\r\tstopConditions == DefaultStopConditions \r\t\tifTrue:[stopConditions _ stopConditions copy].\r\tstopConditions at: Space asciiValue + 1 put: nil.! !\rPopUpMenu subclass: #SelectionMenu\r\tinstanceVariableNames: 'selections'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Menus'!\r\r!SelectionMenu methodsFor: 'accessing' stamp: 'sma 5/28/2000 11:38'!\rselections\r\t^ selections! !\r\r!SelectionMenu methodsFor: 'accessing' stamp: 'sma 5/28/2000 11:38'!\rselections: selectionArray\r\tselections _ selectionArray! !\r\r\r!SelectionMenu methodsFor: 'basic control sequence' stamp: 'sma 5/28/2000 15:28'!\rinvokeOn: targetObject\r\t\"Pop up this menu and return the result of sending to the target object \r\tthe selector corresponding to the menu item selected by the user. Return \r\tnil if no item is selected.\"\r\r\t| sel |\r\tsel _ self startUp.\r\tsel = nil ifFalse: [^ targetObject perform: sel].\r\t^ nil\r\r\"Example:\r\t(SelectionMenu labels: 'sin\rcos\rneg' lines: #() selections: #(sin cos negated)) invokeOn: 0.7\"! !\r\r!SelectionMenu methodsFor: 'basic control sequence' stamp: 'sw 12/17/2001 17:26'!\rstartUpWithCaption: captionOrNil at: location allowKeyboard: aBoolean\r\t\"Overridden to return value returned by manageMarker.  The boolean parameter indicates whether the menu should be given keyboard focus (if in morphic)\"\r\r\t| index |\r\tindex _ super startUpWithCaption: captionOrNil at: location allowKeyboard: aBoolean.\r\t(selections = nil or: [(index between: 1 and: selections size) not])\r\t\tifTrue: [^ nil].\r\t^ selections at: index! !\r\r\r!SelectionMenu methodsFor: 'invocation' stamp: 'sw 11/18/2002 16:24'!\rinvokeOn: targetObject orSendTo: anObject\r\t\"Pop up the receiver, obtaining a selector; return the result of having the target object perform the selector.  If it dos not understand the selector, give the alternate object a chance\"\r\r\t| aSelector |\r\t^ (aSelector _ self startUp) ifNotNil:\r\t\t[(targetObject respondsTo: aSelector)\r\t\t\tifTrue:\r\t\t\t\t[targetObject perform: aSelector]\r\t\t\tifFalse:\r\t\t\t\t[anObject perform: aSelector]]! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rSelectionMenu class\r\tinstanceVariableNames: ''!\r\r!SelectionMenu class methodsFor: 'instance creation' stamp: 'sw 11/8/1999 17:52'!\rfromArray: anArray\r\t\"Construct a menu from anArray.  The elements of anArray must be either:\r\t*  A pair of the form: <label> <selector>\ror\t*  The 'dash' (or 'minus sign') symbol\r\r\tRefer to the example at the bottom of the method\"\r\r\t| labelList lines selections anIndex |\r\tlabelList _ OrderedCollection new.\r\tlines _ OrderedCollection new.\r\tselections _ OrderedCollection new.\r\tanIndex _ 0.\r\tanArray do:\r\t\t[:anElement |\r\t\t\tanElement size == 1\r\t\t\t\tifTrue:\r\t\t\t\t\t[(anElement == #-) ifFalse: [self error: 'badly-formed menu constructor'].\r\t\t\t\t\tlines add: anIndex]\r\t\t\t\tifFalse:\r\t\t\t\t\t[anElement size == 2 ifFalse: [self error: 'badly-formed menu constructor'].\r\t\t\t\t\tanIndex _ anIndex + 1.\r\t\t\t\t\tlabelList add: anElement first.\r\t\t\t\t\tselections add: anElement second]].\r\t^ self labelList: labelList lines: lines selections: selections\r\r\"(SelectionMenu fromArray:\r\t#(\t('first label'\t\tmoja)\r\t\t('second label'\tmbili)\r\t\t-\r\t\t('third label' \ttatu)\r\t\t-\r\t\t('fourth label'\tnne)\r\t\t('fifth label'\ttano))) startUp\"! !\r\r!SelectionMenu class methodsFor: 'instance creation' stamp: 'sma 5/28/2000 16:04'!\rlabelList: labelList lines: lines selections: selections\r\t^ (self labelArray: labelList lines: lines) selections: selections! !\r\r!SelectionMenu class methodsFor: 'instance creation' stamp: 'sma 5/28/2000 16:04'!\rlabelList: labelList selections: selections\r\t^ self\r\t\tlabelList: labelList\r\t\tlines: #()\r\t\tselections: selections! !\r\r!SelectionMenu class methodsFor: 'instance creation' stamp: 'sma 5/28/2000 16:09'!\rlabels: labels lines: linesArray\r\t\"Answer an instance of me whose items are in labels, with lines drawn  \r\tafter each item indexed by linesArray. Labels can be either a string \r\twith embedded CRs, or a collection of strings.\"\r\r\t(labels isKindOf: String)\r\t\tifTrue: [^ super labels: labels lines: linesArray]\r\t\tifFalse: [^ super labelArray: labels lines: linesArray]! !\r\r!SelectionMenu class methodsFor: 'instance creation' stamp: 'sma 5/28/2000 16:09'!\rlabels: labels lines: linesArray selections: selectionsArray\r\t\"Answer an instance of me whose items are in labels, with lines drawn  \r\tafter each item indexed by linesArray. Labels can be either a string  \r\twith embedded CRs, or a collection of strings. Record the given array of \r\tselections corresponding to the items in labels.\"\r\r\t^ (self labels: labels lines: linesArray) selections: selectionsArray! !\r\r!SelectionMenu class methodsFor: 'instance creation' stamp: 'sma 5/28/2000 16:10'!\rlabels: labels selections: selectionsArray\r\t\"Answer an instance of me whose items are in labels, recording \r\tthe given array of selections corresponding to the items in labels.\"\r\r\t^ self\r\t\tlabels: labels\r\t\tlines: #()\r\t\tselections: selectionsArray! !\r\r!SelectionMenu class methodsFor: 'instance creation' stamp: 'sma 5/28/2000 16:10'!\rselections: selectionsArray\r\t\"Answer an instance of me whose labels and selections are identical.\"\r\r\t^ self selections: selectionsArray lines: nil! !\r\r!SelectionMenu class methodsFor: 'instance creation' stamp: 'sma 5/28/2000 16:10'!\rselections: selectionsArray lines: linesArray\r\t\"Answer an instance of me whose labels and selections are identical.\"\r\r\t^ self\r\t\tlabelList: (selectionsArray collect: [:each | each asString])\r\t\tlines: linesArray\r\t\tselections: selectionsArray! !\rStringHolder subclass: #SelectorBrowser\r\tinstanceVariableNames: 'selectorIndex selectorList classListIndex classList'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Browser'!\r\r!SelectorBrowser methodsFor: 'as yet unclassified' stamp: 'tk 12/1/2000 10:38'!\rbyExample\r\t\"The comment in the bottom pane\"\r\r\tfalse ifTrue: [MethodFinder methodFor: #( (4 3) 7  (0 5) 5  (5 5) 10)].\r\t\t\"to keep the method methodFor: from being removed from the system\"\r\r\t^ 'Type a fragment of a selector in the top pane.  Accept it.\r\rOr, use an example to find a method in the system.  Type receiver, args, and answer in the top pane with periods between the items.  3. 4. 7\r\rOr, in this pane, use examples to find a method in the system.  Select the line of code and choose \"print it\".  \r\r\tMethodFinder methodFor: #( (4 3) 7  (0 5) 5  (5 5) 10).\rThis will discover (data1 + data2).\r\rYou supply inputs and answers and the system will find the method.  Each inner array is a list of inputs.  It contains the receiver and zero or more arguments.  For Booleans and any computed arguments, use brace notation.\r\r\tMethodFinder methodFor: { {1. 3}. true.  {20. 10}. false}.\rThis will discover the expressions (data1 < data2), (data2 > data1), and many others.\r\r\tMethodFinder methodFor: { {''29 Apr 1999'' asDate}. ''Thursday''.  \r\t\t{''30 Apr 1999'' asDate}. ''Friday'' }.\rThis will discover the expression (data1 weekday)\r\rReceiver and arguments do not have to be in the right order.\rSee MethodFinder.verify for more examples.'! !\r\r!SelectorBrowser methodsFor: 'as yet unclassified' stamp: 'tk 3/29/1999 22:12'!\rbyExample: newText\r\t\"Don't save it\"\r\t^ true! !\r\r!SelectorBrowser methodsFor: 'as yet unclassified' stamp: 'tk 8/26/1998 14:20'!\rclassList\r\t^ classList! !\r\r!SelectorBrowser methodsFor: 'as yet unclassified' stamp: 'tk 8/26/1998 14:23'!\rclassListIndex\r\t^ classListIndex! !\r\r!SelectorBrowser methodsFor: 'as yet unclassified' stamp: 'sw 10/9/1998 08:26'!\rclassListIndex: anInteger\r\r\tclassListIndex _ anInteger.\r\tclassListIndex > 0 ifTrue:\r\t\t[self dependents do:\r\t\t\t[:dep | ((dep isKindOf: PluggableListView) and:\r\t\t\t\t[dep setSelectionSelectorIs: #classListIndex:])\r\t\t\t\t\tifTrue: [dep controller controlTerminate]].\r\t\tBrowser fullOnClass: self selectedClass selector: self selectedMessageName.\r\t\t\"classListIndex _ 0\"]\r! !\r\r!SelectorBrowser methodsFor: 'as yet unclassified' stamp: 'tk 8/26/1998 14:33'!\rclassListSelectorTitle\r\t^ 'Class List Menu'! !\r\r!SelectorBrowser methodsFor: 'as yet unclassified' stamp: 'tk 5/22/2001 21:37'!\rcontents: aString notifying: aController\r\t\"Take what the user typed and find all selectors containing it\"\r\r\t| tokens raw sorted |\r\tcontents _ aString.\r\tclassList _ #().  classListIndex _ 0.\r\tselectorIndex _ 0.\r\ttokens _ contents asString findTokens: ' .'.\r\tselectorList _ Cursor wait showWhile: [\r\t\ttokens size = 1 \r\t\t\tifTrue: [raw _ (Symbol selectorsContaining: contents asString).\r\t\t\t\tsorted _ raw as: SortedCollection.\r\t\t\t\tsorted sortBlock: [:x :y | x asLowercase <= y asLowercase].\r\t\t\t\tsorted asArray]\r\t\t\tifFalse: [self quickList]].\t\"find selectors from a single example of data\"\r\tself changed: #messageList.\r\tself changed: #classList.\r\t^ true! !\r\r!SelectorBrowser methodsFor: 'as yet unclassified' stamp: 'sd 4/16/2003 09:45'!\rimplementors\r\t| aSelector |\r\t(aSelector _ self selectedMessageName) ifNotNil:\r\t\t[self systemNavigation browseAllImplementorsOf: aSelector]! !\r\r!SelectorBrowser methodsFor: 'as yet unclassified' stamp: 'di 11/9/1999 10:07'!\rinitialExtent\r\r\t^ 350@250\r! !\r\r!SelectorBrowser methodsFor: 'as yet unclassified' stamp: 'tk 1/8/2001 18:21'!\rlistFromResult: resultOC\r\t\"ResultOC is of the form #('(data1 op data2)' '(...)'). Answer a sorted array.\"\r\r\t(resultOC first beginsWith: 'no single method') ifTrue: [^ #()].\r\t^ resultOC sortBy: [:a :b | \r\t\t(a copyFrom: 6 to: a size) < (b copyFrom: 6 to: b size)].\r\r! !\r\r!SelectorBrowser methodsFor: 'as yet unclassified' stamp: 'md 11/14/2003 17:19'!\rmarkMatchingClasses\r\t\"If an example is used, mark classes matching the example instance with an asterisk.\"\r\r\t| unmarkedClassList firstPartOfSelector receiverString receiver |\r\r\tself flag: #mref.\t\"allows for old-fashioned style\"\r\r\t\"Only 'example' queries can be marked.\"\r\t(contents asString includes: $.) ifFalse: [^ self].\r\r\tunmarkedClassList _ classList copy.\r\r\t\"Get the receiver object of the selected statement in the message list.\"\r\tfirstPartOfSelector _ (Scanner new scanTokens: (selectorList at: selectorIndex)) second.\r\treceiverString _ (ReadStream on: (selectorList at: selectorIndex))\r\t\t\t\t\t\tupToAll: firstPartOfSelector.\r\treceiver _ Compiler evaluate: receiverString.\r\r\tunmarkedClassList do: [ :classAndMethod | | class |\r\t\t(classAndMethod isKindOf: MethodReference) ifTrue: [\r\t\t\t(receiver isKindOf: classAndMethod actualClass) ifTrue: [\r\t\t\t\tclassAndMethod stringVersion: '*', classAndMethod stringVersion.\r\t\t\t]\r\t\t] ifFalse: [\r\t\t\tclass _ Compiler evaluate:\r\t\t\t\t\t((ReadStream on: classAndMethod) upToAll: firstPartOfSelector).\r\t\t\t(receiver isKindOf: class) ifTrue: [\r\t\t\t\tclassList add: '*', classAndMethod.\r\t\t\t\tclassList remove: classAndMethod\r\t\t\t]\r\t\t].\r\t].\r! !\r\r!SelectorBrowser methodsFor: 'as yet unclassified' stamp: 'tk 8/26/1998 14:19'!\rmessageList\r\t\"Find all the selectors containing what the user typed in.\"\r\r\t^ selectorList! !\r\r!SelectorBrowser methodsFor: 'as yet unclassified' stamp: 'tk 8/26/1998 10:58'!\rmessageListIndex\r\t\"Answer the index of the selected message selector.\"\r\r\t^ selectorIndex! !\r\r!SelectorBrowser methodsFor: 'as yet unclassified' stamp: 'sd 4/19/2003 12:13'!\rmessageListIndex: anInteger \r\t\"Set the selected message selector to be the one indexed by anInteger. \r\tFind all classes it is in.\"\r\tselectorIndex _ anInteger.\r\tselectorIndex = 0\r\t\tifTrue: [^ self].\r\tclassList _ self systemNavigation allImplementorsOf: self selectedMessageName.\r\tself markMatchingClasses.\r\tclassListIndex _ 0.\r\tself changed: #messageListIndex.\r\t\"update my selection\"\r\tself changed: #classList! !\r\r!SelectorBrowser methodsFor: 'as yet unclassified' stamp: 'sma 2/6/2000 11:42'!\rmessageListKey: aChar from: view\r\t\"Respond to a command key. Handle (m) and (n) here,\r\telse defer to the StringHolder behaviour.\"\r\r\taChar == $m ifTrue: [^ self implementors].\r\taChar == $n ifTrue: [^ self senders].\r\tsuper messageListKey: aChar from: view\r! !\r\r!SelectorBrowser methodsFor: 'as yet unclassified' stamp: 'BG 10/29/2003 00:38'!\ropen\r\t\"Create a Browser that lets you type part of a selector, shows a list of selectors,\r\tshows the classes of the one you chose, and spwns a full browser on it.\r\t\tSelectorBrowser new open\r\t\"\r\r\t| selectorListView typeInView topView classListView exampleView |\r\r\tselectorIndex _ classListIndex _ 0.\r\ttopView _ (StandardSystemView new) model: self.\r\ttopView borderWidth: 1.\r\t\t\"label and minSize taken care of by caller\"\r\r\ttypeInView _ PluggableTextView on: self \r\t\t\ttext: #contents accept: #contents:notifying:\r\t\t\treadSelection: #contentsSelection menu: #codePaneMenu:shifted:.\r\ttypeInView window: (0@0 extent: 50@14);\r\t\taskBeforeDiscardingEdits: false.\r\ttopView addSubView: typeInView.\r\r\tselectorListView _ PluggableListView on: self\r\t\tlist: #messageList\r\t\tselected: #messageListIndex\r\t\tchangeSelected: #messageListIndex:\r\t\tmenu: #selectorMenu:\r\t\tkeystroke: #messageListKey:from:.\r\tselectorListView menuTitleSelector: #selectorMenuTitle.\r\tselectorListView window: (0 @ 0 extent: 50 @ 46).\r\ttopView addSubView: selectorListView below: typeInView.\r\r\tclassListView _ PluggableListView on: self\r\t\tlist: #classList\r\t\tselected: #classListIndex\r\t\tchangeSelected: #classListIndex:\r\t\tmenu: nil\t\"never anything selected\"\r\t\tkeystroke: #arrowKey:from:.\r\tclassListView menuTitleSelector: #classListSelectorTitle.\r\tclassListView window: (0 @ 0 extent: 50 @ 60).\r\ttopView addSubView: classListView toRightOf: typeInView.\r\r\texampleView _ PluggableTextView on: self \r\t\t\ttext: #byExample accept: #byExample:\r\t\t\treadSelection: #contentsSelection menu: #codePaneMenu:shifted:.\r\texampleView window: (0@0 extent: 100@40);\r\t\taskBeforeDiscardingEdits: false.\r\ttopView addSubView: exampleView below: selectorListView.\r\r\r\ttopView label: 'Method Finder'.\r\t\"topView minimumSize: 350@250; maximumSize: 350@250.\"\r\ttopView subViews do: [:each | each controller].\r\ttopView controller open.\r\r! !\r\r!SelectorBrowser methodsFor: 'as yet unclassified' stamp: 'tk 1/8/2001 18:37'!\rquickList\r\t\"Compute the selectors for the single example of receiver and args, in the very top pane\" \r\r\t| data result resultArray newExp dataStrings mf dataObjects aa |\r\tdata _ contents asString.\r\t\"delete trailing period. This should be fixed in the Parser!!\"\r \t[data last isSeparator] whileTrue: [data _ data allButLast]. \r\tdata last = $. ifTrue: [data _ data allButLast]. \t\"Eval\"\r\tmf _ MethodFinder new.\r\tdata _ mf cleanInputs: data.\t\"remove common mistakes\"\r\tdataObjects _ Compiler evaluate: '{', data, '}'. \"#( data1 data2 result )\"\r \tdataStrings _ (Compiler new parse: 'zort ' , data in: Object notifying: nil)\r\t\t\t\tblock statements allButLast collect:\r\t\t\t\t[:node | String streamContents:\r\t\t\t\t\t[:strm | (node isKindOf: MessageNode) ifTrue: [strm nextPut: $(].\r\t\t\t\t\tnode printOn: strm indent: 0.\r\t\t\t\t\t(node isKindOf: MessageNode) ifTrue: [strm nextPut: $)].]].\r\tdataObjects size < 2 ifTrue: [self inform: 'If you are giving an example of receiver, \\args, and result, please put periods between the parts.\\Otherwise just type one selector fragment' withCRs. ^#()].\r \tdataObjects _ Array with: dataObjects allButLast with: dataObjects last. \"#( (data1 data2) result )\" \r\tresult _ mf load: dataObjects; findMessage.\r\t(result first beginsWith: 'no single method') ifFalse: [\r\t\taa _ self testObjects: dataObjects strings: dataStrings.\r\t\tdataObjects _ aa second.  dataStrings _ aa third].\r\tresultArray _ self listFromResult: result. \r\tresultArray isEmpty ifTrue: [self inform: result first].\r\r\tdataStrings size = (dataObjects first size + 1) ifTrue:\r\t\t[resultArray _ resultArray collect: [:expression |\r\t\tnewExp _ expression.\r\t\tdataObjects first withIndexDo: [:lit :i |\r\t\t\tnewExp _ newExp copyReplaceAll: 'data', i printString\r\t\t\t\t\t\t\twith: (dataStrings at: i)].\r\t\tnewExp, ' --> ', dataStrings last]].\r\r \t^ resultArray! !\r\r!SelectorBrowser methodsFor: 'as yet unclassified' stamp: 'bf 10/13/1999 11:58'!\rsearchResult: anExternalSearchResult\r\r\tself contents: ''.\r\tclassList _ #(). classListIndex _ 0.\r\tselectorIndex _ 0.\r\tselectorList _ self listFromResult: anExternalSearchResult.\r \tself changed: #messageList.\r\tself changed: #classList.\r\tSmalltalk isMorphic ifTrue: [self changed: #contents.]. \r! !\r\r!SelectorBrowser methodsFor: 'as yet unclassified' stamp: 'RAA 5/29/2001 14:39'!\rselectedClass\r\t\"Answer the currently selected class.\"\r\r\t| pairString |\r\r\tself flag: #mref.\t\"allows for old-fashioned style\"\r\r\tclassListIndex = 0 ifTrue: [^nil].\r\tpairString _ classList at: classListIndex.\r\t(pairString isKindOf: MethodReference) ifTrue: [\r\t\t^pairString actualClass\r\t].\r\t(pairString includes: $*) ifTrue: [pairString _ pairString allButFirst].\r\tMessageSet \r\t\tparse: pairString\r\t\ttoClassAndSelector: [:cls :sel | ^ cls].! !\r\r!SelectorBrowser methodsFor: 'as yet unclassified' stamp: 'tk 8/27/1998 17:48'!\rselectedClassName\r\t\"Answer the name of the currently selected class.\"\r\r\tclassListIndex = 0 ifTrue: [^nil].\r\t^ self selectedClass name! !\r\r!SelectorBrowser methodsFor: 'as yet unclassified' stamp: 'md 11/14/2003 17:21'!\rselectedMessageName\r\t\"Answer the name of the currently selected message.\"\r\r\t| example tokens |\r\tselectorIndex = 0 ifTrue: [^nil].\r\texample _ selectorList at: selectorIndex.\r\ttokens _ Scanner new scanTokens: example.\r\ttokens size = 1 ifTrue: [^ tokens first].\r\ttokens first == #'^' ifTrue: [^ nil].\r\t(tokens second includes: $:) ifTrue: [^ example findSelector].\r\tSymbol hasInterned: tokens second ifTrue: [:aSymbol | ^ aSymbol].\r\t^ nil! !\r\r!SelectorBrowser methodsFor: 'as yet unclassified' stamp: 'mjg 8/19/1999 12:30'!\rselectorList: anExternalList\r\r\tself contents: ''.\r\tclassList _ #(). classListIndex _ 0.\r\tselectorIndex _ 0.\r\tselectorList _ anExternalList.\r\tself changed: #messageList.\r\tself changed: #classList.\r\tSmalltalk isMorphic ifTrue: [self changed: #contents.]. \r\r! !\r\r!SelectorBrowser methodsFor: 'as yet unclassified' stamp: 'hh 1/20/2000 00:15'!\rselectorMenu: aMenu\r\t^ aMenu labels:\r'senders (n)\rimplementors (m)\rcopy selector to clipboard'\r\tlines: #()\r\tselections: #(senders implementors copyName)! !\r\r!SelectorBrowser methodsFor: 'as yet unclassified' stamp: 'sw 9/2/1998 16:37'!\rselectorMenuTitle\r\t^ self selectedMessageName ifNil: ['<no selection>']! !\r\r!SelectorBrowser methodsFor: 'as yet unclassified' stamp: 'nk 6/26/2003 21:44'!\rsenders\r\t| aSelector |\r\t(aSelector _ self selectedMessageName) ifNotNil:\r\t\t[self systemNavigation browseAllCallsOn: aSelector]! !\r\r!SelectorBrowser methodsFor: 'as yet unclassified' stamp: 'tk 1/18/2001 23:15'!\rtestObjects: dataObjects strings: dataStrings\r\t| dataObjs dataStrs selectors classes didUnmodifiedAnswer answerMod do ds result ddo dds |\r\t\"Try to make substitutions in the user's inputs and search for the selector again.\r1 no change to answer.\r2 answer Array -> OrderedCollection.\r2 answer Character -> String\r4 answer Symbol or String of len 1 -> Character\r\tFor each of these, try straight, and try converting args:\rCharacter -> String\rSymbol or String of len 1 -> Character\r\tReturn array with result, dataObjects, dataStrings.  Don't ever do a find on the same set of data twice.\"\r\rdataObjs _ dataObjects.  dataStrs _ dataStrings.\rselectors _ {#asString. #first. #asOrderedCollection}.\rclasses _ {Character. String. Array}.\rdidUnmodifiedAnswer _ false.\rselectors withIndexDo: [:ansSel :ansInd | \"Modify the answer object\"\r\tanswerMod _ false.\r\tdo _ dataObjs copyTwoLevel.  ds _ dataStrs copy.\r\t(dataObjs last isKindOf: (classes at: ansInd)) ifTrue: [\r\t\t((ansSel ~~ #first) or: [dataObjs last size = 1]) ifTrue: [\r\t\t\tdo at: do size put: (do last perform: ansSel).\t\"asString\"\r\t\t\tds at: ds size put: ds last, ' ', ansSel.\r\t\t\tresult _ MethodFinder new load: do; findMessage.\r\t\t\t(result first beginsWith: 'no single method') ifFalse: [\r\t\t\t\t\"found a selector!!\"\r\t\t\t\t^ Array with: result first with: do with: ds].\t\r\t\t\tanswerMod _ true]].\r\r\tselectors allButLast withIndexDo: [:argSel :argInd | \"Modify an argument object\"\r\t\t\t\"for args, no reason to do Array -> OrderedCollection.  Identical protocol.\"\r\t\tdidUnmodifiedAnswer not | answerMod ifTrue: [\r\t\tddo _ do copyTwoLevel.  dds _ ds copy.\r\t\tdataObjs first withIndexDo: [:arg :ind |\r\t\t\t(arg isKindOf: (classes at: argInd))  ifTrue: [\r\t\t\t\t((argSel ~~ #first) or: [arg size = 1]) ifTrue: [\r\t\t\t\t\tddo first at: ind put: ((ddo first at: ind) perform: argSel).\t\"asString\"\r\t\t\t\t\tdds at: ind put: (dds at: ind), ' ', argSel.\r\t\t\t\t\tresult _ MethodFinder new load: ddo; findMessage.\r\t\t\t\t\t(result first beginsWith: 'no single method') ifFalse: [\r\t\t\t\t\t\t\"found a selector!!\"\r\t\t\t\t\t\t^ Array with: result first with: ddo with: dds]\t.\t\r\t\t\t\t\tdidUnmodifiedAnswer not & answerMod not ifTrue: [\r\t\t\t\t\t\tdidUnmodifiedAnswer _ true].\r\t\t\t\t\t]]]]].\r\t].\r^ Array with: 'no single method does that function' with: dataObjs with: dataStrs! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rSelectorBrowser class\r\tinstanceVariableNames: ''!\r\r\r\r!SelectorBrowser class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 11:01'!\rinitialize\r\r\tself registerInFlapsRegistry.\t! !\r\r!SelectorBrowser class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 11:03'!\rregisterInFlapsRegistry\r\t\"Register the receiver in the system's flaps registry\"\r\tself environment\r\t\tat: #Flaps\r\t\tifPresent: [:cl | cl registerQuad: #(SelectorBrowser\t\t\tprototypicalToolWindow\t\t'Method Finder'\t\t'A tool for discovering methods by providing sample values for arguments and results')\r\t\t\t\t\t\tforFlapNamed: 'Tools']\r! !\r\r!SelectorBrowser class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 12:40'!\runload\r\t\"Unload the receiver from global registries\"\r\r\tself environment at: #Flaps ifPresent: [:cl |\r\tcl unregisterQuadsWithReceiver: self] ! !\rLeafNode subclass: #SelectorNode\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Compiler'!\r!SelectorNode commentStamp: '<historical>' prior: 0!\rI am a parse tree leaf representing a selector.!\r\r\r!SelectorNode methodsFor: 'code generation'!\remit: stack args: nArgs on: strm\r\r\tself emit: stack\r\t\targs: nArgs\r\t\ton: strm\r\t\tsuper: false! !\r\r!SelectorNode methodsFor: 'code generation'!\remit: stack args: nArgs on: aStream super: supered\r\t| index |\r\tstack pop: nArgs.\r\t(supered not and: [code - Send < SendLimit and: [nArgs < 3]]) ifTrue:\r\t\t[\"short send\"\r\t\tcode < Send\r\t\t\tifTrue: [^ aStream nextPut: code \"special\"]\r\t\t\tifFalse: [^ aStream nextPut: nArgs * 16 + code]].\r\tindex _ code < 256 ifTrue: [code - Send] ifFalse: [code \\\\ 256].\r\t(index <= 31 and: [nArgs <= 7]) ifTrue: \r\t\t[\"extended (2-byte) send [131 and 133]\"\r\t\taStream nextPut: SendLong + (supered ifTrue: [2] ifFalse: [0]).\r\t\t^ aStream nextPut: nArgs * 32 + index].\r\t(supered not and: [index <= 63 and: [nArgs <= 3]]) ifTrue:\r\t\t[\"new extended (2-byte) send [134]\"\r\t\taStream nextPut: SendLong2.\r\t\t^ aStream nextPut: nArgs * 64 + index].\r\t\"long (3-byte) send\"\r\taStream nextPut: DblExtDoAll.\r\taStream nextPut: nArgs + (supered ifTrue: [32] ifFalse: [0]).\r\taStream nextPut: index! !\r\r!SelectorNode methodsFor: 'code generation' stamp: 'di 1/7/2000 12:32'!\rsize: encoder args: nArgs super: supered\r\t| index |\r\tself reserve: encoder.\r\t(supered not and: [code - Send < SendLimit and: [nArgs < 3]])\r\t\tifTrue: [^1]. \"short send\"\r\t(supered and: [code < Send]) ifTrue: \r\t\t[\"super special:\"\r\t\tcode _ self code: (encoder sharableLitIndex: key) type: 5].\r\tindex _ code < 256 ifTrue: [code - Send] ifFalse: [code \\\\ 256].\r\t(index <= 31 and: [nArgs <= 7])\r\t\tifTrue: [^ 2]. \"medium send\"\r\t(supered not and: [index <= 63 and: [nArgs <= 3]])\r\t\tifTrue: [^ 2]. \"new medium send\"\r\t^ 3 \"long send\"! !\r\r\r!SelectorNode methodsFor: 'printing' stamp: 'di 11/8/2000 10:04'!\rprintOn: aStream indent: level \r\taStream withStyleFor: #keyword\r\t\tdo: [key == nil\r\t\t\t\tifTrue: [aStream nextPutAll: '<key==nil>']\r\t\t\t\tifFalse: [aStream nextPutAll: key]]! !\r\r\r!SelectorNode methodsFor: 'inappropriate'!\remitForEffect: stack on: strm\r\r\tself shouldNotImplement! !\r\r!SelectorNode methodsFor: 'inappropriate'!\remitForValue: stack on: strm\r\r\tself shouldNotImplement! !\r\r!SelectorNode methodsFor: 'inappropriate'!\rsizeForEffect: encoder\r\r\tself shouldNotImplement! !\r\r!SelectorNode methodsFor: 'inappropriate'!\rsizeForValue: encoder\r\r\tself shouldNotImplement! !\r\r\r!SelectorNode methodsFor: 'testing'!\risPvtSelector\r\t\"Answer if this selector node is a private message selector.\"\r\r\t^key isPvtSelector! !\rLinkedList subclass: #Semaphore\r\tinstanceVariableNames: 'excessSignals'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Processes'!\r!Semaphore commentStamp: '<historical>' prior: 0!\rI provide synchronized communication of a single bit of information (a \"signal\") between Processes. A signal is sent by sending the message signal and received by sending the message wait. If no signal has been sent when a wait message is sent, the sending Process will be suspended until a signal is sent.!\r\r\r!Semaphore methodsFor: 'initialize-release'!\rinitSignals\r\t\"Consume any excess signals the receiver may have accumulated.\"\r\r\texcessSignals _ 0.! !\r\r!Semaphore methodsFor: 'initialize-release'!\rterminateProcess\r\t\"Terminate the process waiting on this semaphore, if any.\"\r\r\tself isEmpty ifFalse: [ self removeFirst terminate ].! !\r\r\r!Semaphore methodsFor: 'communication'!\rsignal\r\t\"Primitive. Send a signal through the receiver. If one or more processes \r\thave been suspended trying to receive a signal, allow the first one to \r\tproceed. If no process is waiting, remember the excess signal. Essential. \r\tSee Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 85>\r\tself primitiveFailed\r\r\t\"self isEmpty    \r\t\tifTrue: [excessSignals _ excessSignals+1]    \r\t\tifFalse: [Processor resume: self removeFirstLink]\"\r\r! !\r\r!Semaphore methodsFor: 'communication'!\rwait\r\t\"Primitive. The active Process must receive a signal through the receiver \r\tbefore proceeding. If no signal has been sent, the active Process will be \r\tsuspended until one is sent. Essential. See Object documentation \r\twhatIsAPrimitive.\"\r\r\t<primitive: 86>\r\tself primitiveFailed\r\r\t\"excessSignals>0  \r\t\tifTrue: [excessSignals _ excessSignals-1]  \r\t\tifFalse: [self addLastLink: Processor activeProcess suspend]\"\r! !\r\r\r!Semaphore methodsFor: 'mutual exclusion' stamp: 'mir 9/22/2001 10:54'!\rcritical: mutuallyExcludedBlock \r\t\"Evaluate mutuallyExcludedBlock only if the receiver is not currently in \r\tthe process of running the critical: message. If the receiver is, evaluate \r\tmutuallyExcludedBlock after the other critical: message is finished.\"\r\r\t| blockValue |\r\tself wait.\r\t[blockValue _ mutuallyExcludedBlock value]\r\t\tensure: [self signal].\r\t^blockValue! !\r\r!Semaphore methodsFor: 'mutual exclusion' stamp: 'ar 10/8/1998 11:16'!\rcritical: mutuallyExcludedBlock ifError: errorBlock\r\t\"Evaluate mutuallyExcludedBlock only if the receiver is not currently in \r\tthe process of running the critical: message. If the receiver is, evaluate \r\tmutuallyExcludedBlock after the other critical: message is finished.\"\r\r\t| blockValue hasError errMsg errRcvr |\r\tself wait.\r\thasError _ false.\r\tblockValue _ [mutuallyExcludedBlock value] ifError:[:msg :rcvr|\r\t\thasError _ true.\r\t\terrMsg _ msg.\r\t\terrRcvr _ rcvr].\r\thasError ifTrue:[\r\t\tself signal.\r\t\t^errorBlock value: errMsg value: errRcvr].\r\tself signal.\r\t^blockValue! !\r\r\r!Semaphore methodsFor: 'comparing' stamp: 'sma 4/22/2000 18:48'!\r= anObject\r\t^ self == anObject! !\r\r!Semaphore methodsFor: 'comparing' stamp: 'sma 4/22/2000 18:48'!\rhash\r\t^ self identityHash! !\r\r\r!Semaphore methodsFor: 'testing' stamp: 'ar 3/2/2001 16:51'!\risSignaled\r\t\"Return true if this semaphore is currently signaled\"\r\t^excessSignals > 0! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rSemaphore class\r\tinstanceVariableNames: ''!\r\r!Semaphore class methodsFor: 'instance creation'!\rforMutualExclusion\r\t\"Answer an instance of me that contains a single signal. This new \r\tinstance can now be used for mutual exclusion (see the critical: message \r\tto Semaphore).\"\r\r\t^self new signal! !\r\r!Semaphore class methodsFor: 'instance creation'!\rnew\r\t\"Answer a new instance of Semaphore that contains no signals.\"\r\r\t^self basicNew initSignals! !\rCollection subclass: #SequenceableCollection\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Abstract'!\r!SequenceableCollection commentStamp: '<historical>' prior: 0!\rI am an abstract superclass for collections that have a well-defined order associated with their elements. Thus each element is externally-named by integers referred to as indices.!\r\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'sma 5/12/2000 18:00'!\rafter: target\r\t\"Answer the element after target.  Raise an error if target is not\r\tin the receiver, or if there are no elements after it.\"\r\r\t^ self after: target ifAbsent: [self errorNotFound: target]! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'sma 5/12/2000 18:02'!\rafter: target ifAbsent: exceptionBlock\r\t\"Answer the element after target.  Answer the result of evaluation\r\tthe exceptionBlock if target is not in the receiver, or if there are \r\tno elements after it.\"\r\r\t| index |\r\tindex _ self indexOf: target.\r\t^ index == 0\r\t\tifTrue: [exceptionBlock value]\r\t\tifFalse: [index = self size \r\t\t\tifTrue: [self errorLastObject: target]\r\t\t\tifFalse: [self at: index + 1]]! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'sma 6/1/2000 15:34'!\rallButFirst\r\t\"Answer a copy of the receiver containing all but the first\r\telement. Raise an error if there are not enough elements.\"\r\r\t^ self allButFirst: 1! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'sma 6/1/2000 15:35'!\rallButFirst: n\r\t\"Answer a copy of the receiver containing all but the first n\r\telements. Raise an error if there are not enough elements.\"\r\r\t^ self copyFrom: n + 1 to: self size! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'sma 6/1/2000 15:35'!\rallButLast\r\t\"Answer a copy of the receiver containing all but the last\r\telement. Raise an error if there are not enough elements.\"\r\r\t^ self allButLast: 1! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'sma 6/1/2000 15:35'!\rallButLast: n\r\t\"Answer a copy of the receiver containing all but the last n\r\telements. Raise an error if there are not enough elements.\"\r\r\t^ self copyFrom: 1 to: self size - n! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'sma 5/12/2000 11:33'!\ranyOne\r\t^ self first! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'sma 5/12/2000 12:11'!\rat: index ifAbsent: exceptionBlock \r\t\"Answer the element at my position index. If I do not contain an element \r\tat index, answer the result of evaluating the argument, exceptionBlock.\"\r\r\t(index between: 1 and: self size) ifTrue: [^ self at: index].\r\t^ exceptionBlock value! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'raok 11/22/2002 12:34'!\rat: index incrementBy: value\r\t^self at: index put: (self at: index) + value! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'apb 11/4/2000 22:51'!\ratAll: indexArray\r\t\"Answer a new collection like the receiver which contains all elements\r\tof the receiver at the indices of indexArray.\"\r\t\"#('one' 'two' 'three' 'four') atAll: #(3 2 4)\"\r\r\t| newCollection |\r\tnewCollection _ self species ofSize: indexArray size.\r\t1 to: indexArray size do:\r\t\t[:index |\r\t\tnewCollection at: index put: (self at: (indexArray at: index))].\r\t^ newCollection! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'sma 5/12/2000 12:17'!\ratAll: aCollection put: anObject \r\t\"Put anObject at every index specified by the elements of aCollection.\"\r\r\taCollection do: [:index | self at: index put: anObject].\r\t^ anObject! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'sma 5/12/2000 12:18'!\ratAll: indexArray putAll: valueArray\r\t\"Store the elements of valueArray into the slots\r\tof this collection selected by indexArray.\"\r\r\tindexArray with: valueArray do: [:index :value | self at: index put: value].\r\t^ valueArray! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'sma 4/22/2000 17:45'!\ratAllPut: anObject \r\t\"Put anObject at every one of the receiver's indices.\"\r\r\t| size |\r\t(size _ self size) > 26 \"first method faster from 27 accesses and on\"\r\t\tifTrue: [self from: 1 to: size put: anObject]\r\t\tifFalse: [1 to: size do: [:index | self at: index put: anObject]]! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'ajh 6/27/2002 17:53'!\ratLast: indexFromEnd\r\t\"Return element at indexFromEnd from the last position.\r\t atLast: 1, returns the last element\"\r\r\t^ self atLast: indexFromEnd ifAbsent: [self errorIndexOutOfRange]! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'ajh 6/27/2002 17:52'!\ratLast: indexFromEnd ifAbsent: block\r\t\"Return element at indexFromEnd from the last position.\r\t atLast: 1 ifAbsent: [] returns the last element\"\r\r\t^ self at: self size + 1 - indexFromEnd ifAbsent: block! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'ajh 6/27/2002 18:10'!\ratLast: indexFromEnd put: obj\r\t\"Set the element at indexFromEnd from the last position.\r\t atLast: 1 put: obj, sets the last element\"\r\r\t^ self at: self size + 1 - indexFromEnd put: obj! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'di 11/6/1998 14:32'!\ratPin: index \r\t\"Return the index'th element of me if possible.\r\tReturn the first or last element if index is out of bounds.\"\r\r\tindex < 1 ifTrue: [^ self first].\r\tindex > self size ifTrue: [^ self last].\r\t^ self at: index! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'sma 5/12/2000 12:50'!\ratRandom: aGenerator\r\t\"Answer a random element of the receiver.  Uses aGenerator which\r\tshould be kept by the user in a variable and used every time. Use\r\tthis instead of #atRandom for better uniformity of random numbers \r\tbecause only you use the generator.  Causes an error if self has no \r\telements.\"\r\r\t^ self at: (aGenerator nextInt: self size)! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'sma 5/12/2000 13:51'!\ratWrap: index \r\t\"Answer the index'th element of the receiver.  If index is out of bounds,\r\tlet it wrap around from the end to the beginning until it is in bounds.\"\r\r\t^ self at: index - 1 \\\\ self size + 1! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'sma 5/12/2000 13:52'!\ratWrap: index put: value\r\t\"Store value into the index'th element of the receiver.  If index is out\r\tof bounds, let it wrap around from the end to the beginning until it \r\tis in bounds. Answer value.\"\r\r\t^ self at: index  - 1 \\\\ self size + 1 put: value! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'sma 5/12/2000 18:04'!\rbefore: target\r\t\"Answer the receiver's element immediately before target. Raise an\r\terror if target is not an element of the receiver, or if there are no \r\telements before it (i.e. it is the first element).\"\r\r\t^ self before: target ifAbsent: [self errorNotFound: target]! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'sma 5/12/2000 18:06'!\rbefore: target ifAbsent: exceptionBlock\r\t\"Answer the receiver's element immediately before target. Answer\r\tthe result of evaluating the exceptionBlock if target is not an element\r\tof the receiver, or if there are no elements before it.\"\r\r\t| index |\r\tindex _ self indexOf: target.\r\t^ index == 0\r\t\tifTrue: [exceptionBlock value]\r\t\tifFalse: [index == 1 \r\t\t\tifTrue: [self errorFirstObject: target]\r\t\t\tifFalse: [self at: index - 1]]! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'sw 9/8/2000 11:23'!\reighth\r\t\"Answer the eighth element of the receiver.\r\tRaise an error if there are not enough elements.\"\r\r\t^ self checkedAt: 8! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'sma 5/12/2000 13:57'!\rfifth\r\t\"Answer the fifth element of the receiver.\r\tRaise an error if there are not enough elements.\"\r\r\t^ self checkedAt: 5! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'di 6/2/2000 09:16'!\rfirst\r\t\"Answer the first element of the receiver.\r\tRaise an error if the collection is empty.\"\r\r\tself size = 0 ifTrue: [self errorEmptyCollection].\r\t^ self at: 1! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'sma 6/1/2000 15:31'!\rfirst: n\r\t\"Answer the first n elements of the receiver.\r\tRaise an error if there are not enough elements.\"\r\r\t^ self copyFrom: 1 to: n! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'sma 5/12/2000 13:58'!\rfourth\r\t\"Answer the fourth element of the receiver.\r\tRaise an error if there are not enough elements.\"\r\r\t^ self checkedAt: 4! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'SqR 10/30/2000 22:06'!\rfrom: startIndex to: endIndex put: anObject\r\t\"Put anObject in all indexes between startIndex \r\tand endIndex. Very fast. Faster than to:do: for\r\tmore than 26 positions. Answer anObject\"\r\r\t| written toWrite thisWrite |\r\r\tstartIndex > endIndex ifTrue: [^self].\r\tself at: startIndex put: anObject.\r\twritten _ 1.\r\ttoWrite _ endIndex - startIndex + 1.\r\t[written < toWrite] whileTrue:\r\t\t[\r\t\t\tthisWrite _ written min: toWrite - written.\r\t\t\tself \r\t\t\t\treplaceFrom: startIndex + written\r\t\t\t\tto: startIndex + written + thisWrite - 1\r\t\t\t\twith: self startingAt: startIndex.\r\t\t\twritten _ written + thisWrite\r\t\t].\r\t^anObject! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'ar 8/14/1998 21:20'!\ridentityIndexOf: anElement \r\t\"Answer the index of anElement within the receiver. If the receiver does \r\tnot contain anElement, answer 0.\"\r\r\t^self identityIndexOf: anElement ifAbsent: [0]! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'ar 8/14/1998 21:21'!\ridentityIndexOf: anElement ifAbsent: exceptionBlock\r\t\"Answer the index of anElement within the receiver. If the receiver does \r\tnot contain anElement, answer the result of evaluating the argument, \r\texceptionBlock.\"\r\t1 to: self size do:\r\t\t[:i | (self at: i) == anElement ifTrue: [^ i]].\r\t^ exceptionBlock value! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'sma 6/1/2000 15:46'!\rindexOf: anElement\r\t\"Answer the index of the first occurence of anElement within the  \r\treceiver. If the receiver does not contain anElement, answer 0.\"\r\r\t^ self indexOf: anElement ifAbsent: [0]! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'sma 6/1/2000 15:47'!\rindexOf: anElement ifAbsent: exceptionBlock\r\t\"Answer the index of the first occurence of anElement within the  \r\treceiver. If the receiver does not contain anElement, answer the \r\tresult of evaluating the argument, exceptionBlock.\"\r\r\t^ self indexOf: anElement startingAt: 1 ifAbsent: exceptionBlock! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'sma 6/1/2000 15:47'!\rindexOf: anElement startingAt: start ifAbsent: exceptionBlock\r\t\"Answer the index of the first occurence of anElement after start\r\twithin the receiver. If the receiver does not contain anElement, \r\tanswer the \tresult of evaluating the argument, exceptionBlock.\"\r\r\tstart to: self size do:\r\t\t[:index |\r\t\t(self at: index) = anElement ifTrue: [^ index]].\r\t^ exceptionBlock value! !\r\r!SequenceableCollection methodsFor: 'accessing'!\rindexOfSubCollection: aSubCollection startingAt: anIndex \r\t\"Answer the index of the receiver's first element, such that that element \r\tequals the first element of aSubCollection, and the next elements equal \r\tthe rest of the elements of aSubCollection. Begin the search at element \r\tanIndex of the receiver. If no such match is found, answer 0.\"\r\r\t^self\r\t\tindexOfSubCollection: aSubCollection\r\t\tstartingAt: anIndex\r\t\tifAbsent: [0]! !\r\r!SequenceableCollection methodsFor: 'accessing'!\rindexOfSubCollection: sub startingAt: start ifAbsent: exceptionBlock\r\t\"Answer the index of the receiver's first element, such that that element \r\tequals the first element of sub, and the next elements equal \r\tthe rest of the elements of sub. Begin the search at element \r\tstart of the receiver. If no such match is found, answer the result of \r\tevaluating argument, exceptionBlock.\"\r\t| first index |\r\tsub isEmpty ifTrue: [^ exceptionBlock value].\r\tfirst _ sub first.\r\tstart to: self size - sub size + 1 do:\r\t\t[:startIndex |\r\t\t(self at: startIndex) = first ifTrue:\r\t\t\t[index _ 1.\r\t\t\t[(self at: startIndex+index-1) = (sub at: index)]\r\t\t\t\twhileTrue:\r\t\t\t\t[index = sub size ifTrue: [^startIndex].\r\t\t\t\tindex _ index+1]]].\r\t^ exceptionBlock value! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'ar 3/3/2001 22:43'!\rintegerAt: index\r\t\"Return the integer at the given index\"\r\t^self at: index! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'ar 3/3/2001 22:43'!\rintegerAt: index put: value\r\t\"Return the integer at the given index\"\r\t^self at: index put: value! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'di 6/2/2000 09:15'!\rlast\r\t\"Answer the last element of the receiver.\r\tRaise an error if the collection is empty.\"\r\r\t| size |\r\t(size _ self size) = 0 ifTrue: [self errorEmptyCollection].\r\t^ self at: size! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'sma 6/1/2000 15:30'!\rlast: n\r\t\"Answer the last n elements of the receiver.  \r\tRaise an error if there are not enough elements.\"\r\r\t| size |\r\tsize _ self size.\r\t^ self copyFrom: size - n + 1 to: size! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'ar 12/16/2001 01:06'!\rlastIndexOf: anElement\r\t\"Answer the index of the last occurence of anElement within the \r\treceiver. If the receiver does not contain anElement, answer 0.\"\r\r\t^ self lastIndexOf: anElement startingAt: self size ifAbsent: [0]! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'ar 12/16/2001 01:06'!\rlastIndexOf: anElement ifAbsent: exceptionBlock\r\t\"Answer the index of the last occurence of anElement within the  \r\treceiver. If the receiver does not contain anElement, answer the\r\tresult of evaluating the argument, exceptionBlock.\"\r\t^self lastIndexOf: anElement startingAt: self size ifAbsent: exceptionBlock! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'ar 12/16/2001 01:05'!\rlastIndexOf: anElement startingAt: lastIndex ifAbsent: exceptionBlock\r\t\"Answer the index of the last occurence of anElement within the  \r\treceiver. If the receiver does not contain anElement, answer the\r\tresult of evaluating the argument, exceptionBlock.\"\r\r\tlastIndex to: 1 by: -1 do:\r\t\t[:index |\r\t\t(self at: index) = anElement ifTrue: [^ index]].\r\t^ exceptionBlock value! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'bf 10/13/1999 10:01'!\rmiddle\r\t\"Answer the middle element of the receiver.\"\r\tself emptyCheck.\r\t^ self at: self size // 2 + 1! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'sw 9/7/2000 18:10'!\rninth\r\t\"Answer the ninth element of the receiver.\r\tRaise an error if there are not enough elements.\"\r\r\t^ self checkedAt: 9! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'ar 1/20/98 16:22'!\rreplaceAll: oldObject with: newObject \r\t\"Replace all occurences of oldObject with newObject\"\r\t| index |\r\tindex _ self\r\t\t\t\tindexOf: oldObject\r\t\t\t\tstartingAt: 1\r\t\t\t\tifAbsent: [0].\r\t[index = 0]\r\t\twhileFalse: \r\t\t\t[self at: index put: newObject.\r\t\t\tindex _ self\r\t\t\t\t\t\tindexOf: oldObject\r\t\t\t\t\t\tstartingAt: index + 1\r\t\t\t\t\t\tifAbsent: [0]]! !\r\r!SequenceableCollection methodsFor: 'accessing'!\rreplaceFrom: start to: stop with: replacement \r\t\"This destructively replaces elements from start to stop in the receiver. \r\tAnswer the receiver itself. Use copyReplaceFrom:to:with: for \r\tinsertion/deletion which may alter the size of the result.\"\r\r\treplacement size = (stop - start + 1)\r\t\tifFalse: [self error: 'Size of replacement doesnt match'].\r\t^self replaceFrom: start to: stop with: replacement startingAt: 1! !\r\r!SequenceableCollection methodsFor: 'accessing'!\rreplaceFrom: start to: stop with: replacement startingAt: repStart \r\t\"This destructively replaces elements from start to stop in the receiver \r\tstarting at index, repStart, in the sequenceable collection, \r\treplacementCollection. Answer the receiver. No range checks are \r\tperformed.\"\r\r\t| index repOff |\r\trepOff _ repStart - start.\r\tindex _ start - 1.\r\t[(index _ index + 1) <= stop]\r\t\twhileTrue: [self at: index put: (replacement at: repOff + index)]! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'sma 5/12/2000 13:58'!\rsecond\r\t\"Answer the second element of the receiver.\r\tRaise an error if there are not enough elements.\"\r\r\t^ self checkedAt: 2! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'sw 9/7/2000 18:11'!\rseventh\r\t\"Answer the seventh element of the receiver.\r\tRaise an error if there are not enough elements.\"\r\r\t^ self checkedAt: 7! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'sma 5/12/2000 13:59'!\rsixth\r\t\"Answer the sixth element of the receiver.\r\tRaise an error if there are not enough elements.\"\r\r\t^ self checkedAt: 6! !\r\r!SequenceableCollection methodsFor: 'accessing'!\rswap: oneIndex with: anotherIndex \r\t\"Move the element at oneIndex to anotherIndex, and vice-versa.\"\r\r\t| element |\r\telement _ self at: oneIndex.\r\tself at: oneIndex put: (self at: anotherIndex).\r\tself at: anotherIndex put: element! !\r\r!SequenceableCollection methodsFor: 'accessing' stamp: 'sma 5/12/2000 13:58'!\rthird\r\t\"Answer the third element of the receiver.\r\tRaise an error if there are not enough elements.\"\r\r\t^ self checkedAt: 3! !\r\r\r!SequenceableCollection methodsFor: 'comparing' stamp: 'sma 5/12/2000 14:04'!\r= otherCollection \r\t\"Answer true if the receiver is equivalent to the otherCollection.\r\tFirst test for identity, then rule out different species and sizes of\r\tcollections. As a last resort, examine each element of the receiver\r\tand the otherCollection.\"\r\r\tself == otherCollection ifTrue: [^ true].\r\tself species == otherCollection species ifFalse: [^ false].\r\t^ self hasEqualElements: otherCollection! !\r\r!SequenceableCollection methodsFor: 'comparing' stamp: 'tk 12/6/2000 11:39'!\rhasEqualElements: otherCollection\r\t\"Answer whether the receiver's size is the same as otherCollection's\r\tsize, and each of the receiver's elements equal the corresponding \r\telement of otherCollection.\r\tThis should probably replace the current definition of #= .\"\r\r\t| size |\r\t(otherCollection isKindOf: SequenceableCollection) ifFalse: [^ false].\r\t(size _ self size) = otherCollection size ifFalse: [^ false].\r\t1 to: size do:\r\t\t[:index |\r\t\t(self at: index) = (otherCollection at: index) ifFalse: [^ false]].\r\t^ true! !\r\r!SequenceableCollection methodsFor: 'comparing' stamp: 'SqR 8/3/2000 13:39'!\rhash\r\t| hash |\r\r\thash _ self species hash.\r\t1 to: self size do: [:i | hash _ (hash + (self at: i) hash) hashMultiply].\r\t^hash! !\r\r\r!SequenceableCollection methodsFor: 'converting' stamp: 'TAG 11/6/1998 15:55'!\r@ aCollection \r\t^ self with: aCollection collect: [:a :b | a @ b]! !\r\r!SequenceableCollection methodsFor: 'converting' stamp: 'sma 5/12/2000 17:32'!\rasArray\r\t\"Answer an Array whose elements are the elements of the receiver.\"\r\r\t^ Array withAll: self! !\r\r!SequenceableCollection methodsFor: 'converting' stamp: 'sma 5/12/2000 17:36'!\rasByteArray\r\t\"Answer a ByteArray whose elements are the elements of the receiver.\"\r\r\t^ ByteArray withAll: self! !\r\r!SequenceableCollection methodsFor: 'converting' stamp: 'ar 3/3/2001 20:06'!\rasColorArray\r\t^ColorArray withAll: self! !\r\r!SequenceableCollection methodsFor: 'converting' stamp: 'ar 9/14/1998 23:47'!\rasFloatArray\r\t\"Answer a FloatArray whose elements are the elements of the receiver, in \r\tthe same order.\"\r\r\t| floatArray |\r\tfloatArray _ FloatArray new: self size.\r\t1 to: self size do:[:i| floatArray at: i put: (self at: i) asFloat ].\r\t^floatArray! !\r\r!SequenceableCollection methodsFor: 'converting' stamp: 'ar 10/10/1998 16:19'!\rasIntegerArray\r\t\"Answer an IntegerArray whose elements are the elements of the receiver, in \r\tthe same order.\"\r\r\t| intArray |\r\tintArray _ IntegerArray new: self size.\r\t1 to: self size do:[:i| intArray at: i put: (self at: i)].\r\t^intArray! !\r\r!SequenceableCollection methodsFor: 'converting' stamp: 'djm 11/20/1998 05:44'!\rasStringWithCr\r\t\"Convert to a string with returns between items.  Elements are\rusually strings.\r\t Useful for labels for PopUpMenus.\"\r\t| labelStream |\r\tlabelStream _ WriteStream on: (String new: 200).\r\tself do: [:each |\r\t\t(each isKindOf: String)\r\t\t\tifTrue: [labelStream nextPutAll: each; cr]\r\t\t\tifFalse: [each printOn: labelStream. labelStream cr]].\r\tself size > 0 ifTrue: [labelStream skip: -1].\r\t^ labelStream contents! !\r\r!SequenceableCollection methodsFor: 'converting' stamp: 'ar 10/10/1998 16:20'!\rasWordArray\r\t\"Answer a WordArray whose elements are the elements of the receiver, in \r\tthe same order.\"\r\r\t| wordArray |\r\twordArray _ WordArray new: self size.\r\t1 to: self size do:[:i| wordArray at: i put: (self at: i)].\r\t^wordArray! !\r\r!SequenceableCollection methodsFor: 'converting' stamp: 'raok 6/23/2003 12:51'!\rconcatenation\r\t|result index|\r\r\tresult _ Array new: (self inject: 0 into: [:sum :each | sum + each size]).\r\tindex _ 0.\r\tself do: [:each | each do: [:item | result at: (index _ index+1) put: item]].\r\t^result! !\r\r!SequenceableCollection methodsFor: 'converting' stamp: 'di 11/6/1998 09:35'!\risSequenceable\r\t^ true! !\r\r!SequenceableCollection methodsFor: 'converting' stamp: 'sma 5/12/2000 12:51'!\rreadStream\r\t^ ReadStream on: self! !\r\r!SequenceableCollection methodsFor: 'converting' stamp: 'sma 5/12/2000 17:56'!\rreverse\r\t^ self reversed! !\r\r!SequenceableCollection methodsFor: 'converting' stamp: 'jm 4/27/98 04:09'!\rreversed\r\t\"Answer a copy of the receiver with element order reversed.\"\r\t\"Example: 'frog' reversed\"\r\r\t| n result src |\r\tn _ self size.\r\tresult _ self species new: n.\r\tsrc _ n + 1.\r\t1 to: n do: [:i | result at: i put: (self at: (src _ src - 1))].\r\t^ result\r! !\r\r!SequenceableCollection methodsFor: 'converting' stamp: 'sma 5/12/2000 12:52'!\rwriteStream\r\t^ WriteStream on: self! !\r\r\r!SequenceableCollection methodsFor: 'copying' stamp: 'di 1/16/98 16:40'!\r, otherCollection \r\t\"Concatenate two Strings or Collections.\"\r\t\r\t^ self copyReplaceFrom: self size + 1\r\t\t  to: self size\r\t\t  with: otherCollection\r\"\r#(2 4 6 8) , #(who do we appreciate)\r((2989 printStringBase: 16) copyFrom: 4 to: 6) , ' boy!!'\r\"! !\r\r!SequenceableCollection methodsFor: 'copying' stamp: 'sma 6/1/2000 16:05'!\rcopyAfter: anElement\r\t\"Answer a copy of the receiver from after the first occurence\r\tof anElement up to the end. If no such element exists, answer \r\tan empty copy.\"\r\r\t^ self allButFirst: (self indexOf: anElement ifAbsent: [^ self copyEmpty])! !\r\r!SequenceableCollection methodsFor: 'copying' stamp: 'sma 6/1/2000 16:05'!\rcopyAfterLast: anElement\r\t\"Answer a copy of the receiver from after the last occurence\r\tof anElement up to the end. If no such element exists, answer \r\tan empty copy.\"\r\r\t^ self allButFirst: (self lastIndexOf: anElement ifAbsent: [^ self copyEmpty])! !\r\r!SequenceableCollection methodsFor: 'copying' stamp: 'sma 6/1/2000 16:07'!\rcopyEmpty\r\t^ self species new: 0! !\r\r!SequenceableCollection methodsFor: 'copying'!\rcopyFrom: start to: stop \r\t\"Answer a copy of a subset of the receiver, starting from element at \r\tindex start until element at index stop.\"\r\r\t| newSize |\r\tnewSize _ stop - start + 1.\r\t^(self species new: newSize)\r\t\treplaceFrom: 1\r\t\tto: newSize\r\t\twith: self\r\t\tstartingAt: start! !\r\r!SequenceableCollection methodsFor: 'copying' stamp: 'sma 6/1/2000 16:06'!\rcopyLast: num\r\t\"Deprecated. Use #last:\"\r\r\t^ self last: num! !\r\r!SequenceableCollection methodsFor: 'copying'!\rcopyReplaceAll: oldSubstring with: newSubstring \r\t\"Default is not to do token matching.\r\tSee also String copyReplaceTokens:with:\"\r\t^ self copyReplaceAll: oldSubstring with: newSubstring asTokens: false\r\t\"'How now brown cow?' copyReplaceAll: 'ow' with: 'ello'\"\r\t\"'File asFile Files File''s File' copyReplaceTokens: 'File' with: 'Pile'\"! !\r\r!SequenceableCollection methodsFor: 'copying' stamp: 'ar 10/16/2001 19:03'!\rcopyReplaceFrom: start to: stop with: replacementCollection \r\t\"Answer a copy of the receiver satisfying the following conditions: If \r\tstop is less than start, then this is an insertion; stop should be exactly \r\tstart-1, start = 1 means insert before the first character, start = size+1 \r\tmeans append after last character. Otherwise, this is a replacement; start \r\tand stop have to be within the receiver's bounds.\"\r\r\t| newSequenceableCollection newSize endReplacement |\r\tnewSize _ self size - (stop - start + 1) + replacementCollection size.\r\tendReplacement _ start - 1 + replacementCollection size.\r\tnewSequenceableCollection _ self species new: newSize.\r\tstart > 1 ifTrue:[\r\t\tnewSequenceableCollection\r\t\t\treplaceFrom: 1\r\t\t\tto: start - 1\r\t\t\twith: self\r\t\t\tstartingAt: 1].\r\tstart <= endReplacement ifTrue:[\r\t\tnewSequenceableCollection\r\t\t\treplaceFrom: start\r\t\t\tto: endReplacement\r\t\t\twith: replacementCollection\r\t\t\tstartingAt: 1].\r\tendReplacement < newSize ifTrue:[\r\t\tnewSequenceableCollection\r\t\t\treplaceFrom: endReplacement + 1\r\t\t\tto: newSize\r\t\t\twith: self\r\t\t\tstartingAt: stop + 1].\r\t^newSequenceableCollection! !\r\r!SequenceableCollection methodsFor: 'copying' stamp: 'sma 6/1/2000 16:00'!\rcopyUpTo: anElement \r\t\"Answer all elements up to but not including anObject. If there\r\tis no such object, answer a copy of the receiver.\"\r\r\t^ self first: (self indexOf: anElement ifAbsent: [^ self copy]) - 1! !\r\r!SequenceableCollection methodsFor: 'copying' stamp: 'sma 6/1/2000 16:02'!\rcopyUpToLast: anElement\r\t\"Answer a copy of the receiver from index 1 to the last occurrence of \r\tanElement, not including anElement.\"\r\r\t^ self first: (self lastIndexOf: anElement ifAbsent: [^ self copy]) - 1! !\r\r!SequenceableCollection methodsFor: 'copying'!\rcopyWith: newElement \r\t\"Answer a copy of the receiver that is 1 bigger than the receiver and has \r\tnewElement at the last element.\"\r\r\t| newIC |\r\tnewIC _ self species new: self size + 1.\r\tnewIC \r\t\treplaceFrom: 1\r\t\tto: self size\r\t\twith: self\r\t\tstartingAt: 1.\r\tnewIC at: newIC size put: newElement.\r\t^newIC! !\r\r!SequenceableCollection methodsFor: 'copying' stamp: 'ajh 9/27/2002 12:09'!\rcopyWithFirst: newElement \r\t\"Answer a copy of the receiver that is 1 bigger than the receiver with newElement as the first element.\"\r\r\t| newIC |\r\tnewIC _ self species ofSize: self size + 1.\r\tnewIC \r\t\treplaceFrom: 2\r\t\tto: self size + 1\r\t\twith: self\r\t\tstartingAt: 1.\r\tnewIC at: 1 put: newElement.\r\t^ newIC! !\r\r!SequenceableCollection methodsFor: 'copying' stamp: 'sma 6/1/2000 15:38'!\rcopyWithoutFirst\r\t\"Deprecatd. Return a copy of the receiver which doesn't include\r\tthe first element.\"\r\r\t^ self allButFirst! !\r\r!SequenceableCollection methodsFor: 'copying' stamp: 'rhi 12/6/2001 14:04'!\rcopyWithoutIndex: index\r\t\"Return a copy containing all elements except the index-th.\"\r\r\t| copy |\r\tcopy := self species ofSize: self size - 1.\r\tcopy replaceFrom: 1 to: index-1 with: self startingAt: 1.\r\tcopy replaceFrom: index to: copy size with: self startingAt: index+1.\r\t^ copy! !\r\r!SequenceableCollection methodsFor: 'copying' stamp: 'fcs 1/20/2002 16:03'!\rforceTo: length paddingStartWith: elem \r\t\"Force the length of the collection to length, padding  \r\tthe beginning of the result if necessary with elem.  \r\tNote that this makes a copy.\"\r\t| newCollection padLen |\r\tnewCollection _ self species new: length.\r\tpadLen _ length - self size max: 0.\r\tnewCollection\r\t\tfrom: 1\r\t\tto: padLen\r\t\tput: elem.\r\tnewCollection\r\t\treplaceFrom: padLen + 1\r\t\tto: ((padLen + self size) min: length)\r\t\twith: self\r\t\tstartingAt:  1.\r\t^ newCollection! !\r\r!SequenceableCollection methodsFor: 'copying' stamp: 'sma 4/22/2000 18:01'!\rforceTo: length paddingWith: elem\r\t\"Force the length of the collection to length, padding\r\tif necessary with elem.  Note that this makes a copy.\"\r\r\t| newCollection copyLen |\r\tnewCollection _ self species new: length.\r\tcopyLen _ self size min: length.\r\tnewCollection replaceFrom: 1 to: copyLen with: self startingAt: 1.\r\tnewCollection from: copyLen + 1 to: length put: elem.\r\t^ newCollection! !\r\r!SequenceableCollection methodsFor: 'copying'!\rshallowCopy\r\r\t^self copyFrom: 1 to: self size! !\r\r!SequenceableCollection methodsFor: 'copying' stamp: 'sma 5/12/2000 12:36'!\rshuffled\r\t^ self shuffledBy: Collection randomForPicking\r\r\"Examples:\r\t($A to: $Z) shuffled\r\"! !\r\r!SequenceableCollection methodsFor: 'copying' stamp: 'djp 10/23/1999 22:12'!\rshuffledBy: aRandom\r\t| copy | \r\tcopy _ self shallowCopy.\r\tcopy size to: 1 by: -1 do: \r\t\t[:i | copy swap: i with: ((1 to: i) atRandom: aRandom)].\r\t^ copy! !\r\r!SequenceableCollection methodsFor: 'copying' stamp: 'sma 4/28/2000 18:34'!\rsortBy: aBlock\r\t\"Create a copy that is sorted.  Sort criteria is the block that accepts two arguments.\r\tWhen the block is true, the first arg goes first ([:a :b | a > b] sorts in descending\r\torder).\"\r\r\t^ (self asSortedCollection: aBlock) asOrderedCollection! !\r\r\r!SequenceableCollection methodsFor: 'enumerating' stamp: 'ajh 8/6/2002 15:03'!\rallButFirstDo: block\r\r\t2 to: self size do:\r\t\t[:index | block value: (self at: index)]! !\r\r!SequenceableCollection methodsFor: 'enumerating' stamp: 'ajh 8/6/2002 15:01'!\rallButLastDo: block\r\r\t1 to: self size - 1 do:\r\t\t[:index | block value: (self at: index)]! !\r\r!SequenceableCollection methodsFor: 'enumerating' stamp: 'tk 7/30/97 12:41'!\rasDigitsToPower: anInteger do: aBlock\r\t\"Repeatedly value aBlock with a single Array.  Adjust the collection\r\tso that aBlock is presented all (self size raisedTo: anInteger) possible \r\tcombinations of the receiver's elements taken as digits of an anInteger long number.\"\r\t\"(0 to: 1) asDigitsToPower: 4 do: [:each | Transcript cr; show: each printString]\"\r\r\t| aCollection |\r\taCollection _ Array new: anInteger.\r\tself asDigitsAt: 1 in: aCollection do: aBlock! !\r\r!SequenceableCollection methodsFor: 'enumerating' stamp: 'sma 5/12/2000 11:46'!\rcollect: aBlock \r\t\"Evaluate aBlock with each of the receiver's elements as the argument.  \r\tCollect the resulting values into a collection like the receiver. Answer  \r\tthe new collection.\"\r\r\t| newCollection |\r\tnewCollection _ self species new: self size.\r\t1 to: self size do:\r\t\t[:index |\r\t\tnewCollection at: index put: (aBlock value: (self at: index))].\r\t^ newCollection! !\r\r!SequenceableCollection methodsFor: 'enumerating' stamp: 'sma 6/1/2000 11:47'!\rcollect: aBlock from: firstIndex to: lastIndex\r\t\"Refer to the comment in Collection|collect:.\"\r\r\t| size result j |\r\tsize _ lastIndex - firstIndex + 1.\r\tresult _ self species new: size.\r\tj _ firstIndex.\r\t1 to: size do: [:i | result at: i put: (aBlock value: (self at: j)). j _ j + 1].\r\t^ result! !\r\r!SequenceableCollection methodsFor: 'enumerating' stamp: 'di 7/13/97 09:44'!\rcollectWithIndex: elementAndIndexBlock\r\t\"Use the new version with consistent naming\"\r\t^ self withIndexCollect: elementAndIndexBlock! !\r\r!SequenceableCollection methodsFor: 'enumerating' stamp: 'tk 7/30/97 12:52'!\rcombinations: kk atATimeDo: aBlock\r\t\"Take the items in the receiver, kk at a time, and evaluate the block for each combination.  Hand in an array of elements of self as the block argument.  Each combination only occurs once, and order of the elements does not matter.  There are (self size take: kk) combinations.\"\r\t\" 'abcde' combinations: 3 atATimeDo: [:each | Transcript cr; show: each printString]\"\r\r\t| aCollection |\r\taCollection _ Array new: kk.\r\tself combinationsAt: 1 in: aCollection after: 0 do: aBlock! !\r\r!SequenceableCollection methodsFor: 'enumerating'!\rdo: aBlock \r\t\"Refer to the comment in Collection|do:.\"\r\t1 to: self size do:\r\t\t[:index | aBlock value: (self at: index)]! !\r\r!SequenceableCollection methodsFor: 'enumerating' stamp: 'sma 5/12/2000 11:56'!\rdo: elementBlock separatedBy: separatorBlock\r\t\"Evaluate the elementBlock for all elements in the receiver,\r\tand evaluate the separatorBlock between.\"\r\r\t1 to: self size do:\r\t\t[:index |\r\t\tindex = 1 ifFalse: [separatorBlock value].\r\t\telementBlock value: (self at: index)]! !\r\r!SequenceableCollection methodsFor: 'enumerating' stamp: 'ar 5/1/1999 05:01'!\rdo: aBlock without: anItem\r\t\"Enumerate all elements in the receiver.\r\tExecute aBlock for those elements that are not equal to the given item\"\r\t\"Refer to the comment in Collection|do:.\"\r\t1 to: self size do:\r\t\t[:index | anItem = (self at: index) ifFalse:[aBlock value: (self at: index)]]! !\r\r!SequenceableCollection methodsFor: 'enumerating' stamp: 'di 7/13/97 09:43'!\rdoWithIndex: elementAndIndexBlock\r\t\"Use the new version with consistent naming\"\r\t^ self withIndexDo: elementAndIndexBlock! !\r\r!SequenceableCollection methodsFor: 'enumerating' stamp: 'ar 6/3/2000 15:53'!\rfindBinary: aBlock\r\t\"Search for an element in the receiver using binary search.\r\tThe argument aBlock is a one-element block returning\r\t\t0 \t- if the element is the one searched for\r\t\t<0\t- if the search should continue in the first half\r\t\t>0\t- if the search should continue in the second half\r\tIf no matching element is found, raise an error.\r\tExamples:\r\t\t#(1 3 5 7 11 15 23) findBinary:[:arg| 11 - arg]\r\t\"\r\t^self findBinary: aBlock ifNone: [self errorNotFound: aBlock]! !\r\r!SequenceableCollection methodsFor: 'enumerating' stamp: 'ar 6/3/2000 15:52'!\rfindBinary: aBlock ifNone: exceptionBlock\r\t\"Search for an element in the receiver using binary search.\r\tThe argument aBlock is a one-element block returning\r\t\t0 \t- if the element is the one searched for\r\t\t<0\t- if the search should continue in the first half\r\t\t>0\t- if the search should continue in the second half\r\tIf no matching element is found, evaluate exceptionBlock.\"\r\t| index low high test item |\r\tlow _ 1.\r\thigh _ self size.\r\t[index _ high + low // 2.\r\tlow > high] whileFalse:[\r\t\ttest _ aBlock value: (item _ self at: index).\r\t\ttest = 0 \r\t\t\tifTrue:[^item]\r\t\t\tifFalse:[test > 0\r\t\t\t\tifTrue: [low _ index + 1]\r\t\t\t\tifFalse: [high _ index - 1]]].\r\t^exceptionBlock value! !\r\r!SequenceableCollection methodsFor: 'enumerating' stamp: 'ar 6/3/2000 15:54'!\rfindBinaryIndex: aBlock\r\t\"Search for an element in the receiver using binary search.\r\tThe argument aBlock is a one-element block returning\r\t\t0 \t- if the element is the one searched for\r\t\t<0\t- if the search should continue in the first half\r\t\t>0\t- if the search should continue in the second half\r\tIf no matching element is found, raise an error.\r\tExamples:\r\t\t#(1 3 5 7 11 15 23) findBinaryIndex:[:arg| 11 - arg]\r\t\"\r\t^self findBinaryIndex: aBlock ifNone: [self errorNotFound: aBlock]! !\r\r!SequenceableCollection methodsFor: 'enumerating' stamp: 'ar 6/3/2000 15:54'!\rfindBinaryIndex: aBlock ifNone: exceptionBlock\r\t\"Search for an element in the receiver using binary search.\r\tThe argument aBlock is a one-element block returning\r\t\t0 \t- if the element is the one searched for\r\t\t<0\t- if the search should continue in the first half\r\t\t>0\t- if the search should continue in the second half\r\tIf no matching element is found, evaluate exceptionBlock.\"\r\t| index low high test |\r\tlow _ 1.\r\thigh _ self size.\r\t[index _ high + low // 2.\r\tlow > high] whileFalse:[\r\t\ttest _ aBlock value: (self at: index).\r\t\ttest = 0 \r\t\t\tifTrue:[^index]\r\t\t\tifFalse:[test > 0\r\t\t\t\tifTrue: [low _ index + 1]\r\t\t\t\tifFalse: [high _ index - 1]]].\r\t^exceptionBlock value! !\r\r!SequenceableCollection methodsFor: 'enumerating'!\rfindFirst: aBlock\r\t\"Return the index of my first element for which aBlock evaluates as true.\"\r\r\t| index |\r\tindex _ 0.\r\t[(index _ index + 1) <= self size] whileTrue:\r\t\t[(aBlock value: (self at: index)) ifTrue: [^index]].\r\t^ 0! !\r\r!SequenceableCollection methodsFor: 'enumerating'!\rfindLast: aBlock\r\t\"Return the index of my last element for which aBlock evaluates as true.\"\r\r\t| index |\r\tindex _ self size + 1.\r\t[(index _ index - 1) >= 1] whileTrue:\r\t\t[(aBlock value: (self at: index)) ifTrue: [^index]].\r\t^ 0! !\r\r!SequenceableCollection methodsFor: 'enumerating' stamp: 'sma 5/12/2000 18:11'!\rfrom: start to: stop do: aBlock\r\t\"Evaluate aBlock for all elements between start and stop (inclusive).\"\r\r\tstart to: stop do: [:index | aBlock value: (self at: index)]! !\r\r!SequenceableCollection methodsFor: 'enumerating' stamp: 'sma 5/12/2000 18:13'!\rkeysAndValuesDo: aBlock \r\t\"Enumerate the receiver with all the keys (aka indices) and values.\"\r\r\t1 to: self size do: [:index | aBlock value: index value: (self at: index)]! !\r\r!SequenceableCollection methodsFor: 'enumerating' stamp: 'di 11/12/1998 15:01'!\rpairsCollect: aBlock \r\t\"Evaluate aBlock with my elements taken two at a time, and return an Array with the results\"\r\r\t^ (1 to: self size // 2) collect:\r\t\t[:index | aBlock value: (self at: 2 * index - 1) value: (self at: 2 * index)]\r\"\r#(1 'fred' 2 'charlie' 3 'elmer') pairsCollect:\r\t[:a :b | b, ' is number ', a printString]\r\"! !\r\r!SequenceableCollection methodsFor: 'enumerating' stamp: 'di 11/12/1998 15:01'!\rpairsDo: aBlock \r\t\"Evaluate aBlock with my elements taken two at a time.  If there's an odd number of items, ignore the last one.  Allows use of a flattened array for things that naturally group into pairs.  See also pairsCollect:\"\r\r\t1 to: self size // 2 do:\r\t\t[:index | aBlock value: (self at: 2 * index - 1) value: (self at: 2 * index)]\r\"\r#(1 'fred' 2 'charlie' 3 'elmer') pairsDo:\r\t[:a :b | Transcript cr; show: b, ' is number ', a printString]\r\"! !\r\r!SequenceableCollection methodsFor: 'enumerating' stamp: 'ward 7/28/97 09:41'!\rpermutationsDo: aBlock\r\t\"Repeatly value aBlock with a single copy of the receiver. Reorder the copy\r\tso that aBlock is presented all (self size factorial) possible permutations.\"\r\t\"(1 to: 4) permutationsDo: [:each | Transcript cr; show: each printString]\"\r\r\tself shallowCopy permutationsStartingAt: 1 do: aBlock! !\r\r!SequenceableCollection methodsFor: 'enumerating' stamp: 'tk 12/27/2000 09:53'!\rpolynomialEval: thisX\r\t| sum valToPower |\r\t\"Treat myself as the coeficients of a polynomial in X.  Evaluate it with thisX.  First element is the constant and last is the coeficient for the highest power.\"\r\t\"  #(1 2 3) polynomialEval: 2   \"   \"is 3*X^2 + 2*X + 1 with X = 2\"\r\r\tsum _ self first.\r\tvalToPower _ thisX.\r\t2 to: self size do: [:ind | \r\t\tsum _ sum + ((self at: ind) * valToPower).\r\t\tvalToPower _ valToPower * thisX].\r\t^ sum! !\r\r!SequenceableCollection methodsFor: 'enumerating'!\rreverseDo: aBlock\r\t\"Evaluate aBlock with each of the receiver's elements as the argument, \r\tstarting with the last element and taking each in sequence up to the \r\tfirst. For SequenceableCollections, this is the reverse of the enumeration \r\tfor do:.\"\r\r\tself size to: 1 by: -1 do: [:index | aBlock value: (self at: index)]! !\r\r!SequenceableCollection methodsFor: 'enumerating'!\rreverseWith: aSequenceableCollection do: aBlock \r\t\"Evaluate aBlock with each of the receiver's elements, in reverse order, \r\talong with the  \r\tcorresponding element, also in reverse order, from \r\taSequencableCollection. \"\r\r\tself size ~= aSequenceableCollection size ifTrue: [^ self errorNoMatch].\r\tself size\r\t\tto: 1\r\t\tby: -1\r\t\tdo: [:index | aBlock value: (self at: index)\r\t\t\t\tvalue: (aSequenceableCollection at: index)]! !\r\r!SequenceableCollection methodsFor: 'enumerating'!\rselect: aBlock \r\t\"Refer to the comment in Collection|select:.\"\r\t| aStream |\r\taStream _ WriteStream on: (self species new: self size).\r\t1 to: self size do: \r\t\t[:index |\r\t\t(aBlock value: (self at: index))\r\t\t\tifTrue: [aStream nextPut: (self at: index)]].\r\t^ aStream contents! !\r\r!SequenceableCollection methodsFor: 'enumerating' stamp: 'sma 6/1/2000 16:00'!\rupTo: anObject\r\t\"Deprecated. Use copyUpTo:\"\r\r\t^ self copyUpTo: anObject! !\r\r!SequenceableCollection methodsFor: 'enumerating' stamp: 'di 8/31/1999 13:13'!\rwith: otherCollection collect: twoArgBlock \r\t\"Collect and return the result of evaluating twoArgBlock with corresponding elements from this collection and otherCollection.\"\r\t| result |\r\totherCollection size = self size ifFalse: [self error: 'otherCollection must be the same size'].\r\tresult _ self species new: self size.\r\t1 to: self size do:\r\t\t[:index | result at: index put:\r\t\t(twoArgBlock\r\t\t\tvalue: (self at: index)\r\t\t\tvalue: (otherCollection at: index))].\r\t^ result! !\r\r!SequenceableCollection methodsFor: 'enumerating' stamp: 'di 8/3/1999 15:26'!\rwith: otherCollection do: twoArgBlock \r\t\"Evaluate twoArgBlock with corresponding elements from this collection and otherCollection.\"\r\totherCollection size = self size ifFalse: [self error: 'otherCollection must be the same size'].\r\t1 to: self size do:\r\t\t[:index |\r\t\ttwoArgBlock value: (self at: index)\r\t\t\t\tvalue: (otherCollection at: index)]! !\r\r!SequenceableCollection methodsFor: 'enumerating' stamp: 'di 5/17/1998 13:34'!\rwithIndexCollect: elementAndIndexBlock \r\t\"Just like with:collect: except that the iteration index supplies the second argument to the block.\"\r\t| result |\r\tresult _ self species new: self size.\r\t1 to: self size do:\r\t\t[:index | result at: index put:\r\t\t(elementAndIndexBlock\r\t\t\tvalue: (self at: index)\r\t\t\tvalue: index)].\r\t^ result! !\r\r!SequenceableCollection methodsFor: 'enumerating' stamp: 'di 7/13/97 09:35'!\rwithIndexDo: elementAndIndexBlock \r\t\"Just like with:do: except that the iteration index supplies the second argument to the block.\"\r\t1 to: self size do:\r\t\t[:index |\r\t\telementAndIndexBlock\r\t\t\tvalue: (self at: index)\r\t\t\tvalue: index]! !\r\r\r!SequenceableCollection methodsFor: 'private' stamp: 'tk 7/30/97 12:42'!\rasDigitsAt: anInteger in: aCollection do: aBlock\r\t\"(0 to: 1) asDigitsToPower: 4 do: [:each | Transcript cr; show: each printString]\"\r\r\tself do: \r\t\t[:each | \r\t\taCollection at: anInteger put: each.\r\t\tanInteger = aCollection size \r\t\t\tifTrue: [aBlock value: aCollection]\r\t\t\tifFalse: [self asDigitsAt: anInteger + 1 in: aCollection do: aBlock]].! !\r\r!SequenceableCollection methodsFor: 'private' stamp: 'sma 5/12/2000 13:57'!\rcheckedAt: index\r\tindex > self size ifTrue: [self error: 'not enough elements'].\r\t^ self at: index! !\r\r!SequenceableCollection methodsFor: 'private' stamp: 'tk 7/30/97 12:42'!\rcombinationsAt: jj in: aCollection after: nn do: aBlock\r\t\"Choose k of N items and put in aCollection.  jj-1 already chosen.  Indexes of items are in numerical order, to avoid the same combo being used twice.  In this slot, we are allowed to use items in self indexed by nn+1 to self size.  nn is the index used for position jj-1.\"\r\t\"(1 to: 6) combinationsSize: 3 do: [:each | Transcript cr; show: each printString]\"\r\rnn+1 to: self size do: [:index | \r\t\taCollection at: jj put: (self at: index).\r\t\tjj = aCollection size \r\t\t\tifTrue: [aBlock value: aCollection]\r\t\t\tifFalse: [self combinationsAt: jj + 1 in: aCollection after: index do: aBlock]].! !\r\r!SequenceableCollection methodsFor: 'private' stamp: 'tk 1/7/98 10:57'!\rcopyReplaceAll: oldSubstring with: newSubstring asTokens: ifTokens\r\t\"Answer a copy of the receiver in which all occurrences of\r\toldSubstring have been replaced by newSubstring.\r\tifTokens (valid for Strings only) specifies that the characters\r\tsurrounding the recplacement must not be alphanumeric.\r\t\tBruce Simth,  must be incremented by 1 and not \r\tnewSubstring if ifTokens is true.  See example below. \"\r\r\t| aString startSearch currentIndex endIndex |\r\t(ifTokens and: [(self isKindOf: String) not])\r\t\tifTrue: [(self isKindOf: Text) ifFalse: [\r\t\t\tself error: 'Token replacement only valid for Strings']].\r\taString _ self.\r\tstartSearch _ 1.\r\t[(currentIndex _ aString indexOfSubCollection: oldSubstring startingAt: startSearch)\r\t\t\t > 0]\r\t\twhileTrue: \r\t\t[endIndex _ currentIndex + oldSubstring size - 1.\r\t\t(ifTokens not\r\t\t\tor: [(currentIndex = 1\r\t\t\t\t\tor: [(aString at: currentIndex-1) isAlphaNumeric not])\r\t\t\t\tand: [endIndex = aString size\r\t\t\t\t\tor: [(aString at: endIndex+1) isAlphaNumeric not]]])\r\t\t\tifTrue: [aString _ aString\r\t\t\t\t\tcopyReplaceFrom: currentIndex\r\t\t\t\t\tto: endIndex\r\t\t\t\t\twith: newSubstring.\r\t\t\t\tstartSearch _ currentIndex + newSubstring size]\r\t\t\tifFalse: [\r\t\t\t\tifTokens \r\t\t\t\t\tifTrue: [startSearch _ currentIndex + 1]\r\t\t\t\t\tifFalse: [startSearch _ currentIndex + newSubstring size]]].\r\t^ aString\r\r\"Test case:\r\t'test te string' copyReplaceAll: 'te' with: 'longone' asTokens: true   \"\r! !\r\r!SequenceableCollection methodsFor: 'private' stamp: 'sma 5/12/2000 18:06'!\rerrorFirstObject: anObject\r\tself error: 'specified object is first object'! !\r\r!SequenceableCollection methodsFor: 'private' stamp: 'sma 5/12/2000 18:03'!\rerrorLastObject: anObject\r\tself error: 'specified object is last object'! !\r\r!SequenceableCollection methodsFor: 'private'!\rerrorOutOfBounds\r\r\tself error: 'indices are out of bounds'! !\r\r!SequenceableCollection methodsFor: 'private' stamp: 'ward 7/28/97 09:38'!\rpermutationsStartingAt: anInteger do: aBlock\r\t\"#(1 2 3 4) permutationsDo: [:each | Transcript cr; show: each printString]\"\r\r\tanInteger > self size ifTrue: [^self].\r\tanInteger = self size ifTrue: [^aBlock value: self].\r\tanInteger to: self size do:\r\t\t[:i | self swap: anInteger with: i.\r\t\tself permutationsStartingAt: anInteger + 1 do: aBlock.\r\t\tself swap: anInteger with: i]! !\r\r\r!SequenceableCollection methodsFor: 'removing'!\rremove: oldObject ifAbsent: anExceptionBlock \r\t\"SequencableCollections cannot implement removing.\"\r\r\tself shouldNotImplement! !\r\r\r!SequenceableCollection methodsFor: 'testing' stamp: 'bp 2/23/2004 21:47'!\rbeginsWith: aSequenceableCollection\r\r\t(aSequenceableCollection isEmpty or: [self size < aSequenceableCollection size]) ifTrue: [^false].\r\taSequenceableCollection withIndexDo: [:each :index | (self at: index) ~= each ifTrue: [^false]].\r\t^true! !\r\r!SequenceableCollection methodsFor: 'testing' stamp: 'bp 2/23/2004 21:48'!\rendsWith: aSequenceableCollection\r\r\t| start |\r\t(aSequenceableCollection isEmpty or: [self size < aSequenceableCollection size]) ifTrue: [^false].\r\tstart _ self size - aSequenceableCollection size.\r\taSequenceableCollection withIndexDo: [:each :index | (self at: start + index) ~= each ifTrue: [^false]].\r\t^true! !\r\r!SequenceableCollection methodsFor: 'testing' stamp: 'sma 5/12/2000 14:08'!\rincludes: anObject\r\t\"Answer whether anObject is one of the receiver's elements.\"\r\r\t^ (self indexOf: anObject) ~= 0! !\r\r\r\r!SequenceableCollection methodsFor: '*packageinfo-base' stamp: 'ab 9/17/2002 01:02'!\rdo: aBlock displayingProgress: aString\r\taString\r\t\tdisplayProgressAt: Sensor cursorPoint\r\t\tfrom: 0 to: self size\r\t\tduring:\r\t\t\t[:bar |\r\t\t\tself withIndexDo:\r\t\t\t\t[:each :i |\r\t\t\t\tbar value: i.\r\t\t\t\taBlock value: each]]! !\r\r\r!SequenceableCollection methodsFor: '*connectors-enumerating' stamp: 'nk 12/30/2003 15:39'!\rgroupsOf: n atATimeCollect: aBlock \r\t\"Evaluate aBlock with my elements taken n at a time. Ignore any \r\tleftovers at the end. \r\tAllows use of a flattened  \r\tarray for things that naturally group into groups of n. \r\tIf aBlock has a single argument, pass it an array of n items, \r\totherwise, pass the items as separate arguments. \r\tSee also pairsDo:\"\r\t| passArray args  |\r\tpassArray := aBlock numArgs = 1.\r\t^(n\r\t\tto: self size\r\t\tby: n)\r\t\tcollect: [:index | \r\t\t\targs := (self copyFrom: index - n + 1 to: index) asArray.\r\t\t\tpassArray\r\t\t\t\tifTrue: [aBlock value: args]\r\t\t\t\tifFalse: [aBlock valueWithArguments: args]]! !\r\r!SequenceableCollection methodsFor: '*connectors-enumerating' stamp: 'nk 12/30/2003 15:37'!\rgroupsOf: n atATimeDo: aBlock \r\t\"Evaluate aBlock with my elements taken n at a time. Ignore any leftovers at the end.\r\tAllows use of a flattened \r\tarray for things that naturally group into groups of n.\r\tIf aBlock has a single argument, pass it an array of n items,\r\totherwise, pass the items as separate arguments.\r\tSee also pairsDo:\"\r\t| passArray args |\r\tpassArray := (aBlock numArgs = 1).\r\tn\r\t\tto: self size\r\t\tby: n\r\t\tdo: [:index | \r\t\t\targs := (self copyFrom: index - n + 1 to: index) asArray.\r\t\t\tpassArray ifTrue: [ aBlock value: args ]\r\t\t\t\tifFalse: [ aBlock valueWithArguments: args ]].! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rSequenceableCollection class\r\tinstanceVariableNames: ''!\r\r!SequenceableCollection class methodsFor: 'stream creation'!\rstreamContents: blockWithArg\r\t| stream |\r\tstream _ WriteStream on: (self new: 100).\r\tblockWithArg value: stream.\r\t^stream contents! !\r\r!SequenceableCollection class methodsFor: 'stream creation' stamp: 'di 6/20/97 09:07'!\rstreamContents: blockWithArg limitedTo: sizeLimit\r\t| stream |\r\tstream _ LimitedWriteStream on: (self new: (100 min: sizeLimit)).\r\tstream setLimit: sizeLimit limitBlock: [^ stream contents].\r\tblockWithArg value: stream.\r\t^ stream contents\r\"\rString streamContents: [:s | 1000 timesRepeat: [s nextPutAll: 'Junk']] limitedTo: 25\r 'JunkJunkJunkJunkJunkJunkJ'\r\"! !\rCollection subclass: #Set\r\tinstanceVariableNames: 'tally array'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Unordered'!\r!Set commentStamp: '<historical>' prior: 0!\rI represent a set of objects without duplicates.  I can hold anything that responds to\r#hash and #=, except for nil.  My instances will automatically grow, if necessary,\rNote that I rely on #=, not #==.  If you want a set using #==, use IdentitySet.\r\rInstance structure:\r\r  array\tAn array whose non-nil elements are the elements of the set,\r\t\tand whose nil elements are empty slots.  There is always at least one nil.\r\t\tIn fact I try to keep my \"load\" at 75% or less so that hashing will work well.\r\r  tally\tThe number of elements in the set.  The array size is always greater than this.\r\rThe core operation is #findElementOrNil:, which either finds the position where an\robject is stored in array, if it is present, or finds a suitable position holding nil, if\rits argument is not present in array,!\r\r\r!Set methodsFor: 'accessing' stamp: 'ar 4/11/2001 23:01'!\ratRandom: aGenerator\r\t\"Answer a random element of the receiver.  Uses aGenerator which\r\tshould be kept by the user in a variable and used every time. Use\r\tthis instead of #atRandom for better uniformity of random numbers \r\tbecause only you use the generator.  Causes an error if self has no \r\telements.\"\r\t| ind |\r\tself emptyCheck.\r\tind _ aGenerator nextInt: array size.\r\tind to: array size do:[:i|\r\t\t(array at: i) == nil ifFalse:[^array at: i]].\r\t1 to: ind do:[:i|\r\t\t(array at: i) == nil ifFalse:[^array at: i]].\r\tself errorEmptyCollection.! !\r\r!Set methodsFor: 'accessing' stamp: 'sma 5/12/2000 11:40'!\rcapacity\r\t\"Answer the current capacity of the receiver.\"\r\r\t^ array size! !\r\r!Set methodsFor: 'accessing' stamp: 'SqR 8/23/2000 13:51'!\rlike: anObject\r\t\"Answer an object in the receiver that is equal to anObject,\r\tnil if no such object is found. Relies heavily on hash properties\"\r\r\t| index |\r\r\t^(index _ self scanFor: anObject) = 0\r\t\tifFalse: [array at: index]! !\r\r!Set methodsFor: 'accessing'!\rsize\r\t^ tally! !\r\r!Set methodsFor: 'accessing' stamp: 'sma 5/12/2000 14:34'!\rsomeElement\r\t\"Deprecated. Use anyOne.\"\r\r\t^ self anyOne! !\r\r\r!Set methodsFor: 'adding' stamp: 'sma 5/12/2000 17:28'!\radd: newObject\r\t\"Include newObject as one of the receiver's elements, but only if\r\tnot already present. Answer newObject.\"\r\r\t| index |\r\tnewObject ifNil: [self error: 'Sets cannot meaningfully contain nil as an element'].\r\tindex _ self findElementOrNil: newObject.\r\t(array at: index) ifNil: [self atNewIndex: index put: newObject].\r\t^ newObject! !\r\r!Set methodsFor: 'adding' stamp: 'sma 5/12/2000 17:29'!\radd: newObject withOccurrences: anInteger\r\t^ self add: newObject! !\r\r\r!Set methodsFor: 'converting' stamp: 'ar 11/20/1998 16:34'!\rasSet\r\t^self! !\r\r\r!Set methodsFor: 'copying' stamp: 'sma 5/12/2000 14:54'!\rcopy\r\t^ self shallowCopy withArray: array shallowCopy! !\r\r\r!Set methodsFor: 'enumerating' stamp: 'sma 5/12/2000 11:49'!\rcollect: aBlock \r\t\"Evaluate aBlock with each of the receiver's elements as the argument.  \r\tCollect the resulting values into a collection like the receiver. Answer  \r\tthe new collection.\"\r\r\t| newSet |\r\tnewSet _ Set new: self size.\r\tarray do: [:each | each ifNotNil: [newSet add: (aBlock value: each)]].\r\t^ newSet! !\r\r!Set methodsFor: 'enumerating' stamp: 'sma 5/12/2000 14:36'!\rdo: aBlock \r\ttally = 0 ifTrue: [^ self].\r\t1 to: array size do:\r\t\t[:index |\r\t\t| each |\r\t\t(each _ array at: index) ifNotNil: [aBlock value: each]]! !\r\r!Set methodsFor: 'enumerating'!\rdoWithIndex: aBlock2\r\t\"Support Set enumeration with a counter, even though not ordered\"\r\t| index |\r\tindex _ 0.\r\tself do: [:item | aBlock2 value: item value: (index _ index+1)]! !\r\r!Set methodsFor: 'enumerating' stamp: 'jcg 6/7/2003 02:01'!\runion: aCollection\r\t\"Answer the set theoretic union of the receiver and aCollection, using the receiver's notion of equality and not side effecting the receiver at all.\"\r\r\t^ self copy addAll: aCollection; yourself\r\r! !\r\r\r!Set methodsFor: 'objects from disk' stamp: 'tk 4/8/1999 13:05'!\rcomeFullyUpOnReload: smartRefStream\r\t\"Symbols have new hashes in this image.\"\r\r\tself rehash.\r\t\"^ self\"\r! !\r\r\r!Set methodsFor: 'private'!\rarray\r\t^ array! !\r\r!Set methodsFor: 'private'!\ratNewIndex: index put: anObject\r\tarray at: index put: anObject.\r\ttally _ tally + 1.\r\tself fullCheck! !\r\r!Set methodsFor: 'private' stamp: 'SqR 8/23/2000 14:39'!\rfindElementOrNil: anObject\r\t\"Answer the index of a first slot containing either a nil (indicating an empty slot) or an element that matches the given object. Answer the index of that slot or zero. Fail if neither a match nor an empty slot is found.\"\r\r\t| index |\r\r\tindex _ self scanFor: anObject.\r\tindex > 0 ifTrue: [^index].\r\r\t\"Bad scene.  Neither have we found a matching element\r\tnor even an empty slot.  No hashed set is ever supposed to get\r\tcompletely full.\"\r\tself error: 'There is no free space in this set!!'.! !\r\r!Set methodsFor: 'private' stamp: 'SqR 8/23/2000 14:28'!\rfixCollisionsFrom: index\r\t\"The element at index has been removed and replaced by nil.\r\tThis method moves forward from there, relocating any entries\r\tthat had been placed below due to collisions with this one\"\r\r\t| length oldIndex newIndex element |\r\r\toldIndex _ index.\r\tlength _ array size.\r\t[oldIndex = length\r\t\t\tifTrue: [oldIndex _ 1]\r\t\t\tifFalse: [oldIndex _ oldIndex + 1].\r\t(element _ self keyAt: oldIndex) == nil]\r\t\twhileFalse: \r\t\t\t[newIndex _ self findElementOrNil: element.\r\t\t\toldIndex = newIndex ifFalse: [self swap: oldIndex with: newIndex]]! !\r\r!Set methodsFor: 'private' stamp: 'di 11/4/97 20:11'!\rfullCheck\r\t\"Keep array at least 1/4 free for decent hash behavior\"\r\tarray size - tally < (array size // 4 max: 1)\r\t\tifTrue: [self grow]! !\r\r!Set methodsFor: 'private'!\rgrow\r\t\"Grow the elements array and reinsert the old elements\"\r\t| oldElements |\r\toldElements _ array.\r\tarray _ Array new: array size + self growSize.\r\ttally _ 0.\r\toldElements do:\r\t\t[:each | each == nil ifFalse: [self noCheckAdd: each]]! !\r\r!Set methodsFor: 'private'!\rgrowSize\r\t^ array size max: 2! !\r\r!Set methodsFor: 'private'!\rinit: n\r\t\"Initialize array to an array size of n\"\r\tarray _ Array new: n.\r\ttally _ 0! !\r\r!Set methodsFor: 'private'!\rkeyAt: index\r\t\"May be overridden by subclasses so that fixCollisions will work\"\r\t^ array at: index! !\r\r!Set methodsFor: 'private'!\rnoCheckAdd: anObject\r\tarray at: (self findElementOrNil: anObject) put: anObject.\r\ttally _ tally + 1! !\r\r!Set methodsFor: 'private'!\rrehash\r\t| newSelf |\r\tnewSelf _ self species new: self size.\r\tself do: [:each | newSelf noCheckAdd: each].\r\tarray _ newSelf array! !\r\r!Set methodsFor: 'private'!\rscanFor: anObject\r\t\"Scan the key array for the first slot containing either a nil (indicating an empty slot) or an element that matches anObject. Answer the index of that slot or zero if no slot is found. This method will be overridden in various subclasses that have different interpretations for matching elements.\"\r\t| element start finish |\r\tstart _ (anObject hash \\\\ array size) + 1.\r\tfinish _ array size.\r\r\t\"Search from (hash mod size) to the end.\"\r\tstart to: finish do:\r\t\t[:index | ((element _ array at: index) == nil or: [element = anObject])\r\t\t\tifTrue: [^ index ]].\r\r\t\"Search from 1 to where we started.\"\r\t1 to: start-1 do:\r\t\t[:index | ((element _ array at: index) == nil or: [element = anObject])\r\t\t\tifTrue: [^ index ]].\r\r\t^ 0  \"No match AND no empty slot\"! !\r\r!Set methodsFor: 'private'!\rswap: oneIndex with: otherIndex\r\t\"May be overridden by subclasses so that fixCollisions will work\"\r\r\tarray swap: oneIndex with: otherIndex\r! !\r\r!Set methodsFor: 'private'!\rwithArray: anArray\r\t\"private -- for use only in copy\"\r\tarray _ anArray! !\r\r\r!Set methodsFor: 'removing' stamp: 'sma 5/12/2000 14:45'!\rcopyWithout: oldElement \r\t\"Answer a copy of the receiver that does not contain any\r\telements equal to oldElement.\"\r\r\t^ self copy\r\t\tremove: oldElement ifAbsent: [];\r\t\tyourself! !\r\r!Set methodsFor: 'removing'!\rremove: oldObject ifAbsent: aBlock\r\r\t| index |\r\tindex _ self findElementOrNil: oldObject.\r\t(array at: index) == nil ifTrue: [ ^ aBlock value ].\r\tarray at: index put: nil.\r\ttally _ tally - 1.\r\tself fixCollisionsFrom: index.\r\t^ oldObject! !\r\r\r!Set methodsFor: 'testing' stamp: 'tk 11/8/2001 15:35'!\r= aSet\r\tself == aSet ifTrue: [^ true].\t\"stop recursion\"\r\t(aSet isKindOf: Set) ifFalse: [^ false].\r\tself size = aSet size ifFalse: [^ false].\r\tself do: [:each | (aSet includes: each) ifFalse: [^ false]].\r\t^ true! !\r\r!Set methodsFor: 'testing'!\rincludes: anObject \r\t^ (array at: (self findElementOrNil: anObject)) ~~ nil! !\r\r!Set methodsFor: 'testing' stamp: 'sma 5/12/2000 14:46'!\roccurrencesOf: anObject \r\t^ (self includes: anObject) ifTrue: [1] ifFalse: [0]! !\r\r\r!Set methodsFor: 'explorer' stamp: 'hg 9/7/2001 11:51'!\rhasContentsInExplorer\r\r\t^self isEmpty not! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rSet class\r\tinstanceVariableNames: ''!\r\r!Set class methodsFor: 'instance creation'!\rnew\r\t^ self new: 4! !\r\r!Set class methodsFor: 'instance creation'!\rnew: nElements\r\t\"Create a Set large enough to hold nElements without growing\"\r\t^ super new init: (self sizeFor: nElements)! !\r\r!Set class methodsFor: 'instance creation'!\rnewFrom: aCollection \r\t\"Answer an instance of me containing the same elements as aCollection.\"\r\t| newCollection |\r\tnewCollection _ self new: aCollection size.\r\tnewCollection addAll: aCollection.\r\t^ newCollection\r\"\r\tSet newFrom: {1. 2. 3}\r\t{1. 2. 3} as: Set\r\"! !\r\r!Set class methodsFor: 'instance creation'!\rsizeFor: nElements\r\t\"Large enough size to hold nElements with some slop (see fullCheck)\"\r\tnElements <= 0 ifTrue: [^ 1].\r\t^ nElements+1*4//3! !\rObject subclass: #SharedPool\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Pools'!\r!SharedPool commentStamp: '<historical>' prior: 0!\rA shared pool represents a set of bindings which are accessible to all classes which import the pool in its 'pool dictionaries'. SharedPool is NOT a dictionary but rather a name space. Bindings are represented by 'class variables' - as long as we have no better way to represent them at least.!\r\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rSharedPool class\r\tinstanceVariableNames: ''!\r\r!SharedPool class methodsFor: 'name lookup' stamp: 'ar 5/18/2003 17:46'!\rbindingOf: varName\r\t\"Answer the binding of some variable resolved in the scope of the receiver\"\r\t| aSymbol binding |\r\taSymbol := varName asSymbol.\r\r\t\"First look in classVar dictionary.\"\r\tbinding := self classPool bindingOf: aSymbol.\r\tbinding ifNotNil:[^binding].\r\r\t\"Next look in shared pools.\"\r\tself sharedPools do:[:pool | \r\t\tbinding := pool bindingOf: aSymbol.\r\t\tbinding ifNotNil:[^binding].\r\t].\r\r\t\"subclassing and environment are not preserved\"\r\t^nil! !\r\r!SharedPool class methodsFor: 'name lookup' stamp: 'ar 5/18/2003 20:33'!\rbindingsDo: aBlock\r\t^self classPool bindingsDo: aBlock! !\r\r!SharedPool class methodsFor: 'name lookup' stamp: 'ar 5/18/2003 18:14'!\rclassBindingOf: varName\r\t\"For initialization messages grant the regular scope\"\r\t^super bindingOf: varName! !\r\r!SharedPool class methodsFor: 'name lookup' stamp: 'tpr 5/29/2003 18:12'!\rincludesKey: aName\r\t\"does this pool include aName\"\r\t^(self bindingOf: aName) notNil! !\rObject subclass: #SharedQueue\r\tinstanceVariableNames: 'contentsArray readPosition writePosition accessProtect readSynch'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Sequenceable'!\r!SharedQueue commentStamp: '<historical>' prior: 0!\rI provide synchronized communication of arbitrary objects between Processes. An object is sent by sending the message nextPut: and received by sending the message next. If no object has been sent when a next message is sent, the Process requesting the object will be suspended until one is sent.!\r\r\r!SharedQueue methodsFor: 'accessing' stamp: 'NS 6/18/2002 11:04'!\rflush\r\t\"Throw out all pending contents\"\r\taccessProtect critical: [\r\t\treadPosition _ 1.\r\t\twritePosition _ 1.\r\t\t\"Reset the read synchronization semaphore\"\r\t\treadSynch initSignals].! !\r\r!SharedQueue methodsFor: 'accessing' stamp: 'NS 6/18/2002 11:15'!\rflushAllSuchThat: aBlock\r\t\"Remove from the queue all objects that satisfy aBlock.\"\r\t| value newReadPos |\r\taccessProtect critical: [\r\t\tnewReadPos _ writePosition.\r\t\twritePosition-1 to: readPosition by: -1 do:\r\t\t\t[:i | value _ contentsArray at: i.\r\t\t\tcontentsArray at: i put: nil.\r\t\t\t(aBlock value: value) ifTrue: [\r\t\t\t\t\"We take an element out of the queue, and therefore, we need to decrement \r\t\t\t\tthe readSynch signals\"\r\t\t\t\treadSynch wait.\r\t\t\t] ifFalse: [\r\t\t\t\tnewReadPos _ newReadPos - 1.\r\t\t\t\tcontentsArray at: newReadPos put: value]].\r\t\treadPosition _ newReadPos].\r\t^value\r! !\r\r!SharedQueue methodsFor: 'accessing'!\rnext\r\t\"Answer the object that was sent through the receiver first and has not \r\tyet been received by anyone. If no object has been sent, suspend the \r\trequesting process until one is.\"\r\r\t| value |\r\treadSynch wait.\r\taccessProtect\r\t\tcritical: [readPosition = writePosition\r\t\t\t\t\tifTrue: \r\t\t\t\t\t\t[self error: 'Error in SharedQueue synchronization'.\r\t\t\t\t\t\t value _ nil]\r\t\t\t\t\tifFalse: \r\t\t\t\t\t\t[value _ contentsArray at: readPosition.\r\t\t\t\t\t\t contentsArray at: readPosition put: nil.\r\t\t\t\t\t\t readPosition _ readPosition + 1]].\r\t^value! !\r\r!SharedQueue methodsFor: 'accessing' stamp: 'di 10/1/2001 20:58'!\rnextOrNilSuchThat: aBlock\r\t\"Answer the next object that satisfies aBlock, skipping any intermediate objects.\r\tIf no object has been sent, answer <nil> and leave me intact.\r\tNOTA BENE:  aBlock MUST NOT contain a non-local return (^).\"\r\r\t| value readPos |\r\taccessProtect critical: [\r\t\tvalue _ nil.\r\t\treadPos _ readPosition.\r\t\t[readPos < writePosition and: [value isNil]] whileTrue: [\r\t\t\tvalue _ contentsArray at: readPos.\r\t\t\treadPos _ readPos + 1.\r\t\t\t(aBlock value: value) ifTrue: [\r\t\t\t\treadPosition to: readPos - 1 do: [ :j |\r\t\t\t\t\tcontentsArray at: j put: nil.\r\t\t\t\t].\r\t\t\t\treadPosition _ readPos.\r\t\t\t] ifFalse: [\r\t\t\t\tvalue _ nil.\r\t\t\t].\r\t\t].\r\t\treadPosition >= writePosition ifTrue: [readSynch initSignals].\r\t].\r\t^value\r\"===\rq _ SharedQueue new.\r1 to: 10 do: [ :i | q nextPut: i].\rc _ OrderedCollection new.\r[\r\tv _ q nextOrNilSuchThat: [ :e | e odd].\r\tv notNil\r] whileTrue: [\r\tc add: {v. q size}\r].\r{c. q} explore\r===\"! !\r\r!SharedQueue methodsFor: 'accessing'!\rnextPut: value \r\t\"Send value through the receiver. If a Process has been suspended \r\twaiting to receive a value through the receiver, allow it to proceed.\"\r\r\taccessProtect\r\t\tcritical: [writePosition > contentsArray size\r\t\t\t\t\t\tifTrue: [self makeRoomAtEnd].\r\t\t\t\t contentsArray at: writePosition put: value.\r\t\t\t\t writePosition _ writePosition + 1].\r\treadSynch signal.\r\t^value! !\r\r!SharedQueue methodsFor: 'accessing'!\rpeek\r\t\"Answer the object that was sent through the receiver first and has not \r\tyet been received by anyone but do not remove it from the receiver. If \r\tno object has been sent, suspend the requesting process until one is.\"\r\r\t| value |\r\taccessProtect\r\t\tcritical: [readPosition >= writePosition\r\t\t\t\t\tifTrue: [readPosition _ 1.\r\t\t\t\t\t\t\twritePosition _ 1.\r\t\t\t\t\t\t\tvalue _ nil]\r\t\t\t\t\tifFalse: [value _ contentsArray at: readPosition]].\r\t^value! !\r\r!SharedQueue methodsFor: 'accessing'!\rsize\r\t\"Answer the number of objects that have been sent through the\r\treceiver and not yet received by anyone.\"\r\r\t^writePosition - readPosition! !\r\r\r!SharedQueue methodsFor: 'testing'!\risEmpty\r\t\"Answer whether any objects have been sent through the receiver and \r\tnot yet received by anyone.\"\r\r\t^readPosition = writePosition! !\r\r\r!SharedQueue methodsFor: 'private'!\rinit: size\r\r\tcontentsArray _ Array new: size.\r\treadPosition _ 1.\r\twritePosition _ 1.\r\taccessProtect _ Semaphore forMutualExclusion.\r\treadSynch _ Semaphore new! !\r\r!SharedQueue methodsFor: 'private' stamp: 'sma 4/22/2000 18:04'!\rmakeRoomAtEnd\r\t| contentsSize |\r\treadPosition = 1\r\t\tifTrue: [contentsArray _ contentsArray , (Array new: 10)]\r\t\tifFalse: \r\t\t\t[contentsSize _ writePosition - readPosition.\r\t\t\t\"BLT direction ok for this. Lots faster!!!!!!!!!!!! SqR!!!! 4/10/2000 10:47\"\r\t\t\tcontentsArray\r\t\t\t\treplaceFrom: 1\r\t\t\t\tto: contentsSize\r\t\t\t\twith: contentsArray\r\t\t\t\tstartingAt: readPosition.\r\t\t\treadPosition _ 1.\r\t\t\twritePosition _ contentsSize + 1]! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rSharedQueue class\r\tinstanceVariableNames: ''!\r\r!SharedQueue class methodsFor: 'instance creation'!\rnew\r\t\"Answer a new instance of SharedQueue that has 10 elements.\"\r\r\t^self new: 10! !\r\r!SharedQueue class methodsFor: 'instance creation'!\rnew: anInteger \r\t^super new init: anInteger! !\rModel subclass: #SimpleServiceEntry\r\tinstanceVariableNames: 'provider label selector useLineAfter stateSelector description argumentGetter buttonLabel'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-FileList'!\r!SimpleServiceEntry commentStamp: '<historical>' prior: 0!\rI represent a service\r\rprovider : the service provider\rlabel : to be display in a menu\rselector : to do the service\ruseLineAfter\rstateSelector : a secondary selector (to be able to query state of the provider for example)\rdescription : a description for balloon for example\rargumentGetter : a selector to get additional arguments with (if selector requres them)\rbuttonLabel : a short label\r\rThe entire client interface (provided by FileList and other users of the registry)\ris this (browse #getArgumentsFrom: and the \rsenders of #argumentGetter:):\r\rfullName (returns a String with the full filename)\rdirAndFileName (returns {directory. fileName})\rreadOnlyStream (returns an open read-only stream)\r!\r\r\r!SimpleServiceEntry methodsFor: 'accessing' stamp: 'RAA 2/2/2002 08:14'!\rargumentGetter: aBlock\r\r\targumentGetter _ aBlock! !\r\r!SimpleServiceEntry methodsFor: 'accessing' stamp: 'sw 2/15/2002 17:53'!\rbuttonLabel\r\t\"Answer the label to be emblazoned on a button representing the service in a file list, for example\"\r\r\t^ buttonLabel ifNil: [label]! !\r\r!SimpleServiceEntry methodsFor: 'accessing' stamp: 'dgd 9/1/2003 12:16'!\rbuttonLabel: aString \r\t\"Set the receiver's buttonLabel, to be used on a button in a \r\ttool-pane; this is split out so that a more abbreviated wording \r\tcan be deployed if desired\"\r\tbuttonLabel := aString translated! !\r\r!SimpleServiceEntry methodsFor: 'accessing' stamp: 'sd 1/31/2002 21:03'!\rdescription\r\t\"may be used for balloon or other\"\r\r\t^ description\r! !\r\r!SimpleServiceEntry methodsFor: 'accessing' stamp: 'sd 1/31/2002 21:03'!\rdescription: aString\r\t\"may be used for balloon or other\"\r\r\tdescription := aString\r! !\r\r!SimpleServiceEntry methodsFor: 'accessing' stamp: 'sd 1/31/2002 21:10'!\rextraSelector\r\t\"normally should not be used directly\"\r\r\t^stateSelector! !\r\r!SimpleServiceEntry methodsFor: 'accessing' stamp: 'sd 1/31/2002 21:11'!\rextraSelector: aSymbol\r\r\tstateSelector := aSymbol! !\r\r!SimpleServiceEntry methodsFor: 'accessing' stamp: 'hg 8/3/2000 13:06'!\rlabel\r\r\t^label! !\r\r!SimpleServiceEntry methodsFor: 'accessing' stamp: 'sd 1/31/2002 21:38'!\rprovider\r\r\t^ provider! !\r\r!SimpleServiceEntry methodsFor: 'accessing' stamp: 'dgd 9/1/2003 12:12'!\rprovider: anObject label: aString selector: aSymbol \r\t\"basic initialization message\"\r\tprovider := anObject.\r\tlabel := aString translated.\r\tselector := aSymbol.\r\tstateSelector := #none.\r\tdescription := ''! !\r\r!SimpleServiceEntry methodsFor: 'accessing' stamp: 'sd 1/31/2002 21:09'!\rselector\r\t\"normally should not be used directly\"\r\r\t^selector! !\r\r\r!SimpleServiceEntry methodsFor: 'performing service' stamp: 'RAA 2/2/2002 08:31'!\rgetArgumentsFrom: aProvider\r\r\targumentGetter ifNil: [^aProvider fullName].\r\t^argumentGetter value: aProvider! !\r\r!SimpleServiceEntry methodsFor: 'performing service' stamp: 'nk 2/15/2004 16:15'!\rperformServiceFor: anObject\r\t\"carry out the service I provide\"\r\r\t^selector numArgs = 0\r\t\tifTrue: [provider perform: selector]\r\t\tifFalse: [provider perform: selector with: (self getArgumentsFrom: anObject) ]! !\r\r!SimpleServiceEntry methodsFor: 'performing service' stamp: 'dgd 9/1/2003 12:13'!\rprovider: anObject label: aString selector: aSymbol description: anotherString \r\t\"basic initialization message\"\r\tself\r\t\tprovider: anObject\r\t\tlabel: aString\r\t\tselector: aSymbol.\r\tstateSelector := #none.\r\tdescription := anotherString translated! !\r\r!SimpleServiceEntry methodsFor: 'performing service' stamp: 'hg 8/1/2000 19:49'!\rrequestSelector\r\t\"send me this message to ask me to perform my service\"\r\r\t^#performServiceFor:\r! !\r\r\r!SimpleServiceEntry methodsFor: 'services menu' stamp: 'nk 2/15/2004 16:16'!\raddServiceFor: served toMenu: aMenu\r\taMenu add: self label \r\t\ttarget: self \r\t\tselector: self requestSelector \r\t\targument: served.\r\tself useLineAfter ifTrue: [ aMenu addLine ].! !\r\r!SimpleServiceEntry methodsFor: 'services menu' stamp: 'hg 8/1/2000 19:53'!\ruseLineAfter\r\r\t^useLineAfter == true! !\r\r!SimpleServiceEntry methodsFor: 'services menu' stamp: 'hg 8/1/2000 19:54'!\ruseLineAfter: aBoolean\r\r\tuseLineAfter _ aBoolean\r! !\r\r\r!SimpleServiceEntry methodsFor: 'extra' stamp: 'nk 6/8/2004 16:42'!\rperformExtraFor: anObject\r\t\"carry out the extra service I provide\"\r\t\"the stateSelector can be used to ask state of the provider to be reflected in button or other\"\r\r\t^stateSelector numArgs = 0\r\t\tifTrue: [provider perform: stateSelector]\r\t\tifFalse: [provider perform: stateSelector with: (self getArgumentsFrom: anObject) ]\r! !\r\r!SimpleServiceEntry methodsFor: 'extra' stamp: 'sd 1/31/2002 21:08'!\rrequestExtraSelector\r\t\"send me this message to ask me to perform secondary service\"\r\r\t^#performExtraFor:\r! !\r\r\r!SimpleServiceEntry methodsFor: 'printing' stamp: 'nk 10/14/2003 10:04'!\rprintOn: aStream\r\r\taStream nextPutAll: self class name; nextPutAll: ': ('.\r\tself provider notNil\r\t\tifTrue: [aStream nextPutAll: provider printString].\r\taStream nextPutAll: ' --- '. \r\tself selector notNil\r\t\tifTrue: [aStream nextPutAll: selector asString].\r\taStream nextPut: $)\r\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rSimpleServiceEntry class\r\tinstanceVariableNames: ''!\r\r!SimpleServiceEntry class methodsFor: 'instance creation' stamp: 'hg 8/1/2000 18:57'!\rprovider: anObject label: aString selector: aSymbol\r\r\t^self new provider: anObject label: aString selector: aSymbol! !\r\r!SimpleServiceEntry class methodsFor: 'instance creation' stamp: 'sd 1/31/2002 22:05'!\rprovider: anObject label: aString selector: aSymbol description: anotherString\r\r\t^self new provider: anObject label: aString selector: aSymbol description: anotherString! !\r\r!SimpleServiceEntry class methodsFor: 'instance creation' stamp: 'sw 2/17/2002 02:48'!\rprovider: anObject label: aString selector: aSymbol description: anotherString buttonLabel: aLabel\r\t\"Answer a new service object with the given initializations.  This variant allows a custom button label to be provided, in order to preserve precious horizontal real-estate in the button pane, while still allowing more descriptive wordings in the popup menu\"\r\r\t^ self new provider: anObject label: aString selector: aSymbol description: anotherString; buttonLabel: aLabel; yourself! !\rInteger subclass: #SmallInteger\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Numbers'!\r!SmallInteger commentStamp: '<historical>' prior: 0!\rMy instances are 31-bit numbers, stored in twos complement form. The allowable range is approximately +- 1 billion (see SmallInteger minVal, maxVal).!\r\r\r!SmallInteger methodsFor: 'arithmetic' stamp: 'di 2/1/1999 21:29'!\r* aNumber \r\t\"Primitive. Multiply the receiver by the argument and answer with the\r\tresult if it is a SmallInteger. Fail if the argument or the result is not a\r\tSmallInteger. Essential. No Lookup. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 9>\r\t^ super * aNumber! !\r\r!SmallInteger methodsFor: 'arithmetic' stamp: 'di 2/1/1999 21:31'!\r+ aNumber \r\t\"Primitive. Add the receiver to the argument and answer with the result\r\tif it is a SmallInteger. Fail if the argument or the result is not a\r\tSmallInteger  Essential  No Lookup. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 1>\r\t^ super + aNumber! !\r\r!SmallInteger methodsFor: 'arithmetic'!\r- aNumber \r\t\"Primitive. Subtract the argument from the receiver and answer with the\r\tresult if it is a SmallInteger. Fail if the argument or the result is not a\r\tSmallInteger. Essential. No Lookup. See Object documentation\r\twhatIsAPrimitive.\"\r\r\t<primitive: 2>\r\t^super - aNumber! !\r\r!SmallInteger methodsFor: 'arithmetic' stamp: 'hh 10/3/2000 11:47'!\r/ aNumber \r\t\"Primitive. This primitive (for /) divides the receiver by the argument\r\tand returns the result if the division is exact. Fail if the result is not a\r\twhole integer. Fail if the argument is 0 or is not a SmallInteger. Optional.\r\tNo Lookup. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 10>\r\taNumber isZero ifTrue: [^(ZeroDivide dividend: self) signal].\r\t(aNumber isMemberOf: SmallInteger)\r\t\tifTrue: [^(Fraction numerator: self denominator: aNumber) reduced]\r\t\tifFalse: [^super / aNumber]! !\r\r!SmallInteger methodsFor: 'arithmetic' stamp: 'tk 11/30/2001 11:55'!\r// aNumber \r\t\"Primitive. Divide the receiver by the argument and answer with the\r\tresult. Round the result down towards negative infinity to make it a\r\twhole integer. Fail if the argument is 0 or is not a SmallInteger.\r\tEssential. No Lookup. See Object documentation whatIsAPrimitive. \"\r\r\t<primitive: 12>\r\t^ super // aNumber \t\"Do with quo: if primitive fails\"! !\r\r!SmallInteger methodsFor: 'arithmetic' stamp: 'tk 11/30/2001 11:53'!\r\\\\ aNumber \r\t\"Primitive. Take the receiver modulo the argument. The result is the\r\tremainder rounded towards negative infinity, of the receiver divided by\r\tthe argument Fail if the argument is 0 or is not a SmallInteger. Optional.\r\tNo Lookup. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 11>\r\t^ super \\\\ aNumber \t\"will use // to compute it if primitive fails\"! !\r\r!SmallInteger methodsFor: 'arithmetic' stamp: 'LC 4/22/1998 14:21'!\rgcd: anInteger \r\t\"See SmallInteger (Integer) | gcd:\"\r\t| n m |\r\tn _ self.\r\tm _ anInteger.\r\t[n = 0]\r\t\twhileFalse: \r\t\t\t[n _ m \\\\ (m _ n)].\r\t^ m abs! !\r\r!SmallInteger methodsFor: 'arithmetic' stamp: 'sr 5/28/2000 04:41'!\rquo: aNumber \r\t\"Primitive. Divide the receiver by the argument and answer with the \r\tresult. Round the result down towards zero to make it a whole integer. \r\tFail if the argument is 0 or is not a SmallInteger. Optional. See Object \r\tdocumentation whatIsAPrimitive.\"\r\t<primitive: 13>\r\taNumber = 0 ifTrue: [^ (ZeroDivide dividend: self) signal].\r\t(aNumber isMemberOf: SmallInteger)\r\t\tifFalse: [^ super quo: aNumber].\r\t(aNumber == -1 and: [self == self class minVal])\r\t\tifTrue: [\"result is aLargeInteger\" ^ self negated].\r\tself primitiveFailed! !\r\r\r!SmallInteger methodsFor: 'bit manipulation' stamp: 'wb 4/28/1998 12:17'!\rbitAnd: arg \r\t\"Primitive. Answer an Integer whose bits are the logical OR of the\r\treceiver's bits and those of the argument, arg.\r\tNumbers are interpreted as having 2's-complement representation.\r\tEssential.  See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 14>\r\tself >= 0 ifTrue: [^ arg bitAnd: self].\r\t^ (self bitInvert bitOr: arg bitInvert) bitInvert! !\r\r!SmallInteger methodsFor: 'bit manipulation' stamp: 'di 4/30/1998 10:33'!\rbitOr: arg \r\t\"Primitive. Answer an Integer whose bits are the logical OR of the\r\treceiver's bits and those of the argument, arg.\r\tNumbers are interpreted as having 2's-complement representation.\r\tEssential.  See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 15>\r\tself >= 0 ifTrue: [^ arg bitOr: self].\r\t^ arg < 0\r\t\tifTrue: [(self bitInvert bitAnd: arg bitInvert) bitInvert]\r\t\tifFalse: [(self bitInvert bitClear: arg) bitInvert]! !\r\r!SmallInteger methodsFor: 'bit manipulation' stamp: 'wb 4/28/1998 12:17'!\rbitShift: arg \r\t\"Primitive. Answer an Integer whose value is the receiver's value shifted\r\tleft by the number of bits indicated by the argument. Negative arguments\r\tshift right. The receiver is interpreted as having 2's-complement representation.\r\tEssential.  See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 17>\r\tself >= 0 ifTrue: [^ super bitShift: arg].\r\t^ arg >= 0\r\t\tifTrue: [(self negated bitShift: arg) negated]\r\t\tifFalse: [(self bitInvert bitShift: arg) bitInvert]! !\r\r!SmallInteger methodsFor: 'bit manipulation' stamp: 'wb 4/28/1998 12:17'!\rbitXor: arg \r\t\"Primitive. Answer an Integer whose bits are the logical XOR of the\r\treceiver's bits and those of the argument, arg.\r\tNumbers are interpreted as having 2's-complement representation.\r\tEssential.  See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 16>\r\tself >= 0 ifTrue: [^ arg bitXor: self].\r\t^ arg < 0\r\t\tifTrue: [self bitInvert bitXor: arg bitInvert]\r\t\tifFalse: [(self bitInvert bitXor: arg) bitInvert]! !\r\r!SmallInteger methodsFor: 'bit manipulation' stamp: 'SqR 8/3/2000 13:29'!\rhashMultiply\r\t| low |\r\r\tlow _ self bitAnd: 16383.\r\t^(16r260D * low + ((16r260D * (self bitShift: -14) + (16r0065 * low) bitAnd: 16383) * 16384))\r\t\t\tbitAnd: 16r0FFFFFFF! !\r\r!SmallInteger methodsFor: 'bit manipulation' stamp: 'sr 6/8/2000 02:07'!\rhighBit\r\t\"Answer the index of the high order bit of the receiver, or zero if the  \r\treceiver is zero. Raise an error if the receiver is negative, since  \r\tnegative integers are defined to have an infinite number of leading 1's \r\tin 2's-complement arithmetic. Use >>highBitOfMagnitude if you want to \r\tget the highest bit of the magnitude.\"\r\tself < 0 ifTrue: [^ self error: 'highBit is not defined for negative integers'].\r\t^ self highBitOfPositiveReceiver! !\r\r!SmallInteger methodsFor: 'bit manipulation' stamp: 'sr 6/8/2000 02:08'!\rhighBitOfMagnitude\r\t\"Answer the index of the high order bit of the receiver, or zero if the  \r\treceiver is zero. This method is used for negative SmallIntegers as well,  \r\tsince Squeak's LargeIntegers are sign/magnitude.\"\r\t^ self abs highBitOfPositiveReceiver! !\r\r!SmallInteger methodsFor: 'bit manipulation' stamp: 'jm 2/19/98 12:11'!\rlowBit\r\t\" Answer the index of the low order one bit.\r\t\t2r00101000 lowBit       (Answers: 4)\r\t\t2r-00101000 lowBit      (Answers: 4)\r\t  First we skip bits in groups of 4, then single bits.\r\t  While not optimal, this is a good tradeoff; long\r\t  integer #lowBit always invokes us with bytes.\"\r\t| n result |\r\tn := self.\r\tn = 0 ifTrue: [ ^ 0 ].\r\tresult := 1.\r\t[ (n bitAnd: 16rF) = 0 ]\r\t\twhileTrue: [\r\t\t\tresult := result + 4.\r\t\t\tn := n bitShift: -4 ].\r\t[ (n bitAnd: 1) = 0 ]\r\t\twhileTrue: [\r\t\t\tresult := result + 1.\r\t\t\tn := n bitShift: -1 ].\r\t^ result! !\r\r\r!SmallInteger methodsFor: 'testing'!\reven\r\r\t^(self bitAnd: 1) = 0! !\r\r!SmallInteger methodsFor: 'testing'!\rodd\r\r\t^(self bitAnd: 1) = 1! !\r\r\r!SmallInteger methodsFor: 'comparing'!\r< aNumber \r\t\"Primitive. Compare the receiver with the argument and answer with\r\ttrue if the receiver is less than the argument. Otherwise answer false.\r\tFail if the argument is not a SmallInteger. Essential. No Lookup. See\r\tObject documentation whatIsAPrimitive.\"\r\r\t<primitive: 3>\r\t^super < aNumber! !\r\r!SmallInteger methodsFor: 'comparing'!\r<= aNumber \r\t\"Primitive. Compare the receiver with the argument and answer true if\r\tthe receiver is less than or equal to the argument. Otherwise answer\r\tfalse. Fail if the argument is not a SmallInteger. Optional. No Lookup.\r\tSee Object documentation whatIsAPrimitive. \"\r\r\t<primitive: 5>\r\t^super <= aNumber! !\r\r!SmallInteger methodsFor: 'comparing'!\r= aNumber \r\t\"Primitive. Compare the receiver with the argument and answer true if\r\tthe receiver is equal to the argument. Otherwise answer false. Fail if the\r\targument is not a SmallInteger. Essential. No Lookup. See Object\r\tdocumentation whatIsAPrimitive. \"\r\r\t<primitive: 7>\r\t^super = aNumber! !\r\r!SmallInteger methodsFor: 'comparing'!\r> aNumber \r\t\"Primitive. Compare the receiver with the argument and answer true if\r\tthe receiver is greater than the argument. Otherwise answer false. Fail if\r\tthe argument is not a SmallInteger. Essential. No Lookup. See Object\r\tdocumentation whatIsAPrimitive.\"\r\r\t<primitive: 4>\r\t^super > aNumber! !\r\r!SmallInteger methodsFor: 'comparing'!\r>= aNumber \r\t\"Primitive. Compare the receiver with the argument and answer true if\r\tthe receiver is greater than or equal to the argument. Otherwise answer\r\tfalse. Fail if the argument is not a SmallInteger. Optional. No Lookup.\r\tSee Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 6>\r\t^super >= aNumber! !\r\r!SmallInteger methodsFor: 'comparing'!\rhash\r\r\t^self! !\r\r!SmallInteger methodsFor: 'comparing'!\ridentityHash\r\r\t^self! !\r\r!SmallInteger methodsFor: 'comparing' stamp: 'di 9/27/97 20:32'!\ridentityHashMappedBy: map\r\r\t^ self! !\r\r!SmallInteger methodsFor: 'comparing'!\r~= aNumber \r\t\"Primitive. Compare the receiver with the argument and answer true if\r\tthe receiver is not equal to the argument. Otherwise answer false. Fail if\r\tthe argument is not a SmallInteger. Essential. No Lookup. See Object\r\tdocumentation whatIsAPrimitive.\"\r\r\t<primitive: 8>\r\t^super ~= aNumber! !\r\r\r!SmallInteger methodsFor: 'copying' stamp: 'tk 6/26/1998 11:34'!\rclone\r! !\r\r!SmallInteger methodsFor: 'copying'!\rdeepCopy! !\r\r!SmallInteger methodsFor: 'copying'!\rshallowCopy! !\r\r!SmallInteger methodsFor: 'copying' stamp: 'tk 8/19/1998 16:04'!\rveryDeepCopyWith: deepCopier\r\t\"Return self.  I can't be copied.  Do not record me.\"! !\r\r\r!SmallInteger methodsFor: 'converting'!\rasFloat\r\t\"Primitive. Answer a Float that represents the value of the receiver.\r\tEssential. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 40>\r\tself primitiveFailed! !\r\r\r!SmallInteger methodsFor: 'printing' stamp: 'gk 11/26/2003 10:27'!\rprintOn: aStream base: base\r\t\"Refer to the comment in Integer|printOn:base:.\"\r\t\"SmallInteger maxVal printStringBase: 2\"\r\r\t| x i digits letters |\r\tself < 0 ifTrue: [\r\t\taStream nextPut: $-.\r\t\t^ self negated printOn: aStream base: base].\r\tdigits _ '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'.\r\tbase = 10 ifFalse: [aStream print: base; nextPut: $r].\r\tletters _ String new: 32.\r\tx _ self.\r\ti _ 33.\r\t[x >= base] whileTrue: [\r\t\tletters at: (i _ i - 1) put: (digits at: (x \\\\ base) + 1).\r\t\tx _ x // base].\r\tletters at: (i _ i - 1) put: (digits at: x + 1).\r\taStream nextPutAll: (letters copyFrom: i to: letters size)! !\r\r!SmallInteger methodsFor: 'printing' stamp: 'RAA 8/24/2001 13:59'!\rthreeDigitName\r\r\t| units answer |\r\r\tself = 0 ifTrue: [^''].\r\tunits _ #('one' 'two' 'three' 'four' 'five' 'six' 'seven' 'eight' 'nine' 'ten' \r\t\t'eleven' 'twelve' 'thirteen' 'fourteen' 'fifteen' 'sixteen' 'seventeen' \r\t\t'eighteen' 'nineteen').\r\tself > 99 ifTrue: [\r\t\tanswer _ (units at: self // 100),' hundred'.\r\t\t(self \\\\ 100) = 0 ifFalse: [\r\t\t\tanswer _ answer,' ',(self \\\\ 100) threeDigitName\r\t\t].\r\t\t^answer\r\t].\r\tself < 20 ifTrue: [\r\t\t^units at: self\r\t].\r\tanswer _ #('twenty' 'thirty' 'forty' 'fifty' 'sixty' 'seventy' 'eighty' 'ninety')\r\t\t\tat: self // 10 - 1.\r\t(self \\\\ 10) = 0 ifFalse: [\r\t\tanswer _ answer,'-',(units at: self \\\\ 10)\r\t].\r\t^answer! !\r\r!SmallInteger methodsFor: 'printing' stamp: 'sw 10/26/2000 09:01'!\runiqueNameForReference\r\t\"Answer a nice name by which the receiver can be referred to by other objects.   For SmallIntegers, we can actually just use the receiver's own printString, though this is pretty strange in some ways.\"\r\r\t^ self asString! !\r\r\r!SmallInteger methodsFor: 'system primitives'!\rasOop\r\t\"Answer an object pointer as an integer, return negative number for SmallInteger\"\r\r\t^ self! !\r\r!SmallInteger methodsFor: 'system primitives' stamp: 'tk 3/24/1999 20:28'!\rdigitAt: n \r\t\"Answer the value of an indexable field in the receiver.  LargePositiveInteger uses bytes of base two number, and each is a 'digit' base 256.  Fail if the argument (the index) is not an Integer or is out of bounds.\"\r\tn>4 ifTrue: [^ 0].\r\tself < 0\r\t\tifTrue: \r\t\t\t[self = SmallInteger minVal ifTrue:\r\t\t\t\t[\"Can't negate minVal -- treat specially\"\r\t\t\t\t^ #(0 0 0 64) at: n].\r\t\t\t^ ((0-self) bitShift: (1-n)*8) bitAnd: 16rFF]\r\t\tifFalse: [^ (self bitShift: (1-n)*8) bitAnd: 16rFF]! !\r\r!SmallInteger methodsFor: 'system primitives' stamp: 'md 6/5/2003 10:42'!\rdigitAt: n put: value \r\t\"Fails. The digits of a small integer can not be modified.\"\r\r\tself error: 'You can''t store in a SmallInteger'! !\r\r!SmallInteger methodsFor: 'system primitives'!\rdigitLength\r\t\"Answer the number of indexable fields in the receiver. This value is the \r\tsame as the largest legal subscript. Included so that a SmallInteger can \r\tbehave like a LargePositiveInteger or LargeNegativeInteger.\"\r\r\t(self < 16r100 and: [self > -16r100]) ifTrue: [^ 1].\r\t(self < 16r10000 and: [self > -16r10000]) ifTrue: [^ 2].\r\t(self < 16r1000000 and: [self > -16r1000000]) ifTrue: [^ 3].\r\t^ 4! !\r\r!SmallInteger methodsFor: 'system primitives'!\rinstVarAt: i \r\t\"Small integer has to be specially handled.\"\r\r\ti = 1 ifTrue: [^self].\r\tself error: 'argument too big for small integer instVarAt:'! !\r\r!SmallInteger methodsFor: 'system primitives' stamp: 'tk 5/14/1999 20:54'!\rnextInstance\r\t\"SmallIntegers can't be enumerated this way.  There are a finite number of them from from (SmallInteger minVal) to (SmallInteger maxVal), but you'll have to enumerate them yourself with:\r\t(SmallInteger minVal) to: (SmallInteger maxVal) do: [:integer | <your code here>].\r\t\"\r\r\tself shouldNotImplement ! !\r\r!SmallInteger methodsFor: 'system primitives' stamp: 'je 10/22/2002 12:10'!\rnextObject\r\t\"SmallIntegers are immediate objects, and, as such, do not have successors in object memory.\"\r\r\tself shouldNotImplement ! !\r\r\r!SmallInteger methodsFor: 'private'!\rfromString: str radix: radix\r\r\t| maxdigit c val |\r\tmaxdigit _ \r\t\tradix + (radix > 10\r\t\t\t\t\tifTrue: [55 - 1]\r\t\t\t\t\tifFalse: [48 - 1]).\r\tval _ 0.\r\t1 to: str size do: \r\t\t[:i | \r\t\tc _ str at: i.\r\t\t(c < 48 ifFalse: [c > maxdigit])\r\t\t\tifTrue: [^false].\r\t\tval _ val * radix + (c <= 57\r\t\t\t\t\t\t\tifTrue: [c - 48]\r\t\t\t\t\t\t\tifFalse: \r\t\t\t\t\t\t\t\t[c < 65 ifTrue: [^false].\r\t\t\t\t\t\t\t\tc - 55])].\r\t^val! !\r\r!SmallInteger methodsFor: 'private' stamp: 'sr 6/8/2000 01:14'!\rhighBitOfPositiveReceiver\r\t| shifted bitNo |\r\t\"Answer the index of the high order bit of the receiver, or zero if the \r\treceiver is zero. Receiver has to be positive!!\"\r\tshifted _ self.\r\tbitNo _ 0.\r\t[shifted < 16]\r\t\twhileFalse: \r\t\t\t[shifted _ shifted bitShift: -4.\r\t\t\tbitNo _ bitNo + 4].\r\t[shifted = 0]\r\t\twhileFalse: \r\t\t\t[shifted _ shifted bitShift: -1.\r\t\t\tbitNo _ bitNo + 1].\r\t^ bitNo! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rSmallInteger class\r\tinstanceVariableNames: ''!\r\r!SmallInteger class methodsFor: 'instance creation' stamp: 'tk 4/20/1999 14:17'!\rbasicNew\r\r\tself error: 'SmallIntegers can only be created by performing arithmetic'! !\r\r!SmallInteger class methodsFor: 'instance creation' stamp: 'tk 4/20/1999 14:18'!\rnew\r\r\tself basicNew\t\"generates an error\"! !\r\r\r!SmallInteger class methodsFor: 'constants'!\rmaxVal\r\t\"Answer the maximum value for a SmallInteger.\"\r\t^ 16r3FFFFFFF! !\r\r!SmallInteger class methodsFor: 'constants'!\rminVal\r\t\"Answer the minimum value for a SmallInteger.\"\r\t^ -16r40000000! !\r\r\r!SmallInteger class methodsFor: 'plugin generation' stamp: 'acg 10/5/1999 06:04'!\rccg: cg generateCoerceToOopFrom: aNode on: aStream\r\r\tcg generateCoerceToSmallIntegerObjectFrom: aNode on: aStream! !\r\r!SmallInteger class methodsFor: 'plugin generation' stamp: 'acg 10/5/1999 06:11'!\rccg: cg generateCoerceToValueFrom: aNode on: aStream\r\r\tcg generateCoerceToSmallIntegerValueFrom: aNode on: aStream! !\r\r!SmallInteger class methodsFor: 'plugin generation' stamp: 'acg 9/18/1999 17:09'!\rccg: cg prolog: aBlock expr: aString index: anInteger\r\r\t^cg ccgLoad: aBlock expr: aString asIntegerValueFrom: anInteger! !\r\r!SmallInteger class methodsFor: 'plugin generation' stamp: 'acg 9/20/1999 11:20'!\rccgCanConvertFrom: anObject\r\r\t^anObject class == self! !\rObject subclass: #SmalltalkImage\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'LastImageName LastQuitLogPosition LastStats SourceFileVersionString StartupStamp'\r\tpoolDictionaries: ''\r\tcategory: 'System-Support'!\r!SmalltalkImage commentStamp: 'sd 7/2/2003 21:50' prior: 0!\rI represent the SmalltalkImage and partly the VM. Using my current instance you can \r\t- get the value of some VM parameters, system arguments, vm profiling,\r\tendianess status, external objects,....\r\r\t- save the image, manage sources\r\rAs you will notice browsing my code I'm a fat class having still too much responsibility.\rBut this is life. sd-2 July 2003\r\rPS: if someone wants to split me go ahead.!\r\r\r!SmalltalkImage methodsFor: 'endian' stamp: 'sd 7/3/2003 22:05'!\rendianness\r\t| bytes word blt |\r\t\"What endian-ness is the current hardware?  The String '1234' will be stored into a machine word.  On BigEndian machines (the Mac), $1 will be the high byte if the word.  On LittleEndian machines (the PC), $4 will be the high byte.\"\r\t\"SmalltalkImage current endianness\"\r\r\tbytes _ ByteArray withAll: #(0 0 0 0).  \"(1 2 3 4) or (4 3 2 1)\"\r\tword _ WordArray with: 16r01020304.\r\tblt _ (BitBlt toForm: (Form new hackBits: bytes)) \r\t\t\t\tsourceForm: (Form new hackBits: word).\r\tblt combinationRule: Form over.  \"store\"\r\tblt sourceY: 0; destY: 0; height: 1; width: 4.\r\tblt sourceX: 0; destX: 0.\r\tblt copyBits.  \"paste the word into the bytes\"\r\tbytes first = 1 ifTrue: [^ #big].\r\tbytes first = 4 ifTrue: [^ #little].\r\tself error: 'Ted is confused'.! !\r\r!SmalltalkImage methodsFor: 'endian' stamp: 'sd 6/27/2003 23:25'!\risBigEndian\r\t^self endianness == #big! !\r\r!SmalltalkImage methodsFor: 'endian' stamp: 'sd 6/27/2003 23:25'!\risLittleEndian\r\t^self endianness == #little! !\r\r\r!SmalltalkImage methodsFor: 'image, changes names' stamp: 'sd 11/16/2003 11:58'!\rchangeImageNameTo: aString\r\t\r\tself imageName: aString.\r\tLastImageName := self imageName! !\r\r!SmalltalkImage methodsFor: 'image, changes names' stamp: 'sd 11/16/2003 11:58'!\rchangesName\r\t\"Answer the local name for the changes file corresponding to the image file name.\"\r\t\"Smalltalk changesName\"\r\r\t| imName |\r\timName := FileDirectory baseNameFor:\r\t\t(FileDirectory localNameFor: self imageName).\r\t^ imName, FileDirectory dot, 'changes'! !\r\r!SmalltalkImage methodsFor: 'image, changes names' stamp: 'tpr 12/15/2003 12:09'!\rfullNameForChangesNamed: aName\r\r\t| newName |\r\tnewName := FileDirectory baseNameFor: (FileDirectory default fullNameFor: aName).\r\t^newName , FileDirectory dot, FileDirectory changeSuffix.! !\r\r!SmalltalkImage methodsFor: 'image, changes names' stamp: 'tpr 12/15/2003 12:10'!\rfullNameForImageNamed: aName\r\r\t| newName |\r\tnewName := FileDirectory baseNameFor: (FileDirectory default fullNameFor: aName).\r\t^newName , FileDirectory dot, FileDirectory imageSuffix.! !\r\r!SmalltalkImage methodsFor: 'image, changes names' stamp: 'sd 9/24/2003 12:51'!\rimageName\r\t\"Answer the full path name for the current image.\"\r\t\"SmalltalkImage current imageName\"\r\r\t<primitive: 121>\r\tself primitiveFailed! !\r\r!SmalltalkImage methodsFor: 'image, changes names' stamp: 'sd 10/11/2003 12:05'!\rimageName: newName\r\t\"Set the the full path name for the current image.  All further snapshots will use this.\"\r\r\t<primitive: 121>\r\t^ self primitiveFailed! !\r\r!SmalltalkImage methodsFor: 'image, changes names' stamp: 'sd 9/24/2003 12:43'!\rsourceFileVersionString\r\r\t^ SourceFileVersionString! !\r\r!SmalltalkImage methodsFor: 'image, changes names' stamp: 'ssa 9/3/2008 14:28'!\rsourcesName\r\t\"Answer the full path to the version-stable source code\"\r\t^  SourceFileVersionString , FileDirectory dot , 'sources'! !\r\r!SmalltalkImage methodsFor: 'image, changes names' stamp: 'sd 9/24/2003 12:46'!\rvmPath\r\t\"Answer the path for the directory containing the Smalltalk virtual machine. Return the \tempty string if this primitive is not implemented.\"\r\t\"SmalltalkImage current vmPath\"\r\r\t<primitive: 142>\r\t^ ''! !\r\r\r!SmalltalkImage methodsFor: 'preferences' stamp: 'sd 6/28/2003 17:33'!\rsetPlatformPreferences\r\t\"Set some platform specific preferences on system startup\"\r\t| platform specs |\r\tPreferences automaticPlatformSettings ifFalse:[^self].\r\tplatform _ self platformName.\r\tspecs _ \t#(\t\r\t\t\t\t\t(soundStopWhenDone false)\r\t\t\t\t\t(soundQuickStart false)\r\t\t\t).\r\tplatform = 'Win32' ifTrue:[\r\t\tspecs _ #(\t\r\t\t\t\t\t(soundStopWhenDone true)\r\t\t\t\t\t(soundQuickStart false)\r\t\t\t\t)].\r\tplatform = 'Mac OS' ifTrue:[\r\t\tspecs _ #(\t\r\t\t\t\t\t(soundStopWhenDone false)\r\t\t\t\t\t(soundQuickStart true)\r\t\t\t\t)].\r\tspecs do:[:tuple|\r\t\tPreferences setPreference: tuple first toValue: (tuple last == #true).\r\t].\r! !\r\r\r!SmalltalkImage methodsFor: 'quit' stamp: 'sd 6/28/2003 17:32'!\rquitPrimitive\r\t\"Primitive. Exit to another operating system on the host machine, if one\r\texists. All state changes in the object space since the last snapshot are lost.\r\tEssential. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 113>\r\tself primitiveFailed! !\r\r\r!SmalltalkImage methodsFor: 'snapshot and quit' stamp: 'tpr 12/15/2003 12:18'!\rgetFileNameFromUser\r\r\t| newName |\r\tnewName := FillInTheBlank\r\t\trequest: 'New File Name?' translated\r\t\tinitialAnswer: (FileDirectory localNameFor: self imageName).\r\tnewName isEmpty ifTrue: [^nil].\r\t((FileDirectory default fileOrDirectoryExists: (self fullNameForImageNamed: newName)) or:\r\t [FileDirectory default fileOrDirectoryExists: (self fullNameForChangesNamed: newName)]) ifTrue: [\r\t\t(self confirm: ('{1} already exists. Overwrite?' translated format: {newName})) ifFalse: [^nil]].\r\t^newName\r! !\r\r!SmalltalkImage methodsFor: 'snapshot and quit' stamp: 'sd 11/16/2003 14:08'!\rreadDocumentFile\r\t\"No longer used. Everything is now done in ProjectLauncher.\"\r\t\"I do not understand the above comment because this method is still called \r\t\tby other methods in the class SystemDictionary so I moved it here- sd - 16 Nov 03\"\r\t\r\tStartupStamp _ '----STARTUP----', Time dateAndTimeNow printString, ' as ', self imageName.\r! !\r\r!SmalltalkImage methodsFor: 'snapshot and quit' stamp: 'sd 11/16/2003 14:20'!\rshutDown\r\r\t^ self closeSourceFiles! !\r\r!SmalltalkImage methodsFor: 'snapshot and quit' stamp: 'sd 11/16/2003 14:12'!\rsnapshot: save andQuit: quit\r\t^self snapshot: save andQuit: quit embedded: false! !\r\r!SmalltalkImage methodsFor: 'snapshot and quit' stamp: 'ssa 9/3/2008 11:13'!\rsnapshot: save andQuit: quit embedded: embeddedFlag\r\t\"Mark the changes file and close all files as part of #processShutdownList.\r\tIf save is true, save the current state of this Smalltalk in the image file.\r\tIf quit is true, then exit to the outer OS shell.\r\tThe latter part of this method runs when resuming a previously saved image. This resume logic checks for a document file to process when starting up.\"\r\t| resuming msg |\r\tObject flushDependents.\r\tObject flushEvents.\r\r\t(SourceFiles at: 2) ifNotNil:[\r\t\tmsg _ String streamContents: [ :s |\r\t\t\ts nextPutAll: '----';\r\t\t\tnextPutAll: (save ifTrue: [ quit ifTrue: [ 'QUIT' ] ifFalse: [ 'SNAPSHOT' ] ]\r\t\t\t\t\t\t\tifFalse: [quit ifTrue: [ 'QUIT/NOSAVE' ] ifFalse: [ 'NOP' ]]);\r\t\t\tnextPutAll: '----';\r\t\t\tprint: Date dateAndTimeNow; space;\r\t\t\tnextPutAll: (FileDirectory default localNameFor: self imageName);\r\t\t\tnextPutAll: ' priorSource: ';\r\t\t\tprint: LastQuitLogPosition ].\r\t\tself assureStartupStampLogged.\r\t\tsave ifTrue: [ LastQuitLogPosition _ (SourceFiles at: 2) setToEnd; position ].\r\t\tself logChange: msg.\r\t\tTranscript cr; show: msg\r\t].\r\r\tSmalltalk processShutDownList: quit.\r\tCursor write show.\r\tsave ifTrue: [resuming _ embeddedFlag \r\t\t\t\t\tifTrue: [self snapshotEmbeddedPrimitive] \r\t\t\t\t\tifFalse: [self snapshotPrimitive].  \"<-- PC frozen here on image file\"\r\t\t\t\tresuming == false \"guard against failure\" ifTrue:\r\t\t\t\t\t[\"Time to reclaim segment files is immediately after a save\"\r\t\t\t\t\tSmalltalk at: #ImageSegment\r\t\t\t\t\t\tifPresent: [:theClass | theClass reclaimObsoleteSegmentFiles]]]\r\t\tifFalse: [resuming _ false].\r\tquit & (resuming == false) ifTrue: [self quitPrimitive].\r\tCursor normal show.\r\tSmalltalk setGCParameters.\r\tresuming == true ifTrue: [Smalltalk clearExternalObjects].\r\tSmalltalk processStartUpList: resuming == true.\r\tresuming == true ifTrue:[\r\t\tself setPlatformPreferences.\r\t\tself readDocumentFile].\r\t\"Now it's time to raise an error\"\r\tresuming == nil ifTrue: [self error:'Failed to write image file (disk full?)'].\r\t^ resuming! !\r\r!SmalltalkImage methodsFor: 'snapshot and quit' stamp: 'sd 11/16/2003 13:58'!\rsnapshotEmbeddedPrimitive\r\t<primitive: 247>\r\t^nil \"indicates error writing embedded image file\"! !\r\r!SmalltalkImage methodsFor: 'snapshot and quit' stamp: 'sd 11/16/2003 13:59'!\rsnapshotPrimitive\r\t\"Primitive. Write the current state of the object memory on a file in the\r\tsame format as the Smalltalk-80 release. The file can later be resumed,\r\treturning you to this exact state. Return normally after writing the file.\r\tEssential. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 97>\r\t^nil \"indicates error writing image file\"! !\r\r\r!SmalltalkImage methodsFor: 'sources, changes log' stamp: 'NS 1/16/2004 15:34'!\rassureStartupStampLogged\r\t\"If there is a startup stamp not yet actually logged to disk, do it now.\"\r\t| changesFile |\r\tStartupStamp ifNil: [^ self].\r\t(SourceFiles isNil or: [(changesFile _ SourceFiles at: 2) == nil]) ifTrue: [^ self].\r\tchangesFile isReadOnly ifTrue:[^self].\r\tchangesFile setToEnd; cr; cr.\r\tchangesFile nextChunkPut: StartupStamp asString; cr.\r\tStartupStamp _ nil.\r\tself forceChangesToDisk.! !\r\r!SmalltalkImage methodsFor: 'sources, changes log' stamp: 'sd 11/16/2003 13:12'!\rcloseSourceFiles\r\t\"Shut down the source files if appropriate.  1/29/96 sw: changed so that the closing and nilification only take place if the entry was a FileStream, thus allowing stringified sources to remain in the saved image file\"\r\r\t1 to: 2 do: [:i |\r\t\t((SourceFiles at: i) isKindOf: FileStream)\r\t\t\tifTrue:\r\t\t\t\t[(SourceFiles at: i) close.\r\t\t\t\tSourceFiles at: i put: nil]]! !\r\r!SmalltalkImage methodsFor: 'sources, changes log' stamp: 'NS 1/27/2004 15:55'!\revent: anEvent\r\t\"Hook for SystemChangeNotifier\"\r\r\t(anEvent isRemoved and: [anEvent itemKind = SystemChangeNotifier classKind]) ifTrue: [\r\t\tanEvent item acceptsLoggingOfCompilation \r\t\t\tifTrue: [self logChange: 'Smalltalk removeClassNamed: #' , anEvent item name].\r\t].\r\tanEvent isDoIt \r\t\tifTrue: [self logChange: anEvent item].\r\t(anEvent isRemoved and: [anEvent itemKind = SystemChangeNotifier methodKind]) ifTrue: [\r\t\tanEvent itemClass acceptsLoggingOfCompilation \r\t\t\tifTrue: [self logChange: anEvent itemClass name , ' removeSelector: #' , anEvent itemSelector]].! !\r\r!SmalltalkImage methodsFor: 'sources, changes log' stamp: 'ssa 9/3/2008 11:25'!\rforceChangesToDisk\r\t\"Ensure that the changes file has been fully written to disk by closing and re-opening it. This makes the system more robust in the face of a power failure or hard-reboot.\"\r\r\t| changesFile |\r\tchangesFile _ SourceFiles at: 2.\r\t(changesFile isKindOf: FileStream) ifTrue: [\r\t\tchangesFile flush.\r\t\ttrue ifTrue:[\r\t\t\tchangesFile close.\r\t\t\tchangesFile open: changesFile name forWrite: true].\r\t\tchangesFile setToEnd.\r\t].\r! !\r\r!SmalltalkImage methodsFor: 'sources, changes log' stamp: 'sd 11/16/2003 14:02'!\rlastQuitLogPosition\r\t^ LastQuitLogPosition! !\r\r!SmalltalkImage methodsFor: 'sources, changes log' stamp: 'sd 11/16/2003 14:03'!\rlastQuitLogPosition: aNumber\r\t\"should be only use to ensure the transition from SystemDictionary to SmalltalkImage, then  \tbe removed\"\r\t\t\r\tLastQuitLogPosition := aNumber! !\r\r!SmalltalkImage methodsFor: 'sources, changes log' stamp: 'NS 1/16/2004 15:32'!\rlogChange: aStringOrText \r\t\"Write the argument, aString, onto the changes file.\"\r\t| aString changesFile |\r\t(SourceFiles isNil or: [(SourceFiles at: 2) == nil]) ifTrue: [^ self].\r\tself assureStartupStampLogged.\r\r\taStringOrText isText\r\t\tifTrue: [aString _ aStringOrText string]\r\t\tifFalse: [aString _ aStringOrText].\r\t(aString isMemberOf: String)\r\t\tifFalse: [self error: 'can''t log this change'].\r\t(aString findFirst: [:char | char isSeparator not]) = 0\r\t\tifTrue: [^ self].  \"null doits confuse replay\"\r\t(changesFile _ SourceFiles at: 2).\r\tchangesFile isReadOnly ifTrue:[^self].\r\tchangesFile setToEnd; cr; cr.\r\tchangesFile nextChunkPut: aString.\r\t\t\"If want style changes in DoIt, use nextChunkPutWithStyle:, and allow Texts to get here\"\r\tself forceChangesToDisk.! !\r\r!SmalltalkImage methodsFor: 'sources, changes log' stamp: 'sd 11/16/2003 12:00'!\ropenSourceFiles\r\r\tself imageName = LastImageName ifFalse:\r\t\t[\"Reset the author initials to blank when the image gets moved\"\r\t\tLastImageName _ self imageName.\r\t\tUtilities setAuthorInitials: ''].\r\tFileDirectory\r\t\topenSources: self sourcesName\r\t\tandChanges: self changesName\r\t\tforImage: LastImageName.\r\tStandardSourceFileArray install! !\r\r!SmalltalkImage methodsFor: 'sources, changes log' stamp: 'tpr 12/15/2003 12:21'!\rsaveAs\r\t\"Put up the 'saveAs' prompt, obtain a name, and save the image  under that new name.\"\r\r\t| newName |\r\tnewName _ self getFileNameFromUser.\r\tnewName isNil ifTrue: [^ self].\r\t(SourceFiles at: 2) ifNotNil:\r\t\t[self closeSourceFiles; \"so copying the changes file will always work\"\r\t\t\t saveChangesInFileNamed: (self fullNameForChangesNamed: newName)].\r\tself saveImageInFileNamed: (self fullNameForImageNamed: newName)! !\r\r!SmalltalkImage methodsFor: 'sources, changes log' stamp: 'tpr 12/15/2003 16:01'!\rsaveChangesInFileNamed: aString\r\t| fullChangesName |\r\tfullChangesName _ (FileDirectory default fullNameFor: aString).\r\t(FileDirectory default directoryNamed:(FileDirectory dirPathFor: fullChangesName )) assureExistence.\r\tFileDirectory default \r\t\tcopyFileWithoutOverwriteConfirmationNamed: SmalltalkImage current changesName \r\t\ttoFileNamed: fullChangesName.\r\tSmalltalk setMacFileInfoOn: fullChangesName.! !\r\r!SmalltalkImage methodsFor: 'sources, changes log' stamp: 'tpr 12/15/2003 15:58'!\rsaveImageInFileNamed: aString\r\t| fullImageName |\r\tfullImageName _ (FileDirectory default fullNameFor: aString).\r\t(FileDirectory default directoryNamed:(FileDirectory dirPathFor: fullImageName )) assureExistence.\r\tself\r\t\tchangeImageNameTo: fullImageName;\r\t\tcloseSourceFiles;\r\t\topenSourceFiles;  \"so SNAPSHOT appears in new changes file\"\r\t\tsaveImageSegments;\r\t\tsnapshot: true andQuit: false! !\r\r!SmalltalkImage methodsFor: 'sources, changes log' stamp: 'sd 11/16/2003 13:29'!\rsaveImageSegments\r\r\t| haveSegs oldImageSegDir newImageSegDir |\r\thaveSegs _ false.\r\tSmalltalk at: #ImageSegment ifPresent: [:theClass | \r\t\t(haveSegs _ theClass instanceCount ~= 0) ifTrue: [\r\t\t\toldImageSegDir _ theClass segmentDirectory]].\r\thaveSegs ifTrue: [\r\t\tSmalltalk at: #ImageSegment ifPresent: [:theClass |\r\t\t\tnewImageSegDir _ theClass segmentDirectory.\t\"create the folder\"\r\t\t\toldImageSegDir fileNames do: [:theName | \"copy all segment files\"\r\t\t\t\t| imageSegmentName |\r\t\t\t\timageSegmentName _ oldImageSegDir pathName, FileDirectory slash, theName.\r\t\t\t\tnewImageSegDir \r\t\t\t\t\tcopyFileWithoutOverwriteConfirmationNamed: imageSegmentName\r\t\t\t\t\ttoFileNamed: theName]]].\r! !\r\r\r!SmalltalkImage methodsFor: 'system attribute' stamp: 'md 10/26/2003 13:08'!\rgetSystemAttribute: attributeID \r\t\"Optional. Answer the string for the system attribute with the given \r\tinteger ID. Answer nil if the given attribute is not defined on this \r\tplatform. On platforms that support invoking programs from command \r\tlines (e.g., Unix), this mechanism can be used to pass command line \r\targuments to programs written in Squeak.\r\r\tBy convention, the first command line argument that is not a VM\r\tconfiguration option is considered a 'document' to be filed in. Such a\r\tdocument can add methods and classes, can contain a serialized object,\r\tcan include code to be executed, or any combination of these.\r\r\tCurrently defined attributes include: \r\t-1000...-1 - command line arguments that specify VM options \r\t0 - the full path name for currently executing VM \r\t(or, on some platforms, just the path name of the VM's directory) \r\t1 - full path name of this image \r\t2 - a Squeak document to open, if any \r\t3...1000 - command line arguments for Squeak programs \r\t1001 - this platform's operating system \r\t1002 - operating system version \r\t1003 - this platform's processor type\r\t1004 - vm version\"\r\r\t<primitive: 149>\r\t^ nil! !\r\r!SmalltalkImage methodsFor: 'system attribute' stamp: 'sd 6/27/2003 23:38'!\rplatformName\r\t\"Return the name of the platform we're running on\"\r\r\t^self getSystemAttribute: 1001! !\r\r\r!SmalltalkImage methodsFor: 'vm parameters' stamp: 'sd 6/27/2003 23:47'!\rgetVMParameters\t\r\t\"Answer an Array containing the current values of the VM's internal\r\tparameter/metric registers.  Each value is stored in the array at the\r\tindex corresponding to its VM register.  (See #vmParameterAt: and\r\t#vmParameterAt:put:.)\"\r\t\"SmalltalkImage current getVMParameters\"\r\t\r\t<primitive: 254>\r\tself primitiveFailed! !\r\r!SmalltalkImage methodsFor: 'vm parameters' stamp: 'sd 6/27/2003 23:27'!\rvmParameterAt: parameterIndex put: newValue\r\t\"parameterIndex is a positive integer corresponding to one of the VM's internal\r\tparameter/metric registers.  Store newValue (a positive integer) into that\r\tregister and answer with the previous value that was stored there.\r\tFail if newValue is out of range, if parameterIndex has no corresponding\r\tregister, or if the corresponding register is read-only.\"\r\r\t<primitive: 254>\r\tself primitiveFailed! !\r\r\r!SmalltalkImage methodsFor: 'vm statistics' stamp: 'sd 7/2/2003 21:45'!\rtextMarkerForShortReport\r\r\t^  'Since last view\t'! !\r\r!SmalltalkImage methodsFor: 'vm statistics' stamp: 'sd 9/30/2003 13:53'!\rvmStatisticsReportString\r\t\"StringHolderView open: (StringHolder new contents:\r\t\tSmalltalkImage current vmStatisticsReportString) label: 'VM Statistics'\"\r\r\t| params oldSpaceEnd youngSpaceEnd memoryEnd fullGCs fullGCTime incrGCs incrGCTime tenureCount mcMisses mcHits icHits upTime sendCount tms tmSize upTime2 fullGCs2 fullGCTime2 incrGCs2 incrGCTime2 tenureCount2 str |\r\tparams _ self getVMParameters.\r\toldSpaceEnd\t\t\t_ params at: 1.\r\tyoungSpaceEnd\t\t_ params at: 2.\r\tmemoryEnd\t\t\t_ params at: 3.\r\tfullGCs\t\t\t\t_ params at: 7.\r\tfullGCTime\t\t\t_ params at: 8.\r\tincrGCs\t\t\t\t_ params at: 9.\r\tincrGCTime\t\t\t_ params at: 10.\r\ttenureCount\t\t\t_ params at: 11.\r\tmcMisses\t\t\t_ params at: 15.\r\tmcHits\t\t\t\t_ params at: 16.\r\ticHits\t\t\t\t_ params at: 17.\r\tupTime _ Time millisecondClockValue.\r\tsendCount _ mcMisses + mcHits + icHits.\r\ttms _ TranslatedMethod allSubInstances.\r\ttmSize _ tms inject: 0 into: [:sum :tm | sum + (tm size * 4)].\r\r\tstr _ WriteStream on: (String new: 1000).\r\tstr\tnextPutAll: 'uptime\t\t\t';\r\t\tprint: (upTime / 1000 / 60 // 60); nextPut: $h;\r\t\tprint: (upTime / 1000 / 60 \\\\ 60) asInteger; nextPut: $m;\r\t\tprint: (upTime / 1000 \\\\ 60) asInteger; nextPut: $s; cr.\r\r\tstr\tnextPutAll: 'memory\t\t\t';\r\t\tnextPutAll: memoryEnd asStringWithCommas; nextPutAll: ' bytes'; cr.\r\tstr\tnextPutAll:\t'\told\t\t\t';\r\t\tnextPutAll: oldSpaceEnd asStringWithCommas; nextPutAll: ' bytes (';\r\t\tprint: ((oldSpaceEnd / memoryEnd * 100) roundTo: 0.1); nextPutAll: '%)'; cr.\r\tstr\tnextPutAll: '\tyoung\t\t';\r\t\tnextPutAll: (youngSpaceEnd - oldSpaceEnd) asStringWithCommas; nextPutAll: ' bytes (';\r\t\tprint: ((youngSpaceEnd - oldSpaceEnd / memoryEnd * 100) roundTo: 0.1); nextPutAll: '%)'; cr.\r\tstr\tnextPutAll: '\tused\t\t';\r\t\tnextPutAll: youngSpaceEnd asStringWithCommas; nextPutAll: ' bytes (';\r\t\tprint: ((youngSpaceEnd / memoryEnd * 100) roundTo: 0.1); nextPutAll: '%)'; cr.\r\tstr\tnextPutAll: '\tfree\t\t';\r\t\tnextPutAll: (memoryEnd - youngSpaceEnd) asStringWithCommas; nextPutAll: ' bytes (';\r\t\tprint: ((memoryEnd - youngSpaceEnd / memoryEnd * 100) roundTo: 0.1); nextPutAll: '%)'; cr.\r\r\tstr\tnextPutAll: 'GCs\t\t\t\t';\r\t\tnextPutAll: (fullGCs + incrGCs) asStringWithCommas.\r\tfullGCs + incrGCs > 0 ifTrue: [\r\t\tstr\r\t\t\tnextPutAll: ' ('; \r\t\t\tprint: ((upTime / (fullGCs + incrGCs)) roundTo: 1); \r\t\t\tnextPutAll: 'ms between GCs)'\r\t].\r\tstr cr.\r\tstr\tnextPutAll: '\tfull\t\t\t';\r\t\tprint: fullGCs; nextPutAll: ' totalling '; nextPutAll: fullGCTime asStringWithCommas; nextPutAll: 'ms (';\r\t\tprint: ((fullGCTime / upTime * 100) roundTo: 1.0);\r\t\tnextPutAll: '% uptime)'.\r\tfullGCs = 0 ifFalse:\r\t\t[str\tnextPutAll: ', avg '; print: ((fullGCTime / fullGCs) roundTo: 1.0); nextPutAll: 'ms'].\r\tstr\tcr.\r\tstr\tnextPutAll: '\tincr\t\t';\r\t\tprint: incrGCs; nextPutAll: ' totalling '; nextPutAll: incrGCTime asStringWithCommas; nextPutAll: 'ms (';\r\t\tprint: ((incrGCTime / upTime * 100) roundTo: 1.0);\r\t\tnextPutAll: '% uptime), avg '; print: ((incrGCTime / incrGCs) roundTo: 1.0); nextPutAll: 'ms'; cr.\r\tstr\tnextPutAll: '\ttenures\t\t';\r\t\tnextPutAll: tenureCount asStringWithCommas.\r\ttenureCount = 0 ifFalse:\r\t\t[str nextPutAll: ' (avg '; print: (incrGCs / tenureCount) asInteger; nextPutAll: ' GCs/tenure)'].\r\tstr\tcr.\r\rLastStats ifNil: [LastStats _ Array new: 6]\rifNotNil: [\r\tupTime2 _ upTime - (LastStats at: 1).\r\tfullGCs2 _ fullGCs - (LastStats at: 2).\r\tfullGCTime2 _ fullGCTime - (LastStats at: 3).\r\tincrGCs2 _ incrGCs - (LastStats at: 4).\r\tincrGCTime2 _ incrGCTime - (LastStats at: 5).\r\ttenureCount2 _ tenureCount - (LastStats at: 6).\r\r\tstr\tnextPutAll: self textMarkerForShortReport ;\r\t\tnextPutAll: (fullGCs2 + incrGCs2) asStringWithCommas.\r\tfullGCs2 + incrGCs2 > 0 ifTrue: [\r\t\tstr\r\t\t\tnextPutAll: ' ('; \r\t\t\tprint: ((upTime2 / (fullGCs2 + incrGCs2)) roundTo: 1); \r\t\t\tnextPutAll: 'ms between GCs)'.\r\t].\r\tstr cr.\r\tstr\tnextPutAll: '\tuptime\t\t'; print: ((upTime2 / 1000.0) roundTo: 0.1); nextPutAll: 's'; cr.\r\tstr\tnextPutAll: '\tfull\t\t\t';\r\t\tprint: fullGCs2; nextPutAll: ' totalling '; nextPutAll: fullGCTime2 asStringWithCommas; nextPutAll: 'ms (';\r\t\tprint: ((fullGCTime2 / upTime2 * 100) roundTo: 1.0);\r\t\tnextPutAll: '% uptime)'.\r\tfullGCs2 = 0 ifFalse:\r\t\t[str\tnextPutAll: ', avg '; print: ((fullGCTime2 / fullGCs2) roundTo: 1.0); nextPutAll: 'ms'].\r\tstr\tcr.\r\tstr\tnextPutAll: '\tincr\t\t';\r\t\tprint: incrGCs2; nextPutAll: ' totalling '; nextPutAll: incrGCTime2 asStringWithCommas; nextPutAll: 'ms (';\r\t\tprint: ((incrGCTime2 / upTime2 * 100) roundTo: 1.0);\r\t\tnextPutAll: '% uptime), avg '.\r\tincrGCs2 > 0 ifTrue: [\r\t\t str print: ((incrGCTime2 / incrGCs2) roundTo: 1.0); nextPutAll: 'ms'\r\t].\r\tstr cr.\r\tstr\tnextPutAll: '\ttenures\t\t';\r\t\tnextPutAll: tenureCount2 asStringWithCommas.\r\ttenureCount2 = 0 ifFalse:\r\t\t[str nextPutAll: ' (avg '; print: (incrGCs2 / tenureCount2) asInteger; nextPutAll: ' GCs/tenure)'].\r\tstr\tcr.\r].\r\tLastStats at: 1 put: upTime.\r\tLastStats at: 2 put: fullGCs.\r\tLastStats at: 3 put: fullGCTime.\r\tLastStats at: 4 put: incrGCs.\r\tLastStats at: 5 put: incrGCTime.\r\tLastStats at: 6 put: tenureCount.\r\r\tsendCount > 0 ifTrue: [\r\t\tstr\tnextPutAll: 'sends\t\t\t';\r\t\t\tnextPutAll: sendCount asStringWithCommas; cr.\r\t\tstr\tnextPutAll: '\tfull\t\t\t';\r\t\t\tnextPutAll: mcMisses asStringWithCommas;\r\t\t\tnextPutAll: ' ('; print: ((mcMisses / sendCount * 100) roundTo: 0.1); nextPutAll: '%)'; cr.\r\t\tstr\tnextPutAll: '\tm-cache\t';\r\t\t\tnextPutAll: mcHits asStringWithCommas;\r\t\t\tnextPutAll: ' ('; print: ((mcHits / sendCount * 100) roundTo: 0.1); nextPutAll: '%)'; cr.\r\t\tstr\tnextPutAll: '\ti-cache\t\t';\r\t\t\tnextPutAll: icHits asStringWithCommas;\r\t\t\tnextPutAll: ' ('; print: ((icHits / sendCount * 100) roundTo: 0.1); nextPutAll: '%)'; cr].\r\r\ticHits > 0 ifTrue: [\r\t\tstr\tnextPutAll: 'methods\t\t\t';\r\t\t\tnextPutAll: tms size asStringWithCommas; nextPutAll: ' translated'; cr.\r\t\tstr\tnextPutAll: '\tsize\t\t\t';\r\t\t\tnextPutAll: tmSize asStringWithCommas; nextPutAll: ' bytes, avg ';\r\t\t\tprint: ((tmSize / tms size) roundTo: 0.1); nextPutAll: ' bytes/method'; cr.\r\t\tstr\tnextPutAll: '\tmemory\t\t';\r\t\t\tprint: ((tmSize / youngSpaceEnd * 100) roundTo: 0.1); nextPutAll: '% of used, ';\r\t\t\tprint: ((tmSize / memoryEnd * 100) roundTo: 0.1); nextPutAll: '% of available'; cr].\r\r\t^ str contents\r! !\r\r\r!SmalltalkImage methodsFor: 'private source file' stamp: 'sd 9/24/2003 12:42'!\rsourceFileVersionString: aString\r\r\tSourceFileVersionString := aString! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rSmalltalkImage class\r\tinstanceVariableNames: 'current'!\r\r!SmalltalkImage class methodsFor: 'instance creation' stamp: 'sd 9/30/2003 14:28'!\rcurrent\r\t\"Note that this could be implemented differently to avoid the test\"\r\r\tcurrent isNil\r\t\tifTrue: [current := self basicNew].\r\t^ current! !\r\r!SmalltalkImage class methodsFor: 'instance creation' stamp: 'sd 9/30/2003 13:39'!\rnew\r\r\tself error: 'Use current'.! !\r\r\r!SmalltalkImage class methodsFor: 'class initialization' stamp: 'NS 1/16/2004 16:12'!\rstartUp\r\tSystemChangeNotifier uniqueInstance notify: self current ofAllSystemChangesUsing: #event:.! !\rOrderedCollection subclass: #SortedCollection\r\tinstanceVariableNames: 'sortBlock'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Sequenceable'!\r!SortedCollection commentStamp: '<historical>' prior: 0!\rI represent a collection of objects ordered by some property of the objects themselves. The ordering is specified in a BlockContext.!\r\r\r!SortedCollection methodsFor: 'accessing' stamp: 'sma 4/28/2000 17:47'!\rat: anInteger put: anObject\r\tself shouldNotImplement! !\r\r!SortedCollection methodsFor: 'accessing' stamp: 'tk 3/28/1999 22:55'!\rmedian\r\t\"Return the middle element, or as close as we can get.\"\r\r\t^ self at: self size + 1 // 2! !\r\r!SortedCollection methodsFor: 'accessing'!\rsortBlock\r\t\"Answer the blockContext which is the criterion for sorting elements of \r\tthe receiver.\"\r\r\t^sortBlock! !\r\r!SortedCollection methodsFor: 'accessing' stamp: 'stp 12/05/1999 07:09'!\rsortBlock: aBlock \r\t\"Make the argument, aBlock, be the criterion for ordering elements of the \r\treceiver.\"\r\r\taBlock\r\t\tifNotNil: [sortBlock := aBlock fixTemps]\r\t\tifNil: [sortBlock := aBlock].\r\t\"The sortBlock must copy its home context, so as to avoid circularities!!\"\r\t\"Therefore sortBlocks with side effects may not work right\"\r\tself size > 0 ifTrue: [self reSort]! !\r\r\r!SortedCollection methodsFor: 'adding' stamp: 'go 4/27/2000 13:19'!\radd: newObject\r\t^ super insert: newObject before: (self indexForInserting: newObject)! !\r\r!SortedCollection methodsFor: 'adding' stamp: 'sma 4/28/2000 18:35'!\raddAll: aCollection\r\taCollection size > (self size // 3)\r\t\tifTrue:\r\t\t\t[aCollection do: [:each | self addLast: each].\r\t\t\tself reSort]\r\t\tifFalse: [aCollection do: [:each | self add: each]].\r\t^ aCollection! !\r\r!SortedCollection methodsFor: 'adding' stamp: 'go 4/26/2000 17:26'!\raddFirst: newObject\r\tself shouldNotImplement! !\r\r!SortedCollection methodsFor: 'adding' stamp: 'MPH 10/23/2000 13:31'!\rcopyEmpty\r\t\"Answer a copy of the receiver without any of the receiver's elements.\"\r\r\t^self species sortBlock: sortBlock! !\r\r\r!SortedCollection methodsFor: 'comparing'!\r= aSortedCollection\r\t\"Answer true if my and aSortedCollection's species are the same,\r\tand if our blocks are the same, and if our elements are the same.\"\r\r\tself species = aSortedCollection species ifFalse: [^ false].\r\tsortBlock = aSortedCollection sortBlock\r\t\tifTrue: [^ super = aSortedCollection]\r\t\tifFalse: [^ false]! !\r\r\r!SortedCollection methodsFor: 'copying'!\rcopy\r\r\t| newCollection |\r\tnewCollection _ self species sortBlock: sortBlock.\r\tnewCollection addAll: self.\r\t^newCollection! !\r\r\r!SortedCollection methodsFor: 'enumerating' stamp: 'sma 2/5/2000 15:22'!\rcollect: aBlock \r\t\"Evaluate aBlock with each of my elements as the argument. Collect the \r\tresulting values into an OrderedCollection. Answer the new collection. \r\tOverride the superclass in order to produce an OrderedCollection instead\r\tof a SortedCollection.\"\r\r\t| newCollection | \r\tnewCollection _ OrderedCollection new: self size.\r\tself do: [:each | newCollection addLast: (aBlock value: each)].\r\t^ newCollection! !\r\r\r!SortedCollection methodsFor: 'private' stamp: 'stp 04/23/1999 05:36'!\rindexForInserting: newObject\r\r\t| index low high |\r\tlow _ firstIndex.\r\thigh _ lastIndex.\r\tsortBlock isNil\r\t\tifTrue: [[index _ high + low // 2.  low > high]\r\t\t\twhileFalse: \r\t\t\t\t[((array at: index) <= newObject)\r\t\t\t\t\tifTrue: [low _ index + 1]\r\t\t\t\t\tifFalse: [high _ index - 1]]]\r\t\tifFalse: [[index _ high + low // 2.  low > high]\r\t\t\twhileFalse: \r\t\t\t\t[(sortBlock value: (array at: index) value: newObject)\r\t\t\t\t\tifTrue: [low _ index + 1]\r\t\t\t\t\tifFalse: [high _ index - 1]]].\r\t^low! !\r\r!SortedCollection methodsFor: 'private' stamp: 'go 4/26/2000 17:17'!\rinsert: anObject before: spot\r\tself shouldNotImplement! !\r\r!SortedCollection methodsFor: 'private' stamp: 'sma 4/28/2000 17:46'!\rreSort\r\tself sort: firstIndex to: lastIndex! !\r\r!SortedCollection methodsFor: 'private' stamp: 'hg 12/17/2001 19:30'!\rshould: a precede: b\r\r\t^sortBlock ifNil: [a <= b] ifNotNil: [sortBlock value: a value: b]\r! !\r\r!SortedCollection methodsFor: 'private' stamp: 'hg 12/17/2001 20:22'!\rsort: i to: j \r\t\"Sort elements i through j of self to be nondescending according to\r\tsortBlock.\"\r\r\t| di dij dj tt ij k l n |\r\t\"The prefix d means the data at that index.\"\r\t(n _ j + 1  - i) <= 1 ifTrue: [^self].\t\"Nothing to sort.\" \r\t \"Sort di,dj.\"\r\tdi _ array at: i.\r\tdj _ array at: j.\r\t(self should: di precede: dj)\r\t\tifFalse: \r\t\t\t[array swap: i with: j.\r\t\t\t tt _ di.\r\t\t\t di _ dj.\r\t\t\t dj _ tt].\r\tn > 2\r\t\tifTrue:  \"More than two elements.\"\r\t\t\t[ij _ (i + j) // 2.  \"ij is the midpoint of i and j.\"\r\t\t\t dij _ array at: ij.  \"Sort di,dij,dj.  Make dij be their median.\"\r\t\t\t (self should: di precede: dij)\r\t\t\t   ifTrue: \r\t\t\t\t[(self should: dij precede: dj)\r\t\t\t\t  ifFalse: \r\t\t\t\t\t[array swap: j with: ij.\r\t\t\t\t\t dij _ dj]]\r\t\t\t   ifFalse:\r\t\t\t\t[array swap: i with: ij.\r\t\t\t\t dij _ di].\r\t\t\tn > 3\r\t\t\t  ifTrue:  \"More than three elements.\"\r\t\t\t\t[\"Find k>i and l<j such that dk,dij,dl are in reverse order.\r\t\t\t\tSwap k and l.  Repeat this procedure until k and l pass each other.\"\r\t\t\t\t k _ i.\r\t\t\t\t l _ j.\r\t\t\t\t [[l _ l - 1.  k <= l and: [self should: dij precede: (array at: l)]]\r\t\t\t\t   whileTrue.  \"i.e. while dl succeeds dij\"\r\t\t\t\t  [k _ k + 1.  k <= l and: [self should: (array at: k) precede: dij]]\r\t\t\t\t   whileTrue.  \"i.e. while dij succeeds dk\"\r\t\t\t\t  k <= l]\r\t\t\t\t   whileTrue:\r\t\t\t\t\t[array swap: k with: l]. \r\t\"Now l<k (either 1 or 2 less), and di through dl are all less than or equal to dk\r\tthrough dj.  Sort those two segments.\"\r\t\t\t\tself sort: i to: l.\r\t\t\t\tself sort: k to: j]]! !\r\r\r!SortedCollection methodsFor: 'topological sort' stamp: 'hg 1/2/2002 13:34'!\rsortTopologically\r\t\"Plenty of room for increased efficiency in this one.\"\r\r\t| remaining result pick |\r\tremaining _ self asOrderedCollection.\r\tresult _ OrderedCollection new.\r\t[remaining isEmpty] whileFalse: [\r\t\tpick _ remaining select: [:item |\r\t\t\tremaining allSatisfy: [:anotherItem |\r\t\t\t\titem == anotherItem or: [self should: item precede: anotherItem]]].\r\t\tpick isEmpty ifTrue: [self error: 'bad topological ordering'].\r\t\tresult addAll: pick.\r\t\tremaining removeAll: pick].\r\t^self copySameFrom: result! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rSortedCollection class\r\tinstanceVariableNames: ''!\r\r!SortedCollection class methodsFor: 'instance creation' stamp: 'stp 04/23/1999 05:34'!\rnew: anInteger \r\t\"The default sorting function is a <= comparison on elements.\"\r\r\t^(super new: anInteger) \"sortBlock: [:x :y | x <= y]\" \t\t\"nil sortBlock OK\"! !\r\r!SortedCollection class methodsFor: 'instance creation'!\rsortBlock: aBlock \r\t\"Answer an instance of me such that its elements are sorted according to \r\tthe criterion specified in aBlock.\"\r\r\t^(super new: 10) sortBlock: aBlock! !\rAppRegistry subclass: #SoundService\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Applications'!\r!SoundService commentStamp: 'gk 2/24/2004 23:14' prior: 0!\rThis is the AppRegistry class for the sound system.\r\rA sound system offers a small protocol for playing sounds and making beeps and works like a facade towards the rest of Squeak. A sound system is registered in this registry and can be accessed by \"SoundService default\". This way we decouple the sound system from the rest of Squeak and make it pluggable. It also is a perfect spot to check for the Preference class>>soundsEnabled.!\r\rSequenceableCollection subclass: #SourceFileArray\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Files'!\r!SourceFileArray commentStamp: '<historical>' prior: 0!\rThis class is an abstract superclass for source code access mechanisms. It defines the messages that need to be understood by those subclasses that store and retrieve source chunks on files, over the network or in databases.\rThe first concrete subclass, StandardSourceFileArray, supports access to the traditional sources and changes files. Other subclasses might implement multiple source files for different applications, or access to a network source server.!\r]style[(254 23 184)f1,f1LStandardSourceFileArray Comment;,f1!\r\r\r!SourceFileArray methodsFor: 'accessing' stamp: 'hmm 4/26/2000 21:42'!\rat: index\r\tself subclassResponsibility! !\r\r!SourceFileArray methodsFor: 'accessing' stamp: 'hmm 4/26/2000 21:43'!\rat: index put: aFileStream\r\tself subclassResponsibility! !\r\r!SourceFileArray methodsFor: 'accessing' stamp: 'ar 5/17/2000 18:28'!\rcollect: aBlock\r\t| copy |\r\tcopy _ self species new: self size.\r\t1 to: self size do:[:i| copy at: i put: (aBlock value: (self at: i))].\r\t^copy! !\r\r!SourceFileArray methodsFor: 'accessing' stamp: 'hmm 4/26/2000 21:43'!\rsize\r\tself subclassResponsibility! !\r\r\r!SourceFileArray methodsFor: 'sourcePointer conversion' stamp: 'hmm 4/25/2000 22:00'!\rfileIndexFromSourcePointer: anInteger\r\t\"Return the index of a source file corresponding to the given source pointer.\"\r\tself subclassResponsibility! !\r\r!SourceFileArray methodsFor: 'sourcePointer conversion' stamp: 'hmm 4/25/2000 22:00'!\rfilePositionFromSourcePointer: anInteger\r\t\"Return the position within a source file for the given source pointer.\"\r\tself subclassResponsibility! !\r\r!SourceFileArray methodsFor: 'sourcePointer conversion' stamp: 'hmm 4/25/2000 22:01'!\rsourcePointerFromFileIndex: index andPosition: position\r\t\"Return a sourcePointer encoding the given file index and position\"\r\tself subclassResponsibility! !\rPath subclass: #Spline\r\tinstanceVariableNames: 'coefficients'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Paths'!\r!Spline commentStamp: '<historical>' prior: 0!\rI represent a collection of Points through which a cubic spline curve is fitted.!\r\r\r!Spline methodsFor: 'displaying'!\rcomputeCurve\r\t\"Compute an array for the coefficients.\"\r\r\t| length extras |\r\tlength _ self size.\r\textras _ 0.\r\tcoefficients _ Array new: 8.\r\t1 to: 8 do: [:i | coefficients at: i put: (Array new: length + extras)].\r\t1 to: 5 by: 4 do: \r\t\t[:k | \r\t\t1 to: length do:\r\t\t\t[:i | (coefficients at: k)\r\t\t\t\t\tat: i put: (k = 1\r\t\t\t\t\t\tifTrue: [(self at: i) x asFloat]\r\t\t\t\t\t\tifFalse: [(self at: i) y asFloat])].\r\t\t\t1 to: extras do: [:i | (coefficients at: k)\r\t\t\t\t\tat: length + i put: ((coefficients at: k)\r\t\t\t\t\t\tat: i + 1)].\r\t\t\tself derivs: (coefficients at: k)\r\t\t\t\tfirst: (coefficients at: k + 1)\r\t\t\t\tsecond: (coefficients at: k + 2)\r\t\t\t\tthird: (coefficients at: k + 3)].\r\textras > 0 \r\t\tifTrue: [1 to: 8 do: \r\t\t\t\t\t[:i | \r\t\t\t\t\tcoefficients at: i put: ((coefficients at: i)\r\t\t\t\t\t\t\t\t\t\t\tcopyFrom: 2 to: length + 1)]]! !\r\r!Spline methodsFor: 'displaying'!\rdisplayOn: aDisplayMedium at: aPoint clippingBox: clipRect rule: anInteger fillColor: aForm \r\t\"Display the receiver, a spline curve, approximated by straight line\r\tsegments.\"\r\r\t| n line t x y x1 x2 x3 y1 y2 y3 |\r\tcollectionOfPoints size < 1 ifTrue: [self error: 'a spline must have at least one point'].\r\tline _ Line new.\r\tline form: self form.\r\tline beginPoint: \r\t\t(x _ (coefficients at: 1) at: 1) rounded @ (y _ (coefficients at: 5) at: 1) rounded.\r\t1 to: (coefficients at: 1) size - 1 do: \r\t\t[:i | \r\t\t\"taylor series coefficients\"\r\t\tx1 _ (coefficients at: 2) at: i.\r\t\ty1 _ (coefficients at: 6) at: i.\r\t\tx2 _ ((coefficients at: 3) at: i) / 2.0.\r\t\ty2 _ ((coefficients at: 7) at: i) / 2.0.\r\t\tx3 _ ((coefficients at: 4) at: i) / 6.0.\r\t\ty3 _ ((coefficients at: 8) at: i) / 6.0.\r\t\t\"guess n\"\r\t\tn _ 5 max: (x2 abs + y2 abs * 2.0 + ((coefficients at: 3)\r\t\t\t\t\t\t\tat: i + 1) abs + ((coefficients at: 7)\r\t\t\t\t\t\t\tat: i + 1) abs / 100.0) rounded.\r\t\t1 to: n - 1 do: \r\t\t\t[:j | \r\t\t\tt _ j asFloat / n.\r\t\t\tline endPoint: \r\t\t\t\t(x3 * t + x2 * t + x1 * t + x) rounded \r\t\t\t\t\t\t\t@ (y3 * t + y2 * t + y1 * t + y) rounded.\r\t\t\tline\r\t\t\t\tdisplayOn: aDisplayMedium\r\t\t\t\tat: aPoint\r\t\t\t\tclippingBox: clipRect\r\t\t\t\trule: anInteger\r\t\t\t\tfillColor: aForm.\r\t\t\tline beginPoint: line endPoint].\r\t\tline beginPoint: \r\t\t\t\t(x _ (coefficients at: 1) at: i + 1) rounded \r\t\t\t\t\t@ (y _ (coefficients at: 5) at: i + 1) rounded.\r\t\tline\r\t\t\tdisplayOn: aDisplayMedium\r\t\t\tat: aPoint\r\t\t\tclippingBox: clipRect\r\t\t\trule: anInteger\r\t\t\tfillColor: aForm]! !\r\r!Spline methodsFor: 'displaying'!\rdisplayOn: aDisplayMedium transformation: aTransformation clippingBox: clipRect rule: anInteger fillColor: aForm \r\t\"Get the scaled and translated path of newKnots.\"\r\r\t| newKnots newSpline |\r\tnewKnots _ aTransformation applyTo: self.\r\tnewSpline _ Spline new.\r\tnewKnots do: [:knot | newSpline add: knot].\r\tnewSpline form: self form.\r\tnewSpline\r\t\tdisplayOn: aDisplayMedium\r\t\tat: 0 @ 0\r\t\tclippingBox: clipRect\r\t\trule: anInteger\r\t\tfillColor: aForm! !\r\r\r!Spline methodsFor: 'private'!\rderivs: a first: point1 second: point2 third: point3\r\t\"Compute the first, second and third derivitives (in coefficients) from\r\tthe Points in this Path (coefficients at: 1 and coefficients at: 5).\"\r\r\t| l v anArray |\r\tl _ a size.\r\tl < 2 ifTrue: [^self].\r\tl > 2\r\t  ifTrue:\r\t\t[v _ Array new: l.\r\t\t v  at:  1 put: 4.0.\r\t\t anArray _ Array new: l.\r\t\t anArray  at:  1 put: (6.0 * ((a  at:  1) - ((a  at:  2) * 2.0) + (a  at:  3))).\r\t\t 2 to: l - 2 do:\r\t\t\t[:i | \r\t\t\tv  at:  i put: (4.0 - (1.0 / (v  at:  (i - 1)))).\r\t\t\tanArray\r\t\t\t\tat:  i \r\t\t\t\tput: (6.0 * ((a  at:  i) - ((a  at:  (i + 1)) * 2.0) + (a  at:  (i + 2)))\r\t\t\t\t\t\t- ((anArray  at:  (i - 1)) / (v  at:  (i - 1))))].\r\t\t point2  at: (l - 1) put: ((anArray  at:  (l - 2)) / (v  at:  (l - 2))).\r\t\t l - 2 to: 2 by: 0-1 do: \r\t\t\t[:i | \r\t\t\tpoint2 \r\t\t\t\tat: i \r\t\t\t\tput: ((anArray  at:  (i - 1)) - (point2  at:  (i + 1)) / (v  at:  (i - 1)))]].\r\tpoint2 at: 1 put: (point2  at:  l put: 0.0).\r\t1 to: l - 1 do:\r\t\t[:i | point1 \r\t\t\t\tat: i \r\t\t\t\tput: ((a at: (i + 1)) - (a  at:  i) - \r\t\t\t\t\t\t((point2  at:  i) * 2.0 + (point2  at:  (i + 1)) / 6.0)).\r\t\t      point3 at: i put: ((point2  at:  (i + 1)) - (point2  at:  i))]! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rSpline class\r\tinstanceVariableNames: ''!\r\r!Spline class methodsFor: 'examples' stamp: '6/8/97 13:55 di'!\rexample\r\t\"Designate points on the Path by clicking the red button. Terminate by\r\tpressing any other button. A curve will be displayed, through the\r\tselected points, using a long black form.\"\r\r\t| splineCurve aForm flag|\r\taForm _ Form extent: 2@2.\r\taForm  fillBlack.\r\tsplineCurve _ Spline new.\r\tsplineCurve form: aForm.\r\tflag _ true.\r\t[flag] whileTrue:\r\t\t[Sensor waitButton.\r\t\t Sensor redButtonPressed\r\t\t\tifTrue: \r\t\t\t\t[splineCurve add: Sensor waitButton. \r\t\t\t\t Sensor waitNoButton.\r\t\t\t\t aForm displayOn: Display at: splineCurve last]\r\t\t\tifFalse: [flag_false]].\r\tsplineCurve computeCurve.\r\tsplineCurve isEmpty \r\t\tifFalse: [splineCurve displayOn: Display.\r\t\t\t\tSensor waitNoButton].\r \r\t\"Spline example\"! !\rSelectionMenu subclass: #StandardFileMenu\r\tinstanceVariableNames: 'canTypeFileName pattern'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-FileList'!\r!StandardFileMenu commentStamp: '<historical>' prior: 0!\rI represent a SelectionMenu which operates like a modal dialog for selecting files, somewhat similar to the StandardFile dialogs in MacOS and Java Swing.\r\rTry for example, the following:\r\r\tStandardFileMenu oldFile inspect\r\r\tStandardFileMenu oldFileStream inspect\r\r\tStandardFileMenu newFile inspect\r\r\tStandardFileMenu newFileStream inspect!\r\r\r!StandardFileMenu methodsFor: 'menu building' stamp: 'di 5/12/2000 10:31'!\rdirectoryNamesString: aDirectory\r\"Answer a string concatenating the directory name strings in aDirectory, each string followed by a '[...]' indicator, and followed by a cr.\"\r\r\t^ String streamContents:\r\t\t[:s | aDirectory directoryNames do: \r\t\t\t\t[:dn | s nextPutAll: dn withBlanksTrimmed , ' [...]'; cr]]\r\r! !\r\r!StandardFileMenu methodsFor: 'menu building' stamp: 'tk 2/14/2000 14:58'!\rfileNamesString: aDirectory\r\"Answer a string concatenating the file name strings in aDirectory, each string followed by a cr.\"\r\r\t^String streamContents:\r\t\t[:s | \r\t\t\taDirectory fileNames do: \r\t\t\t\t[:fn |\r\t\t\t\t\t(pattern match: fn) ifTrue: [\r\t\t\t\t\t\ts nextPutAll: fn withBlanksTrimmed; cr]]]! !\r\r!StandardFileMenu methodsFor: 'menu building' stamp: 'tk 2/14/2000 14:25'!\rmakeFileMenuFor: aDirectory\r\"Initialize an instance of me to operate on aDirectory\"\r\r\t| theMenu |\r\tpattern ifNil: [pattern _ '*'].\r\tCursor wait showWhile: \r\t\t[self \r\t\t\tlabels: \t(self menuLabelsString: aDirectory)\r\t\t\tfont: \t(MenuStyle fontAt: 1) \r\t\t\tlines: \t(self menuLinesArray: aDirectory).\r\t\ttheMenu _ self selections: (self menuSelectionsArray: aDirectory)].\r\t^theMenu! !\r\r!StandardFileMenu methodsFor: 'menu building' stamp: 'acg 4/15/1999 21:57'!\rmenuLabelsString: aDirectory\r\"Answer a menu labels object corresponding to aDirectory\"\r\r\t^ String streamContents: \r\t\t[:s | \r\t\t\tcanTypeFileName ifTrue: \r\t\t\t\t[s nextPutAll: 'Enter File Name...'; cr].\r\t\t\ts nextPutAll: (self pathPartsString: aDirectory).\r\t\t\ts nextPutAll: (self directoryNamesString: aDirectory).\r\t\t\ts nextPutAll: (self fileNamesString: aDirectory).\r\t\t\ts skip: -1]! !\r\r!StandardFileMenu methodsFor: 'menu building' stamp: 'tpr 11/28/2003 15:12'!\rmenuLinesArray: aDirectory\r\"Answer a menu lines object corresponding to aDirectory\"\r\r\t| typeCount nameCnt dirDepth|\r\ttypeCount _ canTypeFileName \r\t\tifTrue: [1] \r\t\tifFalse: [0].\r\tnameCnt _ aDirectory directoryNames size.\r\tdirDepth _ aDirectory pathParts size.\r\t^Array streamContents: [:s |\r\t\tcanTypeFileName ifTrue: [s nextPut: 1].\r\t\ts nextPut: dirDepth + typeCount + 1.\r\t\ts nextPut: dirDepth + nameCnt + typeCount + 1]! !\r\r!StandardFileMenu methodsFor: 'menu building' stamp: 'di 5/12/2000 11:01'!\rmenuSelectionsArray: aDirectory\r\"Answer a menu selections object corresponding to aDirectory.  The object is an array corresponding to each item, each element itself constituting a two-element array, the first element of which contains a selector to operate on and the second element of which contains the parameters for that selector.\"\r\r\t|dirSize|\r\tdirSize _ aDirectory pathParts size.\r\t^Array streamContents: [:s |\r\t\tcanTypeFileName ifTrue:\r\t\t\t[s nextPut: (StandardFileMenuResult\r\t\t\t\tdirectory: aDirectory\r\t\t\t\tname: nil)].\r\t\ts nextPut: (StandardFileMenuResult\r\t\t\tdirectory: (FileDirectory root)\r\t\t\tname: '').\r\t\taDirectory pathParts doWithIndex: \r\t\t\t[:d :i | s nextPut: (StandardFileMenuResult\r\t\t\t\t\tdirectory: (self \r\t\t\t\t\t\tadvance: dirSize - i\r\t\t\t\t\t\tcontainingDirectoriesFrom: aDirectory)\r\t\t\t\t\tname: '')].\r\t\taDirectory directoryNames do: \r\t\t\t[:dn |  s nextPut: (StandardFileMenuResult\r\t\t\t\t\t\tdirectory: (FileDirectory on: (aDirectory fullNameFor: dn))\r\t\t\t\t\t\tname: '')].\r\t\taDirectory fileNames do: \r\t\t\t[:fn | (pattern match: fn) ifTrue: [\r\t\t\t\t\ts nextPut: (StandardFileMenuResult\r\t\t\t\t\t\tdirectory: aDirectory\r\t\t\t\t\t\tname: fn)]]]! !\r\r!StandardFileMenu methodsFor: 'menu building' stamp: 'acg 4/15/1999 21:03'!\rpathPartsString: aDirectory\r\"Answer a string concatenating the path parts strings in aDirectory, each string followed by a cr.\"\r\r\t^String streamContents:\r\t\t[:s | \r\t\t\ts nextPutAll: '[]'; cr.\r\t\t\taDirectory pathParts asArray doWithIndex: \r\t\t\t\t[:part :i |\r\t\t\t\t\ts next: i put: $ .\r\t\t\t\t\ts nextPutAll: part withBlanksTrimmed; cr]]! !\r\r\r!StandardFileMenu methodsFor: 'basic control sequences' stamp: 'acg 4/15/1999 21:52'!\rconfirmExistingFiles: aResult\r\r\t|choice|\r\t(aResult directory fileExists: aResult name) ifFalse: [^aResult].\r\t\r\tchoice _ (PopUpMenu\r\t\tlabels:\r'overwrite that file\rchoose another name\rcancel')\r\t\tstartUpWithCaption: aResult name, '\ralready exists.'.\r\r\tchoice = 1 ifTrue: [\r\t\taResult directory \r\t\t\tdeleteFileNamed: aResult name\r\t\t\tifAbsent: \r\t\t\t\t[^self startUpWithCaption: \r'Can''t delete ', aResult name, '\rSelect another file'].\r\t\t^aResult].\r\tchoice = 2 ifTrue: [^self startUpWithCaption: 'Select Another File'].\r\t^nil\r ! !\r\r!StandardFileMenu methodsFor: 'basic control sequences' stamp: 'dgd 9/21/2003 13:17'!\rgetTypedFileName: aResult\r\r\t| name |\r\tname _ FillInTheBlank \r\t\trequest: 'Enter a new file name' \r\t\tinitialAnswer: ''.\r\tname = '' ifTrue: [^self startUpWithCaption: 'Select a File:' translated].\r\tname _ aResult directory fullNameFor: name.\r\t^ StandardFileMenuResult\r\t\t\tdirectory: (FileDirectory forFileName: name)\r\t\t\tname: (FileDirectory localNameFor: name)\r! !\r\r!StandardFileMenu methodsFor: 'basic control sequences' stamp: 'acg 9/28/1999 23:34'!\rstartUpWithCaption: aString at: location\r\r\t|result|\r\tresult _ super startUpWithCaption: aString at: location.\r\tresult ifNil: [^nil].\r\tresult isDirectory ifTrue:\r\t\t[self makeFileMenuFor: result directory.\r\t\t self computeForm.\r\t\t ^self startUpWithCaption: aString at: location].\r\tresult isCommand ifTrue: \r\t\t[result _ self getTypedFileName: result.\r\t\tresult ifNil: [^nil]].\r\tcanTypeFileName ifTrue: [^self confirmExistingFiles: result].\r\t^result\r\t! !\r\r\r!StandardFileMenu methodsFor: 'private' stamp: 'acg 4/15/1999 00:32'!\radvance: anInteger containingDirectoriesFrom: aDirectory\r\r\t| theDirectory |\r\ttheDirectory _ aDirectory.\r\t1 to: anInteger do: [:i | theDirectory _ theDirectory containingDirectory].\r\t^theDirectory! !\r\r!StandardFileMenu methodsFor: 'private' stamp: 'acg 4/15/1999 20:50'!\rcomputeLabelParagraph\r\t\"Answer a Paragraph containing this menu's labels, one per line and centered.\"\r\r\t^ Paragraph withText: labelString asText style: (MenuStyle leftFlush)! !\r\r!StandardFileMenu methodsFor: 'private' stamp: 'acg 4/15/1999 22:03'!\rnewFileFrom: aDirectory\r\r\tcanTypeFileName _ true.\r\t^self makeFileMenuFor: aDirectory! !\r\r!StandardFileMenu methodsFor: 'private' stamp: 'rww 9/23/2001 09:54'!\rnewFileFrom: aDirectory withPattern: aPattern\r\r\tcanTypeFileName _ true.\r\tpattern _ aPattern.\r\t^self makeFileMenuFor: aDirectory! !\r\r!StandardFileMenu methodsFor: 'private' stamp: 'acg 4/15/1999 22:03'!\roldFileFrom: aDirectory\r\r\tcanTypeFileName _ false.\r\t^self makeFileMenuFor: aDirectory! !\r\r!StandardFileMenu methodsFor: 'private'!\roldFileFrom: aDirectory withPattern: aPattern\r\r\tcanTypeFileName _ false.\r\tpattern _ aPattern.\r\t^self makeFileMenuFor: aDirectory! !\r\r!StandardFileMenu methodsFor: 'private' stamp: 'tk 2/14/2000 14:24'!\rpattern: patString\r\t\" * for all files, or '*.cs' for changeSets, etc.  Just like fileLists\"\r\r\tpattern _ patString! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rStandardFileMenu class\r\tinstanceVariableNames: ''!\r\r!StandardFileMenu class methodsFor: 'instance creation' stamp: 'sma 4/30/2000 10:14'!\rnewFileMenu: aDirectory\r\tSmalltalk isMorphic ifFalse: [^ PluggableFileList newFileMenu: aDirectory].\r\t^ super new newFileFrom: aDirectory! !\r\r!StandardFileMenu class methodsFor: 'instance creation' stamp: 'rww 9/23/2001 09:56'!\rnewFileMenu: aDirectory withPattern: aPattern\r\tSmalltalk isMorphic ifFalse: [^ PluggableFileList newFileMenu: aDirectory].\r\t^ super new newFileFrom: aDirectory withPattern: aPattern! !\r\r!StandardFileMenu class methodsFor: 'instance creation' stamp: 'sma 4/30/2000 10:15'!\roldFileMenu: aDirectory\r\tSmalltalk isMorphic ifFalse: [^ PluggableFileList oldFileMenu: aDirectory].\r\t^ super new oldFileFrom: aDirectory! !\r\r!StandardFileMenu class methodsFor: 'instance creation' stamp: 'RAA 5/25/2000 09:30'!\roldFileMenu: aDirectory withPattern: aPattern\r\r\tSmalltalk isMorphic ifFalse: [^PluggableFileList oldFileMenu: aDirectory].\r\t^super new oldFileFrom: aDirectory withPattern: aPattern! !\r\r\r!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'tk 2/14/2000 14:28'!\rnewFile\r\r\t^self newFileFrom: (FileDirectory default)! !\r\r!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'dgd 9/21/2003 13:17'!\rnewFileFrom: aDirectory\r\r\t^(self newFileMenu: aDirectory)\r\t\tstartUpWithCaption: 'Select a File:' translated! !\r\r!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'acg 4/15/1999 22:18'!\rnewFileStream\r\r\t^self newFileStreamFrom: (FileDirectory default)! !\r\r!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'tk 2/14/2000 14:28'!\rnewFileStreamFrom: aDirectory\r\r\t| sfmResult fileStream |\r\tsfmResult _ self newFileFrom: aDirectory.\r\tsfmResult ifNil: [^nil].\r\tfileStream _ sfmResult directory newFileNamed: sfmResult name.\r\t[fileStream isNil] whileTrue:\r\t\t[sfmResult _ self newFileFrom: aDirectory.\r\t\tsfmResult ifNil: [^nil].\r\t\tfileStream _ sfmResult directory newFileNamed: sfmResult name].\r\t^fileStream\r! !\r\r!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'tk 2/14/2000 14:28'!\roldFile\r\r\t^self oldFileFrom: (FileDirectory default)! !\r\r!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'dgd 9/21/2003 13:17'!\roldFileFrom: aDirectory\r\r\t^(self oldFileMenu: aDirectory)\r\t\tstartUpWithCaption: 'Select a File:' translated! !\r\r!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'acg 4/15/1999 22:17'!\roldFileStream\r\r\t^self oldFileStreamFrom: (FileDirectory default)\r! !\r\r!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'tk 2/14/2000 14:27'!\roldFileStreamFrom: aDirectory\r\r\t| sfmResult fileStream |\r\tsfmResult _ self oldFileFrom: aDirectory.\r\tsfmResult ifNil: [^nil].\r\tfileStream _ sfmResult directory oldFileNamed: sfmResult name.\r\t[fileStream isNil] whileTrue:\r\t\t[sfmResult _ self oldFileFrom: aDirectory.\r\t\tsfmResult ifNil: [^nil].\r\t\tfileStream _ sfmResult directory oldFileNamed: sfmResult name].\r\t^fileStream\r! !\rObject subclass: #StandardFileMenuResult\r\tinstanceVariableNames: 'directory name'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-FileList'!\r\r!StandardFileMenuResult methodsFor: 'accessing' stamp: 'acg 4/15/1999 08:43'!\rdirectory\r\r\t^directory! !\r\r!StandardFileMenuResult methodsFor: 'accessing' stamp: 'acg 4/15/1999 08:43'!\rdirectory: aDirectory\r\r\t^directory _ aDirectory! !\r\r!StandardFileMenuResult methodsFor: 'accessing' stamp: 'acg 4/15/1999 08:43'!\rname\r\r\t^name! !\r\r!StandardFileMenuResult methodsFor: 'accessing' stamp: 'acg 4/15/1999 08:43'!\rname: aString\r\r\t^name _ aString! !\r\r!StandardFileMenuResult methodsFor: 'accessing' stamp: 'sw 6/9/1999 11:50'!\rprintOn: aStream\r\tsuper printOn: aStream.\r\taStream nextPutAll: ' with directory: '.\r\tdirectory printOn: aStream.\r\taStream nextPutAll: ' name: '.\r\tname printOn: aStream\r\r\"StandardFileMenu oldFile\"! !\r\r\r!StandardFileMenuResult methodsFor: 'testing' stamp: 'acg 4/15/1999 09:05'!\risCommand\r\r\t^name isNil! !\r\r!StandardFileMenuResult methodsFor: 'testing' stamp: 'acg 4/15/1999 20:57'!\risDirectory\r\r\t^name = ''! !\r\r\r!StandardFileMenuResult methodsFor: 'private' stamp: 'acg 4/15/1999 08:42'!\rdirectory: aDirectory name: aString\r\r\tdirectory _ aDirectory.\r\tname _ aString.\r\t^self! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rStandardFileMenuResult class\r\tinstanceVariableNames: ''!\r\r!StandardFileMenuResult class methodsFor: 'instance creation' stamp: 'acg 4/15/1999 08:42'!\rdirectory: aDirectory name: aString\r\r\t^super new directory: aDirectory name: aString! !\rFileStream subclass: #StandardFileStream\r\tinstanceVariableNames: 'name fileID buffer1'\r\tclassVariableNames: 'Registry'\r\tpoolDictionaries: ''\r\tcategory: 'System-Files'!\r!StandardFileStream commentStamp: '<historical>' prior: 0!\rProvides a simple, platform-independent, interface to a file system.  This initial version ignores issues of Directories etc.  The instance-variable fallbackStream at the moment holds an instance of HFSMacFileStream, to bridge us to the new world while in the old.  The instance variable rwmode, inherited from class PositionableStream, here is used to hold a Boolean -- true means opened for read-write, false means opened for read-only.  2/12/96 sw!\r\r\r!StandardFileStream methodsFor: 'open/close' stamp: 'ar 10/7/1998 14:43'!\rclose\r\t\"Close this file.\"\r\r\tfileID ifNotNil: [\r\t\tself primClose: fileID.\r\t\tself unregister.\r\t\tfileID _ nil].\r! !\r\r!StandardFileStream methodsFor: 'open/close' stamp: 'jm 2/6/2002 08:33'!\rclosed\r\t\"Answer true if this file is closed.\"\r\r\t^ fileID isNil or: [(self primSizeNoError: fileID) isNil]\r! !\r\r!StandardFileStream methodsFor: 'open/close' stamp: 'jm 9/21/1998 16:20'!\rensureOpen\r\t\"Make sure that this file really is open.\"\r\r\tself closed ifTrue: [^ self reopen].\r\t(self primSizeNoError: fileID) ifNotNil: [^ self].\r\tself reopen.\r! !\r\r!StandardFileStream methodsFor: 'open/close'!\ropen\r\t\"For compatibility with a few existing things.  2/14/96 sw\"\r\r\t^ self reopen! !\r\r!StandardFileStream methodsFor: 'open/close' stamp: 'ar 12/12/2001 15:58'!\ropen: fileName forWrite: writeMode \r\t\"Open the file with the given name. If writeMode is true, allow writing, otherwise open the file in read-only mode.\"\r\t\"Changed to do a GC and retry before failing ar 3/21/98 17:25\"\r\tfileID _ StandardFileStream retryWithGC:[self primOpen: fileName writable: writeMode] \r\t\t\t\t\tuntil:[:id| id notNil] \r\t\t\t\t\tforFileNamed: fileName.\r\tfileID ifNil: [^ nil].  \"allows sender to detect failure\"\r\tself register.\r\tname _ fileName.\r\trwmode _ writeMode.\r\tbuffer1 _ String new: 1.\r! !\r\r!StandardFileStream methodsFor: 'open/close'!\ropenReadOnly\r\t\"Open the receiver as a read-only file.  1/31/96 sw\"\r\r\t^ self open: name forWrite: false! !\r\r!StandardFileStream methodsFor: 'open/close' stamp: 'jm 9/21/1998 13:58'!\rreopen\r\t\"Close and reopen this file. The file position is reset to zero.\"\r\t\"Details: Files that were open when a snapshot occurs are no longer valid when the snapshot is resumed. This operation re-opens the file if that has happened.\"\r\r\tfileID ifNotNil: [self primCloseNoError: fileID].\r\tself open: name forWrite: rwmode.\r! !\r\r\r!StandardFileStream methodsFor: 'properties-setting'!\rascii\r\t\"opposite of binary\"\r\tbuffer1 _ String new: 1! !\r\r!StandardFileStream methodsFor: 'properties-setting'!\rbinary\r\tbuffer1 _ ByteArray new: 1! !\r\r!StandardFileStream methodsFor: 'properties-setting'!\risBinary\r\t^ buffer1 class == ByteArray! !\r\r!StandardFileStream methodsFor: 'properties-setting' stamp: 'tk 11/4/1998 19:17'!\risReadOnly\r\r\t^ rwmode not\r! !\r\r!StandardFileStream methodsFor: 'properties-setting' stamp: 'jm 9/21/1998 13:56'!\rreadOnly\r\t\"Make this file read-only.\"\r\r\trwmode _ false.\r! !\r\r\r!StandardFileStream methodsFor: 'access' stamp: 'jm 9/21/1998 14:16'!\rdirectory\r\t\"Return the directory containing this file.\"\r\r\t^ FileDirectory forFileName: self fullName\r! !\r\r!StandardFileStream methodsFor: 'access'!\rfile\r\t\"Answer the object representing the receiver's file.  Need for compatibility with some calls -- check senders.  2/14/96 sw\"\r\r\t^ self! !\r\r!StandardFileStream methodsFor: 'access' stamp: 'jm 9/21/1998 14:19'!\rfullName\r\t\"Answer this file's full path name.\"\r\r\t^ name\r! !\r\r!StandardFileStream methodsFor: 'access'!\risDirectory\r\t\"Answer whether the receiver represents a directory.  For the post-transition case, uncertain what to do.  2/14/96 sw\"\r\t^ false! !\r\r!StandardFileStream methodsFor: 'access' stamp: 'ar 11/24/1998 14:00'!\rlocalName\r\t^ name ifNotNil: [(name findTokens: FileDirectory pathNameDelimiter asString) last]! !\r\r!StandardFileStream methodsFor: 'access' stamp: 'jm 9/21/1998 14:19'!\rname\r\t\"Answer this file's full path name.\"\r\r\t^ name\r! !\r\r!StandardFileStream methodsFor: 'access' stamp: 'di 6/27/97 12:18'!\rpeekFor: item \r\t\"Answer false and do not advance if the next element is not equal to item, or if this stream is at the end.  If the next element is equal to item, then advance over it and return true\"\r\t| next |\r\t\"self atEnd ifTrue: [^ false]. -- SFStream will give nil\"\r\t(next _ self next) == nil ifTrue: [^ false].\r\titem = next ifTrue: [^ true].\r\tself skip: -1.\r\t^ false! !\r\r!StandardFileStream methodsFor: 'access'!\rprintOn: aStream\r\t\"Put a printed version of the receiver onto aStream.  1/31/96 sw\"\r\r\taStream nextPutAll: self class name; nextPutAll: ': '; print: name! !\r\r!StandardFileStream methodsFor: 'access' stamp: 'ar 6/16/2002 18:58'!\rreset\r\tself ensureOpen.\r\tself position: 0.! !\r\r!StandardFileStream methodsFor: 'access'!\rsize\r\t\"Answer the size of the file in characters.  2/12/96 sw\"\r\r\t^ self primSize: fileID! !\r\r\r!StandardFileStream methodsFor: 'read, write, position' stamp: 'sw 2/12/96'!\ratEnd\r\t\"Answer whether the receiver is at its end.  \"\r\t^ self primAtEnd: fileID! !\r\r!StandardFileStream methodsFor: 'read, write, position' stamp: 'mir 2/25/2000 12:37'!\rbasicNext\r\t\"Answer the next byte from this file, or nil if at the end of the file.\"\r\r\t| count |\r\tcount _ self primRead: fileID into: buffer1 startingAt: 1 count: 1.\r\tcount = 1\r\t\tifTrue: [^ buffer1 at: 1]\r\t\tifFalse: [^ nil].\r! !\r\r!StandardFileStream methodsFor: 'read, write, position' stamp: 'ls 8/23/2003 16:44'!\rfindString: string\r\t\"Fast version of #upToAll: to find a String in a file starting from the beginning.\r\tReturns the position and also sets the position there.\r\tIf string is not found 0 is returned and position is unchanged.\"\r\r\t| pos buffer count oldPos sz |\r\toldPos _ self position.\r\tself reset.\r\tsz _ self size.\r\tpos _ 0.\r\tbuffer _ String new: 2000.\r\t[ buffer := self nextInto: buffer.\r\t(count _ buffer findString: string) > 0\r\t\tifTrue: [\"Found the string part way into buffer\"\r\t\t\tself position: pos.\r\t\t\tself next: count - 1.\r\t\t\t^self position ].\r\tpos _ ((pos + 2000 - string size) min: sz).\r\tself position: pos.\r\tpos = sz] whileFalse.\r\t\"Never found it, and hit end of file\"\r\tself position: oldPos.\r\t^0! !\r\r!StandardFileStream methodsFor: 'read, write, position' stamp: 'ar 2/6/2001 17:59'!\rflush\r\t\"Flush pending changes\"\r\t^self primFlush: fileID! !\r\r!StandardFileStream methodsFor: 'read, write, position' stamp: 'mir 2/25/2000 12:37'!\rnext\r\t\"Answer the next byte from this file, or nil if at the end of the file.\"\r\r\t^ self basicNext! !\r\r!StandardFileStream methodsFor: 'read, write, position'!\rnext: n\r\t\"Return a string with the next n characters of the filestream in it.  1/31/96 sw\"\r\t^ self nextInto: (buffer1 class new: n)! !\r\r!StandardFileStream methodsFor: 'read, write, position' stamp: 'ar 12/23/1999 15:02'!\rnext: n into: aString startingAt: startIndex\r\t\"Read n bytes into the given string.\r\tReturn aString or a partial copy if less than\r\tn elements have been read.\"\r\t| count |\r\tcount _ self primRead: fileID into: aString\r\t\t\t\tstartingAt: startIndex count: n.\r\tcount = n\r\t\tifTrue:[^aString]\r\t\tifFalse:[^aString copyFrom: 1 to: startIndex+count-1]! !\r\r!StandardFileStream methodsFor: 'read, write, position' stamp: 'jm 9/21/1998 13:55'!\rnextPut: char\r\t\"Write the given character to this file.\"\r\r\trwmode ifFalse: [^ self error: 'Cannot write a read-only file'].\r\tbuffer1 at: 1 put: char.\r\tself primWrite: fileID from: buffer1 startingAt: 1 count: 1.\r\t^ char\r! !\r\r!StandardFileStream methodsFor: 'read, write, position' stamp: 'tk 2/5/2000 21:43'!\rnextPutAll: aString\r\t\"Write all the characters of the given string to this file.\"\r\r\trwmode ifFalse: [^ self error: 'Cannot write a read-only file'].\r\tself primWrite: fileID from: aString startingAt: 1 count: aString basicSize.\r\t^ aString\r! !\r\r!StandardFileStream methodsFor: 'read, write, position' stamp: 'tk 2/5/2000 21:58'!\rnextWordsInto: aBitmap\r\t\"Note: The file primitives automatically adjust for word based objects.\"\r\r\tself next: aBitmap basicSize into: aBitmap startingAt: 1.\r\taBitmap restoreEndianness.\r\t^ aBitmap! !\r\r!StandardFileStream methodsFor: 'read, write, position' stamp: 'mir 2/25/2000 12:37'!\rpeek\r\t\"Answer what would be returned if the message next were sent to the receiver. If the receiver is at the end, answer nil.  \"\r\t| next |\r\tself atEnd ifTrue: [^ nil].\r\tnext _ self basicNext.\r\tself position: self position - 1.\r\t^ next! !\r\r!StandardFileStream methodsFor: 'read, write, position'!\rposition\r\t\"Return the receiver's current file position.  2/12/96 sw\"\r\r\t^ self primGetPosition: fileID! !\r\r!StandardFileStream methodsFor: 'read, write, position'!\rposition: pos\r\t\"Set the receiver's position as indicated.  2/12/96 sw\"\r\r\t^ self primSetPosition: fileID to: pos! !\r\r!StandardFileStream methodsFor: 'read, write, position'!\rreadOnlyCopy\r\t^ StandardFileStream readOnlyFileNamed: self name! !\r\r!StandardFileStream methodsFor: 'read, write, position'!\rsetToEnd\r\t\"Set the position of the receiver to the end of file.  1/31/96 sw\"\r\r\tself position: self size! !\r\r!StandardFileStream methodsFor: 'read, write, position'!\rskip: n\r\t\"Set the character position to n characters from the current position.\r\tError if not enough characters left in the file.  1/31/96 sw\"\r\r\tself position: self position + n! !\r\r!StandardFileStream methodsFor: 'read, write, position' stamp: 'di 7/14/97 23:15'!\rupTo: delim \r\t\"Fast version to speed up nextChunk\"\r\t| pos buffer count |\r\tpos _ self position.\r\tbuffer _ self next: 2000.\r\t(count _ buffer indexOf: delim) > 0 ifTrue: \r\t\t[\"Found the delimiter part way into buffer\"\r\t\tself position: pos + count.\r\t\t^ buffer copyFrom: 1 to: count - 1].\r\tself atEnd ifTrue:\r\t\t[\"Never found it, and hit end of file\"\r\t\t^ buffer].\r\t\"Never found it, but there's more...\"\r\t^ buffer , (self upTo: delim)! !\r\r!StandardFileStream methodsFor: 'read, write, position' stamp: 'ar 12/22/1999 15:40'!\rupToEnd\r\t\"Answer a subcollection from the current access position through the last element of the receiver.\"\r\r\t| newStream buffer |\r\tbuffer _ buffer1 species new: 1000.\r\tnewStream _ WriteStream on: (buffer1 species new: 100).\r\t[self atEnd] whileFalse: [newStream nextPutAll: (self nextInto: buffer)].\r\t^ newStream contents! !\r\r\r!StandardFileStream methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\rprimAtEnd: id\r\t\"Answer true if the file position is at the end of the file.\"\r\r\t<primitive: 'primitiveFileAtEnd' module: 'FilePlugin'>\r\tself primitiveFailed\r! !\r\r!StandardFileStream methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\rprimClose: id\r\t\"Close this file.\"\r\r\t<primitive: 'primitiveFileClose' module: 'FilePlugin'>\r\tself primitiveFailed\r! !\r\r!StandardFileStream methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\rprimCloseNoError: id\r\t\"Close this file. Don't raise an error if the primitive fails.\"\r\r\t<primitive: 'primitiveFileClose' module: 'FilePlugin'>\r! !\r\r!StandardFileStream methodsFor: 'primitives' stamp: 'ar 2/6/2001 17:58'!\rprimFlush: id\r\t\"Flush pending changes to the disk\"\r\t| p |\r\t<primitive: 'primitiveFileFlush' module: 'FilePlugin'>\r\t\"In some OS's seeking to 0 and back will do a flush\"\r\tp _ self position.\r\tself position: 0; position: p! !\r\r!StandardFileStream methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\rprimGetPosition: id\r\t\"Get this files current position.\"\r\r\t<primitive: 'primitiveFileGetPosition' module: 'FilePlugin'>\r\tself primitiveFailed\r! !\r\r!StandardFileStream methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\rprimOpen: fileName writable: writableFlag\r\t\"Open a file of the given name, and return the file ID obtained.\r\tIf writableFlag is true, then\r\t\tif there is none with this name, then create one\r\t\telse prepare to overwrite the existing from the beginning\r\totherwise\r\t\tif the file exists, open it read-only\r\t\telse return nil\"\r\r\t<primitive: 'primitiveFileOpen' module: 'FilePlugin'>\r\t^ nil\r! !\r\r!StandardFileStream methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\rprimRead: id into: byteArray startingAt: startIndex count: count\r\t\"Read up to count bytes of data from this file into the given string or byte array starting at the given index. Answer the number of bytes actually read.\"\r\r\t<primitive: 'primitiveFileRead' module: 'FilePlugin'>\r\tself closed ifTrue: [^ self error: 'File is closed'].\r\tself error: 'File read failed'.\r! !\r\r!StandardFileStream methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\rprimSetPosition: id to: anInteger\r\t\"Set this file to the given position.\"\r\r\t<primitive: 'primitiveFileSetPosition' module: 'FilePlugin'>\r\tself primitiveFailed\r! !\r\r!StandardFileStream methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\rprimSize: id\r\t\"Answer the size of this file.\"\r\r\t<primitive: 'primitiveFileSize' module: 'FilePlugin'>\r\tself primitiveFailed\r! !\r\r!StandardFileStream methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\rprimSizeNoError: id\r\t\"Answer the size of this file. Answer nil if the primitive fails; this indicates that the file handle has become stale.\"\r\r\t<primitive: 'primitiveFileSize' module: 'FilePlugin'>\r\t^ nil\r! !\r\r!StandardFileStream methodsFor: 'primitives' stamp: 'ar 2/2/2001 15:09'!\rprimWrite: id from: stringOrByteArray startingAt: startIndex count: count\r\t\"Write count bytes onto this file from the given string or byte array starting at the given index. Answer the number of bytes written.\"\r\r\t<primitive: 'primitiveFileWrite' module: 'FilePlugin'>\r\tself closed ifTrue: [^ self error: 'File is closed'].\r\tself error: 'File write failed'.\r! !\r\r\r!StandardFileStream methodsFor: 'registry' stamp: 'ar 3/21/98 17:23'!\rregister\r\t^self class register: self! !\r\r!StandardFileStream methodsFor: 'registry' stamp: 'ar 3/21/98 17:23'!\runregister\r\t^self class unregister: self! !\r\r\r!StandardFileStream methodsFor: 'finalization' stamp: 'ar 3/21/98 18:16'!\ractAsExecutor\r\tsuper actAsExecutor.\r\tname := nil.! !\r\r!StandardFileStream methodsFor: 'finalization' stamp: 'ar 10/7/1998 15:44'!\rfinalize\r\tself primCloseNoError: fileID.! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rStandardFileStream class\r\tinstanceVariableNames: ''!\r\r!StandardFileStream class methodsFor: 'file creation' stamp: 'TPR 8/13/1999 21:22'!\rfileNamed: fileName\r\t\"Open a file with the given name for reading and writing. If the name has no directory part, then the file will be created in the default directory. If the file already exists, its prior contents may be modified or replaced, but the file will not be truncated on close.\"\r\r\t^ self new open: (self fullName: fileName) forWrite: true\r! !\r\r!StandardFileStream class methodsFor: 'file creation' stamp: 'tpr 10/21/2001 11:11'!\rforceNewFileNamed: fileName \r\t\"Create a new file with the given name, and answer a stream opened \r\tfor writing on that file. If the file already exists, delete it without \r\tasking before creating the new file.\"\r\t| dir localName fullName f |\r\tfullName _ self fullName: fileName.\r\t(self isAFileNamed: fullName)\r\t\tifFalse: [f _ self new open: fullName forWrite: true.\r\t\t\t^ f isNil\r\t\t\t\tifTrue: [\"Failed to open the file\"\r\t\t\t\t\t(FileDoesNotExistException fileName: fullName) signal]\r\t\t\t\tifFalse: [f]].\r\tdir _ FileDirectory forFileName: fullName.\r\tlocalName _ FileDirectory localNameFor: fullName.\r\tdir\r\t\tdeleteFileNamed: localName\r\t\tifAbsent: [(CannotDeleteFileException new\r\t\t\tmessageText: 'Could not delete the old version of file ' , fullName) signal].\r\tf _ self new open: fullName forWrite: true.\r\t^ f isNil\r\t\tifTrue: [\"Failed to open the file\"\r\t\t\t(FileDoesNotExistException fileName: fullName) signal]\r\t\tifFalse: [f]! !\r\r!StandardFileStream class methodsFor: 'file creation' stamp: 'mpw 9/18/1999 00:05'!\risAFileNamed: fileName\r\t\"Answer true if a file of the given name exists.\"\r\r\t| f |\r\tf _ self new open: fileName forWrite: false.\r\tf ifNil: [^ false].\r\tf close.\r\t^ true\r! !\r\r!StandardFileStream class methodsFor: 'file creation' stamp: 'LC 10/24/2001 21:43'!\rnewFileNamed: fileName\r \t\"Create a new file with the given name, and answer a stream opened for writing on that file. If the file already exists, ask the user what to do.\"\r\r\t| fullName |\r\tfullName _ self fullName: fileName.\r\r\t^(self isAFileNamed: fullName)\r\t\tifTrue: [\"file already exists:\"\r\t\t\t(FileExistsException fileName: fullName fileClass: self) signal]\r\t\tifFalse: [self new open: fullName forWrite: true]\r\r! !\r\r!StandardFileStream class methodsFor: 'file creation' stamp: 'mir 7/25/2000 16:39'!\roldFileNamed: fileName\r\t\"Open an existing file with the given name for reading and writing. If the name has no directory part, then the file will be created in the default directory. If the file already exists, its prior contents may be modified or replaced, but the file will not be truncated on close.\"\r\r\t| fullName |\r\tfullName _ self fullName: fileName.\r\r\t^(self isAFileNamed: fullName)\r\t\tifTrue: [self new open: fullName forWrite: true]\r\t\tifFalse: [\"File does not exist...\"\r\t\t\t(FileDoesNotExistException fileName: fullName) signal]! !\r\r!StandardFileStream class methodsFor: 'file creation' stamp: 'mdr 12/5/2000 19:51'!\rreadOnlyFileNamed: fileName \r\t\"Open an existing file with the given name for reading.\"\r\r\t| fullName f |\r\tfullName _ self fullName: fileName.\r\tf _ self new open: fullName forWrite: false.\r\t^ f isNil\r\t\tifFalse: [f]\r\t\tifTrue: [\"File does not exist...\"\r\t\t\t((FileDoesNotExistException fileName: fullName) readOnly: true) signal].\r\r\t\"StandardFileStream readOnlyFileNamed: 'kjsd.txt' \"! !\r\r\r!StandardFileStream class methodsFor: 'registry' stamp: 'ar 10/7/1998 14:41'!\rregister: anObject\r\tWeakArray isFinalizationSupported ifFalse:[^anObject].\r\tself registry add: anObject! !\r\r!StandardFileStream class methodsFor: 'registry' stamp: 'ar 10/7/1998 14:41'!\rregistry\r\tWeakArray isFinalizationSupported ifFalse:[^nil].\r\t^Registry isNil\r\t\tifTrue:[Registry := WeakRegistry new]\r\t\tifFalse:[Registry].! !\r\r!StandardFileStream class methodsFor: 'registry' stamp: 'ar 12/12/2001 15:55'!\rretryWithGC: execBlock until: testBlock forFileNamed: fullName\r\t\"Re-implemented to only force GC if a file with the given name exists\"\r\t| blockValue foundIt |\r\tblockValue := execBlock value.\r\t(testBlock value: blockValue) ifTrue:[^blockValue].\r\t\"See if we have a file with the given name\"\r\tfoundIt _ Registry keys \"hold on strongly for now\" \r\t\tanySatisfy:[:file| file name sameAs: fullName].\r\tfoundIt ifFalse:[^blockValue].\r\tSmalltalk garbageCollectMost.\r\tblockValue := execBlock value.\r\t(testBlock value: blockValue) ifTrue:[^blockValue].\r\tSmalltalk garbageCollect.\r\t^execBlock value.! !\r\r!StandardFileStream class methodsFor: 'registry' stamp: 'ar 10/7/1998 15:23'!\runregister: anObject\r\tWeakArray isFinalizationSupported ifFalse:[^anObject].\r\tself registry remove: anObject ifAbsent:[]! !\r\r\r!StandardFileStream class methodsFor: 'error handling' stamp: 'mir 2/28/2000 16:06'!\rfileDoesNotExistUserHandling: fullFileName\r\r\t| selection newName |\r\tselection _ (PopUpMenu labels:\r'create a new file\rchoose another name\rcancel')\r\t\t\tstartUpWithCaption: (FileDirectory localNameFor: fullFileName) , '\rdoes not exist.'.\r\tselection = 1 ifTrue:\r\t\t[^ self new open: fullFileName forWrite: true].\r\tselection = 2 ifTrue:\r\t\t[ newName _ FillInTheBlank request: 'Enter a new file name'\r\t\t\t\t\t\tinitialAnswer:  fullFileName.\r\t\t^ self oldFileNamed:\r\t\t\t(self fullName: newName)].\r\tself halt! !\r\r!StandardFileStream class methodsFor: 'error handling' stamp: 'mir 2/28/2000 15:24'!\rfileExistsUserHandling: fullFileName\r\t| dir localName choice newName newFullFileName |\r\tdir _ FileDirectory forFileName: fullFileName.\r\tlocalName _ FileDirectory localNameFor: fullFileName.\r\tchoice _ (PopUpMenu\r\t\tlabels:\r'overwrite that file\\choose another name\\cancel' withCRs)\r\t\tstartUpWithCaption: localName, '\ralready exists.'.\r\r\tchoice = 1 ifTrue: [\r\t\tdir deleteFileNamed: localName\r\t\t\tifAbsent: [self error: 'Could not delete the old version of that file'].\r\t\t^ self new open: fullFileName forWrite: true].\r\r\tchoice = 2 ifTrue: [\r\t\tnewName _ FillInTheBlank request: 'Enter a new file name' initialAnswer: fullFileName.\r\t\tnewFullFileName _ self fullName: newName.\r\t\t^ self newFileNamed: newFullFileName].\r\r\tself error: 'Please close this to abort file opening'! !\r\r!StandardFileStream class methodsFor: 'error handling' stamp: 'tpr 10/18/2001 19:08'!\rreadOnlyFileDoesNotExistUserHandling: fullFileName\r\r\t| dir files choices selection newName fileName |\r\tdir _ FileDirectory forFileName: fullFileName.\r\tfiles _ dir fileNames.\r\tfileName _ FileDirectory localNameFor: fullFileName.\r\tchoices _ fileName correctAgainst: files.\r\tchoices add: 'Choose another name'.\r\tchoices add: 'Cancel'.\r\tselection _ (PopUpMenu labelArray: choices lines: (Array with: 5) )\r\t\tstartUpWithCaption: (FileDirectory localNameFor: fullFileName), '\rdoes not exist.'.\r\tselection = choices size ifTrue:[\"cancel\" ^ nil \"should we raise another exception here?\"].\r\tselection < (choices size - 1) ifTrue: [\r\t\tnewName _ (dir pathName , FileDirectory slash , (choices at: selection))].\r\tselection = (choices size - 1) ifTrue: [\r\t\tnewName _ FillInTheBlank \r\t\t\t\t\t\t\trequest: 'Enter a new file name' \r\t\t\t\t\t\t\tinitialAnswer: fileName].\r\tnewName = '' ifFalse: [^ self readOnlyFileNamed: (self fullName: newName)].\r\t^ self error: 'Could not open a file'! !\rSourceFileArray subclass: #StandardSourceFileArray\r\tinstanceVariableNames: 'files'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Files'!\r!StandardSourceFileArray commentStamp: '<historical>' prior: 0!\rThis class implements the source file management behavior of traditional Squeak, with a sources file and a changes file. File positions are mapped such that those files can be up to 32MBytes in size.\r\rStructure:\r files\t\tArray -- storing the actual source files\r!\r\r\r!StandardSourceFileArray methodsFor: 'initialize-release' stamp: 'hmm 4/25/2000 21:20'!\rinitialize\r\tfiles _ Array new: 2.\r\tfiles at: 1 put: (SourceFiles at: 1).\r\tfiles at: 2 put: (SourceFiles at: 2)! !\r\r!StandardSourceFileArray methodsFor: 'initialize-release' stamp: 'ar 5/17/2000 18:28'!\rinitialize: nFiles\r\tfiles _ Array new: nFiles! !\r\r\r!StandardSourceFileArray methodsFor: 'accessing' stamp: 'hmm 4/25/2000 21:20'!\rat: index\r\t^files at: index! !\r\r!StandardSourceFileArray methodsFor: 'accessing' stamp: 'hmm 4/25/2000 21:20'!\rat: index put: aFile\r\tfiles at: index put: aFile! !\r\r!StandardSourceFileArray methodsFor: 'accessing' stamp: 'hmm 4/25/2000 21:20'!\rsize\r\t^files size! !\r\r\r!StandardSourceFileArray methodsFor: 'sourcePointer conversion' stamp: 'hmm 4/25/2000 21:44'!\rfileIndexFromSourcePointer: anInteger\r\t\"Return the index of the source file which contains the source chunk addressed by anInteger\"\r\t\"This implements the recent 32M source file algorithm\"\r\r\t| hi |\r\thi _ anInteger // 16r1000000.\r\t^hi < 3\r\t\tifTrue: [hi]\r\t\tifFalse: [hi - 2]! !\r\r!StandardSourceFileArray methodsFor: 'sourcePointer conversion' stamp: 'hmm 4/25/2000 21:44'!\rfilePositionFromSourcePointer: anInteger\r\t\"Return the position of the source chunk addressed by anInteger\"\r\t\"This implements the recent 32M source file algorithm\"\r\r\t| hi lo |\r\thi _ anInteger // 16r1000000.\r\tlo _ anInteger \\\\ 16r1000000.\r\t^hi < 3\r\t\tifTrue: [lo]\r\t\tifFalse: [lo + 16r1000000]! !\r\r!StandardSourceFileArray methodsFor: 'sourcePointer conversion' stamp: 'hmm 4/25/2000 21:48'!\rsourcePointerFromFileIndex: index andPosition: position\r\t| hi lo |\r\t\"Return a source pointer according to the new 32M algorithm\"\r\t((index between: 1 and: 2) and: [position between: 0 and: 16r1FFFFFF])\r\t\tifFalse: [self error: 'invalid source code pointer'].\r\thi _ index.\r\tlo _ position.\r\tlo >= 16r1000000 ifTrue: [\r\t\thi _ hi+2.\r\t\tlo _ lo - 16r1000000].\r\t^hi * 16r1000000 + lo! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rStandardSourceFileArray class\r\tinstanceVariableNames: ''!\r\r!StandardSourceFileArray class methodsFor: 'initialize-release' stamp: 'hmm 4/25/2000 21:19'!\rinstall\r\t\"Replace SourceFiles by an instance of me with the standard sources and changes files.\r\tThis only works if SourceFiles is either an Array or an instance of this class\"\r\t\"StandardSourceFileArray install\"\r\tSourceFiles _ self new initialize! !\r\r!StandardSourceFileArray class methodsFor: 'initialize-release' stamp: 'ar 5/17/2000 18:27'!\rnew: nFiles\r\t^self new initialize: nFiles.! !\rMouseMenuController subclass: #StandardSystemController\r\tinstanceVariableNames: 'status'\r\tclassVariableNames: 'HBorderCursor ScheduledBlueButtonMenu ScheduledBlueButtonMessages VBorderCursor'\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Support'!\r!StandardSystemController commentStamp: '<historical>' prior: 0!\rI am a controller for StandardSystemViews, that is, those views that are at the top level of a project in the system user interface. I am a kind of MouseMenuController that creates a blue button menu for moving, framing, collapsing, and closing ScheduledViews, and for selecting views under the view of my instance.!\r\r\r!StandardSystemController methodsFor: 'initialize-release' stamp: 'sma 3/11/2000 11:48'!\rinitialize\r\tsuper initialize.\r\tstatus _ #inactive! !\r\r\r!StandardSystemController methodsFor: 'control defaults' stamp: 'sma 3/11/2000 12:01'!\rblueButtonActivity\r\tScheduledBlueButtonMenu ifNil: [^ super controlActivity].\r\tScheduledBlueButtonMenu invokeOn: self! !\r\r!StandardSystemController methodsFor: 'control defaults' stamp: 'sma 3/11/2000 15:20'!\rcontrolActivity\r\tself checkForReframe.\r\t^ super controlActivity! !\r\r!StandardSystemController methodsFor: 'control defaults'!\risControlActive\r\tstatus == #active ifFalse: [^ false].\r\tsensor anyButtonPressed ifFalse: [^ true].\r\tself viewHasCursor\r\t\tifTrue: [^ true]\r\t\tifFalse: [ScheduledControllers noteNewTop.\r\t\t\t\t^ false]! !\r\r!StandardSystemController methodsFor: 'control defaults' stamp: 'sma 3/15/2000 22:19'!\rredButtonActivity\r\t\"If cursor is in label of a window when red button is pushed,\r\tcheck for closeBox or growBox, else drag the window frame\r\tor edit the label.\"\r\r\t| box p |\r\tp _ sensor cursorPoint.\r\tself labelHasCursor ifFalse: [super redButtonActivity. ^ self].\r\t((box _ view closeBoxFrame) containsPoint: p)\r\t\tifTrue:\r\t\t\t[Utilities\r\t\t\t\tawaitMouseUpIn: box\r\t\t\t\trepeating: []\r\t\t\t\tifSucceed: [self close. ^ self].\r\t\t\t^ self].\r\t((box _ view growBoxFrame) containsPoint: p)\r\t\tifTrue:\r\t\t\t[Utilities\r\t\t\t\tawaitMouseUpIn: box\r\t\t\t\trepeating: []\r\t\t\t\tifSucceed:\r\t\t\t\t\t[Sensor controlKeyPressed ifTrue: [^ self expand; fullScreen].\r\t\t\t\t\t^ view isCollapsed\r\t\t\t\t\t\tifTrue: [self expand]\r\t\t\t\t\t\tifFalse: [self collapse]].\r\t\t\t^ self].\r\t(((box _ view labelTextRegion expandBy: 1) containsPoint: p)\r\t\t\tand: [Preferences clickOnLabelToEdit or: [sensor leftShiftDown]])\r\t\tifTrue:\r\t\t\t[Utilities\r\t\t\t\tawaitMouseUpIn: box\r\t\t\t\trepeating: []\r\t\t\t\tifSucceed: [^ self label].\r\t\t\t^ self].\r\tself move! !\r\r\r!StandardSystemController methodsFor: 'basic control sequence' stamp: 'sw 10/20/1999 09:52'!\rcontrolInitialize\r\tview displayEmphasized.\r\tview uncacheBits.  \"Release cached bitmap while active\"\r\tmodel windowActiveOnFirstClick ifFalse: [sensor waitNoButton].\r\tstatus _ #active.\r\tview isCollapsed ifFalse: [model modelWakeUpIn: view]! !\r\r!StandardSystemController methodsFor: 'basic control sequence' stamp: 'di 5/11/1999 22:05'!\rcontrolTerminate\r\tstatus == #closed\r\t\tifTrue: \r\t\t\t[view ~~ nil ifTrue: [view release].\r\t\t\tScheduledControllers unschedule: self.\r\t\t\t^self].\r\tview deEmphasize; cacheBits.\r\tview isCollapsed ifFalse: [model modelSleep].! !\r\r\r!StandardSystemController methodsFor: 'menu messages'!\rchooseColor\r\t\"Allow the user to specify a new background color for the receiver's window.  5/6/96 sw.\r\t 7/31/96 sw: use Color fromUser\"\r\r\tview backgroundColor: Color fromUser; uncacheBits; display! !\r\r!StandardSystemController methodsFor: 'menu messages'!\rclose\r\t\"The receiver's view should be removed from the screen and from the \r\tcollection of scheduled views.\"\r\r\tmodel okToChange ifFalse: [^self].\r\tstatus _ #closed.\r\tview erase! !\r\r!StandardSystemController methodsFor: 'menu messages'!\rcollapse\r\t\"Get the receiver's view to change to a collapsed view on the screen.\"\r\tview collapseToPoint: view chooseCollapsePoint! !\r\r!StandardSystemController methodsFor: 'menu messages'!\rexpand\r\t\"The receiver's view was collapsed; open it again and ask the user to \r\tdesignate its rectangular area.\"\r\tview expand; emphasize! !\r\r!StandardSystemController methodsFor: 'menu messages' stamp: 'jm 4/28/1998 06:57'!\rlabel\r\r\t| newLabel |\r\tnewLabel _ FillInTheBlank\r\t\trequest: 'Edit the label, then type RETURN'\r\t\tinitialAnswer: view label.\r\tnewLabel isEmpty ifFalse: [view relabel: newLabel].\r! !\r\r!StandardSystemController methodsFor: 'menu messages'!\rmove\r\t\"Ask the user to designate a new origin position for the receiver's view.\r\t6/10/96 sw: tell the view that it has moved\"\r\r\t| oldBox | \r\toldBox _ view windowBox.\r\tview uncacheBits.\r\tview align: view windowBox topLeft\r\t\twith: view chooseMoveRectangle topLeft.\r\tview displayEmphasized.\r\tview moved.  \"In case its model wishes to take note.\"\r\t(oldBox areasOutside: view windowBox) do:\r\t\t[:rect | ScheduledControllers restore: rect]! !\r\r!StandardSystemController methodsFor: 'menu messages'!\rreframe\r\t^ view reframeTo: view getFrame! !\r\r!StandardSystemController methodsFor: 'menu messages'!\rtoggleTwoTone\r\t(view isMemberOf: StandardSystemView) ifTrue:\r\t\t[^ view become: (view as: ColorSystemView)].\r\t(view isMemberOf: ColorSystemView) ifTrue:\r\t\t[^ view become: (view as: StandardSystemView)].\r! !\r\r!StandardSystemController methodsFor: 'menu messages'!\runder\r\t\"Deactive the receiver's scheduled view and pass control to any view that \r\tmight be positioned directly underneath it and the cursor.\"\r\r\tstatus _ #inactive! !\r\r\r!StandardSystemController methodsFor: 'scheduling' stamp: 'sw 9/30/97 22:04'!\rcloseAndUnschedule\r\t\"Erase the receiver's view and remove it from the collection of scheduled \r\tviews.\"\r\r\tstatus _ #closed.\r\tview erase.\r\tview release.\r\tScheduledControllers unschedule: self; searchForActiveController\r! !\r\r!StandardSystemController methodsFor: 'scheduling'!\rcloseAndUnscheduleNoErase\r\t\"Remove the scheduled view from the collection of scheduled views. Set \r\tits status to closed but do not erase.\"\r\r\tstatus _ #closed.\r\tview release.\r\tScheduledControllers unschedule: self! !\r\r!StandardSystemController methodsFor: 'scheduling' stamp: 'jm 3/18/98 19:21'!\rcloseAndUnscheduleNoTerminate\r\t\"Erase the receiver's view and remove it from the collection of scheduled views, but do not terminate the current process.\"\r\r\tstatus _ #closed.\r\tview erase.\r\tview release.\r\tScheduledControllers unschedule: self.\r! !\r\r!StandardSystemController methodsFor: 'scheduling'!\ropen\r\t\"Create an area on the screen in which the receiver's scheduled view can \r\tbe displayed. Make it the active view.\"\r\r\tview resizeInitially.\r\tstatus _ #open.\r\tScheduledControllers scheduleActive: self! !\r\r!StandardSystemController methodsFor: 'scheduling'!\ropenDisplayAt: aPoint \r\t\"Create an area with origin aPoint in which the receiver's scheduled \r\tview can be displayed. Make it the active view.\"\r\r\tview align: view viewport center with: aPoint.\r\tview translateBy:\r\t\t(view displayBox amountToTranslateWithin: Display boundingBox).\r\tstatus _ #open.\r\tScheduledControllers scheduleActive: self! !\r\r!StandardSystemController methodsFor: 'scheduling' stamp: 'jm 10/22/97 08:16'!\ropenNoTerminate\r\t\"Create an area in which the receiver's scheduled view can be displayed. \r\tMake it the active view. Do not terminate the currently active process.\"\r\r\tview resizeInitially.\r\tstatus _ #open.\r\tScheduledControllers scheduleActiveNoTerminate: self! !\r\r!StandardSystemController methodsFor: 'scheduling'!\ropenNoTerminateDisplayAt: aPoint \r\t\"Create an area with origin aPoint in which the receiver's scheduled \r\tview can be displayed. Make it the active view. Do not terminate the \r\tcurrently active process.\"\r\r\tview resizeMinimumCenteredAt: aPoint.\r\tstatus _ #open.\r\tScheduledControllers scheduleActiveNoTerminate: self! !\r\r!StandardSystemController methodsFor: 'scheduling'!\rstatus: aSymbol\r\tstatus _ aSymbol! !\r\r\r!StandardSystemController methodsFor: 'borders' stamp: 'ls 7/11/1998 07:45'!\radjustPaneBorders \r\t| side sub newRect outerFrame |\r\touterFrame _ view displayBox.\r\tside _ #none.\r\tVBorderCursor showWhile:\r\t\t[ [sub _ view subviewWithLongestSide: [:s | side _ s]\r\t\t\t\t\t\tnear: sensor cursorPoint.\r\t\t  self cursorOnBorder and: [(side = #left) | (side = #right)]]\r\t\t\twhileTrue: [\r\t\t\t\tself interActivityPause.\r\t\t\t\tsensor redButtonPressed ifTrue:\r\t\t\t\t[side = #left ifTrue:\r\t\t\t\t\t[newRect _ sub stretchFrame:\r\t\t\t\t\t\t[:f | (f withLeft: sensor cursorPoint x)\r\t\t\t\t\t\t\t\tintersect: outerFrame]\r\t\t\t\t\t\tstartingWith: sub displayBox].\r\t\t\t\tside = #right ifTrue:\r\t\t\t\t\t[newRect _ sub stretchFrame:\r\t\t\t\t\t\t[:f | (f withRight: sensor cursorPoint x)\r\t\t\t\t\t\t\t\tintersect: outerFrame]\r\t\t\t\t\t\tstartingWith: sub displayBox].\r\t\t\t\tview reframePanesAdjoining: sub along: side to: newRect]]].\r\tHBorderCursor showWhile:\r\t\t[ [sub _ view subviewWithLongestSide: [:s | side _ s]\r\t\t\t\t\t\tnear: sensor cursorPoint.\r\t\t  self cursorOnBorder and: [(side = #top) | (side = #bottom)]]\r\t\t\twhileTrue: [\r\t\t\t\tself interActivityPause.\r\t\t\t\tsensor redButtonPressed ifTrue:\r\t\t\t\t[side = #top ifTrue:\r\t\t\t\t\t[newRect _ sub stretchFrame:\r\t\t\t\t\t\t[:f | (f withTop: sensor cursorPoint y)\r\t\t\t\t\t\t\t\tintersect: outerFrame]\r\t\t\t\t\t\tstartingWith: sub displayBox].\r\t\t\t\tside = #bottom ifTrue:\r\t\t\t\t\t[newRect _ sub stretchFrame:\r\t\t\t\t\t\t[:f | (f withBottom: sensor cursorPoint y)\r\t\t\t\t\t\t\t\tintersect: outerFrame]\r\t\t\t\t\t\tstartingWith: sub displayBox].\r\t\t\t\tview reframePanesAdjoining: sub along: side to: newRect]]]! !\r\r!StandardSystemController methodsFor: 'borders' stamp: 'di 11/16/2001 22:22'!\radjustWindowBorders \r\t| side noClickYet |\r\tnoClickYet _ true.\r\tVBorderCursor showWhile:\r\t\t[ [side _ view displayBox sideNearestTo: sensor cursorPoint.\r\t\t  self cursorOnBorder\r\t\t\tand: [(side = #left) | (side = #right)\r\t\t\tand: [noClickYet or: [sensor redButtonPressed]]]]\r\t\t\twhileTrue:\r\t\t\t[sensor redButtonPressed ifTrue:\r\t\t\t\t[noClickYet _ false.\r\t\t\t\tside = #left ifTrue:\r\t\t\t\t\t[view newFrame: [:f | f withLeft: sensor cursorPoint x]].\r\t\t\t\tside = #right ifTrue:\r\t\t\t\t\t[view newFrame: [:f | f withRight: sensor cursorPoint x]]].\r\t\t\tself interActivityPause]].\r\tHBorderCursor showWhile:\r\t\t[ [side _ view displayBox sideNearestTo: sensor cursorPoint.\r\t\t  self cursorOnBorder\r\t\t\tand: [(side = #top) | (side = #bottom)\r\t\t\tand: [noClickYet or: [sensor redButtonPressed]]]]\r\t\t\twhileTrue:\r\t\t\t[sensor redButtonPressed ifTrue:\r\t\t\t\t[noClickYet _ false.\r\t\t\t\tside = #top ifTrue:\r\t\t\t\t\t[view newFrame: [:f | f withTop: sensor cursorPoint y]].\r\t\t\t\tside = #bottom ifTrue:\r\t\t\t\t\t[view newFrame: [:f | f withBottom: sensor cursorPoint y]]].\r\t\t  self interActivityPause]]! !\r\r!StandardSystemController methodsFor: 'borders' stamp: 'ls 7/11/1998 07:38'!\radjustWindowCorners \r\t| box cornerBox p clicked f2 |\r\tbox _ view windowBox.\r\tclicked _ false.\r\t#(topLeft topRight bottomRight bottomLeft)\r\t\tdo: [:readCorner |\r\t\t\tcornerBox _ ((box insetBy: 2) perform: readCorner) - (10@10) extent: 20@20.\r\t\t\t(cornerBox containsPoint: sensor cursorPoint)\r\t\t\t\tifTrue: \r\t\t\t\t[\"Display reverse: cornerBox.\"\r\t\t\t\t(Cursor perform: readCorner) showWhile:\r\t\t\t\t\t[[(cornerBox containsPoint: (p _ sensor cursorPoint))\r\t\t\t\t\t\tand: [(clicked _ sensor anyButtonPressed) not]]\r\t\t\t\t\t\twhileTrue: [ self interActivityPause ].\r\t\t\t\t\"Display reverse: cornerBox.\"\r\t\t\t\tclicked ifTrue:\r\t\t\t\t\t[view newFrame:\r\t\t\t\t\t\t[:f | p _ sensor cursorPoint.\r\t\t\t\t\t\treadCorner = #topLeft ifTrue:\r\t\t\t\t\t\t\t[f2 _ p corner: f bottomRight].\r\t\t\t\t\t\treadCorner = #bottomLeft ifTrue:\r\t\t\t\t\t\t\t[f2 _ (f withBottom: p y) withLeft: p x].\r\t\t\t\t\t\treadCorner = #bottomRight ifTrue:\r\t\t\t\t\t\t\t[f2 _ f topLeft corner: p].\r\t\t\t\t\t\treadCorner = #topRight ifTrue:\r\t\t\t\t\t\t\t[f2 _ (f withTop: p y) withRight: p x].\r\t\t\t\t\t\tf2]]]]].\r\t^ clicked! !\r\r!StandardSystemController methodsFor: 'borders' stamp: 'di 11/16/2001 22:30'!\rcheckForReframe\r\t| cp |\r\tview isCollapsed ifTrue: [^ self].\r\tcp _ sensor cursorPoint.\r\t((view closeBoxFrame expandBy: 2) containsPoint: cp)\r\t\t| ((view growBoxFrame expandBy: 2) containsPoint: cp)\r\t\tifTrue: [^ self].  \"Dont let reframe interfere with close/grow\"\r\tself adjustWindowCorners.\r\tself cursorOnBorder ifFalse: [^ self].\r\t((view insetDisplayBox insetBy: 2@2) containsPoint: cp)\r\t\tifFalse: [^ self adjustWindowBorders].\r\tview subViews size <= 1 ifTrue: [^ self].\r\t(view subviewWithLongestSide: [:s | ] near: cp) == nil\r\t\tifFalse: [^ self adjustPaneBorders].! !\r\r!StandardSystemController methodsFor: 'borders'!\rcursorOnBorder \r\t| cp i box |\r\tview isCollapsed ifTrue: [^ false].\r\tcp _ sensor cursorPoint.\r\t((view labelDisplayBox insetBy: (0@2 corner: 0@-2)) containsPoint: cp)\r\t\tifTrue: [^ false].\r\t(i _ view subViews findFirst: [:v | v displayBox containsPoint: cp]) = 0\r\t\tifTrue: [box _ view windowBox]\r\t\tifFalse: [box _ (view subViews at: i) insetDisplayBox].\r\t^ ((box insetBy: 3) containsPoint: cp) not\r\t\tand: [(box expandBy: 4) containsPoint: cp]! !\r\r!StandardSystemController methodsFor: 'borders'!\rfullScreen\r\t\"Make the receiver's window occupy jes' about the full screen.  6/10/96 sw\"\r\r\tview fullScreen! !\r\r\r!StandardSystemController methodsFor: 'cursor'!\rlabelHasCursor\r\t\"Answer true if the cursor is within the window's label\"\r\t^view labelContainsPoint: sensor cursorPoint! !\r\r\r!StandardSystemController methodsFor: 'pluggable menus' stamp: 'sma 3/11/2000 15:12'!\rgetPluggableYellowButtonMenu: shiftKeyState\r\t^ nil! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rStandardSystemController class\r\tinstanceVariableNames: ''!\r\r!StandardSystemController class methodsFor: 'class initialization' stamp: 'sma 3/11/2000 11:57'!\rinitialize\r\t\"StandardSystemController initialize\"\r\r\tScheduledBlueButtonMenu _ SelectionMenu\r\t\tlabels:\r'edit label\rchoose color...\rtwo-tone/full color\rmove\rframe\rfull screen\rcollapse\rclose'\r\tlines: #(3 7)\r\tselections: #(label chooseColor toggleTwoTone move reframe fullScreen collapse close).\r\r\tVBorderCursor _ Cursor extent: 16@16 fromArray: #(\r\t\t2r1010000000000000\r\t\t2r1010000000000000\r\t\t2r1010000000000000\r\t\t2r1010000000000000\r\t\t2r1010000000000000\r\t\t2r1010010000100000\r\t\t2r1010110000110000\r\t\t2r1011111111111000\r\t\t2r1010110000110000\r\t\t2r1010010000100000\r\t\t2r1010000000000000\r\t\t2r1010000000000000\r\t\t2r1010000000000000\r\t\t2r1010000000000000\r\t\t2r1010000000000000\r\t\t2r1010000000000000)\r\t\t\toffset: 0@0.\r\tHBorderCursor _ Cursor extent: 16@16 fromArray: #(\r\t\t2r1111111111111111\r\t\t2r0000000000000000\r\t\t2r1111111111111111\r\t\t2r0000000100000000\r\t\t2r0000001110000000\r\t\t2r0000011111000000\r\t\t2r0000000100000000\r\t\t2r0000000100000000\r\t\t2r0000000100000000\r\t\t2r0000000100000000\r\t\t2r0000011111000000\r\t\t2r0000001110000000\r\t\t2r0000000100000000\r\t\t2r0000000000000000\r\t\t2r0000000000000000\r\t\t2r0000000000000000)\r\t\t\toffset: 0@0.! !\rView subclass: #StandardSystemView\r\tinstanceVariableNames: 'labelFrame labelText isLabelComplemented savedSubViews minimumSize maximumSize collapsedViewport expandedViewport labelBits windowBits bitsValid updatablePanes'\r\tclassVariableNames: 'CacheBits LabelStyle'\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Support'!\r!StandardSystemView commentStamp: '<historical>' prior: 0!\rI represent a view that has a label above its top left corner. The text in the label identifies the kind of view. In addition to a label, I add control over the maximum and minimum size of the display box of my instance. My default controller is StandardSystemController. The elements of ScheduledControllers, the sole instance of ControlManager, are usually controllers for instances of me.!\r\r\r!StandardSystemView methodsFor: 'initialize-release' stamp: 'sw 10/29/1999 12:58'!\rinitialize \r\t\"Refer to the comment in View|initialize.\"\r\tsuper initialize.\r\tlabelFrame _ Quadrangle new.\r\tlabelFrame region: (Rectangle origin: 0 @ 0 extent: 50 @ self labelHeight).\r\tlabelFrame borderWidthLeft: 2 right: 2 top: 2 bottom: 2.\r\tself label: nil.\r\tisLabelComplemented _ false.\r\tminimumSize _ 50 @ 50.\r\tmaximumSize _ Display extent.\r\tcollapsedViewport _ nil.\r\texpandedViewport _ nil.\r\tbitsValid _ false.\r\tupdatablePanes _ #()! !\r\r!StandardSystemView methodsFor: 'initialize-release'!\rmodel: aModel\r\t\"Set the receiver's model.  For a Standard System View, we also at this time get the default background color set up.  7/30/96 sw\"\r\tsuper model: aModel.\r\tself setDefaultBackgroundColor! !\r\r!StandardSystemView methodsFor: 'initialize-release' stamp: 'jm 8/20/1998 18:29'!\rrelease\r\r\tmodel windowIsClosing.\r\tself isCollapsed ifTrue: [savedSubViews do: [:v | v release]].\r\tsuper release.\r! !\r\r\r!StandardSystemView methodsFor: 'testing'!\rcontainsPoint: aPoint \r\t\"Refer to the comment in View|containsPoint:.\"\r\r\t^(super containsPoint: aPoint) | (self labelContainsPoint: aPoint)! !\r\r!StandardSystemView methodsFor: 'testing'!\risCollapsed\r\t\"Answer whether the receiver is collapsed (true) or expanded (false).\"\r\r\t^savedSubViews ~~ nil! !\r\r!StandardSystemView methodsFor: 'testing'!\rlabelContainsPoint: aPoint \r\t\"Answer TRUE if aPoint is in the label box.\"\r\r\t^self labelDisplayBox containsPoint: aPoint! !\r\r\r!StandardSystemView methodsFor: 'label access' stamp: 'di 6/16/97 12:30'!\rcloseBoxFrame\r\t^ Rectangle origin: (self labelDisplayBox leftCenter + (10@-5)) extent: (11@11)! !\r\r!StandardSystemView methodsFor: 'label access' stamp: 'di 6/16/97 12:29'!\rgrowBoxFrame\r\t^ Rectangle origin: (self labelDisplayBox rightCenter + (-22@-5)) extent: (11@11)! !\r\r!StandardSystemView methodsFor: 'label access'!\rlabel\r\t\"Answer the string that appears in the receiver's label.\"\r\tlabelText isNil\r\t\tifTrue: [^ 'Untitled' copy]\r\t\tifFalse: [^ labelText asString]! !\r\r!StandardSystemView methodsFor: 'label access' stamp: 'sw 12/9/1999 17:44'!\rlabel: aString \r\t\"Set aString to be the receiver's label.\"\r\tlabelText _ Paragraph\r\t\t\twithText: (Text string: ((aString == nil or: [aString isEmpty])\r\t\t\t\t\t\t\t\tifTrue: ['Untitled' copy]\r\t\t\t\t\t\t\t\tifFalse: [aString])\r\t\t\t\t\t\t\tattributes: (Array with: TextEmphasis bold))\r\t\t\tstyle: LabelStyle.\r\tinsetDisplayBox == nil ifTrue: [^ self].  \"wait for further initialization\"\r\tself setLabelRegion! !\r\r!StandardSystemView methodsFor: 'label access'!\rlabelColor\r\t\"Answer the color to use as the background for the receiver's label.  By default, this is the same as the background color of the window, but need not be.  7/16/96 sw\"\r\r\t^ self backgroundColor! !\r\r!StandardSystemView methodsFor: 'label access'!\rlabelDisplayBox\r\t\"Answer the rectangle that borders the visible parts of the receiver's label \r\ton the display screen.\"\r\r\t^ labelFrame region\r\t\talign: labelFrame topLeft\r\t\twith: self windowOrigin! !\r\r!StandardSystemView methodsFor: 'label access'!\rlabelFrame\r\t^labelFrame! !\r\r!StandardSystemView methodsFor: 'label access' stamp: 'sw 12/9/1999 17:47'!\rlabelHeight\r\t^ ((LabelStyle fontAt: 1) height + 4) max: 20! !\r\r!StandardSystemView methodsFor: 'label access'!\rlabelOffset\r\t^ 0 @ (self labelHeight-2)! !\r\r!StandardSystemView methodsFor: 'label access' stamp: 'sr 3/26/2000 04:26'!\rlabelText\r\t^labelText! !\r\r!StandardSystemView methodsFor: 'label access'!\rlabelTextRegion\r\tlabelText == nil ifTrue: [^ self labelDisplayBox center extent: 0@0].\r\t^ (labelText boundingBox\r\t\t\talign: labelText boundingBox center\r\t\t\twith: self labelDisplayBox center)\r\t\tintersect: (self labelDisplayBox insetBy: 35@0)! !\r\r!StandardSystemView methodsFor: 'label access' stamp: 'di 10/3/97 14:20'!\rnoLabel\r\t\"A label of zero height indicates no label\"\r\tlabelFrame height > 0\r\t\tifTrue: [labelFrame region: (labelFrame bottomLeft + (0@1) extent: labelFrame width@0).\r\t\t\t\tlabelFrame borderWidth: 0.\r\t\t\t\tself uncacheBits]! !\r\r!StandardSystemView methodsFor: 'label access' stamp: 'di 6/10/1998 13:18'!\rrelabel: aString \r\t\"A new string for the label.  Window is assumed to be active.\r\tWindow will redisplay only if label bar has to grow.\"\r\t| oldRegion oldWidth |\r\t(model windowReqNewLabel: aString) ifFalse: [^ self].\r\toldRegion _ self labelTextRegion.\r\toldWidth _ self insetDisplayBox width.\r\tself label: aString.\r\tDisplay fill: ((oldRegion merge: self labelTextRegion) expandBy: 3@0)\r\t\t\tfillColor: self labelColor.\r\tself insetDisplayBox width = oldWidth\r\t\tifTrue: [self displayLabelText; emphasizeLabel]\r\t\tifFalse: [self uncacheBits; displayEmphasized].\r! !\r\r!StandardSystemView methodsFor: 'label access' stamp: 'sw 1/19/2001 20:13'!\rsetLabel: aLabel\r\t\"For compatibility with morphic\"\r\r\tself relabel: aLabel! !\r\r!StandardSystemView methodsFor: 'label access' stamp: 'di 10/3/97 13:35'!\rsetLabelRegion\r\t\"Always follows view width\"\r\r\tlabelFrame region: (0 @ 0 extent: self displayBox width @ self labelHeight).\r\tlabelFrame borderWidth: 2! !\r\r!StandardSystemView methodsFor: 'label access' stamp: 'sumim 2/8/2002 14:36'!\rsetLabelTo: aString \r\t\"Force aString to be the new label of the receiver, bypassing any logic about whether it is acceptable and about propagating information about the change.\"\r\r\t| oldRegion oldWidth |\r\tself label: aString.\r\tself controller isControlActive ifFalse: [^ self].\r\toldRegion _ self labelTextRegion.\r\toldWidth _ self insetDisplayBox width.\r\tDisplay fill: ((oldRegion merge: self labelTextRegion) expandBy: 3@0)\r\t\t\tfillColor: self labelColor.\r\tself insetDisplayBox width = oldWidth\r\t\tifTrue: [self displayLabelText; emphasizeLabel]\r\t\tifFalse: [self uncacheBits; displayEmphasized]! !\r\r\r!StandardSystemView methodsFor: 'size'!\rmaximumSize\r\t\"Answer a point representing the maximum width and height of the \r\treceiver.\"\r\r\t^maximumSize! !\r\r!StandardSystemView methodsFor: 'size'!\rmaximumSize: aPoint \r\t\"Set the argument, aPoint, to be the maximum width and height of the \r\treceiver.\"\r\r\tmaximumSize _ aPoint! !\r\r!StandardSystemView methodsFor: 'size'!\rminimumSize\r\t\"Answer a point representing the minimum width and height of the \r\treceiver.\"\r\r\t^minimumSize! !\r\r!StandardSystemView methodsFor: 'size'!\rminimumSize: aPoint \r\t\"Set the argument, aPoint, to be the minimum width and height of the \r\treceiver.\"\r\r\tminimumSize _ aPoint! !\r\r\r!StandardSystemView methodsFor: 'framing' stamp: 'sr 3/26/2000 03:47'!\rchooseCollapsePoint\r\t\"Answer the point at which to place the collapsed window.\"\r\t| pt labelForm beenDown offset |\r\tlabelForm _ Form fromDisplay: self labelDisplayBox.\r\tself uncacheBits.\r\tself erase.\r\tbeenDown _ Sensor anyButtonPressed.\r\tself isCollapsed ifTrue:\r\t\t[offset _ self labelDisplayBox topLeft - self growBoxFrame topLeft.\r\t\tlabelForm follow: [pt _ (Sensor cursorPoint + offset max: 0@0) truncateTo: 8]\r\t\t\t\twhile: [Sensor anyButtonPressed\r\t\t\t\t\t\t\tifTrue: [beenDown _ true]\r\t\t\t\t\t\t\tifFalse: [beenDown not]].\r\t\t^ pt].\r\t^ (RealEstateAgent assignCollapseFrameFor: self) origin.\r! !\r\r!StandardSystemView methodsFor: 'framing'!\rchooseFrame\r\t\"Answer a new frame, depending on whether the view is currently \r\tcollapsed or not.\"\r\t| labelForm f |\r\tself isCollapsed & expandedViewport notNil\r\t\tifTrue:\r\t\t\t[labelForm _ bitsValid\r\t\t\t\tifTrue: [windowBits]\r\t\t\t\tifFalse: [Form fromDisplay: self labelDisplayBox].\r\t\t\tbitsValid _ false.\r\t\t\tself erase.\r\t\t\tlabelForm slideFrom: self labelDisplayBox origin\r\t\t\t\t\tto: expandedViewport origin-self labelOffset\r\t\t\t\t\tnSteps: 10.\r\t\t\t^ expandedViewport]\r\t\tifFalse:\r\t\t\t[f _ self getFrame.\r\t\t\tbitsValid _ false.\r\t\t\tself erase.\r\t\t\t^ f topLeft + self labelOffset extent: f extent]! !\r\r!StandardSystemView methodsFor: 'framing'!\rchooseMoveRectangle\r\t\"Ask the user to designate a new window rectangle.\"\r\t| offset p |\r\toffset _ Sensor anyButtonPressed \"Offset if draggin, eg, label\"\r\t\tifTrue: [self windowBox topLeft - Sensor cursorPoint]\r\t\tifFalse: [0@0].\r\tself isCollapsed\r\t\tifTrue: [^ self labelDisplayBox newRectFrom:\r\t\t\t\t\t[:f | p _ Sensor cursorPoint + offset.\r\t\t\t\t\tp _ (p max: 0@0) truncateTo: 8.\r\t\t\t\t\tp extent: f extent]]\r\t\tifFalse: [^ self windowBox newRectFrom:\r\t\t\t\t\t[:f | p _ Sensor cursorPoint + offset.\r\t\t\t\t\tself constrainFrame: (p extent: f extent)]]! !\r\r!StandardSystemView methodsFor: 'framing' stamp: 'BG 10/29/2003 09:46'!\rcollapse\r\t\"If the receiver is not already collapsed, change its view to be that of its \r\tlabel only.\"\r\r\tself isCollapsed ifFalse:\r\t\t\t[model modelSleep.\r\t\t\t(subViews ~~ nil and: [subViews size = 1 ])\r\t\t\t\tifTrue: [subViews first deEmphasizeView].\r\t\t\texpandedViewport _ self viewport.\r\t\t\tsavedSubViews _ subViews.\r\t\t\tself resetSubViews.\r\t\t\tlabelText isNil ifTrue: [self label: nil.  bitsValid _ false.].\r\t\t\tself window: (self inverseDisplayTransform:\r\t\t\t\t\t((self labelDisplayBox topLeft extent: (labelText extent x + 70) @ self labelHeight)\r\t\t\t\t\t\t intersect: self labelDisplayBox))]! !\r\r!StandardSystemView methodsFor: 'framing'!\rcollapseToPoint: collapsePoint\r\tself collapse.\r\tself align: self displayBox topLeft with: collapsePoint.\r\tcollapsedViewport _ self viewport.\r\tself displayEmphasized! !\r\r!StandardSystemView methodsFor: 'framing'!\rcollapsedFrame\r\t\"Answer the rectangle occupied by this window when collapsed.\"\r\t^ collapsedViewport  \"NOTE may be nil\"! !\r\r!StandardSystemView methodsFor: 'framing' stamp: 'sw 10/20/1999 09:46'!\rexpand\r\t\"If the receiver is collapsed, change its view to be that of all of its subviews, not its label alone.\"\r\t| newFrame |\r\tself isCollapsed\r\t\tifTrue:\r\t\t\t[newFrame _ self chooseFrame expandBy: borderWidth.\r\t\t\tcollapsedViewport _ self viewport.\r\t\t\tsubViews _ savedSubViews.\r\t\t\tlabelFrame borderWidthLeft: 2 right: 2 top: 2 bottom: 2.\r\t\t\tsavedSubViews _ nil.\r\t\t\tself setWindow: nil.\r\t\t\tself resizeTo: newFrame.\r\t\t\tself displayDeEmphasized.\r\t\t\tmodel modelWakeUpIn: self]! !\r\r!StandardSystemView methodsFor: 'framing'!\rexpandedFrame\r\t\"Answer the rectangle occupied by this window when expanded.\"\r\t^ expandedViewport  \"NOTE may be nil\"! !\r\r!StandardSystemView methodsFor: 'framing' stamp: 'sw 8/15/97 17:18'!\rfullScreen\r\t\"Expand the receiver to fill the screen.  Let the model decide how big is full -- allows for flop-out scrollbar on left if desired\"\r\r\tself isCollapsed ifFalse:\r\t\t[self reframeTo: model fullScreenSize]! !\r\r!StandardSystemView methodsFor: 'framing'!\rgetFrame\r\t\"Ask the user to designate a rectangular area in which\r\tthe receiver should be displayed.\"\r\t| minFrame |\r\tminFrame _ Cursor origin showWhile: \r\t\t[(Sensor cursorPoint extent: self minimumSize) newRectFrom:\r\t\t\t[:f | Sensor cursorPoint extent: self minimumSize]].\r\tself maximumSize <= self minimumSize ifTrue: [^ minFrame].\r\t^ Cursor corner showWhile:\r\t\t[minFrame newRectFrom:\r\t\t\t[:f | self constrainFrame: (f origin corner: Sensor cursorPoint)]]! !\r\r!StandardSystemView methodsFor: 'framing' stamp: 'sw 1/22/96'!\rinitialExtent\r\t\"Answer the desired extent for the receiver when it is first opened on the screen.  \"\r\r\t^ model initialExtent min: maximumSize max: minimumSize! !\r\r!StandardSystemView methodsFor: 'framing' stamp: 'RAA 6/14/2000 17:27'!\rinitialFrame\r        \"Find a plausible initial screen area for the receiver, taking into account user preference, the size needed, and other windows currently on the screen.  5/22/96 sw: let RealEstateAgent do it for us\"\r\r        ^ RealEstateAgent initialFrameFor: self world: nil! !\r\r!StandardSystemView methodsFor: 'framing'!\rmoved\r\t\"The user has moved the receiver; after a new view rectangle is chosen, this method is called to allow certain views to take note of the change.  6/10/96 sw\" ! !\r\r!StandardSystemView methodsFor: 'framing'!\rnewFrame: frameChangeBlock\r\tself reframeTo: (self windowBox newRectFrom:\r\t\t[:f | self constrainFrame: (frameChangeBlock value: f)])! !\r\r!StandardSystemView methodsFor: 'framing' stamp: 'di 10/22/1998 16:15'!\rreframePanesAdjoining: subView along: side to: aDisplayBox \r\t| newBox delta newRect minDim theMin |\r\tnewRect _ aDisplayBox.\r\ttheMin _ 16.\r\t\"First check that this won't make any pane smaller than theMin screen dots\"\r\tminDim _ ((subViews select: [:sub | sub displayBox bordersOn: subView displayBox along: side])\r\t\tcollect: [:sub | sub displayBox adjustTo: newRect along: side])\r\t\t\tinject: 999 into: [:was :rect | (was min: rect width) min: rect height].\r\t\"If so, amend newRect as required\"\r\tminDim < theMin ifTrue:\r\t\t[delta _ minDim - theMin.\r\t\tnewRect _ newRect withSide: side setTo: \r\t\t\t\t((newRect perform: side) > (subView displayBox perform: side)\r\t\t\t\t\tifTrue: [(newRect perform: side) + delta]\r\t\t\t\t\tifFalse: [(newRect perform: side) - delta])].\r\t\"Now adjust all adjoining panes for real\"\r\tsubViews do:\r\t\t[:sub | (sub displayBox bordersOn: subView displayBox along: side) ifTrue:\r\t\t\t[newBox _ sub displayBox adjustTo: newRect along: side.\r\t\t\tsub window: sub window viewport:\r\t\t\t\t(sub transform: (sub inverseDisplayTransform: newBox)) rounded]].\r\t\"And adjust the growing pane itself\"\r\tsubView window: subView window viewport:\r\t\t\t(subView transform: (subView inverseDisplayTransform: newRect)) rounded.\r\r\t\"Finally force a recomposition of the whole window\"\r\tviewport _ nil.\r\tself resizeTo: self viewport.\r\tself uncacheBits; displayEmphasized! !\r\r!StandardSystemView methodsFor: 'framing' stamp: 'BG 12/4/2003 13:14'!\rreframeTo: newFrame\r\t\"Reframe the receiver to the given screen rectangle.  \r\tRepaint difference after the change.  \"\r\t| oldBox newBox portRect |\r\tself uncacheBits.\r\toldBox _ self windowBox.\r\tportRect _ newFrame topLeft + self labelOffset\r\t\t\t\tcorner: newFrame corner.\r\tself setWindow: nil.\r\tself resizeTo: portRect.\r\tself setLabelRegion.\r\tnewBox _ self windowBox.\r\t(oldBox areasOutside: newBox) do:\r\t\t[:rect | ScheduledControllers restore: rect].\r\tself displayEmphasized! !\r\r!StandardSystemView methodsFor: 'framing'!\rresize\r\t\"Determine the rectangular area for the receiver, adjusted to the \r\tminimum and maximum sizes.\"\r\t| f |\r\tf _ self getFrame.\r\tself resizeTo: (f topLeft + self labelOffset extent: f extent)\r! !\r\r!StandardSystemView methodsFor: 'framing'!\rresizeInitially\r\t\"Determine the rectangular area for the receiver, adjusted to the \r\tminimum and maximum sizes.\"\r\tself resizeTo: self initialFrame\r! !\r\r!StandardSystemView methodsFor: 'framing' stamp: 'di 4/6/98 15:12'!\rresizeMinimumCenteredAt: aPoint \r\t\"Determine the rectangular area for the receiver, adjusted so that it is \r\tcentered a position, aPoint.\"\r\t| aRectangle |\r\taRectangle _ 0 @ 0 extent: self minimumSize.\r\taRectangle _ aRectangle align: aRectangle center with: aPoint.\r\tself resizeTo: aRectangle! !\r\r!StandardSystemView methodsFor: 'framing' stamp: 'di 4/6/98 15:29'!\rresizeTo: aRectangle\r\t\"Resize this view to aRectangle\"\r\r\t\"First get scaling right inside borders\"\r\tself window: (self window insetBy: borderWidth)\r\t\tviewport: (aRectangle insetBy: borderWidth).\r\r\t\"Then ensure window maps to aRectangle\"\r\twindow _ transformation applyInverseTo: aRectangle! !\r\r!StandardSystemView methodsFor: 'framing'!\rstandardWindowOffset\r\t^ Preferences standardWindowOffset! !\r\r!StandardSystemView methodsFor: 'framing'!\rwindowBox\r\t^ self displayBox merge: self labelDisplayBox! !\r\r!StandardSystemView methodsFor: 'framing' stamp: 'di 10/3/97 14:19'!\rwindowOrigin\r\t^ (self isCollapsed or: [labelFrame height = 0  \"no label\"])\r\t\tifTrue: [self displayBox topLeft]\r\t\tifFalse: [self displayBox topLeft - self labelOffset]! !\r\r\r!StandardSystemView methodsFor: 'controller access'!\rdefaultControllerClass \r\t\"Refer to the comment in View|defaultControllerClass.\"\r\r\t^StandardSystemController! !\r\r\r!StandardSystemView methodsFor: 'displaying'!\rcacheBits\r\t| oldLabelState |\r\tCacheBits ifFalse: [^ self uncacheBits].\r\t(oldLabelState _ isLabelComplemented) ifTrue: [ self deEmphasize ].\r\tself cacheBitsAsIs.\r\t(isLabelComplemented _ oldLabelState) ifTrue: [ self emphasize ].\r! !\r\r!StandardSystemView methodsFor: 'displaying'!\rcacheBitsAsIs\r\tCacheBits ifFalse: [^ self uncacheBits].\r\twindowBits _ (self cacheBitsAsTwoTone and: [Display depth > 1])\r\t\tifTrue: [ColorForm\r\t\t\t\t\ttwoToneFromDisplay: self windowBox\r\t\t\t\t\tusing: windowBits\r\t\t\t\t\tbackgroundColor: self backgroundColor]\r\t\tifFalse: [Form fromDisplay: self windowBox using: windowBits].\r\tbitsValid _ true.\r! !\r\r!StandardSystemView methodsFor: 'displaying'!\rcacheBitsAsTwoTone\r\t^ true! !\r\r!StandardSystemView methodsFor: 'displaying'!\rdeEmphasizeForDebugger\r\t\"Carefully de-emphasis this window because a debugger is being opened. Care must be taken to avoid invoking potentially buggy window display code that could cause a recursive chain of errors eventually resulting in a virtual machine crash. In particular, do not de-emphasize the subviews.\"\r\r\tself deEmphasizeView.  \"de-emphasize this top-level view\"\r\tself uncacheBits.\r\tSmalltalk garbageCollectMost > 1000000 ifTrue: [\r\t\t\"if there is enough space, cache current window screen bits\"\r\t\tself cacheBitsAsIs].\r! !\r\r!StandardSystemView methodsFor: 'displaying' stamp: 'di 10/3/97 13:18'!\rdeEmphasizeLabel\r\t\"Un-Highlight the label.\"\r\tlabelFrame height = 0 ifTrue: [^ self].  \"no label\"\r\tself displayLabelBackground: false.\r\tself displayLabelText.! !\r\r!StandardSystemView methodsFor: 'displaying'!\rdisplay\r\tisLabelComplemented\r\t\tifTrue: [self displayEmphasized]\r\t\tifFalse: [self displayDeEmphasized]! !\r\r!StandardSystemView methodsFor: 'displaying' stamp: 'hmm 7/21/1999 07:37'!\rdisplayDeEmphasized \r\t\"Display this view with emphasis off.\r\tIf windowBits is not nil, then simply BLT if possible,\r\t\tbut force full display for top window so color is preserved.\"\r\t(bitsValid and: [controller ~~ ScheduledControllers activeController])\r\t\tifTrue: [self lock.\r\t\t\t\twindowBits displayAt: self windowOrigin]\r\t\tifFalse: [Display deferUpdates: true.\r\t\t\t\tsuper display.\r\t\t\t\tDisplay deferUpdates: false; forceToScreen: self windowBox.\r\t\t\t\tCacheBits ifTrue: [self cacheBitsAsIs]]\r! !\r\r!StandardSystemView methodsFor: 'displaying'!\rdisplayEmphasized\r\t\"Display with label highlighted to indicate that it is active.\"\r\r\tself displayDeEmphasized; emphasize.\r\tisLabelComplemented _ true! !\r\r!StandardSystemView methodsFor: 'displaying' stamp: 'di 5/15/1998 21:55'!\rdisplayLabelBackground: emphasized\r\t\"Clear or emphasize the inner region of the label\"\r\t| r1 r2 r3 c3 c2 c1 |\r\temphasized ifFalse:\r\t\t[\"Just clear the label if not emphasized\"\r\t\t^ Display fill: (self labelDisplayBox insetBy: 2) fillColor: self labelColor].\r\tr1 _ self labelDisplayBox insetBy: 2.\r\tr2 _ r1 insetBy: 0@2.\r\tr3 _ r2 insetBy: 0@3.\r\tc3 _ self labelColor.\r\tc2 _ c3 dansDarker.\r\tc1 _ c2 dansDarker.\r\tDisplay fill: r1 fillColor: c1.\r\tDisplay fill: r2 fillColor: c2.\r\tDisplay fill: r3 fillColor: c3.\r \r\"\tHere is the Mac racing stripe code\r\tstripes _ Bitmap with: (self labelColor pixelWordForDepth: Display depth)\r\t\t\t\t\twith: (Form black pixelWordForDepth: Display depth).\r\tself windowOrigin y even ifTrue: [stripes swap: 1 with: 2].\r\tDisplay fill: (self labelDisplayBox insetBy: 3) fillColor: stripes.\r\"! !\r\r!StandardSystemView methodsFor: 'displaying'!\rdisplayLabelBoxes\r\t\"closeBox, growBox.\"\r\t| aRect smallRect backColor |\r\taRect _ self closeBoxFrame.\r\tbackColor _ self labelColor.\r\tDisplay fill: (aRect insetBy: -2) fillColor: backColor.\r\tDisplay fillBlack: aRect.\r\tDisplay fill: (aRect insetBy: 1) fillColor: backColor.\r\r\taRect _ self growBoxFrame.\r\tsmallRect _ aRect origin extent: 7@7.\r\tDisplay fill: (aRect insetBy: -2) fillColor: backColor.\r\taRect _ aRect insetOriginBy: 2@2 cornerBy: 0@0.\r\tDisplay fillBlack: aRect.\r\tDisplay fill: (aRect insetBy: 1) fillColor: backColor.\r\tDisplay fillBlack: smallRect.\r\tDisplay fill: (smallRect insetBy: 1) fillColor: backColor! !\r\r!StandardSystemView methodsFor: 'displaying' stamp: 'di 9/10/1998 09:43'!\rdisplayLabelText\r\t\"The label goes in the center of the window\"\r\t| labelRect |\r\tlabelText foregroundColor: self foregroundColor\r\t\t\tbackgroundColor: self labelColor.\r\tlabelRect _ self labelTextRegion.\r\tDisplay fill: (labelRect expandBy: 3@0) fillColor: self labelColor.\r\tlabelText displayOn: Display at: labelRect topLeft clippingBox: labelRect\r\t\t\trule: labelText rule fillColor: labelText fillColor.\r\tlabelText destinationForm: nil! !\r\r!StandardSystemView methodsFor: 'displaying' stamp: 'di 8/29/97 18:57'!\rdisplayOn: aPort\r\tbitsValid ifFalse:\r\t\t[^ Display clippingTo: aPort clipRect do: [super display]].\r\twindowBits displayOnPort: aPort at: self windowOrigin! !\r\r!StandardSystemView methodsFor: 'displaying' stamp: 'ar 5/14/2001 23:40'!\rdisplayRacingStripes\r\t\"Display Racing Stripes in the label\"\r\t| labelDisplayBox stripes top bottom left box right |\r\tlabelDisplayBox _ self labelDisplayBox.\r\ttop _ labelDisplayBox top + 3.\r\tbottom _ labelDisplayBox bottom - 3.\r\tstripes _ Bitmap with: (Display pixelWordFor: self labelColor)\r\t\t\twith: (Display pixelWordFor: Color black).\r\ttop even ifFalse: [stripes swap: 1 with: 2].\r\r\tleft _ labelDisplayBox left + 3.\r\r\tbox _ self closeBoxFrame.\r\tright _ box left - 2.\r\tDisplay fill: (Rectangle left: left right: right top: top bottom: bottom)\r\t\t\tfillColor: stripes.\r\tleft _ box right + 2.\r\r\tbox _ self labelTextRegion.\r\tright _ box left - 3.\r\tDisplay fill: (Rectangle left: left right: right top: top bottom: bottom)\r\t\t\tfillColor: stripes.\r\tleft _ box right + 2.\r\r\tbox _ self growBoxFrame.\r\tright _ box left - 2.\r\tDisplay fill: (Rectangle left: left right: right top: top bottom: bottom)\r\t\t\tfillColor: stripes.\r\tleft _ box right + 2.\r\r\tright _ labelDisplayBox right - 3.\r\tDisplay fill: (Rectangle left: left right: right top: top bottom: bottom)\r\t\t\tfillColor: stripes.\r! !\r\r!StandardSystemView methodsFor: 'displaying' stamp: 'di 10/3/97 13:14'!\rdisplayView\r\t\"Refer to the comment in View|displayView. \"\r\tlabelFrame height = 0 ifTrue: [^ self].  \"no label\"\r\tself displayBox width = labelFrame width ifFalse:\r\t\t[\"recompute label width when window changes size\"\r\t\tself setLabelRegion].\r\t(labelFrame align: labelFrame topLeft with: self windowOrigin)\r\t\tinsideColor: self labelColor;\r\t\tdisplayOn: Display.\r\tself displayLabelText! !\r\r!StandardSystemView methodsFor: 'displaying' stamp: 'di 10/3/97 13:18'!\remphasizeLabel\r\t\"Highlight the label.\"\r\tlabelFrame height = 0 ifTrue: [^ self].  \"no label\"\r\tself displayLabelBackground: true.\r\tself displayLabelBoxes.\r\tself displayLabelText.! !\r\r!StandardSystemView methodsFor: 'displaying' stamp: 'di 8/30/97 11:07'!\rerase\r\t\"Clear the display box of the receiver to be gray, as the screen background.\"\r\t| oldValid |\r\tCacheBits\r\t\tifTrue:\r\t\t\t[oldValid _ bitsValid.\r\t\t\tbitsValid _ false.\r\t\t\tScheduledControllers restore: self windowBox without: self.\r\t\t\tbitsValid _ oldValid]\r\t\tifFalse:\r\t\t\t[ScheduledControllers restore: self windowBox without: self]! !\r\r!StandardSystemView methodsFor: 'displaying' stamp: 'RAA 6/14/2000 17:27'!\rmakeMeVisible\r\r        | newLoc portRect |\r        ((Display boundingBox insetBy: (0@0 corner: self labelHeight asPoint))\r                containsPoint: self displayBox topLeft) ifTrue: [^ self \"OK -- my top left is visible\"].\r\r        \"window not on screen (probably due to reframe) -- move it now\"\r        newLoc _ self isCollapsed\r                ifTrue: [RealEstateAgent assignCollapsePointFor: self]\r                ifFalse: [(RealEstateAgent initialFrameFor: self world: nil) topLeft].\r        portRect _ newLoc + self labelOffset\r                                extent: self windowBox extent - self labelOffset.\r        self resizeTo: portRect.\r        self setLabelRegion.\r! !\r\r!StandardSystemView methodsFor: 'displaying'!\runcacheBits\r\twindowBits _ nil.\r\tbitsValid _ false.! !\r\r!StandardSystemView methodsFor: 'displaying'!\rwindowBits\r\t^ windowBits! !\r\r\r!StandardSystemView methodsFor: 'deEmphasizing'!\rdeEmphasizeView \r\t\"Refer to the comment in View|deEmphasizeView.\"\r\r\tisLabelComplemented ifTrue:\r\t\t[self deEmphasizeLabel.\r\t\tisLabelComplemented _ false]! !\r\r!StandardSystemView methodsFor: 'deEmphasizing'!\remphasizeView \r\t\"Refer to the comment in View|emphasizeView.\"\r\r\tself emphasizeLabel! !\r\r\r!StandardSystemView methodsFor: 'clipping box access'!\rclippingBox\r\t\"Answer the rectangular area in which the receiver can show its label.\"\r\r\t^self isTopView\r\t\tifTrue: [self labelDisplayBox]\r\t\tifFalse: [super insetDisplayBox]! !\r\r!StandardSystemView methodsFor: 'clipping box access' stamp: 'BG 12/5/2003 11:13'!\rconstrainFrame: aRectangle\r\t\"Constrain aRectangle, to the minimum and maximum size\r\tfor this window\"\r\r   | adjustmentForLabel |\r   adjustmentForLabel := 0 @ (labelFrame height  - labelFrame borderWidth).\r\t^ aRectangle origin extent:\r\t\t((aRectangle extent max: minimumSize + adjustmentForLabel)\r\t\t      min: maximumSize + adjustmentForLabel).! !\r\r\r!StandardSystemView methodsFor: 'private'!\rsetTransformation: aTransformation \r\t\"Override to support label size changes \"\r\tsuper setTransformation: aTransformation.\r\tself label: self label! !\r\r!StandardSystemView methodsFor: 'private' stamp: 'di 10/21/1998 16:12'!\rsubviewWithLongestSide: sideBlock near: aPoint \r\t| theSub theSide theLen box |\r\ttheLen _ 0.\r\tsubViews do:\r\t\t[:sub | box _ sub insetDisplayBox.\r\t\tbox forPoint: aPoint closestSideDistLen:\r\t\t\t[:side :dist :len |\r\t\t\t(dist <= 5 and: [len > theLen]) ifTrue:\r\t\t\t\t[theSub _ sub.\r\t\t\t\ttheSide _ side.\r\t\t\t\ttheLen _ len]]].\r\tsideBlock value: theSide.\r\t^ theSub! !\r\r\r!StandardSystemView methodsFor: 'updating' stamp: 'sw 10/29/1999 12:57'!\rsetUpdatablePanesFrom: getSelectors\r\t| aList aPane |\r\t\"Set my updatablePanes inst var to the list of panes which are list panes with the given get-list selectors.  Order is important here!!  Note that the method is robust in the face of panes not found, but a warning is printed in the transcript in each such case\"\r\r\taList _ OrderedCollection new.\r\tgetSelectors do:\r\t\t[:sel | aPane _ self subViewSatisfying:\r\t\t\t\t[:pane | (pane isKindOf: PluggableListView) and: [pane getListSelector == sel]].\r\t\t\taPane\r\t\t\t\tifNotNil:\r\t\t\t\t\t[aList add: aPane]\r\t\t\t\tifNil:\r\t\t\t\t\t[Transcript cr; show: 'Warning: view ', sel, ' not found.']].\r\tupdatablePanes _ aList asArray! !\r\r!StandardSystemView methodsFor: 'updating' stamp: 'sw 10/29/1999 21:20'!\rupdatablePanes\r\t\"Answer the list of panes, in order, which might be sent the #verifyContents message upon window activation or expansion.\"\r\t^ updatablePanes ifNil: [updatablePanes _ #()]! !\r\r!StandardSystemView methodsFor: 'updating' stamp: 'sw 1/11/2000 15:30'!\rupdate: aSymbol\r\taSymbol = #relabel\r\t\tifTrue: [^ self setLabelTo: model labelString].\r\t^ super update: aSymbol! !\r\r\r!StandardSystemView methodsFor: 'object fileIn' stamp: 'RAA 12/20/2000 17:49'!\rconvertToCurrentVersion: varDict refStream: smartRefStrm\r\t\r\tupdatablePanes ifNil: [updatablePanes _ #()].\r\t^super convertToCurrentVersion: varDict refStream: smartRefStrm.\r\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rStandardSystemView class\r\tinstanceVariableNames: ''!\r\r!StandardSystemView class methodsFor: 'class initialization'!\rcachingBits\r\t^ CacheBits! !\r\r!StandardSystemView class methodsFor: 'class initialization'!\rdoCacheBits\r\t\"StandardSystemView doCacheBits - Enable fast window repaint feature\"\r\tCacheBits _ true.\r\tScheduledControllers unCacheWindows.\r\tScheduledControllers restore! !\r\r!StandardSystemView class methodsFor: 'class initialization'!\rdontCacheBits\r\t\"StandardSystemView dontCacheBits - Disable fast window repaint feature.\r\tReturn true iff bits were cached, ie if space was been recovered\"\r\tCacheBits ifFalse: [^ false].\r\tCacheBits _ false.\r\tScheduledControllers unCacheWindows.\r\t^ true! !\r\r!StandardSystemView class methodsFor: 'class initialization' stamp: 'sw 12/6/1999 23:42'!\rinitialize\t\t\"StandardSystemView initialize\"\r\tself doCacheBits.\r\tself setLabelStyle! !\r\r!StandardSystemView class methodsFor: 'class initialization' stamp: 'nk 7/11/2004 21:11'!\rsetLabelStyle\r\t| aFont |\r\t\"StandardSystemView setLabelStyle\"\r\taFont _ Preferences windowTitleFont.\r\tLabelStyle _ TextStyle fontArray: { aFont }.\r\tLabelStyle gridForFont: 1 withLead: 0! !\r\r\r!StandardSystemView class methodsFor: 'instance creation' stamp: 'ssa 8/15/2008 17:42'!\rmodel: aModel label: aString minimumSize: aPoint\r\r\t^self new\r\t\tmodel: aModel;\r\t\tlabel: aString;\r\t\tminimumSize: aPoint;\r\t\tyourself! !\rChangeSetCategory subclass: #StaticChangeSetCategory\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Changes'!\r!StaticChangeSetCategory commentStamp: '<historical>' prior: 0!\rStaticChangeSetCategory is a user-defined change-set category that has in it only those change sets specifically placed there.!\r\r\r!StaticChangeSetCategory methodsFor: 'queries' stamp: 'sw 4/11/2001 16:10'!\racceptsManualAdditions\r\t\"Answer whether the user is allowed manually to manipulate the contents of the change-set-category.\"\r\r\t^ true! !\r\r!StaticChangeSetCategory methodsFor: 'queries' stamp: 'sw 4/11/2001 16:00'!\rincludesChangeSet: aChangeSet\r\t\"Answer whether the receiver includes aChangeSet in its retrieval list\"\r\r\t^ elementDictionary includesKey: aChangeSet name! !\r\r\r!StaticChangeSetCategory methodsFor: 'add' stamp: 'sw 4/11/2001 15:58'!\raddChangeSet: aChangeSet\r\t\"Add the change set manually\"\r\r\tself elementAt: aChangeSet name put: aChangeSet! !\r\r\r!StaticChangeSetCategory methodsFor: 'updating' stamp: 'sw 4/11/2001 16:36'!\rreconstituteList\r\t\"Reformulate the list.  Here, since we have a manually-maintained list, at this juncture we only make sure change-set-names are still up to date, and we purge moribund elements\"\r\r\t|  survivors |\r\tsurvivors _ elementDictionary select: [:aChangeSet | aChangeSet isMoribund not].\r\tself clear.\r\t(survivors asSortedCollection: [:a :b | a name <= b name]) reverseDo:\r\t\t[:aChangeSet | self addChangeSet: aChangeSet]! !\rForm subclass: #StaticForm\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Graphics-Display Objects'!\r!StaticForm commentStamp: '<historical>' prior: 0!\rAn optimization for Nebraska - a StaticForm does not change once created so it may be cached on the remote end.!\r\r\r!StaticForm methodsFor: 'as yet unclassified' stamp: 'RAA 8/14/2000 09:59'!\risStatic\r\r\t^true! !\rObject subclass: #Stopwatch\r\tinstanceVariableNames: 'timespans state'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Chronology'!\r!Stopwatch commentStamp: '<historical>' prior: 0!\rA Stopwatch maintains a collection of timespans.!\r\r\r!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/24/2003 23:12'!\ractivate\r\r\tself isSuspended ifTrue:\r\t\t[self timespans add: \r\t\t\t(Timespan starting: DateAndTime now duration: Duration zero).\r\t\tself state: #active]\r! !\r\r!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/24/2003 23:45'!\rduration\r\r\t| ts last |\r\tself isSuspended \r\t\tifTrue:\r\t\t\t[ (ts _ self timespans) isEmpty ifTrue: \r\t\t\t\t[ ts _ { Timespan starting: DateAndTime now duration: Duration zero } ] ]\r\t\tifFalse:\r\t\t\t[ last _ self timespans last.\r\t\t\tts _ self timespans allButLast\r\t\t\t\tadd: (last duration: (DateAndTime now - last start); yourself);\r\t\t\t\tyourself ].\r\t\t\r\t^ (ts collect: [ :t | t duration ]) sum\r! !\r\r!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/25/2003 11:21'!\rend\r\r\t^ self timespans last next\r\r! !\r\r!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/24/2003 22:48'!\risActive\r\r\t^ self state = #active\r! !\r\r!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/24/2003 22:48'!\risSuspended\r\r\t^ self state = #suspended\r\r! !\r\r!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/25/2003 13:25'!\rprintOn: aStream\r\r\tsuper printOn: aStream.\r\taStream\r\t\tnextPut: $(;\r\t\tnextPutAll: self state;\r\t\tnextPut: $:;\r\t\tprint: self duration;\r\t\tnextPut: $).\r\r! !\r\r!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/25/2003 11:54'!\rreset\r\r\tself suspend.\r\ttimespans _ nil.\r\r! !\r\r!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/24/2003 23:18'!\rstart\r\r\t^ self timespans first start\r\r! !\r\r!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/24/2003 22:47'!\rstate\r\r\t^ state ifNil: [ state _ #suspended ]\r! !\r\r!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/24/2003 22:46'!\rstate: aSymbol\r\r\tstate _ aSymbol\r! !\r\r!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/24/2003 23:13'!\rsuspend\r\r\t| ts |\r\tself isActive ifTrue:\r\t\t[ ts _ self timespans last.\r\t\tts duration: (DateAndTime now - ts start).\r\t\tself state: #suspended]\r! !\r\r!Stopwatch methodsFor: 'squeak protocol' stamp: 'brp 9/24/2003 22:44'!\rtimespans\r\r\t^ timespans ifNil: [ timespans _ OrderedCollection new ]\r! !\rObject subclass: #Stream\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Streams'!\r!Stream commentStamp: '<historical>' prior: 0!\rI am an abstract class that represents an accessor for a sequence of objects. This sequence is referred to as my \"contents\".!\r\r\r!Stream methodsFor: 'accessing' stamp: 'nk 2/24/2001 17:31'!\rbinary! !\r\r!Stream methodsFor: 'accessing'!\rcontents\r\t\"Answer all of the contents of the receiver.\"\r\r\tself subclassResponsibility! !\r\r!Stream methodsFor: 'accessing' stamp: 'sma 4/22/2000 17:07'!\rflush\r\t\"Do nothing by default\"! !\r\r!Stream methodsFor: 'accessing' stamp: 'nk 4/29/2004 10:38'!\rlocalName\r\t^'a stream'! !\r\r!Stream methodsFor: 'accessing'!\rnext\r\t\"Answer the next object accessible by the receiver.\"\r\r\tself subclassResponsibility! !\r\r!Stream methodsFor: 'accessing'!\rnext: anInteger \r\t\"Answer the next anInteger number of objects accessible by the receiver.\"\r\r\t| aCollection |\r\taCollection _ OrderedCollection new.\r\tanInteger timesRepeat: [aCollection addLast: self next].\r\t^aCollection! !\r\r!Stream methodsFor: 'accessing'!\rnext: anInteger put: anObject \r\t\"Make anObject be the next anInteger number of objects accessible by the \r\treceiver. Answer anObject.\"\r\r\tanInteger timesRepeat: [self nextPut: anObject].\r\t^anObject! !\r\r!Stream methodsFor: 'accessing'!\rnextMatchAll: aColl\r    \"Answer true if next N objects are the ones in aColl,\r     else false.  Advance stream of true, leave as was if false.\"\r    | save |\r    save _ self position.\r    aColl do: [:each |\r       (self next) = each ifFalse: [\r            self position: save.\r            ^ false]\r        ].\r    ^ true! !\r\r!Stream methodsFor: 'accessing'!\rnextMatchFor: anObject \r\t\"Gobble the next object and answer whether it is equal to the argument, \r\tanObject.\"\r\r\t^anObject = self next! !\r\r!Stream methodsFor: 'accessing'!\rnextPut: anObject \r\t\"Insert the argument, anObject, as the next object accessible by the \r\treceiver. Answer anObject.\"\r\r\tself subclassResponsibility! !\r\r!Stream methodsFor: 'accessing'!\rnextPutAll: aCollection \r\t\"Append the elements of aCollection to the sequence of objects accessible \r\tby the receiver. Answer aCollection.\"\r\r\taCollection do: [:v | self nextPut: v].\r\t^aCollection! !\r\r!Stream methodsFor: 'accessing' stamp: 'nk 4/29/2004 10:40'!\ropenReadOnly\r\t^self! !\r\r!Stream methodsFor: 'accessing' stamp: 'ajh 7/31/2001 20:34'!\rprintOn: stream\r\r\tsuper printOn: stream.\r\tstream space.\r\tself contents printOn: stream.\r! !\r\r!Stream methodsFor: 'accessing' stamp: 'nk 4/29/2004 10:41'!\rreadOnly\r\t^self! !\r\r!Stream methodsFor: 'accessing' stamp: 'ls 9/12/1998 20:55'!\rupToEnd\r\t\"answer the remaining elements in the string\"\r\t| elements |\r\telements _ OrderedCollection new.\r\t[ self atEnd ] whileFalse: [ \r\t\telements add: self next ].\r\t^elements! !\r\r\r!Stream methodsFor: 'testing'!\ratEnd\r\t\"Answer whether the receiver can access any more objects.\"\r\r\tself subclassResponsibility! !\r\r!Stream methodsFor: 'testing'!\rclosed\r\t^true! !\r\r!Stream methodsFor: 'testing' stamp: 'ar 12/23/1999 15:43'!\risStream\r\t\"Return true if the receiver responds to the stream protocol\"\r\t^true! !\r\r!Stream methodsFor: 'testing' stamp: 'ar 5/17/2001 19:07'!\rnextWordsPutAll: aCollection\r\t\"Write the argument a word-like object in big endian format on the receiver.\r\tMay be used to write other than plain word-like objects (such as ColorArray).\"\r\taCollection class isPointers | aCollection class isWords not \r\t\tifTrue: [^self error: aCollection class name,' is not word-like'].\r\t1 to: aCollection basicSize do:[:i|\r\t\tself nextNumber: 4 put: (aCollection basicAt: i).\r\t].\r\t^aCollection! !\r\r\r!Stream methodsFor: 'enumerating'!\rdo: aBlock \r\t\"Evaluate aBlock for each of the objects accessible by receiver.\"\r\r\t[self atEnd]\r\t\twhileFalse: [aBlock value: self next]! !\r\r\r!Stream methodsFor: 'printing' stamp: 'sma 6/1/2000 09:56'!\rprint: anObject\r\t\"Have anObject print itself on the receiver.\"\r\r\tanObject printOn: self! !\r\r!Stream methodsFor: 'printing' stamp: 'djp 7/21/1998 17:13'!\rprintHtml: anObject\r\tanObject printHtmlOn: self! !\r\r\r!Stream methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 00:48'!\rwrite:encodedObject\r\t^encodedObject putOn:self.\r! !\r\r\r!Stream methodsFor: 'alternate syntax' stamp: 'RAA 6/20/2000 12:52'!\rdialect\r\r\t^#ST80\t\t\"in case a regular stream is used to print parse nodes\"! !\r\r!Stream methodsFor: 'alternate syntax' stamp: 'RAA 6/20/2000 12:54'!\rwithStyleFor: elementType do: aBlock\r\r\t^aBlock value\t\t\"in case a regular stream is used to print parse nodes\"\r\">>\r(Compiler new compile: 'blah ^self' in: String notifying: nil ifFail: []) printString\r<<\"! !\r\r\r!Stream methodsFor: 'as yet unclassified' stamp: 'RAA 9/11/2000 19:12'!\rsleep\r\r\t\"an FTP-based stream might close the connection here\"! !\r\r\r!Stream methodsFor: 'file open/close' stamp: 'mir 8/10/1999 12:04'!\rclose! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rStream class\r\tinstanceVariableNames: ''!\r\r!Stream class methodsFor: 'instance creation'!\rnew\r\r\tself error: 'Streams are created with on: and with:'! !\rAbstractFont subclass: #StrikeFont\r\tinstanceVariableNames: 'characterToGlyphMap xTable glyphs name type minAscii maxAscii maxWidth strikeLength ascent descent xOffset raster subscript superscript emphasis derivativeFonts pointSize'\r\tclassVariableNames: 'DefaultStringScanner'\r\tpoolDictionaries: 'TextConstants'\r\tcategory: 'Graphics-Text'!\r!StrikeFont commentStamp: 'dew 1/1/2004 20:58' prior: 0!\rI represent a compact encoding of a set of Forms corresponding to characters in the ASCII character set. All the forms are placed side by side in a large form whose height is the font height, and whose width is the sum of all the character widths. The xTable variable gives the left-x coordinates of the subforms corresponding to the glyphs. Characters are mapped to glyphs by using the characterToGyphMap.\r\rSubclasses can have non-trivial mapping rules as well as different representations for glyphs sizes (e.g., not using an xTable). If so, these classes should return nil when queried for xTable and/or the characterToGlyphMap. This will cause the CharacterScanner primitive to fail and query the font for the width of a character (so that a more programatical approach can be implemented).\r\rFor display, fonts need to implement two messages:\r\t#installOn: aDisplayContext foregroundColor: foregroundColor backgroundColor: backgroundColor\rThis method installs the receiver (a font) on the given DisplayContext (which may be an instance of BitBlt or Canvas (or any of it's subclasses). The font should take the appropriate action to initialize the display context so that further display operations can be optimized.\r\t#displayString: aString on: aDisplayContext from: startIndex to: stopIndex at: aPoint kern: kernDelta\rThis method is called for each subsequent run of characters in aString which is to be displayed with the (previously installed) settings.\r\r--------------------------------\rThe \"AccuFont\" StrikeFonts by Doug Easterbrook were added to the Squeak image for the 3.7 release.  The following acknowledgement must remain in the image (in this class comment) as long as the Accufonts are in the image:\r\r>Doug Easterbrook\r>Arts Management Systems Ltd.\r>mailto:doug@artsman.com\r>http://www.artsman.com\r>Phone (403) 215-5701    Fax (403) 215-5704\r!\r\r\r!StrikeFont methodsFor: 'accessing'!\rascent\r\t\"Answer the receiver's maximum extent of characters above the baseline.\"\r\r\t^ascent! !\r\r!StrikeFont methodsFor: 'accessing' stamp: 'di 9/1/2000 17:17'!\rbaseKern\r\t\"Return the base kern value to be used for all characters.\"\r\t(emphasis noMask: 2) ifTrue: [^ 0].\r\t^ ((self height-1-self ascent+4)//4 max: 0)  \"See makeItalicGlyphs\"\r\t\t+ (((self ascent-5+4)//4 max: 0))\r! !\r\r!StrikeFont methodsFor: 'accessing' stamp: 'ar 5/23/2000 12:52'!\rcharacterToGlyphMap\r\t^characterToGlyphMap ifNil:[characterToGlyphMap _ self createCharacterToGlyphMap].! !\r\r!StrikeFont methodsFor: 'accessing'!\rdescent\r\t\"Answer the receiver's maximum extent of characters below the baseline.\"\r\r\t^descent! !\r\r!StrikeFont methodsFor: 'accessing' stamp: 'di 9/2/2000 13:06'!\rdescentKern\r\t\"Return the kern delta for descenders.\"\r\t(emphasis noMask: 2) ifTrue: [^ 0].\r\t^ (self height-1-self ascent+4)//4 max: 0  \"See makeItalicGlyphs\"\r\r! !\r\r!StrikeFont methodsFor: 'accessing'!\rfamilyName\r\t^self name withoutTrailingDigits.\r\r! !\r\r!StrikeFont methodsFor: 'accessing' stamp: 'tk 6/26/1998 16:45'!\rfamilySizeFace\r\t\"Answer an array with familyName, a String, pointSize, an Integer, and\r\tfaceCode, an Integer.\"\r\r\t^Array with: name\r\t\twith: self height\r\t\twith: emphasis\r\r\t\"(1 to: 12) collect: [:x | (TextStyle default fontAt: x) familySizeFace]\"! !\r\r!StrikeFont methodsFor: 'accessing' stamp: 'ar 9/21/2000 11:53'!\rfontNameWithPointSize\r\t^self name withoutTrailingDigits, ' ', self pointSize printString! !\r\r!StrikeFont methodsFor: 'accessing'!\rglyphs\r\t\"Answer a Form containing the bits representing the characters of the \r\treceiver.\"\r\r\t^glyphs! !\r\r!StrikeFont methodsFor: 'accessing'!\rheight\r\t\"Answer the height of the receiver, total of maximum extents of \r\tcharacters above and below the baseline.\"\r\r\t^self ascent + self descent! !\r\r!StrikeFont methodsFor: 'accessing'!\rlineGrid\r\t^ ascent + descent! !\r\r!StrikeFont methodsFor: 'accessing'!\rmaxAscii\r\t\"Answer the integer that is the last Ascii character value of the receiver.\"\r\r\t^maxAscii! !\r\r!StrikeFont methodsFor: 'accessing'!\rmaxWidth\r\t\"Answer the integer that is the width of the receiver's widest character.\"\r\r\t^maxWidth! !\r\r!StrikeFont methodsFor: 'accessing'!\rminAscii\r\t\"Answer the integer that is the first Ascii character value of the receiver.\"\r\r\t^minAscii! !\r\r!StrikeFont methodsFor: 'accessing' stamp: 'ls 3/27/2000 19:54'!\rname\r\t\"Answer the receiver's name.\"\r\r\t^name ifNil: ['(unnamed)']! !\r\r!StrikeFont methodsFor: 'accessing'!\rname: aString\r\t\"Set the receiver's name.\"\r\r\tname _ aString! !\r\r!StrikeFont methodsFor: 'accessing' stamp: 'sw 1/18/2000 20:54'!\rpointSize\r\t^ pointSize! !\r\r!StrikeFont methodsFor: 'accessing' stamp: 'nk 6/17/2003 14:26'!\rtextStyle\r\t^ TextStyle actualTextStyles detect:\r\t\t[:aStyle | aStyle fontArray includes: self] ifNone: [nil]! !\r\r!StrikeFont methodsFor: 'accessing' stamp: 'ar 12/31/2001 01:15'!\rwidthOf: aCharacter \r\t\"Answer the width of the argument as a character in the receiver.\"\r\r\t| ascii |\r\tascii _ aCharacter asciiValue.\r\t(ascii >= minAscii and:[ascii <= maxAscii]) ifFalse: [ascii _ maxAscii + 1].\r\t^ (xTable at: ascii + 2) - (xTable at: ascii + 1)\r! !\r\r!StrikeFont methodsFor: 'accessing'!\rxTable\r\t\"Answer an Array of the left x-coordinate of characters in glyphs.\"\r\r\t^xTable! !\r\r\r!StrikeFont methodsFor: 'displaying' stamp: 'ar 5/28/2000 12:11'!\rcharacters: anInterval in: sourceString displayAt: aPoint \r\tclippedBy: clippingRectangle rule: ruleInteger fillColor: aForm \t\"Simple, slow, primitive method for displaying a line of characters.\r\tNo wrap-around is provided.\"\r\t| ascii destPoint bb leftX rightX sourceRect |\r\tdestPoint _ aPoint.\r\tbb _ BitBlt current toForm: Display.\r\tanInterval do: \r\t\t[:i | \r\t\tascii _ (sourceString at: i) asciiValue.\r\t\t(ascii < minAscii or: [ascii > maxAscii])\r\t\t\tifTrue: [ascii _ maxAscii].\r\t\tleftX _ xTable at: ascii + 1.\r\t\trightX _ xTable at: ascii + 2.\r\t\tsourceRect _ leftX@0 extent: (rightX-leftX) @ self height.\r\t\tbb copyFrom: sourceRect in: glyphs to: destPoint.\r\t\tdestPoint _ destPoint + ((rightX-leftX)@0)].\r\t^ destPoint! !\r\r!StrikeFont methodsFor: 'displaying'!\rdisplayLine: aString at: aPoint \r\t\"Display the characters in aString, starting at position aPoint.\"\r\r\tself characters: (1 to: aString size)\r\t\tin: aString\r\t\tdisplayAt: aPoint\r\t\tclippedBy: Display boundingBox\r\t\trule: Form over\r\t\tfillColor: nil! !\r\r!StrikeFont methodsFor: 'displaying' stamp: 'ar 5/19/2000 15:09'!\rdisplayString: aString on: aBitBlt from: startIndex to: stopIndex at: aPoint kern: kernDelta\r\t\"Draw the given string from startIndex to stopIndex \r\tat aPoint on the (already prepared) BitBlt.\"\r\taBitBlt displayString: aString \r\t\t\tfrom: startIndex \r\t\t\tto: stopIndex \r\t\t\tat: aPoint \r\t\t\tstrikeFont: self\r\t\t\tkern: kernDelta.! !\r\r!StrikeFont methodsFor: 'displaying' stamp: 'ar 5/19/2000 15:08'!\rinstallOn: aDisplayContext foregroundColor: foregroundColor backgroundColor: backgroundColor\r\t^aDisplayContext \r\t\tinstallStrikeFont: self\r\t\tforegroundColor: foregroundColor \r\t\tbackgroundColor: backgroundColor! !\r\r!StrikeFont methodsFor: 'displaying' stamp: 'ar 12/31/2001 00:55'!\rwidthOfString: aString from: firstIndex to: lastIndex\r\t\"Measure the length of the given string between start and stop index\"\r\tDefaultStringScanner \r\t\tifNil:[DefaultStringScanner _ CharacterScanner new initializeStringMeasurer].\r\t^DefaultStringScanner measureString: aString inFont: self from: firstIndex to: lastIndex\r! !\r\r\r!StrikeFont methodsFor: 'emphasis' stamp: 'ar 5/28/2000 12:11'!\rbonk: glyphForm with: bonkForm\r\t\"Bonking means to run through the glyphs clearing out black pixels\r\tbetween characters to prevent them from straying into an adjacent\r\tcharacter as a result of, eg, bolding or italicizing\"\r\t\"Uses the bonkForm to erase at every character boundary in glyphs.\"\r\t| bb offset |\r\toffset _ bonkForm offset x.\r\tbb _ BitBlt current toForm: glyphForm.\r\tbb sourceForm: bonkForm; sourceRect: bonkForm boundingBox;\r\t\tcombinationRule: Form erase; destY: 0.\r\t1 to: xTable size-1 do: [:i | bb destX: (xTable at: i) + offset; copyBits].\r! !\r\r!StrikeFont methodsFor: 'emphasis'!\remphasis: code \r\t\"Set the integer code for synthetic bold, itallic, underline, and strike-out, \r\twhere bold=1, italic=2, underlined=4, and struck out=8.\"\r\r\temphasis _ code! !\r\r!StrikeFont methodsFor: 'emphasis' stamp: 'di 9/3/2000 13:22'!\remphasized: code \r\t\"Answer a copy of the receiver with emphasis set to include code.\"\r\t| derivative addedEmphasis base safeCode |\r\tcode = 0 ifTrue: [^ self].\r\t(derivativeFonts == nil or: [derivativeFonts size = 0]) ifTrue: [^ self].\r\tderivative _ derivativeFonts at: (safeCode _ code min: derivativeFonts size).\r\tderivative == nil ifFalse: [^ derivative].  \"Already have this style\"\r\r\t\"Dont have it -- derive from another with one with less emphasis\"\r\taddedEmphasis _ 1 bitShift: safeCode highBit - 1.\r\tbase _ self emphasized: safeCode - addedEmphasis.  \"Order is Bold, Ital, Under, Narrow\"\r\taddedEmphasis = 1 ifTrue:   \"Compute synthetic bold version of the font\"\r\t\t[derivative _ (base copy ensureCleanBold name: base name , 'B') makeBoldGlyphs].\r\taddedEmphasis = 2 ifTrue:   \"Compute synthetic italic version of the font\"\r\t\t[ derivative _ (base copy name: base name , 'I') makeItalicGlyphs].\r\taddedEmphasis = 4 ifTrue:   \"Compute underlined version of the font\"\r\t\t[derivative _ (base copy name: base name , 'U') makeUnderlinedGlyphs].\r\taddedEmphasis = 8 ifTrue:   \"Compute narrow version of the font\"\r\t\t[derivative _ (base copy name: base name , 'N') makeCondensedGlyphs].\r\taddedEmphasis = 16 ifTrue:   \"Compute struck-out version of the font\"\r\t\t[derivative _ (base copy name: base name , 'X') makeStruckOutGlyphs].\r\tderivative emphasis: safeCode.\r\tderivativeFonts at: safeCode put: derivative.\r\t^ derivative! !\r\r!StrikeFont methodsFor: 'emphasis'!\rmakeBoldGlyphs\r\t\"Make a bold set of glyphs with same widths by ORing 1 bit to the right\r\t\t(requires at least 1 pixel of intercharacter space)\"\r\t| g bonkForm |\r\tg _ glyphs deepCopy.\r\tbonkForm _ (Form extent: 1@16) fillBlack offset: -1@0.\r\tself bonk: g with: bonkForm.\r\tg copyBits: g boundingBox from: g at: (1@0)\r\t\tclippingBox: g boundingBox rule: Form under fillColor: nil.\r\tglyphs _ g! !\r\r!StrikeFont methodsFor: 'emphasis' stamp: 'di 10/31/97 13:18'!\rmakeCondensedGlyphs\r\t\"Make a condensed set of glyphs with same widths.\r\tNOTE: this has been superceded by kerning -- should not get called\"\r\t| g newXTable x x1 w |\r\tg _ glyphs deepCopy.\r\tnewXTable _ Array new: xTable size.\r\tnewXTable at: 1 put: (x _ xTable at: 1).\r\t1 to: xTable size-1 do:\r\t\t[:i | x1 _ xTable at: i.  w _ (xTable at: i+1) - x1.\r\t\tw > 1 ifTrue: [w _ w-1].  \"Shrink every character wider than 1\"\r\t\tg copy: (x@0 extent: w@g height) from: x1@0 in: glyphs rule: Form over.\r\t\tnewXTable at: i+1 put: (x _ x + w)].\r\txTable _ newXTable.\r\tglyphs _ g\r\"\r(TextStyle default fontAt: 1) copy makeCondensedGlyphs\r\tdisplayLine: 'The quick brown fox jumps over the lazy dog'\r\tat: Sensor cursorPoint\r\"! !\r\r!StrikeFont methodsFor: 'emphasis' stamp: 'BG 10/6/2002 13:20'!\rmakeItalicGlyphs\r\t\"Make an italic set of glyphs with same widths by skewing left and right.\r\tIn the process, characters would overlap, so we widen them all first.\r\t\"\r\t| extraWidth newGlyphs newXTable x newX w extraOnLeft |  \r\textraOnLeft _ (self height-1-self ascent+4)//4 max: 0.\r\textraWidth _ ((self ascent-5+4)//4 max: 0) + extraOnLeft.\r\tnewGlyphs _ Form extent: (glyphs width + (maxAscii + 1 - minAscii*extraWidth)) @ glyphs height.\r\tnewXTable _ xTable copy.\r\r\t\"Copy glyphs into newGlyphs with room on left and right for overlap.\"\r\tminAscii to: maxAscii+1 do:\r\t\t[:ascii | x _ xTable at: ascii+1.  w _ (xTable at: ascii+2) - x.\r\t\tnewX _ newXTable at: ascii+1.\r\t\tnewGlyphs copy: ((newX + extraOnLeft) @ 0 extent: w @ glyphs height)\r\t\t\tfrom: x @ 0 in: glyphs rule: Form over.\r\t\tnewXTable at: ascii+2 put: newX + w + extraWidth].\t\t\r\tglyphs _ newGlyphs. \r\txTable _ newXTable.\r\t\"Slide the bitmaps left and right for synthetic italic effect.\"\r\t4 to: self ascent-1 by: 4 do:\r\t\t[:y | \t\t\"Slide ascenders right...\"\r\t\tglyphs copy: (1@0 extent: glyphs width @ (self ascent - y))\r\t\t\tfrom: 0@0 in: glyphs rule: Form over].\r\tself ascent to: self height-1 by: 4 do:\r\t\t[:y | \t\t\"Slide descenders left...\"\r\t\tglyphs copy: (0@y extent: glyphs width @ glyphs height)\r\t\t\tfrom: 1@y in: glyphs rule: Form over].\r\r! !\r\r!StrikeFont methodsFor: 'emphasis'!\rmakeStruckOutGlyphs\r\t\"Make a struck-out set of glyphs with same widths\"\r\t| g |\r\tg _ glyphs deepCopy.\r\tg fillBlack: (0 @ (self ascent - (self ascent//3)) extent: g width @ 1).\r\tglyphs _ g\r! !\r\r!StrikeFont methodsFor: 'emphasis'!\rmakeUnderlinedGlyphs\r\t\"Make an underlined set of glyphs with same widths\"\r\t| g |\r\tg _ glyphs deepCopy.\r\tg fillBlack: (0 @ (self ascent+1) extent: g width @ 1).\r\tglyphs _ g\r! !\r\r!StrikeFont methodsFor: 'emphasis' stamp: 'nk 3/15/2004 18:46'!\rreleaseCachedState\r\r\tself reset.! !\r\r!StrikeFont methodsFor: 'emphasis' stamp: 'sma 12/30/1999 15:02'!\rreset\r\t\"Reset the cache of derivative emphasized fonts\"\r\r\t| style font |\r\tderivativeFonts _ Array new: 32.\r\t#('B' 'I' 'BI') doWithIndex:\r\t\t[:tag :index | \r\t\t(style _ TextStyle named: self familyName) ifNotNil:\r\t\t\t[(font _ style fontArray\r\t\t\t\tdetect: [:each | each name = (self name , tag)]\r\t\t\t\tifNone: [nil]) ifNotNil: [derivativeFonts at: index put: font]]]! !\r\r\r!StrikeFont methodsFor: 'file in/out' stamp: 'sma 6/1/2000 09:32'!\rprintOn: aStream\r\tsuper printOn: aStream.\r\taStream\r\t\tnextPut: $(;\r\t\tnextPutAll: self name;\r\t\tspace;\r\t\tprint: self height;\r\t\tnextPut: $)! !\r\r!StrikeFont methodsFor: 'file in/out' stamp: 'sma 12/30/1999 14:20'!\rreadFromStrike2: fileName  \"StrikeFont new readFromStrike2: 'Palatino14.sf2'\"\r\t\"Build an instance from the strike font stored in strike2 format.\r\tfileName is of the form: <family name><pointSize>.sf2\"\r\t| file |\r\t('*.sf2' match: fileName) ifFalse: [self halt.  \"likely incompatible\"].\r\tname _ fileName copyUpTo: $. .  \"Drop filename extension\"\r\tfile _ FileStream readOnlyFileNamed: fileName.\r\tfile binary.\r\t[self readFromStrike2Stream: file] ensure: [file close]! !\r\r!StrikeFont methodsFor: 'file in/out' stamp: 'ar 5/23/2000 12:53'!\rreadFromStrike2Stream: file \r\t\"Build an instance from the supplied binary stream on data in strike2 format\"\r\ttype _ file nextInt32.  type = 2 ifFalse: [file close. self error: 'not strike2 format'].\r\tminAscii _ file nextInt32.\r\tmaxAscii _ file nextInt32.\r\tmaxWidth _ file nextInt32.\r\tascent _ file nextInt32.\r\tdescent _ file nextInt32.\r\tpointSize _ file nextInt32.\r\tsuperscript _ ascent - descent // 3.\t\r\tsubscript _ descent - ascent // 3.\t\r\temphasis _ file nextInt32.\r\txTable _ (Array new: maxAscii + 3) atAllPut: 0.\r\t(minAscii + 1 to: maxAscii + 3) do:\r\t\t[:index | xTable at: index put: file nextInt32].\r\tglyphs _ Form new readFrom: file.\r\r\t\"Set up space character\"\r\t((xTable at: (Space asciiValue + 2))  = 0 or:\r\t\t\t[(xTable at: (Space asciiValue + 2)) = (xTable at: (Space asciiValue + 1))])\r\t\tifTrue:\t[(Space asciiValue + 2) to: xTable size do:\r\t\t\t\t\t[:index | xTable at: index put: ((xTable at: index) + DefaultSpace)]].\r\tcharacterToGlyphMap _ nil.! !\r\r\r!StrikeFont methodsFor: 'character shapes' stamp: 'di 3/27/2000 14:25'!\rcharacterFormAt: character \r\t\"Answer a Form copied out of the glyphs for the argument, character.\"\r\t| ascii leftX rightX |\r\tascii _ character asciiValue.\r\t(ascii between: minAscii and: maxAscii) ifFalse: [ascii _ maxAscii + 1].\r\tleftX _ xTable at: ascii + 1.\r\trightX _ xTable at: ascii + 2.\r\t^ glyphs copy: (leftX @ 0 corner: rightX @ self height)! !\r\r!StrikeFont methodsFor: 'character shapes' stamp: 'di 8/30/2000 10:00'!\rcharacterFormAt: character put: characterForm\r\t\"Copy characterForm over the glyph for the argument, character.\"\r\t| ascii leftX rightX widthDif newGlyphs |\r\tascii _ character asciiValue.\r\tascii < minAscii ifTrue: [^ self error: 'Cant store characters below min ascii'].\r\tascii > maxAscii ifTrue:\r\t\t[(self confirm:\r'This font does not accomodate ascii values higher than ' , maxAscii printString , '.\rDo you wish to extend it permanently to handle values up to ' , ascii printString)\r\t\t\tifTrue: [self extendMaxAsciiTo: ascii]\r\t\t\tifFalse: [^ self error: 'No change made']].\r\tleftX _ xTable at: ascii + 1.\r\trightX _ xTable at: ascii + 2.\r\twidthDif _ characterForm width - (rightX - leftX).\r\twidthDif ~= 0 ifTrue:\r\t\t[\"Make new glyphs with more or less space for this char\"\r\t\tnewGlyphs _ Form extent: (glyphs width + widthDif) @ glyphs height.\r\t\tnewGlyphs copy: (0@0 corner: leftX@glyphs height)\r\t\t\tfrom: 0@0 in: glyphs rule: Form over.\r\t\tnewGlyphs copy: ((rightX+widthDif)@0 corner: newGlyphs width@glyphs height)\r\t\t\tfrom: rightX@0 in: glyphs rule: Form over.\r\t\tglyphs _ newGlyphs.\r\t\t\"adjust further entries on xTable\"\r\t\txTable _ xTable copy.\r\t\tascii+2 to: xTable size\r\t\t\tdo: [:i | xTable at: i put: (xTable at: i) + widthDif]].\r\tglyphs copy: (leftX @ 0 extent: characterForm extent)\r\t\tfrom: 0@0 in: characterForm rule: Form over\r\"\r| f |  f _ TextStyle defaultFont.\rf characterFormAt: $  put: (Form extent: (f widthOf: $ )+10@f height)\r\"! !\r\r!StrikeFont methodsFor: 'character shapes' stamp: 'di 8/30/2000 10:15'!\rensureCleanBold \r\t\"This ensures that all character glyphs have at least one pixel of white space on the right\r\tso as not to cause artifacts in neighboring characters in bold or italic.\"\r\r\t| wider glyph |\r\temphasis = 0 ifFalse: [^ self].\r\tminAscii to: maxAscii do:\r\t\t[:i | glyph _ self characterFormAt: (Character value: i).\r\t\t(glyph copy: (glyph boundingBox topRight - (1@0)\r\t\t\t\t\tcorner: glyph boundingBox bottomRight)) isAllWhite ifFalse:\r\t\t\t[wider _ Form extent: (glyph width + 1)@glyph height.\r\t\t\tglyph displayOn: wider.\r\t\t\tself characterFormAt: (Character value: i) put: wider]].\r\"\rStrikeFont allInstancesDo: [:f | f ensureCleanBold].\r(StrikeFont familyName: 'NewYork' size: 21) ensureCleanBold.\rStrikeFont shutDown.  'Flush synthetic fonts'.\r\"\r! !\r\r!StrikeFont methodsFor: 'character shapes' stamp: 'ar 5/23/2000 12:48'!\rextendMaxAsciiTo: newMax\r\t\"Extend the range of this font so that it can display glyphs up to newMax.\"\r\r\t(newMax+3) <= xTable size ifTrue: [^ self].  \"No need to extend.\"\r\txTable size = (maxAscii+3) ifFalse:\r\t\t[^ self error: 'This font is not well-formed.'].\r\r\t\"Insert a bunch of zero-width characters...\"\r\txTable _ (xTable copyFrom: 1 to: maxAscii+2) ,\r\t\t\t((maxAscii+1 to: newMax) collect: [:i | xTable at: maxAscii+2]) ,\r\t\t\t{ xTable at: maxAscii+3 }.\r\tmaxAscii _ newMax.\r\tself fillZeroWidthSlots.\r\tcharacterToGlyphMap _ nil.! !\r\r!StrikeFont methodsFor: 'character shapes' stamp: 'di 3/27/2000 16:10'!\rfillZeroWidthSlots\r\t| nullGlyph |\r\t\"Note: this is slow because it copies the font once for every replacement.\"\r\r\tnullGlyph _ (Form extent: 1@glyphs height) fillGray.\r\t\"Now fill the empty slots with narrow box characters.\"\r\tminAscii to: maxAscii do:\r\t\t[:i | (self widthOf: (Character value: i)) = 0 ifTrue:\r\t\t\t[self characterFormAt: (Character value: i) put: nullGlyph]].\r! !\r\r\r!StrikeFont methodsFor: 'copying' stamp: 'tk 8/19/1998 16:15'!\rveryDeepCopyWith: deepCopier\r\t\"Return self.  I am shared.  Do not record me.\"! !\r\r\r!StrikeFont methodsFor: 'private' stamp: 'ar 5/18/2000 18:13'!\rcreateCharacterToGlyphMap\r\t\"Private. Create the character to glyph mapping for a font that didn't have any before. This is basically equivalent to what the former setStopCondition did, only based on indexes.\"\r\t| map |\r\tmap _ Array new: 256.\r\t0 to: minAscii - 1 do:[:i| map at: i + 1 put: maxAscii + 1].\r\tminAscii to: maxAscii do:[:i| map at: i + 1 put: i].\r\tmaxAscii + 1 to: 255 do:[:i| map at: i + 1 put: maxAscii + 1].\r\t^map! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rStrikeFont class\r\tinstanceVariableNames: ''!\r\r!StrikeFont class methodsFor: 'examples'!\rexample\r\t\"Displays a line of text on the display screen at the location of the cursor.\r\tExample depends on the strike font file, 'TimesRoman10.strike'. existing.\"\r\r\t(StrikeFont new readFromStrike2: 'NewYork12.sf2')\r\t\tdisplayLine: 'A line of 12-pt text in New York style' at: Sensor cursorPoint\r\t \r\t\"StrikeFont example.\"! !\r\r!StrikeFont class methodsFor: 'examples' stamp: 'nop 2/11/2001 13:35'!\rreadStrikeFont2Family: familyName \r\t\"StrikeFont readStrikeFont2Family: 'Lucida'\"\r\t\"This utility reads all available .sf2 StrikeFont files for a given family from  \r\tthe current directory. It returns an Array, sorted by size, suitable for handing \r\tto TextStyle newFontArray: .\"\r\t\"For this utility to work as is, the .sf2 files must be named 'familyNN.sf2'.\"\r\t| fileNames strikeFonts fontArray |\r\tfileNames _ FileDirectory default fileNamesMatching: familyName , '##.sf2'.\r\tstrikeFonts _ fileNames collect: [:fname | StrikeFont new readFromStrike2: fname].\r\tstrikeFonts do: [ :font | font reset ].\r\tstrikeFonts _ strikeFonts asSortedCollection: [:a :b | a height < b height].\r\tfontArray _ strikeFonts asArray.\r\t^ fontArray\r\r\"TextConstants at: #Lucida put: (TextStyle fontArray: (StrikeFont \r\treadStrikeFont2Family: 'Lucida')).\"! !\r\r\r!StrikeFont class methodsFor: 'derivative font caching' stamp: 'tk 6/24/1999 11:45'!\rshutDown  \"StrikeFont shutDown\"\r\t\"Deallocate synthetically derived copies of base fonts to save space\"\r\tself allSubInstancesDo: [:sf | sf reset]! !\r\r\r!StrikeFont class methodsFor: 'accessing' stamp: 'nk 6/17/2003 15:15'!\ractualFamilyNames\r\t\"Answer a sorted list of actual family names, without the Default aliases\"\r\r\t^(self familyNames copyWithoutAll: #(DefaultTextStyle DefaultFixedTextStyle)) asOrderedCollection! !\r\r!StrikeFont class methodsFor: 'accessing' stamp: 'sma 12/30/1999 13:53'!\rfamilyName: aName size: aSize\r\t\"Answer a font (or the default font if the name is unknown) in the specified size.\"\r\r\t^ ((TextStyle named: aName asSymbol) ifNil: [TextStyle default]) fontOfSize: aSize! !\r\r!StrikeFont class methodsFor: 'accessing' stamp: 'sma 12/30/1999 13:48'!\rfamilyNames\r\t^ (TextConstants select: [:each | each isKindOf: TextStyle]) keys asSortedCollection! !\rArrayedCollection variableByteSubclass: #String\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'AsciiOrder CSLineEnders CSNonSeparators CSSeparators CaseInsensitiveOrder CaseSensitiveOrder HtmlEntities LowercasingTable Tokenish UppercasingTable'\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Text'!\r!String commentStamp: '<historical>' prior: 0!\rA String is an indexed collection of Characters, compactly encoded as 8-bit bytes.\r\rString support a vast array of useful methods, which can best be learned by browsing and trying out examples as you find them in the code.\r\rHere are a few useful methods to look at...\r\tString match:\r\tString contractTo:\r\rString also inherits many useful methods from its hierarchy, such as\r\tSequenceableCollection ,\r\tSequenceableCollection copyReplaceAll:with:!\r]style[(269 13 2 18 72 24 2 43)f1,f1LString match:;,f1,f1LString contractTo:;,f1,f1LSequenceableCollection ,;,f1,f1LSequenceableCollection copyReplaceAll:with:;!\r\r\r!String methodsFor: 'accessing'!\rat: index \r\t\"Primitive. Answer the Character stored in the field of the receiver\r\tindexed by the argument. Fail if the index argument is not an Integer or\r\tis out of bounds. Essential. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 63>\r\t^Character value: (super at: index)! !\r\r!String methodsFor: 'accessing' stamp: 'wod 6/16/1998 15:24'!\rat: index put: aCharacter \r\t\"Primitive. Store the Character in the field of the receiver indicated by\r\tthe index. Fail if the index is not an Integer or is out of bounds, or if\r\tthe argument is not a Character. Essential. See Object documentation\r\twhatIsAPrimitive.\"\r\r\t<primitive: 64>\r\t(aCharacter isKindOf: Character)\r\t\tifTrue: [\t\r\t\t\tindex isInteger\r\t\t\t\tifTrue: [self errorSubscriptBounds: index]\r\t\t\t\tifFalse: [self errorNonIntegerIndex]]\r\t\tifFalse: [self error: 'Strings only store Characters']! !\r\r!String methodsFor: 'accessing' stamp: 'ar 12/27/1999 13:44'!\rbyteAt: index\r\t<primitive: 60>\r\t^(self at: index) asciiValue! !\r\r!String methodsFor: 'accessing' stamp: 'ar 12/27/1999 13:44'!\rbyteAt: index put: value\r\t<primitive: 61>\r\tself at: index put: value asCharacter.\r\t^value! !\r\r!String methodsFor: 'accessing' stamp: 'ar 3/3/2001 16:17'!\rbyteSize\r\t^self size! !\r\r!String methodsFor: 'accessing' stamp: 'sw 12/6/2001 16:08'!\rdo: aBlock toFieldNumber: aNumber\r\t\"Considering the receiver as a holder of tab-delimited fields, evaluate aBlock on behalf of a field in this string\"\r\r\t| start end index |\r\tstart _ 1.\r\tindex _ 1.\r\t[start <= self size] whileTrue: \r\t\t[end _ self indexOf: Character tab startingAt: start ifAbsent: [self size + 1].\r\t\tend _ end - 1.\r\t\taNumber = index ifTrue:\r\t\t\t[aBlock value: (self copyFrom: start  to: end).\r\t\t\t^ self].\r\t\tindex _ index + 1.\r\t\tstart _ end + 2]\r\r\"\r1 to: 6 do:\r\t[:aNumber |\r\t\t'fred\tcharlie\telmo\t\twimpy\tfriml' do:\r\t\t\t[:aField | Transcript cr; show: aField] toFieldNumber: aNumber]\r\"! !\r\r!String methodsFor: 'accessing'!\rendsWithDigit\r\t\"Answer whether the receiver's final character represents a digit.  3/11/96 sw\"\r\r\t^ self size > 0 and: [self last isDigit]! !\r\r!String methodsFor: 'accessing' stamp: 'tk 12/26/97 11:09'!\rfindAnySubStr: delimiters startingAt: start \r\t\"Answer the index of the character within the receiver, starting at start, that begins a substring matching one of the delimiters.  delimiters is an Array of Strings (Characters are permitted also).  If the receiver does not contain any of the delimiters, answer size + 1.\"\r\r\t| min ind |\r\tmin _ self size + 1.\r\tdelimiters do: [:delim |\t\"May be a char, a string of length 1, or a substring\"\r\t\tdelim class == Character \r\t\t\tifTrue: [ind _ self indexOfSubCollection: (String with: delim) \r\t\t\t\t\t\tstartingAt: start ifAbsent: [min]]\r\t\t\tifFalse: [ind _ self indexOfSubCollection: delim \r\t\t\t\t\t\tstartingAt: start ifAbsent: [min]].\r\t\t\tmin _ min min: ind].\r\t^ min! !\r\r!String methodsFor: 'accessing' stamp: 'dew 11/15/2000 15:02'!\rfindBetweenSubStrs: delimiters\r\t\"Answer the collection of String tokens that result from parsing self.  Tokens are separated by 'delimiters', which can be a collection of Strings, or a collection of Characters.  Several delimiters in a row are considered as just one separation.\"\r\r\t| tokens keyStart keyStop |\r\ttokens _ OrderedCollection new.\r\tkeyStop _ 1.\r\t[keyStop <= self size] whileTrue:\r\t\t[keyStart _ self skipAnySubStr: delimiters startingAt: keyStop.\r\t\tkeyStop _ self findAnySubStr: delimiters startingAt: keyStart.\r\t\tkeyStart < keyStop\r\t\t\tifTrue: [tokens add: (self copyFrom: keyStart to: (keyStop - 1))]].\r\t^tokens! !\r\r!String methodsFor: 'accessing' stamp: 'ls 3/19/2000 16:43'!\rfindCloseParenthesisFor: startIndex\r\t\"assume (self at: startIndex) is $(.  Find the matching $), allowing parentheses to nest.\"\r\t\" '(1+(2-3))-3.14159' findCloseParenthesisFor: 1 \"\r\t\" '(1+(2-3))-3.14159' findCloseParenthesisFor: 4 \"\r\t| pos nestLevel |\r\tpos := startIndex+1.\r\tnestLevel := 1.\r\t[ pos <= self size ] whileTrue: [\r\t\t(self at: pos) = $( ifTrue: [ nestLevel := nestLevel + 1 ].\r\t\t(self at: pos) = $) ifTrue: [ nestLevel := nestLevel - 1 ].\r\t\tnestLevel = 0 ifTrue: [ ^pos ].\r\t\tpos := pos + 1.\r\t].\r\t^self size + 1! !\r\r!String methodsFor: 'accessing'!\rfindDelimiters: delimiters startingAt: start \r\t\"Answer the index of the character within the receiver, starting at start, that matches one of the delimiters. If the receiver does not contain any of the delimiters, answer size + 1.\"\r\r\tstart to: self size do: [:i |\r\t\tdelimiters do: [:delim | delim = (self at: i) ifTrue: [^ i]]].\r\t^ self size + 1! !\r\r!String methodsFor: 'accessing' stamp: 'ar 4/11/1999 22:15'!\rfindString: subString\r\t\"Answer the index of subString within the receiver, starting at start. If \r\tthe receiver does not contain subString, answer 0.\"\r\t^self findString: subString startingAt: 1.! !\r\r!String methodsFor: 'accessing' stamp: 'di 11/15/1998 16:43'!\rfindString: subString startingAt: start \r\t\"Answer the index of subString within the receiver, starting at start. If \r\tthe receiver does not contain subString, answer 0.\"\r\r\t^ self findSubstring: subString in: self startingAt: start matchTable: CaseSensitiveOrder! !\r\r!String methodsFor: 'accessing' stamp: 'di 11/15/1998 16:45'!\rfindString: key startingAt: start caseSensitive: caseSensitive\r\t\"Answer the index in this String at which the substring key first occurs, at or beyond start.  The match can be case-sensitive or not.  If no match is found, zero will be returned.\"\r\r\tcaseSensitive\r\tifTrue: [^ self findSubstring: key in: self startingAt: start matchTable: CaseSensitiveOrder]\r\tifFalse: [^ self findSubstring: key in: self startingAt: start matchTable: CaseInsensitiveOrder]! !\r\r!String methodsFor: 'accessing' stamp: 'tk 8/10/2000 09:14'!\rfindTokens: delimiters\r\t\"Answer the collection of tokens that result from parsing self.  Return strings between the delimiters.  Any character in the Collection delimiters marks a border.  Several delimiters in a row are considered as just one separation.  Also, allow delimiters to be a single character.\"\r\r\t| tokens keyStart keyStop separators |\r\r\ttokens _ OrderedCollection new.\r\tseparators _ delimiters class == Character \r\t\tifTrue: [Array with: delimiters]\r\t\tifFalse: [delimiters].\r\tkeyStop _ 1.\r\t[keyStop <= self size] whileTrue:\r\t\t[keyStart _ self skipDelimiters: separators startingAt: keyStop.\r\t\tkeyStop _ self findDelimiters: separators startingAt: keyStart.\r\t\tkeyStart < keyStop\r\t\t\tifTrue: [tokens add: (self copyFrom: keyStart to: (keyStop - 1))]].\r\t^tokens! !\r\r!String methodsFor: 'accessing' stamp: 'tk 12/26/97 09:50'!\rfindTokens: delimiters includes: subString\r\t\"Divide self into pieces using delimiters.  Return the piece that includes subString anywhere in it.  Is case sensitive (say asLowercase to everything beforehand to make insensitive).\"\r\r^ (self findTokens: delimiters) \r\tdetect: [:str | (str includesSubString: subString)] \r\tifNone: [nil]! !\r\r!String methodsFor: 'accessing' stamp: 'tk 6/19/97 10:05'!\rfindTokens: delimiters keep: keepers\r\t\"Answer the collection of tokens that result from parsing self.  The tokens are seperated by delimiters, any of a string of characters.  If a delimiter is also in keepers, make a token for it.  (Very useful for carriage return.  A sole return ends a line, but is also saved as a token so you can see where the line breaks were.)\"\r\r\t| tokens keyStart keyStop |\r\ttokens _ OrderedCollection new.\r\tkeyStop _ 1.\r\t[keyStop <= self size] whileTrue:\r\t\t[keyStart _ self skipDelimiters: delimiters startingAt: keyStop.\r\t\tkeyStop to: keyStart-1 do: [:ii | \r\t\t\t(keepers includes: (self at: ii)) ifTrue: [\r\t\t\t\ttokens add: (self copyFrom: ii to: ii)]].\t\"Make this keeper be a token\"\r\t\tkeyStop _ self findDelimiters: delimiters startingAt: keyStart.\r\t\tkeyStart < keyStop\r\t\t\tifTrue: [tokens add: (self copyFrom: keyStart to: (keyStop - 1))]].\r\t^tokens! !\r\r!String methodsFor: 'accessing' stamp: 'tk 6/2/2001 12:12'!\rfindWordStart: key startingAt: start\r\t| ind |\r\t\"HyperCard style searching.  Answer the index in self of the substring key, when that key is preceeded by a separator character.  Must occur at or beyond start.  The match is case-insensitive.  If no match is found, zero will be returned.\"\r\r\tind _ start.\r\t[ind _ self findSubstring: key in: self startingAt: ind matchTable: CaseInsensitiveOrder.\r\tind = 0 ifTrue: [^ 0].\t\"not found\"\r\tind = 1 ifTrue: [^ 1].\t\"First char is the start of a word\"\r\t(self at: ind-1) isSeparator] whileFalse: [ind _ ind + 1].\r\t^ ind\t\"is a word start\"! !\r\r!String methodsFor: 'accessing' stamp: 'sw 8/12/97 12:37'!\rincludesSubString: subString\r\t^ (self findString: subString startingAt: 1) > 0! !\r\r!String methodsFor: 'accessing' stamp: 'di 11/15/1998 16:53'!\rincludesSubstring: aString caseSensitive: caseSensitive\r\t\r\t^ (self findString: aString startingAt: 1 caseSensitive: caseSensitive) > 0! !\r\r!String methodsFor: 'accessing' stamp: 'di 9/1/1999 18:28'!\rindexOf: aCharacter\r\r\t(aCharacter class == Character) ifFalse: [^ 0].\r\t^ String indexOfAscii: aCharacter asciiValue inString: self startingAt: 1! !\r\r!String methodsFor: 'accessing' stamp: 'di 9/1/1999 18:28'!\rindexOf: aCharacter  startingAt: start\r\r\t(aCharacter class == Character) ifFalse: [^ 0].\r\t^ String indexOfAscii: aCharacter asciiValue inString: self startingAt: start! !\r\r!String methodsFor: 'accessing' stamp: 'di 9/1/1999 18:28'!\rindexOf: aCharacter  startingAt: start  ifAbsent: aBlock\r\t| ans |\r\t(aCharacter class == Character) ifFalse: [ ^ aBlock value ].\r\tans _ String indexOfAscii: aCharacter asciiValue inString: self  startingAt: start.\r\tans = 0\r\t\tifTrue: [ ^ aBlock value ]\r\t\tifFalse: [ ^ ans ]! !\r\r!String methodsFor: 'accessing' stamp: 'ls 8/20/1998 05:20'!\rindexOfAnyOf: aCharacterSet\r\t\"returns the index of the first character in the given set.  Returns 0 if none are found\"\r\t^self indexOfAnyOf: aCharacterSet  startingAt: 1! !\r\r!String methodsFor: 'accessing' stamp: 'ls 8/20/1998 05:19'!\rindexOfAnyOf: aCharacterSet  ifAbsent: aBlock\r\t\"returns the index of the first character in the given set.  Returns the evaluation of aBlock if none are found\"\r\t^self indexOfAnyOf: aCharacterSet  startingAt: 1  ifAbsent: aBlock! !\r\r!String methodsFor: 'accessing' stamp: 'ls 8/20/1998 05:19'!\rindexOfAnyOf: aCharacterSet  startingAt: start\r\t\"returns the index of the first character in the given set, starting from start.  Returns 0 if none are found\"\r\t^self indexOfAnyOf: aCharacterSet  startingAt: start  ifAbsent: [ 0 ]! !\r\r!String methodsFor: 'accessing' stamp: 'ls 8/18/1998 00:27'!\rindexOfAnyOf: aCharacterSet  startingAt: start ifAbsent: aBlock\r\t\"returns the index of the first character in the given set, starting from start\"\r\r\t| ans |\r\tans _ String findFirstInString: self  inSet: aCharacterSet byteArrayMap startingAt: start.\r\r\tans = 0 \r\t\tifTrue: [ ^aBlock value ]\r\t\tifFalse: [ ^ans ]! !\r\r!String methodsFor: 'accessing' stamp: 'RAH 4/25/2000 19:49'!\rindexOfSubCollection: sub \r\t#Collectn.\r\t\"Added 2000/04/08 For ANSI <sequenceReadableCollection> protocol.\"\r\t^ self\r\t\tindexOfSubCollection: sub\r\t\tstartingAt: 1\r\t\tifAbsent: [0]! !\r\r!String methodsFor: 'accessing' stamp: 'di 11/15/1998 17:02'!\rindexOfSubCollection: sub startingAt: start ifAbsent: exceptionBlock\r\t| index |\r\tindex _ self findSubstring: sub in: self startingAt: start matchTable: CaseSensitiveOrder.\r\tindex = 0 ifTrue: [^ exceptionBlock value].\r\t^ index! !\r\r!String methodsFor: 'accessing' stamp: 'nk 2/21/2001 21:26'!\rlastIndexOfPKSignature: aSignature\r\t\"Answer the last index in me where aSignature (4 bytes long) occurs, or 0 if not found\"\r\t| a b c d |\r\ta _ aSignature first.\r\tb _ aSignature second.\r\tc _ aSignature third.\r\td _ aSignature fourth.\r\t(self size - 3) to: 1 by: -1 do: [ :i |\r\t\t(((self at: i) = a)\r\t\t\tand: [ ((self at: i + 1) = b)\r\t\t\t\tand: [ ((self at: i + 2) = c)\r\t\t\t\t\tand: [ ((self at: i + 3) = d) ]]])\r\t\t\t\t\t\tifTrue: [ ^i ]\r\t].\r\t^0! !\r\r!String methodsFor: 'accessing'!\rlineCorrespondingToIndex: anIndex\r\t\"Answer a string containing the line at the given character position.  1/15/96 sw:  Inefficient first stab at this\"\r\r\t| cr aChar answer |\r\tcr _ Character cr.\r\tanswer _ ''.\r\t1 to: self size do:\r\t\t[:i | \r\t\t\taChar _ self at: i.\r\t\t\taChar == cr\r\t\t\t\tifTrue:\r\t\t\t\t\t[i > anIndex\r\t\t\t\t\t\tifTrue:\r\t\t\t\t\t\t\t[^ answer]\r\t\t\t\t\t\tifFalse:\r\t\t\t\t\t\t\t[answer _ '']]\r\t\t\t\tifFalse:\r\t\t\t\t\t[answer _ answer copyWith: aChar]].\r\t^ answer! !\r\r!String methodsFor: 'accessing' stamp: 'md 11/14/2003 17:26'!\rlineCount\r\t\"Answer the number of lines represented by the receiver, where every cr adds one line.  5/10/96 sw\"\r\r\t| cr count |\r\tcr _ Character cr.\r\tcount _ 1  min: self size.\r\t1 to: self size do:\r\t\t[:i | (self at: i) == cr ifTrue: [count _ count + 1]].\r\t^ count\r\r\"\r'Fred\rthe\rBear' lineCount\r\"! !\r\r!String methodsFor: 'accessing'!\rlineNumber: anIndex\r\t\"Answer a string containing the characters in the given line number.  5/10/96 sw\"\r\r\t| crString pos finalPos |\r\tcrString _ String with: Character cr.\r\tpos _ 0.\r\t1 to: anIndex - 1 do:\r\t\t[:i | pos _ self findString: crString startingAt: pos + 1.\r\t\t\tpos == 0 ifTrue: [^ nil]].\r\tfinalPos _ self findString: crString startingAt: pos + 1.\r\tfinalPos == 0 ifTrue: [finalPos _ self size + 1].\r\t^ self copyFrom: pos + 1 to: finalPos - 1\r\r\"\r'Fred\rthe\rBear' lineNumber: 3\r\"! !\r\r!String methodsFor: 'accessing' stamp: 'ls 9/10/1998 22:27'!\rlinesDo: aBlock\r\t\"execute aBlock with each line in this string.  The terminating CR's are not included in what is passed to aBlock\"\r\t| start end |\r\tstart _ 1.\r\t[ start <= self size ] whileTrue: [\r\t\tend _ self indexOf: Character cr  startingAt: start  ifAbsent: [ self size + 1 ].\r\t\tend _ end - 1.\r\r\t\taBlock value: (self copyFrom: start  to: end).\r\t\tstart _ end + 2. ].! !\r\r!String methodsFor: 'accessing' stamp: 'BJP 6/12/2000 18:53'!\rskipAnySubStr: delimiters startingAt: start \r\t\"Answer the index of the last character within the receiver, starting at start, that does NOT match one of the delimiters. delimiters is a Array of substrings (Characters also allowed).  If the receiver is all delimiters, answer size + 1.\"\r\t| any this ind ii |\r\tii _ start-1.\r\t[(ii _ ii + 1) <= self size] whileTrue: [ \"look for char that does not match\"\r\t\tany _ false.\r\t\tdelimiters do: [:delim |\r\t\t\tdelim class == Character \r\t\t\t\tifTrue: [(self at: ii) == delim ifTrue: [any _ true]]\r\t\t\t\tifFalse: [\"a substring\"\r\t\t\t\t\tdelim size > (self size - ii + 1) ifFalse: \"Here's where the one-off error was.\"\r\t\t\t\t\t\t[ind _ 0.\r\t\t\t\t\t\tthis _ true.\r\t\t\t\t\t\tdelim do: [:dd | \r\t\t\t\t\t\t\tdd == (self at: ii+ind) ifFalse: [this _ false].\r\t\t\t\t\t\t\tind _ ind + 1].\r\t\t\t\t\t\tthis ifTrue: [ii _ ii + delim size - 1.  any _ true]]\r\t\t\t\t\t\t\tifTrue: [any _ false] \"if the delim is too big, it can't match\"]].\r\t\tany ifFalse: [^ ii]].\r\t^ self size + 1! !\r\r!String methodsFor: 'accessing'!\rskipDelimiters: delimiters startingAt: start \r\t\"Answer the index of the character within the receiver, starting at start, that does NOT match one of the delimiters. If the receiver does not contain any of the delimiters, answer size + 1.  Assumes the delimiters to be a non-empty string.\"\r\r\tstart to: self size do: [:i |\r\t\tdelimiters detect: [:delim | delim = (self at: i)]\r\t\t\t\tifNone: [^ i]].\r\t^ self size + 1! !\r\r!String methodsFor: 'accessing' stamp: 'sw 4/23/1998 10:53'!\rstartsWithDigit\r\t\"Answer whether the receiver's first character represents a digit\"\r\r\t^ self size > 0 and: [self first isDigit]! !\r\r!String methodsFor: 'accessing' stamp: 'sw 12/6/2001 21:30'!\rtabDelimitedFieldsDo: aBlock\r\t\"Considering the receiver as a holder of tab-delimited fields, evaluate execute aBlock with each field in this string.  The separatilng tabs are not included in what is passed to aBlock\"\r\r\t| start end |\r\t\"No senders but was useful enough in earlier work that it's retained for the moment.\"\r\tstart _ 1.\r\t[start <= self size] whileTrue: \r\t\t[end _ self indexOf: Character tab startingAt: start ifAbsent: [self size + 1].\r\t\tend _ end - 1.\r\t\taBlock value: (self copyFrom: start  to: end).\r\t\tstart _ end + 2]\r\r\"\r'fred\tcharlie\telmo\t\t2' tabDelimitedFieldsDo: [:aField | Transcript cr; show: aField]\r\"! !\r\r\r!String methodsFor: 'comparing' stamp: 'di 2/27/98 12:16'!\r< aString \r\t\"Answer whether the receiver sorts before aString.\r\tThe collation order is simple ascii (with case differences).\"\r\r\t^ (self compare: self with: aString collated: AsciiOrder) = 1! !\r\r!String methodsFor: 'comparing' stamp: 'di 2/27/98 12:17'!\r<= aString \r\t\"Answer whether the receiver sorts before or equal to aString.\r\tThe collation order is simple ascii (with case differences).\"\r\r\t^ (self compare: self with: aString collated: AsciiOrder) <= 2! !\r\r!String methodsFor: 'comparing' stamp: 'tk 10/17/2001 14:06'!\r= aString \r\t\"Answer whether the receiver sorts equally as aString.\r\tThe collation order is simple ascii (with case differences).\"\r\r\taString species == String ifFalse: [\r\t\taString isText ifTrue: [^ self = aString string].\r\t\t^ false].\r\r\t^ (self compare: self with: aString collated: AsciiOrder) = 2! !\r\r!String methodsFor: 'comparing' stamp: 'di 2/27/98 12:17'!\r> aString \r\t\"Answer whether the receiver sorts after aString.\r\tThe collation order is simple ascii (with case differences).\"\r\r\t^ (self compare: self with: aString collated: AsciiOrder) = 3! !\r\r!String methodsFor: 'comparing' stamp: 'di 2/27/98 12:18'!\r>= aString \r\t\"Answer whether the receiver sorts after or equal to aString.\r\tThe collation order is simple ascii (with case differences).\"\r\r\t^ (self compare: self with: aString collated: AsciiOrder) >= 2! !\r\r!String methodsFor: 'comparing'!\ralike: aString \r\t\"Answer some indication of how alike the receiver is to the argument,  0 is no match, twice aString size is best score.  Case is ignored.\"\r\r\t| i j k minSize bonus |\r\tminSize _ (j _ self size) min: (k _ aString size).\r\tbonus _ (j - k) abs < 2 ifTrue: [ 1 ] ifFalse: [ 0 ].\r\ti _ 1.\r\t[(i <= minSize) and: [((super at: i) bitAnd: 16rDF)  = ((aString at: i) asciiValue bitAnd: 16rDF)]]\r\t\twhileTrue: [ i _ i + 1 ].\r\t[(j > 0) and: [(k > 0) and:\r\t\t[((super at: j) bitAnd: 16rDF) = ((aString at: k) asciiValue bitAnd: 16rDF)]]]\r\t\t\twhileTrue: [ j _ j - 1.  k _ k - 1. ].\r\t^ i - 1 + self size - j + bonus. ! !\r\r!String methodsFor: 'comparing' stamp: 'di 11/15/1998 17:25'!\rbeginsWith: prefix\r\t\"Answer whether the receiver begins with the given prefix string.\r\tThe comparison is case-sensitive.\"\r\r\tself size < prefix size ifTrue: [^ false].\r\t^ (self findSubstring: prefix in: self startingAt: 1\r\t\t\tmatchTable: CaseSensitiveOrder) = 1\r! !\r\r!String methodsFor: 'comparing' stamp: 'sw 4/19/1999 12:11'!\rcaseInsensitiveLessOrEqual: aString \r\t\"Answer whether the receiver sorts before or equal to aString.\r\tThe collation order is case insensitive.\"\r\r\t^ (self compare: self with: aString collated: CaseInsensitiveOrder) <= 2! !\r\r!String methodsFor: 'comparing' stamp: 'di 9/20/1998 14:33'!\rcaseSensitiveLessOrEqual: aString \r\t\"Answer whether the receiver sorts before or equal to aString.\r\tThe collation order is case sensitive.\"\r\r\t^ (self compare: self with: aString collated: CaseSensitiveOrder) <= 2! !\r\r!String methodsFor: 'comparing' stamp: 'tk 9/5/2000 10:42'!\rcharactersExactlyMatching: aString\r\t\"Do a character-by-character comparison between the receiver and aString.  Return the index of the final character that matched exactly.\"\r\r\t| count |\r\tcount _ self size min: aString size.\r\t1 to: count do: [:i | \r\t\t(self at: i) == (aString at: i) ifFalse: [\r\t\t\t^ i - 1]].\r\t^ count! !\r\r!String methodsFor: 'comparing' stamp: 'di 2/27/98 12:41'!\rcompare: aString \r\t\"Answer a comparison code telling how the receiver sorts relative to aString:\r\t\t1 - before\r\t\t2 - equal\r\t\t3 - after.\r\tThe collation sequence is ascii with case differences ignored.\r\tTo get the effect of a <= b, but ignoring case, use (a compare: b) <= 2.\"\r\r\t^ self compare: self with: aString collated: CaseInsensitiveOrder! !\r\r!String methodsFor: 'comparing' stamp: 'go 2/11/98 14:59'!\rcrc16\r\t\"Compute a 16 bit cyclic redundancy check.\"\r\r\t| crc |\r\tcrc := 0.\r\tself do: [:c |\r\t\tcrc := (crc bitShift: -8) bitXor: (\r\t\t #(\t16r0000\t16rC0C1\t16rC181\t16r0140\t16rC301\t16r03C0\t16r0280\t16rC241\r\t\t\t16rC601\t16r06C0\t16r0780\t16rC741\t16r0500\t16rC5C1\t16rC481\t16r0440\r\t\t\t16rCC01\t16r0CC0\t16r0D80\t16rCD41\t16r0F00\t16rCFC1\t16rCE81\t16r0E40\r\t\t\t16r0A00\t16rCAC1\t16rCB81\t16r0B40\t16rC901\t16r09C0\t16r0880\t16rC841\r\t\t\t16rD801\t16r18C0\t16r1980\t16rD941\t16r1B00\t16rDBC1\t16rDA81\t16r1A40\r\t\t\t16r1E00\t16rDEC1\t16rDF81\t16r1F40\t16rDD01\t16r1DC0\t16r1C80\t16rDC41\r\t\t\t16r1400\t16rD4C1\t16rD581\t16r1540\t16rD701\t16r17C0\t16r1680\t16rD641\r\t\t\t16rD201\t16r12C0\t16r1380\t16rD341\t16r1100\t16rD1C1\t16rD081\t16r1040\r\t\t\t16rF001\t16r30C0\t16r3180\t16rF141\t16r3300\t16rF3C1\t16rF281\t16r3240\r\t\t\t16r3600\t16rF6C1\t16rF781\t16r3740\t16rF501\t16r35C0\t16r3480\t16rF441\r\t\t\t16r3C00\t16rFCC1\t16rFD81\t16r3D40\t16rFF01\t16r3FC0\t16r3E80\t16rFE41\r\t\t\t16rFA01\t16r3AC0\t16r3B80\t16rFB41\t16r3900\t16rF9C1\t16rF881\t16r3840\r\t\t\t16r2800\t16rE8C1\t16rE981\t16r2940\t16rEB01\t16r2BC0\t16r2A80\t16rEA41\r\t\t\t16rEE01\t16r2EC0\t16r2F80\t16rEF41\t16r2D00\t16rEDC1\t16rEC81\t16r2C40\r\t\t\t16rE401\t16r24C0\t16r2580\t16rE541\t16r2700\t16rE7C1\t16rE681\t16r2640\r\t\t\t16r2200\t16rE2C1\t16rE381\t16r2340\t16rE101\t16r21C0\t16r2080\t16rE041\r\t\t\t16rA001\t16r60C0\t16r6180\t16rA141\t16r6300\t16rA3C1\t16rA281\t16r6240\r\t\t\t16r6600\t16rA6C1\t16rA781\t16r6740\t16rA501\t16r65C0\t16r6480\t16rA441\r\t\t\t16r6C00\t16rACC1\t16rAD81\t16r6D40\t16rAF01\t16r6FC0\t16r6E80\t16rAE41\r\t\t\t16rAA01\t16r6AC0\t16r6B80\t16rAB41\t16r6900\t16rA9C1\t16rA881\t16r6840\r\t\t\t16r7800\t16rB8C1\t16rB981\t16r7940\t16rBB01\t16r7BC0\t16r7A80\t16rBA41\r\t\t\t16rBE01\t16r7EC0\t16r7F80\t16rBF41\t16r7D00\t16rBDC1\t16rBC81\t16r7C40\r\t\t\t16rB401\t16r74C0\t16r7580\t16rB541\t16r7700\t16rB7C1\t16rB681\t16r7640\r\t\t\t16r7200\t16rB2C1\t16rB381\t16r7340\t16rB101\t16r71C0\t16r7080\t16rB041\r\t\t\t16r5000\t16r90C1\t16r9181\t16r5140\t16r9301\t16r53C0\t16r5280\t16r9241\r\t\t\t16r9601\t16r56C0\t16r5780\t16r9741\t16r5500\t16r95C1\t16r9481\t16r5440\r\t\t\t16r9C01\t16r5CC0\t16r5D80\t16r9D41\t16r5F00\t16r9FC1\t16r9E81\t16r5E40\r\t\t\t16r5A00\t16r9AC1\t16r9B81\t16r5B40\t16r9901\t16r59C0\t16r5880\t16r9841\r\t\t\t16r8801\t16r48C0\t16r4980\t16r8941\t16r4B00\t16r8BC1\t16r8A81\t16r4A40\r\t\t\t16r4E00\t16r8EC1\t16r8F81\t16r4F40\t16r8D01\t16r4DC0\t16r4C80\t16r8C41\r\t\t\t16r4400\t16r84C1\t16r8581\t16r4540\t16r8701\t16r47C0\t16r4680\t16r8641\r\t\t\t16r8201\t16r42C0\t16r4380\t16r8341\t16r4100\t16r81C1\t16r8081\t16r4040)\r\t\t\t at: ((crc bitXor: c asciiValue) bitAnd: 16rFF) + 1) ].\r\t^crc! !\r\r!String methodsFor: 'comparing' stamp: 'di 11/15/1998 17:25'!\rendsWith: suffix\r\t\"Answer whether the tail end of the receiver is the same as suffix.\r\tThe comparison is case-sensitive.\"\r\t| extra |\r\t(extra _ self size - suffix size) < 0 ifTrue: [^ false].\r\t^ (self findSubstring: suffix in: self startingAt: extra + 1\r\t\t\tmatchTable: CaseSensitiveOrder) > 0\r\"\r  'Elvis' endsWith: 'vis'\r\"! !\r\r!String methodsFor: 'comparing' stamp: 'ar 11/19/1998 21:48'!\rendsWithAnyOf: aCollection\r\taCollection do:[:suffix|\r\t\t(self endsWith: suffix) ifTrue:[^true].\r\t].\r\t^false! !\r\r!String methodsFor: 'comparing' stamp: 'SqR 8/13/2002 10:52'!\rhash\r\t\"#hash is implemented, because #= is implemented\"\r\r\t^ByteArray\r\t\thashBytes: self\r\t\tstartingWith: self species hash! !\r\r!String methodsFor: 'comparing'!\rhashMappedBy: map\r\t\"My hash is independent of my oop.\"\r\r\t^self hash! !\r\r!String methodsFor: 'comparing' stamp: 'tk 3/8/2001 16:49'!\rhowManyMatch: string \r\t\"Count the number of characters that match up in self and aString.\"\r\t| count shorterLength |\r\t\r\tcount  _  0 .\r\tshorterLength  _  ((self size ) min: (string size ) ) .\r\t(1 to: shorterLength  do: [:index |\r\t\t (((self at: index ) = (string at: index )  ) ifTrue: [count  _  (count + 1 ) .\r\t\t\t]   ).\r\t\t]   ).\r\t^  count \r\t\r\t! !\r\r!String methodsFor: 'comparing' stamp: 'di 11/19/1998 13:37'!\rmatch: text\r\t\"Answer whether text matches the pattern in this string.\r\tMatching ignores upper/lower case differences.\r\tWhere this string contains #, text may contain any character.\r\tWhere this string contains *, text may contain any sequence of characters.\"\r\r\t^ self startingAt: 1 match: text startingAt: 1\r\"\r\t'*'\t\t\tmatch: 'zort' true\r\t'*baz'\t\tmatch: 'mobaz' true\r\t'*baz'\t\tmatch: 'mobazo' false\r\t'*baz*'\t\tmatch: 'mobazo' true\r\t'*baz*'\t\tmatch: 'mozo' false\r\t'foo*'\t\tmatch: 'foozo' true\r\t'foo*'\t\tmatch: 'bozo' false\r\t'foo*baz'\tmatch: 'foo23baz' true\r\t'foo*baz'\tmatch: 'foobaz' true\r\t'foo*baz'\tmatch: 'foo23bazo' false\r\t'foo'\t\tmatch: 'Foo' true\r\t'foo*baz*zort' match: 'foobazort' false\r\t'foo*baz*zort' match: 'foobazzort' false\r\t'*foo#zort'\tmatch: 'afoo3zortthenfoo3zort' true\r\t'*foo*zort'\tmatch: 'afoodezortorfoo3zort' true\r\"! !\r\r!String methodsFor: 'comparing' stamp: 'di 2/27/98 12:19'!\rsameAs: aString \r\t\"Answer whether the receiver sorts equal to aString. The \r\tcollation sequence is ascii with case differences ignored.\"\r\r\t^ (self compare: self with: aString collated: CaseInsensitiveOrder) = 2! !\r\r!String methodsFor: 'comparing' stamp: 'di 11/19/1998 13:28'!\rstartingAt: keyStart match: text startingAt: textStart\r\t\"Answer whether text matches the pattern in this string.\r\tMatching ignores upper/lower case differences.\r\tWhere this string contains #, text may contain any character.\r\tWhere this string contains *, text may contain any sequence of characters.\"\r\t| anyMatch matchStart matchEnd i matchStr j ii jj |\r\ti _ keyStart.\r\tj _ textStart.\r\r\t\"Check for any #'s\"\r\t[i > self size ifTrue: [^ j > text size \"Empty key matches only empty string\"].\r\t(self at: i) = $#] whileTrue:\r\t\t[\"# consumes one char of key and one char of text\"\r\t\tj > text size ifTrue: [^ false \"no more text\"].\r\t\ti _ i+1.  j _ j+1].\r\r\t\"Then check for *\"\r\t(self at: i) = $*\r\t\tifTrue: [i = self size ifTrue:\r\t\t\t\t\t[^ true \"Terminal * matches all\"].\r\t\t\t\t\"* means next match string can occur anywhere\"\r\t\t\t\tanyMatch _ true.\r\t\t\t\tmatchStart _ i + 1]\r\t\tifFalse: [\"Otherwise match string must occur immediately\"\r\t\t\t\tanyMatch _ false.\r\t\t\t\tmatchStart _ i].\r\r\t\"Now determine the match string\"\r\tmatchEnd _ self size.\r\t(ii _ self indexOf: $* startingAt: matchStart) > 0 ifTrue:\r\t\t[ii = 1 ifTrue: [self error: '** not valid -- use * instead'].\r\t\tmatchEnd _ ii-1].\r\t(ii _ self indexOf: $# startingAt: matchStart) > 0 ifTrue:\r\t\t[ii = 1 ifTrue: [self error: '*# not valid -- use #* instead'].\r\t\tmatchEnd _ matchEnd min: ii-1].\r\tmatchStr _ self copyFrom: matchStart to: matchEnd.\r\r\t\"Now look for the match string\"\r\t[jj _ text findString: matchStr startingAt: j caseSensitive: false.\r\tanyMatch ifTrue: [jj > 0] ifFalse: [jj = j]]\r\t\twhileTrue:\r\t\t[\"Found matchStr at jj.  See if the rest matches...\"\r\t\t(self startingAt: matchEnd+1 match: text startingAt: jj + matchStr size) ifTrue:\r\t\t\t[^ true \"the rest matches -- success\"].\r\t\t\"The rest did not match.\"\r\t\tanyMatch ifFalse: [^ false].\r\t\t\"Preceded by * -- try for a later match\"\r\t\tj _ j+1].\r\t^ false \"Failed to find the match string\"! !\r\r\r!String methodsFor: 'copying'!\rcopyReplaceTokens: oldSubstring with: newSubstring \r\t\"Replace all occurrences of oldSubstring that are surrounded\r\tby non-alphanumeric characters\"\r\t^ self copyReplaceAll: oldSubstring with: newSubstring asTokens: true\r\t\"'File asFile Files File''s File' copyReplaceTokens: 'File' with: 'Snick'\"! !\r\r!String methodsFor: 'copying'!\rdeepCopy\r\t\"DeepCopy would otherwise mean make a copy of the character;  since \r\tcharacters are unique, just return a shallowCopy.\"\r\r\t^self shallowCopy! !\r\r!String methodsFor: 'copying' stamp: 'di 2/15/98 22:54'!\rpadded: leftOrRight to: length with: char\r\tleftOrRight = #left ifTrue:\r\t\t[^ (String new: (length - self size max: 0) withAll: char) , self].\r\tleftOrRight = #right ifTrue:\r\t\t[^ self , (String new: (length - self size max: 0) withAll: char)].! !\r\r\r!String methodsFor: 'converting' stamp: 'di 11/6/1998 13:47'!\radaptToCollection: rcvr andSend: selector\r\t\"If I am involved in arithmetic with a collection, convert me to a number.\"\r\r\t^ rcvr perform: selector with: self asNumber! !\r\r!String methodsFor: 'converting' stamp: 'di 11/9/1998 12:17'!\radaptToNumber: rcvr andSend: selector\r\t\"If I am involved in arithmetic with a number, convert me to a number.\"\r\r\t^ rcvr perform: selector with: self asNumber! !\r\r!String methodsFor: 'converting' stamp: 'di 11/6/1998 13:49'!\radaptToPoint: rcvr andSend: selector\r\t\"If I am involved in arithmetic with a point, convert me to a number.\"\r\r\t^ rcvr perform: selector with: self asNumber! !\r\r!String methodsFor: 'converting' stamp: 'di 11/6/1998 13:49'!\radaptToString: rcvr andSend: selector\r\t\"If I am involved in arithmetic with a string, convert us both to\r\tnumbers, and return the printString of the result.\"\r\r\t^ (rcvr asNumber perform: selector with: self asNumber) printString! !\r\r!String methodsFor: 'converting' stamp: 'sw 9/1/2000 10:39'!\rasCharacter\r\t\"Answer the receiver's first character, or '' if none.  Idiosyncratic, provisional.\"\r\r\t^ self size > 0 ifTrue: [self first] ifFalse: [$]! !\r\r!String methodsFor: 'converting' stamp: 'brp 8/23/2003 23:58'!\rasDate\r\t\"Many allowed forms, see Date>>#readFrom:\"\r\r\t^ Date fromString: self! !\r\r!String methodsFor: 'converting' stamp: 'brp 7/27/2003 17:28'!\rasDateAndTime\r\n\r\n\t\"Convert from UTC format\" \t^ DateAndTime fromString: self! !\r\r!String methodsFor: 'converting'!\rasDisplayText\r\t\"Answer a DisplayText whose text string is the receiver.\"\r\r\t^DisplayText text: self asText! !\r\r!String methodsFor: 'converting' stamp: 'brp 5/16/2003 11:59'!\rasDuration\r\n\t\"convert from [nnnd]hh:mm:ss[.nanos] format. [] implies optional elements\"\r\n\r\n\t^ Duration fromString: self\r\n! !\r\r!String methodsFor: 'converting'!\rasFileName\r\t\"Answer a String made up from the receiver that is an acceptable file \r\tname.\"\r\r\t^FileDirectory checkName: self fixErrors: true! !\r\r!String methodsFor: 'converting' stamp: 'acg 9/11/1999 15:43'!\rasFourCode\r\r\t|result|\r\tself size = 4 ifFalse: [^self error: 'must be exactly four characters'].\r\tresult _ self inject: 0 into: [:val :each | 256 * val + each asciiValue].\r\t(result bitAnd: 16r80000000) = 0 \r\t\tifFalse: [self error: 'cannot resolve fourcode'].\r\t(result bitAnd: 16r40000000) = 0 ifFalse: [^result - 16r80000000].\r\t^result! !\r\r!String methodsFor: 'converting' stamp: 'nk 2/21/2001 20:06'!\rasHex\r\t| stream |\r\tstream _ WriteStream on: (String new: self size * 2).\r\tself do: [ :ch | stream nextPutAll: ch hex ].\r\t^stream contents! !\r\r!String methodsFor: 'converting' stamp: 'sma 3/11/2000 17:25'!\rasHtml\r\t\"Do the basic character conversion for HTML.  Leave all original return \r\tand tabs in place, so can conver back by simply removing bracked \r\tthings. 4/4/96 tk\"\r\t| temp |\r\ttemp _ self copyReplaceAll: '&' with: '&amp;'.\r\tHtmlEntities keysAndValuesDo:\r\t\t[:entity :char |\r\t\tchar = $& ifFalse:\r\t\t\t[temp _ temp copyReplaceAll: char asString with: '&' , entity , ';']].\r\ttemp _ temp copyReplaceAll: '\t' with: '\t<IMG SRC=\"tab.gif\" ALT=\"    \">'.\r\ttemp _ temp copyReplaceAll: '\r' with: '\r<BR>'.\r\t^ temp\r\r\"\r\t'A<&>B' asHtml\r\"! !\r\r!String methodsFor: 'converting' stamp: 'ls 9/5/1998 01:19'!\rasIRCLowercase\r\t\"Answer a String made up from the receiver whose characters are all \r\tlowercase, where 'lowercase' is by IRC's definition\"\r\r\t^self collect: [ :c | c asIRCLowercase ]! !\r\r!String methodsFor: 'converting' stamp: 'sw 9/5/2000 09:03'!\rasIdentifier: shouldBeCapitalized\r\t\"Return a legal identifier, with first character in upper case if shouldBeCapitalized is true, else lower case.  This will always return a legal identifier, even for an empty string\"\r\r\t| aString firstChar firstLetterPosition |\r\taString _ self select: [:el | el isAlphaNumeric].\r\tfirstLetterPosition _ aString findFirst: [:ch | ch isLetter].\r\taString _ firstLetterPosition == 0\r\t\tifFalse:\r\t\t\t[aString copyFrom: firstLetterPosition to: aString size]\r\t\tifTrue:\r\t\t\t['a', aString].\r\tfirstChar _ shouldBeCapitalized ifTrue: [aString first asUppercase] ifFalse: [aString first asLowercase].\r\r\t^ firstChar asString, (aString copyFrom: 2 to: aString size)\r\"\r'234Fred987' asIdentifier: false\r'235Fred987' asIdentifier: true\r'' asIdentifier: true\r'()87234' asIdentifier: false\r'())z>=PPve889  U >' asIdentifier: false\r\r\"! !\r\r!String methodsFor: 'converting' stamp: 'sw 9/1/2000 10:40'!\rasInteger \r\t\"Answer the Integer created by interpreting the receiver as the string representation of an integer.  Answer nil if no digits, else find the first digit and then all consecutive digits after that\"\r\r\t| startPosition tail endPosition |\r\tstartPosition _ self findFirst: [:ch | ch isDigit].\r\tstartPosition == 0 ifTrue: [^ nil].\r\ttail _ self copyFrom: startPosition to: self size.\r\tendPosition _ tail findFirst: [:ch | ch isDigit not].\r\tendPosition == 0 ifTrue: [endPosition _ tail size + 1].\r\t^ Number readFromString: (tail copyFrom: 1 to: endPosition - 1)\r\r\"\r'1796exportFixes-tkMX' asInteger\r'1848recentLogFile-sw'  asInteger\r'donald' asInteger\r'abc234def567' asInteger\r\"! !\r\r!String methodsFor: 'converting' stamp: 'sw 5/3/1998 23:19'!\rasLegalSelector\r\t| toUse |\r\ttoUse _ ''.\r\tself do:\r\t\t[:char | char isAlphaNumeric ifTrue: [toUse _ toUse copyWith: char]].\r\t(self size == 0 or: [self first isLetter not])\r\t\tifTrue:\t\t[toUse _ 'v', toUse].\r\r\t^ toUse withFirstCharacterDownshifted\r\r\"'234znak 43 ) 2' asLegalSelector\"! !\r\r!String methodsFor: 'converting' stamp: 'sma 6/12/2000 11:40'!\rasLowercase\r\t\"Answer a String made up from the receiver whose characters are all \r\tlowercase.\"\r\r\t^ self copy asString translateToLowercase! !\r\r!String methodsFor: 'converting'!\rasNumber \r\t\"Answer the Number created by interpreting the receiver as the string \r\trepresentation of a number.\"\r\r\t^Number readFromString: self! !\r\r!String methodsFor: 'converting'!\rasPacked\r\t\"Convert to a longinteger that describes the string\"\r\t^ self inject: 0 into: [ :pack :next | pack _ pack * 256 + next asInteger ].! !\r\r!String methodsFor: 'converting'!\rasParagraph\r\t\"Answer a Paragraph whose text string is the receiver.\"\r\r\t^Paragraph withText: self asText! !\r\r!String methodsFor: 'converting' stamp: 'sw 8/3/2002 04:32'!\rasSignedInteger\r\t\"Answer the Integer created by interpreting the receiver as the string representation of an integer, possibly with a leading minus sign.  Answer nil if no digits, else find the first digit and then all consecutive digits after that\"\r\r\t| startPosition tail endPosition |\r\tstartPosition _ self findFirst: [:ch | ch isDigit or: [ch == $-]].\r\tstartPosition == 0 ifTrue: [^ nil].\r\ttail _ self copyFrom: startPosition to: self size.\r\tendPosition _ tail findFirst: [:ch | ch isDigit not and: [ch ~~ $-]].\r\tendPosition == 0 ifTrue: [endPosition _ tail size + 1].\r\t^ Number readFromString: (tail copyFrom: 1 to: endPosition - 1)\r\r\"\r'znak -58 to wit' asSignedInteger\r\"! !\r\r!String methodsFor: 'converting' stamp: 'ls 10/28/2003 12:24'!\rasSmalltalkComment\r\t\"return this string, munged so that it can be treated as a comment in Smalltalk code.  Quote marks are added to the beginning and end of the string, and whenever a solitary quote mark appears within the string, it is doubled\"\r\r\t^String streamContents:  [ :str |\r\t\t| quoteCount first |\r\r\t\tstr nextPut: $\".\r\t\r\t\tquoteCount := 0.\r\t\tfirst := true.\r\t\tself do: [ :char |\r\t\t\tchar = $\"\r\t\t\t\tifTrue: [\r\t\t\t\t\tfirst ifFalse: [\r\t\t\t\t\t\tstr nextPut: char.\r\t\t\t\t\t\tquoteCount := quoteCount + 1 ] ]\r\t\t\t\tifFalse: [\r\t\t\t\t\tquoteCount odd ifTrue: [\r\t\t\t\t\t\t\"add a quote to even the number of quotes in a row\"\r\t\t\t\t\t\tstr nextPut: $\" ].\r\t\t\t\t\tquoteCount := 0.\r\t\t\t\t\tstr nextPut: char ].\r\t\t\tfirst := false ]. \r\r\t\tquoteCount odd ifTrue: [\r\t\t\t\"check at the end\"\r\t\t\tstr nextPut: $\". ].\r\r\t\tstr nextPut: $\".\r\t].\r\t! !\r\r!String methodsFor: 'converting' stamp: 'jm 5/14/1998 10:40'!\rasString\r\t\"Answer this string.\"\r\r\t^ self\r! !\r\r!String methodsFor: 'converting' stamp: 'RAA 5/28/2001 06:19'!\rasStringOrText\r\t\"Answer this string.\"\r\r\t^ self\r! !\r\r!String methodsFor: 'converting'!\rasSymbol\r\t\"Answer the unique Symbol whose characters are the characters of the \r\tstring.\"\r\r\t^Symbol intern: self! !\r\r!String methodsFor: 'converting'!\rasText\r\t\"Answer a Text whose string is the receiver.\"\r\r\t^Text fromString: self! !\r\r!String methodsFor: 'converting' stamp: 'brp 8/24/2003 00:01'!\rasTime\r\t\"Many allowed forms, see Time>>readFrom:\"\r\r\t^ Time fromString: self.! !\r\r!String methodsFor: 'converting' stamp: 'brp 8/24/2003 00:02'!\rasTimeStamp\r\t\"Convert from obsolete TimeStamp format\"\r\r\n\t^ TimeStamp fromString: self! !\r\r!String methodsFor: 'converting' stamp: 'tk 4/13/2002 09:13'!\rasUnHtml\r\t\"Strip out all Html stuff (commands in angle brackets <>) and convert\rthe characters &<> back to their real value.  Leave actual cr and tab as\rthey were in text.\"\r\t| in out char rest did |\r\tin _ ReadStream on: self.\r\tout _ WriteStream on: (String new: self size).\r\t[in atEnd] whileFalse:\r\t\t[in peek = $<\r\t\t\tifTrue: [in unCommand] \t\"Absorb <...><...>\"\r\t\t\tifFalse: [(char _ in next) = $&\r\t\t\t\t\t\tifTrue: [rest _ in upTo: $;.\r\t\t\t\t\t\t\t\tdid _ out position.\r\t\t\t\t\t\t\t\trest = 'lt' ifTrue: [out nextPut: $<].\r\t\t\t\t\t\t\t\trest = 'gt' ifTrue: [out nextPut: $>].\r\t\t\t\t\t\t\t\trest = 'amp' ifTrue: [out nextPut: $&].\r\t\t\t\t\t\t\t\trest = 'deg' ifTrue: [out nextPut: $].\r\t\t\t\t\t\t\t\trest = 'quot' ifTrue: [out nextPut: $\"].\r\t\t\t\t\t\t\t\tdid = out position ifTrue: [\r\t\t\t\t\t\t\t\t\tself error: 'unknown encoded HTML char'.\r\t\t\t\t\t\t\t\t\t\"Please add it to this method\"]]\r\t\t\t\t\t\tifFalse: [out nextPut: char]].\r\t\t].\r\t^ out contents! !\r\r!String methodsFor: 'converting' stamp: 'SqR 6/13/2000 20:10'!\rasUppercase\r\t\"Answer a String made up from the receiver whose characters are all \r\tuppercase.\"\r\r\t^self copy asString translateToUppercase! !\r\r!String methodsFor: 'converting' stamp: 'ls 7/15/1998 18:40'!\rasUrlRelativeTo: aUrl\r\t^aUrl newFromRelativeText: self! !\r\r!String methodsFor: 'converting' stamp: 'di 2/2/98 12:59'!\raskIfAddStyle: priorMethod req: requestor\r\t^ self   \"we are a string with no text style\"! !\r\r!String methodsFor: 'converting' stamp: 'ls 9/10/1998 08:48'!\rcapitalized\r\t\"Return a copy with the first letter capitalized\"\r\t| cap |\r\tself isEmpty ifTrue: [ ^self copy ].\r\tcap _ self copy.\r\tcap at: 1 put: (cap at: 1) asUppercase.\r\t^ cap! !\r\r!String methodsFor: 'converting'!\rcompressWithTable: tokens\r\t\"Return a string with all substrings that occur in tokens replaced\r\tby a character with ascii code = 127 + token index.\r\tThis will work best if tokens are sorted by size.\r\tAssumes this string contains no characters > 127, or that they\r\tare intentionally there and will not interfere with this process.\"\r\t| str null finalSize start result ri c ts |\r\tnull _ Character value: 0.\r\tstr _ self copyFrom: 1 to: self size.  \"Working string will get altered\"\r\tfinalSize _ str size.\r\ttokens doWithIndex:\r\t\t[:token :tIndex |\r\t\tstart _ 1.\r\t\t[(start _ str findString: token startingAt: start) > 0]\r\t\t\twhileTrue:\r\t\t\t[ts _ token size.\r\t\t\t((start + ts) <= str size\r\t\t\t\tand: [(str at: start + ts) = $  and: [tIndex*2 <= 128]])\r\t\t\t\tifTrue: [ts _ token size + 1.  \"include training blank\"\r\t\t\t\t\t\tstr at: start put: (Character value: tIndex*2 + 127)]\r\t\t\t\tifFalse: [str at: start put: (Character value: tIndex + 127)].\r\t\t\tstr at: start put: (Character value: tIndex + 127).\r\t\t\t1 to: ts-1 do: [:i | str at: start+i put: null].\r\t\t\tfinalSize _ finalSize - (ts - 1).\r\t\t\tstart _ start + ts]].\r\tresult _ String new: finalSize.\r\tri _ 0.\r\t1 to: str size do:\r\t\t[:i | (c _ str at: i) = null ifFalse: [result at: (ri _ ri+1) put: c]].\r\t^ result! !\r\r!String methodsFor: 'converting' stamp: 'di 1/16/98 16:33'!\rcontractTo: smallSize\r\t\"return myself or a copy shortened by ellipsis to smallSize\"\r\t| leftSize |\r\tself size <= smallSize\r\t\tifTrue: [^ self].  \"short enough\"\r\tsmallSize < 5\r\t\tifTrue: [^ self copyFrom: 1 to: smallSize].    \"First N characters\"\r\tleftSize _ smallSize-2//2.\r\t^ self copyReplaceFrom: leftSize+1\t\t\"First N/2 ... last N/2\"\r\t\tto: self size - (smallSize - leftSize - 3)\r\t\twith: '...'\r\"\r\t'A clear but rather long-winded summary' contractTo: 18\r\"! !\r\r!String methodsFor: 'converting'!\rcorrectAgainst: wordList\r\t\"Correct the receiver: assume it is a misspelled word and return the (maximum of five) nearest words in the wordList.  Depends on the scoring scheme of alike:\"\r\t| results |\r\tresults _ self correctAgainst: wordList continuedFrom: nil.\r\tresults _ self correctAgainst: nil continuedFrom: results.\r\t^ results! !\r\r!String methodsFor: 'converting' stamp: 'ar 5/1/1999 05:01'!\rcorrectAgainst: wordList continuedFrom: oldCollection\r\t\"Like correctAgainst:.  Use when you want to correct against several lists, give nil as the first oldCollection, and nil as the last wordList.\"\r\r\t^ wordList isNil\r\t\tifTrue: [ self correctAgainstEnumerator: nil\r\t\t\t\t\tcontinuedFrom: oldCollection ]\r\t\tifFalse: [ self correctAgainstEnumerator: [ :action | wordList do: action without: nil]\r\t\t\t\t\tcontinuedFrom: oldCollection ]! !\r\r!String methodsFor: 'converting'!\rcorrectAgainstDictionary: wordDict continuedFrom: oldCollection\r\t\"Like correctAgainst:continuedFrom:.  Use when you want to correct against a dictionary.\"\r\r\t^ wordDict isNil\r\t\tifTrue: [ self correctAgainstEnumerator: nil\r\t\t\t\t\tcontinuedFrom: oldCollection ]\r\t\tifFalse: [ self correctAgainstEnumerator: [ :action | wordDict keysDo: action ]\r\t\t\t\t\tcontinuedFrom: oldCollection ]! !\r\r!String methodsFor: 'converting' stamp: 'ls 8/12/1998 23:31'!\rencodeForHTTP\r\t\"change dangerous characters to their %XX form, for use in HTTP transactions\"\r\t| encodedStream |\r\tencodedStream _ WriteStream on: (String new).\r\t\r\tself do: [ :c |\r\t\tc isSafeForHTTP ifTrue: [ encodedStream nextPut: c ] ifFalse: [\r\t\t\tencodedStream nextPut: $%.\r\t\t\tencodedStream nextPut: (c asciiValue // 16) asHexDigit.\r\t\t\tencodedStream nextPut: (c asciiValue \\\\ 16) asHexDigit.\r\t\t]\r\t].\r\t^encodedStream contents. ! !\r\r!String methodsFor: 'converting' stamp: 'tk 12/12/2001 15:11'!\rfindSelector\r\t\"Dan's code for hunting down selectors with keyword parts; while this doesn't give a true parse, in most cases it does what we want, in where it doesn't, we're none the worse for it.\"\r\t| sel possibleParens level n |\r\tsel _ self withBlanksTrimmed.\r\t(sel includes: $:) ifTrue:\r\t\t[sel _ sel copyReplaceAll: ':' with: ': '.\t\"for the style (aa max:bb) with no space\"\r\t\tpossibleParens _ sel findTokens: Character separators.\r\t\tsel _ String streamContents:\r\t\t\t[:s | level _ 0.\r\t\t\tpossibleParens do:\r\t\t\t\t[:token |\r\t\t\t\t(level = 0 and: [token endsWith: ':'])\r\t\t\t\t\tifTrue: [s nextPutAll: token]\r\t\t\t\t\tifFalse: [(n _ token occurrencesOf: $( ) > 0 ifTrue: [level _ level + n].\r\t\t\t\t\t\t\t(n _ token occurrencesOf: $[ ) > 0 ifTrue: [level _ level + n].\r\t\t\t\t\t\t\t(n _ token occurrencesOf: $] ) > 0 ifTrue: [level _ level - n].\r\t\t\t\t\t\t\t(n _ token occurrencesOf: $) ) > 0 ifTrue: [level _ level - n]]]]].\r\r\tsel isEmpty ifTrue: [^ nil].\r\tSymbol hasInterned: sel ifTrue:\r\t\t[:aSymbol | ^ aSymbol].\r\t^ nil! !\r\r!String methodsFor: 'converting' stamp: 'sw 8/20/1999 10:23'!\rinitialIntegerOrNil\r\t\"Answer the integer represented by the leading digits of the receiver, or nil if the receiver does not begin with a digit\"\r\t| firstNonDigit |\r\t(self size == 0 or: [self first isDigit not]) ifTrue: [^ nil].\r\tfirstNonDigit _ (self findFirst: [:m | m isDigit not]).\r\tfirstNonDigit = 0 ifTrue: [firstNonDigit _ self size + 1].\r\t^ (self copyFrom: 1  to: (firstNonDigit - 1)) asNumber\r\"\r'234Whoopie' initialIntegerOrNil\r'wimpy' initialIntegerOrNil\r'234' initialIntegerOrNil\r'2N' initialIntegerOrNil\r'2' initialIntegerOrNil\r'  89Ten ' initialIntegerOrNil\r'78 92' initialIntegerOrNil\r\"\r! !\r\r!String methodsFor: 'converting' stamp: 'di 4/22/2000 16:05'!\rkeywords\r\t\"Answer an array of the keywords that compose the receiver.\"\r\t| kwd char keywords |\r\tkeywords _ Array streamContents:\r\t\t[:kwds | kwd _ WriteStream on: (String new: 16).\r\t\t1 to: self size do:\r\t\t\t[:i |\r\t\t\tkwd nextPut: (char _ self at: i).\r\t\t\tchar = $: ifTrue: \r\t\t\t\t\t[kwds nextPut: kwd contents.\r\t\t\t\t\tkwd reset]].\r\t\tkwd isEmpty ifFalse: [kwds nextPut: kwd contents]].\r\t(keywords size >= 1 and: [(keywords at: 1) = ':']) ifTrue:\r\t\t[\"Has an initial keyword, as in #:if:then:else:\"\r\t\tkeywords _ keywords allButFirst].\r\t(keywords size >= 2 and: [(keywords at: keywords size - 1) = ':']) ifTrue:\r\t\t[\"Has a final keyword, as in #nextPut::andCR\"\r\t\tkeywords _ keywords copyReplaceFrom: keywords size - 1\r\t\t\t\t\t\t\t\tto: keywords size with: {':' , keywords last}].\r\t^ keywords! !\r\r!String methodsFor: 'converting' stamp: 'sw 5/30/2000 14:58'!\rnumericSuffix\r\t^ self stemAndNumericSuffix last\r\r\"\r'abc98' numericSuffix\r'98abc' numericSuffix\r\"! !\r\r!String methodsFor: 'converting' stamp: 'dgd 9/6/2003 18:48'!\ronlyLetters\r\t\"answer the receiver with only letters\"\r\t^ self select:[:each | each isLetter]! !\r\r!String methodsFor: 'converting' stamp: 'sma 5/20/2000 17:17'!\rromanNumber\r\t| value v1 v2 |\r\tvalue _ v1 _ v2 _ 0.\r\tself reverseDo:\r\t\t[:each |\r\t\tv1 _ #(1 5 10 50 100 500 1000) at: ('IVXLCDM' indexOf: each).\r\t\tv1 >= v2\r\t\t\tifTrue: [value _ value + v1]\r\t\t\tifFalse: [value _ value - v1].\r\t\tv2 _ v1].\r\t^ value! !\r\r!String methodsFor: 'converting'!\rsansPeriodSuffix\r\t\"Return a copy of the receiver up to, but not including, the first period.  If the receiver's *first* character is a period, then just return the entire receiver. \"\r\r\t| likely |\r\tlikely _ self copyUpTo: $..\r\t^ likely size == 0\r\t\tifTrue:\t[self]\r\t\tifFalse:\t[likely]! !\r\r!String methodsFor: 'converting' stamp: 'di 9/24/1999 12:31'!\rsplitInteger\r\t\"Answer an array that is a splitting of self into a string and an integer.\r\t'43Sam' ==> #(43 'Sam').  'Try90' ==> #('Try' 90)\r\tBUT NOTE: 'Sam' ==> #('Sam' 0), and '90' ==> #('' 90)  ie, (<string> <integer>).\"\r\r\t| pos |\r\t(pos _ self findFirst: [:d | d isDigit not]) == 0 ifTrue: [^ Array with: '' with: self asNumber].\r\tself first isDigit ifTrue: [\r\t\t^ Array with: (self copyFrom: 1 to: pos - 1) asNumber \r\t\t\t\twith: (self copyFrom: pos to: self size)].\r\t(pos _ self findFirst: [:d | d isDigit]) == 0 ifTrue: [^ Array with: self with: 0].\r\t^ Array with: (self copyFrom: 1 to: pos - 1)\r\t\t\twith: (self copyFrom: pos to: self size) asNumber! !\r\r!String methodsFor: 'converting'!\rstemAndNumericSuffix\r\t\"Parse the receiver into a string-valued stem and a numeric-valued suffix.  6/7/96 sw\"\r\r\t| stem suffix position |\r\r\tstem _ self.\r\tsuffix _ 0.\r\tposition _ 1.\r\t[stem endsWithDigit and: [stem size > 1]] whileTrue:\r\t\t[suffix _  stem last digitValue * position + suffix.\r\t\tposition _ position * 10.\r\t\tstem _ stem copyFrom: 1 to: stem size - 1].\r\t^ Array with: stem with: suffix\r\r\"'Fred2305' stemAndNumericSuffix\"! !\r\r!String methodsFor: 'converting' stamp: 'RAH 4/25/2000 19:49'!\rsubStrings\r\t\"Answer an array of the substrings that compose the receiver.\"\r\t#Collectn.\r\t\"Added 2000/04/08 For ANSI <readableString> protocol.\"\r\t^ self substrings! !\r\r!String methodsFor: 'converting' stamp: 'RAH 4/25/2000 19:49'!\rsubStrings: separators \r\t\"Answer an array containing the substrings in the receiver separated \r\tby the elements of separators.\"\r\t| char result sourceStream subString |\r\t#Collectn.\r\t\"Changed 2000/04/08 For ANSI <readableString> protocol.\"\r\t(separators allSatisfy: [:element | element isKindOf: Character])\r\t\tifFalse: [^ self error: 'separators must be Characters.'].\r\tsourceStream := ReadStream on: self.\r\tresult := OrderedCollection new.\r\tsubString := String new.\r\t[sourceStream atEnd]\r\t\twhileFalse: \r\t\t\t[char := sourceStream next.\r\t\t\t(separators includes: char)\r\t\t\t\tifTrue: [subString notEmpty\r\t\t\t\t\t\tifTrue: \r\t\t\t\t\t\t\t[result add: subString copy.\r\t\t\t\t\t\t\tsubString := String new]]\r\t\t\t\tifFalse: [subString := subString , (String with: char)]].\r\tsubString notEmpty ifTrue: [result add: subString copy].\r\t^ result asArray! !\r\r!String methodsFor: 'converting' stamp: 'ls 1/3/1999 13:36'!\rsubstrings\r\t\"Answer an array of the substrings that compose the receiver.\"\r\t| result end beginning |\r\r\tresult _ WriteStream on: (Array new: 10).\r\r\r\r\tend _ 0.\r\t\"find one substring each time through this loop\"\r\t[ \r\t\t\"find the beginning of the next substring\"\r\t\tbeginning _ self indexOfAnyOf: CSNonSeparators startingAt: end+1 ifAbsent: [ nil ].\r\t\tbeginning ~~ nil ] \r\twhileTrue: [\r\t\t\"find the end\"\r\t\tend _ self indexOfAnyOf: CSSeparators startingAt: beginning ifAbsent: [ self size + 1 ].\r\t\tend _ end - 1.\r\r\t\tresult nextPut: (self copyFrom: beginning to: end).\r\r\t].\r\r\r\t^result contents! !\r\r!String methodsFor: 'converting' stamp: 'sw 11/25/96'!\rsurroundedBySingleQuotes\r\t\"Answer the receiver with leading and trailing quotes.  \"\r\r\t^ $' asString, self, $' asString! !\r\r!String methodsFor: 'converting' stamp: 'ls 8/15/1998 10:31'!\rtranslateFrom: start  to: stop  table: table\r\t\"translate the characters in the string by the given table, in place\"\r\tString translate: self  from: start to: stop table: table! !\r\r!String methodsFor: 'converting' stamp: 'ls 8/18/1998 07:44'!\rtranslateToLowercase\r\t\"Translate all characters to lowercase, in place\"\r\r\tself translateWith: LowercasingTable! !\r\r!String methodsFor: 'converting' stamp: 'SqR 6/13/2000 20:10'!\rtranslateToUppercase\r\t\"Translate all characters to lowercase, in place\"\r\r\tself translateWith: UppercasingTable! !\r\r!String methodsFor: 'converting' stamp: 'ls 8/15/1998 08:30'!\rtranslateWith: table\r\t\"translate the characters in the string by the given table, in place\"\r\t^self translateFrom: 1 to: self size table: table! !\r\r!String methodsFor: 'converting'!\rtruncateTo: smallSize\r\t\"return myself or a copy shortened to smallSize.  1/18/96 sw\"\r\r\t^ self size <= smallSize\r\t\tifTrue:\r\t\t\t[self]\r\t\tifFalse:\r\t\t\t[self copyFrom: 1 to: smallSize]! !\r\r!String methodsFor: 'converting' stamp: 'sw 9/2/1998 17:09'!\rtruncateWithElipsisTo: maxLength\r\t\"Return myself or a copy suitably shortened but with elipsis added\"\r\r\t^ self size <= maxLength\r\t\tifTrue:\r\t\t\t[self]\r\t\tifFalse:\r\t\t\t[(self copyFrom: 1 to: (maxLength - 3)), '...']\r\r\r\t\"'truncateWithElipsisTo:' truncateWithElipsisTo: 20\"! !\r\r!String methodsFor: 'converting' stamp: 'sw 10/26/2000 10:00'!\runparenthetically\r\t\"If the receiver starts with (..( and ends with matching )..), strip them\"\r\r\t| curr |\r\tcurr _ self.\r\t[((curr first == $() and: [curr last == $)])] whileTrue:\r\t\t[curr _ curr copyFrom: 2 to: (curr size - 1)].\r\r\t^ curr\r\r\"\r\r'((fred the bear))' unparenthetically\r\r\"\r\t\t! !\r\r!String methodsFor: 'converting' stamp: 'bolot 11/3/1999 17:35'!\rwithBlanksCondensed\r\t\"Return a copy of the receiver with leading/trailing blanks removed\r\t and consecutive white spaces condensed.\"\r\r\t| trimmed lastBlank |\r\ttrimmed _ self withBlanksTrimmed.\r\t^String streamContents: [:stream |\r\t\tlastBlank _ false.\r\t\ttrimmed do: [:c | (c isSeparator and: [lastBlank]) ifFalse: [stream nextPut: c].\r\t\t\tlastBlank _ c isSeparator]].\r\r\t\" ' abc  d   ' withBlanksCondensed\"\r! !\r\r!String methodsFor: 'converting' stamp: 'jm 5/14/1998 10:26'!\rwithBlanksTrimmed\r\t\"Return a copy of the receiver from which leading and trailing blanks have been trimmed.\"\r\r\t| first |\r\tfirst _ self findFirst: [:c | c isSeparator not].\r\tfirst = 0 ifTrue: [^ ''].  \"no non-separator character\"\r\t^ self\r\t\tcopyFrom: first\r\t\tto: (self findLast: [:c | c isSeparator not])\r\r\t\" ' abc  d   ' withBlanksTrimmed\"\r! !\r\r!String methodsFor: 'converting' stamp: 'sw 6/6/2002 18:24'!\rwithFirstCharacterDownshifted\r\t\"Answer an object like the receiver but with first character downshifted if necesary\"\r\t\"'MElViN' withFirstCharacterDownshifted\"\r\t\"#Will withFirstCharacterDownshifted\"\r\t| answer |\r\tself isEmpty ifTrue: [^ self].\r\tanswer _ self isString\r\t\t\t\tifTrue: [\"don't change receiver\"\r\t\t\t\t\tself copy]\r\t\t\t\tifFalse: [self asString].\r\tanswer at: 1 put: (answer at: 1) asLowercase.\r\t^ self isString\r\t\tifTrue: [answer]\r\t\tifFalse: [answer as: self class]! !\r\r!String methodsFor: 'converting' stamp: 'tk 3/28/1999 22:44'!\rwithNoLineLongerThan: aNumber\r\t\"Answer a string with the same content as receiver, but rewrapped so that no line has more characters than the given number\"\r\t| listOfLines currentLast currentStart resultString putativeLast putativeLine crPosition |\r\taNumber isNumber not | (aNumber < 1) ifTrue: [self error: 'too narrow'].\r\tlistOfLines _ OrderedCollection new.\r\tcurrentLast _ 0.\r\t[currentLast < self size] whileTrue:\r\t\t[currentStart _ currentLast + 1.\r\t\tputativeLast _ (currentStart + aNumber - 1) min: self size.\r\t\tputativeLine _ self copyFrom: currentStart to: putativeLast.\r\t\t(crPosition _ putativeLine indexOf: Character cr) > 0 ifTrue:\r\t\t\t[putativeLast _ currentStart + crPosition - 1.\r\t\t\tputativeLine _ self copyFrom: currentStart to: putativeLast].\r\t\tcurrentLast _ putativeLast == self size\r\t\t\tifTrue:\r\t\t\t\t[putativeLast]\r\t\t\tifFalse:\r\t\t\t\t[currentStart + putativeLine lastSpacePosition - 1].\r\t\tcurrentLast <= currentStart ifTrue:\r\t\t\t[\"line has NO spaces; baleout!!\"\r\t\t\tcurrentLast _ putativeLast].\r\t\tlistOfLines add: (self copyFrom: currentStart to: currentLast) withBlanksTrimmed].\r\r\tlistOfLines size > 0 ifFalse: [^ ''].\r\tresultString _ listOfLines first.\r\t2 to: listOfLines size do:\r\t\t[:i | resultString _ resultString, String cr, (listOfLines at: i)].\r\t^ resultString\r\r\"#(5 7 20) collect:\r\t[:i | 'Fred the bear went down to the brook to read his book in silence' withNoLineLongerThan: i]\"! !\r\r!String methodsFor: 'converting' stamp: 'ls 8/20/1998 10:43'!\rwithSeparatorsCompacted\r\t\"replace each sequences of whitespace by a single space character\"\r\t| out pos textEnd |\r\r\tself isEmpty ifTrue: [ ^self ].\r\r\tout _ WriteStream on: (String new: self size).\r\tpos _ 1.   \"current position in a scan through aString\"\r\r\r\t\"handle the case of initial separators\"\r\tself first isSeparator ifTrue: [\r\t\tout nextPut: Character space.\r\t\tpos _ self indexOfAnyOf: CSNonSeparators ifAbsent: [ self size + 1 ] ].\r\r\r\t\"central loop: handle a segment of text, followed possibly by a segment of whitespace\"\r\t[ pos <= self size ] whileTrue: [ \r\t\t\"handle a segment of text...\"\r\r\t\ttextEnd _ self \r\t\t\tindexOfAnyOf: CSSeparators\r\t\t\tstartingAt: pos \r\t\t\tifAbsent: [ self size + 1 ].\r\r\t\ttextEnd _ textEnd - 1.\r\t\tout nextPutAll: (self copyFrom: pos to: textEnd).\r\t\tpos _ textEnd + 1.\r\r\t\tpos <= self size ifTrue: [\r\t\t\tpos _ self \r\t\t\t\tindexOfAnyOf: CSNonSeparators\r\t\t\t\tstartingAt: pos\r\t\t\t\tifAbsent: [ self size + 1 ].\r\r\t\t\tout nextPut: Character space  ] ].\r\r\t^out contents! !\r\r!String methodsFor: 'converting' stamp: 'sw 1/8/1999 14:45'!\rwithoutLeadingDigits\r\t\"Answer the portion of the receiver that follows any leading series of digits and blanks.  If the receiver consists entirely of digits and blanks, return an empty string\"\r\t| firstNonDigit |\r\tfirstNonDigit _ (self findFirst: [:m | m isDigit not and: [m ~~ $ ]]).\r\t^ firstNonDigit > 0\r\t\tifTrue:\r\t\t\t[self copyFrom: firstNonDigit  to: self size]\r\t\tifFalse:\r\t\t\t['']\r\r\"\r'234Whoopie' withoutLeadingDigits\r' 4321 BlastOff!!' withoutLeadingDigits\r'wimpy' withoutLeadingDigits\r'  89Ten ' withoutLeadingDigits\r'78 92' withoutLeadingDigits\r\"\r! !\r\r!String methodsFor: 'converting' stamp: 'bf 11/24/1998 19:58'!\rwithoutTrailingBlanks\r\t\"Return a copy of the receiver from which trailing blanks have been trimmed.\"\r\r\t| last |\r\tlast _ self findLast: [:c | c isSeparator not].\r\tlast = 0 ifTrue: [^ ''].  \"no non-separator character\"\r\t^ self copyFrom: 1 to: last\r\r\t\" ' abc  d   ' withoutTrailingBlanks\"\r! !\r\r!String methodsFor: 'converting'!\rwithoutTrailingDigits\r\t\"Answer the portion of the receiver that precedes any trailing series of digits and blanks.  If the receiver consists entirely of digits and blanks, return an empty string\"\r\t| firstDigit |\r\tfirstDigit _ (self findFirst: [:m | m isDigit or: [m == $ ]]).\r\t^ firstDigit > 0\r\t\tifTrue:\r\t\t\t[self copyFrom: 1   to: firstDigit-1]\r\t\tifFalse:\r\t\t\t[self]\r\r\"\r'Whoopie234' withoutTrailingDigits\r' 4321 BlastOff!!' withoutLeadingDigits\r'wimpy' withoutLeadingDigits\r'  89Ten ' withoutLeadingDigits\r'78 92' withoutLeadingDigits\r\"\r! !\r\r\r!String methodsFor: 'displaying' stamp: 'di 5/28/1998 13:25'!\rdisplayAt: aPoint \r\t\"Display the receiver as a DisplayText at aPoint on the display screen.\"\r\r\tself displayOn: Display at: aPoint! !\r\r!String methodsFor: 'displaying'!\rdisplayOn: aDisplayMedium\r\t\"Display the receiver on the given DisplayMedium.  5/16/96 sw\"\r\r\tself displayOn: aDisplayMedium at: 0 @ 0! !\r\r!String methodsFor: 'displaying' stamp: 'sw 2/5/2002 20:33'!\rdisplayOn: aDisplayMedium at: aPoint \r\t\"Show a representation of the receiver as a DisplayText at location aPoint on aDisplayMedium, using black-colored text.\"\r\r\tself displayOn: aDisplayMedium at: aPoint textColor: Color black! !\r\r!String methodsFor: 'displaying' stamp: 'sw 2/5/2002 20:33'!\rdisplayOn: aDisplayMedium at: aPoint textColor: aColor\r\t\"Show a representation of the receiver as a DisplayText at location aPoint on aDisplayMedium, rendering the text in the designated color\"\r\r\t(self asDisplayText foregroundColor: (aColor ifNil: [Color black]) backgroundColor: Color white)\r\t\tdisplayOn: aDisplayMedium at: aPoint! !\r\r!String methodsFor: 'displaying' stamp: 'RAA 5/15/2000 11:00'!\rdisplayProgressAt: aPoint from: minVal to: maxVal during: workBlock \r\t\"Display this string as a caption over a progress bar while workBlock is evaluated.\r\rEXAMPLE (Select next 6 lines and Do It)\r'Now here''s some Real Progress'\r\tdisplayProgressAt: Sensor cursorPoint\r\tfrom: 0 to: 10\r\tduring: [:bar |\r\t1 to: 10 do: [:x | bar value: x.\r\t\t\t(Delay forMilliseconds: 500) wait]].\r\rHOW IT WORKS (Try this in any other language :-)\rSince your code (the last 2 lines in the above example) is in a block,\rthis method gets control to display its heading before, and clean up \rthe screen after, its execution.\rThe key, though, is that the block is supplied with an argument,\rnamed 'bar' in the example, which will update the bar image every \rit is sent the message value: x, where x is in the from:to: range.\r\"\r\t^ProgressInitiationException \r\t\tdisplay: self\r\t\tat: aPoint \r\t\tfrom: minVal \r\t\tto: maxVal \r\t\tduring: workBlock! !\r\r\r!String methodsFor: 'printing' stamp: 'sw 9/27/2001 17:26'!\rbasicType\r\t\"Answer a symbol representing the inherent type of the receiver\"\r\r\t\"Number String Boolean player collection sound color etc\"\r\t^ #String! !\r\r!String methodsFor: 'printing' stamp: 'MPW 1/1/1901 00:22'!\rencodeDoublingQuoteOn: aStream \r\t\"Print inside string quotes, doubling inbedded quotes.\"\r\t| x |\r\taStream print: $'.\r\t1 to: self size do:\r\t\t[:i |\r\t\taStream print: (x _ self at: i).\r\t\tx == $' ifTrue: [aStream print: x]].\r\taStream print: $'! !\r\r!String methodsFor: 'printing'!\risLiteral\r\r\t^true! !\r\r!String methodsFor: 'printing' stamp: 'sma 6/1/2000 09:48'!\rprintOn: aStream \r\t\"Print inside string quotes, doubling inbedded quotes.\"\r\r\tself storeOn: aStream! !\r\r!String methodsFor: 'printing'!\rstoreOn: aStream \r\t\"Print inside string quotes, doubling inbedded quotes.\"\r\t| x |\r\taStream nextPut: $'.\r\t1 to: self size do:\r\t\t[:i |\r\t\taStream nextPut: (x _ self at: i).\r\t\tx == $' ifTrue: [aStream nextPut: x]].\r\taStream nextPut: $'! !\r\r!String methodsFor: 'printing'!\rstringRepresentation\r\t\"Answer a string that represents the receiver.  For most objects this is simply its printString, but for strings themselves, it's themselves, to avoid the superfluous extra pair of quotes.  6/12/96 sw\"\r\r\t^ self ! !\r\r\r!String methodsFor: 'private' stamp: 'di 12/1/2000 14:55'!\rcorrectAgainstEnumerator: wordBlock continuedFrom: oldCollection\r\t\"The guts of correction, instead of a wordList, there is a block that should take another block and enumerate over some list with it.\"\r\r\t| choices scoreMin results score maxChoices |\r\tscoreMin _ self size // 2 min: 3.\r\tmaxChoices _ 10.\r\toldCollection isNil\r\t\tifTrue: [ choices _ SortedCollection sortBlock: [ :x :y | x value > y value ] ]\r\t\tifFalse: [ choices _ oldCollection ].\r\twordBlock isNil\r\t\tifTrue:\r\t\t\t[ results _ OrderedCollection new.\r\t\t\t1 to: (maxChoices min: choices size) do: [ :i | results add: (choices at: i) key ] ]\r\t\tifFalse:\r\t\t\t[ wordBlock value: [ :word |\r\t\t\t\t(score _ self alike: word) >= scoreMin ifTrue:\r\t\t\t\t\t[ choices add: (Association key: word value: score).\r\t\t\t\t\t\t(choices size >= maxChoices) ifTrue: [ scoreMin _ (choices at: maxChoices) value] ] ].\r\t\t\tresults _ choices ].\r\t^ results! !\r\r!String methodsFor: 'private' stamp: 'dgd 8/27/2003 19:42'!\revaluateExpression: aString parameters: aCollection \r\t\"private - evaluate the expression aString with  \r\taCollection as the parameters and answer the  \r\tevaluation result as an string\"\r\t| index |\r\tindex := ('0' , aString) asNumber.\r\r\tindex isZero\r\t\tifTrue: [^ '[invalid subscript: {1}]' format: {aString}].\r\r\tindex > aCollection size\r\t\tifTrue: [^ '[subscript is out of bounds: {1}]' format: {aString}].\r\r\t^ (aCollection at: index) asString! !\r\r!String methodsFor: 'private' stamp: 'dgd 8/27/2003 19:41'!\rgetEnclosedExpressionFrom: aStream \r\t\"private - get the expression enclosed between '{' and \r\t'}' and remove all the characters from the stream\"\r\t| result currentChar |\r\tresult := String new writeStream.\r\r\t[aStream atEnd \r\t\tor: [(currentChar := aStream next) == $}]]\r\t\twhileFalse: [result nextPut: currentChar].\r\r\t^ result contents withBlanksTrimmed! !\r\r!String methodsFor: 'private'!\rreplaceFrom: start to: stop with: replacement startingAt: repStart \r\t\"Primitive. This destructively replaces elements from start to stop in the receiver starting at index, repStart, in the collection, replacement. Answer the receiver. Range checks are performed in the primitive only. Optional. See Object documentation whatIsAPrimitive.\"\r\t<primitive: 105>\r\tsuper replaceFrom: start to: stop with: replacement startingAt: repStart! !\r\r!String methodsFor: 'private'!\rstringhash\r\t^self hash! !\r\r\r!String methodsFor: 'system primitives' stamp: 'ar 2/3/2001 16:12'!\rcompare: string1 with: string2 collated: order\r\t\"Return 1, 2 or 3, if string1 is <, =, or > string2, with the collating order of characters given by the order array.\"\r\r\t| len1 len2 c1 c2 |\r\t<primitive: 'primitiveCompareString' module: 'MiscPrimitivePlugin'>\r\tself var: #string1 declareC: 'unsigned char *string1'.\r\tself var: #string2 declareC: 'unsigned char *string2'.\r\tself var: #order declareC: 'unsigned char *order'.\r\r\tlen1 _ string1 size.\r\tlen2 _ string2 size.\r\t1 to: (len1 min: len2) do:\r\t\t[:i |\r\t\tc1 _ order at: (string1 basicAt: i) + 1.\r\t\tc2 _ order at: (string2 basicAt: i) + 1.\r\t\tc1 = c2 ifFalse: \r\t\t\t[c1 < c2 ifTrue: [^ 1] ifFalse: [^ 3]]].\r\tlen1 = len2 ifTrue: [^ 2].\r\tlen1 < len2 ifTrue: [^ 1] ifFalse: [^ 3].\r! !\r\r!String methodsFor: 'system primitives' stamp: 'ar 2/3/2001 16:13'!\rfindSubstring: key in: body startingAt: start matchTable: matchTable\r\t\"Answer the index in the string body at which the substring key first occurs, at or beyond start.  The match is determined using matchTable, which can be used to effect, eg, case-insensitive matches.  If no match is found, zero will be returned.\r\r\tThe algorithm below is not optimum -- it is intended to be translated to C which will go so fast that it wont matter.\"\r\t| index |\r\t<primitive: 'primitiveFindSubstring' module: 'MiscPrimitivePlugin'>\r\tself var: #key declareC: 'unsigned char *key'.\r\tself var: #body declareC: 'unsigned char *body'.\r\tself var: #matchTable declareC: 'unsigned char *matchTable'.\r\r\tkey size = 0 ifTrue: [^ 0].\r\tstart to: body size - key size + 1 do:\r\t\t[:startIndex |\r\t\tindex _ 1.\r\t\t\t[(matchTable at: (body at: startIndex+index-1) asciiValue + 1)\r\t\t\t\t= (matchTable at: (key at: index) asciiValue + 1)]\r\t\t\t\twhileTrue:\r\t\t\t\t[index = key size ifTrue: [^ startIndex].\r\t\t\t\tindex _ index+1]].\r\t^ 0\r\"\r' ' findSubstring: 'abc' in: 'abcdefabcd' startingAt: 1 matchTable: CaseSensitiveOrder 1\r' ' findSubstring: 'abc' in: 'abcdefabcd' startingAt: 2 matchTable: CaseSensitiveOrder 7\r' ' findSubstring: 'abc' in: 'abcdefabcd' startingAt: 8 matchTable: CaseSensitiveOrder 0\r' ' findSubstring: 'abc' in: 'abcdefABcd' startingAt: 2 matchTable: CaseSensitiveOrder 0\r' ' findSubstring: 'abc' in: 'abcdefABcd' startingAt: 2 matchTable: CaseInsensitiveOrder 7\r\"! !\r\r!String methodsFor: 'system primitives' stamp: 'di 12/3/2000 09:34'!\rnumArgs \r\t\"Answer either the number of arguments that the receiver would take if considered a selector.  Answer -1 if it couldn't be a selector.  Note that currently this will answer -1 for anything begining with an uppercase letter even though the system will accept such symbols as selectors.  It is intended mostly for the assistance of spelling correction.\"\r\r\t| firstChar numColons excess start ix |\r\tself size = 0 ifTrue: [^ -1].\r\tfirstChar _ self at: 1.\r\t(firstChar isLetter or: [firstChar = $:]) ifTrue:\r\t\t[\"Fast reject if any chars are non-alphanumeric\"\r\t\t(self findSubstring: '~' in: self startingAt: 1 matchTable: Tokenish) > 0 ifTrue: [^ -1].\r\t\t\"Fast colon count\"\r\t\tnumColons _ 0.  start _ 1.\r\t\t[(ix _ self findSubstring: ':' in: self startingAt: start matchTable: CaseSensitiveOrder) > 0]\r\t\t\twhileTrue:\r\t\t\t\t[numColons _ numColons + 1.\r\t\t\t\tstart _ ix + 1].\r\t\tnumColons = 0 ifTrue: [^ 0].\r\t\tfirstChar = $:\r\t\t\tifTrue: [excess _ 2 \"Has an initial keyword, as #:if:then:else:\"]\r\t\t\tifFalse: [excess _ 0].\r\t\tself last = $:\r\t\t\tifTrue: [^ numColons - excess]\r\t\t\tifFalse: [^ numColons - excess - 1 \"Has a final keywords as #nextPut::andCR\"]].\r\tfirstChar isSpecial ifTrue:\r\t\t[self size = 1 ifTrue: [^ 1].\r\t\t2 to: self size do: [:i | (self at: i) isSpecial ifFalse: [^ -1]].\r\t\t^ 1].\r\t^ -1.! !\r\r\r!String methodsFor: 'Celeste'!\rwithCRs\r\t\"Return a copy of the receiver in which backslash (\\) characters have been replaced with carriage returns.\"\r\r\t^ self collect: [ :c | c = $\\ ifTrue: [ Character cr ] ifFalse: [ c ]].! !\r\r\r!String methodsFor: 'internet' stamp: 'sma 3/11/2000 20:40'!\risoToSqueak\r\t^ self collect: [:each | each isoToSqueak]! !\r\r!String methodsFor: 'internet' stamp: 'JO 9/2/2002 11:54'!\risoToUtf8\r\t\"Convert ISO 8559-1 to UTF-8\"\r\t| s v |\r\ts _ WriteStream on: (String new: self size).\r\r\tself do: [:c |\r\t\tv _ c asciiValue.\r\t\t(v > 128)\r\t\t\tifFalse: [s nextPut: c]\r\t\t\tifTrue: [\r\t\t\t\ts nextPut: (192+(v >> 6)) asCharacter.\r\t\t\t\ts nextPut: (128+(v bitAnd: 63)) asCharacter]].\r\t^s contents. \r! !\r\r!String methodsFor: 'internet' stamp: 'BG 10/29/2003 08:20'!\rreplaceHtmlCharRefs\r\r        | pos ampIndex scIndex special specialValue outString outPos newOutPos |\r\r        outString _ String new: self size.\r        outPos _ 0.\r\r        pos _ 1.\r        \r        [ pos <= self size ] whileTrue: [ \r                \"read up to the next ampersand\"\r                ampIndex _ self indexOf: $& startingAt: pos ifAbsent: [0].\r                \r                ampIndex = 0 ifTrue: [\r                        pos = 1 ifTrue: [ ^self ] ifFalse: [ ampIndex _ self size+1 ] ].\r\r                newOutPos _ outPos + ampIndex - pos.\r                outString\r                        replaceFrom: outPos + 1\r                        to: newOutPos\r                        with: self\r                        startingAt: pos.\r                outPos _ newOutPos.\r                pos _ ampIndex.\r\r                ampIndex <= self size ifTrue: [\r                        \"find the $;\"\r                        scIndex _ self indexOf: $; startingAt: ampIndex ifAbsent: [ self size + 1 ].\r\r                        special _ self copyFrom: ampIndex+1 to: scIndex-1.       \r                        specialValue _ \"HtmlEntity valueOfHtmlEntity: special\" 16r32. \r\r                        specialValue\r                                ifNil: [\r                                        \"not a recognized entity.  wite it back\"\r\t\t\t\t\t\t\t\t  scIndex > self size ifTrue: [ scIndex _ self size ].\r\r                                        newOutPos _ outPos + scIndex - ampIndex + 1.\r                                        outString\r                                                replaceFrom: outPos+1\r                                                to: newOutPos\r                                                with: self\r                                                startingAt: ampIndex.\r                                        outPos _ newOutPos.]\r                                ifNotNil: [\r                                        outPos _ outPos + 1.\r                                        outString at: outPos put: specialValue isoToSqueak.].\r                        \r                        pos _ scIndex + 1. ]. ].\r\r\r        ^outString copyFrom: 1 to: outPos! !\r\r!String methodsFor: 'internet' stamp: 'bf 3/9/2000 16:46'!\rsqueakToIso\r\t^self collect: [:c | c squeakToIso ]! !\r\r!String methodsFor: 'internet' stamp: 'RAA 2/6/2001 09:37'!\runescapePercents\r\t\"change each %XY substring to the character with ASCII value XY in hex.  This is the opposite of #encodeForHTTP\"\r\t| ans c asciiVal pos oldPos specialChars |\r\tans _ WriteStream on: String new.\r\toldPos _ 1.\r\tspecialChars _ '+%' asCharacterSet.\r\r\t[pos _ self indexOfAnyOf: specialChars startingAt: oldPos. pos > 0]\r\twhileTrue: [\r\t\tans nextPutAll: (self copyFrom: oldPos to: pos - 1).\r\t\tc _ self at: pos.\r\t\tc = $+ ifTrue: [ans nextPut: $ ] ifFalse: [\r\t\t\t(c = $% and: [pos + 2 <= self size]) ifTrue: [\r\t\t\t\tasciiVal _ (self at: pos+1) asUppercase digitValue * 16 +\r\t\t\t\t\t(self at: pos+2) asUppercase digitValue.\r\t\t\t\tpos _ pos + 2.\r\t\t\t\tasciiVal > 255 ifTrue: [^self].\t\"not really an escaped string\"\r\t\t\t\tans nextPut: (Character value: asciiVal)]\r\t\t\tifFalse: [ans nextPut: c]].\r\t\toldPos _ pos+1].\r\tans nextPutAll: (self copyFrom: oldPos to: self size).\r\t^ ans contents! !\r\r!String methodsFor: 'internet' stamp: 'JO 9/2/2002 11:59'!\rutf8ToIso\r\t\"Only UTF-8 characters that maps to 8-bit ISO-8559-1 values are converted. Others raises an error\"\r\t| s i c v c2 v2 |\r\ts _ WriteStream on: (String new: self size).\r\t\r\ti _ 1.\r\t[i <= self size] whileTrue: [\r\t\tc _ self at: i. i_i+1.\r\t\tv _ c asciiValue.\r\t\t(v > 128)\r\t\t\tifFalse: [ s nextPut: c ]\r\t\t\tifTrue: [((v bitAnd: 252) == 192)\r\t\t\t\tifFalse: [self error: 'illegal UTF-8 ISO character']\r\t\t\t\tifTrue: [\r\t\t\t\t\t(i > self size) ifTrue: [ self error: 'illegal end-of-string, expected 2nd byte of UTF-8'].\r\t\t\t\t\tc2 _ self at: i. i_i+1.\r\t\t\t\t\tv2 _ c2 asciiValue.\r\t\t\t\t\t((v2 bitAnd: 192) = 128) ifFalse: [self error: 'illegal 2nd UTF-8 char']. \r\t\t\t\t\ts nextPut: ((v2 bitAnd: 63) bitOr: ((v << 6) bitAnd: 192)) asCharacter]]].\r\t^s contents. \r! !\r\r!String methodsFor: 'internet' stamp: 'ls 7/27/1998 23:17'!\rwithInternetLineEndings\r\t\"change line endings from CR's to CRLF's.  This is probably in\rprepration for sending a string over the Internet\"\r\t| cr lf |\r\tcr _ Character cr.\r\tlf _ Character linefeed.\r\t^self class streamContents: [ :stream |\r\t\tself do: [ :c |\r\t\t\tstream nextPut: c.\r\t\t\tc = cr ifTrue:[ stream nextPut: lf ]. ] ].! !\r\r!String methodsFor: 'internet' stamp: 'ls 10/27/1998 00:52'!\rwithSqueakLineEndings\r\t\"assume the string is textual, and that CR, LF, and CRLF are all \r\tvalid line endings.  Replace each occurence with a single CR\"\r\t| cr lf input c crlf inPos outPos outString lineEndPos newOutPos |\r\tcr _ Character cr.\r\tlf _ Character linefeed.\r\tcrlf _ CharacterSet new.\r\tcrlf add: cr; add: lf.\r\r\tinPos _ 1.\r\toutPos _ 1.\r\toutString _\r String new: self size.\r\r\t[ lineEndPos _ self indexOfAnyOf: crlf startingAt: inPos ifAbsent: [0].\r\t\tlineEndPos ~= 0 ] whileTrue: [\r\t\t\tnewOutPos _ outPos + (lineEndPos - inPos + 1).\r\t\t\toutString replaceFrom: outPos to: newOutPos - 2 with: self startingAt: inPos.\r\t\t\toutString at: newOutPos-1 put: cr.\r\t\t\toutPos _ newOutPos.\r\r\t\t\t((self at: lineEndPos) = cr and: [ lineEndPos < self size and: [ (self at: lineEndPos+1) = lf ] ]) ifTrue: [\r\t\t\t\t\"CRLF ending\"\r\t\t\t\tinPos _ lineEndPos + 2 ]\r\t\t\tifFalse: [ \r\t\t\t\t\"CR or LF ending\"\r\t\t\t\tinPos _ lineEndPos + 1 ]. ].\r\r\t\"no more line endings.  copy the rest\"\r\tnewOutPos _ outPos + (self size - inPos + 1).\r\toutString replaceFrom: outPos to: newOutPos-1 with: self startingAt: inPos.\r\r\t^outString copyFrom: 1 to: newOutPos-1\r\t! !\r\r!String methodsFor: 'internet' stamp: 'ls 7/1/1998 02:26'!\rwithoutQuoting\r\t\"remove the initial and final quote marks, if present\"\r\t\"'''h''' withoutQuoting\"\r\t| quote |\r\tself size < 2 ifTrue: [ ^self ].\r\tquote _ self first.\r\t(quote = $' or: [ quote = $\" ])\r\t\tifTrue: [ ^self copyFrom: 2 to: self size - 1 ]\r\t\tifFalse: [ ^self ].! !\r\r\r!String methodsFor: 'testing' stamp: 'RAA 6/21/1999 11:28'!\rhasContentsInExplorer\r\r\t^false! !\r\r!String methodsFor: 'testing' stamp: 'djp 10/26/1999 21:25'!\risAllDigits\r\t\"whether the receiver is composed entirely of digits\"\r\tself do: [:c | c isDigit ifFalse: [^ false]].\r\t^ true! !\r\r!String methodsFor: 'testing' stamp: 'ls 7/4/1998 19:17'!\risAllSeparators\r\t\"whether the receiver is composed entirely of separators\"\r\tself do: [ :c | c isSeparator ifFalse: [ ^false ] ].\r\t^true! !\r\r!String methodsFor: 'testing' stamp: 'sma 6/15/2000 15:48'!\risString\r\t^ true! !\r\r!String methodsFor: 'testing' stamp: 'sw 11/5/1998 17:41'!\rlastSpacePosition\r\t\"Answer the character position of the final space or other separator character in the receiver, and 0 if none\"\r\tself size to: 1 by: -1 do:\r\t\t[:i | ((self at: i) isSeparator) ifTrue: [^ i]].\r\t^ 0\r\r\"\r'fred the bear' lastSpacePosition\r'ziggie' lastSpacePosition\r'elvis ' lastSpacePosition\r'wimpy  ' lastSpacePosition\r'' lastSpacePosition\r\"! !\r\r\r!String methodsFor: 'paragraph support' stamp: 'RAA 8/30/1998 15:20'!\rindentationIfBlank: aBlock\r\t\"Answer the number of leading tabs in the receiver.  If there are\r\t no visible characters, pass the number of tabs to aBlock and return its value.\"\r\r\t| reader leadingTabs lastSeparator cr tab ch |\r\tcr _ Character cr.\r\ttab _ Character tab.\r\treader _ ReadStream on: self.\r\tleadingTabs _ 0.\r\t[reader atEnd not and: [(ch _ reader next) == tab]]\r\t\twhileTrue: [leadingTabs _ leadingTabs + 1].\r\tlastSeparator _ leadingTabs + 1.\r\t[reader atEnd not and: [ch isSeparator and: [ch ~~ cr]]]\r\t\twhileTrue: [lastSeparator _ lastSeparator + 1. ch _ reader next].\r\tlastSeparator = self size | (ch == cr)\r\t\tifTrue: [^aBlock value: leadingTabs].\r\t^leadingTabs! !\r\r\r!String methodsFor: 'arithmetic' stamp: 'di 11/6/1998 14:03'!\r* arg\r\r\t^ arg adaptToString: self andSend: #*! !\r\r!String methodsFor: 'arithmetic' stamp: 'di 11/6/1998 14:03'!\r+ arg\r\r\t^ arg adaptToString: self andSend: #+! !\r\r!String methodsFor: 'arithmetic' stamp: 'di 11/6/1998 14:03'!\r- arg\r\r\t^ arg adaptToString: self andSend: #-! !\r\r!String methodsFor: 'arithmetic' stamp: 'di 11/6/1998 14:03'!\r/ arg\r\r\t^ arg adaptToString: self andSend: #/! !\r\r!String methodsFor: 'arithmetic' stamp: 'di 11/6/1998 14:03'!\r// arg\r\r\t^ arg adaptToString: self andSend: #//! !\r\r!String methodsFor: 'arithmetic' stamp: 'di 11/6/1998 14:03'!\r\\\\ arg\r\r\t^ arg adaptToString: self andSend: #\\\\! !\r\r\r!String methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 01:17'!\rbyteEncode:aStream\r\t^aStream writeString:self.! !\r\r!String methodsFor: 'filter streaming' stamp: 'MPW 1/1/1901 23:02'!\rputOn:aStream\r\t^aStream nextPutAll:self.\r! !\r\r\r!String methodsFor: 'encoding' stamp: 'RAA 7/22/2000 08:52'!\rgetInteger32: location\r\t| integer |\r\t<primitive: 'getInteger' module: 'IntegerPokerPlugin'>\r\t\"^IntegerPokerPlugin doPrimitive: #getInteger\"\r\r\t\"the following is about 7x faster than interpreting the plugin if not compiled\"\r\r\tinteger := \r\t\t((self byteAt: location) bitShift: 24) +\r\t\t((self byteAt: location+1) bitShift: 16) +\r\t\t((self byteAt: location+2) bitShift: 8) +\r\t\t(self byteAt: location+3).\r\r\tinteger > 1073741824 ifTrue: [\r\t\t^1073741824 - integer ].\r\t^integer\r! !\r\r!String methodsFor: 'encoding' stamp: 'RAA 7/31/2000 16:06'!\rputInteger32: anInteger at: location\r\t| integer |\r\t<primitive: 'putInteger' module: 'IntegerPokerPlugin'>\r\t\"IntegerPokerPlugin doPrimitive: #putInteger\"\r\r\t\"the following is close to 20x faster than the above if the primitive is not compiled\"\r\t\"PUTCOUNTER _ PUTCOUNTER + 1.\"\r\tinteger _ anInteger.\r\tinteger < 0 ifTrue: [integer :=  1073741824 - integer. ].\r\tself byteAt: location+3 put: (integer \\\\ 256).\r\tself byteAt: location+2 put: (integer bitShift: -8) \\\\ 256.\r\tself byteAt: location+1 put: (integer bitShift: -16) \\\\ 256.\r\tself byteAt: location put: (integer bitShift: -24) \\\\ 256.\r\r\"Smalltalk at: #PUTCOUNTER put: 0\"! !\r\r\r!String methodsFor: 'user interface' stamp: 'ajh 9/25/2002 13:10'!\rasExplorerString\r\t^ self printString! !\r\r!String methodsFor: 'user interface' stamp: 'sw 8/10/2001 10:41'!\ropenInWorkspaceWithTitle: aTitle\r\t\"Open up a workspace with the receiver as its contents, with the given title\"\r\r\t(Workspace new contents: self) openLabel: aTitle! !\r\r\r!String methodsFor: 'Camp Smalltalk' stamp: 'jp 3/17/2003 10:04'!\rsunitAsSymbol\r\n \r\n        ^self asSymbol! !\r\r!String methodsFor: 'Camp Smalltalk' stamp: 'jp 3/17/2003 10:04'!\rsunitMatch: aString\r\n \r\n        ^self match: aString! !\r\r!String methodsFor: 'Camp Smalltalk' stamp: 'jp 3/17/2003 10:04'!\rsunitSubStrings\r\n \r\n        ^self substrings! !\r\r\r!String methodsFor: '*packageinfo-base' stamp: 'ab 5/31/2003 17:13'!\rescapeEntities\r\t^ String streamContents: [:s | self do: [:c | s nextPutAll: c escapeEntities]]\r! !\r\r\r!String methodsFor: 'translating' stamp: 'BG 8/18/2004 15:12'!\rtranslated\r\t\"answer the receiver translated to the default language\"\r\t^self! !\r\r\r!String methodsFor: 'formatting' stamp: 'dgd 8/27/2003 19:49'!\rformat: aCollection \r\t\"format the receiver with aCollection  \r\t \r\tsimplest example:  \r\t'foo {1} bar' format: {Date today}.\r\t \r\tcomplete example:  \r\t'\\{ \\} \\\\ foo {1} bar {2}' format: {12. 'string'}.  \r\t\"\r\t| result stream |\r\tresult := String new writeStream.\r\tstream := self readStream.\r\r\t[stream atEnd]\r\t\twhileFalse: [| currentChar | \r\t\t\tcurrentChar := stream next.\r\t\t\tcurrentChar == ${\r\t\t\t\tifTrue: [| expression | \r\t\t\t\t\texpression := self getEnclosedExpressionFrom: stream.\r\t\t\t\t\tresult\r\t\t\t\t\t\tnextPutAll: (self evaluateExpression: expression parameters: aCollection)]\r\t\t\t\tifFalse: [\r\t\t\t\t\tcurrentChar == $\\\r\t\t\t\t\t\tifTrue: [stream atEnd\r\t\t\t\t\t\t\t\tifFalse: [result nextPut: stream next]]\r\t\t\t\t\t\tifFalse: [result nextPut: currentChar]]].\r\r\t^ result contents! !\r\r\r\r!String methodsFor: '*versionnumber' stamp: 'svp 6/18/2002 16:12'!\rasVersion\r\n\t\"Answer a VersionNumber\"\r\n\r\n\t^VersionNumber fromString: self! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rString class\r\tinstanceVariableNames: ''!\r\r!String class methodsFor: 'instance creation' stamp: 'jm 5/6/1998 18:39'!\rcr\r\t\"Answer a string containing a single carriage return character.\"\r\r\t^ self with: Character cr\r! !\r\r!String class methodsFor: 'instance creation' stamp: 'ls 9/10/1998 22:29'!\rcrlf\r\t\"Answer a string containing a carriage return and a linefeed.\"\r\r\t^ self with: Character cr with: Character lf\r! !\r\r!String class methodsFor: 'instance creation' stamp: 'ar 8/17/2001 18:19'!\rcrlfcrlf\r\t^self crlf , self crlf.\r! !\r\r!String class methodsFor: 'instance creation'!\rfromPacked: aLong\r\t\"Convert from a longinteger to a String of length 4.\"\r\r\t| s |\r\ts _ self new: 4.\r\ts at: 1 put: (aLong digitAt: 4) asCharacter.\r\ts at: 2 put: (aLong digitAt: 3) asCharacter.\r\ts at: 3 put: (aLong digitAt: 2) asCharacter.\r\ts at: 4 put: (aLong digitAt: 1) asCharacter.\r\t^s\r\r\"String fromPacked: 'TEXT' asPacked\"\r! !\r\r!String class methodsFor: 'instance creation' stamp: 'di 1/14/98 10:26'!\rfromString: aString \r\t\"Answer an instance of me that is a copy of the argument, aString.\"\r\t\r\t^ aString copyFrom: 1 to: aString size! !\r\r!String class methodsFor: 'instance creation' stamp: 'ar 3/15/2001 22:47'!\rlf\r\t\"Answer a string containing a single carriage return character.\"\r\r\t^ self with: Character lf! !\r\r!String class methodsFor: 'instance creation'!\rreadFrom: inStream\r\t\"Answer an instance of me that is determined by reading the stream, \r\tinStream. Embedded double quotes become the quote Character.\"\r\r\t| outStream char done |\r\toutStream _ WriteStream on: (String new: 16).\r\t\"go to first quote\"\r\tinStream skipTo: $'.\r\tdone _ false.\r\t[done or: [inStream atEnd]]\r\t\twhileFalse: \r\t\t\t[char _ inStream next.\r\t\t\tchar = $'\r\t\t\t\tifTrue: \r\t\t\t\t\t[char _ inStream next.\r\t\t\t\t\tchar = $'\r\t\t\t\t\t\tifTrue: [outStream nextPut: char]\r\t\t\t\t\t\tifFalse: [done _ true]]\r\t\t\t\tifFalse: [outStream nextPut: char]].\r\t^outStream contents! !\r\r!String class methodsFor: 'instance creation' stamp: 'sw 6/15/1999 22:59'!\rtab\r\t\"Answer a string containing a single tab character.\"\r\r\t^ self with: Character tab\r! !\r\r!String class methodsFor: 'instance creation' stamp: 'ar 12/17/2001 01:24'!\rvalue: anInteger\r\t^self with: (Character value: anInteger)! !\r\r\r!String class methodsFor: 'examples'!\rexample\r\t\"To see the string displayed at the cursor point, execute this expression\r\tand select a point by pressing a mouse button.\"\r\r\t'this is some text' displayOn: Display at: Sensor waitButton! !\r\r\r!String class methodsFor: 'initialization' stamp: 'di 12/3/2000 09:06'!\rinitialize   \"String initialize\"\r\r\t| order |\r\tAsciiOrder _ (0 to: 255) as: ByteArray.\r\r\tCaseInsensitiveOrder _ AsciiOrder copy.\r\t($a to: $z) do:\r\t\t[:c | CaseInsensitiveOrder at: c asciiValue + 1\r\t\t\t\tput: (CaseInsensitiveOrder at: c asUppercase asciiValue +1)].\r\r\t\"Case-sensitive compare sorts space, digits, letters, all the rest...\"\r\tCaseSensitiveOrder _ ByteArray new: 256 withAll: 255.\r\torder _ -1.\r\t' 0123456789' do:  \"0..10\"\r\t\t[:c | CaseSensitiveOrder at: c asciiValue + 1 put: (order _ order+1)].\r\t($a to: $z) do:     \"11-64\"\r\t\t[:c | CaseSensitiveOrder at: c asUppercase asciiValue + 1 put: (order _ order+1).\r\t\tCaseSensitiveOrder at: c asciiValue + 1 put: (order _ order+1)].\r\t1 to: CaseSensitiveOrder size do:\r\t\t[:i | (CaseSensitiveOrder at: i) = 255 ifTrue:\r\t\t\t[CaseSensitiveOrder at: i put: (order _ order+1)]].\r\torder = 255 ifFalse: [self error: 'order problem'].\r\r\t\"a table for translating to lower case\"\r\tLowercasingTable _ String withAll: (Character allCharacters collect: [:c | c asLowercase]).\r\r\t\"a table for translating to upper case\"\r\tUppercasingTable _ String withAll: (Character allCharacters collect: [:c | c asUppercase]).\r\r\t\"a table for testing tokenish (for fast numArgs)\"\r\tTokenish _ String withAll: (Character allCharacters collect:\r\t\t\t\t\t\t\t\t\t[:c | c tokenish ifTrue: [c] ifFalse: [$~]]).\r\r\t\"CR and LF--characters that terminate a line\"\r\tCSLineEnders _ CharacterSet empty.\r\tCSLineEnders add: Character cr.\r\tCSLineEnders add: Character lf.\r\r \t\"separators and non-separators\"\r\tCSSeparators _ CharacterSet separators.\r\tCSNonSeparators _ CSSeparators complement.! !\r\r!String class methodsFor: 'initialization' stamp: 'CdG 1/8/2004 15:17'!\rinitializeHtmlEntities\r\t\"String initializeHtmlEntities\"\r\r\tHtmlEntities _ (Dictionary new: 128)\r\t\tat: 'amp'\tput: $&;\r\t\tat: 'lt'\t\tput: $<;\r\t\tat: 'gt'\t\tput: $>;\r\t\tat: 'quot'\tput: $\";\r\t\tat: 'euro'\tput: Character euro;\r\t\tyourself.\r\t#('nbsp' 'iexcl' 'cent' 'pound' 'curren' 'yen' 'brvbar' 'sect' 'uml' 'copy' 'ordf' 'laquo' 'not' 'shy' 'reg' 'hibar' 'deg' 'plusmn' 'sup2' 'sup3' 'acute' 'micro' 'para' 'middot' 'cedil' 'sup1' 'ordm' 'raquo' 'frac14' 'frac12' 'frac34' 'iquest' 'Agrave' 'Aacute' 'Acirc' 'Atilde' 'Auml' 'Aring' 'AElig' 'Ccedil' 'Egrave' 'Eacute' 'Ecirc' 'Euml' 'Igrave' 'Iacute' 'Icirc' 'Iuml' 'ETH' 'Ntilde' 'Ograve' 'Oacute' 'Ocirc' 'Otilde' 'Ouml' 'times' 'Oslash' 'Ugrave' 'Uacute' 'Ucirc' 'Uuml' 'Yacute' 'THORN' 'szlig' 'agrave' 'aacute' 'acirc' 'atilde' 'auml' 'aring' 'aelig' 'ccedil' 'egrave' 'eacute' 'ecirc' 'euml' 'igrave' 'iacute' 'icirc' 'iuml' 'eth' 'ntilde' 'ograve' 'oacute' 'ocirc' 'otilde' 'ouml' 'divide' 'oslash' 'ugrave' 'uacute' 'ucirc' 'uuml' 'yacute' 'thorn' 'yuml' ) withIndexDo: [:each :index | \r\t\t\"filter out base characters CdG 1/8/2004 15:17\"\r\t\t| char |\r\t\tchar _ (index + 159) asCharacter isoToSqueak. \r\t\tchar >= (Character value: 128) ifTrue: [\r\t\t\tHtmlEntities at: each put: char]]! !\r\r\r!String class methodsFor: 'primitives' stamp: 'ar 2/3/2001 16:12'!\rfindFirstInString: aString  inSet: inclusionMap  startingAt: start\r\t| i stringSize |\r\t<primitive: 'primitiveFindFirstInString' module: 'MiscPrimitivePlugin'>\r\tself var: #aString declareC: 'unsigned char *aString'.\r\tself var: #inclusionMap  declareC: 'char *inclusionMap'.\r\r\tinclusionMap size ~= 256 ifTrue: [ ^0 ].\r\r\ti _ start.\r\tstringSize _ aString size.\r\t[ i <= stringSize and: [ (inclusionMap at: (aString at: i) asciiValue+1) = 0 ] ] whileTrue: [ \r\t\ti _ i + 1 ].\r\r\ti > stringSize ifTrue: [ ^0 ].\r\t^i! !\r\r!String class methodsFor: 'primitives' stamp: 'ar 2/3/2001 16:13'!\rindexOfAscii: anInteger inString: aString startingAt: start\r\r\t| stringSize |\r\t<primitive: 'primitiveIndexOfAsciiInString' module: 'MiscPrimitivePlugin'>\r\r\tself var: #aCharacter declareC: 'int anInteger'.\r\tself var: #aString declareC: 'unsigned char *aString'.\r\r\tstringSize _ aString size.\r\tstart to: stringSize do: [:pos |\r\t\t(aString at: pos) asciiValue = anInteger ifTrue: [^ pos]].\r\r\t^ 0\r! !\r\r!String class methodsFor: 'primitives' stamp: 'ar 9/28/2001 04:35'!\rstringHash: aString initialHash: speciesHash\r\r\t| stringSize hash low |\r\t<primitive: 'primitiveStringHash' module: 'MiscPrimitivePlugin'>\r\r\tself var: #aHash declareC: 'int speciesHash'.\r\tself var: #aString declareC: 'unsigned char *aString'.\r\r\tstringSize _ aString size.\r\thash _ speciesHash bitAnd: 16rFFFFFFF.\r\t1 to: stringSize do: [:pos |\r\t\thash _ hash + (aString at: pos) asciiValue.\r\t\t\"Begin hashMultiply\"\r\t\tlow _ hash bitAnd: 16383.\r\t\thash _ (16r260D * low + ((16r260D * (hash bitShift: -14) + (16r0065 * low) bitAnd: 16383) * 16384)) bitAnd: 16r0FFFFFFF.\r\t].\r\t^ hash! !\r\r!String class methodsFor: 'primitives' stamp: 'ar 2/3/2001 16:12'!\rtranslate: aString from: start  to: stop  table: table\r\t\"translate the characters in the string by the given table, in place\"\r\t<primitive: 'primitiveTranslateStringWithTable' module: 'MiscPrimitivePlugin'>\r\tself var: #table  declareC: 'unsigned char *table'.\r\tself var: #aString  declareC: 'unsigned char *aString'.\r\r\tstart to: stop do: [ :i |\r\t\taString at: i put: (table at: (aString at: i) asciiValue+1) ]! !\r\r\r!String class methodsFor: 'plugin generation' stamp: 'acg 9/19/1999 00:21'!\rccg: cg prolog: aBlock expr: aString index: anInteger\r\r\t^cg \r\t\tccgLoad: aBlock \r\t\texpr: aString \r\t\tasCharPtrFrom: anInteger\r\t\tandThen: (cg ccgValBlock: 'isBytes')! !\r\r!String class methodsFor: 'plugin generation' stamp: 'acg 9/18/1999 17:10'!\rccgDeclareCForVar: aSymbolOrString\r\r\t^'char *', aSymbolOrString! !\rModel subclass: #StringHolder\r\tinstanceVariableNames: 'contents'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-ST80 Remnants'!\r!StringHolder commentStamp: '<historical>' prior: 0!\rI am a kind of Model that includes a piece of text.  In some cases, the text can be edited, and in some the text is a method.\r\rCategories 'code pane menu' and 'message list menu' are messages that may be called by my menus when the text is a method, and when some pane is a list of methods.  Other of my subclasses may ignore these two catagories altogether.!\r\r\r!StringHolder methodsFor: 'initialize-release'!\rdefaultContents\r\r\t^''! !\r\r!StringHolder methodsFor: 'initialize-release' stamp: 'jm 3/24/98 17:56'!\rinitialize\r\t\"Initialize the state of the receiver with its default contents.\"\r\r\tcontents _ self defaultContents.\r! !\r\r!StringHolder methodsFor: 'initialize-release' stamp: 'sw 12/22/1998 00:16'!\ropenLabel: aString \r\t\"Create a standard system view of the model, me, a StringHolder and open it.  If in mvc, terminate the active controller so that the new window will immediately be activated.\"\r\tself openLabel: aString andTerminate: true! !\r\r!StringHolder methodsFor: 'initialize-release' stamp: 'BG 10/28/2003 20:43'!\ropenLabel: aString andTerminate: terminateBoolean\r\t\"Create a standard system view of the model, me, a StringHolder and open it.; do not terminate the active process if in mvc\"\r\t| topView codeView |\r\r\ttopView _ (StandardSystemView new) model: self.\r\ttopView borderWidth: 1.\r\ttopView label: aString.\r\ttopView minimumSize: 100 @ 50.\r\r\tcodeView _ PluggableTextView on: self \r\t\t\ttext: #contents accept: #acceptContents:\r\t\t\treadSelection: #contentsSelection menu: #codePaneMenu:shifted:.\r\tcodeView window: (0@0 extent: 200@200).\r\ttopView addSubView: codeView.\r\t\"self contents size > 0 ifTrue: [\r\t\t\tcodeView hasUnacceptedEdits: true].  Is it already saved or not??\"\r\tterminateBoolean\r\t\tifTrue:\r\t\t\t[topView controller open]\r\t\tifFalse:\r\t\t\t[topView controller openNoTerminate]! !\r\r\r!StringHolder methodsFor: 'accessing' stamp: 'di 5/19/1998 15:34'!\racceptContents: aString \r\t\"Set aString to be the contents of the receiver.  Return true cuz happy\"\r\r\tself contents: aString.\r\t^ true! !\r\r!StringHolder methodsFor: 'accessing'!\rcontents\r\t\"Answer the contents that the receiver is holding--presumably a string.\"\r\r\t^contents! !\r\r!StringHolder methodsFor: 'accessing' stamp: 'sw 1/12/1999 11:47'!\rcontents: textOrString \r\t\"Set textOrString to be the contents of the receiver.\"\r\r\tcontents _ textOrString \"asString\"! !\r\r!StringHolder methodsFor: 'accessing' stamp: 'tk 4/3/98 22:50'!\rcontentsSelection\r\t\"Return the interval of text in the code pane to select when I set the pane's contents\"\r\r\t^ 1 to: 0  \"null selection\"! !\r\r!StringHolder methodsFor: 'accessing' stamp: 'sw 12/9/2000 23:59'!\rnoteAcceptanceOfCodeFor: aSelector\r\t\"A method has possibly been submitted for the receiver with aSelector as its selector; If the receiver wishes to take soem action here is a chance for it to do so\"\r! !\r\r!StringHolder methodsFor: 'accessing' stamp: 'sw 12/1/2000 11:04'!\rreformulateList\r\t\"If the receiver has a way of reformulating its message list, here is a chance for it to do so\"! !\r\r!StringHolder methodsFor: 'accessing' stamp: 'sw 12/6/2000 17:48'!\rreformulateListNoting: newSelector\r\t\"A method has possibly been submitted for the receiver with newSelector as its selector; If the receiver has a way of reformulating its message list, here is a chance for it to do so\"\r\r\t^ self reformulateList! !\r\r!StringHolder methodsFor: 'accessing' stamp: 'tk 4/18/1998 14:59'!\rselectedClassName\r\t\"I may know what class is currently selected\"\r\r\tself selectedClass ifNotNil: [^ self selectedClass name].\r\t^ nil! !\r\r!StringHolder methodsFor: 'accessing' stamp: 'tk 4/18/1998 15:01'!\rselectedClassOrMetaClass\r\r\t^ self selectedClass\t\"I don't know any better\"! !\r\r!StringHolder methodsFor: 'accessing' stamp: 'tk 4/18/1998 15:22'!\rselectedMessageName\r\r\t^ nil! !\r\r!StringHolder methodsFor: 'accessing' stamp: 'di 11/23/1998 15:21'!\rtextContents: aStringOrText \r\t\"Set aStringOrText to be the contents of the receiver.\"\r\r\tcontents _ aStringOrText! !\r\r\r!StringHolder methodsFor: 'code pane menu' stamp: 'sw 11/8/1999 17:56'!\rcodePaneMenu: aMenu shifted: shifted\r\t\"Note that unless we override perform:orSendTo:, PluggableTextController will respond to all menu items in a text pane\"\r\t| donorMenu |\r\tdonorMenu _ shifted\r\t\tifTrue:\r\t\t\t[ParagraphEditor shiftedYellowButtonMenu]\r\t\tifFalse:\r\t\t\t[ParagraphEditor yellowButtonMenu].\r\t^ aMenu labels: donorMenu labelString lines: donorMenu lineArray selections: donorMenu selections! !\r\r!StringHolder methodsFor: 'code pane menu' stamp: 'wod 5/29/1998 16:35'!\rperform: selector orSendTo: otherTarget\r\t\"Selector was just chosen from a menu by a user.  If can respond, then\rperform it on myself. If not, send it to otherTarget, presumably the\reditPane from which the menu was invoked.\"\r\r\t(self respondsTo: selector)\r\t\tifTrue: [^ self perform: selector]\r\t\tifFalse: [^ otherTarget perform: selector]! !\r\r!StringHolder methodsFor: 'code pane menu' stamp: 'tk 4/6/98 11:43'!\rshowBytecodes\r\t\"We don't know how to do this\"\r\r\t^ self changed: #flash! !\r\r!StringHolder methodsFor: 'code pane menu' stamp: 'di 9/7/1999 11:27'!\rspawn: contentsString\r\r\t(Workspace new contents: contentsString) openLabel: 'Workspace'\r! !\r\r\r!StringHolder methodsFor: 'evaluation'!\rdoItContext\r\t\"Answer the context in which a text selection can be evaluated.\"\r\r\t^nil! !\r\r!StringHolder methodsFor: 'evaluation'!\rdoItReceiver\r\t\"Answer the object that should be informed of the result of evaluating a \r\ttext selection.\"\r\r\t^nil! !\r\r\r!StringHolder methodsFor: 'message list menu' stamp: 'sd 4/15/2003 22:46'!\rbrowseAllMessages\r\t\"Create and schedule a message set browser on all implementors of all the messages sent by the current method.\"\r\r\t| aClass aName method filteredList |\r\t(aName _ self selectedMessageName) ifNotNil: [\r\t\tmethod _ (aClass _ self selectedClassOrMetaClass) compiledMethodAt: aName.\r\t\tfilteredList _ method messages reject: \r\t\t\t[:each | #(new initialize = ) includes: each].\r\t\tself systemNavigation browseAllImplementorsOfList: filteredList asSortedCollection\r\t\t\t title: 'All messages sent in ', aClass name, '.', aName]\r! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'tk 4/18/1998 16:11'!\rbrowseClass\r\t\"Open an class browser on this class and method\"\r\r\tself selectedClassOrMetaClass ifNotNil: [\r\t\tBrowser newOnClass: self selectedClassOrMetaClass \r\t\t\tselector: self selectedMessageName]! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'tpr 12/17/2003 15:43'!\rbrowseClassRefs\r\r\t| cls |\r\t(cls _ self selectedClass) ifNotNil: [\r\t\tself systemNavigation browseAllCallsOnClass: cls theNonMetaClass]\r! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'sd 4/15/2003 16:11'!\rbrowseClassVarRefs\r\t\"1/17/96 sw: devolve responsibility to the class, so that the code that does the real work can be shared\"\r\r\t| cls |\r\tcls _ self selectedClass.\r\tcls ifNotNil: [self systemNavigation  browseClassVarRefs: cls]! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'sd 4/15/2003 16:11'!\rbrowseClassVariables\r\t\"Browse the class variables of the selected class. 2/5/96 sw\"\r\t| cls |\r\tcls _ self selectedClass.\r\tcls\r\t\tifNotNil: [self systemNavigation  browseClassVariables: cls]\r! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'RAA 5/28/2001 11:09'!\rbrowseFullProtocol\r\t\"Open up a protocol-category browser on the value of the receiver's current selection.    If in mvc, an old-style protocol browser is opened instead.  Someone who still uses mvc might wish to make the protocol-category-browser work there too, thanks.\"\r\r\t| aClass |\r\r\t(Smalltalk isMorphic and: [Smalltalk includesKey: #Lexicon]) ifFalse: [^ self spawnFullProtocol].\r\t(aClass _ self selectedClassOrMetaClass) ifNotNil:\r\t\t[(Smalltalk at: #Lexicon) new openOnClass: aClass inWorld: ActiveWorld showingSelector: self selectedMessageName]! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'sd 4/16/2003 19:42'!\rbrowseInstVarDefs \r\r\t| cls |\r\t(cls _ self selectedClassOrMetaClass) ifNotNil: [self systemNavigation browseInstVarDefs: cls]! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'sd 4/15/2003 16:11'!\rbrowseInstVarRefs\r\t\"1/26/96 sw: real work moved to class, so it can be shared\"\r\t| cls |\r\tcls _ self selectedClassOrMetaClass.\r\tcls\r\t\tifNotNil: [self systemNavigation  browseInstVarRefs: cls]! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'sd 4/16/2003 08:42'!\rbrowseLocalImplementors\r\t\"Present a menu of all messages sent by the currently selected message. \r\tOpen a message set browser of all implementors of the message chosen in or below\r\tthe selected class.\r\tDo nothing if no message is chosen.\"\r\tself getSelectorAndSendQuery: #browseAllImplementorsOf:localTo:\r\t\tto: self systemNavigation\r\t\twith: { self selectedClass }! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'sd 4/16/2003 20:41'!\rbrowseLocalSendersOfMessages\r\t\"Present a menu of the currently selected message, as well as all\r\tmessages sent by it.  Open a message set browser of all implementors\r\tof the message chosen in or below the selected class\"\r\r\tself getSelectorAndSendQuery: #browseAllCallsOn:localTo:\r\t\tto: self systemNavigation\r\t\twith: { self selectedClass }! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'sd 4/16/2003 08:45'!\rbrowseMessages\r\t\"Present a menu of all messages sent by the currently selected message. \r\tOpen a message set browser of all implementors of the message chosen.\"\r\r\tself getSelectorAndSendQuery: #browseAllImplementorsOf: to: self systemNavigation! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'tk 4/28/1998 09:28'!\rbrowseMethodFull\r\t\"Create and schedule a full Browser and then select the current class and message.\"\r\r\t| myClass |\r\t(myClass _ self selectedClassOrMetaClass) ifNotNil:\r\t\t[Browser fullOnClass: myClass selector: self selectedMessageName]! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'sd 4/16/2003 20:40'!\rbrowseSendersOfMessages\r\t\"Present a menu of the currently selected message, as well as all messages sent by it.  Open a message set browser of all senders of the selector chosen.\"\r\r\tself getSelectorAndSendQuery: #browseAllCallsOn: to: self systemNavigation! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'sd 4/29/2003 20:20'!\rbrowseUnusedMethods\r\t| classes unsent messageList cls |\r\t(cls _ self selectedClass)\r\t\tifNil: [^ self].\r\tclasses _ Array with: cls with: cls class.\r\tunsent _ Set new.\r\tclasses\r\t\tdo: [:c | unsent addAll: c selectors].\r\tunsent _ self systemNavigation allUnSentMessagesIn: unsent.\r\tmessageList _ OrderedCollection new.\r\tclasses\r\t\tdo: [:c | (c selectors\r\t\t\t\tselect: [:s | unsent includes: s]) asSortedCollection\r\t\t\t\tdo: [:sel | messageList add: c name , ' ' , sel]].\r\tself systemNavigation browseMessageList: messageList name: 'Unsent Methods in ' , cls name! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'nk 1/7/2004 10:20'!\rbrowseVersions\r\t\"Create and schedule a Versions Browser, showing all versions of the \r\tcurrently selected message. Answer the browser or nil.\"\r\t| selector class | \r\t(selector _ self selectedMessageName)\r\t\tifNil:[ self inform: 'Sorry, only actual methods have retrievable versions.'. ^nil ]\r\t\tifNotNil: [(MessageSet isPseudoSelector: selector)\r\t\t\t\tifTrue: [\"Eliminates Definition and Hierarchy\"\r\t\t\t\t\t^ self classCommentIndicated\r\t\t\t\t\t\tifTrue: [ ClassCommentVersionsBrowser browseCommentOf: self selectedClass. nil ]].\r\t\t\tclass _ self selectedClassOrMetaClass.\r\t\t\t^VersionsBrowser\r\t\t\t\tbrowseVersionsOf: (class compiledMethodAt: selector)\r\t\t\t\tclass: self selectedClass\r\t\t\t\tmeta: class isMeta\r\t\t\t\tcategory: (class organization categoryOfElement: selector)\r\t\t\t\tselector: selector]! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'tk 4/28/1998 19:14'!\rbuildMessageBrowser\r\t\"Create and schedule a message browser.\"\r\r\tself selectedMessageName ifNil: [^ self].\r\tBrowser openMessageBrowserForClass: self selectedClassOrMetaClass \r\t\tselector: self selectedMessageName editString: nil! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'sd 1/16/2004 21:14'!\rclassHierarchy\r\t\"Create and schedule a class list browser on the receiver's hierarchy.\"\r\r\tself systemNavigation\r\t\tspawnHierarchyForClass: self selectedClassOrMetaClass \"OK if nil\"\r\t\tselector: self selectedMessageName\r! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'sw 5/8/2000 02:16'!\rclassListKey: aChar from: view \r\t\"Respond to a Command key.  I am a model with a list of classes and a \r\tcode pane, and I also have a listView that has a list of methods.  The \r\tview knows how to get the list and selection.\"\r\r\taChar == $f ifTrue: [^ self findMethod].\r\taChar == $r ifTrue: [^ self recent].\r\taChar == $h ifTrue: [^ self spawnHierarchy].\r\taChar == $x ifTrue: [^ self removeClass].\r\t^ self messageListKey: aChar from: view! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'ar 1/15/2001 18:39'!\rcopyName\r\t\"Copy the current selector to the clipboard\"\r\t| selector |\r\t(selector _ self selectedMessageName) ifNotNil:\r\t\t[Clipboard clipboardText: selector asString asText]! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'sw 8/5/2002 16:53'!\rcopySelector\r\t\"Copy the selected selector to the clipboard\"\r\r\t| selector |\r\t(selector _ self selectedMessageName) ifNotNil:\r\t\t[Clipboard clipboardText: selector asString]! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'sw 7/1/2001 08:24'!\rfileOutMessage\r\t\"Put a description of the selected message on a file\"\r\r\tself selectedMessageName ifNotNil:\r\t\t[Cursor write showWhile:\r\t\t\t[self selectedClassOrMetaClass fileOutMethod: self selectedMessageName]]! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'di 5/6/1998 17:03'!\rfindMethodInChangeSets\r\t\"Find and open a changeSet containing the current method.\"\r\r\t| aName |\r\t(aName _ self selectedMessageName) ifNotNil: [\r\t\tChangeSorter browseChangeSetsWithClass: self selectedClassOrMetaClass\r\t\t\t\t\tselector: aName]! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'tk 4/21/1998 09:23'!\rinspectInstances\r\t\"Inspect all instances of the selected class.\"\r\r\t| myClass |\r\t(myClass _ self selectedClassOrMetaClass) ifNotNil:\r\t\t[myClass theNonMetaClass inspectAllInstances]. \r! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'tk 4/21/1998 09:00'!\rinspectSubInstances\r\t\"Inspect all instances of the selected class and all its subclasses\"\r\r\t| aClass |\r\t(aClass _ self selectedClassOrMetaClass) ifNotNil: [\r\t\taClass theNonMetaClass inspectSubInstances].\r! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'nb 6/17/2003 12:25'!\rmakeIsolatedCodePane\r\t| msgName |\r\r\t(msgName _ self selectedMessageName) ifNil: [^ Beeper beep].\r\tMethodHolder makeIsolatedCodePaneForClass: self selectedClassOrMetaClass selector: msgName! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'sd 4/16/2003 08:45'!\rmessageListKey: aChar from: view\r\t\"Respond to a Command key.  I am a model with a code pane, and I also\r\thave a listView that has a list of methods.  The view knows how to get\r\tthe list and selection.\"\r\r\t| sel class |\r\taChar == $D ifTrue: [^ self toggleDiffing].\r\r\tsel _ self selectedMessageName.\r\taChar == $m ifTrue:  \"These next two put up a type in if no message selected\"\r\t\t[^ self useSelector: sel orGetSelectorAndSendQuery: #browseAllImplementorsOf: to: self systemNavigation].\r\taChar == $n ifTrue: \r\t\t[^ self useSelector: sel orGetSelectorAndSendQuery: #browseAllCallsOn: to: self systemNavigation].\r\r\t\"The following require a class selection\"\r\t(class _ self selectedClassOrMetaClass) ifNil: [^ self arrowKey: aChar from: view].\r\taChar == $b ifTrue: [^ Browser fullOnClass: class selector: sel].\r\taChar == $N ifTrue: [^ self browseClassRefs].\r\taChar == $i ifTrue: [^ self methodHierarchy].\r\taChar == $h ifTrue: [^ self classHierarchy].\r\taChar == $p ifTrue: [^ self browseFullProtocol].\r\r\t\"The following require a method selection\"\r\tsel ifNotNil: \r\t\t[aChar == $o ifTrue: [^ self fileOutMessage].\r\t\taChar == $c ifTrue: [^ self copySelector].\r\t\taChar == $v ifTrue: [^ self browseVersions].\r\t\taChar == $O ifTrue: [^ self openSingleMessageBrowser].\r\t\taChar == $x ifTrue: [^ self removeMessage]].\r\r\t^ self arrowKey: aChar from: view! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'sw 12/28/2000 11:49'!\rmessageListSelectorTitle\r\t| selector aString aStamp aSize |\r\r\t(selector _ self selectedMessageName)\r\t\tifNil:\r\t\t\t[aSize _ self messageList size.\r\t\t\t^ (aSize == 0 ifTrue: ['no'] ifFalse: [aSize printString]), ' message', (aSize == 1 ifTrue: [''] ifFalse: ['s'])]\r\t\tifNotNil:\r\t\t\t[Preferences timeStampsInMenuTitles\r\t\t\t\tifFalse:\t[^ nil].\r\t\t\taString _ selector truncateWithElipsisTo: 28.\r\t\t\t^ (aStamp _ self timeStamp) size > 0\r\t\t\t\tifTrue:\r\t\t\t\t\t[aString, String cr, aStamp]\r\t\t\t\tifFalse:\r\t\t\t\t\t[aString]]! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'sd 1/16/2004 21:10'!\rmethodHierarchy\r\t\"Create and schedule a method browser on the hierarchy of implementors.\"\r\r\tself systemNavigation \r\t\t\tmethodHierarchyBrowserForClass: self selectedClassOrMetaClass \r\t\t\tselector: self selectedMessageName\r! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'BG 10/29/2003 09:40'!\rofferMenuFrom: menuRetriever shifted: aBoolean\r\t\"Pop up, in morphic or mvc as the case may be, a menu whose target is the receiver and whose contents are provided by sending the menuRetriever to the receiver.  The menuRetriever takes two arguments: a menu, and a boolean representing the shift state.\"\r\r\t| aMenu |\r\tSmalltalk isMorphic\r\t\tifTrue:\r\t\t\t[]\r\t\tifFalse:\r\t\t\t[aMenu _ CustomMenu new.\r\t\t\tself perform: menuRetriever with: aMenu with: aBoolean.\r\t\t\taMenu invokeOn: self]! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'sd 4/16/2003 08:52'!\ropenSingleMessageBrowser\r\t| msgName mr |\r\t\"Create and schedule a message list browser populated only by the currently selected message\"\r\r\t(msgName _ self selectedMessageName) ifNil: [^ self].\r\r\tmr _ MethodReference new\r\t\tsetStandardClass: self selectedClassOrMetaClass\r\t\tmethodSymbol: msgName.\r\r\tself systemNavigation \r\t\tbrowseMessageList: (Array with: mr)\r\t\tname: mr asStringOrText\r\t\tautoSelect: nil! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'RAA 12/10/1999 09:36'!\rpackageListKey: aChar from: view\r\t\"Respond to a Command key in the package pane in the PackageBrowser\"\r\taChar == $f ifTrue: [^ self findClass].\r\t^ self classListKey: aChar from: view\r! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'tk 4/28/1998 18:16'!\rprintOutMessage\r\t\"Write a file with the text of the selected message, for printing by a web browser\"\r\r\tself selectedMessageName ifNotNil: [\r\t\tself selectedClassOrMetaClass fileOutMethod: self selectedMessageName\r\t\t\t\t\t\t\tasHtml: true]! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'sd 5/23/2003 14:42'!\rremoveFromCurrentChanges\r\t\"Tell the changes mgr to forget that the current msg was changed.\"\r\r\tChangeSet current removeSelectorChanges: self selectedMessageName \r\t\t\tclass: self selectedClassOrMetaClass.\r\tself changed: #annotation! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'sw 1/28/1999 12:34'!\rrevertAndForget\r\t\"Revert to the previous version of the current method, and tell the changes mgr to forget that it was ever changed.  Danger!!  Use only if you really know what you're doing!!\"\r\r\tself okToChange ifFalse: [^ self].\r\tself revertToPreviousVersion.\r\tself removeFromCurrentChanges.\r\tself contentsChanged\r! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'nb 6/17/2003 12:25'!\rrevertToPreviousVersion\r\t\"Revert to the previous version of the current method\"\r\t| aClass aSelector  changeRecords |\r\tself okToChange ifFalse: [^ self].\r\taClass _ self selectedClassOrMetaClass.\r\taClass ifNil: [^ self changed: #flash].\r\taSelector _ self selectedMessageName.\r\tchangeRecords _ aClass changeRecordsAt: aSelector.\r\t(changeRecords == nil or: [changeRecords size <= 1]) ifTrue: [self changed: #flash.  ^ Beeper beep].\r\tchangeRecords second fileIn.\r\tself contentsChanged\r! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'sd 4/15/2003 16:11'!\rselectMessageAndEvaluate: aBlock\r\t\"Allow the user to choose one selector, chosen from the currently selected message's selector, as well as those of all messages sent by it, and evaluate aBlock on behalf of chosen selector.  If there is only one possible choice, simply make it; if there are multiple choices, put up a menu, and evaluate aBlock on behalf of the the chosen selector, doing nothing if the user declines to choose any\"\r\r\t| selector method messages |\r\t(selector _ self selectedMessageName) ifNil: [^ self].\r\tmethod _ (self selectedClassOrMetaClass ifNil: [^ self])\r\t\tcompiledMethodAt: selector\r\t\tifAbsent: [].\r\t(method isNil or: [(messages _ method messages) size == 0])\r\t\t ifTrue: [^ aBlock value: selector].\r\t(messages size == 1 and: [messages includes: selector])\r\t\tifTrue:\r\t\t\t[^ aBlock value: selector].  \"If only one item, there is no choice\"\r\r\tself systemNavigation \r\t\tshowMenuOf: messages\r\t\twithFirstItem: selector\r\t\tifChosenDo: [:sel | aBlock value: sel]! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'nk 11/15/2002 12:23'!\rsystemCatListKey: aChar from: view\r\t\"Respond to a Command key.  I am a model with a code pane, and I also have a listView that has a list of methods.  The view knows how to get the list and selection.\"\r\r\taChar == $f ifTrue: [^ self findClass].\r\taChar == $x ifTrue: [^ self removeSystemCategory].\r\t^ self classListKey: aChar from: view! !\r\r!StringHolder methodsFor: 'message list menu' stamp: 'sw 12/6/2000 21:01'!\rtimeStamp\r\t\"Answer the time stamp for the chosen class and method, if any, else an empty string\"\r\r\t|  selector  aMethod |\r\t(selector _ self selectedMessageName) ifNotNil:\r\t\t[self selectedClassOrMetaClass \r\t\t\tifNil:\r\t\t\t\t[^ String new]\r\t\t\tifNotNil:\r\t\t\t\t[aMethod _ self selectedClassOrMetaClass compiledMethodAt: selector ifAbsent: [nil].\r\t\t\t\taMethod ifNotNil: [^ Utilities timeStampForMethod: aMethod]]].\r\t^ String new! !\r\r\r!StringHolder methodsFor: 'optional panes' stamp: 'sw 1/24/2001 21:25'!\rwantsAnnotationPane\r\t\"Answer whether the receiver, seen in some browser window, would like to have the so-called  annotationpane included.  By default, various browsers defer to the global preference 'optionalButtons' -- but individual subclasses can insist to the contrary.\"\r\r\t^ Preferences annotationPanes! !\r\r!StringHolder methodsFor: 'optional panes' stamp: 'sw 1/24/2001 18:57'!\rwantsOptionalButtons\r\t\"Answer whether the receiver, seen in some browser window, would like to have the so-called optional button pane included.  By default, various browsers defer to the global preference 'optionalButtons' -- but individual subclasses can insist to the contrary.\"\r\r\t^ Preferences optionalButtons! !\r\r\r\r!StringHolder methodsFor: 'user edits' stamp: 'di 4/21/1998 11:30'!\rclearUserEditFlag\r\t\"Clear the hasUnacceptedEdits flag in all my dependent views.\"\r\r\tself changed: #clearUserEdits! !\r\r!StringHolder methodsFor: 'user edits' stamp: 'tk 4/13/1998 23:07'!\rokToChange\r\r\tself canDiscardEdits ifTrue: [^ true].\r\tself changed: #wantToChange.  \"Solicit cancel from view\"\r\t^ self canDiscardEdits\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rStringHolder class\r\tinstanceVariableNames: ''!\r\r!StringHolder class methodsFor: 'class initialization'!\rinitialize\r\t\"The class variables were initialized once, and subsequently filled with\r\tinformation. Re-executing this method is therefore dangerous.\" \r\t \r\t\"workSpace _ StringHolder new\"\r\r\t\"StringHolder initialize\"! !\r\r\r!StringHolder class methodsFor: 'instance creation' stamp: 'tk 5/4/1998 17:32'!\ropen\r\t(Smalltalk at: #Workspace) new openLabel: 'Workspace'\r\t\t\"Not to be confused with our own class var 'Workspace'\"! !\r\r!StringHolder class methodsFor: 'instance creation' stamp: 'tk 5/4/1998 16:41'!\ropenLabel: aString\r\r\tself new openLabel: aString! !\r\rParagraphEditor subclass: #StringHolderController\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'CodeYellowButtonMenu CodeYellowButtonMessages'\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Support'!\r!StringHolderController commentStamp: '<historical>' prior: 0!\rI represent a ParagraphEditor for a single paragraph of text, omitting alignment commands. I provide items in the yellow button menu so that the text selection can be evaluated and so that the contents of the model can be stored or restored.\r\tdoIt\tevaluate the text selection as an expression\r\tprintIt\tsame as doIt but insert a description of the result after the selection\r\taccept\tstore the contents of the StringHolder into the model\r\tcancel\tstore the contents of the model into the StringHolder!\r\r\r!StringHolderController methodsFor: 'accessing' stamp: 'di 6/21/2001 10:32'!\rchangeText: aText\r\t\"The paragraph to be edited is changed to aText.\"\r\tparagraph text: aText.\r\tself resetState.\r\tself selectInvisiblyFrom: paragraph text size + 1 to: paragraph text size.\r\tself selectAndScroll.\r\tself deselect! !\r\r!StringHolderController methodsFor: 'accessing'!\rmodel: aModel\r\r\tsuper model: aModel.\r\tview displayContents == nil\r\t\tifFalse: [self changeParagraph: view displayContents]! !\r\r\r!StringHolderController methodsFor: 'edit flag' stamp: 'di 10/9/1998 15:41'!\rhasUnacceptedEdits: aBoolean\r\t^ view hasUnacceptedEdits: aBoolean! !\r\r!StringHolderController methodsFor: 'edit flag' stamp: 'tk 4/13/1998 23:09'!\ruserHasEdited\r\t\"Note that the user has edited my text.\"\r\r\tview hasUnacceptedEdits: true\r! !\r\r!StringHolderController methodsFor: 'edit flag' stamp: 'tk 4/13/1998 23:08'!\ruserHasNotEdited\r\t\"Note that my text is free of user edits.\"\r\r\tmodel clearUserEditFlag\r! !\r\r\r!StringHolderController methodsFor: 'menu messages' stamp: 'jm 3/18/98 20:53'!\raccept \r\t\"Refer to the comment in ParagraphEditor|accept.\"\r\r\tsuper accept.\r\tmodel contents: paragraph string.\r\tself userHasNotEdited.\r! !\r\r!StringHolderController methodsFor: 'menu messages' stamp: 'jm 3/18/98 20:54'!\rcancel \r\t\"Refer to the comment in ParagraphEditor|cancel.\"\r\r\tsuper cancel.\r\tself userHasNotEdited.\r! !\r\r!StringHolderController methodsFor: 'menu messages' stamp: 'tk 4/13/1998 23:14'!\rperformMenuMessage: aSelector\r\t\"Intercept #again so the model does not get locked by keying the search text.\"\r\r\t| hadEdits |\r\thadEdits _ view canDiscardEdits not.\r\tsuper performMenuMessage: aSelector.\r\t(hadEdits not and:\r\t [aSelector == #again and:\r\t [(UndoMessage sends: #undoAgain:andReselect:typedKey:) and:\r\t [UndoMessage arguments at: 3]]])\r\t\tifTrue: [self userHasNotEdited].\r! !\r\r\r!StringHolderController methodsFor: 'compiler access'!\rbindingOf: aString\r\t^model bindingOf: aString! !\r\r\r!StringHolderController methodsFor: 'private' stamp: 'jm 3/18/98 20:43'!\rcloseTypeIn\r\t\"Note edit if something actually was typed.\"\r\r\tbeginTypeInBlock ~~ nil ifTrue: [self userHasEdited].\r\tsuper closeTypeIn.\r! !\r\r!StringHolderController methodsFor: 'private' stamp: 'jm 3/18/98 20:45'!\rzapSelectionWith: aText\r\t\"Note edit except during typeIn, which notes edits at close.\"\r\r\tsuper zapSelectionWith: aText.\r\tbeginTypeInBlock == nil ifTrue: [self userHasEdited].\r! !\rView subclass: #StringHolderView\r\tinstanceVariableNames: 'displayContents hasUnacceptedEdits askBeforeDiscardingEdits'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Support'!\r!StringHolderView commentStamp: '<historical>' prior: 0!\rI am a View of a String that is an aspect of a more structured object. This String should not be changed by any editing unless the user issues the accept command. Thus my instances provide a working copy of the String. This copy is edited. When the user issues the accept command, the String is copied from the working version; or if the user issues the cancel command, the working version is restored from the String. StringHolderController is my default controller. It is initialized specially by passing the string viewed which is then converted to a Paragraph for editing.!\r\r\r!StringHolderView methodsFor: 'initialize-release' stamp: 'jm 3/24/98 14:39'!\rinitialize \r\t\"Refer to the comment in View|initialize.\"\r\r\tsuper initialize.\r\tdisplayContents _ '' asParagraph.\r\thasUnacceptedEdits _ false.\r\taskBeforeDiscardingEdits _ true.\r! !\r\r\r!StringHolderView methodsFor: 'updating' stamp: 'jm 3/24/98 14:38'!\raskBeforeDiscardingEdits: aBoolean\r\t\"Set the flag that determines whether the user should be asked before discarding unaccepted edits.\"\r\r\taskBeforeDiscardingEdits _ aBoolean.\r! !\r\r!StringHolderView methodsFor: 'updating' stamp: 'tk 4/13/1998 22:58'!\rcanDiscardEdits\r\t\"Return true if this view either has no text changes or does not care.\"\r\r\t^ (hasUnacceptedEdits & askBeforeDiscardingEdits) not\r! !\r\r!StringHolderView methodsFor: 'updating' stamp: 'jm 3/24/98 17:49'!\rhasUnacceptedEdits\r\t\"Return true if this view has unaccepted edits.\"\r\r\t^ hasUnacceptedEdits\r! !\r\r!StringHolderView methodsFor: 'updating' stamp: 'tk 4/13/1998 17:17'!\rhasUnacceptedEdits: aBoolean\r\t\"Set the hasUnacceptedEdits flag to the given value.\"\r\r\thasUnacceptedEdits _ aBoolean.\r! !\r\r!StringHolderView methodsFor: 'updating' stamp: 'dgd 9/21/2003 17:42'!\rpromptForCancel\r\t\"Ask if it is OK to cancel changes to text\"\r\t| okToCancel stripes |\r\tself topView isCollapsed ifTrue:\r\t\t[(self confirm: 'Changes have not been saved.\rIs it OK to cancel those changes?' translated) ifTrue: [model clearUserEditFlag].\r\t\t^ self].\r\tstripes _ (Form extent: 16@16 fromStipple: 16r36C9) bits.\r\tDisplay border: self insetDisplayBox width: 4\r\t\t\trule: Form reverse fillColor: stripes.\r\tokToCancel _ self confirm: 'Changes have not been saved.\rIs it OK to cancel those changes?' translated.\r\tDisplay border: self insetDisplayBox width: 4\r\t\t\trule: Form reverse fillColor: stripes.\r\tokToCancel ifTrue:\r\t\t[self updateDisplayContents.\r\t\tmodel clearUserEditFlag].\r! !\r\r!StringHolderView methodsFor: 'updating' stamp: 'di 4/21/1998 11:30'!\rupdate: aSymbol\r\t\"Refer to the comment in View|update:.\"\r\taSymbol == #wantToChange ifTrue: [^ self promptForCancel].\r\taSymbol == #clearUserEdits ifTrue: [^ self hasUnacceptedEdits: false].\r\taSymbol == #flash ifTrue: [^ controller flash].\r\tself updateDisplayContents! !\r\r!StringHolderView methodsFor: 'updating'!\rupdateDisplayContents\r\t\"Make the text that is displayed be the contents of the receiver's model.\"\r\r\tself editString: model contents.\r\tself displayView! !\r\r\r!StringHolderView methodsFor: 'controller access'!\rdefaultController \r\t\"Refer to the comment in View|defaultController.\"\r\r\t^self defaultControllerClass newParagraph: displayContents! !\r\r!StringHolderView methodsFor: 'controller access'!\rdefaultControllerClass \r\t\"Refer to the comment in View|defaultControllerClass.\"\r\r\t^StringHolderController! !\r\r!StringHolderView methodsFor: 'controller access'!\rdisplayContents\r\r\t^displayContents! !\r\r\r!StringHolderView methodsFor: 'displaying'!\rdisplay \r\t\"Refer to the comment in View.display.\"\r\t(self isUnlocked and: [self insetDisplayBox ~= displayContents clippingRectangle])\r\t\tifTrue:  \"Recompose the text if the window changed\"\r\t\t\t\t[self positionDisplayContents. \r\t\t\t\t(self controller isKindOf: ParagraphEditor)\r\t\t\t\t\tifTrue: [controller recomputeSelection]].\r\tsuper display! !\r\r!StringHolderView methodsFor: 'displaying' stamp: 'hmm 6/18/2000 19:24'!\rdisplayView \r\t\"Refer to the comment in View|displayView.\"\r\r\tDisplay deferUpdatesIn: self displayBox while: [\r\t\tself clearInside.\r\t\t(self controller isKindOf: ParagraphEditor)\r\t\t\tifTrue: [controller display]\r\t\t\tifFalse: [displayContents display]]! !\r\r!StringHolderView methodsFor: 'displaying'!\rlock\r\t\"Refer to the comment in view|lock.  Must do at least what display would do to lock the view.\"\r\t(self isUnlocked and: [self insetDisplayBox ~= displayContents clippingRectangle])\r\t\tifTrue:  \"Recompose the text if the window changed\"\r\t\t\t\t[self positionDisplayContents. \r\t\t\t\t(self controller isKindOf: ParagraphEditor)\r\t\t\t\t\tifTrue: [controller recomputeSelection]].\r\tsuper lock! !\r\r!StringHolderView methodsFor: 'displaying'!\rpositionDisplayContents\r\t\"Presumably the text being displayed changed so that the wrapping box \r\tand clipping box should be reset.\"\r\r\tdisplayContents \r\t\twrappingBox: (self insetDisplayBox insetBy: 6 @ 0)\r\t\tclippingBox: self insetDisplayBox! !\r\r\r!StringHolderView methodsFor: 'model access'!\reditString: aString \r\t\"The paragraph to be displayed is created from the characters in aString.\"\r\r\tdisplayContents _ Paragraph withText: aString asText\r\t\tstyle: TextStyle default copy\r\t\tcompositionRectangle: (self insetDisplayBox insetBy: 6 @ 0)\r\t\tclippingRectangle: self insetDisplayBox\r\t\tforeColor: self foregroundColor backColor: self backgroundColor.\r\t(self controller isKindOf: ParagraphEditor)\r\t\tifTrue: [controller changeParagraph: displayContents]! !\r\r!StringHolderView methodsFor: 'model access' stamp: 'sma 5/28/2000 23:25'!\rgetMenu: shiftKeyState\r\t^ nil! !\r\r!StringHolderView methodsFor: 'model access'!\rmodel: aLockedModel \r\t\"Refer to the comment in View|model:.\"\r \r\tsuper model: aLockedModel.\r\tself editString: model contents! !\r\r\r!StringHolderView methodsFor: 'deEmphasizing'!\rdeEmphasizeView \r\t\"Refer to the comment in View|deEmphasizeView.\"\r\r\t(self controller isKindOf: ParagraphEditor)\r\t \tifTrue: [controller deselect]! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rStringHolderView class\r\tinstanceVariableNames: ''!\r\r!StringHolderView class methodsFor: 'instance creation'!\rcontainer\r\t\"Answer an instance of me with a new instance of StringHolder as the \r\tmodel.\"\r\r\t^self container: StringHolder new! !\r\r!StringHolderView class methodsFor: 'instance creation'!\rcontainer: aContainer \r\t\"Answer an instance of me whose model is aContainer. Give it a 2-dot \r\tborder.\"\r\r\t| aCodeView |\r\taCodeView _ self new model: aContainer.\r\taCodeView borderWidthLeft: 2 right: 2 top: 2 bottom: 2.\r\t^aCodeView! !\r\r!StringHolderView class methodsFor: 'instance creation'!\ropen\r\t\"Create a standard system view of a workspace on the screen.\"\r\r\tself open: Workspace new label: 'Workspace'! !\r\r!StringHolderView class methodsFor: 'instance creation'!\ropen: aStringHolder \r\t\"Create a standard system view of the argument, aStringHolder, as viewed \r\tby an instance of me. The view has label 'StringHolder'.\"\r\r\tself open: aStringHolder label: 'StringHolder'! !\r\r!StringHolderView class methodsFor: 'instance creation' stamp: 'BG 10/28/2003 20:43'!\ropen: aStringHolder label: labelString \r\t\"NOTE this should be in the model class, and all senders so redirected,\r\tin order that the view class can be discarded in a morphic world.\"\r\r\t\"Create a standard system view of the model, aStringHolder, as viewed by \r\tan instance of me. The label of the view is aString.\"\r\t| aStringHolderView topView |\r\r\r\taStringHolderView _ self container: aStringHolder.\r\ttopView _ StandardSystemView new.\r\ttopView model: aStringHolderView model.\r\ttopView addSubView: aStringHolderView.\r\ttopView label: labelString.\r\ttopView minimumSize: 100 @ 50.\r\ttopView controller open! !\rModel subclass: #Switch\r\tinstanceVariableNames: 'on onAction offAction'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Menus'!\r!Switch commentStamp: '<historical>' prior: 0!\rI represent a selection setting and actions to take depending on a change in the setting. An instance has three attributes: state, which is either on or off; on action; and off action. The on and off actions are blocks of code that execute whenever the instance changes state. I am typically used as a menu item in conjunction with a SwitchView and a SwitchController.\r1/24/96 sw: made this a subclass of Model, for faster dependents handling!\r\r\r!Switch methodsFor: 'state'!\rclear\r\t\"Set the state of the receiver to 'off'. If the state of the receiver was \r\tpreviously 'on', then 'self change' is sent. The receiver's off action is \r\tNOT executed.\"\r\r\tself isOn\r\t\tifTrue: \r\t\t\t[on _ false.\r\t\t\tself changed]! !\r\r!Switch methodsFor: 'state'!\risOff\r\t\"Answer whether the receiver is set off or not.\"\r\r\t^on not! !\r\r!Switch methodsFor: 'state'!\risOn\r\t\"Answer whether the receiver is set on or not.\"\r\r\t^on! !\r\r!Switch methodsFor: 'state'!\rset\r\t\"Set the state of the receiver to 'on'. If the state of the receiver was \r\tpreviously 'off', then 'self change' is sent. The receiver's on action is \r\tNOT executed.\"\r\r\tself isOff\r\t\tifTrue: \r\t\t\t[on _ true.\r\t\t\tself changed]! !\r\r!Switch methodsFor: 'state'!\rswitch\r\t\"Change the state of the receiver from 'on' to 'off' or from 'off' to 'on' (see \r\tSwitch|turnOn, Switch|turnOff).\"\r\r\tself isOn\r\t\tifTrue: [self turnOff]\r\t\tifFalse: [self turnOn]! !\r\r!Switch methodsFor: 'state'!\rturnOff\r\t\"Set the state of the receiver to 'off'. If the state of the receiver was \r\tpreviously 'on', then 'self change' is sent and the receiver's off action is \r\texecuted.\"\r\r\tself isOn\r\t\tifTrue: \r\t\t\t[on _ false.\r\t\t\tself changed.\r\t\t\tself doAction: offAction]! !\r\r!Switch methodsFor: 'state'!\rturnOn\r\t\"Set the state of the receiver to 'on'. If the state of the receiver was \r\tpreviously 'off', then 'self change' is sent and the receiver's on action is \r\texecuted.\"\r\r\tself isOff\r\t\tifTrue: \r\t\t\t[on _ true.\r\t\t\tself changed.\r\t\t\tself doAction: onAction]! !\r\r\r!Switch methodsFor: 'action'!\rdoAction: anAction \r\t\"Execute anAction if it is non-nil.\"\r\r\tanAction == nil ifFalse: [anAction value]! !\r\r!Switch methodsFor: 'action'!\roffAction: anAction \r\t\"Set the off action of the receiver to anAction.\"\r\r\toffAction _ anAction fixTemps! !\r\r!Switch methodsFor: 'action'!\ronAction: anAction \r\t\"Set the on action of the receiver to anAction.\"\r\r\tonAction _ anAction fixTemps! !\r\r\r!Switch methodsFor: 'private'!\rinitializeOff\r\r\ton _ false. \r\tonAction _ nil.\r\toffAction _ nil! !\r\r!Switch methodsFor: 'private'!\rinitializeOn\r\r\ton _ true. \r\tonAction _ nil.\r\toffAction _ nil! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rSwitch class\r\tinstanceVariableNames: ''!\r\r!Switch class methodsFor: 'instance creation'!\rnew\r\t\"Answer an instance of me such that the on and off actions are set to nil\r\t('no action'), and the state is set to 'off'.\"\r\r\t^self newOff! !\r\r!Switch class methodsFor: 'instance creation'!\rnewOff\r\t\"Answer an instance of me such that the on and off actions are set to nil \r\t('no action'), and the state is set to 'off'.\"\r\r\t^super new initializeOff! !\r\r!Switch class methodsFor: 'instance creation'!\rnewOn\r\t\"Answer an instance of me such that the on and off actions are set to nil \r\t('no action'), and the state is set to 'on'.\"\r\r\t^super new initializeOn! !\rString variableByteSubclass: #Symbol\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'NewSymbols OneCharacterSymbols SymbolTable'\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Text'!\r!Symbol commentStamp: '<historical>' prior: 0!\rI represent Strings that are created uniquely. Thus, someString asSymbol == someString asSymbol.!\r\r\r!Symbol methodsFor: 'accessing'!\rat: anInteger put: anObject \r\t\"You cannot modify the receiver.\"\r\r\tself errorNoModification! !\r\r!Symbol methodsFor: 'accessing' stamp: 'sma 2/5/2000 12:32'!\rprecedence\r\t\"Answer the receiver's precedence, assuming it is a valid Smalltalk\r\tmessage selector or 0 otherwise.  The numbers are 1 for unary,\r\t2 for binary and 3 for keyword selectors.\"\r\r\tself size = 0 ifTrue: [^ 0].\r\tself first isLetter ifFalse: [^ 2].\r\tself last = $: ifTrue: [^ 3].\r\t^ 1! !\r\r!Symbol methodsFor: 'accessing'!\rreplaceFrom: start to: stop with: replacement startingAt: repStart\r\r\tself errorNoModification! !\r\r\r!Symbol methodsFor: 'comparing' stamp: 'di 4/11/2000 16:18'!\r= another\r\r\t\"Use == between two symbols...\"\r\tself == another ifTrue: [^ true].  \"Was == \"\r\tanother class == Symbol ifTrue: [^ false].  \"Was not == \"\r\r\t\"Otherwise use string =...\"\r\t^ super = another! !\r\r!Symbol methodsFor: 'comparing' stamp: 'pm 9/23/97 09:36'!\rhashMappedBy: map\r\t\"Answer what my hash would be if oops changed according to map.\"\r\r\t^map newHashFor: self! !\r\r\r!Symbol methodsFor: 'copying' stamp: 'tk 6/26/1998 11:35'!\rclone\r\t\"Answer with the receiver, because Symbols are unique.\"! !\r\r!Symbol methodsFor: 'copying'!\rcopy\r\t\"Answer with the receiver, because Symbols are unique.\"! !\r\r!Symbol methodsFor: 'copying'!\rshallowCopy\r\t\"Answer with the receiver, because Symbols are unique.\"! !\r\r!Symbol methodsFor: 'copying' stamp: 'tk 8/19/1998 16:05'!\rveryDeepCopyWith: deepCopier\r\t\"Return self.  I am immutable in the Morphic world.  Do not record me.\"! !\r\r\r!Symbol methodsFor: 'converting'!\rasString \r\t\"Refer to the comment in String|asString.\"\r\r\t| newString |\r\tnewString _ String new: self size.\r\t1 to: self size do: [:index | newString at: index put: (self at: index)].\r\t^newString! !\r\r!Symbol methodsFor: 'converting'!\rasSymbol \r\t\"Refer to the comment in String|asSymbol.\"! !\r\r!Symbol methodsFor: 'converting' stamp: 'sw 1/28/98 18:18'!\rcapitalized\r\t^ self asString capitalized asSymbol! !\r\r\r!Symbol methodsFor: 'printing' stamp: 'sw 8/19/1999 11:30'!\risOrientedFill\r\t\"Needs to be implemented here because symbols can occupy 'color' slots of morphs.\"\r\r\t^ false! !\r\r!Symbol methodsFor: 'printing' stamp: 'di 4/25/2000 12:32'!\rstoreOn: aStream \r\r\taStream nextPut: $#.\r\t(Scanner isLiteralSymbol: self)\r\t\tifTrue: [aStream nextPutAll: self]\r\t\tifFalse: [super storeOn: aStream]! !\r\r\r!Symbol methodsFor: 'system primitives' stamp: 'di 1/2/1999 17:00'!\rflushCache\r\t\"Tell the interpreter to remove all entries with this symbol as a selector from its method lookup cache, if it has one.  This primitive must be called whenever a method is defined or removed.\r\tNOTE:  Only one of the two selective flush methods needs to be used.\r\tSqueak 2.3 and later uses 116 (See CompiledMethod flushCache).\"\r\r\t<primitive: 119>\r! !\r\r\r!Symbol methodsFor: 'private'!\rerrorNoModification\r\r\tself error: 'symbols can not be modified.'! !\r\r!Symbol methodsFor: 'private'!\rspecies\r\r\t^String! !\r\r!Symbol methodsFor: 'private'!\rstring: aString\r\r\t1 to: aString size do: [:j | super at: j put: (aString at: j)].\r\t^self  ! !\r\r!Symbol methodsFor: 'private'!\rstringhash\r\r\t^super hash! !\r\r\r!Symbol methodsFor: 'filter streaming' stamp: 'mpw 1/1/1901 00:20'!\rbyteEncode:aStream\r\t^aStream writeSymbol:self.\r! !\r\r\r!Symbol methodsFor: 'testing' stamp: 'sma 2/5/2000 12:32'!\risInfix\r\t\"Answer whether the receiver is an infix message selector.\"\r\r\t^ self precedence == 2! !\r\r!Symbol methodsFor: 'testing' stamp: 'sma 2/5/2000 12:34'!\risKeyword\r\t\"Answer whether the receiver is a message keyword.\"\r\r\t^ self precedence == 3! !\r\r!Symbol methodsFor: 'testing' stamp: 'di 4/25/2000 12:32'!\risLiteral\r\t\"Answer whether the receiver is a valid Smalltalk literal.\"\r\r\t^ true! !\r\r!Symbol methodsFor: 'testing' stamp: 'sma 2/5/2000 12:13'!\risPvtSelector\r\t\"Answer whether the receiver is a private message selector, that is,\r\tbegins with 'pvt' followed by an uppercase letter, e.g. pvtStringhash.\"\r\r\t^ (self beginsWith: 'pvt') and: [self size >= 4 and: [(self at: 4) isUppercase]]! !\r\r!Symbol methodsFor: 'testing' stamp: 'md 4/30/2003 15:31'!\risSymbol\r\t^ true ! !\r\r!Symbol methodsFor: 'testing' stamp: 'sma 2/5/2000 12:34'!\risUnary\r\t\"Answer whether the receiver is an unary message selector.\"\r\r\t^ self precedence == 1! !\r\r\r!Symbol methodsFor: 'user interface' stamp: 'sma 11/12/2000 11:46'!\rasExplorerString\r\t^ self printString! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rSymbol class\r\tinstanceVariableNames: ''!\r\r!Symbol class methodsFor: 'access' stamp: 'RAA 5/29/2001 14:34'!\rselectorsContaining: aString\r\t\"Answer a list of selectors that contain aString within them. Case-insensitive.  Does return symbols that begin with a capital letter.\"\r\r\t| size selectorList ascii |\r\r\tselectorList _ OrderedCollection new.\r\t(size _ aString size) = 0 ifTrue: [^selectorList].\r\r\taString size = 1 ifTrue:\r\t\t[\r\t\t\tascii _ aString first asciiValue.\r\t\t\tascii < 128 ifTrue: [selectorList add: (OneCharacterSymbols at: ascii+1)]\r\t\t].\r\r\taString first isLetter ifFalse:\r\t\t[\r\t\t\taString size == 2 ifTrue: \r\t\t\t\t[Symbol hasInterned: aString ifTrue:\r\t\t\t\t\t[:s | selectorList add: s]].\r\t\t\t^selectorList\r\t\t].\r\r\tselectorList _ selectorList copyFrom: 2 to: selectorList size.\r\r\tself allSymbolTablesDo: [:each |\r\t\teach size >= size ifTrue:\r\t\t\t[(each findSubstring: aString in: each startingAt: 1 \r\t\t\t\tmatchTable: CaseInsensitiveOrder) > 0\r\t\t\t\t\t\tifTrue: [selectorList add: each]]].\r\r\t^selectorList reject: [:each | \"reject non-selectors, but keep ones that begin with an uppercase\"\r\t\teach numArgs < 0 and: [each asString withFirstCharacterDownshifted numArgs < 0]].\r\r\"Symbol selectorsContaining: 'scon'\"! !\r\r!Symbol class methodsFor: 'access' stamp: 'RAA 5/29/2001 14:35'!\rthatStarts: leadingCharacters skipping: skipSym\r\t\"Answer a selector symbol that starts with leadingCharacters.\r\tSymbols beginning with a lower-case letter handled directly here.\r\tIgnore case after first char.\r\tIf skipSym is not nil, it is a previous answer; start searching after it.\r\tIf no symbols are found, answer nil.\r\tUsed by Alt-q (Command-q) routines\"\r\r\t| size firstMatch key |\r\r\tsize _ leadingCharacters size.\r\tsize = 0 ifTrue: [^skipSym ifNil: [#''] ifNotNil: [nil]].\r\r\tfirstMatch _ leadingCharacters at: 1.\r\tsize > 1 ifTrue: [key _ leadingCharacters copyFrom: 2 to: size].\r\r\tself allSymbolTablesDo: [:each |\r\t\t\teach size >= size ifTrue:\r\t\t\t\t[\r\t\t\t\t\t((each at: 1) == firstMatch and:\r\t\t\t\t\t\t[key == nil or:\r\t\t\t\t\t\t\t[(each findString: key startingAt: 2 caseSensitive: false) = 2]])\r\t\t\t\t\t\t\t\tifTrue: [^each]\r\t\t\t\t]\r\t\t] after: skipSym.\r\r\t^nil\r\r\"Symbol thatStarts: 'sf' skipping: nil\"\r\"Symbol thatStarts: 'sf' skipping: #sfpGetFile:with:with:with:with:with:with:with:with:\"\r\"Symbol thatStarts: 'candidate' skipping: nil\"\r! !\r\r\r!Symbol class methodsFor: 'class initialization' stamp: 'RAA 5/29/2001 08:21'!\rallSymbolTablesDo: aBlock\r\r\tNewSymbols do: aBlock.\r\tSymbolTable do: aBlock.! !\r\r!Symbol class methodsFor: 'class initialization' stamp: 'RAA 5/29/2001 14:35'!\rallSymbolTablesDo: aBlock after: aSymbol\r\r\tNewSymbols do: aBlock after: aSymbol.\r\tSymbolTable do: aBlock after: aSymbol.! !\r\r!Symbol class methodsFor: 'class initialization' stamp: 'RAA 12/17/2000 18:05'!\rcompactSymbolTable\r\t\"Reduce the size of the symbol table so that it holds all existing symbols + 25% (changed from 1000 since sets like to have 25% free and the extra space would grow back in a hurry)\"\r\r\t| oldSize |\r\r\tSmalltalk garbageCollect.\r\toldSize _ SymbolTable array size.\r\tSymbolTable growTo: SymbolTable size * 4 // 3 + 100.\r\t^oldSize printString,'  ',(oldSize - SymbolTable array size) printString, ' slot(s) reclaimed'! !\r\r!Symbol class methodsFor: 'class initialization' stamp: 'RAA 5/29/2001 09:04'!\rinitialize\r\r\t\"Symbol initialize\"\r\r\tSymbol rehash.\r\tOneCharacterSymbols _ nil.\r\tOneCharacterSymbols _ (1 to: 256) collect: [ :i | (i - 1) asCharacter asSymbol].\r\tSmalltalk addToShutDownList: self.\r! !\r\r\r!Symbol class methodsFor: 'instance creation' stamp: 'RAA 5/29/2001 08:10'!\rintern: aStringOrSymbol\r\r\t^(self lookup: aStringOrSymbol)\r\t\tifNil:\r\t\t\t[\r\t\t\t\tNewSymbols add:\r\t\t\t\t\t((aStringOrSymbol isKindOf: Symbol)\r\t\t\t\t\t\tifTrue: [aStringOrSymbol]\r\t\t\t\t\t\tifFalse: [(self new: aStringOrSymbol size) string: aStringOrSymbol])\r\t\t\t]! !\r\r!Symbol class methodsFor: 'instance creation' stamp: 'raa 5/26/2001 09:54'!\rinternCharacter: aCharacter\r\r\tOneCharacterSymbols ifNil: [^self intern: aCharacter asString].\r\r\t^OneCharacterSymbols at: aCharacter asciiValue + 1\r! !\r\r!Symbol class methodsFor: 'instance creation' stamp: 'RAA 5/29/2001 08:09'!\rlookup: aStringOrSymbol\r\r\t^(SymbolTable like: aStringOrSymbol) ifNil: [\r\t\tNewSymbols like: aStringOrSymbol\r\t]! !\r\r!Symbol class methodsFor: 'instance creation'!\rnewFrom: aCollection \r\t\"Answer an instance of me containing the same elements as aCollection.\"\r\r\t^ (aCollection as: String) asSymbol\r\r\"\tSymbol newFrom: {$P. $e. $n}\r\t{$P. $e. $n} as: Symbol\r\"! !\r\r!Symbol class methodsFor: 'instance creation' stamp: 'di 10/11/1999 00:02'!\rreadFrom: strm  \"Symbol readFromString: '#abc'\"\r\r\tstrm peek = $# ifFalse: [self error: 'Symbols must be introduced by #'].\r\t^ (Scanner new scan: strm) advance  \"Just do what the code scanner does\"! !\r\r\r!Symbol class methodsFor: 'private' stamp: 'RAA 5/29/2001 08:23'!\rhasInterned: aString ifTrue: symBlock \r\t\"Answer with false if aString hasnt been interned (into a Symbol), \r\totherwise supply the symbol to symBlock and return true.\"\r\r\t| symbol |\r\r\t^(symbol _ self lookup: aString)\r\t\tifNil: [false]\r\t\tifNotNil: [symBlock value: symbol. true]\r! !\r\r!Symbol class methodsFor: 'private' stamp: 'RAA 5/29/2001 14:33'!\rpossibleSelectorsFor: misspelled \r\t\"Answer an ordered collection of possible corrections\r\tfor the misspelled selector in order of likelyhood\"\r\r\t| numArgs candidates lookupString best binary short long first ss |\r\tlookupString _ misspelled asLowercase. \"correct uppercase selectors to lowercase\"\r\tnumArgs _ lookupString numArgs.\r\t(numArgs < 0 or: [lookupString size < 2]) ifTrue: [^ OrderedCollection new: 0].\r\tfirst _ lookupString first.\r\tshort _ lookupString size - (lookupString size // 4 max: 3) max: 2.\r\tlong _ lookupString size + (lookupString size // 4 max: 3).\r\r\t\"First assemble candidates for detailed scoring\"\r\tcandidates _ OrderedCollection new.\r\tself allSymbolTablesDo: [:s | (((ss _ s size) >= short\t\"not too short\"\r\t\t\tand: [ss <= long\t\t\t\"not too long\"\r\t\t\t\t\tor: [(s at: 1) = first]])\t\"well, any length OK if starts w/same letter\"\r\t\t\tand: [s numArgs = numArgs])\t\"and numArgs is the same\"\r\t\t\tifTrue: [candidates add: s]].\r\r\t\"Then further prune these by correctAgainst:\"\r\tbest _ lookupString correctAgainst: candidates.\r\t((misspelled last ~~ $:) and: [misspelled size > 1]) ifTrue: [\r\t\tbinary _ misspelled, ':'.\t\t\"try for missing colon\"\r\t\tSymbol hasInterned: binary ifTrue: [:him | best addFirst: him]].\r\t^ best! !\r\r!Symbol class methodsFor: 'private' stamp: 'RAA 5/29/2001 08:01'!\rrehash\t\t\"Symbol rehash\"\r\t\"Rebuild the hash table, reclaiming unreferenced Symbols.\"\r\r\tSymbolTable _ WeakSet withAll: self allInstances.\r\tNewSymbols _ WeakSet new.! !\r\r!Symbol class methodsFor: 'private' stamp: 'RAA 5/29/2001 09:04'!\rshutDown: aboutToQuit\r\r\tSymbolTable addAll: NewSymbols.\r\tNewSymbols _ WeakSet new.! !\rStringHolder subclass: #SyntaxError\r\tinstanceVariableNames: 'class selector category debugger doitFlag'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Debugger'!\r!SyntaxError commentStamp: '<historical>' prior: 0!\rI represent syntax error report for syntax errors encountered when filing in class descriptions from a non-interactive source such as an external file. As a StringHolder, the string to be viewed is the method code or expression containing the error.\r\rThe user may fix the error and accept the method to continue the fileIn.\r!\r\r\r!SyntaxError methodsFor: 'initialization' stamp: 'jm 5/3/1998 14:36'!\rcategory: aSymbol\r\t\"Record the message category of method being compiled. This is used when the user corrects the error and accepts.\"\r\r\tcategory _ aSymbol.\r! !\r\r!SyntaxError methodsFor: 'initialization' stamp: 'tk 5/6/1999 13:28'!\rsetClass: aClass code: aString debugger: aDebugger doitFlag: flag\r\r\t| types printables badChar |\r\tclass _ aClass.\r\tdebugger _ aDebugger.\r\tselector _ aClass parserClass new parseSelector: aString.\r\ttypes _ Scanner classPool at: #TypeTable.\t\"dictionary\"\r\tprintables _ '!!@#$%&*-_=+<>{}?/\\,`~`' asSet.\r\tbadChar _ aString detect: [:aChar | (types at: aChar asciiValue) == #xBinary and: [\r\t\t\t(printables includes: aChar) not]] ifNone: [nil].\r\tcontents _ badChar \r\t\tifNil: [aString]\r\t\tifNotNil: ['<<<This string contains a character (ascii value ', \r\t\t\tbadChar asciiValue printString,\r\t\t\t') that is not normally used in code>>> ', aString].\r\tcategory ifNil: [category _ aClass organization categoryOfElement: selector].\r\tcategory ifNil: [category _ ClassOrganizer default].\r\tdoitFlag _ flag! !\r\r\r!SyntaxError methodsFor: 'message list' stamp: 'tk 4/19/1999 08:08'!\rlist\r\t\"Answer an array of one element made up of the class name, message category, and message selector in which the syntax error was found. This is the single item in the message list of a view/browser on the receiver.\"\r\r\tselector ifNil: [^ Array with: (class name, '  ', category, '  ', '<none>')].\r\t^ Array with: (class name, '  ', category, '  ', selector)\r! !\r\r!SyntaxError methodsFor: 'message list' stamp: 'jm 5/3/1998 13:48'!\rlistIndex\r\t\"There is always exactly one element in my list and it is always selected.\"\r\r\t^ 1\r! !\r\r\r!SyntaxError methodsFor: 'menu' stamp: 'RAA 12/1/2000 14:24'!\rdebug\r\t\"Show the stack of the process leading to this syntax editor, typically showing the stack of the compiler as called from fileIn.\"\r\r\tdebugger openFullNoSuspendLabel: 'Stack of the Syntax Error'.\r\tSmalltalk isMorphic ifFalse: [Processor terminateActive].\r! !\r\r!SyntaxError methodsFor: 'menu' stamp: 'jm 5/3/1998 14:22'!\rlistMenu: aMenu\r\r\t^ aMenu labels:\r'proceed\rdebug calling process\rbrowse full'\r\tlines: #()\r\tselections: #(proceed debug browseMethodFull)\r! !\r\r!SyntaxError methodsFor: 'menu' stamp: 'di 5/5/1998 00:06'!\rproceed\r\t\"The user has has edited and presumably fixed the syntax error and the filein can now proceed.\"\r\r\tdebugger proceed: self topView.\r! !\r\r\r!SyntaxError methodsFor: 'other' stamp: 'di 10/9/1998 16:36'!\rcontents: aString notifying: aController\r\t\"Compile the code in aString and notify aController of any errors. If there are no errors, then automatically proceed.\"\r\r\tdoitFlag\r\tifTrue: [Compiler new evaluate: aString in: nil to: nil\r\t\t\t\t\t\tnotifying: aController ifFail: [^ false]]\r\tifFalse: [(class compile: aString classified: category\r\t\t\t\t\t\tnotifying: aController) ifNil: [^ false]].\r\r\taController hasUnacceptedEdits: false.\r\tself proceed! !\r\r!SyntaxError methodsFor: 'other' stamp: 'di 10/9/1998 16:51'!\rnotify: error at: location in: source\r\t\"Open a syntax error view, inserting the given error message into the given source at the given location. This message is sent to the 'requestor' when the parser or compiler finds a syntax error.\"\r\r\t| aClass aString |\r\taClass _ thisContext sender receiver encoder classEncoding.\r\taString _\r\t\tsource contents\r\t\t\tcopyReplaceFrom: location\r\t\t\tto: location - 1\r\t\t\twith: error.\r\tself setClass: aClass\r\t\tcode: aString\r\t\tdebugger: (Debugger context: thisContext)\r\t\tdoitFlag: false.\r\tself class open: self.\r! !\r\r\r!SyntaxError methodsFor: 'text menu support' stamp: 'jm 5/3/1998 14:15'!\rselectedClass\r\t\"Answer the class in which the syntax error occurred.\"\r\r\t^ class\r! !\r\r!SyntaxError methodsFor: 'text menu support' stamp: 'jm 5/3/1998 14:33'!\rselectedClassOrMetaClass\r\t\"Answer the class of the method being compiled.\"\r\r\t^ class\r! !\r\r!SyntaxError methodsFor: 'text menu support' stamp: 'jm 5/3/1998 14:17'!\rselectedMessageName\r\t\"Answer the selector of the method being compiled.\"\r\r\t^ selector\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rSyntaxError class\r\tinstanceVariableNames: ''!\r\r!SyntaxError class methodsFor: 'instance creation' stamp: 'di 5/6/1998 20:58'!\rbuildMVCViewOn: aSyntaxError\r\t\"Answer an MVC view on the given SyntaxError.\"\r\r\t| topView aListView aCodeView |\r\ttopView _ StandardSystemView new\r\t\tmodel: aSyntaxError;\r\t\tlabel: 'Syntax Error';\r\t\tminimumSize: 380@220.\r\r\taListView _ PluggableListView on: aSyntaxError\r\t\tlist: #list\r\t\tselected: #listIndex\r\t\tchangeSelected: nil\r\t\tmenu: #listMenu:.\r\taListView window: (0@0 extent: 380@20).\r\ttopView addSubView: aListView.\r\r\taCodeView _ PluggableTextView on: aSyntaxError\r\t\ttext: #contents\r\t\taccept: #contents:notifying:\r\t\treadSelection: #contentsSelection\r\t\tmenu: #codePaneMenu:shifted:.\r\taCodeView window: (0@0 extent: 380@200).\r\ttopView addSubView: aCodeView below: aListView.\r\r\t^ topView\r! !\r\r!SyntaxError class methodsFor: 'instance creation' stamp: 'BG 10/29/2003 08:05'!\ropen: aSyntaxError\r\t\"Answer a standard system view whose model is an instance of me.\"\r\t| topView |\r\t<primitive: 19> \"Simulation guard\"\r\t\r\ttopView _ self buildMVCViewOn: aSyntaxError.\r\ttopView controller openNoTerminateDisplayAt: Display extent // 2.\r\tCursor normal show.\r\tProcessor activeProcess suspend.\r! !\rNotification subclass: #SyntaxErrorNotification\r\tinstanceVariableNames: 'inClass code doitFlag debugger'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Exceptions Extensions'!\r\r!SyntaxErrorNotification methodsFor: 'accessing' stamp: 'LC 1/6/2002 13:50'!\rmessageText\r\t^ super messageText\r\t\tifNil: [messageText _ self syntaxError contents]! !\r\r!SyntaxErrorNotification methodsFor: 'accessing' stamp: 'LC 1/6/2002 13:44'!\rsetClass: aClass code: codeString debugger: aDebugger doitFlag: aBoolean\r\tinClass _ aClass.\r\tcode _ codeString.\r\tdebugger _ aDebugger.\r\tdoitFlag _ aBoolean ! !\r\r!SyntaxErrorNotification methodsFor: 'accessing' stamp: 'LC 1/6/2002 13:45'!\rsyntaxError\r\t^ SyntaxError new\r\t\tsetClass: inClass\r\t\tcode: code\r\t\tdebugger: debugger\r\t\tdoitFlag: doitFlag! !\r\r\r!SyntaxErrorNotification methodsFor: 'exceptionDescription' stamp: 'LC 1/6/2002 13:47'!\rdefaultAction\r\t| s |\r\ts _ self syntaxError.\r\t^ s class open: s\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rSyntaxErrorNotification class\r\tinstanceVariableNames: ''!\r\r!SyntaxErrorNotification class methodsFor: 'exceptionInstantiator' stamp: 'LC 1/6/2002 13:52'!\rinClass: aClass withCode: codeString doitFlag: doitFlag \r\t^ (self new\r\t\tsetClass: aClass\r\t\tcode: codeString\r\t\tdebugger: (Debugger context: thisContext)\r\t\tdoitFlag: doitFlag) signal! !\rObject subclass: #SystemChangeNotifier\r\tinstanceVariableNames: 'eventSource silenceLevel'\r\tclassVariableNames: 'UniqueInstance'\r\tpoolDictionaries: ''\r\tcategory: 'System-Change Notification'!\r\r!SystemChangeNotifier methodsFor: 'initialize' stamp: 'NS 1/26/2004 20:41'!\rinitialize\r\r\teventSource := SystemEventManager new.\r\tsilenceLevel _ 0.! !\r\r\r!SystemChangeNotifier methodsFor: 'private' stamp: 'rw 7/10/2003 15:15'!\rnotify: anObject ofEvents: eventsCollection using: oneArgumentSelector\r\t\"Notifies an object of any events in the eventsCollection. Send it back a message #oneArgumentSelector, with as argument the particular system event instance.\"\r\r\teventsCollection do: [:eachEvent |\r\t\teventSource when: eachEvent send: oneArgumentSelector to: anObject]! !\r\r!SystemChangeNotifier methodsFor: 'private' stamp: 'NS 1/26/2004 20:41'!\rtrigger: event\r\r\tself isBroadcasting ifTrue: [event trigger: eventSource]\r\r\"\t| caughtExceptions |\r\tcaughtExceptions := OrderedCollection new.\r\tself isBroadcasting ifTrue: [\r\t\t[(eventSource actionForEvent: event eventSelector) valueWithArguments: (Array with: event)] on: Exception do: [:exc | caughtExceptions add: exc]].\r\tcaughtExceptions do: [:exc | exc resignalAs: exc class new]\"! !\r\r\r!SystemChangeNotifier methodsFor: 'private-event lists' stamp: 'rw 7/29/2003 15:14'!\rallSystemEvents\r\t^AbstractEvent systemEvents! !\r\r\r!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'rw 7/29/2003 15:12'!\rclass: aClass recategorizedFrom: oldCategory to: newCategory \r\tself trigger: (RecategorizedEvent \r\t\t\t\tclass: aClass\r\t\t\t\tcategory: newCategory\r\t\t\t\toldCategory: oldCategory)! !\r\r!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'rw 7/29/2003 15:11'!\rclassAdded: aClass inCategory: aCategoryName \r\tself trigger: (AddedEvent class: aClass category: aCategoryName)! !\r\r!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/26/2004 09:37'!\rclassCommented: aClass\r\t\"A class with the given name was commented in the system.\"\r\r\tself trigger: (CommentedEvent class: aClass)! !\r\r!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/20/2004 19:37'!\rclassDefinitionChangedFrom: oldClass to: newClass\r\tself trigger: (ModifiedClassDefinitionEvent classDefinitionChangedFrom: oldClass to: newClass)! !\r\r!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/16/2004 15:10'!\rclassRemoved: aClass fromCategory: aCategoryName \r\tself trigger: (RemovedEvent class: aClass category: aCategoryName)! !\r\r!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/27/2004 12:19'!\rclassRenamed: aClass from: oldClassName to: newClassName inCategory: aCategoryName \r\tself trigger: (RenamedEvent \r\t\t\t\tclass: aClass\r\t\t\t\tcategory: aCategoryName\r\t\t\t\toldName: oldClassName\r\t\t\t\tnewName: newClassName)! !\r\r!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/27/2004 12:48'!\rclassReorganized: aClass\r\tself trigger: (ReorganizedEvent class: aClass)! !\r\r!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/19/2004 09:47'!\revaluated: expression context: aContext\r\tself trigger: (DoItEvent \r\t\t\t\texpression: expression\r\t\t\t\tcontext: aContext)! !\r\r!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/27/2004 11:24'!\rmethodAdded: aMethod selector: aSymbol inClass: aClass requestor: requestor\r\t\"A method with the given selector was added to aClass, but not put in a protocol.\"\r\r\tself trigger: (AddedEvent\r\t\t\t\tmethod: aMethod \r\t\t\t\tselector: aSymbol\r\t\t\t\tclass: aClass\r\t\t\t\trequestor: requestor)! !\r\r!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/27/2004 11:24'!\rmethodAdded: aMethod selector: aSymbol inProtocol: aCategoryName class: aClass requestor: requestor\r\t\"A method with the given selector was added to aClass in protocol aCategoryName.\"\r\r\tself trigger: (AddedEvent\r\t\t\t\tmethod: aMethod\r\t\t\t\tselector: aSymbol\r\t\t\t\tprotocol: aCategoryName\r\t\t\t\tclass: aClass\r\t\t\t\trequestor: requestor)! !\r\r!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/27/2004 11:41'!\rmethodChangedFrom: oldMethod to: newMethod selector: aSymbol inClass: aClass requestor: requestor\r\tself trigger: (ModifiedEvent\r\t\t\t\t\tmethodChangedFrom: oldMethod\r\t\t\t\t\tto: newMethod\r\t\t\t\t\tselector: aSymbol \r\t\t\t\t\tinClass: aClass\r\t\t\t\t\trequestor: requestor)! !\r\r!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 1/28/2004 11:11'!\rmethodRemoved: aMethod selector: aSymbol inProtocol: protocol class: aClass \r\t\"A method with the given selector was removed from the class.\"\r\r\tself trigger: (RemovedEvent\r\t\t\t\tmethod: aMethod \r\t\t\t\tselector: aSymbol\r\t\t\t\tprotocol: protocol\r\t\t\t\tclass: aClass)! !\r\r!SystemChangeNotifier methodsFor: 'system triggers' stamp: 'NS 4/7/2004 13:35'!\rselector: selector recategorizedFrom: oldCategory to: newCategory inClass: aClass\r\r\tself trigger: (RecategorizedEvent \r\t\t\t\tmethod: (aClass compiledMethodAt: selector ifAbsent: [nil])\r\t\t\t\tprotocol: newCategory\r\t\t\t\tclass: aClass\r\t\t\t\toldProtocol: oldCategory)! !\r\r\r!SystemChangeNotifier methodsFor: 'public' stamp: 'NS 1/28/2004 11:29'!\rdoSilently: aBlock\r\t\"Perform the block, and ensure that no system notification are broadcasted while doing so.\"\r\r\t| result |\r\tsilenceLevel := silenceLevel + 1.\r\t[result := aBlock value] ensure: [silenceLevel > 0 ifTrue: [silenceLevel := silenceLevel - 1]].\r\t^ result.! !\r\r!SystemChangeNotifier methodsFor: 'public' stamp: 'NS 1/26/2004 20:41'!\risBroadcasting\r\r\t^ silenceLevel = 0! !\r\r!SystemChangeNotifier methodsFor: 'public' stamp: 'rw 7/29/2003 17:01'!\rnoMoreNotificationsFor: anObject\r\t\"Stop sending system notifications to an object.\"\r\r\teventSource removeActionsWithReceiver: anObject! !\r\r!SystemChangeNotifier methodsFor: 'public' stamp: 'rw 7/10/2003 12:00'!\rnotify: anObject ofAllSystemChangesUsing: oneArgumentSelector \r\t\"Notifies an object of any system changes.\"\r\r\tself \r\t\tnotify: anObject\r\t\tofEvents: self allSystemEvents\r\t\tusing: oneArgumentSelector! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rSystemChangeNotifier class\r\tinstanceVariableNames: ''!\r\r!SystemChangeNotifier class methodsFor: 'instance creation' stamp: 'rw 6/28/2003 09:41'!\rnew\r\r\t^self error: self instanceCreationErrorString! !\r\r\r!SystemChangeNotifier class methodsFor: 'private' stamp: 'NS 1/27/2004 16:23'!\rcreateInstance\r\r\t^self basicNew initialize! !\r\r!SystemChangeNotifier class methodsFor: 'private' stamp: 'rw 6/28/2003 09:41'!\rinstanceCreationErrorString\r\r\t^'This is a singleton implementation, so you are not allowed to create instances yourself. Use #uniqueInstance to access the instance.'! !\r\r\r!SystemChangeNotifier class methodsFor: 'public' stamp: 'NS 1/27/2004 16:23'!\runiqueInstance\r\r\tUniqueInstance ifNil: [UniqueInstance := self createInstance].\r\t^UniqueInstance! !\r\r\r!SystemChangeNotifier class methodsFor: 'item kinds' stamp: 'NS 1/21/2004 09:31'!\rcategoryKind\r\r\t^ AbstractEvent categoryKind! !\r\r!SystemChangeNotifier class methodsFor: 'item kinds' stamp: 'NS 1/21/2004 09:31'!\rclassKind\r\r\t^ AbstractEvent classKind! !\r\r!SystemChangeNotifier class methodsFor: 'item kinds' stamp: 'NS 1/21/2004 09:32'!\rexpressionKind\r\t^ AbstractEvent expressionKind! !\r\r!SystemChangeNotifier class methodsFor: 'item kinds' stamp: 'NS 1/21/2004 09:31'!\rmethodKind\r\r\t^ AbstractEvent methodKind! !\r\r!SystemChangeNotifier class methodsFor: 'item kinds' stamp: 'NS 1/21/2004 09:32'!\rprotocolKind\r\t^ AbstractEvent protocolKind! !\rIdentityDictionary subclass: #SystemDictionary\r\tinstanceVariableNames: 'cachedClassNames'\r\tclassVariableNames: 'LastImageName LastQuitLogPosition LowSpaceProcess LowSpaceSemaphore MemoryHogs ShutDownList SpecialSelectors StartUpList StartupStamp VersionString'\r\tpoolDictionaries: ''\r\tcategory: 'System-Support'!\r!SystemDictionary commentStamp: '<historical>' prior: 0!\rI represent a special dictionary that supports protocol for asking questions about the structure of the system. Other than class names, I contain (print this)...\r\tSmalltalk keys select: [:k | ((Smalltalk at: k) isKindOf: Class) not]\r\t\t\tthenCollect: [:k | k -> (Smalltalk at: k) class]\r!\r\r\r!SystemDictionary methodsFor: 'accessing' stamp: 'ar 7/11/1999 21:56'!\rorganization\r\t\"Return the organizer for the receiver\"\r\t^SystemOrganization! !\r\r\r!SystemDictionary methodsFor: 'class names' stamp: 'di 3/26/2000 09:06'!\rclassNamed: className \r\t\"className is either a class name or a class name followed by ' class'.\r\tAnswer the class or metaclass it names\"\r\r\t| meta baseName baseClass |\r\t(className endsWith: ' class')\r\t\tifTrue: [meta _ true.\r\t\t\t\tbaseName _ className copyFrom: 1 to: className size - 6]\r\t\tifFalse: [meta _ false.\r\t\t\t\tbaseName _ className].\r\tbaseClass _ Smalltalk at: baseName asSymbol ifAbsent: [^ nil].\r\tmeta\r\t\tifTrue: [^ baseClass class]\r\t\tifFalse: [^ baseClass]! !\r\r!SystemDictionary methodsFor: 'class names' stamp: 'di 11/16/1999 12:44'!\rclassNames\r\t\"Answer a SortedCollection of all class names.\"\r\t| names |\r\tcachedClassNames == nil ifTrue:\r\t\t[names _ OrderedCollection new: self size.\r\t\tself do: \r\t\t\t[:cl | (cl isInMemory and: [(cl isKindOf: Class) and: [(cl name beginsWith: 'AnObsolete') not]])\r\t\t\t\tifTrue: [names add: cl name]].\r\t\tcachedClassNames _ names asSortedCollection].\r\t^ cachedClassNames! !\r\r!SystemDictionary methodsFor: 'class names' stamp: 'di 2/16/2000 10:28'!\rflushClassNameCache\r\t\"Smalltalk flushClassNameCache\"\r\t\"Forse recomputation of the cached list of class names.\"\r\r\tcachedClassNames _ nil! !\r\r!SystemDictionary methodsFor: 'class names' stamp: 'NS 1/27/2004 12:08'!\rforgetClass: aClass logged: aBool \r\t\"Delete the class, aClass, from the system.\r\tNote that this doesn't do everything required to dispose of a class - to do that use Class>>removeFromSystem.\"\r\r\taBool ifTrue: [SystemChangeNotifier uniqueInstance classRemoved: aClass fromCategory: aClass category].\t\t\r\tSystemOrganization removeElement: aClass name.\r\tself removeFromStartUpList: aClass.\r\tself removeFromShutDownList: aClass.\r\tself removeKey: aClass name ifAbsent: [].\r\tself flushClassNameCache! !\r\r!SystemDictionary methodsFor: 'class names' stamp: 'sw 9/5/97 18:30'!\rremoveClassNamed: aName\r\t\"Invoked from fileouts:  if there is currently a class in the system named aName, then remove it.  If anything untoward happens, report it in the Transcript.  \"\r\r\t| oldClass |\r\t(oldClass _ self at: aName asSymbol ifAbsent: [nil]) == nil\r\t\tifTrue:\r\t\t\t[Transcript cr; show: 'Removal of class named ', aName, ' ignored because ', aName, ' does not exist.'.\r\t\t\t^ self].\r\r\toldClass removeFromSystem! !\r\r!SystemDictionary methodsFor: 'class names' stamp: 'rr 3/11/2004 15:18'!\rrenameClass: aClass as: newName \r\t\"Rename the class, aClass, to have the title newName.\"\r\t| oldref i oldName category |\r\toldName := aClass name.\r\tcategory := aClass category.\r\tSystemOrganization classify: newName under: aClass category.\r\tSystemOrganization removeElement: aClass name.\r\toldref _ self associationAt: aClass name.\r\tself removeKey: aClass name.\r\toldref key: newName.\r\tself add: oldref.  \"Old association preserves old refs\"\r\t(Array with: StartUpList with: ShutDownList) do:\r\t\t[:list |  i _ list indexOf: aClass name ifAbsent: [0].\r\t\ti > 0 ifTrue: [list at: i put: newName]].\r\tself flushClassNameCache.\r\tSystemChangeNotifier uniqueInstance classRenamed: aClass from: oldName to: newName inCategory: category! !\r\r!SystemDictionary methodsFor: 'class names' stamp: 'sw 10/28/96'!\rrenameClassNamed: oldName as: newName\r\t\"Invoked from fileouts:  if there is currently a class in the system named oldName, then rename it to newName.  If anything untoward happens, report it in the Transcript.  \"\r\r\t| oldClass |\r\t(oldClass _ self at: oldName asSymbol ifAbsent: [nil]) == nil\r\t\tifTrue:\r\t\t\t[Transcript cr; show: 'Class-rename for ', oldName, ' ignored because ', oldName, ' does not exist.'.\r\t\t\t^ self].\r\r\toldClass rename: newName! !\r\r\r!SystemDictionary methodsFor: 'dictionary access'!\rat: aKey put: anObject \r\t\"Override from Dictionary to check Undeclared and fix up\r\treferences to undeclared variables.\"\r\t| index element |\r\t(self includesKey: aKey) ifFalse: \r\t\t[self declare: aKey from: Undeclared.\r\t\tself flushClassNameCache].\r\tsuper at: aKey put: anObject.\r\t^ anObject! !\r\r!SystemDictionary methodsFor: 'dictionary access' stamp: 'di 12/21/1999 12:00'!\ratOrAbove: key ifAbsent: absentBlock\r\t\"Compatibility with environment protocol.\"\r\r\t^ self at: key ifAbsent: absentBlock! !\r\r!SystemDictionary methodsFor: 'dictionary access' stamp: 'di 12/6/1999 13:43'!\ratOrBelow: key ifAbsent: absentBlock\r\t\"Compatibility with environment protocol.\"\r\r\t^ self at: key ifAbsent: absentBlock! !\r\r!SystemDictionary methodsFor: 'dictionary access' stamp: 'di 12/6/1999 20:36'!\renvironmentForCategory: catName\r\t\"Default response for non-partitioned systems\"\r\r\t^ Smalltalk! !\r\r!SystemDictionary methodsFor: 'dictionary access' stamp: 'di 12/21/1999 12:00'!\rincludesKeyOrAbove: key\r\t\"Compatibility with environment protocol.\"\r\r\tself atOrAbove: key ifAbsent: [^ false].\r\t^ true! !\r\r!SystemDictionary methodsFor: 'dictionary access' stamp: 'di 12/19/1999 21:17'!\rscopeFor: varName from: lower envtAndPathIfFound: envtAndPathBlock\r\t\"Null compatibility with partitioning into environments.\"\r\r\t(self includesKey: varName)\r\t\tifTrue: [^ envtAndPathBlock value: self value: String new]\r\t\tifFalse: [^ nil]! !\r\r\r!SystemDictionary methodsFor: 'housekeeping' stamp: 'BG 4/23/2004 14:38'!\rcondenseChanges\t\r\t\"Move all the changes onto a compacted sources file.\"\r\t\"Smalltalk condenseChanges\"\r\r\t| f oldChanges classCount |\r\tf _ FileStream fileNamed: 'ST80.temp'.\r\tf header; timeStamp.\r'Condensing Changes File...'\r\tdisplayProgressAt: Sensor cursorPoint\r\tfrom: 0 to: Smalltalk classNames size\r\tduring:\r\t\t[:bar | classCount _ 0.\r\t\tSmalltalk allClassesDo:\r\t\t\t[:class | bar value: (classCount _ classCount + 1).\r\t\t\tclass moveChangesTo: f.\r\t\t\tclass putClassCommentToCondensedChangesFile: f.\r\t\t\tclass class moveChangesTo: f]].\r\tSmalltalkImage current lastQuitLogPosition: f position.\r\tf trailer; close.\r\toldChanges _ SourceFiles at: 2.\r\toldChanges close.\r\tFileDirectory default \r\t\tdeleteFileNamed: oldChanges name , '.old';\r\t\trename: oldChanges name toBe: oldChanges name , '.old';\r\t\trename: f name toBe: oldChanges name.\r\tself setMacFileInfoOn: oldChanges name.\r\tSourceFiles at: 2\r\t\t\tput: (StandardFileStream oldFileNamed: oldChanges name)! !\r\r!SystemDictionary methodsFor: 'housekeeping' stamp: 'BG 2/17/2005 23:30'!\rcondenseSources\r\t\"Move all the changes onto a compacted sources file.\"\r\t\"Smalltalk condenseSources\"\r\t| f classCount dir newVersionString |\r\tUtilities fixUpProblemsWithAllCategory.\r\t\"The above removes any concrete, spurious '-- all --'\r\tcategories, which mess up the process.\"\r\tdir := FileDirectory default.\r\tnewVersionString := FillInTheBlank request: 'Please designate the version\rfor the new source code file...' initialAnswer: SmalltalkImage current sourceFileVersionString.\r\tnewVersionString\r\t\tifNil: [^ self].\r\tnewVersionString = SmalltalkImage current sourceFileVersionString\r\t\tifTrue: [^ self error: 'The new source file must not be the same as the old.'].\r\tSmalltalkImage current sourceFileVersionString: newVersionString.\r\t\"Write all sources with fileIndex 1\"\r\tf := FileStream newFileNamed: SmalltalkImage current sourcesName.\r\tf header; timeStamp.\r\t'Condensing Sources File...'\r\t\tdisplayProgressAt: Sensor cursorPoint\r\t\tfrom: 0\r\t\tto: self classNames size\r\t\tduring: [:bar | \r\t\t\tclassCount := 0.\r\t\t\tself\r\t\t\t\tallClassesDo: [:class | \r\t\t\t\t\tbar value: (classCount := classCount + 1).\r\t\t\t\t\tclass\r\t\t\t\t\t\tfileOutOn: f\r\t\t\t\t\t\tmoveSource: true\r\t\t\t\t\t\ttoFile: 1]].\r\tf trailer; close.\r\t\"Make a new empty changes file\"\r\tSmalltalkImage current closeSourceFiles.\r\tdir rename: SmalltalkImage current changesName toBe: SmalltalkImage current changesName , '.old'.\r\t(FileStream newFileNamed: SmalltalkImage current changesName) header; timeStamp; close.\r\tSmalltalkImage current lastQuitLogPosition:  0.\r\tself setMacFileInfoOn: SmalltalkImage current changesName.\r\tself setMacFileInfoOn: SmalltalkImage current sourcesName.\r\tSmalltalkImage current openSourceFiles.\r\tself inform: 'Source files have been rewritten!!\rCheck that all is well,\rand then save/quit.'! !\r\r!SystemDictionary methodsFor: 'housekeeping' stamp: 'sd 4/17/2003 20:59'!\rforgetDoIts\t\r\t\"Smalltalk forgetDoIts\"\r\t \"get rid of old DoIt methods\"\r\r\tself systemNavigation allBehaviorsDo:\r\t\t[:cl | cl forgetDoIts]\r\r! !\r\r!SystemDictionary methodsFor: 'housekeeping' stamp: 'jm 5/22/1998 11:37'!\robsoleteClasses   \"Smalltalk obsoleteClasses inspect\"\r\t\"NOTE:  Also try inspecting comments below\"\r\t| obs c |\r\tobs _ OrderedCollection new.  Smalltalk garbageCollect.\r\tMetaclass allInstancesDo:\r\t\t[:m | c _ m soleInstance.\r\t\t(c ~~ nil and: ['AnOb*' match: c name asString])\r\t\t\tifTrue: [obs add: c]].\r\t^ obs asArray\r\r\"Likely in a ClassDict or Pool...\r(Association allInstances select: [:a | (a value isKindOf: Class) and: ['AnOb*' match: a value name]]) asArray\r\"\r\"Obsolete class refs or super pointer in last lit of a method...\r| n l found |\rSmalltalk browseAllSelect:\r\t[:m | found _ false.\r\t1 to: m numLiterals do:\r\t\t[:i | (((l _ m literalAt: i) isMemberOf: Association)\r\t\t\t\tand: [(l value isKindOf: Behavior)\r\t\t\t\tand: ['AnOb*' match: l value name]])\r\t\t\tifTrue: [found _ true]].\r\tfound]\r\"! !\r\r!SystemDictionary methodsFor: 'housekeeping' stamp: 'di 3/1/2001 01:09'!\rreclaimDependents\r\t\"No-opped due to weak dictionary in use\"\r\tSmalltalk garbageCollect! !\r\r\r!SystemDictionary methodsFor: 'image, changes name' stamp: 'nk 11/12/2003 10:28'!\rimageName\r\t\"Answer the full path name for the current image.\"\r\t\"Smalltalk imageName\"\r\r\t^ self deprecated: 'Use SmalltalkImage current imageName'\r\t\tblock: [SmalltalkImage current imageName]! !\r\r!SystemDictionary methodsFor: 'image, changes name' stamp: 'nk 11/12/2003 10:29'!\rimageName: newName\r\t\"Set the the full path name for the current image.  All further snapshots will use this.\"\r\r\t^ self deprecated: 'Use SmalltalkImage current imageName'\r\t\tblock: [ SmalltalkImage current imageName ]! !\r\r!SystemDictionary methodsFor: 'image, changes name' stamp: 'BG 12/5/2003 19:30'!\rsourcesName\r\t\"Answer the full path to the version-stable source code\"\r\tself deprecatedExplanation: 'Use SmalltalkImage current sourcesName'.\r\t\" ^ SourceFileVersionString , FileDirectory dot , 'sources' \"! !\r\r!SystemDictionary methodsFor: 'image, changes name' stamp: 'nk 11/12/2003 10:35'!\rvmPath\r\t\"Answer the path for the directory containing the Smalltalk virtual machine. Return the empty string if this primitive is not implemented.\"\r\t\"Smalltalk vmPath\"\r\r\t^ self deprecated: 'Use SmalltalkImage current vmPath'\r\t\tblock: [SmalltalkImage current vmPath]! !\r\r\r!SystemDictionary methodsFor: 'memory space'!\rbytesLeft\r\t\"Answer the number of bytes of space available. Does a full garbage collection.\"\r\r\t^ self garbageCollect\r! !\r\r!SystemDictionary methodsFor: 'memory space' stamp: 'ar 2/25/2001 17:55'!\rbytesLeft: aBool\r\t\"Return the amount of available space. If aBool is true, include possibly available swap space. If aBool is false, include possibly available physical memory. For a report on the largest free block currently availabe within Squeak memory but not counting extra memory use #primBytesLeft.\"\r\t<primitive: 112>\r\t^self primBytesLeft! !\r\r!SystemDictionary methodsFor: 'memory space' stamp: 'ar 2/25/2001 18:00'!\rbytesLeftString\r\t\"Return a string describing the amount of memory available\"\r\t| availInternal availPhysical availTotal |\r\tself garbageCollect.\r\tavailInternal _ self primBytesLeft.\r\tavailPhysical _ self bytesLeft: false.\r\tavailTotal _ self bytesLeft: true.\r\t(availTotal > (availInternal + 10000)) \"compensate for mini allocations inbetween\"\r\t\tifFalse:[^availInternal asStringWithCommas, ' bytes available'].\r\t^String streamContents:[:s|\r\t\ts nextPutAll: availInternal asStringWithCommas, \t' bytes (internal) '; cr.\r\t\ts nextPutAll: availPhysical asStringWithCommas,\t' bytes (physical) '; cr.\r\t\ts nextPutAll: availTotal asStringWithCommas, \t' bytes (total)     '].! !\r\r!SystemDictionary methodsFor: 'memory space' stamp: 'ar 2/11/2001 02:36'!\rgarbageCollect\r\t\"Primitive. Reclaims all garbage and answers the number of bytes of available space.\"\r\tObject flushDependents.\r\tObject flushEvents.\r\t^self primitiveGarbageCollect! !\r\r!SystemDictionary methodsFor: 'memory space'!\rgarbageCollectMost\r\t\"Primitive. Reclaims recently created garbage (which is usually most of it) fairly quickly and answers the number of bytes of available space.\"\r\r\t<primitive: 131>\r\t^ self primBytesLeft! !\r\r!SystemDictionary methodsFor: 'memory space'!\rinstallLowSpaceWatcher\r\t\"Start a process to watch for low-space conditions.\"\r\t\"Smalltalk installLowSpaceWatcher\"\r\r\tself primSignalAtBytesLeft: 0.  \"disable low-space interrupts\"\r\tLowSpaceProcess == nil ifFalse: [LowSpaceProcess terminate].\r\tLowSpaceProcess _ [self lowSpaceWatcher] newProcess.\r\tLowSpaceProcess priority: Processor lowIOPriority.\r\tLowSpaceProcess resume.\r\r! !\r\r!SystemDictionary methodsFor: 'memory space' stamp: 'di 8/18/2000 16:49'!\rlowSpaceThreshold \r\t\"Return the low space threshold. When the amount of free memory (after garbage collection) falls below this limit, the system is in serious danger of completely exhausting memory and crashing. This limit should be made high enough to allow the user open a debugger to diagnose a problem or to save the image.\"\r\r\tthisContext isPseudoContext\r\t\tifTrue: [^ 400000  \"Enough for JIT compiler\"]\r\t\tifFalse: [^ 200000  \"Enough for interpreter\"]! !\r\r!SystemDictionary methodsFor: 'memory space' stamp: 'BG 10/30/2003 20:41'!\rlowSpaceWatcher\r\t\"Wait until the low space semaphore is signalled, then take appropriate actions.\"\r\r\t| free |\r\tself garbageCollectMost <= self lowSpaceThreshold ifTrue: [\r\t\tself garbageCollect <= self lowSpaceThreshold ifTrue: [\r\t\t\t\"free space must be above threshold before starting low space watcher\"\r\t\t\t^ self beep]].\r\r\tLowSpaceSemaphore _ Semaphore new.\r\tself primLowSpaceSemaphore: LowSpaceSemaphore.\r\tself primSignalAtBytesLeft: self lowSpaceThreshold.  \"enable low space interrupts\"\r\r\tLowSpaceSemaphore wait.  \"wait for a low space condition...\"\r\r\tself primSignalAtBytesLeft: 0.  \"disable low space interrupts\"\r\tself primLowSpaceSemaphore: nil.\r\tLowSpaceProcess _ nil.\r\t\"Note: user now unprotected until the low space watcher is re-installed\"\r\r\tself memoryHogs isEmpty ifFalse: [\r\t\tfree := self bytesLeft.\r\t\tself memoryHogs do: [ :hog | hog freeSomeSpace ].\r\t\tself bytesLeft > free ifTrue: [ ^ self installLowSpaceWatcher ]].\r\r\tSmalltalk isMorphic\r\t\t\tifTrue: []\r\t\t\tifFalse: [ScheduledControllers interruptName: 'Space is low']! !\r\r!SystemDictionary methodsFor: 'memory space' stamp: 'nk 10/28/2000 20:37'!\rlowSpaceWatcherProcess\r\t^LowSpaceProcess! !\r\r!SystemDictionary methodsFor: 'memory space' stamp: 'sma 4/22/2000 19:03'!\rmemoryHogs\r\t\"Answer the list of objects to notify with #freeSomeSpace if memory gets full.\"\r\r\t^ MemoryHogs ifNil: [MemoryHogs _ OrderedCollection new]! !\r\r!SystemDictionary methodsFor: 'memory space'!\rokayToProceedEvenIfSpaceIsLow\r\t\"Return true if either there is enough memory to do so safely or if the user gives permission after being given fair warning.\"\r\r\tself garbageCollectMost > self lowSpaceThreshold ifTrue: [^ true].  \"quick\"\r\tself garbageCollect > self lowSpaceThreshold ifTrue: [^ true].  \"work harder\"\r\r\t^ self confirm:\r'WARNING: There is not enough space to start the low space watcher.\rIf you proceed, you will not be warned again, and the system may\rrun out of memory and crash. If you do proceed, you can start the\rlow space notifier when more space becomes available simply by\ropening and then closing a debugger (e.g., by hitting Cmd-period.)\rDo you want to proceed?'\r! !\r\r!SystemDictionary methodsFor: 'memory space'!\rprimBytesLeft\r\t\"Primitive. Answer the number of bytes available for new object data.\r\tNot accurate unless preceded by\r\t\tSmalltalk garbageCollectMost (for reasonable accuracy), or\r\t\tSmalltalk garbageCollect (for real accuracy).\r\tSee Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 112>\r\t^ 0! !\r\r!SystemDictionary methodsFor: 'memory space'!\rprimLowSpaceSemaphore: aSemaphore\r\t\"Primitive. Register the given Semaphore to be signalled when the\r\tnumber of free bytes drops below some threshold. Disable low-space\r\tinterrupts if the argument is nil.\"\r\r\t<primitive: 124>\r\tself primitiveFailed! !\r\r!SystemDictionary methodsFor: 'memory space'!\rprimSignalAtBytesLeft: numBytes\r\t\"Tell the interpreter the low-space threshold in bytes. When the free\r\tspace falls below this threshold, the interpreter will signal the low-space\r\tsemaphore, if one has been registered.  Disable low-space interrupts if the\r\targument is zero.  Fail if numBytes is not an Integer.\"\r\r\t<primitive: 125>\r\tself primitiveFailed! !\r\r!SystemDictionary methodsFor: 'memory space' stamp: 'ar 2/11/2001 02:16'!\rprimitiveGarbageCollect\r\t\"Primitive. Reclaims all garbage and answers the number of bytes of available space.\"\r\r\t<primitive: 130>\r\t^ self primBytesLeft! !\r\r!SystemDictionary methodsFor: 'memory space'!\rsignalLowSpace\r\t\"Signal the low-space semaphore to alert the user that space is running low.\"\r\r\tLowSpaceSemaphore signal.! !\r\r\r!SystemDictionary methodsFor: 'miscellaneous' stamp: 'nk 11/12/2003 10:19'!\rgetSystemAttribute: attributeID \r\t\"Optional. Answer the string for the system attribute with the given \r\tinteger ID. Answer nil if the given attribute is not defined on this \r\tplatform. On platforms that support invoking programs from command \r\tlines (e.g., Unix), this mechanism can be used to pass command line \r\targuments to programs written in Squeak.\r\r\tBy convention, the first command line argument that is not a VM\r\tconfiguration option is considered a 'document' to be filed in. Such a\r\tdocument can add methods and classes, can contain a serialized object,\r\tcan include code to be executed, or any combination of these.\r\r\tCurrently defined attributes include: \r\t-1000...-1 - command line arguments that specify VM options \r\t0 - the full path name for currently executing VM \r\t(or, on some platforms, just the path name of the VM's directory) \r\t1 - full path name of this image \r\t2 - a Squeak document to open, if any \r\t3...1000 - command line arguments for Squeak programs \r\t1001 - this platform's operating system \r\t1002 - operating system version \r\t1003 - this platform's processor type\r\t1004 - vm version\"\r\r\t^self deprecated: 'Use SmalltalkImage current getSystemAttribute: attributeID '\r\t\tblock: [SmalltalkImage current getSystemAttribute: attributeID ]\r! !\r\r!SystemDictionary methodsFor: 'miscellaneous' stamp: 'nk 11/12/2003 10:27'!\rgetVMParameters\t\"Smalltalk getVMParameters\"\r\t\"Answer an Array containing the current values of the VM's internal\r\tparameter/metric registers.  Each value is stored in the array at the\r\tindex corresponding to its VM register.  (See #vmParameterAt: and\r\t#vmParameterAt:put:.)\"\r\r\t^self deprecated: 'Use SmalltalkImage current getVMParameters'\r\t\tblock: [SmalltalkImage current getVMParameters] .\r! !\r\r!SystemDictionary methodsFor: 'miscellaneous' stamp: 'BG 10/30/2003 20:40'!\rhandleUserInterrupt\r\tPreferences cmdDotEnabled ifTrue:\r\t\t[Smalltalk isMorphic\r\t\t\tifTrue: []\r\t\t\tifFalse: [[ScheduledControllers interruptName: 'User Interrupt'] fork]]! !\r\r!SystemDictionary methodsFor: 'miscellaneous' stamp: 'tk 10/16/2001 19:24'!\rlogError: errMsg inContext: aContext to: aFilename\r\t\"Log the error message and a stack trace to the given file.\"\r\r\t| ff |\r\tFileDirectory default deleteFileNamed: aFilename ifAbsent: [].\r\t(ff _ FileStream fileNamed: aFilename) ifNil: [^ self \"avoid recursive errors\"].\r\r  \tff nextPutAll: errMsg; cr.\r\taContext errorReportOn: ff.\r\tff close.! !\r\r!SystemDictionary methodsFor: 'miscellaneous' stamp: 'md 12/12/2003 17:02'!\rplatformName\r\t\"Return the name of the platform we're running on\"\r\r\tself deprecated: 'Use SmalltalkImage current platformName'.\r\t^self getSystemAttribute: 1001! !\r\r!SystemDictionary methodsFor: 'miscellaneous' stamp: 'MPH 10/24/2000 14:27'!\rsetMacFileInfoOn: aString\r\t\"On Mac, set the file type and creator (noop on other platforms)\"\r\tFileDirectory default\r\t\tsetMacFileNamed: aString\r\t\ttype: 'STch'\r\t\tcreator: 'FAST'.! !\r\r!SystemDictionary methodsFor: 'miscellaneous' stamp: 'nk 11/12/2003 10:35'!\rvmParameterAt: parameterIndex put: newValue\r\t\"parameterIndex is a positive integer corresponding to one of the VM's internal\r\tparameter/metric registers.  Store newValue (a positive integer) into that\r\tregister and answer with the previous value that was stored there.\r\tFail if newValue is out of range, if parameterIndex has no corresponding\r\tregister, or if the corresponding register is read-only.\"\r\r\t^ self deprecated: 'Use SmalltalkImage current vmParameterAt: parameterIndex put: newValue'\r\t\tblock: [SmalltalkImage current vmParameterAt: parameterIndex put: newValue]\r! !\r\r\r!SystemDictionary methodsFor: 'printing' stamp: 'sma 6/1/2000 09:53'!\rprintElementsOn: aStream\r\taStream nextPutAll:'(lots of globals)'! !\r\r\r!SystemDictionary methodsFor: 'retrieving' stamp: 'sd 4/17/2003 21:15'!\rallClasses  \r\t\"Return all the class defines in the Smalltalk SystemDictionary\"\r\t\"Smalltalk allClasses\"\r\r\t^ self classNames collect: [:name | self at: name]! !\r\r!SystemDictionary methodsFor: 'retrieving' stamp: 'sd 4/17/2003 21:18'!\rallClassesDo: aBlock\r\t\"Evaluate the argument, aBlock, for each class in the system.\"\r\r\t(self classNames collect: [:name | self at: name]) do: aBlock! !\r\r!SystemDictionary methodsFor: 'retrieving' stamp: 'BG 11/1/2003 14:06'!\rallSentMessagesWithout: classesAndMessagesPair\r\t\"Answer the set of selectors which are sent somewhere in the system, computed in the absence of the supplied classes and messages.\"\r\t| sent absentClasses absentSelectors literals hasMenuFromArray |\r\tsent _ IdentitySet new: CompiledMethod instanceCount.\r\tabsentClasses _ classesAndMessagesPair first.\r\tabsentSelectors _ classesAndMessagesPair second.\r\tCursor execute showWhile: \r\t\t[self classNames do: \r\t\t\t[:cName | ((absentClasses includes: cName)\r\t\t\t\t\t\tifTrue: [{}]\r\t\t\t\t\t\tifFalse: [{(self at: cName). (self at: cName) class}]) do:\r\t\t\t\t[:cl | (absentSelectors isEmpty\r\t\t\t\t\t\tifTrue: [cl selectors]\r\t\t\t\t\t\tifFalse: [cl selectors copyWithoutAll: absentSelectors]) do: \r\t\t\t\t\t[:sel | \"Include all sels, but not if sent by self\"\r                         literals := (cl compiledMethodAt: sel) literals.\r                         hasMenuFromArray :=\r                          (literals includes: #addList:) | (literals includes: #fromArray:) .\r\t\t\t\t\t literals  do: \r\t\t\t\t\t\t[:m | \r\t\t\t\t\t\t(m isMemberOf: Symbol) ifTrue:  \"might be sent\"\r\t\t\t\t\t\t\t[m == sel ifFalse: [sent add: m]].\r\t\t\t\t\t\t(m isMemberOf: Array) ifTrue:  \"might be performed\"\r\t\t\t\t\t\t\t[m do: [:x | (x isMemberOf: Symbol) ifTrue:\r\t\t\t\t\t\t\t\t             [x == sel ifFalse: [sent add: x]].\r                                               (hasMenuFromArray and: [x isMemberOf: Array])\r                                                 ifTrue: [x do: [:y | (y isMemberOf: Symbol) ifTrue:\r\t\t\t\t\t\t\t\t             [y == sel ifFalse: [sent add: y]].]]\r                                 ]       ].\r   \r]]]].\r\t\t\"The following may be sent without being in any literal frame\"\r\t\t1 to: self specialSelectorSize do: \r\t\t\t[:index | \r\t\t\tsent add: (self specialSelectorAt: index)]].\r\tSmalltalk presumedSentMessages do: [:sel | sent add: sel].\r\t^ sent! !\r\r!SystemDictionary methodsFor: 'retrieving' stamp: 'tk 9/26/1999 14:54'!\rpointersTo: anObject except: objectsToExclude\r\t\"Find all occurrences in the system of pointers to the argument anObject. Remove objects in the exclusion list from the results.\"\r\r\t| results anObj |\r\tSmalltalk garbageCollect.\r\t\"big collection shouldn't grow, so it's contents array is always the same\"\r\tresults _ OrderedCollection new: 1000.\r\r\t\"allObjectsDo: is expanded inline to keep spurious\r\t method and block contexts out of the results\"\r\tanObj _ self someObject.\r\t[0 == anObj] whileFalse: [\r\t\tanObj isInMemory ifTrue: [\r\t\t\t(anObj pointsTo: anObject) ifTrue: [\r\t\t\t\t\"exclude the results collector and contexts in call chain\"\r\t\t\t\t((anObj ~~ results collector) and:\r\t\t\t\t [(anObj ~~ objectsToExclude) and:\r\t\t\t\t [(anObj ~~ thisContext) and:\r\t\t\t\t [(anObj ~~ thisContext sender) and:\r\t\t\t\t [anObj ~~ thisContext sender sender]]]])\r\t\t\t\t\t ifTrue: [ results add: anObj ].\r\t\t\t]].\r\t\tanObj _ anObj nextObject.\r\t].\r\tobjectsToExclude do: [ :obj | results removeAllSuchThat: [ :el | el == obj]].\r\r\t^ results asArray\r! !\r\r\r!SystemDictionary methodsFor: 'shrinking' stamp: 'di 1/7/2004 15:39'!\rabandonSources    \"Smalltalk abandonSources\"\r\t\"Replaces every method by a copy with the 4-byte source pointer \r\treplaced by a string of all arg and temp names, followed by its length.\r\tThese names can then be used to inform the decompiler.  See stats below\"\r\t\"wod 11/3/1998: zap the organization before rather than after condensing changes.\"\r\t | oldCodeString argsAndTemps oldMethods newMethods m bTotal bCount |\r\t(self confirm:\r'This method will preserve most temp names\r(up to about 400 characters) while allowing\rthe sources file to be discarded.\r-- CAUTION --\rIf you have backed up your system and\rare prepared to face the consequences of\rabandoning source code files, choose Yes.\rIf you have any doubts, you may choose No\rto back out with no harm done.')\r\t\t==  true ifFalse: [^ self inform: 'Okay - no harm done'].\r\tSmalltalk forgetDoIts.\r\toldMethods _ OrderedCollection new: CompiledMethod instanceCount.\r\tnewMethods _ OrderedCollection new: CompiledMethod instanceCount.\r\tbTotal _ 0.  bCount _ 0.\r\tself systemNavigation allBehaviorsDo: [: b | bTotal _ bTotal + 1].\r'Saving temp names for better decompilation...'\r\tdisplayProgressAt: Sensor cursorPoint\r\tfrom: 0 to: bTotal\r\tduring: [:bar |\r\tself systemNavigation allBehaviorsDo:    \"for test:  (Array with: Arc with: Arc class) do: \"\r\t\t\t[:cl |  bar value: (bCount _ bCount + 1).\r\t\t\tcl selectors do: [:selector |\r\t\t\t\tm _ cl compiledMethodAt: selector.\r\t\t\t\tm fileIndex > 0 ifTrue:\r\t\t\t\t[oldCodeString _ cl sourceCodeAt: selector.\r\t\t\t\targsAndTemps _ (cl compilerClass new\r\t\t\t\t\tparse: oldCodeString in: cl notifying: nil)\r\t\t\t\t\ttempNames.\r\t\t\t\toldMethods addLast: m.\r\t\t\t\tnewMethods addLast: (m copyWithTempNames: argsAndTemps)]]]].\r\toldMethods asArray elementsExchangeIdentityWith: newMethods asArray.\r\tself systemNavigation allBehaviorsDo: [:b | b zapOrganization].\r\tSmalltalk condenseChanges.\r\tPreferences disable: #warnIfNoSourcesFile.\r\"\rIn a system with 7780 methods, we got 83k of temp names, or around 100k with spaces between.  The order of letter frequency was eatrnoislcmdgpSub, with about 60k falling in the first 11.  This suggests that we could encode in 4 bits, with 0-11 beng most common chars, and 12-15 contributing 2 bits to the next nibble for 6 bits, enough to cover all alphaNumeric with upper and lower case.  If we get 3/4 in 4 bits and 1/4 in 8, then we get 5 bits per char, or about 38% savings (=38k in this case).\r\rSummary: about 13 bytes of temp names per method, or 8 with simple compression, plus 1 for the size.  This would be 5 bytes more than the current 4-byte trailer.\r\"! !\r\r!SystemDictionary methodsFor: 'shrinking' stamp: 'ssa 10/8/2008 13:14'!\rmajorShrinkClassesToLeave\r\r\t| manual categoryNames classNames classNameSets |\r\tmanual := #(True False ReadOnlyVariableBinding SystemOrganizer ClassOrganizer View Switch Button EndOfStream ValueHolder EventSensorConstants ChronologyConstants InstructionPrinter Color Form ColorForm DisplayMedium DisplayObject Rectangle Point  Pen OrderedCollection Array SortedCollection Dictionary Association SequenceableCollection Collection String Text DisplayText ArrayedCollection Object GIFReadWriter ImageReadWriter \r\t\"Benchmark BinaryChoice \"  \rChangeSet ChangeSorter DualChangeSorter ChangeList Inspector BasicInspector CompiledMethodInspector DictionaryInspector OrderedCollectionInspector).\r\tcategoryNames := \"(SystemOrganization categoriesMatching:'RVM-*'), \"\r\t\t\t\t\t(SystemOrganization categoriesMatching:'PluggableGauges*'), \r\t\t\t\t\t(SystemOrganization categoriesMatching:'Tools-FileList'),\r\t\t\t\t\t(SystemOrganization categoriesMatching:'Tools-Browser'),\r\t\t\t\t\t(SystemOrganization categoriesMatching:'Kernel-ST80 Remnants'), \r\t\t\t\t\t(SystemOrganization categoriesMatching:'ST80-Framework'), \r\t\t\t\t\t(SystemOrganization categoriesMatching:'ST80-Support'), \r\t\t\t\t\t(SystemOrganization categoriesMatching:'ST80-Pluggable Views'), \r\t\t\t\t\t(SystemOrganization categoriesMatching:'ST80-Views'), \r\t\t\t\t\t(SystemOrganization categoriesMatching:'ST80-Editors'), \r\t\t\t\t\t(SystemOrganization categoriesMatching:'Tools-Process Browser').\r\tclassNameSets := categoryNames collect:[:each| SystemOrganization listAtCategoryNamed: each].\r\tclassNames := OrderedCollection new.\r\tclassNameSets do:[:set| set do:[:n| classNames add: n]].\r\t^(manual, classNames) asSet asOrderedCollection! !\r\r!SystemDictionary methodsFor: 'shrinking' stamp: 'ssa 9/3/2008 12:00'!\rmajorShrinkClassesToZap\r\r\t^#(BDFFontReader \r\t\tInstanceBrowser \r\t\tLexicon \r\t\tTarArchiveMember \r\t\tCRLookupResult\r\t\"\tPluggableDictionary\r\t\t PluggableSet \"\r\t\tMimeConverter\r\t\tQuotedPrintableMimeConverter\r\t\tRFC2047MimeConverter\r\t\tAbstractLauncher\r\t\tAutoStart\r\t\tAcornFileDirectory\r\t\t \" AssertionFailure \"\r\t\tCachedHTTPRequest \r\t\tCachingCodeLoader\r\t\tCodeLoader\r\t\tCanvasEncoder\r\t\tEToyVectorVocabulary\r\t\tEToyVocabulary\r        \tFileList2\r\t\tFontCache\r\t\tFTPConnectionException\r\t\tFullVocabulary\r\t\tHTTPClient\r\t\tHTTPLoader\r\t\tHTTPRequest \r\t\tHtmlFileStream\r\t\t\"MacFileDirectory\"\r\t\t\"MacHFSPlusFileDirectory\"\r\t\tPluginHTTPRequest\r\t\tSUnitNameResolver\r\t\tScreenedVocabulary\r\t\tScriptNameType\r\t\tSoundType\r\t\tStringType\r\t\tSymbolListType\r\t\tTestCase\r\t\tTestFailure\r\t\tTestResource\r\t\tTestResult\r\t\tTestRunner\r\t\tTestSuite\r\t\tTestCaseDebugger\r\t\tTestViaMethodCall\r\t\tTextSqkPageLink\r\t\tTextSqkProjectLink\r\t\tTextURL \r\t\tUnknownType\r\t\tVerifier\r\t\tVerifierOfProperty\r\t\tVocabulary\r\t\tBooleanType\r\t\tButtonPhaseType\r\t\tColorType\r\t\tDataType\r\t\tGraphicType\r\t\tMenuType\r\t\tNumberType\r\t\tPlayerType)! !\r\r!SystemDictionary methodsFor: 'shrinking' stamp: 'BG 11/26/2003 19:09'!\rpostMajorShrink\r   | oldDicts  newDicts |\r\tSystemOrganization removeEmptyCategories.\r\tSmalltalk allClassesDo: [:c | c compactOrganization]. \r\tSmalltalk garbageCollect.\r\r\t'Rehashing method dictionaries . . .'\r\t\tdisplayProgressAt: Sensor cursorPoint\r\t\tfrom: 0 to: MethodDictionary instanceCount\r\t\tduring: [:bar |\r\t\t\toldDicts _ MethodDictionary allInstances.\r\t\t\tnewDicts _ Array new: oldDicts size.\r\t\t\toldDicts withIndexDo: [:d :index | \r\t\t\t\tbar value: index.\r\t\t\t\tnewDicts at: index put: d rehashWithoutBecome.\r\t\t\t].\r\t\t\toldDicts elementsExchangeIdentityWith: newDicts.\r\t\t].\r\toldDicts _ newDicts _ nil.\r\tProject rebuildAllProjects.\r\tChangeSet current initialize.\r\r\t\"seems to take more than one try to gc all the weak refs in SymbolTable\"\r\r\t3 timesRepeat: [\r\t\tSmalltalk garbageCollect.\r\t\tSymbol compactSymbolTable.\r\t].\r! !\r\r!SystemDictionary methodsFor: 'shrinking' stamp: 'ssa 9/3/2008 13:42'!\rpresumedSentMessages   | sent |\r\"Smalltalk presumedSentMessages\"\r\r\t\"The following should be preserved for doIts, etc\"\r\tsent _ IdentitySet new.\r\t#( \r\t\"menu messages from Debugger>>contextStackMenu: aMenu shifted: shifted\"\r\tfullStack restart proceed doStep stepIntoBlock send where peelToFirst\rbrowseSendersOfMessages browseMessages methodHierarchy browseVersions\rbrowseInstVarRefs browseInstVarDefs\rbrowseClassVarRefs browseClassVariables browseClassRefs\rbrowseMethodFull fileOutMessage \rshiftedYellowButtonActivity\r\r\t\"menu messages from Preferences>>presentMvcFontConfigurationMenu\"\r\tchooseSystemFont chooseListFont chooseMenuFont chooseWindowTitleFont chooseCodeFont restoreDefaultFonts\r\r\t\"others\"\r\t\r\trehashWithoutBecome compactSymbolTable rebuildAllProjects\r\t\tbrowseAllSelect: printSpaceAnalysis lastRemoval\r\t\tscrollBarValue: scrollBarMenuButtonPressed: \r\t\twithSelectionFrom:  to: removeClassNamed: instVarNamed:put:\r\t\tbreakDependents\r          maximumSize: redButtonMenu:redButtonMessages:\r\t\tdragon: hilberts: mandala: web test3 factorial tinyBenchmarks benchFib\r\t\tnewDepth: restoreAfter: forgetDoIts zapAllMethods obsoleteClasses\r\t\tremoveAllUnSentMessages abandonSources removeUnreferencedKeys\r\t\treclaimDependents zapOrganization condenseChanges browseObsoleteReferences\r\t\trenameClassNamed:as:  \" this method is used in change sets \"\r\t\tsubclass:instanceVariableNames:classVariableNames:poolDictionaries:category:\r\t\tvariableByteSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category:\r    \" subclass creation: \"\r\t\tvariableSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category:\r\t\tvariableWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category:\r\t\tweakSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category:\r\t\tmethodsFor:stamp: methodsFor:stamp:prior: instanceVariableNames:\r\t\tstartTimerInterruptWatcher unusedClasses\r\t\twidthOfString: widthOfString:from:to: clipHeight clipHeight: \r\t\tclipWidth clipWidth: clipX clipX: clipY clipY: \r          newDay:monthIndex:year: abandon pixelForValueAt:put:\r          magnifyBy: replaceColor:withColor: dotOfSize:  \"DisplayScreen> \" fullBoundingBox\r          originFromUser:\r     \" finalization \"\r          toFinalizeSend:to:with:\r\t\" StrikeFont> \"\r\t\tmaxAscii minAscii maxWidth firstIndent:\r          restIndent: rightIndent: newFontArray: fontArray:\r          readStrikeFont2Family:  familySizeFace writeAsStrike2Named:\r\t\"  Paragraph  \"\r\t\tcompositionRectangle: \r   \" Form: these methods are meeded for gif creation \"\r\t\tcolorReduced colorsUsed\r   \" protocol from Pen class: \"\r\t\tinkBrush simplePressurePen testMouseTracking testTabletTracking\r   \" two methods that are hidden from the method tracer \"\r\t\tmethod: preamble:\r\t\tinspectElement\r\t\tinspectSelection inspectBasic fileOutAllChangeSets fillAggregateChangeSet\r   \" convenience methods in True and False: \"\r\t\tand:and: and:and:and: and:and:and:and:\r\t\tor:or: or:or:or: or:or:or:or:\r  \" mics \"\r     \tpairsDo: font:  notEmpty \r  \" ExternalEvent class: \"\r\t\tregisterClient:\r     ) do:\r\t\t[:sel | sent add: sel].\r\t\"The following may be sent by perform: in dispatchOnChar...\"\r\t(ParagraphEditor classPool at: #CmdActions) asSet do:\r\t\t[:sel | sent add: sel].\r\t(ParagraphEditor classPool at: #ShiftCmdActions) asSet do:\r\t\t[:sel | sent add: sel].\r Smalltalk majorShrinkClassesToLeave do:\r  [:symbol | sent addAll: (Smalltalk at: symbol) selectors;\r                 addAll: (Smalltalk at: symbol) class selectors.].\r\t^ sent! !\r\r!SystemDictionary methodsFor: 'shrinking' stamp: 'BG 11/26/2003 14:35'!\rremoveAllUnSentMessages   \"Smalltalk removeAllUnSentMessages\"\r\t\"[Smalltalk unusedClasses do: [:c | (Smalltalk at: c) removeFromSystem].\r\t\tSmalltalk removeAllUnSentMessages > 0] whileTrue.\" \r\r\t\"Remove all implementations of unsent messages.\"\r\t| sels n |\r\tsels _ SystemNavigation default allUnSentMessages.\r\r\t\"The following should be preserved for doIts, etc\"\r\t#(\r\t\trehashWithoutBecome compactSymbolTable rebuildAllProjects\t\"needed even after #majorShrink is pulled\"\r\t\t\t\r\t\tbrowseAllSelect: printSpaceAnalysis lastRemoval\r\t\tscrollBarValue: scrollBarMenuButtonPressed: \r\t\twithSelectionFrom:  to: removeClassNamed:\r\t\tdragon: hilberts: mandala: web test3 factorial tinyBenchmarks benchFib\r\t\tnewDepth: restoreAfter: forgetDoIts zapAllMethods obsoleteClasses\r\t\tremoveAllUnSentMessages condenseChanges condenseSources abandonSources removeUnreferencedKeys postMajorShrink offerShiftedClassListMenu offerUnshiftedClassListMenu\r         font1 font2 font3 font4\r\t\treclaimDependents zapOrganization condenseChanges browseObsoleteReferences\r\t\tsubclass:instanceVariableNames:classVariableNames:poolDictionaries:category:\r\t\tmethodsFor:stamp: methodsFor:stamp:prior: instanceVariableNames:\r\t\tstartTimerInterruptWatcher unusedClasses) do:\r\t\t[:sel | sels remove: sel ifAbsent: []].\r\t\"The following may be sent by perform: in dispatchOnChar...\"\r\t(ParagraphEditor classPool at: #CmdActions) asSet do:\r\t\t[:sel | sels remove: sel ifAbsent: []].\r\t(ParagraphEditor classPool at: #ShiftCmdActions) asSet do:\r\t\t[:sel | sels remove: sel ifAbsent: []].\r\tsels size = 0 ifTrue: [^ 0].\r\r\tn _ 0. self systemNavigation allBehaviorsDo: [:x | n _ n+1].\r\t'Removing ', sels size printString , ' messages . . .'\r\t\tdisplayProgressAt: Sensor cursorPoint\r\t\tfrom: 0 to: n\r\t\tduring:\r\t\t[:bar |\r\t\tn _ 0.\r\t\tself systemNavigation allBehaviorsDo:\r\t\t\t[:class | bar value: (n _ n+1).\r\t\t\tsels do:\r\t\t\t\t[:sel | class removeSelectorSimply: sel]]].\r\t^ sels size! !\r\r!SystemDictionary methodsFor: 'shrinking' stamp: 'sma 6/18/2000 11:34'!\rremoveSelector: descriptor\r\t\"Safely remove a selector from a class (or metaclass). If the class\r\tor the method doesn't exist anymore, never mind and answer nil.\r\tThis method should be used instead of 'Class removeSelector: #method'\r\tto omit global class references.\"\r\r\t| class sel |\r\tclass _ Smalltalk at: descriptor first ifAbsent: [^ nil].\r\t(descriptor size > 2 and: [descriptor second == #class])\r\t\tifTrue:\r\t\t\t[class _ class class.\r\t\t\tsel _ descriptor third]\r\t\tifFalse: [sel _ descriptor second].\r\t^ class removeSelector: sel! !\r\r!SystemDictionary methodsFor: 'shrinking' stamp: 'sd 4/29/2003 19:06'!\runusedClasses\r\t\"Enumerates all classes in the system and returns a list of those that are \r\tapparently unused. A class is considered in use if it (a) has subclasses \r\tor (b) is referred to by some method or (c) has its name in use as a \r\tliteral. \"\r\t\"Smalltalk unusedClasses asSortedCollection\"\r\t^ self systemNavigation allUnusedClassesWithout: {{}. {}}! !\r\r\r!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'ar 11/19/1999 22:36'!\radd: aClass toList: startUpOrShutDownList after: predecessor\r\t\"Add the name of aClass to the startUp or shutDown list.\r\tAdd it after the name of predecessor, or at the end if predecessor is nil.\"\r\r\t| name earlierName |\r\tname _ aClass name.\r\t(self at: name ifAbsent: [nil]) == aClass ifFalse:\r\t\t[self error: name , ' cannot be found in Smalltalk dictionary.'].\r\tpredecessor == nil\r\t\tifTrue: [\"No-op if alredy in the list.\"\r\t\t\t\t(startUpOrShutDownList includes: name) ifFalse:\r\t\t\t\t\t[startUpOrShutDownList == StartUpList\r\t\t\t\t\t\tifTrue: [\"Add to end of startUp list\"\r\t\t\t\t\t\t\t\tstartUpOrShutDownList addLast: name]\r\t\t\t\t\t\tifFalse: [\"Add to front of shutDown list\"\r\t\t\t\t\t\t\t\tstartUpOrShutDownList addFirst: name]]]\r\t\tifFalse: [\"Add after predecessor, moving it if already there.\"\r\t\t\t\tearlierName _ predecessor name.\r\t\t\t\t(self at: earlierName) == predecessor ifFalse:\r\t\t\t\t\t[self error: earlierName , ' cannot be found in Smalltalk dictionary.'].\r\t\t\t\t(startUpOrShutDownList includes: earlierName) ifFalse:\r\t\t\t\t\t[self error: earlierName , ' cannot be found in the list.'].\r\t\t\t\tstartUpOrShutDownList remove: name ifAbsent:[].\r\t\t\t\tstartUpOrShutDownList add: name after: earlierName]! !\r\r!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'di 2/4/1999 15:38'!\raddToShutDownList: aClass\r\t\"This will add a ref to this class at the BEGINNING of the shutDown list.\"\r\r\tself addToShutDownList: aClass after: nil! !\r\r!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'di 2/3/1999 22:04'!\raddToShutDownList: aClass after: predecessor\r\r\tself add: aClass toList: ShutDownList after: predecessor! !\r\r!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'di 2/4/1999 15:37'!\raddToStartUpList: aClass\r\t\"This will add a ref to this class at the END of the startUp list.\"\r\r\tself addToStartUpList: aClass after: nil! !\r\r!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'di 2/3/1999 22:04'!\raddToStartUpList: aClass after: predecessor\r\r\tself add: aClass toList: StartUpList after: predecessor! !\r\r!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'RAA 6/14/2000 17:21'!\risMorphic\r        \"Answer true if the user interface is running in Morphic rathern than \r        MVC.  By convention the gloabl variable World is set to nil when MVC is \r        running.  ScheduledControllers could be set to nil when Morphic is \r        running, but this symmetry is not yet in effect.\"\r\r        ^ World ~~ nil \"or: [RequestCurrentWorldNotification signal notNil]\"! !\r\r!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'ar 11/16/1999 20:12'!\rprocessShutDownList: quitting\r\t\"Send #shutDown to each class that needs to wrap up before a snapshot.\"\r\r\tself send: #shutDown: toClassesNamedIn: ShutDownList with: quitting.\r! !\r\r!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'ar 11/16/1999 20:12'!\rprocessStartUpList: resuming\r\t\"Send #startUp to each class that needs to run initialization after a snapshot.\"\r\r\tself send: #startUp: toClassesNamedIn: StartUpList with: resuming.\r! !\r\r!SystemDictionary methodsFor: 'snapshot and quit'!\rquitPrimitive\r\t\"Primitive. Exit to another operating system on the host machine, if one\r\texists. All state changes in the object space since the last snapshot are lost.\r\tEssential. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 113>\r\tself primitiveFailed! !\r\r!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'di 2/3/1999 22:22'!\rremoveFromShutDownList: aClass\r\r\tShutDownList remove: aClass name ifAbsent: []! !\r\r!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'di 2/3/1999 22:22'!\rremoveFromStartUpList: aClass\r\r\tStartUpList remove: aClass name ifAbsent: []! !\r\r!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'di 3/7/2001 01:26'!\rsend: startUpOrShutDown toClassesNamedIn: startUpOrShutDownList with: argument\r\t\"Send the message #startUp: or #shutDown: to each class named in the list.\r\tThe argument indicates if the system is about to quit (for #shutDown:) or if\r\tthe image is resuming (for #startUp:).\r\tIf any name cannot be found, then remove it from the list.\"\r\r\t| removals class |\r\tremovals _ OrderedCollection new.\r\tstartUpOrShutDownList do:\r\t\t[:name |\r\t\tclass _ self at: name ifAbsent: [nil].\r\t\tclass == nil\r\t\t\tifTrue: [removals add: name]\r\t\t\tifFalse: [class isInMemory ifTrue:\r\t\t\t\t\t\t[class perform: startUpOrShutDown with: argument]]].\r\r\t\"Remove any obsolete entries, but after the iteration\"\r\tstartUpOrShutDownList removeAll: removals! !\r\r!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'sd 9/30/2003 13:47'!\rsetGCParameters\r\t\"Adjust the VM's default GC parameters to avoid premature tenuring.\"\r\r\tSmalltalkImage current  vmParameterAt: 5 put: 4000.  \"do an incremental GC after this many allocations\"\r\tSmalltalkImage current  vmParameterAt: 6 put: 2000.  \"tenure when more than this many objects survive the GC\"\r! !\r\r!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'md 12/12/2003 17:03'!\rsetPlatformPreferences\r\t\"Set some platform specific preferences on system startup\"\r\tself deprecated: 'Use SmalltalkImage current setPlatformPreferences'. \r\t! !\r\r!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'sd 11/16/2003 13:14'!\rshutDown\r\t^ SmalltalkImage current closeSourceFiles! !\r\r!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'BG 10/29/2003 09:55'!\rsnapshot: save andQuit: quit embedded: embeddedFlag\r\t\"Mark the changes file and close all files. If save is true, save the current state of this Smalltalk in the image file. If quit is true, then exit to the outer shell. The latter part of this method runs when resuming a previously saved image. The resume logic checks for a document file to process when starting up.\"\r\r\t| resuming msg sourceLink |\r\tObject flushDependents.\r\tObject flushEvents.\r\tsave & (SourceFiles at: 2) notNil ifTrue:\r\t\t[msg _  (quit\r\t\t\tifTrue: ['----QUIT----']\r\t\t\tifFalse: ['----SNAPSHOT----'])\r\t\t\t, Date dateAndTimeNow printString, ' ', (FileDirectory default localNameFor: self imageName).\r\t\tsourceLink _ ' priorSource: ' , LastQuitLogPosition printString.\r\t\tself assureStartupStampLogged.\r\t\tLastQuitLogPosition _ (SourceFiles at: 2) setToEnd; position.\r\t\tself logChange: msg , sourceLink.\r\t\tTranscript cr; show: msg].\r\r\tself processShutDownList: quit.\r\tCursor write show.\r\tsave ifTrue: [resuming _ embeddedFlag \r\t\t\t\t\tifTrue: [self snapshotEmbeddedPrimitive] \r\t\t\t\t\tifFalse: [self snapshotPrimitive].  \"<-- PC frozen here on image file\"\r\t\t\t\tresuming == false \"guard against failure\" ifTrue:\r\t\t\t\t\t[\"Time to reclaim segment files is immediately after a save\"\r\t\t\t\t\tSmalltalk at: #ImageSegment\r\t\t\t\t\t\tifPresent: [:theClass | theClass reclaimObsoleteSegmentFiles]]]\r\t\tifFalse: [resuming _ false].\r\tquit & (resuming == false) ifTrue: [self quitPrimitive].\r\tCursor normal show.\r\tself setGCParameters.\r\tresuming == true ifTrue: [self clearExternalObjects].\r\tself processStartUpList: resuming == true.\r\tresuming == true ifTrue:[\r\t\tself setPlatformPreferences.\r\t\tself readDocumentFile].\r\t\"Now it's time to raise an error\"\r\tresuming == nil ifTrue: [self error:'Failed to write image file (disk full?)'].\r\t^ resuming! !\r\r!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'JMM 11/21/2000 21:02'!\rsnapshotEmbeddedPrimitive\r\t<primitive: 247>\r\t^nil \"indicates error writing embedded image file\"! !\r\r!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'ar 7/22/2000 14:34'!\rsnapshotPrimitive\r\t\"Primitive. Write the current state of the object memory on a file in the\r\tsame format as the Smalltalk-80 release. The file can later be resumed,\r\treturning you to this exact state. Return normally after writing the file.\r\tEssential. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 97>\r\t^nil \"indicates error writing image file\"! !\r\r\r!SystemDictionary methodsFor: 'sources, change log' stamp: 'sw 2/15/1999 16:18'!\raboutThisSystem \r\t\"Identify software version\"\r\r\t^ self inform: self systemInformationString! !\r\r!SystemDictionary methodsFor: 'sources, change log' stamp: 'NS 1/16/2004 15:37'!\rassureStartupStampLogged\r\t\"If there is a startup stamp not yet actually logged to disk, do it now.\"\r\r\tself deprecated: 'Use SmalltalkImage current assureStartupStampLogged'.\r\tSmalltalkImage current assureStartupStampLogged.\r\t\r\"\tStartupStamp ifNil: [^ self].\r\t(SourceFiles isNil or: [(changesFile _ SourceFiles at: 2) == nil]) ifTrue: [^ self].\r\tchangesFile isReadOnly ifTrue:[^self].\r\tchangesFile setToEnd; cr; cr.\r\tchangesFile nextChunkPut: StartupStamp asString; cr.\r\tStartupStamp _ nil.\r\tself forceChangesToDisk.\"! !\r\r!SystemDictionary methodsFor: 'sources, change log' stamp: 'sd 5/23/2003 14:42'!\rcurrentChangeSetString\r\t\"Smalltalk currentChangeSetString\"\r\t^ 'Current Change Set: ', ChangeSet current name! !\r\r!SystemDictionary methodsFor: 'sources, change log' stamp: 'di 9/10/1999 15:52'!\rcurrentProjectDo: aBlock\r\t\"So that code can work after removal of Projects\"\r\tSmalltalk at: #Project ifPresent:\r\t\t[:projClass | aBlock value: projClass current].! !\r\r!SystemDictionary methodsFor: 'sources, change log' stamp: 'mir 5/1/2001 18:20'!\rdatedVersion\r\t\"Answer the version of this release.\"\r\r\t^SystemVersion current datedVersion! !\r\r!SystemDictionary methodsFor: 'sources, change log' stamp: 'tk 1/24/2000 23:01'!\rendianness\r\t| bytes word blt |\r\t\"What endian-ness is the current hardware?  The String '1234' will be stored into a machine word.  On BigEndian machines (the Mac), $1 will be the high byte if the word.  On LittleEndian machines (the PC), $4 will be the high byte.\"\r\t\"Smalltalk endianness\"\r\r\tbytes _ ByteArray withAll: #(0 0 0 0).  \"(1 2 3 4) or (4 3 2 1)\"\r\tword _ WordArray with: 16r01020304.\r\tblt _ (BitBlt toForm: (Form new hackBits: bytes)) \r\t\t\t\tsourceForm: (Form new hackBits: word).\r\tblt combinationRule: Form over.  \"store\"\r\tblt sourceY: 0; destY: 0; height: 1; width: 4.\r\tblt sourceX: 0; destX: 0.\r\tblt copyBits.  \"paste the word into the bytes\"\r\tbytes first = 1 ifTrue: [^ #big].\r\tbytes first = 4 ifTrue: [^ #little].\r\tself error: 'Ted is confused'.! !\r\r!SystemDictionary methodsFor: 'sources, change log' stamp: 'ssa 9/3/2008 11:25'!\rforceChangesToDisk\r\t\"Ensure that the changes file has been fully written to disk by closing and re-opening it. This makes the system more robust in the face of a power failure or hard-reboot.\"\r\r\t| changesFile |\r\tchangesFile _ SourceFiles at: 2.\r\t(changesFile isKindOf: FileStream) ifTrue: [\r\t\tchangesFile flush.\r\t\ttrue ifTrue:[\r\t\t\tchangesFile close.\r\t\t\tchangesFile open: changesFile name forWrite: true].\r\t\tchangesFile setToEnd.\r\t].\r! !\r\r!SystemDictionary methodsFor: 'sources, change log' stamp: 'md 12/12/2003 17:02'!\risBigEndian\r\tself deprecated: 'Use SmalltalkImage current isBigEndian'.\r\t^self endianness == #big! !\r\r!SystemDictionary methodsFor: 'sources, change log' stamp: 'md 12/12/2003 17:02'!\risLittleEndian\r\tself deprecated: 'Use SmalltalkImage current isLittleEndian'.\r\t^self endianness == #little! !\r\r!SystemDictionary methodsFor: 'sources, change log' stamp: 'mir 5/1/2001 18:02'!\rlastUpdateString\r\t\"Smalltalk lastUpdateString\"\r\t^'latest update: #', SystemVersion current highestUpdate printString! !\r\r!SystemDictionary methodsFor: 'sources, change log' stamp: 'NS 1/16/2004 15:38'!\rlogChange: aStringOrText \r\t\"Write the argument, aString, onto the changes file.\"\r\t\r\tself deprecated: 'Use SmalltalkImage current logChange:'.\r\tSmalltalkImage current logChange: aStringOrText.\t\r\t\r\"\t| aString changesFile |\r\t(SourceFiles isNil or: [(SourceFiles at: 2) == nil]) ifTrue: [^ self].\r\tself assureStartupStampLogged.\r\r\taStringOrText isText\r\t\tifTrue: [aString _ aStringOrText string]\r\t\tifFalse: [aString _ aStringOrText].\r\t(aString isMemberOf: String)\r\t\tifFalse: [self error: 'can''t log this change'].\r\t(aString findFirst: [:char | char isSeparator not]) = 0\r\t\tifTrue: [^ self].\r\t(changesFile _ SourceFiles at: 2).\r\tchangesFile isReadOnly ifTrue:[^self].\r\tchangesFile setToEnd; cr; cr.\r\tchangesFile nextChunkPut: aString.\r\tself forceChangesToDisk.\r\"! !\r\r!SystemDictionary methodsFor: 'sources, change log' stamp: 'sd 7/2/2003 22:11'!\rsystemInformationString\r\t\"Identify software version\"\r\t^ SystemVersion current version, String cr, self lastUpdateString, String cr, self currentChangeSetString\r\r\"\r\t(eToySystem _ self at: #EToySystem ifAbsent: [nil]) ifNotNil:\r\t\t[aString _ aString, '\rSqueak-Central version: ', eToySystem version, ' of ', eToySystem versionDate].\"! !\r\r!SystemDictionary methodsFor: 'sources, change log' stamp: 'mir 5/1/2001 18:19'!\rtimeStamp: aStream \r\t\"Writes system version and current time on stream aStream.\"\r\r\t| dateTime |\r\tdateTime _ Time dateAndTimeNow.\r\taStream nextPutAll: 'From ', Smalltalk datedVersion, ' [', Smalltalk lastUpdateString, '] on ', (dateTime at: 1) printString,\r\t\t\t\t\t\t' at ', (dateTime at: 2) printString! !\r\r!SystemDictionary methodsFor: 'sources, change log' stamp: 'md 12/12/2003 17:03'!\rversion\r\t\"Answer the version of this release.\"\r\r\tself deprecated: 'Use SystemVersion current version'.\r\t^SystemVersion current version! !\r\r!SystemDictionary methodsFor: 'sources, change log' stamp: 'sw 2/3/2000 15:58'!\rwriteRecentCharacters: nCharacters toFileNamed: aFilename\r\t\"Schedule an editable text view on the last n characters of changes.\"\r\t| changes |\r\tchanges _ SourceFiles at: 2.\r\tchanges setToEnd; skip: nCharacters negated.\r\t(FileStream newFileNamed: aFilename) nextPutAll: (changes next: nCharacters); close; open; edit! !\r\r!SystemDictionary methodsFor: 'sources, change log' stamp: 'sw 2/3/2000 16:17'!\rwriteRecentToFile\r\t| numChars aDirectory aFileName |\r\t\"Smalltalk writeRecentToFile\"\r\taDirectory _ FileDirectory default.\r\taFileName _ Utilities keyLike: 'squeak-recent.01' withTrailing: '.log' satisfying:\r\t\t[:aKey | (aDirectory includesKey: aKey) not].\r\tnumChars _ ChangeList getRecentLocatorWithPrompt: 'copy logged source as far back as...'.\r\tnumChars ifNotNil:\r\t\t[Smalltalk writeRecentCharacters: numChars toFileNamed: aFileName]! !\r\r\r!SystemDictionary methodsFor: 'special objects' stamp: 'JMM 6/6/2000 20:36'!\rclearExternalObjects\r\t\"Clear the array of objects that have been registered for use in non-Smalltalk code.\"\r\t\"Smalltalk clearExternalObjects\"\r\r\tExternalSemaphoreTable clearExternalObjects\r! !\r\r!SystemDictionary methodsFor: 'special objects'!\rcompactClassesArray  \"Smalltalk compactClassesArray\"\r\t\"Return the array of 31 classes whose instances may be\r\trepresented compactly\"\r\t^ Smalltalk specialObjectsArray at: 29! !\r\r!SystemDictionary methodsFor: 'special objects'!\rhasSpecialSelector: aLiteral ifTrueSetByte: aBlock\r\r\t1 to: self specialSelectorSize do:\r\t\t[:index | \r\t\t(self specialSelectorAt: index) == aLiteral\r\t\t\tifTrue: [aBlock value: index + 16rAF. ^true]].\r\t^false! !\r\r!SystemDictionary methodsFor: 'special objects' stamp: 'tpr 7/25/2003 12:30'!\rrecreateSpecialObjectsArray    \"Smalltalk recreateSpecialObjectsArray\"\r\t\"The Special Objects Array is an array of object pointers used by the\r\tSqueak virtual machine.  Its contents are critical and unchecked,\r\tso don't even think of playing here unless you know what you are doing.\"\r\t| newArray |\r\tnewArray _ Array new: 50.\r\t\"Nil false and true get used throughout the interpreter\"\r\tnewArray at: 1 put: nil.\r\tnewArray at: 2 put: false.\r\tnewArray at: 3 put: true.\r\t\"This association holds the active process (a ProcessScheduler)\"\r\tnewArray at: 4 put: (Smalltalk associationAt: #Processor).\r\t\"Numerous classes below used for type checking and instantiation\"\r\tnewArray at: 5 put: Bitmap.\r\tnewArray at: 6 put: SmallInteger.\r\tnewArray at: 7 put: String.\r\tnewArray at: 8 put: Array.\r\tnewArray at: 9 put: Smalltalk. \r\tnewArray at: 10 put: Float.\r\tnewArray at: 11 put: MethodContext.\r\tnewArray at: 12 put: BlockContext.\r\tnewArray at: 13 put: Point.\r\tnewArray at: 14 put: LargePositiveInteger.\r\tnewArray at: 15 put: Display.\r\tnewArray at: 16 put: Message.\r\tnewArray at: 17 put: CompiledMethod.\r\tnewArray at: 18 put: (self specialObjectsArray at: 18)  \"(low space Semaphore)\".\r\tnewArray at: 19 put: Semaphore.\r\tnewArray at: 20 put: Character.\r\tnewArray at: 21 put: #doesNotUnderstand:.\r\tnewArray at: 22 put: #cannotReturn:.\r\tnewArray at: 23 put: nil.  \"*unused*\"\r\t\"An array of the 32 selectors that are compiled as special bytecodes,\r\tpaired alternately with the number of arguments each takes.\"\r\tnewArray at: 24 put: #(+ 1 - 1 < 1 > 1 <= 1 >= 1 = 1 ~= 1 * 1 / 1 \\\\ 1 @ 1 bitShift: 1 // 1 bitAnd: 1 bitOr: 1 at: 1 at:put: 2 size 0 next 0 nextPut: 1 atEnd 0 == 1 class 0 blockCopy: 1 value 0 value: 1 do: 1 new 0 new: 1 x 0 y 0 ).\r\t\"An array of the 255 Characters in ascii order.\"\r\tnewArray at: 25 put: ((0 to: 255) collect: [:ascii | Character value: ascii]).\r\tnewArray at: 26 put: #mustBeBoolean.\r\tnewArray at: 27 put: ByteArray.\r\tnewArray at: 28 put: Process.\r\t\"An array of up to 31 classes whose instances will have compact headers\"\r\tnewArray at: 29 put: self compactClassesArray.\r\tnewArray at: 30 put: (self specialObjectsArray at: 30)   \"(delay Semaphore)\".\r\tnewArray at: 31 put: (self specialObjectsArray at: 31)   \"(user interrupt Semaphore)\".\r\r\t\"Prototype instances that can be copied for fast initialization\"\r\tnewArray at: 32 put: (Float new: 2).\r\tnewArray at: 33 put: (LargePositiveInteger new: 4).\r\tnewArray at: 34 put: Point new.\r\tnewArray at: 35 put: #cannotInterpret:.\r\t\"Note: This must be fixed once we start using context prototypes\"\r\tnewArray at: 36 put: (self specialObjectsArray at: 36). \r\t\t\t\t\t\t\"(MethodContext new: CompiledMethod fullFrameSize).\"\r\tnewArray at: 37 put: nil.\r\tnewArray at: 38 put: (self specialObjectsArray at: 38). \r\t\t\t\t\t\t\"(BlockContext new: CompiledMethod fullFrameSize).\"\r\r\tnewArray at: 39 put: Array new.  \"array of objects referred to by external code\"\r\r\tnewArray at: 40 put: PseudoContext.\r\tnewArray at: 41 put: TranslatedMethod.\r\r\t\"finalization Semaphore\"\r\tnewArray at: 42 put: ((self specialObjectsArray at: 42) ifNil:[Semaphore new]).\r\r\tnewArray at: 43 put: LargeNegativeInteger.\r\r\t\"External objects for callout.\r\tNote: Written so that one can actually completely remove the FFI.\"\r\tnewArray at: 44 put: (Smalltalk at: #ExternalAddress ifAbsent:[nil]).\r\tnewArray at: 45 put: (Smalltalk at: #ExternalStructure ifAbsent:[nil]).\r\tnewArray at: 46 put: (Smalltalk at: #ExternalData ifAbsent:[nil]).\r\tnewArray at: 47 put: (Smalltalk at: #ExternalFunction ifAbsent:[nil]).\r\tnewArray at: 48 put: (Smalltalk at: #ExternalLibrary ifAbsent:[nil]).\r\r\tnewArray at: 49 put: #aboutToReturn:through:.\r\tnewArray at: 50 put: #run:with:in:.\r\r\t\"Now replace the interpreter's reference in one atomic operation\"\r\tself specialObjectsArray become: newArray! !\r\r!SystemDictionary methodsFor: 'special objects' stamp: 'JMM 6/6/2000 20:39'!\rregisterExternalObject: anObject\r\t\"Register the given object in the external objects array and return its index. If it is already there, just return its index.\"\r\r\t^ExternalSemaphoreTable registerExternalObject: anObject! !\r\r!SystemDictionary methodsFor: 'special objects'!\rspecialNargsAt: anInteger \r\t\"Answer the number of arguments for the special selector at: anInteger.\"\r\r\t^ (self specialObjectsArray at: 24) at: anInteger * 2! !\r\r!SystemDictionary methodsFor: 'special objects'!\rspecialObjectsArray  \"Smalltalk specialObjectsArray at: 1\"\r\t<primitive: 129>\r\t^ self primitiveFailed! !\r\r!SystemDictionary methodsFor: 'special objects'!\rspecialSelectorAt: anInteger \r\t\"Answer the special message selector from the interleaved specialSelectors array.\"\r\r\t^ (self specialObjectsArray at: 24) at: anInteger * 2 - 1! !\r\r!SystemDictionary methodsFor: 'special objects'!\rspecialSelectorSize\r\t\"Answer the number of special selectors in the system.\"\r\r\t^ (self specialObjectsArray at: 24) size // 2! !\r\r!SystemDictionary methodsFor: 'special objects' stamp: 'JMM 6/6/2000 20:40'!\runregisterExternalObject: anObject\r\t\"Unregister the given object in the external objects array. Do nothing if it isn't registered.\"\r\r\tExternalSemaphoreTable unregisterExternalObject: anObject! !\r\r\r!SystemDictionary methodsFor: 'copying' stamp: 'sw 11/21/2001 15:08'!\rassureUniClass\r\t\"Assure that the receiver has a uniclass.  Or rather, in this case, stop short of fulfilling such a request\"\r\r\tself error: 'We do not want uniclasses descending from here'\r! !\r\r!SystemDictionary methodsFor: 'copying' stamp: 'tk 10/20/2000 11:35'!\rveryDeepCopyWith: deepCopier\r\t\"Return self.  I can't be copied.  Do not record me.\"! !\r\r\r!SystemDictionary methodsFor: 'deprecated' stamp: 'md 12/12/2003 17:03'!\rswapBytesIn: aNonPointerThing from: start to: stop\r\t\"Perform a bigEndian/littleEndian byte reversal of my words.\r\tWe only intend this for non-pointer arrays.  Do nothing if I contain pointers.\"\r\t| hack blt |\r\tself deprecated: 'Use Bitmap class>>swapBytesIn: aNonPointerThing from: start to: stop instead'.\r\t\"The implementation is a hack, but fast for large ranges\"\r\thack _ Form new hackBits: aNonPointerThing.\r\tblt _ (BitBlt toForm: hack) sourceForm: hack.\r\tblt combinationRule: Form reverse.  \"XOR\"\r\tblt sourceY: start-1; destY: start-1; height: stop-start+1; width: 1.\r\tblt sourceX: 0; destX: 3; copyBits.  \"Exchange bytes 0 and 3\"\r\tblt sourceX: 3; destX: 0; copyBits.\r\tblt sourceX: 0; destX: 3; copyBits.\r\tblt sourceX: 1; destX: 2; copyBits.  \"Exchange bytes 1 and 2\"\r\tblt sourceX: 2; destX: 1; copyBits.\r\tblt sourceX: 1; destX: 2; copyBits.\r! !\r\r\r!SystemDictionary methodsFor: 'toDeprecate' stamp: 'sd 11/16/2003 14:23'!\rchangeImageNameTo: aString\r\r\tself deprecated: 'Use SmalltalkImage current changeImageNameTo: aString'.\r\tSmalltalkImage current imageName: aString.\r\tLastImageName _ SmalltalkImage current imageName! !\r\r!SystemDictionary methodsFor: 'toDeprecate' stamp: 'sd 11/16/2003 14:26'!\rchangesName\r\t\"Answer the local name for the changes file corresponding to the image file name.\"\r\t\"Smalltalk changesName\"\r\r\t| imName |\r\tself deprecated: 'Use SmalltalkImage current changesName'.\r\timName _ FileDirectory baseNameFor:\r\t\t(FileDirectory localNameFor: SmalltalkImage current imageName).\r\t^ imName, FileDirectory dot, 'changes'\r! !\r\r!SystemDictionary methodsFor: 'toDeprecate' stamp: 'sd 11/16/2003 14:26'!\rcloseSourceFiles\r\t\"Shut down the source files if appropriate.  1/29/96 sw: changed so that the closing and nilification only take place if the entry was a FileStream, thus allowing stringified sources to remain in the saved image file\"\r\r\tself deprecated: 'Use SmalltalkImage current closeSourceFiles'.\r\t1 to: 2 do: [:i |\r\t\t((SourceFiles at: i) isKindOf: FileStream)\r\t\t\tifTrue:\r\t\t\t\t[(SourceFiles at: i) close.\r\t\t\t\tSourceFiles at: i put: nil]]! !\r\r!SystemDictionary methodsFor: 'toDeprecate' stamp: 'tpr 12/15/2003 12:09'!\rfullNameForChangesNamed: aName\r\r\t| newName |\r\tself deprecated: 'Use SmalltalkImage current fullNameForChangesNamed: aName'.\r\tnewName _ FileDirectory baseNameFor: (FileDirectory default fullNameFor: aName).\r\t^newName , FileDirectory dot, FileDirectory changeSuffix.! !\r\r!SystemDictionary methodsFor: 'toDeprecate' stamp: 'tpr 12/15/2003 12:10'!\rfullNameForImageNamed: aName\r\r\t| newName |\r\tself deprecated: 'Use SmalltalkImage current fullNameForImageNamed: aName'.\r\tnewName _ FileDirectory baseNameFor: (FileDirectory default fullNameFor: aName).\r\t^newName , FileDirectory dot, FileDirectory imageSuffix.! !\r\r!SystemDictionary methodsFor: 'toDeprecate' stamp: 'tpr 12/15/2003 12:19'!\rgetFileNameFromUser\r\r\t| newName |\r\tself deprecated: 'Use SmalltalkImage current getFileNameFromUser'.\r\tnewName _ FillInTheBlank\r\t\trequest: 'New File Name?' translated\r\t\tinitialAnswer: (FileDirectory localNameFor: SmalltalkImage current imageName).\r\tnewName = '' ifTrue: [^nil].\r\t((FileDirectory default fileOrDirectoryExists: (SmalltalkImage current fullNameForImageNamed: newName)) or:\r\t [FileDirectory default fileOrDirectoryExists: (SmalltalkImage current fullNameForChangesNamed: newName)]) ifTrue: [\r\t\t(self confirm: ('{1} already exists. Overwrite?' translated format: {newName})) ifFalse: [^nil]].\r\t^newName\r! !\r\r!SystemDictionary methodsFor: 'toDeprecate' stamp: 'sd 11/16/2003 14:27'!\rlastQuitLogPosition\r\r\tself deprecated: 'Use SmalltalkImage current lastQuitLogPosition'.\r\t^ LastQuitLogPosition! !\r\r!SystemDictionary methodsFor: 'toDeprecate' stamp: 'sd 11/16/2003 14:27'!\ropenSourceFiles\r\t\r\tself deprecated: 'Use SmalltalkImage current lastQuitLogPosition'.\r\t\r\tSmalltalkImage current imageName = LastImageName ifFalse:\r\t\t[\"Reset the author initials to blank when the image gets moved\"\r\t\tLastImageName _ SmalltalkImage current imageName.\r\t\tUtilities setAuthorInitials: ''].\r\tFileDirectory\r\t\topenSources: SmalltalkImage current sourcesName\r\t\tandChanges: SmalltalkImage current changesName\r\t\tforImage: LastImageName.\r\tStandardSourceFileArray install! !\r\r!SystemDictionary methodsFor: 'toDeprecate' stamp: 'sd 11/16/2003 14:27'!\rreadDocumentFile\r\t\"No longer used. Everything is now done in ProjectLauncher.\"\r\t\r\tself deprecated: 'Use SmalltalkImage current readDocumentFile'.\r\tStartupStamp _ '----STARTUP----', Time dateAndTimeNow printString, ' as ', SmalltalkImage current imageName.\r! !\r\r!SystemDictionary methodsFor: 'toDeprecate' stamp: 'tpr 12/15/2003 12:21'!\rsaveAs\r\t\"Put up the 'saveAs' prompt, obtain a name, and save the image  under that new name.\"\r\r\t| newName |\r\tself deprecated: 'Use SmalltalkImage current saveAs'.\r\tnewName _ SmalltalkImage current getFileNameFromUser.\r\tnewName isNil ifTrue: [^ self].\r\t(SourceFiles at: 2) ifNotNil:\r\t\t[SmalltalkImage current closeSourceFiles; \"so copying the changes file will always work\"\r\t\t\t saveChangesInFileNamed: (SmalltalkImage current fullNameForChangesNamed: newName)].\r\tSmalltalkImage current saveImageInFileNamed: (SmalltalkImage current fullNameForImageNamed: newName)! !\r\r!SystemDictionary methodsFor: 'toDeprecate' stamp: 'sd 11/16/2003 14:27'!\rsaveChangesInFileNamed: aString\r\t\r\tself deprecated: 'Use SmalltalkImage current saveChangesInFileNamed: aString'.\r\tFileDirectory default \r\t\tcopyFileWithoutOverwriteConfirmationNamed: SmalltalkImage current changesName \r\t\ttoFileNamed: aString.\r\tself\tsetMacFileInfoOn: aString.! !\r\r!SystemDictionary methodsFor: 'toDeprecate' stamp: 'sd 11/16/2003 14:27'!\rsaveImageInFileNamed: aString\r\r\tself deprecated: 'Use SmalltalkImage current saveImageInFileNamed: aString'.\r\tSmalltalkImage current \r\t\tchangeImageNameTo: (FileDirectory default fullNameFor: aString).\r\tSmalltalkImage current\tcloseSourceFiles.\r\tSmalltalkImage current openSourceFiles.  \"so SNAPSHOT appears in new changes file\"\r\tSmalltalkImage current \r\t\tsaveImageSegments.\r\tSmalltalkImage current snapshot: true andQuit: false.! !\r\r!SystemDictionary methodsFor: 'toDeprecate' stamp: 'sd 11/16/2003 14:27'!\rsaveImageSegments\r\r\t| haveSegs oldImageSegDir newImageSegDir |\r\tself deprecated: 'Use SmalltalkImage current saveImageSegments'.\r\thaveSegs _ false.\r\tSmalltalk at: #ImageSegment ifPresent: [:theClass | \r\t\t(haveSegs _ theClass instanceCount ~= 0) ifTrue: [\r\t\t\toldImageSegDir _ theClass segmentDirectory]].\r\thaveSegs ifTrue: [\r\t\tSmalltalk at: #ImageSegment ifPresent: [:theClass |\r\t\t\tnewImageSegDir _ theClass segmentDirectory.\t\"create the folder\"\r\t\t\toldImageSegDir fileNames do: [:theName | \"copy all segment files\"\r\t\t\t\t| imageSegmentName |\r\t\t\t\timageSegmentName _ oldImageSegDir pathName, FileDirectory slash, theName.\r\t\t\t\tnewImageSegDir \r\t\t\t\t\tcopyFileWithoutOverwriteConfirmationNamed: imageSegmentName\r\t\t\t\t\ttoFileNamed: theName]]].\r! !\r\r!SystemDictionary methodsFor: 'toDeprecate' stamp: 'sd 11/16/2003 14:27'!\rsnapshot: save andQuit: quit\r\r\tself deprecated: 'Use SmalltalkImage current snapshot: save andQuit: quit'.\r\t^self snapshot: save andQuit: quit embedded: false! !\r\r\r!SystemDictionary methodsFor: 'browsing' stamp: 'BG 10/30/2003 21:12'!\rbrowseMethodsWhoseNamesContain: aString\r\t\"Launch a tool which shows all methods whose names contain the given string; case-insensitive.\r\t1/16/1996 sw, at the dawn of Squeak: this was the classic implementation that provided the underpinning for the 'method names containing it' (cmd-shift-W) feature that has always been in Squeak -- the feature that later inspired the MethodFinder (aka SelectorBrowser).\r\tsw 7/27/2001:\tSwitched to showing a MessageNames tool rather than a message-list browser, if in Morphic.\"\r\r\t| aList |\r\taList _ Symbol selectorsContaining: aString.\r\t\t\taList size > 0 ifTrue:\r\t\t\t\t[self browseAllImplementorsOfList: aList asSortedCollection title: 'Methods whose names contain ''', aString, '''']\r\t! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rSystemDictionary class\r\tinstanceVariableNames: ''!\r\r!SystemDictionary class methodsFor: 'initialization' stamp: 'BG 8/18/2004 15:09'!\rinitialize\r\t\"SystemDictionary initialize\"\r\r\t| oldList |\r\toldList _ StartUpList.\r\tStartUpList _ OrderedCollection new.\r\t\"These get processed from the top down...\"\r\t#(\r\t\tDisplayScreen\r\t\tCursor\r\t\tInputSensor\r\t\tProcessorScheduler  \"Starts low space watcher and bkground.\"\r\t\tDelay\r\t\tFileDirectory  \"Enables file stack dump and opens sources.\"\r\t\t\"ShortIntegerArray\"\r\t\tShortRunArray\r\t\tCrLfFileStream\r\t) do:[:clsName|\r\t\tSmalltalk at: clsName ifPresent:[:cls| Smalltalk addToStartUpList: cls].\r\t].\r\toldList ifNotNil: [oldList do: [:className | Smalltalk at: className\r\t\t\t\t\t\tifPresent: [:theClass | Smalltalk addToStartUpList: theClass]]].\r\t#(\r\t\tImageSegment\r\t\tControlManager\r\t) do:[:clsName|\r\t\tSmalltalk at: clsName ifPresent:[:cls| Smalltalk addToStartUpList: cls].\r\t].\r\t\t\r\r\toldList _ ShutDownList.\r\tShutDownList _ OrderedCollection new.\r\t\"These get processed from the bottom up...\"\r\t#(\r\t\tDisplayScreen\r\t\tForm\r\t\tControlManager\r\t\tStrikeFont\r\t\tColor\r\t\tFileDirectory\r\t\tDelay\r\t\tHttpUrl\r\t\tPassword\r\t\tPWS\r\t\tMailDB\r\t\tImageSegment\r\t) do:[:clsName|\r\t\tSmalltalk at: clsName ifPresent:[:cls| Smalltalk addToShutDownList: cls].\r\t].\r\r\toldList ifNotNil: [oldList reverseDo: [:className | Smalltalk at: className\r\t\t\t\t\t\tifPresent: [:theClass | Smalltalk addToShutDownList: theClass]]].\r! !\rEventManager subclass: #SystemEventManager\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Change Notification'!\r\r!SystemEventManager methodsFor: 'events-accessing' stamp: 'rw 7/20/2003 17:02'!\ractionSequenceForEvent: anEventSelector\r\r    ^(self actionMap\r        at: anEventSelector asSymbol\r        ifAbsent: [^WeakActionSequenceTrappingErrors new])\r            asActionSequenceTrappingErrors! !\rObject subclass: #SystemNavigation\r\tinstanceVariableNames: 'browserClass hierarchyBrowserClass'\r\tclassVariableNames: 'Default'\r\tpoolDictionaries: ''\r\tcategory: 'System-Support'!\r!SystemNavigation commentStamp: 'sd 4/15/2003 22:30' prior: 0!\rI support the navigation of the system. I act as a facade but as I could require some state\ror different way of navigating the system all my behavior are on the instance side!\r\r\r!SystemNavigation methodsFor: 'browse' stamp: 'sd 4/16/2003 08:53'!\rbrowseAllAccessesTo: instVarName from: aClass\r\t\"Create and schedule a Message Set browser for all the receiver's methods \r\tor any methods of a subclass/superclass that refer to the instance variable name.\"\r\r\t\"self new browseAllAccessesTo: 'contents' from: Collection.\"\r\t\r\t| coll |\r\tcoll _ OrderedCollection new.\r\tCursor wait showWhile: [\r\t\taClass withAllSubAndSuperclassesDo: [:class | \r\t\t\t(class whichSelectorsAccess: instVarName) do: [:sel |\r\t\t\t\tsel == #DoIt ifFalse: [\r\t\t\t\t\tcoll add: (\r\t\t\t\t\t\tMethodReference new\r\t\t\t\t\t\t\tsetStandardClass: class \r\t\t\t\t\t\t\tmethodSymbol: sel\r\t\t\t\t\t)\r\t\t\t\t]\r\t\t\t]\r\t\t].\r\t].\r\t^ self \r\t\tbrowseMessageList: coll \r\t\tname: 'Accesses to ' , instVarName \r\t\tautoSelect: instVarName! !\r\r!SystemNavigation methodsFor: 'browse' stamp: 'sd 4/29/2003 12:23'!\rbrowseAllCallsOn: aLiteral \r\t\"Create and schedule a message browser on each method that refers to \r\taLiteral. For example, SystemNavigation new browseAllCallsOn: #open:label:.\"\r\t(aLiteral isKindOf: LookupKey)\r\t\tifTrue: [^ self\r\t\t\t\tbrowseMessageList: (self allCallsOn: aLiteral) asSortedCollection\r\t\t\t\tname: 'Users of ' , aLiteral key\r\t\t\t\tautoSelect: aLiteral key].\r\tself\r\t\tbrowseMessageList: (self allCallsOn: aLiteral) asSortedCollection\r\t\tname: 'Senders of ' , aLiteral\r\t\tautoSelect: aLiteral keywords first! !\r\r!SystemNavigation methodsFor: 'browse' stamp: 'sd 4/16/2003 11:44'!\rbrowseAllCallsOn: aLiteral localTo: aClass\r\t\"Create and schedule a message browser on each method in or below the given class that refers to\r\taLiteral. For example, Smalltalk browseAllCallsOn: #open:label:.\"\r\r\taClass ifNil: [ ^self inform: 'no selected class' ].\r\t(aLiteral isKindOf: LookupKey)\r\t\tifTrue: [self browseMessageList: (aClass allLocalCallsOn: aLiteral) asSortedCollection\r\t\t\t\t\tname: 'Users of ' , aLiteral key, ' local to ', aClass name\r\t\t\t\t\tautoSelect: aLiteral key]\r\t\tifFalse: [self browseMessageList: (aClass allLocalCallsOn: aLiteral) asSortedCollection\r\t\t\t\t\tname: 'Senders of ' , aLiteral, ' local to ', aClass name\r\t\t\t\t\tautoSelect: aLiteral keywords first]! !\r\r!SystemNavigation methodsFor: 'browse' stamp: 'tpr 12/17/2003 16:01'!\rbrowseAllCallsOnClass: aClass\r\t\"Create and schedule a message browser on each method that refers to \r\taClass. For example, SystemNavigation new browseAllCallsOnClass: Object.\"\r\tself\r\t\tbrowseMessageList: aClass allCallsOn asSortedCollection\r\t\tname: 'Users of class ' , aClass theNonMetaClass name\r\t\tautoSelect: aClass theNonMetaClass name! !\r\r!SystemNavigation methodsFor: 'browse' stamp: 'sd 4/19/2003 12:15'!\rbrowseAllImplementorsOf: selector \r\t\"Create and schedule a message browser on each method that implements \r\tthe message whose selector is the argument, selector. For example,  \r\tSmalltalk browseAllImplementorsOf: #at:put:.\"\r\t^ self\r\t\tbrowseMessageList: (self allImplementorsOf: selector)\r\t\tname: 'Implementors of ' , selector! !\r\r!SystemNavigation methodsFor: 'browse' stamp: 'nk 6/26/2003 22:31'!\rbrowseAllImplementorsOf: selector localTo: aClass\r\t\"Create and schedule a message browser on each method in or below the given class\r\tthat implements the message whose selector is the argument, selector. For example, \r\tSystemNavigation new browseAllImplementorsOf: #at:put: localTo: Dictionary.\"\r\r\taClass ifNil: [ ^self inform: 'no class selected' ].\r\t^self browseMessageList: (self allImplementorsOf: selector localTo: aClass)\r\t\tname: 'Implementors of ' , selector, ' local to ', aClass name! !\r\r!SystemNavigation methodsFor: 'browse' stamp: 'sd 4/19/2003 12:15'!\rbrowseAllImplementorsOfList: selectorList title: aTitle \r\t\"Create and schedule a message browser on each method that implements \r\tthe message whose selector is in the argument selectorList. For \r\texample,  \r\tself new browseAllImplementorsOf: #(at:put: size).  \r\t1/16/96 sw: this variant adds the title argument.  \r\t1/24/96 sw: use a SortedCollection  \r\t2/1/96 sw: show normal cursor\"\r\t| implementorLists flattenedList |\r\timplementorLists _ selectorList\r\t\t\t\tcollect: [:each | self allImplementorsOf: each].\r\tflattenedList _ SortedCollection new.\r\timplementorLists\r\t\tdo: [:each | flattenedList addAll: each].\r\tCursor normal show.\r\t^ self browseMessageList: flattenedList name: aTitle! !\r\r!SystemNavigation methodsFor: 'browse' stamp: 'sd 4/16/2003 11:39'!\rbrowseAllObjectReferencesTo: anObject except: objectsToExclude ifNone: aBlock\r\t\"Bring up a list inspector on the objects that point to anObject.\r\tIf there are none, then evaluate aBlock on anObject.  \"\r\r\t| aList shortName |\r\taList _ Smalltalk pointersTo: anObject except: objectsToExclude.\r\taList size > 0 ifFalse: [^ aBlock value: anObject].\r\tshortName _ (anObject name ifNil: [anObject printString]) contractTo: 20.\r\tOrderedCollectionInspector openOn: aList withEvalPane: false\r\t\twithLabel: 'Objects pointing to ', shortName.! !\r\r!SystemNavigation methodsFor: 'browse' stamp: 'sd 4/29/2003 20:43'!\rbrowseAllSelect: aBlock \r\t\"Create and schedule a message browser on each method that, when used \r\tas the block argument to aBlock gives a true result. For example,  \r\tSystemNavigation new browseAllSelect: [:method | method numLiterals >  \r\t10].\"\r\t^ self\r\t\tbrowseMessageList: (self allMethodsSelect: aBlock)\r\t\tname: 'selected messages'! !\r\r!SystemNavigation methodsFor: 'browse' stamp: 'sd 4/29/2003 20:44'!\rbrowseAllSelect: aBlock name: aName autoSelect: autoSelectString \r\t\"Create and schedule a message browser on each method that, when used \r\tas the block argument to aBlock gives a true result. Do not return an  \r\t#DoIt traces.\"\r\t\"self new browseAllSelect: [:method | method numLiterals > 10] name:  \r\t'Methods with more than 10 literals' autoSelect: 'isDigit'\"\r\t^ self\r\t\tbrowseMessageList: (self allMethodsNoDoitsSelect: aBlock)\r\t\tname: aName\r\t\tautoSelect: autoSelectString! !\r\r!SystemNavigation methodsFor: 'browse' stamp: 'sd 4/16/2003 08:53'!\rbrowseAllStoresInto: instVarName from: aClass\r\t\"Create and schedule a Message Set browser for all the receiver's methods \r\tor any methods of a subclass/superclass that refer to the instance variable name.\"\r\t\r\t\"self new browseAllStoresInto: 'contents' from: Collection.\"\r\r\t| coll |\r\tcoll _ OrderedCollection new.\r\tCursor wait showWhile: [\r\t\taClass withAllSubAndSuperclassesDo: [:class | \r\t\t\t(class whichSelectorsStoreInto: instVarName) do: [:sel |\r\t\t\t\tsel == #DoIt ifFalse: [\r\t\t\t\t\tcoll add: (\r\t\t\t\t\t\tMethodReference new\r\t\t\t\t\t\t\tsetStandardClass: class \r\t\t\t\t\t\t\tmethodSymbol: sel\r\t\t\t\t\t)\r\t\t\t\t]\r\t\t\t]\r\t\t].\r\t].\r\t^ self\r\t\tbrowseMessageList: coll \r\t\tname: 'Stores into ' , instVarName \r\t\tautoSelect: instVarName! !\r\r!SystemNavigation methodsFor: 'browse' stamp: 'sd 4/16/2003 08:53'!\rbrowseClassCommentsWithString: aString\r\t\"Smalltalk browseClassCommentsWithString: 'my instances' \"\r\t\"Launch a message list browser on all class comments containing aString as a substring.\"\r\r\t| caseSensitive suffix list |\r\r\tsuffix _ (caseSensitive _ Sensor shiftPressed)\r\t\tifTrue: [' (case-sensitive)']\r\t\tifFalse: [' (use shift for case-sensitive)'].\r\tlist _ Set new.\r\tCursor wait showWhile: [\r\t\tSmalltalk allClassesDo: [:class | \r\t\t\t(class organization classComment asString findString: aString \r\t\t\t\t\t\t\tstartingAt: 1 caseSensitive: caseSensitive) > 0 ifTrue: [\r\t\t\t\t\t\t\t\tlist add: (\r\t\t\t\t\t\t\t\t\tMethodReference new\r\t\t\t\t\t\t\t\t\t\tsetStandardClass: class\r\t\t\t\t\t\t\t\t\t\tmethodSymbol: #Comment\r\t\t\t\t\t\t\t\t)\r\t\t\t\t\t\t\t]\r\t\t]\r\t].\r\t^ self \r\t\tbrowseMessageList: list asSortedCollection\r\t\tname: 'Class comments containing ' , aString printString , suffix\r\t\tautoSelect: aString! !\r\r!SystemNavigation methodsFor: 'browse' stamp: 'md 10/22/2003 16:20'!\rbrowseClassVarRefs: aClass\r\t\"Put up a menu offering all class variable names; if the user chooses one, open up a message-list browser on all methods \r\tthat refer to the selected class variable\"\r\r\t| lines labelStream vars allVars index owningClasses |\r\tlines _ OrderedCollection new.\r\tallVars _ OrderedCollection new.\r\towningClasses _ OrderedCollection new.\r\tlabelStream _ WriteStream on: (String new: 200).\r\taClass withAllSuperclasses reverseDo:\r\t\t[:class |\r\t\tvars _ class classVarNames asSortedCollection.\r\t\tvars do:\r\t\t\t[:var |\r\t\t\tlabelStream nextPutAll: var; cr.\r\t\t\tallVars add: var.\r\t\t\towningClasses add: class].\r\t\tvars isEmpty ifFalse: [lines add: allVars size]].\r\tlabelStream contents isEmpty ifTrue: [^Beeper beep]. \"handle nil superclass better\"\r\tlabelStream skip: -1 \"cut last CR\".\r\tindex _ (PopUpMenu labels: labelStream contents lines: lines) startUp.\r\tindex = 0 ifTrue: [^ self].\r\tself browseAllCallsOn:\r\t\t((owningClasses at: index) classPool associationAt: (allVars at: index))! !\r\r!SystemNavigation methodsFor: 'browse' stamp: 'sd 3/28/2003 18:49'!\rbrowseClassVariables: aClass\r\taClass classPool inspectWithLabel: 'Class Variables in ' , aClass name! !\r\r!SystemNavigation methodsFor: 'browse' stamp: 'sd 4/15/2003 22:24'!\rbrowseClassesWithNamesContaining: aString caseSensitive: caseSensitive \r\t\"Smalltalk browseClassesWithNamesContaining: 'eMorph' caseSensitive: true \"\r\t\"Launch a class-list list browser on all classes whose names containg aString as a substring.\"\r\r\t| suffix aList |\r\tsuffix _ caseSensitive\r\t\t\t\tifTrue: [' (case-sensitive)']\r\t\t\t\tifFalse: [' (use shift for case-sensitive)'].\r\taList _ OrderedCollection new.\r\tCursor wait\r\t\tshowWhile: [Smalltalk\r\t\t\t\tallClassesDo: [:class | (class name includesSubstring: aString caseSensitive: caseSensitive)\r\t\t\t\t\t\tifTrue: [aList add: class name]]].\r\taList size > 0\r\t\tifTrue: [ClassListBrowser new initForClassesNamed: aList asSet asSortedArray title: 'Classes whose names contain ' , aString , suffix]! !\r\r!SystemNavigation methodsFor: 'browse' stamp: 'sd 4/15/2003 16:08'!\rbrowseInstVarDefs: aClass\r\t\"Copied from browseInstVarRefs.  Should be consolidated some day. 7/29/96 di\r\t7/30/96 sw: did the consolidation\"\r\t\"Change to use SystemNavigation  27 March 2003 sd\"\r\r\taClass chooseInstVarThenDo:\t\r\t\t[:aVar | self browseAllStoresInto: aVar from: aClass]! !\r\r!SystemNavigation methodsFor: 'browse' stamp: 'sd 4/15/2003 16:08'!\rbrowseInstVarRefs: aClass\r\t\"1/16/96 sw: moved here from Browser so that it could be used from a variety of places.\r\t 7/30/96 sw: call chooseInstVarThenDo: to get the inst var choice\"\r\r\taClass chooseInstVarThenDo: \r\t\t[:aVar | self browseAllAccessesTo: aVar from: aClass]! !\r\r!SystemNavigation methodsFor: 'browse' stamp: 'sd 4/16/2003 09:18'!\rbrowseMessageList: messageList name: label \r\t\"Create and schedule a MessageSet browser on messageList.\"\r\t^ self   \r\t\tbrowseMessageList: messageList \r\t\tname: label \r\t\tautoSelect: nil! !\r\r!SystemNavigation methodsFor: 'browse' stamp: 'sd 4/16/2003 08:48'!\rbrowseMessageList: messageList name: labelString autoSelect: autoSelectString\r\t| title aSize |\r\t\"Create and schedule a MessageSet browser on the message list.\"\r\r\tmessageList size = 0 ifTrue: \r\t\t[^ (PopUpMenu labels: ' OK ')\r\t\t\t\tstartUpWithCaption: 'There are no\r' , labelString].\r\r\ttitle _ (aSize _ messageList size) > 1\r\t\tifFalse:\t[labelString]\r\t\tifTrue:\t[ labelString, ' [', aSize printString, ']'].\r\r\tMessageSet \r\t\topenMessageList: messageList \r\t\tname: title \r\t\tautoSelect: autoSelectString! !\r\r!SystemNavigation methodsFor: 'browse' stamp: 'sd 4/15/2003 22:46'!\rbrowseMethodsWhoseNamesContain: aString\r\t\"Launch a tool which shows all methods whose names contain the given string; case-insensitive.\r\t1/16/1996 sw, at the dawn of Squeak: this was the classic implementation that provided the underpinning for the 'method names containing it' (cmd-shift-W) feature that has always been in Squeak -- the feature that later inspired the MethodFinder (aka SelectorBrowser).\r\tsw 7/27/2001:\tSwitched to showing a MessageNames tool rather than a message-list browser, if in Morphic.\"\r\r\t| aList |\r\tSmalltalk isMorphic\r\t\tifFalse:\r\t\t\t[aList _ Symbol selectorsContaining: aString.\r\t\t\taList size > 0 ifTrue:\r\t\t\t\t[self browseAllImplementorsOfList: aList asSortedCollection title: 'Methods whose names contain ''', aString, '''']]\r\r\t\tifTrue:\r\t\t\t[(MessageNames methodBrowserSearchingFor: aString) openInWorld]\r\t! !\r\r!SystemNavigation methodsFor: 'browse' stamp: 'sd 4/20/2003 14:11'!\rbrowseMethodsWithSourceString: aString \r\t\"SystemNavigation new browseMethodsWithSourceString: 'SourceString'\"\r\t\"Launch a browser on all methods whose source code contains aString as \r\ta substring.\"\r\t| caseSensitive suffix |\r\tsuffix _ (caseSensitive _ Sensor shiftPressed)\r\t\t\t\tifTrue: [' (case-sensitive)']\r\t\t\t\tifFalse: [' (use shift for case-sensitive)'].\r\t^ self\r\t\tbrowseMessageList: (self allMethodsWithSourceString: aString matchCase: caseSensitive)\r\t\tname: 'Methods containing ' , aString printString , suffix\r\t\tautoSelect: aString! !\r\r!SystemNavigation methodsFor: 'browse' stamp: 'sd 4/15/2003 22:28'!\rbrowseMethodsWithString: aString\r\t\"Launch a browser on all methods that contain string literals with aString as a substring. The search is case-insensitive, unless the shift key is pressed, in which case the search is case-sensitive.\"\r\r\t'string for testing'.\r\t^ self browseMethodsWithString: aString matchCase: Sensor shiftPressed\r\r\t\"SystemNavigation new browseMethodsWithString: 'Testing' matchCase: false\"\r\t\"SystemNavigation new browseMethodsWithString: 'Testing' matchCase: true\"! !\r\r!SystemNavigation methodsFor: 'browse' stamp: 'sd 4/16/2003 07:51'!\rbrowseMethodsWithString: aString matchCase: caseSensitive\r\t\"Launch a browser on all methods that contain string literals with aString as a substring. Make the search case-sensitive or insensitive as dictated by the caseSensitive boolean parameter\"\r\r\tself browseAllSelect:\r\t\t\t[:method |\r\t\t\t\tmethod  hasLiteralSuchThat: [:lit |\r\t\t\t\t\tlit class == String and:\r\t\t\t\t\t[lit includesSubstring: aString caseSensitive: caseSensitive]]]\r\t\tname:  'Methods with string ', aString printString, (caseSensitive ifTrue: [' (case-sensitive)'] ifFalse: [' (case-insensitive)'])\r\t\tautoSelect: aString.\r! !\r\r!SystemNavigation methodsFor: 'browse' stamp: 'sd 4/15/2003 20:32'!\rbrowseObsoleteReferences  \r\t\"self new browseObsoleteReferences\"\r\r\t| references |\r\treferences _ OrderedCollection new.\r\t(LookupKey allSubInstances select:\r\t\t[:x | ((x value isKindOf: Behavior) and: ['AnOb*' match: x value name]) or:\r\t\t['AnOb*' match: x value class name]]) \r\t\tdo: [:x | references addAll: (self allCallsOn: x)].\r\tself  \r\t\tbrowseMessageList: references \r\t\tname: 'References to Obsolete Classes'! !\r\r!SystemNavigation methodsFor: 'browse' stamp: 'sd 1/16/2004 21:09'!\rmethodHierarchyBrowserForClass: aClass selector: sel\r\t\"Create and schedule a message set browser on all implementors of the \r\tcurrently selected message selector. Do nothing if no message is selected.\"\r\t\"SystemNavigation default \r\t\tmethodHierarchyBrowserForClass: ParagraphEditor \r\t\tselector: #isControlActive\"\r\t\r\t| list tab stab aClassNonMeta isMeta theClassOrMeta |\r\taClass ifNil: [^ self].\r\tsel ifNil: [^ self].\r\taClassNonMeta _ aClass theNonMetaClass.\r\tisMeta _ aClassNonMeta ~~ aClass.\r\tlist _ OrderedCollection new.\r\ttab _ ''.\r\taClass allSuperclasses reverseDo:\r\t\t[:cl |\r\t\t(cl includesSelector: sel) ifTrue:\r\t\t\t[list addLast: tab , cl name, ' ', sel].\r\t\ttab _ tab , '  '].\r\taClassNonMeta allSubclassesWithLevelDo:\r\t\t[:cl :level |\r\t\ttheClassOrMeta _ isMeta ifTrue: [cl class] ifFalse: [cl].\r\t\t(theClassOrMeta includesSelector: sel) ifTrue:\r\t\t\t[stab _ ''.  1 to: level do: [:i | stab _ stab , '  '].\r\t\t\tlist addLast: tab , stab , theClassOrMeta name, ' ', sel]]\r\t \tstartingLevel: 0.\r\tself browseMessageList: list name: 'Inheritance of ' , sel\r\r! !\r\r!SystemNavigation methodsFor: 'browse' stamp: 'sd 1/16/2004 21:13'!\rspawnHierarchyForClass: aClass selector: aSelector\r\t\"Create and schedule a new class hierarchy browser on the requested class/selector.\"\r\t\"SystemNavigation default spawnHierarchyForClass: SmallInteger selector: #hash\"\r\t\r\t| newBrowser |\r\t(aClass == nil)  ifTrue: [^ self].\r\t(newBrowser _ Browser new) setClass: aClass selector: aSelector.\r\tnewBrowser spawnHierarchy.\r\r! !\r\r\r!SystemNavigation methodsFor: 'query' stamp: 'sd 4/17/2003 19:22'!\rallBehaviorsDo: aBlock \r\t\"Evaluate the argument, aBlock, for each kind of Behavior in the system \r\t(that is, Object and its subclasses).\r\tar 7/15/1999: The code below will not enumerate any obsolete or anonymous\r\tbehaviors for which the following should be executed:\r\r\t\tSmalltalk allObjectsDo:[:obj| obj isBehavior ifTrue:[aBlock value: obj]].\r\r\tbut what follows is way faster than enumerating all objects.\"\r\r\taBlock value: ProtoObject.\r\tProtoObject allSubclassesDoGently: aBlock.\t\t\"don't bring in ImageSegments\"\r\r\t\"Classes outside the ProtoObject hierarchy\"\r\tClass subclassesDo: [:aClass |\r\t\t(aClass == ProtoObject class\r\t\t\tor: [aClass isInMemory not\r\t\t\tor: [aClass isMeta not]]) ifFalse:\r\t\t\t[\"Enumerate the non-meta class and its subclasses\"\r\t\t\taBlock value: aClass soleInstance.\r\t\t\taClass soleInstance allSubclassesDoGently: aBlock]].! !\r\r!SystemNavigation methodsFor: 'query' stamp: 'sd 4/29/2003 11:48'!\rallCallsOn: aLiteral \r\t\"Answer a Collection of all the methods that call on aLiteral even deeply embedded in \r\tliteral array.\"\r\t\"self new browseAllCallsOn: #open:label:.\"\r\t| aCollection special thorough aList byte |\r\taCollection _ OrderedCollection new.\r\tspecial _ Smalltalk\r\t\t\t\thasSpecialSelector: aLiteral\r\t\t\t\tifTrueSetByte: [:b | byte _ b].\r\tthorough _ (aLiteral isMemberOf: Symbol)\r\t\t\t\tand: [\"Possibly search for symbols imbedded in literal arrays\"\r\t\t\t\t\tPreferences thoroughSenders].\r\tCursor wait\r\t\tshowWhile: [self\r\t\t\t\tallBehaviorsDo: [:class | \r\t\t\t\t\taList _ thorough\r\t\t\t\t\t\t\t\tifTrue: [class\r\t\t\t\t\t\t\t\t\t\tthoroughWhichSelectorsReferTo: aLiteral\r\t\t\t\t\t\t\t\t\t\tspecial: special\r\t\t\t\t\t\t\t\t\t\tbyte: byte]\r\t\t\t\t\t\t\t\tifFalse: [class\r\t\t\t\t\t\t\t\t\t\twhichSelectorsReferTo: aLiteral\r\t\t\t\t\t\t\t\t\t\tspecial: special\r\t\t\t\t\t\t\t\t\t\tbyte: byte].\r\t\t\t\t\taList\r\t\t\t\t\t\tdo: [:sel | sel == #DoIt\r\t\t\t\t\t\t\t\tifFalse: [aCollection\r\t\t\t\t\t\t\t\t\t\tadd: (MethodReference new setStandardClass: class methodSymbol: sel)]]]].\r\t^ aCollection! !\r\r!SystemNavigation methodsFor: 'query' stamp: 'sd 3/28/2003 17:44'!\rallCallsOn: aSymbol from: aClass\r\t\"Answer a SortedCollection of all the methods that call on aSymbol.\"\r\r\t| aSortedCollection special byte |\r\taSortedCollection _ SortedCollection new.\r\tspecial _ aClass environment hasSpecialSelector: aSymbol ifTrueSetByte: [:b | byte _ b ].\r\taClass withAllSubclassesDo: [ :class |\r\t\t(class whichSelectorsReferTo: aSymbol special: special byte: byte) do: [:sel |\r\t\t\tsel == #DoIt ifFalse: [\r\t\t\t\taSortedCollection add: (\r\t\t\t\t\tMethodReference new\r\t\t\t\t\t\tsetStandardClass: class \r\t\t\t\t\t\tmethodSymbol: sel\r\t\t\t\t)\r\t\t\t]\r\t\t]\r\t].\r\t^aSortedCollection! !\r\r!SystemNavigation methodsFor: 'query' stamp: 'sd 4/17/2003 21:31'!\rallClasses\r\t\"currently returns all the classes defined in Smalltalk but could be customized \r\tfor dealing with environments and in such a case would return on really all the classes\"\r\r\t^ Smalltalk allClasses\r\r\t! !\r\r!SystemNavigation methodsFor: 'query' stamp: 'sd 4/17/2003 21:31'!\rallClassesDo: aBlock\r\t\"currently returns all the classes defined in Smalltalk but could be customized \r\tfor dealing with environments and  in such a case would work on really all the classes\"\r\r\t^ Smalltalk allClassesDo: aBlock\r\r\t! !\r\r!SystemNavigation methodsFor: 'query' stamp: 'nb 5/6/2003 16:57'!\rallClassesImplementing: aSelector  \r\t\"Answer an Array of all classes that implement the message aSelector.\"\r\r\t| aCollection |\r\taCollection _ ReadWriteStream on: Array new.\r\tself allBehaviorsDo:\r\t\t[:class | (class includesSelector: aSelector)\r\t\t\tifTrue: [aCollection nextPut: class]].\r\t^ aCollection contents! !\r\r!SystemNavigation methodsFor: 'query' stamp: 'sd 4/29/2003 18:55'!\rallGlobalRefsWithout: classesAndMessagesPair \r\t\"Answer a set of symbols that may be refs to Global names. In some  \r\tsense we should only need the associations, but this will also catch, eg,  \r\tHTML tag types. This method computes its result in the absence of  \r\tspecified classes and messages.\"\r\t\"may be a problem if namespaces are introduced as for the moment  \r\tonly Smalltalk is queried. sd 29/4/03\"\r\t| globalRefs absentClasses absentSelectors |\r\tglobalRefs _ IdentitySet new: CompiledMethod instanceCount.\r\tabsentClasses _ classesAndMessagesPair first.\r\tabsentSelectors _ classesAndMessagesPair second.\r\tself flag: #shouldBeRewrittenUsingSmalltalkAllClassesDo:.\r\t\"sd 29/04/03\"\r\tCursor execute\r\t\tshowWhile: [Smalltalk classNames\r\t\t\t\tdo: [:cName | ((absentClasses includes: cName)\r\t\t\t\t\t\tifTrue: [{}]\r\t\t\t\t\t\tifFalse: [{Smalltalk at: cName. (Smalltalk at: cName) class}])\r\t\t\t\t\t\tdo: [:cl | (absentSelectors isEmpty\r\t\t\t\t\t\t\t\tifTrue: [cl selectors]\r\t\t\t\t\t\t\t\tifFalse: [cl selectors copyWithoutAll: absentSelectors])\r\t\t\t\t\t\t\t\tdo: [:sel | \"Include all capitalized symbols for good \r\t\t\t\t\t\t\t\t\tmeasure\"\r\t\t\t\t\t\t\t\t\t(cl compiledMethodAt: sel) literals\r\t\t\t\t\t\t\t\t\t\tdo: [:m | \r\t\t\t\t\t\t\t\t\t\t\t((m isMemberOf: Symbol)\r\t\t\t\t\t\t\t\t\t\t\t\t\tand: [m size > 0\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tand: [m first isUppercase]])\r\t\t\t\t\t\t\t\t\t\t\t\tifTrue: [globalRefs add: m].\r\t\t\t\t\t\t\t\t\t\t\t(m isMemberOf: Array)\r\t\t\t\t\t\t\t\t\t\t\t\tifTrue: [m\r\t\t\t\t\t\t\t\t\t\t\t\t\t\tdo: [:x | ((x isMemberOf: Symbol)\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tand: [x size > 0\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tand: [x first isUppercase]])\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifTrue: [globalRefs add: x]]].\r\t\t\t\t\t\t\t\t\t\t\tm isVariableBinding\r\t\t\t\t\t\t\t\t\t\t\t\tifTrue: [m key\r\t\t\t\t\t\t\t\t\t\t\t\t\t\tifNotNil: [globalRefs add: m key]]]]]]].\r\t^ globalRefs! !\r\r!SystemNavigation methodsFor: 'query' stamp: 'sd 4/29/2003 18:55'!\rallImplementedMessagesWithout: classesAndMessagesPair \r\t\"Answer a Set of all the messages that are implemented in the system,  \r\tcomputed in the absence of the supplied classes and messages. Note this  \r\treports messages that are in the absent selectors set.\"\r\t| messages absentClasses |\r\tmessages _ IdentitySet new: CompiledMethod instanceCount.\r\tabsentClasses _ classesAndMessagesPair first.\r\tself flag: #shouldBeRewrittenUsingSmalltalkAllClassesDo:. \"sd 29/04/03\" \r\tCursor execute\r\t\tshowWhile: [Smalltalk classNames\r\t\t\t\tdo: [:cName | ((absentClasses includes: cName)\r\t\t\t\t\t\tifTrue: [{}]\r\t\t\t\t\t\tifFalse: [{Smalltalk at: cName. (Smalltalk at: cName) class}])\r\t\t\t\t\t\tdo: [:cl | messages addAll: cl selectors]]].\r\t^ messages! !\r\r!SystemNavigation methodsFor: 'query' stamp: 'sd 4/23/2003 22:31'!\rallImplementorsOf: aSelector \r\t\"Answer a SortedCollection of all the methods that implement the message \r\taSelector.\"\r\t| aCollection |\r\taCollection _ SortedCollection new.\r\tCursor wait\r\t\tshowWhile: [self\r\t\t\t\tallBehaviorsDo: [:class | (class includesSelector: aSelector)\r\t\t\t\t\t\tifTrue: [aCollection\r\t\t\t\t\t\t\t\tadd: (MethodReference new setStandardClass: class methodSymbol: aSelector)]]].\r\t^ aCollection! !\r\r!SystemNavigation methodsFor: 'query' stamp: 'sd 4/20/2003 14:14'!\rallImplementorsOf: aSelector  localTo: aClass\r\t\"Answer a SortedCollection of all the methods that implement the message \r\taSelector in, above, or below the given class.\"\r\r\t| aSet cls |\r\taSet _ Set new.\r\tcls _ aClass theNonMetaClass.\r\tCursor wait showWhile: [\r\t\tcls withAllSuperAndSubclassesDoGently:\r\t\t\t[:class |\r\t\t\t(class includesSelector: aSelector)\r\t\t\t\tifTrue: [aSet add: class name, ' ', aSelector]].\r\t\tcls class withAllSuperAndSubclassesDoGently:\r\t\t\t[:class |\r\t\t\t(class includesSelector: aSelector)\r\t\t\t\tifTrue: [aSet add: class name, ' ', aSelector]]\r\t].\r\t^aSet asSortedCollection! !\r\r!SystemNavigation methodsFor: 'query' stamp: 'sd 4/29/2003 20:42'!\rallMethodsNoDoitsSelect: aBlock \r\t\"Like allSelect:, but strip out Doits\"\r\t| aCollection |\r\taCollection _ SortedCollection new.\r\tCursor execute\r\t\tshowWhile: [self\r\t\t\t\tallBehaviorsDo: [:class | class\r\t\t\t\t\t\tselectorsDo: [:sel | (sel ~~ #DoIt\r\t\t\t\t\t\t\t\t\tand: [aBlock\r\t\t\t\t\t\t\t\t\t\t\tvalue: (class compiledMethodAt: sel)])\r\t\t\t\t\t\t\t\tifTrue: [aCollection\r\t\t\t\t\t\t\t\t\t\tadd: (MethodReference new setStandardClass: class methodSymbol: sel)]]]].\r\t^ aCollection! !\r\r!SystemNavigation methodsFor: 'query' stamp: 'sd 4/29/2003 20:41'!\rallMethodsSelect: aBlock \r\t\"Answer a SortedCollection of each method that, when used as the block  \r\targument to aBlock, gives a true result.\"\r\t| aCollection |\r\taCollection _ SortedCollection new.\r\tCursor execute\r\t\tshowWhile: [self\r\t\t\t\tallBehaviorsDo: [:class | class\r\t\t\t\t\t\tselectorsDo: [:sel | (aBlock\r\t\t\t\t\t\t\t\t\tvalue: (class compiledMethodAt: sel))\r\t\t\t\t\t\t\t\tifTrue: [aCollection\r\t\t\t\t\t\t\t\t\t\tadd: (MethodReference new setStandardClass: class methodSymbol: sel)]]]].\r\t^ aCollection! !\r\r!SystemNavigation methodsFor: 'query' stamp: 'sd 4/20/2003 14:11'!\rallMethodsWithSourceString: aString matchCase: caseSensitive\r\t\"Answer a SortedCollection of all the methods that contain, in source code, aString as a substring.  Search the class comments also\"\r\r\t| list classCount adder |\r\tlist _ Set new.\r\tadder _ [ :mrClass :mrSel | list add: ( MethodReference new\r\t\t\t\t\t\t\t\t\t\t\tsetStandardClass: mrClass\r\t\t\t\t\t\t\t\t\t\t\tmethodSymbol: mrSel)].\r'Searching all source code...'\rdisplayProgressAt: Sensor cursorPoint\rfrom: 0 to: Smalltalk classNames size\rduring:\r\t[:bar | classCount _ 0.\r\tSmalltalk allClassesDo:\r\t\t[:class | bar value: (classCount _ classCount + 1).\r\t\t(Array with: class with: class class) do:\r\t\t\t[:cl | \r\t\t\t\tcl selectorsDo: [:sel | \r\t\t\t\t\t((cl sourceCodeAt: sel) findString: aString \r\t\t\t\t\t\tstartingAt: 1 caseSensitive: caseSensitive) > 0 ifTrue: [\r\t\t\t\t\t\t\tsel == #DoIt ifFalse: [adder value: cl value: sel]]].\r\t\t\t\t(cl organization classComment asString findString: aString \r\t\t\t\t\t\tstartingAt: 1 caseSensitive: caseSensitive) > 0 ifTrue: [\r\t\t\t\t\t\t\tadder value: cl value: #Comment].\r\t\t\t]]].\r\t^ list asSortedCollection! !\r\r!SystemNavigation methodsFor: 'query' stamp: 'sd 5/5/2003 09:18'!\rallSelectorsWithAnyImplementorsIn: selectorList \r\t\"Answer the subset of the given list which represent method selectors \r\twhich have at least one implementor in the system.\"\r\t| good |\r\tgood _ OrderedCollection new.\r\tself allBehaviorsDo: [:class | selectorList\r\t\t\t\tdo: [:aSelector | (class includesSelector: aSelector)\r\t\t\t\t\t\tifTrue: [good add: aSelector]]].\r\t^ good asSet asSortedArray\" \r\tSystemNavigation new selectorsWithAnyImplementorsIn: #( contents \r\tcontents: nuts)\r\t\"! !\r\r!SystemNavigation methodsFor: 'query' stamp: 'sd 4/29/2003 20:12'!\rallSentMessages\r\t\"Answer the set of selectors which are sent somewhere in the system.\"\r\t^ self  allSentMessagesWithout: {{}. {}}! !\r\r!SystemNavigation methodsFor: 'query' stamp: 'sd 4/29/2003 19:10'!\rallSentMessagesWithout: classesAndMessagesPair \r\t\"Answer the set of selectors which are sent somewhere in the system,  \r\tcomputed in the absence of the supplied classes and messages.\"\r\t| sent absentClasses absentSelectors |\r\tsent _ IdentitySet new: CompiledMethod instanceCount.\r\tabsentClasses _ classesAndMessagesPair first.\r\tabsentSelectors _ classesAndMessagesPair second.\r\tself flag: #shouldBeRewrittenUsingSmalltalkAllClassesDo:.\r\t\"sd 29/04/03\"\r\tCursor execute\r\t\tshowWhile: [Smalltalk classNames\r\t\t\t\tdo: [:cName | ((absentClasses includes: cName)\r\t\t\t\t\t\tifTrue: [{}]\r\t\t\t\t\t\tifFalse: [{Smalltalk at: cName. (Smalltalk at: cName) class}])\r\t\t\t\t\t\tdo: [:cl | (absentSelectors isEmpty\r\t\t\t\t\t\t\t\tifTrue: [cl selectors]\r\t\t\t\t\t\t\t\tifFalse: [cl selectors copyWithoutAll: absentSelectors])\r\t\t\t\t\t\t\t\tdo: [:sel | \"Include all sels, but not if sent by self\"\r\t\t\t\t\t\t\t\t\t(cl compiledMethodAt: sel) literals\r\t\t\t\t\t\t\t\t\t\tdo: [:m | \r\t\t\t\t\t\t\t\t\t\t\t(m isMemberOf: Symbol)\r\t\t\t\t\t\t\t\t\t\t\t\tifTrue: [\"might be sent\"\r\t\t\t\t\t\t\t\t\t\t\t\t\tm == sel\r\t\t\t\t\t\t\t\t\t\t\t\t\t\tifFalse: [sent add: m]].\r\t\t\t\t\t\t\t\t\t\t\t(m isMemberOf: Array)\r\t\t\t\t\t\t\t\t\t\t\t\tifTrue: [\"might be performed\"\r\t\t\t\t\t\t\t\t\t\t\t\t\tm\r\t\t\t\t\t\t\t\t\t\t\t\t\t\tdo: [:x | (x isMemberOf: Symbol)\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifTrue: [x == sel\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifFalse: [sent add: x]]]]]]]].\r\t\t\t\"The following may be sent without being in any literal frame\"\r\t\t\t1\r\t\t\t\tto: Smalltalk specialSelectorSize\r\t\t\t\tdo: [:index | sent\r\t\t\t\t\t\tadd: (Smalltalk specialSelectorAt: index)]].\r\tSmalltalk presumedSentMessages\r\t\tdo: [:sel | sent add: sel].\r\t^ sent! !\r\r!SystemNavigation methodsFor: 'query' stamp: 'sd 4/29/2003 20:12'!\rallUnSentMessages\r\t\"SystemNavigation new allUnSentMessages\"\r\t\"Answer the set of selectors that are implemented by some object in the  \r\tsystem but not sent by any.\"\r\t^ self allUnSentMessagesWithout: {{}. {}}! !\r\r!SystemNavigation methodsFor: 'query' stamp: 'sd 4/29/2003 20:13'!\rallUnSentMessagesIn: selectorSet \r\t\"Answer the subset of selectorSet which are not sent anywhere in the \r\tsystem. \"\r\t^ selectorSet copyWithoutAll: self allSentMessages! !\r\r!SystemNavigation methodsFor: 'query' stamp: 'sd 4/29/2003 19:19'!\rallUnSentMessagesWithout: classesAndMessagesPair \r\t\"Answer the set of selectors that are implemented but not sent, computed  \r\tin the absence of the supplied classes and messages.\"\r\t^ (self  allImplementedMessagesWithout: classesAndMessagesPair)\r\t\tcopyWithoutAll: (self  allSentMessagesWithout: classesAndMessagesPair)! !\r\r!SystemNavigation methodsFor: 'query' stamp: 'sd 4/29/2003 13:07'!\rallUnreferencedClassVariablesOf: aClass\r\t\"Answer a list of the names of all the receiver's unreferenced class  \r\tvars, including those defined in superclasses\"\r\t| aList |\r\taList _ OrderedCollection new.\r\taClass withAllSuperclasses\r\t\treverseDo: [:aSuperClass | aSuperClass classVarNames\r\t\t\t\tdo: [:var | (self allCallsOn: (aSuperClass classPool associationAt: var)) isEmpty\r\t\t\t\t\t\tifTrue: [aList add: var]]].\r\t^ aList! !\r\r!SystemNavigation methodsFor: 'query' stamp: 'sd 4/29/2003 19:06'!\rallUnusedClassesWithout: classesAndMessagesPair \r\t\"Enumerates all classes in the system and returns a list of those that are \r\tapparently unused. A class is considered in use if it (a) has subclasses  \r\tor (b) is referred to by some method or (c) has its name in use as a  \r\tliteral.\"\r\t\"SystemNavigation new unusedClasses\"\r\r\t| unused cl |\r\tunused _ Smalltalk classNames asIdentitySet\r\t\t\t\tcopyWithoutAll: (self allGlobalRefsWithout: classesAndMessagesPair).\r\t^ unused\r\t\treject: [:cName | \r\t\t\tcl _ Smalltalk at: cName.\r\t\t\tcl subclasses isEmpty not\r\t\t\t\tor: [cl inheritsFrom: FileDirectory]]! !\r\r!SystemNavigation methodsFor: 'query' stamp: 'sd 4/20/2003 14:27'!\rnumberOfImplementorsOf: aSelector \r\t\"Answer a count of the implementors of the given selector found in the  \r\tsystem\"\r\t\"self new numberOfImplementorsOf: #contents.  \r\tself new numberOfImplementorsOf: #nobodyImplementsThis.  \r\tself new numberOfimplementorsOf: #numberOfImplementorsOf:.\"\r\t| aCount |\r\taCount _ 0.\r\tself\r\t\tallBehaviorsDo: [:class | (class includesSelector: aSelector)\r\t\t\t\tifTrue: [aCount _ aCount + 1]].\r\t^ aCount! !\r\r\r!SystemNavigation methodsFor: 'ui' stamp: 'sd 4/29/2003 11:59'!\rconfirmRemovalOf: aSelector on: aClass \r\t\"Determine if it is okay to remove the given selector. Answer 1 if it  \r\tshould be removed, 2 if it should be removed followed by a senders  \r\tbrowse, and 3 if it should not be removed.\"\r\t| count aMenu answer caption allCalls |\r\tallCalls _ self allCallsOn: aSelector.\r\t(count _ allCalls size) == 0\r\t\tifTrue: [^ 1].\r\t\"no senders -- let the removal happen without warning\"\r\tcount == 1\r\t\tifTrue: [(allCalls first actualClass == aClass\r\t\t\t\t\tand: [allCalls first methodSymbol == aSelector])\r\t\t\t\tifTrue: [^ 1]].\r\t\"only sender is itself\"\r\taMenu _ PopUpMenu labels: 'Remove it\rRemove, then browse senders\rDon''t remove, but show me those senders\rForget it -- do nothing -- sorry I asked'.\r\tcaption _ 'This message has ' , count printString , ' sender'.\r\tcount > 1\r\t\tifTrue: [caption _ caption copyWith: $s].\r\tanswer _ aMenu startUpWithCaption: caption.\r\tanswer == 3\r\t\tifTrue: [self\r\t\t\t\tbrowseMessageList: allCalls\r\t\t\t\tname: 'Senders of ' , aSelector\r\t\t\t\tautoSelect: aSelector keywords first].\r\tanswer == 0\r\t\tifTrue: [answer _ 3].\r\t\"If user didn't answer, treat it as cancel\"\r\t^ answer min: 3! !\r\r!SystemNavigation methodsFor: 'ui' stamp: 'sd 4/15/2003 15:34'!\rshowMenuOf: selectorCollection withFirstItem: firstItem ifChosenDo: choiceBlock\r\t\"Show a sorted menu of the given selectors, preceded by firstItem, and all\r\tabbreviated to 40 characters.  Evaluate choiceBlock if a message is chosen.\"\r\r\t^ self showMenuOf: selectorCollection withFirstItem: firstItem ifChosenDo: choiceBlock withCaption: nil! !\r\r!SystemNavigation methodsFor: 'ui' stamp: 'sd 4/15/2003 15:35'!\rshowMenuOf: selectorCollection withFirstItem: firstItem ifChosenDo: choiceBlock withCaption: aCaption\r\t\"Show a sorted menu of the given selectors, preceded by firstItem, and all abbreviated to 40 characters.  Use aCaption as the menu title, if it is not nil.  Evaluate choiceBlock if a message is chosen.\"\r\r\t| index menuLabels sortedList aMenu |\r\tsortedList _ selectorCollection asSortedCollection.\r\tmenuLabels _ String streamContents: \r\t\t[:strm | strm nextPutAll: (firstItem contractTo: 40).\r\t\tsortedList do: [:sel | strm cr; nextPutAll: (sel contractTo: 40)]].\r\taMenu _ PopUpMenu labels: menuLabels lines: #(1).\r\tindex _ aCaption ifNotNil: [aMenu startUpWithCaption: aCaption] ifNil: [aMenu startUp].\r\tindex = 1 ifTrue: [choiceBlock value: firstItem].\r\tindex > 1 ifTrue: [choiceBlock value: (sortedList at: index - 1)]! !\r\r\r!SystemNavigation methodsFor: '*tools-browser' stamp: 'mu 3/11/2004 15:47'!\rbrowseClass: aBehavior\r\t| targetClass |\r\tself browserClass ifNil: [self error: 'No browser installed:'].\r\ttargetClass := aBehavior isMeta\r\t\t\t\tifTrue: [aBehavior theNonMetaClass]\r\t\t\t\tifFalse: [aBehavior ].\r\tself browserClass newOnClass: targetClass! !\r\r!SystemNavigation methodsFor: '*tools-browser' stamp: 'mu 3/11/2004 15:51'!\rbrowseHierarchy: aBehavior\r\t| targetClass |\r\tself hierarchyBrowserClass ifNil: [self error: 'No hierarchy browser installed:'].\r\ttargetClass := aBehavior isMeta\r\t\t\t\tifTrue: [aBehavior theNonMetaClass]\r\t\t\t\tifFalse: [aBehavior ].\r\tself hierarchyBrowserClass newFor: targetClass! !\r\r!SystemNavigation methodsFor: '*tools-browser' stamp: 'mu 3/11/2004 15:46'!\rbrowserClass\r\tbrowserClass ifNil: [browserClass := self defaultBrowserClass].\r\t^browserClass! !\r\r!SystemNavigation methodsFor: '*tools-browser' stamp: 'mu 3/11/2004 15:50'!\rdefaultBrowserClass\r\t^self class environment at: #Browser ifAbsent:[]! !\r\r!SystemNavigation methodsFor: '*tools-browser' stamp: 'mu 3/11/2004 15:49'!\rdefaultHierarchyBrowserClass\r\t^self class environment at: #HierarchyBrowser ifAbsent:[]! !\r\r!SystemNavigation methodsFor: '*tools-browser' stamp: 'mu 3/11/2004 15:50'!\rhierarchyBrowserClass\r\thierarchyBrowserClass ifNil: [hierarchyBrowserClass := self defaultHierarchyBrowserClass].\r\t^hierarchyBrowserClass! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rSystemNavigation class\r\tinstanceVariableNames: ''!\r\r!SystemNavigation class methodsFor: 'as yet unclassified' stamp: 'dvf 8/23/2003 12:25'!\rdefault\r\tDefault isNil ifTrue: [Default _ self new].\r\t^Default! !\rCategorizer subclass: #SystemOrganizer\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Support'!\r!SystemOrganizer commentStamp: '<historical>' prior: 0!\rMy instances provide an organization for the classes in the system, just as a ClassOrganizer organizes the messages within a class. The only difference is the methods for fileIn/Out.!\r\r\r!SystemOrganizer methodsFor: 'fileIn/Out' stamp: 'di 8/16/2000 10:03'!\rfileOut  \"SystemOrganization fileOut\"\r\r\t(FileStream newFileNamed:\r\t\t(FileDirectory default nextNameFor: 'SystemOrganization' extension: 'st'))\r\t\tnextPutAll: 'SystemOrganization changeFromCategorySpecs: #('; cr;\r\t\tprint: SystemOrganization;  \"ends with a cr\"\r\t\tnextPutAll: ')!!'; cr;\r\t\tclose.! !\r\r!SystemOrganizer methodsFor: 'fileIn/Out' stamp: 'di 6/28/97 19:01'!\rfileOutCategory: category \r\t\"Store on the file named category (a string) concatenated with '.st' all the \r\tclasses associated with the category.\"\r\t^ self fileOutCategory: category asHtml: false! !\r\r!SystemOrganizer methodsFor: 'fileIn/Out' stamp: 'jf 2/7/2004 17:24'!\rfileOutCategory: category asHtml: useHtml\r\t\"FileOut all the classes in the named system category.\"\r\t| fileStream |\r\tfileStream _ useHtml\r\t\tifTrue: [(FileStream newFileNamed: category asFileName, '.html') asHtml]\r\t\tifFalse: [FileStream newFileNamed: category asFileName , '.st'].\r\tself fileOutCategory: category on: fileStream initializing: true.\r\tfileStream close! !\r\r!SystemOrganizer methodsFor: 'fileIn/Out' stamp: 'ar 12/22/1999 17:28'!\rfileOutCategory: category on: aFileStream \r\t\"Store on the file associated with aFileStream, all the classes associated \r\twith the category and any requested shared pools.\"\r\t^self fileOutCategory: category on: aFileStream initializing: true! !\r\r!SystemOrganizer methodsFor: 'fileIn/Out' stamp: 'ar 12/22/1999 17:28'!\rfileOutCategory: category on: aFileStream initializing: aBool\r\t\"Store on the file associated with aFileStream, all the classes associated \r\twith the category and any requested shared pools.\"\r\r\t| first poolSet tempClass classes |\r\tclasses _ (self superclassOrder: category).\r\tpoolSet _ Set new.\r\tclasses do: \r\t\t[:class | class sharedPools do: [:eachPool | poolSet add: eachPool]].\r\tpoolSet size > 0 ifTrue:\r\t\t[tempClass _ Class new.\r\t\ttempClass shouldFileOutPools ifTrue:\r\t\t\t[poolSet _ poolSet select: [:aPool | tempClass shouldFileOutPool: (Smalltalk keyAtIdentityValue: aPool)].\r\t\t\tpoolSet do: [:aPool | tempClass fileOutPool: aPool onFileStream: aFileStream]]].\r\tfirst _ true.\r\tclasses do: \r\t\t[:class | \r\t\tfirst\r\t\t\tifTrue: [first _ false]\r\t\t\tifFalse: [aFileStream cr; nextPut: Character newPage; cr].\r\t\tclass\r\t\t\tfileOutOn: aFileStream\r\t\t\tmoveSource: false\r\t\t\ttoFile: 0\r\t\t\tinitializing: false].\r\taBool ifTrue:[classes do:[:cls| cls fileOutInitializerOn: aFileStream]].! !\r\r!SystemOrganizer methodsFor: 'fileIn/Out'!\rsuperclassOrder: category \r\t\"Answer an OrderedCollection containing references to the classes in the \r\tcategory whose name is the argument, category (a string). The classes \r\tare ordered with superclasses first so they can be filed in.\"\r\r\t| list |\r\tlist _ \r\t\t(self listAtCategoryNamed: category asSymbol) \r\t\t\tcollect: [:title | Smalltalk at: title].\r\t^ChangeSet superclassOrder: list! !\r\r\r!SystemOrganizer methodsFor: 'remove' stamp: 'di 3/3/2001 16:07'!\rcategoriesMatching: matchString\r\t\"Return all matching categories\"\r\t^ self categories select: [:c | matchString match: c]! !\r\r!SystemOrganizer methodsFor: 'remove' stamp: 'di 3/3/2001 16:08'!\rremoveCategoriesMatching: matchString\r\t\"Remove all matching categories with their classes\"\r\t(self categoriesMatching: matchString) do:\r\t\t[:c | self removeSystemCategory: c]! !\r\r!SystemOrganizer methodsFor: 'remove' stamp: 'jm 5/20/1998 19:38'!\rremoveMissingClasses\r\t\"Remove any class names that are no longer in the Smalltalk dictionary. Used for cleaning up after garbage collecting user-generated classes.\"\r\t\"SystemOrganization removeMissingClasses\"\r\r\telementArray copy do: [:el |\r\t\t(Smalltalk includesKey: el) ifFalse: [self removeElement: el]].\r! !\r\r!SystemOrganizer methodsFor: 'remove' stamp: 'jf 8/1/2003 09:02'!\rremoveSystemCategory: category\r\t\"remove all the classes associated with the category\"\r\r\t(self superclassOrder: category) reverseDo: [:class | class removeFromSystem].\r\r\tself removeCategory: category.\r! !\r\r\r!SystemOrganizer methodsFor: 'private' stamp: 'rw 7/31/2003 17:23'!\rifClassOrganizerDo: aBlock\r\t\"Do nothing, since this is not a class organizer\"! !\rObject subclass: #SystemVersion\r\tinstanceVariableNames: 'version date highestUpdate updates'\r\tclassVariableNames: 'Current'\r\tpoolDictionaries: ''\r\tcategory: 'System-Support'!\r\r!SystemVersion methodsFor: 'accessing'!\rdate\r\t^date! !\r\r!SystemVersion methodsFor: 'accessing' stamp: 'mir 5/1/2001 18:19'!\rdatedVersion\r\t\"Answer the version of this release.\"\r\r\t^ self version asString , ' of ' , self date printString! !\r\r!SystemVersion methodsFor: 'accessing' stamp: 'mir 3/29/2001 18:03'!\rhighestUpdate\r\t| sortedUpdates |\r\thighestUpdate ifNil: [\r\t\tsortedUpdates _ self updates asSortedCollection.\r\t\thighestUpdate _ (sortedUpdates isEmpty\r\t\t\tifTrue: [0]\r\t\t\tifFalse: [sortedUpdates last])].\r\t^highestUpdate! !\r\r!SystemVersion methodsFor: 'accessing'!\runregisterUpdate: update\r\tself updates remove: update ifAbsent: []! !\r\r!SystemVersion methodsFor: 'accessing'!\rupdates\r\t^updates! !\r\r!SystemVersion methodsFor: 'accessing'!\rversion\r\t^version! !\r\r\r!SystemVersion methodsFor: 'initialize'!\rinitialize\r\tversion _ 'No version set'.\r\tdate _ Date today.\r\tupdates _ Set new.\r! !\r\r\r!SystemVersion methodsFor: 'printing' stamp: 'mir 5/1/2001 18:20'!\rprintOn: stream\r\tstream\r\t\tnextPutAll: self datedVersion;\r\t\tnextPutAll: ' update ' , self highestUpdate printString! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rSystemVersion class\r\tinstanceVariableNames: ''!\r\r!SystemVersion class methodsFor: 'accessing'!\rcurrent\r\tCurrent ifNil: [Current _ SystemVersion new].\r\t^Current! !\rVariableNode subclass: #TempVariableNode\r\tinstanceVariableNames: 'isAnArg hasRefs hasDefs scope'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Compiler'!\r!TempVariableNode commentStamp: '<historical>' prior: 0!\rI am a parse tree leaf representing a temporary variable!\r\r\r!TempVariableNode methodsFor: 'initialize-release'!\risArg: aBoolean\r\r\tisAnArg _ aBoolean.\r\tisAnArg ifTrue: [hasDefs _ true]! !\r\r!TempVariableNode methodsFor: 'initialize-release'!\rname: varName index: i type: type scope: level\r\t\"Only used for initting temporary variables\"\r\tname _ varName.\r\tself key: varName\r\t\tindex: i\r\t\ttype: type.\r\tisAnArg _ hasDefs _ hasRefs _ false.\r\tscope _ level! !\r\r!TempVariableNode methodsFor: 'initialize-release'!\rnowHasDef\r\thasDefs _ true! !\r\r!TempVariableNode methodsFor: 'initialize-release'!\rnowHasRef\r\thasRefs _ true! !\r\r!TempVariableNode methodsFor: 'initialize-release'!\rscope: level\r\t\"Note scope of temporary variables.\r\tCurrently only the following distinctions are made:\r\t\t0\touter level: args and user-declared temps\r\t\t1\tblock args and doLimiT temps\r\t\t-1\ta block temp that is no longer active\r\t\t-2\ta block temp that held limit of to:do:\"\r\tscope _ level! !\r\r\r!TempVariableNode methodsFor: 'testing'!\rassignmentCheck: encoder at: location\r\r\tisAnArg ifTrue: [^ location]\r\t\t\tifFalse: [^ -1]! !\r\r!TempVariableNode methodsFor: 'testing'!\risTemp\r\t^ true! !\r\r!TempVariableNode methodsFor: 'testing'!\risUndefTemp\r\t^ hasDefs not! !\r\r!TempVariableNode methodsFor: 'testing'!\risUnusedTemp\r\t^ hasRefs not! !\r\r!TempVariableNode methodsFor: 'testing'!\rscope\r\t^ scope! !\r\r\r!TempVariableNode methodsFor: 'printing' stamp: 'di 4/5/2000 15:11'!\rprintOn: aStream indent: level \r\taStream withStyleFor: #temporaryVariable\r\t\t\tdo: [aStream nextPutAll: name]! !\rArrayedCollection subclass: #Text\r\tinstanceVariableNames: 'string runs'\r\tclassVariableNames: ''\r\tpoolDictionaries: 'TextConstants'\r\tcategory: 'Collections-Text'!\r!Text commentStamp: '<historical>' prior: 0!\rI represent a character string that has been marked with abstract changes in character appearance. Actual display is performed in the presence of a TextStyle which indicates, for each abstract code, an actual font to be used.  A Text associates a set of TextAttributes with each character in its character string.  These attributes may be font numbers, emphases such as bold or italic, or hyperling actions.  Font numbers are interpreted relative to whatever textStyle appears, along with the text, in a Paragraph.  Since most characters have the same attributes as their neighbors, the attributes are stored in a RunArray for efficiency.  Each of my instances has\r\tstring\t\ta String\r\truns\t\ta RunArray!\r]style[(148 9 97 13 237 9 163 6 10 8)f1,f1LTextStyle Comment;,f1,f1LTextAttribute Hierarchy;,f1,f1LParagraph Comment;,f1,f1LString Comment;,f1,f1LRunArray Comment;!\r\r\r!Text methodsFor: 'accessing' stamp: 'tk 9/4/2000 16:04'!\rappend: stringOrText\r\r\tself replaceFrom: string size + 1\r\t\t\t\tto: string size with: stringOrText! !\r\r!Text methodsFor: 'accessing'!\rat: index\r\r\t^string at: index! !\r\r!Text methodsFor: 'accessing'!\rat: index put: character\r\r\t^string at: index put: character! !\r\r!Text methodsFor: 'accessing' stamp: 'gm 2/15/2003 14:59'!\rembeddedMorphs\r\t\"return the list of morphs embedded in me\"\r\r\t| morphs |\r\tmorphs := IdentitySet new.\r\truns withStartStopAndValueDo: \r\t\t\t[:start :stop :attribs | \r\t\t\tattribs \r\t\t\t\tdo: [:attrib | attrib anchoredMorph ifNotNil: [morphs add: attrib anchoredMorph]]].\r\t^morphs select: [:m | m isMorph]! !\r\r!Text methodsFor: 'accessing' stamp: 'gm 2/15/2003 14:59'!\rembeddedMorphsFrom: start to: stop \r\t\"return the list of morphs embedded in me\"\r\r\t| morphs |\r\tmorphs := IdentitySet new.\r\truns \r\t\trunsFrom: start\r\t\tto: stop\r\t\tdo: \r\t\t\t[:attribs | \r\t\t\tattribs \r\t\t\t\tdo: [:attr | attr anchoredMorph ifNotNil: [morphs add: attr anchoredMorph]]].\r\t^morphs select: [:m | m isMorph]! !\r\r!Text methodsFor: 'accessing'!\rfindString: aString startingAt: start \r\t\"Answer the index of subString within the receiver, starting at index \r\tstart. If the receiver does not contain subString, answer 0.\"\r\r\t^string findString: aString asString startingAt: start! !\r\r!Text methodsFor: 'accessing' stamp: 'di 11/23/1998 11:53'!\rfindString: aString startingAt: start caseSensitive: caseSensitive\r\t\"Answer the index of subString within the receiver, starting at index \r\tstart. If the receiver does not contain subString, answer 0.\"\r\r\t^string findString: aString asString startingAt: start caseSensitive: caseSensitive! !\r\r!Text methodsFor: 'accessing' stamp: 'tk 9/6/2000 12:33'!\rlineCount\r\r\t^ string lineCount! !\r\r!Text methodsFor: 'accessing' stamp: 'ar 12/27/2001 00:03'!\rprepend: stringOrText\r\r\tself replaceFrom: 1 to: 0 with: stringOrText! !\r\r!Text methodsFor: 'accessing' stamp: 'BG 6/8/2003 16:18'!\rrangeOf: attribute startingAt: index\r\"Answer an interval that gives the range of attribute at index position  index. An empty interval with start value index is returned when the attribute is not present at position index.  \"\r   ^string size = 0\r      ifTrue: [index to: index - 1]\r\t ifFalse: [runs rangeOf: attribute startingAt: index]! !\r\r!Text methodsFor: 'accessing' stamp: 'md 12/12/2003 17:03'!\rrangeOf: attribute startingAt: index forStyle: aTextStyle\r\"aTextStyle is not really needed, it is kept for compatibility with an earlier method version \"\r\tself deprecated: 'Use Text>>rangeOf:startingAt: instead.'.\r\t^self rangeOf: attribute startingAt: index! !\r\r!Text methodsFor: 'accessing' stamp: 'tk 12/30/97 07:17'!\rreplaceFrom: start to: stop with: aText\r\r\t| txt |\r\ttxt _ aText asText.\t\"might be a string\"\r\tstring _ string copyReplaceFrom: start to: stop with: txt string.\r\truns _ runs copyReplaceFrom: start to: stop with: txt runs! !\r\r!Text methodsFor: 'accessing'!\rsize\r\r\t^string size! !\r\r!Text methodsFor: 'accessing'!\rstring\r\t\"Answer the string representation of the receiver.\"\r\r\t^string! !\r\r\r!Text methodsFor: 'comparing' stamp: 'tk 10/19/2001 17:48'!\r= other\r\t\"Am I equal to the other Text or String?  \r\t***** Warning ***** Two Texts are considered equal if they have the same characters in them.  They might have completely different emphasis, fonts, sizes, text actions, or embedded morphs.  If you need to find out if one is a true copy of the other, you must do (text1 = text2 and: [text1 runs = text2 runs]).\"\r\r\tother isText ifTrue:\t[\"This is designed to run fast even for megabytes\"\r\t\t\t\t^ string == other string or: [string = other string]].\r\tother isString ifTrue: [^ string == other or: [string = other]].\r\t^ false! !\r\r!Text methodsFor: 'comparing' stamp: 'tk 10/17/2001 14:12'!\rhash\r\t\"#hash is implemented, because #= is implemented.  We are now equal to a string with the same characters.  Hash must reflect that.\"\r\r\t^ string hash! !\r\r!Text methodsFor: 'comparing' stamp: 'tk 9/6/2000 11:59'!\rhowManyMatch: aString\r\r\t^ self string howManyMatch: aString! !\r\r!Text methodsFor: 'comparing'!\risText\r\t^ true! !\r\r\r!Text methodsFor: 'copying'!\rcopy\r\r\t^ self class new setString: string copy setRuns: runs copy\r! !\r\r!Text methodsFor: 'copying'!\rcopyFrom: start to: stop \r\t\"Answer a copied subrange of the receiver.\"\r\r\t| realStart realStop |\r\tstop > self size\r\t\tifTrue: [realStop _ self size]\t\t\"handle selection at end of string\"\r\t\tifFalse: [realStop _ stop].\r\tstart < 1\r\t\tifTrue: [realStart _ 1]\t\t\t\"handle selection before start of string\"\r\t\tifFalse: [realStart _ start].\r\t^Text \r\t\tstring: (string copyFrom: realStart to: realStop)\r\t\truns: (runs copyFrom: realStart to: realStop)! !\r\r!Text methodsFor: 'copying'!\rcopyReplaceFrom: start to: stop with: aText\r\r\t^self shallowCopy replaceFrom: start to: stop with: aText! !\r\r!Text methodsFor: 'copying' stamp: 'tk 1/7/98 10:58'!\rcopyReplaceTokens: oldSubstring with: newSubstring \r\t\"Replace all occurrences of oldSubstring that are surrounded\r\tby non-alphanumeric characters\"\r\t^ self copyReplaceAll: oldSubstring with: newSubstring asTokens: true\r\t\"'File asFile Files File''s File' copyReplaceTokens: 'File' with: 'Snick'\"! !\r\r!Text methodsFor: 'copying' stamp: 'di 11/9/97 17:13'!\rdeepCopy\r\r\t^ self copy \"Both string and runs are assumed to be read-only\"! !\r\r\r!Text methodsFor: 'converting'!\rasDisplayText\r\t\"Answer a DisplayText whose text is the receiver.\"\r\r\t^DisplayText text: self! !\r\r!Text methodsFor: 'converting'!\rasNumber\r\t\"Answer the number created by interpreting the receiver as the textual \r\trepresentation of a number.\"\r\r\t^string asNumber! !\r\r!Text methodsFor: 'converting'!\rasParagraph\r\t\"Answer a Paragraph whose text is the receiver.\"\r\r\t^Paragraph withText: self! !\r\r!Text methodsFor: 'converting'!\rasString\r\t\"Answer a String representation of the textual receiver.\"\r\r\t^string! !\r\r!Text methodsFor: 'converting' stamp: 'RAA 5/28/2001 06:19'!\rasStringOrText\t\r\t\"Answer the receiver itself.\"\r\r\t^self! !\r\r!Text methodsFor: 'converting'!\rasText\t\r\t\"Answer the receiver itself.\"\r\r\t^self! !\r\r!Text methodsFor: 'converting' stamp: 'ls 7/14/1998 03:20'!\rasUrlRelativeTo: aUrl\r\t^self asString asUrlRelativeTo: aUrl! !\r\r!Text methodsFor: 'converting' stamp: 'bf 3/9/2000 18:25'!\risoToSqueak\r\t^ self class new setString: string isoToSqueak setRuns: runs copy! !\r\r!Text methodsFor: 'converting' stamp: 'ar 12/17/2001 00:38'!\rremoveAttributesThat: removalBlock replaceAttributesThat: replaceBlock by: convertBlock\r\t\"Enumerate all attributes in the receiver. Remove those passing removalBlock and replace those passing replaceBlock after converting it through convertBlock\"\r\t| added removed new |\r\t\"Deliberately optimized for the no-op default.\"\r\tadded _ removed _ nil.\r\truns withStartStopAndValueDo: [ :start :stop :attribs | \r\t\tattribs do: [ :attrib |\r\t\t\t(removalBlock value: attrib) ifTrue:[\r\t\t\t\tremoved ifNil:[removed _ WriteStream on: #()].\r\t\t\t\tremoved nextPut: {start. stop. attrib}.\r\t\t\t] ifFalse:[\r\t\t\t\t(replaceBlock value: attrib) ifTrue:[\r\t\t\t\t\tremoved ifNil:[removed _ WriteStream on: #()].\r\t\t\t\t\tremoved nextPut: {start. stop. attrib}.\r\t\t\t\t\tnew _ convertBlock value: attrib.\r\t\t\t\t\tadded ifNil:[added _ WriteStream on: #()].\r\t\t\t\t\tadded nextPut: {start. stop. new}.\r\t\t\t\t].\r\t\t\t].\r\t\t].\r\t].\r\t(added == nil and:[removed == nil]) ifTrue:[^self].\r\t\"otherwise do the real work\"\r\tremoved ifNotNil:[removed contents do:[:spec|\r\t\tself removeAttribute: spec last from: spec first to: spec second]].\r\tadded ifNotNil:[added contents do:[:spec|\r\t\tself addAttribute: spec last from: spec first to: spec second]].! !\r\r!Text methodsFor: 'converting' stamp: 'dvf 10/1/2003 02:58'!\rreplaceFrom: start to: stop with: replacement startingAt: repStart \r\n\t\"This destructively replaces elements from start to stop in the receiver starting at index, repStart, in replacementCollection. Do it to both the string and the runs.\"\r\n\r\n\t| rep newRepRuns |\r\n\trep _ replacement asText.\t\"might be a string\"\r\n\tstring replaceFrom: start to: stop with: rep string startingAt: repStart.\r\n\tnewRepRuns _ rep runs copyFrom: repStart to: repStart + stop - start.\r\truns _ runs copyReplaceFrom: start to: stop with: newRepRuns! !\r\r!Text methodsFor: 'converting' stamp: 'BG 6/8/2003 16:38'!\rreversed\r\n\r\n\t\"Answer a copy of the receiver with element order reversed.\"\r\n\r\n\t^ self class string: string reversed runs: runs reversed.\r\n\r\n  \"  It is assumed that  self size = runs size  holds. \"! !\r\r!Text methodsFor: 'converting' stamp: 'bf 3/9/2000 18:25'!\rsqueakToIso\r\t^ self class new setString: string squeakToIso setRuns: runs copy! !\r\r!Text methodsFor: 'converting' stamp: 'nk 9/16/2003 16:46'!\rwithSqueakLineEndings\r\t\"Answer a copy of myself in which all sequences of <CR><LF> or <LF> have been changed to <CR>\"\r\t| newText |\r\t(string includes: Character lf) ifFalse: [ ^self copy ].\r\tnewText _ self copyReplaceAll: String crlf with: String cr asTokens: false.\r\t(newText asString includes: Character lf) ifFalse: [ ^newText ].\r\t^newText copyReplaceAll: String lf with: String cr asTokens: false.! !\r\r\r!Text methodsFor: 'emphasis'!\raddAttribute: att \r\t^ self addAttribute: att from: 1 to: self size! !\r\r!Text methodsFor: 'emphasis'!\raddAttribute: att from: start to: stop \r\t\"Set the attribute for characters in the interval start to stop.\"\r\truns _  runs copyReplaceFrom: start to: stop\r\t\t\twith: ((runs copyFrom: start to: stop)\r\t\t\t\tmapValues:\r\t\t\t\t[:attributes | Text addAttribute: att toArray: attributes])\r! !\r\r!Text methodsFor: 'emphasis' stamp: 'ar 12/17/2001 23:48'!\ralignmentAt: characterIndex ifAbsent: aBlock\r\t| attributes emph |\r\tself size = 0 ifTrue: [^aBlock value].\r\temph _ nil.\r\tattributes _ runs at: characterIndex.\r\tattributes do:[:att | (att isKindOf: TextAlignment) ifTrue:[emph _ att]].\r\t^ emph ifNil: aBlock ifNotNil:[emph alignment]! !\r\r!Text methodsFor: 'emphasis'!\rallBold \r\t\"Force this whole text to be bold.\"\r\tstring size = 0 ifTrue: [^self].\r\tself makeBoldFrom: 1 to: string size! !\r\r!Text methodsFor: 'emphasis' stamp: 'sw 12/7/1999 12:30'!\rattributesAt: characterIndex \r\t\"Answer the code for characters in the run beginning at characterIndex.\"\r\t\"NB: no senders any more (supplanted by #attributesAt:forStyle: but retained for the moment in order not to break user code that may exist somewhere that still calls this\"\r\t| attributes |\r\tself size = 0\r\t\tifTrue: [^ Array with: (TextFontChange new fontNumber: 1)].  \"null text tolerates access\"\r\tattributes _ runs at: characterIndex.\r\t^ attributes! !\r\r!Text methodsFor: 'emphasis' stamp: 'ar 12/17/2001 01:17'!\rattributesAt: characterIndex do: aBlock\r\t\"Answer the code for characters in the run beginning at characterIndex.\"\r\t\"NB: no senders any more (supplanted by #attributesAt:forStyle: but retained for the moment in order not to break user code that may exist somewhere that still calls this\"\r\tself size = 0 ifTrue:[^self].\r\t(runs at: characterIndex) do: aBlock! !\r\r!Text methodsFor: 'emphasis' stamp: 'sw 12/7/1999 11:32'!\rattributesAt: characterIndex forStyle: aTextStyle\r\t\"Answer the code for characters in the run beginning at characterIndex.\"\r\t| attributes |\r\tself size = 0\r\t\tifTrue: [^ Array with: (TextFontChange new fontNumber: aTextStyle defaultFontIndex)].  \"null text tolerates access\"\r\tattributes _ runs at: characterIndex.\r\t^ attributes! !\r\r!Text methodsFor: 'emphasis' stamp: 'di 4/1/1999 15:17'!\remphasisAt: characterIndex\r\t\"Answer the fontfor characters in the run beginning at characterIndex.\"\r\t| attributes emph |\r\tself size = 0 ifTrue: [^ 0].\t\"null text tolerates access\"\r\temph _ 0.\r\tattributes _ runs at: characterIndex.\r\tattributes do: \r\t\t[:att | emph _ emph bitOr: att emphasisCode].\r\t^ emph\r\t! !\r\r!Text methodsFor: 'emphasis' stamp: 'di 11/10/97 13:36'!\rfind: attribute\r\t\"Return the first interval over which this attribute applies\"\r\t| begin end |\r\tbegin _ 0.\r\truns withStartStopAndValueDo:\r\t\t[:start :stop :attributes |\r\t\t(attributes includes: attribute)\r\t\t\tifTrue: [begin = 0 ifTrue: [begin _ start].\r\t\t\t\t\tend _ stop]\r\t\t\tifFalse: [begin > 0 ifTrue: [^ begin to: end]]].\r\tbegin > 0 ifTrue: [^ begin to: end].\r\t^ nil! !\r\r!Text methodsFor: 'emphasis' stamp: 'sw 12/7/1999 10:58'!\rfontAt: characterIndex withStyle: aTextStyle\r\t\"Answer the fontfor characters in the run beginning at characterIndex.\"\r\t| attributes font |\r\tself size = 0 ifTrue: [^ aTextStyle defaultFont].\t\"null text tolerates access\"\r\tattributes _ runs at: characterIndex.\r\tfont _ aTextStyle defaultFont.  \"default\"\r\tattributes do: \r\t\t[:att | att forFontInStyle: aTextStyle do: [:f | font _ f]].\r\t^ font! !\r\r!Text methodsFor: 'emphasis'!\rfontNumberAt: characterIndex \r\t\"Answer the fontNumber for characters in the run beginning at characterIndex.\"\r\t| attributes fontNumber |\r\tself size = 0 ifTrue: [^1].\t\"null text tolerates access\"\r\tattributes _ runs at: characterIndex.\r\tfontNumber _ 1.\r\tattributes do: [:att | (att isMemberOf: TextFontChange) ifTrue: [fontNumber _ att fontNumber]].\r\t^ fontNumber\r\t! !\r\r!Text methodsFor: 'emphasis'!\rmakeBoldFrom: start to: stop\r\r\t^ self addAttribute: TextEmphasis bold from: start to: stop! !\r\r!Text methodsFor: 'emphasis' stamp: 'ar 6/28/2003 00:06'!\rmakeSelectorBold\r\t\"For formatting Smalltalk source code, set the emphasis of that portion of \r\tthe receiver's string that parses as a message selector to be bold.\"\r\r\t| parser i |\r\tstring size = 0 ifTrue: [^ self].\r\ti _ 0.\r\t[(string at: (i _ i + 1)) isSeparator] whileTrue.\r\t(string at: i) = $[ ifTrue: [^ self].  \"block, no selector\"\r\t(parser _ Compiler parserClass new) parseSelector: string.\r\tself makeBoldFrom: 1 to: (parser endOfLastToken min: string size)! !\r\r!Text methodsFor: 'emphasis' stamp: 'sma 2/5/2000 12:03'!\rmakeSelectorBoldIn: aClass\r\t\"For formatting Smalltalk source code, set the emphasis of that portion of \r\tthe receiver's string that parses as a message selector to be bold.\"\r\r\t| parser |\r\tstring size = 0 ifTrue: [^self].\r\t(parser _ aClass parserClass new) parseSelector: string.\r\tself makeBoldFrom: 1 to: (parser endOfLastToken min: string size)! !\r\r!Text methodsFor: 'emphasis'!\rremoveAttribute: att from: start to: stop \r\t\"Remove the attribute over the interval start to stop.\"\r\truns _  runs copyReplaceFrom: start to: stop\r\t\t\twith: ((runs copyFrom: start to: stop)\r\t\t\t\tmapValues:\r\t\t\t\t[:attributes | attributes copyWithout: att])\r! !\r\r!Text methodsFor: 'emphasis'!\rrunLengthFor: characterIndex \r\t\"Answer the count of characters remaining in run beginning with \r\tcharacterIndex.\"\r\r\t^runs runLengthAt: characterIndex! !\r\r\r!Text methodsFor: 'printing' stamp: 'sma 6/1/2000 09:49'!\rprintOn: aStream\r\tself printNameOn: aStream.\r\taStream nextPutAll: ' for '; print: string! !\r\r!Text methodsFor: 'printing'!\rstoreOn: aStream\r\r\taStream nextPutAll: '(Text string: ';\r\t\tstore: string;\r\t\tnextPutAll: ' runs: ';\r\t\tstore: runs;\r\t\tnextPut: $)! !\r\r\r!Text methodsFor: 'private'!\rruns\r\r\t^runs! !\r\r!Text methodsFor: 'private'!\rsetString: aString setRuns: anArray\r\r\tstring _ aString.\r\truns _ anArray! !\r\r!Text methodsFor: 'private' stamp: 'tk 12/16/97 14:14'!\rsetString: aString setRunsChecking: aRunArray\r\t\"Check runs and do the best you can to make them fit...\"\r\r\tstring _ aString.\r\t\"check the runs\"\r\taRunArray ifNil: [^ aString asText].\r\t(aRunArray isKindOf: RunArray) ifFalse: [^ aString asText].\r\taRunArray runs size = aRunArray values size ifFalse: [^ aString asText].\r\t(aRunArray values includes: #()) ifTrue: [^ aString asText].\t\"not allowed?\"\r\taRunArray size = aString size ifFalse: [^ aString asText].\r\t\r\truns _ aRunArray.! !\r\r\r!Text methodsFor: 'attributes' stamp: 'tk 2/27/2001 08:20'!\raskIfAddStyle: priorMethod req: requestor\r\t\"Ask the user if we have a complex style (i.e. bold) for the first time\"\r\t| tell answ old |\r\t(Preferences browseWithPrettyPrint and: [Preferences colorWhenPrettyPrinting])\r\t\tifTrue: [self couldDeriveFromPrettyPrinting ifTrue: [^ self asString]].\r\tself runs coalesce.\r\tself unembellished ifTrue: [^ self asString].\r\tpriorMethod ifNotNil: [old _ priorMethod getSourceFromFile].\r\t(old == nil or: [old unembellished])\r\t\tifTrue:\r\t\t\t[tell _ 'This method contains style for the first time (e.g. bold or colored text).\rDo you really want to save the style info?'.\r\t\t\tansw _ (PopUpMenu labels: 'Save method with style\rSave method simply')\r\t\t\t\t\t\tstartUpWithCaption: tell.\r\t\t\tansw = 2 ifTrue: [^ self asString]]! !\r\r!Text methodsFor: 'attributes' stamp: 'tk 11/1/2001 14:37'!\rbasicType\r\t\"Answer a symbol representing the inherent type I hold\"\r\r\t\"Number String Boolean player collection sound color etc\"\r\t^ #Text! !\r\r!Text methodsFor: 'attributes' stamp: 'sw 11/16/1999 22:33'!\rcouldDeriveFromPrettyPrinting\r\t\"Return true if the receiver has any TextAttributes that are functional rather than simply appearance-related\"\r\truns values do:\r\t\t[:emphArray | emphArray do:\r\t\t\t[:emph | emph couldDeriveFromPrettyPrinting ifFalse: [^ false]]].\r\t^ true! !\r\r!Text methodsFor: 'attributes' stamp: 'sw 12/7/1999 12:31'!\runembellished \r\t\"Return true if the only emphases are the default font and bold\"\r\t| font1 bold |\r\tfont1 _ TextFontChange defaultFontChange.\r\tbold _ TextEmphasis bold.\r\tPreferences ignoreStyleIfOnlyBold ifFalse:\r\t\t[\"Ignore font1 only or font1-bold followed by font1-plain\"\r\t\t^ (runs values = (Array with: (Array with: font1)))\r\t\tor: [runs values = (Array with: (Array with: font1 with: bold)\r \t\t\t\t\t\t\t\twith: (Array with: font1))]].\r\r\t\"If preference is set, then ignore any combo of font1 and bold\"\r\truns withStartStopAndValueDo:\r\t\t[:start :stop :emphArray |\r\t\temphArray do:\r\t\t\t[:emph | (font1 = emph or: [bold = emph]) ifFalse: [^ false]]].\r\t^ true! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rText class\r\tinstanceVariableNames: ''!\r\r!Text class methodsFor: 'class initialization' stamp: 'sw 5/23/2001 14:11'!\rinitTextConstants \r\t\"Initialize constants shared by classes associated with text display, e.g., \r\tSpace, Tab, Cr, Bs, ESC.\"\r\t\t\"1/24/96 sw: in exasperation and confusion, changed cmd-g mapping from 231 to 232 to see if I could gain any relief?!!\"\r\r\r\t| letter varAndValue tempArray width |\r\t\"CtrlA..CtrlZ, Ctrla..Ctrlz\"\r\tletter _ $A.\r \t#(\t\t212 230 228 196 194 226 241 243 214 229 200 217 246 \r\t\t\t245 216 202 210 239 211 240 197 198 209 215 242 231\r\t \t\t1 166 228 132 130 12 232 179 150 165 136 153 182 \r\t\t\t14 15 138 17 18 19 11 21 134 145 151 178 167 ) do:\r\t\t[:kbd |\r\t\tTextConstants at: ('Ctrl', letter asSymbol) asSymbol put: kbd asCharacter.\r\t\tletter _ letter == $Z ifTrue: [$a] ifFalse: [(letter asciiValue + 1) asCharacter]].\r\r\tvarAndValue _ #(\r\t\tSpace\t32\r\t\tTab\t\t9\r\t\tCR\t\t13\r\t\tEnter\t3\r\t\tBS\t\t8\r\t\tBS2\t\t158\r\t\tESC\t\t160\r\t\tClear \t173\r\t).\r\r\tvarAndValue size odd ifTrue: [self error: 'unpaired text constant'].\r\t(2 to: varAndValue size by: 2) do:\r\t\t[:i | TextConstants at: (varAndValue at: i - 1) put: (varAndValue at: i) asCharacter].\r\r\tvarAndValue _ #(\r\t\tCtrlDigits \t\t\t(159 144 143 128 127 129 131 180 149 135)\r\t\tCtrlOpenBrackets\t(201 7 218 249 219 15)\r\t\t\t\"lparen gottn by ctrl-_ = 201; should be 213 but can't type that on Mac\"\r\r\t\t\t\"location of non-character stop conditions\"\r\t\tEndOfRun\t257\r\t\tCrossedX\t258\r\r\t\t\t\"values for alignment\"\r\t\tLeftFlush\t0\r\t\tRightFlush\t1\r\t\tCentered\t2\r\t\tJustified\t3\r\r\t\t\t\"subscripts for a marginTabsArray tuple\"\r\t\tLeftMarginTab\t1\r\t\tRightMarginTab\t2\r\r\t\t\t\"font faces\"\r\t\tBasal\t0\r\t\tBold\t1\r\t\tItalic\t2\r\r\t\t\t\"in case font doesn't have a width for space character\"\r\t\t\t\"some plausible numbers-- are they the right ones?\"\r\t\tDefaultSpace\t\t\t4\r\t\tDefaultTab\t\t\t\t24\r\t\tDefaultLineGrid\t\t\t16\r\t\tDefaultBaseline\t\t\t12\r\t\tDefaultFontFamilySize\t3\t\"basal, bold, italic\"\r\t).\r\r\tvarAndValue size odd ifTrue: [self error: 'unpaired text constant'].\r\t(2 to: varAndValue size by: 2) do:\r\t\t[:i | TextConstants at: (varAndValue at: i - 1) put: (varAndValue at: i)].\r\r\tTextConstants at: #DefaultRule\tput: Form over.\r\tTextConstants at: #DefaultMask\tput: Color black.\r\r\twidth _ Display width max: 720.\r\ttempArray _ Array new: width // DefaultTab.\r\t1 to: tempArray size do:\r\t\t[:i | tempArray at: i put: DefaultTab * i].\r\tTextConstants at: #DefaultTabsArray put: tempArray.\r\ttempArray _ Array new: (width // DefaultTab) // 2.\r\t1 to: tempArray size do:\r\t\t[:i | tempArray at: i put: (Array with: (DefaultTab*i) with: (DefaultTab*i))].\r\tTextConstants at: #DefaultMarginTabsArray put: tempArray.\r\r\"Text initTextConstants \"! !\r\r!Text class methodsFor: 'class initialization'!\rinitialize\t\"Text initialize\"\r\t\"Initialize constants shared by classes associated with text display.\"\r\r\tTextConstants at: #CaretForm put:\r\t\t\t\t(Form extent: 16@5\r\t\t\t\t\tfromArray: #(2r001100e26 2r001100e26 2r011110e26 2r111111e26 2r110011e26)\r\t\t\t\t\toffset: -3@0).\r\tself initTextConstants! !\r\r\r!Text class methodsFor: 'instance creation' stamp: 'sw 12/6/1999 14:14'!\rfromString: aString \r\t\"Answer an instance of me whose characters are those of the argument, aString.\"\r\r\t^ self string: aString attribute: (TextFontChange fontNumber: TextStyle default defaultFontIndex)! !\r\r!Text class methodsFor: 'instance creation' stamp: 'jm 4/28/1998 06:54'!\rfromUser\r\t\"Answer an instance of me obtained by requesting the user to type a string.\"\r\t\"Text fromUser\"\r\r\t^ self fromString:\r\t\t(FillInTheBlank request: 'Enter text followed by carriage return')\r! !\r\r!Text class methodsFor: 'instance creation'!\rnew: stringSize\r\r\t^self fromString: (String new: stringSize)! !\r\r!Text class methodsFor: 'instance creation'!\rstreamContents: blockWithArg \r\t| stream |\r\tstream _ TextStream on: (self new: 400).\r\tblockWithArg value: stream.\r\t^ stream contents! !\r\r!Text class methodsFor: 'instance creation'!\rstring: aString attribute: att\r\t\"Answer an instance of me whose characters are aString.\r\tatt is a TextAttribute.\"\r\r\t^self string: aString attributes: (Array with: att)! !\r\r!Text class methodsFor: 'instance creation'!\rstring: aString attributes: atts\r\t\"Answer an instance of me whose characters are those of aString.\r\tatts is an array of TextAttributes.\"\r\r\t^self string: aString runs: (RunArray new: aString size withAll: atts)! !\r\r!Text class methodsFor: 'instance creation'!\rstring: aString emphasis: emphasis\r\t\"This is an old method that is mainly used by old applications\"\r\r\temphasis isNumber ifTrue:\r\t\t[self halt: 'Numeric emphasis is not supported in Squeak'.\r\t\t\"But if you proceed, we will do our best to give you what you want...\"\r\t\t^ self string: aString runs: (RunArray new: aString size withAll: \r\t\t\t(Array with: (TextFontChange new fontNumber: emphasis)))].\r\t^ self string: aString attributes: emphasis! !\r\r\r!Text class methodsFor: 'private' stamp: 'di 10/31/97 11:22'!\raddAttribute: att toArray: others \r\t\"Add a new text attribute to an existing set\"\r\t\"NOTE: The use of reset and set in this code is a specific\r\thack for merging TextKerns.\"\r\tatt reset.\r\t^ Array streamContents:\r\t\t[:strm | others do:\r\t\t\t[:other | (att dominates: other) ifFalse: [strm nextPut: other]].\r\t\tatt set ifTrue: [strm nextPut: att]]! !\r\r!Text class methodsFor: 'private'!\rstring: aString runs: anArray\r \r\t^self basicNew setString: aString setRuns: anArray! !\rTextAttribute subclass: #TextAction\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'Purple'\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Text'!\r\r!TextAction methodsFor: 'as yet unclassified' stamp: 'tk 12/16/97 16:44'!\ranalyze: aString\r\t\"Analyze the selected text to find both the parameter to store and the text to emphesize (may be different from original selection).  Does not return self!!.  May be of the form:\r3+4\r<3+4>\rClick Here<3+4>\r<3+4>Click Here\r\"\r\t\"Obtain the showing text and the instructions\"\r\t| b1 b2 trim param show |\r\tb1 _ aString indexOf: $<.\r\tb2 _ aString indexOf: $>.\r\t(b1 < b2) & (b1 > 0) ifFalse: [\"only one part\"\r\t\tparam _ self validate: aString.\r\t\t^ Array with: param with: (param size = 0 ifTrue: [nil] ifFalse: [param])].\r\t\"Two parts\"\r\ttrim _ aString withBlanksTrimmed.\r\t(trim at: 1) == $< \r\t\tifTrue: [(trim last) == $>\r\t\t\tifTrue: [\"only instructions\" \r\t\t\t\tparam _ self validate: (aString copyFrom: b1+1 to: b2-1).\r\t\t\t\tshow _ param size = 0 ifTrue: [nil] ifFalse: [param]]\r\t\t\tifFalse: [\"at the front\"\r\t\t\t\tparam _ self validate: (aString copyFrom: b1+1 to: b2-1).\r\t\t\t\tshow _ param size = 0 ifTrue: [nil] \r\t\t\t\t\t\tifFalse: [aString copyFrom: b2+1 to: aString size]]]\r\t\tifFalse: [(trim last) == $>\r\t\t\tifTrue: [\"at the end\"\r\t\t\t\tparam _ self validate: (aString copyFrom: b1+1 to: b2-1).\r\t\t\t\tshow _ param size = 0 ifTrue: [nil] \r\t\t\t\t\t\tifFalse: [aString copyFrom: 1 to: b1-1]]\r\t\t\tifFalse: [\"Illegal -- <> has text on both sides\"\r\t\t\t\tshow _ nil]].\r\t^ Array with: param with: show\r! !\r\r!TextAction methodsFor: 'as yet unclassified' stamp: 'sw 11/9/1999 17:21'!\rcouldDeriveFromPrettyPrinting\r\t^ false! !\r\r!TextAction methodsFor: 'as yet unclassified' stamp: 'di 10/31/97 13:11'!\rdominatedByCmd0\r\t\"Cmd-0 should turn off active text\"\r\t^ true! !\r\r!TextAction methodsFor: 'as yet unclassified' stamp: 'di 1/14/98 09:30'!\remphasizeScanner: scanner\r\t\"Set the emphasis for text display\"\r\tscanner textColor: Purple! !\r\r!TextAction methodsFor: 'as yet unclassified' stamp: 'DSM 3/30/1999 13:15'!\rinfo\r\t^ 'no hidden info'! !\r\r!TextAction methodsFor: 'as yet unclassified'!\rmayActOnClick\r\r\t^ true! !\r\r!TextAction methodsFor: 'as yet unclassified' stamp: 'tk 12/16/97 16:48'!\rvalidate: aString\r\t\"any format is OK with me\"\r\t^ aString! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rTextAction class\r\tinstanceVariableNames: ''!\r\r!TextAction class methodsFor: 'as yet unclassified' stamp: 'di 1/14/98 09:30'!\rinitialize   \"TextAction initialize\"\r\tPurple _ Color r: 0.4 g: 0 b: 1.0! !\rTextAttribute subclass: #TextAlignment\r\tinstanceVariableNames: 'alignment'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Text'!\r\r!TextAlignment methodsFor: 'as yet unclassified' stamp: 'ar 12/15/2001 23:33'!\r= other \r\t^ (other class == self class) \r\t\tand: [other alignment = alignment]! !\r\r!TextAlignment methodsFor: 'as yet unclassified' stamp: 'ar 12/15/2001 23:33'!\ralignment\r\t^alignment! !\r\r!TextAlignment methodsFor: 'as yet unclassified' stamp: 'ar 12/15/2001 23:33'!\ralignment: aNumber\r\talignment _ aNumber.! !\r\r!TextAlignment methodsFor: 'as yet unclassified' stamp: 'ar 12/16/2001 00:20'!\rdominates: other\r\t\"There can be only one...\"\r\t^self class == other class! !\r\r!TextAlignment methodsFor: 'as yet unclassified' stamp: 'ar 12/15/2001 23:34'!\remphasizeScanner: scanner\r\t\"Set the emphasist for text scanning\"\r\tscanner setAlignment: alignment.! !\r\r!TextAlignment methodsFor: 'as yet unclassified' stamp: 'ar 9/9/2003 22:03'!\rhash\r\t\"#hash is re-implemented because #= is re-implemented\"\r\t^ alignment hash! !\r\r!TextAlignment methodsFor: 'as yet unclassified' stamp: 'ar 12/16/2001 01:55'!\rwriteScanOn: strm\r\r\tstrm nextPut: $a.\r\talignment printOn: strm.! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rTextAlignment class\r\tinstanceVariableNames: ''!\r\r!TextAlignment class methodsFor: 'instance creation' stamp: 'ar 12/15/2001 23:36'!\rcentered\r\t^self new alignment: 2! !\r\r!TextAlignment class methodsFor: 'instance creation' stamp: 'ar 12/15/2001 23:36'!\rjustified\r\t^self new alignment: 3! !\r\r!TextAlignment class methodsFor: 'instance creation' stamp: 'ar 12/15/2001 23:35'!\rleftFlush\r\t^self new alignment: 0! !\r\r!TextAlignment class methodsFor: 'instance creation' stamp: 'ar 12/15/2001 23:35'!\rrightFlush\r\t^self new alignment: 1! !\rObject subclass: #TextAttribute\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Text'!\r!TextAttribute commentStamp: 'tk 7/22/2002 18:33' prior: 0!\rTells a piece of text to be a certain way.\r\rSelect text, press Command-6, choose a attribute.  If selected text is of the form \r\tHi There<Smalltalk beep>\rthe part in angle brackets is saved for action, and the Hi There appears in the paragraph.  If selection has no angle brackets, use the whole thing as both the text and the action.\r\rTextDoIt  --  eval as a Smalltalk expression (the part in angle brackets)\r\rTextLink -- Show a method, class comment, class hierarchy, or class defintion.\r\t<Point extent:>, <Point Comment>, <Point Hierarchy>, or <Point Defintion> are what you type.\r\rTextURL -- Show the web page. <www.disney.com>\r\rThese attributes of text need to be stored on the disk in a regular file-out.  It is done in this form: \tHi There   \r\tin the text, and a Run containing   dSmalltalk beep;;\r\tClick here to see the extent:   \r\tin the text, and a Run containing   method LPoint extent:;\rSee RunArray class scanFrom: where decoding is done.\r!\r]style[(903 24 25)f1,f1LRunArray class scanFrom:;,f1!\r\r\r!TextAttribute methodsFor: 'as yet unclassified'!\ractOnClickFor: model\r\t\"Subclasses may override to provide, eg, hot-spot actions\"\r\t^ false! !\r\r!TextAttribute methodsFor: 'as yet unclassified' stamp: 'ar 9/22/2001 16:00'!\ractOnClickFor: model in: aParagraph\r\t^self actOnClickFor: model! !\r\r!TextAttribute methodsFor: 'as yet unclassified' stamp: 'ar 9/22/2001 16:08'!\ractOnClickFor: model in: aParagraph at: clickPoint\r\t^self actOnClickFor: model in: aParagraph! !\r\r!TextAttribute methodsFor: 'as yet unclassified' stamp: 'ar 9/22/2001 16:22'!\ractOnClickFor: model in: aParagraph at: clickPoint editor: editor\r\t^self actOnClickFor: model in: aParagraph at: clickPoint! !\r\r!TextAttribute methodsFor: 'as yet unclassified' stamp: 'ar 12/16/2001 23:18'!\ranchoredMorph\r\t\"If one hides here, return it\"\r\t^nil! !\r\r!TextAttribute methodsFor: 'as yet unclassified' stamp: 'sw 11/9/1999 17:25'!\rcouldDeriveFromPrettyPrinting\r\t\"Answer whether the receiver is a kind of attribute that could have been generated by doing polychrome pretty-printing of a method without functional text attributes.\"\r\r\t^ true! !\r\r!TextAttribute methodsFor: 'as yet unclassified' stamp: 'di 10/31/97 13:09'!\rdominatedByCmd0\r\t\"Subclasses may override if cmd-0 should turn them off\"\r\t^ false! !\r\r!TextAttribute methodsFor: 'as yet unclassified'!\rdominates: another\r\t\"Subclasses may override condense multiple attributes\"\r\t^ false! !\r\r!TextAttribute methodsFor: 'as yet unclassified' stamp: 'di 4/1/1999 15:16'!\remphasisCode\r\t\"Subclasses may override to add bold, italic, etc\"\r\t^ 0! !\r\r!TextAttribute methodsFor: 'as yet unclassified'!\remphasizeScanner: scanner\r\t\"Subclasses may override to set, eg, font, color, etc\"! !\r\r!TextAttribute methodsFor: 'as yet unclassified' stamp: 'di 11/9/97 17:46'!\rforFontInStyle: aTextStyle do: aBlock\r\t\"No action is the default.  Overridden by font specs\"! !\r\r!TextAttribute methodsFor: 'as yet unclassified'!\rmayActOnClick\r\t\"Subclasses may override to provide, eg, hot-spot actions\"\r\t^ false! !\r\r!TextAttribute methodsFor: 'as yet unclassified' stamp: 'di 11/10/97 14:05'!\rmayBeExtended\r\t\"A quality that may be overridden by subclasses, such as TextAnchors, that really only apply to a single character\"\r\t^ true! !\r\r!TextAttribute methodsFor: 'as yet unclassified' stamp: 'di 10/31/97 11:03'!\rreset\r\t\"Allow subclasses to prepare themselves for merging attributes\"! !\r\r!TextAttribute methodsFor: 'as yet unclassified'!\rset\r\t\"Respond true to include this attribute (as opposed to, eg, a bold\r\temphasizer that is clearing the property\"\r\t^ true! !\rTextAttribute subclass: #TextColor\r\tinstanceVariableNames: 'color'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Text'!\r!TextColor commentStamp: '<historical>' prior: 0!\rA TextColor encodes a text color change applicable over a given range of text.!\r\r\r!TextColor methodsFor: 'accessing'!\rcolor\r\t^ color! !\r\r!TextColor methodsFor: 'accessing'!\rcolor: aColor\r\tcolor _ aColor! !\r\r\r!TextColor methodsFor: 'comparing' stamp: 'di 10/31/97 11:19'!\r= other \r\t^ (other class == self class) \r\t\tand: [other color = color]! !\r\r!TextColor methodsFor: 'comparing' stamp: 'sma 3/24/2000 10:51'!\rhash\r\t^ color hash! !\r\r\r!TextColor methodsFor: 'printing' stamp: 'sma 3/24/2000 10:51'!\rprintOn: aStream\r\tsuper printOn: aStream.\r\taStream nextPutAll: ' code: '; print: color! !\r\r\r!TextColor methodsFor: 'scanning' stamp: 'di 10/31/97 11:20'!\rdominates: other\r\t^ other class == self class! !\r\r!TextColor methodsFor: 'scanning'!\remphasizeScanner: scanner\r\t\"Set the emphasis for text display\"\r\tscanner textColor: color! !\r\r!TextColor methodsFor: 'scanning' stamp: 'tk 12/16/97 09:47'!\rwriteScanOn: strm\r\t\"Two formats.  c125000255 or cblue;\"\r\r\t| nn str |\r\tstrm nextPut: $c.\r\t(nn _ color name) ifNotNil: [\r\t\t(self class respondsTo: nn) ifTrue: [\r\t\t\t^ strm nextPutAll: nn; nextPut: $;]].\r\t(Array with: color red with: color green with: color blue) do: [:float |\r\t\tstr _ '000', (float * 255) asInteger printString.\r\t\tstrm nextPutAll: (str copyFrom: str size-2 to: str size)]! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rTextColor class\r\tinstanceVariableNames: ''!\r\r!TextColor class methodsFor: 'constants'!\rblack\r\t^ self new color: Color black! !\r\r!TextColor class methodsFor: 'constants'!\rblue\r\t^ self new color: Color blue! !\r\r!TextColor class methodsFor: 'constants'!\rcyan\r\t^ self new color: Color cyan! !\r\r!TextColor class methodsFor: 'constants' stamp: 'ajh 9/10/2002 02:26'!\rgray\r\t^ self new color: Color gray! !\r\r!TextColor class methodsFor: 'constants'!\rgreen\r\t^ self new color: Color green! !\r\r!TextColor class methodsFor: 'constants'!\rmagenta\r\t^ self new color: Color magenta! !\r\r!TextColor class methodsFor: 'constants'!\rred\r\t^ self new color: Color red! !\r\r!TextColor class methodsFor: 'constants' stamp: 'sma 3/24/2000 10:50'!\rwhite \r\t^ self new color: Color white! !\r\r!TextColor class methodsFor: 'constants'!\ryellow\r\t^ self new color: Color yellow! !\r\r\r!TextColor class methodsFor: 'instance creation'!\rcolor: aColor\r\t^ self new color: aColor! !\r\r!TextColor class methodsFor: 'instance creation' stamp: 'sma 3/24/2000 10:49'!\rscanFrom: strm\r\t\"read a color in the funny format used by Text styles on files. c125000255 or cblue;\"\r\r\t| r g b |\r\tstrm peek isDigit\r\t\tifTrue:\r\t\t\t[r _ (strm next: 3) asNumber.\r\t\t\tg _ (strm next: 3) asNumber.\r\t\t\tb _ (strm next: 3) asNumber.\r\t\t\t^ self color: (Color r: r g: g b: b range: 255)].\r\t\"A name of a color\"\r\t^ self color: (Color perform: (strm upTo: $;) asSymbol)! !\rObject subclass: #TextDiffBuilder\r\tinstanceVariableNames: 'realSrc realDst srcMap dstMap srcLines dstLines srcPos dstPos added removed shifted runs matches multipleMatches patchSequence'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-File Contents Browser'!\r\r!TextDiffBuilder methodsFor: 'printing' stamp: 'nk 4/24/2004 08:48'!\rprintPatchSequence: seq on: aStream \r\tseq do: \r\t\t[:assoc | \r\t\taStream\r\t\t\twithAttributes: (self attributesOf: assoc key)\r\t\t\tdo: [aStream nextPutAll: assoc value; cr]]! !\r\r\r!TextDiffBuilder methodsFor: 'initialize' stamp: 'nk 10/29/2000 12:15'!\rdestString: aString \r\trealDst _ self split: aString asString.\r\tdstLines _ OrderedCollection new.\r\tdstMap _ OrderedCollection new.\r\trealDst\r\t\tdoWithIndex: [:line :realIndex | \r\t\t\tdstLines\r\t\t\t\tadd: (self formatLine: line).\r\t\t\tdstMap add: realIndex].\r\tdstPos _ PluggableDictionary new: dstLines size.\r\tdstPos hashBlock: self stringHashBlock.\r\tdstLines\r\t\tdoWithIndex: [:line :index | (dstPos includesKey: line)\r\t\t\t\tifTrue: [(dstPos at: line)\r\t\t\t\t\t\tadd: index.\r\t\t\t\t\tmultipleMatches _ true]\r\t\t\t\tifFalse: [dstPos\r\t\t\t\t\t\tat: line\r\t\t\t\t\t\tput: (OrderedCollection with: index)]]! !\r\r!TextDiffBuilder methodsFor: 'initialize' stamp: 'nk 1/7/2004 09:24'!\rformatLine: aString\r\t^aString copyWithout: Character lf! !\r\r!TextDiffBuilder methodsFor: 'initialize'!\rfrom: sourceString to: destString\r\tself sourceString: sourceString.\r\tself destString: destString.! !\r\r!TextDiffBuilder methodsFor: 'initialize' stamp: 'nk 10/29/2000 12:15'!\rsourceString: aString \r\trealSrc _ self split: aString asString.\r\tsrcLines _ OrderedCollection new.\r\tsrcMap _ OrderedCollection new.\r\trealSrc\r\t\tdoWithIndex: [:line :realIndex | \r\t\t\tsrcLines\r\t\t\t\tadd: (self formatLine: line).\r\t\t\tsrcMap add: realIndex].\r\tsrcPos _ PluggableDictionary new: srcLines size.\r\tsrcPos hashBlock: self stringHashBlock.\r\tsrcLines\r\t\tdoWithIndex: [:line :index | (srcPos includesKey: line)\r\t\t\t\tifTrue: [(srcPos at: line)\r\t\t\t\t\t\tadd: index.\r\t\t\t\t\tmultipleMatches _ true]\r\t\t\t\tifFalse: [srcPos\r\t\t\t\t\t\tat: line\r\t\t\t\t\t\tput: (OrderedCollection with: index)]]! !\r\r!TextDiffBuilder methodsFor: 'initialize'!\rsplit: aString\r\t^self split: aString by: self splitCharacter! !\r\r\r!TextDiffBuilder methodsFor: 'testing'!\rhasMultipleMatches\r\t^multipleMatches == true! !\r\r\r!TextDiffBuilder methodsFor: 'creating patches'!\rbuildDisplayPatch\r\t^Text streamContents:[:stream|\r\t\tself printPatchSequence: self buildPatchSequence on: stream.\r\t]! !\r\r!TextDiffBuilder methodsFor: 'creating patches' stamp: 'RAA 5/2/2001 23:35'!\rbuildPatchSequence\r\t\"@@ TODO: Das funktioniert noch nicht fr n-m matches\"\r\tmatches := TwoLevelDictionary new.\r\tself buildReferenceMap.\r\truns := self processDiagonals.\r\tself validateRuns: runs.\r\t\"There may be things which have just been moved around. Find those.\"\r\tshifted := self detectShiftedRuns.\r\tself processShiftedRuns.\r\t\"Now generate a patch sequence\"\r\tpatchSequence := self generatePatchSequence.\r\t^patchSequence! !\r\r!TextDiffBuilder methodsFor: 'creating patches' stamp: 'ar 11/20/1998 16:57'!\rbuildReferenceMap\r\tdstLines doWithIndex:[:line :index|\r\t\t(srcPos at: line ifAbsent:[#()]) \r\t\t\tdo:[:index2| matches at: index@index2 put: line]\r\t].\r\tsrcLines doWithIndex:[:line :index|\r\t\t(dstPos at: line ifAbsent:[#()])\f \r\t\t\tdo:[:index2| matches at: index2@index put: line]\r\t].\r! !\r\r!TextDiffBuilder methodsFor: 'creating patches'!\rcollectRunFrom: todo startingWith: startIndex into: run\r\t| next start |\r\tstart := startIndex.\r\tself remove: start from: todo.\r\trun add: (matches at: start).\r\t\"Search downwards\"\r\tnext := start.\r\t[next := next + (1@1).\r\ttodo includes: next] whileTrue:[\r\t\trun addLast: (matches at: next).\r\t\tself remove: next from: todo].\r\t\"Search upwards\"\r\tnext := start.\r\t[next := next - (1@1).\r\ttodo includes: next] whileTrue:[\r\t\trun addFirst: (matches at: next).\r\t\tself remove: next from: todo.\r\t\tstart := next. \"To use the first index\"\r\t].\r\t^start! !\r\r!TextDiffBuilder methodsFor: 'creating patches'!\rdetectShiftedRuns\r\t| sortedRuns lastY run shiftedRuns |\r\truns size < 2 ifTrue: [^ nil].\r\tshiftedRuns _ OrderedCollection new.\r\tsortedRuns _ SortedCollection sortBlock: [:a1 :a2 | a1 key x < a2 key x].\r\truns associationsDo: [:assoc | sortedRuns add: assoc].\r\tlastY _ sortedRuns first key y.\r\t2 to: sortedRuns size do:[:i | \r\t\trun _ sortedRuns at: i.\r\t\trun key y > lastY\r\t\t\tifTrue: [lastY _ run key y]\r\t\t\tifFalse: [shiftedRuns add: run]].\r\t^ shiftedRuns! !\r\r!TextDiffBuilder methodsFor: 'creating patches'!\rgeneratePatchSequence\r\t| ps |\r\tps := OrderedCollection new: srcLines size.\r\tsrcLines size timesRepeat:[ps add: nil].\r\tself incorporateMatchesInto: ps.\r\tself incorporateRemovalsInto: ps.\r\tself incorporateAddsInto: ps.\r\t^ps! !\r\r!TextDiffBuilder methodsFor: 'creating patches' stamp: 'di 3/15/1999 14:01'!\rincorporateAddsInto: aPatchSequence\r\t\"Incorporate adds\"\r\t| lastMatch lastIndex index |\r\tadded ifNil:[^self].\r\tadded := added sortBy:[:a1 :a2| a1 key < a2 key].\r\tlastMatch := 1.\r\tlastIndex := 0.\r\t1 to: added size do:[:i|\r\t\tindex := (added at: i) key.\r\t\t[index > lastMatch] whileTrue:[\r\t\t\t[lastIndex := lastIndex + 1.\r\t\t\t(aPatchSequence at: lastIndex) key == #match] whileFalse.\r\t\t\tlastMatch := lastMatch + 1.\r\t\t].\r\t\taPatchSequence add: #insert->(added at: i) value afterIndex: lastIndex.\r\t\tlastIndex := lastIndex + 1.\r\t\tlastMatch := lastMatch + 1.\r\t].! !\r\r!TextDiffBuilder methodsFor: 'creating patches'!\rincorporateMatchesInto: aPatchSequence\r\t\"Incorporate matches\"\r\t| index |\r\truns associationsDo:[:assoc|\r\t\tindex := assoc key y.\r\t\tassoc value do:[:line|\r\t\t\tself assert:[(aPatchSequence at: index) isNil].\r\t\t\taPatchSequence at: index put: (#match -> line).\r\t\t\tindex := index + 1.\r\t\t].\r\t].\r! !\r\r!TextDiffBuilder methodsFor: 'creating patches'!\rincorporateRemovalsInto: aPatchSequence\r\t\"Incorporate removals\"\r\t| index |\r\tremoved ifNil:[^self].\r\tremoved do:[:assoc|\r\t\tindex := assoc key.\r\t\tself assert:[(aPatchSequence at: index) isNil].\r\t\taPatchSequence at: index put: #remove -> assoc value.\r\t].\r! !\r\r!TextDiffBuilder methodsFor: 'creating patches' stamp: 'RAA 5/2/2001 23:41'!\rprocessDiagonals\r\r\t^self processDiagonalsFrom: matches twoLevelKeys\r! !\r\r!TextDiffBuilder methodsFor: 'creating patches' stamp: 'RAA 5/2/2001 23:17'!\rprocessDiagonalsFrom: todoList\r\t| runList start run todo |\r\ttodo := todoList copy.\r\trunList := PluggableDictionary new.\r\trunList hashBlock: self pointHashBlock.\r\trunList equalBlock: self pointEqualBlock.\r\t[todo isEmpty] whileFalse:[\r\t\tstart := todo detect:[:any| true].\r\t\trun := OrderedCollection new.\r\t\tstart := self \r\t\t\t\t\tcollectRunFrom: todo \r\t\t\t\t\tstartingWith: start \r\t\t\t\t\tinto: run.\r\t\trunList at: start put: run.\r\t].\r\t\"If we have multiple matches we might have chosen a bad sequence.\r\tThere we redo the whole thing recursively\"\r\tself hasMultipleMatches  ifFalse:[^runList].\r\trunList size < 2 ifTrue:[^runList].\r\r\trun := nil.\r\tstart := 0.\r\trunList associationsDo:[:assoc|\r\t\t(run isNil or:[assoc value size > run size]) ifTrue:[\r\t\t\trun := assoc value.\r\t\t\tstart := assoc key]].\r\t\"Now found the longest run\"\r\trun := OrderedCollection new.\r\tstart := self\r\t\t\t\tcollectRunFrom: todoList\r\t\t\t\tstartingWith: start\r\t\t\t\tinto: run.\r\t\"Find the diagonals in the remaining set\"\r\trunList := self processDiagonalsFrom: todoList.\r\trunList at: start put: run.\r\t^runList! !\r\r!TextDiffBuilder methodsFor: 'creating patches'!\rprocessShiftedRuns\r\t| key |\r\tshifted isNil ifTrue:[^self].\r\tshifted do:[:assoc|\r\t\tkey := assoc key.\r\t\tassoc value doWithIndex:[:line :idx|\r\t\t\tremoved add: (key y + idx - 1) -> line.\r\t\t\tadded add: (key x + idx - 1) -> line].\r\t\truns removeKey: assoc key.\r\t].\r! !\r\r!TextDiffBuilder methodsFor: 'creating patches' stamp: 'ar 11/20/1998 17:26'!\rvalidateRuns: runList\r\t| srcPosCopy dstPosCopy lines srcIndex dstIndex |\r\tsrcPosCopy _ srcPos copy.\r\tsrcPosCopy associationsDo:[:assoc| assoc value: assoc value asSet].\r\tdstPosCopy _ dstPos copy.\r\tdstPosCopy associationsDo:[:assoc| assoc value: assoc value asSet].\r\trunList associationsDo:[:assoc|\r\t\tsrcIndex := assoc key y.\r\t\tdstIndex := assoc key x.\r\t\tlines := assoc value.\r\t\tlines do:[:string|\r\t\t\t(srcPosCopy at: string) remove: srcIndex.\r\t\t\t(dstPosCopy at: string) remove: dstIndex.\r\t\t\tsrcIndex := srcIndex + 1.\r\t\t\tdstIndex := dstIndex + 1.\r\t\t].\r\t].\r\tremoved := OrderedCollection new.\r\tsrcPosCopy associationsDo:[:assoc|\r\t\tassoc value do:[:index| removed add: (index -> assoc key)].\r\t].\r\tremoved := removed sortBy:[:a1 :a2| a1 key < a2 key].\r\tadded := OrderedCollection new.\r\tdstPosCopy associationsDo:[:assoc|\r\t\tassoc value do:[:index| added add: (index -> assoc key)].\r\t].\r\tadded := added sortBy:[:a1 :a2| a1 key < a2 key].\r! !\r\r\r!TextDiffBuilder methodsFor: 'private' stamp: 'nk 4/24/2004 08:48'!\rattributesOf: type\r\t\"Private.\r\tAnswer the TextAttributes that are used to display text of the given type.\"\r\r\t^type caseOf: {\r\t\t[#insert] -> [ {TextColor red} ].\r\t\t[#remove] -> [ {TextEmphasis struckOut. TextColor blue}].\r\t} otherwise: [ {TextEmphasis normal} ].\r! !\r\r!TextDiffBuilder methodsFor: 'private' stamp: 'RAA 5/2/2001 22:56'!\rpointEqualBlock\r\t^[ :a :b | a x = b x and: [a y = b y]] fixTemps! !\r\r!TextDiffBuilder methodsFor: 'private' stamp: 'ar 11/20/1998 16:35'!\rpointHashBlock\r\t^[:pt| (pt x bitShift: 12) + pt y] fixTemps! !\r\r!TextDiffBuilder methodsFor: 'private' stamp: 'RAA 5/2/2001 23:28'!\rremove: pointKey from: aSet\r\r\tself hasMultipleMatches ifFalse:[^aSet remove: pointKey].\r\taSet removeAllXAndY: pointKey.\r! !\r\r!TextDiffBuilder methodsFor: 'private' stamp: 'ar 11/20/1998 17:26'!\rsplit: aString by: splitChar\r\t| lines index nextIndex |\r\tlines := OrderedCollection new.\r\tindex _ 1.\r\t[index <= aString size] whileTrue:[\r\t\tnextIndex _ aString \r\t\t\t\t\t\tindexOf: splitChar \r\t\t\t\t\t\tstartingAt: index \r\t\t\t\t\t\tifAbsent:[aString size+1].\r\t\tlines add: (aString copyFrom: index to: nextIndex-1).\r\t\tindex _ nextIndex+1].\r\t^lines! !\r\r!TextDiffBuilder methodsFor: 'private'!\rsplitCharacter\r\t^Character cr! !\r\r!TextDiffBuilder methodsFor: 'private' stamp: 'ar 11/24/1998 13:41'!\rstringHashBlock\r\t\"Return a block for use in string hashing\"\r\t| stringSize |\r\t^[:string| \r\t\tstringSize _ string size.\r\t\tstringSize = 0 \r\t\t\tifTrue:[0]\r\t\t\tifFalse:[ stringSize < 3 \r\t\t\t\tifTrue:[(string at: 1) asInteger +\r\t\t\t\t\t\t((string at: string size) asInteger bitShift: 8)]\r\t\t\t\tifFalse:[\t(string at: 1) asInteger +\r\t\t\t\t\t\t((string at: stringSize // 3 + 1) asInteger bitShift: 4) +\r\t\t\t\t\t\t((string at: stringSize // 2 + 1) asInteger bitShift: 8) +\r\t\t\t\t\t\t((string at: stringSize * 2 // 3 + 1) asInteger bitShift: 12) +\r\t\t\t\t\t\t((string at: stringSize) asInteger bitShift: 16)]]] fixTemps! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rTextDiffBuilder class\r\tinstanceVariableNames: ''!\r\r!TextDiffBuilder class methodsFor: 'instance creation'!\rbuildDisplayPatchFrom: srcString to: dstString\r\t^(self from: srcString to: dstString) buildDisplayPatch! !\r\r!TextDiffBuilder class methodsFor: 'instance creation' stamp: 'sw 5/19/2001 10:52'!\rbuildDisplayPatchFrom: srcString to: dstString inClass: srcClass prettyDiffs: prettyBoolean\r\t\"Build a display patch for mapping via diffs from srcString to dstString in the given class.  If prettyBoolean is true, do the diffing for pretty-printed forms\"\r\r\t^ ((srcClass notNil and: [prettyBoolean])\r\t\tifTrue: [PrettyTextDiffBuilder\r\t\t\t\tfrom: srcString\r\t\t\t\tto: dstString\r\t\t\t\tinClass: srcClass]\r\t\tifFalse: [self from: srcString to: dstString]) buildDisplayPatch! !\r\r!TextDiffBuilder class methodsFor: 'instance creation'!\rfrom: srcString to: dstString\r\t^self new from: srcString to: dstString! !\rTextAction subclass: #TextDoIt\r\tinstanceVariableNames: 'evalString'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Text'!\r\r!TextDoIt methodsFor: 'as yet unclassified' stamp: 'tk 12/5/97 17:01'!\ractOnClickFor: anObject\r\t\"Note: evalString gets evaluated IN THE CONTEXT OF anObject\r\t -- meaning that self and all instVars are accessible\"\r\tCompiler evaluate: evalString for: anObject logged: false.\r\t^ true ! !\r\r!TextDoIt methodsFor: 'as yet unclassified' stamp: 'tk 12/16/97 16:46'!\ranalyze: aString\r\r\t| list |\r\tlist _ super analyze: aString.\r\tevalString _ list at: 1.\r\t^ list at: 2! !\r\r!TextDoIt methodsFor: 'as yet unclassified' stamp: 'tk 12/5/97 17:01'!\revalString: str\r\tevalString _ str ! !\r\r!TextDoIt methodsFor: 'as yet unclassified' stamp: 'tk 12/30/97 10:33'!\rinfo\r\t^ evalString! !\r\r!TextDoIt methodsFor: 'as yet unclassified' stamp: 'tk 12/16/97 13:46'!\rwriteScanOn: strm\r\r\tstrm nextPut: $d; nextPutAll: evalString; nextPutAll: ';;'! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rTextDoIt class\r\tinstanceVariableNames: ''!\r\r!TextDoIt class methodsFor: 'as yet unclassified' stamp: 'tk 12/6/97 20:28'!\revalString: str\r\t^ self new evalString: str! !\r\r!TextDoIt class methodsFor: 'as yet unclassified' stamp: 'tk 12/16/97 09:06'!\rscanFrom: strm\r\t\"read a doit in the funny format used by Text styles on files. d10 factorial;;  end with two semicolons\"\r\r\t| pos end doit |\r\tpos _ strm position.\r\t[strm skipTo: $;. strm peek == $;] whileFalse.\r\tend _ strm position - 1.\r\tstrm position: pos.\r\tdoit _ strm next: end-pos.\r\tstrm skip: 2.  \";;\"\r\t^ self evalString: doit! !\rTextAttribute subclass: #TextEmphasis\r\tinstanceVariableNames: 'emphasisCode setMode'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Text'!\r!TextEmphasis commentStamp: '<historical>' prior: 0!\rA TextEmphasis, encodes a characteristic applicable to all fonts.  The encoding is as follows:\r\t1\tbold\r\t2\titallic\r\t4\tunderlined\r\t8\tnarrow\r\t16\tstruck out!\r\r\r!TextEmphasis methodsFor: 'as yet unclassified' stamp: 'di 10/31/97 11:15'!\r= other \r\t^ (other class == self class) \r\t\tand: [other emphasisCode = emphasisCode]! !\r\r!TextEmphasis methodsFor: 'as yet unclassified' stamp: 'di 10/31/97 13:11'!\rdominatedByCmd0\r\t\"Cmd-0 should turn off emphasis\"\r\t^ true! !\r\r!TextEmphasis methodsFor: 'as yet unclassified' stamp: 'di 10/31/97 13:13'!\rdominates: other\r\t(emphasisCode = 0 and: [other dominatedByCmd0]) ifTrue: [^ true].\r\t^ (other class == self class)\r\t\tand: [emphasisCode = other emphasisCode]! !\r\r!TextEmphasis methodsFor: 'as yet unclassified'!\remphasisCode\r\t^ emphasisCode! !\r\r!TextEmphasis methodsFor: 'as yet unclassified'!\remphasisCode: int\r\temphasisCode _ int.\r\tsetMode _ true! !\r\r!TextEmphasis methodsFor: 'as yet unclassified' stamp: 'di 10/29/97 11:57'!\remphasizeScanner: scanner\r\t\"Set the emphasist for text scanning\"\r\tscanner addEmphasis: emphasisCode! !\r\r!TextEmphasis methodsFor: 'as yet unclassified' stamp: 'ar 9/9/2003 22:03'!\rhash\r\t\"#hash is re-implemented because #= is re-implemented\"\r\t^emphasisCode hash\r! !\r\r!TextEmphasis methodsFor: 'as yet unclassified'!\rprintOn: strm\r\tsuper printOn: strm.\r\tstrm nextPutAll: ' code: '; print: emphasisCode! !\r\r!TextEmphasis methodsFor: 'as yet unclassified'!\rset\r\t^ setMode and: [emphasisCode ~= 0]! !\r\r!TextEmphasis methodsFor: 'as yet unclassified'!\rturnOff\r\tsetMode _ false! !\r\r!TextEmphasis methodsFor: 'as yet unclassified' stamp: 'tk 12/16/97 09:28'!\rwriteScanOn: strm\r\r\temphasisCode = 1 ifTrue: [strm nextPut: $b].\r\temphasisCode = 2 ifTrue: [strm nextPut: $i].\r\temphasisCode = 0 ifTrue: [strm nextPut: $n].\r\temphasisCode = 16 ifTrue: [strm nextPut: $=].\r\temphasisCode = 4 ifTrue: [strm nextPut: $u].! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rTextEmphasis class\r\tinstanceVariableNames: ''!\r\r!TextEmphasis class methodsFor: 'as yet unclassified'!\rbold\r\t^ self new emphasisCode: 1! !\r\r!TextEmphasis class methodsFor: 'as yet unclassified'!\ritalic\r\t^ self new emphasisCode: 2! !\r\r!TextEmphasis class methodsFor: 'as yet unclassified' stamp: 'di 10/31/97 13:05'!\rnarrow\r\t^ TextKern kern: -1! !\r\r!TextEmphasis class methodsFor: 'as yet unclassified'!\rnormal\r\t^ self new emphasisCode: 0! !\r\r!TextEmphasis class methodsFor: 'as yet unclassified'!\rstruckOut\r\t^ self new emphasisCode: 16! !\r\r!TextEmphasis class methodsFor: 'as yet unclassified'!\runderlined\r\t^ self new emphasisCode: 4! !\rTextAttribute subclass: #TextFontChange\r\tinstanceVariableNames: 'fontNumber'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Text'!\r!TextFontChange commentStamp: '<historical>' prior: 0!\rA TextFontChange encodes a font change applicable over a given range of text.  The font number is interpreted relative to the textStyle governing display of this text.!\r\r\r!TextFontChange methodsFor: 'as yet unclassified' stamp: 'di 10/31/97 11:15'!\r= other \r\t^ (other class == self class) \r\t\tand: [other fontNumber = fontNumber]! !\r\r!TextFontChange methodsFor: 'as yet unclassified' stamp: 'di 10/31/97 11:20'!\rdominates: other\r\t^ other class == self class! !\r\r!TextFontChange methodsFor: 'as yet unclassified'!\remphasizeScanner: scanner\r\t\"Set the font for text display\"\r\tscanner setFont: fontNumber! !\r\r!TextFontChange methodsFor: 'as yet unclassified'!\rfontNumber\r\t^ fontNumber! !\r\r!TextFontChange methodsFor: 'as yet unclassified'!\rfontNumber: int\r\tfontNumber _ int! !\r\r!TextFontChange methodsFor: 'as yet unclassified' stamp: 'di 11/9/97 17:46'!\rforFontInStyle: aTextStyle do: aBlock\r\taBlock value: (aTextStyle fontAt: fontNumber)! !\r\r!TextFontChange methodsFor: 'as yet unclassified' stamp: 'ar 9/9/2003 22:03'!\rhash\r\t\"#hash is re-implemented because #= is re-implemented\"\r\t^fontNumber hash! !\r\r!TextFontChange methodsFor: 'as yet unclassified'!\rprintOn: strm\r\tsuper printOn: strm.\r\tstrm nextPutAll: ' font: '; print: fontNumber! !\r\r!TextFontChange methodsFor: 'as yet unclassified' stamp: 'tk 12/16/97 09:22'!\rwriteScanOn: strm\r\r\tstrm nextPut: $f.\r\tfontNumber printOn: strm.! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rTextFontChange class\r\tinstanceVariableNames: ''!\r\r!TextFontChange class methodsFor: 'as yet unclassified' stamp: 'sw 12/6/1999 17:52'!\rdefaultFontChange\r\t\"Answer a TextFontChange that represents the default font\"\r\r\t^ self new fontNumber: TextStyle default defaultFontIndex! !\r\r!TextFontChange class methodsFor: 'as yet unclassified'!\rfont1\r\t^ self new fontNumber: 1! !\r\r!TextFontChange class methodsFor: 'as yet unclassified'!\rfont2\r\t^ self new fontNumber: 2! !\r\r!TextFontChange class methodsFor: 'as yet unclassified'!\rfont3\r\t^ self new fontNumber: 3! !\r\r!TextFontChange class methodsFor: 'as yet unclassified'!\rfont4\r\t^ self new fontNumber: 4! !\r\r!TextFontChange class methodsFor: 'as yet unclassified'!\rfontNumber: n\r\t^ self new fontNumber: n! !\rTextFontChange subclass: #TextFontReference\r\tinstanceVariableNames: 'font'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Text'!\r!TextFontReference commentStamp: '<historical>' prior: 0!\rA TextFontReference encodes a font change applicable over a given range of text.  The font reference is absolute:  unlike a TextFontChange, it is independent of the textStyle governing display of this text.!\r\r\r!TextFontReference methodsFor: 'as yet unclassified' stamp: 'sw 11/9/1999 17:22'!\rcouldDeriveFromPrettyPrinting\r\t^ false! !\r\r!TextFontReference methodsFor: 'as yet unclassified'!\remphasizeScanner: scanner\r\t\"Set the actual font for text display\"\r\tscanner setActualFont: font! !\r\r!TextFontReference methodsFor: 'as yet unclassified' stamp: 'di 5/10/1999 23:47'!\rfont\r\r\t^ font! !\r\r!TextFontReference methodsFor: 'as yet unclassified' stamp: 'di 11/9/97 17:47'!\rforFontInStyle: aTextStyle do: aBlock\r\taBlock value: font! !\r\r!TextFontReference methodsFor: 'as yet unclassified'!\rtoFont: aFont\r\r\tfont _ aFont! !\r\r!TextFontReference methodsFor: 'as yet unclassified' stamp: 'tk 7/22/2002 18:39'!\rwriteScanOn: strm\r\r\tstrm nextPut: $F.\r\tstrm nextPutAll: font familyName; nextPut: $#.\r\tfont height printOn: strm.! !\r\r\r!TextFontReference methodsFor: 'comparing' stamp: 'mas 5/7/1999 06:20'!\r= other \r\t^ (other class == self class) \r\t\tand: [other font == font]! !\r\r!TextFontReference methodsFor: 'comparing' stamp: 'ar 9/9/2003 22:03'!\rhash\r\t\"#hash is re-implemented because #= is re-implemented\"\r\t^font hash! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rTextFontReference class\r\tinstanceVariableNames: ''!\r\r!TextFontReference class methodsFor: 'as yet unclassified'!\rtoFont: aFont\r\t^ self new toFont: aFont! !\rTextAttribute subclass: #TextIndent\r\tinstanceVariableNames: 'amount'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Text'!\r!TextIndent commentStamp: '<historical>' prior: 0!\rcreate a hanging indent. !\r\r\r!TextIndent methodsFor: 'access' stamp: 'ls 6/22/1998 17:51'!\ramount: anInteger\r\t\"change the number of tabs to indent by\"\r\tamount _ anInteger! !\r\r\r!TextIndent methodsFor: 'printing' stamp: 'ls 6/22/1998 18:03'!\rprintOn: aStream\r\tsuper printOn: aStream.\r\taStream nextPutAll: ' amount: '.\r\tamount printOn: aStream! !\r\r\r!TextIndent methodsFor: 'setting indentation' stamp: 'ls 6/22/1998 18:56'!\remphasizeScanner: scanner\r\tscanner indentationLevel: amount! !\r\r\r!TextIndent methodsFor: 'condensing' stamp: 'ls 6/22/1998 19:27'!\rdominates: anAttribute\r\t^(self class == anAttribute class)! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rTextIndent class\r\tinstanceVariableNames: ''!\r\r!TextIndent class methodsFor: 'instance creation' stamp: 'ls 6/27/1998 15:55'!\ramount: amount\r\t\"create a TextIndent which will indent by the given amount.  Currently this is a number of tabs, but may change in the futur\"\r\t^super new amount: amount! !\r\r\r!TextIndent class methodsFor: 'example' stamp: 'ls 6/24/1998 18:06'!\rexample\r\t\"TextIndent example\"\r\t| text pg |\r\r\t\"create an example text with some indentation\"\r\ttext _ 'abcdao euoaeuo aeuo aeuoaeu o aeuoeauefgh bcd efghi'  asText.\r\ttext addAttribute: (TextColor red)  from: 3 to: 8.\r\ttext addAttribute: (TextIndent amount: 1) from: 1 to: 2.\r\ttext addAttribute: (TextIndent amount: 2) from: 20 to: 35.\r\r\t\"stick it in a paragraph and display it\"\r\tpg _ text asParagraph.\r\tpg compositionRectangle: (0@0 extent: 100@200).\r\tpg textStyle alignment: 2.\r\tpg displayAt: 0@0.\r! !\rTextAttribute subclass: #TextKern\r\tinstanceVariableNames: 'kern active'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Text'!\r!TextKern commentStamp: '<historical>' prior: 0!\rA TextKern encodes a kerning change applicable over a given range of text.  Positive values of kern spread letters out, negative kern will cause them to overlap more.  Note that kerns other than 0 will display somewhat slower, as kerning is not yet supported in the text scanning primitive. !\r\r\r!TextKern methodsFor: 'as yet unclassified' stamp: 'di 10/31/97 11:15'!\r= other \r\t^ (other class == self class) \r\t\tand: [other kern = kern]! !\r\r!TextKern methodsFor: 'as yet unclassified' stamp: 'sw 11/9/1999 17:21'!\rcouldDeriveFromPrettyPrinting\r\t^ false! !\r\r!TextKern methodsFor: 'as yet unclassified' stamp: 'di 10/31/97 13:10'!\rdominatedByCmd0\r\t\"Cmd-0 should turn off kerning\"\r\t^ true! !\r\r!TextKern methodsFor: 'as yet unclassified' stamp: 'di 10/31/97 11:10'!\rdominates: other\r\t\"NOTE: The use of active in this code is specific to its use in the method\r\t\tText class addAttribute: att toArray: others\"\r\t(active and: [other class == self class and: [other kern + kern = 0]])\r\t\tifTrue: [active _ false.  ^ true].  \"can only dominate once\"\r\t^ false! !\r\r!TextKern methodsFor: 'as yet unclassified' stamp: 'di 10/29/97 11:50'!\remphasizeScanner: scanner\r\t\"Augment (or diminish) the kerning offset for text display\"\r\tscanner addKern: kern! !\r\r!TextKern methodsFor: 'as yet unclassified' stamp: 'ar 9/9/2003 22:03'!\rhash\r\t\"#hash is re-implemented because #= is re-implemented\"\r\t^kern hash! !\r\r!TextKern methodsFor: 'as yet unclassified' stamp: 'di 10/31/97 11:12'!\rkern\r\t^ kern! !\r\r!TextKern methodsFor: 'as yet unclassified' stamp: 'tk 12/30/97 09:59'!\rkern: kernValue\r\tkern _ kernValue.\r\tself reset.! !\r\r!TextKern methodsFor: 'as yet unclassified' stamp: 'di 10/31/97 11:04'!\rreset\r\tactive _ true! !\r\r!TextKern methodsFor: 'as yet unclassified' stamp: 'di 10/31/97 11:11'!\rset\r\t^ active! !\r\r!TextKern methodsFor: 'as yet unclassified' stamp: 'tk 9/21/1999 15:57'!\rwriteScanOn: strm\r\r\tkern > 0 ifTrue: [\r\t\t1 to: kern do: [:kk | strm nextPut: $+]].\r\tkern < 0 ifTrue: [\r\t\t1 to: 0-kern do: [:kk | strm nextPut: $-]].! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rTextKern class\r\tinstanceVariableNames: ''!\r\r!TextKern class methodsFor: 'as yet unclassified' stamp: 'di 10/29/97 11:49'!\rkern: kernValue\r\t^ self new kern: kernValue! !\rInterval subclass: #TextLineInterval\r\tinstanceVariableNames: 'internalSpaces paddingWidth lineHeight baseline'\r\tclassVariableNames: ''\r\tpoolDictionaries: 'TextConstants'\r\tcategory: 'Graphics-Text'!\r!TextLineInterval commentStamp: '<historical>' prior: 0!\rMy instances specify the starting and stopping points in a String of a composed line. The step is always 1.!\r\r\r!TextLineInterval methodsFor: 'accessing'!\rbaseline\r\t^ baseline! !\r\r!TextLineInterval methodsFor: 'accessing'!\rinternalSpaces\r\t\"Answer the number of spaces in the line.\"\r\r\t^internalSpaces! !\r\r!TextLineInterval methodsFor: 'accessing'!\rinternalSpaces: spacesInteger \r\t\"Set the number of spaces in the line to be spacesInteger.\"\r\r\tinternalSpaces _ spacesInteger! !\r\r!TextLineInterval methodsFor: 'accessing'!\rlineHeight\r\t^ lineHeight! !\r\r!TextLineInterval methodsFor: 'accessing'!\rpaddingWidth\r\t\"Answer the amount of space to be added to the font.\"\r\r\t^paddingWidth! !\r\r!TextLineInterval methodsFor: 'accessing'!\rpaddingWidth: padWidthInteger \r\t\"Set the amount of space to be added to the font to be padWidthInteger.\"\r\r\tpaddingWidth _ padWidthInteger! !\r\r!TextLineInterval methodsFor: 'accessing'!\rstop: stopInteger \r\t\"Set the stopping point in the string of the line to be stopInteger.\"\r\r\tstop _ stopInteger! !\r\r\r!TextLineInterval methodsFor: 'comparing'!\r= line\r\r\tself species = line species\r\t\tifTrue: [^((start = line first and: [stop = line last])\r\t\t\t\tand: [internalSpaces = line internalSpaces])\r\t\t\t\tand: [paddingWidth = line paddingWidth]]\r\t\tifFalse: [^false]! !\r\r\r!TextLineInterval methodsFor: 'scanning'!\rjustifiedPadFor: spaceIndex \r\t\"Compute the width of pad for a given space in a line of justified text.\"\r\r\t| pad |\r\tinternalSpaces = 0 ifTrue: [^0].\r\tpad _ paddingWidth // internalSpaces.\r\tspaceIndex <= (paddingWidth \\\\ internalSpaces)\r\t\tifTrue: [^pad + 1]\r\t\tifFalse: [^pad]! !\r\r!TextLineInterval methodsFor: 'scanning'!\rjustifiedTabDeltaFor: spaceIndex \r\t\"Compute the delta for a tab in a line of justified text, so tab falls \r\tsomewhere plausible when line is justified.\"\r\r\t| pad extraPad |\r\tinternalSpaces = 0 ifTrue: [^0].\r\tpad _ paddingWidth // internalSpaces.\r\textraPad _ paddingWidth \\\\ internalSpaces.\r\tspaceIndex <= extraPad\r\t\tifTrue: [^spaceIndex * (pad + 1)]\r\t\tifFalse: [^extraPad * (pad + 1) + (spaceIndex - extraPad * pad)]! !\r\r\r!TextLineInterval methodsFor: 'updating'!\rslide: delta \r\t\"Change the starting and stopping points of the line by delta.\"\r\r\tstart _ start + delta.\r\tstop _ stop + delta! !\r\r\r!TextLineInterval methodsFor: 'private'!\rinternalSpaces: spacesInteger paddingWidth: padWidthInteger\r\r\tinternalSpaces _ spacesInteger.\r\tpaddingWidth _ padWidthInteger! !\r\r!TextLineInterval methodsFor: 'private'!\rlineHeight: height baseline: ascent\r\r\tlineHeight _ height.\r\tbaseline _ ascent! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rTextLineInterval class\r\tinstanceVariableNames: ''!\r\r!TextLineInterval class methodsFor: 'instance creation'!\rstart: startInteger stop: stopInteger internalSpaces: spacesInteger paddingWidth: padWidthInteger\r\t\"Answer an instance of me with the arguments as the start, stop points, \r\tnumber of spaces in the line, and width of the padding.\"\r\t| newSelf |\r\tnewSelf _ super from: startInteger to: stopInteger by: 1.\r\t^newSelf internalSpaces: spacesInteger paddingWidth: padWidthInteger! !\rTextAction subclass: #TextLink\r\tinstanceVariableNames: 'classAndMethod'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Text'!\r\r!TextLink methodsFor: 'as yet unclassified' stamp: 'tk 5/1/2001 18:17'!\ractOnClickFor: aMessageSet\r\t\"Add to the end of the list.  'aClass selector', 'aClass Comment', 'aClass Definition', 'aClass Hierarchy' are the formats allowed.\"\r\r\taMessageSet addItem: classAndMethod.\r\t^ true! !\r\r!TextLink methodsFor: 'as yet unclassified' stamp: 'tk 12/16/97 16:49'!\ranalyze: aString\r\r\t| list |\r\tlist _ super analyze: aString.\r\tclassAndMethod _ list at: 1.\r\t^ list at: 2! !\r\r!TextLink methodsFor: 'as yet unclassified' stamp: 'LC 10/8/2001 10:53'!\ranalyze: aString with: nonMethod\r\t\"Initalize this attribute holder with a piece text the user typed into a paragraph.  Returns the text to emphesize (may be different from selection)  Does not return self!!.  nonMethod is what to show when clicked, i.e. the last part of specifier (Comment, Definition, or Hierarchy).  May be of the form:\rPoint\r<Point>\rClick Here<Point>\r<Point>Click Here\r\"\r\t\"Obtain the showing text and the instructions\"\r\t| b1 b2 trim |\r\tb1 _ aString indexOf: $<.\r\tb2 _ aString indexOf: $>.\r\t(b1 < b2) & (b1 > 0) ifFalse: [\"only one part\"\r\t\tclassAndMethod _ self validate: aString, ' ', nonMethod.\r\t\t^ classAndMethod ifNotNil: [aString]].\r\t\"Two parts\"\r\ttrim _ aString withBlanksTrimmed.\r\t(trim at: 1) == $< \r\t\tifTrue: [(trim last) == $>\r\t\t\tifTrue: [\"only instructions\" \r\t\t\t\tclassAndMethod _ self validate: (aString copyFrom: b1+1 to: b2-1), ' ', nonMethod.\r\t\t\t\t^ classAndMethod ifNotNil: [classAndMethod]]\r\t\t\tifFalse: [\"at the front\"\r\t\t\t\tclassAndMethod _ self validate: (aString copyFrom: b1+1 to: b2-1), ' ', nonMethod.\r\t\t\t\t^ classAndMethod ifNotNil: [aString copyFrom: b2+1 to: aString size]]]\r\t\tifFalse: [(trim last) == $>\r\t\t\tifTrue: [\"at the end\"\r\t\t\t\tclassAndMethod _ self validate: (aString copyFrom: b1+1 to: b2-1), ' ', nonMethod.\r\t\t\t\t^ classAndMethod ifNotNil: [aString copyFrom: 1 to: b1-1]]\r\t\t\tifFalse: [\"Illegal -- <> has text on both sides\"\r\t\t\t\t^ nil]]\r! !\r\r!TextLink methodsFor: 'as yet unclassified' stamp: 'tk 12/5/97 17:09'!\rclassAndMethod: aString\r\tclassAndMethod _ aString! !\r\r!TextLink methodsFor: 'as yet unclassified' stamp: 'tk 12/30/97 10:33'!\rinfo\r\t^ classAndMethod! !\r\r!TextLink methodsFor: 'as yet unclassified' stamp: 'tk 5/7/2001 09:30'!\rvalidate: specString\r\t\"Can this string be decoded to be Class space Method (or Comment, Definition, Hierarchy)? If so, return it in valid format, else nil\" \r\r\t| list first mid last |\r\tlist _ specString findTokens: ' \t.|'.\r\tlast _ list last.\r\tlast first isUppercase ifTrue: [\r\t\t(#('Comment' 'Definition' 'Hierarchy') includes: last) ifFalse: [^ nil].\r\t\t\"Check for 'Rectangle Comment Comment' and remove last one\"\r\t\t(list at: list size - 1) = last ifTrue: [list _ list allButLast]].\r\tlist size > 3 ifTrue: [^ nil].\r\tlist size < 2 ifTrue: [^ nil].\r\tSymbol hasInterned: list first ifTrue: [:sym | first _ sym].\r\tfirst ifNil: [^ nil].\r\tSmalltalk at: first ifAbsent: [^ nil].\r\tmid _ list size = 3 \r\t\tifTrue: [(list at: 2) = 'class' ifTrue: ['class '] ifFalse: [^ nil]]\r\t\tifFalse: [''].\r\t\"OK if method name is not interned -- may not be defined yet\"\r\t^ first, ' ', mid, last! !\r\r!TextLink methodsFor: 'as yet unclassified' stamp: 'tk 12/16/97 13:44'!\rwriteScanOn: strm\r\r\tstrm nextPut: $L; nextPutAll: classAndMethod; nextPut: $;! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rTextLink class\r\tinstanceVariableNames: ''!\r\r!TextLink class methodsFor: 'as yet unclassified' stamp: 'tk 12/16/97 08:53'!\rscanFrom: strm\r\t\"read a link in the funny format used by Text styles on files. LPoint +;LPoint Comment;\"\r\r\t^ self new classAndMethod: (strm upTo: $;)! !\rTextDoIt subclass: #TextPrintIt\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Text'!\r\r!TextPrintIt methodsFor: 'as yet unclassified' stamp: 'dvf 10/1/2003 13:27'!\ractOnClickFor: anObject in: aParagraph at: clickPoint editor: editor\r\t\"Note: evalString gets evaluated IN THE CONTEXT OF anObject\r\t -- meaning that self and all instVars are accessible\"\r\t| result range index |\r\tresult _ Compiler evaluate: evalString for: anObject logged: false.\r\tresult _ ' ', result printString,' '.\r\t\"figure out where the attribute ends in aParagraph\"\r\tindex _ (aParagraph characterBlockAtPoint: clickPoint) stringIndex.\r\trange _ aParagraph text rangeOf: self startingAt: index.\r\teditor selectFrom: range last+1 to: range last.\r\teditor zapSelectionWith: result.\r\teditor selectFrom: range last to: range last + result size.\r\t^ true ! !\r\r!TextPrintIt methodsFor: 'as yet unclassified' stamp: 'ar 9/22/2001 16:28'!\rwriteScanOn: strm\r\r\tstrm nextPut: $P; nextPutAll: evalString; nextPutAll: ';;'! !\rObject subclass: #TextPrinter\r\tinstanceVariableNames: 'form para paperSize landscape resolution depth offset columns docTitle noHeader noFooter'\r\tclassVariableNames: 'DefaultPaperSize DefaultTextPrinter'\r\tpoolDictionaries: ''\r\tcategory: 'Graphics-Text'!\r\r!TextPrinter methodsFor: 'initialize' stamp: 'ar 4/30/98 19:26'!\rdefaultPaperSize\r\t\"Return the default paper size (inches) for printing\"\r\t^self class defaultPaperSize! !\r\r!TextPrinter methodsFor: 'initialize' stamp: 'nk 4/2/2004 11:32'!\rdefaultResolution\r\t\"Return the default resolution (DPI) for printing\"\r\t^TextStyle pixelsPerInch asPoint! !\r\r!TextPrinter methodsFor: 'initialize' stamp: 'ar 4/30/98 19:39'!\rinitialize\r\tself paperSize: self defaultPaperSize.\r\tself resolution: self defaultResolution.\r\tself blackAndWhite.\r\tself landscape: false.\r\tself offsetRect: (1.0@1.0 corner: 1.0@1.0).\r\tself columns: 1.\r\tself noHeader: false.\r\tself noFooter: false.\r\tself documentTitle: 'Squeak Document (from ', Date today printString,')'.! !\r\r\r!TextPrinter methodsFor: 'accessing' stamp: 'ar 4/30/98 18:42'!\rblackAndWhite\r\t\"Set the reproduction quality to black and white\"\r\tdepth := 1.! !\r\r!TextPrinter methodsFor: 'accessing' stamp: 'ar 4/30/98 18:50'!\rcolumns\r\t^columns! !\r\r!TextPrinter methodsFor: 'accessing' stamp: 'ar 4/30/98 18:50'!\rcolumns: aNumber\r\tcolumns := aNumber asInteger max: 1.! !\r\r!TextPrinter methodsFor: 'accessing' stamp: 'ar 4/30/98 20:14'!\rdocumentTitle\r\t^docTitle! !\r\r!TextPrinter methodsFor: 'accessing' stamp: 'ar 4/30/98 20:14'!\rdocumentTitle: aString\r\tdocTitle := aString! !\r\r!TextPrinter methodsFor: 'accessing' stamp: 'ar 4/30/98 18:42'!\rlandscape\r\t^landscape! !\r\r!TextPrinter methodsFor: 'accessing' stamp: 'ar 4/30/98 18:42'!\rlandscape: aBoolean\r\tlandscape := aBoolean! !\r\r!TextPrinter methodsFor: 'accessing' stamp: 'ar 4/30/98 19:23'!\rnoFooter\r\t^noFooter! !\r\r!TextPrinter methodsFor: 'accessing' stamp: 'ar 4/30/98 19:22'!\rnoFooter: aBoolean\r\t\"Turn off footer printing\"\r\tnoFooter := aBoolean.! !\r\r!TextPrinter methodsFor: 'accessing' stamp: 'ar 4/30/98 19:22'!\rnoHeader\r\t^noHeader! !\r\r!TextPrinter methodsFor: 'accessing' stamp: 'ar 4/30/98 19:22'!\rnoHeader: aBoolean\r\t\"Turn off header printing\"\r\tnoHeader := aBoolean.! !\r\r!TextPrinter methodsFor: 'accessing' stamp: 'ar 4/30/98 19:27'!\roffsetRect\r\t^offset! !\r\r!TextPrinter methodsFor: 'accessing' stamp: 'ar 4/30/98 19:27'!\roffsetRect: aRectangle\r\t\"Set the offset rectangle\"\r\toffset := aRectangle! !\r\r!TextPrinter methodsFor: 'accessing' stamp: 'ar 4/30/98 18:42'!\rpaperSize\r\t^paperSize! !\r\r!TextPrinter methodsFor: 'accessing' stamp: 'ar 4/30/98 18:42'!\rpaperSize: aPoint\r\tpaperSize := aPoint! !\r\r!TextPrinter methodsFor: 'accessing' stamp: 'ar 4/30/98 18:43'!\rresolution\r\t^resolution! !\r\r!TextPrinter methodsFor: 'accessing' stamp: 'ar 4/30/98 18:43'!\rresolution: aPoint\r\tresolution := aPoint! !\r\r\r!TextPrinter methodsFor: 'printing' stamp: 'ar 4/30/98 20:41'!\rflushPage\r\t\"The current page has been set up. Send it to the printer.\"\r\tform primPrintHScale: self resolution x vScale: self resolution y landscape: self landscape.\r\t\"Uncomment the following for testing\"\r\t\"form displayOn: Display. (Delay forSeconds: 5) wait.\"\r! !\r\r!TextPrinter methodsFor: 'printing' stamp: 'ar 4/30/98 19:19'!\rprintParagraph\r\t| pageNum nextIndex |\r\tpara destinationForm: form.\r\tpageNum := 1.\r\tnextIndex := 1.\r\t[form fillColor: Color white.\r\tself printHeader: pageNum.\r\tself printFooter: pageNum.\r\tnextIndex := self formatPage: pageNum startingWith: nextIndex.\r\tself flushPage.\r\tnextIndex isNil] whileFalse:[pageNum := pageNum + 1].! !\r\r!TextPrinter methodsFor: 'printing' stamp: 'ar 4/30/98 18:55'!\rprintText: aText\r\t\"Print aText\"\r\tform isNil ifTrue:[\r\t\tform := Form extent: self pixelSize depth: depth.\r\t].\r\tpara := Paragraph withText: aText asText.\r\tCursor wait showWhile:[\r\t\tself printParagraph.\r\t].! !\r\r\r!TextPrinter methodsFor: 'formatting' stamp: 'ar 4/30/98 19:25'!\rcolumnRect: n\r\t\"Return a rectangle describing the n-th column\"\r\t| area left right |\r\tarea := self textArea.\r\tleft := area left + ((n-1) * self columnWidth).\r\tleft := left + ((n-1) * self columnSkip).\r\tright := left + self columnWidth.\r\t^(self in2pix: left @ area top) corner: \r\t\t(self in2pix: right @ area bottom)! !\r\r!TextPrinter methodsFor: 'formatting' stamp: 'ar 4/30/98 19:20'!\rcolumnSkip\r\t\"Return the separating space between two columns in inches\"\r\t^0.2! !\r\r!TextPrinter methodsFor: 'formatting' stamp: 'ar 4/30/98 19:21'!\rcolumnWidth\r\t^(self textWidth - ((self columns-1) * self columnSkip)) / self columns! !\r\r!TextPrinter methodsFor: 'formatting' stamp: 'ar 4/30/98 19:29'!\rformatColumn: columnNum startingWith: anIndex\r\t\"Format a new column starting at the given string index. Return the string index indicating the start of the next column or nil if no more columns need printing.\"\r\t| colRect blk |\r\tcolRect := self columnRect: columnNum.\r\tanIndex > 1 ifTrue:[para text: (para text copyFrom: anIndex to: para text size)].\r\tpara compositionRectangle: colRect.\r\tpara clippingRectangle: colRect.\r\tpara composeAll.\r\tpara displayOn: form.\r\tpara visibleRectangle corner y <= colRect extent y ifTrue:[^nil].\r\t\"More columns -- find the character block of the last line and adjust clip rect\"\r\tblk := para characterBlockAtPoint: para visibleRectangle bottomLeft.\r\tpara clearVisibleRectangle. \"Make sure that the background is clean\"\r\tpara clippingRectangle: (colRect topLeft corner: colRect right@blk top).\r\tpara displayOn: form.\r\t^blk stringIndex.! !\r\r!TextPrinter methodsFor: 'formatting' stamp: 'ar 4/30/98 19:29'!\rformatPage: pageNum startingWith: anIndex\r\t\"Format a new page starting at the given string index. Return the string index indicating the start of the next page or nil if no more pages need printing.\"\r\t| nextIndex |\r\tnextIndex := anIndex.\r\t1 to: self columns do:[:i|\r\t\tnextIndex := self formatColumn: i startingWith: nextIndex.\r\t\tnextIndex isNil ifTrue:[^nil].\r\t].\r\t^nextIndex! !\r\r!TextPrinter methodsFor: 'formatting' stamp: 'ar 4/30/98 19:58'!\rtextArea\r\t^(self offsetRect origin + (0.0@self headerHeight)) corner:\r\t\t(self realPaperSize - self offsetRect corner - (0.0@self footerHeight))! !\r\r!TextPrinter methodsFor: 'formatting' stamp: 'ar 4/30/98 19:23'!\rtextWidth\r\t^self textArea extent x! !\r\r\r!TextPrinter methodsFor: 'header' stamp: 'ar 4/30/98 19:23'!\rheaderHeight\r\t\"Return the (additional) height of the header in inches.\"\r\tself noHeader ifTrue:[^0.0].\r\t^(self pix2in: 0@TextStyle default lineGrid) y * 2! !\r\r!TextPrinter methodsFor: 'header' stamp: 'ar 4/30/98 20:11'!\rheaderParagraph\r\t\"Return a paragraph for the footer\"\r\t| hPara rect |\r\thPara := Paragraph new.\r\thPara destinationForm: form.\r\trect := (self in2pix: self textArea topLeft - (0.0@self headerHeight)) corner: \r\t\t\t\t(self in2pix: self textArea topRight).\r\thPara clippingRectangle: rect.\r\thPara compositionRectangle: rect.\r\t^hPara! !\r\r!TextPrinter methodsFor: 'header' stamp: 'ar 4/30/98 19:23'!\rprintHeader: pageNumber\r\t\"Print the header for the given page number\"\r\t| fPara |\r\tself noHeader ifTrue:[^self].\r\tfPara := self headerParagraph.\r\tfPara centered.\r\tfPara text: self documentTitle asText.\r\tfPara displayOn: form.! !\r\r\r!TextPrinter methodsFor: 'footer' stamp: 'ar 4/30/98 19:23'!\rfooterHeight\r\t\"Return the (additional) height of the footer in inches.\"\r\tself noFooter ifTrue:[^0.0].\r\t^(self pix2in: 0@TextStyle default lineGrid) y * 2! !\r\r!TextPrinter methodsFor: 'footer' stamp: 'ar 4/30/98 20:11'!\rfooterParagraph\r\t\"Return a paragraph for the footer\"\r\t| fPara rect |\r\tfPara := Paragraph new.\r\tfPara destinationForm: form.\r\trect := (self in2pix: self textArea bottomLeft) corner: \r\t\t\t\t(self in2pix: self textArea bottomRight + (0.0@self footerHeight)).\r\tfPara clippingRectangle: rect.\r\tfPara compositionRectangle: rect.\r\t^fPara! !\r\r!TextPrinter methodsFor: 'footer' stamp: 'ar 4/30/98 19:24'!\rprintFooter: pageNumber\r\t\"Print the footer for the given page number\"\r\t| fPara |\r\tself noFooter ifTrue:[^self].\r\tfPara := self footerParagraph.\r\tfPara centered.\r\tfPara text: ('Page ', pageNumber printString) asText.\r\tfPara displayOn: form.! !\r\r\r!TextPrinter methodsFor: 'other' stamp: 'ar 4/30/98 18:38'!\rin2pix: aPoint\r\t\"Convert aPoint from inches to actual pixels\"\r\t^(aPoint * self resolution) rounded! !\r\r!TextPrinter methodsFor: 'other' stamp: 'ar 4/30/98 18:38'!\rmm2in: aPoint\r\t\"Convert aPoint from millimeters to inches\"\r\t^aPoint / 25.4! !\r\r!TextPrinter methodsFor: 'other' stamp: 'ar 4/30/98 18:39'!\rpix2in: aPoint\r\t\"Convert aPoint from a pixel value to inches\"\r\t^aPoint / self resolution! !\r\r\r!TextPrinter methodsFor: 'private' stamp: 'ar 4/30/98 19:40'!\rpixelSize\r\t\"Return the size of the page in pixels\"\r\t^self in2pix: (self realPaperSize)! !\r\r!TextPrinter methodsFor: 'private' stamp: 'ar 4/30/98 19:39'!\rrealPaperSize\r\t^self landscape\r\t\tifTrue:[self paperSize y @ self paperSize x]\r\t\tifFalse:[self paperSize]! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rTextPrinter class\r\tinstanceVariableNames: ''!\r\r!TextPrinter class methodsFor: 'class initialization' stamp: 'ar 4/30/98 18:30'!\rinitialize\r\t\"TextPrinter initialize\"\r\tself defaultPaperSize: self paperSizeA4.! !\r\r\r!TextPrinter class methodsFor: 'accessing' stamp: 'ar 4/30/98 18:31'!\rdefaultPaperSize\r\t^DefaultPaperSize! !\r\r!TextPrinter class methodsFor: 'accessing' stamp: 'ar 4/30/98 18:31'!\rdefaultPaperSize: aPoint\r\tDefaultPaperSize := aPoint! !\r\r!TextPrinter class methodsFor: 'accessing' stamp: 'dew 3/7/2000 20:39'!\rdefaultTextPrinter\r\t\"This is the global default TextPrinter instance.\"\r\tDefaultTextPrinter isNil ifTrue: [DefaultTextPrinter _ self new].\r\t^DefaultTextPrinter! !\r\r\r!TextPrinter class methodsFor: 'paper sizes' stamp: 'ar 4/30/98 18:30'!\rmm2in: aPoint\r\t\"Convert aPoint from millimeters to inches\"\r\t^aPoint / 25.4! !\r\r!TextPrinter class methodsFor: 'paper sizes' stamp: 'ar 4/30/98 18:27'!\rpaperSizeA4\r\t^self mm2in: 210@297! !\rWriteStream subclass: #TextStream\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Streams'!\r\r!TextStream methodsFor: 'as yet unclassified' stamp: 'dvf 10/1/2003 02:51'!\rnextPutAll: aCollection \r\n\t\"Optimized access to get around Text at:Put: overhead\"\r\n\t| n |\r\n\tn _ aCollection size.\r\n     position + n > writeLimit\r\n       ifTrue:\r\n        [self growTo: position + n + 10].\r\n\tcollection \r\n\t\treplaceFrom: position+1\r\n\t\tto: position + n\r\n\t\twith: aCollection\r\n\t\tstartingAt: 1.\r\n\tposition _ position + n! !\r\r!TextStream methodsFor: 'as yet unclassified' stamp: 'djp 11/6/1999 20:30'!\rwithAttributes: attributes do: streamBlock \r\t| pos1 val |\r\tpos1 _ self position.\r\tval _ streamBlock value.\r\tattributes do: [:attribute |\r\t\tcollection\r\t\t\taddAttribute: attribute\r\t\t\tfrom: pos1 + 1\r\t\t\tto: self position].\r\t^ val! !\rObject subclass: #TextStyle\r\tinstanceVariableNames: 'fontArray fontFamilySize lineGrid baseline alignment firstIndent restIndent rightIndent tabsArray marginTabsArray leading defaultFontIndex'\r\tclassVariableNames: ''\r\tpoolDictionaries: 'TextConstants'\r\tcategory: 'Graphics-Text'!\r!TextStyle commentStamp: '<historical>' prior: 0!\rA TextStyle comprises the formatting information for composing and displaying a unit (usually a paragraph) of text.  Typically one makes a copy of a master TextStyle (such as TextStyle default), and then that copy may get altered in the process of editing.  Bad things can happen if you do not copy first.\r\rEach of my instances consists of...\r\tfontArray\t\tAn array of StrikeFonts or other fonts\r\tfontFamilySize\tunused\r\tlineGrid\t\t\tAn integer; default line spacing for paragraphs\r\tbaseline\t\t\tAn integer; default baseline (dist from line top to bottom of an 'a')\r\talignment\t\tAn integer; text alignment, see TextStyle alignment:\r\tfirstIndent\t\tAn integer; indent of first line in pixels\r\trestIndent\t\tAn integer; indent of remaining lines in pixels\r\trightIndent\t\tAn integer; indent of right margin rel to section\r\ttabsArray\t\tAn array of integers giving tab offsets in pixels\r\tmarginTabsArray\tAn array of margin tabs\r\tleading\t\t\tAn integer giving default vertical line separation\r\rFor a concrete example, look at TextStyle default copy inspect!\r]style[(367 10 226 20 381 30)f1,f1LStrikeFont Comment;,f1,f1LTextStyle alignment:;,f1,f1dTextStyle default copy inspect;;!\r\r\r!TextStyle methodsFor: 'accessing'!\ralignment\r\t\"Answer the code for the current setting of the alignment.\"\r\r\t^alignment! !\r\r!TextStyle methodsFor: 'accessing' stamp: 'ar 9/21/2000 15:17'!\ralignment: anInteger \r\t\"Set the current setting of the alignment to be anInteger:\r\t0=left flush, 1=right flush, 2=centered, 3=justified.\"\r\r\talignment _ anInteger \\\\ (Justified + 1)! !\r\r!TextStyle methodsFor: 'accessing'!\rbaseline\r\t\"Answer the distance from the top of the line to the bottom of most of the \r\tcharacters (by convention, bottom of the letter 'A').\"\r\r\t^baseline! !\r\r!TextStyle methodsFor: 'accessing'!\rbaseline: anInteger \r\t\"Set the distance from the top of the line to the bottom of most of the \r\tcharacters.\"\r\r\tbaseline _ anInteger! !\r\r!TextStyle methodsFor: 'accessing'!\rcentered\r\talignment _ 2! !\r\r!TextStyle methodsFor: 'accessing' stamp: 'sw 12/6/1999 12:31'!\rdefaultFont\r\t^ fontArray at: self defaultFontIndex! !\r\r!TextStyle methodsFor: 'accessing'!\rfirstIndent\r\t\"Answer the horizontal indenting of the first line of a paragraph in the \r\tstyle of the receiver.\"\r\r\t^firstIndent! !\r\r!TextStyle methodsFor: 'accessing'!\rfirstIndent: anInteger \r\t\"Set the horizontal indenting of the first line of a paragraph in the style \r\tof the receiver to be the argument, anInteger.\"\r\r\tfirstIndent _ anInteger! !\r\r!TextStyle methodsFor: 'accessing'!\rfontNamed: fontName  \"TextStyle default fontNamed: 'TimesRoman10'\"\r\t^ fontArray detect: [:x | x name sameAs: fontName]! !\r\r!TextStyle methodsFor: 'accessing'!\rfontNames  \"TextStyle default fontNames\"\r\t^ fontArray collect: [:x | x name]! !\r\r!TextStyle methodsFor: 'accessing' stamp: 'ar 9/21/2000 11:53'!\rfontNamesWithPointSizes\r\t^ fontArray collect:\r\t\t[:x | x fontNameWithPointSize]\r\r  \"TextStyle default fontNamesWithPointSizes\"! !\r\r!TextStyle methodsFor: 'accessing' stamp: 'nk 6/25/2003 12:54'!\risTTCStyle\r\r\t^ fontArray first isTTCFont.\r! !\r\r!TextStyle methodsFor: 'accessing'!\rjustified\r\talignment _ 3! !\r\r!TextStyle methodsFor: 'accessing'!\rleading\r\t\"Leading (from typographers historical use of extra lead (type metal))\r\tis the extra spacing above and beyond that needed just to accomodate\r\tthe various font heights in the set.\"\r\t^ leading! !\r\r!TextStyle methodsFor: 'accessing'!\rleading: yDelta\r\r\tleading _ yDelta! !\r\r!TextStyle methodsFor: 'accessing'!\rleftFlush\r\talignment _ 0! !\r\r!TextStyle methodsFor: 'accessing'!\rlineGrid\r\t\"Answer the relative space between lines of a paragraph in the style of \r\tthe receiver.\"\r\r\t^lineGrid! !\r\r!TextStyle methodsFor: 'accessing'!\rlineGrid: anInteger \r\t\"Set the relative space between lines of a paragraph in the style of the \r\treceiver to be the argument, anInteger.\"\r\r\tlineGrid _ anInteger! !\r\r!TextStyle methodsFor: 'accessing' stamp: 'sma 12/30/1999 13:57'!\rprintOn: aStream\r\tsuper printOn: aStream.\r\taStream space; nextPutAll: self defaultFont name! !\r\r!TextStyle methodsFor: 'accessing'!\rrestIndent\r\t\"Answer the indent for all but the first line of a paragraph in the style \r\tof the receiver.\"\r\r\t^restIndent! !\r\r!TextStyle methodsFor: 'accessing'!\rrestIndent: anInteger \r\t\"Set the indent for all but the first line of a paragraph in the style of the \r\treceiver to be the argument, anInteger.\"\r\r\trestIndent _ anInteger! !\r\r!TextStyle methodsFor: 'accessing'!\rrightFlush\r\talignment _ 1! !\r\r!TextStyle methodsFor: 'accessing'!\rrightIndent\r\t\"Answer the right margin indent for the lines of a paragraph in the style \r\tof the receiver.\"\r\r\t^rightIndent! !\r\r!TextStyle methodsFor: 'accessing'!\rrightIndent: anInteger \r\t\"Answer the right margin indent for the lines of a paragraph in the style \r\tof the receiver to be the argument, anInteger.\"\r\r\trightIndent _ anInteger! !\r\r\r!TextStyle methodsFor: 'tabs and margins'!\rleftMarginTabAt: marginIndex \r\t\"Set the 'nesting' level of left margin indents of the paragraph in the \r\tstyle of the receiver to be the argument, marginIndex.\"\r\r\t(marginIndex > 0 and: [marginIndex < marginTabsArray size])\r\t\tifTrue: [^(marginTabsArray at: marginIndex) at: 1]\r\t\tifFalse: [^0]\t\r\t\"The marginTabsArray is an Array of tuples.  The Array is indexed according \r\tto the marginIndex, the 'nesting' level of the requestor.\"\r! !\r\r!TextStyle methodsFor: 'tabs and margins'!\rnextTabXFrom: anX leftMargin: leftMargin rightMargin: rightMargin \r\t\"Tab stops are distances from the left margin. Set the distance into the \r\targument, anX, normalized for the paragraph's left margin.\"\r\r\t| normalizedX tabX |\r\tnormalizedX _ anX - leftMargin.\r\t1 to: tabsArray size do: \r\t\t[:i | (tabX _ tabsArray at: i) > normalizedX \r\t\t\t\tifTrue: [^leftMargin + tabX min: rightMargin]].\r\t^rightMargin! !\r\r!TextStyle methodsFor: 'tabs and margins'!\rrightMarginTabAt: marginIndex \r\t\"Set the 'nesting' level of right margin indents of the paragraph in the \r\tstyle of the receiver to be marginIndex.\"\r\r\t(marginIndex > 0 and: [marginIndex < marginTabsArray size])\r\t\tifTrue: [^(marginTabsArray at: marginIndex) at: 2]\r\t\tifFalse: [^0]\r\t\"The marginTabsArray is an Array of tuples.  The Array is indexed according \r\tto the marginIndex, the 'nesting' level of the requestor.\"\r! !\r\r!TextStyle methodsFor: 'tabs and margins'!\rtabWidth\r\t\"Answer the width of a tab.\"\r\r\t^DefaultTab! !\r\r\r!TextStyle methodsFor: 'fonts and font indexes' stamp: 'sw 12/8/1999 18:02'!\rconsistOnlyOf: aFont\r\tfontArray _ Array with: aFont.\r\tdefaultFontIndex _ 1! !\r\r!TextStyle methodsFor: 'fonts and font indexes' stamp: 'sw 12/6/1999 13:54'!\rfontIndexOf: aFont\r\t^ fontArray indexOf: aFont ifAbsent: [nil]! !\r\r!TextStyle methodsFor: 'fonts and font indexes' stamp: 'di 10/11/97 09:23'!\rfontIndexOfSize: desiredHeight\r\t\"Returns an index in fontArray of the font with height <= desiredHeight\"\r\t\"Leading is not inluded in the comparison\"\r\t| bestMatch bestIndex d |\r\tbestMatch _ 9999.  bestIndex _ 1.\r\t1 to: fontArray size do:\r\t\t[:i | d _ desiredHeight - (fontArray at: i) height.\r\t\td = 0 ifTrue: [^ i].\r\t\t(d > 0 and: [d < bestMatch]) ifTrue: [bestIndex _ i. bestMatch _ d]].\r\t^ bestIndex! !\r\r!TextStyle methodsFor: 'fonts and font indexes' stamp: 'di 10/11/97 09:33'!\rfontOfSize: aHeight\r\t\"See fontIndexOfSize.\r\tReturns the actual font.  Leading not considered.\"\r\r\t^ fontArray at: (self fontIndexOfSize: aHeight)! !\r\r\r!TextStyle methodsFor: 'private'!\rfontArray\r\t\"Only for writing out fonts, etc.  8/16/96 tk\"\r\t^ fontArray! !\r\r!TextStyle methodsFor: 'private' stamp: 'di 3/20/1999 22:31'!\rfontAt: index \r\t\"This is private because no object outside TextStyle should depend on the \r\trepresentation of the font family in fontArray.\"\r\r\t^ fontArray atPin: index! !\r\r!TextStyle methodsFor: 'private'!\rgridForFont: fontIndex withLead: leadInteger \r\t\"Force whole style to suit one of its fonts. Assumes only one font referred\r\tto by runs.\"\r\t| font |\r\tfont _ self fontAt: fontIndex.\r\tself lineGrid: font height + leadInteger.\r\tself baseline: font ascent.\r\tself leading: leadInteger! !\r\r!TextStyle methodsFor: 'private' stamp: 'tk 8/20/96'!\rnewFontArray: anArray\r\t\"Currently there is no supporting protocol for changing these arrays. If an editor wishes to implement margin setting, then a copy of the default should be stored with these instance variables.  \r\t, Make size depend on first font.\"\r\r\tfontArray _ anArray.\r\tlineGrid _ (fontArray at: 1) height + leading.\t\"For whole family\"\r\tbaseline _ (fontArray at: 1) ascent + leading.\r\talignment _ 0.\r\tfirstIndent _ 0.\r\trestIndent _ 0.\r\trightIndent _ 0.\r\ttabsArray _ DefaultTabsArray.\r\tmarginTabsArray _ DefaultMarginTabsArray\r\"\rTextStyle allInstancesDo: [:ts | ts newFontArray: TextStyle default fontArray].\r\"! !\r\r\r!TextStyle methodsFor: 'Disk I/O' stamp: 'di 11/19/1999 20:12'!\rveryDeepCopyWith: deepCopier\r\t\"All inst vars are meant to be shared\"\r\r\tself == #veryDeepCopyWith:.\t\"to satisfy checkVariables\"\r\t^ deepCopier references at: self ifAbsent: [\r\t\tdeepCopier references at: self put: self clone].\t\"remember\"! !\r\r\r!TextStyle methodsFor: 'default font' stamp: 'sw 12/6/1999 12:30'!\rdefaultFontIndex\r\t^ defaultFontIndex ifNil: [defaultFontIndex _ 1]! !\r\r!TextStyle methodsFor: 'default font' stamp: 'sw 12/6/1999 13:50'!\rdefaultFontIndex: anIndex\r\tdefaultFontIndex _ anIndex! !\r\r\r!TextStyle methodsFor: 'comparing' stamp: 'tk 7/5/2001 22:18'!\r= other\r\r\tself species == other species ifFalse: [^ false].\r\t1 to: self class instSize do:\r\t\t[:i | (self instVarAt: i) == (other instVarAt: i) ifFalse: [^ false]].\r\t^ true! !\r\r!TextStyle methodsFor: 'comparing' stamp: 'ar 9/9/2003 22:04'!\rhash\r\t\"#hash is re-implemented because #= is re-implemented\"\r\t^fontArray hash\r! !\r\r!TextStyle methodsFor: 'comparing' stamp: 'tk 7/5/2001 22:18'!\rspecies\r\r\t^TextStyle! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rTextStyle class\r\tinstanceVariableNames: ''!\r\r!TextStyle class methodsFor: 'TextConstants access' stamp: 'nk 7/3/2003 19:12'!\ractualTextStyles\r\t| aDict |\r\t\"TextStyle actualTextStyles\"\r\r\t\"Answer dictionary whose keys are the names of styles in the system and whose values are the actual styles\"\r\r\taDict _ TextConstants select: [:thang | thang isKindOf: self ].\r\taDict removeKey: #DefaultTextStyle.\r\taDict removeKey: #DefaultFixedTextStyle.\r\t^ aDict! !\r\r!TextStyle class methodsFor: 'TextConstants access' stamp: 'nk 7/3/2003 19:06'!\rfontArrayForStyle: aName\r\t\"Answer the fonts in the style named aName,\r\tor an empty Array if no such named style.\"\r\r\t\"TextStyle fontArrayForStyle: #Atlanta\"\r\t\"TextStyle fontPointSizesFor: 'NewYork'\"\r\r\t^ ((self named: aName) ifNil: [ ^#() ]) fontArray\r! !\r\r!TextStyle class methodsFor: 'TextConstants access' stamp: 'nk 7/3/2003 18:56'!\rfontPointSizesFor: aName\r\t\"Answer the point sizes for all the fonts in the given text style\"\r\r\t\"TextStyle fontPointSizesFor: 'Arial'\"\r\t\"TextStyle fontPointSizesFor: 'NewYork'\"\r\r\t^ (self fontArrayForStyle: aName) collect: [:f | f pointSize]\r! !\r\r!TextStyle class methodsFor: 'TextConstants access' stamp: 'nk 7/3/2003 19:00'!\rknownTextStyles\r\t\"Answer the names of the known text styles, sorted in alphabetical order\"\r\r\t\"TextStyle knownTextStyles\"\r\t^ (TextConstants select: [:thang | thang isKindOf: TextStyle]) keys asSortedArray\r\r! !\r\r\r!TextStyle class methodsFor: 'class initialization' stamp: 'nk 3/25/2004 17:51'!\rinitialize\r\tself initializeStyleDecoder.! !\r\r!TextStyle class methodsFor: 'class initialization' stamp: 'nk 3/25/2004 17:53'!\rinitializeStyleDecoder\r\tTextConstants at: #StyleDecoder put: nil.\r\tself styleDecoder.! !\r\r!TextStyle class methodsFor: 'class initialization' stamp: 'nk 3/25/2004 17:57'!\rstyleDecoder\r\tTextConstants at: #StyleDecoder ifPresent: [ :dict | dict ifNotNil: [ ^dict ]].\r\t^TextConstants at: #StyleDecoder put: (\r\t\tDictionary new at: 'Regular' put: 0;\r\t\t\t\t at: 'Roman' put: 0;\r\t\t\t\t at: 'Medium' put: 0;\r\t\t\t\t at: 'Light' put: 0;\r\t\t\t\t at: 'Normal' put: 0;\r\t\t\t\t at: 'Plain' put: 0;\r\t\t\t\t at: 'Book' put: 0;\r\t\t\t\t at: 'Demi' put: 0;\r\t\t\t\t at: 'Demibold' put: 0;\r\t\t\t\t at: 'Semibold' put: 0;\r\t\t\t\t at: 'SemiBold' put: 0;\r\t\t\t\t at: 'ExtraBold' put: 1;\r\t\t\t\t at: 'SuperBold' put: 1;\r\t\t\t\t at: 'B' put: 1;\r\t\t\t\t at: 'I' put: 2;\r\t\t\t\t at: 'U' put: 4;\r\t\t\t\t at: 'X' put: 16;\r\t\t\t\t at: 'N' put: 8;\r\t\t\t\t at: 'Bold' put: 1;\r\t\t\t\t at: 'Italic' put: 2;\r\t\t\t\t at: 'Oblique' put: 2;\r\t\t\t\t at: 'Narrow' put: 8;\r\t\t\t\t at: 'Condensed' put: 8;\r\t\t\t\t at: 'Underlined' put: 4;\r\t\t\t\t yourself )! !\r\r\r!TextStyle class methodsFor: 'constants'!\rdefault\r\t\"Answer the system default text style.\"\r\r\t^DefaultTextStyle! !\r\r!TextStyle class methodsFor: 'constants' stamp: 'sw 12/6/1999 12:32'!\rdefaultFont\r\t\"Answer the default system font\"\r\r\t^ DefaultTextStyle defaultFont! !\r\r!TextStyle class methodsFor: 'constants' stamp: 'nk 7/3/2003 19:11'!\rnamed: familyName\r\t\"Answer the TextStyle with the given name, or nil.\"\r\t\"TextStyle named: 'NewYork'\"\r\t| textStyle |\r\ttextStyle _ TextConstants at: familyName ifAbsent: [ ^nil ].\r\t(textStyle isKindOf: self) ifFalse: [ ^nil ].\r\t^textStyle! !\r\r\r!TextStyle class methodsFor: 'instance creation'!\rfontArray: anArray \r\t\"Answer an instance of me with fonts those in the argument, anArray.\"\r\r\t^self new newFontArray: anArray! !\r\r!TextStyle class methodsFor: 'instance creation'!\rnew\r\t^ super new leading: 2! !\r\r\r!TextStyle class methodsFor: 'user interface' stamp: 'dgd 10/8/2003 18:38'!\rfontSizeSummary\r\t\"Open a text window with a simple summary of the available sizes in each of the fonts in the system.\"\r\r\t\"TextStyle fontSizeSummary\"\r\t| aString aList |\r\taList _ self knownTextStyles.\r\taString _ String streamContents:\r\t\t[:aStream |\r\t\t\taList do: [:aStyleName |\r\t\t\t\taStream nextPutAll:\r\t\t\t\t\taStyleName, '  ',\r\t\t\t\t\t(self fontPointSizesFor: aStyleName) asArray storeString.\r\t\t\t\taStream cr]].\r\t(StringHolder new contents: aString)\r\t\topenLabel: 'Font styles and sizes' translated! !\r\r!TextStyle class methodsFor: 'user interface' stamp: 'nk 7/3/2003 19:01'!\rmvcPromptForFont: aPrompt andSendTo: aTarget withSelector: aSelector\r\t\"MVC Only!! prompt for a font and if one is provided, send it to aTarget using a message with selector aSelector.\"\r\t| aMenu aChoice aStyle namesAndSizes aFont |\r\t\"TextStyle mvcPromptForFont: 'Choose system font style' andSendTo: TextStyle withSelector: #setSystemFontTo:\"\r\taMenu _ CustomMenu new.\r\tself actualTextStyles keys do:\r\t\t[:styleName |\r\t\t\taMenu add: styleName action: styleName].\r\taChoice _ aMenu startUpWithCaption: aPrompt.\r\taChoice ifNil: [^ self].\r\taMenu _ CustomMenu new.\r\taStyle _ self named: aChoice.\r\t(namesAndSizes _ aStyle fontNamesWithPointSizes) do:\r\t\t[:aString | aMenu add: aString action: aString].\r\taChoice _ aMenu startUpWithCaption: nil.\r\taChoice ifNil: [^ self].\r\taFont _ aStyle fontAt: (namesAndSizes indexOf: aChoice).\r\taTarget perform: aSelector with: aFont! !\r\r\r!TextStyle class methodsFor: 'utilities' stamp: 'nk 4/2/2004 11:26'!\rpixelsPerInch\r\t\"Answer the nominal resolution of the screen.\"\r\r\t^TextConstants at: #pixelsPerInch ifAbsentPut: [ 96.0 ].! !\r\r!TextStyle class methodsFor: 'utilities' stamp: 'nk 4/2/2004 11:22'!\rpointsToPixels: points\r\t^points * self pixelsPerInch / 72.0! !\rMagnitude subclass: #Time\r\tinstanceVariableNames: 'seconds nanos'\r\tclassVariableNames: ''\r\tpoolDictionaries: 'ChronologyConstants'\r\tcategory: 'Kernel-Chronology'!\r!Time commentStamp: '<historical>' prior: 0!\rThis represents a period of time.!\r\r\r!Time methodsFor: 'ansi protocol' stamp: 'brp 8/23/2003 15:54'!\r< aTime\r\r\t^ self asDuration < aTime asDuration! !\r\r!Time methodsFor: 'ansi protocol' stamp: 'brp 8/23/2003 19:11'!\r= aTime\r\r\t^ [ self ticks = aTime ticks ]\r\t\ton: MessageNotUnderstood do: [false]! !\r\r!Time methodsFor: 'ansi protocol' stamp: 'brp 8/23/2003 19:32'!\rduration\r\r\t^ Duration zero\n! !\r\r!Time methodsFor: 'ansi protocol' stamp: 'brp 8/23/2003 19:11'!\rhash\r\r\t^ self ticks hash\n! !\r\r!Time methodsFor: 'ansi protocol' stamp: 'brp 8/23/2003 19:10'!\rhour\r\r\t^ self hour24\n! !\r\r!Time methodsFor: 'ansi protocol' stamp: 'brp 8/23/2003 19:17'!\rhour24\n\r\r\t^ self asDuration hours\n! !\r\r!Time methodsFor: 'ansi protocol' stamp: 'brp 8/23/2003 22:08'!\rminute\r\r\t^ self asDuration minutes! !\r\r!Time methodsFor: 'ansi protocol' stamp: 'brp 8/23/2003 19:19'!\rsecond\n\r\r\t^ self asDuration seconds! !\r\r\r!Time methodsFor: 'deprecated' stamp: 'brp 8/23/2003 19:03'!\rhours: anInteger\r\r\tself \r\t\tdeprecated: 'Deprecated';\r\t\thours: anInteger minutes: 0 seconds: 0.\r! !\r\r!Time methodsFor: 'deprecated' stamp: 'brp` 8/24/2003 19:27'!\rhours: hourInteger minutes: minInteger seconds: secInteger\r\r\tself \r\t\tdeprecated: 'Deprecated';\r\t\tsetSeconds: (hourInteger * SecondsInHour) + (minInteger * SecondsInMinute) + secInteger.\t\t\r! !\r\r!Time methodsFor: 'deprecated' stamp: 'brp` 8/24/2003 19:28'!\rsetSeconds: secondCount\r\r\tself \r\t\tdeprecated: 'Deprecated'.\r\r\tself ticks: { 0. secondCount. 0 }\r! !\r\r\r!Time methodsFor: 'printing' stamp: 'BP 3/30/2001 15:25'!\rhhmm24\r\n\t\"Return a string of the form 1123 (for 11:23 am), 2154 (for 9:54 pm), of exactly 4 digits\"\r\n\r\n\t^(String streamContents: \r\n\t\t[ :aStream | self print24: true showSeconds: false on: aStream ])\r\n\t\t\tcopyWithout: $:! !\r\r!Time methodsFor: 'printing' stamp: 'BP 3/30/2001 15:25'!\rprint24\r\n\t\"Return as 8-digit string 'hh:mm:ss', with leading zeros if needed\"\r\n\r\n\t^String streamContents:\r\n\t\t[ :aStream | self print24: true on: aStream ]\r\n\r\n! !\r\r!Time methodsFor: 'printing' stamp: 'BP 3/30/2001 15:25'!\rprint24: hr24 on: aStream \r\n\t\"Format is 'hh:mm:ss' or 'h:mm:ss am' \"\r\n\r\n\tself print24: hr24 showSeconds: true on: aStream \r\n! !\r\r!Time methodsFor: 'printing' stamp: 'brp 2/16/2004 09:10'!\rprint24: hr24 showSeconds: showSeconds on: aStream \r\n\t\"Format is 'hh:mm:ss' or 'h:mm:ss am'  or, if showSeconds is false, 'hh:mm' or 'h:mm am'\"\r\n\r\n\t| h m s |\r\n\th _ self hour. m _ self minute. s _ self second.\r\n\thr24\r\t\n\tifTrue: \r\t\t\t[ h < 10 ifTrue: [ aStream nextPutAll: '0' ].\r\t\n\t\th printOn: aStream ]\r\t\n\tifFalse:\r\t\t\t[ h > 12\r\t\t\n\t\tifTrue: [h - 12 printOn: aStream]\r\t\t\n\t\tifFalse: \r\t\t\t\n\t\t[h < 1\r\t\t\n\t\t\t\tifTrue: [ 12 printOn: aStream ]\r\n\t\t\t\t\t\tifFalse: [ h printOn: aStream ]]].\r\n\r\n\taStream nextPutAll: (m < 10 ifTrue: [':0'] ifFalse: [':']).\r\n\tm printOn: aStream.\r\n\r\n\tshowSeconds ifTrue:\r\t\n\t[ aStream nextPutAll: (s < 10 ifTrue: [':0'] ifFalse: [':']).\r\n\t\ts asInteger printOn: aStream ].\r\n\r\n\thr24 ifFalse:\r\t\n\t[ aStream nextPutAll: (h < 12 ifTrue: [' am'] ifFalse: [' pm']) ].\r\n! !\r\r!Time methodsFor: 'printing' stamp: 'brp 8/23/2003 19:14'!\rprintOn: aStream \r\n\r\tself print24: false showSeconds: (self seconds ~= 0) on: aStream! !\r\r!Time methodsFor: 'printing' stamp: 'BP 3/30/2001 15:25'!\rstoreOn: aStream\r\n\r\n\taStream print: self printString; nextPutAll: ' asTime'! !\r\r\r!Time methodsFor: 'smalltalk-80' stamp: 'brp 8/23/2003 19:02'!\raddTime: timeAmount\r\n\t\"Answer a Time that is timeInterval after the receiver. timeInterval is an \r\n\tinstance of Date or Time.\"\r\n\r\n\t^ self class seconds: self asSeconds + timeAmount asSeconds! !\r\r!Time methodsFor: 'smalltalk-80' stamp: 'brp 8/23/2003 15:55'!\rasSeconds\r\n\t\"Answer the number of seconds since midnight of the receiver.\"\r\n\r\n\t^ seconds! !\r\r!Time methodsFor: 'smalltalk-80' stamp: 'brp 7/1/2003 13:29'!\rhours\r\r\t^ self hour! !\r\r!Time methodsFor: 'smalltalk-80' stamp: 'brp 8/23/2003 19:24'!\rintervalString\r\t\"Treat the time as a difference.  Give it in hours and minutes with two digits of accuracy.\"\r\r\t| d |\r\td _ self asDuration.\r\t^ String streamContents: [ :s |\r\t\td hours > 0 ifTrue: [s print: d hours; nextPutAll: ' hours'].\r\t\td minutes > 0 ifTrue: [s space; print: d minutes; nextPutAll: ' minutes'].\r\t\td seconds > 0 ifTrue: [s space; print: d seconds; nextPutAll: ' seconds'] ].\r\r! !\r\r!Time methodsFor: 'smalltalk-80' stamp: 'brp 8/23/2003 22:07'!\rminutes\r\r\t^ self asDuration minutes! !\r\r!Time methodsFor: 'smalltalk-80' stamp: 'brp 7/27/2003 18:18'!\rseconds\r\r\t^ self second! !\r\r!Time methodsFor: 'smalltalk-80' stamp: 'brp 8/23/2003 19:03'!\rsubtractTime: timeAmount \r\t\"Answer a Time that is timeInterval before the receiver. timeInterval is  \r\tan instance of Date or Time.\"\r\r\t^ self class seconds: self asSeconds - timeAmount asSeconds! !\r\r\r!Time methodsFor: 'squeak protocol' stamp: 'brp 8/23/2003 23:58'!\rasDate\r\r\t^ Date today! !\r\r!Time methodsFor: 'squeak protocol' stamp: 'brp 8/23/2003 19:26'!\rasDateAndTime\r\r\t^ DateAndTime today + self! !\r\r!Time methodsFor: 'squeak protocol' stamp: 'brp 8/23/2003 19:01'!\rasDuration\n\r\t\"Answer the duration since midnight\"\r\r\t^ Duration seconds: seconds nanoSeconds: nanos\n! !\r\r!Time methodsFor: 'squeak protocol' stamp: 'brp 8/23/2003 19:29'!\rasMonth\r\r\t^ self asDateAndTime asMonth! !\r\r!Time methodsFor: 'squeak protocol' stamp: 'brp 8/23/2003 19:29'!\rasNanoSeconds\r\t\"Answer the number of nanoseconds since midnight\"\r\r\t^ self asDuration asNanoSeconds\n! !\r\r!Time methodsFor: 'squeak protocol' stamp: 'brp 8/23/2003 19:08'!\rasTime\r\r\t^ self! !\r\r!Time methodsFor: 'squeak protocol' stamp: 'brp 8/23/2003 19:27'!\rasTimeStamp\r\r\t^ self asDateAndTime asTimeStamp! !\r\r!Time methodsFor: 'squeak protocol' stamp: 'brp 8/23/2003 19:43'!\rasYear\r\r\t^ self asDateAndTime asYear! !\r\r!Time methodsFor: 'squeak protocol' stamp: 'brp 8/23/2003 19:33'!\rnanoSecond\n\r\r\t^ nanos\n! !\r\r!Time methodsFor: 'squeak protocol' stamp: 'brp 8/23/2003 19:35'!\rto: anEnd\r\t\"Answer a Timespan. anEnd must respond to #asDateAndTime\"\r\r\t^ self asDateAndTime to: anEnd! !\r\r\r!Time methodsFor: 'private' stamp: 'brp 8/23/2003 22:38'!\rticks\r\t\"Answer an Array: { seconds. nanoSeconds }\"\r\r\t^ Array with: 0 with: seconds with: nanos.! !\r\r!Time methodsFor: 'private' stamp: 'brp 8/23/2003 20:44'!\rticks: anArray\r\t\"ticks is an Array: { days. seconds. nanoSeconds }\"\r\r\tseconds _ anArray second.\r\tnanos _ anArray third.! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rTime class\r\tinstanceVariableNames: ''!\r\r!Time class methodsFor: 'general inquiries' stamp: 'nk 3/8/2004 12:05'!\rmillisecondClockValue\r\t\"Answer the number of milliseconds since the millisecond clock was last reset or rolled over.\r\tAnswer 0 if the primitive fails.\"\r\r\t<primitive: 135>\r\t^ 0! !\r\r\r!Time class methodsFor: 'smalltalk-80' stamp: 'brp 8/23/2003 23:59'!\rdateAndTimeFromSeconds: secondCount\r\n\r\n\t^ Array\r\n\t\twith: (Date fromSeconds: secondCount)\r\n\t\twith: (Time fromSeconds: secondCount \\\\ 86400)\r\n! !\r\r!Time class methodsFor: 'smalltalk-80' stamp: 'brp 8/23/2003 19:50'!\rdateAndTimeNow\r\n\t\"Answer a two-element Array of (Date today, Time now).\"\r\n\r\n\t^ self dateAndTimeFromSeconds: self totalSeconds! !\r\r!Time class methodsFor: 'smalltalk-80' stamp: 'brp 7/27/2003 16:11'!\rfromSeconds: secondCount \r\n\t\"Answer an instance of me that is secondCount number of seconds since midnight.\"\r\n\r\n\t^ self seconds: secondCount\r\n! !\r\r!Time class methodsFor: 'smalltalk-80' stamp: 'brp 7/27/2003 16:11'!\rmillisecondsToRun: timedBlock \r\n\t\"Answer the number of milliseconds timedBlock takes to return its value.\"\r\n\r\n\t| initialMilliseconds |\r\n\tinitialMilliseconds _ self millisecondClockValue.\r\n\ttimedBlock value.\r\n\t^ self millisecondClockValue - initialMilliseconds! !\r\r!Time class methodsFor: 'smalltalk-80' stamp: 'brp 8/23/2003 20:01'!\rnew\r\t\"Answer a Time representing midnight\"\r\r\t^ self midnight! !\r\r!Time class methodsFor: 'smalltalk-80' stamp: 'brp 8/23/2003 22:01'!\rprimSecondsClock\r\t\"Answer the number of seconds since 00:00 on the morning of\r\t January 1, 1901 (a 32-bit unsigned number).\r\t Essential. See Object documentation whatIsAPrimitive. \"\r\r\t<primitive: 137>\r\tself primitiveFailed! !\r\r!Time class methodsFor: 'smalltalk-80' stamp: 'brp 8/23/2003 20:07'!\rreadFrom: aStream\r\n\t\"Read a Time from the stream in the form:\r\n\t\t<hour>:<minute>:<second> <am/pm>\r\n\n\t<minute>, <second> or <am/pm> may be omitted.  e.g. 1:59:30 pm; 8AM; 15:30\"\r\n\r\n\t| hour minute second ampm |\r\n\thour _ Integer readFrom: aStream.\r\n\tminute _ 0.\r\n\tsecond _ 0.\r\n\t(aStream peekFor: $:) ifTrue:\r\t\n\t[ minute _ Integer readFrom: aStream.\r\n\t\t(aStream peekFor: $:) ifTrue: [ second _ Integer readFrom: aStream ]].\r\n\taStream skipSeparators.\r\n\t(aStream atEnd not and: [aStream peek isLetter]) ifTrue: \r\t\t[ampm _ aStream next asLowercase.\r\t\n\t(ampm = $p and: [hour < 12]) ifTrue: [hour _ hour + 12].\r\n\t\t(ampm = $a and: [hour = 12]) ifTrue: [hour _ 0].\r\t\n\t(aStream peekFor: $m) ifFalse: [aStream peekFor: $M ]].\r\r\n\t^ self hour: hour minute: minute second: second\r\n\r\n\t\"Time readFrom: (ReadStream on: '2:23:09 pm')\"\r\n! !\r\r!Time class methodsFor: 'smalltalk-80' stamp: 'brp 7/27/2003 16:12'!\rtotalSeconds\r\n\t\"Answer the total seconds since the Squeck epoch: 1 January 1901.\"\r\n\r\n\t^ self primSecondsClock! !\r\r\r!Time class methodsFor: 'squeak protocol' stamp: 'brp 8/23/2003 19:46'!\rcurrent \r\r\t^ self now! !\r\r!Time class methodsFor: 'squeak protocol' stamp: 'brp 8/23/2003 22:34'!\rfromString: aString\n\r\r\t^ self readFrom: aString readStream\n! !\r\r!Time class methodsFor: 'squeak protocol' stamp: 'brp 8/23/2003 20:05'!\rhour: hour minute: minute second: second\r\t\"Answer a Time\"\r\n\r\n\t^ self hour: hour minute: minute second: second nanoSecond: 0! !\r\r!Time class methodsFor: 'squeak protocol' stamp: 'brp` 8/24/2003 19:26'!\rhour: hour minute: minute second: second  nanoSecond: nanoCount\r\t\"Answer a Time - only second precision for now\"\r\n\r\n\t^ self \r\t\tseconds: (hour * SecondsInHour) + (minute * SecondsInMinute) + second \r\t\tnanoSeconds: nanoCount! !\r\r!Time class methodsFor: 'squeak protocol' stamp: 'brp 8/23/2003 20:01'!\rmidnight\r\r\t^ self seconds: 0\r! !\r\r!Time class methodsFor: 'squeak protocol' stamp: 'brp 8/23/2003 20:47'!\rseconds: seconds\r\n\t\"Answer a Time from midnight\"\r\n\r\t^ self seconds: seconds nanoSeconds: 0! !\r\r!Time class methodsFor: 'squeak protocol' stamp: 'brp 8/23/2003 20:46'!\rseconds: seconds nanoSeconds: nanoCount\r\n\t\"Answer a Time from midnight\"\r\n\r\t^ self basicNew\r\t\tticks: (Duration seconds: seconds nanoSeconds: nanoCount) ticks;\r\t\tyourself\r\n! !\r\r\r!Time class methodsFor: 'ansi protocol' stamp: 'brp 8/23/2003 18:56'!\rnow\r\t\"Answer a Time representing the time right now - this is a 24 hour clock.\"\r\r\t^ self seconds: self totalSeconds \\\\ 86400.\r! !\rMessageSet subclass: #TimeProfileBrowser\r\tinstanceVariableNames: 'selectedClass selectedSelector block tally'\r\tclassVariableNames: 'TextMenu'\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Debugger'!\r!TimeProfileBrowser commentStamp: '<historical>' prior: 0!\rA TimeProfileBrowser is a browser visualizing the runtime profile of an executed Smalltalk block.  It is useful for finding performance bottlenecks in code. When optimizing code it can\rbe hard to know what methods actually constitute the bulk of the execution time. Is it a few\rmethods that take very long time to execute or is it perhaps a single method that gets executed a thousand times?\r\rThe block is first spied on using a MessageTally instance (which has even more funtionality than used by the TimeProfileBrowser) which samples the block during it's execution and collects the amount of time approximately spent in the methods executed. Then the methods are shown in the browser with their relative execution time in percent.\r\rExample:\rTimeProfileBrowser onBlock: [20 timesRepeat:  [Transcript show: 100 factorial printString]]\r!\r\r\r!TimeProfileBrowser methodsFor: 'accessing' stamp: 'stp 05/08/1999 11:37'!\rselectedClass\r\t\"Answer the receiver's 'selectedClass'.\"\r\r\t^selectedClass! !\r\r!TimeProfileBrowser methodsFor: 'accessing' stamp: 'stp 05/08/1999 11:37'!\rselectedClass: anObject\r\t\"Set the receiver's instance variable 'selectedClass' to be anObject.\"\r\r\tselectedClass := anObject! !\r\r!TimeProfileBrowser methodsFor: 'accessing' stamp: 'stp 05/08/1999 11:37'!\rselectedSelector\r\t\"Answer the receiver's 'selectedSelector'.\"\r\r\t^selectedSelector! !\r\r!TimeProfileBrowser methodsFor: 'accessing' stamp: 'stp 05/08/1999 11:37'!\rselectedSelector: anObject\r\t\"Set the receiver's instance variable 'selectedSelector' to be anObject.\"\r\r\tselectedSelector := anObject! !\r\r!TimeProfileBrowser methodsFor: 'accessing' stamp: 'stp 05/08/1999 11:37'!\rtally\r\t\"Answer the receiver's 'tally'.\"\r\r\t^tally! !\r\r\r!TimeProfileBrowser methodsFor: 'private' stamp: 'dvf 7/5/2000 18:48'!\rinitializeMessageList: anArray\r\tmessageList _ anArray.\r\tmessageListIndex _ 0.\r\tcontents _ ''! !\r\r!TimeProfileBrowser methodsFor: 'private' stamp: 'nk 3/8/2004 13:22'!\rmessageListKey: aChar from: view \r\t\"Respond to a Command key. Cmd-D means re-run block.\"\r\r\taChar == $d ifTrue: [^Cursor execute showWhile: [ block value ]].\r\t^super messageListKey: aChar from: view! !\r\r!TimeProfileBrowser methodsFor: 'private' stamp: 'stp 05/08/1999 15:27'!\rmessageListMenu: aMenu shifted: shifted\r\t\"Add a menu to the inherited one.\"\r\r\t| menu |\r\tmenu := super messageListMenu: aMenu shifted: shifted.\r\"\tmenu addItem: (0).\"\r\t^menu! !\r\r!TimeProfileBrowser methodsFor: 'private' stamp: 'rhi 5/17/2004 10:17'!\rsetClassAndSelectorIn: csBlock\r\t\"Decode strings of the form    <selectorName> (<className> [class])  \"\r\r\t| string strm class sel parens |\r\r\tself flag: #mref.\t\"fix for faster references to methods\"\r\r\t[string _ self selection asString.\r\tstring first == $* ifTrue: [^contents := nil].\t\t\"Ignore lines starting with *\"\r\tparens := string includes: $(.\t\t\t\t\t\"Does it have open-paren?\"\r\tstrm := ReadStream on: string.\r\tparens\r\t\tifTrue: [strm skipTo: $(.\t\t\"easy case\"\r\t\t\tclass := strm upTo: $).\r\t\t\tstrm next: 2.\r\t\t\tsel := strm upToEnd]\r\t\tifFalse: [strm position: (string findString: ' class>>').\r\t\t\tstrm position > 0\r\t\t\t\tifFalse: [strm position: (string findLast: [ :ch | ch == $ ])]\r\t\t\t\tifTrue:\r\t\t\t\t\t[ | subString |  \"find the next to last space character\"\r\t\t\t\t\tsubString := strm contents copyFrom: 1 to: (string findLast: [ :ch | ch == $ ]) - 1.\r\t\t\t\t\tstrm position: (subString findLast: [ :ch | ch == $ ])].\r\t\t\"ifFalse: [strm position: (string findLast: [ :ch | ch == $ ]).\"\r\t\t\tclass := strm upTo: $>.\r\t\t\tstrm next.\r\t\t\tsel := strm upToEnd].\r\t^ MessageSet parse: (class, ' ', sel) toClassAndSelector: csBlock]\r\t\ton: Error do: [:ex | ^ contents _ nil]! !\r\r\r!TimeProfileBrowser methodsFor: 'message list' stamp: 'nk 2/20/2001 10:38'!\rselectedMessage\r\t\"Answer the source method for the currently selected message.\"\r\t| source |\r\tself setClassAndSelectorIn: [:class :selector | \r\t\tsource _ class sourceMethodAt: selector ifAbsent: [^ 'Missing'].\r\t\tPreferences browseWithPrettyPrint ifTrue:\r\t\t\t[source _ class compilerClass new\r\t\t\t\tformat: source in: class notifying: nil decorated: false].\r\t\tself selectedClass: class.\r\t\tself selectedSelector: selector.\r\t\t^ source asText makeSelectorBoldIn: class].\r\t^''! !\rDateAndTime subclass: #TimeStamp\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Chronology'!\r!TimeStamp commentStamp: '<historical>' prior: 0!\rThis represents a duration of 0 length that marks a particular point in time.!\r\r\r!TimeStamp methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 17:13'!\rasTimeStamp\r\t\"Answer the receiver as an instance of TimeStamp.\"\r\r\t^ self! !\r\r!TimeStamp methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 17:14'!\rdate\r\t\"Answer the date of the receiver.\"\r\r\t^ self asDate! !\r\r!TimeStamp methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 17:17'!\rprintOn: aStream \r\t\"Print receiver's date and time on aStream.\"\r\r\taStream \r\t\tnextPutAll: self date printString;\r\t\tspace;\r\t\tnextPutAll: self time printString.! !\r\r!TimeStamp methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 17:17'!\rstoreOn: aStream \r\r\taStream \r\t\tprint: self printString;\r\t\tnextPutAll: ' asTimeStamp'! !\r\r!TimeStamp methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 17:15'!\rtime\r\t\"Answer the time of the receiver.\"\r\r\t^ self asTime! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rTimeStamp class\r\tinstanceVariableNames: ''!\r\r!TimeStamp class methodsFor: '*monticello-instance creation' stamp: 'cbc 2/4/2004 21:30'!\rfromString: aString\r\t\"Answer a new instance for the value given by aString.\r\r\t TimeStamp fromString: '1-10-2000 11:55:00 am'. \r\t\"\r\r\t^self readFrom: (ReadStream on: aString).! !\r\r!TimeStamp class methodsFor: '*monticello-instance creation' stamp: 'cbc 2/4/2004 21:17'!\rreadFrom: stream\r\t| date time |\r\tstream skipSeparators.\r\tdate _ Date readFrom: stream.\r\tstream peek = $, ifTrue: [stream next].\r\tstream skipSeparators.\r\ttime _ Time readFrom: stream.\r\t^self \r\t\tdate: date\r\t\ttime: time! !\r\r\r!TimeStamp class methodsFor: 'squeak protocol' stamp: 'brp 3/12/2004 15:49'!\rcurrent\r\r\t^ self now\r\t\t\r! !\r\r\r!TimeStamp class methodsFor: 'ansi protocol' stamp: 'brp 3/12/2004 15:52'!\rnow\r\r\t| ts ticks |\r\tts _ super now.\r\t\r\tticks _ ts ticks.\r\tticks at: 3 put: 0.\r\tts ticks: ticks offset: ts offset.\r\t\r\t^ ts! !\rObject subclass: #TimeZone\r\tinstanceVariableNames: 'offset abbreviation name'\r\tclassVariableNames: ''\r\tpoolDictionaries: 'ChronologyConstants'\r\tcategory: 'Kernel-Chronology'!\r!TimeZone commentStamp: 'brp 9/4/2003 06:32' prior: 0!\rTimeZone is a simple class to colect the information identifying a UTC time zone.\r\n\r\noffset\t\t\t-\tDuration\t- the time zone's offset from UTC\r\nabbreviation\t-\tString\t\t- the abbreviated name for the time zone.\r\nname\t\t\t-\tString\t\t- the name of the time zone.\r\n\r\nTimeZone class >> #timeZones returns an array of the known time zones\r\nTimeZone class >> #default returns the default time zone (Grenwich Mean Time)!\r\r\r!TimeZone methodsFor: 'accessing' stamp: 'brp 9/4/2003 06:28'!\rabbreviation\r\n\r\n\t^ abbreviation\r\n! !\r\r!TimeZone methodsFor: 'accessing' stamp: 'brp 9/4/2003 06:28'!\rabbreviation: aString\r\n\r\n\tabbreviation _ aString\r\n! !\r\r!TimeZone methodsFor: 'accessing' stamp: 'brp 9/4/2003 06:29'!\rname\r\n\r\n\t^ name\r\n! !\r\r!TimeZone methodsFor: 'accessing' stamp: 'brp 9/4/2003 06:28'!\rname: aString\r\n\r\n\tname _ aString\r\n! !\r\r!TimeZone methodsFor: 'accessing' stamp: 'brp 9/4/2003 06:28'!\roffset\r\n\r\n\t^ offset! !\r\r!TimeZone methodsFor: 'accessing' stamp: 'brp 9/4/2003 06:28'!\roffset: aDuration\r\n\r\n\toffset _ aDuration! !\r\r\r!TimeZone methodsFor: 'private' stamp: 'brp 9/4/2003 06:37'!\rprintOn: aStream\r\n\r\n\tsuper printOn: aStream.\r\n\taStream\r\n\t\tnextPut: $(;\r\n\t\tnextPutAll: self abbreviation;\r\n\t\tnextPut: $).! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rTimeZone class\r\tinstanceVariableNames: ''!\r\r!TimeZone class methodsFor: 'accessing' stamp: 'brp 9/4/2003 06:38'!\rdefault\r\n\t\"Answer the default time zone - GMT\"\r\n\r\n\t^ self timeZones detect: [ :tz | tz offset = Duration zero ]\r\n! !\r\r!TimeZone class methodsFor: 'accessing' stamp: 'nk 3/30/2004 10:21'!\rtimeZones\r\r\t^ {\r\t\tself offset:  0 hours name: 'Universal Time' abbreviation: 'UTC'.\r\t\tself offset:  0 hours name: 'Greenwich Mean Time' abbreviation: 'GMT'.\r\t\tself offset:  0 hours name: 'British Summer Time' abbreviation: 'BST'.\r\t\tself offset:  2 hours name: 'South African Standard Time' abbreviation: 'SAST'.\r\t\tself offset: -8 hours name: 'Pacific Standard Time' abbreviation: 'PST'.\r\t\tself offset: -7 hours name: 'Pacific Daylight Time' abbreviation: 'PDT'.\r\t}\r\r! !\r\r\r!TimeZone class methodsFor: 'instance creation' stamp: 'brp 9/4/2003 06:33'!\roffset: aDuration name: aName abbreviation: anAbbreviation\r\n\r\n\t^ self new\r\n\t\toffset: aDuration;\r\n\t\tname: aName;\r\n\t\tabbreviation: anAbbreviation;\r\n\t\tyourself! !\rMagnitude subclass: #Timespan\r\tinstanceVariableNames: 'start duration'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Chronology'!\r!Timespan commentStamp: 'brp 5/13/2003 08:07' prior: 0!\rI represent a duration starting on a specific DateAndTime.\n!\r\r\r!Timespan methodsFor: 'ansi protocol' stamp: 'brp 9/15/2003 14:05'!\r+ operand\r\t\"operand conforms to protocol Duration\"\n\t\r\r\t^ self class starting: (self start + operand) duration: self duration\r! !\r\r!Timespan methodsFor: 'ansi protocol' stamp: 'brp 9/15/2003 14:07'!\r- operand\r\t\"operand conforms to protocol DateAndTime or protocol Duration\"\r\r\t^ (operand respondsTo: #asDateAndTime)\n\r\t \tifTrue: [ self start - operand ]\r\t\n\tifFalse: [ self + (operand negated) ].\n! !\r\r!Timespan methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 08:43'!\r< comparand\r\r\t^ self start < comparand\t\n! !\r\r!Timespan methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 08:43'!\r= comparand\r\r\t^ (self start = comparand start) and: [self duration = comparand duration]\n! !\r\r!Timespan methodsFor: 'ansi protocol' stamp: 'brp 7/27/2003 17:49'!\rdayOfMonth\r\t\"Answer the day of the month represented by the receiver.\"\r\r\t^ start dayOfMonth! !\r\r!Timespan methodsFor: 'ansi protocol' stamp: 'brp 8/6/2003 18:42'!\rdayOfWeek\r\t\"Answer the day of the week represented by the receiver.\"\r\r\t^ start dayOfWeek! !\r\r!Timespan methodsFor: 'ansi protocol' stamp: 'brp 8/6/2003 18:42'!\rdayOfWeekName\r\t\"Answer the day of the week represented by the receiver.\"\r\r\t^ start dayOfWeekName! !\r\r!Timespan methodsFor: 'ansi protocol' stamp: 'brp 8/24/2003 11:50'!\rdayOfYear\r\t\"Answer the day of the year represented by the receiver.\"\r\r\t^ start dayOfYear! !\r\r!Timespan methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 08:44'!\rhash\r\r\t^ start hash + duration hash\n! !\r\r!Timespan methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 08:44'!\risLeapYear\r\r\t^ start isLeapYear\n! !\r\r!Timespan methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 08:44'!\rmonth\r\r\t^ start month\n! !\r\r!Timespan methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 08:44'!\rmonthName\n\r\r\t^ start monthName\n! !\r\r!Timespan methodsFor: 'ansi protocol' stamp: 'brp 5/13/2003 08:44'!\ryear\n\r\r\t^ start year\n! !\r\r\r!Timespan methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 08:44'!\rasDate\n\r\r\t^ start asDate\n! !\r\r!Timespan methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 08:44'!\rasDateAndTime\r\r\t^ start\n! !\r\r!Timespan methodsFor: 'squeak protocol' stamp: 'brp 5/30/2003 00:10'!\rasDuration\r\r\t^ self duration! !\r\r!Timespan methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 08:45'!\rasMonth\n\r\r\t^ start asMonth\n! !\r\r!Timespan methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 17:45'!\rasTime\r\r\t^ start asTime! !\r\r!Timespan methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 17:25'!\rasTimeStamp\r\r\t^ start asTimeStamp! !\r\r!Timespan methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 17:45'!\rasYear\n\r\r\t^ start asYear! !\r\r!Timespan methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 08:45'!\rduration\r\n\t\"Answer the Duration of this timespan\"\r\r\t^ duration\n! !\r\r!Timespan methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 08:45'!\rend\n\r\r\t^ self next start - DateAndTime clockPrecision \n! !\r\r!Timespan methodsFor: 'squeak protocol' stamp: 'brp 1/7/2004 16:05'!\rincludes: aDateAndTime\n\r\r\t^ (aDateAndTime isKindOf: Timespan)\r\t\t\tifTrue: [ (self includes: aDateAndTime start)\r\t\t\t\t\t\tand: [ self includes: aDateAndTime end ] ]\r\t\t\tifFalse: [ aDateAndTime asDateAndTime between: start and: self end ]\r! !\r\r!Timespan methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 17:54'!\rincludesAllOf: aCollection \r\t\"Answer whether all the elements of aCollection are in the receiver.\"\r\r\taCollection do: [:elem | (self includes: elem) ifFalse: [^ false]].\r\t^ true\r! !\r\r!Timespan methodsFor: 'squeak protocol' stamp: 'brp 1/7/2004 15:59'!\rincludesAnyOf: aCollection \r\t\"Answer whether any element of aCollection is included in the receiver\"\r\r\taCollection do: [ :elem | (self includes: elem) ifTrue: [^ true]].\r\t^false\r! !\r\r!Timespan methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 17:47'!\rintersection: aTimespan\n\r\t \"Return the Timespan both have in common, or nil\"\r\r\t | aBegin anEnd |\r\n\t aBegin _ self start max: aTimespan start.\r\n\t anEnd _ self end min: aTimespan end.\r\n\t anEnd < aBegin ifTrue: [^nil].\r\r\n\t ^ self class starting: aBegin ending: anEnd.\n! !\r\r!Timespan methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 08:47'!\rjulianDayNumber\n\r\r\t^ start julianDayNumber\n! !\r\r!Timespan methodsFor: 'squeak protocol' stamp: 'brp 9/25/2003 09:17'!\rprintOn: aStream\n\r\r\tsuper printOn: aStream.\r\taStream \r\t\tnextPut: $(;\r\t\tprint: start;\r\t\tnextPut: $D;\r\t\tprint: duration;\r\t\tnextPut: $).\r! !\r\r!Timespan methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 08:48'!\rstart\r\n\t\"Answer the start DateAndTime of this timespan\"\r\r\t^ start\n! !\r\r!Timespan methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 08:48'!\rstart: aDateAndTime\r\t\"Store the start DateAndTime of this timespan\"\r\r\tstart _ aDateAndTime asDateAndTime\n! !\r\r!Timespan methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 08:49'!\rto: anEnd\r\t\"Answer an Timespan. anEnd must be aDateAndTime or a Timespan\"\n\r\r\t^ Timespan starting: (self start) ending: (anEnd asDateAndTime).\n! !\r\r!Timespan methodsFor: 'squeak protocol' stamp: 'brp 1/9/2004 16:46'!\runion: aTimespan\r\n\t \"Return the Timespan spanned by both\"\r\r\t| aBegin anEnd |\n\r\taBegin _ self start min: aTimespan start.\r\tanEnd _ self end max: aTimespan end.\r\t^ Timespan starting: aBegin ending: (anEnd + DateAndTime clockPrecision).\n! !\r\r\r!Timespan methodsFor: 'enumerating' stamp: 'brp 5/13/2003 08:49'!\rdatesDo: aBlock\n\r\r\tself do: aBlock with: start asDate.\n! !\r\r\r!Timespan methodsFor: 'private' stamp: 'brp 5/13/2003 08:58'!\rdo: aBlock with: aFirstElement\r\r\n\tself do: aBlock with: aFirstElement when: [ :t | true ].\n! !\r\r!Timespan methodsFor: 'private' stamp: 'brp 5/13/2003 08:59'!\rdo: aBlock with: aFirstElement when: aConditionBlock\r\r\t| element end |\r\telement _ aFirstElement.\r\tend _ self end.\r\n\t[ element start <= end ] whileTrue:\r\t\n\t[(aConditionBlock value: element)\r\t\t\tifTrue: [ aBlock value: element ].\r\t\telement _ element next. ]! !\r\r!Timespan methodsFor: 'private' stamp: 'brp 5/13/2003 08:59'!\rduration: aDuration\r\t\"Set the Duration of this timespan\"\r\r\n\tduration _ aDuration\n! !\r\r\r!Timespan methodsFor: 'smalltalk-80' stamp: 'brp 7/1/2003 14:09'!\rday\r\t\"Answer the day of the year represented by the receiver.\"\r\t^ self dayOfYear! !\r\r!Timespan methodsFor: 'smalltalk-80' stamp: 'brp 5/13/2003 08:45'!\rdaysInMonth\n\r\r\t^ start daysInMonth\n! !\r\r!Timespan methodsFor: 'smalltalk-80' stamp: 'brp 5/13/2003 08:45'!\rdaysInYear\r\n\t\"Answer the number of days in the month represented by the receiver.\"\r\r\t^ start daysInYear\n! !\r\r!Timespan methodsFor: 'smalltalk-80' stamp: 'brp 7/1/2003 17:50'!\rdaysLeftInYear\r\t^ start daysLeftInYear! !\r\r!Timespan methodsFor: 'smalltalk-80' stamp: 'brp 7/1/2003 17:55'!\rfirstDayOfMonth\r\r\t^ start firstDayOfMonth! !\r\r!Timespan methodsFor: 'smalltalk-80' stamp: 'brp 5/13/2003 08:47'!\rmonthIndex\r\r\t^ self month\n! !\r\r!Timespan methodsFor: 'smalltalk-80' stamp: 'brp 5/13/2003 08:47'!\rnext\r\r\t^ self class starting: (start + duration) duration: duration\n! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rTimespan class\r\tinstanceVariableNames: ''!\r\r!Timespan class methodsFor: 'squeak protocol' stamp: 'brp 5/21/2003 08:35'!\rcurrent\n\r\r\t^ self starting: DateAndTime now\n! !\r\r!Timespan class methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 18:49'!\rnew\r\t\"Answer a Timespan starting on the Squeak epoch: 1 January 1901\"\r\r\t^ self starting: DateAndTime new\r! !\r\r!Timespan class methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 08:42'!\rstarting: aDateAndTime\n\r\r\t^ self starting: aDateAndTime duration: Duration zero\n! !\r\r!Timespan class methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 18:48'!\rstarting: aDateAndTime duration: aDuration\r\r\t^ self basicNew\r\n \t\tstart: aDateAndTime asDateAndTime;\r\n\t\tduration: aDuration;\r\t\tyourself.! !\r\r!Timespan class methodsFor: 'squeak protocol' stamp: 'brp 7/27/2003 16:16'!\rstarting: startDateAndTime ending: endDateAndTime\r\r\t^ self \r\t\tstarting: startDateAndTime \r\t\tduration: (endDateAndTime asDateAndTime - startDateAndTime).\n! !\rWriteStream subclass: #TranscriptStream\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'AccessSema'\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Streams'!\r!TranscriptStream commentStamp: '<historical>' prior: 0!\rThis class is a much simpler implementation of Transcript protocol that supports multiple views and very simple conversion to morphic.  Because it inherits from Stream, it is automatically compatible with code that is designe to write to streams.!\r\r\r!TranscriptStream methodsFor: 'initialization' stamp: 'BG 10/29/2003 08:05'!\ropen\r\t| openCount |\r\topenCount _ 0.\r\tself dependents do:\r\t\t[:d | ((d isKindOf: PluggableTextView) ) ifTrue: [openCount _ openCount + 1]].\r\topenCount = 0\r\t\tifTrue: [self openLabel: 'Transcript']\r\t\tifFalse: [self openLabel: 'Transcript #' , (openCount+1) printString]! !\r\r!TranscriptStream methodsFor: 'initialization' stamp: 'ssa 9/3/2008 11:13'!\ropenLabel: aString \r\t\"Open a window on this transcriptStream\"\r\r\t| topView codeView |\r\r\ttopView _ (StandardSystemView new) model: self.\r\ttopView borderWidth: 1.\r\ttopView label: aString.\r\ttopView minimumSize: 100 @ 50.\r\r\tcodeView _ PluggableTextView on: self text: nil accept: nil\r\t\t\t\t\treadSelection: nil menu: #codePaneMenu:shifted:.\r\tcodeView window: (0@0 extent: 200@200).\r\ttopView addSubView: codeView.\r\ttopView controller open! !\r\r\r!TranscriptStream methodsFor: 'access' stamp: 'di 3/16/1999 21:38'!\rcharacterLimit\r\t\"Tell the views how much to retain on screen\"\r\t^ 20000! !\r\r\r!TranscriptStream methodsFor: 'stream extensions' stamp: 'sma 3/15/2000 21:28'!\rbs\r\tself position > 0 ifTrue: [^ self skip: -1].\r\tself changed: #bs! !\r\r!TranscriptStream methodsFor: 'stream extensions' stamp: 'di 5/8/1998 12:35'!\rclear\r\t\"Clear all characters and redisplay the view\"\r\tself changed: #clearText.\r\tself reset! !\r\r!TranscriptStream methodsFor: 'stream extensions' stamp: 'mir 1/11/2000 11:41'!\rendEntry\r\t\"Display all the characters since the last endEntry, and reset the stream\"\r\tself semaphore critical:[\r\t\tself changed: #appendEntry.\r\t\tself reset.\r\t].! !\r\r!TranscriptStream methodsFor: 'stream extensions' stamp: 'sma 4/22/2000 16:58'!\rflush\r\tself endEntry! !\r\r!TranscriptStream methodsFor: 'stream extensions' stamp: 'di 5/8/1998 12:35'!\rpastEndPut: anObject\r\t\"If the stream reaches its limit, just output the contents and reset.\"\r\tself endEntry.\r\t^ self nextPut: anObject! !\r\r!TranscriptStream methodsFor: 'stream extensions' stamp: 'sma 2/26/2000 19:31'!\rshow: anObject  \"TextCollector compatibility\"\r\tself nextPutAll: anObject asString; endEntry! !\r\r\r!TranscriptStream methodsFor: 'model protocol' stamp: 'di 5/27/1998 16:44'!\rcodePaneMenu: aMenu shifted: shifted\r\t\"Note that unless we override perform:orSendTo:, PluggableTextController will respond to all menu items\"\r\t^ StringHolder basicNew codePaneMenu: aMenu shifted: shifted\r! !\r\r!TranscriptStream methodsFor: 'model protocol' stamp: 'di 5/29/1998 17:13'!\rperform: selector orSendTo: otherTarget\r\t\"Selector was just chosen from a menu by a user.  If can respond, then\rperform it on myself. If not, send it to otherTarget, presumably the\reditPane from which the menu was invoked.\"\r\r\t(self respondsTo: selector)\r\t\tifTrue: [^ self perform: selector]\r\t\tifFalse: [^ otherTarget perform: selector]! !\r\r!TranscriptStream methodsFor: 'model protocol' stamp: 'di 5/3/1999 22:49'!\rrelease\r\r\tself dependents do:\r\t\t[:view | (view isMorph and: [view isInWorld not])\r\t\t\t\t\tifTrue: [self removeDependent: view]]! !\r\r!TranscriptStream methodsFor: 'model protocol' stamp: 'sw 3/2/2001 10:18'!\rstep\r\t\"Objects that may be models of SystemWindows need to respond to this, albeit vacuously\"! !\r\r\r!TranscriptStream methodsFor: 'private' stamp: 'mir 1/11/2000 11:41'!\rsemaphore\r\t^AccessSema ifNil:[AccessSema _ Semaphore forMutualExclusion]! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rTranscriptStream class\r\tinstanceVariableNames: ''!\r\r!TranscriptStream class methodsFor: 'as yet unclassified' stamp: 'di 5/8/1998 13:51'!\rnew\r\t^ self on: (String new: 1000)\r\"\rINSTALLING:\rTextCollector allInstances do:\r\t[:t | t breakDependents.\r\tt become: TranscriptStream new].\r\rTESTING: (Execute this text in a workspace)\rDo this first...\r\ttt _ TranscriptStream new.\r\ttt openLabel: 'Transcript test 1'.\rThen this will open a second view -- ooooh...\r\ttt openLabel: 'Transcript test 2'.\rAnd finally make them do something...\r\ttt clear.\r\t[Sensor anyButtonPressed] whileFalse:\r\t\t[1 to: 20 do: [:i | tt print: (2 raisedTo: i-1); cr; endEntry]].\r\"! !\r\r!TranscriptStream class methodsFor: 'as yet unclassified' stamp: 'di 5/8/1998 12:44'!\rnewTranscript: aTextCollector \r\t\"Store aTextCollector as the value of the system global Transcript.\"\r\tSmalltalk at: #Transcript put: aTextCollector! !\r\r\r\r!TranscriptStream class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 12:05'!\rinitialize\r\r\tself registerInFlapsRegistry.\t! !\r\r!TranscriptStream class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 12:06'!\rregisterInFlapsRegistry\r\t\"Register the receiver in the system's flaps registry\"\r\tself environment\r\t\tat: #Flaps\r\t\tifPresent: [:cl | cl registerQuad: #(TranscriptStream\t\topenMorphicTranscript\t'Transcript'\t\t\t'A Transcript is a window usable for logging and debugging; browse references to #Transcript for examples of how to write to it.')\r\t\t\t\t\t\tforFlapNamed: 'Tools']\r! !\r\r!TranscriptStream class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 12:41'!\runload\r\t\"Unload the receiver from global registries\"\r\r\tself environment at: #Flaps ifPresent: [:cl |\r\tcl unregisterQuadsWithReceiver: self] ! !\rReadWriteStream subclass: #Transcripter\r\tinstanceVariableNames: 'frame para'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Streams'!\r!Transcripter commentStamp: '<historical>' prior: 0!\rTranscripter is a dog-simple scrolling stream with display.  It is intended to operate with no support from MVC or color in a minimal, or headless version of Squeak.  No attention has been paid to appearance or performance.!\r\r\r!Transcripter methodsFor: 'initialization' stamp: 'di 8/14/97 12:44'!\rinitInFrame: rect\r\tframe _ rect insetBy: 2.  \"Leave room for border\"\r\tpara _ Paragraph withText: self contents asText\r\t\t\t\tstyle: TextStyle default\r\t\t\t\tcompositionRectangle: ((frame insetBy: 4) withHeight: 9999)\r\t\t\t\tclippingRectangle: frame\r\t\t\t\tforeColor: self black backColor: self white! !\r\r\r!Transcripter methodsFor: 'accessing' stamp: 'di 8/14/97 12:41'!\rclear\r\tDisplay fill: (frame insetBy: -2) fillColor: self black;\r\t\t\tfill: frame fillColor: self white.\r\tself on: (String new: 100); endEntry! !\r\r!Transcripter methodsFor: 'accessing' stamp: 'di 8/14/97 12:44'!\rendEntry\r\t| c d cb |\r\tc _ self contents.\r\tDisplay extent ~= DisplayScreen actualScreenSize ifTrue:\r\t\t[\"Handle case of user resizing physical window\"\r\t\tDisplayScreen startUp.\r\t\tframe _ frame intersect: Display boundingBox.\r\t\t^ self clear; show: c].\r\tpara setWithText: c asText\r\t\tstyle: TextStyle default\r\t\tcompositionRectangle: ((frame insetBy: 4) withHeight: 9999)\r\t\tclippingRectangle: frame\r\t\tforeColor: self black backColor: self white.\r\td _ para compositionRectangle bottom - frame bottom.\r\td > 0 ifTrue:\r\t\t[\"Scroll up to keep all contents visible\"\r\t\tcb _ para characterBlockAtPoint: para compositionRectangle topLeft\r\t\t\t\t\t\t\t\t\t\t\t+ (0@(d+para lineGrid)).\r\t\tself on: (c copyFrom: cb stringIndex to: c size).\r\t\treadLimit_ position_ collection size.\r\t\t^ self endEntry].\r\tpara display! !\r\r!Transcripter methodsFor: 'accessing' stamp: 'sma 2/26/2000 19:35'!\rshow: anObject\r\tself nextPutAll: anObject asString; endEntry! !\r\r\r!Transcripter methodsFor: 'command line' stamp: 'di 8/12/97 22:11'!\rconfirm: queryString \r\t| choice |\r\t[true]\r\t\twhileTrue: \r\t\t\t[choice _ self request: queryString , '\rPlease type yes or no followed by return'.\r\t\t\tchoice first asUppercase = $Y ifTrue: [^ true].\r\t\t\tchoice first asUppercase = $N ifTrue: [^ false]]! !\r\r!Transcripter methodsFor: 'command line' stamp: 'di 11/3/2000 18:52'!\rreadEvalPrint\r\t| line okToRevert |\r\tokToRevert _ true.\r\t[#('quit' 'exit' 'done' ) includes: (line _ self request: '>')]\r\t\twhileFalse:\r\t\t[line = 'revert'\r\t\tifTrue: [okToRevert\r\t\t\tifTrue: [Utilities revertLastMethodSubmission.\r\t\t\t\t\tself cr; show: 'reverted: ' , Utilities mostRecentlySubmittedMessage.\r\t\t\t\t\tokToRevert _ false]\r\t\t\tifFalse: [self cr; show: 'Only one level of revert currently supported']]\r\t\tifFalse: [self cr; show: ([Compiler evaluate: line] ifError: [:err :ex | err])]]! !\r\r!Transcripter methodsFor: 'command line' stamp: 'sma 2/26/2000 19:39'!\rrequest: prompt\r\t| startPos char contents | \r\tself cr; show: prompt.\r\tstartPos _ position.\r\t[[Sensor keyboardPressed] whileFalse.\r\t(char _ Sensor keyboard) = Character cr]\r\t\twhileFalse:\r\t\t[char = Character backspace\r\t\t\tifTrue: [readLimit _ position _ (position - 1 max: startPos)]\r\t\t\tifFalse: [self nextPut: char].\r\t\tself endEntry].\r\tcontents _ self contents.\r\t^ contents copyFrom: startPos + 1 to: contents size! !\r\r\r!Transcripter methodsFor: 'private' stamp: 'di 8/14/97 12:12'!\rblack\r\tDisplay depth = 1 ifTrue: [^ Bitmap with: 16rFFFFFFFF \"Works without color support\"].\r\t^ Color black! !\r\r!Transcripter methodsFor: 'private' stamp: 'di 8/14/97 12:12'!\rwhite\r\tDisplay depth = 1 ifTrue: [^ Bitmap with: 0 \"Works without color support\"].\r\t^ Color white! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rTranscripter class\r\tinstanceVariableNames: ''!\r\r!Transcripter class methodsFor: 'instance creation' stamp: 'di 8/14/97 12:09'!\rnewInFrame: frame\r\"\r(Transcripter newInFrame: (0@0 extent: 100@200))\r\tnextPutAll: 'Hello there'; endEntry;\r\tcr; print: 355.0/113; endEntry;\r\treadEvalPrint.\r\"\r\t| transcript |\r\ttranscript _ self on: (String new: 100).\r\ttranscript initInFrame: frame.\r\t^ transcript clear! !\r\r\r!Transcripter class methodsFor: 'utilities' stamp: 'di 11/3/2000 18:47'!\remergencyEvaluator\r\t(Transcripter newInFrame: (0@0 corner: 320@200))\r\t\tshow: 'Type ''revert'' to revert your last method change.\rType ''exit'' to exit the emergency evaluator.';\r\t\treadEvalPrint! !\rArrayedCollection variableSubclass: #TranslatedMethod\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Methods'!\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rTranslatedMethod class\r\tinstanceVariableNames: ''!\r\r!TranslatedMethod class methodsFor: 'class initialization' stamp: 'ikp 1/10/98 02:34'!\rinitialize\r\tself becomeCompact.\r\tSmalltalk recreateSpecialObjectsArray.\r\tSmalltalk specialObjectsArray size = 41\r\t\tifFalse: [self error: 'Please check size of special objects array!!']! !\rColor subclass: #TranslucentColor\r\tinstanceVariableNames: 'alpha'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Graphics-Primitives'!\r!TranslucentColor commentStamp: '<historical>' prior: 0!\rA TranslucentColor behaves just like a normal color, except that it will pack its alpha value into the high byte of a 32-bit pixelValue.  This allows creating forms with translucency for use with the alpha blend function of BitBlt.  An alpha of zero is transparent, and 1.0 is opaque.!\r\r\r!TranslucentColor methodsFor: 'accessing'!\ralpha\r\t\"Return my alpha value, a number between 0.0 and 1.0 where 0.0 is completely transparent and 1.0 is completely opaque.\"\r\r\t^ alpha asFloat / 255.0\r! !\r\r\r!TranslucentColor methodsFor: 'equality'!\rhash\r\r\t^ rgb bitXor: alpha\r! !\r\r\r!TranslucentColor methodsFor: 'printing' stamp: 'mir 7/21/1999 11:43'!\rstoreArrayValuesOn: aStream\r\r\tself isTransparent ifTrue: [\r\t\t^ aStream space].\r\tsuper storeArrayValuesOn: aStream.\r\r\taStream space.\r\t(self alpha roundTo: 0.001) storeOn: aStream.\r\r! !\r\r!TranslucentColor methodsFor: 'printing' stamp: 'di 9/27/2000 13:33'!\rstoreOn: aStream\r\r\tself isTransparent ifTrue: [^ aStream nextPutAll: '(Color transparent)'].\r\tsuper storeOn: aStream.\r\taStream\r\t\tskip: -1;\t  \"get rid of trailing )\"\r\t\tnextPutAll: ' alpha: ';\r\t\tprint: (self alpha roundTo: 0.001);\r\t\tnextPutAll: ')'.\r! !\r\r\r!TranslucentColor methodsFor: 'conversions' stamp: 'di 1/15/1999 11:44'!\ralpha: alphaValue\r\talphaValue = 1.0 ifTrue:\r\t\t[^ Color basicNew\r\t\t\tsetPrivateRed: self privateRed\r\t\t\tgreen: self privateGreen\r\t\t\tblue: self privateBlue].\r\t^ super alpha: alphaValue! !\r\r!TranslucentColor methodsFor: 'conversions' stamp: 'sw 10/27/1999 10:51'!\rasNontranslucentColor\r\t^ self alpha: 1.0! !\r\r!TranslucentColor methodsFor: 'conversions' stamp: 'di 3/25/2000 17:56'!\rbalancedPatternForDepth: depth\r\t\"Return an appropriate bit pattern or stipple.  This will almost never be meaningful for tranlucentColors, except for the degenerate case of tranparency.\"\r\r\talpha = 0 ifTrue: [^ Bitmap with: 0].\r\t^ super balancedPatternForDepth: depth! !\r\r!TranslucentColor methodsFor: 'conversions' stamp: 'di 1/14/1999 20:05'!\rbitPatternForDepth: depth\r\t\"Return an appropriate bit pattern or stipple.  This will almost never be meaningful for tranlucentColors, except for the degenerate case of tranparency.\"\r\r\talpha = 0 ifTrue: [^ Bitmap with: 0].\r\t^ super bitPatternForDepth: depth! !\r\r!TranslucentColor methodsFor: 'conversions' stamp: 'ar 5/27/2001 16:30'!\rpixelValueForDepth: d\r\t\"Return the pixel value for this color at the given depth. Translucency only works in RGB; this color will appear either opaque or transparent at all other depths.\"\r\t| basicPixelWord |\r\talpha = 0 ifTrue: [^ 0].\r\tbasicPixelWord _ super pixelValueForDepth: d.\r\td < 32\r\t\tifTrue: [^ basicPixelWord]\r\t\tifFalse: [^ (basicPixelWord bitAnd: 16rFFFFFF) bitOr: (alpha bitShift: 24)].\r! !\r\r!TranslucentColor methodsFor: 'conversions' stamp: 'di 1/6/1999 16:14'!\rpixelWordForDepth: depth\r\t\"Return the pixel value for this color at the given depth. Translucency only works in RGB; this color will appear either opaque or transparent at all other depths.\"\r\r\t| basicPixelWord |\r\talpha = 0 ifTrue: [^ 0].\r\tbasicPixelWord _ super pixelWordForDepth: depth.\r\tdepth < 32\r\t\tifTrue: [^ basicPixelWord]\r\t\tifFalse: [^ (basicPixelWord bitAnd: 16rFFFFFF) bitOr: (alpha bitShift: 24)].\r! !\r\r!TranslucentColor methodsFor: 'conversions' stamp: 'ar 1/14/1999 15:30'!\rscaledPixelValue32\r\t\"Return the alpha scaled pixel value for depth 32\"\r\t| pv32 a b g r |\r\tpv32 _ super scaledPixelValue32.\r\ta _ (self alpha * 255.0) rounded.\r\tb _ (pv32 bitAnd: 255) * a // 256.\r\tg _ ((pv32 bitShift: -8) bitAnd: 255) * a // 256.\r\tr _ ((pv32 bitShift: -16) bitAnd: 255) * a // 256.\r\t^b + (g bitShift: 8) + (r bitShift: 16) + (a bitShift: 24)! !\r\r\r!TranslucentColor methodsFor: 'private'!\rprivateAlpha\r\t\"Return my raw alpha value, an integer in the range 0..255. Used for fast equality testing.\"\r\r\t^ alpha\r! !\r\r!TranslucentColor methodsFor: 'private'!\rsetRgb: rgbValue alpha: alphaValue\r\t\"Set the state of this translucent color. Alpha is represented internally by an integer in the range 0..255.\"\r\r\trgb == nil ifFalse: [self attemptToMutateError].\r\trgb _ rgbValue.\r\talpha _ (255.0 * alphaValue) asInteger min: 255 max: 0.\r! !\r\r\r!TranslucentColor methodsFor: 'queries' stamp: 'ar 4/20/2001 04:33'!\risOpaque\r\t^alpha = 255! !\r\r!TranslucentColor methodsFor: 'queries' stamp: 'di 12/30/1998 14:33'!\risTranslucent\r\t^ alpha < 255! !\r\r!TranslucentColor methodsFor: 'queries' stamp: 'di 1/3/1999 12:22'!\risTranslucentColor\r\t\"This means: self isTranslucent, but isTransparent not\"\r\t^ alpha > 0! !\r\r!TranslucentColor methodsFor: 'queries' stamp: 'di 12/30/1998 14:33'!\risTransparent\r\t^ alpha = 0! !\r\r\r!TranslucentColor methodsFor: 'object fileIn' stamp: 'RAA 12/20/2000 17:50'!\rconvertToCurrentVersion: varDict refStream: smartRefStrm\r\t\r\t\"1/13/1999 -- old versions did not have alpha??\"\r\tvarDict at: 'alpha' ifAbsent: [^ Color transparent].\r\r\t^super convertToCurrentVersion: varDict refStream: smartRefStrm.\r\t! !\rBoolean subclass: #True\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Objects'!\r!True commentStamp: '<historical>' prior: 0!\rTrue defines the behavior of its single instance, true -- logical assertion. Notice how the truth-value checks become direct message sends, without the need for explicit testing.\r\rBe aware however that most of these methods are not sent as real messages in normal use. Most are inline coded by the compiler as test and jump bytecodes - avoiding the overhead of the full message sends. So simply redefining these methods here will have no effect.!\r\r\r!True methodsFor: 'logical operations'!\r& alternativeObject \r\t\"Evaluating conjunction -- answer alternativeObject since receiver is true.\"\r\r\t^alternativeObject! !\r\r!True methodsFor: 'logical operations'!\rnot\r\t\"Negation--answer false since the receiver is true.\"\r\r\t^false! !\r\r!True methodsFor: 'logical operations'!\r| aBoolean \r\t\"Evaluating disjunction (OR) -- answer true since the receiver is true.\"\r\r\t^self! !\r\r\r!True methodsFor: 'controlling'!\rand: alternativeBlock \r\t\"Nonevaluating conjunction -- answer the value of alternativeBlock since\r\tthe receiver is true.\"\r\r\t^alternativeBlock value! !\r\r!True methodsFor: 'controlling'!\rifFalse: alternativeBlock \r\t\"Since the condition is true, the value is the true alternative, which is nil. \r\tExecution does not actually reach here because the expression is compiled \r\tin-line.\"\r\r\t^nil! !\r\r!True methodsFor: 'controlling'!\rifFalse: falseAlternativeBlock ifTrue: trueAlternativeBlock \r\t\"Answer the value of trueAlternativeBlock. Execution does not \r\tactually reach here because the expression is compiled in-line.\"\r\r\t^trueAlternativeBlock value! !\r\r!True methodsFor: 'controlling'!\rifTrue: alternativeBlock \r\t\"Answer the value of alternativeBlock. Execution does not actually \r\treach here because the expression is compiled in-line.\"\r\r\t^alternativeBlock value! !\r\r!True methodsFor: 'controlling'!\rifTrue: trueAlternativeBlock ifFalse: falseAlternativeBlock \r\t\"Answer with the value of trueAlternativeBlock. Execution does not \r\tactually reach here because the expression is compiled in-line.\"\r\r\t^trueAlternativeBlock value! !\r\r!True methodsFor: 'controlling'!\ror: alternativeBlock \r\t\"Nonevaluating disjunction -- answer true since the receiver is true.\"\r\r\t^self! !\r\r\r!True methodsFor: 'printing'!\rprintOn: aStream \r\r\taStream nextPutAll: 'true'! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rTrue class\r\tinstanceVariableNames: ''!\r\r!True class methodsFor: 'as yet unclassified' stamp: 'sw 5/8/2000 11:09'!\rinitializedInstance\r\t^ true! !\rObject subclass: #TwoLevelDictionary\r\tinstanceVariableNames: 'firstLevel'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-File Contents Browser'!\r!TwoLevelDictionary commentStamp: '<historical>' prior: 0!\rA simple dictionary for the use of the TextDiffBuilder. Keys are presumed to be Points and a significant speed advantage is gained by using a dictionary of dictionaries. The first is keyed by the x-values and the second by the y-values. Only the minimum necessary protocol is implemented.!\r\r\r!TwoLevelDictionary methodsFor: 'as yet unclassified' stamp: 'RAA 5/2/2001 23:42'!\rat: aPoint\r\r\t^(firstLevel at: aPoint x ifAbsent: [^nil]) at: aPoint y ifAbsent: [^nil]\r! !\r\r!TwoLevelDictionary methodsFor: 'as yet unclassified' stamp: 'RAA 5/2/2001 23:37'!\rat: aPoint put: anObject\r\r\t(firstLevel at: aPoint x ifAbsentPut: [Dictionary new]) at: aPoint y put: anObject\r! !\r\r!TwoLevelDictionary methodsFor: 'as yet unclassified' stamp: 'RAA 5/2/2001 23:38'!\rinitialize\r\r\tfirstLevel _ Dictionary new.! !\r\r!TwoLevelDictionary methodsFor: 'as yet unclassified' stamp: 'RAA 5/2/2001 23:40'!\rkeysDo: aBlock\r\r\tfirstLevel keysAndValuesDo: [ :x :v |\r\t\tv keysDo: [ :y | aBlock value: x@y]\r\t].! !\r\r!TwoLevelDictionary methodsFor: 'as yet unclassified' stamp: 'RAA 5/2/2001 23:40'!\rtwoLevelKeys\r\r\t| twoLevelSet |\r\r\ttwoLevelSet _ TwoLevelSet new.\r\tself keysDo: [ :each | twoLevelSet add: each].\r\t^twoLevelSet\r! !\rObject subclass: #TwoLevelSet\r\tinstanceVariableNames: 'firstLevel'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-File Contents Browser'!\r!TwoLevelSet commentStamp: '<historical>' prior: 0!\rA simple set for the use of the TextDiffBuilder. Elements are presumed to be Points and a significant speed advantage is gained by using a dictionary of sets. The first is keyed by the x-values and the second contains the y-values. Only the minimum necessary protocol is implemented.!\r\r\r!TwoLevelSet methodsFor: 'as yet unclassified' stamp: 'RAA 5/2/2001 23:18'!\radd: aPoint\r\r\t(firstLevel at: aPoint x ifAbsentPut: [Set new]) add: aPoint y\r! !\r\r!TwoLevelSet methodsFor: 'as yet unclassified' stamp: 'RAA 5/2/2001 23:18'!\rcopy\r\r\t| answer |\r\r\tanswer _ self class new initialize.\r\tself do: [ :each |\r\t\tanswer add: each\r\t].\r\t^answer! !\r\r!TwoLevelSet methodsFor: 'as yet unclassified' stamp: 'RAA 5/3/2001 09:26'!\rdetect: aBlock\r\r\tfirstLevel keysAndValuesDo: [ :x :v |\r\t\tv do: [ :y | (aBlock value: x@y) ifTrue: [^x@y]]\r\t].\r\t^nil! !\r\r!TwoLevelSet methodsFor: 'as yet unclassified' stamp: 'RAA 5/2/2001 23:15'!\rdo: aBlock\r\r\tfirstLevel keysAndValuesDo: [ :x :v |\r\t\tv do: [ :y | aBlock value: x@y]\r\t].! !\r\r!TwoLevelSet methodsFor: 'as yet unclassified' stamp: 'RAA 5/2/2001 23:19'!\rincludes: aPoint\r\r\t^(firstLevel at: aPoint x ifAbsent: [^false]) includes: aPoint y! !\r\r!TwoLevelSet methodsFor: 'as yet unclassified' stamp: 'RAA 5/2/2001 23:11'!\rinitialize\r\r\tfirstLevel _ Dictionary new.! !\r\r!TwoLevelSet methodsFor: 'as yet unclassified' stamp: 'RAA 5/2/2001 23:13'!\risEmpty\r\r\t^firstLevel isEmpty! !\r\r!TwoLevelSet methodsFor: 'as yet unclassified' stamp: 'RAA 5/2/2001 23:22'!\rremove: aPoint\r\r\t| lev2 |\r\r\tlev2 _ firstLevel at: aPoint x ifAbsent: [^self].\r\tlev2 remove: aPoint y ifAbsent: [].\r\tlev2 isEmpty ifTrue: [firstLevel removeKey: aPoint x].\r\r! !\r\r!TwoLevelSet methodsFor: 'as yet unclassified' stamp: 'RAA 5/2/2001 23:28'!\rremoveAllXAndY: aPoint\r\r\t| deletes |\r\r\tdeletes _ OrderedCollection new.\r\tfirstLevel removeKey: aPoint x ifAbsent: [].\r\tfirstLevel keysAndValuesDo: [ :x :lev2 |\r\t\tlev2 remove: aPoint y ifAbsent: [].\r\t\tlev2 isEmpty ifTrue: [deletes add: x].\r\t].\r\tdeletes do: [ :each | firstLevel removeKey: each ifAbsent: []].! !\rObject subclass: #UndefinedObject\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Objects'!\r!UndefinedObject commentStamp: '<historical>' prior: 0!\rI describe the behavior of my sole instance, nil. nil represents a prior value for variables that have not been initialized, or for results which are meaningless.!\r\r\r!UndefinedObject methodsFor: 'copying' stamp: 'tk 6/26/1998 11:35'!\rclone\r\t\"Only one instance of UndefinedObject should ever be made, so answer \r\twith self.\"! !\r\r!UndefinedObject methodsFor: 'copying'!\rdeepCopy\r\t\"Only one instance of UndefinedObject should ever be made, so answer \r\twith self.\"! !\r\r!UndefinedObject methodsFor: 'copying'!\rshallowCopy\r\t\"Only one instance of UndefinedObject should ever be made, so answer \r\twith self.\"! !\r\r!UndefinedObject methodsFor: 'copying' stamp: 'tk 8/20/1998 16:07'!\rveryDeepCopyWith: deepCopier\r\t\"Return self.  I can't be copied.  Do not record me.\"! !\r\r\r!UndefinedObject methodsFor: 'printing'!\rprintOn: aStream \r\t\"Refer to the comment in Object|printOn:.\" \r\r\taStream nextPutAll: 'nil'! !\r\r!UndefinedObject methodsFor: 'printing'!\rstoreOn: aStream \r\t\"Refer to the comment in Object|storeOn:.\" \r\r\taStream nextPutAll: 'nil'! !\r\r\r!UndefinedObject methodsFor: 'testing' stamp: 'sw 1/12/98 18:09'!\rhaltIfNil\r\tself halt! !\r\r!UndefinedObject methodsFor: 'testing'!\rifNil: aBlock\r\t\"A convenient test, in conjunction with Object ifNil:\"\r\r\t^ aBlock value! !\r\r!UndefinedObject methodsFor: 'testing'!\rifNil: nilBlock ifNotNil: ifNotNilBlock\r\t\"Evaluate the block for nil because I'm == nil\"\r\r\t^ nilBlock value! !\r\r!UndefinedObject methodsFor: 'testing'!\rifNotNil: aBlock\r\t\"A convenient test, in conjunction with Object ifNotNil:\"\r\r\t^ self! !\r\r!UndefinedObject methodsFor: 'testing'!\rifNotNil: ifNotNilBlock ifNil: nilBlock \r\t\"If I got here, I am nil, so evaluate the block nilBlock\"\r\r\t^ nilBlock value! !\r\r!UndefinedObject methodsFor: 'testing' stamp: 'di 11/8/2000 21:22'!\rifNotNilDo: aBlock\r\t\"Override to do nothing.\"\r\r\t^ self\r! !\r\r!UndefinedObject methodsFor: 'testing' stamp: 'sw 4/7/1999 17:44'!\risEmptyOrNil\r\t\"Answer whether the receiver contains any elements, or is nil.  Useful in numerous situations where one wishes the same reaction to an empty collection or to nil\"\r\t^ true! !\r\r!UndefinedObject methodsFor: 'testing' stamp: 'sma 6/6/2000 22:53'!\risLiteral\r\t^ true! !\r\r!UndefinedObject methodsFor: 'testing'!\risNil \r\t\"Refer to the comment in Object|isNil.\"\r\r\t^true! !\r\r!UndefinedObject methodsFor: 'testing'!\rnotNil \r\t\"Refer to the comment in Object|notNil.\"\r\r\t^false! !\r\r\r!UndefinedObject methodsFor: 'dependents access'!\raddDependent: ignored \r\t\"Refer to the comment in Object|dependents.\"\r\r\tself error: 'Nil should not have dependents'! !\r\r!UndefinedObject methodsFor: 'dependents access'!\rrelease\r\t\"Nil release is a no-op\"! !\r\r!UndefinedObject methodsFor: 'dependents access'!\rsuspend\r\t\"Kills off processes that didn't terminate properly\"\r\t\"Display reverse; reverse.\"  \"<-- So we can catch the suspend bug\"\r\tProcessor terminateActive! !\r\r\r!UndefinedObject methodsFor: 'class hierarchy' stamp: 'ar 7/15/1999 16:49'!\raddSubclass: aClass\r\t\"Ignored -- necessary to support disjoint class hierarchies\"! !\r\r!UndefinedObject methodsFor: 'class hierarchy' stamp: 'sd 3/28/2003 15:16'!\renvironment\r\t\"Necessary to support disjoint class hierarchies.\"\r\r\t^self class environment! !\r\r!UndefinedObject methodsFor: 'class hierarchy' stamp: 'ajh 1/27/2003 17:48'!\rliteralScannedAs: scannedLiteral notifying: requestor \r\t^ scannedLiteral! !\r\r!UndefinedObject methodsFor: 'class hierarchy' stamp: 'ikp 9/26/97 14:45'!\rremoveSubclass: aClass\r\t\"Ignored -- necessary to support disjoint class hierarchies\"! !\r\r!UndefinedObject methodsFor: 'class hierarchy' stamp: 'ls 10/9/2001 00:11'!\rsubclass: nameOfClass  \r\tinstanceVariableNames: instVarNames\r\tclassVariableNames: classVarNames\r\tpoolDictionaries: poolDictnames\r\tcategory: category\r\t\"Calling this method is now considered an accident.  If you really want to create a class with a nil superclass, then create the class and then set the superclass using #superclass:\"\r\tTranscript show: ('Attempt to create ', nameOfClass, ' as a subclass of nil.  Possibly a class is being loaded before its superclass.'); cr.\r\t^ProtoObject\r\t\tsubclass: nameOfClass\r\t\tinstanceVariableNames: instVarNames\r\t\tclassVariableNames: classVarNames\r\t\tpoolDictionaries: poolDictnames\r\t\tcategory: category\r! !\r\r!UndefinedObject methodsFor: 'class hierarchy' stamp: 'ar 8/29/1999 12:49'!\rsubclassDefinerClass\r\t\"For disjunct class hierarchies -- how should subclasses of nil be evaluated\"\r\t^Compiler! !\r\r!UndefinedObject methodsFor: 'class hierarchy' stamp: 'ar 7/15/1999 16:55'!\rsubclasses\r\t\"Return all the subclasses of nil\"\r\t| classList |\r\tclassList _ WriteStream on: Array new.\r\tself subclassesDo:[:class| classList nextPut: class].\r\t^classList contents! !\r\r!UndefinedObject methodsFor: 'class hierarchy' stamp: 'ar 7/15/1999 15:44'!\rsubclassesDo: aBlock\r\t\"Evaluate aBlock with all subclasses of nil.\"\r\t^Class subclassesDo:[:cl| \r\t\tcl isMeta ifTrue:[aBlock value: cl soleInstance]].! !\r\r!UndefinedObject methodsFor: 'class hierarchy' stamp: 'tk 8/18/1999 17:46'!\rsubclassesDoGently: aBlock\r\t\"Evaluate aBlock with all subclasses of nil.  Others are not direct subclasses of Class.\"\r\r\t^ Class subclassesDoGently: [:cl | \r\t\t\tcl isMeta ifTrue: [aBlock value: cl soleInstance]].! !\r\r!UndefinedObject methodsFor: 'class hierarchy' stamp: 'ar 7/13/1999 06:08'!\rtypeOfClass\r\t\"Necessary to support disjoint class hierarchies.\"\r\t^#normal! !\r\r\r!UndefinedObject methodsFor: 'bottom context' stamp: 'ajh 2/1/2003 01:31'!\rhandleSignal: exception\r\t\"When no more handler (on:do:) context left in sender chain this gets called.  Return from signal with default action.\"\r\r\t^ exception resumeUnchecked: exception defaultAction! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rUndefinedObject class\r\tinstanceVariableNames: ''!\r\r!UndefinedObject class methodsFor: 'instance creation' stamp: 'sw 5/5/2000 09:32'!\rinitializedInstance\r\t^ nil! !\r\r!UndefinedObject class methodsFor: 'instance creation'!\rnew\r\tself error: 'You may not create any more undefined objects--use nil'! !\rException subclass: #UnhandledError\r\tinstanceVariableNames: 'exception'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Exceptions Kernel'!\r\r!UnhandledError methodsFor: 'priv handling' stamp: 'ajh 9/5/2002 15:11'!\rdefaultAction\r\t\"The current computation is terminated. The cause of the error should be logged or reported to the user. If the program is operating in an interactive debugging environment the computation should be suspended and the debugger activated.\"\r\r\tself isDevelopmentEnvironmentPresent\r\t\tifTrue: [self devDefaultAction]\r\t\tifFalse: [self runtimeDefaultAction].\r! !\r\r!UnhandledError methodsFor: 'priv handling' stamp: 'ajh 1/24/2003 19:21'!\rdevDefaultAction\r\r\tProcessor activeProcess\r\t\tdebug: exception signalerContext\r\t\ttitle: exception description! !\r\r!UnhandledError methodsFor: 'priv handling' stamp: 'ajh 9/4/2002 19:16'!\risDevelopmentEnvironmentPresent\r\r\t^ Smalltalk includesKey: #Debugger! !\r\r!UnhandledError methodsFor: 'priv handling' stamp: 'ajh 2/1/2003 00:56'!\risResumable\r\t\r\t^ false! !\r\r!UnhandledError methodsFor: 'priv handling' stamp: 'sd 11/16/2003 14:18'!\rruntimeDefaultAction\r\t\"Dump the stack trace to a log file, then exit the program (image).\"\r\r\t| file |\r\tfile := FileStream newFileNamed: ('error', Utilities dateTimeSuffix, FileDirectory dot, 'log') asFileName.\r\tSmalltalk timeStamp: file.\r\t(thisContext sender stackOfSize: 20) do: [:ctx | file cr. ctx printOn: file].\r\tfile close.\r\r\tSmalltalkImage current snapshot: false andQuit: true! !\r\r\r!UnhandledError methodsFor: 'as yet unclassified' stamp: 'ajh 9/4/2002 19:15'!\rexception\r\r\t^ exception! !\r\r!UnhandledError methodsFor: 'as yet unclassified' stamp: 'ajh 9/4/2002 19:15'!\rexception: anError\r\r\texception _ anError! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rUnhandledError class\r\tinstanceVariableNames: ''!\r\r!UnhandledError class methodsFor: 'as yet unclassified' stamp: 'ajh 9/4/2002 19:17'!\rsignalForException: anError\r\r\t^ self new\r\t\texception: anError;\r\t\tsignal! !\rFileDirectory subclass: #UnixFileDirectory\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Files'!\r!UnixFileDirectory commentStamp: '<historical>' prior: 0!\rI represent a Unix FileDirectory.\r!\r\r\r!UnixFileDirectory methodsFor: 'file names' stamp: 'bf 3/22/2000 18:24'!\rfullPathFor: path\r\t\"Return the fully-qualified path name for the given file.\"\r\tpath isEmpty ifTrue: [^ pathName].\r\tpath first = $/ ifTrue: [^ path].\r\t^ pathName = '/'\t\t\t\"Only root dir ends with a slash\"\r\t\tifTrue: ['/' , path]\r\t\tifFalse: [pathName , '/' , path]! !\r\r\r!UnixFileDirectory methodsFor: 'private' stamp: 'jm 12/4/97 23:43'!\rsetPathName: pathString\r\t\"Unix path names start with a leading delimiter character.\"\r\r\t(pathString isEmpty or: [pathString first ~= self pathNameDelimiter])\r\t\tifTrue: [pathName _ self pathNameDelimiter asString, pathString]\r\t\tifFalse: [pathName _ pathString].\r! !\r\r\r!UnixFileDirectory methodsFor: 'testing' stamp: 'sr 5/8/2000 12:58'!\rdirectoryExists: filenameOrPath\r\t\"Handles the special case of testing for the root dir: there isn't a\r\tpossibility to express the root dir as full pathname like '/foo'.\"\r\r\t^ filenameOrPath = '/' or: [super directoryExists: filenameOrPath]! !\r\r!UnixFileDirectory methodsFor: 'testing' stamp: 'sr 5/8/2000 13:03'!\rfileOrDirectoryExists: filenameOrPath \r\t\"Handles the special case of testing for the root dir: there isn't a \r\tpossibility to express the root dir as full pathname like '/foo'.\"\r\r\t^ filenameOrPath = '/' or: [super fileOrDirectoryExists: filenameOrPath]! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rUnixFileDirectory class\r\tinstanceVariableNames: ''!\r\r!UnixFileDirectory class methodsFor: 'platform specific' stamp: 'yo 2/4/1999 06:40'!\rmaxFileNameLength\r\r\t^ 255! !\r\r!UnixFileDirectory class methodsFor: 'platform specific' stamp: 'jm 9/17/97 15:48'!\rpathNameDelimiter\r\r\t^ $/\r! !\rObject subclass: #Utilities\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'AuthorInitials AuthorName CommonRequestStrings LastStats RecentSubmissions ScrapsBook UpdateDownloader UpdateUrlLists'\r\tpoolDictionaries: ''\r\tcategory: 'System-Support'!\r!Utilities commentStamp: '<historical>' prior: 0!\rA repository for general and miscellaneous utilities; much of what is here are in effect global methods that don't naturally attach to anything else.  1/96 sw!\r\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rUtilities class\r\tinstanceVariableNames: ''!\r\r!Utilities class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 12:11'!\rinitialize\r\t\"Initialize the class variables.  5/16/96 sw\"\r\tself initializeCommonRequestStrings.\r\tRecentSubmissions _ OrderedCollection new.\r\r\tself registerInFlapsRegistry.\t! !\r\r!Utilities class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 12:12'!\rregisterInFlapsRegistry\r\t\"Register the receiver in the system's flaps registry\"\r\tself environment\r\t\tat: #Flaps\r\t\tifPresent: [:cl | cl registerQuad: #(Utilities\trecentSubmissionsWindow\t'Recent'\t\t'A message browser that tracks the most recently-submitted methods')\r\t\t\t\t\t\tforFlapNamed: 'Tools'.]! !\r\r!Utilities class methodsFor: 'class initialization' stamp: 'NS 1/26/2004 09:52'!\rstartUp\r\tSystemChangeNotifier uniqueInstance notify: self ofAllSystemChangesUsing: #event:.! !\r\r!Utilities class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 12:42'!\runload\r\t\"Unload the receiver from global registries\"\r\r\tself environment at: #Flaps ifPresent: [:cl |\r\tcl unregisterQuadsWithReceiver: self] ! !\r\r\r!Utilities class methodsFor: 'common requests' stamp: 'tk 5/4/1998 17:35'!\reditCommonRequestStrings\r\t\"Let the user edit the common request strings.  2/1/96 sw\"\r\r\tCommonRequestStrings openLabel: 'Common Request Strings'! !\r\r!Utilities class methodsFor: 'common requests' stamp: 'sd 1/19/2004 20:58'!\revaluate: aString in: aContext to: aReceiver\r\t\"evaluate aString in the given context, and return the result.  2/2/96 sw\"\r\t\r\tself deprecated: 'Use Compiler>>evaluate: aString in: aContext to: aReceiver'.\r\t^ Compiler new evaluate: aString in: aContext to: aReceiver! !\r\r!Utilities class methodsFor: 'common requests' stamp: 'sw 2/5/2002 13:17'!\rinitializeCommonRequestStrings\r\t\"Initialize the common request strings, a directly-editable list of expressions that can be evaluated from the 'do...' menu.\"\r\r\tCommonRequestStrings _ StringHolder new contents: \r'Utilities emergencyCollapse.\rUtilities closeAllDebuggers.\r-\rSensor keyboard.\rParagraphEditor abandonChangeText.\rCursor normal show.\r-\rCommandHistory resetAllHistory.\rProject allInstancesDo: [:p | p displayDepth: 16].\rScriptingSystem inspectFormDictionary.\rForm fromUser bitEdit.\rDisplay border: (0@0 extent: 640@480) width: 2.\r-\rUndeclared inspect.\rUndeclared removeUnreferencedKeys; inspect.\rTranscript clear.\rUtilities grabScreenAndSaveOnDisk.\rFrameRateMorph new openInHand.\r-\rUtilities reconstructTextWindowsFromFileNamed: ''TW''.\rUtilities storeTextWindowContentsToFileNamed: ''TW''.\rChangeSorter removeEmptyUnnamedChangeSets.\rChangeSorter reorderChangeSets.\r-\rActiveWorld installVectorVocabulary.\rActiveWorld abandonVocabularyPreference.\rSmalltalk saveAsNewVersion'\r\r\"Utilities initializeCommonRequestStrings\"! !\r\r!Utilities class methodsFor: 'common requests' stamp: 'BG 10/29/2003 08:38'!\rofferCommonRequests\r\t\"Offer up the common-requests menu.  If the user chooses one, then evaluate it, and -- provided the value is a number or string -- show it in the Transcript.\"\r\r\t\"Utilities offerCommonRequests\"\r\r\t| reply result aMenu index normalItemCount strings |\r\r\t(CommonRequestStrings == nil or: [CommonRequestStrings isKindOf: Array])\r\t\tifTrue:\r\t\t\t[self initializeCommonRequestStrings].\r\tstrings _ CommonRequestStrings contents.\r\tnormalItemCount _ strings asString lineCount.\r\taMenu _ PopUpMenu labels: (strings asString, '\redit this menu') lines: (Array with: normalItemCount).\r\r\tindex _ aMenu startUp.\r\tindex == 0 ifTrue: [^ self].\r\treply _ aMenu labelString lineNumber: index.\r\treply size == 0 ifTrue: [^ self].\r\tindex > normalItemCount ifTrue:\r\t\t[^ self editCommonRequestStrings].\r\r\tresult _ self evaluate: reply in: nil to: nil.\r\t(result isKindOf: Number) | (result isKindOf: String)\r\t\tifTrue:\r\t\t\t[Transcript cr; nextPutAll: result printString]! !\r\r\r!Utilities class methodsFor: 'debugging' stamp: 'sw 4/29/2001 23:42'!\rdoesNotUnderstand: aMessage\r\t\"A temporary expedient for revectoring various messages formerly sent to Utilities that now are instead implemented by Flaps; this is only for the benefit of pre-existing buttons and menu items that were set up to call the old interface\"\r\r\t| aSelector |\r\taSelector _ aMessage selector.\r\t(#(addLocalFlap explainFlaps addMenuFlap addPaintingFlap addStackToolsFlap addGlobalFlap offerGlobalFlapsMenu toggleWhetherToUseGlobalFlaps ) includes: aSelector)\r\t\tifTrue:\r\t\t\t[^ self inform: \r'Sorry, this is an obsolete menu.  Please\rdismiss it and get a fresh one.  Thank you'].\r\r\t^ super doesNotUnderstand: aMessage! !\r\r\r!Utilities class methodsFor: 'fetching updates' stamp: 'RAA 12/17/2000 16:19'!\rzapUpdateDownloader\r\r\tUpdateDownloader ifNotNil: [UpdateDownloader terminate].\r\tUpdateDownloader _ nil.! !\r\r\r!Utilities class methodsFor: 'deprecated' stamp: 'sd 1/16/2004 21:37'!\rfileOutChangeSetsNamed: nameList\r\t\"File out the list of change sets whose names are provided\"\r     self deprecated: 'Use ChangeSorter fileOutChangeSetsNamed: nameList'.\r\tChangeSorter fileOutChangeSetsNamed: nameList! !\r\r!Utilities class methodsFor: 'deprecated' stamp: 'sd 1/16/2004 21:31'!\rfileOutChanges\r\t\"File out the current change set to a file whose name is a function of the current date and time.\"\r\r\tself deprecated: 'Use ChangeSet current verboseFileOut'.\r\tChangeSet current verboseFileOut! !\r\r!Utilities class methodsFor: 'deprecated' stamp: 'sd 1/16/2004 21:09'!\rmethodHierarchyBrowserForClass: aClass selector: sel\r\t\"Create and schedule a message set browser on all implementors of the \r\tcurrently selected message selector. Do nothing if no message is selected.\"\r\t\r\tself deprecated: 'Use SystemNavigation default methodHierarchyBrowserForClass: aClass selector: sel'. \r\tSystemNavigation default methodHierarchyBrowserForClass: aClass selector: sel! !\r\r!Utilities class methodsFor: 'deprecated' stamp: 'sd 1/16/2004 21:14'!\rspawnHierarchyForClass: aClass selector: aSelector\r\t\"Utilities spawnHierarchyForClass: SmallInteger selector: #hash\"\r\t\r\tself deprecated: 'SystemNavigation default spawnHierarchyForClass: aClass selector: aSelector'.\r\tSystemNavigation default spawnHierarchyForClass: aClass selector: aSelector! !\r\r\r!Utilities class methodsFor: 'graphical support' stamp: 'md 12/12/2003 17:03'!\rgrabScreenAndSaveOnDisk  \"Utilities grabScreenAndSaveOnDisk\"\r\t| form fileName |\r\tself deprecated: 'Use GIFReaderWriter grabScreenAndSaveOnDisk'.\r\tform _ Form fromUser.\r\tform bits size = 0 ifTrue: [^ Beeper beep].\r\tfileName _ FileDirectory default nextNameFor: 'Squeak' extension: 'gif'.\r\tUtilities informUser: 'Writing ' , fileName\r\t\tduring: [GIFReadWriter putForm: form onFileNamed: fileName].! !\r\r\r!Utilities class methodsFor: 'identification' stamp: 'dhhi 11/6/97 16:48'!\rauthorInitials\r\t\"Answer the initials to be used to identify the current code author.  \"\r\r\t[AuthorInitials isEmpty] whileTrue: [self setAuthorInitials].\r\t^ AuthorInitials! !\r\r!Utilities class methodsFor: 'identification' stamp: 'sw 7/6/1998 11:49'!\rauthorInitialsPerSe\r\t\"Answer the currently-prevailing author initials, such as they, empty or not\"\r\r\t^ AuthorInitials! !\r\r!Utilities class methodsFor: 'identification' stamp: 'fc 3/11/2004 12:22'!\rauthorName\r\tAuthorName ifEmpty: [self setAuthorName].\r\t^ AuthorName! !\r\r!Utilities class methodsFor: 'identification' stamp: 'tk 4/10/98 06:25'!\rchangeStamp \r\t\"Answer a string to be pasted into source code to mark who changed it and when.\"\r\t^ self authorInitials , ' ' , Date today mmddyyyy, ' ',\r\t\t((String streamContents: [:s | Time now print24: true on: s]) copyFrom: 1 to: 5)! !\r\r!Utilities class methodsFor: 'identification' stamp: 'sw 1/29/2001 09:28'!\rchangeStampPerSe\r\t\"Answer a string to be pasted into source code to mark who changed it and when.\"\r\r\t^ (self authorInitialsPerSe ifNil: ['']) , ' ' , Date today mmddyyyy, ' ',\r\t\t((String streamContents: [:s | Time now print24: true on: s]) copyFrom: 1 to: 5)! !\r\r!Utilities class methodsFor: 'identification' stamp: 'sw 11/13/1999 22:45'!\rdateTimeSuffix\r\t\"Answer a string which indicates the date and time, intended for use in building fileout filenames, etc.\"\r\r\t\"Utilities dateTimeSuffix\"\r\t^ Preferences twentyFourHourFileStamps\r\t\tifFalse:\r\t\t\t[self monthDayTimeStringFrom: Time primSecondsClock]\r\t\tifTrue:\r\t\t\t[self monthDayTime24StringFrom: Time primSecondsClock]! !\r\r!Utilities class methodsFor: 'identification' stamp: 'di 6/13/97 13:52'!\rfixStamp: changeStamp \r\t| parts |\r\tparts _ changeStamp findTokens: ' '.\r\t(parts size > 0 and: [parts last first isLetter]) ifTrue:\r\t\t[\"Put initials first in all time stamps...\"\r\t\t^ String streamContents:\r\t\t\t\t[:s | s nextPutAll: parts last.\r\t\t\t\tparts allButLast do: [:p | s space; nextPutAll: p]]].\r\t^ changeStamp! !\r\r!Utilities class methodsFor: 'identification' stamp: 'sw 11/13/1999 23:03'!\rmonthDayTime24StringFrom: aSecondCount\r\t| aDate aTime |\r\t\"From the date/time represented by aSecondCount, produce a string which indicates the date and time in the compact form\r             ddMMMhhmm\t\twhere dd is a two-digit day-of-month, MMM is the alpha month abbreviation and hhmm is the time on a 24-hr clock.\r\r          Utilities monthDayTime24StringFrom: Time primSecondsClock\r\"\r\r\taDate _ Date fromSeconds: aSecondCount.\r\taTime _ Time fromSeconds: aSecondCount \\\\ 86400.\r\r\t^ (aDate dayOfMonth asTwoCharacterString), \r\t\t(aDate monthName copyFrom: 1 to: 3), \r\t\t(aTime hhmm24)! !\r\r!Utilities class methodsFor: 'identification' stamp: 'sw 11/13/1999 23:03'!\rmonthDayTimeStringFrom: aSecondCount\r\t| aDate aTime |\r\t\"From the date/time represented by aSecondCount, produce a string which indicates the date and time in the form:\r\t\tddMMMhhmmPP\t  where:\r\t\t\t\t\t\t\tdd is a two-digit day-of-month,\r\t\t\t\t\t\t\tMMM is the alpha month abbreviation,\r\t\t\t\t\t\t\thhmm is the time,\r\t\t\t\t\t\t\tPP is either am or pm\r\r          Utilities monthDayTimeStringFrom: Time primSecondsClock\r\"\r\r\taDate _ Date fromSeconds: aSecondCount.\r\taTime _ Time fromSeconds: aSecondCount \\\\ 86400.\r\r\t^ (aDate dayOfMonth asTwoCharacterString), \r\t\t(aDate monthName copyFrom: 1 to: 3), \r\t\t((aTime hours \\\\ 12) asTwoCharacterString), \r\t\t(aTime minutes asTwoCharacterString),\r\t\t(aTime hours > 12 ifTrue: ['pm'] ifFalse: ['am'])! !\r\r!Utilities class methodsFor: 'identification' stamp: 'gm 5/15/2004 02:59'!\rsetAuthorInitials\r\t\"Put up a dialog allowing the user to specify the author's initials.  \"\r\r\tself setAuthorInitials:\r\t\t(FillInTheBlank request: 'Please type your initials: '\r\t\t\t\t\tinitialAnswer: AuthorInitials)! !\r\r!Utilities class methodsFor: 'identification' stamp: 'fc 3/11/2004 12:13'!\rsetAuthorInitials: aString\r\r\tAuthorInitials _ aString.\r\r\t\"Case of being reset due to, eg, copy of image.\"\r\taString isEmpty ifTrue: [AuthorName _ '']! !\r\r!Utilities class methodsFor: 'identification' stamp: 'sma 6/1/2000 12:08'!\rsetAuthorName\r\tAuthorName _ FillInTheBlank \r\t\t\trequest: 'Please type your name:'\r\t\t\tinitialAnswer: 'Your Name'! !\r\r\r!Utilities class methodsFor: 'miscellaneous'!\rawaitMouseUpIn: box repeating: doBlock ifSucceed: succBlock\r\t\"The mouse has gone down in box; track the mouse, inverting the box while it's within, and if, on mouse up, the cursor was still within the box, execute succBlock.  While waiting for the mouse to come up, repeatedly execute doBlock. 5/11/96 sw\r\t6/10/96 sw: call new method that adds extra feature\"\r\r\t^ self awaitMouseUpIn: box whileMouseDownDo: doBlock whileMouseDownInsideDo: [] ifSucceed: succBlock! !\r\r!Utilities class methodsFor: 'miscellaneous' stamp: 'JMM 3/31/2000 20:41'!\rawaitMouseUpIn: box whileMouseDownDo: doBlock1 whileMouseDownInsideDo: doBlock2 ifSucceed: succBlock\r\t\"The mouse has gone down in box; track the mouse, inverting the box while it's within, and if, on mouse up, the cursor was still within the box, execute succBlock.  While waiting for the mouse to come up, repeatedly execute doBlock1, and also, if the cursor is within the box, execute doBlock2.  6/10/96 sw\r3/31/00 JMM added logic to stop multiple redraws\"\r\r\t| p inside lightForm darkForm isLight |\r\r\tp _ Sensor cursorPoint.\r\tinside _ box insetBy: 1.\r\tisLight _ true.\r\tlightForm _ Form fromDisplay: inside.\r\tdarkForm _ lightForm deepCopy reverse.\r\t[Sensor anyButtonPressed] whileTrue:\r\t\t[doBlock1 value.\r\t\t(box containsPoint: (p _ Sensor cursorPoint))\r\t\t\tifTrue: [doBlock2 value.\r\t\t\t\t\tisLight ifTrue: \r\t\t\t\t\t\t[isLight _ false.\r\t\t\t\t\t\tdarkForm displayAt: inside origin]]\r\t\t\tifFalse: [isLight ifFalse:\r\t\t\t\t\t\t[isLight _ true.\r\t\t\t\t\t\tlightForm displayAt: inside origin]]].\r\t(box containsPoint: p)\r\t\tifTrue: [lightForm displayAt: inside origin.\r\t\t\t\t^ succBlock value]\r! !\r\r!Utilities class methodsFor: 'miscellaneous' stamp: 'sma 4/30/2000 10:17'!\remergencyCollapse\r\tSmalltalk isMorphic ifTrue: [^ self].\r\tScheduledControllers screenController emergencyCollapse! !\r\r!Utilities class methodsFor: 'miscellaneous' stamp: 'sd 4/17/2003 21:04'!\rfixUpProblemsWithAllCategory\r\t\"Moves all methods that are in formally classified a category named '-- all --' into the default 'as yet unclassified' category\"\r\r\t\"Utilities fixUpProblemsWithAllCategory\"\r\r\t| org aCategory methodCount classCount any |\r\tself flag: #ShouldBeMovedInClassOrganization.\r\tmethodCount _ 0.\r\tclassCount _ 0.\r\tself systemNavigation allBehaviorsDo:\r\t\t[:aClass | org _ aClass organization.\r\t\t\t(org categories includes: #'-- all --') ifTrue:\r\t\t\t\t[any _ false.\r\t\t\t\taClass selectorsDo:\r\t\t\t\t\t[:aSelector |\r\t\t\t\t\t\taCategory _ org categoryOfElement: aSelector.\r\t\t\t\t\t\taCategory = #'-- all --' ifTrue:\r\t\t\t\t\t\t\t[org classify: aSelector under: ClassOrganizer default suppressIfDefault: false.\r\t\t\t\t\t\t\tTranscript cr; show: aClass name, ' >> ', aSelector.\r\t\t\t\t\t\t\tmethodCount _ methodCount + 1.\r\t\t\t\t\t\t\tany _ true]].\r\t\t\tany ifTrue: [classCount _ classCount + 1].\r\t\t\torg removeEmptyCategories]].\r\tTranscript cr; show: methodCount printString, ' methods in ', classCount printString, ' classes moved from \"-- all --\" to \"as yet unclassified\"'\r! !\r\r!Utilities class methodsFor: 'miscellaneous' stamp: 'nk 2/15/2004 09:36'!\rgarbageCollectAndReport\r\t\"Do a garbage collection, and report results to the user.\"\r\r\t| cc reportString |\r\treportString _ String streamContents:\r\t\t[:aStream | \r\t\t\taStream nextPutAll: Smalltalk bytesLeftString.\r\t\t\tSmalltalk at: #Command ifPresent:\r\t\t\t\t[:cmdClass |\r\t\t\t\t(cc _ cmdClass instanceCount) > 0 ifTrue:\r\t\t\t\t\t[aStream cr; nextPutAll:\r\t\t('(note: there are ', cc printString,\r\t\t                         ' undo record(s) present in your\rsystem; purging them may free up more space.)')]]].\r\t\t\t\r\tself inform: reportString\r! !\r\r!Utilities class methodsFor: 'miscellaneous'!\rkeyLike: aString satisfying: aBlock\r\t\"Return a key like aString that satisfies aBlock.  The block should provide a test for acceptability -- typically the test is about whether the key is already in use.  aBlock should return a boolean.  8/11/96 sw\"\r\r\t| stemAndSuffix suffix stem newKey |\r\t(aBlock value: aString) ifTrue: [^ aString].\r\tstemAndSuffix _ aString stemAndNumericSuffix.\r\tsuffix _ stemAndSuffix last + 1.\r\tstem _ stemAndSuffix first.\r\t[aBlock value: (newKey _ stem, suffix printString)]\r\t\twhileFalse:\r\t\t\t[suffix _ suffix + 1].\r\t^ newKey\r! !\r\r!Utilities class methodsFor: 'miscellaneous'!\rkeyLike: aString withTrailing: trailerString satisfying: aBlock\r\t\"Return a key like (aString, trailerString) that satisfies aBlock.  The block should provide a test for acceptability -- typically the test is about whether the key is already in use.  aBlock should return a boolean.  8/11/96 sw\"\r\r\t| stemAndSuffix suffix stem composite |\r\tcomposite _ aString, trailerString.\r\t(aBlock value: composite) ifTrue: [^ composite].\r\tstemAndSuffix _ aString stemAndNumericSuffix.\r\tsuffix _ stemAndSuffix last + 1.\r\tstem _ stemAndSuffix first.\r\t[aBlock value: (composite _ stem, suffix printString, trailerString)]\r\t\twhileFalse:\r\t\t\t[suffix _ suffix + 1].\r\t^ composite\r! !\r\r!Utilities class methodsFor: 'miscellaneous' stamp: 'BG 10/29/2003 08:13'!\rlookUpDefinition\r\t| aWord aDefinition |\r\t(aWord _ FillInTheBlank request: 'Enter a word:') isEmpty ifTrue: [^ self].\r\"\t(aDefinition _ WordNet definitionsFor: aWord) ifNil: [^ self]. \"\r     aDefinition := ''.\r\t(StringHolder new contents: aDefinition)\r\t\topenLabel: aWord\r\r\"Utilities lookUpDefinition\"! !\r\r!Utilities class methodsFor: 'miscellaneous' stamp: 'md 11/14/2003 18:02'!\rmethodDiffFor: aString class: aClass selector: aSelector prettyDiffs: prettyDiffBoolean\r\t\"Return a string comprising a source-code diff between an existing method and the source-code in aString.  DO prettyDiff if prettyDiffBoolean is true.\"\r\r\t^ (aClass notNil and: [aClass includesSelector: aSelector])\r\t\tifTrue:\r\t\t\t[TextDiffBuilder\r\t\t\t\tbuildDisplayPatchFrom: (aClass sourceCodeAt: aSelector)\r\t\t\t\tto: aString\r\t\t\t\tinClass: aClass\r\t\t\t\tprettyDiffs: prettyDiffBoolean]\r\t\tifFalse:\r\t\t\t[aString copy]! !\r\r!Utilities class methodsFor: 'miscellaneous' stamp: 'jm 5/3/1998 20:12'!\ropenScratchWorkspaceLabeled: labelString contents: initialContents\r\t\"Open a scratch text view with the given label on the given string. A scratch text view won't warn you about unsaved changes when you close it.\"\r\t\"Utilities openScratchWorkspaceLabeled: 'Scratch' contents: 'Hello. world!!'\"\r\r\t| model topView stringView |\r\tmodel _ StringHolder new contents: initialContents.\r\ttopView _ StandardSystemView new.\r\ttopView\r\t\tmodel: model;\r\t\tlabel: labelString;\r\t\tminimumSize: 180@120.\r\ttopView borderWidth: 1.\r\tstringView _ PluggableTextView on: model \r\t\ttext: #contents\r\t\taccept: nil\r\t\treadSelection: #contentsSelection\r\t\tmenu: #codePaneMenu:shifted:.\r\tstringView\r\t\taskBeforeDiscardingEdits: false;\r\t\twindow: (0@0 extent: 180@120).\r\ttopView addSubView: stringView.\r\ttopView controller open.\r! !\r\r!Utilities class methodsFor: 'miscellaneous' stamp: 'RAA 5/28/2001 10:02'!\rsetClassAndSelectorFrom: messageIDString in: csBlock\r\t\"Decode strings of the form <className> [class] <selectorName>.   If <className> does not exist as a class, use nil for the class in the block\"\r\r\t| aStream aClass maybeClass sel |\r\r\t(messageIDString isKindOf: MethodReference) ifTrue: [\r\t\t^messageIDString setClassAndSelectorIn: csBlock\r\t].\r\r\taStream _ ReadStream on: messageIDString.\r\taClass _ Smalltalk at: (aStream upTo: $ ) asSymbol ifAbsent: [nil].\r\tmaybeClass _ aStream upTo: $ .\r\tsel _ aStream upTo: $ .\r\t((maybeClass = 'class') & (sel size ~= 0))\r\t\tifTrue:\r\t\t\t[aClass\r\t\t\t\tifNil:\r\t\t\t\t\t[csBlock value: nil value: sel asSymbol]\r\t\t\t\tifNotNil:\r\t\t\t\t\t[csBlock value: aClass class value: sel asSymbol]]\r\t\tifFalse:\r\t\t\t[csBlock value: aClass value: maybeClass asSymbol]\r\r\r\"\rUtilities setClassAndSelectorFrom: 'Utilities class oppositeModeTo:' in: [:aClass :aSelector | Transcript cr; show: 'Class = ', aClass name printString, ' selector = ', aSelector printString].\r\rUtilities setClassAndSelectorFrom: 'MessageSet setClassAndSelectorIn:' in: [:aClass :aSelector | Transcript cr; show: 'Class = ', aClass name printString, ' selector = ', aSelector printString].\r\"\r! !\r\r!Utilities class methodsFor: 'miscellaneous' stamp: 'sw 7/29/2002 02:23'!\rtimeStampForMethod: method\r\t\"Answer the authoring time-stamp for the given method, retrieved from the sources or changes file. Answer the empty string if no time stamp is available.\"\r\t\"Utilities timeStampForMethod: (Utilities class compiledMethodAt: #timeStampForMethod:)\"\r\r\t^ method timeStamp! !\r\r\r!Utilities class methodsFor: 'recent method submissions' stamp: 'sw 7/29/2002 02:18'!\rassureMostRecentSubmissionExists\r\t\"Make certain that the most recent submission exists\"\r\r\t[RecentSubmissions size > 0 and:\r\t\t[RecentSubmissions last isValid not]] whileTrue:\r\t\t\t[RecentSubmissions removeLast].! !\r\r!Utilities class methodsFor: 'recent method submissions' stamp: 'sw 11/5/2001 01:16'!\rbrowseRecentSubmissions\r\t\"Open up a browser on the most recent methods submitted in the image.  5/96 sw.\"\r\r\t\"Utilities browseRecentSubmissions\"\r\r\t| recentMessages |\r\r\tself recentMethodSubmissions size == 0 ifTrue:\r\t\t[^ self inform: 'There are no recent submissions'].\r\t\r\trecentMessages _ RecentSubmissions copy reversed.\r\tRecentMessageSet \r\t\topenMessageList: recentMessages \r\t\tname: 'Recent submissions -- youngest first ' \r\t\tautoSelect: nil! !\r\r!Utilities class methodsFor: 'recent method submissions' stamp: 'NS 4/12/2004 22:47'!\revent: anEvent\r\t\"Hook for SystemChangeNotifier\"\r\r\t(anEvent isCommented and: [anEvent itemKind = SystemChangeNotifier classKind])\r\t\tifTrue: [self noteMethodSubmission: #Comment forClass: anEvent item].\r\t((anEvent isAdded or: [anEvent isModified]) and: [anEvent itemKind = SystemChangeNotifier methodKind])\r\t\tifTrue: [anEvent itemRequestor ifNotNil: [self noteMethodSubmission: anEvent itemSelector forClass: anEvent itemClass]].\r\t((anEvent isAdded or: [anEvent isModified]) and: [anEvent itemKind = SystemChangeNotifier methodKind]) ifTrue:[\r\t\tInMidstOfFileinNotification signal\r\t\t\tifFalse: [Utilities changed: #recentMethodSubmissions].\r\t].! !\r\r!Utilities class methodsFor: 'recent method submissions' stamp: 'sw 7/29/2002 02:12'!\rmostRecentlySubmittedMessage\r\t\"Answer a string indicating the most recently submitted method that is still extant\"\r\r\tself flag: #mref.\t\"fix for faster references to methods\"\r\r\tself assureMostRecentSubmissionExists.\r\t^ RecentSubmissions last asStringOrText asString! !\r\r!Utilities class methodsFor: 'recent method submissions' stamp: 'RAA 5/28/2001 10:53'!\rnoteMethodSubmission: selectorName forClass: class\r\r\t| submission |\r\r\tself flag: #mref.\t\"fix for faster references to methods\"\r\r\tself recentMethodSubmissions.\t\"ensure it is valid\"\r\tclass wantsChangeSetLogging ifFalse: [^ self].\r\tself purgeRecentSubmissionsOfMissingMethods.\r\tsubmission _ class name asString, ' ', selectorName.\r\tRecentSubmissions removeAllSuchThat: [ :each |\r\t\teach asStringOrText = submission\r\t].\r\tRecentSubmissions size >= self numberOfRecentSubmissionsToStore ifTrue: [\r\t\tRecentSubmissions removeFirst\r\t].\r\tRecentSubmissions addLast: (\r\t\tMethodReference new\r\t\t\tsetClass: class \r\t\t\tmethodSymbol: selectorName \r\t\t\tstringVersion: submission\r\t) \r! !\r\r!Utilities class methodsFor: 'recent method submissions' stamp: 'sw 7/28/2002 23:20'!\rnumberOfRecentSubmissionsToStore\r\t\"Answer how many methods back the 'recent method submissions' history should store\"\r\r\t^ Preferences parameterAt: #numberOfRecentSubmissionsToStore ifAbsentPut: [30]! !\r\r!Utilities class methodsFor: 'recent method submissions' stamp: 'sw 7/28/2002 23:52'!\rnumberOfRecentSubmissionsToStore: aNumber\r\t\"Set the number of Recent Submissions to store\"\r\r\tPreferences setParameter: #numberOfRecentSubmissionsToStore to: aNumber! !\r\r!Utilities class methodsFor: 'recent method submissions' stamp: 'sw 9/26/2002 19:16'!\rpurgeFromRecentSubmissions: aMethodReference\r\t\"Purge any reference found in RecentSubmissions to the method supplied\"\r\r\tRecentSubmissions _ RecentSubmissions select:\r\t\t[:aSubmission |\r\t\t\tUtilities setClassAndSelectorFrom: aSubmission in:\r\t\t\t\t[:aClass :aSelector | (aClass ~~ aMethodReference actualClass) or: [aSelector ~~ aMethodReference methodSymbol]]]! !\r\r!Utilities class methodsFor: 'recent method submissions' stamp: 'sw 11/5/2001 12:04'!\rpurgeRecentSubmissionsOfMissingMethods\r\t\"Utilities purgeRecentSubmissionsOfMissingMethods\"\r\r\t| keep |\r\tself flag: #mref.\t\"fix for faster references to methods\"\r\tRecentSubmissions _ RecentSubmissions select:\r\t\t[:aSubmission | \r\t\t\tUtilities setClassAndSelectorFrom: aSubmission in:\r\t\t\t\t[:aClass :aSelector |\r\t\t\t\t\tkeep _ (aClass == nil) not\r\t\t\t\t\t\tand: [aClass isInMemory\r\t\t\t\t\t\tand: [aSelector == #Comment or: [(aClass compiledMethodAt: aSelector ifAbsent: [nil]) notNil]]]].\r\t\t\tkeep]! !\r\r!Utilities class methodsFor: 'recent method submissions' stamp: 'RAA 5/28/2001 07:39'!\rrecentMethodSubmissions\r\t\"Answer the list of recent method submissions, in order.  5/16/96 sw\"\r\r\r\tself flag: #mref.\t\"fix for faster references to methods\"\r\r\tRecentSubmissions == nil ifTrue: [RecentSubmissions _ OrderedCollection new].\r\t^ RecentSubmissions! !\r\r!Utilities class methodsFor: 'recent method submissions' stamp: 'BG 11/1/2003 18:33'!\rrecentSubmissionsWindow\r\t\"Answer a SystemWindow holding recent submissions\"\r\r\t| recentMessages messageSet |\r\trecentMessages _ RecentSubmissions copy reversed.\r\tmessageSet _ RecentMessageSet messageList: recentMessages.\r\tmessageSet autoSelectString: nil.\r\"\t^ (messageSet inMorphicWindowLabeled: 'Recent submissions -- youngest first') applyModelExtent \"\r\r\t\"Utilities recentSubmissionsWindow openInHand\"\r\r! !\r\r!Utilities class methodsFor: 'recent method submissions' stamp: 'nb 6/17/2003 12:25'!\rrevertLastMethodSubmission\r\t| changeRecords lastSubmission theClass theSelector |\r\t\"If the most recent method submission was a method change, revert\r\tthat change, and if it was a submission of a brand-new method, \r\tremove that method.\"\r\r\tRecentSubmissions isEmptyOrNil ifTrue: [^ Beeper beep].\r\tlastSubmission _ RecentSubmissions last.\r\ttheClass _ lastSubmission actualClass ifNil: [^ Beeper beep].\r\ttheSelector _ lastSubmission methodSymbol.\r\tchangeRecords _ theClass changeRecordsAt: theSelector.\r\tchangeRecords isEmptyOrNil ifTrue: [^ Beeper beep].\r\tchangeRecords size == 1\r\t\tifTrue:\r\t\t\t[\"method has no prior version, so reverting in this case means removing\"\r\t\t\ttheClass removeSelector: theSelector]\r\t\tifFalse:\r\t\t\t[changeRecords second fileIn].\r\r\"Utilities revertLastMethodSubmission\"! !\r\r\r!Utilities class methodsFor: 'summer97 additions' stamp: 'sw 1/9/2001 05:34'!\rclassFromPattern: pattern withCaption: aCaption\r\t\"If there is a class whose name exactly given by pattern, return it.\r\tIf there is only one class in the system whose name matches pattern, return it.\r\tOtherwise, put up a menu offering the names of all classes that match pattern, and return the class chosen, else nil if nothing chosen.\r\tThis method ignores tab, space, & cr characters in the pattern\"\r\r\t| toMatch potentialClassNames classNames exactMatch index |\r\t(toMatch _  pattern copyWithoutAll:\r\t\t\t{Character space.  Character cr.  Character tab})\r\t\tisEmpty ifTrue: [^ nil].\r\tSymbol hasInterned: toMatch ifTrue:\r\t\t[:patternSymbol | Smalltalk at: patternSymbol ifPresent:\r\t\t\t[:maybeClass | (maybeClass isKindOf: Class) ifTrue: [^ maybeClass]]].\r\r\ttoMatch _ (toMatch copyWithout: $.) asLowercase.\r\tpotentialClassNames _ Smalltalk classNames asOrderedCollection.\r\tclassNames _ pattern last = $. \r\t\tifTrue: [potentialClassNames select:\r\t\t\t\t\t[:nm |  nm asLowercase = toMatch]]\r\t\tifFalse: [potentialClassNames select: \r\t\t\t\t\t[:n | n includesSubstring: toMatch caseSensitive: false]].\r\tclassNames isEmpty ifTrue: [^ nil].\r\texactMatch _ classNames detect: [:each | each asLowercase = toMatch] ifNone: [nil].\r\r\tindex _ classNames size = 1\r\t\tifTrue:\t[1]\r\t\tifFalse:\t[exactMatch\r\t\t\tifNil: [(PopUpMenu labelArray: classNames lines: #()) startUpWithCaption: aCaption]\r\t\t\tifNotNil: [classNames addFirst: exactMatch.\r\t\t\t\t(PopUpMenu labelArray: classNames lines: #(1)) startUpWithCaption: aCaption]].\r\tindex = 0 ifTrue: [^ nil].\r\t^ Smalltalk at: (classNames at: index) asSymbol\r\r\"\r\tUtilities classFromPattern: 'CharRecog'\r\tUtilities classFromPattern: 'rRecog'\r\tUtilities classFromPattern: 'znak'\r\tUtilities classFromPattern: 'orph'\r\"\r! !\r\r!Utilities class methodsFor: 'summer97 additions' stamp: 'sw 4/30/1998 12:20'!\rinviolateInstanceVariableNames\r\t\"Answer a list of instance variable names not to be used.  (Place holder for real list)\"\r\t^ #('thisContext' 'self')! !\r\r!Utilities class methodsFor: 'summer97 additions' stamp: 'sw 4/30/1998 12:20'!\risLegalInstVarName: aString\r\t\"Answer whether aString is a legal instance variable name.\"\r\r\t^ ((Scanner isLiteralSymbol: aString) and: [(aString includes: $:) not]) and:\r\t\t[(self inviolateInstanceVariableNames includes:  aString) not]! !\r\r!Utilities class methodsFor: 'summer97 additions' stamp: 'sw 10/6/2000 22:47'!\rwellFormedInstanceVariableNameFrom: aString\r\t\"Answer a legal instance variable name, derived from aString\"\r\r\t| cleansedString |\r\tcleansedString _ aString select: [:ch | ch isDigit or: [ch isLetter]].\r\t(cleansedString size == 0 or: [cleansedString first isDigit])\r\t\tifTrue: [cleansedString _ 'a', cleansedString]\r\t\tifFalse:\t[cleansedString _ cleansedString withFirstCharacterDownshifted].\r\r\t[self isLegalInstVarName: cleansedString] whileFalse:\r\t\t[cleansedString _ cleansedString, 'x'].\r\t^ cleansedString\r\r\"Utilities wellFormedInstanceVariableNameFrom:  '234 xx\\ Uml /ler42342380-4'\"! !\r\r\r!Utilities class methodsFor: 'support windows' stamp: 'dgd 9/21/2003 15:12'!\rcommandKeyMappings\r\t^ (self class firstCommentAt: #commandKeyMappings) translated\r\r\"Lower-case command keys\r(use with Cmd key on Mac and Alt key on other platforms)\ra\tSelect all\rb\tBrowse it (selection is a class name or cursor is over a class-list or message-list)\rc\tCopy selection\rd\tDo it (selection is a valid expression)\re\tExchange selection with prior selection\rf\tFind\rg\tFind again\rh\tSet selection as search string for find again\ri\tInspect it (selection is a valid expression, or selection is over an inspect-ilst)\rj\tAgain once (do the last text-related operation again)\rk\tSet font\rl\tCancel\rm\tImplementors of it (selection is a message selector or cursor is over a class-list or message-list)\rn\tSenders of it (selection is a message selector or cursor is over a class-list or message-list)\ro\tSpawn current method\rp\tPrint it (selection is a valid expression)\rq\tQuery symbol (toggle all possible completion for a given prefix)\rr\tRecognizer\rs\tSave (i.e. accept)\rt\tFinds a Transcript (when cursor is over the desktop)\ru\tToggle alignment\rv\tPaste\rw\tDelete preceding word (over text);  Close-window (over morphic desktop)\rx\tCut selection\ry\tSwap characters\rz\tUndo\r\rNote: for Do it, Senders of it, etc., a null selection will be expanded to a word or to the current line in an attempt to do what you want.  Also note that Senders/Implementors of it will find the outermost keyword selector in a large selection, as when you have selected a bracketed expression or an entire line.  Finally note that the same cmd-m and cmd-n (and cmd-v for versions) work in the message pane of most browsers.\r\rUpper-case command keys\r\t(use with Shift-Cmd, or Ctrl on Mac\r\tor Shift-Alt on other platforms; sometimes Ctrl works too)\rA\tAdvance argument\rB\tBrowse it in this same browser (in System browsers only)\rC\tCompare argument to clipboard\rD\tDuplicate\rE\tMethod strings containing it\rF\tInsert 'ifFalse:'\rG\tfileIn from it (a file name)\rH\tcursor TopHome:\rI\tInspect via Object Explorer\rJ\tAgain many (apply the previous text command repeatedly until the end of the text)\rK\tSet style\rL\tOutdent (move selection one tab-stop left)\rM\tSelect current type-in\rN\tReferences to it (selection is a class name, or cursor is over a class-list or message-list)\rO\tOpen single-message browser (in message lists)\rP\tMake project link\rR\tIndent (move selection one tab-stap right)\rS\tSearch\rT\tInsert 'ifTrue:'\rU\tConvert linefeeds to carriage returns in selection\rV\tPaste author's initials\rW\tSelectors containing it (in text); show-world-menu (when issued with cursor over desktop)\rX\tForce selection to lowercase\rY\tForce selection to uppercase\rZ\tCapitalize all words in selection\r\rOther special keys\rBackspace\tBackward delete character\rDel\t\t\tForward delete character\rShift-Bksp\tBackward delete word\rShift-Del\tForward delete word\rEsc\t\t\tPop up the Desktop Menu\r\\\t\t\tSend top window to back\r\rCursor keys\rleft, right,\rup, down\tMove cursor left, right, up or down\rCtrl-left\t\tMove cursor left one word\rCtrl-right\tMove cursor right one word\rHome\t\tMove cursor to begin of line or begin of text\rEnd\t\t\tMove cursor to end of line or end of text\rPgUp, Ctrl-up\tMove cursor up one page\rPgDown, Ctrl-Dn\tMove cursor down one page\r\rNote all these keys can be used together with Shift to define or enlarge the selection. You cannot however shrink that selection again, as in some other systems.\r\rOther Cmd-key combinations (not available on all platforms)\rReturn\t\tInsert return followed by as many tabs as the previous line\r\t\t\t(with a further adjustment for additional brackets in that line)\rSpace\t\tSelect the current word as with double clicking\r\rEnclose the selection in a kind of bracket.  Each is a toggle.\r\t(not available on all platforms)\rCtrl-(\tEnclose within ( and ), or remove enclosing ( and )\rCtrl-[\tEnclose within [ and ], or remove enclosing [ and ]\rCrtl-{\tEnclose within { and }, or remove enclosing { and }\rCtrl-<\tEnclose within < and >, or remove enclosing < and >\rCtrl-'\tEnclose within ' and ', or remove enclosing ' and '\rCtrl-\"\"\tEnclose within \"\" and \"\", or remove enclosing \"\" and \"\"\rNote also that you can double-click just inside any of the above delimiters,\ror at the beginning or end of a line, to select the text enclosed.\r\rText Emphasis\r\t(not available on all platforms)\rCmd-1\t10 point font\rCmd-2\t12 point font\rCmd-3\t18 point font\rCmd-4\t24 point font\rCmd-5\t36 point font\rCmd-6\tcolor, action-on-click, link to class comment, link to method, url\r\t\tBrings up a menu.  To remove these properties, select\r\t\tmore than the active part and then use command-0.\rCmd-7\tbold\rCmd-8\titalic\rCmd-9\tnarrow (same as negative kern)\rCmd-0\tplain text (resets all emphasis)\rCmd--\tunderlined (toggles it)\rCmd-=\tstruck out (toggles it)\r\rShift-Cmd--\t(aka _) negative kern (letters 1 pixel closer)\rShift-Cmd-+\tpositive kern (letters 1 pixel larger spread)\r\"! !\r\r!Utilities class methodsFor: 'support windows' stamp: 'dgd 9/21/2003 15:12'!\ropenCommandKeyHelp\r\t\"Open a window giving command key help.\"\r\t\"Utilities openCommandKeyHelp\"\r\r\t(StringHolder new contents: self commandKeyMappings)\r\t\topenLabel: 'Command Key Actions' translated\r! !\r\r!Utilities class methodsFor: 'support windows' stamp: 'di 9/23/1998 02:02'!\ropenStandardWorkspace \r\t\"Open up a throwaway workspace with useful expressions in it.  1/22/96 sw\"\r\t\"Utilities openStandardWorkspace\"\r\r\t(StringHolder new contents: self standardWorkspaceContents)\r\t\topenLabel: 'Useful Expressions ', Date today printString! !\r\r!Utilities class methodsFor: 'support windows' stamp: 'sw 1/19/2000 13:59'!\rstandardWorkspaceContents\r\t^ self class firstCommentAt: #standardWorkspaceContents\r\r\t\"Smalltalk recover: 10000.\rChangeList browseRecentLog.\rChangeList browseRecent: 2000.\r\rPreferences editAnnotations.\rUtilities reinstateDefaultFlaps. \rPreferences resetCategoryInfo\r\r(FileStream oldFileNamed: 'Lives of the Wolves') edit.\r(FileStream oldFileNamed: 'tuesdayFixes.cs') fileIn\rChangeList browseFile: 'myChanges.st'\r\rTextStyle default fontAt: 7 put: (StrikeFont new readMacFontHex: 'Cairo 18')\r\rStandardSystemView browseAllAccessesTo: 'maximumSize'.\rStandardSystemView doCacheBits  \"\"restore fast windows mode in mvc\"\"\r\rSymbol selectorsContaining: 'rsCon'.\rSmalltalk browseMethodsWhoseNamesContain: 'screen'.\r\rBrowser newOnClass: Utilities.\rBrowser fullOnClass: SystemDictionary.\r\rFormView allInstances inspect.\rStandardSystemView someInstance inspect.\r\rUtilities storeTextWindowContentsToFileNamed: 'TextWindows'\rUtilities reconstructTextWindowsFromFileNamed: 'TextWindows'\r\rScriptingSystem resetStandardPartsBin.\rScheduledControllers screenController openMorphicConstructionWorld.\rScheduledControllers screenController openMorphicWorld.\r\rSystemOrganization categoryOfElement: #Controller. \rParagraphEditor organization categoryOfElement: #changeEmphasis.\r\rCursor wait showWhile: [Sensor waitButton].\r\rSmalltalk bytesLeft asStringWithCommas.\rSymbol instanceCount. \rTime millisecondsToRun:\r\t[Smalltalk allCallsOn: #asOop]\rMessageTally spyOn: [Smalltalk allCallsOn: #asOop].\r\r\"\r\r\"Utilities openStandardWorkspace\"! !\r\r\r!Utilities class methodsFor: 'user interface' stamp: 'BG 11/11/2003 10:12'!\rinformUser: aString during: aBlock\r\t\"Display a message above (or below if insufficient room) the cursor during execution of the given block.\"\r\t\"Utilities informUser: 'Just a sec!!' during: [(Delay forSeconds: 1) wait]\"\r\r\r\t(SelectionMenu labels: '')\r\t\tdisplayAt: Sensor cursorPoint\r\t\twithCaption: aString\r\t\tduring: [aBlock value]! !\r\r!Utilities class methodsFor: 'user interface' stamp: 'ssa 9/3/2008 11:13'!\rinformUserDuring: aBlock\r\t\"Display a message above (or below if insufficient room) the cursor during execution of the given block.\"\r\t\"Utilities informUserDuring:[:bar|\r\t\t#(one two three) do:[:info|\r\t\t\tbar value: info.\r\t\t\t(Delay forSeconds: 1) wait]]\"\r\taBlock value:[:string| Transcript cr; show: string]! !\r\r\r!Utilities class methodsFor: 'vm statistics' stamp: 'nk 2/15/2004 09:35'!\rvmStatisticsReportString\r\t\"StringHolderView open: (StringHolder new contents:\r\t\tUtilities vmStatisticsReportString) label: 'VM Statistics'\"\r\r\tself deprecated: 'Use SmalltalkImage current  vmStatisticsReportString'.\r\r\t^SmalltalkImage current vmStatisticsReportString! !\rModel subclass: #ValueHolder\r\tinstanceVariableNames: 'contents'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-ST80 Remnants'!\r\r!ValueHolder methodsFor: 'as yet unclassified' stamp: 'ls 8/5/1998 07:49'!\rcontents\r\t^contents! !\r\r!ValueHolder methodsFor: 'as yet unclassified' stamp: 'sw 1/28/1999 12:35'!\rcontents: newContents\r\tcontents _ newContents.\r\tself contentsChanged! !\rObjectWithDocumentation subclass: #Variable\r\tinstanceVariableNames: 'defaultValue floatPrecision variableName variableType'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Protocols-Kernel'!\r\r!Variable methodsFor: 'name' stamp: 'sw 5/3/2001 00:04'!\rprintOn: aStream\r\t\"Print the receiver on the stream\"\r\r\tsuper printOn: aStream.\r\taStream nextPutAll: ' named ', (self variableName ifNil: ['<unnamed>']), ' type = ', variableType printString! !\r\r!Variable methodsFor: 'name' stamp: 'sw 12/11/2000 14:07'!\rvariableName\r\t\"Answer the variable name of the receiver\"\r\r\t^ variableName! !\r\r\r!Variable methodsFor: 'type' stamp: 'sw 12/11/2000 14:06'!\rvariableType\r\t\"Anser the variable type of the receiver\"\r\r\t^ variableType! !\r\r\r!Variable methodsFor: 'value' stamp: 'sw 12/11/2000 14:06'!\rdefaultValue\r\t\"Answer the default value to be supplied to the receiver\"\r\r\t^ defaultValue! !\rLeafNode subclass: #VariableNode\r\tinstanceVariableNames: 'name'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Compiler'!\r!VariableNode commentStamp: '<historical>' prior: 0!\rI am a parse tree leaf representing a variable. Note that my name and key are different for pool variables: the key is the Object Reference.!\r\r\r!VariableNode methodsFor: 'initialize-release'!\rasStorableNode: encoder\r\t^ self! !\r\r!VariableNode methodsFor: 'initialize-release' stamp: 'tk 9/28/2001 11:33'!\rname: string\r\t\"Change name\"\r\r\tname _ string.\r! !\r\r!VariableNode methodsFor: 'initialize-release'!\rname: varName index: i type: type\r\t\"Only used for initting instVar refs\"\r\tname _ varName.\r\tself key: varName\r\t\tindex: i\r\t\ttype: type! !\r\r!VariableNode methodsFor: 'initialize-release'!\rname: string key: object code: byte\r\t\"Only used for initting std variables, nil, true, false, self, etc.\"\r\tname _ string.\r\tkey _ object.\r\tcode _ byte! !\r\r!VariableNode methodsFor: 'initialize-release'!\rname: varName key: objRef index: i type: type\r\t\"Only used for initting global (litInd) variables\"\r\tname _ varName.\r\tself key: objRef\r\t\tindex: i\r\t\ttype: type! !\r\r\r!VariableNode methodsFor: 'testing'!\rassignmentCheck: encoder at: location\r\r\t(encoder cantStoreInto: name)\r\t\tifTrue: [^ location]\r\t\tifFalse: [^ -1]\r! !\r\r!VariableNode methodsFor: 'testing'!\rcanBeSpecialArgument\r\t\"Can I be an argument of (e.g.) ifTrue:?\"\r\r\t^code < LdNil! !\r\r!VariableNode methodsFor: 'testing' stamp: 'ar 8/14/2001 23:00'!\rindex\r\t\"This code attempts to reconstruct the index from its encoding in code.\"\r\tcode < 0 ifTrue:[^nil].\r\tcode > 256 ifTrue:[^code \\\\ 256].\r\t^code - self type! !\r\r!VariableNode methodsFor: 'testing' stamp: 'tk 1/30/2001 14:04'!\risSelfPseudoVariable\r\t\"Answer if this ParseNode represents the 'self' pseudo-variable.\"\r\r\t^ (key = 'self') | (name = '{{self}}')! !\r\r!VariableNode methodsFor: 'testing'!\risVariableReference\r\r\t^true! !\r\r!VariableNode methodsFor: 'testing' stamp: 'di 2/3/1999 09:41'!\rtype\r\t\"This code attempts to reconstruct the type from its encoding in code.\r\t\tThis allows one to test, for instance, (aNode type = LdInstType).\"\r\t| type |\r\tcode < 0 ifTrue: [^ code negated].\r\tcode < 256 ifFalse: [^ code // 256].\r\ttype _ CodeBases findFirst: [:one | code < one].\r\ttype = 0\r\t\tifTrue: [^ 5]\r\t\tifFalse: [^ type - 1]! !\r\r\r!VariableNode methodsFor: 'code generation'!\remitForReturn: stack on: strm\r\r\t(code >= LdSelf and: [code <= LdNil])\r\t\tifTrue: \r\t\t\t[\"short returns\"\r\t\t\tstrm nextPut: EndMethod - 4 + (code - LdSelf).\r\t\t\tstack push: 1 \"doesnt seem right\"]\r\t\tifFalse: \r\t\t\t[super emitForReturn: stack on: strm]! !\r\r!VariableNode methodsFor: 'code generation'!\remitForValue: stack on: strm\r\r\tcode < 256\r\t\tifTrue: \r\t\t\t[strm nextPut: (code = LdSuper ifTrue: [LdSelf] ifFalse: [code]).\r\t\t\tstack push: 1]\r\t\tifFalse: \r\t\t\t[self emitLong: LoadLong on: strm.\r\t\t\tstack push: 1]! !\r\r!VariableNode methodsFor: 'code generation' stamp: 'ar 8/14/2001 23:14'!\remitLoad: stack on: strm\r\t\"Do nothing\"! !\r\r!VariableNode methodsFor: 'code generation'!\remitStore: stack on: strm\r\r\tself emitLong: Store on: strm! !\r\r!VariableNode methodsFor: 'code generation'!\remitStorePop: stack on: strm\r\t(code between: 0 and: 7)\r\t\tifTrue: \r\t\t\t[strm nextPut: ShortStoP + code \"short stopop inst\"]\r\t\tifFalse:\r\t\t\t[(code between: 16 and: 23)\r\t\t\t\tifTrue: [strm nextPut: ShortStoP + 8 + code - 16 \"short stopop temp\"]\r\t\t\t\tifFalse: [(code >= 256 and: [code \\\\ 256 > 63 and: [code // 256 = 4]])\r\t\t\t\t\t\tifTrue: [self emitLong: Store on: strm. strm nextPut: Pop]\r\t\t\t\t\t\tifFalse: [self emitLong: StorePop on: strm]]].\r\tstack pop: 1! !\r\r!VariableNode methodsFor: 'code generation' stamp: 'di 2/6/2000 10:52'!\rfieldOffset  \"Return temp or instVar offset for this variable\"\r\r\tcode < 256\r\t\tifTrue: \r\t\t\t[^ code \\\\ 16]\r\t\tifFalse: \r\t\t\t[^ code \\\\ 256]! !\r\r!VariableNode methodsFor: 'code generation'!\rsizeForReturn: encoder\r\r\t(code >= LdSelf and: [code <= LdNil])\r\t\tifTrue: [\"short returns\" ^1].\r\t^super sizeForReturn: encoder! !\r\r!VariableNode methodsFor: 'code generation'!\rsizeForStore: encoder\r\tself reserve: encoder.\r\tcode < 256 ifTrue: [^ 2].\r\t(code \\\\ 256) <= 63 ifTrue: [^ 2].\r\t^ 3! !\r\r!VariableNode methodsFor: 'code generation'!\rsizeForStorePop: encoder\r\tself reserve: encoder.\r\t(code < 24 and: [code noMask: 8]) ifTrue: [^ 1].\r\tcode < 256 ifTrue: [^ 2].\r\tcode \\\\ 256 <= 63 ifTrue: [^ 2].  \"extended StorePop\"\r\tcode // 256 = 1 ifTrue: [^ 3].  \"dbl extended StorePopInst\"\r\tcode // 256 = 4 ifTrue: [^ 4].  \"dbl extended StoreLitVar , Pop\"\r\tself halt.  \"Shouldn't get here\"! !\r\r\r!VariableNode methodsFor: 'printing' stamp: 'di 4/5/2000 15:11'!\rprintOn: aStream indent: level \r\taStream withStyleFor: #variable\r\t\tdo: [aStream nextPutAll: name].\r! !\r\r\r!VariableNode methodsFor: 'accessing' stamp: 'tk 1/30/2001 13:45'!\rname\r\t^ name! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rVariableNode class\r\tinstanceVariableNames: ''!\r\r!VariableNode class methodsFor: 'class initialization'!\rinitialize    \"VariableNode initialize.  Decompiler initialize\"\r\t| encoder |\r\tencoder _ Encoder new.\r\tStdVariables _ Dictionary new: 16.\r\tencoder\r\t\tfillDict: StdVariables\r\t\twith: VariableNode\r\t\tmapping: #('self' 'thisContext' 'super' 'nil' 'false' 'true' )\r\t\tto: (Array with: LdSelf with: LdThisContext with: LdSuper)\r\t\t\t\t, (Array with: LdNil with: LdFalse with: LdTrue).\r\tStdSelectors _ Dictionary new: 64.\r\tencoder\r\t\tfillDict: StdSelectors\r\t\twith: SelectorNode\r\t\tmapping: ((1 to: Smalltalk specialSelectorSize) collect: \r\t\t\t\t\t\t\t[:i | Smalltalk specialSelectorAt: i])\r\t\tto: (SendPlus to: SendPlus + 31).\r\tStdLiterals _ LiteralDictionary new: 16.\r\tencoder\r\t\tfillDict: StdLiterals\r\t\twith: LiteralNode\r\t\tmapping: #(-1 0 1 2 )\r\t\tto: (LdMinus1 to: LdMinus1 + 3).\r\tencoder initScopeAndLiteralTables.\r\r\tNodeNil _ encoder encodeVariable: 'nil'.\r\tNodeTrue _ encoder encodeVariable: 'true'.\r\tNodeFalse _ encoder encodeVariable: 'false'.\r\tNodeSelf _ encoder encodeVariable: 'self'.\r\tNodeThisContext _ encoder encodeVariable: 'thisContext'.\r\tNodeSuper _ encoder encodeVariable: 'super'! !\rMagnitude subclass: #VersionNumber\r\tinstanceVariableNames: 'numbers'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'VersionNumber'!\r!VersionNumber commentStamp: '<historical>' prior: 0!\rI am a version number.  My representation allows me to handle an entire tree of versions.  Once created, an instance should not change (note: VersionNumbers could be canonicalized like Symbols, but are not currently).  \r\n\r\nI am a magnitude so that you can see if one version preceeds another (only if the two versions are in the same branch).  \r\n\r\n\t'2.1' asVersion < '2.2.1' asVersion\t\"true\"\r\n\t'2.3' asVersion < '2.2.1' asVersion\t\"error different branches\"\r\n\t'2.3' asVersion inSameBranchAs: '2.2.1' asVersion\t\"false, why the previous one failed.\"\t\r\n\t'2.1' asVersion = '2.1' asVersion\t\t\"true, obviously\"\r\n\r\nTo get the next version number in the same branch:\r\n\r\n\t'2.3.4' asVersion next\t\"2.3.5\"\r\n\r\nTo get the next version number, starting a new branch:\r\n\r\n\t'2.3.4' asVersion branchNext\t\t\"2.3.4.1\"\r\n\r\nTo get the common base version of any two version numbers (useful for merging):\r\n\r\n\t'2.3.8' asVersion commonBase: '2.3.4.1' asVersion\t\t\"2.3.4\"!\r\r\r!VersionNumber methodsFor: 'comparing' stamp: 'svp 6/18/2002 15:05'!\r< another \r\n\t\"Answer whether the receiver is less than the argument.\"\r\n\r\n\t| tmp |\r\n\t(self inSameBranchAs: another) ifFalse: \r\n\t\t[^self error: 'Receiver and argument in different branches'].\r\n\r\n\ttmp := another numbers.\r\n\t(tmp size = numbers size) ifTrue:\r\n\t\t[1 to: numbers size do: \r\n\t\t\t[ :in | (numbers at: in) < (tmp at: in) ifTrue: [^true]].\r\n\t\t^false].\r\n\r\n\t^numbers size < tmp size\r\n! !\r\r!VersionNumber methodsFor: 'comparing' stamp: 'svp 6/18/2002 15:10'!\r= aVersion\r\n\r\n\t^numbers = aVersion numbers! !\r\r!VersionNumber methodsFor: 'comparing' stamp: 'svp 6/18/2002 12:23'!\rhash\r\n\r\n\t^numbers hash! !\r\r\r!VersionNumber methodsFor: 'accessing' stamp: 'svp 6/18/2002 12:14'!\rnext\r\n\r\n\t| tmp |\r\n\ttmp := numbers copy.\r\n\ttmp at: numbers size put: (numbers last + 1).\r\n\t^self class fromCollection: tmp! !\r\r!VersionNumber methodsFor: 'accessing' stamp: 'svp 6/18/2002 14:51'!\rnumbers\r\n\t\"Answer a copy (to discourage people from directly changing a version number).\r\n\tVersionNumbers should never change, instead, instantiate a new instance.\"\r\n\r\n\t^numbers copy! !\r\r\r!VersionNumber methodsFor: 'testing' stamp: 'svp 6/18/2002 14:57'!\rinSameBranchAs: aVersion\r\n\r\n\t| less more |\r\n\t(aVersion numbers size <= numbers size) \r\n\t\tifTrue: [less := aVersion numbers. more := numbers] \r\n\t\tifFalse: [less := numbers. more := aVersion numbers].\r\n\r\n\t1 to: (less size - 1) do: [ :in | ((less at: in) = (more at: in)) ifFalse: [^false]].\r\n\t^less size = more size or:\r\n\t\t[(less at: less size) <= (more at: less size)]\r\n! !\r\r\r!VersionNumber methodsFor: 'initialization' stamp: 'svp 6/18/2002 15:08'!\rinitializeNumbers: aCollection\r\n\r\n\taCollection do: [ :ea | \r\n\t\tea <= 0 ifTrue: \r\n\t\t\t[^self error: 'VersionNumbers cannot contain zero or negative numbers']].\r\n\r\n\tnumbers := aCollection asArray! !\r\r\r!VersionNumber methodsFor: 'printing' stamp: 'svp 6/18/2002 12:27'!\rprintOn: strm\r\n\r\n\tself storeOn: strm! !\r\r!VersionNumber methodsFor: 'printing' stamp: 'svp 6/18/2002 17:24'!\rstoreOn: strm\r\n\r\n\tstrm nextPut: $'.\r\n\tself versionStringOn: strm.\r\n\tstrm nextPutAll: ''' asVersion'.! !\r\r\r!VersionNumber methodsFor: '*smbase-override' stamp: 'svp 6/18/2002 17:23'!\rversionStringOn: strm\r\r\t| first |\r\tfirst := true.\r\tnumbers do: [ :ea |\r\t\tfirst ifFalse: [strm nextPut: $.].\r\t\tfirst := false.\r\t\tea printOn: strm]\r\t! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rVersionNumber class\r\tinstanceVariableNames: ''!\r\r!VersionNumber class methodsFor: 'as yet unclassified' stamp: 'svp 6/18/2002 16:34'!\rfirst\r\n\r\n\t^self fromCollection: #(1)! !\r\r!VersionNumber class methodsFor: 'as yet unclassified' stamp: 'svp 6/18/2002 12:21'!\rfromCollection: aCollection\r\n\r\n\t^self new\r\n\t\tinitializeNumbers: aCollection;\r\n\t\tyourself! !\r\r!VersionNumber class methodsFor: 'as yet unclassified' stamp: 'svp 6/18/2002 12:20'!\rfromString: aString\r\n\r\n\t^self fromCollection: \r\n\t\t((aString findTokens: '.') collect: [:ea | ea asNumber ])\r\n\t! !\rChangeList subclass: #VersionsBrowser\r\tinstanceVariableNames: 'classOfMethod selectorOfMethod addedChangeRecord'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tools-Changes'!\r!VersionsBrowser commentStamp: 'nk 11/25/2003 10:04' prior: 0!\rVersionsBrowser shows all the versions of a particular method, and lets you compare them, revert to selected versions, and so on.!\r\r\r!VersionsBrowser methodsFor: 'init & update' stamp: 'nk 1/7/2004 10:10'!\raddedChangeRecord\r\t^addedChangeRecord! !\r\r!VersionsBrowser methodsFor: 'init & update' stamp: 'nk 1/7/2004 10:23'!\raddedChangeRecord: aChangeRecord\r\taddedChangeRecord _ aChangeRecord.\r\tself reformulateList.! !\r\r!VersionsBrowser methodsFor: 'init & update' stamp: 'sw 5/6/2000 01:16'!\rchangeListButtonSpecs\r\r\t^#(\r\t\t('compare to current'\r\t\tcompareToCurrentVersion\r\t\t'opens a separate window which shows the text differences between the selected version and the current version')\r\r\t\t('revert'\r\t\tfileInSelections\r\t\t'reverts the method to the version selected')\r\r\t\t('remove from changes'\r\t\tremoveMethodFromChanges\r\t\t'remove this method from the current change set')\r\r\t\t('help'\r\t\tofferVersionsHelp\r\t\t'further explanation about use of Versions browsers')\r\t\t)! !\r\r!VersionsBrowser methodsFor: 'init & update' stamp: 'sw 11/28/1999 22:50'!\rreformulateList\r\t| aMethod |\r\t\"Some uncertainty about how to deal with lost methods here\"\r\taMethod _ classOfMethod compiledMethodAt: selectorOfMethod ifAbsent: [^ self].\r\t\r\tself scanVersionsOf: aMethod class: classOfMethod theNonMetaClass meta: classOfMethod isMeta category: (classOfMethod whichCategoryIncludesSelector: selectorOfMethod) selector: selectorOfMethod.\r\tself changed: #list. \"for benefit of mvc\"\r\tlistIndex _ 1.\r\tself changed: #listIndex.\r\tself contentsChanged\r! !\r\r!VersionsBrowser methodsFor: 'init & update' stamp: 'nk 1/7/2004 10:29'!\rscanVersionsOf: method class: class meta: meta category: category selector: selector\r\t| position prevPos prevFileIndex preamble tokens sourceFilesCopy stamp |\r\tselectorOfMethod _ selector.\r\tcurrentCompiledMethod _ method.\r\tclassOfMethod _ meta ifTrue: [class class] ifFalse: [class].\r\tchangeList _ OrderedCollection new.\r\tlist _ OrderedCollection new.\r\tself addedChangeRecord ifNotNilDo: [ :change |\r\t\tself addItem: change text: ('{1} (in {2})' translated format: { change stamp. change fileName }) ].\r\tlistIndex _ 0.\r\tposition _ method filePosition.\r\tsourceFilesCopy _ SourceFiles collect:\r\t\t[:x | x isNil ifTrue: [ nil ]\r\t\t\t\tifFalse: [x readOnlyCopy]].\r\tmethod fileIndex == 0 ifTrue: [^ nil].\r\tfile _ sourceFilesCopy at: method fileIndex.\r\t[position notNil & file notNil]\r\t\twhileTrue:\r\t\t[file position: (0 max: position-150).  \"Skip back to before the preamble\"\r\t\t[file position < (position-1)]  \"then pick it up from the front\"\r\t\t\twhileTrue: [preamble _ file nextChunk].\r\r\t\t\"Preamble is likely a linked method preamble, if we're in\r\t\t\ta changes file (not the sources file).  Try to parse it\r\t\t\tfor prior source position and file index\"\r\t\tprevPos _ nil.\r\t\tstamp _ ''.\r\t\t(preamble findString: 'methodsFor:' startingAt: 1) > 0\r\t\t\tifTrue: [tokens _ Scanner new scanTokens: preamble]\r\t\t\tifFalse: [tokens _ Array new  \"ie cant be back ref\"].\r\t\t((tokens size between: 7 and: 8)\r\t\t\tand: [(tokens at: tokens size-5) = #methodsFor:])\r\t\t\tifTrue:\r\t\t\t\t[(tokens at: tokens size-3) = #stamp:\r\t\t\t\tifTrue: [\"New format gives change stamp and unified prior pointer\"\r\t\t\t\t\t\tstamp _ tokens at: tokens size-2.\r\t\t\t\t\t\tprevPos _ tokens last.\r\t\t\t\t\t\tprevFileIndex _ sourceFilesCopy fileIndexFromSourcePointer: prevPos.\r\t\t\t\t\t\tprevPos _ sourceFilesCopy filePositionFromSourcePointer: prevPos]\r\t\t\t\tifFalse: [\"Old format gives no stamp; prior pointer in two parts\"\r\t\t\t\t\t\tprevPos _ tokens at: tokens size-2.\r\t\t\t\t\t\tprevFileIndex _ tokens last].\r\t\t\t\t(prevPos = 0 or: [prevFileIndex = 0]) ifTrue: [prevPos _ nil]].\r\t\t((tokens size between: 5 and: 6)\r\t\t\tand: [(tokens at: tokens size-3) = #methodsFor:])\r\t\t\tifTrue:\r\t\t\t\t[(tokens at: tokens size-1) = #stamp:\r\t\t\t\tifTrue: [\"New format gives change stamp and unified prior pointer\"\r\t\t\t\t\t\tstamp _ tokens at: tokens size]].\r \t\tself addItem:\r\t\t\t\t(ChangeRecord new file: file position: position type: #method\r\t\t\t\t\t\tclass: class name category: category meta: meta stamp: stamp)\r\t\t\ttext: stamp , ' ' , class name , (meta ifTrue: [' class '] ifFalse: [' ']) , selector.\r\t\tposition _ prevPos.\r\t\tprevPos notNil ifTrue:\r\t\t\t[file _ sourceFilesCopy at: prevFileIndex]].\r\tsourceFilesCopy do: [:x | x notNil ifTrue: [x close]].\r\tlistSelections _ Array new: list size withAll: false! !\r\r!VersionsBrowser methodsFor: 'init & update' stamp: 'di 11/28/2000 01:25'!\rupdateListsAndCodeIn: aWindow\r\t| aMethod |\r\taMethod _ classOfMethod compiledMethodAt: selectorOfMethod ifAbsent: [^ false].\r\taMethod == currentCompiledMethod\r\t\tifFalse:\r\t\t\t[\"Do not attempt to formulate if there is no source pointer.\r\t\t\tIt probably means it has been recompiled, but the source hasn't been written\r\t\t\t(as during a display of the 'save text simply?' confirmation).\"\r\t\t\taMethod last ~= 0 ifTrue: [self reformulateList]].\r\t^ true\r! !\r\r\r!VersionsBrowser methodsFor: 'menu' stamp: 'sw 2/27/2001 08:46'!\rchangeListKey: aChar from: view\r\t\"Respond to a Command key in the list pane. of the versions browser\"\r\r\t^ self messageListKey: aChar from: view! !\r\r!VersionsBrowser methodsFor: 'menu' stamp: 'sw 10/12/1999 17:51'!\rfileInSelections \r\tsuper fileInSelections.\r\tself reformulateList! !\r\r!VersionsBrowser methodsFor: 'menu' stamp: 'BG 10/28/2003 20:49'!\rversionsMenu: aMenu\r\t\"Fill aMenu with menu items appropriate to the receiver\"\r\r\t^ aMenu addList: #(\r\r\t\t('compare to current'\t\tcompareToCurrentVersion\t\t'compare selected version to the current version')\r\t\t('revert to selected version'\tfileInSelections\t\t\t\t\t'resubmit the selected version, so that it becomes the current version')\r\t\t('remove from changes'\t\tremoveMethodFromChanges\t\t'remove this method from the current change set, if present')\r\t\t('edit current method (O)'\topenSingleMessageBrowser\t\t'open a single-message browser on the current version of this method')\t\t\r\t\t('find original change set'\t\tfindOriginalChangeSet\t\t'locate the changeset which originally contained this version')\r\t\t-\r\t\t('toggle diffing (D)'\t\t\ttoggleDiffing\t\t\t\t\t'toggle whether or not diffs should be shown here')\r\t\t('update list'\t\t\t\treformulateList\t\t\t\t\t'reformulate the list of versions, in case it somehow got out of synch with reality')\r\t\t-\r\t\t('senders (n)'\t\t\t\tbrowseSenders\t\t\t\t\t'browse all senders of this selector')\r\t\t('implementors (m)'\t\t\tbrowseImplementors\t\t\t\t'browse all implementors of this selector')\r\t\t-\r\t\t('help...'\t\t\t\t\tofferVersionsHelp\t\t\t\t'provide an explanation of the use of this tool'))\r! !\r\r\r!VersionsBrowser methodsFor: 'misc' stamp: 'sw 2/27/2001 08:17'!\raddPriorVersionsCountForSelector: aSelector ofClass: aClass to: aStream\r\t\"Add an annotation detailing the prior versions count.  Specially handled here for the case of a selector no longer in the system, whose prior versions are seen in a versions browser -- in this case, the inherited version of this method will not work.\"\r\r\t(aClass includesSelector: aSelector) ifTrue:\r\t\t[^ super addPriorVersionsCountForSelector: aSelector ofClass: aClass to: aStream].\r\r\taStream nextPutAll: \r\t\t((changeList size > 0\r\t\t\tifTrue:\r\t\t\t\t[changeList size == 1\r\t\t\t\t\tifTrue:\r\t\t\t\t\t\t['Deleted - one prior version']\r\t\t\t\t\tifFalse:\r\t\t\t\t\t\t['Deleted - ', changeList size printString, ' prior versions']]\r\t\t\tifFalse:\r\t\t\t\t['surprisingly, no prior versions']), self annotationSeparator)! !\r\r!VersionsBrowser methodsFor: 'misc' stamp: 'sw 8/17/2002 21:57'!\rclassCommentIndicated\r\t\"Answer whether the receiver is pointed at a class comment\"\r\r\t^ false! !\r\r!VersionsBrowser methodsFor: 'misc' stamp: 'sw 1/25/2001 07:03'!\rselectedClass\r\t\"Answer the class currently selected in the browser.  In the case of a VersionsBrowser, the class and selector are always the same, regardless of which version is selected and indeed whether or not any entry is selected in the list pane\"\r\r\t^ classOfMethod theNonMetaClass! !\r\r!VersionsBrowser methodsFor: 'misc' stamp: 'sw 1/25/2001 06:26'!\rselectedClassOrMetaClass\r\t\"Answer the class or metaclass currently selected in the browser.  In the case of a VersionsBrowser, the class and selector are always the same, regardless of which version is selected and indeed whether or not any entry is selected in the list pane\"\r\r\t^ classOfMethod! !\r\r!VersionsBrowser methodsFor: 'misc' stamp: 'sw 1/25/2001 06:10'!\rselectedMessageName\r\t\"Answer the message name currently selected in the browser.  In the case of a VersionsBrowser, the class and selector are always the same, regardless of which version is selected and indeed whether or not any entry is selected in the list pane\"\r\r\t^ selectorOfMethod! !\r\r!VersionsBrowser methodsFor: 'misc' stamp: 'sw 10/19/1999 15:04'!\rshowsVersions\r\t^ true! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rVersionsBrowser class\r\tinstanceVariableNames: ''!\r\r!VersionsBrowser class methodsFor: 'as yet unclassified' stamp: 'di 1/11/2000 12:45'!\rbrowseVersionsOf: method class: class meta: meta category: msgCategory selector: selector \r\t^ self browseVersionsOf: method class: class meta: meta category: msgCategory selector: selector lostMethodPointer: nil! !\r\r!VersionsBrowser class methodsFor: 'as yet unclassified' stamp: 'nk 1/7/2004 10:19'!\rbrowseVersionsOf: method class: class meta: meta category: msgCategory selector: selector lostMethodPointer: sourcePointer \r\t| changeList browser |\r\tCursor read showWhile:\r\t\t[changeList _ (browser _ self new)\r\t\t\tscanVersionsOf: method class: class meta: meta\r\t\t\tcategory: msgCategory selector: selector].\r\tchangeList ifNil: [ self inform: 'No versions available'. ^nil ].\r\r\tsourcePointer ifNotNil:\r\t\t[changeList setLostMethodPointer: sourcePointer].\r\r\tself open: changeList name: 'Recent versions of ' ,\rselector multiSelect: false.\r\r\t^browser! !\r\r!VersionsBrowser class methodsFor: 'as yet unclassified' stamp: 'sw 10/21/1999 17:21'!\rtimeStampFor: aSelector class: aClass reverseOrdinal: anInteger\r\t\"Answer the time stamp corresponding to some version of the given method, nil if none.  The reverseOrdinal parameter is interpreted as:  1 = current version; 2 = last-but-one version, etc.\"\r\t\r\t| method aChangeList |\r\tmethod _ aClass compiledMethodAt: aSelector ifAbsent: [^ nil].\r\taChangeList _ self new\r\t\t\tscanVersionsOf: method class: aClass meta: aClass isMeta\r\t\t\tcategory: nil selector: aSelector.\r\t^ aChangeList ifNil: [nil] ifNotNil:\r\t\t[aChangeList list size >= anInteger\r\t\t\tifTrue:\r\t\t\t\t[(aChangeList changeList at: anInteger) stamp]\r\t\t\tifFalse:\r\t\t\t\t[nil]]! !\r\r!VersionsBrowser class methodsFor: 'as yet unclassified' stamp: 'sw 10/19/1999 15:01'!\rversionCountForSelector: aSelector class: aClass\r\t\"Answer the number of versions known to the system for the given class and method, including the current version.  A result of greater than one means that there is at least one superseded version.  Answer zero if no logged version can be obtained.\"\r\t\r\t| method aChangeList |\r\tmethod _ aClass compiledMethodAt: aSelector ifAbsent: [^ 0].\r\taChangeList _ self new\r\t\t\tscanVersionsOf: method class: aClass meta: aClass isMeta\r\t\t\tcategory: nil selector: aSelector.\r\t^ aChangeList ifNil: [0] ifNotNil: [aChangeList list size]! !\r\rObject subclass: #View\r\tinstanceVariableNames: 'model controller superView subViews transformation viewport window displayTransformation insetDisplayBox borderWidth borderColor insideColor boundingBox'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Framework'!\r!View commentStamp: '<historical>' prior: 0!\rMy instances are intended to be components in a structured picture. Each View in the structured picture can contain other Views as sub-components. These sub-components are called subViews. A View can be a subView of only one View. This View is called its superView. The set of Views in a structured picture forms a hierarchy. The one View in the hierarchy that has no superView is called the topView of the structured picture. A View in a structured picture with no subViews is called a bottom View. A View and all of its subViews, and all of their subViews and so on, are treated as a unit in many operations on the View. For example, if a View is displayed, all of its subViews are displayed as well. There are several categories of operations that can be performed on a View. Among these are the following:\r\t\r\t1.\tAdding subViews to a View.\r\t2.\tPositioning subViews within a View.\r\t3.\tDeleting subViews from a View.\r\t4.\tTransforming a View.\r\t5.\tDisplaying a View.\r\t\rEach View has its own coordinate system. In order to change from one coordinate system to another, each View has two transformations associated with it. The local transformation is a WindowingTransformation that maps objects in the coordinate system of the View to objects in the coordinate system of the superView of the View. The displayTransformation is a WindowingTransformation that maps objects in the coordinate system of the View to objects in the display screen coordinate system.\r\t\rThe part of the space that is to be made visible is represented by the window of the View. The window of a View is a Rectangle expressed in the coordinate system of the View. The area occupied by a View in the coordinate system of its superView is called its viewport. The viewport of a View is its window transformed by its local transformation. The region of the display screen occupied by a View is called its displayBox. The display box of a View can include a border. The width of the border expressed in display screen coordinates is called the border width of the View. The color of the border is called the border color. The region of the display box of a View excluding the border is called the inset display box. The color of the inset display box is called the inside color of the View.!\r\r\r!View methodsFor: 'initialize-release'!\rinitialize\r\t\"Initialize the state of the receiver. Subclasses should include 'super \r\tinitialize' when redefining this message to insure proper initialization.\"\r\r\tself resetSubViews.\r\ttransformation _ WindowingTransformation identity.\r\tself borderWidth: 0! !\r\r!View methodsFor: 'initialize-release'!\rrelease\r\t\"Remove the receiver from its model's list of dependents (if the model\r\texists), and release all of its subViews. It is used to break possible cycles\r\tin the receiver and should be sent when the receiver is no longer needed.\r\tSubclasses should include 'super release.' when redefining release.\"\r\r\tmodel removeDependent: self.\r\tmodel _ nil.\r\tcontroller release.\r\tcontroller _ nil.\r\tsubViews ~~ nil ifTrue: [subViews do: [:aView | aView release]].\r\tsubViews _ nil.\r\tsuperView _ nil! !\r\r!View methodsFor: 'initialize-release'!\rsetDefaultBackgroundColor\r\t\"Obtain the background color from the receiver's model, unless the #uniformWindowColors preference is set to true, in which case obtain it from generic Object; and install it as the receiver's background color.  5/1/96 sw\"\r\r\t| colorToUse |\r\tcolorToUse _ Preferences uniformWindowColors\r\t\tifTrue:\r\t\t\t[Object new defaultBackgroundColor]\r\t\tifFalse:\r\t\t\t[model defaultBackgroundColor].\r\tself backgroundColor: colorToUse! !\r\r\r!View methodsFor: 'testing' stamp: 'tk 4/13/1998 22:58'!\rcanDiscardEdits\r\t\"Return true if this pane is not dirty.\"\r\r\t^ true\r! !\r\r!View methodsFor: 'testing'!\rcontainsPoint: aPoint\r\t\"Answer whether aPoint is within the receiver's display box. It is sent to \r\ta View's subViews by View|subViewAt: in order to determine which \r\tsubView contains the cursor point (so that, for example, control can be \r\tpass down to that subView's controller).\"\r\r\t^ self insetDisplayBox containsPoint: aPoint! !\r\r!View methodsFor: 'testing' stamp: 'jm 3/17/98 13:35'!\rhasUnacceptedEdits\r\t\"Return true if this view has unaccepted edits.\"\r\r\t^ false\r! !\r\r!View methodsFor: 'testing'!\risObscured\r\r\t| topController displayRect |\r\t(topController _ self topView controller)\r\t\t== ScheduledControllers activeController\r\t\t\tifTrue: [^false].\r\tdisplayRect _ self insetDisplayBox.\r\tScheduledControllers scheduledControllers do: [:ctrlr |\r\t\tctrlr == topController ifTrue: [^false].\r\t\t(displayRect intersects: ctrlr view insetDisplayBox)\r\t\t\tifTrue: [^true]].\r\tself error: 'not in ScheduledControllers'.\r\t^false! !\r\r\r!View methodsFor: 'model access'!\rmodel\r\t\"Answer the receiver's model.\"\r\r\t^model! !\r\r!View methodsFor: 'model access'!\rmodel: aModel \r\t\"Set the receiver's model to aModel. The model of the receiver's controller \r\tis also set to aModel.\"\r\r\tself model: aModel controller: controller! !\r\r\r!View methodsFor: 'superView access'!\risTopView\r\t\"Answer whether the receiver is a top view, that is, if it has no \r\tsuperView.\"\r\r\t^superView == nil! !\r\r!View methodsFor: 'superView access'!\rsuperView\r\t\"Answer the superView of the receiver.\"\r\r\t^superView! !\r\r!View methodsFor: 'superView access'!\rtopView\r\t\"Answer the root of the tree of Views in which the receiver is a node. \r\tThe root of the tree is found by going up the superView path until \r\treaching a View whose superView is nil.\"\r\r\tsuperView == nil\r\t\tifTrue: [^self]\r\t\tifFalse: [^superView topView]! !\r\r\r!View methodsFor: 'subView access'!\rfirstSubView\r\t\"Answer the first subView in the receiver's list of subViews if it is not \r\tempty, else nil.\"\r\r\tsubViews isEmpty\r\t\tifTrue: [^nil]\r\t\tifFalse: [^subViews first]! !\r\r!View methodsFor: 'subView access'!\rlastSubView\r\t\"Answer the last subView in the receiver's list of subViews if it is not \r\tempty, else nil.\"\r\r\tsubViews isEmpty\r\t\tifTrue: [^nil]\r\t\tifFalse: [^subViews last]! !\r\r!View methodsFor: 'subView access'!\rresetSubViews\r\t\"Set the list of subviews to an empty collection.\"\r\t\r\tsubViews _ OrderedCollection new! !\r\r!View methodsFor: 'subView access'!\rsubViewContaining: aPoint \r\t\"Answer the first subView that contains aPoint within its window and \r\tanswer nil, otherwise. It is typically sent from a Controller in order to \r\tdetermine where to pass control (usually to the Controller of the View \r\treturned by View|subViewContaining:).\"\r\r\tsubViews reverseDo: \r\t\t[:aSubView | \r\t\t(aSubView displayBox containsPoint: aPoint) ifTrue: [^aSubView]].\r\t^nil! !\r\r!View methodsFor: 'subView access'!\rsubViewSatisfying: aBlock\r\t\"Return the first subview that satisfies aBlock, or nil if none does.  1/31/96 sw\"\r\r\t^ subViews detect: [:aView | aBlock value: aView] ifNone: [nil]! !\r\r!View methodsFor: 'subView access'!\rsubViews\r\t\"Answer the receiver's collection of subViews.\"\r\r\t^subViews! !\r\r!View methodsFor: 'subView access'!\rtextEditorView\r\t\"Return the first view in the receiver whose controller is a ParagraphEdior, or nil if none.  1/31/96 sw\"\r\r\t(controller isKindOf: ParagraphEditor) ifTrue: [^ self].\r\t^ self subViewSatisfying:\r\t\t[:v | v textEditorView ~~ nil]! !\r\r\r!View methodsFor: 'controller access'!\rcontroller\r\t\"If the receiver's controller is nil (the default case), answer an initialized \r\tinstance of the receiver's default controller. If the receiver does not \r\tallow a controller, answer the symbol #NoControllerAllowed.\"\r\r\tcontroller == nil ifTrue: [self controller: self defaultController].\r\t^controller! !\r\r!View methodsFor: 'controller access'!\rcontroller: aController \r\t\"Set the receiver's controller to aController. #NoControllerAllowed can be \r\tspecified to indicate that the receiver will not have a controller. The \r\tmodel of aController is set to the receiver's model.\"\r\r\tself model: model controller: aController! !\r\r!View methodsFor: 'controller access'!\rdefaultController\r\t\"Answer an initialized instance of the receiver's default controller. \r\tSubclasses should redefine this message only if the default controller \r\tinstances need to be initialized in a nonstandard way.\"\r\r\t^self defaultControllerClass new! !\r\r!View methodsFor: 'controller access'!\rdefaultControllerClass\r\t\"Answer the class of the default controller for the receiver. Subclasses \r\tshould redefine View|defaultControllerClass if the class of the default \r\tcontroller is not Controller.\"\r\r\t^Controller! !\r\r!View methodsFor: 'controller access'!\rmodel: aModel controller: aController \r\t\"Set the receiver's model to aModel, add the receiver to aModel's list of \r\tdependents, and set the receiver's controller to aController. Subsequent \r\tchanges to aModel (see Model|change) will result in View|update: \r\tmessages being sent to the receiver. #NoControllerAllowed for the value \r\tof aController indicates that no default controller is available; nil for the \r\tvalue of aController indicates that the default controller is to be used \r\twhen needed. If aController is neither #NoControllerAllowed nor nil, its \r\tview is set to the receiver and its model is set to aModel.\"\r\r\tmodel ~~ nil & (model ~~ aModel)\r\t\tifTrue: [model removeDependent: self].\r\taModel ~~ nil & (aModel ~~ model)\r\t\tifTrue: [aModel addDependent: self].\r\tmodel _ aModel.\r\taController ~~ nil\r\t\tifTrue: \r\t\t\t[aController view: self.\r\t\t\taController model: aModel].\r\tcontroller _ aController! !\r\r\r!View methodsFor: 'basic control sequence'!\rsubViewWantingControl\r\t\"Answer the first subView that has a controller that now wants control.\"\r\r\tsubViews reverseDo: \r\t\t[:aSubView | aSubView controller isControlWanted ifTrue: [^aSubView]].\r\t^nil! !\r\r\r!View methodsFor: 'window access'!\rdefaultWindow\r\t\"Build the minimum Rectangle that encloses all the windows of the \r\treceiver's subViews. The answer is a Rectangle obtained by expanding \r\tthis minimal Rectangle by the borderWidth of the receiver. If the \r\treceiver has no subViews, then a Rectangle enclosing the entire display \r\tscreen is answered. It is used internally by View methods if no window \r\thas been specified for the View. Specialized subclasses of View should \r\tredefine View|defaultWindow to handle the default case for instances \r\tthat have no subViews.\"\r\r\t| aRectangle |\r\tsubViews isEmpty ifTrue: [^DisplayScreen boundingBox].\r\taRectangle _ self firstSubView viewport.\r\tsubViews do: [:aView | aRectangle _ aRectangle merge: aView viewport].\r\t^aRectangle expandBy: borderWidth! !\r\r!View methodsFor: 'window access'!\rinsetWindow\r\t\"Answer a Rectangle that is obtained by insetting the receiver's window \r\trectangle by the border width.\"\r\r\t^self getWindow insetBy: borderWidth! !\r\r!View methodsFor: 'window access'!\rwindow\r\t\"Answer a copy of the receiver's window.\"\r\r\t^self getWindow copy! !\r\r!View methodsFor: 'window access'!\rwindow: aWindow \r\t\"Set the receiver's window to a copy of aWindow.\"\r\r\tself setWindow: aWindow copy! !\r\r\r!View methodsFor: 'viewport access'!\rviewport\r\t\"Answer a copy of the receiver's viewport.\"\r\r\t^self getViewport copy! !\r\r\r!View methodsFor: 'display box access'!\rapparentDisplayBox\r\t^self insetDisplayBox expandBy: 2 @ 2! !\r\r!View methodsFor: 'display box access'!\rboundingBox\r\t\"Answer the bounding box which for the default case is the rectangular \r\tarea surrounding the bounding boxes of all the subViews.\"\r\r\tboundingBox ~~ nil\r\t\tifTrue: [^boundingBox]\r\t\tifFalse: [^self computeBoundingBox]! !\r\r!View methodsFor: 'display box access'!\rcomputeBoundingBox\r\t\"Answer the minimum Rectangle that encloses the bounding boxes of the \r\treceiver's subViews. If the receiver has no subViews, then the bounding \r\tbox is the receiver's window. Subclasses should redefine \r\tView|boundingBox if a more suitable default for the case of no subViews \r\tis available.\"\r\r\t| aRectangle |\r\tsubViews isEmpty ifTrue: [^self getWindow].\r\taRectangle _ self firstSubView transform: self firstSubView boundingBox.\r\tsubViews do: \r\t\t[:aView | \r\t\taRectangle _ aRectangle merge: (aView transform: aView boundingBox).].\r\t^aRectangle expandBy: borderWidth! !\r\r!View methodsFor: 'display box access'!\rdisplayBox\r\t\"Answer the receiver's inset display box (see View|insetDisplayBox) \r\texpanded by the borderWidth. The display box represents the region of \r\tthe display screen in which the receiver (including the border) is \r\tdisplayed. If the receiver is totally clipped by the display screen and its \r\tsuperView, the resulting Rectangle will be invalid.\"\r\r\t^self insetDisplayBox expandBy: borderWidth! !\r\r!View methodsFor: 'display box access' stamp: 'acg 2/23/2000 00:08'!\rinsetDisplayBox\r\t\"Answer the receiver's inset display box. The inset display box is the \r\tintersection of the receiver's window, tranformed to display coordinates, \r\tand the inset display box of the superView, inset by the border width. \r\tThe inset display box represents the region of the display screen in \r\twhich the inside of the receiver (all except the border) is displayed. If \r\tthe receiver is totally clipped by the display screen and its superView, \r\tthe resulting Rectangle will be invalid.\"\r\r\tinsetDisplayBox ifNil: [insetDisplayBox _ self computeInsetDisplayBox].\r\t^insetDisplayBox! !\r\r\r!View methodsFor: 'lock access'!\risLocked\r\t\"Answer whether the receiver is locked. A View is 'locked' if its display \r\ttransformation and inset display box are defined. If these are undefined, \r\tthe View is 'unlocked'. The display transformation and inset display box \r\tbecome undefined when the transformation of the View (or the \r\ttransformation of a View in its superView chain) is changed, or when \r\tthe superView of the View is changed, or any other change to the View \r\tthat affects the display screen coordinates of the View. The locking and \r\tunlocking of a View is handled automatically by the internal methods of \r\tthe View, but can also be done explicitly if desired (see View|lock, and \r\tView|unlock).\"\r\r\tdisplayTransformation == nil | (insetDisplayBox == nil)\r\t\tifTrue: [^false]\r\t\tifFalse: [^true]! !\r\r!View methodsFor: 'lock access'!\risUnlocked\r\t\"Answer whether the receiver is unlocked. See comment in \r\tView|isLocked.\"\r\r\t^displayTransformation == nil & (insetDisplayBox == nil)! !\r\r!View methodsFor: 'lock access'!\rlock\r\t\"'Lock' the receiver and all of its subViews (see View|isLocked). This has \r\tthe effect of computing and storing the display transformation (see \r\tView|displayTransformation) and inset display box (see \r\tView|insetDisplayBox) of the receiver and all its subViews. The locking \r\tand unlocking of a View is handled automatically by the internal \r\tmethods of the View, but can also be done explicitly if desired.\"\r\r\tself isLocked ifTrue: [^self].\r\tdisplayTransformation _ self computeDisplayTransformation.\r\tinsetDisplayBox _ self computeInsetDisplayBox.\r\tsubViews do: [:aSubView | aSubView lock]! !\r\r!View methodsFor: 'lock access'!\runlock\r\t\"Unlock the receiver and all of its subViews (see View|isUnlocked). This \r\thas the effect of forcing the display transformation (see \r\tView|displayTransformation) and inset display box (see \r\tView|insetDisplayBox) of the receiver and all its subViews to be \r\trecomputed the next time they are referenced. The locking and \r\tunlocking of a View is handled automatically by the internal methods of \r\tthe View, but can also be done explicitly if desired.\"\r\r\tself isUnlocked ifTrue: [^self].\r\tdisplayTransformation _ nil.\r\tinsetDisplayBox _ nil.\r\tsubViews do: [:aSubView | aSubView unlock]! !\r\r\r!View methodsFor: 'subView inserting'!\raddSubView: aView \r\t\"Remove aView from the tree of Views it is in (if any) and adds it to the \r\trear of the list of subViews of the receiver. Set the superView of aView \r\tto be the receiver. It is typically used to build up a hierarchy of Views \r\t(a structured picture). An error notification is generated if aView is the \r\tsame as the receiver or its superView, and so on.\"\r\r\tself addSubView: aView ifCyclic: [self error: 'cycle in subView structure.']! !\r\r!View methodsFor: 'subView inserting'!\raddSubView: aSubView above: lowerView\r\t\"Adds aView (see View|addSubView:) so that it lies above topView.\"\r\r\tself addSubView: aSubView\r\t\talign: aSubView viewport bottomLeft\r\t\twith: lowerView viewport topLeft! !\r\r!View methodsFor: 'subView inserting'!\raddSubView: aSubView align: aPoint1 with: aPoint2 \r\t\"Add aView to the receiver's list of subViews (see View|addSubView:) \r\tand translate aView so that aPoint1 coincides with aPoint2. It is typically \r\tused to build up a hierarchy of Views (a structured picture). Normally, \r\taPoint1 is a point on aView's viewport (e.g. aView viewport topLeft), \r\tand aPoint2 is either an arbitrary point in the receiver's coordinate \r\tsystem or a point on the receiver's window (e.g., self window topRight).\"\r\r\tself addSubView: aSubView.\r\taSubView align: aPoint1 with: aPoint2! !\r\r!View methodsFor: 'subView inserting'!\raddSubView: aSubView below: lowerView\r\t\"Add the argument, aSubView, (see View|addSubView:) so that it lies \r\tbelow the view, topView.\"\r\r\tself addSubView: aSubView\r\t\talign: aSubView viewport topLeft\r\t\twith: lowerView viewport bottomLeft! !\r\r!View methodsFor: 'subView inserting'!\raddSubView: aView ifCyclic: exceptionBlock \r\t\"Remove aView from the tree of Views it is in (if any) and add it to the \r\trear of the list of subViews of the receiver. Set the superView of aView \r\tto be the receiver. It is typically used to build up a hierarchy of Views \r\t(a structured picture). An error notification is generated if aView is the \r\tsame as the receiver or its superView, and so on.\"\r\r\t(self isCyclic: aView)\r\t\tifTrue: [exceptionBlock value]\r\t\tifFalse: \r\t\t\t[aView removeFromSuperView.\r\t\t\tsubViews addLast: aView.\r\t\t\taView superView: self]! !\r\r!View methodsFor: 'subView inserting' stamp: 'ssa 8/15/2008 17:31'!\raddSubView: aView in: aRelativeRectangle borderWidth: width\r\t\"ssa - added for compatibility.\"\r \r\t\"Make 'aView' into a subview. Use 'aRelativeRectangle' and the \r\tsuper view's window to compute (1) a viewport within the \r\tsuperview for 'aView' and (2) the window extent for 'aView'. Note: \r\tdefining the windowing transformation and deriving the viewport is \r\tlogically equivalent but does not seem to be easily done\"\r\r\t| subViewPort myWindow myExtent myOrigin |\r\tself addSubView: aView ifCyclic: [self error: 'cycle in subView structure.'].\r\taView borderWidth: width.\r\tmyWindow _ self window.\r\tmyExtent _ myWindow extent.\r\tmyOrigin _ myWindow origin.\r\tsubViewPort _ myExtent * aRelativeRectangle origin + myOrigin \r\t\t\t\t\t\tcorner: myExtent * aRelativeRectangle corner + myOrigin.\r\taView window: aView window viewport: subViewPort\r! !\r\r!View methodsFor: 'subView inserting'!\raddSubView: aSubView toLeftOf: rightView\r\t\"Adds aView (see addSubView:) so that it lies to the right of rightView.\"\r\r\tself addSubView: aSubView\r\t\talign: aSubView viewport topRight\r\t\twith:  rightView viewport topLeft! !\r\r!View methodsFor: 'subView inserting'!\raddSubView: aSubView toRightOf: leftView\r\t\"Add the argument, aSubView, (see View|addSubView:) so that it lies to \r\tthe right of the view, leftView.\"\r\r\tself addSubView: aSubView\r\t\talign: aSubView viewport topLeft\r\t\twith: leftView viewport topRight! !\r\r!View methodsFor: 'subView inserting'!\raddSubView: aView viewport: aViewport \r\t\"Add aView to the receiver's list of subViews (see View|addSubView:) and \r\tapplies to aView a scale and translation computed from its window and \r\taViewport (such that its window fills aViewport).\"\r\r\tself addSubView: aView.\r\taView window: aView window viewport: aViewport! !\r\r!View methodsFor: 'subView inserting'!\raddSubView: aView window: aWindow viewport: aViewport \r\t\"Add aView to the receiver's list of subViews (see View|addSubView:) \r\tand applies to aView a scale and translation computed from aWindow \r\tand aViewport (such that aWindow fills aViewport).\"\r\r\tself addSubView: aView.\r\taView window: aWindow viewport: aViewport! !\r\r\r!View methodsFor: 'subView removing'!\rreleaseSubView: aView \r\t\"Delete aView from the receiver's list of subViews and send it the \r\tmessage 'release' (so that it can break up cycles with subViews, etc.).\"\r\r\tself removeSubView: aView.\r\taView release! !\r\r!View methodsFor: 'subView removing'!\rreleaseSubViews\r\t\"Release (see View|releaseSubView:) all subViews in the receiver's list of \r\tsubViews.\"\r\r\tsubViews do: [:aView | aView release].\r\tself resetSubViews! !\r\r!View methodsFor: 'subView removing'!\rremoveFromSuperView\r\t\"Delete the receiver from its superView's collection of subViews.\"\r\r\tsuperView ~= nil ifTrue: [superView removeSubView: self]! !\r\r!View methodsFor: 'subView removing'!\rremoveSubView: aView \r\t\"Delete aView from the receiver's list of subViews. If the list of subViews \r\tdoes not contain aView, create an error notification.\"\r\r\tsubViews remove: aView.\r\taView superView: nil.\r\taView unlock! !\r\r!View methodsFor: 'subView removing'!\rremoveSubViews\r\t\"Delete all the receiver's subViews.\"\r\r\tsubViews do: \r\t\t[:aView | \r\t\taView superView: nil.\r\t\taView unlock].\r\tself resetSubViews! !\r\r\r!View methodsFor: 'displaying'!\rclippingTo: rect do: aBlock\r\r\tsuperView clippingTo: rect do: aBlock! !\r\r!View methodsFor: 'displaying' stamp: 'hmm 6/27/2000 07:07'!\rdisplay\r\t\"Display the receiver's border, display the receiver, then display the \r\tsubViews of the receiver. Can be sent to the top View of a structured \r\tpicture in order to display the entire structure, or to any particular View \r\tin the structure in order to display that View and its subViews. It is \r\ttypically sent in response to an update request to a View.\"\r\r\tDisplay deferUpdatesIn: self displayBox while: [\r\t\tself displayBorder.\r\t\tself displayView.\r\t\tself displaySubViews]! !\r\r!View methodsFor: 'displaying'!\rdisplayBorder\r\t\"Display the receiver's border (using the receiver's borderColor).\"\r\r\tborderWidth = 0\r\t\tifTrue:\r\t\t\t[insideColor == nil\r\t\t\t\tifFalse: \r\t\t\t\t\t[Display fill: self displayBox fillColor: self backgroundColor]]\r\t\tifFalse:\r\t\t\t[Display\r\t\t\t\tborder: self displayBox\r\t\t\t\twidthRectangle: borderWidth\r\t\t\t\trule: Form over\r\t\t\t\tfillColor: self foregroundColor.\r\t\t\tinsideColor == nil ifFalse:\r\t\t\t\t[Display fill: self insetDisplayBox fillColor: self backgroundColor]]! !\r\r!View methodsFor: 'displaying'!\rdisplayClippingTo: rect\r\r\t| bigRect |\r\tbigRect _ rect insetBy: -1.\r\tself clippingTo: bigRect do: [Display clippingTo: bigRect do: [self display]]\r! !\r\r!View methodsFor: 'displaying'!\rdisplayDeEmphasized\r\tself display; deEmphasize! !\r\r!View methodsFor: 'displaying'!\rdisplaySubViews\r\t\"Display all the subViews of the receiver.\"\r\r\tsubViews do: [:aSubView | aSubView display]! !\r\r!View methodsFor: 'displaying'!\rdisplayView\r\t\"Subclasses should redefine View|displayView in order to display \r\tparticular objects associated with the View such as labels, lines, and \r\tboxes.\"\r\r\t^self! !\r\r!View methodsFor: 'displaying'!\rdisplayViewDeEmphasized\r\tself displayView; deEmphasizeView! !\r\r!View methodsFor: 'displaying'!\rinspectFirstSubView\r\tsubViews notNil ifTrue:\r\t\t[subViews size > 0 ifTrue:\r\t\t\t[(subViews at: 1) inspect]]! !\r\r!View methodsFor: 'displaying'!\rinspectModel\r\tmodel notNil\r\t\tifTrue: [^ model inspect]\r\t\tifFalse: [self flash]! !\r\r!View methodsFor: 'displaying'!\rinspectView\r\t^self inspect! !\r\r!View methodsFor: 'displaying'!\rmaximumSize\r\t\"Answer the maximum size of the receiver.\"\r\r\t^ 10000 @ 10000\r\t! !\r\r!View methodsFor: 'displaying'!\rminimumSize\r\t\"Answer the minimum size of the receiver.\"\r\t^ 10 @ 10\r\t! !\r\r\r!View methodsFor: 'deEmphasizing'!\rdeEmphasize\r\t\"Modify the emphasis (highlighting, special tabs) of the receiver. This \r\tincludes objects such as labels, lines, and boxes. Typically used so that \r\tthe receiver is not presented as active. Do this for the receiver and then \r\tfor each of the receiver's subViews.\"\r\r\tself deEmphasizeView.\r\tself deEmphasizeSubViews! !\r\r!View methodsFor: 'deEmphasizing'!\rdeEmphasizeForDebugger\r\t\"Overridden by StandardSystemView. This default behavior does nothing.\"\r! !\r\r!View methodsFor: 'deEmphasizing'!\rdeEmphasizeSubViews\r\t\"Send the deEmphasize message to each of the receiver's subviews.\"\r\r\tsubViews do: [:aSubView | aSubView deEmphasize]! !\r\r!View methodsFor: 'deEmphasizing'!\rdeEmphasizeView\r\t\"Subclasses should redefine View|deEmphasizeView in order to modify \r\tthe emphasis (highlighting, special tabs) of particular objects associated \r\twith the View such as labels, lines, and boxes.\"\r\r\t^self! !\r\r!View methodsFor: 'deEmphasizing'!\remphasize\r\t\"Modify the emphasis (highlighting, special tabs) of the receiver. This \r\tincludes objects such as labels, lines, and boxes. Typically used so that \r\tthe receiver is presented as active. Do this for the receiver and then \r\tfor each of the receiver's subViews.\"\r\r\tself emphasizeView.\r\tself emphasizeSubViews! !\r\r!View methodsFor: 'deEmphasizing'!\remphasizeSubViews\r\t\"Send the emphasize message to each of the receiver's subviews.\"\r\r\tsubViews do: [:aSubView | aSubView emphasize]! !\r\r!View methodsFor: 'deEmphasizing'!\remphasizeView\r\t\"Subclasses should redefine View|emphasizeView in order to modify \r\tthe emphasis (highlighting, special tabs) of particular objects associated \r\twith the View such as labels, lines, and boxes.\"\r\r\t^self! !\r\r\r!View methodsFor: 'display transformation'!\rdisplayTransform: anObject \r\t\"Apply the display transformation of the receiver to anObject (see \r\tView|displayTransformation) and answer the resulting scaled, translated \r\tobject. It is normally applied to Rectangles, Points, and other objects with \r\tcoordinates defined in the View's local coordinate system in order to get \r\ta corresponding object in display coordinates.\"\r\r\t^(self displayTransformation applyTo: anObject) rounded! !\r\r!View methodsFor: 'display transformation'!\rdisplayTransformation\r\t\"Answer a WindowingTransformation that is the result of composing all \r\tlocal transformations in the receiver's superView chain with the \r\treceiver's own local transformation. The resulting transformation \r\ttransforms objects in the receiver's coordinate system into objects in the \r\tdisplay screen coordinate system.\"\r\r\tdisplayTransformation == nil\r\t\tifTrue: [displayTransformation _ self computeDisplayTransformation].\r\t^displayTransformation! !\r\r!View methodsFor: 'display transformation'!\rinverseDisplayTransform: aPoint \r\t\"Answer a Point that is obtained from the argument, aPoint, by applying \r\tto it the inverse of the receiver's display transformation. It is typically \r\tused by the Controller of the receiver in order to convert a point in \r\tdisplay coordinates, such as the cursor point, to the local coordinate \r\tsystem of the receiver.\"\r\r\t^self displayTransformation applyInverseTo: aPoint! !\r\r\r!View methodsFor: 'transforming'!\ralign: aPoint1 with: aPoint2 \r\t\"Add a translation of (aPoint2 - aPoint1) to the receiver's local \r\ttransformation. The point in the receiver's coordinate system that \r\tpreviously was transformed to aPoint1 in the superView's coordinate \r\tsystem will now be transformed to aPoint2 in the superView's coordinate \r\tsystem. Other points will be translated by the same amount. It is \r\tnormally used when adding subViews to their superView in order to \r\tline up the Viewport of one subView with that of another subView (see \r\tView|addSubView:align:with:). aPoint1 and aPoint2 are usually points on \r\tthe viewports that are to be aligned. For example, 'subView2 align: \r\tsubView2 viewport topLeft with: subView1 viewport topRight' would be \r\tused to place the viewport of subView2 next to the viewport of \r\tsubView1 with the topLeft and topRight corners, respectively, \r\tcoinciding. It is also possible to align the viewport of a subView with \r\tthe window of the superView, e.g., 'subView align: subView viewport \r\tcenter with: superView window center'. View|align:with: assumes that \r\tthe view has been properly scaled, if necessary, to match its superView \r\t(see View|scaleBy:). Typically, the coordinate systems of the receiver \r\tand its superView will differ only by a translation offset so that no \r\tscaling is necessary.\"\r\r\tself setTransformation: (transformation align: aPoint1 with: aPoint2)! !\r\r!View methodsFor: 'transforming'!\rscale: aScale translation: aTranslation \r\t\"The x component of aScale (a Point) specifies the scale (translation) in \r\tthe x direction; the y component specifies the scale (translation) in the y \r\tdirection. aScale can optionally be an instance of Integer or Float in \r\torder to specify uniform scaling in both directions. Create a new local \r\ttransformation for the receiver with a scale factor of aScale and a \r\ttranslation offset of aTranslation. When the transformation is applied (see \r\tView|transform:), the scale is applied first, followed by the translation. It \r\tis typically used when building a superView from its subViews in order \r\tto line up the viewports of the subViews in the desired way. If no \r\tscaling is required between subView and superView, then \r\tView|align:with: is often more convenient to use.\"\r\r\tself setTransformation:\r\t\t(WindowingTransformation scale: aScale translation: aTranslation)! !\r\r!View methodsFor: 'transforming'!\rscaleBy: aScale \r\t\"The x component of aScale (a Point) specifies the scale in the x \r\tdirection; the y component specifies the scale in the y direction. aScale \r\tcan, optionally, be an instance of Integer or Float in order to specify \r\tuniform scaling in both directions. Scales the View by aScale. The scale \r\tis concatenated with the current transformation of the receiver and is \r\tapplied when View|transform is sent. This happens automatically in the \r\tprocess of displaying the receiver, for example.\"\r\r\tself setTransformation: (transformation scaleBy: aScale)! !\r\r!View methodsFor: 'transforming'!\rtransform: anObject \r\t\"Apply the local transformation of the receiver to anObject and answer \r\tthe resulting transformation. It is used to get the superView coordinates \r\tof an object. For example, the viewport is equal to the window \r\ttransformed.\"\r\r\t^transformation applyTo: anObject! !\r\r!View methodsFor: 'transforming'!\rtransformation\r\t\"Answer a copy of the receiver's local transformation.\"\r\r\t^transformation copy! !\r\r!View methodsFor: 'transforming'!\rtransformation: aTransformation \r\t\"Set the receiver's local transformation to a copy of aTransformation, \r\tunlock the receiver (see View|unlock) and set the viewport to undefined \r\t(this forces it to be recomputed when needed).\"\r\r\tself setTransformation: aTransformation copy! !\r\r!View methodsFor: 'transforming'!\rtranslateBy: aPoint \r\t\"Translate the receiver by aPoint. The translation is concatenated with \r\tthe current transformation of the receiver and is applied when \r\tView|transform is sent. This happens automatically in the process of \r\tdisplaying the receiver.\"\r\r\tself setTransformation: (transformation translateBy: aPoint)! !\r\r!View methodsFor: 'transforming'!\rwindow: aWindow viewport: aViewport \r\t\"Set the receiver's window to aWindow, set its viewport to aViewport, and \r\tcreate a new local transformation for the receiver based on aWindow and \r\taViewport. The receiver is scaled and translated so that aWindow, when \r\ttransformed, coincides with aViewport. It is used to position a subView's \r\twindow within some specific region of its superView's area. For example, \r\t'subView window: aRectangle1 viewport: aRectangle2' sets subView's \r\twindow to aRectangle1, its viewport to aRectangle2, and its local \r\ttransformation to one that transforms aRectangle1 to aRectange2.\"\r\r\tself window: aWindow.\r\tself setTransformation:\r\t\t(WindowingTransformation window: aWindow viewport: aViewport).\r\tself getViewport! !\r\r\r!View methodsFor: 'bordering' stamp: 'sw 11/2/1998 15:34'!\rbackgroundColor\r\tDisplay depth <= 2 ifTrue: [^ Color white].\r\tinsideColor ifNotNil: [^ Color colorFrom: insideColor].\r\t^ superView == nil\r\t\tifFalse: [superView backgroundColor]\r\t\tifTrue:\t[Color white]! !\r\r!View methodsFor: 'bordering' stamp: 'tk 10/21/97 12:31'!\rbackgroundColor: aColor\r\tDisplay depth = 1 ifTrue:\r\t\t[(aColor ~= nil and: [aColor isTransparent not]) ifTrue:\r\t\t\t[\"Avoid stipple due to attempts to match non-whites\"\r\t\t\t^ insideColor _ Color white]].\r\tinsideColor _ aColor! !\r\r!View methodsFor: 'bordering'!\rborderWidth\r\t\"Answer either 0, indicating no border, or a Rectangle whose left value is \r\tthe width in display coordinates of the receiver's left border. Right, top, \r\tand bottom widths are analogous. The border width is initially 0. A \r\tView with a border width of 0 will not have any border displayed.\"\r\r\t^borderWidth! !\r\r!View methodsFor: 'bordering'!\rborderWidth: anInteger\r\t\"Set the four border widths of the receiver to anInteger.\"\r\r\tself\r\t\tborderWidthLeft: anInteger\r\t\tright: anInteger\r\t\ttop: anInteger\r\t\tbottom: anInteger! !\r\r!View methodsFor: 'bordering'!\rborderWidthLeft: anInteger1 right: anInteger2 top: anInteger3 bottom: anInteger4\r\t\"Set the border widths of the receiver. These arguments represent the left, \r\tright, top, and bottom border widths.\"\r\r\tborderWidth _\r\t\t\tRectangle\r\t\t\t\tleft: anInteger1\r\t\t\t\tright: anInteger2\r\t\t\t\ttop: anInteger3\r\t\t\t\tbottom: anInteger4.\r\tself unlock! !\r\r!View methodsFor: 'bordering' stamp: 'sw 11/2/1998 15:35'!\rforegroundColor\r\tborderColor ifNotNil: [^ Color colorFrom: borderColor].\r\t^ superView == nil\r\t\tifFalse: [superView foregroundColor]\r\t\tifTrue:\t[Color black]! !\r\r!View methodsFor: 'bordering'!\rforegroundColor: aColor\r\tborderColor _ aColor! !\r\r!View methodsFor: 'bordering'!\rinsideColor: aColor \r\t^ self backgroundColor: aColor! !\r\r\r!View methodsFor: 'scrolling'!\rscrollBy: aPoint \r\t\"The x component of aPoint specifies the amount of scrolling in the x \r\tdirection; the y component specifies the amount of scrolling in the y \r\tdirection. The amounts are specified in the receiver's local coordinate \r\tsystem. Scroll the receiver up or down, left or right. The window of the \r\treceiver is kept stationary and the subViews and other objects in the \r\treceiver are translated relative to it. Scrolling doesn't change the \r\tinsetDisplayBox or the viewport since the change in the transformation \r\tis canceled by the change in the window. In other words, all display \r\tobjects in the view, except the window, are translated by the scrolling \r\toperation.\r\tNote: subclasses may override to return false if no scrolling takes place.\"\r\r\t| aRectangle |\r\taRectangle _ insetDisplayBox.\r\ttransformation _ transformation scrollBy: aPoint.\r\twindow _ self getWindow translateBy: aPoint x negated @ aPoint y negated.\r\tself unlock.\r\tinsetDisplayBox _ aRectangle.\r\t^ true! !\r\r\r!View methodsFor: 'clearing'!\rclear\r\t\"Use the border color to paint the display box (including the border, see \r\tView|displayBox) of the receiver.\"\r\r\tborderColor ~= nil ifTrue: [self clear: Color black]! !\r\r!View methodsFor: 'clearing'!\rclear: aColor \r\t\"Use aColor to paint the display box (including the border, see \r\tView|displayBox) of the receiver.\"\r\r\taColor ~= nil ifTrue: [Display fill: self displayBox fillColor: aColor]! !\r\r!View methodsFor: 'clearing'!\rclearInside\r\t\"Use the inside color to paint the inset display box (excluding the border, \r\tsee View|insetDisplayBox) of the receiver.\"\r\r\tself clearInside: self backgroundColor! !\r\r!View methodsFor: 'clearing'!\rclearInside: aColor \r\t\"Use aColor to paint the inset display box (excluding the border, see \r\tView|insetDisplayBox) of the receiver.\"\r\r\taColor ~~ nil ifTrue: [Display fill: self insetDisplayBox fillColor: aColor]! !\r\r\r!View methodsFor: 'indicating'!\rflash\r\t\"Cause the inset display box (the display box excluding the border, see \r\tView|insetDisplayBox) of the receiver to complement twice in succession.\"\r\r\tDisplay flash: self insetDisplayBox! !\r\r!View methodsFor: 'indicating'!\rhighlight\r\t\"Cause the inset display box (the display box excluding the border, see \r\tView|insetDisplayBox) of the receiver to complement.\"\r\r\tDisplay reverse: self insetDisplayBox! !\r\r\r!View methodsFor: 'updating'!\rupdate\r\t\"Normally sent by the receiver's model in order to notify the receiver of \r\ta change in the model's state. Subclasses implement this message to do \r\tparticular update actions. A typical action that might be required is to \r\tredisplay the receiver.\"\r\r\tself update: self! !\r\r!View methodsFor: 'updating'!\rupdate: aParameter \r\t\"Normally sent by the receiver's model in order to notify the receiver of \r\ta change in the model's state. Subclasses implement this message to do \r\tparticular update actions. A typical action that might be required is to \r\tredisplay the receiver.\"\r\r\t^self! !\r\r\r!View methodsFor: 'private'!\rcomputeDisplayTransformation\r\t\"Answer a WindowingTransformation that transforms the coordinate \r\tsystem of the View into that of the display screen. The transformation is \r\tcomputed by composing the View's transformation with all transformations \r\talong its superView chain. It is sent by View|displayTransformation when\r\tthe View is unlocked (see View|unlock).\"\r\r\tself isTopView\r\t\tifTrue: [^transformation]\r\t\tifFalse: [^superView displayTransformation compose: transformation]! !\r\r!View methodsFor: 'private'!\rcomputeInsetDisplayBox\r\t\"Compute the View's inset display box by intersecting the superView's\r\tinset display box with the View's window transformed to display\r\tcoordinates and then inseting the result by the border width. It is sent by \r\tView|insetDisplayBox if the inset display box is nil.\r\r\tThe insetDisplayBox points are truncated to prevent sending floating point numbers to QuickDraw which will die.\"\r\r\tself isTopView\r\t\tifTrue:\r\t\t\t[^((self displayTransform: self getWindow) insetBy: borderWidth) truncated]\r\t\tifFalse:\r\t\t\t[^(superView insetDisplayBox\r\t\t\t\tintersect: (self displayTransform: self getWindow)) truncated\r\t\t\t\t\t\tinsetBy: borderWidth]! !\r\r!View methodsFor: 'private'!\rgetController\r\t\"Answer the View's controller if one exists. nil indicates that the default\r\tcontroller is to be used.\"\r\r\t^controller! !\r\r!View methodsFor: 'private'!\rgetViewport\r\t\"Answer the Rectangle representing the View's viewport (in the\r\tcoordinate system of the superclass). If no viewport has been specified,\r\tthe View's window transformed into the superView's coordinate system is\r\tsaved and returned. It should be used by methods of View and subclasses\r\t(instead of directly referring to the viewport) unless it is known that a\r\tviewport actually exists. It should not be used outside of View or\r\tsubclasses because the viewport is not sharable.\"\r\r\tviewport == nil ifTrue: [viewport _ (self transform: self getWindow) truncated].\r\t^viewport! !\r\r!View methodsFor: 'private'!\rgetWindow\r\t\"Answer the Rectangle that represents the window of this View. If no\r\twindow has been specified, a default window (see View|defaultWindow)\r\tis created, saved, and returned. Should be used by methods of View and\r\tsubclasses to access the View window instead of directly accessing the\r\tfield unless it is known that a window actually exists. It is not to be used\r\toutside of View (or subclasses) because the window is not sharable.\r\tView|window should be used for outside access to the window.\"\r\r\twindow == nil ifTrue: [self setWindow: self defaultWindow].\r\t^window! !\r\r!View methodsFor: 'private'!\risCyclic: aView \r\t\"Answer true if aView is the same as this View or its superView, false \r\totherwise.\"\r\r\tself == aView ifTrue: [^true].\r\tself isTopView ifTrue: [^false].\r\t^superView isCyclic: aView! !\r\r!View methodsFor: 'private'!\rsetTransformation: aTransformation \r\t\"Set the View's local transformation to aTransformation, unlock the View \r\t(see View|unlock), and set the viewport to undefined (this forces it to be \r\trecomputed when needed). Should be used instead of setting the \r\ttransformation directly.\"\r\r\ttransformation _ aTransformation.\r\tself unlock.\r\tviewport _ nil! !\r\r!View methodsFor: 'private'!\rsetWindow: aWindow \r\t\"Set the View's window to aWindow and unlock the View (see\r\tView|unlock). View|setWindow should be used by methods of View and\r\tsubclasses to set the View window (rather than directly setting the\r\tinstance variable) to insure that the View is unlocked.\"\r\r\twindow _ aWindow.\r\tviewport _ nil.\r\tself unlock! !\r\r!View methodsFor: 'private'!\rsuperView: aView \r\t\"Set the View's superView to aView and unlock the View (see\r\tView|unlock). It is sent by View|addSubView: in order to properly set all\r\tthe links.\"\r\r\tsuperView _ aView.\r\tself unlock! !\r\r\r!View methodsFor: 'miscellaneous'!\rclipRect\r\t^ superView clipRect! !\r\r!View methodsFor: 'miscellaneous'!\rclipRect: r\r\tsuperView clipRect: r! !\r\r!View methodsFor: 'miscellaneous'!\rgridSpacing\r\t^ superView gridSpacing! !\r\r!View methodsFor: 'miscellaneous'!\rnestedViewport\r\r\t\"The viewport size used to control scaling of nested user views.\"\r\r\t^ (0@0 extent: self viewport extent)\r\t\t\tinsetBy: 16 @ 16! !\r\r!View methodsFor: 'miscellaneous'!\rprintViewSpecOn: strm nested: level\r\t\"Print window and viewport specs\r\tof this and all nested views.\"\r\tstrm crtab: level; nextPutAll: self class name.\r\tstrm crtab: level; nextPutAll: 'window: '; print: self window.\r\tstrm crtab: level; nextPutAll: 'viewport: '; print: self viewport.\r\tstrm crtab: level; nextPutAll: 'displayBox: '; print: self displayBox.\r\tstrm crtab: level; nextPutAll: 'border: '; print: self borderWidth.\r\tsubViews do: [:v | v printViewSpecOn: strm nested: level+1]! !\r\r!View methodsFor: 'miscellaneous' stamp: 'JMM 10/21/2003 18:12'!\rstretchFrame: newFrameBlock startingWith: startFrame \r\t\"Track the outline of a newFrame as long as mouse drags it.\r\tMaintain max and min constraints throughout the drag\"\r\t| frame newFrame click delay |\r\tdelay _ Delay forMilliseconds: 10.\r\tframe _ startFrame origin extent: ((startFrame extent min: self maximumSize)\r\t\t\t\t\t\t\t\t\t\t\tmax: self minimumSize).\r\tDisplay border: frame width: 2 rule: Form reverse fillColor: Color gray.\r\tclick _ false.\r\t[click and: [Sensor noButtonPressed]] whileFalse: \r\t\t[delay wait.\r\t\tclick _ click | Sensor anyButtonPressed.\r\t\tnewFrame _ newFrameBlock value: frame.\r\t\tnewFrame _ newFrame topLeft extent: ((newFrame extent min: self maximumSize)\r\t\t\t\t\t\t\t\t\t\t\tmax: self minimumSize).\r\t\tnewFrame = frame ifFalse:\r\t\t\t[Display border: frame width: 2 rule: Form reverse fillColor: Color gray.\r\t\t\tDisplay border: newFrame width: 2 rule: Form reverse fillColor: Color gray.\r\t\t\tframe _ newFrame]].\r\tDisplay border: frame width: 2 rule: Form reverse fillColor: Color gray.\r\t^ frame! !\r\r\r!View methodsFor: 'morphic compatibility' stamp: 'mdr 1/24/2000 17:27'!\rsetBalloonText: aString\r\t\"Unfortunately we just ignore this help text because we are not morphic\"\r! !\rNotification subclass: #Warning\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Exceptions Kernel'!\r!Warning commentStamp: '<historical>' prior: 0!\rA Warning is a Notification which by default should be brought to the attention of the user.!\r\r\r!Warning methodsFor: 'exceptionDescription' stamp: 'brp 5/9/2003 12:54'!\rdefaultAction\r\t\"The user should be notified of the occurrence of an exceptional occurrence and given an option of continuing or aborting the computation. The description of the occurrence should include any text specified as the argument of the #signal: message.\"\r\r\tDebugger\r\t\topenContext: thisContext\r\t\tlabel: 'Warning'\r\t\tcontents: self messageText, '\\\\Select Proceed to continue, or close this window to cancel the operation.' withCRs.\r\tself resume! !\rBitBlt subclass: #WarpBlt\r\tinstanceVariableNames: 'p1x p1y p1z p2x p2y p2z p3x p3y p3z p4x p4y p4z cellSize sourceRGBmap'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Graphics-Primitives'!\r!WarpBlt commentStamp: '<historical>' prior: 0!\rWarpBlt is a little warp-drive added on to BitBlt.  It takes a quadrilateral as its source specification, while its destination is traversed and combined just like any other call to copyBits.\r\rThe source quadrilateral is specified as an array of points starting with the corner that wants to end up in the topLeft, and proceding to the successive points that want to follow CCW around the destination rectangle.  Note that in specifying a plain old rectangle source, its non topLeft points must be actual pixels, not outside by 1, as with rectangle bottmRight, eg.  See the method Rectangle asQuad.\r\rWarpBlt does a fast job of rotation, reflection and scaling, and it can even produce a semblance of perspective.  Depth parameters are included for future improvements in this direction. but the primitve does not support this yet.!\r\r\r!WarpBlt methodsFor: 'setup' stamp: 'jm 4/11/1999 12:00'!\rcellSize: s\r\tcellSize _ s.\r\tcellSize = 1 ifTrue: [^ self].\r\tcolorMap _ Color colorMapIfNeededFrom: 32 to: destForm depth.\r! !\r\r\r!WarpBlt methodsFor: 'smoothing' stamp: 'di 6/24/97 00:09'!\rmixPix: pix sourceMap: sourceMap destMap: destMap\r\t\"Average the pixels in array pix to produce a destination pixel.\r\tFirst average the RGB values either from the pixels directly,\r\tor as supplied in the sourceMap.  Then return either the resulting\r\tRGB value directly, or use it to index the destination color map.\" \r\t| r g b rgb nPix bitsPerColor d |\r\tnPix _ pix size.\r\tr _ 0. g _ 0. b _ 0.\r\t1 to: nPix do:\r\t\t[:i |   \"Sum R, G, B values for each pixel\"\r\t\trgb _ sourceForm depth <= 8\r\t\t\t\tifTrue: [sourceMap at: (pix at: i) + 1]\r\t\t\t\tifFalse: [sourceForm depth = 32\r\t\t\t\t\t\tifTrue: [pix at: i]\r\t\t\t\t\t\tifFalse: [self rgbMap: (pix at: i) from: 5 to: 8]].\r\t\tr _ r + ((rgb bitShift: -16) bitAnd: 16rFF).\r\t\tg _ g + ((rgb bitShift: -8) bitAnd: 16rFF).\r\t\tb _ b + ((rgb bitShift: 0) bitAnd: 16rFF)].\r\tdestMap == nil\r\t\tifTrue: [bitsPerColor _ 3.  \"just in case eg depth <= 8 and no map\"\r\t\t\t\tdestForm depth = 16 ifTrue: [bitsPerColor _ 5].\r\t\t\t\tdestForm depth = 32 ifTrue: [bitsPerColor _ 8]]\r\t\tifFalse: [destMap size = 512 ifTrue: [bitsPerColor _ 3].\r\t\t\t\tdestMap size = 4096 ifTrue: [bitsPerColor _ 4].\r\t\t\t\tdestMap size = 32768 ifTrue: [bitsPerColor _ 5]].\r\td _ bitsPerColor - 8.\r\trgb _ ((r // nPix bitShift: d) bitShift: bitsPerColor*2)\r\t\t+ ((g // nPix bitShift: d) bitShift: bitsPerColor)\r\t\t+ ((b // nPix bitShift: d) bitShift: 0).\r\tdestMap == nil\r\t\tifTrue: [^ rgb]\r\t\tifFalse: [^ destMap at: rgb+1]! !\r\r!WarpBlt methodsFor: 'smoothing' stamp: 'di 6/24/97 00:08'!\rrgbMap: sourcePixel from: nBitsIn to: nBitsOut\r\t\"NOTE: This code is copied verbatim from BitBltSimulation so that it\r\tmay be removed from the system\"\r\t\"Convert the given pixel value with nBitsIn bits for each color component to a pixel value with nBitsOut bits for each color component. Typical values for nBitsIn/nBitsOut are 3, 5, or 8.\"\r\t| mask d srcPix destPix |\r\tself inline: true.\r\t(d _ nBitsOut - nBitsIn) > 0\r\t\tifTrue:\r\t\t\t[\"Expand to more bits by zero-fill\"\r\t\t\tmask _ (1 << nBitsIn) - 1.  \"Transfer mask\"\r\t\t\tsrcPix _ sourcePixel << d.\r\t\t\tmask _ mask << d.\r\t\t\tdestPix _ srcPix bitAnd: mask.\r\t\t\tmask _ mask << nBitsOut.\r\t\t\tsrcPix _ srcPix << d.\r\t\t\t^ destPix + (srcPix bitAnd: mask)\r\t\t\t\t \t+ (srcPix << d bitAnd: mask << nBitsOut)]\r\t\tifFalse:\r\t\t\t[\"Compress to fewer bits by truncation\"\r\t\t\td = 0 ifTrue: [^ sourcePixel].  \"no compression\"\r\t\t\tsourcePixel = 0 ifTrue: [^ sourcePixel].  \"always map 0 (transparent) to 0\"\r\t\t\td _ nBitsIn - nBitsOut.\r\t\t\tmask _ (1 << nBitsOut) - 1.  \"Transfer mask\"\r\t\t\tsrcPix _ sourcePixel >> d.\r\t\t\tdestPix _ srcPix bitAnd: mask.\r\t\t\tmask _ mask << nBitsOut.\r\t\t\tsrcPix _ srcPix >> d.\r\t\t\tdestPix _ destPix + (srcPix bitAnd: mask)\r\t\t\t\t\t+ (srcPix >> d bitAnd: mask << nBitsOut).\r\t\t\tdestPix = 0 ifTrue: [^ 1].  \"Dont fall into transparent by truncation\"\r\t\t\t^ destPix]! !\r\r\r!WarpBlt methodsFor: 'primitives'!\rcopyQuad: pts toRect: destRect\r\tself sourceQuad: pts destRect: destRect.\r\tself warpBits! !\r\r!WarpBlt methodsFor: 'primitives'!\rdeltaFrom: x1 to: x2 nSteps: n\r\t\"Utility routine for computing Warp increments.\r\tx1 is starting pixel, x2 is ending pixel;  assumes n >= 1\"\r\t| fixedPtOne |\r\tfixedPtOne _ 16384.  \"1.0 in fixed-pt representation\"\r\tx2 > x1\r\t\tifTrue: [^ x2 - x1 + fixedPtOne // (n+1) + 1]\r\t\tifFalse: [x2 = x1 ifTrue: [^ 0].\r\t\t\t\t^ 0 - (x1 - x2 + fixedPtOne // (n+1) + 1)]! !\r\r!WarpBlt methodsFor: 'primitives' stamp: 'jm 5/2/1999 07:09'!\rsourceForm: srcForm destRect: dstRectangle\r\t\"Set up a WarpBlt from the entire source Form to the given destination rectangle.\"\r\r\t| w h |\r\tsourceForm _ srcForm.\r\tsourceX _ sourceY _ 0.\r\tdestX _ dstRectangle left.\r\tdestY _ dstRectangle top.\r\twidth _ dstRectangle width.\r\theight _ dstRectangle height.\r\tw _ 16384 * (srcForm width - 1).\r\th _ 16384 * (srcForm height - 1).\r\tp1x _ 0.\r\tp2x _ 0.\r\tp3x _ w.\r\tp4x _ w.\r\tp1y _ 0.\r\tp2y _ h.\r\tp3y _ h.\r\tp4y _ 0.\r\tp1z _ p2z _ p3z _ p4z _ 16384.  \"z-warp ignored for now\"\r! !\r\r!WarpBlt methodsFor: 'primitives'!\rsourceQuad: pts destRect: aRectangle\r\t| fixedPt1 |\r\tsourceX _ sourceY _ 0.\r\tself destRect: aRectangle.\r\tfixedPt1 _ (pts at: 1) x isInteger ifTrue: [16384] ifFalse: [16384.0].\r\tp1x _ (pts at: 1) x * fixedPt1.\r\tp2x _ (pts at: 2) x * fixedPt1.\r\tp3x _ (pts at: 3) x * fixedPt1.\r\tp4x _ (pts at: 4) x * fixedPt1.\r\tp1y _ (pts at: 1) y * fixedPt1.\r\tp2y _ (pts at: 2) y * fixedPt1.\r\tp3y _ (pts at: 3) y * fixedPt1.\r\tp4y _ (pts at: 4) y * fixedPt1.\r\tp1z _ p2z _ p3z _ p4z _ 16384.  \"z-warp ignored for now\"\r! !\r\r!WarpBlt methodsFor: 'primitives'!\rstartFrom: x1 to: x2 offset: sumOfDeltas\r\t\"Utility routine for computing Warp increments.\"\r\tx2 >= x1\r\t\tifTrue: [^ x1]\r\t\tifFalse: [^ x2 - sumOfDeltas]! !\r\r!WarpBlt methodsFor: 'primitives' stamp: 'jm 4/11/1999 13:45'!\rwarpBits\r\t\"Move those pixels!!\"\r\r\tself warpBitsSmoothing: cellSize\r\t\tsourceMap: (sourceForm colormapIfNeededForDepth: 32).\r! !\r\r!WarpBlt methodsFor: 'primitives' stamp: 'nk 4/17/2004 19:50'!\rwarpBitsSmoothing: n sourceMap: sourceMap\r\t| deltaP12 deltaP43 pA pB deltaPAB sp fixedPtOne picker poker pix nSteps |\r\t<primitive: 'primitiveWarpBits' module: 'BitBltPlugin'>\r\r\t\"Check for compressed source, destination or halftone forms\"\r\t((sourceForm isForm) and: [sourceForm unhibernate])\r\t\tifTrue: [^ self warpBitsSmoothing: n sourceMap: sourceMap].\r\t((destForm isForm) and: [destForm unhibernate])\r\t\tifTrue: [^ self warpBitsSmoothing: n sourceMap: sourceMap].\r\t((halftoneForm isForm) and: [halftoneForm unhibernate])\r\t\tifTrue: [^ self warpBitsSmoothing: n sourceMap: sourceMap].\r\r\t(width < 1) | (height < 1) ifTrue: [^ self].\r\tfixedPtOne _ 16384.  \"1.0 in fixed-pt representation\"\r\tn > 1 ifTrue:\r\t\t[(destForm depth < 16 and: [colorMap == nil])\r\t\t\tifTrue: [\"color map is required to smooth non-RGB dest\"\r\t\t\t\t\t^ self primitiveFail].\r\t\tpix _ Array new: n*n].\r\r\tnSteps _ height-1 max: 1.\r\tdeltaP12 _ (self deltaFrom: p1x to: p2x nSteps: nSteps)\r\t\t\t@ (self deltaFrom: p1y to: p2y nSteps: nSteps).\r\tpA _ (self startFrom: p1x to: p2x offset: nSteps*deltaP12 x)\r\t\t@ (self startFrom: p1y to: p2y offset: nSteps*deltaP12 y).\r\tdeltaP43 _ (self deltaFrom: p4x to: p3x nSteps: nSteps)\r\t\t\t@ (self deltaFrom: p4y to: p3y nSteps: nSteps).\r\tpB _ (self startFrom: p4x to: p3x offset: nSteps*deltaP43 x)\r\t\t@ (self startFrom: p4y to: p3y offset: nSteps*deltaP43 y).\r\r\tpicker _ BitBlt current bitPeekerFromForm: sourceForm.\r\tpoker _ BitBlt current bitPokerToForm: destForm.\r\tpoker clipRect: self clipRect.\r\tnSteps _ width-1 max: 1.\r\tdestY to: destY+height-1 do:\r\t\t[:y |\r\t\tdeltaPAB _ (self deltaFrom: pA x to: pB x nSteps: nSteps)\r\t\t\t\t@ (self deltaFrom: pA y to: pB y nSteps: nSteps).\r\t\tsp _ (self startFrom: pA x to: pB x offset: nSteps*deltaPAB x)\r\t\t\t@ (self startFrom: pA y to: pB y offset: nSteps*deltaPAB x).\r\t\tdestX to: destX+width-1 do:\r\t\t\t[:x | \r\t\t\tn = 1\r\t\t\tifTrue:\r\t\t\t\t[poker pixelAt: x@y\r\t\t\t\t\t\tput: (picker pixelAt: sp // fixedPtOne asPoint)]\r\t\t\tifFalse:\r\t\t\t\t[0 to: n-1 do:\r\t\t\t\t\t[:dx | 0 to: n-1 do:\r\t\t\t\t\t\t[:dy |\r\t\t\t\t\t\tpix at: dx*n+dy+1 put:\r\t\t\t\t\t\t\t\t(picker pixelAt: sp\r\t\t\t\t\t\t\t\t\t+ (deltaPAB*dx//n)\r\t\t\t\t\t\t\t\t\t+ (deltaP12*dy//n)\r\t\t\t\t\t\t\t\t\t\t// fixedPtOne asPoint)]].\r\t\t\t\tpoker pixelAt: x@y put: (self mixPix: pix\r\t\t\t\t\t\t\t\t\t\tsourceMap: sourceMap\r\t\t\t\t\t\t\t\t\t\tdestMap: colorMap)].\r\t\t\tsp _ sp + deltaPAB].\r\t\tpA _ pA + deltaP12.\r\t\tpB _ pB + deltaP43]! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rWarpBlt class\r\tinstanceVariableNames: ''!\r\r!WarpBlt class methodsFor: 'initialization'!\rtoForm: destinationForm\r\t\"Default cell size is 1 (no pixel smoothing)\"\r\t^ (super toForm: destinationForm) cellSize: 1! !\r\r\r!WarpBlt class methodsFor: 'examples'!\rtest3   \"Display restoreAfter: [WarpBlt test3]\"\r\r\t\"The Squeak Release Mandala - 9/23/96 di\"\r\r\t\"Move the mouse near the center of the square.\r\tUp and down affects shrink/grow\r\tLeft and right affect rotation angle\"\r\t| warp pts p0 p box map d t |\r\tbox _ 100@100 extent: 300@300.\r\tDisplay border: (box expandBy: 2) width: 2.\r\r\t\"Make a color map that steps through the color space\"\r\tmap _ (Display depth > 8\r\t\tifTrue: [\"RGB is a bit messy...\"\r\t\t\t\td _ Display depth = 16 ifTrue: [5] ifFalse: [8].\r\t\t\t\t(1 to: 512) collect: [:i | t _ i bitAnd: 511.\r\t\t\t\t\t((t bitAnd: 16r7) bitShift: d-3)\r\t\t\t\t\t+ ((t bitAnd: 16r38) bitShift: d-3*2)\r\t\t\t\t\t+ ((t bitAnd: 16r1C0) bitShift: d-3*3)]]\r\t\tifFalse: [\"otherwise simple\"\r\t\t\t\t1 to: (1 bitShift: Display depth)])\r\t\t\tas: Bitmap.\r\twarp _ (WarpBlt toForm: Display)\r\t\tclipRect: box;\r\t\tsourceForm: Display;\r\t\tcolorMap: map;\r\t\tcombinationRule: Form over.\r\tp0 _ box center.\r\t[Sensor anyButtonPressed] whileFalse:\r\t\t[p _ Sensor cursorPoint.\r\t\tpts _ (box insetBy: p y - p0 y) innerCorners\r\t\t\tcollect: [:pt | pt rotateBy: p x - p0 x / 50.0 about: p0].\r\t\twarp copyQuad: pts toRect: box]! !\r\r\r!WarpBlt class methodsFor: 'instance creation' stamp: 'ar 5/28/2000 12:00'!\rcurrent\r\t\"Return the class currently to be used for WarpBlt\"\r\t^Display defaultWarpBltClass! !\rArray variableSubclass: #WeakActionSequence\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Objects'!\r\r!WeakActionSequence methodsFor: 'converting' stamp: 'rw 4/27/2002 07:44'!\rasActionSequence\r\r\t^self! !\r\r!WeakActionSequence methodsFor: 'converting' stamp: 'rw 7/20/2003 16:03'!\rasActionSequenceTrappingErrors\r\r\t^WeakActionSequenceTrappingErrors withAll: self! !\r\r!WeakActionSequence methodsFor: 'converting' stamp: 'nk 7/21/2003 15:16'!\rasMinimalRepresentation\r\r\t| valid |\r\tvalid := self select: [:e | e isValid ].\r\tvalid size = 0\r\t\tifTrue: [^nil].\r\tvalid size = 1\r\t\tifTrue: [^valid first].\r\t^valid! !\r\r\r!WeakActionSequence methodsFor: 'evaluating' stamp: 'nk 7/21/2003 15:17'!\rvalue\r    \"Answer the result of evaluating the elements of the receiver.\r\tActually, return just the last result.\"\r\r    | answer |\r    self do:\r        [:each | each isValid ifTrue: [answer := each value]].\r    ^answer! !\r\r!WeakActionSequence methodsFor: 'evaluating' stamp: 'nk 7/21/2003 15:17'!\rvalueWithArguments: anArray\r\r\t\"Return the last result\"\r\r    | answer |\r    self do:\r        [:each |\r        \teach isValid ifTrue: [answer := each valueWithArguments: anArray]].\r    ^answer! !\r\r\r!WeakActionSequence methodsFor: 'printing' stamp: 'rw 4/27/2002 07:46'!\rprintOn: aStream\r\r\tself size < 2 ifTrue: [^super printOn: aStream].\r\taStream nextPutAll: '#('.\r\tself\r\t\tdo: [:each | each printOn: aStream]\r\t\tseparatedBy: [aStream cr].\r\taStream nextPut: $)! !\rWeakActionSequence variableSubclass: #WeakActionSequenceTrappingErrors\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Change Notification'!\r\r!WeakActionSequenceTrappingErrors methodsFor: 'evaluating' stamp: 'rw 8/6/2003 12:09'!\rvalue\r\t\"Do the same as my parent, but make sure that all actions that do not  \r\tgive errors are evaluated before resignaling the ones that gave errors  \r\t(giving the chance to clients to handle them).\"\r\r\t^self valueStartingFrom: 1! !\r\r!WeakActionSequenceTrappingErrors methodsFor: 'evaluating' stamp: 'rw 8/6/2003 12:12'!\rvalueStartingFrom: startIndex\r\t\"Do the same as my parent, but make sure that all actions that do not \r\tgive errors are evaluated before resignaling the ones that gave errors \r\t(giving the chance to clients to handle them).\"\r\r\t\"Note: I currently trap Halt,Exception so that I am sure to get a Halt event in case of a Halt. This is being fixed in the exception system - when the fix is done it will be enough to capture only Exception.\"\r\r\t| each answer |\r\tstartIndex to: self size do: [:index |\r\t\teach := self at: index.\r\t\teach isReceiverOrAnyArgumentGarbage ifFalse: [\r\t\t\t[answer _ each value]\r\t\t\t\ton: Halt, Exception\r\t\t\t\tdo: [:exc | \r\t\t\t\t\t\tself valueStartingFrom: index + 1.\r\t\t\t\t\t\texc pass]]].\r\t^ answer! !\r\r!WeakActionSequenceTrappingErrors methodsFor: 'evaluating' stamp: 'rw 8/6/2003 12:07'!\rvalueWithArguments: anArray \r\t\"Do the same as my parent, but make sure that all actions that do not \r\tgive errors are evaluated before resignaling the ones that gave errors \r\t(giving the chance to clients to handle them).\"\r\r\t^self valueWithArguments: anArray startingFrom: 1! !\r\r!WeakActionSequenceTrappingErrors methodsFor: 'evaluating' stamp: 'rw 8/6/2003 12:11'!\rvalueWithArguments: anArray startingFrom: startIndex\r\t\"Do the same as my parent, but make sure that all actions that do not \r\tgive errors are evaluated before resignaling the ones that gave errors \r\t(giving the chance to clients to handle them).\"\r\r\t\"Note: I currently trap Halt,Exception so that I am sure to get a Halt event in case of a Halt. This is being fixed in the exception system - when the fix is done it will be enough to capture only Exception.\"\r\r\t| each answer |\r\tstartIndex to: self size do: [:index |\r\t\teach := self at: index.\r\t\teach isReceiverOrAnyArgumentGarbage ifFalse: [\r\t\t\t[answer _ each valueWithArguments: anArray]\r\t\t\t\ton: Halt, Exception\r\t\t\t\tdo: [:exc | \r\t\t\t\t\t\tself valueWithArguments: anArray startingFrom: index + 1.\r\t\t\t\t\t\texc pass]]].\r\t^ answer! !\r\r\r!WeakActionSequenceTrappingErrors methodsFor: 'converting' stamp: 'rw 7/20/2003 16:03'!\rasActionSequenceTrappingErrors\r\r\t^self! !\rArray weakSubclass: #WeakArray\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'FinalizationDependents FinalizationLock FinalizationProcess FinalizationSemaphore IsFinalizationSupported'\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Weak'!\r!WeakArray commentStamp: '<historical>' prior: 0!\rWeakArray is an array which holds only weakly on its elements. This means whenever an object is only referenced by instances of WeakArray it will be garbage collected.!\r\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rWeakArray class\r\tinstanceVariableNames: ''!\r\r!WeakArray class methodsFor: 'accessing' stamp: 'ar 10/8/1998 11:17'!\raddWeakDependent: anObject\r\t| finished index weakDependent |\r\tself isFinalizationSupported ifFalse:[^self].\r\tFinalizationLock critical:[\r\t\tfinished := false.\r\t\tindex := 0.\r\t\t[index := index + 1.\r\t\tfinished not and:[index <= FinalizationDependents size]] whileTrue:[\r\t\t\tweakDependent := FinalizationDependents at: index.\r\t\t\tweakDependent isNil ifTrue:[\r\t\t\t\tFinalizationDependents at: index put: anObject.\r\t\t\t\tfinished := true.\r\t\t\t].\r\t\t].\r\t\tfinished ifFalse:[\r\t\t\t\"Grow linearly\"\r\t\t\tFinalizationDependents := FinalizationDependents, (WeakArray new: 10).\r\t\t\tFinalizationDependents at: index put: anObject.\r\t\t].\r\t] ifError:[:msg :rcvr| rcvr error: msg].! !\r\r!WeakArray class methodsFor: 'accessing' stamp: 'ar 10/7/1998 15:30'!\risFinalizationSupported\r\t\"Check if this VM supports the finalization mechanism\"\r\t| tempObject |\r\tIsFinalizationSupported ifNotNil:[^IsFinalizationSupported].\r\ttempObject _ WeakArray new: 1.\r\t\"Check if the class format 4 is correctly understood by the VM.\r\tIf the weak class support is not installed then the VM will report\r\tany weak class as containing 32bit words - not pointers\"\r\t(tempObject at: 1) = nil \r\t\tifFalse:[^IsFinalizationSupported _false].\r\t\"Check if objects are correctly freed\"\r\tself pvtCreateTemporaryObjectIn: tempObject.\r\tSmalltalk garbageCollect.\r\t^IsFinalizationSupported _ (tempObject at: 1) == nil! !\r\r!WeakArray class methodsFor: 'accessing' stamp: 'nk 10/28/2000 20:26'!\rrunningFinalizationProcess\r\t\"Answer the FinalizationProcess I am running, if any\"\r\t^FinalizationProcess! !\r\r\r!WeakArray class methodsFor: 'class initialization' stamp: 'nk 6/21/2004 10:22'!\rinitialize\r\t\"WeakArray initialize\"\r\r\t\"Do we need to initialize specialObjectsArray?\"\r\tSmalltalk specialObjectsArray size < 42 \r\t\tifTrue:[Smalltalk recreateSpecialObjectsArray].\r\r\tSmalltalk addToStartUpList: self.\r\tself restartFinalizationProcess.! !\r\r\r!WeakArray class methodsFor: 'system startup' stamp: 'nk 6/21/2004 09:22'!\rstartUp: resuming\r\tresuming ifFalse: [ ^self ].\r\tself restartFinalizationProcess.! !\r\r\r!WeakArray class methodsFor: 'private' stamp: 'di 5/21/2001 21:49'!\rfinalizationProcess\r\r\t[true] whileTrue:\r\t\t[FinalizationSemaphore wait.\r\t\tFinalizationLock critical:\r\t\t\t[FinalizationDependents do:\r\t\t\t\t[:weakDependent |\r\t\t\t\tweakDependent ifNotNil:\r\t\t\t\t\t[weakDependent finalizeValues.\r\t\t\t\t\t\"***Following statement is required to keep weakDependent\r\t\t\t\t\tfrom holding onto its value as garbage.***\"\r\t\t\t\t\tweakDependent _ nil]]]\r\t\t\tifError:\r\t\t\t[:msg :rcvr | rcvr error: msg].\r\t\t].\r! !\r\r!WeakArray class methodsFor: 'private' stamp: 'ar 10/7/1998 15:24'!\rpvtCreateTemporaryObjectIn: tempObject\r\t\"We have to create the temporary object in a separate stack frame\"\r\ttempObject at: 1 put: Object new! !\r\r!WeakArray class methodsFor: 'private' stamp: 'nk 6/21/2004 10:22'!\rrestartFinalizationProcess\r\t\"kill any old process, just in case\"\r\tFinalizationProcess\r\t\tifNotNil: [FinalizationProcess terminate.\r\t\t\tFinalizationProcess := nil].\r\r\t\"Check if Finalization is supported by this VM\"\r\tIsFinalizationSupported := nil.\r\tself isFinalizationSupported\r\t\tifFalse: [^ self].\r\r\tFinalizationSemaphore := Smalltalk specialObjectsArray at: 42.\r\tFinalizationDependents ifNil: [FinalizationDependents := WeakArray new: 10].\r\tFinalizationLock := Semaphore forMutualExclusion.\r\tFinalizationProcess := [self finalizationProcess]\r\t\tforkAt: Processor userInterruptPriority! !\rWeakKeyDictionary subclass: #WeakIdentityKeyDictionary\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Weak'!\r!WeakIdentityKeyDictionary commentStamp: '<historical>' prior: 0!\rThis class represents an identity dictionary with weak keys.!\r\r\r!WeakIdentityKeyDictionary methodsFor: 'private' stamp: 'ar 7/1/2003 15:15'!\rscanFor: anObject\r\t\"ar 10/21/2000: The method has been copied to this location to indicate that whenever #scanFor: changes #scanForNil: must be changed in the receiver as well.\"\r\t\"Scan the key array for the first slot containing either a nil (indicating an empty slot) or an element that matches anObject. Answer the index of that slot or zero if no slot is found. This method will be overridden in various subclasses that have different interpretations for matching elements.\"\r\t| element start finish hash |\r\tfinish _ array size.\r\tfinish > 4096\r\t\tifTrue: [hash _ anObject identityHash * (finish // 4096)]\r\t\tifFalse: [hash _ anObject identityHash].\r\tstart _ (hash \\\\ array size) + 1.\r\r\t\"Search from (hash mod size) to the end.\"\r\tstart to: finish do:\r\t\t[:index | ((element _ array at: index) == nil or: [element key == anObject])\r\t\t\tifTrue: [^ index ]].\r\r\t\"Search from 1 to where we started.\"\r\t1 to: start-1 do:\r\t\t[:index | ((element _ array at: index) == nil or: [element key == anObject])\r\t\t\tifTrue: [^ index ]].\r\r\t^ 0  \"No match AND no empty slot\"! !\r\r!WeakIdentityKeyDictionary methodsFor: 'private' stamp: 'ar 7/1/2003 15:15'!\rscanForNil: anObject\r\t\"Private. Scan the key array for the first slot containing nil (indicating an empty slot). Answer the index of that slot.\"\r\t| start finish hash |\r\tfinish _ array size.\r\tfinish > 4096\r\t\tifTrue: [hash _ anObject identityHash * (finish // 4096)]\r\t\tifFalse: [hash _ anObject identityHash].\r\tstart _ (hash \\\\ array size) + 1.\r\r\t\"Search from (hash mod size) to the end.\"\r\tstart to: finish do:\r\t\t[:index | (array at: index) == nil ifTrue: [^ index ]].\r\r\t\"Search from 1 to where we started.\"\r\t1 to: start-1 do:\r\t\t[:index | (array at: index) == nil ifTrue: [^ index ]].\r\r\t^ 0  \"No match AND no empty slot\"! !\rAssociation subclass: #WeakKeyAssociation\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Support'!\r!WeakKeyAssociation commentStamp: '<historical>' prior: 0!\rI am an association holding only weakly on my key.!\r\r\r!WeakKeyAssociation methodsFor: 'comparing' stamp: 'ar 3/21/98 15:45'!\r< aLookupKey \r\t\"Refer to the comment in Magnitude|<.\"\r\r\t^self key < aLookupKey key! !\r\r!WeakKeyAssociation methodsFor: 'comparing' stamp: 'ar 3/21/98 15:46'!\r= aLookupKey\r\r\tself species = aLookupKey species\r\t\tifTrue: [^self key = aLookupKey key]\r\t\tifFalse: [^false]! !\r\r!WeakKeyAssociation methodsFor: 'comparing' stamp: 'ar 3/21/98 15:46'!\rhash\r\t\"Hash is reimplemented because = is implemented.\"\r\r\t^self key hash! !\r\r!WeakKeyAssociation methodsFor: 'comparing' stamp: 'ar 3/21/98 15:46'!\rhashMappedBy: map\r\t\"Answer what my hash would be if oops changed according to map.\"\r\r\t^self key hashMappedBy: map! !\r\r!WeakKeyAssociation methodsFor: 'comparing' stamp: 'ar 3/21/98 15:47'!\ridentityHashMappedBy: map\r\t\"Answer what my hash would be if oops changed according to map.\"\r\r\t^ self key identityHashMappedBy: map! !\r\r\r!WeakKeyAssociation methodsFor: 'printing' stamp: 'ar 3/21/98 15:53'!\rprintOn: aStream\r\tself key printOn: aStream.\r\taStream nextPutAll: '->'.\r\tself value printOn: aStream! !\r\r!WeakKeyAssociation methodsFor: 'printing' stamp: 'ar 3/21/98 15:53'!\rstoreOn: aStream\r\taStream \r\t\tnextPut: $(;\r\t\tnextPutAll: self class name;\r\t\tnextPutAll:' key: '.\r\tself key storeOn: aStream.\r\taStream nextPutAll: ' value: '.\r\tself value storeOn: aStream.\r\taStream nextPut: $)! !\r\r\r!WeakKeyAssociation methodsFor: 'accessing' stamp: 'ar 3/21/98 15:54'!\rkey\r\t^key isNil\r\t\tifTrue:[nil]\r\t\tifFalse:[key at: 1]! !\r\r!WeakKeyAssociation methodsFor: 'accessing' stamp: 'ar 3/21/98 15:45'!\rkey: aKey\r\tkey := WeakArray with: aKey! !\r\r!WeakKeyAssociation methodsFor: 'accessing' stamp: 'raok 11/29/2002 14:49'!\rkey: aKey value: anObject\r\tkey := WeakArray with: aKey.\r\tvalue := anObject.! !\rDictionary subclass: #WeakKeyDictionary\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Weak'!\r!WeakKeyDictionary commentStamp: '<historical>' prior: 0!\rI am a dictionary holding only weakly on my keys. This is a bit dangerous since at any time my keys can go away. Clients are responsible to register my instances by WeakArray such that the appropriate actions can be taken upon loss of any keys.\r\rSee WeakRegistry for an example of use.\r!\r\r\r!WeakKeyDictionary methodsFor: 'finalization' stamp: 'ar 10/21/2000 20:00'!\rfinalizeValues\r\t\"remove all nil keys and rehash the receiver afterwards\"\r\t| assoc |\r\t1 to: array size do:[:i|\r\t\tassoc _ array at: i.\r\t\t(assoc notNil and:[assoc key == nil]) ifTrue:[array at: i put: nil].\r\t].\r\tself rehash.! !\r\r!WeakKeyDictionary methodsFor: 'finalization' stamp: 'ar 10/21/2000 20:01'!\rfinalizeValues: finiObjects\r\t\"Remove all associations with key == nil and value is in finiObjects.\r\tThis method is folded with #rehash for efficiency.\"\r\t| oldArray assoc newIndex |\r\toldArray _ array.\r\tarray _ Array new: oldArray size.\r\ttally _ 0.\r\t1 to: array size do:[:i|\r\t\tassoc _ oldArray at: i.\r\t\tassoc ifNotNil:[\r\t\t\t(assoc key == nil and:[finiObjects includes: assoc value]) ifFalse:[\r\t\t\t\tnewIndex _ self scanForNil: assoc key.\r\t\t\t\tself atNewIndex: newIndex put: assoc].\r\t\t].\r\t].! !\r\r\r!WeakKeyDictionary methodsFor: 'accessing' stamp: 'ar 3/21/98 16:02'!\rat: key put: anObject \r\t\"Set the value at key to be anObject.  If key is not found, create a new\r\tentry for key and set is value to anObject. Answer anObject.\"\r\t| index element |\r\tkey isNil ifTrue:[^anObject].\r\tindex _ self findElementOrNil: key.\r\telement _ array at: index.\r\telement == nil\r\t\tifTrue: [self atNewIndex: index put: (WeakKeyAssociation key: key value: anObject)]\r\t\tifFalse: [element value: anObject].\r\t^ anObject! !\r\r!WeakKeyDictionary methodsFor: 'accessing' stamp: 'ar 2/11/2001 02:21'!\rkeysDo: aBlock \r\t\"Evaluate aBlock for each of the receiver's keys.\"\r\tself associationsDo: [:association | \r\t\tassociation key ifNotNil:[aBlock value: association key]].! !\r\r\r!WeakKeyDictionary methodsFor: 'private' stamp: 'ar 10/21/2000 19:58'!\rfixCollisionsFrom: oldIndex\r\t\"The element at index has been removed and replaced by nil.\"\r\tself rehash. \"Do it the hard way - we may have any number of nil keys and #rehash deals with them\"! !\r\r!WeakKeyDictionary methodsFor: 'private' stamp: 'ar 10/21/2000 19:56'!\rrehash\r\t\"Rehash the receiver. Reimplemented to allow for multiple nil keys\"\r\t| oldArray assoc newIndex |\r\toldArray _ array.\r\tarray _ Array new: oldArray size.\r\ttally _ 0.\r\t1 to: array size do:[:i|\r\t\tassoc _ oldArray at: i.\r\t\tassoc ifNotNil:[\r\t\t\tnewIndex _ self scanForNil: assoc key.\r\t\t\tself atNewIndex: newIndex put: assoc.\r\t\t].\r\t].! !\r\r!WeakKeyDictionary methodsFor: 'private' stamp: 'ar 10/21/2000 19:46'!\rscanFor: anObject\r\t\"ar 10/21/2000: The method has been copied to this location to indicate that whenever #scanFor: changes #scanForNil: must be changed in the receiver as well.\"\r\t\"Scan the key array for the first slot containing either a nil (indicating an empty slot) or an element that matches anObject. Answer the index of that slot or zero if no slot is found. This method will be overridden in various subclasses that have different interpretations for matching elements.\"\r\t| element start finish |\r\tstart _ (anObject hash \\\\ array size) + 1.\r\tfinish _ array size.\r\r\t\"Search from (hash mod size) to the end.\"\r\tstart to: finish do:\r\t\t[:index | ((element _ array at: index) == nil or: [element key = anObject])\r\t\t\tifTrue: [^ index ]].\r\r\t\"Search from 1 to where we started.\"\r\t1 to: start-1 do:\r\t\t[:index | ((element _ array at: index) == nil or: [element key = anObject])\r\t\t\tifTrue: [^ index ]].\r\r\t^ 0  \"No match AND no empty slot\"! !\r\r!WeakKeyDictionary methodsFor: 'private' stamp: 'ar 10/21/2000 19:46'!\rscanForNil: anObject\r\t\"Private. Scan the key array for the first slot containing nil (indicating an empty slot). Answer the index of that slot.\"\r\t| start finish |\r\tstart _ (anObject hash \\\\ array size) + 1.\r\tfinish _ array size.\r\r\t\"Search from (hash mod size) to the end.\"\r\tstart to: finish do:\r\t\t[:index | (array at: index) == nil ifTrue: [^ index ]].\r\r\t\"Search from 1 to where we started.\"\r\t1 to: start-1 do:\r\t\t[:index | (array at: index) == nil ifTrue: [^ index ]].\r\r\t^ 0  \"No match AND no empty slot\"! !\r\r\r!WeakKeyDictionary methodsFor: 'adding' stamp: 'ar 3/21/98 16:00'!\radd: anAssociation\r\tself at: anAssociation key put: anAssociation value.\r\t^ anAssociation! !\rObject weakSubclass: #WeakMessageSend\r\tinstanceVariableNames: 'selector shouldBeNil arguments'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Objects'!\r\r!WeakMessageSend methodsFor: 'accessing' stamp: 'nk 4/25/2002 09:54'!\rarguments\r\t^arguments ifNil: [ Array new ]\r! !\r\r!WeakMessageSend methodsFor: 'accessing' stamp: 'nk 4/25/2002 09:38'!\rarguments: anArray\r\targuments _ WeakArray withAll: anArray.\r\t\"no reason this should be a WeakArray\"\r\tshouldBeNil _ Array withAll: (anArray collect: [ :ea | ea isNil ]).\r! !\r\r!WeakMessageSend methodsFor: 'accessing' stamp: 'nk 4/25/2002 07:54'!\rreceiver\r\t^self at: 1\r! !\r\r!WeakMessageSend methodsFor: 'accessing' stamp: 'nk 4/25/2002 07:54'!\rreceiver: anObject\r\tself at: 1 put: anObject\r! !\r\r!WeakMessageSend methodsFor: 'accessing' stamp: 'nk 4/25/2002 07:54'!\rselector\r\t^selector\r! !\r\r!WeakMessageSend methodsFor: 'accessing' stamp: 'nk 4/25/2002 07:55'!\rselector: aSymbol\r\tselector _ aSymbol\r! !\r\r\r!WeakMessageSend methodsFor: 'comparing' stamp: 'nk 4/25/2002 08:05'!\r= anObject\r\t\"Compare equal to equivalent MessageSend\"\r\t^ anObject isMessageSend\r\t\tand: [self receiver == anObject receiver\r\t\tand: [selector == anObject selector\r\t\tand: [(Array withAll: arguments) = (Array withAll: anObject arguments)]]]\r! !\r\r!WeakMessageSend methodsFor: 'comparing' stamp: 'nk 4/25/2002 09:31'!\rhash\r\t\"work like MessageSend>>hash\"\r\t^self receiver hash bitXor: selector hash\r! !\r\r\r!WeakMessageSend methodsFor: 'converting' stamp: 'rww 10/20/2002 19:56'!\rasMinimalRepresentation\r\r\tself isReceiverOrAnyArgumentGarbage\r\t\tifTrue: [^nil]\r\t\tifFalse:[^self].! !\r\r\r!WeakMessageSend methodsFor: 'evaluating' stamp: 'nk 12/8/2002 12:15'!\rvalue\r\t^ arguments isNil\r\t\tifTrue: [self ensureReceiver\r\t\t\t\tifTrue: [self receiver perform: selector] ifFalse: []]\r\t\tifFalse: [self ensureReceiverAndArguments\r\t\t\t\tifTrue: [self receiver\r\t\t\t\t\t\tperform: selector\r\t\t\t\t\t\twithArguments: (Array withAll: arguments)] ifFalse: []]! !\r\r!WeakMessageSend methodsFor: 'evaluating' stamp: 'nk 12/8/2002 12:15'!\rvalueWithArguments: anArray\r\tself ensureReceiverAndArguments ifFalse: [ ^nil ].\r\t^ self receiver \r\t\tperform: selector \r\t\twithArguments: (self collectArguments: anArray)! !\r\r\r!WeakMessageSend methodsFor: 'printing' stamp: 'nk 4/25/2002 09:36'!\rprintOn: aStream\r\r        aStream\r                nextPutAll: self class name;\r                nextPut: $(.\r        selector printOn: aStream.\r        aStream nextPutAll: ' -> '.\r        self receiver printOn: aStream.\r        aStream nextPut: $)\r! !\r\r\r!WeakMessageSend methodsFor: 'testing' stamp: 'nk 4/25/2002 08:04'!\risMessageSend\r\t^true\r! !\r\r!WeakMessageSend methodsFor: 'testing' stamp: 'nk 8/24/2003 01:12'!\risValid\r\t^self isReceiverOrAnyArgumentGarbage not\r! !\r\r\r!WeakMessageSend methodsFor: 'private' stamp: 'nk 4/25/2002 09:49'!\rcollectArguments: anArgArray\r\t\"Private\"\r    | staticArgs |\r    staticArgs := self arguments.\r    ^(anArgArray size = staticArgs size)\r        ifTrue: [anArgArray]\r        ifFalse:\r            [(staticArgs isEmpty\r                ifTrue: [ staticArgs := Array new: selector numArgs]\r                ifFalse: [staticArgs copy] )\r                    replaceFrom: 1\r                    to: (anArgArray size min: staticArgs size)\r                    with: anArgArray\r                    startingAt: 1]\r! !\r\r!WeakMessageSend methodsFor: 'private' stamp: 'nk 12/8/2002 12:13'!\rensureReceiver\r\t\"Return true if my receiver hasn't gone away\"\r\t^self receiver notNil\r! !\r\r!WeakMessageSend methodsFor: 'private' stamp: 'nk 12/8/2002 12:13'!\rensureReceiverAndArguments\r\r\t\"Return true if my receiver hasn't gone away\"\r\tself receiver ifNil: [ ^false ].\r\r\t\"Make sure that my arguments haven't gone away\"\r\targuments ifNotNil: [\r\t\targuments with: shouldBeNil do: [ :arg :flag |\r\t\t\targ ifNil: [ flag ifFalse: [ ^false ]]\r\t\t]\r\t].\r\r\t^true\r! !\r\r!WeakMessageSend methodsFor: 'private' stamp: 'rw 4/27/2002 07:33'!\risAnyArgumentGarbage\r\t\"Make sure that my arguments haven't gone away\"\r\targuments ifNotNil: [\r\t\targuments with: shouldBeNil do: [ :arg :flag |\r\t\t\t(flag not and: [arg isNil])\r\t\t\t\tifTrue: [^true]\r\t\t]\r\t].\r\t^false\r! !\r\r!WeakMessageSend methodsFor: 'private' stamp: 'rw 4/27/2002 07:31'!\risReceiverGarbage\r\t\"Make sure that my receiver hasn't gone away\"\r\t^self receiver isNil\r! !\r\r!WeakMessageSend methodsFor: 'private' stamp: 'rw 4/27/2002 07:34'!\risReceiverOrAnyArgumentGarbage\r\t\"Make sure that my receiver hasn't gone away\"\r\t^self isReceiverGarbage \r\t\tor: [self isAnyArgumentGarbage]\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rWeakMessageSend class\r\tinstanceVariableNames: ''!\r\r!WeakMessageSend class methodsFor: 'instance creation' stamp: 'nk 4/25/2002 10:00'!\rnew\r\t^self new: 1\r! !\r\r!WeakMessageSend class methodsFor: 'instance creation' stamp: 'nk 4/25/2002 09:37'!\rreceiver: anObject selector: aSymbol\r\t^ self receiver: anObject selector: aSymbol arguments: #()\r! !\r\r!WeakMessageSend class methodsFor: 'instance creation' stamp: 'nk 4/25/2002 09:37'!\rreceiver: anObject selector: aSymbol argument: aParameter\r\t^ self receiver: anObject selector: aSymbol arguments: (Array with: aParameter)\r! !\r\r!WeakMessageSend class methodsFor: 'instance creation' stamp: 'nk 4/25/2002 09:37'!\rreceiver: anObject selector: aSymbol arguments: anArray\r\t^ self new\r\t\treceiver: anObject;\r\t\tselector: aSymbol;\r\t\targuments: anArray\r! !\rCollection subclass: #WeakRegistry\r\tinstanceVariableNames: 'valueDictionary accessLock'\r\tclassVariableNames: 'Default'\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Weak'!\r!WeakRegistry commentStamp: '<historical>' prior: 0!\rI am a registry for objects needing finalization. When an object is added the object as well as its executor is stored. When the object is garbage collected, the executor can take the appropriate action for any resources associated with the object.\r\rSee also:\r\tObject executor\r\tObject actAsExecutor\r\tObject finalize\r!\r\r\r!WeakRegistry methodsFor: 'finalization' stamp: 'ar 10/22/2000 20:24'!\rfinalizeValues\r\t\"Some of our elements may have gone away. Look for those and activate the associated executors.\"\r\t| finiObjects |\r\tfiniObjects := nil.\r\t\"First collect the objects.\"\r\tself protected:[\r\t\tvalueDictionary associationsDo:[:assoc|\r\t\t\tassoc key isNil ifTrue:[\r\t\t\t\tfiniObjects isNil \r\t\t\t\t\tifTrue:[finiObjects := OrderedCollection with: assoc value]\r\t\t\t\t\tifFalse:[finiObjects add: assoc value]]\r\t\t].\r\t\tfiniObjects isNil ifFalse:[valueDictionary finalizeValues: finiObjects asArray].\r\t].\r\t\"Then do the finalization\"\r\tfiniObjects isNil ifTrue:[^self].\r\tfiniObjects do:[:each| each finalize].\r! !\r\r\r!WeakRegistry methodsFor: 'adding' stamp: 'ar 3/21/98 16:33'!\radd: anObject\r\t\"Add anObject to the receiver. Store the object as well as the associated executor.\"\r\t| executor |\r\texecutor := anObject executor.\r\tself protected:[\r\t\tvalueDictionary at: anObject put: executor.\r\t].\r\t^anObject! !\r\r!WeakRegistry methodsFor: 'adding' stamp: 'ar 5/19/2003 20:08'!\radd: anObject executor: anExecutor\r\t\"Add anObject to the receiver. Store the object as well as the associated executor.\"\r\tself protected:[\r\t\tvalueDictionary at: anObject put: anExecutor.\r\t].\r\t^anObject! !\r\r\r!WeakRegistry methodsFor: 'accessing' stamp: 'ar 12/12/2001 16:00'!\rkeys\r\t^self protected:[\r\t\tArray streamContents:[:s| valueDictionary keysDo:[:key| s nextPut: key]]].! !\r\r!WeakRegistry methodsFor: 'accessing' stamp: 'sma 5/12/2000 11:40'!\rsize\r\t^ self protected: [valueDictionary size]! !\r\r!WeakRegistry methodsFor: 'accessing' stamp: 'ar 3/20/98 19:31'!\rspecies\r\t^Set! !\r\r\r!WeakRegistry methodsFor: 'initialize' stamp: 'ar 3/21/98 16:08'!\rinitialize: n\r\tvalueDictionary := WeakKeyDictionary new: n.\r\taccessLock := Semaphore forMutualExclusion.! !\r\r\r!WeakRegistry methodsFor: 'private' stamp: 'ar 10/8/1998 11:18'!\rprotected: aBlock\r\t\"Execute aBlock protected by the accessLock\"\r\t^accessLock isNil\r\t\tifTrue:[aBlock value]\r\t\tifFalse:[accessLock critical: aBlock ifError:[:msg :rcvr| rcvr error: msg]]! !\r\r\r!WeakRegistry methodsFor: 'enumerating' stamp: 'ar 3/21/98 18:36'!\rdo: aBlock\r\t^self protected:[\r\t\tvalueDictionary keysDo: aBlock.\r\t].\r! !\r\r\r!WeakRegistry methodsFor: 'removing' stamp: 'ar 3/21/98 21:12'!\rremove: oldObject ifAbsent: exceptionBlock\r\t\"Remove oldObject as one of the receiver's elements.\"\r\t| removedObject |\r\toldObject isNil ifTrue:[^oldObject].\r\tself protected:[\r\t\tremovedObject := valueDictionary removeKey: oldObject ifAbsent:[nil].\r\t].\r\t^removedObject isNil\r\t\tifTrue:[exceptionBlock value]\r\t\tifFalse:[removedObject].\r! !\r\r\r!WeakRegistry methodsFor: 'printing' stamp: 'tk 12/5/2001 09:42'!\rprintElementsOn: aStream\r\taStream nextPut: $(.\r\taccessLock \r\t\tifNil: [self do: [:element | aStream print: element; space]]\r\t\tifNotNil: [aStream nextPutAll: '<this WeakRegistry is locked>; space'].\r\tself isEmpty ifFalse: [aStream skip: -1].\r\taStream nextPut: $)! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rWeakRegistry class\r\tinstanceVariableNames: ''!\r\r!WeakRegistry class methodsFor: 'instance creation' stamp: 'ar 3/21/98 15:32'!\rnew\r\t^self new: 5! !\r\r!WeakRegistry class methodsFor: 'instance creation' stamp: 'ar 3/21/98 15:33'!\rnew: n\r\t| registry |\r\tregistry := super new initialize: n.\r\tWeakArray addWeakDependent: registry.\r\t^registry! !\r\r\r!WeakRegistry class methodsFor: 'accessing' stamp: 'ar 5/19/2003 20:10'!\rdefault\r\t^Default ifNil:[Default := self new]! !\rSet subclass: #WeakSet\r\tinstanceVariableNames: 'flag'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Weak'!\r\r!WeakSet methodsFor: 'public' stamp: 'SqR 8/30/2000 13:15'!\radd: newObject\r\t\"Include newObject as one of the receiver's elements, but only if\r\tnot already present. Answer newObject\"\r\r\t| index |\r\tnewObject ifNil: [self error: 'Sets cannot meaningfully contain nil as an element'].\r\tindex _ self findElementOrNil: newObject.\r\t((array at: index) == flag or: [(array at: index) isNil])\r\t\tifTrue: [self atNewIndex: index put: newObject].\r\t^newObject! !\r\r!WeakSet methodsFor: 'public' stamp: 'nk 3/11/2002 20:35'!\rcollect: aBlock\r\t| each newSet |\r\tnewSet _ self species new: self size.\r\ttally = 0 ifTrue: [^newSet ].\r\t1 to: array size do:\r\t\t[:index |\r\t\t\t((each _ array at: index) == nil or: [each == flag])\r\t\t\t\tifFalse: [newSet add: (aBlock value: each)]\r\t\t].\r\t^newSet! !\r\r!WeakSet methodsFor: 'public' stamp: 'SqR 8/23/2000 15:46'!\rdo: aBlock\r\t| each |\r\r\ttally = 0 ifTrue: [^self].\r\t1 to: array size do:\r\t\t[:index |\r\t\t\t((each _ array at: index) == nil or: [each == flag])\r\t\t\t\tifFalse: [aBlock value: each]\r\t\t]! !\r\r!WeakSet methodsFor: 'public' stamp: 'SqR 8/30/2000 13:13'!\rdo: aBlock after: anElement\r\t| each startIndex |\r\r\ttally = 0 ifTrue: [^self].\r\tstartIndex _ anElement ifNil: [1] ifNotNil:\r\t\t[self findElementOrNil: anElement].\r\tstartIndex + 1 to: array size do:\r\t\t[:index |\r\t\t\t((each _ array at: index) == nil or: [each == flag])\r\t\t\t\tifFalse: [aBlock value: each]\r\t\t]! !\r\r!WeakSet methodsFor: 'public' stamp: 'SqR 8/30/2000 13:15'!\rincludes: anObject \r\t^(array at: (self findElementOrNil: anObject)) ~~ flag! !\r\r!WeakSet methodsFor: 'public' stamp: 'SqR 8/23/2000 16:02'!\rlike: anObject\r\t\"Answer an object in the receiver that is equal to anObject,\r\tnil if no such object is found. Relies heavily on hash properties\"\r\r\t| index element |\r\r\t^(index _ self scanFor: anObject) = 0\r\t\tifFalse: [(element _ array at: index) == flag ifFalse: [element]]! !\r\r!WeakSet methodsFor: 'public' stamp: 'di 2/3/2001 16:46'!\rprintElementsOn: aStream\r\t| oldPos |\r\taStream nextPut: $(.\r\toldPos _ aStream position.\r\tself do: [:element | aStream print: element; space].\r\taStream position > oldPos ifTrue: [aStream skip: -1 \"remove the extra space\"].\r\taStream nextPut: $)! !\r\r!WeakSet methodsFor: 'public' stamp: 'SqR 8/23/2000 15:08'!\rremove: oldObject ifAbsent: aBlock\r\r\t| index |\r\tindex _ self findElementOrNil: oldObject.\r\t(array at: index) == flag ifTrue: [ ^ aBlock value ].\r\tarray at: index put: flag.\r\ttally _ tally - 1.\r\tself fixCollisionsFrom: index.\r\t^oldObject! !\r\r!WeakSet methodsFor: 'public' stamp: 'SqR 8/23/2000 15:12'!\rsize\r\t\"Careful!! Answer the maximum amount\r\tof elements in the receiver, not the\r\texact amount\"\r\r\t^tally! !\r\r\r!WeakSet methodsFor: 'private' stamp: 'SqR 8/23/2000 14:30'!\rfixCollisionsFrom: index\r\t\"The element at index has been removed and replaced by nil.\r\tThis method moves forward from there, relocating any entries\r\tthat had been placed below due to collisions with this one\"\r\r\t| length oldIndex newIndex element |\r\r\toldIndex _ index.\r\tlength _ array size.\r\t[oldIndex = length\r\t\t\tifTrue: [oldIndex _ 1]\r\t\t\tifFalse: [oldIndex _ oldIndex + 1].\r\t(element _ self keyAt: oldIndex) == flag]\r\t\twhileFalse: \r\t\t\t[newIndex _ self findElementOrNil: element.\r\t\t\toldIndex = newIndex ifFalse: [self swap: oldIndex with: newIndex]]! !\r\r!WeakSet methodsFor: 'private' stamp: 'SqR 8/23/2000 15:43'!\rgrow\r\t\"Grow the elements array and reinsert the old elements\"\r\r\tself growTo: array size + self growSize! !\r\r!WeakSet methodsFor: 'private' stamp: 'SqR 8/23/2000 15:43'!\rgrowTo: anInteger\r\t\"Grow the elements array and reinsert the old elements\"\r\r\t| oldElements |\r\r\toldElements _ array.\r\tarray _ WeakArray new: anInteger.\r\tarray atAllPut: flag.\r\ttally _ 0.\r\toldElements do:\r\t\t[:each | (each == flag or: [each == nil]) ifFalse: [self noCheckAdd: each]]! !\r\r!WeakSet methodsFor: 'private' stamp: 'SqR 8/23/2000 14:38'!\rinit: n\r\t\"Initialize array to an array size of n\"\r\r\tflag _ Object new.\r\tarray _ WeakArray new: n.\r\tarray atAllPut: flag.\r\ttally _ 0! !\r\r!WeakSet methodsFor: 'private' stamp: 'SqR 8/23/2000 15:43'!\rrehash\r\tself growTo: array size! !\r\r!WeakSet methodsFor: 'private' stamp: 'SqR 8/23/2000 14:35'!\rscanFor: anObject\r\t\"Scan the key array for the first slot containing either a nil (indicating an empty slot) or an element that matches anObject. Answer the index of that slot or zero if no slot is found. This method will be overridden in various subclasses that have different interpretations for matching elements\"\r\r\t| element start finish |\r\r\tstart _ (anObject hash \\\\ array size) + 1.\r\tfinish _ array size.\r\r\t\"Search from (hash mod size) to the end.\"\r\tstart to: finish do:\r\t\t[:index | ((element _ array at: index) == flag or: [element = anObject])\r\t\t\tifTrue: [^ index ]].\r\r\t\"Search from 1 to where we started.\"\r\t1 to: start-1 do:\r\t\t[:index | ((element _ array at: index) == flag or: [element = anObject])\r\t\t\tifTrue: [^ index ]].\r\r\t^ 0  \"No match AND no empty slot\"! !\rTimespan subclass: #Week\r\tinstanceVariableNames: ''\r\tclassVariableNames: 'StartDay'\r\tpoolDictionaries: 'ChronologyConstants'\r\tcategory: 'Kernel-Chronology'!\r!Week commentStamp: 'brp 5/13/2003 09:48' prior: 0!\rI represent a week.!\r\r\r!Week methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 09:37'!\rprintOn: aStream\r\r\taStream nextPutAll: 'a Week starting: '.\r\tself start printOn: aStream.\n! !\r\r\r!Week methodsFor: 'deprecated' stamp: 'brp 8/5/2003 22:17'!\rdo: aBlock\r\r\tself deprecated: 'Use #datesDo:'.\r\r\tself datesDo: aBlock! !\r\r!Week methodsFor: 'deprecated' stamp: 'brp 8/6/2003 18:39'!\rindex\r\r\tself deprecated: 'obsolete'.\r\r\t^ self indexInMonth: self asMonth\r \r! !\r\r!Week methodsFor: 'deprecated' stamp: 'brp 8/6/2003 18:42'!\rindexInMonth: aMonth\r\t\"1=first week, 2=second week, etc.\"\r\r\tself deprecated: 'obsolete'.\r\r\t^ (Date dayOfWeek: aMonth dayOfWeekName) + self dayOfMonth - 2  // 7 + 1\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rWeek class\r\tinstanceVariableNames: ''!\r\r!Week class methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 09:34'!\rindexOfDay: aSymbol\r\r\t^ DayNames indexOf: aSymbol\n! !\r\r!Week class methodsFor: 'squeak protocol' stamp: 'brp` 8/24/2003 19:38'!\rstartDay\r\r\t^ StartDay\nifNil: [ StartDay\n _ DayNames first ]! !\r\r!Week class methodsFor: 'squeak protocol' stamp: 'jf 4/23/2004 14:51'!\rstarting: aDateAndTime duration: aDuration\r\t\"Override - the duration is always one week.\r\t Week will start from the Week class>>startDay\"\r\r\t| midnight delta adjusted |\r\tmidnight _ aDateAndTime asDateAndTime midnight.\r\tdelta _ ((midnight dayOfWeek + 7 - (DayNames indexOf: self startDay)) rem: 7) abs.\r\tadjusted _ midnight - (Duration days: delta hours: 0 minutes: 0 seconds: 0).\r\r\t^ super starting: adjusted duration: (Duration weeks: 1).! !\r\r\r!Week class methodsFor: 'smalltalk-80' stamp: 'brp 5/13/2003 09:34'!\rnameOfDay: anIndex\r\r\t^ DayNames at: anIndex\n! !\rObject subclass: #WindowingTransformation\r\tinstanceVariableNames: 'scale translation'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'ST80-Framework'!\r!WindowingTransformation commentStamp: '<historical>' prior: 0!\rMy instances are used to transform objects from a source coordinate system to a destination coordinate system. Each instance contains a scale and a translation which can be applied to objects that respond to scaleBy: and translateBy:. It can be created with a default identity scale and translation, or with a specified scale and translation, or with a scale and translation computed from a window (a Rectangle in the source coordinate system) and a viewport (a Rectangle in the destination coordinate system). In applying a WindowingTransformation to an object, the object is first scaled (around the origin of the source coordinate system) and then translated. WindowingTransformations can be composed to form a single compound transformation.!\r\r\r!WindowingTransformation methodsFor: 'scrolling'!\rscrollBy: aPoint \r\t\"Answer a WindowingTransformation with the same scale as the receiver \r\tand with a translation of the current translation plus aPoint scaled by \r\tthe current scale. It is used when the translation is known in source \r\tcoordinates, rather than scaled source coordinates (see \r\tWindowingTransformation|translateBy:). An example is that of scrolling \r\tobjects with respect to a stationary window in the source coordinate \r\tsystem. If no scaling is in effect (scale = nil), then \r\tWindowingTransformation|translateBy: and \r\tWindowingTransformation|scrollBy: are equivalent.\"\r\r\t| newTranslation |\r\tscale == nil\r\t\tifTrue: [newTranslation _ aPoint]\r\t\tifFalse: [newTranslation _ scale * aPoint].\r\t^self translateBy: newTranslation! !\r\r\r!WindowingTransformation methodsFor: 'transforming'!\ralign: point1 with: point2 \r\t\"Answer a WindowingTransformation with the same scale as the receiver \r\tand with a translation of (aPoint2 - aPoint1). It is normally used when \r\tthe source and destination coordinate systems are scaled the same (that \r\tis, there is no scaling between them), and is then a convenient way of \r\tspecifying a translation, given two points that are intended to coincide.\"\r\r\t^self translateBy: point2 - point1! !\r\r!WindowingTransformation methodsFor: 'transforming'!\rnoScale\r\t\"Answer true if the identity scale is in effect; answer false, otherwise.\"\r\r\t^scale == nil! !\r\r!WindowingTransformation methodsFor: 'transforming'!\rscale\r\t\"Answer a copy of the point that represents the current scale of the \r\treceiver.\"\r\r\tscale == nil\r\t\tifTrue: [^1.0 @ 1.0]\r\t\tifFalse: [^scale copy]! !\r\r!WindowingTransformation methodsFor: 'transforming'!\rscaleBy: aScale \r\t\"Answer a WindowingTransformation with the scale and translation of \r\tthe receiver both scaled by aScale.\"\r\r\t| checkedScale newScale newTranslation |\r\taScale == nil\r\t\tifTrue: \r\t\t\t[newScale _ scale.\r\t\t\tnewTranslation _ translation]\r\t\tifFalse: \r\t\t\t[checkedScale _ self checkScale: aScale.\r\t\t\tscale == nil\r\t\t\t\tifTrue: [newScale _ checkedScale]\r\t\t\t\tifFalse: [newScale _ scale * checkedScale].\r\t\t\tnewTranslation _ checkedScale * translation].\r\t^WindowingTransformation scale: newScale translation: newTranslation! !\r\r!WindowingTransformation methodsFor: 'transforming'!\rtranslateBy: aPoint \r\t\"Answer a WindowingTransformation with the same scale as the receiver \r\tand with a translation of the current translation plus aPoint. It is used \r\twhen the translation is known in scaled source coordinates, rather than \r\tsource coordinates (see WindowingTransformation|scrollBy:). If no scaling \r\tis in effect (scale = nil), then WindowingTransformation|translateBy: and \r\tWindowingTransformation|scrollBy: are equivalent.\"\r\r\t^WindowingTransformation scale: scale translation: translation + aPoint! !\r\r!WindowingTransformation methodsFor: 'transforming'!\rtranslation\r\t\"Answer a copy of the receiver's translation.\"\r\r\t^translation copy! !\r\r\r!WindowingTransformation methodsFor: 'applying transform'!\rapplyInverseTo: anObject \r\t\"Apply the inverse of the receiver to anObject and answer the result. \r\tUsed to map some object in destination coordinates to one in source \r\tcoordinates.\"\r\r\t| transformedObject |\r\ttransformedObject _ anObject translateBy: translation x negated @ translation y negated.\r\tscale == nil\r\t\tifFalse: [transformedObject _ transformedObject scaleBy: 1.0 / scale x @ (1.0 / scale y)].\r\t^transformedObject! !\r\r!WindowingTransformation methodsFor: 'applying transform'!\rapplyTo: anObject \r\t\"Apply the receiver to anObject and answer the result. Used to map some \r\tobject in source coordinates to one in destination coordinates.\"\r\r\t| transformedObject |\r\tscale == nil\r\t\tifTrue: [transformedObject _ anObject]\r\t\tifFalse: [transformedObject _ anObject scaleBy: scale].\r\ttransformedObject _ transformedObject translateBy: translation.\r\t^transformedObject! !\r\r!WindowingTransformation methodsFor: 'applying transform'!\rcompose: aTransformation \r\t\"Answer a WindowingTransformation that is the composition of the \r\treceiver and aTransformation. The effect of applying the resulting \r\tWindowingTransformation to an object is the same as that of first \r\tapplying aTransformation to the object and then applying the receiver to \r\tits result.\"\r\r\t| aTransformationScale newScale newTranslation |\r\taTransformationScale _ aTransformation scale.\r\tscale == nil\r\t\tifTrue: \r\t\t\t[aTransformation noScale\r\t\t\t\tifTrue: [newScale _ nil]\r\t\t\t\tifFalse: [newScale _ aTransformationScale].\r\t\t\tnewTranslation _ translation + aTransformation translation]\r\t\tifFalse: \r\t\t\t[aTransformation noScale\r\t\t\t\tifTrue: [newScale _ scale]\r\t\t\t\tifFalse: [newScale _ scale * aTransformationScale].\r\t\t\tnewTranslation _ translation + (scale * aTransformation translation)].\r\t^WindowingTransformation scale: newScale translation: newTranslation! !\r\r\r!WindowingTransformation methodsFor: 'printing'!\rprintOn: aStream \r\t\"Refer to the comment in Object|printOn:.\"\r\r\taStream nextPutAll: self class name, ' scale: ';\r\t\tprint: scale; nextPutAll: ' translation: ';\r\t\tprint: translation! !\r\r\r!WindowingTransformation methodsFor: 'private'!\rcheckScale: aScale\r\t\"Convert aScale to the internal format of a floating-point Point.\"\r\r \t| checkedScale |\r\tcheckedScale _ aScale asPoint.\r\t^checkedScale x asFloat @ checkedScale y asFloat! !\r\r!WindowingTransformation methodsFor: 'private'!\rsetScale: aScale translation: aTranslation \r\t\"Sets the scale to aScale and the translation to aTranslation.\"\r\r\tscale _ aScale.\r\ttranslation _ aTranslation! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rWindowingTransformation class\r\tinstanceVariableNames: ''!\r\r!WindowingTransformation class methodsFor: 'instance creation'!\ridentity\r\t\"Answer an instance of me with no scaling (nil) and no translation \r\t(0@0).\"\r\r\t^self new setScale: nil translation: 0 @ 0! !\r\r!WindowingTransformation class methodsFor: 'instance creation'!\rscale: aScale translation: aTranslation \r\t\"Answer an instance of me with a scale factor of aScale and a translation \r\toffset of aTranslation. When the transformation is applied (see \r\tWindowingTransformation|apply:), the scale is applied first, followed by \r\tthe translation.\"\r\r\t^self new setScale: aScale translation: aTranslation! !\r\r!WindowingTransformation class methodsFor: 'instance creation'!\rwindow: aWindow viewport: aViewport \r\t\"Answer an instance of me with a scale and translation based on \r\taWindow and aViewport. The scale and translation are computed such \r\tthat aWindow, when transformed, coincides with aViewport.\"\r\r\t| scale translation |\r\taViewport width = aWindow width & (aViewport height = aWindow height)\r\t\tifTrue:\r\t\t\t[scale _ nil]\r\t\tifFalse:\r\t\t\t[scale _ aViewport width asFloat / aWindow width asFloat\r\t\t\t\t\t\t@ (aViewport height asFloat / aWindow height asFloat)].\r\tscale == nil\r\t\tifTrue: [translation _ aViewport left - aWindow left\r\t\t\t\t\t\t\t\t@ (aViewport top - aWindow top)]\r\t\tifFalse: [translation _ aViewport left - (scale x * aWindow left)\r\t\t\t\t\t\t\t\t@ (aViewport top - (scale y * aWindow top))].\r\t^self new setScale: scale translation: translation! !\rArrayedCollection variableWordSubclass: #WordArray\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Arrayed'!\r!WordArray commentStamp: '<historical>' prior: 0!\rWordArrays store 32-bit unsigned Integer values.\r!\r\r\r!WordArray methodsFor: 'converting' stamp: 'ar 9/14/1998 23:46'!\rasWordArray\r\t^self! !\r\r\r!WordArray methodsFor: 'accessing' stamp: 'sma 4/22/2000 17:47'!\ratAllPut: value\r\t\"Fill the receiver with the given value\"\r\r\t<primitive: 145>\r\tsuper atAllPut: value! !\r\r!WordArray methodsFor: 'accessing' stamp: 'ar 3/3/2001 16:18'!\rbyteSize\r\t^self size * 4! !\r\r!WordArray methodsFor: 'accessing' stamp: 'tk 3/13/2000 14:46'!\rbytesPerElement\r\t\"Number of bytes in each item.  This multiplied by (self size)*8 gives the number of bits stored.\"\r\t^ 4! !\r\r!WordArray methodsFor: 'accessing' stamp: 'ar 11/2/1998 12:19'!\rdefaultElement\r\t\"Return the default element of the receiver\"\r\t^0! !\r\r\r!WordArray methodsFor: 'private' stamp: 'ar 2/15/1999 00:51'!\rreplaceFrom: start to: stop with: replacement startingAt: repStart \r\t<primitive: 105>\r\t^super replaceFrom: start to: stop with: replacement startingAt: repStart ! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rWordArray class\r\tinstanceVariableNames: ''!\r\r!WordArray class methodsFor: 'plugin generation' stamp: 'acg 9/17/1999 01:19'!\rccg: cg emitLoadFor: aString from: anInteger on: aStream\r\r\tcg emitLoad: aString asIntPtrFrom: anInteger on: aStream! !\r\r!WordArray class methodsFor: 'plugin generation' stamp: 'acg 9/20/1999 13:16'!\rccg: cg prolog: aBlock expr: aString index: anInteger\r\r\t^cg \r\t\tccgLoad: aBlock \r\t\texpr: aString \r\t\tasUnsignedPtrFrom: anInteger\r\t\tandThen: (cg ccgValBlock: 'isWords')! !\r\r!WordArray class methodsFor: 'plugin generation' stamp: 'acg 9/17/1999 01:19'!\rccgDeclareCForVar: aSymbolOrString\r\r\t^'unsigned *', aSymbolOrString! !\rStringHolder subclass: #Workspace\r\tinstanceVariableNames: 'bindings acceptDroppedMorphs'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-ST80 Remnants'!\r!Workspace commentStamp: 'ls 10/14/2003 12:13' prior: 0!\rA Workspace is a text area plus a lot of support for executable code.  It is a great place to execute top-level commands to compute something useful, and it is a great place to develop bits of a program before those bits get put into class methods.\r\rTo open a new workspace, execute:\r\r\tWorkspace open\r\r\rA workspace can have its own variables, called \"workspace variables\", to hold intermediate results.  For example, if you type into a workspace \"x := 5\" and do-it, then later you could type in \"y := x * 2\" and y would become 10.\r\rAdditionally, in Morphic, a workspace can gain access to morphs that are on the screen.  If acceptDroppedMorphss is turned on, then whenever a morph is dropped on the workspace, a variable will be created which references that morph.  This functionality is toggled with the window-wide menu of a workspace.\r\r\rThe instance variables of this class are:\r\r\tbindings  -  holds the workspace variables for this workspace\r\r\tacceptDroppedMorphss - whether dropped morphs should create new variables!\r]style[(286 14 722)f1,f1dWorkspace open;;,f1!\r\r\r!Workspace methodsFor: 'binding'!\rbindingOf: aString\r\tbindings isNil\r\t\tifTrue: [bindings _ Dictionary new].\r\t(bindings includesKey: aString)\r\t\tifFalse: [bindings at: aString put: nil].\r\t^bindings associationAt: aString! !\r\r\r!Workspace methodsFor: 'accessing' stamp: 'jsp 3/23/1999 12:19'!\rsetBindings: aDictionary\r\t\"Sets the Workspace to use the specified dictionary as its namespace\"\r\r\tbindings _ aDictionary.\r! !\r\r\r!Workspace methodsFor: 'as yet unclassified' stamp: 'BG 11/1/2003 22:13'!\rsaveContentsInFile\r\t\"A bit of a hack to pass along this message to the controller or morph.  (Possibly this Workspace menu item could be deleted, since it's now in the text menu.)\"\r\t| textView |\r\r\r\ttextView _ self dependents detect: [:dep | dep isKindOf: PluggableTextView] ifNone: [nil].\r\ttextView notNil ifTrue: [^ textView controller saveContentsInFile].\r! !\r\r\r!Workspace methodsFor: 'initialize-release' stamp: 'sma 11/11/2000 16:33'!\rinitialize\r\r\tsuper initialize.\r\tacceptDroppedMorphs _ false! !\r\r\r\r!Workspace methodsFor: 'object fileIn' stamp: 'RAA 12/20/2000 17:50'!\rconvertToCurrentVersion: varDict refStream: smartRefStrm\r\t\r\tacceptDroppedMorphs ifNil: [acceptDroppedMorphs _ false].\r\t^super convertToCurrentVersion: varDict refStream: smartRefStrm.\r\r! !\r\r\r!Workspace methodsFor: 'menu commands' stamp: 'ssa 9/3/2008 10:48'!\raddModelItemsToWindowMenu: aMenu\r\t\"Add model-related items to the supplied window menu\"\r\r\taMenu addLine.\r\taMenu add: 'save contents to file...' target: self action: #saveContentsInFile.\r\taMenu addLine.\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rWorkspace class\r\tinstanceVariableNames: ''!\r\r\r!Workspace class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 12:13'!\rinitialize\r\r\tself registerInFlapsRegistry.\t! !\r\r!Workspace class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 12:14'!\rregisterInFlapsRegistry\r\t\"Register the receiver in the system's flaps registry\"\r\tself environment\r\t\tat: #Flaps\r\t\tifPresent: [:cl | cl registerQuad: #(Workspace\tprototypicalToolWindow\t'Workspace'\t\t'A Workspace is a simple window for editing text.  You can later save the contents to a file if you desire.')\r\t\t\t\t\t\tforFlapNamed: 'Tools'.]! !\r\r!Workspace class methodsFor: 'class initialization' stamp: 'asm 4/11/2003 12:42'!\runload\r\t\"Unload the receiver from global registries\"\r\r\tself environment at: #Flaps ifPresent: [:cl |\r\tcl unregisterQuadsWithReceiver: self] ! !\rPositionableStream subclass: #WriteStream\r\tinstanceVariableNames: 'writeLimit'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Streams'!\r!WriteStream commentStamp: '<historical>' prior: 0!\rI represent an accessor for a sequence of objects that can only store objects in the sequence.!\r\r\r!WriteStream methodsFor: 'accessing'!\rcontents\r\r\treadLimit _ readLimit max: position.\r\t^collection copyFrom: 1 to: position! !\r\r!WriteStream methodsFor: 'accessing'!\rnext\r\r\tself shouldNotImplement! !\r\r!WriteStream methodsFor: 'accessing' stamp: 'di 3/8/1999 09:02'!\rnextPut: anObject \r\t\"Primitive. Insert the argument at the next position in the Stream\r\trepresented by the receiver. Fail if the collection of this stream is not an\r\tArray or a String. Fail if the stream is positioned at its end, or if the\r\tposition is out of bounds in the collection. Fail if the argument is not\r\tof the right type for the collection. Optional. See Object documentation\r\twhatIsAPrimitive.\"\r\r\t<primitive: 66>\r\tposition >= writeLimit\r\t\tifTrue: [^ self pastEndPut: anObject]\r\t\tifFalse: \r\t\t\t[position _ position + 1.\r\t\t\t^collection at: position put: anObject]! !\r\r!WriteStream methodsFor: 'accessing' stamp: 'BG 5/24/2003 20:41'!\rnextPutAll: aCollection\r\n\r\n\t| newEnd |\r\n\tcollection class == aCollection class ifFalse:\r\n\t\t[^ super nextPutAll: aCollection ].\r\n\r\n\tnewEnd _ position + aCollection size.\r\n\tnewEnd > writeLimit ifTrue:\r\n\t\t[self growTo: newEnd + 10].\r\n\r\n\tcollection replaceFrom: position+1 to: newEnd  with: aCollection startingAt: 1.\r\n\tposition _ newEnd.! !\r\r!WriteStream methodsFor: 'accessing'!\rsize\r\r\t^readLimit _ readLimit max: position! !\r\r\r!WriteStream methodsFor: 'positioning'!\rposition: anInteger \r\t\"Refer to the comment in PositionableStream|position:.\"\r\r\treadLimit _ readLimit max: position.\r\tsuper position: anInteger! !\r\r!WriteStream methodsFor: 'positioning'!\rreset \r\t\"Refer to the comment in PositionableStream|reset.\"\r\r\treadLimit _ readLimit max: position.\r\tposition _ 0! !\r\r!WriteStream methodsFor: 'positioning' stamp: 'ar 11/12/1998 21:27'!\rresetToStart\r\treadLimit _ position _ 0.! !\r\r!WriteStream methodsFor: 'positioning' stamp: 'ajh 5/25/2001 20:19'!\rsetToEnd \r\t\"Refer to the comment in PositionableStream|setToEnd.\"\r\r\treadLimit _ readLimit max: position.\r\tsuper setToEnd.! !\r\r\r!WriteStream methodsFor: 'character writing'!\rcr\r\t\"Append a return character to the receiver.\"\r\r\tself nextPut: Character cr! !\r\r!WriteStream methodsFor: 'character writing'!\rcrtab\r\t\"Append a return character, followed by a single tab character, to the \r\treceiver.\"\r\r\tself nextPut: Character cr.\r\tself nextPut: Character tab! !\r\r!WriteStream methodsFor: 'character writing'!\rcrtab: anInteger \r\t\"Append a return character, followed by anInteger tab characters, to the \r\treceiver.\"\r\r\tself nextPut: Character cr.\r\tanInteger timesRepeat: [self nextPut: Character tab]! !\r\r!WriteStream methodsFor: 'character writing' stamp: 'di 6/7/2000 22:43'!\rnextPutKeyword: keyword withArg: argValue\r\t\"Emit a keyword/value pair in the alternate syntax\"\r\r\tself nextPutAll: (keyword copyWithout: $:);\r\t\tnextPut: $(;\r\t\tstore: argValue;\r\t\tnextPut: $)! !\r\r!WriteStream methodsFor: 'character writing'!\rspace\r\t\"Append a space character to the receiver.\"\r\r\tself nextPut: Character space! !\r\r!WriteStream methodsFor: 'character writing'!\rtab\r\t\"Append a tab character to the receiver.\"\r\r\tself nextPut: Character tab! !\r\r!WriteStream methodsFor: 'character writing' stamp: 'JF 7/31/2003 13:00'!\rtab: anInteger \r\t\"Append anInteger tab characters to the receiver.\"\r\r\tanInteger timesRepeat: [self tab]! !\r\r\r!WriteStream methodsFor: 'fileIn/Out'!\rnextChunkPut: aString\r\t\"Append the argument, aString, to the receiver, doubling embedded terminators.\"\r\r\t| i remainder terminator |\r\tterminator _ $!!.\r\tremainder _ aString.\r\t[(i _ remainder indexOf: terminator) = 0] whileFalse:\r\t\t[self nextPutAll: (remainder copyFrom: 1 to: i).\r\t\tself nextPut: terminator.  \"double imbedded terminators\"\r\t\tremainder _ remainder copyFrom: i+1 to: remainder size].\r\tself nextPutAll: remainder; nextPut: terminator! !\r\r!WriteStream methodsFor: 'fileIn/Out' stamp: 'di 2/2/98 13:03'!\rnextChunkPutWithStyle: aStringOrText\r\t\"Append the argument, aText, to the receiver, doubling embedded terminators.  Put out one chunk for the string and one for the style runs.  Mark the style with ]style[.\"\r\r\taStringOrText class == String ifTrue: [^ self nextChunkPut: aStringOrText].\r\taStringOrText runs coalesce.\r\taStringOrText unembellished ifTrue: [^ self nextChunkPut: aStringOrText asString].\r\r\tself nextChunkPut: aStringOrText asString.\r\tself cr; nextPutAll: ']style['.\r\tself nextChunkPut: \r\t\t(String streamContents: [:strm | \r\t\t\taStringOrText runs writeScanOn: strm]).\r\r! !\r\r!WriteStream methodsFor: 'fileIn/Out' stamp: 'dew 9/24/2001 23:45'!\rtimeStamp\r\t\"Append the current time to the receiver as a String.\"\r\tself nextChunkPut:\t\"double string quotes and !!s\"\r\t\t(String streamContents: [:s | Smalltalk timeStamp: s]) printString.\r\tself cr! !\r\r\r!WriteStream methodsFor: 'printing'!\rstore: anObject \r\t\"Have anObject print on the receiver for purposes of rereading.\"\r\r\tanObject storeOn: self! !\r\r\r!WriteStream methodsFor: 'private' stamp: 'di 11/18/1999 22:55'!\rbraceArray\r\t\"This method is used in compilation of brace constructs.\r\tIt MUST NOT be deleted or altered.\"\r\r\t^ collection! !\r\r!WriteStream methodsFor: 'private' stamp: 'di 11/18/1999 22:50'!\rbraceArray: anArray\r\t\"This method is used in compilation of brace constructs.\r\tIt MUST NOT be deleted or altered.\"\r\r\tcollection _ anArray.\r\tposition _ 0.\r\treadLimit _ 0.\r\twriteLimit _ anArray size.! !\r\r!WriteStream methodsFor: 'private' stamp: 'BG 5/24/2003 22:49'!\rgrowTo: anInteger\r\n\r\n   \" anInteger is the required minimal new size of the collection \"\r\n\t| oldSize grownCollection newSize |\r\n\toldSize _ collection size.\r\n     newSize := anInteger + (oldSize // 4 max: 20).\r\n\tgrownCollection _ collection class new: newSize.\r\n\tcollection _ grownCollection replaceFrom: 1 to: oldSize with: collection startingAt: 1.\r\n\twriteLimit _ collection size.\r\n! !\r\r!WriteStream methodsFor: 'private'!\ron: aCollection\r\r\tsuper on: aCollection.\r\treadLimit _ 0.\r\twriteLimit _ aCollection size! !\r\r!WriteStream methodsFor: 'private'!\ron: aCollection from: firstIndex to: lastIndex\r\r\t| len |\r\tcollection _ aCollection.\r\treadLimit _ \r\t\twriteLimit _ lastIndex > (len _ collection size)\r\t\t\t\t\t\tifTrue: [len]\r\t\t\t\t\t\tifFalse: [lastIndex].\r\tposition _ firstIndex <= 1\r\t\t\t\tifTrue: [0]\r\t\t\t\tifFalse: [firstIndex - 1]! !\r\r!WriteStream methodsFor: 'private' stamp: 'gh 5/15/2002 09:55'!\rpastEndPut: anObject\r\t\"Grow the collection by creating a new bigger collection and then\r\tcopy over the contents from the old one. We grow by doubling the size\r\tbut the growth is kept between 20 and 1000000.\r\tFinally we put <anObject> at the current write position.\"\r\r\t| oldSize grownCollection |\r\toldSize _ collection size.\r\tgrownCollection _ collection class new: oldSize + ((oldSize max: 20) min: 1000000).\r\tcollection _ grownCollection replaceFrom: 1 to: oldSize with: collection startingAt: 1.\r\twriteLimit _ collection size.\r\tcollection at: (position _ position + 1) put: anObject! !\r\r!WriteStream methodsFor: 'private'!\rwith: aCollection\r\r\tsuper on: aCollection.\r\tposition _ readLimit _ writeLimit _ aCollection size! !\r\r!WriteStream methodsFor: 'private' stamp: 'djp 11/6/1999 23:15'!\rwithAttributes: attributes do: strmBlock \r\t\"No-op here is overriden in TextStream for font emphasis\"\r\t^ strmBlock value! !\r\r\r!WriteStream methodsFor: 'file open/close' stamp: 'mir 8/10/1999 11:56'!\rflush! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rWriteStream class\r\tinstanceVariableNames: ''!\r\r!WriteStream class methodsFor: 'instance creation'!\ron: aCollection from: firstIndex to: lastIndex \r\t\"Answer an instance of me on a copy of the argument, aCollection, \r\tdetermined by the indices firstIndex and lastIndex. Position the instance \r\tat the beginning of the collection.\"\r\r\t^self basicNew\r\t\ton: aCollection\r\t\tfrom: firstIndex\r\t\tto: lastIndex! !\r\r!WriteStream class methodsFor: 'instance creation'!\rwith: aCollection \r\t\"Answer an instance of me on the argument, aCollection, positioned to \r\tstore objects at the end of aCollection.\"\r\r\t^self basicNew with: aCollection! !\r\r!WriteStream class methodsFor: 'instance creation'!\rwith: aCollection from: firstIndex to: lastIndex \r\t\"Answer an instance of me on the subcollection of the argument, \r\taCollection, determined by the indices firstIndex and lastIndex. Position \r\tthe instance to store at the end of the subcollection.\"\r\r\t^self basicNew with: (aCollection copyFrom: firstIndex to: lastIndex)! !\rTimespan subclass: #Year\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Kernel-Chronology'!\r!Year commentStamp: '<historical>' prior: 0!\rI represent a year.\n!\r\r\r!Year methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 09:01'!\rasYear\n\r\r\t^ self\n! !\r\r!Year methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 09:01'!\rdaysInMonth\n\r\r\tself shouldNotImplement \n! !\r\r!Year methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 09:01'!\rdaysInYear\r\r\t^ self duration days.! !\r\r!Year methodsFor: 'squeak protocol' stamp: 'brp 5/21/2003 08:38'!\rprintOn: aStream\r\r\taStream nextPutAll: 'a Year ('.\r\n\tself start year printOn: aStream.\n\r\taStream nextPutAll: ')'.\r! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rYear class\r\tinstanceVariableNames: ''!\r\r!Year class methodsFor: 'squeak protocol' stamp: 'brp 9/11/2003 14:05'!\rcurrent\r \r\t^ self year: (DateAndTime now year)\r! !\r\r!Year class methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 09:00'!\risLeapYear: aYearInteger\n\r\r\t| adjustedYear |\r\n\tadjustedYear _ aYearInteger > 0\r\t\tifTrue: [aYearInteger]\r\t\tifFalse: [(aYearInteger + 1) negated].\r\r\n\t\"There was no year 0\"\r\n\t^ ((adjustedYear \\\\ 4 ~= 0) or: [(adjustedYear \\\\ 100 = 0) and: [adjustedYear \\\\ 400 ~= 0]]) not.! !\r\r!Year class methodsFor: 'squeak protocol' stamp: 'brp 7/1/2003 13:53'!\rstarting: aDateAndTime duration: aDuration \r\t\"Override - start from midnight\"\r\t| midnight |\r\tmidnight _ aDateAndTime asDateAndTime midnight.\r\r\t^ super\r\t\tstarting: midnight\r\t\tduration: (Duration days: (self daysInYear: midnight year)).! !\r\r!Year class methodsFor: 'squeak protocol' stamp: 'brp 5/13/2003 09:00'!\ryear: aYear\r\r\t^ self starting: (DateAndTime year: aYear month: 1 day: 1).! !\r\r\r!Year class methodsFor: 'smalltalk-80' stamp: 'brp 7/1/2003 13:52'!\rdaysInYear: yearInteger\r\r\t^ 365 + ((self isLeapYear: yearInteger) ifTrue: [1] ifFalse: [0]).\r! !\r\r!Year class methodsFor: 'smalltalk-80' stamp: 'brp 7/1/2003 13:55'!\rleapYear: yearInteger \r\r\t^ (self isLeapYear: yearInteger)\r\t\tifTrue: [1]\r\t\tifFalse: [0]! !\rArithmeticError subclass: #ZeroDivide\r\tinstanceVariableNames: 'dividend'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Exceptions Kernel'!\r!ZeroDivide commentStamp: '<historical>' prior: 0!\rZeroDivide may be signaled when a mathematical division by 0 is attempted.!\r\r\r!ZeroDivide methodsFor: 'exceptionDescription' stamp: 'pnm 8/16/2000 15:05'!\risResumable\r\t\"Determine whether an exception is resumable.\"\r\r\t^true! !\r\r\r!ZeroDivide methodsFor: 'exceptionBuilder' stamp: 'pnm 8/16/2000 15:05'!\rdividend: argument\r\t\"Specify the number that was being divided by zero.\"\r\r\tdividend := argument! !\r\r\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\r\rZeroDivide class\r\tinstanceVariableNames: ''!\r\r!ZeroDivide class methodsFor: 'exceptionInstantiator' stamp: 'bf 9/27/1999 17:26'!\rdividend: argument\r\t^self new dividend: argument; yourself! !\r"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/config.h",
    "content": "/* config.h.  Generated by configure.  */\n/* config.h.in -- template for config.h\t\t\t-*- C -*-\n *\n *   Copyright (C) 1996-2005 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n*/\n/* Permission is hereby granted, free of charge, to any person\n*  obtaining a copy of this software and associated documentation\n*  files (the \"Software\"), to deal in the Software without\n*  restriction, including without limitation the rights to use,\n*  copy, modify, merge, publish, distribute, sublicense, and/or sell\n*  copies of the Software, and to permit persons to whom the\n*  Software is furnished to do so, subject to the following\n*  conditions:\n*  \n*  The above copyright notice and this permission notice shall be\n*  included in all copies or substantial portions of the Software.\n*  \n*  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n*  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n*  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n*  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n*  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n*  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n*  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n*  OTHER DEALINGS IN THE SOFTWARE.\n*/\n//\n\n/* Author: Ian.Piumarta@squeakland.org\n *\n * Last edited: 2005-03-28 22:47:17 by piumarta on emilia.local\n */\n\n#ifndef __sq_config_h\n#define __sq_config_h\n\n/* explicit image width */\n\n#define\tHAVE_INTERP_H 1\n\n/* package options */\n\n#define\tUSE_X11 1\n/* #undef\tUSE_X11_GLX */\n#define\tUSE_QUARTZ 1\n#define\tUSE_QUARTZ_CGL 1\n/* #undef\tUSE_RFB */\n\n/* libraries */\n\n/* #undef\tHAVE_LIBX11 */\n#define\tHAVE_LIBXEXT 1\n/* #undef\tHAVE_LIBDL */\n#define\tHAVE_DYLD 1\n/* #undef\tHAVE_LIBFFI */\n/* #undef\tHAVE_ICONV */\n\n/* #undef\tUSE_AUDIO_NONE */\n/* #undef\tUSE_AUDIO_SUN */\n/* #undef\tUSE_AUDIO_NAS */\n/* #undef\tUSE_AUDIO_OSS */\n/* #undef\tUSE_AUDIO_MACOSX */\n/* #undef\tOSS_DEVICE */\n\n/* header files */\n\n#define\tHAVE_UNISTD_H 1\n/* #undef\tNEED_GETHOSTNAME_P */\n\n#define\tHAVE_DIRENT_H 1\n/* #undef\tHAVE_SYS_NDIR_H */\n/* #undef\tHAVE_SYS_DIR_H */\n/* #undef\tHAVE_NDIR_H */\n\n#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_3\n#undef\tHAVE_DLFCN_H \n#else\n#define\tHAVE_DLFCN_H 1\n#endif\n\n#define\tHAVE_ICONV_H 1\n\n#define\tHAVE_SYS_TIME_H 1\n#define\tTIME_WITH_SYS_TIME 1\n\n#define\tHAVE_SYS_FILIO_H 1\n\n/* #undef\tHAVE_SYS_AUDIOIO_H */\n/* #undef\tHAVE_SUN_AUDIOIO_H */\n\n/* #undef\tHAVE_PTY_H */\n#define\tHAVE_UTIL_H 1\n/* #undef\tHAVE_LIBUTIL_H */\n/* #undef\tHAVE_STROPTS_H */\n\n/* #undef\tHAVE_GL_GL_H */\n#define\tHAVE_OPENGL_GL_H 1\n\n/* #undef\tNEED_SUNOS_H */\n\n/* system calls/library functions */\n\n#define\tAT_EXIT atexit\n\n#define\tHAVE_TZSET 1\n\n#define\tHAVE_OPENPTY 1\n/* #undef\tHAVE_UNIX98_PTYS */\n\n#define\tHAVE_SNPRINTF 1\n/* #undef\tHAVE___SNPRINTF */\n\n#define\tHAVE_MMAP 1\n\n#define\tHAVE_DYLD 1\n\n#define\tHAVE_LANGINFO_CODESET 1\n\n#define\tHAVE_ALLOCA 1\n#define\tHAVE_ALLOCA_H 1\n\n#define\tHAVE_UNSETENV 1\n\n/* widths of primitive types */\n\n#define\tSIZEOF_INT 4\n#define\tSIZEOF_LONG 4\n#define\tSIZEOF_LONG_LONG 8\n#ifdef __x86_64__\n#define\tSIZEOF_VOID_P 8\n#else\n#define\tSIZEOF_VOID_P 4\n#endif\n/* structures */\n\n#define\tHAVE_TM_GMTOFF 1\n#define\tHAVE_TIMEZONE 1\n\n/* typedefs */\n\n/* #undef\tsize_t */\n\n#define\tsqueakInt64 long long\n\n/* architecture */\n\n#define\tOS_TYPE \"unix\"\n\n/* #undef\tVM_HOST_VENDOR */\n#define\tVM_HOST_OS \"darwin8.5.0\"\n\n#if defined(__BIG_ENDIAN__)\n#define\tWORDS_BIGENDIAN 1\n#define VMENDIANNESS 1\n#define VMBIGENDIAN 1\n#define\tVM_HOST \"powerpc-apple-darwin8.5.0\"\n#define\tVM_HOST_CPU \"powerpc\"\n#else\n#undef\tWORDS_BIGENDIAN \n#define VMENDIANNESS 0\n#define VMBIGENDIAN 0\n#define\tVM_HOST \"intel-apple-darwin8.5.0\"\n#define\tVM_HOST_CPU \"intel\"\n#if COGVM\n#else\n#define\tDOUBLE_WORD_ORDER 1\n#endif\n#define LSB_FIRST 1\n#endif\n\n#define HAVE_LIBDL 1\n/* #undef\tDOUBLE_WORD_ALIGNMENT */\n/* #undef\tDOUBLE_WORD_ORDER */\n\n/* damage containment */\n\n#define\tDARWIN 1\n\n#ifdef NEED_SUNOS_H\n# include \"sunos.h\"\n#endif\n\n/* other configured variables */\n\n#define SQ_VERSION \"3.8g-6548\"\n#define VM_VERSION \"3.8a-2\"\n#define VM_LIBDIR \"/usr/local/lib/squeak/3.8a-2\"\n#define VM_MODULE_PREFIX \"\"\n/* #undef VM_DLSYM_PREFIX */\n#define VM_X11DIR \"/usr/X11R6/lib\"\n\n/* avoid dependencies on glibc2.3 */\n\n/* #undef HAVE_FEATURES_H */\n\n#if defined(HAVE_FEATURES_H)\n# include \"glibc.h\"\n#endif\n\n\n#endif /* __sq_config_h */\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/iPhone.changes",
    "content": "'From Squeak3.7 of ''4 September 2004'' [latest update: #5989] on 14 August 2011 at 7:19:23 pm'!\n\n!AbstractHierarchicalList methodsFor: 'as yet unclassified' stamp: 'RAA 6/21/1999 15:22'!\ngenericMenu: aMenu\n\n\taMenu add: 'no menu yet' target: self selector: #yourself.\n\t^aMenu! !\n\n!AbstractHierarchicalList methodsFor: 'as yet unclassified' stamp: 'RAA 4/7/1999 16:44'!\ngetCurrentSelection\n\n\t^currentSelection! !\n\n!AbstractHierarchicalList methodsFor: 'as yet unclassified' stamp: 'RAA 4/7/1999 16:46'!\nnoteNewSelection: x\n\n\tcurrentSelection _ x.\n\tself changed: #getCurrentSelection.\n\tcurrentSelection ifNil: [^self].\n\tcurrentSelection sendSettingMessageTo: self.\n! !\n\n!AbstractHierarchicalList methodsFor: 'as yet unclassified' stamp: 'RAA 4/7/1999 16:53'!\nperform: selector orSendTo: otherTarget\n\t\"Selector was just chosen from a menu by a user.  If can respond, then\nperform it on myself. If not, send it to otherTarget, presumably the\neditPane from which the menu was invoked.\"\n\n\t(self respondsTo: selector)\n\t\tifTrue: [^ self perform: selector]\n\t\tifFalse: [^ otherTarget perform: selector]! !\n\n!AbstractHierarchicalList methodsFor: 'as yet unclassified' stamp: 'RAA 4/7/1999 16:47'!\nupdate: aSymbol\n\n\taSymbol == #hierarchicalList ifTrue: [\n\t\t^self changed: #getList\n\t].\n\tsuper update: aSymbol! !\n\n!AbstractHierarchicalList methodsFor: 'accessing' stamp: 'ssa 9/11/2009 15:44'!\ncurrentSelection\n\t\"Answer the value of currentSelection\"\n\n\tcurrentSelection isNil ifTrue:[self currentSelection: nil].\n\t^ currentSelection! !\n\n!AbstractHierarchicalList methodsFor: 'accessing' stamp: 'ssa 9/11/2009 15:44'!\ncurrentSelection: anObject\n\t\"Set the value of currentSelection\"\n\n\tcurrentSelection _ anObject! !\n\n!AbstractHierarchicalList methodsFor: 'accessing' stamp: 'ssa 9/11/2009 15:44'!\nmyBrowser\n\t\"Answer the value of myBrowser\"\n\n\tmyBrowser isNil ifTrue:[self myBrowser: nil].\n\t^ myBrowser! !\n\n!AbstractHierarchicalList methodsFor: 'accessing' stamp: 'ssa 9/11/2009 15:44'!\nmyBrowser: anObject\n\t\"Set the value of myBrowser\"\n\n\tmyBrowser _ anObject! !\n\n!AbstractHierarchicalList commentStamp: '<historical>' prior: 0!\nContributed by Bob Arning as part of the ObjectExplorer package.\n!\n!AnimatedGIFReadWriter methodsFor: 'accessing' stamp: 'bf 2/25/2005 11:11'!\nallImages\n\t| body colorTable |\n\tstream class == ReadWriteStream ifFalse: [\n\t\tstream binary.\n\t\tself on: (ReadWriteStream with: (stream contentsOfEntireFile))].\n\tlocalColorTable _ nil.\n\tforms _ OrderedCollection new.\n\tdelays _ OrderedCollection new.\n\tcomments _ OrderedCollection new.\n\tself readHeader.\n\t[(body _ self readBody) == nil]\n\t\twhileFalse: [colorTable _ localColorTable\n\t\t\t\t\t\tifNil: [colorPalette].\n\t\t\ttransparentIndex\n\t\t\t\tifNotNil: [transparentIndex + 1 > colorTable size\n\t\t\t\t\t\tifTrue: [colorTable _ colorTable forceTo: transparentIndex + 1 paddingWith: Color white].\n\t\t\t\t\tcolorTable at: transparentIndex + 1 put: Color transparent].\n\t\t\tbody colors: colorTable.\n\t\t\tforms add: body.\n\t\t\tdelays add: delay].\n\t^ forms! !\n\n!AnimatedGIFReadWriter methodsFor: 'accessing' stamp: 'mir 11/19/2003 14:16'!\ndelays\n\t^ delays! !\n\n!AnimatedGIFReadWriter methodsFor: 'accessing' stamp: 'mir 11/19/2003 14:16'!\nforms\n\t^ forms! !\n\n!AnimatedGIFReadWriter methodsFor: 'private' stamp: 'mir 11/19/2003 12:25'!\ncomment: aString\n\tcomments add: aString! !\n\n!AnimatedGIFReadWriter methodsFor: 'private-decoding' stamp: 'mir 11/19/2003 12:21'!\nreadBitData\n\t| form |\n\tform := super readBitData.\n\tform offset: offset.\n\t^form! !\n\n!AnimatedGIFReadWriter class methodsFor: 'image reading/writing' stamp: 'mir 11/18/2003 17:00'!\nformsFromFileNamed: fileName \n\t| stream |\n\tstream _ FileStream readOnlyFileNamed: fileName.\n\t^ self formsFromStream: stream! !\n\n!AnimatedGIFReadWriter class methodsFor: 'image reading/writing' stamp: 'mir 11/18/2003 17:00'!\nformsFromStream: stream \n\t| reader |\n\treader _ self new on: stream reset.\n\tCursor read\n\t\tshowWhile: [reader allImages.\n\t\t\treader close].\n\t^reader! !\n\n!AnimatedGIFReadWriter class methodsFor: 'image reading/writing' stamp: 'nk 6/12/2004 13:12'!\ntypicalFileExtensions\n\t\"Answer a collection of file extensions (lowercase) which files that I can read might commonly have\"\n\t^#('gif')! !\n\n!AnimatedGIFReadWriter class methodsFor: 'image reading/writing' stamp: 'asm 12/11/2003 21:29'!\nwantsToHandleGIFs\n\t^true! !\n\n!ArchiveReader methodsFor: 'reading'!\nclose\n\tstream close! !\n\n!ArchiveReader methodsFor: 'reading'!\nnext\n\t| anInteger |\n\tstartPosition _ position.\n\tanInteger _ self read: Integer.\n\t^anInteger = 0\n\t\tifTrue: [objectMap at: (self read: Integer)]\n\t\tifFalse:\n\t\t\t[(classMap at: anInteger)\n\t\t\t\tdearchive: (classVersions at: anInteger)\n\t\t\t\tfrom: self]! !\n\n!ArchiveReader methodsFor: 'reading'!\nread: aClass\n\t\"Ask aClass to read one of its objects from stream. aClass is typically Integer, Float, Symbol, etc.  Assume the object was put on the stream using ArchiveWriter>store:\"\n\n\t| anObject |\n\tanObject _ aClass readFrom: stream.\n\tstream skipSeparators.\n\tposition _ position + 1.\n\t^anObject! !\n\n!ArchiveReader methodsFor: 'testing'!\nisCopier\n\t\"For compatibility with CopyReader (in case an object cares what type of Reader its using).\"\n\n\t^false! !\n\n!ArchiveReader methodsFor: 'private' stamp: 'ssa 10/25/2008 21:29'!\ndearchive: version from: aStream\n\t\"This is used before a class is read in for the first time... version is ignored here.  This method has this name only to avoid another case statement (see #next).  A better name for this method would be #dearchiveClassFrom:\"\n\n\t| aClass anInteger |\n\tclassMap add: (aClass _ Smalltalk at: (aStream read: Symbol)).\n\tclassVersions add: (anInteger _ aStream read: Integer).\n\t^aClass dearchive: anInteger from: aStream! !\n\n!ArchiveReader methodsFor: 'private'!\nsetStream: aStream\n\tstream _ aStream.\n\tobjectMap _ IdentityDictionary new: 400.\n\tclassMap _ OrderedCollection new: 30.\n\tclassMap add: self.\n\tclassVersions _ OrderedCollection with: 0.\n\tposition _ 0! !\n\n!ArchiveReader methodsFor: 'private'!\nstoreObject: anObject\n\tobjectMap at: startPosition put: anObject! !\n\n!ArchiveReader class methodsFor: 'instance creation' stamp: 'ssa 10/26/2008 08:08'!\ndearchive: aString \n\t\"ArchiveReader dearchive: 'archive.test' \"\n\t| aStream anObject |\n\taStream _ self on: (self fastStreamOn: aString).\n\tanObject _ aStream next.\n\taStream close.\n\t^anObject! !\n\n!ArchiveReader class methodsFor: 'instance creation' stamp: 'ssa 10/25/2008 20:52'!\nfastStreamOn: aFilename\n\t\"Answer a stream which is appropriate for getting the data from aFilename as fast as possible.  The default version ignores lineEndConventions.  This is tightly coupled with ArchiveWriter>fastStreamOn:\"\n\n\t^(FileStream oldFileNamed: aFilename) openReadOnly; yourself! !\n\n!ArchiveReader class methodsFor: 'instance creation'!\non: aStream\n\t^self new setStream: aStream! !\n\n!ArchiveWriter methodsFor: 'writing'!\ncanCopy: anObject\n\t\"For archiving, I write out everything\"\n\n\t^true! !\n\n!ArchiveWriter methodsFor: 'writing'!\nclose\n\tstream close! !\n\n!ArchiveWriter methodsFor: 'writing'!\nnextPut: anObject\n\t| anInteger |\n\tanInteger _ objectMap\n\t\tat: anObject\n\t\tifAbsent: [^anObject archiveOn: self].\n\tself\n\t\tstore: 0;\n\t\tstore: anInteger! !\n\n!ArchiveWriter methodsFor: 'writing'!\nstore: anObject\n\t\"Put anObject on the Stream, converting it to an ascii String.  anObject will typically be a Symbol, Number, etc.  This takes advantage of the storeOn:/readFrom: facility already in Smalltalk which works well for Basic Classes.\"\n\t\"kwa -- 12 October 1989, replaced #space with: nextPut: Space (a TextConstant) for efficiency.\"\n\n\tstream store: anObject; nextPut: Space.\n\tposition _ position + 1! !\n\n!ArchiveWriter methodsFor: 'private' stamp: 'ssa 10/26/2008 20:44'!\nsetStream: aWriteStream\n\tstream _ aWriteStream.\n\tclassMap _ IdentityDictionary new: 30.\n\tclassMap at: self put: 1.\n\tobjectMap _ IdentityDictionary new: 400.\n\tposition _ 0! !\n\n!ArchiveWriter methodsFor: 'private'!\nstoreClass: aClass\n\tself store: \n\t\t(classMap at: aClass ifAbsent: \n\t\t\t[self store: 1; store: aClass name; store: aClass archiveVersion.\n\t\t\t^classMap at: aClass put: classMap size + 1])! !\n\n!ArchiveWriter methodsFor: 'private'!\nstoreObject: anObject\n\tobjectMap at: anObject put: \"stream\" position! !\n\n!ArchiveWriter methodsFor: 'testing'!\nisCopier\n\t\"For compatibility with CopyWriter (in case an object cares what type of Writer its using).\"\n\n\t^false! !\n\n!ArchiveWriter class methodsFor: 'instance creation' stamp: 'ssa 10/25/2008 21:17'!\narchive: anObject to: aString \n\t\"ArchiveWriter archive: Array new to: 'archive.test'\"\n\t\"ArchiveWriter archive: 1 to: 'archive.test'\"\n\t\"ArchiveWriter archive: #(1 2 3) to: 'archive.test'\"\n\t\"ArchiveWriter archive: (Array with: #aSymbol with: 'aSymbol') to: 'archive.test'\"\n\n\t| stream |\n\t stream _ self fastStreamOn:  aString.\n\t(self on: stream)\n\t\tnextPut: anObject;\n\t\tclose.! !\n\n!ArchiveWriter class methodsFor: 'instance creation' stamp: 'ssa 10/25/2008 20:34'!\nfastStreamOn: aFilename\n\t\"Answer a stream which is appropriate for getting the data to aFilename as fast as possible.  The default version ignores lineEndConventions.  This is tightly coupled with ArchiveReader>fastStreamOn:\"\n\n\t^FileStream newFileNamed: aFilename! !\n\n!ArchiveWriter class methodsFor: 'instance creation'!\non: aWriteStream\n\t^self new setStream: aWriteStream! !\n\n!Array methodsFor: 'converting' stamp: 'ssa 10/26/2008 15:00'!\nasRunArray\n\t\"Answer a RunArray of me\"\n\n\t^RunArray newFrom: self! !\n\n!Array methodsFor: 'testing' stamp: 'ssa 5/12/2010 19:26'!\nisArray\n\t\"Return true if the receiver is an Array\"\n\t^true! !\n\n!ArrayWithNilDetector methodsFor: 'accessing' stamp: 'ssa 11/24/2009 20:01'!\nat: j put: obj\n\n\tobj ifNil:[self halt:'trying to add nil'].\n\t^super at: j put: obj! !\n\n!ArrayWithNilDetector methodsFor: 'accessing' stamp: 'ssa 11/24/2009 20:39'!\nspecies\n\n\t(self includes: nil) ifTrue:[self halt:'I found a nil!!!!'].\n\t^super species! !\n\n!ArrayWithNilDetector class methodsFor: 'instance creation' stamp: 'ssa 11/24/2009 20:37'!\nnew: someSize\n\n\tsomeSize > 0 ifTrue:[self halt:'trying to create a an array with nil elements'].\n\t^super new: someSize! !\n\n!ArrayedCollection methodsFor: 'sorting' stamp: 'sma 5/12/2000 14:25'!\nmergeSortFrom: startIndex to: stopIndex by: aBlock\n\t\"Sort the given range of indices using the mergesort algorithm.\n\tMergesort is a worst-case O(N log N) sorting algorithm that usually\n\tdoes only half as many comparisons as heapsort or quicksort.\"\n\n\t\"Details: recursively split the range to be sorted into two halves,\n\tmergesort each half, then merge the two halves together. An extra \n\tcopy of the data is used as temporary storage and successive merge \n\tphases copy data back and forth between the receiver and this copy.\n\tThe recursion is set up so that the final merge is performed into the\n\treceiver, resulting in the receiver being completely sorted.\"\n\n\tself size <= 1 ifTrue: [^ self].  \"nothing to do\"\n\tstartIndex = stopIndex ifTrue: [^ self].\n\tself assert: [startIndex >= 1 and: [startIndex < stopIndex]]. \"bad start index\"\n\tself assert: [stopIndex <= self size]. \"bad stop index\"\n\tself\n\t\tmergeSortFrom: startIndex\n\t\tto: stopIndex \n\t\tsrc: self clone \n\t\tdst: self \n\t\tby: aBlock! !\n\n!ArrayedCollection methodsFor: '*Sly' stamp: 'dmu 9/17/2010 11:04'!\nparallelCollect: aBlock\n\t\"#(1 2 3 4 5) parallelCollect:[:e| e * 2]\"\n\t| results task  barrier interlock result |\n\t\"true ifTrue: [^ self collect: aBlock.].\" \"for debugging\"\n\tself ifEmpty: [^ self].\n\t(Sly3 serializeForDebugging or: [self size = 1]) ifTrue: [^ self collect: aBlock].\n\tresults _ self species new: self size.\n\n\tbarrier _ RVMBarrier new signalsNeededToPass: self size.\n\tinterlock _ Semaphore forMutualExclusion.\n\t1 to: self size do: [:i|\n\t\ttask _ [\n\t\t\tresult _ [aBlock copy fixTemps value:  (self at: i)] ifCurtailed: [barrier signal].\n\t\t\tinterlock critical: [results at: i put: result].\n\t\t\tbarrier signal\n\t\t]  asSlyMemberProcess.\n\t\ttask resume\n\t].\n\tbarrier wait.\n\t^results! !\n\n!Association methodsFor: 'outlining' stamp: 'ssa 9/10/2009 16:01'!\noutlineString\n\n\t^self key asString,'  ',self value printString! !\n\n!BGBinaryTrees methodsFor: 'benchmarking' stamp: 'StefanMarr 5/15/2011 12:25'!\nbinarytrees: n to: output\n   | minDepth maxDepth stretchDepth check longLivedTree iterations |\n   minDepth := 4.\n   maxDepth := minDepth + 2 max: n.\n   stretchDepth := maxDepth + 1.\n\n   check := (BGTreeNode bottomUpTree: 0 depth: stretchDepth) itemCheck.\n   output\n      nextPutAll: 'stretch tree of depth '; print: stretchDepth; tab;\n      nextPutAll: ' check: '; print: check; cr.\n\n   longLivedTree := BGTreeNode bottomUpTree: 0 depth: maxDepth.\n   minDepth to: maxDepth by: 2 do: [:depth|\n      iterations := 1 bitShift: maxDepth - depth + minDepth.\n\n      check := 0.\n      1 to: iterations do: [:i|\n         check := check + (BGTreeNode bottomUpTree: i depth: depth) itemCheck.\n         check := check + (BGTreeNode bottomUpTree: -1*i depth: depth) itemCheck\n         ].\n      output\n         print:  (2*iterations); tab;\n         nextPutAll: ' trees of depth '; print: depth; tab;\n         nextPutAll: ' check: '; print: check; cr\n      ].\n\n\tcheck := longLivedTree itemCheck.\n\n   output\n      nextPutAll: 'long lived tree of depth '; print: maxDepth; tab;\n      nextPutAll: ' check: '; print: check; cr.\n\t\n\t^ check.! !\n\n!BGBinaryTrees commentStamp: 'StefanMarr 1/16/2011 17:29' prior: 0!\nThis is an adaptation of a benchmark for testing GC. A whole tree is allocated before any nodes are GC'd.\nThe binary-trees benchmark is a simplistic adaptation of Hans Boehm's GCBench, which in turn was adapted from a benchmark by John Ellis and Pete Kovac.!\n!BGBinaryTrees class methodsFor: 'defaults' stamp: 'StefanMarr 5/15/2011 23:25'!\ndefaultProblemSize\n\t^ 9! !\n\n!BGBody methodsFor: 'nbody'!\naddMomentumTo: anArray\n   anArray at: 1 put: (anArray at: 1) + (vx * mass).\n   anArray at: 2 put: (anArray at: 2) + (vy * mass).\n   anArray at: 3 put: (anArray at: 3) + (vz * mass).\n   ^anArray! !\n\n!BGBody methodsFor: 'nbody'!\nand: aBody velocityAfter: dt        \n   | dx dy dz distance mag |\n   dx := x - aBody x.\n   dy := y - aBody y.\n   dz := z - aBody z.\n   \n   distance := ((dx*dx) + (dy*dy) + (dz*dz)) sqrt.\n   mag := dt / (distance * distance * distance).\n\n   self decreaseVelocity: dx y: dy z: dz m: aBody mass * mag.   \n   aBody increaseVelocity: dx y: dy z: dz m: mass * mag! !\n\n!BGBody methodsFor: 'nbody'!\ndecreaseVelocity: dx y: dy z: dz m: m\n   vx := vx - (dx * m).\n   vy := vy - (dy * m).\n   vz := vz - (dz * m)! !\n\n!BGBody methodsFor: 'nbody'!\nincreaseVelocity: dx y: dy z: dz m: m\n   vx := vx + (dx * m).\n   vy := vy + (dy * m).\n   vz := vz + (dz * m)! !\n\n!BGBody methodsFor: 'nbody'!\nkineticEnergy\n   ^0.5d0 * mass * ((vx * vx) + (vy * vy) + (vz * vz))! !\n\n!BGBody methodsFor: 'nbody'!\noffsetMomentum: anArray \n   | m |\n   m := self class solarMass.\n   vx := (anArray at: 1) negated / m.\n   vy := (anArray at: 2) negated / m.\n   vz := (anArray at: 3) negated / m! !\n\n!BGBody methodsFor: 'nbody'!\npositionAfter: dt\n   x := x + (dt * vx).\n   y := y + (dt * vy).\n   z := z + (dt * vz)! !\n\n!BGBody methodsFor: 'nbody'!\npotentialEnergy: aBody\n   | dx dy dz distance |\n   dx := x - aBody x.\n   dy := y - aBody y.\n   dz := z - aBody z.\n\n   distance := ((dx*dx) + (dy*dy) + (dz*dz)) sqrt.\n   ^mass * aBody mass / distance! !\n\n!BGBody methodsFor: 'accessing'!\nmass\n   ^mass! !\n\n!BGBody methodsFor: 'accessing'!\nx\n   ^x! !\n\n!BGBody methodsFor: 'accessing'!\nx: d1 y: d2 z: d3 vx: d4 vy: d5 vz: d6 mass: d7\n   x := d1.\n   y := d2. \n   z := d3. \n   vx := d4.\n   vy := d5.\n   vz := d6.\n   mass := d7! !\n\n!BGBody methodsFor: 'accessing'!\ny\n   ^y! !\n\n!BGBody methodsFor: 'accessing'!\nz\n   ^z! !\n\n!BGBody class methodsFor: 'constants'!\ndaysPerYear\n   ^365.24d0! !\n\n!BGBody class methodsFor: 'constants'!\njupiter\n   ^self new\n      x: 4.84143144246472090d0\n      y: -1.16032004402742839d0\n      z: -1.03622044471123109d-1\n      vx: 1.66007664274403694d-3 * self daysPerYear\n      vy: 7.69901118419740425d-3 * self daysPerYear\n      vz: -6.90460016972063023d-5 * self daysPerYear\n      mass: 9.54791938424326609d-4 * self solarMass! !\n\n!BGBody class methodsFor: 'constants'!\nneptune\n   ^self new\n      x: 1.53796971148509165d1\n      y: -2.59193146099879641d1\n      z: 1.79258772950371181d-1\n      vx: 2.68067772490389322d-3 * self daysPerYear\n      vy: 1.62824170038242295d-3 * self daysPerYear\n      vz: -9.51592254519715870d-5 * self daysPerYear\n      mass: 5.15138902046611451d-5 * self solarMass! !\n\n!BGBody class methodsFor: 'constants'!\npi\n   ^3.141592653589793d0! !\n\n!BGBody class methodsFor: 'constants'!\nsaturn\n   ^self new\n      x: 8.34336671824457987d0\n      y: 4.12479856412430479d0\n      z: -4.03523417114321381d-1\n      vx: -2.76742510726862411d-3 * self daysPerYear\n      vy: 4.99852801234917238d-3 * self daysPerYear\n      vz: 2.30417297573763929d-5 * self daysPerYear\n      mass: 2.85885980666130812d-4 * self solarMass! !\n\n!BGBody class methodsFor: 'constants'!\nsolarMass\n   ^4.0d0 * self pi * self pi! !\n\n!BGBody class methodsFor: 'constants'!\nsun\n   ^self new\n      x: 0.0d0\n      y: 0.0d0\n      z: 0.0d0\n      vx: 0.0d0\n      vy: 0.0d0\n      vz: 0.0d0\n      mass: self solarMass! !\n\n!BGBody class methodsFor: 'constants'!\nuranus\n   ^self new\n      x: 1.28943695621391310d1\n      y: -1.51111514016986312d1\n      z: -2.23307578892655734d-1\n      vx: 2.96460137564761618d-3 * self daysPerYear\n      vy: 2.37847173959480950d-3 * self daysPerYear\n      vz: -2.96589568540237556d-5 * self daysPerYear\n      mass: 4.36624404335156298d-5 * self solarMass! !\n\n!BGChameleon methodsFor: 'accessing'!\ncolor\n    ^color! !\n\n!BGChameleon methodsFor: 'accessing'!\nmeetings\n    ^meetings! !\n\n!BGChameleon methodsFor: 'accessing'!\nwait\n    semaphore wait! !\n\n!BGChameleon methodsFor: 'changing colours'!\ncolor: c\n    color := c! !\n\n!BGChameleon methodsFor: 'changing colours'!\nfade\n    color := #faded.\n    waitingForPair signal.\n    semaphore signal! !\n\n!BGChameleon methodsFor: 'changing colours'!\nmet: other\n    | newColor |\n    meetings := meetings + 1.\n    color == #red ifTrue: [\n    newColor := other == #yellow ifTrue: [ #blue ] ifFalse: [ #yellow ] ].\n    color == #yellow ifTrue: [\n    newColor := other == #red ifTrue: [ #blue ] ifFalse: [ #red ] ].\n    color == #blue ifTrue: [\n    newColor := other == #red ifTrue: [ #yellow ] ifFalse: [ #red ] ].\n    color := newColor.\n    waitingForPair signal! !\n\n!BGChameleon methodsFor: 'running'!\nfork: meetingPlace\n    ^[ self run: meetingPlace ] fork! !\n\n!BGChameleon methodsFor: 'running'!\nrun: meetingPlace\n    [ color == #faded ] whileFalse: [\n        meetingPlace reachedBy: self.\n        waitingForPair wait ]! !\n\n!BGChameleon methodsFor: 'initialize-release'!\ninitialize\n    meetings := 0.\n    waitingForPair := Semaphore new.\n    semaphore := Semaphore new! !\n\n!BGChameleon class methodsFor: 'instance creation'!\ncolor: c\n    ^self new\n        initialize;\n        color: c! !\n\n!BGChameleons class methodsFor: 'benchmark scripts' stamp: 'StefanMarr 1/16/2011 12:12'!\nchameneos\n\t\" reports back the number of meetings \"\n\t| out |\n\t^ self chameneos: 1000000! !\n\n!BGChameleons class methodsFor: 'benchmarking' stamp: 'StefanMarr 5/15/2011 12:17'!\nchameneos: n\n    | c1 c2 c3 c4 mp |\n    c1 := BGChameleon color: #blue.\n    c2 := BGChameleon color: #red.\n    c3 := BGChameleon color: #yellow.\n    c4 := BGChameleon color: #blue.\n    mp := BGMeetingPlace forMeetings: n.\n    c1 fork: mp.\n    c2 fork: mp.\n    c3 fork: mp.\n    c4 fork: mp.\n    c1 wait.\n    c2 wait.\n    c3 wait.\n    c4 wait.\n    ^c1 meetings + c2 meetings + c3 meetings + c4 meetings! !\n\n!BGChameleons class methodsFor: 'defaults' stamp: 'StefanMarr 5/15/2011 23:31'!\ndefaultProblemSize\n\t^ 10000! !\n\n!BGChameneosColour methodsFor: 'accessing'!\ncolor\n   ^color! !\n\n!BGChameneosColour methodsFor: 'accessing'!\ncolor: aColor \n   color := aColor! !\n\n!BGChameneosColour methodsFor: 'as yet unclassified'!\ncomplementaryColourFor: aChameneosColour \n   \"determine the complementary colour defined as...\"\n\n   self == aChameneosColour ifTrue: [^self].\n   self isBlue \n      ifTrue: \n         [aChameneosColour isRed \n            ifTrue: [^self class yellow]\n            ifFalse: [^self class red]].\n   self isRed \n      ifTrue: \n         [aChameneosColour isBlue \n            ifTrue: [^self class yellow]\n            ifFalse: [^self class blue]].\n   aChameneosColour isBlue \n      ifTrue: [^self class red]\n      ifFalse: [^self class blue]! !\n\n!BGChameneosColour methodsFor: 'testing'!\nhasSameColorAs: aChameneos \n   ^self color == aChameneos color! !\n\n!BGChameneosColour methodsFor: 'testing'!\nisBlue\n   ^self == self class blue! !\n\n!BGChameneosColour methodsFor: 'testing'!\nisRed\n   ^self == self class red! !\n\n!BGChameneosColour methodsFor: 'testing'!\nisYellow\n   ^self == self class yellow! !\n\n!BGChameneosColour methodsFor: 'printing'!\nprintOn: aStream \n   aStream nextPutAll: self color! !\n\n!BGChameneosColour class methodsFor: 'accessing'!\nblue\n   ^Blue! !\n\n!BGChameneosColour class methodsFor: 'accessing'!\nblue: anObject\n   Blue := anObject! !\n\n!BGChameneosColour class methodsFor: 'accessing'!\nred\n   ^Red! !\n\n!BGChameneosColour class methodsFor: 'accessing'!\nred: anObject\n   Red := anObject! !\n\n!BGChameneosColour class methodsFor: 'accessing'!\nyellow\n   ^Yellow! !\n\n!BGChameneosColour class methodsFor: 'accessing'!\nyellow: anObject\n   Yellow := anObject! !\n\n!BGChameneosColour class methodsFor: 'initialize-release'!\ncreateBlue\n   \"comment stating purpose of message\"\n\n   ^super new color: #blue! !\n\n!BGChameneosColour class methodsFor: 'initialize-release'!\ncreateRed\n   \"comment stating purpose of message\"\n\n   ^super new color: #red! !\n\n!BGChameneosColour class methodsFor: 'initialize-release'!\ncreateYellow\n   \"comment stating purpose of message\"\n\n   ^super new color: #yellow! !\n\n!BGChameneosColour class methodsFor: 'initialize-release'!\ninitialize\n   \"self initialize\"\n\n   Red := self createRed.\n   Blue := self createBlue.\n   Yellow := self createYellow! !\n\n!BGChameneosColour class methodsFor: 'printing' stamp: 'StefanMarr 1/16/2011 14:13'!\ngenerateReportOfColoursOn: readOut \n   | colours |\n   colours := Array \n            with: Blue\n            with: Red\n            with: Yellow.\n   colours do: \n         [:aColour | \n         colours do: \n               [:anotherColour | \n               aColour printOn: readOut.\n               readOut nextPutAll: ' + '.\n               anotherColour printOn: readOut.\n               readOut nextPutAll: ' -> '.\n               (aColour complementaryColourFor: anotherColour) printOn: readOut.\n               readOut cr]].\n   ^readOut! !\n\n!BGChameneosRedux class methodsFor: 'as yet unclassified' stamp: 'StefanMarr 5/15/2011 23:34'!\ndefaultProblemSize\n\t^ 6000! !\n\n!BGChameneosRedux class methodsFor: 'benchmarking-scripts' stamp: 'StefanMarr 5/15/2011 12:27'!\nchameneosredux2\n\t\"ChameneosRedux chameneosredux2\" \n\t| report |\n\treport := TextStream with: String new.\n\tBGMall runBenchMark: 600 on: report.\n\t^report contents! !\n\n!BGCreature methodsFor: 'accessing'!\ncolour\n   ^colour! !\n\n!BGCreature methodsFor: 'accessing'!\ncolour: anObject \n   colour := anObject! !\n\n!BGCreature methodsFor: 'accessing'!\ncreaturesMet\n   ^creaturesMet! !\n\n!BGCreature methodsFor: 'accessing'!\ncreaturesMet: anObject \n   creaturesMet := anObject! !\n\n!BGCreature methodsFor: 'accessing'!\nname\n   ^creatureName! !\n\n!BGCreature methodsFor: 'accessing'!\nname: anObject \n   creatureName := anObject! !\n\n!BGCreature methodsFor: 'accessing'!\nselfMet\n   ^selfMet! !\n\n!BGCreature methodsFor: 'accessing'!\nselfMet: anObject \n   ^selfMet := anObject! !\n\n!BGCreature methodsFor: 'initialize-release'!\ninitialize\n   selfMet := 0.\n   creaturesMet := 0! !\n\n!BGCreature methodsFor: 'controlling'!\nvisitMall: mall \n   \n   [| partner |\n   partner := mall visitWith: self.\n   partner ifNotNil: \n         [colour := colour complementaryColourFor: partner colour.\n         self == partner ifTrue: [selfMet := selfMet + 1].\n         creaturesMet := creaturesMet + 1].\n   partner isNil] \n         whileFalse! !\n\n!BGCreature class methodsFor: 'initialize-release' stamp: 'StefanMarr 5/15/2011 12:28'!\nwithName: aName colour: aColour \n   ^(BGCreature new initialize)\n      name: aName;\n      colour: aColour! !\n\n!BGFannkuchRedux class methodsFor: 'defaults' stamp: 'StefanMarr 5/15/2011 23:35'!\ndefaultProblemSize\n\t^ 4! !\n\n!BGFannkuchRedux class methodsFor: 'benchmarking' stamp: 'StefanMarr 5/15/2011 12:19'!\nfannkuchRedux: n to: output\n   ^(BGPermGeneratorRedux new: n) maxPfannkuchenTo: output! !\n\n!BGFannkuchRedux class methodsFor: 'benchmark scripts' stamp: 'StefanMarr 5/16/2011 14:45'!\nfannkuchredux\n   | n f |\n   n := 4.\n   f := self fannkuchRedux: n to: (TextStream with: String new).\n   ScriptConsole println: 'Pfannkuchen(', n printString, ') = ', f asString.\n   ^''! !\n\n!BGFasta class methodsFor: 'benchmark scripts' stamp: 'StefanMarr 5/15/2011 23:20'!\ndefaultProblemSize\n\t^ 1000! !\n\n!BGFasta class methodsFor: 'benchmark scripts' stamp: 'StefanMarr 1/16/2011 18:56'!\nfasta\n\t\" self fasta\"\n  | out |\n  out := TextStream with: String new.\n  self fasta: 1000 to: out.\n  ^out contents! !\n\n!BGFasta class methodsFor: 'benchmarking' stamp: 'StefanMarr 5/15/2011 12:24'!\nfasta: n to: out\n   | r lineLength |\n   lineLength := 60.\n   self\n      writeFasta: 'ONE Homo sapiens alu'\n      from:\n         ( BGRepeatStream\n            to: n*2\n            on:'GGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGG',\n               'GAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGA',\n               'CCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAAT',\n               'ACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCA',\n               'GCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGG',\n               'AGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCC',\n               'AGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAA' )\n      to: out\n      lineLength: lineLength.\n\n   r := BGRandomNumber to: 1. \"Shared random sequence\"\n\n   self\n      writeFasta: 'TWO IUB ambiguity codes'\n      from:\n         (( BGRandomStream\n            to: n*3\n            on: #(   #($a 0.27d0)\n                  #($c 0.12d0)\n                  #($g 0.12d0)\n                  #($t 0.27d0)\n\n                  #($B 0.02d0)\n                  #($D 0.02d0)\n                  #($H 0.02d0)\n                  #($K 0.02d0)\n                  #($M 0.02d0)\n                  #($N 0.02d0)\n                  #($R 0.02d0)\n                  #($S 0.02d0)\n                  #($V 0.02d0)\n                  #($W 0.02d0)\n                  #($Y 0.02d0)))\n         random: r;\n         yourself)\n      to: out\n      lineLength: lineLength.\n\n   self\n      writeFasta: 'THREE Homo sapiens frequency'\n      from:\n         (( BGRandomStream\n            to: n*5\n            on: #(   #($a 0.3029549426680d0)\n                  #($c 0.1979883004921d0)\n                  #($g 0.1975473066391d0)\n                  #($t 0.3015094502008d0)))\n            random: r;\n            yourself)\n      to: out\n      lineLength: lineLength.\n\n   out flush. ! !\n\n!BGFasta class methodsFor: 'benchmarking' stamp: 'StefanMarr 6/14/2010 17:10'!\nwriteFasta: aString from: inStream to: outStream lineLength: lineLength\n   | i |\n   outStream nextPut: $>; nextPutAll: aString; cr.\n   i := 0.\n   [inStream atEnd] whileFalse:\n      [i == lineLength ifTrue: [outStream cr. i := 0].\n      outStream nextPut: inStream next.\n      i := i + 1].\n   outStream cr! !\n\n!BGMall methodsFor: 'controlling'!\nclose\n   open := false! !\n\n!BGMall methodsFor: 'controlling'!\nvisitWith: aChameneos \n   | pair partner |\n   pair := self obtainPair.\n   pair me: aChameneos.\n   queue nextPut: pair.\n   pair wait.\n   partner := pair partner.\n   self releasePair: pair.\n   ^partner! !\n\n!BGMall methodsFor: 'initialize-release' stamp: 'StefanMarr 5/15/2011 12:27'!\ninitialize\n   guard := Semaphore forMutualExclusion.\n   queue := SharedQueue new.\n   cache := OrderedCollection new.\n   1 to: 10 do: [:x | cache add: BGPair new]! !\n\n!BGMall methodsFor: 'initialize-release'!\nrun\n   open := true.\n   process ifNil: \n         [process := [self processVisitors] newProcess.\n         process priority: Processor userBackgroundPriority -1 ].\n   process resume! !\n\n!BGMall methodsFor: 'accessing'!\nmaxRendezvous: max \n   maxRendezvous := max! !\n\n!BGMall methodsFor: 'private'!\nobtainPair\n   ^cache removeFirst! !\n\n!BGMall methodsFor: 'private'!\nprocessVisitors\n   [open] whileTrue: \n         [1 to: maxRendezvous\n            do: \n               [:x | \n               | first second |\n               first := queue next.\n               second := queue next.\n               self setPartnersOn: first and: second.\n               first signal.\n               second signal].\n         [queue isEmpty] whileFalse: [queue next signal]].\n   process terminate.\n   process := nil! !\n\n!BGMall methodsFor: 'private'!\nreleasePair: pair \n   pair release.\n   cache addFirst: pair! !\n\n!BGMall methodsFor: 'private'!\nsetPartnersOn: first and: second\n   first partner: second me.\n   second partner: first me.\n! !\n\n!BGMall methodsFor: 'private'!\nshutdown\n   [queue isEmpty] whileFalse: [queue next signal].\n   process terminate.\n   process := nil! !\n\n!BGMall class methodsFor: 'initialize-release'!\ncreateAllowing: maxRendezvous \n   \"Private\"\n\n   ^self basicNew initialize maxRendezvous: maxRendezvous! !\n\n!BGMall class methodsFor: 'initialize-release' stamp: 'StefanMarr 5/15/2011 12:29'!\ncreateCreaturesWith: aCollectionOfColours \n   \"Private\"\n\n   | aName |\n   aName := 0.\n   ^aCollectionOfColours collect: \n         [:aColour | \n         aName := aName + 1.\n         BGCreature withName: aName colour: aColour]! !\n\n!BGMall class methodsFor: 'initialize-release'!\ninitialize\n   \"self initialize\"\n\n   Units := #('zero' 'one' 'two' 'three' 'four' 'five' 'six' 'seven' 'eight' 'nine')! !\n\n!BGMall class methodsFor: 'initialize-release'!\nnew\n   ^self shouldNotImplement! !\n\n!BGMall class methodsFor: 'initialize-release'!\nopenMallWith: aCollectionOfColours forNumberOfMeets: aNumber \n   | mall creatures guard |\n   mall := self createAllowing: aNumber.\n   mall run.\n   creatures := self createCreaturesWith: aCollectionOfColours.\n   guard := Semaphore new.\n   self \n      openMall: mall\n      forCreatures: creatures\n      usingGuard: guard.\n   self \n      waitForClosingOfMall: mall\n      withCreatures: creatures\n      usingGuard: guard.\n   ^creatures! !\n\n!BGMall class methodsFor: 'printing' stamp: 'StefanMarr 1/16/2011 14:42'!\ngenerateReportFor: creatures printOn: stream \n   | sum |\n   sum := creatures inject: 0 into: [:accum :each | accum + each creaturesMet].\n   creatures do: \n         [:aCreature | \n         aCreature creaturesMet printOn: stream.\n         stream\n            space;\n            nextPutAll: (self units at: aCreature selfMet + 1);\n            cr].\n   stream space.\n   sum printString \n      do: [:el | stream nextPutAll: (self units at: el digitValue + 1)]\n      separatedBy: [stream space].\n\tlastSum := sum.\n   ^stream! !\n\n!BGMall class methodsFor: 'printing'!\ngenerateReportForColours: colours printOn: stream \n   stream space.\n   colours do: [:colour | colour printOn: stream] separatedBy: [stream space].\n   ^stream! !\n\n!BGMall class methodsFor: 'private'!\nopenMall: aMall forCreatures: creatures usingGuard: sema \n   | processes |\n   processes := creatures \n            collect: [:aCreature | \n               [aCreature visitMall: aMall.\n               sema signal] newProcess].\n   processes do: \n         [:proc | \n         proc priority: Processor userBackgroundPriority.\n         proc resume]! !\n\n!BGMall class methodsFor: 'private'!\nwaitForClosingOfMall: aMall withCreatures: creatures usingGuard: guard \n   creatures size timesRepeat: [guard wait].\n   aMall close! !\n\n!BGMall class methodsFor: 'public' stamp: 'StefanMarr 5/15/2011 12:28'!\nrunBenchMark: number on: anOutputStream \n   \"self runBenchMark: 60000 on: Transcript.\"\n\n   | firstTestColours secondTestColours blue red yellow creatures |\n   blue := BGChameneosColour blue.\n   red := BGChameneosColour red.\n   yellow := BGChameneosColour yellow.\n   firstTestColours := Array \n            with: blue\n            with: red\n            with: yellow.\n   secondTestColours := (OrderedCollection new)\n            add: blue;\n            add: red;\n            add: yellow;\n            add: red;\n            add: yellow;\n            add: blue;\n            add: red;\n            add: yellow;\n            add: red;\n            add: blue;\n            yourself.\n   (BGChameneosColour generateReportOfColoursOn: anOutputStream) cr.\n   (self generateReportForColours: firstTestColours printOn: anOutputStream) \n      cr.\n   creatures := BGMall openMallWith: firstTestColours forNumberOfMeets: number.\n   (self generateReportFor: creatures printOn: anOutputStream)\n      cr;\n      cr.\n   (self generateReportForColours: secondTestColours printOn: anOutputStream) \n      cr.\n   creatures := BGMall openMallWith: secondTestColours forNumberOfMeets: number.\n   (self generateReportFor: creatures printOn: anOutputStream)\n      cr;\n      cr.\n\t^ lastSum! !\n\n!BGMall class methodsFor: 'accessing'!\nunits\n   ^Units! !\n\n!BGMeetingPlace methodsFor: 'initialize-release'!\ninitialize\n    mutex := Semaphore forMutualExclusion.\n    total := 0! !\n\n!BGMeetingPlace methodsFor: 'running'!\nmax: maxMeetings\n    max := maxMeetings! !\n\n!BGMeetingPlace methodsFor: 'running'!\norganizeMeetingWith: second\n    total >= max\n        ifTrue: [\n            first fade.\n            second fade ]\n        ifFalse: [\n            first met: second color.\n            second met: first color ].\n    total := total + 1! !\n\n!BGMeetingPlace methodsFor: 'running'!\nreachedBy: chameleon\n    mutex critical: [\n        first isNil\n            ifTrue: [ first := chameleon ]\n            ifFalse: [ self organizeMeetingWith: chameleon. first := nil ] ]! !\n\n!BGMeetingPlace class methodsFor: 'instance creation'!\nforMeetings: maxMeetings\n    ^super new\n        initialize;\n        max: maxMeetings;\n        yourself! !\n\n!BGNBody class methodsFor: 'defaults' stamp: 'StefanMarr 5/15/2011 23:36'!\ndefaultProblemSize\n\t^ 1000! !\n\n!BGNBody class methodsFor: 'benchmark scripts' stamp: 'sm 6/1/2011 14:09'!\nnbody: times\n\t\"self nbody: 1000\"\n   | bodies |\n\tself flag: 'Move the output that is currently in un-executed blocks into some reporter functionality'.\n\n   bodies := BGNBodySystem new initialize.\n   [ ScriptConsole print: bodies energy. ].\n   times timesRepeat: [bodies after: 0.01d0].\n   [ ScriptConsole print: bodies energy. ]. \n   ^ bodies energy! !\n\n!BGNBodySystem methodsFor: 'nbody'!\nafter: dt\n   1 to: bodies size do: [:i|\n      i+1 to: bodies size do: [:j|                            \n         (bodies at: i) and: (bodies at: j) velocityAfter: dt].\n   ].   \n   bodies do: [:each| each positionAfter: dt]! !\n\n!BGNBodySystem methodsFor: 'nbody'!\nenergy\n   | e |\n   e := 0.0d0.\n   1 to: bodies size do: [:i|       \n      e := e + (bodies at: i) kineticEnergy.\n\n      i+1 to: bodies size do: [:j| \n         e := e - ((bodies at: i) potentialEnergy: (bodies at: j))].\n   ].\n   ^e! !\n\n!BGNBodySystem methodsFor: 'initialize-release' stamp: 'StefanMarr 5/15/2011 12:13'!\ninitialize\n   bodies := OrderedCollection new\n      add: BGBody sun; add: BGBody jupiter; add: BGBody saturn;\n      add: BGBody uranus; add: BGBody neptune; yourself.\n\n   bodies first offsetMomentum:\n      (bodies inject: (Array with: 0.0d0 with: 0.0d0 with: 0.0d0)\n         into: [:m :each | each addMomentumTo: m])! !\n\n!BGPair methodsFor: 'initialize-release'!\ninitialize\n   \"Initialize a newly created instance. This method must answer the receiver.\"\n\n   partner := nil.\n   me := nil.\n   sema := Semaphore new.\n   ^self! !\n\n!BGPair methodsFor: 'initialize-release'!\nrelease\npartner:=nil.! !\n\n!BGPair methodsFor: 'initialize-release'!\nsignal\n   sema signal! !\n\n!BGPair methodsFor: 'initialize-release'!\nwait\n   sema wait! !\n\n!BGPair methodsFor: 'accessing'!\nme\n   ^me! !\n\n!BGPair methodsFor: 'accessing'!\nme: anObject\n   me := anObject! !\n\n!BGPair methodsFor: 'accessing'!\npartner\n   ^partner! !\n\n!BGPair methodsFor: 'accessing'!\npartner: anObject\n   partner := anObject! !\n\n!BGPair class methodsFor: 'instance creation'!\nnew\n   \"Answer a newly created and initialized instance.\"\n   ^super new initialize.! !\n\n!BGPair class methodsFor: 'instance creation'!\nwith: me \n   \"Answer a newly created and initialized instance.\"\nself halt.\n   ^super new initialize me: me! !\n\n!BGPermGeneratorRedux methodsFor: 'accessing'!\natEnd\n   ^atEnd! !\n\n!BGPermGeneratorRedux methodsFor: 'accessing'!\nnext\n   | result |\n   result := perm copy.\n   self makeNext.\n   ^result! !\n\n!BGPermGeneratorRedux methodsFor: 'initialize-release' stamp: 'StefanMarr 1/16/2011 22:01'!\ninitialize: size\n   perm := (1 to: size) asArray.\n   timesRotated := Array new: size withAll: 0.\n   atEnd := false.! !\n\n!BGPermGeneratorRedux methodsFor: 'initialize-release'!\nmakeNext\n   | temp remainder |\n   \"* Generate the next permutation. *\"\n   2 to: perm size do: [ :r |\n      \"* Rotate the first r items to the left. *\"\n      temp := perm at: 1.\n      1 to: r - 1 do: [ :i | perm at: i put: (perm at: i + 1) ].\n      perm at: r put: temp.\n\n      remainder := timesRotated at: r put: ((timesRotated at: r) + 1) \\\\ r.\n      remainder = 0 ifFalse: [ ^self ].\n\n      \"* After r rotations, the first r items are in their original positions.\n      Go on rotating the first r+1 items. *\"\n   ].\n\n   \"* We are past the final permutation. *\"\n   atEnd := true! !\n\n!BGPermGeneratorRedux methodsFor: 'benchmarks' stamp: 'StefanMarr 6/15/2010 13:31'!\nmaxPfannkuchenTo: output\n   | max permutation checksum permCount flipsCount |\n   max := 0.\n   permCount := 0.\n   checksum := 0.\n   [self atEnd] whileFalse:\n      [permutation := self next.\n      permCount := permCount + 1.\n      (permCount = 1048576) ifTrue: [permCount := 0].\n      flipsCount := self pfannkuchen: permutation.\n      checksum := permCount odd ifTrue: [checksum+flipsCount] ifFalse: [checksum-flipsCount].\n      max := max max: flipsCount].\n   output print: checksum; cr.\n   ^max! !\n\n!BGPermGeneratorRedux methodsFor: 'benchmarks' stamp: 'StefanMarr 6/15/2010 13:30'!\npfannkuchen: anArray\n   | first complement a b k |\n   k := 0.\n   [ (first := anArray at: 1) == 1 ] whileFalse: [\n      k := k + 1.\n      complement := first + 1.\n      1 to: first // 2 do: [ :i |\n         a := anArray at: i.\n         b := anArray at: complement - i.\n         anArray at: i put: b.\n         anArray at: complement - i put: a.\n      ]\n   ].\n   ^k! !\n\n!BGPermGeneratorRedux class methodsFor: 'instance creation'!\nnew: size\n   ^self new\n      initialize: size;\n      yourself! !\n\n!BGRandomNumber methodsFor: 'accessing'!\nnext\n   seed := (seed * Multiplier + Increment) \\\\ Modulus.\n   ^(seed * scale) / FModulus! !\n\n!BGRandomNumber methodsFor: 'private'!\nto: anInteger\n   seed := 42.\n   scale := anInteger! !\n\n!BGRandomNumber class methodsFor: 'class initialization'!\ninitialize\n   FModulus := 139968.0d0.\n   Increment := 29573.\n   Modulus := 139968.\n   Multiplier := 3877.! !\n\n!BGRandomNumber class methodsFor: 'initialize-release'!\nto: anInteger\n   ^self basicNew to: anInteger! !\n\n!BGRandomStream methodsFor: 'accessing'!\nnext\n   | r |\n   r := random next.\n   repeatPtr := repeatPtr + 1.\n   1 to: percentages size do: [:i|\n      (r < (percentages at: i)) ifTrue: [^collection at: i]]! !\n\n!BGRandomStream methodsFor: 'accessing'!\nrandom: aRandomNumber\n\"* Share the random number generator so we can get the expected results. *\"\n   random := aRandomNumber! !\n\n!BGRandomStream methodsFor: 'initialize-release' stamp: 'StefanMarr 5/15/2011 12:19'!\non: aCollection\n   | size cp |\n   repeatPtr := 0.\n   random := BGRandomNumber to: 1.0d0.\n   size := aCollection size.\n   percentages := Array new: size.\n   collection := Array new: size.\n   cp := 0.0d0.\n   1 to: size do: [:i|\n      collection at: i put: (aCollection at: i) first.\n      percentages at: i put: (cp := cp + (aCollection at: i) last).\n   ]! !\n\n!BGRepeatStream methodsFor: 'testing'!\natEnd\n   ^repeatPtr >= repeatLimit! !\n\n!BGRepeatStream methodsFor: 'accessing'!\nnext\n   position >= readLimit ifTrue: [ self position: 0 ].\n   repeatPtr := repeatPtr + 1.\n   ^collection at: (position := position + 1)! !\n\n!BGRepeatStream methodsFor: 'initialize-release'!\nto: anInteger\n   repeatPtr := 0.\n   repeatLimit := anInteger! !\n\n!BGRepeatStream class methodsFor: 'instance creation'!\nto: anInteger on: aCollection\n   ^(super on: aCollection) to: anInteger! !\n\n!BGTests methodsFor: 'as yet unclassified' stamp: 'StefanMarr 5/15/2011 14:06'!\ntestBinaryTrees\n\t| bench output expected |\n\tbench := BGBinaryTrees new.\n\toutput := (TextStream with: String new).\n\n\tself assert: -1 equals: (bench binarytrees: 10 to: output).\n\t\n\texpected := 'stretch tree of depth 11\t check: -1\n2048\t trees of depth 4\t check: -2048\n512\t trees of depth 6\t check: -512\n128\t trees of depth 8\t check: -128\n32\t trees of depth 10\t check: -32\nlong lived tree of depth 10\t check: -1\n'.\n\tself assert: expected equals: output contents.! !\n\n!BGTests methodsFor: 'as yet unclassified' stamp: 'StefanMarr 5/15/2011 14:08'!\ntestBinaryTreesResult\n\t| bench output |\n\tbench := BGBinaryTrees new.\n\t\t\t\t\n\toutput := (TextStream with: String new).\n\tself assert: -1 equals: (bench binarytrees: 9 to: output).\n\t\n\toutput := (TextStream with: String new).\n\tself assert: -1 equals: (bench binarytrees: 8 to: output).\n\t\n\toutput := (TextStream with: String new).\n\tself assert: -1 equals: (bench binarytrees: 7 to: output).\n\t\n\t! !\n\n!BGTests methodsFor: 'as yet unclassified' stamp: 'StefanMarr 5/15/2011 18:03'!\ntestChameleons\n\tself assert: (BGChameleons chameneos:     100) equals: 200. \n\tself assert: (BGChameleons chameneos:   10000) equals: 20000.\n\tself assert: (BGChameleons chameneos: 1000000) equals: 2000000.! !\n\n!BGTests methodsFor: 'as yet unclassified' stamp: 'StefanMarr 5/15/2011 18:03'!\ntestChameneosRedux\n\t| report result |\n\t\n\treport := TextStream with: String new.\n\tresult := BGMall runBenchMark: 600 on: report.\n\tself assert: result equals: 1200.\n\t\n\treport := TextStream with: String new.\n\tresult := BGMall runBenchMark: 555 on: report.\n\tself assert: result equals: (555 * 2).\n\t\n\treport := TextStream with: String new.\n\tresult := BGMall runBenchMark: 121 on: report.\n\tself assert: result equals: (121 * 2).\n\t! !\n\n!BGTests methodsFor: 'as yet unclassified' stamp: 'StefanMarr 5/15/2011 12:15'!\ntestFannkuchReduxResult\n\t | f |\n\tf := BGFannkuchRedux fannkuchRedux: 7 to: (TextStream with: String new).\n\tself assert: f equals: 16! !\n\n!BGTests methodsFor: 'as yet unclassified' stamp: 'StefanMarr 5/15/2011 18:07'!\ntestFasta\n\t| result |\n\tself flag: 'TODO: add proper verification'.\n\tself shouldnt: [result := BGFasta fasta] raise: Error.\n\tself assert: (result size > 0).\n\tself assert: (result isKindOf: String).\n\t! !\n\n!BGTests methodsFor: 'as yet unclassified' stamp: 'StefanMarr 5/15/2011 18:04'!\ntestNBody\n\tself assert: (((BGNBody nbody: 1000) asString) beginsWith: '-0.169087605')! !\n\n!BGTreeNode methodsFor: 'accessing'!\nitemCheck\n   ^left isNil \n      ifTrue: [item] ifFalse: [item + (left itemCheck - right itemCheck)]! !\n\n!BGTreeNode methodsFor: 'initialize-release'!\nleft: leftChild right: rightChild item: anItem\n   left := leftChild.\n   right := rightChild.\n   item := anItem! !\n\n!BGTreeNode class methodsFor: 'instance creation'!\nbottomUpTree: anItem depth: anInteger\n   ^(anInteger > 0) \n      ifTrue: [\n         self \n            left: (self bottomUpTree: 2*anItem - 1 depth: anInteger - 1) \n            right: (self bottomUpTree: 2*anItem depth: anInteger - 1)  \n            item: anItem\n         ]\n      ifFalse: [self left: nil right: nil item: anItem]! !\n\n!BGTreeNode class methodsFor: 'instance creation'!\nleft: leftChild right: rightChild item: anItem      \n   ^(super new) left: leftChild right: rightChild item: anItem! !\n\n!BMPReadWriter methodsFor: 'reading' stamp: 'ar 6/16/2002 15:36'!\nnextImage\n\t| colors |\n\tstream binary.\n\tself readHeader.\n\tbiBitCount = 24 ifTrue:[^self read24BmpFile].\n\t\"read the color map\"\n\tcolors := self readColorMap.\n\t^self readIndexedBmpFile: colors! !\n\n!BMPReadWriter methodsFor: 'reading' stamp: 'ar 10/25/2005 13:48'!\nread24BmpFile\n\t\"Read 24-bit pixel data from the given a BMP stream.\"\n\t| form formBits pixelLine bitsIndex bitBlt |\n\tform _ Form extent: biWidth@biHeight depth: 32.\n\tpixelLine := ByteArray new: (((24 * biWidth) + 31) // 32) * 4.\n\tbitsIndex := form height - 1 * biWidth + 1.\n\tformBits := form bits.\n\t1 to: biHeight do: [:i |\n\t\tpixelLine := stream nextInto: pixelLine.\n\t\tself read24BmpLine: pixelLine into: formBits startingAt: bitsIndex width: biWidth.\n\t\tbitsIndex := bitsIndex - biWidth.\n\t].\n\tbitBlt := BitBlt toForm: form.\n\tbitBlt combinationRule: 7 \"bitOr:with:\".\n\tbitBlt halftoneForm: (Bitmap with: 16rFF000000).\n\tbitBlt copyBits.\n\t^ form\n! !\n\n!BMPReadWriter methodsFor: 'reading' stamp: 'ar 10/25/2005 13:47'!\nread24BmpLine: pixelLine into: formBits startingAt: formBitsIndex width: width\n\t| pixIndex rgb bitsIndex |\n\tpixIndex _ 0. \"pre-increment\"\n\tbitsIndex := formBitsIndex-1. \"pre-increment\"\n\t1 to: width do: [:j |\n\t\trgb := \n\t\t\t(pixelLine at: (pixIndex := pixIndex+1)) +\n\t\t\t((pixelLine at: (pixIndex := pixIndex+1)) bitShift: 8) +\n\t\t\t((pixelLine at: (pixIndex := pixIndex+1)) bitShift: 16).\n\t\tformBits at: (bitsIndex := bitsIndex+1) put: rgb.\n\t].\n! !\n\n!BMPReadWriter methodsFor: 'reading' stamp: 'ar 10/24/2005 20:57'!\nreadColorMap\n\t\"Read colorCount BMP color map entries from the given binary stream. Answer an array of Colors.\"\n\t| colorCount colors maxLevel b g r ccStream |\n\tcolorCount _ (bfOffBits - 54) // 4.\n\t\"Note: some programs (e.g. Photoshop 4.0) apparently do not set colorCount; assume that any data between the end of the header and the start of the pixel data is the color map\"\n\tbiBitCount >= 16 ifTrue:[^nil].\n\tcolorCount = 0 ifTrue: [ \"this BMP file does not have a color map\"\n\t\t\"default monochrome color map\"\n\t\tbiBitCount = 1 ifTrue: [^ Array with: Color white with: Color black].\n\t\t\"default gray-scale color map\"\n\t\tmaxLevel _ (2 raisedTo: biBitCount) - 1.\n\t\t^ (0 to: maxLevel) collect: [:level | Color gray: (level asFloat / maxLevel)]].\n\tccStream := ReadStream on: (stream next: colorCount*4).\n\tcolors _ Array new: colorCount.\n\t1 to: colorCount do: [:i |\n\t\tb _ ccStream next.\n\t\tg _ ccStream next.\n\t\tr _ ccStream next.\n\t\tccStream next. \"skip reserved\"\n\t\tcolors at: i put: (Color r: r g: g b: b range: 255)].\n\t^ colors\n! !\n\n!BMPReadWriter methodsFor: 'reading' stamp: 'ar 6/16/2002 15:20'!\nreadHeader\n\t| reserved |\n\tbfType _ stream nextLittleEndianNumber: 2.\n\tbfSize _ stream nextLittleEndianNumber: 4.\n\treserved _ stream nextLittleEndianNumber: 4.\n\tbfOffBits _ stream nextLittleEndianNumber: 4.\n\tbiSize _ stream nextLittleEndianNumber: 4.\n\tbiWidth _ stream nextLittleEndianNumber: 4.\n\tbiHeight _ stream nextLittleEndianNumber: 4.\n\tbiPlanes _ stream nextLittleEndianNumber: 2.\n\tbiBitCount _ stream nextLittleEndianNumber: 2.\n\tbiCompression _ stream nextLittleEndianNumber: 4.\n\tbiSizeImage _ stream nextLittleEndianNumber: 4.\n\tbiXPelsPerMeter _ stream nextLittleEndianNumber: 4.\n\tbiYPelsPerMeter _ stream nextLittleEndianNumber: 4.\n\tbiClrUsed _ stream nextLittleEndianNumber: 4.\n\tbiClrImportant _ stream nextLittleEndianNumber: 4.\n! !\n\n!BMPReadWriter methodsFor: 'reading' stamp: 'ar 10/25/2005 13:45'!\nreadIndexedBmpFile: colors\n\t\"Read uncompressed pixel data of depth d from the given BMP stream, where d is 1, 4, 8, or 16\"\n\t| form bytesPerRow pixelData pixelLine startIndex map bitBlt mask |\n\tcolors \n\t\tifNil:[form _ Form extent: biWidth@biHeight depth: biBitCount]\n\t\tifNotNil:[form _ ColorForm extent: biWidth@biHeight depth: biBitCount.\n\t\t\t\tform colors: colors].\n\tbytesPerRow _ (((biBitCount* biWidth) + 31) // 32) * 4.\n\tpixelData _ ByteArray new: bytesPerRow * biHeight.\n\tbiHeight to: 1 by: -1 do: [:y |\n\t\tpixelLine _ stream next: bytesPerRow.\n\t\tstartIndex _ ((y - 1) * bytesPerRow) + 1.\n\t\tpixelData \n\t\t\treplaceFrom: startIndex \n\t\t\tto: startIndex + bytesPerRow - 1 \n\t\t\twith: pixelLine \n\t\t\tstartingAt: 1].\n\tform bits copyFromByteArray: pixelData.\n\tbiBitCount = 16 ifTrue:[\n\t\tmap := ColorMap shifts: #(8 -8 0 0) masks: #(16rFF 16rFF00 0 0).\n\t\tmask := 16r80008000.\n\t].\n\tbiBitCount = 32 ifTrue:[\n\t\tmap := ColorMap shifts: #(24 8 -8 -24) masks: #(16rFF 16rFF00 16rFF0000 16rFF000000).\n\t\tmask := 16rFF000000.\n\t].\n\tmap ifNotNil:[\n\t\tbitBlt := BitBlt toForm: form.\n\t\tbitBlt sourceForm: form.\n\t\tbitBlt colorMap: map.\n\t\tbitBlt combinationRule: Form over.\n\t\tbitBlt copyBits.\n\t].\n\tmask ifNotNil:[\n\t\tbitBlt := BitBlt toForm: form.\n\t\tbitBlt combinationRule: 7 \"bitOr:with:\".\n\t\tbitBlt halftoneForm: (Bitmap with: mask).\n\t\tbitBlt copyBits.\n\t].\n\t^ form\n! !\n\n!BMPReadWriter methodsFor: 'testing' stamp: 'ar 6/16/2002 15:27'!\nunderstandsImageFormat\n\tstream size < 54 ifTrue:[^false]. \"min size = BITMAPFILEHEADER+BITMAPINFOHEADER\"\n\tself readHeader.\n\tbfType = 19778 \"BM\" ifFalse:[^false].\n\tbiSize = 40 ifFalse:[^false].\n\tbiPlanes = 1 ifFalse:[^false].\n\tbfSize <= stream size ifFalse:[^false].\n\tbiCompression = 0 ifFalse:[^false].\n\t^true! !\n\n!BMPReadWriter methodsFor: 'writing' stamp: 'yo 2/18/2004 17:57'!\nnextPutImage: aForm\n\t| bhSize rowBytes rgb data colorValues depth image ppw scanLineLen |\n\tdepth := aForm depth.\n\t[#(1 4 8 32) includes: depth] whileFalse:[depth := depth + 1 asLargerPowerOfTwo].\n\timage := aForm asFormOfDepth: depth.\n\timage unhibernate.\n\tbhSize _ 14.  \"# bytes in file header\"\n\tbiSize _ 40.  \"info header size in bytes\"\n\tbiWidth := image width.\n\tbiHeight := image height.\n\tbiClrUsed _ depth = 32 ifTrue: [0] ifFalse:[1 << depth].  \"No. color table entries\"\n\tbfOffBits _ biSize + bhSize + (4*biClrUsed).\n\trowBytes _ ((depth min: 24) * biWidth + 31 // 32) * 4.\n\tbiSizeImage _ biHeight * rowBytes.\n\n\t\"Write the file header\"\n\tstream position: 0.\n\tstream nextLittleEndianNumber: 2 put: 19778.  \"bfType = BM\"\n\tstream nextLittleEndianNumber: 4 put: bfOffBits + biSizeImage.  \"Entire file size in bytes\"\n\tstream nextLittleEndianNumber: 4 put: 0.  \"bfReserved\"\n\tstream nextLittleEndianNumber: 4 put: bfOffBits.  \"Offset of bitmap data from start of hdr (and file)\"\n\n\t\"Write the bitmap info header\"\n\tstream position: bhSize.\n\tstream nextLittleEndianNumber: 4 put: biSize.  \"info header size in bytes\"\n\tstream nextLittleEndianNumber: 4 put: image width.  \"biWidth\"\n\tstream nextLittleEndianNumber: 4 put: image height.  \"biHeight\"\n\tstream nextLittleEndianNumber: 2 put: 1.  \"biPlanes\"\n\tstream nextLittleEndianNumber: 2 put: (depth min: 24).  \"biBitCount\"\n\tstream nextLittleEndianNumber: 4 put: 0.  \"biCompression\"\n\tstream nextLittleEndianNumber: 4 put: biSizeImage.  \"size of image section in bytes\"\n\tstream nextLittleEndianNumber: 4 put: 2800.  \"biXPelsPerMeter\"\n\tstream nextLittleEndianNumber: 4 put: 2800.  \"biYPelsPerMeter\"\n\tstream nextLittleEndianNumber: 4 put: biClrUsed.\n\tstream nextLittleEndianNumber: 4 put: 0.  \"biClrImportant\"\n\tbiClrUsed > 0 ifTrue: [\n\t\t\"write color map; this works for ColorForms, too\"\n\t\tcolorValues _ image colormapIfNeededForDepth: 32.\n\t\t1 to: biClrUsed do: [:i |\n\t\t\trgb _ colorValues at: i.\n\t\t\t0 to: 24 by: 8 do: [:j | stream nextPut: (rgb >> j bitAnd: 16rFF)]]].\n\n\tdepth < 32 ifTrue: [\n\t\t\"depth = 1, 4 or 8.\"\n\t\tdata _ image bits asByteArray.\n\t\tppw _ 32 // depth.\n\t\tscanLineLen _ biWidth + ppw - 1 // ppw * 4.  \"# of bytes in line\"\n\t\t1 to: biHeight do: [:i |\n\t\t\tstream next: scanLineLen putAll: data startingAt: (biHeight-i)*scanLineLen+1.\n\t\t].\n\t] ifFalse: [\n\t\t1 to: biHeight do:[:i |\n\t\t\tdata _ (image copy: (0@(biHeight-i) extent: biWidth@1)) bits.\n\t\t\t1 to: data size do: [:j | stream nextLittleEndianNumber: 3 put: (data at: j)].\n\t\t\t1 to: (data size*3)+3//4*4-(data size*3) do: [:j | stream nextPut: 0 \"pad to 32-bits\"]\n\t\t].\n\t].\n\tstream position = (bfOffBits + biSizeImage) ifFalse: [self error:'Write failure'].\n\tstream close.! !\n\n!BMPReadWriter class methodsFor: 'image reading/writing' stamp: 'nk 7/16/2003 17:56'!\ntypicalFileExtensions\n\t\"Answer a collection of file extensions (lowercase) which files that I can read might commonly have\"\n\t^#('bmp')! !\n\n!BMPReadWriter class methodsFor: 'testing' stamp: 'ar 6/16/2002 18:55'!\ndisplayAllFrom: fd\n\t\"BMPReadWriter displayAllFrom: FileDirectory default\"\n\tfd fileNames do:[:fName|\n\t\t(fName endsWith: '.bmp') ifTrue:[\n\t\t\t[(Form fromBinaryStream: (fd readOnlyFileNamed: fName)) display.\n\t\t\tDisplay forceDisplayUpdate] on: Error do:[:nix|].\n\t\t].\n\t].\n\tfd directoryNames do:[:fdName|\n\t\tself displayAllFrom: (fd directoryNamed: fdName)\n\t].! !\n\n!BMPReadWriter class methodsFor: 'testing' stamp: 'ar 6/16/2002 18:56'!\nreadAllFrom: fd\n\t\"MessageTally spyOn:[BMPReadWriter readAllFrom: FileDirectory default]\"\n\tfd fileNames do:[:fName|\n\t\t(fName endsWith: '.bmp') ifTrue:[\n\t\t\t[Form fromBinaryStream: (fd readOnlyFileNamed: fName)] on: Error do:[:nix].\n\t\t].\n\t].\n\tfd directoryNames do:[:fdName|\n\t\tself readAllFrom: (fd directoryNamed: fdName)\n\t].! !\n\n!BadEqualer methodsFor: 'comparing' stamp: 'mjr 8/20/2003 18:56'!\n= other \n\tself class = other class\n\t\tifFalse: [^ false].\n\t^ 100 atRandom < 30 ! !\n\n!BadEqualer commentStamp: 'mjr 8/20/2003 13:28' prior: 0!\nI am an object that doesn't always report #= correctly.  Used for testing the EqualityTester.!\n!BadHasher methodsFor: 'comparing' stamp: 'mjr 8/20/2003 18:56'!\nhash\n\t\"answer with a different hash some of the time\"\n\t100 atRandom < 30\n\t\tifTrue: [^ 1]. \n\t^ 2! !\n\n!BadHasher commentStamp: 'mjr 8/20/2003 13:28' prior: 0!\nI am an object that doesn't always hash correctly.  I am used for testing the HashTester.!\n!Behavior methodsFor: 'accessing' stamp: 'ssa 9/2/2009 17:59'!\nsetInstanceFormat: sizeAndFlags \n\t\"Set the format for the receiver (a Class).\"\n\n\tformat _ sizeAndFlags! !\n\n!Behavior methodsFor: 'printing' stamp: 'ssa 10/25/2008 20:48'!\narchiveVersion\n\t\"This is the daefault version number for an archived instance of any class.\n\tVersion 1 was back when each class was responsible for its own archiving.\n\tVersion 2 uses the default archiving behavior in object (see Object>archiveOn: and Object class>dearchive:from:).\"\n\n\t^1! !\n\n!Behavior methodsFor: 'printing' stamp: 'ads 1/24/2011 13:02'!\nlongPrintOn: aStream\n\t\"Append to the argument, aStream, the names and values of all of the receiver's instance variables.  But, not useful for a class with a method dictionary.\"\n\naStream nextPutAll: (RVMPrimitivesNeededForBootstrapping printPrefixFor: self).\n\taStream nextPutAll: '<<too complex to show>>'; cr.! !\n\n!Behavior methodsFor: 'compiling' stamp: 'ssa 9/3/2008 12:19'!\ncompile: code notifying: requestor trailer: trailingBytes\n\t\"Compile the argument, code, as source code in the context of the \n\treceiver and insEtall the result in the receiver's method dictionary. The \n\tsecond argument, requestor, is to be notified if an error occurs. The \n\targument code is either a string or an object that converts to a string or \n\ta PositionableStream. This method also saves the source code.\"\n\t\n\t| methodAndNode |\n\tmethodAndNode  := self\n\t\tbasicCompile: code \"a Text\"\n\t\tnotifying: requestor\n\t\ttrailer: trailingBytes\n\t\tifFail: [^nil].\n\tmethodAndNode method putSource: code fromParseNode: methodAndNode node inFile: 2\n\t\t\twithPreamble: [:f | f cr; nextPut: $!!; nextChunkPut: 'Behavior method'; cr].\n\tself addSelector: methodAndNode selector withMethod: methodAndNode method notifying: requestor.\n\t^ methodAndNode selector! !\n\n!Behavior methodsFor: 'accessing class hierarchy' stamp: 'ssa 10/8/2008 15:47'!\nallSubclasses\n\t\"Answer a Set of the receiver's and the receiver's descendent's subclasses. \"\n\n\t| scan scanTop |\n\tscan _ OrderedCollection withAll: self subclasses.\n\tscanTop _ 1.\n\t[scanTop > scan size]\n\t\twhileFalse: [scan addAll: (scan at: scanTop) subclasses.\n\t\t\tscanTop _ scanTop + 1].\n\t^ scan \"asSet\"! !\n\n!Behavior methodsFor: 'accessing class hierarchy' stamp: 'ssa 10/8/2008 16:02'!\nwithAllSubclasses\n\t\"Answer a Set of the receiver, the receiver's descendent's, and the  \n\treceiver's descendent's subclasses.\"\n\n\t| subs |\n\tsubs _ self allSubclasses.\n\tsubs addFirst: self.\n\t^subs! !\n\n!Behavior methodsFor: 'outlining' stamp: 'ssa 9/10/2009 13:46'!\nsubobjects\n\n\t^self subclasses! !\n\n!Benchmark methodsFor: 'load and popStore'!\ntestLoadInstVar\n\tdummy _ 1.\n\tself test: [dummy == dummy. dummy == dummy.\n\t\t\t  dummy == dummy. dummy == dummy.\n\t\t\t  dummy == dummy. dummy == dummy.\n\t\t\t  dummy == dummy. dummy == dummy.\n\t\t\t  dummy == dummy. dummy == dummy. nil]\n\t\tlabeled: 'load an instance variable, 20 times' repeated: 10000\n\n\t\"Benchmark new testLoadInstVar\"! !\n\n!Benchmark methodsFor: 'load and popStore'!\ntestLoadLiteralIndirect\n\tself test: [Point == Point. Point == Point.\n\t\t\t  Point == Point. Point == Point.\n\t\t\t  Point == Point. Point == Point.\n\t\t\t  Point == Point. Point == Point.\n\t\t\t  Point == Point. Point == Point. nil]\n\t\tlabeled: 'load literal indirect (overflow refct), 20 times' repeated: 10000\n\n\t\"Benchmark new testLoadLiteralIndirect\"! !\n\n!Benchmark methodsFor: 'load and popStore'!\ntestLoadLiteralNRef\n\tself test: [3 == 3. 3 == 3. 3 == 3. 3 == 3. 3 == 3.\n\t\t\t  3 == 3. 3 == 3. 3 == 3. 3 == 3. 3 == 3. nil]\n\t\tlabeled: 'load nonRefcounted literal, 20 times' repeated: 10000\n\n\t\"Benchmark new testLoadLiteralNRef\"! !\n\n!Benchmark methodsFor: 'load and popStore'!\ntestLoadQuickConstant\n\tself test: [1 == 1. 1 == 1. 1 == 1. 1 == 1. 1 == 1.\n\t\t\t  1 == 1. 1 == 1. 1 == 1. 1 == 1. 1 == 1.\n\t\t\t  1 == 1. 1 == 1. 1 == 1. 1 == 1. 1 == 1.\n\t\t\t  1 == 1. 1 == 1. 1 == 1. 1 == 1. 1 == 1. nil]\n\t\tlabeled: 'load 1, 40 times; send ==, 20 times' repeated: 10000\n\n\t\"Benchmark new testLoadQuickConstant\"! !\n\n!Benchmark methodsFor: 'load and popStore'!\ntestLoadTempNRef\n\t| temp |\n\ttemp _ 1.\n\tself test: [temp == temp. temp == temp.\n\t\t\t  temp == temp. temp == temp.\n\t\t\t  temp == temp. temp == temp.\n\t\t\t  temp == temp. temp == temp.\n\t\t\t  temp == temp. temp == temp. nil]\n\t\tlabeled: 'load 1 as a temp, 20 times' repeated: 10000\n\n\t\"Benchmark new testLoadTempNRef\"! !\n\n!Benchmark methodsFor: 'load and popStore'!\ntestLoadTempRef\n\t| temp |\n\ttemp _ 0@0.\n\tself test: [temp == temp. temp == temp.\n\t\t\t  temp == temp. temp == temp.\n\t\t\t  temp == temp. temp == temp.\n\t\t\t  temp == temp. temp == temp.\n\t\t\t  temp == temp. temp == temp. nil]\n\t\tlabeled: 'load 0@0, 20 times' repeated: 10000\n\n\t\"Benchmark new testLoadTempRef\"! !\n\n!Benchmark methodsFor: 'load and popStore'!\ntestPopStoreInstVar\n\tself test: [dummy _ 1. dummy _ 1. dummy _ 1. dummy _ 1. dummy _ 1.\n\t\t\t  dummy _ 1. dummy _ 1. dummy _ 1. dummy _ 1. dummy _ 1.\n\t\t\t  dummy _ 1. dummy _ 1. dummy _ 1. dummy _ 1. dummy _ 1.\n\t\t\t  dummy _ 1. dummy _ 1. dummy _ 1. dummy _ 1. dummy _ 1. nil]\n\t\tlabeled: 'store into an instance variable, 20 times' repeated: 10000\n\n\t\"Benchmark new testPopStoreInstVar\"! !\n\n!Benchmark methodsFor: 'load and popStore'!\ntestPopStoreTemp\n\t| temp |\n\tself test: [temp _ 1. temp _ 1. temp _ 1. temp _ 1. temp _ 1.\n\t\t\t  temp _ 1. temp _ 1. temp _ 1. temp _ 1. temp _ 1.\n\t\t\t  temp _ 1. temp _ 1. temp _ 1. temp _ 1. temp _ 1.\n\t\t\t  temp _ 1. temp _ 1. temp _ 1. temp _ 1. temp _ 1. nil]\n\t\tlabeled: 'store into a temp, 20 times' repeated: 10000\n\n\t\"Benchmark new testPopStoreTemp\"! !\n\n!Benchmark methodsFor: 'arithmetic'!\ntest16bitArith\n\t| twentyK |\n\ttwentyK _ 20000.\n\tself test: [twentyK+twentyK. twentyK+twentyK.\n\t\t\t  twentyK+twentyK. twentyK+twentyK.\n\t\t\t  twentyK+twentyK. twentyK+twentyK.\n\t\t\t  twentyK+twentyK. twentyK+twentyK.\n\t\t\t  twentyK+twentyK. twentyK+twentyK. nil]\n\t\tlabeled: 'add 20000 + 20000, 10 times' repeated: 1000\n\n\t\"Benchmark new test16bitArith\"! !\n\n!Benchmark methodsFor: 'arithmetic'!\ntest3div4\n\tself test: [3//4. 3//4. 3//4. 3//4. 3//4. 3//4. 3//4. 3//4. 3//4. 3//4. nil]\n\t\tlabeled: 'divide 3 by 4, 10 times' repeated: 1000\n\n\t\"Benchmark new test3div4\"! !\n\n!Benchmark methodsFor: 'arithmetic'!\ntest3lessThan4\n\tself test: [3<4. 3<4. 3<4. 3<4. 3<4. 3<4. 3<4. 3<4. 3<4. 3<4. nil]\n\t\tlabeled: 'test 3 < 4, 10 times' repeated: 10000\n\n\t\"Benchmark new test3lessThan4\"! !\n\n!Benchmark methodsFor: 'arithmetic'!\ntest3plus4\n\tself test: [3+4. 3+4. 3+4. 3+4. 3+4. 3+4. 3+4. 3+4. 3+4. 3+4. nil]\n\t\tlabeled: 'add 3 + 4, 10 times' repeated: 10000\n\n\t\"Benchmark new test3plus4\"! !\n\n!Benchmark methodsFor: 'arithmetic'!\ntest3times4\n\tself test: [3*4. 3*4. 3*4. 3*4. 3*4. 3*4. 3*4. 3*4. 3*4. 3*4. nil]\n\t\tlabeled: 'multiply 3 * 4, 10 times' repeated: 10000\n\n\t\"Benchmark new test3times4\"! !\n\n!Benchmark methodsFor: 'arithmetic'!\ntestLargeIntArith\n\t| eightyK |\n\teightyK _ 80000.\n\tself test: [eightyK+eightyK. eightyK+eightyK.\n\t\t\t  eightyK+eightyK. eightyK+eightyK.\n\t\t\t  eightyK+eightyK. eightyK+eightyK.\n\t\t\t  eightyK+eightyK. eightyK+eightyK.\n\t\t\t  eightyK+eightyK. eightyK+eightyK. nil]\n\t\tlabeled: 'add 80000 + 80000, 10 times' repeated: 100\n\n\t\"Benchmark new testLargeIntArith\"! !\n\n!Benchmark methodsFor: 'control'!\ntestActivationReturn\n\tself test:\n\t\t\t[self recur: 14]\n\t\tlabeled: 'activate and return, 32K times' repeated: 1\n\n\t\"Benchmark new testActivationReturn\"! !\n\n!Benchmark methodsFor: 'control'!\ntestShortBranch\n\tself test: [false ifTrue: [1] ifFalse: [2].\n\t\t\t  false ifTrue: [1] ifFalse: [2].\n\t\t\t  false ifTrue: [1] ifFalse: [2].\n\t\t\t  false ifTrue: [1] ifFalse: [2].\n\t\t\t  false ifTrue: [1] ifFalse: [2].\n\t\t\t  false ifTrue: [1] ifFalse: [2].\n\t\t\t  false ifTrue: [1] ifFalse: [2].\n\t\t\t  false ifTrue: [1] ifFalse: [2].\n\t\t\t  false ifTrue: [1] ifFalse: [2].\n\t\t\t  false ifTrue: [1] ifFalse: [2]. nil]\n\t\tlabeled: 'short branch on false, 10 times' repeated: 10000\n\n\t\"Benchmark new testShortBranch\"! !\n\n!Benchmark methodsFor: 'control'!\ntestWhileLoop\n\t| temp |\n\tself test: [temp _ 10000.\n\t\t\t  [temp > 0] whileTrue: [temp _ temp - 1].\n\t\t\t  nil]\n\t\tlabeled: 'simple whileLoop, 10000 times through' repeated: 10\n\n\t\"Benchmark new testWhileLoop\"! !\n\n!Benchmark methodsFor: 'arrays and strings'!\ntestArrayAt\n\t| array index |\n\tarray _ #(1 2 3 4 5 6).\n\tindex _ 4.\n\tself test:\n\t\t\t[array at: index. array at: index. array at: index. array at: index.\n\t\t\t array at: index. array at: index. array at: index. array at: index.\n\t\t\t array at: index. array at: index. array at: index. array at: index.\n\t\t\t array at: index. array at: index. array at: index. array at: index.\n\t\t\t array at: index. array at: index. array at: index. array at: index. nil]\n\t\tlabeled: 'send #at: 20 times (to an array)' repeated: 1000\n\n\t\"Benchmark new testArrayAt\"! !\n\n!Benchmark methodsFor: 'arrays and strings'!\ntestArrayAtPut\n\t| array index element |\n\tarray _ #(1 2 3 4 5 6).\n\tindex _ 4.\n\telement _ 17.\n\tself test:\n\t\t\t[array at: index put: element. array at: index put: element.\n\t\t\t array at: index put: element. array at: index put: element.\n\t\t\t array at: index put: element. array at: index put: element.\n\t\t\t array at: index put: element. array at: index put: element.\n\t\t\t array at: index put: element. array at: index put: element.\n\t\t\t array at: index put: element. array at: index put: element.\n\t\t\t array at: index put: element. array at: index put: element.\n\t\t\t array at: index put: element. array at: index put: element.\n\t\t\t array at: index put: element. array at: index put: element.\n\t\t\t array at: index put: element. array at: index put: element. nil]\n\t\tlabeled: 'send #at:put: 20 times (to an array)' repeated: 1000\n\n\t\"Benchmark new testArrayAtPut\"! !\n\n!Benchmark methodsFor: 'arrays and strings'!\ntestSize\n\t| string |\n\tstring _ 'abcde'.\n\tself test:\n\t\t\t[string size. string size. string size. string size. string size.\n\t\t\t string size. string size. string size. string size. string size.\n\t\t\t string size. string size. string size. string size. string size.\n\t\t\t string size. string size. string size. string size. string size. nil]\n\t\tlabeled: 'send #size 20 times (to a string)' repeated: 1000\n\n\t\"Benchmark new testSize\"! !\n\n!Benchmark methodsFor: 'arrays and strings'!\ntestStringAt\n\t| string index |\n\tstring _ 'abcdefg'.\n\tindex _ 4.\n\tself test:\n\t\t\t[string at: index. string at: index. string at: index. string at: index.\n\t\t\t string at: index. string at: index. string at: index. string at: index.\n\t\t\t string at: index. string at: index. string at: index. string at: index.\n\t\t\t string at: index. string at: index. string at: index. string at: index.\n\t\t\t string at: index. string at: index. string at: index. string at: index. nil]\n\t\tlabeled: 'send #at: 20 times (to a string)' repeated: 1000\n\n\t\"Benchmark new testStringAt\"! !\n\n!Benchmark methodsFor: 'arrays and strings'!\ntestStringAtPut\n\t| string index char |\n\tstring _ 'abcdefg'.\n\tindex _ 4.\n\tchar _ $q.\n\tself test:\n\t\t\t[string at: index put: char. string at: index put: char.\n\t\t\t string at: index put: char. string at: index put: char.\n\t\t\t string at: index put: char. string at: index put: char.\n\t\t\t string at: index put: char. string at: index put: char.\n\t\t\t string at: index put: char. string at: index put: char.\n\t\t\t string at: index put: char. string at: index put: char.\n\t\t\t string at: index put: char. string at: index put: char.\n\t\t\t string at: index put: char. string at: index put: char.\n\t\t\t string at: index put: char. string at: index put: char.\n\t\t\t string at: index put: char. string at: index put: char. nil]\n\t\tlabeled: 'send #at:put: 20 times (to a string)' repeated: 1000\n\n\t\"Benchmark new testStringAtPut\"! !\n\n!Benchmark methodsFor: 'primitive byte codes'!\ntestBlockCopy\n\t| tC |\n\ttC _ thisContext.\n\tself test: [tC blockCopy: 0. tC blockCopy: 0. tC blockCopy: 0. tC blockCopy: 0.\n\t\t\t  tC blockCopy: 0. tC blockCopy: 0. tC blockCopy: 0. tC blockCopy: 0.\n\t\t\t  tC blockCopy: 0. tC blockCopy: 0. tC blockCopy: 0. tC blockCopy: 0.\n\t\t\t  tC blockCopy: 0. tC blockCopy: 0. tC blockCopy: 0. tC blockCopy: 0.\n\t\t\t  tC blockCopy: 0. tC blockCopy: 0. tC blockCopy: 0. tC blockCopy: 0. nil]\n\t\tlabeled: 'execute blockCopy: 0, 20 times' repeated: 1000\n\n\t\"Benchmark new testBlockCopy\"! !\n\n!Benchmark methodsFor: 'primitive byte codes'!\ntestClass\n\t| pt |\n\tpt _ 0@0.\n\tself test:\n\t\t\t[pt class. pt class. pt class. pt class. pt class.\n\t\t\t pt class. pt class. pt class. pt class. pt class.\n\t\t\t pt class. pt class. pt class. pt class. pt class.\n\t\t\t pt class. pt class. pt class. pt class. pt class. nil]\n\t\tlabeled: 'send #class 20 times (to a point)' repeated: 1000\n\n\t\"Benchmark new testClass\"! !\n\n!Benchmark methodsFor: 'primitive byte codes'!\ntestCreation\n\tself test:\n\t\t\t[Point new. Point new. Point new. Point new. Point new.\n\t\t\t  Point new. Point new. Point new. Point new. Point new.\n\t\t\t  Point new. Point new. Point new. Point new. Point new.\n\t\t\t  Point new. Point new. Point new. Point new. Point new. nil]\n\t\tlabeled: 'create 20 uninitialized points' repeated: 1000\n\n\t\"Benchmark new testCreation\"! !\n\n!Benchmark methodsFor: 'primitive byte codes'!\ntestEQ\n\t| temp |\n\ttemp _ 1.\n\tself test: [temp == temp == temp == temp == temp ==\n\t\t\t  temp == temp == temp == temp == temp ==\n\t\t\t  temp == temp == temp == temp == temp ==\n\t\t\t  temp == temp == temp == temp == temp. nil]\n\t\tlabeled: 'send ==, 20 times' repeated: 10000\n\n\t\"Benchmark new testEQ\"! !\n\n!Benchmark methodsFor: 'primitive byte codes'!\ntestLoadThisContext\n\tself test: [thisContext == thisContext. thisContext == thisContext.\n\t\t\t  thisContext == thisContext. thisContext == thisContext.\n\t\t\t  thisContext == thisContext. thisContext == thisContext.\n\t\t\t  thisContext == thisContext. thisContext == thisContext.\n\t\t\t  thisContext == thisContext. thisContext == thisContext. nil]\n\t\tlabeled: 'load thisContext, 20 times' repeated: 10000\n\n\t\"Benchmark new testLoadThisContext\"! !\n\n!Benchmark methodsFor: 'primitive byte codes'!\ntestPointCreation\n\tself test: [3@4. 3@4. 3@4. 3@4. 3@4. 3@4. 3@4. 3@4. 3@4. 3@4. nil]\n\t\tlabeled: 'create 3@4, 10 times' repeated: 1000\n\n\t\"Benchmark new testPointCreation\"! !\n\n!Benchmark methodsFor: 'primitive byte codes'!\ntestPointX\n\t| pt |\n\tpt _ 0@0.\n\tself test: [pt x. pt x. pt x. pt x. pt x. pt x. pt x. pt x. pt x. pt x. nil]\n\t\tlabeled: 'execute aPoint x, 10 times' repeated: 10000\n\n\t\"Benchmark new testPointX\"! !\n\n!Benchmark methodsFor: 'primitive byte codes'!\ntestStreamNext\n\t| strm |\n\tstrm _ ReadStream on: 'abcdefghijklmnopqrstuvwxyz'.\n\tself test: [strm position: 0.\n\t\t\t  strm next. strm next. strm next. strm next.\n\t\t\t  strm next. strm next. strm next. strm next.\n\t\t\t  strm next. strm next. strm next. strm next.\n\t\t\t  strm next. strm next. strm next. strm next.\n\t\t\t  strm next. strm next. strm next. strm next. nil]\n\t\tlabeled: 'execute ReadStream next, 20 times' repeated: 1000\n\n\t\"Benchmark new testStreamNext\"! !\n\n!Benchmark methodsFor: 'primitive byte codes'!\ntestStreamNextPut\n\t| strm ch |\n\tstrm _ ReadWriteStream on: 'abcdefghijklmnopqrstuvwxyz'.\n\tch _ $q.\n\tself test: [strm position: 0.\n\t\t\t  strm nextPut: ch. strm nextPut: ch. strm nextPut: ch. strm nextPut: ch.\n\t\t\t  strm nextPut: ch. strm nextPut: ch. strm nextPut: ch. strm nextPut: ch.\n\t\t\t  strm nextPut: ch. strm nextPut: ch. strm nextPut: ch. strm nextPut: ch.\n\t\t\t  strm nextPut: ch. strm nextPut: ch. strm nextPut: ch. strm nextPut: ch.\n\t\t\t  strm nextPut: ch. strm nextPut: ch. strm nextPut: ch. strm nextPut: ch. nil]\n\t\tlabeled: 'execute ReadWriteStream nextPut:, 20 times' repeated: 1000\n\n\t\"Benchmark new testStreamNextPut\"! !\n\n!Benchmark methodsFor: 'primitive byte codes'!\ntestValue\n\t| block |\n\tblock _ [3+4].\n\tself test: [block value. block value. block value. block value.\n\t\t\t  block value. block value. block value. block value.\n\t\t\t  block value. block value. block value. block value.\n\t\t\t  block value. block value. block value. block value.\n\t\t\t  block value. block value. block value. block value. nil]\n\t\tlabeled: 'evaluate the block: (3+4), 20 times' repeated: 1000\n\n\t\"Benchmark new testValue\"! !\n\n!Benchmark methodsFor: 'primitive methods'!\ntestAsFloat\n\tself test: [1 asFloat. 1 asFloat. 1 asFloat. 1 asFloat. 1 asFloat.\n\t\t\t  1 asFloat. 1 asFloat. 1 asFloat. 1 asFloat. 1 asFloat.\n\t\t\t  1 asFloat. 1 asFloat. 1 asFloat. 1 asFloat. 1 asFloat.\n\t\t\t  1 asFloat. 1 asFloat. 1 asFloat. 1 asFloat. 1 asFloat. nil]\n\t\tlabeled: 'convert 1 to floating point, 20 times' repeated: 100\n\n\t\"Benchmark new testAsFloat\"! !\n\n!Benchmark methodsFor: 'primitive methods' stamp: 'ssa 8/19/2008 21:08'!\ntestBasicAt\n\t| coll index |\n\tcoll _ Array new: 16.\n\tindex _ 5.\n\tself test:\n\t\t\t[coll basicAt: index. coll basicAt: index. coll basicAt: index. coll basicAt: index.\n\t\t\t coll basicAt: index. coll basicAt: index. coll basicAt: index. coll basicAt: index.\n\t\t\t coll basicAt: index. coll basicAt: index. coll basicAt: index. coll basicAt: index.\n\t\t\t coll basicAt: index. coll basicAt: index. coll basicAt: index. coll basicAt: index.\n\t\t\t coll basicAt: index. coll basicAt: index. coll basicAt: index. coll basicAt: index. nil]\n\t\tlabeled: 'send #basicAt: 20 times (to an array)' repeated: 1000\n\n\t\"Benchmark new testBasicAt\"! !\n\n!Benchmark methodsFor: 'primitive methods' stamp: 'ssa 8/19/2008 21:09'!\ntestBasicAtPut\n\t| coll index element |\n\tcoll _ Array new: 16.\n\tindex _ 5.\n\telement _ 17.\n\tself test:\n\t\t\t[coll basicAt: index put: element. coll basicAt: index put: element.\n\t\t\t coll basicAt: index put: element. coll basicAt: index put: element.\n\t\t\t coll basicAt: index put: element. coll basicAt: index put: element.\n\t\t\t coll basicAt: index put: element. coll basicAt: index put: element.\n\t\t\t coll basicAt: index put: element. coll basicAt: index put: element.\n\t\t\t coll basicAt: index put: element. coll basicAt: index put: element.\n\t\t\t coll basicAt: index put: element. coll basicAt: index put: element.\n\t\t\t coll basicAt: index put: element. coll basicAt: index put: element.\n\t\t\t coll basicAt: index put: element. coll basicAt: index put: element.\n\t\t\t coll basicAt: index put: element. coll basicAt: index put: element. nil]\n\t\tlabeled: 'send #basicAtPut: 20 times (to a set)' repeated: 1000\n\n\t\"Benchmark new testBasicAtPut\"! !\n\n!Benchmark methodsFor: 'primitive methods'!\ntestBitBLT\n\t| bLTer |\n\tbLTer _ self sampleBitBLT.\n\tself test:\n\t\t\t[bLTer copyBits. bLTer copyBits.\n\t\t\t bLTer copyBits. bLTer copyBits.\n\t\t\t bLTer copyBits. bLTer copyBits.\n\t\t\t bLTer copyBits. bLTer copyBits.\n\t\t\t bLTer copyBits. bLTer copyBits. nil]\n\t\tlabeled: 'call bitBLT 10 times' repeated: 10\n\n\t\"Benchmark new testBitBLT\"! !\n\n!Benchmark methodsFor: 'primitive methods'!\ntestFloatingPointAddition\n\t| a b |\n\ta _ 3.1.\n\tb _ 4.1.\n\tself test: [a+b. a+b. a+b. a+b. a+b. a+b. a+b. a+b. a+b. a+b.\n\t\t\t  a+b. a+b. a+b. a+b. a+b. a+b. a+b. a+b. a+b. a+b. nil]\n\t\tlabeled: 'add 3.1 plus 4.1, 20 times' repeated: 100\n\n\t\"Benchmark new testFloatingPointAddition\"! !\n\n!Benchmark methodsFor: 'primitive methods'!\ntestPerform\n\tself test: [3 perform: #+ with: 4. 3 perform: #+ with: 4.\n\t\t\t  3 perform: #+ with: 4. 3 perform: #+ with: 4.\n\t\t\t  3 perform: #+ with: 4. 3 perform: #+ with: 4.\n\t\t\t  3 perform: #+ with: 4. 3 perform: #+ with: 4.\n\t\t\t  3 perform: #+ with: 4. 3 perform: #+ with: 4.\n\t\t\t  3 perform: #+ with: 4. 3 perform: #+ with: 4.\n\t\t\t  3 perform: #+ with: 4. 3 perform: #+ with: 4.\n\t\t\t  3 perform: #+ with: 4. 3 perform: #+ with: 4.\n\t\t\t  3 perform: #+ with: 4. 3 perform: #+ with: 4.\n\t\t\t  3 perform: #+ with: 4. 3 perform: #+ with: 4. nil]\n\t\tlabeled: '3 perform: #+ with: 4, 20 times' repeated: 1000\n\n\t\"Benchmark new testPerform\"! !\n\n!Benchmark methodsFor: 'primitive methods'!\ntestStringReplace\n\t| source sink size |\n\tsource _ self longishString copy.\n\tsink _ source copy.\n\tsize _ sink size.\n\tself test:\n\t\t\t[sink replaceFrom: 1 to: size with: source startingAt: 1. nil]\n\t\tlabeled: 'replace characters in a string' repeated: 100\n\n\t\"Benchmark new testStringReplace\"! !\n\n!Benchmark methodsFor: 'primitive methods' stamp: 'ssa 8/19/2008 21:51'!\ntestTextScanning\n\t| clipRect para range scanner stops |\n\t\"clipRect _ Display boundingBox.\n\tpara _ Paragraph withText: 'Hi there, folks' asText.\n\trange _ 1 to: para numberOfLines.\n\tscanner _ DisplayScanner new.\n\tscanner displayLines: range in: para clippedBy: clipRect.\n\tstops _ scanner instVarAt: 17.\"\n\tself test:\n\t\t[\"scanner destX: 0.\n\t\t scanner\n\t\t\tscanCharactersFrom: 1\n\t\t\tto: 16\n\t\t\tin: 'Hi there, folks!!'\n\t\t\trightX: 400\n\t\t\tstopConditions: stops\n\t\t\tdisplaying: true\"]\n\t\tlabeled: 'DISABLED scan characters (primitive text display)' repeated: 100\n\n\t\"Benchmark new testTextScanning\"! !\n\n!Benchmark methodsFor: 'macro operations' stamp: 'ssa 11/17/2008 22:54'!\ntestAllCallsOn\n\tself test:\n\t\t\t[SystemNavigation default  allCallsOn: #printStringBase:]\n\t\tlabeled: 'find all calls on #printStringBase:' repeated: 3\n\n\t\"Benchmark new testAllCallsOn\"! !\n\n!Benchmark methodsFor: 'macro operations' stamp: 'ssa 11/17/2008 22:51'!\ntestAllImplementors\n\tself test:\n\t\t\t[SystemNavigation default allImplementorsOf: #next]\n\t\tlabeled: 'find all implementors of #next' repeated: 10\n\n\t\"Benchmark new testAllImplementors\"! !\n\n!Benchmark methodsFor: 'macro operations'!\ntestClassOrganizer\n\t| class |\n\tclass _ Benchmark.\n\tself test:\n\t\t\t[class organization changeFromString: class organization printString]\n\t\tlabeled: 'read and write class organization' repeated: 1\n\n\t\"Benchmark new testClassOrganizer\"! !\n\n!Benchmark methodsFor: 'macro operations' stamp: 'dmu 1/1/2009 04:42'!\ntestCompiler\n\tself test:\n\t\t\t[Benchmark compileBenchmark:\n'dummy: aBlock repeated: nTimes | i emptyBlock emptyTime blockTime |\n\tnTimes > 1000 ifTrue: [^self time: aBlock repeatedK: nTimes // 1000].\n\temptyBlock _ [].\n\temptyTime _ Time millisecondsToRun:\n\t\t\t\t\t[i _ 0.\n\t\t\t\t\t [(i _ i + 1) <= nTimes] whileTrue: [emptyBlock value]].\n\tblockTime _ Time millisecondsToRun:\n\t\t\t\t\t[i _ 0.\n\t\t\t\t\t [(i _ i + 1) <= nTimes] whileTrue: [aBlock value]].\n\t^blockTime - emptyTime'\n\t\t\t\tnotifying: nil ]\n\t\tlabeled: 'compile dummy method' repeated: 5.\n\tBenchmark removeSelector: #dummy:repeated:\n\n\t\"Benchmark new testCompiler\"! !\n\n!Benchmark methodsFor: 'macro operations'!\ntestDecompiler\n\t| class |\n\tclass _ InputSensor.\n\tself\n\t\ttest: [class selectors do:\n\t\t\t\t[:sel | (Decompiler new\n\t\t\t\t\t\tdecompile: sel\n\t\t\t\t\t\tin: class\n\t\t\t\t\t\tmethod: (class compiledMethodAt: sel)) decompileString]]\n\t\tlabeled: 'decompile class InputSensor' repeated: 1\n\n\t\"Benchmark new testDecompiler\"! !\n\n!Benchmark methodsFor: 'macro operations' stamp: 'ssa 11/17/2008 22:57'!\ntestMandala\n\tself test:\n\t\t\t[Pen new mandala: 30 diameter: 400]\n\t\tlabeled: 'testing Mandala' repeated: 2\n\n\t\"Benchmark new testMandala\"! !\n\n!Benchmark methodsFor: 'macro operations'!\ntestPrintDefinition\n\t| class |\n\tclass _ Compiler.\n\tself test:\n\t\t\t[class definition]\n\t\tlabeled: 'print a class definition' repeated: 20\n\n\t\"Benchmark new testPrintDefinition\"! !\n\n!Benchmark methodsFor: 'macro operations'!\ntestPrintHierarchy\n\t| class |\n\tclass _ InstructionStream.\n\tself test:\n\t\t\t[class printHierarchy]\n\t\tlabeled: 'print a class hierarchy' repeated: 10\n\n\t\"Benchmark new testPrintHierarchy\"! !\n\n!Benchmark methodsFor: 'macro operations'!\ntestTextDisplay\n\t| para |\n\tpara _ Paragraph withText: self textForDisplay.\n\tpara displayAt: 200@200.\n\tself test: [para displayAt: 200@200]\n\t\tlabeled: 'display text' repeated: 10\n\n\t\"Benchmark new testTextDisplay\"! !\n\n!Benchmark methodsFor: 'macro operations'!\ntestTextEditing\n\t| aStringHolderView editor selectPoint |\n\taStringHolderView _ self favoriteStringHolderView.\n\teditor _ aStringHolderView controller.\n\tselectPoint _ 0.\n\tself test:\n\t\t\t[editor selectAt: (selectPoint _ selectPoint + 5).\n\t\t\t editor replaceSelectionWith: 'Now!! ' asText]\n\t\tlabeled: 'text replacement and redisplay' repeated: 20.\n\taStringHolderView release\n\n\t\"Benchmark new testTextEditing\"! !\n\n!Benchmark methodsFor: 'macro operations'!\ntestTextFormatting\n\t| aString aView contents |\n\taString _ self stringForDisplay.\n\taView _ StringHolderView container: StringHolder new.\n\taView window: Display boundingBox viewport: (100@100 extent: 200@200).\n\tself test:\n\t\t\t[aView editString: (aString asText makeSelectorBoldIn: Benchmark) asParagraph]\n\t\tlabeled: 'format a bunch of text' repeated: 5.\n\taView release\n\n\t\"Benchmark new testTextFormatting\"! !\n\n!Benchmark methodsFor: 'testing'!\ntest: aBlock labeled: label repeated: nTimes \n\t\"This is the main message to a Benchmark. aBlock is repeated nTimes, and the\n\tresults are reported.\"\n\n\t| time |\n\ttime _ self time: aBlock repeated: nTimes.\n\tself\n\t\treport: label\n\t\ttimedAt: time\n\t\trepeated: nTimes! !\n\n!Benchmark methodsFor: 'testing' stamp: 'ssa 8/19/2008 21:56'!\ntestList: selectorList\n\t\"This message allows you to test a series of benchmarks and record all the results on\n\ta file or stream.\"\n\n\tfromList _ true.\n\tself setOutputParameters.\n\tselectorList do:\n\t\t[:selector | self perform: selector].\n\treporting ifTrue: [self closeOutput: reportStream].\n\tfromList _ false.\n\n\t\"Benchmark new testList: #(testLoadInstVar testLoadLiteralIndirect testLoadLiteralNRef testLoadQuickConstant testLoadTempNRef)\"! !\n\n!Benchmark methodsFor: 'testing' stamp: 'ssa 8/19/2008 21:56'!\ntestList: selectorList toFile: aFileStream\n\t\"This message allows you to test a series of benchmarks and record all the results on\n\ta file or stream.\"\n\n\tfromList _ true.\n\tself fileOutputParameters: aFileStream.\n\tselectorList do:\n\t\t[:selector | self perform: selector.\n\t\t verboseTranscript ifTrue:\n\t\t\t[]].\n\treporting ifTrue: [self closeOutput: reportStream].\n\tfromList _ false.\n\n\t\"Benchmark new testList: #(testLoadInstVar testLoadLiteralIndirect testLoadLiteralNRef testLoadQuickConstant testLoadTempNRef) toFile: (FileStream fileNamed: 'Smalltalk.timing')\"! !\n\n!Benchmark methodsFor: 'testing'!\ntime: aBlock repeated10K: tenKTimes \n\t| i emptyBlock emptyTime blockTime |\n\ttenKTimes > 10000 ifTrue: [^self error: 'one hundred million repetitions is my limit'].\n\temptyBlock _ [].\n\temptyTime _\n\t\t\tTime millisecondsToRun:\n\t\t\t\t\t[1 to: tenKTimes do: \n\t\t\t\t\t\t[:j | \n\t\t\t\t\t\ti _ 0.\n\t\t\t\t\t\t[(i _ i + 1) <= 10000]\n\t\t\t\t\t\t\twhileTrue: [emptyBlock value]]].\n\tblockTime _\n\t\t\tTime millisecondsToRun:\n\t\t\t\t\t[1 to: tenKTimes do: \n\t\t\t\t\t\t[:j | \n\t\t\t\t\t\ti _ 0.\n\t\t\t\t\t\t[(i _ i + 1) <= 10000]\n\t\t\t\t\t\t\twhileTrue: [aBlock value]]].\n\t^blockTime - emptyTime! !\n\n!Benchmark methodsFor: 'testing'!\ntime: aBlock repeated: nTimes\n\t\"Answer how many milliseconds it takes to repeat aBlock nTimes, corrected for the\n\ttime to repeat an empty block.\"\n\n\t| i emptyBlock emptyTime blockTime iBox |\n\tnTimes > 10000 ifTrue: [^self time: aBlock repeated10K: nTimes // 10000].\n\temptyBlock _ [].\n\temptyTime _ Time millisecondsToRun: \n\t\t\t\t\t\t\t[i _ 0.\n\t\t\t\t\t\t\t [(i _ i + 1) <= nTimes] whileTrue: [emptyBlock value]].\n\tblockTime _ Time millisecondsToRun: \n\t\t\t\t\t\t\t[i _ 0.\n\t\t\t\t\t\t\t [(i _ i + 1) <= nTimes] whileTrue: [aBlock value]].\n\t^blockTime - emptyTime! !\n\n!Benchmark methodsFor: 'output'!\nclearOutputs\n\t\"This allows you to get rid of your old accumulated output streams.\"\n\n\tOutputs _ nil\n\n\t\"Benchmark new clearOutputs\"! !\n\n!Benchmark methodsFor: 'output'!\ncloseOutput: aStream\n\tself streamsRatherThanFiles \n\t\tifTrue: [aStream reset]\n\t\tifFalse: [aStream close]! !\n\n!Benchmark methodsFor: 'output' stamp: 'ssa 8/19/2008 22:12'!\ncompareOldTimes: oldName toNewTimes: newName outputTo: outName\n\t\"Compare two sets of benchmark ouput reports.\"\n\n\t| oldDict newDict labels compareStream oldTime newTime |\n\toldDict _ Dictionary new. newDict _ Dictionary new. labels _ OrderedCollection new.\n\tself readOutput: (self outputNamed: oldName) intoDict: oldDict andCollection: nil.\n\tself readOutput: (self outputNamed: newName) intoDict: newDict andCollection: labels.\n\tcompareStream _ self makeOutputNamed: outName.\n\tlabels do:\n\t\t[:label | (oldDict includesKey: label) ifTrue:\n\t\t\t[compareStream nextPutAll: label; cr; tab;\n\t\t\t\tnextPutAll: 'old time: ', (oldTime _ oldDict at: label) printString; tab;\n\t\t\t\tnextPutAll: 'new time: ', (newTime _ newDict at: label) printString; tab.\n\t\t\t\toldTime = 0 ifTrue:[compareStream nextPutAll:'percent change: ERROR oldTime=0';cr;cr]\n\t\t\t\tifFalse:[compareStream \n\t\t\t\tnextPutAll: 'percent change: ', (newTime - oldTime * 100.0 / oldTime) printString; cr; cr]]].\n\tself closeOutput: compareStream\n\n\t\"Benchmark new\n\t\tcompareOldTimes: 'test1.timing'\n\t\ttoNewTimes: 'test2.timing'\n\t\toutputTo: 'compare1-2.timing'\"\n\n\t\"Benchmark new displayOutputNamed: 'compare1-2.timing'\"! !\n\n!Benchmark methodsFor: 'output'!\ndisplayOutputNamed: name\n\t\"Create a window on the display to view the contents of the named output.\n\tDoes not allow editing of the output file or stream.\"\n\n\t| output contents |\n\toutput _ self outputNamed: name.\n\tcontents _ self streamsRatherThanFiles\n\t\t\t\t\tifTrue: [output contents]\n\t\t\t\t\tifFalse: [output contentsOfEntireFile].\n\tStringHolderView\n\t\topen: (StringHolder new contents: contents)\n\t\tlabel: name! !\n\n!Benchmark methodsFor: 'output'!\nmakeOutputNamed: name\n\t\"Create a new output file or stream of the given name.\"\n\n\tself streamsRatherThanFiles\n\t\tifTrue: [Outputs == nil ifTrue: [Outputs _ Dictionary new].\n\t\t\t\tOutputs at: name put:\n\t\t\t\t\t(ReadWriteStream on: (String new: 1000))].\n\t^self outputNamed: name! !\n\n!Benchmark methodsFor: 'output' stamp: 'ssa 8/19/2008 22:06'!\noutputNamed: name\n\t\"Answer with the output file or stream of the given name.\"\n\n\tself streamsRatherThanFiles\n\t\tifTrue: [^Outputs at: name]\n\t\tifFalse: [^FileStream fileNamed: name]! !\n\n!Benchmark methodsFor: 'output'!\nreadOutput: aStream intoDict: aDict andCollection: aColl\n\t\"Parse the output file or stream, aStream, putting labels and times in aDict.\n\tIf aColl is non-nil (but rather an ordered collection), also add the labels to it\n\tin order.\"\n\n\t| leftBracket rightBracket tab space label value |\n\tleftBracket _ $[.\n\trightBracket _ $].\n\ttab _ $\t.\n\tspace _ $ .\n\taStream upTo: leftBracket.\n\t[aStream atEnd] whileFalse:\n\t\t[label _ aStream upTo: rightBracket.\n\t\t aColl notNil ifTrue: [aColl add: label].\n\t\t aStream next: 2; upTo: tab.\n\t\t value _ Number readFrom: (ReadStream on: (aStream upTo: space)).\n\t\t aDict at: label put: value.\n\t\t aStream upTo: leftBracket].\n\tself closeOutput: aStream! !\n\n!Benchmark methodsFor: 'output'!\nreport: label timedAt: time repeated: numberOfTimes\n\t\"Do all the reporting, both in the Transcript and on the output file or stream.\"\n\n\t| reportString |\n\treportString _ self reportStringFor: label\n\t\t\t\t\t\ttimedAt: time\n\t\t\t\t\t\trepeated: numberOfTimes.\n\tverboseTranscript\n\t\t\tifTrue: [Transcript show: reportString]\n\t\t\tifFalse: [Transcript show: '\n[', label, ']'].\n\treporting ifTrue:\n\t\t[reportStream nextPutAll: reportString.\n\t\t fromList ifFalse: [self closeOutput: reportStream]]! !\n\n!Benchmark methodsFor: 'output'!\nreportStringFor: label timedAt: time repeated: numberOfTimes\n\t\"Generate the parsible string to represent the measurement of a benchmark.\"\n\n\t| nTimes unitTime seconds aStream|\n\taStream _ WriteStream on: (String new: 200).\n\tnTimes _ numberOfTimes <= 1000\n\t\t\t\tifTrue: [numberOfTimes]\n\t\t\t\tifFalse: [numberOfTimes // 1000 * 1000].\n\tseconds _ time asFloat / 1000.\n\taStream cr; nextPutAll: 'Testing:  [' , label , ']'; cr.\n\taStream tab; print: nTimes; nextPutAll: ' repetition(s) in'; cr;\n\t\ttab; print: seconds; nextPutAll: ' seconds'; cr.\n\tnTimes ~= 1\n\t\tifTrue: \n\t\t\t[unitTime _ (time * 1000) asFloat / nTimes.\n\t\t\taStream tab; print: unitTime;\n\t\t\t\tnextPutAll: ' microseconds per repetition'; cr].\n\t^aStream contents! !\n\n!Benchmark methodsFor: 'output' stamp: 'ssa 8/19/2008 22:05'!\nstreamsRatherThanFiles\n\t\"Should the named outputs be (internal Smalltalk-80) streams rather than disk files?\n\tThey should if there is no file system.\n\tFeel free to change this method if you have a file system but want streams anyway.\"\n\n\t^false! !\n\n!Benchmark methodsFor: 'instance initialization'!\ndefaultOutputParameters\n\treporting _ false.\n\tverboseTranscript _ true.\n\tfromList _ false! !\n\n!Benchmark methodsFor: 'instance initialization'!\nfileOutputParameters: aFileStream\n\treporting _ true.\n\treportStream _ aFileStream.\n\tverboseTranscript _ false! !\n\n!Benchmark methodsFor: 'instance initialization' stamp: 'ssa 8/19/2008 22:24'!\nsetOutputParameters\n\t| answer |\n\tBinaryChoice \n\t\tmessage: 'Would you like the transcript to just show labels, rather than full reports?'\n\t\tdisplayAt: Sensor mousePoint\n\t\tcentered: true\n\t\tifTrue: [verboseTranscript _ false]\n\t\tifFalse: [verboseTranscript _ true].\n\tBinaryChoice\n\t\tmessage: 'Should the full reports to be output (saved on a file or stream)?'\n\t\tdisplayAt: Sensor mousePoint\n\t\tcentered: true\n\t\tifTrue: [reporting _ true]\n\t\tifFalse: [reporting _ false].\n\treporting ifTrue:\n\t\t[answer := FillInTheBlank\n\t\t\trequest: 'Please supply desired output name' \n\t\t\tinitialAnswer: '.timing'\n\t\t\tcenterAt: Sensor mousePoint.\n\t\t\tanswer isEmpty ifFalse:[reportStream _ self makeOutputNamed: answer]\n\t\t\t\tifTrue:[reporting := false]]! !\n\n!Benchmark methodsFor: 'private'!\nfavoriteStringHolderView\n\t| aStringHolderView message |\n\tmessage _ self longishString.\n\taStringHolderView _ StringHolderView container: (StringHolder new contents: message).\n\taStringHolderView window: (0@0 extent: 300@200).\n\taStringHolderView translateBy: 100@250.\n\taStringHolderView display.\n\t^aStringHolderView! !\n\n!Benchmark methodsFor: 'private'!\nlongishString\n\t^ 'Now is the time for all good people to come to the aid of the cause of world peace.  It is just fine, even desirable, to love your country, if that means wanting it to play a beneficial role in the course of world events and be the best possible example of a good society.  But if it means wanting dominion over the rest of the world, it is not love but defensiveness or self-glorification, and will lead only to oblivion.'! !\n\n!Benchmark methodsFor: 'private'!\nrecur: exp \n\t\"Invokes a recursion involving ((2 raisedTo: exp+1) - 1) activations and \n\treturns.\"\n\n\texp = 0 ifTrue: [^self].\n\tself recur: exp - 1.\n\t^self recur: exp - 1! !\n\n!Benchmark methodsFor: 'private' stamp: 'ssa 8/19/2008 21:11'!\nsampleBitBLT\n\t^BitBlt \n\t\tdestForm: Display\n\t\tsourceForm: nil\n\t\thalftoneForm: Color black\n\t\tcombinationRule: Form reverse\n\t\tdestOrigin: 0@0\n\t\tsourceOrigin: 0@0\n\t\textent: 400@400\n\t\tclipRect: Display boundingBox! !\n\n!Benchmark methodsFor: 'private'!\nstringForDisplay\n\t^'testTextDisplay\n\t| clipRect para range scanner |\n\tclipRect _ Display boundingBox.\n\tpara _ Paragraph withText: self textForDisplay.\n\trange _ 1 to: para numberOfLines.\n\tscanner _ DisplayScanner new.\n\tself test: [scanner\n\t\t\t\tdisplayLines: range\n\t\t\t\tin: para\n\t\t\t\tclippedBy: clipRect]\n\t\tlabeled: ''displaying text'' repeated: 10\n\n\t\"Benchmark new testTextDisplay\"'! !\n\n!Benchmark methodsFor: 'private'!\ntextForDisplay\n\t^self stringForDisplay asText! !\n\n!Benchmark commentStamp: 'ssa 8/19/2008 22:14' prior: 0!\nBenchmark testStandardToFile: (FileStream fileNamed: 'test1.timing').\nBenchmark testStandardToFile: (FileStream fileNamed: 'test2.timing').\n\nBenchmark new\n\t\tcompareOldTimes: 'test1.timing'\n\t\ttoNewTimes: 'test2.timing'\n\t\toutputTo: 'compare1-2.timing'.\n\nBenchmark new displayOutputNamed: 'compare1-2.timing'\n\n\n--------------original comment follows-------------------------------\n\nClass Benchmark contains facilities for timing the performance of your system and reporting the results.\n\nThere are built-in methods for timing certain activities that occur frequently in using Smalltalk-80.  There are also facilities for timing the execution of most byte codes.\n\nIt is intended that comparison of timing information between implementations and over time will allow implementors to discover where their systems could stand improvement and to gauge the value of intended performance enhancements.\n\nThe main interface to these facilities is through sending the messsage\n\tBenchmark new test: aBlock labeled: aLabel repeated: howManyTimes.\nThis will cause howManyTimes executions of aBlock and report the results, using aLabel for ease of identification.\n\nThe results can be reported in several different ways.  The default is to print a fairly verbose report in the Transcript.  But the reporting mode can be altered by sending the Benchmark which is going to perform a given test the message setOutputParameters.  This gives you the option of directing the report to a file or an internal stream and also of shortening the feedback in the Transcript.  The system automatically invites you to respecify the output parameters (e.g. naming a new output report file) whenever you test more than one thing at a time, using the message testList: (as in testStandardTests below).\n\nTry an example.  To time your system's performance of simple addition, say\n\tBenchmark new test3plus4\nor to time pushing an instance variable onto the stack, say\n\tBenchmark new testLoadInstVar.\n\nIf you had wished to print the results on a file or internal stream, you could have said\n\tBenchmark new setOutputParameters testLoadInstVar.\n\nIf you look at the code for these methods (e.g. testLoadInstVar), you will notice that it does a few things that you didn't want to time, such as sending the message ==, or popping things off the stack.  This is to make the compiler happy or to keep the stack from overflowing.  So you may want to subtract this stuff out.  (Use systems of equations.  Be clever!!)\n\nThe message category \"macro operations\" contains methods for timing more involved activities such as compiling, decompiling, editing text, formatting text, etc.\n\nThere is a message to class Benchmark which will invoke all the built-in benchmarks sequentially.  Say\n\tBenchmark testStandardTests.\n\nThere are also facilities for examining or automatically comparing the output files or streams generated by testing a bunch of benchmarks sequentially.  See the \"output\" category.  Be sure to read the comment to the streamsRatherThanFiles code.\n\nHave fun and share your results with a friend.\n!\n!Benchmark class methodsFor: 'standard tests' stamp: 'ssa 8/19/2008 21:36'!\nsetStandardTests\n\t\"These are all the built-in benchmarks.\n\tFeel free to change if you add more or think some of these are useless.\n\tTo just execute a few, use testList: directly.\"\n\n\tStandardTests _\n\t\t\t#(testLoadInstVar testLoadTempNRef testLoadTempRef\n\t\t\ttestLoadQuickConstant testLoadLiteralNRef testLoadLiteralIndirect\n\t\t\ttestPopStoreInstVar testPopStoreTemp\n\t\t\ttest3plus4 test3lessThan4 test3times4 test3div4 test16bitArith testLargeIntArith\n\t\t\ttestActivationReturn testShortBranch testWhileLoop\n\t\t\ttestArrayAt testArrayAtPut testStringAt testStringAtPut testSize\n\t\t\ttestPointCreation testStreamNext testStreamNextPut testEQ testClass\n\t\t\ttestBlockCopy testValue testCreation testPointX \n\t\t\ttestLoadThisContext\n\t\t\ttestBasicAt testBasicAtPut testPerform testStringReplace\n\t\t\ttestAsFloat testFloatingPointAddition testBitBLT testTextScanning\n\t\t\ttestClassOrganizer testPrintDefinition testPrintHierarchy\n \t\t\ttestAllCallsOn testAllImplementors  \n\t\t\ttestCompiler testDecompiler\n\t\t\t\n\t\t\ttestTextDisplay testTextFormatting testTextEditing )! !\n\n!Benchmark class methodsFor: 'standard tests'!\ntestStandardTests\n\t\"This message allows you to test the default series of benchmarks and record all the\n\tresults according to how you answer the interactive prompts.\"\n\n\tself setStandardTests.\n\tself new testList: StandardTests\n\n\t\"Benchmark testStandardTests\"! !\n\n!Benchmark class methodsFor: 'standard tests'!\ntestStandardToFile: aFileStream\n\t\"This message allows you to test the default series of benchmarks and record all the\n\tresults on the specified file or stream.\"\n\n\tself setStandardTests.\n\tself new testList: StandardTests toFile: aFileStream\n\n\t\"Benchmark testStandardToFile: (FileStream fileNamed: 'Smalltalk.timing')\"! !\n\n!Benchmark class methodsFor: 'instance creation'!\nnew\n\t^super new defaultOutputParameters\n\n\t\"Benchmark new inspect\"! !\n\n!Benchmark class methodsFor: 'compiler benchmark support' stamp: 'dmu 1/1/2009 04:40'!\ncompileBenchmark: text classified: cat notifying: requestor\n\t| stamp |\n\tstamp _ self acceptsLoggingOfCompilation ifTrue: [Utilities changeStamp] ifFalse: [nil].\n\t^ self compileBenchmark: text classified: cat\n\t\twithStamp: stamp notifying: requestor\n\n ! !\n\n!Benchmark class methodsFor: 'compiler benchmark support' stamp: 'dmu 1/1/2009 04:39'!\ncompileBenchmark: text classified: cat withStamp: changeStamp notifying: requestor\n\t^ self compile: text classified: cat withStamp: changeStamp notifying: requestor logSource: false! !\n\n!Benchmark class methodsFor: 'compiler benchmark support' stamp: 'dmu 1/1/2009 04:41'!\ncompileBenchmark: code notifying: requestor \n\t\"Refer to the comment in Behavior|compile:notifying:.\" \n\n\t^self compileBenchmark: code\n\t\t classified: ClassOrganizer default\n\t\t notifying: requestor! !\n\n!BenchmarkGameSuite methodsFor: 'benchmarking' stamp: 'sm 5/31/2011 15:27'!\nbenchBinaryTrees\n\t| bench problemSize |\n\tbench := BGBinaryTrees new.\n\tproblemSize := self problemSize ifNotNil: [ self problemSize asInteger ]\n\t\t\t\t\t\t\t  ifNil: [ BGBinaryTrees defaultProblemSize ].\n\t^ bench binarytrees: problemSize to: (TextStream with: String new).! !\n\n!BenchmarkGameSuite methodsFor: 'benchmarking' stamp: 'sm 6/1/2011 14:01'!\nbenchChameleons\n\t| result problemSize |\n\tproblemSize := self problemSize ifNotNil: [ self problemSize asInteger ]\n\t\t\t\t\t\t\t\t  ifNil: [ BGChameleons defaultProblemSize ].\n\tresult := BGChameleons chameneos: problemSize.\n\t\n\t\"Result should be 2*numberOfProcesses (as far as I understand the benchmark)\"\n\tself flag: 'TODO adapt once verification is supported'.\n\tresult = (2 * problemSize) ifFalse: [\n\t\tError signal: (BGChameleons name, ' benchmark failed. Input: ', \n\t\t\t\t\t\t\t\t problemSize asString, ' Output: ', result asString).\n\t].! !\n\n!BenchmarkGameSuite methodsFor: 'benchmarking' stamp: 'sm 6/1/2011 14:02'!\nbenchChameneosRedux\n\t| result report problemSize |\n\tproblemSize := self problemSize ifNotNil: [ self problemSize asInteger ]\n\t\t\t\t\t\t\t\t  ifNil: [ BGChameneosRedux defaultProblemSize ].\n\treport := TextStream with: String new.\n\tresult := BGMall runBenchMark: problemSize on: report.\n\t\n\t\"Result should be 2*problemSize\"\n\tself flag: 'TODO: adapt once verification is supported'.\n\tresult = (2 * problemSize) ifFalse: [\n\t\tError signal: self class name, ' benchmark failed. Input: ',\n\t\t\t\t\t\t\t\t runner processes asString, ' Output: ', result asString  ].! !\n\n!BenchmarkGameSuite methodsFor: 'benchmarking' stamp: 'sm 6/1/2011 14:02'!\nbenchFannkuchRedux\n   | f problemSize |\n\tproblemSize := self problemSize ifNotNil: [ self problemSize asInteger ]\n\t\t\t\t\t\t\t\t  ifNil: [ BGFannkuchRedux defaultProblemSize ].\n   f := BGFannkuchRedux fannkuchRedux: problemSize to: (TextStream with: String new).\n   \n\" the output should only be done by some reporter\"\n[ScriptConsole print: 'Pfannkuchen(', problemSize asString , ') = ', f asString.].\n   ^f! !\n\n!BenchmarkGameSuite methodsFor: 'benchmarking' stamp: 'sm 5/31/2011 15:28'!\nbenchFasta\n\t| out problemSize |\n\tout := TextStream with: String new.\n\tproblemSize := self problemSize ifNotNil: [ self problemSize asInteger ]\n\t\t\t\t\t\t\t\t  ifNil: [ BGFasta defaultProblemSize ].  \n\tBGFasta fasta: problemSize to: out.! !\n\n!BenchmarkGameSuite methodsFor: 'benchmarking' stamp: 'sm 5/31/2011 15:28'!\nbenchNBody\n\t| problemSize |\n\tproblemSize := self problemSize ifNotNil: [ self problemSize asInteger ]\n\t\t\t\t\t\t\t\t  ifNil: [ BGNBody defaultProblemSize ].\n\tBGNBody nbody: problemSize.! !\n\n!BenchmarkGameSuite methodsFor: 'license' stamp: 'StefanMarr 5/15/2011 12:31'!\nlicense\n\t^\n'Revised BSD license\n\nThis is a specific instance of the Open Source Initiative (OSI) BSD license\ntemplate http://www.opensource.org/licenses/bsd-license.php\n\n\nCopyright 2008-2010 Isaac Gouy\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n   Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n\n   Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n\n   Neither the name of \"The Computer Language Benchmarks Game\" nor the name of\n   \"The Computer Language Shootout Benchmarks\" nor the name \"nanobench\" nor\n   the name \"bencher\" nor the names of its contributors may be used to endorse\n   or promote products derived from this software without specific prior\n   written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.'! !\n\n!BinaryChoice class methodsFor: 'instance creation' stamp: 'ssa 8/19/2008 21:47'!\nmessage: aString displayAt: aPoint centered: aBoolean ifTrue: trueBlock ifFalse: falseBlock\n\t\"Mimic the old BinaryChoice protocol.  Canceling the menu by clicking outside executes false block\"\n\t| answer |\n\tanswer := PopUpMenu withCaption: aString chooseFrom: #( 'Yes' 'No').\n\tanswer = 1 ifTrue: trueBlock ifFalse: falseBlock! !\n\n!BitBlt methodsFor: 'accessing' stamp: 'dmu 4/4/2009 00:24'!\ncopyBitsOnMain\n\t\"Primitive. Perform the movement of bits from the source form to the \n\tdestination form. Fail if any variables are not of the right type (Integer, \n\tFloat, or Form) or if the combination rule is not implemented. \n\tIn addition to the original 16 combination rules, this BitBlt supports\n\t16\tfail (to simulate paint)\n\t17\tfail (to simulate mask)\n\t18\tsourceWord + destinationWord\n\t19\tsourceWord - destinationWord\n\t20\trgbAdd: sourceWord with: destinationWord\n\t21\trgbSub: sourceWord with: destinationWord\n\t22\trgbDiff: sourceWord with: destinationWord\n\t23\ttallyIntoMap: destinationWord\n\t24\talphaBlend: sourceWord with: destinationWord\n\t25\tpixPaint: sourceWord with: destinationWord\n\t26\tpixMask: sourceWord with: destinationWord\n\t27\trgbMax: sourceWord with: destinationWord\n\t28\trgbMin: sourceWord with: destinationWord\n\t29\trgbMin: sourceWord bitInvert32 with: destinationWord\n\"\n\t<primitive: 'primitiveCopyBits' module: 'BitBltPlugin'>\n\n\t\"Check for compressed source, destination or halftone forms\"\n\t(combinationRule >= 30 and: [combinationRule <= 31]) ifTrue:\n\t\t[\"No alpha specified -- re-run with alpha = 1.0\"\n\t\t^ self copyBitsTranslucent: 255].\n\t((sourceForm isForm) and: [sourceForm unhibernate])\n\t\tifTrue: [^ self copyBits].\n\t((destForm isForm) and: [destForm unhibernate])\n\t\tifTrue: [^ self copyBits].\n\t((halftoneForm isForm) and: [halftoneForm unhibernate])\n\t\tifTrue: [^ self copyBits].\n\n\t\"Check for unimplmented rules\"\n\tcombinationRule = Form oldPaint ifTrue: [^ self paintBits].\n\tcombinationRule = Form oldErase1bitShape ifTrue: [^ self eraseBits].\n\n\t\"Check if BitBlt doesn't support full color maps\"\n\t(colorMap notNil and:[colorMap isColormap]) ifTrue:[\n\t\tcolorMap _ colorMap colors.\n\t\t^self copyBits].\n\t\"Check if clipping gots us way out of range\"\n\tself clipRange ifTrue:[^self copyBits].\n\n\tself error: 'Bad BitBlt arg (Fraction?); proceed to convert.'.\n\t\"Convert all numeric parameters to integers and try again.\"\n\tdestX _ destX asInteger.\n\tdestY _ destY asInteger.\n\twidth _ width asInteger.\n\theight _ height asInteger.\n\tsourceX _ sourceX asInteger.\n\tsourceY _ sourceY asInteger.\n\tclipX _ clipX asInteger.\n\tclipY _ clipY asInteger.\n\tclipWidth _ clipWidth asInteger.\n\tclipHeight _ clipHeight asInteger.\n\t^ self copyBitsAgain! !\n\n!BitBlt methodsFor: 'copying' stamp: 'ssa 4/7/2009 13:44'!\nOLDcopyBits\n\t\"Primitive. Perform the movement of bits from the source form to the \n\tdestination form. Fail if any variables are not of the right type (Integer, \n\tFloat, or Form) or if the combination rule is not implemented. \n\tIn addition to the original 16 combination rules, this BitBlt supports\n\t16\tfail (to simulate paint)\n\t17\tfail (to simulate mask)\n\t18\tsourceWord + destinationWord\n\t19\tsourceWord - destinationWord\n\t20\trgbAdd: sourceWord with: destinationWord\n\t21\trgbSub: sourceWord with: destinationWord\n\t22\trgbDiff: sourceWord with: destinationWord\n\t23\ttallyIntoMap: destinationWord\n\t24\talphaBlend: sourceWord with: destinationWord\n\t25\tpixPaint: sourceWord with: destinationWord\n\t26\tpixMask: sourceWord with: destinationWord\n\t27\trgbMax: sourceWord with: destinationWord\n\t28\trgbMin: sourceWord with: destinationWord\n\t29\trgbMin: sourceWord bitInvert32 with: destinationWord\n\"\n\t<primitive: 'primitiveCopyBits' module: 'BitBltPlugin'>\n\n\t\"Check for compressed source, destination or halftone forms\"\n\t(combinationRule >= 30 and: [combinationRule <= 31]) ifTrue:\n\t\t[\"No alpha specified -- re-run with alpha = 1.0\"\n\t\t^ self copyBitsTranslucent: 255].\n\t((sourceForm isForm) and: [sourceForm unhibernate])\n\t\tifTrue: [^ self copyBits].\n\t((destForm isForm) and: [destForm unhibernate])\n\t\tifTrue: [^ self copyBits].\n\t((halftoneForm isForm) and: [halftoneForm unhibernate])\n\t\tifTrue: [^ self copyBits].\n\n\t\"Check for unimplmented rules\"\n\tcombinationRule = Form oldPaint ifTrue: [^ self paintBits].\n\tcombinationRule = Form oldErase1bitShape ifTrue: [^ self eraseBits].\n\n\t\"Check if BitBlt doesn't support full color maps\"\n\t(colorMap notNil and:[colorMap isColormap]) ifTrue:[\n\t\tcolorMap _ colorMap colors.\n\t\t^self copyBits].\n\t\"Check if clipping gots us way out of range\"\n\tself clipRange ifTrue:[^self copyBits].\n\n\tself error: 'Bad BitBlt arg (Fraction?); proceed to convert.'.\n\t\"Convert all numeric parameters to integers and try again.\"\n\tdestX _ destX asInteger.\n\tdestY _ destY asInteger.\n\twidth _ width asInteger.\n\theight _ height asInteger.\n\tsourceX _ sourceX asInteger.\n\tsourceY _ sourceY asInteger.\n\tclipX _ clipX asInteger.\n\tclipY _ clipY asInteger.\n\tclipWidth _ clipWidth asInteger.\n\tclipHeight _ clipHeight asInteger.\n\t^ self copyBitsAgain! !\n\n!BitBlt methodsFor: 'copying' stamp: 'ads 1/24/2011 13:00'!\ncopyBits\n\tRVMPrimitivesNeededForBootstrapping isRVM ifFalse:[^self OLDcopyBits].\n \tdestForm == Display  ifTrue: [self copyBitsOnMain] ifFalse: [self copyBitsLocally]! !\n\n!BitBlt methodsFor: 'copying' stamp: 'dmu 4/4/2009 00:20'!\ncopyBitsLocally\n\t\"Primitive. Perform the movement of bits from the source form to the \n\tdestination form. Fail if any variables are not of the right type (Integer, \n\tFloat, or Form) or if the combination rule is not implemented. \n\tIn addition to the original 16 combination rules, this BitBlt supports\n\t16\tfail (to simulate paint)\n\t17\tfail (to simulate mask)\n\t18\tsourceWord + destinationWord\n\t19\tsourceWord - destinationWord\n\t20\trgbAdd: sourceWord with: destinationWord\n\t21\trgbSub: sourceWord with: destinationWord\n\t22\trgbDiff: sourceWord with: destinationWord\n\t23\ttallyIntoMap: destinationWord\n\t24\talphaBlend: sourceWord with: destinationWord\n\t25\tpixPaint: sourceWord with: destinationWord\n\t26\tpixMask: sourceWord with: destinationWord\n\t27\trgbMax: sourceWord with: destinationWord\n\t28\trgbMin: sourceWord with: destinationWord\n\t29\trgbMin: sourceWord bitInvert32 with: destinationWord\n\"\n\t<primitive: 'primitiveCopyBitsLocally'>\n\n\t\"Check for compressed source, destination or halftone forms\"\n\t(combinationRule >= 30 and: [combinationRule <= 31]) ifTrue:\n\t\t[\"No alpha specified -- re-run with alpha = 1.0\"\n\t\t^ self copyBitsTranslucent: 255].\n\t((sourceForm isForm) and: [sourceForm unhibernate])\n\t\tifTrue: [^ self copyBits].\n\t((destForm isForm) and: [destForm unhibernate])\n\t\tifTrue: [^ self copyBits].\n\t((halftoneForm isForm) and: [halftoneForm unhibernate])\n\t\tifTrue: [^ self copyBits].\n\n\t\"Check for unimplmented rules\"\n\tcombinationRule = Form oldPaint ifTrue: [^ self paintBits].\n\tcombinationRule = Form oldErase1bitShape ifTrue: [^ self eraseBits].\n\n\t\"Check if BitBlt doesn't support full color maps\"\n\t(colorMap notNil and:[colorMap isColormap]) ifTrue:[\n\t\tcolorMap _ colorMap colors.\n\t\t^self copyBits].\n\t\"Check if clipping gots us way out of range\"\n\tself clipRange ifTrue:[^self copyBits].\n\n\tself error: 'Bad BitBlt arg (Fraction?); proceed to convert.'.\n\t\"Convert all numeric parameters to integers and try again.\"\n\tdestX _ destX asInteger.\n\tdestY _ destY asInteger.\n\twidth _ width asInteger.\n\theight _ height asInteger.\n\tsourceX _ sourceX asInteger.\n\tsourceY _ sourceY asInteger.\n\tclipX _ clipX asInteger.\n\tclipY _ clipY asInteger.\n\tclipWidth _ clipWidth asInteger.\n\tclipHeight _ clipHeight asInteger.\n\t^ self copyBitsAgain! !\n\n!BitBlt methodsFor: 'line drawing' stamp: 'ads 1/24/2011 13:00'!\ndrawFrom: startPoint to: stopPoint withFirstPoint: drawFirstPoint\n\t\"Draw a line whose end points are startPoint and stopPoint.\n\tThe line is formed by repeatedly calling copyBits at every\n\tpoint along the line.  If drawFirstPoint is false, then omit\n\tthe first point so as not to overstrike at line junctions.\"\n\t| offset point1 point2 forwards |\n\t\"Always draw down, or at least left-to-right\"\n\tforwards _ (startPoint y = stopPoint y and: [startPoint x < stopPoint x])\n\t\t\t\tor: [startPoint y < stopPoint y].\n\tforwards\n\t\tifTrue: [point1 _ startPoint. point2 _ stopPoint]\n\t\tifFalse: [point1 _ stopPoint. point2 _ startPoint].\n\tsourceForm == nil ifTrue:\n\t\t[destX _ point1 x.\n\t\tdestY _ point1 y]\n\t\tifFalse:\n\t\t[width _ sourceForm width.\n\t\theight _ sourceForm height.\n\t\toffset _ sourceForm offset.\n\t\tdestX _ (point1 x + offset x) rounded.\n\t\tdestY _ (point1 y + offset y) rounded].\n\n\t\"Note that if not forwards, then the first point is the last and vice versa.\n\tWe agree to always paint stopPoint, and to optionally paint startPoint.\"\n\t(drawFirstPoint or: [forwards == false  \"ie this is stopPoint\"])\n\t\tifTrue: [self copyBits].\n\t\t(destForm == Display or:[RVMPrimitivesNeededForBootstrapping isRVM not]) ifTrue: [\n\tself drawLoopX: (point2 x - point1 x) rounded \n\t\t\t\t  Y: (point2 y - point1 y) rounded]\n\t\t\tifFalse: [self drawLoopLocallyX: (point2 x - point1 x) rounded \n\t\t\t\t  Y: (point2 y - point1 y) rounded].\n\t(drawFirstPoint or: [forwards  \"ie this is stopPoint\"])\n\t\tifTrue: [self copyBits].\n! !\n\n!BitBlt methodsFor: 'line drawing' stamp: 'dmu 4/3/2009 23:01'!\ndrawLoopLocallyX: xDelta Y: yDelta \n\t\"Primitive. Implements the Bresenham plotting algorithm (IBM Systems\n\tJournal, Vol. 4 No. 1, 1965). It chooses a principal direction, and\n\tmaintains a potential, P. When P's sign changes, it is time to move in\n\tthe minor direction as well. This particular version does not write the\n\tfirst and last points, so that these can be called for as needed in client code.\n\tOptional. See Object documentation whatIsAPrimitive.\"\n\t| |\n\t<primitive: 'primitiveDrawLoopLocally'>\nself primitiveFailed! !\n\n!BitBlt methodsFor: 'line drawing' stamp: 'ads 1/24/2011 13:01'!\ndrawLoopX: xDelta Y: yDelta \n\t\"Primitive. Implements the Bresenham plotting algorithm (IBM Systems\n\tJournal, Vol. 4 No. 1, 1965). It chooses a principal direction, and\n\tmaintains a potential, P. When P's sign changes, it is time to move in\n\tthe minor direction as well. This particular version does not write the\n\tfirst and last points, so that these can be called for as needed in client code.\n\tOptional. See Object documentation whatIsAPrimitive.\"\n\t\n\t\t^(destForm == Display  or:[RVMPrimitivesNeededForBootstrapping isRVM not])\n\t\t\tifTrue:[self globalDrawLoopX:xDelta Y: yDelta ]\n\t\t\tifFalse:[self localDrawLoopX:xDelta Y: yDelta ]! !\n\n!BitBlt methodsFor: 'line drawing' stamp: 'ssa 4/3/2009 22:36'!\nglobalDrawLoopX: xDelta Y: yDelta \n\t\"Primitive. Implements the Bresenham plotting algorithm (IBM Systems\n\tJournal, Vol. 4 No. 1, 1965). It chooses a principal direction, and\n\tmaintains a potential, P. When P's sign changes, it is time to move in\n\tthe minor direction as well. This particular version does not write the\n\tfirst and last points, so that these can be called for as needed in client code.\n\tOptional. See Object documentation whatIsAPrimitive.\"\n\t| dx dy px py P |\n\t<primitive: 'primitiveDrawLoop' module: 'BitBltPlugin'>\n\tdx _ xDelta sign.\n\tdy _ yDelta sign.\n\tpx _ yDelta abs.\n\tpy _ xDelta abs.\n\t\"self copyBits.\"\n\tpy > px\n\t\tifTrue: \n\t\t\t[\"more horizontal\"\n\t\t\tP _ py // 2.\n\t\t\t1 to: py do: \n\t\t\t\t[:i |\n\t\t\t\tdestX _ destX + dx.\n\t\t\t\t(P _ P - px) < 0 ifTrue: \n\t\t\t\t\t\t[destY _ destY + dy.\n\t\t\t\t\t\tP _ P + py].\n\t\t\t\ti < py ifTrue: [self copyBits]]]\n\t\tifFalse: \n\t\t\t[\"more vertical\"\n\t\t\tP _ px // 2.\n\t\t\t1 to: px do:\n\t\t\t\t[:i |\n\t\t\t\tdestY _ destY + dy.\n\t\t\t\t(P _ P - py) < 0 ifTrue: \n\t\t\t\t\t\t[destX _ destX + dx.\n\t\t\t\t\t\tP _ P + px].\n\t\t\t\ti < px ifTrue: [self copyBits]]]! !\n\n!BitBlt methodsFor: 'line drawing' stamp: 'ssa 4/3/2009 22:52'!\nlocalDrawLoopX: xDelta Y: yDelta \n\t\"Primitive\"\n\t<primitive: 'primitiveDrawLoopLocally'>\n\t^self primitiveFailed! !\n\n!BitBlt class methodsFor: 'examples' stamp: 'di 12/1/97 12:08'!\nalphaBlendDemo\n\t\"To run this demo, use...\n\t\tDisplay restoreAfter: [BitBlt alphaBlendDemo]\t\n\tDisplays 10 alphas, then lets you paint.  Option-Click to stop painting.\"\n\n\t\"This code exhibits alpha blending in any display depth by performing\n\tthe blend in an off-screen buffer with 32-bit pixels, and then copying\n\tthe result back onto the screen with an appropriate color map. - tk 3/10/97\"\n\t\n\t\"This version uses a sliding buffer for painting that keeps pixels in 32 bits\n\tas long as they are in the buffer, so as not to lose info by converting down\n\tto display resolution and back up to 32 bits at each operation. - di 3/15/97\"\n\n\t| brush buff dispToBuff buffToDisplay mapDto32 map32toD prevP p brushToBuff theta buffRect buffSize buffToBuff brushRect delta newBuffRect updateRect |  \n\n\t\"compute color maps if needed\"\n\tDisplay depth <= 8 ifTrue: [\n\t\tmapDto32 _ Color cachedColormapFrom: Display depth to: 32.\n\t\tmap32toD _ Color cachedColormapFrom: 32 to: Display depth].\n\n\t\"display 10 different alphas, across top of screen\"\n\tbuff _ Form extent: 500@50 depth: 32.\n\tdispToBuff _ BitBlt toForm: buff.\n\tdispToBuff colorMap: mapDto32.\n\tdispToBuff copyFrom: (50@10 extent: 500@50) in: Display to: 0@0.\n\t1 to: 10 do: [:i | dispToBuff fill: (50*(i-1)@0 extent: 50@50)\n\t\t\t\t\t\tfillColor: (Color red alpha: i/10)\n\t\t\t\t\t\trule: Form blend].\n\tbuffToDisplay _ BitBlt toForm: Display.\n\tbuffToDisplay colorMap: map32toD.\n\tbuffToDisplay copyFrom: buff boundingBox in: buff to: 50@10.\n\n\t\"Create a brush with radially varying alpha\"\n\tbrush _ Form extent: 30@30 depth: 32.\n\t1 to: 5 do: \n\t\t[:i | brush fillShape: (Form dotOfSize: brush width*(6-i)//5)\n\t\t\t\tfillColor: (Color red alpha: 0.02 * i - 0.01)\n\t\t\t\tat: brush extent // 2].\n\n\t\"Now paint with the brush using alpha blending.\"\n\tbuffSize _ 100.\n\tbuff _ Form extent: brush extent + buffSize depth: 32.  \"Travelling 32-bit buffer\"\n\tdispToBuff _ BitBlt toForm: buff.  \"This is from Display to buff\"\n\tdispToBuff colorMap: mapDto32.\n\tbrushToBuff _ BitBlt toForm: buff.  \"This is from brush to buff\"\n\tbrushToBuff sourceForm: brush; sourceOrigin: 0@0.\n\tbrushToBuff combinationRule: Form blend.\n\tbuffToBuff _ BitBlt toForm: buff.  \"This is for slewing the buffer\"\n\n\t[Sensor yellowButtonPressed] whileFalse:\n\t\t[prevP _ nil.\n\t\tbuffRect _ Sensor cursorPoint - (buffSize // 2) extent: buff extent.\n\t\tdispToBuff copyFrom: buffRect in: Display to: 0@0.\n\t\t[Sensor redButtonPressed] whileTrue:\n\t\t\t[\"Here is the painting loop\"\n\t\t\tp _ Sensor cursorPoint - (brush extent // 2).\n\t\t\t(prevP == nil or: [prevP ~= p]) ifTrue:\n\t\t\t\t[prevP == nil ifTrue: [prevP _ p].\n\t\t\t\t(p dist: prevP) > buffSize ifTrue:\n\t\t\t\t\t[\"Stroke too long to fit in buffer -- clip to buffer,\n\t\t\t\t\t\tand next time through will do more of it\"\n\t\t\t\t\ttheta _ (p-prevP) theta.\n\t\t\t\t\tp _ ((theta cos@theta sin) * buffSize asFloat + prevP) truncated].\n\t\t\t\tbrushRect _ p extent: brush extent.\n\t\t\t\t(buffRect containsRect: brushRect) ifFalse:\n\t\t\t\t\t[\"Brush is out of buffer region.  Scroll the buffer,\n\t\t\t\t\t\tand fill vacated regions from the display\"\n\t\t\t\t\tdelta _ brushRect amountToTranslateWithin: buffRect.\n\t\t\t\t\tbuffToBuff copyFrom: buff boundingBox in: buff to: delta.\n\t\t\t\t\tnewBuffRect _ buffRect translateBy: delta negated.\n\t\t\t\t\t(newBuffRect areasOutside: buffRect) do:\n\t\t\t\t\t\t[:r | dispToBuff copyFrom: r in: Display to: r origin - newBuffRect origin].\n\t\t\t\t\tbuffRect _ newBuffRect].\n\n\t\t\t\t\"Interpolate from prevP to p...\"\n\t\t\t\tbrushToBuff drawFrom: prevP - buffRect origin\n\t\t\t\t\t\t\t\t\tto: p - buffRect origin\n\t\t\t\t\t\t\t\t\twithFirstPoint: false.\n\n\t\t\t\t\"Update (only) the altered pixels of the destination\"\n\t\t\t\tupdateRect _ (p min: prevP) corner: (p max: prevP) + brush extent.\n\t\t\t\tbuffToDisplay copy: updateRect from: updateRect origin - buffRect origin in: buff.\n\t\t\t\tprevP _ p]]]! !\n\n!BitBlt class methodsFor: 'examples' stamp: 'di 12/1/97 12:09'!\nantiAliasDemo \n\t\"To run this demo, use...\n\t\tDisplay restoreAfter: [BitBlt antiAliasDemo]\n\tGoes immediately into on-screen paint mode.  Option-Click to stop painting.\"\n\n\t\"This code exhibits alpha blending in any display depth by performing\n\tthe blend in an off-screen buffer with 32-bit pixels, and then copying\n\tthe result back onto the screen with an appropriate color map. - tk 3/10/97\"\n\t\n\t\"This version uses a sliding buffer for painting that keeps pixels in 32 bits\n\tas long as they are in the buffer, so as not to lose info by converting down\n\tto display resolution and back up to 32 bits at each operation. - di 3/15/97\"\n\t\n\t\"This version also uses WarpBlt to paint into twice as large a buffer,\n\tand then use smoothing when reducing back down to the display.\n\tIn fact this same routine will now work for 3x3 soothing as well.\n\tRemove the statements 'buff displayAt: 0@0' to hide the buffer. - di 3/19/97\"\n\n\t| brush buff dispToBuff buffToDisplay mapDto32 map32toD prevP p brushToBuff theta buffRect buffSize buffToBuff brushRect delta newBuffRect updateRect scale p0 |  \n\t\"compute color maps if needed\"\n\tDisplay depth <= 8 ifTrue: [\n\t\tmapDto32 _ Color cachedColormapFrom: Display depth to: 32.\n\t\tmap32toD _ Color cachedColormapFrom: 32 to: Display depth].\n\n\t\"Create a brush with radially varying alpha\"\n\tbrush _ Form extent: 3@3 depth: 32.\n\tbrush fill: brush boundingBox fillColor: (Color red alpha: 0.05).\n\tbrush fill: (1@1 extent: 1@1) fillColor: (Color red alpha: 0.2).\n\n\tscale _ 2.  \"Actual drawing happens at this magnification\"\n\t\"Scale brush up for painting in magnified buffer\"\n\tbrush _ brush magnify: brush boundingBox by: scale.\n\n\t\"Now paint with the brush using alpha blending.\"\n\tbuffSize _ 100.\n\tbuff _ Form extent: (brush extent + buffSize) * scale depth: 32.  \"Travelling 32-bit buffer\"\n\tdispToBuff _ (WarpBlt toForm: buff)  \"From Display to buff - magnify by 2\"\n\t\tsourceForm: Display;\n\t\tcolorMap: mapDto32;\n\t\tcombinationRule: Form over.\n\tbrushToBuff _ (BitBlt toForm: buff)  \"From brush to buff\"\n\t\tsourceForm: brush;\n\t\tsourceOrigin: 0@0;\n\t\tcombinationRule: Form blend.\n\tbuffToDisplay _ (WarpBlt toForm: Display)  \"From buff to Display - shrink by 2\"\n\t\tsourceForm: buff;\n\t\tcolorMap: map32toD;\n\t\tcellSize: scale;  \"...and use smoothing\"\n\t\tcombinationRule: Form over.\n\tbuffToBuff _ BitBlt toForm: buff.  \"This is for slewing the buffer\"\n\n\t[Sensor yellowButtonPressed] whileFalse:\n\t\t[prevP _ nil.\n\t\tbuffRect _ Sensor cursorPoint - (buff extent // scale // 2) extent: buff extent // scale.\n\t\tp0 _ (buff extent // 2) - (buffRect extent // 2).\n\t\tdispToBuff copyQuad: buffRect innerCorners toRect: buff boundingBox.\nbuff displayAt: 0@0.  \"** remove to hide sliding buffer **\"\n\t\t[Sensor redButtonPressed] whileTrue:\n\t\t\t[\"Here is the painting loop\"\n\t\t\tp _ Sensor cursorPoint - buffRect origin + p0.  \"p, prevP are rel to buff origin\"\n\t\t\t(prevP == nil or: [prevP ~= p]) ifTrue:\n\t\t\t\t[prevP == nil ifTrue: [prevP _ p].\n\t\t\t\t(p dist: prevP) > (buffSize-1) ifTrue:\n\t\t\t\t\t[\"Stroke too long to fit in buffer -- clip to buffer,\n\t\t\t\t\t\tand next time through will do more of it\"\n\t\t\t\t\ttheta _ (p-prevP) theta.\n\t\t\t\t\tp _ ((theta cos@theta sin) * (buffSize-2) asFloat + prevP) truncated].\n\t\t\t\tbrushRect _ p extent: brush extent.\n\t\t\t\t((buff boundingBox insetBy: scale) containsRect: brushRect) ifFalse:\n\t\t\t\t\t[\"Brush is out of buffer region.  Scroll the buffer,\n\t\t\t\t\t\tand fill vacated regions from the display\"\n\t\t\t\t\tdelta _ (brushRect amountToTranslateWithin: (buff boundingBox insetBy: scale)) // scale.\n\t\t\t\t\tbuffToBuff copyFrom: buff boundingBox in: buff to: delta*scale.\n\t\t\t\t\tnewBuffRect _ buffRect translateBy: delta negated.\n\t\t\t\t\tp _ p translateBy: delta*scale.\n\t\t\t\t\tprevP _ prevP translateBy: delta*scale.\n\t\t\t\t\t(newBuffRect areasOutside: buffRect) do:\n\t\t\t\t\t\t[:r | dispToBuff copyQuad: r innerCorners toRect: (r origin - newBuffRect origin*scale extent: r extent*scale)].\n\t\t\t\t\tbuffRect _ newBuffRect].\n\n\t\t\t\t\"Interpolate from prevP to p...\"\n\t\t\t\tbrushToBuff drawFrom: prevP to: p withFirstPoint: false.\nbuff displayAt: 0@0.  \"** remove to hide sliding buffer **\"\n\n\t\t\t\t\"Update (only) the altered pixels of the destination\"\n\t\t\t\tupdateRect _ (p min: prevP) corner: (p max: prevP) + brush extent.\n\t\t\t\tupdateRect _ updateRect origin // scale * scale\n\t\t\t\t\t\tcorner: updateRect corner + scale // scale * scale.\n\t\t\t\tbuffToDisplay copyQuad: updateRect innerCorners\n\t\t\t\t\t\t\ttoRect: (updateRect origin // scale + buffRect origin\n\t\t\t\t\t\t\t\t\t\textent: updateRect extent // scale).\n\t\t\t\tprevP _ p]]]! !\n\n!BitBlt class methodsFor: 'examples' stamp: 'ssa 10/27/2008 16:38'!\nexampleColorMap\t\"BitBlt exampleColorMap\"\n\t\"This example shows what one can do with the fixed part of a color map. The color map, as setup below, rotates the bits of a pixel all the way around. Thus you'll get a (sometime strange looking ;-) animation of colors which will end up exactly the way it looked at the beginning. The example is given to make you understand that the masks and shifts can be used for a lot more than simply color converting pixels. In this example, for instance, we use only two of the four independent shifters.\"\n\t| cc bb |\n\tcc _ ColorMap masks: {\n\t\t1 << (Display depth-1). \"mask out high bit of color component\"\n\t\t1 << (Display depth-1) - 1. \"mask all other bits\"\n\t\t0.\n\t\t0}\n\t\tshifts: {\n\t\t\t1 - Display depth. \"shift right to bottom most position\"\n\t\t\t1. \"shift all other pixels one bit left\"\n\t\t\t0.\n\t\t\t0}.\n\tbb _ BitBlt toForm: Display.\n\tbb \n\t\tsourceForm: Display;\n\t\tcombinationRule: 3;\n\t\tcolorMap: cc.\n\t1 to: Display depth do:[:i|\n\t\tbb copyBits.\n\t\tDisplay forceDisplayUpdate.\n\t\tSensor waitButton;waitNoButton\n\t].\n! !\n\n!BitBlt class methodsFor: 'benchmarks' stamp: 'ar 4/24/2001 23:49'!\nbenchDiffsFrom: before to: afterwards\n\t\"Given two outputs of BitBlt>>benchmark show the relative improvements.\"\n\t| old new log oldLine newLine oldVal newVal improvement |\n\tlog _ WriteStream on: String new.\n\told _ ReadStream on: before.\n\tnew _ ReadStream on: afterwards.\n\t[old atEnd or:[new atEnd]] whileFalse:[\n\t\toldLine _ old upTo: Character cr.\n\t\tnewLine _ new upTo: Character cr.\n\t\t(oldLine includes: Character tab) ifTrue:[\n\t\t\toldLine _ ReadStream on: oldLine.\n\t\t\tnewLine _ ReadStream on: newLine.\n\t\t\tTranscript cr; show: (oldLine upTo: Character tab); tab.\n\t\t\tlog cr; nextPutAll: (newLine upTo: Character tab); tab.\n\n\t\t\t[oldLine skipSeparators. newLine skipSeparators.\n\t\t\toldLine atEnd] whileFalse:[\n\t\t\t\toldVal _ Integer readFrom: oldLine.\n\t\t\t\tnewVal _ Integer readFrom: newLine.\n\t\t\t\timprovement _ oldVal asFloat / newVal asFloat roundTo: 0.01.\n\t\t\t\tTranscript show: improvement printString; tab; tab.\n\t\t\t\tlog print: improvement; tab; tab].\n\t\t] ifFalse:[\n\t\t\tTranscript cr; show: oldLine.\n\t\t\tlog cr; nextPutAll: oldLine.\n\t\t].\n\t].\n\t^log contents! !\n\n!BitBlt class methodsFor: 'benchmarks' stamp: 'ar 5/14/2001 23:31'!\nbenchmark2\t\t\"BitBlt benchmark\"\n\t\"Run a benchmark on different combinations rules, source/destination depths and BitBlt modes. Note: This benchmark doesn't give you any 'absolute' value - it is intended only for benchmarking improvements in the bitblt code and nothing else.\n\tAttention: *this*may*take*a*while*\"\n\t| bb source dest destRect log t |\n\tlog _ WriteStream on: String new.\n\tdestRect _ 0@0 extent: 600@600.\n\t\"Form paint/Form over - the most common rules\"\n\t#( 25 3 ) do:[:rule|\n\t\tTranscript cr; show:'---- Combination rule: ', rule printString,' ----'.\n\t\tlog cr; nextPutAll:'---- Combination rule: ', rule printString,' ----'.\n\t\t#(1 2 4 8 16 32) do:[:destDepth|\n\t\t\tdest _ nil.\n\t\t\tdest _ Form extent: destRect extent depth: destDepth.\n\t\t\tTranscript cr.\n\t\t\tlog cr.\n\t\t\t#(1 2 4 8 16 32) do:[:sourceDepth|\n\t\t\t\tTranscript cr; show: sourceDepth printString, ' => ', destDepth printString.\n\t\t\t\tlog cr; nextPutAll: sourceDepth printString, ' => ', destDepth printString.\n\t\t\t\tsource _ nil. bb _ nil.\n\t\t\t\tsource _ Form extent: destRect extent depth: sourceDepth.\n\t\t\t\t(source getCanvas) fillOval: dest boundingBox color: Color yellow borderWidth: 30 borderColor: Color black.\n\t\t\t\tbb _ WarpBlt toForm: dest.\n\t\t\t\tbb sourceForm: source.\n\t\t\t\tbb sourceRect: source boundingBox.\n\t\t\t\tbb destRect: dest boundingBox.\n\t\t\t\tbb colorMap: (source colormapIfNeededFor: dest).\n\t\t\t\tbb combinationRule: rule.\n\n\t\t\t\t\"Measure speed of copyBits\"\n\t\t\t\tt _ Time millisecondsToRun:[1 to: 10 do:[:i| bb copyBits]].\n\t\t\t\tTranscript tab; show: t printString.\n\t\t\t\tlog tab; nextPutAll: t printString.\n\n\t\t\t\tbb sourceForm: source destRect: source boundingBox.\n\n\t\t\t\t\"Measure speed of 1x1 warpBits\"\n\t\t\t\tbb cellSize: 1.\n\t\t\t\tt _ Time millisecondsToRun:[1 to: 4 do:[:i| bb warpBits]].\n\t\t\t\tTranscript tab; show: t printString.\n\t\t\t\tlog tab; nextPutAll: t printString.\n\n\t\t\t\t\"Measure speed of 2x2 warpBits\"\n\t\t\t\tbb cellSize: 2.\n\t\t\t\tt _ Time millisecondsToRun:[bb warpBits].\n\t\t\t\tTranscript tab; show: t printString.\n\t\t\t\tlog tab; nextPutAll: t printString.\n\n\t\t\t\t\"Measure speed of 3x3 warpBits\"\n\t\t\t\tbb cellSize: 3.\n\t\t\t\tt _ Time millisecondsToRun:[bb warpBits].\n\t\t\t\tTranscript tab; show: t printString.\n\t\t\t\tlog tab; nextPutAll: t printString.\n\t\t\t].\n\t\t].\n\t].\n\t^log contents! !\n\n!BitBlt class methodsFor: 'benchmarks' stamp: 'ar 4/26/2001 21:04'!\nbenchmark3\t\t\"BitBlt benchmark\"\n\t\"Run a benchmark on different combinations rules, source/destination depths and BitBlt modes. Note: This benchmark doesn't give you any 'absolute' value - it is intended only for benchmarking improvements in the bitblt code and nothing else.\n\tAttention: *this*may*take*a*while*\"\n\t| bb source dest destRect log t |\n\tlog _ WriteStream on: String new.\n\tdestRect _ 0@0 extent: 600@600.\n\t\"Form paint/Form over - the most common rules\"\n\t#( 25 3 ) do:[:rule|\n\t\tTranscript cr; show:'---- Combination rule: ', rule printString,' ----'.\n\t\tlog cr; nextPutAll:'---- Combination rule: ', rule printString,' ----'.\n\t\t#(1 2 4 8 16 32) do:[:destDepth|\n\t\t\tdest _ nil.\n\t\t\tdest _ Form extent: destRect extent depth: destDepth.\n\t\t\tTranscript cr.\n\t\t\tlog cr.\n\t\t\t#(1 2 4 8 16 32) do:[:sourceDepth|\n\t\t\t\tTranscript cr; show: sourceDepth printString, ' => ', destDepth printString.\n\t\t\t\tlog cr; nextPutAll: sourceDepth printString, ' => ', destDepth printString.\n\t\t\t\tsource _ nil. bb _ nil.\n\t\t\t\tsource _ Form extent: destRect extent depth: sourceDepth.\n\t\t\t\t(source getCanvas) fillOval: dest boundingBox color: Color yellow borderWidth: 30 borderColor: Color black.\n\t\t\t\tbb _ WarpBlt toForm: dest.\n\t\t\t\tbb sourceForm: source.\n\t\t\t\tbb sourceRect: source boundingBox.\n\t\t\t\tbb destRect: dest boundingBox.\n\t\t\t\tbb colorMap: (source colormapIfNeededFor: dest).\n\t\t\t\tbb combinationRule: rule.\n\n\t\t\t\t\"Measure speed of copyBits\"\n\t\t\t\tt _ Time millisecondsToRun:[1 to: 10 do:[:i| bb copyBits]].\n\t\t\t\tTranscript tab; show: t printString.\n\t\t\t\tlog tab; nextPutAll: t printString.\n\n\t\t\t\tbb sourceForm: source destRect: source boundingBox.\n\n\t\t\t\t\"Measure speed of 1x1 warpBits\"\n\t\t\t\tbb cellSize: 1.\n\t\t\t\tt _ Time millisecondsToRun:[1 to: 4 do:[:i| bb warpBits]].\n\t\t\t\tTranscript tab; show: t printString.\n\t\t\t\tlog tab; nextPutAll: t printString.\n\n\t\t\t\t\"Measure speed of 2x2 warpBits\"\n\t\t\t\tbb cellSize: 2.\n\t\t\t\tt _ Time millisecondsToRun:[bb warpBits].\n\t\t\t\tTranscript tab; show: t printString.\n\t\t\t\tlog tab; nextPutAll: t printString.\n\n\t\t\t\t\"Measure speed of 3x3 warpBits\"\n\t\t\t\tbb cellSize: 3.\n\t\t\t\tt _ Time millisecondsToRun:[bb warpBits].\n\t\t\t\tTranscript tab; show: t printString.\n\t\t\t\tlog tab; nextPutAll: t printString.\n\t\t\t].\n\t\t].\n\t].\n\t^log contents! !\n\n!BlockContext methodsFor: '*Sly3' stamp: 'dmu 9/17/2010 10:58'!\nasSlyMemberProcess\n\t^ self copy fixTemps newProcess beSlyMemberProcess! !\n\n!BlockContext methodsFor: 'controlling' stamp: 'ssa 8/24/2009 16:18'!\nloopExit\n\t[self value: [^ self]] repeat! !\n\n!BlockContext methodsFor: 'controlling' stamp: 'ssa 8/24/2009 16:43'!\nuntilFalse: aBlock\n\n\t[self value. aBlock value ifFalse: [^ self]] repeat\n\n\t! !\n\n!BlockContext methodsFor: 'converting' stamp: 'ssa 9/7/2009 14:36'!\nasContext\n\n\t^self! !\n\n!BlockContext methodsFor: 'evaluating' stamp: 'dmu 8/17/2009 21:52'!\nvalue: arg1 value: arg2 value: arg3 value: arg4  value: arg5\n\t\"Primitive. Evaluate the block represented by the receiver. Fail if the \n\tblock expects other than three arguments or if the block is already being \n\texecuted. Optional. See Object documentation whatIsAPrimitive.\"\n\n\t<primitive: 81>\n\t^self valueWithArguments: \n\t\t(Array\n\t\t\twith: arg1\n\t\t\twith: arg2\n\t\t\twith: arg3\n\t\t\twith: arg4\n\t\t\twith: arg5)! !\n\n!BlockContext methodsFor: 'printing' stamp: 'ssa 11/27/2009 16:55'!\nasString\n\n\t| str |\n\tstr _ (((self decompile ifNil: ['--source missing--']) printString\n\t\t\t\t\t\treplaceAll: Character cr with: Character space)\n\t\t\t\t\t\t\treplaceAll: Character tab with: Character space).\n\t^str copyFrom: 2 to: str size - 1! !\n\n!BlockContext methodsFor: 'printing' stamp: 'ads 1/24/2011 13:02'!\nprintOn: aStream\n\t| blockString truncatedBlockString |\n\taStream nextPutAll:(RVMPrimitivesNeededForBootstrapping printPrefixFor: self).\n\thome == nil ifTrue: [^aStream nextPutAll: 'a BlockContext with home=nil'].\n\taStream nextPutAll: '[] in '.\n\tsuper printOn: aStream.\n\taStream nextPutAll: ' '.\n\tblockString _ ((self decompile ifNil: ['--source missing--']) printString\n\t\t\t\t\t\treplaceAll: Character cr with: Character space)\n\t\t\t\t\t\t\treplaceAll: Character tab with: Character space.\n\ttruncatedBlockString _ blockString truncateWithElipsisTo: 800.\n\ttruncatedBlockString size < blockString size ifTrue:\n\t\t[truncatedBlockString _ truncatedBlockString, ']}'].\n\taStream nextPutAll: truncatedBlockString.\n! !\n\n!BlockContext methodsFor: 'scheduling' stamp: 'dmu 4/7/2009 02:34'!\nforkWith: anObject\n\t\"Create and schedule a Process running the code in the receiver.\"\n\n\t^ (self newProcessWith: anObject) resume! !\n\n!BlockContext methodsFor: 'scheduling' stamp: 'dmu 4/7/2009 02:33'!\nnewProcessWith: anObject\n\t\"Answer a Process running the code in the receiver. The process is not \n\tscheduled.\"\n\t<primitive: 19> \"Simulation guard\"\n\t^Process\n\t\tforContext: \n\t\t\t[self value: anObject.\n\t\t\tProcessor terminateActive]\n\t\tpriority: Processor activePriority! !\n\n!BlockContext methodsFor: 'private' stamp: 'dmu 11/25/2008 00:18'!\nvalueUnpreemptively\n\t\"Evaluate the receiver (block), without the possibility of preemption by higher priority processes. Use this facility VERY sparingly!!\"\n\t\"Think about using Block>>valueUninterruptably first, and think about using Semaphore>>critical: before that, and think about redesigning your application even before that!! \n\tAfter you've done all that thinking, go right ahead and use it...\"\n\t| activeProcess oldPriority result |\n\tactiveProcess _ Processor thisProcess.\n\toldPriority _ activeProcess priority.\n\tactiveProcess priority: Processor highestPriority.\n\tresult _ self ensure: [activeProcess priority: oldPriority].\n\t\"Yield after restoring priority to give the preempted processes a chance to run\"\n\tProcessor yield.\n\t^result! !\n\n!BlockContext methodsFor: '*RVM' stamp: 'ads 1/30/2011 15:22'!\ncyclesToRunMe\n\t| s delta correction result |\n\ts _ RVMOperations cycleCounter.\n\tself value.\n\tdelta _  RVMOperations cycleCounter - s.\n\t^ delta < 0 ifTrue: [ \n\t\tcorrection _ SmallInteger maxVal + 1. \n\t\tresult _ delta.\n\t\t[result < 0] whileTrue: [result _ result + correction].\n\t\tresult\n\t] ifFalse: [delta]! !\n\n!BlockContext methodsFor: '*RVM' stamp: 'dmu 4/7/2009 02:38'!\nforkOn: aCore\n\t\"Create and schedule a Process running the code in the receiver.\"\n\n\t^ self newProcess resumeOn: aCore! !\n\n!BlockContext methodsFor: '*RVM' stamp: 'ssa 4/8/2009 20:09'!\nforkOn: aCore with: anObject\n\t\"Create and schedule a Process running the code in the receiver.\"\n\n\t^ (self newProcessWith: anObject) resumeOn: aCore! !\n\n!BlockContext methodsFor: '*RVM' stamp: 'ssa 4/8/2009 20:08'!\nforkOn: aCore with: anObject at: aPriority\n\t\"Create and schedule a Process running the code in the receiver.\"\n\n\t| proc |\n\tproc _ self newProcessWith: anObject.\n\tproc priority: aPriority.\n\t^proc resumeOn: aCore! !\n\n!BlockNode methodsFor: 'accessing' stamp: 'dmu 1/21/2010 15:22'!\nreturnSelfIfNoOther\n\n\tself returns\n\t\tifFalse: \n\t\t\t[statements last == NodeSelf ifFalse: [\n\t\t\t\t(statements isKindOf: Array) ifTrue: [statements _ statements asOrderedCollection].\n\t\t\t\tstatements add: NodeSelf\n\t\t\t].\n\t\t\tself returnLast]! !\n\n!BlockingSmallSet methodsFor: 'adding' stamp: 'max 9/29/2010 14:37'!\nadd: anObject \n\t(self includes: anObject)\n\t\tifFalse: [mutex critical: [super addLast: anObject]]! !\n\n!BlockingSmallSet methodsFor: 'adding' stamp: 'max 9/15/2010 14:33'!\nadd: anObject after: anObject2 \n\tself shouldNotImplement! !\n\n!BlockingSmallSet methodsFor: 'adding' stamp: 'max 9/15/2010 14:33'!\nadd: anObject afterIndex: anObject2 \n\tself shouldNotImplement! !\n\n!BlockingSmallSet methodsFor: 'adding' stamp: 'max 9/15/2010 14:33'!\nadd: anObject before: anObject2 \n\tself shouldNotImplement! !\n\n!BlockingSmallSet methodsFor: 'adding' stamp: 'max 9/15/2010 14:33'!\nadd: anObject beforeIndex: anObject2 \n\tself shouldNotImplement! !\n\n!BlockingSmallSet methodsFor: 'adding' stamp: 'max 9/16/2010 13:13'!\naddAll: aCollection \n\t\"Add each element of aCollection not already included in the reciever, at the end. \n\tUse super's method to avoid needless nested blocking. Answer aCollection.\"\n\n\tmutex critical: \n\t\t[aCollection do: [ :each | (array includes: each) ifFalse: [super addLast: each]]].\n\t^aCollection! !\n\n!BlockingSmallSet methodsFor: 'adding' stamp: 'max 9/15/2010 14:33'!\naddAllFirst: anObject \n\tself shouldNotImplement! !\n\n!BlockingSmallSet methodsFor: 'adding' stamp: 'max 9/15/2010 14:33'!\naddAllFirstUnlessAlreadyPresent: anObject \n\tself shouldNotImplement! !\n\n!BlockingSmallSet methodsFor: 'adding' stamp: 'max 9/16/2010 13:04'!\naddAllLast: aCollection \n\tself shouldNotImplement! !\n\n!BlockingSmallSet methodsFor: 'adding' stamp: 'max 9/15/2010 14:33'!\naddFirst: anObject \n\tself shouldNotImplement! !\n\n!BlockingSmallSet methodsFor: 'adding' stamp: 'max 9/16/2010 13:07'!\naddLast: anObject \n\tself add: anObject! !\n\n!BlockingSmallSet methodsFor: 'adding' stamp: 'max 9/15/2010 14:33'!\nat: anObject ifAbsentPut: anObject2 \n\tself shouldNotImplement! !\n\n!BlockingSmallSet methodsFor: 'accessing' stamp: 'max 9/15/2010 14:33'!\nat: anObject put: anObject2 \n\tself shouldNotImplement! !\n\n!BlockingSmallSet methodsFor: 'enumerating' stamp: 'max 9/16/2010 12:38'!\ncollect: aBlock from: fromIndex to: toIndex\n\tself shouldNotImplement! !\n\n!BlockingSmallSet methodsFor: 'enumerating' stamp: 'max 9/15/2010 14:33'!\nwith: anObject collect: anObject2 \n\tself shouldNotImplement! !\n\n!BlockingSmallSet methodsFor: 'enumerating' stamp: 'max 9/15/2010 14:33'!\nwithIndexCollect: anObject \n\tself shouldNotImplement! !\n\n!BlockingSmallSet methodsFor: 'copying' stamp: 'max 9/15/2010 14:33'!\ncopyFrom: anObject to: anObject2 \n\tself shouldNotImplement! !\n\n!BlockingSmallSet methodsFor: 'copying' stamp: 'max 9/15/2010 14:33'!\ncopyReplaceFrom: anObject to: anObject2 with: anObject3 \n\tself shouldNotImplement! !\n\n!BlockingSmallSet methodsFor: 'copying' stamp: 'max 9/15/2010 14:33'!\ncopyWith: anObject \n\tself shouldNotImplement! !\n\n!BlockingSmallSet methodsFor: 'copying' stamp: 'max 9/15/2010 14:33'!\nreversed\n\tself shouldNotImplement! !\n\n!BlockingSmallSet methodsFor: 'removing' stamp: 'max 9/15/2010 15:15'!\nremove: anObject\n\tself remove: anObject ifAbsent: []! !\n\n!BlockingSmallSet methodsFor: 'removing' stamp: 'max 9/15/2010 15:13'!\nremove: anObject ifAbsent: absentBlock \n\tmutex critical: [super remove: anObject ifAbsent: absentBlock]! !\n\n!BlockingSmallSet methodsFor: 'removing' stamp: 'dmu 9/23/2010 14:28'!\nremoveAll\n\tmutex critical: [super setCollection: (Array new: array size)]! !\n\n!BlockingSmallSet methodsFor: 'removing' stamp: 'max 9/17/2010 13:31'!\nremoveAll: aCollection\n\t\"Remove each element of aCollection, using super's method to avoid needless nested blocking. Answer aCollection.\"\n\n\tmutex critical: \n\t\t[aCollection do: [ :each | super remove: each ifAbsent: []]].\n\t^aCollection! !\n\n!BlockingSmallSet methodsFor: 'removing' stamp: 'max 9/16/2010 12:24'!\nremoveAllSuchThat: aBlock \n\tmutex critical:\n\t\t[ super removeAllSuchThat: aBlock ]! !\n\n!BlockingSmallSet methodsFor: 'removing' stamp: 'max 9/15/2010 14:33'!\nremoveAt: anObject \n\tself shouldNotImplement! !\n\n!BlockingSmallSet methodsFor: 'removing' stamp: 'max 9/15/2010 14:33'!\nremoveFirst\n\tself shouldNotImplement! !\n\n!BlockingSmallSet methodsFor: 'removing' stamp: 'max 9/15/2010 14:33'!\nremoveFirst: anObject \n\tself shouldNotImplement! !\n\n!BlockingSmallSet methodsFor: 'removing' stamp: 'max 9/15/2010 14:33'!\nremoveLast\n\tself shouldNotImplement! !\n\n!BlockingSmallSet methodsFor: 'removing' stamp: 'max 9/15/2010 14:33'!\nremoveLast: anObject \n\tself shouldNotImplement! !\n\n!BlockingSmallSet methodsFor: 'sorting' stamp: 'max 9/15/2010 14:33'!\nsort\n\tself shouldNotImplement! !\n\n!BlockingSmallSet methodsFor: 'sorting' stamp: 'max 9/15/2010 14:33'!\nsort: anObject \n\tself shouldNotImplement! !\n\n!BlockingSmallSet methodsFor: 'sorting' stamp: 'max 9/15/2010 14:33'!\nsorted: anObject \n\tself shouldNotImplement! !\n\n!BlockingSmallSet methodsFor: 'initialize-release' stamp: 'max 9/29/2010 14:38'!\ninitialize\n\tsuper initialize.\n\tmutex := Semaphore forMutualExclusion! !\n\n!BlockingSmallSet commentStamp: 'max 9/17/2010 12:48' prior: 0!\nA BlockingSmallSet is an unindexed collection which behaves like a set, allowing no duplicate elements. It uses a semaphore to ensure that adding and removing operations are atomic and thus thread-safe. It wraps an OrderedCollection, which is simpler than Set's hash-based implementation and may be more efficient for small numbers of elements.\n\nBlockingSmallSets block on recieving any of (#add: #remove: #addAll: #removeAll:). They also respond to: #intersection:, #union:, and all the standard enumeration messages. However, care should be taken when using any #do:-based enumerator which may affect the state of the reciever: while each individual successive #add: or #remove: is atomic, the overall enumeration is not.!\n!BlockingSmallSet class methodsFor: 'as yet unclassified' stamp: 'max 9/15/2010 17:55'!\nnew\n\t| bss |\n\tbss := super new.\n\tbss initialize.\n\t^ bss! !\n\n!Boolean methodsFor: 'debugging' stamp: 'ssa 3/11/2010 11:54'!\nhaltIfFalse\n\n\t! !\n\n!Boolean methodsFor: 'debugging' stamp: 'ssa 3/11/2010 11:54'!\nhaltIfTrue\n\n! !\n\n!Boolean methodsFor: 'testing' stamp: 'ssa 6/1/2010 16:46'!\nmustBeBoolean\n\t^false! !\n\n!Boolean methodsFor: 'testing' stamp: 'ssa 6/1/2010 16:47'!\nmustBeBooleanIn: aContext\n\t^true! !\n\n!Boolean methodsFor: '*Sly' stamp: 'ssa 5/27/2010 10:41'!\nisBoolean\n\t\"Return true if the receiver is true or false.\n\tNote: Do not override in any class except Boolean.\"\n\t^true! !\n\n!Browser methodsFor: 'accessing' stamp: 'ssa 9/9/2009 09:01'!\nclassOrganizer\n\t\"Answer the value of classOrganizer\"\n\n\tclassOrganizer isNil ifTrue:[self classOrganizer: nil].\n\t^ classOrganizer! !\n\n!Browser methodsFor: 'accessing' stamp: 'ssa 9/9/2009 09:01'!\nclassOrganizer: anObject\n\t\"Set the value of classOrganizer\"\n\n\tclassOrganizer _ anObject! !\n\n!Browser methodsFor: 'accessing' stamp: 'ssa 9/9/2009 09:40'!\nlastClassSelected\n\t\"Answer the value of lastClassSelected\"\n\n\tlastClassSelected isNil ifTrue:[self lastClassSelected: self selectedClassOrMetaClass].\n\t^ lastClassSelected! !\n\n!Browser methodsFor: 'accessing' stamp: 'ssa 9/9/2009 09:01'!\nlastClassSelected: anObject\n\t\"Set the value of lastClassSelected\"\n\n\tlastClassSelected _ anObject! !\n\n!Browser methodsFor: 'accessing' stamp: 'ssa 9/9/2009 09:01'!\nmetaClassOrganizer\n\t\"Answer the value of metaClassOrganizer\"\n\n\tmetaClassOrganizer isNil ifTrue:[self metaClassOrganizer: nil].\n\t^ metaClassOrganizer! !\n\n!Browser methodsFor: 'accessing' stamp: 'ssa 9/9/2009 09:01'!\nmetaClassOrganizer: anObject\n\t\"Set the value of metaClassOrganizer\"\n\n\tmetaClassOrganizer _ anObject! !\n\n!Browser methodsFor: 'accessing' stamp: 'ssa 9/9/2009 09:01'!\nsystemOrganizer\n\t\"Answer the value of systemOrganizer\"\n\n\tsystemOrganizer isNil ifTrue:[self systemOrganizer: nil].\n\t^ systemOrganizer! !\n\n!Browser methodsFor: 'class functions' stamp: 'ssa 8/27/2009 05:09'!\ncreateInstVarAccessors\n\t\"Create getters and setters for all inst vars defined at the level of the current class selection, except do NOT clobber or override any selectors already understood by the instances of the selected class\"\n\n\t| aClass newMessage setter |\n\t(aClass _ self selectedClassOrMetaClass) ifNotNil:\n\t\t[aClass instVarNames do: \n\t\t\t[:aName |\n\t\t\t\t(aClass canUnderstand: aName asSymbol)\n\t\t\t\t\tifFalse:\n\t\t\t\t\t\t[newMessage _ aName, '\n\t\"Answer the value of ', aName, '\"\n\n\t',aName,' isNil ifTrue:[self ',aName,': nil].\n\t^ ', aName.\n\t\t\t\t\t\taClass compile: newMessage classified: 'accessing' notifying: nil].\n\t\t\t\t(aClass canUnderstand: (setter _ aName, ':') asSymbol)\n\t\t\t\t\tifFalse:\n\t\t\t\t\t\t[newMessage _ setter, ' anObject\n\t\"Set the value of ', aName, '\"\n\n\t', aName, ' _ anObject'.\n\t\t\t\t\t\taClass compile: newMessage classified: 'accessing' notifying: nil]]].\n\tself changed: #messageCategoryList.\n\tself changed: #messageList.\n\tself changed: #relabel.\n\tself contentsChanged.\n\tself selectMessageCategoryNamed:'accessing'! !\n\n!Browser methodsFor: 'class list' stamp: 'ssa 9/9/2009 09:03'!\nclassListIndex: anInteger \n\t\"Set anInteger to be the index of the current class selection.\"\n\n\t| className |\n\n\tclassListIndex _ anInteger.\n\tself lastClassSelected: self selectedClassOrMetaClass.\n\tself setClassOrganizer.\n\tmessageCategoryListIndex _ 0.\n\tmessageListIndex _ 0.\n\tself classCommentIndicated\n\t\tifTrue: []\n\t\tifFalse: [self editSelection: (anInteger = 0\n\t\t\t\t\tifTrue: [metaClassIndicated | (systemCategoryListIndex == 0)\n\t\t\t\t\t\tifTrue: [#none]\n\t\t\t\t\t\tifFalse: [#newClass]]\n\t\t\t\t\tifFalse: [#editClass])].\n\tcontents _ nil.\n\tself selectedClass isNil\n\t\tifFalse: [className _ self selectedClass name.\n\t\t\t\t\t(RecentClasses includes: className)\n\t\t\t\tifTrue: [RecentClasses remove: className].\n\t\t\tRecentClasses addFirst: className.\n\t\t\tRecentClasses size > 16\n\t\t\t\tifTrue: [RecentClasses removeLast]].\n\tself changed: #classSelectionChanged.\n\tself changed: #classCommentText.\n\tself changed: #classListIndex.\t\"update my selection\"\n\tself changed: #messageCategoryList.\n\tself changed: #messageList.\n\tself changed: #relabel.\n\tself contentsChanged! !\n\n!Browser methodsFor: 'initialize-release' stamp: 'ssa 9/10/2009 13:32'!\nsetClass: aBehavior selector: aSymbol \n\t\"Set the state of a new, uninitialized Browser.\"\n\n\t| isMeta aClass messageCatIndex |\n\taBehavior ifNil: [^ self].\n\t(aBehavior isKindOf: Metaclass)\n\t\tifTrue: [\n\t\t\tisMeta _ true.\n\t\t\taClass _ aBehavior soleInstance]\n\t\tifFalse: [\n\t\t\tisMeta _ false.\n\t\t\taClass _ aBehavior].\n\tself selectCategoryForClass: aClass.\n\tself classListIndex: (\n\t\t(SystemOrganization listAtCategoryNamed: self selectedSystemCategoryName)\n\t\t\tindexOf: aClass name).\n\tself metaClassIndicated: isMeta.\n\taSymbol ifNil: [^ self].\n\tmessageCatIndex _ aBehavior organization numberOfCategoryOfElement: aSymbol.\n\tself messageCategoryListIndex: (messageCatIndex > 0\n\t\tifTrue: [messageCatIndex + 1]\n\t\tifFalse: [0]).\n\tmessageCatIndex = 0 ifTrue: [^ self].\n\tself messageListIndex: (\n\t\t(aBehavior organization listAtCategoryNumber: messageCatIndex)\n\t\t\tindexOf: aSymbol).! !\n\n!Browser methodsFor: 'message functions' stamp: 'ssa 9/9/2009 09:05'!\ndefineMessage: aString notifying: aController \n\t\"Compile the expressions in aString. Notify aController if a syntax error \n\toccurs. Install the compiled method in the selected class classified under \n\tthe currently selected message category name. Answer true if \n\tcompilation succeeds, false otherwise.\"\n\t| selectedMessageName selector category oldMessageList |\n\tselectedMessageName _ self selectedMessageName.\n\toldMessageList _ self messageList.\n\tcontents _ nil.\n\tselector _ self lastClassSelected \"selectedClassOrMetaClass\"\n\t\t\t\tcompile: aString\n\t\t\t\tclassified: (category _ self selectedMessageCategoryName)\n\t\t\t\tnotifying: aController.\n\tselector == nil ifTrue: [^ false].\n\tcontents _ aString copy.\n\tselector ~~ selectedMessageName\n\t\tifTrue: \n\t\t\t[category = ClassOrganizer nullCategory\n\t\t\t\tifTrue: [self changed: #classSelectionChanged.\n\t\t\t\t\t\tself changed: #classList.\n\t\t\t\t\t\tself messageCategoryListIndex: 1].\n\t\t\tself setClassOrganizer.  \"In case organization not cached\"\n\t\t\t(oldMessageList includes: selector)\n\t\t\t\tifFalse: [self changed: #messageList].\n\t\t\tself messageListIndex: (self messageList indexOf: selector)].\n\t^ true! !\n\n!Browser methodsFor: 'message functions' stamp: 'ssa 9/9/2009 09:06'!\ndefineMessageFrom: aString notifying: aController\n\t\"Compile the expressions in aString. Notify aController if a syntax error occurs. Install the compiled method in the selected class classified under  the currently selected message category name. Answer the selector obtained if compilation succeeds, nil otherwise.\"\n\t| selectedMessageName selector category oldMessageList |\n\tselectedMessageName _ self selectedMessageName.\n\toldMessageList _ self messageList.\n\tcontents _ nil.\n\tselector _ (Parser new parseSelector: aString).\n\t(self metaClassIndicated\n\t\tand: [(self lastClassSelected \"selectedClassOrMetaClass\" includesSelector: selector) not\n\t\tand: [Metaclass isScarySelector: selector]])\n\t\tifTrue: [\"A frist-time definition overlaps the protocol of Metaclasses\"\n\t\t\t\t(self confirm: ((selector , ' is used in the existing class system.\nOverriding it could cause serious problems.\nIs this really what you want to do?') asText makeBoldFrom: 1 to: selector size))\n\t\t\t\tifFalse: [^nil]].\n\tselector _ self lastClassSelected \"selectedClassOrMetaClass\"\n\t\t\t\tcompile: aString\n\t\t\t\tclassified: (category _ self selectedMessageCategoryName)\n\t\t\t\tnotifying: aController.\n\tselector == nil ifTrue: [^ nil].\n\tcontents _ aString copy.\n\tselector ~~ selectedMessageName\n\t\tifTrue: \n\t\t\t[category = ClassOrganizer nullCategory\n\t\t\t\tifTrue: [self changed: #classSelectionChanged.\n\t\t\t\t\t\tself changed: #classList.\n\t\t\t\t\t\tself messageCategoryListIndex: 1].\n\t\t\tself setClassOrganizer.  \"In case organization not cached\"\n\t\t\t(oldMessageList includes: selector)\n\t\t\t\tifFalse: [self changed: #messageList].\n\t\t\tself messageListIndex: (self messageList indexOf: selector)].\n\t^ selector! !\n\n!Browser methodsFor: 'metaclass' stamp: 'ssa 9/10/2009 08:45'!\nmetaClassIndicated: trueOrFalse \n\t\"Indicate whether browsing instance or class messages.\"\n\n\tmetaClassIndicated _ trueOrFalse.\n\tself setClassOrganizer.\n\tsystemCategoryListIndex > 0 ifTrue:\n\t\t[self editSelection: (classListIndex = 0\n\t\t\tifTrue: [metaClassIndicated\n\t\t\t\tifTrue: [#none]\n\t\t\t\tifFalse: [#newClass]]\n\t\t\tifFalse: [#editClass])].\n\tmessageCategoryListIndex _ 0.\n\tmessageListIndex _ 0.\n\tcontents _ nil.\n\tself changed: #classSelectionChanged.\n\tself changed: #messageCategoryList.\n\tself changed: #messageList.\n\tself changed: #contents.\n\tself changed: #annotation.\n\tself decorateButtons.\n\tself lastClassSelected: self selectedClassOrMetaClass.\n! !\n\n!CPUWatcher methodsFor: 'process operations' stamp: 'dmu 11/25/2008 00:18'!\ndebugProcess: aProcess\n\t| uiPriority oldPriority |\n\tuiPriority _ Processor thisProcess priority.\n\taProcess priority >= uiPriority ifTrue: [\n\t\toldPriority _ ProcessBrowser setProcess: aProcess toPriority: uiPriority - 1\n\t].\n\tProcessBrowser debugProcess: aProcess.! !\n\n!CPUWatcher class methodsFor: 'as yet unclassified' stamp: 'sm 2/24/2011 16:39'!\nstartMonitoringPeriod: pd rate: rt threshold: th\n\t\"CPUWatcher startMonitoring\"\n\n\tCurrentCPUWatcher ifNotNil: [ ^CurrentCPUWatcher startMonitoring. ].\n\tCurrentCPUWatcher _ (self new)\n\t\tmonitorProcessPeriod: pd sampleRate: rt;\n\t\tthreshold: th;\n\t\tname: 'CurrentCPUWatcher';\n\t\tyourself.\n\t^CurrentCPUWatcher\n! !\n\n!Categorizer methodsFor: '*transporter' stamp: 'ads 12/1/2010 11:49'!\nclassifyAllFrom: srcCat under: dstCat\n\tself classifyAll: (self listAtCategoryNamed: srcCat) under: dstCat.\n\tself removeCategory: srcCat.! !\n\n!Categorizer methodsFor: '*transporter' stamp: 'ads 12/8/2010 14:00'!\nremoveCategoryIfEmpty: cat\n\t(self listAtCategoryNamed: cat) isEmpty ifTrue: [self removeCategory: cat].! !\n\n!ChangeList methodsFor: 'scanning' stamp: 'ssa 1/5/2010 15:55'!\nscanRecords: someRecords\n\tchangeList _ OrderedCollection new.\n\tlist _ OrderedCollection new.\n\tlistIndex _ 0.\n\tsomeRecords do:[:each|\n\t\teach type = #doIt ifTrue:[self addItem: each text: 'do it: ' , (each string contractTo: 50)].\n\t\teach type = #preamble ifTrue:[self addItem: each text: 'preamble: ' , (each string contractTo: 50)].\n\t\teach type = #classComment ifTrue:[self addItem: each text: 'class comment for ', each methodClassName].\n\t\teach type = #method ifTrue:[self addItem: each text:  'method: ',each methodClassName,(each isMetaClassChange ifTrue: [' class '] ifFalse: [' ']),each methodSelector,' ', each stamp]].\n\tlistSelections _ Array new: list size withAll: false! !\n\n!ChangeList methodsFor: 'menu actions' stamp: 'ssa 1/5/2010 12:19'!\nchangeListMenu: aMenu\n\t\"Fill aMenu up so that it comprises the primary changelist-browser menu\"\n\n\taMenu addList: #(\n\n\t('fileIn selections'\t\t\t\t\t\t\tfileInSelections\t\t\t\t\t\t'import the selected items into the image')\n\t('fileOut selections...\t'\t\t\t\t\t\tfileOutSelections\t\t\t\t\t\t'create a new file containing the selected items')\n\t-\n\t('compare to current'\t\t\t\t\t\tcompareToCurrentVersion\t\t\t'open a separate window which shows the text differences between the on-file version and the in-image version.' )\n\t('toggle diffing (D)'\t\t\t\t\t\t\ttoggleDiffing\t\t\t\t\t\t'start or stop showing diffs in the code pane.')\n\t-\n\t('select conflicts with any changeset'\t\tselectAllConflicts\t\t\t\t\t'select methods in the file which also occur in any change-set in the system')\n\t('select conflicts with current changeset'\tselectConflicts\t\t\t\t\t\t'select methods in the file which also occur in the current change-set')\n\t('select conflicts with...'\t\t\t\t\t\tselectConflictsWith\t\t\t\t\t'allows you to designate a file or change-set against which to check for code conflicts.')\n\t-\n\t('select changes matching...'\t\t\t\t\tselectChangesMatching\t\t\t\t'select changes in the file that match a user-supplied pattern')\n\t('spawn changes matching...'\t\t\t\t\tspawnChangesMatching\t\t\t\t'spawn changes in the file that match a user-supplied pattern into a new change list view')\n\t('select changes such that...'\t\t\t\t\tselectSuchThat\t\t\t\t'select changes in the file that evaluate to true to a user-supplied code fragment')\n\t('spawn changes such that...'\t\t\t\t\tspawnSuchThat\t\t\t\t'spawn changes in the file that evaluate to true to a user-supplied code fragment')\n\t-\n\t('select unchanged methods'\t\t\t\t\tselectUnchangedMethods\t\t\t\t'select methods in the file whose in-image versions are the same as their in-file counterparts' )\n\t('select new methods'\t\t\t\t\t\tselectNewMethods\t\t\t\t\t'select methods in the file that do not current occur in the image')\n\t('select methods for this class'\t\t\t\tselectMethodsForThisClass\t\t\t'select all methods in the file that belong to the currently-selected class')\n\n\t-\n\t('select all (a)'\t\t\t\t\t\t\t\tselectAll\t\t\t\t\t\t\t\t'select all the items in the list')\n\t('deselect all'\t\t\t\t\t\t\t\tdeselectAll\t\t\t\t\t\t\t'deselect all the items in the list')\n\t('invert selections'\t\t\t\t\t\t\tinvertSelections\t\t\t\t\t\t'select every item that is not currently selected, and deselect every item that *is* currently selected')\n\t('spawn selections'\t\t\t\t\t\t\tspawnSelections\t\t\t\t\t\t'spawn all selected changes into a new change list view')\n\t-\n\t('browse current versions of selections'\t\tbrowseCurrentVersionsOfSelections\t'open a message-list browser showing the current (in-image) counterparts of the selected methods')\n\t('destroy current methods of selections'\t\tdestroyCurrentCodeOfSelections\t\t'remove (*destroy*) the in-image counterparts of all selected methods')\n\t-\n\t('remove doIts'\t\t\t\t\t\t\t\tremoveDoIts\t\t\t\t\t\t\t'remove all items that are doIts rather than methods')\n\t('remove older versions'\t\t\t\t\t\tremoveOlderMethodVersions\t\t\t'remove all but the most recent versions of methods in the list')\n\t('remove up-to-date versions'\t\t\t\tremoveExistingMethodVersions\t\t'remove all items whose code is the same as the counterpart in-image code')\n\t('remove selected items'\t\t\t\t\t\tremoveSelections\t\t\t\t\t'remove the selected items from the change-list')\n\t('remove unselected items'\t\t\t\t\tremoveNonSelections\t\t\t\t\t'remove all the items not currently selected from the change-list')).\n\n\t^ aMenu\n\n! !\n\n!ChangeList methodsFor: 'menu actions' stamp: 'ssa 1/5/2010 14:16'!\nselectChangesMatching\n\t\"query the user for a pattern then select all changes matching that pattern\"\n\t| pattern |\n\tpattern _ FillInTheBlank request: 'Enter a pattern to match to select changes:\n# = single character wildcard\n* = many character wildcard'. ''\n.\n\n\tpattern isEmpty ifTrue: [^ self ].\n\n\tself selectSuchThat: [:aChangeRecord |  aChangeRecord match: pattern]! !\n\n!ChangeList methodsFor: 'menu actions' stamp: 'ssa 1/5/2010 15:07'!\nselectSuchThat\n\t\"query the user for a selection criterio.  By Lex Spoon.  NB: the UI for invoking this from a changelist browser is currently commented out; to reenfranchise it, you'll need to mild editing to ChangeList method #changeListMenu:\"\n\t| code block |\n\tcode _ FillInTheBlank request: 'selection criteria for a change named aChangeRecord?\nFor instance, \naChangeRecord category = ''System-Network''\naChangeRecord type = \"one of #(#method #doIt #classComment #preamble )\"\naChangeRecord text = ''whole change text'' \naChangeRecord string includesSubString: ''change text substring'' \naChangeRecord string includesSubString: ''change text substring'' \n''*fooba#'' match: aChangeRecord string  \n ''*fooba#''  match: aChangeRecord methodSelectorSafe\n ''*fooba#'' match: aChangeRecord methodSelectorSafe \n' initialAnswer: 'aChangeRecord match:''*anything#anyChar'''.\n\n\tcode isEmpty ifTrue: [^ self ].\n\n\tblock _ Compiler evaluate: '[:aChangeRecord | ', code, ']'.\n\n\tself selectSuchThat: block! !\n\n!ChangeList methodsFor: 'menu actions' stamp: 'ssa 1/5/2010 14:46'!\nspawnChangesMatching\n\t\"query the user for a pattern then select all changes matching that pattern\"\n\t| pattern |\n\tpattern _ FillInTheBlank request: 'Enter a pattern to match to select changes:\n# = single character wildcard\n* = many character wildcard'. ''\n.\n\n\tpattern isEmpty ifTrue: [^ self ].\n\n\tself spawnSuchThat: [:aChangeRecord |  aChangeRecord match: pattern] titled:'Changes matching ',pattern! !\n\n!ChangeList methodsFor: 'menu actions' stamp: 'ssa 1/5/2010 14:55'!\nspawnSelections\n\t\"spawn a new changelist view for the selections\"\n\t\n\tself class browseRecords: self selectedChanges titled:'Selected Changes'! !\n\n!ChangeList methodsFor: 'menu actions' stamp: 'ssa 1/5/2010 15:07'!\nspawnSuchThat\n\t\"query the user for a selection criterion block and then spawn\"\n\t| code block |\n\tcode _ FillInTheBlank request: 'selection criteria for a change named aChangeRecord?\nFor instance, \naChangeRecord category = ''System-Network''\naChangeRecord type = \"one of #(#method #doIt #classComment #preamble )\"\naChangeRecord text = ''whole change text'' \naChangeRecord string includesSubString: ''change text substring'' \n''*foo*ba#'' match: aChangeRecord string  \n ''*foo*ba#''  match: aChangeRecord methodSelectorSafe\n ''*foo*ba#'' match: aChangeRecord methodSelectorSafe \n' initialAnswer: 'aChangeRecord match:''*anything#anyChar'''.\n\n\n\tcode isEmpty ifTrue: [^ self ].\n\n\tblock _ Compiler evaluate: '[:aChangeRecord | ', code, ']'.\n\n\tself spawnSuchThat: block titled: 'Changes such that ''',code,'''' ! !\n\n!ChangeList methodsFor: 'menu actions' stamp: 'ssa 1/5/2010 14:58'!\nspawnSuchThat: aBlock titled: aString\n\t\"spawn changes passing aBlock\"\n\n\t| changes |\n\tchanges _ changeList select: [ :change | aBlock value: change ].\n\tself class browseRecords: changes titled: aString! !\n\n!ChangeList methodsFor: 'viewing access' stamp: 'ssa 1/1/1970 00:15'!\ntogglePrimaryListIndex: newListIndex \n\tlistIndex = newListIndex\n\t\tifTrue: [listSelections at: listIndex put: false.\n\t\t\tlistIndex := 0]\n\t\tifFalse: [newListIndex ~= 0\n\t\t\t\tifTrue: [listSelections at: newListIndex put: true.\n\t\t\t\t\tlistIndex := newListIndex]].\n\tself changed: #listIndex.\n\tself contentsChanged! !\n\n!ChangeList methodsFor: 'accessing' stamp: 'ssa 1/5/2010 13:56'!\nchangeList: aCollection\n\tchangeList _ aCollection! !\n\n!ChangeList methodsFor: 'accessing' stamp: 'ssa 1/5/2010 14:56'!\nselectedChanges\n\n\t| sels |\n\tsels _ OrderedCollection new.\n\tlistSelections with: changeList do: \n\t\t[:selected :item | selected ifTrue: [sels add: item]].\n\t^sels! !\n\n!ChangeList class methodsFor: 'public access' stamp: 'ssa 1/5/2010 14:45'!\nbrowseRecords: someChangeRecords\n\t\"Opens a changeList on a collection of change records\"\n\tself browseRecords: someChangeRecords titled: 'Some changes'! !\n\n!ChangeList class methodsFor: 'public access' stamp: 'ssa 1/5/2010 14:45'!\nbrowseRecords: someChangeRecords titled: aString\n\t\"Opens a changeList on a collection of change records\"\n\t| changeList |\n\tchangeList _ self new scanRecords: someChangeRecords.\n\tself open: changeList name: aString multiSelect: true! !\n\n!ChangeList class methodsFor: 'public access' stamp: 'dmu 9/7/2010 14:16'!\ngetRecentLocatorWithPrompt: aPrompt\n\t\"Prompt with a menu of how far back to go.  Return nil if user backs out.  Otherwise return the number of characters back from the end of the .changes file the user wishes to include\"\n\t \"ChangeList getRecentPosition\"\n\t| end changesFile banners positions pos chunk i |\n\tchangesFile _ (SourceFiles at: 2) readOnlyCopy.\n\tbanners _ OrderedCollection new.\n\tpositions _ OrderedCollection new.\n\tchangesFile safelyDo: [\n\t\tend _ changesFile size.\n\t\tpos _ SmalltalkImage current lastQuitLogPosition.\n\t\t[pos = 0 or: [banners size > 20]] whileFalse:\n\t\t\t[\n\t\t\tchangesFile position: pos.\n\t\t\tchunk _ changesFile nextChunk.\n\t\t\ti _ chunk indexOfSubCollection: 'priorSource: ' startingAt: 1.\n\t\t\ti > 0 ifTrue: [positions addLast: pos.\n\t\t\t\t\t\tbanners addLast: (chunk copyFrom: 5 to: i-2).\n\t\t\t\t\t\tpos _ Number readFrom: (chunk copyFrom: i+13 to: chunk size)]\n\t\t\t\tifFalse: [pos _ 0]].\n\t\tchangesFile close.\n\t\tpos _ (SelectionMenu labelList: banners selections: positions)\n\t\t\t\t\tstartUpWithCaption: aPrompt.\n\t\tpos == nil ifTrue: [^ nil].\n\t\t^ end - pos\n\t]! !\n\n!ChangeList class methodsFor: 'instance creation' stamp: 'ssa 8/21/2009 15:32'!\nopen: aChangeList name: aString multiSelect: multiSelect\n\t\"Create a standard system view for the messageSet, whose label is aString.\n\tThe listView may be either single or multiple selection type\"\n\n\t| topView listHeight annoHeight optButtonHeight codeHeight aListView underPane annotationPane buttonsView aBrowserCodeView |\n\t\n\tlistHeight _ 70.\n\tannoHeight _ 10.\n\toptButtonHeight _ aChangeList optionalButtonHeight.\n\tcodeHeight _ 110.\n\n\ttopView _ (StandardSystemView new)\n\t\tmodel: aChangeList;\n\t\tlabel: aString;\n\t\tminimumSize: 200 @ 120;\n\t\tborderWidth: 1.\n\n\taListView _ (multiSelect\n\t\t\tifTrue: [PluggableListViewOfMany\n\t\t\t\t\t\ton: aChangeList\n\t\t\t\t\t\tlist: #list\n\t\t\t\t\t\tprimarySelection: #listIndex\n\t\t\t\t\t\tchangePrimarySelection: #togglePrimaryListIndex:\n\t\t\t\t\t\tlistSelection: #listSelectionAt:\n\t\t\t\t\t\tchangeListSelection: #listSelectionAt:put:\n\t\t\t\t\t\tmenu: (aChangeList showsVersions\n\t\t\t\t\t\t\t\tifTrue: [#versionsMenu:]\n\t\t\t\t\t\t\t\tifFalse: [#changeListMenu:])]\n\t\t\tifFalse: [PluggableListView\n\t\t\t\t\t\ton: aChangeList\n\t\t\t\t\t\tlist: #list\n\t\t\t\t\t\tselected: #listIndex\n\t\t\t\t\t\tchangeSelected: #toggleListIndex:\n\t\t\t\t\t\tmenu: (aChangeList showsVersions\n\t\t\t\t\t\t\t\tifTrue: [#versionsMenu:]\n\t\t\t\t\t\t\t\tifFalse: [#changeListMenu:])]).\n\taListView  window: (0 @ 0 extent: 200 @ listHeight).\n\ttopView addSubView: aListView .\n\n\tunderPane _ aListView.\n\taChangeList wantsAnnotationPane\n\t\tifTrue:\n\t\t\t[annotationPane _ PluggableTextView\n\t\t\t\ton: aChangeList\n\t\t\t\ttext: #annotation\n\t\t\t\taccept: nil\n\t\t\t\treadSelection: nil\n\t\t\t\tmenu: nil.\n\t\t\tannotationPane window: (0 @ 0 extent: 200 @ 10).\n\t\t\ttopView addSubView: annotationPane below: underPane.\n\t\t\tunderPane _ annotationPane .\n\t\t\tcodeHeight _ codeHeight - annoHeight].\n\n\taChangeList wantsOptionalButtons\n\t\tifTrue:\n\t\t\t[buttonsView _ aChangeList optionalButtonsView.\n\t\t\tbuttonsView borderWidth: 1.\n\t\t\ttopView addSubView: buttonsView  below: underPane.\n\t\t\tunderPane _ buttonsView.\n\t\t\tcodeHeight _ codeHeight - optButtonHeight].\n\n\taBrowserCodeView _ PluggableTextView\n\t\t\ton: aChangeList\n\t\t\ttext: #contents\n\t\t\taccept: #contents:\n\t\t\treadSelection: #contentsSelection\n\t\t\tmenu: #codePaneMenu:shifted:.\n\taBrowserCodeView scrollingView\n\t\t\tcontroller: ReadOnlyTextController new.\n\taBrowserCodeView\n\t\t\twindow: (0 @ 0 extent: 200 @ codeHeight).\n\ttopView addSubView: aBrowserCodeView below: underPane.\n\n\ttopView controller open.! !\n\n!ChangeList class methodsFor: 'fileIn/Out' stamp: 'ssa 9/3/2008 10:49'!\nfileReaderServicesForFile: fullName suffix: suffix\n\t| services |\n\tservices _ OrderedCollection new.\n\t(FileStream isSourceFileSuffix: suffix) | (suffix = '*')\n\t\tifTrue: [ services add: self serviceBrowseChangeFile ].\n\t(suffix = 'changes') | (suffix = '*')\n\t\tifTrue: [ services add: self serviceBrowseDotChangesFile ].\n\t^services! !\n\n!ChangeList class methodsFor: 'fileIn/Out' stamp: 'ssa 9/3/2008 10:49'!\nservices\n\t\"Answer potential file services associated with this class\"\n\n\t^ { self serviceBrowseChangeFile. \n\t\tself serviceBrowseDotChangesFile.\n\t\t }! !\n\n!ChangeRecord methodsFor: 'testing' stamp: 'ssa 1/5/2010 14:12'!\nmatch: aPatternString\n\t\"Answer true is any of my text matches aPatternString\"\n\t\n\t(aPatternString match: self string) ifTrue:[^true].\n\t(aPatternString match: self methodClassNameSafe) ifTrue:[^true].\n\t^false! !\n\n!ChangeRecord methodsFor: 'access' stamp: 'ssa 1/5/2010 14:04'!\nmethodClassNameSafe\n\t^class isNil ifTrue:['']ifFalse:[class]! !\n\n!ChangeRecord methodsFor: 'access' stamp: 'ssa 1/5/2010 14:03'!\nmethodSelectorSafe\n\t\"Answer a string in any case\"\n\ttype == #method ifFalse: [^ ''].\n\t^ Parser new parseSelector: self string! !\n\n!ChangeSet methodsFor: 'accessing' stamp: 'ssa 1/5/2010 21:02'!\nchangeRecords\n\t\"Answer the value of changeRecords\"\n\n\tchangeRecords isNil ifTrue:[self changeRecords: nil].\n\t^ changeRecords! !\n\n!ChangeSet methodsFor: 'accessing' stamp: 'ssa 1/5/2010 21:02'!\nchangeRecords: anObject\n\t\"Set the value of changeRecords\"\n\n\tchangeRecords _ anObject! !\n\n!ChangeSet methodsFor: 'accessing' stamp: 'ssa 9/3/2008 11:02'!\neditPostscript\n\t\"edit the receiver's postscript, in a separate window.  \"\n\n\t| deps found |\n\tself assurePostscriptExists.\n\tdeps _ postscript dependents select:\n\t\t[:m | m isKindOf: StandardSystemView].\n\tdeps size > 0 ifTrue:\n\t\t[Smalltalk isMorphic\n\t\t\tifTrue:\n\t\t\t\t[]\n\t\t\tifFalse:\n\t\t\t\t[found _ deps detect: [:obj | (obj isKindOf: StandardSystemView) and: [ScheduledControllers scheduledControllers includes: obj controller]] ifNone: [nil].\n\t\t\t\tfound ifNotNil: [^ ScheduledControllers activateController: found controller]].\n.\n\t\tself inform:\n'Caution -- there', (deps size isOrAreStringWith: 'other window'), '\nalready open on this postscript elsewhere'].\n\n\tpostscript openLabel: 'Postscript for ChangeSet named ', name! !\n\n!ChangeSet methodsFor: 'accessing' stamp: 'ssa 1/5/2010 21:02'!\nisolatedProject: anObject\n\t\"Set the value of isolatedProject\"\n\n\tisolatedProject _ anObject! !\n\n!ChangeSet methodsFor: 'accessing' stamp: 'ssa 1/5/2010 21:02'!\nisolationSet\n\t\"Answer the value of isolationSet\"\n\n\tisolationSet isNil ifTrue:[self isolationSet: nil].\n\t^ isolationSet! !\n\n!ChangeSet methodsFor: 'accessing' stamp: 'ssa 1/5/2010 21:02'!\npostscript\n\t\"Answer the value of postscript\"\n\n\tpostscript isNil ifTrue:[self postscript: nil].\n\t^ postscript! !\n\n!ChangeSet methodsFor: 'accessing' stamp: 'ssa 1/5/2010 21:02'!\npostscript: anObject\n\t\"Set the value of postscript\"\n\n\tpostscript _ anObject! !\n\n!ChangeSet methodsFor: 'accessing' stamp: 'ssa 1/5/2010 21:02'!\npreamble\n\t\"Answer the value of preamble\"\n\n\tpreamble isNil ifTrue:[self preamble: nil].\n\t^ preamble! !\n\n!ChangeSet methodsFor: 'accessing' stamp: 'ssa 1/5/2010 21:02'!\npreamble: anObject\n\t\"Set the value of preamble\"\n\n\tpreamble _ anObject! !\n\n!ChangeSet methodsFor: 'accessing' stamp: 'ssa 1/5/2010 21:02'!\nrevertable\n\t\"Answer the value of revertable\"\n\n\trevertable isNil ifTrue:[self revertable: nil].\n\t^ revertable! !\n\n!ChangeSet methodsFor: 'accessing' stamp: 'ssa 1/5/2010 21:02'!\nrevertable: anObject\n\t\"Set the value of revertable\"\n\n\trevertable _ anObject! !\n\n!ChangeSet methodsFor: 'accessing' stamp: 'ssa 1/5/2010 21:02'!\nstructures: anObject\n\t\"Set the value of structures\"\n\n\tstructures _ anObject! !\n\n!ChangeSet methodsFor: 'accessing' stamp: 'ssa 1/5/2010 21:02'!\nsuperclasses: anObject\n\t\"Set the value of superclasses\"\n\n\tsuperclasses _ anObject! !\n\n!ChangeSet methodsFor: 'fileIn/Out' stamp: 'ssa 9/3/2008 10:51'!\ncheckForConversionMethods\n\t\"See if any conversion methods are needed\"\n\t| oldStruct newStruct tell choice list need\nsel renamed rec nn |\n\n\tPreferences conversionMethodsAtFileOut ifFalse: [^ self].\t\"Check preference\"\n\tstructures ifNil: [^ self].\n\n\tlist _ OrderedCollection new.\n\trenamed _ OrderedCollection new.\n\tself changedClasses do: [:class |\n\t\tneed _ (self atClass: class includes: #new) not.\n\t\tneed ifTrue: [\"Renamed classes.\"\n\t\t\t(self atClass: class includes: #rename) ifTrue: [\n\t\t\t\trec _ changeRecords at: class name.\n\t\t\t\trec priorName ifNotNil: [\n\t\t\t\t\t(structures includesKey: rec priorName) ifTrue: [\n\t\t\t\t\t\trenamed add: class.  need _ false]]]].\n\t\tneed ifTrue: [need _ (self atClass: class includes: #change)].\n\t\tneed ifTrue: [oldStruct _ structures at: class name \n\t\t\t\t\t\t\t\t\tifAbsent: [need _ false.  #()]].\n\t\tneed ifTrue: [\n\t\t\tnewStruct _ (Array with: class classVersion), (class allInstVarNames).\n\t\t\tneed _ (oldStruct ~= newStruct)].\n\t\tneed ifTrue: [sel _ #convertToCurrentVersion:refStream:.\n\t\t\t(#(add change) includes: (self atSelector: sel class: class)) ifFalse: [\n\t\t\t\tlist add: class]].\n\t\t].\n\n\tlist isEmpty & renamed isEmpty ifTrue: [^ self].\n\t\"Ask user if want to do this\"\n\ttell _ 'If there might be instances of ', (list asArray, renamed asArray) printString,\n\t\t'\\in a project (.pr file) on someone''s disk, \\please ask to write a conversion method.\\'\n\t\t\twithCRs,\n\t\t'After you edit the conversion method, you''ll need to fileOut again.\\' withCRs,\n\t\t'The preference conversionMethodsAtFileOut in category \"fileout\" controls this feature.'.\n\tchoice _ (PopUpMenu labels: \n'Write a conversion method by editing a prototype\nThese classes are not used in any object file.  fileOut my changes now.\nI''m too busy.  fileOut my changes now.\nDon''t ever ask again.  fileOut my changes now.') startUpWithCaption: tell. \n\tchoice = 4 ifTrue: [Preferences disable: #conversionMethodsAtFileOut].\n\tchoice = 2 ifTrue: [\"Don't consider this class again in the changeSet\"\n\t\t\tlist do: [:cls | structures removeKey: cls name ifAbsent: []].\n\t\t\trenamed do: [:cls | \n\t\t\t\tnn _ (changeRecords at: cls name) priorName.\n\t\t\t\tstructures removeKey: nn ifAbsent: []]].\n\tchoice ~= 1 ifTrue: [^ self].\t\"exit if choice 2,3,4\"\n\n\tself error:'No support for writing conversion methods in this stripped image'! !\n\n!ChangeSet methodsFor: 'private' stamp: 'ssa 9/3/2008 10:28'!\nfileOutClassDefinition: class on: stream \n\t\"Write out class definition for the given class on the given stream, if the class definition was added or changed.\"\n\n\t(self atClass: class includes: #rename) ifTrue:\n\t\t[stream nextChunkPut: 'Smalltalk renameClassNamed: #', (self oldNameFor: class), ' as: #', class name; cr].\n\n\t(self atClass: class includes: #change) ifTrue: [ \"fat definition only needed for changes\"\n\t\tstream command: 'H3'; nextChunkPut: (self fatDefForClass: class); cr; command: '/H3'.\n\t\t\n\t] ifFalse: [\n\t\t(self atClass: class includes: #add) ifTrue: [ \"use current definition for add\"\n\t\t\tstream command: 'H3'; nextChunkPut: class definition; cr; command: '/H3'.\n\t\t\n\t\t].\n\t].\n\n\t(self atClass: class includes: #comment) ifTrue:\n\t\t[class theNonMetaClass organization putCommentOnFile: stream numbered: 0 moveSource: false forClass: class theNonMetaClass.\n\t\tstream cr].\n\n! !\n\n!ChangeSet methodsFor: '*transporter' stamp: 'ads 1/26/2011 14:23'!\nchangedPackages\n\t| changedPackages nonCategoryBasedPackages |\n\tnonCategoryBasedPackages := Transporter nonCategoryBasedPackages.\n\tchangedPackages := Set new.\n\tself changedMessageList do: [:m |\n\t\tchangedPackages add: (PackageInfo named: m topLevelPackageName).\n\t\tchangedPackages addAll: (nonCategoryBasedPackages select: [:p | p includesMethod: m methodSymbol ofClass: m actualClass]).\n\t].\n\tself changedClasses do: [:c |\n\t\t(self changeRecords at: c name) hasTheClassItselfChanged ifTrue: [\n\t\t\tchangedPackages add: (PackageInfo named: c topLevelPackageName).\n\t\t\tchangedPackages addAll: (nonCategoryBasedPackages select: [:p | p includesClass: c]).\n\t\t].\n\t].\n\t^ changedPackages! !\n\n!ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 7/17/2002 11:37'!\nchangeSetListKey: aChar from: view\n\t\"Respond to a Command key.  I am a model with a listView that has a list of changeSets.\"\n\n\taChar == $b ifTrue: [^ self browseChangeSet].\n\taChar == $B ifTrue: [^ self openChangeSetBrowser].\n\taChar == $c ifTrue: [^ self copyAllToOther].\n\taChar == $D ifTrue: [^ self toggleDiffing]. \n\taChar == $f ifTrue: [^ self findCngSet].\n\taChar == $m ifTrue: [^ self newCurrent].\n\taChar == $n ifTrue: [^ self newSet].\n\taChar == $o ifTrue: [^ self fileOut].\n\taChar == $p ifTrue: [^ self addPreamble].\n\taChar == $r ifTrue: [^ self rename].\n\taChar == $s ifTrue: [^ self chooseChangeSetCategory].\n\taChar == $x ifTrue: [^ self remove].\n\taChar == $- ifTrue: [^ self subtractOtherSide].\n\n\t^ self messageListKey: aChar from: view! !\n\n!ChangeSorter methodsFor: 'changeSet menu' stamp: 'BG 10/29/2003 08:09'!\nchangeSetMenu: aMenu shifted: isShifted \n\t\"Set up aMenu to hold commands for the change-set-list pane.  This could be for a single or double changeSorter\"\n\n\tisShifted ifTrue: [^ self shiftedChangeSetMenu: aMenu].\n\tSmalltalk isMorphic\n\t\tifTrue:\n\t\t\t[]\n\t\tifFalse:\n\t\t\t[aMenu title: 'Change Set:\n' , myChangeSet name].\n\n\taMenu add: 'make changes go to me (m)' action: #newCurrent.\n\taMenu addLine.\n\taMenu add: 'new change set... (n)' action: #newSet.\n\taMenu add: 'find...(f)' action: #findCngSet.\n\taMenu add: 'show category... (s)' action:  #chooseChangeSetCategory.\n\taMenu balloonTextForLastItem:\n'Lets you choose which change sets should be listed in this change sorter'.\n\taMenu add: 'select change set...' action: #chooseCngSet.\n\taMenu addLine.\n\taMenu add: 'rename change set (r)' action: #rename.\n\taMenu add: 'file out (o)' action: #fileOut.\n\"\taMenu add: 'mail to list' action: #mailOut. \"\n\taMenu add: 'browse methods (b)' action: #browseChangeSet.\n\taMenu add: 'browse change set (B)' action: #openChangeSetBrowser.\n\taMenu addLine.\n\tparent\n\t\tifNotNil: \n\t\t\t[aMenu add: 'copy all to other side (c)' action: #copyAllToOther.\n\t\t\taMenu add: 'submerge into other side' action: #submergeIntoOtherSide.\n\t\t\taMenu add: 'subtract other side (-)' action: #subtractOtherSide.\n\t\t\taMenu addLine].\n\tmyChangeSet hasPreamble\n\t\tifTrue: \n\t\t\t[aMenu add: 'edit preamble (p)' action: #addPreamble.\n\t\t\taMenu add: 'remove preamble' action: #removePreamble]\n\t\tifFalse: [aMenu add: 'add preamble (p)' action: #addPreamble].\n\tmyChangeSet hasPostscript\n\t\tifTrue: \n\t\t\t[aMenu add: 'edit postscript...' action: #editPostscript.\n\t\t\taMenu add: 'remove postscript' action: #removePostscript]\n\t\tifFalse: [aMenu add: 'add postscript...' action: #editPostscript].\n\taMenu addLine.\n\n\taMenu add: 'category functions...' action: #offerCategorySubmenu.\n\taMenu balloonTextForLastItem:\n'Various commands relating to change-set-categories'.\n\taMenu addLine.\n\n\n\taMenu add: 'destroy change set (x)' action: #remove.\n\taMenu addLine.\n\taMenu add: 'more...' action: #offerShiftedChangeSetMenu.\n\t^ aMenu! !\n\n!ChangeSorter methodsFor: 'class list' stamp: 'ssa 1/5/2010 21:28'!\nclassListKey: aChar from: view\n\t\"Respond to a Command key in the class-list pane.\"\n\n\taChar == $x ifTrue: [^ self removeClass].\n\taChar == $d ifTrue: [^ self forgetClass]. \n\taChar == $m ifTrue: [^ self moveClassToOther]. \n\n\t^ self messageListKey: aChar from: view \"picks up b,h,p\"! !\n\n!ChangeSorter methodsFor: 'class list' stamp: 'ssa 1/5/2010 21:24'!\nclassListMenu: aMenu shifted: shifted\n\t\"Fill aMenu with items appropriate for the class list\"\n\n\taMenu title: 'class list'.\n\t(parent notNil and: [shifted not])\n\t\tifTrue: [aMenu addList: #( \"These two only apply to dual change sorters\"\n\t\t\t('copy class chgs to other side'\t\t\tcopyClassToOther)\t\n\t\t\t('move class chgs to other side (m)'\t\t\tmoveClassToOther)\n\t\t\t('copy  chgs to other side from classes matching...'\t\t\tcopyClassesToOtherMatching)\t\n\t\t\t('move  chgs to other side from classes matching...'\t\t\tmoveClassesToOtherMatching)\t\n\t\t\t)].\n\n\taMenu addList: (shifted\n\t\tifFalse: [#(\n\t\t\t-\n\t\t\t('delete class from change set (d)'\t\tforgetClass)\n\t\t\t('remove class from system (x)'\t\t\tremoveClass)\n\t\t\t-\n\t\t\t('browse full (b)'\t\t\t\t\t\tbrowseMethodFull)\n\t\t\t('browse hierarchy (h)'\t\t\t\t\tspawnHierarchy)\n\t\t\t('browse protocol (p)'\t\t\t\t\tbrowseFullProtocol)\n\t\t\t-\n\t\t\t('printOut'\t\t\t\t\t\t\t\tprintOutClass)\n\t\t\t('fileOut'\t\t\t\t\t\t\t\tfileOutClass)\n\t\t\t-\n\t\t\t('inst var refs...'\t\t\t\t\t\tbrowseInstVarRefs)\n\t\t\t('inst var defs...'\t\t\t\t\t\tbrowseInstVarDefs)\n\t\t\t('class var refs...'\t\t\t\t\t\tbrowseClassVarRefs)\n\t\t\t('class vars'\t\t\t\t\t\t\t\tbrowseClassVariables)\n\t\t\t('class refs (N)'\t\t\t\t\t\t\tbrowseClassRefs)\n\t\t\t-\n\t\t\t('more...'\t\t\t\t\t\t\t\tofferShiftedClassListMenu))]\n\n\t\tifTrue: [#(\n\t\t\t-\n\t\t\t('unsent methods'\t\t\t\t\t\tbrowseUnusedMethods)\n\t\t\t('unreferenced inst vars'\t\t\t\tshowUnreferencedInstVars)\n\t\t\t('unreferenced class vars'\t\t\t\tshowUnreferencedClassVars)\n\t\t\t-\n\t\t\t('sample instance'\t\t\t\t\t\tmakeSampleInstance)\n\t\t\t('inspect instances'\t\t\t\t\t\tinspectInstances)\n\t\t\t('inspect subinstances'\t\t\t\t\tinspectSubInstances)\n\t\t\t-\n\t\t\t('more...'\t\t\t\t\t\t\t\tofferUnshiftedClassListMenu ))]).\n\t^ aMenu! !\n\n!ChangeSorter methodsFor: 'class list' stamp: 'ssa 1/5/2010 21:13'!\ncopyClassesToOtherMatching\n\t\"Adsk the user for a pattern.  Copy matching changes from this changeset in the other changeSet\"\n\n\t| otherSorter otherChangeSet pattern classNamesToCopy |\n\tself checkThatSidesDiffer: [^ self halt].\n\tself okToChange ifFalse: [^ self halt].\n\totherSorter _ parent other: self.\n\totherChangeSet _ otherSorter changeSet.\n\n\tpattern _ FillInTheBlank request: 'Enter a pattern to match to the class to copy changes:\n# = single character wildcard\n* = many character wildcard'. ''.\n\n\tpattern isEmpty ifTrue: [^ self ].\n\n\tclassNamesToCopy _ OrderedCollection new.\n\tself changeSet changedClassNames   do: [:nm | (pattern match: nm) ifTrue:[classNamesToCopy add: nm]].\n\tclassNamesToCopy  do:[:clsnm|\n\t\totherChangeSet absorbClass: clsnm from: myChangeSet].\n\totherSorter showChangeSet: otherChangeSet.! !\n\n!ChangeSorter methodsFor: 'class list' stamp: 'ssa 1/5/2010 21:22'!\nmoveClassesToOtherMatching\n\t\"Adsk the user for a pattern.  Move matching changes from this changeset in the other changeSet\"\n\n\t| otherSorter otherChangeSet pattern classNamesToCopy |\n\tself checkThatSidesDiffer: [^ self halt].\n\tself okToChange ifFalse: [^ self halt].\n\totherSorter _ parent other: self.\n\totherChangeSet _ otherSorter changeSet.\n\n\tpattern _ FillInTheBlank request: 'Enter a pattern to match to the class to copy changes:\n# = single character wildcard\n* = many character wildcard'. ''.\n\n\tpattern isEmpty ifTrue: [^ self ].\n\n\tclassNamesToCopy _ OrderedCollection new.\n\tself changeSet changedClassNames   do: [:nm | (pattern match: nm) ifTrue:[classNamesToCopy add: nm]].\n\tclassNamesToCopy  do:[:clsnm|\n\t\totherChangeSet absorbClass: clsnm from: myChangeSet.\n\t\t myChangeSet removeClassChanges: clsnm].\n\tcurrentClassName _ nil.\n\t\tcurrentSelector _ nil.\n\t\tself showChangeSet: myChangeSet.\n\totherSorter showChangeSet: otherChangeSet.! !\n\n!ChangeSorter class methodsFor: 'adding' stamp: 'sm 3/11/2011 11:29'!\nbasicNewChangeSet: newName\n\t| newSet |\n\tnewName ifNil: [^ nil].\n\t(self changeSetNamed: newName) ifNotNil:\n\t\t[self inform: 'Sorry that name is already used: ', newName.\n\t\t^ nil].\n\tnewSet _ ChangeSet basicNewNamed: newName.\n\tAllChangeSets add: newSet.\n\t^ newSet! !\n\n!ChangeSorter class methodsFor: 'fileIn/Out' stamp: 'ssa 9/3/2008 10:33'!\nfileIntoNewChangeSet: fullName\n\t\"File in all of the contents of the currently selected file, if any, into a new change set.\" \n\n\t| fn ff |\n\tfullName ifNil: [^ Beeper beep].\n\tff _ FileStream readOnlyFileNamed: (fn _  fullName).\n\t((FileDirectory extensionFor: fn) sameAs: 'html') ifTrue: [ff _ ff asHtml].\n\tself newChangesFromStream: ff named: (FileDirectory localNameFor: fn)! !\n\n!ChangedMethodFinder methodsFor: 'as yet unclassified' stamp: 'dmu 8/25/2010 16:17'!\nchangedMethods\n\t\"ChangedMethodFinder new changedMethods\"\n\t| result |\n\tresult _ OrderedCollection new.\n\tSmalltalk allClassesDo: [:cls| \n\t\t{cls. cls class.} do: [:clsHalf|\n\t\t\tclsHalf methodDict associationsDo: [:a | \n\t\t\t\t(self isMethodChanged: a value) ifTrue: [\n\t\t\t\t\tresult add: { cls category. cls name. clsHalf name.  clsHalf organization categoryOfElement: a key. a key}\n\t\t\t\t]\n\t\t\t]\n\t\t]\n\t].\n^ result! !\n\n!ChangedMethodFinder methodsFor: 'as yet unclassified' stamp: 'dmu 8/25/2010 16:19'!\nchangedMethodsInStandardClasses\n\t\"ChangedMethodFinder new  changedMethodsInStandardClasses\"\n\t| changedMethods standardClassNames result |\n\tchangedMethods _ self changedMethods.\n\tstandardClassNames _ self standardClassNames.\n\tresult _ changedMethods select: [:e| standardClassNames includes: (e at: 2)].\n\t^ result! !\n\n!ChangedMethodFinder methodsFor: 'as yet unclassified' stamp: 'dmu 8/25/2010 15:56'!\nisMethodChanged: aMethod\n\t^ (SourceFiles at: 1) ~= aMethod sourceFileStream! !\n\n!ChangedMethodFinder methodsFor: 'as yet unclassified' stamp: 'dmu 8/25/2010 16:17'!\nstandardClassNames\n\t\"ChangedMethodFinder new standardClassNames\"\n\t| result |\n\tresult _ Set new.\n\tSmalltalk allClassesDo: [:cls| \n\t\t{cls. cls class.} do: [:clsHalf|\n\t\t\tclsHalf methodDict associationsDo: [:a | \n\t\t\t\t(self isMethodChanged: a value) ifFalse: [result add: cls name]\n\t\t\t]\n\t\t]\n\t].\n^ result! !\n\n!Character methodsFor: 'testing' stamp: 'ssa 8/11/2009 12:37'!\nisCharacter\n\t^true! !\n\n!Character methodsFor: '*Ly' stamp: 'ssa 8/18/2009 12:29'!\nat: index\n\n\tindex > 1 ifTrue:[^super at: index].\n\t^self! !\n\n!Character methodsFor: '*Ly' stamp: 'ssa 8/18/2009 12:25'!\ndoesNotUnderstand: aMessage\n\t\"Hack DNU to make chars act like strings\"\n\t\n\t^self asString perform: aMessage selector withArguments: aMessage arguments! !\n\n!Character methodsFor: '*Ly' stamp: 'ssa 8/18/2009 12:28'!\nsize\n\n\t^1! !\n\n!Character methodsFor: '*packageinfo-base' stamp: 'ab 5/31/2003 17:15'!\nescapeEntities\n\t#($< '&lt;' $> '&gt;' $& '&amp;') pairsDo:\n\t\t[:k :v |\n\t\tself = k ifTrue: [^ v]].\n\t^ String with: self! !\n\n!Character class methodsFor: 'accessing untypeable characters' stamp: 'NS 7/11/2000 09:20'!\narrowDown\n\t^ self value: 31! !\n\n!Character class methodsFor: 'accessing untypeable characters' stamp: 'NS 7/11/2000 09:20'!\narrowLeft\n\t^ self value: 28! !\n\n!Character class methodsFor: 'accessing untypeable characters' stamp: 'NS 7/11/2000 09:20'!\narrowRight\n\t^ self value: 29! !\n\n!Character class methodsFor: 'accessing untypeable characters' stamp: 'NS 7/11/2000 09:20'!\narrowUp\n\t^ self value: 30! !\n\n!Character class methodsFor: 'accessing untypeable characters'!\nbackspace\n\t\"Answer the Character representing a backspace.\"\n\n\t^self value: 8! !\n\n!Character class methodsFor: 'accessing untypeable characters'!\ncr\n\t\"Answer the Character representing a carriage return.\"\n\n\t^self value: 13! !\n\n!Character class methodsFor: 'accessing untypeable characters' stamp: 'NS 7/11/2000 09:19'!\ndelete\n\t^ self value: 127! !\n\n!Character class methodsFor: 'accessing untypeable characters' stamp: 'NS 7/11/2000 09:21'!\nend\n\t^ self value: 4! !\n\n!Character class methodsFor: 'accessing untypeable characters'!\nenter\n\t\"Answer the Character representing enter.\"\n\n\t^self value: 3! !\n\n!Character class methodsFor: 'accessing untypeable characters' stamp: 'ls 9/2/1999 08:06'!\nescape\n\t\"Answer the ASCII ESC character\"\n\n\t^self value: 27! !\n\n!Character class methodsFor: 'accessing untypeable characters' stamp: 'sma 3/15/2000 22:33'!\neuro\n\t\"The Euro currency sign, that E with two dashes. The key code is a wild guess\"\n\n\t^ Character value: 219! !\n\n!Character class methodsFor: 'accessing untypeable characters' stamp: 'NS 7/11/2000 09:21'!\nhome\n\t^ self value: 1! !\n\n!Character class methodsFor: 'accessing untypeable characters' stamp: 'NS 7/11/2000 09:19'!\ninsert\n\t^ self value: 5! !\n\n!Character class methodsFor: 'accessing untypeable characters' stamp: 'ls 9/8/1998 22:15'!\nlf\n\t\"Answer the Character representing a linefeed.\"\n\n\t^self value: 10! !\n\n!Character class methodsFor: 'accessing untypeable characters'!\nlinefeed\n\t\"Answer the Character representing a linefeed.\"\n\n\t^self value: 10! !\n\n!Character class methodsFor: 'accessing untypeable characters' stamp: 'wiz 4/9/2006 20:30'!\nnbsp\n\t\"non-breakable space. Latin1 encoding common usage.\"\n\n\t^ Character value: 160! !\n\n!Character class methodsFor: 'accessing untypeable characters'!\nnewPage\n\t\"Answer the Character representing a form feed.\"\n\n\t^self value: 12! !\n\n!Character class methodsFor: 'accessing untypeable characters' stamp: 'NS 7/11/2000 09:20'!\npageDown\n\t^ self value: 12! !\n\n!Character class methodsFor: 'accessing untypeable characters' stamp: 'NS 7/11/2000 09:21'!\npageUp\n\t^ self value: 11! !\n\n!Character class methodsFor: 'accessing untypeable characters'!\nspace\n\t\"Answer the Character representing a space.\"\n\n\t^self value: 32! !\n\n!Character class methodsFor: 'accessing untypeable characters'!\ntab\n\t\"Answer the Character representing a tab.\"\n\n\t^self value: 9! !\n\n!CharacterScanner methodsFor: 'scanning' stamp: 'ssa 8/19/2008 21:22'!\nscanCharactersFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops displaying: foo\n\n\t^ self scanCharactersFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: 0! !\n\n!CharacterScanner methodsFor: 'accessing' stamp: 'ssa 8/19/2008 21:15'!\ndestX: x\n\n\tdestX := x! !\n\n!CharacterSet methodsFor: '*Ly' stamp: 'ssa 8/18/2009 12:50'!\naddAll: aCollection\n\t\n\taCollection do:[:char| self add: char]! !\n\n!CharacterSet methodsFor: '*Ly' stamp: 'ssa 8/18/2009 12:52'!\nremoveAll: aCollection\n\t\n\taCollection do:[:char| self remove: char]! !\n\n!Class methodsFor: '*transporter' stamp: 'ads 12/14/2010 10:27'!\nfileOutOn: aFileStream moveSource: moveSource toFile: fileIndex  filteringCategoriesBy: catFilterBlock\n\t\"File a description of the receiver on aFileStream. If the boolean argument,\n\tmoveSource, is true, then set the trailing bytes to the position of aFileStream and\n\tto fileIndex in order to indicate where to find the source code.\"\n\t^self fileOutOn: aFileStream moveSource: moveSource toFile: fileIndex filteringCategoriesBy: catFilterBlock initializing: true! !\n\n!Class methodsFor: '*transporter' stamp: 'ads 12/14/2010 10:29'!\nfileOutOn: aFileStream moveSource: moveSource toFile: fileIndex filteringCategoriesBy: catFilterBlock initializing: aBool\n\t\"File a description of the receiver on aFileStream. If the boolean argument,\n\tmoveSource, is true, then set the trailing bytes to the position of aFileStream and\n\tto fileIndex in order to indicate where to find the source code.\"\n\n\tTranscript cr; show: name.\n\tsuper\n\t\tfileOutOn: aFileStream\n\t\tmoveSource: moveSource\n\t\ttoFile: fileIndex\n\t\tfilteringCategoriesBy: catFilterBlock.\n\tself class nonTrivial\n\t\tifTrue:\n\t\t\t[aFileStream cr; nextPutAll: '\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!!'; cr; cr.\n\t\t\tself class\n\t\t\t\tfileOutOn: aFileStream\n\t\t\t\tmoveSource: moveSource\n\t\t\t\ttoFile: fileIndex\n\t\t\t\tfilteringCategoriesBy: catFilterBlock\n\t\t\t\tinitializing: aBool]! !\n\n!Class methodsFor: '*SUnit-initialize-release' stamp: 'sm 5/25/2011 00:57'!\nremoveFromChanges\n\t\"References to the receiver, a class, and its metaclass should no longer be included in the system ChangeSet.\n\t7/18/96 sw: call removeClassAndMetaClassChanges:\"\n\n\tChangeSet current removeClassAndMetaClassChanges: self! !\n\n!Class methodsFor: '*SUnit-initialize-release' stamp: 'sm 5/25/2011 00:59'!\nremoveFromSystemUnlogged\n\t\"Forget the receiver from the Smalltalk global dictionary. Any existing instances will refer to an obsolete version of the receiver.  Do not log the removal either to the current change set nor to the system changes log\"\n\t^self removeFromSystem: false! !\n\n!ClassAndMethodSaver methodsFor: 'as yet unclassified' stamp: 'dmu 8/23/2010 14:01'!\nsave\n\tself createRoot.\n\tself saveAllClasses.! !\n\n!ClassAndMethodSaver methodsFor: 'root directory' stamp: 'dmu 8/23/2010 14:41'!\ncreateRoot\n\tself rootDirectory: ( self createDir: self rootName in: FileDirectory default mustBeNew: false )! !\n\n!ClassAndMethodSaver methodsFor: 'root directory' stamp: 'dmu 8/23/2010 14:04'!\nrootDirectory\n\t\"Answer the value of rootDirectory\"\n\n\trootDirectory isNil ifTrue:[self rootDirectory: nil].\n\t^ rootDirectory! !\n\n!ClassAndMethodSaver methodsFor: 'root directory' stamp: 'dmu 8/23/2010 14:04'!\nrootDirectory: anObject\n\t\"Set the value of rootDirectory\"\n\n\trootDirectory _ anObject! !\n\n!ClassAndMethodSaver methodsFor: 'root directory' stamp: 'dmu 8/23/2010 14:00'!\nrootName\n\t\"Answer the value of rootName\"\n\n\trootName isNil ifTrue:[self rootName: 'root'].\n\t^ rootName! !\n\n!ClassAndMethodSaver methodsFor: 'root directory' stamp: 'dmu 8/23/2010 14:00'!\nrootName: anObject\n\t\"Set the value of rootName\"\n\n\trootName _ anObject! !\n\n!ClassAndMethodSaver methodsFor: 'directories' stamp: 'dmu 8/23/2010 14:35'!\nclassCategoryDirFor: cat\n\t^ self createDir: cat in: self rootDirectory mustBeNew: false! !\n\n!ClassAndMethodSaver methodsFor: 'directories' stamp: 'dmu 8/23/2010 14:34'!\ncreateDir: leafName in: parentDir mustBeNew: mustBeNew\n\t| p d |\n\tp _ parentDir pathName, parentDir pathNameDelimiter, leafName.\n\td _ FileDirectory on: p.\n\t(mustBeNew and: [d exists]) ifTrue: [self error: p, ' already exists'].\n\td exists ifFalse: [d assureExistence].\n\t^ d\n! !\n\n!ClassAndMethodSaver methodsFor: 'directories' stamp: 'dmu 8/23/2010 14:38'!\ncreateDirectoriesFor: cls\n\n\t| catDir |\n\tcatDir _ self classCategoryDirFor: cls category.\n\tclassDir _ self createDir: cls name in: catDir mustBeNew: false.\n\tbaseDir _ self createDir: 'base' in: classDir mustBeNew: false.\n\tmetaDir _ self createDir: 'meta' in: classDir mustBeNew: false.! !\n\n!ClassAndMethodSaver methodsFor: 'saving methods' stamp: 'dmu 10/1/2010 22:58'!\nmethodSourceFor: sel in: clsHalf \n\t| method |\n\tmethod _ clsHalf methodDict at: sel ifAbsent: [^ sel printString, 'CORRUPTED'].\n\t^ (method getSourceFor: sel in: clsHalf) asString! !\n\n!ClassAndMethodSaver methodsFor: 'saving methods' stamp: 'dmu 10/1/2010 22:59'!\nsaveMethodNamed: sel inCategory: cat of: clsHalf in: catDir\n\t| src fs selOrFoo |\n\tsrc _ self methodSourceFor: sel in: clsHalf.\n\tselOrFoo _ (sel isKindOf: String) ifTrue: [sel] ifFalse: [sel printString].\n\tfs _ self fileStreamIn: catDir named: selOrFoo, '.txt'.\n\tfs nextPutAll: src.\n\tfs close\n\t! !\n\n!ClassAndMethodSaver methodsFor: 'saving classes' stamp: 'dmu 8/23/2010 14:46'!\nfileStreamIn: dir named: n\n\t| fs |\n\tfs _ FileStream fileNamed: dir pathName, dir pathNameDelimiter, n.\n\t^ fs! !\n\n!ClassAndMethodSaver methodsFor: 'saving classes' stamp: 'dmu 8/23/2010 14:01'!\nsaveAllClasses\n\tSmalltalk allClassesDo: [:cls| self saveClass: cls]! !\n\n!ClassAndMethodSaver methodsFor: 'saving classes' stamp: 'dmu 8/23/2010 15:00'!\nsaveCategory: cat of: clsHalf in: dir\n\t| selectors catDir |\n\tcatDir _ self createDir: cat in: dir mustBeNew: false.\n\tselectors := (cat asString = ClassOrganizer allCategory)\n\t\t\t\tifTrue: [ clsHalf organization allMethodSelectors ]\n\t\t\t\tifFalse: [ clsHalf organization listAtCategoryNamed: cat ].\n\tselectors do: [:sel| self saveMethodNamed: sel inCategory: cat of: clsHalf in: catDir]! !\n\n!ClassAndMethodSaver methodsFor: 'saving classes' stamp: 'dmu 8/23/2010 14:39'!\nsaveClass: cls\n\tself createDirectoriesFor: cls.\n\tself saveClassHalf: cls in:  baseDir.\n\tself saveClassHalf: cls class in:  metaDir! !\n\n!ClassAndMethodSaver methodsFor: 'saving classes' stamp: 'dmu 8/23/2010 14:52'!\nsaveClassHalf: clsHalf in: dir\n\tself saveClassHalfDefinition: clsHalf in: dir.\n\tself saveClassHalfComment: clsHalf in: dir.\n\tself saveClassHalfCategories: clsHalf in: dir! !\n\n!ClassAndMethodSaver methodsFor: 'saving classes' stamp: 'dmu 8/23/2010 14:53'!\nsaveClassHalfCategories: clsHalf in: dir\n\tclsHalf organization categories do: [:cat | self saveCategory: cat of: clsHalf in: dir]! !\n\n!ClassAndMethodSaver methodsFor: 'saving classes' stamp: 'dmu 8/23/2010 15:15'!\nsaveClassHalfComment: clsHalf in: dir\n\t| fs |\n\tfs _ self fileStreamIn: dir named: 'comment.txt'.\n\tfs nextPutAll: clsHalf organization classComment asString.\n\tfs close.! !\n\n!ClassAndMethodSaver methodsFor: 'saving classes' stamp: 'dmu 8/23/2010 14:48'!\nsaveClassHalfDefinition: clsHalf in: dir\n\t| fs |\n\tfs _ self fileStreamIn: dir named: 'definition.txt'.\n\tfs nextPutAll: clsHalf definition.\n\tfs close.! !\n\n!ClassAndMethodSaver commentStamp: 'dmu 8/23/2010 13:56' prior: 0!\nSave all class definitions and method definitions to a directory tree so I can use FileMerge!\n!ClassAndMethodSaver class methodsFor: 'as yet unclassified' stamp: 'dmu 8/23/2010 16:32'!\nsave\n\t\"ClassAndMethodSaver save\"\n\t^self saveIn: 'root'! !\n\n!ClassAndMethodSaver class methodsFor: 'as yet unclassified' stamp: 'dmu 8/23/2010 13:59'!\nsaveIn: rootName\n\t(self new rootName: rootName) save! !\n\n!ClassChangeRecord methodsFor: '*transporter' stamp: 'ads 1/26/2011 14:08'!\nhasTheClassItselfChanged\n\t\"Or have there only been method changes?\"\n\t^ self allChangeTypes isEmpty not! !\n\n!ClassCommentVersionsBrowser methodsFor: 'basic function' stamp: 'dmu 9/7/2010 14:16'!\nscanVersionsOf: class \n\t\"Scan for all past versions of the class comment of the given class\"\n\n\t| oldCommentRemoteStr sourceFilesCopy position prevPos stamp preamble tokens prevFileIndex |\n\n\tclassOfMethod _ class.\n\toldCommentRemoteStr _ class  organization commentRemoteStr.\n\tcurrentCompiledMethod _ oldCommentRemoteStr.\n\tselectorOfMethod _ #Comment.\n\tchangeList _ OrderedCollection new.\n\tlist _ OrderedCollection new.\n\tlistIndex _ 0.\n\toldCommentRemoteStr ifNil:[^ nil] ifNotNil: [oldCommentRemoteStr sourcePointer].\n\n\tsourceFilesCopy _ SourceFiles collect:\n\t\t[:x | x isNil ifTrue: [ nil ]\n\t\t\t\tifFalse: [x readOnlyCopy]].\n\tposition _ oldCommentRemoteStr position.\n\tfile _ sourceFilesCopy at: oldCommentRemoteStr sourceFileNumber.\n\t[position notNil & file notNil]\n\t\twhileTrue: [\n\t\tfile position: (0 max: position-150).  \" Skip back to before the preamble\"\n\t\t[file position < (position-1)]  \"then pick it up from the front\"\n\t\t\twhileTrue: [preamble _ file nextChunk].\n\n\t\tprevPos _ nil.\n\t\tstamp _ ''.\n\t\t(preamble findString: 'commentStamp:' startingAt: 1) > 0\n\t\t\tifTrue: [tokens _ Scanner new scanTokens: preamble.\n\t\t\t\t(tokens at: tokens size-3) = #commentStamp:\n\t\t\t\tifTrue: [\"New format gives change stamp and unified prior pointer\"\n\t\t\t\t\t\tstamp _ tokens at: tokens size-2.\n\t\t\t\t\t\tprevPos _ tokens last.\n\t\t\t\t\t\tprevFileIndex _ sourceFilesCopy fileIndexFromSourcePointer: prevPos.\n\t\t\t\t\t\tprevPos _ sourceFilesCopy filePositionFromSourcePointer: prevPos]]\n\t\t\tifFalse: [\"The stamp get lost, maybe after a condenseChanges\"\n\t\t\t\t\tstamp _ '<historical>'].\n \t\tself addItem:\n\t\t\t\t(ChangeRecord new file: file position: position type: #classComment\n\t\t\t\t\t\tclass: class name category: nil meta: class stamp: stamp)\n\t\t\ttext: stamp , ' ' , class name , ' class comment'. \n\t\tprevPos = 0 ifTrue:[prevPos _ nil].\n\t\tposition _ prevPos.\n\t\tprevPos notNil \n\t\t\t\t\tifTrue:[file _ sourceFilesCopy at: prevFileIndex]].\n\tsourceFilesCopy do: [:x | x notNil ifTrue: [x close]].\n\tlistSelections _ Array new: list size withAll: false! !\n\n!ClassDescription methodsFor: 'printing' stamp: 'dmu 9/6/2010 16:21'!\ninstanceVariablesString\n\t\"Answer a string of my instance variable names separated by spaces.\"\n\n\t^String streamContents: [ :stream |\n\t\t(self instVarNames isKindOf: Number) ifTrue: [stream nextPutAll: 'EEK'] ifFalse: [\n\t\t\tself instVarNames\n\t\t\tdo: [ :each | stream nextPutAll: each ]\n\t\t\tseparatedBy: [ stream space ] ]]! !\n\n!ClassDescription methodsFor: 'accessing method dictionary' stamp: 'ssa 10/8/2008 19:00'!\nallMethodsInCategory: aName \n\t\"Answer a list of all the method categories of the receiver and all its \n\tsuperclasses \"\n\t| aColl |\n\taColl _ OrderedCollection new.\n\tself withAllSuperclasses\n\t\tdo: [:aClass | aColl\n\t\t\t\taddAll: (aName = ClassOrganizer allCategory\n\t\t\t\t\t\tifTrue: [aClass organization allMethodSelectors]\n\t\t\t\t\t\tifFalse: [aClass organization listAtCategoryNamed: aName])].\n\t^ aColl asSet asSortedArray! !\n\n!ClassDescription methodsFor: 'fileIn/Out' stamp: 'dmu 9/7/2010 14:17'!\nclassComment: aString stamp: aStamp\n\t\"Store the comment, aString or Text or RemoteString, associated with the class we are organizing.  Empty string gets stored only if had a non-empty one before.\"\n\n\t| ptr header file oldCommentRemoteStr |\n\t(aString isKindOf: RemoteString) ifTrue:\n\t\t[SystemChangeNotifier uniqueInstance classCommented: self.\n\t\t^ self organization classComment: aString stamp: aStamp].\n\n\toldCommentRemoteStr _ self organization commentRemoteStr.\n\t(aString size = 0) & (oldCommentRemoteStr == nil) ifTrue: [^ self organization classComment: nil].\n\t\t\"never had a class comment, no need to write empty string out\"\n\n\tptr _ oldCommentRemoteStr ifNil: [0] ifNotNil: [oldCommentRemoteStr sourcePointer].\n\tSourceFiles ifNotNil: [(file _ SourceFiles at: 2) ifNotNil: [\n\t\tfile safelyDo: [\n\t\t\tfile setToEnd; cr; nextPut: $!!.\t\"directly\"\n\t\t\t\"Should be saying (file command: 'H3') for HTML, but ignoring it here\"\n\t\t\theader _ String streamContents: [:strm | strm nextPutAll: self name;\n\t\t\t\tnextPutAll: ' commentStamp: '.\n\t\t\t\taStamp storeOn: strm.\n\t\t\t\tstrm nextPutAll: ' prior: '; nextPutAll: ptr printString].\n\t\t\tfile nextChunkPut: header]]].\n\tself organization classComment: (RemoteString newString: aString onFileNumber: 2) stamp: aStamp.\n\tSystemChangeNotifier uniqueInstance classCommented: self.\n! !\n\n!ClassDescription methodsFor: 'fileIn/Out' stamp: 'dmu 9/7/2010 14:22'!\nprintMethodChunk: selector withPreamble: doPreamble on: outStream\n\t\tmoveSource: moveSource toFile: fileIndex\n\t\"Copy the source code for the method associated with selector onto the fileStream.  If moveSource true, then also set the source code pointer of the method.\"\n\t| preamble method oldPos newPos sourceFile endPos |\n\tdoPreamble \n\t\tifTrue: [preamble _ self name , ' methodsFor: ' ,\n\t\t\t\t\t(self organization categoryOfElement: selector) asString printString]\n\t\tifFalse: [preamble _ ''].\n\tmethod _ self methodDict at: selector.\n\t((method fileIndex = 0\n\t\tor: [(SourceFiles at: method fileIndex) == nil])\n\t\tor: [(oldPos _ method filePosition) = 0])\n\t\tifTrue:\n\t\t[\"The source code is not accessible.  We must decompile...\"\n\t\tpreamble size > 0 ifTrue: [outStream cr; nextPut: $!!; nextChunkPut: preamble; cr].\n\t\toutStream nextChunkPut: (self decompilerClass new decompile: selector\n\t\t\t\t\t\t\t\t\t\t\tin: self method: method) decompileString]\n\t\tifFalse:\n\t\t[sourceFile _ SourceFiles at: method fileIndex.\n\t\tsourceFile safelyDo: [\n\t\t\tsourceFile position: oldPos.\n\t\t\tpreamble size > 0 ifTrue:    \"Copy the preamble\"\n\t\t\t\t[outStream copyPreamble: preamble from: sourceFile].\n\t\t\t\"Copy the method chunk\"\n\t\t\tnewPos _ outStream position.\n\t\t\toutStream copyMethodChunkFrom: sourceFile.\n\t\t\tsourceFile skipSeparators.      \"[\" \"The following chunk may have ]style[\" \"]\"\n\t\t\tsourceFile peek == \"[\" $] ifTrue: [\n\t\t\t\toutStream cr; copyMethodChunkFrom: sourceFile].\n\t\t\tmoveSource ifTrue:    \"Set the new method source pointer\"\n\t\t\t\t[endPos _ outStream position.\n\t\t\t\tmethod checkOKToAdd: endPos - newPos at: newPos.\n\t\t\t\tmethod setSourcePosition: newPos inFile: fileIndex]]].\n\tpreamble size > 0 ifTrue: [outStream nextChunkPut: ' '].\n\t^ outStream cr! !\n\n!ClassDescription methodsFor: '*transporter' stamp: 'StefanMarr 3/12/2011 10:14'!\nfileOutOn: aFileStream moveSource: moveSource toFile: fileIndex filteringCategoriesBy: catFilterBlock \n\t\"File a description of the receiver on aFileStream. If the boolean \n\targument, moveSource, is true, then set the trailing bytes to the position \n\tof aFileStream and to fileIndex in order to indicate where to find the \n\tsource code.\"\n\n\taFileStream nextChunkPut: self definition.\n\n\tself organization\n\t\tputCommentOnFile: aFileStream\n\t\tnumbered: fileIndex\n\t\tmoveSource: moveSource\n\t\tforClass: self.\n\tself organization categories do: \n\t\t[:heading |\n\t\t(catFilterBlock value: heading value: self) ifTrue: [\n\t\t\tself fileOutCategory: heading\n\t\t\t\ton: aFileStream\n\t\t\t\tmoveSource: moveSource\n\t\t\t\ttoFile: fileIndex]]! !\n\n!ClassDescription methodsFor: '*transporter' stamp: 'ads 12/5/2010 23:14'!\nmethodNamed: aSymbol\n\t^ MethodReference new setStandardClass: self methodSymbol: aSymbol! !\n\n!ClassDescription methodsFor: '*transporter' stamp: 'ads 1/26/2011 13:35'!\ntopLevelPackageName\n\t^ self theNonMetaClass category asString copyUpTo: $-! !\n\n!ClassFactoryForTestCase methodsFor: 'accessing' stamp: 'Noury 10/26/2008 14:21'!\ncreatedClassNames\n\t^self createdClasses collect: [:class| class name]! !\n\n!ClassFactoryForTestCase methodsFor: 'accessing' stamp: 'Noury 10/26/2008 13:59'!\ncreatedClasses\n\t^createdClasses! !\n\n!ClassFactoryForTestCase methodsFor: 'accessing' stamp: 'Noury 10/26/2008 14:01'!\ncreatedClasses: classes\n\tcreatedClasses := classes asIdentitySet ! !\n\n!ClassFactoryForTestCase methodsFor: 'accessing' stamp: 'Noury 10/26/2008 16:37'!\ndefaultCategory\n\t^ (self packageName , '-', self defaultCategoryPostfix) asSymbol! !\n\n!ClassFactoryForTestCase methodsFor: 'accessing' stamp: 'Noury 10/26/2008 16:23'!\ndefaultCategoryPostfix\n\t^ #Default! !\n\n!ClassFactoryForTestCase methodsFor: 'accessing' stamp: 'NouryBouraqadi 12/18/2010 18:46'!\ndefaultSuperclass \n\t^Object! !\n\n!ClassFactoryForTestCase methodsFor: 'accessing' stamp: 'Noury 10/26/2008 16:20'!\npackageName\n\t^#CategoryForTestToBeDeleted! !\n\n!ClassFactoryForTestCase methodsFor: 'cleaning' stamp: 'Noury 10/26/2008 16:26'!\ncleanUp\n\t| createdClassNames |\n\tcreatedClassNames := self createdClassNames.\n\tself deleteClasses.\n\tself deletePackage.\n\tself cleanUpChangeSetForClassNames: createdClassNames! !\n\n!ClassFactoryForTestCase methodsFor: 'cleaning' stamp: 'Noury 10/26/2008 14:20'!\ncleanUpChangeSetForClassNames: classeNames\n\t| changeSet |\n\tchangeSet := ChangeSet current.\n\tclasseNames do: [:name|\n\t\tchangeSet \n\t\t\tremoveClassChanges: name;\n\t\t\tremoveClassChanges: name, ' class'].\t! !\n\n!ClassFactoryForTestCase methodsFor: 'cleaning' stamp: 'Noury 10/26/2008 12:47'!\ndelete: aClass\n\taClass isObsolete ifTrue: [^self].\n\taClass removeFromChanges.\n\taClass removeFromSystemUnlogged\n! !\n\n!ClassFactoryForTestCase methodsFor: 'cleaning' stamp: 'Noury 10/26/2008 12:46'!\ndeleteClasses\n\tself createdClasses do: [:class|\n\t\tself delete: class]! !\n\n!ClassFactoryForTestCase methodsFor: 'cleaning' stamp: 'Noury 10/26/2008 16:33'!\ndeletePackage\n\t| categoriesMatchString |\n\tcategoriesMatchString := self packageName, '-*'.\n\tSystemOrganization removeCategoriesMatching: categoriesMatchString! !\n\n!ClassFactoryForTestCase methodsFor: 'cleaning' stamp: 'Noury 10/26/2008 14:01'!\ninitialize\n\tsuper initialize.\n\tself createdClasses: IdentitySet new! !\n\n!ClassFactoryForTestCase methodsFor: 'creating' stamp: 'NouryBouraqadi 12/18/2010 18:46'!\nnewClass\n\t^self newSubclassOf: self defaultSuperclass instanceVariableNames: '' classVariableNames: ''! !\n\n!ClassFactoryForTestCase methodsFor: 'creating' stamp: 'NouryBouraqadi 12/18/2010 18:48'!\nnewClassInCategory: category\n\t^self newSubclassOf: self defaultSuperclass instanceVariableNames: '' classVariableNames: '' category: category! !\n\n!ClassFactoryForTestCase methodsFor: 'creating' stamp: 'Noury 11/12/2009 17:53'!\nnewName\n\t| postFix |\n\tpostFix := (self createdClasses size + 1) printString.\n\t^(#ClassForTestToBeDeleted, postFix) asSymbol! !\n\n!ClassFactoryForTestCase methodsFor: 'creating' stamp: 'Noury 10/26/2008 16:25'!\nnewSubclassOf: aClass instanceVariableNames: ivNamesString classVariableNames:  classVarsString \n\t^self \n\t\tnewSubclassOf: aClass \n\t\tinstanceVariableNames: ivNamesString \n\t\tclassVariableNames: classVarsString \n\t\tcategory: self defaultCategoryPostfix! !\n\n!ClassFactoryForTestCase methodsFor: 'creating' stamp: 'Noury 10/26/2008 16:36'!\nnewSubclassOf: aClass instanceVariableNames: ivNamesString classVariableNames:  classVarsString category: category\n\t| newClass |\n\tnewClass := aClass \n\t\tsubclass: self newName \n\t\tinstanceVariableNames: ivNamesString \n\t\tclassVariableNames: classVarsString \n\t\tpoolDictionaries: '' \n\t\tcategory: (self packageName, '-', category) asSymbol.\n\tself createdClasses add: newClass.\n\t^newClass! !\n\n!ClassFactoryForTestCase commentStamp: 'LaurentLaffont 4/15/2011 20:20' prior: 0!\nI'm useful when classes needs to be created during the execution of the test. This avoid polluting your unit tests with dummy and mock classes.\nA typical usage of it is:\n\nTestCase subclass: #YourTest\n       instanceVariableNames: 'classFactory'\n\nYourTest>>setUp\n       classFactory := ClassFactoryForTestCase new\n\nYourTest>>tearDown\n       classFactory deleteClasses.\n\nYourTest>>testIsBehavior\n       | cls |\n       cls := classFactory newClass.\n       self assert: cls isBehavior\n!\n!ClassFactoryForTestCaseTest methodsFor: 'setUp-tearDown' stamp: 'Noury 10/26/2008 12:19'!\nsetUp\n\tsuper setUp.\n\tfactory := ClassFactoryForTestCase new! !\n\n!ClassFactoryForTestCaseTest methodsFor: 'setUp-tearDown' stamp: 'Noury 10/26/2008 14:53'!\ntearDown\n\tsuper tearDown.\n\tfactory cleanUp! !\n\n!ClassFactoryForTestCaseTest methodsFor: 'testing' stamp: 'Noury 10/26/2008 16:43'!\ntestClassCreationInDifferentCategories\n\t| firstThreeClasses lastTwoClasses |\n\t3 timesRepeat: [\n\t\tfactory newSubclassOf: Object instanceVariableNames: '' classVariableNames: '' category: #One].\n\tfirstThreeClasses := factory createdClasses copy.\n\t2 timesRepeat: [\n\t\tfactory newSubclassOf: Object instanceVariableNames: '' classVariableNames: '' category: #Two].\n\tlastTwoClasses := factory createdClasses copyWithoutAll: firstThreeClasses.\n\tself assert: (firstThreeClasses allSatisfy: [:class| class category = (factory packageName, '-', #One) asSymbol]).\n\tself assert: (lastTwoClasses allSatisfy: [:class| class category = (factory packageName, '-', #Two) asSymbol]).! !\n\n!ClassFactoryForTestCaseTest methodsFor: 'testing' stamp: 'Noury 10/26/2008 16:42'!\ntestClassFastCreationInDifferentCategories\n\t| firstThreeClasses lastTwoClasses |\n\t3 timesRepeat: [\n\t\tfactory newClassInCategory: #One].\n\tfirstThreeClasses := factory createdClasses copy.\n\t2 timesRepeat: [\n\t\tfactory newClassInCategory: #Two].\n\tlastTwoClasses := factory createdClasses copyWithoutAll: firstThreeClasses.\n\tself assert: (firstThreeClasses allSatisfy: [:class| class category = (factory packageName, '-', #One) asSymbol]).\n\tself assert: (lastTwoClasses allSatisfy: [:class| class category = (factory packageName, '-', #Two) asSymbol]).! !\n\n!ClassFactoryForTestCaseTest methodsFor: 'testing' stamp: 'Noury 10/26/2008 16:44'!\ntestDefaultCategoryCleanUp\n\t| createdClassNames allClasses |\n\t3 timesRepeat: [\n\t\tfactory newClass].\n\tcreatedClassNames := factory createdClassNames.\n\tfactory cleanUp.\t\n\tself assert: (factory createdClasses allSatisfy: [:class| class isObsolete]). \n\tallClasses := SystemNavigation new allClasses.\n\tself assert: (factory createdClasses noneSatisfy: [:class| allClasses includes: class]).\n\tself deny: (SystemOrganization categories includes: factory defaultCategory). \n\tself deny: (ChangeSet current changedClassNames includesAnyOf: createdClassNames)\n! !\n\n!ClassFactoryForTestCaseTest methodsFor: 'testing' stamp: 'Noury 10/26/2008 16:38'!\ntestMultipleClassCreation\n\t5 timesRepeat: [\n\t\tfactory newClass].\n\tself assert: (SystemNavigation new allClasses includesAllOf: factory createdClasses).\n\tself assert: factory createdClassNames asSet size = 5.\n\tself assert: (SystemOrganization listAtCategoryNamed: factory defaultCategory) asSet = factory createdClassNames asSet! !\n\n!ClassFactoryForTestCaseTest methodsFor: 'testing' stamp: 'Noury 10/26/2008 16:47'!\ntestPackageCleanUp\n\t| createdClassNames allClasses |\n\t3 timesRepeat: [\n\t\tfactory newClassInCategory: #One].\n\t2 timesRepeat: [\n\t\tfactory newClassInCategory: #Two].\n\tcreatedClassNames := factory createdClassNames.\n\tfactory cleanUp.\t\n\tself assert: (factory createdClasses allSatisfy: [:class| class isObsolete]). \n\tallClasses := SystemNavigation new allClasses.\n\tself assert: (factory createdClasses noneSatisfy: [:class| allClasses includes: class]).\n\tself assert: (SystemOrganization categoriesMatching: factory packageName, '*') isEmpty. \n\tself deny: (ChangeSet current changedClassNames includesAnyOf: createdClassNames)\n! !\n\n!ClassFactoryForTestCaseTest methodsFor: 'testing' stamp: 'nice 12/3/2009 23:47'!\ntestSingleClassCreation\n\t|class elementsInCategoryForTest |\n\tclass := factory \n\t\tnewSubclassOf: Object \n\t\tinstanceVariableNames: 'a b c' \n\t\tclassVariableNames: 'X Y'.\n\tself assert: (SystemNavigation new allClasses includes: class).\n\telementsInCategoryForTest := SystemOrganization listAtCategoryNamed: factory defaultCategory. \n\tself assert: elementsInCategoryForTest = {class name}.\n\tself assert: class instVarNames = #(a b c).\n\tself assert: class classPool keys asSet = #(X Y) asSet! !\n\n!ClassFactoryForTestCaseTest methodsFor: 'testing' stamp: 'Noury 10/26/2008 16:37'!\ntestSingleClassFastCreation\n\t|class elementsInCategoryForTest |\n\tclass := factory newClass.\n\tself assert: (SystemNavigation new allClasses includes: class).\n\telementsInCategoryForTest := SystemOrganization listAtCategoryNamed: factory defaultCategory. \n\tself assert: elementsInCategoryForTest = {class name}.\n\tself assert: class instVarNames isEmpty.\n\tself assert: class classPool isEmpty! !\n\n!ClassFactoryForTestCaseTest class methodsFor: 'history' stamp: 'simon.denier 11/22/2008 22:13'!\nlastStoredRun\n\t^ ((Dictionary new) add: (#passed->((Set new) add: #testDefaultCategoryCleanUp; add: #testPackageCleanUp; add: #testSingleClassCreation; add: #testClassCreationInDifferentCategories; add: #testClassFastCreationInDifferentCategories; add: #testMultipleClassCreation; add: #testSingleClassFastCreation; yourself)); add: (#timeStamp->'22 November 2008 10:11:35 pm'); add: (#failures->((Set new))); add: (#errors->((Set new))); yourself)! !\n\n!ClassFactoryWithOrganization methodsFor: 'accessing' stamp: 'LucFabresse 10/24/2010 20:31'!\norganization\n\t^organization! !\n\n!ClassFactoryWithOrganization methodsFor: 'accessing' stamp: 'LucFabresse 10/24/2010 20:31'!\norganization: aSystemOrganizer\n\torganization := aSystemOrganizer! !\n\n!ClassFactoryWithOrganization methodsFor: 'cleaning' stamp: 'LucFabresse 10/24/2010 22:01'!\ndeletePackage\n\t| categoriesMatchString |\n\tcategoriesMatchString := self packageName, '-*'.\n\tself organization removeCategoriesMatching: categoriesMatchString ; \n\t\tremoveEmptyCategories\n\t! !\n\n!ClassFactoryWithOrganization methodsFor: 'creating' stamp: 'LucFabresse 10/29/2010 08:04'!\nnewClassNamed: aString subclassOf: aClass instanceVariableNames: ivNamesString classVariableNames:  classVarsString \n\t^self \n\t\tnewClassNamed: aString\n\t\tsubclassOf: aClass \n\t\tinstanceVariableNames: ivNamesString \n\t\tclassVariableNames: classVarsString \n\t\tcategory:  (self packageName, '-', self defaultCategoryPostfix) asSymbol.! !\n\n!ClassFactoryWithOrganization methodsFor: 'creating' stamp: 'LucFabresse 10/29/2010 08:03'!\nnewClassNamed: aString subclassOf: aClass instanceVariableNames: ivNamesString classVariableNames:  classVarsString category: category\n\t| newClass |\n\tnewClass := (ClassBuilder new)\n\t\tname: aString \n\t\tinEnvironment: self organization environment\n\t\tsubclassOf: aClass\n\t\ttype: aClass typeOfClass\n\t\tinstanceVariableNames: ivNamesString\n\t\tclassVariableNames: classVarsString\n\t\tpoolDictionaries: ''\n\t\tcategory: category asSymbol.\n\tself createdClasses add: newClass.\n\t^newClass! !\n\n!ClassFactoryWithOrganization methodsFor: 'creating' stamp: 'LucFabresse 10/24/2010 21:41'!\nnewSubclassOf: aClass instanceVariableNames: ivNamesString classVariableNames:  classVarsString \n\t^self \n\t\tnewSubclassOf: aClass \n\t\tinstanceVariableNames: ivNamesString \n\t\tclassVariableNames: classVarsString \n\t\tcategory:  (self packageName, '-', self defaultCategoryPostfix) asSymbol.! !\n\n!ClassFactoryWithOrganization methodsFor: 'creating' stamp: 'LucFabresse 10/24/2010 21:35'!\nnewSubclassOf: aClass instanceVariableNames: ivNamesString classVariableNames:  classVarsString category: category\n\n\t| newClass |\n\tnewClass := (ClassBuilder new)\n\t\tname: self newName \n\t\tinEnvironment: self organization environment\n\t\tsubclassOf: aClass\n\t\ttype: aClass typeOfClass\n\t\tinstanceVariableNames: ivNamesString\n\t\tclassVariableNames: classVarsString\n\t\tpoolDictionaries: ''\n\t\tcategory: category asSymbol.\n\tself createdClasses add: newClass.\n\t^newClass! !\n\n!ClassFactoryWithOrganization commentStamp: 'LaurentLaffont 5/4/2011 21:25' prior: 0!\nI'm a class to create classes with a category. I'm only used by Tests.\n\nI am similar to ClassFactoryForTestCase (i.e., I can be used in place of a ClassFactoryForTestCase), expect that classes may be created on a specific class category.!\n!ClassFactoryWithOrganization class methodsFor: 'instance creation' stamp: 'LucFabresse 10/24/2010 20:33'!\nnewWithOrganization: aSystemOrganizer\n\t^self new\n\t\torganization: aSystemOrganizer;\n\t\tyourself! !\n\n!ClassFactoryWithOrganizationTest methodsFor: 'accessing' stamp: 'LucFabresse 10/24/2010 19:57'!\ntestedEnvironment\n\t^self testedOrganization environment! !\n\n!ClassFactoryWithOrganizationTest methodsFor: 'accessing' stamp: 'LucFabresse 10/24/2010 20:31'!\ntestedOrganization\n\t^factory organization! !\n\n!ClassFactoryWithOrganizationTest methodsFor: 'setUp-tearDown' stamp: 'LucFabresse 12/19/2010 12:42'!\nsetUp\n\t| environment |\n\tsuper setUp.\n\tenvironment := SystemDictionary withOrganizer: SystemOrganizer new.\n\tfactory := ClassFactoryWithOrganization newWithOrganization: environment organization.\n\t! !\n\n!ClassFactoryWithOrganizationTest methodsFor: 'testing' stamp: 'LucFabresse 10/24/2010 19:48'!\nassertEnvironmentOf: aBehavior\n\tself assert: aBehavior environment = self testedEnvironment! !\n\n!ClassFactoryWithOrganizationTest methodsFor: 'testing' stamp: 'sm 5/25/2011 01:15'!\nexpectedFailures\n\t^ self class allTestSelectors! !\n\n!ClassFactoryWithOrganizationTest methodsFor: 'testing' stamp: 'LucFabresse 10/29/2010 09:09'!\ntestClassCreationInDifferentCategories\n\t| firstThreeClasses lastTwoClasses |\n\t3 timesRepeat: [\n\t\tfactory newSubclassOf: Object instanceVariableNames: '' classVariableNames: '' category: #One].\n\tfirstThreeClasses := factory createdClasses copy.\n\t2 timesRepeat: [\n\t\tfactory newSubclassOf: Object instanceVariableNames: '' classVariableNames: '' category: #Two].\n\tlastTwoClasses := factory createdClasses copyWithoutAll: firstThreeClasses.\n\tself assert: (firstThreeClasses allSatisfy: [:class| class category = #One]).\n\tself assert: (lastTwoClasses allSatisfy: [:class| class category = #Two]).\n\tfactory createdClasses do: [ :aClass |\n\t\tself assertEnvironmentOf: aClass ]! !\n\n!ClassFactoryWithOrganizationTest methodsFor: 'testing' stamp: 'LucFabresse 10/29/2010 09:14'!\ntestClassFastCreationInDifferentCategories\n\t| firstThreeClasses lastTwoClasses |\n\t3 timesRepeat: [\n\t\tfactory newClassInCategory: #One].\n\tfirstThreeClasses := factory createdClasses copy.\n\t2 timesRepeat: [\n\t\tfactory newClassInCategory: #Two].\n\tlastTwoClasses := factory createdClasses copyWithoutAll: firstThreeClasses.\n\tself assert: (firstThreeClasses allSatisfy: [:class| class category =  #One]).\n\tself assert: (lastTwoClasses allSatisfy: [:class| class category = #Two]).\n\tfactory createdClasses do: [ :aClass |\n\t\tself assertEnvironmentOf: aClass ]! !\n\n!ClassFactoryWithOrganizationTest methodsFor: 'testing' stamp: 'LucFabresse 10/24/2010 19:41'!\ntestDefaultCategoryCleanUp\n\t| createdClassNames allClasses |\n\t3 timesRepeat: [\n\t\tfactory newClass].\n\tcreatedClassNames := factory createdClassNames.\n\tfactory cleanUp.\t\n\tself assert: (factory createdClasses allSatisfy: [:class| class isObsolete]). \n\tallClasses := self testedEnvironment allClasses.\n\tself assert: (factory createdClasses noneSatisfy: [:class| allClasses includes: class]).\n\tself deny: (self testedOrganization categories includes: factory defaultCategory). \n\tself deny: (ChangeSet current changedClassNames includesAnyOf: createdClassNames)\n! !\n\n!ClassFactoryWithOrganizationTest methodsFor: 'testing' stamp: 'LucFabresse 10/24/2010 19:50'!\ntestMultipleClassCreation\n\t5 timesRepeat: [\n\t\tfactory newClass].\n\tself assert: (self testedEnvironment allClasses includesAllOf: factory createdClasses).\n\tself assert: factory createdClassNames asSet size = 5.\n\tself assert: (self testedOrganization listAtCategoryNamed: factory defaultCategory) asSet = factory createdClassNames asSet.\n\tfactory createdClasses do: [ :aClass |\n\t\tself assertEnvironmentOf: aClass ]! !\n\n!ClassFactoryWithOrganizationTest methodsFor: 'testing' stamp: 'LucFabresse 10/24/2010 19:50'!\ntestPackageCleanUp\n\t| createdClassNames allClasses |\n\t3 timesRepeat: [\n\t\tfactory newClassInCategory: #One].\n\t2 timesRepeat: [\n\t\tfactory newClassInCategory: #Two].\n\tcreatedClassNames := factory createdClassNames.\n\tfactory cleanUp.\t\n\tself assert: (factory createdClasses allSatisfy: [:class| class isObsolete]). \n\tallClasses := self testedEnvironment allClasses.\n\tself assert: (factory createdClasses noneSatisfy: [:class| allClasses includes: class]).\n\tself assert: (self testedOrganization categoriesMatching: factory packageName, '*') isEmpty. \n\tself deny: (ChangeSet current changedClassNames includesAnyOf: createdClassNames).\n! !\n\n!ClassFactoryWithOrganizationTest methodsFor: 'testing' stamp: 'LucFabresse 10/24/2010 19:51'!\ntestSingleClassCreation\n\t|class elementsInCategoryForTest |\n\tclass := factory \n\t\tnewSubclassOf: Object \n\t\tinstanceVariableNames: 'a b c' \n\t\tclassVariableNames: 'X Y'.\n\tself assert: (self testedEnvironment allClasses includes: class).\n\tfactory createdClasses do: [ :aClass |\n\t\tself assertEnvironmentOf: aClass ].\n\telementsInCategoryForTest := self testedOrganization listAtCategoryNamed: factory defaultCategory. \n\tself assert: elementsInCategoryForTest = {class name}.\n\tself assert: class instVarNames = #(a b c).\n\tself assert: class classPool keys asSet = #(X Y) asSet! !\n\n!ClassFactoryWithOrganizationTest methodsFor: 'testing' stamp: 'LucFabresse 10/24/2010 19:51'!\ntestSingleClassFastCreation\n\t|class elementsInCategoryForTest |\n\tclass := factory newClass.\n\tself assert: (self testedEnvironment allClasses includes: class).\n\telementsInCategoryForTest := self testedOrganization listAtCategoryNamed: factory defaultCategory. \n\tfactory createdClasses do: [ :aClass |\n\t\tself assertEnvironmentOf: aClass ].\n\tself assert: elementsInCategoryForTest = {class name}.\n\tself assert: class instVarNames isEmpty.\n\tself assert: class classPool isEmpty! !\n\n!ClassHierarchyExplorer methodsFor: 'accessing' stamp: 'ssa 3/1/2010 11:52'!\ncentralClass\n\t\"Answer the value of centralClass\"\n\n\tcentralClass isNil ifTrue:[self centralClass: nil].\n\t^ centralClass! !\n\n!ClassHierarchyExplorer methodsFor: 'accessing' stamp: 'ssa 3/1/2010 11:52'!\ncentralClass: anObject\n\t\"Set the value of centralClass\"\n\n\tcentralClass _ anObject! !\n\n!ClassHierarchyExplorer methodsFor: 'accessing' stamp: 'ssa 3/1/2010 11:52'!\ngetCentralItem\n\t^Array with: (ClassHierarchyExplorerWrapper with: self centralClass name: self centralClass name model: self)\n! !\n\n!ClassHierarchyExplorer methodsFor: 'accessing' stamp: 'ssa 3/1/2010 12:22'!\ngetList\n\n\t| classList prev |\n\tclassList _ OrderedCollection new.\n\tself centralClass allSuperclasses reverseDo:  [:aClass | classList add: aClass].\n\tclassList add: self centralClass.\n\tself centralClass subclassesDo: [:aClass| classList add: aClass].\n\tprev _nil.\n\t^(classList collect:[:cls| prev _ ClassHierarchyExplorerWrapper with: cls name: cls name model: self parent: prev]) asArray! !\n\n!ClassHierarchyExplorer methodsFor: 'user interface' stamp: 'ssa 3/1/2010 12:01'!\nexplorerFor: anObject withLabel: label \n\t|  topView listView |\n\tself centralClass: anObject.\n\ttopView := StandardSystemView new\n\t\t\t\tlabel: label; \n\t\t\t\tmodel: self;\n\t\t\t\tyourself.\n\ttopView addSubView:(listView := ExplorerListView\n\t\t\t\t\t\ton: self\n\t\t\t\t\t\tlist: #list\n\t\t\t\t\t\tselected: #getCurrentSelection\n\t\t\t\t\t\tchangeSelected: #noteNewSelection:\n\t\t\t\t\t\tmenu: #genericMenu:\n\t\t\t\t\t\tkeystroke: #explorerKey:from:)\n\t\tin: (0 @ 0 corner: 1 @ 1)\n\t\tborderWidth:1.\n\tlistView autoDeselect: false.\n\t^ topView! !\n\n!ClassHierarchyExplorerWrapper methodsFor: 'testing' stamp: 'ssa 3/1/2010 12:06'!\nhasContents\n\n\t^self item subclasses notEmpty ! !\n\n!ClassHierarchyExplorerWrapper methodsFor: 'accessing' stamp: 'ssa 3/1/2010 12:07'!\nasString\n\n\t^self itemName! !\n\n!ClassHierarchyExplorerWrapper methodsFor: 'accessing' stamp: 'ssa 3/1/2010 12:04'!\ncontents\n\t^ self item subclasses\n\t\tcollect: [:ea| self class with: ea name: ea name model: item parent: self]! !\n\n!ClassHierarchyExplorerWrapper methodsFor: 'printing' stamp: 'ssa 3/1/2010 12:19'!\nprintOn: aStream\n\n\taStream nextPutAll:self class name,' on: ',self item printString! !\n\n!ClassTestCase methodsFor: 'coverage' stamp: 'brp 7/27/2003 12:39'!\nclassToBeTested\n\t\n\tself subclassResponsibility! !\n\n!ClassTestCase methodsFor: 'coverage' stamp: 'brp 7/26/2003 16:35'!\nselectorsNotTested\n\n\t^ self selectorsToBeTested difference: self selectorsTested.\n! !\n\n!ClassTestCase methodsFor: 'coverage'!\nselectorsTested\n\t| literals |\n\tliterals := Set new.\n\tself class\n\t\tselectorsAndMethodsDo: [ :s :m | (s beginsWith: 'test')\n\t\t\tifTrue: [ literals addAll: (m messages)] ].\n\t^ literals asArray sort! !\n\n!ClassTestCase methodsFor: 'coverage' stamp: 'brp 7/26/2003 17:22'!\nselectorsToBeIgnored\n\t^ #(#DoIt #DoItIn:)! !\n\n!ClassTestCase methodsFor: 'coverage' stamp: 'brp 7/27/2003 12:40'!\nselectorsToBeTested\n\n\t^ ( { self classToBeTested. self classToBeTested class } gather: [:c | c selectors]) \n\t\t\tdifference: self selectorsToBeIgnored! !\n\n!ClassTestCase methodsFor: 'tests'!\ntestClassComment\n\tself should: [self targetClass organization hasComment].! !\n\n!ClassTestCase methodsFor: 'tests' stamp: 'brp 12/14/2003 15:51'!\ntestCoverage\n\n\t| untested | \n\tself class mustTestCoverage ifTrue:\n\t\t[ untested := self selectorsNotTested.\n\t\tself assert: untested isEmpty \n\t\tdescription: untested size asString, ' selectors are not covered' ]! !\n\n!ClassTestCase methodsFor: 'tests' stamp: 'md 3/25/2003 23:07'!\ntestNew\n\tself shouldnt: [self targetClass new] raise: Error.! !\n\n!ClassTestCase methodsFor: 'tests' stamp: 'md 3/26/2003 17:24'!\ntestUnCategorizedMethods\n\t| categories slips  |\n\tcategories := self categoriesForClass: self targetClass.\n\tslips := categories select: [:each | each = #'as yet unclassified'].\n\tself should: [slips isEmpty].\t! !\n\n!ClassTestCase methodsFor: 'private' stamp: 'md 1/28/2004 11:32'!\ncategoriesForClass: aClass\n\n ^ aClass organization allMethodSelectors collect: \n\t\t\t[:each |  aClass organization categoryOfElement: each].\n! !\n\n!ClassTestCase methodsFor: 'private' stamp: 'lr 3/14/2010 21:13'!\ntargetClass\n\t[ ^ self classToBeTested ]\n\t\ton: Error\n\t\tdo: [ \n\t\t\t| className |\n\t\t\tclassName := self class name asText copyFrom: 0 to: self class name size - 4.\n\t\t\t^ Smalltalk globals at: className asString asSymbol ]! !\n\n!ClassTestCase commentStamp: 'brp 7/26/2003 16:57' prior: 0!\nThis class is intended for unit tests of individual classes and their metaclasses.\n\nIt provides methods to determine the coverage of the unit tests.\n\nSubclasses are expected to re-implement #classesToBeTested and #selectorsToBeIgnored.\n\nThey should also implement to confirm that all methods have been tested.\n\n#testCoverage\n\n\tsuper testCoverage.\n\n!\n!ClassTestCase class methodsFor: 'testing' stamp: 'md 2/22/2006 14:21'!\nisAbstract\n\t\"Override to true if a TestCase subclass is Abstract and should not have\n\tTestCase instances built from it\"\n\n\t^self name = #ClassTestCase\n\t\t\t! !\n\n!ClassTestCase class methodsFor: 'testing' stamp: 'brp 12/14/2003 15:50'!\nmustTestCoverage\n\n\t^ false! !\n\n!CodeHolder methodsFor: 'what to show' stamp: 'ssa 9/3/2008 11:02'!\naddContentsTogglesTo: aMenu \n\t\"Add updating menu toggles governing contents to aMenu.\"\n\tself contentsSymbolQuints\n\t\tdo: [:aQuint | aQuint == #-\n\t\t\t\tifTrue: [aMenu addLine]\n\t\t\t\tifFalse: [Smalltalk isMorphic\n\t\t\t\t\t\tifTrue: []\n\t\t\t\t\t\tifFalse: [aMenu\n\t\t\t\t\t\t\t\tadd: (('<yes>*' match: (self perform: aQuint third)) ifTrue: ['*'] ifFalse: ['']), aQuint fourth\n\t\t\t\t\t\t\t\ttarget: self\n\t\t\t\t\t\t\t\tselector: #contentsSymbol: \n\t\t\t\t\t\t\t\targumentList: { aQuint first } ]]]! !\n\n!CodeHolder methodsFor: 'what to show' stamp: 'ssa 9/3/2008 10:29'!\nofferWhatToShowMenu\n\t\"Offer a menu governing what to show\"\n\t| aMenu |\n\tSmalltalk isMorphic\n\t\tifTrue: []\n\t\tifFalse: [aMenu := CustomMenu new.\n\t\t\tself addContentsTogglesTo: aMenu.\n\t\t\taMenu title: 'What to show' translated.\n\t\t\taMenu invokeOn: self.\n\t\t\tself changed: #contents ]! !\n\n!CodeHolder methodsFor: 'tiles' stamp: 'ssa 9/3/2008 11:03'!\naddModelItemsToWindowMenu: aMenu\n\t\"Add model-related item to the window menu\"\n\n\tsuper addModelItemsToWindowMenu: aMenu. \n! !\n\n!Collection methodsFor: 'accessing' stamp: 'ssa 3/12/2010 17:57'!\natRandom\n\t\"Answer a random element of the receiver.  Uses a shared random \n\tnumber generator owned by class Collection.  If you use this a lot, \n\tdefine your own instance of Random and use #atRandom:.  Causes \n\tan error if self has no elements.\"\n\n\t^ self atRandom: self class randomForPicking \n\n\"Examples:\n\t#('one' 'or' 'the' 'other') atRandom\n\t(1 to: 10) atRandom\n\t'Just pick one of these letters at random' atRandom\n\t#(3 7 4 9 21) asSet atRandom\t\t(just to show it also works for Sets)\n\"! !\n\n!Collection methodsFor: 'converting'!\nasString: aBlock withDelimiter: aDelimiter\n\t\"kwa -- 30 November 1988, Answer a string with each of the objects in the receiver (converted to strings by aBlock) separated by aDelimiter.\"\n\t\"KSC Extension\"\n\n\t| aStream |\n\tself isEmpty ifTrue: [^''].\n\taStream _ WriteStream on: (String new: 64).\n\tself do: [:each |\n\t\taStream nextPutAll: (aBlock value: each).\n\t\taStream nextPutAll: aDelimiter].\n\taStream skip: aDelimiter size negated.\n\t^aStream contents\n\n\t\"#(13 2 3) asString: [:each | (each * 2) printString] withDelimiter: ', '\"! !\n\n!Collection methodsFor: 'converting'!\nasStringWithDelimiter: aDelimiter\n\t\"kwa -- 13 May 1988, Answer a string of from the objects in the receiver separated by aDelimiter.\"\n\t\"KSC Extension\"\n\n\t| aStream |\n\tself isEmpty ifTrue: [^''].\n\taStream _ WriteStream on: (String new: 64).\n\tself do: [:each |\n\t\t(each isKindOf: String) \n\t\t\tifTrue: [aStream nextPutAll: each asString]\n\t\t\tifFalse: [each printOn: aStream].\n\t\taStream nextPutAll: aDelimiter].\n\taStream skip: aDelimiter size negated.\n\t^aStream contents\n\n\t\"#(a b 2 3) asStringWithDelimiter: ', '\"! !\n\n!Collection methodsFor: 'converting'!\nasText: aBlock withDelimiter: aDelimiter\n\t\"kwa -- 30 November 1988, Answer a text with each of the objects in the receiver (converted to texts by aBlock) separated by aDelimiter.\"\n\t\"KSC Extension\"\n\n\t| aDelimiterText first text |\n\tself isEmpty ifTrue: [^'' asText].\n\taDelimiterText _ aDelimiter asText.\n\tfirst _ true.\n\tself do: [:each |\n\t\tfirst \n\t\t\tifTrue: \n\t\t\t\t[text _ (aBlock value: each) asText.\n\t\t\t\tfirst _ false]\n\t\t\tifFalse:\n\t\t\t\t[text _ text, aDelimiterText, (aBlock value: each) asText]].\n\t^text\n\n\t\"(#(13 2 3) asText: [:each | (each * 2) printString asText allBold] withDelimiter: ', ') asDisplayText displayAt: Sensor cursorPoint\"! !\n\n!Collection methodsFor: 'enumerating'!\ncollect: aBlock if: aQualifyingBlock\n\t\"kwa -- 1 February 1989,\n\tEvaluate aQualifyingBlock with each of the values of the receiver as the argument.  If the result is true, collect the resulting values of aBlock (using the same value as the argument) into a collection that is like the receiver.  Answer the new collection.\"\n\t\"KSC Extension\"\n\n\t| newCollection |\n\tnewCollection _ self species new.\n\tself do: [:each | \n\t\t(aQualifyingBlock value: each)\n\t\t\tifTrue: [newCollection add: (aBlock value: each)]].\n\t^newCollection! !\n\n!Collection methodsFor: '*Sly3' stamp: 'dmu 9/16/2010 23:41'!\nasEnsembleOfElements\n\t^ Sly3Ensemble withMembersFrom: self! !\n\n!Collection methodsFor: '*Sly' stamp: 'ssa 7/7/2010 19:50'!\ndeactivateEnsembleSendsDuring: aBlock\n\t\"disable messaging dispatching to members and just send it to myself during aBlock\"\n\t\n\t0 primitiveSetExtraPreheaderWord:  self.\n\taBlock value.\n\tself  primitiveSetExtraPreheaderWord:  self. \n! !\n\n!Collection methodsFor: '*Sly' stamp: 'dmu 9/17/2010 11:04'!\nparallelCollect: aBlock\n\t\"#(1 2 3 4 5) asOrderedCollection parallelCollect:[:e| e * 2]\"\n\t| results task  barrier result interlock |\n\t\"true ifTrue: [^ self collect: aBlock.].\" \"for debugging\"\n\tself ifEmpty: [^ self].\n\t(Sly3 serializeForDebugging or: [self size = 1]) ifTrue: [^ self collect: aBlock].\n\tresults _ self species new.\n\tbarrier _ RVMBarrier new signalsNeededToPass: self size.\n\tinterlock _ Semaphore forMutualExclusion.\n\tself do:[:each|\n\t\ttask _ [\n\t\t\tresult _ ([aBlock copy fixTemps value: each] ifCurtailed: [barrier signal.\n\t\t\t\t\"Tasks do:[:eachTask| eachTask terminate].\n\t\t\t\tTasks _ OrderedCollection new.\"\n\t\t\t\t \"self error: 'Yipes!! An ensemble is NLRing back.'.\" ] ).\n\t\t\tinterlock critical: [results add: result].\n\t\t\tbarrier signal] asSlyMemberProcess.\n\t\ttask resume].\n\tbarrier wait.\n\t^results! !\n\n!Collection methodsFor: '*Sly' stamp: 'dmu 9/1/2010 15:17'!\nproduct\n\t| r |\n\tr _ 1.\n\tself do: [:e| r _ r * e].\n\t^ r! !\n\n!Collection methodsFor: '*Sly' stamp: 'dmu 9/8/2010 21:58'!\nsentToEnsemble: aMessage\n\t| r |\n\tr _ Sly3EnsembleMessageDispatcher dispatch: (Sly3UnprocessedEnsembleMessage fromMessage: aMessage members: self).\n\t^ r! !\n\n!Collection methodsFor: 'removing' stamp: 'ssa 9/9/2009 12:16'!\nremoveAll: aCollection ifAbsent:aBlock\n\t\"Remove each element of aCollection from the receiver. If successful for \n\teach, answer aCollection. Otherwise create an error notification.\n\tArrayedCollections cannot respond to this message.\"\n\n\taCollection do: [:each | self remove: each ifAbsent: aBlock].\n\t^ aCollection! !\n\n!Collection methodsFor: 'outlining' stamp: 'ssa 9/10/2009 13:47'!\nsubobjects\n\n\t^self! !\n\n!Collection methodsFor: '*RVM-converting' stamp: 'dmu 9/16/2010 23:43'!\ndoInParallel: aBlock\n\tself parallelCollect: aBlock! !\n\n!Collection methodsFor: '*packageinfo-base' stamp: 'ab 9/30/2002 19:26'!\ngather: aBlock\n\t^ Array streamContents:\n\t\t[:stream |\n\t\tself do: [:ea | stream nextPutAll: (aBlock value: ea)]]! !\n\n!Color class methodsFor: 'other' stamp: 'ssa 9/13/2008 16:04'!\ncolorChart\n\n\t^ColorChart! !\n\n!Color class methodsFor: 'other' stamp: 'ssa 9/13/2008 16:04'!\ncolorChart: aChart\n\n\tColorChart _ aChart! !\n\n!Color class methodsFor: 'color from user' stamp: 'ssa 9/13/2008 15:52'!\nfromUser\n\t\"Displays a color palette of colors, waits for a mouse click, and returns the selected color. Any pixel on the Display can be chosen, not just those in the color palette.\"\n\t\"Note: Since the color chart is cached, you may need to do 'ColorChart _ nil' after changing the oldColorPaletteForDepth:extent: method.\"\n\t\"Color fromUser\"\n\n\t| d startPt save tr oldColor c here s |\n\td _ Display depth.\n\t((ColorChart == nil) or: [ColorChart depth ~= Display depth]) \n\t\tifTrue: [ColorChart _ self oldColorPaletteForDepth: d extent: (2 * 144)@80].\n\tstartPt _ Sensor cursorPoint \"y < Display center y \n\t\tifTrue: [startPt _ 0@(Display boundingBox bottom - ColorChart height)]\n\t\tifFalse: [startPt _ 0@0]\".\n\n\tsave _ Form fromDisplay: (startPt extent: ColorChart extent).\n\tColorChart displayAt: startPt.\n\ttr _ ColorChart extent - (50@19) corner: ColorChart extent.\n\ttr _ tr translateBy: startPt.\n\n\toldColor _ nil.\n\t[Sensor anyButtonPressed] whileFalse: [\n\t\tc _ Display colorAt: (here _ Sensor cursorPoint).\n\t\t(tr containsPoint: here)\n\t\t\tifFalse: [Display fill: (0@61+startPt extent: 20@19) fillColor: c]\n\t\t\tifTrue: [\n\t\t\t\tc _ Color transparent.\n\t\t\t\tDisplay fill: (0@61+startPt extent: 20@19) fillColor: Color white].\n\t\tc = oldColor ifFalse: [\n\t\t\tDisplay fillWhite: (20@61 + startPt extent: 135@19).\n\t\t\tc isTransparent\n\t\t\t\tifTrue: [s _ 'transparent']\n\t\t\t\tifFalse: [s _ c shortPrintString.\n\t\t\t\t\t\ts _ s copyFrom: 7 to: s size - 1].\n\t\t\ts displayAt: 20@61 + startPt.\n\t\t\toldColor _ c]].\n\tsave displayAt: startPt.\n\tSensor waitNoButton.\n\t^ c\n! !\n\n!ColorForm methodsFor: 'private' stamp: 'ssa 11/26/2009 22:44'!\nsetExtent: extent depth: bitsPerPixel\n\t\"Create a virtual bit map with the given extent and bitsPerPixel.\"\n\n\t| bpp |\n\tbpp _ bitsPerPixel.\n\tbpp > 8 ifTrue: [self error: 'ColorForms only support depths up to 8 bits, proceed for 8 bits'.\n\t\tbpp _ 8].\n\tsuper setExtent: extent depth: bpp.\n! !\n\n!ColorMap class methodsFor: 'instance creation' stamp: 'ar 5/27/2000 20:08'!\nmappingToARGB: srcBitMasks\n\t\"Return a ColorMap mapping from srcBitMasks into canonical ARGB space\"\n\t^self mappingFrom: srcBitMasks to: #(16rFF0000 16rFF00 16rFF 16rFF000000)! !\n\n!ColorMap class methodsFor: 'instance creation' stamp: 'ar 5/4/2001 15:59'!\nmasks: maskArray shifts: shiftArray\n\t^self shifts: shiftArray masks: maskArray colors: nil.! !\n\n!CompiledMethod methodsFor: 'printing' stamp: 'ads 1/24/2011 13:02'!\nlongPrintOn: aStream indent: tabs\n\t\"List of all the byte codes in a method with a short description of each\" \n\naStream nextPutAll: (RVMPrimitivesNeededForBootstrapping printPrefixFor: self).\n\tself isQuick ifTrue: \n\t\t[self isReturnSpecial ifTrue:\n\t\t\t[^ aStream tab: tabs; nextPutAll: 'Quick return ' , \n\t\t\t\t(#('self' 'true' 'false' 'nil' '-1' '0' '1' '2') at: self primitive - 255)].\n\t\t^ aStream nextPutAll: 'Quick return field ' , self returnField printString , ' (0-based)'].\n\n\tself primitive = 0 ifFalse: [\n\t\taStream tab: tabs.\n\t\tself printPrimitiveOn: aStream.\n\t].\n\t(InstructionPrinter on: self) indent: tabs; printInstructionsOn: aStream.\n! !\n\n!CompiledMethod methodsFor: 'printing' stamp: 'ssa 10/3/2008 18:13'!\nsymbolic\n\t\"Answer a String that contains a list of all the byte codes in a method \n\twith a short description of each.\"\n\n\t| aStream |\n\taStream _ WriteStream on: (String new: 1000).\n\tself longPrintOn: aStream.\n\t^aStream contents! !\n\n!CompiledMethod methodsFor: 'printing' stamp: 'dmu 9/7/2010 14:23'!\ntimeStamp\n\t\"Answer the authoring time-stamp for the given method, retrieved from the sources or changes file. Answer the empty string if no time stamp is available.\"\n\n\t\"(CompiledMethod compiledMethodAt: #timeStamp) timeStamp\"\n\n\t| position file preamble stamp tokens tokenCount |\n\tself fileIndex == 0 ifTrue: [^ String new].  \"no source pointer for this method\"\n\tposition _ self filePosition.\n\tfile _ SourceFiles at: self fileIndex.\n\tfile ifNil: [^ String new].  \"sources file not available\"\n\t\"file does not exist happens in secure mode\"\n\tfile _ [file readOnlyCopy] on: FileDoesNotExistException do:[:ex| nil].\n\n\tfile ifNil: [^ String new].\n\tfile position: (0 max: position - 150).  \"Skip back to before the preamble\"\n\t\t[file position < (position - 1)]  \"then pick it up from the front\"\n\t\t\twhileTrue: [preamble _ file nextChunk].\n\t\tstamp _ String new.\n\t\ttokens _ (preamble findString: 'methodsFor:' startingAt: 1) > 0\n\t\t\tifTrue: [Scanner new scanTokens: preamble]\n\t\t\tifFalse: [Array new  \"ie cant be back ref\"].\n\t\t(((tokenCount _ tokens size) between: 7 and: 8) and: [(tokens at: tokenCount - 5) = #methodsFor:])\n\t\t\tifTrue:\n\t\t\t\t[(tokens at: tokenCount - 3) = #stamp:\n\t\t\t\t\tifTrue: [\"New format gives change stamp and unified prior pointer\"\n\t\t\t\t\t\t\tstamp _ tokens at: tokenCount - 2]].\n\t\t((tokenCount between: 5 and: 6) and: [(tokens at: tokenCount - 3) = #methodsFor:])\n\t\t\tifTrue:\n\t\t\t\t[(tokens at: tokenCount  - 1) = #stamp:\n\t\t\t\t\tifTrue: [\"New format gives change stamp and unified prior pointer\"\n\t\t\t\t\t\tstamp _ tokens at: tokenCount]].\n\tfile close.\n\t^ stamp\n! !\n\n!CompiledMethod methodsFor: 'source code management' stamp: 'dmu 9/7/2010 14:23'!\nputSource: sourceStr fromParseNode: methodNode inFile: fileIndex withPreamble: preambleBlock\n  \"Store the source code for the receiver on an external file.\n  If no sources are available, i.e., SourceFile is nil, then store\n  temp names for decompilation at the end of the method.\n  If the fileIndex is 1, print on *.sources;  if it is 2, print on *.changes,\n  in each case, storing a 4-byte source code pointer at the method end.\"\n\n  | file remoteString  st80str |\n  (SourceFiles == nil or: [(file _ SourceFiles at: fileIndex) == nil]) ifTrue:\n    [^ self become: (\n      (self class methodDictionary includesKey: #copyWithTempsFromMethodNode:) \n        ifTrue: [self copyWithTempsFromMethodNode: methodNode]\n        ifFalse: [self copyWithTempNames: methodNode tempNames]\n    )].\n\n  SmalltalkImage current assureStartupStampLogged.\n  file safelyDo: [\n    file setToEnd.\n\n    preambleBlock value: file.  \"Write the preamble\"\n    (DialectMethodNode notNil and: [methodNode isKindOf: DialectMethodNode])\n      ifTrue:\n        [\"This source was parsed from an alternate syntax.\n        We must convert to ST80 before logging it.\"\n        st80str _ (DialectStream dialect: #ST80 contents: [:strm | methodNode printOn: strm])\n        asString.\n        remoteString _ RemoteString newString: st80str\n        onFileNumber: fileIndex toFile: file]\n      ifFalse:\n        [remoteString _ RemoteString newString: sourceStr\n        onFileNumber: fileIndex toFile: file].\n\n    file nextChunkPut: ' '.\n    InMidstOfFileinNotification signal ifFalse: [file flush].\n    self checkOKToAdd: sourceStr size at: remoteString position.\n    self setSourcePosition: remoteString position inFile: fileIndex\n    ]! !\n\n!CompositePackageInfo methodsFor: 'accessing' stamp: 'ads 12/10/2010 12:03'!\nname\n\t^ name! !\n\n!CompositePackageInfo methodsFor: 'accessing' stamp: 'ads 12/10/2010 12:02'!\nname: aString\n\tname := aString.! !\n\n!CompositePackageInfo methodsFor: 'accessing' stamp: 'ads 12/10/2010 12:03'!\npackageNames: aCollection\n\t\"Just a shortcut for setting my packages.\"\n\tself packages: (aCollection collect: [:n | PackageInfo named: n]).! !\n\n!CompositePackageInfo methodsFor: 'accessing' stamp: 'ads 12/2/2010 14:46'!\npackages\n\t^ packages! !\n\n!CompositePackageInfo methodsFor: 'accessing' stamp: 'ads 12/2/2010 14:45'!\npackages: aCollection\n\tpackages := aCollection.! !\n\n!CompositePackageInfo methodsFor: 'classes' stamp: 'ads 12/2/2010 14:44'!\nclasses\n\t^ packages\n\t\tifNil: [Smalltalk allClasses]\n\t\tifNotNil: [packages gather: [:p | p classes]]! !\n\n!CompositePackageInfo methodsFor: 'classes' stamp: 'ads 12/5/2010 22:59'!\nsystemCategories\n\t^ packages\n\t\tifNil: [SystemOrganization categories]\n\t\tifNotNil: [packages gather: [:p | p systemCategories]]! !\n\n!CompositePackageInfo methodsFor: 'extension methods' stamp: 'ads 12/3/2010 11:20'!\nextensionCategoriesForClass: cls\n\t^ packages\n\t\tifNil: [{}]\n\t\tifNotNil: [packages gather: [:p | p extensionCategoriesForClass: cls]]! !\n\n!CompositePackageInfo methodsFor: 'extension methods' stamp: 'ads 1/13/2011 13:31'!\nextensionClasses\n\t^ packages\n\t\tifNil: [{}]\n\t\tifNotNil: [((packages gather: [:p | p extensionClasses]) asSet asSortedCollection: [:a :b | a name < b name]) asArray]! !\n\n!CompositePackageInfo methodsFor: 'extension methods' stamp: 'ads 12/2/2010 14:44'!\nextensionMethods\n\t^ packages\n\t\tifNil: [{}]\n\t\tifNotNil: [packages gather: [:p | p extensionMethods]]! !\n\n!CompositePackageInfo methodsFor: 'extension methods' stamp: 'ads 12/6/2010 01:02'!\nisYourClassExtension: categoryName\n\t^ packages\n\t\tifNil: [false]\n\t\tifNotNil: [packages anySatisfy: [:p | p isYourClassExtension: categoryName]]! !\n\n!CompositePackageInfo methodsFor: 'testing' stamp: 'ads 12/14/2010 10:16'!\nincludesClass: aClass\n\t^ self includesSystemCategory: aClass theNonMetaClass category! !\n\n!CompositePackageInfo methodsFor: 'testing' stamp: 'ads 12/14/2010 10:15'!\nincludesMethod: aSymbol ofClass: aClass\n\taClass ifNil: [^ false].\n\t^ self\n\t\tincludesMethodCategory: ((aClass organization categoryOfElement: aSymbol)\n\t\t\t\t\t\t\t\t\t\tifNil: [' '])\n\t\tofClass: aClass! !\n\n!CompositePackageInfo methodsFor: 'testing' stamp: 'ads 12/14/2010 10:15'!\nincludesMethodCategory: categoryName ofClass: aClass\n\t^ (self isYourClassExtension: categoryName)\n\t\tor: [(self includesClass: aClass)\n\t\t\t\tand: [(self isForeignClassExtension: categoryName) not]]! !\n\n!CompositePackageInfo methodsFor: 'testing' stamp: 'ads 12/14/2010 10:17'!\nincludesSystemCategory: categoryName\n\t^ packages ifNil: [true] ifNotNil: [packages anySatisfy: [:p | p includesSystemCategory: categoryName]]! !\n\n!CompositePackageInfo methodsFor: 'testing' stamp: 'ads 12/14/2010 10:18'!\nisForeignClassExtension: categoryName\n\t^ categoryName first = $* and: [(self isYourClassExtension: categoryName) not]! !\n\n!CompositePackageInfo methodsFor: 'comparing' stamp: 'ads 1/26/2011 13:05'!\n= other\n\t^ self species = other species and: [self name = other name and: [self packages = other packages]]! !\n\n!CompositePackageInfo methodsFor: 'comparing' stamp: 'ads 1/26/2011 13:06'!\nhash\n\t^ self name hash bitXor: self packages hash! !\n\n!CompositePackageInfo methodsFor: 'reverting' stamp: 'ads 1/26/2011 16:16'!\nrevertToVersionBeforeTeam: team\n\tself extensionMethods do: [:m | team revertToOldVersionOrRemove: m].\n\tself classes do: [:cls | cls removeFromSystem].\n\tself systemCategories do: [:cat | SystemOrganization removeCategoryIfEmpty: cat].\n! !\n\n!CompositePackageInfo methodsFor: 'composing' stamp: 'ads 12/5/2010 23:38'!\n, p\n\t^ self class new\n\t\tpackages: {self. p};\n\t\tyourself! !\n\n!CompositePackageInfo methodsFor: 'composing' stamp: 'ads 1/26/2011 14:15'!\nincludesPackage: p\n\t^ self = p or: [self packages anySatisfy: [:myPackage | myPackage includesPackage: p]]! !\n\n!CompositePackageInfo commentStamp: 'ads 12/14/2010 09:16' prior: 0!\nContains multiple packages (see the PackageInfo class).\n\nTo specify that you want a CompositePackageInfo containing all classes in the entire image, leave the collection of packages as nil.\n\nDoesn't support the entire PackageInfo protocol yet; just the stuff we needed to save code out to text files.!\n!CompositePackageInfo class methodsFor: 'as yet unclassified' stamp: 'ads 12/10/2010 11:58'!\nforEntireImage\n\t^ self new\n\t\tname: 'EntireImage';\n\t\tyourself ! !\n\n!CompositePackageInfo class methodsFor: 'as yet unclassified' stamp: 'ads 12/10/2010 11:58'!\nforRVMBootstrapping\n\t^ self new\n\t\tname: 'RVMBootstrapping';\n\t\tpackageNames: {'RVMBootstrap'. 'SlyBootstrap'. 'Sly3Bootstrap'};\n\t\tyourself\n! !\n\n!ConfigurationOfBenchmarking methodsFor: 'baselines' stamp: 'StefanMarr 7/8/2011 22:34'!\nbaseline01: spec\n\t\"<version: '0.1-baseline'>\"\n\n\tspec for: #'common' do: [\n\t\tspec blessing: #'baseline'.\n\t\tspec repository: 'http://www.squeaksource.com/SMark'.\n\t\tself class subPackages do: [:pkg | spec package:  pkg ].\n\t].\n\n\tspec for: #pharo do: [\n\t\tspec project: 'OSProcess'\n\t\t\twith:\n\t\t\t\t[ spec\n\t\t\t\t\tclassName: 'ConfigurationOfOSProcess';\n\t\t\t\t\tfile: 'ConfigurationOfOSProcess';\n\t\t\t\t\trepository: 'http://www.squeaksource.com/MetacelloRepository' ]\n\t\t]! !\n\n!ConfigurationOfBenchmarking methodsFor: 'symbolic versions' stamp: 'StefanMarr 7/8/2011 22:34'!\ndevelopment: spec\n\t\"<symbolicVersion: #'development'>\"\n\n\tspec for: #'common' version: '0.1'.\n! !\n\n!ConfigurationOfBenchmarking methodsFor: 'accessing' stamp: 'StefanMarr 5/14/2011 12:19'!\nproject\n\n\t^ project ifNil: [ | constructor |\n\t\t\"Bootstrap Metacello if it is not already loaded\"\n\t\t(self class baseConfigurationClassIfAbsent: []) ensureMetacello.\n\t\t\"Construct Metacello project\"\n\t\tconstructor := (Smalltalk at: #MetacelloVersionConstructor) on: self.\n\t\tproject := constructor project.\n\t\tproject loadType: #linear. \"change to #atomic if desired\"\n\t\tproject ]! !\n\n!ConfigurationOfBenchmarking methodsFor: 'versions' stamp: 'StefanMarr 7/8/2011 22:34'!\nversion01: spec\n\t\"<version: '0.1' imports: #('0.1-baseline' )>\"\n\n\tspec for: #'common' do: [\n\t\tspec blessing: #'development'.\n\t\tspec description: ''.\n\t\tspec author: 'StefanMarr'.\n\t\tspec timestamp: '5/14/2011 12:19'.\n\t].! !\n\n!ConfigurationOfBenchmarking class methodsFor: 'development support' stamp: 'StefanMarr 7/8/2011 22:34'!\nDevelopmentSupport\n\n\"See the methods in the 'development support' category on the class-side of MetacelloBaseConfiguration. Decide what development support methods you would like to use and copy them the the class-side of your configuration.\"\n\t\"<apiDocumentation>\"\n! !\n\n!ConfigurationOfBenchmarking class methodsFor: 'development support' stamp: 'StefanMarr 7/8/2011 22:35'!\nvalidate\n\t\"Check the configuration for Errors, Critical Warnings, and Warnings (see class comment for MetacelloMCVersionValidator for more information). \n\tErrors identify specification issues that will result in unexpected behaviour when you load the configuration. \n\tCritical Warnings identify specification issues that may result in unexpected behavior when you load the configuration.\n\tWarnings identify specification issues that are technically correct, but are worth take a look at.\"\n\n\t\"self validate\"\n\n\t\"<apiDocumentation>\"\n\tself ensureMetacello.\n\t^ ((Smalltalk at: #MetacelloToolBox) validateConfiguration: self debug: #() recurse: false) explore! !\n\n!ConfigurationOfBenchmarking class methodsFor: 'private' stamp: 'StefanMarr 5/14/2011 12:19'!\nbaseConfigurationClassIfAbsent: aBlock\n\n\t^Smalltalk\n\t\tat: #MetacelloBaseConfiguration\n\t\tifAbsent: [ \n\t\t\tself ensureMetacelloBaseConfiguration.\n\t\t\tSmalltalk at: #MetacelloBaseConfiguration ifAbsent: aBlock ].\n! !\n\n!ConfigurationOfBenchmarking class methodsFor: 'private' stamp: 'StefanMarr 5/14/2011 12:19'!\nensureMetacello\n\n\t(self baseConfigurationClassIfAbsent: []) ensureMetacello! !\n\n!ConfigurationOfBenchmarking class methodsFor: 'private' stamp: 'StefanMarr 5/14/2011 12:19'!\nensureMetacelloBaseConfiguration\n\n\tSmalltalk\n\t\tat: #MetacelloBaseConfiguration\n\t\tifAbsent: [ \n\t\t\t| repository version |\n\t\t\trepository := MCHttpRepository location: 'http://seaside.gemstone.com/ss/metacello' user: '' password: ''.\n\t\t\trepository\n\t\t\t\tversionReaderForFileNamed: 'Metacello-Base-DaleHenrichs.2.mcz'\n\t\t\t\tdo: [ :reader | \n\t\t\t\t\tversion := reader version.\n\t\t\t\t\tversion load.\n\t\t\t\t\tversion workingCopy repositoryGroup addRepository: repository ] ]! !\n\n!ConfigurationOfBenchmarking class methodsFor: 'metacello tool support' stamp: 'StefanMarr 5/14/2011 12:19'!\nisMetacelloConfig\n\t\"Answer true and the Metacello tools will operate on you\"\n\t\n\t^true! !\n\n!ConfigurationOfBenchmarking class methodsFor: 'loading' stamp: 'StefanMarr 7/8/2011 22:35'!\nload\n\t\"Load the #stable version defined for this platform. The #stable version is the version that is recommended to be used on this platform.\"\n\n\t\"self load\"\n\n\t\"<apiDocumentation>\"\n\t^(self project version: #stable) load! !\n\n!ConfigurationOfBenchmarking class methodsFor: 'loading' stamp: 'StefanMarr 7/8/2011 22:35'!\nloadBleedingEdge\n\t\"Load the latest versions of the mcz files defined for this project. It is not likely that the #bleedingEdge has been tested.\"\n\n\t\"self loadBleedingEdge\"\n\n\t\"<apiDocumentation>\"\n\t^(self project version: #bleedingEdge) load! !\n\n!ConfigurationOfBenchmarking class methodsFor: 'loading' stamp: 'StefanMarr 7/8/2011 22:35'!\nloadDevelopment\n\t\"Load the #development version defined for this platform. The #development version will change over time and is not expected to be stable.\"\n\n\t\"self loadDevelopment\"\n\n\t\"<apiDocumentation>\"\n\t^(self project version: #development) load! !\n\n!ConfigurationOfBenchmarking class methodsFor: 'transporter' stamp: 'StefanMarr 5/25/2011 11:49'!\nsaveWithTransporter\n\t\"Will save the package in file-out format using the Transporter infrastructure\"\n\tself transporters\n\t\tifNotNilDo: [:transporters | \n\t\t\ttransporters do: [:t | t saveNoPopup ]].! !\n\n!ConfigurationOfBenchmarking class methodsFor: 'transporter' stamp: 'StefanMarr 7/8/2011 22:27'!\nsubPackages\n\t\"Specifies the names of all logical subpackages of the Benchmarking package.\"\n\t\"TODO: have a versioning for this, to better comply with the Metacello approach.\"\n\t^ {\t'SMark'.\n\t\t'NPB'.\n\t\t'CL-Benchmarks-Game'.\n\t}! !\n\n!ConfigurationOfBenchmarking class methodsFor: 'transporter' stamp: 'sm 7/8/2011 22:39'!\ntransporters\n\t\"Returns the transporters that define how to file out the different packages for versioning with Git.\"\n\tSmalltalk at: #Transporter ifPresent: [ :tpCls |\n\t\t| package packages |\n\t\tpackage := CompositePackageInfo new.\n\t\tpackage name: 'Benchmarking'.\n\t\t\n\t\tpackages := { PackageInfo named: 'ConfigurationOfBenchmarking' }.\n\t\tpackages := packages, (self subPackages collect: [:pkg | PackageInfo named: pkg ]).\n\t\t\t\t\n\t\tpackage packages: packages.\t\t\n\t\t^ {Transporter forPackage: package}.\n\t].\n\t^ nil.! !\n\n!ConfigurationOfBenchmarking class methodsFor: 'transporter' stamp: 'StefanMarr 5/25/2011 11:48'!\ntransportersForFileOutMenu\n\t^ self transporters! !\n\n!ConfigurationOfBenchmarking class methodsFor: 'accessing' stamp: 'StefanMarr 5/14/2011 12:19'!\nproject\n\n\t^self new project! !\n\n!ContextPart methodsFor: 'debugger access' stamp: 'ads 1/24/2011 13:02'!\ntempsAndValues\n\t\"Return a string of the temporary variabls and their current values\"\n\t| aStream |\n\taStream _ WriteStream on: (String new: 100).\n\tself tempNames\n\t\tdoWithIndex: [:title :index |\n\t\t\taStream nextPutAll: title; nextPut: $:; space; tab.\n\t\t\taStream nextPutAll:(RVMPrimitivesNeededForBootstrapping printPrefixFor:(self tempAt: index)).\n\t\t\t(self tempAt: index) printOn: aStream.\n\t\t\taStream cr].\n\t^aStream contents! !\n\n!ContextPart methodsFor: 'system simulation' stamp: 'ssa 9/7/2009 14:34'!\nrunSimulated: aBlock contextAtEachStep: block2\n\t\"Simulate the execution of the argument, aBlock, until it ends. aBlock \n\tMUST NOT contain an '^'. Evaluate block2 with the current context \n\tprior to each instruction executed. Answer the simulated value of aBlock.\"\n\n\t| current |\n\t(aBlock isBlock and: [aBlock hasMethodReturn])\n\t\tifTrue: [self error: 'simulation of blocks with ^ can run loose'].\n\tcurrent _ aBlock asContext.\n\tcurrent privSender: self.\n\t[current == self]\n\t\twhileFalse:\n\t\t\t[block2 value: current.\n\t\t\tcurrent _ current step].\n\t^ self pop! !\n\n!ContextPart methodsFor: 'private-exceptions' stamp: 'ssa 1/21/2010 16:20'!\nunwindTo: aContext\n\n\t| ctx unwindBlock |\n\tctx := self.\n\t[(ctx _ ctx findNextUnwindContextUpTo: aContext) isNil] whileFalse: [\n\t\tunwindBlock := ctx tempAt: 1.\n\t\tunwindBlock == nil ifFalse: [\n\t\t\tctx tempAt: 1 put: nil.\n\t\t\tunwindBlock value]\n\t].\n! !\n\n!ContextPart methodsFor: 'as yet unclassified' stamp: 'ssa 9/3/2008 11:42'!\nerrorReportOn: foo! !\n\n!ContextPart methodsFor: '*RVMBootstrap' stamp: 'dmu 9/22/2010 22:18'!\ncontextStackIn: aProcess\n\t\"Answer an Array of the contexts on the receiver's sender chain.\"\n\n\t^self stackOfSize: 100000 in: aProcess! !\n\n!ContextPart methodsFor: '*RVMBootstrap' stamp: 'dmu 9/22/2010 22:38'!\nsenderOrSlyInvokerAndProcessIn: aProcess\n\t\"Answer the context that sent the message that created the receiver.\"\n\t\"Follow up the process parent chain to the invoking ensemble process.\"\n\t^sender ifNotNil: [sender->aProcess] ifNil: [ aProcess parent ifNil: [nil] ifNotNil: [aProcess parent suspendedContext->aProcess parent]]! !\n\n!ContextPart methodsFor: '*RVMBootstrap' stamp: 'dmu 9/22/2010 22:29'!\nsenderOrSlyInvokerIn: aProcess\n\t\"Answer the context that sent the message that created the receiver.\"\n\t\"Follow up the process parent chain to the invoking ensemble process.\"\n\n\t^sender ifNotNil: [sender] ifNil: [self halt. aProcess parent ifNil: [nil] ifNotNil: [aProcess parent suspendedContext]]! !\n\n!ContextPart methodsFor: '*RVMBootstrap' stamp: 'dmu 9/22/2010 22:38'!\nstackOfSize: limit  in: aProcess\n\t\"Answer an OrderedCollection of the top 'limit' contexts\n\t\ton the receiver's sender chain.\"\n\n\t| a stack cachedStackTop newLimit p assoc |\n\tstack _ OrderedCollection new.\n\tstack addLast: (a _ self).\n\tp _ aProcess.\n\t\"Ugh!! I ought to clean this up. -- dmu\"\n\t[ (assoc _ a senderOrSlyInvokerAndProcessIn: p) ~~ nil and: [stack size < limit]]\n\t\twhileTrue:\n\t\t\t[\n\t\t\ta _ assoc key.\n\t\t\tp _ assoc value.\n\t\t\ta hideFromDebugger ifFalse: [stack addLast: a].\n\t\t\ta cachesStack ifTrue: [cachedStackTop := a cachedStackTop]].\n\t^cachedStackTop == nil \n\t\tifTrue: [stack]\n\t\tifFalse:\n\t\t\t[newLimit := limit - stack size.\n\t\t\tnewLimit > 0\n\t\t\t\tifTrue: [stack addAllLast: (cachedStackTop stackOfSize: newLimit); yourself]\n\t\t\t\tifFalse: [stack]]! !\n\n!ControlManager methodsFor: 'accessing' stamp: 'ssa 3/25/2010 16:14'!\nactiveControllerNoTerminate: aController andProcess: aProcess\n\t\"Set aController to be the currently active controller and aProcess to be \n\tthe the process that handles controller scheduling activities in the \n\tsystem. This message differs from activeController:andProcess: in that it \n\tdoes not send controlTerminate to the currently active controller.\"\n\n\tself inActiveControllerProcess\n\t\tifTrue: \n\t\t\t[aController~~nil\n\t\t\t\tifTrue: [(scheduledControllers includes: aController)\n\t\t\t\t\t\t\tifTrue: [self promote: aController]\n\t\t\t\t\t\t\tifFalse: [self error: 'Old controller not scheduled']].\n\t\t\tactiveController _ aController.\n\t\t\tactiveController == nil\n\t\t\t\tifFalse: [activeController controlInitialize].\n\t\t\tactiveControllerProcess _ aProcess.\n\t\t\tactiveControllerProcess resume]\n\t\tifFalse: \n\t\t\t['New active controller process must be set from old one, resetting...' print.\n\t\t\tself reset.\n\t\t\t] ! !\n\n!ControlManager methodsFor: 'scheduling' stamp: 'dmu 11/25/2008 00:19'!\ninActiveControllerProcess\n\t\"Answer whether the active scheduling process is the actual active \n\tprocess in the system.\"\n\n\t^activeControllerProcess == Processor thisProcess! !\n\n!ControlManager methodsFor: 'scheduling' stamp: 'ssa 3/2/2010 14:12'!\ninterruptName: labelString\n\t\"Create a Notifier on the active scheduling process with the given label. Make the Notifier the active controller.\"\n\t| suspendingList newActiveController |\n\t(suspendingList _ activeControllerProcess suspendingList) == nil\n\t\tifTrue: [activeControllerProcess == Processor thisProcess\n\t\t\t\t\tifTrue: [activeControllerProcess suspend]]\n\t\tifFalse: [suspendingList remove: activeControllerProcess ifAbsent:[].\n\t\t\t\tactiveControllerProcess offList].\n\n\tactiveController ~~ nil ifTrue: [\n\t\t\"Carefully de-emphasis the current window.\"\n\t\tactiveController view topView deEmphasizeForDebugger].\n\n\tnewActiveController _\n\t\t(Debugger\n\t\t\topenInterrupt: labelString \n\t\t\tonProcess: activeControllerProcess) controller.\n\tnewActiveController centerCursorInView.\n\tself activeController: newActiveController.\n! !\n\n!ControlManager methodsFor: 'scheduling' stamp: 'ssa 3/25/2010 16:17'!\nreset\n\t\"ssa - reset the window controller process\"\n\t| newProcess |\n\tnewProcess := [ScheduledControllers resetActiveController.\n\t\t\tScheduledControllers searchForActiveController] fixTemps newProcess priority: Processor userSchedulingPriority.\n\tnewProcess resume.\n\t\"lose the current process\"\n\t\"Processor terminateActive\"! !\n\n!ControlManager methodsFor: 'scheduling' stamp: 'dmu 11/25/2008 00:19'!\nresetActiveController\n\t\"When saving a morphic project whose parent is mvc, we need to set this up first\"\n\n\tactiveController _ nil.\n\tactiveControllerProcess _ Processor thisProcess.\n! !\n\n!ControlManager methodsFor: 'scheduling' stamp: 'dmu 11/25/2008 00:20'!\nscheduleActiveNoTerminate: aController \n\t\"Make aController be the active controller. Presumably the process that \n\trequested the new active controller wants to keep control to do more \n\tactivites before the new controller can take control. Therefore, do not \n\tterminate the currently active process.\"\n\n\tself schedulePassive: aController.\n\tself scheduled: aController\n\t\tfrom: Processor thisProcess! !\n\n!ControlManager methodsFor: 'scheduling' stamp: 'dmu 11/25/2008 00:20'!\nsearchForActiveController\n\t\"Find a scheduled controller that wants control and give control to it. If \n\tnone wants control, then see if the System Menu has been requested.\"\n\t| aController |\n\tactiveController _ nil.\n\tactiveControllerProcess _ Processor thisProcess.\n\tself activeController: self nextActiveController.\n\tProcessor terminateActive! !\n\n!ControlManager methodsFor: 'displaying' stamp: 'dmu 9/17/2010 12:48'!\nrestore \n\t\"Clear the screen to gray and then redisplay all the scheduled views.  Try to be a bit intelligent about the view that wants control and not display it twice if possible.\"\n\n\tscheduledControllers first view uncacheBits.  \"assure refresh\"\n\tself unschedule: screenController; scheduleOnBottom: screenController.\n\tscreenController view window: Display boundingBox; displayDeEmphasized.\n\tself scheduledWindowControllers reverseDo:\n\t\t[:aController | aController view resetDisplayInterlock; displayDeEmphasized].\n! !\n\n!ControlManager methodsFor: 'displaying' stamp: 'ssa 8/26/2008 08:55'!\nrestore: aRectangle below: index without: aView\n\t\"Restore all windows visible in aRectangle, but without aView\"\n\t| view | \n\tview := (scheduledControllers at: index) view.\n\tview == aView ifTrue: \n\t\t[index >= scheduledControllers size ifTrue: [^ self].\n\t\t^ self restore: aRectangle below: index+1 without: aView].\n\tview isNil ifTrue:[^self].\n\tview displayOn: ((BitBlt current toForm: Display) clipRect: aRectangle).\n\tindex >= scheduledControllers size ifTrue: [^ self].\n\t(aRectangle areasOutside: view windowBox) do:\n\t\t[:rect | self restore: rect below: index + 1 without: aView]! !\n\n!Controller methodsFor: 'initialize-release'!\ninitialize\n\t\"Initialize the state of the receiver. Subclasses should include 'super \n\tinitialize' when redefining this message to insure proper initialization.\"\n\n\tsensor _ InputSensor default! !\n\n!Controller methodsFor: 'basic control sequence' stamp: 'sm 2/24/2011 18:49'!\ncontrolLoop \n\t\"Sent by Controller|startUp as part of the standard control sequence. \n\tController|controlLoop sends the message Controller|isControlActive to test \n\tfor loop termination. As long as true is returned, the loop continues. \n\tWhen false is returned, the loop ends. Each time through the loop, the \n\tmessage Controller|controlActivity is sent.\"\n\t| oldName |\n\toldName := Processor thisProcess name.\n\t\n\t\" as long as the process is executing the control loop it will be named according to its class \"\n\tProcessor thisProcess name:  self class name, '(Controller)>>controlLoop'.\n\t\n\t[self isControlActive] whileTrue: [\"self killExtraUIProcesses.\"\n\t\tself interActivityPause. self controlActivity. Processor yield].\n\t\n\t\" restore old name \"\n\tProcessor thisProcess name: oldName.\n\t\n\tself lastProcessRunningMe: nil! !\n\n!Controller methodsFor: 'basic control sequence' stamp: 'ads 1/24/2011 13:01'!\ninterActivityPause\n\t\"if we are looping quickly, insert a short delay.  Thus if we are just doing UI stuff, we won't take up much CPU\"\n\t| currentTime wait |\n\t[RVMPrimitivesNeededForBootstrapping isRVM ifTrue: [Processor yield. ^ self].].\n\tMinActivityLapse ifNotNil: [\n\t\tlastActivityTime ifNotNil: [ \n\t\t\tcurrentTime _ Time millisecondClockValue.\n\t\t\twait _ lastActivityTime + MinActivityLapse - currentTime.\n\t\t\twait > 0 ifTrue: [ \n\t\t\t\twait <= MinActivityLapse  \"big waits happen after a snapshot\"\n\t\t\t\t\tifTrue: [DisplayScreen checkForNewScreenSize.\n\t\t\t\t\t\t\t\"(Delay forMilliseconds: wait) wait \"]. ]. ]. ].\n\n\tlastActivityTime _ Time millisecondClockValue.! !\n\n!Controller methodsFor: '*Ly' stamp: 'dmu 3/29/2010 00:21'!\nkillExtraUIProcesses\n\t\t| p lp |\n\tp _ Processor thisProcess.\n\t\tlp _ self lastProcessRunningMe.\n\t\tp == lp ifTrue: [self killCounter: 0. ^ self].\n\t\tlp isRunning ifTrue: [\n\t\t\tself killCounter < 5  ifTrue: [\n\t\t\t\tself killCounter: self killCounter + 1.\n\t\t\t\t^ self.\n\t\t\t].\n\t\t\tself killCounter: 0.\n\t\t\tTranscript cr;show:'Controller>>killExtraUIProcesses working, killing process hash=',p identityHash printString.\n\t\t\tp terminate\n\t\t]\n\t\t\n\t\"1 foo\"\n\t\"2 timesRepeat:[[self halt]fork]\"! !\n\n!Controller methodsFor: 'accessing' stamp: 'ssa 3/2/2010 17:18'!\nlastActivityTime\n\t\"Answer the value of lastActivityTime\"\n\n\tlastActivityTime isNil ifTrue:[self lastActivityTime: nil].\n\t^ lastActivityTime! !\n\n!Controller methodsFor: 'accessing' stamp: 'ssa 3/2/2010 17:18'!\nlastActivityTime: anObject\n\t\"Set the value of lastActivityTime\"\n\n\tlastActivityTime _ anObject! !\n\n!Controller methodsFor: '*RVMBootstrap' stamp: 'dmu 3/26/2010 14:59'!\nkillCounter\n\t\"Answer the value of killCounter\"\n\n\tkillCounter isNil ifTrue:[self killCounter: 0].\n\t^ killCounter! !\n\n!Controller methodsFor: '*RVMBootstrap' stamp: 'dmu 3/26/2010 14:59'!\nkillCounter: anObject\n\t\"Set the value of killCounter\"\n\n\tkillCounter _ anObject! !\n\n!Controller methodsFor: '*RVMBootstrap' stamp: 'ssa 3/2/2010 17:28'!\nlastProcessRunningMe\n\t\"Answer the value of lastProcessRunningMe\"\n\n\tlastProcessRunningMe isNil ifTrue:[self lastProcessRunningMe: Processor thisProcess].\n\t^ lastProcessRunningMe! !\n\n!Controller methodsFor: '*RVMBootstrap' stamp: 'ssa 3/2/2010 17:18'!\nlastProcessRunningMe: anObject\n\t\"Set the value of lastProcessRunningMe\"\n\n\tlastProcessRunningMe _ anObject! !\n\n!Controller class methodsFor: 'initialization' stamp: 'ssa 8/15/2008 09:40'!\ninitialize\n\t\"Controller initialize\"\n\tself MinActivityLapse: 50.! !\n\n!CopyReader methodsFor: 'reading'!\nread: aClass\n\t\"Ignore aClass and grab the object directly from the stream. aClass is typically Integer, Float, Symbol, etc.  Assume the object was put on the stream using CopyWriter>store: (look there for more info).\"\n\n\t| anObject |\n\tanObject _ stream next.\n\tposition _ position + 1.\n\t^anObject! !\n\n!CopyReader methodsFor: 'testing'!\nisCopier\n\n\t^true! !\n\n!CopyWriter methodsFor: 'testing'!\nisCopier\n\n\t^true! !\n\n!CopyWriter methodsFor: 'writing'!\ncanCopy: anObject\n\t\"Answer true only if anObject is in the copySet (or if there is no copySet).  This can be used by objects which are connected to objects which are not to be copied.\"\n\n\t^copySet == nil\n\t\tifTrue:[true]\n\t\tifFalse:[copySet includes: anObject]! !\n\n!CopyWriter methodsFor: 'writing'!\ncopySet: aCollection\n\t\"Set the set of objects that should be copied.\"\n\n\tcopySet _ aCollection! !\n\n!CopyWriter methodsFor: 'writing'!\nstore: anObject\n\t\"Put anObject directly on the Stream... don't convert it to an ascii String since it's not going to a file.  anObject will typically be a Symbol, Number, etc.\"\n\n\tstream nextPut: anObject.\n\tposition _ position + 1! !\n\n!CopyWriter class methodsFor: 'instance creation'!\ncopy: anObject\n\t| aStream |\n\taStream _ ReadWriteStream on: (Array new: 100).\n\t(self on: aStream) nextPut: anObject.\n\taStream reset.\n\t^(CopyReader on: aStream) next! !\n\n!Cursor class methodsFor: 'class initialization' stamp: 'ssa 1/1/1970 00:31'!\ninitialize\n\t\"Create all the standard cursors...\"\n\t\tself initOrigin.\n\t\tself initRightArrow.\n\t\tself initLeftArrow.\n\t\tself initMenu.\n\t\tself initCorner.\n\t\tself initRead.\n\t\tself initWrite.\n\t\tself initWait.\n\t\tBlankCursor _ Cursor new.\n\t\tself initXeq.\n\t\tself initSquare.\n\t\tself initNormalWithMask.\n\t\tself initCrossHair.\n\t\tself initMarker.\n\t\tself initUp.\n\t\tself initDown.\n\t\tself initMove.\n\t\tself initBottomLeft.\n\t\tself initBottomRight.\n\t\tself initAction.\n\t\tself initResizeLeft.\n\t\tself initResizeTop.\n\t\tself initResizeTopLeft.\n\t\tself initResizeTopRight.\n\t\tself initTopLeft.\n\t\tself initTopRight.\n\t\tself makeCursorsWithMask.\n\n\t\t\"Cursor initialize\"\n! !\n\n!Cursor class methodsFor: '*RVM' stamp: 'ssa 9/19/2008 12:03'!\naction\n\t\"Answer the instance of me that indicates a mouse action is available\"\n\n\t^ActionCursor! !\n\n!Cursor class methodsFor: '*RVM' stamp: 'ssa 1/1/1970 00:21'!\ninitAction\n\t\"Cursor initAction\"\n\tActionCursor _    \n\t\t(Cursor\n\t\t\textent: 16@16\n\t\t\tfromArray: #(\n\t\t2r0000000000000000\n\t\t2r0000000100000000\n\t\t2r0010000100001000\n\t\t2r0001000100010000\n\t\t2r0000100100100000\n\t\t2r0000010001000000\n\t\t2r0000000000000000\n\t\t2r1111100100111110\n\t\t2r0000000000000000\n\t\t2r0000100001000000\n\t\t2r0001000100100000\n\t\t2r0010000100010000\n\t\t2r0100000100001000\n\t\t2r0000000100000000\n\t\t2r0000000000000000\n\t\t2r0)\n\t\t\toffset: -7 @ -7).\n\t\n\t! !\n\n!Cursor class methodsFor: '*RVM' stamp: 'ssa 9/19/2008 11:39'!\ninitLeftArrow \n\n\tLeftArrowCursor  _\n\t\t      (Cursor\n\textent: 16@16\n\tfromArray: #(\n\t\t2r0000100000000000\n\t\t2r0011100000000000\n\t\t2r1111111110000000\n\t\t2r0011100000000000\n\t\t2r0000100000000000\n\t\t2r0\n\t\t2r0\n\t\t2r0\n\t\t2r0\n\t\t2r0\n\t\t2r0\n\t\t2r0\n\t\t2r0\n\t\t2r0\n\t\t2r0\n\t\t2r0)\n\toffset: -8@0).\n\t\n\t\"Cursor initLeftArrow\"! !\n\n!Cursor class methodsFor: '*RVM' stamp: 'ssa 9/19/2008 11:24'!\nleftArrow \n\t\"Answer the instance of me that is the shape of an arrow pointing to the left.\"\n\n\t^LeftArrowCursor! !\n\n!CustomMenu methodsFor: 'invocation' stamp: 'ssa 12/17/2009 10:10'!\ninvokeOn: targetObject orSendTo: anObject\n\t\"Pop up this menu and return the result of sending to the target object the selector corresponding to the menu item selected by the user. Return  nil if no item is selected.  If the chosen selector has arguments, obtain appropriately.  If the recipient does not respond to the resulting message, send it to the alternate object provided\"\n\n\t| aSelector anIndex recipient |\n\t^ (aSelector _ self startUp) ifNotNil:\n\t\t[anIndex _ self selection.\n\t\trecipient _ (self targets isEmpty or: [anIndex > self targets size])\n\t\t\tifTrue:\n\t\t\t\t[targetObject]\n\t\t\tifFalse:\n\t\t\t\t[self targets at: anIndex].\n\t\taSelector numArgs == 0\n\t\t\tifTrue:\n\t\t\t\t[recipient perform: aSelector orSendTo: anObject]\n\t\t\tifFalse:\n\t\t\t\t[recipient perform: aSelector withArguments: (self arguments at: 1)]]! !\n\n!CustomMenu methodsFor: 'invocation' stamp: 'ssa 1/1/1970 00:42'!\nstartUp: initialSelection withCaption: caption at: aPoint\n\t\"Build and invoke this menu with the given initial selection and caption. Answer the selection associated with the menu item chosen by the user or nil if none is chosen.\"\n\n\tself build.\n\t(initialSelection notNil) ifTrue: [self preSelect: initialSelection].\n\t^ super startUpWithCaption: caption at: aPoint! !\n\n!CustomMenu methodsFor: 'accessing' stamp: 'ssa 6/20/2008 14:29'!\narguments\n\n\targuments isNil ifTrue:[arguments := OrderedCollection new].\n\t^arguments! !\n\n!CustomMenu methodsFor: 'accessing' stamp: 'ssa 6/20/2008 14:29'!\nselections\n\n\tselections isNil ifTrue:[selections := OrderedCollection new].\n\t^selections! !\n\n!CustomMenu methodsFor: 'accessing' stamp: 'ssa 6/20/2008 14:29'!\ntargets\n\n\ttargets isNil ifTrue:[targets := OrderedCollection new].\n\t^targets! !\n\n!Debugger methodsFor: '*Ly' stamp: 'smu 3/4/2010 10:26'!\nsetContextStackIndexFromLyIndex: anIndex\n\n\t| ctx n |\n\tctx _ contextStackTop.\n\tn _ 1.\n\t[ \n\t\tctx _ ctx firstContextContainingLyActivation. \n\t\tctx ifNil: [\n\t\t\tTranscript show: 'setContextStackIndexFromLyIndex: missing activation'; cr. \n\t\t\t^ self\n\t\t].\n\t\tn >= anIndex ifTrue: [\n\t\t\tself fullStack.\n\t\t\tself toggleContextStackIndex: (self contextStack indexOf: ctx).\n\t\t\t^ self\n\t\t].\n\t\tn _ n + 1.\n\t\tctx _ ctx sender.\n\t] repeat! !\n\n!Debugger methodsFor: '*Ly' stamp: 'ssa 3/3/2010 20:25'!\nsetContextStackIndexFromOtherIndex: anIndex otherTopContext: ctx\n\tself setContextStackIndexFromLyIndex: anIndex! !\n\n!Debugger methodsFor: 'initialize' stamp: 'ssa 3/3/2010 23:00'!\nbuildMVCDebuggerViewLabel: aString minSize: aPoint\n\t\"Build an MVC debugger view around the receiver, and return the StandardSystemView thus created.\"\n\n\t| topView stackListView stackCodeView rcvrVarView rcvrValView ctxtVarView ctxtValView deltaY underPane annotationPane buttonsView oldContextStackIndex |\n\n\toldContextStackIndex _ contextStackIndex.\n\tself expandStack. \"Sets contextStackIndex to zero.\"\n\tcontextStackIndex _ oldContextStackIndex.\n\tself contextVariablesInspector object: self selectedContext.\n\tself receiverInspector object: self receiver.\n\t\n\ttopView _ StandardSystemView new model: self.\n\ttopView borderWidth: 1.\n\tstackListView _ PluggableListView on: self\n\t\t\tlist: #contextStackList\n\t\t\tselected: #contextStackIndex\n\t\t\tchangeSelected: #toggleContextStackIndex:\n\t\t\tmenu: #contextStackMenu:shifted:\n\t\t\tkeystroke: #contextStackKey:from:.\n\t\tself installListFontInto: stackListView.\n\t\tstackListView menuTitleSelector: #messageListSelectorTitle.\n\t\tstackListView window: (0 @ 0 extent: 150 @ 50).\n\t\ttopView addSubView: stackListView.\n\tdeltaY _ 0.\n\t self wantsAnnotationPane\n\t\tifTrue:\n\t\t\t[annotationPane _ PluggableTextView on: self\n\t\t\t\ttext: #annotation accept: nil readSelection: nil menu: nil.\n\t\t\tannotationPane window: (0@0 extent: 150@self optionalAnnotationHeight).\n\t\t\ttopView addSubView: annotationPane below: stackListView.\n\t\t\tdeltaY _ deltaY + self optionalAnnotationHeight.\n\t\t\tunderPane _ annotationPane]\n\t\tifFalse:\n\t\t\t[underPane _ stackListView].\n\tself wantsOptionalButtons\n\t\tifTrue:\n\t\t\t[buttonsView _ self buildMVCOptionalButtonsButtonsView.\n\t\t\tbuttonsView borderWidth: 1.\n\t\t\ttopView addSubView: buttonsView below: underPane.\n\t\t\tunderPane _ buttonsView.\n\t\t\tdeltaY _ deltaY + self optionalButtonHeight].\n\tstackCodeView _ self codeView.\n\t\tstackCodeView window: (0 @ 0 extent: 150 @ (75 - deltaY)).\n\t\ttopView addSubView: stackCodeView below: underPane.\n\trcvrVarView _ PluggableListView on: self receiverInspector\n\t\t\tlist: #fieldList\n\t\t\tselected: #selectionIndex\n\t\t\tchangeSelected: #toggleIndex:\n\t\t\tmenu: #fieldListMenu:\n\t\t\tkeystroke: #inspectorKey:from:.\n\t\tself installListFontInto: rcvrVarView.\n\t\trcvrVarView window: (0 @ 0 extent: 25 @ (50 - deltaY)).\n\t\ttopView addSubView: rcvrVarView below: stackCodeView.\n\trcvrValView _ PluggableTextView on: self receiverInspector\n\t\t\ttext: #contents accept: #accept:\n\t\t\treadSelection: #contentsSelection menu: #codePaneMenu:shifted:.\n\t\trcvrValView window: (0 @ 0 extent: 50 @ (50 - deltaY)).\n\t\ttopView addSubView: rcvrValView toRightOf: rcvrVarView.\n\tctxtVarView _ PluggableListView on: self contextVariablesInspector\n\t\t\tlist: #fieldList\n\t\t\tselected: #selectionIndex\n\t\t\tchangeSelected: #toggleIndex:\n\t\t\tmenu: #fieldListMenu:\n\t\t\tkeystroke: #inspectorKey:from:.\n\t\tself installListFontInto: ctxtVarView.\n\t\tctxtVarView window: (0 @ 0 extent: 25 @ (50 - deltaY)).\n\t\ttopView addSubView: ctxtVarView toRightOf: rcvrValView.\n\tctxtValView _ PluggableTextView on: self contextVariablesInspector\n\t\t\ttext: #contents accept: #accept:\n\t\t\treadSelection: #contentsSelection menu: #codePaneMenu:shifted:.\n\t\tctxtValView window: (0 @ 0 extent: 50 @ (50 - deltaY)).\n\t\ttopView addSubView: ctxtValView toRightOf: ctxtVarView.\n\ttopView label: aString.\n\ttopView minimumSize: aPoint.\n\t^ topView ! !\n\n!Debugger methodsFor: 'initialize' stamp: 'ssa 3/3/2010 22:55'!\nbuildMVCNotifierViewLabel: aString message: messageString minSize: aPoint\n\n\t| topView notifyView buttonView x y bHeight |\n\tself expandStack.\n\ttopView _ StandardSystemView new model: self.\n\ttopView borderWidth: 1.\n\tbuttonView _ self buildMVCNotifierButtonView.\n\ttopView addSubView: buttonView.\n\tnotifyView _ PluggableListView on: self\n\t\tlist: #contextStackList\n\t\tselected: #contextStackIndex\n\t\tchangeSelected: #debugAt:\n\t\tmenu: nil\n\t\tkeystroke: nil.\n\tself installListFontInto: notifyView.\n\tx _ 350 max: (aPoint x).\n\ty _ ((4 * 15) + 16) max: (aPoint y - 16 - self optionalButtonHeight).\n\tbHeight _ self optionalButtonHeight.\n\ty _ y - bHeight.\n\tnotifyView window: (0@0 extent: x@y).\n\ttopView\n\t\taddSubView: notifyView below: buttonView;\n\t\tlabel: aString;\n\t\tminimumSize: aPoint.\n\t^ topView! !\n\n!Debugger methodsFor: 'initialize' stamp: 'ssa 3/3/2010 21:35'!\ncodeView\n\t\"Answer the code editing view for me\"\n\t^PluggableTextView on: self\n\t\t\ttext: #contents accept: #contents:notifying:\n\t\t\treadSelection: #contentsSelection menu: #codePaneMenu:shifted:! !\n\n!Debugger methodsFor: 'initialize' stamp: 'dmu 3/10/2010 18:15'!\ncustomButtonSpecs\n\t\"Answer an array of elements of the form wording, selector, help-message, that characterize the custom button row of a debugger.\"\n\n\t| list |\n\tlist _ #(('Proceed'\tproceed\t\t\t\t'close the debugger and proceed.')\n\t\t('Restart'\t\trestart\t\t\t\t'reset this context to its start.')\n\t\t('Into'\t\t\tsend\t\t\t\t'step Into message sends')\n\t\t('Over'\t\t\tdoStep\t\t\t\t'step Over message sends')\n\t\t('Through'\t\tstepIntoBlock\t\t'step into a block')\n\t\t('Full Stack'\t\tfullStack\t\t\t'show full stack')\n\t\t('Where'\t\twhere\t\t\t\t'select current pc range')\n\t\t('Meta'\t\thalt\t\t\t\t\t'go meta & debug the debugger')).\n\tlist _ list, self otherButtonSpecs.\n\tPreferences restartAlsoProceeds ifTrue:\n\t\t[list _ list collect: [:each |\n\t\t\teach second == #restart\n\t\t\t\tifTrue: [each copy at: 3 put: 'proceed from the beginning of this context.'; yourself]\n\t\t\t\tifFalse: [each]]].\n\t^ list! !\n\n!Debugger methodsFor: 'initialize' stamp: 'ssa 9/9/2009 17:35'!\ndebugAt: anInteger\n\tself toggleContextStackIndex: anInteger. \n\t ^ self debug.! !\n\n!Debugger methodsFor: 'initialize' stamp: 'ssa 9/10/2009 15:56'!\nopenFullNoSuspendLabel: aString\n\t\"Create and schedule a full debugger with the given label. Do not terminate the current active process.\"\n\n\t| topView oldContextStackIndex |\n\n\tSmalltalk isMorphic ifTrue: [\n    oldContextStackIndex := contextStackIndex.\n    self expandStack. \"Sets contextStackIndex to zero.\"\n    ToolBuilder open: self label: aString.\n    self toggleContextStackIndex: oldContextStackIndex.\n    ^ self\n  ].\n\ttopView _ self buildMVCDebuggerViewLabel: aString minSize: 300@200.\n\ttopView controller openNoTerminate.\n\t^ topView\n! !\n\n!Debugger methodsFor: 'initialize' stamp: 'ssa 9/15/2009 14:11'!\nopenNotifierContents: msgString label: label\n\t\"Create and schedule a notifier view with the given label and message. A notifier view shows just the message or the first several lines of the stack, with a menu that allows the user to open a full debugger if so desired.\"\n\t\"NOTE: When this method returns, a new process has been scheduled to run the windows, and thus this notifier, but the previous active porcess has not been suspended.  The sender will do this.\"\n\t| msg topView p |\n\tSensor flushKeyboard.\n\tsavedCursor _ Sensor currentCursor.\n\tSensor currentCursor: Cursor normal.\n\t(label beginsWith: 'Space is low')\n\t\tifTrue: [msg _ self lowSpaceChoices, (msgString ifNil: [''])]\n\t\tifFalse: [msg _ msgString].\n\tisolationHead ifNotNil:\n\t\t[\"We have already revoked the isolation layer -- now jump to the parent project.\"\n\t\tmsg _ self isolationRecoveryAdvice, msgString.\n\t\tfailedProject _ Project current.\n\t\tisolationHead parent enterForEmergencyRecovery].\n\n\n  Smalltalk isMorphic ifTrue: [\n    builder := ToolBuilder default.\n    spec := self buildNotifierWith: builder label: label message: msg.\n    self expandStack.\n    builder open: spec.\n    errorWasInUIProcess := Project spawnNewProcessIfThisIsUI: interruptedProcess.\n    ^ self\n  ].\n\n\n\tDisplay fullScreen.\n\ttopView _ self \n\t\tbuildMVCNotifierViewLabel: label , Time dateAndTimeNow  printString\n\t\tmessage: thisContext sender sender shortStack \n\t\tminSize:600@((14 * 20) + 16 + self optionalButtonHeight).\n\tScheduledControllers activeController\n\t\tifNil: [p _ Display boundingBox center]\n\t\tifNotNil: [p _ ScheduledControllers activeController view displayBox center].\n\ttopView controller openNoTerminateDisplayAt: (p adhereTo:(Display boundingBox insetBy: topView minimumSize)).\n\t^ topView! !\n\n!Debugger methodsFor: 'initialize' stamp: 'ssa 9/3/2008 15:34'!\noptionalButtonPairs\n\t\"Actually, return triples.  In mvc (until someone deals with this) only the custom debugger-specific buttons are shown, but in morphic, the standard code-tool buttons are provided in addition to the custom buttons\"\n\n\t^ Smalltalk isMorphic\n\t\tifFalse:\n\t\t\t[self customButtonSpecs]\n\t\tifTrue:\n\t\t\t[]! !\n\n!Debugger methodsFor: 'initialize' stamp: 'ssa 7/7/2010 10:48'!\notherButtonSpecs\n\t| r |\n\tr _ OrderedCollection new.\n\t(Smalltalk includesKey:#Ly) ifTrue:[\n\t\tcontextStackTop hasLyActivation \n\t\t\tifTrue:[r add: #('Debug in Ly'\tdebugInLy\t\t\t\t'launch a Ly execution debugger on this stack')]].\n\t^ r asArray! !\n\n!Debugger methodsFor: 'initialize' stamp: 'ssa 3/3/2010 20:55'!\nrelease\n\tself windowIsClosing.\n\tsuper release.\n! !\n\n!Debugger methodsFor: 'initialize' stamp: 'ssa 3/3/2010 20:58'!\nterminateInterruptedProcessIfSoleOwner\n\n\t| otherOwners |\n\totherOwners _ Smalltalk pointersTo: interruptedProcess except:{self}.\n\totherOwners detect:[:each| each isKindOf: Debugger] ifNone:[\n\t\tTranscript show: 'Debugger>>terminateInterruptedProcessIfSoleOwner: ', interruptedProcess identityHash printString; cr.\n\t\tinterruptedProcess terminate].\n\t\n! !\n\n!Debugger methodsFor: 'initialize' stamp: 'ssa 4/20/2010 11:05'!\nwindowIsClosing\n\t\"My window is being closed; clean up. Restart the low space watcher.\"\n\n\tinterruptedProcess == nil ifTrue: [^ self].\n\tinterruptedProcess terminate.\n\t\"self terminateInterruptedProcessIfSoleOwner.\"\n\tinterruptedProcess _ nil.\n\tinterruptedController _ nil.\n\tcontextStack _ nil.\n\tcontextStackTop _ nil.\n\treceiverInspector _ nil.\n\tcontextVariablesInspector _ nil.\n\tSmalltalk installLowSpaceWatcher.  \"restart low space handler\"\n! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\ncontextStack\n\t\"Answer the value of contextStack\"\n\n\tcontextStack isNil ifTrue:[self contextStack: nil].\n\t^ contextStack! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\ncontextStack: anObject\n\t\"Set the value of contextStack\"\n\n\tcontextStack _ anObject! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\ncontextStackIndex: anObject\n\t\"Set the value of contextStackIndex\"\n\n\tcontextStackIndex _ anObject! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\ncontextStackList: anObject\n\t\"Set the value of contextStackList\"\n\n\tcontextStackList _ anObject! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\ncontextStackTop\n\t\"Answer the value of contextStackTop\"\n\n\tcontextStackTop isNil ifTrue:[self contextStackTop: nil].\n\t^ contextStackTop! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\ncontextStackTop: anObject\n\t\"Set the value of contextStackTop\"\n\n\tcontextStackTop _ anObject! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 3/3/2010 22:24'!\ncontextVariablesInspector\n\t\"Answer the instance of Inspector that is providing a view of the \n\tvariables of the selected context.\"\n\n\tcontextVariablesInspector isNil ifTrue:[self contextVariablesInspector: self defaultContextVariablesInspector].\n\t^contextVariablesInspector! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\ncontextVariablesInspector: anObject\n\t\"Set the value of contextVariablesInspector\"\n\n\tcontextVariablesInspector _ anObject! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 3/3/2010 22:22'!\ndefaultContextVariablesInspector\n\n\t^ContextVariablesInspector inspect: nil! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 3/3/2010 22:15'!\ndefaultReceiverInspector\n\n\t^Inspector inspect: nil! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\nerrorWasInUIProcess\n\t\"Answer the value of errorWasInUIProcess\"\n\n\terrorWasInUIProcess isNil ifTrue:[self errorWasInUIProcess: nil].\n\t^ errorWasInUIProcess! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\nerrorWasInUIProcess: anObject\n\t\"Set the value of errorWasInUIProcess\"\n\n\terrorWasInUIProcess _ anObject! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\nexternalInterrupt\n\t\"Answer the value of externalInterrupt\"\n\n\texternalInterrupt isNil ifTrue:[self externalInterrupt: nil].\n\t^ externalInterrupt! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\nfailedProject\n\t\"Answer the value of failedProject\"\n\n\tfailedProject isNil ifTrue:[self failedProject: nil].\n\t^ failedProject! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\nfailedProject: anObject\n\t\"Set the value of failedProject\"\n\n\tfailedProject _ anObject! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\ninterruptedController\n\t\"Answer the value of interruptedController\"\n\n\tinterruptedController isNil ifTrue:[self interruptedController: nil].\n\t^ interruptedController! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\ninterruptedController: anObject\n\t\"Set the value of interruptedController\"\n\n\tinterruptedController _ anObject! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\ninterruptedProcess\n\t\"Answer the value of interruptedProcess\"\n\n\tinterruptedProcess isNil ifTrue:[self interruptedProcess: nil].\n\t^ interruptedProcess! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\ninterruptedProcess: anObject\n\t\"Set the value of interruptedProcess\"\n\n\tinterruptedProcess _ anObject! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\nisolationHead\n\t\"Answer the value of isolationHead\"\n\n\tisolationHead isNil ifTrue:[self isolationHead: nil].\n\t^ isolationHead! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\nisolationHead: anObject\n\t\"Set the value of isolationHead\"\n\n\tisolationHead _ anObject! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\nproceedValue\n\t\"Answer the value of proceedValue\"\n\n\tproceedValue isNil ifTrue:[self proceedValue: nil].\n\t^ proceedValue! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 3/3/2010 22:15'!\nreceiverInspector\n\t\"Answer the instance of Inspector that is providing a view of the \n\tvariables of the selected context's receiver.\"\n\n\treceiverInspector isNil ifTrue:[self receiverInspector: self defaultReceiverInspector].\n\t^receiverInspector! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\nreceiverInspector: anObject\n\t\"Set the value of receiverInspector\"\n\n\treceiverInspector _ anObject! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\nsavedCursor\n\t\"Answer the value of savedCursor\"\n\n\tsavedCursor isNil ifTrue:[self savedCursor: nil].\n\t^ savedCursor! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\nsavedCursor: anObject\n\t\"Set the value of savedCursor\"\n\n\tsavedCursor _ anObject! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:16'!\nselectingPC\n\t\"Answer the value of selectingPC\"\n\n\tselectingPC isNil ifTrue:[self selectingPC: false].\n\t^ selectingPC! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\nselectingPC: anObject\n\t\"Set the value of selectingPC\"\n\n\tselectingPC _ anObject! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\nsourceMap\n\t\"Answer the value of sourceMap\"\n\n\tsourceMap isNil ifTrue:[self sourceMap: nil].\n\t^ sourceMap! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\nsourceMap: anObject\n\t\"Set the value of sourceMap\"\n\n\tsourceMap _ anObject! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\ntempNames\n\t\"Answer the value of tempNames\"\n\n\ttempNames isNil ifTrue:[self tempNames: nil].\n\t^ tempNames! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\ntempNames: anObject\n\t\"Set the value of tempNames\"\n\n\ttempNames _ anObject! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\ntheMethodNode\n\t\"Answer the value of theMethodNode\"\n\n\ttheMethodNode isNil ifTrue:[self theMethodNode: nil].\n\t^ theMethodNode! !\n\n!Debugger methodsFor: 'accessing' stamp: 'ssa 9/15/2009 10:15'!\ntheMethodNode: anObject\n\t\"Set the value of theMethodNode\"\n\n\ttheMethodNode _ anObject! !\n\n!Debugger methodsFor: 'notifier menu' stamp: 'ssa 3/2/2010 18:08'!\ndebug\n\t\"Open a full DebuggerView.\"\n\t| topView |\n  Smalltalk isMorphic\n    ifTrue: [\n      \"hack for Squeak4.1 image -- dmu\"\n      topView := self topView.\n      topView model: nil.  \"so close won't release me.\"\n      self breakDependents.\n      ToolBuilder default close: topView.\n      ^ self openFullNoSuspendLabel: topView label].\n\n  topView _ self  topView.\n\ttopView isNil ifTrue:[topView _ self buildMVCDebuggerViewLabel: self labelString minSize: 200@200].\n\ttopView model: nil.  \"so close won't release me.\"\n\t\n\n\ttopView controller controlTerminate.\n\ttopView deEmphasize; erase.\n\n\t\"a few hacks to get the scroll selection artifacts out when we got here by clicking in the list\"\n\ttopView subViewWantingControl ifNotNil: [\n\t\ttopView subViewWantingControl controller controlTerminate\n\t].\n\ttopView controller status: #closed.\n\n\tself openFullNoSuspendLabel: topView label.\n\ttopView controller closeAndUnscheduleNoErase.\n\tTranscript show: 'in debug: ', Processor thisProcess identityHash printString; cr.\n\tProcessor terminateActive.\n! !\n\n!Debugger methodsFor: 'context stack (message list)' stamp: 'ssa 3/10/2010 09:17'!\ncontextStackIndex\n\t\"Answer the index of the selected context.\"\n\n\tcontextStackIndex isNil ifTrue:[self contextStackIndex: 0].\n\t^contextStackIndex! !\n\n!Debugger methodsFor: 'context stack (message list)' stamp: 'ssa 3/3/2010 22:23'!\nexpandStack\n\t\"A Notifier is being turned into a full debugger.  Show a substantial amount of stack in the context pane.\"\n\n\tself newStack: (contextStackTop stackOfSize: 20).\n\tcontextStackIndex _ 0.\n\treceiverInspector _ self defaultReceiverInspector.\n\tcontextVariablesInspector _ self defaultContextVariablesInspector.\n\tproceedValue _ nil! !\n\n!Debugger methodsFor: 'context stack (message list)' stamp: 'dmu 9/22/2010 22:17'!\nfullyExpandStack\n\t\"Expand the stack to include all of it, rather than the first four or five\n\tcontexts.\"\n\n\tself okToChange ifFalse: [^ self].\n\tself newStack: ( contextStackTop contextStackIn: interruptedProcess).\n\tself changed: #contextStackList! !\n\n!Debugger methodsFor: 'context stack (message list)' stamp: 'ssa 3/2/2010 16:17'!\nlabelForContext: ctxt\n\n\t^ctxt printString! !\n\n!Debugger methodsFor: 'context stack (message list)' stamp: 'ssa 9/15/2009 10:14'!\ntoggleContextStackIndex: anInteger \n\t\"If anInteger is the same as the index of the selected context, deselect it. \n\tOtherwise, the context whose index is anInteger becomes the selected \n\tcontext.\"\n\n\tself contextStackIndex: \n\t\t(contextStackIndex = anInteger\n\t\t\tifTrue: [0]\n\t\t\tifFalse: [anInteger])\n\t\toldContextWas:\n\t\t((contextStackIndex = 0 or:[contextStackIndex isNil])\n\t\t\tifTrue: [nil]\n\t\t\tifFalse: [contextStack at: contextStackIndex])! !\n\n!Debugger methodsFor: 'context stack menu' stamp: 'ssa 9/3/2008 11:23'!\ncontextStackMenu: aMenu shifted: shifted\n\t\"Set up the menu appropriately for the context-stack-list, either shifted or unshifted as per the parameter provided\"\n\n\t^ shifted ifFalse: \n\t\t[self selectedContext selector = #doesNotUnderstand: ifTrue:\n\t\t\t[aMenu \n\t\t\t\tadd: 'implement in...' \n\t\t\t\tsubMenu: (self populateImplementInMenu: (Smalltalk isMorphic ifTrue: [] ifFalse: [CustomMenu new]))\n\t\t\t\ttarget: nil \n\t\t\t\tselector: nil \n\t\t\t\targumentList: #(nil)].\n\t\taMenu labels: \n'fullStack (f)\nrestart (r)\nproceed (p)\nstep (t)\nstep through (T)\nsend (e)\nwhere (w)\npeel to first like this\nsenders of... (n)\nimplementors of... (m)\ninheritance (i)\nversions (v)\ninst var refs...\ninst var defs...\nclass var refs...\nclass variables\nclass refs (N)\nbrowse full (b)\nfile out \nmore...'\n\t\tlines: #(8 12 14 17 20)\n\t\tselections: #(fullStack restart proceed doStep stepIntoBlock send where peelToFirst\nbrowseSendersOfMessages browseMessages methodHierarchy browseVersions\nbrowseInstVarRefs browseInstVarDefs\nbrowseClassVarRefs browseClassVariables browseClassRefs\nbrowseMethodFull fileOutMessage \nshiftedYellowButtonActivity)]\n\n\tifTrue: [aMenu labels: \n'browse class hierarchy\nbrowse class\nbrowse method (O)\nimplementors of sent messages\nchange sets with this method\ninspect instances\ninspect subinstances\nrevert to previous version\nremove from current change set\nrevert & remove from changes\nmore...' \n\tlines: #(5 7 10)\n\tselections: #(classHierarchy browseClass \n\t\topenSingleMessageBrowser browseAllMessages findMethodInChangeSets \n\t\tinspectInstances inspectSubInstances\n\t\trevertToPreviousVersion \n\t\tremoveFromCurrentChanges revertAndForget\n\t\tunshiftedYellowButtonActivity)]\n\n! !\n\n!Debugger methodsFor: 'code pane' stamp: 'ssa 9/15/2009 10:16'!\npcRange\n\t\"Answer the indices in the source code for the method corresponding to \n\tthe selected context's program counter value.\"\n\n\t| i pc end |\n\t(self selectingPC and: [contextStackIndex ~= 0])\n\t\tifFalse: [^1 to: 0].\n\tsourceMap ifNil:\n\t\t[theMethodNode isNil ifTrue:[^1 to: 0].\n\t\tsourceMap _ theMethodNode sourceMap.\n\t\ttempNames _ theMethodNode tempNames.\n\t\tself selectedContext method cacheTempNames: tempNames].\n\t(sourceMap size = 0 or: [ self selectedContext isDead ]) ifTrue: [^1 to: 0].\n\tSmalltalk at: #RBProgramNode ifPresent:[:nodeClass|\n\t\t(theMethodNode isKindOf: nodeClass) ifTrue: [\n\t\t\tpc _ contextStackIndex = 1\n\t\t\t\tifTrue: [self selectedContext pc]\n\t\t\t\tifFalse: [self selectedContext previousPc].\n\t\t\ti _ sourceMap findLast:[:pcRange | pcRange key <= pc].\n\t\t\ti = 0 ifTrue:[^ 1 to: 0].\n\t\t\t^ (sourceMap at: i) value\n\t\t].\n\t].\n\tpc_ self selectedContext pc -\n\t\t((\"externalInterrupt\" true and: [contextStackIndex=1])\n\t\t\tifTrue: [1]\n\t\t\tifFalse: [2]).\n\ti _ sourceMap indexForInserting: (Association key: pc value: nil).\n\ti < 1 ifTrue: [^1 to: 0].\n\ti > sourceMap size\n\t\tifTrue:\n\t\t\t[end _ sourceMap inject: 0 into:\n\t\t\t\t[:prev :this | prev max: this value last].\n\t\t\t^ end+1 to: end].\n\t^(sourceMap at: i) value! !\n\n!Debugger methodsFor: 'dependents access' stamp: 'ssa 3/3/2010 22:18'!\nstep \n\t\"Update the inspectors.\"\n\n\tself receiverInspector ifNotNil: [self receiverInspector step].\n\tself contextVariablesInspector ifNotNil: [self contextVariablesInspector step].\n! !\n\n!Debugger methodsFor: 'dependents access' stamp: 'ssa 3/3/2010 22:19'!\nupdateInspectors \n\t\"Update the inspectors on the receiver's variables.\"\n\n\tself receiverInspector == nil ifFalse: [self receiverInspector update].\n\tself contextVariablesInspector == nil ifFalse: [self contextVariablesInspector update]! !\n\n!Debugger methodsFor: 'private' stamp: 'ssa 3/3/2010 21:46'!\ncontextStackIndex: anInteger oldContextWas: oldContext \n\t\"Change the context stack index to anInteger, perhaps in response to user selection.\"\n\n\t| newMethod |\n\tcontextStackIndex := anInteger.\n\tanInteger = 0\n\t\tifTrue: [currentCompiledMethod := theMethodNode := tempNames := sourceMap := contents := nil.\n\t\t\tself changed: #contextStackIndex.\n\t\t\tself decorateButtons.\n\t\t\tself contentsChanged.\n\t\t\tcontextVariablesInspector object: nil.\n\t\t\tself updateInspectorToObject: self receiver.\n\t\t\t^ self].\n\t(newMethod := oldContext == nil\n\t\t\t\t\tor: [oldContext method ~~ (currentCompiledMethod := self selectedContext method)])\n\t\tifTrue: [tempNames := sourceMap := nil.\n\t\t\ttheMethodNode := Preferences browseWithPrettyPrint\n\t\t\t\tifTrue: [ \tself selectedContext methodNodeFormattedAndDecorated: Preferences colorWhenPrettyPrinting ]\n\t\t\t\tifFalse: [\tself selectedContext methodNode ].\n\t\t\tcontents := self selectedMessage.\n\t\t\tself contentsChanged.\n\t\t\tself pcRange\n\t\t\t\"will compute tempNamesunless noFrills\"].\n\tself changed: #contextStackIndex.\n\tself decorateButtons.\n\ttempNames == nil\n\t\tifTrue: [tempNames := self selectedClassOrMetaClass parserClass new parseArgsAndTemps: contents notifying: nil].\n\tcontextVariablesInspector object: self selectedContext.\n\tself updateInspectorToObject: self receiver.\n\tnewMethod\n\t\tifFalse: [self changed: #contentsSelection]! !\n\n!Debugger methodsFor: 'private' stamp: 'ssa 3/2/2010 16:16'!\nnewStack: stack\n\t| oldStack diff |\n\n\tcontextStackTop _ stack first.\n\toldStack _ contextStack.\n\tcontextStack _ stack.\n\t(oldStack == nil or: [oldStack last ~~ stack last])\n\t\tifTrue: [contextStackList _ contextStack collect: [:ctx | self labelForContext: ctx ].\n\t\t\t\t^ self].\n\t\"May be able to re-use some of previous list\"\n\tdiff _ stack size - oldStack size.\n\tcontextStackList _ diff <= 0\n\t\tifTrue: [contextStackList copyFrom: 1-diff to: oldStack size]\n\t\tifFalse: [diff > 1\n\t\t\t\tifTrue: [contextStack collect: [:ctx | self labelForContext: ctx ]]\n\t\t\t\tifFalse: [(Array with: (self labelForContext:stack first)) , contextStackList]]! !\n\n!Debugger methodsFor: 'private' stamp: 'ssa 9/15/2009 14:25'!\nprocess: aProcess controller: aController context: aContext isolationHead: projectOrNil\n\n\tsuper initialize.\n\tSmalltalk at: #MessageTally ifPresentAndInMemory: [:c | c new close].\n\tcontents _ nil. \n\tinterruptedProcess _ aProcess.\n\tinterruptedController _ aController.\n\tcontextStackTop _ aContext.\n\tself newStack: (contextStackTop stackOfSize: 1).\n\tcontextStackIndex _ 1.\n\texternalInterrupt _ false.\n\tselectingPC _ true.\n\tisolationHead _ projectOrNil.\n! !\n\n!Debugger methodsFor: 'private' stamp: 'dmu 3/10/2010 17:52'!\nresetContext: aContext \n\t\"Used when a new context becomes top-of-stack, for instance when the\n\tmethod of the selected context is re-compiled, or the simulator steps or\n\treturns to a new method. There is room for much optimization here, first\n\tto save recomputing the whole stack list (and text), and secondly to avoid\n\trecomposing all that text (by editing the paragraph instead of recreating it).\"\n\n\t| oldContext |\n\toldContext _ self selectedContext.\n\tcontextStackTop _ aContext.\n\tself newStack: (contextStackTop ifNil:  [^ self release] ifNotNil: [contextStackTop contextStack]).\n\tself changed: #contextStackList.\n\tself contextStackIndex: 1 oldContextWas: oldContext.\n\tself changed: #content.! !\n\n!Debugger methodsFor: 'private' stamp: 'ssa 3/25/2010 16:02'!\nresumeProcess: aTopView \n\t| c |\n\taTopView erase.\n\tsavedCursor\n\t\tifNotNil: [Sensor currentCursor: savedCursor].\n\tisolationHead\n\t\tifNotNil: [failedProject enterForEmergencyRecovery.\n\t\t\tisolationHead invoke.\n\t\t\tisolationHead _ nil].\n\t(interruptedProcess isNil or:[interruptedProcess isTerminated]) ifFalse: [\n\t\tc _ interruptedController ifNil:[ScheduledControllers scheduledControllers last] ifNotNil:[interruptedController].\n\t\tScheduledControllers activeControllerNoTerminate: c  andProcess: interruptedProcess].\n\t\"if old process was terminated, just terminate current one\"\n\tinterruptedProcess _ nil.\n\t\"Before delete, so release doesn't terminate it\"\n\taTopView controller closeAndUnscheduleNoErase.\n\tSmalltalk installLowSpaceWatcher.\n\t\"restart low space handler\"\n\terrorWasInUIProcess == false\n\t\tifFalse: [Processor terminateActive]! !\n\n!Debugger methodsFor: 'private' stamp: 'ssa 3/10/2010 09:17'!\nselectedContext\n\n\tself contextStackIndex = 0\n\t\tifTrue: [^self contextStackTop]\n\t\tifFalse: [^self contextStack at: contextStackIndex]! !\n\n!Debugger methodsFor: 'private' stamp: 'ssa 3/3/2010 21:48'!\nupdateInspectorToObject: obj\n\n\tself receiverInspector object: obj! !\n\n!Debugger methodsFor: '*RVMBootstrap' stamp: 'ssa 3/3/2010 22:53'!\ninstallListFontInto: aListView\n\n\t\"do nothing by default\"! !\n\n!Debugger class methodsFor: 'class initialization' stamp: 'sm 5/25/2011 20:27'!\nopenContext: aContext label: aString contents: contentsStringOrNil\n\t| isolationHead |\n\t\"Open a notifier in response to an error, halt, or notify. A notifier view just shows a short view of the sender stack and provides a menu that lets the user open a full debugger.\"\n\t<primitive: 19> \"Simulation guard\"\n\t\"When we are running headless, we just print the stuff and quit.\"\n\tRVMOperations isHeadless ifTrue: [\n\t\tSmalltalk logError: aString inContext: aContext onConsoleAndQuitWithSaving: false.\n\t].\n\t\n\tErrorRecursion not & Preferences logDebuggerStackToFile ifTrue:\n\t\t[Smalltalk logError: aString inContext: aContext to: 'SqueakDebug.log'].\n\tErrorRecursion ifTrue:\n\t\t[ErrorRecursion _ false.\n\t\t\"(isolationHead _ CurrentProjectRefactoring currentIsolationHead)\n\t\t\tifNil: [self primitiveError: aString]\n\t\t\tifNotNil: [isolationHead revoke]\"].\n\tErrorRecursion _ true.\n\tself informExistingDebugger: aContext label: aString.\n\t(Debugger context: aContext isolationHead: nil)\n\t\topenNotifierContents: contentsStringOrNil\n\t\tlabel: aString.\n\tErrorRecursion _ false.\n\tProcessor thisProcess suspend.\n! !\n\n!Debugger class methodsFor: 'instance creation' stamp: 'dmu 11/25/2008 00:20'!\ncontext: aContext isolationHead: isolationHead\n\t\"Answer an instance of me for debugging the active process starting with the given context.\"\n\n\t^ self new\n\t\tprocess: Processor thisProcess\n\t\tcontroller:\n\t\t\t((Smalltalk isMorphic not and: [ScheduledControllers inActiveControllerProcess])\n\t\t\t\tifTrue: [ScheduledControllers activeController]\n\t\t\t\tifFalse: [nil])\n\t\tcontext: aContext\n\t\tisolationHead: isolationHead\n! !\n\n!Debugger class methodsFor: 'opening' stamp: 'dmu 9/17/2010 12:00'!\nopenInterrupt: aString onProcess: interruptedProcess\n\t\"Open a notifier in response to an interrupt. An interrupt occurs when the user types the interrupt key (cmd-. on Macs, ctrl-c or alt-. on other systems) or when the low-space watcher detects that memory is low.\"\n\t| debugger |\n\t<primitive: 19> \"Simulation guard\"\n\tdebugger _ self new.\n\tinterruptedProcess suspend.\n\tdebugger\n\t\tprocess: interruptedProcess\n\t\tcontroller: ((Smalltalk isMorphic not\n\t\t\t\t\tand: [ScheduledControllers activeControllerProcess == interruptedProcess])\n\t\t\t\t\t\tifTrue: [ScheduledControllers activeController])\n\t\tcontext: interruptedProcess suspendedContextWaitingIfNecessary.\n\tdebugger externalInterrupt: true.\n\nPreferences logDebuggerStackToFile ifTrue:\n\t[(aString includesSubString: 'Space') & \n\t\t(aString includesSubString: 'low') ifTrue: [\n\t\t\tSmalltalk logError: aString inContext: debugger interruptedContext to:'LowSpaceDebug.log']].\n\n\t^ debugger\n\t\topenNotifierContents: nil\n\t\tlabel: aString\n! !\n\n!Debugger class methodsFor: 'opening' stamp: 'sm 5/25/2011 20:35'!\nopenNoForkSuspendOn: process context: context label: title contents: contentsStringOrNil fullView: bool selectingOtherIndex: anIndex\n\t\"Open a notifier in response to an error, halt, or notify. A notifier view just shows a short view of the sender stack and provides a menu that lets the user open a full debugger.\"\n\n\t| controller |\n\t\n\t\"When we are running headless, we just print the stuff and quit.\"\n\tRVMOperations isHeadless ifTrue: [\n\t\tSmalltalk logError: (title, 'Contents: ', contentsStringOrNil asString) inContext: context onConsoleAndQuitWithSaving: false.\n\t].\n\t\n\tcontroller _ ScheduledControllers activeControllerProcess == process\n\t\t\t\tifTrue: [ScheduledControllers activeController].\n\t [\n\t\t[\t| debugger |\n\t\t\tdebugger _ self new process: process controller: controller context: context.\n\t\t\tbool ifTrue: [debugger openFullNoSuspendLabel: title]\n\t\t\t\tifFalse: [debugger openNotifierContents: contentsStringOrNil label: title].\n\t\t\tdebugger setContextStackIndexFromOtherIndex: anIndex otherTopContext: context.\n\t\t\tPreferences logDebuggerStackToFile ifTrue: [\n\t\t\t\tSmalltalk logError: title inContext: context to: 'SqueakDebug.log'].\n\t\t\tSmalltalk isMorphic\n\t\t\t\tifFalse: [ScheduledControllers searchForActiveController \"needed since openNoTerminate (see debugger #open...) does not set up activeControllerProcess if activeProcess (this fork) is not the current activeControllerProcess (see #scheduled:from:)\"].\n\t\t] on: Error do: [:ex |\n\t\t\tself primitiveError: \n\t\t\t\t'Orginal error: ', \n\t\t\t\ttitle asString, '.\n\tDebugger error: ', \n\t\t\t\t([ex description] on: Error do: ['a ', ex class printString]), ':'\n\t\t]\n\t] value! !\n\n!Debugger class methodsFor: 'opening' stamp: 'sm 5/25/2011 20:35'!\nopenNoSuspendOn: process context: context label: title contents: contentsStringOrNil fullView: bool\n\t\"Open a notifier in response to an error, halt, or notify. A notifier view just shows a short view of the sender stack and provides a menu that lets the user open a full debugger.\"\n\n\t| controller |\n\t\n\t\"When we are running headless, we just print the stuff and quit.\"\n\tRVMOperations isHeadless ifTrue: [\n\t\tSmalltalk logError: (title, 'Contents: ', contentsStringOrNil asString) inContext: context onConsoleAndQuitWithSaving: false.\n\t].\n\t\n\tSmalltalk isMorphic\n\t\tifTrue: []\n\t\tifFalse: [controller _ ScheduledControllers activeControllerProcess == process\n\t\t\t\tifTrue: [ScheduledControllers activeController]].\n\t[\n\t\t[\t| debugger |\n\t\t\tdebugger _ self new process: process controller: controller context: context.\n\t\t\tbool ifTrue: [debugger openFullNoSuspendLabel: title]\n\t\t\t\tifFalse: [debugger openNotifierContents: contentsStringOrNil label: title].\n\t\t\tPreferences logDebuggerStackToFile ifTrue: [\n\t\t\t\tSmalltalk logError: title inContext: context to: 'SqueakDebug.log'].\n\t\t\tSmalltalk isMorphic\n\t\t\t\tifFalse: [ScheduledControllers searchForActiveController \"needed since openNoTerminate (see debugger #open...) does not set up activeControllerProcess if activeProcess (this fork) is not the current activeControllerProcess (see #scheduled:from:)\"].\n\t\t] on: Error do: [:ex |\n\t\t\tself primitiveError: \n\t\t\t\t'Orginal error: ', \n\t\t\t\ttitle asString, '.\n\tDebugger error: ', \n\t\t\t\t([ex description] on: Error do: ['a ', ex class printString]), ':'\n\t\t]\n\t] fork! !\n\n!Debugger class methodsFor: 'opening' stamp: 'dmu 3/25/2010 10:23'!\nopenOn: process context: context label: title contents: contentsStringOrNil fullView: bool\n    self openNoSuspendOn: process context: context label: title contents: contentsStringOrNil fullView: bool.\n   process suspend.\n! !\n\n!Delay methodsFor: '*RVM' stamp: 'dmu 2/6/2011 21:25'!\nspinWait\n\t| t |\n\tt _ Time millisecondClockValue + delayDuration.\n\t[t > Time millisecondClockValue] whileTrue: [Processor yield]! !\n\n!Delay class methodsFor: 'snapshotting' stamp: 'dmu 5/25/2010 11:02'!\nstartUp\n\t\"Restart active delay, if any, when resuming a snapshot.\"\n\n\tself restoreResumptionTimes.\n\tActiveDelay == nil ifFalse: [ActiveDelay activate].\n\tAccessProtect _ Semaphore forMutualExclusion\n! !\n\n!Delay class methodsFor: 'timer process' stamp: 'sm 2/24/2011 16:38'!\nstartTimerInterruptWatcher\n\t\"Reset the class variables that keep track of active Delays and re-start the timer interrupt watcher process. Any currently scheduled delays are forgotten.\"\n\t\"Delay startTimerInterruptWatcher\"\n\n\t| p |\n\tself primSignal: nil atMilliseconds: 0.\n\tTimingSemaphore == nil\n\t\tifFalse: [TimingSemaphore terminateProcess].\n\tTimingSemaphore _ Semaphore new.\n\tAccessProtect _ Semaphore forMutualExclusion.\n\tSuspendedDelays _ \n\t\tSortedCollection sortBlock: \n\t\t\t[:d1 :d2 | d1 resumptionTime <= d2 resumptionTime].\n\tActiveDelay _ nil.\n\tp _ [self timerInterruptWatcher] newProcess.\n\tp priority: Processor timingPriority.\n\tp name: 'TimerInterruptWatcher'.\n\tp resume.\n! !\n\n!Dictionary methodsFor: 'outlining' stamp: 'ssa 9/10/2009 14:30'!\nsubobjects\n\n\t^self associations asOrderedCollection! !\n\n!Dictionary methodsFor: '*RVM-Archiving'!\narchiveOn: aStream\n\taStream\n\t\tstoreObject: self;\n\t\tstoreClass: self class;\n\t\tstore: self size.\n\tself associationsDo:\n\t\t[:each | aStream nextPut: each]! !\n\n!Dictionary methodsFor: '*Ly-Explorer' stamp: 'hg 10/3/2001 20:47'!\nexplorerContents\n\n\t| contents |\n\t\n\tcontents := OrderedCollection new.\n\tself keysSortedSafely do: [:key |\n\t\tcontents add: (ObjectExplorerWrapper\n\t\t\twith: (self at: key)\n\t\t\tname: (key printString contractTo: 32)\n\t\t\tmodel: self)].\n\t^contents\n! !\n\n!DictionaryInspector methodsFor: 'menu' stamp: 'ssa 1/6/2010 20:24'!\ndictionaryMenu: aMenu\n\t\"Set up the key-list menu for a dictionary inspector\"\n\n\taMenu title: 'Dictionary key'.\n\t^ aMenu addList: #(\n\t\t('inspect'\t\t\t\t\t\tinspectSelection)\n\t\t('explore'\t\t\t\t\t\texploreSelection)\n\t\t('copy name'\t\t\t\t\tcopyName)\n\t\t('references'\t\t\t\t\tselectionReferences)\n\t\t('objects pointing to this value'\tobjectReferencesToSelection)\n\t\t('senders of this key'\t\t\tsendersOfSelectedKey)\n\t\t-\n\t\t('refresh view'\t\t\t\t\tcalculateKeyArray)\n\t\t-\n\t\t('add key'\t\t\t\t\t\taddEntry)\n\t\t('rename key'\t\t\t\t\trenameEntry)\n\t\t('remove'\t\t\t\t\t\tremoveSelection)\n\t\t-\n\t\t('basic inspect'\t\t\t\t\tinspectBasic))! !\n\n!DisplayMedium methodsFor: 'bordering' stamp: 'ssa 11/30/2009 13:50'!\nborder: aRectangle width: borderWidth fillColor: aHalfTone  clippingBox: clipRect\n\t\"Paint a border whose rectangular area is defined by aRectangle. The \n\twidth of the border of each side is borderWidth. Uses aHalfTone for \n\tdrawing the border.\"\n\n\tself border: aRectangle\n\t\twidthRectangle: \n\t\t\t(Rectangle\n\t\t\t\tleft: borderWidth\n\t\t\t\tright: borderWidth\n\t\t\t\ttop: borderWidth\n\t\t\t\tbottom: borderWidth)\n\t\trule: Form over\n\t\tfillColor: aHalfTone\n\t\t clippingBox: clipRect! !\n\n!DisplayMedium methodsFor: 'bordering' stamp: 'ssa 11/30/2009 13:50'!\nborder: aRectangle width: borderWidth rule: combinationRule fillColor: aHalfTone  clippingBox: clipRect\n\t\"Paint a border whose rectangular area is defined by aRectangle. The \n\twidth of the border of each side is borderWidth. Uses aHalfTone for \n\tdrawing the border.\"\n\n\tself border: aRectangle\n\t\twidthRectangle: \n\t\t\t(Rectangle\n\t\t\t\tleft: borderWidth\n\t\t\t\tright: borderWidth\n\t\t\t\ttop: borderWidth\n\t\t\t\tbottom: borderWidth)\n\t\trule: combinationRule\n\t\tfillColor: aHalfTone\n\t\t clippingBox: clipRect! !\n\n!DisplayMedium methodsFor: 'bordering' stamp: 'ssa 11/30/2009 13:42'!\nborder: aRectangle widthRectangle: insets rule: combinationRule fillColor: aHalfTone clippingBox: clipRect\n\t\"Paint a border whose rectangular area is defined by aRectangle. The \n\twidth of each edge of the border is determined by the four coordinates \n\tof insets. Uses aHalfTone and combinationRule for drawing the border.\"\n\n\t(aRectangle areasOutside: (aRectangle insetBy: insets)) do:\n\t\t[:edgeStrip | self fill: edgeStrip rule: combinationRule fillColor: aHalfTone  clippingBox: clipRect]! !\n\n!DisplayMedium methodsFor: 'bordering' stamp: 'ssa 12/18/2009 06:38'!\noutlined\n\n\tself border: self boundingBox width: 1! !\n\n!DisplayObject methodsFor: 'displaying-generic' stamp: 'ssa 9/4/2009 10:47'!\ndisplayOn: aDisplayMedium at: aDisplayPoint \n\t\"Display the receiver located at aDisplayPoint with default settings for \n\trule and halftone.\"\n\n\tself displayOn: aDisplayMedium\n\t\tat: aDisplayPoint\n\t\tclippingBox: aDisplayMedium boundingBox\n\t\trule: Form paint\n\t\tfillColor: nil! !\n\n!DisplayObject methodsFor: 'displaying-generic' stamp: 'ssa 12/17/2009 16:54'!\nfollowCursor\n\t\"Just show the Form following the mouse. 6/21/96 tk\"\n\tCursor blank showWhile:\n\t\t[self follow: [Sensor cursorPoint] while: [Sensor noButtonPressed]].\n\tSensor waitNoButton\n! !\n\n!DisplayScreen methodsFor: 'displaying' stamp: 'ssa 8/23/2009 15:06'!\noutline: rectBlock do: effectBlock while: durationBlock width: borderWidth halftone: halftone\n\t\"Display an evolving rectangle dynamically.\n\trectBlock supplies a rectangle, durationBlock supplies true, then false to terminate.\n\teffectBlock is executed at each iteration.\" \n\n\t| oldRect edges rect | \n\toldRect _ rectBlock value rounded.\n\tedges _ oldRect areasOutside: (oldRect insetBy: borderWidth).\n\tedges do: [:edge | self fill: edge rule: Form reverse fillColor: halftone].\n\t[durationBlock value] whileTrue:\n\t\t[rect _ rectBlock value rounded.\n\t\trect = oldRect\n\t\t\tifFalse:\n\t\t\t\t[edges do: [:edge | self fill: edge rule: Form reverse fillColor: halftone].\n\t\t\t\teffectBlock value.\n\t\t\t\tedges _ rect areasOutside: (rect insetBy: borderWidth).\n\t\t\t\tedges do: [:edge | self fill: edge rule: Form reverse fillColor: halftone].\n\t\t\t\toldRect _ rect]].\n\tedges do: [:edge | self fill: edge rule: Form reverse fillColor: halftone].\n\t^ oldRect! !\n\n!DisplayScreen methodsFor: 'displaying' stamp: 'ssa 8/23/2009 15:05'!\noutline: rectBlock while: durationBlock width: borderWidth halftone: halftone\n\t\"Display an evolving rectangle dynamically.\n\trectBlock supplies a rectangle, durationBlock supplies true, then false to \nterminate.\" \n\n\t^self outline: rectBlock do: [] while: durationBlock width: borderWidth halftone: halftone! !\n\n!DisplayScreen methodsFor: 'other' stamp: 'ssa 8/24/2009 10:14'!\nboundingBox\n\tclippingBox == nil\n\t\tifTrue: [self clippingBox: super boundingBox].\n\t^ clippingBox copy! !\n\n!DisplayScreen methodsFor: 'other' stamp: 'ssa 8/24/2009 09:59'!\nclippingTo: aRect do: aBlock\n\t\"Display clippingTo: Rectangle fromUser do:\n\t[ScheduledControllers restore: Display fullBoundingBox]\"\n\t| saveClip |\n\tsaveClip _ clippingBox.\n\tself clippingBox: aRect.\n\taBlock value.\n\tself clippingBox: saveClip! !\n\n!DisplayScreen methodsFor: 'other' stamp: 'ssa 8/24/2009 09:59'!\nfullScreen   \"Display fullScreen\"\n\n\tScreenSave notNil ifTrue: [Display _ ScreenSave].\n\tself clippingBox: super boundingBox! !\n\n!DisplayScreen methodsFor: 'private' stamp: 'ssa 8/24/2009 10:00'!\ncopyFrom: aForm\n\t\"Take on all state of aForm, with complete sharing\"\n\n\tsuper copyFrom: aForm.\n\tself clippingBox: super boundingBox! !\n\n!DisplayScreen methodsFor: 'private' stamp: 'ssa 8/24/2009 10:00'!\nsetExtent: aPoint depth: bitsPerPixel  \"DisplayScreen startUp\"\n\t\"This method is critical.  If the setExtent fails, there will be no\n\tproper display on which to show the error condition...\"\n\t\"ar 5/1/1999: ... and that is exactly why we check for the available display depths first.\"\n\n\t\"RAA 27 Nov 99 - if depth and extent are the same and acceptable, why go through this.\n\talso - record when we change so worlds can tell if it is time to repaint\"\n\n\t(depth == bitsPerPixel and: [aPoint = self extent and: \n\t\t\t\t\t[self supportsDisplayDepth: bitsPerPixel]]) ifFalse: [\n\t\tbits _ nil.  \"Free up old bitmap in case space is low\"\n\t\tDisplayChangeSignature _ (DisplayChangeSignature ifNil: [0]) + 1.\n\t\t(self supportsDisplayDepth: bitsPerPixel)\n\t\t\tifTrue:[super setExtent: aPoint depth: bitsPerPixel]\n\t\t\tifFalse:[\"Search for a suitable depth\"\n\t\t\t\t\tsuper setExtent: aPoint depth: self findAnyDisplayDepth].\n\t].\n\tself clippingBox: super boundingBox! !\n\n!DisplayScreen methodsFor: 'accessing' stamp: 'ssa 8/24/2009 10:10'!\nclippingBox: aRect\n\tclippingBox _ aRect\n\t! !\n\n!DisplayScreen methodsFor: '*RVM' stamp: 'dmu 1/25/2010 11:25'!\ndrawDot5At: point1\n\t\"Display drawDot5At: 100@100\"\n\tDot5 ifNil: [Dot5 _ Form dotOfSize:5].\n\tDot5 displayAt: point1! !\n\n!DisplayScreen methodsFor: '*RVM' stamp: 'aau 1/13/2011 19:54'!\ndrawDot5At: point1 color: c\n\t|ColorDot5|\n\t\"Display drawDot5At: 100@100 color: Color red\"\n\tColorDot5 _ ColorForm dotOfSize:5 color: c.\n\tColorDot5 displayAt: point1! !\n\n!DisplayScreen methodsFor: '*RVM' stamp: 'dmu 3/23/2010 00:02'!\ndrawLineFrom: point1 to: point2 color: aColor\n\t\"Display drawLineFrom: Point fromUser to: Point fromUser color: Color fromUser\"\n\t\"Display drawLineFrom: 0@0 to: 200@200 color: Color black\"\n\t\"Display drawLineFrom: 0@0 to: 200@200 color: Color white\"\n\tDot1 ifNil: [Dot1 _ Form dotOfSize:1].\n\tself drawLine: Dot1 from: point1 to: point2 clippingBox: self boundingBox rule: Form paint fillColor: aColor ! !\n\n!DisplayScreen methodsFor: '*RVM' stamp: 'dmu 1/25/2010 11:27'!\neraseDot5At: point1\n\t\"Display eraseDot5At: 100@100\"\n\tBlank5 ifNil: [Blank5 _ (Form dotOfSize:5) fillWhite].\n\tBlank5 displayAt: point1! !\n\n!DisplayScreen methodsFor: '*RVM' stamp: 'dmu 3/23/2010 00:03'!\neraseLineFrom: point1 to: point2 color: aColor\n\t\"Display eraseLineFrom: Point fromUser to: Point fromUser color: Color fromUser\"\n\t\"Display eraseLineFrom: 0@0 to: 200@200 color: Color black\"\n\t\"Display eraseLineFrom: 0@0 to: 200@200 color: Color white\"\n\tDot1 ifNil: [Dot1 _ Form dotOfSize:1].\n\tself drawLine: Dot1 from: point1 to: point2 clippingBox: self boundingBox rule: Form erase fillColor: aColor ! !\n\n!DisplayText methodsFor: 'accessing' stamp: 'ssa 8/27/2009 11:17'!\nnumberOfLines \n\t\"Answer the number of lines of text in the receiver.\"\n\n\t^self text lineCount! !\n\n!DisplayText methodsFor: 'converting' stamp: 'ssa 1/20/2010 10:34'!\nasParagraphWithStyle: aTextStyle\n\t\"Answer a Paragraph whose text  is  identical to that of the \n\treceiver.\"\n\t| para |\n\tpara _ Paragraph withText: text style: aTextStyle.\n\tpara foregroundColor: foreColor backgroundColor: backColor.\n\tbackColor isTransparent ifTrue: [para rule: Form paint].\n\t^ para! !\n\n!DisplayText methodsFor: 'testing' stamp: 'ssa 1/20/2010 11:00'!\nisEmpty\n\n\t^self text isEmpty! !\n\n!DisplayTextView class methodsFor: 'examples' stamp: 'ssa 9/4/1998 17:29'!\nexample2\t\n\t\"Create a standarad system view with two parts, one editable, the other not.\"\n\t\"Modified to support Windoze - ssa\"\n\t| topView aDisplayTextView |\n\ttopView _ StandardSystemView new.\n\ttopView label: 'Text Editor'.\n\taDisplayTextView _ MSWScrollBarView on: (self new model: 'test string label' asDisplayText).\n\taDisplayTextView scrollingView controller: NoController new.\n\taDisplayTextView window: (0 @ 0 extent: 100 @ 100).\n\taDisplayTextView borderWidthLeft: 2 right: 0 top: 2 bottom: 2.\n\ttopView addSubView: aDisplayTextView.\n\n\taDisplayTextView _ MSWScrollBarView on: (self new model: 'test string' asDisplayText).\n\taDisplayTextView window: (0 @ 0 extent: 100 @ 100).\n\taDisplayTextView borderWidth: 2.\n\ttopView\n\t\taddSubView: aDisplayTextView\n\t\talign: aDisplayTextView viewport topLeft\n\t\twith: topView lastSubView viewport topRight.\n\ttopView controller open\n\n\t\"DisplayTextView example2\"! !\n\n!DisplayTextView class methodsFor: 'examples'!\nopen: textOrString label: aLabel\n        \"Create a system view with a paragraph editor in it.  6/2/96 sw\"\n        \"VIVA LA JUNTA!!  Modified to use MSWScrollBarViews - ssa 12/11/97 12:00\"\n\n        | topView aDisplayTextView |\n        aDisplayTextView _ MSWScrollBarView on: (DisplayTextView new model: textOrString asDisplayText).\n        aDisplayTextView borderWidth: 2.\n        topView _ StandardSystemView new.\n        topView label: aLabel.\n        topView addSubView: aDisplayTextView.\n        topView controller open\n\n        \"DisplayTextView open: 'Great green gobs' label: 'Gopher Guts'\"! !\n\n!DualChangeSorter methodsFor: 'initialization' stamp: 'ssa 9/3/2008 11:07'!\nopen\n\t| topView |\n\n\tleftCngSorter _ ChangeSorter new myChangeSet: ChangeSet current.\n\tleftCngSorter parent: self.\n\trightCngSorter _ ChangeSorter new myChangeSet: \n\t\t\tChangeSorter secondaryChangeSet.\n\trightCngSorter parent: self.\n\n\ttopView _ (StandardSystemView new) model: self; borderWidth: 1.\n\ttopView label: leftCngSorter label.\n\ttopView minimumSize: 300 @ 200.\n\tleftCngSorter openView: topView offsetBy: 0@0.\n\trightCngSorter openView: topView offsetBy: 360@0.\n\ttopView controller open.\n! !\n\n!EnsembleNode methodsFor: 'printing' stamp: 'ssa 4/19/2010 20:44'!\nprintOn: aStream indent: level\n\n\taStream nextPut: $%;nextPut: ${.\n\t1 to: elements size do: \n\t\t[:i | (elements at: i) printOn: aStream indent: level.\n\t\ti < elements size ifTrue: [aStream nextPutAll: '. ']].\n\taStream nextPut: $}! !\n\n!EnsembleNode methodsFor: 'code generation' stamp: 'ssa 4/19/2010 22:35'!\nemitForValue: stack on: aStream\n\n\t^ emitNode emitForValue: stack on: aStream! !\n\n!EnsembleNode methodsFor: 'code generation' stamp: 'dmu 9/16/2010 23:44'!\nsizeForValue: encoder\n\temitNode _ \"Long form: (Array braceStream: N) nextPut: a; nextPut: b; ...; braceArray;asEnsembleOfElements\"\n\t\t\t\tCascadeNode new\n\t\t\t\t\treceiver: (MessageNode new\n\t\t\t\t\t\t\t\treceiver: (encoder encodeVariable: #Array)\n\t\t\t\t\t\t\t\tselector: #braceStream:\n\t\t\t\t\t\t\t\targuments: (Array with: (encoder encodeLiteral: elements size))\n\t\t\t\t\t\t\t\tprecedence: 3 from: encoder)\n\t\t\t\t\tmessages: (((elements collect: [:elt | MessageNode new receiver: nil\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tselector: #nextPut:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\targuments: (Array with: elt)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tprecedence: 3 from: encoder])\n\t\t\t\t\t\t\t\tcopyWith: (MessageNode new receiver: nil\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tselector: #braceArray\n\t\t\t\t\t\t\t\t\t\t\t\t\t\targuments: (Array new)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tprecedence: 1 from: encoder))copyWith: (MessageNode new receiver: nil\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tselector: #asEnsembleOfElements\n\t\t\t\t\t\t\t\t\t\t\t\t\t\targuments: (Array new)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tprecedence: 1 from: encoder)).\n\t^ emitNode sizeForValue: encoder! !\n\n!EqualityTester methodsFor: 'as yet unclassified' stamp: 'mjr 8/20/2003 18:56'!\nresultFor: runs \n\t\"Test that equality is the same over runs and answer the result\"\n\t1\n\t\tto: runs\n\t\tdo: [:i | self prototype = self prototype\n\t\t\t\tifFalse: [^ false]]. \n\t^ true! !\n\n!EqualityTester commentStamp: 'mjr 8/20/2003 13:04' prior: 0!\nI provide a simple way to test the equality properties of any object.!\n!Error methodsFor: '*SUnit'!\nsunitAnnounce: aTestCase toResult: aTestResult\n\taTestResult addError: aTestCase.\n\tself sunitExitWith: false.! !\n\n!EventSensor methodsFor: 'accessing' stamp: 'ar 7/23/2000 14:37'!\neventQueue\n\t\"Return the current event queue\"\n\t^eventQueue! !\n\n!EventSensor methodsFor: 'accessing' stamp: 'nk 4/12/2004 19:36'!\neventTicklerProcess\n\t\"Answer my event tickler process, if any\"\n\t^EventTicklerProcess! !\n\n!EventSensor methodsFor: 'accessing' stamp: 'ssa 12/17/2009 13:19'!\nflushAllButDandDEvents\n\t| newQueue oldQueue  |\n\t\n\tnewQueue _ SharedQueue new.\n\tself eventQueue ifNil: \n\t\t[eventQueue := newQueue.\n\t\t^self].\n\toldQueue _ self eventQueue.\n\t[oldQueue size > 0] whileTrue: \n\t\t[| item type | \n\t\titem _ oldQueue next.\n\t\ttype _ item at: 1.\n\t\ttype = EventTypeDragDropFiles ifTrue: [ newQueue nextPut: item]].\n\teventQueue := newQueue.\n! !\n\n!EventSensor methodsFor: 'accessing' stamp: 'ar 2/7/2001 17:13'!\nflushEvents\n\teventQueue ifNotNil:[eventQueue flush].! !\n\n!EventSensor methodsFor: 'accessing' stamp: 'ssa 12/17/2009 12:30'!\nnextEvent\n\t\"Return the next event from the receiver.\"\n\teventQueue == nil \n\t\tifTrue:[^self nextEventSynthesized]\n\t\tifFalse:[^self nextEventFromQueue]\n! !\n\n!EventSensor methodsFor: 'accessing' stamp: 'JMM 11/7/2005 14:38'!\npeekButtons\n\tself wait2ms.\n\tself fetchMoreEvents.\n\t^mouseButtons! !\n\n!EventSensor methodsFor: 'accessing' stamp: 'ar 2/6/2004 14:51'!\npeekEvent\n\t\"Look ahead at the next event.\"\n\teventQueue ifNil:[^nil].\n\tself fetchMoreEvents.\n\t^eventQueue peek! !\n\n!EventSensor methodsFor: 'accessing' stamp: 'tpr 1/5/2005 17:34'!\npeekKeyboardEvent\n\t\"Return the next keyboard char event from the receiver or nil if none available\"\n\t^eventQueue nextOrNilSuchThat: \n\t\t\t\t\t[:buf | \n\t\t\t\t\tbuf first = EventTypeKeyboard and: [(buf fourth) = EventKeyChar]]! !\n\n!EventSensor methodsFor: 'accessing' stamp: 'ar 2/8/2001 21:45'!\npeekMousePt\n\t^mousePosition! !\n\n!EventSensor methodsFor: 'accessing' stamp: 'JMM 11/7/2005 14:38'!\npeekPosition\n\tself wait2ms.\n\tself fetchMoreEvents.\n\t^mousePosition! !\n\n!EventSensor methodsFor: 'initialize' stamp: 'nk 4/12/2004 19:21'!\ninitialize\n\t\"Initialize the receiver\"\n\tmouseButtons := 0.\n\tmousePosition := 0 @ 0.\n\tkeyboardBuffer := SharedQueue new.\n\tself setInterruptKey: (interruptKey ifNil: [$. asciiValue bitOr: 16r0800 ]). \t\"cmd-.\"\n\tinterruptSemaphore := (Smalltalk specialObjectsArray at: 31) ifNil: [Semaphore new].\n\tself flushAllButDandDEvents.\n\tinputSemaphore := Semaphore new.\n\thasInputSemaphore := false.! !\n\n!EventSensor methodsFor: 'initialize' stamp: 'nk 4/12/2004 20:13'!\nshutDown\n\tsuper shutDown.\n\tEventTicklerProcess ifNotNil: [\n\t\tEventTicklerProcess terminate.\n\t\tEventTicklerProcess _ nil. ].\n\tinputSemaphore ifNotNil:[Smalltalk unregisterExternalObject: inputSemaphore].\n! !\n\n!EventSensor methodsFor: 'initialize' stamp: 'nk 6/21/2004 10:42'!\nstartUp\n\t\"Run the I/O process\"\n\tself initialize.\n\tself primSetInputSemaphore: (Smalltalk registerExternalObject: inputSemaphore).\n\tsuper startUp.\n\tself installEventTickler.\n\tSmalltalk isMorphic ifTrue:[self flushAllButDandDEvents].\n\n\t\"Attempt to discover whether the input semaphore is actually being signaled.\"\n\thasInputSemaphore := false.\n\tinputSemaphore initSignals.\n! !\n\n!EventSensor methodsFor: 'mouse' stamp: 'ar 5/18/2003 18:27'!\ncreateMouseEvent\n\t\"create and return a new mouse event from the current mouse \n\tposition; this is useful for restarting normal event queue \n\tprocessing after manual polling\"\n\n\t| buttons modifiers pos mapped eventBuffer |\n\teventBuffer _ Array new: 8.\n\tbuttons _ self primMouseButtons.\n\tpos _ self primMousePt.\n\tmodifiers _ buttons bitShift: -3.\n\tbuttons _ buttons bitAnd: 7.\n\tmapped _ self mapButtons: buttons modifiers: modifiers.\n\teventBuffer\n\t\tat: 1\n\t\tput: EventTypeMouse;\n\t\t at: 2 put: Time millisecondClockValue;\n\t\t at: 3 put: pos x;\n\t\t at: 4 put: pos y;\n\t\t at: 5 put: mapped;\n\t\t at: 6 put: modifiers.\n\t^ eventBuffer! !\n\n!EventSensor methodsFor: 'private' stamp: 'nk 4/12/2004 20:16'!\neventTickler\n\t\"Poll infrequently to make sure that the UI process is not been stuck. \n\tIf it has been stuck, then spin the event loop so that I can detect the \n\tinterrupt key.\"\n\t| delay |\n\tdelay := Delay forMilliseconds: self class eventPollPeriod.\n\tself lastEventPoll.\t\"ensure not nil.\"\n\t[| delta | \n\t[ delay wait.\n\tdelta := Time millisecondClockValue - lastEventPoll.\n\t(delta < 0\n\t\t\tor: [delta > self class eventPollPeriod])\n\t\tifTrue: [\"force check on rollover\"\n\t\t\tself fetchMoreEvents]] on: Error do: [:ex | ].\n\ttrue ] whileTrue.! !\n\n!EventSensor methodsFor: 'private' stamp: 'ssa 12/17/2009 14:18'!\nflushNonKbdEvents\n\teventQueue ifNil: [^ self].\n\t[^self]value.   \"don't flush so we don't lose events\"\n\teventQueue flushAllSuchThat:\n\t\t[:buf | (self isKbdEvent: buf) not]\n! !\n\n!EventSensor methodsFor: 'private' stamp: 'sm 2/24/2011 16:42'!\ninstallEventTickler\n\t\"Initialize the interrupt watcher process. Terminate the old process if any.\"\n\t\"Sensor installEventTickler\"\n\n\tEventTicklerProcess ifNotNil: [EventTicklerProcess terminate].\n\tEventTicklerProcess _ [self eventTickler] forkAt: Processor lowIOPriority.\n\tEventTicklerProcess name: 'EventTicklerProcess'.\n! !\n\n!EventSensor methodsFor: 'private' stamp: 'di 10/1/2001 20:51'!\nisKbdEvent: buf\n\t^ (buf at: 1) = EventTypeKeyboard and: [(buf at: 4) = EventKeyChar]! !\n\n!EventSensor methodsFor: 'private' stamp: 'nk 3/18/2004 13:21'!\nlastEventPoll\n\t\"Answer the last clock value at which fetchMoreEvents was called.\"\n\t^lastEventPoll ifNil: [ lastEventPoll _ Time millisecondClockValue ]! !\n\n!EventSensor methodsFor: 'private' stamp: 'ar 2/6/2004 14:42'!\nnextEventFromQueue\n\t\"Return the next event from the receiver.\"\n\teventQueue isEmpty ifTrue:[self fetchMoreEvents].\n\teventQueue isEmpty\n\t\tifTrue:[^nil]\n\t\tifFalse:[^eventQueue next]! !\n\n!EventSensor methodsFor: 'private' stamp: 'nk 3/17/2004 07:09'!\nnextEventSynthesized\n\t\"Return a synthesized event. This method is called if an event driven client wants to receive events but the primary user interface is not event-driven (e.g., the receiver does not have an event queue but only updates its state). This can, for instance, happen if a Morphic World is run in an MVC window. To simplify the clients work this method will always return all available keyboard events first, and then (repeatedly) the mouse events. Since mouse events come last, the client can assume that after one mouse event has been received there are no more to come. Note that it is impossible for EventSensor to determine if a mouse event has been issued before so the client must be aware of the possible problem of getting repeatedly the same mouse events. See HandMorph>>processEvents for an example on how to deal with this.\"\n\t| kbd array buttons pos modifiers mapped |\n\t\"First check for keyboard\"\n\tarray _ Array new: 8.\n\tkbd _ self primKbdNext.\n\tkbd ifNotNil:\n\t\t[\"simulate keyboard event\"\n\t\tarray at: 1 put: EventTypeKeyboard. \"evt type\"\n\t\tarray at: 2 put: Time millisecondClockValue. \"time stamp\"\n\t\tarray at: 3 put: (kbd bitAnd: 255). \"char code\"\n\t\tarray at: 4 put: EventKeyChar. \"key press/release\"\n\t\tarray at: 5 put: (kbd bitShift: -8). \"modifier keys\"\n\t\t^ array].\n\n\t\"Then check for mouse\"\n\tpos _ self primMousePt.\n\tbuttons _ mouseButtons.\n\tmodifiers _ buttons bitShift: -3.\n\tbuttons _ buttons bitAnd: 7.\n\tmapped _ self mapButtons: buttons modifiers: modifiers.\n\tarray \n\t\tat: 1 put: EventTypeMouse;\n\t\tat: 2 put: Time millisecondClockValue;\n\t\tat: 3 put: pos x;\n\t\tat: 4 put: pos y;\n\t\tat: 5 put: mapped;\n\t\tat: 6 put: modifiers.\n\t^ array\n\n! !\n\n!EventSensor methodsFor: 'private' stamp: 'ar 7/23/2000 00:34'!\nprimInterruptSemaphore: aSemaphore \n\t\"Primitive. Install the argument as the semaphore to be signalled whenever the user presses the interrupt key. The semaphore will be signaled once each time the interrupt key is pressed.\"\n\tinterruptSemaphore _ aSemaphore.\n\t\"backward compatibility: use the old primitive which is obsolete now\"\n\tsuper primInterruptSemaphore: aSemaphore! !\n\n!EventSensor methodsFor: 'private' stamp: 'ssa 12/16/2009 13:26'!\nprimKbdNext\n\t\"Allows for use of old Sensor protocol to get at the keyboard,\n\tas when running kbdTest or the InterpreterSimulator in Morphic\"\n\t| evtBuf |\n\tself fetchMoreEvents.\n\tkeyboardBuffer isEmpty ifFalse:[^ keyboardBuffer next].\n\teventQueue ifNotNil:\n\t\t[evtBuf _ eventQueue nextOrNilSuchThat: [:buf | self isKbdEvent: buf].\n\t\tself flushNonKbdEvents].\n\t^ evtBuf ifNotNil: [evtBuf at: 3]\n! !\n\n!EventSensor methodsFor: 'private' stamp: 'ssa 12/16/2009 13:26'!\nprimKbdPeek\n\t\"Allows for use of old Sensor protocol to get at the keyboard,\n\tas when running kbdTest or the InterpreterSimulator in Morphic\"\n\t| char |\n\n\tself fetchMoreEvents.\n\tkeyboardBuffer isEmpty ifFalse: [^ keyboardBuffer peek].\n\tchar _ nil.\n\teventQueue ifNotNil:\n\t\t[eventQueue nextOrNilSuchThat:  \"NOTE: must not return out of this block, so loop to end\"\n\t\t\t[:buf | (self isKbdEvent: buf) ifTrue: [char ifNil: [char _ buf at: 3]].\n\t\t\tfalse  \"NOTE: block value must be false so Queue won't advance\"]].\n\t^ char\n! !\n\n!EventSensor methodsFor: 'private' stamp: 'ssa 12/16/2009 13:26'!\nprimMouseButtons\n\n\tself fetchMoreEvents.\n\tself flushNonKbdEvents.\n\t^ mouseButtons\n! !\n\n!EventSensor methodsFor: 'private' stamp: 'ssa 12/16/2009 13:26'!\nprimMousePt\n\n\tself fetchMoreEvents.\n\tself flushNonKbdEvents.\n\t^ mousePosition\n! !\n\n!EventSensor methodsFor: 'private' stamp: 'ls 10/23/2000 14:14'!\nprimSetInterruptKey: anInteger\n\t\"Primitive. Register the given keycode as the user interrupt key. The low byte of the keycode is the ISO character and its next four bits are the Smalltalk modifer bits <cmd><opt><ctrl><shift>.\"\n\tinterruptKey _ anInteger.\n\t\"backward compatibility: use the old primitive which is obsolete now\"\n\tsuper primSetInterruptKey: anInteger! !\n\n!EventSensor methodsFor: 'private' stamp: 'JMM 11/7/2005 14:37'!\nwait2ms\n\t(Delay forMilliseconds: 2) wait.! !\n\n!EventSensor methodsFor: 'private-I/O' stamp: 'ssa 12/17/2009 13:21'!\nfetchMoreEvents\n\t\"Fetch more events from the VM\"\n\t| eventBuffer type |\n\n\t\"Reset input semaphore so clients can wait for the next events after this one.\"\n\tinputSemaphore isSignaled\n\t\tifTrue: [ hasInputSemaphore _ true.\n\t\t\tinputSemaphore initSignals ].\n\n\t\"Remember the last time that I checked for events.\"\n\tlastEventPoll := Time millisecondClockValue.\n\n\teventBuffer := Array new: 8.\n\t[self primGetNextEvent: eventBuffer.\n\ttype := eventBuffer at: 1.\n\ttype = EventTypeNone]\n\t\twhileFalse: [self processEvent: eventBuffer ].\n! !\n\n!EventSensor methodsFor: 'private-I/O' stamp: 'ar 7/30/2000 18:12'!\nmapButtons: buttons modifiers: modifiers\n\t\"Map the buttons to yellow or blue based on the given modifiers.\n\tIf only the red button is pressed, then map\n\t\tCtrl-RedButton -> BlueButton.\n\t\tCmd-RedButton -> YellowButton.\n\t\"\n\t(buttons = RedButtonBit)\n\t\tifFalse:[^buttons].\n\t(modifiers allMask: CtrlKeyBit) \n\t\tifTrue:[^BlueButtonBit].\n\t(modifiers allMask: CommandKeyBit) \n\t\tifTrue:[^YellowButtonBit].\n\t^buttons! !\n\n!EventSensor methodsFor: 'private-I/O' stamp: 'ssa 12/17/2009 13:30'!\nprimGetNextEvent: array\n\t\"Store the next OS event available into the provided array.\n\tEssential. If the VM is not event driven the ST code will fall\n\tback to the old-style mechanism and use the state based\n\tprimitives instead.\"\n\t| kbd buttons modifiers pos mapped |\n\t<primitive: 94>\n\n\t\"Simulate the events\"\n\tarray at: 1 put: EventTypeNone. \"assume no more events\"\n\n\t\"First check for keyboard\"\n\tkbd _ super primKbdNext.\n\tkbd = nil ifFalse:[\n\t\t\"simulate keyboard event\"\n\t\tarray at: 1 put: EventTypeKeyboard. \"evt type\"\n\t\tarray at: 2 put: Time millisecondClockValue. \"time stamp\"\n\t\tarray at: 3 put: (kbd bitAnd: 255). \"char code\"\n\t\tarray at: 4 put: EventKeyChar. \"key press/release\"\n\t\tarray at: 5 put: (kbd bitShift: -8). \"modifier keys\"\n\t\t^self].\n\n\t\"Then check for mouse\"\n\tbuttons _ super primMouseButtons.\n\tpos _ super primMousePt.\n\tmodifiers _ buttons bitShift: -3.\n\tbuttons _ buttons bitAnd: 7.\n\tmapped _ self mapButtons: buttons modifiers: modifiers.\n\t(pos = mousePosition and:[(mapped bitOr: (modifiers bitShift: 3)) = mouseButtons])\n\t\tifTrue:[^self].\n\tarray \n\t\tat: 1 put: EventTypeMouse;\n\t\tat: 2 put: Time millisecondClockValue;\n\t\tat: 3 put: pos x;\n\t\tat: 4 put: pos y;\n\t\tat: 5 put: mapped;\n\t\tat: 6 put: modifiers.\n! !\n\n!EventSensor methodsFor: 'private-I/O' stamp: 'ar 7/30/2000 18:16'!\nprimSetInputSemaphore: semaIndex\n\t\"Set the input semaphore the VM should use for asynchronously signaling the availability of events. Primitive. Optional.\"\n\t<primitive: 93>\n\t^nil! !\n\n!EventSensor methodsFor: 'private-I/O' stamp: 'ssa 12/17/2009 12:46'!\nprocessEvent: evt \n\t\"Process a single event. This method is run at high priority.\"\n\t| type |\n\ttype := evt at: 1.\n\t\"Tackle mouse events first\"\n\ttype = EventTypeMouse\n\t\tifTrue: [evt\n\t\t\t\tat: 5\n\t\t\t\tput: (ButtonDecodeTable at: (evt at: 5)\n\t\t\t\t\t\t\t+ 1). \n\t\t\t\tself queueEvent: evt.\n\t\t\t\tself processMouseEvent: evt . \n\t\t\t\t^self].\n\t\n\t\"Store the event in the queue if there's any\"\n\ttype = EventTypeKeyboard\n\t\tifTrue: [ \"Check if the event is a user interrupt\"\n\t\t\t((evt at: 4) = 0\n\t\t\t\tand: [((evt at: 3)\n\t\t\t\t\t\tbitOr: (((evt at: 5)\n\t\t\t\t\t\t\tbitAnd: 8)\n\t\t\t\t\t\t\tbitShift: 8))\n\t\t\t\t\t\t\t= interruptKey])\n\t\t\t\t\tifTrue: [\"interrupt key is meta - not reported as event\"\n\t\t\t\t\t\t\t^ interruptSemaphore signal].\n\t\t\t\"Else swap ctrl/alt keys if neeeded.wi\"\n\t\t\tKeyDecodeTable\n\t\t\t\tat: {evt at: 3. evt at: 5}\n\t\t\t\tifPresent: [:a | evt at: 3 put: a first;\n\t\t\t\t\t\t at: 5 put: a second]. \n\t\t\tself queueEvent: evt. \n\t\t\tself processKeyboardEvent: evt . \n\t\t\t^self ].\n\t\t\t\t\n\t\"Handle all events other than Keyborad or Mouse.\"\n\tself queueEvent: evt.\n\t! !\n\n!EventSensor methodsFor: 'private-I/O' stamp: 'ssa 12/16/2009 13:12'!\nprocessKeyboardEvent: evt\n\t\"process a keyboard event, updating InputSensor state\"\n\t| charCode pressCode |\n\t\"Never update keyboardBuffer if we have an eventQueue active\"\n\tmouseButtons _ (mouseButtons bitAnd: 7) bitOr: ((evt at: 5) bitShift: 3).\n\teventQueue ifNotNil:[^self]. \n\tcharCode _ evt at: 3.\n\tcharCode = nil ifTrue:[^self]. \"extra characters not handled in MVC\"\n\tpressCode _ evt at: 4.\n\tpressCode = EventKeyChar ifFalse:[^self]. \"key down/up not handled in MVC\"\n\t\"mix in modifiers\"\n\tcharCode _ charCode bitOr: ((evt at: 5) bitShift: 8).\n\tkeyboardBuffer nextPut: charCode .! !\n\n!EventSensor methodsFor: 'private-I/O' stamp: 'ar 8/16/2000 22:07'!\nprocessMouseEvent: evt\n\t\"process a mouse event, updating InputSensor state\"\n\t| modifiers buttons mapped |\n\tmousePosition _ (evt at: 3) @ (evt at: 4).\n\tbuttons _ evt at: 5.\n\tmodifiers _ evt at: 6.\n\tmapped _ self mapButtons: buttons modifiers: modifiers.\n\tmouseButtons _ mapped bitOr: (modifiers bitShift: 3).! !\n\n!EventSensor methodsFor: 'private-I/O' stamp: 'ssa 12/17/2009 14:17'!\nqueueEvent: evt\n\t\"Queue the given event in the event queue (if any).\n\tNote that the event buffer must be copied since it\n\twill be reused later on.\"\n\teventQueue ifNil:[^self].\n\teventQueue nextPut: evt clone.! !\n\n!EventSensor commentStamp: 'nk 4/13/2004 11:18' prior: 0!\nEventSensor is a replacement for InputSensor based on a set of (optional) event primitives. An EventSensor updates its state when events are received so that all state based users of Sensor (e.g., Sensor keyboard, Sensor leftShiftDown, Sensor mouseButtons) will work exactly as before, by moving the current VM mechanisms into EventSensor itself. An optional input semaphore is part of the new design.\n\nFor platforms that support true asynchronous event notification, the semaphore will be signaled to indicate pending events.\nOn platforms that do not support asynchronous notifications about events, the UI will have to poll EventSensor periodically to read events from the VM.\n\nInstance variables:\n\tmouseButtons <Integer>\t- mouse button state as replacement for primMouseButtons\n\tmousePosition <Point>\t- mouse position as replacement for primMousePt\n\tkeyboardBuffer <SharedQueue>\t- keyboard input buffer\n\tinterruptKey <Integer>\t\t\t- currently defined interrupt key\n\tinterruptSemaphore <Semaphore>\t- the semaphore signaled when the interruptKey is detected\n\teventQueue <SharedQueue>\t- an optional event queue for event driven applications\n\tinputSemaphore <Semaphore>- the semaphore signaled by the VM if asynchronous event notification is supported\n\tlastEventPoll <Integer>\t\t- the last millisecondClockValue at which we called fetchMoreEvents\n\thasInputSemaphore <Boolean>\t- true if my inputSemaphore has actually been signaled at least once.\n\nClass variables:\n\tEventPollPeriod <Integer>\t- the number of milliseconds to wait between polling for more events in the userInterruptHandler.\n\tEventTicklerProcess <Process>\t- the process that makes sure that events are polled for often enough (at least every EventPollPeriod milliseconds).\n\nEvent format:\nThe current event format is very simple. Each event is recorded into an 8 element array. All events must provide some SmallInteger ID (the first field in the event buffer) and a time stamp (the second field in the event buffer), so that the difference between the time stamp of an event and the current time can be reported.\n\nCurrently, the following events are defined:\n\nNull event\n=============\nThe Null event is returned when the ST side asks for more events but no more events are available.\nStructure:\n[1]\t\t- event type 0\n[2-8]\t- unused\n\nMouse event structure\n==========================\nMouse events are generated when mouse input is detected.\nStructure:\n[1]\t- event type 1\n[2]\t- time stamp\n[3]\t- mouse x position\n[4]\t- mouse y position\n[5]\t- button state; bitfield with the following entries:\n\t\t1\t-\tyellow (e.g., right) button\n\t\t2\t-\tblue (e.g., middle) button\n\t\t4\t-\tred (e.g., left) button\n\t\t[all other bits are currently undefined]\n[6]\t- modifier keys; bitfield with the following entries:\n\t\t1\t-\tshift key\n\t\t2\t-\tctrl key\n\t\t4\t-\t(Mac specific) option key\n\t\t8\t-\tCmd/Alt key\n\t\t[all other bits are currently undefined]\n[7]\t- reserved.\n[8]\t- reserved.\n\nKeyboard events\n====================\nKeyboard events are generated when keyboard input is detected.\n[1]\t- event type 2\n[2]\t- time stamp\n[3]\t- character code\n\t\tFor now the character code is in Mac Roman encoding.\n[4]\t- press state; integer with the following meaning\n\t\t0\t-\tcharacter\n\t\t1\t-\tkey press (down)\n\t\t2\t- \tkey release (up)\n[5]\t- modifier keys (same as in mouse events)\n[6]\t- reserved.\n[7]\t- reserved.\n[8]\t- reserved.\n!\n!EventSensor class methodsFor: 'class initialization' stamp: 'nk 4/12/2004 18:55'!\neventPollPeriod\n\t^EventPollPeriod ifNil: [ EventPollPeriod _ 500 ].! !\n\n!EventSensor class methodsFor: 'class initialization' stamp: 'nk 4/12/2004 18:55'!\neventPollPeriod: msec\n\t\"Set the number of milliseconds between checking for events to msec.\"\n\n\tEventPollPeriod _ msec max: 10.! !\n\n!EventSensor class methodsFor: 'class initialization' stamp: 'ar 7/23/2000 15:06'!\ninstall\t\"EventSensor install\"\n\t\"Install an EventSensor in place of the current Sensor.\"\n\t| newSensor |\n\tSensor shutDown.\n\tnewSensor _ self new.\n\tnewSensor startUp.\n\t\"Note: We must use #become: here to replace all references to the old sensor with the new one, since Sensor is referenced from all the existing controllers.\"\n\tSensor becomeForward: newSensor. \"done\"! !\n\n!ExampleSetTest methodsFor: 'running' stamp: 'BaseSystem 8/30/2009 09:40'!\nsetUp\n\tempty := Set new.\n\tfull := Set with: 5 with: #abc! !\n\n!ExampleSetTest methodsFor: 'testing' stamp: 'BaseSystem 8/30/2009 09:40'!\ntestAdd\n\tempty add: 5.\n\tself assert: (empty includes: 5)! !\n\n!ExampleSetTest methodsFor: 'testing' stamp: 'BaseSystem 8/30/2009 09:40'!\ntestGrow\n\tempty addAll: (1 to: 100).\n\tself assert: empty size = 100! !\n\n!ExampleSetTest methodsFor: 'testing' stamp: 'BaseSystem 8/30/2009 09:40'!\ntestIllegal\n\tself \n\t\tshould: [empty at: 5] \n\t\traise: TestResult error.\n\tself \n\t\tshould: [empty at: 5 put: #abc] \n\t\traise: TestResult error! !\n\n!ExampleSetTest methodsFor: 'testing' stamp: 'BaseSystem 8/30/2009 09:40'!\ntestIncludes\n\tself assert: (full includes: 5).\n\tself assert: (full includes: #abc)! !\n\n!ExampleSetTest methodsFor: 'testing' stamp: 'BaseSystem 8/30/2009 09:40'!\ntestOccurrences\n\tself assert: (empty occurrencesOf: 0) = 0.\n\tself assert: (full occurrencesOf: 5) = 1.\n\tfull add: 5.\n\tself assert: (full occurrencesOf: 5) = 1! !\n\n!ExampleSetTest methodsFor: 'testing' stamp: 'BaseSystem 8/30/2009 09:40'!\ntestRemove\n\tfull remove: 5.\n\tself assert: (full includes: #abc).\n\tself deny: (full includes: 5)! !\n\n!Exception methodsFor: '*SUnit' stamp: 'jp 3/17/2003 10:03'!\nsunitExitWith: aValue\n \n        self return: aValue! !\n\n!ExplorerListView methodsFor: 'accessing' stamp: 'ssa 3/9/2010 16:15'!\nindentFor: anItem\n\n\t| aStream lev |\n\t(anItem isKindOf: String) ifTrue:[^''].\n\taStream _ WriteStream on:''.\n\t(lev _ self levelOf: anItem) .\n\tlev  timesRepeat:[aStream nextPutAll:'   '].\n\t^aStream contents,'  '! !\n\n!ExplorerListView methodsFor: 'accessing' stamp: 'ssa 3/1/2010 12:33'!\nlevelOf: anItem\n\n\t^anItem depth! !\n\n!ExplorerListView methodsFor: 'displaying' stamp: 'ssa 2/8/2010 16:17'!\ndisplayTwisties\n\n\t| box twisty to firstIndex |\n\tfirstIndex _ self firstShown.\n\tfirstIndex  to: ((self list numberOfLines -2)min:(firstIndex + self numSelectionsInView )) do:[:index|\n\t\t(self objects at: index) hasContents ifTrue:[ \n\t\t\tbox _ self indentBoxFor: index.\n\t\t\ttwisty _(self objects at: index) isOpen ifTrue:[self openedTwistyIcon]ifFalse:[self closedTwistyIcon].\n\t\t\ttwisty\n\t\t\t\tdisplayOn: Display\n\t\t\t\tat: (to_box topRight- (twisty width@0))\n\t\t\t\tclippingBox: (box intersect: self clippingBox)\n\t\t\t\trule: Form paint\n\t\t\t\tfillColor: nil.\n\t\t\tself twistyTargets at:(to extent: twisty extent) put: index]].! !\n\n!ExplorerListView methodsFor: 'displaying' stamp: 'ssa 6/17/2010 16:32'!\nlabelForItem: anItem\n\t\"Subclasses may want to override\"\n\n\t^(self indentFor: anItem),' ',anItem asString ! !\n\n!FailingTestResourceTestCase methodsFor: 'utility' stamp: 'BaseSystem 8/30/2009 09:40'!\nclearOuterResourceStateDuring: aBlock\n\t\"Make the resource impossible to make available, then ensure that every test raises a failure but not an error (which its setUp would do if it reached it and the resource were nil).\"\n\n\t^super clearOuterResourceStateDuring:\n\t\t[SimpleTestResource preventAvailabilityDuring:\n\t\t\t[self should: aBlock raise: TestResult failure]]! !\n\n!False methodsFor: 'debugging' stamp: 'ssa 3/11/2010 11:53'!\nhaltIfFalse\n\n\tself halt\n\n\t! !\n\n!False class methodsFor: 'instance creation'!\ndearchiveFrom: aStream\n\n\taStream storeObject: false.\n\t^false! !\n\n!Field methodsFor: 'accessing' stamp: 'dmu 9/23/2010 14:25'!\nadd: aParticle \n\tparticles  add: aParticle.\n\t\n\tsimulation running\n\t\tifTrue: [aParticle go]! !\n\n!Field methodsFor: 'accessing'!\narea\n\t^ area! !\n\n!Field methodsFor: 'accessing'!\nextent\n\t^ area extent! !\n\n!Field methodsFor: 'accessing'!\nneighborE\n\t^ neighborE! !\n\n!Field methodsFor: 'accessing'!\nneighborN\n\t^ neighborN! !\n\n!Field methodsFor: 'accessing'!\nneighborNE\n\t^ neighborNE! !\n\n!Field methodsFor: 'accessing'!\nneighborNW\n\t^ neighborNW! !\n\n!Field methodsFor: 'accessing'!\nneighborS\n\t^ neighborS! !\n\n!Field methodsFor: 'accessing'!\nneighborSE\n\t^ neighborSE! !\n\n!Field methodsFor: 'accessing'!\nneighborSW\n\t^ neighborSW! !\n\n!Field methodsFor: 'accessing'!\nneighborW\n\t^ neighborW! !\n\n!Field methodsFor: 'accessing'!\norigin\n\t^ self area origin! !\n\n!Field methodsFor: 'accessing'!\nparticles\n\t^ particles! !\n\n!Field methodsFor: 'accessing' stamp: 'dmu 10/6/2010 14:10'!\nremove: aParticle \n\tparticles  members remove: aParticle ifAbsent: []! !\n\n!Field methodsFor: 'accessing'!\nsimulation\n\t^ simulation! !\n\n!Field methodsFor: 'motion'!\ngo\n\tparticles\n\t\tdo: [:t1 | t1 go]! !\n\n!Field methodsFor: 'motion' stamp: 'max 9/29/2010 12:59'!\nhand: aParticle to: neighborField\n\tneighborField isNil ifTrue: [aParticle bounce. ^ self].\n\t(neighborField = self) ifFalse: [aParticle moveTo: neighborField].\n\t^ self! !\n\n!Field methodsFor: 'motion' stamp: 'max 9/17/2010 23:58'!\nlocalFieldsUnderParticleAt: aLocation size: particleSize\n\t| pX pY bounds |\n\tpX _ aLocation x. pY _ aLocation y.\n\tbounds _ area insetBy: (particleSize // 2).\n\t\n\t(pX < bounds left) ifTrue:\n\t\t[(pY < bounds top) ifTrue:\n\t\t\t[^ {neighborNW . neighborN . neighborW . self}].\n\t\t (pY >= bounds bottom) ifTrue:\n\t\t\t[^ {neighborSW . neighborS . neighborW . self}].\n\t\t^ {neighborW . self}].\n\t\n\t(pX >= bounds right) ifTrue:\n\t\t[(pY < bounds top) ifTrue:\n\t\t\t[^ {neighborNE . neighborN. neighborE . self}].\n\t\t (pY >= bounds bottom) ifTrue:\n\t\t\t[^ {neighborSE . neighborS. neighborE . self}].\n\t\t^ {neighborE . self}].\n\t\n\t(pY < bounds top) ifTrue:\n\t\t\t[^ {neighborN . self}].\n\t(pY >= bounds bottom) ifTrue:\n\t\t\t[^ {neighborS . self}].\n\t\n\t^ {self}! !\n\n!Field methodsFor: 'motion' stamp: 'max 9/29/2010 12:48'!\nparticle: aParticle ofSize: itsSize movedTo: aLocation \n\t| fields |\n\tfields := self localFieldsUnderParticleAt: aLocation size: itsSize.\n\tself hand: aParticle to: (fields first).\n\tfields do: [:fld | fld ifNotNil: [fld particles do: [:p | p particle: aParticle\n\t\t\t\t\t\t\t\tofSize: itsSize\n\t\t\t\t\t\t\t\tmovedTo: aLocation]]]\n\t! !\n\n!Field methodsFor: 'motion' stamp: 'max 9/16/2010 16:30'!\nstep\n\tparticles do: [:each | each step]! !\n\n!Field methodsFor: 'motion' stamp: 'max 9/16/2010 16:30'!\nstop\n\tparticles do: [:each | each stop]! !\n\n!Field methodsFor: 'displaying'!\ndefaultLabelForInspector\n\t| t1 |\n\tt1 := WriteStream with: ''.\n\tself printOn: t1.\n\t^ t1 contents! !\n\n!Field methodsFor: 'displaying' stamp: 'max 9/16/2010 16:31'!\ndisplayOn: aDisplaySurface \n\tparticles do: [:each | each displayOn: aDisplaySurface]! !\n\n!Field methodsFor: 'displaying' stamp: 'max 9/16/2010 16:32'!\nprintOn: aStream \n\tsuper printOn: aStream.\n\taStream nextPut: $(.\n\tself origin printOn: aStream.\n\taStream nextPut: $)! !\n\n!Field methodsFor: 'private'!\nsetArea: t1 \n\tarea := t1! !\n\n!Field methodsFor: 'private'!\nsetNeighborE: t1 \n\tneighborE := t1! !\n\n!Field methodsFor: 'private'!\nsetNeighborN: t1 \n\tneighborN := t1! !\n\n!Field methodsFor: 'private'!\nsetNeighborNE: t1 \n\tneighborNE := t1! !\n\n!Field methodsFor: 'private'!\nsetNeighborNW: t1 \n\tneighborNW := t1! !\n\n!Field methodsFor: 'private'!\nsetNeighborS: t1 \n\tneighborS := t1! !\n\n!Field methodsFor: 'private'!\nsetNeighborSE: t1 \n\tneighborSE := t1! !\n\n!Field methodsFor: 'private'!\nsetNeighborSW: t1 \n\tneighborSW := t1! !\n\n!Field methodsFor: 'private'!\nsetNeighborW: t1 \n\tneighborW := t1! !\n\n!Field methodsFor: 'private'!\nsetSimulation: t1 \n\tsimulation := t1! !\n\n!Field methodsFor: 'initialize-release' stamp: 'max 9/17/2010 10:38'!\ninitialize\n\tparticles := BlockingSmallSet new! !\n\n!Field class methodsFor: 'instance creation' stamp: 'dmu 9/23/2010 14:07'!\nnull\n\t^ NullField new! !\n\n!Field class methodsFor: 'instance creation'!\norigin: t1 extent: t2 \n\t^ self new\n\t\tsetArea: (t1 extent: t2)! !\n\n!FileDirectory methodsFor: '*transporter' stamp: 'ads 12/13/2010 15:32'!\ndeleteLocalFiles\n\t\"Took this method from Squeak 3.7; not sure why it wasn't already here. -- Adam\"\n\n\t\"Delete the local files in this directory.\"\n\n\tself fileNames do:[:fn| self deleteFileNamed: fn ifAbsent: [(CannotDeleteFileException new\n\t\t\tmessageText: 'Could not delete the old version of file ' , (self fullNameFor: fn)) signal]]\n! !\n\n!FileDirectory methodsFor: '*transporter' stamp: 'ads 12/13/2010 15:32'!\nrecursiveDelete\n\t\"Took this method from Squeak 3.7; not sure why it wasn't already here. -- Adam\"\n\t\n\t\"Delete the this directory, recursing down its tree.\"\n\tself directoryNames\n\t\tdo: [:dn | (self directoryNamed: dn) recursiveDelete].\n\tself deleteLocalFiles.\n\t\"should really be some exception handling for directory deletion, but no \n\tsupport for it yet\"\n\tself containingDirectory deleteDirectory: self localName! !\n\n!FileDirectory class methodsFor: 'name utilities' stamp: 'ssa 9/3/2008 11:25'!\nstartUp\n\t\"Establish the platform-specific FileDirectory subclass. Do any platform-specific startup.\"\n\tself setDefaultDirectoryClass.\n\n\tself setDefaultDirectory: (self dirPathFor: SmalltalkImage current imageName).\n\n\tPreferences startInUntrustedDirectory \n\t\tifTrue:[\n\t\t\t\tDefaultDirectory assureExistence].\n\tSmalltalkImage current openSourceFiles.\n! !\n\n!FileList methodsFor: 'file list menu' stamp: 'ssa 8/28/2009 19:44'!\nfileContentsMenu: aMenu shifted: shifted\n\t\"Construct aMenu to have items appropriate for the file browser's code pane, given the shift state provided\"\n\n\t| shiftMenu services maybeLine extraLines |\n\tshifted ifTrue:\n\t\t[shiftMenu _ ParagraphEditor shiftedYellowButtonMenu.\n\t\t^ aMenu \n\t\t\tlabels: shiftMenu labelString \n\t\t\tlines: shiftMenu lineArray\n\t\t\tselections: shiftMenu selections].\n\tfileName ifNotNil:\n\t\t[services _ OrderedCollection new.\n\t\t(#(briefHex briefFile needToGetBriefHex needToGetBrief) includes: brevityState) ifTrue:\n\t\t\t[services add: self serviceGet].\n\t\t(#(fullHex briefHex needToGetFullHex needToGetBriefHex) includes: brevityState) ifFalse:\n\t\t\t[services add: self serviceGetHex].\n\t\tmaybeLine _ services size.\n\t\t(#('st' 'cs') includes: self suffixOfSelectedFile) ifTrue:\n\t\t\t[services addAll:\n\t\t\t\t(self servicesFromSelectorSpecs:\n\t\t\t\t\t#(fileIntoNewChangeSet: fileIn: browseChangesFile: browseFile:))].\n\t\t(#('gif' 'jpg' 'bmp') includes: self suffixOfSelectedFile) ifTrue:\n\t\t\t[services halt addAll:\n\t\t\t\t(self servicesFromSelectorSpecs:\n\t\t\t\t\t#(importGraphic))].\n\n\t\textraLines _ OrderedCollection new.\n\t\tmaybeLine > 0 ifTrue: [extraLines add: maybeLine].\n\t\tservices size > maybeLine ifTrue: [extraLines add: services size].\n\t\taMenu \n\t\t\taddServices: services\n\t\t\tfor: self fullName\n\t\t\textraLines: extraLines].\n\n\taMenu addList: {\n\t\t\t{'find...(f)' translated.\t\t#find}.\n\t\t\t{'find again (g)' translated.\t\t#findAgain}.\n\t\t\t{'set search string (h)' translated.\t#setSearchString}.\n\t\t\t#-.\n\t\t\t{'do again (j)' translated.\t\t#again}.\n\t\t\t{'undo (z)' translated.\t\t\t#undo}.\n\t\t\t#-.\n\t\t\t{'copy (c)' translated.\t\t\t#copySelection}.\n\t\t\t{'cut (x)' translated.\t\t\t#cut}.\n\t\t\t{'paste (v)' translated.\t\t#paste}.\n\t\t\t{'paste...' translated.\t\t\t#pasteRecent}.\n\t\t\t#-.\n\t\t\t{'do it (d)' translated.\t\t#doIt}.\n\t\t\t{'print it (p)' translated.\t\t#printIt}.\n\t\t\t{'inspect it (i)' translated.\t\t#inspectIt}.\n\t\t\t{'fileIn selection (G)' translated.\t#fileItIn}.\n\t\t\t#-.\n\t\t\t{'accept (s)' translated.\t\t#accept}.\n\t\t\t{'cancel (l)' translated.\t\t#cancel}.\n\t\t\t#-.\n\t\t\t{'more...' translated.\t\t\t#shiftedYellowButtonActivity}}.\n\n\n\t^ aMenu\n! !\n\n!FileList methodsFor: 'file list menu' stamp: 'ssa 8/28/2009 19:14'!\nfileSelectedMenu: aMenu\n\n\t| firstItems secondItems thirdItems n1 n2 n3 services |\n\tfirstItems _ self itemsForFile: self fullName.\n\tsecondItems _ self itemsForAnyFile.\n\tthirdItems _ self itemsForNoFile.\n\tn1 _ firstItems size.\n\tn2 _ n1 + secondItems size.\n\tn3 _ n2 + thirdItems size.\n\tservices _ firstItems, secondItems, thirdItems, self serviceAllFileOptions.\n\tservices do: [ :svc | svc addDependent: self ].\n\t^ aMenu \n\t\taddServices2: services \n\t\tfor: self\n\t\textraLines: (Array with: n1 with: n2 with: n3)\n! !\n\n!FileList methodsFor: 'file list menu' stamp: 'ssa 9/3/2008 11:18'!\nfullFileListMenu: aMenu shifted: aBoolean\n\t\"Fill the menu with all possible items for the file list pane, regardless of selection.\"\n\n\t| services servicesPlus extraLines linePointer |\n\taMenu title: 'all possible file operations'.\n\tservicesPlus := self servicesFromSelectorSpecs:  #(\n\t\tfromFileName: openFromFile:  \n\t\t-\n\t\topenOn: fileIntoNewChangeSet: fileIn: browseChangesFile: browseRecentLogOnPath:\n\t\t-\n\t\tviewContents: saveContents: openOn:\n\t\t-\n\t\t\n\t\tremoveLineFeeds: ).\n\textraLines _ OrderedCollection new.\n\tlinePointer _ 1.\n\tservices _ OrderedCollection new.\n\tservicesPlus doWithIndex:\n\t\t[:svc :ind |\n\t\t\tsvc == #-\n\t\t\t\tifTrue:\n\t\t\t\t\t[extraLines add: linePointer - 1]\n\t\t\t\tifFalse:\n\t\t\t\t\t[services add: svc.\n\t\t\t\t\tlinePointer _ linePointer + 1]].\n\taMenu \n\t\taddServices: services \n\t\tfor: self fullName\n\t\textraLines: extraLines! !\n\n!FileList methodsFor: 'file list menu' stamp: 'BG 11/2/2003 21:04'!\nmyServicesForFile: fullName suffix: suffix\n\n\t^(FileStream isSourceFileSuffix: suffix)\n\t\tifTrue: [ #() ]\n\t\tifFalse: [ #() ]! !\n\n!FileList class methodsFor: 'instance creation' stamp: 'ssa 8/22/2009 14:57'!\nopen\n\t\"Open a view of an instance of me on the default directory.\"\n\t\"Added scrollingView to support Windoze - ssa\"\n\t\"FileList open\"\n\t| dir aFileList topView volListView templateView fileListView fileContentsView |\n\tWorld ifNotNil: [^ self openAsMorph].\n\n\tdir _ FileDirectory default.\n\taFileList _ self new directory: dir.\n\ttopView _ StandardSystemView new.\n\ttopView\n\t\tmodel: aFileList;\n\t\tlabel: dir pathName;\n\t\tminimumSize: 200@200.\n\ttopView borderWidth: 1.\n\n\tvolListView _ PluggableListView on: aFileList\n\t\tlist: #volumeList\n\t\tselected: #volumeListIndex\n\t\tchangeSelected: #volumeListIndex:\n\t\tmenu: #volumeMenu:.\n\tvolListView autoDeselect: false.\n\tvolListView window: (0@0 extent: 80@45).\n\ttopView addSubView: volListView.\n\n\ttemplateView _ PluggableTextView on: aFileList\n\t\ttext: #pattern\n\t\taccept: #pattern:.\n\ttemplateView scrollingView askBeforeDiscardingEdits: false.\n\ttemplateView window: (0@0 extent: 80@15).\n\ttopView addSubView: templateView below: volListView.\n\n\tfileListView _ PluggableListView on: aFileList\n\t\tlist: #fileList\n\t\tselected: #fileListIndex\n\t\tchangeSelected: #fileListIndex:\n\t\tmenu: #fileListMenu:.\n\tfileListView window: (0@0 extent: 120@60).\n\ttopView addSubView: fileListView toRightOf: volListView.\n\t\"fileListView scrollingView controller terminateDuringSelect: true. \" \"Pane to left may change under scrollbar\"\n\n\tfileContentsView _ PluggableTextView on: aFileList\n\t\ttext: #contents accept: #put:\n\t\treadSelection: #contentsSelection menu: #fileContentsMenu:shifted:.\n\tfileContentsView window: (0@0 extent: 200@140).\n\ttopView addSubView: fileContentsView below: templateView.\n\n\ttopView controller open.\n! !\n\n!FileStream class methodsFor: 'concrete classes' stamp: 'ads 1/12/2011 16:27'!\nconcreteStream\n\t\"Who should we really direct class queries to?  \"\n\t^ CrLfFileStream  \"may change this to StandardFileStream\"! !\n\n!FileStream class methodsFor: 'file reader services' stamp: 'ssa 9/3/2008 10:33'!\nfileIn: fullName\n\t\"File in the entire contents of the file specified by the name provided\"\n\n\t| fn ff |\n\tfullName ifNil: [^ Beeper beep].\n\tff _ self readOnlyFileNamed: (fn _ fullName).\n\t((FileDirectory extensionFor: fn) sameAs: 'html') ifTrue: [ff _ ff asHtml].\n\tff fileIn! !\n\n!Float methodsFor: 'printing' stamp: 'ssa 1/1/1970 00:24'!\nabsPrintOn: aStream base: base digitCount: digitCount \n\t\"Print me in the given base, using digitCount significant figures.\"\n\t\"Float pi absPrintOn: Transcript base: 10 digitCount: 4. Transcript cr;flush\" \n\n\t| fuzz x exp q fBase scale logScale xi |\n\tself isInf ifTrue: [^ aStream nextPutAll: 'Inf'].\n\tfBase _ base asFloat.\n\t\"x is myself normalized to [1.0, fBase), exp is my exponent\"\n\texp _ \n\t\tself < 1.0\n\t\t\tifTrue: [self reciprocalFloorLog: fBase]\n\t\t\tifFalse: [self floorLog: fBase].\n\tscale _ 1.0.\n\tlogScale _ 0.\n\t[(x _ fBase raisedTo: (exp + logScale)) = 0]\n\t\twhileTrue:\n\t\t\t[scale _ scale * fBase.\n\t\t\tlogScale _ logScale + 1].\n\tx _ self * scale / x.\n\tfuzz _ fBase raisedTo: 1 - digitCount.\n\t\"round the last digit to be printed\"\n\tx _ 0.5 * fuzz + x.\n\tx >= fBase\n\t\tifTrue: \n\t\t\t[\"check if rounding has unnormalized x\"\n\t\t\tx _ x / fBase.\n\t\t\texp _ exp + 1].\n\t(exp < 6 and: [exp > -4])\n\t\tifTrue: \n\t\t\t[\"decimal notation\"\n\t\t\tq _ 0.\n\t\t\texp < 0 ifTrue: [1 to: 1 - exp do: [:i | aStream nextPut: ('0.0000'\nat: i)]]]\n\t\tifFalse: \n\t\t\t[\"scientific notation\"\n\t\t\tq _ exp.\n\t\t\texp _ 0].\n\t[x >= fuzz]\n\t\twhileTrue: \n\t\t\t[\"use fuzz to track significance\"\n\t\t\txi _ x asInteger.\n\t\t\taStream nextPut: (Character digitValue: xi).\n\t\t\tx _ x - xi asFloat * fBase.\n\t\t\tfuzz _ fuzz * fBase.\n\t\t\texp _ exp - 1.\n\t\t\texp = -1 ifTrue: [aStream nextPut: $.]].\n\t[exp >= -1]\n\t\twhileTrue: \n\t\t\t[aStream nextPut: $0.\n\t\t\texp _ exp - 1.\n\t\t\texp = -1 ifTrue: [aStream nextPut: $.]].\n\tq ~= 0\n\t\tifTrue: \n\t\t\t[aStream nextPut: $e.\n\t\t\tq printOn: aStream]! !\n\n!Form methodsFor: 'accessing' stamp: 'ssa 11/27/2009 00:23'!\nbottomCenter\n\n\t^self width//2@self height ! !\n\n!Form methodsFor: 'accessing' stamp: 'ssa 11/27/2009 00:21'!\nbottomLeft\n\n\t^0@self height! !\n\n!Form methodsFor: 'accessing' stamp: 'ssa 11/27/2009 00:21'!\nbottomRight\n\n\t^self extent! !\n\n!Form methodsFor: 'accessing' stamp: 'ssa 8/25/2009 13:22'!\ndisplayBox \n\n\t^Rectangle origin: self offset extent: width @ height! !\n\n!Form methodsFor: 'accessing' stamp: 'ssa 11/27/2009 00:22'!\nleftCenter\n\n\t^0@(self height//2)! !\n\n!Form methodsFor: 'accessing' stamp: 'ssa 11/27/2009 00:22'!\nrightCenter\n\n\t^self width @ (self height//2)! !\n\n!Form methodsFor: 'accessing' stamp: 'ssa 11/27/2009 00:23'!\ntopCenter\n\n\t^self width//2@0 ! !\n\n!Form methodsFor: 'accessing' stamp: 'ssa 11/27/2009 00:21'!\ntopLeft\n\n\t^0@0! !\n\n!Form methodsFor: 'accessing' stamp: 'ssa 11/27/2009 00:21'!\ntopRight\n\n\t^self width@0! !\n\n!Form methodsFor: 'converting' stamp: 'ssa 8/28/2009 16:18'!\nasOpaqueForm\n\n\t^OpaqueForm figure: self shape: self! !\n\n!Form methodsFor: 'converting' stamp: 'ssa 8/28/2009 11:32'!\nwrapAround: aPoint\n\t\"Answer a new form which contains the image of the receiver, but \n\ttranslated by deltaPoint, with wrap-around.  Used for realigning \n\thalftone masks.  Assumes the receiver is 32x32 with zero offset.\"\n\n\t\"[Sensor anyButtonPressed] whileFalse:\n\t\t[((Cursor normal wrapAround: Sensor cursorPoint)\n\t\t\tmagnifyBy: 8) displayAt: 100@100]\"\n\n\t| newForm delta |\n\tnewForm _ Form extent: (width@height) depth: 1..\n\tdelta _ (aPoint x\\\\32)@(aPoint y\\\\32).\n\tdelta = (0@0) ifTrue: [^self].\n\tself displayOn: newForm at: delta-(32@32) clippingBox: newForm boundingBox rule: Form paint fillColor: nil.\n\tself displayOn: newForm at: delta-(32@0) clippingBox: newForm boundingBox rule: Form paint fillColor: nil.\n\tself displayOn: newForm at: delta-(0@32) clippingBox: newForm boundingBox rule: Form paint fillColor: nil.\n\tself displayOn: newForm at: delta clippingBox: newForm boundingBox rule: Form paint fillColor: nil.\n\t^newForm! !\n\n!Form methodsFor: 'displaying' stamp: 'ssa 9/4/2009 09:59'!\ndisplayOn: aDisplayMedium at: aDisplayPoint clippingBox: clipRectangle rule: rule fillColor: aForm\n\n\taDisplayMedium copyBits: self boundingBox\n\t\tfrom: self\n\t\tat: aDisplayPoint + self offset\n\t\tclippingBox: clipRectangle \n\t\trule: rule\n\t\tfillColor: aForm\n\t\tmap: (self colormapIfNeededFor: aDisplayMedium).\n! !\n\n!Form methodsFor: 'displaying' stamp: 'ssa 9/4/2009 15:45'!\ndisplayTranslucentOn: aDisplayMedium at: aDisplayPoint clippingBox: clipRectangle\n\t((aDisplayMedium isKindOf:Form) ifTrue:[aDisplayMedium]ifFalse:[aDisplayMedium displayMedium])\n\t\tpaintBits: self  at: aDisplayPoint + self offset clippingBox: clipRectangle translucent: 0.3! !\n\n!Form methodsFor: 'displaying' stamp: 'ssa 9/4/2009 15:32'!\npaintBits: sourceForm at: destOrigin clippingBox: aRect translucent: factor\n\t\"Make up a BitBlt table and copy the bits with the given colorMap.\"\n\t(BitBlt current destForm: self\n\t\tsourceForm: sourceForm\n\t\thalftoneForm: nil\n\t\tcombinationRule: 31\n\t\tdestOrigin: destOrigin\n\t\tsourceOrigin: 0@0\n\t\textent: sourceForm extent\n\t\tclipRect: aRect)\n\t\tcopyBitsTranslucent: ((0 max: (factor*255.0) asInteger) min: 255)\n\"\n | f f2 f3 | f _ Form fromUser. f replaceColor:  (Color r: 0.8 g: 1.0 b: 0.599) withColor: Color transparent.\nf2 _ Form fromDisplay: (0@0 extent: f extent). f3 _ f2 deepCopy.\n0.0 to: 1.0 by: 1.0/32 do:\n\t[:t | f3 _ f2 deepCopy. f3 paintBits: f at: 0@0 translucent: t.\n\tf3 displayAt: 0@0. (Delay forMilliseconds: 100) wait].\n\"! !\n\n!Form methodsFor: 'filling' stamp: 'ssa 11/30/2009 13:30'!\nfill: aRectangle rule: anInteger fillColor: aForm  clippingBox: clipRect\n\t\"Replace a rectangular area of the receiver with the pattern described by aForm \n\taccording to the rule anInteger.\"\n\t\n\t\"Display fill: (300@300 extent: 300@100) rule: Form paint fillColor: Color red.\n\tDisplay fill: (300@300 extent: 300@100) rule: Form paint fillColor: Color green clippingBox: (300@300 extent: 150@100)\"\n\t\n\t| bb |\n\tbb _ BitBlt current toForm: self.\n\tbb clipRect: clipRect.\n\tbb\n\t\tcopy: aRectangle\n\t\tfrom: 0@0 in: nil\n\t\tfillColor: aForm rule: anInteger! !\n\n!Form methodsFor: 'image manipulation' stamp: 'ssa 12/17/2009 16:16'!\nerase\n\n\tself eraseInside: self boundingBox! !\n\n!Form methodsFor: 'image manipulation' stamp: 'ssa 12/17/2009 16:26'!\neraseInside: aRect\n\t\"Erase a transparent rectangular 'hole' in me\"\n\t\n\t\"  | form|\n\tform _ Form extent:100@100 depth: Display depth.\n\tform fillColor: Color blue.\n\tform eraseInside: (20@20 extent:60@60).\n\tform followCursor\"\n\t\n\t| eraser |\n\teraser _ Form extent: self extent depth:1.\n\teraser fill: aRect fillColor: Color black.\n\tself eraseShape: eraser! !\n\n!Form methodsFor: 'image manipulation' stamp: 'ssa 4/10/2009 23:42'!\nnextLifeGeneration\n    \"Compute next generation by computing neighbor counts.\n    These are tallied in nbr1, nbr2, nbr4.\"\n    | all delta nbr1 nbr2 nbr4 carry2 carry4 |\n    all _ 0@0 extent: self extent.\nnbr1 _ Form extent: self extent.\nnbr2 _ Form extent: self extent.\nnbr4 _ Form extent: self extent.\ncarry2 _ Form extent: self extent.\ncarry4 _ Form extent: self extent.\n\n    nbr1 fillWhite.  nbr2 fillWhite.  nbr4 fillWhite.\n    1 to: 8 do:                   \"Three-bit add for each shift of self\"\n        [:i | delta _ (i+4\\\\9//3 - 1)@(i+4\\\\3 - 1).  \"8 neighbor deltas\"\n        carry2 copy: all from: nbr1 to: 0@0 rule: Form over.\n        carry2 copy: all from: self to: delta rule: Form and. \"carry 2\"\n        nbr1 copy: all from: self to: delta rule: Form reverse.   \"sum 1\" \"(reverse is xor)\"\n        carry4 copy: all from: nbr2 to: 0@0 rule: Form over.\n        carry4 copy: all from: carry2 to: 0@0 rule: Form and.  \"carry 4\"\n        nbr2 copy: all from: carry2 to: 0@0 rule: Form reverse.    \"sum 2\"\n        nbr4 copy: all from: carry4 to: 0@0 rule: Form reverse].    \"sum 4\"\n    \"Next gen = ((2s AND self) OR (2s AND 1s)) AND (NOT 4s)\"\n    self copy: all from: nbr2 to: 0@0 rule: Form and.\n    nbr1 copy: all from: nbr2 to: 0@0 rule: Form and.\n    self copy: all from: nbr1 to: 0@0 rule: Form under.\n    self copy: all from: nbr4 to: 0@0 rule: Form erase.\n    self borderWidth: 1 fillColor: Color white.  \"trim edges\"! !\n\n!Form methodsFor: 'image manipulation' stamp: 'ssa 4/10/2009 23:39'!\nnextLifeGenerationBlueBook\n\t\"|f| f_Form fromUser.\n\t100 timesRepeat:[f nextLifeGeneration display]\"\n\t| nbr1 nbr2 nbr4 carry2 carry4 all delta |\n\tnbr1 := Form extent: self extent.\n\tnbr2 := Form extent: self extent.\n\tnbr4 := Form extent: self extent.\n\tcarry2 := Form extent: self extent.\n\tcarry4 := Form extent: self extent.\n\tall := self boundingBox.\n\t1 to: 8\n\t\tdo: [:i | \n\t\t\t\"delta is the offset of the eight neighboring cells\"\n\t\t\tdelta := (#(-1 0 1 1 1 0 1 -1 ) at: i)\n\t\t\t\t\t\t@ (#(1 -1 -1 0 1 1 1 0 ) at: i).\n\t\t\tcarry2\n\t\t\t\tcopy: all\n\t\t\t\tfrom: 0 @ 0\n\t\t\t\tin: nbr1\n\t\t\t\trule: 3.\n\t\t\tcarry2\n\t\t\t\tcopy: all\n\t\t\t\tfrom: delta\n\t\t\t\tin: self\n\t\t\t\trule: 1.\n\t\t\t\"AND for carry into 2\"\n\t\t\tnbr1\n\t\t\t\tcopy: all\n\t\t\t\tfrom: delta\n\t\t\t\tin: self\n\t\t\t\trule: 6.\n\t\t\t\"XOR for sum 1\"\n\t\t\tcarry4\n\t\t\t\tcopy: all\n\t\t\t\tfrom: 0 @ 0\n\t\t\t\tin: nbr2\n\t\t\t\trule: 3.\n\t\t\tcarry4\n\t\t\t\tcopy: all\n\t\t\t\tfrom: 0 @ 0\n\t\t\t\tin: carry2\n\t\t\t\trule: 1.\n\t\t\t\"AND for carry into 4\"\n\t\t\tnbr2\n\t\t\t\tcopy: all\n\t\t\t\tfrom: 0 @ 0\n\t\t\t\tin: carry2\n\t\t\t\trule: 6.\n\t\t\t\"XOR for sum 2\"\n\t\t\tnbr4\n\t\t\t\tcopy: all\n\t\t\t\tfrom: 0 @ 0\n\t\t\t\tin: carry4\n\t\t\t\trule: 6].\n\t\"XOR for sum 4 (ignore carry into 8)\"\n\tself\n\t\tcopy: all\n\t\tfrom: 0 @ 0\n\t\tin: nbr2\n\t\trule: 1.\n\tnbr1\n\t\tcopy: all\n\t\tfrom: 0 @ 0\n\t\tin: nbr2\n\t\trule: 1.\n\tself\n\t\tcopy: all\n\t\tfrom: 0 @ 0\n\t\tin: nbr1\n\t\trule: 7.\n\tself\n\t\tcopy: all\n\t\tfrom: 0 @ 0\n\t\tin: nbr4\n\t\trule: 4\n\t\"compute next generation\"! !\n\n!Form methodsFor: 'scaling, rotation' stamp: 'ssa 8/31/2009 13:43'!\nrotateBy: deg smoothing: cellSize\n\t\"Rotate the receiver by the indicated number of degrees.\"\n\t\"rot is the destination form, big enough for any angle.\"\n\t| side rot warp r1 pts p center dim |\n\tside _ 1 + ((width*width) + (height*height)) asFloat sqrt asInteger.\n\t(#(0 90 180 270 360) includes: deg abs) ifTrue:[dim _ self extent]ifFalse:[dim _ side@side].\n\trot _ Form extent: dim depth: self depth.\n\tcenter _ rot extent // 2.\n\n\t\"Now compute the sin and cos constants for the rotation angle.\" \n\twarp _ (WarpBlt current toForm: rot)\n\t\tsourceForm: self;\n\t\tcolorMap: (self colormapIfNeededFor: rot);\n\t\tcellSize: cellSize;  \"installs a new colormap if cellSize > 1\"\n\t\tcombinationRule: Form over.\n\tr1 _ rot boundingBox align: center with: self boundingBox center.\n\n\tpts _ r1 innerCorners collect:\n\t\t[:pt | p _ pt - r1 center.\n\t\t(r1 center x asFloat + (p x asFloat*deg degreeCos) + (p y asFloat*deg degreeSin)) @\n\t\t(r1 center y asFloat - (p x asFloat*deg degreeSin) + (p y asFloat*deg degreeCos))].\n\twarp copyQuad: pts toRect: rot boundingBox.\n\t^ rot\n\"\n | a f |  f _ Form fromDisplay: (0@0 extent: 200@200).  a _ 0.\n[Sensor anyButtonPressed] whileFalse:\n\t[((Form fromDisplay: (Sensor cursorPoint extent: 130@66))\n\t\trotateBy: (a _ a+5) smoothing: 2) display].\nf display\n\"! !\n\n!Form methodsFor: 'scaling, rotation' stamp: 'ssa 11/30/2009 12:57'!\nscaledToSize: newExtent\n\n\t| scale |\n\n\tnewExtent = self extent ifTrue: [^self].\n\tscale _ (newExtent x / self width) @ (newExtent y / self height).\n\t^self magnify: self boundingBox by: scale smoothing: 2.\n! !\n\n!Form methodsFor: '*RVM-Archiving'!\narchiveOn: anArchiver\n\t\"Always use #storeOn: and #readFrom:\"\n\t\n\"\tanArchiver isCopier\n\t\tifFalse: [^super archiveOn: anArchiver].\"\n\tanArchiver\n\t\tstoreObject: self;\n\t\tstoreClass: self class;\n\t\tstore: self.! !\n\n!Form class methodsFor: 'instance creation' stamp: 'ssa 11/17/2008 13:50'!\ndotOfSize: diameter color: aColor\n\t\"Create a form which contains a round colored dot with transparent background.\"\n\t| radius form bb rect centerX centerY centerYBias centerXBias radiusSquared xOverY maxy dx |\n\tradius _ diameter//2.\n\tform _ self extent: diameter@diameter depth: Display depth.\n\tform offset: (0@0) - (radius@radius).\t\n\tbb _ (BitBlt current toForm: form)\n\t\tsourceX: 0; sourceY: 0;\n\t\tcombinationRule: Form over;\n\t\tfillColor: aColor.\n\trect _ form boundingBox.\n\tcenterX _ rect center x.\n\tcenterY _ rect center y.\n\tcenterYBias _ rect height odd ifTrue: [0] ifFalse: [1].\n\tcenterXBias _ rect width odd ifTrue: [0] ifFalse: [1].\n\tradiusSquared _ (rect height asFloat / 2.0) squared - 0.01.\n\txOverY _ rect width asFloat / rect height asFloat.\n\tmaxy _ rect height - 1 // 2.\n\n\t\"First do the inner fill, and collect x values\"\n\t0 to: maxy do:\n\t\t[:dy |\n\t\tdx _ ((radiusSquared - (dy * dy) asFloat) sqrt * xOverY) truncated.\n\t\tbb\tdestX: centerX - centerXBias - dx\n\t\t\tdestY: centerY - centerYBias - dy\n\t\t\twidth: dx + dx + centerXBias + 1\n\t\t\theight: 1;\n\t\t\tcopyBits.\n\t\tbb\tdestY: centerY + dy;\n\t\t\tcopyBits].\n\tform mapColor: Color white to: Color transparent.\n\t^ form\n\"\nTime millisecondsToRun:\n\t[1 to: 30 do: [:i | (Form dotOfSize: i color: Color random) displayAt: (i*30)@(i*30)]]\n\"! !\n\n!Form class methodsFor: 'instance creation' stamp: 'ssa 8/28/2009 19:30'!\nfromBinaryStream: aBinaryStream\n\t\"Read a Form or ColorForm from given file, using the first byte of the file to guess its format. Currently handles: GIF, uncompressed BMP, and both old and new DisplayObject writeOn: formats, JPEG, and PCX. Return nil if the file could not be read or was of an unrecognized format.\"\n\n\t| firstByte |\n\taBinaryStream binary.\n\tfirstByte _ aBinaryStream next.\n\tfirstByte = 1 ifTrue: [\n\t\t\"old Squeakform format\"\n\t\t^ self new readFromOldFormat: aBinaryStream].\n\tfirstByte = 2 ifTrue: [\n\t\t\"new Squeak form format\"\n\t\t^ self new readFrom: aBinaryStream].\n\n\t\"Try for JPG, GIF, or PCX...\"\n\t\"Note: The following call closes the stream.\"\n\t^ ImageReadWriter formFromStream: aBinaryStream \n! !\n\n!Form class methodsFor: '*RVM-Archiving'!\narchiveVersion\n\t\"universal 2.3, 2.4 format.\"\n\n\t^3! !\n\n!Form class methodsFor: '*RVM-Archiving'!\ndearchive2From: anArchiver\n\t\"If the archiver is a copier, just get a deepCopy directly from it.\"\n\t\n\t| anObject |\n\tanArchiver isCopier\n\t\tifFalse: [^super dearchiveFrom: anArchiver].\n\tanObject _ (anArchiver read: self) deepCopy.\n\tanArchiver storeObject: anObject.\n\t^anObject! !\n\n!Form class methodsFor: '*RVM-Archiving'!\ndearchive: versionNumber from: aStream\n\t\"Override this method when implementing new archive versions for a class.\"\n\n\t^versionNumber == self archiveVersion\n\t\tifTrue: [self dearchiveFrom: aStream]\n\t\tifFalse: \n\t\t\t[versionNumber == 2\n\t\t\t\tifTrue: [self dearchive2From: aStream]\n\t\t\t\tifFalse: [self error: 'Can''t dearchive this version.']]! !\n\n!Form class methodsFor: '*RVM-Archiving'!\ndearchiveFrom: anArchiver\n\t\"Always use store: and read:.\"\n\t\n\t| anObject |\n\tanObject _ anArchiver read: self.\n\tanArchiver isCopier\n\t\tifTrue: [anObject _ anObject deepCopy].\n\tanArchiver storeObject: anObject.\n\t^anObject! !\n\n!FormView methodsFor: 'controller access' stamp: 'ssa 10/8/2008 13:14'!\ndefaultControllerClass  ^ NoController! !\n\n!FormView methodsFor: 'displaying' stamp: 'ssa 11/26/2009 22:52'!\ndisplayView \n\t\"Refer to the comment in View|displayView.\"\n\n\t| oldOffset |\n\tsuper displayView.\n\tinsideColor == nil ifFalse: [Display fill: self insetDisplayBox fillColor: insideColor].\n\toldOffset _ model offset.\n\tmodel offset: \"borderWidth origin\" 0@0.\n\tmodel\n\t\tdisplayOn: Display\n\t\tat: self insetDisplayBox origin\n\t\tclippingBox: self insetDisplayBox\n\t\trule: Form paint\n\t\tfillColor: nil.\n\tmodel offset: oldOffset! !\n\n!FormView methodsFor: 'private' stamp: 'ssa 11/26/2009 22:42'!\ndefaultRule \n\t\"The default display rule is 3=over or storing.\"\n\n\t^Form paint! !\n\n!FormView class methodsFor: 'examples' stamp: 'ssa 11/26/2009 22:47'!\nopen: aForm named: aString\n\t\"FormView open: ((ColorForm fromUser) borderWidth: 1) named: 'Squeak' \"\n\t\"Open a window whose model is aForm and whose label is aString.\"\n\t| topView aView |\n\ttopView _ StandardSystemView new.\n\ttopView model: aForm.\n\ttopView label: aString.\n\ttopView minimumSize: aForm extent+2\";\n\t          maximumSize: aForm extent + 2\".\n\taView _ FormView new.\n\taView model: aForm.\n\t\"aView window: (aForm boundingBox expandBy: 2).\"\n\taView borderWidthLeft: 1 right: 1 top: 2 bottom: 1.\n\ttopView addSubView: aView.\n\ttopView controller open! !\n\n!GIFReadWriter methodsFor: 'accessing' stamp: 'bf 5/29/2003 01:43'!\ndelay: aNumberOrNil\n\t\"Set delay for next image in hundredth (1/100) of seconds\"\n\tdelay := aNumberOrNil! !\n\n!GIFReadWriter methodsFor: 'accessing' stamp: 'bf 5/29/2003 01:39'!\nloopCount: aNumber\n\t\"Set looping. This must be done before any image is written!!\"\n\tloopCount := aNumber! !\n\n!GIFReadWriter methodsFor: 'accessing' stamp: 'sd 1/30/2004 15:18'!\nnextImage\n\t\"Read in the next GIF image from the stream. Read it all into\nmemory first for speed.\"\n\n\t| f thisImageColorTable |\n\tstream class == ReadWriteStream ifFalse: [\n\t\tstream binary.\n\t\tself on: (ReadWriteStream with: (stream contentsOfEntireFile))].\n\n\tlocalColorTable _ nil.\n\tself readHeader.\n\tf _ self readBody.\n\tself close.\n\tf == nil ifTrue: [^ self error: 'corrupt GIF file'].\n\n\tthisImageColorTable _ localColorTable ifNil: [colorPalette].\n\ttransparentIndex ifNotNil: [\n\t\ttransparentIndex + 1 > thisImageColorTable size ifTrue: [\n\t\t\tthisImageColorTable _ thisImageColorTable \n\t\t\t\tforceTo: transparentIndex + 1 \n\t\t\t\tpaddingWith: Color white\n\t\t].\n\t\tthisImageColorTable at: transparentIndex + 1 put: Color transparent\n\t].\n\tf colors: thisImageColorTable.\n\t^ f\n! !\n\n!GIFReadWriter methodsFor: 'accessing' stamp: 'ar 10/24/2005 22:52'!\nnextPutImage: aForm\n\n\t| reduced tempForm |\n\taForm unhibernate.\n\taForm depth > 8 ifTrue:[\n\t\treduced := aForm colorReduced.  \"minimize depth\"\n\t\treduced depth > 8 ifTrue: [\n\t\t\t\"Not enough color space; do it the hard way.\"\n\t\t\treduced := reduced asFormOfDepth: 8].\n\t] ifFalse:[reduced := aForm].\n\treduced depth < 8 ifTrue: [\n\t\t\"writeBitData: expects depth of 8\"\n\t\ttempForm := reduced class extent: reduced extent depth: 8.\n\t\t(reduced isColorForm) ifTrue:[\n\t\t\ttempForm\n\t\t\t\tcopyBits: reduced boundingBox\n\t\t\t\tfrom: reduced at: 0@0\n\t\t\t\tclippingBox: reduced boundingBox\n\t\t\t\trule: Form over\n\t\t\t\tfillColor: nil\n\t\t\t\tmap: nil.\n\t\t\ttempForm colors: reduced colors.\n\t\t] ifFalse: [reduced displayOn: tempForm].\n\t\treduced := tempForm.\n\t].\n\t(reduced isColorForm) ifTrue:[\n\t\t(reduced colorsUsed includes: Color transparent) ifTrue: [\n\t\t\ttransparentIndex := (reduced colors indexOf: Color transparent) - 1.\n\t\t]\n\t] ifFalse: [transparentIndex := nil].\n\twidth := reduced width.\n\theight := reduced height.\n\tbitsPerPixel := reduced depth.\n\tcolorPalette := reduced colormapIfNeededForDepth: 32.\n\tinterlace := false.\n\tself writeHeader.\n\tself writeBitData: reduced bits.\n! !\n\n!GIFReadWriter methodsFor: 'accessing' stamp: '6/18/97 13:18 '!\nsetStream: aStream\n\t\"Feed it in from an existing source\"\n\tstream _ aStream! !\n\n!GIFReadWriter methodsFor: 'accessing' stamp: 'di 9/15/1998 09:53'!\nunderstandsImageFormat\n\t^('abc' collect: [:x | stream next asCharacter]) = 'GIF'! !\n\n!GIFReadWriter methodsFor: 'private-encoding'!\nflushCode\n\tself flushBits! !\n\n!GIFReadWriter methodsFor: 'private-encoding' stamp: 'tk 9/14/97 16:25'!\nreadPixelFrom: bits\n\t\"Since bits is a Bitmap with 32 bit values, watch out for the\npadding at the end of each row.  But, GIF format already wants padding to\n32 bit boundary!!  OK as is.  tk 9/14/97\"\n\n\t| pixel |\n\typos >= height ifTrue: [^nil].\n\tpixel _ bits byteAt: (ypos * rowByteSize + xpos + 1).\n\tself updatePixelPosition.\n\t^pixel! !\n\n!GIFReadWriter methodsFor: 'private-encoding' stamp: 'bf 5/29/2003 01:21'!\nwriteBitData: bits\n\t\"using modified Lempel-Ziv Welch algorithm.\"\n\n\t| maxBits maxMaxCode tSize initCodeSize ent tShift fCode pixel index disp nomatch |\n\tpass _ 0.\n\txpos _ 0.\n\typos _ 0.\n\trowByteSize _ width * 8 + 31 // 32 * 4.\n\tremainBitCount _ 0.\n\tbufByte _ 0.\n\tbufStream _ WriteStream on: (ByteArray new: 256).\n\n\tmaxBits _ 12.\n\tmaxMaxCode _ 1 bitShift: maxBits.\n\ttSize _ 5003.\n\tprefixTable _ Array new: tSize.\n\tsuffixTable _ Array new: tSize.\n\n\tinitCodeSize _ bitsPerPixel <= 1 ifTrue: [2] ifFalse: [bitsPerPixel].\n\tself nextPut: initCodeSize.\n\tself setParameters: initCodeSize.\n\n\ttShift _ 0.\n\tfCode _ tSize.\n\t[fCode < 65536] whileTrue:\n\t\t[tShift _ tShift + 1.\n\t\tfCode _ fCode * 2].\n\ttShift _ 8 - tShift.\n\t1 to: tSize do: [:i | suffixTable at: i put: -1].\n\n\tself writeCodeAndCheckCodeSize: clearCode.\n\tent _ self readPixelFrom: bits.\n\t[(pixel _ self readPixelFrom: bits) == nil] whileFalse:\n\t\t[\n\t\tfCode _ (pixel bitShift: maxBits) + ent.\n\t\tindex _ ((pixel bitShift: tShift) bitXor: ent) + 1.\n\t\t(suffixTable at: index) = fCode\n\t\t\tifTrue: [ent _ prefixTable at: index]\n\t\t\tifFalse:\n\t\t\t\t[nomatch _ true.\n\t\t\t\t(suffixTable at: index) >= 0\n\t\t\t\t\tifTrue:\n\t\t\t\t\t\t[disp _ tSize - index + 1.\n\t\t\t\t\t\tindex = 1 ifTrue: [disp _ 1].\n\t\t\t\t\t\t\"probe\"\n\t\t\t\t\t\t[(index _ index - disp) < 1 ifTrue: [index _ index + tSize].\n\t\t\t\t\t\t(suffixTable at: index) = fCode\n\t\t\t\t\t\t\tifTrue:\n\t\t\t\t\t\t\t\t[ent _ prefixTable at: index.\n\t\t\t\t\t\t\t\tnomatch _ false.\n\t\t\t\t\t\t\t\t\"continue whileFalse:\"].\n\t\t\t\t\t\tnomatch and: [(suffixTable at: index) > 0]]\n\t\t\t\t\t\t\twhileTrue: [\"probe\"]].\n\t\t\t\t\"nomatch\"\n\t\t\t\tnomatch ifTrue:\n\t\t\t\t\t[self writeCodeAndCheckCodeSize: ent.\n\t\t\t\t\tent _ pixel.\n\t\t\t\t\tfreeCode < maxMaxCode\n\t\t\t\t\t\tifTrue:\n\t\t\t\t\t\t\t[prefixTable at: index put: freeCode.\n\t\t\t\t\t\t\tsuffixTable at: index put: fCode.\n\t\t\t\t\t\t\tfreeCode _ freeCode + 1]\n\t\t\t\t\t\tifFalse:\n\t\t\t\t\t\t\t[self writeCodeAndCheckCodeSize: clearCode.\n\t\t\t\t\t\t\t1 to: tSize do: [:i | suffixTable at: i put: -1].\n\t\t\t\t\t\t\tself setParameters: initCodeSize]]]].\n\tprefixTable _ suffixTable _ nil.\n\tself writeCodeAndCheckCodeSize: ent.\n\tself writeCodeAndCheckCodeSize: eoiCode.\n\tself flushCode.\n\n\tself nextPut: 0.\t\"zero-length packet\"\n! !\n\n!GIFReadWriter methodsFor: 'private-encoding'!\nwriteCode: aCode\n\tself nextBitsPut: aCode! !\n\n!GIFReadWriter methodsFor: 'private-encoding'!\nwriteCodeAndCheckCodeSize: aCode\n\tself writeCode: aCode.\n\tself checkCodeSize! !\n\n!GIFReadWriter methodsFor: 'private-encoding' stamp: 'bf 5/29/2003 01:38'!\nwriteHeader\n\n\t| byte |\n\tstream position = 0 ifTrue: [\n\t\t\"For first image only\"\n\t\tself nextPutAll: 'GIF89a' asByteArray.\n\t\tself writeWord: width.\t\"Screen Width\"\n\t\tself writeWord: height.\t\"Screen Height\"\n\t\tbyte _ 16r80.  \"has color map\"\n\t\tbyte _ byte bitOr: ((bitsPerPixel - 1) bitShift: 5).  \"color resolution\"\n\t\tbyte _ byte bitOr: bitsPerPixel - 1.  \"bits per pixel\"\n\t\tself nextPut: byte.\n\t\tself nextPut: 0.\t\t\"background color.\"\n\t\tself nextPut: 0.\t\t\"reserved\"\n\t\tcolorPalette do: [:pixelValue |\n\t\t\tself\tnextPut: ((pixelValue bitShift: -16) bitAnd: 255);\n\t\t\t\tnextPut: ((pixelValue bitShift: -8) bitAnd: 255);\n\t\t\t\tnextPut: (pixelValue bitAnd: 255)].\n\t\tloopCount notNil ifTrue: [\n\t\t\t\"Write a Netscape loop chunk\"\n\t\t\tself nextPut: Extension.\n\t\t\tself nextPutAll: #(255 11 78 69 84 83 67 65 80 69 50 46 48 3 1) asByteArray.\n\t\t\tself writeWord: loopCount.\n\t\t\tself nextPut: 0]].\n\n\tdelay notNil | transparentIndex notNil ifTrue: [\n\t\tself nextPut: Extension;\n\t\t\tnextPutAll: #(16rF9 4) asByteArray;\n\t\t\tnextPut: (transparentIndex isNil ifTrue: [0] ifFalse: [9]);\n\t\t\twriteWord: (delay isNil ifTrue: [0] ifFalse: [delay]);\n\t\t\tnextPut: (transparentIndex isNil ifTrue: [0] ifFalse: [transparentIndex]);\n\t\t\tnextPut: 0].\n\n\tself nextPut: ImageSeparator.\n\tself writeWord: 0.\t\t\"Image Left\"\n\tself writeWord: 0.\t\t\"Image Top\"\n\tself writeWord: width.\t\"Image Width\"\n\tself writeWord: height.\t\"Image Height\"\n\tbyte _ interlace ifTrue: [16r40] ifFalse: [0].\n\tself nextPut: byte.\n! !\n\n!GIFReadWriter methodsFor: 'private-encoding'!\nwriteWord: aWord\n\tself nextPut: (aWord bitAnd: 255).\n\tself nextPut: ((aWord bitShift: -8) bitAnd: 255).\n\t^aWord! !\n\n!GIFReadWriter methodsFor: 'private-decoding' stamp: 'mir 11/19/2003 12:19'!\nreadBitData\n\t\"using modified Lempel-Ziv Welch algorithm.\"\n\n\t| outCodes outCount bitMask initCodeSize code curCode oldCode inCode finChar i bytes f c packedBits hasLocalColor localColorSize maxOutCodes |\n\n\tmaxOutCodes _ 4096.\n\toffset := self readWord@self readWord. \"Image Left@Image Top\"\n\twidth _ self readWord.\n\theight _ self readWord.\n\n\t\"---\n\tLocal Color Table Flag        1 Bit\n\tInterlace Flag                1 Bit\n\tSort Flag                     1 Bit\n\tReserved                      2 Bits\n\tSize of Local Color Table     3 Bits\n\t----\"\n\tpackedBits _ self next.\n\tinterlace _ (packedBits bitAnd: 16r40) ~= 0.\n\thasLocalColor _ (packedBits bitAnd: 16r80) ~= 0.\n\tlocalColorSize _ 1 bitShift: ((packedBits bitAnd: 16r7) + 1).\n\thasLocalColor ifTrue: [localColorTable _ self readColorTable: localColorSize].\n\n\tpass _ 0.\n\txpos _ 0.\n\typos _ 0.\n\trowByteSize _ ((width + 3) // 4) * 4.\n\tremainBitCount _ 0.\n\tbufByte _ 0.\n\tbufStream _ ReadStream on: ByteArray new.\n\n\toutCodes _ ByteArray new: maxOutCodes + 1.\n\toutCount _ 0.\n\tbitMask _ (1 bitShift: bitsPerPixel) - 1.\n\tprefixTable _ Array new: 4096.\n\tsuffixTable _ Array new: 4096.\n\n\tinitCodeSize _ self next.\n\n\tself setParameters: initCodeSize.\n\tbitsPerPixel > 8 ifTrue: [^self error: 'never heard of a GIF that deep'].\n\tbytes _ ByteArray new: rowByteSize * height.\n\t[(code _ self readCode) = eoiCode] whileFalse:\n\t\t[code = clearCode\n\t\t\tifTrue:\n\t\t\t\t[self setParameters: initCodeSize.\n\t\t\t\tcurCode _ oldCode _ code _ self readCode.\n\t\t\t\tfinChar _ curCode bitAnd: bitMask.\n\t\t\t\t\"Horrible hack to avoid running off the end of the bitmap.  Seems to cure problem reading some gifs!!? tk 6/24/97 20:16\"\n\t\t\t\txpos = 0 ifTrue: [\n\t\t\t\t\t\typos < height ifTrue: [\n\t\t\t\t\t\t\tbytes at: (ypos * rowByteSize) + xpos + 1 put: finChar]]\n\t\t\t\t\tifFalse: [bytes at: (ypos * rowByteSize) + xpos + 1 put: finChar].\n\t\t\t\tself updatePixelPosition]\n\t\t\tifFalse:\n\t\t\t\t[curCode _ inCode _ code.\n\t\t\t\tcurCode >= freeCode ifTrue:\n\t\t\t\t\t[curCode _ oldCode.\n\t\t\t\t\toutCodes at: (outCount _ outCount + 1) put: finChar].\n\t\t\t\t[curCode > bitMask] whileTrue:\n\t\t\t\t\t[outCount > maxOutCodes\n\t\t\t\t\t\tifTrue: [^self error: 'corrupt GIF file (OutCount)'].\n\t\t\t\t\toutCodes at: (outCount _ outCount + 1)\n\t\t\t\t\t\tput: (suffixTable at: curCode + 1).\n\t\t\t\t\tcurCode _ prefixTable at: curCode + 1].\n\t\t\t\tfinChar _ curCode bitAnd: bitMask.\n\t\t\t\toutCodes at: (outCount _ outCount + 1) put: finChar.\n\t\t\t\ti _ outCount.\n\t\t\t\t[i > 0] whileTrue:\n\t\t\t\t\t[\"self writePixel: (outCodes at: i) to: bits\"\n\t\t\t\t\tbytes at: (ypos * rowByteSize) + xpos + 1 put: (outCodes at: i).\n\t\t\t\t\tself updatePixelPosition.\n\t\t\t\t\ti _ i - 1].\n\t\t\t\toutCount _ 0.\n\t\t\t\tprefixTable at: freeCode + 1 put: oldCode.\n\t\t\t\tsuffixTable at: freeCode + 1 put: finChar.\n\t\t\t\toldCode _ inCode.\n\t\t\t\tfreeCode _ freeCode + 1.\n\t\t\t\tself checkCodeSize]].\n\tprefixTable _ suffixTable _ nil.\n\n\tf _ ColorForm extent: width@height depth: 8.\n\tf bits copyFromByteArray: bytes.\n\t\"Squeak can handle depths 1, 2, 4, and 8\"\n\tbitsPerPixel > 4 ifTrue: [^ f].\n\t\"reduce depth to save space\"\n\tc _ ColorForm extent: width@height\n\t\tdepth: (bitsPerPixel = 3 ifTrue: [4] ifFalse: [bitsPerPixel]).\n\tf displayOn: c.\n\t^ c\n! !\n\n!GIFReadWriter methodsFor: 'private-decoding' stamp: 'KLC 1/25/2004 14:04'!\nreadBody\n\t\"Read the GIF blocks. Modified to return a form.  \"\n\n\t| form extype block blocksize packedFields delay1 |\n\tform _ nil.\n\t[stream atEnd] whileFalse: [\n\t\tblock _ self next.\n\t\tblock = Terminator ifTrue: [^ form].\n\t\tblock = ImageSeparator ifTrue: [\n\t\t\tform isNil\n\t\t\t\tifTrue: [form _ self readBitData]\n\t\t\t\tifFalse: [self skipBitData].\n\t\t] ifFalse: [\n\t\t\tblock = Extension\n\t\t\t\tifFalse: [^ form \"^ self error: 'Unknown block type'\"].\n\t\t\t\"Extension block\"\n\t\t\textype _ self next.\t\"extension type\"\n\t\t\textype = 16rF9 ifTrue: [  \"graphics control\"\n\t\t\t\tself next = 4 ifFalse: [^ form \"^ self error: 'corrupt GIF file'\"].\n\t\t\t\t\"====\n\t\t\t\tReserved                      3 Bits\n\t\t\t\tDisposal Method               3 Bits\n\t\t\t\tUser Input Flag               1 Bit\n\t\t\t\tTransparent Color Flag        1 Bit\n\t\t\t\t===\"\n \n\t\t\t\tpackedFields _ self next.\n\t\t\t\tdelay1 := self next.\t\"delay time 1\"\n\t\t\t\tdelay := (self next*256 + delay1) *10.\t \"delay time 2\"\n\t\t\t\ttransparentIndex _ self next.\n\t\t\t\t(packedFields bitAnd: 1) = 0 ifTrue: [transparentIndex _ nil].\n\t\t\t\tself next = 0 ifFalse: [^ form \"^ self error: 'corrupt GIF file'\"].\n\t\t\t] ifFalse: [\n\t\t\t\t\"Skip blocks\"\n\t\t\t\t[(blocksize _ self next) > 0]\n\t\t\t\t\twhileTrue: [\n\t\t\t\t\t\t\"Read the block and ignore it and eat the block terminator\"\n\t\t\t\t\t\tself next: blocksize]]]]! !\n\n!GIFReadWriter methodsFor: 'private-decoding'!\nreadCode\n\t^self nextBits! !\n\n!GIFReadWriter methodsFor: 'private-decoding' stamp: 'RAA 4/25/2001 08:48'!\nreadColorTable: numberOfEntries\n\n\t| array r g b |\n\n\tarray _ Array new: numberOfEntries.\n\t1 to: array size do: [ :i |\n\t\tr _ self next.  \n\t\tg _ self next.  \n\t\tb _ self next.\n\t\tarray at: i put: (Color r: r g: g b: b range: 255)\n\t].\n\t^array! !\n\n!GIFReadWriter methodsFor: 'private-decoding' stamp: 'RAA 4/25/2001 08:49'!\nreadHeader\n\t| is89 byte hasColorMap |\n\t(self hasMagicNumber: 'GIF87a' asByteArray)\n\t\tifTrue: [is89 _ false]\n\t\tifFalse: [(self hasMagicNumber: 'GIF89a' asByteArray)\n\t\t\tifTrue: [is89 _ true]\n\t\t\tifFalse: [^ self error: 'This does not appear to be a GIF file']].\n\tself readWord.\t\"skip Screen Width\"\n\tself readWord.\t\"skip Screen Height\"\n\tbyte _ self next.\n\thasColorMap _ (byte bitAnd: 16r80) ~= 0.\n\tbitsPerPixel _ (byte bitAnd: 7) + 1.\n\tbyte _ self next.\t\"skip background color.\"\n\tself next ~= 0\n\t\tifTrue: [is89\n\t\t\tifFalse: [^self error: 'corrupt GIF file (screen descriptor)']].\n\thasColorMap\n\t\tifTrue:\n\t\t\t[colorPalette _ self readColorTable: (1 bitShift: bitsPerPixel)]\n\t\tifFalse:\n\t\t\t[\"Transcript cr; show: 'GIF file does not have a color map.'.\"\n\t\t\tcolorPalette _ nil \"Palette monochromeDefault\"].! !\n\n!GIFReadWriter methodsFor: 'private-decoding'!\nreadWord\n\t^self next + (self next bitShift: 8)! !\n\n!GIFReadWriter methodsFor: 'private-decoding'!\nskipBitData\n\t| misc blocksize |\n\tself readWord.  \"skip Image Left\"\n\tself readWord.  \"skip Image Top\"\n\tself readWord.  \"width\"\n\tself readWord.  \"height\"\n\tmisc _ self next.\n\t(misc bitAnd: 16r80) = 0 ifFalse: [ \"skip colormap\"\n\t\t1 to: (1 bitShift: (misc bitAnd: 7) + 1) do: [:i |\n\t\t\tself next; next; next]].\n\tself next.  \"minimum code size\"\n\t[(blocksize _ self next) > 0]\n\t\twhileTrue: [self next: blocksize]! !\n\n!GIFReadWriter methodsFor: 'private-bits access'!\nflushBits\n\tremainBitCount = 0 ifFalse:\n\t\t[self nextBytePut: bufByte.\n\t\tremainBitCount _ 0].\n\tself flushBuffer! !\n\n!GIFReadWriter methodsFor: 'private-bits access'!\nnextBits\n\t| integer readBitCount shiftCount byte |\n\tinteger _ 0.\n\tremainBitCount = 0\n\t\tifTrue:\n\t\t\t[readBitCount _ 8.\n\t\t\tshiftCount _ 0]\n\t\tifFalse:\n\t\t\t[readBitCount _ remainBitCount.\n\t\t\tshiftCount _ remainBitCount - 8].\n\t[readBitCount < codeSize]\n\t\twhileTrue:\n\t\t\t[byte _ self nextByte.\n\t\t\tbyte == nil ifTrue: [^eoiCode].\n\t\t\tinteger _ integer + (byte bitShift: shiftCount).\n\t\t\tshiftCount _ shiftCount + 8.\n\t\t\treadBitCount _ readBitCount + 8].\n\t(remainBitCount _ readBitCount - codeSize) = 0\n\t\tifTrue:\t[byte _ self nextByte]\n\t\tifFalse:\t[byte _ self peekByte].\n\tbyte == nil ifTrue: [^eoiCode].\n\t^(integer + (byte bitShift: shiftCount)) bitAnd: maxCode! !\n\n!GIFReadWriter methodsFor: 'private-bits access'!\nnextBitsPut: anInteger\n\t| integer writeBitCount shiftCount |\n\tshiftCount _ 0.\n\tremainBitCount = 0\n\t\tifTrue:\n\t\t\t[writeBitCount _ 8.\n\t\t\tinteger _ anInteger]\n\t\tifFalse:\n\t\t\t[writeBitCount _ remainBitCount.\n\t\t\tinteger _ bufByte + (anInteger bitShift: 8 - remainBitCount)].\n\t[writeBitCount < codeSize]\n\t\twhileTrue:\n\t\t\t[self nextBytePut: ((integer bitShift: shiftCount) bitAnd: 255).\n\t\t\tshiftCount _ shiftCount - 8.\n\t\t\twriteBitCount _ writeBitCount + 8].\n\t(remainBitCount _ writeBitCount - codeSize) = 0\n\t\tifTrue: [self nextBytePut: (integer bitShift: shiftCount)]\n\t\tifFalse: [bufByte _ integer bitShift: shiftCount].\n\t^anInteger! !\n\n!GIFReadWriter methodsFor: 'private-packing'!\nfillBuffer\n\t| packSize |\n\tpackSize _ self next.\n\tbufStream _ ReadStream on: (self next: packSize)! !\n\n!GIFReadWriter methodsFor: 'private-packing'!\nflushBuffer\n\tbufStream isEmpty ifTrue: [^self].\n\tself nextPut: bufStream size.\n\tself nextPutAll: bufStream contents.\n\tbufStream _ WriteStream on: (ByteArray new: 256)! !\n\n!GIFReadWriter methodsFor: 'private-packing'!\nnextByte\n\tbufStream atEnd\n\t\tifTrue:\n\t\t\t[self atEnd ifTrue: [^nil].\n\t\t\tself fillBuffer].\n\t^bufStream next! !\n\n!GIFReadWriter methodsFor: 'private-packing'!\nnextBytePut: aByte\n\tbufStream nextPut: aByte.\n\tbufStream size >= 254 ifTrue: [self flushBuffer]! !\n\n!GIFReadWriter methodsFor: 'private-packing'!\npeekByte\n\tbufStream atEnd\n\t\tifTrue:\n\t\t\t[self atEnd ifTrue: [^nil].\n\t\t\tself fillBuffer].\n\t^bufStream peek! !\n\n!GIFReadWriter methodsFor: 'private'!\ncheckCodeSize\n\t(freeCode > maxCode and: [codeSize < 12])\n\t\tifTrue:\n\t\t\t[codeSize _ codeSize + 1.\n\t\t\tmaxCode _ (1 bitShift: codeSize) - 1]! !\n\n!GIFReadWriter methodsFor: 'private'!\nsetParameters: initCodeSize\n\tclearCode _ 1 bitShift: initCodeSize.\n\teoiCode _ clearCode + 1.\n\tfreeCode _ clearCode + 2.\n\tcodeSize _ initCodeSize + 1.\n\tmaxCode _ (1 bitShift: codeSize) - 1! !\n\n!GIFReadWriter methodsFor: 'private'!\nupdatePixelPosition\n\t(xpos _ xpos + 1) >= width ifFalse: [^self].\n\txpos _ 0.\n\tinterlace\n\t\tifFalse: [ypos _ ypos + 1. ^self].\n\tpass = 0 ifTrue:\n\t\t[(ypos _ ypos + 8) >= height\n\t\t\tifTrue:\n\t\t\t\t[pass _ pass + 1.\n\t\t\t\typos _ 4].\n\t\t^self].\n\tpass = 1 ifTrue:\n\t\t[(ypos _ ypos + 8) >= height\n\t\t\tifTrue:\n\t\t\t\t[pass _ pass + 1.\n\t\t\t\typos _ 2].\n\t\t^self].\n\tpass = 2 ifTrue:\n\t\t[(ypos _ ypos + 4) >= height\n\t\t\tifTrue:\n\t\t\t\t[pass _ pass + 1.\n\t\t\t\typos _ 1].\n\t\t^self].\n\tpass = 3 ifTrue:\n\t\t[ypos _ ypos + 2.\n\t\t^self].\n\n\t^self error: 'can''t happen'! !\n\n!GIFReadWriter methodsFor: 'stream access' stamp: 'bf 5/29/2003 01:23'!\nclose\n\t\"Write terminator\"\n\tself nextPut: Terminator.\n\t^super close! !\n\n!GIFReadWriter commentStamp: '<historical>' prior: 0!\nCopyright (c) Kazuki Yasumatsu, 1995. All rights reserved.\n\nUsed with permission.  Modified for use in Squeak.!\n!GIFReadWriter class methodsFor: 'class initialization'!\ninitialize\n\t\"GIFReadWriter initialize\"\n\n\tImageSeparator _ $, asInteger.\n\tExtension _ $!! asInteger.\n\tTerminator _ $; asInteger.\n! !\n\n!GIFReadWriter class methodsFor: 'examples' stamp: 'bf 5/29/2003 01:56'!\nexampleAnim\n\t\"GIFReadWriter exampleAnim\"\n\n\t| writer extent center |\n\twriter := GIFReadWriter on: (FileStream newFileNamed: 'anim.gif').\n\twriter loopCount: 20.\t\t\"Repeat 20 times\"\n\twriter delay: 10.\t\t\"Wait 10/100 seconds\"\n\textent := 42@42.\n\tcenter := extent / 2.\n\tCursor write showWhile: [\n\t\t[2 to: center x - 1 by: 2 do: [:r |\n\t\t\t\"Make a fancy anim without using Canvas - inefficient as hell\"\n\t\t\t| image |\n\t\t\timage := ColorForm extent: extent depth: 8.\n\t\t\t0.0 to: 359.0 do: [:theta | image colorAt: (center + (Point r: r degrees: theta)) rounded put: Color red].\n\t\t\twriter nextPutImage: image]\n\t\t]\tensure: [writer close]].! !\n\n!GIFReadWriter class methodsFor: 'examples' stamp: 'nk 7/30/2004 21:40'!\ngrabScreenAndSaveOnDisk\n\t\"GIFReaderWriter grabScreenAndSaveOnDisk\"\n\n\t| form fileName |\n\tform := Form fromUser.\n\tform bits size = 0 ifTrue: [^Beeper beep].\n\tfileName := FileDirectory default nextNameFor: 'Squeak' extension: 'gif'.\n\tUtilities informUser: 'Writing ' , fileName\n\t\tduring: [GIFReadWriter putForm: form onFileNamed: fileName]! !\n\n!GIFReadWriter class methodsFor: 'image reading/writing' stamp: 'asm 12/11/2003 21:29'!\ntypicalFileExtensions\n\t\"Answer a collection of file extensions (lowercase) which files that I can \n\tread might commonly have\"\n\n\tself\n\t\tallSubclasses detect: [:cls | cls wantsToHandleGIFs ]\n\t\t\t\t\t ifNone: [\"if none of my subclasses wants , then i''ll have to do\"\n\t\t\t\t\t\t\t^ #('gif' )].\n\t^ #( )! !\n\n!GIFReadWriter class methodsFor: 'image reading/writing' stamp: 'asm 12/11/2003 21:29'!\nwantsToHandleGIFs\n\t^ false! !\n\n!HashAndEqualsTestCase methodsFor: 'running' stamp: 'stephaneducasse 2/3/2006 22:39'!\nsetUp\n\t\"subclasses will add their prototypes into this collection\"\n\tprototypes := OrderedCollection new ! !\n\n!HashAndEqualsTestCase methodsFor: 'testing' stamp: 'mjr 8/20/2003 18:56'!\ntestEquality\n\t\"Check that TextFontChanges report equality correctly\"\n\tprototypes\n\t\tdo: [:p | self\n\t\t\t\tshould: [(EqualityTester with: p) result]] ! !\n\n!HashAndEqualsTestCase methodsFor: 'testing' stamp: 'al 6/12/2008 21:58'!\ntestHash\n\t\"test that TextFontChanges hash correctly\"\n\tprototypes do: [:p |\n\t\tself should: [(HashTester with: p) result]] ! !\n\n!HashAndEqualsTestCase commentStamp: 'mjr 8/20/2003 17:37' prior: 0!\nI am a simple TestCase that tests for correct operation of #hash and #=.\n\nSubclasses of me need to fill my prototypes with suitable objects to be tested.!\n!HashTester methodsFor: 'as yet unclassified'!\nresultFor: runs \n\t\"Test that the hash is the same over runs and answer the result\"\n\t| hash |\n\thash := self prototype hash.\n\t1\n\t\tto: runs\n\t\tdo: [:i | hash = self prototype hash\n\t\t\t\tifFalse: [^ false]].\n\t^ true ! !\n\n!HashTester commentStamp: 'mjr 8/20/2003 12:48' prior: 0!\nI provide a simple way to test the hash properties of any object.  \n\nI am given an object that should be tested and I treat it like a prototype.  I take a copy of it when I am given it so that it can't change whilst I am holding on to it.  I can then test that multiple copies of this object all hash to the same value.!\n!HashTesterTest methodsFor: 'as yet unclassified' stamp: 'mjr 8/20/2003 18:56'!\ntestBasicBehaviour\n\tself\n\t\tshould: [(HashTester with: 1)\n\t\t\t\tresultFor: 100].\n\tself\n\t\tshould: [(HashTester with: 'fred')\n\t\t\t\tresultFor: 100].\n\tself\n\t\tshouldnt: [(HashTester with: BadHasher new)\n\t\t\t\tresultFor: 100] ! !\n\n!HashTesterTest commentStamp: 'mjr 8/20/2003 12:48' prior: 0!\nI am a simple test case to check that HashTester works correctly!\n!HeadlessSave class methodsFor: 'script entry' stamp: 'sm 2/13/2011 19:35'!\nrun: arguments \n\t| proc |\n\tproc := [\n\t\t| basicName newName |\n\t\tRVMOperations print: 'Do wait, let system run non-busy, and then save and quit'.\n\t\t(Delay forSeconds: 10) wait.\n\t\tRVMOperations print: 'Do headless save now.'.\n\t\tbasicName := SmalltalkImage current imageName withoutLast: '.image' size.\n\t\tnewName := basicName, '-headless.image'.\n\t\tSmalltalkImage current saveAs: newName.\n\t\tSmalltalkImage current snapshot: false andQuit: true.\n\t\t] newProcess.\n\t\n\tproc priority: Processor userBackgroundPriority.\n\tproc resume.\n! !\n\n!HelloWorld commentStamp: 'StefanMarr 5/14/2011 16:42' prior: 0!\nSimple example for how to use ScriptStarter.\n\nHelloWorld prints all arguments given to #run:.!\n!HelloWorld class methodsFor: 'script entry'!\nrun: arguments \n\tScriptConsole print: 'Hello World!!'.\n\targuments\n\t\tdo: [:elem | ScriptConsole print: elem].\n\tSmalltalkImage current snapshot: false andQuit: true! !\n\n!HierarchyBrowser methodsFor: 'initialization' stamp: 'ssa 9/10/2009 13:34'!\nsetClass: aBehavior selector: aSymbol\n\t\"Set the state of a new, uninitialized Browser.\"\n\n\t| isMeta aClass messageCatIndex |\n\taBehavior ifNil: [^ self].\n\t(aBehavior isKindOf: Metaclass)\n\t\tifTrue: [\n\t\t\tisMeta _ true.\n\t\t\taClass _ aBehavior soleInstance]\n\t\tifFalse: [\n\t\t\tisMeta _ false.\n\t\t\taClass _ aBehavior].\n\tself selectCategoryForClass: aClass.\n\tself selectClass: aClass.\n\tself metaClassIndicated: isMeta.\n\taSymbol ifNil: [^ self].\n\tmessageCatIndex _ aBehavior organization numberOfCategoryOfElement: aSymbol.\n\tself messageCategoryListIndex: (messageCatIndex > 0\n\t\tifTrue: [messageCatIndex + 1]\n\t\tifFalse: [0]).\n\tmessageCatIndex = 0 ifTrue: [^ self].\n\tself messageListIndex: (\n\t\t(aBehavior organization listAtCategoryNumber: messageCatIndex)\n\t\t\tindexOf: aSymbol).! !\n\n!HierarchyBrowser class methodsFor: 'as yet unclassified' stamp: 'ssa 3/1/2010 13:54'!\nnewFor: aClass\n\t\"Open a new HierarchyBrowser on the given class\"\n\tself newFor: aClass labeled: nil\n\n\"HierarchyBrowser newFor: Boolean\"! !\n\n!HierarchyBrowser class methodsFor: 'as yet unclassified' stamp: 'ssa 3/1/2010 13:54'!\nnewFor: aClass labeled: aLabel\n\t\"Open a new HierarchyBrowser on the given class, using aLabel as the window title.\"\n\n\t|  newBrowser |\n\tnewBrowser _ self new initHierarchyForClass: aClass.\n\tBrowser openBrowserView: (newBrowser openSystemCatEditString: nil)\n\t\tlabel: (aLabel isNil ifTrue:[newBrowser labelString]ifFalse:[aLabel])\n\n\"HierarchyBrowser newFor: Boolean labeled: 'Testing'\"! !\n\n!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/10/2009 13:29'!\nchildrenOf: anObject\n\n\t^anObject subobjects! !\n\n!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/11/2009 15:44'!\ncurrentSelection\n\t\"Answer the value of currentSelection\"\n\n\tcurrentSelection isNil ifTrue:[self currentSelection: nil].\n\t^ currentSelection! !\n\n!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/11/2009 15:44'!\ncurrentSelection: anObject\n\t\"Set the value of currentSelection\"\n\n\tcurrentSelection _ anObject! !\n\n!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 3/1/2010 14:12'!\ngetClassList\n\n\t|  prev classes |\n\tclasses _ OrderedCollection new.\n\t centralClass allSuperclasses reverseDo:  [:aClass | classes add: aClass].\n\tclasses add:  centralClass.\n\t centralClass subclassesDo: [:aClass| classes add: aClass].\n\tprev _nil.\n\t^(classes collect:[:cls| prev _ ClassHierarchyExplorerWrapper with: cls name: cls name model: self parent: prev]) asArray! !\n\n!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/9/2009 12:02'!\ninitializeList\n\n\tself list do:[:each| self levels at: each put:0]! !\n\n!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/9/2009 12:01'!\nlevelOf: anItem\n\n\t^self levels at: anItem ifAbsent:[0]! !\n\n!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/9/2009 12:01'!\nlevels\n\t\"Answer the value of levels\"\n\n\tlevels isNil ifTrue:[self levels: Dictionary new].\n\t^ levels! !\n\n!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/9/2009 12:00'!\nlevels: anObject\n\t\"Set the value of levels\"\n\n\tlevels _ anObject! !\n\n!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/10/2009 13:39'!\nlist\n\t\"Answer the value of list\"\n\n\tlist isNil ifTrue:[self list: (OrderedCollection with:self subject )].\n\t^ list! !\n\n!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/10/2009 13:36'!\nlist: anObject\n\t\"Set the value of list\"\n\n\tlist _ anObject asOrderedCollection! !\n\n!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/11/2009 15:44'!\nmyBrowser\n\t\"Answer the value of myBrowser\"\n\n\tmyBrowser isNil ifTrue:[self myBrowser: nil].\n\t^ myBrowser! !\n\n!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/11/2009 15:44'!\nmyBrowser: anObject\n\t\"Set the value of myBrowser\"\n\n\tmyBrowser _ anObject! !\n\n!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/9/2009 11:42'!\nopenItems\n\t\"Answer the value of openItems\"\n\n\topenItems isNil ifTrue:[self openItems: Set new].\n\t^ openItems! !\n\n!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/9/2009 11:42'!\nopenItems: anObject\n\t\"Set the value of openItems\"\n\n\topenItems _ anObject! !\n\n!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/9/2009 13:28'!\nprogenyOf: anObject\n\n\t| all |\n\tall _ (self childrenOf: anObject)copy.\n\tall isEmpty ifTrue:[^all].\n\tall copy do:[:each| all addAll: (self progenyOf: each)].\n\t^all ! !\n\n!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/9/2009 11:18'!\nselection\n\t\"Answer the value of selection\"\n\n\tselection isNil ifTrue:[self selection: nil].\n\t^ selection! !\n\n!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/9/2009 17:15'!\nselection: anObject\n\t\"Set the value of selection\"\n\n\tselection _ anObject .\n\t! !\n\n!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 7/7/2010 12:40'!\nsubject\n\t\"Answer the value of subject\"\n\n\tsubject isNil ifTrue:[self subject: Object].\n\t^ subject! !\n\n!HierarchyOutlineBrowser methodsFor: 'accessing' stamp: 'ssa 9/10/2009 08:25'!\nsubject: anObject\n\t\"Set the value of subject\"\n\n\tsubject _ anObject! !\n\n!HierarchyOutlineBrowser methodsFor: 'user interfacing' stamp: 'ssa 3/1/2010 14:23'!\nopenSystemCatEditString: aString\n\t\"Create a pluggable version of all the views for a Browser, including views and controllers.  The top list view is of the currently selected system class category--a single item list.\"\n\t| systemCategoryListView classListView messageCategoryListView messageListView browserCodeView topView switchView y annotationPane underPane optionalButtonsView |\n\n\n\ttopView _ (StandardSystemView new) model: self.\n\ttopView borderWidth: 1.\n\t\t\"label and minSize taken care of by caller\"\n\n\tsystemCategoryListView _ PluggableListView on: self\n\t\tlist: #systemCategorySingleton\n\t\tselected: #indexIsOne \n\t\tchangeSelected: #indexIsOne:\n\t\tmenu: #systemCatSingletonMenu:\n\t\tkeystroke: #systemCatSingletonKey:from:.\n\tsystemCategoryListView window: (0 @ 0 extent: 200 @ 12).\n\ttopView addSubView: systemCategoryListView.\n\n\tclassListView _ LyPluggableOutlineView on: self\n\t\tlist: #getClassList\n\t\tselected: #currentSelection\n\t\tchangeSelected: #currentSelection:\n\t\tmenu: #classListMenu:shifted:\n\t\tkeystroke: #classListKey:from:.\n\tclassListView window: (0 @ 0 extent: 67 @ 62).\n\ttopView addSubView: classListView below: systemCategoryListView.\n\n\tmessageCategoryListView _ PluggableListView on: self\n\t\tlist: #messageCategoryList\n\t\tselected: #messageCategoryListIndex\n\t\tchangeSelected: #messageCategoryListIndex:\n\t\tmenu: #messageCategoryMenu:.\n\tmessageCategoryListView controller terminateDuringSelect: true.\n\tmessageCategoryListView window: (0 @ 0 extent: 66 @ 70).\n\ttopView addSubView: messageCategoryListView toRightOf: classListView.\n\n\tswitchView _ self buildInstanceClassSwitchView.\n\tswitchView \n\t\twindow: switchView window \n\t\tviewport: (classListView viewport bottomLeft \n\t\t\t\t\tcorner: messageCategoryListView viewport bottomLeft).\n\tswitchView borderWidth: 1.\n\ttopView addSubView: switchView below: classListView.\n\n\tmessageListView _ PluggableListView on: self\n\t\tlist: #messageList\n\t\tselected: #messageListIndex\n\t\tchangeSelected: #messageListIndex:\n\t\tmenu: #messageListMenu:shifted:\n\t\tkeystroke: #messageListKey:from:.\n\tmessageListView menuTitleSelector: #messageListSelectorTitle.\n\tmessageListView window: (0 @ 0 extent: 67 @ 70).\n\ttopView addSubView: messageListView toRightOf: messageCategoryListView.\n\n\t self wantsAnnotationPane\n\t\tifTrue:\n\t\t\t[annotationPane _ PluggableTextView on: self\n\t\t\t\ttext: #annotation accept: nil\n\t\t\t\treadSelection: nil menu: nil.\n\t\t\tannotationPane window: (0@0 extent: 200@self optionalAnnotationHeight).\n\t\t\ttopView addSubView: annotationPane below: switchView.\n\t\t\ty _ 110 - 12 - self optionalAnnotationHeight.\n\t\t\tunderPane _ annotationPane]\n\t\tifFalse:\n\t\t\t[y _ 110 - 12.\n\t\t\tunderPane _ switchView].\n\n\tself wantsOptionalButtons ifTrue:\n\t\t[optionalButtonsView _ self buildOptionalButtonsView.\n\t\toptionalButtonsView borderWidth: 1.\n\t\ttopView addSubView: optionalButtonsView below: underPane.\n\t\tunderPane _ optionalButtonsView.\n\t\ty _ y - self optionalButtonHeight].\n\n\tbrowserCodeView _ PluggableTextView on: self \n\t\t\ttext: #contents accept: #contents:notifying:\n\t\t\treadSelection: #contentsSelection menu: #codePaneMenu:shifted:.\n\tbrowserCodeView window: (0@0 extent: 200@y).\n\ttopView addSubView: browserCodeView below: underPane.\n\taString ifNotNil: [browserCodeView editString: aString.\n\t\t\tbrowserCodeView hasUnacceptedEdits: true].\n\ttopView setUpdatablePanesFrom: #(getClassList messageCategoryList messageList).\n\t^ topView! !\n\n!HierarchyOutlineBrowser methodsFor: 'menu support' stamp: 'ssa 9/10/2009 14:42'!\ninspectSelection\n\n\tself selection inspect! !\n\n!HierarchyOutlineBrowser methodsFor: 'menu support' stamp: 'ssa 9/10/2009 14:47'!\nmenu: aMenu\n\n\n\taMenu add: 'inspect' action: #inspectSelection.\n\taMenu add: 'outline' action: #outlineSelection.\n\t^ aMenu! !\n\n!HierarchyOutlineBrowser methodsFor: 'menu support' stamp: 'ssa 9/10/2009 14:43'!\noutlineSelection\n\n\tself selection outline! !\n\n!HierarchyOutlineBrowser methodsFor: 'menu support' stamp: 'RAA 4/7/1999 16:53'!\nperform: selector orSendTo: otherTarget\n\t\"Selector was just chosen from a menu by a user.  If can respond, then\nperform it on myself. If not, send it to otherTarget, presumably the\neditPane from which the menu was invoked.\"\n\n\t(self respondsTo: selector)\n\t\tifTrue: [^ self perform: selector]\n\t\tifFalse: [^ otherTarget perform: selector]! !\n\n!HierarchyOutlineBrowser methodsFor: 'opening/closing' stamp: 'ssa 9/9/2009 13:02'!\nhasChildren: anObject\n\n\t^(self childrenOf: anObject) notEmpty ! !\n\n!HierarchyOutlineBrowser methodsFor: 'opening/closing' stamp: 'ssa 9/9/2009 14:07'!\nhideChildrenOfSelection\n\n\t| kids |\n\tself openItems remove: self selection.\n\tkids _ self progenyOf: self selection.\n\tkids do:[:each| self levels removeKey: each ifAbsent:[].\n\t\tself openItems remove: each ifAbsent:[]].\n\tself list removeAll: kids ifAbsent:[]\n! !\n\n!HierarchyOutlineBrowser methodsFor: 'opening/closing' stamp: 'ssa 9/9/2009 11:42'!\nisOpen: anItem\n\n\t^self openItems includes: anItem! !\n\n!HierarchyOutlineBrowser methodsFor: 'opening/closing' stamp: 'ssa 9/9/2009 12:10'!\nshowChildrenOfSelection\n\n\t| kids nextLevel |\n\tself openItems add: self selection.\n\tnextLevel _ (self levelOf: self selection) + 1.\n\tkids _ self childrenOf: self selection.\n\tkids isEmpty ifTrue:[^self error:'should never try to show children of an childless object'].\n\tkids do:[:each| self levels at: each put: nextLevel].\n\tself list addAll: kids after: self selection! !\n\n!HierarchyOutlineBrowser methodsFor: 'opening/closing' stamp: 'ssa 9/10/2009 07:30'!\ntoggleSelection\n\n\tself selection isNil ifTrue:[^self].\n\t(self isOpen: self selection)\n\t\tifTrue:[self hideChildrenOfSelection]\n\t\tifFalse:[self showChildrenOfSelection].\n\tself changed:#list! !\n\n!HierarchyOutlineBrowser methodsFor: 'arrow keys' stamp: 'ssa 9/9/2009 14:47'!\narrowKey: aChar from: view\n\t\"Process the up and down arrows in a list pane.  Note that the listView tells us what index variable, how to get the list, and how to move the index.  Derived from a Martin Pammer submission, 02/98\"\n\n     | keyEvent oldSelection nextSelection max min howMany |\n\n\t(#(1 4 11 12 30 31) includes: (keyEvent _ aChar asciiValue)) ifFalse:\n\t\t[\n\t\t\t^ self].\n\n     oldSelection := view getCurrentSelectionIndex.\n     nextSelection := oldSelection.\n     max := view maximumSelection.\n     min := view minimumSelection.\n     howMany := view numSelectionsInView.\t\"get this exactly??\"\n\n     keyEvent == 31 ifTrue:\n\t\t[\"down-arrow; move down one, wrapping to top if needed\"\n\t\tnextSelection := oldSelection + 1.\n\t\tnextSelection > max ifTrue: [nextSelection _ 1]].\n\n     keyEvent == 30 ifTrue:\n\t\t[\"up arrow; move up one, wrapping to bottom if needed\"\n\t\tnextSelection := oldSelection - 1.\n\t\tnextSelection < 1 ifTrue: [nextSelection _ max]].\n\n     keyEvent == 1  ifTrue: [nextSelection := 1].  \"home\"\n     keyEvent == 4  ifTrue: [nextSelection := max].   \"end\"\n     keyEvent == 11 ifTrue: [nextSelection := min max: (oldSelection - howMany)].  \"page up\"\n     keyEvent == 12  ifTrue: [nextSelection := (oldSelection + howMany) min: max].  \"page down\"\n     nextSelection = oldSelection  ifFalse:\n\t\t[self okToChange\n\t\t\tifTrue:\n\t\t\t\t[view changeModelSelection: nextSelection.\n\t\t\t\t\"view controller moveMarker\"]]\n\t\t\t! !\n\n!HierarchyOutlineBrowser methodsFor: 'as yet unclassified' stamp: 'RAA 6/21/1999 15:22'!\ngenericMenu: aMenu\n\n\taMenu add: 'no menu yet' target: self selector: #yourself.\n\t^aMenu! !\n\n!HierarchyOutlineBrowser methodsFor: 'as yet unclassified' stamp: 'RAA 4/7/1999 16:44'!\ngetCurrentSelection\n\n\t^currentSelection! !\n\n!HierarchyOutlineBrowser methodsFor: 'as yet unclassified' stamp: 'RAA 4/7/1999 16:46'!\nnoteNewSelection: x\n\n\tcurrentSelection _ x.\n\tself changed: #getCurrentSelection.\n\tcurrentSelection ifNil: [^self].\n\tcurrentSelection sendSettingMessageTo: self.\n! !\n\n!HierarchyOutlineBrowser methodsFor: 'as yet unclassified' stamp: 'RAA 4/7/1999 16:47'!\nupdate: aSymbol\n\n\taSymbol == #hierarchicalList ifTrue: [\n\t\t^self changed: #getList\n\t].\n\tsuper update: aSymbol! !\n\n!HierarchyOutlineBrowser commentStamp: '<historical>' prior: 0!\nContributed by Bob Arning as part of the ObjectExplorer package.\n!\n!ImageReadWriter methodsFor: 'accessing'!\nnextImage\n\t\"Dencoding an image on stream and answer the image.\"\n\n\t^self subclassResponsibility! !\n\n!ImageReadWriter methodsFor: 'accessing'!\nnextPutImage: anImage\n\t\"Encoding anImage on stream.\"\n\n\t^self subclassResponsibility! !\n\n!ImageReadWriter methodsFor: 'stream access'!\natEnd\n\n\t^stream atEnd! !\n\n!ImageReadWriter methodsFor: 'stream access' stamp: 'sd 1/30/2004 15:18'!\nclose\n\t\n\tstream close! !\n\n!ImageReadWriter methodsFor: 'stream access'!\ncontents\n\n\t^stream contents! !\n\n!ImageReadWriter methodsFor: 'stream access'!\ncr\n\n\t^stream nextPut: Character cr asInteger! !\n\n!ImageReadWriter methodsFor: 'stream access'!\nlf\n\t\"PPM and PBM are used LF as CR.\"\n\n\t^stream nextPut: Character lf asInteger! !\n\n!ImageReadWriter methodsFor: 'stream access'!\nnext\n\n\t^stream next! !\n\n!ImageReadWriter methodsFor: 'stream access'!\nnext: size\n\n\t^stream next: size! !\n\n!ImageReadWriter methodsFor: 'stream access'!\nnextLong\n\t\"Read a 32-bit quantity from the input stream.\"\n\n\t^(stream next bitShift: 24) + (stream next bitShift: 16) +\n\t\t(stream next bitShift: 8) + stream next! !\n\n!ImageReadWriter methodsFor: 'stream access'!\nnextLongPut: a32BitW\n\t\"Write out a 32-bit integer as 32 bits.\"\n\n\tstream nextPut: ((a32BitW bitShift: -24) bitAnd: 16rFF).\n\tstream nextPut: ((a32BitW bitShift: -16) bitAnd: 16rFF).\n\tstream nextPut: ((a32BitW bitShift: -8) bitAnd: 16rFF).\n\tstream nextPut: (a32BitW bitAnd: 16rFF).\n\t^a32BitW! !\n\n!ImageReadWriter methodsFor: 'stream access'!\nnextPut: aByte\n\n\t^stream nextPut: aByte! !\n\n!ImageReadWriter methodsFor: 'stream access'!\nnextPutAll: aByteArray\n\n\t^stream nextPutAll: aByteArray! !\n\n!ImageReadWriter methodsFor: 'stream access'!\nnextWord\n\t\"Read a 16-bit quantity from the input stream.\"\n\n\t^(stream next bitShift: 8) + stream next! !\n\n!ImageReadWriter methodsFor: 'stream access'!\nnextWordPut: a16BitW\n\t\"Write out a 16-bit integer as 16 bits.\"\n\n\tstream nextPut: ((a16BitW bitShift: -8) bitAnd: 16rFF).\n\tstream nextPut: (a16BitW bitAnd: 16rFF).\n\t^a16BitW! !\n\n!ImageReadWriter methodsFor: 'stream access' stamp: 'tao 10/23/97 18:00'!\npeekFor: aValue\n\n\t^stream peekFor: aValue! !\n\n!ImageReadWriter methodsFor: 'stream access'!\nposition\n\n\t^stream position! !\n\n!ImageReadWriter methodsFor: 'stream access'!\nposition: anInteger\n\n\t^stream position: anInteger! !\n\n!ImageReadWriter methodsFor: 'stream access'!\nsize\n\n\t^stream size! !\n\n!ImageReadWriter methodsFor: 'stream access'!\nskip: anInteger\n\n\t^stream skip: anInteger! !\n\n!ImageReadWriter methodsFor: 'stream access'!\nspace\n\n\t^stream nextPut: Character space asInteger! !\n\n!ImageReadWriter methodsFor: 'stream access'!\ntab\n\n\t^stream nextPut: Character tab asInteger! !\n\n!ImageReadWriter methodsFor: 'private'!\nchangePadOfBits: bits width: width height: height depth: depth from: oldPad\nto: newPad\n\t\"Change padding size of bits.\"\n\n\t| srcRowByteSize dstRowByteSize newBits srcRowBase rowEndOffset |\n\t(#(8 16 32) includes: oldPad)\n\t\tifFalse: [^self error: 'Invalid pad: ', oldPad printString].\n\t(#(8 16 32) includes: newPad)\n\t\tifFalse: [^self error: 'Invalid pad: ', newPad printString].\n\tsrcRowByteSize _ width * depth + oldPad - 1 // oldPad * (oldPad / 8).\n\tsrcRowByteSize * height = bits size\n\t\tifFalse: [^self error: 'Incorrect bitmap array size.'].\n\tdstRowByteSize _ width * depth + newPad - 1 // newPad * (newPad / 8).\n\tnewBits _ ByteArray new: dstRowByteSize * height.\n\tsrcRowBase _ 1.\n\trowEndOffset _ dstRowByteSize - 1.\n\t1 to: newBits size by: dstRowByteSize do:\n\t\t[:dstRowBase |\n\t\tnewBits replaceFrom: dstRowBase\n\t\t\tto: dstRowBase + rowEndOffset\n\t\t\twith: bits\n\t\t\tstartingAt: srcRowBase.\n\t\tsrcRowBase _ srcRowBase + srcRowByteSize].\n\t^newBits! !\n\n!ImageReadWriter methodsFor: 'private'!\nhasMagicNumber: aByteArray\n\t| position |\n\tposition _ stream position.\n\t((stream size - position) >= aByteArray size and:\n\t[(stream next: aByteArray size)  = aByteArray])\n\t\tifTrue: [^true].\n\tstream position: position.\n\t^false! !\n\n!ImageReadWriter methodsFor: 'private' stamp: 'sd 1/30/2004 15:18'!\non: aStream\n\t(stream _ aStream) reset.\n\tstream binary.\n\t\"Note that 'reset' makes a file be text.  Must do this after.\"! !\n\n!ImageReadWriter methodsFor: 'private'!\nunpackBits: bits depthTo8From: depth with: width height: height pad: pad\n\t\"Unpack bits of depth 1, 2, or 4 image to it of depth 8 image.\"\n\n\t| bitMask pixelInByte bitsWidth upBitsWidth stopWidth\n\t trailingSize upBits bitIndex upBitIndex val |\n\t(#(1 2 4) includes: depth)\n\t\tifFalse: [^self error: 'depth must be 1, 2, or 4'].\n\t(#(8 16 32) includes: pad)\n\t\tifFalse: [^self error: 'pad must be 8, 16, or 32'].\n\tbitMask _ (1 bitShift: depth) - 1.\n\tpixelInByte _ 8 / depth.\n\tbitsWidth _ width * depth + pad - 1 // pad * (pad / 8).\n\tupBitsWidth _ width * 8 + pad - 1 // pad * (pad / 8).\n\tstopWidth _ width * depth + 7 // 8.\n\ttrailingSize _ width - (stopWidth - 1 * pixelInByte).\n\tupBits _ ByteArray new: upBitsWidth * height.\n\t1 to: height do: [:i |\n\t\tbitIndex _ i - 1 * bitsWidth.\n\t\tupBitIndex _ i - 1 * upBitsWidth.\n\t\t1 to: stopWidth - 1 do: [:j |\n\t\t\tval _ bits at: (bitIndex _ bitIndex + 1).\n\t\t\tupBitIndex _ upBitIndex + pixelInByte.\n\t\t\t1 to: pixelInByte do: [:k |\n\t\t\t\tupBits at: (upBitIndex - k + 1) put: (val bitAnd: bitMask).\n\t\t\t\tval _ val bitShift: depth negated]].\n\t\tval _ (bits at: (bitIndex _ bitIndex + 1))\n\t\t\t\tbitShift: depth negated * (pixelInByte - trailingSize).\n\t\tupBitIndex _ upBitIndex + trailingSize.\n\t\t1 to: trailingSize do: [:k |\n\t\t\tupBits at: (upBitIndex - k + 1) put: (val bitAnd: bitMask).\n\t\t\tval _ val bitShift: depth negated]].\n\t^ upBits\n! !\n\n!ImageReadWriter methodsFor: 'testing' stamp: 'tao 10/27/97 09:26'!\nunderstandsImageFormat\n\t\"Test to see if the image stream format is understood by this decoder.\n\tThis should be implemented in each subclass of ImageReadWriter so that\n\ta proper decoder can be selected without ImageReadWriter having to know\n\tabout all possible image file types.\"\n\n\t^ false! !\n\n!ImageReadWriter commentStamp: '<historical>' prior: 0!\nCopyright (c) Kazuki Yasumatsu, 1995. All rights reserved.\n\nI am an abstract class to provide for encoding and/or decoding an image on a stream.\n\nInstance Variables:\n\tstream\t\t<ReadStream | WriteStream>\tstream for image storages\n\nClass Variables:\n\tImageNotStoredSignal\t\t<Signal>\timage not stored error signal\n\tMagicNumberErrorSignal\t\t<Signal>\tmagic number error signal\n\nSubclasses must implement the following messages:\n\taccessing\n\t\tnextImage\n\t\tnextPutImage:\n\ttesting\n\t\tcanUnderstand         (added tao 10/26/97)!\n!ImageReadWriter class methodsFor: 'instance creation'!\non: aStream\n\t\"Answer an instance of the receiver for encoding and/or decoding images on the given.\"\n\n\t^ self new on: aStream\n! !\n\n!ImageReadWriter class methodsFor: 'image reading/writing' stamp: 'nk 7/16/2003 17:59'!\nallTypicalFileExtensions\n\t\"Answer a collection of file extensions (lowercase) which files that my subclasses can read might commonly have\"\n\t\"ImageReadWriter allTypicalFileExtensions\"\n\t| extensions |\n\textensions _ Set new.\n\tself allSubclassesDo: [ :cls | extensions addAll: cls typicalFileExtensions ].\n\t^extensions! !\n\n!ImageReadWriter class methodsFor: 'image reading/writing' stamp: 'ls 9/15/1998 19:08'!\nformFromFileNamed: fileName\n\t\"Answer a ColorForm stored on the file with the given name.\"\n\t| stream |\n\tstream _ FileStream readOnlyFileNamed: fileName.\n\t^self formFromStream: stream! !\n\n!ImageReadWriter class methodsFor: 'image reading/writing' stamp: 'tk 5/7/1998 17:35'!\nformFromServerFile: fileName\n\t\"Answer a ColorForm stored on the file with the given name.  Meant to be called from during the getting of updates from the server.  That assures that (Utilities serverUrls) returns the right group of servers.\"\n\n\t| form urls doc |\n\turls _ Utilities serverUrls collect:\n\t\t[:url | url, fileName].  \" fileName starts with: 'updates/'  \"\n\turls do: [:aURL |\n\t\t(fileName findTokens: '.') last asLowercase = 'gif' ifTrue: [\n\t\t\tform _ HTTPSocket httpGif: aURL.\n\t\t\tform = (ColorForm extent: 20@20 depth: 8) \n\t\t\t\tifTrue: [self inform: 'The file ',aURL,' is ill formed.'].\n\t\t\t^ form].\n\t\t(fileName findTokens: '.') last asLowercase = 'bmp' ifTrue: [\n\t\t\tdoc _ HTTPSocket httpGet: aURL accept: 'image/bmp'.\n\t\t\tform _ Form fromBMPFile: doc.\n\t\t\tdoc close.\n\t\t\tform ifNil: [self inform: 'The file ',aURL,' is ill formed.'. ^ Form new]\n\t\t\t\tifNotNil: [^ form]].\n\t\tself inform: 'File ', fileName, 'does not end with .gif or .bmp'].\n\tself inform: 'That file not found on any server we know'.! !\n\n!ImageReadWriter class methodsFor: 'image reading/writing' stamp: 'sd 1/30/2004 15:18'!\nformFromStream: aBinaryStream\n\t\"Answer a ColorForm stored on the given stream.  closes the stream\"\n\t| reader readerClass form  |\n\n\treaderClass _ self withAllSubclasses\n\t\tdetect: [:subclass | subclass understandsImageFormat: aBinaryStream]\n\t\tifNone: [\n\t\t\taBinaryStream close.\n\t\t\t^self error: 'image format not recognized'].\n\treader _ readerClass new on: aBinaryStream reset.\n\tCursor read showWhile: [\n\t\tform _ reader nextImage.\n\t\treader close].\n\t^ form\n! !\n\n!ImageReadWriter class methodsFor: 'image reading/writing'!\nputForm: aForm onFileNamed: fileName\n\t\"Store the given form on a file of the given name.\"\n\n\t| writer |\n\twriter _ self on: (FileStream newFileNamed: fileName) binary.\n\tCursor write showWhile: [writer nextPutImage: aForm].\n\twriter close.\n! !\n\n!ImageReadWriter class methodsFor: 'image reading/writing' stamp: 'tk\n9/13/97 16:13'!\nputForm: aForm onStream: aWriteStream\n\t\"Store the given form on a file of the given name.\"\n\n\t| writer |\n\twriter _ self on: aWriteStream.\n\tCursor write showWhile: [writer nextPutImage: aForm].\n\twriter close.\n! !\n\n!ImageReadWriter class methodsFor: 'image reading/writing' stamp: 'nk 7/16/2003 17:55'!\ntypicalFileExtensions\n\t\"Answer a collection of file extensions (lowercase) which files that I can read might commonly have\"\n\t^#()! !\n\n!ImageReadWriter class methodsFor: 'image reading/writing' stamp: 'ar 3/1/2006 22:59'!\nunderstandsImageFormat: aStream \n\t^[(self new on: aStream) understandsImageFormat] on: Error do:[:ex| ex return: false]! !\n\n!InfiniteForm methodsFor: 'accessing' stamp: 'ssa 8/28/2009 11:40'!\ndepth\n\t^patternForm depth! !\n\n!InfiniteForm methodsFor: 'as yet unclassified' stamp: 'ssa 8/28/2009 11:39'!\nhasNonStandardPalette\n\n\t^patternForm hasNonStandardPalette! !\n\n!InputSensor methodsFor: 'mouse' stamp: 'ssa 10/27/2008 20:37'!\nwaitClick\n\t\"Wait for the user to press any mouse button and release it, then answer with the \n\tcurrent location of the cursor.\"\n\n\t| pt |\n\tpt _ self waitButton.\n\tself waitNoButton.\n\t^pt! !\n\n!InputSensor methodsFor: 'user interrupts' stamp: 'sm 2/24/2011 16:44'!\ninstallInterruptWatcher\n\t\"Initialize the interrupt watcher process. Terminate the old process if any.\"\n\t\"Sensor installInterruptWatcher\"\n\n\tInterruptWatcherProcess ifNotNil: [InterruptWatcherProcess terminate].\n\tInterruptSemaphore _ Semaphore new.\n\tInterruptWatcherProcess _ [self userInterruptWatcher] forkAt: Processor lowIOPriority.\n\tInterruptWatcherProcess name: 'InterruptWatcher'.\n\tself primInterruptSemaphore: InterruptSemaphore.\n! !\n\n!Inspector methodsFor: 'accessing' stamp: 'ssa 8/26/2009 10:43'!\nselectionIndex: anObject\n\t\"Set the value of selectionIndex\"\n\n\tselectionIndex _ anObject! !\n\n!Inspector methodsFor: 'accessing' stamp: 'ssa 8/26/2009 10:43'!\nselectionUpdateTime\n\t\"Answer the value of selectionUpdateTime\"\n\n\tselectionUpdateTime isNil ifTrue:[self selectionUpdateTime: nil].\n\t^ selectionUpdateTime! !\n\n!Inspector methodsFor: 'accessing' stamp: 'ssa 8/26/2009 10:43'!\nselectionUpdateTime: anObject\n\t\"Set the value of selectionUpdateTime\"\n\n\tselectionUpdateTime _ anObject! !\n\n!Inspector methodsFor: 'accessing' stamp: 'ssa 8/26/2009 10:43'!\ntimeOfLastListUpdate: anObject\n\t\"Set the value of timeOfLastListUpdate\"\n\n\ttimeOfLastListUpdate _ anObject! !\n\n!Inspector methodsFor: 'selecting' stamp: 'tk 4/10/1998 17:57'!\nselection\n\t\"The receiver has a list of variables of its inspected object.\n\tOne of these is selected. Answer the value of the selected variable.\"\n\t| basicIndex |\n\tselectionIndex = 0 ifTrue: [^ ''].\n\tselectionIndex = 1 ifTrue: [^ object].\n\tselectionIndex = 2 ifTrue: [^ object longPrintString].\n\t(selectionIndex - 2) <= object class instSize\n\t\tifTrue: [^ object instVarAt: selectionIndex - 2].\n\tbasicIndex _ selectionIndex - 2 - object class instSize.\n\t(object basicSize <= (self i1 + self i2)  or: [basicIndex <= self i1])\n\t\tifTrue: [^ object basicAt: basicIndex]\n\t\tifFalse: [^ object basicAt: object basicSize - (self i1 + self i2) + basicIndex]! !\n\n!Inspector methodsFor: 'selecting' stamp: 'ads 1/24/2011 13:02'!\nselectionPrintString\n\t| text nm |\n\tselectionUpdateTime _ [text _ [(RVMPrimitivesNeededForBootstrapping printPrefixFor: self selection),(self selection printString)]\n\t\ton: Error do: \n\t\t[nm _ self selectionIndex < 3\n\t\t\t\t\tifTrue: ['self']\n\t\t\t\t\tifFalse: [self selectedSlotName].\n\t\ttext _ ('<error in printString: evaluate \"' , nm , ' printString\" to debug>') asText.\n\t\ttext\n\t\t\taddAttribute: TextColor red\n\t\t\tfrom: 1\n\t\t\tto: text size.\n\t\ttext]] timeToRun.\n\t^ text! !\n\n!Inspector methodsFor: 'menu commands' stamp: 'ssa 1/6/2010 20:21'!\nexploreSelection\n\t\"Open an explorer on the receiver's model's currently selected object.\"\n\n\tself selectionIndex = 0 ifTrue: [^ self changed: #flash].\n\t^ self selection explore! !\n\n!Inspector methodsFor: 'menu commands' stamp: 'ssa 7/7/2010 13:04'!\nfieldListMenu: aMenu\n\t\"Arm the supplied menu with items for the field-list of the receiver\"\n\n\n\n\taMenu addList: #(\n\t\t('inspect (i)'\t\t\t\t\t\tinspectSelection)\n\t\t('explore (e)'\t\t\t\t\t\texploreSelection)\n\t\t('locate'\t\t\t\t\t\tlocateSelection)).\n\n\tself addCollectionItemsTo: aMenu.\n\n\taMenu addList: #(\n\t\t-\n\t\t('method refs to this inst var'\t\treferencesToSelection)\n\t\t('methods storing into this inst var'\tdefsOfSelection)\n\t\t('objects pointing to this value'\t\tobjectReferencesToSelection)\n\t\t('chase pointers'\t\t\t\t\tchasePointers)\n\t\t-\n\t\t('browse full (b)'\t\t\t\t\tbrowseMethodFull)\n\t\t('browse class'\t\t\t\t\t\tbrowseClass)\n\t\t('browse hierarchy'\t\t\t\t\tclassHierarchy)\n\t\t('browse protocol (p)'\t\t\t\tbrowseFullProtocol)\n\t\t-\n\t\t('inst var refs...'\t\t\t\t\tbrowseInstVarRefs)\n\t\t('inst var defs...'\t\t\t\t\tbrowseInstVarDefs)\n\t\t('class var refs...'\t\t\t\t\tclassVarRefs)\n\t\t('class variables'\t\t\t\t\tbrowseClassVariables)\n\t\t('class refs (N)'\t\t\t\t\t\tbrowseClassRefs)\n\t\t-\n\t\t('copy name (c)'\t\t\t\t\tcopyName)\t\t\n\t\t('basic inspect'\t\t\t\t\t\tinspectBasic)).\n\n\n\t^ aMenu\n\n\n\"\t\t\t-\n\t\t\t('alias for this value'\t\t\taliasForValue)\n\t\t\t('watcher for this slot'\t\t\twatcherForSlot)\"\n\n! !\n\n!Inspector methodsFor: 'menu commands' stamp: 'ssa 7/7/2010 13:04'!\ninspectorKey: aChar from: view\n\t\"Respond to a Command key issued while the cursor is over my field list\"\n\n\taChar == $i ifTrue: [^ self selection inspect].\n\taChar == $e ifTrue: [^ self selection explore].\n\taChar == $b ifTrue:\t[^ self browseMethodFull].\n\taChar == $h ifTrue:\t[^ self classHierarchy].\n\taChar == $c ifTrue: [^ self copyName].\n\taChar == $p ifTrue: [^ self browseFullProtocol].\n\taChar == $N ifTrue: [^ self browseClassRefs].\n\t\"aChar == $t ifTrue: [^ self tearOffTile].\"\n\taChar == $v ifTrue: [^ self viewerForValue].\n\n\t^ self arrowKey: aChar from: view! !\n\n!Inspector methodsFor: 'menu commands' stamp: 'ssa 11/16/2008 01:53'!\nlocateSelection\n\t\"Open a locator on the receiver's model's currently selected object.\"\n\n\tself selectionIndex = 0 ifTrue: [^ self changed: #flash].\n\t^ self selection locate! !\n\n!Inspector class methodsFor: 'instance creation' stamp: 'ssa 8/26/2009 11:23'!\nnewFrom: anInspector\n\t\"Use anInspector's contents for that of a new instance of me\"\n\t\n\t| in |\n\tin _ self new.\n\tin contents: anInspector contents.\n\tin myDependents: anInspector myDependents.\n\tin dependents do:[:each| (each respondsTo:#model:) ifTrue:[each model: in]].\n\tin selectionIndex: anInspector selectionIndex.\n\tin timeOfLastListUpdate: anInspector timeOfLastListUpdate.\n\tin selectionUpdateTime: anInspector selectionUpdateTime.\n\tin object: anInspector object.\n\t^in! !\n\n!Inspector class methodsFor: 'instance creation' stamp: 'ssa 3/24/2010 14:43'!\nopenOn: anObject withEvalPane: withEval withLabel: label valueViewClass: valueViewClass\n\t| topView inspector listView valueView evalView v |\n\tinspector _ self inspect: anObject.\n\ttopView _ StandardSystemView new model: inspector.\n\ttopView borderWidth: 1.\n\n\tlistView _ PluggableListView on: inspector\n\t\tlist: #fieldList\n\t\tselected: #selectionIndex\n\t\tchangeSelected: #toggleIndex:\n\t\tmenu: #fieldListMenu:\n\t\tkeystroke: #inspectorKey:from:.\n\t(inspector isMemberOf: DictionaryInspector)\n\t\tifTrue: [listView menu: #dictionaryMenu:].\n\tlistView window: (0 @ 0 extent: 40 @ 40).\n\ttopView addSubView: listView.\n\n\tvalueView _ valueViewClass new.\n\t\t\"PluggableTextView or PluggableFormView\"\n\t(valueView respondsTo: #getText) ifTrue: [\n\t\tvalueView on: inspector \n\t\t\ttext: #contents accept: #accept:\n\t\t\treadSelection: #contentsSelection menu: #codePaneMenu:shifted:].\n\t(valueViewClass inheritsFrom: FormView) ifTrue: [\n\t\tvalueView model: inspector].\n\t v_ \"MSWScrollBarView on:\" valueView.\n\tv window: (0 @ 0 extent: 75 @ 40).\n\ttopView addSubView: v toRightOf: listView.\n\t\n\twithEval ifTrue:\n\t\t[evalView _ PluggableTextView new on: inspector \n\t\t\ttext: #trash accept: #trash:\n\t\t\treadSelection: #contentsSelection menu: #codePaneMenu:shifted:.\n\t\tevalView window: (0 @ 0 extent: 115 @ 20).\n\t\tevalView askBeforeDiscardingEdits: false.\n\t\ttopView addSubView: evalView below: listView].\n\ttopView label: label.\n\ttopView minimumSize: 180 @ 120.\n\ttopView setUpdatablePanesFrom: #(fieldList).\n\ttopView controller open! !\n\n!InstructionStream methodsFor: 'scanning' stamp: 'ssa 5/11/2010 16:14'!\nskipBackBeforeJump\n\t\"Assuming that the receiver is positioned jast after a jump, skip back one or two bytes, depending on the size of the previous jump instruction.\"\n\t| strm short |\n\tstrm _ InstructionStream on: self method.\n\t(strm scanFor: [:byte |\n\t\t((short _ byte between: 152 and: 159) or: [byte between: 168 and: 175])\n\t\t\tand: [strm pc = (short ifTrue: [pc-1] ifFalse: [pc-2])]]) ifFalse: [self error: 'Where''s the jump??'. self jump: 0].\n\tself jump: (short ifTrue: [-1] ifFalse: [-2]).\n! !\n\n!Integer methodsFor: 'truncation and round off' stamp: 'ssa 11/27/2009 16:44'!\natRandom\n\t\"Answer a random integer from 1 to self.  This implementation uses a\n\tshared generator. Heavy users should their own implementation or use\n\tInterval>atRandom: directly.\"\n\n\tself = 0 ifTrue: [ ^0 ].\n\tself < 0 ifTrue: [ ^self negated atRandom negated ].\n\t^self atRandom: Collection randomForPicking ! !\n\n!Integer methodsFor: 'printing' stamp: 'ar 7/18/2001 22:09'!\nasStringWithCommasSigned\n\t\"123456789 asStringWithCommasSigned\"\n\t\"-123456789 asStringWithCommasSigned\"\n\t| digits |\n\tdigits _ self abs printString.\n\t^ String streamContents:\n\t\t[:strm | \n\t\tself sign = -1 ifTrue: [strm nextPut: $-] ifFalse:[strm nextPut: $+].\n\t\t1 to: digits size do: \n\t\t\t[:i | strm nextPut: (digits at: i).\n\t\t\t(i < digits size and: [(i - digits size) \\\\ 3 = 0])\n\t\t\t\tifTrue: [strm nextPut: $,]]]! !\n\n!Integer methodsFor: 'printing' stamp: 'ssa 8/26/2009 12:23'!\nprinteth\n\t\"1 printeth '1st'\"\n\t\"2 printeth '2nd'\"\n\t\"3 printeth '3rd'\"\n\t\"4 printeth '4th'\"\n\t\"5 printeth '5th'\"\n\t\"1234 printeth '1234th'\"\n\t\"121 printeth '121st'\"\n\t| str suffix |\n\tstr _ self printString.\n\tsuffix _ (#('st' 'nd' 'rd' 'th')at: ((str last asNumber max:1) min:4)).\n\t^str,suffix! !\n\n!Integer methodsFor: 'explorer' stamp: 'ssa 7/7/2010 21:07'!\nhasContentsInExplorer\n\n\t^false! !\n\n!Integer methodsFor: '*RVM-benchmarks' stamp: 'dmu 1/1/1970 00:40'!\ntinyRVMBenchmarks\n\t\"Report the results of running the two tiny Squeak benchmarks.\n\tar 9/10/1999: Adjusted to run at least 1 sec to get more stable results\"\n\t\"0 tinyBenchmarks\"\n\t\"On a 292 MHz G3 Mac: 22727272 bytecodes/sec; 984169 sends/sec\"\n\t\"On a 400 MHz PII/Win98:  18028169 bytecodes/sec; 1081272 sends/sec\"\n\t| t1 t2 r n1 n2 s1 s2 totalYields |\n\tn1 _ 1.\n\ts1 _ RVMMulticoreSample capture.\n\t[t1 _ Time millisecondsToRun: [n1 benchmark].\n\tt1 < 1000] whileTrue:[n1 _ n1 * 2]. \"Note: #benchmark's runtime is about O(n)\"\n\n\tn2 _ 28.\n\t[t2 _ Time millisecondsToRun: [r _ n2 benchFib].\n\tt2 < 1000] whileTrue:[n2 _ n2 + 1]. \n\t\"Note: #benchFib's runtime is about O(k^n),\n\t\twhere k is the golden number = (1 + 5 sqrt) / 2 = 1.618....\"\n     s2 _ RVMMulticoreSample capture.\n     totalYields _ s2 totalYields.\n\t^ ((n1 * 500000 * 1000) // t1) printString, ' bytecodes/sec; ',\n\t  ((r * 1000) // t2) printString, ' sends/sec; ',\n\t   totalYields printString, ' total yields; ',\n\t   (t1 + t2) printString, ' total ms'! !\n\n!Integer methodsFor: '*Ly-Explorer' stamp: 'laza 3/17/2005 13:37'!\nexplorerContents\n\t^{\n\t\t'hexadecimal' -> 16.\n\t\t'octal' -> 8.\n\t\t'binary' -> 2\n\t} collect: [:each |\n\t\tObjectExplorerWrapper with: each key translated name: (self printStringBase: each value) model: self]! !\n\n!JPEGColorComponent methodsFor: 'accessing' stamp: 'tao 10/23/97 12:21'!\nacTableIndex\n\n\t^acTableIndex! !\n\n!JPEGColorComponent methodsFor: 'accessing' stamp: 'tao 10/23/97 12:20'!\nacTableIndex: anInteger\n\n\tacTableIndex _ anInteger! !\n\n!JPEGColorComponent methodsFor: 'accessing' stamp: 'tao 10/23/97 12:21'!\ndcTableIndex\n\n\t^dcTableIndex! !\n\n!JPEGColorComponent methodsFor: 'accessing' stamp: 'tao 10/23/97 12:20'!\ndcTableIndex: anInteger\n\n\tdcTableIndex _ anInteger! !\n\n!JPEGColorComponent methodsFor: 'accessing' stamp: 'tao 10/23/97 12:11'!\nheightInBlocks\n\n\t^heightInBlocks! !\n\n!JPEGColorComponent methodsFor: 'accessing' stamp: 'tao 10/23/97 12:10'!\nheightInBlocks: anInteger\n\n\theightInBlocks _ anInteger! !\n\n!JPEGColorComponent methodsFor: 'accessing' stamp: 'tao 10/23/97 12:09'!\nid\n\n\t^id! !\n\n!JPEGColorComponent methodsFor: 'accessing' stamp: 'tao 10/23/97 12:09'!\nid: anObject\n\n\tid _ anObject! !\n\n!JPEGColorComponent methodsFor: 'accessing' stamp: 'ar 3/4/2001 01:19'!\nmcuWidth: mw mcuHeight: mh dctSize: ds\n\n\tmcuWidth _ mw.\n\tmcuHeight _ mh.\n\tdctSize _ ds.\n\thSampleFactor _ mcuWidth // widthInBlocks.\n\tvSampleFactor _ mcuHeight // heightInBlocks! !\n\n!JPEGColorComponent methodsFor: 'accessing' stamp: 'tao 10/23/97 12:15'!\npriorDCValue: aNumber\n\n\tpriorDCValue _ aNumber! !\n\n!JPEGColorComponent methodsFor: 'accessing' stamp: 'tao 10/23/97 12:43'!\nqTableIndex\n\t^qTableIndex! !\n\n!JPEGColorComponent methodsFor: 'accessing' stamp: 'tao 10/23/97 12:11'!\nqTableIndex: anInteger\n\n\tqTableIndex _ anInteger! !\n\n!JPEGColorComponent methodsFor: 'accessing' stamp: 'tao 10/23/97 12:18'!\ntotalMcuBlocks\n\n\t^ heightInBlocks * widthInBlocks! !\n\n!JPEGColorComponent methodsFor: 'accessing' stamp: 'tao 10/23/97 12:16'!\nupdateDCValue: aNumber\n\n\tpriorDCValue _ priorDCValue + aNumber.\n\t^priorDCValue! !\n\n!JPEGColorComponent methodsFor: 'accessing' stamp: 'tao 10/23/97 12:11'!\nwidthInBlocks\n\n\t^widthInBlocks! !\n\n!JPEGColorComponent methodsFor: 'accessing' stamp: 'tao 10/23/97 12:10'!\nwidthInBlocks: anInteger\n\n\twidthInBlocks _ anInteger! !\n\n!JPEGColorComponent methodsFor: 'sample streaming' stamp: 'tao 10/23/97 12:24'!\ninitializeSampleStreamBlocks: aCollection\n\n\tmcuBlocks _ aCollection.\n\tself resetSampleStream! !\n\n!JPEGColorComponent methodsFor: 'sample streaming' stamp: 'ar 3/4/2001 22:16'!\nnextSample\n\n\t| dx dy blockIndex sampleIndex sample |\n\tdx _ currentX // hSampleFactor.\n\tdy _ currentY // vSampleFactor.\n\tblockIndex _ dy // dctSize * widthInBlocks + (dx // dctSize) + 1.\n\tsampleIndex _ dy \\\\ dctSize * dctSize + (dx \\\\ dctSize) + 1.\n\tsample _ (mcuBlocks at: blockIndex) at: sampleIndex.\n\tcurrentX _ currentX + 1.\n\tcurrentX < (mcuWidth * dctSize)\n\t\tifFalse:\n\t\t\t[currentX _ 0.\n\t\t\tcurrentY _ currentY + 1].\n\t^ sample! !\n\n!JPEGColorComponent methodsFor: 'sample streaming' stamp: 'tao 10/23/97 12:24'!\nresetSampleStream\n\n\tcurrentX _ 0.\n\tcurrentY _ 0! !\n\n!JPEGColorComponent commentStamp: '<historical>' prior: 0!\nI represent a single component of color in JPEG YCbCr color space.  I can accept a list of blocks in my component from the current MCU, then stream the samples from this block for use in color conversion.  I also store the running DC sample value for my component, used by the Huffman decoder.\n\nThe following layout is fixed for the JPEG primitives to work:\n\tcurrentX \t\t<SmallInteger>\n\tcurrentY \t\t<SmallInteger>\n\thSampleFactor \t<SmallInteger>\n\tvSampleFactor \t<SmallInteger>\n\tmcuBlocks \t\t<Array of: <IntegerArray of: DCTSize2 * Integer>>\n\twidthInBlocks \t<SmallInteger>\n\theightInBlocks \t<SmallInteger>\n\tdctSize \t\t\t<SmallInteger>\n\tmcuWidth \t\t<SmallInteger>\n\tmcuHeight \t\t<SmallInteger>\n\tpriorDCValue \t<SmallInteger>\n!\n!JPEGHuffmanTable methodsFor: 'accessing' stamp: 'tao 10/20/97 14:27'!\nbits: anObject\n\n\tbits _ anObject! !\n\n!JPEGHuffmanTable methodsFor: 'accessing' stamp: 'tao 10/21/97 23:31'!\nlookaheadBits\n\t^lookaheadBits! !\n\n!JPEGHuffmanTable methodsFor: 'accessing' stamp: 'tao 10/21/97 23:38'!\nlookaheadSymbol\n\t^lookaheadSymbol! !\n\n!JPEGHuffmanTable methodsFor: 'accessing' stamp: 'tao 10/21/97 23:59'!\nmaxcode\n\t^maxcode! !\n\n!JPEGHuffmanTable methodsFor: 'accessing' stamp: 'tao 10/20/97 14:27'!\nvalues: anObject\n\n\tvalues _ anObject! !\n\n!JPEGHuffmanTable methodsFor: 'computation' stamp: 'tao 10/24/97 12:28'!\nmakeDerivedTables\n\n\t| huffSize huffCode code si index lookbits |\n\tmincode _ Array new: 16.\n\tmaxcode _ Array new: 17.\n\tvalptr _ Array new: 17.\n\thuffSize _ OrderedCollection new.\n\t1 to: 16 do: [:l | 1 to: (bits at: l) do: [:i | huffSize add: l]].\n\thuffSize add: 0.\n\tcode _ 0.\n\thuffCode _ Array new: huffSize size.\n\tsi _ huffSize at: 1.\n\tindex _ 1.\n\t[(huffSize at: index) ~= 0] whileTrue:\n\t\t[[(huffSize at: index) = si] whileTrue:\n\t\t\t[huffCode at: index put: code.\n\t\t\tindex _ index + 1.\n\t\t\tcode _ code + 1].\n\t\tcode _ code << 1.\n\t\tsi _ si + 1].\n\n\tindex _ 1.\n\t1 to: 16 do:\n\t\t[:l |\n\t\t(bits at: l) ~= 0\n\t\t\tifTrue:\n\t\t\t\t[valptr at: l put: index.\n\t\t\t\tmincode at: l put: (huffCode at: index).\n\t\t\t\tindex _ index + (bits at: l).\n\t\t\t\tmaxcode at: l put: (huffCode at: index-1)]\n\t\t\tifFalse:\n\t\t\t\t[maxcode at: l put: -1]].\n\tmaxcode at: 17 put: 16rFFFFF.\n\n\tlookaheadBits _ (Array new: 1 << Lookahead) atAllPut: 0.\n\tlookaheadSymbol _ Array new: 1 << Lookahead.\n\tindex _ 1.\n\t1 to: Lookahead do:\n\t\t[:l |\n\t\t1 to: (bits at: l) do:\n\t\t\t[:i |\n\t\t\tlookbits _ (huffCode at: index) << (Lookahead - l) + 1.\n\t\t\t(1 << (Lookahead - l) to: 1 by: -1) do:\n\t\t\t\t[:ctr |\n\t\t\t\tlookaheadBits at: lookbits put: l.\n\t\t\t\tlookaheadSymbol at: lookbits put: (values at: index).\n\t\t\t\tlookbits _ lookbits + 1].\n\t\t\tindex _ index + 1]]! !\n\n!JPEGHuffmanTable methodsFor: 'computation' stamp: 'tao 10/21/97 22:44'!\nvalueForCode: code length: length\n\n\t^ values at: ((valptr at: length) + code - (mincode at: length))! !\n\n!JPEGHuffmanTable commentStamp: '<historical>' prior: 0!\nI represent the table of values used to decode Huffman entropy-encoded bitstreams.  From the JFIF file header entropy values, I build a derived table of codes and values for faster decoding.!\n!JPEGHuffmanTable class methodsFor: 'constants' stamp: 'tao 10/21/97 22:15'!\nlookahead\n\n\t^ Lookahead! !\n\n!JPEGHuffmanTable class methodsFor: 'initialization' stamp: 'tao 10/21/97 11:06'!\ninitialize\n\n\tLookahead _ 8.\n\tBitBufferSize _ 16! !\n\n!JPEGReadStream methodsFor: 'accessing' stamp: 'ar 3/4/2001 20:42'!\nfillBuffer\n\n\t| byte |\n\t[bitsInBuffer <= 16]\n\t\twhileTrue:[\n\t\t\tbyte _ self next.\n\t\t\t(byte = 16rFF and: [(self peekFor: 16r00) not])\n\t\t\t\t\tifTrue:\n\t\t\t\t\t\t[self position: self position - 1.\n\t\t\t\t\t\t^0].\n\t\t\tbitBuffer _ (bitBuffer bitShift: 8) bitOr: byte.\n\t\t\tbitsInBuffer _ bitsInBuffer + 8].\n\t^ bitsInBuffer! !\n\n!JPEGReadStream methodsFor: 'accessing' stamp: 'ar 3/4/2001 18:43'!\ngetBits: requestedBits\n\t| value |\n\trequestedBits > bitsInBuffer ifTrue:[\n\t\tself fillBuffer.\n\t\trequestedBits > bitsInBuffer ifTrue:[\n\t\t\tself error: 'not enough bits available to decode']].\n\tvalue _ bitBuffer bitShift: (requestedBits - bitsInBuffer).\n\tbitBuffer _ bitBuffer bitAnd: (1 bitShift: (bitsInBuffer - requestedBits)) -1.\n\tbitsInBuffer _ bitsInBuffer - requestedBits.\n\t^ value! !\n\n!JPEGReadStream methodsFor: 'accessing' stamp: 'ar 3/6/2001 12:34'!\nnextByte\n\t^self next asInteger! !\n\n!JPEGReadStream methodsFor: 'accessing' stamp: 'ar 3/6/2001 12:35'!\nnextBytes: n\n\t^(self next: n) asByteArray! !\n\n!JPEGReadStream methodsFor: 'accessing' stamp: 'ar 3/4/2001 17:40'!\nreset\n\tsuper reset.\n\tself resetBitBuffer! !\n\n!JPEGReadStream methodsFor: 'accessing' stamp: 'ar 3/4/2001 18:44'!\nresetBitBuffer\n\tbitBuffer _ 0.\n\tbitsInBuffer _ 0.\n! !\n\n!JPEGReadStream methodsFor: 'huffman trees' stamp: 'ar 3/4/2001 21:06'!\nbuildLookupTable: values counts: counts\n\t| min max |\n\tmin _ max _ nil.\n\t1 to: counts size do:[:i|\n\t\t(counts at: i) = 0 ifFalse:[\n\t\t\tmin ifNil:[min _ i-1].\n\t\t\tmax _ i]].\n\t^self\n\t\tcreateHuffmanTables: values \n\t\tcounts: {0},counts \n\t\tfrom: min+1 \n\t\tto: max.! !\n\n!JPEGReadStream methodsFor: 'huffman trees' stamp: 'ar 3/4/2001 18:46'!\ncreateHuffmanTables: values counts: counts from: minBits to: maxBits\n\t\"Create the actual tables\"\n\t| table tableStart tableSize tableEnd \n\tvalueIndex tableStack numValues deltaBits maxEntries\n\tlastTable lastTableStart tableIndex lastTableIndex |\n\n\ttable _ WordArray new: ((4 bitShift: minBits) max: 16).\n\n\t\"Create the first entry - this is a dummy.\n\tIt gives us information about how many bits to fetch initially.\"\n\ttable at: 1 put: (minBits bitShift: 24) + 2. \"First actual table starts at index 2\"\n\n\t\"Create the first table from scratch.\"\n\ttableStart _ 2. \"See above\"\n\ttableSize _ 1 bitShift: minBits.\n\ttableEnd _ tableStart + tableSize.\n\t\"Store the terminal symbols\"\n\tvalueIndex _ (counts at: minBits+1).\n\ttableIndex _ 0.\n\t1 to: valueIndex do:[:i|\n\t\ttable at: tableStart + tableIndex put: (values at: i).\n\t\ttableIndex _ tableIndex + 1].\n\t\"Fill up remaining entries with invalid entries\"\n\ttableStack _ OrderedCollection new: 10. \"Should be more than enough\"\n\ttableStack addLast: \n\t\t(Array \n\t\t\twith: minBits\t\"Number of bits (e.g., depth) for this table\"\n\t\t\twith: tableStart\t\"Start of table\"\n\t\t\twith: tableIndex \"Next index in table\"\n\t\t\twith: minBits\t\"Number of delta bits encoded in table\"\n\t\t\twith: tableSize - valueIndex \"Entries remaining in table\").\n\t\"Go to next value index\"\n\tvalueIndex _ valueIndex + 1.\n\t\"Walk over remaining bit lengths and create new subtables\"\n\tminBits+1 to: maxBits do:[:bits|\n\t\tnumValues _ counts at: bits+1.\n\t\t[numValues > 0] whileTrue:[\"Create a new subtable\"\n\t\t\tlastTable _ tableStack last.\n\t\t\tlastTableStart _ lastTable at: 2.\n\t\t\tlastTableIndex _ lastTable at: 3.\n\t\t\tdeltaBits _ bits - (lastTable at: 1).\n\t\t\t\"Make up a table of deltaBits size\"\n\t\t\ttableSize _ 1 bitShift: deltaBits.\n\t\t\ttableStart _ tableEnd.\n\t\t\ttableEnd _ tableEnd + tableSize.\n\t\t\t[tableEnd > table size ]\n\t\t\t\twhileTrue:[table _ self growHuffmanTable: table].\n\t\t\t\"Connect to last table\"\n\t\t\tself assert:[(table at: lastTableStart + lastTableIndex) = 0].\"Entry must be unused\"\n\t\t\ttable at: lastTableStart + lastTableIndex put: (deltaBits bitShift: 24) + tableStart.\n\t\t\tlastTable at: 3 put: lastTableIndex+1.\n\t\t\tlastTable at: 5 put: (lastTable at: 5) - 1.\n\t\t\tself assert:[(lastTable at: 5) >= 0]. \"Don't exceed tableSize\"\n\t\t\t\"Store terminal values\"\n\t\t\tmaxEntries _ numValues min: tableSize.\n\t\t\ttableIndex _ 0.\n\t\t\t1 to: maxEntries do:[:i|\n\t\t\t\ttable at: tableStart + tableIndex put: (values at: valueIndex).\n\t\t\t\tvalueIndex _ valueIndex + 1.\n\t\t\t\tnumValues _ numValues - 1.\n\t\t\t\ttableIndex _ tableIndex+1].\n\t\t\t\"Check if we have filled up the current table completely\"\n\t\t\tmaxEntries = tableSize ifTrue:[\n\t\t\t\t\"Table has been filled. Back up to the last table with space left.\"\n\t\t\t\t[tableStack isEmpty not and:[(tableStack last at: 5) = 0]]\n\t\t\t\t\t\twhileTrue:[tableStack removeLast].\n\t\t\t] ifFalse:[\n\t\t\t\t\"Table not yet filled. Put it back on the stack.\"\n\t\t\t\ttableStack addLast:\n\t\t\t\t\t(Array\n\t\t\t\t\t\twith: bits\t\t\"Nr. of bits in this table\"\n\t\t\t\t\t\twith: tableStart\t\"Start of table\"\n\t\t\t\t\t\twith: tableIndex \"Index in table\"\n\t\t\t\t\t\twith: deltaBits\t\"delta bits of table\"\n\t\t\t\t\t\twith: tableSize - maxEntries \"Unused entries in table\").\n\t\t\t].\n\t\t].\n\t].\n\t ^table copyFrom: 1 to: tableEnd-1! !\n\n!JPEGReadStream methodsFor: 'huffman trees' stamp: 'ar 3/4/2001 18:44'!\ndecodeValueFrom: table\n\t\"Decode the next value in the receiver using the given huffman table.\"\n\t| bits bitsNeeded tableIndex value |\n\tbitsNeeded _ (table at: 1) bitShift: -24.\t\"Initial bits needed\"\n\ttableIndex _ 2.\t\t\t\t\t\t\t\"First real table\"\n\t[bits _ self getBits: bitsNeeded.\t\t\t\"Get bits\"\n\tvalue _ table at: (tableIndex + bits).\t\t\"Lookup entry in table\"\n\t(value bitAnd: 16r3F000000) = 0] \t\t\t\"Check if it is a non-leaf node\"\n\t\twhileFalse:[\"Fetch sub table\"\n\t\t\ttableIndex _ value bitAnd: 16rFFFF.\t\"Table offset in low 16 bit\"\n\t\t\tbitsNeeded _ (value bitShift: -24) bitAnd: 255. \"Additional bits in high 8 bit\"\n\t\t\tbitsNeeded > MaxBits ifTrue:[^self error:'Invalid huffman table entry']].\n\t^value! !\n\n!JPEGReadStream methodsFor: 'huffman trees' stamp: 'ar 3/4/2001 18:21'!\ngrowHuffmanTable: table\n\t| newTable |\n\tnewTable _ table species new: table size * 2.\n\tnewTable replaceFrom: 1 to: table size with: table startingAt: 1.\n\t^newTable! !\n\n!JPEGReadStream commentStamp: '<historical>' prior: 0!\nEncapsulates huffman encoded access to JPEG data.\n\nThe following layout is fixed for the JPEG primitives to work:\n\n\tcollection\t<ByteArray | String>\n\tposition\t\t<SmallInteger>\n\treadLimit\t<SmallInteger>\n\tbitBuffer\t<SmallInteger>\n\tbitsInBuffer\t<SmallInteger>!\n!JPEGReadStream class methodsFor: 'class initialization' stamp: 'ar 3/4/2001 18:32'!\ninitialize\n\t\"JPEGReadStream initialize\"\n\tMaxBits _ 16.! !\n\n!JPEGReadWriter methodsFor: 'accessing' stamp: 'tao 10/19/97 13:46'!\nhACTable\n\n\thACTable ifNil: [hACTable _ Array new: HuffmanTableSize].\n\t^ hACTable! !\n\n!JPEGReadWriter methodsFor: 'accessing' stamp: 'tao 10/19/97 13:46'!\nhDCTable\n\n\thDCTable ifNil: [hDCTable _ Array new: HuffmanTableSize].\n\t^ hDCTable! !\n\n!JPEGReadWriter methodsFor: 'accessing' stamp: 'tao 10/19/97 08:46'!\nqTable\n\n\tqTable ifNil: [qTable _ Array new: QuantizationTableSize].\n\t^ qTable! !\n\n!JPEGReadWriter methodsFor: 'colorspace conversion' stamp: 'ar 3/4/2001 22:18'!\ncolorConvertFloatYCbCrMCU\n\n\t| ySampleStream crSampleStream cbSampleStream y cb cr red green blue bits |\n\tySampleStream _ currentComponents at: 1.\n\tcbSampleStream _ currentComponents at: 2.\n\tcrSampleStream _ currentComponents at: 3.\n\tySampleStream resetSampleStream.\n\tcbSampleStream resetSampleStream.\n\tcrSampleStream resetSampleStream.\n\tbits _ mcuImageBuffer bits.\n\t1 to: bits size do:\n\t\t[:i |\n\t\ty _ ySampleStream nextSample.\n\t\tcb _ cbSampleStream nextSample - FloatSampleOffset.\n\t\tcr _ crSampleStream nextSample - FloatSampleOffset.\n\t\tred _ self sampleFloatRangeLimit: (y + (1.40200 * cr)).\n\t\tgreen _ self sampleFloatRangeLimit: (y - (0.34414 * cb) - (0.71414 * cr)).\n\t\tblue _ self sampleFloatRangeLimit: (y + (1.77200 * cb)).\n\t\tbits at: i put: 16rFF000000 + (red << 16) + (green << 8) + blue].\n\t! !\n\n!JPEGReadWriter methodsFor: 'colorspace conversion' stamp: 'ar 3/4/2001 22:17'!\ncolorConvertGrayscaleMCU\n\n\t| ySampleStream y bits |\n\tySampleStream _ currentComponents at: 1.\n\tySampleStream resetSampleStream.\n\tbits _ mcuImageBuffer bits.\n\t1 to: bits size do:\n\t\t[:i |\n\t\ty _ (ySampleStream nextSample) + (residuals at: 2).\n\t\ty > MaxSample ifTrue: [y _ MaxSample].\n\t\tresiduals at: 2 put: (y bitAnd: ditherMask).\n\t\ty _ y bitAnd: MaxSample - ditherMask.\n\t\ty < 1 ifTrue: [y _ 1].\n\t\tbits at: i put: 16rFF000000 + (y<<16) + (y<<8) + y].\n\t! !\n\n!JPEGReadWriter methodsFor: 'colorspace conversion' stamp: 'ar 3/4/2001 22:18'!\ncolorConvertIntYCbCrMCU\n\n\t| ySampleStream crSampleStream cbSampleStream y cb cr red green blue bits |\n\tySampleStream _ currentComponents at: 1.\n\tcbSampleStream _ currentComponents at: 2.\n\tcrSampleStream _ currentComponents at: 3.\n\tySampleStream resetSampleStream.\n\tcbSampleStream resetSampleStream.\n\tcrSampleStream resetSampleStream.\n\tbits _ mcuImageBuffer bits.\n\t1 to: bits size do:\n\t\t[:i |\n\t\ty _ ySampleStream nextSample.\n\t\tcb _ cbSampleStream nextSample - SampleOffset.\n\t\tcr _ crSampleStream nextSample - SampleOffset.\n\t\tred _ y + ((FIXn1n40200 * cr) // 65536) + (residuals at: 1).\n\t\tred > MaxSample\n\t\t\tifTrue: [red _ MaxSample]\n\t\t\tifFalse: [red < 0 ifTrue: [red _ 0]].\n\t\tresiduals at: 1 put: (red bitAnd: ditherMask).\n\t\tred _ red bitAnd: MaxSample - ditherMask.\n\t\tred < 1 ifTrue: [red _ 1].\n\t\tgreen _ y - ((FIXn0n34414 * cb) // 65536) -\n\t\t\t((FIXn0n71414 * cr) // 65536) + (residuals at: 2).\n\t\tgreen > MaxSample\n\t\t\tifTrue: [green _ MaxSample]\n\t\t\tifFalse: [green < 0 ifTrue: [green _ 0]].\n\t\tresiduals at: 2 put: (green bitAnd: ditherMask).\n\t\tgreen _ green bitAnd: MaxSample - ditherMask.\n\t\tgreen < 1 ifTrue: [green _ 1].\n\t\tblue _ y + ((FIXn1n77200 * cb) // 65536) + (residuals at: 3).\n\t\tblue > MaxSample\n\t\t\tifTrue: [blue _ MaxSample]\n\t\t\tifFalse: [blue < 0 ifTrue: [blue _ 0]].\n\t\tresiduals at: 3 put: (blue bitAnd: ditherMask).\n\t\tblue _ blue bitAnd: MaxSample - ditherMask.\n\t\tblue < 1 ifTrue: [blue _ 1].\n\t\tbits at: i put: 16rFF000000 + (red bitShift: 16) + (green bitShift: 8) + blue].\n\t! !\n\n!JPEGReadWriter methodsFor: 'colorspace conversion' stamp: 'ar 3/7/2001 01:02'!\ncolorConvertMCU\n\n\t^ currentComponents size = 3\n\t\tifTrue:\n\t\t\t[self useFloatingPoint\n\t\t\t\tifTrue: [self colorConvertFloatYCbCrMCU]\n\t\t\t\tifFalse: [self primColorConvertYCbCrMCU: currentComponents\n\t\t\t\t\t\t\t\tbits: mcuImageBuffer bits\n\t\t\t\t\t\t\t\tresiduals: residuals\n\t\t\t\t\t\t\t\tditherMask: ditherMask.]]\n\t\tifFalse: [self primColorConvertGrayscaleMCU]! !\n\n!JPEGReadWriter methodsFor: 'colorspace conversion' stamp: 'ar 3/4/2001 22:19'!\nprimColorConvertGrayscaleMCU\n\tself primColorConvertGrayscaleMCU: (currentComponents at: 1)\n\t\t\tbits: mcuImageBuffer bits\n\t\t\tresiduals: residuals\n\t\t\tditherMask: ditherMask.! !\n\n!JPEGReadWriter methodsFor: 'colorspace conversion' stamp: 'ar 3/15/2001 18:11'!\nprimColorConvertGrayscaleMCU: componentArray bits: bits residuals: residualArray ditherMask: mask\n\t<primitive: 'primitiveColorConvertGrayscaleMCU' module: 'JPEGReaderPlugin'>\n\t\"JPEGReaderPlugin doPrimitive: #primitiveColorConvertGrayscaleMCU.\"\n\t^self colorConvertGrayscaleMCU! !\n\n!JPEGReadWriter methodsFor: 'colorspace conversion' stamp: 'ar 3/4/2001 21:36'!\nprimColorConvertIntYCbCrMCU\n\tself primColorConvertYCbCrMCU: currentComponents\n\t\t\tbits: mcuImageBuffer bits\n\t\t\tresiduals: residuals\n\t\t\tditherMask: ditherMask.! !\n\n!JPEGReadWriter methodsFor: 'colorspace conversion' stamp: 'ar 3/4/2001 21:36'!\nprimColorConvertYCbCrMCU: componentArray bits: bits residuals: residualArray ditherMask: mask\n\t<primitive: 'primitiveColorConvertMCU' module: 'JPEGReaderPlugin'>\n\t^self colorConvertIntYCbCrMCU! !\n\n!JPEGReadWriter methodsFor: 'colorspace conversion' stamp: 'tao 10/26/97 15:43'!\nsampleFloatRangeLimit: aNumber\n\n\t^ (aNumber rounded max: 0) min: MaxSample! !\n\n!JPEGReadWriter methodsFor: 'colorspace conversion' stamp: 'di 9/15/1998 14:30'!\nsampleRangeLimit: aNumber\n\n\taNumber < 0 ifTrue: [^ 0].\n\taNumber > MaxSample ifTrue: [^ MaxSample].\n\t^ aNumber! !\n\n!JPEGReadWriter methodsFor: 'dct' stamp: 'tao 10/26/97 15:16'!\ndctFloatRangeLimit: value\n\n\t^ (value / 8.0) + FloatSampleOffset.! !\n\n!JPEGReadWriter methodsFor: 'dct' stamp: 'tao 10/26/97 16:34'!\nidctBlockFloat: anArray component: aColorComponent\n\n\t| t0 t1 t2 t3 t4 t5 t6 t7 t10 t11 t12 t13 z5 z10 z11 z12 z13 qt ws |\n\tqt _ self qTable at: (aColorComponent qTableIndex).\n\tws _ Array new: DCTSize2.\n\n\t\"Pass 1: process columns from input, store into work array\"\n\t1 to: DCTSize do: [:i |\n\t\tt0 _ (anArray at: i) * (qt at: i).\n\t\tt1 _ (anArray at: (DCTSize*2 + i)) * (qt at: (DCTSize*2 + i)).\n\t\tt2 _ (anArray at: (DCTSize*4 + i)) * (qt at: (DCTSize*4 + i)).\n\t\tt3 _ (anArray at: (DCTSize*6 + i)) * (qt at: (DCTSize*6 + i)).\n\t\tt10 _ t0 + t2.\n\t\tt11 _ t0 - t2.\n\t\tt13 _ t1 + t3.\n\t\tt12 _ (t1 - t3) * DCTK1 - t13.\n\t\tt0 _ t10 + t13.\n\t\tt3 _ t10 - t13.\n\t\tt1 _ t11 + t12.\n\t\tt2 _ t11 - t12.\n\t\tt4 _ (anArray at: (DCTSize + i)) * (qt at: (DCTSize + i)).\n\t\tt5 _ (anArray at: (DCTSize*3 + i)) * (qt at: (DCTSize*3 + i)).\n\t\tt6 _ (anArray at: (DCTSize*5 + i)) * (qt at: (DCTSize*5 + i)).\n\t\tt7 _ (anArray at: (DCTSize*7 + i)) * (qt at: (DCTSize*7 + i)).\n\t\tz13 _ t6 + t5.\n\t\tz10 _ t6 - t5.\n\t\tz11 _ t4 + t7.\n\t\tz12 _ t4 - t7.\n\t\tt7 _ z11 + z13.\n\t\tt11 _ (z11 - z13) * DCTK1.\n\t\tz5 _ (z10 + z12) * DCTK2.\n\t\tt10 _ DCTK3 * z12 - z5.\n\t\tt12 _ DCTK4 * z10 + z5.\n\t\tt6 _ t12 - t7.\n\t\tt5 _ t11 - t6.\n\t\tt4 _ t10 + t5.\n\t\tws at: i put: t0 + t7.\n\t\tws at: (DCTSize*7 + i) put: t0 - t7.\n\t\tws at: (DCTSize + i) put: t1 + t6.\n\t\tws at: (DCTSize*6 + i) put: t1 - t6.\n\t\tws at: (DCTSize*2 + i) put: t2 + t5.\n\t\tws at: (DCTSize*5 + i) put: t2 - t5.\n\t\tws at: (DCTSize*4 + i) put: t3 + t4.\n\t\tws at: (DCTSize*3 + i) put: t3 - t4].\n\n\t\t\"Pass 2: process rows from the workspace\"\n\t(0 to: DCTSize2-DCTSize by: DCTSize) do: [:i |\n\t\tt10 _ (ws at: (i+1)) + (ws at: (i+5)).\n\t\tt11 _ (ws at: (i+1)) - (ws at: (i+5)).\n\t\tt13 _ (ws at: (i+3)) + (ws at: (i+7)).\n\t\tt12 _ ((ws at: (i+3)) - (ws at: (i+7))) * DCTK1 - t13.\n\t\tt0 _ t10 + t13.\n\t\tt3 _ t10 - t13.\n\t\tt1 _ t11 + t12.\n\t\tt2 _ t11 - t12.\n\t\tz13 _ (ws at: (i+6)) + (ws at: (i+4)).\n\t\tz10 _ (ws at: (i+6)) - (ws at: (i+4)).\n\t\tz11 _ (ws at: (i+2)) + (ws at: (i+8)).\n\t\tz12 _ (ws at: (i+2)) - (ws at: (i+8)).\n\t\tt7 _ z11 + z13.\n\t\tt11 _ (z11 - z13) * DCTK1.\n\t\tz5 _ (z10 + z12) * DCTK2.\n\t\tt10 _ DCTK3 * z12 - z5.\n\t\tt12 _ DCTK4 * z10 + z5.\n\t\tt6 _ t12 - t7.\n\t\tt5 _ t11 - t6.\n\t\tt4 _ t10 + t5.\n\n\t\t\"final output stage: scale down by a factor of 8 and range-limit\"\n\t\tanArray at: (i+1) put: (self dctFloatRangeLimit: (t0 + t7)).\n\t\tanArray at: (i+8) put: (self dctFloatRangeLimit: (t0 - t7)).\n\t\tanArray at: (i+2) put: (self dctFloatRangeLimit: (t1 + t6)).\n\t\tanArray at: (i+7) put: (self dctFloatRangeLimit: (t1 - t6)).\n\t\tanArray at: (i+3) put: (self dctFloatRangeLimit: (t2 + t5)).\n\t\tanArray at: (i+6) put: (self dctFloatRangeLimit: (t2 - t5)).\n\t\tanArray at: (i+5) put: (self dctFloatRangeLimit: (t3 + t4)).\n\t\tanArray at: (i+4) put: (self dctFloatRangeLimit: (t3 - t4))]\n\n\n! !\n\n!JPEGReadWriter methodsFor: 'dct' stamp: 'ar 3/4/2001 21:35'!\nidctBlockInt: anArray component: aColorComponent\n\t^self idctBlockInt: anArray qt: (self qTable at: aColorComponent qTableIndex)! !\n\n!JPEGReadWriter methodsFor: 'dct' stamp: 'ar 3/4/2001 21:34'!\nidctBlockInt: anArray qt: qt\n\n\t|  ws anACTerm dcval z1 z2 z3 z4 z5 t0 t1 t2 t3 t10 t11 t12 t13 shift |\n\tws _ Array new: DCTSize2.\n\n\t\"Pass 1: process columns from anArray, store into work array\"\n\tshift _ 1 bitShift: ConstBits - Pass1Bits.\n\t1 to: DCTSize do:\n\t\t[:i |\n\t\tanACTerm _ nil.\n\t\t1 to: DCTSize-1 do:[:row|\n\t\t\tanACTerm ifNil:[\n\t\t\t\t(anArray at: row * DCTSize + i) = 0 ifFalse:[anACTerm _ row]]].\n\t\tanACTerm == nil\n\t\t\tifTrue:\n\t\t\t\t[dcval _ (anArray at: i) * (qt at: 1) bitShift: Pass1Bits.\n\t\t\t\t0 to: DCTSize-1 do: [:j | ws at: (j * DCTSize + i) put: dcval]]\n\t\t\tifFalse:\n\t\t\t\t[z2 _ (anArray at: (DCTSize * 2 + i)) * (qt at: (DCTSize * 2 + i)).\n\t\t\t\tz3 _ (anArray at: (DCTSize * 6 + i)) * (qt at: (DCTSize * 6 + i)).\n\t\t\t\tz1 _ (z2 + z3) * FIXn0n541196100.\n\t\t\t\tt2 _ z1 + (z3 * FIXn1n847759065 negated).\n\t\t\t\tt3 _ z1 + (z2 * FIXn0n765366865).\n\t\t\t\tz2 _ (anArray at: i) * (qt at: i).\n\t\t\t\tz3 _ (anArray at: (DCTSize * 4 + i)) * (qt at: (DCTSize * 4 + i)).\n\t\t\t\tt0 _ (z2 + z3) bitShift: ConstBits.\n\t\t\t\tt1 _ (z2 - z3) bitShift: ConstBits.\n\t\t\t\tt10 _ t0 + t3.\n\t\t\t\tt13 _ t0 - t3.\n\t\t\t\tt11 _ t1 + t2.\n\t\t\t\tt12 _ t1 - t2.\n\t\t\t\tt0 _ (anArray at: (DCTSize * 7 + i)) * (qt at: (DCTSize * 7 + i)).\n\t\t\t\tt1 _ (anArray at: (DCTSize * 5 + i)) * (qt at: (DCTSize * 5 + i)).\n\t\t\t\tt2 _ (anArray at: (DCTSize * 3 + i)) * (qt at: (DCTSize * 3 + i)).\n\t\t\t\tt3 _ (anArray at: (DCTSize + i)) * (qt at: (DCTSize + i)).\n\t\t\t\tz1 _ t0 + t3.\n\t\t\t\tz2 _ t1 + t2.\n\t\t\t\tz3 _ t0 + t2.\n\t\t\t\tz4 _ t1 + t3.\n\t\t\t\tz5 _ (z3 + z4) * FIXn1n175875602.\n\t\t\t\tt0 _ t0 * FIXn0n298631336.\n\t\t\t\tt1 _ t1 * FIXn2n053119869.\n\t\t\t\tt2 _ t2 * FIXn3n072711026.\n\t\t\t\tt3 _ t3 * FIXn1n501321110.\n\t\t\t\tz1 _ z1 * FIXn0n899976223 negated.\n\t\t\t\tz2 _ z2 * FIXn2n562915447 negated.\n\t\t\t\tz3 _ z3 * FIXn1n961570560 negated.\n\t\t\t\tz4 _ z4 * FIXn0n390180644 negated.\n\t\t\t\tz3 _ z3 + z5.\n\t\t\t\tz4 _ z4 + z5.\n\t\t\t\tt0 _ t0 + z1 + z3.\n\t\t\t\tt1 _ t1 +z2 +z4.\n\t\t\t\tt2 _ t2 + z2 + z3.\n\t\t\t\tt3 _ t3 + z1 + z4.\n\t\t\t\tws at: i put: (t10 + t3) >> (ConstBits - Pass1Bits).\n\t\t\t\tws at: (DCTSize * 7 + i) put: (t10 - t3) // shift.\n\t\t\t\tws at: (DCTSize * 1 + i) put: (t11 + t2) // shift.\n\t\t\t\tws at: (DCTSize * 6 + i) put: (t11 - t2) // shift.\n\t\t\t\tws at: (DCTSize * 2 + i) put: (t12 + t1) // shift.\n\t\t\t\tws at: (DCTSize * 5 + i) put: (t12 - t1) // shift.\n\t\t\t\tws at: (DCTSize * 3 + i) put: (t13 + t0) // shift.\n\t\t\t\tws at: (DCTSize * 4 + i) put: (t13 - t0) // shift]].\n\n\t\"Pass 2: process rows from work array, store back into anArray\"\n\tshift _ 1 bitShift: ConstBits + Pass1Bits + 3.\n\t0 to: DCTSize2-DCTSize by: DCTSize do:\n\t\t[:i |\n\t\tz2 _ ws at: i + 3.\n\t\tz3 _ ws at: i + 7.\n\t\tz1 _ (z2 + z3) * FIXn0n541196100.\n\t\tt2 _ z1 + (z3 * FIXn1n847759065 negated).\n\t\tt3 _ z1 + (z2 * FIXn0n765366865).\n\t\tt0 _ (ws at: (i + 1)) + (ws at: (i + 5)) bitShift: ConstBits.\n\t\tt1 _ (ws at: (i + 1)) - (ws at: (i + 5)) bitShift: ConstBits.\n\t\tt10 _ t0 + t3.\n\t\tt13 _ t0 - t3.\n\t\tt11 _ t1 + t2.\n\t\tt12 _ t1 -t2.\n\t\tt0 _ ws at: (i + 8).\n\t\tt1 _ ws at: (i + 6).\n\t\tt2 _ ws at: (i + 4).\n\t\tt3 _ ws at: (i + 2).\n\t\tz1 _ t0 + t3.\n\t\tz2 _ t1 + t2.\n\t\tz3 _ t0 + t2.\n\t\tz4 _ t1 + t3.\n\t\tz5 _ (z3 + z4) * FIXn1n175875602.\n\t\tt0 _ t0 * FIXn0n298631336.\n\t\tt1 _ t1 * FIXn2n053119869.\n\t\tt2 _ t2 * FIXn3n072711026.\n\t\tt3 _ t3 * FIXn1n501321110.\n\t\tz1 _ z1 * FIXn0n899976223 negated.\n\t\tz2 _ z2 * FIXn2n562915447 negated.\n\t\tz3 _ z3 * FIXn1n961570560 negated.\n\t\tz4 _ z4 * FIXn0n390180644 negated.\n\t\tz3 _ z3 + z5.\n\t\tz4 _ z4 + z5.\n\t\tt0 _ t0 + z1 + z3.\n\t\tt1 _ t1 + z2 + z4.\n\t\tt2 _ t2 + z2 + z3.\n\t\tt3 _ t3 + z1 + z4.\n\t\tanArray at: (i + 1) put: (self sampleRangeLimit: (t10 + t3) // shift + SampleOffset).\n\t\tanArray at: (i + 8) put: (self sampleRangeLimit: (t10 - t3) // shift + SampleOffset).\n\t\tanArray at: (i + 2) put: (self sampleRangeLimit: (t11 + t2) // shift + SampleOffset).\n\t\tanArray at: (i + 7) put: (self sampleRangeLimit: (t11 - t2) // shift + SampleOffset).\n\t\tanArray at: (i + 3) put: (self sampleRangeLimit: (t12 + t1) // shift + SampleOffset).\n\t\tanArray at: (i + 6) put: (self sampleRangeLimit: (t12 - t1) // shift + SampleOffset).\n\t\tanArray at: (i + 4) put: (self sampleRangeLimit: (t13 + t0) // shift + SampleOffset).\n\t\tanArray at: (i + 5) put: (self sampleRangeLimit: (t13 - t0) // shift + SampleOffset)].\n\n\n! !\n\n!JPEGReadWriter methodsFor: 'dct' stamp: 'ar 3/7/2001 00:58'!\nidctMCU\n\n\t| comp fp ci |\n\tfp _ self useFloatingPoint.\n\t1 to: mcuMembership size do:[:i|\n\t\tci _ mcuMembership at: i.\n\t\tcomp _ currentComponents at: ci.\n\t\tfp ifTrue:[\n\t\t\tself idctBlockFloat: (mcuSampleBuffer at: i) component: comp.\n\t\t] ifFalse:[\n\t\t\tself primIdctInt: (mcuSampleBuffer at: i)\n\t\t\t\tqt: (qTable at: comp qTableIndex)]].! !\n\n!JPEGReadWriter methodsFor: 'dct' stamp: 'ar 3/4/2001 21:37'!\nprimIdctBlockInt: anArray component: aColorComponent\n\t^self primIdctInt: anArray qt: (self qTable at: aColorComponent qTableIndex)! !\n\n!JPEGReadWriter methodsFor: 'dct' stamp: 'ar 3/4/2001 21:35'!\nprimIdctInt: anArray qt: qt\n\t<primitive: 'primitiveIdctInt' module: 'JPEGReaderPlugin'>\n\t^self idctBlockInt: anArray qt: qt! !\n\n!JPEGReadWriter methodsFor: 'dct' stamp: 'tao 10/26/97 16:16'!\nscaleQuantizationTable: table\n\n\t| index |\n\n\tindex _ 1.\n\t1 to: DCTSize do:\n\t\t[:row |\n\t\t1 to: DCTSize do:\n\t\t\t[:col |\n\t\t\ttable at: index\n\t\t\t\tput: ((table at: index) * (QTableScaleFactor at: row) *\n\t\t\t\t\t(QTableScaleFactor at: col)) rounded.\n\t\t\tindex _ index + 1]].\n\t^ table\n! !\n\n!JPEGReadWriter methodsFor: 'error handling' stamp: 'tao 10/19/97 12:25'!\nnotSupported: aString\n\n\tself error: aString , ' is not currently supported'! !\n\n!JPEGReadWriter methodsFor: 'huffman encoding' stamp: 'ar 3/4/2001 20:55'!\ndecodeBlockInto: anArray component: aColorComponent dcTable: huffmanDC acTable: huffmanAC\n\n\t| byte i zeroCount |\n\tbyte _ stream decodeValueFrom: huffmanDC.\n\tbyte ~= 0 ifTrue: [byte _ self scaleAndSignExtend: ( self getBits: byte) inFieldWidth: byte].\n\tbyte _ aColorComponent updateDCValue: byte.\n\tanArray atAllPut: 0.\n\tanArray at: 1 put: byte.\n\ti _ 2.\n\t[i <= DCTSize2] whileTrue:\n\t\t[byte _ stream decodeValueFrom: huffmanAC.\n\t\tzeroCount _ byte >> 4.\n\t\tbyte _ byte bitAnd: 16r0F.\n\t\tbyte ~= 0\n\t\t\tifTrue:\n\t\t\t\t[i _ i + zeroCount.\n\t\t\t\tbyte _ self scaleAndSignExtend: ( self getBits: byte) inFieldWidth: byte.\n\t\t\t\tanArray at:\t (JPEGNaturalOrder at: i) put: byte]\n\t\t\tifFalse:\n\t\t\t\t[zeroCount = 15 ifTrue: [i _ i + zeroCount] ifFalse: [^ self]].\n\t\ti _ i + 1]\n\t\t! !\n\n!JPEGReadWriter methodsFor: 'huffman encoding' stamp: 'ar 3/7/2001 01:00'!\ndecodeMCU\n\n\t| comp ci |\n\t(restartInterval ~= 0 and: [restartsToGo = 0]) ifTrue: [self processRestart].\n\t1 to: mcuMembership size do:[:i|\n\t\tci _ mcuMembership at: i.\n\t\tcomp _ currentComponents at: ci.\n\t\tself\n\t\t\tprimDecodeBlockInto: (mcuSampleBuffer at: i)\n\t\t\tcomponent: comp\n\t\t\tdcTable: (hDCTable at: comp dcTableIndex)\n\t\t\tacTable: (hACTable at: comp acTableIndex)\n\t\t\tstream: stream.\n\t].\n\trestartsToGo _ restartsToGo - 1.! !\n\n!JPEGReadWriter methodsFor: 'huffman encoding' stamp: 'ar 3/4/2001 17:27'!\ngetBits: requestedBits\n\t^stream getBits: requestedBits! !\n\n!JPEGReadWriter methodsFor: 'huffman encoding' stamp: 'ar 3/4/2001 21:32'!\nprimDecodeBlockInto: sampleBuffer component: comp dcTable: dcTable acTable: acTable stream: jpegStream\n\t<primitive: 'primitiveDecodeMCU' module: 'JPEGReaderPlugin'>\n\t^self decodeBlockInto: sampleBuffer component: comp dcTable: dcTable acTable: acTable! !\n\n!JPEGReadWriter methodsFor: 'huffman encoding' stamp: 'ar 3/4/2001 17:40'!\nprocessRestart\n\tstream resetBitBuffer.\n\tself parseNextMarker.\n\tcurrentComponents do: [:c | c priorDCValue: 0].\n\trestartsToGo _ restartInterval.! !\n\n!JPEGReadWriter methodsFor: 'huffman encoding' stamp: 'ar 3/4/2001 01:17'!\nscaleAndSignExtend: aNumber inFieldWidth: w\n\n\taNumber < (1 bitShift: (w - 1))\n\t\tifTrue: [^aNumber - (1 bitShift: w) + 1]\n\t\tifFalse: [^aNumber]! !\n\n!JPEGReadWriter methodsFor: 'marker parsing' stamp: 'ar 3/4/2001 18:38'!\ninitialSOSSetup\n\n\tmcuWidth _ (components detectMax: [:c | c widthInBlocks]) widthInBlocks.\n\tmcuHeight _ (components detectMax: [:c | c heightInBlocks]) heightInBlocks.\n\tcomponents do:[:c |\n\t\tc mcuWidth: mcuWidth mcuHeight: mcuHeight dctSize: DCTSize].\n\tstream resetBitBuffer.! !\n\n!JPEGReadWriter methodsFor: 'marker parsing' stamp: 'mir 6/13/2001 13:06'!\nokToIgnoreMarker: aMarker\n\n\t^ (((16rE0 to: 16rEF) includes: aMarker) \"unhandled APPn markers\"\n\t\tor: [aMarker = 16rDC or: [aMarker = 16rFE]]) \"DNL or COM markers\"\n\t\tor: [aMarker = 16r99] \"Whatever that is\"! !\n\n!JPEGReadWriter methodsFor: 'marker parsing' stamp: 'ar 3/6/2001 22:28'!\nparseAPPn\n\n\t| length buffer thumbnailLength markerStart |\n\tmarkerStart _ self position.\n\tlength _ self nextWord.\n\tbuffer _ self next: 4.\n\t(buffer asString = 'JFIF') ifFalse: [\n\t\t\"Skip APPs that we're not interested in\"\n\t\tstream next: length-6.\n\t\t^self].\n\tself next.\n\tmajorVersion _ self next.\n\tminorVersion _ self next.\n\tdensityUnit _ self next.\n\txDensity _ self nextWord.\n\tyDensity _ self nextWord.\n\tthumbnailLength _ self next * self next * 3.\n\tlength _ length - (self position - markerStart).\n\tlength = thumbnailLength ifFalse: [self error: 'APP0 thumbnail length is incorrect.'].\n\tself next: length! !\n\n!JPEGReadWriter methodsFor: 'marker parsing' stamp: 'tao 10/20/97 13:36'!\nparseDecoderRestartInterval\n\n\t| length |\n\tlength _ self nextWord.\n\tlength = 4 ifFalse: [self error: 'DRI length incorrect'].\n\trestartInterval _ self nextWord.! !\n\n!JPEGReadWriter methodsFor: 'marker parsing' stamp: 'mir 6/12/2001 11:28'!\nparseFirstMarker\n\n\t| marker |\n\tself next = 16rFF ifFalse: [self error: 'JFIF marker expected'].\n\tmarker _ self next.\n\tmarker = 16rD9\n\t\tifTrue: [^self \"halt: 'EOI encountered.'\"].\n\tmarker = 16rD8 ifFalse: [self error: 'SOI marker expected'].\n\tself parseStartOfInput.\n! !\n\n!JPEGReadWriter methodsFor: 'marker parsing' stamp: 'ar 3/4/2001 18:36'!\nparseHuffmanTable\n\n\t| length markerStart index bits count huffVal isACTable hTable |\n\tmarkerStart _ self position.\n\tlength _ self nextWord.\n\t[self position - markerStart >= length] whileFalse:\n\t\t[index _ self next.\n\t\tisACTable _ (index bitAnd: 16r10) ~= 0.\n\t\tindex _ (index bitAnd: 16r0F) + 1.\n\t\tindex > HuffmanTableSize\n\t\t\tifTrue: [self error: 'image has more than ', HuffmanTableSize printString,\n\t\t\t\t' quantization tables'].\n\t\tbits _ self next: 16.\n\t\tcount _ bits sum.\n\t\t(count > 256 or: [(count > (length - (self position - markerStart)))])\n\t\t\tifTrue: [self error: 'Huffman Table count is incorrect'].\n\t\thuffVal _ self next: count.\n\t\thTable _ stream buildLookupTable: huffVal counts: bits.\n\t\tisACTable\n\t\t\tifTrue:\n\t\t\t\t[self hACTable at: index put: hTable]\n\t\t\tifFalse:\n\t\t\t\t[self hDCTable at: index put: hTable]].! !\n\n!JPEGReadWriter methodsFor: 'marker parsing' stamp: 'tao 10/24/97 17:32'!\nparseNOP\n\n\t\"don't need to do anything, here\"! !\n\n!JPEGReadWriter methodsFor: 'marker parsing' stamp: 'BG 3/16/2005 08:24'!\nparseNextMarker\n\t\"Parse the next marker of the stream\"\n\n\t| byte discardedBytes |\n\tdiscardedBytes _ 0.\n\t[(byte _ self next) = 16rFF] whileFalse: [discardedBytes _ discardedBytes + 1].\t\n\t[[(byte _ self next) = 16rFF] whileTrue. byte = 16r00] whileTrue:\n\t\t[discardedBytes _ discardedBytes + 2].\n\tdiscardedBytes > 0 ifTrue: [self \"notifyWithLabel: 'warning: extraneous data discarded'\"].\n\tself perform:\n\t\t(JFIFMarkerParser\n\t\t\tat: byte\n\t\t\tifAbsent:\n\t\t\t\t[(self okToIgnoreMarker: byte)\n\t\t\t\t\tifTrue: [#skipMarker]\n\t\t\t\t\tifFalse: [self error: 'marker ', byte printStringHex , ' cannot be handled']])! !\n\n!JPEGReadWriter methodsFor: 'marker parsing' stamp: 'ar 3/3/2001 22:19'!\nparseQuantizationTable\n\n\t| length markerStart n prec value table |\n\tmarkerStart _ self position.\n\tlength _ self nextWord.\n\t[self position - markerStart >= length] whileFalse:\n\t\t[value _ self next.\n\t\tn _ (value bitAnd: 16r0F) + 1.\n\t\tprec _ (value >> 4) > 0.\n\t\tn > QuantizationTableSize\n\t\t\t ifTrue: [self error: 'image has more than ',\n\t\t\t\tQuantizationTableSize printString,\n\t\t\t\t' quantization tables'].\n\t\ttable _ IntegerArray new: DCTSize2.\n\t\t1 to: DCTSize2 do:\n\t\t\t[:i |\n\t\t\tvalue _ (prec\n\t\t\t\tifTrue: [self nextWord]\n\t\t\t\tifFalse: [self next]).\n\t\t\ttable at: (JPEGNaturalOrder at: i) put: value].\n\t\tself useFloatingPoint ifTrue: [self scaleQuantizationTable: table].\n\t\tself qTable at: n put: table]! !\n\n!JPEGReadWriter methodsFor: 'marker parsing' stamp: 'tao 10/24/97 17:07'!\nparseStartOfFile\n\n\t| length markerStart value n |\n\tmarkerStart _ self position.\n\tlength _ self nextWord.\n\tdataPrecision _ self next.\n\tdataPrecision = 8\n\t\tifFalse: [self error: 'cannot handle ', dataPrecision printString, '-bit components'].\n\theight _ self nextWord.\n\twidth _ self nextWord.\n\tn _ self next.\n\t(height = 0) | (width = 0) | (n = 0) ifTrue: [self error: 'empty image'].\n\t(length - (self position - markerStart)) ~= (n * 3)\n\t\tifTrue: [self error: 'component length is incorrect'].\n\tcomponents _ Array new: n.\n\t1 to: components size do:\n\t\t[:i |\n\t\tcomponents\n\t\t\tat: i\n\t\t\tput:\n\t\t\t\t(JPEGColorComponent new\n\t\t\t\t\tid: self next;\n\t\t\t\t\t\"heightInBlocks: (((value _ self next) >> 4) bitAnd: 16r0F);\n\t\t\t\t\twidthInBlocks: (value bitAnd: 16r0F);\"\n\t\t\t\t\twidthInBlocks: (((value _ self next) >> 4) bitAnd: 16r0F);\n\t\t\t\t\theightInBlocks: (value bitAnd: 16r0F);\n\n\t\t\t\t\tqTableIndex: self next + 1)]! !\n\n!JPEGReadWriter methodsFor: 'marker parsing' stamp: 'tao 10/22/97 17:38'!\nparseStartOfInput\n\n\trestartInterval _ 0.\n\tdensityUnit _ 0.\n\txDensity _ 1.\n\tyDensity _ 1\n! !\n\n!JPEGReadWriter methodsFor: 'marker parsing' stamp: 'tao 10/26/97 21:53'!\nparseStartOfScan\n\n\t| length n id value dcNum acNum comp |\n\tlength _ self nextWord.\n\tn _ self next.\n\t(length ~= (n*2 + 6)) | (n < 1) ifTrue: [self error: 'SOS length is incorrect'].\n\tcurrentComponents _ Array new: n.\n\t1 to: n do: [:i |\n\t\tid _ self next.\n\t\tvalue _ self next.\n\t\tdcNum _ (value >> 4) bitAnd: 16r0F.\n\t\tacNum _ value bitAnd: 16r0F.\n\t\tcomp _ components detect: [:c | c id = id].\n\t\tcomp\n\t\t\tdcTableIndex: dcNum+1;\n\t\t\tacTableIndex: acNum+1.\n\t\tcurrentComponents at: i put: comp].\n\tss _ self next.\n\tse _ self next.\n\tvalue _ self next.\n\tah _ (value >> 4) bitAnd: 16r0F.\n\tal _ value bitAnd: 16r0F.\n\tself initialSOSSetup.\n\tself perScanSetup.\n\tsosSeen _ true! !\n\n!JPEGReadWriter methodsFor: 'marker parsing' stamp: 'ar 3/7/2001 01:01'!\nperScanSetup\n\n\tmcusPerRow _ (width / (mcuWidth * DCTSize)) ceiling.\n\tmcuRowsInScan _ (height / (mcuHeight * DCTSize)) ceiling.\n\t(currentComponents size = 3 or: [currentComponents size = 1])\n\t\tifFalse: [self error: 'JPEG color space not recognized'].\n\tmcuMembership _ OrderedCollection new.\n\tcurrentComponents withIndexDo:\n\t\t[:c :i |\n\t\tc priorDCValue: 0.\n\t\tmcuMembership addAll: ((1 to: c totalMcuBlocks) collect: [:b | i])].\n\tmcuMembership _ mcuMembership asArray.\n\tmcuSampleBuffer _ (1 to: mcuMembership size) collect: [:i | IntegerArray new: DCTSize2].\n\tcurrentComponents withIndexDo:\n\t\t[:c :i |\n\t\t\tc initializeSampleStreamBlocks:\n\t\t\t\t((1 to: mcuMembership size)\n\t\t\t\t\tselect: [:j | i = (mcuMembership at: j)]\n\t\t\t\t\tthenCollect: [:j | mcuSampleBuffer at: j])].\n\tmcuImageBuffer _ Form\n\t\textent: (mcuWidth @ mcuHeight) * DCTSize\n\t\tdepth: 32.\n\trestartsToGo _ restartInterval.! !\n\n!JPEGReadWriter methodsFor: 'marker parsing' stamp: 'tao 10/22/97 16:27'!\nskipMarker\n\n\t| length markerStart |\n\tmarkerStart _ self position.\n\tlength _ self nextWord.\n\tself next: length - (self position - markerStart)\n! !\n\n!JPEGReadWriter methodsFor: 'preferences' stamp: 'tao 10/26/97 22:09'!\nuseFloatingPoint\n\n\t^ false! !\n\n!JPEGReadWriter methodsFor: 'public access' stamp: 'ar 3/7/2001 00:18'!\ndecompressionTest\n\t\"Test decompression; don't generate actual image\"\n\t| xStep yStep x y |\nMessageTally spyOn:[\n\tditherMask _ DitherMasks at: 32.\n\tresiduals _ WordArray new: 3.\n\tsosSeen _ false.\n\tself parseFirstMarker.\n\t[sosSeen] whileFalse: [self parseNextMarker].\n\txStep _ mcuWidth * DCTSize.\n\tyStep _ mcuHeight * DCTSize.\n\ty _ 0.\n\t1 to: mcuRowsInScan do:\n\t\t[:row |\n\t\tx _ 0.\n\t\t1 to: mcusPerRow do:\n\t\t\t[:col |\n\t\t\tself decodeMCU.\n\t\t\tself idctMCU.\n\t\t\tself colorConvertMCU.\n\t\t\tx _ x + xStep].\n\t\ty _ y + yStep].\n].! !\n\n!JPEGReadWriter methodsFor: 'public access' stamp: 'tao 9/18/1998 08:53'!\nnextImage\n\n\t^ self nextImageDitheredToDepth: Display depth\n! !\n\n!JPEGReadWriter methodsFor: 'public access' stamp: 'ar 10/28/2001 16:25'!\nnextImageDitheredToDepth: depth\n\n\t| form xStep yStep x y bb |\n\tditherMask _ DitherMasks\n\t\tat: depth\n\t\tifAbsent: [self error: 'can only dither to display depths'].\n\tresiduals _ WordArray new: 3.\n\tsosSeen _ false.\n\tself parseFirstMarker.\n\t[sosSeen] whileFalse: [self parseNextMarker].\n\tform _ Form extent: (width @ height) depth: depth.\n\tbb _ BitBlt current toForm: form.\n\tbb sourceForm: mcuImageBuffer.\n\tbb colorMap: (mcuImageBuffer colormapIfNeededFor: form).\n\tbb sourceRect: mcuImageBuffer boundingBox.\n\tbb combinationRule: Form over.\n\txStep _ mcuWidth * DCTSize.\n\tyStep _ mcuHeight * DCTSize.\n\ty _ 0.\n\t1 to: mcuRowsInScan do:\n\t\t[:row |\n\t\tx _ 0.\n\t\t1 to: mcusPerRow do:\n\t\t\t[:col |\n\t\t\tself decodeMCU.\n\t\t\tself idctMCU.\n\t\t\tself colorConvertMCU.\n\t\t\tbb destX: x; destY: y; copyBits.\n\t\t\tx _ x + xStep].\n\t\ty _ y + yStep].\n\t^ form! !\n\n!JPEGReadWriter methodsFor: 'public access' stamp: 'ar 3/4/2001 17:26'!\nsetStream: aStream\n\t\"Feed it in from an existing source\"\n\tstream _ JPEGReadStream on: aStream upToEnd.! !\n\n!JPEGReadWriter methodsFor: 'testing' stamp: 'ar 3/4/2001 00:50'!\nunderstandsImageFormat\n\t\"Answer true if the image stream format is understood by this decoder.\"\n\tself next = 16rFF ifFalse: [^ false].\n\tself next = 16rD8 ifFalse: [^ false].\n\t^ true\n! !\n\n!JPEGReadWriter methodsFor: 'private' stamp: 'ar 3/4/2001 17:34'!\non: aStream\n\tsuper on: aStream.\n\tstream _ JPEGReadStream on: stream upToEnd.! !\n\n!JPEGReadWriter commentStamp: '<historical>' prior: 0!\nI am a subclass of ImageReadWriter that understands JFIF file streams, and can decode JPEG images.\nThis code is based upon the Independent Joint Photographic Experts Group (IJPEG) software, originally written in C by Tom Lane, Philip Gladstone, Luis Ortiz, Jim Boucher, Lee Crocker, Julian Minguillon, George Phillips, Davide Rossi, Ge' Weijers, and other members of the Independent JPEG Group.\n\n!\n!JPEGReadWriter class methodsFor: 'image reading/writing' stamp: 'nk 7/16/2003 17:56'!\ntypicalFileExtensions\n\t\"Answer a collection of file extensions (lowercase) which files that I can read might commonly have\"\n\t^#('jpg' 'jpeg')! !\n\n!JPEGReadWriter class methodsFor: 'image reading/writing' stamp: 'ar 6/16/2002 18:54'!\nunderstandsImageFormat: aStream\n\t(JPEGReadWriter2 understandsImageFormat: aStream) ifTrue:[^false].\n\taStream reset.\n\taStream next = 16rFF ifFalse: [^ false].\n\taStream next = 16rD8 ifFalse: [^ false].\n\t^true! !\n\n!JPEGReadWriter class methodsFor: 'initialization' stamp: 'ar 3/3/2001 23:07'!\ninitialize\n\t\"JPEGReadWriter initialize\"\n\t\"general constants\"\n\tDCTSize _ 8.\n\tMaxSample _ (2 raisedToInteger: DCTSize) - 1.\n\tSampleOffset _ MaxSample // 2.\n\tFloatSampleOffset _ SampleOffset asFloat.\n\tDCTSize2 _ DCTSize squared.\n\tQuantizationTableSize _ 4.\n\tHuffmanTableSize _ 4.\n\n\t\"floating-point Inverse Discrete Cosine Transform (IDCT) constants\"\n\tConstBits _ 13.\n\tPass1Bits _ 2.\n\tDCTK1 _ 2 sqrt.\n\tDCTK2 _ 1.847759065.\n\tDCTK3 _ 1.082392200.\n\tDCTK4 _ -2.613125930.\n\tPass1Div _ 1 bitShift: ConstBits - Pass1Bits.\n\tPass2Div _ 1 bitShift: ConstBits + Pass1Bits + 3.\n\n\t\"fixed-point Inverse Discrete Cosine Transform (IDCT) constants\"\n\tFIXn0n298631336 _ 2446.\n\tFIXn0n390180644 _ 3196.\n\tFIXn0n541196100 _ 4433.\n\tFIXn0n765366865 _ 6270.\n\tFIXn0n899976223 _ 7373.\n\tFIXn1n175875602 _ 9633.\n\tFIXn1n501321110 _ 12299.\n\tFIXn1n847759065 _ 15137.\n\tFIXn1n961570560 _ 16069.\n\tFIXn2n053119869 _ 16819.\n\tFIXn2n562915447 _ 20995.\n\tFIXn3n072711026 _ 25172.\n\n\t\"fixed-point color conversion constants\"\n\tFIXn0n34414 _ 22554.\n\tFIXn0n71414 _ 46802.\n\tFIXn1n40200 _ 91881.\n\tFIXn1n77200 _  116130.\n\n\t\"reordering table from JPEG zig-zag order\"\n\tJPEGNaturalOrder _ #(\n\t\t1 2 9 17 10 3 4 11\n\t\t18 25 33 26 19 12 5 6\n\t\t13 20 27 34 41 49 42 35\n\t\t28 21 14 7 8 15 22 29\n\t\t36 43 50 57 58 51 44 37\n\t\t30 23 16 24 31 38 45 52\n\t\t59 60 53 46 39 32 40 47\n\t\t54 61 62 55 48 56 63 64).\n\n\t\"scale factors for the values in the Quantization Tables\"\n\tQTableScaleFactor _ (0 to: DCTSize-1) collect:\n\t\t[:k | k = 0\n\t\t\tifTrue: [1.0]\n\t\t\tifFalse: [(k * Float pi / 16) cos * 2 sqrt]].\n\n\t\"dithering masks\"\n\t(DitherMasks _ Dictionary new)\n\t\tadd: 0 -> 0;\n\t\tadd: 1 -> 127;\n\t\tadd: 2 -> 63;\n\t\tadd: 4 -> 63;\n\t\tadd: 8 -> 31;\n\t\tadd: 16 -> 7;\n\t\tadd: 32 -> 0.\n\n\t\"dictionary of marker parsers\"\n\t(JFIFMarkerParser _ Dictionary new)\n\t\tadd: (16r01 -> #parseNOP);\n\t\tadd: (16rC0 -> #parseStartOfFile);\n\t\tadd: (16rC4 -> #parseHuffmanTable);\n\t\taddAll: ((16rD0 to: 16rD7) collect: [:m | Association key: m value: #parseNOP]);\n\t\tadd: (16rD8 -> #parseStartOfInput);\n\t\tadd: (16rD9 -> #parseEndOfInput);\n\t\tadd: (16rDA -> #parseStartOfScan);\n\t\tadd: (16rDB -> #parseQuantizationTable);\n\t\tadd: (16rDD -> #parseDecoderRestartInterval);\n\t\tadd: (16rE0 -> #parseAPPn);\n\t\tadd: (16rE1 -> #parseAPPn)! !\n\n!JPEGReadWriter2 methodsFor: 'primitives' stamp: 'jm 11/20/2001 10:34'!\nprimImageHeight: aJPEGCompressStruct\n\n\t<primitive: 'primImageHeight' module: 'JPEGReadWriter2Plugin'>\n\tself primitiveFailed\n! !\n\n!JPEGReadWriter2 methodsFor: 'primitives' stamp: 'jm 11/20/2001 10:35'!\nprimImageWidth: aJPEGCompressStruct\n\n\t<primitive: 'primImageWidth' module: 'JPEGReadWriter2Plugin'>\n\tself primitiveFailed\n! !\n\n!JPEGReadWriter2 methodsFor: 'primitives' stamp: 'jm 11/20/2001 10:35'!\nprimJPEGCompressStructSize\n\n\t<primitive: 'primJPEGCompressStructSize' module: 'JPEGReadWriter2Plugin'>\n\tself primitiveFailed\n! !\n\n!JPEGReadWriter2 methodsFor: 'primitives' stamp: 'jm 11/20/2001 10:35'!\nprimJPEGDecompressStructSize\n\n\t<primitive: 'primJPEGDecompressStructSize' module: 'JPEGReadWriter2Plugin'>\n\tself primitiveFailed\n! !\n\n!JPEGReadWriter2 methodsFor: 'primitives' stamp: 'jm 11/20/2001 10:35'!\nprimJPEGErrorMgr2StructSize\n\n\t<primitive: 'primJPEGErrorMgr2StructSize' module: 'JPEGReadWriter2Plugin'>\n\tself primitiveFailed\n! !\n\n!JPEGReadWriter2 methodsFor: 'primitives' stamp: 'ar 11/27/2001 00:39'!\nprimJPEGPluginIsPresent\n\t<primitive: 'primJPEGPluginIsPresent' module: 'JPEGReadWriter2Plugin'>\n\t^false! !\n\n!JPEGReadWriter2 methodsFor: 'primitives' stamp: 'jm 11/20/2001 10:35'!\nprimJPEGReadHeader: aJPEGDecompressStruct fromByteArray: source errorMgr: aJPEGErrorMgr2Struct\n\n\t<primitive: 'primJPEGReadHeaderfromByteArrayerrorMgr' module: 'JPEGReadWriter2Plugin'>\n\tself primitiveFailed\n! !\n\n!JPEGReadWriter2 methodsFor: 'primitives' stamp: 'jmv 12/7/2001 13:45'!\nprimJPEGReadImage: aJPEGDecompressStruct fromByteArray: source onForm: form doDithering: ditherFlag errorMgr: aJPEGErrorMgr2Struct\n\n\t<primitive: 'primJPEGReadImagefromByteArrayonFormdoDitheringerrorMgr' module: 'JPEGReadWriter2Plugin'>\n\tself primitiveFailed\n! !\n\n!JPEGReadWriter2 methodsFor: 'primitives' stamp: 'jm 11/20/2001 10:35'!\nprimJPEGWriteImage: aJPEGCompressStruct onByteArray: destination form: form quality: quality progressiveJPEG: progressiveFlag errorMgr: aJPEGErrorMgr2Struct\n\n\t<primitive: 'primJPEGWriteImageonByteArrayformqualityprogressiveJPEGerrorMgr' module: 'JPEGReadWriter2Plugin'>\n\tself primitiveFailed\n! !\n\n!JPEGReadWriter2 methodsFor: 'public access' stamp: 'JMM 1/11/2005 14:56'!\ncompress: aForm quality: quality\n\t\"Encode the given Form and answer the compressed ByteArray. Quality goes from 0 (low) to 100 (high), where -1 means default.\"\n\n\t| sourceForm jpegCompressStruct jpegErrorMgr2Struct buffer byteCount |\n\taForm unhibernate.\n\t\"odd width images of depth 16 give problems; avoid them.\"\n\tsourceForm _ (aForm depth = 32) | (aForm width even & (aForm depth = 16))\n\t\tifTrue: [aForm]\n\t\tifFalse: [aForm asFormOfDepth: 32].\n\tjpegCompressStruct _ ByteArray new: self primJPEGCompressStructSize.\n\tjpegErrorMgr2Struct _ ByteArray new: self primJPEGErrorMgr2StructSize.\n\tbuffer _ ByteArray new: sourceForm width * sourceForm height + 1024.\n\tbyteCount _ self primJPEGWriteImage: jpegCompressStruct \n\t\tonByteArray: buffer\n\t\tform: sourceForm\n\t\tquality: quality\n\t\tprogressiveJPEG: false\n\t\terrorMgr: jpegErrorMgr2Struct.\n\tbyteCount = 0 ifTrue: [self error: 'buffer too small for compressed data'].\n\t^ buffer copyFrom: 1 to: byteCount\n! !\n\n!JPEGReadWriter2 methodsFor: 'public access' stamp: 'jm 11/20/2001 10:01'!\nimageExtent: aByteArray \n\t\"Answer the extent of the compressed image encoded in the given ByteArray.\"\n\n\t| jpegDecompressStruct jpegErrorMgr2Struct w h |\n\tjpegDecompressStruct _ ByteArray new: self primJPEGDecompressStructSize.\n\tjpegErrorMgr2Struct _ ByteArray new: self primJPEGErrorMgr2StructSize.\n\tself\n\t\tprimJPEGReadHeader: jpegDecompressStruct \n\t\tfromByteArray: aByteArray\n\t\terrorMgr: jpegErrorMgr2Struct.\n\tw _ self primImageWidth: jpegDecompressStruct.\n\th _ self primImageHeight: jpegDecompressStruct.\n\t^ w @ h\n! !\n\n!JPEGReadWriter2 methodsFor: 'public access' stamp: 'jm 11/20/2001 10:23'!\nnextImage\n\t\"Decode and answer a Form from my stream.\"\n\n\t^ self nextImageSuggestedDepth: Display depth\n! !\n\n!JPEGReadWriter2 methodsFor: 'public access' stamp: 'sd 1/30/2004 15:19'!\nnextImageSuggestedDepth: depth\n\t\"Decode and answer a Form of the given depth from my stream. Close the stream if it is a file stream. Possible depths are 16-bit and 32-bit.\"\n\n\t| bytes width height form jpegDecompressStruct jpegErrorMgr2Struct depthToUse |\n\tbytes _ stream upToEnd.\n\tstream close.\n\tjpegDecompressStruct _ ByteArray new: self primJPEGDecompressStructSize.\n\tjpegErrorMgr2Struct _ ByteArray new: self primJPEGErrorMgr2StructSize.\n\tself \n\t\tprimJPEGReadHeader: jpegDecompressStruct \n\t\tfromByteArray: bytes\n\t\terrorMgr: jpegErrorMgr2Struct.\n\twidth _ self primImageWidth: jpegDecompressStruct.\n\theight _ self primImageHeight: jpegDecompressStruct.\n\t\"Odd width images of depth 16 gave problems. Avoid them (or check carefully!!)\"\n\tdepthToUse _ ((depth = 32) | width odd) ifTrue: [32] ifFalse: [16].\n\tform _ Form extent: width@height depth: depthToUse.\n\t(width = 0 or: [height = 0]) ifTrue: [^ form].\n\tself\n\t\tprimJPEGReadImage: jpegDecompressStruct\n\t\tfromByteArray: bytes\n\t\tonForm: form\n\t\tdoDithering: true\n\t\terrorMgr: jpegErrorMgr2Struct.\n\t^ form\n! !\n\n!JPEGReadWriter2 methodsFor: 'public access' stamp: 'jm 11/20/2001 10:21'!\nnextPutImage: aForm\n\t\"Encode the given Form on my stream with default quality.\"\n\n\t^ self nextPutImage: aForm quality: -1 progressiveJPEG: false\n! !\n\n!JPEGReadWriter2 methodsFor: 'public access' stamp: 'JMM 1/11/2005 14:45'!\nnextPutImage: aForm quality: quality progressiveJPEG: progressiveFlag\n\t\"Encode the given Form on my stream with the given settings. Quality goes from 0 (low) to 100 (high), where -1 means default. If progressiveFlag is true, encode as a progressive JPEG.\"\n\n\t| sourceForm jpegCompressStruct jpegErrorMgr2Struct buffer byteCount |\n\taForm unhibernate.\n\t\"odd width images of depth 16 give problems; avoid them.\"\n\tsourceForm _ (aForm depth = 32) | (aForm width even & (aForm depth = 16))\n\t\tifTrue: [aForm]\n\t\tifFalse: [aForm asFormOfDepth: 32].\n\tjpegCompressStruct _ ByteArray new: self primJPEGCompressStructSize.\n\tjpegErrorMgr2Struct _ ByteArray new: self primJPEGErrorMgr2StructSize.\n\tbuffer _ ByteArray new: sourceForm width * sourceForm height + 1024.\n\tbyteCount _ self primJPEGWriteImage: jpegCompressStruct \n\t\tonByteArray: buffer\n\t\tform: sourceForm\n\t\tquality: quality\n\t\tprogressiveJPEG: progressiveFlag\n\t\terrorMgr: jpegErrorMgr2Struct.\n\tbyteCount = 0 ifTrue: [self error: 'buffer too small for compressed data'].\n\tstream next: byteCount putAll: buffer startingAt: 1.\n\tself close.\n! !\n\n!JPEGReadWriter2 methodsFor: 'public access' stamp: 'jmv 12/7/2001 13:49'!\nuncompress: aByteArray into: aForm\n\t\"Uncompress an image from the given ByteArray into the given Form.\n\tFails if the given Form has the wrong dimensions or depth.\n\tIf aForm has depth 16, do ordered dithering.\"\n\n\t| jpegDecompressStruct jpegErrorMgr2Struct w h |\n\taForm unhibernate.\n\tjpegDecompressStruct _ ByteArray new: self primJPEGDecompressStructSize.\n\tjpegErrorMgr2Struct _ ByteArray new: self primJPEGErrorMgr2StructSize.\n\tself \n\t\tprimJPEGReadHeader: jpegDecompressStruct \n\t\tfromByteArray: aByteArray\n\t\terrorMgr: jpegErrorMgr2Struct.\n\tw _ self primImageWidth: jpegDecompressStruct.\n\th _ self primImageHeight: jpegDecompressStruct.\n\t((aForm width = w) & (aForm height = h)) ifFalse: [\n\t\t^ self error: 'form dimensions do not match'].\n\n\t\"odd width images of depth 16 give problems; avoid them\"\n\tw odd\n\t\tifTrue: [\n\t\t\taForm depth = 32 ifFalse: [^ self error: 'must use depth 32 with odd width']]\n\t\tifFalse: [\n\t\t\t((aForm depth = 16) | (aForm depth = 32)) ifFalse: [^ self error: 'must use depth 16 or 32']].\n\n\tself primJPEGReadImage: jpegDecompressStruct\n\t\tfromByteArray: aByteArray\n\t\tonForm: aForm\n\t\tdoDithering: true\n\t\terrorMgr: jpegErrorMgr2Struct.\n! !\n\n!JPEGReadWriter2 methodsFor: 'public access' stamp: 'jmv 12/7/2001 13:48'!\nuncompress: aByteArray into: aForm doDithering: ditherFlag\n\t\"Uncompress an image from the given ByteArray into the given Form. \n\tFails if the given Form has the wrong dimensions or depth.\n\tIf aForm has depth 16 and ditherFlag = true, do ordered dithering.\"\n\n\t| jpegDecompressStruct jpegErrorMgr2Struct w h |\n\taForm unhibernate.\n\tjpegDecompressStruct _ ByteArray new: self primJPEGDecompressStructSize.\n\tjpegErrorMgr2Struct _ ByteArray new: self primJPEGErrorMgr2StructSize.\n\tself \n\t\tprimJPEGReadHeader: jpegDecompressStruct \n\t\tfromByteArray: aByteArray\n\t\terrorMgr: jpegErrorMgr2Struct.\n\tw _ self primImageWidth: jpegDecompressStruct.\n\th _ self primImageHeight: jpegDecompressStruct.\n\t((aForm width = w) & (aForm height = h)) ifFalse: [\n\t\t^ self error: 'form dimensions do not match'].\n\n\t\"odd width images of depth 16 give problems; avoid them\"\n\tw odd\n\t\tifTrue: [\n\t\t\taForm depth = 32 ifFalse: [^ self error: 'must use depth 32 with odd width']]\n\t\tifFalse: [\n\t\t\t((aForm depth = 16) | (aForm depth = 32)) ifFalse: [^ self error: 'must use depth 16 or 32']].\n\n\tself primJPEGReadImage: jpegDecompressStruct\n\t\tfromByteArray: aByteArray\n\t\tonForm: aForm\n\t\tdoDithering: ditherFlag\n\t\terrorMgr: jpegErrorMgr2Struct.\n! !\n\n!JPEGReadWriter2 methodsFor: 'testing' stamp: 'ar 11/27/2001 00:40'!\nisPluginPresent\n\t^self primJPEGPluginIsPresent! !\n\n!JPEGReadWriter2 methodsFor: 'testing' stamp: 'ar 11/27/2001 00:39'!\nunderstandsImageFormat\n\t\"Answer true if the image stream format is understood by this decoder.\"\n\tself isPluginPresent ifFalse:[^false]. \"cannot read it otherwise\"\n\tself next = 16rFF ifFalse: [^ false].\n\tself next = 16rD8 ifFalse: [^ false].\n\t^ true\n! !\n\n!JPEGReadWriter2 commentStamp: '<historical>' prior: 0!\nI provide fast JPEG compression and decompression. I require the VM pluginJPEGReadWriter2Plugin, which is typically stored in same directory as the Squeak virtual machine.\n\nJPEGReadWriter2Plugin is based on LIBJPEG library. This sentence applies to the plugin:\n   \"This software is based in part on the work of the Independent JPEG Group\".\n\nThe LIBJPEG license allows it to be used free for any purpose so long as its origin and copyright are acknowledged. You can read more about LIBJPEG and get the complete source code at www.ijg.org.\n!\n!JPEGReadWriter2 class methodsFor: 'image reading/writing' stamp: 'ar 6/16/2002 18:54'!\nprimJPEGPluginIsPresent\n\t<primitive: 'primJPEGPluginIsPresent' module: 'JPEGReadWriter2Plugin'>\n\t^false! !\n\n!JPEGReadWriter2 class methodsFor: 'image reading/writing' stamp: 'jm 12/22/2001 11:55'!\nputForm: aForm quality: quality progressiveJPEG: progressiveFlag onFileNamed: fileName\n\t\"Store the given Form as a JPEG file of the given name, overwriting any existing file of that name. Quality goes from 0 (low) to 100 (high), where -1 means default. If progressiveFlag is true, encode as a progressive JPEG.\"\n\n\t| writer |\n\tFileDirectory deleteFilePath: fileName.\n\twriter _ self on: (FileStream newFileNamed: fileName) binary.\n\tCursor write showWhile: [\n\t\twriter nextPutImage: aForm quality: quality progressiveJPEG: progressiveFlag].\n\twriter close.\n! !\n\n!JPEGReadWriter2 class methodsFor: 'image reading/writing' stamp: 'nk 7/16/2003 17:56'!\ntypicalFileExtensions\n\t\"Answer a collection of file extensions (lowercase) which files that I can read might commonly have\"\n\t^#('jpg' 'jpeg')! !\n\n!LargePositiveInteger methodsFor: 'printing' stamp: 'ssa 9/11/2009 16:52'!\nprintOn: aStream\n\t\"hack to fix strange LPI bug\"\n\t^(self - 1 + 1)printOn: aStream base: 10! !\n\n!LinkedList methodsFor: 'converting' stamp: 'ssa 1/26/2010 16:24'!\nasOrderedCollection\n\n\t^(self collect:[:link| link])asOrderedCollection! !\n\n!LinkedList methodsFor: 'explorer' stamp: 'ssa 1/26/2010 16:32'!\nhasContentsInExplorer\n\n\t^self isEmpty not! !\n\n!ListController methodsFor: 'menu messages' stamp: 'ssa 9/15/2009 16:53'!\nprocessKeyboard\n\t\"Derived from a Martin Pammer submission, 02/98\"\n\n     | keyEvent oldSelection nextSelection max min howMany |\n\tsensor keyboardPressed ifFalse: [^ self].\n\n     keyEvent := sensor keyboard asciiValue.\n\t(keyEvent = $l asciiValue and:[Sensor commandKeyPressed])ifTrue:[self view topView adjustWidths].\n     oldSelection := view selection.\n     nextSelection := oldSelection.\n     max := view maximumSelection.\n     min := view minimumSelection.\n     howMany := view clippingBox height // view list lineGrid.\n\n     keyEvent == 31 ifTrue:\n\t\t[\"down-arrow; move down one, wrapping to top if needed\"\n\t\tnextSelection := oldSelection + 1.\n\t\tnextSelection > max ifTrue: [nextSelection _ 1]].\n\n     keyEvent == 30 ifTrue:\n\t\t[\"up arrow; move up one, wrapping to bottom if needed\"\n\t\tnextSelection := oldSelection - 1.\n\t\tnextSelection < 1 ifTrue: [nextSelection _ max]].\n\n     keyEvent == 1  ifTrue: [nextSelection := 1].  \"home\"\n     keyEvent == 4  ifTrue: [nextSelection := max].   \"end\"\n     keyEvent == 11 ifTrue: [nextSelection := min max: (oldSelection -\nhowMany)].  \"page up\"\n     keyEvent == 12  ifTrue: [nextSelection := (oldSelection + howMany)\nmin: max].  \"page down\"\n     nextSelection = oldSelection  ifFalse:\n\t\t[model okToChange\n\t\t\tifTrue:\n\t\t\t\t[self changeModelSelection: nextSelection.\n\t\t\t\tself moveMarker]]\n\t\t\t! !\n\n!ListItemWrapper methodsFor: 'as yet unclassified' stamp: 'RAA 3/31/1999 12:15'!\nhasEquivalentIn: aCollection\n\n\taCollection detect: [ :each | \n\t\teach withoutListWrapper = item withoutListWrapper\n\t] ifNone: [^false].\n\t^true! !\n\n!ListItemWrapper methodsFor: 'as yet unclassified' stamp: 'RAA 4/4/1999 17:58'!\nsendSettingMessageTo: aModel\n\n\taModel \n\t\tperform: (self settingSelector ifNil: [^self])\n\t\twith: self withoutListWrapper\n! !\n\n!ListItemWrapper methodsFor: 'as yet unclassified' stamp: 'RAA 3/31/1999 21:31'!\nsettingSelector\n\n\t^nil! !\n\n!ListItemWrapper methodsFor: 'converting' stamp: 'RAA 3/30/1999 18:17'!\nasString\n\n\t^item asString! !\n\n!ListItemWrapper methodsFor: 'converting' stamp: 'RAA 3/31/1999 12:13'!\nwithoutListWrapper\n\n\t^item withoutListWrapper! !\n\n!ListItemWrapper methodsFor: 'accessing' stamp: 'RAA 3/31/1999 16:32'!\ncontents\n\n\t^Array new! !\n\n!ListItemWrapper methodsFor: 'accessing' stamp: 'RAA 4/1/1999 20:09'!\nhasContents\n\n\t^self contents isEmpty not! !\n\n!ListItemWrapper methodsFor: 'accessing' stamp: 'RAA 8/3/1999 09:40'!\nhighlightingColor\n\n\t^Color red! !\n\n!ListItemWrapper methodsFor: 'accessing' stamp: 'dgd 9/26/2004 18:22'!\nicon\n\t\"Answer a form to be used as icon\"\n\t^ nil! !\n\n!ListItemWrapper methodsFor: 'accessing' stamp: 'ssa 11/24/2009 19:07'!\nitem\n\t\"Answer the value of item\"\n\n\titem isNil ifTrue:[self item: nil].\n\t^ item! !\n\n!ListItemWrapper methodsFor: 'accessing' stamp: 'ssa 11/24/2009 19:07'!\nitem: anObject\n\t\"Set the value of item\"\n\n\titem _ anObject! !\n\n!ListItemWrapper methodsFor: 'accessing' stamp: 'ssa 11/24/2009 19:07'!\nmodel\n\t\"Answer the value of model\"\n\n\tmodel isNil ifTrue:[self model: nil].\n\t^ model! !\n\n!ListItemWrapper methodsFor: 'accessing' stamp: 'ssa 11/24/2009 19:07'!\nmodel: anObject\n\t\"Set the value of model\"\n\n\tmodel _ anObject! !\n\n!ListItemWrapper methodsFor: 'accessing' stamp: 'RAA 4/2/1999 15:14'!\npreferredColor\n\n\t^nil! !\n\n!ListItemWrapper methodsFor: 'accessing' stamp: 'RAA 3/30/1999 18:27'!\nsetItem: anObject\n\n\titem _ anObject! !\n\n!ListItemWrapper methodsFor: 'accessing' stamp: 'RAA 3/31/1999 16:44'!\nsetItem: anObject model: aModel\n\n\titem _ anObject.\n\tmodel _ aModel.! !\n\n!ListItemWrapper commentStamp: '<historical>' prior: 0!\nContributed by Bob Arning as part of the ObjectExplorer package.\n!\n!ListItemWrapper class methodsFor: 'as yet unclassified' stamp: 'RAA 3/30/1999 18:28'!\nwith: anObject\n\n\t^self new setItem: anObject! !\n\n!ListItemWrapper class methodsFor: 'as yet unclassified' stamp: 'RAA 3/31/1999 16:44'!\nwith: anObject model: aModel\n\n\t^self new setItem: anObject model: aModel! !\n\n!ListView methodsFor: 'displaying'!\nscrollSelectionIntoView\n\t\"Selection is assumed to be on and clipped out of view.\n\tUses controller scrollView to keep selection right\"\n\t| delta |\n\t(delta _ self insetDisplayBox bottom - self selectionBox bottom) < 0\n\t\tifTrue: [^ self controller scrollView: delta - (list lineGrid-1)]. \"up\"\n\t(delta _ self insetDisplayBox top - self selectionBox top) > 0\n\t\tifTrue: [^ self controller scrollView: delta + 1] \"down\"! !\n\n!ListView methodsFor: 'clipping box access' stamp: 'ssa 9/11/2009 18:25'!\nclippingBox\n\t\"Answer the rectangle in which the model can be displayed--this is the \n\tinsetDisplayBox inset by the height of a line for an item.\"\n\n\t^self insetDisplayBox insetBy: \n\t\t(Rectangle\n\t\t\tleft: 0\n\t\t\tright: 0\n\t\t\ttop: 0\n\t\t\tbottom: 0 \"self insetDisplayBox height \\\\ list lineGrid\")! !\n\n!ListView methodsFor: 'selecting' stamp: 'ssa 9/11/2009 18:25'!\nfindSelection: aPoint \n\t\"Determine which selection is displayed in an area containing the point, \n\taPoint. Answer the selection if one contains the point, answer nil \n\totherwise.\"\n\n\t| trialSelection |\n\t(self clippingBox  containsPoint: aPoint) ifFalse: [^nil].\n\ttrialSelection _ aPoint y - list compositionRectangle top // list lineGrid + 1.\n\ttopDelimiter == nil ifFalse: [trialSelection _ trialSelection - 1].\n\t(trialSelection < 1) | (trialSelection > self maximumSelection)\n\t\tifTrue: [^ nil]\n\t\tifFalse: [^ trialSelection]! !\n\n!ListView methodsFor: 'updating' stamp: 'ssa 1/22/2010 14:49'!\nupdate: aSymbol \n        \"Refer to the comment in View|update:.\"\n        \"Hacked to support MSWScrollBars - ssa 12/11/97 16:42\"\n\n        aSymbol  == #list\n                ifTrue: \n                        [self list: model list.\n                        self displayView]\n                ifFalse:[\n                        aSymbol == #listIndex\n                                ifTrue: \n                                        [self moveSelectionBox: model listIndex]].\n        (self superView isKindOf: MSWScrollBarView)\n                ifTrue:[self superView updateElevator]! !\n\n!ListView methodsFor: 'accessing' stamp: 'ssa 1/29/2010 13:43'!\nisEmpty\n\t\"Answer the value of isEmpty\"\n\n\tisEmpty isNil ifTrue:[self isEmpty: nil].\n\t^ isEmpty! !\n\n!ListView methodsFor: 'accessing' stamp: 'ssa 1/29/2010 13:43'!\nisEmpty: anObject\n\t\"Set the value of isEmpty\"\n\n\tisEmpty _ anObject! !\n\n!ListView methodsFor: 'accessing' stamp: 'ssa 1/29/2010 13:43'!\ntextStyle\n\t\"Answer the value of textStyle\"\n\n\ttextStyle isNil ifTrue:[self textStyle: nil].\n\t^ textStyle! !\n\n!ListView methodsFor: 'accessing' stamp: 'ssa 1/29/2010 13:43'!\ntextStyle: anObject\n\t\"Set the value of textStyle\"\n\n\ttextStyle _ anObject! !\n\n!ListView methodsFor: '*Interface-MSWLook'!\npercentPreceedingContent\n        \"Answer the percent of my content that not visible since it has been scrolled of the top of the screen.  ssa 12/5/97 15:37\"\n\n        | para lineIndex |\n        para _ self list.\n        lineIndex _ para lineIndexOfTop: para visibleRectangle top.\n        lineIndex = 1 ifTrue:[^0.0].\n        ^lineIndex / para numberOfLines asFloat\n! !\n\n!ListView methodsFor: '*Interface-MSWLook'!\nscrollBy: anInteger \n        \"Scroll up by this amount adjusted by lineSpacing and list limits\"\n        \"Hacked to support MSWScrollBarView - ssa 12/10/97 16:26\"\n\n        | maximumAmount minimumAmount amount |\n        maximumAmount _ 0 max:\n                list clippingRectangle top - list compositionRectangle top.\n        minimumAmount _ 0 min:\n                list clippingRectangle bottom - list compositionRectangle bottom.\n        amount _ (anInteger min: maximumAmount) max: minimumAmount.\n        amount ~= 0\n                ifTrue: [list scrollBy: amount negated.\n                                (self superView isKindOf: MSWScrollBarView)  \"______HERE IS THE HACK\"\n                                        ifTrue:[self superView updateElevator].\n                          ^ true]\n                ifFalse: [^ false]  \"Return false if no scrolling took place\"! !\n\n!ListView methodsFor: '*Interface-MSWLook' stamp: 'ssa 9/9/2009 15:24'!\ntotalContentHeight\n        \"Answer the total height of my contents. ssa 12/5/97 15:16\"\n        ^ self list compositionRectangle height / self unitContentHeight! !\n\n!ListView methodsFor: '*Interface-MSWLook'!\nunitContentHeight\n        \"Answer the unit height of my contents. ssa 12/5/97 15:16\"\n        ^ self list lineGrid asFloat! !\n\n!ListView methodsFor: '*Interface-MSWLook'!\nvisibleContentHeight\n        \"Answer the total height of my contents. ssa 12/5/97 15:16\"\n        ^ self list clippingRectangle height / self unitContentHeight! !\n\n!LongTestCase commentStamp: 'DamirLaurent 5/2/2011 22:17' prior: 0!\nI'm a TestCase which takes time to run. I can be disabled using #doNotRunLongTestCases and enabled again using #runLongTestCases.\n\nTests that are long should be subclasses of myself.\n\nI also provide a setting for the SettingsBrowser!\n!LongTestCase class methodsFor: 'accessing' stamp: 'StephaneDucasse 10/18/2010 14:02'!\nallTestSelectors\n\tself shouldRun ifTrue: [\n\t\t^super testSelectors].\n\t^#().! !\n\n!LongTestCase class methodsFor: 'accessing' stamp: 'StephaneDucasse 10/18/2010 12:21'!\ndoNotRunLongTestCases\n\t\"Tells the system that long tests should not be run\"\n\t\n\tself shouldRun: false! !\n\n!LongTestCase class methodsFor: 'accessing' stamp: 'StephaneDucasse 10/18/2010 12:21'!\nrunLongTestCases\n\t\"Tell the system that long tests should be run\"\n\t\n\tself shouldRun: true.! !\n\n!LongTestCase class methodsFor: 'accessing' stamp: 'DamirLaurent 5/2/2011 21:33'!\nshouldRun\n\t\"Return whether long tests should be run or not\"\n\t\n\tRunLongTestCases ifNil: [self runLongTestCases].\n\t^ RunLongTestCases ! !\n\n!LongTestCase class methodsFor: 'accessing' stamp: 'StephaneDucasse 10/18/2010 12:21'!\nshouldRun: aBoolean\n\t\"Set whether long tests should be run or not\"\n\t\n\tRunLongTestCases := aBoolean! !\n\n!LongTestCase class methodsFor: 'initialization' stamp: 'DamirLaurent 5/2/2011 21:32'!\ninitialize\n\n\tself runLongTestCases! !\n\n!LongTestCase class methodsFor: 'instance creation' stamp: 'StephaneDucasse 10/18/2010 14:02'!\nbuildSuite\n\n\t| suite |\n\tsuite := self suiteClass new.\n\tself shouldRun ifTrue: [\n\t\tself addToSuiteFromSelectors: suite].\n\t^suite! !\n\n!LongTestCase class methodsFor: 'settings' stamp: 'DamirLaurent 5/2/2011 21:59'!\nrunLongTestsSettingOn: aBuilder\n\t\"<systemsettings>\"\n\t\n\t(aBuilder setting: #shouldRun)\n\t\ttarget: self;\n\t\tparent: #pharoSystem;\n\t\tlabel: 'Run Long Tests' translated;\n\t\tdescription: 'Whether to run long SUnit TestCase. Tests which take long time to run should be subclasses of LongTestCase.' translated.! !\n\n!LongTestCase class methodsFor: 'testing' stamp: 'md 2/22/2006 14:21'!\nisAbstract\n\t\"Override to true if a TestCase subclass is Abstract and should not have\n\tTestCase instances built from it\"\n\n\t^self name = #LongTestCase\n\t\t\t! !\n\n!LongTestCaseTest methodsFor: 'setup'!\nsetUp\n\n\tlongTestCaseSettingValue := LongTestCase shouldRun! !\n\n!LongTestCaseTest methodsFor: 'setup'!\ntearDown\n\n\tLongTestCase shouldRun: longTestCaseSettingValue! !\n\n!LongTestCaseTest methodsFor: 'testing'!\ntestLongTestCaseDoNotRun\n\t\"self debug: #testLongTestCaseDoNotRun\"\n\t\"self run: #testLongTestCaseDoNotRun\"\n\n\tLongTestCase doNotRunLongTestCases.\n\tLongTestCaseTestUnderTest markAsNotRun.\n\tself deny: LongTestCaseTestUnderTest hasRun.\n\tLongTestCaseTestUnderTest suite run.\n\tself deny: LongTestCaseTestUnderTest hasRun.\n\n\n\t! !\n\n!LongTestCaseTest methodsFor: 'testing' stamp: 'md 12/5/2004 21:28'!\ntestLongTestCaseRun\n\t\"self debug: #testLongTestCaseRun\"\n\t\"self run: #testLongTestCaseRun\"\n\n\tLongTestCase runLongTestCases.\n\tLongTestCaseTestUnderTest markAsNotRun.\n\tself deny: LongTestCaseTestUnderTest hasRun.\n\tLongTestCaseTestUnderTest suite run.\n\tself assert: LongTestCaseTestUnderTest hasRun.\n\tLongTestCase doNotRunLongTestCases.\n\n\t! !\n\n!LongTestCaseTestUnderTest methodsFor: 'testing' stamp: 'md 11/14/2004 21:30'!\ntestWhenRunMarkTestedToTrue\n\n\n\tRunStatus := true.! !\n\n!LongTestCaseTestUnderTest class methodsFor: 'accessing' stamp: 'sd 9/25/2004 14:02'!\nhasRun\n\n\t^ RunStatus! !\n\n!LongTestCaseTestUnderTest class methodsFor: 'accessing' stamp: 'md 11/14/2004 21:37'!\nmarkAsNotRun\n\n\t^ RunStatus := false! !\n\n!LyGraphicsLibrary class methodsFor: 'importing' stamp: 'ssa 8/28/2009 20:36'!\nfileReaderServicesForFile: fullName suffix: suffix\n\n\t^(#('gif' 'jpg' 'jpeg' 'bmp')includes: suffix)\n\t\tifTrue: [ self services]\n\t\tifFalse: [#()]! !\n\n!LyGraphicsLibrary class methodsFor: 'importing' stamp: 'ssa 3/9/2010 12:42'!\nimportGraphic: fileName\n\t\"self importGraphic:'/Users/samadams/Desktop/ssa working/lockClosed.gif'\"\n\t| fname image selector |\n\tfname _ fileName sansPeriodSuffix.\n\tselector _ fname copyFrom: (fname lastIndexOf:$/)+ 1 to: fname size.\n\timage _ Form fromFileNamed: fileName.\n\tself installGraphic: image named: selector.\n! !\n\n!LyGraphicsLibrary class methodsFor: 'importing' stamp: 'ssa 11/26/2009 22:54'!\ninstallGraphic: aForm named: aString\n\t\"add a new method to me named aString that regenerates aForm\"\n\t| selector response code startString |\n\tstartString _ aString  select:[:c| c isLetter | c isDigit].\n\tselector _ (self respondsTo: startString asSymbol)\n\t\tifTrue:[[response _ FillInTheBlank request:'Selector #',startString,' already used.\\Enter a new selector\\to store this graphic under' withCRs initialAnswer: startString.\n\t\t\tresponse isEmpty ifTrue:[^self].\n\t\t\tself respondsTo: response asSymbol] whileTrue.\n\t\t\tresponse]\n\t\tifFalse:[startString].\n\tcode _ selector,'\n\t\"Cursor blank showWhile:[self ',selector,' follow:[Sensor cursorPoint] while:[Sensor noButtonPressed]]\"\n\t\"FormView open: self ',selector,' named: ''',selector,'''\"\n\t^',aForm storeString.\n\n\tself class compile: code classified:'graphics'! !\n\n!LyGraphicsLibrary class methodsFor: 'importing' stamp: 'ssa 8/28/2009 19:51'!\nserviceImportGraphic\n\n\t^SimpleServiceEntry \n\t\tprovider: self \n\t\tlabel: 'import graphic' \n\t\tselector: #importGraphic: \n\t\tdescription: 'import graphic to LyGraphicLibrary' \n\t\tbuttonLabel: 'install'! !\n\n!LyGraphicsLibrary class methodsFor: 'importing' stamp: 'ssa 8/28/2009 19:48'!\nservices\n\n\t^ Array with: self serviceImportGraphic\n\n\t! !\n\n!LyGraphicsLibrary class methodsFor: 'graphics' stamp: 'ssa 1/5/2010 20:33'!\nselfTwistyClosed\n\t\"Cursor blank showWhile:[self selfTwistyClosed follow:[Sensor cursorPoint] while:[Sensor noButtonPressed]]\"\n\t^((ColorForm\n\textent: 5@10\n\tdepth: 8\n\tfromArray: #( 4278190080 0 4294901760 0 4294967040 0 4294967295 0 4294967295 4278190080 4294967295 4278190080 4294967295 0 4294967040 0 4294901760 0 4278190080 0)\n\toffset: 0@0)\n\tcolorsFromArray: #(#( ) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0)  ))! !\n\n!LyGraphicsLibrary class methodsFor: 'graphics' stamp: 'ssa 1/5/2010 20:33'!\nselfTwistyOpen\n\t\"Cursor blank showWhile:[self selfTwistyOpen follow:[Sensor cursorPoint] while:[Sensor noButtonPressed]]\"\n\t^((ColorForm\n\textent: 10@10\n\tdepth: 8\n\tfromArray: #( 0 4278190080 0 255 4294901760 0 65535 4294901760 0 16777215 4294967040 0 4294967295 4294967040 0 16777215 4294967295 0 255 4294967295 0 0 16777215 4278190080 0 255 4278190080 0 0 16711680)\n\toffset: 0@0)\n\tcolorsFromArray: #(#( ) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0)  ))! !\n\n!LyGraphicsLibrary class methodsFor: 'graphics' stamp: 'ssa 1/4/2010 16:22'!\nworkWarningCone\n\t\"Cursor blank showWhile:[self workWarningCone follow:[Sensor cursorPoint] while:[Sensor noButtonPressed]]\"\n\t^((ColorForm\n\textent: 64@64\n\tdepth: 8\n\tfromArray: #( 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4271808092 1549557758 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4266482012 1503549182 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4262222169 1128495870 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 1360216899 1128487254 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 135742239 1128481560 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 136201027 524501875 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 140067651 1128481566 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124109 742605599 1128481624 1459551998 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124040 320806723 524501827 1442774782 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124039 236526106 522133279 1442774782 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278079746 269028884 336863007 2052521726 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278084614 33820180 437919519 2544107262 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278059008 21712149 2223281059 2170748670 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4272103936 1610637408 2164359520 23110654 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4267704416 6291457 1616928864 1610711550 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4261412960 16810336 1616928769 2170585598 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4267713120 1610702944 23093344 2172739838 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 2734710784 1616928864 1616904577 1610703011 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 1610637313 1616904193 1619091585 2170585473 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 570458368 16810336 2170585440 1619067265 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 23093377 1619067232 1610702977 2172748198 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124116 177443713 2172748161 2172748161 2744355443 1459551998 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124109 135807833 1451853446 2256950614 1499225210 1912536830 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124040 656296259 1128481603 1130125660 1547918402 1912536830 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124071 675496771 1229144905 1128483139 1229538140 503250686 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278079752 356729667 1128483139 1128874825 1128483145 1938554622 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278085416 356731203 1128874825 1128483139 1229538121 2054094590 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278061095 407061315 1128481603 1128874825 1128483139 1131347710 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4269886504 505356063 1128481603 1128481603 1126113091 1230222590 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4267728903 1126111775 438247199 1126122271 522133315 2309198590 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4261437536 2205032218 521805599 438247199 524506515 2743173630 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4261478400 1619104405 2223409430 1433306757 2510520705 2172739838 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 2164285441 1610702977 1652654465 2172748161 2172752513 2172748195 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 1616904288 2170577025 1610711425 2172748161 2457960833 2173862273 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 6316128 1610702977 2170585473 2172748161 2172748178 2172748161 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124195 16777312 23093249 1619067265 1652646529 2173862273 2172748161 2784952062 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124128 6324481 1619100000 2172748161 2172748161 2172748161 2457960800 2751397630 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124132 1616928864 1619091585 2172748130 2172740242 2172752513 1619100033 2516516606 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124040 1684013408 2170552672 2164359553 2172748161 2172748161 1650483787 754908926 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278080551 1292416129 25264513 1619100033 2172748161 2173862290 2170683692 676855550 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124051 270422312 673012102 3028386177 1686208897 2173862290 2172756901 2536256029 946883070 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 671615244 507651880 742015836 1549183400 3030627491 2745414822 2996280648 1112087881 743721308 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278059779 134752019 1127876648 675891523 1229538121 1230784638 2120173897 1230981449 1229537353 493902409 1229586174 4278124286 4278124286 4278124286 4278124286 4278124286 4262200071 134875678 523380520 357122889 1128876355 1229539657 1229539657 1598638409 1229539423 1465152329 1128876542 4278124286 4278124286 4278124286 4278124286 4278124286 4268950279 134752286 1126705192 843663683 1229146441 1229146441 1229544521 1230981471 1229539657 1517383241 1230784841 1560215294 4278124286 4278124286 4278124286 4278124286 4266930691 134875706 1126639660 977486665 1229539651 1229539657 1548306780 1229545289 1600080223 1517383772 1229539679 1228938750 4278124286 4278124286 4278124286 4278124286 4278085939 134875667 1126639656 1212760905 1128876361 1229539657 1230784841 1598643273 1598644060 2117628255 1230784841 1598044211 4278124286 4278124286 4278124286 4278124286 4278124145 1846151692 405219111 1109346627 1128874825 1128876380 1229539679 1230784860 1229539679 1483823689 1548306780 1228943922 4278124286 4278124286 4278124286 4278124286 4278124286 2388069385 167912236 524492611 1128483139 1229146441 1229539657 1229539651 1128487260 2119671369 1229545289 1545418808 3221159678 4278124286 4278124286 4278124286 4278124286 4272786956 51387734 1549344579 524492611 1128481603 1128481603 1128481603 1130121632 1520322889 1230981468 1079676573 3388931838 4278124286 4278124286 4278124286 4278124286 4278095517 320020034 1549556825 1128481603 524501827 1128481603 1497586780 1549574304 1598638409 1598644128 2695732618 4278124286 4278124286 4278124286 4278124286 4278124286 4278124205 2685616926 1130143327 2656853081 1549556060 1499225180 1549753439 2694864713 1598638409 2694884768 2915041022 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 2911781407 522142537 1553883040 2657067100 2690621600 2694881375 1599889225 1235263661 2695741950 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4273778012 522133315 1128874825 1230784860 1549551945 1128481628 1229545376 2912985276 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124205 1547902751 1128481603 1128874825 1128481567 1128483164 2695736749 2919169790 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 2908504863 522142531 1126122271 1128481603 1549574317 2913861374 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4272791625 1128472387 524501827 1128488096 2913840583 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278100128 1547913539 1229146460 2694884781 3170828030 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124205 2912985248 2694884781 2696740606 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4273778080 2694888702 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286 4278124286)\n\toffset: 0@0)\n\tcolorsFromArray: #(#(1.0 1.0 1.0) #(0.972 0.878 0.815) #(0.972 0.815 0.627) #(0.972 0.784 0.564) #(0.972 0.784 0.47) #(0.972 0.753 0.595) #(0.972 0.753 0.501) #(0.972 0.721 0.564) #(0.972 0.721 0.501) #(0.972 0.721 0.313) #(0.972 0.69 0.439) #(0.972 0.69 0.282) #(0.972 0.658 0.408) #(0.972 0.658 0.376) #(0.972 0.658 0.156) #(0.972 0.627 0.376) #(0.972 0.627 0.345) #(0.972 0.627 0.313) #(0.972 0.627 0.125) #(0.972 0.595 0.282) #(0.972 0.595 0.094) #(0.972 0.564 0.313) #(0.972 0.564 0.219) #(0.972 0.533 0.188) #(0.972 0.533 0.125) #(0.972 0.533 0.063) #(0.972 0.533 0.031) #(0.972 0.533 0.0) #(0.972 0.501 0.0) #(0.972 0.47 0.219) #(0.972 0.47 0.063) #(0.972 0.47 0.031) #(0.94 0.94 0.972) #(0.94 0.94 0.94) #(0.94 0.909 0.878) #(0.94 0.753 0.627) #(0.94 0.721 0.533) #(0.94 0.69 0.501) #(0.94 0.69 0.47) #(0.94 0.658 0.501) #(0.94 0.658 0.439) #(0.94 0.627 0.47) #(0.94 0.627 0.439) #(0.94 0.627 0.408) #(0.94 0.595 0.408) #(0.94 0.595 0.376) #(0.94 0.595 0.345) #(0.94 0.564 0.376) #(0.94 0.564 0.345) #(0.94 0.564 0.282) #(0.94 0.533 0.345) #(0.94 0.533 0.25) #(0.94 0.501 0.313) #(0.94 0.501 0.282) #(0.94 0.501 0.219) #(0.94 0.501 0.188) #(0.94 0.47 0.25) #(0.94 0.47 0.188) #(0.94 0.47 0.156) #(0.94 0.47 0.0) #(0.94 0.439 0.188) #(0.94 0.439 0.094) #(0.94 0.439 0.063) #(0.94 0.439 0.0) #(0.94 0.408 0.156) #(0.94 0.408 0.125) #(0.94 0.408 0.063) #(0.94 0.408 0.031) #(0.94 0.408 0.0) #(0.94 0.376 0.094) #(0.94 0.376 0.031) #(0.94 0.376 0.0) #(0.94 0.345 0.063) #(0.94 0.313 0.031) #(0.94 0.313 0.0) #(0.909 0.784 0.627) #(0.909 0.721 0.564) #(0.909 0.658 0.47) #(0.909 0.658 0.408) #(0.909 0.627 0.47) #(0.909 0.627 0.439) #(0.909 0.595 0.408) #(0.909 0.595 0.376) #(0.909 0.564 0.282) #(0.909 0.533 0.345) #(0.909 0.501 0.188) #(0.909 0.47 0.156) #(0.909 0.408 0.188) #(0.909 0.408 0.063) #(0.909 0.408 0.0) #(0.909 0.376 0.156) #(0.909 0.376 0.063) #(0.909 0.345 0.031) #(0.909 0.345 0.0) #(0.909 0.313 0.031) #(0.909 0.282 0.0) #(0.878 0.878 0.909) #(0.878 0.878 0.878) #(0.878 0.847 0.847) #(0.878 0.847 0.815) #(0.878 0.815 0.753) #(0.878 0.784 0.721) #(0.878 0.721 0.595) #(0.878 0.658 0.501) #(0.878 0.627 0.501) #(0.878 0.595 0.47) #(0.878 0.533 0.376) #(0.878 0.533 0.313) #(0.878 0.533 0.219) #(0.878 0.501 0.313) #(0.878 0.501 0.282) #(0.878 0.501 0.25) #(0.878 0.47 0.313) #(0.878 0.47 0.282) #(0.878 0.47 0.25) #(0.878 0.47 0.219) #(0.878 0.47 0.188) #(0.878 0.439 0.25) #(0.878 0.439 0.219) #(0.878 0.439 0.188) #(0.878 0.439 0.156) #(0.878 0.439 0.125) #(0.878 0.439 0.094) #(0.878 0.408 0.156) #(0.878 0.408 0.125) #(0.878 0.376 0.125) #(0.878 0.345 0.094) #(0.878 0.313 0.0) #(0.878 0.282 0.0) #(0.847 0.847 0.847) #(0.847 0.815 0.815) #(0.847 0.69 0.627) #(0.847 0.627 0.408) #(0.847 0.595 0.408) #(0.847 0.564 0.345) #(0.847 0.564 0.313) #(0.847 0.501 0.345) #(0.847 0.501 0.25) #(0.847 0.439 0.282) #(0.847 0.439 0.219) #(0.847 0.408 0.156) #(0.847 0.408 0.125) #(0.847 0.345 0.063) #(0.847 0.313 0.063) #(0.815 0.815 0.847) #(0.815 0.815 0.815) #(0.815 0.784 0.753) #(0.815 0.69 0.595) #(0.815 0.69 0.564) #(0.815 0.658 0.564) #(0.815 0.595 0.439) #(0.815 0.533 0.408) #(0.815 0.533 0.345) #(0.815 0.501 0.313) #(0.815 0.439 0.25) #(0.815 0.408 0.219) #(0.815 0.376 0.156) #(0.815 0.345 0.125) #(0.815 0.345 0.0) #(0.815 0.313 0.0) #(0.815 0.282 0.031) #(0.815 0.282 0.0) #(0.815 0.25 0.0) #(0.784 0.784 0.753) #(0.784 0.753 0.784) #(0.784 0.721 0.69) #(0.784 0.69 0.627) #(0.784 0.658 0.595) #(0.784 0.627 0.533) #(0.784 0.501 0.345) #(0.784 0.313 0.094) #(0.784 0.313 0.0) #(0.784 0.282 0.063) #(0.784 0.282 0.031) #(0.784 0.25 0.0) #(0.753 0.753 0.753) #(0.753 0.69 0.658) #(0.753 0.658 0.564) #(0.753 0.595 0.501) #(0.753 0.25 0.0) #(0.721 0.721 0.721) #(0.721 0.69 0.69) #(0.721 0.595 0.564) #(0.721 0.595 0.533) #(0.721 0.408 0.156) #(0.69 0.313 0.125) #(0.69 0.25 0.031) #(0.69 0.25 0.0) #(0.69 0.219 0.0) #(0.658 0.345 0.188) #(0.658 0.313 0.125) #(0.658 0.282 0.094) #(0.658 0.25 0.063) #(0.658 0.219 0.0) #(0.627 0.313 0.156) #(0.627 0.25 0.063) #(0.627 0.219 0.031) #(0.595 0.376 0.282) #(0.595 0.25 0.063) #(0.595 0.188 0.0) #(0.564 0.533 0.533) #(0.564 0.219 0.063) #(0.564 0.188 0.0) #(0.533 0.533 0.533) #(0.533 0.501 0.501) #(0.533 0.156 0.0) #(0.47 0.439 0.439) #(0.47 0.408 0.345) #(0.47 0.345 0.313) #(0.47 0.282 0.188) #(0.47 0.219 0.031) #(0.47 0.188 0.031) #(0.47 0.156 0.0) #(0.439 0.408 0.376) #(0.439 0.219 0.125) #(0.439 0.188 0.094) #(0.439 0.156 0.063) #(0.439 0.156 0.031) #(0.439 0.125 0.0) #(0.408 0.188 0.063) #(0.408 0.156 0.031) #(0.408 0.125 0.0) #(0.376 0.345 0.313) #(0.376 0.313 0.282) #(0.376 0.125 0.0) #(0.345 0.345 0.345) #(0.345 0.282 0.282) #(0.313 0.313 0.313) #(0.313 0.313 0.282) #(0.313 0.094 0.0) #(0.282 0.094 0.0) #(0.25 0.25 0.25) #(0.25 0.125 0.031) #(0.25 0.063 0.0) #(0.219 0.219 0.219) #(0.219 0.188 0.188) #(0.219 0.156 0.125) #(0.219 0.125 0.063) #(0.219 0.125 0.0) #(0.219 0.094 0.031) #(0.219 0.063 0.0) #(0.188 0.188 0.188) #(0.188 0.063 0.0) #(0.156 0.156 0.156) #(0.156 0.031 0.0) #(0.125 0.063 0.031) #(0.125 0.031 0.0) #(0.094 0.094 0.094) #(0.094 0.063 0.063) #(0.094 0.031 0.0) #(0.063 0.031 0.031) #(0.063 0.0 0.0) #(0.031 0.031 0.031) #(0.0 0.0 0.0) #( ) #(0.0 0.0 0.0)  ))! !\n\n!LyGraphicsLibrary class methodsFor: 'transforming' stamp: 'ssa 8/31/2009 12:30'!\naudition: selector\n\t\"self audition: #rgbAddButton\"\n\t\"Audition a graphic, resizing it dynamically based on its screen x location, Answering the resized icon\"\n\t\n\t| resized |\n\tSensor waitNoButton.\n\tCursor blank show.\n\t[Sensor noButtonPressed]\n\t\twhileTrue:[ resized _ self graphicNamed: selector resizedTo: Sensor cursorPoint.\n\t\t\tresized follow:[Sensor cursorPoint] while:[false]].\n\tCursor normal show.\n\t^resized! !\n\n!LyGraphicsLibrary class methodsFor: 'transforming' stamp: 'ssa 8/31/2009 13:14'!\ngraphicNamed: selector resizedTo: anExtentPoint\n\t\"(self graphicNamed: #rgbAddButton resizedTo: 16@16) followCursor\"\n\t\"(self graphicNamed: #rgbAddButton resizedTo: 400@400) followCursor\"\n\n\t| base resized |\n\tbase _ self perform: selector.\n\tresized _ base scaledToSize: anExtentPoint.\n\tresized offset: (base offset/ base extent) * resized offset rounded.\n\t^resized! !\n\n!LyGraphicsLibrary class methodsFor: 'transforming' stamp: 'ssa 8/31/2009 17:19'!\ngraphicNamed: selector withWhitemappedTo: aColor \n\t\"(self graphicNamed: #closedTwisty withWhitemappedTo: Color lightBlue) followCursor\"\n\t\"(self graphicNamed: #closedTwisty withWhitemappedTo: Color green) followCursor\"\n\n\t| base |\n\tbase _ self perform: selector.\n\tbase mapColor: Color white to: aColor.\n\t^base! !\n\n!LyPluggableOutlineController methodsFor: 'selecting' stamp: 'ssa 9/9/2009 16:35'!\nredButtonActivity\n\t\n\tsuper redButtonActivity.\n\tself view twistyTargets keys detect:[:box| box containsPoint: Sensor cursorPoint] ifNone:[^self].\n\tself model toggleSelection! !\n\n!LyPluggableOutlineView methodsFor: 'accessing' stamp: 'ssa 9/9/2009 10:58'!\nboxFor: index\n\t\"Answer the rectangle in which the item is displayed.\"\n\t\n\t| offset |\n\toffset _ (index - 1 + (topDelimiter == nil ifTrue: [0] ifFalse: [1]))* list lineGrid.\n\t^(self insetDisplayBox left @ (list compositionRectangle top +offset) \n\t\textent: self insetDisplayBox width @ list lineGrid)\n\t\tinsetBy: (Rectangle left: 1 right: 1 top: 1 bottom: 0)! !\n\n!LyPluggableOutlineView methodsFor: 'accessing' stamp: 'ssa 9/9/2009 10:52'!\ngetChildrenSelector\n\t\"Answer the value of getChildrenSelector\"\n\n\tgetChildrenSelector isNil ifTrue:[self getChildrenSelector: #subobjects].\n\t^ getChildrenSelector! !\n\n!LyPluggableOutlineView methodsFor: 'accessing' stamp: 'ssa 9/9/2009 10:51'!\ngetChildrenSelector: anObject\n\t\"Set the value of getChildrenSelector\"\n\n\tgetChildrenSelector _ anObject! !\n\n!LyPluggableOutlineView methodsFor: 'accessing' stamp: 'ssa 3/1/2010 12:28'!\nindentBoxFor: index\n\t\"Answer the rectangle which counds the whitespace in front of the item at this index\"\n\t\n\t| itemBox indents |\n\titemBox _ self boxFor: index.\n\tindents _ self indentFor:(self objects at: index).\n\t\n\t^itemBox width: (Paragraph withText: indents asText style: self textStyle)  boundingBox width.! !\n\n!LyPluggableOutlineView methodsFor: 'accessing' stamp: 'ssa 9/9/2009 14:42'!\nindentFor: anItem\n\n\t| aStream |\n\taStream _ WriteStream on:''.\n\t(self levelOf: anItem) timesRepeat:[aStream tab].\n\t^aStream contents,'    '! !\n\n!LyPluggableOutlineView methodsFor: 'accessing' stamp: 'ssa 9/10/2009 16:00'!\nlabelForItem: anItem\n\t\"Subclasses may want to override\"\n\n\t^(self indentFor: anItem),anItem outlineString! !\n\n!LyPluggableOutlineView methodsFor: 'accessing' stamp: 'ssa 9/9/2009 11:59'!\nlevelOf: anItem\n\n\t^self model levelOf: anItem! !\n\n!LyPluggableOutlineView methodsFor: 'accessing' stamp: 'ssa 9/9/2009 16:25'!\ntwistyTargets\n\t\"Answer the value of twistyTargets\"\n\n\ttwistyTargets isNil ifTrue:[self twistyTargets: Dictionary new].\n\t^ twistyTargets! !\n\n!LyPluggableOutlineView methodsFor: 'accessing' stamp: 'ssa 9/9/2009 16:24'!\ntwistyTargets: anObject\n\t\"Set the value of twistyTargets\"\n\n\ttwistyTargets _ anObject! !\n\n!LyPluggableOutlineView methodsFor: 'displaying' stamp: 'ssa 9/11/2009 17:06'!\ndisplayTwisties\n\n\t| box isOpen twisty to firstIndex |\n\tfirstIndex _ self firstShown.\n\tfirstIndex to: ((self list numberOfLines - 2)min:(firstIndex + self numSelectionsInView )) do:[:index|\n\t\t(self model hasChildren: (self objects at: index)) ifTrue:[ \n\t\t\tbox _ self indentBoxFor: index.\n\t\t\tisOpen _ self model isOpen:(self objects at: index).\n\t\t\ttwisty _ isOpen ifTrue:[self openedTwistyIcon]ifFalse:[self closedTwistyIcon].\n\t\t\ttwisty\n\t\t\t\tdisplayOn: Display\n\t\t\t\tat: (to_box topRight - (twisty width@0))\n\t\t\t\tclippingBox: (box intersect: self clippingBox)\n\t\t\t\trule: Form paint\n\t\t\t\tfillColor: nil.\n\t\t\tself twistyTargets at:(to extent: twisty extent) put: index]].! !\n\n!LyPluggableOutlineView methodsFor: 'displaying' stamp: 'ssa 1/22/2010 14:03'!\ndisplayView\n\n\tself list foregroundColor: self foregroundColor backgroundColor: self backgroundColor.\n\tself list displayOn: Display at: self insetDisplayBox origin - (0@self scrollCache) clippingBox: self insetDisplayBox.\n\t(self insetDisplayBox copy areasOutside: (self insetDisplayBox origin extent: self list compositionRectangle   extent )) do:[:box| Display fill: box fillColor: Color white].\n\tself displayTwisties.\n\t! !\n\n!LyPluggableOutlineView methodsFor: 'displaying' stamp: 'ssa 11/25/2009 12:55'!\npositionList\n\n\tlist wrappingBox: self wrappingBox  clippingBox: self clippingBox! !\n\n!LyPluggableOutlineView methodsFor: 'icons' stamp: 'ssa 9/9/2009 13:33'!\nclosedTwistyIcon\n\n\t^LyGraphicsLibrary selfTwistyClosed! !\n\n!LyPluggableOutlineView methodsFor: 'icons' stamp: 'ssa 9/9/2009 13:33'!\nopenedTwistyIcon\n\n\t^LyGraphicsLibrary selfTwistyOpen! !\n\n!LyPluggableOutlineView methodsFor: 'scrolling support' stamp: 'ssa 11/25/2009 12:36'!\nscrollBy: anInteger \n\n\tsuper scrollBy: anInteger .\n\tself displayTwisties.\n\t^true! !\n\n!LyPluggableOutlineView methodsFor: 'controller access' stamp: 'ssa 9/9/2009 16:34'!\ndefaultControllerClass\n\n\t^LyPluggableOutlineController! !\n\n!LyPluggableOutlineView methodsFor: 'controller access' stamp: 'ssa 9/9/2009 16:28'!\ndefaultCsntrollerClass\n\n\t^LyPluggableOutlineController! !\n\n!MSWLookTransporter methodsFor: 'initializing' stamp: 'sm 3/10/2011 12:25'!\ninitialize\n\tself initializePackage.\n\tself initializePreambleAndPostscript.\n\tself initializeTeam.! !\n\n!MSWLookTransporter methodsFor: 'initializing' stamp: 'sm 3/9/2011 16:48'!\ninitializePackage\n\tself package: (PackageInfo named: 'Interface-MSWLook').! !\n\n!MSWLookTransporter methodsFor: 'initializing' stamp: 'sm 3/11/2011 11:34'!\ninitializePreambleAndPostscript\n\tself\n\t\tpreambleBlock: [:file | PackageWhoseContentsMustBeTransportedInOrder \n\t\t\t\t\t\t\t\tnew \n\t\t\t\t\t\t\t\t\tsaveClassAndMethodModificationsInOrder: self\n\t\t\t\t\t\t\t\t\ttrickyModificationsThatNeedToBeDoneInOrder on: file];\n\t\tpostscriptBlock: [:file | \t\n\t\t\tfile nextPutAll: '\"Just using some of the things of the MSWLook, not the actual systems view.\"'; cr.\n\t\t\tfile nextPutAll: 'MSWSystemView unInstall.'; cr.\n\t\t].! !\n\n!MSWLookTransporter methodsFor: 'initializing' stamp: 'sm 3/9/2011 17:05'!\ninitializeTeam\n\tself team: (ProjectTeam new\n\t\t\t\tinitialsOfProjectMembers: {'dmu'. 'smu'. 'ssa'. 'ads'. 'sm'. 'piv'. 'max'};\n\t\t\n\t\t\t\t\"The Renaissance image is based on Squeak 3.7, which was put out in 2004; the Renaissance project started in 2007 or 2008.\n\t\t\t\t I don't understand why some of our methods are stamped 1970, though. -- Adam\"\n\t\t\t\ttimestampFilter: [:t | t year > 2005 or: [t year = 1970]]; \n\t\t\n\t\t\t\tyourself).! !\n\n!MSWLookTransporter methodsFor: 'initializing' stamp: 'sm 5/31/2011 14:14'!\ntrickyModificationsThatNeedToBeDoneInOrder\n\t\"TODO: STEFAN find a better way to manage these changes, don't want to change method category, and this seems to be the only way for now to track those changes to core\"\n\t\n\t^ {\n\t\t{ 'ScrollController'. 'controlInitialize' }.\n\t\t{ 'ScrollController'. 'controlTerminate' }.\n\t\t{ 'ScrollController'. 'controlActivity' }.\n\t\t{ 'ScrollController'. 'isControlActive' }.\n\t\t{ 'ScrollController'. 'moveMarker' }.\n\t\t{ 'ScrollController'. 'moveMarkerTo:' }.\n\t\t\n\t\t{ 'StandardSystemView class'. 'new' }.\n\n\t\t{ 'StandardSystemController' }.\n\t\t{ 'StandardSystemController'. 'adjustWindowCorners' }.\n\t\t{ 'StandardSystemController'. 'checkForReframe' }.\n\t\t\n\t\t{ 'StringHolderView' }.\n\t\t{ 'StringHolderView'. 'updateDisplayContents' }.\n\t\t{ 'StringHolderView class'. 'open:label:' }.\n\t\t\t\t\n\t\t{ 'ParagraphEditor'. 'controlActivity' }.\n\t\t{ 'ParagraphEditor'. 'scrollView:' }.\n\t\t\n\t\t{ 'Preferences class'. 'enable:'  }.\n\t\t\n\t\t{ 'Character class'. 'arrowDown' }.\n\t\t{ 'Character class'. 'arrowLeft' }.\n\t\t{ 'Character class'. 'arrowRight' }.\n\t\t{ 'Character class'. 'arrowUp' }.\n\t\t{ 'Character class'. 'escape' }.\n\t\t{ 'Character class'. 'nbsp' }.\n\t\t{ 'Character class'. 'pageDown' }.\n\t\t{ 'Character class'. 'pageUp' }.\n\t\t\n\t\t{ 'PluggableTextView class'. 'on:text:accept:readSelection:menu:' }.\n\t\t{  'PluggableListView class'. 'on:list:selected:changeSelected:menu:keystroke:' }.\n\t\t{  'DisplayTextView class'. 'open:label:' }.\n\t\t{  'DisplayTextView class'. 'example2' }.\n\t\t\n\t\t{ 'FileList class'. 'open' }.\n\t\t{ 'ParagraphEditor'. 'updateMarker' }.\n\t\t{ 'View'. 'unlock' }.\n\n\n\t}! !\n\n!MSWScrollBarController methodsFor: 'delays' stamp: 'ssa 1/15/98 13:51'!\ndefaultUnitScrollDelay\n        \"Answer the delay to use when unit scrolling, i.e., pressing the up or down button.\"\n\n        ^Delay forMilliseconds: 50! !\n\n!MSWScrollBarController methodsFor: 'delays' stamp: 'ssa 1/15/98 13:52'!\nwait\n\n        self defaultUnitScrollDelay wait! !\n\n!MSWScrollBarController methodsFor: 'accessing' stamp: 'ssa 8/22/2009 15:13'!\nelevatorBox\n        \"Compute this each time since the view content my change.\"\n\n        | box originY extentY |\n        box _ self view elevatorShaft.\n        extentY _ self viewToScroll  percentVisibleContent * box height.\n        originY _  (self viewToScroll percentPreceedingContent * box height) min: box height - extentY.\n        ^(box origin x asInteger @ (box origin y + originY) asInteger max: box origin) extent: ((box extent x asInteger @ extentY asInteger) min: box extent max: 10@box width)! !\n\n!MSWScrollBarController methodsFor: 'accessing' stamp: 'ssa 12/5/97 16:00'!\nscroller\n\n        ^self viewToScroll controller! !\n\n!MSWScrollBarController methodsFor: 'accessing' stamp: 'ssa 1/15/98 13:50'!\nunitScrollDelay\n        \"<^hOf Delay>\"\n        \"ssa 1/15/98 13:50 - Answer the instance variable, unitScrollDelay\"\n\n        unitScrollDelay isNil ifTrue:[self unitScrollDelay: self defaultUnitScrollDelay].\n        ^unitScrollDelay! !\n\n!MSWScrollBarController methodsFor: 'accessing' stamp: 'ssa 1/15/98 13:50'!\nunitScrollDelay: aDelay \n        \"<aDelay: hOf Delay, ^self>\"\n        \"ssa 1/15/98 13:50 - Set unitScrollDelay to be aDelay.\"\n\n        unitScrollDelay _ aDelay! !\n\n!MSWScrollBarController methodsFor: 'accessing' stamp: 'ssa 12/5/97 14:40'!\nviewToScroll\n\n        ^self view subViews first! !\n\n!MSWScrollBarController methodsFor: 'scrolling' stamp: 'ssa 12/5/97 16:07'!\npageDown\n        \"Scroll down by one page length.\"\n        self scroller scrollView: self pageHeight negated.\n        self view updateElevator! !\n\n!MSWScrollBarController methodsFor: 'scrolling' stamp: 'ssa 12/5/97 16:00'!\npageHeight\n        \"Answer the height of a page for the scrolling view.\"\n\n        ^self viewToScroll displayBox height! !\n\n!MSWScrollBarController methodsFor: 'scrolling' stamp: 'ssa 8/27/2009 07:11'!\npageUp\n        \"Scroll up by one page length.\"\n       self scroller scrollView: self pageHeight.\n        self view updateElevator! !\n\n!MSWScrollBarController methodsFor: 'scrolling' stamp: 'stp 2/18/98 13:50'!\nreallyScrollAbsolute\n\n        | height center offset |\n        center _ self view elevatorBox center y.\n        offset _ (center - Sensor cursorPoint y). \n        height _ self view elevatorShaft height.\n        (self viewToScroll percentPreceedingContent ~= 0.0 or:\n                        [self viewToScroll percentVisibleContent < 1.0])\n                ifTrue:[self scroller scrollView: ((offset / height) \n                                * (self scroller view totalContentHeight \n                                        * self scroller view unitContentHeight)) asInteger.\n                        self view updateElevator]! !\n\n!MSWScrollBarController methodsFor: 'scrolling' stamp: 'stp 2/18/98 13:53'!\nscrollAbsolute\n        | lastY thisY |\n        [Sensor redButtonPressed]\n                whileTrue:  \n                        [thisY := Sensor cursorPoint y.\n                        lastY isNil\n                                ifTrue: [lastY := thisY.\n                                        self reallyScrollAbsolute]\n                                ifFalse: [lastY = thisY\n                                        ifFalse: [lastY := thisY.\n                                                self reallyScrollAbsolute]]]! !\n\n!MSWScrollBarController methodsFor: 'scrolling' stamp: 'ssa 1/15/98 13:54'!\nunitDown\n        \"Scroll down by one content unit.\"\n\n        self view displayDownButtonPressed.\n        [Sensor redButtonPressed] whileTrue:[\n                self scroller scrollView: self unitHeight negated.\n                self view updateElevator.\n                self wait].\n        self view displayDownButton.\n! !\n\n!MSWScrollBarController methodsFor: 'scrolling' stamp: 'ssa 12/5/97 16:00'!\nunitHeight\n        \"Answer the height of a content unit for the scrolling view.\"\n\n        ^self viewToScroll unitContentHeight! !\n\n!MSWScrollBarController methodsFor: 'scrolling' stamp: 'ssa 1/15/98 13:54'!\nunitUp\n        \"Scroll up by one content unit.\"\n\n        self view displayUpButtonPressed.\n        [Sensor redButtonPressed] whileTrue:[\n                self scroller scrollView: self unitHeight.\n                self view updateElevator.\n                self wait].\n        self view displayUpButton.\n! !\n\n!MSWScrollBarController methodsFor: 'control activity' stamp: 'ssa 1/8/98 16:28'!\ncontrolActivity \n        \"Refer to the comment in Controller|controlActivity.\"\n\n        (Sensor redButtonPressed and:[self view scrollBarBox containsPoint: Sensor cursorPoint])\n                                ifTrue: [^self redButtonActivity].\n        super controlActivity\n! !\n\n!MSWScrollBarController methodsFor: 'control activity' stamp: 'ssa 8/27/2009 04:44'!\nredButtonActivity\n\n        | point |\n\"       self scroller view visibleContentHeight >= (self scroller view totalContentHeight + 2)\n                ifTrue:[^self].\"\n        point _ Sensor cursorPoint.\n        (self view upButtonBox containsPoint: point)\n                ifTrue:[^self unitUp].\n        (self view downButtonBox containsPoint: point)\n                ifTrue:[^self unitDown].\n        (self view elevatorBox containsPoint: point)\n                ifTrue:[^self scrollAbsolute].\n\t\n        self view elevatorBox center y > point y\n                ifTrue:[self wait.  self pageUp]\n                ifFalse:[self wait.   self pageDown].\n\n! !\n\n!MSWScrollBarController methodsFor: 'delegation' stamp: 'ssa 8/21/2009 12:55'!\ndoesNotUnderstand: aMessage\n        \"Here it comes, the dreaded doesNotUnderstand:  HACK   ssa 1/23/98 14:55\"\n\n        ^self viewToScroll controller perform: aMessage selector withArguments: aMessage arguments! !\n\n!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 11/30/2009 17:33'!\nbackgroundColor: aColor\n\t\"Blow the caches\"\n\tsuper backgroundColor: aColor.\n\tself elevatorCache:nil.\n\tself downButtonCache: nil.\n\tself upButtonCache: nil.\n\t! !\n\n!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/5/97 12:24'!\ndownButtonBox\n        \"<^hOf Rectangle>\"\n        \"ssa 12/5/97 11:15 - Answer the instance variable, downButtonBox\"\n\n        downButtonBox isNil ifTrue:[self downButtonBox: self determineDownButtonBox].\n        ^downButtonBox! !\n\n!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/5/97 11:15'!\ndownButtonBox: aRectangle \n        \"<aRectangle: hOf Rectangle, ^self>\"\n        \"ssa 12/5/97 11:15 - Set downButtonBox to be aRectangle.\"\n\n        downButtonBox _ aRectangle! !\n\n!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/11/97 11:46'!\ndownButtonCache\n        \"<^hOf Form>\"\n        \"ssa 12/11/97 11:43 - Answer the instance variable, downButtonCache\"\n\n        downButtonCache isNil ifTrue:[self downButtonCache: (Form extent:1@1)].\n        ^downButtonCache! !\n\n!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/11/97 11:43'!\ndownButtonCache: aColorForm \n        \"<aColorForm: hOf ColorForm, ^self>\"\n        \"ssa 12/11/97 11:43 - Set downButtonCache to be aColorForm.\"\n\n        downButtonCache _ aColorForm! !\n\n!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/5/97 16:29'!\nelevatorBox\n        \"Answer the rectangle for the elevator.\"\n\n        ^self controller elevatorBox! !\n\n!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 9/9/2009 16:45'!\nelevatorCache\n        \"<^hOf Form>\"\n        \"ssa 12/10/97 16:32 - Answer the instance variable, elevatorCache\"\n\n        elevatorCache isNil ifTrue:[self elevatorCache: (Form extent:1@1)].\n        ^elevatorCache ! !\n\n!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/10/97 16:32'!\nelevatorCache: aForm \n        \"<aForm: hOf Form, ^self>\"\n        \"ssa 12/10/97 16:32 - Set elevatorCache to be aForm.\"\n\n        elevatorCache _ aForm! !\n\n!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/5/97 14:18'!\nelevatorShaft\n        \"<^hOf Rectangle>\"\n        \"ssa 12/5/97 14:18 - Answer the instance variable, elevatorShaft\"\n\n        elevatorShaft isNil ifTrue:[self elevatorShaft: self determineElevatorShaft].\n        ^elevatorShaft! !\n\n!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/5/97 14:18'!\nelevatorShaft: aRectangle \n        \"<aRectangle: hOf Rectangle, ^self>\"\n        \"ssa 12/5/97 14:18 - Set elevatorShaft to be aRectangle.\"\n\n        elevatorShaft _ aRectangle! !\n\n!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/11/97 12:43'!\ngetWindow\n        \"This is here to break a recursive loop caused by the indirection of my display transformation.\"\n        self window isNil ifTrue:[self window: Display boundingBox].\n        ^self window! !\n\n!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 8/27/2009 04:51'!\nmodel: aModel\n\n\tmodel ~~ nil & (model ~~ aModel)\n\t\tifTrue: [model removeDependent: self].\n\taModel ~~ nil & (aModel ~~ model)\n\t\tifTrue: [aModel addDependent: self].\n\tmodel _ aModel.\n! !\n\n!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/5/97 11:28'!\nscrollBarBox\n        \"<^hOf Rectangle>\"\n        \"ssa 12/5/97 11:15 - Answer the instance variable, scrollBarBox\"\n\n        scrollBarBox isNil ifTrue:[self scrollBarBox: self determineScrollBarBox].\n        ^scrollBarBox! !\n\n!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/5/97 11:15'!\nscrollBarBox: aRectangle \n        \"<aRectangle: hOf Rectangle, ^self>\"\n        \"ssa 12/5/97 11:15 - Set scrollBarBox to be aRectangle.\"\n\n        scrollBarBox _ aRectangle! !\n\n!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/10/97 14:05'!\nscrollBarWidth\n        \"<^hOf Integer>\"\n        \"ssa 12/5/97 11:27 - Answer the instance variable, scrollBarWidth\"\n\n        scrollBarWidth isNil ifTrue:[self scrollBarWidth: 12].\n        ^scrollBarWidth! !\n\n!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/5/97 11:27'!\nscrollBarWidth: anInteger \n        \"<anInteger: hOf Integer, ^self>\"\n        \"ssa 12/5/97 11:27 - Set scrollBarWidth to be anInteger.\"\n\n        scrollBarWidth _ anInteger! !\n\n!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 1/24/98 16:06'!\nscrollingView\n\n        ^self subViews isEmpty ifTrue:[nil] ifFalse:[self subViews first]! !\n\n!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/5/97 13:59'!\nupButtonBox\n        \"<^hOf Rectangle>\"\n        \"ssa 12/5/97 11:15 - Answer the instance variable, upButtonBox\"\n\n        upButtonBox isNil ifTrue:[self upButtonBox: self determineUpButtonBox].\n        ^upButtonBox! !\n\n!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/5/97 11:15'!\nupButtonBox: aRectangle \n        \"<aRectangle: hOf Rectangle, ^self>\"\n        \"ssa 12/5/97 11:15 - Set upButtonBox to be aRectangle.\"\n\n        upButtonBox _ aRectangle! !\n\n!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/11/97 11:46'!\nupButtonCache\n        \"<^hOf Form>\"\n        \"ssa 12/11/97 11:43 - Answer the instance variable, upButtonCache\"\n\n        upButtonCache isNil ifTrue:[self upButtonCache: (Form extent:1@1)].\n        ^upButtonCache! !\n\n!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/11/97 11:43'!\nupButtonCache: aColorForm \n        \"<aColorForm: hOf ColorForm, ^self>\"\n        \"ssa 12/11/97 11:43 - Set upButtonCache to be aColorForm.\"\n\n        upButtonCache _ aColorForm! !\n\n!MSWScrollBarView methodsFor: 'accessing' stamp: 'ssa 12/11/97 12:44'!\nwindow\n        \"This is here to break a recursive loop caused by the indirection of my display transformation.\"\n        window isNil ifTrue:[self window: Display boundingBox].\n        ^window! !\n\n!MSWScrollBarView methodsFor: 'bordering' stamp: 'ssa 1/24/98 16:05'!\nborderWidth: anything\n\n        super borderWidth:1.\n! !\n\n!MSWScrollBarView methodsFor: 'control defaults' stamp: 'stp 02/18/98 0-11:'!\ndefaultControllerClass\n\n        ^MSWScrollBarController! !\n\n!MSWScrollBarView methodsFor: 'delegation' stamp: 'ssa 1/23/98 14:56'!\ndoesNotUnderstand: aMessage\n        \"Here it comes, the dreaded doesNotUnderstand:  HACK   ssa 1/23/98 14:55\"\n\n        ^self scrollingView perform: aMessage selector withArguments: aMessage arguments! !\n\n!MSWScrollBarView methodsFor: 'delegation' stamp: 'ssa 3/24/2010 14:37'!\nupdate: aSymbol\n\tself topView ifNotNil:[self topView isCollapsed ifFalse:[self updateElevator]].\n\tsuper update: aSymbol.\n\t\"self subViews do:[:each| each update: aSymbol]\"! !\n\n!MSWScrollBarView methodsFor: 'delegation' stamp: 'ssa 1/21/2010 12:24'!\nupdate: aSymbol with: aValue\n\n\tself updateElevator.\n\tsuper update: aSymbol  with: aValue.\n\t\"self subViews do:[:each| each update: aSymbol with: aValue]\"! !\n\n!MSWScrollBarView methodsFor: 'delegation' stamp: 'ssa 8/27/2009 04:55'!\nupdateListsAndCodeIn: aWindow\n\tself updateElevator.\n\tsuper  updateListsAndCodeIn: aWindow.\n\t^self subViews first updateListsAndCodeIn: aWindow! !\n\n!MSWScrollBarView methodsFor: 'display box access' stamp: 'ssa 8/27/2009 09:29'!\ndetermineDownButtonBox\n        \"Answer the rectangle for the scroll bar down button.\"\n\n        ^self scrollBarBox corner -  self scrollBarBox width asPoint extent: (self scrollBarBox width)asPoint! !\n\n!MSWScrollBarView methodsFor: 'display box access' stamp: 'ssa 12/5/97 12:38'!\ndetermineElevatorBox\n        \"Answer the rectangle for the scroll bar elevator.\"\n\n        ^self scrollBarBox center -  (self scrollBarWidth asPoint // 2) extent: self scrollBarWidth asPoint! !\n\n!MSWScrollBarView methodsFor: 'display box access' stamp: 'ssa 12/5/97 14:19'!\ndetermineElevatorShaft\n        \"Answer the rectangle for the scroll bar down button.\"\n\n        ^self upButtonBox bottomLeft corner: self downButtonBox topRight! !\n\n!MSWScrollBarView methodsFor: 'display box access' stamp: 'ssa 12/5/97 12:47'!\ndetermineScrollBarBox\n        \"Answer the rectangle for the scroll bar region.\"\n\n        ^(self realInsetDisplayBox areasOutside: self insetDisplayBox) first! !\n\n!MSWScrollBarView methodsFor: 'display box access' stamp: 'ssa 12/5/97 12:52'!\ndetermineUpButtonBox\n        \"Answer the rectangle for the scroll bar up button.\"\n\n        ^self scrollBarBox origin extent: self scrollBarBox width asPoint! !\n\n!MSWScrollBarView methodsFor: 'display box access'!\ndisplayBox\n        \"tah -- (17 July 1989 6:37:46 pm ) -- Answer the real displayBox\"\n\n        ^self realInsetDisplayBox expandBy: borderWidth! !\n\n!MSWScrollBarView methodsFor: 'display box access' stamp: 'ssa 2/27/98 11:10'!\ninsetDisplayBox\n        \"Answer the inset displayBox reduced by the horizontal space for the scroll bar\"\n\n       ^WhereToLocateScrollBars = #left\n                        ifTrue:[self insetDisplayBoxLeft]\n                        ifFalse:[self insetDisplayBoxRight]! !\n\n!MSWScrollBarView methodsFor: 'display box access' stamp: 'ssa 2/27/98 11:09'!\ninsetDisplayBoxLeft\n        \"Answer the inset displayBox reduced by the horizontal space for the scroll bar\"\n\n        | box |\n        box _ self realInsetDisplayBox.\n        ^box origin extent: box width - (self borderWidth left  + self scrollBarWidth) @ box height\n\n! !\n\n!MSWScrollBarView methodsFor: 'display box access' stamp: 'ssa 2/27/98 11:10'!\ninsetDisplayBoxRight\n        \"Answer the inset displayBox reduced by the horizontal space for the scroll bar\"\n        \"Changed to left-side scroll bars--stp.\"\n        \"MSWScrollBarView someInstance\"\n\n        | box |\n        box _ self realInsetDisplayBox.\n        ^((box left + self scrollBarWidth) @ box top)\n                extent: (box width - (self borderWidth left + self scrollBarWidth) @ box height)\n! !\n\n!MSWScrollBarView methodsFor: 'display box access' stamp: 'ssa 12/15/97 14:50'!\nrealInsetDisplayBox\n        \"tah -- (17 July 1989 6:05:48 pm ) -- answer the real inset displayBox \"\n\n        ^super insetDisplayBox! !\n\n!MSWScrollBarView methodsFor: 'display transformation'!\ndisplayTransform: anObject \n        \"Apply the display transformation of the receiver to anObject (see \n        View|displayTransformation) and answer the resulting scaled, translated \n        object. It is normally applied to Rectangles, Points, and other objects with \n        coordinates defined in the View's local coordinate system in order to get a \n        corresponding object in display coordinates.\"\n\n        ^(self realDisplayTransformation applyTo: anObject) rounded! !\n\n!MSWScrollBarView methodsFor: 'display transformation' stamp: 'ssa 12/15/97 14:49'!\ndisplayTransformation\n        \"This is a hook for to get the real displayTransformation\"\n\n        ^self scrollBarWidth = 0\n                ifTrue: [self realDisplayTransformation]\n                ifFalse: [WindowingTransformation window: self getWindow viewport: (self realInsetDisplayBox expandBy: self borderWidth)]! !\n\n!MSWScrollBarView methodsFor: 'display transformation'!\nrealDisplayTransformation\n        \"This is a hook for labeledView to get the real displayTransformation\"\n\n        ^super displayTransformation! !\n\n!MSWScrollBarView methodsFor: 'displaying' stamp: 'ssa 9/9/2009 16:44'!\ndeEmphasizeView\n\n        super deEmphasizeView ! !\n\n!MSWScrollBarView methodsFor: 'displaying' stamp: 'ssa 12/11/97 13:13'!\ndisplayDownButton\n        | box |\n        box _ self downButtonBox.\n        self downButtonCache extent = box extent\n                ifFalse:[self drawDownButton].\n        self downButtonCache displayOn: Display at: box origin! !\n\n!MSWScrollBarView methodsFor: 'displaying' stamp: 'ssa 1/20/98 21:45'!\ndisplayDownButtonPressed\n        | box cf bb |\n        box _ self downButtonBox.\n        Display fill: box fillColor: Color darkGray.\n        Display fill: (box origin + (2 @ 2) corner: box corner - (1 @ 1))\n                fillColor: Color gray.\n        cf _ ColorForm mappingWhiteToTransparentFrom: (Form\n                                        extent: 13 @ 13\n                                        depth: 1\n                                        fromArray: #(0 0 0 0 0 260046848 117440512 33554432 0 0 0 0 0 )\n                                        offset: 0 @ 0).\n        bb _ BitBlt\n                                destForm: Display\n                                sourceForm: cf\n                                fillColor: Color black\n                                combinationRule: Form paint\n                                destOrigin: box origin + 2\n                                sourceOrigin: 0 @ 0\n                                extent: cf extent\n                                clipRect: box truncated.\n        bb copyBits! !\n\n!MSWScrollBarView methodsFor: 'displaying' stamp: 'ssa 9/9/2009 17:02'!\ndisplayElevatorOn: aForm\n        | box shaft |\n        box _ self elevatorBox.\n\tshaft _ self elevatorShaft.\n        self elevatorCache extent = box extent\n                ifFalse:[self drawElevator].\n        self elevatorCache displayOn: aForm at: box origin - shaft origin! !\n\n!MSWScrollBarView methodsFor: 'displaying' stamp: 'ssa 9/9/2009 16:52'!\ndisplayElevatorShaftOn: aForm\n\n        | box |\n        box _ self elevatorShaft.\n         aForm fill: (0@0 extent: box extent) fillColor: self backgroundColor darker darker\n! !\n\n!MSWScrollBarView methodsFor: 'displaying' stamp: 'ssa 12/11/97 13:18'!\ndisplayUpButton\n        | box |\n        box _ self upButtonBox.\n        self upButtonCache extent = box extent\n                ifFalse:[self drawUpButton].\n        self upButtonCache displayOn: Display at: box origin! !\n\n!MSWScrollBarView methodsFor: 'displaying' stamp: 'ssa 1/20/98 21:45'!\ndisplayUpButtonPressed\n        | box cf bb |\n        box _ self upButtonBox.\n        Display fill: box fillColor: Color darkGray.\n        Display fill: (box origin + (2 @ 2) corner: box corner - (1 @ 1))\n                fillColor: Color gray.\n        cf _ ColorForm mappingWhiteToTransparentFrom: (Form\n                                        extent: 13 @ 13\n                                        depth: 1\n                                        fromArray: #(0 0 0 0 0 33554432 117440512 260046848 0 0 0 0 0 )\n                                        offset: 0 @ 0).\n        bb _ BitBlt\n                                destForm: Display\n                                sourceForm: cf\n                                fillColor: Color black\n                                combinationRule: Form paint\n                                destOrigin: box origin + 2\n                                sourceOrigin: 0 @ 0\n                                extent: cf extent\n                                clipRect: box truncated.\n        bb copyBits! !\n\n!MSWScrollBarView methodsFor: 'displaying' stamp: 'ssa 9/9/2009 16:58'!\ndisplayView\n\n\n        self displayUpButton.\n        self displayDownButton.\n        self updateElevator\n! !\n\n!MSWScrollBarView methodsFor: 'displaying' stamp: 'ssa 8/27/2009 09:30'!\ndrawDownButton\n        | box pen cf bb form |\n        form _ Form extent: self downButtonBox extent depth: Display depth.\n        box _ form boundingBox.\n        pen _ Pen new.\n        pen destForm: form.\n        pen color: Color black.\n        pen place: box bottomLeft.\n        pen goto: box topLeft.\n        pen goto: box topRight. \n        pen color: Color black.\n        pen place: box bottomLeft + (1 @ 0).\n        pen goto: box topLeft + 1.\n        pen goto: box topRight + (0 @ 1).\n        pen color: Color black.\n        pen place: box bottomLeft + (1 @ 1 negated).\n        pen goto: box bottomRight - (1 @ 1).\n        pen goto: box topRight + (1 negated @ 1).\n        pen color: Color black.\n        pen place: box bottomLeft.\n        pen goto: box bottomRight.\n        pen goto: box topRight.\n        form fill: (box origin + (2 @ 2) corner: box corner - (1 @ 1))\n                fillColor: self backgroundColor.\n        cf _ ColorForm mappingWhiteToTransparentFrom: (Form\n                                        extent: 13 @ 13\n                                        depth: 1\n                                        fromArray: #(0 0 0 0 0 260046848 117440512 33554432 0 0 0 0 0 )\n                                        offset: 0 @ 0).\n        bb _ BitBlt\n                                destForm: form\n                                sourceForm: cf\n                                fillColor: Color black\n                                combinationRule: Form paint\n                                destOrigin: box origin + 1\n                                sourceOrigin: 0 @ 0\n                                extent: cf extent\n                                clipRect: box truncated.\n        bb copyBits.\n        self downButtonCache: form! !\n\n!MSWScrollBarView methodsFor: 'displaying' stamp: 'ssa 8/21/2009 13:03'!\ndrawElevator\n        | box pen form |\n        form _ Form extent: self controller elevatorBox extent depth: Display depth.\n        box _ form boundingBox.\n        pen _ Pen new.\n        pen destForm: form.\n        pen color: self backgroundColor.\n        pen place: box bottomLeft. \n        pen goto: box topLeft.\n        pen goto: box topRight.\n        pen color: Color black.\n        pen place: box bottomLeft + (1 @ 0).\n        pen goto: box topLeft + 1.\n        pen goto: box topRight + (0 @ 1).\n        pen color: Color black.\n        pen place: box bottomLeft + (1 @ 1 negated).\n        pen goto: box bottomRight - (1 @ 1).\n        pen goto: box topRight + (1 negated @ 1).\n        pen color: Color black.\n        pen place: box bottomLeft.\n        pen goto: box bottomRight.\n        pen goto: box topRight.\n        form fill: (box origin + (2 @ 2) corner: box corner - (1 @ 1))\n                fillColor: self backgroundColor.\n        self elevatorCache: form! !\n\n!MSWScrollBarView methodsFor: 'displaying' stamp: 'ssa 8/21/2009 13:03'!\ndrawUpButton\n        | box pen cf bb form |\n        form _ Form extent: self upButtonBox extent depth: Display depth.\n        box _ form boundingBox.\n        pen _ Pen new.\n        pen destForm: form.\n        pen color: self backgroundColor.\n        pen place: box bottomLeft.\n        pen goto: box topLeft.\n        pen goto: box topRight. \n        pen color: Color black.\n        pen place: box bottomLeft + (1 @ 0).\n        pen goto: box topLeft + 1.\n        pen goto: box topRight + (0 @ 1).\n        pen color: Color black.\n        pen place: box bottomLeft + (1 @ 1 negated).\n        pen goto: box bottomRight - (1 @ 1).\n        pen goto: box topRight + (1 negated @ 1).\n        pen color: Color black.\n        pen place: box bottomLeft.\n        pen goto: box bottomRight.\n        pen goto: box topRight.\n        form fill: (box origin + (2 @ 2) corner: box corner - (1 @ 1))\n                fillColor: self backgroundColor.\n        cf _ ColorForm mappingWhiteToTransparentFrom: (Form\n                                        extent: 13 @ 13\n                                        depth: 1\n                                        fromArray: #(0 0 0 0 0 33554432 117440512 260046848 0 0 0 0 0 )\n                                        offset: 0 @ 0).\n        bb _ BitBlt\n                                destForm: form\n                                sourceForm: cf\n                                fillColor: Color black\n                                combinationRule: Form paint\n                                destOrigin: box origin + 1\n                                sourceOrigin: 0 @ 0\n                                extent: cf extent\n                                clipRect: box truncated.\n        bb copyBits.\n        self upButtonCache: form! !\n\n!MSWScrollBarView methodsFor: 'displaying' stamp: 'ssa 9/9/2009 16:46'!\nemphasizeView\n\n        self displayView.\n        super emphasizeView! !\n\n!MSWScrollBarView methodsFor: 'displaying' stamp: 'ssa 9/9/2009 15:18'!\nupdateElevator\n       | newForm |\n\n\tnewForm _ Form fromDisplay: self elevatorShaft.\n\tself displayElevatorShaftOn: newForm.\n        self displayElevatorOn: newForm.\n\tnewForm displayOn: Display at: self elevatorShaft origin! !\n\n!MSWScrollBarView methodsFor: 'lock access' stamp: 'ssa 12/5/97 16:10'!\nunlock\n        \"Flush the cache.\"\n        self scrollBarBox: nil.\n        self upButtonBox: nil.\n        self downButtonBox: nil.\n        self elevatorShaft: nil.\n        super unlock! !\n\n!MSWScrollBarView methodsFor: 'subview additions' stamp: 'ssa 1/15/98 15:50'!\naddSubView: aView in: aRelativeRectangle borderWidth: width\n        \"11/3/96 ssa - added for compatibility.\"\n \n        \"Make 'aView' into a subview. Use 'aRelativeRectangle' and the \n        super view's window to compute (1) a viewport within the \n        superview for 'aView' and (2) the window extent for 'aView'. Note: \n        defining the windowing transformation and deriving the viewport is \n        logically equivalent but does not seem to be easily done\"\n\n        | subViewPort myWindow myExtent myOrigin |\n        self addSubView: aView ifCyclic: [self error: 'cycle in subView structure.'].\n        aView borderWidth: width.\n        myWindow _ self window.\n        myExtent _ myWindow extent.\n        myOrigin _ myWindow origin.\n        subViewPort _ myExtent * aRelativeRectangle origin + myOrigin \n                                                corner: myExtent * aRelativeRectangle corner + myOrigin.\n        aView window: aView window viewport: subViewPort\n! !\n\n!MSWScrollBarView methodsFor: 'subview additions' stamp: 'ssa 8/27/2009 04:49'!\non: aView\n        \"tah -- (17 July 1989 7:17:34 pm ) -- Add a subview to this view\"\n\n        self on: aView borderWidth: 0.\n\tself model: aView model! !\n\n!MSWScrollBarView methodsFor: 'subview additions'!\non: aView borderWidth: aBorderWidth\n        \"tah -- (17 July 1989 7:17:34 pm ) -- Add a subview to this view\"\n\n        self addSubView: aView in: (0@0 extent: (1@1)) borderWidth: aBorderWidth! !\n\n!MSWScrollBarView methodsFor: 'testing' stamp: 'ssa 1/8/98 16:13'!\ncontainsPoint: aPoint\n        \"Overriden to access my real insetDsiplayBox\"\n\n        ^ self realInsetDisplayBox containsPoint: aPoint! !\n\n!MSWScrollBarView class methodsFor: 'instance creation' stamp: 'ssa 3/24/2010 15:07'!\non: aScrollingView\n        \"<aScrollingView: {hOf ListView | hOf TextView | hOf StringHolderView | hOf ParagraphEditor | hOf CodeView | hOf PPSListView | hOf SelectionInListView}, ^iOf self>\"\n        \"Answer an instance of me that encapsulates aScrollingView by providing Windows-style scroll bars\"\n\n       ^aScrollingView class == self class   \"prevent scrollbars on scrolbars\"\n\t\tifTrue:[aScrollingView error:'should never try to embed scrollbar views']\n\t\tifFalse:[self new on: aScrollingView]! !\n\n!MSWScrollBarView class methodsFor: 'class initialization' stamp: 'ssa 1/5/2010 18:10'!\ninitialize\n        \"Make an initial decision as to which side to locate the scrollbars.  See preferences to change sides.\"\n\n        self locateScrollBarsOnRightSide! !\n\n!MSWScrollBarView class methodsFor: 'preferences' stamp: 'ssa 2/27/98 11:40'!\nlocateScrollBarsOnLeftSide\n        \"Set the flag to locate the ScrollBars on the left hand side of the view.\"\n        \"MSWScrollBarView locateScrollBarsOnLeftSide\"\n\n        | openWindows |\n        WhereToLocateScrollBars _ #left.\n        self allInstances do:[:each| each unlock].\n        openWindows _ ScheduledControllers controllersSatisfying:\n                [:each| (each view  respondsTo:#isCollapsed)\n                                and:[each view isCollapsed not]].\n        openWindows reverseDo:[:each| each view uncacheBits display].\n        ScheduledControllers restore! !\n\n!MSWScrollBarView class methodsFor: 'preferences' stamp: 'ssa 2/27/98 11:39'!\nlocateScrollBarsOnRightSide\n        \"Set the flag to locate the ScrollBars on the right hand side of the view.\"\n        \"MSWScrollBarView locateScrollBarsOnRightSide\"\n\n        | openWindows |\n        WhereToLocateScrollBars _ #right.\n        self allInstances do:[:each| each unlock].\n        openWindows _ ScheduledControllers controllersSatisfying:\n                [:each| (each view  respondsTo:#isCollapsed)\n                                and:[each view isCollapsed not]].\n        openWindows reverseDo:[:each| each view uncacheBits display].\n        ScheduledControllers restore! !\n\n!MSWSystemController methodsFor: 'accessing' stamp: 'ar 1/22/98 23:30'!\nlastSystemActivity\n        ^lastSystemActivity ifNil:[lastSystemActivity _ 0]! !\n\n!MSWSystemController methodsFor: 'accessing' stamp: 'ar 1/22/98 23:30'!\nlastSystemActivity: aNumber\n        lastSystemActivity _ aNumber! !\n\n!MSWSystemController methodsFor: 'basic control sequence' stamp: 'ssa 9/11/2009 16:36'!\nredButtonActivity\n\t| box p |\n\tp _ sensor cursorPoint.\n\t  ((box _ view systemBoxFrame) containsPoint: p)\n\t\t\t ifTrue: [^self systemActivity].\n\t  ((box _ view shrinkBoxFrame) containsPoint: p)\n\t  \t\t ifTrue: [Utilities awaitMouseUpIn: box\n\t\t\t\t\trepeating: [] ifSucceed: [self collapse. ^ self].\n\t   \t\t\t\t^ self].\n\t ((box _ view growBoxFrame) containsPoint: p)\n\t\t\tifTrue: [Utilities awaitMouseUpIn: box repeating: [] ifSucceed:\t[view isCollapsed\n\t\t\t\t ifTrue:[self expand]\n\t\t\t      ifFalse:[view isFullScreen \n\t\t\t\t\t\tifTrue:[self restore] \n\t\t\t\t\t\tifFalse:[self fullScreen]].\n\t\t\t\t ^ self].\n\t\t   ^ self].\n\t super redButtonActivity.! !\n\n!MSWSystemController methodsFor: 'basic control sequence' stamp: 'ar 1/22/98\n23:33'!\nsystemActivity  \"The system menu button has been pressed\"       | time |\n        time _ Time millisecondClockValue.      (time- self lastSystemActivity) < self\ndoubleClickTime                 ifTrue:[^self close].   self lastSystemActivity: time.  ^self\nblueButtonActivity! !\n\n!MSWSystemController methodsFor: 'menu messages' stamp: 'ar 1/22/98 22:41'!\nrestore\n        view restore! !\n\n!MSWSystemController methodsFor: 'private' stamp: 'ar 1/22/98 23:32'!\ndoubleClickTime\n        \"Return the maximum delay time for double clicks.\n        This value is in milliseconds.\"\n        ^500! !\n\n!MSWSystemController methodsFor: 'borders' stamp: 'ssa 1/25/98 00:00'!\nadjustWindowCorners \n        | box cornerBox p clicked f2 |\n        box _ view windowBox.\n        clicked _ false.\n        #(topLeft topRight bottomRight bottomLeft)\n                do: [:readCorner |\n                        cornerBox _ ((box insetBy: 2) perform: readCorner) - (4@4) extent: 8@8.\n                        (cornerBox containsPoint: sensor cursorPoint)\n                                ifTrue: \n                                [\"Display reverse: cornerBox.\"\n                                (Cursor perform: readCorner) showWhile:\n                                        [[(cornerBox containsPoint: (p _ sensor cursorPoint))\n                                                and: [(clicked _ sensor anyButtonPressed) not]]\n                                                whileTrue.\n                                \"Display reverse: cornerBox.\"\n                                clicked ifTrue:\n                                        [view newFrame:\n                                                [:f | p _ sensor cursorPoint.\n                                                readCorner = #topLeft ifTrue:\n                                                        [f2 _ p corner: f bottomRight].\n                                                readCorner = #bottomLeft ifTrue:\n                                                        [f2 _ (f withBottom: p y) withLeft: p x].\n                                                readCorner = #bottomRight ifTrue:\n                                                        [f2 _ f topLeft corner: p].\n                                                readCorner = #topRight ifTrue:\n                                                        [f2 _ (f withTop: p y) withRight: p x].\n                                                f2]]]]].\n        ^ clicked! !\n\n!MSWSystemController methodsFor: 'borders' stamp: 'ssa 1/24/98 23:47'!\ncursorOnBorder \n        | cp i box |\n        view isCollapsed ifTrue: [^ false].\n        cp _ sensor cursorPoint.\n        ((view labelDisplayBox insetBy: 5@5) containsPoint: cp)\n                ifTrue: [^ false].\n        (i _ view subViews findFirst: [:v | v displayBox containsPoint: cp]) = 0\n                ifTrue: [box _ view windowBox]\n                ifFalse: [box _ (view subViews at: i) insetDisplayBox].\n        ^ ((box insetBy: 3) containsPoint: cp) not\n                and: [(box expandBy: 4) containsPoint: cp]! !\n\n!MSWSystemView methodsFor: 'label accessing' stamp: 'ssa 3/24/2010 16:03'!\ncloseBoxFrame\n\n        | boxHeight |\n        boxHeight _ self labelDisplayBox height -  11.\n        ^ Rectangle origin: (self labelDisplayBox topRight + (boxHeight negated-9@7)) extent:\nboxHeight+2@boxHeight\n\n        \"MSWSystemView initializeCache\"! !\n\n!MSWSystemView methodsFor: 'label accessing' stamp: 'ssa 1/24/98 23:35'!\ngrowBoxFrame\n\n        | boxHeight |\n        boxHeight _ self labelDisplayBox height -  11.\n        ^ Rectangle origin: (self labelDisplayBox topRight + (2*boxHeight negated-12@7)) extent:\nboxHeight+2@boxHeight\n\n        \"NiceSystemView initializeCache\"! !\n\n!MSWSystemView methodsFor: 'label accessing' stamp: 'ssa 2/6/98 14:24'!\nlabelHeight\n        ^self isCollapsed\n                ifFalse:[18 + 6]\n                ifTrue:[(LabelStyle fontAt: 2) height + 14]! !\n\n!MSWSystemView methodsFor: 'label accessing' stamp: 'ssa 1/24/98 23:56'!\nlabelTextRegion\n        labelText == nil ifTrue: [^ self labelDisplayBox center extent: 0@0].\n        ^ (labelText boundingBox\n                        align: labelText boundingBox leftCenter\n                        with: self labelDisplayBox leftCenter + (25@0))\n                intersect: (self labelDisplayBox origin corner: self labelDisplayBox corner -\n(55@0))! !\n\n!MSWSystemView methodsFor: 'label accessing' stamp: 'ssa 1/24/98 23:34'!\nshrinkBoxFrame\n\n        | boxHeight |\n        boxHeight _ self labelDisplayBox height -  11.\n        ^ Rectangle origin: (self labelDisplayBox topRight + (3*boxHeight negated-15@7)) extent:\nboxHeight+2@boxHeight\n\n        \"NiceSystemView initializeCache\"! !\n\n!MSWSystemView methodsFor: 'label accessing' stamp: 'ssa 1/24/98 23:17'!\nsystemBoxFrame\n\n        | boxHeight |\n        boxHeight _ self labelDisplayBox height - 11 .\n        ^ Rectangle origin: (self labelDisplayBox origin + (7@7)) extent:\nboxHeight@boxHeight\n\n        \"NiceSystemView initializeCache\"! !\n\n!MSWSystemView methodsFor: 'framing' stamp: 'stp 02/18/98 0-15:'!\ncollapse\n        \"If the receiver is not already collapsed, change its view to be that of its \n        label only.\"\n\n        self isCollapsed ifFalse:\n                        [expandedViewport _ self viewport.\n                        savedSubViews _ subViews.\n                        self resetSubViews.\n                        labelText isNil ifTrue: [self label: nil.  bitsValid _ false.].\n                        self window: (self inverseDisplayTransform:\n                                        ((self labelDisplayBox topLeft extent: (labelText extent x + 80) @ self labelHeight)\n                                                 intersect: self labelDisplayBox))]! !\n\n!MSWSystemView methodsFor: 'framing' stamp: 'ar 1/22/98 22:47'!\nfullScreen\n        | portRect |\n        portRect _ self viewport.\n        growFrame _ portRect topLeft - self labelOffset\n                                corner: portRect corner.\n        ^super fullScreen! !\n\n!MSWSystemView methodsFor: 'framing' stamp: 'ar 1/22/98 22:49'!\nrestore\n        self reframeTo: ( growFrame isNil ifTrue:[self initialFrame]\nifFalse:[growFrame])! !\n\n!MSWSystemView methodsFor: 'displaying' stamp: 'ssa 3/24/2010 15:27'!\ndeEmphasizeLabel\n        \"Un-Highlight the label.\"\n        labelFrame height = 0 ifTrue: [^ self].  \"no label\"\n        self displayLabelBackground: false.\n        self displayLabelTextDeEmphasized.\n        self displayLabelBorder.\n\tself displayClosingGuardBoxIfNeeded.\n! !\n\n!MSWSystemView methodsFor: 'displaying' stamp: 'ssa 3/24/2010 15:32'!\ndisplayClosingGuardBoxIfNeeded\n\t\"display closing guard active, if true\"\n\t\n\t| aRect |\n\tself controller preventClosing ifTrue:[\n\t\taRect _ self closeBoxFrame.\n\t\tself closingGuardIcon displayOn: Display at: aRect origin + (2@1) clippingBox: aRect rule: Form over fillColor: nil].\n! !\n\n!MSWSystemView methodsFor: 'displaying' stamp: 'ssa 3/24/2010 15:42'!\ndisplayDeEmphasizedOLD\n        \"Display this view with emphasis off.\n        If windowBits is not nil, then simply BLT if possible,\n                but force full display for top window so color is preserved.\"\n\n\tself displayBorder.\n\tsuper displayDeEmphasized.\n\tself deEmphasizeLabel! !\n\n!MSWSystemView methodsFor: 'displaying' stamp: 'ssa 3/24/2010 15:43'!\ndisplayEmphasizedOLD\n        \"Display with label highlighted to indicate that it is active.\"\n\n\tself displayBorder.\n\tsuper displayEmphasized.\n\tself emphasizeLabel ! !\n\n!MSWSystemView methodsFor: 'displaying' stamp: 'ssa 3/24/2010 15:41'!\ndisplayLabelBackground: emphasized\n        \"Clear or emphasize the inner region of the label\"\n\n        emphasized\n                ifTrue:[Display\n                                        fill: self labelDisplayBox\n                                        fillColor: self labelBackgroundColor]\n                ifFalse:[Display\n                                        fill: self labelDisplayBox\n                                        fillColor:self labelBackgroundColor darker darker].\n                self displayLabelBoxes.\n! !\n\n!MSWSystemView methodsFor: 'displaying' stamp: 'ssa 3/24/2010 15:25'!\ndisplayLabelBoxes\n        CloseBoxForm ifNil:[CloseBoxForm _ self drawCloseBoxForm].\n        GrowBoxForm ifNil:[GrowBoxForm _ self drawGrowBoxForm].\n        ShrinkBoxForm ifNil:[ShrinkBoxForm _ self drawShrinkBoxForm].\n        SystemBoxForm ifNil:[SystemBoxForm _ self drawSystemBoxForm].\n        CloseBoxForm displayOn: Display at: self closeBoxFrame origin.\n        GrowBoxForm displayOn: Display at: self growBoxFrame origin.\n        self isCollapsed \n                ifFalse:[ShrinkBoxForm displayOn: Display at: self shrinkBoxFrame origin].\n\n        SystemBoxForm displayOn: Display at: self  systemBoxFrame origin.\n\t\t\"display closing guard active, if true\"\n\tself displayClosingGuardBoxIfNeeded.\n! !\n\n!MSWSystemView methodsFor: 'displaying' stamp: 'ssa 3/24/2010 15:41'!\ndisplayLabelText\n        \"The label goes in the center of the window\"\n        | labelRect |\n        labelText foregroundColor: Color black\n                        backgroundColor: self labelBackgroundColor.\n        labelRect _ self labelTextRegion.\n        \"Display fill: (labelRect expandBy: 3@0) fillColor: self labelColor.\"\n        labelText displayOn: Display at: labelRect topLeft +(0@1) clippingBox: labelRect\n                        rule: Form under fillColor: labelText fillColor! !\n\n!MSWSystemView methodsFor: 'displaying' stamp: 'ssa 3/24/2010 15:41'!\ndisplayLabelTextDeEmphasized\n        | labelRect |\n        labelText foregroundColor: Color gray\n                        backgroundColor: self labelBackgroundColor.\n        labelRect _ self labelTextRegion.\n        labelText displayOn: Display at: labelRect topLeft +(0@1) clippingBox: labelRect\n                        rule: Form under fillColor: labelText fillColor! !\n\n!MSWSystemView methodsFor: 'displaying' stamp: 'ssa 3/24/2010 15:41'!\ndisplayLabelTextEmphasized\n        | labelRect |\n        labelText foregroundColor: Color black\n                        backgroundColor: self labelBackgroundColor.\n        labelRect _ self labelTextRegion.\n        labelText displayOn: Display at: labelRect topLeft +(0@1) clippingBox: labelRect\n                        rule: Form under fillColor: labelText fillColor! !\n\n!MSWSystemView methodsFor: 'displaying' stamp: 'stp 02/18/98 0-13:'!\ndrawCloseBoxForm\n        \"Answer a thinner 'X' for the close box.\"\n        \"CloseBoxForm bitEdit\"\n\n        ^Form\n                extent: 15@13\n                depth: 8\n                fromArray: #( 50529027 50529027 50529027 50529024 51252750 235802126 235802126 235801600 \n                        51249923 50529027 50529027 50531328 51249921 16974595 50528513 50531328 51249923 16843523 \n                        50397443 50531328 51249923 50397443 16843523 50531328 51249923 50528513 16974595 50531328 \n                        51249923 50397443 16843523 50531328 51249923 16843523 50397443 50531328 51249921 16974595 \n                        50528513 50531328 51249923 50529027 50529027 50531328 51249923 50529027 50529027 50531328 \n                        51121164 202116108 202116108 202116096)\n                offset: 0@0! !\n\n!MSWSystemView methodsFor: 'displaying' stamp: 'ar 1/22/98 22:10'!\ndrawGrowBoxForm\n        | box pen form |\n        form _ Form extent: self growBoxFrame extent depth: 8.\n        box _ form boundingBox.\n        pen _ Pen new.\n        pen destForm: form.\n        pen color: Color gray.\n        pen place: box bottomLeft.\n        pen goto: box topLeft.\n        pen goto: box topRight.\n        pen color: Color veryLightGray.\n        pen place: box bottomLeft + (1 @ 0).\n        pen goto: box topLeft + 1.\n        pen goto: box topRight + (0 @ 1).\n        pen color: Color darkGray.\n        pen place: box bottomLeft + (1 @ 1 negated).\n        pen goto: box bottomRight - (1 @ 1).\n        pen goto: box topRight + (1 negated @ 1).\n        pen color: Color black.\n        pen place: box bottomLeft.\n        pen goto: box bottomRight.\n        pen goto: box topRight.\n        form fill: (box origin + (2 @ 2) corner: box corner - (1 @ 1))\n                fillColor: Color gray.\n        pen color: Color black.\n        pen place: box topLeft + (3@3).\n        pen goto: box bottomLeft + (3 @ -3).\n        pen goto: box bottomRight + (-3 @ -3).\n        pen goto: box topRight + (-3@3).\n        pen defaultNib: 2.\n        pen place: box topRight + (-4@3).\n        pen goto: box topLeft + (3@3).\n        ^form! !\n\n!MSWSystemView methodsFor: 'displaying' stamp: 'ar 1/22/98 22:11'!\ndrawShrinkBoxForm\n        | box pen form |\n        form _ Form extent: self growBoxFrame extent depth: 8.\n        box _ form boundingBox.\n        pen _ Pen new.\n        pen destForm: form.\n        pen color: Color gray.\n        pen place: box bottomLeft.\n        pen goto: box topLeft.\n        pen goto: box topRight.\n        pen color: Color veryLightGray.\n        pen place: box bottomLeft + (1 @ 0).\n        pen goto: box topLeft + 1.\n        pen goto: box topRight + (0 @ 1).\n        pen color: Color darkGray.\n        pen place: box bottomLeft + (1 @ 1 negated).\n        pen goto: box bottomRight - (1 @ 1).\n        pen goto: box topRight + (1 negated @ 1).\n        pen color: Color black.\n        pen place: box bottomLeft.\n        pen goto: box bottomRight.\n        pen goto: box topRight.\n        form fill: (box origin + (2 @ 2) corner: box corner - (1 @ 1))\n                fillColor: Color gray.\n        pen color: Color black.\n        pen defaultNib: 2.\n        pen place: box bottomRight + (-4 @ -3).\n        pen goto: box bottomLeft + (3 @ -3).\n        ^form! !\n\n!MSWSystemView methodsFor: 'displaying' stamp: 'ssa 1/24/98 23:09'!\ndrawSystemBoxForm\n        | box pen form |\n        form _ Form extent: self systemBoxFrame extent depth: 8.\n        box _ form boundingBox.\n        pen _ Pen new.\n        pen destForm: form.\n        pen color: Color gray.\n        pen place: box bottomLeft.\n        pen goto: box topLeft.\n        pen goto: box topRight.\n        pen color: Color veryLightGray.\n        pen place: box bottomLeft + (1 @ 0).\n        pen goto: box topLeft + 1.\n        pen goto: box topRight + (0 @ 1).\n        pen color: Color darkGray.\n        pen place: box bottomLeft + (1 @ 1 negated).\n        pen goto: box bottomRight - (1 @ 1).\n        pen goto: box topRight + (1 negated @ 1).\n        pen color: Color black.\n        pen place: box bottomLeft.\n        pen goto: box bottomRight.\n        pen goto: box topRight.\n        form fill: (box origin + (2 @ 2) corner: box corner - (1 @ 1))\n                fillColor: Color gray.\n        ^form! !\n\n!MSWSystemView methodsFor: 'displaying' stamp: 'ssa 1/24/98 22:49'!\nemphasizeLabel\n        \"Highlight the label.\"\n        labelFrame height = 0 ifTrue: [^ self].  \"no label\"\n        self displayLabelBackground: true.\n        self displayLabelBoxes.\n        self displayLabelTextEmphasized.\n        self displayLabelBorder! !\n\n!MSWSystemView methodsFor: 'displaying' stamp: 'ssa 3/24/2010 15:44'!\nlabelBackgroundColor\n\n\t^Color veryLightGray lighter! !\n\n!MSWSystemView methodsFor: 'bordering' stamp: 'ssa 3/25/2010 14:30'!\nbaseColor\n\t^Color gray ! !\n\n!MSWSystemView methodsFor: 'bordering' stamp: 'ssa 3/25/2010 14:34'!\nborderBox: box\n\n\tDisplay border: (box insetBy: 0@0) widthRectangle: (1@1 corner: 0@0) rule: Form paint fillColor: self baseColor.\n\tDisplay border: (box insetBy: 0@0) widthRectangle: (0@0 corner: 1@1) rule: Form paint fillColor: self baseColor darker darker darker.\n\t\n\tDisplay border: (box insetBy: 1@1) widthRectangle: (1@1 corner: 0@0) rule: Form paint fillColor: self baseColor lighter.\n\tDisplay border: (box insetBy: 1@1) widthRectangle: (0@0 corner: 1@1) rule: Form paint fillColor: self baseColor darker .\n\t\n\tDisplay border: (box insetBy: 2@2) widthRectangle: (1@1 corner: 0@0) rule: Form paint fillColor: self baseColor.\n\tDisplay border: (box insetBy: 2@2) widthRectangle: (0@0 corner: 1@1) rule: Form paint fillColor: self baseColor lighter.\n! !\n\n!MSWSystemView methodsFor: 'bordering' stamp: 'ssa 3/25/2010 14:39'!\nborderBoxNoBottom: box\n\n\tDisplay border: (box insetBy: 0@0) widthRectangle: (1@1 corner: 0@0) rule: Form paint fillColor: self baseColor.\n\tDisplay border: (box insetBy: 0@0) widthRectangle: (0@0 corner: 1@0) rule: Form paint fillColor: self baseColor darker darker darker.\n\t\n\tDisplay border: (box insetBy: 1@1) widthRectangle: (1@1 corner: 0@0) rule: Form paint fillColor: self baseColor lighter.\n\tDisplay border: (box insetBy: 1@1) widthRectangle: (0@0 corner: 1@0) rule: Form paint fillColor: self baseColor darker .\n\t\n\tDisplay border: (box insetBy: 2@2) widthRectangle: (1@1 corner: 0@0) rule: Form paint fillColor: self baseColor.\n\tDisplay border: (box insetBy: 2@2) widthRectangle: (0@0 corner: 1@0) rule: Form paint fillColor: self baseColor lighter.\n! !\n\n!MSWSystemView methodsFor: 'bordering' stamp: 'ssa 9/4/1998 16:52'!\nborderWidth: anInteger\n\t\"Override to support standard borders\"! !\n\n!MSWSystemView methodsFor: 'bordering' stamp: 'ssa 3/25/2010 14:33'!\ndisplayBorder\n        \"Display the receiver's border (using the receiver's borderColor).\"\n\n        | |\n        self isCollapsed ifTrue:[^self].\n        borderWidth = 0\n                ifTrue:\n                        [insideColor == nil\n                                ifFalse: \n                                        [Display fill: self displayBox fillColor: self backgroundColor]]\n                ifFalse:\n                        [self borderBox: self displayBox]! !\n\n!MSWSystemView methodsFor: 'bordering' stamp: 'ssa 3/24/2010 17:09'!\ndisplayBorderOLD\n        \"Display the receiver's border (using the receiver's borderColor).\"\n\n        | box |\n        self isCollapsed ifTrue:[^self].\n        borderWidth = 0\n                ifTrue:\n                        [insideColor == nil\n                                ifFalse: \n                                        [Display fill: self displayBox fillColor: self backgroundColor]]\n                ifFalse:\n                        [box _ self displayBox.\n        \"left edge\"\n        Display fill: (box origin extent: 1@(box height - 1))\n                fillColor: Color gray.\n        Display fill: (box origin +(1@1) extent: 1@(box height - 2))\n                fillColor: Color veryLightGray.\n        Display fill: (box origin +(2@2) extent: 2@(box height-4))\n                fillColor: Color gray.\n        Display fill: (box origin +(4@3) extent: 1@(box height-6))\n                fillColor: Color veryDarkGray.\n        Display fill: (box origin +(5@4) extent: 1@(box height-8))\n                fillColor: Color black.\n\n        \"right edge\"\n        Display fill: (box topRight -(1@0)extent: 1@(box height - 1))\n                fillColor: Color black.\n        Display fill: (box topRight +(-2@1) extent: 1@(box height - 2))\n                fillColor: Color veryDarkGray.\n        Display fill: (box topRight +(-4@2) extent: 2@(box height-4))\n                fillColor: Color gray.\n        Display fill: (box topRight +(-5@5) extent: 1@(box height-10))\n                fillColor: Color veryLightGray.\n        Display fill: (box topRight +(-6@6) extent: 1@(box height-12))\n                fillColor: Color gray.\n\n        \"top edge\"\n        Display fill: (box origin extent: box width@1)\n                fillColor: Color gray.\n        Display fill: (box origin +(1@1) extent: (box width - 2)@1)\n                fillColor: Color veryLightGray.\n        Display fill: (box origin +(2@2) extent: (box width-4)@2)\n                fillColor: Color gray.\n        Display fill: (box origin +(4@4) extent: (box width-8)@1)\n                fillColor: Color veryDarkGray.\n        Display fill: (box origin +(5@5) extent: (box width-10)@1)\n                fillColor: Color black.\n\n        \"bottom edge\"\n        Display fill: (box bottomLeft -(0@1) extent: box width @1)\n                fillColor: Color black.\n        Display fill: (box bottomLeft +(1 @ -2) extent: (box width - 2)@1)\n                fillColor: Color veryDarkGray.\n        Display fill: (box bottomLeft +(2 @ -4) extent: (box width-4)@2)\n                fillColor: Color gray.\n        Display fill: (box bottomLeft +(4 @ -5) extent: (box width-7)@1)\n                fillColor: Color veryLightGray.\n        Display fill: (box bottomLeft +(5 @ -6) extent: (box width-9)@1)\n                fillColor: Color gray.\n                        insideColor == nil ifFalse:\n                                [Display fill: self insetDisplayBox fillColor: self backgroundColor]]! !\n\n!MSWSystemView methodsFor: 'bordering' stamp: 'ssa 3/25/2010 14:37'!\ndisplayCollaspedLabelBorder\n        \"Display the receiver's label border.\"\n\n        | |\n        borderWidth = 0\n                ifTrue:\n                        [insideColor == nil\n                                ifFalse: \n                                        [Display fill: self displayBox fillColor: self backgroundColor]]\n                ifFalse:\n                        [self borderBox: self labelDisplayBox]! !\n\n!MSWSystemView methodsFor: 'bordering' stamp: 'ssa 3/25/2010 14:39'!\ndisplayLabelBorder\n        \"Display the receiver's label border.\"\n\n        | |\n        self isCollapsed ifTrue:[^self displayCollaspedLabelBorder].\n        borderWidth = 0\n                ifTrue:\n                        [insideColor == nil\n                                ifFalse: \n                                        [Display fill: self displayBox fillColor: self backgroundColor]]\n                ifFalse:\n                        [self borderBoxNoBottom: self labelDisplayBox]! !\n\n!MSWSystemView methodsFor: 'bordering' stamp: 'ssa 3/25/2010 14:32'!\ndisplayLabelBorderOLD\n        \"Display the receiver's label border.\"\n\n        | box |\n        self isCollapsed ifTrue:[^self displayCollaspedLabelBorder].\n        borderWidth = 0\n                ifTrue:\n                        [insideColor == nil\n                                ifFalse: \n                                        [Display fill: self displayBox fillColor: self backgroundColor]]\n                ifFalse:\n                        [box _ self labelDisplayBox.\n        \"left edge\"\n        Display fill: (box origin extent: 1@(box height))\n                fillColor: Color gray.\n        Display fill: (box origin +(1@1) extent: 1@(box height))\n                fillColor: Color veryLightGray.\n        Display fill: (box origin +(2@2) extent: 2@(box height))\n                fillColor: Color gray.\n        Display fill: (box origin +(4@3) extent: 1@(box height))\n                fillColor: Color veryDarkGray.\n        Display fill: (box origin +(5@4) extent: 1@(box height))\n                fillColor: Color black.\n\n        \"right edge\"\n        Display fill: (box topRight -(1@0)extent: 1@(box height))\n                fillColor: Color black.\n        Display fill: (box topRight +(-2@1) extent: 1@(box height))\n                fillColor: Color veryDarkGray.\n        Display fill: (box topRight +(-4@2) extent: 2@(box height))\n                fillColor: Color gray.\n        Display fill: (box topRight +(-5@5) extent: 1@(box height))\n                fillColor: Color veryLightGray.\n        Display fill: (box topRight +(-6@6) extent: 1@(box height))\n                fillColor: Color gray.\n\n        \"top edge\"\n        Display fill: (box origin extent: box width@1)\n                fillColor: Color gray.\n        Display fill: (box origin +(1@1) extent: (box width - 2)@1)\n                fillColor: Color veryLightGray.\n        Display fill: (box origin +(2@2) extent: (box width-4)@2)\n                fillColor: Color gray.\n        Display fill: (box origin +(4@4) extent: (box width-8)@1)\n                fillColor: Color veryDarkGray.\n        Display fill: (box origin +(5@5) extent: (box width-10)@1)\n                fillColor: Color black]! !\n\n!MSWSystemView methodsFor: 'testing' stamp: 'ar 1/22/98 22:07'!\ncacheBitsAsTwoTone\n        ^false! !\n\n!MSWSystemView methodsFor: 'testing' stamp: 'ar 1/22/98 22:37'!\nisFullScreen\n        | frame |\n        frame _ model fullScreenSize.\n        ^(frame topLeft + self labelOffset corner: frame corner) = self viewport\n! !\n\n!MSWSystemView methodsFor: 'controller access' stamp: 'stp 02/18/98 0-11:'!\ndefaultControllerClass\n        ^MSWSystemController! !\n\n!MSWSystemView methodsFor: 'initialize' stamp: 'ssa 3/25/2010 14:36'!\ninitialize\n        \"change the default border to 3 to support stylish edges.\"\n\n\n        super initialize. \n        self borderWidthLeft: 3 right: 3 top: 0 bottom: 3! !\n\n!MSWSystemView methodsFor: 'window access' stamp: 'ssa 8/24/2009 10:13'!\ndefaultWindow\n        \"Build the minimum Rectangle that encloses all the windows of the \n        receiver's subViews. The answer is a Rectangle obtained by expanding \n        this minimal Rectangle by the borderWidth of the receiver. If the \n        receiver has no subViews, then a Rectangle enclosing the entire display \n        screen is answered. It is used internally by View methods if no window \n        has been specified for the View. Specialized subclasses of View should \n        redefine View|defaultWindow to handle the default case for instances \n        that have no subViews.\"\n\n        | aRectangle |\n        subViews isEmpty ifTrue: [^DisplayScreen boundingBox copy].\n        aRectangle _ self firstSubView viewport.\n        subViews do: [:aView | aRectangle _ aRectangle merge: aView viewport].\n        ^aRectangle! !\n\n!MSWSystemView class methodsFor: 'class initialization' stamp: 'ssaq 2/27/98 11:17'!\ninitialize\n        \"MSWSystemView initialize\"\n\n        self install! !\n\n!MSWSystemView class methodsFor: 'class initialization' stamp: 'ssa 2/27/98 11:02'!\ninitializeCache\n        \"MSWSystemView initializeCache\"\n        GrowBoxForm _ nil.\n        ShrinkBoxForm _ nil.\n        SystemBoxForm _ nil.\n        CloseBoxForm _ nil.! !\n\n!MSWSystemView class methodsFor: 'class initialization' stamp: 'ssa 3/24/2010 15:16'!\ninstall\n        \"MSWSystemView install\"\n        \n        Preferences enable:#nicerSystemViews! !\n\n!MSWSystemView class methodsFor: 'class initialization' stamp: 'ssa 3/24/2010 15:16'!\nunInstall\n        \"MSWSystemView unInstall\"\n\n        Preferences disable:#nicerSystemViews! !\n\n!ManyFilesPerClass methodsFor: 'directories' stamp: 'ads 12/2/2010 15:12'!\ncreateDirectoriesFor: cls\n\n\t| catDir |\n\tcatDir _ self classCategoryDirFor: cls category.\n\tclassDir _ self createDir: cls name in: catDir mustBeNew: false.\n\tbaseDir _ self createDir: 'base' in: classDir mustBeNew: false.\n\tmetaDir _ self createDir: 'meta' in: classDir mustBeNew: false.! !\n\n!ManyFilesPerClass methodsFor: 'loading' stamp: 'ads 12/10/2010 12:28'!\nsaveScriptForLoadingPackageBackIn: p\n\t\"Not implemented.\"! !\n\n!ManyFilesPerClass methodsFor: 'saving' stamp: 'ads 12/2/2010 15:20'!\nmethodSourceFor: sel in: clsHalf \n\t| method |\n\tmethod _ clsHalf methodDict at: sel ifAbsent: [^ sel printString, 'CORRUPTED'].\n\t^ (method getSourceFor: sel in: clsHalf) asString! !\n\n!ManyFilesPerClass methodsFor: 'saving' stamp: 'ads 12/14/2010 14:15'!\nsaveAllExtensionMethodsForPackage: p\n\tp extensionMethods asArray do: [:m | | cls catDir |\n\t\tcls _ Smalltalk at: m classSymbol.\n\t\tself createDirectoriesFor: cls.\n\t\tcatDir _ self createDir: m category in: (m classIsMeta ifTrue: [metaDir] ifFalse: [baseDir]) mustBeNew: false.\n\t\tself saveMethodNamed: m methodSymbol inCategory: m category of: m actualClass in: catDir.\n\t] displayingProgress: 'Saving ', p name, ' extension methods'.\n! !\n\n!ManyFilesPerClass methodsFor: 'saving' stamp: 'ads 12/2/2010 15:18'!\nsaveCategory: cat of: clsHalf in: dir\n\t| selectors catDir |\n\tcatDir _ self createDir: cat in: dir mustBeNew: false.\n\tselectors := (cat asString = ClassOrganizer allCategory)\n\t\t\t\tifTrue: [ clsHalf organization allMethodSelectors ]\n\t\t\t\tifFalse: [ clsHalf organization listAtCategoryNamed: cat ].\n\tselectors do: [:sel| self saveMethodNamed: sel inCategory: cat of: clsHalf in: catDir]! !\n\n!ManyFilesPerClass methodsFor: 'saving' stamp: 'ads 12/2/2010 15:14'!\nsaveClass: cls forPackage: p\n\tself createDirectoriesFor: cls.\n\tself saveClassHalf: cls in:  baseDir.\n\tself saveClassHalf: cls class in:  metaDir! !\n\n!ManyFilesPerClass methodsFor: 'saving' stamp: 'ads 12/5/2010 12:06'!\nsaveClassHalf: clsHalf in: dir\n\tself saveClassHalfDefinition: clsHalf in: dir.\n\tself saveClassHalfComment: clsHalf in: dir.\n\tself saveClassHalfCategories: clsHalf in: dir\n! !\n\n!ManyFilesPerClass methodsFor: 'saving' stamp: 'ads 12/2/2010 15:17'!\nsaveClassHalfCategories: clsHalf in: dir\n\tclsHalf organization categories do: [:cat | self saveCategory: cat of: clsHalf in: dir]! !\n\n!ManyFilesPerClass methodsFor: 'saving' stamp: 'ads 12/5/2010 12:10'!\nsaveClassHalfComment: clsHalf in: dir\n\t| fs |\n\tfs _ dir fileNamed: 'comment.txt'.\n\tfs nextPutAll: clsHalf organization classComment asString.\n\tfs close.! !\n\n!ManyFilesPerClass methodsFor: 'saving' stamp: 'ads 12/5/2010 12:10'!\nsaveClassHalfDefinition: clsHalf in: dir\n\t| fs |\n\tfs _ dir fileNamed: 'definition.txt'.\n\tfs nextPutAll: clsHalf definition.\n\tfs close.! !\n\n!ManyFilesPerClass methodsFor: 'saving' stamp: 'sm 5/2/2011 20:49'!\nsaveMethodNamed: sel inCategory: cat of: clsHalf in: catDir\n\t| src fs selOrFoo |\n\tsrc := self methodSourceFor: sel in: clsHalf.\n\tselOrFoo := (sel isKindOf: String) ifTrue: [sel] ifFalse: [sel printString].\n\tfs := catDir fileNamed: selOrFoo, '.txt'.\n\tfs nextPutAll: src.\n\tfs close\n\t! !\n\n!ManyTestResourceTestCase methodsFor: 'running' stamp: 'nfr 1/3/2010 18:07'!\ntestTearDownOrder\n\t| myResourceSetUpOrder myResourceReverseTearDownOrder |\n\tmyResourceReverseTearDownOrder := OrderedCollection new: 7.\n\tmyResourceSetUpOrder := (OrderedCollection new: 7)\n\t\tadd: SimpleTestResource;\n\t\tadd: SimpleTestResourceA1;\n\t\tadd: SimpleTestResourceA2;\n\t\tadd: SimpleTestResourceA;\n\t\tadd: SimpleTestResourceB1;\n\t\tadd: SimpleTestResourceB;\n\t\tyourself.\n\tself\n\t\tassert: (myResourceSetUpOrder allSatisfy: [:each | each isAvailable])\n\t\tdescription: 'At test start, not all my resources were set up'.\n\tself class resources\n\t\tdo: [:each | each resetOrAddResourcesTo: myResourceReverseTearDownOrder].\n\tself\n\t\tassert: myResourceReverseTearDownOrder = myResourceSetUpOrder\n\t\tdescription: 'Wrong order for tearDown'.\n\tself\n\t\tassert: (myResourceSetUpOrder allSatisfy: [:each | each isAvailable])\n\t\tdescription: 'At test start, not all my resources were set up'! !\n\n!ManyTestResourceTestCase methodsFor: 'utility' stamp: 'NiallRoss 7/18/2010 11:52'!\nclearOuterResourceStateDuring: aBlock\n\t\"This self-testing test must clear the outer state of its resources before starting and after finishing, so that it can construct test cases and suites of itself and test them.\"\n\t\n\tself\n\t\tassert: SimpleTestResourceA1 isAlreadyAvailable\n\t\tdescription: 'The resource was not set up for the test'.\n\tSimpleTestResourceA reset.\n\tSimpleTestResourceB reset.\n\tSimpleTestResourceA1 reset.\n\tself\n\t\tdeny: SimpleTestResourceA1 isAlreadyAvailable\n\t\tdescription: 'The resource was still set up before we began the run'.\n\t^[super clearOuterResourceStateDuring: aBlock]\n\t\tensure:\n\t\t\t[self\n\t\t\t\tdeny: SimpleTestResourceA1 isAlreadyAvailable\n\t\t\t\tdescription: 'The resource was still set up after we finished the run'.\n\t\t\tself\n\t\t\t\tdeny: SimpleTestResourceB1 isAlreadyAvailable\n\t\t\t\tdescription: 'The resource was still set up after we finished the run'.\n\t\t\tSimpleTestResourceA isAvailable.\n\t\t\tself\n\t\t\t\tassert: SimpleTestResourceA1 isAlreadyAvailable\n\t\t\t\tdescription: 'The resource was not set up again after the test'.\n\t\t\tSimpleTestResourceB isAvailable.\n\t\t\tself\n\t\t\t\tassert: SimpleTestResourceB1 isAlreadyAvailable\n\t\t\t\tdescription: 'The resource was not set up again after the test']! !\n\n!ManyTestResourceTestCase class methodsFor: 'accessing' stamp: 'nfr 1/3/2010 18:13'!\nresources\n\t^super resources\n\t\t, (Array with: SimpleTestResourceA with: SimpleTestResourceB)! !\n\n!ManyTestResourceTestCase class methodsFor: 'testing' stamp: ' 17/7/10 17:28'!\nshouldInheritSelectors\n\t^true! !\n\n!Matrix methodsFor: 'accessing' stamp: 'raok 10/21/2002 22:37'!\nanyOne\n\t^contents anyOne! !\n\n!Matrix methodsFor: 'accessing' stamp: 'raok 10/21/2002 22:37'!\nat: row at: column\n\t^contents at: (self indexForRow: row andColumn: column)! !\n\n!Matrix methodsFor: 'accessing' stamp: 'raok 11/28/2002 14:14'!\nat: r at: c ifInvalid: v\n\t\"If r,c is a valid index for this matrix, answer the corresponding element.\n\t Otherwise, answer v.\"\n\n\t(r between: 1 and: nrows) ifFalse: [^v].\n\t(c between: 1 and: ncols) ifFalse: [^v].\n\t^contents at: (r-1)*ncols + c\n! !\n\n!Matrix methodsFor: 'accessing' stamp: 'raok 11/22/2002 12:37'!\nat: row at: column incrementBy: value\n\t\"Array2D>>at:at:add: was the origin of this method, but in Smalltalk add:\n\t generally suggests adding an element to a collection, not doing a sum.\n\t This method, and SequenceableCollection>>at:incrementBy: that supports\n\t it, have been renamed to reveal their intention more clearly.\"\n\n\t^contents at: (self indexForRow: row andColumn: column) incrementBy: value! !\n\n!Matrix methodsFor: 'accessing' stamp: 'raok 10/21/2002 22:40'!\nat: row at: column put: value\n\t^contents at: (self indexForRow: row andColumn: column) put: value! !\n\n!Matrix methodsFor: 'accessing' stamp: 'raok 10/21/2002 22:42'!\natAllPut: value\n\tcontents atAllPut: value! !\n\n!Matrix methodsFor: 'accessing' stamp: 'raok 10/21/2002 22:43'!\natRandom\n\t^contents atRandom\n! !\n\n!Matrix methodsFor: 'accessing' stamp: 'raok 10/21/2002 22:43'!\natRandom: aGenerator\n\t^contents atRandom: aGenerator! !\n\n!Matrix methodsFor: 'accessing' stamp: 'raok 10/21/2002 22:44'!\ncolumnCount\n\t^ncols! !\n\n!Matrix methodsFor: 'accessing' stamp: 'raok 10/21/2002 22:48'!\nidentityIndexOf: anElement\n\t^self identityIndexOf: anElement ifAbsent: [0@0]\n! !\n\n!Matrix methodsFor: 'accessing' stamp: 'raok 10/21/2002 22:48'!\nidentityIndexOf: anElement ifAbsent: anExceptionBlock\n\t^self rowAndColumnForIndex:\n\t\t (contents identityIndexOf: anElement ifAbsent: [^anExceptionBlock value])\n! !\n\n!Matrix methodsFor: 'accessing' stamp: 'raok 11/22/2002 13:13'!\nindexOf: anElement\n\t\"If there are integers r, c such that (self at: r at: c) = anElement,\n\t answer some such r@c, otherwise answer 0@0.  This kind of perverse\n\t result is provided by analogy with SequenceableCollection>>indexOf:.\n\t The order in which the receiver are searched is UNSPECIFIED except\n\t that it is the same as the order used by #indexOf:ifAbsent: and #readStream.\"\n\n\t^self indexOf: anElement ifAbsent: [0@0]\n! !\n\n!Matrix methodsFor: 'accessing' stamp: 'raok 11/22/2002 13:10'!\nindexOf: anElement ifAbsent: anExceptionBlock\n\t\"If there are integers r, c such that (self at: r at: c) = anElement,\n\t answer some such r@c, otherwise answer the result of anExceptionBlock.\"\n\n\t^self rowAndColumnForIndex:\n\t\t (contents indexOf: anElement ifAbsent: [^anExceptionBlock value])\n! !\n\n!Matrix methodsFor: 'accessing' stamp: 'raok 10/21/2002 22:49'!\nreplaceAll: oldObject with: newObject\n\tcontents replaceAll: oldObject with: newObject! !\n\n!Matrix methodsFor: 'accessing' stamp: 'raok 10/21/2002 22:44'!\nrowCount\n\t^nrows! !\n\n!Matrix methodsFor: 'accessing' stamp: 'raok 10/21/2002 22:49'!\nsize\n\t^contents size! !\n\n!Matrix methodsFor: 'accessing' stamp: 'raok 10/21/2002 22:52'!\nswap: r1 at: c1 with: r2 at: c2\n\tcontents swap: (self indexForRow: r1 andColumn: c1)\n\t\t\t with: (self indexForRow: r2 andColumn: c2)! !\n\n!Matrix methodsFor: 'accessing rows/columns' stamp: 'raok 11/22/2002 12:41'!\natColumn: column\n\t|p|\n\n\tp := (self indexForRow: 1 andColumn: column)-ncols.\n\t^(1 to: nrows) collect: [:row | contents at: (p := p+ncols)]\n! !\n\n!Matrix methodsFor: 'accessing rows/columns' stamp: 'raok 11/28/2002 14:21'!\natColumn: column put: aCollection\n\t|p|\n\n\taCollection size = nrows ifFalse: [self error: 'wrong column size'].\n\tp := (self indexForRow: 1 andColumn: column)-ncols.\n\taCollection do: [:each | contents at: (p := p+ncols) put: each].\n\t^aCollection\n! !\n\n!Matrix methodsFor: 'accessing rows/columns' stamp: 'raok 10/21/2002 23:32'!\natRow: row\n\t(row between: 1 and: nrows)\n\t\tifFalse: [self error: '1st subscript out of range'].\n\t^contents copyFrom: (row-1)*ncols+1 to: row*ncols! !\n\n!Matrix methodsFor: 'accessing rows/columns' stamp: 'raok 11/22/2002 12:42'!\natRow: row put: aCollection\n\t|p|\n\n\taCollection size = ncols ifFalse: [self error: 'wrong row size'].\n\tp := (self indexForRow: row andColumn: 1)-1.\n\taCollection do: [:each | contents at: (p := p+1) put: each].\n\t^aCollection! !\n\n!Matrix methodsFor: 'accessing rows/columns' stamp: 'raok 10/23/2002 20:41'!\ndiagonal\n\t\"Answer (1 to: (nrows min: ncols)) collect: [:i | self at: i at: i]\"\n\t|i|\n\n\ti := ncols negated.\n\t^(1 to: (nrows min: ncols)) collect: [:j | contents at: (i := i + ncols + 1)]! !\n\n!Matrix methodsFor: 'accessing rows/columns' stamp: 'raok 11/28/2002 14:21'!\nswapColumn: anIndex withColumn: anotherIndex\n\t|a b|\n\n\ta := self indexForRow: 1 andColumn: anIndex.\n\tb := self indexForRow: 1 andColumn: anotherIndex.\n\tnrows timesRepeat: [\n\t\tcontents swap: a with: b.\n\t\ta := a + ncols.\n\t\tb := b + ncols].\n! !\n\n!Matrix methodsFor: 'accessing rows/columns' stamp: 'raok 11/28/2002 14:22'!\nswapRow: anIndex withRow: anotherIndex\n\t|a b|\n\n\ta := self indexForRow: anIndex andColumn: 1.\n\tb := self indexForRow: anotherIndex andColumn: 1.\n\tncols timesRepeat: [\n\t\tcontents swap: a with: b.\n\t\ta := a + 1.\n\t\tb := b + 1].\n! !\n\n!Matrix methodsFor: 'accessing rows/columns' stamp: 'raok 10/22/2002 00:13'!\ntransposed\n\tself assert: [nrows = ncols].\n\t^self indicesCollect: [:row :column | self at: column at: row]! !\n\n!Matrix methodsFor: 'adding' stamp: 'raok 10/21/2002 22:53'!\nadd: newObject\n\tself shouldNotImplement! !\n\n!Matrix methodsFor: 'arithmetic' stamp: 'raok 10/22/2002 20:01'!\n+* aCollection\n\t\"Premultiply aCollection by self.  aCollection should be an Array or Matrix.\n\t The name of this method is APL's +.x squished into Smalltalk syntax.\"\n\n\t^aCollection preMultiplyByMatrix: self\n! !\n\n!Matrix methodsFor: 'arithmetic' stamp: 'raok 11/28/2002 14:22'!\npreMultiplyByArray: a\n\t\"Answer a +* self where a is an Array.\"\n\n\tnrows = 1 ifFalse: [self error: 'dimensions do not conform'].\n\t^Matrix rows: a size columns: ncols tabulate: [:row :col |\n\t\t(a at: row) * (contents at: col)]\n! !\n\n!Matrix methodsFor: 'arithmetic' stamp: 'nice 12/27/2009 03:10'!\npreMultiplyByMatrix: m\n\t\"Answer m +* self where m is a Matrix.\"\n\t\n\n\tnrows = m columnCount ifFalse: [self error: 'dimensions do not conform'].\n\t^Matrix rows: m rowCount columns: ncols tabulate: [:row :col | | s |\n\t\ts := 0.\n\t\t1 to: nrows do: [:k | s := (m at: row at: k) * (self at: k at: col) + s].\n\t\ts]! !\n\n!Matrix methodsFor: 'comparing' stamp: 'raok 11/22/2002 12:58'!\n= aMatrix\n\t^aMatrix class == self class and: [\n\t aMatrix rowCount = nrows and: [\n\t aMatrix columnCount = ncols and: [\n\t aMatrix privateContents = contents]]]! !\n\n!Matrix methodsFor: 'comparing' stamp: 'raok 11/22/2002 13:14'!\nhash\n\t\"I'm really not sure what would be a good hash function here.\n\t The essential thing is that it must be compatible with #=, and\n\t this satisfies that requirement.\"\n\n\t^contents hash! !\n\n!Matrix methodsFor: 'converting' stamp: 'raok 10/21/2002 22:57'!\nasArray\n\t^contents shallowCopy! !\n\n!Matrix methodsFor: 'converting' stamp: 'raok 10/21/2002 22:57'!\nasBag\n\t^contents asBag! !\n\n!Matrix methodsFor: 'converting' stamp: 'raok 10/21/2002 22:58'!\nasByteArray\n\t^contents asByteArray! !\n\n!Matrix methodsFor: 'converting' stamp: 'raok 10/21/2002 22:58'!\nasCharacterSet\n\t^contents asCharacterSet! !\n\n!Matrix methodsFor: 'converting' stamp: 'raok 10/21/2002 23:00'!\nasFloatArray\n\t^contents asFloatArray! !\n\n!Matrix methodsFor: 'converting' stamp: 'raok 10/21/2002 22:58'!\nasIdentitySet\n\t^contents asIdentitySet! !\n\n!Matrix methodsFor: 'converting' stamp: 'raok 10/21/2002 23:00'!\nasIntegerArray\n\t^contents asIntegerArray! !\n\n!Matrix methodsFor: 'converting' stamp: 'raok 10/21/2002 22:58'!\nasOrderedCollection\n\t^contents asOrderedCollection! !\n\n!Matrix methodsFor: 'converting' stamp: 'raok 10/21/2002 22:58'!\nasSet\n\t^contents asSet! !\n\n!Matrix methodsFor: 'converting' stamp: 'raok 10/21/2002 22:58'!\nasSortedArray\n\t^contents asSortedArray! !\n\n!Matrix methodsFor: 'converting' stamp: 'raok 10/21/2002 22:59'!\nasSortedCollection\n\t^contents asSortedCollection! !\n\n!Matrix methodsFor: 'converting' stamp: 'raok 10/21/2002 22:59'!\nasSortedCollection: aBlock\n\t^contents asSortedCollection: aBlock! !\n\n!Matrix methodsFor: 'converting' stamp: 'raok 10/21/2002 23:00'!\nasWordArray\n\t^contents asWordArray! !\n\n!Matrix methodsFor: 'converting' stamp: 'raok 11/22/2002 13:02'!\nreadStream\n\t\"Answer a ReadStream that returns all the elements of the receiver\n\t in some UNSPECIFIED order.\"\n\n\t^ReadStream on: contents! !\n\n!Matrix methodsFor: 'copying' stamp: 'raok 11/22/2002 12:57'!\n, aMatrix\n\t\"Answer a new matrix having the same number of rows as the receiver and aMatrix,\n\t its columns being the columns of the receiver followed by the columns of aMatrix.\"\n\t|newCont newCols anArray oldCols a b c|\n\n\tself assert: [nrows = aMatrix rowCount].\n\tnewCont := Array new: self size + aMatrix size.\n\tanArray := aMatrix privateContents.\n\toldCols := aMatrix columnCount.\n\tnewCols := ncols + oldCols.\n\ta := b := c := 1.\n\t1 to: nrows do: [:r |\n\t\tnewCont replaceFrom: a to: a+ncols-1 with: contents startingAt: b.\n\t\tnewCont replaceFrom: a+ncols to: a+newCols-1 with: anArray startingAt: c.\n\t\ta := a + newCols.\n\t\tb := b + ncols.\n\t\tc := c + oldCols].\n\t^self class rows: nrows columns: newCols contents: newCont\n\t\t\n! !\n\n!Matrix methodsFor: 'copying' stamp: 'raok 11/22/2002 12:58'!\n,, aMatrix\n\t\"Answer a new matrix having the same number of columns as the receiver and aMatrix,\n\t its rows being the rows of the receiver followed by the rows of aMatrix.\"\n\n\tself assert: [ncols = aMatrix columnCount].\n\t^self class rows: nrows + aMatrix rowCount columns: ncols\n\t\tcontents: contents , aMatrix privateContents\n! !\n\n!Matrix methodsFor: 'copying' stamp: 'raok 10/21/2002 23:07'!\ncopy\n\t^self class rows: nrows columns: ncols contents: contents copy! !\n\n!Matrix methodsFor: 'copying' stamp: 'nice 10/5/2009 09:09'!\npostCopy\n\tsuper postCopy.\n\tcontents := contents copy! !\n\n!Matrix methodsFor: 'copying' stamp: 'raok 10/21/2002 23:07'!\nshallowCopy\n\t^self class rows: nrows columns: ncols contents: contents shallowCopy! !\n\n!Matrix methodsFor: 'copying' stamp: 'raok 10/21/2002 23:27'!\nshuffled\n\t^self class rows: nrows columns: ncols contents: (contents shuffled)! !\n\n!Matrix methodsFor: 'copying' stamp: 'raok 10/21/2002 23:27'!\nshuffledBy: aRandom\n\t^self class rows: nrows columns: ncols contents: (contents shuffledBy: aRandom)! !\n\n!Matrix methodsFor: 'enumerating' stamp: 'raok 10/21/2002 23:41'!\ncollect: aBlock\n\t\"Answer a new matrix with transformed elements; transformations should be independent.\"\n\n\t^self class rows: nrows columns: ncols contents: (contents collect: aBlock)! !\n\n!Matrix methodsFor: 'enumerating' stamp: 'raok 10/21/2002 23:42'!\ndifference: aCollection\n\t\"Union is in because the result is always a Set.\n\t Difference and intersection are out because the result is like the receiver,\n\t and with irregular seleection that cannot be.\"\n\tself shouldNotImplement! !\n\n!Matrix methodsFor: 'enumerating' stamp: 'raok 10/21/2002 23:40'!\ndo: aBlock\n\t\"Pass elements to aBlock one at a time in row-major order.\"\n\tcontents do: aBlock! !\n\n!Matrix methodsFor: 'enumerating' stamp: 'raok 10/23/2002 20:57'!\nindicesCollect: aBlock\n\t|r i|\n\n\tr := Array new: nrows * ncols.\n\ti := 0.\n\t1 to: nrows do: [:row |\n\t\t1 to: ncols do: [:column |\n\t\t\tr at: (i := i+1) put: (aBlock value: row value: column)]].\n\t^self class rows: nrows columns: ncols contents: r! !\n\n!Matrix methodsFor: 'enumerating' stamp: 'raok 10/21/2002 23:49'!\nindicesDo: aBlock\n\t1 to: nrows do: [:row |\n\t\t1 to: ncols do: [:column |\n\t\t\taBlock value: row value: column]].! !\n\n!Matrix methodsFor: 'enumerating' stamp: 'raok 10/21/2002 23:51'!\nindicesInject: start into: aBlock\n\t|current|\n\n\tcurrent := start.\n\t1 to: nrows do: [:row |\n\t\t1 to: ncols do: [:column |\n\t\t\tcurrent := aBlock value: current value: row value: column]].\n\t^current! !\n\n!Matrix methodsFor: 'enumerating' stamp: 'raok 10/21/2002 23:42'!\nintersection: aCollection\n\t\"Union is in because the result is always a Set.\n\t Difference and intersection are out because the result is like the receiver,\n\t and with irregular seleection that cannot be.\"\n\tself shouldNotImplement! !\n\n!Matrix methodsFor: 'enumerating' stamp: 'raok 10/21/2002 23:42'!\nreject: aBlock\n\tself shouldNotImplement! !\n\n!Matrix methodsFor: 'enumerating' stamp: 'raok 10/21/2002 23:42'!\nselect: aBlock\n\tself shouldNotImplement! !\n\n!Matrix methodsFor: 'enumerating' stamp: 'raok 10/22/2002 00:15'!\nwith: aCollection collect: aBlock\n\t\"aCollection must support #at:at: and be at least as large as the receiver.\"\n\n\t^self withIndicesCollect: [:each :row :column |\n\t\taBlock value: each value: (aCollection at: row at: column)]\n! !\n\n!Matrix methodsFor: 'enumerating' stamp: 'raok 10/21/2002 23:53'!\nwith: aCollection do: aBlock\n\t\"aCollection must support #at:at: and be at least as large as the receiver.\"\n\n\tself withIndicesDo: [:each :row :column |\n\t\taBlock value: each value: (aCollection at: row at: column)].\n! !\n\n!Matrix methodsFor: 'enumerating' stamp: 'raok 10/21/2002 23:55'!\nwith: aCollection inject: startingValue into: aBlock\n\t\"aCollection must support #at:at: and be at least as large as the receiver.\"\n\n\t^self withIndicesInject: startingValue into: [:value :each :row :column |\n\t\taBlock value: value value: each value: (aCollection at: row at: column)]! !\n\n!Matrix methodsFor: 'enumerating' stamp: 'raok 10/21/2002 23:52'!\nwithIndicesCollect: aBlock\n\t|i r|\n\n\ti := 0.\n\tr := contents shallowCopy.\n\t1 to: nrows do: [:row |\n\t\t1 to: ncols do: [:column |\n\t\t\ti := i+1.\n\t\t\tr at: i put: (aBlock value: (r at: i) value: row value: column)]].\n\t^self class rows: nrows columns: ncols contents: r\n! !\n\n!Matrix methodsFor: 'enumerating' stamp: 'raok 10/21/2002 23:52'!\nwithIndicesDo: aBlock\n\t|i|\n\n\ti := 0.\n\t1 to: nrows do: [:row |\n\t\t1 to: ncols do: [:column |\n\t\t\taBlock value: (contents at: (i := i+1)) value: row value: column]].\n! !\n\n!Matrix methodsFor: 'enumerating' stamp: 'raok 10/21/2002 23:52'!\nwithIndicesInject: start into: aBlock\n\t|i current|\n\n\ti := 0.\n\tcurrent := start.\n\t1 to: nrows do: [:row |\n\t\t1 to: ncols do: [:column |\n\t\t\tcurrent := aBlock value: current value: (contents at: (i := i+1)) \n\t\t\t\t\t\t\t  value: row value: column]].\n\t^current! !\n\n!Matrix methodsFor: 'printing' stamp: 'raok 10/21/2002 23:22'!\nstoreOn: aStream\n\taStream nextPut: $(; nextPutAll: self class name;\n\t\tnextPutAll: ' rows: '; store: nrows;\n\t\tnextPutAll: ' columns: '; store: ncols;\n\t\tnextPutAll: ' contents: '; store: contents;\n\t\tnextPut: $)! !\n\n!Matrix methodsFor: 'removing' stamp: 'raok 10/21/2002 22:54'!\nremove: anObject ifAbsent: anExceptionBlock\n\tself shouldNotImplement! !\n\n!Matrix methodsFor: 'removing' stamp: 'klub 9/14/2009 16:34'!\nremoveAll\n\n\tself shouldNotImplement! !\n\n!Matrix methodsFor: 'testing' stamp: 'raok 10/21/2002 23:24'!\nidentityIncludes: anObject\n\t^contents identityIncludes: anObject! !\n\n!Matrix methodsFor: 'testing' stamp: 'raok 10/21/2002 23:23'!\nincludes: anObject\n\t^contents includes: anObject! !\n\n!Matrix methodsFor: 'testing' stamp: 'raok 10/21/2002 23:24'!\nincludesAllOf: aCollection\n\t^contents includesAllOf: aCollection! !\n\n!Matrix methodsFor: 'testing' stamp: 'raok 10/21/2002 23:24'!\nincludesAnyOf: aCollection\n\t^contents includesAnyOf: aCollection! !\n\n!Matrix methodsFor: 'testing' stamp: 'raok 11/22/2002 13:03'!\nisSequenceable\n\t\"LIE so that arithmetic on matrices will work.\n\t What matters for arithmetic is not that there should be random indexing\n\t but that the structure should be stable and independent of the values of\n\t the elements.  #isSequenceable is simply the wrong question to ask.\"\n\t^true! !\n\n!Matrix methodsFor: 'testing' stamp: 'raok 10/21/2002 23:25'!\noccurrencesOf: anObject\n\t^contents occurrencesOf: anObject! !\n\n!Matrix methodsFor: 'private' stamp: 'raok 10/21/2002 22:40'!\nindexForRow: row andColumn: column\n\t(row between: 1 and: nrows)\n\t\tifFalse: [self error: '1st subscript out of range'].\n\t(column between: 1 and: ncols)\n\t\tifFalse: [self error: '2nd subscript out of range'].\n\t^(row-1) * ncols + column! !\n\n!Matrix methodsFor: 'private' stamp: 'raok 11/22/2002 12:56'!\nprivateContents\n\t\"Only used in #, #,, and #= so far.\n\t It used to be called #contents, but that clashes with Collection>>contents.\"\n\n\t^contents! !\n\n!Matrix methodsFor: 'private' stamp: 'raok 10/21/2002 22:47'!\nrowAndColumnForIndex: index\n\t|t|\n\n\tt := index - 1.\n\t^(t // ncols + 1)@(t \\\\ ncols + 1)! !\n\n!Matrix methodsFor: 'private' stamp: 'raok 10/21/2002 23:05'!\nrows: rows columns: columns contents: anArray\n\tself assert: [rows isInteger and: [rows >= 0]].\n\tself assert: [columns isInteger and: [columns >= 0]].\n\tself assert: [rows * columns = anArray size].\n\tnrows := rows.\n\tncols := columns.\n\tcontents := anArray.\n\t^self! !\n\n!Matrix methodsFor: 'accessing submatrices' stamp: 'raok 11/25/2002 13:09'!\natRows: rs columns: cs\n\t\"Answer a Matrix obtained by slicing the receiver.\n\t rs and cs should be sequenceable collections of positive integers.\"\n\n\t^self class rows: rs size columns: cs size tabulate: [:r :c |\n\t\tself at: (rs at: r) at: (cs at: c)]! !\n\n!Matrix methodsFor: 'accessing submatrices' stamp: 'raok 11/25/2002 12:30'!\natRows: r1 to: r2 columns: c1 to: c2\n\t\"Answer a submatrix [r1..r2][c1..c2] of the receiver.\"\n\t|rd cd|\n\n\trd := r1 - 1.\n\tcd := c1 - 1.\n\t^self class rows: r2-rd columns: c2-cd tabulate: [:r :c| self at: r+rd at: c+cd]\n! !\n\n!Matrix methodsFor: 'accessing submatrices' stamp: 'raok 11/25/2002 13:05'!\natRows: r1 to: r2 columns: c1 to: c2 ifInvalid: element\n\t\"Answer a submatrix [r1..r2][c1..c2] of the receiver.\n\t Portions of the result outside the bounds of the original matrix\n\t are filled in with element.\"\n\t|rd cd|\n\n\trd := r1 - 1.\n\tcd := c1 - 1.\n\t^self class rows: r2-rd columns: c2-cd tabulate: [:r :c| self at: r+rd at: c+cd ifInvalid: element]\n! !\n\n!Matrix methodsFor: 'accessing submatrices' stamp: 'raok 11/25/2002 12:32'!\natRows: r1 to: r2 columns: c1 to: c2 put: aMatrix\n\t\"Set the [r1..r2][c1..c2] submatrix of the receiver\n\t from the [1..r2-r1+1][1..c2-c1+1] submatrix of aMatrix.\n\t As long as aMatrix responds to at:at: and accepts arguments in the range shown,\n\t we don't care if it is bigger or even if it is a Matrix at all.\"\n\t|rd cd|\n\n\trd := r1 - 1.\n\tcd := c1 - 1.\n\tr1 to: r2 do: [:r |\n\t\tc1 to: c2 do: [:c |\n\t\t\tself at: r at: c put: (aMatrix at: r-rd at: c-cd)]].\n\t^aMatrix\n! !\n\n!Matrix commentStamp: '<historical>' prior: 0!\nI represent a two-dimensional array, rather like Array2D.\nThere are three main differences between me and Array2D:\n(1) Array2D inherits from ArrayedCollection, but isn't one.  A lot of things that should work\n    do not work in consequence of this.\n(2) Array2D uses \"at: column at: row\" index order, which means that nothing you write using\n    it is likely to work either.  I use the almost universal \"at: row at: column\" order, so it is\n    much easier to adapt code from other languages without going doolally.\n(3) Array2D lets you specify the class of the underlying collection, I don't.\n\nStructure:\n  nrows : a non-negative integer saying how many rows there are.\n  ncols : a non-negative integer saying how many columns there are.\n  contents : an Array holding the elements in row-major order.  That is, for a 2x3 array\n    the contents are (11 12 13 21 22 23).  Array2D uses column major order.\n\n    You can specify the class of 'contents' when you create a new Array2D,\n    but Matrix always gives you an Array.\n\n    There is a reason for this.  In strongly typed languages like Haskell and Clean,\n    'unboxed arrays' save you both space AND time.  But in Squeak, while\n    WordArray and FloatArray and so on do save space, it costs time to use them.\n    A LOT of time.  I've measured aFloatArray sum running nearly twice as slow as\n    anArray sum.  The reason is that whenever you fetch an element from an Array,\n    that's all that happens, but when you fetch an element from aFloatArray, a whole\n    new Float gets allocated to hold the value.  This takes time and churns memory.\n    So the paradox is that if you want fast numerical stuff, DON'T use unboxed arrays!!\n\n    Another reason for always insisting on an Array is that letting it be something\n    else would make things like #, and #,, rather more complicated.  Always using Array\n    is the simplest thing that could possibly work, and it works rather well.\n\nI was trying to patch Array2D to make more things work, but just couldn't get my head\naround the subscript order.  That's why I made Matrix.\n\nElement-wise matrix arithmetic works; you can freely mix matrices and numbers but\ndon't try to mix matrices and arrays (yet).\nMatrix multiplication, using the symbol +* (derived from APL's +.x), works between\n(Matrix or Array) +* (Matrix or Array).  Don't try to use a number as an argument of +*.\nMatrix * Number and Number * Matrix work fine, so you don't need +* with numbers.\n\nStill to come: oodles of stuff.  Gaussian elimination maybe, other stuff probably not.\n!\n!Matrix class methodsFor: 'instance creation' stamp: 'raok 10/23/2002 20:58'!\ncolumn: aCollection\n\t\"Should this be called #fromColumn:?\"\n\n\t^self rows: aCollection size columns: 1 contents: aCollection asArray shallowCopy! !\n\n!Matrix class methodsFor: 'instance creation' stamp: 'raok 10/22/2002 00:09'!\ndiagonal: aCollection\n\t|r i|\n\tr := self zeros: aCollection size.\n\ti := 0.\n\taCollection do: [:each | i := i+1. r at: i at: i put: each].\n\t^r! !\n\n!Matrix class methodsFor: 'instance creation' stamp: 'raok 10/23/2002 20:59'!\nidentity: n\n\t|r|\n\n\tr := self zeros: n.\n\t1 to: n do: [:i | r at: i at: i put: 1].\n\t^r! !\n\n!Matrix class methodsFor: 'instance creation' stamp: 'raok 10/22/2002 00:06'!\nnew: dim\n\t\"Answer a dim*dim matrix.  Is this an abuse of #new:?  The argument is NOT a size.\"\n\t^self rows: dim columns: dim! !\n\n!Matrix class methodsFor: 'instance creation' stamp: 'raok 11/25/2002 12:51'!\nnew: dim element: element\n\t\"Answer a dim*dim matrix with all elements set to element.\n\t Is this an abuse of #new:?  The argument is NOT a size.\"\n\n\t^self rows: dim columns: dim element: element! !\n\n!Matrix class methodsFor: 'instance creation' stamp: 'raok 10/22/2002 19:54'!\nnew: dim tabulate: aBlock\n\t\"Answer a dim*dim matrix where it at: i at: j is aBlock value: i value: j.\"\n\t^self rows: dim columns: dim tabulate: aBlock! !\n\n!Matrix class methodsFor: 'instance creation' stamp: 'raok 11/28/2002 14:08'!\nones: n\n\t^self new: n element: 1\n! !\n\n!Matrix class methodsFor: 'instance creation' stamp: 'raok 10/23/2002 20:59'!\nrow: aCollection\n\t\"Should this be called #fromRow:?\"\n\n\t^self rows: 1 columns: aCollection size contents: aCollection asArray shallowCopy! !\n\n!Matrix class methodsFor: 'instance creation' stamp: 'raok 10/22/2002 00:04'!\nrows: rows columns: columns\n\t^self rows: rows columns: columns contents: (Array new: rows*columns)! !\n\n!Matrix class methodsFor: 'instance creation' stamp: 'raok 11/28/2002 14:10'!\nrows: rows columns: columns element: element\n\t^self rows: rows columns: columns\n\t\tcontents: ((Array new: rows*columns) atAllPut: element; yourself)! !\n\n!Matrix class methodsFor: 'instance creation' stamp: 'raok 10/22/2002 19:51'!\nrows: rows columns: columns tabulate: aBlock\n\t\"Answer a new Matrix of the given dimensions where\n\t result at: i at: j     is   aBlock value: i value: j\"\n\t|a i|\n\n\ta := Array new: rows*columns.\n\ti := 0.\n\t1 to: rows do: [:row |\n\t\t1 to: columns do: [:column |\n\t\t\ta at: (i := i+1) put: (aBlock value: row value: column)]].\n\t^self rows: rows columns: columns contents: a\n! !\n\n!Matrix class methodsFor: 'instance creation' stamp: 'raok 11/28/2002 14:09'!\nzeros: n\n\t^self new: n element: 0! !\n\n!Matrix class methodsFor: 'private' stamp: 'raok 10/21/2002 23:06'!\nrows: rows columns: columns contents: contents\n\t^self new rows: rows columns: columns contents: contents! !\n\n!Message methodsFor: 'private' stamp: 'ssa 5/27/2010 11:13'!\narguments: anArray\n\n\targs _ anArray! !\n\n!Message methodsFor: 'private' stamp: 'ssa 7/16/2010 19:03'!\nselector: aSymbol\n\n\tselector _ aSymbol.\n! !\n\n!Message methodsFor: 'sending' stamp: 'ssa 5/28/2010 17:06'!\nsentTo: receiver\n\t\"answer the result of sending this message to receiver\"\n\n\tlookupClass == nil\n\t\tifTrue: [^ receiver perform: selector withArguments: args asArray]\n\t\tifFalse: [^ receiver perform: selector withArguments: args asArray inSuperclass: lookupClass]! !\n\n!MessageSet class methodsFor: 'instance creation' stamp: 'ssa 9/3/2008 11:07'!\nopenMessageList: messageList name: labelString autoSelect: autoSelectString\n\t\"Open a system view for a MessageSet on messageList. \n\t 1/24/96 sw: the there-are-no msg now supplied by my sender\"\n\n\t| messageSet |\n\tmessageSet _ self messageList: messageList.\n\tmessageSet autoSelectString: autoSelectString.\n\tScheduledControllers scheduleActive: (self open: messageSet name: labelString)! !\n\n!MessageTally methodsFor: 'comparing'!\n< aMessageTally \n\t\"Refer to the comment in Magnitude|<.\"\n\n\t^tally > aMessageTally tally! !\n\n!MessageTally methodsFor: 'comparing' stamp: 'tk 7/5/2001 22:05'!\n= aMessageTally\n\n\tself species == aMessageTally species ifFalse: [^ false].\n\t^ aMessageTally method == method! !\n\n!MessageTally methodsFor: 'comparing'!\n> aMessageTally \n\t\"Refer to the comment in Magnitude|>.\"\n\n\t^tally < aMessageTally tally! !\n\n!MessageTally methodsFor: 'comparing'!\nhash\n\t\"Hash is reimplemented because = is implemented.\"\n\n\t^method asOop! !\n\n!MessageTally methodsFor: 'comparing'!\nisPrimitives\n\t\"Detect pseudo node used to carry tally of local hits\"\n\t^ receivers == nil! !\n\n!MessageTally methodsFor: 'comparing'!\nsonsOver: threshold\n\n\t| hereTally last sons |\n\t(receivers == nil or: [receivers size = 0]) ifTrue: [^#()].\n\thereTally _ tally.\n\tsons _ receivers select:  \"subtract subNode tallies for primitive hits here\"\n\t\t[:son |\n\t\thereTally _ hereTally - son tally.\n\t\tson tally > threshold].\n\thereTally > threshold\n\t\tifTrue: \n\t\t\t[last _ MessageTally new class: class method: method.\n\t\t\t^sons copyWith: (last primitives: hereTally)].\n\t^sons! !\n\n!MessageTally methodsFor: 'comparing' stamp: 'tk 7/5/2001 22:04'!\nspecies\n\t^MessageTally! !\n\n!MessageTally methodsFor: 'initialize-release'!\nclose\n\n\t(Timer isMemberOf: Process) ifTrue: [Timer terminate].\n\tTimer _ ObservedProcess _ nil.\n\tclass _ method _ tally _ receivers _ nil! !\n\n!MessageTally methodsFor: 'initialize-release' stamp: 'nk 3/8/2004 12:29'!\ninitialize\n\tmaxClassNameSize _ self class defaultMaxClassNameSize.\n\tmaxClassPlusSelectorSize _ self class defaultMaxClassPlusSelectorSize.\n\tmaxTabs _ self class defaultMaxTabs.! !\n\n!MessageTally methodsFor: 'initialize-release' stamp: 'dmu 9/17/2010 12:02'!\nspyEvery: millisecs on: aBlock \n\t\"Create a spy and spy on the given block at the specified rate.\"\n\n\t| myDelay startTime time0 |\n\t(aBlock isMemberOf: BlockContext)\n\t\tifFalse: [self error: 'spy needs a block here'].\n\tself class: aBlock receiver class method: aBlock method.\n\t\t\"set up the probe\"\n\tObservedProcess _ Processor thisProcess.\n\tmyDelay := Delay forMilliseconds: millisecs.\n\ttime0 := Time millisecondClockValue.\n\tgcStats _ SmalltalkImage current getVMParameters.\n\tTimer :=\n\t\t[[true] whileTrue: \n\t\t\t[startTime := Time millisecondClockValue.\n\t\t\tmyDelay wait.\n\t\t\tObservedProcess suspend.\n\t\t\tself tally: ObservedProcess suspendedContextWaitingIfNecessary\n\t\t\t\t\"tally can be > 1 if ran a long primitive\"\n\t\t\t\tby: (Time millisecondClockValue - startTime) // millisecs.\n\t\t\t\tObservedProcess resume].\n\t\tnil] newProcess.\n\tTimer priority: Processor userInterruptPriority.\n\t\t\"activate the probe and evaluate the block\"\n\tTimer resume.\n\t^ aBlock ensure:\n\t\t[\"Collect gc statistics\"\n\t\tSmalltalkImage current getVMParameters keysAndValuesDo:\n\t\t\t[:idx :gcVal| gcStats at: idx put: (gcVal - (gcStats at: idx))].\n\t\t\"cancel the probe and return the value\"\n\t\tTimer notNil ifTrue:[Timer terminate].\n\t\ttime := Time millisecondClockValue - time0]! !\n\n!MessageTally methodsFor: 'initialize-release' stamp: 'dmu 9/17/2010 12:03'!\nspyEvery: millisecs onProcess: aProcess forMilliseconds: msecDuration \n\t\"Create a spy and spy on the given process at the specified rate.\"\n\t| myDelay time0 endTime sem |\n\t(aProcess isKindOf: Process)\n\t\tifFalse: [self error: 'spy needs a Process here'].\n\tself class: aProcess suspendedContextWaitingIfNecessary receiver class method: aProcess suspendedContext method.\n\t\"set up the probe\"\n\tObservedProcess _ aProcess.\n\tmyDelay _ Delay forMilliseconds: millisecs.\n\ttime0 _ Time millisecondClockValue.\n\tendTime _ time0 + msecDuration.\n\tsem _ Semaphore new.\n\tgcStats _ SmalltalkImage current  getVMParameters.\n\tTimer _ [[| startTime | \n\t\t\tstartTime _ Time millisecondClockValue.\n\t\t\tmyDelay wait.\n\t\t\tObservedProcess suspend.\n\t\t\tself tally: ObservedProcess suspendedContextWaitingIfNecessary by: Time millisecondClockValue - startTime // millisecs.\n\t\t\tstartTime < endTime.\n\t\t\tObservedProcess resume] whileTrue.\n\t\t\tsem signal]\n\t\t\t\tforkAt: (ObservedProcess priority + 1 min: Processor highestPriority).\n\t\"activate the probe and wait for it to finish\"\n\tsem wait.\n\t\"Collect gc statistics\"\n\tSmalltalkImage current  getVMParameters keysAndValuesDo:\n\t\t[:idx :gcVal| gcStats at: idx put: (gcVal - gcStats at: idx)].\n\ttime _ Time millisecondClockValue - time0! !\n\n!MessageTally methodsFor: 'printing' stamp: 'dew 3/15/2000 21:49'!\nfullPrintOn: aStream tallyExact: isExact orThreshold: perCent\n\t| threshold |  \n\tisExact ifFalse: [threshold _ (perCent asFloat / 100 * tally) rounded].\n\taStream nextPutAll: '**Tree**'; cr.\n\tself treePrintOn: aStream\n\t\ttabs: OrderedCollection new\n\t\tthisTab: ''\n\t\ttotal: tally\n\t\ttotalTime: time\n\t\ttallyExact: isExact\n\t\torThreshold: threshold.\n\taStream nextPut: Character newPage; cr.\n\taStream nextPutAll: '**Leaves**'; cr.\n\tself leavesPrintOn: aStream\n\t\ttallyExact: isExact\n\t\torThreshold: threshold! !\n\n!MessageTally methodsFor: 'printing' stamp: 'dew 3/22/2000 02:28'!\nleavesPrintOn: aStream tallyExact: isExact orThreshold: threshold\n\t| dict |\n\tdict _ IdentityDictionary new: 100.\n\tself leavesInto: dict fromSender: nil.\n\tisExact ifTrue: \n\t\t[dict asSortedCollection\n\t\t\tdo: [:node |\n\t\t\t\tnode printOn: aStream total: tally totalTime: nil tallyExact: isExact.\n\t\t\t\tnode printSenderCountsOn: aStream]]\n\t\tifFalse:\n\t\t[(dict asOrderedCollection\n\t\t\t\tselect: [:node | node tally > threshold])\n\t\t\tasSortedCollection\n\t\t\tdo: [:node |\n\t\t\t\tnode printOn: aStream total: tally totalTime: time tallyExact: isExact]]! !\n\n!MessageTally methodsFor: 'printing' stamp: 'nk 3/8/2004 12:14'!\nprintOn: aStream \n\t| aSelector className aClass |\n\t(class isNil or: [method isNil]) ifTrue: [^super printOn: aStream].\n\taSelector := class selectorAtMethod: method setClass: [:c | aClass := c].\n\tclassName := aClass name contractTo: self maxClassNameSize.\n\taStream\n\t\tnextPutAll: className;\n\t\tnextPutAll: ' >> ';\n\t\tnextPutAll: (aSelector \n\t\t\t\t\tcontractTo: self maxClassPlusSelectorSize - className size)! !\n\n!MessageTally methodsFor: 'printing' stamp: 'nk 3/8/2004 12:15'!\nprintOn: aStream total: total totalTime: totalTime tallyExact: isExact \n\t| aSelector className myTally aClass percentage |\n\tisExact \n\t\tifTrue: \n\t\t\t[myTally := tally.\n\t\t\treceivers == nil \n\t\t\t\tifFalse: [receivers do: [:r | myTally := myTally - r tally]].\n\t\t\taStream\n\t\t\t\tprint: myTally;\n\t\t\t\tspace]\n\t\tifFalse: \n\t\t\t[percentage := tally asFloat / total * 100.0 roundTo: 0.1.\n\t\t\taStream\n\t\t\t\tprint: percentage;\n\t\t\t\tnextPutAll: '% {';\n\t\t\t\tprint: (percentage * totalTime / 100) rounded;\n\t\t\t\tnextPutAll: 'ms} '].\n\treceivers == nil \n\t\tifTrue: \n\t\t\t[aStream\n\t\t\t\tnextPutAll: 'primitives';\n\t\t\t\tcr]\n\t\tifFalse: \n\t\t\t[aSelector := class selectorAtMethod: method setClass: [:c | aClass := c].\n\t\t\tclassName := aClass name contractTo: self maxClassNameSize.\n\t\t\taStream\n\t\t\t\tnextPutAll: class name;\n\t\t\t\tnextPutAll: (aClass = class \n\t\t\t\t\t\t\tifTrue: ['>>']\n\t\t\t\t\t\t\tifFalse: ['(' , aClass name , ')>>']);\n\t\t\t\tnextPutAll: (aSelector \n\t\t\t\t\t\t\tcontractTo: self maxClassPlusSelectorSize - className size);\n\t\t\t\tcr]! !\n\n!MessageTally methodsFor: 'printing' stamp: 'dew 3/22/2000 02:28'!\nprintSenderCountsOn: aStream\n\t| mergedSenders mergedNode |\n\tmergedSenders _ IdentityDictionary new.\n\tsenders do:\n\t\t[:node |\n\t\tmergedNode _ mergedSenders at: node method ifAbsent: [nil].\n\t\tmergedNode == nil\n\t\t\tifTrue: [mergedSenders at: node method put: node]\n\t\t\tifFalse: [mergedNode bump: node tally]].\n\tmergedSenders asSortedCollection do:\n\t\t[:node | \n\t\t10 to: node tally printString size by: -1 do: [:i | aStream space].\n\t\tnode printOn: aStream total: tally totalTime: nil tallyExact: true]! !\n\n!MessageTally methodsFor: 'printing' stamp: 'nk 3/8/2004 12:23'!\ntreePrintOn: aStream tabs: tabs thisTab: myTab total: total totalTime: totalTime tallyExact: isExact orThreshold: threshold \n\t| sons sonTab |\n\ttabs do: [:tab | aStream nextPutAll: tab].\n\ttabs size > 0 \n\t\tifTrue: \n\t\t\t[self \n\t\t\t\tprintOn: aStream\n\t\t\t\ttotal: total\n\t\t\t\ttotalTime: totalTime\n\t\t\t\ttallyExact: isExact].\n\tsons := isExact ifTrue: [receivers] ifFalse: [self sonsOver: threshold].\n\tsons isEmpty \n\t\tifFalse: \n\t\t\t[tabs addLast: myTab.\n\t\t\tsons := sons asSortedCollection.\n\t\t\t(1 to: sons size) do: \n\t\t\t\t\t[:i | \n\t\t\t\t\tsonTab := i < sons size ifTrue: ['  |'] ifFalse: ['  '].\n\t\t\t\t\t(sons at: i) \n\t\t\t\t\t\ttreePrintOn: aStream\n\t\t\t\t\t\ttabs: (tabs size < self maxTabs \n\t\t\t\t\t\t\t\tifTrue: [tabs]\n\t\t\t\t\t\t\t\tifFalse: [(tabs select: [:x | x = '[']) copyWith: '['])\n\t\t\t\t\t\tthisTab: sonTab\n\t\t\t\t\t\ttotal: total\n\t\t\t\t\t\ttotalTime: totalTime\n\t\t\t\t\t\ttallyExact: isExact\n\t\t\t\t\t\torThreshold: threshold].\n\t\t\ttabs removeLast]! !\n\n!MessageTally methodsFor: 'printing format' stamp: 'nk 3/8/2004 12:29'!\nmaxClassNameSize\n\t^maxClassNameSize! !\n\n!MessageTally methodsFor: 'printing format' stamp: 'nk 3/8/2004 12:30'!\nmaxClassNameSize: aNumber\n\tmaxClassNameSize := aNumber! !\n\n!MessageTally methodsFor: 'printing format' stamp: 'nk 3/8/2004 12:29'!\nmaxClassPlusSelectorSize\n\t^maxClassPlusSelectorSize! !\n\n!MessageTally methodsFor: 'printing format' stamp: 'nk 3/8/2004 12:30'!\nmaxClassPlusSelectorSize: aNumber\n\tmaxClassPlusSelectorSize := aNumber! !\n\n!MessageTally methodsFor: 'printing format' stamp: 'nk 3/8/2004 12:29'!\nmaxTabs\n\t^maxTabs! !\n\n!MessageTally methodsFor: 'printing format' stamp: 'nk 3/8/2004 12:30'!\nmaxTabs: aNumber\n\tmaxTabs := aNumber! !\n\n!MessageTally methodsFor: 'reporting'!\nreport: strm \n\t\"Print a report, with cutoff percentage of each element of the tree \n\t(leaves, roots, tree)=2, on the stream, strm.\"\n\n\tself report: strm cutoff: 2! !\n\n!MessageTally methodsFor: 'reporting' stamp: 'spfa 6/1/2004 19:23'!\nreport: strm cutoff: threshold \n\ttally = 0\n\t\tifTrue: [strm nextPutAll: ' - no tallies obtained']\n\t\tifFalse: \n\t\t\t[strm nextPutAll: ' - '; print: tally; nextPutAll: ' tallies, ', time printString, ' msec.'; cr; cr.\n\t\t\tself fullPrintOn: strm tallyExact: false orThreshold: threshold].\n\t\t\n\ttime isZero ifFalse:\t\n\t\t[self reportGCStatsOn: strm].! !\n\n!MessageTally methodsFor: 'reporting' stamp: 'ar 7/18/2001 22:12'!\nreportGCStatsOn: str\n\t| oldSpaceEnd youngSpaceEnd memoryEnd fullGCs fullGCTime incrGCs incrGCTime tenureCount upTime rootOverflows |\n\tupTime _ time.\n\toldSpaceEnd\t\t\t_ gcStats at: 1.\n\tyoungSpaceEnd\t\t_ gcStats at: 2.\n\tmemoryEnd\t\t\t_ gcStats at: 3.\n\tfullGCs\t\t\t\t_ gcStats at: 7.\n\tfullGCTime\t\t\t_ gcStats at: 8.\n\tincrGCs\t\t\t\t_ gcStats at: 9.\n\tincrGCTime\t\t\t_ gcStats at: 10.\n\ttenureCount\t\t\t_ gcStats at: 11.\n\trootOverflows\t\t_ gcStats at: 22.\n\n\tstr cr.\n\tstr\tnextPutAll: '**Memory**'; cr.\n\tstr\tnextPutAll:\t'\told\t\t\t';\n\t\tnextPutAll: oldSpaceEnd asStringWithCommasSigned; nextPutAll: ' bytes'; cr.\n\tstr\tnextPutAll: '\tyoung\t\t';\n\t\tnextPutAll: (youngSpaceEnd - oldSpaceEnd) asStringWithCommasSigned; nextPutAll: ' bytes'; cr.\n\tstr\tnextPutAll: '\tused\t\t';\n\t\tnextPutAll: youngSpaceEnd asStringWithCommasSigned; nextPutAll: ' bytes'; cr.\n\tstr\tnextPutAll: '\tfree\t\t';\n\t\tnextPutAll: (memoryEnd - youngSpaceEnd) asStringWithCommasSigned; nextPutAll: ' bytes'; cr.\n\n\tstr cr.\n\tstr\tnextPutAll: '**GCs**'; cr.\n\tstr\tnextPutAll: '\tfull\t\t\t';\n\t\tprint: fullGCs; nextPutAll: ' totalling '; nextPutAll: fullGCTime asStringWithCommas; nextPutAll: 'ms (';\n\t\tprint: ((fullGCTime / upTime * 100) roundTo: 1.0);\n\t\tnextPutAll: '% uptime)'.\n\tfullGCs = 0 ifFalse:\n\t\t[str\tnextPutAll: ', avg '; print: ((fullGCTime / fullGCs) roundTo: 1.0); nextPutAll: 'ms'].\n\tstr\tcr.\n\tstr\tnextPutAll: '\tincr\t\t';\n\t\tprint: incrGCs; nextPutAll: ' totalling '; nextPutAll: incrGCTime asStringWithCommas; nextPutAll: 'ms (';\n\t\tprint: ((incrGCTime / upTime * 100) roundTo: 1.0);\n\t\tnextPutAll: '% uptime)'.\n\tincrGCs = 0 ifFalse:\n\t\t[str nextPutAll:', avg '; print: ((incrGCTime / incrGCs) roundTo: 1.0); nextPutAll: 'ms'].\n\tstr cr.\n\tstr\tnextPutAll: '\ttenures\t\t';\n\t\tnextPutAll: tenureCount asStringWithCommas.\n\ttenureCount = 0 ifFalse:\n\t\t[str nextPutAll: ' (avg '; print: (incrGCs / tenureCount) asInteger; nextPutAll: ' GCs/tenure)'].\n\tstr\tcr.\n\tstr\tnextPutAll: '\troot table\t';\n\t\tnextPutAll: rootOverflows asStringWithCommas; nextPutAll:' overflows'.\n\tstr cr.\n! !\n\n!MessageTally methodsFor: 'reporting' stamp: 'stp 05/08/1999 12:06'!\ntally\n\t\"Answer the receiver's number of tally.\"\n\n\t^tally! !\n\n!MessageTally methodsFor: 'reporting' stamp: 'stp 05/08/1999 11:47'!\ntime\n\t\"Answer the receiver's run time.\"\n\n\t^time! !\n\n!MessageTally methodsFor: 'private'!\nclass: aClass method: aMethod\n\n\tclass _ aClass.\n\tmethod _ aMethod.\n\ttally _ 0.\n\treceivers _ Array new: 0! !\n\n!MessageTally methodsFor: 'private'!\ncopyWithTally: hitCount\n\t^ (MessageTally new class: class method: method) bump: hitCount! !\n\n!MessageTally methodsFor: 'private'!\nmethod\n\n\t^method! !\n\n!MessageTally methodsFor: 'private'!\nprimitives: anInteger\n\n\ttally _ anInteger.\n\treceivers _ nil! !\n\n!MessageTally methodsFor: 'collecting leaves'!\nbump: hitCount\n\ttally _ tally + hitCount! !\n\n!MessageTally methodsFor: 'collecting leaves'!\nbump: hitCount fromSender: senderTally\n\t\"Add this hitCount to the total, and include a reference to the\n\tsender responsible for the increment\"\n\tself bump: hitCount.\n\tsenders == nil ifTrue: [senders _ OrderedCollection new].\n\tsenderTally == nil\n\t\tifFalse: [senders add: (senderTally copyWithTally: hitCount)]! !\n\n!MessageTally methodsFor: 'collecting leaves'!\ninto: leafDict fromSender: senderTally\n\t| leafNode |\n\tleafNode _ leafDict at: method\n\t\tifAbsent: [leafDict at: method\n\t\t\tput: (MessageTally new class: class method: method)].\n\tleafNode bump: tally fromSender: senderTally! !\n\n!MessageTally methodsFor: 'collecting leaves'!\nleavesInto: leafDict fromSender: senderTally\n\t| rcvrs |\n\trcvrs _ self sonsOver: 0.\n\trcvrs size = 0\n\t\tifTrue: [self into: leafDict fromSender: senderTally]\n\t\tifFalse: [rcvrs do:\n\t\t\t\t[:node |\n\t\t\t\tnode isPrimitives\n\t\t\t\t\tifTrue: [node leavesInto: leafDict fromSender: senderTally]\n\t\t\t\t\tifFalse: [node leavesInto: leafDict fromSender: self]]]! !\n\n!MessageTally methodsFor: 'tallying'!\nbumpBy: count\n\n\ttally _ tally + count! !\n\n!MessageTally methodsFor: 'tallying'!\ntally: context by: count\n\t\"Explicitly tally the specified context and its stack.\"\n\t| root |\n\tcontext method == method ifTrue: [^self bumpBy: count].\n\t(root _ context home sender) == nil\n\t\tifTrue: [^ (self bumpBy: count) tallyPath: context by: count].\n\t^ (self tally: root by: count) tallyPath: context by: count! !\n\n!MessageTally methodsFor: 'tallying'!\ntallyPath: context by: count\n\t| aMethod path |\n\taMethod _ context method.\n\treceivers do: \n\t\t[:aMessageTally | \n\t\taMessageTally method == aMethod ifTrue: [path _ aMessageTally]].\n\tpath == nil ifTrue: \n\t\t[path _ MessageTally new class: context receiver class method: aMethod.\n\t\treceivers _ receivers copyWith: path].\n\t^ path bumpBy: count! !\n\n!MessageTally class methodsFor: 'defaults' stamp: 'nk 3/8/2004 12:27'!\ndefaultMaxClassNameSize\n\t\"Return the default maximum width of the class name alone\"\n\t^30! !\n\n!MessageTally class methodsFor: 'defaults' stamp: 'nk 3/8/2004 12:27'!\ndefaultMaxClassPlusSelectorSize\n\t\"Return the default maximum width of the class plus selector together (not counting the '>>')\"\n\t^60! !\n\n!MessageTally class methodsFor: 'defaults' stamp: 'nk 3/8/2004 12:26'!\ndefaultMaxTabs\n\t\"Return the default number of tabs after which leading white space is compressed\"\n\t^18! !\n\n!MessageTally class methodsFor: 'defaults' stamp: 'nk 3/8/2004 12:41'!\ndefaultPollPeriod\n\t\"Answer the number of milliseconds between interrupts for spyOn: and friends.\n\tThis should be faster for faster machines.\"\n\t^DefaultPollPeriod ifNil: [ DefaultPollPeriod _ 1 ]! !\n\n!MessageTally class methodsFor: 'defaults' stamp: 'nk 3/8/2004 12:41'!\ndefaultPollPeriod: numberOfMilliseconds\n\t\"Set the default number of milliseconds between interrupts for spyOn: and friends.\n\tThis should be faster for faster machines.\"\n\tDefaultPollPeriod := numberOfMilliseconds! !\n\n!MessageTally class methodsFor: 'spying' stamp: 'nk 3/8/2004 10:34'!\nspyOn: aBlock    \"MessageTally spyOn: [100 timesRepeat: [3.14159 printString]]\"\n\t| node result |\n\tnode _ self new.\n\tresult _ node spyEvery: self defaultPollPeriod on: aBlock.\n\t(StringHolder new contents: (String streamContents: [:s | node report: s; close]))\n\t\topenLabel: 'Spy Results'.\n\t^ result! !\n\n!MessageTally class methodsFor: 'spying' stamp: 'nk 3/8/2004 10:34'!\nspyOn: aBlock toFileNamed: fileName \n\t\"Spy on the evaluation of aBlock. Write the data collected on a file\n\tnamed fileName.\"\n\n\t| file value node |\n\tnode _ self new.\n\tvalue _ node spyEvery: self defaultPollPeriod on: aBlock.\n\tfile _ FileStream newFileNamed: fileName.\n\tnode report: file; close.\n\tfile close.\n\t^value! !\n\n!MessageTally class methodsFor: 'spying' stamp: 'nk 3/8/2004 10:35'!\nspyOnProcess: aProcess forMilliseconds: msecDuration \n\t\"| p |  \n\tp _ [100000 timesRepeat: [3.14159 printString]] fork.  \n\t(Delay forMilliseconds: 100) wait.  \n\tMessageTally spyOnProcess: p forMilliseconds: 1000\"\n\t| node |\n\tnode _ self new.\n\tnode\n\t\tspyEvery: self defaultPollPeriod\n\t\tonProcess: aProcess\n\t\tforMilliseconds: msecDuration.\n\t(StringHolder new\n\t\tcontents: (String\n\t\t\t\tstreamContents: [:s | node report: s;\n\t\t\t\t\t\t close]))\n\t\topenLabel: 'Spy Results'! !\n\n!MessageTally class methodsFor: 'spying' stamp: 'nk 3/8/2004 10:35'!\nspyOnProcess: aProcess forMilliseconds: msecDuration toFileNamed: fileName \n\t\"Spy on the evaluation of aProcess. Write the data collected on a file  \n\tnamed fileName. Will overwrite fileName\"\n\t| file node |\n\tnode _ self new.\n\tnode\n\t\tspyEvery: self defaultPollPeriod\n\t\tonProcess: aProcess\n\t\tforMilliseconds: msecDuration.\n\tfile _ FileStream fileNamed: fileName.\n\tnode report: file;\n\t\t close.\n\tfile close! !\n\n!MessageTally class methodsFor: 'spying'!\ntallySends: aBlock   \"MessageTally tallySends: [3.14159 printString]\"\n\t^ self tallySendsTo: nil inBlock: aBlock showTree: true! !\n\n!MessageTally class methodsFor: 'spying' stamp: 'tk 5/4/1998 17:01'!\ntallySendsTo: receiver inBlock: aBlock showTree: treeOption\n\t\"MessageTally tallySends: [3.14159 printString]\"\n\t\"This method uses the simulator to count the number of calls on each method\n\tinvoked in evaluating aBlock. If receiver is not nil, then only sends\n\tto that receiver are tallied.\n\tResults are presented as leaves, sorted by frequency,\n\tpreceded, optionally, by the whole tree.\"\n\t| prev tallies startTime totalTime |\n\tstartTime _ Time millisecondClockValue.\n\ttallies _ MessageTally new class: aBlock receiver class\n\t\t\t\t\t\t\tmethod: aBlock method.\n\tprev _ aBlock.\n\tthisContext sender\n\t\trunSimulated: aBlock\n\t\tcontextAtEachStep:\n\t\t\t[:current |\n\t\t\tcurrent == prev ifFalse: \n\t\t\t\t[\"call or return\"\n\t\t\t\tprev sender == nil ifFalse: \n\t\t\t\t\t[\"call only\"\n\t\t\t\t\t(receiver == nil or: [current receiver == receiver])\n\t\t\t\t\t\tifTrue: [tallies tally: current by: 1]].\n\t\t\t\tprev _ current]].\n\n\ttotalTime _ Time millisecondClockValue - startTime // 1000.0 roundTo: 0.01.\n\t(StringHolder new contents:\n\t\t(String streamContents:\n\t\t\t[:s |\n\t\t\ts nextPutAll: 'This simulation took ' , totalTime printString\n\t\t\t\t\t\t\t, ' seconds.'; cr.\n\t\t\ttreeOption\n\t\t\t\tifTrue: [tallies fullPrintOn: s tallyExact: true orThreshold: 0]\n\t\t\t\tifFalse: [tallies leavesPrintOn: s tallyExact: true orThreshold: 0].\n\t\t\ttallies close]))\n\t\topenLabel: 'Spy Results'! !\n\n!MessageTally class methodsFor: 'spying'!\ntime: aBlock\n\n\t^ Time millisecondsToRun: aBlock! !\n\n!Metaclass methodsFor: '*transporter' stamp: 'ads 12/14/2010 10:27'!\nfileOutOn: aFileStream moveSource: moveSource toFile: fileIndex filteringCategoriesBy: catFilterBlock\n\t^self fileOutOn: aFileStream moveSource: moveSource toFile: fileIndex filteringCategoriesBy: catFilterBlock initializing: true! !\n\n!Metaclass methodsFor: '*transporter' stamp: 'ads 12/14/2010 10:30'!\nfileOutOn: aFileStream moveSource: moveSource toFile: fileIndex filteringCategoriesBy: catFilterBlock initializing: aBool\n\tsuper fileOutOn: aFileStream\n\t\tmoveSource: moveSource\n\t\ttoFile: fileIndex\n\t\tfilteringCategoriesBy: catFilterBlock.\n\t(aBool and:[moveSource not and: [self methodDict includesKey: #initialize]]) ifTrue: \n\t\t[aFileStream cr.\n\t\taFileStream cr.\n\t\taFileStream nextChunkPut: thisClass name , ' initialize'.\n\t\taFileStream cr]! !\n\n!MethodContext methodsFor: 'printing' stamp: 'ads 1/24/2011 13:02'!\nprintOn: aStream\n  | h |\n  aStream nextPutAll: (RVMPrimitivesNeededForBootstrapping printPrefixFor: self).\n  (self class methodDictionary includesKey: #outerContext) ifTrue: [\n    self outerContext\n      ifNil: [super printOn: aStream]\n      ifNotNil:\n        [\n          aStream nextPutAll: '[] in '.\n          self outerContext printOn: aStream]\n  ] ifFalse: [\n    self isExecutingBlock ifFalse: [^ super printOn: aStream].\n    h _ self blockHome.\n    h ifNil: [^ aStream nextPutAll: '[]'].\n    aStream nextPutAll: '[] from '.\n    h printOn: aStream\n  ]! !\n\n!MethodContext methodsFor: 'converting' stamp: 'ssa 9/7/2009 14:36'!\nasContext\n\n\t^self! !\n\n!MethodHolder methodsFor: 'menu' stamp: 'ssa 9/4/2008 15:23'!\ndoItReceiver\n\t\"If there is an instance associated with me, answer it, for true mapping of self.  If not, then do what other code-bearing tools do, viz. give access to the class vars.\"\n\n\n\t^ self selectedClass ifNil: [FakeClassPool new]! !\n\n!MethodReference methodsFor: '*packageinfo-base' stamp: 'ab 5/23/2003 22:58'!\ncategory\n\t^ self actualClass organization categoryOfElement: methodSymbol! !\n\n!MethodReference methodsFor: '*packageinfo-base' stamp: 'ab 5/23/2003 22:58'!\nsourceCode\n\t^ self actualClass sourceCodeAt: methodSymbol! !\n\n!MethodReference methodsFor: '*transporter' stamp: 'ads 12/7/2010 17:04'!\nchangeRecords\n\t\"changeRecordsAt: seems broken; doesn't handle class-side methods properly. -- Adam\n\t^ (self actualClass changeRecordsAt: self methodSymbol) ifNil: [{}]\"\n\t| cls aList |\n\tcls _ self actualClass.\n\taList _ VersionsBrowser new\n\t\t\tscanVersionsOf: (cls compiledMethodAt: self methodSymbol ifAbsent: [^ {}])\n\t\t\tclass: cls theNonMetaClass meta: cls isMeta\n\t\t\tcategory: (cls whichCategoryIncludesSelector: self methodSymbol)\n\t\t\tselector: self methodSymbol.\n\t^ (aList ifNotNil: [aList changeList]) ifNil: [{}]! !\n\n!MethodReference methodsFor: '*transporter' stamp: 'ads 12/1/2010 12:23'!\nremoveFromSystem\n\tself actualClass removeSelector: self methodSymbol.! !\n\n!MethodReference methodsFor: '*transporter' stamp: 'ads 2/2/2011 15:02'!\ntopLevelPackageName\n\t| category |\n\tcategory := (self category notNil and: [self category beginsWith: '*'])\n\t\t\t\t\t\tifTrue: [self category asString allButFirst capitalized]\n\t\t\t\t\t\tifFalse: [self actualClass theNonMetaClass category asString].\n\t^ category copyUpTo: $-! !\n\n!Model methodsFor: '*RVM-Archiving'!\narchiveOn: aStream\n\t\"To be consistent with Object, don't file out the dependents (subclasses may wish to override or put back the dependencies back in some other manner -- see Figure>dearchiveFrom:).\"\n\n\t| oldDependents |\n\toldDependents _ dependents.\n\tdependents _ nil.\n\tsuper archiveOn: aStream.\n\tdependents _ oldDependents.! !\n\n!Mutex methodsFor: 'mutual exclusion' stamp: 'dmu 6/14/2010 16:16'!\ncritical: aBlock\n\t\"Evaluate aBlock protected by the receiver.\"\n\t| activeProcess |\n\tactiveProcess := Processor thisProcess.\n\tactiveProcess == owner ifTrue:[^aBlock value].\n\t^semaphore critical:[\n\t\towner := activeProcess.\n\t\taBlock ensure:[owner := nil]].! !\n\n!Mutex methodsFor: 'initialize' stamp: 'das 11/3/2005 22:53'!\ninitialize\n\tsemaphore := Semaphore forMutualExclusion.! !\n\n!Mutex class methodsFor: 'as yet unclassified' stamp: 'dmu 11/13/2010 16:19'!\nforMutualExclusion ^ self new! !\n\n!NPBIS methodsFor: 'as yet unclassified' stamp: 'sm 6/1/2011 15:57'!\ndo: aStep\n\tself critical: [\n\t\trankThreads do: [ :thread |\n\t\t\tthread startStep: aStep.].\n\t\n\t\trankThreads do: [ :ignored | \n\t\t\tself wait.\n\t\t]\n\t].! !\n\n!NPBIS methodsFor: 'as yet unclassified' stamp: 'sm 6/1/2011 14:22'!\nfullVerify\n\t\" To save copy and memory sorting can be done directly: \"\n\t| key idx count |\n\tkey := 1. idx := 1.\n\t\n\t1 to: numKeys do: [ :i | \n\t\t[ (idx == (masterHist at: key))\n\t\t   and: [ ((key >= maxKey)\tor: [ idx >= numKeys ]) not ] ] whileTrue: [\n\t\t\tkey := key + 1 \n\t\t].\n\t\tkeyArray at: idx put: key.\n\t\tidx := idx + 1.\n\t].\n\n\t\" Confirm keys correctly sorted: count incorrectly sorted keys, if any \"\n\tcount := 0.\n\t\n\t2 to: numKeys do: [ :i | \n\t\t((keyArray at: (i - 1)) > (keyArray at: i)) ifTrue: [ count := count + 1]].\n\n\t(count ~= 0)\n\t\tifTrue: [ Error signal: 'Full_verify: number of keys out of sort: '. count asString ]\n\t\tifFalse: [ PassedVerification := PassedVerification + 1].\n    \n    ^ PassedVerification! !\n\n!NPBIS methodsFor: 'as yet unclassified' stamp: 'StefanMarr 10/16/2009 00:23'!\ninitKeys: aDouble\n\t| x k |\n\tk := maxKey / 4.\n\t\n\t1 to: numKeys do: [ :i |\n\t\t(i == 32769) ifTrue: [ Transcript show: 'Seed at: ', (rng seed asString);cr.].\n\t\tx := rng randlc: aDouble. \n\t\tx := x + (rng randlc: aDouble).\n\t\tx := x + (rng randlc: aDouble).\n\t\tx := x + (rng randlc: aDouble).\n\t\t\n\t\tkeyArray at: i put: (x * k) asInteger.\n\t\t].! !\n\n!NPBIS methodsFor: 'as yet unclassified' stamp: 'sm 6/1/2011 14:23'!\npartialVerify: iteration\n\t| k offset |\n\n\t1 to: NPBISBase testArraySize do: [ :i |\n\t\tk := partialVerifyVals at: i.\n\t\toffset := iteration.\n\t\t( (0 <= k) and: [k <= (numKeys - 1)]) ifTrue: [\n\t\t\t(benchmarkClass == #S) ifTrue: [\n\t\t\t\t\t((i - 1) <= 2) ifTrue: [ offset := iteration. ]\n\t\t\t\t\t\t    ifFalse: [ offset := 0 - iteration.].\n\t\t\t\t].\n\t\t\t\n\t\t\t((masterHist at: k) ~= ((testRankArray at: i) + offset))\n\t\t\t\tifTrue: [\n\t\t\t\t\tError signal: 'Failed partial verification: iteration ', iteration asString, ', test key ', i asString ]\n\t\t\t\tifFalse: [\n\t\t\t\t\tNPBISBase passedVerification: (NPBISBase passedVerification + 1). ]\n\t\t\t]\n\t\t]! !\n\n!NPBIS methodsFor: 'as yet unclassified' stamp: 'StefanMarr 4/15/2011 17:18'!\nrank: iteration\n\tkeyArray at: (iteration + 1) put: iteration.\n\tkeyArray at: (1 + iteration + (NPBISBase maxIterations)) put: (maxKey - iteration).\n\t\n\t1 to: NPBISBase testArraySize do: [\n\t\t:i | partialVerifyVals at: i put: (keyArray at: (1 + (testIndexArray at: i)) ) ].\n\t\n\t\" Clear the work array \"\n\t1 to: maxKey do: [ :i | masterHist at: i put: 0 ].\n\t\n\t\" In the section, the keys themselves are used as their\n\t  own indexes to determine how many of each there are: their\n\t  individual population \"\n\t1 to: numKeys do: [ :i | masterHist at: (1 + (keyArray at: i)) incrementBy: 1 ].\n\t\" Now they have individual key population \"\n\t\n\t\" Density to Distribution conversion \"\n\t1 to: (maxKey - 1) do: [ :i | masterHist at: (i + 1) incrementBy: (masterHist at: i). ].\n\t\n\tself partialVerify: iteration.! !\n\n!NPBIS methodsFor: 'as yet unclassified' stamp: 'StefanMarr 9/21/2009 23:31'!\nresetMasterHist\n\t1 to: maxKey do: [ :i | masterHist at: i put: 0 ].! !\n\n!NPBIS methodsFor: 'as yet unclassified' stamp: 'sm 6/1/2011 14:24'!\nrun\n\t| mainTimer tPhase1 tPhase2 tKeyInit tVerify executionVerified |\n\n\tScriptConsole println: ' Size: ', totalKeys asString, ' Iterations: ', NPBISBase maxIterations asString.\n\t\n\tmainTimer := runner createTimer: 'precise-total'.\n\ttPhase1 := runner createTimer: 'phase1'.\n\ttPhase2 := runner createTimer: 'phase2'.\n\ttKeyInit := runner createTimer: 'keyInit'.\n\ttVerify := runner createTimer: 'verifyCompletely'.\n\t\n\tNPBISBase passedVerification: 0.\n\t\n\tserial\n\t\tifTrue: [\n\t\t\ttKeyInit start.\n\t\t\tself initKeys: NPBIS amult.\n\t\t\ttKeyInit stop. \n\t\t\t\n\t\t\tself rank: 1. ]\n\t\tifFalse: [\n\t\t\tself setupThreads.\n\t\t\t\n\t\t\ttKeyInit start.\n\t\t\tself do: #initKeys.\n\t\t\ttKeyInit stop.\n\t\t\t\n\t\t\tRankThread iteration: 1.\n\t\t\tself do: #step1.\n\t\t\t\n\t\t\tself resetMasterHist.\n\t\t\t\n\t\t\tself do: #step2.\n\t\t\tself partialVerify: 1].\n\t\t\n\tNPBISBase passedVerification: 0.\n\t\t\n\tmainTimer start.\n\t\t\n\t1 to: NPBIS maxIterations do: [:i | \n\t\tserial\n\t\t\tifTrue: [ self rank: i. ]\n\t\t\tifFalse: [ \n\t\t\t\tRankThread iteration: i.\n\t\t\t\ttPhase1 start.\n\t\t\t\tself do: #step1.\n\t\t\t\ttPhase1 stop.\n\t\t\t\t\n\t\t\t\tself resetMasterHist.\n\t\t\t\t\n\t\t\t\ttPhase2 start.\n\t\t\t\tself do: #step2.\n\t\t\t\ttPhase2 stop.\n\t\t\t\t\n\t\t\t\tself partialVerify: i]\n\t\t].\n\t\n\tmainTimer stop.\n\t\n\ttVerify start.\n\tself fullVerify.\n\ttVerify stop.\n\t\n\texecutionVerified := ((NPBISBase passedVerification) == ((5 * NPBIS maxIterations) + 1)).\n\texecutionVerified\n\t\tifFalse: [ Error signal: 'Benchmark verification failed'].\n\t\t\n\tserial ifFalse: [ self do: #quit. ].\n\t^ executionVerified! !\n\n!NPBIS methodsFor: 'license' stamp: 'StefanMarr 4/15/2011 17:04'!\nlicense\n\t^'This code is based on the Java version of NPB3.\n\nPermission to use, copy, distribute and modify this software for any purpose\nwith or without fee is hereby granted. We request, however, that all derived\nwork reference the NAS Parallel Benchmarks 3.0. This software is provided \"as\nis\" without express or implied warranty.\n\nInformation on NPB 3.0, including the Technical Report NAS-02-008\n\"Implementation of the NAS Parallel Benchmarks in Java\", original\nspecifications, source code, results and information on how to submit new\nresults, is available at:\n\n   http://www.nas.nasa.gov/Software/NPB/'! !\n\n!NPBIS methodsFor: 'accessors' stamp: 'StefanMarr 9/23/2009 19:14'!\nkeyArray\n\t^keyArray ! !\n\n!NPBIS methodsFor: 'accessors' stamp: 'StefanMarr 9/23/2009 19:15'!\nmasterHist\n\t^masterHist ! !\n\n!NPBIS methodsFor: 'accessors' stamp: 'StefanMarr 9/21/2009 23:00'!\nrng: val\n\trng := val! !\n\n!NPBIS methodsFor: 'accessors' stamp: 'StefanMarr 5/14/2011 01:00'!\nrunner: aRunner\n\trunner := aRunner\n\t! !\n\n!NPBIS methodsFor: 'accessors' stamp: 'StefanMarr 9/21/2009 22:59'!\nserial: val\n\tserial := val! !\n\n!NPBIS commentStamp: 'StefanMarr 5/14/2011 01:04' prior: 0!\nNPBIS definines the general benchmark Integer Sort benchmark of the NAS Parallel Benchmarks.\n\nSee NPBSuite>>benchIS for the actual benchmark implemented based on SMark.\n\nInstance Variables:\n\tbid\t<ProtoObject | PseudoContext>\n\tresults\t<ProtoObject | PseudoContext>\n\tserial\t<Boolean>\n\trng\t<NPBRandom>\n\trunner\t<SMarkRunner>!\n!NPBIS class methodsFor: 'constants' stamp: 'StefanMarr 9/21/2009 18:15'!\namult\n\t^1220703125.0! !\n\n!NPBIS class methodsFor: 'constants' stamp: 'StefanMarr 5/14/2011 10:39'!\ndefaultProblemSize\n\t^ #S! !\n\n!NPBIS class methodsFor: 'instance creation' stamp: 'StefanMarr 9/23/2009 19:12'!\nnewOfSizeClass: aSymbol with: nThreads serial: aBool\n\t| o |\n\to := super new.\n\t\n\to initializeWithSizeClass: aSymbol andNumberOfThreads: nThreads.\n\t\n\to serial: aBool.\n\to rng: NPBRandom new.\n\t^o\n\t\n\t\n! !\n\n!NPBISBase methodsFor: 'as yet unclassified' stamp: 'StefanMarr 11/7/2010 12:31'!\nchecksum: intArray name: aString stop: aBool\n\t| check |\n\t\n\tcheck := intArray sum.\n\t1 halt.\n\t\"RVMOperations print: name, ' checksum is ', check asString.\"\n\t\n\taBool ifTrue: [\n\t\t1 halt.\n\t\tself StopSystemHere]! !\n\n!NPBISBase methodsFor: 'accessors' stamp: 'StefanMarr 4/15/2011 17:19'!\ninitializeValues\n\t\"initialize the object after construction\"\n\ttotalKeys := 1 << self totalKeysLog2.\n\tmaxKey := 1 << maxKeyLog2.\n\tnumKeys := totalKeys.\n\tsizeOfBuffers := totalKeys.\n\tkeyArray := Array new: sizeOfBuffers.\n\tmasterHist := Array new: maxKey. \n\tpartialVerifyVals := Array new: NPBISBase testArraySize.\n\tmasterHist doWithIndex: \n\t\t[ :val :i | \n\t\tmasterHist \n\t\t\tat: i\n\t\t\tput: 0 ]! !\n\n!NPBISBase methodsFor: 'accessors' stamp: 'StefanMarr 9/21/2009 16:36'!\nmaster\n\t^ master! !\n\n!NPBISBase methodsFor: 'accessors' stamp: 'StefanMarr 9/21/2009 16:37'!\nmaster: val\n\tmaster := val! !\n\n!NPBISBase methodsFor: 'accessors' stamp: 'StefanMarr 9/17/2009 08:30'!\nmaxKey\n\t^ maxKey! !\n\n!NPBISBase methodsFor: 'accessors' stamp: 'StefanMarr 9/17/2009 08:30'!\nmaxKey: val\n\tmaxKey := val! !\n\n!NPBISBase methodsFor: 'accessors' stamp: 'StefanMarr 9/17/2009 08:28'!\nmaxKeyLog2\n\t^ maxKeyLog2 ! !\n\n!NPBISBase methodsFor: 'accessors' stamp: 'StefanMarr 9/17/2009 08:28'!\nmaxKeyLog2: val\n\tmaxKeyLog2 := val! !\n\n!NPBISBase methodsFor: 'accessors' stamp: 'StefanMarr 9/21/2009 15:21'!\nnumBuckets \n\t^ numBuckets! !\n\n!NPBISBase methodsFor: 'accessors' stamp: 'StefanMarr 9/21/2009 15:21'!\nnumBuckets: val\n\tnumBuckets := val! !\n\n!NPBISBase methodsFor: 'accessors' stamp: 'StefanMarr 9/17/2009 08:29'!\nnumBucketsLog2 \n\t^ numBucketsLog2 ! !\n\n!NPBISBase methodsFor: 'accessors' stamp: 'StefanMarr 9/17/2009 08:29'!\nnumBucketsLog2: val\n\tnumBucketsLog2 := val! !\n\n!NPBISBase methodsFor: 'accessors' stamp: 'StefanMarr 9/21/2009 15:21'!\nnumKeys\n\t^ numKeys! !\n\n!NPBISBase methodsFor: 'accessors' stamp: 'StefanMarr 9/21/2009 15:36'!\nnumKeys: val\n\tnumKeys := val! !\n\n!NPBISBase methodsFor: 'accessors' stamp: 'StefanMarr 9/21/2009 16:02'!\nnumThreads\n\t^ numThreads! !\n\n!NPBISBase methodsFor: 'accessors' stamp: 'StefanMarr 9/21/2009 16:02'!\nnumThreads: val\n\tnumThreads := val! !\n\n!NPBISBase methodsFor: 'accessors' stamp: 'StefanMarr 9/23/2009 19:32'!\npartialVerifyVals\n\t^partialVerifyVals ! !\n\n!NPBISBase methodsFor: 'accessors' stamp: 'StefanMarr 9/21/2009 16:37'!\nrankThreads\n\t^rankThreads ! !\n\n!NPBISBase methodsFor: 'accessors' stamp: 'StefanMarr 9/21/2009 16:37'!\nrankThreads: val\n\trankThreads := val! !\n\n!NPBISBase methodsFor: 'accessors' stamp: 'StefanMarr 9/21/2009 15:22'!\nsizeOfBuffers\n\t^ sizeOfBuffers! !\n\n!NPBISBase methodsFor: 'accessors' stamp: 'StefanMarr 9/21/2009 15:22'!\nsizeOfBuffers: val\n\tsizeOfBuffers := val! !\n\n!NPBISBase methodsFor: 'accessors' stamp: 'SM 9/16/2009 22:50'!\ntestIndexArray\n\t^ testIndexArray! !\n\n!NPBISBase methodsFor: 'accessors' stamp: 'StefanMarr 1/16/2011 20:47'!\ntestIndexArray: val\n\ttestIndexArray := val! !\n\n!NPBISBase methodsFor: 'accessors' stamp: 'SM 9/16/2009 22:51'!\ntestRankArray\n\t^ testRankArray! !\n\n!NPBISBase methodsFor: 'accessors' stamp: 'StefanMarr 1/16/2011 20:46'!\ntestRankArray: val\n\ttestRankArray := val! !\n\n!NPBISBase methodsFor: 'accessors' stamp: 'StefanMarr 9/17/2009 08:30'!\ntotalKeys\n\t^ totalKeys! !\n\n!NPBISBase methodsFor: 'accessors' stamp: 'StefanMarr 9/21/2009 15:38'!\ntotalKeys: val\n\ttotalKeys := val! !\n\n!NPBISBase methodsFor: 'accessors' stamp: 'SM 9/16/2009 22:54'!\ntotalKeysLog2\n\t^totalKeysLog2! !\n\n!NPBISBase methodsFor: 'accessors' stamp: 'StefanMarr 1/16/2011 20:46'!\ntotalKeysLog2: val\n\ttotalKeysLog2 := val! !\n\n!NPBISBase methodsFor: 'license' stamp: 'StefanMarr 4/15/2011 17:04'!\nlicense\n\t^'This code is based on the Java version of NPB3.\n\nPermission to use, copy, distribute and modify this software for any purpose\nwith or without fee is hereby granted. We request, however, that all derived\nwork reference the NAS Parallel Benchmarks 3.0. This software is provided \"as\nis\" without express or implied warranty.\n\nInformation on NPB 3.0, including the Technical Report NAS-02-008\n\"Implementation of the NAS Parallel Benchmarks in Java\", original\nspecifications, source code, results and information on how to submit new\nresults, is available at:\n\n   http://www.nas.nasa.gov/Software/NPB/'! !\n\n!NPBISBase methodsFor: 'initialization' stamp: 'StefanMarr 10/5/2009 18:14'!\ninitialize\n\tmtxCritical := Semaphore forMutualExclusion.\n\tmtxNotify := Semaphore new.! !\n\n!NPBISBase methodsFor: 'initialization' stamp: 'StefanMarr 5/14/2011 10:44'!\ninitializeWithSizeClass: aSymbol andNumberOfThreads: numberOfThreads \n\t| consts |\n\tbenchmarkClass := aSymbol asSymbol.\n\t\t\n\tconsts := NPBISBase perform: benchmarkClass.\n\tconsts keysAndValuesDo: \n\t\t[ :key :val | \n\t\tself\n\t\t\tperform: (key , ':') asSymbol\n\t\t\twith: val ].\n\tnumThreads := numberOfThreads.\n\t\n\tself initializeValues.\n\t^ self! !\n\n!NPBISBase methodsFor: 'initialization' stamp: 'sm 6/1/2011 15:52'!\nsetupThreads\n\t\"Initialize the threads/processes for the benchmark\"\n\t\n\t| start end remainder offset rStart rEnd rRemainder rOffset rThread |\n\t\n\tstart := 0. end := 0. remainder := totalKeys \\\\ numThreads. offset := 0.\n\trStart := 0. rEnd := 0. rRemainder := maxKey \\\\ numThreads. rOffset := 0.\n\t\n\trankThreads := Array new: numThreads.\n\t\n\t1 to: numThreads do: [ :i |\n\t\t| zeroIdx |\n\t\tzeroIdx := i - 1.\n\t\tstart := (zeroIdx * ((totalKeys / numThreads) asInteger)) + offset.\n\t\tend :=  ((zeroIdx * ((totalKeys / numThreads) asInteger))) + ((totalKeys / numThreads) asInteger) - 1 + offset.\n\t\t(remainder > 0) ifTrue: [\n\t\t\tremainder := remainder - 1.\n\t\t\toffset := offset + 1.\n\t\t\tend := end + 1].\n\t\t\n\t\trStart := (zeroIdx * ((maxKey / numThreads) asInteger)) + rOffset.\n\t\trEnd := ((zeroIdx * ((maxKey / numThreads) asInteger))) + ((maxKey / numThreads) asInteger) -1 + rOffset.\n\t\t\n\t\t(rRemainder > 0) ifTrue: [\n\t\t\trRemainder := rRemainder - 1.\n\t\t\trOffset := rOffset + 1.\n\t\t\trEnd := rEnd + 1].\n\t\t\n\t\trThread := RankThread newFor: self with: i start: (start + 1) end: (end + 1) rStart: (rStart + 1) rEnd: (rEnd + 1).\n\t\trankThreads at: i put: rThread.\n\t\trThread rankThreads: rankThreads.\n\t\trThread start.\n\t].! !\n\n!NPBISBase methodsFor: 'synchronization' stamp: 'StefanMarr 10/5/2009 18:13'!\ncritical: aBlock\n\tmtxCritical critical: aBlock! !\n\n!NPBISBase methodsFor: 'synchronization' stamp: 'StefanMarr 10/5/2009 18:13'!\nnotify\n\tmtxNotify signal ! !\n\n!NPBISBase methodsFor: 'synchronization' stamp: 'StefanMarr 10/5/2009 18:12'!\nwait\n\tmtxNotify wait ! !\n\n!NPBISBase commentStamp: 'StefanMarr 5/14/2011 01:03' prior: 0!\nNPBISBase definines the commonalities for the general benchmark and its actual worker-threads.\n\nSee NPBSuite>>benchIS for the actual benchmark implemented based on SMark.\n\nInstance Variables:\n\ttestIndexArray\t<Object>\n\ttestRankArray\t<Object>\n\tmasterHist\t<(SequenceableCollection of: Object)>\n\tkeyArray\t<(Array of: (CharacterBlock | Magnitude | Point | String | UUID))>\n\tpartialVerifyVals\t<Array>\n\tsizeClass\t<ProtoObject | PseudoContext>\n\ttotalKeys\t<Collection | Duration | Number | Point>\n\tmaxKey\t<Collection | Duration | Number | Point>\n\tnumBuckets\t<ProtoObject | PseudoContext>\n\tnumKeys\t<Collection | Color | DateAndTime | Duration | Number | OBMetaNode | Point | Timespan | TraitComposition | TraitDescription | TraitTransformation>\n\tsizeOfBuffers\t<ProtoObject | PseudoContext>\n\ttimerOn\t<ProtoObject | PseudoContext>\n\ttimer\t<ProtoObject | PseudoContext>\n\ttotalKeysLog2\t<ProtoObject | PseudoContext>\n\tmaxKeyLog2\t<ProtoObject | PseudoContext>\n\tnumBucketsLog2\t<ProtoObject | PseudoContext>\n\tnumThreads\t<ProtoObject | PseudoContext>\n\trankThreads\t<(SequenceableCollection of: RankThread)>\n\tmaster\t<NPBISBase>\n\tbenchmarkClass\t<ProtoObject>\n\tmtxNotify\t<Semaphore>\n\tmtxCritical\t<Semaphore>!\n!NPBISBase class methodsFor: 'constants' stamp: 'SM 9/16/2009 22:28'!\nS\n\t^ Dictionary newFrom: {\n\t\t#testIndexArray -> { 48427. 17148. 23627. 62548. 4431 }.\n\t\t#testRankArray -> { 0. 18. 346. 64917. 65463 }.\n\t\t#totalKeysLog2 -> 16.\n\t\t#maxKeyLog2 -> 11.\n\t\t#numBucketsLog2 -> 9\n\t }! !\n\n!NPBISBase class methodsFor: 'constants' stamp: 'SM 9/16/2009 22:16'!\nmaxIterations\n\t^ 10! !\n\n!NPBISBase class methodsFor: 'constants' stamp: 'StefanMarr 1/16/2011 21:40'!\npassedVerification\n\t^PassedVerification! !\n\n!NPBISBase class methodsFor: 'constants' stamp: 'StefanMarr 1/16/2011 21:41'!\npassedVerification: val\n\tPassedVerification := val! !\n\n!NPBISBase class methodsFor: 'constants' stamp: 'SM 9/16/2009 22:17'!\ntestArraySize\n\t^ 5! !\n\n!NPBISBase class methodsFor: 'instance creation' stamp: 'StefanMarr 9/21/2009 18:28'!\nnewOfSizeClass: aSymbol with: numberOfThreads \n\t| o |\n\to := super new.\n\to initializeWithSizeClass: aSymbol andNumberOfThreads: numberOfThreads.\n\t^o! !\n\n!NPBRandom methodsFor: 'as yet unclassified'!\nfindSeedFor: aRank with: numOfThreads of: totalRanNumbers using: seed and: aGenMult\n\t| i t1 t2 an \n\t mq nq kk ik continueLoop |\n\n\tnq := (totalRanNumbers / numOfThreads) asInteger.\n\tmq := 0.\n\n\t[nq > 1] whileTrue: [\n\t\tmq := mq + 1.\n\t\tnq := nq / 2.\n\t].\n\n\tt1 := aGenMult.\n\t\n\t1 to: mq do: [ :ii |\n\t\ttran := t1.\n\t\tt2 := self randlc: t1.\n\t\tt1 := tran.\n\t].\n\n\tan := t1.\n\t\n\tkk := aRank.\n\tt1 := seed.\n\tt2 := an.\n\n\ti := 1.\n\t\n\tcontinueLoop := true.\n\t[(i <= 100) and: continueLoop] whileTrue: [\n\t\tik := (kk / 2) asInteger.\n\t\t\n\t\t((2 * ik) ~= kk) ifTrue: [\n\t\t\ttran := t1.\n\t\t\tself randlc: t2.\n\t\t\tt1 := tran.].\n\t\t\n\t\t(ik == 0) ifTrue: [ continueLoop := false. ]\n\t\tifFalse: [\n\t\t\ttran := t2.\n\t\t\tself randlc: t2.\n\t\t\tt2 := tran.\n\t\t\tkk := ik.\n\t\t\ti := i + 1.\n\t\t\t].\n\t].\n   \n\t^ t1.! !\n\n!NPBRandom methodsFor: 'as yet unclassified'!\nrandlc: aDouble\n\t| t1 t2 t3 t4 a1 a2 x1 x2 z |\n\t\" Break A into two parts such that A = 2**23 * A1 + A2. \"\n\n\tt1 := r23 * aDouble.\n\ta1 := t1 asInteger.\n\ta2 := aDouble - (t23 * a1).\n\t\n\t\" Break X into two parts such that X = 2^23 * X1 + X2, compute\n\t  Z = A1 * X2 + A2 * X1  (mod 2^23), and then\n\t  X = 2^23 * Z + A2 * X2  (mod 2^46). \"\n\n\tt1 := r23 * tran.\n\tx1 := t1 asInteger.\n\tx2 := tran - (t23 * x1).\n\tt1 := (a1 * x2) + (a2 * x1).\n\tt2 := (r23 * t1) asInteger.\n\tz := t1 - (t23 * t2).\n\tt3 := (t23 * z) + (a2 * x2).\n\tt4 := (r46 * t3) asInteger.\n\ttran := t3 - (t46 * t4).\n\t^ r46 * tran! !\n\n!NPBRandom methodsFor: 'initialization'!\ninitialize\n\ttran := NPBRandom seed.\n\tamult := NPBIS amult.\n\tKS := 0.\n\tr23 := 0.5 raisedTo: 23.\n\tr46 := r23 raisedTo: 2.\n\tt23 := 2 raisedTo: 23.\n\tt46 := t23 raisedTo: 2.! !\n\n!NPBRandom methodsFor: 'license' stamp: 'StefanMarr 4/15/2011 17:04'!\nlicense\n\t^'This code is based on the Java version of NPB3.\n\nPermission to use, copy, distribute and modify this software for any purpose\nwith or without fee is hereby granted. We request, however, that all derived\nwork reference the NAS Parallel Benchmarks 3.0. This software is provided \"as\nis\" without express or implied warranty.\n\nInformation on NPB 3.0, including the Technical Report NAS-02-008\n\"Implementation of the NAS Parallel Benchmarks in Java\", original\nspecifications, source code, results and information on how to submit new\nresults, is available at:\n\n   http://www.nas.nasa.gov/Software/NPB/'! !\n\n!NPBRandom methodsFor: 'accessing'!\nseed\n\t^ tran! !\n\n!NPBRandom methodsFor: 'private - accessing'!\nseed: aSeed\n\ttran := aSeed! !\n\n!NPBRandom class methodsFor: 'as yet unclassified'!\nd2m46\n\t^ 0.5 raisedTo: 46! !\n\n!NPBRandom class methodsFor: 'as yet unclassified'!\ni246m1\n\t^ (2 raisedTo: 46) - 1! !\n\n!NPBRandom class methodsFor: 'as yet unclassified'!\nseed\n\t^314159265.0! !\n\n!NPBSuite methodsFor: 'benchmarking' stamp: 'StefanMarr 5/14/2011 01:00'!\nbenchIS\n\t\"Run the IS benchmark\"\n\tbench run.! !\n\n!NPBSuite methodsFor: 'benchmarking' stamp: 'StefanMarr 5/14/2011 10:43'!\nsetUpBenchIS\n\t\"Prepare IS benchmark\"\n\t| sizeClass threadCnt |\n\t\n\tsizeClass := runner problemSize.\n\tsizeClass ifNil:\t[ sizeClass := NPBIS defaultProblemSize. ].\n\t\n\tthreadCnt := runner processes.\n\t\n\tbench := NPBIS newOfSizeClass: sizeClass with: threadCnt serial: (threadCnt == 0).\n\tbench runner: runner.! !\n\n!NPBTest methodsFor: 'tests'!\ntestIS\n\t| verified runner suite |\n\trunner := SMarkRunner new.\n\tsuite  := NPBSuite new.\n\tsuite runner: runner.\n\trunner suite: suite.\n\trunner iterations: 1.\n\trunner processes: 4.\n\trunner problemSize: #S.\n\t\n\tself shouldnt: [\trunner execute. \n\t\t\t\t\"TODO: update as soon as the SMark framework supports verification\"\n\t\t\t\tverified := false. ]\n\t\t raise: Error.\n\tself assert: verified.! !\n\n!NPBTest methodsFor: 'tests'!\ntestKeyArrayContent\n\t| o keyArray |\n\to := NPBIS newOfSizeClass: #S with: 0 serial: true.\n\to initKeys: NPBIS amult.\n\t\n\tkeyArray := o keyArray.\n\t\n\tself assert: (keyArray at: 65536) equals: 962.\n\tself assert:\t(keyArray at: 65535) equals: 677.\n\tself assert: (keyArray at: 30001) equals: 557.\n\tself assert: (keyArray at: 1) equals: 1585.\n\tself assert: (keyArray at: 2) equals: 825.\n\tself assert: (keyArray at: 12) equals: 1140.\n! !\n\n!NPBTest methodsFor: 'running' stamp: 'StefanMarr 5/22/2011 10:23'!\nsetUp\n\t\"Necessary for Squeak 4.2 compatibility, since method anotations are not supported in the base image.\"\n\t(self respondsTo:  #timeout:) ifTrue: [\n\t\tself timeout: 300.\n\t].! !\n\n!Number methodsFor: 'arithmetic' stamp: 'ssa 11/27/2009 16:14'!\ninverted\n\n\t^1/self! !\n\n!Number methodsFor: 'mathematical functions' stamp: 'ssa 8/27/2009 14:58'!\npi\n\n\t^Float pi * self! !\n\n!Number methodsFor: 'truncation and round off' stamp: 'ssa 8/30/2009 04:04'!\natRandom\n\t^self asFloat * (Collection atRandom: self class randomForPicking copy)! !\n\n!Number methodsFor: 'converting' stamp: 'ssa 11/15/2008 08:57'!\nasPointWithinRectangleWithExtent: extent\n\t\"Answer a point showing what coordinate I would have if wrapped into a rectangle of this extent.\n\tClip out of bounds answer to 0@0 if undershot or extent if overShot.  Only really useful for integers\"\n\t| x y newX newY |\n\tx _ extent x.\n\ty _ extent y.\n\tself > (x*y) ifTrue:[^extent].\n\tself < 1 ifTrue:[^0@0].\n\tnewX _ self \\\\ x = 0 ifTrue:[x]ifFalse:[self \\\\ x].\n\tnewY _ self - 1 // x + 1.\n\t\n\t^newX@newY\n\n\t\"{0 asPointWithinRectangleWithExtent:2@2.\n\t1 asPointWithinRectangleWithExtent:2@2.\n\t2 asPointWithinRectangleWithExtent:2@2.\n\t3 asPointWithinRectangleWithExtent:2@2.\n\t4 asPointWithinRectangleWithExtent:2@2.\n\t5 asPointWithinRectangleWithExtent:2@2.}     #(0@0 1@1 2@1 1@2 2@2 2@2)\"\n\t\n\t\"{0 asPointWithinRectangleWithExtent:3@3.\n\t1 asPointWithinRectangleWithExtent:3@3.\n\t2 asPointWithinRectangleWithExtent:3@3.\n\t3 asPointWithinRectangleWithExtent:3@3.\n\t4 asPointWithinRectangleWithExtent:3@3.\n\t5 asPointWithinRectangleWithExtent:3@3.\n\t6 asPointWithinRectangleWithExtent:3@3.\n\t7 asPointWithinRectangleWithExtent:3@3.\n\t8 asPointWithinRectangleWithExtent:3@3.\n\t9 asPointWithinRectangleWithExtent:3@3.\n\t10 asPointWithinRectangleWithExtent:3@3.}   #(0@0 1@1 2@1 3@1 1@2 2@2 3@2 1@3 2@3 3@3 3@3)\"! !\n\n!Number methodsFor: 'converting'!\ntheta: angle\n\t\"Answer a new Point whose r value is the receiver and whose theta value is the argument.\"\n\t\"KSC Extension\"\n\n\t^(angle cos * self) @ (angle sin * self)! !\n\n!Number methodsFor: 'intervals' stamp: 'ssa 9/7/2009 21:42'!\nzeno\n\t\"100 zeno\"\n\t\"-100 zeno\"\n\t\"Answer a collection of numbers representing Zeno's paradox steps between myself and zero\"\n\t| steps distanceRemaining |\n\tsteps _ OrderedCollection new.\n\tdistanceRemaining _ self abs.\n\t[distanceRemaining > 1] whileTrue:[steps add: distanceRemaining * self sign.\n\t\tdistanceRemaining _ distanceRemaining / 2.0].\n\t^steps asArray! !\n\n!Number methodsFor: 'printing' stamp: 'ssa 1/1/1970 00:39'!\nfloatPrecisionForDecimalPlaces: places\n\t\"Answer the floatPrecision that corresponds to the given number of decimal places\"\n\n\t^ #(1 0.1 0.01 0.001 0.0001 0.00001 0.000001 0.0000001 0.00000001 0.000000001) at: (places + 1)\n\n\"\n(0 to: 6) collect: [:i | Number floatPrecisionForDecimalPlaces: i]\n\"! !\n\n!Number methodsFor: 'printing' stamp: 'ssa 1/1/1970 00:48'!\nprintShowingDecimalPlaces: placesDesired\n\t\"Print the receiver showing precisely the given number of places desired .  If the placesDesired provided is positive, a decimal point and that many digits after the decimal point will always be shown.  If the placesDesired is zero, a whole number will be shown, without a decimal point.  This method could probably be greatly optimized -- improvements welcomed.\"\n\n\t| aString |\n\tplacesDesired <= 0 ifTrue: [^ self rounded printString].\n\n\taString _ ((self asFloat roundTo: (self floatPrecisionForDecimalPlaces: placesDesired)) asString), ((String new: placesDesired) atAllPut: $0).\n\t^ aString copyFrom: 1 to: ((aString indexOf: $.) + placesDesired)\n\n\"\n0.23 printShowingDecimalPlaces: 2\n23.5698 printShowingDecimalPlaces: 2\n-234.567 printShowingDecimalPlaces: 5\n23.4567 printShowingDecimalPlaces: 0\n\"! !\n\n!Number methodsFor: 'printing' stamp: 'ssa 10/7/2008 18:20'!\nprintShowingMax3Digits\n\t\"Print the receiver showing precisely the 3 digits, using K M B T for thousand, million, etc.\"\n\t\"|num|\n\tnum _ 0.00001234567890.\n\t20 timesRepeat:[num printShowingMax3Digits print.\n\t\tnum _ num *10].\"\n\t\n\t| s abs value |\n\tvalue _ self isFraction ifTrue:[self asFloat]ifFalse:[self].\n\ts _ value printString select:[:char| '0123456789' includes: char].\n\ts size <=3 ifTrue:[^value printString].\n\tabs _ value abs asFloat.\n\tabs < 0.01 ifTrue:[^((value * 1000) printShowingDecimalPlaces: 2),'m'].\n\tabs < 0.1 ifTrue:[^((value * 1000) printShowingDecimalPlaces: 1),'m'].\n\tabs < 10 ifTrue:[^value printShowingDecimalPlaces: 2].\n\tabs < 100 ifTrue:[^value printShowingDecimalPlaces: 1].\n\tabs < 1000 ifTrue:[^value asInteger printString].\n\tabs < 10000 ifTrue:[^((value /1000) printShowingDecimalPlaces: 2),'K'].\n\tabs < 100000 ifTrue:[^((value /1000) printShowingDecimalPlaces: 1),'K'].\n\tabs < 1000000 ifTrue:[^((value /1000) asInteger printString),'K'].\n\tabs < 10000000 ifTrue:[^((value /1000000) printShowingDecimalPlaces: 2),'M'].\n\tabs < 100000000 ifTrue:[^((value /1000000) printShowingDecimalPlaces: 1),'M'].\n\tabs < 1000000000 ifTrue:[^(value /1000000) asInteger printString,'M'].\n\tabs < 10000000000 ifTrue:[^((value /1000000000) printShowingDecimalPlaces: 2),'B'].\n\tabs < 100000000000 ifTrue:[^((value /1000000000) printShowingDecimalPlaces: 1),'B'].\n\tabs < 1000000000000 ifTrue:[^((value /1000000000) asInteger printString),'B'].\n\tabs < 10000000000000 ifTrue:[^((value /1000000000000) printShowingDecimalPlaces: 2),'T'].\n\tabs < 100000000000000 ifTrue:[^((value /1000000000000) printShowingDecimalPlaces: 1),'T'].\n\tabs < 1000000000000000 ifTrue:[^((value /1000000000000) asInteger printString),'T'].\n\tabs < 10000000000000000 ifTrue:[^((value /1000000000000000) printShowingDecimalPlaces: 2),'Q'].\n\tabs < 100000000000000000 ifTrue:[^((value /1000000000000000) printShowingDecimalPlaces: 1),'Q'].\n\tabs < 1000000000000000000 ifTrue:[^((value /1000000000000000) asInteger printString),'Q'].\n\t^'too big'\n\t\n! !\n\n!Number methodsFor: '*RVM-Archiving'!\narchiveOn: aStream \n\taStream\n\t\tstoreClass: self class;\n\t\tstore: self! !\n\n!Number class methodsFor: '*RVM-Archiving'!\ndearchiveFrom: aStream\n\t^aStream read: self! !\n\n!Object methodsFor: '*Javascript' stamp: 'aw 8/29/2007 14:27'!\n~== anObject\n\n\t^ (self == anObject) not! !\n\n!Object methodsFor: '*RVM-ensembles' stamp: 'ssa 4/21/2009 20:29'!\nforMeRun: aBlock\n\t^ aBlock value! !\n\n!Object methodsFor: '*RVM-ensembles' stamp: 'ads 1/30/2011 15:20'!\nprintConsole\n  RVMOperations isRVM ifTrue: [RVMOperations print: self printString] ifFalse: [Transcript showInConsole ifFalse: [Transcript show: self printString; cr]]! !\n\n!Object methodsFor: '*Sly' stamp: 'dmu 9/19/2010 22:45'!\ncomma: x\n\t^self , x! !\n\n!Object methodsFor: '*Sly' stamp: 'dmu 3/25/2010 23:43'!\ndivideBy: x\n\t^ self / x! !\n\n!Object methodsFor: '*Sly' stamp: 'dmu 8/27/2010 13:26'!\ndoubleEquals: anObject\n\t\"a keyword verion of == for use with selector modifiers in Sly\"\n\t^self == anObject! !\n\n!Object methodsFor: '*Sly' stamp: 'dmu 8/27/2010 13:27'!\nequals: anObject\n\t\"a keyword verion of = for use with SlySelectorModifiers\"\n\t^self = anObject! !\n\n!Object methodsFor: '*Sly' stamp: 'dmu 3/25/2010 23:42'!\nminus: x\n\t^ self - x! !\n\n!Object methodsFor: '*Sly' stamp: 'dmu 3/25/2010 23:42'!\nplus: x\n\t^ self + x! !\n\n!Object methodsFor: '*Sly' stamp: 'dmu 3/25/2010 23:43'!\ntimes: x\n\t^ self * x! !\n\n!Object methodsFor: '*Sly2' stamp: 'ssa 6/17/2010 16:32'!\nENSasExplorerString\n\t^ self asExplorerString! !\n\n!Object methodsFor: '*Sly2' stamp: 'ssa 6/17/2010 16:26'!\nENSasString\n\n\t^self asString! !\n\n!Object methodsFor: '*Sly2' stamp: 'ssa 7/16/2010 19:19'!\nENSisEnsemble\n\t\"SlyEnsemble overrides to true\"\n\t^false! !\n\n!Object methodsFor: '*Sly2' stamp: 'ssa 6/17/2010 13:35'!\nENSprintOn: aStream\n\t\"Print a textual representation of myself on aStream\"\n\n\t^ self printOn: aStream! !\n\n!Object methodsFor: '*Sly2' stamp: 'ssa 6/17/2010 15:01'!\nENSprintString\n\n\t^self printString! !\n\n!Object methodsFor: '*Sly2' stamp: 'ssa 7/16/2010 19:14'!\nENSsize\n\n\t^self size! !\n\n!Object methodsFor: '*Sly2' stamp: 'ssa 6/17/2010 13:34'!\nENSstoreOn: aStream\n\t\"Store a textual representation of myself on aStream\"\n\n\t^ self storeOn: aStream! !\n\n!Object methodsFor: '*Sly2' stamp: 'ssa 7/7/2010 13:56'!\nsentToEnsemble: aMessage\n\n\t^self perform: aMessage selector withArguments: aMessage arguments! !\n\n!Object methodsFor: '*Sly3' stamp: 'dmu 9/16/2010 23:45'!\nasSingletonEnsemble\n\t^Sly3Ensemble withSoleMember: self! !\n\n!Object methodsFor: '*Sly3' stamp: 'dmu 9/1/2010 23:22'!\ncollectionLY\n\t^ nil! !\n\n!Object methodsFor: '*Sly3' stamp: 'ads 1/30/2011 15:20'!\ndoesNotUnderstand: aMessage \n\t \"Handle the fact that there was an attempt to send the given message to the receiver but the receiver does not understand this message (typically sent from the machine when a message is sent to the receiver and no method is defined for that selector).\"\n\t\"Testing: (3 activeProcess)\"\n\t|  newSelector rps |\n\trps _ {Sly3Adverb reflectiveAdverb stringWithUppercaseSuffix. Sly3ModWholly stringWithUppercaseSuffix}.\n\trps do: [:rp |\n\t\t(aMessage selector beginsWith: rp) ifTrue: [\n\t\t\tnewSelector _ aMessage selector copyFrom: rp size + 1 to: aMessage selector size.\n\t\t\tnewSelector size = 0 ifTrue: [^ self].\n\t\t\t^ self perform: newSelector asSymbol withArguments: aMessage arguments\n\t\t]\n\t].\n\t(RVMOperations isMulticoreCoordinate: aMessage selector)\n\t\t ifTrue:[RVMOperations teleport: self to: aMessage selector. \n\t\t\t\t^self].\n\t(Preferences autoAccessors and: [self tryToDefineVariableAccess: aMessage])\n\t\tifTrue: [^ aMessage sentTo: self].\n\n\t^ MessageNotUnderstood new \n\t\tmessage: aMessage;\n\t\treceiver: self;\n\t\tsignal! !\n\n!Object methodsFor: '*sunit-preload' stamp: 'jp 3/17/2003 09:58'!\nsunitAddDependent: anObject\n \n        self addDependent: anObject! !\n\n!Object methodsFor: '*sunit-preload' stamp: 'jp 3/17/2003 09:58'!\nsunitChanged: anAspect\n \n        self changed: anAspect! !\n\n!Object methodsFor: '*sunit-preload' stamp: 'jp 3/17/2003 09:58'!\nsunitRemoveDependent: anObject\n \n        self removeDependent: anObject! !\n\n!Object methodsFor: 'converting'!\nasDisplayObject\n\t\"kwa -- 7 July 1989, answer some DisplayObject which represents the receiver.  The default is DisplayString.  Subclasses may wish to override.\n\tkwa -- 5 December 1989, changed from DisplayText to DisplayString for efficiency.\"\n\t\"ssa - 27 February 1990, at kwa's suggestion, changed asDisplayString back to asDisplayText to work around a bug in glyph scanning\"\n\t\"KSC Extension\"\n\n\t^self asDisplayText! !\n\n!Object methodsFor: 'converting'!\nDisplayText\n\t\"Convert the receiver into a DisplayText.\"\n\t\"KSC Extension.\"\n\n\t^self asText asDisplayText! !\n\n!Object methodsFor: 'converting' stamp: 'ssa 11/13/2008 10:34'!\nasObjectCoordinate\n\t\"Answer an RVMObjectCoordinate with my manycore coordinate details\"\n\t\n\t^RVMObjectCoordinate for: self! !\n\n!Object methodsFor: 'converting'!\nasText\n\t\"kwa -- 7 July 1989, answer some Text which represents the receiver.  The default is to use asString asText.  This is so any object can can be treated as a Text (whether it is or not).  Subclasses may wish to override (but shouldn't have to) to take advantage of emphasis et al.\"\n\t\"KSC Extension\"\n\n\t^self asString asText! !\n\n!Object methodsFor: 'converting' stamp: 'ssa 12/16/2009 13:22'!\nprintDirectlyToDisplay\n\t\"For debugging: write the receiver's printString directly to the display at (0, 100); senders of this are detected by the check-for-slips mechanism.\"\n\n\tself asString displayAt: 0@0\n\n\"StringMorph someInstance printDirectlyToDisplay\"! !\n\n!Object methodsFor: 'debugging' stamp: 'ssa 1/21/2010 12:08'!\ndisplay\n\t\"Display my printString on the screen to avoid the transcript\"\n\t\n\tself printString asParagraph display! !\n\n!Object methodsFor: 'debugging' stamp: 'ssa 2/26/2009 01:59'!\nlocate\n\t\"Open a object coordinate view on my location in the manycore world\"\n\t\"Array locate\"\n\tRVMObjectCoordinateView openOn: self asObjectCoordinate! !\n\n!Object methodsFor: 'debugging' stamp: 'ssa 8/8/2008 17:25'!\nprint\n\n\tTranscript cr;show: self printString! !\n\n!Object methodsFor: 'inspecting' stamp: 'ssa 1/6/2010 20:19'!\ninspect\n\t\"Create and schedule an Inspector in which the user can examine the receiver's variables.\"\n\n\tself inspectorClass openOn: self withEvalPane: true! !\n\n!Object methodsFor: 'macpal' stamp: 'ssa 9/8/2009 10:22'!\nallInstanceVariableValues\n\t\"Answer a collection whose elements are the values of those instance variables of the receiver\"\n\t| c |\n\tc _ OrderedCollection new.\n\t1 to: self class instSize do:\n\t\t[:i | c add: (self instVarAt: i)].\n\t^ c! !\n\n!Object methodsFor: 'macpal' stamp: 'ssa 9/8/2009 10:51'!\nallInstanceVariableValuesPlusIndexed\n\t\"Answer a collection whose elements are the values of those instance variables of the receiver.\n\tAlso include the indexed variables if any\"\n\t| c |\n\tc _ OrderedCollection new.\n\t1 to: self class instSize do:\n\t\t[:i | c add: (self instVarAt: i)].\n\tself class isVariable ifFalse:[^c].\n\t1 to: self size do:[:index|\n\t\tc add: (self basicAt: index)].\n\t^ c! !\n\n!Object methodsFor: 'outlining' stamp: 'ssa 9/11/2009 16:40'!\nexplore\n\n\tObjectExplorer new openExplorerFor: self! !\n\n!Object methodsFor: 'outlining' stamp: 'ssa 3/9/2010 16:17'!\nhasContents\n\n\t^false! !\n\n!Object methodsFor: 'outlining' stamp: 'ssa 9/10/2009 16:00'!\noutlineString\n\n\t^self printString! !\n\n!Object methodsFor: 'outlining' stamp: 'ssa 9/10/2009 13:36'!\nsubobjects\n\t\"Answer an appropriate collection of my sub objects for an outliner view\"\n\t\n\t^self class allInstVarNames with: self allInstanceVariableValues collect:[:key :value| key -> value]! !\n\n!Object methodsFor: 'printing' stamp: 'ssa 10/25/2008 20:45'!\narchiveVersion\n\t\"Subclasses should override when they implement a different archive version\"\n\n\t^1! !\n\n!Object methodsFor: 'printing'!\nsicArchiveOn: aStream \n\t\"This is the generic archiver for objects. This can be used if you want to bypass superclass or other reasons for overriding archiveOn:\"\n\n\taStream\n\t\tstoreObject: self;\n\t\tstoreClass: self class.\n\n\tself class isVariable ifTrue:\n\t\t[aStream store: self basicSize.\n\t\t1 to: self basicSize do: [:i | aStream nextPut: (self basicAt: i)].].\n\n\t1 to: self class instSize do: [:i | aStream nextPut: (self instVarAt: i)].! !\n\n!Object methodsFor: 'printing' stamp: 'ads 1/24/2011 13:03'!\nlongPrintOn: aStream\n\t\"Append to the argument, aStream, the names and values of all \n\tof the receiver's instance variables.\"\n\n\tself class allInstVarNames doWithIndex:\n\t\t[:title :index |\n\t\taStream nextPutAll: title;\n\t\t nextPut: $:;\n\t\t space;\n\t\t tab;\n\t\t nextPutAll: (RVMPrimitivesNeededForBootstrapping printPrefixFor: (self instVarAt: index));\n\t\tprint:(self instVarAt: index);\n\t\t cr]! !\n\n!Object methodsFor: 'printing' stamp: 'ssa 9/4/2009 22:29'!\nprintStringUpTo: limit\n\t\"Answer a String whose characters are a description of the receiver.\n\tIf you want to print without a character limit, use fullPrintString.\"\n\t| limitedString |\n\tlimitedString _ String streamContents: [:s | self printOn: s] limitedTo: limit.\n\tlimitedString size < limit ifTrue: [^ limitedString].\n\t^ limitedString, '...'! !\n\n!Object methodsFor: 'testing' stamp: 'ssa 9/8/2009 10:48'!\nhasInstanceVariables\n\n\t^self allInstanceVariableValuesPlusIndexed size > 0! !\n\n!Object methodsFor: 'testing' stamp: 'ssa 5/12/2010 19:26'!\nisArray\n\t\"Return true if the receiver is an Array\"\n\t^false! !\n\n!Object methodsFor: 'testing' stamp: 'ssa 5/27/2010 10:40'!\nisBoolean\n\t\"Return true if the receiver is true or false.\n\tNote: Do not override in any class except Boolean.\"\n\t^false! !\n\n!Object methodsFor: 'testing' stamp: 'ssa 8/11/2009 12:37'!\nisCharacter\n\t^false! !\n\n!Object methodsFor: 'testing' stamp: 'dmu 9/3/2010 15:00'!\nisEnsemble\n\t\"Sly3Ensemble overrides to true\"\n\t^false! !\n\n!Object methodsFor: 'testing' stamp: 'ssa 8/31/2009 14:14'!\nisObject\n\n\t^true! !\n\n!Object methodsFor: 'updating' stamp: 'ssa 5/12/2010 10:29'!\nchanged: anAspect with: anObject from: aSource\n\t\"Receiver changed. The change is denoted by the argument anAspect. \n\tUsually the argument is a Symbol that is part of the dependent's change \n\tprotocol. Inform all of the dependents. Also pass anObject for additional information.\"\n\n\tself dependents do: [:aDependent | aDependent update: anAspect with: anObject from: aSource]! !\n\n!Object methodsFor: 'updating' stamp: 'ssa 5/12/2010 10:29'!\nupdate: anAspect with: anObject from: aSource\n\t\"Receive a change notice from an object of whom the receiver is a \n\tdependent. The default behavior is to call update:,\n\twhich by default does nothing; a subclass might want \n\tto change itself in some way.\"\n\n\t^ self update: anAspect with: anObject! !\n\n!Object methodsFor: 'user interface' stamp: 'ssa 6/17/2010 16:15'!\nasExplorerString\n\t^ self printString! !\n\n!Object methodsFor: 'user interface' stamp: 'ssa 11/30/2009 17:49'!\ndefaultBackgroundColor\n\t\"Answer the color to be used as the base window color for a window whose model is an object of the receiver's class\"\n\t\n\t(Smalltalk includesKey: #WINDOWCOLORSELECTOR)\n\t\tifFalse:[Smalltalk at: #WINDOWCOLORSELECTOR put:[:obj| Preferences windowColorFor: obj  class name]].\n\t\n\t^((Smalltalk at: #WINDOWCOLORSELECTOR) value: self) ! !\n\n!Object methodsFor: 'private' stamp: 'yo 6/29/2004 11:37'!\nerrorNotIndexable\n\t\"Create an error notification that the receiver is not indexable.\"\n\n\tself error: ('Instances of {1} are not indexable' translated format: {self class name})! !\n\n!Object methodsFor: 'private'!\nerrorSubscriptBounds: index \n\t\"Create an error notification that an improper integer was used as an index.\"\n\n\tself error: 'subscript is out of bounds: ' , index printString! !\n\n!Object methodsFor: '*SlyBootstrap' stamp: 'dmu 3/18/2010 15:47'!\nprimitiveGetExtraPreheaderWord: anObject\n\t\"ignores receiver, queries argument\"\n\t<primitive: 'primitiveGetExtraPreheaderWord' module: 'RVMPlugin'>\n\tself primitiveFailed! !\n\n!Object methodsFor: '*SlyBootstrap' stamp: 'dmu 3/18/2010 14:52'!\nprimitiveSetExtraPreheaderWord: w\n\t\"sets word IN w to SELF\"\n\t<primitive: 'primitiveSetExtraPreheaderWord' module: 'RVMPlugin'>\n\tself primitiveFailed! !\n\n!Object methodsFor: '*SlyBootstrap' stamp: 'dmu 3/16/2010 19:11'!\nprimitiveSetExtraWordSelector: aSelector\n\t<primitive: 'primitiveSetExtraWordSelector' module: 'RVMPlugin'>\n\tself primitiveFailed! !\n\n!Object methodsFor: '*RVM-Archiving'!\narchiveOn: aStream \n\t\"This is the generic archiver for objects. If an object does anything special, this method will need to be subclassed along with the complementary method - dearchiveFrom:\"\n\n\taStream\n\t\tstoreObject: self;\n\t\tstoreClass: self class.\n\n\tself class isVariable ifTrue:\n\t\t[aStream store: self basicSize.\n\t\t1 to: self basicSize do: [:i | aStream nextPut: (self basicAt: i)].].\n\n\t1 to: self class instSize do: [:i | aStream nextPut: (self instVarAt: i)].! !\n\n!Object methodsFor: '*RVM-Archiving'!\ndearchiveFrom: aStream\n\t\"This is the generic de-archiver for objects. If an object does anything special, this method will need to be subclassed along with the complementary method - archiveOn:\"\n\n\tself class isVariable ifTrue:\n\t\t[1 to: self basicSize do: [:i | self basicAt: i put: aStream next]].\n\n\t1 to: self class instSize\n\t  do: [:j | self instVarAt: j put: aStream next]! !\n\n!Object methodsFor: '*RVM-Archiving'!\nsicArchiveOn: aStream \n\t\"This is the generic archiver for objects. This can be used if you want to bypass superclass or other reasons for overriding archiveOn:\"\n\n\taStream\n\t\tstoreObject: self;\n\t\tstoreClass: self class.\n\n\tself class isVariable ifTrue:\n\t\t[aStream store: self basicSize.\n\t\t1 to: self basicSize do: [:i | aStream nextPut: (self basicAt: i)].].\n\n\t1 to: self class instSize do: [:i | aStream nextPut: (self instVarAt: i)].! !\n\n!Object class methodsFor: '*RVM-Archiving'!\ndearchive: versionNumber from: aStream\n\t\"Override this method when implementing new archive versions for a class.\"\n\n\t^versionNumber == self archiveVersion\n\t\tifTrue: [self dearchiveFrom: aStream]\n\t\tifFalse: [self error: 'Can''t dearchive this version.']! !\n\n!Object class methodsFor: '*RVM-Archiving'!\ndearchiveFrom: aStream\n\n\t| anObject |\n\tself isVariable\n\t\tifTrue:[anObject _ self basicNew: (aStream read: Integer)]\n\t\tifFalse:[anObject _ self dearchiveNewFrom: aStream].\n\taStream storeObject: anObject.\n\tanObject dearchiveFrom: aStream.\n\t^anObject! !\n\n!Object class methodsFor: '*RVM-Archiving'!\ndearchiveNewFrom: aStream\n\t^self basicNew! !\n\n!ObjectExplorer methodsFor: 'opening/closing' stamp: 'ssa 9/11/2009 16:15'!\nhide: anItem\n\t\"recursively hide this and all progeny\"\n\t\t\n\tanItem isOpen ifTrue:[(self listedChildrenOf: anItem) do:[:each| self hide: each]].\n\tself levels removeKey: anItem ifAbsent:[].\n\tself list remove: anItem ifAbsent:[self halt].\n\tanItem isOpen: false.\n! !\n\n!ObjectExplorer methodsFor: 'opening/closing' stamp: 'ssa 2/26/2010 13:47'!\nhideChildrenOfSelection\n\n\t(self listedChildrenOf: self currentSelection ) do:[:each| self hide: each].\n\tself currentSelection isOpen: false.\n\t\t\n\t! !\n\n!ObjectExplorer methodsFor: 'opening/closing' stamp: 'ssa 9/11/2009 16:14'!\nlistedChildrenOf: aWrapper\n\n\t^self list select:[:item| item parent == aWrapper]! !\n\n!ObjectExplorer methodsFor: 'opening/closing' stamp: 'ssa 2/26/2010 13:45'!\nshowChildrenOfSelection\n\n\t| kids |\n\tself currentSelection hasContents ifFalse:[^self].\n\tkids _ self currentSelection contents.\n\tself list addAll: kids after: self currentSelection.\n\tself currentSelection isOpen: true.! !\n\n!ObjectExplorer methodsFor: 'opening/closing' stamp: 'ssa 9/11/2009 15:44'!\ntoggleSelection\n\n\tself currentSelection isNil ifTrue:[^self].\n\tself currentSelection isOpen\n\t\tifTrue:[self hideChildrenOfSelection]\n\t\tifFalse:[self showChildrenOfSelection].\n\tself changed:#list! !\n\n!ObjectExplorer methodsFor: 'accessing' stamp: 'RAA 9/23/1999 13:11'!\ncontentsSelection\n\t\"Return the interval of text in the code pane to select when I set the pane's contents\"\n\n\t^ 1 to: 0  \"null selection\"! !\n\n!ObjectExplorer methodsFor: 'accessing' stamp: 'ssa 2/8/2010 14:40'!\ndefaultRootLabel\n\n\t^'unlabeled object'! !\n\n!ObjectExplorer methodsFor: 'accessing' stamp: 'RAA 9/23/1999 13:15'!\ndoItContext\n\t\"Answer the context in which a text selection can be evaluated.\"\n\n\t^nil! !\n\n!ObjectExplorer methodsFor: 'accessing' stamp: 'RAA 9/23/1999 13:19'!\ndoItReceiver\n\t\"Answer the object that should be informed of the result of evaluating a\n\ttext selection.\"\n\n\tcurrentSelection ifNil: [^rootObject].\n\t^currentSelection withoutListWrapper\n! !\n\n!ObjectExplorer methodsFor: 'accessing' stamp: 'ssa 6/17/2010 16:25'!\ngetList\n\t^OrderedCollection with: (ObjectExplorerWrapper with: rootObject name: 'root' model: self parent: nil)\n! !\n\n!ObjectExplorer methodsFor: 'accessing' stamp: 'ssa 9/11/2009 15:35'!\ninspector\n\t\"Answer the value of inspector\"\n\n\tinspector isNil ifTrue:[self inspector: nil].\n\t^ inspector! !\n\n!ObjectExplorer methodsFor: 'accessing' stamp: 'ssa 9/11/2009 15:35'!\ninspector: anObject\n\t\"Set the value of inspector\"\n\n\tinspector _ anObject! !\n\n!ObjectExplorer methodsFor: 'accessing' stamp: 'hg 9/7/2001 12:12'!\nlabel\n\n\t^ rootObject printStringLimitedTo: 32! !\n\n!ObjectExplorer methodsFor: 'accessing' stamp: 'ssa 9/11/2009 15:51'!\nlist\n\t\"Answer the value of list\"\n\n\tlist isNil ifTrue:[self list: self getList].\n\t^ list! !\n\n!ObjectExplorer methodsFor: 'accessing' stamp: 'ssa 9/11/2009 15:35'!\nmonitorList: anObject\n\t\"Set the value of monitorList\"\n\n\tmonitorList _ anObject! !\n\n!ObjectExplorer methodsFor: 'accessing' stamp: 'ssa 12/17/2009 10:02'!\nmonitorProcess\n\t\"Answer the value of monitorProcess\"\n\n\tmonitorProcess isNil ifTrue:[self monitorProcess: nil].\n\t^ monitorProcess! !\n\n!ObjectExplorer methodsFor: 'accessing' stamp: 'ssa 12/17/2009 10:02'!\nmonitorProcess: anObject\n\t\"Set the value of monitorProcess\"\n\n\tmonitorProcess _ anObject! !\n\n!ObjectExplorer methodsFor: 'accessing' stamp: 'nk 7/24/2003 09:43'!\nobject\n\t^currentSelection ifNotNilDo: [ :cs | cs withoutListWrapper ]! !\n\n!ObjectExplorer methodsFor: 'accessing' stamp: 'nk 7/24/2003 10:02'!\nparentObject\n\tcurrentSelection ifNil: [ ^nil ].\n\tcurrentSelection parent ifNil: [ ^rootObject ].\n\t^currentSelection parent withoutListWrapper! !\n\n!ObjectExplorer methodsFor: 'accessing' stamp: 'ssa 2/8/2010 14:40'!\nrootLabel\n\t\"Answer the value of rootLabel\"\n\n\trootLabel isNil ifTrue:[self rootLabel: self defaultRootLabel].\n\t^ rootLabel! !\n\n!ObjectExplorer methodsFor: 'accessing' stamp: 'ssa 2/8/2010 14:39'!\nrootLabel: anObject\n\t\"Set the value of rootLabel\"\n\n\trootLabel _ anObject! !\n\n!ObjectExplorer methodsFor: 'accessing' stamp: 'ssa 9/11/2009 15:35'!\nrootObject\n\t\"Answer the value of rootObject\"\n\n\trootObject isNil ifTrue:[self rootObject: nil].\n\t^ rootObject! !\n\n!ObjectExplorer methodsFor: 'accessing' stamp: 'ssa 9/11/2009 15:35'!\nrootObject: anObject\n\t\"Set the value of rootObject\"\n\n\trootObject _ anObject! !\n\n!ObjectExplorer methodsFor: 'accessing' stamp: 'nk 7/24/2003 09:47'!\nselector\n\t^currentSelection ifNotNilDo: [ :cs | cs selector ]! !\n\n!ObjectExplorer methodsFor: 'accessing' stamp: 'ssa 2/9/2010 04:26'!\nwrapperFor: anObject\n\n\t^self list detect:[:wrapper| wrapper item == anObject]ifNone:[^nil]! !\n\n!ObjectExplorer methodsFor: 'error handling' stamp: 'nk 7/24/2003 09:29'!\ndoesNotUnderstand: aMessage\n\tinspector ifNotNil: [ (inspector respondsTo: aMessage selector) ifTrue: [ ^inspector perform: aMessage selector withArguments: aMessage arguments ]].\n\t^super doesNotUnderstand: aMessage! !\n\n!ObjectExplorer methodsFor: 'menus' stamp: 'sd 11/20/2005 21:27'!\nchasePointers\n\t\"Open a PointerFinder on the selected item\"\n\t| path sel savedRoot saved |\n\tpath := OrderedCollection new.\n\tsel := currentSelection.\n\t[ sel isNil ] whileFalse: [ path addFirst: sel asString. sel := sel parent ].\n\tpath addFirst: #openPath.\n\tpath := path asArray.\n\tsavedRoot := rootObject.\n\tsaved := self object.\n\t[ rootObject := nil.\n\tself changed: #getList.\n\t(Smalltalk includesKey: #PointerFinder)\n\t\tifTrue: [PointerFinder on: saved]\n\t\tifFalse: [self objectReferencesToSelection ]]\n\t\tensure: [ rootObject := savedRoot.\n\t\t\tself changed: #getList.\n\t\t\tself changed: path.\n\t\t]! !\n\n!ObjectExplorer methodsFor: 'menus' stamp: 'RAA 9/23/1999 13:22'!\ncodePaneMenu: aMenu shifted: shifted\n\t\"Note that unless we override perform:orSendTo:, PluggableTextController will respond to all menu items\"\n\t^ StringHolder basicNew codePaneMenu: aMenu shifted: shifted\n! !\n\n!ObjectExplorer methodsFor: 'menus' stamp: 'sd 11/20/2005 21:27'!\ndefsOfSelection\n\t\"Open a browser on all defining references to the selected instance variable, if that's what's currently selected.\"\n\t| aClass sel |\n\n\t(aClass := self parentObject class) isVariable ifTrue: [^ self changed: #flash].\n\tsel := self selector.\n\tself systemNavigation  browseAllStoresInto: sel from: aClass! !\n\n!ObjectExplorer methodsFor: 'menus' stamp: 'nk 7/24/2003 10:26'!\nexploreSelection\n\t\"Open an ObjectExplorer on the current selection\"\n\tself object explore! !\n\n!ObjectExplorer methodsFor: 'menus' stamp: 'ssa 1/6/2010 20:35'!\nexplorerKey: aChar from: view\n\n\t\"Similar to #genericMenu:...\"\n\t| insideObject parentObject |\n\tcurrentSelection ifNotNil: [\n\t\tinsideObject := self object.\n\t\tparentObject := self parentObject.\n\t\tinspector ifNil: [inspector := Inspector new].\n\t\tinspector\n\t\t\tinspect: parentObject;\n\t\t\tobject: insideObject.\n\n\t\taChar == $i ifTrue: [^ self inspectSelection].\n\t\taChar == $e ifTrue: [^ self exploreSelection].\n\n\t\taChar == $b ifTrue:\t[^ inspector browseMethodFull].\n\t\taChar == $h ifTrue:\t[^ inspector classHierarchy].\n\t\taChar == $c ifTrue: [^ inspector copyName].\n\t\taChar == $p ifTrue: [^ inspector browseFullProtocol].\n\t\taChar == $N ifTrue: [^ inspector browseClassRefs].\n\t\taChar == $t ifTrue: [^ inspector tearOffTile].\n\t\taChar == $v ifTrue: [^ inspector viewerForValue]].\n\n\t^ self arrowKey: aChar from: view! !\n\n!ObjectExplorer methodsFor: 'menus' stamp: 'ssa 12/17/2009 10:13'!\ngenericMenu: aMenu \n\t\"Borrow a menu from my inspector\"\n\t| insideObject menu parentObject |\n\tcurrentSelection\n\t\tifNil: [menu := aMenu.\n\t\t\tmenu\n\t\t\t\tadd: '*nothing selected*'\n\t\t\t\ttarget: self\n\t\t\t\tselector: #yourself\n\t\t\t\targument:nil]\n\t\tifNotNil: [insideObject := self object.\n\t\t\tparentObject := self parentObject.\n\t\t\tinspector\n\t\t\t\tifNil: [inspector := Inspector new].\n\t\t\tinspector inspect: parentObject;\n\t\t\t\t object: insideObject.\n\t\t\taMenu selections do:[:each| aMenu targets add: inspector].\n\t\t\tinspector fieldListMenu: aMenu.\n\t\t\taMenu selections do:[:each| aMenu targets add: inspector].\n\t\t\taMenu selections \n\t\t\t\tdo: [:i | (#(#inspectSelection #exploreSelection #referencesToSelection #defsOfSelection #objectReferencesToSelection #chasePointers ) includes: i )\n\t\t\t\t\t\tifTrue: [aMenu targets at:(aMenu selections indexOf:i) put:self]].\n\t\t\taMenu addLine;\n\t\t\t\tadd: 'monitor changes'\n\t\t\t\ttarget: self\n\t\t\t\tselector: #monitor:\n\t\t\t\targument: currentSelection].\n\tmonitorList isEmptyOrNil\n\t\tifFalse: [aMenu addLine;\n\t\t\t\tadd: 'stop monitoring all'\n\t\t\t\ttarget: self\n\t\t\t\tselector: #stopMonitoring\n\t\t\t\targument:nil].\n\t^ aMenu! !\n\n!ObjectExplorer methodsFor: 'menus' stamp: 'nk 7/24/2003 10:26'!\ninspectSelection\n\t\"Open an Inspector on the current selection\"\n\tself object inspect! !\n\n!ObjectExplorer methodsFor: 'menus' stamp: 'nk 7/24/2003 10:00'!\nobjectReferencesToSelection\n\t\"Open a browser on all references to the selected instance variable, if that's what currently selected. \"\n\tself systemNavigation\n\t\tbrowseAllObjectReferencesTo: self object\n\t\texcept: (Array with: self parentObject with: currentSelection with: inspector)\n\t\tifNone: [:obj | self changed: #flash].\n! !\n\n!ObjectExplorer methodsFor: 'menus' stamp: 'sd 11/20/2005 21:27'!\nreferencesToSelection\n\t\"Open a browser on all references to the selected instance variable, if that's what's currently selected.\"\n\t| aClass sel |\n\n\t(aClass := self parentObject class) isVariable ifTrue: [^ self changed: #flash].\n\tsel := self selector.\n\tself systemNavigation browseAllAccessesTo: sel from: aClass! !\n\n!ObjectExplorer methodsFor: 'menus' stamp: 'RAA 9/23/1999 13:19'!\nselectedClass\n\t\"Answer the class of the receiver's current selection\"\n\n\t^self doItReceiver class\n! !\n\n!ObjectExplorer methodsFor: 'menus' stamp: 'RAA 9/23/1999 13:10'!\ntrash\n\t\"What goes in the bottom pane\"\n\t^ ''! !\n\n!ObjectExplorer methodsFor: 'menus' stamp: 'RAA 9/23/1999 13:10'!\ntrash: newText\n\t\"Don't save it\"\n\t^ true! !\n\n!ObjectExplorer methodsFor: 'monitoring' stamp: 'ssa 12/17/2009 10:24'!\nmonitor: anObjectExplorerWrapper\n\t\"Start stepping and watching the given wrapper for changes.\"\n\tanObjectExplorerWrapper ifNil: [ ^self ].\n\tself monitorList at: anObjectExplorerWrapper put: anObjectExplorerWrapper asString.\n\tself monitorProcess isNil ifFalse:[self monitorProcess terminate].\n\tself monitorProcess: [[self monitorList notEmpty]whileTrue:[(Delay forMilliseconds:200)wait.  self step]] newProcess.\n\t[self monitorProcess resume] fork! !\n\n!ObjectExplorer methodsFor: 'monitoring' stamp: 'sd 11/20/2005 21:27'!\nmonitorList\n\t^monitorList ifNil: [ monitorList := WeakIdentityKeyDictionary new ].! !\n\n!ObjectExplorer methodsFor: 'monitoring' stamp: 'ssa 12/17/2009 10:06'!\nrelease\n\tself stopMonitoring.\n\tsuper release.! !\n\n!ObjectExplorer methodsFor: 'monitoring' stamp: 'nk 7/12/2003 17:55'!\nshouldGetStepsFrom: aWorld\n\t^self monitorList notEmpty! !\n\n!ObjectExplorer methodsFor: 'monitoring' stamp: 'ssa 12/17/2009 10:20'!\nstep\n\t\"If there's anything in my monitor list, see if the strings have changed.\"\n\t| string changes |\n\tchanges := false.\n\tself monitorList keysAndValuesDo: [ :k :v |\n\t\tk ifNotNil: [\n\t\t\tk refresh.\n\t\t\t(string := k asString) ~= v ifTrue: [ self monitorList at: k put: string. changes := true ].\n\t\t]\n\t].\n\n\tchanges ifTrue: [ | sel | \n\t\tsel := currentSelection.\n\t\tself changed: #list.\n\t\tself noteNewSelection: sel.\n\t].\n! !\n\n!ObjectExplorer methodsFor: 'monitoring' stamp: 'ssa 12/17/2009 10:06'!\nstopMonitoring\n\tmonitorList := nil.\n\tself monitorProcess ifNotNil:[self monitorProcess terminate]! !\n\n!ObjectExplorer methodsFor: 'user interface' stamp: 'ssa 9/10/2009 16:51'!\nexplorerFor: anObject\n\t\n\t^self explorerFor: anObject withLabel:'Object Explorer'! !\n\n!ObjectExplorer methodsFor: 'user interface' stamp: 'ssa 3/24/2010 15:05'!\nexplorerFor: anObject withLabel: label \n\t|  topView listView ptv |\n\trootObject := anObject.\n\ttopView := StandardSystemView new\n\t\t\t\tlabel: 'Exploring ',anObject class name,' ',label; \n\t\t\t\tmodel: self;\n\t\t\t\tyourself.\n\ttopView addSubView:(listView := ExplorerListView\n\t\t\t\t\t\ton: self\n\t\t\t\t\t\tlist: #list\n\t\t\t\t\t\tselected: #getCurrentSelection\n\t\t\t\t\t\tchangeSelected: #noteNewSelection:\n\t\t\t\t\t\tmenu: #genericMenu:\n\t\t\t\t\t\tkeystroke: #explorerKey:from:)\n\t\tin: (0 @ 0 corner: 1 @ 0.8)\n\t\tborderWidth:1.\n\tptv _ PluggableTextView\n\t\t\t\ton: self\n\t\t\t\ttext: #trash\n\t\t\t\taccept: #trash:\n\t\t\t\treadSelection: #contentsSelection\n\t\t\t\tmenu: #codePaneMenu:shifted:.\n\tptv askBeforeDiscardingEdits: false.\n\ttopView\n\t\taddSubView: ptv\t\n\t\tin: (0 @ 0.8 corner: 1 @ 1)\n\t\tborderWidth:1.\n\tlistView autoDeselect: false.\n\t^ topView! !\n\n!ObjectExplorer methodsFor: 'user interface' stamp: 'RAA 6/2/2000 16:23'!\ninitialExtent\n\n\t^300@500! !\n\n!ObjectExplorer methodsFor: 'user interface' stamp: 'ssa 9/10/2009 16:42'!\nopenBrowser: aClass\n\n\tBrowser newOnClass: aClass selector: nil! !\n\n!ObjectExplorer methodsFor: 'user interface' stamp: 'ssa 9/11/2009 14:37'!\nopenExplorerFor: anObject\n\"\nObjectExplorer new openExplorerFor: Smalltalk\n\"\n\n    (self explorerFor: anObject) controller open.\n    ^ self\n! !\n\n!ObjectExplorer commentStamp: '<historical>' prior: 0!\nObjectExplorer provides a hierarchical alternative to #inspect. Simply evaluate an expression like:\n\nWorld explore\n\nand enjoy.!\n!ObjectExplorer class methodsFor: 'instance creation' stamp: 'ssa 2/8/2010 14:44'!\nopenExplorerFor: anObject labeled: newRootLabel withLabel: label \n\n\t| exp view |\n\texp _ self new rootLabel: newRootLabel.\n\tview _ exp explorerFor: anObject withLabel: label .\n\tview  controller open! !\n\n!ObjectExplorer class methodsFor: 'instance creation' stamp: 'ssa 2/8/2010 14:33'!\nopenExplorerFor: anObject withLabel: label \n\n\t| exp |\n\texp _ self new explorerFor: anObject withLabel: label .\n\texp controller open! !\n\n!ObjectExplorerWrapper methodsFor: 'as yet unclassified' stamp: 'nk 7/24/2003 09:14'!\nparent\n\t^parent! !\n\n!ObjectExplorerWrapper methodsFor: 'as yet unclassified' stamp: 'nk 7/24/2003 09:14'!\nparent: anObject\n\tparent _ anObject! !\n\n!ObjectExplorerWrapper methodsFor: 'as yet unclassified' stamp: 'nk 7/24/2003 09:49'!\nselector\n\tparent ifNil: [ ^nil ].\n\t^(parent withoutListWrapper class allInstVarNames includes: itemName) ifTrue: [ itemName asSymbol ]! !\n\n!ObjectExplorerWrapper methodsFor: 'as yet unclassified' stamp: 'RAA 6/21/1999 10:49'!\nsetItem: anObject name: aString model: aModel\n\n\titem _ anObject.\n\tmodel _ aModel.\n\titemName _ aString.! !\n\n!ObjectExplorerWrapper methodsFor: 'as yet unclassified' stamp: 'nk 7/24/2003 09:14'!\nsetItem: anObject name: aString model: aModel parent: itemParent\n\tparent _ itemParent.\n\tself setItem: anObject name: aString model: aModel! !\n\n!ObjectExplorerWrapper methodsFor: 'converting' stamp: 'ssa 7/7/2010 11:08'!\nasString\n\t| explorerString string |\n\n\texplorerString _ \n\t\t[item asExplorerString]\n\t\t\ton: Error \n\t\t\tdo: ['<error: ', item class name, ' in asExplorerString: evaluate \"' , itemName , ' asExplorerString\" to debug>'].\n\tstring _ (itemName ifNotNil: [itemName , ': '] ifNil: ['']) , explorerString.\n\t(string includes: Character cr)\n\t\tifTrue: [^ string withSeparatorsCompacted].\n\t^ string! !\n\n!ObjectExplorerWrapper methodsFor: 'converting' stamp: 'nk 7/24/2003 10:16'!\nitemName\n\t^itemName! !\n\n!ObjectExplorerWrapper methodsFor: 'monitoring' stamp: 'nk 7/12/2003 18:28'!\nrefresh\n\t\"hack to refresh item given an object and a string that is either an index or an instance variable name.\"\n\t[ | index |\n\t\t(model class allInstVarNames includes: itemName)\n\t\t\tifTrue: [ item _ model instVarNamed: itemName ]\n\t\t\tifFalse: [ index _ itemName asNumber.\n\t\t\t\t(index between: 1 and: model basicSize) ifTrue: [ item _ model basicAt: index]]\n\t] on: Error do: [ :ex | item _ nil ]! !\n\n!ObjectExplorerWrapper methodsFor: 'accessing' stamp: 'ssa 9/11/2009 16:17'!\ncontents\n\n\t(item respondsTo: #explorerContents) ifTrue: [^item explorerContents collect:[:e| e parent: self]].\n\t\"For all others, show named vars first, then indexed vars\"\n\t^(item class allInstVarNames asOrderedCollection withIndexCollect: [:each :index |\n\t\tself class\n\t\t\twith: (item instVarAt: index)\n\t\t\tname: each\n\t\t\tmodel: item\n\t\t\tparent: self]) ,\n\t((1 to: item basicSize) collect: [:index |\n\t\tself class\n\t\t\twith: (item basicAt: index)\n\t\t\tname: index printString\n\t\t\tmodel: item\n\t\t\tparent: self])! !\n\n!ObjectExplorerWrapper methodsFor: 'accessing' stamp: 'ssa 9/11/2009 15:09'!\ndepth\n\n\t^self parent isNil ifTrue:[0]ifFalse:[self parent depth + 1]! !\n\n!ObjectExplorerWrapper methodsFor: 'accessing' stamp: 'RAA 6/21/1999 11:27'!\nhasContents\n\n\t^item hasContentsInExplorer\n\t\n! !\n\n!ObjectExplorerWrapper methodsFor: 'accessing' stamp: 'dgd 9/26/2004 18:34'!\nicon\n\t\"Answer a form to be used as icon\"\n\t^ Preferences visualExplorer\n\t\tifTrue: [item iconOrThumbnailOfSize: 16]\n\t\tifFalse: [nil]! !\n\n!ObjectExplorerWrapper methodsFor: 'accessing' stamp: 'ssa 9/11/2009 14:45'!\nisOpen\n\t\"Answer the value of isOpen\"\n\n\tisOpen isNil ifTrue:[self isOpen: false].\n\t^ isOpen! !\n\n!ObjectExplorerWrapper methodsFor: 'accessing' stamp: 'ssa 9/11/2009 14:45'!\nisOpen: anObject\n\t\"Set the value of isOpen\"\n\n\tisOpen _ anObject! !\n\n!ObjectExplorerWrapper methodsFor: 'accessing' stamp: 'ssa 9/11/2009 14:45'!\nitemName: anObject\n\t\"Set the value of itemName\"\n\n\titemName _ anObject! !\n\n!ObjectExplorerWrapper commentStamp: '<historical>' prior: 0!\nContributed by Bob Arning as part of the ObjectExplorer package.\n!\n!ObjectExplorerWrapper class methodsFor: 'as yet unclassified' stamp: 'RAA 6/21/1999 10:50'!\nwith: anObject name: aString model: aModel\n\n\t^self new \n\t\tsetItem: anObject name: aString model: aModel! !\n\n!ObjectExplorerWrapper class methodsFor: 'as yet unclassified' stamp: 'nk 7/24/2003 09:16'!\nwith: anObject name: aString model: aModel parent: aParent\n\n\t^self new \n\t\tsetItem: anObject name: aString model: aModel parent: aParent\n! !\n\n!OneFilePerClass methodsFor: 'loading' stamp: 'ads 12/3/2010 12:32'!\nfilePathForClass: aClass\n\t| classCatDirName |\n\tclassCatDirName := self validNameForDir: aClass category in: self rootDirectory.\n\t^ classCatDirName, self rootDirectory pathNameDelimiter asString, (self fileNameForClass: aClass)! !\n\n!OneFilePerClass methodsFor: 'loading' stamp: 'sm 4/21/2011 23:08'!\nsaveScriptForLoadingPackageBackIn: p\n\t| file dirName |\n\tfile := self rootDirectory newFileNamed: self rootName, '.st'.\n\t\n\t(file respondsTo: #lineEndConvention:) ifTrue: [\n\t\tfile lineEndConvention: #lf.\n\t].\n\t\t\t\t\t\n\tpreambleBlock ifNotNil: [ preambleBlock value: file ].\n\n\tfile nextPutAll: '{'; cr.\n\t(self classesInOrderForLoading: p) do: [:class |\n\t\tfile nextPutAll: String tab, (self filePathForClass: class) printString, '.'; cr.\n\t].\n\tdirName := (transporter baseDirectory = FileDirectory default ifTrue: [''] ifFalse: [transporter baseDirectory localName, FileDirectory pathNameDelimiter]), self rootName.\n\tfile nextPutAll: '} do: [:fileName | ((FileDirectory default directoryNamed: ', dirName printString, ') readOnlyFileNamed: fileName) fileIn].'; cr.\n\n\tpostscriptBlock ifNotNil: [ postscriptBlock value: file ].\n\n\tfile close.! !\n\n!OneFilePerClass methodsFor: 'saving' stamp: 'ads 12/3/2010 13:34'!\nfileNameForClass: cls\n\t^ cls theNonMetaClass name, FileDirectory dot, 'st'! !\n\n!OneFilePerClass methodsFor: 'saving' stamp: 'sm 4/21/2011 23:10'!\nnewFileForClass: cls do: blk\n\t| catDir fileName f |\n\tcatDir := self classCategoryDirFor: cls theNonMetaClass category.\n\tfileName := self fileNameForClass: cls.\n\t(catDir fileExists: fileName) ifTrue: [\n\t\tf := catDir fileNamed: fileName.\n\t\tf setToEnd.\n\t] ifFalse: [\n\t\tf := catDir newFileNamed: fileName.\t\t\t\t\t\t\t\t\t\t\n\t].\n\n\t(f respondsTo: #lineEndConvention:) ifTrue: [\n\t\tf lineEndConvention: #lf.\n\t].\n\n\tblk value: f.\n\tf close.! !\n\n!OneFilePerClass methodsFor: 'saving' stamp: 'ads 12/14/2010 14:16'!\nsaveAllExtensionMethodsForPackage: p\n\tp extensionClasses asArray do: [:cls |\n\t\tself newFileForClass: cls do: [:f |\n\t\t\t(p extensionCategoriesForClass: cls) do: [:cat |\n\t\t\t\tcls fileOutCategory: cat on: f moveSource: false toFile: 0.\n\t\t\t].\n\t\t].\n\t] displayingProgress: 'Saving ', p name, ' extension methods'.! !\n\n!OneFilePerClass methodsFor: 'saving' stamp: 'ads 12/14/2010 10:33'!\nsaveClass: class forPackage: p\n\tself newFileForClass: class do: [:f |\n\t\tclass fileOutOn: f moveSource: false toFile: 0 filteringCategoriesBy: [:cat :classOrMetaclass | p includesMethodCategory: cat ofClass: classOrMetaclass].\n\t].! !\n\n!OpaqueForm methodsFor: 'private' stamp: 'ssa 8/21/2009 20:42'!\ncolormapIfNeededFor: df\n\n\t^self colorForm colormapIfNeededFor: df! !\n\n!OpaqueForm methodsFor: 'private' stamp: 'ssa 8/22/2009 13:50'!\nsetFigure: figureForm shape: shapeForm\n\t\"Initialize the instance variables.\"\n\n\t| figure shape |\n\tfigure _ figureForm.\n\tshape _ ColorForm mappingWhiteToTransparentFrom:( shapeForm asFormOfDepth: 8).\n\tfigure displayOn: shape at: 0@0 clippingBox: figure boundingBox rule: Form paint fillColor: nil.\n\tself colorForm: shape! !\n\n!OpaqueForm methodsFor: 'display box access' stamp: 'ssa 8/21/2009 20:28'!\ncomputeBoundingBox\n\t\"Answer the minimum enclosing rectangle around the image.\"\n\n\t^self colorForm boundingBox! !\n\n!OpaqueForm methodsFor: 'accessing' stamp: 'ssa 8/21/2009 20:44'!\ncolorForm\n\t\"Answer the value of colorForm\"\n\n\tself! !\n\n!OpaqueForm methodsFor: 'accessing' stamp: 'ssa 8/21/2009 20:44'!\ncolorForm: anObject\n\t\"Set the value of colorForm\"\n\n\tself become: anObject! !\n\n!OpaqueForm methodsFor: 'accessing' stamp: 'ssa 8/21/2009 20:31'!\nfigure\n\t\"Answer the visible image of the receiver.\"\n\n\t^ self colorForm! !\n\n!OpaqueForm methodsFor: 'accessing' stamp: 'ssa 8/21/2009 20:31'!\noffset\n\t\"Answer the offset for displaying the image.\"\n\n\t^ self figure offset! !\n\n!OpaqueForm methodsFor: 'accessing' stamp: 'ssa 8/21/2009 20:31'!\nshape\n\t\"Answer the form that indicates what part of the background should \n\tget occluded in displaying the receiver.\"\n\n\t^ self colorForm! !\n\n!OpaqueForm methodsFor: 'accessing' stamp: 'ssa 8/21/2009 20:34'!\nvalueAt: aPoint \n\t\"Answer the bit of the form image at position aPoint.  The value is\n\teither 0, 1 or 2 where 0 is white, 1 is black,  2 is transparent.\"\n\n\t(self colorForm isTransparentAt: aPoint) ifTrue:[^2].\n\t^(self colorAt: aPoint) isBlack ifTrue:[1]ifFalse:[0]! !\n\n!OpaqueForm methodsFor: 'accessing' stamp: 'ssa 8/21/2009 20:37'!\nvalueAt: aPoint put: value\n\t\"Store a bit of the form image at position aPoint.  The value is\n\teither 0, 1 or 2 where 0 is white, 1 is black,  2 is transparent.\"\n\n\t(1 - (value//2)) = 2 ifTrue:[self colorForm colorAt: aPoint put: Color transparent]\n\t\tifFalse:[value\\\\2 = 0 ifTrue:[self colorForm colorAt: aPoint put: Color white]\n\t\t\tifFalse:[self colorForm colorAt: aPoint put: Color black]]! !\n\n!OpaqueForm methodsFor: 'displaying' stamp: 'ssa 9/2/2009 09:30'!\ndisplayOn: aDisplayMedium at: aDisplayPoint clippingBox: clipRectangle rule: ruleInteger fillColor: aColor\n\t\"Display the receiver on the display medium aDisplayMedium positioned at aDisplayPoint within \n\tthe rectangle clipRectangle and with the rule, ruleInteger, and mask, aForm. \"\n\n\tself colorForm displayOn: aDisplayMedium at: aDisplayPoint clippingBox: clipRectangle rule: ruleInteger  fillColor: aColor! !\n\n!OpaqueForm methodsFor: 'displaying' stamp: 'ssa 8/21/2009 20:39'!\ndisplayOn: aDisplayMedium transformation: displayTransformation clippingBox:\nclipRectangle align: alignmentPoint with: relativePoint rule: ruleInteger fillColor: aColor\n\t\"See comment in Form.\"\n\n\tself colorForm displayOn: aDisplayMedium transformation: displayTransformation\nclippingBox: clipRectangle align: alignmentPoint with: relativePoint rule: Form\nunder fillColor: aColor! !\n\n!OpaqueForm methodsFor: 'printing' stamp: 'ssa 8/21/2009 20:40'!\nstoreOn: aStream\n\t\"Append to the argument aStream a sequence of characters that is an expression \n\twhose evaluation creates an object similar to the receiver.  The general format\n\tfor OpaqueForm is\n\t\tOpaqueForm figure: ( figure ) shape: ( shape ).\"\n\n\taStream nextPutAll: '(OpaqueForm colorForm: ('.\n\tself colorForm storeOn: aStream.\n\taStream nextPutAll: '))'! !\n\n!OpaqueForm methodsFor: 'editing'!\nbitEdit\n\t\"Create and schedule a view located in an area designated by the user that\n\tcontains a view of the receiver magnified by 8@8 that can be modified\n\tusing the Bit Editor.  It also contains a view of the original form.\"\n\n\tBitEditor openOnForm: self\n\n\t\"OpaqueForm makeStar bitEdit.\"! !\n\n!OpaqueForm commentStamp: '<historical>' prior: 0!\nOpaqueForms include a shape as well as a figure form.  The shape indicates what part of the background should get occluded in displaying, so that patterns other than black in the figure form will still appear opaque.\n\nInstance Variables:\n\tfigure\t<Form> the actual image\n\tshape\t<Form> the mask for displaying!\n!OpaqueForm class methodsFor: 'examples' stamp: 'ssa 8/21/2009 20:41'!\nmakeStar\n\t\"Answer a new OpaqueForm in the shape of a five-pointed star\n\tfilled with black.\"\n\n\t\"OpaqueForm makeStar.\"\n\t\"OpaqueForm makeStar bitEdit\"\n\n\t| figure shape pen formRect |\n\tformRect_ 0@0 extent: 50@50.\n\tpen _ Pen new.\n\tpen defaultNib: 2.\n\tDisplay fill: formRect fillColor: Color white.\n\tpen north; place: formRect center; spiral: 45 angle: 144.\n\tshape _ Form fromDisplay: formRect.\n\tpen fillColor: Color white; north; place: formRect center; spiral: 30 angle: 144.\n\tfigure _ Form fromDisplay: formRect.\n\t^ OpaqueForm figure: figure shape: shape! !\n\n!OpaqueForm class methodsFor: 'examples'!\nstarCursor\n\t\"Make the cursor track a five-pointed star.\"\n\n\t\"OpaqueForm starCursor\"\n\n\tCursor blank showWhile:\n\t\t[self makeStar follow: [Sensor cursorPoint] while: [Sensor noButtonPressed]]! !\n\n!OpaqueForm class methodsFor: 'instance creation'!\nfigure: figureForm shape: shapeForm\n\t\"Answer a new instance of the receiver whose figure\n\tand shape forms are defined by the arguments.\"\n\n\t^ self new setFigure: figureForm shape: shapeForm! !\n\n!OpaqueForm class methodsFor: 'instance creation'!\nshape: aSolidForm\n\t\"Answer a new instance of the receiver that is black where aSolidForm is black\n\tand transparent where aSolidForm is white.\"\n\n\t^ self new setFigure: aSolidForm shape: aSolidForm! !\n\n!OrderedCollection methodsFor: 'accessing' stamp: 'ssa 9/14/2008 21:44'!\ninspectorClass\n\n\t^ OrderedCollectionInspector! !\n\n!OrderedCollection methodsFor: 'adding' stamp: 'ssa 9/9/2009 11:48'!\naddAll: aCollection  after: anObject\n\t\"Add each element of aCollection at my end. Answer aCollection.\"\n\n\t| after |\n\tafter _ anObject.\n\taCollection do:[:each| self add: each after: after.\n\t\tafter _ each].\n\t^aCollection! !\n\n!OrderedCollectionWithNilDetector methodsFor: 'adding' stamp: 'ssa 11/24/2009 19:54'!\nadd: newObject\n\n\tnewObject ifNil:[self halt:'trying to add nil'].\n\t^super add: newObject! !\n\n!OrderedCollectionWithNilDetector methodsFor: 'adding' stamp: 'ssa 11/24/2009 19:56'!\naddAll: aCollection \n\t\"Add each element of aCollection at my end. Answer\taCollection.\"\n(aCollection includes: nil) ifTrue:[self halt:'trying to add nil'].\n\t^ super addAll: aCollection! !\n\n!OrderedCollectionWithNilDetector methodsFor: 'adding' stamp: 'ssa 11/24/2009 19:57'!\ninsert: anObject before: spot\n\n\tanObject ifNil:[self halt:'trying to add nil'].\n\t^super insert: anObject before: spot! !\n\n!PackageDependencyTest methodsFor: 'test utility' stamp: 'Alexandre Bergel 5/22/2010 15:38'!\ndependenciesOfPackageNamed: pkgNameAsString\n\t| deps classes |\n\tclasses := self referencesInPackageNamed: pkgNameAsString.\n\n\tdeps := Dictionary new.\n\tclasses\n\t\tdo: [:aClass | \n\t\t\t| pkg |\n\t\t\tpkg := PackageOrganizer default\n\t\t\t\t\t\tpackageOfClass: aClass\n\t\t\t\t\t\tifNone: [].\n\t\t\tpkg\n\t\t\t\tifNil: [Transcript cr; show: 'WARNING: No package for ' , pkg]\n\t\t\t\tifNotNil: [(deps\n\t\t\t\t\t\t\tat: pkg packageName\n\t\t\t\t\t\t\tifAbsentPut: [OrderedCollection new])\n\t\t\t\t\t\t  add: aClass]].\n\tdeps\n\t\tremoveKey: pkgNameAsString\n\t\tifAbsent: [].\n\t^ deps! !\n\n!PackageDependencyTest methodsFor: 'test utility' stamp: 'Alexandre Bergel 5/22/2010 15:47'!\nreferencesInClass: aClass\n\t| classes |\n\tclasses := IdentitySet new.\n\taClass isTrait\n\t\tifFalse: [ classes add: aClass superclass ].\n\t\n\t\"The following line is wrong because methods may be defined in a different package\"\n\t\"aClass methods do: [ :cm | classes addAll: (self referencesInCompiledMethod: cm) ].\"\n\t^ classes! !\n\n!PackageDependencyTest methodsFor: 'test utility' stamp: 'Alexandre Bergel 5/22/2010 15:32'!\nreferencesInCompiledMethod: aCompiledMethod\n\t| classes |\n\tclasses := IdentitySet new.\n\t1\n\t\tto: aCompiledMethod numLiterals\n\t\tdo: [:i | | lit | ((lit := aCompiledMethod literalAt: i) isVariableBinding\n\t\t\t\t\t\t\tand: [  lit value isBehavior ])\n\t\t\t\t\t\tifTrue: [classes add: lit value ]].\n\t^ classes! !\n\n!PackageDependencyTest methodsFor: 'test utility' stamp: 'Alexandre Bergel 5/22/2010 15:43'!\nreferencesInPackage: aPackageInfo\n\t| classes |\n\tclasses := IdentitySet new.\n\taPackageInfo classes do: [ :cls | classes addAll: (self referencesInClass: cls) ].\n\taPackageInfo methods do: [ :mr | classes addAll: (self referencesInCompiledMethod: mr compiledMethod )].\n\t^ classes! !\n\n!PackageDependencyTest methodsFor: 'test utility' stamp: 'Alexandre Bergel 5/22/2010 15:33'!\nreferencesInPackageNamed: pkgNameAsString\n\t| pi |\n\tpi := PackageOrganizer default\n\t\t\t\tpackageNamed: pkgNameAsString\n\t\t\t\tifAbsent: [^ self].\n\n\t^ self referencesInPackage: pi! !\n\n!PackageDependencyTest methodsFor: 'test utility' stamp: 'StephaneDucasse 9/9/2010 14:50'!\ntestPackage: pkgName dependsExactlyOn: pkgList\n\t\"Ensure that the package with the given name depends only on the packages in pkgList.\n\tNOTE: If you use this for fixing dependencies, classDeps includes the classes\n\tand users from the package(s) not declared as dependents. Basically, you need\n\tto fix all the references in classDeps to make the test pass.\"\n\t\n\t| classDeps pi pkgDeps |\n\tclassDeps := IdentityDictionary new.\n\tpi := PackageOrganizer default packageNamed: pkgName ifAbsent:[^self]. \"unloaded\"\n\tpi classes do: [ :pkgClass | \n\t\t(classDeps at: (pkgClass superclass ifNil: [ProtoObject]) \n\t\t\tifAbsentPut:[OrderedCollection new]) add: pkgClass name, ' superclass'.].\n\tpi methods do: [ :mref | | cm |\n\t\tcm := mref compiledMethod.\n\t\t1 to: cm numLiterals do: [ :i | | lit |\n\t\t\t((lit := cm literalAt: i) isVariableBinding \n\t\t\t\tand:[lit value isBehavior]) ifTrue:[(classDeps at: lit value ifAbsentPut:[OrderedCollection new]) add: cm methodClass asString, '>>', cm selector]]].\n\tpkgDeps := Dictionary new.\n\tclassDeps keys do: [ :aClass | | pkg |\n\t\tpkg := PackageOrganizer default packageOfClass: aClass ifNone:[nil].\n\t\tpkg ifNil: [\n\t\t\t\tTranscript cr; show: 'WARNING: No package for ', aClass.\n\t\t\t\t(classDeps removeKey: aClass) do:[:each| Transcript crtab; show: each]] \n\t\t\tifNotNil: [(pkgDeps at: pkg name ifAbsentPut:[OrderedCollection new]) add: aClass]].\n\t(pkgDeps removeKey: pkgName ifAbsent: [#()]) \n\t\tdo: [ :aClass | classDeps removeKey: aClass ifAbsent: []].\n\tpkgList do: [ :pkg |\n\t\tself assert: (pkgDeps includesKey: pkg) description: pkgName, ' no longer depends on ', pkg.\n\t\t(pkgDeps removeKey: pkg ifAbsent: [#()]) \n\t\t\tdo: [ :aClass | classDeps removeKey: aClass ifAbsent:[]]].\n\t\t\n\tclassDeps keysAndValuesDo: [ :class :deps |\n\t\tTranscript cr; show: class name, ' dependencies:'.\n\t\tdeps do: [ :each | Transcript crtab; show: each]].\n\tself assert: pkgDeps isEmpty\n\t\tdescription: pkgName, ' now depends on ', pkgDeps.\n! !\n\n!PackageDependencyTest methodsFor: 'test utility' stamp: 'Alexandre Bergel 5/22/2010 15:36'!\ntestPackage: pkgName dependsOnlyOn: pkgList \n\t\"Ensure that the package with the given name depends only on the\n\tpackages in pkgList\"\n\t| classes pi deps |\n\t\n\tdeps := self dependenciesOfPackageNamed: pkgName.\n\n\tpkgList\n\t\tdo: [:pkg | \n\t\t\tself\n\t\t\t\tassert: (deps includesKey: pkg).\n\t\t\tdeps removeKey: pkg].\n\n\tself assert: deps isEmpty! !\n\n!PackageInfo methodsFor: 'testing' stamp: 'avi 3/9/2004 15:53'!\ncategory: categoryName matches: prefix\n\t^ categoryName notNil and: [categoryName = prefix or: [categoryName beginsWith: prefix, '-']]! !\n\n!PackageInfo methodsFor: 'testing' stamp: 'ab 11/13/2002 01:18'!\ncoreCategoriesForClass: aClass\n\t^ aClass organization categories select: [:cat | (self isForeignClassExtension: cat) not]! !\n\n!PackageInfo methodsFor: 'testing' stamp: 'ab 11/13/2002 01:22'!\ncoreMethodsForClass: aClass\n\t^ (aClass selectors difference:\n\t\t((self foreignExtensionMethodsForClass: aClass) collect: [:r | r methodSymbol]))\n\t\t\tasArray collect: [:sel | self referenceForMethod: sel ofClass: aClass]! !\n\n!PackageInfo methodsFor: 'testing' stamp: 'ab 11/13/2002 01:20'!\nextensionCategoriesForClass: aClass\n\t^ aClass organization categories select: [:cat | self isYourClassExtension: cat]! !\n\n!PackageInfo methodsFor: 'testing' stamp: 'avi 4/6/2004 15:16'!\nextensionMethodsForClass: aClass\n\t^ (self extensionCategoriesForClass: aClass)\n\t\tgather: [:cat | ((aClass organization listAtCategoryNamed: cat) ifNil: [#()])\n\t\t\t\t\t\t\tcollect: [:sel | self referenceForMethod: sel ofClass: aClass]]! !\n\n!PackageInfo methodsFor: 'testing' stamp: 'dvf 10/18/2002 23:22'!\nextensionMethodsFromClasses: classes\n\t^classes\n\t\tgather: [:class | self extensionMethodsForClass: class]! !\n\n!PackageInfo methodsFor: 'testing' stamp: 'ab 11/13/2002 01:22'!\nforeignExtensionCategoriesForClass: aClass\n\t^ aClass organization categories select: [:cat | self isForeignClassExtension: cat]! !\n\n!PackageInfo methodsFor: 'testing' stamp: 'ab 11/13/2002 01:23'!\nforeignExtensionMethodsForClass: aClass\n\t^ (self foreignExtensionCategoriesForClass: aClass)\n\t\tgather: [:cat | (aClass organization listAtCategoryNamed: cat)\n\t\t\t\t\t\t  collect: [:sel | self referenceForMethod: sel ofClass: aClass]]! !\n\n!PackageInfo methodsFor: 'testing' stamp: 'ab 11/13/2002 01:23'!\nincludesClass: aClass\n\t^ self includesSystemCategory: aClass theNonMetaClass category! !\n\n!PackageInfo methodsFor: 'testing' stamp: 'dvf 7/23/2003 14:08'!\nincludesClassNamed: aClassName\n\t^ self includesSystemCategory: ((SystemOrganization categoryOfElement: aClassName) ifNil: [^false])! !\n\n!PackageInfo methodsFor: 'testing' stamp: 'ab 12/5/2002 00:16'!\nincludesMethod: aSymbol ofClass: aClass\n\taClass ifNil: [^ false].\n\t^ self\n\t\tincludesMethodCategory: ((aClass organization categoryOfElement: aSymbol)\n\t\t\t\t\t\t\t\t\t\tifNil: [' '])\n\t\tofClass: aClass! !\n\n!PackageInfo methodsFor: 'testing' stamp: 'dvf 9/17/2002 00:18'!\nincludesMethodCategory: categoryName ofClass: aClass\n\t^ (self isYourClassExtension: categoryName)\n\t\tor: [(self includesClass: aClass)\n\t\t\t\tand: [(self isForeignClassExtension: categoryName) not]]! !\n\n!PackageInfo methodsFor: 'testing' stamp: 'dvf 7/23/2003 14:06'!\nincludesMethodCategory: categoryName ofClassNamed: aClass\n\t^ (self isYourClassExtension: categoryName)\n\t\tor: [(self includesClassNamed: aClass)\n\t\t\t\tand: [(self isForeignClassExtension: categoryName) not]]! !\n\n!PackageInfo methodsFor: 'testing' stamp: 'ab 11/14/2002 18:06'!\nincludesMethodReference: aMethodRef\n\t^ self includesMethod: aMethodRef methodSymbol ofClass: aMethodRef actualClass! !\n\n!PackageInfo methodsFor: 'testing' stamp: 'ab 11/13/2002 01:23'!\nincludesSystemCategory: categoryName\n\t^ self category: categoryName matches: self systemCategoryPrefix! !\n\n!PackageInfo methodsFor: 'testing' stamp: 'ab 11/13/2002 01:23'!\nisForeignClassExtension: categoryName\n\t^ categoryName first = $* and: [(self isYourClassExtension: categoryName) not]! !\n\n!PackageInfo methodsFor: 'testing' stamp: 'avi 11/10/2003 15:42'!\nisOverrideMethod: aMethodReference\n\t^ aMethodReference category endsWith: '-override'! !\n\n!PackageInfo methodsFor: 'testing' stamp: 'avi 3/10/2004 12:37'!\nisYourClassExtension: categoryName\n\t^ categoryName notNil and: [self category: categoryName asLowercase matches: self methodCategoryPrefix]! !\n\n!PackageInfo methodsFor: 'testing' stamp: 'dvf 10/18/2002 23:22'!\noutsideClasses\n\t^ProtoObject withAllSubclasses difference: self classesAndMetaClasses! !\n\n!PackageInfo methodsFor: 'testing' stamp: 'ab 11/13/2002 01:25'!\nreferenceForMethod: aSymbol ofClass: aClass\n\t^ MethodReference new setStandardClass: aClass methodSymbol: aSymbol! !\n\n!PackageInfo methodsFor: 'naming' stamp: 'ab 10/17/2002 00:05'!\ncategoryName\n\t|category|\n\tcategory _ self class category.\n\t^ (category endsWith: '-Info')\n\t\tifTrue: [category copyUpToLast: $-]\n\t\tifFalse: [category]! !\n\n!PackageInfo methodsFor: 'naming' stamp: 'ab 10/16/2002 21:22'!\nexternalName\n\t^ self packageName! !\n\n!PackageInfo methodsFor: 'naming' stamp: 'ab 6/10/2003 17:21'!\nmethodCategoryPrefix\n\t^ methodCategoryPrefix ifNil: [methodCategoryPrefix _ '*', self packageName asLowercase]! !\n\n!PackageInfo methodsFor: 'naming' stamp: 'ab 10/16/2002 16:57'!\npackageName\n\t^ packageName ifNil: [packageName _ self categoryName]! !\n\n!PackageInfo methodsFor: 'naming' stamp: 'ab 10/16/2002 16:56'!\npackageName: aString\n\tpackageName _ aString! !\n\n!PackageInfo methodsFor: 'naming' stamp: 'ab 10/28/2002 10:38'!\nsystemCategoryPrefix\n\t^ self packageName! !\n\n!PackageInfo methodsFor: 'listing' stamp: 'ac 5/14/2003 16:23'!\nclasses\n\t^(self systemCategories gather:\n\t\t[:cat |\n\t\t(SystemOrganization listAtCategoryNamed: cat)\n\t\t\tcollect: [:className | Smalltalk at: className]])\n\t\t\t\tsortBy: [:a :b | a className <= b className]! !\n\n!PackageInfo methodsFor: 'listing' stamp: 'dvf 9/17/2002 00:56'!\nclassesAndMetaClasses\n\t| baseClasses |\n\tbaseClasses := self classes.\n\t^baseClasses , (baseClasses collect: [:c | c class])! !\n\n!PackageInfo methodsFor: 'listing' stamp: 'ab 11/13/2002 01:23'!\ncoreMethods\n\t^ self classesAndMetaClasses gather: [:class | self coreMethodsForClass: class]! !\n\n!PackageInfo methodsFor: 'listing' stamp: 'cwp 3/17/2004 21:32'!\nextensionClasses\n\t^ self externalClasses reject: [:class | (self extensionCategoriesForClass: class) isEmpty]! !\n\n!PackageInfo methodsFor: 'listing' stamp: 'ab 6/10/2003 17:12'!\nextensionMethods\n\t^ self externalClasses gather: [:class | self extensionMethodsForClass: class]! !\n\n!PackageInfo methodsFor: 'listing' stamp: 'ab 12/3/2002 14:38'!\nforeignClasses\n\t| s |\n\ts _ IdentitySet new.\n\tself foreignSystemCategories\n\t\tdo: [:c | (SystemOrganization listAtCategoryNamed: c)\n\t\t\t\tdo: [:cl | \n\t\t\t\t\t| cls | \n\t\t\t\t\tcls _ Smalltalk at: cl. \n\t\t\t\t\ts add: cls;\n\t\t\t\t\t  add: cls class]].\n\t^ s! !\n\n!PackageInfo methodsFor: 'listing' stamp: 'ab 12/3/2002 14:34'!\nforeignSystemCategories\n\t^ SystemOrganization categories\n\t\treject: [:cat | self includesSystemCategory: cat] ! !\n\n!PackageInfo methodsFor: 'listing' stamp: 'ab 7/6/2003 21:49'!\nmethods\n\t^ (self extensionMethods, self coreMethods)\n\t\tselect: [:method | method isValid and: [(#(DoIt DoItIn:) includes: method methodSymbol) not]]! !\n\n!PackageInfo methodsFor: 'listing' stamp: 'avi 11/10/2003 15:35'!\noverrideMethods\n\t^ self extensionMethods select: [:ea | self isOvverideMethod: ea]! !\n\n!PackageInfo methodsFor: 'listing' stamp: 'ab 11/14/2002 18:39'!\nselectors\n\t^ self methods collect: [:ea | ea methodSymbol]! !\n\n!PackageInfo methodsFor: 'listing' stamp: 'ab 11/11/2002 21:51'!\nsystemCategories\n\t^ SystemOrganization categories select: [:cat | self includesSystemCategory: cat]! !\n\n!PackageInfo methodsFor: 'dependencies' stamp: 'ab 11/18/2002 01:16'!\nexternalCallers\n\t^ self \n\t\texternalRefsSelect: [:literal | literal isKindOf: Symbol] \n\t\tthenCollect: [:l | l].! !\n\n!PackageInfo methodsFor: 'dependencies' stamp: 'ab 6/10/2003 17:18'!\nexternalClasses\n\t| myClasses |\n\tmyClasses _ self classesAndMetaClasses.\n\t^ Array streamContents:\n\t\t[:s |\n\t\tProtoObject withAllSubclassesDo:\n\t\t\t[:class |\n\t\t\t(myClasses includes: class) ifFalse: [s nextPut: class]]]! !\n\n!PackageInfo methodsFor: 'dependencies' stamp: 'avi 2/29/2004 13:38'!\nexternalRefsSelect: selBlock thenCollect: colBlock\n\t| pkgMethods dependents refs extMethods otherClasses otherMethods classNames |\n\n\tclassNames _ self classes collect: [:c | c name].\n\textMethods _ self extensionMethods collect: [:mr | mr methodSymbol].\n\totherClasses _ self externalClasses difference: self externalSubclasses.\n\totherMethods _  otherClasses gather: [:c | c selectors].\n\tpkgMethods _ self methods asSet collect: [:mr | mr methodSymbol].\n\tpkgMethods removeAllFoundIn: otherMethods.\n\n\tdependents _ Set new.\n\totherClasses do: [:c |\n\t\tc selectorsAndMethodsDo:\n\t\t\t[:sel :compiled |\n\t\t\t(extMethods includes: sel) ifFalse: \n\t\t\t\t[refs _ compiled literals select: selBlock thenCollect: colBlock.\n\t\t\t\trefs do: [:ea |\n\t\t\t\t\t((classNames includes: ea) or: [pkgMethods includes: ea])\n\t\t\t\t\t\t\tifTrue: [dependents add: (self referenceForMethod: sel ofClass: c) -> ea]]]]].\n\t^ dependents! !\n\n!PackageInfo methodsFor: 'dependencies' stamp: 'cwp 11/13/2002 00:24'!\nexternalSubclasses\n\t| pkgClasses subClasses |\n\tpkgClasses _ self classes.\n\tsubClasses _ Set new.\n\tpkgClasses do: [:c | subClasses addAll: (c allSubclasses)].\n\t^ subClasses difference: pkgClasses\n! !\n\n!PackageInfo methodsFor: 'dependencies' stamp: 'ab 11/18/2002 01:15'!\nexternalUsers\n\t^ self \n\t\texternalRefsSelect: [:literal | literal isVariableBinding] \n\t\tthenCollect: [:l | l key]! !\n\n!PackageInfo methodsFor: 'modifying' stamp: 'avi 10/13/2003 15:40'!\naddCoreMethod: aMethodReference\n\t| category |\n\tcategory _ self baseCategoryOfMethod: aMethodReference.\n\taMethodReference actualClass organization\n\t\tclassify: aMethodReference methodSymbol\n\t\tunder: category\n\t\tsuppressIfDefault: false! !\n\n!PackageInfo methodsFor: 'modifying' stamp: 'avi 10/11/2003 15:17'!\naddExtensionMethod: aMethodReference\n\t| category |\n\tcategory _ self baseCategoryOfMethod: aMethodReference.\n\taMethodReference actualClass organization\n\t\tclassify: aMethodReference methodSymbol\n\t\tunder: self methodCategoryPrefix, '-', category! !\n\n!PackageInfo methodsFor: 'modifying' stamp: 'avi 10/11/2003 15:16'!\naddMethod: aMethodReference\n\t(self includesClass: aMethodReference class)\n\t\tifTrue: [self addCoreMethod: aMethodReference]\n\t\tifFalse: [self addExtensionMethod: aMethodReference]! !\n\n!PackageInfo methodsFor: 'modifying' stamp: 'avi 10/13/2003 15:39'!\nbaseCategoryOfMethod: aMethodReference\n\t| oldCat oldPrefix tokens | \n\toldCat _ aMethodReference category.\n\t({ 'as yet unclassified'. 'all' } includes: oldCat) ifTrue: [ oldCat _ '' ].\n\ttokens _ oldCat findTokens: '*-' keep: '*'.\n\n\t\"Strip off any old prefixes\"\n\t((tokens at: 1 ifAbsent: [ '' ]) = '*') ifTrue: [\n\t\t[ ((tokens at: 1 ifAbsent: [ '' ]) = '*') ]\n\t\t\twhileTrue: [ tokens removeFirst ].\n\t\toldPrefix _ tokens removeFirst asLowercase.\n\t\t[ (tokens at: 1 ifAbsent: [ '' ]) asLowercase = oldPrefix ]\n\t\t\twhileTrue: [ tokens removeFirst ].\n\t].\n\n\ttokens isEmpty ifTrue: [^ 'as yet unclassified'].\n\t^ String streamContents:\n\t\t[ :s |\n\t\ttokens\n\t\t\tdo: [ :tok | s nextPutAll: tok ]\n\t\t\tseparatedBy: [ s nextPut: $- ]]! !\n\n!PackageInfo methodsFor: 'modifying' stamp: 'avi 10/11/2003 15:14'!\nremoveMethod: aMethodReference! !\n\n!PackageInfo methodsFor: 'removing' stamp: 'ads 1/30/2011 10:40'!\nremoveFromSystem\n\t| extensionCategoriesByClass classes systemCategories |\n\t\"Get the collections of classes and methods before actually doing the removal, so that removing the PackageInfo package will work.\"\n\textensionCategoriesByClass := Dictionary new.\n\tself extensionClasses do: [:cls | extensionCategoriesByClass at: cls put: (self extensionCategoriesForClass: cls)].\n\tclasses := self classes.\n\tsystemCategories := self systemCategories.\n\textensionCategoriesByClass keysAndValuesDo: [:cls :cats | cats do: [:cat | cls removeCategory: cat]].\n\tclasses do: [:cls | cls removeFromSystem].\n\tsystemCategories do: [:cat | (SystemOrganization listAtCategoryNamed: cat) isEmpty ifTrue: [SystemOrganization removeCategory: cat]].\n! !\n\n!PackageInfo methodsFor: 'comparing' stamp: 'avi 10/11/2003 00:09'!\n= other\n\t^ other species = self species and: [other packageName = self packageName]! !\n\n!PackageInfo methodsFor: 'comparing' stamp: 'avi 10/11/2003 14:20'!\nhash\n\t^ packageName hash! !\n\n!PackageInfo methodsFor: '*transporter' stamp: 'ads 12/5/2010 23:40'!\n, p\n\t^ CompositePackageInfo new\n\t\tpackages: {self. p};\n\t\tyourself! !\n\n!PackageInfo methodsFor: '*transporter' stamp: 'ads 1/26/2011 14:13'!\nincludesPackage: p\n\t^ self = p! !\n\n!PackageInfo methodsFor: '*transporter' stamp: 'ads 12/10/2010 12:05'!\nname\n\t^ self packageName! !\n\n!PackageInfo methodsFor: '*transporter' stamp: 'ads 1/26/2011 13:38'!\nprintOn: aStream\n\taStream nextPutAll: self packageName.! !\n\n!PackageInfo methodsFor: '*transporter' stamp: 'ads 1/26/2011 16:15'!\nrevertToVersionBeforeTeam: team\n\tself extensionMethods do: [:m | team revertToOldVersionOrRemove: m].\n\tself classes do: [:cls | cls removeFromSystem].\n\tself systemCategories do: [:cat | SystemOrganization removeCategoryIfEmpty: cat].\n! !\n\n!PackageInfo commentStamp: '<historical>' prior: 0!\nSubclass this class to create new Packages.!\n!PackageInfo class methodsFor: 'packages access' stamp: 'avi 11/12/2003 23:00'!\nnamed: aString\n\t^ self new packageName: aString! !\n\n!PackageInfo class methodsFor: 'class initialization' stamp: 'avi 2/18/2004 00:46'!\ninitialize\n\tself allSubclassesDo: [:ea | ea new register]! !\n\n!PackageInfo class methodsFor: 'compatibility' stamp: 'avi 3/9/2004 16:28'!\ndefault\n\t^ self allPackages detect: [:ea | ea class = self] ifNone: [self new register]! !\n\n!PackageWhoseContentsMustBeTransportedInOrder methodsFor: 'accessing' stamp: 'ads 1/24/2011 17:31'!\nclassesToBeRedefined\n\t| classNames |\n\tclassNames := Set new.\n\tself trickyModificationsThatNeedToBeDoneInOrder do: [:a |\n\t\ta size = 1 ifTrue: [classNames add: a first].\n\t].\n\t^ classNames collect: [:className | Smalltalk at: className asSymbol]! !\n\n!PackageWhoseContentsMustBeTransportedInOrder methodsFor: 'accessing' stamp: 'ads 1/24/2011 15:24'!\nextensionClasses\n\t| classes |\n\tclasses := Set new.\n\tself extensionMethods do: [:m | classes add: m actualClass].\n\t^ classes! !\n\n!PackageWhoseContentsMustBeTransportedInOrder methodsFor: 'accessing' stamp: 'ads 1/24/2011 17:32'!\nextensionMethods\n\t| result |\n\tresult := Set new.\n\tself trickyModificationsThatNeedToBeDoneInOrder do: [:a |\n\t\ta size = 2 ifTrue: [result add: ((Smalltalk classNamed: a first) methodNamed: a second)].\n\t].\n\t^ result! !\n\n!PackageWhoseContentsMustBeTransportedInOrder methodsFor: 'accessing' stamp: 'ads 1/24/2011 14:11'!\nname\n\t^ self class name! !\n\n!PackageWhoseContentsMustBeTransportedInOrder methodsFor: 'accessing' stamp: 'sm 3/11/2011 23:13'!\ntrickyModificationsThatNeedToBeDoneInOrder: someDefinitions\n\ttrickyModificationsThatNeedToBeDoneInOrder := someDefinitions! !\n\n!PackageWhoseContentsMustBeTransportedInOrder methodsFor: 'comparing' stamp: 'ads 1/26/2011 13:36'!\n= other\n\t^ self species = other species! !\n\n!PackageWhoseContentsMustBeTransportedInOrder methodsFor: 'comparing' stamp: 'ads 1/26/2011 13:36'!\nhash\n\t^ self species hash! !\n\n!PackageWhoseContentsMustBeTransportedInOrder methodsFor: 'composing' stamp: 'ads 1/24/2011 15:11'!\n, p\n\t^ CompositePackageInfo new\n\t\tpackages: {self. p};\n\t\tyourself! !\n\n!PackageWhoseContentsMustBeTransportedInOrder methodsFor: 'composing' stamp: 'ads 1/26/2011 14:11'!\nincludesPackage: p\n\t^ self = p! !\n\n!PackageWhoseContentsMustBeTransportedInOrder methodsFor: 'testing' stamp: 'ads 1/24/2011 17:31'!\nincludesClass: aClass\n\t^ self classesToBeRedefined includes: aClass theNonMetaClass! !\n\n!PackageWhoseContentsMustBeTransportedInOrder methodsFor: 'testing' stamp: 'ads 1/24/2011 17:32'!\nincludesMethod: aSymbol ofClass: aClass\n\taClass ifNil: [^ false].\n\t^ self extensionMethods includes: (aClass methodNamed: aSymbol)! !\n\n!PackageWhoseContentsMustBeTransportedInOrder methodsFor: 'saving' stamp: 'ads 2/2/2011 15:46'!\nsaveClassAndMethodModificationsInOrder: classAndMethodSpecs on: aFileStream\n\tclassAndMethodSpecs do: [:spec | | class |\n\t\tclass := Smalltalk classNamed: (spec at: 1).\n\t\tspec size > 1 ifTrue: [ | selector |\n\t\t\tselector := (spec at: 2) asSymbol.\n\t\t\tclass methodDict at: selector ifAbsent: [self error: 'Could not find method named ', selector printString, ' in class ', class name].\n\t\t\tclass printMethodChunk: selector withPreamble: true on: aFileStream moveSource: false toFile: 0.\n\t\t] ifFalse: [\n\t\t\taFileStream nextChunkPut: class definition; cr.\n\t\t].\n\t] displayingProgress: 'Saving tricky stuff that needs to happen in order'.\n! !\n\n!PackageWhoseContentsMustBeTransportedInOrder methodsFor: 'saving' stamp: 'sm 3/11/2011 20:39'!\nsaveTrickyModificationsToFile: aFileStream\n\tself saveClassAndMethodModificationsInOrder: self trickyModificationsThatNeedToBeDoneInOrder on: aFileStream.! !\n\n!PackageWhoseContentsMustBeTransportedInOrder methodsFor: 'as yet unclassified' stamp: 'sm 3/11/2011 23:13'!\ntrickyModificationsThatNeedToBeDoneInOrder\n\t^ trickyModificationsThatNeedToBeDoneInOrder.! !\n\n!Paragraph methodsFor: 'accessing' stamp: 'dmu 4/1/2009 20:01'!\ndestFormSema: s destFormSema _ s! !\n\n!Paragraph methodsFor: 'converting' stamp: 'ssa 9/4/2009 10:44'!\nasForm\n\t\"Answer a Form made up of the bits that represent the receiver's displayable text.\"\n\t| theForm oldBackColor oldForeColor |\n\ttextStyle isTTCStyle ifTrue: [\n\t\ttheForm _  (Form extent: compositionRectangle extent depth: Display depth)\n\t\toffset: offset.\n\t] ifFalse: [\n\t\ttheForm _ (ColorForm extent: compositionRectangle extent)\n\t\t\toffset: offset;\n\t\t\tcolors: (Array\n\t\t\t\twith: (backColor == nil ifTrue: [Color transparent] ifFalse: [backColor])\n\t\t\t\twith: (foreColor == nil ifTrue: [Color black] ifFalse: [foreColor])).\n\t].\n\toldBackColor _ backColor.\n\toldForeColor _ foreColor.\n\tbackColor _ Color white.\n\tforeColor _ Color black.\n\tself displayOn: theForm\n\t\tat: 0@0\n\t\tclippingBox: theForm boundingBox\n\t\trule: Form over\n\t\tfillColor: nil.\n\tbackColor _ oldBackColor.\n\tforeColor _ oldForeColor.\n\t^ theForm\n\n\"Example:\n| p |\np _ 'Abc' asParagraph.\np foregroundColor: Color red backgroundColor: Color black.\np asForm displayOn: Display at: 30@30 rule: Form over\"\n! !\n\n!Paragraph methodsFor: 'private' stamp: 'dmu 4/1/2009 19:38'!\ncompositionRectangle: compositionRect text: aText style: aTextStyle offset: aPoint\n\n\tcompositionRectangle _ compositionRect copy.\n\ttext _ aText.\n\ttextStyle _ aTextStyle.\n\trule _ DefaultRule.\n\tmask _ nil.\t\t\"was DefaultMask \"\n\tmarginTabsLevel _ 0.\n\tdestFormSema _ Semaphore forMutualExclusion.\n\tself destinationForm: Display.\n\toffset _ aPoint.\n\t^self composeAll! !\n\n!Paragraph methodsFor: 'private' stamp: 'ssa 4/7/2009 12:39'!\ndisplayOn: aDisplayMedium lines: lineInterval\n\n\t| saveDestinationForm |\n\tdestFormSema isNil ifTrue:[self destFormSema: Semaphore forMutualExclusion].\n\tdestFormSema critical: [\n\t\tsaveDestinationForm _ destinationForm.\n\t\tself destinationForm: aDisplayMedium.\n\t\tself displayLines: lineInterval.\n\t\tdestinationForm _ saveDestinationForm\n\t]! !\n\n!ParagraphEditor methodsFor: 'controlling'!\ncontrolActivity\n        \"Hacked to supprt MSWScrollBarView - ssa 12/10/97 17:07\"\n        \n        self scrollBarContainsCursor\n                ifTrue: [(self view superView isKindOf: MSWScrollBarView)\n                                        ifFalse:[self scroll]]\n                ifFalse: [self processKeyboard.\n                                self processMouseButtons]! !\n\n!ParagraphEditor methodsFor: 'scrolling'!\nscrollView: anInteger \n        \"Paragraph scrolling uses opposite polarity\"\n        \"Adjusted to keep text from scrolling off the view - ssa 1/15/98 15:22.  The - 30 below is the hack to allow for some empty space to show at the bottom.\"\n        | maximumAmount minimumAmount amount |\n        maximumAmount _\n                paragraph clippingRectangle top -\n                paragraph compositionRectangle top  max: 0.\n        minimumAmount _\n                paragraph clippingRectangle bottom -\n                paragraph compositionRectangle bottom - 30 min: 0.\n        amount _\n                (anInteger min: maximumAmount) max:\n                minimumAmount.\n        ^ self scrollBy: amount negated! !\n\n!ParagraphEditor methodsFor: 'scrolling'!\nupdateMarker\n        \"Hacked to catch this scrolling 'event'.  ssa 12/5/97 16:22\"\n        \"A variation of computeMarkerRegion--only redisplay the marker in the scrollbar if an actual change has occurred in the positioning of the paragraph.\"\n        self moveMarkerTo: self computeMarkerRegion.\n\n                \"A hack to notify the MSWScrollBarController\"\n        (self view superView isKindOf: MSWScrollBarView)\n                ifTrue:[self view superView updateElevator]! !\n\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'ssa 9/15/2009 16:53'!\nadjustWidths\n\n\tself view topView adjustWidths! !\n\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'ssa 3/1/2010 11:41'!\nbrowseIt\n\t\"Launch a browser for the current selection, if appropriate\"\n\n\t| aSymbol anEntry brow |\n\n\tPreferences alternativeBrowseIt ifTrue: [^ self browseClassFromIt].\n\n\tself lineSelectAndEmptyCheck: [^ self].\n\t(aSymbol _ self selectedSymbol) isNil ifTrue: [^ view flash].\n\n\tself terminateAndInitializeAround:\n\t\t[aSymbol first isUppercase\n\t\t\tifTrue:\n\t\t\t\t[anEntry _ (Smalltalk\n\t\t\t\t\tat: aSymbol\n\t\t\t\t\tifAbsent:\n\t\t\t\t\t\t[ self systemNavigation browseAllImplementorsOf: aSymbol.\n\t\t\t\t\t\t^ nil]).\n\t\t\t\tanEntry isNil ifTrue: [^ view flash].\n\t\t\t\t(anEntry isKindOf: Class)\n\t\t\t\t\tifFalse:\t[anEntry _ anEntry class].\n\t\t\t\t\t[^ self browseClassFromIt]value.  \"<<<<<<<<<<<<<<<<<<  ssa added\"\n\t\t\t\tbrow _ Preferences browseToolClass new.\n\t\t\t\tbrow setClass: anEntry selector: nil.\n\t\t\t\tbrow class\n\t\t\t\t\topenBrowserView: (brow openEditString: nil)\n\t\t\t\t\tlabel: 'System Browser']\n\t\t\tifFalse:\n\t\t\t\t[ self systemNavigation browseAllImplementorsOf: aSymbol]]! !\n\n!ParagraphEditor methodsFor: 'menu messages' stamp: 'ssa 1/21/2010 16:27'!\nmethodSourceContainingIt\n\t\"Open a browser on methods which contain the current selection in their source (case-sensitive full-text search of source). \"\n\n\tself lineSelectAndEmptyCheck: [^ self].\n\t\n\tself systemNavigation browseMethodsWithSourceString: self selection string! !\n\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'ssa 1/6/2010 20:32'!\nexploreIt: characterStream \n\t\"Inspect the selection -- invoked via cmd-i.  If there is no current selection, use the current line.\"\n\n\tsensor keyboard.\t\t\"flush character\"\n\tself terminateAndInitializeAround: [self exploreIt].\n\t^ true! !\n\n!ParagraphEditor methodsFor: 'editing keys' stamp: 'ssa 6/1/2010 16:55'!\nprintIt: characterStream \n\t\"Print the results of evaluting the selection -- invoked via cmd-p.  If there is no current selection, use the current line.  1/17/96 sw\n\t 2/29/96 sw: don't call selectLine now, since it's called by doIt\"\n\n\tsensor keyboard.\t\t\"flush character\"\n\t\tself terminateAndInitializeAround: [self printIt].\n\t^ true! !\n\n!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'ssa 1/20/2010 11:06'!\ncursorDown: characterStream \n\n\t\"Private - Move cursor from position in current line to same position in\n\tnext line. If next line too short, put at end. If shift key down,\n\tselect.\"\n\tself closeTypeIn: characterStream.\n\tparagraph isEmpty ifTrue:[Sensor flushKeyboard.  ^true].\n\tself \n\t\tmoveCursor:[:position | self\n\t\t\t\tsameColumn: position\n\t\t\t\tnewLine:[:line | line + 1]\n\t\t\t\tforward: true]\n\t\tforward: true\n\t\tspecialBlock:[:dummy | dummy].\n\t^true! !\n\n!ParagraphEditor methodsFor: 'nonediting/nontyping keys' stamp: 'ssa 1/20/2010 11:05'!\ncursorUp: characterStream \n\n\"Private - Move cursor from position in current line to same position in\nprior line. If prior line too short, put at end\"\n\n\tself closeTypeIn: characterStream.\n\tparagraph isEmpty ifTrue:[Sensor flushKeyboard.  ^true].\n\tself\n\t\tmoveCursor: [:position | self\n\t\t\t\tsameColumn: position\n\t\t\t\tnewLine:[:line | line - 1]\n\t\t\t\tforward: false]\n\t\tforward: false\n\t\tspecialBlock:[:dummy | dummy].\n\t^true! !\n\n!ParagraphEditor methodsFor: 'private' stamp: 'ssa 1/20/2010 10:55'!\nsameColumn: start newLine: lineBlock forward: isForward\n\t\"Private - Compute the index in my text\n\twith the line number derived from lineBlock,\"\n\t\" a one argument block accepting the old line number.\n\tThe position inside the line will be preserved as good as possible\"\n\t\"The boolean isForward is used in the border case to determine if\n\twe should move to the beginning or the end of the line.\"\n\t| wordStyle column currentLine offsetAtTargetLine targetEOL lines numberOfLines currentLineNumber targetLineNumber |\n\twordStyle _ Preferences wordStyleCursorMovement.\n\twordStyle\n\t\tifTrue: [\n\t\t\tlines _ paragraph lines.\n\t\t\tnumberOfLines := paragraph numberOfLines.\n\t\t\tcurrentLineNumber  _ paragraph lineIndexOfCharacterIndex: start.\n\t\t\tcurrentLine _ lines at: (currentLineNumber max: 1)]\n\t\tifFalse: [\n\t\t\tlines _ self lines.\n\t\t\tnumberOfLines := lines size.\n\t\t\tcurrentLine _ lines\n\t\t\t\tdetect:[:lineInterval | lineInterval last >= start]\n\t\t\t\tifNone:[lines last].\n\t\t\tcurrentLineNumber _ currentLine second].\n\tcolumn _ start - currentLine first.\n\ttargetLineNumber _ ((lineBlock value: currentLineNumber) max: 1) min: numberOfLines.\n\toffsetAtTargetLine _ (lines at: targetLineNumber) first.\n\ttargetEOL _ (lines at: targetLineNumber) last + (targetLineNumber == numberOfLines ifTrue:[1]ifFalse:[0]).\n\ttargetLineNumber == currentLineNumber\n\t\"No movement or movement failed. Move to beginning or end of line.\"\n\t\tifTrue:[^isForward\n\t\t\tifTrue:[targetEOL]\n\t\t\tifFalse:[offsetAtTargetLine]].\n\t^offsetAtTargetLine + column min: targetEOL.! !\n\n!ParagraphEditor methodsFor: 'do-its' stamp: 'ssa 8/31/2009 10:30'!\ncompileSelectionFor: anObject in: evalContext\n\n\t| methodNode method |\n\tmethodNode _ [Compiler new\n\t\tcompileNoPattern: self selection\n\t\tin: anObject class\n\t\tcontext: evalContext\n\t\tnotifying: self\n\t\tifFail: [^nil]]\n\t\t\ton: OutOfScopeNotification\n\t\t\tdo: [:ex | ex resume: true].\n\tmethod _ methodNode generate: #(0 0 0 0).\n\t^method copyWithTempNames: methodNode tempNames! !\n\n!ParagraphEditor methodsFor: 'do-its' stamp: 'dmu 9/17/2010 12:00'!\ndebug: aCompiledMethod receiver: anObject in: evalContext\n\n\t| selector guineaPig debugger context |\n\tselector _ evalContext isNil ifTrue: [#DoIt] ifFalse: [#DoItIn:].\n\tanObject class addSelectorSilently: selector withMethod: aCompiledMethod.\n\tguineaPig _ evalContext isNil\n\t\tifTrue: [[anObject DoIt] newProcess]\n\t\tifFalse: [[anObject DoItIn: evalContext] newProcess].\n\tcontext _ guineaPig suspendedContextWaitingIfNecessary.\n\tdebugger _ Debugger new\n\t\tprocess: guineaPig\n\t\tcontroller: ((Smalltalk isMorphic not and: [ScheduledControllers inActiveControllerProcess])\n\t\t\t\tifTrue: [ScheduledControllers activeController]\n\t\t\t\tifFalse: [nil])\n\t\tcontext: context\n\t\tisolationHead: nil.\n\tdebugger openFullNoSuspendLabel: 'Debug it'.\n\t[debugger interruptedContext method == aCompiledMethod]\n\t\twhileFalse: [debugger send].\n\tanObject class basicRemoveSelector: selector! !\n\n!ParagraphEditor methodsFor: 'do-its' stamp: 'ssa 7/7/2010 12:32'!\ndebugIt\n \n\t| method receiver context |\n\t((Smalltalk includesKey: #Ly) and:[model isKindOf: (Smalltalk at: #LyWorkspace)]) ifTrue:[^model debug: self selection asString notifying:self].\n\t(model respondsTo: #doItReceiver) \n\t\tifTrue: \n\t\t\t[FakeClassPool adopt: model selectedClass.\n\t\t\treceiver _ model doItReceiver.\n\t\t\tcontext _ model doItContext]\n\t\tifFalse:\n\t\t\t[receiver _ context _ nil].\n\tself lineSelectAndEmptyCheck: [^self].\n\tmethod _ self compileSelectionFor: receiver in: context.\n\tmethod notNil ifTrue:\n\t\t[self debug: method receiver: receiver in: context].\n\tFakeClassPool adopt: nil! !\n\n!ParagraphEditor methodsFor: 'do-its' stamp: 'ssa 7/7/2010 12:32'!\nevaluate: someCode\n\t\"Treat the current selection as an expression; evaluate it and return the result\"\n\t| result rcvr ctxt |\n\tsomeCode isEmpty ifTrue:[^ ''].\n \n\t(model respondsTo: #doItReceiver) \n\t\tifTrue: [FakeClassPool adopt: model selectedClass.  \"Include model pool vars if any\"\n\t\t\t\trcvr _ model doItReceiver.\n\t\t\t\tctxt _ model doItContext]\n\t\tifFalse: [rcvr _ ctxt _ nil].\n\tresult _ [((Smalltalk includesKey: #Ly) and:[model isKindOf: (Smalltalk at: #LyWorkspace)]) ifTrue:[model evaluate: someCode notifying:self] ifFalse:[\n\t\trcvr class evaluatorClass new \n\t\t\tevaluate: someCode readStream\n\t\t\tin: ctxt\n\t\t\tto: rcvr\n\t\t\tnotifying: self\n\t\t\tifFail: [FakeClassPool adopt: nil. ^ #failedDoit]\n\t\t\tlogged: true].\n\t] \n\t\ton: OutOfScopeNotification \n\t\tdo: [ :ex | ex resume: true].\n\tFakeClassPool adopt: nil.\n\t^ result! !\n\n!ParagraphEditor methodsFor: 'do-its' stamp: 'ssa 7/7/2010 12:32'!\nevaluateSelection\n\t\"Treat the current selection as an expression; evaluate it and return the result\"\n\t| result rcvr ctxt |\n\tself lineSelectAndEmptyCheck: [^ ''].\n \n\t(model respondsTo: #doItReceiver) \n\t\tifTrue: [FakeClassPool adopt: model selectedClass.  \"Include model pool vars if any\"\n\t\t\t\trcvr _ model doItReceiver.\n\t\t\t\tctxt _ model doItContext]\n\t\tifFalse: [rcvr _ ctxt _ nil].\n\tresult _ [((Smalltalk includesKey: #Ly) and:[model isKindOf: (Smalltalk at: #LyWorkspace)]) ifTrue:[model evaluate: self selection asString notifying:self] ifFalse:[\n\t\trcvr class evaluatorClass new \n\t\t\tevaluate: self selectionAsStream\n\t\t\tin: ctxt\n\t\t\tto: rcvr\n\t\t\tnotifying: self\n\t\t\tifFail: [FakeClassPool adopt: nil. ^ #failedDoit]\n\t\t\tlogged: true].\n\t] \n\t\ton: OutOfScopeNotification \n\t\tdo: [ :ex | ex resume: true].\n\tFakeClassPool adopt: nil.\n\t^ result! !\n\n!ParagraphEditor methodsFor: 'do-its' stamp: 'ssa 7/7/2010 12:32'!\nexploreIt\n\t| result | \n\t((Smalltalk includesKey: #Ly) and:[model isKindOf: (Smalltalk at: #LyWorkspace)]) ifTrue:[^model exploreIt: self selection asString notifying:self].\n\tresult _ self evaluateSelection.\n\t((result isKindOf: FakeClassPool) or: [result == #failedDoit])\n\t\t\tifTrue: [view flash]\n\t\t\tifFalse: [result explore].\n! !\n\n!ParagraphEditor methodsFor: 'do-its' stamp: 'ssa 7/7/2010 12:32'!\ninspectIt\n\t\"1/13/96 sw: minor fixup\"\n\t| result |\n\t((Smalltalk includesKey: #Ly) and:[model isKindOf: (Smalltalk at: #LyWorkspace)]) ifTrue:[^model inspectIt: self selection asString notifying:self].\n\tresult _ self evaluateSelection.\n\t((result isKindOf: FakeClassPool) or: [result == #failedDoit])\n\t\t\tifTrue: [view flash]\n\t\t\tifFalse: [result inspect].\n! !\n\n!ParagraphEditor methodsFor: 'do-its' stamp: 'ssa 7/7/2010 12:33'!\ninstallAsTest\n\t| | \n\t((Smalltalk includesKey: #Ly) and:[model isKindOf: (Smalltalk at: #LyWorkspace)]) ifTrue:[^model installAsTest: self selection asString notifying:self].\n\tself halt:'not implemented for Squeak Workspaces yet'! !\n\n!ParagraphEditor methodsFor: 'do-its' stamp: 'ssa 7/7/2010 12:33'!\nparseIt\n \n\t((Smalltalk includesKey: #Ly) and:[model isKindOf: (Smalltalk at: #LyWorkspace)]) ifTrue:[^model parseAndExplore: self selection asString notifying:self].\n! !\n\n!ParagraphEditor methodsFor: 'do-its' stamp: 'ssa 7/7/2010 12:33'!\nprintIt\n\t\"Treat the current text selection as an expression; evaluate it. Insert the \n\tdescription of the result of evaluation after the selection and then make \n\tthis description the new text selection.\"\n\t| result |\n\t((Smalltalk includesKey: #Ly) and:[model isKindOf: (Smalltalk at: #LyWorkspace)]) ifTrue:[^model printIt: self selection asString notifying:self].\n\tresult _ self evaluateSelection.\n\t((result isKindOf: FakeClassPool) or: [result == #failedDoit])\n\t\t\tifTrue: [view flash]\n\t\t\tifFalse: [self afterSelectionInsertAndSelect: result printString]! !\n\n!ParagraphEditor methodsFor: '*RVM-UI-Generic' stamp: 'ssa 9/8/2009 19:09'!\nbuttonIt\n\t\"launch a button to evaluate the selection\"\n\t| topView someCode extent |\n\tsomeCode _ self selection.\n\textent _ (someCode asText asDisplayText extent + (30@20)) max: 80@30.\n\ttopView := RVMStandardSystemView new.\n\ttopView noLabel.\n\ttopView borderWidth:1.\n\ttopView minimumSize: extent .\n\ttopView maximumSize: extent.\n\t\n\ttopView addSubView: (RVMButtonView label: someCode action:[self evaluate: someCode]).\n\ttopView controller open! !\n\n!ParagraphEditor methodsFor: '*RVM-UI-Generic' stamp: 'ssa 9/8/2009 18:28'!\nbuttonIt: characterStream \n\t\"Called when user hits cmd-B.  make a button of the selection\"\n\n\tsensor keyboard.\t\n\tself buttonIt.\n\t^ true! !\n\n!ParagraphEditor class methodsFor: 'keyboard shortcut tables' stamp: 'ssa 1/29/2010 12:18'!\ninitializeCmdKeyShortcuts\n\t\"Initialize the (unshifted) command-key (or alt-key) shortcut table.\"\n\n\t\"NOTE: if you don't know what your keyboard generates, use Sensor kbdTest\"\n\n\t\"ParagraphEditor initialize\"\n\n\t| cmdMap cmds |\n\tcmdMap := Array new: 256 withAll: #noop:.\t\"use temp in case of a crash\"\n\tcmdMap at: 1 + 1 put: #cursorHome:.\t\"home key\"\n\tcmdMap at: 4 + 1 put: #cursorEnd:.\t\"end key\"\n\tcmdMap at: 8 + 1 put: #backspace:.\t\"ctrl-H or delete key\"\n\tcmdMap at: 11 + 1 put: #cursorPageUp:.\t\"page up key\"\n\tcmdMap at: 12 + 1 put: #cursorPageDown:.\t\"page down key\"\n\tcmdMap at: 13 + 1 put: #crWithIndent:.\t\"cmd-Return\"\n\tcmdMap at: 27 + 1 put: #offerMenuFromEsc:.\t\"escape key\"\n\tcmdMap at: 28 + 1 put: #cursorLeft:.\t\"left arrow key\"\n\tcmdMap at: 29 + 1 put: #cursorRight:.\t\"right arrow key\"\n\tcmdMap at: 30 + 1 put: #cursorUp:.\t\"up arrow key\"\n\tcmdMap at: 31 + 1 put: #cursorDown:.\t\"down arrow key\"\n\tcmdMap at: 32 + 1 put: #selectWord:.\t\"space bar key\"\n\tcmdMap at: 127 + 1 put: #forwardDelete:.\t\"del key\"\n\t'0123456789-=' \n\t\tdo: [:char | cmdMap at: char asciiValue + 1 put: #changeEmphasis:].\n\t'([{''\"<' do: [:char | cmdMap at: char asciiValue + 1 put: #enclose:].\n\tcmdMap at: $, asciiValue + 1 put: #shiftEnclose:.\n\tcmds := #($a #selectAll: $b #browseIt: $c #copySelection: $d #doIt: $e #exploreIt: $f #find: $g #findAgain: $h #setSearchString: $i #inspectIt: $j #doAgainOnce: $k #offerFontMenu: $l #cancel: $m #implementorsOfIt: $n #sendersOfIt: $o #spawnIt: $p #printIt: $q #querySymbol: $r #revert: $s #save: $S saveAs:: $t #tempCommand: $u #align: $v #paste: $w #backWord: $x #cut: $y #swapChars: $z #undo:).\n\t1 to: cmds size\n\t\tby: 2\n\t\tdo: [:i | cmdMap at: (cmds at: i) asciiValue + 1 put: (cmds at: i + 1)].\n\tCmdActions := cmdMap! !\n\n!ParagraphEditor class methodsFor: '*RVM-UI-Generic' stamp: 'ssa 2/9/2010 05:26'!\ninitializeShiftCmdKeyShortcuts \n\t\"Initialize the shift-command-key (or control-key) shortcut table.\"\n\t\"NOTE: if you don't know what your keyboard generates, use Sensor kbdTest\"\n\t\"wod 11/3/1998: Fix setting of cmdMap for shifted keys to actually use the \n\tcapitalized versions of the letters.\n\tTPR 2/18/99: add the plain ascii values back in for those VMs that don't return the shifted values.\"\n\n\t| cmdMap cmds |\n\n\t\"shift-command and control shortcuts\"\n\tcmdMap _ Array new: 256 withAll: #noop:.  \"use temp in case of a crash\"\n\tcmdMap at: ( 1 + 1) put: #cursorHome:.\t\t\t\"home key\"\n\tcmdMap at: ( 4 + 1) put: #cursorEnd:.\t\t\t\"end key\"\n\tcmdMap at: ( 8 + 1) put: #forwardDelete:.\t\t\"ctrl-H or delete key\"\n\tcmdMap at: (11 + 1) put: #cursorPageUp:.\t\t\"page up key\"\n\tcmdMap at: (12 + 1) put: #cursorPageDown:.\t\t\"page down key\"\n\tcmdMap at: (13 + 1) put: #crWithIndent:.\t\t\t\"ctrl-Return\"\n\tcmdMap at: (27 + 1) put: #offerMenuFromEsc:.\t\"escape key\"\n\tcmdMap at: (28 + 1) put: #cursorLeft:.\t\t\t\"left arrow key\"\n\tcmdMap at: (29 + 1) put: #cursorRight:.\t\t\t\"right arrow key\"\n\tcmdMap at: (30 + 1) put: #cursorUp:.\t\t\t\"up arrow key\"\n\tcmdMap at: (31 + 1) put: #cursorDown:.\t\t\t\"down arrow key\"\n\tcmdMap at: (32 + 1) put: #selectWord:.\t\t\t\"space bar key\"\n\tcmdMap at: (45 + 1) put: #changeEmphasis:.\t\t\"cmd-sh-minus\"\n\tcmdMap at: (61 + 1) put: #changeEmphasis:.\t\t\"cmd-sh-plus\"\n\tcmdMap at: (127 + 1) put: #forwardDelete:.\t\t\"del key\"\n\n\t\"Note: Command key overrides shift key, so, for example, cmd-shift-9 produces $9 not $(\"\n\t'9[,''' do: [ :char | cmdMap at: (char asciiValue + 1) put: #shiftEnclose: ].\t\"({< and double-quote\"\n\t\"Note: Must use cmd-9 or ctrl-9 to get '()' since cmd-shift-9 is a Mac FKey command.\"\n\n\t\"NB: sw 12/9/2001 commented out the idiosyncratic line just below, which was grabbing shift-esc in the text editor and hence which argued with the wish to have shift-esc be a universal gesture for escaping the local context and calling up the desktop menu.\"  \n\t\"cmdMap at: (27 + 1) put: #shiftEnclose:.\" \t\"ctrl-[\"\n\n\t\"'\"\"''(' do: [ :char | cmdMap at: (char asciiValue + 1) put: #enclose:].\"\n\n\tcmds _ #(\n\t\t$a\targAdvance:\n\t\t$b\tbuttonIt:\n\t\t$c\tcompareToClipboard:\n\t\t$d\tduplicate:\n\t\t$e\tmethodStringsContainingIt:\n\t\t$f\tdisplayIfFalse:\n\t\t$g\tfileItIn:\n\t\t$h\tcursorTopHome:\n\t\t$i\texploreIt:\n\t\t$j\tdoAgainMany:\n\t\t$k\tchangeStyle:\n\t\t$l\toutdent:\n\t\t$m\tselectCurrentTypeIn:\n\t\t$n\treferencesToIt:\n\t\t$p\tmakeProjectLink:\n\t\t$r\tindent:\n\t\t$s\tsearch:\n\t\t$t\tdisplayIfTrue:\n\t\t$u\tchangeLfToCr:\n\t\t$v\tpasteInitials:\n\t\t$w\tmethodNamesContainingIt:\n\t\t$x\tmakeLowercase:\n\t\t$y\tmakeUppercase:\n\t\t$z\tmakeCapitalized:\n\t).\n\t1 to: cmds size by: 2 do: [ :i |\n\t\tcmdMap at: ((cmds at: i) asciiValue + 1) put: (cmds at: i + 1).\t\t\"plain keys\"\n\t\tcmdMap at: ((cmds at: i) asciiValue - 32 + 1) put: (cmds at: i + 1).\t\t\"shifted keys\"\n\t\tcmdMap at: ((cmds at: i) asciiValue - 96 + 1) put: (cmds at: i + 1).\t\t\"ctrl keys\"\n\t].\n\tShiftCmdActions _ cmdMap! !\n\n!ParagraphEditor class methodsFor: '*RVM-UI-Generic' stamp: 'ssa 2/9/2010 05:23'!\ninitializeTextEditorMenus\n\t\"Initialize the yellow button pop-up menu and corresponding messages.\"\n\t\"ParagraphEditor initializeTextEditorMenus\"\n\n\tTextEditorYellowButtonMenu _ SelectionMenu\n\t\tlabels:\n'find...(f)\nfind again (g)\nset search string (h)\ndo again (j)\nundo (z)\ncopy (c)\ncut (x)\npaste (v)\npaste...\ndo it (d)\nprint it (p)\ninspect it (i)\nexplore it (e)\ndebug it\nbutton it (B)\naccept (s)\ncancel (l)\nshow bytecodes\nmore...'\n\t\tlines: #(3 5 9 15 17 19)\n\t\tselections: #(find findAgain setSearchString again undo copySelection cut paste pasteRecent doIt printIt inspectIt exploreIt debugIt buttonIt accept cancel showBytecodes shiftedTextPaneMenuRequest).! !\n\n!ParallelRandomBug class methodsFor: 'as yet unclassified' stamp: 'dmu 9/9/2010 00:13'!\ntest\n\t| numWorkers |\n\tnumWorkers _ 2.\n\n1 to: numWorkers do: [ :w |\n[ \n\t| tr |\n\ttr := Random new.\n\n\t10000 timesRepeat: [\n\t\n\t\t\t(tr next) < 0.0 ifTrue: [self error: 'neg'].\n\t\n\t].\n\n] fork\n].\n! !\n\n!ParallelRandomBug class methodsFor: 'as yet unclassified' stamp: 'dmu 9/9/2010 00:28'!\ntest2\n\t| numWorkers randoms |\n\tnumWorkers _ 2.\n\trandoms _ ( Array new: 2) collect: [:x|Random new].\n\t\n1 to: numWorkers do: [ :w |\n[ \n\t\n\n\t10000 timesRepeat: [\n\t\n\t\t\t((randoms at: w) next) < 0.0 ifTrue: [self error: 'neg'].\n\t\n\t].\n\n] copy fixTemps fork\n].\n! !\n\n!Parser methodsFor: '*Sly-expression types' stamp: 'dmu 9/16/2010 23:49'!\nensembleExpression\n\t\" %{ elements } => MessageNode(BraceNode asEnsembleOfElements).\"\n\n\t| elements locations loc more |\n\telements _ OrderedCollection new.\n\tlocations _ OrderedCollection new.\n\tself advance. \"swallow the %\"\n\tself advance.\n\tmore _ hereType ~~ #rightBrace.\n\t[more]\n\t\twhileTrue: \n\t\t\t[loc _ hereMark + requestorOffset.\n\t\t\tself expression\n\t\t\t\tifTrue: \n\t\t\t\t\t[elements addLast: parseNode.\n\t\t\t\t\tlocations addLast: loc]\n\t\t\t\tifFalse:\n\t\t\t\t\t[^self expected: 'Variable or expression'].\n\t\t\t(self match: #period)\n\t\t\t\tifTrue: [more _ hereType ~~ #rightBrace]\n\t\t\t\tifFalse: [more _ false]].\n\tparseNode _ BraceNode new elements: elements sourceLocations: locations.\n\t(self match: #rightBrace)\n\t\tifFalse: [^self expected: 'Period or right brace'].\n\n\tparseNode _ MessageNode new\n\t\t\t\treceiver: parseNode\n\t\t\t\tselector: #asEnsembleOfElements\n\t\t\t\targuments: #()\n\t\t\t\tprecedence: 1  \"unary\"\n\t\t\t\tfrom: encoder\n\t\t\t\tsourceRange: (self startOfNextToken to: self endOfLastToken).\n\t^true! !\n\n!Parser methodsFor: '*Sly-expression types' stamp: 'dmu 8/30/2010 09:42'!\nexpression\n\t\"Modified for Sly ensemble literals\"\n\t(hereType == #word and: [tokenType == #leftArrow])\n\t\tifTrue: [^ self assignment: self variable].\n\thereType == #percent\n\t\tifTrue: [self ensembleExpression]\n\t\tifFalse:[\n\t\t\thereType == #leftBrace\n\t\t\t\tifTrue: [self braceExpression]\n\t\t\t\tifFalse: [self primaryExpression ifFalse: [^ false]]].\n\t(self messagePart: 3 repeat: true)\n\t\tifTrue: [hereType == #semicolon ifTrue: [self cascade]].\n\t^ true! !\n\n!Parser methodsFor: '*Sly-expression types' stamp: 'ads 1/30/2011 15:21'!\nmessagePart: level repeat: repeat\n\t\"Changed to support RVM multicore coordinates and  Sly selectors\"\n\t| start receiver selector args precedence words keywordStart |\n\t[receiver _ parseNode.\n\t(hereType == #keyword and: [level >= 3])\n\t\tifTrue: \n\t\t\t[start _ self startOfNextToken.\n\t\t\tselector _ WriteStream on: (String new: 32).\n\t\t\targs _ OrderedCollection new.\n\t\t\twords _ OrderedCollection new.\n\t\t\t[hereType == #keyword]\n\t\t\t\twhileTrue: \n\t\t\t\t\t[keywordStart _ self startOfNextToken + requestorOffset.\n\t\t\t\t\tselector nextPutAll: self advance.\n\t\t\t\t\twords addLast: (keywordStart to: self endOfLastToken + requestorOffset).\n\t\t\t\t\tself primaryExpression ifFalse: [^self expected: 'Argument'].\n\t\t\t\t\tself messagePart: 2 repeat: true.\n\t\t\t\t\targs addLast: parseNode].\n\t\t\t(Symbol hasInterned: selector contents ifTrue: [ :sym | selector _ sym])\n\t\t\t\tifFalse: [ selector _ ((RVMOperations ifNil: [false] ifNotNil: [RVMOperations isMulticoreCoordinate: selector contents]) or:[Sly3AbstractModifier isSlySelector: selector contents])\n\t\t\t\t\t\t\t\t\t ifTrue:[selector contents asSymbol]\n\t\t\t\t\t\t\t\t\tifFalse:[self correctSelector: selector contents\n\t\t\t\t\t\t\t\t\t\twordIntervals: words\n\t\t\t\t\t\t\t\t\t\texprInterval: (start to: self endOfLastToken)\n\t\t\t\t\t\t\t\t\t\tifAbort: [ ^ self fail ] ]].\n\t\t\tprecedence _ 3]\n\t\tifFalse: [((hereType == #binary or: [hereType == #verticalBar])\n\t\t\t\tand: [level >= 2])\n\t\t\t\tifTrue: \n\t\t\t\t\t[start _ self startOfNextToken.\n\t\t\t\t\tselector _ self advance asSymbol.\n\t\t\t\t\tself primaryExpression ifFalse: [^self expected: 'Argument'].\n\t\t\t\t\tself messagePart: 1 repeat: true.\n\t\t\t\t\targs _ Array with: parseNode.\n\t\t\t\t\tprecedence _ 2]\n\t\t\t\tifFalse: [hereType == #word\n\t\t\t\t\t\tifTrue: \n\t\t\t\t\t\t\t[start _ self startOfNextToken.\n\t\t\t\t\t\t\tselector _ self advance.\n\t\t\t\t\t\t\targs _ #().\n\t\t\t\t\t\t\twords _ OrderedCollection with: (start  + requestorOffset to: self endOfLastToken + requestorOffset).\n\t\t\t\t\t\t\t(Symbol hasInterned: selector ifTrue: [ :sym | selector _ sym])\n\t\t\t\t\t\t\t\tifFalse: [ selector _  ((RVMOperations isMulticoreCoordinate: selector contents) or:[Sly3AbstractModifier isSlySelector: selector contents])\n\t\t\t\t\t\t\t\t\t ifTrue:[selector contents asSymbol]\n\t\t\t\t\t\t\t\t\tifFalse:[self correctSelector: selector\n\t\t\t\t\t\t\t\t\t\t\t\t\twordIntervals: words\n\t\t\t\t\t\t\t\t\t\t\t\t\texprInterval: (start to: self endOfLastToken)\n\t\t\t\t\t\t\t\t\t\t\t\t\tifAbort: [ ^ self fail ] ]].\n\t\t\t\t\t\t\tprecedence _ 1]\n\t\t\t\t\t\tifFalse: [^args notNil]]].\n\tparseNode _ MessageNode new\n\t\t\t\treceiver: receiver\n\t\t\t\tselector: selector\n\t\t\t\targuments: args\n\t\t\t\tprecedence: precedence\n\t\t\t\tfrom: encoder\n\t\t\t\tsourceRange: (start to: self endOfLastToken).\n\trepeat]\n\t\twhileTrue: [].\n\t^true! !\n\n!Parser methodsFor: '*Sly-expression types' stamp: 'dmu 8/30/2010 09:49'!\nprimaryExpression \n\t\"Added Sly ensembleExpression type\"\n\thereType == #word \n\t\tifTrue: \n\t\t\t[parseNode _ self variable.\n\t\t\t(parseNode isUndefTemp and: [self interactive])\n\t\t\t\tifTrue: [self queryUndefined].\n\t\t\tparseNode nowHasRef.\n\t\t\t^ true].\n\thereType == #leftBracket\n\t\tifTrue: \n\t\t\t[self advance.\n\t\t\tself blockExpression.\n\t\t\t^true].\n\thereType == #leftBrace\n\t\tifTrue: \n\t\t\t[self braceExpression.\n\t\t\t^true].\n\thereType == #percent\n\t\tifTrue: \n\t\t\t[self ensembleExpression.\n\t\t\t^true].\n\thereType == #leftParenthesis\n\t\tifTrue: \n\t\t\t[self advance.\n\t\t\tself expression ifFalse: [^self expected: 'expression'].\n\t\t\t(self match: #rightParenthesis)\n\t\t\t\tifFalse: [^self expected: 'right parenthesis'].\n\t\t\t^true].\n\t(hereType == #string or: [hereType == #number or: [hereType == #literal]])\n\t\tifTrue: \n\t\t\t[parseNode _ encoder encodeLiteral: self advance.\n\t\t\t^true].\n\t(here == #- and: [tokenType == #number])\n\t\tifTrue: \n\t\t\t[self advance.\n\t\t\tparseNode _ encoder encodeLiteral: self advance negated.\n\t\t\t^true].\n\t^false! !\n\n!Particle methodsFor: 'displaying'!\ndisplayOn: t1 \n\tself form\n\t\tdisplayOn: t1\n\t\tat: location\n\t\trule: Form paint! !\n\n!Particle methodsFor: 'displaying' stamp: 'max 9/17/2010 11:40'!\nform\n\t| fill |\n\t(formChanged\n\t\t\tor: [form isNil])\n\t\tifTrue: [form := (Form dotOfSize: size) as8BitColorForm.\n\t\t\tfill := (Form dotOfSize: size - 2) as8BitColorForm mapColor: Color black to: color.\n\t\t\tfill mapColor: Color white to: Color transparent.\n\t\t\tfill  displayOn: form\n\t\t\t\tat: (size // 2) asPoint\n\t\t\t\trule: Form paint.\n\t\t\tform mapColor: Color white to: Color transparent.\n\t\t\tformChanged := false].\n\t^ form! !\n\n!Particle methodsFor: 'accessing'!\narea\n\t^ Rectangle center: location extent: size asPoint! !\n\n!Particle methodsFor: 'accessing'!\ncolor\n\t^ color! !\n\n!Particle methodsFor: 'accessing'!\nlocation\n\t^ location! !\n\n!Particle methodsFor: 'accessing'!\nsize\n\t^ size! !\n\n!Particle methodsFor: 'accessing'!\nvelocity\n\t^ velocity! !\n\n!Particle methodsFor: 'motion and interaction' stamp: 'max 9/18/2010 00:19'!\nbounce\n\t| bounds |\n\tbounds := homeField area.\n\t\n\t((location x < bounds left) or: [location x >= bounds right])\n\t\tifTrue: [velocity := velocity x negated @ velocity y].\n\t\n\t((location y < bounds top) or: [location y >= bounds bottom])\n\t\tifTrue: [velocity := velocity x @ velocity y negated].\n\t\n\tlocation := location adhereTo: bounds.\n\t\n\t! !\n\n!Particle methodsFor: 'motion and interaction' stamp: 'max 9/17/2010 19:18'!\ncollideWith: anotherParticle\n\t\"Two axis collision sort\"\n\tanotherParticle color red > color red\n\t\tifTrue: [velocity := velocity x abs negated @ velocity y]\n\t\tifFalse: [velocity := velocity x abs @ velocity y].\n\tanotherParticle color blue > color blue\n\t\tifTrue: [velocity := velocity x @ velocity y abs negated]\n\t\tifFalse: [velocity := velocity x @ velocity y abs]! !\n\n!Particle methodsFor: 'motion and interaction' stamp: 'max 9/17/2010 11:30'!\ngo\n\trunning := true.\n\t[[running] whileTrue: [self step. Processor yield]] fork! !\n\n!Particle methodsFor: 'motion and interaction' stamp: 'max 9/29/2010 12:54'!\nmoveTo: anotherField \n\tanotherField add: self.\n\t\"old\" homeField remove: self.\n\thomeField := anotherField.! !\n\n!Particle methodsFor: 'motion and interaction' stamp: 'max 9/16/2010 17:17'!\nparticle: aParticle ofSize: itsSize movedTo: aLocation\n\t\"...but if it's not touching me, don't do anything about it.\"\n\t((location dist: aLocation) <= (size + itsSize // 2)\n\t\tand: [aParticle ~= self])\n\t\t\tifTrue: [self collideWith: aParticle.\n\t\t\t\t\taParticle collideWith: self]! !\n\n!Particle methodsFor: 'motion and interaction' stamp: 'max 9/22/2010 14:18'!\nstep\n\tlocation := location + velocity.\n\thomeField\n\t\tparticle: self\n\t\tofSize: size\n\t\tmovedTo: location! !\n\n!Particle methodsFor: 'motion and interaction'!\nstop\n\trunning := false! !\n\n!Particle methodsFor: 'printing'!\nprintOn: t1 \n\tsuper printOn: t1.\n\tt1 nextPut: $(.\n\tself location printOn: t1.\n\tt1 nextPut: $)! !\n\n!Particle methodsFor: 'initialize-release' stamp: 'max 9/17/2010 11:38'!\ninitialize\n\trunning := false.\n\tformChanged := true.\n! !\n\n!Particle methodsFor: 'private'!\nsetColor: t1 size: t2 location: t3 velocity: t4 \n\tcolor := t1.\n\tsize := t2.\n\tlocation := t3.\n\tvelocity := t4! !\n\n!Particle methodsFor: 'private' stamp: 'max 9/29/2010 14:00'!\nsetHomeField: aField \n\t(aField isNil) ifFalse:\n\t\t[(homeField == aField)\n\t\t\tifFalse: \n\t\t\t\t[homeField := aField]]! !\n\n!Particle class methodsFor: 'as yet unclassified' stamp: 'max 9/16/2010 17:37'!\nc: aColor s: aSize l: aPoint v: aPointOffset \n\t| p |\n\tp := self new.\n\tp\n\t\tsetColor: aColor\n\t\tsize: aSize\n\t\tlocation: aPoint\n\t\tvelocity: aPointOffset.\n\t^ p! !\n\n!ParticleSim methodsFor: 'private' stamp: 'max 9/16/2010 17:03'!\nmakeBlankForm\n\t| newForm xMax yMax pen |\n\txMax := extent x - 1.\n\tyMax := extent y - 1.\n\tnewForm := (Form extent: extent depth: 8) fillWhite.\n\tpen := (Form extent: 1@1 depth: 8) fillColor: Color veryLightGray.\n\t\n\t\"Draw horizontal grid lines\"\n\t0 to: xMax by: (xMax / fields rowCount) do:\n\t[:x | newForm \n\t\tdrawLine: pen\n\t\tfrom: x@0\n\t\tto: x@yMax\n\t\tclippingBox: (0@0 corner: extent)\n\t\trule: Form paint \n\t\tfillColor: newForm].\n\t\n\t\"... and vertical\"\n\t0 to: yMax by: (yMax / fields columnCount) do:\n\t[:y | newForm \n\t\tdrawLine: pen\n\t\tfrom: 0@y\n\t\tto: xMax@y\n\t\tclippingBox: (0@0 corner: extent)\n\t\trule: Form paint \n\t\tfillColor: newForm].\n\t\n\tblankForm := newForm! !\n\n!ParticleSim methodsFor: 'private' stamp: 'max 9/29/2010 12:45'!\nsetExtent: aPointOffset fields: xAndY \n\t\"This is an initialization message which must be sent to all new ParticleSim objects.\"\n\t| fieldExtent |\n\trunning := false.\n\textent := aPointOffset.\n\tfieldExtent := aPointOffset // xAndY.\n\tform := Form extent: aPointOffset depth: 8.\n\tfields := Matrix rows: xAndY x columns: xAndY y.\n\t\n\tfields indicesDo:\n\t\t [:x :y | fields at: x at: y put: (Field origin: x@y - (1@1) * fieldExtent extent: fieldExtent)].\n\t\t\n\tfields indicesDo:\n\t\t[:x :y  | (fields at: x at: y)\n\t\t\tsetNeighborN: (fields at: x at: y - 1 ifInvalid: nil);\n\t\t\tsetNeighborNE: (fields at: x + 1 at: y - 1 ifInvalid: nil);\n\t\t\tsetNeighborNW: (fields at: x - 1 at: y - 1 ifInvalid: nil);\n\t\t\tsetNeighborS: (fields at: x at: y + 1 ifInvalid: nil);\n\t\t\tsetNeighborSE: (fields at: x + 1 at: y + 1 ifInvalid: nil);\n\t\t\tsetNeighborSW: (fields \tat: x - 1 at: y + 1 ifInvalid: nil);\n\t\t\tsetNeighborE: (fields at: x + 1 at: y ifInvalid: nil);\n\t\t\tsetNeighborW: (fields at: x - 1 at: y ifInvalid: nil);\n\t\t\tsetSimulation: self].\n\tself makeBlankForm! !\n\n!ParticleSim methodsFor: 'user interface' stamp: 'max 9/18/2010 18:03'!\nadd: aParticle \n\t| loc destinationField |\n\tloc := aParticle location.\n\tdestinationField := fields\n\t\t\t\tdetect: [:fld | fld area containsPoint: loc].\n\taParticle setHomeField: destinationField.\n\tdestinationField add: aParticle\n! !\n\n!ParticleSim methodsFor: 'user interface' stamp: 'max 9/18/2010 18:03'!\naddRandom: nParticles \n\tnParticles timesRepeat: \n\t\t[self add:\n\t\t\t(Particle\n\t\t\t\tc: Color random\n\t\t\t\ts: (10 to: 30) atRandom\n\t\t\t\tl: (0 to: extent x - 1) atRandom @ (0 to: extent y - 1) atRandom\n\t\t\t\tv: (1 to: 10) atRandom @ (1 to: 10) atRandom)]! !\n\n!ParticleSim methodsFor: 'user interface' stamp: 'max 9/18/2010 18:04'!\nclear\n\tfields do: [:fld | fld particles removeAll]! !\n\n!ParticleSim methodsFor: 'user interface' stamp: 'max 9/17/2010 12:50'!\ngo\n\trunning := true.\n\t\"[[running] whileTrue: [self refresh. (Delay forMilliseconds: 50) wait]] fork.\"\n\tfields do: [:fld | fld go]! !\n\n!ParticleSim methodsFor: 'user interface' stamp: 'max 9/16/2010 16:49'!\nopenMVCWindow\n\t| topView |\n\tcanvas := FormView new model: form.\n\ttopView := StandardSystemView new label: 'Particle Simulator';\n\t\t\t\t borderWidth: 2;\n\t\t\t\t minimumSize: extent;\n\t\t\t\t maximumSize: extent;\n\t\t\t\t model: self;\n\t\t\t\t addSubView: canvas.\n\ttopView controller open! !\n\n!ParticleSim methodsFor: 'user interface' stamp: 'max 9/16/2010 16:49'!\nrefresh\n\tblankForm displayOn: form.\n\tfields do: [:fld | fld displayOn: form].\n\tcanvas displayView! !\n\n!ParticleSim methodsFor: 'user interface' stamp: 'max 9/18/2010 00:28'!\nstep\n\tfields do: [:fld | fld step].\n\tself refresh! !\n\n!ParticleSim methodsFor: 'user interface' stamp: 'max 9/16/2010 16:50'!\nstop\n\tfields do: [:fld | fld stop].\n\trunning := false! !\n\n!ParticleSim methodsFor: 'accessing'!\nblankForm\n\t^ blankForm! !\n\n!ParticleSim methodsFor: 'accessing'!\nfields\n\t^ fields! !\n\n!ParticleSim methodsFor: 'accessing'!\nform\n\t^ form! !\n\n!ParticleSim methodsFor: 'accessing'!\nrunning\n\t^ running! !\n\n!ParticleSim class methodsFor: 'instance creation'!\ndemo\n\t| t1 |\n\tt1 := self new setExtent: 500 @ 300 fields: 5 @ 3.\n\tt1 addRandom: 10.\n\t^ t1! !\n\n!ParticleSim class methodsFor: 'instance creation'!\nextent: t1 \n\t^ self extent: t1 fields: 2 @ 2! !\n\n!ParticleSim class methodsFor: 'instance creation' stamp: 'max 9/16/2010 16:51'!\nextent: aPointOffset fields: xAndY \n\t^ self new setExtent: aPointOffset fields: xAndY! !\n\n!Pen methodsFor: 'accessing'!\ndestForm: aForm\n        \"2/14/97 ssa added for compatibility.\"\n        self flag:#compatibility.\n\n        destForm _ aForm ! !\n\n!Pen methodsFor: 'operations' stamp: 'ssa 11/29/2009 03:27'!\nturnToward: aPoint \n\t\"Aim the receiver at apoint\"\n\n\tself north; turn: (self penAngleFrom: self location to: aPoint)! !\n\n!Pen methodsFor: 'geometric designs' stamp: 'ssa 2/16/2009 11:50'!\nmandala: npoints diameter: d\n\t\"Display restoreAfter: [Pen new mandala: 30 diameter: 400]\"\n\t\"On a circle of diameter d, place npoints number of points. Draw all \tpossible connecting lines between the circumferential points.\"\n\t| l points  |\n\t\"Display fillWhite.\"\n\tl _ 3.14 * d / npoints.\n\tself home; up; turn: -90; go: d // 2; turn: 90; go: 0 - l / 2; down.\n\tpoints _ Array new: npoints.\n\t1 to: npoints do: \n\t\t[:i | \n\t\tpoints at: i put: location rounded.\n\t\tself go: l; turn: 360.0 / npoints].\n\tnpoints // 2\n\t\tto: 1\n\t\tby: -1\n\t\tdo: \n\t\t\t[:i | \n\t\t\tself color: i.\n\t\t\t1 to: npoints do: \n\t\t\t\t[:j | \n\t\t\t\tself place: (points at: j).\n\t\t\t\tself goto: (points at: j + i - 1 \\\\ npoints + 1)]]\n! !\n\n!Pen methodsFor: 'private' stamp: 'ssa 2/6/2009 10:49'!\ndirection: aFloat\n\tdirection _ aFloat.\n! !\n\n!Pen methodsFor: 'functions' stamp: 'ssa 11/29/2009 03:24'!\npenAngleFrom:firstPoint to: lastPoint\n\t| offset x y deg | \n\t\"return the angle of the vector in Pen degrees (0 = north)\"\n\noffset _ lastPoint - firstPoint.\n\nx _ offset x .\ny _ offset y. \nx = 0 ifTrue:[ x _ 0.0001].\ndeg _ (y / x) arcTan radiansToDegrees.\nx positive & y positive ifTrue:[ deg _ 90 + deg].\nx positive & y negative ifTrue:[ deg _ 90 + deg].\nx negative & y positive ifTrue:[ deg _ 270 + deg].\nx negative & y negative ifTrue:[ deg _ 270 + deg].\n\n^deg! !\n\n!PluggableButtonView methodsFor: 'accessing' stamp: 'ssa 8/23/2009 13:42'!\nlabel: aStringOrDisplayObject \n\t\"Label this button with the given String or DisplayObject.\"\n\n\t((aStringOrDisplayObject isKindOf: Paragraph)\n\tor: [aStringOrDisplayObject isForm])\n\t\tifTrue: [label _ aStringOrDisplayObject]\n\t\tifFalse: [label _ aStringOrDisplayObject asParagraph].\n\tself centerLabel.\n! !\n\n!PluggableButtonView methodsFor: 'displaying' stamp: 'acg 2/23/2000 00:18'!\ndisplayView\n\n\t\"Displays this switch and its label, if any.\"\n\n\tself clearInside.\n\tlabel ifNotNil: [\n\t\t(label isKindOf: Paragraph) ifTrue: [\n\t\t\tlabel foregroundColor: self foregroundColor\n\t\t\t\t backgroundColor: self backgroundColor].\n\t\tlabel displayOn: Display\n\t\t\t\tat: label boundingBox topLeft\n\t\t\t\tclippingBox: self insetDisplayBox].\n\tcomplemented _ false.! !\n\n!PluggableButtonView methodsFor: 'other' stamp: 'ssa 8/22/2009 15:54'!\nperformAction\n\t\"Inform the model that this button has been pressed. Sent by the controller when this button is pressed.\"\n\n\t(argumentsSelector isKindOf: BlockContext) ifTrue:[^argumentsSelector value].\n\targumentsSelector\n\t\tifNil:\n\t\t\t[actionSelector ifNotNil:\n\t\t\t\t[model perform: actionSelector]]\n\t\tifNotNil:\n\t\t\t[model perform: actionSelector\n\t\t\t\twithArguments:\n\t\t\t\t\t(Array with: (argumentsProvider perform: argumentsSelector))]! !\n\n!PluggableButtonView methodsFor: 'other' stamp: 'ssa 8/23/2009 13:47'!\nupdate: aParameter \n\n\taParameter == getLabelSelector ifTrue: [\n\t\tgetLabelSelector ifNotNil: [\n\t\t\tself label: (model perform: getLabelSelector halt ).\n\t\t\tself displayView]].\n\tself getModelState \n\t\tifTrue: [self displayComplemented]\n\t\tifFalse: [self displayNormal].\n! !\n\n!PluggableFileList methodsFor: 'StandardFileMenu' stamp: 'ssa 4/19/2010 20:06'!\nstartUpWithCaption: captionOrNil\n\t\"Display the menu, slightly offset from the cursor,\n\tso that a slight tweak is required to confirm any action.\"\n\t^ self startUpWithCaption: captionOrNil at: Sensor cursorPoint! !\n\n!PluggableFileList class methodsFor: 'StandardFileMenu' stamp: 'ssa 10/18/2008 23:10'!\noldFileMenu: aDirectory withPattern: aPattern\n\n\t\"For compatibility with StandardFileMenu for now, answer a StandardFileMenuResult\"\n\t^(self getFilePathNameDialog)\n\t\tresultBlock: self sfmResultBlock;\n\t\tdirectory: aDirectory;\n\t\tpattern: aPattern;\n\t\tyourself! !\n\n!PluggableListController methodsFor: 'private' stamp: 'di 5/25/1998 10:20'!\nchangeModelSelection: anInteger\n\t\"Let the view handle this.\"\n\n\tterminateDuringSelect ifTrue: [self controlTerminate].\n\tview changeModelSelection: anInteger.\n\tterminateDuringSelect ifTrue: [self controlInitialize].! !\n\n!PluggableListControllerOfMany methodsFor: 'control defaults' stamp: 'ssa 1/1/1970 00:05'!\nredButtonActivity\n\t| selection firstHit turningOn lastSelection pt scrollFlag |\n\tmodel okToChange ifFalse: [^ self].\n\t\t\"Don't change selection if model refuses to unlock\"\n\tfirstHit _ true.\n\tscrollFlag _ false.\n\tlastSelection _ 0.\n\t[sensor redButtonPressed] whileTrue: \n\t\t[\nselection _ view findSelection: (pt _ sensor cursorPoint).\n\t\tselection == nil ifTrue:  \"Maybe out of box - check for auto-scroll\"\n\t\t\t[pt y < view insetDisplayBox top ifTrue:\n\t\t\t\t[self scrollView: view list lineGrid.\n\t\t\t\tscrollFlag _ true.\n\t\t\t\tselection _ view firstShown].\n\t\t\tpt y > view insetDisplayBox bottom ifTrue:\n\t\t\t\t[self scrollView: view list lineGrid negated.\n\t\t\t\tscrollFlag _ true.\n\t\t\t\tselection _ view lastShown]].\n\t\t(selection == nil or: [selection = lastSelection]) ifFalse: \n\t\t\t[firstHit ifTrue:\n\t\t\t\t[firstHit _ false.\n\t\t\t\tturningOn _ (view listSelectionAt: selection) not].\n\t\t\tview selection: selection.\n\t\t\t(view listSelectionAt: selection) == turningOn ifFalse:\n\t\t\t\t[view displaySelectionBox.\n\t\t\t\tview listSelectionAt: selection put: turningOn].\n\t\t\tlastSelection _ selection]].\n\tselection notNil ifTrue:\n\t\t[\"Normal protocol delivers change, so unchange first (ugh)\"\n\t\t\"view listSelectionAt: selection put: (view listSelectionAt: selection) not\".\n\t\tself changeModelSelection: selection].\n\tscrollFlag ifTrue: [self moveMarker]! !\n\n!PluggableListView methodsFor: 'model access' stamp: 'ssa 9/2/2009 20:11'!\ngetList \n\t\"Answer the list to be displayed.\"\n\n\t| lst |\n\tgetListSelector == nil ifTrue: [^ #()].\n\tlst _ model perform: getListSelector.\n\tlst == nil ifTrue: [^ #()].\n\t^ lst ! !\n\n!PluggableListView methodsFor: 'updating' stamp: 'ssa 11/25/2009 14:42'!\nupdate: aSymbol \n\t\"Refer to the comment in View|update:.\"\n\t\"Hacked to support Windoze - ssa\"\n\taSymbol == getListSelector ifTrue:\n\t\t[self list: self getList.\n\t\tself displayView.\n\t\tself displaySelectionBox].\n\taSymbol == getSelectionSelector ifTrue:\n\t\t[self moveSelectionBox: self getCurrentSelectionIndex].\n\t(self superView isKindOf: MSWScrollBarView)\n\t\tifTrue:[self superView updateElevator]! !\n\n!PluggableListView class methodsFor: 'instance creation' stamp: 'ssa 3/24/2010 14:45'!\non: anObject list: getListSel selected: getSelectionSel changeSelected: setSelectionSel\n\t\"Create a 'pluggable' list view on the given model parameterized by the given message selectors. See aboutPluggability comment.\"\n\n\t^ self \n\t\ton: anObject\n\t\tlist: getListSel\n\t\tselected: getSelectionSel\n\t\tchangeSelected: setSelectionSel\n\t\tmenu: nil\n\t\tkeystroke: #arrowKey:from:\t\t\"default\"\n! !\n\n!PluggableListView class methodsFor: 'instance creation' stamp: 'ssa 3/24/2010 14:45'!\non: anObject list: getListSel selected: getSelectionSel changeSelected: setSelectionSel menu: getMenuSel\n\t\"Create a 'pluggable' list view on the given model parameterized by the given message selectors. See aboutPluggability comment.\"\n\n\t^ self \n\t\ton: anObject\n\t\tlist: getListSel\n\t\tselected: getSelectionSel\n\t\tchangeSelected: setSelectionSel\n\t\tmenu: getMenuSel\n\t\tkeystroke: #arrowKey:from:\t\t\"default\"\n\n! !\n\n!PluggableListView class methodsFor: 'instance creation' stamp: 'ssa 9/4/1998 16:00'!\non: anObject list: getListSel selected: getSelectionSel changeSelected: setSelectionSel menu: getMenuSel keystroke: keyActionSel\n\t\"Create a 'pluggable' list view on the given model parameterized by the given message selectors. See aboutPluggability comment.\"\n\t\"Added Windoze wrapper - ssa\"\n\n\t^ MSWScrollBarView on: (self new\n\t\ton: anObject\n\t\tlist: getListSel\n\t\tselected: getSelectionSel\n\t\tchangeSelected: setSelectionSel\n\t\tmenu: getMenuSel\n\t\tkeystroke: keyActionSel)\n! !\n\n!PluggableListViewByObject methodsFor: 'accessing' stamp: 'ssa 11/25/2009 12:50'!\nchangeModelSelection: anInteger\n\t\"Change the model's selected item to be the one at the given index.\"\n\t| item |\n\tsetSelectionSelector ifNotNil: [\n\t\titem _ (anInteger = 0 ifTrue: [nil] ifFalse: [self objects at: anInteger]).\n\t\tmodel perform: setSelectionSelector with: item].\n! !\n\n!PluggableListViewByObject methodsFor: 'accessing' stamp: 'ssa 1/29/2010 13:40'!\ngetCurrentSelectionIndex\n\t\"Answer the index of the current selection.\"\n\t| item |\n\tgetSelectionSelector == nil ifTrue: [^ 0].\n\titem _ model perform: getSelectionSelector.\n\t^ self objects indexOf: item ifAbsent:[0]\n! !\n\n!PluggableListViewByObject methodsFor: 'accessing' stamp: 'ssa 1/29/2010 13:47'!\nlabelForItem: anItem\n\t\"Subclasses may want to override\"\n\t^anItem isString ifTrue:[anItem]ifFalse:[anItem printString]! !\n\n!PluggableListViewByObject methodsFor: 'accessing' stamp: 'ssa 6/17/2010 16:40'!\nlist: arrayOfObjects\n\t\"Set the receivers items to be the given list of objects printStrings.\"\n\t\"Note: the instance variable 'objects' holds the original list.\n\t The instance variable 'list' is a paragraph constructed from\n\t this list.\"\n\n\t| oldOffset |\n\tself scrollCache: (list isNil ifFalse:[list scrollDelta]ifTrue:[0]).\n\tself objects: arrayOfObjects.\n\tisEmpty _ arrayOfObjects isEmpty.\n\toldOffset _ list isNil ifTrue:[0@0]ifFalse:[list offset].\n\n\t\"add top and bottom delimiters\"\n\tlist _ ListParagraph \n\t\twithArray:\n\t\t\t(Array streamContents: [:s |\n\t\t\t\ts nextPut: topDelimiter.\n\t\t\t\tself objects do: [:item | item == nil ifFalse: [s nextPut: (self labelForItem: item)]].\n\t\t\t\ts nextPut: bottomDelimiter])\n\t\t style: self assuredTextStyle.\n\tlist offset: oldOffset.\n\tselection _ self getCurrentSelectionIndex.\n\tself positionList.! !\n\n!PluggableListViewByObject methodsFor: 'accessing' stamp: 'ssa 9/9/2009 11:31'!\nobjects\n\t\"Answer the value of objects\"\n\n\tobjects isNil ifTrue:[self objects: OrderedCollection new].\n\t^ objects! !\n\n!PluggableListViewByObject methodsFor: 'accessing' stamp: 'ssa 9/9/2009 11:29'!\nobjects: anObject\n\t\"Set the value of objects\"\n\n\tobjects _ anObject! !\n\n!PluggableListViewByObject methodsFor: 'accessing' stamp: 'ssa 1/22/2010 14:02'!\nscrollCache\n\t\"Answer the value of scrollCache\"\n\n\tscrollCache isNil ifTrue:[self scrollCache: 0].\n\t^ scrollCache! !\n\n!PluggableListViewByObject methodsFor: 'accessing' stamp: 'ssa 1/22/2010 14:02'!\nscrollCache: anObject\n\t\"Set the value of scrollCache\"\n\n\tscrollCache _ anObject! !\n\n!PluggableListViewOfMany class methodsFor: 'instance creation' stamp: 'ssa 3/24/2010 14:46'!\non: anObject list: listSel primarySelection: getSelectionSel changePrimarySelection: setSelectionSel listSelection: getListSel changeListSelection: setListSel menu: getMenuSel\n\t^ self \n\t\ton: anObject\n\t\tlist: listSel\n\t\tprimarySelection: getSelectionSel\n\t\tchangePrimarySelection: setSelectionSel\n\t\tlistSelection: getListSel\n\t\tchangeListSelection: setListSel\n\t\tmenu: getMenuSel\n\t\tkeystroke: #arrowKey:from:\t\t\"default\"! !\n\n!PluggableListViewOfMany class methodsFor: 'instance creation' stamp: 'ssa 8/21/2009 15:22'!\non: anObject list: listSel primarySelection: getSelectionSel changePrimarySelection: setSelectionSel listSelection: getListSel changeListSelection: setListSel menu: getMenuSel keystroke: keyActionSel \n\t^MSWScrollBarView on: ( self new\n\t\ton: anObject\n\t\tlist: listSel\n\t\tprimarySelection: getSelectionSel\n\t\tchangePrimarySelection: setSelectionSel\n\t\tlistSelection: getListSel\n\t\tchangeListSelection: setListSel\n\t\tmenu: getMenuSel\n\t\tkeystroke: keyActionSel)! !\n\n!PluggableOutline methodsFor: 'menu support' stamp: 'ssa 9/10/2009 14:42'!\ninspectSelection\n\n\tself selection inspect! !\n\n!PluggableOutline methodsFor: 'menu support' stamp: 'ssa 9/10/2009 14:47'!\nmenu: aMenu\n\n\n\taMenu add: 'inspect' action: #inspectSelection.\n\taMenu add: 'outline' action: #outlineSelection.\n\t^ aMenu! !\n\n!PluggableOutline methodsFor: 'menu support' stamp: 'ssa 9/10/2009 14:43'!\noutlineSelection\n\n\tself selection outline! !\n\n!PluggableOutline methodsFor: 'menu support' stamp: 'ssa 9/10/2009 14:55'!\nperform: selector orSendTo: otherTarget\n\t\n\t^self perform: selector! !\n\n!PluggableOutline methodsFor: 'accessing' stamp: 'ssa 9/10/2009 13:29'!\nchildrenOf: anObject\n\n\t^anObject subobjects! !\n\n!PluggableOutline methodsFor: 'accessing' stamp: 'ssa 9/9/2009 12:02'!\ninitializeList\n\n\tself list do:[:each| self levels at: each put:0]! !\n\n!PluggableOutline methodsFor: 'accessing' stamp: 'ssa 9/9/2009 12:01'!\nlevelOf: anItem\n\n\t^self levels at: anItem ifAbsent:[0]! !\n\n!PluggableOutline methodsFor: 'accessing' stamp: 'ssa 9/9/2009 12:01'!\nlevels\n\t\"Answer the value of levels\"\n\n\tlevels isNil ifTrue:[self levels: Dictionary new].\n\t^ levels! !\n\n!PluggableOutline methodsFor: 'accessing' stamp: 'ssa 9/9/2009 12:00'!\nlevels: anObject\n\t\"Set the value of levels\"\n\n\tlevels _ anObject! !\n\n!PluggableOutline methodsFor: 'accessing' stamp: 'ssa 9/10/2009 13:39'!\nlist\n\t\"Answer the value of list\"\n\n\tlist isNil ifTrue:[self list: (OrderedCollection with:self subject )].\n\t^ list! !\n\n!PluggableOutline methodsFor: 'accessing' stamp: 'ssa 9/10/2009 13:36'!\nlist: anObject\n\t\"Set the value of list\"\n\n\tlist _ anObject asOrderedCollection! !\n\n!PluggableOutline methodsFor: 'accessing' stamp: 'ssa 9/9/2009 11:42'!\nopenItems\n\t\"Answer the value of openItems\"\n\n\topenItems isNil ifTrue:[self openItems: Set new].\n\t^ openItems! !\n\n!PluggableOutline methodsFor: 'accessing' stamp: 'ssa 9/9/2009 11:42'!\nopenItems: anObject\n\t\"Set the value of openItems\"\n\n\topenItems _ anObject! !\n\n!PluggableOutline methodsFor: 'accessing' stamp: 'ssa 9/9/2009 13:28'!\nprogenyOf: anObject\n\n\t| all |\n\tall _ (self childrenOf: anObject)copy.\n\tall isEmpty ifTrue:[^all].\n\tall copy do:[:each| all addAll: (self progenyOf: each)].\n\t^all ! !\n\n!PluggableOutline methodsFor: 'accessing' stamp: 'ssa 9/9/2009 11:18'!\nselection\n\t\"Answer the value of selection\"\n\n\tselection isNil ifTrue:[self selection: nil].\n\t^ selection! !\n\n!PluggableOutline methodsFor: 'accessing' stamp: 'ssa 9/9/2009 17:15'!\nselection: anObject\n\t\"Set the value of selection\"\n\n\tselection _ anObject .\n\t! !\n\n!PluggableOutline methodsFor: 'accessing' stamp: 'ssa 7/7/2010 12:40'!\nsubject\n\t\"Answer the value of subject\"\n\n\tsubject isNil ifTrue:[self subject: nil].\n\t^ subject! !\n\n!PluggableOutline methodsFor: 'accessing' stamp: 'ssa 9/10/2009 08:25'!\nsubject: anObject\n\t\"Set the value of subject\"\n\n\tsubject _ anObject! !\n\n!PluggableOutline methodsFor: 'opening/closing' stamp: 'ssa 9/9/2009 13:02'!\nhasChildren: anObject\n\n\t^(self childrenOf: anObject) notEmpty ! !\n\n!PluggableOutline methodsFor: 'opening/closing' stamp: 'ssa 9/9/2009 14:07'!\nhideChildrenOfSelection\n\n\t| kids |\n\tself openItems remove: self selection.\n\tkids _ self progenyOf: self selection.\n\tkids do:[:each| self levels removeKey: each ifAbsent:[].\n\t\tself openItems remove: each ifAbsent:[]].\n\tself list removeAll: kids ifAbsent:[]\n! !\n\n!PluggableOutline methodsFor: 'opening/closing' stamp: 'ssa 9/9/2009 11:42'!\nisOpen: anItem\n\n\t^self openItems includes: anItem! !\n\n!PluggableOutline methodsFor: 'opening/closing' stamp: 'ssa 9/9/2009 12:10'!\nshowChildrenOfSelection\n\n\t| kids nextLevel |\n\tself openItems add: self selection.\n\tnextLevel _ (self levelOf: self selection) + 1.\n\tkids _ self childrenOf: self selection.\n\tkids isEmpty ifTrue:[^self error:'should never try to show children of an childless object'].\n\tkids do:[:each| self levels at: each put: nextLevel].\n\tself list addAll: kids after: self selection! !\n\n!PluggableOutline methodsFor: 'opening/closing' stamp: 'ssa 9/10/2009 07:30'!\ntoggleSelection\n\n\tself selection isNil ifTrue:[^self].\n\t(self isOpen: self selection)\n\t\tifTrue:[self hideChildrenOfSelection]\n\t\tifFalse:[self showChildrenOfSelection].\n\tself changed:#list! !\n\n!PluggableOutline methodsFor: 'arrow keys' stamp: 'ssa 9/9/2009 14:47'!\narrowKey: aChar from: view\n\t\"Process the up and down arrows in a list pane.  Note that the listView tells us what index variable, how to get the list, and how to move the index.  Derived from a Martin Pammer submission, 02/98\"\n\n     | keyEvent oldSelection nextSelection max min howMany |\n\n\t(#(1 4 11 12 30 31) includes: (keyEvent _ aChar asciiValue)) ifFalse:\n\t\t[\n\t\t\t^ self].\n\n     oldSelection := view getCurrentSelectionIndex.\n     nextSelection := oldSelection.\n     max := view maximumSelection.\n     min := view minimumSelection.\n     howMany := view numSelectionsInView.\t\"get this exactly??\"\n\n     keyEvent == 31 ifTrue:\n\t\t[\"down-arrow; move down one, wrapping to top if needed\"\n\t\tnextSelection := oldSelection + 1.\n\t\tnextSelection > max ifTrue: [nextSelection _ 1]].\n\n     keyEvent == 30 ifTrue:\n\t\t[\"up arrow; move up one, wrapping to bottom if needed\"\n\t\tnextSelection := oldSelection - 1.\n\t\tnextSelection < 1 ifTrue: [nextSelection _ max]].\n\n     keyEvent == 1  ifTrue: [nextSelection := 1].  \"home\"\n     keyEvent == 4  ifTrue: [nextSelection := max].   \"end\"\n     keyEvent == 11 ifTrue: [nextSelection := min max: (oldSelection - howMany)].  \"page up\"\n     keyEvent == 12  ifTrue: [nextSelection := (oldSelection + howMany) min: max].  \"page down\"\n     nextSelection = oldSelection  ifFalse:\n\t\t[self okToChange\n\t\t\tifTrue:\n\t\t\t\t[view changeModelSelection: nextSelection.\n\t\t\t\t\"view controller moveMarker\"]]\n\t\t\t! !\n\n!PluggableTextController methodsFor: 'accessing-selection' stamp: 'th 9/19/2002 18:35'!\nselectFrom: start to: stop scroll: scrollCommand\n\t\"Deselect, then select the specified characters inclusive.\n\t Be sure the selection is in view.\"\n\n\t(start = self startIndex and: [stop + 1 = self stopIndex]) ifFalse:\n\t\t[view superView ifNotNil: [self deselect].\n\t\tself selectInvisiblyFrom: start to: stop].\n\tview superView ifNotNil: [self perform: scrollCommand]! !\n\n!PluggableTextView class methodsFor: 'instance creation' stamp: 'ssa 3/24/2010 14:35'!\non: anObject text: getTextSel accept: setTextSel\n\n\t^ self on: anObject\n\t\ttext: getTextSel\n\t\taccept: setTextSel\n\t\treadSelection: nil\n\t\tmenu: nil\n! !\n\n!PluggableTextView class methodsFor: 'instance creation' stamp: 'ssa 9/4/1998 16:04'!\non: anObject text: getTextSel accept: setTextSel readSelection: getSelectionSel menu: getMenuSel\n\t\"Added Windoze wrapper - ssa\"\n\n\t^ MSWScrollBarView on: (self new on: anObject\n\t\ttext: getTextSel\n\t\taccept: setTextSel\n\t\treadSelection: getSelectionSel\n\t\tmenu: getMenuSel)\n! !\n\n!Point methodsFor: 'accessing' stamp: 'ssa 11/16/2008 13:12'!\nx: aNumber\n\n\tx _ aNumber! !\n\n!Point methodsFor: 'accessing' stamp: 'ssa 11/16/2008 13:12'!\ny: aNumber\n\n\ty _ aNumber! !\n\n!Point methodsFor: 'arithmetic' stamp: 'ssa 11/27/2009 16:15'!\ninverted\n\n\t^1 asPoint / self! !\n\n!Point methodsFor: 'comparing' stamp: 'ssa 9/3/2009 07:11'!\nmaxed\n\n\t^(x max: y) asPoint! !\n\n!Point methodsFor: 'comparing' stamp: 'ssa 9/3/2009 07:11'!\nmined\n\n\t^(x min: y) asPoint! !\n\n!Point methodsFor: 'interpolating' stamp: 'ssa 9/7/2009 21:42'!\nzeno\n\t\"(10@10) zeno  #(10@10 5.0@5.0 2.5@2.5 1.25@1.25)\"\n\t\"(10@4) zeno  #(10@4 5.0@2.0)\"\n\t\"(-10@4) zeno  \"\n\t| steps zx zy minSize |\n\tsteps _ OrderedCollection new.\n\tzx _ x zeno.\n\tzy _ y zeno.\n\tminSize _ zx size min: zy size.\n\t1 to: minSize do:[:index|\n\t\tsteps add:(zx at: index)@(zy at: index)].\n\t^steps asArray! !\n\n!Point methodsFor: 'point functions' stamp: 'ssa 11/16/2008 02:35'!\natRandom\n\n\t^x atRandom @ y atRandom! !\n\n!Point methodsFor: 'point functions' stamp: 'ssa 1/30/2009 10:04'!\nmandist: aPoint \n\t\"Answer the Manhattan distance between aPoint and the receiver.\"\n\n\t^(x-aPoint x) abs + (y - aPoint y) abs! !\n\n!Point methodsFor: 'point functions' stamp: 'dmu 4/1/2009 20:49'!\nmanhattanDist: aPoint \n\t\"Answer the distance between aPoint and the receiver.\"\n\n\t| p |\n\tp _ aPoint - self.\n\t^ p x abs + p y abs! !\n\n!Point methodsFor: 'polar coordinates'!\ncomplexProduct: aPoint\n\n\t^((x * aPoint x) - (y * aPoint y)) @ ((x * aPoint y) + (y * aPoint x))! !\n\n!Point methodsFor: 'transforming' stamp: 'ssa 8/25/2009 14:26'!\nmoveBy: aPoint\n\t\"Alter the receiver by moving it by a Point.\"\n\n\t\n\tx _ x + aPoint x.\n\ty _ y + aPoint y.! !\n\n!Point methodsFor: 'transforming' stamp: 'ssa 2/8/2009 20:57'!\nwrapAround: aRectangle\n\t\"If the receiver lies outside aRectangle, return the nearest point on the other side of the rectangle, otherwise return self.\"\n\n\t| newX newY |\n\tnewX _ x.\n\tnewY _ y.\n\t(aRectangle containsPoint: self) ifTrue: [^ self].\n\tx >= aRectangle right ifTrue:[newX _ aRectangle left].\n\tx <= aRectangle left ifTrue:[newX _ aRectangle right].\n\ty >= aRectangle bottom ifTrue:[newY _ aRectangle top].\n\ty <= aRectangle top ifTrue:[newY _ aRectangle bottom].\n\t^newX@newY! !\n\n!Point methodsFor: 'truncation and round off' stamp: 'ssa 8/25/2009 14:08'!\nceiling\n\t\"Answer a new Point that is the receiver's x and y ceiling.\"\n\n\t^x ceiling @ y ceiling! !\n\n!Point methodsFor: 'truncation and round off' stamp: 'ssa 8/25/2009 14:07'!\nfloor\n\t\"Answer a new Point that is the receiver's x and y floor.\"\n\n\t^x floor @ y floor! !\n\n!Point methodsFor: '*Ly' stamp: 'dmu 1/25/2010 14:02'!\nminus: arg \n\t\"Answer a Point that is the difference of the receiver and arg.\"\n\n\targ isPoint ifTrue: [^ (x - arg x) @ (y - arg y)].\n\t^ arg adaptToPoint: self andSend: #-! !\n\n!Point methodsFor: '*Ly' stamp: 'dmu 3/16/2010 23:16'!\nperturb: n\n\t| r |\n\tr _ Random new.\n\t^ self + ( r next @r next   *  n  - (n / 2.0) )! !\n\n!PointerExplorer methodsFor: 'accessing' stamp: 'ab 8/22/2003 18:51'!\ngetList\n\t^Array with: (PointerExplorerWrapper with: rootObject name: rootObject identityHash asString model: self)\n! !\n\n!PointerExplorer commentStamp: 'avi 8/21/2004 20:01' prior: 0!\nA variant on the ObjectExlorer that works \"backwards\": like the ObjectExplorer, it shows a tree of objects, but expanding a node won't show the objects which that node references, but rather the objects that reference that node.  Its main use is to track down memory leaks: if you want to know why a particular object is still alive, open a PointerExplorer on it and drill down until you find the root object that's referencing it.  For example, find all the references to the symbol #zot with:\n\nPointerExplorer new openExplorerFor: #zot\n\nFor the \"name\" of the object, the PointerExplorer shows each object's identityHash, to allow the user to identify when two similar objects are identical and notice cycles.!\n!PointerExplorerWrapper methodsFor: 'accessing' stamp: 'ssa 9/11/2009 16:23'!\ncontents\n\t| objects |\n\tobjects := Utilities pointersTo: item except: (Array with: self with: model).\t\n\t^(objects reject: [:ea | ea class = self class])\n\t\tcollect: [:ea| self class with: ea name: ea identityHash asString model: item parent: self]! !\n\n!PointerExplorerWrapper methodsFor: 'testing' stamp: 'ab 8/22/2003 18:39'!\nhasContents\n\t^true! !\n\n!PointerExplorerWrapper commentStamp: 'avi 8/21/2004 19:58' prior: 0!\nA subclass of ObjectExplorerWrapper for use with PointerExplorer.  #contents is overridden to work backwards: it returns wrappers for the objects pointing to item rather than for the objects that item points to.!\n!PointerFinder methodsFor: 'morphic ui' stamp: 'ssa 3/9/2010 16:29'!\nmenu: aMenu shifted: shifted\n\t\"Note that unless we override perform:orSendTo:, PluggableTextController will respond to all menu items in a text pane\"\n\t^SelectionMenu\n\t\tlabels:\n'inpsect\nsearch again'\n\t\tlines: #()\n\t\tselections: #(inspectObject searchAgain).! !\n\n!PointerFinder methodsFor: 'morphic ui' stamp: 'ssa 3/9/2010 16:37'!\nopen\n\t| topView listView |\n\t\ttopView := StandardSystemView new\n\t\t\t\tlabel: 'Pointer FInder'; \n\t\t\t\tmodel: self;\n\t\t\t\tyourself.\n\ttopView addSubView:(listView := PluggableListView\n\t\ton: self\n\t\tlist: #pointerList\n\t\tselected: #pointerListIndex\n\t\tchangeSelected: #pointerListIndex:\n\t\tmenu: #menu:shifted:\n\t\tkeystroke: #arrowKey:from:)\n\tin:(0@0 extent: 1@1)\n\tborderWidth:1.\n\tlistView backgroundColor: Color lightMagenta.\n\ttopView controller open! !\n\n!PointerFinder class methodsFor: 'utilities' stamp: 'sd 9/24/2004 20:49'!\npointersTo: anObject\n\t\"Find all occurrences in the system of pointers to the argument anObject.\"\n\t\"(PointerFinder pointersTo: Browser) inspect.\"\n\n\t^ self pointersTo: anObject except: #()\n! !\n\n!PointerFinder class methodsFor: 'utilities' stamp: 'sd 11/20/2005 21:28'!\npointersTo: anObject except: objectsToExclude\n\t\"Find all occurrences in the system of pointers to the argument anObject. \n\tRemove objects in the exclusion list from the results.\"\n\t\n\t| results anObj |\n\tSmalltalk garbageCollect.\n\t\"big collection shouldn't grow, so it's contents array is always the same\"\n\tresults := OrderedCollection new: 1000.\n\n\t\"allObjectsDo: is expanded inline to keep spurious\n\t method and block contexts out of the results\"\n\tanObj := self someObject.\n\t[0 == anObj] whileFalse: [\n\t\tanObj isInMemory ifTrue: [\n\t\t\t(anObj pointsTo: anObject) ifTrue: [\n\t\t\t\t\"exclude the results collector and contexts in call chain\"\n\t\t\t\t((anObj ~~ results collector) and:\n\t\t\t\t [(anObj ~~ objectsToExclude) and:\n\t\t\t\t [(anObj ~~ thisContext) and:\n\t\t\t\t [(anObj ~~ thisContext sender) and:\n\t\t\t\t [anObj ~~ thisContext sender sender]]]])\n\t\t\t\t\t ifTrue: [ results add: anObj ].\n\t\t\t]].\n\t\tanObj := anObj nextObject.\n\t].\n\tobjectsToExclude do: [ :obj | results removeAllSuchThat: [ :el | el == obj]].\n\n\t^ results asArray\n! !\n\n!PointerFinder class methodsFor: 'utilities' stamp: 'sd 9/24/2004 20:48'!\npointersToItem: index of: anArray\n\t\"Find all occurrences in the system of pointers to the given element of the given array. \n\tThis is useful for tracing up a pointer chain from an inspector on the results of a previous \tcall of pointersTo:. To find out who points to the second element of the results, one would \tevaluate:\n\n\t\tPointerFinder pointersToItem: 2 of: self\n\n\tin the inspector.\"\n\n\t^ self pointersTo: (anArray at: index) except: (Array with: anArray)! !\n\n!PopUpMenu methodsFor: 'basic control sequence' stamp: 'ssa 4/19/2010 20:04'!\nstartUpWithCaption: captionOrNil\n\t\"Display the menu, slightly offset from the cursor,\n\tso that a slight tweak is required to confirm any action.\"\n\t^ self startUpWithCaption: captionOrNil at: Sensor cursorPoint! !\n\n!PopUpMenu methodsFor: 'basic control sequence' stamp: 'ssa 4/19/2010 20:12'!\nstartUpWithCaption: captionOrNil at: location allowKeyboard: aBoolean\n\t\"Display the menu, with caption if supplied. Wait for the mouse button to go down, then track the selection as long as the button is pressed. When the button is released,\n\tAnswer the index of the current selection, or zero if the mouse is not released over  any menu item. Location specifies the desired topLeft of the menu body rectangle. The final argument indicates whether the menu should seize the keyboard focus in order to allow the user to navigate it via the keyboard.\"\n\n\t| maxHeight |\n\t\"self terminateRedundantUIProcessIfAny.\"\n\tmaxHeight _ Display height*3//4.\n\tself frameHeight > maxHeight ifTrue:\n\t\t[^ self\n\t\t\tstartUpSegmented: maxHeight\n\t\t\twithCaption: captionOrNil\n\t\t\tat: location\n\t\t\tallowKeyboard: aBoolean].\n\n\n\n\tframe ifNil: [self computeForm].\n\tCursor normal showWhile:\n\t\t[self\n\t\t\tdisplayAt: location\n\t\t\twithCaption: captionOrNil\n\t\t\tduring: [self controlActivity]].\n\t^ selection! !\n\n!PopUpMenu methodsFor: '*RVM' stamp: 'ssa 3/1/2010 13:43'!\nlastStartupTime\n\t^ LastStartupTime ifNil: [LastStartupTime _ 0] ifNotNil: [LastStartupTime] ! !\n\n!PopUpMenu methodsFor: '*RVM' stamp: 'ssa 3/1/2010 13:43'!\nlastStartupTime: t\n\tLastStartupTime _ t ! !\n\n!PopUpMenu methodsFor: '*RVM' stamp: 'ads 1/30/2011 15:20'!\nterminateRedundantUIProcessIfAny\n\t\"kill a redundant UI process if there is one; judge by pop-up time\"\n\t\"[self halt] fork\"\n\t|now delta |\n\tnow _ Time millisecondClockValue.\n\tdelta _ now - self lastStartupTime.\n\t(delta   <= (RVMOperations isRVM ifTrue:[100]ifFalse:[^10]) and: [delta > 0]) ifTrue: [\" self lastStartupProcess\" \n\t\tTranscript resetSemaphore show: 'terminateRedundantUIProcessIfAny zap!!'; cr.\n\t\tProcessor thisProcess terminate ].\n\tself lastStartupTime: now! !\n\n!PositionableStream methodsFor: 'fileIn/Out' stamp: 'StefanMarr 7/14/2011 17:11'!\ncopyPreamble: preamble from: aStream\n\t\"Look for a changeStamp for this method by peeking backward.\n\tWrite a method preamble, with that stamp if found.\"\n\t| terminator methodPos p last75 stamp i |\n\tterminator _ $!!.\n\n\t\"Look back to find stamp in old preamble, such as...\n\tPolygon methodsFor: 'private' stamp: 'di 6/25/97 21:42' prior: 34957598!! \"\n\tmethodPos _ aStream position.\n\taStream position: (p _ 0 max: methodPos-75).\n\tlast75 _ aStream next: methodPos - p.\n\tstamp _ String new.\n\t(i _ last75 findString: 'stamp:' startingAt: 1) > 0 ifTrue:\n\t\t[stamp _ (last75 copyFrom: i+8 to: last75 size) copyUpTo: $'].\n\n\t\"Write the new preamble, with old stamp if any.\"\n\tself cr; nextPut: terminator.\n\tself nextChunkPut: (String streamContents:\n\t\t[:strm |\n\t\tstrm nextPutAll: preamble.\n\t\tstamp size > 0 ifTrue:\n\t\t\t[strm nextPutAll: ' stamp: '; print: stamp]]).\n\tself cr! !\n\n!PositionableStream methodsFor: 'printing' stamp: 'ssa 8/19/2009 20:08'!\nprintOn: aStream\n\n\taStream nextPutAll:'@',self position printString,' in '.\n\t^super printOn: aStream! !\n\n!PositionableStream methodsFor: '*packageinfo-base' stamp: 'nk 6/17/2003 07:45'!\nuntilEnd: aBlock displayingProgress: aString\n\taString\n\t\tdisplayProgressAt: Sensor cursorPoint\n\t\tfrom: 0 to: self size\n\t\tduring:\n\t\t\t[:bar |\n\t\t\t[self atEnd] whileFalse:\n\t\t\t\t[bar value: self position.\n\t\t\t\taBlock value]].! !\n\n!Preferences class methodsFor: 'get/set' stamp: 'ssa 3/24/2010 15:18'!\nenable: aSymbol\n\t\"Shorthand access to enabling a preference of the given name.  If there is none in the image, conjure one up\"\n\n\t| aPreference |\n\taPreference _ self preferenceAt: aSymbol ifAbsent:\n\t\t[self addPreference: aSymbol category: 'unclassified' default: false balloonHelp: 'this preference was added idiosyncratically and has no help message.'.\n\t\tself preferenceAt: aSymbol].\n\taPreference preferenceValue: true! !\n\n!Process methodsFor: 'accessing' stamp: 'dmu 3/8/2010 20:26'!\nerrorHandler\n\t\"Answer the value of errorHandler\"\n\n\terrorHandler isNil ifTrue:[self errorHandler: nil].\n\t^ errorHandler! !\n\n!Process methodsFor: 'accessing' stamp: 'dmu 3/8/2010 20:26'!\nerrorHandler: anObject\n\t\"Set the value of errorHandler\"\n\n\terrorHandler _ anObject! !\n\n!Process methodsFor: 'accessing' stamp: 'ssa 2/17/2009 22:34'!\nisActiveProcess\n\n\t^ suspendedContext isNil and:[myList notNil]! !\n\n!Process methodsFor: 'accessing' stamp: 'dmu 3/8/2010 20:26'!\nmyList\n\t\"Answer the value of myList\"\n\n\tmyList isNil ifTrue:[self myList: nil].\n\t^ myList! !\n\n!Process methodsFor: 'accessing' stamp: 'dmu 3/8/2010 20:26'!\nmyList: anObject\n\t\"Set the value of myList\"\n\n\tmyList _ anObject! !\n\n!Process methodsFor: 'changing process state' stamp: 'ads 2/2/2011 14:51'!\nprimitiveSuspend\n\t\"Primitive. Stop the process that self represents in such a way \n\tthat it can be restarted at a later time (by sending #resume).\n\tASSUMES self is the active process.\n\tEssential. See Object documentation whatIsAPrimitive.\"\n\n\t\"Debugging code below causes terminated running processes to seem not terminated. -- dmu 3/2/10\"\n\t\"(myList isNil and: [RVMOperations isRVM]) ifTrue:[self halt].\"\n\t<primitive: 88>\n\tself primitiveFailed! !\n\n!Process methodsFor: 'changing process state' stamp: 'dmu 3/24/2010 15:44'!\nresume\n\t\"Allow the process that the receiver represents to continue. Put  \n\tthe receiver in line to become the activeProcess. Check for a nil \n\tsuspendedContext, which indicates a previously terminated Process that \n\twould cause a vm crash if the resume attempt were permitted\"\n\tself children do: [:c| c resume].\n\tsuspendedContext ifNil: [^ self primitiveFailed].\n\t^ self primitiveResume! !\n\n!Process methodsFor: 'changing process state' stamp: 'dmu 1/29/2011 21:18'!\nsuspend\n\t\"Stop the process that the receiver represents in such a way \n\tthat it can be restarted at a later time (by sending the receiver the \n\tmessage resume). If the receiver represents the activeProcess, suspend it. \n\tOtherwise remove the receiver from the list of waiting processes.\"\n\t| aCopyOfMyListWhichIsSafeFromRaces |\n\tself children do: [:c| c suspend].\n\tself isActiveProcess ifTrue: [\n\t\tself nilMyListUnlessRVM.\n\t\tself primitiveSuspend.\n\t] ifFalse: [\n\t\taCopyOfMyListWhichIsSafeFromRaces _ myList.\n\t\taCopyOfMyListWhichIsSafeFromRaces ifNotNil: [\n\t\t\taCopyOfMyListWhichIsSafeFromRaces remove: self ifAbsent: [].\n\t\t\tmyList _ nil].\n\t]\n! !\n\n!Process methodsFor: 'changing process state' stamp: 'dmu 3/24/2010 15:45'!\nterminate \n\t\"Stop the process that the receiver represents forever.  Unwind to execute pending ensure:/ifCurtailed: blocks before terminating.\"\n\n\t| ctxt unwindBlock |\n\tself children do: [:c| c terminate].\n\tself == Processor thisProcess  ifTrue: [\n\t\tctxt _ thisContext.\n\t\t[\tctxt _ ctxt findNextUnwindContextUpTo: nil.\n\t\t\tctxt isNil\n\t\t] whileFalse: [\n\t\t\tunwindBlock _ ctxt tempAt: 1.\n\t\t\tunwindBlock ifNotNil: [\n\t\t\t\tctxt tempAt: 1 put: nil.\n\t\t\t\tthisContext terminateTo: ctxt.\n\t\t\t\tunwindBlock value].\n\t\t].\n\t\tthisContext terminateTo: nil.\n\t\tself nilMyListUnlessRVM.\n\t\tself primitiveSuspend.\n\t] ifFalse: [\n\t        self suspend.\n\t\tmyList ifNotNil: [\n\t\t\tmyList remove: self ifAbsent: [].\n\t\t\tmyList _ nil].\n\t\tsuspendedContext ifNotNil: [\n\t\t\tctxt _ self popTo: suspendedContext bottomContext.\n\t\t\tctxt == suspendedContext bottomContext ifFalse: [\n\t\t\t\tself debug: ctxt title: 'Unwind error during termination']].\n\t].\n! !\n\n!Process methodsFor: 'changing suspended state' stamp: 'dmu 12/2/2008 14:05'!\nactivateReturn: aContext value: value\n\t\"Activate 'aContext return: value', so execution will return to aContext's sender\"\n\tself suspend.\n\t^ suspendedContext _ suspendedContext activateReturn: aContext value: value! !\n\n!Process methodsFor: 'changing suspended state' stamp: 'dmu 12/2/2008 14:01'!\ncomplete: aContext \n\t\"Run self until aContext is popped or an unhandled error is raised.  Return self's new top context, unless an unhandled error was raised then return the signaler context (rather than open a debugger).\"\n\t\n\t| ctxt pair error |\n\tself suspend.\n\tctxt _ suspendedContext.\n\tsuspendedContext _ nil.  \"disable this process while running its stack in active process below\"\n\tpair _ ctxt runUntilErrorOrReturnFrom: aContext.\n\tsuspendedContext _ pair first.\n\terror _ pair second.\n\terror ifNotNil: [^ error signalerContext].\n\t^ suspendedContext! !\n\n!Process methodsFor: 'changing suspended state' stamp: 'dmu 11/25/2008 00:21'!\npopTo: aContext \n\t\"Pop self down to aContext by remote returning from aContext's callee.  Unwind blocks will be executed on the way.\n\tThis is done by pushing a new context on top which executes 'aContext callee return' then resuming self until aContext is reached.  This way any errors raised in an unwind block will get handled by senders in self and not by senders in the activeProcess.\n\tIf an unwind block raises an error that is not handled then the popping stops at the error and the signalling context is returned, othewise aContext is returned.\"\n\n\t| callee |\n\t(Processor isActive: self)\n\t\tifTrue: [^ self error: 'The active process cannot pop contexts'].\n\tcallee _ (self calleeOf: aContext) ifNil: [^ aContext].  \"aContext is on top\"\n\t^ self return: callee value: callee receiver! !\n\n!Process methodsFor: 'changing suspended state' stamp: 'dmu 12/2/2008 14:04'!\nreturn: aContext value: value\n\t\"Pop thread down to aContext's sender.  Execute any unwind blocks on the way.  See #popTo: comment and #runUntilErrorOrReturnFrom: for more details.\"\n        self suspend.\n\tsuspendedContext == aContext ifTrue: [\n\t\t^ suspendedContext _ aContext return: value from: aContext].\n\tself activateReturn: aContext value: value.\n\t^ self complete: aContext.\n! !\n\n!Process methodsFor: 'changing suspended state' stamp: 'dmu 12/2/2008 14:03'!\nstep\n         self suspend.\n\t^ suspendedContext _ suspendedContext step! !\n\n!Process methodsFor: 'changing suspended state' stamp: 'dmu 12/2/2008 14:04'!\nstepToCallee\n\t\"Step until top context changes\"\n\n\t| ctxt |\n\tself suspend.\n\tctxt _ suspendedContext.\n\t[ctxt == suspendedContext] whileTrue: [\n\t\tsuspendedContext _ suspendedContext step].\n\t^ suspendedContext! !\n\n!Process methodsFor: 'changing suspended state' stamp: 'dmu 12/2/2008 14:05'!\nstepToSendOrReturn\nself suspend.\n\t^ suspendedContext _ suspendedContext stepToSendOrReturn! !\n\n!Process methodsFor: 'debugging' stamp: 'dmu 9/17/2010 12:03'!\ndebug: context title: title full: bool\n\t\"Open debugger on self with context shown on top\"\n\n\t| topCtxt |\n\ttopCtxt _ self == Processor thisProcess ifTrue: [thisContext] \n\t\tifFalse: [\n\t\t\tself suspend.  \n\t\t\tself suspendedContextWaitingIfNecessary].\n\t(topCtxt hasContext: context) ifFalse: [^ self error: 'context not in process'].\n\tTranscript cr; show: 'Suspending siblings & progeny'.\n\tself class semaForSupensions critical:[ self siblings size print.\n\t\tself siblingsAndTheirDescendantsDo: [:proc|\n\t\t\tproc == Processor thisProcess ifFalse: [Transcript cr;show:'suspending proc ',proc identityHash printString.\n\t\t\t\tproc suspend]].\n\t\t].\n\t\tTranscript cr; show: 'launching debugger'.\n\tDebugger openOn: self context: context label: title contents: nil fullView: bool.\n! !\n\n!Process methodsFor: 'debugging' stamp: 'dmu 9/17/2010 12:03'!\ndebugWithTitle: title\n\t\"Open debugger on self\"\n\n\t| context |\n\tcontext _ self == Processor thisProcess ifTrue: [thisContext] ifFalse: [ self suspend.  self suspendedContextWaitingIfNecessary].\n\tself debug: context title: title full: true.\n! !\n\n!Process methodsFor: 'printing' stamp: 'ads 1/24/2011 13:03'!\nlongPrintOn: stream\n\n\t| ctxt |\nstream nextPutAll: (RVMPrimitivesNeededForBootstrapping printPrefixFor: self).\n\tsuper printOn: stream.\n\tstream cr.\n\tctxt _ self suspendedContext.\n\t[ctxt == nil] whileFalse: [\n\t\tstream space.\n\t\tctxt printOn: stream.\n\t\tstream cr.\n\t\tctxt _ ctxt sender.\n\t].\n! !\n\n!Process methodsFor: 'signaling' stamp: 'ssa 2/17/2009 22:31'!\npvtSignal: anException list: aList\n\t\"Private. This method is used to signal an exception from another\n\tprocess...the receiver must be the active process.  If the receiver \n\twas previously waiting on a Semaphore, then return the process\n\tto the waiting state after signaling the exception and if the Semaphore\n\thas not been signaled in the interim\"\n\n\t\"Since this method is not called in a normal way, we need to take care\n\tthat it doesn't directly return to the caller (because I believe that could\n\thave the potential to push an unwanted object on the caller's stack).\"\n\n\t| blocker |\n\tself == Processor thisProcess ifFalse: [^self].\n\tself suspend.\n\tanException signal.\n\tblocker := Semaphore new.\n\t[self suspend.\n\tsuspendedContext := suspendedContext swapSender: nil.\n\taList class == Semaphore \n\t\tifTrue:\n\t\t\t[aList isSignaled\n\t\t\t\tifTrue: \n\t\t\t\t\t[aList wait.  \"Consume the signal that would have restarted the receiver\"\n\t\t\t\t\tself resume]\n\t\t\t\tifFalse:\n\t\t\t\t\t[\"Add us back to the Semaphore's list (and remain blocked)\"\n\t\t\t\t\tmyList := aList.\n\t\t\t\t\taList add: self]]\n\t\tifFalse: [self resume]] fork.\n\tblocker wait.\n\n\n! !\n\n!Process methodsFor: 'signaling' stamp: 'ssa 2/17/2009 22:30'!\nsignal: anException\n\t\"Signal an exception in the receiver process...if the receiver is currently\n\tsuspended, the exception will get signaled when the receiver is resumed.  If \n\tthe receiver is blocked on a Semaphore, it will be immediately re-awakened\n\tand the exception will be signaled; if the exception is resumed, then the receiver\n\twill return to a blocked state unless the blocking Semaphore has excess signals\"\n\n\t\"If we are the active process, go ahead and signal the exception\"\n\tself == Processor thisProcess ifTrue: [^anException signal].\n\n        self suspend.\n\n\t\"Add a new method context to the stack that will signal the exception\"\n\tsuspendedContext := MethodContext\n\t\tsender: suspendedContext\n\t\treceiver: self\n\t\tmethod: (self class methodDict at: #pvtSignal:list:)\n\t\targuments: (Array with: anException with: myList).\n\n\t\"If we are on a list to run, then suspend and restart the receiver \n\t(this lets the receiver run if it is currently blocked on a semaphore).  If\n\twe are not on a list to be run (i.e. this process is suspended), then when the\n\tprocess is resumed, it will signal the exception\"\n\n\tmyList ifNotNil: [self suspend; resume].! !\n\n!Process methodsFor: '*RVMBootstrap' stamp: 'dmu 5/9/2009 23:08'!\nisRunning\n\tProcessor thisProcess == self ifTrue: [^ true].\n\tself isActiveProcess ifTrue: [^ true].\n\tmyList ifNil: [^ false].\n\t^ myList class ~~ Semaphore! !\n\n!Process methodsFor: '*RVMBootstrap' stamp: 'ssa 3/2/2010 18:23'!\nnilMyListUnlessRVM\n\tProcessor areRunningProcessesInSchedulerLists ifFalse: [\n\t\t\"primitiveSuspend will use myList to remove from list and will nil it out\"\n\t\tmyList _ nil.\n\t]! !\n\n!Process methodsFor: '*RVMBootstrap' stamp: 'dmu 9/17/2010 11:59'!\nsuspendedContextWaitingIfNecessary\n\t\"In RVM, can suspend some other running process, and so after sending suspend, suspendedContext may still be nil.\"\n\t\n\t[self suspendedContext isNil] whileTrue.\n\t^ self suspendedContext! !\n\n!Process methodsFor: '*Ly' stamp: 'dmu 9/3/2010 16:30'!\nlyDebuggingBlock\n\t\"Answer the value of lyDebuggingBlock\"\n\n\tlyDebuggingBlock isNil ifTrue:[self lyDebuggingBlock: nil].\n\t^ lyDebuggingBlock! !\n\n!Process methodsFor: '*Ly' stamp: 'dmu 9/3/2010 16:30'!\nlyDebuggingBlock: anObject\n\t\"Set the value of lyDebuggingBlock\"\n\n\tlyDebuggingBlock _ anObject! !\n\n!Process methodsFor: '*Ly' stamp: 'dmu 3/9/2010 14:59'!\nstopIfDebugging: whatIAmAboutToDo\n\t| |\n\tself lyDebuggingBlock ifNil: [^ self].\n\tself lyDebuggingBlock value: whatIAmAboutToDo! !\n\n!Process methodsFor: '*RVM' stamp: 'ssa 2/26/2009 02:57'!\navoidCore: anIndex\n\t\"Force this process to avoid this core (0-55)\"\n\tself coreMask: (self coreMask bitClear: (1 bitShift: anIndex))! !\n\n!Process methodsFor: '*RVM' stamp: 'ssa 2/26/2009 03:49'!\navoidCores: aCollectionOfIndicies\n\t\"Force this process to avoid these cores (0-55)\"\n\t| mask |\n\tmask _ 0.\n\taCollectionOfIndicies do:[:index| mask _ mask bitOr: (1 bitShift: index)].\n\tself coreMask: (self coreMask bitClear:mask)! !\n\n!Process methodsFor: '*RVM' stamp: 'dmu 2/12/2009 23:15'!\ncoreMask ^ coreMask! !\n\n!Process methodsFor: '*RVM' stamp: 'dmu 2/12/2009 23:15'!\ncoreMask: m coreMask _ m! !\n\n!Process methodsFor: '*RVM' stamp: 'dmu 2/12/2009 23:14'!\nhostCore ^ hostCore! !\n\n!Process methodsFor: '*RVM' stamp: 'dmu 3/8/2010 20:26'!\nhostCore: anObject\n\t\"Set the value of hostCore\"\n\n\thostCore _ anObject! !\n\n!Process methodsFor: '*RVM' stamp: 'dmu 4/7/2009 02:41'!\nresumeOn: aCore\n  self useOnlyCore: aCore.\n  self resume! !\n\n!Process methodsFor: '*RVM' stamp: 'ssa 2/26/2009 02:59'!\nuseAdditionalCore: anIndex\n\t\"Force this process to only urn on this core (0-55)\"\n\tself coreMask: (self coreMask bitOr:(1 bitShift: anIndex))! !\n\n!Process methodsFor: '*RVM' stamp: 'ssa 2/26/2009 03:50'!\nuseAdditionalCores: aCollectionOfIndicies\n\t\"Allow this process to run on these additional cores (0-55)\"\n\t| mask |\n\tmask _ 0.\n\taCollectionOfIndicies do:[:index| mask _ mask bitOr: (1 bitShift: index)].\n\tself coreMask: (self coreMask bitOr:mask)! !\n\n!Process methodsFor: '*RVM' stamp: 'dmu 5/5/2009 01:32'!\nuseOnlyCore: anIndex\n\t\"Force this process to only run on this core (0-55)\"\n\tself coreMask: (1 bitShift: anIndex)! !\n\n!Process methodsFor: '*RVM' stamp: 'ssa 2/26/2009 03:02'!\nuseOnlyCores: aCollectionOfIndicies\n\t\"Force this process to only run on these cores (0-55)\"\n\t| mask |\n\tmask _ 0.\n\taCollectionOfIndicies do:[:index| mask _ mask bitOr: (1 bitShift: index)].\n\tself coreMask: mask! !\n\n!Process methodsFor: '*RVM' stamp: 'ads 1/30/2011 15:21'!\nuseOnlyMainCore\n\tRVMOperations isRVM ifTrue: [self useOnlyCore: (RVMMonitor getSample; mainRank)]! !\n\n!Process methodsFor: '*SlyBootstrap' stamp: 'dmu 3/24/2010 14:44'!\naddChild: aProcess\n\tself children add: aProcess.\n\taProcess parent: self.! !\n\n!Process methodsFor: '*SlyBootstrap' stamp: 'dmu 9/17/2010 11:12'!\nbeSlyMemberProcess\n\tself priority: Processor userBackgroundPriority.\n\tProcessor thisProcess addChild: self.\n\t^ self! !\n\n!Process methodsFor: '*SlyBootstrap' stamp: 'dmu 3/24/2010 14:42'!\nchildren\n\t\"Answer the value of children\"\n\n\tchildren isNil ifTrue:[self children: WeakSet new].\n\t^ children! !\n\n!Process methodsFor: '*SlyBootstrap' stamp: 'dmu 3/24/2010 14:38'!\nchildren: anObject\n\t\"Set the value of children\"\n\n\tchildren _ anObject! !\n\n!Process methodsFor: '*SlyBootstrap' stamp: 'dmu 3/25/2010 23:56'!\ncreatorEnsemble\n\t\"Answer the value of creatorEnsemble\"\n\n\tcreatorEnsemble isNil ifTrue:[self creatorEnsemble: nil].\n\t^ creatorEnsemble! !\n\n!Process methodsFor: '*SlyBootstrap' stamp: 'dmu 3/25/2010 23:56'!\ncreatorEnsemble: anObject\n\t\"Set the value of creatorEnsemble\"\n\n\tcreatorEnsemble _ anObject! !\n\n!Process methodsFor: '*SlyBootstrap' stamp: 'dmu 3/25/2010 10:30'!\ndescendantsDo: blk\n\tself children do: [:p | blk value: p. p descendantsDo: blk]! !\n\n!Process methodsFor: '*SlyBootstrap' stamp: 'dmu 3/26/2010 12:26'!\nmyGeneration\n\t^ self parent ifNil: [{self}] ifNotNil: [self parent children]! !\n\n!Process methodsFor: '*SlyBootstrap' stamp: 'dmu 3/25/2010 10:34'!\nmyGenerationAndTheirDescendantsDo: blk\n\tself myGeneration do: [:p | blk value: p. p descendantsDo: blk]! !\n\n!Process methodsFor: '*SlyBootstrap' stamp: 'dmu 3/24/2010 14:38'!\nparent\n\t\"Answer the value of parent\"\n\n\tparent isNil ifTrue:[self parent: nil].\n\t^ parent! !\n\n!Process methodsFor: '*SlyBootstrap' stamp: 'dmu 3/24/2010 14:38'!\nparent: anObject\n\t\"Set the value of parent\"\n\n\tparent _ anObject! !\n\n!Process methodsFor: '*SlyBootstrap' stamp: 'dmu 3/25/2010 10:34'!\nsiblings\n\t^ self myGeneration copyWithout: self! !\n\n!Process methodsFor: '*SlyBootstrap' stamp: 'dmu 3/25/2010 10:32'!\nsiblingsAndTheirDescendantsDo: blk\n\tself siblings do: [:p | blk value: p. p descendantsDo: blk]! !\n\n!Process methodsFor: '*SlyBootstrap' stamp: 'dmu 9/17/2010 11:57'!\nsynchronousSuspend\n\t\"In RVM, can suspend some other running process, and so after sending suspend, suspendedContext may still be nil.\"\n\t\"Send suspend and don't return till the process is really suspended\"\n\tself suspend.\n\t[self suspendedContext isNil] whileTrue.! !\n\n!Process class methodsFor: 'instance creation' stamp: 'dmu 3/24/2010 15:46'!\nforContext: aContext priority: anInteger \n\t\"Answer an instance of me that has suspended aContext at priority \n\tanInteger.\"\n\n\t| newProcess |\n\tnewProcess _ self new.\n\tnewProcess suspendedContext: aContext.\n\tnewProcess priority: anInteger.\n\t[newProcess coreMask:(1 bitShift: 27)].\n\t^newProcess! !\n\n!Process class methodsFor: '*RVM' stamp: 'ssa 2/26/2009 02:45'!\nforContext: aContext priority: anInteger coreMask: anIntegerMask\n\t\"Answer an instance of me that has suspended aContext at priority \n\tanInteger using this coreMask.\"\n\n\t| newProcess |\n\tnewProcess _ self forContext: aContext priority: anInteger.\n\tnewProcess coreMask:anIntegerMask.\n\t^newProcess! !\n\n!Process class methodsFor: '*RVMBootstrap' stamp: 'ssa 3/25/2010 15:11'!\nsemaForSupensions\n\n\tSemaForSupensions isNil ifTrue:[SemaForSupensions _ Semaphore forMutualExclusion].\n\t^SemaForSupensions! !\n\n!Process class methodsFor: 'testing-workaround-warning' stamp: 'sm 4/21/2011 23:43'!\nshouldNotBeRedefined\n\t^ false! !\n\n!ProcessBrowser methodsFor: 'stack list' stamp: 'dmu 11/25/2008 00:22'!\nupdateStackList: depth \n\t| suspendedContext oldHighlight |\n\tselectedProcess\n\t\tifNil: [^ self changeStackListTo: nil].\n\t(stackList notNil and: [ stackListIndex > 0 ])\n\t\tifTrue: [oldHighlight _ stackList at: stackListIndex].\n\t(Processor isActive: selectedProcess)\n\t\tifTrue: [self\n\t\t\t\tchangeStackListTo: (thisContext stackOfSize: depth)]\n\t\tifFalse: [suspendedContext _ selectedProcess suspendedContext.\n\t\t\tsuspendedContext\n\t\t\t\tifNil: [self changeStackListTo: nil]\n\t\t\t\tifNotNil: [self\n\t\t\t\t\t\tchangeStackListTo: (suspendedContext stackOfSize: depth)]].\n\tself\n\t\tstackListIndex: (stackList\n\t\t\t\tifNil: [0]\n\t\t\t\tifNotNil: [stackList indexOf: oldHighlight])! !\n\n!ProcessBrowser class methodsFor: 'process control' stamp: 'ssa 9/3/2008 11:08'!\nisUIProcess: aProcess\n\t^aProcess == ScheduledControllers activeControllerProcess ! !\n\n!ProcessBrowser class methodsFor: 'process control' stamp: 'ssa 6/11/2010 14:35'!\nnameAndRulesFor: aProcess \n\t\"Answer a nickname and two flags: allow-stop, and allow-debug\"\n\t^ [aProcess caseOf: {\n\t\t[ProcessorScheduler emergencyProcess] -> [{'emergency evaluator ShftCtrl-A'. false. true}].\n\t\t[] -> [{'no process'. false. false}].\n\t\t[Smalltalk lowSpaceWatcherProcess] -> [{'the low space watcher'. false. false}].\n\t\t[WeakArray runningFinalizationProcess] -> [{'the WeakArray finalization process'. false. false}].\n\t\t[Processor thisProcess] -> [{'the UI process'. false. true}].\n\t\t[Processor backgroundProcess] -> [{'the idle process'. false. false}].\n\t\t[Sensor interruptWatcherProcess] -> [{'the user interrupt watcher'. false. false}].\n\t\t[Sensor eventTicklerProcess] -> [{'the event tickler'. false. false}].\n\t\t[Project uiProcess] -> [{'the inactive Morphic UI process'. false. false}].\n\t\t[Smalltalk\n\t\t\tat: #SoundPlayer\n\t\t\tifPresent: [:sp | sp playerProcess]] -> [{'the Sound Player'. false. false}].\n\t\t[ScheduledControllers\n\t\t\tifNotNil: [ScheduledControllers activeControllerProcess]] -> [{'the inactive MVC controller process'. false. true}].\n\t\t[Smalltalk\n\t\t\tat: #CPUWatcher\n\t\t\tifPresent: [:cw | cw currentWatcherProcess]] -> [{'the CPUWatcher'. false. false}]}\n\t\t otherwise: \n\t\t\t[(aProcess priority = Processor timingPriority\n\t\t\t\t\tand: [aProcess suspendedContext receiver == Delay])\n\t\t\t\tifTrue: [{'the timer interrupt watcher'. false. false}]\n\t\t\t\tifFalse: [{aProcess suspendedContext asString. true. true}]]]\n\t\tifError: [:err :rcvr | {aProcess suspendedContext asString. true. true}]! !\n\n!ProcessorScheduler methodsFor: 'accessing' stamp: 'dmu 11/25/2008 00:23'!\nactivePriority\n\t\"Answer the priority level of the currently running Process.\"\n\n\t^self thisProcess priority! !\n\n!ProcessorScheduler methodsFor: 'process state change' stamp: 'dmu 11/25/2008 00:23'!\nterminateActive\n\t\"Terminate the process that is currently running.\"\n\n\tself thisProcess terminate! !\n\n!ProcessorScheduler methodsFor: 'removing' stamp: 'ssa 6/11/2010 14:37'!\nremoveAllPossible\n\t\"Terminate and remove all processes that you can.\n\tThis should leave the standard set only\"\n\tself terminatableProcesses print do:[:proc| proc terminate]! !\n\n!ProcessorScheduler methodsFor: 'removing' stamp: 'ssa 6/11/2010 14:31'!\nterminatableProcesses\n\t\"Answer all current processes that may be user terminated like in the ProcessBrowser\"\n\t\"self terminatableProcesses\"\n\t| processList |\n\tSmalltalk garbageCollectMost. \"lose defunct processes\"\n\n\tprocessList _ Process allSubInstances\n\t\t\t\treject: [:each | each isTerminated].\n\tprocessList _ processList\n\t\t\t\tsortBy: [:a :b | a priority >= b priority].\n\tprocessList _ WeakArray withAll: processList.\n\t^processList select:[:proc| (ProcessBrowser nameAndRulesFor: proc) at: 2]! !\n\n!ProcessorScheduler methodsFor: '*RVMBootstrap' stamp: 'ads 1/24/2011 13:01'!\nareRunningProcessesInSchedulerLists\n\t\"Our RVM follows Pallas' MS system and keeps runnable processes in the scheduler lists even when running.\"\n\t^RVMPrimitivesNeededForBootstrapping isRVM! !\n\n!ProcessorScheduler methodsFor: '*RVMBootstrap' stamp: 'dmu 11/25/2008 00:26'!\nisActive: aProcess\n^ aProcess suspendedContext ==  nil! !\n\n!ProcessorScheduler methodsFor: '*RVMBootstrap' stamp: 'dmu 12/7/2008 20:43'!\nthisProcess\n<primitive: 'primitiveThisProcess' > \"must not specify module in order to hit obsolete_named_primitive_table and thus be local\"\n ^ self activeProcess! !\n\n!ProcessorScheduler methodsFor: '*Sly3Bootstrap' stamp: 'dmu 9/17/2010 12:18'!\ndebugMemberProcesses\n\tself suspendMemberProcesses.\n\tself memberProcesses do: [:p| p  debug]! !\n\n!ProcessorScheduler methodsFor: '*Sly3Bootstrap' stamp: 'dmu 9/17/2010 11:16'!\nmemberProcesses\n\t^Process allInstances select: [:proc | proc creatorEnsemble notNil]! !\n\n!ProcessorScheduler methodsFor: '*Sly3Bootstrap' stamp: 'dmu 2/23/2011 18:05'!\nsuspendMemberProcesses\n\tself memberProcesses do: [:p| p ~= self thisProcess ifTrue: [p suspend]]! !\n\n!ProcessorScheduler methodsFor: '*Sly3Bootstrap' stamp: 'dmu 9/17/2010 11:17'!\nterminateMemberProcesses\n\tself memberProcesses do: [:p| p terminate]! !\n\n!ProcessorScheduler methodsFor: '*Sly3Bootstrap' stamp: 'dmu 9/17/2010 11:02'!\nuserBackgroundPriority\n\t^ UserBackgroundPriority! !\n\n!ProcessorScheduler methodsFor: '*RVM' stamp: 'ads 1/30/2011 15:21'!\nyieldIfFewerCoresThan: n\n\tRVMOperations coreCount < n    ifTrue: [self yield]! !\n\n!ProcessorScheduler class methodsFor: 'background process' stamp: 'sm 2/24/2011 16:42'!\nstartUp\n\t\"Install a background process of the lowest possible priority that is always runnable.\"\n\t\"Details: The virtual machine requires that there is aways some runnable process that can be scheduled; this background process ensures that this is the case.\"\n\n\tSmalltalk installLowSpaceWatcher.\n\tBackgroundProcess == nil ifFalse: [BackgroundProcess terminate].\n\tBackgroundProcess _ [self idleProcess] newProcess.\n\t[BackgroundProcess useOnlyCore: (RVMMonitor getSample; mainRank).].\n\tBackgroundProcess priority: SystemRockBottomPriority.\n\tBackgroundProcess name: 'IdleProcess'.\n\tBackgroundProcess resume.\n\tself startEmergencyProcess\n! !\n\n!ProcessorScheduler class methodsFor: '*RVMBootstrap' stamp: 'ssa 6/11/2010 14:34'!\nemergencyProcess\n\t^ EmergencyProcess! !\n\n!ProcessorScheduler class methodsFor: '*RVMBootstrap' stamp: 'ads 1/24/2011 13:04'!\nstartEmergencyProcess\n\t\"Bring up an emergency evaluator if the user hits control-shift-a\"\n\t\"self startEmergencyProcess\"\n\t\"self startEmergencyProcess. RVMPrimitivesNeededForBootstrapping getEmergencySemaphore signal\"\n\t| sema |\n\tsema _ Semaphore new.\n\tRVMPrimitivesNeededForBootstrapping setEmergencySemaphore: sema.\n\tEmergencyProcess ifNotNil: [EmergencyProcess terminate].\n\t^ EmergencyProcess _ [[sema wait. Transcripter emergencyEvaluator] repeat] forkAt: Processor userInterruptPriority! !\n\n!Project methodsFor: 'initialization' stamp: 'ssa 1/22/2010 14:06'!\nbackgroundColorForMvcProject\n\t^ Color r: 1.0 g: 1.0 b: 0.65! !\n\n!Project methodsFor: 'initialization' stamp: 'ssa 9/3/2008 11:08'!\ndefaultBackgroundColor\n\t^ self isMorphic\n\t\tifTrue: []\n\t\tifFalse: [self backgroundColorForMvcProject]! !\n\n!Project methodsFor: 'accessing' stamp: 'ssa 9/3/2008 11:21'!\nrenameTo: newName\n\t| |\n\tnewName = self name\n\t\tifFalse: [\n\t\t\tversion _ nil.\n\t\t\tself changeSet name: newName.\n\t\t\t].! !\n\n!Project methodsFor: 'menu messages' stamp: 'ssa 9/3/2008 11:09'!\nenter: returningFlag revert: revertFlag saveForRevert: saveForRevert \n\t\"Install my ChangeSet, Transcript, and scheduled views as current \n\tglobals. If returningFlag is true, we will return to the project from \n\twhence the current project was entered; don't change its \n\tpreviousProject link in this case. \n\tIf saveForRevert is true, save the ImageSegment of the project being \n\tleft. If revertFlag is true, make stubs for the world of the project being \n\tleft. If revertWithoutAsking is true in the project being left, then \n\talways revert.\"\n\t| showZoom old forceRevert response seg newProcess |\n\tself isCurrentProject\n\t\tifTrue: [^ self].\n\t\"Check the guards\"\n\tguards\n\t\tifNotNil: [guards := guards\n\t\t\t\t\t\treject: [:obj | obj isNil].\n\t\t\tguards\n\t\t\t\tdo: [:obj | obj okayToEnterProject\n\t\t\t\t\t\tifFalse: [^ self]]].\n\tCurrentProject world triggerEvent: #aboutToLeaveWorld.\n\tforceRevert := false.\n\tCurrentProject rawParameters\n\t\tifNil: [revertFlag\n\t\t\t\tifTrue: [^ self inform: 'nothing to revert to']]\n\t\tifNotNil: [saveForRevert\n\t\t\t\tifFalse: [forceRevert := CurrentProject projectParameters\n\t\t\t\t\t\t\t\tat: #revertWithoutAsking\n\t\t\t\t\t\t\t\tifAbsent: [false]]].\n\tforceRevert not & revertFlag\n\t\tifTrue: [response := SelectionMenu\n\t\t\t\t\t\tconfirm: 'Are you sure you want to destroy this Project\\ and revert to an older version?\\\\(From the parent project, click on this project''s thumbnail.)' withCRs\n\t\t\t\t\t\ttrueChoice: 'Revert to saved version'\n\t\t\t\t\t\tfalseChoice: 'Cancel'.\n\t\t\tresponse\n\t\t\t\tifFalse: [^ self]].\n\trevertFlag | forceRevert\n\t\tifTrue: [seg := CurrentProject projectParameters\n\t\t\t\t\t\tat: #revertToMe\n\t\t\t\t\t\tifAbsent: [^ self inform: 'nothing to revert to']]\n\t\tifFalse: [CurrentProject finalExitActions.\n\t\t\tCurrentProject makeThumbnail.\n\t\t\treturningFlag == #specialReturn\n\t\t\t\tifTrue: [ProjectHistory forget: CurrentProject.\n\t\t\t\t\t\"this guy is irrelevant\"\n\t\t\t\t\tProject forget: CurrentProject]\n\t\t\t\tifFalse: [ProjectHistory remember: CurrentProject]].\n\trevertFlag | saveForRevert | forceRevert\n\t\tifFalse: [(Preferences valueOfFlag: #projectsSentToDisk)\n\t\t\t\tifTrue: [self storeToMakeRoom]].\n\tCurrentProject abortResourceLoading.\n\tCurrentProject saveProjectPreferences.\n\t\"Update the display depth and make a thumbnail of the current project\"\n\tCurrentProject displayDepth: Display depth.\n\told := CurrentProject.\n\t\"for later\"\n\t\"Show the project transition. \n\tNote: The project zoom is run in the context of the old project, \n\tso that eventual errors can be handled accordingly\"\n\tdisplayDepth == nil\n\t\tifTrue: [displayDepth := Display depth].\n\tself installNewDisplay: Display extent depth: displayDepth.\n\t(showZoom := self showZoom)\n\t\tifTrue: [self displayZoom: CurrentProject parent ~~ self].\n\t(world isMorph\n\t\t\tand: [world hasProperty: #letTheMusicPlay])\n\t\tifTrue: [world removeProperty: #letTheMusicPlay]\n\t\tifFalse: [Smalltalk\n\t\t\t\tat: #ScorePlayer\n\t\t\t\tifPresentAndInMemory: [:playerClass | playerClass\n\t\t\t\t\t\tallSubInstancesDo: [:player | player pause]]].\n\treturningFlag == #specialReturn\n\t\tifTrue: [old removeChangeSetIfPossible.\n\t\t\t\"keep this stuff from accumulating\"\n\t\t\tnextProject := nil]\n\t\tifFalse: [returningFlag\n\t\t\t\tifTrue: [nextProject := CurrentProject]\n\t\t\t\tifFalse: [previousProject := CurrentProject]].\n\tCurrentProject saveState.\n\tCurrentProject isolationHead == self isolationHead\n\t\tifFalse: [self invokeFrom: CurrentProject].\n\tCurrentProject := self.\n\tself installProjectPreferences.\n\tChangeSet newChanges: changeSet.\n\tTranscriptStream newTranscript: transcript.\n\tSensor flushKeyboard.\n\tProjectHistory remember: CurrentProject.\n\tworld isMorph\n\t\tifTrue: []\n\t\tifFalse: [World := nil.\n\t\t\t\"Signifies MVC\"\n\t\t\tSmalltalk at: #ScheduledControllers put: world].\n\tsaveForRevert\n\t\tifTrue: [Smalltalk garbageCollect.\n\t\t\t\"let go of pointers\"\n\t\t\told storeSegment.\n\t\t\t\"result _\"\n\t\t\told world isInMemory\n\t\t\t\tifTrue: ['Can''t seem to write the project.']\n\t\t\t\tifFalse: [old projectParameters at: #revertToMe put: old world xxxSegment clone].\n\t\t\t'Project written.'].\n\t\"original is for coming back in and continuing.\"\n\trevertFlag | forceRevert\n\t\tifTrue: [seg clone revert].\n\t\"non-cloned one is for reverting again later\"\n\tself removeParameter: #exportState.\n\t\"Complete the enter: by launching a new process\"\n\tworld isMorph\n\t\tifFalse: [newProcess := [ScheduledControllers resetActiveController.\n\t\t\t\t\t\"in case of walkback in #restore\"\n\t\t\t\t\tshowZoom\n\t\t\t\t\t\tifFalse: [ScheduledControllers restore].\n\t\t\t\t\tScheduledControllers searchForActiveController] fixTemps newProcess priority: Processor userSchedulingPriority.\n\t\t\tnewProcess resume.\n\t\t\t\"lose the current process and its referenced morphs\"\n\t\t\tProcessor terminateActive]! !\n\n!Project methodsFor: 'menu messages' stamp: 'dmu 11/25/2008 00:23'!\nenterForEmergencyRecovery\n\t\"This version of enter invokes an absolute minimum of mechanism.\n\tAn unrecoverable error has been detected in an isolated project.\n\tIt is assumed that the old changeSet has already been revoked.\n\tNo new process gets spawned here.  This will happen in the debugger.\"\n\n\tself isCurrentProject ifTrue: [^ self].\n\tCurrentProject saveState.\n\tCurrentProject _ self.\n\tDisplay newDepthNoRestore: displayDepth.\n\tSmalltalk newChanges: changeSet.\n\tTranscriptStream newTranscript: transcript.\n\n\n\tworld isMorph\n\t\tifTrue:\n\t\t\t[\"Entering a Morphic project\"\n\t\t\tWorld _ world.\n\t\t\tworld install.\n\t\t\tworld triggerOpeningScripts]\n\t\tifFalse:\n\t\t\t[\"Entering an MVC project\"\n\t\t\tWorld _ nil.\n\t\t\tSmalltalk at: #ScheduledControllers put: world.\n\t\t\tScheduledControllers restore].\n\tUIProcess _ Processor thisProcess.\n! !\n\n!Project methodsFor: 'release' stamp: 'ssa 9/3/2008 11:09'!\nokToChange\n\t\"Answer whether the window in which the project is housed can be dismissed -- which is destructive. We never clobber a project without confirmation\"\n\n\t| ok |\n\tself subProjects size  >0 ifTrue:\n\t\t[self inform: \n'The project ', self name printString, '\ncontains sub-projects.  You must remove these\nexplicitly before removing their parent.'.\n\t\t^ false].\n\tok _ world isMorph not and: [world scheduledControllers size <= 1].\n\tok ifFalse: [self isMorphic ifTrue:\n\t\t[]].  \"view from elsewhere.  just delete it.\"\n\tok _ (self confirm:\n'Really delete the project\n', self name printString, '\nand all its windows?').\n\t\t\n\tok ifFalse: [^ false].\n\n\n\n\tself removeChangeSetIfPossible.\n\t\"do this last since it will render project inaccessible to #allProjects and their ilk\"\n\tProjectHistory forget: self.\n\tProject deletingProject: self.\n\t^ true\n! !\n\n!Project class methodsFor: 'utilities' stamp: 'ssa 9/3/2008 11:11'!\naddItem: item toMenu: menu selection: action project: aProject\n\tmenu add: item action: action! !\n\n!Project class methodsFor: 'utilities' stamp: 'dmu 11/25/2008 00:24'!\nspawnNewProcessAndTerminateOld: terminate\n\n\tself spawnNewProcess.\n\tterminate\n\t\tifTrue: [Processor terminateActive]\n\t\tifFalse: [Processor thisProcess suspend]! !\n\n!ProjectTeam methodsFor: 'searching' stamp: 'ads 12/6/2010 14:26'!\nfindMethodsWrittenByThisTeamButNotIncludedInPackage: p\n\t| result systemCats |\n\t\"Convenient for finding methods that don't follow the PackageInfo category-naming scheme.\"\n\tresult := OrderedCollection new.\n\tsystemCats := p systemCategories.\n\t((Smalltalk allClasses reject: [:cls | systemCats includes: cls category]) gather: [:cls| {cls. cls class}]) do: [:cls |\n\t\tcls organization allMethodSelectors do: [:sel | | mr crs |\n\t\t\tmr := MethodReference new setStandardClass: cls methodSymbol: sel.\n\t\t\tcrs := mr changeRecords.\n\t\t\tcrs isEmpty ifFalse: [\n\t\t\t\t(self didProjectMemberCreateChangeRecord: crs first) ifTrue: [\n\t\t\t\t\t(p isYourClassExtension: mr category) ifFalse: [\n\t\t\t\t\t\tresult add: mr.\n\t\t\t\t\t].\n\t\t\t\t].\n\t\t\t].\n\t\t].\n\t].\n\t^ result\n! !\n\n!ProjectTeam methodsFor: 'timestamps' stamp: 'ads 12/13/2010 19:15'!\ntimestampFilter\n\t^ timestampFilter! !\n\n!ProjectTeam methodsFor: 'timestamps' stamp: 'ads 12/13/2010 19:15'!\ntimestampFilter: aBlock\n\ttimestampFilter := aBlock.! !\n\n!ProjectTeam methodsFor: 'members' stamp: 'ads 12/2/2010 14:59'!\ninitialsOfNonProjectMembers\n\t\"Just convenient for making sure I haven't left anybody off of the list.\"\n\t^ (self packages gather: [:p |\n\t\tp extensionMethods gather: [:m | | v |\n\t\t\tv := self oldVersionOf: m.\n\t\t\tv ifNil: [{}]\n\t\t\tifNotNil: [| tokens |\n\t\t\t\ttokens := v stamp findTokens: Character separators.\n\t\t\t\ttokens isEmpty ifTrue: [{}] ifFalse: [{tokens at: 1}]]].\n\t]) asSet asSortedCollection! !\n\n!ProjectTeam methodsFor: 'members' stamp: 'ads 12/2/2010 14:59'!\ninitialsOfProjectMembers\n\t^ initialsOfProjectMembers! !\n\n!ProjectTeam methodsFor: 'members' stamp: 'ads 12/2/2010 14:59'!\ninitialsOfProjectMembers: aCollectionOfInitials\n\tinitialsOfProjectMembers := aCollectionOfInitials.! !\n\n!ProjectTeam methodsFor: 'versions' stamp: 'ads 12/7/2010 14:22'!\naboutToModifyClass: cls\n\t\"Called from the removal script to help debug problems.\"\n\tTranscript show: 'About to modify class: ', cls name; cr.! !\n\n!ProjectTeam methodsFor: 'versions' stamp: 'ads 12/13/2010 19:22'!\ndidProjectMemberCreateChangeRecord: cr\n\t| stamp |\n\tstamp := cr stamp ifNil: [^ false].\n\t\"Not really sure whether it's better to use the timestampFilter or initialsOfProjectMembers. For now let's try the timestampFilter, if present. -- Adam\"\n\t^ timestampFilter\n\t\tifNil: [self initialsOfProjectMembers anySatisfy: [:initials | stamp beginsWith: initials]]\n\t\tifNotNil: [timestampFilter value: cr timeStamp]! !\n\n!ProjectTeam methodsFor: 'versions' stamp: 'ads 12/2/2010 15:33'!\noldVersionOf: aMethodReference\n\t^ aMethodReference changeRecords detect: [:cr | (self didProjectMemberCreateChangeRecord: cr) not] ifNone: [nil]! !\n\n!ProjectTeam methodsFor: 'versions' stamp: 'ads 1/26/2011 16:16'!\nrevertPackage: p\n\tp revertToVersionBeforeTeam: self.! !\n\n!ProjectTeam methodsFor: 'versions' stamp: 'ads 12/5/2010 22:49'!\nrevertToOldVersionOf: aMethodReference ifNone: noneBlk\n\t| v |\n\tv := self oldVersionOf: aMethodReference.\n\t^ v ifNil: noneBlk ifNotNil: [v fileIn].! !\n\n!ProjectTeam methodsFor: 'versions' stamp: 'ads 12/10/2010 10:13'!\nrevertToOldVersionOrRemove: aMethodReference\n\tTranscript show: 'Reverting or removing ', aMethodReference printString; cr.\n\t^ self revertToOldVersionOf: aMethodReference ifNone: [aMethodReference removeFromSystem]! !\n\n!PrototypeTester methodsFor: 'as yet unclassified' stamp: 'mjr 8/20/2003 18:56'!\nprototype\n\t\"Get a prototype\"\n\t^ prototype copy ! !\n\n!PrototypeTester methodsFor: 'as yet unclassified'!\nprototype: aPrototype \n\t\"Set my prototype\"\n\tprototype := aPrototype copy ! !\n\n!PrototypeTester methodsFor: 'as yet unclassified' stamp: 'mjr 8/20/2003 18:57'!\nresult\n\t\"Perform the test the default number of times\"\n\t^ self resultFor: self class defaultRuns ! !\n\n!PrototypeTester commentStamp: 'mjr 8/20/2003 13:09' prior: 0!\nI am a simple holder of a prototype object and hand out copies when requested.!\n!PrototypeTester class methodsFor: 'as yet unclassified' stamp: 'mjr 8/20/2003 13:08'!\ndefaultRuns\n\"the default number of times to test\"\n\t^ 50! !\n\n!PrototypeTester class methodsFor: 'as yet unclassified' stamp: 'mjr 8/20/2003 13:08'!\nwith: aPrototype\n\t^self new prototype:aPrototype! !\n\n!Quadrangle methodsFor: 'bordering'!\nborderWidthLeft: anInteger1 right: anInteger2 top: anInteger3 bottom: anInteger4\n\t\"Set the border width of the receiver to a Rectangle that represents the \n\tleft, right, top, and bottom border widths.\"\n\n\tborderWidth _ anInteger1 @ anInteger3 corner: anInteger2 @ anInteger4! !\n\n!RVMAbsScanningStripChartView methodsFor: 'displaying' stamp: 'ssa 10/28/2008 20:29'!\ndrawOnCanvas\n\t| color |\n\t1 to: self count do: [:index | \n\t\t\tcolor := self colors at: ((self scaler scale:(self data at: index))  min:  self numberOfColors max:1).\n\t\t\tself scanner\n\t\t\t\tfill: (self boxes at: index)\n\t\t\t\tfillColor: color].\n\tself scanner displayOn: self canvas at: self nextScannerLocation @ 0.\n! !\n\n!RVMAbsScanningStripChartView methodsFor: 'displaying' stamp: 'ssa 10/28/2008 20:41'!\nredrawOnCanvas\n\t| color |\n\tself canvas fillWhite.\n\tself resetScannerLocation.\n\tself previousData do:[:oldData|\n\t1 to: self count do: [:index | \n\t\t\tcolor := self colors at: ((self scaler scale:(oldData at: index))  min:  self numberOfColors max:1).\n\t\t\tself scanner\n\t\t\t\tfill: (self boxes at: index)\n\t\t\t\tfillColor: color].\n\tself scanner displayOn: self canvas at: self nextScannerLocation @ 0]! !\n\n!RVMAbsScanningStripChartView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 20:23'!\naspect: aSymbol.\n\tself scaler: nil.\n\tsuper aspect: aSymbol! !\n\n!RVMAbsScanningStripChartView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 20:26'!\nscaler\n\t\"Answer the value of scaler\"\n\n\tscaler isNil ifTrue:[self scaler: (RVMMonitor scalerFor: self aspect)].\n\t^scaler! !\n\n!RVMAbsScanningStripChartView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 20:23'!\nscaler: anObject\n\t\"Set the value of scaler\"\n\n\tscaler _ anObject! !\n\n!RVMAbsScanningStripChartView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 20:49'!\ntypeLabel\n\n\t^'AbsScan: '! !\n\n!RVMAbsScanningStripChartView methodsFor: 'scaling' stamp: 'ssa 10/28/2008 20:47'!\nrescale\n\t\"Reset the scaler and pass the previous data thorugh it to find the min/max.\n\tThen redraw\"\n\tself scaler resetScaling.\n\tself previousData do:[:dats| dats do:[:d| scaler scale: d]].\n\tself scaler resetOutOfRangeDetector.\n\tself topView newFrame.\n\tself redrawOnCanvas! !\n\n!RVMAbsScanningStripChartView class methodsFor: 'accessing' stamp: 'ssa 11/4/2008 20:19'!\nadjustScaler\n\n\t^true! !\n\n!RVMAllCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 16:52'!\ncoreStats\n\t\"Answer the value of coreStats\"\n\n\tcoreStats isNil ifTrue:[self coreStats: OrderedCollection new].\n\t^coreStats! !\n\n!RVMAllCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 16:52'!\ncoreStats: anObject\n\t\"Set the value of coreStats\"\n\n\tcoreStats := anObject! !\n\n!RVMAllCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 16:52'!\nrawData\n\t\"Answer the value of rawData\"\n\n\trawData isNil ifTrue:[self rawData: nil].\n\t^rawData! !\n\n!RVMAllCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:11'!\nrawData: anObject\n\t\"Set the value of rawData\"\n\n\trawData := anObject! !\n\n!RVMAllCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 8/19/2008 11:34'!\ninitializeFastFrom: data forMessageNames: messageNames\n\t\"data is an array of arrays, each element comprising stats from a single core\"\n\t\n\tself rawData: data.\n\tdata do:[:each| self coreStats add: (RVMCPUCoreStats newFastFromData: each forMessageNames: messageNames)]\n\n! !\n\n!RVMAllCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 1/1/1970 00:05'!\ninitializeFastestFrom: data forMessageNames: messageNames\n\t\"data is an array of arrays, each element comprising stats from a single core\"\n\t\n\tself rawData: data.\n\tdata do:[:each| self coreStats add: (RVMCPUCoreStats newFastestFromData: each forMessageNames: messageNames)]\n\n! !\n\n!RVMAllCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 8/13/2008 17:25'!\ninitializeFrom: data forMessageNames: messageNames\n\t\"data is an array of arrays, each element comprising stats from a single core\"\n\t\n\tself rawData: data.\n\tdata do:[:each| self coreStats add: (RVMCPUCoreStats newFromData: each forMessageNames: messageNames)]\n\n! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 08:39'!\nallocationsSinceLastReadMostlys\n\t^self coreStats collect:[:each| each allocationsSinceLastReadMostly]! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:53'!\nallocationsSinceLastReadWrites\n\t^self coreStats collect:[:each| each allocationsSinceLastReadWrite]! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:52'!\nallocationsSinceLasts\n\t^self coreStats collect:[:each| each allocationsSinceLast]! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:19'!\nbytecodeCounts\n\t\"RVMMulticoreSample capture bytecodeCounts\"\n\t\"Answer the collection of bytecode counts during this sample\"\n\t\n\t^self coreStats collect:[:each| each bytecodesExecuted]! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/15/2008 15:37'!\nbytecodesPerMillisecond\n\t\"RVMMulticoreSample capture bytecodesPerMillisecond\"\n\t\"Answer the collection of ratios of bytecodes executed per millisecond during this sample\"\n\t\n\t^self coreStats collect:[:each| each bytecodesPerMillisecond]! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:24'!\nbytecodesPerSecond\n\t\"RVMMulticoreSample capture bytecodesPerSecond\"\n\t\"Answer the collection of ratios of bytecodes executed per second during this sample\"\n\t\n\t^self coreStats collect:[:each| each bytecodesPerSecond]! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 08:39'!\nbytesLeftReadMostlys\n\t^self coreStats collect:[:each| each bytesLeftReadMostly]! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:50'!\nbytesLeftReadWrites\n\t^self coreStats collect:[:each| each bytesLeftReadWrite]! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:49'!\nbytesLefts\n\t^self coreStats collect:[:each| each bytesLeft]! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 08:38'!\nbytesUsedReadMostlys\n\t^self coreStats collect:[:each| each bytesUsedReadMostly]! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:48'!\nbytesUsedReadWrites\n\t^self coreStats collect:[:each| each bytesUsedReadWrite]! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 1/1/1970 00:07'!\nbytesUseds\n\t^self coreStats collect:[:each| each bytesUsed]! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 08:39'!\ncompactionsSinceLastReadMostlys\n\t^self coreStats collect:[:each| each compactionsSinceLastReadMostly]! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:54'!\ncompactionsSinceLastReadWrites\n\t^self coreStats collect:[:each| each compactionsSinceLastReadWrite]! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:54'!\ncompactionsSinceLasts\n\t^self coreStats collect:[:each| each compactionsSinceLast]! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:07'!\ncontextChangeCounts\n\t\"RVMMulticoreSample capture contextChangeCounts\"\n\t\"Answer the collection of contextChanges during this sample\"\n\t\n\t^self coreStats collect:[:each| each contextChangeCount]! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:52'!\ncyclesRunWaitRatios\n\t\"RVMMulticoreSample capture cyclesRunWaitRatios\"\n\t\"Answer the collection of ratios during this sample\"\n\t\n\t^self coreStats collect:[:each| each cyclesRunWaitRatio]! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:48'!\ncyclesRunnings\n\t\"RVMMulticoreSample capture cyclesRunnings\"\n\t\"Answer the collection of cyclesRunning counts during this sample\"\n\t\n\t^self coreStats collect:[:each| each cyclesRunning]! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/15/2008 15:41'!\ncyclesSinceLasts\n\t\"RVMMulticoreSample capture cyclesSinceLasts\"\n\t\"Answer the collection of cyclesSinceLasts counts during this sample\"\n\t\n\t^self coreStats collect:[:each| each cyclesSinceLast]! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:48'!\ncyclesWaitings\n\t\"RVMMulticoreSample capture cyclesWaitings\"\n\t\"Answer the collection of cyclesWaiting counts during this sample\"\n\t\n\t^self coreStats collect:[:each| each cyclesWaiting]! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 1/5/2011 12:55'!\ngcMilliseconds\n\t^ self coreStats collect: [:cs| cs gcMilliseconds]! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:06'!\ninterruptCheckCounts\n\t\"RVMMulticoreSample capture yieldCounts\"\n\t\"Answer the collection of yields during this sample\"\n\t\n\t^self coreStats collect:[:each| each interruptCheckCount]! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:06'!\nmillisecondsRunnings\n\t\"RVMMulticoreSample capture millisecondsRunnings\"\n\t\"Answer the collection of millisecondsRunning counts during this sample\"\n\t\n\t^self coreStats collect:[:each| each millisecondsRunning]! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:37'!\nmillisecondsWaitings\n\t\"RVMMulticoreSample capture millisecondsWaitings\"\n\t\"Answer the collection of millisecondsWaiting counts during this sample\"\n\t\n\t^self coreStats collect:[:each| each millisecondsWaiting]! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:43'!\nmsRunWaitRatios\n\t\"RVMMulticoreSample capture msRunWaitRatios\"\n\t\"Answer the collection of ratios during this sample\"\n\t\n\t^self coreStats collect:[:each| each msRunWaitRatio]! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/15/2008 15:29'!\nmsSinceLasts\n\t\"RVMMulticoreSample capture msSinceLasts\"\n\t\"Answer the collection of msSinceLasts counts during this sample\"\n\t\n\t^self coreStats collect:[:each| each msSinceLast]! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:03'!\nreceiveTallySum\n\t| tallies sum s |\n\ttallies := self coreStats\n\t\t\t\tcollect: [:each | each receiveTally].\n\tsum := Array new: (tallies at: 1) rawData size.\n\t1\n\t\tto: sum size\n\t\tdo: [:i | \n\t\t\ts := 0.\n\t\t\t1\n\t\t\t\tto: tallies size\n\t\t\t\tdo: [:j | s := s\n\t\t\t\t\t\t\t\t+ ((tallies at: j) rawData\n\t\t\t\t\t\t\t\t\t\tat: i)].\n\t\t\tsum at: i put: s].\n\t^ sum! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 3/27/2009 16:53'!\nsendTallySums\n\t\"Answer an array with the sum of all my send tallies in order from all my coreStats\"\n\t| sums stats |\n\tsums _ self coreStats first sendTallySums.\n\t2 to: self coreStats size do:[:index| \n\t\tstats _ self coreStats at: index.\n\t\tsums _ sums + stats sendTallySums].\n\t^sums! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 3/27/2009 16:27'!\nsendTallySumsDictionary\n\t\"Answer a dictionary with the sums of all my send tallies from all my coreStats associated with their name\"\n\t| dict keys values |\n\tdict _ Dictionary new.\n\tkeys _ RVMCoreMessageTally tallyOrder.\n\tvalues _ self sendTallySums.\n\tkeys with: values do:[:key :value| dict at: key put: value].\n\t^dict! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 3/26/2009 09:55'!\nsendTallySumsSorted\n\t\"Answer a sorted collection with the sums of all my send tallies from all my coreStats associated with their name\"\n\t^self sendTallySumsDictionary associations asSortedCollection:[:a :b| a value > b value]! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 3/27/2009 17:06'!\nsendTallySumsSortedReport\n\t\"Answer a string to be used as a report of the sorted send tally sums\"\n\t| report |\n\treport _ 'Sorted Send Tallies for all cores',String crlf,'--------------------------',String crlf.\n\tself sendTallySumsSorted do:[:assoc| report _ report, assoc value printString,'  ',assoc key,String crlf].\n\t^report! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:07'!\nunforcedInterruptCheckCounts\n\t\"RVMMulticoreSample capture yieldCounts\"\n\t\"Answer the collection of yields during this sample\"\n\t\n\t^self coreStats collect:[:each| each unforcedInterruptCheckCount]! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/14/2008 17:17'!\nyieldCounts\n\t\"RVMMulticoreSample capture yieldCounts\"\n\t\"Answer the collection of yields during this sample\"\n\t\n\t^self coreStats collect:[:each| each yieldCount]! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:16'!\nyieldFrequencies\n\t\"RVMMulticoreSample capture yieldFrequencies\"\n\t\n\t^self coreStats collect:[:each| each yieldFrequency]! !\n\n!RVMAllCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:37'!\nyieldsPerSecond\n\t\"RVMMulticoreSample capture yieldsPerSecond\"\n\t\"Answer the collection of ratios of yields  per second during this sample\"\n\t\n\t^self coreStats collect:[:each| each yieldsPerSecond]! !\n\n!RVMAllCPUCoreStats methodsFor: 'DNU hacks' stamp: 'ssa 3/27/2009 17:26'!\ndoesNotUnderstand: aMessage\n\t\"Hack DNU to install measurement mesages for tally aspects\"\n\t\n\t| code tallyAspect |\n\t(aMessage selector first: 5) = 'sumOf' ifTrue:[\n\t\ttallyAspect _ aMessage selector last: aMessage selector - 5.\n\t\ttallyAspect at: 1 put: tallyAspect first asLowercase.\n\t(RVMMulticoreSample coreTallyAspects includes: tallyAspect)\n\t\tifFalse:[^super doesNotUnderstand: aMessage].\n\tcode _ aMessage selector,'\n\t\"Answer the sum for this tally aspect from all cores\"\n\t^self sendTallySumsDictionary at: #',tallyAspect.\n\tself class compile: code classified: 'tallying' notifying: nil.\n\t^self perform: aMessage selector].\n\t^super doesNotUnderstand: aMessage! !\n\n!RVMAllCPUCoreStats class methodsFor: 'instance creation' stamp: 'ssa 8/19/2008 11:33'!\nnewFastFrom: data forMessageNames: messageNames\n\t\"Answer a new instance of me using this data, which is a collection of arrays of core stats\"\n\t| stats |\n\tstats := self new.\n\tstats initializeFastFrom: data forMessageNames: messageNames.\n\t^stats! !\n\n!RVMAllCPUCoreStats class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:05'!\nnewFastestFrom: data forMessageNames: messageNames\n\t\"Answer a new instance of me using this data, which is a collection of arrays of core stats\"\n\t| stats |\n\tstats := self new.\n\tstats initializeFastestFrom: data forMessageNames: messageNames.\n\t^stats! !\n\n!RVMAllCPUCoreStats class methodsFor: 'instance creation' stamp: 'ssa 8/13/2008 17:26'!\nnewFrom: data forMessageNames: messageNames\n\t\"Answer a new instance of me using this data, which is a collection of arrays of core stats\"\n\t| stats |\n\tstats := self new.\n\tstats initializeFrom: data forMessageNames: messageNames.\n\t^stats! !\n\n!RVMAspectLabelController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 00:25'!\naspectFromUser\n\t| menu answer |\n\tmenu := CustomMenu new.\n\tself view aspects\n\t\tdo: [:aspect | menu add: aspect action: aspect].\n\tanswer := menu startUp: self view aspect withCaption: 'Select the aspect to monitor' at: Sensor cursorPoint.\n\tanswer isNil ifTrue:[^self].\n\tself view aspect: answer.\n\tself view displayView.\n\tself view topView newFrame! !\n\n!RVMAspectLabelController methodsFor: 'controlling' stamp: 'ssa 9/19/2008 11:55'!\ncontrolActivity\n\tCursor menu show.\n\tsuper controlActivity! !\n\n!RVMAspectLabelController methodsFor: 'controlling' stamp: 'ssa 9/19/2008 11:55'!\ncontrolTerminate\n\tCursor normal show.\n\tsuper controlTerminate! !\n\n!RVMAspectLabelController methodsFor: 'controlling' stamp: 'ssa 9/13/2008 16:19'!\nyellowButtonActivity\n\n\tself aspectFromUser.\n! !\n\n!RVMAspectLabelView methodsFor: 'displaying' stamp: 'ssa 10/21/2008 11:31'!\ndisplayView\n\t| labelRect labelText labelForm |\nself uncache.\n\tlabelText := self label asDisplayText.\n\tlabelText foregroundColor: self foregroundColor\n\t\t\tbackgroundColor: self backgroundColor.\n\tlabelForm := labelText\n\t\t\t asParagraph asForm.\n\tlabelRect := self insetDisplayBox.\n\tDisplay fill: labelRect fillColor: self backgroundColor.\t\n\tlabelForm displayOn: Display at: labelRect leftCenter - labelForm boundingBox leftCenter + (2@0) clippingBox: labelRect\n\t\t\trule: Form paint fillColor: nil.\n\t\"Display border: (self insetDisplayBox insetBy: 1)width: 1 fillColor: self backgroundColor negated.\"\n! !\n\n!RVMAspectLabelView methodsFor: 'updating' stamp: 'ssa 9/17/2008 14:17'!\nupdate: aSymbol\n\n\taSymbol  = self getAspectSelector ifTrue:[self displayView ].\n\tsuper update: aSymbol! !\n\n!RVMAspectLabelView methodsFor: 'accessing' stamp: 'ssa 9/19/2008 12:51'!\naspect\n\n\t^self getAspectSelector isSymbol \n\t\tifTrue:[self model perform: self getAspectSelector]\n\t\tifFalse:[\"assume a block\"\n\t\t\tself getAspectSelector value]! !\n\n!RVMAspectLabelView methodsFor: 'accessing' stamp: 'ssa 9/17/2008 14:14'!\naspect: aSymbol\n\tself setAspectSelector isSymbol\n\t\tifTrue:[self model perform: self setAspectSelector with: aSymbol]\n\t\tifFalse:[\"assume a block\"\n\t\t\tself setAspectSelector value: aSymbol].\n! !\n\n!RVMAspectLabelView methodsFor: 'accessing' stamp: 'ssa 9/17/2008 13:15'!\naspects\n\t^self getAspectsSelector isSymbol \n\t\tifTrue:[self model perform: self getAspectsSelector]\n\t\tifFalse:[\"assume a block\"\n\t\t\tself getAspectsSelector value]! !\n\n!RVMAspectLabelView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 17:06'!\nbackgroundColor\n\n\t^Color white! !\n\n!RVMAspectLabelView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 16:36'!\nforegroundColor\n\n\t^Color black! !\n\n!RVMAspectLabelView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 16:14'!\ngetAspectSelector\n\t\"Answer the value of getAspectSelector\"\n\n\tgetAspectSelector isNil ifTrue:[self getAspectSelector: #aspect].\n\t^ getAspectSelector! !\n\n!RVMAspectLabelView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 16:13'!\ngetAspectSelector: anObject\n\t\"Set the value of getAspectSelector\"\n\n\tgetAspectSelector _ anObject! !\n\n!RVMAspectLabelView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 16:14'!\ngetAspectsSelector\n\t\"Answer the value of getAspectsSelector\"\n\n\tgetAspectsSelector isNil ifTrue:[self getAspectsSelector: #aspects].\n\t^ getAspectsSelector! !\n\n!RVMAspectLabelView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 16:13'!\ngetAspectsSelector: anObject\n\t\"Set the value of getAspectsSelector\"\n\n\tgetAspectsSelector _ anObject! !\n\n!RVMAspectLabelView methodsFor: 'accessing' stamp: 'ssa 9/17/2008 14:18'!\nlabel\n\n\t^self aspect! !\n\n!RVMAspectLabelView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 16:25'!\nlastAspect\n\t\"Answer the value of lastAspect\"\n\n\tlastAspect isNil ifTrue:[self lastAspect: #foo].\n\t^ lastAspect! !\n\n!RVMAspectLabelView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 16:25'!\nlastAspect: anObject\n\t\"Set the value of lastAspect\"\n\n\tlastAspect _ anObject! !\n\n!RVMAspectLabelView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 16:14'!\nsetAspectSelector\n\t\"Answer the value of setAspectSelector\"\n\n\tsetAspectSelector isNil ifTrue:[self setAspectSelector: #aspect:].\n\t^ setAspectSelector! !\n\n!RVMAspectLabelView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 16:13'!\nsetAspectSelector: anObject\n\t\"Set the value of setAspectSelector\"\n\n\tsetAspectSelector _ anObject! !\n\n!RVMAspectLabelView methodsFor: 'controller access' stamp: 'ssa 9/13/2008 16:16'!\ndefaultControllerClass\n\n\t^RVMAspectLabelController! !\n\n!RVMAspectLabelView class methodsFor: 'instance creation' stamp: 'ssa 9/17/2008 13:27'!\non: anObject\n\t\"Answer a label view that will send #aspect to this object to find its label\"\n\t| view |\n\tview := self new.\n\tview model: anObject.\n\t^view! !\n\n!RVMAspectLabelView class methodsFor: 'instance creation' stamp: 'ssa 9/17/2008 14:04'!\non: anObject getAllAspectsWith: getAspectsSelector getCurrentAspectWith: getAspectSelector setNewAspectWith: setAspectSelector\n\t\"Answer an aspect view that can probe and change the aspect of its aspectee.\n\tNote 'selector' arguments can be symbols or blocks\"\n\t| view |\n\tview := self new.\n\tview model: anObject.\n\tview getAspectsSelector: getAspectsSelector.\n\tview getAspectSelector: getAspectSelector.\n\tview setAspectSelector: setAspectSelector.\n\t^view! !\n\n!RVMAspectLabelView class methodsFor: 'examples' stamp: 'ssa 9/17/2008 13:31'!\nexample\n\t\"RVMAspectLabelView example\"\n\t| topView view |\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\ttopView minimumSize: 100@25.\n\ttopView maximumSize: 200@50.\n\tview _ self on: view \n\t\tgetAllAspectsWith: [{ #foo. #bar. #baz. #waz }] \n\t\tgetCurrentAspectWith: #lastAspect \n\t\tsetNewAspectWith: #lastAspect:.\n\tview model: view.\n\ttopView addSubView: view.\n\ttopView label: 'Aspect Button'.\n\ttopView controller open! !\n\n!RVMAspectLabelView class methodsFor: 'examples' stamp: 'ssa 9/17/2008 13:31'!\nexampleMany\n\t\"RVMAspectLabelView exampleMany\"\n\t| topView view1 view2 view3 |\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\ttopView minimumSize: 100@75.\n\ttopView maximumSize: 200@100.\n\tview1 _ self on: view1 \n\t\tgetAllAspectsWith: [{ #foo. #bar. #baz. #waz }] \n\t\tgetCurrentAspectWith: #lastAspect \n\t\tsetNewAspectWith: #lastAspect:.\n\tview1 on: view1.\n\tview2 _ self on: view2 \n\t\tgetAllAspectsWith: [{ #foo. #bar. #baz. #waz }] \n\t\tgetCurrentAspectWith: #lastAspect \n\t\tsetNewAspectWith: #lastAspect:.\n\tview2 on: view2.\n\tview3 _ self on: view3 \n\t\tgetAllAspectsWith: [{ #foo. #bar. #baz. #waz }] \n\t\tgetCurrentAspectWith: #lastAspect \n\t\tsetNewAspectWith: #lastAspect:.\n\tview3 on: view3.\n\ttopView addSubView: view1.\n\ttopView addSubView: view2 below: view1.\n\ttopView addSubView: view3 below: view2.\n\ttopView label: 'Aspect Button'.\n\ttopView controller open! !\n\n!RVMAspectLabelView class methodsFor: 'examples' stamp: 'ssa 9/17/2008 13:32'!\nexampleWithColorButton\n\t\"RVMAspectLabelView exampleWithColorButton\"\n\t| topView view colorButton |\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\ttopView minimumSize: 100@25.\n\ttopView maximumSize: 200@50.\n\tview _ self on: view \n\t\tgetAllAspectsWith: [{ #foo. #bar. #baz. #waz }] \n\t\tgetCurrentAspectWith: #lastAspect \n\t\tsetNewAspectWith: #lastAspect:.\n\tview model: view.\n\tcolorButton _ RVMColorButtonView new.\n\ttopView addSubView: view in: (0@0 extent: 5/6 @ 1) borderWidth:0.\n\ttopView addSubView: colorButton in: (5/6@0 extent: 1/6@1) borderWidth:0.\n\ttopView label: 'Aspect Button'.\n\ttopView controller open! !\n\n!RVMAspectTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:44'!\naspect\n\t\"Answer the value of aspect\"\n\n\taspect isNil ifTrue:[self aspect: #bytesUseds].\n\t^ aspect! !\n\n!RVMAspectTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:03'!\naspect: anObject\n\t\"Set the value of aspect\"\n\n\taspect _ anObject.\n\taspect notNil ifTrue:[self scaler: (RVMMonitor scalerFor:aspect)]! !\n\n!RVMAspectTrace methodsFor: 'accessing' stamp: 'ssa 10/3/2008 23:17'!\naspectLabel\n\n\t^self aspect! !\n\n!RVMAspectTrace methodsFor: 'updating' stamp: 'ssa 1/1/1970 00:26'!\naddData\n\t\"Assume a single valued data source\"\n\tself add:(RVMMonitor lastSample perform: self aspect)! !\n\n!RVMAspectTrace methodsFor: 'user interface' stamp: 'ssa 1/1/1970 00:29'!\nallView\n\t\n\t\t^self aspectColorMuteView! !\n\n!RVMAspectTrace methodsFor: 'user interface' stamp: 'ssa 1/1/1970 00:32'!\naspectButton\n\t\"Answer an aspect button connect to my aspect\"\n\t^RVMAspectLabelView on: self \n\t\tgetAllAspectsWith: [RVMMulticoreSample systemAspects] \n\t\tgetCurrentAspectWith: #aspect \n\t\tsetNewAspectWith: #aspect:! !\n\n!RVMAspectTrace methodsFor: 'user interface' stamp: 'ssa 1/1/1970 00:46'!\naspectColorMuteView\n\t\"Answer a view showing my color and aspect\"\n\t| view |\n\tview _ RVMView new.\n\tview model: self.\n\tview addSubView: self  muteButton in: (0@0 extent: (1/10) @ 1) borderWidth:1.\n\tview addSubView: self colorButton in: ((1/10)@0 extent: (1/10) @ 1) borderWidth:1.\n\tview addSubView: self aspectButton in: ((2/10)@0 extent: (8/10) @ 1) borderWidth:1.\n\t^view! !\n\n!RVMAspectTrace methodsFor: 'user interface' stamp: 'ssa 1/1/1970 00:37'!\naspectColorView\n\t\"Answer a view showing my color and aspect\"\n\t| view |\n\tview _ RVMView new.\n\tview addSubView: self  colorButton in: (0@0 extent: (1/10) @ 1) borderWidth:1.\n\tview addSubView: self aspectButton in: ((1/10)@0 extent: (9/10) @ 1) borderWidth:1.\n\t^view! !\n\n!RVMAspectTrace class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:35'!\naspect: aSymbol size: anInteger color: aColor\n\t| trace |\n\ttrace _ self new.\n\ttrace\n\t\tscaler: RVMDataScaler new automatic;\n\t\trawData: (RVMCircularCollection new: anInteger);\n\t\tcolor: aColor;\n\t\taspect: aSymbol.\n\t^trace! !\n\n!RVMAspectTrace class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:51'!\nexampleInstance\n\t\"RVMAspectTrace exampleInstance\"\n\t^self aspect: #bytecodeCountsAverage size: 100 color: Color blue! !\n\n!RVMAspectTrace class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:46'!\nexampleView1\n\t\"RVMAspectTrace exampleView1\"\n\t\n\tRVMStripChartView openOnTrace: self exampleInstance! !\n\n!RVMAspectTrace class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:31'!\nexampleView2\n\t\"RVMAspectTrace exampleView2\"\n\t\n\tself exampleInstance aspectColorView demo! !\n\n!RVMAspectTrace class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:35'!\nexampleView3\n\t\"RVMAspectTrace exampleView3\"\n\t\n\tself exampleInstance aspectButton demo! !\n\n!RVMAspectTrace class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:25'!\nexampleView4\n\t\"RVMAspectTrace exampleView4\"\n\t\n\t| traces |\n\ttraces _ OrderedCollection new.\n\tRVMMulticoreSample systemAspects do:[:aspect|\n\t\ttraces add:(self aspect: aspect size: 100 color: Color random)].\n\tRVMStripChartView openOnTraces: traces! !\n\n!RVMAspectTrace class methodsFor: 'examples' stamp: 'dmu 9/17/2010 15:34'!\nexampleView8\n\t\"RVMAspectTrace exampleView8\"\n\t\n\t| traces |\n\ttraces _ OrderedCollection new.\n\ttraces add:(self  aspect: #numberOfRunningProcesses size: 100 color: Color random).\n\tRVMStripChartView openOnTraces: traces! !\n\n!RVMAspectTrace class methodsFor: 'common uses' stamp: 'ssa 1/1/1970 01:18'!\nmonitorAllSystemAspects\n\t\"RVMAspectTrace monitorAllSystemAspects\"\n\t\n\t| traces colors |\n\tcolors _ (Color wheel: RVMMulticoreSample systemAspects size saturation: 1.0 brightness: 0.7) readStream.\n\ttraces _ OrderedCollection new.\n\tRVMMulticoreSample systemAspects do:[:aspect|\n\t\ttraces add:(self aspect: aspect size: 100 color: colors next)].\n\tRVMStripChartView openOnTraces: traces titled:'All system aspects'! !\n\n!RVMAspectTrace class methodsFor: 'common uses' stamp: 'ssa 1/1/1970 00:07'!\nmonitorAspects: someAspects \n\t\"RVMAspectTrace monitorAspects: #(bytecodeCountsAverage  bytecodesPerSecondAverage yieldCountsAverage)\"\n\t\n\t| traces colors |\n\tcolors _ (Color wheel: someAspects size saturation: 1.0 brightness: 0.7) readStream.\n\ttraces _ OrderedCollection new.\n\tsomeAspects do:[:aspect|\n\t\ttraces add:(self aspect: aspect size: 100 color: colors next)].\n\tRVMStripChartView openOnTraces: traces titled:'Selected system aspects'! !\n\n!RVMBarrier methodsFor: 'as yet unclassified' stamp: 'dmu 1/21/2010 18:49'!\ninitialize\n\tinterlock _ Semaphore new.\n\tinterlock signal.\n\twaitSema _ Semaphore new.\n\tsignalsNeededToPass _ 0! !\n\n!RVMBarrier methodsFor: 'as yet unclassified' stamp: 'dmu 1/21/2010 19:14'!\nsignal\n\tinterlock critical: [\n\t\tsignalsNeededToPass _ signalsNeededToPass - 1.\n\t\tsignalsNeededToPass < 0 ifTrue: [self error: 'oops'].\n\t\tsignalsNeededToPass = 0 ifTrue: [waitSema signal]\n\t]! !\n\n!RVMBarrier methodsFor: 'as yet unclassified' stamp: 'dmu 1/21/2010 14:23'!\nsignalsNeededToPass: n\n\tsignalsNeededToPass _ n! !\n\n!RVMBarrier methodsFor: 'as yet unclassified' stamp: 'dmu 1/21/2010 18:32'!\nwait\n\twaitSema wait! !\n\n!RVMBarrier methodsFor: 'as yet unclassified' stamp: 'dmu 1/21/2010 18:24'!\nwaitSema ^ waitSema! !\n\n!RVMBootstrapPackage methodsFor: 'as yet unclassified' stamp: 'sm 3/11/2011 23:53'!\nmoreModificationsByTheRenaissanceTeam1\n\t^ {\n{ 'Debugger'. 'defaultReceiverInspector' }.\n{ 'Debugger'. 'defaultContextVariablesInspector' }.\n{ 'OpaqueForm' }.\n{ 'PluggableListViewByObject' }.\n{ 'TextBlockDoIt' }.\n\n\n{ 'Behavior'. 'setInstanceFormat:' }.\n{ 'Behavior'. 'subobjects' }.\n{ 'Behavior'. 'withAllSubclasses' }.\n{ 'BlockContext'. 'asString' }.\n{ 'BlockContext'. 'untilFalse:' }.\n{ 'Boolean'. 'haltIfTrue' }.\n{ 'Boolean'. 'mustBeBoolean' }.\n{ 'Boolean'. 'mustBeBooleanIn:' }.\n{ 'Browser'. 'classListIndex:' }.\n{ 'Browser'. 'createInstVarAccessors' }.\n{ 'Browser'. 'defineMessage:notifying:' }.\n{ 'Browser'. 'metaClassOrganizer:' }.\n{ 'ChangeList'. 'selectChangesMatching' }.\n{ 'ChangeList'. 'selectSuchThat' }.\n{ 'ChangeList'. 'selectedChanges' }.\n{ 'ChangeList'. 'spawnSelections' }.\n{ 'ChangeList'. 'spawnSuchThat:titled:' }.\n{ 'ChangeList'. 'togglePrimaryListIndex:' }.\n{ 'ChangeSet'. 'postscript' }.\n{ 'ChangeSet'. 'postscript:' }.\n{ 'ChangeSet'. 'preamble' }.\n{ 'ChangeSet'. 'preamble:' }.\n{ 'ChangeSet'. 'revertable' }.\n{ 'ChangeSet'. 'structures:' }.\n{ 'ChangeSet'. 'superclasses:' }.\n{ 'ChangeSorter'. 'moveClassesToOtherMatching' }.\n{ 'CharacterScanner'. 'scanCharactersFrom:to:in:rightX:stopConditions:displaying:' }.\n{ 'ClassCommentVersionsBrowser'. 'scanVersionsOf:' }.\n{ 'ClassDescription'. 'allMethodsInCategory:' }.\n{ 'ClassDescription'. 'instanceVariablesString' }.\n{ 'CodeHolder'. 'addContentsTogglesTo:' }.\n{ 'Collection'. 'atRandom' }.\n{ 'Collection'. 'removeAll:ifAbsent:' }.\n{ 'Collection'. 'subobjects' }.\n{ 'ColorForm'. 'setExtent:depth:' }.\n{ 'CompiledMethod'. 'symbolic' }.\n{ 'CompiledMethod'. 'timeStamp' }.\n{ 'ContextPart'. 'errorReportOn:' }.\n{ 'ContextPart'. 'unwindTo:' }.\n{ 'Controller'. 'lastActivityTime' }.\n{ 'Controller'. 'lastActivityTime:' }.\n{ 'CustomMenu'. 'arguments' }.\n{ 'CustomMenu'. 'invokeOn:orSendTo:' }.\n{ 'CustomMenu'. 'selections' }.\n{ 'CustomMenu'. 'startUp:withCaption:at:' }.\n{ 'CustomMenu'. 'targets' }.\n{ 'Debugger'. 'buildMVCDebuggerViewLabel:minSize:' }.\n{ 'Debugger'. 'codeView' }.\n{ 'Debugger'. 'contextStack' }.\n{ 'Debugger'. 'contextStack:' }.\n{ 'Debugger'. 'contextStackIndex' }.\n{ 'Debugger'. 'contextStackIndex:' }.\n{ 'Debugger'. 'contextStackList:' }.\n{ 'Debugger'. 'contextStackMenu:shifted:' }.\n{ 'Debugger'. 'contextStackTop' }.\n{ 'Debugger'. 'contextStackTop:' }.\n{ 'Debugger'. 'customButtonSpecs' }.\n{ 'Debugger'. 'debugAt:' }.\n{ 'Debugger'. 'errorWasInUIProcess' }.\n{ 'Debugger'. 'errorWasInUIProcess:' }.\n{ 'Debugger'. 'expandStack' }.\n{ 'Debugger'. 'interruptedController' }.\n{ 'Debugger'. 'interruptedController:' }.\n{ 'Debugger'. 'interruptedProcess' }.\n{ 'Debugger'. 'interruptedProcess:' }.\n{ 'Debugger'. 'isolationHead:' }.\n{ 'Debugger'. 'labelForContext:' }.\n{ 'Debugger'. 'openFullNoSuspendLabel:' }.\n{ 'Debugger'. 'pcRange' }.\n{ 'Debugger'. 'proceedValue' }.\n{ 'Debugger'. 'process:controller:context:isolationHead:' }.\n{ 'Debugger'. 'receiverInspector' }.\n{ 'Debugger'. 'resetContext:' }.\n{ 'Debugger'. 'resumeProcess:' }.\n{ 'Debugger'. 'savedCursor' }.\n{ 'Debugger'. 'savedCursor:' }.\n{ 'Debugger'. 'selectedContext' }.\n{ 'Debugger'. 'selectingPC' }.\n{ 'Debugger'. 'selectingPC:' }.\n{ 'Debugger'. 'sourceMap:' }.\n{ 'Debugger'. 'tempNames' }.\n{ 'Debugger'. 'terminateInterruptedProcessIfSoleOwner' }.\n{ 'Debugger'. 'theMethodNode' }.\n{ 'Debugger'. 'updateInspectorToObject:' }.\n{ 'Debugger'. 'updateInspectors' }.\n{ 'Dictionary'. 'subobjects' }.\n{ 'DisplayMedium'. 'border:width:fillColor:clippingBox:' }.\n{ 'DisplayMedium'. 'outlined' }.\n{ 'DisplayObject'. 'displayOn:at:' }.\n{ 'DisplayScreen'. 'clippingTo:do:' }.\n{ 'DisplayScreen'. 'outline:while:width:halftone:' }.\n{ 'DisplayScreen'. 'setExtent:depth:' }.\n{ 'DisplayText'. 'asParagraphWithStyle:' }.\n{ 'DisplayText'. 'isEmpty' }.\n{ 'DisplayText'. 'numberOfLines' }.\n{ 'EventSensor'. 'fetchMoreEvents' }.\n{ 'EventSensor'. 'flushNonKbdEvents' }.\n{ 'EventSensor'. 'nextEvent' }.\n{ 'EventSensor'. 'primGetNextEvent:' }.\n{ 'EventSensor'. 'primKbdNext' }.\n{ 'EventSensor'. 'primMouseButtons' }.\n{ 'EventSensor'. 'processEvent:' }.\n{ 'EventSensor'. 'processKeyboardEvent:' }.\n{ 'False'. 'haltIfFalse' }.\n{ 'FileList'. 'fullFileListMenu:shifted:' }.\n{ 'Form'. 'bottomLeft' }.\n{ 'Form'. 'bottomRight' }.\n{ 'Form'. 'displayTranslucentOn:at:clippingBox:' }.\n{ 'Form'. 'eraseInside:' }.\n{ 'Form'. 'fill:rule:fillColor:clippingBox:' }.\n{ 'Form'. 'leftCenter' }.\n{ 'Form'. 'paintBits:at:clippingBox:translucent:' }.\n{ 'Form'. 'rightCenter' }.\n{ 'Form'. 'rotateBy:smoothing:' }.\n{ 'FormView'. 'defaultRule' }.\n{ 'InfiniteForm'. 'hasNonStandardPalette' }.\n{ 'InputSensor'. 'waitClick' }.\n{ 'Inspector'. 'fieldListMenu:' }.\n{ 'Inspector'. 'locateSelection' }.\n{ 'Inspector'. 'selectionIndex:' }.\n{ 'Inspector'. 'selectionUpdateTime' }.\n{ 'Inspector'. 'selectionUpdateTime:' }.\n{ 'InstructionStream'. 'skipBackBeforeJump' }.\n{ 'LinkedList'. 'asOrderedCollection' }.\n{ 'ListController'. 'processKeyboard' }.\n{ 'ListView'. 'clippingBox' }.\n{ 'ListView'. 'findSelection:' }.\n{ 'ListView'. 'isEmpty' }.\n{ 'ListView'. 'textStyle:' }.\n{ 'ListView'. 'update:' }.\n{ 'Matrix'. 'removeAll' }.\n{ 'Message'. 'selector:' }.\n{ 'MethodHolder'. 'doItReceiver' }.\n{ 'Number'. 'asPointWithinRectangleWithExtent:' }.\n{ 'Number'. 'atRandom' }.\n{ 'Number'. 'floatPrecisionForDecimalPlaces:' }.\n{ 'Number'. 'inverted' }.\n{ 'Number'. 'pi' }.\n{ 'Number'. 'printShowingMax3Digits' }.\n{ 'Object'. 'allInstanceVariableValuesPlusIndexed' }.\n{ 'Object'. 'asExplorerString' }.\n{ 'Object'. 'asObjectCoordinate' }.\n{ 'Object'. 'changed:with:from:' }.\n{ 'Object'. 'hasInstanceVariables' }.\n{ 'Object'. 'inspect' }.\n{ 'Object'. 'isArray' }.\n{ 'Object'. 'isBoolean' }.\n{ 'Object'. 'isEnsemble' }.\n{ 'Object'. 'locate' }.\n{ 'Object'. 'outlineString' }.\n{ 'Object'. 'printDirectlyToDisplay' }.\n{ 'Object'. '~==' }.\n{ 'OpaqueForm'. 'colormapIfNeededFor:' }.\n{ 'OpaqueForm'. 'figure' }.\n{ 'OpaqueForm'. 'offset' }.\n{ 'OpaqueForm'. 'shape' }.\n{ 'OpaqueForm'. 'valueAt:' }.\n{ 'OrderedCollection'. 'addAll:after:' }.\n{ 'OrderedCollection'. 'inspectorClass' }.\n{ 'ParagraphEditor'. 'adjustWidths' }.\n{ 'ParagraphEditor'. 'browseIt' }.\n{ 'ParagraphEditor'. 'compileSelectionFor:in:' }.\n{ 'ParagraphEditor'. 'cursorUp:' }.\n{ 'ParagraphEditor'. 'evaluate:' }.\n{ 'ParagraphEditor'. 'evaluateSelection' }.\n{ 'ParagraphEditor'. 'exploreIt:' }.\n{ 'ParagraphEditor'. 'inspectIt' }.\n{ 'ParagraphEditor'. 'installAsTest' }.\n{ 'ParagraphEditor'. 'printIt:' }.\n{ 'Pen'. 'direction:' }.\n{ 'Pen'. 'penAngleFrom:to:' }.\n{ 'Pen'. 'turnToward:' }.\n}! !\n\n!RVMBootstrapPackage methodsFor: 'as yet unclassified' stamp: 'sm 3/11/2011 22:23'!\nmoreModificationsByTheRenaissanceTeam2\n\t^ {\n\n{ 'PluggableButtonView'. 'label:' }.\n{ 'PluggableButtonView'. 'performAction' }.\n{ 'PluggableButtonView'. 'update:' }.\n{ 'PluggableFileList'. 'startUpWithCaption:' }.\n{ 'PluggableListControllerOfMany'. 'redButtonActivity' }.\n{ 'PluggableListView'. 'update:' }.\n{ 'PluggableListViewByObject'. 'labelForItem:' }.\n{ 'PluggableListViewByObject'. 'list:' }.\n{ 'PluggableListViewByObject'. 'objects:' }.\n{ 'Point'. 'floor' }.\n{ 'Point'. 'inverted' }.\n{ 'Point'. 'manhattanDist:' }.\n{ 'Point'. 'mined' }.\n{ 'Point'. 'x:' }.\n{ 'Point'. 'zeno' }.\n{ 'PointerFinder'. 'menu:shifted:' }.\n{ 'PointerFinder'. 'open' }.\n{ 'PositionableStream'. 'printOn:' }.\n{ 'Project'. 'enter:revert:saveForRevert:' }.\n{ 'Rectangle'. 'asRandomPoint' }.\n{ 'Rectangle'. 'displayOn:withBorderWidths:' }.\n{ 'Rectangle'. 'displayWithBorderWidths:' }.\n{ 'Rectangle'. 'height:' }.\n{ 'Rectangle'. 'intersect:' }.\n{ 'Rectangle'. 'moveBy:' }.\n{ 'Rectangle'. 'newRectButtonPressedDo:' }.\n{ 'Rectangle'. 'newRectFrom:' }.\n{ 'Rectangle'. 'origin:' }.\n{ 'Rectangle'. 'subDivideBy:' }.\n{ 'Rectangle'. 'subDivideRoundedBy:' }.\n{ 'Rectangle'. 'topRight:' }.\n{ 'Rectangle'. 'width:' }.\n{ 'ScreenController'. 'appearanceMenu' }.\n{ 'ScreenController'. 'closeAllUnlockedWindows' }.\n{ 'ScreenController'. 'closeTopWindow' }.\n{ 'ScreenController'. 'controlActivity' }.\n{ 'ScreenController'. 'exploreViewFromUser' }.\n{ 'ScreenController'. 'isControlWanted' }.\n{ 'ScreenController'. 'openMenu' }.\n{ 'ScreenController'. 'openProcessBrowser' }.\n{ 'ScreenController'. 'preventClosing' }.\n{ 'ScreenController'. 'restoreDisplay' }.\n{ 'ScreenController'. 'windowMenu' }.\n{ 'SequenceableCollection'. 'asCircularCollection' }.\n{ 'SequenceableCollection'. 'groupsOfNoMoreThan:atATimeDo:' }.\n{ 'SequenceableCollection'. 'rotateBackward' }.\n{ 'SequenceableCollection'. 'rotateForward' }.\n{ 'SequenceableCollection'. 'with:with:do:' }.\n{ 'SequenceableCollection'. 'with:with:withIndexDo:' }.\n{ 'SequenceableCollection'. 'with:withIndexDo:' }.\n{ 'SequenceableCollection'. 'without:collect:' }.\n{ 'SequenceableCollection'. 'without:select:' }.\n{ 'SmalltalkImage'. 'forceChangesToDisk' }.\n{ 'StandardFileStream'. 'nextPut:' }.\n{ 'StandardSystemController'. 'blueButtonActivity' }.\n{ 'StandardSystemController'. 'blueButtonMenu' }.\n{ 'StandardSystemController'. 'closeAndUnscheduleIfOkWithModelNoTerminate' }.\n{ 'StandardSystemController'. 'closeForReal' }.\n{ 'StandardSystemController'. 'preventClosing:' }.\n{ 'StandardSystemController'. 'status' }.\n{ 'StandardSystemView'. 'cacheBitsAsTwoTone' }.\n{ 'StandardSystemView'. 'closingGuardIcon' }.\n{ 'StandardSystemView'. 'displayLabelBackground:' }.\n{ 'StandardSystemView'. 'displayView' }.\n{ 'StandardSystemView'. 'initialFrame' }.\n{ 'StandardSystemView'. 'setUpdatablePanesFrom:' }.\n{ 'StrikeFont'. 'characterToGlyphMap:' }.\n{ 'StrikeFont'. 'emphasis' }.\n{ 'StrikeFont'. 'maxWidth:' }.\n{ 'StrikeFont'. 'pointSize:' }.\n{ 'StrikeFont'. 'raster:' }.\n{ 'StrikeFont'. 'subscript:' }.\n{ 'StrikeFont'. 'superscript:' }.\n{ 'StrikeFont'. 'type' }.\n{ 'StrikeFont'. 'xOffset:' }.\n{ 'StrikeFont'. 'xTable:' }.\n{ 'String'. 'asParagraphWithStyle:' }.\n{ 'String'. 'withoutFirst:' }.\n{ 'String'. 'withoutLast:' }.\n{ 'StringHolderView'. 'displayContents:' }.\n{ 'StringHolderView'. 'textStyle:' }.\n{ 'SystemDictionary'. 'forceChangesToDisk' }.\n{ 'SystemDictionary'. 'majorShrinkClassesToLeave' }.\n{ 'SystemDictionary'. 'presumedSentMessages' }.\n{ 'SystemDictionary'. 'recolorWindows' }.\n{ 'Text'. 'asParagraphWithStyle:' }.\n{ 'Text'. 'bold' }.\n{ 'Text'. 'font:' }.\n{ 'Text'. 'fontName:pointSize:' }.\n{ 'Text'. 'italic' }.\n{ 'Text'. 'makeUnderlineFrom:to:' }.\n{ 'Text'. 'makeUnderlinedFrom:to:' }.\n{ 'Text'. 'underline' }.\n{ 'TextBlockDoIt'. 'actOnClickFor:' }.\n{ 'TextBlockDoIt'. 'actionBlock' }.\n{ 'True'. 'haltIfTrue' }.\n{ 'View'. 'addSubView:below:' }.\n{ 'View'. 'addSubView:toRightOf:' }.\n{ 'View'. 'allSubViews' }.\n{ 'View'. 'borderColor:' }.\n{ 'View'. 'boundingBox:' }.\n{ 'View'. 'displayTransformation:' }.\n{ 'View'. 'isRVMView' }.\n{ 'View'. 'moveLeft' }.\n{ 'View'. 'moveRight' }.\n{ 'View'. 'setDefaultBackgroundColor' }.\n{ 'View'. 'shorter' }.\n{ 'View'. 'stretchFrame:startingWith:' }.\n{ 'View'. 'taller' }.\n\n}! !\n\n!RVMBootstrapPackage methodsFor: 'as yet unclassified' stamp: 'sm 3/11/2011 23:07'!\nmoreModificationsByTheRenaissanceTeam3\n\t^ {\n{ 'Behavior'. 'allSubclasses' }.\n{ 'Behavior'. 'archiveVersion' }.\n{ 'Behavior'. 'compile:notifying:trailer:' }.\n{ 'BlockContext'. 'asContext' }.\n{ 'BlockContext'. 'loopExit' }.\n{ 'BlockContext'. 'value:value:value:value:value:' }.\n{ 'BlockNode'. 'returnSelfIfNoOther' }.\n{ 'Boolean'. 'haltIfFalse' }.\n{ 'Browser'. 'classOrganizer' }.\n{ 'Browser'. 'classOrganizer:' }.\n{ 'Browser'. 'defineMessageFrom:notifying:' }.\n{ 'Browser'. 'lastClassSelected' }.\n{ 'Browser'. 'lastClassSelected:' }.\n{ 'Browser'. 'metaClassIndicated:' }.\n{ 'Browser'. 'metaClassOrganizer' }.\n{ 'Browser'. 'setClass:selector:' }.\n{ 'Browser'. 'systemOrganizer' }.\n{ 'ChangeList'. 'changeList:' }.\n{ 'ChangeList'. 'changeListMenu:' }.\n{ 'ChangeList'. 'scanRecords:' }.\n{ 'ChangeList'. 'spawnChangesMatching' }.\n{ 'ChangeList'. 'spawnSuchThat' }.\n{ 'ChangeRecord'. 'match:' }.\n{ 'ChangeRecord'. 'methodClassNameSafe' }.\n{ 'ChangeRecord'. 'methodSelectorSafe' }.\n{ 'ChangeSet'. 'changeRecords' }.\n{ 'ChangeSet'. 'changeRecords:' }.\n{ 'ChangeSet'. 'checkForConversionMethods' }.\n{ 'ChangeSet'. 'editPostscript' }.\n{ 'ChangeSet'. 'fileOutClassDefinition:on:' }.\n{ 'ChangeSet'. 'isolatedProject:' }.\n{ 'ChangeSet'. 'isolationSet' }.\n{ 'ChangeSet'. 'revertable:' }.\n{ 'ChangeSorter'. 'classListKey:from:' }.\n{ 'ChangeSorter'. 'classListMenu:shifted:' }.\n{ 'ChangeSorter'. 'copyClassesToOtherMatching' }.\n{ 'Character'. 'isCharacter' }.\n{ 'CharacterScanner'. 'destX:' }.\n{ 'CodeHolder'. 'addModelItemsToWindowMenu:' }.\n{ 'CodeHolder'. 'offerWhatToShowMenu' }.\n{ 'ContextPart'. 'runSimulated:contextAtEachStep:' }.\n{ 'ControlManager'. 'activeControllerNoTerminate:andProcess:' }.\n{ 'ControlManager'. 'reset' }.\n{ 'ControlManager'. 'restore:below:without:' }.\n{ 'Controller'. 'initialize' }.\n{ 'Debugger'. 'buildMVCNotifierViewLabel:message:minSize:' }.\n{ 'Debugger'. 'contextStackIndex:oldContextWas:' }.\n{ 'Debugger'. 'contextVariablesInspector' }.\n{ 'Debugger'. 'contextVariablesInspector:' }.\n{ 'Debugger'. 'externalInterrupt' }.\n{ 'Debugger'. 'failedProject' }.\n{ 'Debugger'. 'failedProject:' }.\n{ 'Debugger'. 'installListFontInto:' }.\n{ 'Debugger'. 'isolationHead' }.\n{ 'Debugger'. 'newStack:' }.\n{ 'Debugger'. 'openNotifierContents:label:' }.\n{ 'Debugger'. 'optionalButtonPairs' }.\n{ 'Debugger'. 'otherButtonSpecs' }.\n{ 'Debugger'. 'receiverInspector:' }.\n{ 'Debugger'. 'release' }.\n{ 'Debugger'. 'sourceMap' }.\n{ 'Debugger'. 'step' }.\n{ 'Debugger'. 'tempNames:' }.\n{ 'Debugger'. 'theMethodNode:' }.\n{ 'Debugger'. 'toggleContextStackIndex:' }.\n{ 'Debugger'. 'windowIsClosing' }.\n{ 'DictionaryInspector'. 'dictionaryMenu:' }.\n{ 'DisplayMedium'. 'border:width:rule:fillColor:clippingBox:' }.\n{ 'DisplayMedium'. 'border:widthRectangle:rule:fillColor:clippingBox:' }.\n{ 'DisplayObject'. 'followCursor' }.\n{ 'DisplayScreen'. 'boundingBox' }.\n{ 'DisplayScreen'. 'clippingBox:' }.\n{ 'DisplayScreen'. 'copyFrom:' }.\n{ 'DisplayScreen'. 'fullScreen' }.\n{ 'DisplayScreen'. 'outline:do:while:width:halftone:' }.\n{ 'DualChangeSorter'. 'open' }.\n{ 'EventSensor'. 'flushAllButDandDEvents' }.\n{ 'EventSensor'. 'primKbdPeek' }.\n{ 'EventSensor'. 'primMousePt' }.\n{ 'EventSensor'. 'queueEvent:' }.\n{ 'FileList'. 'fileContentsMenu:shifted:' }.\n{ 'FileList'. 'fileSelectedMenu:' }.\n{ 'Float'. 'absPrintOn:base:digitCount:' }.\n{ 'Form'. 'asOpaqueForm' }.\n{ 'Form'. 'bottomCenter' }.\n{ 'Form'. 'displayBox' }.\n{ 'Form'. 'displayOn:at:clippingBox:rule:fillColor:' }.\n{ 'Form'. 'erase' }.\n{ 'Form'. 'nextLifeGeneration' }.\n{ 'Form'. 'nextLifeGenerationBlueBook' }.\n{ 'Form'. 'scaledToSize:' }.\n{ 'Form'. 'topCenter' }.\n{ 'Form'. 'topLeft' }.\n{ 'Form'. 'topRight' }.\n{ 'Form'. 'wrapAround:' }.\n{ 'FormView'. 'defaultControllerClass' }.\n{ 'FormView'. 'displayView' }.\n{ 'HierarchyBrowser'. 'setClass:selector:' }.\n{ 'InfiniteForm'. 'depth' }.\n{ 'Inspector'. 'exploreSelection' }.\n{ 'Inspector'. 'inspectorKey:from:' }.\n{ 'Inspector'. 'timeOfLastListUpdate:' }.\n{ 'LargePositiveInteger'. 'printOn:' }.\n{ 'LinkedList'. 'hasContentsInExplorer' }.\n{ 'ListView'. 'isEmpty:' }.\n{ 'ListView'. 'textStyle' }.\n{ 'ListView'. 'totalContentHeight' }.\n{ 'Matrix'. 'postCopy' }.\n{ 'Matrix'. 'preMultiplyByMatrix:' }.\n{ 'Message'. 'arguments:' }.\n{ 'Message'. 'sentTo:' }.\n{ 'MethodContext'. 'asContext' }.\n{ 'Number'. 'printShowingDecimalPlaces:' }.\n{ 'Number'. 'zeno' }.\n{ 'Object'. 'allInstanceVariableValues' }.\n{ 'Object'. 'archiveVersion' }.\n{ 'Object'. 'defaultBackgroundColor' }.\n{ 'Object'. 'display' }.\n{ 'Object'. 'explore' }.\n{ 'Object'. 'hasContents' }.\n{ 'Object'. 'isCharacter' }.\n{ 'Object'. 'isObject' }.\n{ 'Object'. 'print' }.\n{ 'Object'. 'printStringUpTo:' }.\n{ 'Object'. 'subobjects' }.\n{ 'Object'. 'update:with:from:' }.\n{ 'OpaqueForm'. 'colorForm' }.\n{ 'OpaqueForm'. 'colorForm:' }.\n{ 'OpaqueForm'. 'computeBoundingBox' }.\n{ 'OpaqueForm'. 'displayOn:at:clippingBox:rule:fillColor:' }.\n{ 'OpaqueForm'. 'displayOn:transformation:clippingBox:align:with:rule:fillColor:' }.\n{ 'OpaqueForm'. 'setFigure:shape:' }.\n{ 'OpaqueForm'. 'storeOn:' }.\n{ 'OpaqueForm'. 'valueAt:put:' }.\n{ 'PackageInfo'. 'removeFromSystem' }.\n\n}! !\n\n!RVMBootstrapPackage methodsFor: 'as yet unclassified' stamp: 'sm 3/11/2011 22:47'!\nmoreModificationsByTheRenaissanceTeam4\n\t^ {\n\n{ 'Paragraph'. 'asForm' }.\n{ 'ParagraphEditor'. 'cursorDown:' }.\n{ 'ParagraphEditor'. 'debugIt' }.\n{ 'ParagraphEditor'. 'exploreIt' }.\n{ 'ParagraphEditor'. 'methodSourceContainingIt' }.\n{ 'ParagraphEditor'. 'parseIt' }.\n{ 'ParagraphEditor'. 'printIt' }.\n{ 'ParagraphEditor'. 'sameColumn:newLine:forward:' }.\n{ 'Pen'. 'mandala:diameter:' }.\n{ 'PluggableListView'. 'getList' }.\n{ 'PluggableListViewByObject'. 'changeModelSelection:' }.\n{ 'PluggableListViewByObject'. 'getCurrentSelectionIndex' }.\n{ 'PluggableListViewByObject'. 'objects' }.\n{ 'PluggableListViewByObject'. 'scrollCache' }.\n{ 'PluggableListViewByObject'. 'scrollCache:' }.\n{ 'Point'. 'atRandom' }.\n{ 'Point'. 'ceiling' }.\n{ 'Point'. 'mandist:' }.\n{ 'Point'. 'maxed' }.\n{ 'Point'. 'moveBy:' }.\n{ 'Point'. 'wrapAround:' }.\n{ 'Point'. 'y:' }.\n{ 'PopUpMenu'. 'startUpWithCaption:' }.\n{ 'PopUpMenu'. 'startUpWithCaption:at:allowKeyboard:' }.\n{ 'Project'. 'backgroundColorForMvcProject' }.\n{ 'Project'. 'defaultBackgroundColor' }.\n{ 'Project'. 'okToChange' }.\n{ 'Project'. 'renameTo:' }.\n{ 'RVMBootstrapPackage'. 'moreModificationsByTheRenaissanceTeam1' }.\n{ 'RVMBootstrapPackage'. 'moreModificationsByTheRenaissanceTeam2' }.\n{ 'RVMBootstrapPackage'. 'trickyModificationsManuallyCollected' }.\n{ 'Rectangle'. 'corner:' }.\n{ 'Rectangle'. 'display' }.\n{ 'Rectangle'. 'extent:' }.\n{ 'Rectangle'. 'fastMoveBy:' }.\n{ 'Rectangle'. 'moveTo:' }.\n{ 'Rectangle'. 'scaleByRect:' }.\n{ 'Rectangle'. 'selfMerge:' }.\n{ 'Rectangle'. 'size' }.\n{ 'ScreenController'. 'recolorWindows' }.\n{ 'SequenceableCollection'. 'is:after:' }.\n{ 'SequenceableCollection'. 'shuffled' }.\n{ 'SmalltalkImage'. 'saveAs:' }.\n{ 'SmalltalkImage'. 'snapshot:andQuit:embedded:' }.\n{ 'SmalltalkImage'. 'sourcesName' }.\n{ 'StandardFileMenu'. 'oldFileFrom:withPattern:' }.\n{ 'StandardSystemController'. 'close' }.\n{ 'StandardSystemController'. 'closeAndUnscheduleIfOkWithModel' }.\n{ 'StandardSystemController'. 'isClosed' }.\n{ 'StandardSystemController'. 'preventClosing' }.\n{ 'StandardSystemController'. 'redButtonActivity' }.\n{ 'StandardSystemController'. 'togglePreventClosing' }.\n{ 'StandardSystemView'. 'displayClosingGuardBoxIfNeeded' }.\n{ 'StandardSystemView'. 'displayLabelBoxes' }.\n{ 'StrikeFont'. 'ascent:' }.\n{ 'StrikeFont'. 'derivativeFonts' }.\n{ 'StrikeFont'. 'derivativeFonts:' }.\n{ 'StrikeFont'. 'descent:' }.\n{ 'StrikeFont'. 'glyphs:' }.\n{ 'StrikeFont'. 'maxAscii:' }.\n{ 'StrikeFont'. 'minAscii:' }.\n{ 'StrikeFont'. 'raster' }.\n{ 'StrikeFont'. 'strikeLength' }.\n{ 'StrikeFont'. 'strikeLength:' }.\n{ 'StrikeFont'. 'subscript' }.\n{ 'StrikeFont'. 'superscript' }.\n{ 'StrikeFont'. 'type:' }.\n{ 'StrikeFont'. 'xOffset' }.\n{ 'String'. 'asSmalltalkObject' }.\n{ 'StringHolderView'. 'askBeforeDiscardingEdits' }.\n{ 'StringHolderView'. 'changeTextStyle:' }.\n{ 'StringHolderView'. 'defaultTextStyle' }.\n{ 'StringHolderView'. 'editString:' }.\n{ 'StringHolderView'. 'initialize' }.\n{ 'StringHolderView'. 'textStyle' }.\n{ 'Symbol'. 'asKeyword' }.\n{ 'SystemDictionary'. 'majorShrinkClassesToZap' }.\n{ 'SystemDictionary'. 'updateAllWindowColors' }.\n{ 'Text'. 'emphasizeFrom:to:with:' }.\n{ 'Text'. 'fontNumber:' }.\n{ 'Text'. 'makeItalicFrom:to:' }.\n{ 'Text'. 'underlined' }.\n{ 'TextBlockDoIt'. 'actionBlock:' }.\n{ 'TranscriptStream'. 'openLabel:' }.\n{ 'VersionsBrowser'. 'scanVersionsOf:class:meta:category:selector:' }.\n{ 'View'. 'addSubView:above:' }.\n{ 'View'. 'addSubView:in:borderWidth:' }.\n{ 'View'. 'addSubView:toLeftOf:' }.\n{ 'View'. 'borderColor' }.\n{ 'View'. 'demo' }.\n{ 'View'. 'demoSized:' }.\n{ 'View'. 'insetDisplayBox:' }.\n{ 'View'. 'insideColor' }.\n{ 'View'. 'moveBy:' }.\n{ 'View'. 'moveDown' }.\n{ 'View'. 'moveFrom:' }.\n{ 'View'. 'moveUp' }.\n{ 'View'. 'narrower' }.\n{ 'View'. 'subViews:' }.\n{ 'View'. 'subViewsSatisfying:' }.\n{ 'View'. 'transformUsing:' }.\n{ 'View'. 'viewport:' }.\n{ 'View'. 'wider' }.\n{ 'Workspace'. 'addModelItemsToWindowMenu:' }.\n\n\n}! !\n\n!RVMBootstrapPackage methodsFor: 'as yet unclassified' stamp: 'StefanMarr 7/14/2011 17:13'!\nmoreModificationsByTheRenaissanceTeam5\n\t^ {\n\"Stefan: the next one is a fix for long Author names:\"\n{'PositionableStream'. 'copyPreamble:from:'}.\n\n\"Stefan: now other stuff, uncategorized\"\n\n{ 'ChangeList class'. 'browseRecords:' }.\n{ 'ChangeList class'. 'browseRecords:titled:' }.\n{ 'ChangeList class'. 'fileReaderServicesForFile:suffix:' }.\n{ 'ChangeList class'. 'open:name:multiSelect:' }.\n{ 'ChangeList class'. 'services' }.\n{ 'ChangeSorter class'. 'fileIntoNewChangeSet:' }.\n{ 'Color class'. 'colorChart' }.\n{ 'Color class'. 'colorChart:' }.\n{ 'Color class'. 'fromUser' }.\n{ 'Controller class'. 'initialize' }.\n{ 'Debugger class'. 'openNoForkSuspendOn:context:label:contents:fullView:selectingOtherIndex:' }.\n{ 'Debugger class'. 'openNoSuspendOn:context:label:contents:fullView:' }.\n{ 'Debugger class'. 'openOn:context:label:contents:fullView:' }.\n{ 'Delay class'. 'startUp' }.\n{ 'FileDirectory class'. 'startUp' }.\n{ 'FileStream class'. 'concreteStream' }.\n{ 'FileStream class'. 'fileIn:' }.\n{ 'Form class'. 'dotOfSize:color:' }.\n{ 'Form class'. 'fromBinaryStream:' }.\n{ 'FormView class'. 'open:named:' }.\n{ 'HierarchyBrowser class'. 'newFor:' }.\n{ 'HierarchyBrowser class'. 'newFor:labeled:' }.\n{ 'ImageReadWriter class'. 'understandsImageFormat:' }.\n{ 'Inspector class'. 'newFrom:' }.\n{ 'Inspector class'. 'openOn:withEvalPane:withLabel:valueViewClass:' }.\n{ 'MessageSet class'. 'openMessageList:name:autoSelect:' }.\n{ 'OpaqueForm class'. 'makeStar' }.\n{ 'ParagraphEditor class'. 'initializeCmdKeyShortcuts' }.\n{ 'PluggableFileList class'. 'oldFileMenu:withPattern:' }.\n{ 'PluggableListView class'. 'on:list:selected:changeSelected:' }.\n{ 'PluggableListView class'. 'on:list:selected:changeSelected:menu:' }.\n{ 'PluggableListViewOfMany class'. 'on:list:primarySelection:changePrimarySelection:listSelection:changeListSelection:menu:' }.\n{ 'PluggableListViewOfMany class'. 'on:list:primarySelection:changePrimarySelection:listSelection:changeListSelection:menu:keystroke:' }.\n{ 'PluggableTextView class'. 'on:text:accept:' }.\n{ 'ProcessBrowser class'. 'isUIProcess:' }.\n{ 'Project class'. 'addItem:toMenu:selection:project:' }.\n{ 'RealEstateAgent class'. 'assignCollapsePointFor:' }.\n{ 'RealEstateAgent class'. 'maximumUsableArea' }.\n{ 'RealEstateAgent class'. 'screenTopSetback' }.\n{ 'RealEstateAgent class'. 'scrollBarSetback' }.\n{ 'RunArray class'. 'scanFrom:' }.\n{ 'SelectionMenu class'. 'labels:lines:selectors:' }.\n{ 'StandardFileMenu class'. 'oldFileFrom:withPattern:' }.\n{ 'StandardFileMenu class'. 'oldFileMenu:withPattern:' }.\n{ 'StandardFileMenu class'. 'oldFileStreamFrom:withPattern:' }.\n{ 'StandardFileMenu class'. 'oldFileStreamWithPattern:' }.\n{ 'StandardFileMenu class'. 'oldFileWithPattern:' }.\n{ 'StandardSystemView class'. 'model:label:minimumSize:' }.\n{ 'Symbol class'. 'readFrom:' }.\n{ 'TextStyle class'. 'mvcPromptForFont:' }.\n{ 'TextStyle class'. 'mvcPromptForStyle:andSendTo:withSelector:' }.\n{ 'Transcripter class'. 'emergencyEvaluator' }.\n{ 'Utilities class'. 'exploreViewFromUser' }.\n{ 'Utilities class'. 'informUserDuring:' }.\n{ 'Utilities class'. 'pointersTo:except:' }.\n\n{ 'RVMBootstrapPackage'. 'moreModificationsByTheRenaissanceTeam3' }.\n{ 'RVMBootstrapPackage'. 'moreModificationsByTheRenaissanceTeam4' }.\n{ 'RVMBootstrapPackage'. 'moreModificationsByTheRenaissanceTeam5' }.\n\n{ 'OpaqueForm class'. 'figure:shape:' }.\n{ 'OpaqueForm class'. 'shape:' }.\n\n\n}! !\n\n!RVMBootstrapPackage methodsFor: 'as yet unclassified' stamp: 'ads 2/4/2011 12:24'!\nrevertToVersionBeforeTeam: team\n\t\"DO NOT RUN THIS METHOD ON MULTIPLE CORES!!!!!!!!!! Only on one core.\"\n\t\n\t\"Also, notice that the stuff in this method is ALMOST exactly the same as the stuff in\n\t trickyModificationsThatNeedToBeDoneInOrder (but in reverse order, since we're removing).\n\t In the long run, we should be able to eliminate the duplication. But the current RVM image contains some weird\n\t stuff, like methods that existed in Squeak 3.7 and were changed by the Renaissance team but somehow the image\n\t doesn't contain a copy of the old version of the method. So for now, we have this big ugly method. -- Adam, Dec. 2010\"\n\n\tteam revertToOldVersionOrRemove: (ProcessorScheduler class methodNamed: #emergencyProcess).\n\tteam revertToOldVersionOrRemove: (ProcessorScheduler class methodNamed: #startEmergencyProcess).\n\tteam revertToOldVersionOrRemove: (ProcessorScheduler class methodNamed: #startUp).\n\tteam revertToOldVersionOrRemove: (ProcessBrowser class methodNamed: #nameAndRulesFor:).\n\tteam aboutToModifyClass: ProcessorScheduler.\n\tObject subclass: #ProcessorScheduler\n\t\tinstanceVariableNames: 'quiescentProcessLists activeProcess'\n\t\tclassVariableNames: 'BackgroundProcess HighIOPriority LowIOPriority SystemBackgroundPriority SystemRockBottomPriority TimingPriority UserBackgroundPriority UserInterruptPriority UserSchedulingPriority'\n\t\tpoolDictionaries: ''\n\t\tcategory: 'Kernel-Processes'.\n\n\tteam revertToOldVersionOrRemove: (Debugger methodNamed: #fullyExpandStack).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #debug:title:full:).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #resume).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #suspend).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #terminate).\n\tteam revertToOldVersionOrRemove: (Process class methodNamed: #semaForSupensions).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #children).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #children:).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #parent).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #parent:).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #creatorEnsemble).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #creatorEnsemble:).\n\tteam aboutToModifyClass: Process.\n\tLink subclass: #Process\n\t\tinstanceVariableNames: 'suspendedContext priority myList errorHandler name'\n\t\tclassVariableNames: ''\n\t\tpoolDictionaries: ''\n\t\tcategory: 'Kernel-Processes'.\n\n\tteam revertToOldVersionOrRemove: (TranscriptStream class methodNamed: #showInConsole).\n\tteam revertToOldVersionOrRemove: (TranscriptStream class methodNamed: #showInConsole:).\n\tteam aboutToModifyClass: TranscriptStream.\n\tWriteStream subclass: #TranscriptStream\n\t\tinstanceVariableNames: ''\n\t\tclassVariableNames: 'AccessSema'\n\t\tpoolDictionaries: ''\n\t\tcategory: 'Collections-Streams'.\n\n\t\"Safe.\"\n\tteam aboutToModifyClass: Collection.\n\tObject subclass: #Collection\n\t\tinstanceVariableNames: ''\n\t\tclassVariableNames: 'MutexForPicking RandomForPicking'\n\t\tpoolDictionaries: ''\n\t\tcategory: 'Collections-Abstract'.\n\n\t\"Safe. I don't even understand why they bothered or why the Squeak image had this variable.\"\n\tteam aboutToModifyClass: AnimatedGIFReadWriter.\n\tGIFReadWriter subclass: #AnimatedGIFReadWriter\n\t\tinstanceVariableNames: 'forms offsets delays comments'\n\t\tclassVariableNames: ''\n\t\tpoolDictionaries: ''\n\t\tcategory: 'Graphics-Files'.\n\n\t\"Safe. The methods that use the new cursors are already gone.\"\n\tteam revertToOldVersionOrRemove: (Cursor class methodNamed: #initialize).\n\tteam aboutToModifyClass: Cursor.\n\tForm subclass: #Cursor\n\t\tinstanceVariableNames: ''\n\t\tclassVariableNames: 'BlankCursor BottomLeftCursor BottomRightCursor CornerCursor CrossHairCursor CurrentCursor DownCursor MarkerCursor MenuCursor MoveCursor NormalCursor OriginCursor ReadCursor ResizeLeftCursor ResizeTopCursor ResizeTopLeftCursor ResizeTopRightCursor RightArrowCursor SquareCursor TopLeftCursor TopRightCursor UpCursor WaitCursor WebLinkCursor WriteCursor XeqCursor'\n\t\tpoolDictionaries: ''\n\t\tcategory: 'Graphics-Display Objects'.\n\n\t\"Safe. Only called by code that's part of the RVM packages.\"\n\tteam aboutToModifyClass: DisplayScreen.\n\tForm subclass: #DisplayScreen\n\t\tinstanceVariableNames: 'clippingBox extraRegions'\n\t\tclassVariableNames: 'DeferringUpdates DisplayChangeSignature ScreenSave'\n\t\tpoolDictionaries: ''\n\t\tcategory: 'Graphics-Display Objects'.\n\n\tteam revertToOldVersionOrRemove: (Controller methodNamed: #controlLoop).\n\tteam revertToOldVersionOrRemove: (Controller methodNamed: #killCounter).\n\tteam revertToOldVersionOrRemove: (Controller methodNamed: #killCounter:).\n\tteam revertToOldVersionOrRemove: (Controller methodNamed: #lastProcessRunningMe).\n\tteam revertToOldVersionOrRemove: (Controller methodNamed: #lastProcessRunningMe:).\n\tteam aboutToModifyClass: Controller.\n\tObject subclass: #Controller\n\t\tinstanceVariableNames: 'model view sensor lastActivityTime'\n\t\tclassVariableNames: 'MinActivityLapse'\n\t\tpoolDictionaries: ''\n\t\tcategory: 'Kernel-ST80 Remnants'.\n\n\tteam revertToOldVersionOrRemove: (Paragraph methodNamed: #displayOn:lines:).\n\tteam revertToOldVersionOrRemove: (Paragraph methodNamed: #compositionRectangle:text:style:offset:).\n\tteam revertToOldVersionOrRemove: (Paragraph methodNamed: #destFormSema:).\n\tteam aboutToModifyClass: Paragraph.\n\tDisplayText subclass: #Paragraph\n\t\tinstanceVariableNames: 'clippingRectangle compositionRectangle destinationForm rule mask marginTabsLevel lines lastLine'\n\t\tclassVariableNames: ''\n\t\tpoolDictionaries: 'TextConstants'\n\t\tcategory: 'ST80-Support'.\n\n\tteam revertToOldVersionOrRemove: (ControlManager methodNamed: #restore).\n\tteam revertToOldVersionOrRemove: (StandardSystemView methodNamed: #deEmphasizeLabel).\n\tteam revertToOldVersionOrRemove: (StandardSystemView methodNamed: #emphasizeLabel).\n\tteam revertToOldVersionOrRemove: (StandardSystemView methodNamed: #displayEmphasized).\n\tteam revertToOldVersionOrRemove: (StandardSystemView methodNamed: #displayDeEmphasized).\n\tteam revertToOldVersionOrRemove: (StandardSystemView methodNamed: #critical:).\n\tteam revertToOldVersionOrRemove: (StandardSystemView methodNamed: #resetDisplayInterlock).\n\tteam revertToOldVersionOrRemove: (StandardSystemView methodNamed: #displayInterlock).\n\tteam revertToOldVersionOrRemove: (StandardSystemView methodNamed: #displayInterlock:).\n\tteam aboutToModifyClass: StandardSystemView.\n\tView subclass: #StandardSystemView\n\t\tinstanceVariableNames: 'labelFrame labelText isLabelComplemented savedSubViews minimumSize maximumSize collapsedViewport expandedViewport labelBits windowBits bitsValid updatablePanes'\n\t\tclassVariableNames: 'CacheBits LabelStyle'\n\t\tpoolDictionaries: ''\n\t\tcategory: 'ST80-Support'.\n\n\t\"Requires the removal of displayInterlock from StandardSystemView, see above.\"\n\tteam aboutToModifyClass: Mutex.\n\tMutex removeFromSystem.\n\tSystemOrganization removeCategoryIfEmpty: 'RVMBootstrap'.\n\n\tteam revertToOldVersionOrRemove: (ChangeList class methodNamed: #getRecentLocatorWithPrompt:).\n\tteam revertToOldVersionOrRemove: (ClassDescription methodNamed: #classComment:stamp:).\n\tteam revertToOldVersionOrRemove: (ClassDescription methodNamed: #printMethodChunk:withPreamble:on:moveSource:toFile:).\n\tteam revertToOldVersionOrRemove: (CompiledMethod methodNamed: #putSource:fromParseNode:inFile:withPreamble:).\n\tteam revertToOldVersionOrRemove: (RemoteString methodNamed: #string:onFileNumber:).\n\tteam revertToOldVersionOrRemove: (RemoteString methodNamed: #text).\n\tteam revertToOldVersionOrRemove: (SmalltalkImage methodNamed: #assureStartupStampLogged).\n\tteam revertToOldVersionOrRemove: (SmalltalkImage methodNamed: #logChange:).\n\tteam revertToOldVersionOrRemove: (SystemDictionary methodNamed: #snapshot:andQuit:embedded:).\n\tteam revertToOldVersionOrRemove: (SystemDictionary methodNamed: #writeRecentCharacters:toFileNamed:).\n\tteam revertToOldVersionOrRemove: (StandardSourceFileArray class methodNamed: #install).\n\tteam revertToOldVersionOrRemove: (StandardFileStream class methodNamed: #resetAllInterlocks).\n\tteam revertToOldVersionOrRemove: (StandardFileStream methodNamed: #resetInterlock).\n\tteam revertToOldVersionOrRemove: (StandardFileStream methodNamed: #safelyDo:).\n\tteam revertToOldVersionOrRemove: (StandardFileStream methodNamed: #interlock).\n\tteam revertToOldVersionOrRemove: (StandardFileStream methodNamed: #interlock:).\n\tteam aboutToModifyClass: StandardFileStream.\n\tFileStream subclass: #StandardFileStream\n\t\tinstanceVariableNames: 'name fileID buffer1'\n\t\tclassVariableNames: 'Registry'\n\t\tpoolDictionaries: ''\n\t\tcategory: 'System-Files'.\n\n\t\"Safe. There are no users of the VersionString class variable.\"\t\n\tteam aboutToModifyClass: SystemDictionary.\n\tIdentityDictionary subclass: #SystemDictionary\n\t\tinstanceVariableNames: 'cachedClassNames'\n\t\tclassVariableNames: 'LastImageName LastQuitLogPosition LowSpaceProcess LowSpaceSemaphore MemoryHogs ShutDownList SpecialSelectors StartUpList StartupStamp'\n\t\tpoolDictionaries: ''\n\t\tcategory: 'System-Support'.\n\n\t\"Safe. The methods using this are all in the RVM category.\"\n\tteam aboutToModifyClass: PopUpMenu.\n\tObject subclass: #PopUpMenu\n\t\tinstanceVariableNames: 'labelString font lineArray frame form marker selection'\n\t\tclassVariableNames: 'CacheMenuForms MenuStyle'\n\t\tpoolDictionaries: ''\n\t\tcategory: 'Tools-Menus'.\n\n\n\t\"team revertToOldVersionOrRemove: (Debugger methodNamed: #installListFontInto:).\"\n\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #nilMyListUnlessRVM).\n\tteam revertToOldVersionOrRemove: (ProcessorScheduler methodNamed: #areRunningProcessesInSchedulerLists).\n\tteam revertToOldVersionOrRemove: (ProcessBrowser methodNamed: #updateStackList:).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #popTo:).\n\tteam revertToOldVersionOrRemove: (ProcessorScheduler methodNamed: #isActive:).\n\n\tteam revertToOldVersionOrRemove: (BlockContext methodNamed: #valueUnpreemptively).\n\tteam revertToOldVersionOrRemove: (CPUWatcher methodNamed: #debugProcess:).\n\tteam revertToOldVersionOrRemove: (ControlManager methodNamed: #inActiveControllerProcess).\n\tteam revertToOldVersionOrRemove: (ControlManager methodNamed: #interruptName:).\n\tteam revertToOldVersionOrRemove: (ControlManager methodNamed: #resetActiveController).\n\tteam revertToOldVersionOrRemove: (ControlManager methodNamed: #scheduleActiveNoTerminate:).\n\tteam revertToOldVersionOrRemove: (ControlManager methodNamed: #searchForActiveController).\n\tteam revertToOldVersionOrRemove: (Debugger methodNamed: #debug).\n\tteam revertToOldVersionOrRemove: (Debugger class methodNamed: #context:isolationHead:).\n\tteam revertToOldVersionOrRemove: (Debugger class methodNamed: #openContext:label:contents:).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #debugWithTitle:).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #pvtSignal:list:).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #signal:).\n\tteam revertToOldVersionOrRemove: (ProcessorScheduler methodNamed: #activePriority).\n\tteam revertToOldVersionOrRemove: (ProcessorScheduler methodNamed: #terminateActive).\n\tteam revertToOldVersionOrRemove: (Project methodNamed: #enterForEmergencyRecovery).\n\tteam revertToOldVersionOrRemove: (Project class methodNamed: #spawnNewProcessAndTerminateOld:).\n\tteam revertToOldVersionOrRemove: (SyntaxError class methodNamed: #open:).\n\tteam revertToOldVersionOrRemove: (SystemDictionary methodNamed: #handleUserInterrupt).\n\tteam revertToOldVersionOrRemove: (UnhandledError methodNamed: #devDefaultAction).\n\t\"aaa - There's no old version for spyEvery:on: in the current image. Blecch.\"\n\tteam revertToOldVersionOrRemove: (ProcessorScheduler methodNamed: #thisProcess).\n\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #isRunning).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #synchronousSuspend).\n\n\tteam revertToOldVersionOrRemove: (Debugger class methodNamed: #openInterrupt:onProcess:).\n\tteam revertToOldVersionOrRemove: (MessageTally methodNamed: #spyEvery:onProcess:forMilliseconds:).\n\tteam revertToOldVersionOrRemove: (ParagraphEditor methodNamed: #debug:receiver:in:).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #suspendedContextWaitingIfNecessary).\n\n\tteam revertToOldVersionOrRemove: (ContextPart methodNamed: #contextStackIn:).\n\tteam revertToOldVersionOrRemove: (ContextPart methodNamed: #stackOfSize:in:).\n\tteam revertToOldVersionOrRemove: (ContextPart methodNamed: #senderOrSlyInvokerAndProcessIn:).\n\tteam revertToOldVersionOrRemove: (ContextPart methodNamed: #senderOrSlyInvokerIn:).\n\n\tteam revertToOldVersionOrRemove: (Object methodNamed: #primitiveGetExtraPreheaderWord:).\n\tteam revertToOldVersionOrRemove: (Object methodNamed: #primitiveSetExtraPreheaderWord:).\n\tteam revertToOldVersionOrRemove: (Object methodNamed: #primitiveSetExtraWordSelector:).\n\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #beSlyMemberProcess).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #addChild:).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #myGenerationAndTheirDescendantsDo:).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #siblingsAndTheirDescendantsDo:).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #descendantsDo:).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #myGeneration).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #siblings).\n\n\tteam revertToOldVersionOrRemove: (ProcessorScheduler methodNamed: #debugMemberProcesses).\n\tteam revertToOldVersionOrRemove: (ProcessorScheduler methodNamed: #suspendMemberProcesses).\n\tteam revertToOldVersionOrRemove: (ProcessorScheduler methodNamed: #terminateMemberProcesses).\n\tteam revertToOldVersionOrRemove: (ProcessorScheduler methodNamed: #memberProcesses).\n\tteam revertToOldVersionOrRemove: (ProcessorScheduler methodNamed: #userBackgroundPriority).\n\n\tteam revertToOldVersionOrRemove: (TranscriptStream methodNamed: #toggleShowInConsole).\n\tteam revertToOldVersionOrRemove: (TranscriptStream class methodNamed: #toggleShowInConsole).\n\tteam revertToOldVersionOrRemove: (TranscriptStream methodNamed: #showInConsoleSwitch).\n\tteam revertToOldVersionOrRemove: (TranscriptStream methodNamed: #showInConsole).\n\tteam revertToOldVersionOrRemove: (TranscriptStream methodNamed: #showInConsole:).\n\n\tteam revertToOldVersionOrRemove: (Object methodNamed: #longPrintOn:).\n\tteam revertToOldVersionOrRemove: (Behavior methodNamed: #longPrintOn:).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #longPrintOn:).\n\tteam revertToOldVersionOrRemove: (MethodContext methodNamed: #printOn:).\n\tteam revertToOldVersionOrRemove: (Inspector methodNamed: #selectionPrintString).\n\tteam revertToOldVersionOrRemove: (Controller methodNamed: #interActivityPause).\n\tteam revertToOldVersionOrRemove: (ContextPart methodNamed: #tempsAndValues).\n\tteam revertToOldVersionOrRemove: (CompiledMethod methodNamed: #longPrintOn:indent:).\n\tteam revertToOldVersionOrRemove: (BlockContext methodNamed: #printOn:).\n\n\tteam revertToOldVersionOrRemove: (BitBlt methodNamed: #copyBits).\n\tteam revertToOldVersionOrRemove: (BitBlt methodNamed: #drawFrom:to:withFirstPoint:).\n\tteam revertToOldVersionOrRemove: (BitBlt methodNamed: #drawLoopX:Y:).\n\tteam aboutToModifyClass: RVMPrimitivesNeededForBootstrapping.\n\tRVMPrimitivesNeededForBootstrapping removeFromSystem.\n\tSystemOrganization removeCategoryIfEmpty: 'RVMBootstrap'.\n\tteam aboutToModifyClass: RVMObject.\n\tRVMObject removeFromSystem.\n\tSystemOrganization removeCategoryIfEmpty: 'RVMBootstrap'.\n\tteam aboutToModifyClass: RenaissanceTransporter.\n\tRenaissanceTransporter removeFromSystem.\n\tSystemOrganization removeCategoryIfEmpty: 'RVMBootstrap'.\n\tteam aboutToModifyClass: RVMBootstrapPackage.\n\tRVMBootstrapPackage removeFromSystem.\n\tSystemOrganization removeCategoryIfEmpty: 'RVMBootstrap'.\n\t\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #errorHandler).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #errorHandler:).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #myList).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #myList:).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #activateReturn:value:).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #complete:).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #isActiveProcess).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #primitiveSuspend).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #return:value:).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #step).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #stepToCallee).\n\tteam revertToOldVersionOrRemove: (Process methodNamed: #stepToSendOrReturn).\n\n\tteam revertToOldVersionOrRemove: (BlockContext methodNamed: #forkWith:).\n\tteam revertToOldVersionOrRemove: (BlockContext methodNamed: #newProcessWith:).\n\tteam revertToOldVersionOrRemove: (Process class methodNamed: #forContext:priority:).\n\t\n\tteam revertToOldVersionOrRemove: (Transcripter methodNamed: #readEvalPrint).\n\tteam revertToOldVersionOrRemove: (ProcessorScheduler methodNamed: #removeAllPossible).\n\tteam revertToOldVersionOrRemove: (ProcessorScheduler methodNamed: #terminatableProcesses).\n\t\n\tteam revertToOldVersionOrRemove: (BitBlt methodNamed: #OLDcopyBits).\n\tteam revertToOldVersionOrRemove: (BitBlt methodNamed: #copyBitsLocally).\n\tteam revertToOldVersionOrRemove: (BitBlt methodNamed: #copyBitsOnMain).\n\tteam revertToOldVersionOrRemove: (BitBlt methodNamed: #drawLoopLocallyX:Y:).\n\tteam revertToOldVersionOrRemove: (BitBlt methodNamed: #globalDrawLoopX:Y:).\n\tteam revertToOldVersionOrRemove: (BitBlt methodNamed: #localDrawLoopX:Y:).\n\t\n! !\n\n!RVMBootstrapPackage methodsFor: 'as yet unclassified' stamp: 'sm 5/25/2011 20:10'!\ntrickyModificationsManuallyCollected\n\t^ {\n\t\t{ 'SystemDictionary'. 'logError:inContext:onConsoleAndQuitWithSaving:' }.\n\t\t\n\t\t{ 'BitBlt'. 'localDrawLoopX:Y:' }.\n\t\t{ 'BitBlt'. 'globalDrawLoopX:Y:' }.\n\t\t{ 'BitBlt'. 'drawLoopLocallyX:Y:' }.\n\t\t{ 'BitBlt'. 'copyBitsOnMain' }.\n\t\t{ 'BitBlt'. 'copyBitsLocally' }.\n\t\t{ 'BitBlt'. 'OLDcopyBits' }.\n\t\t{ 'BitBlt class'. 'exampleColorMap' }.\n\t\t\n\t\t\"Changes to Name Processes\"\n\t\t\"TODO: STEFAN find a better way to manage these changes, don't want to change method category\"\n\t\t{ 'WeakArray class'. 'restartFinalizationProcess' }.\n\t\t{ 'SystemDictionary'. 'installLowSpaceWatcher' }.\n\t\t{ 'InputSensor'. 'installInterruptWatcher' }.\n\t\t{ 'EventSensor'. 'installEventTickler' }.\n\t\t{ 'Delay class'. 'startTimerInterruptWatcher' }.\n\t\t{ 'CPUWatcher class'. 'startMonitoringPeriod:rate:threshold:' }.\n\t\t\"{ 'Controller'. 'controlLoop' }.\" \"Was included already later\"\n\n\t\t\"STEFAN: other base system changes where I do not know how to handle it better.\"\n\t\t{ 'Integer'. 'atRandom' }.\n\t\t{ 'Integer'. 'hasContentsInExplorer' }.\n\t\t{ 'Integer'. 'printeth' }.\n\t\t{ 'Array'. 'asRunArray' }.\n\t\t{ 'Array'. 'isArray' }.\n\t\t{ 'Association'. 'outlineString' }.\n\n\t\t{ 'ProcessorScheduler'. 'terminatableProcesses' }.\n\t\t{ 'ProcessorScheduler'. 'removeAllPossible' }.\n\t\t{ 'Transcripter'. 'readEvalPrint' }.\n\n\t\t{ 'Process class'. 'forContext:priority:' }.\n\t\t{ 'BlockContext'. 'newProcessWith:' }.\n\t\t{ 'BlockContext'. 'forkWith:' }.\n\n\t\t{ 'Process'. 'stepToSendOrReturn' }.\n\t\t{ 'Process'. 'stepToCallee' }.\n\t\t{ 'Process'. 'step' }.\n\t\t{ 'Process'. 'return:value:' }.\n\t\t{ 'Process'. 'primitiveSuspend' }.\n\t\t{ 'Process'. 'isActiveProcess' }.\n\t\t{ 'Process'. 'complete:' }.\n\t\t{ 'Process'. 'activateReturn:value:' }.\n\t\t{ 'Process'. 'myList:' }.\n\t\t{ 'Process'. 'myList' }.\n\t\t{ 'Process'. 'errorHandler:' }.\n\t\t{ 'Process'. 'errorHandler' }.\n\n\t\t{ 'RVMObject' }.\n\t\t{ 'RVMPrimitivesNeededForBootstrapping' }.\n\t\t{ 'RVMPrimitivesNeededForBootstrapping class'. 'getCoreHolding:' }.\n\t\t{ 'RVMPrimitivesNeededForBootstrapping class'. 'getEmergencySemaphore' }.\n\t\t{ 'RVMPrimitivesNeededForBootstrapping class'. 'getReadWriteOf:' }.\n\t\t{ 'RVMPrimitivesNeededForBootstrapping class'. 'isRVM' }.\n\t\t{ 'RVMPrimitivesNeededForBootstrapping class'. 'primitivGetCoreHolding:' }.\n\t\t{ 'RVMPrimitivesNeededForBootstrapping class'. 'printPrefixFor:' }.\n\t\t{ 'RVMPrimitivesNeededForBootstrapping class'. 'setEmergencySemaphore:' }.\n\t\t{ 'BitBlt'. 'drawLoopX:Y:' }.\n\t\t{ 'BitBlt'. 'drawFrom:to:withFirstPoint:' }.\n\t\t{ 'BitBlt'. 'copyBits' }.\n\t\t\t\n\t\t{ 'BlockContext'. 'printOn:' }.\n\t\t{ 'CompiledMethod'. 'longPrintOn:indent:' }.\n\t\t{ 'ContextPart'. 'tempsAndValues' }.\n\t\t{ 'Controller'. 'interActivityPause' }.\n\t\t{ 'Inspector'. 'selectionPrintString' }.\n\t\t{ 'MethodContext'. 'printOn:' }.\n\t\t{ 'Process'. 'longPrintOn:' }.\n\t\t{ 'Behavior'. 'longPrintOn:' }.\n\t\t{ 'Object'. 'longPrintOn:' }.\n\n\t\t{ 'TranscriptStream'. 'showInConsole:' }.\n\t\t{ 'TranscriptStream'. 'showInConsole' }.\n\t\t{ 'TranscriptStream'. 'showInConsoleSwitch' }.\n\t\t{ 'TranscriptStream class'. 'toggleShowInConsole' }.\n\t\t{ 'TranscriptStream'. 'toggleShowInConsole' }.\n\n\t\t{ 'ProcessorScheduler'. 'userBackgroundPriority' }.\n\t\t{ 'ProcessorScheduler'. 'memberProcesses' }.\n\t\t{ 'ProcessorScheduler'. 'terminateMemberProcesses' }.\n\t\t{ 'ProcessorScheduler'. 'suspendMemberProcesses' }.\n\t\t{ 'ProcessorScheduler'. 'debugMemberProcesses' }.\n\n\t\t{ 'Process'. 'siblings' }.\n\t\t{ 'Process'. 'myGeneration' }.\n\t\t{ 'Process'. 'descendantsDo:' }.\n\t\t{ 'Process'. 'siblingsAndTheirDescendantsDo:' }.\n\t\t{ 'Process'. 'myGenerationAndTheirDescendantsDo:' }.\n\t\t{ 'Process'. 'addChild:' }.\n\t\t{ 'Process'. 'beSlyMemberProcess' }.\n\n\t\t{ 'Object'. 'primitiveSetExtraWordSelector:' }.\n\t\t{ 'Object'. 'primitiveSetExtraPreheaderWord:' }.\n\t\t{ 'Object'. 'primitiveGetExtraPreheaderWord:' }.\n\n\t\t{ 'ContextPart'. 'senderOrSlyInvokerIn:' }.\n\t\t{ 'ContextPart'. 'senderOrSlyInvokerAndProcessIn:' }.\n\t\t{ 'ContextPart'. 'stackOfSize:in:' }.\n\t\t{ 'ContextPart'. 'contextStackIn:' }.\n\n\t\t{ 'Process'. 'suspendedContextWaitingIfNecessary' }.\n\t\t{ 'ParagraphEditor'. 'debug:receiver:in:' }.\n\t\t{ 'MessageTally'. 'spyEvery:onProcess:forMilliseconds:' }.\n\t\t{ 'Debugger class'. 'openInterrupt:onProcess:' }.\n\n\t\t{ 'Process'. 'synchronousSuspend' }.\n\t\t{ 'Process'. 'isRunning' }.\n\n\t\t{ 'ProcessorScheduler'. 'thisProcess' }.\n\t\t{ 'MessageTally'. 'spyEvery:on:' }.\n\t\t{ 'UnhandledError'. 'devDefaultAction' }.\n\t\t{ 'SystemDictionary'. 'handleUserInterrupt' }.\n\t\t{ 'SyntaxError class'. 'open:' }.\n\t\t{ 'Project class'. 'spawnNewProcessAndTerminateOld:' }.\n\t\t{ 'Project'. 'enterForEmergencyRecovery' }.\n\t\t{ 'ProcessorScheduler'. 'terminateActive' }.\n\t\t{ 'ProcessorScheduler'. 'activePriority' }.\n\t\t{ 'Process'. 'signal:' }.\n\t\t{ 'Process'. 'pvtSignal:list:' }.\n\t\t{ 'Process'. 'debugWithTitle:' }.\n\t\t{ 'Debugger class'. 'openContext:label:contents:' }.\n\t\t{ 'Debugger class'. 'context:isolationHead:' }.\n\t\t{ 'Debugger'. 'debug' }.\n\t\t{ 'ControlManager'. 'searchForActiveController' }.\n\t\t{ 'ControlManager'. 'scheduleActiveNoTerminate:' }.\n\t\t{ 'ControlManager'. 'resetActiveController' }.\n\t\t{ 'ControlManager'. 'interruptName:' }.\n\t\t{ 'ControlManager'. 'inActiveControllerProcess' }.\n\t\t{ 'CPUWatcher'. 'debugProcess:' }.\n\t\t{ 'BlockContext'. 'valueUnpreemptively' }.\n\n\t\t{ 'ProcessorScheduler'. 'isActive:' }.\n\t\t{ 'Process'. 'popTo:' }.\n\t\t{ 'ProcessBrowser'. 'updateStackList:' }.\n\t\t{ 'ProcessorScheduler'. 'areRunningProcessesInSchedulerLists' }.\n\t\t{ 'Process'. 'nilMyListUnlessRVM' }.\n\n\t\t\"{ 'Debugger'. 'installListFontInto:' }.\"\n\n\n\t\t{ 'PopUpMenu' }.\n\n\t\t{ 'SystemDictionary' }.\n\n\t\t{ 'StandardFileStream' }.\n\t\t{ 'StandardFileStream'. 'interlock:' }.\n\t\t{ 'StandardFileStream'. 'interlock' }.\n\t\t{ 'StandardFileStream'. 'safelyDo:' }.\n\t\t{ 'StandardFileStream'. 'resetInterlock' }.\n\t\t{ 'StandardFileStream class'. 'resetAllInterlocks' }.\n\t\t{ 'StandardSourceFileArray class'. 'install' }.\n\t\t{ 'SystemDictionary'. 'writeRecentCharacters:toFileNamed:' }.\n\t\t{ 'SystemDictionary'. 'snapshot:andQuit:embedded:' }.\n\t\t{ 'SmalltalkImage'. 'logChange:' }.\n\t\t{ 'SmalltalkImage'. 'assureStartupStampLogged' }.\n\t\t{ 'RemoteString'. 'text' }.\n\t\t{ 'RemoteString'. 'string:onFileNumber:' }.\n\t\t{ 'CompiledMethod'. 'putSource:fromParseNode:inFile:withPreamble:' }.\n\t\t{ 'ClassDescription'. 'printMethodChunk:withPreamble:on:moveSource:toFile:' }.\n\t\t{ 'ClassDescription'. 'classComment:stamp:' }.\n\t\t{ 'ChangeList class'. 'getRecentLocatorWithPrompt:' }.\n\n\t\t{ 'Mutex' }.\n\t\t{ 'Mutex'. 'critical:' }.\n\t\t{ 'Mutex'. 'initialize' }.\n\t\t{ 'Mutex class'. 'forMutualExclusion' }.\n\n\t\t{ 'StandardSystemView' }.\n\t\t{ 'StandardSystemView'. 'displayInterlock:' }.\n\t\t{ 'StandardSystemView'. 'displayInterlock' }.\n\t\t{ 'StandardSystemView'. 'resetDisplayInterlock' }.\n\t\t{ 'StandardSystemView'. 'critical:' }.\n\t\t{ 'StandardSystemView'. 'displayDeEmphasized' }.\n\t\t{ 'StandardSystemView'. 'displayEmphasized' }.\n\t\t{ 'StandardSystemView'. 'emphasizeLabel' }.\n\t\t{ 'StandardSystemView'. 'deEmphasizeLabel' }.\n\t\t{ 'ControlManager'. 'restore' }.\n\n\t\t{ 'Paragraph' }.\n\t\t{ 'Paragraph'. 'destFormSema:' }.\n\t\t{ 'Paragraph'. 'compositionRectangle:text:style:offset:' }.\n\t\t{ 'Paragraph'. 'displayOn:lines:' }.\n\n\t\t{ 'Controller' }.\n\t\t{ 'Controller'. 'lastProcessRunningMe:' }.\n\t\t{ 'Controller'. 'lastProcessRunningMe' }.\n\t\t{ 'Controller'. 'killCounter:' }.\n\t\t{ 'Controller'. 'killCounter' }.\n\t\t{ 'Controller'. 'controlLoop' }.\n\n\t\t{ 'DisplayScreen' }.\n\n\t\t{ 'Cursor' }.\n\t\t{ 'Cursor class'. 'initialize' }.\n\n\t\t{ 'AnimatedGIFReadWriter' }.\n\t\t\n\t\t{ 'Collection' }.\n\t\t\n\t\t{ 'TranscriptStream' }.\n\t\t{ 'TranscriptStream class'. 'showInConsole:' }.\n\t\t{ 'TranscriptStream class'. 'showInConsole' }.\n\n\t\t{ 'Process' }.\n\t\t{ 'Process'. 'creatorEnsemble:' }.\n\t\t{ 'Process'. 'creatorEnsemble' }.\n\t\t{ 'Process'. 'parent:' }.\n\t\t{ 'Process'. 'parent' }.\n\t\t{ 'Process'. 'children:' }.\n\t\t{ 'Process'. 'children' }.\n\t\t{ 'Process class'. 'semaForSupensions' }.\n\t\t{ 'Process'. 'terminate' }.\n\t\t{ 'Process'. 'suspend' }.\n\t\t{ 'Process'. 'resume' }.\n\t\t{ 'Process'. 'debug:title:full:' }.\n\t\t{ 'Debugger'. 'fullyExpandStack' }.\n\n\t\t{ 'ProcessorScheduler' }.\n\t\t{ 'ProcessBrowser class'. 'nameAndRulesFor:' }.\n\t\t{ 'ProcessorScheduler class'. 'startUp' }.\n\t\t{ 'ProcessorScheduler class'. 'startEmergencyProcess' }.\n\t\t{ 'ProcessorScheduler class'. 'emergencyProcess' }.\n\t\t\n\t\t{ 'RVMBootstrapPackage' }.\n\t\t{ 'RVMBootstrapPackage'. 'trickyModificationsThatNeedToBeDoneInOrder' }.\n\t\t{ 'RVMBootstrapPackage'. 'revertToVersionBeforeTeam:' }.\n\n\t\t{ 'RenaissanceTransporter' }.\n\t\t{ 'RenaissanceTransporter'. 'initialize' }.\n\t\t{ 'RenaissanceTransporter'. 'initializePackage' }.\n\t\t{ 'RenaissanceTransporter'. 'initializePreambleAndPostscript' }.\n\t\t{ 'RenaissanceTransporter'. 'initializeTeam' }.\n\t\t{ 'RenaissanceTransporter'. 'revert' }.\n\t\t{ 'RenaissanceTransporter class'. 'transportersForFileOutMenu' }. \n\t}! !\n\n!RVMBootstrapPackage methodsFor: 'as yet unclassified' stamp: 'sm 3/11/2011 22:09'!\ntrickyModificationsThatNeedToBeDoneInOrder\n\t| trickyStuff |\n\ttrickyStuff := OrderedCollection new.\n\ttrickyStuff addAll: self trickyModificationsManuallyCollected.\n\ttrickyStuff addAll: self moreModificationsByTheRenaissanceTeam1.\n\ttrickyStuff addAll: self moreModificationsByTheRenaissanceTeam2.\n\ttrickyStuff addAll: self moreModificationsByTheRenaissanceTeam3.\n\ttrickyStuff addAll: self moreModificationsByTheRenaissanceTeam4.\n\ttrickyStuff addAll: self moreModificationsByTheRenaissanceTeam5.\n\t^ trickyStuff.! !\n\n!RVMButtonController methodsFor: 'basic control sequence' stamp: 'ssa 1/1/1970 01:12'!\nredButtonActivity\n\n\t| aborted lastAborted |\n\tself view displayPressed.\n\tlastAborted _ false.\n\taborted _ true.\n\t[Sensor redButtonPressed] whileTrue:[\n\t\taborted _ (self view insetDisplayBox containsPoint: Sensor cursorPoint) not.\n\t\taborted & lastAborted not ifTrue:[self view displayView.\n\t\t\t\t\t\t\t\t\tlastAborted _ true].\n\t\taborted not & lastAborted ifTrue:[self view displayPressed.\n\t\t\t\t\t\t\t\t\tlastAborted _ false]].\n\tself view displayView.\n\taborted ifFalse:[self view performAction]! !\n\n!RVMButtonController methodsFor: 'controlling' stamp: 'ssa 10/3/2008 20:53'!\ncontrolInitialize\n\tself view style ~~ #raisedGray ifTrue:[Cursor action show].\n\tsuper controlInitialize! !\n\n!RVMButtonController methodsFor: 'controlling' stamp: 'ssa 9/19/2008 12:04'!\ncontrolTerminate\n\tCursor normal show.\n\tsuper controlTerminate! !\n\n!RVMButtonView methodsFor: 'displaying' stamp: 'ssa 9/19/2008 12:19'!\ndisplayAction\n\t\"Let the controller indicate action available\"\n\tself displayLabel.\n! !\n\n!RVMButtonView methodsFor: 'displaying' stamp: 'ssa 1/1/1970 16:03'!\ndisplayLabel\n\t| labelRect labelText labelForm |\n\tlabelText := self label asDisplayText .\n\tlabelText foregroundColor: Color black\n\t\t\tbackgroundColor: Color transparent.\n\tlabelForm := labelText asParagraph asForm.\n\tlabelForm width > self insetDisplayBox width ifTrue:[labelForm _ labelForm scaledToSize:self insetDisplayBox width@labelForm height].\n\tlabelForm height > self insetDisplayBox height ifTrue:[labelForm _ labelForm scaledToSize: labelForm width@self insetDisplayBox height].\n\tlabelRect := self insetDisplayBox.\n\tDisplay fill: self insetDisplayBox fillColor: Color white.\n\tlabelForm displayOn: Display at: labelRect center - labelForm boundingBox center clippingBox: labelRect\n\t\t\trule: Form paint fillColor: nil.\n! !\n\n!RVMButtonView methodsFor: 'displaying' stamp: 'ssa 1/1/1970 03:09'!\ndisplayLabelDark\n\t| labelRect labelText labelForm |\n\tlabelText := self label asDisplayText .\n\tlabelText foregroundColor: Color black\n\t\t\tbackgroundColor: Color transparent.\n\tlabelForm := labelText asParagraph asForm.\n\tlabelForm width > self insetDisplayBox width ifTrue:[labelForm _ labelForm scaledToSize:self insetDisplayBox width@labelForm height].\n\tlabelForm height > self insetDisplayBox height ifTrue:[labelForm _ labelForm scaledToSize: labelForm width@self insetDisplayBox height].\n\tlabelRect := self insetDisplayBox.\n\tDisplay fill: self insetDisplayBox fillColor: self baseColorDark.\n\tlabelForm displayOn: Display at: labelRect center - labelForm boundingBox center clippingBox: labelRect\n\t\t\trule: Form erase fillColor: nil.\n! !\n\n!RVMButtonView methodsFor: 'displaying' stamp: 'ssa 9/19/2008 12:22'!\ndisplayOutline\n\n\tself displayLabel.\n\tDisplay border: (self insetDisplayBox insetBy: 1)width: 1 fillColor: Color black.! !\n\n!RVMButtonView methodsFor: 'displaying' stamp: 'ssa 1/1/1970 03:02'!\ndisplayPressed\n\tself displayLabelDark.\n\tDisplay border: (self insetDisplayBox insetBy: 0@0) width:2 fillColor: self baseColor.\n\tDisplay border: (self insetDisplayBox insetBy: 2@2) width:2 fillColor: self baseColor  darker.\n\tDisplay border: (self insetDisplayBox insetBy: 4@4) width:2 fillColor: self baseColor darker darker.\n\tDisplay border: (self insetDisplayBox insetBy: 6@6) width:2 fillColor: self baseColor darker darker darker.\n! !\n\n!RVMButtonView methodsFor: 'displaying' stamp: 'ssa 3/24/2010 17:07'!\ndisplayRaisedGray\n\tself displayRaisedWhiteLabel.\n\tself displayRaisedLabel.\n\tDisplay border: (self insetDisplayBox insetBy: 0@0) widthRectangle: (1@1 corner: 0@0) rule: Form paint fillColor: self baseColor.\n\tDisplay border: (self insetDisplayBox insetBy: 0@0) widthRectangle: (0@0 corner: 1@1) rule: Form paint fillColor: self baseColor darker darker darker.\n\t\n\tDisplay border: (self insetDisplayBox insetBy: 1@1) widthRectangle: (1@1 corner: 0@0) rule: Form paint fillColor: self baseColor lighter.\n\tDisplay border: (self insetDisplayBox insetBy: 1@1) widthRectangle: (0@0 corner: 1@1) rule: Form paint fillColor: self baseColor darker  darker.\n\t\n\tDisplay border: (self insetDisplayBox insetBy: 2@2) widthRectangle: (1@1 corner: 0@0) rule: Form paint fillColor: self baseColor lighter lighter.\n\tDisplay border: (self insetDisplayBox insetBy: 2@2) widthRectangle: (0@0 corner: 1@1) rule: Form paint fillColor: self baseColor darker.\n\t\n\tDisplay border: (self insetDisplayBox insetBy: 3@3) widthRectangle: (1@1 corner: 0@0) rule: Form paint fillColor: self baseColor lighter.\n\tDisplay border: (self insetDisplayBox insetBy: 3@3) widthRectangle: (0@0 corner: 1@1) rule: Form paint fillColor: self baseColor .\n! !\n\n!RVMButtonView methodsFor: 'displaying' stamp: 'ssa 2/22/2010 15:34'!\ndisplayRaisedLabel\n\t| labelRect labelText labelForm |\n\tlabelText := self label asDisplayText .\n\n\tlabelText foregroundColor: Color black\n\t\t\tbackgroundColor: Color transparent.\n\tlabelForm := labelText asParagraph asForm.\n\tlabelForm width > self insetDisplayBox width ifTrue:[labelForm _ labelForm scaledToSize:self insetDisplayBox width@labelForm height].\n\tlabelForm height > self insetDisplayBox height ifTrue:[labelForm _ labelForm scaledToSize: labelForm width@self insetDisplayBox height].\n\tlabelRect := self insetDisplayBox.\n\t\"Display fill: self insetDisplayBox fillColor: self baseColor.\"\n\tlabelForm displayOn: Display at: labelRect center - labelForm boundingBox center - (0@3)clippingBox: labelRect\n\t\t\trule: Form paint fillColor: nil.\n! !\n\n!RVMButtonView methodsFor: 'displaying' stamp: 'ssa 2/22/2010 15:37'!\ndisplayRaisedWhiteLabel\n\t| labelRect labelText labelForm |\n\tlabelText := self label asDisplayText .\n\n\tlabelText foregroundColor: self  baseColor lighter lighter\n\t\t\tbackgroundColor: Color transparent.\n\tlabelForm := labelText asParagraph asForm.\n\tlabelForm width > self insetDisplayBox width ifTrue:[labelForm _ labelForm scaledToSize:self insetDisplayBox width@labelForm height].\n\tlabelForm height > self insetDisplayBox height ifTrue:[labelForm _ labelForm scaledToSize: labelForm width@self insetDisplayBox height].\n\tlabelRect := self insetDisplayBox.\n\tDisplay fill: self insetDisplayBox fillColor: self baseColor.\n\tlabelForm displayOn: Display at: labelRect center - labelForm boundingBox center - (0@3)+(1@1)clippingBox: labelRect\n\t\t\trule: Form paint fillColor: nil.\n! !\n\n!RVMButtonView methodsFor: 'displaying' stamp: 'ssa 9/19/2008 12:15'!\ndisplayView\n\tself style == #raisedGray ifTrue:[self displayRaisedGray].\n\tself style == #outline ifTrue:[self displayOutline].\n\tself style == #action ifTrue:[self displayAction].\n\t! !\n\n!RVMButtonView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:03'!\naction\n\t\"Answer the value of action, a block to execute when the button is released\"\n\n\taction isNil ifTrue:[self action: [self inform:'no action defined yet']].\n\t^ action! !\n\n!RVMButtonView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:02'!\naction: anObject\n\t\"Set the value of action\"\n\n\taction _ anObject! !\n\n!RVMButtonView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 02:47'!\nbaseColor\n\t^Color gray lighter lighter lighter! !\n\n!RVMButtonView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 03:02'!\nbaseColorDark\n\t^Color gray ! !\n\n!RVMButtonView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:42'!\nlabel\n\t\"Answer the value of label\"\n\n\tlabel isNil ifTrue:[self label: 'not labeled yet'].\n\t^ label! !\n\n!RVMButtonView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:02'!\nlabel: anObject\n\t\"Set the value of label\"\n\n\tlabel _ anObject! !\n\n!RVMButtonView methodsFor: 'accessing' stamp: 'ssa 9/19/2008 12:14'!\nstyle\n\t\"Answer the value of style. how I should display myself.\n\tCurrent options are #raisedGray, #outline, #action\"\n\n\tstyle isNil ifTrue:[self style: #raisedGray].\n\t^ style! !\n\n!RVMButtonView methodsFor: 'accessing' stamp: 'ssa 9/19/2008 12:13'!\nstyle: anObject\n\t\"Set the value of style\"\n\n\tstyle _ anObject! !\n\n!RVMButtonView methodsFor: 'actions' stamp: 'ssa 1/1/1970 00:10'!\nperformAction\n\n\tself action copy value! !\n\n!RVMButtonView methodsFor: 'controller access' stamp: 'ssa 1/1/1970 00:25'!\ndefaultControllerClass\n\n\t^RVMButtonController! !\n\n!RVMButtonView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:27'!\nexample\n\t\"RVMButtonView example\"\n\t| topView |\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\ttopView minimumSize: 50@25.\n\ttopView maximumSize: 200@200.\n\ttopView addSubView: (self label:'Flash' action:[Display reverse reverse]).\n\ttopView label: 'RVMButtonView test'.\n\ttopView controller open! !\n\n!RVMButtonView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 02:59'!\nexampleGC\n\t\"RVMButtonView exampleGC\"\n\t| topView |\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\ttopView minimumSize: 50@25.\n\ttopView maximumSize: 200@200.\n\ttopView addSubView: (self label:'GC' action:[Smalltalk garbageCollect print]).\n\ttopView label: 'RVMButtonView test'.\n\ttopView controller open! !\n\n!RVMButtonView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:43'!\nexampleLong\n\t\"RVMButtonView exampleLong\"\n\t| topView |\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\ttopView minimumSize: 50@25.\n\ttopView maximumSize: 200@200.\n\ttopView addSubView: (self label:'Flash the display by reversing twice' action:[Display reverse reverse]).\n\ttopView label: 'RVMButtonView test'.\n\ttopView controller open! !\n\n!RVMButtonView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 01:43'!\nexampleTall\n\t\"RVMButtonView exampleTall\"\n\t| topView |\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\ttopView minimumSize: 50@25.\n\ttopView maximumSize: 200@200.\n\ttopView addSubView: (self label:'\tFlash \n\tthe \n\tdisplay \n\tby \n\treversing \n\ttwice' action:[Display reverse reverse]).\n\ttopView label: 'RVMButtonView test'.\n\ttopView controller open! !\n\n!RVMButtonView class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:30'!\nlabel: aString action: aBlock\n\n\t| v |\n\tv _ self new.\n\tv label: aString.\n\tv action: aBlock.\n\t^v  ! !\n\n!RVMButtonView class methodsFor: 'instance creation' stamp: 'ssa 9/19/2008 12:21'!\nlabel: aString style: aSymbol action: aBlock\n\n\t| v |\n\tv _ self new.\n\tv label: aString.\n\tv style: aSymbol.\n\tv action: aBlock.\n\t^v  ! !\n\n!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:07'!\ncyclesSinceLastQuery\n\t\"Answer the value of cyclesSinceLastQuery\"\n\n\tcyclesSinceLastQuery isNil ifTrue:[self cyclesSinceLastQuery: 0].\n\t^cyclesSinceLastQuery! !\n\n!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:07'!\ncyclesSinceLastQuery: anObject\n\t\"Set the value of cyclesSinceLastQuery\"\n\n\tcyclesSinceLastQuery := anObject! !\n\n!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'dmu 1/5/2011 12:48'!\ngcMilliseconds\n\t^ self memorySystemStats gcMilliseconds! !\n\n!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 18:22'!\nmemorySystemStats\n\t\"Answer the value of memorySystemStats\"\n\n\tmemorySystemStats isNil ifTrue:[self memorySystemStats: RVMMemorySystemStats new].\n\t^memorySystemStats! !\n\n!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:07'!\nmemorySystemStats: anObject\n\t\"Set the value of memorySystemStats\"\n\n\tmemorySystemStats := anObject! !\n\n!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:49'!\nmessageNames\n\t\"Answer the value of messageNames\"\n\n\tmessageNames isNil ifTrue:[self messageNames: nil].\n\t^messageNames! !\n\n!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:49'!\nmessageNames: anObject\n\t\"Set the value of messageNames\"\n\n\tmessageNames := anObject! !\n\n!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:08'!\nmillisecondsSinceLastQuery\n\t\"Answer the value of millisecondsSinceLastQuery\"\n\n\tmillisecondsSinceLastQuery isNil ifTrue:[self millisecondsSinceLastQuery: 0].\n\t^millisecondsSinceLastQuery! !\n\n!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:07'!\nmillisecondsSinceLastQuery: anObject\n\t\"Set the value of millisecondsSinceLastQuery\"\n\n\tmillisecondsSinceLastQuery := anObject! !\n\n!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:58'!\nmyRank\n\t\"Answer the value of myRank\"\n\n\tmyRank isNil ifTrue:[self myRank: nil].\n\t^myRank! !\n\n!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:58'!\nmyRank: anObject\n\t\"Set the value of myRank\"\n\n\tmyRank := anObject! !\n\n!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:58'!\nmyX\n\t\"Answer the value of myX\"\n\n\tmyX isNil ifTrue:[self myX: nil].\n\t^myX! !\n\n!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:58'!\nmyX: anObject\n\t\"Set the value of myX\"\n\n\tmyX := anObject! !\n\n!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:58'!\nmyY\n\t\"Answer the value of myY\"\n\n\tmyY isNil ifTrue:[self myY: nil].\n\t^myY! !\n\n!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:58'!\nmyY: anObject\n\t\"Set the value of myY\"\n\n\tmyY := anObject! !\n\n!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 11/16/2008 15:54'!\nobjectTableStats\n\t\"Answer the value of objectTableStats\"\n\n\tobjectTableStats isNil ifTrue:[self objectTableStats: RVMObjectTableStats new].\n\t^objectTableStats! !\n\n!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 11/16/2008 15:54'!\nobjectTableStats: anObject\n\t\"Set the value of objectTableStats\"\n\n\tobjectTableStats := anObject! !\n\n!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:49'!\nrawData\n\t\"Answer the value of rawData\"\n\n\trawData isNil ifTrue:[self rawData: nil].\n\t^rawData! !\n\n!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\nrawData: anObject\n\t\"Set the value of rawData\"\n\n\trawData := anObject! !\n\n!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:12'!\nreceiveTally\n\t\"Answer the value of receiveTally\"\n\n\treceiveTally isNil ifTrue:[self receiveTally: nil].\n\t^receiveTally! !\n\n!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:12'!\nreceiveTally: anObject\n\t\"Set the value of receiveTally\"\n\n\treceiveTally := anObject! !\n\n!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 18:20'!\nsendTallies\n\t\"Answer the value of sendTallies\"\n\n\tsendTallies isNil ifTrue:[self sendTallies: OrderedCollection new].\n\t^sendTallies! !\n\n!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:07'!\nsendTallies: anObject\n\t\"Set the value of sendTallies\"\n\n\tsendTallies := anObject! !\n\n!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 18:11'!\nsqueakInterpreterStats\n\t\"Answer the value of squeakInterpreterStats\"\n\n\tsqueakInterpreterStats isNil ifTrue:[self squeakInterpreterStats: RVMSqueakInterpreterStats new].\n\t^squeakInterpreterStats! !\n\n!RVMCPUCoreStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:07'!\nsqueakInterpreterStats: anObject\n\t\"Set the value of squeakInterpreterStats\"\n\n\tsqueakInterpreterStats := anObject! !\n\n!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 8/19/2008 11:22'!\ninitializeCoreStatsFrom: data\n\t| valueMap objectMap target |\n\tvalueMap := { \n\t\t\t\t'x' -> #myX:.\n\t\t\t\t'y' -> #myY:.\n\t\t\t\t'rank' -> #myRank:.\n\t\t\t\t}.\n\tobjectMap := {\n\t\t\t\t'sendTalliesByCore' -> #initializeSendTalliesFrom:.\n\t\t\t\t'receiveTallies' -> #initializeReceiveTalliesFrom:.\t\t\t\n\t\t\t\t}.\n\ttarget := self.\n\t\t\t\t\n\tself processMap: valueMap into: target forData: data.\n\tself processMap: objectMap into: target forData: data.! !\n\n!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'dmu 1/1/1970 01:09'!\ninitializeFastCoreStatsFrom: data\n\n\tself myX: (data at: 2).\n\tself myY: (data at: 4).\n\tself myRank: (data at: 6).\n\t\n\tself initializeFastSendTalliesFrom: (data at: 8).\n\tself initializeFastReceiveTalliesFrom: (data at: 10).\n\t\n\t! !\n\n!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 11/16/2008 15:47'!\ninitializeFastFrom: data\n\t\"This implementations assumes order dependency in the array for speed.  \n\t\n\tSet my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\n\t\n\t| target |\n\tself rawData: data.\n\ttarget := self.\n\ttarget millisecondsSinceLastQuery: (data at: 2).\n\ttarget cyclesSinceLastQuery: (data at: 4).\n\ttarget initializeFastCoreStatsFrom: (data at: 6).\n\ttarget initializeFastMemorySystemStatsFrom: (data at: 8).\n\ttarget initializeFastSqueakInterpreterStatsFrom: (data at: 10).\n\ttarget initializeFastObjectTableStatsFrom: (data at: 12).\n! !\n\n!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 1/1/1970 00:06'!\ninitializeFastMemorySystemStatsFrom: data\n\t\"This implementations assumes order dependency in the array for speed.  \n\t\n\tSet my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\n\t\n\t| target |\n\ttarget := self memorySystemStats.\n\ttarget gcCount: (data at: 2).\n\ttarget gcMilliseconds: (data at: 4).\n\ttarget gcCycles: (data at: 6).\n\tself  initializeFastReadWriteHeapStatsFrom: (data at: 8).\n\tself initializeFastReadMostlyHeapStatsFrom: (data at: 10).\n\t! !\n\n!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 11/16/2008 15:53'!\ninitializeFastObjectTableStatsFrom: data\n\t\"This implementations assumes order dependency in the array for speed.\n\t\n\tSet my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\n\t\n\t| target |\n\ttarget := self objectTableStats.\n\ttarget allocatedEntryCount: (data at: 2).\n\ttarget entryCount: (data at: 4).\n\ttarget allocationsSinceLastQuery: (data at: 6).\n\ttarget entriesFreedSinceLastQuery: (data at: 8).\n\t! !\n\n!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 1/1/1970 00:54'!\ninitializeFastReadMostlyHeapStatsFrom: data\n\t\"This implementations assumes order dependency in the array for speed.\n\t\n\tSet my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\n\t\n\t|  target |\n\ttarget := self memorySystemStats readMostlyHeapStats.\n\ttarget bytesUsed: (data at: 2).\n\ttarget bytesLeft: (data at: 4).\n\ttarget allocationsSinceLastQuery: (data at: 4).\n\ttarget compactionsSinceLastQuery: (data at: 8).\n\t! !\n\n!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 1/1/1970 00:54'!\ninitializeFastReadWriteHeapStatsFrom: data\n\t\"This implementations assumes order dependency in the array for speed.\n\t\n\tSet my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\n\t\n\t|  target |\n\ttarget := self memorySystemStats readWriteHeapStats.\n\ttarget bytesUsed: (data at: 2).\n\ttarget bytesLeft: (data at: 4).\n\ttarget allocationsSinceLastQuery: (data at: 4).\n\ttarget compactionsSinceLastQuery: (data at: 8).\n\t! !\n\n!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 8/19/2008 11:21'!\ninitializeFastReceiveTalliesFrom: data\n\t\"data looks like #(395 0 0 1041 1 520 0 0 0 121 0 1 0 1 0 1 28741 10 1 0)\n\tnumber of elements based on number of messages tallied\"\n\t\n\tself receiveTally: (RVMCoreMessageTally fastForData: data)! !\n\n!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 3/25/2009 14:19'!\ninitializeFastSendTalliesFrom: data\n\t\"data USED TO looks like \n\t\t#('send_tallies' #(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)\n\t\t'send_tallies' #(4 0 0 0 0 4 0 0 0 0 0 0 0 0 0 0 11 0 0 0) \n\t\t... as many as we have cores being used)\n\t\tnumber of elements based on number of messages tallied\"\n\t\"NOW DATA LOOKS LIKE #(0 0 0 4290 0 0 0 0 0 4840 0 0 55 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 11 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 322 0 0)\"\n\t\n\t\"OLD CODE\n\t2 to: data size by: 2 do:[:index|\n\t\tself sendTallies add: (RVMCoreMessageTally fastForData: (data at: index))]\"\n\t\n\t\"NEW CODE\"\n\tself sendTallies add: (RVMCoreMessageTally fastForData: data )! !\n\n!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 9/9/2008 22:40'!\ninitializeFastSqueakInterpreterStatsFrom: data\n\t\"This implementations assumes order dependency in the array for speed.  \n\t\n\tSet my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\n\t\n\t|  target |\n\ttarget := self squeakInterpreterStats.\n\ttarget bytecodesExecuted: (data at: 2).\n\ttarget yieldCount: (data at: 4).\n\"\ttarget millisecondsRunning: (data at: 6).\n\ttarget millisecondsWaiting: (data at: 8).\"\n\ttarget cyclesRunning: (data at: 6).\n\ttarget cyclesWaiting: (data at: 8).\n\ttarget contextChangeCount: (data at: 10).\n\ttarget interruptCheckCount: (data at: 12).\n\ttarget unforcedInterruptCheckCount: (data at: 14)\n\t! !\n\n!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 1/1/1970 00:07'!\ninitializeFastestCoreStatsFrom: data\n\t\"skip the tallies for speed\"\n\tself myX: (data at: 2).\n\tself myY: (data at: 4).\n\tself myRank: (data at: 6).\n\t\n\"\tself initializeFastSendTalliesFrom: (data at: 8).\n\tself initializeFastReceiveTalliesFrom: (data at: 10).\"\n\t\n\t! !\n\n!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 11/16/2008 15:48'!\ninitializeFastestFrom: data\n\t\"This implementations assumes order dependency in the array for speed.  \n\t\n\tSet my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\n\t\n\t| target |\n\tself rawData: data.\n\ttarget := self.\n\ttarget millisecondsSinceLastQuery: (data at: 2).\n\ttarget cyclesSinceLastQuery: (data at: 4).\n\ttarget initializeFastestCoreStatsFrom: (data at: 6).\n\ttarget initializeFastMemorySystemStatsFrom: (data at: 8).\n\ttarget initializeFastSqueakInterpreterStatsFrom: (data at: 10).\n\ttarget initializeFastObjectTableStatsFrom: (data at: 12).\n\t! !\n\n!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 11/16/2008 15:48'!\ninitializeFrom: data\n\t\"Set my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  This implementations assumes no order dependency in the array except that values always follow their names.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\n\t\n\t| valueMap objectMap target |\n\tself rawData: data.\n\tvalueMap := { \n\t\t\t\t'millisecs' -> #millisecondsSinceLastQuery:.\n\t\t\t\t'cycles' -> #cyclesSinceLastQuery:.\n\t\t\t\t}.\n\tobjectMap := {\n\t\t\t\t'coreStats' -> #initializeCoreStatsFrom:.\n\t\t\t\t'memorySystemStats' -> #initializeMemorySystemStatsFrom:.\n\t\t\t\t'interpreterStats' -> #initializeSqueakInterpreterStatsFrom:.\n\t\t\t\t'objectTableStats' -> #initializeFastObjectTableStatsFrom:.\n\t\t\t\t}.\n\ttarget := self.\n\t\t\t\t\n\tself processMap: valueMap into: target forData: data.\n\tself processMap: objectMap into: target forData: data.! !\n\n!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 1/1/1970 00:04'!\ninitializeMemorySystemStatsFrom: data\n\t\"Set my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  This implementations assumes no order dependency in the array except that values always follow their names.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\n\t\n\t| valueMap target |\n\tself rawData: data.\n\tvalueMap := { \n\t\t\t\t'gcCount' -> #gcCount:.\n\t\t\t\t'gcMilliseconds' -> #gcMilliseconds:.\n\t\t\t\t'gcCycles' -> #gcCycles:.\n\t\t\t\t'readWriteHeapStats' -> #initializeReadWriteHeapStatsFrom:.\n\t\t\t\t'readMostlyHeapStats' -> #initializeReadMostlyHeapStatsFrom:.\n\t\t\t\t}.\n\n\ttarget := self memorySystemStats.\n\t\t\t\t\n\tself processMap: valueMap into: target forData: data.\n! !\n\n!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 11/16/2008 15:50'!\ninitializeObjectTableStatsFrom: data\n\t\"Set my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  This implementations assumes no order dependency in the array except that values always follow their names.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\n\t\n\t| valueMap objectMap target |\n\tvalueMap := { \n\t\t\t\t'allocatedEntryCount[rank]' -> #allocatedEntryCount:.\n\t\t\t\t'entryCount[rank]' -> #entryCount:.\n\t\t\t\t'allocationsSinceLastQuery[rank]' -> #allocationsSinceLastQuery:.\n\t\t\t\t'entriesFreedSinceLastQuery[rank]' -> #entriesFreedSinceLastQuery:.\n\t\t\t\t}.\n\tobjectMap := {}.\n\ttarget := self objectTableStats.\n\t\t\t\t\n\tself processMap: valueMap into: target forData: data.\n\tself processMap: objectMap into: target forData: data.! !\n\n!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 1/1/1970 00:54'!\ninitializeReadMostlyHeapStatsFrom: data\n\t\"Set my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  This implementations assumes no order dependency in the array except that values always follow their names.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\n\t\n\t| valueMap  target |\n\tvalueMap := { \n\t\t\t\t'bytesUsed()' -> #bytesUsed:.\n\t\t\t\t'bytesLeft()' -> #bytesLeft:.\n\t\t\t\t'allocationsSinceLastQuery' -> #allocationsSinceLastQuery:.\n\t\t\t\t'compactionsSinceLastQuery' -> #compactionsSinceLastQuery:.\n\t\t\t\t}.\n\ttarget := self memorySystemStats readMostlyHeapStats.\n\t\t\t\t\n\tself processMap: valueMap into: target forData: data.\n! !\n\n!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 1/1/1970 00:54'!\ninitializeReadWriteHeapStatsFrom: data\n\t\"Set my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  This implementations assumes no order dependency in the array except that values always follow their names.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\n\t\n\t| valueMap  target |\n\tvalueMap := { \n\t\t\t\t'bytesUsed()' -> #bytesUsed:.\n\t\t\t\t'bytesLeft()' -> #bytesLeft:.\n\t\t\t\t'allocationsSinceLastQuery' -> #allocationsSinceLastQuery:.\n\t\t\t\t'compactionsSinceLastQuery' -> #compactionsSinceLastQuery:.\n\t\t\t\t}.\n\ttarget := self memorySystemStats readWriteHeapStats.\n\t\t\t\t\n\tself processMap: valueMap into: target forData: data.\n! !\n\n!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 8/13/2008 18:21'!\ninitializeReceiveTalliesFrom: data\n\t\"data looks like #(395 0 0 1041 1 520 0 0 0 121 0 1 0 1 0 1 28741 10 1 0)\n\tnumber of elements based on number of messages tallied\"\n\t\n\tself receiveTally: (RVMCoreMessageTally forMessageNames: self messageNames andData: data)! !\n\n!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 8/19/2008 11:31'!\ninitializeSendTalliesFrom: data\n\t\"data looks like \n\t\t#('send_tallies' #(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)\n\t\t'send_tallies' #(4 0 0 0 0 4 0 0 0 0 0 0 0 0 0 0 11 0 0 0) \n\t\t... as many as we have cores being used)\n\t\tnumber of elements based on number of messages tallied\"\n\t\n\t| tally |\n\tdata do:[:each|\n\t\teach = 'sendTallies' ifFalse:[\n\t\t\ttally := RVMCoreMessageTally forMessageNames: self messageNames andData: each.\n\t\t\tself sendTallies add: tally]]! !\n\n!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'ssa 9/9/2008 22:24'!\ninitializeSqueakInterpreterStatsFrom: data\n\t\"Set my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  This implementations assumes no order dependency in the array except that values always follow their names.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\n\t\n\t| valueMap target |\n\tself rawData: data.\n\tvalueMap := { \n\t\t\t\t'bytecodesExecuted' -> #bytecodesExecuted:.\n\t\t\t\t'yieldCount' -> #yieldCount:.\n\t\t\t\t'contextChangeCount' -> #contextChangeCount:.\n\t\t\t\t\"'millisecondsRunning' -> #millisecondsRunning:.\"\n\t\t\t\t\"'millisecondsWaiting' -> #millisecondsWaiting:.\"\n\t\t\t\t'cyclesRunning' -> #cyclesRunning:.\n\t\t\t\t'cyclesWaiting' -> #cyclesWaiting:.\n\t\t\t\t'contextChangeCount' -> #contextChangeCount:.\n\t\t\t\t'interruptCheckCount' -> #interruptCheckCount:.\n\t\t\t\t'unforcedInterruptCheckCount' -> #unforcedInterruptCheckCount:.\n\t\t\t\t}.\n\n\ttarget := self squeakInterpreterStats.\n\t\t\t\t\n\tself processMap: valueMap into: target forData: data.\n! !\n\n!RVMCPUCoreStats methodsFor: 'initialize' stamp: 'dmu 8/15/2008 21:03'!\nprocessMap: map into: targetObject forData: data\n\t\t\t\t\n\t| index datum |\n\tmap do:[:assoc |\n\t\tindex := data indexOf: assoc key.\n\t\tindex = 0 ifTrue:[\n\t\t\tassoc key = 'receiveTallies' ifFalse:[self error:'Can''t find ',assoc key,' in sample data']].\n\t\tdatum := data at: index + 1.\n\t\ttargetObject perform: assoc value with: datum].\n! !\n\n!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:52'!\nallocationsSinceLast\n\t^self allocationsSinceLastReadWrite + self allocationsSinceLastReadMostly! !\n\n!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:56'!\nallocationsSinceLastReadMostly\n\t^self memorySystemStats readMostlyHeapStats allocationsSinceLastQuery! !\n\n!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:56'!\nallocationsSinceLastReadWrite\n\t^self memorySystemStats readWriteHeapStats allocationsSinceLastQuery! !\n\n!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:18'!\nbytecodesExecuted\n\t\"Answer the count of bytecodes executed during this sample\"\n\t\n\t^self squeakInterpreterStats bytecodesExecuted! !\n\n!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 9/17/2010 15:18'!\nbytecodesPerMillisecond\n\t\"Answer the ratio of bytecodes executed per ms during this sample\"\n\t\n\t^(self squeakInterpreterStats bytecodesExectued / (1 max: self millisecondsSinceLastQuery) asFloat ) rounded! !\n\n!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 9/17/2010 15:18'!\nbytecodesPerSecond\n\t\"Answer the ratio of bytecodes executed per second during this sample\"\n\tself millisecondsSinceLastQuery = 0 ifTrue:[^0].\n\t\n\t^(self squeakInterpreterStats bytecodesExecuted / (1 max: self millisecondsSinceLastQuery) asFloat * 1000) rounded! !\n\n!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:49'!\nbytesLeft\n\t^self bytesLeftReadWrite + self bytesLeftReadMostly! !\n\n!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:49'!\nbytesLeftReadMostly\n\t^self memorySystemStats readMostlyHeapStats bytesLeft ! !\n\n!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:49'!\nbytesLeftReadWrite\n\t^self memorySystemStats readWriteHeapStats bytesLeft ! !\n\n!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:45'!\nbytesUsed\n\t^self bytesUsedReadWrite + self bytesUsedReadMostly! !\n\n!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:44'!\nbytesUsedReadMostly\n\t^self memorySystemStats readMostlyHeapStats bytesUsed ! !\n\n!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 1/1/1970 00:54'!\nbytesUsedReadWrite\n\t^self memorySystemStats readWriteHeapStats bytesUsed ! !\n\n!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:54'!\ncompactionsSinceLast\n\t^self compactionsSinceLastReadWrite + self compactionsSinceLastReadMostly! !\n\n!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:57'!\ncompactionsSinceLastReadMostly\n\t^self memorySystemStats readMostlyHeapStats compactionsSinceLastQuery! !\n\n!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:56'!\ncompactionsSinceLastReadWrite\n\t^self memorySystemStats readWriteHeapStats compactionsSinceLastQuery! !\n\n!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:08'!\ncontextChangeCount\n\t\"Answer the count of yields  during this sample\"\n\t\n\t^self squeakInterpreterStats contextChangeCount! !\n\n!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:53'!\ncyclesRunWaitRatio\n\t\"Answer the ratio between my cyclesRunning and cyclesWaiting\"\n\t\n\t^self squeakInterpreterStats cyclesRunWaitRatio! !\n\n!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:46'!\ncyclesRunning\n\t\"Answer the count of cycles spent running during this sample\"\n\t\n\t^self squeakInterpreterStats cyclesRunning! !\n\n!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/15/2008 15:41'!\ncyclesSinceLast\n\t\"Answer the count of cycles since last sample\"\n\t\n\t^self cyclesSinceLastQuery! !\n\n!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:46'!\ncyclesWaiting\n\t\"Answer the count of cycles spect waiting during this sample\"\n\t\n\t^self squeakInterpreterStats cyclesWaiting! !\n\n!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:06'!\ninterruptCheckCount\n\t\"Answer the count of yields  during this sample\"\n\t\n\t^self squeakInterpreterStats interruptCheckCount! !\n\n!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:34'!\nmillisecondsRunning\n\t\"Answer the count of ms spent running during this sample\"\n\t\n\t^self squeakInterpreterStats millisecondsRunning! !\n\n!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:53'!\nmillisecondsWaiting\n\t\"Answer the count of ms spect waiting during this sample\"\n\t\n\t^self squeakInterpreterStats millisecondsWaiting! !\n\n!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:43'!\nmsRunWaitRatio\n\t\"Answer the ratio between my msRunning and msWaiting\"\n\t\n\t^self squeakInterpreterStats msRunWaitRatio! !\n\n!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/15/2008 15:27'!\nmsSinceLast\n\t\"Answer the count of ms since last sample\"\n\t\n\t^self millisecondsSinceLastQuery! !\n\n!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 3/27/2009 16:55'!\nsendTallySums\n\t\"Answer an array with the sum of all my send tallies in order\"\n\t| sums tally |\n\tself sendTallies isEmpty ifTrue:[^#()].\n\tsums _ self sendTallies first talliesInOrder.\n\t2 to: self sendTallies size do:[:index| \n\t\ttally _ self sendTallies at: index.\n\t\tsums _ sums + tally talliesInOrder].\n\t^sums! !\n\n!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:06'!\nunforcedInterruptCheckCount\n\t\"Answer the count of yields  during this sample\"\n\t\n\t^self squeakInterpreterStats unforcedInterruptCheckCount! !\n\n!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'ssa 8/14/2008 17:16'!\nyieldCount\n\t\"Answer the count of yields  during this sample\"\n\t\n\t^self squeakInterpreterStats yieldCount! !\n\n!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:17'!\nyieldFrequency\n\t\n\t^self squeakInterpreterStats yieldFrequency! !\n\n!RVMCPUCoreStats methodsFor: 'measuring' stamp: 'dmu 9/17/2010 15:19'!\nyieldsPerSecond\n\t\"Answer the ratio of yields per second during this sample\"\n\t\n\t^(self squeakInterpreterStats yieldCount / (1 max: self millisecondsSinceLastQuery) asFloat * 1000) rounded! !\n\n!RVMCPUCoreStats class methodsFor: 'instance creation' stamp: 'ssa 8/19/2008 10:57'!\nnewFastFromData: data forMessageNames: messageNames\n\n\t| stats |\n\tstats := self new.\n\tstats messageNames: messageNames.\n\tstats initializeFastFrom: data.\n\t^stats! !\n\n!RVMCPUCoreStats class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:05'!\nnewFastestFromData: data forMessageNames: messageNames\n\n\t| stats |\n\tstats := self new.\n\tstats messageNames: messageNames.\n\tstats initializeFastestFrom: data.\n\t^stats! !\n\n!RVMCPUCoreStats class methodsFor: 'instance creation' stamp: 'ssa 8/13/2008 17:49'!\nnewFromData: data forMessageNames: messageNames\n\n\t| stats |\n\tstats := self new.\n\tstats messageNames: messageNames.\n\tstats initializeFrom: data.\n\t^stats! !\n\n!RVMCanvasController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 00:16'!\nredButtonActivity\n\t\"Move the offset of the view, effectively scrolling the canvas.\"\n\t| startPoint delta oldOffset |\n\tCursor crossHair show.\n\tstartPoint _ Sensor cursorPoint.\n\toldOffset _ self view offset.\n\t[Sensor redButtonPressed] whileTrue:[delta _ Sensor cursorPoint - startPoint.\n\t\tself view offset: oldOffset + delta.\n\t\tself view displayView].\n\tCursor normal show\n\t! !\n\n!RVMCanvasController methodsFor: 'controlling' stamp: 'ssa 10/8/2008 19:05'!\nyellowButtonActivity\n\t! !\n\n!RVMCanvasView methodsFor: 'drawing' stamp: 'ssa 1/1/1970 00:10'!\ndrawCanvas\n\t\"This is the main drawing method. Subclasses will override to do their own drawing\"\n\tself  marker destForm: self canvas.\n\tself drawCross! !\n\n!RVMCanvasView methodsFor: 'drawing' stamp: 'ssa 1/1/1970 00:10'!\ndrawCross\n\t| box |\n\tbox _ self canvas boundingBox.\n\tself drawLineFrom: box topLeft to: box bottomRight color: Color blue.\n\tself drawLineFrom: box topRight to: box bottomLeft color: Color red.\n\t! !\n\n!RVMCanvasView methodsFor: 'drawing' stamp: 'ssa 1/1/1970 00:22'!\ndrawLineFrom: beginPoint to: endPoint color: aColor \n\t\"Draw a line on the canvas in canvas coordinates\"\n\t\n\tMarker\n\t\tcolor: aColor;\n\t\tplace: beginPoint;\n\t\tgoto: endPoint! !\n\n!RVMCanvasView methodsFor: 'drawing' stamp: 'ssa 1/1/1970 00:33'!\neraseCanvas\n\tself canvas fillWhite! !\n\n!RVMCanvasView methodsFor: 'controller access' stamp: 'ssa 1/1/1970 00:29'!\ndefaultControllerClass\n\n\t^RVMCanvasController! !\n\n!RVMCanvasView methodsFor: 'accessing' stamp: 'dmiu 4/18/2011 13:32'!\ncanvas\n\t\"Answer the value of canvas\"\n\tcanvas isNil ifTrue:[self canvas: (ColorForm extent: self extent  - (0@2) depth: (8 min: Display depth)).\n\t\tself drawCanvas].\n\t^ canvas! !\n\n!RVMCanvasView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:02'!\ncanvas: anObject\n\t\"Set the value of canvas\"\n\n\tcanvas _ anObject! !\n\n!RVMCanvasView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:25'!\ndefaultOffset\n\n\t^0@0! !\n\n!RVMCanvasView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:05'!\ndirty\n\t\"Answer the value of dirty\"\n\n\tdirty isNil ifTrue:[self dirty: true].\n\t^ dirty! !\n\n!RVMCanvasView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:02'!\ndirty: anObject\n\t\"Set the value of dirty\"\n\n\tdirty _ anObject! !\n\n!RVMCanvasView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:32'!\nextent\n\t\"Answer the value of extent\"\n\n\textent isNil ifTrue:[self extent: self insetDisplayBox extent].\n\t^ extent! !\n\n!RVMCanvasView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:40'!\nextent: aPoint\n\t\"Set the value of extent\"\n\n\textent _ aPoint\n\t! !\n\n!RVMCanvasView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:11'!\nmarker\n\n\t^self class marker! !\n\n!RVMCanvasView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:25'!\noffset\n\t\"Answer the value of offset\"\n\n\toffset isNil ifTrue:[self offset: self defaultOffset].\n\t^ offset! !\n\n!RVMCanvasView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:31'!\noffset: aPoint\n\t\"Set the value of offset\"\n\n\toffset _ aPoint min: 0@0 max: self insetDisplayBox extent - self canvas extent! !\n\n!RVMCanvasView methodsFor: 'displaying' stamp: 'ssa 10/21/2008 11:31'!\ndisplayView\n\t\"Display my canvas at my offset.\n\tSubclasses should not override this method but should draw on the canvas instead\"\n\tself okToDisplay ifFalse:[^self].\n\tself uncache.\n\tself canvas displayOn: Display at: self insetDisplayBox origin + self offset clippingBox: self insetDisplayBox.\n! !\n\n!RVMCanvasView methodsFor: 'framing' stamp: 'ssa 1/1/1970 00:30'!\nnewFrame\n\t\"My frame has changed.  Default is to do nothing special\"! !\n\n!RVMCanvasView class methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:20'!\nmarker\n\t\"Answer the default form to draw with, a 1 pixel black dot.\"\n\tMarker isNil ifTrue:[Marker _ Pen new.\n\t\tMarker defaultNib:1].\n\t^Marker! !\n\n!RVMCanvasView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:13'!\nexample\n\t\"RVMCanvasView example\"\n\t| topView |\n\ttopView _ StandardSystemView new.\n\ttopView label:'CanvasView test'.\n\ttopView minimumSize: 200@200.\n\ttopView borderWidth:2.\n\ttopView addSubView: self new.\n\ttopView controller open! !\n\n!RVMCanvasView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:17'!\nexample2\n\t\"RVMCanvasView example2\"\n\t| topView view |\n\ttopView _ RVMStandardSystemView new.\n\ttopView label:'CanvasView test'.\n\ttopView minimumSize: 200@50.\n\ttopView borderWidth:2.\n\tview _ self new.\n\tview extent: 500@50.\n\ttopView addSubView: view.\n\ttopView controller open! !\n\n!RVMCheckBoxController methodsFor: 'basic control sequence' stamp: 'ssa 11/15/2008 11:04'!\nclearView\n\n\tDisplay fill: self view insetDisplayBox fillColor: Color white! !\n\n!RVMCheckBoxController methodsFor: 'basic control sequence' stamp: 'ssa 11/15/2008 11:04'!\nredButtonActivity\n\n\t| aborted lastAborted |\n\tself view displayPressed.\n\tlastAborted _ false.\n\taborted _ true.\n\t[Sensor redButtonPressed] whileTrue:[\n\t\taborted _ (self view insetDisplayBox containsPoint: Sensor cursorPoint) not.\n\t\taborted & lastAborted not ifTrue:[self clearView.  \n\t\t\t\t\t\t\t\t\tself view displayView.\n\t\t\t\t\t\t\t\t\tlastAborted _ true].\n\t\taborted not & lastAborted ifTrue:[self clearView.\n\t\t\t\t\t\t\t\t\tself view displayPressed.\n\t\t\t\t\t\t\t\t\tlastAborted _ false]].\n\tself clearView.\n\tself view displayView.\n\taborted ifFalse:[self view performAction]! !\n\n!RVMCheckBoxController methodsFor: 'basic control sequence' stamp: 'ssa 10/19/2008 00:09'!\nyellowButtonActivity\n! !\n\n!RVMCheckBoxController methodsFor: 'controlling' stamp: 'ssa 9/19/2008 12:20'!\ncontrolActivity\n\t\"Cursor action show.\"\n\tsuper controlActivity! !\n\n!RVMCheckBoxController methodsFor: 'controlling' stamp: 'ssa 9/19/2008 12:05'!\ncontrolTerminate\n\tCursor normal show.\n\tsuper controlTerminate! !\n\n!RVMCheckBoxOnlyView methodsFor: 'displaying' stamp: 'ssa 5/4/2010 15:36'!\ncheckBoxForm\n\t\"Answer the check(ed) box based on the current state \"\n\t\n\t^self checkBoxFormX! !\n\n!RVMCheckBoxOnlyView methodsFor: 'displaying' stamp: 'ssa 5/4/2010 15:36'!\ncheckBoxFormNotCircle\n\t\"Answer the check(ed) box based on the current state \"\n\t\n\t^self checked ifTrue:[self clearCircle]ifFalse:[self notSign]! !\n\n!RVMCheckBoxOnlyView methodsFor: 'displaying' stamp: 'ssa 1/1/1970 01:05'!\ncheckBoxFormOnOff\n\t\"Answer the check(ed) box based on the current state \"\n\t\n\t| msg msgText |\n\tmsg _ self checked ifTrue:[\n\t\t'O\nN'] ifFalse:['O\nF\nF'].\n\tmsgText _ msg asDisplayText.\n\t^msgText \n\t\t\t asParagraph asForm scaledToSize:(self insetDisplayBox extent min: msgText boundingBox extent).\n! !\n\n!RVMCheckBoxOnlyView methodsFor: 'displaying' stamp: 'ssa 1/1/1970 00:56'!\ncheckBoxFormX\n\t\"Answer the check(ed) box based on the current state \"\n\t\n\t| box marker |\n\n\tbox _ Form extent: self insetDisplayBox width asPoint depth: Display depth.\n\t\"box border: box boundingBox width:2  fillColor: Color gray.\"\n\tself checked ifFalse:[^box].\n\t\"box fill: (box boundingBox insetBy: 2) fillColor: Color gray lighter lighter.\"\n\tmarker _ Form extent:2@2 depth: Display depth.\n\tmarker fillColor: Color gray.\n\tbox drawLine:  marker\n\t\tfrom: box boundingBox origin\n\t\tto: box boundingBox corner\n\t\tclippingBox: box boundingBox\n\t\trule: Form over\n\t\tfillColor: nil.\n\tbox drawLine:  marker\n\t\tfrom: box boundingBox topRight - (2@0)\n\t\tto: box boundingBox bottomLeft - (2@0)\n\t\tclippingBox: box  boundingBox \n\t\trule: Form over\n\t\tfillColor: nil.\n\t\t\n\t^box! !\n\n!RVMCheckBoxOnlyView methodsFor: 'displaying' stamp: 'ssa 1/1/1970 00:12'!\ncheckedCircle\n^Form\n\textent: 10@10\n\tdepth: 1\n\tfromArray: #( 1056964608 1635778560 3250585600 2185232384 2185232384 2487222272 2285895680 3368026112 1635778560 1056964608)\n\toffset: 0@0! !\n\n!RVMCheckBoxOnlyView methodsFor: 'displaying' stamp: 'ssa 1/1/1970 00:12'!\nclearCircle\n\t^ Form\n\t\textent: 10 @ 10\n\t\tdepth: 1\n\t\tfromArray: #(1056964608 1635778560 3233808384 2151677952 2151677952 2151677952 2151677952 3233808384 1635778560 1056964608 )\n\t\toffset: 0 @0! !\n\n!RVMCheckBoxOnlyView methodsFor: 'displaying' stamp: 'ssa 11/11/2008 22:42'!\ndisplayContents\n\n\t| checkBoxForm box |\n\tself okToDisplay ifFalse:[^self].\n\tcheckBoxForm _ self checkBoxForm.\n\tcheckBoxForm _ checkBoxForm scaledToSize:(self insetDisplayBox extent min: checkBoxForm boundingBox extent).\n\tbox _ checkBoxForm boundingBox.\n\tbox _ box align: box center with: self insetDisplayBox center.\n\tDisplay fill: self insetDisplayBox fillColor: Color white.\n\tcheckBoxForm displayOn: Display at: box  origin ! !\n\n!RVMCheckBoxOnlyView methodsFor: 'displaying' stamp: 'ssa 1/1/1970 00:12'!\nnotSign\n^Form\n\textent: 10@10\n\tdepth: 1\n\tfromArray: #( 1056964608 1635778560 3250585600 2202009600 2252341248 2353004544 2554331136 4039114752 1635778560 1056964608)\n\toffset: 0@0! !\n\n!RVMCheckBoxView methodsFor: 'updating' stamp: 'ssa 10/19/2008 00:43'!\nhear: aSpeaker\n\t\"Some object I am listening to is speaking\"\nself checked:nil.\nself displayView! !\n\n!RVMCheckBoxView methodsFor: 'updating' stamp: 'ssa 11/13/2008 10:44'!\nperformAction\n\t\"I've been clicked, switch state and act\"\n\tself checked ifTrue:[self performUncheckAction]ifFalse:[self performCheckAction].\n\tself checked: nil.\n\tself displayView! !\n\n!RVMCheckBoxView methodsFor: 'updating' stamp: 'ssa 11/13/2008 10:46'!\nperformCheckAction\n\n\tself checkAction isSymbol ifTrue:[self model perform: self checkAction] ifFalse:[self checkAction value]! !\n\n!RVMCheckBoxView methodsFor: 'updating' stamp: 'ssa 11/13/2008 10:46'!\nperformUncheckAction\n\n\tself uncheckAction isSymbol ifTrue:[self model perform: self uncheckAction] ifFalse:[self uncheckAction value]! !\n\n!RVMCheckBoxView methodsFor: 'updating' stamp: 'ssa 10/19/2008 00:56'!\nupdate: aSelector\n\n\tsuper update: aSelector.\n\tself checked: nil.\n\tself displayView! !\n\n!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 2/22/2010 15:39'!\nbaseColor\n\t^Color gray lighter lighter lighter! !\n\n!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 03:16'!\ncheckAction\n\t\"Answer the value of checkAction\"\n\n\tcheckAction isNil ifTrue:[self checkAction: [self inform:'box just checked']].\n\t^ checkAction! !\n\n!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 03:15'!\ncheckAction: anObject\n\t\"Set the value of checkAction\"\n\n\tcheckAction _ anObject! !\n\n!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 11/16/2008 00:12'!\ncheckBoxForm\n\t\"Answer the value of checkBoxForm\"\n\n\t^self checkState ifTrue:[self checkedBoxForm]ifFalse:[self uncheckedBoxForm]! !\n\n!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 11/13/2008 10:43'!\ncheckState\n\t\"Answer the value of checked the state of my checkbox\"\n\n\t^self checkStateAction isSymbol ifTrue:[self model perform: self checkStateAction]\n\t\tifFalse:[self checkStateAction value]! !\n\n!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 03:19'!\ncheckStateAction\n\t\"Answer the value of checkStateAction\"\n\n\tcheckStateAction isNil ifTrue:[self checkStateAction: [false]].\n\t^ checkStateAction! !\n\n!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 03:18'!\ncheckStateAction: anObject\n\t\"Set the value of checkStateAction\"\n\n\tcheckStateAction _ anObject! !\n\n!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 11/13/2008 10:42'!\nchecked\n\t\"Answer the value of checked the state of my checkbox\"\n\n\tchecked isNil ifTrue:[self checked: self checkState].\n\t^ checked! !\n\n!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 03:15'!\nchecked: anObject\n\t\"Set the value of checked\"\n\n\tchecked _ anObject! !\n\n!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 11/16/2008 00:09'!\ncheckedBoxForm\n\t\"Answer the value of checkedBoxForm\"\n\n\tcheckedBoxForm isNil ifTrue:[self checkedBoxForm: self buildCheckedBoxForm].\n\t^ checkedBoxForm! !\n\n!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 11/16/2008 00:09'!\ncheckedBoxForm: anObject\n\t\"Set the value of checkedBoxForm\"\n\n\tcheckedBoxForm _ anObject! !\n\n!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 03:17'!\nlabel\n\t\"Answer the value of label\"\n\n\tlabel isNil ifTrue:[self label: 'no label yet'].\n\t^ label! !\n\n!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 03:15'!\nlabel: anObject\n\t\"Set the value of label\"\n\n\tlabel _ anObject! !\n\n!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 11/16/2008 00:03'!\nlabelForm\n\t\"Answer the value of labelForm\"\n\n\tlabelForm isNil ifTrue:[self labelForm: self buildLabelForm].\n\t^ labelForm! !\n\n!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 11/16/2008 00:03'!\nlabelForm: anObject\n\t\"Set the value of labelForm\"\n\n\tlabelForm _ anObject! !\n\n!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 03:17'!\nuncheckAction\n\t\"Answer the value of uncheckAction\"\n\n\tuncheckAction isNil ifTrue:[self uncheckAction: [self inform:'box just UNchecked']].\n\t^ uncheckAction! !\n\n!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 03:15'!\nuncheckAction: anObject\n\t\"Set the value of uncheckAction\"\n\n\tuncheckAction _ anObject! !\n\n!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 11/16/2008 00:10'!\nuncheckedBoxForm\n\t\"Answer the value of uncheckedBoxForm\"\n\n\tuncheckedBoxForm isNil ifTrue:[self uncheckedBoxForm: self buildUncheckedBoxForm].\n\t^ uncheckedBoxForm! !\n\n!RVMCheckBoxView methodsFor: 'accessing' stamp: 'ssa 11/16/2008 00:09'!\nuncheckedBoxForm: anObject\n\t\"Set the value of uncheckedBoxForm\"\n\n\tuncheckedBoxForm _ anObject! !\n\n!RVMCheckBoxView methodsFor: 'displaying' stamp: 'ssa 2/23/2010 15:40'!\nbuildCheckedBoxForm\n\t\"Answer the check(ed) box \"\n\t\n\t| box marker |\n\tbox _ Form extent: 15@15 depth: Display depth .\n\tbox fillColor: self baseColor lighter lighter.\n\tbox border: box boundingBox width:1  fillColor: Color black.\n\tmarker _ Form extent:2@2.\n\tmarker fillColor: Color black.\n\tbox drawLine:  marker\n\t\tfrom: box boundingBox origin\n\t\tto: box boundingBox corner\n\t\tclippingBox: box boundingBox\n\t\trule: Form over\n\t\tfillColor: nil.\n\tbox drawLine:  marker\n\t\tfrom: box boundingBox topRight - (2@0)\n\t\tto: box boundingBox bottomLeft - (2@0)\n\t\tclippingBox: box  boundingBox \n\t\trule: Form over\n\t\tfillColor: nil.\n\t\t\n\t^box! !\n\n!RVMCheckBoxView methodsFor: 'displaying' stamp: 'ssa 11/16/2008 00:01'!\nbuildLabelForm\n\t\"Answer the label form\"\n\t\n\t|  labelText  |\n\tlabelText := ('  ',self label ) asDisplayText .\n\tlabelText foregroundColor: Color black\n\t\t\tbackgroundColor: Color transparent.\n\t^labelText \"asParagraph asForm\"\n! !\n\n!RVMCheckBoxView methodsFor: 'displaying' stamp: 'ssa 2/23/2010 15:40'!\nbuildUncheckedBoxForm\n\t\"Answer the uncheck(ed) box\"\n\t\n\t| box |\n\tbox _ Form extent: 15@15 depth: Display depth .\n\tbox fillColor:self baseColor lighter lighter.\n\tbox border: box boundingBox width:1  fillColor: Color black.\n\n\t^box! !\n\n!RVMCheckBoxView methodsFor: 'displaying' stamp: 'ssa 2/23/2010 15:34'!\nbuildUnderLabelForm\n\t\"Answer the under label form\"\n\t\n\t|  labelText  |\n\tlabelText := ('  ',self label ) asDisplayText .\n\tlabelText foregroundColor: self baseColor lighter lighter\n\t\t\tbackgroundColor: Color transparent.\n\t^labelText \"asParagraph asForm\"\n! !\n\n!RVMCheckBoxView methodsFor: 'displaying' stamp: 'ssa 2/23/2010 15:39'!\ndisplayContents\n\n\t|   box theLabelForm theCheckBoxForm underLabelForm |\n\ttheCheckBoxForm _ self checkBoxForm.\n\ttheLabelForm _ self buildLabelForm.\n\tunderLabelForm _ self buildUnderLabelForm.\n\tbox _ 0@0 extent: theCheckBoxForm width + theLabelForm width @ (theCheckBoxForm height max: theLabelForm height).\n\tbox _ box align: box leftCenter with: self insetDisplayBox leftCenter + (4@1).\n\tDisplay fill: self insetDisplayBox fillColor: self baseColor.\n\ttheCheckBoxForm displayOn: Display at: box  origin clippingBox: self insetDisplayBox  rule: Form over fillColor:nil.\n\tunderLabelForm displayOn: Display at: box origin + (theCheckBoxForm width @ -2)+(1@1) clippingBox: self insetDisplayBox rule: Form over fillColor:nil.\n\ttheLabelForm displayOn: Display at: box origin + (theCheckBoxForm width @ -2) clippingBox: self insetDisplayBox rule: Form over fillColor:nil.\n\t! !\n\n!RVMCheckBoxView methodsFor: 'displaying' stamp: 'ssa 1/1/1970 04:10'!\ndisplayPressed\n\n\tself displayContents.\n\tDisplay border:( self  insetDisplayBox insetBy: 2@2) width: 2 fillColor: Color gray! !\n\n!RVMCheckBoxView methodsFor: 'displaying' stamp: 'ssa 11/15/2008 15:49'!\ndisplayView\n\tself okToDisplay ifFalse:[^self].\n\tself uncache.\n\tself displayContents! !\n\n!RVMCheckBoxView methodsFor: 'controller access' stamp: 'ssa 1/1/1970 03:21'!\ndefaultControllerClass\n\n\t^RVMCheckBoxController! !\n\n!RVMCheckBoxView class methodsFor: 'examples' stamp: 'ssa 11/13/2008 10:05'!\nexample\n\t\"RVMCheckBoxView example\"\n\t\"Note we are using this class as a test model for this method.  See examplePoint for a more normal usage\"\n\t| topView |\n\ttopView := RVMStandardSystemView new.\n\tself testState: true.\n\ttopView borderWidth:1.\n\ttopView minimumSize: 100@25.\n\ttopView maximumSize: 200@200.\n\ttopView addSubView: (self on: self label: 'test' checkState: [self testState] whenChecked: [self testState: true] whenUnchecked: [self testState: false]).\n\ttopView label: 'RVMCheckBoxView test'.\n\ttopView controller open! !\n\n!RVMCheckBoxView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 05:23'!\nexamplePoint\n\t\"RVMCheckBoxView examplePoint\"\n\t| topView model |\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\ttopView minimumSize: 100@25.\n\ttopView maximumSize: 200@200.\n\tmodel _ 0@0.\n\ttopView addSubView: (self on: model label: 'test' checkState: [model x = 1] whenChecked: [model x: 1] whenUnchecked: [model x:0]).\n\ttopView label: 'RVMCheckBoxView test'.\n\ttopView controller open! !\n\n!RVMCheckBoxView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 05:24'!\nexampleTwin\n\t\"RVMCheckBoxView exampleTwin\"\n\t\"Note we are using this class as a test model for this method.  See examplePoint for a more normal usage\"\n\t| topView v |\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\ttopView minimumSize: 100@50.\n\ttopView maximumSize: 200@200.\n\ttopView addSubView: (v _ self on: self label: 'test' checkState: [self testState] whenChecked: [self testState: true] whenUnchecked: [self testState: false]).\n\ttopView addSubView: (self on: self label: 'test' checkState: [self testState] whenChecked: [self testState: true] whenUnchecked: [self testState: false]) below: v.\n\ttopView label: 'RVMCheckBoxView test'.\n\ttopView controller open! !\n\n!RVMCheckBoxView class methodsFor: 'instance creation' stamp: 'ssa 5/12/2010 10:22'!\non: aModel label: aString checkState: getterBlock whenChecked: checkedBlock whenUnchecked: uncheckedBlock\n\n\t^self on: aModel label: aString checkState: getterBlock whenChecked: checkedBlock whenUnchecked: uncheckedBlock monitor: false! !\n\n!RVMCheckBoxView class methodsFor: 'instance creation' stamp: 'ssa 5/12/2010 10:21'!\non: aModel label: aString checkState: getterBlock whenChecked: checkedBlock whenUnchecked: uncheckedBlock monitor: updateFromRVMMonitor\n\n\t| v |\n\tv _ self new.\n\tv model: aModel.\n\tv label: aString.\n\tv checkStateAction: getterBlock.\n\tv checkAction: checkedBlock.\n\tv uncheckAction: uncheckedBlock.\n\tupdateFromRVMMonitor ifTrue:[RVMMonitor inform: v].\n\t^v! !\n\n!RVMCheckBoxView class methodsFor: 'testing' stamp: 'ssa 1/1/1970 04:22'!\ntestState\n\n\tTestState isNil ifTrue:[TestState _ true].\n\t^TestState! !\n\n!RVMCheckBoxView class methodsFor: 'testing' stamp: 'ssa 1/1/1970 04:25'!\ntestState: aValue\n\n\tTestState _ aValue.\n\tself changed:#testState! !\n\n!RVMCircularCollection methodsFor: 'add/remove elements' stamp: 'ssa 1/1/1970 00:03'!\nadd: anObject\n\t\"Add this object to my collection, increment the lastIndex, adjust if there is a rollover.\"\n\tself begin = 0 ifTrue:[ \"I have no elements, add the first one\"\n\t\tself begin:1.\n\t\tself end: 1]\n\tifFalse:[ \"I have elements, add one more and adjust if needed\"\n\t\tself numberOfElements = self size\n\t\t\tifTrue:[\"need to rollover the first element\"\n\t\t\t\tself begin = self size \"adjust begin and end\"\n\t\t\t\t\tifTrue:[self begin: 1.\n\t\t\t\t\t\tself end: self size]\n\t\t\t\t\tifFalse:[self end: self begin.\n\t\t\t\t\t\tself begin: self begin + 1]]\n\t\t\tifFalse:[\"no rollover needed\"\n\t\t\t\tself end: (self end + 1 min: self size)]].\n\tself array at: self end put: anObject.\n\tself incrementElements\n\t\t\t\t\n\t\t\t\t! !\n\n!RVMCircularCollection methodsFor: 'add/remove elements' stamp: 'ssa 1/1/1970 00:41'!\nremoveAll\n\tself begin: 0.\n\tself end: 0.\n\tself array:nil.\n\tself numberOfElements:0! !\n\n!RVMCircularCollection methodsFor: 'private' stamp: 'ssa 1/1/1970 00:53'!\narray\n\t\"Answer the value of array\"\n\n\tarray isNil ifTrue:[self array: (Array new: self size)].\n\t^ array! !\n\n!RVMCircularCollection methodsFor: 'private' stamp: 'ssa 1/1/1970 00:38'!\narray: anObject\n\t\"Set the value of array\"\n\n\tarray _ anObject! !\n\n!RVMCircularCollection methodsFor: 'private' stamp: 'ssa 1/1/1970 01:03'!\nbegin\n\t\"Answer the value of begin\"\n\n\tbegin isNil ifTrue:[self begin: 0].\n\t^ begin! !\n\n!RVMCircularCollection methodsFor: 'private' stamp: 'ssa 1/1/1970 01:02'!\nbegin: anObject\n\t\"Set the value of begin\"\n\n\tbegin _ anObject! !\n\n!RVMCircularCollection methodsFor: 'private' stamp: 'ssa 1/1/1970 00:04'!\ndecrementElements\n\n\tself numberOfElements: ((self numberOfElements - 1) max: 0)! !\n\n!RVMCircularCollection methodsFor: 'private' stamp: 'ssa 1/1/1970 01:03'!\nend\n\t\"Answer the value of end\"\n\n\tend isNil ifTrue:[self end: 0].\n\t^ end! !\n\n!RVMCircularCollection methodsFor: 'private' stamp: 'ssa 1/1/1970 01:02'!\nend: anObject\n\t\"Set the value of end\"\n\n\tend _ anObject! !\n\n!RVMCircularCollection methodsFor: 'private' stamp: 'ssa 1/1/1970 01:12'!\nincrementElements\n\n\tself numberOfElements: ((self numberOfElements + 1) min: self size)! !\n\n!RVMCircularCollection methodsFor: 'private' stamp: 'ssa 1/1/1970 01:03'!\nnumberOfElements\n\t\"Answer the value of numberOfElements\"\n\n\tnumberOfElements isNil ifTrue:[self numberOfElements: 0].\n\t^ numberOfElements! !\n\n!RVMCircularCollection methodsFor: 'private' stamp: 'ssa 1/1/1970 01:02'!\nnumberOfElements: anObject\n\t\"Set the value of numberOfElements\"\n\n\tnumberOfElements _ anObject! !\n\n!RVMCircularCollection methodsFor: 'private' stamp: 'ssa 10/18/2008 21:37'!\nrealIndexFor: index\n\t\"Answer the loop adjusted index value\"\n\t| realIndex |\n\tindex >  self size ifTrue:[realIndex _ index \\\\ self size]\n\t\t\tifFalse:[realIndex _ index].\n\trealIndex _ realIndex - 1 + self begin.\n\trealIndex > self size ifTrue:[realIndex _ realIndex - self size].\n\t^realIndex\n! !\n\n!RVMCircularCollection methodsFor: 'private' stamp: 'ssa 1/1/1970 00:52'!\nsize\n\t\"Answer the value of size\"\n\n\tsize isNil ifTrue:[self size: 10].\n\t^ size! !\n\n!RVMCircularCollection methodsFor: 'private' stamp: 'ssa 1/1/1970 00:04'!\nsize: aNumber\n\t\"Set the value of size\"\n\n\t| contents oldSize |\n\tsize = aNumber ifTrue:[^self].\n\tself isEmpty \n\t\tifTrue:[size _ aNumber.\n\t\t\tself array:nil; numberOfElements:0]\n\t\tifFalse:[contents _ self asOrderedCollection.\n\t\t\toldSize _ contents size.\n\t\t\tsize _ aNumber.\n\t\t\tself begin:0;end:0;numberOfElements:0.\n\t\t\tself array: (Array new: size).\n\t\t\t1 to: (size min: oldSize) do:[:index|\n\t\t\t\tself add: (contents at: index)]].\n\t\t! !\n\n!RVMCircularCollection methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:14'!\nat: index\n\n\t^self array at: (self realIndexFor: index)! !\n\n!RVMCircularCollection methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:15'!\nat: index put: anObject\n\n\tself array at: (self realIndexFor: index) put: anObject! !\n\n!RVMCircularCollection methodsFor: 'accessing' stamp: 'ssa 10/18/2008 22:00'!\natRandom\n\n\t^self at: self numberOfElements atRandom! !\n\n!RVMCircularCollection methodsFor: 'accessing' stamp: 'ssa 10/26/2008 15:27'!\nfirst\n\n\t^self at:1! !\n\n!RVMCircularCollection methodsFor: 'accessing' stamp: 'ssa 10/26/2008 15:28'!\nlast\n\n\t^self at:self numberOfElements! !\n\n!RVMCircularCollection methodsFor: 'accessing' stamp: 'ssa 10/18/2008 21:29'!\nnextIndex\n\t\"Answer the value of nextIndex\"\n\n\tnextIndex isNil ifTrue:[self nextIndex: 1].\n\t^ nextIndex! !\n\n!RVMCircularCollection methodsFor: 'accessing' stamp: 'ssa 10/18/2008 21:40'!\nnextIndex: anInteger\n\t\"Set the value of nextIndex\"\n\tanInteger > self size ifTrue:[^nextIndex _ 1].\n\tnextIndex _ anInteger! !\n\n!RVMCircularCollection methodsFor: 'converting' stamp: 'ssa 1/1/1970 00:40'!\nasArray\n\n\t^self asOrderedCollection asArray! !\n\n!RVMCircularCollection methodsFor: 'converting' stamp: 'ssa 10/28/2008 19:41'!\nasCircularCollection\n^self! !\n\n!RVMCircularCollection methodsFor: 'converting' stamp: 'ssa 1/1/1970 00:20'!\nasOrderedCollection\n\n\t| oc |\n\toc _ OrderedCollection new.\n\tself do:[:each| oc add: each].\n\t^oc! !\n\n!RVMCircularCollection methodsFor: 'enumerating' stamp: 'ssa 1/1/1970 00:18'!\ncollect: aBlock\n\t\"Iterate over my elements in order and answer the results\"\n\t| results |\n\tresults _ self class new: self size.\n\tself do:[:each| results add: (aBlock value: each)].\n\t^results! !\n\n!RVMCircularCollection methodsFor: 'enumerating' stamp: 'ssa 1/1/1970 00:13'!\ndo: aBlock\n\t\"Iterate over my elements in order\"\n\t1 to: self numberOfElements do:[:index|\n\t\taBlock value:(self at: index)]! !\n\n!RVMCircularCollection methodsFor: 'testing' stamp: 'ssa 5/28/2010 16:55'!\natEnd\n\t\"Acting like an infinite stream\"\n\t^false! !\n\n!RVMCircularCollection methodsFor: 'testing' stamp: 'ssa 1/1/1970 00:55'!\nisEmpty\n\n\t^self numberOfElements = 0! !\n\n!RVMCircularCollection methodsFor: 'testing' stamp: 'ssa 1/1/1970 00:55'!\nisFull\n\n\t^self numberOfElements = self size! !\n\n!RVMCircularCollection methodsFor: 'printing' stamp: 'ssa 10/3/2008 21:17'!\nprintOn: aStream\n\n\tsuper printOn: aStream.\n\taStream nextPutAll: ' size:',self size printString,' numberOfElements:',self numberOfElements printString! !\n\n!RVMCircularCollection methodsFor: 'stream emulation' stamp: 'ssa 10/18/2008 21:31'!\nnext\n\t\"Answer the next element in line, then advance the nextIndex\"\n\t| item |\n\tself isEmpty ifTrue:[self error:'Empty Collection'].\n\titem _ self at: self nextIndex.\n\tself nextIndex: self nextIndex + 1.\n\t^item! !\n\n!RVMCircularCollection class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:19'!\nnew: anInteger\n\n\t| collection |\n\tcollection _ self new.\n\tcollection size: anInteger.\n\t^collection! !\n\n!RVMCircularCollection class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:42'!\nnew: anInteger withAll: aCollection\n\n\t| collection |\n\tcollection _ self new: anInteger.\n\taCollection do:[:each| collection add: each].\n\t^collection! !\n\n!RVMCircularCollection class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:42'!\nwithAll: aCollection\n\n\t^self new: aCollection size withAll: aCollection! !\n\n!RVMCircularCollection class methodsFor: 'tests' stamp: 'ssa 1/1/1970 00:36'!\ntestAdd\n\t\"RVMCircularCollection testAdd\"\n\t\n\t| cc bag |\n\tcc _ self new: 10.\n\t5 timesRepeat:[cc add: 1].\n\tbag _ cc asOrderedCollection asBag.\n\tbag size = 5 & ((bag occurrencesOf: 1) = 5 ) ifTrue:['passed' print]ifFalse:['failed' print]! !\n\n!RVMCircularCollection class methodsFor: 'tests' stamp: 'ssa 1/1/1970 00:39'!\ntestCollect\n\t\"RVMCircularCollection testCollect\"\n\t\n\t| cc results |\n\tcc _ self new: 5.\n\t1 to: 20 do:[:each| cc add: each].\n\tresults _ cc collect:[:each|  each].\n\tresults asArray = #(16 17 18 19 20)\n\t\t ifTrue:['passed' print]ifFalse:['failed' print]! !\n\n!RVMCircularCollection class methodsFor: 'tests' stamp: 'ssa 1/1/1970 00:38'!\ntestDo\n\t\"RVMCircularCollection testDo\"\n\t\n\t| cc total |\n\tcc _ self new: 5.\n\t1 to: 20 do:[:each| cc add: each].\n\ttotal _ 0.\n\tcc do:[:each| total _ total + each].\n\ttotal = #(20 19 18 17 16) sum\n\t\t ifTrue:['passed' print]ifFalse:['failed' print]! !\n\n!RVMCircularCollection class methodsFor: 'tests' stamp: 'ssa 1/1/1970 00:54'!\ntestResize\n\t\"RVMCircularCollection testResize\"\n\t\n\t| cc |\n\tcc _ self new: 5.\n\t1 to: 20 do:[:each| cc add: each].\n\tcc size: 2.\n\tcc asArray = #(16 17)\n\t\t ifTrue:['passed' print]ifFalse:['failed' print]! !\n\n!RVMCircularCollection class methodsFor: 'tests' stamp: 'ssa 1/1/1970 00:35'!\ntestRollover\n\t\"RVMCircularCollection testRollover\"\n\t\n\t| cc |\n\tcc _ self new: 10.\n\t1 to: 20 do:[:each| cc add: each].\n\tcc asOrderedCollection asArray = #(11 12 13 14 15 16 17 18 19 20)\n\t\t ifTrue:['passed' print]ifFalse:['failed' print]! !\n\n!RVMColorButtonController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 00:50'!\ncolorFromUser\n\t\"Displays a color palette of colors, waits for a mouse click, and returns the selected color. Any pixel on the Display can be chosen, not just those in the color palette.\"\n\n\t| d startPt save tr oldColor c here s |\n\td _ Display depth.\n\t((Color colorChart == nil) or: [Color colorChart depth ~= Display depth]) \n\t\tifTrue: [Color colorChart:(Color oldColorPaletteForDepth: d extent: (2 * 144)@80)].\n\tstartPt _ Sensor cursorPoint.\n\n\tsave _ Form fromDisplay: (startPt extent: Color colorChart extent).\n\tColor colorChart displayAt: startPt.\n\ttr _ Color colorChart extent - (50@19) corner: Color colorChart extent.\n\ttr _ tr translateBy: startPt.\n\n\toldColor _ nil.\n\t[Sensor anyButtonPressed] whileTrue: [\n\t\tc _ Display colorAt: (here _ Sensor cursorPoint).\n\t\t(tr containsPoint: here)\n\t\t\tifFalse: [Display fill: (0@61+startPt extent: 20@19) fillColor: c]\n\t\t\tifTrue: [\n\t\t\t\tc _ Color transparent.\n\t\t\t\tDisplay fill: (0@61+startPt extent: 20@19) fillColor: Color white].\n\t\tc = oldColor ifFalse: [\n\t\t\tDisplay fillWhite: (20@61 + startPt extent: 135@19).\n\t\t\tc isTransparent\n\t\t\t\tifTrue: [s _ 'transparent']\n\t\t\t\tifFalse: [s _ c shortPrintString.\n\t\t\t\t\t\ts _ s copyFrom: 7 to: s size - 1].\n\t\t\ts displayAt: 20@61 + startPt.\n\t\t\toldColor _ c]].\n\tsave displayAt: startPt.\n\tSensor waitNoButton.\n\t^ c\n! !\n\n!RVMColorButtonController methodsFor: 'controlling' stamp: 'ssa 9/19/2008 11:56'!\ncontrolActivity\n\tCursor menu show.\n\tsuper controlActivity! !\n\n!RVMColorButtonController methodsFor: 'controlling' stamp: 'ssa 9/19/2008 11:56'!\ncontrolTerminate\n\tCursor normal show.\n\tsuper controlTerminate! !\n\n!RVMColorButtonController methodsFor: 'controlling' stamp: 'ssa 9/13/2008 16:06'!\nyellowButtonActivity\n\n\tview color: self colorFromUser.\n\tview display! !\n\n!RVMColorButtonView methodsFor: 'controller access' stamp: 'ssa 9/13/2008 15:58'!\ndefaultControllerClass\n\n\t^RVMColorButtonController! !\n\n!RVMColorButtonView methodsFor: 'displaying' stamp: 'ssa 10/21/2008 11:31'!\ndisplayView\n\tself uncache.\n\tDisplay fill: self insetDisplayBox fillColor: self color.\n\t\"Display border: (self insetDisplayBox insetBy: 1)width: 1 fillColor: self color negated.\"! !\n\n!RVMColorButtonView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 21:29'!\ncolor\n\t\"Answer the value of color\"\n\n\tcolor isNil ifTrue:[color_(self colorSetter isSymbol\n\t\t\t\t\t\tifTrue:[model perform: self colorGetter]\n\t\t\t\t\t\tifFalse:[self colorGetter value])].\n\t^ color! !\n\n!RVMColorButtonView methodsFor: 'accessing' stamp: 'ssa 9/17/2008 14:05'!\ncolor: anObject\n\t\"Set the value of color\"\n\n\tcolor _ anObject.\n\tself colorSetter isSymbol\n\t\tifTrue:[model perform: self colorSetter with: anObject]\n\t\tifFalse:[self colorSetter value: anObject]! !\n\n!RVMColorButtonView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 21:21'!\ncolorGetter\n\t\"Answer the value of colorGetter\"\n\n\tcolorGetter isNil ifTrue:[self colorGetter: #color].\n\t^ colorGetter! !\n\n!RVMColorButtonView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 21:20'!\ncolorGetter: anObject\n\t\"Set the value of colorGetter\"\n\n\tcolorGetter _ anObject! !\n\n!RVMColorButtonView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 21:21'!\ncolorSetter\n\t\"Answer the value of colorSetter\"\n\n\tcolorSetter isNil ifTrue:[self colorSetter: #color:].\n\t^ colorSetter! !\n\n!RVMColorButtonView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 21:20'!\ncolorSetter: anObject\n\t\"Set the value of colorSetter\"\n\n\tcolorSetter _ anObject! !\n\n!RVMColorButtonView class methodsFor: 'examples' stamp: 'ssa 9/13/2008 22:03'!\nexample\n\t\"RVMColorButtonView example\"\n\t| topView |\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\ttopView minimumSize: 50@50.\n\ttopView maximumSize: 100@100.\n\ttopView addSubView: self exampleInstance.\n\ttopView label: 'ColorButton'.\n\ttopView controller open! !\n\n!RVMColorButtonView class methodsFor: 'examples' stamp: 'ssa 9/17/2008 13:58'!\nexampleInstance\n\n\t^self on: nil colorGetter:[Color random] colorSetter:[:color| color print]! !\n\n!RVMColorButtonView class methodsFor: 'instance creation' stamp: 'ssa 9/17/2008 13:57'!\non: aModel colorGetter: getterSelector colorSetter: setterSelector\n\n\t| view |\n\tview _ self new.\n\tview model: aModel.\n\tview colorGetter: getterSelector.\n\tview colorSetter: setterSelector.\n\t^view! !\n\n!RVMColorScaleController methodsFor: 'controlling' stamp: 'ssa 11/4/2008 20:13'!\nredButtonActivity\n\tself view usesScaler ifTrue:[\n\t(self view adjustScaleBox  containsPoint: Sensor cursorPoint) ifTrue:[Sensor waitNoButton.\n\t\tself spawnScaleAdjuster]]! !\n\n!RVMColorScaleController methodsFor: 'controlling' stamp: 'ssa 5/12/2010 10:19'!\nspawnScaleAdjuster\n\n\t| scaler maxView minView topView resetScaleButton setToObservedButton autoScaleCheckBox height |\n\tscaler _ self view scaler.\n\tmaxView _ RVMValueEditorView  on: scaler valueGetter: [scaler max] valueSetter:[:v|scaler setMax:v. self view model redrawOnCanvas; displayView] label:'max: '.\n\tmaxView lockGetter:#maxLocked; lockSetter:#maxLocked:.\n\tminView _ RVMValueEditorView  on: scaler valueGetter: [scaler min] valueSetter:[:v|scaler setMin:v.  self view model redrawOnCanvas; displayView] label:'min: '.\n\tminView lockGetter:#minLocked; lockSetter:#minLocked:.\n\tresetScaleButton _ RVMButtonView label:'Reset scale to default' action:[scaler resetScaling.  self view model redrawOnCanvas; displayView].\n\tsetToObservedButton _ RVMButtonView label:'Set scale to observed values' action:[scaler setRangeToObserved.  self view model redrawOnCanvas; displayView].\n\tautoScaleCheckBox _ RVMCheckBoxView on: scaler label: 'Automatic Scaling' checkState: [scaler automaticScaling] whenChecked: [scaler automatic.  self view model redrawOnCanvas; displayView] whenUnchecked: [scaler manual. self view model redrawOnCanvas; displayView] monitor: true.\n\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\ttopView addSubView: minView.\n\ttopView addSubView: maxView below:  minView.\n\ttopView addSubView: resetScaleButton below:  maxView.\n\ttopView addSubView: setToObservedButton below:  resetScaleButton.\n\ttopView addSubView: autoScaleCheckBox below:  setToObservedButton.\n\tRVMMonitor forgetAll:{resetScaleButton. setToObservedButton. autoScaleCheckBox}.\n\ttopView label: self view aspect.\n\theight _ topView subViews size * 26.\n\ttopView minimumSize:200@height.\n\ttopView maximumSize: 200@height.\n\ttopView controller open! !\n\n!RVMColorScaleController methodsFor: 'controlling' stamp: 'ssa 5/4/2010 15:41'!\nyellowButtonActivity\n\tself spawnScaleAdjuster! !\n\n!RVMColorScaleView methodsFor: 'controller access' stamp: 'ssa 11/4/2008 14:28'!\ndefaultControllerClass\n\n\t^RVMColorScaleController! !\n\n!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 11/4/2008 14:26'!\nadjustScaleBox\n\t\"Answer the value of adjustScaleBox\"\n\n\tadjustScaleBox isNil ifTrue:[self adjustScaleBox: self insetDisplayBox].\n\t^ adjustScaleBox! !\n\n!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 11/4/2008 14:25'!\nadjustScaleBox: anObject\n\t\"Set the value of adjustScaleBox\"\n\n\tadjustScaleBox _ anObject! !\n\n!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 10/1/2008 07:42'!\naspect\n\t^self aspectSource value! !\n\n!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 10/9/2008 11:42'!\naspectLabel\n\t\"Answer the value of aspectLabel\"\n\n\taspectLabel isNil ifTrue:[self aspectLabel: (Form extent: 1@1)].\n\t^ aspectLabel! !\n\n!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 10/3/2008 19:13'!\naspectLabel: anObject\n\t\"Set the value of aspectLabel\"\n\n\taspectLabel _ anObject! !\n\n!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 10/1/2008 07:42'!\naspectSource\n\t\"Answer the value of aspectSource\"\n\n\taspectSource isNil ifTrue:[self aspectSource: [#bytesUseds]].\n\t^ aspectSource! !\n\n!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 10/1/2008 07:41'!\naspectSource: anObject\n\t\"Set the value of aspectSource\"\n\n\taspectSource _ anObject! !\n\n!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 10/1/2008 06:26'!\ncolors\n\t^self colorsSource value! !\n\n!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 10/1/2008 06:25'!\ncolorsSource\n\t\"Answer the value of colorsSource\"\n\n\tcolorsSource isNil ifTrue:[self colorsSource: [Color hotColdShades: 25]].\n\t^ colorsSource! !\n\n!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 10/1/2008 06:25'!\ncolorsSource: anObject\n\t\"Set the value of colorsSource\"\n\n\tcolorsSource _ anObject! !\n\n!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:02'!\nhorizontal\n\tself orientation:#horizontal! !\n\n!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 10/1/2008 08:27'!\norientation\n\t\"Answer the value of orientation\"\n\n\torientation isNil ifTrue:[self orientation: #vertical].\n\t^ orientation! !\n\n!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 10/1/2008 06:30'!\norientation: anObject\n\t\"Set the value of orientation\"\n\n\torientation _ anObject! !\n\n!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 10/1/2008 06:20'!\nscaler\n\t^self scalerSource value! !\n\n!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 10/1/2008 06:19'!\nscalerSource\n\t\"Answer the value of scalerSource\"\n\n\tscalerSource isNil ifTrue:[self scalerSource: [RVMDataScaler exampleInstance]].\n\t^ scalerSource! !\n\n!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 10/1/2008 06:19'!\nscalerSource: anObject\n\t\"Set the value of scalerSource\"\n\n\tscalerSource _ anObject! !\n\n!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 11/4/2008 20:11'!\nusesScaler\n\t\"Answer the value of usesScaler\"\n\n\tusesScaler isNil ifTrue:[self usesScaler: false].\n\t^ usesScaler! !\n\n!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 11/4/2008 20:11'!\nusesScaler: anObject\n\t\"Set the value of usesScaler\"\n\n\tusesScaler _ anObject! !\n\n!RVMColorScaleView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:02'!\nvertical\n\tself orientation:#vertical! !\n\n!RVMColorScaleView methodsFor: 'listening' stamp: 'ssa 1/1/1970 00:55'!\nhear: something\n\tself drawFastCanvas.\n\tself displayView! !\n\n!RVMColorScaleView methodsFor: 'drawing' stamp: 'ssa 11/4/2008 13:44'!\nadjustScaleIcon\n^((ColorForm\n\textent: 16@31\n\tdepth: 8\n\tfromArray: #( 0 0 0 0 0 0 169614364 622594560 0 0 1694498815 4294913536 0 0 1845490943 4294915840 0 0 0 3506384384 0 0 0 3506386688 73 1677721600 0 3657379328 163 3642490880 0 3506386688 9716 4287692800 172 4110364160 46591 4294913536 208 4110366464 4259839 4294936576 0 3506384384 8973264 4106150400 0 3657381632 6558618 3942664503 0 3506384384 154 3942645760 0 3657381632 154 3942645760 25700 3808374272 154 3942645760 60415 4294915840 154 3942645760 18761 3808374272 154 3942645760 0 3506386688 2424986 3942648357 0 3657379328 11304867 3947480869 0 3506386688 7798783 4294948096 0 3506384384 1300991 4294925056 217 4294915840 25855 4291821568 145 3959369216 199 4098424832 0 3657381632 118 2432696320 0 3506384384 28 620756992 0 3506386688 0 0 0 3657379328 0 0 1541003737 4110366464 0 0 1694498815 4294913536 0 0 321795886 1227753984 0 0 0 0)\n\toffset: 0@0)\n\tcolorsFromArray: #(#(1.0 1.0 1.0) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0)  ))! !\n\n!RVMColorScaleView methodsFor: 'drawing' stamp: 'ssa 11/4/2008 14:14'!\nadjustScaleIconHorizontal\n^((ColorForm\n\textent: 31@16\n\tdepth: 8\n\tfromArray: #( 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967040 4280755235 606282787 606282787 606282787 606282787 606282787 606282787 606600960 4280615169 16843009 16843009 16843009 16843009 16843009 16843009 19201792 4279173377 320014867 269488906 319427073 303237651 318837002 320014864 17760000 4280615169 4294967295 387186687 4294909697 251658239 4278852095 4294967050 19201792 4280615184 4294967295 4294967295 4294909713 251658239 4294967295 4294967050 19136256 4280615169 4294967295 4294967295 4294967295 4294967295 4294967295 4294967050 19201792 4280753933 4294967295 4294967295 4294967295 4294967295 4294967295 4294967072 522649344 4294967295 4294967295 4294967295 603979775 4294905615 4294967295 4294967295 4294967040 4294967295 4294967295 4280556050 251658239 4294911764 371261439 4294967295 4294967040 4294967295 4294967077 419496203 4294967295 4294967054 16847630 4294967295 4294967040 4294967295 4294909706 16843024 286331153 286331153 16843024 420478975 4294967040 4294967295 4294905368 268501267 202116108 202116120 16843028 505806847 4294967040 4294967295 4294967295 253100305 654311423 4294967043 17440767 4294967295 4294967040 4294967295 4294967295 4294910490 536870911 4294905623 505872383 4294967295 4294967040 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967040)\n\toffset: 0@0)\n\tcolorsFromArray: #(#(1.0 1.0 1.0) #(0.0 0.0 0.0) #(1.0 1.0 1.0) #(0.5 0.5 0.5) #(1.0 0.0 0.0) #(0.0 1.0 0.0) #(0.0 0.0 1.0) #(0.0 1.0 1.0) #(1.0 1.0 0.0) #(1.0 0.0 1.0) #(0.125 0.125 0.125) #(0.25 0.25 0.25) #(0.375 0.375 0.375) #(0.625 0.625 0.625) #(0.75 0.75 0.75) #(0.875 0.875 0.875) #(0.031 0.031 0.031) #(0.063 0.063 0.063) #(0.094 0.094 0.094) #(0.156 0.156 0.156) #(0.188 0.188 0.188) #(0.219 0.219 0.219) #(0.282 0.282 0.282) #(0.313 0.313 0.313) #(0.344 0.344 0.344) #(0.407 0.407 0.407) #(0.438 0.438 0.438) #(0.469 0.469 0.469) #(0.531 0.531 0.531) #(0.562 0.562 0.562) #(0.593 0.593 0.593) #(0.656 0.656 0.656) #(0.687 0.687 0.687) #(0.718 0.718 0.718) #(0.781 0.781 0.781) #(0.812 0.812 0.812) #(0.844 0.844 0.844) #(0.906 0.906 0.906) #(0.937 0.937 0.937) #(0.969 0.969 0.969) #(0.0 0.0 0.0) #(0.0 0.199 0.0) #(0.0 0.4 0.0) #(0.0 0.599 0.0) #(0.0 0.8 0.0) #(0.0 1.0 0.0) #(0.0 0.0 0.199) #(0.0 0.199 0.199) #(0.0 0.4 0.199) #(0.0 0.599 0.199) #(0.0 0.8 0.199) #(0.0 1.0 0.199) #(0.0 0.0 0.4) #(0.0 0.199 0.4) #(0.0 0.4 0.4) #(0.0 0.599 0.4) #(0.0 0.8 0.4) #(0.0 1.0 0.4) #(0.0 0.0 0.599) #(0.0 0.199 0.599) #(0.0 0.4 0.599) #(0.0 0.599 0.599) #(0.0 0.8 0.599) #(0.0 1.0 0.599) #(0.0 0.0 0.8) #(0.0 0.199 0.8) #(0.0 0.4 0.8) #(0.0 0.599 0.8) #(0.0 0.8 0.8) #(0.0 1.0 0.8) #(0.0 0.0 1.0) #(0.0 0.199 1.0) #(0.0 0.4 1.0) #(0.0 0.599 1.0) #(0.0 0.8 1.0) #(0.0 1.0 1.0) #(0.199 0.0 0.0) #(0.199 0.199 0.0) #(0.199 0.4 0.0) #(0.199 0.599 0.0) #(0.199 0.8 0.0) #(0.199 1.0 0.0) #(0.199 0.0 0.199) #(0.199 0.199 0.199) #(0.199 0.4 0.199) #(0.199 0.599 0.199) #(0.199 0.8 0.199) #(0.199 1.0 0.199) #(0.199 0.0 0.4) #(0.199 0.199 0.4) #(0.199 0.4 0.4) #(0.199 0.599 0.4) #(0.199 0.8 0.4) #(0.199 1.0 0.4) #(0.199 0.0 0.599) #(0.199 0.199 0.599) #(0.199 0.4 0.599) #(0.199 0.599 0.599) #(0.199 0.8 0.599) #(0.199 1.0 0.599) #(0.199 0.0 0.8) #(0.199 0.199 0.8) #(0.199 0.4 0.8) #(0.199 0.599 0.8) #(0.199 0.8 0.8) #(0.199 1.0 0.8) #(0.199 0.0 1.0) #(0.199 0.199 1.0) #(0.199 0.4 1.0) #(0.199 0.599 1.0) #(0.199 0.8 1.0) #(0.199 1.0 1.0) #(0.4 0.0 0.0) #(0.4 0.199 0.0) #(0.4 0.4 0.0) #(0.4 0.599 0.0) #(0.4 0.8 0.0) #(0.4 1.0 0.0) #(0.4 0.0 0.199) #(0.4 0.199 0.199) #(0.4 0.4 0.199) #(0.4 0.599 0.199) #(0.4 0.8 0.199) #(0.4 1.0 0.199) #(0.4 0.0 0.4) #(0.4 0.199 0.4) #(0.4 0.4 0.4) #(0.4 0.599 0.4) #(0.4 0.8 0.4) #(0.4 1.0 0.4) #(0.4 0.0 0.599) #(0.4 0.199 0.599) #(0.4 0.4 0.599) #(0.4 0.599 0.599) #(0.4 0.8 0.599) #(0.4 1.0 0.599) #(0.4 0.0 0.8) #(0.4 0.199 0.8) #(0.4 0.4 0.8) #(0.4 0.599 0.8) #(0.4 0.8 0.8) #(0.4 1.0 0.8) #(0.4 0.0 1.0) #(0.4 0.199 1.0) #(0.4 0.4 1.0) #(0.4 0.599 1.0) #(0.4 0.8 1.0) #(0.4 1.0 1.0) #(0.599 0.0 0.0) #(0.599 0.199 0.0) #(0.599 0.4 0.0) #(0.599 0.599 0.0) #(0.599 0.8 0.0) #(0.599 1.0 0.0) #(0.599 0.0 0.199) #(0.599 0.199 0.199) #(0.599 0.4 0.199) #(0.599 0.599 0.199) #(0.599 0.8 0.199) #(0.599 1.0 0.199) #(0.599 0.0 0.4) #(0.599 0.199 0.4) #(0.599 0.4 0.4) #(0.599 0.599 0.4) #(0.599 0.8 0.4) #(0.599 1.0 0.4) #(0.599 0.0 0.599) #(0.599 0.199 0.599) #(0.599 0.4 0.599) #(0.599 0.599 0.599) #(0.599 0.8 0.599) #(0.599 1.0 0.599) #(0.599 0.0 0.8) #(0.599 0.199 0.8) #(0.599 0.4 0.8) #(0.599 0.599 0.8) #(0.599 0.8 0.8) #(0.599 1.0 0.8) #(0.599 0.0 1.0) #(0.599 0.199 1.0) #(0.599 0.4 1.0) #(0.599 0.599 1.0) #(0.599 0.8 1.0) #(0.599 1.0 1.0) #(0.8 0.0 0.0) #(0.8 0.199 0.0) #(0.8 0.4 0.0) #(0.8 0.599 0.0) #(0.8 0.8 0.0) #(0.8 1.0 0.0) #(0.8 0.0 0.199) #(0.8 0.199 0.199) #(0.8 0.4 0.199) #(0.8 0.599 0.199) #(0.8 0.8 0.199) #(0.8 1.0 0.199) #(0.8 0.0 0.4) #(0.8 0.199 0.4) #(0.8 0.4 0.4) #(0.8 0.599 0.4) #(0.8 0.8 0.4) #(0.8 1.0 0.4) #(0.8 0.0 0.599) #(0.8 0.199 0.599) #(0.8 0.4 0.599) #(0.8 0.599 0.599) #(0.8 0.8 0.599) #(0.8 1.0 0.599) #(0.8 0.0 0.8) #(0.8 0.199 0.8) #(0.8 0.4 0.8) #(0.8 0.599 0.8) #(0.8 0.8 0.8) #(0.8 1.0 0.8) #(0.8 0.0 1.0) #(0.8 0.199 1.0) #(0.8 0.4 1.0) #(0.8 0.599 1.0) #(0.8 0.8 1.0) #(0.8 1.0 1.0) #(1.0 0.0 0.0) #(1.0 0.199 0.0) #(1.0 0.4 0.0) #(1.0 0.599 0.0) #(1.0 0.8 0.0) #(1.0 1.0 0.0) #(1.0 0.0 0.199) #(1.0 0.199 0.199) #(1.0 0.4 0.199) #(1.0 0.599 0.199) #(1.0 0.8 0.199) #(1.0 1.0 0.199) #(1.0 0.0 0.4) #(1.0 0.199 0.4) #(1.0 0.4 0.4) #(1.0 0.599 0.4) #(1.0 0.8 0.4) #(1.0 1.0 0.4) #(1.0 0.0 0.599) #(1.0 0.199 0.599) #(1.0 0.4 0.599) #(1.0 0.599 0.599) #(1.0 0.8 0.599) #(1.0 1.0 0.599) #(1.0 0.0 0.8) #(1.0 0.199 0.8) #(1.0 0.4 0.8) #(1.0 0.599 0.8) #(1.0 0.8 0.8) #(1.0 1.0 0.8) #(1.0 0.0 1.0) #(1.0 0.199 1.0) #(1.0 0.4 1.0) #(1.0 0.599 1.0) #(1.0 0.8 1.0) #(1.0 1.0 1.0)  ))! !\n\n!RVMColorScaleView methodsFor: 'drawing' stamp: 'ssa 1/1/1970 00:04'!\ndrawCanvas\n\tself canvas fillWhite.\n\tself orientation = #vertical\n\t\tifTrue:[self drawVertical]\n\t\tifFalse:[self drawHorizontal]! !\n\n!RVMColorScaleView methodsFor: 'drawing' stamp: 'ssa 1/1/1970 01:14'!\ndrawColorBarHorizontalIn: aRectangle\n\t| w r |\n\tw _ aRectangle width  / self colors size.\n\tr _ aRectangle origin extent: w@aRectangle height.\n\tself colors do: [:c |\n\t\tself canvas fill: r rounded fillColor: c.\n\t\tr _ r translateBy: w@0].\n! !\n\n!RVMColorScaleView methodsFor: 'drawing' stamp: 'ssa 1/1/1970 00:07'!\ndrawColorBarVerticalIn: aRectangle\n\t| h r |\n\th _ aRectangle height / self colors size.\n\tr _ aRectangle origin extent: aRectangle width@h.\n\tself colors do: [:c |\n\t\tself canvas fill: r rounded fillColor: c.\n\t\tr _ r translateBy: 0@h].\n! !\n\n!RVMColorScaleView methodsFor: 'drawing' stamp: 'ssa 1/1/1970 00:51'!\ndrawFastCanvas\n\tself orientation = #vertical\n\t\tifTrue:[self drawFastVertical]\n\t\tifFalse:[self drawFastHorizontal]! !\n\n!RVMColorScaleView methodsFor: 'drawing' stamp: 'ssa 11/4/2008 20:12'!\ndrawFastHorizontal\n\t\"Display in horizontal style, text labels only for speed\"\n\t|  maxLabel minLabel midLabel box ticLength margin  bigBox leftX midX adjustIcon loc |\n\tself aspectLabel fillWhite displayOn: self canvas.\n\tself aspectLabel:self aspect asDisplayText.\n\tmaxLabel _ self scaler max printShowingMax3Digits asDisplayText.\n\tminLabel _ self scaler min printShowingMax3Digits asDisplayText.\n\tmidLabel _ (self scaler range / 2 + self scaler min) printShowingMax3Digits asDisplayText.\n\tmaxLabel foregroundColor: Color black backgroundColor: Color transparent.\n\tmidLabel foregroundColor: Color black backgroundColor: Color transparent.\n\tminLabel foregroundColor: Color black backgroundColor: Color transparent.\n\tbigBox _ self canvas boundingBox.\n\tbox _ bigBox origin+ (0@11) corner: bigBox corner.\n\tticLength _ 4.\n\tmargin _ 2.\n\tleftX _ box topLeft x + 2.\n\tmidX _ box center x.\n\tself aspectLabel align: self aspectLabel boundingBox bottomCenter with: box bottomCenter.\n\tself aspectLabel displayOn: self canvas.\n\tmaxLabel align: maxLabel boundingBox topRight with: box topRight + (-2@ticLength+margin).\n\tmaxLabel displayOn: self canvas.\n\tmidLabel align: midLabel boundingBox topCenter with: box topCenter + (0@ticLength+margin).\n\tmidLabel displayOn: self canvas.\n\tminLabel align: minLabel boundingBox topLeft with: box topLeft +(0@ticLength+margin).\n\tminLabel displayOn: self canvas.\n\tself usesScaler ifTrue:[\n\tadjustIcon _ self adjustScaleIconHorizontal.\n\tadjustIcon displayOn: self canvas at: (loc _  ((leftX+midX//2)@(bigBox center y + 4)) - adjustIcon boundingBox center).\n\tself adjustScaleBox: (loc + self insetDisplayBox origin extent: adjustIcon  extent)]! !\n\n!RVMColorScaleView methodsFor: 'drawing' stamp: 'ssa 11/4/2008 20:12'!\ndrawFastVertical\n\t\"Display in vertical style, only the text labels for speed\"\n\t|  maxLabel minLabel midLabel box ticLength margin  bigBox eraser1 eraser2 eraser3 eraser topY midY adjustIcon loc |\n\teraser _ '           '.\n\teraser1 _ eraser asDisplayText.\n\teraser2 _ eraser asDisplayText.\n\teraser3 _ eraser asDisplayText.\n\teraser1 foregroundColor: Color white backgroundColor: Color white.\n\teraser2 foregroundColor: Color white backgroundColor: Color white.\n\teraser3 foregroundColor: Color white backgroundColor: Color white.\n\tself aspectLabel fillWhite displayOn: self canvas.\n\tself aspectLabel:(self aspect asDisplayText asParagraph asForm rotateBy: #left centerAt: 0@0).\n\tmaxLabel _ self scaler max printShowingMax3Digits asDisplayText.\n\tminLabel _ self scaler min printShowingMax3Digits asDisplayText.\t\n\tmidLabel _ (self scaler range / 2 + self scaler min) printShowingMax3Digits asDisplayText.\n\tmaxLabel foregroundColor: Color black backgroundColor: Color transparent.\n\tmidLabel foregroundColor: Color black backgroundColor: Color transparent.\n\tminLabel foregroundColor: Color black backgroundColor: Color transparent.\n\tbigBox _ self canvas boundingBox.\n\tbox _ bigBox origin + (self aspectLabel width@0)  extent: 40@bigBox height.\n\tticLength _ 4.\n\tmargin _ 2.\n\ttopY _ box topRight y + 2 .\n\tmidY _ box center y.\n\tself aspectLabel align: self  aspectLabel boundingBox leftCenter with: bigBox leftCenter.\n\tself aspectLabel displayOn: self canvas.\n\teraser1 align: eraser1 boundingBox topRight with: box topRight - (ticLength+margin+1@0).\n\teraser1 displayOn: self canvas.\n\tmaxLabel align: maxLabel boundingBox topRight with: box topRight - (ticLength+margin+1@0).\n\tmaxLabel displayOn: self canvas.\n\teraser2 align: eraser2 boundingBox rightCenter with: box rightCenter - (ticLength+margin+1@0).\n\teraser2 displayOn: self canvas.\n\tmidLabel align: midLabel boundingBox rightCenter with: box rightCenter - (ticLength+margin+1@0).\n\tmidLabel displayOn: self canvas.\n\teraser3 align: eraser3 boundingBox bottomRight with: box bottomRight -(ticLength+margin+1@0).\n\teraser3 displayOn: self canvas.\n\tminLabel align: minLabel boundingBox bottomRight with: box bottomRight -(ticLength+margin+1@0).\n\tminLabel displayOn: self canvas.\n\tself usesScaler ifTrue:[\n\tadjustIcon _ self adjustScaleIcon.\n\tadjustIcon displayOn: self canvas at: (loc _ (bigBox topCenter x @ (topY+midY//2)) - adjustIcon boundingBox center).\n\tself adjustScaleBox: (loc + self insetDisplayBox origin extent: adjustIcon  extent)]! !\n\n!RVMColorScaleView methodsFor: 'drawing' stamp: 'ssa 11/4/2008 20:12'!\ndrawHorizontal\n\t\"Display in horizontal style\"\n\t|  maxLabel minLabel midLabel box ticLength margin  topY leftX rightX bigBox midX adjustIcon loc |\n\tself aspectLabel asParagraph asForm  fillWhite displayOn: self canvas.\n\tself aspectLabel:self aspect asDisplayText.\n\tmaxLabel _ self scaler max printShowingMax3Digits asDisplayText.\n\tminLabel _ self scaler min printShowingMax3Digits asDisplayText.\n\tmidLabel _ (self scaler range / 2 + self scaler min) printShowingMax3Digits asDisplayText.\n\tmaxLabel foregroundColor: Color black backgroundColor: Color transparent.\n\tmidLabel foregroundColor: Color black backgroundColor: Color transparent.\n\tminLabel foregroundColor: Color black backgroundColor: Color transparent.\n\tbigBox _ self canvas boundingBox.\n\tbox _ bigBox origin+ (0@11) corner: bigBox corner.\n\tself drawColorBarHorizontalIn: (bigBox origin + (0@1) extent:  bigBox width@10).\n\tticLength _ 4.\n\tmargin _ 2.\n\tself aspectLabel align: self aspectLabel boundingBox bottomCenter with: box bottomCenter.\n\tself aspectLabel displayOn: self canvas.\n\tmaxLabel align: maxLabel boundingBox topRight with: box topRight + (-2@ticLength+margin).\n\tmaxLabel displayOn: self canvas.\n\tmidLabel align: midLabel boundingBox topCenter with: box topCenter + (0@ticLength+margin).\n\tmidLabel displayOn: self canvas.\n\tminLabel align: minLabel boundingBox topLeft with: box topLeft +(0@ticLength+margin).\n\tminLabel displayOn: self canvas.\n\tleftX _ box topLeft x + 2.\n\tmidX _ box center x.\n\trightX _ box topRight x - 2.\n\ttopY _ box topRight y  + margin.\n\tself canvas fill: (leftX@topY corner: rightX @(topY+1)) fillColor: Color black.\t\n\tself canvas fill: (leftX@topY extent: 1@ticLength) fillColor: Color black.\n\tself canvas fill: (midX+leftX//2@topY extent: 1@ticLength) fillColor: Color black.\n\tself canvas fill: (midX@topY extent: 1@ticLength) fillColor: Color black.\n\tself canvas fill: (midX+rightX//2@topY extent: 1@ticLength) fillColor: Color black.\n\tself canvas fill: (rightX@topY extent: 1@ticLength) fillColor: Color black.\n\tself usesScaler ifTrue:[\n\tadjustIcon _ self adjustScaleIconHorizontal.\n\tadjustIcon displayOn: self canvas at: (loc _  ((leftX+midX//2)@(bigBox center y + 4)) - adjustIcon boundingBox center).\n\t\n\tself adjustScaleBox: (loc + self insetDisplayBox origin extent: adjustIcon  extent)]! !\n\n!RVMColorScaleView methodsFor: 'drawing' stamp: 'ssa 11/4/2008 20:12'!\ndrawVertical\n\t\"Display in vertical style\"\n\t|  maxLabel minLabel midLabel box ticLength margin  topY midY bottomY leftX rightX bigBox adjustIcon loc |\n\tself aspectLabel fillWhite displayOn: self canvas.\n\tself aspectLabel:(self aspect asDisplayText asParagraph asForm rotateBy: #left centerAt: 0@0).\n\tmaxLabel _ self scaler max printShowingMax3Digits asDisplayText.\n\tminLabel _ self scaler min printShowingMax3Digits asDisplayText.\t\n\tmidLabel _ (self scaler range / 2 + self scaler min) printShowingMax3Digits asDisplayText.\n\tmaxLabel foregroundColor: Color black backgroundColor: Color transparent.\n\tmidLabel foregroundColor: Color black backgroundColor: Color transparent.\n\tminLabel foregroundColor: Color black backgroundColor: Color transparent.\n\tbigBox _ self canvas boundingBox.\n\tbox _ bigBox origin + (aspectLabel width@0)  extent: 40@bigBox height.\n\tself drawColorBarVerticalIn: (box topRight extent:  10@bigBox height).\n\tticLength _ 4.\n\tmargin _ 2.\n\tself aspectLabel align: self aspectLabel boundingBox leftCenter with: bigBox leftCenter.\n\tself aspectLabel displayOn: self canvas.\n\tmaxLabel align: maxLabel boundingBox topRight with: box topRight - (ticLength+margin+1@0).\n\tmaxLabel displayOn: self canvas.\n\tmidLabel align: midLabel boundingBox rightCenter with: box rightCenter - (ticLength+margin+1@0).\n\tmidLabel displayOn: self canvas.\n\tminLabel align: minLabel boundingBox bottomRight with: box bottomRight -(ticLength+margin+1@0).\n\tminLabel displayOn: self canvas.\n\ttopY _ box topRight y + 2 .\n\tmidY _ box center y.\n\tbottomY _ box bottomRight y - 3.\n\tleftX _ box topRight x - ticLength - margin.\n\trightX _ box corner x - margin.\n\tself canvas fill: (rightX - 1@topY corner: rightX@bottomY) fillColor: Color black.\t\n\tself canvas fill: (leftX@topY extent: ticLength@1) fillColor: Color black.\n\tself canvas fill: (leftX@(topY+midY//2) extent: ticLength@1) fillColor: Color black.\n\tself canvas fill: (leftX@midY extent: ticLength@1) fillColor: Color black.\n\tself canvas fill: (leftX@(midY+bottomY//2) extent: ticLength@1) fillColor: Color black.\n\tself canvas fill: (leftX@bottomY extent: ticLength@1) fillColor: Color black.\n\tself usesScaler ifTrue:[\n\tadjustIcon _ self adjustScaleIcon.\n\tadjustIcon displayOn: self canvas at: (loc _( bigBox topCenter x @ (topY+midY//2)) - adjustIcon boundingBox center).\n\tself adjustScaleBox: (loc + self insetDisplayBox origin extent: adjustIcon  extent)]! !\n\n!RVMColorScaleView methodsFor: 'framing' stamp: 'ssa 1/1/1970 01:30'!\nnewFrame\n\tself canvas: nil.\n\tself extent: self insetDisplayBox extent.\n\tself drawCanvas.\n\tself displayView! !\n\n!RVMColorScaleView class methodsFor: 'instance creation' stamp: 'ssa 11/4/2008 20:16'!\naspectSource: aspectBlock scalerSource: aBlock colorsSource: colorBlock orientation: aSymbol forView: aView adjustScaler: aBoolean\n\t\"Answer a new view.  Use these blocks to access the scaler and colors it will need to display.\n\tOrientation is #vertical or #horizontal\"\n\t| v |\n\tv _ self new.\n\tv aspectSource: aspectBlock.\n\tv scalerSource: aBlock.\n\tv colorsSource: colorBlock.\n\tv orientation: aSymbol.\n\tv model: aView.\n\tv usesScaler: aBoolean.\n\t^v! !\n\n!RVMColorScaleView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:02'!\nexampleHorizontal\n\t\"RVMColorScaleView exampleHorizontal\"\n\tself new horizontal demo! !\n\n!RVMColorScaleView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:03'!\nexampleVertical\n\t\"RVMColorScaleView exampleVertical\"\n\tself new vertical demo! !\n\n!RVMColoredDataScaler methodsFor: 'privatizing' stamp: 'ssa 9/17/2008 13:01'!\nprivatize\n\t\"Install a copy of my current scaler so changes to it won't effect others.\"\n\tself scaler: self scaler deepCopy! !\n\n!RVMColoredDataScaler methodsFor: 'accessing' stamp: 'ssa 9/17/2008 12:56'!\naspect\n\n\t^self scaler aspect! !\n\n!RVMColoredDataScaler methodsFor: 'accessing' stamp: 'ssa 9/17/2008 14:22'!\naspect: aSymbol\n\t\"Swap in a new default scaler for this aspect if different from my current aspect.\"\n\n\t| defaultScaler |\n\taSymbol == self aspect ifTrue:[^self].  \"no need to change\"\n\tdefaultScaler _ RVMMonitor scalerFor: aSymbol.\n\tself scaler: defaultScaler  \"use the shared scaler until user asks for private copy\".\n! !\n\n!RVMColoredDataScaler methodsFor: 'accessing' stamp: 'ssa 9/13/2008 22:22'!\ncolor\n\t\"Answer the value of color\"\n\n\tcolor isNil ifTrue:[self color: Color blue].\n\t^ color! !\n\n!RVMColoredDataScaler methodsFor: 'accessing' stamp: 'ssa 9/13/2008 22:22'!\ncolor: anObject\n\t\"Set the value of color\"\n\n\tcolor _ anObject! !\n\n!RVMColoredDataScaler methodsFor: 'accessing' stamp: 'ssa 9/17/2008 14:23'!\nlastObserved\n\n\t^self scaler lastObserved! !\n\n!RVMColoredDataScaler methodsFor: 'accessing' stamp: 'ssa 9/17/2008 13:02'!\nmax\n\n\t^self scaler max! !\n\n!RVMColoredDataScaler methodsFor: 'accessing' stamp: 'ssa 9/17/2008 13:02'!\nmax: aValue\n\n\t^self scaler max: aValue! !\n\n!RVMColoredDataScaler methodsFor: 'accessing' stamp: 'ssa 9/17/2008 13:02'!\nmin\n\n\t^self scaler min! !\n\n!RVMColoredDataScaler methodsFor: 'accessing' stamp: 'ssa 9/17/2008 13:02'!\nmin: aValue\n\n\t^self scaler min: aValue! !\n\n!RVMColoredDataScaler methodsFor: 'accessing' stamp: 'ssa 9/17/2008 14:24'!\nscale: someData\n\n\t^self scaler scale: someData! !\n\n!RVMColoredDataScaler methodsFor: 'accessing' stamp: 'ssa 9/13/2008 22:35'!\nscaler\n\t\"Answer the value of scaler\"\n\n\tscaler isNil ifTrue:[self scaler: RVMDataScaler exampleInstance].\n\t^ scaler! !\n\n!RVMColoredDataScaler methodsFor: 'accessing' stamp: 'ssa 9/13/2008 22:35'!\nscaler: anObject\n\t\"Set the value of scaler\"\n\n\tscaler _ anObject! !\n\n!RVMColoredDataScaler methodsFor: 'user interface' stamp: 'ssa 9/17/2008 13:05'!\nopen\n\n\tRVMColoredDataScalerView openOn: self.\n! !\n\n!RVMColoredDataScaler methodsFor: 'delegation' stamp: 'ssa 9/17/2008 13:03'!\ndoesNotUnderstand: aMessage\n\t\"See if my scaler understands it.\"\n\tTranscript cr;show:'delegating: ',aMessage printString.\n\t^self scaler perform: aMessage selector withArguments: aMessage arguments! !\n\n!RVMColoredDataScaler class methodsFor: 'instance creation' stamp: 'ssa 9/19/2008 12:35'!\naspect: aSymbol \n\t^self aspect: aSymbol color: Color random! !\n\n!RVMColoredDataScaler class methodsFor: 'instance creation' stamp: 'ssa 9/14/2008 20:58'!\naspect: aSymbol color: aColor\n\n\t| scaler |\n\tscaler _ self new.\n\tscaler scaler: (RVMMonitor scalerFor: aSymbol).\n\tscaler color: aColor.\n\t^scaler! !\n\n!RVMColoredDataScaler class methodsFor: 'instance creation' stamp: 'ssa 9/13/2008 22:37'!\naspect: aSymbol min: minValue max: maxValue color: aColor\n\n\t| scaler |\n\tscaler _ self aspect: aSymbol min: minValue max: maxValue.\n\tscaler color: aColor.\n\t^scaler! !\n\n!RVMColoredDataScaler class methodsFor: 'examples' stamp: 'ssa 9/17/2008 14:03'!\nexampleInstance\n\t| cs |\n\tcs _ self new.\n\tcs scaler:RVMDataScaler exampleInstance.\n\tcs color: Color blue.\n\t^cs! !\n\n!RVMColoredDataScalerView methodsFor: 'subView access' stamp: 'ssa 9/17/2008 13:30'!\naspectView\n\t\"Answer a subview on my aspect, the symbol name for the aspect of the data sample I am scaling\"\n\t^RVMAspectLabelView on: self model \n\t\tgetAllAspectsWith: [RVMMulticoreSample aspects] \n\t\tgetCurrentAspectWith: #aspect \n\t\tsetNewAspectWith: #aspect:.! !\n\n!RVMColoredDataScalerView methodsFor: 'subView access' stamp: 'ssa 1/1/1970 01:02'!\nautoscaleHardenView\n\t\"Answer a subview showing the autoscale/harden/privatize buttons\"\n\t| view autoscaleButton hardenButton privatizeButton |\n\tview _ RVMView new.\n\tautoscaleButton _ RVMButtonView label:'A' style:#action action:[self model scaler setRangeToObserved].\n\thardenButton _ RVMButtonView label:'H' style:#action action:[self model scaler harden].\n\tprivatizeButton _ RVMButtonView label:'P' style:#action action:[self model privatize].\n\tview addSubView: autoscaleButton.\n\tview addSubView: hardenButton below: autoscaleButton.\n\tview addSubView: privatizeButton below: hardenButton.\n\t^view! !\n\n!RVMColoredDataScalerView methodsFor: 'subView access' stamp: 'ssa 9/17/2008 13:59'!\ncolorButton\n\t\"Answer a subview that shows the color to use to display my data\"\n\t^RVMColorButtonView on: self model \n\t\tcolorGetter:#color\n\t\tcolorSetter: #color:! !\n\n!RVMColoredDataScalerView methodsFor: 'subView access' stamp: 'ssa 1/1/1970 01:16'!\ninitializeSubViews\n\t\"Add the subviews required to provide a UI for my model, a ColoredDataScaler.\"\n\tself addSubView: self aspectView in: (0@0 extent: 5/10 @ (1/2)) borderWidth:0.\n\tself addSubView: self valueView in: (0@(1/2 )extent: 5/10 @ (1/2)) borderWidth:0.\n\tself addSubView: self autoscaleHardenView  in: (5/10@0 extent: 1/10@1) borderWidth:0.\n\tself addSubView: self minMaxView  in: (6/10@0 extent: 4/10@1) borderWidth:1.\n! !\n\n!RVMColoredDataScalerView methodsFor: 'subView access' stamp: 'ssa 9/17/2008 14:00'!\nminMaxView\n\t\"Answer a subview showing the min/max settings for the data sample I am scaling\"\n\t^RVMMinMaxView on: self model getMin: #min setMin: #min: getMax: #max setMax: #max:! !\n\n!RVMColoredDataScalerView methodsFor: 'subView access' stamp: 'ssa 9/17/2008 13:56'!\nvalueView\n\t\"Answer a subview that will show the last observed value\"\n\t^RVMValueView on: self model valueGetterOnly:#lastObserved! !\n\n!RVMColoredDataScalerView methodsFor: 'model access' stamp: 'ssa 9/17/2008 13:09'!\nmodel: aColoredDataScaler\n\t\"Set my model and initialize my subviews\"\n\tsuper model: aColoredDataScaler.\n\tself initializeSubViews! !\n\n!RVMColoredDataScalerView class methodsFor: 'instance creation' stamp: 'ssa 9/17/2008 13:07'!\non: aColoredDataScaler\n\t\"Answer a new view on this scaler\"\n\t| view |\n\tview _ self new.\n\tview model: aColoredDataScaler.\n\t^view! !\n\n!RVMColoredDataScalerView class methodsFor: 'instance creation' stamp: 'ssa 9/19/2008 12:37'!\nonAspect: aSymbol\n\t^self on: (RVMColoredDataScaler aspect: aSymbol)! !\n\n!RVMColoredDataScalerView class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 01:17'!\nopenOn: aColoredDataScaler\n\t\"RVMColoredDataScalerView openOn: RVMColoredDataScaler exampleInstance\"\n\t\"Open a new view on this scaler\"\n\t| topView |\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\ttopView minimumSize: 200@40.\n\ttopView maximumSize: 300@80.\n\ttopView addSubView: (self on: aColoredDataScaler).\n\ttopView label: 'Aspect Data Scaler'.\n\ttopView controller open! !\n\n!RVMColoredDataScalerView class methodsFor: 'instance creation' stamp: 'ssa 9/19/2008 12:35'!\nopenOnAspect: aSymbol\n\t\"RVMColoredDataScalerView openOnAspect:#bytesUsed\"\n\tself openOn: (RVMColoredDataScaler aspect: aSymbol)! !\n\n!RVMCoreAspectTrace methodsFor: 'accessing' stamp: 'ssa 10/3/2008 23:21'!\naspectLabel\n\n\t^'#',self coreIndex printString,' ',self aspect! !\n\n!RVMCoreAspectTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:27'!\ncoreIndex\n\t\"Answer the value of coreIndex\"\n\n\tcoreIndex isNil ifTrue:[self coreIndex: 1].\n\t^ coreIndex! !\n\n!RVMCoreAspectTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:27'!\ncoreIndex: anObject\n\t\"Set the value of coreIndex\"\n\n\tcoreIndex _ anObject! !\n\n!RVMCoreAspectTrace methodsFor: 'updating' stamp: 'ssa 11/17/2008 17:09'!\naddData\n\t\"Assume a multi valued data source\"\n\tself add:((RVMMonitor lastSample perform: self aspect) at: self coreIndex + 1)! !\n\n!RVMCoreAspectTrace methodsFor: 'user interface' stamp: 'ssa 1/1/1970 00:46'!\nallView\n\t\"Answer a view showing my color and aspect\"\n\t| view |\n\tview _ RVMView new.\n\tview model: self.\n\tview addSubView: self  muteButton in: (0@0 extent: (1/10) @ 1) borderWidth:1.\n\tview addSubView: self  coreIndexButton in: (1/10@0 extent: (1/10) @ 1) borderWidth:1.\n\tview addSubView: self  colorButton in: (2/10@0 extent: (1/10) @ 1) borderWidth:1.\n\tview addSubView: self aspectButton in: ((3/10)@0 extent: (7/10) @ 1) borderWidth:1.\n\t^view! !\n\n!RVMCoreAspectTrace methodsFor: 'user interface' stamp: 'ssa 1/1/1970 00:20'!\naspectButton\n\t\"Answer an aspect button connect to my aspect\"\n\t^RVMAspectLabelView on: self \n\t\tgetAllAspectsWith: [RVMMulticoreSample coreAspects] \n\t\tgetCurrentAspectWith: #aspect \n\t\tsetNewAspectWith: #aspect:.! !\n\n!RVMCoreAspectTrace methodsFor: 'user interface' stamp: 'ssa 1/1/1970 00:34'!\ncoreIndexButton\n\t\"Answer an aspect button connect to my aspect\"\n\t^RVMCoreIndexView on: self \n\t\tgetCoreIndex:#coreIndex\n\t\tsetCoreIndex: #coreIndex:\n\t\tgetAvailableIndicies: [RVMMonitor lastSample  groupStats groupSize]! !\n\n!RVMCoreAspectTrace class methodsFor: 'common uses' stamp: 'ssa 1/1/1970 01:14'!\nmonitorAllCoreAspectsForCore: anInteger\n\t\"RVMCoreAspectTrace monitorAllCoreAspectsForCore: 1\"\n\t\n\t| traces colors |\n\tcolors _ (Color wheel: RVMMulticoreSample coreAspects size saturation: 1.0 brightness: 0.7) readStream.\n\ttraces _ OrderedCollection new.\n\tRVMMulticoreSample coreAspects do:[:aspect|\n\t\ttraces add:(self coreIndex: anInteger aspect: aspect size: 100 color: colors next)].\n\tRVMStripChartView openOnTraces: traces titled:'All core aspects for core #',anInteger printString! !\n\n!RVMCoreAspectTrace class methodsFor: 'common uses' stamp: 'ssa 1/1/1970 00:21'!\nmonitorAllCoreAspectsForCoreFromUser\n\t\"RVMCoreAspectTrace monitorAllCoreAspectsForCoreFromUser\"\n\t\n\t\n\tself monitorAllCoreAspectsForCore: RVMMonitor coreIndexFromUser! !\n\n!RVMCoreAspectTrace class methodsFor: 'common uses' stamp: 'ssa 1/1/1970 01:21'!\nmonitorAspects: someAspects forCore: anInteger\n\t\"RVMCoreAspectTrace monitorAspects: #(bytecodeCounts bytesUseds) forCore:  1\"\n\t\n\t| traces colors |\n\tcolors _ (Color wheel: someAspects size saturation: 1.0 brightness: 0.7) readStream.\n\ttraces _ OrderedCollection new.\n\tsomeAspects do:[:aspect|\n\t\ttraces add:(self coreIndex: anInteger aspect: aspect size: 100 color: colors next)].\n\tRVMStripChartView openOnTraces: traces titled:'Selected aspects for core #',anInteger printString! !\n\n!RVMCoreAspectTrace class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 01:32'!\ncoreIndex: anIndex aspect: aSymbol size: anInteger color: aColor\n\n\t| trace |\n\ttrace _ self aspect: aSymbol size: anInteger color: aColor.\n\ttrace coreIndex: anIndex.\n\t^trace! !\n\n!RVMCoreAspectTrace class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:44'!\nexampleInstance\n\t\"RVMCoreAspectTrace exampleInstance\"\n\t^self coreIndex: 1 aspect: #bytesUseds size: 100 color: Color blue! !\n\n!RVMCoreAspectTrace class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:16'!\nexampleView1\n\t\"RVMCoreAspectTrace exampleView1\"\n\t\n\tRVMStripChartView openOnTrace: self exampleInstance! !\n\n!RVMCoreAspectTrace class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:24'!\nexampleView2\n\t\"RVMCoreAspectTrace exampleView2\"\n\t\n\t| traces |\n\ttraces _ OrderedCollection new.\n\ttraces add:(self coreIndex: 1 aspect: #bytecodeCounts size: 200 color: Color blue).\n\ttraces add:(self coreIndex: 1 aspect: #bytesUseds size: 200 color: Color red).\n\ttraces add:(self coreIndex: 1 aspect: #yieldCounts size: 200 color: Color green).\n\tRVMStripChartView openOnTraces: traces! !\n\n!RVMCoreAspectTrace class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:07'!\nexampleView3\n\t\"RVMCoreAspectTrace exampleView3\"\n\t\n\t| traces |\n\ttraces _ OrderedCollection new.\n\t1 to:  4 do:[:core|\n\t\ttraces add:(self coreIndex: core aspect: #bytecodeCounts size: 100 color: Color random).\n\t\ttraces add:(self coreIndex: core aspect: #bytesUseds size: 100 color: Color random).\n\t\ttraces add:(self coreIndex: core aspect: #yieldCounts size: 100 color: Color random)].\n\tRVMStripChartView openOnTraces: traces! !\n\n!RVMCoreAspectTrace class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:38'!\nexampleView4\n\t\"RVMCoreAspectTrace exampleView4\"\n\t\n\tself exampleInstance aspectColorView demo! !\n\n!RVMCoreAspectTrace class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:36'!\nexampleView5\n\t\"RVMCoreAspectTrace exampleView5\"\n\t\n\tself exampleInstance allView demo! !\n\n!RVMCoreAspectTrace class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:06'!\nexampleView6\n\t\"RVMCoreAspectTrace exampleView6\"\n\t\n\t| traces |\n\ttraces _ OrderedCollection new.\n\t1 to: 10 do:[:core|\n\t\ttraces add:(self coreIndex: core aspect: #bytecodeCounts size: 100 color: Color random).\n\t\ttraces add:(self coreIndex: core aspect: #bytesUseds size: 100 color: Color random).\n\t\ttraces add:(self coreIndex: core aspect: #yieldCounts size: 100 color: Color random)].\n\tRVMStripChartView openOnTraces: traces! !\n\n!RVMCoreAspectTrace class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:09'!\nexampleView7\n\t\"RVMCoreAspectTrace exampleView7\"\n\t\n\t| traces |\n\ttraces _ OrderedCollection new.\n\tRVMMulticoreSample coreAspects do:[:aspect|\n\t\ttraces add:(self coreIndex: 1 aspect: aspect size: 100 color: Color random)].\n\tRVMStripChartView openOnTraces: traces! !\n\n!RVMCoreIndexController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 00:14'!\ncontrolActivity\n\tCursor menu show.\n\tsuper controlActivity! !\n\n!RVMCoreIndexController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 00:14'!\ncontrolTerminate\n\tCursor normal show.\n\tsuper controlTerminate! !\n\n!RVMCoreIndexController methodsFor: 'controlling' stamp: 'ssa 11/17/2008 17:10'!\nyellowButtonActivity\n\n\t| currentIndex maxIndex newIndex |\n\tcurrentIndex _ self view coreIndex.\n\tmaxIndex _ self view availableIndicies.\n\t[newIndex _ FillInTheBlank request:'Enter a new core index between 0 and ',(maxIndex - 1)printString,':' initialAnswer: currentIndex printString.\n\t(newIndex isEmpty or:[(newIndex asNumber between: 0 and: maxIndex - 1) not])] whileTrue.\n\tnewIndex asNumber = currentIndex ifTrue:[^self].\n\tself view coreIndex: newIndex asNumber.\n\tself view displayView\n\t! !\n\n!RVMCoreIndexView methodsFor: 'displaying' stamp: 'ssa 11/16/2008 00:36'!\ndisplayView\n\t| labelRect labelText labelForm |\n\tself okToDisplay ifFalse:[^self].\n\tself uncache.\n\tlabelText := self label asDisplayText.\n\tlabelText foregroundColor: self foregroundColor\n\t\t\tbackgroundColor: self backgroundColor.\n\tlabelForm := labelText\n\t\t\t asParagraph asForm scaledToSize:(self insetDisplayBox extent min: labelText boundingBox extent).\n\tlabelRect := self insetDisplayBox.\n\tDisplay fill: labelRect fillColor: self backgroundColor.\t\n\tlabelForm displayOn: Display at: labelRect center - labelForm boundingBox center clippingBox: labelRect\n\t\t\trule: Form paint fillColor: nil.\n\t\"Display border: (self insetDisplayBox insetBy: 1)width: 1 fillColor: self backgroundColor negated.\"\n! !\n\n!RVMCoreIndexView methodsFor: 'controller access' stamp: 'ssa 1/1/1970 00:14'!\ndefaultControllerClass\n\n\t^RVMCoreIndexController! !\n\n!RVMCoreIndexView methodsFor: 'updating' stamp: 'ssa 11/16/2008 00:24'!\nhear: something\n\n\tself displayView! !\n\n!RVMCoreIndexView methodsFor: 'updating' stamp: 'ssa 1/1/1970 00:12'!\nupdate: aSymbol\n\n\taSymbol  = self getCoreIndex ifTrue:[self displayView ].\n\tsuper update: aSymbol! !\n\n!RVMCoreIndexView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:18'!\navailableIndicies\n\t\"Answer the number of indices available\"\n\t^self getAvailableIndicies isSymbol \n\t\tifTrue:[self model perform: self getAvailableIndicies]\n\t\tifFalse:[\"assume a block\"\n\t\t\tself getAvailableIndicies value]! !\n\n!RVMCoreIndexView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:11'!\ncoreIndex\n\n\t^self getCoreIndex isSymbol \n\t\tifTrue:[self model perform: self getCoreIndex]\n\t\tifFalse:[\"assume a block\"\n\t\t\tself getCoreIndex value]! !\n\n!RVMCoreIndexView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:11'!\ncoreIndex: aValue\n\tself setCoreIndex isSymbol\n\t\tifTrue:[self model perform: self setCoreIndex with: aValue]\n\t\tifFalse:[\"assume a block\"\n\t\t\tself setCoreIndex value: aValue].\n! !\n\n!RVMCoreIndexView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:18'!\ngetAvailableIndicies\n\t\"Answer the value of getAvailableIndicies\"\n\n\tgetAvailableIndicies isNil ifTrue:[self getAvailableIndicies: [RVMMonitor lastSample  groupStats groupSize]].\n\t^ getAvailableIndicies! !\n\n!RVMCoreIndexView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:17'!\ngetAvailableIndicies: anObject\n\t\"Set the value of getAvailableIndicies\"\n\n\tgetAvailableIndicies _ anObject! !\n\n!RVMCoreIndexView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:07'!\ngetCoreIndex\n\t\"Answer the value of getCoreIndex\"\n\n\tgetCoreIndex isNil ifTrue:[self getCoreIndex: #coreIndex].\n\t^ getCoreIndex! !\n\n!RVMCoreIndexView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:06'!\ngetCoreIndex: anObject\n\t\"Set the value of getCoreIndex\"\n\n\tgetCoreIndex _ anObject! !\n\n!RVMCoreIndexView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:31'!\nlabel\n\n\t^self coreIndex printString! !\n\n!RVMCoreIndexView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:07'!\nsetCoreIndex\n\t\"Answer the value of setCoreIndex\"\n\n\tsetCoreIndex isNil ifTrue:[self setCoreIndex: #coreIndex:].\n\t^ setCoreIndex! !\n\n!RVMCoreIndexView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:06'!\nsetCoreIndex: anObject\n\t\"Set the value of setCoreIndex\"\n\n\tsetCoreIndex _ anObject! !\n\n!RVMCoreIndexView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:30'!\nexample\n\t\"RVMCoreIndexView example\"\n\tself exampleInstance demo! !\n\n!RVMCoreIndexView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:30'!\nexampleInstance\n\t\"RVMCoreIndexView exampleInstance\"\n\t^self on: RVMCoreAspectTrace exampleInstance\n\t\tgetCoreIndex:#coreIndex\n\t\tsetCoreIndex: #coreIndex:\n\t\tgetAvailableIndicies: [RVMMonitor lastSample  groupStats groupSize]! !\n\n!RVMCoreIndexView class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:28'!\non: aModel getCoreIndex: getter setCoreIndex: setter getAvailableIndicies: maxIndexGetter\n\n\t| view |\n\tview _ self new.\n\tview model: aModel;\n\t\tgetCoreIndex: getter;\n\t\tsetCoreIndex: setter;\n\t\tgetAvailableIndicies: maxIndexGetter.\n\t^view! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\naboutToWriteReadMostlyMemoryMessage\n\t\"Answer the tally for this message.\"\n\t^aboutToWriteReadMostlyMemoryMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\naboutToWriteReadMostlyMemoryMessage: aValue\n\t\"Answer the tally for this message.\"\n\taboutToWriteReadMostlyMemoryMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\naboutToWriteReadMostlyMemoryResponse\n\t\"Answer the tally for this message.\"\n\t^aboutToWriteReadMostlyMemoryResponse! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\naboutToWriteReadMostlyMemoryResponse: aValue\n\t\"Answer the tally for this message.\"\n\taboutToWriteReadMostlyMemoryResponse _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\naddObjectFromSnapshotMessage\n\t\"Answer the tally for this message.\"\n\t^addObjectFromSnapshotMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\naddObjectFromSnapshotMessage: aValue\n\t\"Answer the tally for this message.\"\n\taddObjectFromSnapshotMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\nallocateOrRecycleContextJustTestingMessage\n\t\"Answer the tally for this message.\"\n\t^allocateOrRecycleContextJustTestingMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\nallocateOrRecycleContextJustTestingMessage: aValue\n\t\"Answer the tally for this message.\"\n\tallocateOrRecycleContextJustTestingMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\nallocateOrRecycleContextMessage\n\t\"Answer the tally for this message.\"\n\t^allocateOrRecycleContextMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\nallocateOrRecycleContextMessage: aValue\n\t\"Answer the tally for this message.\"\n\tallocateOrRecycleContextMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nbroadcastInterpreterBoolMessage\n\t\"Answer the tally for this message.\"\n\t^broadcastInterpreterBoolMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nbroadcastInterpreterBoolMessage: aValue\n\t\"Answer the tally for this message.\"\n\tbroadcastInterpreterBoolMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nbroadcastInterpreterDoublewordMessage\n\t\"Answer the tally for this message.\"\n\t^broadcastInterpreterDoublewordMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nbroadcastInterpreterDoublewordMessage: aValue\n\t\"Answer the tally for this message.\"\n\tbroadcastInterpreterDoublewordMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nbroadcastInterpreterWordMessage\n\t\"Answer the tally for this message.\"\n\t^broadcastInterpreterWordMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nbroadcastInterpreterWordMessage: aValue\n\t\"Answer the tally for this message.\"\n\tbroadcastInterpreterWordMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 3/26/2009 10:05'!\ndetermineTalliesInOrder\n\t\"Answer an array of tallies in the order they appear in the sample\"\n\t^self tallyOrder collect:[:label| self perform: label]! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\ndoAllRootsHereMessage\n\t\"Answer the tally for this message.\"\n\t^doAllRootsHereMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\ndoAllRootsHereMessage: aValue\n\t\"Answer the tally for this message.\"\n\tdoAllRootsHereMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\ndoAllRootsThereMessage\n\t\"Answer the tally for this message.\"\n\t^doAllRootsThereMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\ndoAllRootsThereMessage: aValue\n\t\"Answer the tally for this message.\"\n\tdoAllRootsThereMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\ndoAllRootsThereResponse\n\t\"Answer the tally for this message.\"\n\t^doAllRootsThereResponse! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\ndoAllRootsThereResponse: aValue\n\t\"Answer the tally for this message.\"\n\tdoAllRootsThereResponse _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nenforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapMessage\n\t\"Answer the tally for this message.\"\n\t^enforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nenforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapMessage: aValue\n\t\"Answer the tally for this message.\"\n\tenforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nenforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapResponse\n\t\"Answer the tally for this message.\"\n\t^enforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapResponse! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nenforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapResponse: aValue\n\t\"Answer the tally for this message.\"\n\tenforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapResponse _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nenforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapMessage\n\t\"Answer the tally for this message.\"\n\t^enforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nenforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapMessage: aValue\n\t\"Answer the tally for this message.\"\n\tenforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nenforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapResponse\n\t\"Answer the tally for this message.\"\n\t^enforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapResponse! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nenforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapResponse: aValue\n\t\"Answer the tally for this message.\"\n\tenforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapResponse _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nenforceCoherenceBeforeSenderStoresIntoAllHeapsMessage\n\t\"Answer the tally for this message.\"\n\t^enforceCoherenceBeforeSenderStoresIntoAllHeapsMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nenforceCoherenceBeforeSenderStoresIntoAllHeapsMessage: aValue\n\t\"Answer the tally for this message.\"\n\tenforceCoherenceBeforeSenderStoresIntoAllHeapsMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nenforceCoherenceBeforeSenderStoresIntoAllHeapsResponse\n\t\"Answer the tally for this message.\"\n\t^enforceCoherenceBeforeSenderStoresIntoAllHeapsResponse! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nenforceCoherenceBeforeSenderStoresIntoAllHeapsResponse: aValue\n\t\"Answer the tally for this message.\"\n\tenforceCoherenceBeforeSenderStoresIntoAllHeapsResponse _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\nflushByMethodMessage\n\t\"Answer the tally for this message.\"\n\t^flushByMethodMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\nflushByMethodMessage: aValue\n\t\"Answer the tally for this message.\"\n\tflushByMethodMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nflushFreeContextsMessage\n\t\"Answer the tally for this message.\"\n\t^flushFreeContextsMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nflushFreeContextsMessage: aValue\n\t\"Answer the tally for this message.\"\n\tflushFreeContextsMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\nflushInterpreterCachesMessage\n\t\"Answer the tally for this message.\"\n\t^flushInterpreterCachesMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\nflushInterpreterCachesMessage: aValue\n\t\"Answer the tally for this message.\"\n\tflushInterpreterCachesMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\nflushMethodCacheMessage\n\t\"Answer the tally for this message.\"\n\t^flushMethodCacheMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\nflushMethodCacheMessage: aValue\n\t\"Answer the tally for this message.\"\n\tflushMethodCacheMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\nflushSelectiveMessage\n\t\"Answer the tally for this message.\"\n\t^flushSelectiveMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\nflushSelectiveMessage: aValue\n\t\"Answer the tally for this message.\"\n\tflushSelectiveMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\nhereIsARootResponse\n\t\"Answer the tally for this message.\"\n\t^hereIsARootResponse! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nhereIsARootResponse: aValue\n\t\"Answer the tally for this message.\"\n\thereIsARootResponse _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\ninitiateBarrierMessage\n\t\"Answer the tally for this message.\"\n\t^initiateBarrierMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\ninitiateBarrierMessage: aValue\n\t\"Answer the tally for this message.\"\n\tinitiateBarrierMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nloadFunctionFromPluginMessage\n\t\"Answer the tally for this message.\"\n\t^loadFunctionFromPluginMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nloadFunctionFromPluginMessage: aValue\n\t\"Answer the tally for this message.\"\n\tloadFunctionFromPluginMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nloadFunctionFromPluginResponse\n\t\"Answer the tally for this message.\"\n\t^loadFunctionFromPluginResponse! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nloadFunctionFromPluginResponse: aValue\n\t\"Answer the tally for this message.\"\n\tloadFunctionFromPluginResponse _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nnewValueForOopMessage\n\t\"Answer the tally for this message.\"\n\t^newValueForOopMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nnewValueForOopMessage: aValue\n\t\"Answer the tally for this message.\"\n\tnewValueForOopMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nnoMoreRootsResponse\n\t\"Answer the tally for this message.\"\n\t^noMoreRootsResponse! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nnoMoreRootsResponse: aValue\n\t\"Answer the tally for this message.\"\n\tnoMoreRootsResponse _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nrawData\n\t\"Answer the tally for this message.\"\n\t^rawData! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nrawData: aValue\n\t\"Answer the tally for this message.\"\n\trawData _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\nrecycleContextIfPossibleMessage\n\t\"Answer the tally for this message.\"\n\t^recycleContextIfPossibleMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\nrecycleContextIfPossibleMessage: aValue\n\t\"Answer the tally for this message.\"\n\trecycleContextIfPossibleMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nrespondToBarrierMessage\n\t\"Answer the tally for this message.\"\n\t^respondToBarrierMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nrespondToBarrierMessage: aValue\n\t\"Answer the tally for this message.\"\n\trespondToBarrierMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nreturnContextMessage\n\t\"Answer the tally for this message.\"\n\t^returnContextMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nreturnContextMessage: aValue\n\t\"Answer the tally for this message.\"\n\treturnContextMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nrunPrimitiveJustTestingMessage\n\t\"Answer the tally for this message.\"\n\t^runPrimitiveJustTestingMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nrunPrimitiveJustTestingMessage: aValue\n\t\"Answer the tally for this message.\"\n\trunPrimitiveJustTestingMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nrunPrimitiveMessage\n\t\"Answer the tally for this message.\"\n\t^runPrimitiveMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nrunPrimitiveMessage: aValue\n\t\"Answer the tally for this message.\"\n\trunPrimitiveMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nrunPrimitiveResponse\n\t\"Answer the tally for this message.\"\n\t^runPrimitiveResponse! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nrunPrimitiveResponse: aValue\n\t\"Answer the tally for this message.\"\n\trunPrimitiveResponse _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nsampleOneCoreMessage\n\t\"Answer the tally for this message.\"\n\t^sampleOneCoreMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nsampleOneCoreMessage: aValue\n\t\"Answer the tally for this message.\"\n\tsampleOneCoreMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nsampleOneCoreResponse\n\t\"Answer the tally for this message.\"\n\t^sampleOneCoreResponse! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nsampleOneCoreResponse: aValue\n\t\"Answer the tally for this message.\"\n\tsampleOneCoreResponse _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nscanCompactOrMakeFreeObjectsMessage\n\t\"Answer the tally for this message.\"\n\t^scanCompactOrMakeFreeObjectsMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nscanCompactOrMakeFreeObjectsMessage: aValue\n\t\"Answer the tally for this message.\"\n\tscanCompactOrMakeFreeObjectsMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nscanCompactOrMakeFreeObjectsResponse\n\t\"Answer the tally for this message.\"\n\t^scanCompactOrMakeFreeObjectsResponse! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nscanCompactOrMakeFreeObjectsResponse: aValue\n\t\"Answer the tally for this message.\"\n\tscanCompactOrMakeFreeObjectsResponse _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 3/26/2009 10:05'!\ntalliesInOrder\n\t\"Answer an array of tallies in the order they appear in the sample\"\n\t^self talliesInOrderCache! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 3/26/2009 10:05'!\ntalliesInOrderCache\n\t\"Answer the value of talliesInOrderCache\"\n\n\ttalliesInOrderCache isNil ifTrue:[self talliesInOrderCache: self determineTalliesInOrder].\n\t^ talliesInOrderCache! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 3/26/2009 10:04'!\ntalliesInOrderCache: anObject\n\t\"Set the value of talliesInOrderCache\"\n\n\ttalliesInOrderCache _ anObject! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 3/26/2009 10:16'!\ntallyOrder\n\t\"Answer an array of tally names in the order they appear in the sample\"\n\t\"RVMMulticoreSample primitiveCapture at: 8\"\n\t^self class tallyOrder! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\nupdateEnoughInterpreterToTransferControlJustTestingMessage\n\t\"Answer the tally for this message.\"\n\t^updateEnoughInterpreterToTransferControlJustTestingMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\nupdateEnoughInterpreterToTransferControlJustTestingMessage: aValue\n\t\"Answer the tally for this message.\"\n\tupdateEnoughInterpreterToTransferControlJustTestingMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\nupdateEnoughInterpreterToTransferControlJustTestingResponse\n\t\"Answer the tally for this message.\"\n\t^updateEnoughInterpreterToTransferControlJustTestingResponse! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\nupdateEnoughInterpreterToTransferControlJustTestingResponse: aValue\n\t\"Answer the tally for this message.\"\n\tupdateEnoughInterpreterToTransferControlJustTestingResponse _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\nupdateEnoughInterpreterToTransferControlMessage\n\t\"Answer the tally for this message.\"\n\t^updateEnoughInterpreterToTransferControlMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\nupdateEnoughInterpreterToTransferControlMessage: aValue\n\t\"Answer the tally for this message.\"\n\tupdateEnoughInterpreterToTransferControlMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\nupdateWholeInterpreterMessage\n\t\"Answer the tally for this message.\"\n\t^updateWholeInterpreterMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\nupdateWholeInterpreterMessage: aValue\n\t\"Answer the tally for this message.\"\n\tupdateWholeInterpreterMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\nverifyInterpreterAndHeapMessage\n\t\"Answer the tally for this message.\"\n\t^verifyInterpreterAndHeapMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\nverifyInterpreterAndHeapMessage: aValue\n\t\"Answer the tally for this message.\"\n\tverifyInterpreterAndHeapMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nwroteReadMostlyMemoryMessage\n\t\"Answer the tally for this message.\"\n\t^wroteReadMostlyMemoryMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nwroteReadMostlyMemoryMessage: aValue\n\t\"Answer the tally for this message.\"\n\twroteReadMostlyMemoryMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\nzapUnusedPortionOfHeapMessage\n\t\"Answer the tally for this message.\"\n\t^zapUnusedPortionOfHeapMessage! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\nzapUnusedPortionOfHeapMessage: aValue\n\t\"Answer the tally for this message.\"\n\tzapUnusedPortionOfHeapMessage _ aValue! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\nzapUnusedPortionOfHeapResponse\n\t\"Answer the tally for this message.\"\n\t^zapUnusedPortionOfHeapResponse! !\n\n!RVMCoreMessageTally methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:22'!\nzapUnusedPortionOfHeapResponse: aValue\n\t\"Answer the tally for this message.\"\n\tzapUnusedPortionOfHeapResponse _ aValue! !\n\n!RVMCoreMessageTally class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:00'!\nfastForData: data\n\t\"Answer a new instance of me initialized to tally these messages\"\n\t| tally |\n\ttally := self new.\n\ttally rawData: data.\n\ttally allocateOrRecycleContextMessage: (data at: 1).\n\ttally allocateOrRecycleContextJustTestingMessage: (data at: 2).\n\ttally recycleContextIfPossibleMessage: (data at: 3).\n\ttally flushInterpreterCachesMessage: (data at: 4).\n\ttally flushMethodCacheMessage: (data at: 5).\n\ttally flushByMethodMessage: (data at: 6).\n\ttally flushSelectiveMessage: (data at: 7).\n\ttally addObjectFromSnapshotMessage: (data at: 8).\n\ttally updateWholeInterpreterMessage: (data at: 9).\n\ttally updateEnoughInterpreterToTransferControlMessage: (data at: 10).\n\ttally updateEnoughInterpreterToTransferControlJustTestingMessage: (data at: 11).\n\ttally updateEnoughInterpreterToTransferControlJustTestingResponse: (data at: 12).\n\ttally zapUnusedPortionOfHeapMessage: (data at: 13).\n\ttally zapUnusedPortionOfHeapResponse: (data at: 14).\n\ttally verifyInterpreterAndHeapMessage: (data at: 15).\n\ttally doAllRootsThereMessage: (data at: 16).\n\ttally doAllRootsThereResponse: (data at: 17).\n\ttally doAllRootsHereMessage: (data at: 18).\n\ttally hereIsARootResponse: (data at: 19).\n\ttally newValueForOopMessage: (data at: 20).\n\ttally noMoreRootsResponse: (data at: 21).\n\ttally scanCompactOrMakeFreeObjectsMessage: (data at: 22).\n\ttally scanCompactOrMakeFreeObjectsResponse: (data at: 23).\n\ttally returnContextMessage: (data at: 24).\n\ttally runPrimitiveMessage: (data at: 25).\n\ttally runPrimitiveJustTestingMessage: (data at: 26).\n\ttally runPrimitiveResponse: (data at: 27).\n\ttally loadFunctionFromPluginMessage: (data at: 28).\n\ttally loadFunctionFromPluginResponse: (data at: 29).\n\ttally broadcastInterpreterDoublewordMessage: (data at: 30).\n\ttally broadcastInterpreterWordMessage: (data at: 31).\n\ttally broadcastInterpreterBoolMessage: (data at: 32).\n\ttally sampleOneCoreMessage: (data at: 33).\n\ttally sampleOneCoreResponse: (data at: 34).\n\ttally initiateBarrierMessage: (data at: 35).\n\ttally respondToBarrierMessage: (data at: 36).\n\ttally aboutToWriteReadMostlyMemoryMessage: (data at: 37).\n\ttally aboutToWriteReadMostlyMemoryResponse: (data at: 38).\n\ttally wroteReadMostlyMemoryMessage: (data at: 39).\n\ttally flushFreeContextsMessage: (data at: 40).\n\ttally enforceCoherenceBeforeSenderStoresIntoAllHeapsMessage: (data at: 41).\n\ttally enforceCoherenceBeforeSenderStoresIntoAllHeapsResponse: (data at: 42).\n\ttally enforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapMessage: (data at: 43).\n\ttally enforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapResponse: (data at: 44).\n\ttally enforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapMessage: (data at: 45).\n\ttally enforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapResponse: (data at: 46).\n\t^tally! !\n\n!RVMCoreMessageTally class methodsFor: 'instance creation' stamp: 'dmu 1/1/1970 00:02'!\nforMessageNames: aCollectionOfMessageNames andData: data\n\t\"Answer a new instance of me initialized to tally these messages\"\n\t| tally |\n\ttally := self new.\n\ttally rawData: data.\n\t1 to: data size do:[:index|\n\t\ttally perform:((aCollectionOfMessageNames at: index),':') asSymbol with:(data at: index)].\n\t^tally! !\n\n!RVMCoreMessageTally class methodsFor: 'code generation' stamp: 'ssa 3/26/2009 10:14'!\nadaptToNewTallyMessages\n\t\"RVMCoreMessageTally adaptToNewTallyMessages\"\n\t\"Change this class to work with the new messages\"\n\t\"BE SURE TO UPDATE tallyOrder MESSAGE IF THE TALLY ORDER CHANGES\"\n\t\n| messageNames code index |\nmessageNames _ (RVMMulticoreSample primitiveCapture at: 8) asOrderedCollection.\nmessageNames add: 'rawData'.\n\nRVMObject subclass: #RVMCoreMessageTally\n\tinstanceVariableNames: messageNames asArray\n\tclassVariableNames: ''\n\tpoolDictionaries: ''\n\tcategory: 'RVM-Monitoring'.\n\ncode _ 'fastForData: data\n\t\"Answer a new instance of me initialized to tally these messages\"\n\t| tally |\n\ttally := self new.\n\ttally rawData: data.\n\t'.\nindex _ 0.\nmessageNames remove: 'rawData'.\nmessageNames do:[:messageName| index _ index + 1.\n\tcode _ code, 'tally ',messageName,': (data at: ',index printString,').\n\t'].\ncode _ code,'^tally'.\nRVMCoreMessageTally class compile: code classified:'instance creation' notifying:nil.\n\nRVMCoreMessageTally removeCategory: 'accessing'.\nmessageNames do:[:selector|\n\tcode _ selector,'\n\t\"Answer the tally for this message.\"\n\t^',selector.\n\tRVMCoreMessageTally  compile: code classified:'accessing' notifying:nil.\t\n\tcode _ selector,': aValue\n\t\"Answer the tally for this message.\"\n\t',selector,' _ aValue'.\n\tRVMCoreMessageTally  compile: code classified:'accessing' notifying:nil].\t\n! !\n\n!RVMCoreMessageTally class methodsFor: 'accessing' stamp: 'ssa 3/26/2009 10:15'!\ntallyOrder\n\t\"Answer an array of tally names in the order they appear in the sample\"\n\t\"RVMMulticoreSample primitiveCapture at: 8\"\n\t^#(#allocateOrRecycleContextMessage\n\t#allocateOrRecycleContextJustTestingMessage\n\t#recycleContextIfPossibleMessage\n\t#flushInterpreterCachesMessage\n\t#flushMethodCacheMessage\n\t#flushByMethodMessage\n\t#flushSelectiveMessage\n\t#addObjectFromSnapshotMessage\n\t#updateWholeInterpreterMessage\n\t#updateEnoughInterpreterToTransferControlMessage\n\t#updateEnoughInterpreterToTransferControlJustTestingMessage\n\t#updateEnoughInterpreterToTransferControlJustTestingResponse\n\t#zapUnusedPortionOfHeapMessage\n\t#zapUnusedPortionOfHeapResponse\n\t#verifyInterpreterAndHeapMessage\n\t#doAllRootsThereMessage\n\t#doAllRootsThereResponse\n\t#doAllRootsHereMessage\n\t#hereIsARootResponse\n\t#newValueForOopMessage\n\t#noMoreRootsResponse\n\t#scanCompactOrMakeFreeObjectsMessage\n\t#scanCompactOrMakeFreeObjectsResponse\n\t#returnContextMessage\n\t#runPrimitiveMessage\n\t#runPrimitiveJustTestingMessage\n\t#runPrimitiveResponse\n\t#loadFunctionFromPluginMessage\n\t#loadFunctionFromPluginResponse\n\t#broadcastInterpreterDoublewordMessage\n\t#broadcastInterpreterWordMessage\n\t#broadcastInterpreterBoolMessage\n\t#sampleOneCoreMessage\n\t#sampleOneCoreResponse\n\t#initiateBarrierMessage\n\t#respondToBarrierMessage\n\t#aboutToWriteReadMostlyMemoryMessage\n\t#aboutToWriteReadMostlyMemoryResponse\n\t#wroteReadMostlyMemoryMessage\n\t#flushFreeContextsMessage\n\t#enforceCoherenceBeforeSenderStoresIntoAllHeapsMessage\n\t#enforceCoherenceBeforeSenderStoresIntoAllHeapsResponse\n\t#enforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapMessage\n\t#enforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapResponse\n\t#enforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapMessage\n\t#enforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapResponse)\n! !\n\n!RVMDataScaler methodsFor: 'private' stamp: 'ssa 11/4/2008 15:50'!\nsetMax: aValue\n\t\"No side effects\"\n\tmax _ aValue.\n\tself range:nil! !\n\n!RVMDataScaler methodsFor: 'private' stamp: 'ssa 11/4/2008 15:50'!\nsetMin: aValue\n\t\"No side effects\"\n\tmin _ aValue.\n\t\n\tself range:nil! !\n\n!RVMDataScaler methodsFor: 'scaling data' stamp: 'ssa 11/4/2008 15:08'!\nadjustMax\n\t\"Adjust my max based on my observedMax\"\n\t| newMax |\n\tself maxLocked ifTrue:[^self].\n\tnewMax _ self max max: self observedMax.\n\tself max = newMax ifTrue:[^self].\n\tself outOfRangeDetected: true.\n\tself max: newMax! !\n\n!RVMDataScaler methodsFor: 'scaling data' stamp: 'ssa 11/4/2008 15:09'!\nadjustMin\n\t\"Adjust my min based on my observedMin\"\n\t| newMin |\n\tself minLocked ifTrue:[^self].\n\tnewMin _ self min min: self observedMin.\n\tself min = newMin ifTrue:[^self].\n\tself outOfRangeDetected: true.\n\tself min: newMin! !\n\n!RVMDataScaler methodsFor: 'scaling data' stamp: 'ssa 1/1/1970 00:40'!\nautomatic\n\t\"Set to automatic scaling mode.\n\tThis mode expands the min/max over time to adapt to the data being observed.\n\tSend the message #resetScaling to flush historical min/max and rescale.\"\n\t\n\tself automaticScaling: true.\n\tself resetScaling! !\n\n!RVMDataScaler methodsFor: 'scaling data' stamp: 'ssa 1/1/1970 00:40'!\nmanual\n\t\"Turn off automatic scaling mode.\n\tStops adapting min/max\"\n\t\n\tself automaticScaling: false.\n! !\n\n!RVMDataScaler methodsFor: 'scaling data' stamp: 'ssa 10/6/2008 16:28'!\nresetObservations\n\t\"Reset my memory of min/max observations and my min/max as well once the first data value is observed.\"\n\tself observedMin:nil.\n\tself observedMax: nil.! !\n\n!RVMDataScaler methodsFor: 'scaling data' stamp: 'ssa 1/1/1970 00:15'!\nresetOutOfRangeDetector\n\t\"Reset my out of range detector\"\n\tself outOfRangeDetected: false.! !\n\n!RVMDataScaler methodsFor: 'scaling data' stamp: 'ssa 10/6/2008 16:29'!\nresetScaling\n\t\"Reset my memory of min/max observations and my min/max as well once the first data value is observed.\"\n\tmin _ nil.\n\tmax _  nil.\n\tobservedMin _ nil.\n\tobservedMax _  nil.\n\trange _ nil! !\n\n!RVMDataScaler methodsFor: 'scaling data' stamp: 'ssa 10/7/2008 17:35'!\nscale: someData\n\t\"Answer a number between 0-100 representing the percentage location of this data between my min and max\"\n\t\n\tself lastObserved: someData.\n\tself observedMin:(self observedMin min: someData).\n\tself observedMax:(self observedMax max: someData).\n\tsomeData <= self min ifTrue:[^0].\n\tsomeData >= self max ifTrue:[^100].\n\t^someData - self min * 100.0 /  self range ! !\n\n!RVMDataScaler methodsFor: 'scaling data' stamp: 'ssa 1/1/1970 01:10'!\nsetRangeToObserved\n\t\"Set my min and max to what I have observed in my data scaling\"\n\t\n\tmin _ self observedMin.\n\tmax _ self observedMax.\n\tself range: nil\n\t! !\n\n!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 9/13/2008 19:57'!\naspect\n\t\"Answer the value of aspect\"\n\n\taspect isNil ifTrue:[self aspect: #notDefinedYet].\n\t^ aspect! !\n\n!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 9/13/2008 19:56'!\naspect: anObject\n\t\"Set the value of aspect\"\n\n\taspect _ anObject! !\n\n!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:39'!\nautomaticScaling\n\t\"Answer the value of automaticScaling\"\n\n\tautomaticScaling isNil ifTrue:[self automaticScaling: false].\n\t^ automaticScaling! !\n\n!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:39'!\nautomaticScaling: anObject\n\t\"Set the value of automaticScaling\"\n\n\tautomaticScaling _ anObject! !\n\n!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 9/14/2008 21:33'!\nlastObserved\n\t\"Answer the value of lastObserved\"\n\n\tlastObserved isNil ifTrue:[self lastObserved: 0].\n\t^ lastObserved! !\n\n!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 9/14/2008 21:33'!\nlastObserved: anObject\n\t\"Set the value of lastObserved\"\n\n\tlastObserved _ anObject! !\n\n!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 10/3/2008 20:08'!\nmax\n\t\"Answer the value of max\"\n\n\tmax isNil ifTrue:[^1].\n\t^ max! !\n\n!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 9/19/2008 10:53'!\nmax: aNumber\n\t\"Set the value of max\"\n\n\tmax _ min isNil ifTrue:[aNumber] ifFalse:[aNumber max: self min].\n\tself range:nil! !\n\n!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:20'!\nmaxLocked\n\t\"Answer the value of maxLocked\"\n\n\tmaxLocked isNil ifTrue:[self maxLocked: false].\n\t^ maxLocked! !\n\n!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:20'!\nmaxLocked: anObject\n\t\"Set the value of maxLocked\"\n\n\tmaxLocked _ anObject! !\n\n!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 10/6/2008 20:22'!\nmin\n\t\"Answer the value of min\"\n\tself pinAtZero ifTrue:[^0].\n\tmin isNil ifTrue:[self min: 100000000].\n\t^ min! !\n\n!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 9/19/2008 10:53'!\nmin: aNumber\n\t\"Set the value of min\"\n\n\tmin _ max isNil ifTrue:[aNumber] ifFalse:[aNumber min: self max].\n\tself range:nil! !\n\n!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:20'!\nminLocked\n\t\"Answer the value of minLocked\"\n\n\tminLocked isNil ifTrue:[self minLocked: false].\n\t^ minLocked! !\n\n!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:20'!\nminLocked: anObject\n\t\"Set the value of minLocked\"\n\n\tminLocked _ anObject! !\n\n!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 9/13/2008 19:45'!\nobservedMax\n\t\"Answer the value of observedMax\"\n\n\tobservedMax isNil ifTrue:[self observedMax: -10000000000].\n\t^ observedMax! !\n\n!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:43'!\nobservedMax: aNumber\n\t\"Set the value of observedMax\"\n\n\tobservedMax _ aNumber.\n\tself automaticScaling ifTrue:[self adjustMax]! !\n\n!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 9/13/2008 19:45'!\nobservedMin\n\t\"Answer the value of observedMin\"\n\n\tobservedMin isNil ifTrue:[self observedMin:  10000000000].\n\t^ observedMin! !\n\n!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:44'!\nobservedMin: aNumber\n\t\"Set the value of observedMin\"\n\n\tobservedMin _ aNumber.\n\tself automaticScaling ifTrue:[self adjustMin]! !\n\n!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:14'!\noutOfRangeDetected\n\t\"Answer the value of outOfRangeDetected\"\n\n\toutOfRangeDetected isNil ifTrue:[self outOfRangeDetected: false].\n\t^ outOfRangeDetected! !\n\n!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 10/2/2008 19:12'!\noutOfRangeDetected: anObject\n\t\"Set the value of outOfRangeDetected\"\n\n\toutOfRangeDetected _ anObject! !\n\n!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 10/6/2008 20:22'!\npinAtZero\n\t\"Answer the value of pinAtZero\"\n\n\tpinAtZero isNil ifTrue:[self pinAtZero: false].\n\t^ pinAtZero! !\n\n!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 10/6/2008 20:21'!\npinAtZero: anObject\n\t\"Set the value of pinAtZero\"\n\n\tpinAtZero _ anObject! !\n\n!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 10/6/2008 20:50'!\npinMinAtZero\t\n\n\tself pinAtZero: true! !\n\n!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 9/13/2008 17:52'!\nrange\n\t\"Answer the value of range\"\n\n\trange isNil ifTrue:[self range: (self max - self min)].\n\t^ range! !\n\n!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 9/13/2008 17:52'!\nrange: anObject\n\t\"Set the value of range\"\n\n\trange _ anObject! !\n\n!RVMDataScaler methodsFor: 'accessing' stamp: 'ssa 10/6/2008 20:50'!\nunpinMinAtZero\t\n\n\tself pinAtZero: false! !\n\n!RVMDataScaler methodsFor: 'data generation' stamp: 'ssa 9/13/2008 19:33'!\natRandom\n\t\"Answer a random data value in my range.\"\n\t^ self range atRandom + self min! !\n\n!RVMDataScaler methodsFor: 'autocoding' stamp: 'ssa 9/13/2008 20:13'!\nharden\n\t\"Compile a method into RVMMonitor that will reproduce a scaler like me.\"\n\tRVMMonitor autocodeScalerMethodForScaler: self! !\n\n!RVMDataScaler methodsFor: 'user interface' stamp: 'ssa 9/13/2008 22:38'!\nopen\n\n\t| cs |\n\tcs _ RVMColoredDataScaler new.\n\tcs scaler: self.\n\tcs color: Color random.\n\tcs open! !\n\n!RVMDataScaler methodsFor: 'printing' stamp: 'ssa 10/6/2008 16:19'!\nprintOn: aStream\n\n\tsuper printOn: aStream.\n\taStream nextPutAll: 'min:',self min printString,' max:',self max printString! !\n\n!RVMDataScaler class methodsFor: 'examples' stamp: 'ssa 9/13/2008 17:59'!\nexample1\n\t\"RVMDataScaler example1\"\n\t\n\t| scaler |\n\tscaler _ self min: 5 max: 15.\n\t1 to: 20 do:[:value|\n\t\tTranscript cr;show: 'value: ',value printString,' => scaled: ',(scaler scale: value) printString]! !\n\n!RVMDataScaler class methodsFor: 'examples' stamp: 'ssa 9/13/2008 18:00'!\nexample2\n\t\"RVMDataScaler example2\"\n\t\n\t| scaler |\n\tscaler _ self min: 0.5 max: 1.5.\n\t0.1 to: 2.0  by: 0.1 do:[:value|\n\t\tTranscript cr;show: 'value: ',value printString,' => scaled: ',(scaler scale: value) printString]! !\n\n!RVMDataScaler class methodsFor: 'examples' stamp: 'ssa 9/13/2008 18:02'!\nexample3\n\t\"RVMDataScaler example3\"\n\t\n\t| scaler |\n\tscaler _ self min: -5 max: -1.\n\t-7  to: 0  by: 1 do:[:value|\n\t\tTranscript cr;show: 'value: ',value printString,' => scaled: ',(scaler scale: value) printString]! !\n\n!RVMDataScaler class methodsFor: 'examples' stamp: 'ssa 9/13/2008 18:02'!\nexample4\n\t\"RVMDataScaler example4\"\n\t\n\t| scaler |\n\tscaler _ self min: -5 max: 5.\n\t-7  to: 7 by: 1 do:[:value|\n\t\tTranscript cr;show: 'value: ',value printString,' => scaled: ',(scaler scale: value) printString]! !\n\n!RVMDataScaler class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:48'!\nexampleInstance\n\t\"RVMDataScaler exampleInstance\"\n\t\n\t^self aspect: #bytesUseds min: 0 max: 100000! !\n\n!RVMDataScaler class methodsFor: 'instance creation' stamp: 'ssa 9/13/2008 19:57'!\naspect: aSymbol min: minValue max: maxValue\n\t\"Answer a new data scaler with this range.\"\n\t| scaler |\n\tscaler _ self new.\n\tscaler aspect: aSymbol.\n\tscaler min: minValue.\n\tscaler max: maxValue.\n\t^scaler! !\n\n!RVMDataScaler class methodsFor: 'instance creation' stamp: 'ssa 9/13/2008 19:58'!\nmin: minValue max: maxValue\n\t\"Answer a new data scaler with this range.\"\n\t\n\t^self aspect: nil min: minValue max: maxValue! !\n\n!RVMDynamicScoper commentStamp: 'dmu 8/9/2011 11:41' prior: 0!\nI implement dynamic scoping; crucial for multithreaded apps, by added instance variables to Process on demand.!\n!RVMDynamicScoper class methodsFor: 'as yet unclassified' stamp: 'dmu 8/11/2011 21:53'!\naddAccessMessage: selectorToAdd sending: selectorToSend\n\t| methodText |\n\t(self class methodDictionary includesKey: selectorToAdd) ifTrue: [^ self].\n\tmethodText _ selectorToAdd, '   ^ Processor thisProcess ', selectorToSend.\n\tself class compileSilently: methodText classified: self createdMethodCategory! !\n\n!RVMDynamicScoper class methodsFor: 'as yet unclassified' stamp: 'dmu 8/9/2011 18:21'!\naddProcessAccessMethod: accessSelector\n\t| mungedAccessSelector mungedInstanceVariable methodText |\n\tmungedAccessSelector _ self munge: accessSelector.\n\t(Process methodDictionary includesKey: mungedAccessSelector) ifTrue: [^ self].\n\tmungedInstanceVariable _ mungedAccessSelector.\n\tmethodText _ mungedAccessSelector, '  \"created by ', self className, '>addProcessAccessMethod:\"  ^', mungedInstanceVariable.\n\tProcess compileSilently: methodText classified: self createdMethodCategory! !\n\n!RVMDynamicScoper class methodsFor: 'as yet unclassified' stamp: 'dmu 8/11/2011 22:59'!\naddProcessAssignmentMethod: assignmentSelector\n\t| mungedAssignmentSelector mungedInstanceVariable methodText |\n\tmungedAssignmentSelector _ self munge: assignmentSelector.\n\tmungedInstanceVariable _ mungedAssignmentSelector copyFrom: 1 to: mungedAssignmentSelector size - 1.\n\t(Process methodDictionary includesKey: mungedAssignmentSelector) ifTrue: [^ self].\n\tmethodText _ mungedAssignmentSelector, ' x   \"created by ', self className, '>addProcessAssignmentMethod:\"  ',  mungedInstanceVariable, ' :=  x'.\n\tProcess compileSilently: methodText classified: self createdMethodCategory! !\n\n!RVMDynamicScoper class methodsFor: 'as yet unclassified' stamp: 'dmu 8/9/2011 15:24'!\naddProcessInstanceVariable: variableName\n\t| mungedName |\n\tmungedName _ self munge: variableName.\n\t(Process  allInstVarNames includes: mungedName) ifTrue: [^ self].\n\tProcess addInstVarName: mungedName! !\n\n!RVMDynamicScoper class methodsFor: 'as yet unclassified' stamp: 'dmu 8/11/2011 21:54'!\naddRegistrationMessage: selectorToAdd sending: selectorToSend\n\t| methodText |\n\t(self class methodDictionary includesKey: selectorToAdd) ifTrue: [^ self].\n\tmethodText _ selectorToAdd, ' x     Processor thisProcess ',  selectorToSend, ' x'.\n\tself class compileSilently: methodText classified: self createdMethodCategory! !\n\n!RVMDynamicScoper class methodsFor: 'as yet unclassified' stamp: 'dmu 8/9/2011 18:53'!\ncomputeAccessAndAssignmentSelectorsFrom: selector into: resultBlock\n\t| selectorWithoutPrefix assignmentSelector accessSelector |\n\tselectorWithoutPrefix _ self stripPrefixFrom:  selector.\n\tself ensureSingleArgument: selectorWithoutPrefix.\n\tassignmentSelector _ selectorWithoutPrefix.\n\taccessSelector _ selectorWithoutPrefix copyFrom: 1 to: selectorWithoutPrefix size - 1.\n\tresultBlock value: accessSelector asSymbol value: assignmentSelector asSymbol! !\n\n!RVMDynamicScoper class methodsFor: 'as yet unclassified' stamp: 'dmu 8/11/2011 21:52'!\ncreateAndRunRegistrationMessage: aMessage\n\t| assignmentSelector accessSelector |\n\tself computeAccessAndAssignmentSelectorsFrom: aMessage selector into: [:acc :agn | accessSelector _ acc.  assignmentSelector _ agn].\n\tself addProcessInstanceVariable: accessSelector.\n\tself addProcessAccessMethod: accessSelector.\n\tself addProcessAssignmentMethod: assignmentSelector.\n\n\tself addRegistrationMessage: aMessage selector sending: (self munge: assignmentSelector).\n\tself addAccessMessage: accessSelector sending: (self munge: accessSelector).\n\n\t^ self perform: aMessage selector with: aMessage argument! !\n\n!RVMDynamicScoper class methodsFor: 'as yet unclassified' stamp: 'dmu 8/9/2011 18:38'!\ncreatedMethodCategory\n\t^ '*created-by-', self className! !\n\n!RVMDynamicScoper class methodsFor: 'as yet unclassified' stamp: 'dmu 8/9/2011 14:55'!\ndoesNotUnderstand: aMessage\n\t| selector |\n\tselector _ aMessage selector.\n\t(selector beginsWith: self prefix) ifFalse: [^ super doesNotUnderstand: aMessage].\n\t^ self createAndRunRegistrationMessage: aMessage! !\n\n!RVMDynamicScoper class methodsFor: 'as yet unclassified' stamp: 'dmu 8/9/2011 12:00'!\nensureSingleArgument: aSelector\n\t(aSelector indexOf: $:) = aSelector size ifFalse: [self error: 'expecting a one-arg keyword']! !\n\n!RVMDynamicScoper class methodsFor: 'as yet unclassified' stamp: 'dmu 8/9/2011 18:37'!\nmunge: identifierOrKeyword\n\t| asCreated |\n\tasCreated _ 'AsCreatedBy', self name.\n\t^ (\n\t\tidentifierOrKeyword last = $:\n\t \t\tifTrue: [ (identifierOrKeyword copyFrom: 1 to: identifierOrKeyword size - 1), asCreated, ':' ]\n\t\t\tifFalse: [ identifierOrKeyword, asCreated ]\n\t) asSymbol! !\n\n!RVMDynamicScoper class methodsFor: 'as yet unclassified' stamp: 'dmu 8/9/2011 12:05'!\nprefix ^'register'! !\n\n!RVMDynamicScoper class methodsFor: 'as yet unclassified' stamp: 'dmu 8/9/2011 12:05'!\nstripPrefixFrom: dnuSelector\n\t^ (dnuSelector copyFrom: self prefix size + 1 to: dnuSelector size) withFirstCharacterDownshifted! !\n\n!RVMExperiment class methodsFor: 'as yet unclassified' stamp: 'dmu 1/1/1970 00:04'!\ndo: aBlock\n| ms s |\nRVMMulticoreSample capture.\nms := Time millisecondsToRun: aBlock.\ns := RVMMulticoreSample capture.\nTranscript cr; show: 'ms: '; show: ms; show: ' yields: '; show: s yieldCounts sum; show: ' bytecodes: '; show: s bytecodeCounts sum;\nshow: ' total/unforced interruptCheckCounts: '; show: s interruptCheckCounts sum; show: '/'; show: s unforcedInterruptCheckCounts sum; cr;\nshow: 'receive tallies: ', s receiveTallySum printString! !\n\n!RVMExperiment class methodsFor: 'as yet unclassified' stamp: 'dmu 1/1/1970 00:14'!\ntestCompiler\nself do: [Benchmark new testCompiler]! !\n\n!RVMGlobalHeapStats methodsFor: 'testing' stamp: 'ssa 7/21/2008 10:09'!\nisGlobal\n\n\t^true! !\n\n!RVMGlobalHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:09'!\nscope\n\t\"Answer my scope\"\n\t^'Global'! !\n\n!RVMGridLocationController methodsFor: 'controlling' stamp: 'ssa 11/16/2008 02:19'!\nredButtonActivity\n\t| point grid box coord cellSize |\n\tpoint _ Sensor cursorPoint.\n\tgrid _ RVMMonitor extent.\n\tbox _ self view insetDisplayBox.\n\tcellSize _ box extent // grid + 1.\n\tcoord _ (point - box origin  //(cellSize))+1.\n\tself view point: coord.\n\tview displayView.\n\t! !\n\n!RVMGridLocationController methodsFor: 'controlling' stamp: 'ssa 11/15/2008 16:11'!\nyellowButtonActivity\n! !\n\n!RVMGridLocationView methodsFor: 'displaying' stamp: 'ssa 11/16/2008 01:29'!\ndisplayView\n\t| gridExtent point boxes box dot |\n\tself canvas extent > self insetDisplayBox extent ifTrue:[self canvas:nil; canvas].\n\tself okToDisplay ifFalse:[^self].\n\tpoint _ self point.\n\tself uncache.\n\tself canvas displayOn: Display at:self insetDisplayBox origin.\n\tgridExtent _ self gridExtent.\n\tdot _ Form extent:1@1.\n\tdot fillBlack.\n\tboxes _ self insetDisplayBox subDivideBy:  gridExtent.\n\t1 to: gridExtent x do:[:x|\n\t\t1 to: gridExtent y do:[:y|\n\t\t\tpoint = (x@y)  ifTrue:[box _ boxes at: y-1*gridExtent x+x.\n\t\t\t\tDisplay fill: (box origin - (0@1) extent:box extent)rounded  fillColor: Color black].\n\t\t\t(point = (0@0)) & ((x@y)=(1@1))  ifTrue:[box _ boxes at: y-1*gridExtent x+x..\n\t\t\t\tDisplay fill: box rounded fillColor: Color red].\n\t\t\t(point > (gridExtent)) & ((x@y)=(gridExtent))  ifTrue:[box _ boxes at: y-1*gridExtent x+x..\n\t\t\t\tDisplay fill: box rounded fillColor: Color red].\n\t\t\t]]! !\n\n!RVMGridLocationView methodsFor: 'displaying' stamp: 'ssa 11/15/2008 23:46'!\ndrawGridOnCanvas\n\t| gridExtent boxes dot leftX rightX boxHeight boxWidth lineY lineX topY bottomY |\n\tself canvas fillWhite.\n\tgridExtent _ self gridExtent.\n\tdot _ Form extent:1@1.\n\tdot fillBlack.\n\tleftX _ self canvas boundingBox origin x.\n\trightX _ self canvas boundingBox corner x.\n\ttopY _ self canvas boundingBox origin y.\n\tbottomY _ self canvas boundingBox corner y.\n\tboxes _ self canvas boundingBox subDivideBy:  gridExtent.\n\tboxHeight _ boxes first height.\n\tboxWidth _ boxes first width  .\n\tlineY _ topY + boxHeight -2.\n\tlineX _ leftX + boxWidth  .\n\t1 to: gridExtent x do:[:x|\n\t\tx > (gridExtent x - 2) ifFalse:[\n\t\tself canvas drawLine: dot from: (leftX@lineY)  to: rightX@lineY clippingBox: self canvas boundingBox rule: Form paint fillColor: Color black.\n\t\tlineY _ lineY + boxHeight].\n\t\t1 to: gridExtent y do:[:y|\n\t\t\ty > (gridExtent y - 1) ifFalse:[\n\t\t\t\tself canvas drawLine: dot from: lineX@topY to: lineX@bottomY clippingBox: self canvas boundingBox rule: Form paint fillColor: Color black.\n\t\t\t\tlineX _ lineX + boxWidth].\n\t\t\t]]! !\n\n!RVMGridLocationView methodsFor: 'updating' stamp: 'ssa 11/16/2008 00:56'!\nhear: something\n\tself displayView! !\n\n!RVMGridLocationView methodsFor: 'updating' stamp: 'ssa 11/16/2008 00:32'!\nnewFrame\n\n\tself canvas: nil.\n\tself canvas! !\n\n!RVMGridLocationView methodsFor: 'accessing' stamp: 'ssa 11/15/2008 18:03'!\ncanvas\n\t\"Answer the value of canvas\"\n\n\tcanvas isNil ifTrue:[self canvas: (Form extent: self insetDisplayBox extent).\n\t\tself drawGridOnCanvas].\n\t^ canvas! !\n\n!RVMGridLocationView methodsFor: 'accessing' stamp: 'ssa 11/15/2008 18:02'!\ncanvas: anObject\n\t\"Set the value of canvas\"\n\n\tcanvas _ anObject! !\n\n!RVMGridLocationView methodsFor: 'accessing' stamp: 'ssa 11/13/2008 12:31'!\nextentGetter\n\t\"Answer the value of extentGetter\"\n\n\textentGetter isNil ifTrue:[self extentGetter: [8@7]].\n\t^ extentGetter! !\n\n!RVMGridLocationView methodsFor: 'accessing' stamp: 'ssa 11/13/2008 12:30'!\nextentGetter: anObject\n\t\"Set the value of extentGetter\"\n\n\textentGetter _ anObject! !\n\n!RVMGridLocationView methodsFor: 'accessing' stamp: 'ssa 11/13/2008 13:05'!\ngridExtent\n\n\t^self extentGetter isSymbol ifTrue:[self model perform: self extentGetter] ifFalse:[self extentGetter value]! !\n\n!RVMGridLocationView methodsFor: 'accessing' stamp: 'ssa 11/13/2008 12:37'!\npoint\n\n\t^self pointGetter isSymbol ifTrue:[self model perform: self pointGetter] ifFalse:[self pointGetter value]! !\n\n!RVMGridLocationView methodsFor: 'accessing' stamp: 'ssa 11/16/2008 02:20'!\npoint: aPoint\n\tself pointSetter isSymbol ifTrue:[self model perform: self pointSetter with: aPoint] ifFalse:[self pointSetter value: aPoint]! !\n\n!RVMGridLocationView methodsFor: 'accessing' stamp: 'ssa 11/13/2008 12:31'!\npointGetter\n\t\"Answer the value of pointGetter\"\n\n\tpointGetter isNil ifTrue:[self pointGetter: [self extent atRandom]].\n\t^ pointGetter! !\n\n!RVMGridLocationView methodsFor: 'accessing' stamp: 'ssa 11/13/2008 12:30'!\npointGetter: anObject\n\t\"Set the value of pointGetter\"\n\n\tpointGetter _ anObject! !\n\n!RVMGridLocationView methodsFor: 'accessing' stamp: 'ssa 11/13/2008 12:32'!\npointSetter\n\t\"Answer the value of pointSetter\"\n\n\tpointSetter isNil ifTrue:[self pointSetter: [\"do nothing by default\"]].\n\t^ pointSetter! !\n\n!RVMGridLocationView methodsFor: 'accessing' stamp: 'ssa 11/13/2008 12:30'!\npointSetter: anObject\n\t\"Set the value of pointSetter\"\n\n\tpointSetter _ anObject! !\n\n!RVMGridLocationView methodsFor: 'controller access' stamp: 'ssa 11/15/2008 16:10'!\ndefaultControllerClass\n\n\t^RVMGridLocationController! !\n\n!RVMGridLocationView class methodsFor: 'instance creation' stamp: 'ssa 11/13/2008 12:47'!\non: aModel pointGetter: pointGetterBlockOrSelector pointSetter: pointSetterBlockOrSelector extentGetter: extentGetterBlockOrSelector\n\n\t| v |\n\tv _ self new.\n\tv model: aModel.\n\tv pointGetter: pointGetterBlockOrSelector.\n\tv pointSetter: pointSetterBlockOrSelector.\n\tv extentGetter: extentGetterBlockOrSelector.\n\t^v\t! !\n\n!RVMGroupLocatorController methodsFor: 'controlling' stamp: 'ssa 11/27/2008 11:36'!\nchangeObjectsSourceSourceTo: aString\nCursor wait showWhile:[\n\tself view objectsSourceSource: aString.\n\tself view changed:#objectsSourceSource]! !\n\n!RVMGroupLocatorController methodsFor: 'controlling' stamp: 'ssa 11/27/2008 09:45'!\nredButtonActivity\n\n\tself view hear:nil! !\n\n!RVMGroupLocatorController methodsFor: 'controlling' stamp: 'ssa 11/27/2008 11:33'!\nyellowButtonActivity\n\t| menu action choices |\n\tself view topView dontDisplayWhile:[\n\tmenu := CustomMenu new.\n\tmenu add:'Inspect View' action:[self view inspect].\n\tmenu addLine.\n\tchoices _ {'Object withAllSubclasses'. \n\t\t\t'View withAllSubclasses'.\n\t\t\t'Number allSubclasses'.\n\t\t\t#line.\n\t\t\t'String allInstances'.\n\t\t\t'Array allInstances'.\n\t\t\t'Collection allSubInstances' }.\n\tchoices do:[:choice|\n\t\tchoice = #line ifTrue:[menu addLine]\n\t\t\tifFalse:[menu add: choice action:choice]].\n\t\n\taction := menu startUp: nil withCaption: '' at: Sensor cursorPoint].\n\t(action isKindOf: BlockContext) ifTrue:[^action value].\n\taction notNil ifTrue:[self changeObjectsSourceSourceTo: action]! !\n\n!RVMGroupLocatorView methodsFor: 'framing' stamp: 'ssa 11/27/2008 09:33'!\nnewFrame\n\tself boxes: nil.\n\tself canvas:nil.\n\tself backgroundCanvas:nil.\n\tself drawOnCanvas.\n\tDisplay fill: self insetDisplayBox fillColor: Color white.\n\tself displayView! !\n\n!RVMGroupLocatorView methodsFor: 'drawing' stamp: 'ssa 11/27/2008 14:42'!\ndrawBackgroundCanvas\n\t| alt count lighter rowWidth |\n\trowWidth _ RVMMonitor extent x  .\n\talt _ false.\n\tcount _ 0.\n\tlighter _ Color black lighter lighter.\n\tself boxes do:[:r| self backgroundCanvas fill: r  fillColor: (alt ifTrue:[Color black]ifFalse:[lighter]). \"self backgroundCanvas border: r width: 1 fillColor: Color gray.\"\n\talt _ alt not.\n\tcount _ count + 1.\n\trowWidth odd ifFalse:[count = rowWidth ifTrue:[alt _ alt not. count _ 0]]].\n! !\n\n!RVMGroupLocatorView methodsFor: 'drawing' stamp: 'ssa 3/31/2009 18:06'!\ndrawLocations\n\t| dot coreExtent amt index rect pt dotSize realRect label  |\n\tcoreExtent _ RVMMonitor extent.\n\tdotSize _(self boxes first width // ((self countsPerCore size // self boxes size)max:1))min:self boxes first width //2 max:1.\n\tdot _ Form dotOfSize: dotSize color: self color.\n\t0 to: coreExtent x - 1 do:[:x|\n\t\t0 to: coreExtent y - 1 do:[:y|\n\t\t\tamt _ self countsPerCore occurrencesOf: (index _ y*coreExtent x+x).\n\t\t\trect _ (realRect _ self boxes at: index + 1) insetBy: dot offset abs.\n\t\t\tlabel _ amt printString asDisplayText .\n\t\t\tlabel foregroundColor: Color red backgroundColor: Color transparent.\n\t\t\tlabel displayOn: self canvas at: realRect origin - (0@3) clippingBox: realRect rule: Form paint fillColor: Color red.\n\t\t\t\"amt  timesRepeat:[pt _ rect asRandomPoint.\n\t\t\t\tdot displayOn: self canvas at: pt clippingBox: realRect rule: Form paint fillColor:nil]\"].\n\t\t]! !\n\n!RVMGroupLocatorView methodsFor: 'drawing' stamp: 'ssa 11/27/2008 09:19'!\ndrawOnCanvas\n\tself backgroundCanvas displayOn: self canvas at: 0@0.\n\tself drawLocations! !\n\n!RVMGroupLocatorView methodsFor: 'displaying' stamp: 'ssa 11/27/2008 09:24'!\ndisplayView\n\t\"Display my canvas at my offset.\n\tSubclasses should not override this method but should draw on the canvas instead\"\n\tself drawOnCanvas.\n\tself okToDisplay ifFalse:[^self].\n\tself uncache.\n\tself canvas displayOn: Display at: self insetDisplayBox center - self canvas center clippingBox: self insetDisplayBox.\n! !\n\n!RVMGroupLocatorView methodsFor: 'listening' stamp: 'ssa 11/27/2008 09:31'!\nhear: something\n\t\"Update my display\"\n\tself countsPerCore: nil.\n\tself drawOnCanvas.\n\tself displayView! !\n\n!RVMGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 09:35'!\nbackgroundCanvas\n\t\"Answer the value of backgroundCanvas\"\n\n\tbackgroundCanvas isNil ifTrue:[self backgroundCanvas: (Form extent: self insetDisplayBox extent depth: Display depth).  self drawBackgroundCanvas].\n\t^ backgroundCanvas! !\n\n!RVMGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 09:08'!\nbackgroundCanvas: anObject\n\t\"Set the value of backgroundCanvas\"\n\n\tbackgroundCanvas _ anObject! !\n\n!RVMGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 09:30'!\nboxes\n\t\"Answer the value of boxes\"\n\n\tboxes isNil ifTrue:[self boxes: ((self insetDisplayBox subDivideRoundedBy: RVMMonitor extent) collect:[:r| r translateBy: self insetDisplayBox origin negated])].\n\t^ boxes! !\n\n!RVMGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 09:08'!\nboxes: anObject\n\t\"Set the value of boxes\"\n\n\tboxes _ anObject! !\n\n!RVMGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 09:35'!\ncanvas\n\t\"Answer the value of canvas\"\n\n\tcanvas isNil ifTrue:[self canvas:  (Form extent: self insetDisplayBox extent depth: Display depth)].\n\t^ canvas! !\n\n!RVMGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 09:08'!\ncanvas: anObject\n\t\"Set the value of canvas\"\n\n\tcanvas _ anObject! !\n\n!RVMGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 12:27'!\nchangeColorTo: aColor\n\t\"Set the value of color\"\n\n\tself color: aColor.\n\tself hear:nil! !\n\n!RVMGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 12:15'!\ncolor\n\t\"Answer the value of color\"\n\n\tcolor isNil ifTrue:[self color: Color red].\n\t^ color! !\n\n!RVMGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 12:15'!\ncolor: anObject\n\t\"Set the value of color\"\n\n\tcolor _ anObject! !\n\n!RVMGroupLocatorView methodsFor: 'accessing' stamp: 'ads 1/30/2011 15:20'!\ncountsPerCore\n\t\"Answer the value of countsPerCore\"\n\tcountsPerCore isNil ifTrue:[self countsPerCore: (self objects asOrderedCollection  collect:[:obj| RVMOperations isRVM ifFalse:[RVMMonitor coreCount atRandom - 1]ifTrue:[RVMOperations getCoreHolding:obj]]) asBag].\n\t^ countsPerCore! !\n\n!RVMGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 09:14'!\ncountsPerCore: aBag\n\t\"Set the value of countsPerCore, a Bag of coreIndicies with occurenceCounts showing how many of my objects reside in each core\"\n\n\tcountsPerCore _ aBag! !\n\n!RVMGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 09:16'!\nobjects\n\t\"Answer my colection of objects to locate.\"\n\t^self objectsSource isSymbol ifTrue:[self model perform: self objectsSource] ifFalse:[self objectsSource value]! !\n\n!RVMGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 09:16'!\nobjectsSource\n\t\"Answer the value of objectsSource, a Block that returns a collection of objects to locate.\n\tCan also be a SYmbol, a message selector to send to my model\"\n\n\tobjectsSource isNil ifTrue:[self objectsSource: [String allInstances]].\n\t^ objectsSource! !\n\n!RVMGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 09:17'!\nobjectsSource: aBlockOrSymbol\n\t\"Set the value of objectsSource\"\n\n\tobjectsSource _ aBlockOrSymbol! !\n\n!RVMGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 10:34'!\nobjectsSourceSource\n\n\t| code |\n\tself objectsSource isSymbol ifTrue:[^self objectsSource printString].\n\tcode _ self objectsSource decompile printString.\n\t(code beginsWith:'{[') &(code endsWith:']}') ifTrue:[code _ code copyFrom: 3 to: code size - 2].\n\t^code! !\n\n!RVMGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 11:34'!\nobjectsSourceSource: aText\n\n\t| value aString |\n\taString _ aText asString.\n\t( aString withBlanksTrimmed beginsWith:'#')\n\t\tifTrue:[value _  Compiler new evaluate: aString in: nil to: nil\n\t\t\t\t\t\tnotifying: nil ifFail: [^ false].\n\t\t\t\tself model perform: value.  \"test to make sure it works before installing\"]\n\t\tifFalse:[value _ Compiler new evaluate: '[',aString,']' in: nil to: nil\n\t\t\t\t\t\tnotifying: nil ifFail: [^ false]].\n\tself objectsSource:value.\n\tself hear:nil.\n\t^true \"tell the editor its OK\"! !\n\n!RVMGroupLocatorView methodsFor: 'controller access' stamp: 'ssa 11/27/2008 09:57'!\ndefaultControllerClass\n\n\t^RVMGroupLocatorController! !\n\n!RVMGroupLocatorView class methodsFor: 'instance creation' stamp: 'ssa 11/27/2008 09:57'!\non: aModel objectsSource: aBlockOrSelector\n\t\"(RVMGroupLocatorView on: Smalltalk objectsSource:#values) demo\"\n\t\"(RVMGroupLocatorView on: nil objectsSource:[String allInstances]) demo\"\n\t\n\t| v |\n\tv _ self new.\n\tv model: aModel.\n\tv objectsSource: aBlockOrSelector.\n\t^v! !\n\n!RVMGroupLocatorView class methodsFor: 'instance creation' stamp: 'ssa 11/27/2008 14:10'!\nopenOn: aModel objectsSource: aBlockOrSelector labeled: aString\n\t\"RVMGroupLocatorView openOn: Smalltalk objectsSource:#allClasses labeled:'All Classes'\"\n\t\"RVMGroupLocatorView openOn: nil objectsSource:[Array allInstances] labeled: 'All Arrays'\"\n\t| topView v |\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\ttopView minimumSize: 150@150.\n\ttopView maximumSize: 800@800.\n\tv := self on: aModel objectsSource: aBlockOrSelector.\n\tv borderWidth:1.\n\ttopView addSubView: v  viewport:(0@0 extent: 150@150).\n\ttopView label: aString.\n\ttopView controller open! !\n\n!RVMGroupLocatorView class methodsFor: 'instance creation' stamp: 'ssa 11/27/2008 13:36'!\nopenWithSourceEditorOn: aModel objectsSource: aBlockOrSelector\n\t\"RVMGroupLocatorView openWithSourceEditorOn: Smalltalk objectsSource:#values\"\n\t\"RVMGroupLocatorView openWithSourceEditorOn: nil objectsSource:[Array allInstances]\"\n\t| topView v ptv cbv |\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\ttopView minimumSize: 150@170.\n\ttopView maximumSize: 400@425.\n\tv := self on: aModel objectsSource: aBlockOrSelector.\n\tv borderWidth:1.\n\tptv _ PluggableTextView on: v text:#objectsSourceSource accept:#objectsSourceSource:.\n\tptv borderWidth:1.\n\tcbv _ RVMColorButtonView on: v colorGetter:#color colorSetter:#changeColorTo:.\n\tcbv borderWidth:1.\n\ttopView addSubView: v  viewport:(0@0 extent: 150@150).\n\ttopView addSubView: cbv  viewport:(0@150 extent:20@20).\n\ttopView addSubView: ptv  viewport:(20@150 extent:130@20).\n\ttopView label: 'Group Locator'.\n\ttopView controller open! !\n\n!RVMGroupStats methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:05'!\ncoreIndices\n\t\"Answer a collection of points that give my core indicies as row@column\"\n\t| points |\n\tpoints _ OrderedCollection new.\n\t1 to: self height do:[:h|\n\t\t1 to: self width do:[:w|\n\t\t\th*w-1 + w > self groupSize ifTrue:[^points  \"handle odd last row case\"].\n\t\t\tpoints add: w@h]].\n\t^points! !\n\n!RVMGroupStats methodsFor: 'accessing' stamp: 'ssa 11/13/2008 09:41'!\nextent\n\t\"Answer the dimensions of my tile grid\"\n\t^self width @ self height! !\n\n!RVMGroupStats methodsFor: 'accessing' stamp: 'dmu 8/15/2008 21:56'!\ngroupSize  ^ groupSize! !\n\n!RVMGroupStats methodsFor: 'accessing' stamp: 'dmu 8/15/2008 21:56'!\ngroupSize: x groupSize _ x! !\n\n!RVMGroupStats methodsFor: 'accessing' stamp: 'dmu 1/1/1970 00:01'!\nheight ^ height! !\n\n!RVMGroupStats methodsFor: 'accessing' stamp: 'dmu 1/1/1970 00:01'!\nheight: x height _ x! !\n\n!RVMGroupStats methodsFor: 'accessing' stamp: 'dmu 8/15/2008 21:55'!\nmainRank  ^ mainRank! !\n\n!RVMGroupStats methodsFor: 'accessing' stamp: 'dmu 8/15/2008 21:57'!\nmainRank: x mainRank _ x! !\n\n!RVMGroupStats methodsFor: 'accessing' stamp: 'dmu 8/15/2008 21:55'!\nmainX  ^ mainX! !\n\n!RVMGroupStats methodsFor: 'accessing' stamp: 'dmu 8/15/2008 21:57'!\nmainX: x mainX _ x! !\n\n!RVMGroupStats methodsFor: 'accessing' stamp: 'dmu 8/15/2008 21:55'!\nmainY  ^ mainY! !\n\n!RVMGroupStats methodsFor: 'accessing' stamp: 'dmu 8/15/2008 21:57'!\nmainY: y mainY _ y! !\n\n!RVMGroupStats methodsFor: 'accessing' stamp: 'dmu 8/15/2008 21:56'!\nremaining  ^ remaining! !\n\n!RVMGroupStats methodsFor: 'accessing' stamp: 'dmu 8/15/2008 21:57'!\nremaining: r remaining _ r! !\n\n!RVMGroupStats methodsFor: 'accessing' stamp: 'dmu 1/1/1970 00:00'!\nwidth ^ width! !\n\n!RVMGroupStats methodsFor: 'accessing' stamp: 'dmu 1/1/1970 00:01'!\nwidth: x width _ x! !\n\n!RVMGroupStats methodsFor: 'initialize-release' stamp: 'ssa 8/19/2008 10:56'!\ninitializeFastFrom: data\n\n\tself mainX:(data at: 2).\n\tself mainY: (data at: 4).\n\tself mainRank: (data at: 6).\n\tself width: (data at: 8).\n\tself height: (data at: 10).\n\tself groupSize: (data at: 12).\n\tself remaining: (data at: 14).\n\t! !\n\n!RVMGroupStats methodsFor: 'initialize-release' stamp: 'dmu 8/15/2008 22:07'!\ninitializeFrom: data\n1 to: data size by: 2 do: [:i|\n\tself perform: ((data at: i), ':') asSymbol with: (data at: i + 1)\n\t]! !\n\n!RVMHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:06'!\nallocationsSinceLastQuery\n\t\"Answer the number of object allocations since the last query\"\n\tallocationsSinceLastQuery isNil ifTrue:[^0].\n\t^allocationsSinceLastQuery! !\n\n!RVMHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:07'!\nallocationsSinceLastQuery: count\n\t\"Set the number of object allocations since the last query\"\n\tallocationsSinceLastQuery := count! !\n\n!RVMHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:04'!\nbytesLeft\n\t\"Answer the number of bytes left in this heap\"\n\tbytesLeft isNil ifTrue:[^0].\n\t^bytesLeft! !\n\n!RVMHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:05'!\nbytesLeft: count\n\t\"Set the number of bytes left in this heap\"\n\tbytesLeft := count! !\n\n!RVMHeapStats methodsFor: 'acessing' stamp: 'ssa 10/4/2008 08:38'!\nbytesUsed\n\t\"Answer the number of bytes used in this heap\"\n\tbytesUsed isNil ifTrue:[^0].\n\t^bytesUsed ! !\n\n!RVMHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:04'!\nbytesUsed: count\n\t\"Set the number of bytes used in this heap\"\n\tbytesUsed := count! !\n\n!RVMHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:06'!\ncompactionsSinceLastQuery\n\t\"Answer the number of object compactions since the last query\"\n\tcompactionsSinceLastQuery isNil ifTrue:[^0].\n\t^compactionsSinceLastQuery! !\n\n!RVMHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:07'!\ncompactionsSinceLastQuery: count\n\t\"Set the number of object compactions since the last query\"\n\tcompactionsSinceLastQuery := count! !\n\n!RVMHeapStats methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:27'!\nreadWrite\n\t\"Answer the value of readWrite\"\n\n\treadWrite isNil ifTrue:[self readWrite: true].\n\t^ readWrite! !\n\n!RVMHeapStats methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:27'!\nreadWrite: anObject\n\t\"Set the value of readWrite\"\n\n\treadWrite _ anObject! !\n\n!RVMHeapStats class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:27'!\nnewReadMostly\n\n\t^self new readWrite: false ! !\n\n!RVMHeapStats class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:28'!\nnewReadWrite\n\n\t^self new readWrite: true! !\n\n!RVMKiviatController methodsFor: 'control activity' stamp: 'ads 1/30/2011 23:31'!\naddCoreAspect\n\t| menu selectedAspect |\n\tself view topView dontDisplayWhile:[\nmenu := CustomMenu new.\n RVMMulticoreSample coreAspects do:[:aspect|\n\t\t\tmenu add:  aspect action: aspect].\n\t\t\tselectedAspect := menu startUp: nil withCaption: 'Select a core aspect to monitor' at: Sensor cursorPoint.\n\t\t\tselectedAspect notNil ifTrue:[ self view addAspect: selectedAspect]].\n\t\t\tself view drawOnCanvas.\n\t\t\tself view displayView\n\t\t\t! !\n\n!RVMKiviatController methodsFor: 'control activity' stamp: 'ssa 10/20/2008 10:26'!\nchangeRescaleCounter\n\t| result |\n\tself view dontDisplayWhile:[\n\tresult _ FillInTheBlank request:'How many samples between rescaling?' initialAnswer: self view rescaleCounterDefault printString.\n\tresult isNil ifFalse:[result _ result asNumber max:0.\n\tself view rescaleCounterDefault:result]].\n\tself view displayView! !\n\n!RVMKiviatController methodsFor: 'control activity' stamp: 'ssa 10/7/2008 19:52'!\ninspectView\n\nself view inspect! !\n\n!RVMKiviatController methodsFor: 'control activity' stamp: 'ssa 11/11/2008 17:37'!\nredButtonActivity\n\t\n\t((self view adjustScaleBox translateBy: self view insetDisplayBox origin)  containsPoint: Sensor cursorPoint) ifTrue:[Sensor waitNoButton.\n\t\tself spawnScaleAdjuster]! !\n\n!RVMKiviatController methodsFor: 'control activity' stamp: 'ssa 10/7/2008 18:55'!\nremoveAspect\n\t| menu selectedAspect |\n\tself view topView dontDisplayWhile:[\nmenu := CustomMenu new.\n self view aspects do:[:aspect|\n\t\t\tmenu add:  aspect action: aspect].\n\t\t\tselectedAspect := menu startUp: nil withCaption: 'Select aspect to remove:' at: Sensor cursorPoint.\n\t\t\tselectedAspect notNil ifTrue:[ self view removeAspect: selectedAspect].\n\t\t\t].\n\t\t\tself view drawOnCanvas.\n\t\t\tself view displayView\n! !\n\n!RVMKiviatController methodsFor: 'control activity' stamp: 'ssa 10/7/2008 19:06'!\nrescale\n\n\tself view resetScaling.\n\tself view displayView! !\n\n!RVMKiviatController methodsFor: 'control activity' stamp: 'ssa 10/20/2008 09:06'!\nyellowButtonActivity\n\t| menu answer onlyOne maxed |\n\tonlyOne _ self view aspectCount = 1.\n\tmaxed _ self view aspectCount = 4.\n\tself view topView dontDisplayWhile:[\n\tmenu := CustomMenu new.\n\tmenu add:'Inspect View' action:#inspectView.\n\tmenu add:'Rescale' action:#rescale.\n\tmenu add:'Change Rescale Counter' action:#changeRescaleCounter.\n \tonlyOne ifTrue:[menu add: 'Change aspect' action: #changeAspect.\n \t\tmenu addLine].\n\tmaxed ifFalse:[\n \t\tmenu add: 'Add core aspect' action: #addCoreAspect].\n\tonlyOne ifFalse:[menu addLine.\n \t\tmenu add: 'Remove aspect' action: #removeAspect.].\n\tanswer := menu startUp: nil withCaption: '' at: Sensor cursorPoint].\n\tanswer notNil ifTrue:[self perform: answer]! !\n\n!RVMKiviatController methodsFor: 'menu messages' stamp: 'ssa 10/7/2008 19:38'!\nchangeAspect\n\n\t| menu answer newAspect |\nself view topView dontDisplayWhile:[\n\t\tmenu := CustomMenu new.\n\tmenu add: 'Core aspects' action: #core.\n\tmenu add: 'Test aspects' action: #testCore.\n\tanswer := menu startUp: nil withCaption: 'What kind of aspect would you like to monitor?' at: Sensor cursorPoint.\n\tanswer isNil ifTrue:[^self].\n\tnewAspect _ RVMMulticoreSample aspectFromUserUnder: answer.\n\tnewAspect isNil ifTrue:[^self].\n\tself view aspect = newAspect ifTrue:[^self].\n\tself view aspect: newAspect].\n\tself view resetScaling.\n\tself view drawOnCanvas.\n\tself view displayView! !\n\n!RVMKiviatController methodsFor: 'menu messages' stamp: 'ssa 5/12/2010 10:20'!\nspawnScaleAdjuster\n\n\t|  maxView minView topView resetScaleButton setToObservedButton autoScaleCheckBox height scalerIndex result |\n\t(self view scalers size  = 1 or:[self view commonScale])ifFalse:[result _ (PopUpMenu labelArray:self view aspects) startUpWithCaption:'Adjust the scale of which aspect?'.\n\t\tresult = 0 ifTrue:[^self].\n\t\tscalerIndex _ result]ifTrue:[scalerIndex _ 1].\n\tmaxView _ RVMValueEditorView  on: (view scalerAt: scalerIndex) valueGetter: [(view scalerAt: scalerIndex) max] valueSetter:[:v|(view scalerAt: scalerIndex) setMax:v. view drawOnCanvas; displayView] label:'max: '.\n\tmaxView lockGetter:#maxLocked; lockSetter:#maxLocked:.\n\tminView _ RVMValueEditorView  on: (view scalerAt: scalerIndex) valueGetter: [(view scalerAt: scalerIndex) min] valueSetter:[:v|(view scalerAt: scalerIndex) setMin:v.  view drawOnCanvas; displayView] label:'min: '.\n\tminView lockGetter:#minLocked; lockSetter:#minLocked:.\n\tresetScaleButton _ RVMButtonView label:'Reset scale to default' action:[(view scalerAt: scalerIndex) resetScaling.  view drawOnCanvas; displayView.  minView hear:nil.  maxView hear:nil].\n\tsetToObservedButton _ RVMButtonView label:'Set scale to observed values' action:[(view scalerAt: scalerIndex) setRangeToObserved.  view drawOnCanvas; displayView.  minView hear:nil.  maxView hear:nil].\n\tautoScaleCheckBox _ RVMCheckBoxView on: (view scalerAt: scalerIndex) label: 'Automatic Scaling' checkState: [(view scalerAt: scalerIndex) automaticScaling] whenChecked: [(view scalerAt: scalerIndex) automatic.  view drawOnCanvas; displayView.  minView hear:nil.  maxView hear:nil] whenUnchecked: [(view scalerAt: scalerIndex) manual. view drawOnCanvas; displayView.  minView hear:nil.  maxView hear:nil] monitor: true.\n\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\ttopView addSubView: minView.\n\ttopView addSubView: maxView below:  minView.\n\ttopView addSubView: resetScaleButton below:  maxView.\n\ttopView addSubView: setToObservedButton below:  resetScaleButton.\n\ttopView addSubView: autoScaleCheckBox below:  setToObservedButton.\n\tRVMMonitor forgetAll:{resetScaleButton. setToObservedButton. autoScaleCheckBox}.\n\ttopView label: (view aspects at: scalerIndex).\n\theight _ topView subViews size * 26.\n\ttopView minimumSize:200@height.\n\ttopView maximumSize: 200@height.\n\tself scalerAdjusters add: topView.\n\ttopView controller open! !\n\n!RVMKiviatController methodsFor: 'accessing' stamp: 'ssa 11/11/2008 18:32'!\nscalerAdjusters\n\t\"Answer the value of scalerAdjusters\"\n\n\tscalerAdjusters isNil ifTrue:[self scalerAdjusters: OrderedCollection new].\n\t^ scalerAdjusters! !\n\n!RVMKiviatController methodsFor: 'accessing' stamp: 'ssa 11/11/2008 18:31'!\nscalerAdjusters: anObject\n\t\"Set the value of scalerAdjusters\"\n\n\tscalerAdjusters _ anObject! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ads 1/30/2011 23:31'!\nadjustScaleBox\n\t\"Answer the value of adjustScaleBox\"\n\t\n\tadjustScaleBox isNil ifTrue:[self adjustScaleBox: self insetDisplayBox].\n\t^ adjustScaleBox! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 11/11/2008 17:20'!\nadjustScaleBox: anObject\n\t\"Set the value of adjustScaleBox\"\n\n\tadjustScaleBox _ anObject! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 11:22'!\naspect\n\t\"Answer the value of aspect\"\n\n\taspect isNil ifTrue:[self aspect: #test0to100].\n\t^ aspect! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 17:23'!\naspect: anObject\n\t\"Set the value of aspect\"\n\n\taspect _ anObject.\n\tself lastAverage: nil.\n\tself lastTotal: nil.\n\tself topView == self ifFalse:[self topView relabel: anObject asString]! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 17:22'!\naspectCount\n\n\t^1! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/10/2008 18:39'!\nbackgroundCanvas\n\t\"Answer the value of backgroundCanvas\"\n\n\tbackgroundCanvas isNil ifTrue:[ self backgroundCanvas:(ColorForm extent: self canvasExtent depth:8).\n\t\tself spokePens do:[:pen| pen destForm: backgroundCanvas].\n\t\tself drawBackgroundCanvas.].\n\t^ backgroundCanvas! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 13:53'!\nbackgroundCanvas: anObject\n\t\"Set the value of backgroundCanvas\"\n\n\tbackgroundCanvas _ anObject\n! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 11/12/2008 13:08'!\nblinker\n\t\"Answer the value of blinker\"\n\n\tblinker isNil ifTrue:[self blinker: true].\n\tself blinker: blinker not.\n\t^ blinker! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 11/12/2008 13:08'!\nblinker: anObject\n\t\"Set the value of blinker\"\n\n\tblinker _ anObject! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/10/2008 18:39'!\ncanvas\n\t\"Answer the value of canvas\"\n\n\tcanvas isNil ifTrue:[self canvas: (ColorForm extent: self canvasExtent depth:8)].\n\t^ canvas! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 14:11'!\ncanvas: anObject\n\t\"Set the value of canvas\"\n\n\tcanvas _ anObject.\n\tself webPen destForm: anObject.\n\tself spokePens:nil! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/8/2008 18:00'!\ncanvasExtent\n\t\"Answer the extent of my canvas\"\n\t^self insetDisplayBox extent  ! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 13:38'!\ncenter\n\n\t^self canvas center! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 17:08'!\ncenterMargin\n\t\"the distance from center to the start of a spoke\"\n\t^20! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 14:13'!\ndiameter\n\t\"Answer the smallest square diameter for this view's box\"\n\t^self canvas height < self canvas width\n\t\tifTrue:[self canvas height- (self labelRowCount * 10)]\n\t\tifFalse:[self canvas width - 20]! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 14:17'!\ndrawingBackground\n\t\"Answer the value of drawingBackground\"\n\n\tdrawingBackground isNil ifTrue:[self drawingBackground: false].\n\t^ drawingBackground! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 14:17'!\ndrawingBackground: anObject\n\t\"Set the value of drawingBackground\"\n\n\tdrawingBackground _ anObject! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/8/2008 18:52'!\nfirstDisplay\n\t\"Answer the value of firstDisplay\"\n\n\tfirstDisplay isNil ifTrue:[self firstDisplay: false].\n\t^ firstDisplay! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/8/2008 15:13'!\nfirstDisplay: anObject\n\t\"Set the value of firstDisplay\"\n\n\tfirstDisplay _ anObject! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 01:18'!\nlabelRowCount\n\t\"How many rows of labels will I have?\"\n\t^2! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 02:25'!\nlastAverage\n\t\"Answer the value of lastAverage\"\n\n\tlastAverage isNil ifTrue:[self lastAverage: 0].\n\t^ lastAverage! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 02:25'!\nlastAverage: anObject\n\t\"Set the value of lastAverage\"\n\n\tlastAverage _ anObject! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 02:25'!\nlastTotal\n\t\"Answer the value of lastTotal\"\n\n\tlastTotal isNil ifTrue:[self lastTotal: 0].\n\t^ lastTotal! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 02:25'!\nlastTotal: anObject\n\t\"Set the value of lastTotal\"\n\n\tlastTotal _ anObject! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 14:37'!\nmajorTicLength\n\t\n\t^8! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 14:35'!\nmajorTicSpacing\n\n\t^self spokeLength / (self numberOfMajorTics - 1) asFloat! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 14:36'!\nminorTicLength\n\t\n\t^4! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 14:36'!\nminorTicSpacing\n\n\t^self majorTicSpacing /( self numberOfMinorTics + 1)! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 14:38'!\nnumberOfMajorTics\n\n\t^3! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 14:37'!\nnumberOfMinorTics\n\n\t^1! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 13:56'!\nradius\n\t\"Answer the smallest radius for this view's box\"\n\t^self diameter // 2! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/20/2008 10:25'!\nrescaleCounter\n\t\"Answer the value of rescaleCounter\"\n\n\trescaleCounter isNil ifTrue:[self rescaleCounter: self rescaleCounterDefault].\n\t^ rescaleCounter! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 15:02'!\nrescaleCounter: anObject\n\t\"Set the value of rescaleCounter\"\n\n\trescaleCounter _ anObject! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/20/2008 10:25'!\nrescaleCounterDefault\n\t\"Answer the value of rescaleCounterDefault\"\n\n\trescaleCounterDefault isNil ifTrue:[self rescaleCounterDefault: 10].\n\t^ rescaleCounterDefault! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/20/2008 10:25'!\nrescaleCounterDefault: anObject\n\t\"Set the value of rescaleCounterDefault\"\n\n\trescaleCounterDefault _ anObject! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 11:25'!\nscaler\n\t\"Answer the value of scaler\"\n\n\tscaler isNil ifTrue:[self scaler: RVMDataScaler new automatic].\n\t^ scaler! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 11:22'!\nscaler: anObject\n\t\"Set the value of scaler\"\n\n\tscaler _ anObject! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 22:07'!\nspokeColor\n\t\"Answer the value of spokeColor\"\n\n\tspokeColor isNil ifTrue:[self spokeColor: Color gray lighter lighter].\n\t^ spokeColor! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 13:21'!\nspokeColor: anObject\n\t\"Set the value of spokeColor\"\n\n\tspokeColor _ anObject! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 14:30'!\nspokeLength\n\n\t^self radius - self centerMargin - 5! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 11:25'!\nspokePens\n\t\"Answer the value of spokePens\"\n\n\tspokePens isNil ifTrue:[self spokePens: self initializeSpokePens].\n\t^ spokePens! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 11:22'!\nspokePens: anObject\n\t\"Set the value of spokePens\"\n\n\tspokePens _ anObject! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 13:21'!\nwebColor\n\t\"Answer the value of webColor\"\n\n\twebColor isNil ifTrue:[self webColor: Color blue].\n\t^ webColor! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 13:21'!\nwebColor: anObject\n\t\"Set the value of webColor\"\n\n\twebColor _ anObject! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 17:06'!\nwebPen\n\t\"Answer the value of webPen\"\n\n\twebPen isNil ifTrue:[self webPen: Pen new.\n\t\twebPen color: self webColor.\n\t\twebPen defaultNib:2.\n\t\twebPen  combinationRule: Form over.\n\t\twebPen destForm: self canvas].\n\t^ webPen! !\n\n!RVMKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 13:29'!\nwebPen: anObject\n\t\"Set the value of webPen\"\n\n\twebPen _ anObject! !\n\n!RVMKiviatView methodsFor: 'drawing' stamp: 'ssa 11/11/2008 17:19'!\nadjustScaleIcon\n^((ColorForm\n\textent: 16@31\n\tdepth: 8\n\tfromArray: #( 0 0 0 0 0 0 169614364 622594560 0 0 1694498815 4294913536 0 0 1845490943 4294915840 0 0 0 3506384384 0 0 0 3506386688 73 1677721600 0 3657379328 163 3642490880 0 3506386688 9716 4287692800 172 4110364160 46591 4294913536 208 4110366464 4259839 4294936576 0 3506384384 8973264 4106150400 0 3657381632 6558618 3942664503 0 3506384384 154 3942645760 0 3657381632 154 3942645760 25700 3808374272 154 3942645760 60415 4294915840 154 3942645760 18761 3808374272 154 3942645760 0 3506386688 2424986 3942648357 0 3657379328 11304867 3947480869 0 3506386688 7798783 4294948096 0 3506384384 1300991 4294925056 217 4294915840 25855 4291821568 145 3959369216 199 4098424832 0 3657381632 118 2432696320 0 3506384384 28 620756992 0 3506386688 0 0 0 3657379328 0 0 1541003737 4110366464 0 0 1694498815 4294913536 0 0 321795886 1227753984 0 0 0 0)\n\toffset: 0@0)\n\tcolorsFromArray: #(#(1.0 1.0 1.0) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0)  ))! !\n\n!RVMKiviatView methodsFor: 'drawing' stamp: 'ssa 11/11/2008 17:34'!\ndrawAdjustScaleIcon\n\t| adjustIcon origin |\n.\n\tadjustIcon _ self adjustScaleIcon.\n\torigin _ self backgroundCanvas boundingBox leftCenter - adjustIcon boundingBox leftCenter + (4@0).\n\tadjustIcon displayOn: self backgroundCanvas at: origin.\n\tself adjustScaleBox:(origin extent: adjustIcon extent)! !\n\n!RVMKiviatView methodsFor: 'drawing' stamp: 'ssa 11/11/2008 17:18'!\ndrawBackgroundCanvas\n\tself drawingBackground: true.\n\tself backgroundCanvas fillWhite.\n\tself drawSpokes.\n\tself drawAdjustScaleIcon.\n\tself drawingBackground: false\n\t! !\n\n!RVMKiviatView methodsFor: 'drawing' stamp: 'ssa 11/11/2008 23:07'!\ndrawCounterOnCanvas\n\t|  counterLabel |\n\tself scaler automaticScaling ifFalse:[^self].\n\tcounterLabel _ ('rescale\nin: ',self rescaleCounter printString ) asDisplayText.\n\tcounterLabel displayOn: self canvas at: self canvas boundingBox bottomRight -(counterLabel width@90).\n! !\n\n!RVMKiviatView methodsFor: 'drawing' stamp: 'ssa 10/7/2008 15:29'!\ndrawLabelsOnCanvas\n\t\n\t| minLabel maxLabel  aspectLabel avgLabel totalLabel start |\n\taspectLabel _ self aspect asString asDisplayText.\n\taspectLabel foregroundColor: self webColor backgroundColor: Color transparent.\n\taspectLabel displayOn: self canvas at:  (2 @ -4).\n\tminLabel _ ('min: ',self scaler min printShowingMax3Digits) asDisplayText.\n\tmaxLabel _ ('max: ',self scaler max printShowingMax3Digits) asDisplayText.\n\tminLabel foregroundColor: self webColor backgroundColor: Color transparent.\n\tmaxLabel foregroundColor: self webColor backgroundColor: Color transparent.\n\tminLabel displayOn: self canvas at: 0@((aspectLabel height //2)-2)clippingBox: self canvas boundingBox rule: Form paint fillColor:nil.\n\tmaxLabel displayOn: self canvas at: 0@(start _ maxLabel height) clippingBox: self canvas boundingBox rule: Form paint fillColor:nil.\n\tavgLabel _ ('avg: ',self lastAverage printShowingMax3Digits) asDisplayText.\n\ttotalLabel _ ('total: ',self lastTotal printShowingMax3Digits) asDisplayText.\n\tavgLabel foregroundColor: self webColor backgroundColor: Color transparent.\n\ttotalLabel foregroundColor: self webColor backgroundColor: Color transparent.\n\ttotalLabel displayOn: self canvas at: 0@(start _start +(totalLabel height - 6)) clippingBox: self canvas boundingBox rule: Form paint fillColor:nil.\n\tavgLabel displayOn: self canvas at: 0@( start + (maxLabel height - 6)) clippingBox: self canvas boundingBox rule: Form paint fillColor:nil.\n\n! !\n\n!RVMKiviatView methodsFor: 'drawing' stamp: 'ssa 10/6/2008 14:16'!\ndrawMajorTicUsing: pen\n\n\tpen turn:90; go: self majorTicLength/2;turn:180;down;go:self majorTicLength;up;\n\t\t\tturn:180; go: self majorTicLength/2;turn:-90! !\n\n!RVMKiviatView methodsFor: 'drawing' stamp: 'ssa 10/6/2008 14:16'!\ndrawMinorTicUsing: pen\n\n\tpen turn:90; go: self minorTicLength/2;turn:180;down;go:self minorTicLength;up;\n\t\t\tturn:180; go: self minorTicLength/2;turn:-90! !\n\n!RVMKiviatView methodsFor: 'drawing' stamp: 'ssa 10/8/2008 19:16'!\ndrawOnCanvas\n\tself drawingBackground ifTrue:[^self].\n\tself backgroundCanvas displayOn: self canvas at: 0@0.\n\tself drawCounterOnCanvas.\n\tself drawWeb.\n\tself drawLabelsOnCanvas.\n! !\n\n!RVMKiviatView methodsFor: 'drawing' stamp: 'ssa 11/17/2008 13:25'!\ndrawSpokes\n\n\t| pen label labelOffsets labelOffset mainIndex oldColor |\n\tmainIndex _ RVMMonitor mainRank + 1.\n\t1 to: self spokePens size do:[:index|\n\t\tpen _ self spokePens at: index.\n\t\toldColor _ pen color.\n\t\tindex = mainIndex ifTrue:[pen color: Color red].\n\t\tpen destForm: self backgroundCanvas.\n\t\tpen place: self center.\n\t\tpen up; go: self centerMargin.\n\t\tpen down;go: self spokeLength;up.\n\t\tlabel _ (index - 1) printString asDisplayText asParagraph asForm.\n\t\tself diameter < 300 ifTrue:[label _ label scaledToSize: 11@11].\n\t\tlabelOffsets _ {0@label height negated.  0@0. label width negated@0.  label extent negated}.\n\t\tlabelOffset _ labelOffsets at: ((index - 1// (self spokePens size / 4) + 1) min:4).\n\t\tlabel displayOn: self backgroundCanvas at: pen location + labelOffset clippingBox: self backgroundCanvas boundingBox rule: Form paint fillColor: nil.\n\t\tself drawTicsUsing: pen.\n\t\tpen color: oldColor]\n\t\t! !\n\n!RVMKiviatView methodsFor: 'drawing' stamp: 'ssa 10/6/2008 11:54'!\ndrawTicsUsing: pen\n\n\tpen up;place: self center;go:self centerMargin.\n\tself drawMajorTicUsing: pen.\n\tself numberOfMajorTics - 1 timesRepeat:[\n\t\tself numberOfMinorTics timesRepeat:[\n\t\t\tpen go: self minorTicSpacing.\n\t\t\tself drawMinorTicUsing: pen].\n\t\tpen go: self minorTicSpacing.\n\t\tself drawMajorTicUsing: pen].\n\t! !\n\n!RVMKiviatView methodsFor: 'drawing' stamp: 'ssa 10/7/2008 14:18'!\ndrawWeb\n\tself drawingBackground ifTrue:[^self].\n\tself placeSpokePens.\n\tself webPen color: self webColor.\n\tself webPen up;place: self spokePens first location;down.\n\tself spokePens do:[:pen|\n\t\tself webPen goto: pen location].\n\tself webPen goto: self spokePens first location;up\n\t! !\n\n!RVMKiviatView methodsFor: 'drawing' stamp: 'dmu 8/23/2010 17:39'!\nplaceSpokePens\n\n\t| data tot |\n\tdata _ RVMMonitor lastSample perform: self aspect.\n\ttot _ 0.\n\tself spokePens size = data size ifFalse: [self resetAfterCoreCountChange].\n\tdata with: self spokePens do:[:datum :pen|\n\t\ttot _ tot + datum.\n\t\tpen up;place: self center;go:self centerMargin.\n\t\tpen go:(self spokeLength /100.0*(self scaler scale: datum))].\n\tself lastTotal: tot.\n\tself lastAverage: tot / data size! !\n\n!RVMKiviatView methodsFor: 'drawing' stamp: 'dmu 8/23/2010 17:38'!\nresetAfterCoreCountChange\n\tself spokePens: nil. backgroundCanvas _ nil! !\n\n!RVMKiviatView methodsFor: 'framing' stamp: 'ssa 10/8/2008 15:20'!\nfirstFrame\n\t! !\n\n!RVMKiviatView methodsFor: 'framing' stamp: 'ssa 10/8/2008 19:20'!\nnewFrame\n\tself canvas:nil.\n\tself backgroundCanvas:nil.\n\tself drawOnCanvas.\n\tDisplay fill: self insetDisplayBox fillColor: Color white.\n\tself displayView! !\n\n!RVMKiviatView methodsFor: 'scaling' stamp: 'ssa 10/8/2008 18:52'!\nresetScaling\n\n\tself scaler resetScaling.\n! !\n\n!RVMKiviatView methodsFor: 'initialize-release' stamp: 'ssa 10/6/2008 16:42'!\ninitializeSpokePens\n\n\t| pens numberOfSpokes spacing center pen |\n\tpens _ OrderedCollection new.\n\tnumberOfSpokes _ RVMMonitor coreCount.\n\tspacing _ 360 / numberOfSpokes asFloat.\n\tcenter _ self insetDisplayBox center.\n\tnumberOfSpokes timesRepeat:[\n\t\tpen _ Pen new.\n\t\tpen defaultNib:1.\n\t\tpen  combinationRule: Form over.\n\t\tpen color: self spokeColor.\n\t\tpen place: center.\n\t\tpen north.\n\t\tpen turn: pens size * spacing.\n\t\tpens add: pen].\n\t^pens! !\n\n!RVMKiviatView methodsFor: 'initialize-release' stamp: 'ssa 11/11/2008 21:41'!\nrelease\n\t\"self controller scalerAdjusters do:[:each| each topView controller closeAndUnscheduleNoTerminate].\t\n\tself controller scalerAdjusters: nil.\"\n\tsuper release! !\n\n!RVMKiviatView methodsFor: 'displaying' stamp: 'ssa 11/12/2008 13:16'!\ndisplayView\n\t\"Display my canvas at my offset.\n\tSubclasses should not override this method but should draw on the canvas instead\"\n\tself firstDisplay  ifFalse:[self firstDisplay:true.\n\t\tself drawOnCanvas].\n\tself okToDisplay ifFalse:[^self].\n\tself uncache.\n\tself canvas displayOn: Display at: self insetDisplayBox center - self canvas center clippingBox: self insetDisplayBox.\n\tself blinker  ifTrue:[(Form dotOfSize:5) displayOn: Display at: self insetDisplayBox center]\n! !\n\n!RVMKiviatView methodsFor: 'controller access' stamp: 'ssa 10/6/2008 13:35'!\ndefaultControllerClass\n\t^RVMKiviatController! !\n\n!RVMKiviatView methodsFor: 'listening' stamp: 'dmu 2/6/2009 22:35'!\nhear: something\n\t\"Update my traces and redisplay\"\n\tself firstDisplay ifFalse:[^self].\n\tself rescaleCounter: self rescaleCounter - 1.\n\tself rescaleCounter = 0 ifTrue:[self rescaleCounter:nil.  \n\t\tself resetScaling.]. \n\tself drawingBackground ifTrue:[^self].\n\tself drawOnCanvas.\n\tself displayView! !\n\n!RVMKiviatView commentStamp: '<historical>' prior: 0!\nI'm a kiviat chart for displaying core aspect data!\n!RVMKiviatView class methodsFor: 'examples' stamp: 'ssa 10/6/2008 16:00'!\nexample\n\t\"RVMKiviatView example\"\n\tself openOnAspect: #bytesUseds! !\n\n!RVMKiviatView class methodsFor: 'instance creation' stamp: 'ssa 10/7/2008 13:58'!\nopenOnAspect: aSymbol\n\t\"RVMKiviatView example\"\n\t\n\t| topView v |\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\ttopView minimumSize: 300@250.\n\ttopView maximumSize: 600@500.\n\tv := self new.\n\tv borderWidth:1.\n\tv aspect: aSymbol.\n\ttopView addSubView: v.\n\ttopView label: v aspect.\n\ttopView controller open! !\n\n!RVMLabelView methodsFor: 'displaying' stamp: 'ssa 9/14/2008 20:45'!\ndisplayView\n\t| labelRect labelText labelForm |\n\tlabelText := self label asDisplayText .\n\n\tlabelText foregroundColor: self backgroundColor\n\t\t\tbackgroundColor: self foregroundColor.\n\tlabelForm := labelText\n\t\t\t asParagraph asForm scaledToSize:(self insetDisplayBox extent min: labelText boundingBox extent).\n\tlabelRect := self insetDisplayBox.\n\tDisplay fill: labelRect fillColor: self foregroundColor.\n\tlabelForm displayOn: Display at: labelRect center - labelForm boundingBox center clippingBox: labelRect\n\t\t\trule: Form paint fillColor: labelText foregroundColor.\n! !\n\n!RVMLabelView methodsFor: 'accessing' stamp: 'ssa 8/26/2008 22:55'!\nlabel\n\t\"Answer the value of label\"\n\n\tlabel isNil ifTrue:[^'no label yet'].\n\t^label! !\n\n!RVMLabelView methodsFor: 'accessing' stamp: 'ssa 8/26/2008 22:54'!\nlabel: anObject\n\t\"Set the value of label\"\n\n\tlabel := anObject! !\n\n!RVMLabelView class methodsFor: 'instance creation' stamp: 'ssa 8/26/2008 23:02'!\nlabel: aString\n\n\t| view |\n\tview := self new.\n\tview label: aString.\n\t^view! !\n\n!RVMLocalHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:31'!\nfailedFetchRequestsSinceLastQuery\n\t\"Answer how many fetch requests failed since the last query\"\n\tfailedFetchRequestsSinceLastQuery isNil ifTrue:[^0].\n\t^failedFetchRequestsSinceLastQuery! !\n\n!RVMLocalHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:29'!\nfailedFetchRequestsSinceLastQuery: count\n\t\"Set how many fetch requests failed since the last query\"\n\tfailedFetchRequestsSinceLastQuery := count! !\n\n!RVMLocalHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 11:09'!\nobjectsFetchedSinceLastQuery\n\t\"Answer how many objects were fetched into this local heap since the last query\"\n\tobjectsFetchedSinceLastQuery isNil ifTrue:[^0].\n\t^objectsFetchedSinceLastQuery! !\n\n!RVMLocalHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 11:09'!\nobjectsFetchedSinceLastQuery: count\n\t\"Set how many objects were fetched into this local heap since the last query\"\n\tobjectsFetchedSinceLastQuery := count! !\n\n!RVMLocalHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:32'!\nobjectsFlushedSinceLastQuery\n\t\"Answer how many objects were flushed since the last query\"\n\tobjectsFlushedSinceLastQuery isNil ifTrue:[^0].\n\t^objectsFlushedSinceLastQuery! !\n\n!RVMLocalHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:32'!\nobjectsFlushedSinceLastQuery: count\n\t\"Set how many objects were flushed since the last query\"\n\tobjectsFlushedSinceLastQuery := count! !\n\n!RVMLocalHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:26'!\noverlyLargeFetchOrAllocationRequestsDeniedSinceLastQuery\n\t\"Answer how many 'cramden' requests were denied since the last query\"\n\toverlyLargeFetchOrAllocationRequestsDeniedSinceLastQuery isNil ifTrue:[^0].\n\t^overlyLargeFetchOrAllocationRequestsDeniedSinceLastQuery! !\n\n!RVMLocalHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:27'!\noverlyLargeFetchOrAllocationRequestsDeniedSinceLastQuery: count\n\t\"Set how many 'cramden' requests were denied since the last query\"\n\toverlyLargeFetchOrAllocationRequestsDeniedSinceLastQuery := count! !\n\n!RVMLocalHeapStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:11'!\nscope\n\t\"Answer my scope\"\n\t^'Local'! !\n\n!RVMLocalHeapStats methodsFor: 'testing' stamp: 'ssa 7/21/2008 10:11'!\nisLocal\n\n\t^true! !\n\n!RVMMemorySystemStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 18:15'!\ngcCount\n\t\"Answer the value of gcCount\"\n\n\tgcCount isNil ifTrue:[self gcCount: nil].\n\t^gcCount! !\n\n!RVMMemorySystemStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 18:15'!\ngcCount: anObject\n\t\"Set the value of gcCount\"\n\n\tgcCount := anObject! !\n\n!RVMMemorySystemStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 18:15'!\ngcCycles\n\t\"Answer the value of gcCycles\"\n\n\tgcCycles isNil ifTrue:[self gcCycles: nil].\n\t^gcCycles! !\n\n!RVMMemorySystemStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 18:15'!\ngcCycles: anObject\n\t\"Set the value of gcCycles\"\n\n\tgcCycles := anObject! !\n\n!RVMMemorySystemStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 18:15'!\ngcMilliseconds\n\t\"Answer the value of gcMilliseconds\"\n\n\tgcMilliseconds isNil ifTrue:[self gcMilliseconds: nil].\n\t^gcMilliseconds! !\n\n!RVMMemorySystemStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 18:15'!\ngcMilliseconds: anObject\n\t\"Set the value of gcMilliseconds\"\n\n\tgcMilliseconds := anObject! !\n\n!RVMMemorySystemStats methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:52'!\nreadMostlyHeapStats\n\t\"Answer the value of readMostlyHeapStats\"\n\n\treadMostlyHeapStats isNil ifTrue:[self readMostlyHeapStats: RVMHeapStats newReadMostly].\n\t^ readMostlyHeapStats! !\n\n!RVMMemorySystemStats methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:51'!\nreadMostlyHeapStats: anObject\n\t\"Set the value of readMostlyHeapStats\"\n\n\treadMostlyHeapStats _ anObject! !\n\n!RVMMemorySystemStats methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:51'!\nreadWriteHeapStats\n\t\"Answer the value of readWriteHeapStats\"\n\n\treadWriteHeapStats isNil ifTrue:[self readWriteHeapStats: RVMHeapStats newReadWrite].\n\t^ readWriteHeapStats! !\n\n!RVMMemorySystemStats methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:51'!\nreadWriteHeapStats: anObject\n\t\"Set the value of readWriteHeapStats\"\n\n\treadWriteHeapStats _ anObject! !\n\n!RVMMinMaxView class methodsFor: 'examples' stamp: 'ssa 9/13/2008 20:54'!\nexample\n\t\"RVMMinMaxView example\"\n\t| topView |\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\ttopView minimumSize: 100@50.\n\ttopView maximumSize: 200@100.\n\ttopView addSubView: self exampleInstance.\n\ttopView label: 'MinMax'.\n\ttopView controller open! !\n\n!RVMMinMaxView class methodsFor: 'examples' stamp: 'ssa 9/17/2008 13:56'!\nexampleInstance\n\n\t| scaler |\n\tscaler _ RVMDataScaler exampleInstance.\n\t^self on: scaler\n\t\tgetMin:  [scaler min]\n\t\tsetMin:[:v| scaler min: v]\n\t\tgetMax:  [scaler max]\n\t\tsetMax: [:v| scaler max: v].\n\t! !\n\n!RVMMinMaxView class methodsFor: 'instance creation' stamp: 'ssa 9/17/2008 13:53'!\non: aModel getMin: getMin setMin: setMin getMax: getMax setMax: setMax\n\t| view v |\n\tview _ self new.\n\tview addSubView: (v _ RVMValueView on: aModel valueGetter: getMin valueSetter: setMin label:'m').\n\tview addSubView: (RVMValueView on: aModel valueGetter: getMax valueSetter: setMax  label:'M') above: v.\n\t^view! !\n\n!RVMMonitor class methodsFor: 'recording' stamp: 'ssa 10/19/2008 00:27'!\ncloseRecordingFile\n\t\"Close the recording file\"\n\tself recordingFile flush;close.\n\tself recordingFile: nil! !\n\n!RVMMonitor class methodsFor: 'recording' stamp: 'ssa 10/18/2008 22:41'!\nisRecording\n\n\t^self recordingMode ~= #off! !\n\n!RVMMonitor class methodsFor: 'recording' stamp: 'ssa 10/28/2008 15:32'!\nloadChunkedSamplesFromRecordingFile\n\t\"Load the samples with the data on a file supplied by the user\"\n\t| fs data chunk readChunkTime compileChunkTime |\n\tfs _ StandardFileMenu oldFileStreamWithPattern:'*.recording'.\n\tfs isNil ifTrue:[^self inform:'No file to load'].\n\tCursor read showWhile:[\n\tdata _ OrderedCollection new.\n\t[fs atEnd] whileFalse:[Transcript cr;show:'reading data chunk #',(data size + 1) printString.\n\treadChunkTime _ Time millisecondsToRun:[chunk _ fs nextChunk].\n\tTranscript cr;show:(readChunkTime //1000 )printString,' secs to read chunk'.\n\tcompileChunkTime _ Time millisecondsToRun:[data add: (Compiler evaluate: chunk)].\n\tTranscript cr;show: (compileChunkTime //1000) printString,' secs to compile chunk'.\n\t].\n\tfs close.\n\tself recordingMode = #file ifTrue:[self recordingMode: #loop].\n\tself recordingMode = #loop ifTrue:[data _ data asCircularCollection].\n\tself samples: data asCircularCollection].\n\tself changed:#recordingMode\n\n! !\n\n!RVMMonitor class methodsFor: 'recording' stamp: 'ssa 10/28/2008 19:45'!\nloadSamplesFromRecordingFile\n\t\"Load the samples with the data on a file supplied by the user\"\n\t| fs data readChunkTime  |\n\tfs _ StandardFileMenu oldFileStreamWithPattern:'*.recording'.\n\tfs isNil ifTrue:[^self inform:'No file to load'].\n\tCursor read showWhile:[\n\tdata _ OrderedCollection new.\n\t[fs atEnd] whileFalse:[Transcript cr;show:'reading data chunk #',(data size + 1) printString.\n\treadChunkTime _ Time millisecondsToRun:[data add: (RVMSampleReader dearchiveRawDataFrom: fs)].\n\tTranscript cr;show:(readChunkTime /1000.0)printString,' seconds to read'.\n\t].\n\tfs close.\n\tself recordingMode = #file ifTrue:[self recordingMode: #loop].\n\tself recordingMode = #loop ifTrue:[data _ data asCircularCollection.  \n\t\tself sampleLimit: data size].\n\tself samples: data asCircularCollection].\n\tself changed:#recordingMode\n\n! !\n\n!RVMMonitor class methodsFor: 'recording' stamp: 'ssa 10/18/2008 22:41'!\nopenRecordingFile\n\t\"Open the recording file\"\n\tself recordingFile ensureOpen! !\n\n!RVMMonitor class methodsFor: 'recording' stamp: 'ssa 10/18/2008 22:37'!\nrecordAllToFile: aCollection\n\t\"Record each of these elements to the recording file in chunk format\"\n\t\n\taCollection do:[:each| self recordToFile: each]! !\n\n!RVMMonitor class methodsFor: 'recording' stamp: 'ssa 10/28/2008 15:33'!\nrecordChunkToFile: anObject\n\t\"Record the object on the recording file in chunk format\"\n\t\n\tanObject printOn: self recordingFile.\n\tself recordingFile nextPut:$!!;cr;cr! !\n\n!RVMMonitor class methodsFor: 'recording' stamp: 'ssa 10/18/2008 22:45'!\nrecordSample: someData\n\t\"Record this sample data based on the recording mode\"\n\t\n\tself recordingMode = #off ifTrue:[^self].\n\tself recordingMode = #file ifTrue:[^self recordToFile: someData].\n\tself samples add: someData! !\n\n!RVMMonitor class methodsFor: 'recording' stamp: 'ssa 10/28/2008 19:27'!\nrecordToFile: anObject\n\t\"Record the object on the recording file in archiver format\"\n\t\n\tRVMSampleWriter archiveRawData: anObject on:self recordingFile\n\t! !\n\n!RVMMonitor class methodsFor: 'recording' stamp: 'ssa 10/18/2008 22:24'!\nrecordingFile\n\t\"Answer an appropriately named file for recording samples, open and ready.\"\n\tRecordingFile isNil ifTrue:[self recordingFile: self recordingFileFromUser].\n\t^RecordingFile! !\n\n!RVMMonitor class methodsFor: 'recording' stamp: 'ssa 10/19/2008 00:28'!\nrecordingFile: aFile\n\t\"Set an appropriately named file for recording samples, open and ready.\"\n\tRecordingFile isNil ifFalse:[RecordingFile close].\n\tRecordingFile _ aFile! !\n\n!RVMMonitor class methodsFor: 'recording' stamp: 'ssa 10/18/2008 22:31'!\nrecordingFileFromUser\n\t\"Answer an appropriately named file for recording samples, open and ready.\"\n\t^FileStream newFileNamed:'rvm-samples.recording'! !\n\n!RVMMonitor class methodsFor: 'recording' stamp: 'ssa 10/18/2008 23:19'!\nrecordingMode\n\t\"Recording modes are #off, #loop, #file, and #long\"\n\tRecordingMode isNil ifTrue:[RecordingMode _ #loop].\n\t^RecordingMode! !\n\n!RVMMonitor class methodsFor: 'recording' stamp: 'ssa 10/19/2008 00:52'!\nrecordingMode: nextMode\n\t\"Recording modes are #off, #loop, #file, and #long\"\n\t| lastMode |\n\tlastMode _ RecordingMode.\n\tlastMode = nextMode ifTrue:[^self].\n\tself switchFrom: lastMode to: nextMode.\n\tRecordingMode _ nextMode.\n\tself changed:#recordingMode! !\n\n!RVMMonitor class methodsFor: 'recording' stamp: 'ssa 10/18/2008 22:21'!\nswitchFrom: lastMode to: nextMode.\n\t\"Switch recording modes.  Recording modes are #off, #loop, #file, and #long\"\n\tnextMode = #off ifTrue:[\n\t\tlastMode = #loop ifTrue:[\"do nothing, leave collection in place\"].\n\t\tlastMode = #long ifTrue:[\"do nothing, leave collection in place\"].\n\t\tlastMode = #file ifTrue:[self closeRecordingFile]].\n\tnextMode = #loop ifTrue:[\n\t\tlastMode = #off ifTrue:[self samples: (RVMCircularCollection new:self sampleLimit)].\n\t\tlastMode = #long ifTrue:[self samples: (RVMCircularCollection withAll: self samples)].\n\t\tlastMode = #file ifTrue:[self closeRecordingFile]].\n\tnextMode = #long ifTrue:[\n\t\tlastMode = #off ifTrue:[self samples: OrderedCollection new].\n\t\tlastMode = #loop ifTrue:[self samples: self samples asOrderedCollection].\n\t\tlastMode = #file ifTrue:[self closeRecordingFile]].\n\tnextMode = #file ifTrue:[self openRecordingFile; recordAllToFile: self samples].\n\t\n\t\t! !\n\n!RVMMonitor class methodsFor: 'queries' stamp: 'ssa 1/1/1970 00:18'!\ncoreCount\n\n^self lastSample  groupStats groupSize! !\n\n!RVMMonitor class methodsFor: 'queries' stamp: 'ssa 11/27/2008 14:45'!\nextent\n\n^self lastSample  extent! !\n\n!RVMMonitor class methodsFor: 'queries' stamp: 'ssa 11/17/2008 13:22'!\nmainRank\n\n^self lastSample  groupStats mainRank ! !\n\n!RVMMonitor class methodsFor: 'user interface' stamp: 'ssa 11/17/2008 17:11'!\ncoreIndexFromUser\n\t\"RVMMonitor coreIndexFromUser\"\n\t\"Answer a valid coreINdex from the user for my current configuration\"\n\t|  maxIndex newIndex |\n\tmaxIndex _ self coreCount.\n\t[newIndex _ FillInTheBlank request:'Enter a core index between 0 and ',(maxIndex - 1) printString,':' initialAnswer: '1'.\n\t(newIndex isEmpty or:[(newIndex asNumber between: 0 and: maxIndex - 1) not])] whileTrue.\n\t^newIndex asNumber! !\n\n!RVMMonitor class methodsFor: 'user interface' stamp: 'ads 1/30/2011 15:21'!\ndashboard\n\t\"RVMMonitor dashboard      \"   \n\t| topView samplingCheck turboCheck gcButton benchButton subViewCount sampleButton clearSamplesButton forgetButton shuffle56Button shuffle4Button multistripButton systemAspectsButton coreAspectsButton inspectSampleButton testAspectCheck spiderButton bytesUsedsSpiderButton delayTimingCheck recordingOptionsButton allToReadMostlyButton printAllHeapsButton printExecutionTraceButton printStackButton gridButton stripButton scanButton outlierButton locateClassesButton locatorButton locators4Button heartbeat spread56Button runningProcessesButton |\n\ttopView := RVMStandardSystemView new  .\n\ttopView borderWidth:1. \n\tsamplingCheck _ RVMCheckBoxView on: self label: 'Sampling' checkState: [self sampling] whenChecked: [self startSampling] whenUnchecked: [self stopSampling] monitor: true.\n\tturboCheck _ RVMCheckBoxView on: self label: 'Turbo' checkState: [self turboSampling] whenChecked: [self turboOn] whenUnchecked: [self turboOff] monitor: true.\n\ttestAspectCheck _ RVMCheckBoxView on: self label: 'Test Aspects' checkState: [self showTestAspects] whenChecked: [self showTestAspects:true] whenUnchecked: [self showTestAspects:false] monitor: true.\n\tdelayTimingCheck _ RVMCheckBoxView on: self label: 'Short Delay' checkState: [self delayTiming = #short] whenChecked: [self useShortDelay] whenUnchecked: [self useNormalDelay] monitor: true.\n\theartbeat _ RVMCheckBoxView on: self label: 'Heartbeat' checkState: [self showHeartbeat] whenChecked: [self startHeartbeat] whenUnchecked: [self stopHeartbeat] monitor: true.\n\tsampleButton _ RVMButtonView label:'Take Sample' action:[RVMMonitor getSample; informListeners].\n\tinspectSampleButton _ RVMButtonView label:'Inspect Sample' action:[RVMMonitor lastSample inspect].\n\tclearSamplesButton _ RVMButtonView label:'Clear Samples' action:[RVMMonitor clearSamples].\n\trecordingOptionsButton _ RVMButtonView label:'Recording Options' action:[RVMMonitor recordingControls].\n\tforgetButton _ RVMButtonView label:'Forget Listeners' action:[RVMMonitor forgetListeners].\n\tgcButton _ RVMButtonView label:'GC' action:[Transcript cr show:'GC: ',Smalltalk garbageCollect printString].\n\tspread56Button _ RVMButtonView label:'Spread 56' action:[RVMOperations spreadFrom: 0 to: 55  moveRWtoRM: true moveRMtoRW: false].\n\tshuffle56Button _ RVMButtonView label:'Shuffle:56' action:[RVMOperations shuffle:56].\n\tshuffle4Button _ RVMButtonView label:'Shuffle:4' action:[RVMOperations shuffle:4].\n\tallToReadMostlyButton _ RVMButtonView label:'All->readMostly' action:[RVMOperations moveAllToReadMostlyHeaps].\n\tprintAllHeapsButton _ RVMButtonView label:'Print BytesUsed' action:[RVMOperations printAllHeapsBytesUsed].\n\tprintExecutionTraceButton _ RVMButtonView label:'Print Trace' action:[RVMOperations printExecutionTrace].\n\tprintStackButton _ RVMButtonView label:'Print Stack' action:[RVMOperations printStack].\n\tgridButton _ self relAbsButtonLabeled:'Tile Grid...' \n\t\t\t\t\trelAction:[RVMTileGridView example]\n\t\t\t\t\tabsAction:[RVMTileGridScalerView example].\n\tstripButton _ self relAbsButtonLabeled:'Tile Strip...' \n\t\t\t\t\trelAction:[RVMTileStripChartView example]\n\t\t\t\t\tabsAction:[RVMTileStripChartScalerView example].\n\tscanButton _ self relAbsButtonLabeled:'Tile Scan...' \n\t\t\t\t\trelAction:[RVMScanningStripChartView example]\n\t\t\t\t\tabsAction:[RVMAbsScanningStripChartView example].\n\tmultistripButton _ RVMButtonView label:'Multi Strip' action:[RVMCoreAspectTrace exampleView1].\n\tsystemAspectsButton _ RVMButtonView label:'System Aspects' action:[RVMAspectTrace monitorAllSystemAspects].\n\tcoreAspectsButton _ RVMButtonView label:'Core Aspects' action:[RVMCoreAspectTrace monitorAllCoreAspectsForCoreFromUser].\n\trunningProcessesButton _  RVMButtonView label:'Running Processes' action:[RVMAspectTrace exampleView8].\n\t\tspiderButton _ RVMButtonView label:'Kiviat' action:[RVMMultiKiviatView exampleBytecodesAndProcessesRunning].\n\tbytesUsedsSpiderButton _ RVMButtonView label:'heap size Kiviat' action:[RVMMultiKiviatView exampleBytesUsedTrioCommonPinned].\n\toutlierButton _ RVMButtonView label:'Outlier...' action:[RVMMonitor outlierFromUser].\n\tlocateClassesButton _ RVMButtonView label:'Class Locator' action:[RVMGroupLocatorView openOn: Smalltalk objectsSource:#allClasses labeled:'All Classes'].\n\tlocatorButton _ RVMButtonView label:'Group Locator' action:[RVMGroupLocatorView openWithSourceEditorOn: nil objectsSource:[Array allInstances]].\n\tlocators4Button _ RVMButtonView label:'4 Group Locator' action:[RVMMultiGroupLocatorView openOn: nil sources: {[String allInstances]. [Collection withAllSubclasses]. [Object withAllSubclasses]. [View allSubInstances]} colors: nil].\n\tbenchButton _ RVMButtonView label:'testCompiler' action:[Cursor wait showWhile:[RVMExperiment testCompiler]].\n\t\n\ttopView addSubView: samplingCheck.\n\ttopView addSubView:  turboCheck below:  samplingCheck.\n\ttopView addSubView:  testAspectCheck below:  turboCheck.\n\ttopView addSubView:  delayTimingCheck below:  testAspectCheck.\n\ttopView addSubView:  heartbeat below:  delayTimingCheck.\n\ttopView addSubView:  sampleButton below:  heartbeat.\n\ttopView addSubView:  inspectSampleButton below:  sampleButton.\n\ttopView addSubView:  clearSamplesButton below:  inspectSampleButton.\n\ttopView addSubView:  recordingOptionsButton below:  clearSamplesButton.\n\ttopView addSubView:  forgetButton below:  recordingOptionsButton.\n\ttopView addSubView:  gcButton below:  forgetButton.\n\ttopView addSubView:  spread56Button below:  gcButton.\n\ttopView addSubView:  shuffle56Button below:  spread56Button.\n\ttopView addSubView:  shuffle4Button below:  shuffle56Button.\n \ttopView addSubView:  allToReadMostlyButton below:  shuffle4Button.\n\ttopView addSubView:  printAllHeapsButton below:  allToReadMostlyButton.\n\ttopView addSubView:  printExecutionTraceButton below: printAllHeapsButton.\n\ttopView addSubView:  printStackButton below: printExecutionTraceButton.\n\ttopView addSubView:  gridButton below: printStackButton.\n\ttopView addSubView:  stripButton below: gridButton.\n\ttopView addSubView:  scanButton below: stripButton.\n\ttopView addSubView:  multistripButton below: scanButton.\n\ttopView addSubView:  systemAspectsButton below: multistripButton.\n\ttopView addSubView:  coreAspectsButton below: systemAspectsButton.\n\ttopView addSubView: runningProcessesButton below: coreAspectsButton.\n\ttopView addSubView:  spiderButton below: runningProcessesButton.\n\ttopView addSubView:  bytesUsedsSpiderButton below: spiderButton.\n\ttopView addSubView:  outlierButton below: bytesUsedsSpiderButton.\n\ttopView addSubView:  locateClassesButton below: outlierButton.\n\ttopView addSubView:  locatorButton below: locateClassesButton.\n\ttopView addSubView:  locators4Button below: locatorButton.\n\ttopView addSubView:  benchButton below: locators4Button.\n\ttopView label: 'RVM'.\n\tRVMMonitor forgetAll: topView allSubViews.\n\tRVMMonitor forget: topView.\n\tsubViewCount _ topView subViews size.\n\ttopView minimumSize: 120@(subViewCount*27).\n\ttopView maximumSize: topView minimumSize.\n\ttopView controller open! !\n\n!RVMMonitor class methodsFor: 'user interface' stamp: 'ssa 11/13/2008 02:10'!\noutlierFromUser\n\t| menu result selectors labels aspects sel cores |\n\tselectors _ #(coreAspectSubset coreAspectSubsetAllocationCompaction coreAspectSubsetBytecodes coreAspectSubsetBytes coreAspectSubsetRunWait coreAspectSubsetYields allCoreAspects).\n\tlabels _ #('selected aspects' 'allocation/compaction' 'bytecodes' 'bytes' 'run/wait' 'yields' 'all for a single core').\n\tmenu _ PopUpMenu labelArray: labels.\n\tresult _ menu startUpWithCaption:'Which set of aspects for the Outlier?'.\n\tresult = 0 ifTrue: [^self].\n\taspects _ RVMMultiAspectKiviatView perform: (sel _ selectors at: result).\n\tcores _ sel = #allCoreAspects ifTrue:[Array with: self coreIndexFromUser]ifFalse:[(1 to: RVMMonitor coreCount) asOrderedCollection].\n\tRVMMultiAspectKiviatView openOnAspects:  aspects forCores:  cores titled:'Outliers: ',(labels at: result)! !\n\n!RVMMonitor class methodsFor: 'user interface' stamp: 'ssa 5/12/2010 10:16'!\nrecordingControls\n\t\"RVMMonitor recordingControls   \"  \n\t| topView   offRadio loopRadio subViewCount longRadio fileRadio loadButton radios |\n\ttopView := RVMStandardSystemView new  .\n\tradios _ RVMView new.\n\ttopView borderWidth:1. \n\tRVMRadioButtonView testState:#(true false false false false).\n\toffRadio _ RVMRadioButtonView on: self label: 'stop recording' checkState: [RVMMonitor recordingMode = #off] whenChecked: [RVMMonitor recordingMode: #off] whenUnchecked: [] monitor: true.\n\tloopRadio _ RVMRadioButtonView on: self label: 'record last ',RVMMonitor sampleLimit printString,' samples' checkState: [RVMMonitor recordingMode = #loop] whenChecked: [RVMMonitor recordingMode: #loop] whenUnchecked: [] monitor: true.\n\tlongRadio _ RVMRadioButtonView on: self label: 'record all samples' checkState: [RVMMonitor recordingMode = #long] whenChecked: [RVMMonitor recordingMode: #long] whenUnchecked: [] monitor: true.\n\tfileRadio _ RVMRadioButtonView on: self label: 'record all samples to a file' checkState: [RVMMonitor recordingMode = #file] whenChecked: [RVMMonitor recordingMode: #file] whenUnchecked: [] monitor: true.\n\tloadButton _ RVMButtonView label:'Load samples from file' action:[RVMMonitor loadSamplesFromRecordingFile].\n\t\n\tradios addSubView: offRadio.\n\tradios addSubView:  loopRadio below:  offRadio.\n\tradios addSubView:  longRadio below:  loopRadio.\n\tradios addSubView:  fileRadio below:  longRadio.\n\ttopView addSubView: radios.\n\ttopView addSubView:  loadButton below:  radios.\n\tRVMMonitor forgetAll: topView allSubViews.\n\tRVMMonitor forget: topView.\n\ttopView label: 'Recording Options'.\n\tsubViewCount _ radios subViews size + topView subViews size - 1.\n\ttopView minimumSize: 200@(subViewCount*28).\n\ttopView maximumSize: 200@topView minimumSize y.\n\ttopView controller open! !\n\n!RVMMonitor class methodsFor: 'user interface' stamp: 'ssa 11/15/2008 23:30'!\nrelAbsButtonLabeled: aTitle relAction: relAction absAction: absAction\n\t| menu result |\n\t^RVMButtonView label: aTitle\n\t\t action:\t\t\t\t\n\t[menu _ PopUpMenu labelArray:#('Relative Scaling' 'Absolute Scaling').\n\tresult _ menu startUpWithCaption:'Which color scaling to use?'.\n\tresult = 1 ifTrue: [relAction copy value].\n\tresult = 2 ifTrue: [absAction copy value]] copy! !\n\n!RVMMonitor class methodsFor: 'test aspects' stamp: 'ssa 10/3/2008 15:06'!\nshowTestAspects\n\n\tShowTestAspects isNil ifTrue:[ShowTestAspects _ false].\n\t^ShowTestAspects! !\n\n!RVMMonitor class methodsFor: 'test aspects' stamp: 'ssa 10/3/2008 15:06'!\nshowTestAspects: aBoolean\n\n\tShowTestAspects _ aBoolean! !\n\n!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 1/1/1970 00:12'!\nclearSamples\n\t\"Clear my collection of samples\"\n\tSamples := nil.\n\tLastSample := nil.! !\n\n!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 10/7/2008 21:19'!\ndelaySamplingDuring: aBlock\n\n\tself sampling \n\t\tifTrue:[self stopSampling.\n\t\t\taBlock value.\n\t\t\tself startSampling]\n\t\tifFalse:[aBlock value]! !\n\n!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 10/7/2008 20:25'!\ndelayTiming\n\n\tDelayTiming isNil ifTrue:[DelayTiming _ #normal].\n\t^DelayTiming! !\n\n!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 10/7/2008 20:25'!\ndelayTiming: aSymbol\n\t\"#normal or #short\"\n\n\tDelayTiming _ aSymbol! !\n\n!RVMMonitor class methodsFor: 'sampling' stamp: 'ads 1/30/2011 15:21'!\ngetSample\n\t\"Get the next sample\"\n\tLastSample := self turboSampling ifTrue:[RVMMulticoreSample captureFastest]ifFalse:[RVMMulticoreSample next].\n\tRVMOperations isRVM & self isRecording ifTrue:[\n\t\t\t\tself recordSample: LastSample rawData].\n! !\n\n!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 11/15/2008 23:42'!\nlastSample\n\t\"Answer the last recorded sample\"\n\tLastSample isNil ifTrue:[self getSample].\n\t^LastSample ! !\n\n!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 10/7/2008 20:23'!\nnormalDelayTiming\n\t^self delayTiming = #normal! !\n\n!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 10/21/2008 11:56'!\nsampleLimit\n\n\tSampleLimit isNil ifTrue:[SampleLimit := 2].\n\t^SampleLimit! !\n\n!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 8/22/2008 09:42'!\nsampleLimit: anInteger\n\n\tSampleLimit := anInteger.\n\tself clearSamples! !\n\n!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 10/18/2008 22:14'!\nsamples\n\t\"Answer my collection of samples\"\n\tSamples isNil ifTrue:[self samples:(RVMCircularCollection new:self sampleLimit)].\n\t^Samples! !\n\n!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 10/18/2008 22:14'!\nsamples: aCollection\n\t\"Set my collection of samples\"\n\tSamples _ aCollection! !\n\n!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 10/7/2008 21:19'!\nsampling\n\t\"Am I current sampling?\"\n\t^SamplingProcess notNil! !\n\n!RVMMonitor class methodsFor: 'sampling' stamp: 'ads 2/2/2011 14:52'!\nstartSampling\n\t\"RVMMonitor startSampling\"\n\t\"Start the sampling process\"\n\t| delay timeToRun delayTime lastTime|\n\tlastTime _ Time now asSeconds.\n\tSamplingProcess notNil ifTrue:[self stopSampling].\n\tSamplingProcess := [[ Sensor leftShiftDown & Sensor controlKeyPressed]\n\t\t\t\t\t\t\t\twhileFalse: [\n\t\t\t\t\t\t\t\t\t\"RVMOperations print: (Time now asSeconds - lastTime)  printString,' seconds since last sample'.\"\n\t\t\t\t\t\t\t\t\t timeToRun _ Time millisecondsToRun: [self getSample].\n\t\t\t\t\t\t\t\t\tlastTime _ Time now asSeconds.\n\t\t\t\t\t\t\t\t\t\"RVMOperations print:'sampling took ',(timeToRun/1000.0) printString,' seconds'.\"\n\t\t\t\t\t\t\t\t\tdelayTime _ self normalDelayTiming ifTrue:[10*timeToRun]ifFalse:[100 min: 10*timeToRun].\n\t\t\t\t\t\t\t\t\tdelay := Delay forMilliseconds: delayTime.\n\t\t\t\t\t\t\t\t\tself informListeners.\n\t\t\t\t\t\t\t\t\tRVMMulticoreSample flush.  \"clear sample buffers from monitor activity\"\n\t\t\t\t\t\t\t\t\tdelay wait]] newProcess.\n\tSamplingProcess name: 'RVMMonitor sampling process'.\n\tSamplingProcess resume\t! !\n\n!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 9/4/2008 15:00'!\nstopSampling\n\t\"RVMMonitor stopSampling\"\n\t\"Stop the sampling process\"\n\n\tSamplingProcess isNil ifFalse:[SamplingProcess terminate].\n\tSamplingProcess := nil! !\n\n!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 1/1/1970 00:16'!\nturboOff\n\t\"Turn off turboSampling\"\n\tTurboSampling := false! !\n\n!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 1/1/1970 00:16'!\nturboOn\n\t\"Turn on turboSampling\"\n\tTurboSampling := true! !\n\n!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 1/1/1970 00:16'!\nturboSampling\n\t\"Answer my  turboSampling flag\"\n\tTurboSampling isNil ifTrue:[TurboSampling := true].\n\t^TurboSampling! !\n\n!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 10/7/2008 21:22'!\nuseNormalDelay\n\tself delaySamplingDuring:[self delayTiming: #normal].\n\t! !\n\n!RVMMonitor class methodsFor: 'sampling' stamp: 'ssa 10/7/2008 21:22'!\nuseShortDelay\n\tself delaySamplingDuring:[self delayTiming: #short].! !\n\n!RVMMonitor class methodsFor: 'listeners' stamp: 'ssa 1/1/1970 00:07'!\nforget: someone\n\n\tself listeners remove: someone ifAbsent:[]! !\n\n!RVMMonitor class methodsFor: 'listeners' stamp: 'ssa 10/28/2008 19:54'!\nforgetAll: someListeners\n\n\tsomeListeners do:[:each|\n\tself forget: each]! !\n\n!RVMMonitor class methodsFor: 'listeners' stamp: 'ssa 1/1/1970 00:07'!\nforgetListeners\n\n\tListeners := nil! !\n\n!RVMMonitor class methodsFor: 'listeners' stamp: 'ssa 8/25/2008 05:02'!\ninform: someone\n\n\tself listeners add: someone! !\n\n!RVMMonitor class methodsFor: 'listeners' stamp: 'ssa 2/18/2009 17:42'!\ninformListeners\n\n\tself listeners do:[:each| each hear: self]\n\n\n\"\t| sema |\n\tsema _ Semaphore  new.\n\tself listeners do:[:each| [each hear: self. sema signal] copy fixTemps fork].\n\tself listeners do: [:each| sema wait]\"\n\t! !\n\n!RVMMonitor class methodsFor: 'listeners' stamp: 'ssa 8/25/2008 04:59'!\nlisteners\n\t\"Answer the list of listeners to me\"\n\tListeners isNil ifTrue:[Listeners := OrderedCollection new].\n\t^Listeners! !\n\n!RVMMonitor class methodsFor: 'autocoding' stamp: 'ssa 1/1/1970 00:03'!\nautocodeScalerMethodFor: aSelector\n\t\"Autocode and install a default scaler method for the aspect found in this selector.\"\n\t\"Note this also adds a class variable of the form SCALERaspect\"\n\t\n\t| aspect code var |\n\taspect _ aSelector allButLast:'Scaler' size.\n\tvar _ 'SCALER',aspect.\n\tself addClassVarName: var.\n\tcode _ aSelector,'\n\t\"Answer the default scaler for ',aspect,'.\"\n\t',var,' isNil ifTrue:[',var,' _ RVMDataScaler aspect: #',aspect,' min: 0 max: 100].\n\t^',var.\n\tself class compile: code classified:'scalers' notifying:nil! !\n\n!RVMMonitor class methodsFor: 'autocoding' stamp: 'ssa 1/1/1970 00:03'!\nautocodeScalerMethodForScaler: aDataScaler\n\t\"Autocode and install a default scaler method for the aspect found in this selector.\"\n\t\"Note this also adds a class variable of the form SCALERaspect\"\n\t\n\t| aspect code var |\n\taspect _ aDataScaler aspect.\n\tvar _ 'SCALER',aspect.\n\t(self classVarNames includes: var) ifFalse:[self addClassVarName: var].\n\tcode _ aspect,'Scaler\n\t\"Answer the default scaler for ',aspect,'.\"\n\t',var,' isNil ifTrue:[',var,' _ RVMDataScaler aspect:#',aspect,' min: ',aDataScaler min printString,' max: ',aDataScaler max printString,'].\n\t^',var.\n\tself class compile: code classified:'scalers' notifying:nil! !\n\n!RVMMonitor class methodsFor: 'autocoding' stamp: 'ssa 1/1/1970 00:49'!\ndoesNotUnderstand: aMessage\n\t\"autocode a method for aMessage if its one I recognize.\"\n\t(aMessage selector isUnary & (aMessage selector endsWith: 'Scaler')) \n\t\tifTrue:[self halt:'this should not be used anymore'.\n\t\t\tself  autocodeScalerMethodFor: aMessage selector.\n\t\t\t^self perform: aMessage selector].\n\t\t\n\t^super doesNotUnderstand: aMessage! !\n\n!RVMMonitor class methodsFor: 'data generation' stamp: 'ssa 9/13/2008 19:40'!\ndataFor: anAspect\n\t\"Answer a generated data value for this aspect, based on the range of its scaler\"\n\t\n\t^(self scalerFor:anAspect) atRandom! !\n\n!RVMMonitor class methodsFor: 'scaling' stamp: 'ssa 1/1/1970 00:44'!\ncoloredScalerFor: aspect\n\t\"Answer an appropriate colored scaler for this aspect.\"\n\t\n\t^RVMColoredDataScaler aspect: aspect! !\n\n!RVMMonitor class methodsFor: 'scaling' stamp: 'ssa 1/1/1970 00:44'!\ncoloredScalersFor: aspects\n\t\"Answer an appropriate colored scalers for this aspect.\"\n\t\n\t^aspects collect:[:each| self coloredScalerFor: each]! !\n\n!RVMMonitor class methodsFor: 'scaling' stamp: 'ssa 1/1/1970 00:02'!\nscalerFor: aspect\n\t\"Answer an appropriate scalers for this aspect.\"\n\t[^RVMDataScaler new automatic]value.\n\t^self perform: (aspect,'Scaler') asSymbol! !\n\n!RVMMonitor class methodsFor: 'scaling' stamp: 'ssa 9/13/2008 19:39'!\nscalersFor: aspects\n\t\"Answer a collection of appropriate scalers for these aspects.\"\n\n\t^aspects collect:[:aspect|\n\t\tself scalerFor: aspect]! !\n\n!RVMMonitor class methodsFor: 'heartbeat' stamp: 'ssa 4/1/2009 16:02'!\nshowHeartbeat\n\n\tShowHeartbeat isNil ifTrue:[ShowHeartbeat _ false].\n\t^ShowHeartbeat! !\n\n!RVMMonitor class methodsFor: 'heartbeat' stamp: 'ssa 4/1/2009 16:03'!\nshowHeartbeat: aBoolean\n\n\tShowHeartbeat _ aBoolean! !\n\n!RVMMonitor class methodsFor: 'heartbeat' stamp: 'ssa 4/3/2009 12:18'!\nstartHeartbeat\n\t\"RVMMonitor startHeartbeat\"\n\t\"RVMMonitor stopHeartbeat\"\n\t| rect delay |\n\tself showHeartbeat: true.\n\trect _ 0@0 extent: 4@4.\n\tdelay _ Delay forSeconds: 1.\n\t[[self showHeartbeat] whileTrue:[Display reverse: rect. delay wait]] forkAt: Processor highestPriority.\n\tProcessor yield ! !\n\n!RVMMonitor class methodsFor: 'heartbeat' stamp: 'ssa 4/1/2009 16:09'!\nstopHeartbeat\n\t\"RVMMonitor startHeartbeat\"\n\t\"RVMMonitor stopHeartbeat\"\n\tself showHeartbeat: false.! !\n\n!RVMMultiAspectKiviatController methodsFor: 'control activity' stamp: 'ssa 10/7/2008 18:42'!\naddCoreAspect\n\t| menu selectedAspect |\n\tself view topView dontDisplayWhile:[\nmenu := CustomMenu new.\n RVMMulticoreSample coreAspects do:[:aspect|\n\t\t\tmenu add:  aspect action: aspect].\n\t\t\tselectedAspect := menu startUp: nil withCaption: 'Select a core aspect to monitor' at: Sensor cursorPoint.\n\t\t\tselectedAspect notNil ifTrue:[ self view addAspect: selectedAspect]].\n\t\t\tself view drawOnCanvas.\n\t\t\tself view displayView\n\t\t\t! !\n\n!RVMMultiAspectKiviatController methodsFor: 'control activity' stamp: 'ssa 10/20/2008 10:26'!\nchangeRescaleCounter\n\t| result |\n\tself view dontDisplayWhile:[\n\tresult _ FillInTheBlank request:'How many samples between rescaling?' initialAnswer: self view rescaleCounterDefault printString.\n\tresult isNil ifFalse:[result _ result asNumber max:0.\n\tself view rescaleCounterDefault:result]].\n\tself view displayView! !\n\n!RVMMultiAspectKiviatController methodsFor: 'control activity' stamp: 'ssa 10/7/2008 19:52'!\ninspectView\n\nself view inspect! !\n\n!RVMMultiAspectKiviatController methodsFor: 'control activity' stamp: 'ssa 11/27/2008 14:00'!\nredButtonActivity\n\t\n\t\"((self view adjustScaleBox translateBy: self view insetDisplayBox origin)  containsPoint: Sensor cursorPoint) ifTrue:[Sensor waitNoButton.\n\t\tself spawnScaleAdjuster]\"! !\n\n!RVMMultiAspectKiviatController methodsFor: 'control activity' stamp: 'ssa 10/7/2008 18:55'!\nremoveAspect\n\t| menu selectedAspect |\n\tself view topView dontDisplayWhile:[\nmenu := CustomMenu new.\n self view aspects do:[:aspect|\n\t\t\tmenu add:  aspect action: aspect].\n\t\t\tselectedAspect := menu startUp: nil withCaption: 'Select aspect to remove:' at: Sensor cursorPoint.\n\t\t\tselectedAspect notNil ifTrue:[ self view removeAspect: selectedAspect].\n\t\t\t].\n\t\t\tself view drawOnCanvas.\n\t\t\tself view displayView\n! !\n\n!RVMMultiAspectKiviatController methodsFor: 'control activity' stamp: 'ssa 10/7/2008 19:06'!\nrescale\n\n\tself view resetScaling.\n\tself view displayView! !\n\n!RVMMultiAspectKiviatController methodsFor: 'control activity' stamp: 'ssa 11/12/2008 12:48'!\nyellowButtonActivity\n\t| menu answer |\n\tself view topView dontDisplayWhile:[\n\tmenu := CustomMenu new.\n\tmenu add:'Inspect View' action:#inspectView.\n\tmenu add:'Rescale' action:#rescale.\n\tmenu add:'Change Rescale Counter' action:#changeRescaleCounter.\n\tanswer := menu startUp: nil withCaption: '' at: Sensor cursorPoint].\n\tanswer notNil ifTrue:[self perform: answer]! !\n\n!RVMMultiAspectKiviatController methodsFor: 'menu messages' stamp: 'ssa 10/7/2008 19:38'!\nchangeAspect\n\n\t| menu answer newAspect |\nself view topView dontDisplayWhile:[\n\t\tmenu := CustomMenu new.\n\tmenu add: 'Core aspects' action: #core.\n\tmenu add: 'Test aspects' action: #testCore.\n\tanswer := menu startUp: nil withCaption: 'What kind of aspect would you like to monitor?' at: Sensor cursorPoint.\n\tanswer isNil ifTrue:[^self].\n\tnewAspect _ RVMMulticoreSample aspectFromUserUnder: answer.\n\tnewAspect isNil ifTrue:[^self].\n\tself view aspect = newAspect ifTrue:[^self].\n\tself view aspect: newAspect].\n\tself view resetScaling.\n\tself view drawOnCanvas.\n\tself view displayView! !\n\n!RVMMultiAspectKiviatController methodsFor: 'menu messages' stamp: 'ssa 5/12/2010 10:20'!\nspawnScaleAdjuster\n\n\t|  maxView minView topView resetScaleButton setToObservedButton autoScaleCheckBox height scalerIndex result |\n\t(self view scalers size  = 1 or:[self view commonScale])ifFalse:[result _ (PopUpMenu labelArray:self view aspects) startUpWithCaption:'Adjust the scale of which aspect?'.\n\t\tresult = 0 ifTrue:[^self].\n\t\tscalerIndex _ result]ifTrue:[scalerIndex _ 1].\n\tmaxView _ RVMValueEditorView  on: (view scalerAt: scalerIndex) valueGetter: [(view scalerAt: scalerIndex) max] valueSetter:[:v|(view scalerAt: scalerIndex) setMax:v. view drawOnCanvas; displayView] label:'max: '.\n\tmaxView lockGetter:#maxLocked; lockSetter:#maxLocked:.\n\tminView _ RVMValueEditorView  on: (view scalerAt: scalerIndex) valueGetter: [(view scalerAt: scalerIndex) min] valueSetter:[:v|(view scalerAt: scalerIndex) setMin:v.  view drawOnCanvas; displayView] label:'min: '.\n\tminView lockGetter:#minLocked; lockSetter:#minLocked:.\n\tresetScaleButton _ RVMButtonView label:'Reset scale to default' action:[(view scalerAt: scalerIndex) resetScaling.  view drawOnCanvas; displayView.  minView hear:nil.  maxView hear:nil].\n\tsetToObservedButton _ RVMButtonView label:'Set scale to observed values' action:[(view scalerAt: scalerIndex) setRangeToObserved.  view drawOnCanvas; displayView.  minView hear:nil.  maxView hear:nil].\n\tautoScaleCheckBox _ RVMCheckBoxView on: (view scalerAt: scalerIndex) label: 'Automatic Scaling' checkState: [(view scalerAt: scalerIndex) automaticScaling] whenChecked: [(view scalerAt: scalerIndex) automatic.  view drawOnCanvas; displayView.  minView hear:nil.  maxView hear:nil] whenUnchecked: [(view scalerAt: scalerIndex) manual. view drawOnCanvas; displayView.  minView hear:nil.  maxView hear:nil] monitor: true.\n\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\ttopView addSubView: minView.\n\ttopView addSubView: maxView below:  minView.\n\ttopView addSubView: resetScaleButton below:  maxView.\n\ttopView addSubView: setToObservedButton below:  resetScaleButton.\n\ttopView addSubView: autoScaleCheckBox below:  setToObservedButton.\n\tRVMMonitor forgetAll:{resetScaleButton. setToObservedButton. autoScaleCheckBox}.\n\ttopView label: (view aspects at: scalerIndex).\n\theight _ topView subViews size * 26.\n\ttopView minimumSize:200@height.\n\ttopView maximumSize: 200@height.\n\tself scalerAdjusters add: topView.\n\ttopView controller open! !\n\n!RVMMultiAspectKiviatController methodsFor: 'accessing' stamp: 'ssa 11/11/2008 18:32'!\nscalerAdjusters\n\t\"Answer the value of scalerAdjusters\"\n\n\tscalerAdjusters isNil ifTrue:[self scalerAdjusters: OrderedCollection new].\n\t^ scalerAdjusters! !\n\n!RVMMultiAspectKiviatController methodsFor: 'accessing' stamp: 'ssa 11/11/2008 18:31'!\nscalerAdjusters: anObject\n\t\"Set the value of scalerAdjusters\"\n\n\tscalerAdjusters _ anObject! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 11/11/2008 17:20'!\nadjustScaleBox\n\t\"Answer the value of adjustScaleBox\"\n\n\tadjustScaleBox isNil ifTrue:[self adjustScaleBox: self insetDisplayBox].\n\t^ adjustScaleBox! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 11/11/2008 17:20'!\nadjustScaleBox: anObject\n\t\"Set the value of adjustScaleBox\"\n\n\tadjustScaleBox _ anObject! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 11/11/2008 23:14'!\naspects\n\t\"Answer the value of aspects\"\n\n\taspects isNil ifTrue:[self aspects: RVMMulticoreSample systemAspects].\n\t^ aspects! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 11/11/2008 23:12'!\naspects: anObject\n\t\"Set the value of aspects\"\n\n\taspects _ anObject! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/10/2008 18:39'!\nbackgroundCanvas\n\t\"Answer the value of backgroundCanvas\"\n\n\tbackgroundCanvas isNil ifTrue:[ self backgroundCanvas:(ColorForm extent: self canvasExtent depth:8).\n\t\tself spokePens do:[:pen| pen destForm: backgroundCanvas].\n\t\tself drawBackgroundCanvas.].\n\t^ backgroundCanvas! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 13:53'!\nbackgroundCanvas: anObject\n\t\"Set the value of backgroundCanvas\"\n\n\tbackgroundCanvas _ anObject\n! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 11/12/2008 13:17'!\nblinker\n\t\"Answer the value of blinker\"\n\n\tblinker isNil ifTrue:[self blinker: true].\n\tself blinker: blinker not.\n\t^ blinker! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 11/12/2008 13:18'!\nblinker: anObject\n\t\"Set the value of blinker\"\n\n\tblinker _ anObject! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/10/2008 18:39'!\ncanvas\n\t\"Answer the value of canvas\"\n\n\tcanvas isNil ifTrue:[self canvas: (ColorForm extent: self canvasExtent depth:8)].\n\t^ canvas! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 14:11'!\ncanvas: anObject\n\t\"Set the value of canvas\"\n\n\tcanvas _ anObject.\n\tself webPen destForm: anObject.\n\tself spokePens:nil! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/8/2008 18:00'!\ncanvasExtent\n\t\"Answer the extent of my canvas\"\n\t^self insetDisplayBox extent  ! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 13:38'!\ncenter\n\n\t^self canvas center! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 17:08'!\ncenterMargin\n\t\"the distance from center to the start of a spoke\"\n\t^20! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 11/12/2008 10:36'!\ncolors\n\t\"Answer the value of colors\"\n\n\tcolors isNil ifTrue:[self colors: ((Color wheel: self coreIndicies size) \"collect:[:each| each darker darker]\")\n\t\t].\n\t^ colors! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 11/12/2008 09:38'!\ncolors: anObject\n\t\"Set the value of colors\"\n\n\tcolors _ anObject! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 11/12/2008 10:34'!\ncoreIndicies\n\t\"Answer the value of coreIndicies\"\n\n\tcoreIndicies isNil ifTrue:[self coreIndicies: (1 to: RVMMonitor coreCount) asOrderedCollection].\n\t^ coreIndicies! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 11/12/2008 09:50'!\ncoreIndicies: anObject\n\t\"Set the value of coreIndicies\"\n\n\tcoreIndicies _ anObject! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 14:13'!\ndiameter\n\t\"Answer the smallest square diameter for this view's box\"\n\t^self canvas height < self canvas width\n\t\tifTrue:[self canvas height- (self labelRowCount * 10)]\n\t\tifFalse:[self canvas width - 20]! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 14:17'!\ndrawingBackground\n\t\"Answer the value of drawingBackground\"\n\n\tdrawingBackground isNil ifTrue:[self drawingBackground: false].\n\t^ drawingBackground! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 14:17'!\ndrawingBackground: anObject\n\t\"Set the value of drawingBackground\"\n\n\tdrawingBackground _ anObject! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/8/2008 18:52'!\nfirstDisplay\n\t\"Answer the value of firstDisplay\"\n\n\tfirstDisplay isNil ifTrue:[self firstDisplay: false].\n\t^ firstDisplay! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/8/2008 15:13'!\nfirstDisplay: anObject\n\t\"Set the value of firstDisplay\"\n\n\tfirstDisplay _ anObject! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 11/12/2008 10:56'!\nindexIcons\n\t\"Answer the value of indexIcons\"\n\n\tindexIcons isNil ifTrue:[self indexIcons: self buildIndexIcons].\n\t^ indexIcons! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 11/12/2008 10:56'!\nindexIcons: anObject\n\t\"Set the value of indexIcons\"\n\n\tindexIcons _ anObject! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 01:18'!\nlabelRowCount\n\t\"How many rows of labels will I have?\"\n\t^2! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 14:37'!\nmajorTicLength\n\t\n\t^8! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 14:35'!\nmajorTicSpacing\n\n\t^self spokeLength / (self numberOfMajorTics - 1) asFloat! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 14:36'!\nminorTicLength\n\t\n\t^4! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 14:36'!\nminorTicSpacing\n\n\t^self majorTicSpacing /( self numberOfMinorTics + 1)! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 14:38'!\nnumberOfMajorTics\n\n\t^3! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 14:37'!\nnumberOfMinorTics\n\n\t^1! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 13:56'!\nradius\n\t\"Answer the smallest radius for this view's box\"\n\t^self diameter // 2! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/20/2008 10:25'!\nrescaleCounter\n\t\"Answer the value of rescaleCounter\"\n\n\trescaleCounter isNil ifTrue:[self rescaleCounter: self rescaleCounterDefault].\n\t^ rescaleCounter! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 15:02'!\nrescaleCounter: anObject\n\t\"Set the value of rescaleCounter\"\n\n\trescaleCounter _ anObject! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/20/2008 10:25'!\nrescaleCounterDefault\n\t\"Answer the value of rescaleCounterDefault\"\n\n\trescaleCounterDefault isNil ifTrue:[self rescaleCounterDefault: 10].\n\t^ rescaleCounterDefault! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/20/2008 10:25'!\nrescaleCounterDefault: anObject\n\t\"Set the value of rescaleCounterDefault\"\n\n\trescaleCounterDefault _ anObject! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 11/11/2008 23:15'!\nscalers\n\t\"Answer the value of scalers\"\n\n\tscalers isNil ifTrue:[self scalers: (self aspects collect:[:each| RVMDataScaler new automatic])].\n\t^ scalers! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 11/11/2008 23:12'!\nscalers: anObject\n\t\"Set the value of scalers\"\n\n\tscalers _ anObject! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 22:07'!\nspokeColor\n\t\"Answer the value of spokeColor\"\n\n\tspokeColor isNil ifTrue:[self spokeColor: Color gray lighter lighter].\n\t^ spokeColor! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 13:21'!\nspokeColor: anObject\n\t\"Set the value of spokeColor\"\n\n\tspokeColor _ anObject! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 14:30'!\nspokeLength\n\n\t^self radius - self centerMargin - 5! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 11:25'!\nspokePens\n\t\"Answer the value of spokePens\"\n\n\tspokePens isNil ifTrue:[self spokePens: self initializeSpokePens].\n\t^ spokePens! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 11:22'!\nspokePens: anObject\n\t\"Set the value of spokePens\"\n\n\tspokePens _ anObject! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 13:21'!\nwebColor\n\t\"Answer the value of webColor\"\n\n\twebColor isNil ifTrue:[self webColor: Color blue].\n\t^ webColor! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 13:21'!\nwebColor: anObject\n\t\"Set the value of webColor\"\n\n\twebColor _ anObject! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 17:06'!\nwebPen\n\t\"Answer the value of webPen\"\n\n\twebPen isNil ifTrue:[self webPen: Pen new.\n\t\twebPen color: self webColor.\n\t\twebPen defaultNib:2.\n\t\twebPen  combinationRule: Form over.\n\t\twebPen destForm: self canvas].\n\t^ webPen! !\n\n!RVMMultiAspectKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 13:29'!\nwebPen: anObject\n\t\"Set the value of webPen\"\n\n\twebPen _ anObject! !\n\n!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 11/11/2008 17:19'!\nadjustScaleIcon\n^((ColorForm\n\textent: 16@31\n\tdepth: 8\n\tfromArray: #( 0 0 0 0 0 0 169614364 622594560 0 0 1694498815 4294913536 0 0 1845490943 4294915840 0 0 0 3506384384 0 0 0 3506386688 73 1677721600 0 3657379328 163 3642490880 0 3506386688 9716 4287692800 172 4110364160 46591 4294913536 208 4110366464 4259839 4294936576 0 3506384384 8973264 4106150400 0 3657381632 6558618 3942664503 0 3506384384 154 3942645760 0 3657381632 154 3942645760 25700 3808374272 154 3942645760 60415 4294915840 154 3942645760 18761 3808374272 154 3942645760 0 3506386688 2424986 3942648357 0 3657379328 11304867 3947480869 0 3506386688 7798783 4294948096 0 3506384384 1300991 4294925056 217 4294915840 25855 4291821568 145 3959369216 199 4098424832 0 3657381632 118 2432696320 0 3506384384 28 620756992 0 3506386688 0 0 0 3657379328 0 0 1541003737 4110366464 0 0 1694498815 4294913536 0 0 321795886 1227753984 0 0 0 0)\n\toffset: 0@0)\n\tcolorsFromArray: #(#(1.0 1.0 1.0) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0)  ))! !\n\n!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 11/12/2008 11:21'!\nbuildIndexIcons\n\n\t| icon label |\n\t^self coreIndicies collect:[:index|\n\t\tlabel _ index printString asDisplayText .\n\t\tlabel foregroundColor: Color black backgroundColor: Color transparent.\n\t\ticon _ self iconCircle.\n\t\tlabel align: label boundingBox center with: icon boundingBox center.\n\t\tlabel displayOn: icon at: 0 @ -2.\n\t\ticon offset: icon boundingBox center negated.\n\t\ticon]! !\n\n!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 11/11/2008 17:34'!\ndrawAdjustScaleIcon\n\t| adjustIcon origin |\n.\n\tadjustIcon _ self adjustScaleIcon.\n\torigin _ self backgroundCanvas boundingBox leftCenter - adjustIcon boundingBox leftCenter + (4@0).\n\tadjustIcon displayOn: self backgroundCanvas at: origin.\n\tself adjustScaleBox:(origin extent: adjustIcon extent)! !\n\n!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 11/12/2008 12:59'!\ndrawBackgroundCanvas\n\tself drawingBackground: true.\n\tself backgroundCanvas fillWhite.\n\tself drawSpokes.\n\t\"self drawAdjustScaleIcon.\"\n\t\"self drawLabelsOnBackground.\"\n\tself drawingBackground: false.\n\t! !\n\n!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 11/11/2008 23:18'!\ndrawCounterOnCanvas\n\t|  counterLabel |\n\tcounterLabel _ ('rescale\nin: ',self rescaleCounter printString ) asDisplayText.\n\tcounterLabel displayOn: self canvas at: self canvas boundingBox bottomRight -(counterLabel width@90).\n! !\n\n!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 11/12/2008 10:27'!\ndrawLabelsOnBackground\n\t\n\t| labels count origin coreNameText |\n\tlabels _ self coreIndicies isEmpty ifTrue:[Array with:'System Aspects']ifFalse:[self coreIndicies collect:[:each| 'Core #',each printString]].\n\tcount _ 1.\n\torigin _ 2 @ -4.\n\tlabels do:[:coreName|\n\t\tcoreNameText _ coreName asDisplayText.\n\t\tcoreNameText foregroundColor: (self colors at: count) backgroundColor: Color transparent.\n\t\tcoreNameText displayOn: self backgroundCanvas at:  origin.\n\t\torigin  _ origin + (0@coreNameText height).\n\t\tcount = (labels size //2) ifTrue:[origin _ self canvas boundingBox topRight - (coreNameText width @0)].\n\t\tcount _ count + 1]\n! !\n\n!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 10/6/2008 14:16'!\ndrawMajorTicUsing: pen\n\n\tpen turn:90; go: self majorTicLength/2;turn:180;down;go:self majorTicLength;up;\n\t\t\tturn:180; go: self majorTicLength/2;turn:-90! !\n\n!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 10/6/2008 14:16'!\ndrawMinorTicUsing: pen\n\n\tpen turn:90; go: self minorTicLength/2;turn:180;down;go:self minorTicLength;up;\n\t\t\tturn:180; go: self minorTicLength/2;turn:-90! !\n\n!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 11/12/2008 11:43'!\ndrawOnCanvas\n\tself drawingBackground ifTrue:[^self].\n\tself backgroundCanvas displayOn: self canvas at: 0@0.\n\t\"self drawCounterOnCanvas.\"\n\tself drawWeb.\n! !\n\n!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 11/11/2008 23:24'!\ndrawSpokes\n\n\t| pen label labelOffsets labelOffset |\n\t1 to: self spokePens size do:[:index|\n\t\tpen _ self spokePens at: index.\n\t\tpen destForm: self backgroundCanvas.\n\t\tpen place: self center.\n\t\tpen up; go: self centerMargin.\n\t\tpen down;go: self spokeLength;up.\n\t\tlabel _ (self aspects at: index) asString asDisplayText asParagraph asForm.\n\t\t\"self diameter < 300 ifTrue:[label _ label scaledToSize: 11@11].\"\n\t\tlabelOffsets _ {0@label height negated.  0@0. label width negated@0.  label extent negated}.\n\t\tlabelOffset _ labelOffsets at: ((index - 1// (self spokePens size / 4) + 1) min:4).\n\t\tlabel displayOn: self backgroundCanvas at: pen location + labelOffset clippingBox: self backgroundCanvas boundingBox rule: Form paint fillColor: nil.\n\t\tself drawTicsUsing: pen]\n\t\t! !\n\n!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 10/6/2008 11:54'!\ndrawTicsUsing: pen\n\n\tpen up;place: self center;go:self centerMargin.\n\tself drawMajorTicUsing: pen.\n\tself numberOfMajorTics - 1 timesRepeat:[\n\t\tself numberOfMinorTics timesRepeat:[\n\t\t\tpen go: self minorTicSpacing.\n\t\t\tself drawMinorTicUsing: pen].\n\t\tpen go: self minorTicSpacing.\n\t\tself drawMajorTicUsing: pen].\n\t! !\n\n!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 11/12/2008 13:06'!\ndrawWeb\n\tself coreIndicies isEmpty ifTrue:[^self drawWebSystem].\n\tself coreIndicies do:[:index|\n\t\tself placeSpokePensForCore: index.\n\t\tself webPen color: (self colors at: (self coreIndicies indexOf: index)).\n\t\tself webPen combinationRule: Form paint.\n\t\tself webPen up;place: self spokePens first location;down.\n\t\tself spokePens do:[:pen|\n\t\t\tself webPen goto: pen location].\n\t\tself webPen goto: self spokePens first location;up].\n\tself coreIndicies  \"shuffled\" do:[:index|\n\t\t\t\tself placeIconsForCore: index]\n\n\t! !\n\n!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 11/12/2008 10:07'!\ndrawWebSystem\n\tself drawingBackground ifTrue:[^self].\n\tself placeSpokePens.\n\tself webPen color: self webColor.\n\tself webPen up;place: self spokePens first location;down.\n\tself spokePens do:[:pen|\n\t\tself webPen goto: pen location].\n\tself webPen goto: self spokePens first location;up\n\t! !\n\n!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 11/12/2008 11:12'!\niconCircle\n\n\t| icon aForm aCircle |\n\ticon _ Form extent:18@18 depth: Display depth.\n\taForm _ Form extent: 1@1.\n\taForm fillBlack.\n\taCircle _ Circle new.\n\taCircle form: aForm.\n\taCircle radius: 9.\n\taCircle center: 8@8.\n\taCircle displayOn: icon.\n\t^icon! !\n\n!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 11/12/2008 12:46'!\nplaceIconsForCore: anIndex\n\n\t| data scaledDatum offset aspectIndex |\n\tdata _ anIndex > 0 ifTrue:[self aspects collect:[:aspect| (RVMMonitor lastSample perform: aspect) at: anIndex]] ifFalse:[self aspects collect:[:aspect| RVMMonitor lastSample perform: aspect]].\n\toffset _ self aspects size > 0 ifTrue:[0]ifFalse:[((anIndex) - 1)*8/5].\n\taspectIndex _ 1.\n\tdata with: self spokePens do:[:datum :pen|\n\t\tpen up;place: self center;turn: offset negated;go:self centerMargin.\n\t\tscaledDatum _ (self scalers at: aspectIndex) scale: datum.\n\t\tpen go:(self spokeLength /100.0*(scaledDatum)).\n\t\tpen turn: offset.\n\t\taspectIndex _ aspectIndex + 1.\n\t\t(self indexIcons at: (self coreIndicies indexOf: anIndex)) displayOn: self canvas at: pen location].\n! !\n\n!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 11/12/2008 02:26'!\nplaceSpokePens\n\n\t| data index |\n\tdata _ self coreIndex > 0 ifTrue:[self aspects collect:[:aspect| (RVMMonitor lastSample perform: aspect) at: self coreIndex]] ifFalse:[self aspects collect:[:aspect| RVMMonitor lastSample perform: aspect]].\n\tindex _ 0.\n\tdata with: self spokePens do:[:datum :pen|\n\t\tindex _ index + 1.\n\t\tpen up;place: self center;go:self centerMargin.\n\t\tpen go:(self spokeLength /100.0*((self scalers at: index) scale: datum))].\n! !\n\n!RVMMultiAspectKiviatView methodsFor: 'drawing' stamp: 'ssa 11/12/2008 12:45'!\nplaceSpokePensForCore: anIndex\n\n\t| data scaledDatum offset aspectIndex |\n\tdata _ anIndex > 0 ifTrue:[self aspects collect:[:aspect| (RVMMonitor lastSample perform: aspect) at: anIndex]] ifFalse:[self aspects collect:[:aspect| RVMMonitor lastSample perform: aspect]].\n\toffset _ self aspects size > 0 ifTrue:[0]ifFalse:[((anIndex) - 1)*8/5].\n\taspectIndex _ 1.\n\tdata with: self spokePens do:[:datum :pen|\n\t\tpen color: (self colors at: (self coreIndicies indexOf: anIndex)).\n\t\tpen up;place: self center;turn: offset negated;go:self centerMargin.\n\t\tscaledDatum _ (self scalers at: aspectIndex) scale: datum.\n\t\tpen go:(self spokeLength /100.0*(scaledDatum)).\n\t\tpen turn: offset.\n\t\taspectIndex _ aspectIndex + 1].\n! !\n\n!RVMMultiAspectKiviatView methodsFor: 'framing' stamp: 'ssa 10/8/2008 15:20'!\nfirstFrame\n\t! !\n\n!RVMMultiAspectKiviatView methodsFor: 'framing' stamp: 'ssa 10/8/2008 19:20'!\nnewFrame\n\tself canvas:nil.\n\tself backgroundCanvas:nil.\n\tself drawOnCanvas.\n\tDisplay fill: self insetDisplayBox fillColor: Color white.\n\tself displayView! !\n\n!RVMMultiAspectKiviatView methodsFor: 'scaling' stamp: 'ssa 11/11/2008 23:06'!\nresetScaling\n\n\tself scalers do:[:each| each resetScaling].\n! !\n\n!RVMMultiAspectKiviatView methodsFor: 'initialize-release' stamp: 'ssa 11/11/2008 23:05'!\ninitializeSpokePens\n\n\t| pens numberOfSpokes spacing center pen |\n\tpens _ OrderedCollection new.\n\tnumberOfSpokes _ self aspects size.\n\tspacing _ 360 / numberOfSpokes asFloat.\n\tcenter _ self insetDisplayBox center.\n\tnumberOfSpokes timesRepeat:[\n\t\tpen _ Pen new.\n\t\tpen defaultNib:1.\n\t\tpen  combinationRule: Form over.\n\t\tpen color: self spokeColor.\n\t\tpen place: center.\n\t\tpen north.\n\t\tpen turn: pens size * spacing.\n\t\tpens add: pen].\n\t^pens! !\n\n!RVMMultiAspectKiviatView methodsFor: 'initialize-release' stamp: 'ssa 11/11/2008 21:41'!\nrelease\n\t\"self controller scalerAdjusters do:[:each| each topView controller closeAndUnscheduleNoTerminate].\t\n\tself controller scalerAdjusters: nil.\"\n\tsuper release! !\n\n!RVMMultiAspectKiviatView methodsFor: 'displaying' stamp: 'ssa 11/12/2008 13:18'!\ndisplayView\n\t\"Display my canvas at my offset.\n\tSubclasses should not override this method but should draw on the canvas instead\"\n\tself firstDisplay  ifFalse:[self firstDisplay:true.\n\t\tself drawOnCanvas].\n\tself okToDisplay ifFalse:[^self].\n\tself uncache.\n\tself canvas displayOn: Display at: self insetDisplayBox center - self canvas center clippingBox: self insetDisplayBox.\n\tself blinker  ifTrue:[(Form dotOfSize:5) displayOn: Display at: self insetDisplayBox center]\n\n! !\n\n!RVMMultiAspectKiviatView methodsFor: 'displaying' stamp: 'dmu 8/23/2010 17:38'!\nresetAfterCoreCountChange\n\tself spokePens: nil. backgroundCanvas _ nil! !\n\n!RVMMultiAspectKiviatView methodsFor: 'controller access' stamp: 'ssa 10/6/2008 13:35'!\ndefaultControllerClass\n\t^RVMMultiAspectKiviatController! !\n\n!RVMMultiAspectKiviatView methodsFor: 'listening' stamp: 'dmu 2/6/2009 22:35'!\nhear: something\n\t\"Update my traces and redisplay\"\n\tself firstDisplay ifFalse: [^self].\n\tself rescaleCounter: self rescaleCounter - 1.\n\tself rescaleCounter = 0 ifTrue:[self rescaleCounter:nil.  \n\t\tself resetScaling.]. \n\tself drawingBackground ifTrue:[^self].\n\tself drawOnCanvas.\n\tself displayView! !\n\n!RVMMultiAspectKiviatView commentStamp: '<historical>' prior: 0!\nI'm a kiviat chart for displaying core aspect data!\n!RVMMultiAspectKiviatView class methodsFor: 'aspect subsets' stamp: 'ssa 11/13/2008 02:02'!\nallCoreAspects\n\t^RVMMulticoreSample coreAspects! !\n\n!RVMMultiAspectKiviatView class methodsFor: 'aspect subsets' stamp: 'ssa 11/12/2008 12:53'!\ncoreAspectSubset\n\t\"RVMMultiAspectKiviatView openOnAspects:  RVMMultiAspectKiviatView coreAspectSubset forCores:(1 to: RVMMonitor coreCount) asOrderedCollection titled:'Outliers'\"\n\t^#(   bytecodesPerSecond   bytesUseds  contextChangeCounts interruptCheckCounts  unforcedInterruptCheckCounts yieldsPerSecond )! !\n\n!RVMMultiAspectKiviatView class methodsFor: 'aspect subsets' stamp: 'ssa 11/12/2008 12:54'!\ncoreAspectSubsetAllocationCompaction\n\t\"RVMMultiAspectKiviatView openOnAspects:  RVMMultiAspectKiviatView coreAspectSubsetAllocationCompaction forCores:(1 to: RVMMonitor coreCount) asOrderedCollection  titled:'Outliers: Allocation/Compaction'\"\n\t^#(allocationsReadWrites allocationsReadMostlys allocationsTotal  compactionsReadWrites compactionsReadMostlys compactionsTotal  )! !\n\n!RVMMultiAspectKiviatView class methodsFor: 'aspect subsets' stamp: 'ssa 11/12/2008 12:54'!\ncoreAspectSubsetBytecodes\n\t\"RVMMultiAspectKiviatView openOnAspects:  RVMMultiAspectKiviatView coreAspectSubsetBytecodes forCores:(1 to: RVMMonitor coreCount) asOrderedCollection titled:'Outliers: Bytecodes'\"\n\t^#( bytecodeCounts bytecodesPerCycles  bytecodesPerSecond )! !\n\n!RVMMultiAspectKiviatView class methodsFor: 'aspect subsets' stamp: 'ssa 11/12/2008 12:54'!\ncoreAspectSubsetBytes\n\t\"RVMMultiAspectKiviatView openOnAspects:  RVMMultiAspectKiviatView coreAspectSubsetBytes forCores:(1 to: RVMMonitor coreCount) asOrderedCollection titled:'Outliers: Bytes'\"\n\t^#(bytesLeftReadWrites bytesLeftReadMostlys bytesLefts bytesUsedReadWrites bytesUsedReadMostlys bytesUseds )! !\n\n!RVMMultiAspectKiviatView class methodsFor: 'aspect subsets' stamp: 'ssa 11/12/2008 12:55'!\ncoreAspectSubsetRunWait\n\t\"RVMMultiAspectKiviatView openOnAspects:  RVMMultiAspectKiviatView coreAspectSubsetRunWait forCores:(1 to: RVMMonitor coreCount) asOrderedCollection titled:'Outliers: RunWait'\"\n\t^#(millisecondsRunnings millisecondsWaitings msRunWaitRatios msSinceLasts )! !\n\n!RVMMultiAspectKiviatView class methodsFor: 'aspect subsets' stamp: 'ssa 11/12/2008 12:55'!\ncoreAspectSubsetYields\n\t\"RVMMultiAspectKiviatView openOnAspects:  RVMMultiAspectKiviatView coreAspectSubsetYields forCores:(1 to: RVMMonitor coreCount) asOrderedCollection titled:'Outliers: Yields'\"\n\t^#(unforcedInterruptCheckCounts yieldCounts yieldFrequencies yieldsPerSecond )! !\n\n!RVMMultiAspectKiviatView class methodsFor: 'examples' stamp: 'ssa 11/11/2008 23:18'!\nexample\n\t\"RVMMultiAspectKiviatView example\"\n\tself openOnAspects: RVMMulticoreSample systemAspects! !\n\n!RVMMultiAspectKiviatView class methodsFor: 'examples' stamp: 'ssa 11/12/2008 10:26'!\nexample10Cores\n\t\"RVMMultiAspectKiviatView example10Cores\"\n\tself openOnAspects: RVMMulticoreSample coreAspects forCores: #(1 2 3 4 5 6 7 8 9 10)! !\n\n!RVMMultiAspectKiviatView class methodsFor: 'examples' stamp: 'ssa 11/12/2008 10:50'!\nexample10CoresSubset1\n\t\"RVMMultiAspectKiviatView example10CoresSubset1\"\n\tself openOnAspects: self coreAspectSubset forCores: #(1 2 3 4 5 6 7 8 9 10)! !\n\n!RVMMultiAspectKiviatView class methodsFor: 'examples' stamp: 'ssa 11/12/2008 10:34'!\nexample20Cores\n\t\"RVMMultiAspectKiviatView example20Cores\"\n\tself openOnAspects: RVMMulticoreSample coreAspects forCores: (1 to: 20) asOrderedCollection! !\n\n!RVMMultiAspectKiviatView class methodsFor: 'examples' stamp: 'ssa 11/12/2008 11:53'!\nexampleAllCores\n\t\"RVMMultiAspectKiviatView exampleAllCores\"\n\tself openOnAspects: RVMMulticoreSample coreAspects forCores:(1 to: RVMMonitor coreCount) asOrderedCollection! !\n\n!RVMMultiAspectKiviatView class methodsFor: 'examples' stamp: 'ssa 11/12/2008 11:53'!\nexampleAllCoresSubset1\n\t\"RVMMultiAspectKiviatView exampleAllCoresSubset1\"\n\tself openOnAspects:  self coreAspectSubset forCores:(1 to: RVMMonitor coreCount) asOrderedCollection! !\n\n!RVMMultiAspectKiviatView class methodsFor: 'examples' stamp: 'ssa 11/12/2008 02:24'!\nexampleCore5\n\t\"RVMMultiAspectKiviatView exampleCore5\"\n\tself openOnAspects: RVMMulticoreSample coreAspects forCore: 5! !\n\n!RVMMultiAspectKiviatView class methodsFor: 'examples' stamp: 'ssa 11/12/2008 10:45'!\nexampleSubset1\n\t\"RVMMultiAspectKiviatView exampleSubset1\"\n\tself openOnAspects: self coreAspectSubset! !\n\n!RVMMultiAspectKiviatView class methodsFor: 'instance creation' stamp: 'ssa 11/11/2008 23:17'!\nopenOnAspect: aSymbol\n\t\"RVMMultiAspectKiviatView example\"\n\t\n\tself openOnAspects: (Array with: aSymbol)! !\n\n!RVMMultiAspectKiviatView class methodsFor: 'instance creation' stamp: 'ssa 11/12/2008 11:44'!\nopenOnAspects: someSymbols\n\t\"RVMMultiAspectKiviatView example\"\n\t\n\t| topView v |\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\ttopView minimumSize: 600@250.\n\ttopView maximumSize: 1000@800.\n\tv := self new.\n\tv borderWidth:1.\n\tv aspects: someSymbols.\n\ttopView addSubView: v.\n\ttopView label: 'MultiAspectKiviat'.\n\ttopView controller open! !\n\n!RVMMultiAspectKiviatView class methodsFor: 'instance creation' stamp: 'ssa 11/12/2008 10:15'!\nopenOnAspects: someSymbols forCore: anIndex\n\t\"RVMMultiAspectKiviatView exampleCore5\"\n\t\n\tself openOnAspects: someSymbols forCores: (Array with: anIndex)! !\n\n!RVMMultiAspectKiviatView class methodsFor: 'instance creation' stamp: 'ssa 11/12/2008 12:52'!\nopenOnAspects: someSymbols forCores: indexArray\n\t\"RVMMultiAspectKiviatView exampleAllCores\"\n\t\n\tself openOnAspects: someSymbols forCores: indexArray titled: 'MultiAspectKiviat'! !\n\n!RVMMultiAspectKiviatView class methodsFor: 'instance creation' stamp: 'ssa 11/12/2008 12:59'!\nopenOnAspects: someSymbols forCores: indexArray titled: aString\n\t\"RVMMultiAspectKiviatView exampleAllCores\"\n\t\n\t| topView v |\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\ttopView minimumSize: 300@150\"(9*indexArray size max:250)\".\n\ttopView maximumSize: 1000@800.\n\tv := self new.\n\tv coreIndicies: indexArray.\n\tv borderWidth:1.\n\tv aspects: someSymbols.\n\ttopView addSubView: v.\n\ttopView label: aString.\n\ttopView controller open! !\n\n!RVMMultiAspectStripChartController methodsFor: 'menu messages' stamp: 'ssa 9/14/2008 21:49'!\neraseStrip\n\n\tself view eraseStrip! !\n\n!RVMMultiAspectStripChartController methodsFor: 'controlling' stamp: 'ssa 9/13/2008 17:44'!\nredButtonActivity\n\n\tself view displayView! !\n\n!RVMMultiAspectStripChartController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 15:15'!\nyellowButtonActivity\n\t| menu answer |\n\tself view dontDisplayWhile:[\n\tSensor yellowButtonPressed \n\t\tifTrue: [menu := CustomMenu new.\n\t\t\tmenu add: 'erase strip' action: #eraseStrip:.\n\t\t\tanswer := menu startUp:  nil withCaption: nil at: Sensor cursorPoint.\n\t\t\tanswer notNil ifTrue:[\n\t\t\t\tself perform: answer]]]! !\n\n!RVMMultiAspectStripChartView methodsFor: 'controller access' stamp: 'ssa 9/13/2008 17:43'!\ndefaultControllerClass\n\n^RVMMultiAspectStripChartController! !\n\n!RVMMultiAspectStripChartView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 17:12'!\naspects\n\t\"Answer the value of aspects\"\n\n\taspects isNil ifTrue:[self aspects: OrderedCollection new].\n\t^ aspects! !\n\n!RVMMultiAspectStripChartView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:41'!\naspects: anObject\n\t\"Set the value of aspects\"\n\n\taspects _ anObject..\n\tself scalers:nil.\n\tself data: nil.\n! !\n\n!RVMMultiAspectStripChartView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 17:12'!\nchart\n\t\"Answer the value of chart\"\n\n\tchart isNil ifTrue:[self chart: (Form fromDisplay: self insetDisplayBox) fillWhite].\n\t^ chart! !\n\n!RVMMultiAspectStripChartView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 17:11'!\nchart: anObject\n\t\"Set the value of chart\"\n\n\tchart _ anObject! !\n\n!RVMMultiAspectStripChartView methodsFor: 'accessing' stamp: 'ssa 9/14/2008 20:55'!\ncolors\n\t\"Answer the value of colors\"\n\n\t^self scalers collect:[:each| each color]! !\n\n!RVMMultiAspectStripChartView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 17:36'!\ncoreIndex\n\t\"Answer the value of coreIndex\"\n\n\tcoreIndex isNil ifTrue:[self coreIndex: 1].\n\t^ coreIndex! !\n\n!RVMMultiAspectStripChartView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 17:36'!\ncoreIndex: anObject\n\t\"Set the value of coreIndex\"\n\n\tcoreIndex _ anObject! !\n\n!RVMMultiAspectStripChartView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 17:25'!\ndata\n\t\"Answer the value of data\"\n\n\tdata isNil ifTrue:[self data: (Array new: self aspects size)].\n\t^ data! !\n\n!RVMMultiAspectStripChartView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 17:11'!\ndata: anObject\n\t\"Set the value of data\"\n\n\tdata _ anObject! !\n\n!RVMMultiAspectStripChartView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:18'!\ndotSize\n\t\"Answer the value of dotSize\"\n\n\tdotSize isNil ifTrue:[self dotSize: 2].\n\t^ dotSize! !\n\n!RVMMultiAspectStripChartView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 17:14'!\ndotSize: anObject\n\t\"Set the value of dotSize\"\n\n\tdotSize _ anObject! !\n\n!RVMMultiAspectStripChartView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:49'!\ngetData\n\t | sample |\n\tsample _ self sampleSource value.\n\t1 to: self aspects size do:[:index|\n\t\tself data at: index put: ((self scalers at: index) scale:((sample perform: (self aspects at: index)) at:  self coreIndex))]! !\n\n!RVMMultiAspectStripChartView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 17:29'!\nsampleSource\n\t\"Answer the value of sampleSource\"\n\n\tsampleSource isNil ifTrue:[self sampleSource: [RVMMonitor lastSample]].\n\t^ sampleSource! !\n\n!RVMMultiAspectStripChartView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 17:27'!\nsampleSource: anObject\n\t\"Set the value of sampleSource\"\n\n\tsampleSource _ anObject! !\n\n!RVMMultiAspectStripChartView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:45'!\nscalers\n\t\"Answer the value of scalers\"\n\n\tscalers isNil ifTrue:[self scalers: (RVMMonitor coloredScalersFor: self aspects)].\n\t^ scalers! !\n\n!RVMMultiAspectStripChartView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 18:04'!\nscalers: anObject\n\t\"Set the value of scalers\"\n\n\tscalers _ anObject! !\n\n!RVMMultiAspectStripChartView methodsFor: 'listening' stamp: 'ssa 1/1/1970 00:33'!\nhear: something\n\n\tself displayView! !\n\n!RVMMultiAspectStripChartView methodsFor: 'displaying' stamp: 'ssa 10/21/2008 11:32'!\ndisplayView\n\t| bottomLeft points sortedPoints box |\n\tself okToDisplay ifFalse:[^self].\n\tself uncache.\n\tself getData.\n\tself chart displayOn: Display at: self insetDisplayBox origin + (self dotSize @ 0) clippingBox: self insetDisplayBox.\n\tbottomLeft := self insetDisplayBox bottomLeft.\n\tpoints := OrderedCollection new.\n\t1 to: self aspects size do: [:index | points add: index @ (self data at: index)].\n\tsortedPoints := points asSortedCollection: [:a :b | a y > b y].\n\tsortedPoints\n\t\tdo: [:each | \n\t\t\tbox := bottomLeft - (0 @ (each y * self dotSize)) corner: bottomLeft + (self dotSize @ 0).\n\t\t\tDisplay fill: box fillColor: (self colors at: each x)].\n\tself chart:(Form fromDisplay: self insetDisplayBox).! !\n\n!RVMMultiAspectStripChartView methodsFor: 'displaying' stamp: 'ssa 9/14/2008 21:50'!\neraseStrip\n\tDisplay fill: self insetDisplayBox fillColor: Color  white.\n\tself chart: nil;chart! !\n\n!RVMMultiAspectStripChartView methodsFor: 'auxiliary views' stamp: 'ssa 1/1/1970 00:29'!\ncombinedScalerView\n\t\"Answer a view holding all my appropriate scaler views\"\n\t| v last current |\n\tv _ RVMView new.\n\tlast _ nil.\n\tself scalers do:[:scaler|\n\t\tv addSubView: (current _ RVMColoredDataScalerView on: scaler) below: last.\n\t\tcurrent borderWidth:1.\n\t\tlast _ current].\n\t^v! !\n\n!RVMMultiAspectStripChartView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:29'!\nexample\n\t\"RVMMultiAspectStripChartView example\"\n\t| topView chart scalers aspectCount |\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\tchart _ self exampleInstance.\n\taspectCount _ chart aspects size.\n\ttopView minimumSize: 200@(aspectCount*40).\n\ttopView maximumSize: 800@(2*aspectCount*40).\n\tscalers _ chart combinedScalerView.\n\ttopView addSubView: scalers in:(0@0 extent: 1/3 @ 1)borderWidth:1.\n\ttopView addSubView: chart in:(1/3@0 extent: 2/3 @ 1)borderWidth:1.\n\ttopView label: 'Multi Aspect Strip'.\n\ttopView controller open! !\n\n!RVMMultiAspectStripChartView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:28'!\nexampleInstance\n\n\t| view |\n\tview _ self new.\n\tview aspects: #( bytecodeCounts bytesUseds yieldCounts ).\n\t^view! !\n\n!RVMMultiAspectStripChartView class methodsFor: 'examples' stamp: 'ssa 9/14/2008 20:30'!\nexampleMany\n\t\"RVMMultiAspectStripChartView exampleMany\"\n\t| topView view manyCount lastView |\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\tmanyCount _ 4.\n\ttopView minimumSize: 100@(25*manyCount).\n\ttopView maximumSize: 200@(50*manyCount).\n\tlastView _ nil.\n\tmanyCount timesRepeat:[\n\t\tview _ self exampleInstance.\n\t\ttopView addSubView: view below: lastView.\n\t\tlastView _ view].\n\ttopView label: 'Aspect/Color'.\n\ttopView controller open! !\n\n!RVMMultiAspectStripChartView class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 01:10'!\ncoreIndex: index\n\t\"Answer a stripchart for this core index watching these aspects from this source\"\n\t| view |\n\tview _ self new.\n\tview coreIndex: index.\n\tview aspects: #(bytesUsed bytecodeCounts yieldCounts).\n\tview sampleSource: [RVMMonitor lastSample].\n\t^view! !\n\n!RVMMultiAspectStripChartView class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 01:08'!\ncoreIndex: index  aspects: aspects \n\t\"Answer a stripchart for this core index watching these aspects from this source\"\n\t| view |\n\tview _ self new.\n\tview coreIndex: index.\n\tview aspects: aspects.\n\tview sampleSource: [RVMMonitor lastSample].\n\t^view! !\n\n!RVMMultiAspectStripChartView class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 01:08'!\ncoreIndex: index  aspects: aspects sampleSource: aBlock\n\t\"Answer a stripchart for this core index watching these aspects from this source\"\n\t| view |\n\tview _ self new.\n\tview coreIndex: index.\n\tview aspects: aspects.\n\tview sampleSource: aBlock.\n\t^view! !\n\n!RVMMultiGroupLocatorController methodsFor: 'controlling' stamp: 'ssa 11/27/2008 13:44'!\nchangeSourceForGroupNumber: anIndex\n\t| menu action choices |\n\tmenu := CustomMenu new.\n\tchoices _ {'Object withAllSubclasses'. \n\t\t\t'View withAllSubclasses'.\n\t\t\t'Number allSubclasses'.\n\t\t\t#line.\n\t\t\t'String allInstances'.\n\t\t\t'Array allInstances'.\n\t\t\t'Collection allSubInstances' }.\n\tchoices do:[:choice|\n\t\tchoice = #line ifTrue:[menu addLine]\n\t\t\tifFalse:[menu add: choice action:choice]].\n\t\n\taction := menu startUp: nil withCaption: 'Select an expression to use for group #',(anIndex printString) at: Sensor cursorPoint.\n\taction notNil ifTrue:[self changeSourceSourcefromGroupNumber: anIndex to: action]! !\n\n!RVMMultiGroupLocatorController methodsFor: 'controlling' stamp: 'ssa 11/27/2008 13:47'!\nchangeSourceSourcefromGroupNumber: anIndex to: aString\nCursor wait showWhile:[\n\tself view sourceSourceForGroupNumber: anIndex put: aString.\n\tself view changed:#updateDisplay]! !\n\n!RVMMultiGroupLocatorController methodsFor: 'controlling' stamp: 'ssa 11/27/2008 13:53'!\nyellowButtonActivity\n\t| menu action choices index |\n\tself view topView dontDisplayWhile:[\n\tmenu := CustomMenu new.\n\tmenu add:'Inspect View' action:[self view inspect].\n\tmenu addLine.\n\tchoices _ view sources collect:[:each| 'Change #',(index _ view sources indexOf: each) printString, ': ',(view sourceSourceForGroupNumber:index)].\n\tchoices do:[:choice|\n\t\tchoice = #line ifTrue:[menu addLine]\n\t\t\tifFalse:[menu add: choice action: (choices indexOf: choice)]].\n\t\n\taction := menu startUp: nil withCaption: '' at: Sensor cursorPoint].\n\t(action isKindOf: BlockContext) ifTrue:[^action value].\n\taction notNil ifTrue:[self changeSourceForGroupNumber: action]! !\n\n!RVMMultiGroupLocatorView methodsFor: 'listening' stamp: 'ssa 11/27/2008 13:24'!\nhear: something\n\t\"Update my display\"\n\tself counts: nil.\n\tself drawOnCanvas.\n\tself displayView! !\n\n!RVMMultiGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 12:55'!\ncolors\n\t\"Answer the value of colors\"\n\n\tcolors isNil ifTrue:[self colors: (Color hotColdShades: (self sources size max:5))].\n\t^ colors! !\n\n!RVMMultiGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 12:37'!\ncolors: anObject\n\t\"Set the value of colors\"\n\n\tcolors _ anObject! !\n\n!RVMMultiGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 13:33'!\ncounts\n\t\"Answer the value of counts\"\n\n\tcounts isNil ifTrue:[self counts: (Array new:self sources size).\n\t\t1 to: self sources size do:[:index| self countsPerCoreForGroupNumber: index]].\n\t^ counts! !\n\n!RVMMultiGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 12:31'!\ncounts: anObject\n\t\"Set the value of counts\"\n\n\tcounts _ anObject! !\n\n!RVMMultiGroupLocatorView methodsFor: 'accessing' stamp: 'ads 1/30/2011 15:20'!\ncountsPerCoreForGroupNumber: anIndex\n\t\"Answer the value of countsPerCore\"\n\t(self counts at: anIndex) isNil ifTrue:[self counts at: anIndex put: ((self objectsForGroupNumber: anIndex) asOrderedCollection  collect:[:obj| RVMOperations isRVM ifFalse:[RVMMonitor coreCount atRandom - 1]ifTrue:[RVMOperations getCoreHolding:obj]]) asBag].\n\t^ self counts at: anIndex! !\n\n!RVMMultiGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 12:33'!\nobjectsForGroupNumber: anIndex\n\t\"Answer my colection of objects to locate.\"\n\t| source |\n\tsource _ self sources at: anIndex.\n\t^source isSymbol ifTrue:[self model perform: source] ifFalse:[source value]! !\n\n!RVMMultiGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 13:19'!\nsourceSourceForGroupNumber: anIndex\n\t| code source |\n\tsource _ self sources at: anIndex.\n\tsource isSymbol ifTrue:[^source printString].\n\tcode _ source decompile printString.\n\t(code beginsWith:'{[') &(code endsWith:']}') ifTrue:[code _ code copyFrom: 3 to: code size - 2].\n\t^code! !\n\n!RVMMultiGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 13:22'!\nsourceSourceForGroupNumber: anIndex put: aText\n\t| value aString |\n\taString _ aText asString.\n\t( aString withBlanksTrimmed beginsWith:'#')\n\t\tifTrue:[value _  Compiler new evaluate: aString in: nil to: nil\n\t\t\t\t\t\tnotifying: nil ifFail: [^ false].\n\t\t\t\tself model perform: value.  \"test to make sure it works before installing\"]\n\t\tifFalse:[value _ Compiler new evaluate: '[',aString,']' in: nil to: nil\n\t\t\t\t\t\tnotifying: nil ifFail: [^ false]].\n\tself sources at: anIndex put: value.\n\tself hear:nil.\n\t^true \"tell the editor its OK\"! !\n\n!RVMMultiGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 12:42'!\nsources\n\t\"Answer the value of sources\"\n\n\tsources isNil ifTrue:[self sources: {[String allInstances]. [View withAllSubclasses]. [Number withAllSubclasses]}].\n\t^ sources! !\n\n!RVMMultiGroupLocatorView methodsFor: 'accessing' stamp: 'ssa 11/27/2008 12:31'!\nsources: anObject\n\t\"Set the value of sources\"\n\n\tsources _ anObject! !\n\n!RVMMultiGroupLocatorView methodsFor: 'drawing' stamp: 'ssa 11/27/2008 13:34'!\ndrawLocations\n\t| indicies |\n\tindicies _ (self counts asSortedCollection:[:a :b| a size < b size]) collect:[:each| self counts indexOf: each].\n\tindicies do:[:anIndex| self drawLocationsForGroupNumber: anIndex]! !\n\n!RVMMultiGroupLocatorView methodsFor: 'drawing' stamp: 'ssa 11/27/2008 12:40'!\ndrawLocationsForGroupNumber: anIndex\n\t| dot coreExtent amt index rect pt dotSize realRect |\n\tcoreExtent _ RVMMonitor extent.\n\tdotSize _(self boxes first width // (((self countsPerCoreForGroupNumber:anIndex) size // self boxes size)max:1))min:self boxes first width //2 max:1.\n\tdot _ Form dotOfSize: dotSize color: (self colors at: anIndex).\n\t0 to: coreExtent x - 1 do:[:x|\n\t\t0 to: coreExtent y - 1 do:[:y|\n\t\t\tamt _ (self countsPerCoreForGroupNumber:anIndex) occurrencesOf: (index _ y*8+x).\n\t\t\trect _ (realRect _ self boxes at: index + 1) insetBy: dot offset abs.\n\t\t\tamt  timesRepeat:[pt _ rect asRandomPoint.\n\t\t\t\tdot displayOn: self canvas at: pt clippingBox: realRect rule: Form paint fillColor:nil]].\n\t\t]! !\n\n!RVMMultiGroupLocatorView methodsFor: 'controller access' stamp: 'ssa 11/27/2008 13:40'!\ndefaultControllerClass\n\n\t^RVMMultiGroupLocatorController! !\n\n!RVMMultiGroupLocatorView class methodsFor: 'instance creation' stamp: 'ssa 11/27/2008 12:58'!\non: aModel sources: someBlocksOrSelectors \n\t^self on: aModel sources: someBlocksOrSelectors colors: nil! !\n\n!RVMMultiGroupLocatorView class methodsFor: 'instance creation' stamp: 'ssa 11/27/2008 12:55'!\non: aModel sources: someBlocksOrSelectors colors: someColors\n\t\"(RVMMultiGroupLocatorView on: Smalltalk sources: {#keys. #values. #classNames} colors: nil) demo\"\n\t\"(RVMultiGroupLocatorView on: nil sources: {[String allInstances]. [Array allInstances]} colors: {Color yellow. Color green}) demo\"\n\t\"(RVMMultiGroupLocatorView on: nil sources: {[String allInstances]. [Array allInstances]. [Object withAllSubclasses]. [Float allInstances]} colors: nil) demo\"\n\t\n\t| v |\n\tv _ self new.\n\tv model: aModel.\n\tv sources: someBlocksOrSelectors.\n\tv colors: someColors.\n\t^v! !\n\n!RVMMultiGroupLocatorView class methodsFor: 'instance creation' stamp: 'ssa 11/27/2008 14:04'!\nopenOn: aModel sources: someBlocksOrSelectors colors: someColors\n\t\"RVMMultiGroupLocatorView openOn: Smalltalk sources: {#keys. #values. #classNames} colors: nil\"\n\t\"RVMMultiGroupLocatorView openOn: nil sources: {[String allInstances]. [Array allInstances]} colors: {Color yellow. Color green}\"\n\t\"RVMMultiGroupLocatorView openOn: nil sources: {[String allInstances]. [Array allInstances]. [Object withAllSubclasses]. [Float allInstances]} colors: nil\"\n\t| topView v ptv cbv h |\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\tv := self on: aModel sources: someBlocksOrSelectors colors: someColors.\n\tv borderWidth:1.\n\ttopView minimumSize: 150@(150 + (v sources size * 20)).\n\ttopView maximumSize: 800@900.\n\ttopView addSubView: v  viewport:(0@0 extent: 150@150).\n\th _ 0.\n\t1 to: v sources size do:[:groupIndex|\n\t\tptv _ RVMPluggableTextView on: v text:[v sourceSourceForGroupNumber: groupIndex] fixTemps accept:[:arg| v sourceSourceForGroupNumber: groupIndex put: arg] fixTemps.\n\t\tptv borderWidth:1.\n\t\tcbv _ RVMColorButtonView on: v colorGetter:[v colors at: groupIndex] fixTemps colorSetter:[:arg|v colors at: groupIndex put: arg.  v displayView] fixTemps.\n\t\tcbv borderWidth:1.\n\t\ttopView addSubView: cbv  viewport:(0@(h+150) extent:20@20).\n\t\ttopView addSubView: ptv  viewport:(20@(h+150) extent:130@20).\n\t\th _ h + 20].\n\ttopView label: 'Group Locator'.\n\ttopView controller open! !\n\n!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 19:35'!\naddAspect: aSymbol\n\n\t| s |\n\tself aspects add: aSymbol.\n\tself scalers add:(s _ RVMDataScaler new automatic).\n\tself pinMinAtZero ifTrue:[s pinMinAtZero].\n\tself lastTotals add: 0.\n\tself lastAverages add:0\n! !\n\n!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 11/11/2008 18:02'!\naspect\n\t\"Get the value of aspect\"\n\n\t^self aspects at:1! !\n\n!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 19:44'!\naspect: anObject\n\t\"Set the value of aspect\"\n\n\tself aspects at:1 put: anObject.\n\tself lastAverages at: 1 put: 0.\n\tself lastTotals at: 1 put:0.\n\tself topView == self ifFalse:[self topView relabel: anObject asString].\n\tself resetScaling.\n\tself drawOnCanvas! !\n\n!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 17:22'!\naspectCount\n\n\t^self aspects size! !\n\n!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 15:02'!\naspects\n\t\"Answer the value of aspects\"\n\t\n\taspects isNil ifTrue:[self aspects: #(bytesUseds bytesUsedReadWrites bytesUsedReadMostlys) asOrderedCollection].\n\t^ aspects ! !\n\n!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 18:33'!\naspects: anObject\n\t\"Set the value of aspects\"\n\n\taspects _ anObject.\n\taspects notNil ifTrue:[aspects _ aspects asOrderedCollection.\n\t\taspects size > 4 ifTrue:[aspects _ aspects copyFrom: 1 to: 4]].\n\tself lastAverages: nil.\n\tself lastTotals: nil! !\n\n!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 17:57'!\ncolorForAspect: aSymbol\n\n\t^self colors at: (self aspects indexOf: aSymbol)! !\n\n!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/21/2008 11:33'!\ncolors\n\t\"Answer the value of colors \"\n\n\tcolors isNil ifTrue:[self colors: {Color blue. Color red. Color green darker darker. Color orange darker }].\n\t^ colors! !\n\n!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 17:56'!\ncolors: anObject\n\t\"Set the value of colors\"\n\n\tcolors _ anObject! !\n\n!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 19:12'!\ncommonScale\n\t\"Answer the value of commonScale\"\n\n\tcommonScale isNil ifTrue:[self commonScale: false].\n\t^ commonScale! !\n\n!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 19:13'!\ncommonScale: anObject\n\t\"Set the value of commonScale\"\n\n\tcommonScale _ anObject.! !\n\n!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 20:02'!\nlastAverageForAspect: aSymbol\n\n\t^self lastAverages at: (self aspects indexOf: aSymbol ifAbsent:[1])! !\n\n!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 15:19'!\nlastAverageForAspect: aSymbol put: aValue\n\n\t^self lastAverages at: (self aspects indexOf: aSymbol) put: aValue! !\n\n!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 18:41'!\nlastAverages\n\t\"Answer the value of lastAverages\"\n\n\tlastAverages isNil ifTrue:[self lastAverages: (Array new: self aspects size withAll: 0)asOrderedCollection].\n\t^ lastAverages! !\n\n!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 15:14'!\nlastAverages: anObject\n\t\"Set the value of lastAverages\"\n\n\tlastAverages _ anObject! !\n\n!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 15:15'!\nlastTotalForAspect: aSymbol\n\n\t^self lastTotals at: (self aspects indexOf: aSymbol)! !\n\n!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 15:19'!\nlastTotalForAspect: aSymbol put: aValue\n\n\t^self lastTotals at: (self aspects indexOf: aSymbol) put: aValue! !\n\n!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 18:41'!\nlastTotals\n\t\"Answer the value of lastTotals\"\n\n\tlastTotals isNil ifTrue:[self lastTotals: (Array new: self aspects size withAll: 0) asOrderedCollection].\n\t^ lastTotals! !\n\n!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 15:14'!\nlastTotals: anObject\n\t\"Set the value of lastTotals\"\n\n\tlastTotals _ anObject! !\n\n!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 19:12'!\npinMinAtZero\n\t\"Answer the value of pinMinAtZero\"\n\n\tpinMinAtZero isNil ifTrue:[self pinMinAtZero: false].\n\t^ pinMinAtZero! !\n\n!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 19:12'!\npinMinAtZero: anObject\n\t\"Set the value of pinMinAtZero\"\n\n\tpinMinAtZero _ anObject.\n\tself scalers do:[:each| each pinMinAtZero]! !\n\n!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 19:15'!\nremoveAspect: aSymbol\n\n\t| index |\n\tindex _ self aspects indexOf: aSymbol.\n\tself aspects remove: aSymbol.\n\tself commonScale ifFalse:[self scalers remove:(self scalers at: index)].\n\tself lastTotals remove:(self lastTotals at: index).\n\tself lastAverages remove:(self lastAverages at: index)\n! !\n\n!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 11/11/2008 18:04'!\nscaler\n\t\"Get the default scaler\"\n\n\t^self scalers at:1! !\n\n!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 11/11/2008 21:27'!\nscalerAt: anIndex\n\t\"Get the default scaler\"\n\tself commonScale ifTrue:[^self scalers first].\n\t^self scalers at: anIndex! !\n\n!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/7/2008 19:13'!\nscalerForAspect: aSymbol\n\tself commonScale ifTrue:[^self scalers first].\n\t^self scalers at: (self aspects indexOf: aSymbol)! !\n\n!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 17:59'!\nscalers\n\t\"Answer the value of scalers\"\n\n\tscalers isNil ifTrue:[self scalers: OrderedCollection new.\n\t\tself aspects do:[:a| scalers add: RVMDataScaler new automatic]].\n\t^ scalers! !\n\n!RVMMultiKiviatView methodsFor: 'accessing' stamp: 'ssa 10/6/2008 17:56'!\nscalers: anObject\n\t\"Set the value of scalers\"\n\n\tscalers _ anObject! !\n\n!RVMMultiKiviatView methodsFor: 'drawing' stamp: 'ssa 10/7/2008 15:39'!\ndrawBottomLeftLabelsOnCanvasForAspect: aSymbol\n\t\n\t| minLabel maxLabel  aspectLabel avgLabel totalLabel aspectColor box height |\n\tbox _ self canvas boundingBox.\n\taspectColor _self colorForAspect:aSymbol.\n\taspectLabel _ aSymbol asString asDisplayText.\n\tminLabel _ ('min: ',(self scalerForAspect: aSymbol) min printShowingMax3Digits) asDisplayText.\n\tmaxLabel _ ('max: ',(self scalerForAspect: aSymbol) max printShowingMax3Digits) asDisplayText.\n\tavgLabel _ ('avg: ',(self lastAverageForAspect: aSymbol) printShowingMax3Digits) asDisplayText.\n\ttotalLabel _ ('total: ',(self lastTotalForAspect: aSymbol) printShowingMax3Digits) asDisplayText.\n\tavgLabel foregroundColor: aspectColor backgroundColor: Color transparent.\n\ttotalLabel foregroundColor: aspectColor backgroundColor: Color transparent.\n\taspectLabel foregroundColor: aspectColor backgroundColor: Color transparent.\n\tminLabel foregroundColor: aspectColor backgroundColor: Color transparent.\n\tmaxLabel foregroundColor: aspectColor backgroundColor: Color transparent.\n\theight _ aspectLabel height -3.\n\taspectLabel displayOn: self canvas at:  box bottomLeft - (0 @aspectLabel height).\n\tminLabel displayOn: self canvas at: ((box bottomLeft x )@(box bottomLeft y -( height*2) )) clippingBox: box rule: Form paint fillColor:nil.\n\tmaxLabel displayOn: self canvas at: ((box bottomLeft x )@(box bottomLeft y - (height*3)+3)) clippingBox: box rule: Form paint fillColor:nil.\n\ttotalLabel displayOn: self canvas at: ((box bottomLeft x )@(box bottomLeft y - (height *4)+6)) clippingBox: box rule: Form paint fillColor:nil.\n\tavgLabel displayOn: self canvas at: ((box bottomLeft x )@(box bottomLeft y - (height *5)+9)) clippingBox: box rule: Form paint fillColor:nil.\n! !\n\n!RVMMultiKiviatView methodsFor: 'drawing' stamp: 'ssa 10/7/2008 15:36'!\ndrawBottomRightLabelsOnCanvasForAspect: aSymbol\n\t\n\t| minLabel maxLabel  aspectLabel avgLabel totalLabel aspectColor box height |\n\tbox _ self canvas boundingBox.\n\taspectColor _self colorForAspect:aSymbol.\n\taspectLabel _ aSymbol asString asDisplayText.\n\tminLabel _ ('min: ',(self scalerForAspect: aSymbol) min printShowingMax3Digits) asDisplayText.\n\tmaxLabel _ ('max: ',(self scalerForAspect: aSymbol) max printShowingMax3Digits) asDisplayText.\n\tavgLabel _ ('avg: ',(self lastAverageForAspect: aSymbol) printShowingMax3Digits) asDisplayText.\n\ttotalLabel _ ('total: ',(self lastTotalForAspect: aSymbol) printShowingMax3Digits) asDisplayText.\n\tavgLabel foregroundColor: aspectColor backgroundColor: Color transparent.\n\ttotalLabel foregroundColor: aspectColor backgroundColor: Color transparent.\n\taspectLabel foregroundColor: aspectColor backgroundColor: Color transparent.\n\tminLabel foregroundColor: aspectColor backgroundColor: Color transparent.\n\tmaxLabel foregroundColor: aspectColor backgroundColor: Color transparent.\n\theight _ aspectLabel height -3.\n\taspectLabel displayOn: self canvas at:  box bottomRight - (aspectLabel extent).\n\tminLabel displayOn: self canvas at: ((box bottomRight x - minLabel width)@(box bottomRight y -( height*2) )) clippingBox: box rule: Form paint fillColor:nil.\n\tmaxLabel displayOn: self canvas at: ((box bottomRight x - maxLabel width)@(box bottomRight y - (height*3)+3)) clippingBox: box rule: Form paint fillColor:nil.\n\ttotalLabel displayOn: self canvas at: ((box bottomRight x - totalLabel width)@(box bottomRight y - (height *4)+6)) clippingBox: box rule: Form paint fillColor:nil.\n\tavgLabel displayOn: self canvas at: ((box bottomRight x - avgLabel width)@(box bottomRight y - (height *5)+9)) clippingBox: box rule: Form paint fillColor:nil.\n! !\n\n!RVMMultiKiviatView methodsFor: 'drawing' stamp: 'ssa 10/7/2008 14:56'!\ndrawLabelsOnCanvas\n\t\n\t| quads |\n\tquads _ #(drawTopLeftLabelsOnCanvasForAspect: drawTopRightLabelsOnCanvasForAspect: drawBottomRightLabelsOnCanvasForAspect: drawBottomLeftLabelsOnCanvasForAspect:).\n\t1 to: self aspects size do:[:index| \n\t\tself perform: (quads at: index) with: (self aspects at: index)]! !\n\n!RVMMultiKiviatView methodsFor: 'drawing' stamp: 'ssa 10/7/2008 15:13'!\ndrawTopLeftLabelsOnCanvasForAspect: aSymbol\n\t\n\t| minLabel maxLabel  aspectLabel avgLabel totalLabel aspectColor box height |\n\tbox _ self canvas boundingBox.\n\taspectColor _self colorForAspect:aSymbol.\n\taspectLabel _ aSymbol asString asDisplayText.\n\tminLabel _ ('min: ',(self scalerForAspect: aSymbol) min printShowingMax3Digits) asDisplayText.\n\tmaxLabel _ ('max: ',(self scalerForAspect: aSymbol) max printShowingMax3Digits) asDisplayText.\n\tavgLabel _ ('avg: ',(self lastAverageForAspect: aSymbol) printShowingMax3Digits) asDisplayText.\n\ttotalLabel _ ('total: ',(self lastTotalForAspect: aSymbol) printShowingMax3Digits) asDisplayText.\n\tavgLabel foregroundColor: aspectColor backgroundColor: Color transparent.\n\ttotalLabel foregroundColor: aspectColor backgroundColor: Color transparent.\n\taspectLabel foregroundColor: aspectColor backgroundColor: Color transparent.\n\tminLabel foregroundColor: aspectColor backgroundColor: Color transparent.\n\tmaxLabel foregroundColor: aspectColor backgroundColor: Color transparent.\n\theight _ aspectLabel height - 6.\n\taspectLabel displayOn: self canvas at:  (0 @ -4).\n\tminLabel displayOn: self canvas at: ((0)@(box topLeft y + height )) clippingBox: box rule: Form paint fillColor:nil.\n\tmaxLabel displayOn: self canvas at: ((0)@(box topLeft y + (height*2))) clippingBox: box rule: Form paint fillColor:nil.\n\ttotalLabel displayOn: self canvas at: ((0)@(box topLeft y + (height *3))) clippingBox: box rule: Form paint fillColor:nil.\n\tavgLabel displayOn: self canvas at: ((0)@(box topLeft y + (height *4))) clippingBox: box rule: Form paint fillColor:nil.\n! !\n\n!RVMMultiKiviatView methodsFor: 'drawing' stamp: 'ssa 10/7/2008 15:10'!\ndrawTopRightLabelsOnCanvasForAspect: aSymbol\n\t\n\t| minLabel maxLabel  aspectLabel avgLabel totalLabel aspectColor box height |\n\tbox _ self canvas boundingBox.\n\taspectColor _self colorForAspect:aSymbol.\n\taspectLabel _ aSymbol asString asDisplayText.\n\tminLabel _ ('min: ',(self scalerForAspect: aSymbol) min printShowingMax3Digits) asDisplayText.\n\tmaxLabel _ ('max: ',(self scalerForAspect: aSymbol) max printShowingMax3Digits) asDisplayText.\n\tavgLabel _ ('avg: ',(self lastAverageForAspect: aSymbol) printShowingMax3Digits) asDisplayText.\n\ttotalLabel _ ('total: ',(self lastTotalForAspect: aSymbol) printShowingMax3Digits) asDisplayText.\n\tavgLabel foregroundColor: aspectColor backgroundColor: Color transparent.\n\ttotalLabel foregroundColor: aspectColor backgroundColor: Color transparent.\n\taspectLabel foregroundColor: aspectColor backgroundColor: Color transparent.\n\tminLabel foregroundColor: aspectColor backgroundColor: Color transparent.\n\tmaxLabel foregroundColor: aspectColor backgroundColor: Color transparent.\n\theight _ aspectLabel height - 6.\n\taspectLabel displayOn: self canvas at:  box topRight - (aspectLabel width @4).\n\tminLabel displayOn: self canvas at: ((box topRight x - minLabel width)@(box topRight y + height )) clippingBox: box rule: Form paint fillColor:nil.\n\tmaxLabel displayOn: self canvas at: ((box topRight x - maxLabel width)@(box topRight y + (height*2))) clippingBox: box rule: Form paint fillColor:nil.\n\ttotalLabel displayOn: self canvas at: ((box topRight x - totalLabel width)@(box topRight y + (height *3))) clippingBox: box rule: Form paint fillColor:nil.\n\tavgLabel displayOn: self canvas at: ((box topRight x - avgLabel width)@(box topRight y + (height *4))) clippingBox: box rule: Form paint fillColor:nil.\n! !\n\n!RVMMultiKiviatView methodsFor: 'drawing' stamp: 'ssa 10/7/2008 16:04'!\ndrawWeb\n\tself aspects do:[:aSymbol|\n\t\tself placeSpokePensForAspect: aSymbol.\n\t\tself webPen color: (self colorForAspect: aSymbol).\n\t\tself webPen combinationRule: Form paint.\n\t\tself webPen up;place: self spokePens first location;down.\n\t\tself spokePens do:[:pen|\n\t\t\tself webPen goto: pen location].\n\t\tself webPen goto: self spokePens first location;up]\n\t! !\n\n!RVMMultiKiviatView methodsFor: 'drawing' stamp: 'dmu 8/23/2010 17:37'!\nplaceSpokePensForAspect: aSymbol\n\n\t| data scaledDatum tot offset |\n\tdata _ RVMMonitor lastSample perform: aSymbol.\n\toffset _ ((self aspects indexOf: aSymbol) - 1)*4/5.\n\ttot _ 0.\n\tself spokePens size = data size ifFalse: [self resetAfterCoreCountChange].\n\tdata with: self spokePens do:[:datum :pen|\n\t\ttot _ tot + datum.\n\t\tpen up;place: self center;turn: offset negated;go:self centerMargin.\n\t\tscaledDatum _ (self scalerForAspect: aSymbol) scale: datum.\n\t\tpen go:(self spokeLength /100.0*(scaledDatum)).\n\t\tpen turn: offset].\n\tself lastTotalForAspect: aSymbol put: tot.\n\tself lastAverageForAspect: aSymbol put: tot / data size! !\n\n!RVMMultiKiviatView methodsFor: 'scaling' stamp: 'ssa 10/7/2008 19:48'!\nresetScaling\n\n\t| data tot |\n\tself scalers do:[:s| s resetScaling].\n\tself aspects do:[:aSymbol|\n\tdata _ RVMMonitor lastSample perform: aSymbol.\n\ttot _ 0.\n\tdata do:[:datum |\n\t\ttot _ tot + datum.\n\t\t(self scalerForAspect: aSymbol) scale: datum].\n\tself lastTotalForAspect: aSymbol put: tot.\n\tself lastAverageForAspect: aSymbol put: tot / data size]! !\n\n!RVMMultiKiviatView class methodsFor: 'examples' stamp: 'ssa 10/7/2008 15:38'!\nexample\n\t\"RVMMultiKiviatView example\"\n\tself openOnAspects: #(bytesUsedReadMostlys bytesUsedReadWrites bytesUseds bytecodeCounts)! !\n\n!RVMMultiKiviatView class methodsFor: 'examples' stamp: 'ssa 4/3/2009 17:51'!\nexampleBytecodesAndProcessesRunning\n\t\"RVMMultiKiviatView exampleBytecodesAndProcessesRunning\"\n\tself openOnAspects: #(bytecodeCounts runningProcessCountsPerCore ) pinAllScalesAtZero: false useCommonScale: false! !\n\n!RVMMultiKiviatView class methodsFor: 'examples' stamp: 'ssa 10/7/2008 16:01'!\nexampleBytesUsedTrioCommonPinned\n\t\"RVMMultiKiviatView exampleBytesUsedTrioCommonPinned\"\n\tself openOnAspects: #(bytesUsedReadWrites bytesUsedReadMostlys bytesUseds ) pinAllScalesAtZero: true useCommonScale: true! !\n\n!RVMMultiKiviatView class methodsFor: 'examples' stamp: 'ssa 10/7/2008 16:01'!\nexampleBytesUsedTrioPinned\n\t\"RVMMultiKiviatView exampleBytesUsedTrioPinned\"\n\tself openOnAspects: #(bytesUsedReadWrites bytesUsedReadMostlys bytesUseds ) pinAllScalesAtZero: true! !\n\n!RVMMultiKiviatView class methodsFor: 'examples' stamp: 'ssa 10/7/2008 18:29'!\nexampleSingle\n\t\"RVMMultiKiviatView exampleSingle\"\n\tself openOnAspects: #(bytecodeCounts) pinAllScalesAtZero: false useCommonScale: false titled: 'bytecodeCounts' ! !\n\n!RVMMultiKiviatView class methodsFor: 'instance creation' stamp: 'ssa 10/7/2008 15:54'!\nopenOnAspects: someAspects\n\t\"RVMMultiKiviatView example\"\n\t\n\tself openOnAspects: someAspects pinAllScalesAtZero: false! !\n\n!RVMMultiKiviatView class methodsFor: 'instance creation' stamp: 'ssa 10/7/2008 16:12'!\nopenOnAspects: someAspects pinAllScalesAtZero: aBoolean\n\t\"RVMMultiKiviatView exampleBytesUsedTrioPinned\"\n\t\n\tself openOnAspects: someAspects pinAllScalesAtZero: aBoolean useCommonScale: false! !\n\n!RVMMultiKiviatView class methodsFor: 'instance creation' stamp: 'ssa 10/7/2008 16:09'!\nopenOnAspects: someAspects pinAllScalesAtZero: aBoolean useCommonScale: commonScale\n\t\"RVMMultiKiviatView exampleBytesUsedTrioCommonPinned\"\n\t| |\n\tself openOnAspects: someAspects pinAllScalesAtZero: aBoolean useCommonScale: commonScale titled: 'Multiaspect Kiviat'! !\n\n!RVMMultiKiviatView class methodsFor: 'instance creation' stamp: 'ssa 10/7/2008 19:24'!\nopenOnAspects: someAspects pinAllScalesAtZero: aBoolean useCommonScale: commonScale titled: aString\n\t\"RVMMultiKiviatView exampleBytesUsedTrioCommonPinned\"\n\t\n\t| topView v label |\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\ttopView minimumSize: 300@250.\n\ttopView maximumSize: 600@500.\n\tv := self new.\n\tv borderWidth:1.\n\tv aspects: someAspects.\n\tv commonScale: commonScale.\n\tv pinMinAtZero: aBoolean.\n\ttopView addSubView: v.\n\tlabel _ aString,(aBoolean ifTrue:[' (pinned)']ifFalse:['']),(commonScale ifTrue:[' (uniscale)']ifFalse:['']).\n\ttopView label: label.\n\ttopView controller open! !\n\n!RVMMulticoreSample methodsFor: 'accessing' stamp: 'ssa 9/14/2008 20:50'!\naspects\n\t\"Answer a list of message selectors that will return arrays of numbers for my monitor\"\n\t\n\t^self class aspects! !\n\n!RVMMulticoreSample methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:06'!\ncoreIndices\n\n\t^self groupStats coreIndices! !\n\n!RVMMulticoreSample methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:33'!\ncpuCoreStats\n\t\"Answer the value of cpuCoreStats\"\n\n\t^cpuCoreStats! !\n\n!RVMMulticoreSample methodsFor: 'accessing' stamp: 'ssa 8/13/2008 15:11'!\ncpuCoreStats: anObject\n\t\"Set the value of cpuCoreStats\"\n\n\tcpuCoreStats := anObject! !\n\n!RVMMulticoreSample methodsFor: 'accessing' stamp: 'ssa 11/13/2008 09:42'!\nextent\n\t\"Answer the dimensions of my tile grid\"\n\t^self groupStats extent! !\n\n!RVMMulticoreSample methodsFor: 'accessing' stamp: 'ssa 11/16/2008 15:03'!\nfence\n\t\"Answer the value of fence\"\n\n\tfence isNil ifTrue:[self fence: nil].\n\t^ fence! !\n\n!RVMMulticoreSample methodsFor: 'accessing' stamp: 'ssa 11/16/2008 15:03'!\nfence: anObject\n\t\"Set the value of fence\"\n\n\tfence _ anObject! !\n\n!RVMMulticoreSample methodsFor: 'accessing' stamp: 'dmu 8/15/2008 22:13'!\ngroupStats ^  groupStats! !\n\n!RVMMulticoreSample methodsFor: 'accessing' stamp: 'dmu 8/15/2008 22:14'!\ngroupStats: x    groupStats  _ x! !\n\n!RVMMulticoreSample methodsFor: 'accessing' stamp: 'ssa 8/13/2008 17:33'!\nmessageNames\n\t\"Answer the value of messageNames\"\n\n\t^messageNames! !\n\n!RVMMulticoreSample methodsFor: 'accessing' stamp: 'ssa 8/13/2008 15:11'!\nmessageNames: anObject\n\t\"Set the value of messageNames\"\n\n\tmessageNames := anObject! !\n\n!RVMMulticoreSample methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:07'!\nnumberOfCores\n\n\t^self groupStats isNil ifTrue:[56]ifFalse:[self groupStats groupSize]! !\n\n!RVMMulticoreSample methodsFor: 'accessing' stamp: 'ssa 7/16/2010 15:03'!\nprocessInstanceCount\n\t\"Answer the value of processInstanceCount\"\n\n\tprocessInstanceCount isNil ifTrue:[self processInstanceCount: Process instanceCount].\n\t^ processInstanceCount! !\n\n!RVMMulticoreSample methodsFor: 'accessing' stamp: 'ssa 7/16/2010 15:02'!\nprocessInstanceCount: anObject\n\t\"Set the value of processInstanceCount\"\n\n\tprocessInstanceCount _ anObject! !\n\n!RVMMulticoreSample methodsFor: 'accessing' stamp: 'ssa 8/13/2008 15:11'!\nrawData\n\t\"Answer the value of rawData\"\n\n\trawData isNil ifTrue:[self rawData: nil].\n\t^rawData! !\n\n!RVMMulticoreSample methodsFor: 'accessing' stamp: 'ssa 10/18/2008 18:03'!\nrawData: anObject\n\t\"Set the value of rawData\"\n\n\trawData := anObject! !\n\n!RVMMulticoreSample methodsFor: 'accessing' stamp: 'dmu 1/1/1970 00:04'!\nrunMask\n^ runMask! !\n\n!RVMMulticoreSample methodsFor: 'accessing' stamp: 'dmu 1/1/1970 00:05'!\nrunMask: x\n  runMask := x! !\n\n!RVMMulticoreSample methodsFor: 'accessing' stamp: 'dmu 1/1/1970 00:20'!\ntotalYields\n^ self cpuCoreStats yieldCounts sum! !\n\n!RVMMulticoreSample methodsFor: 'initialize' stamp: 'ssa 8/13/2008 17:32'!\ninitializeAllCPUCoreStatsFrom: data\n\t\n\tself cpuCoreStats: (RVMAllCPUCoreStats newFrom: data forMessageNames: self messageNames)! !\n\n!RVMMulticoreSample methodsFor: 'initialize' stamp: 'ssa 8/19/2008 10:50'!\ninitializeFastAllCPUCoreStatsFrom: data\n\t\n\tself cpuCoreStats: (RVMAllCPUCoreStats newFastFrom: data forMessageNames: self messageNames)! !\n\n!RVMMulticoreSample methodsFor: 'initialize' stamp: 'ssa 7/16/2010 16:45'!\ninitializeFastFrom: data\n\t\"This implementations assumes order dependency in the array for speed.\n\t\n\tSet my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.    Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\n\t\n\tself rawData: data.\n\tself runMask: (data at: 2).\n\tself messageNames: (data at: 4).\n\tself initializeFastGroupStatsFrom: (data at: 6).\n\tself initializeFastAllCPUCoreStatsFrom: (data at: 8).\n\tself fence: (data at: 10).\n\tself processInstanceCount: Process instanceCount\n! !\n\n!RVMMulticoreSample methodsFor: 'initialize' stamp: 'ssa 3/25/2009 14:11'!\ninitializeFastGroupStatsFrom: data\n\t\n\tself groupStats: (RVMGroupStats new initializeFastFrom: data last)! !\n\n!RVMMulticoreSample methodsFor: 'initialize' stamp: 'ssa 1/1/1970 00:04'!\ninitializeFastestAllCPUCoreStatsFrom: data\n\t\n\tself cpuCoreStats: (RVMAllCPUCoreStats newFastestFrom: data forMessageNames: self messageNames)! !\n\n!RVMMulticoreSample methodsFor: 'initialize' stamp: 'dmu 5/21/2010 23:05'!\ninitializeFastestFrom: data\n\t\"This implementations assumes order dependency in the array for speed.\n\t\n\tSet my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.    Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\n\t\n\tself rawData: data.\n\tself runMask: (data at: 2).\n\tself messageNames: (data at: 4).\n\tself initializeFastestGroupStatsFrom: ((data at: 6 ) at: 2).\n\tself initializeFastestAllCPUCoreStatsFrom: (data at: 8).\n\tself fence: (data at: 10).\n! !\n\n!RVMMulticoreSample methodsFor: 'initialize' stamp: 'ssa 3/25/2009 19:17'!\ninitializeFastestGroupStatsFrom: data\n\t\n\tself groupStats: (RVMGroupStats new initializeFastFrom: data )! !\n\n!RVMMulticoreSample methodsFor: 'initialize' stamp: 'ssa 7/16/2010 16:46'!\ninitializeFrom: data\n\t\"Set my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  This implementations assumes no order dependency in the array except that values always follow their names.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\n\t\n\t| valueMap objectMap |\n\tself rawData: data.\n\tvalueMap := { }.\n\tobjectMap := { \n\t\t\t\t'runMask' -> #runMask:.\n\t\t\t\t'messageNames' -> #messageNames:.\n\t\t\t\t'allCPUCoreStats' -> #initializeAllCPUCoreStatsFrom:.\n\t\t\t\t'groupStats' -> #initializeGroupStatsFrom:.\n\t\t\t\t'fence' -> #fence:.\n\t\t\t\t}.\n\t\t\t\t\n\tself processMap: valueMap into: self forData: data.\n\tself processMap: objectMap into: self forData: data.\n\tself processInstanceCount: Process instanceCount\n! !\n\n!RVMMulticoreSample methodsFor: 'initialize' stamp: 'dmu 8/15/2008 22:11'!\ninitializeGroupStatsFrom: data\n\t\ngroupStats _ RVMGroupStats new initializeFrom: data! !\n\n!RVMMulticoreSample methodsFor: 'initialize' stamp: 'ssa 8/13/2008 15:47'!\nprocessMap: map into: targetObject forData: data\n\t\t\t\t\n\t| index datum |\n\tmap do:[:assoc |\n\t\tindex := data indexOf: assoc key.\n\t\tindex = 0 ifTrue:[self error:'Can''t find ',assoc key,' in sample data'].\n\t\tdatum := data at: index + 1.\n\t\ttargetObject perform: assoc value with: datum].\n! !\n\n!RVMMulticoreSample methodsFor: 'printing' stamp: 'ssa 8/15/2008 16:28'!\nprintOn: aStream\n\n\taStream \n\t\tnextPutAll: 'anRVMMulticoreStats(';\n\t\tcr;tab;nextPutAll: ' bytecodesPerCycle=';nextPutAll: self bytecodesPerCycle printString;\n\t\tcr;tab;nextPutAll: ' bytecodesPerCyclesAverage=';nextPutAll: self bytecodesPerCyclesAverage printString;\n\t\tcr;tab;nextPutAll: ' bytecodesPerMillisecond=';nextPutAll: self bytecodesPerMillisecond printString;\n\t\tcr;tab;nextPutAll: ' bytecodesPerMillisecondsAverage=';nextPutAll: self bytecodesPerMillisecondsAverage printString;\n\t\tcr;tab;nextPutAll: ' bytecodeCountsAvg=';nextPutAll: self bytecodeCountsAverage printString;\n\t\tcr;tab;nextPutAll: ' bytecodePerSecondAvg=';nextPutAll: self bytecodesPerSecondAverage printString;\n\t\tcr;tab;nextPutAll: ' cyclesRunningsAvg=';nextPutAll: self cyclesRunningsAverage printString;\n\t\tcr;tab;nextPutAll: ' cyclesWaitingsAvg=';nextPutAll: self cyclesWaitingsAverage printString;\n\t\tcr;tab;nextPutAll: ' cyclesRunWaitRatiosAvg=';nextPutAll: self cyclesRunWaitRatiosAverage printString;\n\t\tcr;tab;nextPutAll: ' msRunningsAvg=';nextPutAll: self msRunningsAverage printString;\n\t\tcr;tab;nextPutAll: ' msWaitingsAvg=';nextPutAll: self msWaitingsAverage printString;\n\t\tcr;tab;nextPutAll: ' msRunWaitRatiosAvg=';nextPutAll: self msRunWaitRatiosAverage printString;\n\t\tcr;tab;nextPutAll: ' yieldCountsAvg=';nextPutAll: self yieldCountsAverage printString;\n\t\tcr;tab;nextPutAll: ' yieldsPerSecondAvg=';nextPutAll: self yieldsPerSecondAverage printString;\n\t\tcr;tab;nextPutAll: ')';cr\n\t\t! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:58'!\nallocationsReadMostlys\n\t\"RVMMulticoreSample capture allocationsReadMostlys\"\n\t\"Answer the collection of allocationsSinceLastReadMostlys\"\n\t\n\t^self cpuCoreStats allocationsSinceLastReadMostlys! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:58'!\nallocationsReadWrites\n\t\"RVMMulticoreSample capture allocationsReadWrites\"\n\t\"Answer the collection of allocationsSinceLastReadWrites\"\n\t\n\t^self cpuCoreStats allocationsSinceLastReadWrites! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:53'!\nallocationsSinceLastReadMostlys\n\t\"RVMMulticoreSample capture allocationsSinceLastReadMostlys\"\n\t\"Answer the collection of allocationsSinceLastReadMostlys\"\n\t\n\t^self cpuCoreStats allocationsSinceLastReadMostlys! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:53'!\nallocationsSinceLastReadWrites\n\t\"RVMMulticoreSample capture allocationsSinceLastReadWrites\"\n\t\"Answer the collection of allocationsSinceLastReadWrites\"\n\t\n\t^self cpuCoreStats allocationsSinceLastReadWrites! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 10/4/2008 08:00'!\nallocationsTotal\n\t\"RVMMulticoreSample capture allocationsTotal\"\n\t\"Answer the collection of allocationsSinceLast\"\n\t\n\t^self cpuCoreStats allocationsSinceLasts! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:40'!\nbytecodeCounts\n\t\"RVMMulticoreSample capture bytecodeCounts\"\n\t\"Answer the collection of bytecode counts during this sample\"\n\t\n\t^self cpuCoreStats bytecodeCounts! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/14/2008 17:14'!\nbytecodeCountsAverage\n\t\"RVMMulticoreSample capture bytecodeCountsAverage\"\n\t\"Answer the average of bytecode counts during this sample\"\n\t\n\t^self cpuCoreStats bytecodeCounts average asFloat! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 9/17/2010 15:19'!\nbytecodesPerCycle\n\t\"RVMMulticoreSample capture bytecodesPerCycle\"\n\n\t| avg |\n\tavg := self cyclesSinceLastsAverage.\n\t^avg = 0 \n\t\tifTrue:[0] \n\t\tifFalse:[self bytecodeCounts sum / (1 max: self cyclesSinceLastsAverage) asFloat]! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:05'!\nbytecodesPerCycles\n\t\"RVMMulticoreSample capture bytecodesPerCycles\"\n\t^self bytecodeCounts with: self cyclesRunnings \n\t\tcollect:[:bc :ms| ms = 0 ifTrue:[0] ifFalse:[bc/ms asFloat]]! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/15/2008 16:06'!\nbytecodesPerCyclesAverage\n\t\"RVMMulticoreSample capture bytecodesPerCyclesAverage\"\n\t^self bytecodesPerCycles average! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:06'!\nbytecodesPerKCs\n^ self bytecodesPerCycles collect: [:x| x * 1000]! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:09'!\nbytecodesPerMCs\n^ self bytecodesPerCycles collect: [:x| x * 1000000]! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 9/17/2010 15:20'!\nbytecodesPerMillisecond\n\t\"RVMMulticoreSample capture bytecodesPerMillisecond\"\n\t^self bytecodeCounts sum / (1 max: self msSinceLastsAverage) asFloat! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 9/17/2010 15:20'!\nbytecodesPerMilliseconds\n\t\"RVMMulticoreSample capture bytecodesPerMilliseconds\"\n\t^self bytecodeCounts with: self msSinceLasts collect:[:bc :ms| bc/(1 max: ms) asFloat]! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/15/2008 15:35'!\nbytecodesPerMillisecondsAverage\n\t\"RVMMulticoreSample capture bytecodesPerMillisecondsAverage\"\n\t^self bytecodesPerMilliseconds average! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:25'!\nbytecodesPerSecond\n\t\"RVMMulticoreSample capture bytecodesPerSecond\"\n\t\"Answer the collection of ratios of bytecodes executed per second during this sample\"\n\t\n\t^self cpuCoreStats bytecodesPerSecond! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/14/2008 17:14'!\nbytecodesPerSecondAverage\n\t\"RVMMulticoreSample capture bytecodesPerSecondAverage\"\n\t\"Answer the average of ratios of bytecodes executed per second during this sample\"\n\t\n\t^self cpuCoreStats bytecodesPerSecond average asFloat! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:50'!\nbytesLeftReadMostlys\n\t\"RVMMulticoreSample capture bytesLeftReadMostlys\"\n\t\"Answer the collection of bytesLeftReadMostlys\"\n\t\n\t^self cpuCoreStats bytesLeftReadMostlys! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:50'!\nbytesLeftReadWrites\n\t\"RVMMulticoreSample capture bytesLeftReadWrites\"\n\t\"Answer the collection of bytesLeftReadWrites\"\n\t\n\t^self cpuCoreStats bytesLeftReadWrites! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:50'!\nbytesLefts\n\t\"RVMMulticoreSample capture bytesLefts\"\n\t\"Answer the collection of bytesLeft\"\n\t\n\t^self cpuCoreStats bytesLefts! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:48'!\nbytesUsedReadMostlys\n\t\"RVMMulticoreSample capture bytesUsedReadMostlys\"\n\t\"Answer the collection of bytesUsedReadMostlys\"\n\t\n\t^self cpuCoreStats bytesUsedReadMostlys! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:47'!\nbytesUsedReadWrites\n\t\"RVMMulticoreSample capture bytesUsedReadWrites\"\n\t\"Answer the collection of bytesUsedReadWrites\"\n\t\n\t^self cpuCoreStats bytesUsedReadWrites! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:24'!\nbytesUseds\n\t\"RVMMulticoreSample capture bytesUseds\"\n\t\"Answer the collection of bytesUsed\"\n\t\n\t^self cpuCoreStats bytesUseds! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:59'!\ncompactionsReadMostlys\n\t\"RVMMulticoreSample capture compactionsSinceLastReadMostlys\"\n\t\"Answer the collection of compactionsSinceLastReadMostlys\"\n\t\n\t^self cpuCoreStats compactionsSinceLastReadMostlys! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 10/4/2008 07:59'!\ncompactionsReadWrites\n\t\"RVMMulticoreSample capture compactionsReadWrites\"\n\t\"Answer the collection of compactionsSinceLastReadWrites\"\n\t\n\t^self cpuCoreStats compactionsSinceLastReadWrites! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 10/4/2008 08:00'!\ncompactionsTotal\n\t\"RVMMulticoreSample capture compactionsTotal\"\n\t\"Answer the collection of compactionsSinceLast\"\n\t\n\t^self cpuCoreStats compactionsSinceLasts! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:06'!\ncontextChangeCounts\n\t\"RVMMulticoreSample capture contextChangeCounts\"\n\t\"Answer the collection of yields during this sample\"\n\t\n\t^self cpuCoreStats contextChangeCounts! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ads 1/30/2011 15:23'!\ncoreProcessUtilization\n\n\t^RVMOperations coreProcessUtilization asFloat! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:52'!\ncyclesRunWaitRatios\n\t\"RVMMulticoreSample capture cyclesRunWaitRatios\"\n\t\"Answer the collection of ratios during this sample\"\n\t\n\t^self cpuCoreStats cyclesRunWaitRatios! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/14/2008 17:14'!\ncyclesRunWaitRatiosAverage\n\t\"RVMMulticoreSample capture cyclesRunWaitRatiosAverage\"\n\t\"Answer the average of ratios during this sample\"\n\t\n\t^self cpuCoreStats cyclesRunWaitRatios average asFloat! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:49'!\ncyclesRunnings\n\t\"RVMMulticoreSample capture cyclesRunnings\"\n\t\"Answer the collection of cyclesRunning counts during this sample\"\n\t\n\t^self cpuCoreStats cyclesRunnings! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/14/2008 17:14'!\ncyclesRunningsAverage\n\t\"RVMMulticoreSample capture cyclesRunningsAverage\"\n\t\"Answer the average of cyclesRunning counts during this sample\"\n\t\n\t^self cpuCoreStats cyclesRunnings average asFloat! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/15/2008 16:30'!\ncyclesSinceLasts\n\t\"RVMMulticoreSample capture cyclesSinceLasts\"\n\t\"Answer the cyclesSinceLasts  during this sample\"\n\t\n\t^self cpuCoreStats cyclesSinceLasts! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/15/2008 16:08'!\ncyclesSinceLastsAverage\n\t\"RVMMulticoreSample capture cyclesSinceLastsAverage\"\n\t\"Answer the average cyclesSinceLasts  during this sample\"\n\t\n\t^self cpuCoreStats cyclesSinceLasts average! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:49'!\ncyclesWaitings\n\t\"RVMMulticoreSample capture cyclesWaitings\"\n\t\"Answer the collection of cyclesWaiting counts during this sample\"\n\t\n\t^self cpuCoreStats cyclesWaitings! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/14/2008 17:14'!\ncyclesWaitingsAverage\n\t\"RVMMulticoreSample capture cyclesWaitingsAverage\"\n\t\"Answer the average of cyclesWaiting counts during this sample\"\n\t\n\t^self cpuCoreStats cyclesWaitings average asFloat! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 1/5/2011 12:55'!\ngcMilliseconds\n\t\"RVMMulticoreSample capture gcMilliseconds\"\n\t^ self cpuCoreStats gcMilliseconds! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:08'!\ninterruptCheckCounts\n\t\"RVMMulticoreSample capture yieldCounts\"\n\t\"Answer the collection of yields during this sample\"\n\t\n\t^self cpuCoreStats interruptCheckCounts! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 8/17/2008 11:01'!\nmillisecondsRunnings\n\t\"RVMMulticoreSample capture millisecondsRunnings\"\n\t\"Answer the collection of msRunning counts during this sample\"\n\t\n\t^self cpuCoreStats millisecondsRunnings! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:41'!\nmillisecondsWaitings\n\t\"RVMMulticoreSample capture millisecondsWaitings\"\n\t\"Answer the collection of millisecondsWaitings counts during this sample\"\n\t\n\t^self cpuCoreStats millisecondsWaitings! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:44'!\nmsRunWaitRatios\n\t\"RVMMulticoreSample capture msRunWaitRatios\"\n\t\"Answer the collection of ratios during this sample\"\n\t\n\t^self cpuCoreStats msRunWaitRatios! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/14/2008 17:15'!\nmsRunWaitRatiosAverage\n\t\"RVMMulticoreSample capture msRunWaitRatiosAverage\"\n\t\"Answer the average of ratios during this sample\"\n\t\n\t^self cpuCoreStats msRunWaitRatios average asFloat! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:29'!\nmsRunningsAverage\n\t\"RVMMulticoreSample capture msRunningsAverage\"\n\t\"Answer the average of millisecondsRunning counts during this sample\"\n\t\n\t^self cpuCoreStats millisecondsRunnings average asFloat! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/15/2008 15:30'!\nmsSinceLasts\n\t\"RVMMulticoreSample capture msSinceLasts\"\n\t\"Answer the collection of msSinceLasts  during this sample\"\n\t\n\t^self cpuCoreStats msSinceLasts! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/15/2008 15:30'!\nmsSinceLastsAverage\n\t\"RVMMulticoreSample capture msSinceLastsAverage\"\n\t\"Answer the average msSinceLasts  during this sample\"\n\t\n\t^self cpuCoreStats msSinceLasts average! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:43'!\nmsWaitingsAverage\n\t\"RVMMulticoreSample capture msWaitingsAverage\"\n\t\"Answer the average of msWaiting counts during this sample\"\n\t\n\t^self cpuCoreStats millisecondsWaitings average asFloat! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ads 1/30/2011 15:23'!\nnumberOfRunningProcesses\n\n\t^RVMOperations numberOfRunningProcesses ! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 7/16/2010 15:21'!\nprocessCount\n\t^self processInstanceCount! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ads 1/30/2011 15:22'!\nprocessCountsPerCore\n\n | bag counts |\nbag _ (Process allInstances asOrderedCollection  collect:[:obj| RVMOperations isRVM ifFalse:[RVMMonitor coreCount atRandom - 1]ifTrue:[RVMOperations getCoreHolding:obj]]) asBag.\ncounts _ Array new: RVMMonitor coreCount.\n1 to: RVMMonitor coreCount do:[:coreIndex| counts at: coreIndex put: (bag occurrencesOf: coreIndex)].\n^counts\n! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:20'!\nreceiveTallySum\n^ self cpuCoreStats receiveTallySum! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ads 1/30/2011 15:23'!\nrunningProcessCountsPerCore\n\n\n^RVMOperations runningProcessByCore  collect:[:obj| obj isNil ifTrue:[0]  ifFalse:[1]]! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 3/27/2009 17:04'!\nsendTallySumsSortedReport\n\t\"Answer a string report of the sorted send tallies across all cores\"\n\t^self cpuCoreStats sendTallySumsSortedReport! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:08'!\nunforcedInterruptCheckCounts\n\t\"RVMMulticoreSample capture yieldCounts\"\n\t\"Answer the collection of yields during this sample\"\n\t\n\t^self cpuCoreStats unforcedInterruptCheckCounts! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/14/2008 17:17'!\nyieldCounts\n\t\"RVMMulticoreSample capture yieldCounts\"\n\t\"Answer the collection of yields during this sample\"\n\t\n\t^self cpuCoreStats yieldCounts! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/14/2008 17:18'!\nyieldCountsAverage\n\t\"RVMMulticoreSample capture yieldCountsAverage\"\n\t\"Answer the average of yields during this sample\"\n\t\n\t^self cpuCoreStats yieldCounts average asFloat! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'dmu 1/1/1970 00:16'!\nyieldFrequencies\n\t\"RVMMulticoreSample capture yieldFrequencies\"\n\t\n\t^self cpuCoreStats yieldFrequencies! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/14/2008 16:36'!\nyieldsPerSecond\n\t\"RVMMulticoreSample capture yieldsPerSecond\"\n\t\"Answer the collection of ratios of yields  per second during this sample\"\n\t\n\t^self cpuCoreStats yieldsPerSecond! !\n\n!RVMMulticoreSample methodsFor: 'measuring' stamp: 'ssa 8/14/2008 17:15'!\nyieldsPerSecondAverage\n\t\"RVMMulticoreSample capture yieldsPerSecondAverage\"\n\t\"Answer the average of ratios of yields  per second during this sample\"\n\t\n\t^self cpuCoreStats yieldsPerSecond average asFloat! !\n\n!RVMMulticoreSample methodsFor: 'test measuring - system' stamp: 'ssa 10/3/2008 15:01'!\nrandom1\n\t\"RVMMulticoreSample new random1\"\n\t\"generated data for testing visualization\"\n\t\n\t^1 atRandom! !\n\n!RVMMulticoreSample methodsFor: 'test measuring - system' stamp: 'ssa 10/3/2008 15:01'!\nrandom10\n\t\"RVMMulticoreSample new random10\"\n\t\"generated data for testing visualization\"\n\t\n\t^10 atRandom! !\n\n!RVMMulticoreSample methodsFor: 'test measuring - system' stamp: 'ssa 10/3/2008 15:01'!\nrandom100\n\t\"RVMMulticoreSample new random100\"\n\t\"generated data for testing visualization\"\n\t\n\t^100 atRandom! !\n\n!RVMMulticoreSample methodsFor: 'test measuring - system' stamp: 'ssa 10/3/2008 15:00'!\nrandom1000\n\t\"RVMMulticoreSample new random1000\"\n\t\"generated data for testing visualization\"\n\t\n\t^1000 atRandom! !\n\n!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 10/7/2008 17:28'!\ntest0001To1\n\t\"RVMMulticoreSample new test0001To1\"\n\t\"generated data for testing visualization\"\n\t\n\t| testData start end |\n\ttestData _ OrderedCollection new.\n\tstart _ 0.0001.\n\tend _ 1.0.\n\tstart to: end by: end - start / self numberOfCores do:[:value|\n\t\ttestData add: value].\n\t^testData copyFrom: 1 to: self numberOfCores! !\n\n!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 10/7/2008 17:28'!\ntest0to1\n\t\"RVMMulticoreSample new test0to1\"\n\t\"generated data for testing visualization\"\n\t\n\t| testData start end |\n\ttestData _ OrderedCollection new.\n\tstart _ 0.0.\n\tend _ 1.0.\n\tstart to: end by: end - start / self numberOfCores do:[:value|\n\t\ttestData add: value].\n\t^testData copyFrom: 1 to: self numberOfCores! !\n\n!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 10/7/2008 17:28'!\ntest0to10\n\t\"RVMMulticoreSample new test0to10\"\n\t\"generated data for testing visualization\"\n\t\n\t| testData start end |\n\ttestData _ OrderedCollection new.\n\tstart _ 0.0.\n\tend _ 10.0.\n\tstart to: end by: end - start / self numberOfCores do:[:value|\n\t\ttestData add: value].\n\t^testData copyFrom: 1 to: self numberOfCores! !\n\n!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 10/7/2008 17:32'!\ntest0to100\n\t\"RVMMulticoreSample new test0to100\"\n\t\"generated data for testing visualization\"\n\t\n\t| testData start end |\n\ttestData _ OrderedCollection new.\n\tstart _ 0.0.\n\tend _ 100.0.\n\tstart to: end by: end - start / self numberOfCores do:[:value|\n\t\ttestData add: value].\n\t^(testData copyFrom: 1 to: self numberOfCores) ! !\n\n!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 10/7/2008 17:27'!\ntest0to1B\n\t\"RVMMulticoreSample new test0to1B\"\n\t\"generated data for testing visualization\"\n\t\n\t| testData start end |\n\ttestData _ OrderedCollection new.\n\tstart _ 0.0.\n\tend _ 1000000000.0.\n\tstart to: end by: end - start / self numberOfCores do:[:value|\n\t\ttestData add: value].\n\t^testData copyFrom: 1 to: self numberOfCores! !\n\n!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 10/7/2008 17:28'!\ntest0to1K\n\t\"RVMMulticoreSample new test0to1K\"\n\t\"generated data for testing visualization\"\n\t\n\t| testData start end |\n\ttestData _ OrderedCollection new.\n\tstart _ 0.0.\n\tend _ 1000.0.\n\tstart to: end by: end - start / self numberOfCores do:[:value|\n\t\ttestData add: value].\n\t^testData copyFrom: 1 to: self numberOfCores! !\n\n!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 10/7/2008 17:28'!\ntest0to1M\n\t\"RVMMulticoreSample new test0to1M\"\n\t\"generated data for testing visualization\"\n\t\n\t| testData start end |\n\ttestData _ OrderedCollection new.\n\tstart _ 0.0.\n\tend _ 1000000.0.\n\tstart to: end by: end - start / self numberOfCores do:[:value|\n\t\ttestData add: value].\n\t^testData copyFrom: 1 to: self numberOfCores! !\n\n!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 10/7/2008 17:28'!\ntestNeg1To1\n\t\"RVMMulticoreSample new testNeg1To1\"\n\t\"generated data for testing visualization\"\n\t\n\t| testData start end |\n\ttestData _ OrderedCollection new.\n\tstart _ -1.0.\n\tend _ 1.0.\n\tstart to: end by: end - start / self numberOfCores do:[:value|\n\t\ttestData add: value].\n\t^testData copyFrom: 1 to: self numberOfCores! !\n\n!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 1/1/1970 00:07'!\ntestRandom1\n\t\"RVMMulticoreSample new testRandom1\"\n\t\"generated data for testing visualization\"\n\t\n\t| testData |\n\ttestData _ OrderedCollection new.\n\tself numberOfCores timesRepeat:[\n\t\ttestData add: 1 atRandom].\n\t^testData! !\n\n!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 1/1/1970 00:06'!\ntestRandom10\n\t\"RVMMulticoreSample new testRandom10\"\n\t\"generated data for testing visualization\"\n\t\n\t| testData |\n\ttestData _ OrderedCollection new.\n\tself numberOfCores timesRepeat:[\n\t\ttestData add: 10 atRandom].\n\t^testData! !\n\n!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 1/1/1970 00:06'!\ntestRandom100\n\t\"RVMMulticoreSample new testRandom100\"\n\t\"generated data for testing visualization\"\n\t\n\t| testData |\n\ttestData _ OrderedCollection new.\n\tself numberOfCores timesRepeat:[\n\t\ttestData add: 100 atRandom].\n\t^testData! !\n\n!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 1/1/1970 00:06'!\ntestRandom1000\n\t\"RVMMulticoreSample new testRandom1000\"\n\t\"generated data for testing visualization\"\n\t\n\t| testData |\n\ttestData _ OrderedCollection new.\n\tself numberOfCores timesRepeat:[\n\t\ttestData add: 1000 atRandom].\n\t^testData! !\n\n!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 1/1/1970 00:05'!\ntestRandom100s\n\t\"RVMMulticoreSample new testRandom100s\"\n\t\"generated data for testing visualization\"\n\t\n\t| testData min max delta |\n\ttestData _ OrderedCollection new.\n\tmin _ 100.\n\tmax _ 999.\n\tdelta _ max - min.\n\tself numberOfCores timesRepeat:[\n\t\ttestData add: min + delta atRandom].\n\t^testData! !\n\n!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 1/1/1970 00:05'!\ntestRandom1Ks\n\t\"RVMMulticoreSample new testRandom1Ks\"\n\t\"generated data for testing visualization\"\n\t\n\t| testData min max delta |\n\ttestData _ OrderedCollection new.\n\tmin _ 1000.\n\tmax _ 1999.\n\tdelta _ max - min.\n\tself numberOfCores timesRepeat:[\n\t\ttestData add: min + delta atRandom].\n\t^testData! !\n\n!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 1/1/1970 00:04'!\ntestRandomBs\n\t\"RVMMulticoreSample new testRandomBs\"\n\t\"generated data for testing visualization\"\n\t\n\t| testData min max delta |\n\ttestData _ OrderedCollection new.\n\tmin _ 1000000000.\n\tmax _ 999000000000.\n\tdelta _ max - min.\n\tself numberOfCores timesRepeat:[\n\t\ttestData add: min + delta atRandom].\n\t^testData! !\n\n!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 1/1/1970 00:05'!\ntestRandomKs\n\t\"RVMMulticoreSample new testRandomKs\"\n\t\"generated data for testing visualization\"\n\t\n\t| testData min max delta |\n\ttestData _ OrderedCollection new.\n\tmin _ 1000.\n\tmax _ 999000.\n\tdelta _ max - min.\n\tself numberOfCores timesRepeat:[\n\t\ttestData add: min + delta atRandom].\n\t^testData! !\n\n!RVMMulticoreSample methodsFor: 'test measuring - core' stamp: 'ssa 1/1/1970 00:04'!\ntestRandomMs\n\t\"RVMMulticoreSample new testRandomMs\"\n\t\"generated data for testing visualization\"\n\t\n\t| testData min max delta |\n\ttestData _ OrderedCollection new.\n\tmin _ 1000000.\n\tmax _ 999000000.\n\tdelta _ max - min.\n\tself numberOfCores timesRepeat:[\n\t\ttestData add: min + delta atRandom].\n\t^testData! !\n\n!RVMMulticoreSample methodsFor: 'co vs inco' stamp: 'ads 2/2/2011 14:52'!\ncoinBytes\n\" RVMOperations moveAllToReadMostlyHeaps. RVMOperations printCoInBytesUsed. Smalltalk garbageCollect. RVMOperations printCoInBytesUsed. RVMMulticoreSample capture coinBytes\"\n\t^self cpuCoreStats coreStats\n\t\tcollect: [:stat | (stat memorySystemStats readWriteHeapStats bytesUsed @ stat memorySystemStats readMostlyHeapStats bytesUsed)]! !\n\n!RVMMulticoreSample methodsFor: 'co vs inco' stamp: 'dmu 10/5/2008 00:26'!\ncoinBytesTotal\n\"Smalltalk garbageCollect. RVMMulticoreSample capture coinBytes\"\n\t| s |\n\ts := 0 @ 0.\n\tself cpuCoreStats coreStats\n\t\tdo: [:stat | s := s + (stat memorySystemStats readWriteHeapStats bytesUsed @ stat memorySystemStats readMostlyHeapStats bytesUsed)].\n\t^ s! !\n\n!RVMMulticoreSample methodsFor: 'archiving' stamp: 'ssa 10/26/2008 21:12'!\narchiveOn: aStream\n\t| rw |\n\trw _ ReadWriteStream on:''.\n\tRVMSampleWriter archiveSample: RVMMonitor lastSample on: rw.\n\t\n\taStream\n\t\tstoreObject: self;\n\t\tstoreClass: self class;\n\t\tstore: rw reset.\n\t! !\n\n!RVMMulticoreSample methodsFor: 'copying' stamp: 'ssa 10/26/2008 21:08'!\ndeepCopy\n\t\"Use the RVMSampleWriter/Reader\"\n\t| rw |\n\trw _ ReadWriteStream on:''.\n\tRVMSampleWriter archiveSample: self on: rw.\n\tRVMSampleReader dearchiveSampleFrom: rw reset ! !\n\n!RVMMulticoreSample commentStamp: 'ssa 8/19/2008 11:52' prior: 0!\ntwo ways to capture a sample:\n\tRVMMulticoreSample captureSlow - uses a flexible but slower approach to handle data pairs\n\t            \"            captureFast - fast, order dependent version (6x faster)\n\t            \"            capture - calls captureFast\n\n\"performance test\"\nresults := OrderedCollection new.\n100 timesRepeat:[results add: (Time millisecondsToRun:[1000 timesRepeat:[RVMMulticoreSample captureFast]])/1000.0].\nresults average \n\ncaptureFast = 0.13813 \ncaptureSlow = 0.80164\n\nMessageTally spyOn:[1000 timesRepeat:[RVMMulticoreSample captureFast]]\nshows a 6x improvement over captureSlow!\n!RVMMulticoreSample class methodsFor: 'examples' stamp: 'ssa 8/13/2008 15:13'!\nexample\n\t\"RVMMulticoreSample example\"\n\tself capture explore! !\n\n!RVMMulticoreSample class methodsFor: 'examples' stamp: 'ssa 9/9/2008 19:50'!\nexamplePrimitive\n\t\"RVMMulticoreSample examplePrimitive\"\n\tself primitiveCapture inspect! !\n\n!RVMMulticoreSample class methodsFor: 'archiving' stamp: 'ssa 11/16/2008 15:07'!\narchiveVersion\n\t^2! !\n\n!RVMMulticoreSample class methodsFor: 'archiving' stamp: 'ssa 11/16/2008 15:10'!\ndearchive: versionNumber from: aStream\n\tversionNumber = self archiveVersion ifTrue:[^self dearchiveFrom: aStream].\t\n\tself error:'Can''t handle this archive version'! !\n\n!RVMMulticoreSample class methodsFor: 'archiving' stamp: 'ssa 10/26/2008 22:07'!\ndearchiveFrom: aStream\n\n\t| rwStream sample |\n\trwStream _ aStream next.\n\tsample _ RVMSampleReader dearchiveSampleFrom: rwStream reset.\n\taStream storeObject: sample.\n\t^sample! !\n\n!RVMMulticoreSample class methodsFor: 'instance creation' stamp: 'ssa 8/19/2008 11:48'!\ncapture\n\t\"Capture a sample from the vm and answer a new instance of me holding those values\"\n\t\"RVMMulticoreSample capture\"\n\t\n\t^self captureFast! !\n\n!RVMMulticoreSample class methodsFor: 'instance creation' stamp: 'ssa 8/19/2008 11:34'!\ncaptureFast\n\t\"Capture a sample from the vm and answer a new instance of me holding those values\"\n\t\"RVMMulticoreSample captureFast\"\n\t| data sample |\n\tdata := self primitiveCapture.\n\tsample := self new.\n\tsample initializeFastFrom: data.\n\t^sample! !\n\n!RVMMulticoreSample class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:03'!\ncaptureFastest\n\t\"Capture a sample from the vm and answer a new instance of me holding those values\"\n\t\"RVMMulticoreSample captureFastest\"\n\t| data sample |\n\tdata := self primitiveCapture.\n\tsample := self new.\n\tsample initializeFastestFrom: data.\n\t^sample! !\n\n!RVMMulticoreSample class methodsFor: 'instance creation' stamp: 'ssa 8/19/2008 11:48'!\ncaptureSlow\n\t\"Capture a sample from the vm and answer a new instance of me holding those values\"\n\t\"RVMMulticoreSample captureSlow\"\n\t| data sample |\n\tdata := self primitiveCapture.\n\tsample := self new.\n\tsample initializeFrom: data.\n\t^sample! !\n\n!RVMMulticoreSample class methodsFor: 'instance creation' stamp: 'ssa 10/26/2008 20:26'!\nnewFrom: rawData\n\t\"Answer a new instance of me holding these values\"\n\t\"RVMMulticoreSample newFrom: self primitiveCapture\"\n\t|  sample |\n\tsample := self new.\n\tsample initializeFastFrom: rawData.\n\t^sample! !\n\n!RVMMulticoreSample class methodsFor: 'primitive access' stamp: 'ssa 10/18/2008 21:42'!\nprimitiveCapture\n\t\"Grab some data from the VM and return it\"\n\t<primitive: 'primitiveSampleRVM' module: 'RVMPlugin'>\n\t[^RVMMonitor samples next]value.\n\tself primitiveFailed! !\n\n!RVMMulticoreSample class methodsFor: 'primitive access' stamp: 'dmu 4/10/2009 17:39'!\nprimitiveCapture: flags\n\t\"Grab some data from the VM and return it\"\n\t<primitive: 'primitiveSampleRVM' module: 'RVMPlugin'>\n\tself primitiveFailed! !\n\n!RVMMulticoreSample class methodsFor: 'primitive access' stamp: 'dmu 4/10/2009 17:39'!\nprimitiveCaptureOneCore\n\t\"self primitiveCaptureOneCore\"\n\t^ self primitiveCapture: RVMSampleFlags everything - RVMSampleFlags allCores! !\n\n!RVMMulticoreSample class methodsFor: 'primitive access' stamp: 'ssa 11/12/2008 12:23'!\nprimitiveFlush\n\t\"Clear out the sample buffer in the vm by grabbing a sample\"\n\t<primitive: 'primitiveSampleRVM' module: 'RVMPlugin'>\n\t! !\n\n!RVMMulticoreSample class methodsFor: 'sample access' stamp: 'ssa 11/12/2008 12:23'!\nflush\n\n\tself primitiveFlush! !\n\n!RVMMulticoreSample class methodsFor: 'sample access' stamp: 'ssa 1/1/1970 00:32'!\nnext\n\n\t^self capture! !\n\n!RVMMulticoreSample class methodsFor: 'aspect access' stamp: 'ssa 10/3/2008 22:54'!\naspectFromUserUnder: aSymbol\n\t\"Answer a selected aspect categorized under #system, #core, #testSystem, #testCore.\"\n\t\t| menu |\n\tmenu := CustomMenu new.\n\t(self aspectsUnder: aSymbol)\n\t\tdo: [:aspect | menu add: aspect action: aspect].\n\t^menu startUp:nil withCaption: 'Select the aspect to monitor'.\n! !\n\n!RVMMulticoreSample class methodsFor: 'aspect access' stamp: 'ssa 10/3/2008 15:10'!\naspects\n\t\"Answer a list of message selectors that will return arrays of numbers for my monitor\"\n\t^(RVMMulticoreSample allMethodsInCategory: #measuring),\n\t(RVMMonitor showTestAspects ifTrue:[self testAspects]ifFalse:[#()])! !\n\n!RVMMulticoreSample class methodsFor: 'aspect access' stamp: 'ssa 10/3/2008 22:51'!\naspectsUnder: aSymbol\n\t\"Answer the aspects categorized under #system, #core, #testSystem, #testCore.\"\n\taSymbol == #system ifTrue:[^self systemAspects].\n\taSymbol == #core ifTrue:[^self coreAspects].\n\taSymbol == #testSystem ifTrue:[^self testSystemAspects].\n\taSymbol == #testCore ifTrue:[^self testCoreAspects].\n\t^self aspects! !\n\n!RVMMulticoreSample class methodsFor: 'aspect access' stamp: 'dmu 4/2/2009 02:09'!\ncoreAspects\n\t\"Answer a list of message selectors that will return collections of core numbers for my monitor\"\n\t\n\t^#(#allocationsReadWrites #allocationsReadMostlys #allocationsTotal #bytecodeCounts #bytecodesPerCycles #bytecodesPerKCs #bytecodesPerMCs #bytecodesPerMilliseconds #bytecodesPerSecond #bytesLeftReadWrites #bytesLeftReadMostlys #bytesLefts #bytesUsedReadWrites #bytesUsedReadMostlys #bytesUseds #compactionsReadWrites #compactionsReadMostlys #compactionsTotal #contextChangeCounts #cyclesRunWaitRatios #cyclesRunnings #cyclesSinceLasts #cyclesWaitings #interruptCheckCounts #millisecondsRunnings #millisecondsWaitings #msRunWaitRatios #msSinceLasts  #unforcedInterruptCheckCounts #yieldCounts #yieldFrequencies #yieldsPerSecond #processCountsPerCore #runningProcessCountsPerCore)! !\n\n!RVMMulticoreSample class methodsFor: 'aspect access' stamp: 'ssa 3/26/2009 10:18'!\ncoreTallyAspects\n\t\"Answer a list of message selectors that will return tallies from core message tallies\"\n\t\n\t^RVMCoreMessageTally tallyOrder! !\n\n!RVMMulticoreSample class methodsFor: 'aspect access' stamp: 'ssa 7/16/2010 15:21'!\nsystemAspects\n\t\"Answer a list of message selectors that will return single system numbers for my monitor\"\n\t\n\t^#(#numberOfRunningProcesses #processCount #coreProcessUtilization #bytecodeCountsAverage #bytecodesPerCycle #bytecodesPerCyclesAverage #bytecodesPerMillisecond #bytecodesPerMillisecondsAverage #bytecodesPerSecondAverage #cyclesRunWaitRatiosAverage #cyclesRunningsAverage #cyclesSinceLastsAverage #cyclesWaitingsAverage #msRunWaitRatiosAverage #msRunningsAverage #msSinceLastsAverage #msWaitingsAverage #yieldCountsAverage #yieldsPerSecondAverage )! !\n\n!RVMMulticoreSample class methodsFor: 'aspect access' stamp: 'ssa 10/3/2008 15:14'!\ntestAspects\n\t\"Answer a list of message selectors that will return arrays of test numbers for my monitor\"\n\t\n\t^self testCoreAspects, self testSystemAspects! !\n\n!RVMMulticoreSample class methodsFor: 'aspect access' stamp: 'ssa 10/3/2008 15:14'!\ntestCoreAspects\n\t\"Answer a list of message selectors that will return arrays of test numbers for my monitor\"\n\t\n\t^RVMMulticoreSample allMethodsInCategory: 'test measuring - core' asSymbol! !\n\n!RVMMulticoreSample class methodsFor: 'aspect access' stamp: 'ssa 10/3/2008 15:14'!\ntestSystemAspects\n\t\"Answer a list of message selectors that will return arrays of test numbers for my monitor\"\n\t\n\t^RVMMulticoreSample allMethodsInCategory: 'test measuring - system' asSymbol! !\n\n!RVMMulticoreSample class methodsFor: 'aspect access' stamp: 'ssa 10/6/2008 18:46'!\nupdateSystemAndCoreAspectMethods\n\t\"RVMMulticoreSample updateSystemAndCoreAspectMethods\"\n\t\"Determine the lists of single value system aspects and multivalue core aspects and update the access methods for them\"\n\t| all singles groups code sample |\n\tall _ RVMMulticoreSample allMethodsInCategory: #measuring.\n\tsingles _ OrderedCollection new.\n\tgroups _ OrderedCollection new.\n\tsample _ RVMMulticoreSample capture.\n\tall do:[:msg| ((sample perform: msg) isKindOf:Number)ifTrue:[singles add: msg]ifFalse:[groups add: msg]].\n\tgroups remove:#receiveTallySum ifAbsent:[].\n\tcode _ 'coreAspects\n\t\"Answer a list of message selectors that will return collections of core numbers for my monitor\"\n\t\n\t^', groups asArray storeString.\n\tself class compile: code classified:'aspect access' notifying:nil.\n\tcode _ 'systemAspects\n\t\"Answer a list of message selectors that will return single system numbers for my monitor\"\n\t\n\t^', singles asArray storeString.\n\tself class compile: code classified:'aspect access' notifying:nil.\n\t\n! !\n\n!RVMObjectCoordinate methodsFor: 'accessing' stamp: 'ads 1/30/2011 15:23'!\nactivity\n\t\"Answer the value of activity, whether or not you want the baton passed on a message send\"\n\n\t^RVMOperations getPassTheBatonOf: self object! !\n\n!RVMObjectCoordinate methodsFor: 'accessing' stamp: 'ssa 11/16/2008 02:11'!\ncoreCoordinate\n\t\"Answer the value of coreCoordinate\"\n\n\t^(self coreIndex + 1 asPointWithinRectangleWithExtent: RVMMonitor extent) ! !\n\n!RVMObjectCoordinate methodsFor: 'accessing' stamp: 'ads 1/30/2011 15:23'!\ncoreIndex\n\t\"Answer the value of coreIndex\"\n\n\t^(RVMOperations getCoreHolding: self object)! !\n\n!RVMObjectCoordinate methodsFor: 'accessing' stamp: 'ads 1/30/2011 15:23'!\nmutability\n\t\"Answer the value of mutability, whether you are readWrite (true) or readMostly (false)\"\n\n\t^RVMOperations getReadWriteOf: self object! !\n\n!RVMObjectCoordinate methodsFor: 'accessing' stamp: 'ssa 11/13/2008 10:29'!\nobject\n\t\"Answer the value of object\"\n\n\tobject isNil ifTrue:[self object: nil].\n\t^ object! !\n\n!RVMObjectCoordinate methodsFor: 'accessing' stamp: 'ssa 11/13/2008 10:29'!\nobject: anObject\n\t\"Set the value of object\"\n\n\tobject _ anObject! !\n\n!RVMObjectCoordinate methodsFor: 'moving' stamp: 'ads 1/30/2011 15:23'!\nmakeActive\nRVMOperations isRVM ifTrue:[\n\tRVMOperations setCoordinatesOf: self object toCore: self coreIndex  readWrite:  self mutability].\n\tself changed! !\n\n!RVMObjectCoordinate methodsFor: 'moving' stamp: 'ads 1/30/2011 15:23'!\nmakePassive\n\nRVMOperations isRVM ifTrue:[\n\tRVMOperations setCoordinatesOf: self object toCore: self coreIndex readWrite: self mutability ].\n\tself changed! !\n\n!RVMObjectCoordinate methodsFor: 'moving' stamp: 'ads 1/30/2011 15:23'!\nmakeReadMostly\nRVMOperations isRVM ifTrue:[\n\tRVMOperations setCoordinatesOf: self object toCore: self coreIndex readWrite: false ].\n\tself changed! !\n\n!RVMObjectCoordinate methodsFor: 'moving' stamp: 'ads 1/30/2011 15:23'!\nmakeReadWrite\nRVMOperations isRVM ifTrue:[\n\tRVMOperations setCoordinatesOf: self object toCore: self coreIndex readWrite: true].\n\tself changed! !\n\n!RVMObjectCoordinate methodsFor: 'moving' stamp: 'ssa 11/16/2008 02:23'!\nmoveToCoordinate: aPoint\n\n\tself moveToCore:  (aPoint y -1 * RVMMonitor extent x + aPoint x) -1 .\n\tself changed:#coreCoordinate! !\n\n!RVMObjectCoordinate methodsFor: 'moving' stamp: 'ads 1/30/2011 15:23'!\nmoveToCore: anIndex\n\nRVMOperations isRVM ifTrue:[\n\tRVMOperations setCoordinatesOf: self object toCore: (anIndex max:0) readWrite: self mutability ].\n\tself changed! !\n\n!RVMObjectCoordinate methodsFor: 'testing' stamp: 'ssa 11/13/2008 10:26'!\nisActive\n\n\t^self activity = true! !\n\n!RVMObjectCoordinate methodsFor: 'testing' stamp: 'ssa 11/13/2008 10:26'!\nisPassive\n\n\t^self activity = false! !\n\n!RVMObjectCoordinate methodsFor: 'testing' stamp: 'ssa 11/13/2008 10:26'!\nisReadMostly\n\n\t^self mutability = false! !\n\n!RVMObjectCoordinate methodsFor: 'testing' stamp: 'ssa 11/13/2008 10:25'!\nisReadWrite\n\n\t^self mutability = true! !\n\n!RVMObjectCoordinate class methodsFor: 'instance creation' stamp: 'ssa 11/16/2008 01:27'!\nfor: anObject\n\t\"Answer the coordinate for this object\"\n\t| coord |\n\tcoord _ self new.\n\tcoord object: anObject.\n\t^coord! !\n\n!RVMObjectCoordinateView methodsFor: 'listening' stamp: 'ssa 11/15/2008 23:43'!\nhear: something\n\n\tself displayView! !\n\n!RVMObjectCoordinateView methodsFor: 'listening' stamp: 'ssa 11/15/2008 23:44'!\nupdate\n\n\tself displayView! !\n\n!RVMObjectCoordinateView class methodsFor: 'instance creation' stamp: 'ssa 5/12/2010 10:15'!\non: anRVMObjectCoordinate  \n\t\"RVMObjectCoordinateView openOn: nil asObjectCoordinate  \"\n\t| mutabilityView readWriteButton readMostlyButton activityView passButton holdButton coreIndexView coordView tileCoordView |\n\t\n\tmutabilityView _ RVMView new.\n\treadWriteButton _ RVMRadioButtonView on: anRVMObjectCoordinate label: 'readWrite' checkState: #isReadWrite whenChecked: #makeReadWrite whenUnchecked: [] monitor: true.\n\treadMostlyButton _ RVMRadioButtonView on: anRVMObjectCoordinate label: 'readMostly' checkState: #isReadMostly whenChecked: #makeReadMostly whenUnchecked: [] monitor: true.\n\tmutabilityView addSubView: readWriteButton in:(0@0 extent: 1@0.5) borderWidth:0.\n\tmutabilityView addSubView: readMostlyButton in:(0@0.5 extent: 1@0.5) borderWidth:0.\n\n\tactivityView _ RVMView new..\n\tpassButton _ RVMRadioButtonView on: anRVMObjectCoordinate label: 'pass baton' checkState: #isActive whenChecked: #makeActive whenUnchecked: [] monitor: true.\n\tholdButton _ RVMRadioButtonView on: anRVMObjectCoordinate label: 'keep baton' checkState: #isPassive whenChecked: #makePassive whenUnchecked: [] monitor: true.\n\tactivityView addSubView: passButton in:(0@0 extent: 1@0.5) borderWidth:0.\n\tactivityView addSubView: holdButton  in:(0@0.5 extent: 1@0.5) borderWidth:0.\n\t\n\ttileCoordView _ RVMGridLocationView on: anRVMObjectCoordinate pointGetter: #coreCoordinate pointSetter: #moveToCoordinate: extentGetter: [RVMMonitor extent].\n\n\tcoreIndexView _ RVMCoreIndexView on: anRVMObjectCoordinate\n\t\tgetCoreIndex:#coreIndex\n\t\tsetCoreIndex: #moveToCore:\n\t\tgetAvailableIndicies: [RVMMonitor coreCount].\n\t\t\n\tcoordView _ self new.\n\tcoordView addSubView: mutabilityView in:(0@0 extent: 1/3@1) borderWidth:1.\n\tcoordView addSubView: activityView in:((1/3)@0 extent: 1/3@1) borderWidth:1.\n\tcoordView addSubView: tileCoordView in:((2/3)@0 extent: 1/6@1) borderWidth:1.\n\tcoordView addSubView: coreIndexView in:((5/6)@0 extent: 1/6@1) borderWidth:1.\n\t^coordView\n! !\n\n!RVMObjectCoordinateView class methodsFor: 'instance creation' stamp: 'ssa 11/15/2008 15:52'!\nopenOn: anRVMObjectCoordinate\n\t\"RVMObjectCoordinateView openOn: nil asObjectCoordinate\"\n\t\"Add me to a system view and open me on the desktop\"\n\t| topView  |\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\ttopView minimumSize: 300@50.\n\ttopView addSubView: (self on: anRVMObjectCoordinate) .\n\ttopView label: 'Locating: ',anRVMObjectCoordinate object printString.\n\ttopView controller open! !\n\n!RVMObjectTableStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:20'!\nallocatedEntryCount\n\t\"Answer the number of allocated entries in this object table\"\n\tallocatedEntryCount isNil ifTrue:[^0].\n\t^allocatedEntryCount! !\n\n!RVMObjectTableStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:20'!\nallocatedEntryCount: count\n\t\"Set the number of allocated entries in this object table\"\n\tallocatedEntryCount := count! !\n\n!RVMObjectTableStats methodsFor: 'acessing' stamp: 'dmu 8/15/2008 21:43'!\nallocationsSinceLastQuery\n\t\"Answer the allocations made since the last query\"\n\tallocationsSinceLastQuery isNil ifTrue:[^0].\n\t^allocationsSinceLastQuery! !\n\n!RVMObjectTableStats methodsFor: 'acessing' stamp: 'dmu 8/15/2008 21:44'!\nallocationsSinceLastQuery: count\n\t\"Set the allocations made since the last query\"\n\tallocationsSinceLastQuery := count! !\n\n!RVMObjectTableStats methodsFor: 'acessing' stamp: 'dmu 8/15/2008 21:45'!\nentriesFreedSinceLastQuery\n\t\"Answer the allocations freed since the last query\"\n\tentriesFreedSinceLastQuery isNil ifTrue:[^0].\n\t^entriesFreedSinceLastQuery! !\n\n!RVMObjectTableStats methodsFor: 'acessing' stamp: 'dmu 8/15/2008 21:46'!\nentriesFreedSinceLastQuery: count\n\t\"Set the allocations freed since the last query\"\n\tentriesFreedSinceLastQuery := count! !\n\n!RVMObjectTableStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:19'!\nentryCount\n\t\"Answer the number of entries in this object table\"\n\tentryCount isNil ifTrue:[^0].\n\t^entryCount! !\n\n!RVMObjectTableStats methodsFor: 'acessing' stamp: 'ssa 7/21/2008 10:19'!\nentryCount: count\n\t\"Set the number of entries in this object table\"\n\tentryCount := count! !\n\n!RVMOperations commentStamp: 'ads 1/24/2011 13:43' prior: 0!\nThis was the original parking lot for various VM testing methods!\n!RVMOperations class methodsFor: 'primitives' stamp: 'ads 2/2/2011 14:52'!\nallObjectsInHeap: rank isReadWrite: isC\n\"RVMOperations allObjectsInHeap: 34 isReadWrite: true\"\n<primitive: 'primitiveAllObjectsInHeap' module: 'RVMPlugin'>\nself primitiveFailed! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'RS 7/25/2011 17:18'!\nawakeInterpreters\n\t<primitive: 'primitiveAwakeOtherInterpreters' module: 'RVMPlugin'>\n\t^false! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'ads 2/2/2011 14:53'!\ncoreCount\n  \"RVMOperations coreCount\"\n  <primitive: 'primitiveCoreCount' module: 'RVMPlugin'>\n  ^ 1! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'ads 2/2/2011 14:53'!\ncoreProcessUtilization\n\t\"RVMOperations coreProcessUtilization\"\n\t\"How many processes are running on my cores versus how many core??\"\n\t^self numberOfRunningProcesses / RVMMonitor coreCount! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'ads 2/2/2011 14:53'!\ncycleCounter\n\t\"RVMOperations cycleCounter\"\n\t  <primitive: 'primitiveCycleCounter' module: 'RVMPlugin' >\n \t ^ -1! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'ads 2/2/2011 14:53'!\nenableMultithreading: aBool\n\"RVMOperations enableMultithreading: true\"\n<primitive:'primitiveEnableMultithreading' module: 'RVMPlugin'>\nself primitiveFailed! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'dmu 1/1/1970 00:01'!\nextraRemoteContextAllocations: n\n<primitive: 'primitiveExtraRemoteContextAllocations' module: 'RVMPlugin'>\n^ self primitiveFailed! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'dmu 1/1/1970 00:01'!\nextraYields: n\n<primitive: 'primitiveExtraYields' module: 'RVMPlugin'>\n^ self primitiveFailed! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'ads 2/2/2011 14:53'!\ngetCore\n  \"RVMOperations getCore\"\n  <primitive: 'primitiveGetCore' module: 'RVMPlugin' >\n  ^ -1! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'ads 2/2/2011 14:53'!\ngetCoreIAmRunningOn\n  \"RVMOperations getCoreIAmRunningOn\"\n  <primitive: 'primitiveGetCoreIAmRunningOn' module: 'RVMPlugin' >\n  ^ -1! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'dmu 1/1/1970 00:05'!\ngetCoreTrace\n<primitive: 'primitiveTraceCores' module: 'RVMPlugin'>\n^ self primitiveFailed! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'dmu 1/1/1970 00:03'!\ngetMutatedReplicatedObjectsTrace\n<primitive: 'primitiveTraceMutatedReplicatedObjects' module: 'RVMPlugin'>\n^ self primitiveFailed! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'ssa 1/1/1970 00:11'!\ngetPassTheBatonOf: anObject\n<primitive: 'primitiveGetPassTheBaton' module: 'RVMPlugin'>\n^ true! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'sm 5/26/2011 14:22'!\nisHeadless\n\t<primitive: 'primitiveRunsHeadless' module: 'RVMPlugin'>\n\t\n\t\"The default is set to false to avoid problems if the primitive is not their in normal mode.\n\t Made this choice since most smalltalkers are not console users anyway. Stefan 2011-05-25\"\n\t^ false\n! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'dmu 4/3/2009 03:40'!\nmove: anObject toCore: anInt\n<primitive: 'primitiveSetCoordinatesFor' module: 'RVMPlugin'>\nself primitiveFailed! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'dmu 4/3/2009 03:40'!\nmove: anObject toCore: anInteger readWritely: readWriteBoolean passTheBaton: batonBoolean\n<primitive: 'primitiveSetCoordinatesFor' module: 'RVMPlugin'>\nself primitiveFailed! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'ads 2/2/2011 14:53'!\nmoveAllToReadMostlyHeaps\n\"RVMOperations moveAllToReadMostlyHeaps\"\n<primitive: 'primitiveMoveAllToReadMostlyHeaps' module: 'RVMPlugin'>\n^ self primitiveFailed! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'ssa 7/16/2010 14:59'!\nnumberOfProcessInstances\n\n\t^Process instanceCount! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'ssa 4/1/2009 21:56'!\nnumberOfRunningProcesses\n\n\t^self runningProcesses size! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'ads 2/2/2011 14:53'!\nprimitiveRunningProcessByCore\n\t\"Answers an array of numberOfCores size with a nil or Process instance for each core.  If a Process instance then that process was running on that core when invoked\"\n\t\"RVMOperations primitiveRunningProcessByCore\"\n<primitive: 'primitiveRunningProcessByCore' module: 'RVMPlugin'>\n^ self primitiveFailed! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'ads 2/2/2011 14:53'!\nprint: aString\n\"RVMOperations print: 'hello'\"\n<primitive: 'primitivePrint' > \"omit module just as in thisProcess method to hit obsolete_named-primitive_table and be local\"! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'ads 2/2/2011 14:53'!\nprintAllHeapsBytesUsed\n\"RVMOperations printAllHeapsBytesUsed\"\n<primitive: 'primitivePrintReadWriteReadMostlyBytesUsed' module: 'RVMPlugin'>\n! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'ads 2/2/2011 14:53'!\nprintExecutionTrace\n\"RVMOperations printExecutionTrace\"\n\" [ [ [ RVMOperations printExecutionTrace ] value ] value ] value\"\n<primitive: 'primitivePrintExecutionTrace' module: 'RVMPlugin'>\n^ self primitiveFailed! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'dmu 10/1/2010 19:59'!\nprintObjectForVMDebugging: obj\n\t\"self printObjectForVMDebugging: 3@4\"\n\t<primitive: 'primitivePrintObjectForVMDebugging' module: 'RVMPlugin'>! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'ads 2/2/2011 14:53'!\nprintStack\n\"RVMOperations printStack\"\n<primitive: 'primitivePrintStack' module: 'RVMPlugin'>\n^ self primitiveFailed! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'sm 2/24/2011 15:51'!\nprintVMStatistics\n\t<primitive: 'primitivePrintStats' module: 'RVMPlugin'>! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'sm 5/26/2011 11:10'!\nresetPerfCounters\n\t\"RVMPrimitives resetPerfCounters\"\n\t<primitive: 'primitiveResetPerfCounters' module: 'RVMPlugin'>! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'dmu 1/1/1970 00:02'!\nrunMask: aMask \n<primitive: 'primitiveRunMask' module: 'RVMPlugin'>! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'ads 2/2/2011 14:53'!\nrunOnAll\n\"RVMOperations runOnAll\"\nself runOnlyOn: -1! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'dmu 1/1/1970 00:03'!\nrunOnOne: aBool\nself runMask: ( aBool ifTrue: [1] ifFalse: [0] )! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'ads 2/2/2011 14:53'!\nrunOnlyOn: anInt\n\"RVMOperations runOnlyOn: 0\"\n<primitive:'primitiveRunOnlyOn' module: 'RVMPlugin'>\nself primitiveFailed! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'ssa 4/1/2009 21:47'!\nrunningProcessByCore\n\t\"Answers an array of numberOfCores size with a nil or Process instance for each core.  If a Process instance then that process was running on that core when invoked\"\n^self primitiveRunningProcessByCore! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'ssa 4/1/2009 21:48'!\nrunningProcesses\n\t\"Answers an array of Process instances that were running when invoked\"\n^self runningProcessByCore select:[:each| each notNil]! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'ads 2/2/2011 14:54'!\nsetCoordinatesOf: anObject toCore: anInt readWrite: aBool\n\"RVMOperations setCoordinatesOf: 3@4 toCore: 17 readWrite: false \"\n<primitive: 'primitiveSetCoordinatesFor' module: 'RVMPlugin'>\nself primitiveFailed\n! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'ads 2/2/2011 14:54'!\nsetCoordinatesOf: anObject toCore: anInt readWrite: aBool passTheBaton: anotherBool\n\"RVMOperations setCoordinatesOf: 3@4 toCore: 17 readWrite: false passTheBaton: false\"\n<primitive: 'primitiveSetCoordinatesFor' module: 'RVMPlugin'>\nself primitiveFailed\n! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'dmu 1/1/1970 00:00'!\nsetCoreTraceSize: n\n<primitive: 'primitiveTraceCores' module: 'RVMPlugin'>! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'dmu 1/1/1970 00:06'!\nsetMutatedReplicatedObjectsTraceSize: n\n<primitive: 'primitiveTraceMutatedReplicatedObjects' module: 'RVMPlugin'>\n^ self primitiveFailed! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'dmu 1/1/1970 00:40'!\nshuffle: numCores\n^ self shuffleFrom: 0 to: numCores - 1! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'dmu 1/1/1970 00:39'!\nshuffleFrom: first to: last\n<primitive: 'primitiveShuffle' module: 'RVMPlugin'>\n^ self primitiveFailed! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'ads 2/2/2011 14:54'!\nshuffleFrom: first to: last  moveRWtoRM: bool1 moveRMtoRW: bool2\n\"RVMOperations shuffleFrom: 1 to: 17 moveRWtoRM: false moveRMtoRW: true\"\n<primitive: 'primitiveShuffle' module: 'RVMPlugin'>\n^ self primitiveFailed! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'ads 2/2/2011 14:54'!\nsoleRunningCore\n\"RVMOperations soleRunningCore\"\n<primitive:'primitiveRunOnlyOn' module: 'RVMPlugin'>\nself primitiveFailed! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'ads 2/2/2011 14:54'!\nspreadFrom: first to: last  moveRWtoRM: bool1 moveRMtoRW: bool2\n\"RVMOperations spreadFrom: 1 to: 17 moveRWtoRM: true moveRMtoRW: false\"\n<primitive: 'primitiveSpread' module: 'RVMPlugin'>\n^ self primitiveFailed! !\n\n!RVMOperations class methodsFor: 'primitives' stamp: 'RS 7/25/2011 17:17'!\nsuspendButMainInterpreter\n\t<primitive: 'primitiveSuspendOtherInterpreters' module: 'RVMPlugin'>\n\t^false! !\n\n!RVMOperations class methodsFor: 'testing' stamp: 'ads 2/2/2011 14:52'!\nchangingSuperclassTest\n\t\"RVMOperations changingSuperclassTest\"\n\t\"Create a class, then change its superclass and  verify\"\n\tTranscript cr;show:'Starting changing superclass test......'.\n\t#(Foo Bar Baz)do:[:n| Smalltalk removeClassNamed: n].\n\tObject subclass: #Foo\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpoolDictionaries: ''\n\tcategory: 'RVM-Testing'.\n\tObject subclass: #Bar\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpoolDictionaries: ''\n\tcategory: 'RVM-Testing'.\n\t(Smalltalk classNamed:#Foo) subclass: #Baz\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpoolDictionaries: ''\n\tcategory: 'RVM-Testing'.\n\tTranscript cr;show:'Foo, Bar and Baz test classes created, Baz is subclass of Foo, ready to try to change superclass to Bar'.\n\t(Smalltalk classNamed:#Bar) subclass: #Baz\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpoolDictionaries: ''\n\tcategory: 'RVM-Testing'.\n\t(Smalltalk classNamed:#Baz) superclass == (Smalltalk classNamed:#Bar)\n\t\tifTrue:[Transcript cr;show:'Successful....test passed']\n\t\tifFalse:[Transcript cr;show:'Nope....test failed'].\n\tTranscript cr;show:'Cleaning up....'.\n\t#(Foo Bar Baz)do:[:n| Smalltalk removeClassNamed: n].\n\tTranscript cr;show:'...End of changing superclass test'.\n\n! !\n\n!RVMOperations class methodsFor: 'testing' stamp: 'dmu 1/11/2011 12:32'!\ncyclesToRun: blk\n\t| x |\n\tx _ self cycleCounter.\n\tblk value.\n\t^ self cycleCounter - x ! !\n\n!RVMOperations class methodsFor: 'testing' stamp: 'ads 2/2/2011 14:53'!\ndelayTest\n\"RVMOperations delayTest\"\n\t| rect delay |\n\trect _ 0@0 extent: 40@40.\n\tdelay _ Delay forSeconds: 1.\n\t[Sensor leftShiftDown not] whileTrue:[Display reverse: rect. delay wait]\n! !\n\n!RVMOperations class methodsFor: 'testing' stamp: 'ads 2/2/2011 14:53'!\nmethodDeletionTest\n\t\"RVMOperations methodDeletionTest\"\n\t\"Create a test class and add 32 methods to it, then try to add 33\"\n\t\n\t| testClassName testClass |\n\ttestClassName := #RVMTESTforMethodDeletion.\n\t(Smalltalk includesKey: testClassName) ifTrue:[(Smalltalk at: testClassName) removeFromSystem].\n\t\n\tObject subclass: testClassName\n\t\tinstanceVariableNames: ''\n\t\tclassVariableNames: ''\n\t\tpoolDictionaries: ''\n\t\tcategory: 'RVM-Testing'.\n\t\n\ttestClass := Smalltalk at: testClassName.\n\tTranscript cr;cr;show:'Test class created: ',testClassName.\n\tTranscript cr;show:'Method dictionary size = ',testClass selectors size printString.\n\n\tTranscript cr;show:'Adding 5 methods'.\n\t1 to: 5 do:[:count|\n\t\ttestClass compile: 'testMethod',count printString].\n\tTranscript cr;show:'Method dictionary size = ',testClass selectors size printString.\n\n\tTranscript cr;show:'Removing 5 methods'.\n\t1 to: 5 do:[:count|\n\t\ttestClass removeSelector: ('testMethod',count printString) asSymbol].\n\tTranscript cr;show:'Method dictionary size = ',testClass selectors size printString.\n\ttestClass selectors notEmpty ifTrue:[Transcript cr;show:'Test Failed']ifFalse:[Transcript cr;show:'test passed'].\n\n\tTranscript cr;show:'Removing test class: ',testClassName.\n\ttestClass removeFromSystem.\n\tTranscript cr;show:'test class removed.... test over'.\n! !\n\n!RVMOperations class methodsFor: 'testing' stamp: 'ads 2/2/2011 14:53'!\nmethodDictionaryGrowthTest\n\t\"RVMOperations methodDictionaryGrowthTest\"\n\t\"Create a test class and add 32 methods to it, then try to add 33\"\n\t\n\t| testClassName testClass |\n\ttestClassName := #RVMTESTforMethodDictionaryGrowth.\n\t(Smalltalk includesKey: testClassName) ifTrue:[(Smalltalk at: testClassName) removeFromSystem].\n\t\n\tObject subclass: testClassName\n\t\tinstanceVariableNames: ''\n\t\tclassVariableNames: ''\n\t\tpoolDictionaries: ''\n\t\tcategory: 'RVM-Testing'.\n\t\n\ttestClass := Smalltalk at: testClassName.\n\tTranscript cr;cr;show:'Test class created: ',testClassName.\n\tTranscript cr;show:'Method dictionary size = ',testClass selectors size printString.\n\n\tTranscript cr;show:'Adding 32 methods'.\n\t1 to: 32 do:[:count|\n\t\ttestClass compile: 'testMethod',count printString].\n\tTranscript cr;show:'Method dictionary size = ',testClass selectors size printString.\n\n\tTranscript cr;show:'Adding 33rd method'.\n\t\ttestClass compile: 'testMethod33'.\n\tTranscript cr;show:'Method dictionary size = ',testClass selectors size printString.\n\n\tTranscript cr;show:'Removing test class: ',testClassName.\n\ttestClass removeFromSystem.\n\tTranscript cr;show:'test class removed.... test over'.\n! !\n\n!RVMOperations class methodsFor: 'testing' stamp: 'ads 2/2/2011 14:53'!\nrunParallelCompilerBenchmarks: n\n\"RVMOperations runParallelCompilerBenchmarks: 4\"\nn timesRepeat: [[Benchmark new testCompiler. Transcript show: 'done'; cr] copy fixTemps fork]! !\n\n!RVMOperations class methodsFor: 'testing' stamp: 'ads 2/2/2011 14:53'!\nsegmentationFaultTest\n\t\"RVMOperations segmentationFaultTest\"\n\t\"Executing this code produces a segmenation fault\"\n\t| all singles groups file |\n\tTranscript cr;show:'test starting... segmentation fault test... writing to segfaultLog.txt'.\nfile _ FileStream newFileNamed:'segfaultLog.txt'.\nall _ #(bytecodeCounts bytecodeCountsAverage bytecodesPerCycle bytecodesPerCycles bytecodesPerCyclesAverage bytecodesPerKCs bytecodesPerMCs bytecodesPerMillisecond bytecodesPerMilliseconds bytecodesPerMillisecondsAverage bytecodesPerSecond bytecodesPerSecondAverage bytesUseds contextChangeCounts cyclesRunWaitRatios cyclesRunWaitRatiosAverage cyclesRunnings cyclesRunningsAverage cyclesSinceLasts cyclesSinceLastsAverage cyclesWaitings cyclesWaitingsAverage interruptCheckCounts millisecondsRunnings millisecondsWaitings msRunWaitRatios msRunWaitRatiosAverage msRunningsAverage msSinceLasts msSinceLastsAverage msWaitingsAverage receiveTallySum unforcedInterruptCheckCounts yieldCounts yieldCountsAverage yieldFrequencies yieldsPerSecond yieldsPerSecondAverage).\nsingles _ OrderedCollection new.\ngroups _ OrderedCollection new.\nall do:[:msg| file nextPutAll:'Attempting ',msg,'\n\t'.\n\tfile flush.\n\t((RVMMonitor lastSample perform: msg) isKindOf:Number)ifTrue:[singles add: msg]ifFalse:[groups add: msg]].\nfile close.\n\tTranscript cr;show:'test passed.... test over'.\n! !\n\n!RVMOperations class methodsFor: 'testing' stamp: 'dmu 5/4/2009 23:51'!\ntestAtRandom\n\t\"self testAtRandom\"\n\t| r n t |\n\tr _ Random new.\n\tn _ 0.\n\t100000 timesRepeat: [\n\t\tt _ 396 atRandom: r.\n\t\tn _ n + 1.\n\t\tt isInteger ifFalse: [self error: 'not int'].\n\t\tt < 0 ifTrue: [self error: 'neg' ].\n\t\tt > 400 ifTrue: [self error: 'too big'].\n\t]! !\n\n!RVMOperations class methodsFor: 'testing' stamp: 'dmu 5/5/2009 00:24'!\ntestNextInt\n\t\"self testAtRandom\"\n\t| r n t |\n\tr _ Random new.\n\tn _ 0.\n\t100000 timesRepeat: [\n\t\tt _ r nextInt: 396.\n\t\tn _ n + 1.\n\t\tt isInteger ifFalse: [self error: 'not int'].\n\t\tt < 0 ifTrue: [self error: 'neg' ].\n\t\tt > 400 ifTrue: [self error: 'too big'].\n\t]! !\n\n!RVMOperations class methodsFor: 'demos' stamp: 'ads 2/2/2011 14:52'!\ncolorTrail\n\t\"RVMOperations colorTrail\"\n| rect boxes centers count colors pen x y coreIndex |\nrect _ Rectangle fromUser.\nboxes _ rect subDivideBy: 8@8.\ncenters _ boxes collect:[:box| box center].\ncount _ 500.\ncolors _ Color hotColdShades:count.\npen _ Pen new.\npen defaultNib:6.\npen combinationRule: Form paint.\npen place: (centers at:32).\nx _ y _ 4.\npen down.\n1 to:count do:[:index|pen color: (colors at: index).\n\tx _ (x + (3 atRandom - 2))min:8 max:1.\n\ty _ (y + (3 atRandom - 2))min:8 max:1.\n\tcoreIndex _ y - 1 * 8 + x.\n\tpen goto: (centers at:(coreIndex))]! !\n\n!RVMOperations class methodsFor: 'demos' stamp: 'ads 1/30/2011 15:21'!\ndisplayImageOnReadMostlyStripChart\n\t\"RVMOperations displayImageOnReadMostlyStripChart\"\n\t\"Works on readMostlyHeap tile strip chart\"\n| f text images height width pixelOn |\nf _ Form fromDisplay:(0@0 extent: 200@200)..\n\ntext _ 'IBM' asDisplayText asParagraph asForm magnifyBy:2.\n\"logo _ GIFReadWriter formFromFileNamed: 'ibm-logo-bw.gif'.\nlogo replaceColor: Color white with: Color transparent.\nface _ GIFReadWriter formFromFileNamed: 'sam-photo-bw.gif'.\nface replaceColor: Color white with: Color transparent.\"\nimages _ OrderedCollection new.\n\"images add: logo.\nimages add: face.\"\nimages add: text.\nimages do:[:image|\nheight _ image boundingBox height.\nwidth _ image boundingBox width.\n0 to: width -1 do:[:x|\n\t0 to: height - 1 do:[:y|\n\t\tpixelOn _ (image colorAt: x@y) isTransparent.\n\t\tRVMOperations move: f copy toCore: y + 3 readWritely: pixelOn passTheBaton: true.\n\t\t\t].\n\t\tRVMOperations move: f toCore: 1 readWritely: true passTheBaton: true..\n\t\tRVMMonitor getSample;informListeners.\n\t\t\t\tSmalltalk garbageCollect.\n]]\n! !\n\n!RVMOperations class methodsFor: 'demos' stamp: 'ads 2/2/2011 14:54'!\nspockToursTheRenaissance\n\t\"RVMOperations spockToursTheRenaissance\"\n\t'Spock' rwPass24 rmHold2 rmPass40 rwHold0 rwPass55\n! !\n\n!RVMOperations class methodsFor: 'filing out ' stamp: 'ads 2/2/2011 14:53'!\nfileOutAllRVMCategories\n\t\"RVMOperations fileOutAllRVMCategories\"\n\t| cats classNames classes orderedClasses fileStream |\n\tcats := SystemOrganization categoriesMatching: 'RVM-*'.\n\tclassNames := OrderedCollection new.\n\tcats\n\t\tdo: [:cat | classNames\n\t\t\t\taddAll: (SystemOrganization listAtCategoryNamed: cat)].\n\tclasses := classNames\n\t\t\t\tcollect: [:n | Smalltalk at: n].\n\torderedClasses := ChangeSet superclassOrder: classes.\n\tfileStream := FileStream fileNamed: 'all-RVM-categories ' , Time now print24 , ' '\n\t\t\t\t\t, (Date today printFormat: #(2 1 3 $- 1 2 2 )) , '.st'.\n\torderedClasses\n\t\tdo: [:cls | cls fileOutOn: fileStream].\n\tfileStream close! !\n\n!RVMOperations class methodsFor: 'teleportation' stamp: 'ssa 11/4/2008 23:39'!\nisMulticoreCoordinate: stringOrSymbol\n\t\"Answer true if my unary selector matched the special multicore object coordinate format.\n\t{rm,rw}{Pass,Hold}{coreIndex, 0-55}\"\n\t\n\t | readWrite baton coreIndex aSymbol |\n\taSymbol _ stringOrSymbol asSymbol.\n\taSymbol isUnary ifFalse:[^false].\n\taSymbol size >= 7 ifFalse:[^false].\n\treadWrite _ aSymbol first: 2.\n\t(#('rw' 'rm') includes: readWrite) ifFalse:[^false].\n\tbaton _ aSymbol copyFrom: 3 to: 6.\n\t(#('Pass' 'Hold') includes: baton) ifFalse:[^false].\n\tcoreIndex _ aSymbol allButFirst:6.\n\t(coreIndex isAllDigits and:[(coreIndex _ coreIndex asNumber) between: 0 and: 55]) ifFalse:[^false].\n\t^true\n\t! !\n\n!RVMOperations class methodsFor: 'teleportation' stamp: 'ssa 11/16/2008 01:00'!\nteleport: anObject to: aSymbol\n\t\"move this object to this multicore object coordinate.\n\taSymbol := {in,co}{Pass,Hold}{coreIndex, 1-56}\"\n\t\n\t | readWrite baton coreIndex old new |\n\t(self isMulticoreCoordinate: aSymbol) ifFalse:[self error:'Teleport aborted; bad coordinates = ',aSymbol].\n\treadWrite _ (aSymbol first: 2) = 'rw'.\n\tbaton _ (aSymbol copyFrom: 3 to: 6) = 'Pass'.\n\tcoreIndex _ (aSymbol allButFirst:6) asNumber - 1 max: 0.\n\told _ self printPrefixFor: anObject.\n\tself move: anObject toCore: coreIndex readWritely: readWrite passTheBaton: baton.\n\tSensor leftShiftDown ifTrue:[new _ self printPrefixFor: anObject.\n\tTranscript cr;show:'Zzzoingggg!!  ',anObject printString,' vanished from ',old.\n\tTranscript cr;show:'Ggggniozzz!!  ',anObject printString,' appeared at ',new].\n\t\n\t! !\n\n!RVMOperations class methodsFor: 'testing for RVM' stamp: 'ads 2/2/2011 14:53'!\npositiveIfOnRVM\n  \"RVMOperations positiveIfOnRVM\"\n  <primitive: 'primitiveCoreCount' module: 'RVMPlugin'>\n  ^ -1! !\n\n!RVMOperations class methodsFor: 'debugging' stamp: 'sm 5/27/2011 13:27'!\nbreakpoint\n\t<primitive: 'primitiveBreakpoint' module: 'RVMPlugin' >! !\n\n!RVMOperations class methodsFor: 'debugging' stamp: 'ads 1/30/2011 15:21'!\nrandomWalk\n\"RVMOperations randomWalk\"\n[\n[Sensor leftShiftDown not] whileTrue: [\n\tDelay forMilliseconds: 250.\n\tRVMOperations move: false toCore: ( 0 max: (55 min: ( self getCoreHolding: false)   + 3 atRandom - 2)) ].\nTranscript show: 'killed'; cr\n] fork.\n! !\n\n!RVMPluggableTextView methodsFor: 'model access' stamp: 'ssa 11/27/2008 13:06'!\ngetText \n\t\"Answer the list to be displayed.\"\n\t| txt |\n\tgetTextSelector == nil ifTrue: [^ Text new].\n\ttxt _ getTextSelector isSymbol ifTrue:[model perform: getTextSelector]ifFalse:[getTextSelector value].\n\ttxt == nil ifTrue: [^ Text new].\n\tself hasUnacceptedEdits: false.\t\"clean now\"\n\t^ txt! !\n\n!RVMPluggableTextView methodsFor: 'model access' stamp: 'ssa 11/27/2008 13:08'!\nsetText: textToAccept from: ctlr\n\t\"Inform the model of text to be accepted, and return true if OK.\n\tAny errors should be reported to the controller, ctlr.\"\n\tsetTextSelector == nil ifTrue: [^ true].\n\tsetTextSelector isSymbol\n\t\tifTrue: [^ model perform: setTextSelector with: textToAccept]\n\t\tifFalse: [^ setTextSelector value: textToAccept]! !\n\n!RVMPluggableTextView methodsFor: 'updating' stamp: 'ssa 11/27/2008 13:47'!\nupdate: aSymbol\n\t\"Refer to the comment in View|update:. Do nothing if the given symbol does not match any action. \"\n\n\taSymbol == #updateDisplay ifTrue: [^ self updateDisplayContents].\n\t^super update: aSymbol! !\n\n!RVMPrimitivesNeededForBootstrapping class methodsFor: 'as yet unclassified' stamp: 'ads 1/24/2011 12:47'!\ngetCoreHolding: anObject\n\t^(self primitivGetCoreHolding: anObject)! !\n\n!RVMPrimitivesNeededForBootstrapping class methodsFor: 'as yet unclassified' stamp: 'ads 1/24/2011 12:57'!\ngetEmergencySemaphore\n\t\"When you hit shift-control-a, the VM will signal the emergency semaphore, if it has been set to a semaphore\"\n\t\"self getEmergencySemaphore signal\"\n\t<primitive: 'primitiveEmergencySemaphore' module: 'RVMPlugin'>! !\n\n!RVMPrimitivesNeededForBootstrapping class methodsFor: 'as yet unclassified' stamp: 'ads 1/24/2011 12:55'!\ngetReadWriteOf: anObject\n<primitive: 'primitiveGetMutability' module: 'RVMPlugin'>\n^ true! !\n\n!RVMPrimitivesNeededForBootstrapping class methodsFor: 'as yet unclassified' stamp: 'ads 2/2/2011 14:54'!\nisRVM\n\t\"RVMPrimitivesNeededForBootstrapping isRVM\"\n\t\"Am I actually running on the Tilera64?\"\n\t^(self getCoreHolding: nil) ~= -1! !\n\n!RVMPrimitivesNeededForBootstrapping class methodsFor: 'as yet unclassified' stamp: 'ads 1/24/2011 12:47'!\nprimitivGetCoreHolding: anObject\n<primitive: 'primitiveGetCore' module: 'RVMPlugin'>\n^ -1! !\n\n!RVMPrimitivesNeededForBootstrapping class methodsFor: 'as yet unclassified' stamp: 'ads 2/2/2011 14:54'!\nprintPrefixFor: anObject\n\t\"RVMPrimitivesNeededForBootstrapping printPrefixFor: Array \"\n\t\"Answer a string to use as a prefix in Inspectors and Debuggers when printing an object\"\n\t| index readWrite |\n\t(anObject isKindOf: SmallInteger) ifTrue:[^''].\n\t(anObject isKindOf: Boolean) ifTrue:[^''].\n\t(anObject isNil) ifTrue:[^''].\n\tindex _ (self getCoreHolding: anObject) printString.\n\treadWrite _ (self getReadWriteOf: anObject) ifTrue: ['rw'] ifFalse: ['rm'].\n\t\n\t\n\t^'<',readWrite,index,'> '! !\n\n!RVMPrimitivesNeededForBootstrapping class methodsFor: 'as yet unclassified' stamp: 'ads 1/24/2011 12:57'!\nsetEmergencySemaphore: aSemaOrNil\n\t\"When you hit shift-control-a, the VM will signal the emergency semaphore, if it has been set to a semaphore\"\n\t<primitive: 'primitiveEmergencySemaphore' module: 'RVMPlugin'>! !\n\n!RVMProcessSwarm methodsFor: 'creation' stamp: 'dmu 2/22/2009 07:14'!\ninitialize: aBlock\n\t| p |\n\tprocesses _ OrderedCollection new.\n\t0 to: 55 do: [:i | \n\t\tp _ aBlock copy fixTemps newProcess.\n\t\tp coreMask: (1 bitShift: i).\n\t\tp resume.\n\t].! !\n\n!RVMProcessSwarm methodsFor: 'creation' stamp: 'ssa 2/26/2009 04:36'!\ninitialize: aBlock  onCores: aCollectionOfIndicies\n\t| p |\n\taCollectionOfIndicies size timesRepeat:[\n\t\tp _ aBlock copy fixTemps newProcess.\n\t\tp useOnlyCores: aCollectionOfIndicies.\n\t\tp resume.\n\t].! !\n\n!RVMProcessSwarm commentStamp: 'ads 2/2/2011 14:56' prior: 0!\nRVMProcessSwarm newRunning: [1000 timesRepeat:[10 factorial]].\n\n56 timesRepeat:[1000 timesRepeat:[10 factorial]]\n\n(Time millisecondsToRun:[1000 timesRepeat:[10 factorial]])/1000.0 ====> 1.5ms per 10 factorial\n(Time millisecondsToRun:[1000 timesRepeat:[10 factorial]]) ====> 1587ms per job\n(Time millisecondsToRun:[10 timesRepeat:[56 timesRepeat:[1000 timesRepeat:[10 factorial]]]])/10.0 \n 87902.1\n85059.2\n91263\n\nproc _ [RVMOperations print: ((Time millisecondsToRun:[10 timesRepeat:[56 timesRepeat:[1000 timesRepeat:[10 factorial]]]])/10.0) printString] copy fixTemps newProcess.\nproc coreMask: (1 bitShift: 4).\nproc resume.\n\n\n\n\nProcess allInstances collect:[:proc| proc coreMask]    \nProcess instanceCount\nProcess allInstances do:[:proc| proc coreMask:(1 bitShift:27)]   \n[:x | x _ 10. [x] value] value: 2\n\n\n\n\nArray locate.\ncoord _ Array asObjectCoordinate.\ndelay _ Delay forMilliseconds: 500.\n0 to: 55 do:[:coreIndex|delay wait. coord moveToCore: coreIndex]\n\nBenchmark new testCompiler\n\nProcess allInstancesDo:[:each| each coreMask: nil].\n\nRVMOperations runOnlyOn: 8.\nRVMOperations runOnAll\n\ncount _ 0.\n[[true] whileTrue:[0 to: 55 do: [:i | Processor thisProcess coreMask: (1 bitShift: i).\n\tProcessor  yield.\n\t10 factorial.\n\tRVMOperations print: '[',count printString,'] finished on core ',Processor thisProcess hostCore printString].\ncount _ count +1]]fork\n\nProcess allInstances collect:[:e| e coreMask]\n\n\nRVMOperations moveAllToReadMostlyHeaps\n\n  \"RVMProcessSwarm newRunning: [3000 factorial] onCores:(1 to: 10)\"\n  \"RVMProcessSwarm newRunning: [RVMOperations print: Processor thisProcess hostCore factorial printString] onCores:#(1 3 5 7)\"\n  \"RVMProcessSwarm newRunning: [3000 factorial.  RVMOperations print: Processor thisProcess hostCore  printString,' done'] onCores:(1 to: 10),(40 to:50) \"!\n!RVMProcessSwarm class methodsFor: 'instance creation' stamp: 'ads 2/2/2011 14:55'!\nnewRunning: aBlock\n  \"RVMProcessSwarm newRunning: [3000 factorial]\"\n  \"RVMProcessSwarm newRunning: [RVMOperations print: Processor thisProcess hostCore factorial printString]\"\n\tsuper new initialize: aBlock! !\n\n!RVMProcessSwarm class methodsFor: 'instance creation' stamp: 'ads 2/2/2011 14:56'!\nnewRunning: aBlock onCores: aCollectionOfIndicies\n  \"RVMProcessSwarm newRunning: [3000 factorial] onCores:(1 to: 10)\"\n  \"RVMProcessSwarm newRunning: [RVMOperations print: Processor thisProcess hostCore factorial printString] onCores:#(1 3 5 7)\"\n  \"RVMProcessSwarm newRunning: [3000 factorial.  RVMOperations print: Processor thisProcess hostCore  printString,' done'] onCores:(1 to: 10),(40 to:50) \"\n\tsuper new initialize: aBlock onCores: aCollectionOfIndicies! !\n\n!RVMRadioButtonView methodsFor: 'displaying' stamp: 'ssa 11/16/2008 00:19'!\nbuildCheckedBoxForm \n\t\"Answer the check(ed) circle \"\n\t\n\t| box aForm aCircle dot |\n\tbox _ Form extent:18@18 depth: Display depth.\n\taForm _ Form extent: 2@2.\n\taForm fillBlack.\n\taCircle _ Circle new.\n\taCircle form: aForm.\n\taCircle radius: 9.\n\taCircle center: 8@8.\n\taCircle displayOn: box.\n\tdot _ Form dotOfSize: 10.\n\tdot displayOn: box at: box boundingBox center clippingBox: box boundingBox  rule: Form paint fillColor:nil.\n\t\t\n\t^box! !\n\n!RVMRadioButtonView methodsFor: 'displaying' stamp: 'ssa 11/16/2008 00:19'!\nbuildUncheckedBoxForm  \n\t\"Answer the uncheck(ed) circle \"\n\t\n\t| box aForm aCircle |\n\tbox _ Form extent:18@18 depth: Display depth.\n\taForm _ Form extent: 2@2.\n\taForm fillBlack.\n\taCircle _ Circle new.\n\taCircle form: aForm.\n\taCircle radius: 9.\n\taCircle center: 8@8.\n\taCircle displayOn: box.\n\t^box! !\n\n!RVMRadioButtonView methodsFor: 'action' stamp: 'ssa 11/16/2008 01:26'!\nperformAction\n\t\"I've been clicked, switch state and act\"\n\t| others |\n\tself checked: true.\n\tself performCheckAction.\n\tothers _ self superView subViewsSatisfying: [:each| each ~~ self and:[each class == self class]].\n\tothers  do:[:each| \n\t\teach checked: false.\n\t\teach performUncheckAction.\n\t\teach displayView].\n\tself displayView\n! !\n\n!RVMRadioButtonView class methodsFor: 'examples' stamp: 'ssa 10/18/2008 23:34'!\nexample\n\t\"RVMRadioButtonView example\"\n\t\n\tsuper example! !\n\n!RVMRadioButtonView class methodsFor: 'examples' stamp: 'ssa 5/12/2010 10:15'!\nexampleRecording\n\t\"RVMRadioButtonView exampleRecording\"\n\t| topView   offRadio loopRadio subViewCount longRadio fileRadio |\n\ttopView := RVMStandardSystemView new  .\n\ttopView borderWidth:1. \n\tRVMRadioButtonView testState:#(true false false false false).\n\toffRadio _ RVMRadioButtonView on: self label: 'off' checkState: [RVMMonitor recordingMode = #off] whenChecked: [RVMMonitor recordingMode: #off] whenUnchecked: [] monitor: true.\n\tloopRadio _ RVMRadioButtonView on: self label: 'record last ',RVMMonitor sampleLimit printString,' samples' checkState: [RVMMonitor recordingMode = #loop] whenChecked: [RVMMonitor recordingMode: #loop] whenUnchecked: [] monitor: true.\n\tlongRadio _ RVMRadioButtonView on: self label: 'record all samples' checkState: [RVMMonitor recordingMode = #long] whenChecked: [RVMMonitor recordingMode: #long] whenUnchecked: [] monitor: true.\n\tfileRadio _ RVMRadioButtonView on: self label: 'record all samples to a file' checkState: [RVMMonitor recordingMode = #file] whenChecked: [RVMMonitor recordingMode: #file] whenUnchecked: [] monitor: true.\n\t\n\ttopView addSubView: offRadio.\n\ttopView addSubView:  loopRadio below:  offRadio.\n\ttopView addSubView:  longRadio below:  loopRadio.\n\ttopView addSubView:  fileRadio below:  longRadio.\n\ttopView label: 'Recording Options'.\n\tsubViewCount _ topView subViews size.\n\ttopView minimumSize: 100@(subViewCount*28).\n\ttopView maximumSize: 200@topView minimumSize y.\n\ttopView controller open! !\n\n!RVMReadersWriterLock methodsFor: 'private' stamp: 'dmu 11/13/2010 17:41'!\nfinishedReading\n\tself isRunningWritingProcess ifTrue: [^ self].\n\treaderCountInterlock critical: [\n\t\treaderCount > 1  ifTrue: [readerCount _ readerCount - 1] ifFalse: [\n\t        readerCount = 1 ifFalse: [self error: 'oops'] ifTrue: [\n\t\t\treaderCount _ 0.\n\t\t\t readVsWriteInterlock signal\n\t\t]].\n\t]! !\n\n!RVMReadersWriterLock methodsFor: 'private' stamp: 'dmu 11/13/2010 16:29'!\nfinishedWriting\n\twritingProcess _ nil.\n\treadVsWriteInterlock signal! !\n\n!RVMReadersWriterLock methodsFor: 'private' stamp: 'dmu 11/13/2010 16:28'!\ninitialize\n\treaderCount _ 0.\n\treaderCountInterlock _ Semaphore forMutualExclusion.\n\treadVsWriteInterlock _ Semaphore forMutualExclusion.\n\twritingProcess _ nil! !\n\n!RVMReadersWriterLock methodsFor: 'private' stamp: 'dmu 11/13/2010 16:33'!\nisRunningWritingProcess\n\t^ Processor thisProcess == writingProcess! !\n\n!RVMReadersWriterLock methodsFor: 'private' stamp: 'dmu 11/13/2010 17:42'!\nstartingToRead\n\tself isRunningWritingProcess  ifTrue: [^ self].\n\treaderCountInterlock critical: [\n\t\treaderCount > 0  ifTrue: [readerCount _ readerCount + 1] ifFalse: [\n\t        readerCount = 0 ifFalse: [self error: 'oops'] ifTrue: [\n\t\t\treadVsWriteInterlock wait.\n\t\t\treaderCount _ 1.\n\t\t]].\n\t]! !\n\n!RVMReadersWriterLock methodsFor: 'private' stamp: 'dmu 6/13/2011 23:53'!\nstartingToWrite\n\twritingProcess == Processor thisProcess ifTrue: [self error: 'recursive write'].\n\treadVsWriteInterlock wait.\n\twritingProcess _ Processor thisProcess! !\n\n!RVMReadersWriterLock methodsFor: 'public' stamp: 'dmu 11/12/2010 17:31'!\nguardForReading: blockWhichReads\n\tself startingToRead.\n\t^ blockWhichReads ensure: [self finishedReading]! !\n\n!RVMReadersWriterLock methodsFor: 'public' stamp: 'dmu 11/12/2010 17:31'!\nguardForWriting: blockWhichWrites\n\tself startingToWrite.\n\t^ blockWhichWrites ensure: [self finishedWriting]! !\n\n!RVMReadersWriterLock commentStamp: 'dmu 11/12/2010 17:26' prior: 0!\nI provide synchronization for multiple readers or one writer.\nI am not very clever.\n\nreaderCount: how many readers are currently reading\nreaderCountInterlock: protects readerCount\nreadVsWriteInterlock: ensures that reading & writing do not happen at the same time, also ensures only one writer at a time\n\nUsage:\n\nx _ RVMReadersWriterLock new.\n\nx guardForReading: [ \"read the data\" ].\nx guardForWriting: [ \"write the data\" ].!\n!RVMReadersWriterLock class methodsFor: 'as yet unclassified' stamp: 'dmu 11/12/2010 18:08'!\ncrudeTest\n\t| x g p |\n\t\"RVMReadersWriterLock  crudeTest\"\n\t\"Flashes dots in upper row when reading, flashes dots in lower row when writing.\"\n\tx _ RVMReadersWriterLock new.\n\tg _ 0@0.\n\t1 to: 10 do: [:i| \n\t\t[\t[g x = 0] whileTrue.\n\t\t\tp _  (100@100) + ( (5*i) @ 0).\n\t\t\t100 timesRepeat: [\n\t\t\t\tx guardForReading: [\n\t\t\t\t\t(Delay forMilliseconds: 10) wait.\n\t\t\t\t\tDisplay drawDot5At: p.\n\t\t\t\t\t(Delay forMilliseconds: 10) wait.\n\t\t\t\t\tDisplay eraseDot5At: p.\n\t\t\t\t]\n\t\t\t]\n\t\t] copy fixTemps fork.\n\t].\n\t1 to: 4 do: [:i| \n\t\t[     [g x = 0] whileTrue.\n\t\t\tp _  (100@110) + ( (5*i) @ 0).\n\t\t\t100 timesRepeat: [\n\t\t\t\tx guardForWriting: [\n\t\t\t\t\t(Delay forMilliseconds: 10) wait.\n\t\t\t\t\tDisplay drawDot5At: p.\n\t\t\t\t\t(Delay forMilliseconds: 10) wait.\n\t\t\t\t\tDisplay eraseDot5At: p.\n\t\t\t\t]\n\t\t\t]\n\t\t] copy fixTemps fork.\n\t].\n\tg x: 1! !\n\n!RVMSBinarySampleWriter commentStamp: 'ssa 10/26/2008 23:51' prior: 0!\nA test to see if a completely flattened binary stream write method would be faster than the archiver.\n\nNot so!!\nthis takes 4-6 seconds and generates a 600K file for a 56 core sample\n\nArchiver takes 0.7 sec and generates a 40K file!\n!RVMSBinarySampleWriter class methodsFor: 'sample writing' stamp: 'ssa 10/26/2008 23:48'!\nwriteSample: aSample on: aStream\n\t\"RVMSBinarySampleWriter writeSample: RVMMonitor lastSample on: (FileStream newFileNamed:'binary-sample-writer.test')\"\n\t\"Write the minimum data in aSample to aStream in binary format\"\n\t| data subData innerCoreStats allSendTallies tallies rcvTallies memoryStats readWriteHeap readMostlyHeap interpStats objTableStats |\n\tdata _ aSample rawData.\n\taStream binary;\n\t\tnextNumber: 8 put:  (data at: 2);  \"runMask\"\n\t\tnextPut:  ((data at: 4)) ;  \"extraYields\"\n\t\tnextPut:  ((data at: 6)).  \"extraRemoteContextAllocations\"\n\t\t\"remember messageNames\"\n\t\tsubData _ data at: 10. \"groupStats\"\n\taStream\n\t\tnextPut:  ((subData at: 2));  \"mainX\"\n\t\tnextPut:  ((subData at: 4));  \"mainY\"\n\t\tnextPut:  ((subData at: 6));  \"mainRank\"\n\t\tnextPut:  ((subData at: 8));  \"width\"\n\t\tnextPut:  ((subData at: 10));  \"height\"\n\t\tnextPut:  ((subData at: 12));  \"groupSize\"\n\t\tnextPut:  ((subData at: 14)).  \"remaining\"\n\tsubData _ data at: 12. \"allCPUCoreStats\"\n\tsubData do:[:each|\n\t\taStream\n\t\t\tnextInt32Put:  (each at: 2);  \"millisecs\"\n\t\t\tnextInt32Put:  (each at: 4).  \"cycles\"\n\t\tinnerCoreStats _ each at: 6.\n\t\taStream\n\t\t\tnextPut:  ((innerCoreStats at: 2));  \"x\"\n\t\t\tnextPut:  ((innerCoreStats at: 4));  \"y\"\n\t\t\tnextPut:  ((innerCoreStats at: 6)).  \"rank\"\n\t\tallSendTallies _ innerCoreStats at: 8. \"sendTalliesByCore\"\n\t\tallSendTallies do:[:sndTally|\n\t\t\ttallies _ allSendTallies at: 2.\n\t\t\ttallies do:[:tally|\n\t\t\taStream\n\t\t\t\tnextWordPut: tally].  \"a single send tally\"\n\t\t\t].\n\t\trcvTallies _ innerCoreStats at: 10.\n\t\trcvTallies do:[:tally|\n\t\t\taStream\n\t\t\t\tnextWordPut: tally].  \"a single recieve tally\"\n\tmemoryStats _ each at: 8. \"memorySystemStats\"\n\taStream\n\t\tnextWordPut: (memoryStats at: 2);  \"gcCount\"\n\t\tnextInt32Put:  (memoryStats at: 4);  \"gcMilliseconds\"\n\t\tnextInt32Put:  (memoryStats at: 6).  \"gcCycles\"\n\treadWriteHeap _ memoryStats at: 8.  \"readWriteHeapStats\"\n\taStream\n\t\tnextInt32Put:  (readWriteHeap at: 2);  \"bytesUsed()\"\n\t\tnextInt32Put:  (readWriteHeap at: 4);  \"bytesLeft()\"\n\t\tnextInt32Put:  (readWriteHeap at: 6);  \"allocationsSinceLastQuery\"\n\t\tnextInt32Put:  (readWriteHeap at: 8).  \"compactionsSinceLastQuery\"\n\treadMostlyHeap _ memoryStats at: 10.  \"readMostlyHeapStats\"\n\taStream\n\t\tnextInt32Put:  (readMostlyHeap at: 2);  \"bytesUsed()\"\n\t\tnextInt32Put:  (readMostlyHeap at: 4);  \"bytesLeft()\"\n\t\tnextInt32Put:  (readMostlyHeap at: 6);  \"allocationsSinceLastQuery\"\n\t\tnextInt32Put:  (readMostlyHeap at: 8).  \"compactionsSinceLastQuery\"\n\tinterpStats _ each at: 10. \"interpreterStats\"\n\taStream\n\t\tnextInt32Put:  (interpStats at: 2);  \"bytecodesExecuted\"\n\t\tnextInt32Put:  (interpStats at: 4);  \"yieldCount\"\n\t\tnextNumber: 6 put:  (interpStats at: 6);  \"cyclesRunning\"\n\t\tnextNumber: 6 put:  (interpStats at: 8);  \"cyclesWaiting\"\n\t\tnextInt32Put:  (interpStats at: 10);  \"contextChangeCount\"\n\t\tnextInt32Put:  (interpStats at: 12);  \"interruptCheckCount\"\n\t\tnextInt32Put:  (interpStats at: 14);  \"unforcedInterruptCheckCount\"\n\t\tnextInt32Put:  (interpStats at: 16);  \"numberOfMovedMutatedReadMostlyObjects\"\n\t\tnextNumber: 6 put:  (interpStats at: 18).  \"cyclesMovingMutatedReadMostlyObjects\"\n\t].\n\tobjTableStats _ data at: 14.   \"objectTableStats\"\n\taStream\n\t\tnextInt32Put:  (objTableStats at: 2);  \"allocatedEntryCount\"\n\t\tnextInt32Put:  (objTableStats at: 4);  \"entryCount\"\n\t\tnextInt32Put:  (objTableStats at: 6);  \"allocationsSinceLastQuery\"\n\t\tnextInt32Put:  (objTableStats at: 8).  \"entriesFreedSinceLastQuery\"\n\taStream\n\t\tnextPut:  ((data at: 16));  \"extraRunPrimitives\"\n\t\tnextPut:  ((data at: 18));  \"extraDoublewordBroadcasts\"\n\t\tnextPut:  ((data at: 20));  \"extraWordBroadcasts\"\n\t\tnextPut:  (((data at: 22) ifTrue:[1]ifFalse:[0]));  \"dontPassTheBatonDefault\"\n\t\tnextPut:  (((data at: 24) ifTrue:[1]ifFalse:[0])).  \"fence\"\n! !\n\n!RVMSample methodsFor: 'accessing' stamp: 'ssa 7/21/2008 09:38'!\ncyclesSinceLastSample\n\t\"Answer the number of processor cycles since the last sample was taken\"\n\tcyclesSinceLastSample isNil ifTrue:[^0].\n\t^cyclesSinceLastSample! !\n\n!RVMSample methodsFor: 'accessing' stamp: 'ssa 7/21/2008 10:05'!\ncyclesSinceLastSample: count\n\t\"Set the number of processor cycles since the last sample was taken\"\n\tcyclesSinceLastSample := count! !\n\n!RVMSample methodsFor: 'accessing' stamp: 'ssa 7/21/2008 11:29'!\nglobalHeapStats\n\t\"Answer the global heap stats for this sample\"\n\tglobalHeapStats isNil ifTrue:[self globalHeapStats: RVMGlobalHeapStats new].\n\t^globalHeapStats! !\n\n!RVMSample methodsFor: 'accessing' stamp: 'ssa 7/21/2008 09:40'!\nglobalHeapStats: anRVMGlobalHeapStats\n\t\"Set the global heap stats for this sample\"\n\tglobalHeapStats := anRVMGlobalHeapStats! !\n\n!RVMSample methodsFor: 'accessing' stamp: 'ssa 7/21/2008 11:29'!\nlocalHeapStats\n\t\"Answer the local heap stats for this sample\"\n\tlocalHeapStats isNil ifTrue:[self localHeapStats: RVMLocalHeapStats new].\n\t^localHeapStats! !\n\n!RVMSample methodsFor: 'accessing' stamp: 'ssa 7/21/2008 10:13'!\nlocalHeapStats: anRVMLocalHeapStats\n\t\"Set the local heap stats for this sample\"\n\tlocalHeapStats := anRVMLocalHeapStats! !\n\n!RVMSample methodsFor: 'accessing' stamp: 'ssa 7/21/2008 09:38'!\nmillisecondsSinceLastSample\n\t\"Answer the time since the last sample was taken\"\n\tmillisecondsSinceLastSample isNil ifTrue:[^0].\n\t^millisecondsSinceLastSample! !\n\n!RVMSample methodsFor: 'accessing' stamp: 'ssa 7/21/2008 09:37'!\nmillisecondsSinceLastSample: milliseconds\n\t\"Set the time since the last sample was taken\"\n\tmillisecondsSinceLastSample := milliseconds! !\n\n!RVMSample methodsFor: 'accessing' stamp: 'ssa 7/21/2008 11:29'!\nobjectTableStats\n\t\"Answer the object stats for this sample\"\n\tobjectTableStats isNil ifTrue:[self objectTableStats: RVMObjectTableStats new].\n\t^objectTableStats! !\n\n!RVMSample methodsFor: 'accessing' stamp: 'ssa 7/21/2008 11:45'!\nobjectTableStats: anRVMObjectTableStats\n\t\"Set the object stats for this sample\"\n\tobjectTableStats := anRVMObjectTableStats! !\n\n!RVMSample methodsFor: 'accessing' stamp: 'ssa 7/21/2008 11:25'!\nrawData\n\t\"Answer the raw data for this sample\"\n\t^rawData! !\n\n!RVMSample methodsFor: 'accessing' stamp: 'ssa 7/21/2008 11:25'!\nrawData: anArray\n\t\"Set the raw data for this sample\"\n\trawData := anArray! !\n\n!RVMSample methodsFor: 'accessing' stamp: 'ssa 7/21/2008 11:30'!\nsqueakInterpreterStats\n\t\"Answer the squeak interpreter stats for this sample\"\n\tsqueakInterpreterStats isNil ifTrue:[self squeakInterpreterStats: RVMSqueakInterpreterStats new].\n\t^squeakInterpreterStats! !\n\n!RVMSample methodsFor: 'accessing' stamp: 'ssa 7/21/2008 11:22'!\nsqueakInterpreterStats: anRVMSqueakInterpreterStats\n\t\"Set the squeak interpreter stats for this sample\"\n\tsqueakInterpreterStats := anRVMSqueakInterpreterStats! !\n\n!RVMSample methodsFor: 'initialize' stamp: 'ssa 7/21/2008 11:31'!\ninitializeFrom: data\n\t\"Set my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  This implementations assumes no order dependency in the array except that values always follow their names.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\n\t\n\t| valueMap objectMap index datum |\n\tself rawData: data.\n\tvalueMap := { \n\t\t\t\t'millisecs' -> #millisecondsSinceLastSample:.\n\t\t\t\t'cycles' -> #cyclesSinceLastSample:.\n\t\t\t\t}.\n\tobjectMap := { \n\t\t\t\t'The_Global_Object_Heap.get_stats()' -> #initializeGlobalHeapStatsFrom:.\n\t\t\t\t'The_Local_Object_Heap.get_stats()' -> #initializeLocalHeapStatsFrom:.\n\t\t\t\t'The_Object_Table.get_stats()' -> #initializeObjectTableStatsFrom:.\n\t\t\t\t'The_Squeak_Interpreter.get_stats()' -> #initializeSqueakInterpreterStatsFrom:.\n\t\t\t\t}.\n\t\t\t\t\n\tvalueMap do:[:assoc |\n\t\tindex := data indexOf: assoc key.\n\t\tindex = 0 ifTrue:[self error:'Can''t find ',assoc key,' in sample data'].\n\t\tdatum := data at: index + 1.\n\t\tself perform: assoc value with: datum].\n\t\t\n\tobjectMap do:[:assoc |\n\t\tindex := data indexOf: assoc key.\n\t\tindex = 0 ifTrue:[self error:'Can''t find ',assoc key,' in sample data'].\n\t\tdatum := data at: index + 1.\n\t\tself perform: assoc value with: datum].\n! !\n\n!RVMSample methodsFor: 'initialize' stamp: 'ssa 7/21/2008 11:11'!\ninitializeGlobalHeapStatsFrom: data\n\t\"Set my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  This implementations assumes no order dependency in the array except that values always follow their names.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\n\t\n\t| valueMap objectMap index datum |\n\tself initializeHeapStatsFrom: data into: self globalHeapStats.\n\tvalueMap := {}.\n\tobjectMap := {}.\n\t\t\t\t\n\tvalueMap do:[:assoc |\n\t\tindex := data indexOf: assoc key.\n\t\tindex = 0 ifTrue:[self error:'Can''t find ',assoc key,' in sample data'].\n\t\tdatum := data at: index + 1.\n\t\tself globalHeapStats perform: assoc value with: datum].\n\t\t\n\tobjectMap do:[:assoc |\n\t\tindex := data indexOf: assoc key.\n\t\tindex = 0 ifTrue:[self error:'Can''t find ',assoc key,' in sample data'].\n\t\tdatum := data at: index + 1.\n\t\tself globalHeapStats perform: assoc value with: datum].\n! !\n\n!RVMSample methodsFor: 'initialize' stamp: 'ssa 7/21/2008 11:11'!\ninitializeHeapStatsFrom: data into: aHeapStats\n\t\"Set my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  This implementations assumes no order dependency in the array except that values always follow their names.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\n\t\n\t| valueMap objectMap index datum |\n\tvalueMap := { \n\t\t\t\t'bytesUsed()' -> #bytesUsed:.\n\t\t\t\t'bytesLeft()' -> #bytesLeft:.\n\t\t\t\t'allocations_since_last_query' -> #allocationsSinceLastQuery:.\n\t\t\t\t'compactions_since_last_query' -> #compactionsSinceLastQuery:.\n\t\t\t\t}.\n\tobjectMap := {}.\n\t\t\t\t\n\tvalueMap do:[:assoc |\n\t\tindex := data indexOf: assoc key.\n\t\tindex = 0 ifTrue:[self error:'Can''t find ',assoc key,' in sample data'].\n\t\tdatum := data at: index + 1.\n\t\taHeapStats perform: assoc value with: datum].\n\t\t\n\tobjectMap do:[:assoc |\n\t\tindex := data indexOf: assoc key.\n\t\tindex = 0 ifTrue:[self error:'Can''t find ',assoc key,' in sample data'].\n\t\tdatum := data at: index + 1.\n\t\taHeapStats perform: assoc value with: datum].\n! !\n\n!RVMSample methodsFor: 'initialize' stamp: 'ssa 7/21/2008 11:12'!\ninitializeLocalHeapStatsFrom: data\n\t\"Set my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  This implementations assumes no order dependency in the array except that values always follow their names.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\n\t\n\t| valueMap objectMap index datum |\n\tself initializeHeapStatsFrom: data into: self localHeapStats.\n\tvalueMap := { \n\t\t\t\t'objects_fetched_into_local_heap_since_last_query' -> #objectsFetchedSinceLastQuery:.\n\t\t\t\t'overly_large_fetch_or_allocation_requests_denied_since_last_query' -> #overlyLargeFetchOrAllocationRequestsDeniedSinceLastQuery:.\n\t\t\t\t'fetch_requests_that_failed_since_last_query' -> #failedFetchRequestsSinceLastQuery:.\n\t\t\t\t'objects_flushed_since_last_query' -> #objectsFlushedSinceLastQuery:.\n\t\t\t\t}.\n\tobjectMap := {}.\n\t\t\t\t\n\tvalueMap do:[:assoc |\n\t\tindex := data indexOf: assoc key.\n\t\tindex = 0 ifTrue:[self error:'Can''t find ',assoc key,' in sample data'].\n\t\tdatum := data at: index + 1.\n\t\tself localHeapStats perform: assoc value with: datum].\n\t\t\n\tobjectMap do:[:assoc |\n\t\tindex := data indexOf: assoc key.\n\t\tindex = 0 ifTrue:[self error:'Can''t find ',assoc key,' in sample data'].\n\t\tdatum := data at: index + 1.\n\t\tself localHeapStats perform: assoc value with: datum].\n! !\n\n!RVMSample methodsFor: 'initialize' stamp: 'ssa 7/21/2008 11:16'!\ninitializeObjectTableStatsFrom: data\n\t\"Set my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  This implementations assumes no order dependency in the array except that values always follow their names.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\n\t\n\t| valueMap objectMap index datum |\n\tvalueMap := { \n\t\t\t\t'how_many_entries_are_currently_allocated' -> #allocatedEntryCount:.\n\t\t\t\t'how_many_entries_exist' -> #entryCount:.\n\t\t\t\t'how_many_allocations_have_occured_since_last_query' -> #allocationsMadeSinceLastQuery:.\n\t\t\t\t'how_many_have_been_freed_since_last_query' -> #allocationsFreedSinceLastQuery:.\n\t\t\t\t}.\n\tobjectMap := {}.\n\t\t\t\t\n\tvalueMap do:[:assoc |\n\t\tindex := data indexOf: assoc key.\n\t\tindex = 0 ifTrue:[self error:'Can''t find ',assoc key,' in sample data'].\n\t\tdatum := data at: index + 1.\n\t\tself objectTableStats perform: assoc value with: datum].\n\t\t\n\tobjectMap do:[:assoc |\n\t\tindex := data indexOf: assoc key.\n\t\tindex = 0 ifTrue:[self error:'Can''t find ',assoc key,' in sample data'].\n\t\tdatum := data at: index + 1.\n\t\tself objectTableStats perform: assoc value with: datum].\n! !\n\n!RVMSample methodsFor: 'initialize' stamp: 'ssa 7/21/2008 11:19'!\ninitializeSqueakInterpreterStatsFrom: data\n\t\"Set my variables based on the data array.  The data array is organized as a series of name-value pairs, where the names are strings and the values are either numbers, strings, symbols or an array of name-value pairs.  This implementations assumes no order dependency in the array except that values always follow their names.  Subarrays will be passed to another method like me that will factor them into appropriate subobjects.\"\n\t\n\t| valueMap objectMap index datum |\n\tvalueMap := { \n\t\t\t\t'bcCount - bytecodes' -> #bytecodeCount:.\n\t\t\t\t}.\n\tobjectMap := {}.\n\t\t\t\t\n\tvalueMap do:[:assoc |\n\t\tindex := data indexOf: assoc key.\n\t\tindex = 0 ifTrue:[self error:'Can''t find ',assoc key,' in sample data'].\n\t\tdatum := data at: index + 1.\n\t\tself squeakInterpreterStats perform: assoc value with: datum].\n\t\t\n\tobjectMap do:[:assoc |\n\t\tindex := data indexOf: assoc key.\n\t\tindex = 0 ifTrue:[self error:'Can''t find ',assoc key,' in sample data'].\n\t\tdatum := data at: index + 1.\n\t\tself squeakInterpreterStats perform: assoc value with: datum].\n! !\n\n!RVMSample class methodsFor: 'primitive access' stamp: 'ssa 7/21/2008 10:38'!\nprimitiveCapture\n\t\"Grab some data from the VM and return it\"\n\t<primitive: 'primitiveSampleRVM' module: 'RVMPlugin'>\n\tself primitiveFailed! !\n\n!RVMSample class methodsFor: 'instance creation' stamp: 'ssa 7/21/2008 11:23'!\ncapture\n\t\"Capture a sample from the vm and answer a new instance of me holding those values\"\n\t| data sample |\n\tdata := self primitiveCapture.\n\tsample := self new.\n\tsample initializeFrom: data.\n\t^sample! !\n\n!RVMSample class methodsFor: 'example' stamp: 'ssa 7/21/2008 11:24'!\nexample\n\t\"RVMSample example\"\n\tself capture explore! !\n\n!RVMSample class methodsFor: 'example' stamp: 'ssa 8/13/2008 15:05'!\nexamplePrimitive\n\t\"RVMSample examplePrimitive\"\n\tself primitiveCapture explore! !\n\n!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:27'!\nallCoreStats ^ 1 bitShift: 4! !\n\n!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:27'!\nallCores ^ 1 bitShift: 0! !\n\n!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:28'!\nbufferedMessageStats ^ 1 bitShift: 17! !\n\n!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:28'!\nbytecodes ^ 1 bitShift: 21! !\n\n!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:27'!\ncoreCoords ^ 1 bitShift: 14! !\n\n!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:28'!\ncpuCoreStats ^ 1 bitShift: 3! !\n\n!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:29'!\ncycleCounts ^ 1 bitShift: 23! !\n\n!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:29'!\ncycles ^ 1 bitShift: 8! !\n\n!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:29'!\ndontPassTheBatonDefault ^ 1 bitShift: 5! !\n\n!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:30'!\neverything ^ SmallInteger maxVal! !\n\n!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:31'!\nfence  ^  1 bitShift: 6! !\n\n!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:31'!\ngcStats ^ 1 bitShift: 19! !\n\n!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:32'!\nheapStats ^ 1 bitShift: 20! !\n\n!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:32'!\ninteractionStats ^ 1 bitShift: 13! !\n\n!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:32'!\ninterpreterLoopStats ^ 1 bitShift: 27! !\n\n!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:32'!\ninterpreterStats ^ 1 bitShift: 11! !\n\n!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:32'!\ninterruptChecks ^ 1 bitShift: 24! !\n\n!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:33'!\nmemorySystemStats  ^ 1 bitShift: 10! !\n\n!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:33'!\nmessageNames ^ 1 bitShift: 2! !\n\n!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:33'!\nmessageStats  ^ 1 bitShift: 9! !\n\n!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:33'!\nmillisecs  ^ 1 bitShift: 7! !\n\n!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:33'!\nmovedMutatedObjectStats ^ 1 bitShift: 25! !\n\n!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:34'!\nmutexStats ^ 1 bitShift: 26\n! !\n\n!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:34'!\nobjectTableStats  ^ 1 bitShift: 12! !\n\n!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:34'!\nreceiveCycles ^ 1 bitShift: 18! !\n\n!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:34'!\nreceiveTallies ^ 1 bitShift: 16! !\n\n!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:34'!\nrunMask ^ 1 bitShift: 1! !\n\n!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:35'!\nsendTallies ^ 1 bitShift: 15! !\n\n!RVMSampleFlags class methodsFor: 'flag values' stamp: 'dmu 4/10/2009 17:35'!\nyieldCount ^  1 bitShift: 22! !\n\n!RVMSampleReader methodsFor: 'common entries' stamp: 'ssa 11/16/2008 15:12'!\nmessageNames\n\t\"Normally at index 8 in sample raw data array\"\n\t^#('noMessage' 'allocateOrRecycleContextMessage' 'allocateOrRecycleContextJustTestingMessage' 'recycleContextIfPossibleMessage' 'flushInterpreterCachesMessage' 'flushMethodCacheMessage' 'flushByMethodMessage' 'flushSelectiveMessage' 'addObjectFromSnapshotMessage' 'addObjectFromSnapshotResponse' 'updateWholeInterpreterMessage' 'updateEnoughInterpreterToTransferControlMessage' 'updateEnoughInterpreterToTransferControlJustTestingMessage' 'updateEnoughInterpreterToTransferControlJustTestingResponse' 'zapUnusedPortionOfHeapMessage' 'zapUnusedPortionOfHeapResponse' 'verifyInterpreterAndHeapMessage' 'doAllRootsThereMessage' 'doAllRootsThereResponse' 'doAllRootsHereMessage' 'hereIsARootResponse' 'newValueForOopMessage' 'noMoreRootsResponse' 'scanCompactOrMakeFreeObjectsMessage' 'scanCompactOrMakeFreeObjectsResponse' 'returnContextMessage' 'runPrimitiveMessage' 'runPrimitiveJustTestingMessage' 'runPrimitiveResponse' 'loadFunctionFromPluginMessage' 'loadFunctionFromPluginResponse' 'broadcastInterpreterDoublewordMessage' 'broadcastInterpreterWordMessage' 'broadcastInterpreterBoolMessage' 'sampleOneCoreMessage' 'sampleOneCoreResponse' 'initiateBarrierMessage' 'respondToBarrierMessage' 'aboutToWriteRead_MostlyMemoryMessage' 'aboutToWriteRead_MostlyMemoryResponse' 'wroteRead_MostlyMemoryMessage' 'flushFreeContextsMessage' 'enforceCoherenceBeforeSenderStoresIntoAllHeapsMessage' 'enforceCoherenceBeforeSenderStoresIntoAllHeapsResponse' 'enforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapMessage' 'enforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapResponse' 'enforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapMessage' 'enforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapResponse' 'preGCActionMessage' 'preGCActionResponse' 'postGCActionMessage' 'postGCActionResponse' 'startAnotherProcessMessage' 'startAnotherProcessResponse' 'initContextMessage' 'initContextResponse' 'requestSafepointMessage' 'requestSafepointResponse' 'relinquishSafepointMessage' 'relinquishSafepointResponse')! !\n\n!RVMSampleReader methodsFor: 'common entries' stamp: 'ssa 11/16/2008 15:12'!\nversion1messageNames\n\t\"Normally at index 8 in sample raw data array\"\n\t^#('allocateOrRecycleContextMessage' 'allocateOrRecycleContextJustTestingMessage' 'recycleContextIfPossibleMessage' 'flushInterpreterCachesMessage' 'flushMethodCacheMessage' 'flushByMethodMessage' 'flushSelectiveMessage' 'addObjectFromSnapshotMessage' 'addObjectFromSnapshotResponse' 'updateWholeInterpreterMessage' 'updateEnoughInterpreterToTransferControlMessage' 'updateEnoughInterpreterToTransferControlJustTestingMessage' 'updateEnoughInterpreterToTransferControlJustTestingResponse' 'zapUnusedPortionOfHeapMessage' 'zapUnusedPortionOfHeapResponse' 'verifyInterpreterAndHeapMessage' 'doAllRootsThereMessage' 'doAllRootsThereResponse' 'doAllRootsHereMessage' 'hereIsARootResponse' 'newValueForOopMessage' 'noMoreRootsResponse' 'scanCompactOrMakeFreeObjectsMessage' 'scanCompactOrMakeFreeObjectsResponse' 'returnContextMessage' 'runPrimitiveMessage' 'runPrimitiveJustTestingMessage' 'runPrimitiveResponse' 'loadFunctionFromPluginMessage' 'loadFunctionFromPluginResponse' 'broadcastInterpreterDoublewordMessage' 'broadcastInterpreterWordMessage' 'broadcastInterpreterBoolMessage' 'sampleOneCoreMessage' 'sampleOneCoreResponse' 'initiateBarrierMessage' 'respondToBarrierMessage' 'aboutToWriteReadMostlyMemoryMessage' 'aboutToWriteReadMostlyMemoryResponse' 'wroteReadMostlyMemoryMessage' 'flushFreeContextsMessage' 'enforceCoherenceBeforeSenderStoresIntoAllHeapsMessage' 'enforceCoherenceBeforeSenderStoresIntoAllHeapsResponse' 'enforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapMessage' 'enforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapResponse' 'enforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapMessage' 'enforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapResponse')! !\n\n!RVMSampleReader methodsFor: 'reading' stamp: 'ssa 10/26/2008 16:03'!\nnextAllCPUCoreStats\n\n\t| rawData |\n\trawData _ OrderedCollection new.\n\t56 timesRepeat:[rawData add: self nextCoreStats].\n\t^rawData asArray! !\n\n!RVMSampleReader methodsFor: 'reading' stamp: 'ssa 11/16/2008 15:31'!\nnextCoreStats\n\n\t| rawData |\n\trawData _ Array new: 12.\n\trawData at:1 put: 'millisecs'.\n\trawData at:2 put: self next.\n\trawData at:3 put: 'cycles'.\n\trawData at:4 put: self next.\n\trawData at:5 put: 'coreStats'.\n\trawData at:6 put: self nextInnerCoreStats.\n\trawData at:7 put: 'memorySystemStats'.\n\trawData at:8 put: self nextMemorySystemStats.\n\trawData at:9 put: 'interpreterStats'.\n\trawData at:10 put: self nextInterpreterStats.\n\trawData at:11put: 'objectTableStats'.\n\trawData at:12 put: self nextObjectTableStats.\n\t^rawData! !\n\n!RVMSampleReader methodsFor: 'reading' stamp: 'ssa 10/26/2008 16:00'!\nnextGroupStats\n\n\t| rawData |\n\trawData _ Array new: 14.\n\trawData at:1 put: 'mainX'.\n\trawData at:2 put: self next.\n\trawData at:3 put: 'mainY'.\n\trawData at:4 put: self next.\n\trawData at:5 put: 'mainRank'.\n\trawData at:6 put: self next.\n\trawData at:7 put: 'width'.\n\trawData at:8 put: self next.\n\trawData at:9 put: 'height'.\n\trawData at:10 put: self next.\n\trawData at:11 put: 'groupSize'.\n\trawData at:12 put: self next.\n\trawData at:13 put: 'remaining'.\n\trawData at:14 put: self next.\n\t^rawData! !\n\n!RVMSampleReader methodsFor: 'reading' stamp: 'ssa 10/26/2008 19:52'!\nnextInnerCoreStats\n\n\t| rawData |\n\trawData _ Array new: 11.\n\trawData at:1 put: 'x'.\n\trawData at:2 put: self next.\n\trawData at:3 put: 'y'.\n\trawData at:4 put: self next.\n\trawData at:5 put: 'rank'.\n\trawData at:6 put: self next.\n\trawData at:7 put: 'sendTalliesByCore'.\n\trawData at:8 put: self nextSendTalliesByCore.\n\trawData at:9 put: 'receiveTallies'.\n\trawData at:10 put: self nextReceiveTallies.\n\trawData at:11 put: #().\n\t^rawData! !\n\n!RVMSampleReader methodsFor: 'reading' stamp: 'ssa 11/16/2008 15:24'!\nnextInterpreterStats\n\n\t| rawData |\n\trawData _ Array new: 18.\n\trawData at:1 put: 'bytecodesExecuted'.\n\trawData at:2 put: self next.\n\trawData at:3 put: 'yieldCount'.\n\trawData at:4 put: self next.\n\trawData at:5 put: 'cyclesRunning'.\n\trawData at:6 put: self next.\n\trawData at:7 put: 'cyclesWaiting'.\n\trawData at:8 put: self next.\n\trawData at:9 put: 'contextChangeCount'.\n\trawData at:10 put: self next.\n\trawData at:11 put: 'interruptCheckCount'.\n\trawData at:12 put: self next.\n\trawData at:13 put: 'unforcedInterruptCheckCount'.\n\trawData at:14 put: self next.\n\trawData at:15 put: 'numberOfMovedMutatedRead_MostlyObjects'.\n\trawData at:16 put: self next.\n\trawData at:17 put: 'cyclesMovingMutatedRead_MostlyObjects'.\n\trawData at:18 put: self next.\n\t^rawData! !\n\n!RVMSampleReader methodsFor: 'reading' stamp: 'ssa 10/26/2008 20:10'!\nnextMemorySystemStats\n\n\t| rawData heap |\n\trawData _ Array new: 10.\n\trawData at:1 put: 'gcCount'.\n\trawData at:2 put: self next.\n\trawData at:3 put: 'gcMilliseconds'.\n\trawData at:4 put: self next.\n\trawData at:5 put: 'gcCycles'.\n\trawData at:6 put: self next.\n\trawData at:7 put: 'readWriteHeapStats'.\n\theap _ Array new:8.\n\theap at: 1 put:'bytesUsed()'.\n\theap at: 2 put:self next.\n\theap at: 3 put:'bytesLeft()'.\n\theap at: 4 put:self next.\n\theap at: 5 put:'allocationsSinceLastQuery'.\n\theap at: 6 put:self next.\n\theap at: 7 put:'compactionsSinceLastQuery'.\n\theap at: 8 put: self next.\n\trawData at:8 put: heap.\n\trawData at:9 put: 'readMostlyHeapStats'.\n\theap _ Array new:8.\n\theap at: 1 put:'bytesUsed()'.\n\theap at: 2 put:self next.\n\theap at: 3 put:'bytesLeft()'.\n\theap at: 4 put:self next.\n\theap at: 5 put:'allocationsSinceLastQuery'.\n\theap at: 6 put:self next.\n\theap at: 7 put:'compactionsSinceLastQuery'.\n\theap at: 8 put: self next.\n\trawData at:10 put: heap.\n\t^rawData! !\n\n!RVMSampleReader methodsFor: 'reading' stamp: 'ssa 11/16/2008 15:25'!\nnextObjectTableStats\n\n\t| rawData |\n\trawData _ Array new: 8.\n\trawData at:1 put: 'allocatedEntryCount[rank]'.\n\trawData at:2 put: self next.\n\trawData at:3 put: 'entryCount[rank]'.\n\trawData at:4 put: self next.\n\trawData at:5 put: 'allocationsSinceLastQuery[rank]'.\n\trawData at:6 put: self next.\n\trawData at:7 put: 'entriesFreedSinceLastQuery[rank]'.\n\trawData at:8 put: self next.\n\t^rawData! !\n\n!RVMSampleReader methodsFor: 'reading' stamp: 'ssa 10/26/2008 20:00'!\nnextReceiveTallies\n\n\t^ self next asArray! !\n\n!RVMSampleReader methodsFor: 'reading' stamp: 'ssa 11/16/2008 15:15'!\nnextSample\n\n\t| rawData |\n\trawData _ Array new: 22.\n\trawData at:1 put: 'runMask'.\n\trawData at:2 put: self next.\n\trawData at:3 put: 'extraYields'.\n\trawData at:4 put: self next.\n\trawData at:5 put: 'extraRemoteContextAllocations'.\n\trawData at:6 put: self next.\n\trawData at:7 put: 'messageNames'.\n\trawData at:8 put: self messageNames.\n\tself next.  \"consume #messageNames\"\n\trawData at:9 put: 'groupStats'.\n\trawData at:10 put: self nextGroupStats.\n\trawData at:11 put: 'allCPUCoreStats'.\n\trawData at:12 put: self nextAllCPUCoreStats.\n\trawData at:13 put: 'extraRunPrimitives'.\n\trawData at:14 put: self next.\n\trawData at:15 put: 'extraDoublewordBroadcasts'.\n\trawData at:16 put: self next.\n\trawData at:17 put: 'extraWordBroadcasts'.\n\trawData at:18 put: self next.\n\trawData at:19 put: 'dontPassTheBatonDefault'.\n\trawData at:20 put: self next.\n\trawData at:21 put: 'fence'.\n\trawData at:22 put: self next.\n\t^rawData! !\n\n!RVMSampleReader methodsFor: 'reading' stamp: 'ssa 10/26/2008 19:58'!\nnextSendTalliesByCore\n\n\t| rawData |\n\trawData _ Array new: 112.\n\t1 to: 111 by: 2 do:[:index|\n\t\trawData at: index put: 'sendTallies'.\n\t\trawData at: index + 1 put: self next asArray].\n\t^rawData ! !\n\n!RVMSampleReader class methodsFor: 'instance creation' stamp: 'ssa 10/26/2008 15:51'!\ndearchive: aString \n\t\"RVMSampleReader dearchive: 'sample-writer.test' \"\n\t| aStream anObject  |\n\taStream _ self on: (self fastStreamOn: aString).\n\tanObject _ aStream nextSample.\n\taStream close.\n\t^anObject! !\n\n!RVMSampleReader class methodsFor: 'instance creation' stamp: 'ssa 10/26/2008 20:24'!\ndearchiveRawData: aString \n\t\"RVMSampleReader dearchiveRawData: 'sample-writer.test' \"\n\t| aStream anObject  |\n\taStream _ self on: (self fastStreamOn: aString).\n\tanObject _ aStream nextSample.\n\taStream close.\n\t^anObject! !\n\n!RVMSampleReader class methodsFor: 'instance creation' stamp: 'ssa 10/28/2008 19:27'!\ndearchiveRawDataFrom: aStream\n\t\"| rw |\n\trw _ ReadWriteStream on:''.\n\tRVMSampleWriter archiveRawData: (RVMMonitor samples first) on: rw.\n\tRVMSampleReader dearchiveRawDataFrom: rw reset \"\n\t|  anObject  aReader |\n\taReader _ self on: aStream.\n\tanObject _ aReader nextSample.\n\t^anObject! !\n\n!RVMSampleReader class methodsFor: 'instance creation' stamp: 'ssa 10/26/2008 20:27'!\ndearchiveSample: aString \n\t\"RVMSampleReader dearchiveSample: 'sample-writer.test' \"\n\t| aStream anObject  |\n\taStream _ self on: (self fastStreamOn: aString).\n\tanObject _ aStream nextSample.\n\taStream close.\n\t^RVMMulticoreSample newFrom:anObject! !\n\n!RVMSampleReader class methodsFor: 'instance creation' stamp: 'ssa 10/28/2008 19:28'!\ndearchiveSampleFrom: aStream\n\t\"| rw |\n\trw _ ReadWriteStream on:''.\n\tRVMSampleWriter archiveSample: RVMMonitor lastSample on: rw.\n\tRVMSampleReader dearchiveSampleFrom: rw reset \"\n\t|  anObject  aReader |\n\taReader _ self on: aStream.\n\tanObject _ aReader nextSample.\n\t^RVMMulticoreSample newFrom:anObject! !\n\n!RVMSampleWriter methodsFor: 'accessing' stamp: 'ssa 10/26/2008 15:04'!\nrawData\n\t\"Answer the value of rawData\"\n\n\t^ rawData! !\n\n!RVMSampleWriter methodsFor: 'accessing' stamp: 'ssa 10/26/2008 15:04'!\nrawData: anObject\n\t\"Set the value of rawData\"\n\n\trawData _ anObject! !\n\n!RVMSampleWriter methodsFor: 'archiving' stamp: 'ssa 11/16/2008 15:42'!\narchiveAllCPUCoreStats: data\n\t\"Archive the rawData I have from the sample, minimizing space\"\n\t|  datum |\n\tdata do:[:batch|\n 2 to: batch size by: 2 do:[:index|\n\tdatum _ batch at: index.\n\tindex = 6 ifTrue:[self archiveCoreStats: datum]\n\t\tifFalse:[index = 8 ifTrue:[self archiveMemorySystemStats: datum]\n\t\t\tifFalse:[(#(10 12) includes:index) ifTrue:[self archiveNameValuePairArray: datum]\n\t\t\t\tifFalse:[self nextPut:datum]]]]].\n\t! !\n\n!RVMSampleWriter methodsFor: 'archiving' stamp: 'ssa 10/26/2008 15:18'!\narchiveCoreStats: data\n\t\"Archive the rawData I have from the sample, minimizing space\"\n\t|  datum |\n 2 to: data size by: 2 do:[:index|\n\tdatum _ data at: index.\n\tindex = 8 ifTrue:[self archiveSendTalliesByCore: datum]\n\t\tifFalse:[index = 10 ifTrue:[self archiveRecieveTallies: datum]\n\t\t\tifFalse:[self nextPut:datum]]].\n\t! !\n\n!RVMSampleWriter methodsFor: 'archiving' stamp: 'ssa 10/26/2008 15:25'!\narchiveMemorySystemStats: data\n\t\"Archive the rawData I have from the sample, minimizing space\"\n\t|  datum |\n 2 to: data size by: 2 do:[:index|\n\tdatum _ data at: index.\n\tindex = 8 ifTrue:[self archiveNameValuePairArray: datum]\n\t\tifFalse:[index = 10 ifTrue:[self archiveNameValuePairArray: datum]\n\t\t\tifFalse:[self nextPut:datum]]].\n\t! !\n\n!RVMSampleWriter methodsFor: 'archiving' stamp: 'ssa 10/26/2008 15:25'!\narchiveNameValuePairArray: data\n\t\"Archive the rawData I have from the sample, minimizing space\"\n\t|  datum |\n 2 to: data size by: 2 do:[:index|\n\tdatum _ data at: index.\n\tself nextPut: datum].\n\t! !\n\n!RVMSampleWriter methodsFor: 'archiving' stamp: 'ssa 10/26/2008 15:20'!\narchiveRecieveTallies: data\n\t\"Archive the rawData I have from the sample, minimizing space\"\n\tself nextPut: data asRunArray\n\t! !\n\n!RVMSampleWriter methodsFor: 'archiving' stamp: 'ssa 11/16/2008 15:31'!\narchiveSampleData\n\t\"Archive the rawData I have from the sample, minimizing space\"\n\t| data datum |\n\tdata _ self rawData.\n 2 to: data size by: 2 do:[:index|\n\tdatum _ data at: index.\n\tindex = 8 ifTrue:[self nextPut: #messageNames]\n\t\tifFalse:[index = 12 ifTrue:[self archiveAllCPUCoreStats: datum]\n\t\t\tifFalse:[(index = 10) ifTrue:[self archiveNameValuePairArray: datum]\n\t\t\tifFalse:[self nextPut:datum]]]].\n\t! !\n\n!RVMSampleWriter methodsFor: 'archiving' stamp: 'ssa 10/26/2008 15:19'!\narchiveSendTalliesByCore: data\n\t\"Archive the rawData I have from the sample, minimizing space\"\n\t|  datum |\n 2 to: data size by: 2 do:[:index|\n\tdatum _ data at: index.\n\tself nextPut: datum asRunArray].\n\t! !\n\n!RVMSampleWriter methodsFor: 'private' stamp: 'ssa 7/7/2010 13:13'!\nsetStream: aWriteStream\n\t\"Since I only store arrays of numbers, use plain Dictionarys\"\n\tstream _ aWriteStream.\n\tclassMap _ Dictionary new: 30.\n\tclassMap at: self put: 1.\n\tobjectMap _ Dictionary new: 400.\n\tposition _ 0  ! !\n\n!RVMSampleWriter class methodsFor: 'instance creation' stamp: 'ssa 10/26/2008 20:23'!\narchive: rawData to: aString \n\t\"use the other specific versions of me\"\n\tself shouldNotImplement! !\n\n!RVMSampleWriter class methodsFor: 'instance creation' stamp: 'ssa 10/28/2008 19:26'!\narchiveRawData: rawData on: aStream\n\t\"RVMSampleWriter archiveRawData: (RVMMonitor samples first) on: (ReadWriteStream on:'')\"\n\t\"rawData is expected to be the array of sample data obtained from the RVMMulticoreSample primitiveCapture primitive.\"\n\n\t| writer |\n\twriter _ self on: aStream.\n\twriter rawData: rawData.\n\twriter archiveSampleData.\n\t^aStream! !\n\n!RVMSampleWriter class methodsFor: 'instance creation' stamp: 'ssa 10/26/2008 20:22'!\narchiveRawData: rawData to: aString \n\t\"RVMSampleWriter archiveRawData: (RVMMonitor samples first) to: 'sample-writer.test'\"\n\t\"rawData is expected to be the array of sample data obtained from the RVMMulticoreSample primitiveCapture primitive.\"\n\n\t| stream writer |\n\t stream _ self fastStreamOn:  aString.\n\twriter _ self on: stream.\n\twriter rawData: rawData.\n\twriter archiveSampleData.\n\twriter close.! !\n\n!RVMSampleWriter class methodsFor: 'instance creation' stamp: 'ssa 10/28/2008 19:26'!\narchiveSample: aMulticoreSample on: aStream\n\t\"RVMSampleWriter archiveRawData: (RVMMonitor samples first)  on: (ReadWriteStream on:'')\"\n\t\"rawData is expected to be the array of sample data obtained from the RVMMulticoreSample primitiveCapture primitive.\"\n\n\t| writer |\n\twriter _ self on: aStream.\n\twriter rawData: aMulticoreSample rawData.\n\twriter archiveSampleData.\n\t^aStream! !\n\n!RVMSampleWriter class methodsFor: 'instance creation' stamp: 'ssa 10/26/2008 20:23'!\narchiveSample: aMulticoreSample to: aString \n\t\"RVMSampleWriter archiveRawData: (RVMMonitor samples first) to: 'sample-writer.test'\"\n\t\"rawData is expected to be the array of sample data obtained from the RVMMulticoreSample primitiveCapture primitive.\"\n\n\t| stream writer |\n\t stream _ self fastStreamOn:  aString.\n\twriter _ self on: stream.\n\twriter rawData: aMulticoreSample rawData.\n\twriter archiveSampleData.\n\twriter close.! !\n\n!RVMScanningStripChartView methodsFor: 'displaying' stamp: 'ssa 10/28/2008 15:21'!\ndrawOnCanvas\n\t| color colorIndex |\n\t1 to: self count do: [:index | \n\t\t\tcolorIndex := ((self data at: index)\n\t\t\t\t\t\t/ self scale min: self numberOfColors max: 1) rounded.\n\t\t\tcolor := self colors at: colorIndex.\n\t\t\tself scanner\n\t\t\t\tfill: (self boxes at: index)\n\t\t\t\tfillColor: color].\n\tself scanner displayOn: self canvas at: self nextScannerLocation @ 0.\n! !\n\n!RVMScanningStripChartView methodsFor: 'displaying' stamp: 'ssa 10/28/2008 20:37'!\neraseStrip\n\t\n\t\n\tself resetScannerLocation.\n\tsuper eraseStrip.! !\n\n!RVMScanningStripChartView methodsFor: 'displaying' stamp: 'ssa 10/28/2008 20:02'!\nnextScannerLocation\n\t\"Answer the next location for the scanner\"\n\tself scannerLocation: self scannerLocation + self boxSize.\n\t^self scannerLocation! !\n\n!RVMScanningStripChartView methodsFor: 'displaying' stamp: 'ssa 10/28/2008 20:41'!\nredrawOnCanvas\n\t| color colorIndex |\n\tself canvas fillWhite.\n\tself resetScannerLocation.\n\tself previousData do:[:oldData|\n\t1 to: self count do: [:index | \n\t\t\tcolorIndex := ((oldData at: index)\n\t\t\t\t\t\t/ self scale min: self numberOfColors max: 1) rounded.\n\t\t\tcolor := self colors at: colorIndex.\n\t\t\tself scanner\n\t\t\t\tfill: (self boxes at: index)\n\t\t\t\tfillColor: color].\n\tself scanner displayOn: self canvas at: self nextScannerLocation @ 0]! !\n\n!RVMScanningStripChartView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 15:20'!\nbox\n\t\"Answer the value of box\"\n\n\tbox isNil ifTrue:[self box: (0@0 extent: self boxSize @ self scanner boundingBox height)].\n\t^box! !\n\n!RVMScanningStripChartView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 20:37'!\nresetScannerLocation\n\n\tscannerLocation _ nil! !\n\n!RVMScanningStripChartView methodsFor: 'accessing' stamp: 'ssa 5/4/2010 15:27'!\nscanner\n\t\"Answer the value of scanner\"\n\n\tscanner isNil ifTrue:[self scanner: (ColorForm extent: self boxSize * 3 @self canvas height depth:8)].\n\t^ scanner! !\n\n!RVMScanningStripChartView methodsFor: 'accessing' stamp: 'ssa 5/4/2010 15:31'!\nscanner: anObject\n\t\"Set the value of scanner\"\n\n\tscanner _ anObject.\n\tscanner fillWhite.\n\tscanner border: scanner boundingBox width:1 fillColor:Color black.\n'<\n<\n<\n<\n<\n<\n<\n<\n<\n<\n<\n<\n<\n<\n<\n<' asParagraph asForm displayOn: scanner at: scanner boundingBox topCenter - (1@0).\nscanner border: scanner boundingBox width:1\n\t! !\n\n!RVMScanningStripChartView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 15:24'!\nscannerLocation\n\t\"Answer the value of scannerLocation\"\n\n\tscannerLocation isNil ifTrue:[self scannerLocation: self boxSize negated].\n\t^ scannerLocation! !\n\n!RVMScanningStripChartView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 20:15'!\nscannerLocation: anInteger\n\t\"Set the value of scannerLocation\"\n\n\tanInteger > self canvas boundingBox width\n\t\tifTrue:[scannerLocation _ self boxSize negated]\n\t\tifFalse:[scannerLocation _ anInteger]! !\n\n!RVMScanningStripChartView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 20:49'!\ntypeLabel\n\n\t^'RelScan: '! !\n\n!RVMSqueakInterpreterStats methodsFor: 'measuring' stamp: 'dmu 9/17/2010 15:21'!\ncyclesRunWaitRatio\n\t\"Answer the ratio between my cyclesRunning and cyclesWaiting\"\n\t\n\t^self cyclesWaiting = 0 ifTrue:[0] ifFalse:[self cyclesRunning / (1 max: self cyclesWaiting) asFloat]! !\n\n!RVMSqueakInterpreterStats methodsFor: 'measuring' stamp: 'dmu 9/17/2010 15:21'!\nmsRunWaitRatio\n\t\"Answer the ratio between my millisecondsRunning and millisecondsWaiting\"\n\t\n\t^self millisecondsWaiting = 0 ifTrue:[0] ifFalse:[self millisecondsRunning / (1 max: self millisecondsWaiting) asFloat]! !\n\n!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'dmu 8/15/2008 21:27'!\nbytecodesExecuted\n\t\"Answer the number of bytecodes processed since last query\"\n\tbytecodesExecuted isNil ifTrue:[^0].\n\t^bytecodesExecuted! !\n\n!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'dmu 8/15/2008 21:27'!\nbytecodesExecuted: count\n\t\"Set the number of bytecodes processed since last query\"\n\tbytecodesExecuted := count! !\n\n!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:02'!\ncontextChangeCount\n\t\"Answer the value of contextChangeCount\"\n\n\tcontextChangeCount isNil ifTrue:[self contextChangeCount: 0].\n\t^contextChangeCount! !\n\n!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'dmu 1/1/1970 00:10'!\ncontextChangeCount: anObject\n\t\"Set the value of contextChangeCount\"\n\n\tcontextChangeCount := anObject! !\n\n!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:02'!\ncyclesRunning\n\t\"Answer the value of cyclesRunning\"\n\n\tcyclesRunning isNil ifTrue:[self cyclesRunning: 0].\n\t^cyclesRunning! !\n\n!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 18:13'!\ncyclesRunning: anObject\n\t\"Set the value of cyclesRunning\"\n\n\tcyclesRunning := anObject! !\n\n!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:02'!\ncyclesWaiting\n\t\"Answer the value of cyclesWaiting\"\n\n\tcyclesWaiting isNil ifTrue:[self cyclesWaiting: 0].\n\t^cyclesWaiting! !\n\n!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 18:13'!\ncyclesWaiting: anObject\n\t\"Set the value of cyclesWaiting\"\n\n\tcyclesWaiting := anObject! !\n\n!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'dmu 1/1/1970 00:03'!\ninterruptCheckCount\n^ interruptCheckCount! !\n\n!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'dmu 1/1/1970 00:03'!\ninterruptCheckCount: x\n interruptCheckCount := x! !\n\n!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:03'!\nmillisecondsRunning\n\t\"Answer the value of millisecondsRunning\"\n\n\tmillisecondsRunning isNil ifTrue:[self millisecondsRunning: 0].\n\t^millisecondsRunning! !\n\n!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'dmu 8/15/2008 21:24'!\nmillisecondsRunning: anObject\n\t\"Set the value of msRunning\"\n\n\tmillisecondsRunning := anObject! !\n\n!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:01'!\nmillisecondsWaiting\n\t\"Answer the value of msWaiting\"\n\n\tmillisecondsWaiting isNil ifTrue:[self millisecondsWaiting: 0].\n\t^millisecondsWaiting! !\n\n!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'dmu 8/15/2008 21:25'!\nmillisecondsWaiting: anObject\n\t\"Set the value of msWaiting\"\n\n\tmillisecondsWaiting := anObject! !\n\n!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'dmu 1/1/1970 00:04'!\nunforcedInterruptCheckCount\n ^ unforcedInterruptCheckCount! !\n\n!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'dmu 1/1/1970 00:03'!\nunforcedInterruptCheckCount: x\n unforcedInterruptCheckCount := x! !\n\n!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:03'!\nyieldCount\n\t\"Answer the value of yieldCount\"\n\n\tyieldCount isNil ifTrue:[self yieldCount: 0].\n\t^yieldCount! !\n\n!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'ssa 8/13/2008 18:13'!\nyieldCount: anObject\n\t\"Set the value of yieldCount\"\n\n\tyieldCount := anObject! !\n\n!RVMSqueakInterpreterStats methodsFor: 'accessing' stamp: 'dmu 9/17/2010 15:21'!\nyieldFrequency\n\t\"Answer the value of yieldCount/contextChangeCount\"\n\t^self  contextChangeCount = 0 ifTrue: [0] ifFalse: [(self yieldCount / (1 max: self contextChangeCount)) asFloat]! !\n\n!RVMStandardSystemView methodsFor: 'displaying' stamp: 'ssa 8/20/2008 19:15'!\ndisplayLabelText\n\t\"The label goes in the center of the window\"\n\t| labelRect |\n\tlabelText foregroundColor: Color black\n\t\t\tbackgroundColor: self labelColor.\n\tlabelRect := self labelTextRegion.\n\tDisplay fill: (labelRect expandBy: 3@0) fillColor: self labelColor.\n\tlabelText displayOn: Display at: labelRect topLeft clippingBox: labelRect\n\t\t\trule: labelText rule fillColor: labelText fillColor.\n\tlabelText destinationForm: nil! !\n\n!RVMStandardSystemView methodsFor: 'displaying' stamp: 'ssa 1/1/1970 00:02'!\ndisplayView\n\tself okToDisplay: true.\n\tsuper displayView! !\n\n!RVMStandardSystemView methodsFor: 'displaying' stamp: 'ssa 1/1/1970 00:21'!\ndontDisplayWhile: aBlock\n\t\"Switch my okToDisplay flag off during this block\"\n\t\n\tself okToDisplay: false.\n\taBlock value.\n\tself okToDisplay: true.\n\tself displayView! !\n\n!RVMStandardSystemView methodsFor: 'displaying' stamp: 'ssa 1/1/1970 00:21'!\nerase\n\tself okToDisplay: false.\n\t^super erase! !\n\n!RVMStandardSystemView methodsFor: 'displaying' stamp: 'ssa 1/1/1970 00:21'!\nokToDisplay: aBoolean\n\tself subViews do:[:v| v isRVMView ifTrue:[v okToDisplay: aBoolean]].\n! !\n\n!RVMStandardSystemView methodsFor: 'framing' stamp: 'ssa 1/1/1970 00:24'!\nconstrainFrame: aRectangle\n\t\"Constrain aRectangle, to the minimum and maximum size\n\tfor this window\"\n\n   | adjustmentForLabel bWidth |\nbWidth _ labelFrame borderWidth.\n(bWidth isKindOf: Rectangle) ifTrue:[bWidth _ bWidth origin x].\n   adjustmentForLabel := 0 @ (labelFrame height  - bWidth).\n\t^ aRectangle origin extent:\n\t\t((aRectangle extent max: minimumSize + adjustmentForLabel)\n\t\t      min: maximumSize + adjustmentForLabel).! !\n\n!RVMStandardSystemView methodsFor: 'framing' stamp: 'ssa 1/1/1970 00:51'!\ninitialExtent\n\n\t^self minimumSize! !\n\n!RVMStandardSystemView methodsFor: 'framing' stamp: 'ssa 1/1/1970 00:25'!\nnewFrame\n\n\tself subViews do:[:v| v isRVMView ifTrue:[v  newFrame]]! !\n\n!RVMStandardSystemView methodsFor: 'framing' stamp: 'ssa 1/1/1970 00:15'!\nnewFrame: frameChangeBlock\n\n\tsuper newFrame: frameChangeBlock.\n\tself subViews do:[:v| v isRVMView ifTrue:[v  newFrame]]! !\n\n!RVMStandardSystemView methodsFor: 'framing' stamp: 'ssa 1/1/1970 00:14'!\nresizeInitially\n\t\"Determine the rectangular area for the receiver, adjusted to the \n\tminimum and maximum sizes.\"\n\tself resizeTo: self initialFrame.\n\tself subViews do:[:v| v isRVMView ifTrue:[v  firstFrame]]\n! !\n\n!RVMStandardSystemView methodsFor: 'accessing' stamp: 'ssa 10/4/2008 08:29'!\nsubViews: aCollection.\n\n\tsubViews _ aCollection! !\n\n!RVMStripChartController methodsFor: 'menu messages' stamp: 'ssa 1/1/1970 00:56'!\neraseStrip\n\n\tself view traces do:[:trace| trace removeAllData].\n\tself view canvas:nil.\n\tself view displayView! !\n\n!RVMStripChartController methodsFor: 'menu messages' stamp: 'ssa 1/1/1970 01:00'!\ninspectScaler\n\n\tself view traces first scaler inspect! !\n\n!RVMStripChartController methodsFor: 'menu messages' stamp: 'ssa 1/1/1970 12:59'!\nmuteAll\n\n\tself view traces do:[:trace| trace mute].\n\tself view topView allSubViews  do:[:v|( v isKindOf: RVMCheckBoxOnlyView) ifTrue:[v  update:#checked]]! !\n\n!RVMStripChartController methodsFor: 'menu messages' stamp: 'ssa 10/20/2008 09:02'!\nspawnUnmuted\n\n\t| unmutes |\n\tunmutes _ self view traces select:[:trace| trace muted not].\n\tself view okToDisplay: true.\n\tRVMStripChartView openOnTraces: unmutes deepCopy titled: 'Selected traces'! !\n\n!RVMStripChartController methodsFor: 'menu messages' stamp: 'ssa 1/1/1970 12:59'!\nunmuteAll\n\n\tself view traces do:[:trace| trace unmute].\n\tself view topView allSubViews  do:[:v|( v isKindOf: RVMCheckBoxOnlyView) ifTrue:[v  update:#checked]]! !\n\n!RVMStripChartController methodsFor: 'controlling' stamp: 'ssa 10/20/2008 08:21'!\nyellowButtonActivity\n\t| menu answer |\n\tself view dontDisplayWhile:[\n\tSensor yellowButtonPressed \n\t\tifTrue: [menu := CustomMenu new.\n\t\t\t\"menu add: 'inspect scaler' action: #inspectScaler.\"\n\t\t\tmenu add: 'mute all' action: #muteAll.\n\t\t\tmenu add: 'unmute all' action: #unmuteAll.\n\t\t\tmenu add: 'spawn unmuted' action: #spawnUnmuted.\n\t\t\tmenu addLine.\n\t\t\tmenu add: 'erase strip' action: #eraseStrip.\n\t\t\tanswer := menu startUp: #eraseStrip withCaption: nil at: Sensor cursorPoint.\n\t\t\tanswer notNil ifTrue:[\n\t\t\t\tself perform: answer]]]! !\n\n!RVMStripChartScaleController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 00:33'!\naddCoreTrace\n\t| menu selectedAspect |\n\tself view topView dontDisplayWhile:[\nmenu := CustomMenu new.\n RVMMulticoreSample coreAspects do:[:aspect|\n\t\t\tmenu add:  aspect action: aspect].\n\t\t\tselectedAspect := menu startUp: nil withCaption: 'Select a core aspect to trace' at: Sensor cursorPoint.\n\t\t\tselectedAspect notNil ifTrue:[ self view stripChart addCoreTraceForAspect: selectedAspect coreIndex: RVMMonitor coreIndexFromUser]].\n\t\t\tself view stripChart rebuildAll. \n\t\t\t! !\n\n!RVMStripChartScaleController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 00:36'!\naddSystemTrace\n\t| menu selectedAspect |\n\tself view topView dontDisplayWhile:[\nmenu := CustomMenu new.\n RVMMulticoreSample systemAspects do:[:aspect|\n\t\t\tmenu add:  aspect action: aspect].\n\t\t\tselectedAspect := menu startUp: nil withCaption: 'Select a system aspect to trace' at: Sensor cursorPoint.\n\t\t\tselectedAspect notNil ifTrue:[ self view stripChart addSystemTraceForAspect: selectedAspect]].\n\t\t\tself view stripChart rebuildAll. \n! !\n\n!RVMStripChartScaleController methodsFor: 'controlling' stamp: 'ssa 10/3/2008 23:12'!\nchangeAspect\n\n\t| menu answer newAspect |\nself view topView dontDisplayWhile:[\n\t\tmenu := CustomMenu new.\n\tmenu add: 'System aspects' action: #system.\n\tmenu add: 'Core aspects' action: #core.\n\tmenu add: 'Test System Aspects' action: #testSystem.\n\tmenu add: 'Test Core Aspects' action: #testCore.\n\tanswer := menu startUp: nil withCaption: 'What kind of aspect would you like to monitor?' at: Sensor cursorPoint.\n\tanswer isNil ifTrue:[^self].\n\tnewAspect _ RVMMulticoreSample aspectFromUserUnder: answer.\n\tnewAspect isNil ifTrue:[^self].\n\tnewAspect = self view stripChart traces first aspect ifTrue:[^self].\n\tself view stripChart removeAllTraces.\n\t(#(testCore core) includes: answer)\n\t\tifTrue:[self view stripChart addCoreTraceForAspect: newAspect coreIndex: RVMMonitor coreIndexFromUser]\n\t\tifFalse:[self view stripChart addSystemTraceForAspect: newAspect].\n\tself view currentTrace: self view stripChart traces first].\n\tself view hear: nil.\n\tself view stripChart newFrame.! !\n\n!RVMStripChartScaleController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 00:31'!\nchangeScaleAspect\n\t| menu selectedTrace |\n\tself view topView dontDisplayWhile:[\nmenu := CustomMenu new.\n self view stripChart traces do:[:trace|\n\t\t\tmenu add: trace aspect action: trace].\n\t\t\tselectedTrace := menu startUp: self view currentAspect withCaption: 'Show scale for this aspect:' at: Sensor cursorPoint.\n\t\t\tselectedTrace notNil ifTrue:[ self view currentTrace: selectedTrace]].\n\t\t\tself view hear: nil! !\n\n!RVMStripChartScaleController methodsFor: 'controlling' stamp: 'ssa 11/11/2008 22:06'!\nredButtonActivity\n\t\n\t((self view adjustScaleBox translateBy: self view insetDisplayBox origin)  containsPoint: Sensor cursorPoint) ifTrue:[Sensor waitNoButton.\n\t\tself spawnScaleAdjuster]! !\n\n!RVMStripChartScaleController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 00:08'!\nremoveOtherTraces\n\t| menu selectedTrace |\n\tself view topView dontDisplayWhile:[\nmenu := CustomMenu new.\n self view stripChart traces do:[:trace|\n\t\t\tmenu add: trace aspect action: trace].\n\t\t\tselectedTrace := menu startUp: self view currentAspect withCaption: 'Remove all traces except:' at: Sensor cursorPoint.\n\t\t\tselectedTrace notNil ifTrue:[ self view stripChart removeTraces: (self view stripChart traces copyWithout: selectedTrace).\n\t\t\t\tself view currentTrace: selectedTrace]].\n\t\t\tself view stripChart rebuildAll. \n! !\n\n!RVMStripChartScaleController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 00:07'!\nremoveTrace\n\t| menu selectedTrace |\n\tself view topView dontDisplayWhile:[\nmenu := CustomMenu new.\n self view stripChart traces do:[:trace|\n\t\t\tmenu add: trace aspect action: trace].\n\t\t\tselectedTrace := menu startUp: self view currentAspect withCaption: 'Select trace to remove:' at: Sensor cursorPoint.\n\t\t\tselectedTrace notNil ifTrue:[ self view stripChart removeTrace: selectedTrace.\n\t\t\t\tself view currentTrace = selectedTrace ifTrue:[self view currentTrace: nil]].\n\t\t\t].\n\t\t\tself view stripChart rebuildAll. \n! !\n\n!RVMStripChartScaleController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 00:05'!\nscalerForThisAspect\n\n\tself view okToDisplay:true.\n\tRVMColoredDataScalerView openOnAspect:  self view currentTrace aspect! !\n\n!RVMStripChartScaleController methodsFor: 'controlling' stamp: 'ssa 5/12/2010 10:20'!\nspawnScaleAdjuster\n\n\t|  maxView minView topView resetScaleButton setToObservedButton autoScaleCheckBox height |\n\tmaxView _ RVMValueEditorView  on: view currentTrace scaler valueGetter: [view currentTrace scaler max] valueSetter:[:v|view currentTrace scaler setMax:v. view drawCanvas; displayView] label:'max: '.\n\tmaxView lockGetter:#maxLocked; lockSetter:#maxLocked:.\n\tminView _ RVMValueEditorView  on: view currentTrace scaler valueGetter: [view currentTrace scaler min] valueSetter:[:v|view currentTrace scaler setMin:v.  view drawCanvas; displayView] label:'min: '.\n\tminView lockGetter:#minLocked; lockSetter:#minLocked:.\n\tresetScaleButton _ RVMButtonView label:'Reset scale to default' action:[view currentTrace scaler resetScaling.  view drawCanvas; displayView.  minView hear:nil.  maxView hear:nil].\n\tsetToObservedButton _ RVMButtonView label:'Set scale to observed values' action:[view currentTrace scaler setRangeToObserved.  view drawCanvas; displayView.  minView hear:nil.  maxView hear:nil].\n\tautoScaleCheckBox _ RVMCheckBoxView on: view currentTrace scaler label: 'Automatic Scaling' checkState: [view currentTrace scaler automaticScaling] whenChecked: [view currentTrace scaler automatic.  view drawCanvas; displayView.  minView hear:nil.  maxView hear:nil] whenUnchecked: [view currentTrace scaler manual. view drawCanvas; displayView.  minView hear:nil.  maxView hear:nil] monitor: true.\n\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\ttopView addSubView: minView.\n\ttopView addSubView: maxView below:  minView.\n\ttopView addSubView: resetScaleButton below:  maxView.\n\ttopView addSubView: setToObservedButton below:  resetScaleButton.\n\ttopView addSubView: autoScaleCheckBox below:  setToObservedButton.\n\tRVMMonitor forgetAll:{resetScaleButton. setToObservedButton. autoScaleCheckBox}.\n\ttopView label: view currentAspect.\n\theight _ topView subViews size * 26.\n\ttopView minimumSize:200@height.\n\ttopView maximumSize: 200@height.\n\ttopView controller open! !\n\n!RVMStripChartScaleController methodsFor: 'controlling' stamp: 'ssa 10/4/2008 08:19'!\nyellowButtonActivity\n\t| menu answer onlyOneTrace |\n\tonlyOneTrace _ self view stripChart traces size = 1.\n\tself view topView dontDisplayWhile:[\n\tmenu := CustomMenu new.\n \tonlyOneTrace ifTrue:[menu add: 'Change aspect' action: #changeAspect.\n \t\tmenu addLine].\n \tonlyOneTrace ifFalse:[menu add: 'Show other scale' action: #changeScaleAspect.\n \t\tmenu addLine].\n \tmenu add: 'Add system aspect trace' action: #addSystemTrace.\n \tmenu add: 'Add core aspect trace' action: #addCoreTrace.\n\tonlyOneTrace ifFalse:[menu addLine.\n \t\tmenu add: 'Remove trace' action: #removeTrace.\n\t\tmenu add: 'Remove other traces' action: #removeOtherTraces].\n\tanswer := menu startUp: nil withCaption: '' at: Sensor cursorPoint].\n\tanswer notNil ifTrue:[self perform: answer]! !\n\n!RVMStripChartScaleController methodsFor: 'view resizing' stamp: 'ssa 1/1/1970 00:38'!\nadjustViewSizes\n\tself view topView unlock.\n\tself view topView display! !\n\n!RVMStripChartScaleView methodsFor: 'accessing' stamp: 'ssa 11/11/2008 22:02'!\nadjustScaleBox\n\t\"Answer the value of adjustScaleBox\"\n\n\tadjustScaleBox isNil ifTrue:[self adjustScaleBox: self insetDisplayBox].\n\t^ adjustScaleBox! !\n\n!RVMStripChartScaleView methodsFor: 'accessing' stamp: 'ssa 11/11/2008 22:02'!\nadjustScaleBox: anObject\n\t\"Set the value of adjustScaleBox\"\n\n\tadjustScaleBox _ anObject! !\n\n!RVMStripChartScaleView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:11'!\ncurrentAspect\n\t\"Answer the value of currentAspect\"\n\n\t^self currentTrace aspect! !\n\n!RVMStripChartScaleView methodsFor: 'accessing' stamp: 'ssa 10/3/2008 23:17'!\ncurrentAspectLabel\n\t\"Answer a good label for this aspect\"\n\n\t^self currentTrace aspectLabel! !\n\n!RVMStripChartScaleView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:12'!\ncurrentColor\n\t\"Answer the value of currentColor\"\n\n\t^self currentTrace color! !\n\n!RVMStripChartScaleView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:12'!\ncurrentTrace\n\t\"Answer the value of currentTrace\"\n\n\tcurrentTrace isNil ifTrue:[self currentTrace: self stripChart traces first].\n\t^ currentTrace! !\n\n!RVMStripChartScaleView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:11'!\ncurrentTrace: anObject\n\t\"Set the value of currentTrace\"\n\n\tcurrentTrace _ anObject! !\n\n!RVMStripChartScaleView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:10'!\nstripChart\n\t\"Answer the value of stripChart\"\n\n\tstripChart isNil ifTrue:[self stripChart: (RVMStripChartView trace:RVMCoreAspectTrace exampleInstance)].\n\t^ stripChart! !\n\n!RVMStripChartScaleView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:03'!\nstripChart: anObject\n\t\"Set the value of stripChart\"\n\n\tstripChart _ anObject! !\n\n!RVMStripChartScaleView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:57'!\nuiHolder\n\t\"Answer the value of uiHolder\"\n\n\tuiHolder isNil ifTrue:[self uiHolder: nil].\n\t^ uiHolder! !\n\n!RVMStripChartScaleView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:57'!\nuiHolder: anObject\n\t\"Set the value of uiHolder\"\n\n\tuiHolder _ anObject! !\n\n!RVMStripChartScaleView methodsFor: 'drawing' stamp: 'ssa 11/11/2008 21:59'!\nadjustScaleIcon\n^((ColorForm\n\textent: 16@31\n\tdepth: 8\n\tfromArray: #( 0 0 0 0 0 0 169614364 622594560 0 0 1694498815 4294913536 0 0 1845490943 4294915840 0 0 0 3506384384 0 0 0 3506386688 73 1677721600 0 3657379328 163 3642490880 0 3506386688 9716 4287692800 172 4110364160 46591 4294913536 208 4110366464 4259839 4294936576 0 3506384384 8973264 4106150400 0 3657381632 6558618 3942664503 0 3506384384 154 3942645760 0 3657381632 154 3942645760 25700 3808374272 154 3942645760 60415 4294915840 154 3942645760 18761 3808374272 154 3942645760 0 3506386688 2424986 3942648357 0 3657379328 11304867 3947480869 0 3506386688 7798783 4294948096 0 3506384384 1300991 4294925056 217 4294915840 25855 4291821568 145 3959369216 199 4098424832 0 3657381632 118 2432696320 0 3506384384 28 620756992 0 3506386688 0 0 0 3657379328 0 0 1541003737 4110366464 0 0 1694498815 4294913536 0 0 321795886 1227753984 0 0 0 0)\n\toffset: 0@0)\n\tcolorsFromArray: #(#(1.0 1.0 1.0) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.94 0.94 0.94) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.847 0.847 0.847) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.815 0.815 0.815) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.784 0.784 0.784) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.753 0.753 0.753) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.721 0.721 0.721) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.69 0.69 0.69) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.658 0.658 0.658) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.627 0.627 0.627) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.595 0.595 0.595) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.501 0.501 0.501) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.439 0.439 0.439) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.408 0.408 0.408) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.376 0.376 0.376) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.345 0.345 0.345) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.313 0.313 0.313) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.282 0.282 0.282) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.25 0.25 0.25) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.188 0.188 0.188) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.156 0.156 0.156) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.125 0.125 0.125) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.094 0.094 0.094) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.063 0.063 0.063) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.031 0.031 0.031) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0)  ))! !\n\n!RVMStripChartScaleView methodsFor: 'drawing' stamp: 'ssa 11/11/2008 22:05'!\ndrawAdjustScaleIcon\n\t| adjustIcon origin |\n.\tadjustIcon _ self adjustScaleIcon.\n\tadjustIcon _ adjustIcon scaledToSize: adjustIcon extent * 0.75.\n\torigin _ self canvas boundingBox center - adjustIcon boundingBox extent - (0@6).\n\tadjustIcon displayOn: self canvas at: origin.\n\tself adjustScaleBox:(origin extent: adjustIcon extent)! !\n\n!RVMStripChartScaleView methodsFor: 'drawing' stamp: 'ssa 11/11/2008 22:03'!\ndrawCanvas\n\t| scaler maxLabel minLabel midLabel  box ticLength ticOffset topY midY bottomY leftX rightX margin aspectLabel |\n\tself eraseCanvas.\n\tscaler _ self currentTrace scaler.\n\taspectLabel _ self currentAspectLabel asDisplayText asParagraph asForm rotateBy: #left centerAt: 0@0.\n\tmaxLabel _ scaler max printShowingMax3Digits asDisplayText.\n\tminLabel _ scaler min printShowingMax3Digits asDisplayText.\t\n\tmidLabel _ (scaler range / 2 + scaler min) printShowingMax3Digits asDisplayText.\n\tmaxLabel foregroundColor: self currentColor backgroundColor: Color transparent.\n\tmidLabel foregroundColor: self currentColor backgroundColor: Color transparent.\n\tminLabel foregroundColor: self currentColor backgroundColor: Color transparent.\n\tbox _ self canvas boundingBox.\n\tticLength _ 4.\n\tticOffset _ maxLabel height // 2.\n\tmargin _ 2.\n\taspectLabel align: aspectLabel boundingBox leftCenter with: box leftCenter.\n\taspectLabel displayOn: self canvas at: 0@0 clippingBox: box.\n\tmaxLabel align: maxLabel boundingBox topRight with: box topRight - (ticLength+margin+1@0).\n\tmaxLabel displayOn: self canvas.\n\tmidLabel align: midLabel boundingBox rightCenter with: box rightCenter - (ticLength+margin+1@0).\n\tmidLabel displayOn: self canvas.\n\tminLabel align: minLabel boundingBox bottomRight with: box bottomRight -(ticLength+margin+1@0).\n\tminLabel displayOn: self canvas.\n\ttopY _ box topRight y .\n\tmidY _ box center y.\n\tbottomY _ box bottomRight y - 2.\n\tleftX _ box topRight x - ticLength - margin.\n\trightX _ box corner x - margin.\n\tself canvas fill: (rightX - 1@topY corner: rightX@bottomY) fillColor: self currentColor.\t\n\tself canvas fill: (leftX@topY extent: ticLength@1) fillColor: self currentColor.\n\tself canvas fill: (leftX@(topY+midY//2) extent: ticLength@1) fillColor: self currentColor.\n\tself canvas fill: (leftX@midY extent: ticLength@1) fillColor: self currentColor.\n\tself canvas fill: (leftX@(midY+bottomY//2) extent: ticLength@1) fillColor: self currentColor.\n\tself canvas fill: (leftX@bottomY extent: ticLength@1) fillColor: self currentColor.\n\tself drawAdjustScaleIcon! !\n\n!RVMStripChartScaleView methodsFor: 'framing' stamp: 'ssa 1/1/1970 00:24'!\nnewFrame\n\tself canvas: nil.\n\tself extent: self insetDisplayBox extent.\n\tself drawCanvas.\n\tself displayView! !\n\n!RVMStripChartScaleView methodsFor: 'controller access' stamp: 'ssa 1/1/1970 00:04'!\ndefaultControllerClass\n\n\t^RVMStripChartScaleController! !\n\n!RVMStripChartScaleView methodsFor: 'listening' stamp: 'ssa 1/1/1970 00:05'!\nhear: something\n\t\"Update my traces and redisplay\"\n\tself drawCanvas.\n\tself displayView! !\n\n!RVMStripChartScaleView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:22'!\nexample\n\t\"RVMStripChartScaleView example\"\n\t\n\tself new demo! !\n\n!RVMStripChartScaleView class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:58'!\nstripChart: aStripChart uiHolder: aUIHolder\n\n\t| view |\n\tview _ self new.\n\tview stripChart: aStripChart.\n\tview uiHolder: aUIHolder.\n\t^view! !\n\n!RVMStripChartTrace methodsFor: 'accessing' stamp: 'ssa 10/10/2008 19:23'!\ncolor\n\t\"Answer the value of color\"\n\n\tcolor isNil ifTrue:[self color: Color black].\n\t^ color! !\n\n!RVMStripChartTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:02'!\ncolor: anObject\n\t\"Set the value of color\"\n\n\tcolor _ anObject.\n\tcolor notNil ifTrue:[self pen color: color]! !\n\n!RVMStripChartTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nmax\n\t\"Answer my scaler max.\"\n\t^self scaler max! !\n\n!RVMStripChartTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nmax: aValue\n\t\"Set my scaler max.\"\n\tself scaler max: aValue! !\n\n!RVMStripChartTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nmin\n\t\"Answer my scaler min.\"\n\t^self scaler min! !\n\n!RVMStripChartTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nmin: aValue\n\t\"Set my scaler min.\"\n\tself scaler min: aValue! !\n\n!RVMStripChartTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:24'!\nmuted\n\t\"Answer the value of muted\"\n\n\tmuted isNil ifTrue:[self muted: false].\n\t^ muted! !\n\n!RVMStripChartTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:24'!\nmuted: anObject\n\t\"Set the value of muted\"\n\n\tmuted _ anObject! !\n\n!RVMStripChartTrace methodsFor: 'accessing' stamp: 'ssa 10/10/2008 19:22'!\npen\n\t\"Answer the value of pen\"\n\n\t| bic |\n\tpen isNil ifTrue:[bic _ Pen new.\n\t\tbic defaultNib:1.\n\t\tbic combinationRule: Form over.\n\t\tself pen: bic].\n\t^ pen! !\n\n!RVMStripChartTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:01'!\npen: anObject\n\t\"Set the value of pen\"\n\n\tpen _ anObject! !\n\n!RVMStripChartTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:07'!\nrawData\n\t\"Answer the value of rawData\"\n\n\trawData isNil ifTrue:[self rawData: (RVMCircularCollection new:10)].\n\t^ rawData! !\n\n!RVMStripChartTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:51'!\nrawData: anObject\n\t\"Set the value of rawData\"\n\n\trawData _ anObject.\n\tscaledData _ rawData collect:[:datum| self scaler scale: datum].! !\n\n!RVMStripChartTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:09'!\nscaledData\n\t\"Answer the value of scaledData\"\n\n\tscaledData isNil ifTrue:[self scaledData: self initialScaledData].\n\t^ scaledData! !\n\n!RVMStripChartTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:45'!\nscaledData: anObject\n\t\"Set the value of scaledData\"\n\n\tscaledData _ anObject! !\n\n!RVMStripChartTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:45'!\nscaler\n\t\"Answer the value of scaler\"\n\n\tscaler isNil ifTrue:[self scaler: nil].\n\t^ scaler! !\n\n!RVMStripChartTrace methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:04'!\nscaler: anObject\n\t\"Set the value of scaler\"\n\n\tscaler _ anObject.\n\tscaler notNil ifTrue:[self removeAllData]! !\n\n!RVMStripChartTrace methodsFor: 'add/remove data' stamp: 'ssa 1/1/1970 00:53'!\nadd: aValue\n\t\"Add this value to the end of my data\"\n\tself rawData add: aValue.\n\tself scaledData add: (self scaler scale: aValue)! !\n\n!RVMStripChartTrace methodsFor: 'add/remove data' stamp: 'ssa 1/1/1970 01:25'!\naddData\n\t\"do nothing, only works in subclasses\"! !\n\n!RVMStripChartTrace methodsFor: 'add/remove data' stamp: 'ssa 1/1/1970 00:25'!\ninitialScaledData\n\t\"Generate the scaled data by scaling the rawData\"\n\t^self rawData collect:[:datum| self scaler scale: datum]! !\n\n!RVMStripChartTrace methodsFor: 'add/remove data' stamp: 'ssa 1/1/1970 00:41'!\nremoveAllData\n\n\tself rawData removeAll.\n\tself scaledData removeAll! !\n\n!RVMStripChartTrace methodsFor: 'add/remove data' stamp: 'ssa 1/1/1970 01:13'!\nresizeTo: anInteger\n\n\t(self rawData isKindOf: RVMCircularCollection) ifTrue:[\n\tself rawData size: anInteger.\n\tself scaledData size: anInteger]! !\n\n!RVMStripChartTrace methodsFor: 'drawing' stamp: 'ssa 1/1/1970 00:12'!\ndrawLastOn: aColorForm\n\t\"Draw the last line segment on this canvas using this pen.\"\n\t| yScale xSpacing x |\n\tself muted ifTrue:[^self].\n\tself pen destForm: aColorForm.\n\tself scaledData numberOfElements = 1 ifTrue:[^self drawOn: aColorForm].\n\tyScale _ aColorForm height / 100.\n\txSpacing _ 2.\n\tx _ self scaledData numberOfElements  - 1* xSpacing.\n\tself pen place: x@ (aColorForm height -((self scaledData at: self scaledData numberOfElements - 1) * yScale)).\n\tself pen goto: x+ xSpacing @ (aColorForm height -((self scaledData at: self scaledData numberOfElements) * yScale)).\n! !\n\n!RVMStripChartTrace methodsFor: 'drawing' stamp: 'ssa 1/1/1970 00:25'!\ndrawOn: aColorForm\n\n\t| yScale xSpacing x first |\n\tself muted ifTrue:[^self].\n\tself pen destForm: aColorForm.\n\tyScale _ aColorForm height / 100.\n\txSpacing _ 2.\n\tx _ 0.\n\tfirst _ true.\n\tself scaledData do:[:datum|\n\t\tfirst ifTrue:[self pen place: x@ (aColorForm height -(datum * yScale)). first _ false].\n\t\tself pen goto: x@ (aColorForm height -(datum * yScale)).\n\t\tx _ x + xSpacing.\n\t\tx < 0 ifTrue:[^self]]! !\n\n!RVMStripChartTrace methodsFor: 'drawing' stamp: 'ssa 1/1/1970 00:28'!\nmute\n\n\tself muted: true.! !\n\n!RVMStripChartTrace methodsFor: 'drawing' stamp: 'ssa 1/1/1970 00:11'!\nredrawOn: aColorForm\n\tself scaledData: nil.\n\tself drawOn: aColorForm! !\n\n!RVMStripChartTrace methodsFor: 'drawing' stamp: 'ssa 1/1/1970 00:28'!\nunmute\n\n\tself muted: false.! !\n\n!RVMStripChartTrace methodsFor: 'testing' stamp: 'ssa 1/1/1970 00:04'!\nisEmpty\n\n\t^self rawData isEmpty! !\n\n!RVMStripChartTrace methodsFor: 'testing' stamp: 'ssa 1/1/1970 00:04'!\nisFull\n\n\t^self rawData isFull! !\n\n!RVMStripChartTrace methodsFor: 'user interface' stamp: 'ssa 1/1/1970 00:21'!\ncolorButton\n\t\"Answer a color button connect to my color\"\n\t^RVMColorButtonView on: self colorGetter:#color colorSetter:#color:! !\n\n!RVMStripChartTrace methodsFor: 'user interface' stamp: 'ssa 1/1/1970 00:23'!\nminmaxButton\n\t\"Answer a minmax button connect to my scaler's minmax\"\n\t^RVMMinMaxView on: self  getMin: #min setMin: #min: getMax: #max setMax: #max:! !\n\n!RVMStripChartTrace methodsFor: 'user interface' stamp: 'ssa 5/12/2010 10:13'!\nmuteButton\n\t\"Answer a color button connect to my color\"\n\t| v |\n\tv _ RVMCheckBoxOnlyView on: self label: '' checkState: [self muted not] whenChecked: [self unmute] whenUnchecked: [self mute].\n\tRVMMonitor inform: v.\n\t^v! !\n\n!RVMStripChartTrace methodsFor: 'scaling' stamp: 'ssa 10/6/2008 16:29'!\nrescale\n\t\"Reset my scaler and recompute my scaledData\"\n\tself scaler resetScaling.\n\tself scaledData:nil.! !\n\n!RVMStripChartTrace class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:50'!\ndata: someData min: minValue max: maxValue color: aColor\n\t\"Answer a new strip chart trace with this data and parameters.\n\tNote that the type of collection used for someData will also be used for scaled data.\n\tUse OrderedCollection for variable sized data, CircularCollection for fixed size.\"\n\t| trace |\n\ttrace _ self new.\n\ttrace\n\t\tscaler: (RVMDataScaler min: minValue max: maxValue);\n\t\trawData: someData;\n\t\tcolor: aColor.\n\t^trace! !\n\n!RVMStripChartTrace class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 01:29'!\nsize: anInteger min: minValue max: maxValue color: aColor\n\t\"Answer a new strip chart trace with this size buffer and parameters\"\n\t| trace |\n\ttrace _ self new.\n\ttrace\n\t\tscaler: (RVMDataScaler min: minValue max: maxValue);\n\t\trawData: (RVMCircularCollection new: anInteger);\n\t\tcolor: aColor.\n\t^trace! !\n\n!RVMStripChartTrace class methodsFor: 'examples' stamp: 'ssa 10/18/2008 23:18'!\nexampleCircularInstance\n\t\"RVMStripChartTrace exampleCircularInstance\"\n\t\n\t^ self data: #(1 2 3 4 5 6 7 8 9) asCircularCollection min: 0 max: 10 color: Color blue! !\n\n!RVMStripChartTrace class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:55'!\nexampleInstance\n\t\"RVMStripChartTrace exampleInstance\"\n\t\n\t^ self data: #(1 2 3 4 5 6 5 4 3 2 1) min: 0 max: 10 color: Color blue! !\n\n!RVMStripChartTrace class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:14'!\nrandomInstance\n\t\"RVMStripChartTrace randomInstance\"\n\t\n\t| data |\n\tdata _ OrderedCollection new.\n\t100 timesRepeat:[data add: 10 atRandom].\n\t^ self data: data min: 0 max: 10 color: Color random! !\n\n!RVMStripChartView methodsFor: 'drawing' stamp: 'ssa 10/2/2008 19:21'!\ndrawCanvas\n\n\tself eraseCanvas.\n\tself traces do:[:trace|\n\t\ttrace drawOn: self canvas]! !\n\n!RVMStripChartView methodsFor: 'drawing' stamp: 'ssa 10/3/2008 23:13'!\ndrawFastOnCanvas\n\t| box |\n\tself traces isEmpty ifTrue:[^self canvas fillWhite].\n\tself traces first isFull ifTrue:[self canvas displayOn: self canvas at: -2@0].\n\tbox _ self canvas boundingBox.\n\tself canvas fillWhite: (box topRight - (2@0) extent: 2@ box height).\n\tself traces do:[:trace|\n\t\ttrace drawLastOn: self canvas ]! !\n\n!RVMStripChartView methodsFor: 'drawing' stamp: 'ssa 10/2/2008 19:21'!\nredrawCanvas\n\n\tself eraseCanvas.\n\tself traces do:[:trace|\n\t\ttrace redrawOn: self canvas]! !\n\n!RVMStripChartView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:26'!\ndefaultOffset\n\n\t^self canvas width negated@ 0! !\n\n!RVMStripChartView methodsFor: 'accessing' stamp: 'ssa 10/3/2008 16:09'!\nrescaleCounter\n\t\"Answer the value of rescaleCounter\"\n\n\trescaleCounter isNil ifTrue:[self rescaleCounter: 15].\n\t^ rescaleCounter ! !\n\n!RVMStripChartView methodsFor: 'accessing' stamp: 'ssa 10/3/2008 15:21'!\nrescaleCounter: anObject\n\t\"Set the value of rescaleCounter\"\n\n\trescaleCounter _ anObject! !\n\n!RVMStripChartView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:00'!\ntraces\n\t\"Answer the value of traces\"\n\n\ttraces isNil ifTrue:[self traces: OrderedCollection new].\n\t^ traces! !\n\n!RVMStripChartView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:00'!\ntraces: anObject\n\t\"Set the value of traces\"\n\n\ttraces _ anObject! !\n\n!RVMStripChartView methodsFor: 'framing' stamp: 'ssa 10/8/2008 18:34'!\nfirstFrame\n\t\"First time framed, set my canvas to match my view\"\n\tself canvas: nil.\n\tself extent: self insetDisplayBox extent - (0@2).\n\tself traces do:[:trace| trace resizeTo: self extent x //2].\n\tself drawCanvas.\n! !\n\n!RVMStripChartView methodsFor: 'framing' stamp: 'ssa 10/3/2008 23:23'!\nnewFrame\n\t\"My frame has changed. Reset my canvas to my new size and redraw\"\n\tself canvas: nil.\n\tself extent: self insetDisplayBox extent - (0@2).\n\tself traces do:[:trace| trace resizeTo: self extent x //2].\n\tself drawCanvas.\n\tself displayView! !\n\n!RVMStripChartView methodsFor: 'framing' stamp: 'ssa 10/4/2008 08:28'!\nrebuildAll\n\t|  view subGroups width scaleView scaleWidth topView extraRows |\n\ttopView _ self topView.\n\t(topView allSubViews copyWithout: self) do:[:v| v release].\n\ttopView subViews: (OrderedCollection with: self).\n\ttopView borderWidth:1.\n\twidth _ 400.\n\tview _ self .\n\tscaleWidth _ 60.\n\tsubGroups _ RVMTraceUIHolderView forStripChart: view.\n\tview extent: width - scaleWidth@100.\n\tscaleView _ RVMStripChartScaleView stripChart: view uiHolder:subGroups.\n\textraRows _ self traces size = 1 ifTrue:[0]ifFalse:[subGroups subViews size].\n\ttopView minimumSize: width@(100+(extraRows * 20)).\n\ttopView addSubView: scaleView viewport: (0@0 extent: scaleWidth@100).\n\textraRows > 0 ifTrue:[topView addSubView: subGroups viewport: (0@100 extent: width@(extraRows* 20))].\n\ttopView backgroundColor: Color white.\n\tview borderWidthLeft: 0\n\t\tright: 1\n\t\ttop: 1\n\t\tbottom: 1.\n\tscaleView borderWidthLeft: 1\n\t\tright: 0\n\t\ttop: 1\n\t\tbottom: 1.\n\tsubGroups borderWidth:0.\n\ttopView reframeTo:(topView displayBox origin - (0@(topView labelHeight -2) ) extent: topView minimumSize + (0@topView labelHeight)).\n\tScheduledControllers restore: topView windowBox.\n\t! !\n\n!RVMStripChartView methodsFor: 'listening' stamp: 'ssa 11/11/2008 22:38'!\nhear: something\n\t\"Update my traces and redisplay\"\n\t| outOfRangeTraces |\n\tself rescaleCounter: self rescaleCounter - 1.\n\tself rescaleCounter = 0 ifTrue:[self rescaleCounter:nil.  \n\t\tself traces do:[:trace| trace scaler automaticScaling ifTrue:[trace rescale]]]. \n\tself traces do:[:trace| trace addData].\n\toutOfRangeTraces _ self traces select:[:trace| trace scaler outOfRangeDetected] .\n\toutOfRangeTraces isEmpty ifTrue:[self drawFastOnCanvas.\n\t\t\t^self displayView].\n\tself redrawCanvas.\n\toutOfRangeTraces do:[:trace| trace scaler resetOutOfRangeDetector].\n\tself displayView! !\n\n!RVMStripChartView methodsFor: 'controller access' stamp: 'ssa 1/1/1970 00:38'!\ndefaultControllerClass\n\n\t^RVMStripChartController! !\n\n!RVMStripChartView methodsFor: 'add/remove traces' stamp: 'ssa 10/4/2008 08:18'!\naddCoreTraceForAspect: aSymbol coreIndex: anInteger\n\t\n\t | traceSize existingColors traceColor newTrace |\n\ttraceSize _ self extent x //2.\n\texistingColors _ self traces collect:[:trace| trace color].\n\t[traceColor _ Color random darker.\n\tself traces isEmpty or:[ (existingColors collect:[:color| color diff: traceColor]) asSortedCollection last < 0.7]] whileFalse.\n\tnewTrace _ RVMCoreAspectTrace coreIndex: anInteger aspect: aSymbol size: traceSize color: traceColor.\n\tself traces add: newTrace.\n\tself newFrame! !\n\n!RVMStripChartView methodsFor: 'add/remove traces' stamp: 'ssa 10/3/2008 23:08'!\naddSystemTraceForAspect: aSymbol\n\t\n\t | traceSize existingColors traceColor newTrace |\n\ttraceSize _ self extent x //2.\n\texistingColors _ self traces collect:[:trace| trace color].\n\t[traceColor _ Color random darker.\n\tself traces isEmpty or:[(existingColors collect:[:color| color diff: traceColor]) asSortedCollection last < 0.7]] whileFalse.\n\tnewTrace _ RVMAspectTrace aspect: aSymbol size: traceSize color: traceColor.\n\tself traces add: newTrace.\n\tself newFrame! !\n\n!RVMStripChartView methodsFor: 'add/remove traces' stamp: 'ssa 10/3/2008 22:59'!\nremoveAllTraces\n\t\n\tself traces removeAll: self traces copy.\n! !\n\n!RVMStripChartView methodsFor: 'add/remove traces' stamp: 'ssa 1/1/1970 00:51'!\nremoveTrace: aTrace\n\t\n\tself traces remove: aTrace.\n\tself newFrame! !\n\n!RVMStripChartView methodsFor: 'add/remove traces' stamp: 'ssa 1/1/1970 00:51'!\nremoveTraces: someTraces\n\t\n\tself traces removeAll: someTraces.\n\tself newFrame! !\n\n!RVMStripChartView methodsFor: 'displaying' stamp: 'ssa 10/21/2008 11:32'!\ndisplayView\n\t\"Display my canvas at my offset.\n\tSubclasses should not override this method but should draw on the canvas instead\"\n\tself okToDisplay ifFalse:[^self].\n\tself uncache.\n\tself canvas displayOn: Display at: self insetDisplayBox origin + self offset - (0@2 ) clippingBox: self insetDisplayBox.\n! !\n\n!RVMStripChartView class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:30'!\nopenOnTrace: aTrace\n\t\"RVMStripChartView openOnTrace: RVMAspectTrace exampleInstance\"\n\tself openOnTrace:  aTrace titled:'Multi-aspect Stripchart'\n! !\n\n!RVMStripChartView class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:30'!\nopenOnTrace: aTrace titled: aString\n\t| topView view subGroups width scaleView scaleWidth |\n\ttopView _ RVMStandardSystemView new.\n\ttopView label: aString.\n\ttopView borderWidth:1.\n\twidth _ 400.\n\tview _ self traces: (OrderedCollection with: aTrace).\n\tscaleWidth _ 60.\n\tview extent: width - scaleWidth@100.\n\tscaleView _ RVMStripChartScaleView stripChart: view uiHolder:subGroups.\n\ttopView minimumSize: width@100.\n\ttopView addSubView: view viewport: (scaleWidth@0 extent: width-scaleWidth@100).\n\ttopView addSubView: scaleView viewport: (0@0 extent: scaleWidth@100).\n\ttopView backgroundColor: Color white.\n\tview borderWidthLeft: 0\n\t\tright: 1\n\t\ttop: 1\n\t\tbottom: 1.\n\tscaleView borderWidthLeft: 1\n\t\tright: 0\n\t\ttop: 1\n\t\tbottom: 1.\n\ttopView controller open! !\n\n!RVMStripChartView class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 01:16'!\nopenOnTraces: someTraces\n\t\"RVMCoreAspectTrace exampleView3\"\n\tself openOnTraces: someTraces titled: 'Multi-aspect Stripchart'! !\n\n!RVMStripChartView class methodsFor: 'instance creation' stamp: 'ssa 10/8/2008 19:09'!\nopenOnTraces: someTraces titled: aString\n\t| topView view subGroups width scaleView scaleWidth |\n\tsomeTraces size = 1 ifTrue:[self openOnTrace: someTraces first titled: aString].\n\ttopView _ RVMStandardSystemView new.\n\ttopView label: aString.\n\ttopView borderWidth:1.\n\tsomeTraces size > 2 ifTrue:[width _ 400]ifFalse:[width _ someTraces size + 1 * 150 ].\n\tview _ self traces: someTraces.\n\tscaleWidth _ 60.\n\tsubGroups _ RVMTraceUIHolderView forStripChart: view.\n\tview extent: width - scaleWidth@100.\n\tscaleView _ RVMStripChartScaleView stripChart: view uiHolder:subGroups.\n\ttopView minimumSize: width@(100+(subGroups subViews size + 1 * 20)).\n\ttopView addSubView: view viewport: (scaleWidth@0 extent: width-scaleWidth@100).\n\ttopView addSubView: scaleView viewport: (0@0 extent: scaleWidth@100).\n\ttopView addSubView: subGroups viewport: (0@100 extent: width@(subGroups subViews size* 20)).\n\ttopView backgroundColor: Color white.\n\tview borderWidthLeft: 0\n\t\tright: 1\n\t\ttop: 1\n\t\tbottom: 1.\n\tscaleView borderWidthLeft: 1\n\t\tright: 0\n\t\ttop: 1\n\t\tbottom: 1.\n\tsubGroups borderWidth:0.\n\ttopView controller open! !\n\n!RVMStripChartView class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:10'!\ntrace: aTrace\n\n\t^self traces:(OrderedCollection with: aTrace)! !\n\n!RVMStripChartView class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 01:09'!\ntraces: someTraces\n\n\t| view |\n\tview _ self new.\n\tview traces: someTraces.\n\t^view! !\n\n!RVMStripChartView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:09'!\nexample\n\t\"RVMStripChartView example\"\n\tself openOnTrace: RVMCoreAspectTrace exampleInstance! !\n\n!RVMTest methodsFor: 'logging' stamp: 'dmu 11/11/2009 18:06'!\nlog: aString\n\n\tTranscript cr;show:'log: [',self name,'] ',aString. Transcript cr; cr.\n\tself runLog add: {Time dateAndTimeNow. aString}! !\n\n!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 06:19'!\nassertionBlock\n\t\"Answer the value of assertionBlock\"\n\n\tassertionBlock isNil ifTrue:[self assertionBlock: [:test :outcome| false]].\n\t^ assertionBlock! !\n\n!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 05:46'!\nassertionBlock: anObject\n\t\"Set the value of assertionBlock\"\n\n\tassertionBlock _ anObject! !\n\n!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 06:47'!\nassertions\n\t\"Answer the value of assertions\"\n\n\tassertions isNil ifTrue:[self assertions: OrderedCollection new].\n\t^ assertions! !\n\n!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 06:47'!\nassertions: anObject\n\t\"Set the value of assertions\"\n\n\tassertions _ anObject! !\n\n!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 05:15'!\nenvironment\n\t\"Answer the value of environment\"\n\n\tenvironment isNil ifTrue:[self environment: nil].\n\t^ environment! !\n\n!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 05:15'!\nenvironment: anObject\n\t\"Set the value of environment\"\n\n\tenvironment _ anObject! !\n\n!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 05:15'!\nlastResult\n\t\"Answer the value of lastResult\"\n\n\tlastResult isNil ifTrue:[self lastResult: nil].\n\t^ lastResult! !\n\n!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 05:15'!\nlastResult: anObject\n\t\"Set the value of lastResult\"\n\n\tlastResult _ anObject! !\n\n!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 06:05'!\nname\n\t\"Answer the value of name\"\n\n\tname isNil ifTrue:[self name: 'unnamed'].\n\t^ name! !\n\n!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 06:05'!\nname: anObject\n\t\"Set the value of name\"\n\n\tname _ anObject! !\n\n!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 07:39'!\nresult\n\n\t^self lastResult! !\n\n!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 06:31'!\nrunLog\n\t\"Answer the value of runLog\"\n\n\trunLog isNil ifTrue:[self runLog: OrderedCollection new].\n\t^ runLog! !\n\n!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 06:31'!\nrunLog: anObject\n\t\"Set the value of runLog\"\n\n\trunLog _ anObject! !\n\n!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 08:58'!\nsetUpBlock\n\t\"Answer the value of setUpBlock\"\n\n\tsetUpBlock isNil ifTrue:[self setUpBlock: [:test| ]].\n\t^ setUpBlock! !\n\n!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 05:15'!\nsetUpBlock: anObject\n\t\"Set the value of setUpBlock\"\n\n\tsetUpBlock _ anObject! !\n\n!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 08:58'!\ntearDownBlock\n\t\"Answer the value of tearDownBlock\"\n\n\ttearDownBlock isNil ifTrue:[self tearDownBlock: [:test :env|]].\n\t^ tearDownBlock! !\n\n!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 05:15'!\ntearDownBlock: anObject\n\t\"Set the value of tearDownBlock\"\n\n\ttearDownBlock _ anObject! !\n\n!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 06:19'!\ntestBlock\n\t\"Answer the value of testBlock\"\n\n\ttestBlock isNil ifTrue:[self testBlock: [:test :env| self log:'testing']].\n\t^ testBlock! !\n\n!RVMTest methodsFor: 'accessing' stamp: 'ssa 8/27/2009 05:22'!\ntestBlock: anObject\n\t\"Set the value of testBlock\"\n\n\ttestBlock _ anObject! !\n\n!RVMTest methodsFor: 'testing process' stamp: 'ssa 3/5/2010 17:37'!\nrun\n\tself environment: (self setUpBlock value: self).\n\tself lastResult: self runTest.\n\tself tearDownBlock value: self value: self environment.\n\t^self lastResult\n\t! !\n\n!RVMTest methodsFor: 'testing process' stamp: 'dmu 9/3/2010 11:49'!\nrunTest\n\n\t| outcome result decision |\n\toutcome _ self testBlock value: self value: self environment.\n\tresult _ RVMTestResult test: self result: outcome asserting: ((self assertionBlock value: self value: outcome) and:[self allAssertionsPassed]).\n\tself log: result gradeString.\n\t(result failed and:[self name ~= 'testFailure'])ifTrue:[decision _ self confirm:'Test [', self name,'] failed, continue?'.\n\t\tdecision ifFalse:[self halt:'Test [', self name,'] failed, aborting other tests']].\n\t^result! !\n\n!RVMTest methodsFor: 'printing' stamp: 'ssa 8/27/2009 07:00'!\nfullPrintOn: aStream\n\n\taStream nextPutAll: 'Testing: ',self name.\n\taStream cr; nextPutAll: 'result: '.\n\tself result printOn:aStream.\n\taStream cr; nextPutAll: 'setUp: '.\n\tself setUpBlock printOn:aStream.\n\taStream cr; nextPutAll: 'test: '.\n\tself testBlock printOn:aStream.\n\taStream cr; nextPutAll: 'tearDown: '.\n\tself tearDownBlock printOn:aStream.\n\taStream cr; nextPutAll: 'asserting: '.\n\tself assertionBlock printOn:aStream.\n\taStream cr; nextPutAll: 'runLog: '.\n\tself runLog printOn:aStream.\n\t! !\n\n!RVMTest methodsFor: 'printing' stamp: 'ssa 8/27/2009 07:05'!\ngradeString\n\t^self lastResult isNil ifTrue:['untested']ifFalse:[self lastResult gradeString]! !\n\n!RVMTest methodsFor: 'printing' stamp: 'ssa 8/27/2009 06:59'!\nprintOn: aStream\n\n\taStream nextPutAll: self shortPrintString,'(',self gradeString,')'! !\n\n!RVMTest methodsFor: 'printing' stamp: 'ssa 8/27/2009 06:04'!\nshortPrintString\n\n\t^'Testing: ',self name! !\n\n!RVMTest methodsFor: 'assertions' stamp: 'ssa 8/27/2009 06:51'!\nallAssertionsPassed\n\n\tself assertions detect:[:each| each = false] ifNone:[^true].\n\t^false! !\n\n!RVMTest methodsFor: 'assertions' stamp: 'ssa 9/15/2009 16:34'!\nassert: aTrueResult \n\n\tself assert: aTrueResult ifFail: [self log: 'assertion failed']! !\n\n!RVMTest methodsFor: 'assertions' stamp: 'dmu 12/16/2009 16:06'!\nassert: aTrueResult ifFail: failBlock\n\n\t(aTrueResult = true) | (aTrueResult = false) \n\t\tifFalse:[self lyError:'assertion expressions result result in Booleans'].\n\tself assertions add: aTrueResult.\n\taTrueResult ifFalse:[self class debugOnFail ifTrue:[self halt:self printString,' assertion failed']ifFalse:failBlock].\n\t! !\n\n!RVMTest commentStamp: 'ssa 7/7/2010 14:09' prior: 0!\nSee \"examples\" in my class!\n!RVMTest class methodsFor: 'settings' stamp: 'ssa 9/15/2009 16:28'!\ndebugOnFail\n\t\"If true, then a failing assertion or failBlock execution will open a Debugger\"\n\t\n\tDebugOnFail isNil ifTrue:[DebugOnFail _ false].\n\t^DebugOnFail! !\n\n!RVMTest class methodsFor: 'settings' stamp: 'ssa 9/15/2009 16:29'!\ndebugOnFail: aBoolean\n\t\"If true, then a failing assertion or failBlock execution will open a Debugger\"\n\t\n\tDebugOnFail _ aBoolean! !\n\n!RVMTest class methodsFor: 'quick run' stamp: 'ssa 8/27/2009 05:52'!\nrunSetUp: setUpBlock test: testBlock asserting: assertionBlock\n\n\t| test |\n\ttest _ self setUp: setUpBlock test: testBlock  asserting: assertionBlock.\n\t^test run! !\n\n!RVMTest class methodsFor: 'quick run' stamp: 'ssa 8/27/2009 05:51'!\nrunSetUp: setUpBlock test: testBlock tearDown: tearDownBlock  asserting: assertionBlock\n\n\t| test |\n\ttest _ self setUp: setUpBlock test: testBlock tearDown: tearDownBlock asserting: assertionBlock.\n\t^test run! !\n\n!RVMTest class methodsFor: 'quick run' stamp: 'ssa 8/27/2009 05:52'!\nrunTest: testBlock asserting: assertionBlock\n\n\t| test |\n\ttest _ self  test: testBlock  asserting: assertionBlock.\n\t^test run! !\n\n!RVMTest class methodsFor: 'quick run' stamp: 'ssa 8/27/2009 05:52'!\nrunTest: testBlock tearDown: tearDownBlock  asserting: assertionBlock\n\n\t| test |\n\ttest _ self test: testBlock tearDown: tearDownBlock asserting: assertionBlock.\n\t^test run! !\n\n!RVMTest class methodsFor: 'examples' stamp: 'ssa 7/7/2010 14:02'!\nfullExample\n\t\"self fullExample run\"\n\t\"Use this example as a template for your tests in subclasses of LyTestSuite in the 'tests' message category\"\n\t| theTest |\n\ttheTest _ RVMTest setUp: [:test| test log:'setting up for test:',test name. \n\t\t\t\t\"setUpBlocks return the test environment\"\n\t\t\t\t#( 1 2 3 4 5 )]\n\t\t\ttest:[:test :env| test log:'test:',test name,' starting...'.\n\t\t\t\t\"testBlocks perform the test in the setup environment.  \n\t\t\t\tThe test object is available for assertions and logging\"\n\t\t\t\ttest assert: (env at: 2)=2.\n\t\t\t\ttest assert:(env select:[:e| e odd]) = #(1 3 5) ifFail:[test log:'odd selections failed'].\n\t\t\t\ttest log:'test:',test name,' complete'.\n\t\t\t\t\"the last expression result is the outcome of the test\"\n\t\t\t\tenv size = 5]\n\t\t\ttearDown:[:test :env| test log:'tearing down test:',test name.\n\t\t\t\t\"tearDownBlocks do any necessary cleanup that would not otherwise be garbage collected\"\n\t\t\t\ttest log:'tear down complete']\n\t\t\tasserting:[:test :outcome| \"assertionBlocks must result in True or False, and\n\t\t\t\t\t\t\t\trepresent the pass/fail judgement of the test outcome\" \n\t\t\t\t\t\t\t\t\"if you use  assert: or assert:ifFail: in these blocks their ANDed result\n\t\t\t\t\t\t\t\twill be ANDed to the result of this block for the final assertion\"\n\t\t\t\t\t\t\t\toutcome = true \"or use an expression that results in True or False\"].\n\ttheTest name: 'fullExample'.\n\t^theTest! !\n\n!RVMTest class methodsFor: 'examples' stamp: 'ssa 7/7/2010 14:03'!\nsimpleFullExample\n\t\"self simpleFullExample run\"\n\t| theTest |\n\ttheTest _ RVMTest setUp: [:test| ]\n\t\t\ttest:[:test :env| 123]\n\t\t\ttearDown:[:test :env| ]\n\t\t\tasserting:[:test :outcome| outcome = 123].\n\ttheTest name: 'simpleFullExample'.\n\t^theTest! !\n\n!RVMTest class methodsFor: 'instance creation' stamp: 'ssa 8/27/2009 05:49'!\nsetUp: setUpBlock test: testBlock  asserting: assertionBlock\n\n\t^self new\n\t\tsetUpBlock: setUpBlock;\n\t\ttestBlock: testBlock;\n\t\t assertionBlock: assertionBlock;\n\t\tyourself! !\n\n!RVMTest class methodsFor: 'instance creation' stamp: 'ssa 8/27/2009 05:48'!\nsetUp: setUpBlock test: testBlock tearDown: tearDownBlock asserting: assertionBlock\n\n\t^self new\n\t\tsetUpBlock: setUpBlock;\n\t\ttestBlock: testBlock;\n\t\ttearDownBlock: tearDownBlock;\n\t\t assertionBlock: assertionBlock;\n\t\tyourself! !\n\n!RVMTest class methodsFor: 'instance creation' stamp: 'ssa 8/27/2009 05:50'!\ntest: testBlock  asserting: assertionBlock\n\n\t^self new\n\t\ttestBlock: testBlock;\n\t\t assertionBlock: assertionBlock;\n\t\tyourself! !\n\n!RVMTest class methodsFor: 'instance creation' stamp: 'ssa 8/27/2009 05:50'!\ntest: testBlock tearDown: tearDownBlock asserting: assertionBlock\n\n\t^self new\n\t\ttestBlock: testBlock;\n\t\ttearDownBlock: tearDownBlock;\n\t\t assertionBlock: assertionBlock;\n\t\tyourself! !\n\n!RVMTest class methodsFor: 'user interfacing' stamp: 'ssa 5/12/2010 10:19'!\ndebugOnFailSwitch\n\t\"self debugOnFailSwitch\"\n\t| topView |\n\ttopView := RVMStandardSystemView new.\n\ttopView noLabel.\n\ttopView borderWidth:1.\n\ttopView minimumSize: 130@30.\n\ttopView maximumSize: 200@200.\n\ttopView addSubView: (RVMCheckBoxView on: self label: 'LyTest debugOnFail' checkState: [self debugOnFail] whenChecked: [self debugOnFail: true] whenUnchecked: [self debugOnFail: false] monitor: true).\n\ttopView controller open! !\n\n!RVMTest class methodsFor: 'tests' stamp: 'ssa 7/7/2010 14:03'!\nfullExampleTest\n\t\"self fullExampleTest\"\n\t| theTest |\n\ttheTest _ RVMTest setUp: [:test| test log:'setting up for test:',test name.\n\t\t\t\t\"setUpBlocks return the test environment\"\n\t\t\t\t#( 1 2 3 4 5 )]\n\t\t\ttest:[:test :env| test log:'test:',test name,' starting...'.\n\t\t\t\t\"testBlocks perform the test in the setup environment.  \n\t\t\t\tThe test object is available for assertions and logging\"\n\t\t\t\ttest assert: (env at: 2)=2.\n\t\t\t\ttest assert:(env select:[:e| e odd]) = #(1 3 5) ifFail:[test log:'odd selections failed'].\n\t\t\t\ttest log:'test:',test name,' complete'.\n\t\t\t\t\"the last expression result is the outcome of the test\"\n\t\t\t\tenv size = 5]\n\t\t\ttearDown:[:test :env| test log:'tearing down test:',test name.\n\t\t\t\t\"tearDownBlocks do any necessary cleanup that would not otherwise be garbage collected\"\n\t\t\t\ttest log:'tear down complete']\n\t\t\tasserting:[:test :outcome| \"assertionBlocks must result in True or False, and\n\t\t\t\t\t\t\t\trepresent the pass/fail judgement of the test outcome\" \n\t\t\t\t\t\t\t\ttest allAssertionsPassed . \" use this when using assert: or assert:ifFail:\"\n\t\t\t\t\t\t\t\toutcome = true \"or use an expression that results in True or False\"].\n\ttheTest name: 'fullExampleTest'.\n\t^theTest! !\n\n!RVMTestResult methodsFor: 'accessing' stamp: 'ssa 8/27/2009 07:03'!\nassertion\n\t\"Answer the value of assertion\"\n\n\tassertion isNil ifTrue:[self assertion: nil].\n\t^ assertion! !\n\n!RVMTestResult methodsFor: 'accessing' stamp: 'ssa 8/27/2009 05:27'!\nassertion: anObject\n\t\"Set the value of assertion\"\n\n\tassertion _ anObject! !\n\n!RVMTestResult methodsFor: 'accessing' stamp: 'ssa 8/27/2009 05:17'!\nresult\n\t\"Answer the value of result\"\n\n\tresult isNil ifTrue:[self result: nil].\n\t^ result! !\n\n!RVMTestResult methodsFor: 'accessing' stamp: 'ssa 8/27/2009 05:17'!\nresult: anObject\n\t\"Set the value of result\"\n\n\tresult _ anObject! !\n\n!RVMTestResult methodsFor: 'accessing' stamp: 'ssa 8/27/2009 05:17'!\ntest\n\t\"Answer the value of test\"\n\n\ttest isNil ifTrue:[self test: nil].\n\t^ test! !\n\n!RVMTestResult methodsFor: 'accessing' stamp: 'ssa 8/27/2009 05:17'!\ntest: anObject\n\t\"Set the value of test\"\n\n\ttest _ anObject! !\n\n!RVMTestResult methodsFor: 'printing' stamp: 'ssa 8/27/2009 07:01'!\ngradeString\n\t^self passed ifTrue:['passed']ifFalse:['failed']! !\n\n!RVMTestResult methodsFor: 'printing' stamp: 'ssa 8/27/2009 07:01'!\nprintOn: aStream\n\n\taStream nextPutAll: self gradeString, ' ',self test shortPrintString! !\n\n!RVMTestResult methodsFor: 'testing' stamp: 'ssa 8/27/2009 06:02'!\nfailed\n\n\t^self assertion not! !\n\n!RVMTestResult methodsFor: 'testing' stamp: 'ssa 8/27/2009 06:02'!\npassed\n\n\t^self assertion! !\n\n!RVMTestResult class methodsFor: 'instance creation' stamp: 'ssa 8/27/2009 05:26'!\ntest: aRVMTest result: anOutcome asserting: anAssertion\n\n\t^self new\n\t\ttest: aRVMTest;\n\t\tresult: anOutcome;\n\t\tassertion: anAssertion;\n\t\tyourself! !\n\n!RVMTestSuite methodsFor: 'acessing' stamp: 'ssa 8/27/2009 07:07'!\nresults\n\n\t^self tests collect:[:test| test result]! !\n\n!RVMTestSuite methodsFor: 'testing process' stamp: 'ssa 8/30/2009 03:50'!\nfailureCount\n\t^(self tests select:[:test| test result failed])size! !\n\n!RVMTestSuite methodsFor: 'testing process' stamp: 'ssa 8/30/2009 03:50'!\nfailures\n\t^(self tests select:[:test| test result failed])! !\n\n!RVMTestSuite methodsFor: 'testing process' stamp: 'ssa 8/27/2009 09:06'!\nreportResults\n\t| passers failures |\n\tpassers _ OrderedCollection new.\n\tfailures _ OrderedCollection new.\n\tself tests do:[:test| test result passed ifTrue:[passers add: test name asSymbol]ifFalse:[failures add: test name asSymbol]].\n\tTranscript cr;show:'-------------------';cr;\n\t\tshow: 'Results for TestSuite:';\n\t\tshow: 'Summary: ',passers size printString,' passed, ',failures size printString,' failed';cr.\n\tfailures isEmpty ifFalse:[Transcript show:'Failed tests: ',failures asArray printString;cr;\n\t\tshow:'\"1 systemNavigation browseAllImplementorsOfList:', failures asArray printString,' title: ''Failed Tests'' \"']\n\t\t! !\n\n!RVMTestSuite methodsFor: 'testing process' stamp: 'dmu 9/3/2010 11:43'!\nrun\n\tTranscript cr;show:'Starting run.....................'.\n\tself tests do:[:test|  test run].\n\tTranscript cr;show:'......................Ending run'.\n\tself reportResults! !\n\n!RVMTestSuite methodsFor: 'accessing' stamp: 'ssa 8/27/2009 07:31'!\ntests\n\t\"Answer the value of tests\"\n\n\ttests isNil ifTrue:[self tests: OrderedCollection new].\n\t^ tests! !\n\n!RVMTestSuite methodsFor: 'accessing' stamp: 'ssa 8/27/2009 07:31'!\ntests: anObject\n\t\"Set the value of tests\"\n\n\ttests _ anObject! !\n\n!RVMTestSuite class methodsFor: 'instance creation' stamp: 'ssa 8/27/2009 05:35'!\ntests: someTests\n\n\t^self new tests: someTests! !\n\n!RVMTestSuite class methodsFor: 'running tests' stamp: 'ssa 8/27/2009 07:31'!\nrun\n\t\"self run\"\n\t\"just run the tests in my own 'testing' message category\"\n\t^self tests run! !\n\n!RVMTestSuite class methodsFor: 'running tests' stamp: 'ssa 8/27/2009 07:45'!\nrunAll\n\t\"self runAll\"\n\t\"just run all tests in the 'testing' message category of myself and my subclasses\"\n\t^self testsWithSubTests run! !\n\n!RVMTestSuite class methodsFor: 'running tests' stamp: 'ssa 8/27/2009 07:45'!\nrunSubs\n\t\"self runSubs\"\n\t\"just run all tests in the 'testing' message category of my subclasses\"\n\t^self subTests run! !\n\n!RVMTestSuite class methodsFor: 'suite creation' stamp: 'ssa 8/27/2009 09:37'!\nsubTests\n\t\"Answer a test suite built by scanning methods in my subclasses 'tests' categories\"\n\t\n\t| testSelectors tests |\n\ttests _ OrderedCollection new.\n\tself allSubclassesDo:[:cls| testSelectors _ cls class organization listAtCategoryNamed: 'tests'.\n\t\ttests addAll:(testSelectors collect:[:selector| cls perform: selector])].\n\t^self tests: tests! !\n\n!RVMTestSuite class methodsFor: 'suite creation' stamp: 'ssa 8/27/2009 06:57'!\ntests\n\t\"self tests\"\n\t\"Answer a test suite built by scanning methods in my 'tests' category\"\n\t\n\t| testSelectors |\n\ttestSelectors _ self  class organization listAtCategoryNamed: 'tests'.\n\t^self tests: (testSelectors collect:[:selector| self perform: selector])! !\n\n!RVMTestSuite class methodsFor: 'suite creation' stamp: 'ssa 8/27/2009 08:29'!\ntestsWithSubTests\n\t\"Answer a test suite built by scanning methods in my own and my subclasses 'tests' categories\"\n\t\n\t| testSelectors tests |\n\ttests _ OrderedCollection new.\n\tself withAllSubclassesDo:[:cls| testSelectors _ cls class organization listAtCategoryNamed: 'tests'.\n\t\ttests addAll:(testSelectors collect:[:selector| cls perform: selector])].\n\t^self tests: tests! !\n\n!RVMTestSuite class methodsFor: 'tests' stamp: 'ssa 7/7/2010 14:03'!\ntestFailure\n\t\"self testFailure run\"\n\t\"A test that will always fail to ensure the system is functioning at a minimum\"\n\t| theTest |\n\ttheTest _ RVMTest test:[:test :env| ]\n\t\t\tasserting:[:test :outcome| false].\n\ttheTest name: 'testFailure'.\n\t^theTest! !\n\n!RVMTestSuite class methodsFor: 'tests' stamp: 'ssa 7/7/2010 14:03'!\ntestRVMTest\n\n\t^RVMTest fullExampleTest! !\n\n!RVMTestSuite class methodsFor: 'user interface' stamp: 'ssa 8/31/2009 10:50'!\nrunAllButton\n\t\"self runAllButton\"\n\t| topView |\n\ttopView := RVMStandardSystemView new.\n\ttopView noLabel.\n\ttopView borderWidth:1.\n\ttopView minimumSize: 130@30.\n\ttopView maximumSize: 200@200.\n\ttopView addSubView: (RVMButtonView label:'Run All Tests' action:[self runAll]).\n\ttopView label: 'Tester'.\n\ttopView controller open! !\n\n!RVMTileGridController methodsFor: 'menu messages' stamp: 'ssa 1/1/1970 16:22'!\nbrowseAspectsForCore: coreIndex\n\n\tself view okToDisplay:true.\n\tRVMCoreAspectTrace monitorAllCoreAspectsForCore: coreIndex! !\n\n!RVMTileGridController methodsFor: 'menu messages' stamp: 'ssa 1/1/1970 16:29'!\nbrowseThisAspectForAllCores: coreIndex\n\n\tself view okToDisplay:true.\n\tRVMTileStripChartView openOnAspect:  self view aspect! !\n\n!RVMTileGridController methodsFor: 'menu messages' stamp: 'ssa 1/1/1970 16:24'!\nbrowseThisAspectForCore: coreIndex\n\n\tself view okToDisplay:true.\n\tRVMCoreAspectTrace monitorAspects: (Array with: self view aspect) forCore: coreIndex! !\n\n!RVMTileGridController methodsFor: 'menu messages' stamp: 'ssa 10/4/2008 08:36'!\nchangeAspect: coreIndex\n\t| menu answer |\n\tmenu := CustomMenu new.\n\tself view sample aspects\n\t\tdo: [:aspect | menu add: aspect action: aspect].\n\tanswer := menu startUp: self view aspect withCaption: 'Select the aspect to monitor'.\nself view topView okToDisplay:true.\nanswer isNil ifTrue:[^self].\n\tself view aspect: answer.\n\tself view topView allSubViews do:[:each| each hear: nil].\n\tself view displayView! !\n\n!RVMTileGridController methodsFor: 'menu messages' stamp: 'ssa 1/1/1970 00:12'!\ndoMessageTallyOfDisplayView\nself view topView okToDisplay:true.\n\tMessageTally spyOn:[100 timesRepeat:[view displayView]]\n\n! !\n\n!RVMTileGridController methodsFor: 'menu messages' stamp: 'ssa 1/1/1970 00:12'!\ninspectDataValues: coreIndex\nself view topView okToDisplay:true.\n\tself view data inspect! !\n\n!RVMTileGridController methodsFor: 'menu messages' stamp: 'ssa 1/1/1970 02:00'!\ninspectView:coreIndex\n\n\tself view okToDisplay:true.\n\tself view inspect! !\n\n!RVMTileGridController methodsFor: 'menu messages' stamp: 'ssa 1/1/1970 00:02'!\nscalerForThisAspect: coreIndex\n\n\tself view okToDisplay:true.\n\tRVMColoredDataScalerView openOnAspect:  self view aspect! !\n\n!RVMTileGridController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 13:10'!\ncoreIndexAt: aPoint\n\n\t| box |\n\t1 to: self view tiles size do:[:index| box _ self view tiles at: index.\n\t\t( box containsPoint: aPoint) ifTrue:[^index]]! !\n\n!RVMTileGridController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 00:55'!\nredButtonActivity\n\t| delay |\n\t[\"Color showColors: self view colors. \" ^self ]value.\n\tCursor move show.  Sensor waitNoButton.  Cursor normal show.\n\t\t\tself process isNil\n\t\t\t\tifTrue: [\n\t\t\t\t\tself view showProcessOn.\n\t\t\t\t\tself\n\t\t\t\t\t\tprocess: [[((self view displayBox containsPoint: Sensor cursorPoint)\n\t\t\t\t\t\t\t\t& Sensor redButtonPressed) or:[Sensor leftShiftDown & Sensor controlKeyPressed]]\n\t\t\t\t\t\t\t\twhileFalse: [\n\t\t\t\t\t\t\t\t\tdelay := Delay forMilliseconds: 1 * (Time millisecondsToRun: [self view displayView]).\n\t\t\t\t\t\t\t\t\tdelay wait]].\n\t\t\t\t\tself process fork]\n\t\t\t\tifFalse: [self stopDisplayProcess]! !\n\n!RVMTileGridController methodsFor: 'controlling' stamp: 'dmu 1/1/1970 00:08'!\nstopDisplayProcess\n\tself process terminate.\n\tself view showProcessOff.\n\tself view displayView.\n\tself process: nil! !\n\n!RVMTileGridController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 00:11'!\nyellowButtonActivity\n\t| menu answer coreIndex |\n\t\tcoreIndex _ self coreIndexAt: Sensor cursorPoint.\n\t\tself view dontDisplayWhile:[\nSensor yellowButtonPressed \n\t\tifTrue: [menu := self yellowButtonMenu.\n\t\t\tanswer := menu startUp: nil withCaption: nil at: Sensor cursorPoint.\n\t\t\tanswer notNil ifTrue:[\n\t\t\t\tself perform: answer with: coreIndex]]]! !\n\n!RVMTileGridController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 01:59'!\nyellowButtonMenu\n| menu coreIndex |\ncoreIndex _ self coreIndexAt: Sensor cursorPoint.\nmenu := CustomMenu new.\n\t\t\tmenu add: 'change aspect' action: #changeAspect:.\n\t\t\tmenu add: ' stripchart all aspects for core #',coreIndex printString  action: #browseAspectsForCore:.\n\t\t\tmenu add: 'stripchart this aspect for core #',coreIndex printString action: #browseThisAspectForCore:.\n\t\t\tmenu add: 'stripchart this aspect for all cores' action: #browseThisAspectForAllCores:.\n\t\t\tmenu add: 'adjust scale for this aspect' action: #scalerForThisAspect:.\n\t\t\tmenu add: 'current data values' action: #inspectDataValues:.\n\t\t\tmenu add: 'inspect view' action: #inspectView:.\n^menu\n! !\n\n!RVMTileGridController methodsFor: 'accessing' stamp: 'ssa 8/15/2008 20:14'!\nprocess\n\t\"Answer the value of process\"\n\n\tprocess isNil ifTrue:[self process: nil].\n\t^process! !\n\n!RVMTileGridController methodsFor: 'accessing' stamp: 'ssa 8/15/2008 20:14'!\nprocess: anObject\n\t\"Set the value of process\"\n\n\tprocess := anObject! !\n\n!RVMTileGridController methodsFor: 'initialize-release' stamp: 'ssa 8/15/2008 20:21'!\nrelease\n\n\tself process notNil ifTrue:[self process terminate].\n\tsuper release! !\n\n!RVMTileGridScalerView methodsFor: 'displaying' stamp: 'ssa 10/21/2008 11:32'!\ndisplayView\n\t| color  |\n\tself okToDisplay\n\t\tifFalse: [^ self].\n\tself uncache.\n\tself sample: nil.\n\tself scaler resetObservations.\n\tself canvas fillColor: self tileBorderColor.\n\t1 to: self tiles size\n\t\tdo: [:index | \n\t\t\tcolor := index > self data size\n\t\t\t\t\t\tifTrue: [Color black]\n\t\t\t\t\t\tifFalse: [self colors at: ((self scaler scale: (self data at: index))min: 100 max:1)].\n\t\t\tself canvas\n\t\t\t\tfill: (((self tiles at: index)\n\t\t\t\t\t\ttranslateBy: self insetDisplayBox origin negated)\n\t\t\t\t\t\tinsetBy: 1 @ 1)\n\t\t\t\tfillColor: color.\n\t\t\tself tiles size = 1\n\t\t\t\tifTrue: [(self data first printString asDisplayText alignedTo: #center)\n\t\t\t\t\t\tdisplayOn: self canvas\n\t\t\t\t\t\tat: self canvas boundingBox center]].\n\tself canvas displayAt: self insetDisplayBox origin! !\n\n!RVMTileGridScalerView methodsFor: 'accessing' stamp: 'ssa 10/3/2008 20:07'!\naspect: aSymbol.\n\tself scaler: nil.\n\tsuper aspect: aSymbol! !\n\n!RVMTileGridScalerView methodsFor: 'accessing' stamp: 'ssa 10/3/2008 20:02'!\nrescaleCounter\n\t\"Answer the value of rescaleCounter\"\n\n\trescaleCounter isNil ifTrue:[self rescaleCounter: 30].\n\t^ rescaleCounter! !\n\n!RVMTileGridScalerView methodsFor: 'accessing' stamp: 'ssa 10/3/2008 20:03'!\nrescaleCounter: anObject\n\t\"Set the value of rescaleCounter\"\n\n\trescaleCounter _ anObject ! !\n\n!RVMTileGridScalerView methodsFor: 'accessing' stamp: 'ssa 10/1/2008 08:46'!\nscaler\n\t\"Answer the value of scaler\"\n\n\tscaler isNil ifTrue:[self scaler: (RVMMonitor scalerFor: self aspect)].\n\t^ scaler! !\n\n!RVMTileGridScalerView methodsFor: 'accessing' stamp: 'ssa 10/1/2008 08:45'!\nscaler: anObject\n\t\"Set the value of scaler\"\n\n\tscaler _ anObject! !\n\n!RVMTileGridScalerView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:11'!\ntypeLabel\n\n\t^'Abs: '! !\n\n!RVMTileGridScalerView methodsFor: 'listening' stamp: 'ssa 11/4/2008 15:37'!\nhear: someObject\n\n\t\"self rescaleCounter: self rescaleCounter - 1.\n\tself rescaleCounter = 0 ifTrue:[self rescaleCounter:nil.  \n\t\tself scaler resetScaling]. \"\n\tself sample: nil.\n\tself topView isCollapsed ifFalse:[self displayView]! !\n\n!RVMTileGridScalerView class methodsFor: 'examples' stamp: 'ssa 11/4/2008 20:15'!\nexample\n\t\"RVMTileGridScalerView example\"\n\t\n\t| topView v scaleWidth |\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\tscaleWidth _ 70.\n\ttopView minimumSize: 200+scaleWidth@200.\n\ttopView maximumSize: 460@400.\n\ttopView addSubView: (v := self new) viewport: (scaleWidth@0 extent: 200@200).\n\ttopView addSubView: (RVMColorScaleView aspectSource: [v aspect] scalerSource: [v scaler] colorsSource: [v colors reverse] orientation: #vertical forView: v adjustScaler: true) viewport:(0@0 extent:scaleWidth@200).\n\ttopView label: v typeLabel,v aspect.\n\ttopView controller open! !\n\n!RVMTileGridView methodsFor: 'autoscaling' stamp: 'ssa 10/1/2008 09:09'!\nautoscale\n\t\"Adjust my scale so that it fits the data.\"\n\tself minValue: self data min.\n\tself maxValue: self data max.\n\tself scale:nil! !\n\n!RVMTileGridView methodsFor: 'updating' stamp: 'ssa 1/1/1970 00:34'!\nhear: someObject\n\n\tself sample: nil.\n\tself topView isCollapsed ifFalse:[self displayView]! !\n\n!RVMTileGridView methodsFor: 'updating' stamp: 'ssa 10/3/2008 19:33'!\nnewFrame\n\n\tself canvas: nil.\n\tself displayView! !\n\n!RVMTileGridView methodsFor: 'updating' stamp: 'ssa 8/19/2008 18:25'!\nunlock\n\n\tsuper unlock.\n\tself tiles:nil\n! !\n\n!RVMTileGridView methodsFor: 'controller access' stamp: 'ssa 1/1/1970 00:30'!\ndefaultControllerClass\n\t^RVMTileGridController! !\n\n!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 8/15/2008 16:34'!\naspect\n\t\"Answer the value of aspect\"\n\n\taspect isNil ifTrue:[self aspect: #bytecodesPerSecond].\n\t^aspect! !\n\n!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:57'!\naspect: anObject\n\t\"Set the value of aspect\"\n\n\taspect := anObject.\n\tself topView == self ifFalse:[self topView relabel: self typeLabel,anObject]! !\n\n!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 8/20/2008 14:27'!\naspects\n\t^self sample aspects! !\n\n!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 10/3/2008 20:46'!\ncanvas\n\tcanvas isNil ifTrue:[self canvas: (Form fromDisplay: self insetDisplayBox) fillWhite].\n\t^canvas ! !\n\n!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 9/24/2008 17:45'!\ncanvas: aForm\n\n\tcanvas _ aForm! !\n\n!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\ncolors\n\t\"Answer the value of colors\"\n\n\tcolors isNil ifTrue:[self colors: self makeColors].\n\t^colors! !\n\n!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 8/15/2008 16:20'!\ncolors: anObject\n\t\"Set the value of colors\"\n\n\tcolors := anObject! !\n\n!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 10/1/2008 09:12'!\ndata\n\t\"Answer the value of data\"\n\tdata isNil ifTrue:[\n\t\t(self sample respondsTo: self aspect) ifFalse: [^ Array new: 0].\n\t\tself data: (self sample perform: self aspect)].\n\t^data! !\n\n!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 10/3/2008 20:29'!\ndata: anObject\n\t\"Set the value of data\"\n\n\tdata := anObject.\n\tdata ifNotNil:[(data isKindOf: Collection) ifFalse:[data _ Array with: data]].\n\tdata notNil ifTrue:[self autoscale]! !\n\n!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 5/4/2010 12:44'!\ngridExtent\n\t\"Answer the width and height of the grid of tiles that is appropriate for the  layout of cores we have\"\n\n\t| total |\n\ttotal _ self data size.\n\ttotal = 1 ifTrue:[^1@1].\n\ttotal < 4 ifTrue:[^1@ total].\n\ttotal = 4 ifTrue:[^2@ 2].\n\ttotal < 16 ifTrue:[^4@ (total/4+0.5)rounded].\n\t\"otherwise assume a Tilera 8x8 grid\"\n\t^self sample groupStats width @ self sample groupStats height! !\n\n!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:23'!\nmakeColors\n\n\t^(Color hotColdShades: self numberOfColors) reversed! !\n\n!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 8/15/2008 16:22'!\nmaxValue\n\t\"Answer the value of maxValue\"\n\n\tmaxValue isNil ifTrue:[self maxValue: 5000].\n\t^maxValue! !\n\n!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 8/15/2008 16:20'!\nmaxValue: anObject\n\t\"Set the value of maxValue\"\n\n\tmaxValue := anObject! !\n\n!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 8/15/2008 16:22'!\nminValue\n\t\"Answer the value of minValue\"\n\n\tminValue isNil ifTrue:[self minValue: 0].\n\t^minValue! !\n\n!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 8/15/2008 16:20'!\nminValue: anObject\n\t\"Set the value of minValue\"\n\n\tminValue := anObject! !\n\n!RVMTileGridView methodsFor: 'accessing' stamp: 'dmu 1/1/1970 00:26'!\nnumberOfColors\n\t\"Answer the value of numberOfColors\"\n\n\tnumberOfColors isNil ifTrue:[self numberOfColors: 100].\n\t^numberOfColors! !\n\n!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 8/15/2008 19:50'!\nnumberOfColors: anObject\n\t\"Set the value of numberOfColors\"\n\n\tnumberOfColors := anObject rounded.\n\tself colors:nil.\n\tself changed:#numberOfColors! !\n\n!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 8/22/2008 09:25'!\nsample\n\t\"Answer the value of sample\"\n\n\tsample isNil ifTrue:[self sample: RVMMonitor lastSample].\n\t^sample! !\n\n!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 8/22/2008 09:49'!\nsample: anObject\n\t\"Set the value of sample\"\n\n\tsample := anObject..\n\tself data:nil.\n\n! !\n\n!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 8/22/2008 10:04'!\nscale\n\t\"Answer the value of scale\"\n\n\tscale isNil ifTrue:[self scale: self maxValue / self numberOfColors asFloat].\n\t^scale ! !\n\n!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:50'!\nscale: anObject\n\t\"Set the value of scale\"\n\n\tscale := anObject.\n\tscale = 0 ifTrue: [scale := 0.01].\n\tself changed:#scale.\n! !\n\n!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 10/1/2008 09:06'!\nscaler\n\t\"Answer a scaler for me as needed\"\n\t^RVMDataScaler aspect: self aspect min: self minValue max: self maxValue! !\n\n!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 8/19/2008 18:09'!\nshowProcessState\n\t\"Answer the value of showProcessState\"\n\n\tshowProcessState isNil ifTrue:[self showProcessState: false].\n\t^showProcessState! !\n\n!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 8/19/2008 18:08'!\nshowProcessState: anObject\n\t\"Set the value of showProcessState\"\n\n\tshowProcessState := anObject! !\n\n!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:13'!\ntiles\n\t\"Answer the value of tiles\"\n\ttiles isNil ifTrue:[self tiles: (self insetDisplayBox subDivideRoundedBy: \n\t\t(self data size > 1 ifTrue:[self sample groupStats width @ self sample groupStats height]ifFalse:[1@1]))].\n\t^tiles! !\n\n!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 8/15/2008 11:56'!\ntiles: anObject\n\t\"Set the value of tiles\"\n\n\ttiles := anObject! !\n\n!RVMTileGridView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:58'!\ntypeLabel\n\n\t^'Rel: '! !\n\n!RVMTileGridView methodsFor: 'displaying' stamp: 'ssa 11/4/2008 15:47'!\ndisplayView\n\t| color colorIndex |\n\tself okToDisplay ifFalse:[^self].\n\tself uncache.\n\tself sample: nil.\n \t\nself canvas fillColor: self tileBorderColor.\n\n\t1 to: self tiles size do:[:index|\n\t\tcolor := index > self data size \n\t\t\t\tifFalse:[\n\t\t\t\t\tcolorIndex _ (((self data at: index) / self scale)min: self numberOfColors max: 1) rounded.\n\t\t\t\t\tself colors at: colorIndex]\n\t\t\t\tifTrue:[Color black].\n\t\t\t\tself canvas fill: (((self tiles at: index) translateBy: self insetDisplayBox origin negated)insetBy:1@1) fillColor: color .\n\t\tself tiles size = 1 ifTrue:[(self data first printString asDisplayText alignedTo:#center)displayOn: self canvas at: self canvas boundingBox  center].\n\t\t\n\t\t].\nself canvas displayAt: self insetDisplayBox origin\n! !\n\n!RVMTileGridView methodsFor: 'displaying' stamp: 'ssa 11/4/2008 20:41'!\nredrawOnCanvas\n\t\"do nothing\"! !\n\n!RVMTileGridView methodsFor: 'displaying' stamp: 'ssa 1/1/1970 01:42'!\ntileBorderColor\n\n\t^Color darkGray! !\n\n!RVMTileGridView class methodsFor: 'examples' stamp: 'ssa 11/4/2008 20:17'!\nexample\n\t\"RVMTileGridView example\"\n\t\n\t| topView v scaleWidth |\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\tscaleWidth _ 70.\n\ttopView minimumSize: 200+scaleWidth@200.\n\ttopView maximumSize: 460@400.\n\ttopView addSubView: (v := self new) viewport: (scaleWidth@0 extent: 200@200).\n\ttopView addSubView: (RVMColorScaleView aspectSource: [v aspect] scalerSource: [v scaler] colorsSource: [v colors reverse] orientation: #vertical  forView: v adjustScaler: false) viewport:(0@0 extent:scaleWidth@200).\n\ttopView label: v typeLabel,v aspect.\n\ttopView controller open! !\n\n!RVMTileGridView class methodsFor: 'instance creation' stamp: 'ssa 8/15/2008 16:36'!\naspect: aMessageSelector numberOfColors: numColors minValue: minValue maxValue: maxValue\n\t\"Answer a new view with these params\"\n\t\n\t| view |\n\tview := self new.\n\tview \n\t\taspect: aMessageSelector;\n\t \tnumberOfColors: numColors;\n\t\tminValue: minValue;\n\t\tmaxValue: maxValue.\n\t^view! !\n\n!RVMTileGridView class methodsFor: 'accessing' stamp: 'ssa 11/4/2008 20:19'!\nadjustScaler\n\n\t^false! !\n\n!RVMTileStripChartController methodsFor: 'menu messages' stamp: 'ssa 1/1/1970 15:14'!\neraseStrip: coreIndex\n\n\tself view eraseStrip! !\n\n!RVMTileStripChartController methodsFor: 'menu messages' stamp: 'ssa 1/1/1970 01:40'!\nredraw: coreIndex\n\tself view okToDisplay: true.\n\tself view redrawOnCanvas.\n\tself view displayView! !\n\n!RVMTileStripChartController methodsFor: 'menu messages' stamp: 'ssa 10/3/2008 21:43'!\nrescale: coreIndex\n\tself view okToDisplay: true.\n\tself view rescale.\n\tself view displayView! !\n\n!RVMTileStripChartController methodsFor: 'menu messages' stamp: 'ssa 10/3/2008 21:27'!\nyellowButtonMenu\n\n\t| menu |\n\tmenu _ super yellowButtonMenu.\n\tmenu add: 'erase strip' action: #eraseStrip:.\n\tmenu add: 'redraw' action: #redraw:.\n\tmenu add: 'rescale' action: #rescale:.\n\t^menu! !\n\n!RVMTileStripChartController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 16:20'!\ncoreIndexAt: aPoint\n\n\t| p |\n\tp _ aPoint y - self view insetDisplayBox origin y // self view boxSize.\n\t^p max:1! !\n\n!RVMTileStripChartScalerView methodsFor: 'displaying' stamp: 'ssa 10/3/2008 21:02'!\ndrawOnCanvas\n\t| color  |\n\tself canvas displayOn: self canvas at: self boxSize negated @0.\n1 to: self count do:[:index|\n\tcolor := self colors at: ((self scaler scale:(self data at: index))  min:  self numberOfColors max:1).\n\t\tself canvas fill: ((self boxes at: index) translateBy: self insetDisplayBox origin negated )fillColor: color].\n! !\n\n!RVMTileStripChartScalerView methodsFor: 'displaying' stamp: 'ssa 10/28/2008 20:51'!\nredrawOnCanvas\n\t| color x |\n\t[#redrawScaler print].\n\tself canvas fillWhite.\n\tx _ 0.\n\tself previousData asOrderedCollection reversed do:[:oldData|\n\t1 to: self count do: [:index | \n\t\t\tcolor := self colors at: ((self scaler scale:(oldData at: index))  min:  self numberOfColors max:1).\n\t\t\tself canvas\n\t\t\t\tfill: ((self boxes at: index)\n\t\t\t\t\t\ttranslateBy: self insetDisplayBox origin negated - (x@0))\n\t\t\t\tfillColor: color].\n\t\t\tx _ x + self boxSize]! !\n\n!RVMTileStripChartScalerView methodsFor: 'scaling' stamp: 'ssa 10/6/2008 16:30'!\nrescale\n\t\"Reset the scaler and pass the previous data thorugh it to find the min/max.\n\tThen redraw\"\n\t[#rescaling print].\n\tself scaler resetScaling.\n\tself previousData do:[:dats| dats do:[:d| scaler scale: d]].\n\tself scaler resetOutOfRangeDetector.\n\t\tself redrawOnCanvas! !\n\n!RVMTileStripChartScalerView methodsFor: 'listening' stamp: 'ssa 11/4/2008 19:50'!\nhear: someObject\n\n\tself sample: nil.\n\t\"self rescaleCounter: self rescaleCounter - 1.\n\tself rescaleCounter = 0 ifTrue:[self rescaleCounter:nil.  \n\t\tself rescale]. \n\tself scaler outOfRangeDetected \n\t\tifTrue:[[('out of range = ',self scaler lastObserved printString) print].\n\t\t\tself rescale].\"\n\tself drawOnCanvas.\n\tself topView isCollapsed ifFalse:[self displayView].\n! !\n\n!RVMTileStripChartScalerView methodsFor: 'accessing' stamp: 'ssa 10/3/2008 21:06'!\naspect: aSymbol.\n\tself scaler: nil.\n\tsuper aspect: aSymbol! !\n\n!RVMTileStripChartScalerView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 20:51'!\nrescaleCounter\n\t\"Answer the value of rescaleCounter\"\n\n\trescaleCounter isNil ifTrue:[self rescaleCounter: 1].\n\t^ rescaleCounter! !\n\n!RVMTileStripChartScalerView methodsFor: 'accessing' stamp: 'ssa 10/3/2008 22:09'!\nrescaleCounter: anObject\n\t\"Set the value of rescaleCounter\"\n\n\trescaleCounter _ anObject ! !\n\n!RVMTileStripChartScalerView methodsFor: 'accessing' stamp: 'ssa 10/3/2008 21:04'!\nscaler\n\t\"Answer the value of scaler\"\n\n\tscaler isNil ifTrue:[self scaler: (RVMMonitor scalerFor: self aspect)].\n\t^ scaler! !\n\n!RVMTileStripChartScalerView methodsFor: 'accessing' stamp: 'ssa 10/3/2008 21:03'!\nscaler: anObject\n\t\"Set the value of scaler\"\n\n\tscaler _ anObject! !\n\n!RVMTileStripChartScalerView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:16'!\ntypeLabel\n\n\t^'Abs: '! !\n\n!RVMTileStripChartScalerView class methodsFor: 'accessing' stamp: 'ssa 11/4/2008 20:20'!\nadjustScaler\n\n\t^true! !\n\n!RVMTileStripChartView methodsFor: 'displaying' stamp: 'ssa 10/21/2008 11:32'!\ndisplayView\n\tself okToDisplay ifFalse:[^self].\n\tself uncache.\n\tself canvas displayOn: Display at: self insetDisplayBox origin clippingBox: self insetDisplayBox.! !\n\n!RVMTileStripChartView methodsFor: 'displaying' stamp: 'ssa 10/3/2008 20:47'!\ndrawOnCanvas\n\t| color colorIndex |\n\t[#draw print].\n\tself canvas displayOn: self canvas at: self boxSize negated @ 0.\n\t1 to: self count do: [:index | \n\t\t\tcolorIndex := ((self data at: index)\n\t\t\t\t\t\t/ self scale min: self numberOfColors max: 1) rounded.\n\t\t\tcolor := self colors at: colorIndex.\n\t\t\tself canvas\n\t\t\t\tfill: ((self boxes at: index)\n\t\t\t\t\t\ttranslateBy: self insetDisplayBox origin negated)\n\t\t\t\tfillColor: color]! !\n\n!RVMTileStripChartView methodsFor: 'displaying' stamp: 'ssa 1/1/1970 01:38'!\neraseStrip\n\tself previousData:nil.\n\tself canvas fillWhite.\n\t\n\tself displayView! !\n\n!RVMTileStripChartView methodsFor: 'displaying' stamp: 'ssa 10/3/2008 20:27'!\nredrawOnCanvas\n\t| color colorIndex x |\n\t#redraw print.\n\tself canvas fillWhite.\n\tx _ 0.\n\tself previousData do:[:oldData|\n\t1 to: self count do: [:index | \n\t\t\tcolorIndex := ((oldData at: index)\n\t\t\t\t\t\t/ self scale min: self numberOfColors max: 1) rounded.\n\t\t\tcolor := self colors at: colorIndex.\n\t\t\tself canvas\n\t\t\t\tfill: ((self boxes at: index)\n\t\t\t\t\t\ttranslateBy: self insetDisplayBox origin negated - (x@0))\n\t\t\t\tfillColor: color].\n\t\t\tx _ x + self boxSize]! !\n\n!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 10/3/2008 20:37'!\naspect: anObject\n\t\"Set the value of aspect\"\n\n\tsuper aspect: anObject.\n\tself eraseStrip! !\n\n!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 8/22/2008 08:48'!\nbox\n\t\"Answer the value of box\"\n\n\tbox isNil ifTrue:[self box: (self insetDisplayBox topRight - (self boxSize @ 0) extent: self boxSize @ self insetDisplayBox height)].\n\t^box! !\n\n!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 8/22/2008 09:02'!\nbox: anObject\n\t\"Set the value of box\"\n\n\tbox := anObject.\n\tself boxes:nil.\n\tself boxSize: nil! !\n\n!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 5/4/2010 15:24'!\nboxSize\n\t\"Answer the value of boxSize\"\n\n\tboxSize isNil ifTrue:[self boxSize: ((self insetDisplayBox height // self count max:1)min:4)].\n\t^boxSize! !\n\n!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 8/20/2008 16:30'!\nboxSize: anObject\n\t\"Set the value of boxSize\"\n\n\tboxSize := anObject! !\n\n!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 4/20/2010 10:23'!\nboxes\n\t\"Answer the value of boxes\"\n\n\tboxes isNil ifTrue:[self boxes: (self box subDivideRoundedBy: 1@ self count)].\n\t^boxes! !\n\n!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 8/20/2008 16:30'!\nboxes: anObject\n\t\"Set the value of boxes\"\n\n\tboxes := anObject! !\n\n!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 10/9/2008 11:42'!\nchart\n\t\"Answer the value of chart\"\n\n\tchart isNil ifTrue:[self chart: (Form fromDisplay: self insetDisplayBox)].\n\t^chart! !\n\n!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 8/20/2008 16:33'!\nchart: anObject\n\t\"Set the value of chart\"\n\n\tchart := anObject! !\n\n!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 8/20/2008 16:32'!\ncount\n\t\"Answer the value of count\"\n\n\tcount isNil ifTrue:[self count: self data size].\n\t^count! !\n\n!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 8/20/2008 16:30'!\ncount: anObject\n\t\"Set the value of count\"\n\n\tcount := anObject! !\n\n!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:36'!\ndata: someData\n\n\tsuper data: someData.\n\tsomeData notNil ifTrue:[self previousData add: someData]! !\n\n!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:00'!\npreviousData\n\t\"Answer the value of previousData\"\n\n\tpreviousData isNil ifTrue:[self previousData: (RVMCircularCollection new: self visibleSampleCount)].\n\t^previousData! !\n\n!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 8/20/2008 16:28'!\npreviousData: anObject\n\t\"Set the value of previousData\"\n\n\tpreviousData := anObject! !\n\n!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 10/3/2008 20:41'!\nscale: aValue\n\t\"Set the value of scale\"\n\n\tsuper scale: aValue.\n\t\"aValue isNil ifFalse:[self redrawOnCanvas]\"! !\n\n!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 8/20/2008 17:22'!\nunlock\n\n\tsuper unlock.\n\tself box:nil\n! !\n\n!RVMTileStripChartView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 01:06'!\nvisibleSampleCount\n\t\"How many samples (columns of boxes) can I currently display?\"\n\t\n\t^self chart boundingBox width // self boxSize! !\n\n!RVMTileStripChartView methodsFor: 'updating' stamp: 'ssa 10/3/2008 20:34'!\nhear: someObject\n\n\tself sample: nil.\n\tself drawOnCanvas.\n\tself topView isCollapsed ifFalse:[self displayView]! !\n\n!RVMTileStripChartView methodsFor: 'updating' stamp: 'ssa 1/1/1970 00:10'!\nnewFrame\n\n\tsuper newFrame.\n\tself canvas:nil.\n\tself box: nil! !\n\n!RVMTileStripChartView methodsFor: 'controller access' stamp: 'ssa 1/1/1970 00:30'!\ndefaultControllerClass\n\t^RVMTileStripChartController! !\n\n!RVMTileStripChartView methodsFor: 'scaling' stamp: 'ssa 10/3/2008 22:26'!\nrescale\n\n\t\"do nothing\"! !\n\n!RVMTileStripChartView class methodsFor: 'examples' stamp: 'ssa 11/4/2008 20:18'!\nexample\n\t\"RVMTileStripChartView example\"\n\t\n\t| topView v scaleWidth stripWidth |\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\tscaleWidth _ 70.\n\tstripWidth _ 200.\n\ttopView minimumSize: stripWidth+scaleWidth@200.\n\ttopView maximumSize: 1000@400.\n\ttopView addSubView: (v := self new) viewport: (scaleWidth@0 extent: stripWidth@200).\n\ttopView addSubView: (RVMColorScaleView aspectSource: [v aspect] scalerSource: [v scaler] colorsSource: [v colors reverse] orientation: #vertical  forView: v adjustScaler: self adjustScaler) viewport:(0@0 extent:scaleWidth@200).\n\ttopView label: v typeLabel,v aspect.\n\ttopView controller open! !\n\n!RVMTileStripChartView class methodsFor: 'examples' stamp: 'ssa 1/1/1970 00:16'!\nexample1\n\t\"RVMTileStripChartView example1\"\n\t\n\tself openOnAspect: #bytesUseds! !\n\n!RVMTileStripChartView class methodsFor: 'scheduling' stamp: 'ssa 1/1/1970 00:16'!\nopenOnAspect: aSymbol\n\t\"Open a new monitor on this aspect\"\n\t| topView v |\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\ttopView minimumSize: 200@200.\n\ttopView maximumSize: 600@400.\n\ttopView insideColor: Color white.\n\tv := self new.\n\tv aspect: aSymbol.\n\ttopView addSubView: v.\n\ttopView label: v typeLabel,aSymbol.\n\ttopView controller open! !\n\n!RVMTraceUIHolderView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:37'!\nstripChart\n\t\"Answer the value of stripChart\"\n\n\t^ stripChart! !\n\n!RVMTraceUIHolderView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:37'!\nstripChart: anObject\n\t\"Set the value of stripChart\"\n\n\tstripChart _ anObject! !\n\n!RVMTraceUIHolderView methodsFor: 'controller access' stamp: 'ssa 1/1/1970 00:39'!\ndefaultControllerClass\n\n\t^RVMTraceUIHolderController! !\n\n!RVMTraceUIHolderView methodsFor: 'subView inserting' stamp: 'ssa 1/1/1970 00:19'!\nmyControls\n\t\"Add the button to use to modify the number of traces my stripchart uses\"\n\t| addTraceButton removeTraceButton holder |\n\taddTraceButton _ RVMButtonView  label:'+' action:[self addTrace].\n\tremoveTraceButton _ RVMButtonView  label:'-' action:[self removeTrace].\n\tholder _ RVMView new.\n\tholder addSubView: addTraceButton.\n\tholder addSubView: removeTraceButton toRightOf: addTraceButton.\n\t^holder! !\n\n!RVMTraceUIHolderView methodsFor: 'subView inserting' stamp: 'ssa 1/1/1970 00:15'!\nrebuildSubViews\n\n\t| allSubs lastGroup holder last |\n\tallSubs _ self stripChart traces collect:[:trace| trace allView].\n\tlastGroup _ nil.\n\tallSubs groupsOfNoMoreThan: 3 atATimeDo:[:group| \n\t\tholder _ RVMView new.\n\t\tlast _ nil.\n\t\tgroup do:[:v| holder addSubView: v  toRightOf: last.   last _ v].\n\tself addSubView:holder below: lastGroup.\n\tlastGroup _ holder].\n! !\n\n!RVMTraceUIHolderView class methodsFor: 'instance creation' stamp: 'ssa 1/1/1970 00:55'!\nforStripChart: aViewWithTraces\n\n\t| v |\n\tv _ self new.\n\tv stripChart: aViewWithTraces.\n\tv rebuildSubViews.\n\t^v! !\n\n!RVMValueController methodsFor: 'controlling' stamp: 'ssa 9/19/2008 11:51'!\nadjustCursor\n\t\"Show the appropriate arrow cursor\"\n\t(Sensor cursorPoint x - self view insetDisplayBox center x )> 0 \n\t\tifTrue:[Cursor up show]\n\t\tifFalse:[Cursor down show].\n! !\n\n!RVMValueController methodsFor: 'controlling' stamp: 'ssa 9/19/2008 11:50'!\ncontrolActivity\n\t\"Show the appropriate arrow cursor, then default to other controlActivity\"\n\tself adjustCursor.\n\tsuper controlActivity! !\n\n!RVMValueController methodsFor: 'controlling' stamp: 'ssa 9/19/2008 11:34'!\ncontrolTerminate\n\tCursor normal show.\n\tsuper controlTerminate! !\n\n!RVMValueController methodsFor: 'controlling' stamp: 'ssa 9/19/2008 11:49'!\nredButtonActivity\n\t| point center delta sign delay |\n\tcenter _ self view insetDisplayBox center.\n\tdelay _ Delay forMilliseconds: 100.\n\t[Sensor redButtonPressed]\n\t\twhileTrue: [self adjustCursor.\n\t\t\tpoint := Sensor cursorPoint.\n\t\t\tdelta _ (point x - center x).\n\t\t\tsign _ delta < 0 ifTrue:[-1]ifFalse:[1].\n\t\t\tdelta _ delta abs max:1.\n\t\t\tdelta >10 ifFalse:[delta _ 1].\n\t\t\tself view changeValueBy: (delta * sign).\n\t\t\tdelay wait]! !\n\n!RVMValueController methodsFor: 'controlling' stamp: 'ssa 1/1/1970 00:15'!\nyellowButtonActivity\n\n\t| result |\n\tself view dontDisplayWhile:[\n\tresult _ FillInTheBlank request: 'Enter the new value' initialAnswer: self view value printString.\n\tresult notNil ifTrue:[self view value: (Compiler evaluate: result).\n\t\tself view displayView] ]! !\n\n!RVMValueEditorController methodsFor: 'controller access' stamp: 'ssa 10/29/2008 21:32'!\ndefaultControllerClass\n\n\t^RVMValueEditorController! !\n\n!RVMValueEditorController methodsFor: 'controlling' stamp: 'ssa 11/4/2008 20:47'!\nredButtonActivity\n\n\t| p wait delay |\n\tdelay _ Delay forMilliseconds: 100.\n\twait _ [Sensor leftShiftDown ifFalse:[Sensor waitNoButton] ifTrue:[delay wait]].\n\tp _ Sensor cursorPoint - self view insetDisplayBox origin.\n\t(self view lockBox containsPoint: p) ifTrue:[self view locked: self view locked not. self view displayView.  ^Sensor waitNoButton.].\n\t(self view oneBox containsPoint: p) ifTrue:[self view performOperationWith: 1.  ^wait value].\n\t(self view tenBox containsPoint: p) ifTrue:[self view performOperationWith: 10.  ^wait value].\n\t(self view hundredBox containsPoint: p) ifTrue:[self view performOperationWith: 100.  ^wait value].\n\t(self view zeroBox containsPoint: p) ifTrue:[^self view resetValueToZero].\n\tself view operations with: self view operationBoxes do:[:op :bx|\n\t\t(bx containsPoint: p) ifTrue:[self view operation: op.  ^self view displayView]]! !\n\n!RVMValueEditorController methodsFor: 'controlling' stamp: 'ssa 11/4/2008 19:35'!\nyellowButtonActivity\n\n\t| result |\n\tself view topView dontDisplayWhile:[\n\tresult _ FillInTheBlank request: 'Enter the new value' initialAnswer: self view value printString.\n\tresult notNil ifTrue:[self view value: (Compiler evaluate: result).\n\t\tself view displayView] ]! !\n\n!RVMValueEditorView methodsFor: 'displaying' stamp: 'ssa 10/29/2008 20:27'!\nclosedPadlock\n^((ColorForm\n\textent: 14@16\n\tdepth: 8\n\tfromArray: #( 0 2511181205 2912223232 0 197 2097152000 7456089 0 51549 9817545 2908582317 0 7456000 2915368960 2915893445 1895825408 9276765 3445161984 13473173 2365587456 9276813 3439329280 13473173 2365587456 7712141 3036678400 12167597 1962934272 1701414249 2171169129 1770357121 2237988864 2634354961 286331153 286331153 228392960 2702252313 421075225 286857497 834732032 3625525537 555819297 555819321 1103167488 4011402533 623191333 623984969 905641984 4012455225 892942657 1094797621 1374617600 3693688117 892679497 893995345 1241186304 4012193065 1094795573 1363752273 1375404032 3504924904 3253266652 3705461980 3704619008)\n\toffset: 0@0)\n\tcolorsFromArray: #(#(1.0 1.0 1.0) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.376) #(0.972 0.972 0.376) #(0.972 0.972 0.376) #(0.972 0.972 0.376) #(0.972 0.94 0.909) #(0.972 0.94 0.909) #(0.972 0.94 0.909) #(0.972 0.94 0.909) #(0.972 0.94 0.25) #(0.972 0.94 0.25) #(0.972 0.94 0.25) #(0.972 0.94 0.25) #(0.972 0.94 0.219) #(0.972 0.94 0.219) #(0.972 0.94 0.219) #(0.972 0.94 0.219) #(0.972 0.94 0.188) #(0.972 0.94 0.188) #(0.972 0.94 0.188) #(0.972 0.94 0.188) #(0.972 0.878 0.156) #(0.972 0.878 0.156) #(0.972 0.878 0.156) #(0.972 0.878 0.156) #(0.972 0.878 0.125) #(0.972 0.878 0.125) #(0.972 0.878 0.125) #(0.972 0.878 0.125) #(0.972 0.815 0.094) #(0.972 0.815 0.094) #(0.972 0.815 0.094) #(0.972 0.815 0.094) #(0.972 0.784 0.094) #(0.972 0.784 0.094) #(0.972 0.784 0.094) #(0.972 0.784 0.094) #(0.972 0.721 0.094) #(0.972 0.721 0.094) #(0.972 0.721 0.094) #(0.972 0.721 0.094) #(0.972 0.721 0.063) #(0.972 0.721 0.063) #(0.972 0.721 0.063) #(0.972 0.721 0.063) #(0.972 0.69 0.031) #(0.972 0.69 0.031) #(0.972 0.69 0.031) #(0.972 0.69 0.031) #(0.972 0.658 0.063) #(0.972 0.658 0.063) #(0.972 0.658 0.063) #(0.972 0.658 0.063) #(0.972 0.658 0.031) #(0.972 0.658 0.031) #(0.972 0.658 0.031) #(0.972 0.658 0.031) #(0.972 0.627 0.031) #(0.972 0.627 0.031) #(0.972 0.627 0.031) #(0.972 0.627 0.031) #(0.972 0.595 0.031) #(0.972 0.595 0.031) #(0.972 0.595 0.031) #(0.972 0.595 0.031) #(0.972 0.564 0.031) #(0.972 0.564 0.031) #(0.972 0.564 0.031) #(0.972 0.564 0.031) #(0.972 0.533 0.0) #(0.972 0.533 0.0) #(0.972 0.533 0.0) #(0.972 0.533 0.0) #(0.972 0.501 0.0) #(0.972 0.501 0.0) #(0.972 0.501 0.0) #(0.972 0.501 0.0) #(0.972 0.47 0.0) #(0.972 0.47 0.0) #(0.972 0.47 0.0) #(0.972 0.47 0.0) #(0.94 0.94 0.972) #(0.94 0.94 0.972) #(0.94 0.94 0.972) #(0.94 0.94 0.972) #(0.909 0.909 0.94) #(0.909 0.909 0.94) #(0.909 0.909 0.94) #(0.909 0.909 0.94) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.69 0.501) #(0.878 0.69 0.501) #(0.878 0.69 0.501) #(0.878 0.69 0.501) #(0.878 0.658 0.345) #(0.878 0.658 0.345) #(0.878 0.658 0.345) #(0.878 0.658 0.345) #(0.878 0.658 0.313) #(0.878 0.658 0.313) #(0.878 0.658 0.313) #(0.878 0.658 0.313) #(0.847 0.847 0.878) #(0.847 0.847 0.878) #(0.847 0.847 0.878) #(0.847 0.847 0.878) #(0.847 0.784 0.721) #(0.847 0.784 0.721) #(0.847 0.784 0.721) #(0.847 0.784 0.721) #(0.847 0.784 0.69) #(0.847 0.784 0.69) #(0.847 0.784 0.69) #(0.847 0.784 0.69) #(0.815 0.815 0.847) #(0.815 0.815 0.847) #(0.815 0.815 0.847) #(0.815 0.815 0.847) #(0.815 0.627 0.282) #(0.815 0.627 0.282) #(0.815 0.627 0.282) #(0.815 0.627 0.282) #(0.784 0.595 0.282) #(0.784 0.595 0.282) #(0.784 0.595 0.282) #(0.784 0.595 0.282) #(0.784 0.595 0.25) #(0.784 0.595 0.25) #(0.784 0.595 0.25) #(0.784 0.595 0.25) #(0.753 0.753 0.784) #(0.753 0.753 0.784) #(0.753 0.753 0.784) #(0.753 0.753 0.784) #(0.753 0.721 0.721) #(0.753 0.721 0.721) #(0.753 0.721 0.721) #(0.753 0.721 0.721) #(0.721 0.721 0.784) #(0.721 0.721 0.784) #(0.721 0.721 0.784) #(0.721 0.721 0.784) #(0.721 0.721 0.753) #(0.721 0.721 0.753) #(0.721 0.721 0.753) #(0.721 0.721 0.753) #(0.721 0.501 0.156) #(0.721 0.501 0.156) #(0.721 0.501 0.156) #(0.721 0.501 0.156) #(0.721 0.47 0.125) #(0.721 0.47 0.125) #(0.721 0.47 0.125) #(0.721 0.47 0.125) #(0.69 0.69 0.753) #(0.69 0.69 0.753) #(0.69 0.69 0.753) #(0.69 0.69 0.753) #(0.69 0.658 0.658) #(0.69 0.658 0.658) #(0.69 0.658 0.658) #(0.69 0.658 0.658) #(0.658 0.658 0.721) #(0.658 0.658 0.721) #(0.658 0.658 0.721) #(0.658 0.658 0.721) #(0.658 0.658 0.69) #(0.658 0.658 0.69) #(0.658 0.658 0.69) #(0.658 0.658 0.69) #(0.627 0.533 0.501) #(0.627 0.533 0.501) #(0.627 0.533 0.501) #(0.627 0.533 0.501) #(0.627 0.533 0.47) #(0.627 0.533 0.47) #(0.627 0.533 0.47) #(0.627 0.533 0.47) #(0.627 0.408 0.125) #(0.627 0.408 0.125) #(0.627 0.408 0.125) #(0.627 0.408 0.125) #(0.627 0.345 0.063) #(0.627 0.345 0.063) #(0.627 0.345 0.063) #(0.627 0.345 0.063) #(0.595 0.595 0.69) #(0.595 0.595 0.69) #(0.595 0.595 0.69) #(0.595 0.595 0.69) #(0.564 0.564 0.658) #(0.564 0.564 0.658) #(0.564 0.564 0.658) #(0.564 0.564 0.658) #(0.533 0.533 0.595) #(0.533 0.533 0.595) #(0.533 0.533 0.595) #(0.533 0.408 0.313) #(0.533 0.408 0.313) #(0.533 0.408 0.313) #(0.533 0.408 0.313) #(0.533 0.376 0.313) #(0.533 0.376 0.313) #(0.533 0.376 0.313) #(0.533 0.376 0.313) #(0.533 0.313 0.094) #(0.533 0.313 0.094) #(0.533 0.313 0.094) #(0.533 0.313 0.094) #(0.533 0.282 0.094) #(0.533 0.282 0.094) #(0.533 0.282 0.094) #(0.533 0.282 0.094) #(0.501 0.533 0.595) #(0.501 0.533 0.595) #(0.501 0.533 0.595) #(0.501 0.533 0.595) #(0.501 0.501 0.595) #(0.501 0.501 0.595) #(0.501 0.501 0.595) #(0.501 0.501 0.595) #(0.501 0.313 0.125) #(0.501 0.313 0.125) #(0.501 0.313 0.125) #(0.501 0.313 0.125) #(0.501 0.25 0.063) #(0.501 0.25 0.063) #(0.501 0.25 0.063) #(0.47 0.282 0.094) #(0.47 0.282 0.094) #(0.47 0.282 0.094) #(0.47 0.282 0.094) #(0.47 0.25 0.094) #(0.47 0.25 0.094) #(0.47 0.25 0.094) #(0.47 0.25 0.094) #(0.47 0.25 0.063) #(0.47 0.25 0.063) #(0.47 0.25 0.063) #(0.47 0.25 0.063) #(0.47 0.219 0.063) #(0.47 0.219 0.063) #(0.47 0.219 0.063) #(0.47 0.219 0.063) #(0.0 0.0 0.0)  ))! !\n\n!RVMValueEditorView methodsFor: 'displaying' stamp: 'ssa 11/4/2008 20:03'!\ndisplayView\n\n\tself box.\n\tself okToDisplay ifFalse:[^self].\n\tself uncache.\n\t((self lastValue = self value and:[self lastOp  = self operation])and:[self lastLocked = self locked])ifFalse:[\n\t\tself drawOnCanvas].\n\tself canvas displayAt: self insetDisplayBox origin\n! !\n\n!RVMValueEditorView methodsFor: 'displaying' stamp: 'ssa 11/4/2008 20:03'!\ndrawOnCanvas\n\n\t| lock lt vt ot nt val |\n\tself box.\n\tself canvas fillWhite.\n\tlock _ self lockForm.\n\tself lastLocked: self locked.\n\tlock displayOn: self canvas at: self lockBox center - lock boundingBox center clippingBox: self lockBox.\n\tself lockBox displayOn: self canvas withBorderWidths:#(0 0 0 1).\n\t(lt _ (' ',label) asDisplayText) displayOn: self canvas at: self prefixBox leftCenter - (0@lt boundingBox leftCenter y) clippingBox: self prefixBox.\n\tself prefixBox displayOn: self canvas withBorderWidths:#(1 0 0 1).\n\tval _ self value.\n\t(vt _ val printShowingMax3Digits asDisplayText) displayOn: self canvas at: self valueBox leftCenter - vt boundingBox leftCenter clippingBox: self valueBox.\n\tself lastValue: val.\n\tself valueBox displayOn: self canvas withBorderWidths:#(0 0 0 1).\n\tself operationBoxes with: self operations do:[:bx :op|\n\t\t\t(ot _  op asString asDisplayText) displayOn: self canvas at: bx center - ot boundingBox center-(0@((#(/ + -) includes: op) ifTrue:[2]ifFalse:[1])) clippingBox: bx.\n\t\t\t\tbx displayOn: self canvas withBorderWidths:#(1 0 0 1).\n\t\t\t\top = self operation ifTrue:[self lastOp: op.\n\t\t\t\t\tself canvas reverse: (bx insetBy:1)].\n].\n\tself numberBoxes with: #(1 10 100 0) do:[:bx :num|\n\t\t\t(nt _  num printString asDisplayText) displayOn: self canvas at: bx center - nt boundingBox center clippingBox: bx.\n\t\t\tbx displayOn: self canvas withBorderWidths:#(1 0 0 1)].\n\t\n\n\t! !\n\n!RVMValueEditorView methodsFor: 'displaying' stamp: 'ssa 10/29/2008 21:25'!\nlockForm\n\n\t^self locked\n\t\tifTrue:[self closedPadlock]\n\t\tifFalse:[self openPadlock]! !\n\n!RVMValueEditorView methodsFor: 'displaying' stamp: 'ssa 10/29/2008 20:27'!\nopenPadlock\n^((ColorForm\n\textent: 20@16\n\tdepth: 8\n\tfromArray: #( 146 2861732522 2449473536 0 0 5614218 0 1841452288 0 0 12741888 3334915730 5882368 0 0 1839879626 2852126914 2852170349 0 0 2324859594 0 3396178570 0 0 2324859594 0 3396176522 0 0 1908838070 0 2995956337 0 0 0 24962 2122220133 1701143938 2122220129 0 39429 151850253 218959117 218958234 0 40461 353178901 353178901 353709502 0 54805 488447261 488447261 490028478 0 60957 556605729 556605733 1027944954 0 60961 824522037 825310525 1160859118 0 60965 825569585 1027423557 1162692090 0 60961 824524093 893732165 1162694126 0 52966 3873888954 3873888998 3873102542)\n\toffset: 0@0)\n\tcolorsFromArray: #(#(1.0 1.0 1.0) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.972) #(0.972 0.972 0.376) #(0.972 0.972 0.376) #(0.972 0.972 0.376) #(0.972 0.972 0.376) #(0.972 0.94 0.25) #(0.972 0.94 0.25) #(0.972 0.94 0.25) #(0.972 0.94 0.25) #(0.972 0.94 0.219) #(0.972 0.94 0.219) #(0.972 0.94 0.219) #(0.972 0.94 0.219) #(0.972 0.94 0.188) #(0.972 0.94 0.188) #(0.972 0.94 0.188) #(0.972 0.94 0.188) #(0.972 0.878 0.156) #(0.972 0.878 0.156) #(0.972 0.878 0.156) #(0.972 0.878 0.156) #(0.972 0.878 0.125) #(0.972 0.878 0.125) #(0.972 0.878 0.125) #(0.972 0.878 0.125) #(0.972 0.815 0.094) #(0.972 0.815 0.094) #(0.972 0.815 0.094) #(0.972 0.815 0.094) #(0.972 0.784 0.094) #(0.972 0.784 0.094) #(0.972 0.784 0.094) #(0.972 0.784 0.094) #(0.972 0.721 0.094) #(0.972 0.721 0.094) #(0.972 0.721 0.094) #(0.972 0.721 0.094) #(0.972 0.721 0.063) #(0.972 0.721 0.063) #(0.972 0.721 0.063) #(0.972 0.721 0.063) #(0.972 0.69 0.031) #(0.972 0.69 0.031) #(0.972 0.69 0.031) #(0.972 0.69 0.031) #(0.972 0.658 0.063) #(0.972 0.658 0.063) #(0.972 0.658 0.063) #(0.972 0.658 0.063) #(0.972 0.658 0.031) #(0.972 0.658 0.031) #(0.972 0.658 0.031) #(0.972 0.658 0.031) #(0.972 0.627 0.031) #(0.972 0.627 0.031) #(0.972 0.627 0.031) #(0.972 0.627 0.031) #(0.972 0.595 0.031) #(0.972 0.595 0.031) #(0.972 0.595 0.031) #(0.972 0.595 0.031) #(0.972 0.564 0.031) #(0.972 0.564 0.031) #(0.972 0.564 0.031) #(0.972 0.564 0.031) #(0.972 0.533 0.0) #(0.972 0.533 0.0) #(0.972 0.533 0.0) #(0.972 0.533 0.0) #(0.972 0.501 0.0) #(0.972 0.501 0.0) #(0.972 0.501 0.0) #(0.972 0.501 0.0) #(0.972 0.47 0.0) #(0.972 0.47 0.0) #(0.972 0.47 0.0) #(0.972 0.47 0.0) #(0.94 0.94 0.972) #(0.94 0.94 0.972) #(0.94 0.94 0.972) #(0.94 0.94 0.972) #(0.909 0.909 0.94) #(0.909 0.909 0.94) #(0.909 0.909 0.94) #(0.909 0.909 0.94) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.909 0.909 0.909) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.878 0.878) #(0.878 0.69 0.501) #(0.878 0.69 0.501) #(0.878 0.69 0.501) #(0.878 0.69 0.501) #(0.878 0.658 0.345) #(0.878 0.658 0.345) #(0.878 0.658 0.345) #(0.878 0.658 0.345) #(0.878 0.658 0.313) #(0.878 0.658 0.313) #(0.878 0.658 0.313) #(0.878 0.658 0.313) #(0.847 0.847 0.878) #(0.847 0.847 0.878) #(0.847 0.847 0.878) #(0.847 0.847 0.878) #(0.847 0.784 0.721) #(0.847 0.784 0.721) #(0.847 0.784 0.721) #(0.847 0.784 0.721) #(0.847 0.784 0.69) #(0.847 0.784 0.69) #(0.847 0.784 0.69) #(0.847 0.784 0.69) #(0.815 0.815 0.847) #(0.815 0.815 0.847) #(0.815 0.815 0.847) #(0.815 0.815 0.847) #(0.815 0.815 0.847) #(0.815 0.627 0.282) #(0.815 0.627 0.282) #(0.815 0.627 0.282) #(0.815 0.627 0.282) #(0.784 0.595 0.282) #(0.784 0.595 0.282) #(0.784 0.595 0.282) #(0.784 0.595 0.282) #(0.784 0.595 0.25) #(0.784 0.595 0.25) #(0.784 0.595 0.25) #(0.784 0.595 0.25) #(0.753 0.753 0.784) #(0.753 0.753 0.784) #(0.753 0.753 0.784) #(0.753 0.753 0.784) #(0.753 0.721 0.721) #(0.753 0.721 0.721) #(0.753 0.721 0.721) #(0.753 0.721 0.721) #(0.721 0.721 0.784) #(0.721 0.721 0.784) #(0.721 0.721 0.784) #(0.721 0.721 0.784) #(0.721 0.721 0.753) #(0.721 0.721 0.753) #(0.721 0.721 0.753) #(0.721 0.721 0.753) #(0.721 0.501 0.156) #(0.721 0.501 0.156) #(0.721 0.501 0.156) #(0.721 0.501 0.156) #(0.721 0.47 0.125) #(0.721 0.47 0.125) #(0.721 0.47 0.125) #(0.721 0.47 0.125) #(0.69 0.69 0.753) #(0.69 0.69 0.753) #(0.69 0.69 0.753) #(0.69 0.69 0.753) #(0.69 0.658 0.658) #(0.69 0.658 0.658) #(0.69 0.658 0.658) #(0.69 0.658 0.658) #(0.658 0.658 0.721) #(0.658 0.658 0.721) #(0.658 0.658 0.721) #(0.658 0.658 0.721) #(0.658 0.658 0.69) #(0.658 0.658 0.69) #(0.658 0.658 0.69) #(0.658 0.658 0.69) #(0.627 0.533 0.501) #(0.627 0.533 0.501) #(0.627 0.533 0.501) #(0.627 0.533 0.501) #(0.627 0.533 0.47) #(0.627 0.533 0.47) #(0.627 0.533 0.47) #(0.627 0.533 0.47) #(0.627 0.408 0.125) #(0.627 0.408 0.125) #(0.627 0.408 0.125) #(0.627 0.408 0.125) #(0.627 0.345 0.063) #(0.627 0.345 0.063) #(0.627 0.345 0.063) #(0.627 0.345 0.063) #(0.595 0.595 0.69) #(0.595 0.595 0.69) #(0.595 0.595 0.69) #(0.595 0.595 0.69) #(0.564 0.564 0.658) #(0.564 0.564 0.658) #(0.564 0.564 0.658) #(0.564 0.564 0.658) #(0.533 0.533 0.595) #(0.533 0.533 0.595) #(0.533 0.533 0.595) #(0.533 0.533 0.595) #(0.533 0.408 0.313) #(0.533 0.408 0.313) #(0.533 0.408 0.313) #(0.533 0.408 0.313) #(0.533 0.376 0.313) #(0.533 0.376 0.313) #(0.533 0.376 0.313) #(0.533 0.376 0.313) #(0.533 0.313 0.094) #(0.533 0.313 0.094) #(0.533 0.313 0.094) #(0.533 0.313 0.094) #(0.533 0.282 0.094) #(0.533 0.282 0.094) #(0.533 0.282 0.094) #(0.533 0.282 0.094) #(0.501 0.533 0.595) #(0.501 0.533 0.595) #(0.501 0.533 0.595) #(0.501 0.533 0.595) #(0.501 0.501 0.595) #(0.501 0.501 0.595) #(0.501 0.501 0.595) #(0.501 0.501 0.595) #(0.501 0.313 0.125) #(0.501 0.313 0.125) #(0.501 0.313 0.125) #(0.501 0.313 0.125) #(0.501 0.25 0.063) #(0.501 0.25 0.063) #(0.501 0.25 0.063) #(0.501 0.25 0.063) #(0.47 0.282 0.094) #(0.47 0.282 0.094) #(0.47 0.282 0.094) #(0.47 0.282 0.094) #(0.47 0.25 0.094) #(0.47 0.25 0.094) #(0.47 0.25 0.094) #(0.47 0.25 0.094) #(0.47 0.25 0.063) #(0.47 0.25 0.063) #(0.47 0.25 0.063) #(0.47 0.25 0.063) #(0.47 0.219 0.063) #(0.47 0.219 0.063) #(0.47 0.219 0.063) #(0.47 0.219 0.063) #(0.47 0.219 0.063) #(0.0 0.0 0.0)  ))! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 11/4/2008 19:20'!\nbox\n\n\tbox isNil ifTrue:[self box: self canvas boundingBox].\n\tbox extent = self insetDisplayBox extent ifFalse:[self box: self canvas boundingBox].\n\t^box! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/29/2008 10:43'!\nbox: anObject\n\t\"Set the value of box\"\n\n\tbox _ anObject.\n\tlockBox _ prefixBox _ valueBox _ operationBox _ oneBox _ tenBox _ hundredBox _ zeroBox _ nil.! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'dmiu 4/18/2011 13:34'!\ncanvas\n\t\"Answer the value of canvas\"\n\n\tcanvas isNil ifTrue:[self canvas: (ColorForm extent:198@26 depth: (8 min: Display depth)) fillWhite].\n\t^ canvas! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 11/4/2008 19:12'!\ncanvas: anObject\n\t\"Set the value of canvas\"\n\n\tcanvas _ anObject! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:51'!\nhundredBox\n\t\"Answer the value of hundredBox\"\n\n\thundredBox isNil ifTrue:[self hundredBox: (self zeroBox topLeft - (self hundredLabel boundingBox width@0) extent: ( self hundredLabel boundingBox width @ self box height))].\n\t^ hundredBox! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:27'!\nhundredBox: anObject\n\t\"Set the value of hundredBox\"\n\n\thundredBox _ anObject! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:50'!\nhundredLabel\n\n\t^' 100 ' asDisplayText! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 11/4/2008 20:02'!\nlastLocked\n\t\"Answer the value of lastLocked\"\n\n\tlastLocked isNil ifTrue:[self lastLocked: nil].\n\t^ lastLocked! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 11/4/2008 20:02'!\nlastLocked: anObject\n\t\"Set the value of lastLocked\"\n\n\tlastLocked _ anObject! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 11/4/2008 19:57'!\nlastOp\n\t\"Answer the value of lastOp\"\n\n\tlastOp isNil ifTrue:[self lastOp: #none].\n\t^ lastOp! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 11/4/2008 19:56'!\nlastOp: anObject\n\t\"Set the value of lastOp\"\n\n\tlastOp _ anObject! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 11/4/2008 19:52'!\nlastValue\n\t\"Answer the value of lastValue\"\n\n\tlastValue isNil ifTrue:[self lastValue: 0.0000000000000001].\n\t^ lastValue! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 11/4/2008 19:51'!\nlastValue: anObject\n\t\"Set the value of lastValue\"\n\n\tlastValue _ anObject! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 11/4/2008 19:43'!\nlockBox\n\t\"Answer the value of lockBox\"\n\n\tlockBox isNil ifTrue:[self lockBox: (self box origin extent: (24@self box height))].\n\t^ lockBox! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:27'!\nlockBox: anObject\n\t\"Set the value of lockBox\"\n\n\tlockBox _ anObject! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/29/2008 20:29'!\nlockGetter\n\t\"Answer the value of lockGetter\"\n\n\tlockGetter isNil ifTrue:[self lockGetter: nil].\n\t^ lockGetter! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/29/2008 20:29'!\nlockGetter: anObject\n\t\"Set the value of lockGetter\"\n\n\tlockGetter _ anObject! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/29/2008 20:29'!\nlockSetter\n\t\"Answer the value of lockSetter\"\n\n\tlockSetter isNil ifTrue:[self lockSetter: nil].\n\t^ lockSetter! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/29/2008 20:29'!\nlockSetter: anObject\n\t\"Set the value of lockSetter\"\n\n\tlockSetter _ anObject! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/29/2008 21:37'!\nlocked\n\t| temp |\n\ttemp _ self lockGetter isSymbol\n\t\t\t\t\t\tifTrue:[self model perform: self lockGetter]\n\t\t\t\t\t\tifFalse:[self lockGetter value].\n\t^temp! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/29/2008 20:31'!\nlocked: aBoolean\n\t\"Set the value of locked\"\n\n\tself lockSetter isSymbol\n\t\tifTrue:[model perform: self lockSetter with: aBoolean]\n\t\tifFalse:[self lockSetter value: aBoolean]! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/29/2008 07:49'!\nnumberBoxes\n\t\"Answer the number boxes\"\n\t^{self oneBox. self tenBox. self hundredBox. self zeroBox}! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:52'!\nnumbersBox\n\t\"Answer the rectangle encompassing all number boxes\"\n\t^((self zeroBox merge: self hundredBox)merge: self tenBox)merge:self oneBox! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:51'!\noneBox\n\t\"Answer the value of oneBox\"\n\n\toneBox isNil ifTrue:[self oneBox: (self tenBox topLeft - (self oneLabel boundingBox width@0) extent: ( self oneLabel boundingBox width @ self box height))].\n\t^ oneBox! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:27'!\noneBox: anObject\n\t\"Set the value of oneBox\"\n\n\toneBox _ anObject! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:49'!\noneLabel\n\n\t^' 1 ' asDisplayText! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:42'!\nopBox\n\t\"Answer the value of opBox, the rectangle sized for a single operation button\"\n\n\t^0@0 extent: (self box height //2) asPoint! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:39'!\noperation\n\t\"Answer the value of operation, #+, #-, #*, or #/\"\n\n\toperation isNil ifTrue:[self operation: #+].\n\t^ operation! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:27'!\noperation: anObject\n\t\"Set the value of operation\"\n\n\toperation _ anObject! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:41'!\noperationBox\n\t\"Answer the value of operationBox\"\n\n\toperationBox isNil ifTrue:[self operationBox: ((self numbersBox topLeft - (self opBox width * 2 @0)extent:self opBox extent * 2))].\n\t^ operationBox! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:27'!\noperationBox: anObject\n\t\"Set the value of operationBox\"\n\n\toperationBox _ anObject! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:45'!\noperationBoxes\n\t\"Answer the boxes for + * - / boxes in \n\t+  |  *\n\t-----\n\t-  |  /\n\torder\"\n\n\t^self operationBox subDivideBy: 2@2! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:47'!\noperations\n\n\t^#(+ * - /)! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:37'!\npostLabelBox\n\t\"Answer the rectangle encompassing all boxes to the left of the label\"\n\t^self operationBox merge: self numbersBox! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:35'!\npreLabelBox\n\t\"Answer the rectangle encompassing all boxes to the right of the label\"\n\t^self lockBox merge: self prefixBox! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:53'!\nprefixBox\n\t\"Answer the value of prefixBox\"\n\n\tprefixBox isNil ifTrue:[self prefixBox: (self lockBox topRight extent: (self label asDisplayText boundingBox width @ self box height))].\n\t^ prefixBox! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:32'!\nprefixBox: anObject\n\t\"Set the value of prefixBox\"\n\n\tprefixBox _ anObject! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:51'!\ntenBox\n\t\"Answer the value of tenBox\"\n\n\ttenBox isNil ifTrue:[self tenBox: (self hundredBox topLeft - (self tenLabel boundingBox width@0) extent: ( self tenLabel boundingBox width @ self box height))].\n\t^ tenBox! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:27'!\ntenBox: anObject\n\t\"Set the value of tenBox\"\n\n\ttenBox _ anObject! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:50'!\ntenLabel\n\n\t^' 10 ' asDisplayText! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:34'!\nvalueBox\n\t\"Answer the value of valueBox\"\n\n\tvalueBox isNil ifTrue:[self valueBox: (self preLabelBox topRight corner: self postLabelBox bottomLeft)].\n\t^ valueBox! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:27'!\nvalueBox: anObject\n\t\"Set the value of valueBox\"\n\n\tvalueBox _ anObject! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:49'!\nzeroBox\n\t\"Answer the value of zeroBox\"\n\n\tzeroBox isNil ifTrue:[self zeroBox: (self box topRight - (self zeroLabel boundingBox width@0) extent: ( self zeroLabel boundingBox width @ self box height))].\n\t^ zeroBox! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:27'!\nzeroBox: anObject\n\t\"Set the value of zeroBox\"\n\n\tzeroBox _ anObject! !\n\n!RVMValueEditorView methodsFor: 'accessing' stamp: 'ssa 10/28/2008 21:49'!\nzeroLabel\n\n\t^' 0 ' asDisplayText! !\n\n!RVMValueEditorView methodsFor: 'controller access' stamp: 'ssa 10/29/2008 21:35'!\ndefaultControllerClass\n\n\t^RVMValueEditorController! !\n\n!RVMValueEditorView methodsFor: 'editing' stamp: 'ssa 10/29/2008 21:45'!\nperformOperationWith: aNumber\n\tself value: (self value perform: self operation with: aNumber).\n\tself displayView! !\n\n!RVMValueEditorView methodsFor: 'editing' stamp: 'ssa 10/29/2008 21:46'!\nresetValueToZero\n\tself value: 0.\n\tself displayView! !\n\n!RVMValueEditorView class methodsFor: 'examples' stamp: 'ssa 10/29/2008 21:06'!\nexample\n\t\"RVMValueEditorView example\"\n\t| topView  |\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\ttopView minimumSize:200@26.\n\ttopView maximumSize: 200@26.\n\ttopView addSubView: self exampleInstanceMin.\n\ttopView label: 'Value Editor'.\n\ttopView controller open! !\n\n!RVMValueEditorView class methodsFor: 'examples' stamp: 'ssa 10/29/2008 20:38'!\nexampleInstanceMax\n\n\t| view scaler |\n\tscaler _ RVMMonitor scalerFor: #bytesUseds.\n\tview _ self  on: scaler valueGetter: [scaler max] valueSetter:[:v|scaler max:v] label:'max: '.\n\tview lockGetter:#maxLocked; lockSetter:#maxLocked:.\n\t^view! !\n\n!RVMValueEditorView class methodsFor: 'examples' stamp: 'ssa 10/29/2008 21:06'!\nexampleInstanceMin\n\n\t| view scaler |\n\tscaler _ RVMMonitor scalerFor: #bytesUseds.\n\tview _ self  on: scaler valueGetter: [scaler min] valueSetter:[:v|scaler min:v] label:'min: '.\n\tview lockGetter:#minLocked; lockSetter:#minLocked:.\n\t^view! !\n\n!RVMValueEditorView class methodsFor: 'examples' stamp: 'ssa 10/29/2008 21:33'!\nexampleMinMax\n\t\"RVMValueEditorView exampleMinMax\"\n\t| topView  v x |\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\ttopView minimumSize:200@54.\n\ttopView maximumSize: 200@54.\n\ttopView addSubView: (v_self exampleInstanceMin).\n\ttopView addSubView: (x _ self exampleInstanceMax) below: v.\n\ttopView label: 'Value Editor'.\n\ttopView controller open! !\n\n!RVMValueView methodsFor: 'accessing' stamp: 'ssa 9/19/2008 11:00'!\nchangeValueBy: delta\n\n\tself value: self value + delta.\n\tself displayView.! !\n\n!RVMValueView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 20:57'!\nlabel\n\t\"Answer the value of label\"\n\n\tlabel isNil ifTrue:[self label: ''].\n\t^ label! !\n\n!RVMValueView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 20:57'!\nlabel: anObject\n\t\"Set the value of label\"\n\n\tlabel _ anObject! !\n\n!RVMValueView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:37'!\nvalue\n\t\"Answer the value of value\"\n\n\t| temp |\n\ttemp _ self valueGetter isSymbol\n\t\t\t\t\t\tifTrue:[self model perform: self valueGetter]\n\t\t\t\t\t\tifFalse:[self valueGetter value].\n\t^temp isFraction ifTrue:[temp asFloat] ifFalse:[temp]! !\n\n!RVMValueView methodsFor: 'accessing' stamp: 'ssa 9/17/2008 14:28'!\nvalue: anObject\n\t\"Set the value of value\"\n\n\tself valueSetter isSymbol\n\t\tifTrue:[model perform: self valueSetter with: anObject]\n\t\tifFalse:[self valueSetter value: anObject]! !\n\n!RVMValueView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 21:37'!\nvalueGetter\n\t\"Answer the value of valueGetter\"\n\n\tvalueGetter isNil ifTrue:[self valueGetter: [100 atRandom]].\n\t^ valueGetter! !\n\n!RVMValueView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 21:36'!\nvalueGetter: anObject\n\t\"Set the value of valueGetter\"\n\n\tvalueGetter _ anObject! !\n\n!RVMValueView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 21:38'!\nvalueSetter\n\t\"Answer the value of valueSetter\"\n\n\tvalueSetter isNil ifTrue:[self valueSetter: [:v| v print]].\n\t^ valueSetter! !\n\n!RVMValueView methodsFor: 'accessing' stamp: 'ssa 9/13/2008 21:36'!\nvalueSetter: anObject\n\t\"Set the value of valueSetter\"\n\n\tvalueSetter _ anObject! !\n\n!RVMValueView methodsFor: 'displaying' stamp: 'ssa 10/21/2008 11:32'!\ndisplayView\n\n\t| label1 labelForm |\n\tself okToDisplay ifFalse:[^self].\n\tself uncache.\n\tlabel1 _ ' ',self label,' ',self value printString.\n\tlabelForm _ label1 asDisplayText.\n\tDisplay fill: self insetDisplayBox fillColor: Color white.\n\tlabelForm displayOn: Display at: self insetDisplayBox leftCenter - labelForm boundingBox leftCenter clippingBox: self insetDisplayBox.\n\t\"(self controller isKindOf: NoController) ifFalse:[\n\tDisplay border: (self insetDisplayBox insetBy: 1)width: 1 fillColor: self backgroundColor negated.]\"\n! !\n\n!RVMValueView methodsFor: 'controller access' stamp: 'ssa 9/13/2008 20:35'!\ndefaultControllerClass\n\n\t^RVMValueController! !\n\n!RVMValueView methodsFor: 'listening' stamp: 'ssa 11/4/2008 19:37'!\nhear: something\n\n\n\tself displayView! !\n\n!RVMValueView class methodsFor: 'instance creation' stamp: 'ssa 9/17/2008 13:52'!\non: aModel valueGetter: getterSymbolOrBlock valueSetter: setterSymbolOrBlock label: aString\n\n\t| view |\n\tview _ self new.\n\tview model: aModel.\n\tview valueGetter: getterSymbolOrBlock.\n\tview valueSetter: setterSymbolOrBlock.\n\tview label: aString.\n\t^view! !\n\n!RVMValueView class methodsFor: 'instance creation' stamp: 'ssa 9/17/2008 14:29'!\non: aModel valueGetterOnly: getterSymbolOrBlock \n\n\t| view |\n\tview _ self new.\n\tview model: aModel.\n\tview controller: NoController new.\n\tview valueGetter: getterSymbolOrBlock.\n\tview valueSetter: [:v| ].\n\tview label: ''.\n\t^view! !\n\n!RVMValueView class methodsFor: 'examples' stamp: 'ssa 9/13/2008 20:31'!\nexample\n\t\"RVMValueView example\"\n\t| topView  |\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\ttopView minimumSize: 100@25.\n\ttopView maximumSize: 200@50.\n\ttopView addSubView: self exampleInstance.\n\ttopView label: 'Value Editor'.\n\ttopView controller open! !\n\n!RVMValueView class methodsFor: 'examples' stamp: 'ssa 10/29/2008 07:51'!\nexampleInstance\n\n\t| view |\n\tview _ self  on: nil valueGetter: [100 atRandom] valueSetter:[:v|v print] label:'min: '.\n\t^view! !\n\n!RVMView methodsFor: 'updating' stamp: 'ssa 1/1/1970 00:16'!\ndontDisplayWhile: aBlock\n\t\"Switch my okToDisplay flag off during this block\"\n\t\n\tself okToDisplay: false.\n\taBlock value.\n\tself okToDisplay: true.\n\tself displayView! !\n\n!RVMView methodsFor: 'updating' stamp: 'ssa 10/7/2008 21:55'!\nfirstFrame\n\t\"A signal from my topView that I have been reframed.\n\tDefault is to do nothing but propagate the signal.\n\tSubclasses will override to react appropriately\"\n\tself subViews do:[:each| each firstFrame]! !\n\n!RVMView methodsFor: 'updating' stamp: 'ssa 1/1/1970 00:12'!\nnewFrame\n\t\"A signal from my topView that I have been reframed.\n\tDefault is to do nothing but propagate the signal.\n\tSubclasses will override to react appropriately\"\n\tself subViews do:[:each| each newFrame]! !\n\n!RVMView methodsFor: 'updating' stamp: 'ssa 10/21/2008 11:31'!\nuncache\n\t(self topView isKindOf: StandardSystemView) ifTrue:[self topView uncacheBits]! !\n\n!RVMView methodsFor: 'initialize-release' stamp: 'ssa 10/3/2008 23:24'!\ninitialize\n\n\tsuper initialize.\n\tself backgroundColor: Color white.\n\tRVMMonitor inform: self! !\n\n!RVMView methodsFor: 'initialize-release' stamp: 'ssa 1/1/1970 00:07'!\nrelease\n\n\tRVMMonitor forget: self.\n\t\tsuper release.\n! !\n\n!RVMView methodsFor: 'listening' stamp: 'ssa 1/1/1970 00:34'!\nhear: aSpeaker\n\t\"Some object I am listening to is speaking\"\n! !\n\n!RVMView methodsFor: 'demonstrating' stamp: 'ssa 11/15/2008 15:43'!\ndemo\n\t\"Add me to a system view and open me on the desktop\"\n\tself demoSized: self minimumSize! !\n\n!RVMView methodsFor: 'demonstrating' stamp: 'ssa 11/15/2008 15:42'!\ndemoSized: anExtent\n\t\"Add me to a system view and open me on the desktop\"\n\t| topView  |\n\ttopView := RVMStandardSystemView new.\n\ttopView borderWidth:1.\n\ttopView minimumSize: anExtent.\n\ttopView addSubView: self .\n\ttopView label: self class name,' demo'.\n\ttopView controller open! !\n\n!RVMView methodsFor: 'accessing' stamp: 'ssa 11/11/2008 18:24'!\ncontroller: aController\n\n\tsuper controller: aController.\n\taController isNil ifTrue:[self okToDisplay: false]! !\n\n!RVMView methodsFor: 'accessing' stamp: 'ssa 11/15/2008 15:44'!\nminimumSize\n\n\t^100@100! !\n\n!RVMView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:15'!\nokToDisplay\n\t\"Answer the value of okToDisplay\"\n\n\tokToDisplay isNil ifTrue:[self okToDisplay: false].\n\t^ okToDisplay  ! !\n\n!RVMView methodsFor: 'accessing' stamp: 'ssa 1/1/1970 00:05'!\nokToDisplay: aBoolean\n\t\"Set the value of okToDisplay\"\n\n\tokToDisplay _ aBoolean.\n\tself subViews do:[:v| v okToDisplay: aBoolean]! !\n\n!RVMView methodsFor: 'testing' stamp: 'ssa 1/1/1970 00:19'!\nisRVMView\n\n\t^true! !\n\n!Random methodsFor: 'private' stamp: 'sma 5/12/2000 12:28'!\nnextValue\n\t\"This method generates random instances of Integer \tin the interval\n\t0 to 16r7FFFFFFF. This method does NOT update the seed; repeated sends\n\tanswer the same value.\n\tThe algorithm is described in detail in 'Random Number Generators: \n\tGood Ones Are Hard to Find' by Stephen K. Park and Keith W. Miller \n\t(Comm. Asso. Comp. Mach., 31(10):1192--1201, 1988).\"\n\n\t| lo hi aLoRHi answer |\n\thi _ (seed quo: q) asFloat.\n\tlo _ seed - (hi * q).  \" = seed rem: q\"  \n\taLoRHi _ (a * lo) - (r * hi).\n\tanswer _ (aLoRHi > 0.0)\n\t\tifTrue:  [aLoRHi]\n\t\tifFalse: [aLoRHi + m].\n\t^ answer! !\n\n!RankThread methodsFor: 'accessing'!\nend: val\n\tend := val! !\n\n!RankThread methodsFor: 'accessing'!\nid: val\n\tid := val! !\n\n!RankThread methodsFor: 'accessing'!\nlocalHist\n\t^localHist ! !\n\n!RankThread methodsFor: 'accessing'!\nlocalHist: val\n\tlocalHist := val! !\n\n!RankThread methodsFor: 'accessing'!\nrEnd\n\t^rEnd! !\n\n!RankThread methodsFor: 'accessing'!\nrEnd: val\n\trEnd := val! !\n\n!RankThread methodsFor: 'accessing'!\nrStart\n\t^rStart! !\n\n!RankThread methodsFor: 'accessing'!\nrStart: val\n\trStart := val! !\n\n!RankThread methodsFor: 'accessing'!\nstart\n\t[self run] fork.! !\n\n!RankThread methodsFor: 'accessing'!\nstart: val\n\tstart := val! !\n\n!RankThread methodsFor: 'accessing'!\nstate: val\n\tstate := val! !\n\n!RankThread methodsFor: 'as yet unclassified'!\ninitKeys\n\t| rng mySeed a x k |\n\ta := NPBIS amult.\n\trng := NPBRandom new.\n\tmySeed := rng findSeedFor: (id - 1) with: numThreads of: (4 * totalKeys * 1) using: (NPBRandom seed) and: a.\n\t\n\trng seed: mySeed.\n\t\n\tk := (maxKey / 4) asInteger.\n    \n\t((start + numKeys) > (end + 1)) ifTrue: [self error: 'this here seems to be inconsistent'.].\n\t\n\tstart to: end do: [:i |\n\t\tx := rng randlc: a.\n\t\tx := x + (rng randlc: a).\n\t\tx := x + (rng randlc: a).\n\t\tx := x + (rng randlc: a).\n\t\tkeyArray at: i put: (x * k) asInteger.\n\t\t]! !\n\n!RankThread methodsFor: 'as yet unclassified'!\nstep1\n\t\"RVMTester print: 'do step 1 '.\"\n\t\n\tkeyArray at: (Iteration + 1) put: Iteration.\n\tkeyArray at: (1 + Iteration + (NPBISBase maxIterations)) put: (maxKey - Iteration).\n\t\n\t1 to: NPBISBase testArraySize do: [\n\t\t:i | partialVerifyVals at: i put: (keyArray at: (1 + (testIndexArray at: i)))].\n\t\n\t1 to: maxKey do: [\n\t\t:i | localHist at: i put: 0].\n\t\n\tstart to: end do: [\n\t\t:i | localHist at: (1 + (keyArray at: i)) incrementBy: 1].\n\t\n\t1 to: (maxKey - 1) do: [\n\t\t:i | localHist at: (i + 1) incrementBy: (localHist at: i)]! !\n\n!RankThread methodsFor: 'as yet unclassified'!\nstep2\n\t\"RVMTester print: 'do step 2 '.\"\n\trStart to: rEnd do: [\n\t\t:i | 1 to: numThreads do: [\n\t\t\t:j | masterHist at: i incrementBy: ((rankThreads at: j) localHist at: i)]]! !\n\n!RankThread methodsFor: 'initialization'!\ninitializeValues: anIS\n\tnumThreads := anIS numThreads.\n\tmaxKey := anIS maxKey.\n\t\n\tkeyArray := anIS keyArray.\n\ttestIndexArray := anIS testIndexArray.\n\tmasterHist := anIS masterHist.\n\tpartialVerifyVals := anIS partialVerifyVals.\n\ttotalKeys := anIS totalKeys.\n\tnumKeys := (anIS numKeys / anIS numThreads * 1) asInteger.\n! !\n\n!RankThread methodsFor: 'license' stamp: 'StefanMarr 4/15/2011 17:04'!\nlicense\n\t^'This code is based on the Java version of NPB3.\n\nPermission to use, copy, distribute and modify this software for any purpose\nwith or without fee is hereby granted. We request, however, that all derived\nwork reference the NAS Parallel Benchmarks 3.0. This software is provided \"as\nis\" without express or implied warranty.\n\nInformation on NPB 3.0, including the Technical Report NAS-02-008\n\"Implementation of the NAS Parallel Benchmarks in Java\", original\nspecifications, source code, results and information on how to submit new\nresults, is available at:\n\n   http://www.nas.nasa.gov/Software/NPB/'! !\n\n!RankThread methodsFor: 'running'!\nrun\n\t[true] whileTrue: [\n\t\t\"RVMOperations print: 'RankThread waiting id=.', id asString.\"\n\t\tself wait.\n\t\t\n\t\tself critical: [\n\t\t\t\"RVMOperations print: 'RankThread entered run critical Id=', id asString.\"\n\t\t\t\t\t\n\t\t\t(state == #quit)\n\t\t\t\tifTrue: [\n\t\t\t\t\tmaster notify. \n\t\t\t\t\t^self\n\t\t\t\t]\n\t\t\t\tifFalse: [\n\t\t\t\t\tself perform: state.\n\t\t\t\t\tmaster notify.\n\t\t\t\t].\n\t\t]\n\t]! !\n\n!RankThread methodsFor: 'running' stamp: 'sm 6/1/2011 15:14'!\nstartStep: aStep\n\tself critical: [\n\t\tself state: aStep.\n\t\tself notify.\n\t].! !\n\n!RankThread class methodsFor: 'instance variables'!\niteration\n\t^ Iteration! !\n\n!RankThread class methodsFor: 'instance variables'!\niteration: val\n\tIteration := val! !\n\n!RankThread class methodsFor: 'benchmarking'!\nnewFor: anIS with: id start: s1 end: e1 rStart: s2 rEnd: e2\n\t\"create new instance\"\n\n\t| o |\n\n\"RVMOperations print: ('new RankThread: ', id asString, ' ', s1 asString, ' ', e1 asString, ' ', s2 asString, ' ', e2 asString).\"\n\n\to := self new.\n\t\n\to initializeValues: anIS.\n\t\n\to master: anIS.\n\to id: id.\n\to start: s1.\n\to end: e1.\n\to rStart: s2.\n\to rEnd: e2.\n\to localHist: (Array new: o maxKey).\n\to state: 0.\n\t\n\t^o\n\"setPriority(Thread.MAX_PRIORITY);\nsetDaemon(true);\"! !\n\n!ReBenchHarness commentStamp: 'StefanMarr 5/16/2011 09:10' prior: 0!\nThe ReBenchHarness is optimized for use from the command-line.\nIt is especially meant to be used together with ReBench, a tool to execute and document benchmarks reproducibly.\n\nSee: https://github.com/smarr/ReBench#readme!\n!ReBenchHarness class methodsFor: 'defaults'!\ndefaultReporter\n\t^ ReBenchReporter! !\n\n!ReBenchHarness class methodsFor: 'defaults' stamp: 'sm 5/25/2011 17:06'!\ndefaultRunner\n\t^ SMarkWeakScalingRunner! !\n\n!ReBenchHarness class methodsFor: 'helper'!\nparseArguments: arguments\n\t| parser |\n\tparser := ReBenchHarnessArgumentParser new.\n\tparser harness: self.  \n\t^ parser parse: arguments.! !\n\n!ReBenchHarness class methodsFor: 'helper' stamp: 'sm 5/25/2011 17:20'!\nusageBenchmarkParameters: usage\n\t^ usage,\t\t' processes          optional, number of processes/threads used by the benchmarks', String crlf,\n\t\t\t\t' inner-iterations   optional, number of iterations done by a single process', String crlf,\n\t\t\t\t' problemSize        optional, depending on benchmark for instance size of used data set', String crlf.\n\t\t\t\t! !\n\n!ReBenchHarness class methodsFor: 'helper' stamp: 'StefanMarr 7/25/2011 23:58'!\nusageHeader\n\t| usage |\n\tusage := 'SMark Benchmark Framework, version: ', self version, String crlf.\n\tusage := usage, String crlf.\n\tusage := usage, 'Usage: <vm+image> ', self name,\n\t\t\t\t' <suiteOrBenchmark> [',self withoutWeakScalingOption ,']',\n\t\t\t\t' [processes [inner-iterations [problemSize]]]', String crlf.\n\tusage := usage, String crlf.\n\t\n\tusage := usage, '  This harness is mostly used for weak-scalling benchmarks.', String crlf.\n\tusage := usage, '  Use the SMarkHarness for more general settings, it offers more options.', String crlf.\n\t\n\tusage := usage, String crlf.\n\t^ usage! !\n\n!ReBenchHarness class methodsFor: 'helper'!\nusageReporter: usage\n\t\"Will rely on default, which is good for ReBench, so do not advertise option.\"\n\t^ usage! !\n\n!ReBenchHarness class methodsFor: 'helper'!\nusageRunner: usage\n\t\"Will rely on default, which is good for ReBench, so do not advertise option.\"\n\t^ usage! !\n\n!ReBenchHarness class methodsFor: 'constant' stamp: 'StefanMarr 7/25/2011 23:56'!\nwithoutWeakScalingOption\n\t^  '--without-weak-scaling'! !\n\n!ReBenchHarnessArgumentParser methodsFor: 'argument parsing' stamp: 'sm 5/25/2011 17:17'!\ndetermineBenchmarkParametersFromArguments\n\ti := i + 1.\n\ti <= numParams ifTrue: [\n\t\tprocesses := (arguments at: i) asInteger.\n\t\ti := i + 1.\n\t\ti <= numParams ifTrue: [\n\t\t\titerations := (arguments at: i) asInteger.\n\t\t\ti := i + 1.\n\t\t\ti <= numParams ifTrue: [\n\t\t\t\tproblemSize := arguments at: i.\n\t\t\t]\n\t\t]\n\t].! !\n\n!ReBenchHarnessArgumentParser methodsFor: 'argument parsing'!\ndetermineReporter\n\treporter := harness defaultReporter new.! !\n\n!ReBenchHarnessArgumentParser methodsFor: 'argument parsing' stamp: 'StefanMarr 7/26/2011 00:10'!\ndetermineRunner\n\t(arguments includes: ReBenchHarness withoutWeakScalingOption) ifTrue: [\n\t\tcurrent = ReBenchHarness withoutWeakScalingOption ifTrue: [\n\t\t\tcurrent := arguments at: (i + 1).\n\t\t].\n\t\targuments remove: ReBenchHarness withoutWeakScalingOption.\n\t\trunner := harness superclass defaultRunner new.\n\t]\n\tifFalse: [\n\t\trunner := harness defaultRunner new.\n\t].! !\n\n!ReBenchHarnessArgumentParser methodsFor: 'helper' stamp: 'StefanMarr 7/26/2011 00:18'!\ninstructRunner\n\tsuper instructRunner.\n\t\n\trunner iterations: runner class defaultNumberOfIterations.\n\t\n\t(runner respondsTo: #innerIterations:) ifTrue: [\n\t\trunner innerIterations: iterations.\n\t].! !\n\n!ReBenchReporter methodsFor: 'as yet unclassified' stamp: 'StefanMarr 5/16/2011 15:23'!\nbenchmarkHeader: aName\n\t^ self! !\n\n!RealEstateAgent class methodsFor: 'as yet unclassified' stamp: 'ssa 9/3/2008 10:48'!\nassignCollapsePointFor: aSSView\n\t\"Offer up a location along the left edge of the screen for a collapsed SSView.\n\tMake sure it doesn't overlap any other collapsed frames.\"\n\n\t| grid otherFrames y free topLeft viewBox |\n\tgrid _ 24.  \"should be mult of 8, since manual move is gridded by 8\"\n\taSSView isMorph ifTrue: [otherFrames := (SystemWindow windowsIn: aSSView world satisfying: [:w | true])\n                            collect: [:w | w collapsedFrame]\n                            thenSelect: [:rect | rect notNil].\n                          viewBox := self reduceByFlaps: aSSView world viewBox]\n\t\tifFalse: [otherFrames _ ScheduledControllers scheduledWindowControllers\n\t\t\t\t\tcollect: [:aController | aController view collapsedFrame]\n\t\t\t\t\tthenSelect: [:rect | rect notNil].\n\t\t\t\tviewBox _ Display boundingBox].\n\ty _ viewBox top.\n\t[(y _ y + grid) <= (viewBox height - grid)]\n\t\twhileTrue:\n\t\t[topLeft _ viewBox left@y.\n\t\tfree _ true.\n\t\totherFrames do: [:w | free _ free & (topLeft ~= w topLeft)].\n\t\tfree ifTrue: [^ topLeft]].\n\t\"If all else fails...\"\n\t^ 0 @ 0! !\n\n!RealEstateAgent class methodsFor: 'as yet unclassified' stamp: 'ssa 9/3/2008 11:11'!\nmaximumUsableArea\n\n\t| allowedArea |\n\tallowedArea _ Display usableArea.\n  Smalltalk isMorphic ifTrue: [\n    allowedArea := allowedArea intersect: ActiveWorld visibleClearArea.\n  ].\n\t^allowedArea\n! !\n\n!RealEstateAgent class methodsFor: 'as yet unclassified' stamp: 'ssa 9/3/2008 11:12'!\nscreenTopSetback\n\tSmalltalk isMorphic\n\t\tifTrue: [^ 0]\n\t\tifFalse: [^ 18]! !\n\n!RealEstateAgent class methodsFor: 'as yet unclassified' stamp: 'ssa 9/3/2008 11:12'!\nscrollBarSetback\n\tSmalltalk isMorphic\n\t\tifTrue: [^ 16 - 3]  \"width = 16; inset from border by 3\"\n\t\tifFalse: [^ 24]! !\n\n!Rectangle methodsFor: 'accessing'!\nottomLeft: aPoint\n\t\"Set the position of the bottomLeft corner of the receiver.\"\n\t\"KSC Extension\"\n\n\torigin _ aPoint x @ self top.\n\tcorner _ self right @ aPoint y! !\n\n!Rectangle methodsFor: 'accessing'!\nottomRight: bottomRightPoint \n\t\"Set the position of the right corner of the bottom horizontal line of the receiver.\"\n\n\tcorner _ bottomRightPoint! !\n\n!Rectangle methodsFor: 'accessing' stamp: 'ssa 8/22/2009 18:02'!\ncorner: aPoint\n\t\"Set the point at the bottom right corner of the receiver.\"\n\n\tcorner _ aPoint! !\n\n!Rectangle methodsFor: 'accessing' stamp: 'ssa 8/23/2009 14:39'!\nextent: aPoint\n\n\tcorner _ origin + aPoint! !\n\n!Rectangle methodsFor: 'accessing' stamp: 'ssa 8/22/2009 16:32'!\nheight: heightInteger \n\t\"Change the receiver's bottom y to make its height \n\tthe argument heightInteger.\"\n\n\tcorner y: origin y + heightInteger! !\n\n!Rectangle methodsFor: 'accessing' stamp: 'ssa 9/2/2009 17:10'!\norigin: aPoint\n\t\"Set the point at the top left corner of the receiver.\"\n\n\torigin _ aPoint! !\n\n!Rectangle methodsFor: 'accessing'!\ntopLeft: topLeftPoint \n\t\"Set the point at the top left corner of the receiver's top horizontal line.\"\n\n\torigin _ topLeftPoint! !\n\n!Rectangle methodsFor: 'accessing' stamp: 'ssa 8/25/2009 14:40'!\ntopRight: aPoint\n\t\"Set the position of the top right corner of the receiver.\"\n\torigin _ self left @ aPoint y.\n\tcorner _ aPoint x @ self bottom! !\n\n!Rectangle methodsFor: 'accessing' stamp: 'ssa 8/31/2009 16:30'!\nwidth: widthInteger \n\t\"Change the receiver's right x to make its width \n\tthe argument widthInteger.\"\n\n\tcorner x: origin x + widthInteger! !\n\n!Rectangle methodsFor: 'rectangle functions' stamp: 'ssa 11/16/2008 02:34'!\nasRandomPoint\n\t\"ssa - Answer a random point that lies within my borders\"\n\t^self origin + self extent atRandom ! !\n\n!Rectangle methodsFor: 'rectangle functions' stamp: 'ssa 8/24/2009 09:39'!\nintersect: aRectangle \n\t\"Answer a Rectangle that is the area in which the receiver overlaps with \n\taRectangle. Optimized for speed; old code read:\n\t\t^Rectangle \n\t\t\torigin: (origin max: aRectangle origin)\n\t\t\tcorner: (corner min: aRectangle corner)\n\t\"\n\t| aPoint left right top bottom |\n\taPoint _ aRectangle origin copy.\n\taPoint x > origin x ifTrue:[left _ aPoint x] ifFalse:[left _ origin x].\n\taPoint y > origin y ifTrue:[top _ aPoint y] ifFalse:[top _ origin y].\n\taPoint _ aRectangle corner copy.\n\taPoint x < corner x ifTrue:[right _ aPoint x] ifFalse:[right _ corner x].\n\taPoint y < corner y ifTrue:[bottom _ aPoint y] ifFalse:[bottom _ corner y].\n\t^Rectangle\n\t\torigin: (left@top)\n\t\tcorner: (right@bottom)\n! !\n\n!Rectangle methodsFor: 'rectangle functions' stamp: 'ssa 8/23/2009 17:07'!\nselfMerge: aRectangle \n\t\"Alter the receiver so that it contains both self and the argument aRectangle.  \n\tThis is much faster than a merge: but must be used wisely since it modifies both\n\tthe receiver and the points which make up its origin and corner.\"\n\t\"KSC Extension\"\n\n\t| hisOrigin hisCorner hisOriginX hisOriginY hisCornerX hisCornerY |\n\thisOrigin _ aRectangle origin.\n\thisCorner _ aRectangle corner.\n\thisOriginX _ hisOrigin x. hisOriginY _ hisOrigin y.\n\thisCornerX _ hisCorner x. hisCornerY _ hisCorner y.\n\torigin x > hisOriginX ifTrue: [origin x: hisOriginX].\n\torigin y > hisOriginY ifTrue: [origin y: hisOriginY].\n\tcorner x < hisCornerX ifTrue: [corner x: hisCornerX].\n\tcorner y < hisCornerY ifTrue: [corner y: hisCornerY].! !\n\n!Rectangle methodsFor: 'rectangle functions' stamp: 'ssa 8/15/2008 11:39'!\nsubDivideBy: aPoint\n\t\"Answer a collection of rectangles which divide the receiver evenly into aPoint x columns and aPoint y rows.  Answer the new rectangles left to right then down.  Yes, this method could be much shorter, but I tried to minimize duplications of arithmetic for efficiency.\"\n\t\"(0@0 corner: 100@100) subDivideBy: 4@2\"\n\t\n\t| rows columns eachWidth eachHeight subRegions rowTop baseIndex myLeft rowBottom columnLeft columnRight |\n\tcolumns _ aPoint x.\n\trows _ aPoint y.\n\teachWidth _ self width / columns.\n\teachHeight _ self height / rows.\n\tsubRegions _ Array new: columns * rows.\n\trowTop _ self top.\n\tbaseIndex _ 0.\n\tmyLeft _ self left.\n\t1 to: rows do: [:rowNumber |\n\t\trowBottom _ rowTop + eachHeight.\n\t\tcolumnLeft _ myLeft.\n\t\tcolumnRight _ columnLeft + eachWidth.\n\t\t1 to: columns do: [:columnNumber |\n\t\t\tsubRegions \n\t\t\t\tat: baseIndex + columnNumber\n\t\t\t\tput: (self species origin: columnLeft @ rowTop corner: columnRight @ rowBottom).\n\t\t\tcolumnLeft _ columnRight.\n\t\t\tcolumnRight _ columnRight + eachWidth].\n\t\trowTop _ rowBottom.\n\t\trowBottom _ rowBottom + eachHeight.\n\t\tbaseIndex _ baseIndex + columns].\n\t^subRegions\n! !\n\n!Rectangle methodsFor: 'rectangle functions' stamp: 'ssa 8/15/2008 12:24'!\nsubDivideRoundedBy: aPoint\n\t\"ssa - round the orign and extent points\"\n\t\"Answer a collection of rectangles which divide the receiver evenly into aPoint x columns and aPoint y rows.  Answer the new rectangles left to right then down.  Yes, this method could be much shorter, but I tried to minimize duplications of arithmetic for efficiency.\"\n\t\"(0@0 corner: 100@100) subDivideBy: 4@2\"\n\t\n\t| rows columns eachWidth eachHeight subRegions rowTop baseIndex myLeft rowBottom columnLeft columnRight |\n\tcolumns _ aPoint x.\n\trows _ aPoint y.\n\teachWidth _ self width / columns.\n\teachHeight _ self height / rows.\n\tsubRegions _ Array new: columns * rows.\n\trowTop _ self top.\n\tbaseIndex _ 0.\n\tmyLeft _ self left.\n\t1 to: rows do: [:rowNumber |\n\t\trowBottom _ rowTop + eachHeight.\n\t\tcolumnLeft _ myLeft.\n\t\tcolumnRight _ columnLeft + eachWidth.\n\t\t1 to: columns do: [:columnNumber |\n\t\t\tsubRegions \n\t\t\t\tat: baseIndex + columnNumber\n\t\t\t\tput: (self species origin: columnLeft @ rowTop corner: columnRight @ rowBottom) rounded.\n\t\t\tcolumnLeft _ columnRight.\n\t\t\tcolumnRight _ columnRight + eachWidth].\n\t\trowTop _ rowBottom.\n\t\trowBottom _ rowBottom + eachHeight.\n\t\tbaseIndex _ baseIndex + columns].\n\t^subRegions\n! !\n\n!Rectangle methodsFor: 'transforming' stamp: 'ssa 8/25/2009 14:24'!\nfastMoveBy: aPoint \n\t\"Change the corner positions of the receiver so that its area translates by\n\tthe amount defined by the argument, aPoint.  \n\tThis is much faster than a merge: but must be used wisely since it modifies both\n\tthe receiver and the points which make up its origin and corner.\"\n\n\torigin moveBy: aPoint.\n\tcorner moveBy: aPoint! !\n\n!Rectangle methodsFor: 'transforming' stamp: 'ssa 8/25/2009 14:09'!\nmoveBy: aPoint \n\t\"Change the corner positions of the receiver so that its area translates by\n\tthe amount defined by the argument, aPoint.\"\n\n\torigin _ origin + aPoint.\n\tcorner _ corner + aPoint! !\n\n!Rectangle methodsFor: 'transforming' stamp: 'ssa 8/25/2009 14:09'!\nmoveTo: aPoint \n\t\"Change the corners of the receiver so that its top left position is aPoint.\"\n\n\tcorner _ corner + aPoint - origin.\n\torigin _ aPoint! !\n\n!Rectangle methodsFor: 'transforming' stamp: 'ssa 10/8/2008 17:52'!\nnewRectButtonPressedDo: newRectBlock \n\t\"Track the outline of a new rectangle until mouse button \n\tchanges. newFrameBlock produces each new rectangle from the \n\tprevious. Only tracks while mouse is down.\"\n\t| rect newRect buttonNow delay |\n\tdelay _ Delay forMilliseconds: 10.\n\tbuttonNow _ Sensor anyButtonPressed.\n\trect _ self.\n\tDisplay\n\t\tborder: rect\n\t\twidth: 2\n\t\trule: Form reverse\n\t\tfillColor: Color gray.\n\t[buttonNow]\n\t\twhileTrue: [\"delay wait.\"\n\t\t\tbuttonNow _ Sensor anyButtonPressed.\n\t\t\tnewRect _ newRectBlock value: rect.\n\t\t\tnewRect = rect\n\t\t\t\tifFalse: [Display\n\t\t\t\t\t\tborder: rect\n\t\t\t\t\t\twidth: 2\n\t\t\t\t\t\trule: Form reverse\n\t\t\t\t\t\tfillColor: Color gray.\n\t\t\t\t\tDisplay\n\t\t\t\t\t\tborder: newRect\n\t\t\t\t\t\twidth: 2\n\t\t\t\t\t\trule: Form reverse\n\t\t\t\t\t\tfillColor: Color gray.\n\t\t\t\t\trect _ newRect]].\n\tDisplay\n\t\tborder: rect\n\t\twidth: 2\n\t\trule: Form reverse\n\t\tfillColor: Color gray.\n\t\" pay the price for reading the sensor directly ; get this party started \"\n\tSmalltalk isMorphic\n\t\tifTrue: [].\n\tSensor processEvent: Sensor createMouseEvent.\n\t^ rect! !\n\n!Rectangle methodsFor: 'transforming' stamp: 'ssa 10/8/2008 17:49'!\nnewRectFrom: newRectBlock\n\t\"Track the outline of a new rectangle until mouse button changes.\n\tnewFrameBlock produces each new rectangle from the previous\"\n\t| rect newRect buttonStart buttonNow delay |\n\tdelay _ Delay forMilliseconds: 10.\n\tbuttonStart _ buttonNow _ Sensor anyButtonPressed.\n\trect _ self.\n\tDisplay border: rect width: 2 rule: Form reverse fillColor: Color gray.\n\t[buttonNow == buttonStart] whileTrue: \n\t\t[\"delay wait.\"\n\t\tbuttonNow _ Sensor anyButtonPressed.\n\t\tnewRect _ newRectBlock value: rect.\n\t\tnewRect = rect ifFalse:\n\t\t\t[Display border: rect width: 2 rule: Form reverse fillColor: Color gray.\n\t\t\tDisplay border: newRect width: 2 rule: Form reverse fillColor: Color gray.\n\t\t\trect _ newRect]].\n\tDisplay border: rect width: 2 rule: Form reverse fillColor: Color gray.\n\t\" pay the price for reading the sensor directly ; get this party started \"\n\n\tSensor processEvent: Sensor createMouseEvent.\n\t^ rect! !\n\n!Rectangle methodsFor: 'transforming' stamp: 'ssa 8/27/2008 04:43'!\nscaleByRect: scale \n\t\"Answer a Rectangle scaled by scale, a rectangle.\"\n\n\t^Rectangle origin: origin * scale origin corner: corner * scale corner! !\n\n!Rectangle methodsFor: 'displaying' stamp: 'ssa 10/29/2008 20:57'!\ndisplay\n\n\t| quad |\n\tquad _ Quadrangle region: self borderWidth: 1 borderColor: Color black insideColor: nil.\n\tquad display! !\n\n!Rectangle methodsFor: 'displaying' stamp: 'ssa 11/4/2008 19:15'!\ndisplayOn: aDisplayMedium withBorderWidths: anArray\n\t\"Rectangle fromUser displayOn: Display withBorderWidths:#(16 8 4 1)\"\n\t\"anArray = #(left top right bottom ) integers\"\n\n\t| quad |\n\tquad _ Quadrangle region: self borderWidth: ((anArray at:1)@(anArray at:2) corner: (anArray at:3)@(anArray at:4))borderColor: Color black insideColor: nil.\n\tquad displayOn: aDisplayMedium! !\n\n!Rectangle methodsFor: 'displaying' stamp: 'ssa 11/4/2008 19:16'!\ndisplayWithBorderWidths: anArray\n\t\"Rectangle fromUser displayWithBorderWidths:#(16 8 4 1)\"\n\t\"anArray = #(left top right bottom ) integers\"\n\n\tself displayOn: Display withBorderWidths: anArray! !\n\n!Rectangle methodsFor: 'sizing - Louvre' stamp: 'ssa 12/5/2009 08:28'!\nsize\n\n\t^self extent! !\n\n!RemoteString methodsFor: 'accessing' stamp: 'dmu 9/7/2010 17:19'!\ntext \n\t\"Answer the receiver's string asText if remote files are enabled.\"\n\t| theFile theText |\n\t(sourceFileNumber == nil or: [(SourceFiles at: sourceFileNumber) == nil]) ifTrue: [^ nil].\n\ttheFile _ SourceFiles at: sourceFileNumber.\t\ttheFile safelyDo: [\n\t\ttheFile position: filePositionHi.\n\t\ttheText _ theFile nextChunkText].\n\t^theText! !\n\n!RemoteString methodsFor: 'private' stamp: 'dmu 9/7/2010 14:23'!\nstring: aString onFileNumber: fileNumber\n\t\"Store this as my string if source files exist.\"\n\t| theFile |\n\t(SourceFiles at: fileNumber) == nil ifFalse: \n\t\t[theFile _ SourceFiles at: fileNumber.\n\t\ttheFile safelyDo: [\n\t\t\ttheFile setToEnd; cr.\n\t\t\tself string: aString onFileNumber: fileNumber toFile: theFile]\n\t\t]! !\n\n!RenaissanceTransporter methodsFor: 'initializing' stamp: 'sm 7/8/2011 23:17'!\ninitialize\n\tself\n\t\tinitializePackage;\n\t\tinitializeTeam;\n\t\tinitializePreambleAndPostscript.\n\t\t\n\tsubTransporters := { \n\t\tMSWLookTransporter new.\n\t\tTransporter forPackage: (PackageInfo named: 'Ly').\n\t\tSlyTransporter new. }! !\n\n!RenaissanceTransporter methodsFor: 'initializing' stamp: 'sm 3/11/2011 12:11'!\ninitializePackage\n\tself package: (CompositePackageInfo new\n\t\t\t\t\tname: 'Renaissance';\n\t\t\t\t\tpackages: {\n\t\t\t\t\t\t\"RVMBootstrapPackage new.\"\n\t\t\t\t\t\tPackageInfo named: 'RVM'.\n\t\t\t\t\t\tPackageInfo named: 'DMU'.\n\t\t\t\t\t};\n\t\t\t\t\tyourself).\n! !\n\n!RenaissanceTransporter methodsFor: 'initializing' stamp: 'ads 1/24/2011 14:52'!\ninitializePreambleAndPostscript\n\tself\n\t\tpreambleBlock: [:file | RVMBootstrapPackage new saveTrickyModificationsToFile: file];\n\t\tpostscriptBlock: [:file | \tfile nextPutAll: '(ChangeSorter basicNewChangeSet: ''New changes'') ifNotNilDo: [:cs | ChangeSet  newChanges: cs].'; cr].! !\n\n!RenaissanceTransporter methodsFor: 'initializing' stamp: 'sm 3/7/2011 15:35'!\ninitializeTeam\n\tself team: (ProjectTeam new\n\t\t\t\tinitialsOfProjectMembers: {'dmu'. 'smu'. 'ssa'. 'ads'. 'sm'. 'piv'. 'max'};\n\t\t\n\t\t\t\t\"The Renaissance image is based on Squeak 3.7, which was put out in 2004; the Renaissance project started in 2007 or 2008.\n\t\t\t\t I don't understand why some of our methods are stamped 1970, though. -- Adam\"\n\t\t\t\ttimestampFilter: [:t | t year > 2005 or: [t year = 1970]]; \n\t\t\n\t\t\t\tyourself).! !\n\n!RenaissanceTransporter methodsFor: 'removing' stamp: 'ads 1/26/2011 16:17'!\nrevert\n\tsuper revert.\n\tself team revertPackage: RVMBootstrapPackage new.! !\n\n!RenaissanceTransporter class methodsFor: 'transporter' stamp: 'ads 2/4/2011 11:47'!\ntransportersForFileOutMenu\n\t^ { self new }! !\n\n!ResumableTestFailure methodsFor: 'camp smalltalk'!\nisResumable\n\t\"Of course a ResumableTestFailure is resumable ;-)\"\n\n\t^true! !\n\n!ResumableTestFailure methodsFor: 'camp smalltalk'!\nsunitExitWith: aValue\n\tself resume: aValue! !\n\n!ResumableTestFailure commentStamp: '<historical>' prior: 0!\nA ResumableTestFailure triggers a TestFailure, but lets execution of the TestCase continue. this is useful when iterating through collections, and #assert: ing on each element. in combination with methods like testcase>>#assert:description:, this lets you run through a whole collection and note which tests pass.\n\nhere''s an example:\n\n\t\n\n\t(1 to: 30) do: [ :each |\n\t\tself assert: each odd description: each printString, ' is even' resumable: true]\n\nfor each element where #odd returns <false>, the element will be printed to the Transcript. !\n!ResumableTestFailureTestCase methodsFor: 'Not categorized' stamp: 'BaseSystem 8/30/2009 09:40'!\nresumableTestFailureTest\n\tself\n\t\tassert: false description: 'You should see more than me' resumable: true; \n\t\tassert: false description: 'You should see more than me' resumable: true; \n\t\tassert: false description: 'You should see me last' resumable: false; \n\t\tassert: false description: 'You should not see me' resumable: true! !\n\n!ResumableTestFailureTestCase methodsFor: 'logging' stamp: 'BaseSystem 8/30/2009 09:40'!\nlogFailure: aString\n\tduplicateFailureLog add: aString.\n\tsuper logFailure: aString.! !\n\n!ResumableTestFailureTestCase methodsFor: 'running' stamp: 'BaseSystem 8/30/2009 09:40'!\nsetUp\n\tduplicateFailureLog := OrderedCollection with: 'In set up'.! !\n\n!ResumableTestFailureTestCase methodsFor: 'running' stamp: 'BaseSystem 8/30/2009 09:40'!\ntearDown\n\tself deny: 'You should not see me' = duplicateFailureLog last\n\t\t\tdescription: 'We saw the ''You should not see me'' failure'.\n\tself deny: 'You should see more than me' = duplicateFailureLog last\n\t\t\tdescription: 'We did not see more than a ''You should see more than me'' failure'.! !\n\n!ResumableTestFailureTestCase methodsFor: 'running' stamp: 'BaseSystem 8/30/2009 09:40'!\ntestResumable\n\t| result suite |\n\tsuite := TestSuite new.\n\tsuite addTest: (self class selector: #errorTest).\n\tsuite addTest: (self class selector: #regularTestFailureTest).\n\tsuite addTest: (self class selector: #resumableTestFailureTest).\n\tsuite addTest: (self class selector: #okTest).\n\tresult := suite run.\n\tself assert: result failures size = 2;\n\t\tassert: result errors size = 1! !\n\n!ResumableTestFailureTestCase methodsFor: 'test data' stamp: 'BaseSystem 8/30/2009 09:40'!\nerrorTest\n\t1 zork! !\n\n!ResumableTestFailureTestCase methodsFor: 'test data' stamp: 'BaseSystem 8/30/2009 09:40'!\nfailureTest\n\tself\n\t\tassert: false description: 'You should see me' resumable: true; \n\t\tassert: false description: 'You should see me too' resumable: true; \n\t\tassert: false description: 'You should see me last' resumable: false; \n\t\tassert: false description: 'You should not see me' resumable: true! !\n\n!ResumableTestFailureTestCase methodsFor: 'test data' stamp: 'BaseSystem 8/30/2009 09:40'!\nokTest\n\tself assert: true! !\n\n!ResumableTestFailureTestCase methodsFor: 'test data' stamp: 'BaseSystem 8/30/2009 09:40'!\nregularTestFailureTest\n\tself assert: false description: 'You should see me'! !\n\n!ResumableTestFailureTestCase class methodsFor: 'history' stamp: 'simon.denier 11/22/2008 22:13'!\nlastStoredRun\n\t^ ((Dictionary new) add: (#passed->((Set new) add: #testResumable; yourself)); add: (#timeStamp->'22 November 2008 10:11:35 pm'); add: (#failures->((Set new))); add: (#errors->((Set new))); yourself)! !\n\n!RoarTinyBench methodsFor: 'benchmarking' stamp: 'StefanMarr 11/7/2010 03:31'!\nbenchBytecode: iterations\n\t\"Handy bytecode-heavy benchmark, was Integers>>benchmark\"\n\t\"(500000 // time to run) = approx bytecodes per second\"\n\t\"5000000 // (Time millisecondsToRun: [10 benchmark]) * 1000\"\n\t\"3059000 on a Mac 8100/100\"\n    | size flags prime k count |\n    size := 8190.\n    1 to: iterations do:\n        [:iter |\n        count := 0.\n        flags := (Array new: size) atAllPut: true.\n        1 to: size do:\n            [:i | (flags at: i) ifTrue:\n                [prime := i+1.\n                k := i + prime.\n                [k <= size] whileTrue:\n                    [flags at: k put: false.\n                    k := k + prime].\n                count := count + 1]]].\n    ^ count! !\n\n!RoarTinyBench methodsFor: 'benchmarking' stamp: 'StefanMarr 11/7/2010 03:34'!\nbenchFib: n\n\t\"Handy send-heavy benchmark, was Integer>>benchFib\"\n\t\"(result // seconds to run) = approx calls per second\"\n\t\" | r t |\n\t  t := Time millisecondsToRun: [r := 26 benchFib].\n\t  (r * 1000) // t\"\n\t\"138000 on a Mac 8100/100\"\n\t^ n < 2\n\t\tifTrue: [1] \n\t\tifFalse: [(self benchFib: (n-1)) + (self benchFib: (n-2)) + 1]\n! !\n\n!RoarTinyBench methodsFor: 'benchmarking' stamp: 'StefanMarr 1/15/2011 22:53'!\nstartBenchmarkAndWaitForCompletion\n\tRVMOperations print: (self tinyBenchmarksParallel)! !\n\n!RoarTinyBench methodsFor: 'benchmarking' stamp: 'StefanMarr 11/7/2010 03:36'!\ntinyBenchmarks\n\t\"Report the results of running the two tiny Squeak benchmarks.\n\tar 9/10/1999: Adjusted to run at least 1 sec to get more stable results\"\n\t\"0 tinyBenchmarks\"\n\t\"On a 292 MHz G3 Mac: 22727272 bytecodes/sec; 984169 sends/sec\"\n\t\"On a 400 MHz PII/Win98:  18028169 bytecodes/sec; 1081272 sends/sec\"\n\t| t1 t2 r n1 n2 |\n\tn1 := 1.\n\t[t1 := Time millisecondsToRun: [self benchBytecode: n1].\n\tt1 < 1000] whileTrue: [n1 := n1 * 2]. \"Note: #benchmark's runtime is about O(n)\"\n\n\tn2 := 28.\n\t[t2 := Time millisecondsToRun: [r := self benchFib: n2].\n\tt2 < 1000] whileTrue: [n2 := n2 + 1]. \"Note: #benchFib's runtime is about O(n^2).\"\n\n\t^ ((n1 * 500000 * 1000) // t1) printString, ' bytecodes/sec; ',\n\t  ((r * 1000) // t2) printString, ' sends/sec'! !\n\n!RoarTinyBench methodsFor: 'benchmarking' stamp: 'StefanMarr 1/15/2011 22:45'!\ntinyBenchmarksParallel\n\t\"Report the results of running the two tiny Squeak benchmarks.\n\tar 9/10/1999: Adjusted to run at least 1 sec to get more stable results\"\n\t\"0 tinyBenchmarks\"\n\t\"On a 292 MHz G3 Mac: 22727272 bytecodes/sec; 984169 sends/sec\"\n\t\"On a 400 MHz PII/Win98:  18028169 bytecodes/sec; 1081272 sends/sec\"\n\t| t1 t2 r n1 n2 |\n\t\n\t\"Determine a good problem size for the benchmark\"\n\tn1 := 1.\n\t[t1 := Time millisecondsToRun: [self benchBytecode: n1].\n\tt1 < 1000] whileTrue: [n1 := n1 * 2]. \"Note: #benchmark's runtime is about O(n)\"\n\n\t\"now n1 is the value for which we do the measurement\"\n\tt1 := Time millisecondsToRun: [self run: #benchBytecode: with: n1 times: numberOfProcesses].\n\n\t\"Determine a good problem size for the benchmark\"\n\tn2 := 28.\n\t[t2 := Time millisecondsToRun: [r := self benchFib: n2].\n\tt2 < 1000] whileTrue: [n2 := n2 + 1]. \n\t\"Note: #benchFib's runtime is about O(k^n),\n\t\twhere k is the golden number = (1 + 5 sqrt) / 2 = 1.618....\"\n\t\t\n\t\"now we have our target n2 and r value.\n\t lets take the time for it\"\n\tt2 := Time millisecondsToRun: [self run: #benchFib: with: n2 times: numberOfProcesses].\n\n\t^ ((n1 * numberOfProcesses * 500000 * 1000) // t1) printString, ' bytecodes/sec; ',\n\t   ((r * numberOfProcesses * 1000) // t2) printString, ' sends/sec'\n\t   ! !\n\n!RoarTinyBench methodsFor: 'private' stamp: 'StefanMarr 1/15/2011 22:49'!\nrun: aSymbol with: argument times: nTimes\n\t| mtx sig n |\n\t\n\tmtx := Semaphore forMutualExclusion.\n\tsig := Semaphore new.\n\tn := nTimes.\n\n\t1 to: nTimes do: [:i |\n\t\t[ aSymbol = #benchFib: \n\t\t\tifTrue: [\n\t\t\t\tself benchFib: argument.]\n\t\t\tifFalse: [\n\t\t\t\taSymbol = #benchBytecode:\n\t\t\t\t\tifTrue: [\n\t\t\t\t\t\tself benchBytecode: argument]\n\t\t\t\t\tifFalse: [\n\t\t\t\t\t\tself perform: aSymbol with: argument.]].\n\t\tmtx critical: [\n\t\t\tn := n - 1.\n\t\t\t(n == 0) ifTrue: [sig signal]]\n\t\t] fork\n\t].\n\tsig wait.! !\n\n!RoarTinyBench class methodsFor: 'benchmarking' stamp: 'StefanMarr 11/7/2010 12:45'!\ntinyBenchmarks\n\t\"RoarTinyBench tinyBenchmarks\"\n\tRVMOperations print: (self new tinyBenchmarks)! !\n\n!RoarTinyBench class methodsFor: 'benchmarking' stamp: 'StefanMarr 11/7/2010 12:45'!\ntinyBenchmarksParallel\n\t\"RoarTinyBench tinyBenchmarksParallel\"\n\tRVMOperations print: (self new numProcesses: 16; tinyBenchmarksParallel)! !\n\n!RunArray methodsFor: '*RVM-Archiving-fileIn/Out'!\narchiveOn: aStream\n\taStream\n\t\tstoreObject: self;\n\t\tstoreClass: self class;\n\t\tstore: runs size.\n\t1 to: runs size do:\n\t\t[:x |\n\t\taStream store: (runs at: x).\n\t\taStream nextPut: (values at: x)]! !\n\n!RunArray class methodsFor: 'instance creation' stamp: 'ssa 9/3/2008 11:15'!\nscanFrom: strm\n\t\"Read the style section of a fileOut or sources file.  nextChunk has already been done.  We need to return a RunArray of TextAttributes of various kinds.  These are written by the implementors of writeScanOn:\"\n\t| rr vv aa this |\n\t(strm peekFor: $( ) ifFalse: [^ nil].\n\trr _ OrderedCollection new.\n\t[strm skipSeparators.\n\t strm peekFor: $)] whileFalse: \n\t\t[rr add: (Number readFrom: strm)].\n\tvv _ OrderedCollection new.\t\"Value array\"\n\taa _ OrderedCollection new.\t\"Attributes list\"\n\t[(this _ strm next) == nil] whileFalse: [\n\t\tthis == $, ifTrue: [vv add: aa asArray.  aa _ OrderedCollection new].\n\t\tthis == $a ifTrue: [aa add: \n\t\t\t(TextAlignment new alignment: (Integer readFrom: strm))].\n\t\tthis == $f ifTrue: [aa add: \n\t\t\t(TextFontChange new fontNumber: (Integer readFrom: strm))].\n\t\tthis == $F ifTrue: [aa add: (TextFontReference new toFont: \n\t\t\t(StrikeFont familyName: (strm upTo: $#) size: (Integer readFrom: strm)))].\n\t\tthis == $b ifTrue: [aa add: (TextEmphasis bold)].\n\t\tthis == $i ifTrue: [aa add: (TextEmphasis italic)].\n\t\tthis == $u ifTrue: [aa add: (TextEmphasis underlined)].\n\t\tthis == $= ifTrue: [aa add: (TextEmphasis struckOut)].\n\t\tthis == $n ifTrue: [aa add: (TextEmphasis normal)].\n\t\tthis == $- ifTrue: [aa add: (TextKern kern: -1)].\n\t\tthis == $+ ifTrue: [aa add: (TextKern kern: 1)].\n\t\tthis == $c ifTrue: [aa add: (TextColor scanFrom: strm)]. \"color\"\n\t\tthis == $L ifTrue: [aa add: (TextLink scanFrom: strm)].\t\"L not look like 1\"\n\t\"\tthis == $R ifTrue: [aa add: (TextURL scanFrom: strm)].\"\n\t\t\t\t\"R capitalized so it can follow a number\"\n\t\"\tthis == $q ifTrue: [aa add: (TextSqkPageLink scanFrom: strm)]. \"\n\t\"\tthis == $p ifTrue: [aa add: (TextSqkProjectLink scanFrom: strm)]. \"\n\t\tthis == $P ifTrue: [aa add: (TextPrintIt scanFrom: strm)].\n\t\tthis == $d ifTrue: [aa add: (TextDoIt scanFrom: strm)].\n\t\t\"space, cr do nothing\"\n\t\t].\n\taa size > 0 ifTrue: [vv add: aa asArray].\n\t^ self runs: rr asArray values: vv asArray\n\"\nRunArray scanFrom: (ReadStream on: '(14 50 312)f1,f1b,f1LInteger +;i')\n\"! !\n\n!RunArray class methodsFor: '*RVM-Archiving-instance creation'!\narchiveVersion\n\t^3! !\n\n!RunArray class methodsFor: '*RVM-Archiving-instance creation'!\ndearchive2From: aStream\n\t| anInteger  runs values |\n\tanInteger _ aStream read: Integer.\n\truns _ Array new: anInteger.\n\tvalues _ Array new: anInteger.\n\t1 to: anInteger do:\n\t\t[:x |\n\t\truns at: x put: (aStream read: Integer).\n\t\tvalues at: x put: aStream next].\n\t^self runs: runs values: values! !\n\n!RunArray class methodsFor: '*RVM-Archiving-instance creation'!\ndearchive: versionNumber from: aStream\n\t| anInteger  runs values |\n\tversionNumber = 1 ifTrue:\n\t\t[anInteger _ aStream read: Integer.\n\t\truns _ Array new: anInteger.\n\t\tvalues _ Array new: anInteger.\n\t\t1 to: anInteger do:\n\t\t\t[:x |\n\t\t\truns at: x put: (aStream read: Integer).\n\t\t\tvalues at: x put: (aStream read: Integer)].\n\t\t^self runs: runs values: values].\n\tversionNumber = 2 ifTrue: \n\t\t[^self dearchive2From: aStream].\n\tversionNumber = self archiveVersion ifTrue:\n\t\t[^self dearchiveFrom: aStream].\n\tself error: 'Can''t dearchive this version.'! !\n\n!RunArray class methodsFor: '*RVM-Archiving-instance creation'!\ndearchiveFrom: aStream\n\n\t| anObject anInteger runs values |\n\tanObject _ self basicNew.\n\taStream storeObject: anObject.\n\tanInteger _ aStream read: Integer.\n\truns _ Array new: anInteger.\n\tvalues _ Array new: anInteger.\n\t1 to: anInteger do:\n\t\t[:x |\n\t\truns at: x put: (aStream read: Integer).\n\t\tvalues at: x put: aStream next].\n\t^anObject setRuns: runs setValues: values! !\n\n!SMarkAutosizeRunner methodsFor: 'initialization' stamp: 'StefanMarr 3/19/2011 19:59'!\ninitialize\n\tsuper initialize.\n\ttargetTime := self class defaultTargetTime.! !\n\n!SMarkAutosizeRunner methodsFor: 'benchmarking' stamp: 'StefanMarr 3/20/2011 10:27'!\nperformBenchmark: aSelector\n\t\"First determine a useful number of inner loop iterations until the targetTime is reached.\"\n\t| execTime i |\n\t\"make sure no timers are recorded for this\"\n\ttimers := nil.\n\t\n\ti := 1.\n\texecTime := Time millisecondsToRun: [ suite perform: aSelector. ].\n\t\n\t[ execTime > targetTime ] whileFalse: [\n\t\ti := i * 2. \"Was thinking of doing something fancy here, but just go with this simple staight-forward solution\"\n\t\texecTime := Time millisecondsToRun: [ 1 to: i do: [:ignored| suite perform: aSelector]].\n\t].\n\n\tinnerLoopIterations := i.\n\t\n\t\"Then start executing the benchmark\"\n\t^ super performBenchmark: aSelector.! !\n\n!SMarkAutosizeRunner methodsFor: 'benchmarking' stamp: 'StefanMarr 3/20/2011 10:49'!\nrunBaseBenchmark\n\t\"baseBenchmark is not supported with autosizing. I do not see how that can be made possible since all different benchmarks will have different number of iterations, and the only way how a consistent baseline could be found would be to normalize the results, but well, incooprorating the baseline measurement with the statistical evaluation is harder than just substracting a one time value..., I am not going to do that here for the moment. Stefan 2011-03-20\"\n\t\n\t(suite respondsTo: #baseBenchmark) \n\t\tifFalse: [ ^ nil ].\n\t\n\t\"I decided to go here with a silent solution to avoid thinking about logging frameworks and Transcript to console convertion...\"\n\tself recordResults: (self class defaultTimer new: 'total') for: #baseBenchmark  ! !\n\n!SMarkAutosizeRunner methodsFor: 'benchmarking' stamp: 'StefanMarr 3/20/2011 10:31'!\ntimedBenchmarkExecution: aSelector\n\t\"Will do a timed execution of the benchmark and return the result timer\"\n\t| timer |\n\ttimers := Dictionary new.\n\n\ttimer := self createTimer: 'total'.\n\t\n\ttimer start.\n\t1 to: innerLoopIterations do: [:ignored|\n\t\tsuite perform: aSelector.\n\t].\n\ttimer stop.\n\t\n\tself recordResults: timer for: aSelector.\n\t\n\t^ timer! !\n\n!SMarkAutosizeRunner methodsFor: 'accessing' stamp: 'StefanMarr 3/19/2011 19:18'!\ntargetTime\n\t\"Target time in milliseconds\"\n\t^ targetTime! !\n\n!SMarkAutosizeRunner methodsFor: 'accessing' stamp: 'StefanMarr 3/19/2011 19:18'!\ntargetTime: anIntInMilliseconds\n\t\"Target time in milliseconds\"\n\ttargetTime := anIntInMilliseconds! !\n\n!SMarkAutosizeRunner class methodsFor: 'defaults' stamp: 'StefanMarr 3/19/2011 19:17'!\ndefaultTargetTime\n\t\"300 milliseconds seems to be a reasonable target time for most problems.\n\t It is a compromise between the general measurment noise as well as timer accuracy\n\t and the absolute runtime of benchmarks\"\n\t^ 300! !\n\n!SMarkAutosizeRunnerTest methodsFor: 'as yet unclassified'!\nrunnerClass\n\t^ SMarkTestAutosizeRunner! !\n\n!SMarkAutosizeRunnerTest methodsFor: 'as yet unclassified'!\ntestAutosizing\n\t\"Ensure that the runtime is automatically sized up to a predefined value\"\n\t| runner results big small runTime benchmarkSum |\n\t\n\trunner := self runnerClass new.\n\t\n\t\"sanity check for target time\"\n\t\"Not checked since we reduced the targetTime for testing:\n\t self assert: self runnerClass defaultTargetTime equals: runner targetTime.\"\n\tself assert: (self runnerClass defaultTargetTime > 250).\n\t\n\trunner iterations: 3.\n\t  \n\trunner suite: SMarkTestRunnerSuiteForAutosizing new.\n\t\n\t\"Execute the benchmarks and take the overall time it takes\"\n\trunTime := Time millisecondClockValue.\n\tresults := runner execute.\n\trunTime := Time millisecondClockValue - runTime.\n\t\n\t\"There should be three benchmarks\"\n\tself assert: 3 equals: results size.\n\tself assert: (results includesKey: #baseBenchmark).\n\tbig := results at: #Big.\n\tsmall := results at: #Small.\n\t\n\tself assert: (big respondsTo: #at:).\n\tself assert: 3 equals: big size.\n\t\n\tself assert: (runner targetTime <= (big at: 1) total).\n\tself assert: (runner targetTime <= (small at: 1) total).\n\t\n\t\"Calculate the sum of all measurements\"\n\tbenchmarkSum := big inject: 0 into: [:sum :result| sum + result total].\n\tbenchmarkSum := small inject: benchmarkSum into: [:sum :result| sum + result total].\n\t\n\t\"And now make sure that we not try to find the problem size for every but only the first run\"\n\tself assert: (benchmarkSum * 2) > runTime.\n\t\n! !\n\n!SMarkAutosizeRunnerTest methodsFor: 'as yet unclassified'!\ntestAutosizingBaseBenchmark\n\t\"Ensure that baseBenchmarks are not delivering any data since I do not see how that could be done nicely\"\n\t| runner results |\n\trunner := self runnerClass new.\n\trunner iterations: 3.\n\trunner suite: SMarkTestRunnerSuiteForAutosizing new.\n\t\n\t\"Execute the benchmarks and take the overall time it takes\"\n\tresults := runner execute.\n\t\n\t\"There should be two benchmarks\"\n\tself assert: 3 equals: results size.\n\tself assert: 0 equals: ((results at: #baseBenchmark) at: 1) total.\n\t\n! !\n\n!SMarkAutosizeRunnerTest methodsFor: 'as yet unclassified'!\ntestBaseBenchmark\n\t\"Different from base test: Ensure the base benchmark is NOT executed when available\"\n\t\n\t| runner |\n\trunner := self runnerClass execute: SMarkTestSuiteWithBaseBenchmark new.\n\n\tself deny: runner baseBenchmarkExecuted  ! !\n\n!SMarkAutosizeRunnerTest methodsFor: 'as yet unclassified'!\ntestExecute\n\t\"This test is slightly different from the one in the base class\"\n\t| runner results performedBenchmarks |\n\trunner := self runnerClass new.\n\trunner suite: SMarkTestRunnerSuiteForPerfromBenchmark new.\n\tresults := runner execute.\n\t\n\tperformedBenchmarks := runner performedBenchmarks.\n\t\t\n\tself assert: 4 equals: performedBenchmarks size.\t\t\t\t\"Different from base test\"\n\tself deny: (performedBenchmarks includes: #baseBenchmark).\t\"Different from base test\"\n\t\n\tself assert: (results respondsTo: #at:).\n\t\n\t\"But still we get a result\" \"Different from base test\"\n\tself assert: (((results at: #baseBenchmark) at: 1) isKindOf: SMarkResult).! !\n\n!SMarkAutosizeRunnerTest methodsFor: 'as yet unclassified'!\ntestIterations\n\t| runner |\n\t\"This test is different then the one in the base class, it is not direct, but just looks at the results\"\n\t\n\t\" simple scenario should default to 1 run for now \"\n\trunner := self runnerClass execute: SMarkTestRunnerSuite new.\n\t\n\tself assert: 1 equals: (runner results at: #NotifyRunner) size.\n\t\n\t\" but we can also be more fancy and set the number of iterations \"\n\trunner := self runnerClass new.\n\trunner suite: SMarkTestRunnerSuite new.\n\t\n\t\"first check again that the default is as expected\"\n\tself assert: 1 equals: runner iterations.  \n\t\n\trunner iterations: 10.\n\tself assert: runner iterations equals: 10.\n\t\n\trunner execute.\n\t\n\tself assert: 10 equals: (runner results at: #NotifyRunner) size.! !\n\n!SMarkAutosizeRunnerTest class methodsFor: 'as yet unclassified'!\nshouldInheritSelectors\n\t^ true! !\n\n!SMarkCompiler methodsFor: 'benchmarking'!\nbenchCompiler\n\t\"was Benchmark>>testCompiler\"\n\tSMarkCompilerTargetClass new compile:\n\t\t'somethingDummy: aBlock repeated: nTimes | i emptyBlock emptyTime blockTime |\n\t\tnTimes > 1000 ifTrue: [^self time: aBlock repeatedK: nTimes // 1000].\n\t\temptyBlock := [].\n\t\temptyTime := Time millisecondsToRun:\n\t\t\t\t\t\t[i := 0.\n\t\t\t\t\t\t [(i := i + 1) <= nTimes] whileTrue: [emptyBlock value]].\n\t\tblockTime := Time millisecondsToRun:\n\t\t\t\t\t\t[i := 0.\n\t\t\t\t\t\t [(i := i + 1) <= nTimes] whileTrue: [aBlock value]].\n\t\t^blockTime - emptyTime'.! !\n\n!SMarkCompiler class methodsFor: 'script entry'!\ndefaultNumberOfIterations\n\t^ 50! !\n\n!SMarkCompiler class methodsFor: 'script entry'!\ndefaultNumberOfProcesses\n\t^ 8! !\n\n!SMarkCompilerTargetClass methodsFor: 'compiling'!\nacceptsLoggingOfCompilation\n\t\"Answer whether the receiver's method submisions and class defintions should be logged to the changes file and to the current change set.\"\n\n\t^ false! !\n\n!SMarkCompilerTargetClass methodsFor: 'accessing method dictionary'!\naddAndClassifySelector: selector withMethod: compiledMethod inProtocol: aCategory notifying: requestor\n\t| priorMethodOrNil oldProtocol newProtocol |\n\tpriorMethodOrNil := self compiledMethodAt: selector ifAbsent: [nil].\n\tself addSelectorSilently: selector withMethod: compiledMethod.\n\toldProtocol := self organization categoryOfElement: selector.\n\tSystemChangeNotifier uniqueInstance \n\t\tdoSilently: [self organization classify: selector under: aCategory].\n\tnewProtocol := self organization categoryOfElement: selector.! !\n\n!SMarkCompilerTargetClass methodsFor: 'initialization' stamp: 'sm 1/17/2011 09:38'!\ninitialize\n\tsuper initialize.\n\tself methodDictionary: MethodDictionary new.! !\n\n!SMarkHarness commentStamp: 'StefanMarr 3/12/2011 21:12' prior: 0!\nA benchmark harness stears the execution and reporting of benchmarks.\nFor that purpose, it will use a designated benchmark runner to do the execution and a benchmark reporter to output the results.\nThe benchmark harness is also parameterized by the benchmark suites that are to be executed.!\n!SMarkHarness class methodsFor: 'defaults'!\ndefaultOutputDestination\n\t^ Smalltalk at:       #ScriptConsole\n\t            ifAbsent: [SMarkReporter defaultOutputDestination]! !\n\n!SMarkHarness class methodsFor: 'defaults'!\ndefaultReporter\n\t^ SMarkReporter defaultReporter! !\n\n!SMarkHarness class methodsFor: 'defaults'!\ndefaultRunner\n\t^ SMarkSuite defaultRunner! !\n\n!SMarkHarness class methodsFor: 'benchmarking' stamp: 'sm 5/25/2011 17:41'!\nexecute: runner andReport: reporter\n\trunner reportConfiguration: self defaultOutputDestination.\n\trunner execute.\n\treporter runner: runner.\n\treporter outputStream: self defaultOutputDestination.\n\treporter report.! !\n\n!SMarkHarness class methodsFor: 'benchmarking'!\nexecute: aBenchmarkOrSuite using: aRunnerClass andReport: withAReporterClass\n\t| parsedBenchmarkOrSuite runner reporter |\n\t\n\tparsedBenchmarkOrSuite := self parseBenchmarkOrSuite: aBenchmarkOrSuite.\n\t\n\trunner := aRunnerClass new.\n\treporter := withAReporterClass new.\n\tself instructRunner: runner with: parsedBenchmarkOrSuite.\n\tself execute: runner andReport: reporter.   ! !\n\n!SMarkHarness class methodsFor: 'helper'!\nparseArguments: arguments\n\t| parser |\n\tparser := SMarkHarnessArgumentParser new.\n\t^ parser parse: arguments.! !\n\n!SMarkHarness class methodsFor: 'helper'!\nshouldShowUsage: arguments\n\t\n\targuments size < 2 ifTrue: [^ true ].\n\t\n\t^ arguments anySatisfy: [:elem | (elem = '--help') or: [elem = '-?'] ].  ! !\n\n!SMarkHarness class methodsFor: 'helper'!\nusage\n\t| usage |\n\t\"Example usage: SMarkHarness SMarkRunner SMarkReporter SMarkLoops.benchIntLoop 1 1 5\"\n\t\n\tusage := self usageHeader.\n\t\n\tusage := usage, 'Arguments:', String crlf.\n\tusage := self usageRunner:   usage.\n\tusage := self usageReporter: usage.\n\tusage := usage, ' suiteOrBenchmark   required, either a SMarkSuite with benchmarks,', String crlf.\n\tusage := usage, '                              or a benchmark denoted by Suite.benchName', String crlf.\n\tusage := self usageBenchmarkParameters: usage.\n\t\n\tScriptConsole print: usage.! !\n\n!SMarkHarness class methodsFor: 'helper'!\nusageBenchmarkParameters: usage\n\t^ usage,\t' iterations         optional, number of times the benchmarks are repeated', String crlf,\n\t\t\t\t' processes          optional, number of processes/threads used by the benchmarks', String crlf,\n\t\t\t\t' problemSize        optional, depending on benchmark for instance number of', String crlf,\n\t\t\t\t'                              inner iterations or size of used data set', String crlf.\n! !\n\n!SMarkHarness class methodsFor: 'helper'!\nusageHeader\n\t| usage |\n\tusage := 'SMark Benchmark Framework, version: ', self version, String crlf.\n\tusage := usage, String crlf.\n\tusage := usage, 'Usage: <vm+image> ', self name, ' [runner] [reporter] <suiteOrBenchmark>', String crlf.\n\tusage := usage, '                               [iterations [processes [problemSize]]]', String crlf.\n\tusage := usage, String crlf.\n\t^ usage! !\n\n!SMarkHarness class methodsFor: 'helper'!\nusageReporter: usage\n\t^ usage,\t' reporter           optional, a SMarkReporter class that processes', String crlf,\n\t\t\t\t'                              and displays the results', String crlf.\n\t! !\n\n!SMarkHarness class methodsFor: 'helper'!\nusageRunner: usage\n\t^ usage, ' runner             optional, a SMarkRunner class that executes the benchmarks', String crlf.! !\n\n!SMarkHarness class methodsFor: 'helper'!\nversion\n\t(Smalltalk classNamed: #ConfigurationOfBenchmarking)\n\t\tifNotNilDo: [:cfg |\n\t\t\t\"Make sure Monticello is available, too\"\n\t\t\t(Smalltalk classNamed: #MCHttpRepository) ifNotNil: [\n\t\t\t\t^ cfg project currentVersion versionNumber asString.\n\t\t\t].\n\t\t].\n\t  \n\t(Smalltalk classNamed: #MCPackage)\n\t\tifNotNilDo: [:mcp |\n\t\t\t| package |\n\t\t\tpackage := mcp named: 'SMark'.\n\t\t\tpackage hasWorkingCopy ifTrue: [\n\t\t\t\t^ package workingCopy ancestors first name.\n\t\t\t].\n\t\t].\n\t\n\t^ ''.! !\n\n!SMarkHarness class methodsFor: 'script entry'!\nrun: arguments\n\t\"Execcuted from the command line using something similar to\n\t ./vm my.image SMarkHarness SMarkRunner SMarkReporter SMarkLoops\\>\\>benchIntLoop 1 1 5\n\t ./vm my.image SMarkHarness SMarkRunner SMarkReporter SMarkLoops.benchIntLoop 1 1 5\"\n\t| runner reporter runnerAndReporter |\n\t\n\t(self shouldShowUsage: arguments)\n\t\tifTrue: [\n\t\t\tself usage.\n\t\t\t^ self.\n\t\t].\n\t\n\trunnerAndReporter := self parseArguments: arguments.\n\trunner := runnerAndReporter first.\n\treporter := runnerAndReporter second.  \n\t\n\tself execute: runner andReport: reporter. ! !\n\n!SMarkHarnessArgumentParser methodsFor: 'argument parsing' stamp: 'sm 5/25/2011 17:38'!\ndetermineBenchmarkParameters\n\t\"Initialize with defaults, will be overwritten in case\n\t it is specified.\"\n\titerations := runner class defaultNumberOfIterations.\n\tprocesses  := runner class defaultNumberOfProcesses.\n\tproblemSize:= suiteClass defaultProblemSize.\n\t\n\tself determineBenchmarkParametersFromArguments.! !\n\n!SMarkHarnessArgumentParser methodsFor: 'argument parsing'!\ndetermineBenchmarkParametersFromArguments\n\ti := i + 1.\n\ti <= numParams ifTrue: [\n\t\titerations := (arguments at: i) asInteger.\n\t\ti := i + 1.\n\t\ti <= numParams ifTrue: [\n\t\t\tprocesses := (arguments at: i) asInteger.\n\t\t\ti := i + 1.\n\t\t\ti <= numParams ifTrue: [\n\t\t\t\tproblemSize := arguments at: i.\n\t\t\t]\n\t\t]\n\t].! !\n\n!SMarkHarnessArgumentParser methodsFor: 'argument parsing'!\ndetermineReporter\n\t(currentObj isKindOf: SMarkReporter)\n\t\tifFalse: [ reporter := harness defaultReporter new. ]\n\t\tifTrue:  [ reporter := currentObj.\n\t\t\ti := i + 1.\n\t\t\ti <= numParams ifTrue: [\n\t\t\t\tcurrent := arguments at: i.\n\t\t\t]\n\t\t].! !\n\n!SMarkHarnessArgumentParser methodsFor: 'argument parsing'!\ndetermineRunner\n\t(currentObj isKindOf: SMarkRunner)\n\t\tifFalse: [ runner := harness defaultRunner new. ]\n\t\tifTrue:  [ runner := currentObj.\n\t\t\ti := i + 1.\n\t\t\ti <= numParams ifTrue: [\n\t\t\t\tcurrent := arguments at: i.\n\t\t\t\tcurrentObj := (Smalltalk classNamed: current) ifNotNilDo: [:cls | cls new].\n\t\t\t]\n\t\t].! !\n\n!SMarkHarnessArgumentParser methodsFor: 'argument parsing' stamp: 'sm 5/25/2011 17:26'!\ndetermineSuiteOrBenchmark\n\tself parseBenchmarkOrSuite: current.! !\n\n!SMarkHarnessArgumentParser methodsFor: 'argument parsing'!\nparseBenchmarkOrSuite: aBenchmarkOrSuite\n\t\"Identify the benchmark suite or suite and benchmark method\n\t that should be executed. The string should be of the format 'Class>>benchName' or 'Class.benchName' for shell/bash compatibility.\n\t Accepts a string, class, or array.\n\t Returns, a class, or an array of a class and a symbol.\"\n\t| parsed |\n\t(aBenchmarkOrSuite isKindOf: Class)\n\t\tifTrue: [\n\t\t\tsuiteClass := aBenchmarkOrSuite.\n\t\t\t^ suiteClass\n\t\t].\n\t  \n\t(aBenchmarkOrSuite isKindOf: Array)\n\t\tifTrue:  [ parsed := aBenchmarkOrSuite. ]\n\t\tifFalse: [ parsed := aBenchmarkOrSuite findTokens: '>.'. ].\n\t\n\t((parsed size > 2) or: [parsed size < 1])\n\t\t\t\tifTrue: [ Error signal: 'The passed argument has to represent two elements. A class/classname and a method symbol' ].\n\t\n\tsuiteClass := parsed first.\n\t\n\t(suiteClass isKindOf: Class) \n\t\tifFalse: [ suiteClass := Smalltalk at: (suiteClass asSymbol) ifAbsent: [Error signal: 'Class that was supposed to represent a benchmark suite was not found: ', suiteClass asString ]].\n\t\n\tparsed size = 1\n\t\tifTrue: [^suiteClass].\n\n\tspecificBenchmark := parsed second asSymbol.\n\t\n\t^ { suiteClass. specificBenchmark }\n! !\n\n!SMarkHarnessArgumentParser methodsFor: 'accessing'!\nharness: aHarness\n\tharness := aHarness! !\n\n!SMarkHarnessArgumentParser methodsFor: 'parsing' stamp: 'sm 5/25/2011 17:27'!\nparse: argumentsArray\n\targuments := argumentsArray.\n\tnumParams := arguments size.\n\t\n\ti := 2.\n\tcurrent := arguments at: i.\n\tcurrentObj := (Smalltalk classNamed: current) ifNotNilDo: [:cls | cls new].\n\t\t\n\tself determineRunner.\n\tself determineReporter.\n\t\n\tself determineSuiteOrBenchmark.\n\t\n\tself determineBenchmarkParameters.\n\t\n\tself instructRunner.\n\t\n\t^ {runner. reporter}! !\n\n!SMarkHarnessArgumentParser methodsFor: 'helper' stamp: 'sm 5/25/2011 17:29'!\ninstructRunner\n\tsuite := suiteClass new.\n\tspecificBenchmark ifNotNil: [\n\t\tsuite runOnly: specificBenchmark.\n\t].\n\t\n\trunner suite: suite.\n \trunner iterations: iterations.\n\trunner processes: processes.\n\trunner problemSize: problemSize.! !\n\n!SMarkHarnessArgumentParserTest methodsFor: 'as yet unclassified'!\nsetUp\n\tparser := SMarkHarnessArgumentParser new.\n\tparser harness: SMarkHarness.! !\n\n!SMarkHarnessArgumentParserTest methodsFor: 'as yet unclassified'!\ntestParseArgumentsOnlyBench\n\t| arguments runnerAndReporter runner reporter runOnly |\n\targuments := {#ignored. 'SMarkTestSuite.benchA' }.\n\trunnerAndReporter := parser parse: arguments.\n\t\n\trunner   := runnerAndReporter first.\n\treporter := runnerAndReporter second.\n\t\n\tself assert: runner notNil.\n\tself assert: reporter notNil.\n\t\n\tself assert: (runner suite isKindOf: SMarkTestSuite).\n\trunOnly := runner suite selectedBenchmarks.\n\tself assert: 1 equals: runOnly size.\n\tself assert: (runOnly includes: #benchA).\n! !\n\n!SMarkHarnessArgumentParserTest methodsFor: 'as yet unclassified'!\ntestParseArgumentsOnlySuite\n\t| arguments runnerAndReporter runner reporter |\n\targuments := {#ignored. 'SMarkTestSuite' }.\n\trunnerAndReporter := parser parse: arguments.\n\t\n\trunner   := runnerAndReporter first.\n\treporter := runnerAndReporter second.\n\t\n\tself assert: runner notNil.\n\tself assert: reporter notNil.\n\t\n\tself assert: (runner suite isKindOf: SMarkTestSuite).\n\tself assert: runner suite selectedBenchmarks isNil.\n! !\n\n!SMarkHarnessArgumentParserTest methodsFor: 'as yet unclassified'!\ntestParseArgumentsReporterSuiteIterations\n\t| arguments runnerAndReporter runner reporter |\n\targuments := {#ignored. 'SMarkSimpleStatisticsReporter'. 'SMarkTestSuite'. '13'. }.\n\trunnerAndReporter := parser parse: arguments.\n\t\n\trunner   := runnerAndReporter first.\n\treporter := runnerAndReporter second.\n\t\n\tself assert: runner notNil.\n\tself assert: reporter notNil.\n\t\n\tself assert: (reporter isKindOf: SMarkSimpleStatisticsReporter).\n\tself assert: (runner suite isKindOf: SMarkTestSuite).\n\tself assert: runner suite selectedBenchmarks isNil.\n\t\n\tself assert: 13 equals: runner iterations.\t! !\n\n!SMarkHarnessArgumentParserTest methodsFor: 'as yet unclassified'!\ntestParseArgumentsRunnerReporterSuiteIterations\n\t| arguments runnerAndReporter runner reporter |\n\targuments := {#ignored. 'SMarkTestRunner'. 'SMarkSimpleStatisticsReporter'. 'SMarkTestSuite'. '13'. }.\n\trunnerAndReporter := parser parse: arguments.\n\t\n\trunner   := runnerAndReporter first.\n\treporter := runnerAndReporter second.\n\t\n\tself assert: runner notNil.\n\tself assert: reporter notNil.\n\t\n\tself assert: (runner isKindOf: SMarkTestRunner).\n\tself assert: (reporter isKindOf: SMarkSimpleStatisticsReporter).\n\tself assert: (runner suite isKindOf: SMarkTestSuite).\n\tself assert: runner suite selectedBenchmarks isNil.\n\t\n\tself assert: 13 equals: runner iterations.! !\n\n!SMarkHarnessArgumentParserTest methodsFor: 'as yet unclassified'!\ntestParseArgumentsRunnerSuiteIterations\n\t| arguments runnerAndReporter runner reporter |\n\targuments := {#ignored. 'SMarkTestRunner'. 'SMarkTestSuite'. '13'. }.\n\trunnerAndReporter := parser parse: arguments.\n\t\n\trunner   := runnerAndReporter first.\n\treporter := runnerAndReporter second.\n\t\n\tself assert: runner notNil.\n\tself assert: reporter notNil.\n\t\n\tself assert: (runner isKindOf: SMarkTestRunner).\n\tself assert: (runner suite isKindOf: SMarkTestSuite).\n\tself assert: runner suite selectedBenchmarks isNil.\n\t\n\tself assert: 13 equals: runner iterations.! !\n\n!SMarkHarnessArgumentParserTest methodsFor: 'as yet unclassified'!\ntestParseArgumentsSuiteAndIterations\n\t| arguments runnerAndReporter runner reporter |\n\targuments := {#ignored. 'SMarkTestSuite'. '13' }.\n\trunnerAndReporter := parser parse: arguments.\n\t\n\trunner   := runnerAndReporter first.\n\treporter := runnerAndReporter second.\n\t\n\tself assert: runner notNil.\n\tself assert: reporter notNil.\n\t\n\tself assert: (runner suite isKindOf: SMarkTestSuite).\n\tself assert: runner suite selectedBenchmarks isNil.\n\t\n\tself assert: 13 equals: runner iterations.! !\n\n!SMarkHarnessArgumentParserTest methodsFor: 'as yet unclassified'!\ntestParseArgumentsSuiteIterationsProcesses\n\t| arguments runnerAndReporter runner reporter |\n\targuments := {#ignored. 'SMarkTestSuite'. '13'. '91' }.\n\trunnerAndReporter := parser parse: arguments.\n\t\n\trunner   := runnerAndReporter first.\n\treporter := runnerAndReporter second.\n\t\n\tself assert: runner notNil.\n\tself assert: reporter notNil.\n\t\n\tself assert: (runner suite isKindOf: SMarkTestSuite).\n\tself assert: runner suite selectedBenchmarks isNil.\n\t\n\tself assert: 13 equals: runner iterations.\n\tself assert: 91 equals: runner processes.\n! !\n\n!SMarkHarnessArgumentParserTest methodsFor: 'as yet unclassified'!\ntestParseArgumentsSuiteIterationsProcessesProblemSize\n\t| arguments runnerAndReporter runner reporter |\n\targuments := {#ignored. 'SMarkTestSuite'. '13'. '91'. 'SSS' }.\n\trunnerAndReporter := parser parse: arguments.\n\t\n\trunner   := runnerAndReporter first.\n\treporter := runnerAndReporter second.\n\t\n\tself assert: runner notNil.\n\tself assert: reporter notNil.\n\t\n\tself assert: (runner suite isKindOf: SMarkTestSuite).\n\tself assert: runner suite selectedBenchmarks isNil.\n\t\n\tself assert: 13 equals: runner iterations.\n\tself assert: 91 equals: runner processes.\n\tself assert: 'SSS' equals: runner problemSize.\n! !\n\n!SMarkHarnessArgumentParserTest methodsFor: 'as yet unclassified'!\ntestParseBenchmarkOrSuite\n\t| example1 example2 example3 example4 example5 |\n\texample1 := 'String>>findTokens:'.\n\texample2 := 'SMarkTestSuite'.\n\texample3 := { SMarkTestSuite. #benchA }.\n\texample4 := SMarkTestSuite.\n\texample5 := 'String.findTokens:'. \". (dot) notation is required to avoid quoting in bash\"\n\t\n\tself assert: { String. #findTokens: }    equals: (parser parseBenchmarkOrSuite: example1).\n\tself assert: SMarkTestSuite              equals: (parser parseBenchmarkOrSuite: example2).\n\tself assert: { SMarkTestSuite. #benchA } equals: (parser parseBenchmarkOrSuite: example3).\n\tself assert: SMarkTestSuite              equals: (parser parseBenchmarkOrSuite: example4).\n\tself assert: { String. #findTokens: }    equals: (parser parseBenchmarkOrSuite: example5).\n\t\n\t\"What to do when the input is not a symbol, array, or class?\"\n\t\n\t\"What to do when the class does not exist\"\n\tself should: [parser parseBenchmarkOrSuite: 'FooBarClassThatDoesNotExist'] raise: Error.! !\n\n!SMarkHarnessClassTest methodsFor: 'tests'!\ntestShouldShowUsage\n\t| example1 example2 example3 example4 |\n\texample1 := { #ignored. '--help' }.\n\texample2 := { #ignored. }.\n\texample3 := { #ignored. '-?'}.\n\texample4 := { #ignored. 1. 2. }.\n\t\n\tself assert: (SMarkHarness shouldShowUsage: example1).\n\tself assert: (SMarkHarness shouldShowUsage: example2).\n\tself assert: (SMarkHarness shouldShowUsage: example3).\n\tself deny:   (SMarkHarness shouldShowUsage: example4).\n! !\n\n!SMarkLoops methodsFor: 'benchmarking'!\nbenchFloatLoop\n\t| a |\n\ta := 1.23.\n\t[a < 50000] whileTrue: [\n\t\ta := a + 0.6.\n\t\ta := a + 0.4.\n\t].! !\n\n!SMarkLoops methodsFor: 'benchmarking' stamp: 'StefanMarr 7/26/2011 11:46'!\nbenchIntLoop\n\t| i |\n\ti := 25000.\n\t[i > 0] whileTrue: [\n\t\ti := i - 1.\n\t].! !\n\n!SMarkReporter methodsFor: 'reporting'!\nbenchmarkFooter: aName\n\tstream cr.! !\n\n!SMarkReporter methodsFor: 'reporting'!\nbenchmarkHeader: aName\n\tstream << 'Benchmark ' << (aName asString); cr.! !\n\n!SMarkReporter methodsFor: 'reporting'!\nfooter\n\t\"No output at the moment\"\n\t^ self! !\n\n!SMarkReporter methodsFor: 'reporting'!\nheader\n\t| suiteName |\n\tsuiteName := runner suite class name asString.\n\tstream << 'Report for: ' << suiteName; cr.! !\n\n!SMarkReporter methodsFor: 'reporting'!\nreportAllRuns: aListOfResults of: benchmark\n\taListOfResults do: [:result |\n\t\tresult criteria keysAndValuesDo: [:benchName :timer |\n\t\t\tstream << benchName << ': ' << (timer totalTime asString, 'ms'); cr.\n\t\t\t]  \n\t\t]! !\n\n!SMarkReporter methodsFor: 'initialization'!\ninitialize\n\tstream := self class defaultOutputDestination.! !\n\n!SMarkReporter methodsFor: 'accessing'!\noutputStream: aStream\n\tstream := aStream  ! !\n\n!SMarkReporter methodsFor: 'accessing'!\nreport\n\tself header.\n\t\n\trunner results keysAndValuesDo: [:key :value |\n\t\tself benchmarkHeader: key.\n\t\tself reportAllRuns: value of: key.\n\t\tself benchmarkFooter: key.\n\t].\n\n\tself footer.\n\t^ self! !\n\n!SMarkReporter methodsFor: 'accessing'!\nrunner: aRunner\n\trunner := aRunner.! !\n\n!SMarkReporter commentStamp: 'StefanMarr 3/20/2011 19:55' prior: 0!\nPBenchmarkReporter has not been documented yet. The class comment should describe the purpose of the class, its collaborations and its variables.\n\nInstance Variables:\n\trunner\t<PBenchmarkRunner>\n\tstream\t<NSDecoderDeflateStream | SocketStream | ThreadSafeTranscript | WriteStream>\n\t\t\nExample:\n\n\tf := TextStream on: String new.\n\tPBenchmarkSimpleStatisticsReporter reportFor: (PTestBenchmarkRunnerSuiteForAutosizing run: 10) on: f.\n\tf contents!\n!SMarkReporter class methodsFor: 'defaults'!\ndefaultOutputDestination\n\t^ ScriptConsole! !\n\n!SMarkReporter class methodsFor: 'defaults'!\ndefaultReporter\n\t^ SMarkSimpleStatisticsReporter! !\n\n!SMarkReporter class methodsFor: 'reporting'!\nreportFor: aRunner\n\tself reportFor: aRunner on: self defaultOutputDestination.! !\n\n!SMarkReporter class methodsFor: 'reporting'!\nreportFor: aRunner on: aStream\n\t| reporter |\n\treporter := self new.\n\treporter runner: aRunner.\n\treporter outputStream: aStream.\n\treporter report.\n\t^ reporter.! !\n\n!SMarkReporterTest methodsFor: 'as yet unclassified'!\nsetUp\n\trunner := SMarkTestRunnerSuiteForAutosizing run.! !\n\n!SMarkReporterTest methodsFor: 'as yet unclassified'!\ntestContentOfStream\n\t\"Hm, how to test that robustly?\"\n\t| reporter stream out |\n\tstream := TextStream on: String new.\n\treporter := SMarkReporter reportFor: runner on: stream.\n\t\n\tout := stream contents.\n\t\n\tself assert: (out includesSubString: 'Small').\n\tself assert: (out includesSubString: 'Big').\n\tself assert: (out includesSubString: 'Small').! !\n\n!SMarkReporterTest methodsFor: 'as yet unclassified'!\ntestConvenienceReportOnRunner\n\t| stream out |\n\tstream := TextStream on: String new.\n\t\n\t\"That should just work, cannot really check whether it is displayed anywhere.\"\n\tSMarkTestRunnerSuiteForAutosizing run report.\n\t\n\t\"Check whether it reported as expected\"\n\tSMarkTestRunnerSuiteForAutosizing run reportOn: stream.\n\t\n\tout := stream contents.\n\t\n\tself assert: (out includesSubString: 'Small').\n\tself assert: (out includesSubString: 'Big').\n\tself assert: (out includesSubString: 'Small').! !\n\n!SMarkResult methodsFor: 'accessing'!\nbenchmarkName\n\t^ benchName! !\n\n!SMarkResult methodsFor: 'accessing'!\nbenchmarkName: aString\n\tbenchName := aString! !\n\n!SMarkResult methodsFor: 'accessing'!\ncriteria\n\t^ criteria! !\n\n!SMarkResult methodsFor: 'accessing'!\ncriteria: aCollectionOfTimers\n\tcriteria := aCollectionOfTimers! !\n\n!SMarkResult methodsFor: 'accessing'!\nsuite\n\t^ suite! !\n\n!SMarkResult methodsFor: 'accessing'!\nsuite: aBenchmarkSuite\n\tsuite := aBenchmarkSuite! !\n\n!SMarkResult methodsFor: 'accessing'!\ntotal\n\t^ time! !\n\n!SMarkResult methodsFor: 'accessing'!\ntotal: aTime\n\ttime := aTime! !\n\n!SMarkResult commentStamp: 'StefanMarr 3/18/2011 23:45' prior: 0!\nA benchmark result is characterized by:\n - the total execution time (#total is the least a benchmark results in)\n - the name of the benchmark that was executed\n - the suite object specifies the used input used for the benchmark\n - dictionary of additional the criteria and the related timings\n\nA benchmark can produced multiple resuts for different criteria. The standard criterion is #total.!\n!SMarkResultTest methodsFor: 'as yet unclassified'!\nsetUp\n\t| runner |\n\trunner := SMarkTestRunner execute: SMarkTestRunnerSuite new.\n\tresult := (runner results at: #DoNothing) at: 1.! !\n\n!SMarkResultTest methodsFor: 'as yet unclassified'!\ntestBenchmarkName\n\tself assert: (result benchmarkName isKindOf: String)! !\n\n!SMarkResultTest methodsFor: 'as yet unclassified'!\ntestCriteria\n\tself assert: (result criteria respondsTo: #at:).\n\tself assert: (result criteria size > 0).! !\n\n!SMarkResultTest methodsFor: 'as yet unclassified'!\ntestSuite\n\tself assert: result suite notNil! !\n\n!SMarkResultTest methodsFor: 'as yet unclassified'!\ntestTotal\n\tself assert: (result total isKindOf: Number)! !\n\n!SMarkResultTest commentStamp: 'StefanMarr 3/18/2011 23:29' prior: 0!\nThis test specifies the data stored in a result object.\nThe result object does not actually provide behavior on its own.!\n!SMarkRunner methodsFor: 'helper' stamp: 'StefanMarr 3/20/2011 10:28'!\ncreateTimer: name\n\t\"Create and register a new timer for the current benchmark\"\n\t| timer |\n\ttimer := self class defaultTimer new: name.\n\t\n\ttimers ifNotNil: [\n\t\ttimers at: name put: timer.\n\t].\n\t\n\t^ timer.! !\n\n!SMarkRunner methodsFor: 'helper' stamp: 'StefanMarr 3/20/2011 21:01'!\nrecordResults: timer for: aSelector\n\t| result name |\n\tname := suite benchmarkNameForSelector: aSelector.\n\t\n\tresult := SMarkResult new.\n\tresult total: timer totalTime.\n\tresult benchmarkName: name.\n\tresult suite: suite.\n\tresult criteria: timers.\n\t\n\t(results at: name ifAbsentPut: OrderedCollection new) add: result.! !\n\n!SMarkRunner methodsFor: 'execution' stamp: 'StefanMarr 3/13/2011 23:05'!\nexecute\n\tsuite run.\n\tself runBaseBenchmark.\n\t^ results\n\t! !\n\n!SMarkRunner methodsFor: 'initialization' stamp: 'StefanMarr 5/14/2011 11:10'!\ninitialize\n\tsuper initialize.\n\tnumIterations := self class defaultNumberOfIterations.\n\tnumProcesses  := self class defaultNumberOfProcesses.\n\tresults := Dictionary new.! !\n\n!SMarkRunner methodsFor: 'accessing' stamp: 'StefanMarr 3/21/2011 12:20'!\niterations\n\t^ numIterations! !\n\n!SMarkRunner methodsFor: 'accessing' stamp: 'StefanMarr 3/21/2011 12:20'!\niterations: anInteger\n\tnumIterations := anInteger! !\n\n!SMarkRunner methodsFor: 'accessing' stamp: 'StefanMarr 4/15/2011 16:08'!\nproblemSize\n\t^ problemSize! !\n\n!SMarkRunner methodsFor: 'accessing' stamp: 'StefanMarr 4/15/2011 16:09'!\nproblemSize: aValue\n\tproblemSize := aValue! !\n\n!SMarkRunner methodsFor: 'accessing' stamp: 'StefanMarr 5/14/2011 11:08'!\nprocesses\n\t\"The standard runner does use only a single process, but in case a benchmark supports parallelism it can query for the intended degree of parallelism\"\n\t^ numProcesses! !\n\n!SMarkRunner methodsFor: 'accessing' stamp: 'StefanMarr 5/14/2011 11:08'!\nprocesses: anInt\n\t\"The standard runner does use only a single process, but a benchmark can use that to do its own parallelism\"\n\tnumProcesses := anInt! !\n\n!SMarkRunner methodsFor: 'accessing' stamp: 'StefanMarr 4/15/2011 16:46'!\nreport\n\tSMarkReporter defaultReporter reportFor: self.  \n\t! !\n\n!SMarkRunner methodsFor: 'accessing' stamp: 'StefanMarr 3/18/2011 19:41'!\nresults\n\t^ results! !\n\n!SMarkRunner methodsFor: 'accessing' stamp: 'StefanMarr 3/20/2011 18:45'!\nsuite\n\t^ suite! !\n\n!SMarkRunner methodsFor: 'accessing' stamp: 'StefanMarr 4/15/2011 16:14'!\nsuite: aBenchmarkSuite\n\tsuite := aBenchmarkSuite.\n\tsuite runner: self.! !\n\n!SMarkRunner methodsFor: 'benchmarking' stamp: 'StefanMarr 4/15/2011 11:50'!\nperformBenchmark: aSelector\n\tcurrentBenchmark := aSelector.\n\t\n\t1 to: numIterations do: [:i|\n\t\t\"self timedBenchmarkExecution: aSelector.\"\n\t\tsuite runBenchmark: aSelector.  \n\t].\t\n\t\n\tcurrentBenchmark := nil.\n\t\n\t^ results at: (suite benchmarkNameForSelector: aSelector)! !\n\n!SMarkRunner methodsFor: 'benchmarking' stamp: 'StefanMarr 3/18/2011 18:42'!\nrunBaseBenchmark\n\t\"In certain sitatuations it is one wants a baseline that is incooprated in all \n\t benchmark results to be substracted from the final values.\n\t\n\t#baseBenchmark can be used to charaterize such a baseline\"\n\t\n\t(suite respondsTo: #baseBenchmark) \n\t\tifFalse: [ ^ nil ].\n\t\n\t^ self performBenchmark: #baseBenchmark.! !\n\n!SMarkRunner methodsFor: 'benchmarking' stamp: 'StefanMarr 3/19/2011 22:08'!\ntimedBenchmarkExecution: aSelector\n\t\"Will do a timed execution of the benchmark and return the result timer\"\n\t| timer |\n\ttimers := Dictionary new.\n\n\ttimer := self createTimer: 'total'.\n\t\n\ttimer start.\n\tsuite perform: aSelector.\n\ttimer stop.\n\t\n\tself recordResults: timer for: aSelector.\n\t\n\t^ timer! !\n\n!SMarkRunner methodsFor: 'reporting' stamp: 'sm 5/25/2011 17:50'!\nreportConfiguration: aStream\n\taStream << 'Runner Configuration:';cr.\n\taStream << ('  iterations: ', numIterations asString); cr.\n\taStream << ('  processes: ', numProcesses asString); cr.\n\taStream << ('  problem size: ', problemSize asString); cr.\n! !\n\n!SMarkRunner methodsFor: 'reporting' stamp: 'StefanMarr 4/15/2011 16:47'!\nreportOn: aStream\n\tSMarkReporter defaultReporter reportFor: self on: aStream  \n\t! !\n\n!SMarkRunner class methodsFor: 'defaults' stamp: 'StefanMarr 3/21/2011 11:43'!\ndefaultNumberOfIterations\n\t^ 1! !\n\n!SMarkRunner class methodsFor: 'defaults' stamp: 'StefanMarr 5/14/2011 11:09'!\ndefaultNumberOfProcesses\n\t^ 1! !\n\n!SMarkRunner class methodsFor: 'defaults' stamp: 'StefanMarr 3/20/2011 20:56'!\ndefaultTimer\n\t^ SMarkTimer! !\n\n!SMarkRunner class methodsFor: 'benchmarking' stamp: 'StefanMarr 3/20/2011 19:51'!\nexecute: aSuite\n\t^ self execute: aSuite with: 1.! !\n\n!SMarkRunner class methodsFor: 'benchmarking' stamp: 'StefanMarr 3/20/2011 19:51'!\nexecute: aSuite with: nIterations\n\t| runner |\n\trunner := self new.\n\taSuite runner: runner.\n\trunner suite: aSuite.\n\trunner iterations: nIterations.  \n\trunner execute.\n\t^ runner! !\n\n!SMarkRunner class methodsFor: 'benchmarking' stamp: 'StefanMarr 7/25/2011 00:42'!\nexecute: aSuite with: nIterations for: aProblemSize\n\t| runner |\n\trunner := self new.\n\taSuite runner: runner.\n\trunner suite: aSuite.\n\trunner iterations: nIterations.  \n\trunner problemSize: aProblemSize.\n\trunner execute.\n\t^ runner! !\n\n!SMarkRunnerTest methodsFor: 'as yet unclassified'!\nrunnerClass\n\t^ SMarkTestRunner! !\n\n!SMarkRunnerTest methodsFor: 'as yet unclassified'!\ntestBaseBenchmark\n\t\"Ensure the base benchmark is executed when available\"\n\t\n\t| runner |\n\trunner := self runnerClass execute: SMarkTestSuiteWithBaseBenchmark new.\n\n\tself assert: runner baseBenchmarkExecuted  ! !\n\n!SMarkRunnerTest methodsFor: 'as yet unclassified'!\ntestBaseBenchmarkNone\n\t\"Ensure that not having a base benchmark does not pose a problem\"\n\n\t| runner |\n\trunner := self runnerClass execute: SMarkTestSuite new.\n\n\tself deny: runner baseBenchmarkExecuted  ! !\n\n!SMarkRunnerTest methodsFor: 'as yet unclassified'!\ntestBenchmarkWithMultipleCriteraTimers\n\t\"Check whether the benchmark benchWithMultipleCriteria, really results in different unrelated timings\"\n\t| runner result |\n\trunner := self runnerClass execute: SMarkTestSuite new.\n\t\n\tresult := (runner results at: #WithMultipleCriteria) at: 1.\n\tself assert: (result isKindOf: SMarkResult).\n\t\n\tself assert: result benchmarkName equals: #WithMultipleCriteria.\n\tself assert: (result total >= 50).\n\t\n\tself assert: (result criteria notNil).\n\tself assert: (result criteria respondsTo: #at:).\n\t\n\tself assert: ((result criteria at: 't1') totalTime >= 10).\n\tself assert: ((result criteria at: 't2') totalTime >= 25).\n\tself assert: ((result criteria at: 't3') totalTime >= 50).\n\t! !\n\n!SMarkRunnerTest methodsFor: 'as yet unclassified'!\ntestClassExecute\n\t| runner |\n\trunner := self runnerClass execute: SMarkTestSuiteWithBaseBenchmark new.\n\t\n\tself assert: (runner isKindOf: self runnerClass).! !\n\n!SMarkRunnerTest methodsFor: 'as yet unclassified'!\ntestExecute\n\t\"Ensure all benchmarks are run, including the baseBenchmark and the results are returned\"\n\t| runner results performedBenchmarks |\n\trunner := self runnerClass new.\n\trunner suite: SMarkTestRunnerSuiteForPerfromBenchmark new.\n\tresults := runner execute.\n\t\n\tperformedBenchmarks := runner performedBenchmarks.\n\t\t\n\tself assert: 5 equals: performedBenchmarks size.\n\tself assert: (performedBenchmarks includes: #baseBenchmark).\n\t\n\tself assert: (results respondsTo: #at:).\n\tself assert: (((results at: #baseBenchmark) at: 1) isKindOf: SMarkResult).! !\n\n!SMarkRunnerTest methodsFor: 'as yet unclassified'!\ntestIterations\n\t| runner |\n\t\" simple scenario should default to 1 run for now \"\n\trunner := self runnerClass execute: SMarkTestRunnerSuite new.\n\t\n\tself assert: runner countWasExecuted equals: 1.\n\t\n\t\" but we can also be more fancy and set the number of iterations \"\n\trunner := self runnerClass new.\n\trunner suite: SMarkTestRunnerSuite new.\n\t\n\t\"first check again that the default is as expected\"\n\tself assert: runner iterations equals: 1.  \n\t\n\trunner iterations: 10.\n\tself assert: 10 equals: runner iterations.\n\t\n\trunner execute.\n\t\n\tself assert: 10 equals: runner countWasExecuted.! !\n\n!SMarkRunnerTest methodsFor: 'as yet unclassified'!\ntestPerformBenchmark\n\t\"Ensure that performBenchmark executes all the defined #bench methods, but for instance not #Bench\"\n\t\n\t| runner performedBenchmarks |\n\trunner := self runnerClass execute: SMarkTestRunnerSuiteForPerfromBenchmark new.\n\tperformedBenchmarks := runner performedBenchmarks.\n\n\tself assert: (performedBenchmarks includes: #benchAfsdfsdfsdf).\n\tself assert: (performedBenchmarks includes: #benchBsdfasereSDSfsdfsdfs).\n\tself assert: (performedBenchmarks includes: #benchC).\n\tself assert: (performedBenchmarks includes: #benchZZ).\n\n\tself deny: (performedBenchmarks includes: #BenchShouldNotBeExecuted).! !\n\n!SMarkRunnerTest methodsFor: 'as yet unclassified'!\ntestResultStructure\n\t| runner results resultA resultB suite |\n\tsuite := SMarkTestSuite new.\n\trunner := self runnerClass execute: suite.\n\tresults := runner results.\n\t\n\t\"Don't care whether it is a dictionary, but at least it should present us something that maps benchmark names to result objects\"\n\tself assert: (results respondsTo: #at:).\n\n\tresultA := (results at: #A) at: 1.\n\tresultB := (results at: #B) at: 1.\n\n\n\tself assert: (resultA isKindOf: SMarkResult).\n\tself assert: (resultB isKindOf: SMarkResult).\n\tself assert: (((results at: #C) at: 1) isKindOf: SMarkResult).\n\t\n\t\"Make sure some properties of the result objects is ensured\"\n\tself assert: resultA total > 0.\n\tself assert: #A equals: resultA benchmarkName.\n\tself assert: suite equals: resultA suite.\n\tself assert: 1 equals: resultA criteria size.\n\t\n\tself assert: resultB total > 0.\n\tself assert: #B equals: resultB benchmarkName.\n\tself assert: suite equals: resultB suite.\n\tself assert: 1 equals: resultB criteria size.\n\t\"Testing for multi-criteria results somewhere else\"! !\n\n!SMarkRunnerTest methodsFor: 'as yet unclassified'!\ntestTimer\n\t\"Simple test whether a timer is created and it is from the expected class.\n\t This test is very basic, other tests like testBenchmarkWithMultipleCirteria* need to cover the rest\"\n\t| runner timer |\n\trunner := self runnerClass new.\n\ttimer := runner createTimer: #foo.\n\n\tself assert: timer name equals: #foo.\n\tself assert: (timer isKindOf: self runnerClass defaultTimer).  ! !\n\n!SMarkSimpleStatisticsReporter methodsFor: 'statistics' stamp: 'StefanMarr 3/20/2011 12:05'!\nconfidenceVariance: times\n\t| numMeasurements |\n\tnumMeasurements := times size.\n\t(numMeasurements >= 30) \n\t\tifTrue: [\n\t\t\t^ (self gaussianConfidenceFactor) * (times stdev) / (numMeasurements asFloat sqrt)].\n\t\t\n\t\"use the students T distribution for small probe counts\"\n\t^ (self studentsTConfidenceFactorFor: numMeasurements) * (times stdev) / (numMeasurements asFloat sqrt)! !\n\n!SMarkSimpleStatisticsReporter methodsFor: 'statistics' stamp: 'StefanMarr 3/20/2011 11:49'!\ngaussianConfidenceFactor\n\t\"used for large probe counts >= 30\"\n\t\"1 ~ 68.27%\"\n\t\"1.644853626951 ~ 90%\"\n\t\"2 ~ 95.45%\"\n\t^ 1.644853626951! !\n\n!SMarkSimpleStatisticsReporter methodsFor: 'statistics' stamp: 'StefanMarr 3/20/2011 11:46'!\nsignificantDigits: confidenceVariance\n\tconfidenceVariance = 0 \n\t\tifTrue: [ ^ 2].\n\t\n\tconfidenceVariance >= 10\n\t\tifTrue: [ ^ 0].\n\t\n\t^ 1 - (confidenceVariance log floor)! !\n\n!SMarkSimpleStatisticsReporter methodsFor: 'statistics' stamp: 'StefanMarr 3/20/2011 12:03'!\nstudentsTConfidenceFactorFor: aNumberOfMeasurements\n\t\"used for small probe counts < 30\"\n\t\"the students T distribution sucks to calculate since the value depends on the probeCout\"\n\t\"these values are for a confidence interval of ~90%\"\n\t| values |\n\tvalues := Array new: 30.\n\tvalues at: 1  put: 6.314.\n\tvalues at: 2  put: 2.920.\n\tvalues at: 3  put: 2.353.\n\tvalues at: 4  put: 2.132.\n\tvalues at: 5  put: 2.015.\n\tvalues at: 6  put: 1.943.\n\tvalues at: 7  put: 1.895.\n\tvalues at: 8  put: 1.860.\n\tvalues at: 9  put: 1.833.\n\tvalues at: 10 put: 1.812.\n\tvalues at: 11 put: 1.796.\n\tvalues at: 12 put: 1.782.\n\tvalues at: 13 put: 1.771.\n\tvalues at: 14 put: 1.761.\n\tvalues at: 15 put: 1.753.\n\tvalues at: 16 put: 1.746.\n\tvalues at: 17 put: 1.740.\n\tvalues at: 18 put: 1.734.\n\tvalues at: 19 put: 1.729.\n\tvalues at: 20 put: 1.725.\n\tvalues at: 21 put: 1.721.\n\tvalues at: 22 put: 1.717.\n\tvalues at: 23 put: 1.714.\n\tvalues at: 24 put: 1.711.\n\tvalues at: 25 put: 1.708.\n\tvalues at: 26 put: 1.706.\n\tvalues at: 27 put: 1.703.\n\tvalues at: 28 put: 1.701.\n\tvalues at: 29 put: 1.699.\n\tvalues at: 30 put: 1.697.\n\t^ values at: aNumberOfMeasurements.\n\t! !\n\n!SMarkSimpleStatisticsReporter methodsFor: 'reporting' stamp: 'StefanMarr 5/16/2011 16:08'!\nreportAllRuns: aListOfResults of: benchmark\n\t| criteria |\n\n\tcriteria := aListOfResults first criteria.\n\t\n\tcriteria keysDo: [:criterion |\n\t\t| times |\n\t\ttimes := self resultsFor: criterion from: aListOfResults.\n\t\tself reportResult: times for: criterion of: benchmark.\n\t\tstream cr.\n\t].! !\n\n!SMarkSimpleStatisticsReporter methodsFor: 'reporting' stamp: 'StefanMarr 5/16/2011 15:54'!\nreportResult: anArrayOfResults for: aCriterion of: benchmark\n\t| convidenceVariance significantDigits quantum total stdev totalSignificantDigits outputLine |\n\n\toutputLine := benchmark, ' ', aCriterion, ': iterations=', \n\t              anArrayOfResults size asString, ' runtime: '.\n\t\n\tanArrayOfResults size < 2 ifTrue: [\n\t\ttotal := anArrayOfResults average printString.\n\t\toutputLine := outputLine, total, 'ms'.\n\t\tstream << outputLine.\n\t\t^ self.\n\t].\n\t\n\tconvidenceVariance := self confidenceVariance: anArrayOfResults.  \n\t\n\t\"only print significant \"\n\tsignificantDigits := self significantDigits: convidenceVariance.\n\tquantum := (1/10 asFloat) raisedTo: significantDigits.\n\t\n\t\"round to significantDigits\"\n\tstdev := convidenceVariance roundTo: quantum.\n\t\n\ttotal := (anArrayOfResults average roundTo: quantum) printString.\n\ttotalSignificantDigits := total size - (total indexOf: $.).\n\n\toutputLine := outputLine, total.\n\t\n\t\"check if the last digit is 0 => padding\"\n\t(totalSignificantDigits < significantDigits) ifTrue: [\n\t \t(significantDigits - totalSignificantDigits) \n\t\t\ttimesRepeat: [ outputLine := outputLine, '0']].\n\toutputLine := outputLine, 'ms'.\n\t\n\tstream << outputLine.\n\tstream << ' +/-' << stdev.! !\n\n!SMarkSimpleStatisticsReporter methodsFor: 'helper' stamp: 'StefanMarr 5/16/2011 16:02'!\nresultsFor: aCriterion from: aListOfResults\n\t^aListOfResults collect: [:result | (result criteria at: aCriterion) totalTime]\n\t! !\n\n!SMarkSimpleStatisticsReporter methodsFor: 'helper' stamp: 'StefanMarr 3/20/2011 19:40'!\ntotalResultsFor: aListOfResults\n\t^aListOfResults collect: [:timer | timer total]\n\t! !\n\n!SMarkSlopstone methodsFor: 'benchmarking' stamp: 'StefanMarr 7/25/2011 15:08'!\nOLDERbenchStone\n\t\"modified by nishis\"\n\t\"STEFAN: this version includes the original reporting, and is not used by SMark\n\t Only containted for historical purposes.\"\n\n\t| n nTests iters times speeds stones scale printA printB printC param count speed0 expln block time iter speed stone geoMean gm power |\n\tn := self problemSize.\t\"Number of times each test block will be evaluated.\"\n\tn > SmallInteger maxVal\n\t\tifTrue: [ self error: 'Count exceeded max small int.' ].\n\t\n\tnTests := testParams size.\n\tnTests = testBlocks size\n\t\tifFalse: [ self error: 'Inconsistent test count.' ].\n\titers := OrderedCollection new.\n\ttimes := OrderedCollection new.\n\tspeeds := OrderedCollection new.\n\tstones := OrderedCollection new.\n\tscale := 1000.\t\"So iterations can be reported as 1000s of iterations\"\t\"The following blocks are restricted to two args by ST/V-DOS.\"\n\tprintA := [ :t1 :t2 | \n\t\"[:iter1 :time1 |\"\n\toutput cr.\n\toutput nextPutAll: (t1 / scale) rounded printString.\n\toutput nextPutAll: '     '.\n\toutput nextPutAll: t2 printString.\n\toutput nextPutAll: '     ' ]  copy fixTemps.\n\tprintB := [ :t1 :t2 | \n\t\"[:speed1 :slop1 |\"\n\toutput nextPutAll: (t1 / scale) rounded printString.\n\toutput nextPutAll: '     '.\n\toutput nextPutAll: t2 printString.\n\toutput nextPutAll: '     ' ]  copy fixTemps.\n\tprintC := [ :t1 | \n\t\":expln1 |\"\n\toutput nextPutAll: t1 ]  copy fixTemps.\n\toutput\n\t\tnextPutAll:\n\t\t\t'\n\n1000s    time    1000s of\nitera-   sec-    iterations   slop-\ntions    onds    per sec      stones   explanation\n'.\n\t1 to: nTests do: [ :i | \n\t\tparam := testParams at: i.\n\t\tcount := param at: 1.\t\"repetitions of a test inside its block\"\n\t\tspeed0 := (param at: 2) * scale.\t\"iters/sec for a one-slopstone machine\"\n\t\texpln := param at: 3.\n\t\tblock := (testBlocks at: i)  copy fixTemps.\n\t\ttime := Time millisecondsToRun: [ n timesRepeat: block ].\n\t\ttime := (time max: 1) / 1000.0.\t\"time is now in seconds\"\n\t\titer := count * n.\n\t\tspeed := iter / time.\n\t\tstone := speed / speed0.\n\t\titers add: iter.\n\t\ttimes add: time.\n\t\tspeeds add: speed.\n\t\tstones add: stone.\n\t\tprintA value: iter value: time.\n\t\tprintB value: speed value: stone.\n\t\tprintC value: expln ].\n\t\n\t\n\tgeoMean := [ :t1 | \n\t\"[:numbers |\"\n\tgm := 1.\n\tpower := 1 / nTests.\t\"t2 as number\"\n\tt1 do: [ :t2 | gm := gm * (t2 raisedTo: power) ].\n\tgm ] copy fixTemps.\n\toutput cr.\n\tprintA value: (geoMean value: iters) value: (geoMean value: times).\n\tprintB value: (geoMean value: speeds) value: (geoMean value: stones).\n\tprintC value: 'geometric mean'.\n\toutput\n\t\tcr;\n\t\tcr;\n\t\tnextPutAll: 'Benchmarks complete.';\n\t\tcr! !\n\n!SMarkSlopstone methodsFor: 'benchmarking' stamp: 'StefanMarr 7/25/2011 15:11'!\nbenchStone\n\t\"modified by nishis\"\n\n\t| n nTests iters times speeds stones scale param count speed0  block time iter speed stone |\n\tn := self problemSize.\t\"Number of times each test block will be evaluated.\"\n\tn > SmallInteger maxVal\n\t\tifTrue: [ self error: 'Count exceeded max small int.' ].\n\t\n\tnTests := testParams size.\n\tnTests = testBlocks size\n\t\tifFalse: [ self error: 'Inconsistent test count.' ].\n\titers := OrderedCollection new.\n\ttimes := OrderedCollection new.\n\tspeeds := OrderedCollection new.\n\tstones := OrderedCollection new.\n\tscale := 1000.\t\"So iterations can be reported as 1000s of iterations\"\t\"The following blocks are restricted to two args by ST/V-DOS.\"\n\t\n\t1 to: nTests do: [ :i | \n\t\tparam := testParams at: i.\n\t\tcount := param at: 1.\t\"repetitions of a test inside its block\"\n\t\tspeed0 := (param at: 2) * scale.\t\"iters/sec for a one-slopstone machine\"\n\t\tblock := (testBlocks at: i)  copy fixTemps.\n\t\ttime := Time millisecondsToRun: [ n timesRepeat: block ].\n\t\ttime := (time max: 1) / 1000.0.\t\"time is now in seconds\"\n\t\titer := count * n.\n\t\tspeed := iter / time.\n\t\tstone := speed / speed0.\n\t\titers add: iter.\n\t\ttimes add: time.\n\t\tspeeds add: speed.\n\t\tstones add: stone.\n\t].! !\n\n!SMarkSlopstone methodsFor: 'benchmarking' stamp: 'StefanMarr 7/25/2011 00:54'!\nproblemSize\n\t| ps |\n\tps := super problemSize.\n\t\n\tps := ps asInteger.\n\tps ifNil: [ ^ self defaultProblemSize].\n\t^ ps! !\n\n!SMarkSlopstone methodsFor: 'benchmarking' stamp: 'nishis 2/14/98 02:33'!\nreadme\n\n\t\"INTRODUCTION \n\t \n\tSlopstone: Smalltalk Low level OPeration Stones \n\tPortable Low Level Benchmarks for ST80 and ST/V (using 16-bit \n\tSmallIntegers) Placed in public domain January 1993  (c) Bruce \n\tSamuelson Permission is given to place this in public Smalltalk archives \n\t \n\tUse monospaced fonts if possible to view the methods in this class. \n\t \n\t(1) Collect garbage if supported (2) do 'SlopstoneBenchmark new \n\trunBenchmark'. Results are printed in the Transcript window. \n\tPost results for your machines to comp.lang.smalltalk or \n\tmail them to bruce@ling.uta.edu or bruce@utafll.uta.edu. \n\t \n\tDISCUSSION \n\t    \n\tThis readme method would normally be in the class comment for ST80. \n\tST/V-DOS doesn't support class comments. \n\t  \n\tThe benchmarks test strictly low level operations. They do not test \n\thigher level operations such as forming sets, sorting, or streaming, nor \n\tdo they test \n\tapplications. They also do not test user interface operations because of \n\tthe non-portability of this area of Smalltalk and its sensitivity to the \n\tperformance of the video subsystem. The tests are cpu bound. They do \n\tnot access files and should not cause disk paging. \n\t \n\tThe benchmarks use loop counts of 16000 because SmallIntegers cannot \n\texceed 16383 for ST/V-DOS. 16-bit implementions would perform worse \n\twith large loop \n\tcounts. The benchmarks are also suitable for testing 32-bit versions of \n\tSmalltalk. \n\t \n\tDEFINITION OF REFERENCE MACHINE (ONE SLOPSTONE) \n\t \n\tThe following machine is the one on which I developed these \n\tbenchmarks. By \n\tconvention it is defined to operate at one slopstone. It's a mid range \n\tperformer for current ParcPlace versions of Smalltalk. \n\t \n\tHardware: Amax 486DX/33 (includes internal floating point processor \n\tand internal 8K cache), 256K external cache, 16MB RAM. \n\t \n\tSoftware: ParcPlace VisualWorks 1.0, Windows 3.1, DOS 5.0 (plain vanilla \n\tsetup). \n\t \n\tCOMPARISON TO XEROX DORADO \n\t \n\tFor reference, the machine runs at 649% of a Dorado on ParcPlace \n\tbenchmarks for ST80 4.1. Its fast video card helps on these PPS \n\tbenchmarks. I didn't run \n\tthem for VisualWorks 1.0. It would be somewhat slower because there \n\tare vastly \n\tmore classes. \n\t \n\tEXAMPLE RESULTS FOR REFERENCE MACHINE \n\t \n\t1000s    time    1000s of \n\titera-   sec-    iterations   slop- \n\ttions    onds    per sec      stones   explanation \n\t \n\t3808     0.577   6600         1.0      add integers \n\t 544     2.262    240         1.0      add floats \n\t 960     1.088    882         1.0      access strings \n\t 320     0.908    352         1.0      create objects \n\t 160     1.49     107         1.0      copy objects \n\t 480     1.129    425         1.0      perform selectors \n\t 896     1.237    724         1.0      evaluate blocks \n\t \n\t 640     1.151    555         1.0      geometric mean\"\n\t^ self! !\n\n!SMarkSlopstone methodsFor: 'benchmarking' stamp: 'StefanMarr 7/25/2011 01:33'!\nsetUp\n \n\t\"Numbers in testParams represent the following:\n \n\tColumn 1   number of internal repetitions for each test inside its block\n\tColumn 2   thousands of iterations per second for a one-slopstone machine.\"\n \n\toutput := TextStream with: String new.\n\n\ttestParams := OrderedCollection new.\n \n\ttestParams\n\t\tadd: #(238 6600 'add integers');\n\t\tadd: #( 34  240 'add floats');\n\t\tadd: #( 60  882 'access strings');\n\t\tadd: #( 20  352 'create objects');\n\t\tadd: #( 10  107 'copy objects');\n\t\tadd: #( 30  425 'perform selectors');\n\t\tadd: #( 56  724 'evaluate blocks').\n \n\ttestBlocks := OrderedCollection new.\n \n\t\"In the integer addition test, I originally had 340 internal repetitions.\n\tThis caused the Digitalk compiler to blow up. The ParcPlace compiler compiled\n\tit ok but interestingly addition performed at slightly more than 50% of the\n\tperformance with an internal count of 238. Perhaps something magical happens\n\tat 256.\"\n\n\ttestBlocks\n\t\tadd: [1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+\n\t\t\t1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+\n\t\t\t1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+\n\t\t\t1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+\n\t\t\t1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+\n\t\t\t1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+\n\t\t\t1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1];\n \n\t\tadd: [1.0+1.0+1.0+1.0+1.0+1.0+1.0+1.0+1.0+1.0+1.0+1.0+1.0+1.0+1.0+1.0+1.0+\n\t\t\t1.0+1.0+1.0+1.0+1.0+1.0+1.0+1.0+1.0+1.0+1.0+1.0+1.0+1.0+1.0+1.0+1.0];\n \n\t\tadd: ['a' at: 1. 'a' at: 1. 'a' at: 1. 'a' at: 1. 'a' at: 1. 'a' at: 1.\n\t\t\t'a' at: 1. 'a' at: 1. 'a' at: 1. 'a' at: 1. 'a' at: 1. 'a' at: 1.\n\t\t\t'a' at: 1. 'a' at: 1. 'a' at: 1. 'a' at: 1. 'a' at: 1. 'a' at: 1.\n\t\t\t'a' at: 1. 'a' at: 1. 'a' at: 1. 'a' at: 1. 'a' at: 1. 'a' at: 1.\n\t\t\t'a' at: 1. 'a' at: 1. 'a' at: 1. 'a' at: 1. 'a' at: 1. 'a' at: 1.\n\t\t\t'a' at: 1. 'a' at: 1. 'a' at: 1. 'a' at: 1. 'a' at: 1. 'a' at: 1.\n\t\t\t'a' at: 1. 'a' at: 1. 'a' at: 1. 'a' at: 1. 'a' at: 1. 'a' at: 1.\n\t\t\t'a' at: 1. 'a' at: 1. 'a' at: 1. 'a' at: 1. 'a' at: 1. 'a' at: 1.\n\t\t\t'a' at: 1. 'a' at: 1. 'a' at: 1. 'a' at: 1. 'a' at: 1. 'a' at: 1.\n\t\t\t'a' at: 1. 'a' at: 1. 'a' at: 1. 'a' at: 1. 'a' at: 1. 'a' at: 1];\n \n\t\tadd: [Object new. Object new. Object new. Object new. Object new.\n\t\t\tObject new. Object new. Object new. Object new. Object new.\n\t\t\tObject new. Object new. Object new. Object new. Object new.\n\t\t\tObject new. Object new. Object new. Object new. Object new];\n \n\t\tadd: [Object new copy copy copy copy copy copy copy copy copy copy];\n \n\t\tadd: [0 perform: #yourself. 0 perform: #yourself. 0 perform: #yourself.\n\t\t\t0 perform: #yourself. 0 perform: #yourself. 0 perform: #yourself.\n\t\t\t0 perform: #yourself. 0 perform: #yourself. 0 perform: #yourself.\n\t\t\t0 perform: #yourself. 0 perform: #yourself. 0 perform: #yourself.\n\t\t\t0 perform: #yourself. 0 perform: #yourself. 0 perform: #yourself.\n\t\t\t0 perform: #yourself. 0 perform: #yourself. 0 perform: #yourself.\n\t\t\t0 perform: #yourself. 0 perform: #yourself. 0 perform: #yourself.\n\t\t\t0 perform: #yourself. 0 perform: #yourself. 0 perform: #yourself.\n\t\t\t0 perform: #yourself. 0 perform: #yourself. 0 perform: #yourself.\n\t\t\t0 perform: #yourself. 0 perform: #yourself. 0 perform: #yourself];\n \n\t\tadd: [[] value. [] value. [] value. [] value. [] value. [] value. [] value.\n\t\t\t[] value. [] value. [] value. [] value. [] value. [] value. [] value.\n\t\t\t[] value. [] value. [] value. [] value. [] value. [] value. [] value.\n\t\t\t[] value. [] value. [] value. [] value. [] value. [] value. [] value.\n\t\t\t[] value. [] value. [] value. [] value. [] value. [] value. [] value.\n\t\t\t[] value. [] value. [] value. [] value. [] value. [] value. [] value.\n\t\t\t[] value. [] value. [] value. [] value. [] value. [] value. [] value.\n\t\t\t[] value. [] value. [] value. [] value. [] value. [] value. [] value]! !\n\n!SMarkSlopstone methodsFor: 'defaults'!\ndefaultProblemSize\n\t^ 1! !\n\n!SMarkSlopstone commentStamp: 'nishis 2/21/98 06:26' prior: 0!\nmodified for Squeak by nishis@urban.ne.jp\nI added one class methods.\nand modified execute method.  block variables are renamed for Squeak.\nThanx to Mr. Tim Olson, Mr. Kohler Markus, Mr. Tim Rowledge, Mr. John Maloney, Mr. Ian Piumarta.\n\noriginal comments\n\tNAME\t\t\tSTones80\n\tAUTHOR\t\t\tbruce@utafll.uta.edu (Bruce Samuelson)\n\tFUNCTION\t\tlow and medium level benchmarks for ST80 and ST/V\n\tST-VERSIONS\t\tpre R4.0, R4.0, R4.1, ST/V\n\tPREREQUISITES\tneed floating point hardware or emulation\n\tCONFLICTS\t\tnone\n\tDISTRIBUTION\tworld\n\tVERSION\t\t\t1.0\n\tDATE\t\t\tApril 16, 1993\n\nSUMMARY The filein includes two classes: Slopstones (Smalltalk Low level\nOPeration Stones) and Smopstones (Smalltalk Medium level OPeration Stones).\nEach includes seven cpu intensive benchmarks. They work equally well with\n16-bit and 32-bit implementations and are designed to be portable to all\nSmalltalk versions from ParcPlace and Digitalk. They are normalized to the\nauthor's 486/33 Windows 3.1 machine running ParcPlace VisualWorks 1.0.\nResults have been posted to the Usenet group comp.lang.smalltalk and form the\nbasis of an article that is scheduled to be published in the June issue of The\nSmalltalk Report.\n\nThe only difference between the ST80 (STones80) and ST/V (STonesV) filein is\nin the messages that define the classes in the first few lines of code. The\nST80 messages specify the class category and message protocol, which are not\nused in ST/V.\n\nBruce Samuelson\n\n!\n!SMarkSmopstone methodsFor: 'benchmarking' stamp: 'StefanMarr 7/25/2011 15:08'!\nOLDERbenchStone\n\t\"modified by nishis\"\n\t\"STEFAN: this version includes the original reporting, and is not used by SMark\n\t Only containted for historical purposes.\"\n\t\n\t| n nTests times stones printA printC param time0 expln block time stone geoMean gm power |\n\t\n\tn := self problemSize.\t \"Each test is repeated this many times. The smopstone times in\n\t\t\tthe test parameters are normalized to a value of one. You may\n\t\t\tset it to a higher number if your machine is really blazing.\"\n\toutput\n\t\tcr;\n\t\tcr;\n\t\tnextPutAll: 'Starting benchmarks with repetition count = ' , n printString , '.'.\n\tnTests := testParams size.\n\tnTests = testBlocks size\n\t\tifFalse: [ self error: 'Inconsistent test count.' ].\n\ttimes := OrderedCollection new.\n\tstones := OrderedCollection new.\t\"The following blocks are restricted to two args by ST/V-DOS.\"\n\tprintA := [ :time1 :smop1 | \n\toutput cr.\n\toutput nextPutAll: time1 printString.\n\toutput nextPutAll: '     '.\n\toutput nextPutAll: smop1 printString.\n\toutput nextPutAll: '     ' ] copy fixTemps..\n\tprintC := [ :expln1 | output nextPutAll: expln1 ] copy fixTemps..\n\toutput\n\t\tnextPutAll:\n\t\t\t'\n\ntime in    smop-\nseconds    stones    explanation\n'.\n\t1 to: nTests do:  [ :i | \n\t\tparam := testParams at: i.\n\t\ttime0 := param at: 1.\t\"seconds for one-smopstone machine\"\n\t\texpln := param at: 2.\n\t\tblock := (testBlocks at: i)  copy fixTemps.\n\t\ttime := Time millisecondsToRun: [ n timesRepeat: block ].\n\t\ttime := (time max: 1) / 1000.0.\t\"time is now in seconds\"\n\t\tstone := n * time0 / time.\n\t\ttimes add: time.\n\t\tstones add: stone.\n\t\tprintA value: time value: stone.\n\t\tprintC value: expln ].\n\t\n\t\n\tgeoMean := [ :numbers | \n\tgm := 1.\n\tpower := 1 / nTests.\n\tnumbers do: [ :number | gm := gm * (number raisedTo: power) ].\n\tgm ]  copy fixTemps.\n\toutput cr.\n\tprintA value: (geoMean value: times) value: (geoMean value: stones).\n\tprintC value: 'geometric mean'.\n\tIsSupportRecursiveBlock\n\t\tifFalse: [ output nextPutAll: '*' ].\n\toutput\n\t\tcr;\n\t\tcr;\n\t\tnextPutAll: 'Benchmarks complete.';\n\t\tcr.\n\tIsSupportRecursiveBlock\n\t\tifFalse: [ \n\t\t\toutput\n\t\t\t\tcr;\n\t\t\t\tnextPutAll:\n\t\t\t\t\t\t'*** Caution ***\n2 test of this benchmark (marked at ''*'') is intended to test the efficiency \nof recursively calling a block, that it isn''t supported by this VM.\nSo the result would be fairly pointless.';\n\t\t\t\tcr ]! !\n\n!SMarkSmopstone methodsFor: 'benchmarking' stamp: 'StefanMarr 7/26/2011 11:45'!\nbenchStone\n\t\"modified by nishis\"\n\t| n primes strings set |\n\t\n\tn := self problemSize.\t \"Each test is repeated this many times. The smopstone times in\n\t\t\tthe test parameters are normalized to a value of one. You may\n\t\t\tset it to a higher number if your machine is really blazing.\"\n\t\n\t\n\t1 to: n do:  [ :i | \n\t\tself fractonacci: 13/2.\n\t\tprimes := self primesUpTo: 4000.\n\t\tself streamTestsOn: primes.\n\t\tstrings := self stringsUpTo: 3000.\n\t\tset := self setFrom: strings.\n\t\tself sort: set.\n\t\tself sorcerersApprentice.\n\t].! !\n\n!SMarkSmopstone methodsFor: 'benchmarking' stamp: 'nishis 2/14/98 02:47'!\nfractonacci: n \n\t\"Return something like the fibonacci function of n but\n\tusing fractional numbers rather than whole ones. The\n\treason for this variation is to run long enough to get\n\ta decent time measurement without exceeding 16383, the\n\tlimit of small integers for ST/V-DOS. Choosing n = 13/2\n\ttakes enough time and computes to 13581.\n\n\tFibonacci uses n-1 and n-2 instead of n-(1/2) and n-(1/3).\n\tHowever, I couldn't get it to run in the above constraints.\n\n\tThis benchmark tests the efficiency of recursively calling\n\ta method that does a little fractional arithmetic internally.\"\n\n\t^n > 1\n\t\tifTrue: [(self fractonacci: n - (1/2)) + (self fractonacci: n - (1/3))]\n\t\tifFalse: [1]! !\n\n!SMarkSmopstone methodsFor: 'benchmarking' stamp: 'StefanMarr 7/25/2011 01:27'!\nprimesUpTo: n\n\t\"modified by nishis\"\n\n\t\"Return the prime numbers between 2 and n.\n\n\tThis method tests the efficiency of recursively calling a block\n\tthat does some collection enumeration based on integer arithmetic.\"\n\n\t| nSqrt lowPrimes highPrimes genNext first nextPrime2 |\n\tn < 5 | (n > 16363) ifTrue: [self error: 'Prime limit(s) out of range.'].\n\tnSqrt := n sqrt rounded.\n\tlowPrimes := OrderedCollection with: 2.\n\thighPrimes := 5 to: n by: 2.\n\tIsSupportRecursiveBlock\n\t\tifTrue:\n\t\t\t[genNext :=\n\t\t\t\t[:nextPrime |\n\t\t\t\tlowPrimes add: nextPrime.\n\t\t\t\thighPrimes := highPrimes select: [:k | k \\\\ nextPrime ~= 0] copy fixTemps.\n\t\t\t\t(first := highPrimes first) <= nSqrt ifTrue: [genNext value: first]].\n\t\t\tgenNext value: 3.]\n\t\tifFalse: \n\t\t\t[first := highPrimes first.\n\t\t\tnextPrime2 := 3.\n\t\t\t[first <= nSqrt] \n\t\t\t\twhileTrue: \n\t\t\t\t\t[lowPrimes add: nextPrime2.\n\t\t\t\t\thighPrimes := highPrimes select: [:k | k \\\\ nextPrime2 ~= 0].\n\t\t\t\t\t(first := highPrimes first) <= nSqrt ifTrue: [nextPrime2 := first]]].\n\t^lowPrimes , highPrimes! !\n\n!SMarkSmopstone methodsFor: 'benchmarking' stamp: 'StefanMarr 7/25/2011 00:54'!\nproblemSize\n\t| ps |\n\tps := super problemSize.\n\t\n\tps := ps asInteger.\n\tps ifNil: [ ^ self defaultProblemSize].\n\t\t\n\t^ ps! !\n\n!SMarkSmopstone methodsFor: 'benchmarking' stamp: 'nishis 2/14/98 02:46'!\nreadme\n\n\t\"INTRODUCTION \n\t \n\tSmopstone: Smalltalk Medium level OPeration Stones \n\tPortable Medium level Benchmarks for ST80 and ST/V (using 16-bit \n\tSmallInts) Placed in public domain January 1993  (c) Bruce Samuelson \n\tPermission is given to place this in public Smalltalk archives \n\t \n\tUse monospaced fonts if possible to view the methods in this class. \n\t \n\t(1) Collect garbage if supported (2) do 'SmopstoneBenchmark new \n\trunBenchmark'. Results are printed in the Transcript window. \n\tPost results for your machines to comp.lang.smalltalk or \n\tmail them to bruce@ling.uta.edu or bruce@utafll.uta.edu. \n\t \n\tDISCUSSION \n\t    \n\tThis readme method would normally be in the class comment for ST80. \n\tST/V-DOS doesn't support class comments. \n\t \n\tThese benchmarks are a companion to the SlopstoneBenchmark class \n\tposted to \n\tcomp.lang.smalltalk this month. Slopstones tested low level operations. \n\t  \n\tSmopstones test medium level operations that exercise recursive block \n\tand  \n\tmethod calls, collection building and enumeration, streaming, and \n\tsorting. The \n\tlower level operations contained in them exercise arithmetic (mostly \n\tinteger, with some fractions and floats) string manipulation, and low \n\tlevel streaming. \n\t \n\tThe benchmarks do not test applications. They also do not test user \n\tinterface performance because of the non-portability of this area of \n\tSmalltalk and its  \n\tsensitivity to the speed of the video subsystem. The tests are cpu bound. \n\tThey do not access files and should not cause disk paging. \n\t \n\tThe main weaknesses of the benchmarks are (1) they are not high \n\tenough level \n\tto test actual applications, and (2) they concentrate in too few areas of \n\tSmalltalk, omitting many of the diverse capabilities of its class library. \n\tMy excuse is that one can only devote limited time writing public \n\tdomain benchmarks. \n\t \n\tThe tests avoid generating integers larger than 16383, the maximum \n\tSmallInteger in ST/V-DOS. 16-bit implementions would perform worse \n\twith larger \n\tintegers. The benchmarks are also suitable for testing 32-bit versions of \n\tSmalltalk. They try to avoid other pitfalls that would skew the results \n\tsuch as the lack of an adequate hash function for a class. Someone \n\twarned of this \n\tin comp.lang.smalltalk (I forget who). \n\t \n\tDEFINITION OF REFERENCE MACHINE (ONE SMOPSTONE) \n\t \n\tThe following machine is the one on which I developed these \n\tbenchmarks. By \n\tconvention it is defined to operate at one smopstone. It's a mid range \n\tperformer for current ParcPlace versions of Smalltalk. \n\t \n\tHardware: Amax 486DX/33 (includes internal floating point processor \n\tand internal 8K cache), 256K external cache, 16MB RAM. \n\t \n\tSoftware: ParcPlace VisualWorks 1.0, Windows 3.1, DOS 5.0 (plain vanilla \n\tsetup). \n\t \n\tCOMPARISON TO XEROX DORADO \n\t \n\tFor reference, the machine runs at 649% of a Dorado on ParcPlace \n\tbenchmarks for ST80 4.1. Its fast video card helps on these PPS \n\tbenchmarks. I didn't run \n\tthem for VisualWorks 1.0. It would be somewhat slower because there \n\tare vastly \n\tmore classes. \n\t \n\tEXAMPLE RESULTS FOR REFERENCE MACHINE \n\t \n\ttime in    smop- \n\tseconds    stones    explanation \n\t \n\t \n\t3.157      1.0       generating fractonaccis \n\t1.123      1.0       generating primes \n\t1.091      1.0       generating and parsing streams \n\t3.091      1.0       generating strings \n\t1.167      1.0       forming sets \n\t5.139      1.0       sorting strings \n\t5.601      1.0       sorcerer's apprentice \n\t \n\t2.355      1.0       geometric mean\"\n\t^ self! !\n\n!SMarkSmopstone methodsFor: 'benchmarking' stamp: 'nishis 2/14/98 02:46'!\nsetFrom: collection\n\t\"Form a set from collection and return it.\n\n\tThis method tests the efficiency of building a fairly large set\n\tfrom strings. It indirectly tests the effectiveness of the string\n\thash function. Strings are used often enough as dictionary keys\n\tthat this may be worth including in the benchmark suite.  ST/V-DOS\n\thas a primitive hash for strings, and ST80 has an elaborate one\n\twritten in Smalltalk.\"\n\n\t^collection asSet! !\n\n!SMarkSmopstone methodsFor: 'benchmarking' stamp: 'StefanMarr 7/25/2011 01:41'!\nsetUp\n\t\"modified by nishis\"\n\n\t\"Numbers in testParams represent the approximate number of seconds it\n\ttakes to run the tests for a one-smopstone machine.\n\n\tNumbers in testBlocks are parameters tuned for each test. Do not\n\tchange them. The times for several tests depend on them non-linearly.\"\n\n\t| primes strings set  |\n\t\n\toutput := TextStream with: String new.\n\n\ttestParams := OrderedCollection new.\n \n\tIsSupportRecursiveBlock \n\t\tifTrue: \n\t\t\t[testParams\n\t\t\t\tadd: #(3.157 'generating fractonaccis');\n\t\t\t\tadd: #(1.123 'generating primes');\n\t\t\t\tadd: #(1.091 'generating and parsing streams');\n\t\t\t\tadd: #(3.091 'generating strings');\n\t\t\t\tadd: #(1.167 'forming sets');\n\t\t\t\tadd: #(5.139 'sorting strings');\n\t\t\t\tadd: #(5.601 'sorcerer''s apprentice')] \n\t\tifFalse: \n\t\t\t[testParams\n\t\t\t\tadd: #(3.157 'generating fractonaccis');\n\t\t\t\tadd: #(1.123 'generating primes*');\n\t\t\t\tadd: #(1.091 'generating and parsing streams');\n\t\t\t\tadd: #(3.091 'generating strings');\n\t\t\t\tadd: #(1.167 'forming sets');\n\t\t\t\tadd: #(5.139 'sorting strings');\n\t\t\t\tadd: #(5.601 'sorcerer''s apprentice*')].\n\n\ttestBlocks := OrderedCollection new.\n\n\tprimes := self primesUpTo: 9000.\n\tstrings := self stringsUpTo: 8000.\n\tset := self setFrom: strings.\n\n\ttestBlocks\n\t\tadd: [self fractonacci: 13/2];\n\t\tadd: [self primesUpTo: 9000];\t\"7351 - 1\"\n\t\tadd: [self streamTestsOn: primes];\n\t\tadd: [self stringsUpTo: 8000];\n\t\tadd: [self setFrom: strings];\n\t\tadd: [self sort: set];\n\t\tadd: [self sorcerersApprentice]! !\n\n!SMarkSmopstone methodsFor: 'benchmarking' stamp: 'StefanMarr 7/25/2011 01:42'!\nsorcerersApprentice\n\t\"modified by nishis\"\n\n\t\" FORMATTED FOR MONOSPACED FONT\n\n\tPerform various operations on rectangles.\n\n\tThis method tests the efficiency of recursively calling a block that\n\tincludes lots of integer arithmetic, collection building, and collection\n\tenumeration. The method:\n\n\t(1) Creates a collection of pseudo random rectangles \n\t(2) Forms a new collection of all their intersections \n\t(3) Recursively continues until there are no more intersections \n\t(4) Returns a collection with the counts of rectangles in each generation.\n\n\tBecause the intersections are forming progressively smaller rectangles\n\t(we exclude intersections of a rectangle with itself), the algorithm will\n\teventually converge. Depending on the choice of numeric parameters, it may\n\tconverge very quickly or very slowly. The parameters used below make it\n\tconverge in a reasonable amount of time (a few seconds on a one-smopstone\n\tmachine). It took some experimentation with different combinations to\n\tachieve this.\n\n\tThe pseudo random number generator isn't very good, but it's adequate\n\tfor this benchmark. I had intended the number '87' it uses to be a prime,\n\tbut 87 = 29 * 3. The numbers may have been a bit more random otherwise.\n\n\tOne could write an algorithm that would converge much more quickly and in\n\ta more predictable amount of time by sorting the intermediate rectangles\n\tin two dimensions and not bothering to test for intersections those\n\trectangles that are contained in mutually exclusive regions. We have\n\tchosen algorithmic simplicity over performance optimization. We simply\n\tperform intersections of each rectangle with every possible partner in\n\teach generation. The time consumed is quadratic in the number of rectangles.\n\n\tThe algorithm originally stored rectangles in sets to eliminate duplicates.\n\tUnfortunately, ST/V-DOS uses the hash function inherited from Object for\n\tRectangle, which will allow duplicates to be stored. So we were forced to\n\tstore rectangles in ordered collections and eliminate duplicates by brute\n\tforce. The brutality was heightened because we could not use the test\n\tcollection>>includes: to decide whether to add a rectangle to the ordered\n\tcollections, since ST/V-DOS does not define equality (=) for rectangles\n\teither. The remaining warts in the code are not worth explaining.\n\n\tIn an actual application, these shortcomings of ST/V-DOS would have been\n\tovercome by adding subclasses and methods rather than writing kludgy code.\"\n\n\t| m n firstGen intersection isIncluded counts r random\n\ta b c d e f g h generate nextGen |\n\t\n\tm := 80.\n\tn := 20 * m.\n\tfirstGen := OrderedCollection new.\n\tcounts := OrderedCollection new.\n\tr := 50.\n\trandom := [r := r + 1 * 87 \\\\ n]  copy fixTemps.\n\t1 to: m do: [:i|\n\t\ta := random value.\n\t\tb := random value.\n\t\tc := random value.\n\t\td := random value.\n\t\te := a min: b.\n\t\tf := c min: d.\n\t\tg := a max: b.\n\t\th := c max: d.\n\t\tfirstGen add: (Rectangle origin: e @ f corner: g @ h)].\n\tgenerate := \n\t\t[:lastGen |\n\t\tcounts add: lastGen size.\n\t\tnextGen := OrderedCollection new.\n\t\tlastGen do:\n\t\t\t[:r1 |\n\t\t\tlastGen do: \n\t\t\t\t[:r2 | \n\t\t\t\t(r1 origin ~= r2 origin or: [r1 corner ~= r2 corner])\n\t\t\t\t\"In ST80 this test would have simply been r1 ~= r2\"\n\t\t\t\t\tifTrue:\n\t\t\t\t\t\t[(r1 intersects: r2)\n\t\t\t\t\t\t\tifTrue:\n\t\t\t\t\t\t\t\t[intersection := r1 intersect: r2.\n\t\t\t\t\t\t\t\tisIncluded := false.                     \"All these lines\"\n\t\t\t\t\t\t\t\tnextGen do:                              \"would have been\"\n\t\t\t\t\t\t\t\t\t[:rec |                                \"avoided if we\"\n\t\t\t\t\t\t\t\t\t\t(rec origin = intersection origin and: \"could have used\"\n\t\t\t\t\t\t\t\t\t\t[rec corner = intersection corner])    \"a set for\"\n\t\t\t\t\t\t\t\t\t\t\tifTrue: [isIncluded := true]].       \"nextGen. See\"\n\t\t\t\t\t\t\t\tisIncluded                               \"explanation\"\n\t\t\t\t\t\t\t\t\tifFalse:                               \"above.\"\n\t\t\t\t\t\t\t\t\t\t[nextGen size > 500\n\t\t\t\t\t\t\t\t\t\t\tifTrue: [self error: 'Converges too slowly.']\n\t\t\t\t\t\t\t\t\t\t\tifFalse: [nextGen add: intersection]]]]]].\n\t\t\tnextGen size > 0 ifTrue: [generate value: nextGen]]  copy fixTemps.\n\tIsSupportRecursiveBlock\n\t\tifTrue: [generate value: firstGen]\n\t\tifFalse: [^ self generate: firstGen counts: counts].\n\t^counts! !\n\n!SMarkSmopstone methodsFor: 'benchmarking' stamp: 'nishis 2/14/98 02:39'!\nsort: collection\n\t\"Form a sorted collection from collection and return it.\n\n\tThis method tests the efficiency of sorting a fairly large\n\tcollection of strings. It indirectly measures the efficiency\n\tof the sorting algorithm and of string comparison operations.\"\n\n\t^collection asSortedCollection! !\n\n!SMarkSmopstone methodsFor: 'benchmarking' stamp: 'StefanMarr 7/25/2011 01:29'!\nstreamTestsOn: integers \n\t\"modified by nishis\"\n\t\"Test steaming operations on the collection of integers. \n\t \n\tThis method measures the efficiency of integer-to-float conversion, of \n\tprinting numbers to a write stream, of parsing tokens in a read \n\tstream,   and of converting the tokens from strings to numbers. The \n\ttechnique for \n\tconverting tokens into floats is constrained by portability between \n\tST80 and ST/V. \n\t \n\tTo validate the logic, the original integers are compared with the \n\tfinal   floats. There should be no roundoff errors.\"\n\t\"The following line accounts for the different implementations of \n\tFloat>>printString for some versions of Smalltalk. USA versions use \n\tthe decimal character, while some European versions use the comma \n\tchar.   Thanks to Marten Feldtmann for pointing this out.\"\n\n\t| delim space s floats float string |\n\tWhichFloatPrintOn \n\t\tifTrue: [delim := 1.0 printString at: 2]\t\"$. for USA, $, for some Europe.\"\n\t\tifFalse: [delim := $e].\t\t\t\t\t\"modified by nishis\"\n\n\tspace := Character value: 32.\n\t\"Can't use Character space in ST/V-DOS\"\n\ts := ReadWriteStream on: String new.\n\tintegers do: \n\t\t[:i | \n\t\tWhichFloatPrintOn \n\t\t\tifTrue: [i asFloat printOn: s]\n\t\t\tifFalse: [i asFloat testPrintOn: s base: 10].\n\t\ts space]  copy fixTemps.\n\t\"Now make sure the underlying string size is < 16383, a 16-bit small int.\"\n\ts contents size > (SmallInteger maxVal) ifTrue: [self error: 'String too big.'].\n\ts reset.\n\tfloats := OrderedCollection new: integers size.\n\t[s atEnd]\n\t\twhileFalse: \n\t\t\t[float := 0.0.\n\t\t\tstring := s upTo: delim.\n\t\t\ts upTo: space.\n\t\t\t\"In the following, digitValue is portable between ST80 and ST/V-DOS. \"\n\t\t\tstring do: [:char | float := float * 10.0 + char digitValue].\n\t\t\tfloats add: float].\n\tintegers = floats ifFalse: [self error: 'Numbers do not compare.']! !\n\n!SMarkSmopstone methodsFor: 'benchmarking' stamp: 'nishis 2/14/98 02:39'!\nstringsUpTo: n \n\t\"Return a collection of strings representing the integers from 1 \n\tto n with their digits reversed. \n\t \n\tThis method tests the efficiency of creating small streams, performing \n\tstring operations, and building collections. It includes a gross kludge \n\tto coerce portability between ST80 and ST/V. They vary slightly in the \n\tselector used to reverse collections. Subsequent to freezing this code, \n\tsomeone pointed out that it could have been written more simply \n\twithout   using perform:. It could also have been simplified using \n\tselect:. It \n\twas too late to change. The techniques are left as an exercise for the \n\treader.\"\n\n\t| selector |\n\t(Array with: #reverse with: #reversed)\n\t\tdo: [:symbol | (String canUnderstand: symbol)\n\t\t\tifTrue: [selector := symbol]].\n\t^ (1 to: n)\n\t\tcollect: [:m | m printString perform: selector]! !\n\n!SMarkSmopstone methodsFor: 'defaults'!\ndefaultProblemSize\n\t^ 1! !\n\n!SMarkSmopstone methodsFor: 'recursive method'!\ngenerate: lastGen counts: counts\n\t\"added by nishis\"\n\t\"SmopstoneBenchmark new sorcerersApprentice.\"\n\n\t| intersection isIncluded nextGen |\n\t\n\tcounts add: lastGen size.\n\tnextGen := OrderedCollection new.\n\tlastGen do:\n\t\t[:r1 |\n\t\tlastGen do: \n\t\t\t[:r2 | \n\t\t\t(r1 origin ~= r2 origin or: [r1 corner ~= r2 corner])\n\t\t\t\"In ST80 this test would have simply been r1 ~= r2\"\n\t\t\t\tifTrue:\n\t\t\t\t\t[(r1 intersects: r2)\n\t\t\t\t\t\tifTrue:\n\t\t\t\t\t\t\t[intersection := r1 intersect: r2.\n\t\t\t\t\t\t\tisIncluded := false.                     \"All these lines\"\n\t\t\t\t\t\t\tnextGen do:                              \"would have been\"\n\t\t\t\t\t\t\t\t[:rec |                                \"avoided if we\"\n\t\t\t\t\t\t\t\t\t(rec origin = intersection origin and: \"could have used\"\n\t\t\t\t\t\t\t\t\t[rec corner = intersection corner])    \"a set for\"\n\t\t\t\t\t\t\t\t\t\tifTrue: [isIncluded := true]].       \"nextGen. See\"\n\t\t\t\t\t\t\tisIncluded                               \"explanation\"\n\t\t\t\t\t\t\t\tifFalse:                               \"above.\"\n\t\t\t\t\t\t\t\t\t[nextGen size > 500\n\t\t\t\t\t\t\t\t\t\tifTrue: [self error: 'Converges too slowly.']\n\t\t\t\t\t\t\t\t\t\tifFalse: [nextGen add: intersection]]]]]].\n\t\tnextGen size > 0 ifTrue: [self generate: nextGen counts: counts].\n\t^counts! !\n\n!SMarkSmopstone commentStamp: 'nishis 2/21/98 06:26' prior: 0!\nmodified for Squeak by nishis@urban.ne.jp\nsee the comment of SlopstoneBenchmark class.\nI added all class methods and initialization>initilize method,\nmodified:\n\tstreamTestsOn: method.  In some case use testPrintOn: s base: instead of printOn:,\n\tprimesUpTo: method. From recursively calling a block to whileTrue: block.\n\tsorcerersApprentice method. From recursively calling a block to  recursive method.\n\texecute and setup method.\nThanx to Mr. Tim Olson, Mr. Kohler Markus, Mr. Tim Rowledge, Mr. John Maloney, Mr. Ian Piumarta.\n\noriginak code by\n\tNAME\t\t\tSTones80\n\tAUTHOR\t\t\tbruce@utafll.uta.edu (Bruce Samuelson)\n\tFUNCTION\t\tlow and medium level benchmarks for ST80 and ST/V\n\tST-VERSIONS\t\tpre R4.0, R4.0, R4.1, ST/V\n\tPREREQUISITES\tneed floating point hardware or emulation\n\tCONFLICTS\t\tnone\n\tDISTRIBUTION\tworld\n\tVERSION\t\t\t1.0\n\tDATE\t\t\tApril 16, 1993\n\n!\n!SMarkSmopstone class methodsFor: 'class initialization'!\ninitialize\n\t\"added by nishis\"\n\t\"SmopstoneBenchmark initialize.\"\n\n\t| block |\n\tWhichFloatPrintOn := 7850 asFloat printString size = '7850.0' size.\n\n\tIsSupportRecursiveBlock := true.\n\tblock := [:var | (var < 2) ifTrue: [block value: var + 1]].\n\t[block value: 1] \n\t\tifError: \n\t\t\t[ :msg :rec | \n\t\t\tIsSupportRecursiveBlock := false]\n! !\n\n!SMarkSuite methodsFor: 'helper'!\nbenchmarkNameForSelector: selector\n\t\"Extracts the actual name of the benchmark from the selector\"\n\t(selector beginsWith: #bench) ifTrue: [ ^ selector copyFrom: 6 to: selector size].\n\t^ selector asSymbol\n\t! !\n\n!SMarkSuite methodsFor: 'helper'!\nshouldRunSelector: selector\n\t(selector includes: $:) ifTrue: [ ^ false ].\n\t^ selector beginsWith: #bench! !\n\n!SMarkSuite methodsFor: 'running'!\ncleanUpInstanceVariables\n\t\"Make sure all variables that are 'user variables' get cleaned\"\n\t\n\tself class allInstVarNames do: [ :name |\n\t\tname = 'runner' ifFalse: [\n\t\t\tself instVarNamed: name put: nil ] ]! !\n\n!SMarkSuite methodsFor: 'running'!\nsetUp\n\t\"subclass responsibility to set up the necessary environment for a benchmark\"\n\t^ self! !\n\n!SMarkSuite methodsFor: 'running'!\ntearDown\n\t\"subclass responsibility to clean up the environment after a benchmark\"\n\t^ self! !\n\n!SMarkSuite methodsFor: 'benchmarking'!\nperformCustomSelector: aSelector with: aPrefix\n\t| customSelector |\n\tcustomSelector := (aPrefix, aSelector capitalized) asSymbol.\n\t(self respondsTo: customSelector) ifTrue: [ \n\t\tself perform: customSelector].! !\n\n!SMarkSuite methodsFor: 'benchmarking'!\nproblemSize\n\t^ runner problemSize! !\n\n!SMarkSuite methodsFor: 'benchmarking'!\nrun\n\t\"Executes all the benchmarks in the suite, \n\t coordinating with the runner when necessary\"\n\t\n\t| potentialBenchmarkSelectors |\n\tselectedBenchmarks\n\t\tifNotNil: [ potentialBenchmarkSelectors := selectedBenchmarks ]\n\t\tifNil:    [ potentialBenchmarkSelectors := self class allSelectors ].\t\t\t\t\n\t\n\tpotentialBenchmarkSelectors\n\t\tdo: [ :selector |\n\t\t\t(self shouldRunSelector: selector)\n\t\t\t\tifTrue: [\n\t\t\t\t\trunner performBenchmark: selector ]\n\t\t].\n\t! !\n\n!SMarkSuite methodsFor: 'benchmarking'!\nrunBenchmark: aSelector\n\t\n\t[self setUp.\n\t self performCustomSelector: aSelector with: #setUp.\n\t runner timedBenchmarkExecution: aSelector] ensure: [\n\t\tself performCustomSelector: aSelector with: #tearDown.\n\t\tself tearDown.\n\t\tself cleanUpInstanceVariables]! !\n\n!SMarkSuite methodsFor: 'benchmarking'!\nrunOnly: aSymbol\n\tselectedBenchmarks := IdentitySet newFrom: { aSymbol }.! !\n\n!SMarkSuite methodsFor: 'benchmarking'!\nselectedBenchmarks\n\t^ selectedBenchmarks! !\n\n!SMarkSuite methodsFor: 'accessing'!\nrunner\n\t^ runner! !\n\n!SMarkSuite methodsFor: 'accessing'!\nrunner: aRunner\n\trunner := aRunner.! !\n\n!SMarkSuite commentStamp: 'StefanMarr 3/20/2011 20:57' prior: 0!\nA Benchmark Suite is a set of benchmarks and it knows what exactly needs to be executed.\nHowever, it does not really know how to execute it.\nIt knows all the magic, that is, how to set up and tear down the environment for the benchmarks, but does not have the knowledge of how many iterations need to be done and how to evaluate any results that might be produced.!\n!SMarkSuite class methodsFor: 'defaults'!\ndefaultProblemSize\n\t^ nil! !\n\n!SMarkSuite class methodsFor: 'defaults'!\ndefaultRunner\n\t^ SMarkRunner! !\n\n!SMarkSuite class methodsFor: 'benchmarking'!\nisAbstractClass\n\t\"This is a hack that is necessary in Squeak since it does not provide #isAbstractClass.\n\t Actually this class is supposed to be abstract, but well, inheritance...\"\n\t\n\t^ false! !\n\n!SMarkSuite class methodsFor: 'benchmarking'!\nrun\n\t^ self defaultRunner execute: self new.! !\n\n!SMarkSuite class methodsFor: 'benchmarking'!\nrun: nIterations\n\t^ self defaultRunner execute: self new with: nIterations.! !\n\n!SMarkSuiteTest methodsFor: 'as yet unclassified'!\ntestBenchmarkNameForSelector\n\t| suite |\n\tsuite := SMarkSuite new.\n\t\n\tself assert: (suite benchmarkNameForSelector: #benchSomething) equals: #Something.\n\tself assert: (suite benchmarkNameForSelector: #benchsomeThingElse) equals: #someThingElse.\n\t\n\tself assert: (suite benchmarkNameForSelector: #nobenchSomeThing) equals: #nobenchSomeThing.\n\tself assert: (suite benchmarkNameForSelector: #BenchSomeThing) equals: #BenchSomeThing.! !\n\n!SMarkSuiteTest methodsFor: 'as yet unclassified'!\ntestClassRun\n\t| runner |\n\t\n\trunner := SMarkTestSuite run.\n\tself assert: (runner isKindOf: SMarkTestSuite defaultRunner).\n\tself deny: runner results isNil    ! !\n\n!SMarkSuiteTest methodsFor: 'as yet unclassified'!\ntestCleanUpInstanceVariables\n\t| suite |\n\tsuite := SMarkTestSuite new.\n\tsuite runner: #dummy.\n\t\n\tself assert: suite runner\tequals: #dummy.\n\tself assert: suite a\t\t\tequals: 1.\n\tself assert: suite c\t\t\tequals: #three.\n\t\t\t\t\n\tsuite cleanUpInstanceVariables.\n\t\n\tself assert: suite runner\tequals: #dummy.\n\tself assert: suite a\t\t\tequals: nil.\n\tself assert: suite b\t\t\tequals: nil.\n\tself assert: suite c\t\t\tequals: nil.\n\tself assert: suite d\t\t\tequals: nil.\n! !\n\n!SMarkSuiteTest methodsFor: 'as yet unclassified'!\ntestCustomSetUp\n\t| suite runner |\n\t\n\tsuite := SMarkTestSuite new.\n\trunner := SMarkTestRunner execute: suite.  \n\t\n\tself assert: runner hasSetUpBenchB! !\n\n!SMarkSuiteTest methodsFor: 'as yet unclassified'!\ntestCustomTearDown\n\t| suite runner |\n\tsuite := SMarkTestSuite new.\n\trunner := SMarkTestRunner execute: suite.  \n\t\n\tself assert: runner hasTearDownBenchC.! !\n\n!SMarkSuiteTest methodsFor: 'as yet unclassified'!\ntestRunOnly\n\tself assert: false description: 'not yet implemented'.! !\n\n!SMarkSuiteTest methodsFor: 'as yet unclassified'!\ntestSetUp\n\t| suite runner |\n\tsuite := SMarkTestSuite new.\n\t\n\tself assert: suite a\t\t\tequals: 1.\n\tself assert: suite b\t\t\tequals: 2.\n\tself assert: suite c\t\t\tequals: #three.\n\t\n\trunner := SMarkTestRunner execute: suite.\n\t\n\t\"Make sure they are reset after each run,\n\t well we test just whether they are reset after the final run\"\n\tself assert: suite a\t\t\tequals: nil.\n\tself assert: suite b\t\t\tequals: nil.\n\tself assert: suite c\t\t\tequals: nil.\n\tself assert: suite d\t\t\tequals: nil.\n\n\t\"Make sure setUp was called 4 times.\"\n\t\n\tself assert: 4 equals: runner setUpCount.! !\n\n!SMarkSuiteTest methodsFor: 'as yet unclassified'!\ntestSetupAndTeaddownCalledForEveryBenchForEveryIteration\n\t| suite runner |\n\n\t\"Setup needs to be executed for every benchmark on every iteration.\n\t Test with iterations: 1\"\n\tsuite := SMarkTestSuite new.\n\trunner := SMarkTestRunner execute: suite with: 1.\n\n\tself assert: 4 equals: runner setUpCount.\n\tself assert: 4 equals: runner tearDownCount.\n\t\n\t\"Setup needs to be executed for every benchmark on every iteration.\n\t Test with iterations: 4\"\n\tsuite := SMarkTestSuite new.\n\trunner := SMarkTestRunner execute: suite with: 4.\n\n\tself assert: (4 * 4) equals: runner setUpCount.\n\tself assert: (4 * 4) equals: runner tearDownCount.\n\t\n\t\"Test with iterations: 10\"\n\tsuite := SMarkTestSuite new.\n\trunner := SMarkTestRunner execute: suite with: 10.\n\tself assert: (4 * 10) equals: runner setUpCount.\n\tself assert: (4 * 10) equals: runner tearDownCount.! !\n\n!SMarkSuiteTest methodsFor: 'as yet unclassified'!\ntestShouldRunSelector\n\t| suite |\n\tsuite := SMarkSuite new.\n\t\n\tself assert: (suite shouldRunSelector: #benchSomething).\n\tself assert: (suite shouldRunSelector: #benchsomeThingElse).\n\t\n\tself deny: (suite shouldRunSelector: #nobenchSomeThing).\n\tself deny: (suite shouldRunSelector: #BenchSomeThing).! !\n\n!SMarkSuiteTest methodsFor: 'as yet unclassified'!\ntestTearDown\n\t| suite runner |\n\tsuite := SMarkTestSuite new.\n\trunner := SMarkTestRunner execute: suite.  \n\t\n\tself assert: 4 equals: runner tearDownCount.! !\n\n!SMarkTest methodsFor: 'tests'!\ntestAllBenchmarksForReturningThemSelf\n\t\"This is a regression test to ensure that the old behavior worked in the first place\"\n\t| allSuites |\n\tallSuites := SMarkSuite subclasses.\n\t\n\tallSuites do: [:suite |\n\t\tsuite isAbstractClass ifFalse: [\n\t\t\t| runner results |\n\t\t\tTranscript show: (suite class name asString); cr.\n\t\t\trunner := suite run.\n\t\t\tresults := runner results.\n\t\t\tself assert: (runner isKindOf: suite defaultRunner).\n\t\t\tself assert: 1 equals: runner iterations.\n\t\t\tself assert: (results size > 0).\n\t\t].\n\t].! !\n\n!SMarkTest methodsFor: 'tests'!\ntestBasicRun\n\t| runner results benchResult result |\n\t\n\trunner := PBFloat run.\n\tresults := runner results.\n\tresult := (results at: #Add).\n\t\n\tself assert: (result isKindOf: Collection).\n\tself assert: result size equals: 1.\n\t\n\tbenchResult := result at: 1.\n\tself assert: (benchResult isKindOf: SMarkResult).\n\tself assert: (benchResult total notNil).\n\t! !\n\n!SMarkTest methodsFor: 'running'!\nsetUp\n\t\"Necessary for Squeak 4.2 compatibility, since method anotations are not supported in the base image.\"\n\t(self respondsTo:  #timeout:) ifTrue: [\n\t\tself timeout: 300.\n\t].! !\n\n!SMarkTest commentStamp: 'StefanMarr 3/12/2011 21:57' prior: 0!\nA general test to ensure the overall framework works as expected.!\n!SMarkTestAutosizeRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/19/2011 11:01'!\nbaseBenchmarkExecuted\n\t^ baseBenchmarkExecuted! !\n\n!SMarkTestAutosizeRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/19/2011 11:01'!\ncountSetUpInvoke\n\tsetUpCount := setUpCount + 1! !\n\n!SMarkTestAutosizeRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/19/2011 11:01'!\ncountTearDownInvoke\n\ttearDownCount := tearDownCount + 1! !\n\n!SMarkTestAutosizeRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/19/2011 11:01'!\ncountWasExecuted\n\t^ notifyRunnerWasExecuted ! !\n\n!SMarkTestAutosizeRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/19/2011 11:01'!\ndidPerform: aSymbol\n\tperformedBenchmarks add: aSymbol.! !\n\n!SMarkTestAutosizeRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/19/2011 11:01'!\ndidRunBaseBenchmark\n\tbaseBenchmarkExecuted := true.! !\n\n!SMarkTestAutosizeRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/19/2011 11:01'!\ndidSetUpBenchB\n\tdidSetUpBenchB := true.! !\n\n!SMarkTestAutosizeRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/19/2011 11:01'!\ndidTearDownBenchC\n\tdidTearDownBenchC := true.! !\n\n!SMarkTestAutosizeRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/19/2011 23:24'!\ninitialize\n\tsuper initialize.\n\n\tsetUpCount := 0.\n\ttearDownCount := 0.\n\tnotifyRunnerWasExecuted := 0.\n\t\n\tbaseBenchmarkExecuted := false.\n\n\tperformedBenchmarks := Set new.\n\t\n\t\"set the targetTime to something which is more reasonable for testing\"\n\ttargetTime := 50.! !\n\n!SMarkTestAutosizeRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/19/2011 11:01'!\nisNotifyRunnerWasExecutedSet\n\t^ notifyRunnerWasExecuted! !\n\n!SMarkTestAutosizeRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/19/2011 11:01'!\nnotifyRunnerWasExecuted\n\tnotifyRunnerWasExecuted := notifyRunnerWasExecuted + 1! !\n\n!SMarkTestAutosizeRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/19/2011 11:01'!\nperformedBenchmarks\n\t^ performedBenchmarks! !\n\n!SMarkTestAutosizeRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/19/2011 11:01'!\nsetUp\n\tnotifyRunnerWasExecuted := false! !\n\n!SMarkTestRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/18/2011 18:35'!\nbaseBenchmarkExecuted\n\t^ baseBenchmarkExecuted! !\n\n!SMarkTestRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/18/2011 17:36'!\ncountSetUpInvoke\n\tsetUpCount := setUpCount + 1! !\n\n!SMarkTestRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/18/2011 17:39'!\ncountTearDownInvoke\n\ttearDownCount := tearDownCount + 1! !\n\n!SMarkTestRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/18/2011 19:44'!\ncountWasExecuted\n\t^ notifyRunnerWasExecuted ! !\n\n!SMarkTestRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/18/2011 19:00'!\ndidPerform: aSymbol\n\tperformedBenchmarks add: aSymbol.! !\n\n!SMarkTestRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/18/2011 17:56'!\ndidRunBaseBenchmark\n\tbaseBenchmarkExecuted := true.! !\n\n!SMarkTestRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/18/2011 17:43'!\ndidSetUpBenchB\n\tdidSetUpBenchB := true.! !\n\n!SMarkTestRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/18/2011 17:42'!\ndidTearDownBenchC\n\tdidTearDownBenchC := true.! !\n\n!SMarkTestRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 4/15/2011 12:14'!\nhasSetUpBenchB\n\t^ didSetUpBenchB.! !\n\n!SMarkTestRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 4/15/2011 12:21'!\nhasTearDownBenchC\n\t^ didTearDownBenchC! !\n\n!SMarkTestRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/18/2011 19:49'!\ninitialize\n\tsuper initialize.\n\n\tsetUpCount := 0.\n\ttearDownCount := 0.\n\tnotifyRunnerWasExecuted := 0.\n\t\n\tbaseBenchmarkExecuted := false.\n\n\tperformedBenchmarks := OrderedCollection new.! !\n\n!SMarkTestRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/15/2011 22:16'!\nisNotifyRunnerWasExecutedSet\n\t^ notifyRunnerWasExecuted! !\n\n!SMarkTestRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/18/2011 19:44'!\nnotifyRunnerWasExecuted\n\tnotifyRunnerWasExecuted := notifyRunnerWasExecuted + 1! !\n\n!SMarkTestRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/18/2011 19:00'!\nperformedBenchmarks\n\t^ performedBenchmarks! !\n\n!SMarkTestRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/15/2011 22:15'!\nsetUp\n\tnotifyRunnerWasExecuted := false! !\n\n!SMarkTestRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 4/15/2011 12:27'!\nsetUpCount\n\t^ setUpCount! !\n\n!SMarkTestRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 4/15/2011 12:39'!\ntearDownCount\n\t^ tearDownCount! !\n\n!SMarkTestRunnerSuite methodsFor: 'as yet unclassified'!\nbenchDoNothing\n\t\"Just a dummy that should be executed and result in some measured value\"\n\t^ self! !\n\n!SMarkTestRunnerSuite methodsFor: 'as yet unclassified'!\nbenchNotifyRunner\n\trunner notifyRunnerWasExecuted.\n\t^ self! !\n\n!SMarkTestRunnerSuite commentStamp: 'StefanMarr 3/13/2011 22:58' prior: 0!\nThis is a benchmark suite used to test the benchmark runner!\n!SMarkTestRunnerSuite class methodsFor: 'as yet unclassified'!\nisAbstractClass\n\t\"This is more like a hack, but we do not want to execute this as a benchmark\"\n\t^ true! !\n\n!SMarkTestRunnerSuiteForAutosizing methodsFor: 'as yet unclassified'!\nbaseBenchmark\n\t(Delay forMilliseconds: 5) wait.! !\n\n!SMarkTestRunnerSuiteForAutosizing methodsFor: 'as yet unclassified'!\nbenchBig\n\t(Delay forMilliseconds: 100) wait.! !\n\n!SMarkTestRunnerSuiteForAutosizing methodsFor: 'as yet unclassified'!\nbenchSmall\n\t(Delay forMilliseconds: 5) wait.! !\n\n!SMarkTestRunnerSuiteForAutosizing class methodsFor: 'as yet unclassified'!\ndefaultRunner\n\t^ SMarkTestRunner! !\n\n!SMarkTestRunnerSuiteForPerfromBenchmark methodsFor: 'as yet unclassified'!\nBenchShouldNotBeExecuted\n\t\"This one should not be executed\"\n\t(Delay forMilliseconds: 5) wait.\n\trunner didPerform: #BenchShouldNotBeExecuted.! !\n\n!SMarkTestRunnerSuiteForPerfromBenchmark methodsFor: 'as yet unclassified'!\nbaseBenchmark\n\t(Delay forMilliseconds: 5) wait.\n\trunner didPerform: #baseBenchmark.! !\n\n!SMarkTestRunnerSuiteForPerfromBenchmark methodsFor: 'as yet unclassified'!\nbenchAfsdfsdfsdf\n\t(Delay forMilliseconds: 5) wait.\n\trunner didPerform: #benchAfsdfsdfsdf.! !\n\n!SMarkTestRunnerSuiteForPerfromBenchmark methodsFor: 'as yet unclassified'!\nbenchBsdfasereSDSfsdfsdfs\n\t(Delay forMilliseconds: 5) wait.\n\trunner didPerform: #benchBsdfasereSDSfsdfsdfs.! !\n\n!SMarkTestRunnerSuiteForPerfromBenchmark methodsFor: 'as yet unclassified'!\nbenchC\n\t(Delay forMilliseconds: 5) wait.\n\trunner didPerform: #benchC.! !\n\n!SMarkTestRunnerSuiteForPerfromBenchmark methodsFor: 'as yet unclassified'!\nbenchZZ\n\t(Delay forMilliseconds: 5) wait.\n\trunner didPerform: #benchZZ.! !\n\n!SMarkTestRunnerSuiteForPerfromBenchmark class methodsFor: 'as yet unclassified'!\ndefaultRunner\n\t^ SMarkTestRunner! !\n\n!SMarkTestSuite methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/12/2011 22:15'!\na\n\t^a! !\n\n!SMarkTestSuite methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/12/2011 22:15'!\nb\n\t^b! !\n\n!SMarkTestSuite methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/19/2011 00:35'!\nbenchA\n\ta := #executed.\n\t(Delay forMilliseconds: 1) wait.! !\n\n!SMarkTestSuite methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/19/2011 00:38'!\nbenchB\n\tb := #executed.\n\t(Delay forMilliseconds: 1) wait.! !\n\n!SMarkTestSuite methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/12/2011 22:37'!\nbenchC\n\tc := #executed.! !\n\n!SMarkTestSuite methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/19/2011 01:04'!\nbenchWithMultipleCriteria\n\t| t1 t2 t3 |\n\tt3 := runner createTimer: 't3'.\n\tt3 start.\n\t\n\t(Delay forMilliseconds: 25) wait.\n\t\n\tt2:= runner createTimer: 't2'.\n\tt2 start.\n\t(Delay forMilliseconds: 15) wait.\t\n\t\n\tt1 := runner createTimer: 't1'.  \n\tt1 start.\n\t(Delay forMilliseconds: 10) wait.\n\t\n\t\n\tt3 stop.\n\tt2 stop.\n\tt1 stop.    ! !\n\n!SMarkTestSuite methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/12/2011 22:15'!\nc\n\t^c! !\n\n!SMarkTestSuite methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/12/2011 22:15'!\nd\n\t^d! !\n\n!SMarkTestSuite methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/18/2011 19:50'!\ninitialize\n\tsuper initialize.\n\t\n\t\"Filling in some test data\"\n\ta := 1.\n\tb := 2.\n\tc := #three.\n\td := '42'.\n\t! !\n\n!SMarkTestSuite methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/12/2011 22:39'!\nsetUp\n\trunner countSetUpInvoke! !\n\n!SMarkTestSuite methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/13/2011 20:29'!\nsetUpBenchB\n\trunner didSetUpBenchB! !\n\n!SMarkTestSuite methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/12/2011 22:39'!\ntearDown\n\trunner countTearDownInvoke! !\n\n!SMarkTestSuite methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/13/2011 20:30'!\ntearDownBenchC\n\trunner didTearDownBenchC! !\n\n!SMarkTestSuite commentStamp: 'StefanMarr 3/12/2011 22:13' prior: 0!\nThis class is used for unit testing only.!\n!SMarkTestSuite class methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/20/2011 21:09'!\ndefaultRunner\n\t^ SMarkTestRunner! !\n\n!SMarkTestSuite class methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/13/2011 20:57'!\nisAbstractClass\n\t\"This is more like a hack, but we do not want to execute this as a benchmark\"\n\t^ true! !\n\n!SMarkTestSuiteWithBaseBenchmark methodsFor: 'as yet unclassified' stamp: 'StefanMarr 3/18/2011 18:32'!\nbaseBenchmark\n\trunner didRunBaseBenchmark.! !\n\n!SMarkTestWeakScalingRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 4/15/2011 10:44'!\nbaseBenchmarkExecuted\n\t^ baseBenchmarkExecuted! !\n\n!SMarkTestWeakScalingRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 4/15/2011 10:41'!\ncountSetUpInvoke\n\tsetUpCount := setUpCount + 1! !\n\n!SMarkTestWeakScalingRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 4/15/2011 10:41'!\ncountTearDownInvoke\n\ttearDownCount := tearDownCount + 1! !\n\n!SMarkTestWeakScalingRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 4/15/2011 10:41'!\ncountWasExecuted\n\t^ notifyRunnerWasExecuted ! !\n\n!SMarkTestWeakScalingRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 4/15/2011 10:41'!\ndidPerform: aSymbol\n\tperformedBenchmarks add: aSymbol.! !\n\n!SMarkTestWeakScalingRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 4/15/2011 10:42'!\ndidRunBaseBenchmark\n\tbaseBenchmarkExecuted := true.! !\n\n!SMarkTestWeakScalingRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 4/15/2011 10:42'!\ndidSetUpBenchB\n\tdidSetUpBenchB := true.! !\n\n!SMarkTestWeakScalingRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 4/15/2011 10:42'!\ndidTearDownBenchC\n\tdidTearDownBenchC := true.! !\n\n!SMarkTestWeakScalingRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 4/15/2011 10:42'!\ninitialize\n\tsuper initialize.\n\n\tsetUpCount := 0.\n\ttearDownCount := 0.\n\tnotifyRunnerWasExecuted := 0.\n\t\n\tbaseBenchmarkExecuted := false.\n\n\tperformedBenchmarks := OrderedCollection new.! !\n\n!SMarkTestWeakScalingRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 4/15/2011 13:20'!\nisNotifyRunnerWasExecutedSet\n\t^ notifyRunnerWasExecuted > 0! !\n\n!SMarkTestWeakScalingRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 4/15/2011 10:42'!\nnotifyRunnerWasExecuted\n\tnotifyRunnerWasExecuted := notifyRunnerWasExecuted + 1! !\n\n!SMarkTestWeakScalingRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 4/15/2011 10:42'!\nperformedBenchmarks\n\t^ performedBenchmarks! !\n\n!SMarkTestWeakScalingRunner methodsFor: 'as yet unclassified' stamp: 'StefanMarr 4/15/2011 10:43'!\nsetUp\n\tnotifyRunnerWasExecuted := false! !\n\n!SMarkTimer methodsFor: 'timing' stamp: 'StefanMarr 3/20/2011 12:24'!\ncurrentMillis\n\t\"hack to make it work under most Smalltalkses and Pinocchio\"\n\t\"STEFAN: had to take this out, since my images do not support pragmas\n\t <pPrimitive: #millisecondClock plugin: #'Chronology.Time' >\"\n\t^ Time millisecondClockValue! !\n\n!SMarkTimer methodsFor: 'timing' stamp: 'StefanMarr 3/14/2011 08:54'!\nreset\n\tstartTime := 0.\n\telapsedTime := 0.! !\n\n!SMarkTimer methodsFor: 'timing' stamp: 'StefanMarr 3/20/2011 12:24'!\nstart\n\tstartTime := self currentMillis.! !\n\n!SMarkTimer methodsFor: 'timing' stamp: 'StefanMarr 3/20/2011 12:25'!\nstop\n\t| elapsedInThisPeriod current |\n\tcurrent := self currentMillis.\n\t\n\telapsedInThisPeriod := Time milliseconds: current since: startTime.\n\t\n\telapsedTime := elapsedTime + elapsedInThisPeriod.! !\n\n!SMarkTimer methodsFor: 'initialization' stamp: 'StefanMarr 3/14/2011 08:54'!\ninitialize\n\telapsedTime := 0! !\n\n!SMarkTimer methodsFor: 'accessing' stamp: 'StefanMarr 3/14/2011 08:54'!\nname\n\t^name! !\n\n!SMarkTimer methodsFor: 'accessing' stamp: 'StefanMarr 3/14/2011 08:54'!\nname: aString\n\tname := aString ! !\n\n!SMarkTimer methodsFor: 'accessing' stamp: 'StefanMarr 3/14/2011 08:54'!\ntotalTime\n\t^elapsedTime! !\n\n!SMarkTimer class methodsFor: 'instance creation' stamp: 'StefanMarr 3/14/2011 08:54'!\nnew: aName\n\t| timer |\n\t\n\ttimer := super new.\n\ttimer name: aName.\n\t\n\t^timer! !\n\n!SMarkTimerTest methodsFor: 'as yet unclassified'!\ntestName\n\t| timer |\n\ttimer := SMarkTimer new.\n\t\n\tself assert: timer name equals: nil.\n\t\n\ttimer name: #foo.\n\t\n\tself assert: timer name equals: #foo.! !\n\n!SMarkTimerTest methodsFor: 'as yet unclassified'!\ntestReset\n\t| timer |\n\ttimer := SMarkTimer new.\n\t\n\ttimer start.\n\t(Delay forMilliseconds: 10) wait.\n\ttimer stop.\n\t\n\tself assert: (timer totalTime >= 10).\n\t\n\ttimer reset.\n\t\n\tself assert: timer totalTime equals: 0.! !\n\n!SMarkTimerTest methodsFor: 'as yet unclassified'!\ntestStartStop\n\t| timer |\n\ttimer := SMarkTimer new.\n\t\n\tself assert: timer totalTime equals: 0.\n\t\n\ttimer start.\n\t\n\t(Delay forMilliseconds: 10) wait.\n\t\n\ttimer stop.\n\t\n\tself assert: (timer totalTime >= 10).! !\n\n!SMarkTimerTest methodsFor: 'as yet unclassified'!\ntestTotalTimeWithResume\n\t| timer |\n\ttimer := SMarkTimer new.\n\tself assert: timer totalTime equals: 0.\n\t\n\ttimer start.\n\t(Delay forMilliseconds: 10) wait.\n\ttimer stop.\n\t\n\tself assert: (timer totalTime >= 10).\n\t\n\ttimer start.\n\t(Delay forMilliseconds: 10) wait.\n\ttimer stop.\n\t\n\tself assert: (timer totalTime >= 20).\n\t\n\ttimer start.\n\t(Delay forMilliseconds: 10) wait.\n\ttimer stop.\n\t\n\tself assert: (timer totalTime >= 30).! !\n\n!SMarkTransporter commentStamp: 'sm 5/25/2011 14:09' prior: 0!\nSMarkTransporter is not actually a Transporter class, since there are currently no needs for customization.\nThus, it is just a dummy class for future use, and to hold #transportersForFileOutMenu.\n!\n!SMarkWeakScalingRunner methodsFor: 'benchmarking' stamp: 'sm 5/30/2011 17:13'!\nexecute: aSelector withProcesses: numberOfProcesses withTimer: timer\n\t\"This case is meant for all cases. REM: this is also used for numProc==1 to be able to measure the process start overhead in all cases.\n\t It will start the processes and wait for their completion.\"\n\t\n\t| processes |\n\tprocesses\t\t\t:= Array new: numberOfProcesses.\n\trunningProcessesMtx := Semaphore forMutualExclusion.\n\tcompletionSignal\t\t:= Semaphore new.\n\trunningProcesses := numberOfProcesses.\n\t\n\t\"First initialize the processes\"\n\t1 to: numberOfProcesses do: [ :procNum |\n\t\t| proc |\n\t\tproc := SMarkWeakScalingRunnerExecutor createFor: aSelector for: numInnerIterations with: self and: suite.\n\t\tproc priority: Processor highestPriority.\n\t\tproc name: (self class name, '-',  procNum asString).\n\t\tprocesses at: procNum put: proc.\n\t\t\"On: procNum\"\n\t].\n\t\n\t\"Now, execute the benchmark and do the timing now\"\n\ttimer start.\n\t1 to: numberOfProcesses do: [ :procNum |\n\t\t(processes at: procNum) resume.\n\t].\n\tcompletionSignal wait.\n\ttimer stop.\n\t! !\n\n!SMarkWeakScalingRunner methodsFor: 'benchmarking' stamp: 'sm 5/30/2011 16:17'!\nexecutorCompleted\n\trunningProcessesMtx critical: [\n\t\trunningProcesses := runningProcesses - 1.\n\t\t(runningProcesses == 0) ifTrue: [\n\t\t\tcompletionSignal signal.\n\t\t]\n\t]! !\n\n!SMarkWeakScalingRunner methodsFor: 'benchmarking' stamp: 'StefanMarr 4/15/2011 15:43'!\ninnerIterations\n\t\"The number of inner iterations the benchmark is executed inside a processes\"\n\t^ numInnerIterations! !\n\n!SMarkWeakScalingRunner methodsFor: 'benchmarking' stamp: 'StefanMarr 4/15/2011 15:43'!\ninnerIterations: anInteger\n\t\"The number of inner iterations the benchmark is executed inside a processes\"\n\tnumInnerIterations := anInteger! !\n\n!SMarkWeakScalingRunner methodsFor: 'benchmarking' stamp: 'StefanMarr 4/15/2011 10:54'!\nprocesses\n\t^ numProcesses! !\n\n!SMarkWeakScalingRunner methodsFor: 'benchmarking' stamp: 'StefanMarr 4/15/2011 10:53'!\nprocesses: anInteger\n\tnumProcesses := anInteger! !\n\n!SMarkWeakScalingRunner methodsFor: 'benchmarking' stamp: 'sm 5/25/2011 18:31'!\ntimedBenchmarkExecution: aSelector\n\t\"Will do a timed execution of the benchmark and return the result timer\"\n\t| timer |\n\ttimers := Dictionary new.\n\n\ttimer := self createTimer: 'total'.\n\t\n\tself execute: aSelector withProcesses: numProcesses withTimer: timer.\n\t\n\tself recordResults: timer for: aSelector.\n\t\n\t^ timer! !\n\n!SMarkWeakScalingRunner methodsFor: 'initialization' stamp: 'StefanMarr 4/15/2011 15:43'!\ninitialize\n\tsuper initialize.\n\tnumProcesses\t\t\t:= self class defaultNumberOfProcesses.\n\tnumInnerIterations\t:= self class defaultNumberOfInnerIterations.\n! !\n\n!SMarkWeakScalingRunner methodsFor: 'reporting' stamp: 'sm 5/25/2011 17:50'!\nreportConfiguration: aStream\n\tsuper reportConfiguration: aStream.\n\taStream << ('inner iterations: ', numInnerIterations asString); cr.! !\n\n!SMarkWeakScalingRunner class methodsFor: 'defaults' stamp: 'StefanMarr 4/15/2011 15:42'!\ndefaultNumberOfInnerIterations\n\t\"The number of iterations of the inner loop\n\t in which the benchmark is executed.\"\n\t^ 1! !\n\n!SMarkWeakScalingRunnerExecutor methodsFor: 'benchmarking' stamp: 'sm 5/30/2011 16:22'!\nrun\n\t1 to: numInnerIterations do: [:i |\n\t\tsuite perform: benchmarkSelector.].\n\t\n\trunner executorCompleted.! !\n\n!SMarkWeakScalingRunnerExecutor methodsFor: 'accessing' stamp: 'sm 5/30/2011 16:20'!\nbenchmarkSelector: aSelector\n\tbenchmarkSelector := aSelector! !\n\n!SMarkWeakScalingRunnerExecutor methodsFor: 'accessing' stamp: 'sm 5/30/2011 16:20'!\ninnerIterations: anInt\n\tnumInnerIterations := anInt! !\n\n!SMarkWeakScalingRunnerExecutor methodsFor: 'accessing' stamp: 'sm 5/30/2011 16:21'!\nrunner: aRunner\n\trunner := aRunner! !\n\n!SMarkWeakScalingRunnerExecutor methodsFor: 'accessing' stamp: 'sm 5/30/2011 16:21'!\nsuite: aSuite\n\tsuite := aSuite! !\n\n!SMarkWeakScalingRunnerExecutor class methodsFor: 'as yet unclassified' stamp: 'sm 5/30/2011 16:33'!\ncreateFor: aSelector for: numIterations with: aRunner and: aSuite\n\t| o |\n\to := self new.\n\to runner: aRunner.\n\to suite: aSuite.\n\to innerIterations: numIterations.\n\to benchmarkSelector: aSelector.\n\t^ ([ o run ] newProcess)! !\n\n!SMarkWeakScalingRunnerTest methodsFor: 'as yet unclassified'!\nrunnerClass\n\t^ SMarkTestWeakScalingRunner! !\n\n!SMarkWeakScalingRunnerTest methodsFor: 'as yet unclassified'!\ntestInnerIterations\n\t\"Test the semantics of the inner loop parameter\"\n\t| runner results |\n\t\n\t\"Setup\"\n\trunner := self runnerClass new.\n\trunner iterations: 1.\n\trunner innerIterations: 1.  \n\trunner processes: 10.\n\trunner suite: SMarkTestRunnerSuite new.\n\tresults := runner execute.\n\t\n\tself assert: 10 equals: runner countWasExecuted.\n\tself assert: 1  equals: (results at: #NotifyRunner) size.\n\t\n\trunner := self runnerClass new.\n\trunner iterations: 2.\n\trunner innerIterations: 1.  \n\trunner processes: 10.\n\trunner suite: SMarkTestRunnerSuite new.\n\tresults := runner execute.\n\t\n\tself assert: 20 equals: runner countWasExecuted.\n\tself assert: 2  equals: (results at: #NotifyRunner) size.\n\t\n\t\n\trunner := self runnerClass new.\n\trunner iterations: 2.\n\trunner innerIterations: 4.  \n\trunner processes: 10.\n\trunner suite: SMarkTestRunnerSuite new.\n\tresults := runner execute.\n\t\n\tself assert: (20 * 4) equals: runner countWasExecuted.\n\tself assert: 2  equals: (results at: #NotifyRunner) size.\n\t\n\trunner := self runnerClass new.\n\trunner iterations: 4.\n\trunner innerIterations: 7.  \n\trunner processes: 10.\n\trunner suite: SMarkTestRunnerSuite new.\n\tresults := runner execute.\n\t\n\tself assert: (40 * 7) equals: runner countWasExecuted.\n\tself assert: 4           equals: (results at: #NotifyRunner) size.! !\n\n!SMarkWeakScalingRunnerTest methodsFor: 'as yet unclassified'!\ntestWeakScaling3Processes\n\t\"test with small number of processes and varying number of iterations\"\n\t| runner results |\n\t\n\t\"Setup for 2 iteration, and 3 process\"\n\trunner := self runnerClass new.\n\trunner iterations: 2.\n\trunner processes: 3.\n\trunner suite: SMarkTestRunnerSuite new.\n\tresults := runner execute.\n\t\n\tself assert: 6 equals: runner countWasExecuted.\n\tself assert: 2 equals: (results at: #NotifyRunner) size.! !\n\n!SMarkWeakScalingRunnerTest methodsFor: 'as yet unclassified'!\ntestWeakScalingFewProcesses\n\t\"test with small number of processes and varying number of iterations\"\n\t| runner results |\n\t\n\t\"Setup for 1 iteration, and 1 process\"\n\trunner := self runnerClass new.\n\trunner iterations: 1.\n\trunner processes: 1.\n\trunner suite: SMarkTestRunnerSuite new.\n\tresults := runner execute.\n\t\n\tself assert: 1 equals: runner countWasExecuted.\n\t! !\n\n!SMarkWeakScalingRunnerTest methodsFor: 'as yet unclassified'!\ntestWeakScalingManyProcesses\n\t\"test with large number of processes and varying number of iterations\"\n\t| runner results |\n\t\n\t\"Setup\"\n\trunner := self runnerClass new.\n\trunner iterations: 1.\n\trunner processes: 10.\n\trunner suite: SMarkTestRunnerSuite new.\n\tresults := runner execute.\n\t\n\tself assert: 10 equals: runner countWasExecuted.\n\tself assert: 1  equals: (results at: #NotifyRunner) size.\n\t\n\trunner := self runnerClass new.\n\trunner iterations: 2.\n\trunner processes: 10.\n\trunner suite: SMarkTestRunnerSuite new.\n\tresults := runner execute.\n\t\n\tself assert: 20 equals: runner countWasExecuted.\n\tself assert: 2  equals: (results at: #NotifyRunner) size.\n\t\n\trunner := self runnerClass new.\n\trunner iterations: 4.\n\trunner processes: 10.\n\trunner suite: SMarkTestRunnerSuite new.\n\tresults := runner execute.\n\t\n\tself assert: 40 equals: runner countWasExecuted.\n\tself assert: 4  equals: (results at: #NotifyRunner) size.! !\n\n!SMarkWeakScalingRunnerTest class methodsFor: 'as yet unclassified'!\nshouldInheritSelectors\n\t^ true! !\n\n!SUnitAPIDocumentation class methodsFor: 'accessing' stamp: 'tbn 12/16/2010 22:39'!\nbookName\n\t^'API Documentation'! !\n\n!SUnitAPIDocumentation class methodsFor: 'accessing' stamp: 'tbn 12/16/2010 22:40'!\npackages\n\t^#('SUnit-Core-Announcements' 'SUnit-Core-Extensions' 'SUnit-Core-Kernel' 'SUnit-Core-Kernel' 'SUnit-Core-Utilities' 'SUnit-Tests' 'SUnit-UI')! !\n\n!SUnitAPIDocumentation class methodsFor: 'defaults' stamp: 'tbn 12/16/2010 22:39'!\nbuilder\n\t^PackageAPIHelpBuilder! !\n\n!SUnitExtensionsTest methodsFor: 'accessing' stamp: 'GuillermoPolito 9/1/2010 18:24'!\nstream\n\t^stream ifNil: [stream := String new writeStream].! !\n\n!SUnitExtensionsTest methodsFor: 'as yet unclassified' stamp: 'md 4/2/2006 14:02'!\ntestExceptionWithMatchingString\n\tself should: [ Object obsolete ] raise: Error whoseDescriptionIncludes: 'NOT obsolete' description: 'tested obsoleting Object'! !\n\n!SUnitExtensionsTest methodsFor: 'as yet unclassified' stamp: 'md 4/2/2006 14:02'!\ntestExceptionWithoutMatchingString\n\tself should: [ Object obsolete ] raise: Error whoseDescriptionDoesNotInclude: 'Zero' description: 'tested obsoleting Object'! !\n\n!SUnitExtensionsTest methodsFor: 'as yet unclassified' stamp: 'md 4/2/2006 14:02'!\ntestNoExceptionWithMatchingString\n\tself shouldnt: [ Object obsolete ] raise: Error whoseDescriptionIncludes: 'Zero' description: 'tested obsoleting Object'! !\n\n!SUnitExtensionsTest methodsFor: 'as yet unclassified' stamp: 'md 4/2/2006 14:02'!\ntestNoExceptionWithNoMatchingString\n\tself shouldnt: [ Object obsolete ] raise: Error whoseDescriptionDoesNotInclude: 'NOT' description: 'tested obsoleting Object'! !\n\n!SUnitExtensionsTest methodsFor: 'real tests' stamp: 'mx 3/20/2006 23:47'!\nassertionFailedInRaiseWithExceptionDoTest\n\n\tself \n\t\tshould: [ Error signal ]\n\t\traise: Error\n\t\twithExceptionDo: [ :anException | self assert: false ]! !\n\n!SUnitExtensionsTest methodsFor: 'real tests' stamp: 'mx 3/20/2006 23:47'!\ndifferentExceptionInShouldRaiseWithExceptionDoTest\n\n\t[ self \n\t\tshould: [ Error signal ]\n\t\traise: Halt\n\t\twithExceptionDo: [ :anException | self assert: false description: 'should:raise:withExceptionDo: handled an exception that should not handle'] ]\n\ton: Error\n\tdo: [ :anException | anException return: nil ]! !\n\n!SUnitExtensionsTest methodsFor: 'real tests' stamp: 'mx 3/20/2006 23:47'!\nerrorInRaiseWithExceptionDoTest\n\n\tself \n\t\tshould: [ Error  signal ]\n\t\traise: Error\n\t\twithExceptionDo: [ :anException | Error signal: 'A forced error' ]! !\n\n!SUnitExtensionsTest methodsFor: 'real tests' stamp: 'EstebanLorenzano 11/11/2010 17:13'!\ninvalidShouldNotTakeMoreThan\n\n\tself should: [(Delay forMilliseconds: 100) wait] notTakeMoreThan: 50 milliSeconds.! !\n\n!SUnitExtensionsTest methodsFor: 'real tests'!\ninvalidShouldNotTakeMoreThanMilliseconds\n\n\tself should: [(Delay forMilliseconds: 100) wait] notTakeMoreThanMilliseconds: 50! !\n\n!SUnitExtensionsTest methodsFor: 'real tests' stamp: 'mx 3/20/2006 23:47'!\nnoExceptionInShouldRaiseWithExceptionDoTest\n\n\tself \n\t\tshould: [  ]\n\t\traise: Error\n\t\twithExceptionDo: [ :anException | Error signal: 'Should not get here' ]! !\n\n!SUnitExtensionsTest methodsFor: 'real tests'!\nshouldFixTest\n\n\tself shouldFix: [ Error signal: 'any kind of error' ]\n! !\n\n!SUnitExtensionsTest methodsFor: 'real tests' stamp: 'mx 3/20/2006 23:47'!\nshouldRaiseWithExceptionDoTest\n\n\tself \n\t\tshould: [ Error signal: '1' ]\n\t\traise: Error\n\t\twithExceptionDo: [ :anException | self assert: anException messageText = '1' ]! !\n\n!SUnitExtensionsTest methodsFor: 'real tests' stamp: 'mx 3/20/2006 23:47'!\nshouldRaiseWithSignalDoTest\n\n\tself \n\t\tshould: [ Error signal: '1' ]\n\t\traise: Error\n\t\twithExceptionDo: [ :anException | self assert: anException messageText = '1' ]! !\n\n!SUnitExtensionsTest methodsFor: 'real tests' stamp: 'md 8/2/2006 11:05'!\nvalidShouldNotTakeMoreThan\n\n\tself should: [(Delay forMilliseconds: 100) wait] notTakeMoreThan:  200 milliSeconds.! !\n\n!SUnitExtensionsTest methodsFor: 'real tests'!\nvalidShouldNotTakeMoreThanMilliseconds\n\n\tself should: [(Delay forMilliseconds: 100) wait] notTakeMoreThanMilliseconds: 200! !\n\n!SUnitExtensionsTest methodsFor: 'test' stamp: 'mx 3/20/2006 23:39'!\ntestAssertionFailedInRaiseWithExceptionDo\n\n\t| testCase testResult  |\n\t\n\ttestCase := self class selector: #assertionFailedInRaiseWithExceptionDoTest.\n\ttestResult := testCase run.\n\t\n\tself assert: (testResult failures includes: testCase).\n\tself assert: testResult failures size=1.\n\tself assert: testResult passed isEmpty.\n\tself assert: testResult errors isEmpty.\n\t\n\t! !\n\n!SUnitExtensionsTest methodsFor: 'test' stamp: 'mx 3/20/2006 21:15'!\ntestAutoAssertFalse\n\t| booleanCondition |\n\tself assert: self isLogging.\n\tself should: [ self assert: 1 = 2 description: 'self assert: 1 = 2' ] raise: TestResult failure.\n\tbooleanCondition := (self stream contents subStrings: {Character cr}) last = 'self assert: 1 = 2'.\n\tself assert: booleanCondition! !\n\n!SUnitExtensionsTest methodsFor: 'test'!\ntestAutoAssertTrue\n\tself assert: 1 = 1.\n\tself assert: true! !\n\n!SUnitExtensionsTest methodsFor: 'test' stamp: 'mx 3/20/2006 21:16'!\ntestAutoDenyFalse\n\t| booleanCondition |\n\tself assert: self isLogging.\n\tself should: [ self deny: 1 = 1 description: 'self deny: 1 = 1'.] raise: TestResult failure.\n\tbooleanCondition := (self stream contents subStrings:  {Character cr}) last = 'self deny: 1 = 1'.\n\tself assert: booleanCondition! !\n\n!SUnitExtensionsTest methodsFor: 'test'!\ntestAutoDenyTrue\n\tself deny: 1 = 2.\n\tself deny: false! !\n\n!SUnitExtensionsTest methodsFor: 'test' stamp: 'mx 3/20/2006 23:40'!\ntestDifferentExceptionInShouldRaiseWithExceptionDo\n\n\t| testCase testResult  |\n\t\n\ttestCase := self class selector: #differentExceptionInShouldRaiseWithExceptionDoTest.\n\ttestResult := testCase run.\n\t\n\tself assert: (testResult passed includes: testCase).\n\tself assert: testResult errors isEmpty.\n\tself assert: testResult failures isEmpty.\n\tself assert: testResult passed size=1! !\n\n!SUnitExtensionsTest methodsFor: 'test' stamp: 'mx 3/20/2006 23:40'!\ntestErrorInRaiseWithExceptionDo\n\n\t| testCase testResult  |\n\t\n\ttestCase := self class selector: #errorInRaiseWithExceptionDoTest.\n\ttestResult := testCase run.\n\t\t\n\tself assert: (testResult errors includes: testCase).\n\tself assert: testResult errors size=1.\n\tself assert: testResult failures isEmpty.\n\tself assert: testResult passed isEmpty.\n\t\n\t! !\n\n!SUnitExtensionsTest methodsFor: 'test' stamp: 'md 8/2/2006 11:06'!\ntestInvalidShouldNotTakeMoreThan\n\n\t| testCase testResult |\n\n\ttestCase := self class selector: #invalidShouldNotTakeMoreThan.\n\ttestResult := testCase run.\n\n\tself assert: testResult passed isEmpty.\n\tself assert: testResult failures size = 1.\n\tself assert: (testResult failures includes: testCase).\n\tself assert: testResult errors isEmpty\n\n! !\n\n!SUnitExtensionsTest methodsFor: 'test'!\ntestInvalidShouldNotTakeMoreThanMilliseconds\n\n\t| testCase testResult |\n\n\ttestCase := self class selector: #invalidShouldNotTakeMoreThanMilliseconds.\n\ttestResult := testCase run.\n\n\tself assert: testResult passed isEmpty.\n\tself assert: testResult failures size = 1.\n\tself assert: (testResult failures includes: testCase).\n\tself assert: testResult errors isEmpty\n\n! !\n\n!SUnitExtensionsTest methodsFor: 'test' stamp: 'mx 3/20/2006 23:40'!\ntestNoExceptionInShouldRaiseWithExceptionDo\n\n\t| testCase testResult  |\n\t\n\ttestCase := self class selector: #noExceptionInShouldRaiseWithExceptionDoTest.\n\ttestResult := testCase run.\n\t\n\tself assert: (testResult failures includes: testCase).\n\tself assert: testResult failures size=1.\n\tself assert: testResult passed isEmpty.\n\tself assert: testResult errors isEmpty.\n\t\n\t! !\n\n!SUnitExtensionsTest methodsFor: 'test'!\ntestShouldFix\n\n\t| testCase testResult  |\n\t\n\ttestCase := self class selector: #shouldFixTest.\n\ttestResult := testCase run.\n\t\n\tself assert: (testResult passed includes: testCase).\n\tself assert: testResult passed size=1.\n\tself assert: testResult failures isEmpty.\n\tself assert: testResult errors isEmpty.\n\t\n\t! !\n\n!SUnitExtensionsTest methodsFor: 'test' stamp: 'mx 3/20/2006 23:40'!\ntestShouldRaiseWithExceptionDo\n\n\t| testCase testResult  |\n\t\n\ttestCase := self class selector: #shouldRaiseWithExceptionDoTest.\n\ttestResult := testCase run.\n\t\n\tself assert: (testResult passed includes: testCase).\n\tself assert: testResult passed size=1.\n\tself assert: testResult failures isEmpty.\n\tself assert: testResult errors isEmpty.\n\t\n\t! !\n\n!SUnitExtensionsTest methodsFor: 'test' stamp: 'md 8/2/2006 11:06'!\ntestValidShouldNotTakeMoreThan\n\t| testCase testResult |\n\n\ttestCase := self class selector: #validShouldNotTakeMoreThan.\n\ttestResult := testCase run.\n\n\tself assert: (testResult passed includes: testCase).\n\tself assert: testResult passed size = 1.\n\tself assert: testResult failures isEmpty.\n\tself assert: testResult errors isEmpty\n\n! !\n\n!SUnitExtensionsTest methodsFor: 'test'!\ntestValidShouldNotTakeMoreThanMilliseconds\n\n\t| testCase testResult |\n\n\ttestCase := self class selector: #validShouldNotTakeMoreThanMilliseconds.\n\ttestResult := testCase run.\n\n\tself assert: (testResult passed includes: testCase).\n\tself assert: testResult passed size = 1.\n\tself assert: testResult failures isEmpty.\n\tself assert: testResult errors isEmpty\n\n! !\n\n!SUnitExtensionsTest methodsFor: 'test support'!\nfailureLog\n\t^self stream! !\n\n!SUnitExtensionsTest methodsFor: 'testing'!\nisLogging\n\t^true! !\n\n!SUnitExtensionsTest class methodsFor: 'history' stamp: 'simon.denier 11/22/2008 22:13'!\nlastStoredRun\n\t^ ((Dictionary new) add: (#passed->((Set new) add: #testNoExceptionWithMatchingString; add: #testNoExceptionWithNoMatchingString; add: #testExceptionWithMatchingString; add: #testExceptionWithoutMatchingString; add: #testValidShouldNotTakeMoreThan; add: #testInvalidShouldNotTakeMoreThanMilliseconds; add: #testDifferentExceptionInShouldRaiseWithExceptionDo; add: #testShouldRaiseWithExceptionDo; add: #testShouldFix; add: #testAssertionFailedInRaiseWithExceptionDo; add: #testAutoDenyFalse; add: #testAutoDenyTrue; add: #testAutoAssertFalse; add: #testAutoAssertTrue; add: #testValidShouldNotTakeMoreThanMilliseconds; add: #testErrorInRaiseWithExceptionDo; add: #testNoExceptionInShouldRaiseWithExceptionDo; add: #testInvalidShouldNotTakeMoreThan; yourself)); add: (#timeStamp->'22 November 2008 10:11:35 pm'); add: (#failures->((Set new))); add: (#errors->((Set new))); yourself)! !\n\n!SUnitHelp commentStamp: 'tbn 12/16/2010 22:26' prior: 0!\nThis is a custom help book for the SUnit framework.\n!\n!SUnitHelp class methodsFor: 'accessing' stamp: 'tbn 12/16/2010 22:19'!\nbookName\n\t^'SUnit framework'! !\n\n!SUnitHelp class methodsFor: 'accessing' stamp: 'tbn 4/26/2011 15:37'!\npages\n\t^#(introduction running SUnitTutorial SUnitAPIDocumentation links)! !\n\n!SUnitHelp class methodsFor: 'pages' stamp: 'tbn 12/16/2010 23:31'!\nintroduction\n\t\"This method was automatically generated. Edit it using:\"\n\t\"SUnitHelp edit: #introduction\"\n\t^HelpTopic\n\t\ttitle: 'Introduction'\n\t\tcontents: \n'SUnit is the mother of all unit testing frameworks, and serves as one of the cornerstones of test-driven development methodologies such as eXtreme Programming. \n\nThe culture of testing has always been part of the philosophy of development in Smalltalk:\nYou write a method, accept the code and test it by writing a small script in a workspace, in a comment or an example as a class method. But this approach does not allow to automatically repeat the testing or ensure that the code is working. SUnit is a framework you can use to describe and execute unit tests. Unit testing is a method by which individual units of source code are tested to determine if they are fit for use. A unit is the smallest testable part of an application.!!' readStream nextChunkText! !\n\n!SUnitHelp class methodsFor: 'pages' stamp: 'tbn 4/26/2011 15:37'!\nlinks\n\t\"This method was automatically generated. Edit it using:\"\n\t\"SUnitHelp edit: #links\"\n\t^HelpTopic\n\t\ttitle: 'Links'\n\t\tcontents: \n'Visit the following sites to get more informations on SUnit\n\n- http://sunit.sourceforge.net/\n- http://www.iam.unibe.ch/~ducasse/Programmez/OnTheWeb/Eng-Art8-SUnit-V1.pdf\n- http://en.wikipedia.org/wiki/SUnit!!' readStream nextChunkText! !\n\n!SUnitHelp class methodsFor: 'pages' stamp: 'tbn 12/16/2010 23:31'!\nrunning\n\t\"This method was automatically generated. Edit it using:\"\n\t\"SUnitHelp edit: #running\"\n\t^HelpTopic\n\t\ttitle: 'Running tests'\n\t\tcontents: \n'SUnit allows writing tests on Smalltalk source code and checking results. This is usually done in a tool called TestRunner which you can either open from the Pharo world menu or by evaluating:\n\n   TestRunner open\n\nin a Smalltalk workspace.\n\nBy writing tests and checking them with the test runner you can ensure the sustainability of your applications.\n\n!!' readStream nextChunkText! !\n\n!SUnitTest methodsFor: 'accessing'!\nhasRun\n\t^hasRun! !\n\n!SUnitTest methodsFor: 'accessing'!\nhasSetup\n\t^hasSetup! !\n\n!SUnitTest methodsFor: 'running'!\nsetUp\n\thasSetup := true! !\n\n!SUnitTest methodsFor: 'testing' stamp: 'md 2/22/2006 14:17'!\nerrorShouldntRaise\n\tself \n\t\tshouldnt: [self someMessageThatIsntUnderstood] \n\t\traise: Notification new\n\t\t\t! !\n\n!SUnitTest methodsFor: 'testing'!\nexpectedFailures\n\t^#(expectedFailureFails expectedFailurePasses)! !\n\n!SUnitTest methodsFor: 'testing'!\ntestAssert\n\tself assert: true.\n\tself deny: false! !\n\n!SUnitTest methodsFor: 'testing'!\ntestDefects\n\t| result suite error failure |\n\tsuite := TestSuite new.\n\tsuite addTest: (error := self class selector: #error).\n\tsuite addTest: (failure := self class selector: #fail).\n\tresult := suite run.\n\tself assert: result defects asArray = (Array with: error with: failure).\n\tself\n\t\tassertForTestResult: result\n\t\trunCount: 2\n\t\tpassed: 0\n\t\tfailed: 1\n\t\terrors: 1! !\n\n!SUnitTest methodsFor: 'testing'!\ntestDialectLocalizedException\n\n\tself\n\t\tshould: [TestResult signalFailureWith: 'Foo']\n\t\traise: TestResult failure.\n\tself\n\t\tshould: [TestResult signalErrorWith: 'Foo']\n\t\traise: TestResult error.! !\n\n!SUnitTest methodsFor: 'testing'!\ntestError\n\n\t| case result |\n\n\tcase := self class selector: #error.\n\tresult := case run.\n\tself\n\t\tassertForTestResult: result\n\t\trunCount: 1\n\t\tpassed: 0\n\t\tfailed: 0\n\t\terrors: 1.\n\n\tcase := self class selector: #errorShouldntRaise.\n\tresult := case run.\n\tself \n\t\tassertForTestResult: result\n\t\trunCount: 1\n\t\tpassed: 0\n\t\tfailed: 0\n\t\terrors: 1! !\n\n!SUnitTest methodsFor: 'testing'!\ntestException\n\n\tself\n\t\tshould: [self error: 'foo']\n\t\traise: TestResult error! !\n\n!SUnitTest methodsFor: 'testing'!\ntestExpectedFailure\n\n\t| case result |\n\tcase := self class selector: #expectedFailureFails.\n\tself deny: case shouldPass.\n\tresult := case run.\n\tself\n\t\tassertForTestResult: result\n\t\trunCount: 1\n\t\tpassed: 0\n\t\tfailed: 0\n\t\terrors: 0\n\t\texpectedFailures: 1.! !\n\n!SUnitTest methodsFor: 'testing'!\ntestExpectedFailureDetection\n\tself assert: self expectedFailures size = 2.\n\tself assert: (self expectedFailures includesAllOf: #(expectedFailureFails expectedFailurePasses))! !\n\n!SUnitTest methodsFor: 'testing'!\ntestExpectedFailurePass\n\n\t| case result |\n\tcase := self class selector: #expectedFailurePasses.\n\tself deny: case shouldPass.\n\tresult := case run.\n\tself\n\t\tassertForTestResult: result\n\t\trunCount: 1\n\t\tpassed: 0\n\t\tfailed: 1\n\t\terrors: 0\n\t\texpectedFailures: 0.! !\n\n!SUnitTest methodsFor: 'testing'!\ntestFail\n\n\t| case result |\n\n\tcase := self class selector: #fail.\n\tresult := case run.\n\n\tself\n\t\tassertForTestResult: result\n\t\trunCount: 1\n\t\tpassed: 0\n\t\tfailed: 1\n\t\terrors: 0! !\n\n!SUnitTest methodsFor: 'testing'!\ntestFileOutResult\n\t| suite result fileout |\n\t\n\tsuite := TestSuite new.\n\tsuite \n\t\taddTest: (self class selector: #noop);\n\t\taddTest: (self class selector: #fail);\n\t\taddTest: (self class selector: #error).\n\n\tresult := suite run.\n\tfileout := String streamContents: [:aStream| result fileOutOn: aStream].\n\tself \n\t\tassert: fileout \n\t\tequals: \n '3 run, 1 passes, 0 expected failures, 1 failures, 1 errors, 0 unexpected passes\nFailures:\nSUnitTest>>#fail\n\nErrors:\nSUnitTest>>#error\n'\n\t\t\t! !\n\n!SUnitTest methodsFor: 'testing'!\ntestIsNotRerunOnDebug\n\n\t| case |\n\n\tcase := self class selector: #testRanOnlyOnce.\n\tcase run.\n\tcase debug! !\n\n!SUnitTest methodsFor: 'testing'!\ntestRan\n\n\t| case |\n\n\tcase := self class selector: #setRun.\n\tcase resources do: [:each | each availableFor: case].\n\t[case setUp.\n\tcase performTest] ensure: [\n\t\tself assert: case hasSetup.\n\t\tself assert: case hasRun.\n\t\tcase tearDown.\n\t\tcase cleanUpInstanceVariables].\n\tself assert: case hasSetup isNil.\n\tself assert: case hasRun isNil.! !\n\n!SUnitTest methodsFor: 'testing'!\ntestRanOnlyOnce\n\n\tself assert: hasRanOnce ~= true.\n\thasRanOnce := true! !\n\n!SUnitTest methodsFor: 'testing'!\ntestResult\n\n\t| case result |\n\n\tcase := self class selector: #noop.\n\tresult := case run.\n\n\tself\n\t\tassertForTestResult: result\n\t\trunCount: 1\n\t\tpassed: 1\n\t\tfailed: 0\n\t\terrors: 0! !\n\n!SUnitTest methodsFor: 'testing' stamp: 'md 2/22/2006 14:16'!\ntestRunning\n\n\t(Delay forSeconds: 2) wait\n\t\t\t! !\n\n!SUnitTest methodsFor: 'testing' stamp: 'md 2/22/2006 14:19'!\ntestSelectorWithArg: anObject\n\t\"should not result in error\"! !\n\n!SUnitTest methodsFor: 'testing'!\ntestShould\n\n\tself\n\t\tshould: [true];\n\t\tshouldnt: [false]! !\n\n!SUnitTest methodsFor: 'testing'!\ntestSuite\n\n\t| suite result |\n\n\tsuite := TestSuite new.\n\tsuite \n\t\taddTest: (self class selector: #noop);\n\t\taddTest: (self class selector: #fail);\n\t\taddTest: (self class selector: #error).\n\n\tresult := suite run.\n\n\tself\n\t\tassertForTestResult: result\n\t\trunCount: 3\n\t\tpassed: 1\n\t\tfailed: 1\n\t\terrors: 1! !\n\n!SUnitTest methodsFor: 'testing' stamp: 'DF 3/17/2006 01:30'!\ntestWithExceptionDo\n\n\tself\n\t\tshould: [self error: 'foo']\n\t\traise: TestResult error\n\t\twithExceptionDo: [:exception |\n\t\t\tself assert: (exception description includesSubString: 'foo')\n\t\t]\n\t\t\t! !\n\n!SUnitTest methodsFor: 'private'!\nassertForTestResult: aResult runCount: aRunCount passed: aPassedCount failed: aFailureCount errors: anErrorCount\n\n\tself\n\t\tassert: aResult runCount = aRunCount;\n\t\tassert: aResult passedCount = aPassedCount;\n\t\tassert: aResult failureCount = aFailureCount;\n\t\tassert: aResult errorCount = anErrorCount! !\n\n!SUnitTest methodsFor: 'private'!\nassertForTestResult: aResult runCount: aRunCount passed: aPassedCount failed: aFailureCount errors: anErrorCount expectedFailures: anExpectedFailureCount\n\n\tself\n\t\tassert: aResult runCount = aRunCount;\n\t\tassert: aResult expectedPassCount = aPassedCount;\n\t\tassert: aResult failureCount = aFailureCount;\n\t\tassert: aResult errorCount = anErrorCount;\n\t\tassert: aResult expectedDefectCount = anExpectedFailureCount! !\n\n!SUnitTest methodsFor: 'private'!\nerror\n\t3 zork! !\n\n!SUnitTest methodsFor: 'private' stamp: 'NikoSchwarz 10/23/2010 14:34'!\nexpectedFailureFails\n\t\"<expectedFailure>\"\n\tself assert: false.! !\n\n!SUnitTest methodsFor: 'private' stamp: 'NikoSchwarz 10/23/2010 15:34'!\nexpectedFailurePasses\n\t\"<expectedFailure>\"\n\tself assert: true.! !\n\n!SUnitTest methodsFor: 'private' stamp: 'BaseSystem 8/30/2009 09:40'!\nfail\n\tself assert: false! !\n\n!SUnitTest methodsFor: 'private' stamp: 'BaseSystem 8/30/2009 09:40'!\nnoop! !\n\n!SUnitTest methodsFor: 'private' stamp: 'BaseSystem 8/30/2009 09:40'!\nsetRun\n\thasRun := true! !\n\n!SUnitTest commentStamp: '<historical>' prior: 0!\nThis is both an example of writing tests and a self test for the SUnit. The tests \nhere are pretty strange, since you want to make sure things blow up. You should \nnot generally have to write tests this complicated in structure, although they \nwill be far more complicated in terms of your own objects- more assertions, more \ncomplicated setup. Kent says: \"Never forget, however, that if the tests are hard \nto write, something is probably wrong with the design\".!\n!SUnitTest class methodsFor: 'history' stamp: 'AdrianLienhard 10/19/2009 10:49'!\nlastStoredRun\n\t^ ((Dictionary new) add: (#passed->((Set new) add: #testWithExceptionDo; add: #testAssert; add: #testRanOnlyOnce; add: #testDialectLocalizedException; add: #testFail; add: #testDefects; add: #testIsNotRerunOnDebug; add: #testResult; add: #testRunning; add: #testError; add: #testException; add: #testShould; add: #testSuite; yourself)); add: (#timeStamp->'22 November 2008 10:11:35 pm'); add: (#failures->((Set new))); add: (#errors->((Set new))); yourself)! !\n\n!SUnitTransporter commentStamp: 'sm 5/25/2011 00:01' prior: 0!\nSUnitTransporter is not actually a Transporter class, since there are currently no needs for customization.\nThus, it is just a dummy class for future use, and to hold #transportersForFileOutMenu.\n!\n!SUnitTransporter class methodsFor: 'transporter' stamp: 'sm 5/25/2011 00:02'!\ntransportersForFileOutMenu\n\t^ { Transporter forPackage: (PackageInfo named: 'SUnit') }! !\n\n!SUnitTutorial commentStamp: 'tbn 12/16/2010 22:38' prior: 0!\nThis is a custom help book providing a tutorial for the SUnit framework.\n!\n!SUnitTutorial class methodsFor: 'accessing' stamp: 'tbn 12/16/2010 22:37'!\nbookName\n\t^'Tutorial'! !\n\n!SUnitTutorial class methodsFor: 'accessing' stamp: 'tbn 4/26/2011 15:56'!\npages\n\t^#(step1 step2 step3 step4 step5)! !\n\n!SUnitTutorial class methodsFor: 'pages' stamp: 'tbn 12/16/2010 23:29'!\nstep1\n\t\"This method was automatically generated. Edit it using:\"\n\t\"SUnitTutorial edit: #step1\"\n\t^HelpTopic\n\t\ttitle: 'Step 1 - Define a test class'\n\t\tcontents: \n'To define a series of tests in SUnit one typically creates a subclass of class TestCase. The idea is that the methods of this class will implement several tests, the instance variables represent the objects and / or the context in which these tests will be performed. \n\nIn our example we want to write a test on a simple Person class (which is not yet in our image). If the unit under test is a single class one convention is to name the test like the class but followed with the postfix \"Test\". \n\nSo to create a test for the Person class we subclass TestCase with a custom \"PersonTest\" class.\n\n\tTestCase subclass: #PersonTest\n\t\tinstanceVariableNames: ''''\n\t\tclassVariableNames: ''''\n\t\tpoolDictionaries: ''''\n\t\tcategory: ''MyApp-Tests-Model''\n\nNote that we havent created the class Person yet - so one idea of ExtremeProgramming (XP) is to write the test first as a way to describe a use case that your application has to cover. After that you write the code and the test will show you if the scenario is fullfilled. You dont have to follow this programming style and can also write tests to cover existing code.\n\t!!' readStream nextChunkText! !\n\n!SUnitTutorial class methodsFor: 'pages' stamp: 'tbn 4/26/2011 15:42'!\nstep2\n\t\"This method was automatically generated. Edit it using:\"\n\t\"SUnitTutorial edit: #step2\"\n\t^HelpTopic\n\t\ttitle: 'Step 2 - Define a first test method'\n\t\tcontents: \n'To define a test we create a new instance side method for our first test scenario. By convention any method (in a subclass of TestCase) whose selector starts with ''test'' is supposed to be a test and can be run using the TestRunner tool:\n\n\ttestInstanceCreation\n\t\t|person|\n\t\tperson := Person named: ''Beck''.\n\t\tperson firstName: ''Kent''.\n\t\tself assert: person fullName = ''Kent Beck''.\n\t\t\nA good style is to put this method into the method category ''testing''.\n\nWhen you accept the code the system may ask you about the new class Person. It''s not yet defined - but you can easily create it using the following class definition:\n\n\tObject subclass: #Person\n\t\tinstanceVariableNames: ''name firstName'' \n\t\tclassVariableNames: ''''\n\t\tpoolDictionaries: ''''\n\t\tcategory: ''MyApp-Core-Model''!!' readStream nextChunkText! !\n\n!SUnitTutorial class methodsFor: 'pages' stamp: 'tbn 4/26/2011 15:55'!\nstep3\n\t\"This method was automatically generated. Edit it using:\"\n\t\"SUnitTutorial edit: #step3\"\n\t^HelpTopic\n\t\ttitle: 'Step 3 - Running our first test method'\n\t\tcontents: \n'To run our test case method we can evaluate the following code snippet in a workspace:\n\n\tPersonTest run: #testInstanceCreation\n\nIf you print the result then the following will appear:\n\n      1 run, 0 passes, 0 expected failures, 0 failures, 1 errors, 0 unexpected passes\n\nThis tells us that one test has been run and one error occured while testing. Currently we dont have all messages implemented - so the test has to fail. \n\nIf you want to debug the test to see whats happened you can evaluate:\n\n     PersonTest debug: #testInstanceCreation\n\n\n\n \n\t!!' readStream nextChunkText! !\n\n!SUnitTutorial class methodsFor: 'pages' stamp: 'tbn 4/26/2011 16:01'!\nstep4\n\t\"This method was automatically generated. Edit it using:\"\n\t\"SUnitTutorial edit: #step4\"\n\t^HelpTopic\n\t\ttitle: 'Step 4 - Using the TestRunner'\n\t\tcontents: \n'Testing by evaluating an expression as we is not very convenient - so it is better to open the TestRunner - a user interface tool displaying all the tests in the system. You can start it either using the world menu or by evaluating \n\n    TestRunner open\n\nin a workspace.\n\nScroll down until you find the class category ''MyApp-Tests-Model'' and select the test by clicking on the class PersonTest. It is possible to select more than one test/category. Now click on \"Run selected\". \n\nIf you run the test in the test runner it will be marked red since it contains errors. The test runner will also show you the result of the test run:\n\n     1 run, 0 passes, 0 expected failures, 0 failures, 1 errors, 0 unexpected passes\n\nIf you click on the failed method in the lower right pane the debugger will open.!!' readStream nextChunkText! !\n\n!SUnitTutorial class methodsFor: 'pages' stamp: 'tbn 4/26/2011 16:19'!\nstep5\n\t\"This method was automatically generated. Edit it using:\"\n\t\"SUnitTutorial edit: #step5\"\n\t^HelpTopic\n\t\ttitle: 'Step 5 - Getting the test green'\n\t\tcontents: \n'To get our test green we have to implement the missing methods. First the debugger tells us that the Person class does not understand the message #named: \n\nWe dont have to go back into a standard browser to implement it, we just select ''Create'' in the walkback window. The system now asks us where #named: should be defined in the inheritance hierarchy. We select the Person class and categorize the method in a new method category ''instance creation''.\n\nFinally we have a debugger open where we can implement the code like this:\n\n  named: aString\n \t^(self new)\n\t\tname: aString;\n\t\tyourself\n\t\t\nNote that after accepting the method in the debugger you can instantly step through it or hit ''Proceed'' to continue execution. The system tell us that there is no setter method #name:, so we implement it too on the instance side:\n\t\n   name: aString\n\tname := aString\n\nNext the #firstName: message is missing:\n\t\n   firstName: aString\n\tfirstName := aString\n\t\nAt any point in time we can control if the test is already green in the TestRunner. Finally when we implement\nthe missing #fullName method by concatenating first name and surename:\n\n\tfullName\n\t\t^firstName, '' '', name  \n\t\t\nNow out test should be green.!!' readStream nextChunkText! !\n\n!SUnitUnloader methodsFor: 'unloading'!\nunloadAll\n\tself unloadTestPackages.\n\tself unloadSUnit.! !\n\n!SUnitUnloader methodsFor: 'unloading'!\nunloadSUnit\n\tSmalltalk globals\n\t\tat: #TestCase\n\t\tifPresent: [ :class | SystemChangeNotifier uniqueInstance noMoreNotificationsFor: class ].\n\t#(#SUnitGUI #SUnit) do: [ :each | (MCPackage named: each) unload ].\n\tAppRegistry removeObsolete.\t! !\n\n!SUnitUnloader methodsFor: 'unloading'!\nunloadTestPackages\n        #('Tests' 'CollectionsTests' 'CompilerTests' 'FreeTypeTests' 'Graphics-Tests' 'KernelTests' 'MorphicTests' 'MultilingualTests' 'NetworkTests' 'ToolsTest' 'Gofer-Tests' 'Announcements-Tests-Core' 'CompressionTests' 'HelpSystem-Tests' 'Multilingual-Tests' 'Regex-Tests-Core' 'HelpSystem-Tests'  'Balloon-Collections-Tests' 'StratifiedProxy-Tests' 'Finder-Tests' 'Zinc-Tests')\n                do: [ :each | (MCPackage named: each) unload ]. \n! !\n\n!SUnitUnloader commentStamp: 'LaurentLaffont 4/15/2011 20:20' prior: 0!\nI am SUnitUnloader, a little tool to unload SUnit and a fixed set of Tests from the current image.\n\nUsage: SUnitUnloader new unloadAll\n\nCaveat: #unloadTestPackages uses a fixed and probably ill maintained list of what packages hold unit tests.\n!\n!Scanner class methodsFor: '*Sly3' stamp: 'ssa 4/19/2010 20:31'!\ninitialize\n\t| newTable |\n\tnewTable _ Array new: 256 withAll: #xBinary. \"default\"\n\tnewTable atAll: #(9 10 12 13 32 ) put: #xDelimiter. \"tab lf ff cr space\"\n\tnewTable atAll: ($0 asciiValue to: $9 asciiValue) put: #xDigit.\n\n\t1 to: 255\n\t\tdo: [:index |\n\t\t\t(Character value: index) isLetter\n\t\t\t\tifTrue: [newTable at: index put: #xLetter]].\n\n\tnewTable at: 30 put: #doIt.\n\tnewTable at: $\" asciiValue put: #xDoubleQuote.\n\tnewTable at: $# asciiValue put: #xLitQuote.\n\tnewTable at: $% asciiValue put: #percent.\n\tnewTable at: $$ asciiValue put: #xDollar.\n\tnewTable at: $' asciiValue put: #xSingleQuote.\n\tnewTable at: $: asciiValue put: #xColon.\n\tnewTable at: $( asciiValue put: #leftParenthesis.\n\tnewTable at: $) asciiValue put: #rightParenthesis.\n\tnewTable at: $. asciiValue put: #period.\n\tnewTable at: $; asciiValue put: #semicolon.\n\tnewTable at: $[ asciiValue put: #leftBracket.\n\tnewTable at: $] asciiValue put: #rightBracket.\n\tnewTable at: ${ asciiValue put: #leftBrace.\n\tnewTable at: $} asciiValue put: #rightBrace.\n\tnewTable at: $^ asciiValue put: #upArrow.\n\tnewTable at: $_ asciiValue put: #leftArrow.\n\tnewTable at: $| asciiValue put: #verticalBar.\n\tTypeTable _ newTable \"bon voyage!!\"\n\n\t\"Scanner initialize\"! !\n\n!ScreenController methodsFor: 'fast window closing' stamp: 'ssa 3/10/2010 10:26'!\ncloseAllUnlockedWindows\n\t\"ScreenController new closeAllUnlockedWindows\"\n\t\"Close any window that isn't locked.\"\n\n\t| toClose |\n\ttoClose _ ScheduledControllers scheduledControllers select: [:c | c preventClosing not].\n\t(SelectionMenu confirm:'Do you really want to close all unlocked windows?')\n\t\tifFalse: [^ self].\n\ttoClose do: [:c | c closeAndUnscheduleIfOkWithModelNoTerminate].\n\tself restoreDisplay.\n! !\n\n!ScreenController methodsFor: 'fast window closing' stamp: 'ssa 3/9/2010 15:26'!\ncloseTopWindow\n\n\t| closeable |\n\tcloseable _ ScheduledControllers scheduledControllers detect:[:controller| controller preventClosing not] ifNone:[^self].\n\tcloseable view flash.\n\tsensor commandKeyPressed ifTrue:[closeable closeAndUnscheduleIfOkWithModel]! !\n\n!ScreenController methodsFor: 'fast window closing' stamp: 'ssa 3/9/2010 15:27'!\npreventClosing\n\t^true! !\n\n!ScreenController methodsFor: 'control defaults' stamp: 'ssa 3/3/2010 14:37'!\ncontrolActivity\n\t\"Any button opens the screen's menu.\n\tIf the shift key is down, do find window.\"\n\n\tsensor leftShiftDown ifTrue: [^ self findWindow].\n\tsensor controlKeyPressed ifTrue: [^self closeTopWindow].\n\t(self projectScreenMenu invokeOn: self) ifNil: [super controlActivity]! !\n\n!ScreenController methodsFor: 'control defaults' stamp: 'ssa 3/3/2010 13:42'!\nisControlWanted\n\t^ self viewHasCursor and: [sensor anyButtonPressed]! !\n\n!ScreenController methodsFor: 'menu messages' stamp: 'ssa 1/21/2010 12:17'!\nexploreViewFromUser\n\t\"Explore the selected window\"\n\t| controller |\n\t(controller _ ScheduledControllers windowFromUser) notNil\n\t\tifTrue:\n\t\t\t[controller view explore]! !\n\n!ScreenController methodsFor: 'menu messages' stamp: 'ssa 9/4/2008 15:11'!\nopenProcessBrowser\n\t\"Create and schedule\"\n\n\tProcessBrowser  open! !\n\n!ScreenController methodsFor: 'menu messages' stamp: 'tk 5/4/1998 17:25'!\nopenWorkspace \n\t\"Create and schedule workspace.\"\n\n\tWorkspace open! !\n\n!ScreenController methodsFor: 'menu messages' stamp: 'ssa 3/24/2010 16:34'!\nrecolorWindows\n\n\tSmalltalk recolorWindows! !\n\n!ScreenController methodsFor: 'menu messages' stamp: 'ssa 9/3/2008 11:12'!\nrestoreDisplay \n\t\"Clear the screen to gray and then redisplay all the scheduled views.\"\n\n\tDisplay extent = DisplayScreen actualScreenSize\n\t\tifFalse:\n\t\t\t[DisplayScreen startUp.\n\t\t\tScheduledControllers unCacheWindows].\n\tScheduledControllers restore! !\n\n!ScreenController methodsFor: 'nested menus' stamp: 'ssa 3/24/2010 16:33'!\nappearanceMenu \n\t\"Answer the appearance menu to be put up as a screen submenu\"\n\n\t^ SelectionMenu labelList:\n\t\t#('system fonts...'\n\t\t\t'full screen on'\n\t\t\t'full screen off'\n\t\t\t'recolor windows'\n\t\t\t'set display depth...'\n\t\t\t'set desktop color...' ) \n\n\t\tlines: #(1 3)\n\t\tselections: #( configureFonts\nfullScreenOn fullScreenOff recolorWindows setDisplayDepth setDesktopColor)\n\"\nScreenController new appearanceMenu startUp\n\"! !\n\n!ScreenController methodsFor: 'nested menus' stamp: 'ssa 9/4/2008 15:11'!\nopenMenu\n\t^ SelectionMenu labelList:\n\t\t#(\t'browser'\n\t\t\t'package browser'\n\t\t\t'method finder'\n\t\t\t'process browser'\n\t\t\t'workspace'\n\t\t\t'file list'\n\t\t\t'file...'\n\t\t\t'transcript'\n\n\t\t\t'simple change sorter'\n\t\t\t'dual change sorter'\n\n\t\t\t'mvc project'\n\t\t\t)\n\t\tlines: #(8 10 )\n\t\tselections: #(\nopenBrowser openPackageBrowser openSelectorBrowser openProcessBrowser openWorkspace openFileList openFile openTranscript \nopenSimpleChangeSorter openChangeManager\nopenProject    )\n\"\nScreenController  new openMenu startUp\n\"! !\n\n!ScreenController methodsFor: 'nested menus' stamp: 'ssa 3/10/2010 10:01'!\nwindowMenu\n\t\"Answer a menu for windows-related items.  \"\n\n\t^ SelectionMenu labelList:\n\t\t#(\t'find window...'\n\t\t\t'find changed browsers...'\n\t\t\t'find changed windows...'\n\n\t\t\t'collapse all windows'\n\t\t\t'expand all windows'\n\t\t\t'close unchanged windows' \n\t\t\t'close unlocked windows' ) , \n\t\t\t(Array\n\t\t\t\twith: self bitCachingString\n\t\t\t\twith: self staggerPolicyString)\n\t\tlines: #(3 7)\n\t\tselections: #(\nfindWindow chooseDirtyBrowser chooseDirtyWindow\ncollapseAll expandAll closeUnchangedWindows closeAllUnlockedWindows\nfastWindows changeWindowPolicy )\n\"\nScreenController new windowMenu startUp\n\"! !\n\n!ScreenController methodsFor: '*RVM' stamp: 'dmu 1/29/2011 16:31'!\ndashboardMenu\n\t| labels selections |\n\tlabels _ #('RVM dashboard') asOrderedCollection.\n\tselections _ #(openRVMDashboard) asOrderedCollection.\n\t(Smalltalk includesKey: #Sly3) ifTrue:[\n\t\t\tlabels add: 'Sly dashboard'.\n\t\t\tselections add:#openSlyDashboard].\n\t(Smalltalk includesKey: #Ly) ifTrue:[\n\t\t\tlabels add: 'Ly dashboard'.\n\t\t\tselections add:#openLyDashboard].\n\t(Smalltalk includesKey: #Qube) ifTrue:[\n\t\t\tlabels add: 'Qube dashboard'.\n\t\t\tselections add:#openQubeDashboard].\n\n\t\t\n\t^ SelectionMenu labelList: labels\n\t\tlines: #()\n\t\tselections: selections\n\"\nScreenController  new dashboardMenu startUp\n\"! !\n\n!ScreenController methodsFor: '*RVM' stamp: 'ssa 4/20/2010 09:50'!\nopenRVMDashboard\n\t\"Create and schedule a RVM dashboard.\"\n\n\tRVMMonitor dashboard! !\n\n!ScreenController methodsFor: '*RVM' stamp: 'ssa 7/7/2010 11:20'!\npresentDashboardMenu\n\tself popUpMenuFor: #dashboardMenu! !\n\n!ScreenController methodsFor: '*RVM' stamp: 'ads 1/12/2011 16:37'!\nprojectScreenMenu\n\t\"Answer the project screen menu.\"\n\n\t^ SelectionMenu labelList:\n\t\t#(\t'previous project'\n\t\t\t'jump to project...'\n\t\t\t'restore display'\n\n\t\t\t'dashboards...'\n\t\t\t'file out package...'\n\n\t\t\t'open...'\n\t\t\t'windows...'\n\t\t\t'changes...'\n\t\t\t'help...'\n\t\t\t'appearance...'\n\t\t\t'do...'\n\n\t\t\t'save'\n\t\t\t'save as...'\n\t\t\t'save and quit'\n\t\t\t'quit')\n\t\tlines: #(3 5 12)\n\t\tselections: #(\nreturnToPreviousProject jumpToProject restoreDisplay presentDashboardMenu presentPackageMenu\npresentOpenMenu presentWindowMenu presentChangesMenu presentHelpMenu presentAppearanceMenu commonRequests\nsnapshot saveAs snapshotAndQuit quit )\n\"\nScreenController new projectScreenMenu startUp\n\"! !\n\n!ScreenController methodsFor: '*Sly' stamp: 'dmu 8/30/2010 10:44'!\nopenSlyDashboard\n\t\"Create and schedule a Sly dashboard.\"\n\n\tSly3 dashboard! !\n\n!ScreenController methodsFor: '*Sly' stamp: 'ssa 3/24/2010 14:13'!\npresentSlyMenu\n\tself popUpMenuFor: #slyMenu! !\n\n!ScreenController methodsFor: '*Sly' stamp: 'ssa 3/24/2010 14:12'!\nslyMenu\n\t^ SelectionMenu labelList:\n\t\t#(\t'dashboard'\n\t\t\t)\n\t\tlines: #()\n\t\tselections: #(openSlyDashboard)\n\"\nScreenController  new slyMenu startUp\n\"! !\n\n!ScreenController methodsFor: '*Transporter' stamp: 'sm 3/11/2011 11:38'!\npresentPackageMenu\n\t| transportersByName packageNames selectedIndex |\n\ttransportersByName := Transporter getAllTransporters.\n\t\n\tpackageNames := transportersByName keys asSortedCollection.\n\tpackageNames addLast: 'All'.\n\tpackageNames := packageNames asArray.\n\tselectedIndex := (PopUpMenu labelArray: packageNames lines: {(packageNames size) - 1}) startUpWithCaption: 'Which package do you want to file out?'.\n\tselectedIndex = 0 ifFalse: [\n\t\tselectedIndex = packageNames size\n\t\t\tifTrue: [transportersByName valuesDo: [:transporter| transporter saveNoPopup]]\n\t\t\tifFalse: [\n\t\t\t\t| selectedPackageName selectedTransporter |\n\t\t\t\tselectedPackageName := packageNames at: selectedIndex.\n\t\t\t\tselectedTransporter := transportersByName at: selectedPackageName.\n\t\t\t\tselectedTransporter save.\n\t\t\t].\n\t].! !\n\n!ScriptConsole class methodsFor: 'as yet unclassified'!\n<< aString\n\tself print: aString! !\n\n!ScriptConsole class methodsFor: 'as yet unclassified'!\ncr\n\tself println: ''.! !\n\n!ScriptConsole class methodsFor: 'as yet unclassified' stamp: 'sm 6/1/2011 14:50'!\ndetectAvailableMechanismForStdout\n\t\"The RoarVM has its own primitive\"\n\t| cls |\n\tcls := Smalltalk at: #RVMOperations ifAbsent: [nil].\n\tIsRVM := (cls notNil and: [cls perform: #isRVM]).\n\tIsRVM \n\t\tifTrue: [ \n\t\t\tPrintTarget := cls.\n\t\t\t^ self.\n\t\t]\n\t\tifFalse: [\n\t\t\t\"Squeak 4.2 provides a stream at FileStream>>stdout\"\n\t\t\t(FileStream respondsTo: #stdout)\n\t\t\t\tifTrue: [\n\t\t\t\t\tPrintTarget := FileStream stdout.\n\t\t\t\t\t^ self.\n\t\t\t\t].\n\t\t].\n\t\n\tPrintTarget := nil.\n\t^ nil! !\n\n!ScriptConsole class methodsFor: 'as yet unclassified'!\ninitialize\n\tOutputToTranscript := false.\n\tself detectAvailableMechanismForStdout.! !\n\n!ScriptConsole class methodsFor: 'as yet unclassified'!\noutputToTranscript\n\t^ OutputToTranscript! !\n\n!ScriptConsole class methodsFor: 'as yet unclassified'!\noutputToTranscript: aBool\n\tOutputToTranscript := aBool! !\n\n!ScriptConsole class methodsFor: 'as yet unclassified'!\nprint: somethingAsString\n\tself print: somethingAsString withLineEnding: ''.! !\n\n!ScriptConsole class methodsFor: 'as yet unclassified' stamp: 'sm 6/1/2011 14:47'!\nprint: somethingAsString withLineEnding: lineEnd\n\t\"Will output the somethingAsString to stdout using one of the available mechansims and to the transcript if requested\"\n\t| output |\n\toutput := somethingAsString asString.\n\t\n\tPrintTarget ifNotNil: [\n\t\tIsRVM ifTrue: [ PrintTarget print: output. ]\n\t\t\t   ifFalse: [ PrintTarget nextPutAll: (output, lineEnd) ].\n\t].\n\n\t(OutputToTranscript or: [PrintTarget isNil])\n\t\tifTrue: [\n\t\t\tTranscript show: output, lineEnd.\n\t\t].! !\n\n!ScriptConsole class methodsFor: 'as yet unclassified'!\nprintln: somethingAsString\n\tself print: somethingAsString withLineEnding: String crlf.! !\n\n!ScriptStarter commentStamp: 'StefanMarr 5/14/2011 16:29' prior: 0!\nScriptStarter provides a startUp method and registers itself on the startUpList to enable scripting using command-line arguments.\n\nThe first argument on the command-line is used to identify a class on which #run: is invoked with the arguments as an array.\n\n#run: can be used similar to classic main(String[] args) methods in other languages. !\n!ScriptStarter class methodsFor: 'system startup entry' stamp: 'sm 5/25/2011 12:41'!\ninstall\n\t\"Will register ScriptStarter on the StartUpList to activate it on VM startup.\"\n\t| pref |\n\tSmalltalk addToStartUpList: ScriptStarter.\n\t\n\t\"Disable the loading of documents on startup\"\n\tpref := Smalltalk at: #Preferences ifAbsent: [nil].\n\tpref\tifNotNil: [\n\t\t\t(pref respondsTo: #disable:)\n\t\t\t\tifTrue: [\tpref disable: #readDocumentAtStartup. ]\n\t\t\t]\n\t\tifNil: [\n\t\t\t(Smalltalk globals at: #AbstractLauncer ifAbsent: [nil])\n\t\t\t\tifNotNilDo: [:launcher |\n\t\t\t\t\tlauncher readDocumentAtStartup: false\n\t\t\t\t]\n\t\t\t].! !\n\n!ScriptStarter class methodsFor: 'system startup entry' stamp: 'sm 5/30/2011 22:35'!\nstartUp\n\t\"startUp is invoked during startup.\n\t ScriptStarter has to be registered in the SystemDirectory's StartUpList\n\t See ScriptStarter>>install\"\n\t\n\t| arguments scriptClassName |\n\t\"Ok, only, and really only during startup\"\n\tIsResuming ifFalse: [ Transcript show: 'ScriptStarter did not execute a given script, since it assumes to be executed after a snapshot and not during startup.'.\n\t\t^ self. ].\n\t\n\t\"First make sure that stdout output can be used if available.\"\n\tScriptConsole detectAvailableMechanismForStdout.\n\t\n\targuments := self getSystemAttributes.\n\targuments size > 0\n\t\tifTrue: [scriptClassName := arguments at: 1.\n\t\t\tself executeRunFor: scriptClassName with: arguments.]! !\n\n!ScriptStarter class methodsFor: 'system startup entry' stamp: 'sm 5/30/2011 22:30'!\nstartUp: resuming\n\tIsResuming := resuming.\n\t^ super startUp: resuming.! !\n\n!ScriptStarter class methodsFor: 'system startup entry'!\nuninstall\n\t\"Will remove ScriptStarter from the StartUpList\"\n\tSmalltalk removeFromStartUpList: ScriptStarter.\n\t\n\tself flag: 'TODO: restore original setting for readDocumentAtStartup, see >>install.'.\n\tTranscript show: 'You might need to restore the original setting for readDocumentAtStartup'.! !\n\n!ScriptStarter class methodsFor: 'helper'!\nexecuteRunFor: scriptClassName with: arguments\n\t| scriptClass |\n\tscriptClass := Smalltalk classNamed: scriptClassName.\n\tscriptClass ifNotNil: [\n\t\tscriptClass run: arguments.\n\t\tQuitVM ifTrue: [\n\t\t\tSmalltalk snapshot: SafeBeforeQuit andQuit: true.\n\t\t].\n\t].! !\n\n!ScriptStarter class methodsFor: 'helper'!\ngetSystemAttributes\n\t| arguments arg i |\n\targuments := OrderedCollection new.\n\ti := 2.\n\t[[arg := SmalltalkImage current getSystemAttribute: i] value == nil]\n\t\twhileFalse: [arguments addLast: arg.\n\t\t\ti := i + 1].\n\t^ arguments! !\n\n!ScriptStarter class methodsFor: 'transporter' stamp: 'sm 2/13/2011 19:09'!\ntransportersForFileOutMenu\n\t^ { Transporter forPackage: (PackageInfo named: 'Scripting') }! !\n\n!ScriptStarter class methodsFor: 'initialization' stamp: 'sm 5/30/2011 22:33'!\ninitialize\n\t\"Automatically install ScriptStarter when the code is filed in.\"\n\tself install.\n\t\n\tQuitVM := true.\n\tSafeBeforeQuit := false.\n\tIsResuming := false.! !\n\n!ScriptStarter class methodsFor: 'configuration'!\nquitVMAfterScriptExecution\n\t^ QuitVM! !\n\n!ScriptStarter class methodsFor: 'configuration'!\nquitVMAfterScriptExecution: aBool\n\tQuitVM := aBool! !\n\n!ScriptStarter class methodsFor: 'configuration'!\nsaveImageBeforeQuit\n\t^ SafeBeforeQuit! !\n\n!ScriptStarter class methodsFor: 'configuration'!\nsaveImageBeforeQuit: aBool\n\tSafeBeforeQuit := aBool! !\n\n!ScrollController methodsFor: 'basic control sequence' stamp: 'ssa 9/9/2009 17:06'!\ncontrolInitialize\n        \"Recompute scroll bars.  Save underlying image unless it is already saved.\"\n        \"Hacked to disable flop-out scroll bars when inside an MSWScrollBarView - ssa 12/10/97 15:21\"\n\n        super controlInitialize.\n        scrollBar region: (0 @ 0 extent: 24 @ view apparentDisplayBox height).\n        scrollBar insideColor: view backgroundColor.\n        marker region: self computeMarkerRegion.\n        scrollBar _ scrollBar align: scrollBar topRight with: view apparentDisplayBox topLeft.\n        marker _ marker align: marker topCenter with: self upDownLine @ (scrollBar top + 2).\n        savedArea isNil ifTrue: [savedArea _ Form fromDisplay: scrollBar].\n\n        (self view superView isKindOf: MSWScrollBarView) \"_______HERE IS THE HACK\"\n                ifFalse:[scrollBar displayOn: Display].\n\n        \"Show a border around yellow-button (menu) region\"\n\"\n        yellowBar _ Rectangle left: self yellowLine right: scrollBar right + 1\n                top: scrollBar top bottom: scrollBar bottom.\n        Display border: yellowBar width: 1 mask: Form veryLightGray.\n\"\n        self moveMarker\n! !\n\n!ScrollController methodsFor: 'basic control sequence' stamp: 'ssa 9/9/2009 17:07'!\ncontrolTerminate\n\n\tsuper controlTerminate.\n\tsavedArea notNil \t\n\t\tifTrue: \n\t\t\t[ (self view superView isKindOf: MSWScrollBarView) \"_______HERE IS THE HACK\"\n\t\t\t\tifFalse:[savedArea displayOn: Display at: scrollBar topLeft].\n\t\t\tsavedArea _ nil].! !\n\n!ScrollController methodsFor: 'control defaults'!\ncontrolActivity\n        \"Hacked to supprt MSWScrollBarView - ssa 12/10/97 17:07\"\n\n        (self view superView isKindOf: MSWScrollBarView)\n                ifFalse:[\n        self scrollBarContainsCursor\n                                ifTrue: [self scroll]\n                                ifFalse: [super controlActivity]]\n                ifTrue:[super controlActivity]! !\n\n!ScrollController methodsFor: 'control defaults'!\nisControlActive \n        \"Viva la Junta!!\"\n        \"HACKED to ignore scrollbar in the activity test if contained in a ScrollbarView - ssa 1/8/98 16:24\"\n        view isNil ifTrue: [^ false].\n\n        (self view superView isKindOf: MSWScrollBarView) \"_______HERE IS THE HACK\"\n                ifFalse:[\"original code\" ^(view insetDisplayBox merge: scrollBar inside) containsPoint: sensor cursorPoint]\n                ifTrue:[^view insetDisplayBox containsPoint: sensor cursorPoint]! !\n\n!ScrollController methodsFor: 'marker adjustment'!\nmoveMarker\n        \"The view window has changed. Update the marker.\"\n        \"Hacked to suppress flop-out scrollbar updates when the view is encapsulated by an MSWScrollBarView - ssa 12/10/97 15:24\"\n\n        (self view superView isKindOf: MSWScrollBarView) \"_______HERE IS THE HACK\"\n                ifFalse:[self moveMarker: self markerDelta negated anchorMarker: nil]! !\n\n!ScrollController methodsFor: 'marker adjustment'!\nmoveMarkerTo: aRectangle \n        \"Same as markerRegion: aRectangle; moveMarker, except a no-op if the marker\n         would not move.\"\n        \"Hacked to suppress flop-out scrollbar updates when the view is encapsulated by an MSWScrollBarView - ssa 12/10/97 15:24\"\n\n        (self view superView isKindOf: MSWScrollBarView) \"_______HERE IS THE HACK\"\n                ifFalse:[       (aRectangle height = marker height and: [self viewDelta = 0])\n                                        ifFalse:\n                                                [self markerRegion: aRectangle.\n                                                self moveMarker]]! !\n\n!SelectionMenu class methodsFor: 'instance creation' stamp: 'ssa 8/22/2009 16:21'!\nlabels: labels lines: linesArray selectors: selectionsArray\n\t\"ST80 Compatibility\"\n\n\t^ self labels: labels lines: linesArray selections: selectionsArray! !\n\n!SequenceableCollection methodsFor: 'converting' stamp: 'ssa 10/18/2008 23:18'!\nasCircularCollection\n\t\"Answer a circular version of myself\"\n\t^RVMCircularCollection withAll: self! !\n\n!SequenceableCollection methodsFor: 'converting' stamp: 'ssa 10/27/2008 20:34'!\nrotateBackward\n\t\"Answer a copy of the receiver with elements rotated toward the front.\"\n\t\" 'frog' rotateBackward\"\n\n\t| n result |\n\tn _ self size.\n\tresult _ self species new: n.\n\tn = 0 ifTrue:[^result].\n\tn = 1 ifTrue:[result at: 1 put: (self at: 1).  ^result].\n\t1 to: n-1  do: [:i | result at: i put: (self at: i + 1)].\n\tresult at: n put: self first.\n\n\t^ result\n! !\n\n!SequenceableCollection methodsFor: 'converting' stamp: 'ssa 10/27/2008 20:33'!\nrotateForward\n\t\"Answer a copy of the receiver with elements rotated toward the end.\"\n\t\" 'frog' rotateForward\"\n\n\t| n result |\n\tn _ self size.\n\tresult _ self species new: n.\n\tn = 0 ifTrue:[^result].\n\tn = 1 ifTrue:[result at: 1 put: (self at: 1).  ^result].\n\t2 to: n  do: [:i | result at: i put: (self at: i - 1)].\n\tresult at: 1 put: self last.\n\n\t^ result\n! !\n\n!SequenceableCollection methodsFor: 'copying' stamp: 'dmu 5/5/2009 01:05'!\nshuffled\n\t^ self shuffledBy: Collection randomForPicking copy\n\n\"Examples:\n\t($A to: $Z) shuffled\n\"! !\n\n!SequenceableCollection methodsFor: 'enumerating' stamp: 'ssa 5/28/2010 13:51'!\nwith: secondCollection with: thirdCollection do: threeArgBlock \n\t\"Evaluate threeArgBlock with corresponding elements from this collection, secondCollection and thirdCollection.\"\n\tsecondCollection size = self size ifFalse: [self error: 'secondCollection must be the same size'].\n\tthirdCollection size = self size ifFalse: [self error: 'thirdCollection must be the same size'].\n\t1 to: self size do:\n\t\t[:index |\n\t\tthreeArgBlock value: (self at: index)\n\t\t\t\tvalue: (secondCollection at: index)\n\t\t\t\tvalue: (thirdCollection at: index)]! !\n\n!SequenceableCollection methodsFor: 'enumerating' stamp: 'ssa 5/28/2010 14:01'!\nwith: secondCollection with: thirdCollection withIndexDo: fourArgBlock \n\t\"Evaluate fourArgBlock with corresponding elements from this collection, secondCollection and thirdCollection.\"\n\tsecondCollection size = self size ifFalse: [self error: 'secondCollection must be the same size'].\n\tthirdCollection size = self size ifFalse: [self error: 'thirdCollection must be the same size'].\n\t1 to: self size do:\n\t\t[:index |\n\t\tfourArgBlock value: (self at: index)\n\t\t\t\tvalue: (secondCollection at: index)\n\t\t\t\tvalue: (thirdCollection at: index)\n\t\t\t\tvalue: index]! !\n\n!SequenceableCollection methodsFor: 'enumerating' stamp: 'ssa 5/28/2010 15:34'!\nwith: secondCollection withIndexDo: threeArgBlock \n\t\"Evaluate threeArgBlock with corresponding elements from this collection and secondCollection.\"\n\tsecondCollection size = self size ifFalse: [self error: 'secondCollection must be the same size'].\n\t1 to: self size do:\n\t\t[:index |\n\t\tthreeArgBlock value: (self at: index)\n\t\t\t\tvalue: (secondCollection at: index)\n\t\t\t\tvalue: index]! !\n\n!SequenceableCollection methodsFor: 'enumerating' stamp: 'ssa 1/20/2009 14:08'!\nwithout: anObject collect: aBlock \n\t\"Evaluate aBlock with each of the receiver's elements except anObject as the argument.  \n\tCollect the resulting values into a collection like the receiver. Answer  \n\tthe new collection.\"\n\n\t| newCollection  |\n\tnewCollection _ self species new: self size - 1.\n\t1 to: self size do:\n\t\t[:index |\n\t\tanObject = (self at: index) ifFalse:[newCollection add: (aBlock value: (self at: index))]].\n\t^ newCollection! !\n\n!SequenceableCollection methodsFor: 'enumerating' stamp: 'ssa 1/20/2009 14:11'!\nwithout: anObject select: aBlock \n\t\"Evaluate aBlock with each of the receiver's elements except anObject as the argument.  \n\tSelect the resulting values that pass into a collection like the receiver. Answer  \n\tthe new collection.\"\n\n\t| newCollection  item |\n\tnewCollection _ self species new: self size - 1.\n\t1 to: self size do:\n\t\t[:index |\n\t\titem _ self at:index.\n\t\t(anObject ~= item and:[aBlock value: item]) ifTrue:[newCollection add: item]].\n\t^ newCollection! !\n\n!SequenceableCollection methodsFor: 'testing' stamp: 'ssa 8/27/2009 12:44'!\nis: anObject after: anotherObject\n\n\t^(self indexOf: anObject)<(self indexOf: anotherObject)! !\n\n!SequenceableCollection methodsFor: '*connectors-enumerating' stamp: 'ssa 1/1/1970 00:18'!\ngroupsOfNoMoreThan: n atATimeDo: aBlock \n\t\"Evaluate aBlock with my elements taken n at a time. Handle leftovers at the end.\"\n\t| args remaining |\n\tn\n\t\tto: self size\n\t\tby: n\n\t\tdo: [:index | \n\t\t\targs := (self copyFrom: index - n + 1 to: index) asArray.\n\t\t\t aBlock value: args].\n\t(remaining _ self size \\\\ n)  = 0 ifFalse:[\"handle leftovers\"\n\t\targs := (self copyFrom: self size - remaining + 1 to: self size) asArray.\n\t\taBlock value: args]! !\n\n!SequenceableCollection methodsFor: '*packageinfo-base' stamp: 'ab 9/17/2002 01:02'!\ndo: aBlock displayingProgress: aString\n\taString\n\t\tdisplayProgressAt: Sensor cursorPoint\n\t\tfrom: 0 to: self size\n\t\tduring:\n\t\t\t[:bar |\n\t\t\tself withIndexDo:\n\t\t\t\t[:each :i |\n\t\t\t\tbar value: i.\n\t\t\t\taBlock value: each]]! !\n\n!SequenceableCollection methodsFor: '*Ly-Explorer' stamp: 'hg 9/7/2001 12:01'!\nexplorerContents\n\n\t^self asOrderedCollection withIndexCollect: [:value :index |\n\t\tObjectExplorerWrapper\n\t\t\twith: value\n\t\t\tname: index printString\n\t\t\tmodel: self]! !\n\n!Set methodsFor: '*RVM-Archiving'!\narchiveOn: aStream\n\n\taStream\n\t\tstoreObject: self;\n\t\tstoreClass: self class;\n\t\tstore: self size.\n\tself do: [:each | aStream nextPut: each]! !\n\n!Set methodsFor: '*Ly-Explorer' stamp: 'hg 9/7/2001 11:51'!\nexplorerContents \n\n\t^self asOrderedCollection withIndexCollect: [:each :index |\n\t\tObjectExplorerWrapper\n\t\t\twith: each\n\t\t\tname: index printString\n\t\t\tmodel: self]! !\n\n!Set class methodsFor: '*RVM-Archiving'!\ndearchiveFrom: aStream\n\n\t| anObject anInteger |\n\tanInteger _ aStream read: Integer.\n\tanObject _ self new: (anInteger * 2 max: 2).\n\taStream storeObject: anObject.\n\tanInteger timesRepeat:\n\t\t[anObject add: aStream next].\n\t^anObject! !\n\n!SimpleTestResource methodsFor: 'accessing'!\nrunningState\n\n\t^runningState! !\n\n!SimpleTestResource methodsFor: 'accessing'!\nrunningState: aSymbol\n\n\trunningState := aSymbol! !\n\n!SimpleTestResource methodsFor: 'running'!\nsetRun\n\thasRun := true! !\n\n!SimpleTestResource methodsFor: 'running'!\nsetUp\n\t\n\tself runningState: self startedStateSymbol.\n\thasSetup := true! !\n\n!SimpleTestResource methodsFor: 'running'!\nstartedStateSymbol\n\n\t^#started! !\n\n!SimpleTestResource methodsFor: 'running'!\nstoppedStateSymbol\n\n\t^#stopped! !\n\n!SimpleTestResource methodsFor: 'running'!\ntearDown\n\n\tself runningState: self stoppedStateSymbol! !\n\n!SimpleTestResource methodsFor: 'testing'!\nhasRun\n\t^hasRun! !\n\n!SimpleTestResource methodsFor: 'testing'!\nhasSetup\n\t^hasSetup! !\n\n!SimpleTestResource methodsFor: 'testing' stamp: ' 17/7/10 17:28'!\nisAvailable\n\t^self class allowAvailability\n\t\tand: [self runningState == self startedStateSymbol]! !\n\n!SimpleTestResource class methodsFor: 'accessing' stamp: ' 17/7/10 17:28'!\nallowAvailability\n\t^preventAvailability isNil! !\n\n!SimpleTestResource class methodsFor: 'accessing' stamp: 'nfr 1/3/2010 18:13'!\nrawCurrentForTest\n\t^current! !\n\n!SimpleTestResource class methodsFor: 'utility' stamp: ' 17/7/10 17:28'!\npreventAvailabilityDuring: aBlock\n\t\"Only setter of preventAvailability.\"\n\t\n\tpreventAvailability := false.\n\t^aBlock ensure: [preventAvailability := nil]! !\n\n!SimpleTestResourceA class methodsFor: 'accessing' stamp: 'nfr 1/3/2010 18:13'!\nresources\n\t^Array with: SimpleTestResourceA1 with: SimpleTestResourceA2! !\n\n!SimpleTestResourceB class methodsFor: 'accessing' stamp: 'nfr 1/3/2010 18:13'!\nresources\n\t^Array with: SimpleTestResourceA1 with: SimpleTestResourceB1! !\n\n!SimpleTestResourceCircular class methodsFor: 'accessing' stamp: 'nfr 1/3/2010 18:12'!\nresources\n\t^preventAvailability isNil\n\t\tifTrue: [super resources , (Array with: SimpleTestResourceA1)]\n\t\tifFalse:\n\t\t\t[super resources\n\t\t\t\t, (Array with: SimpleTestResourceA1 with: SimpleTestResourceCircular1)]! !\n\n!SimpleTestResourceCircular1 class methodsFor: 'accessing' stamp: 'nfr 1/3/2010 18:12'!\nresources\n\t\"Circular prereq:  C wants C1 which wants C.\"\n\t\n\t^Array with: SimpleTestResourceCircular! !\n\n!SimpleTestResourceTestCase methodsFor: 'not categorized'!\ntestResourceInitRelease\n\t| result suite error failure |\n\tsuite := TestSuite new.\n\tsuite addTest: (error := self class selector: #error).\n\tsuite addTest: (failure := self class selector: #fail).\n\tsuite addTest: (self class selector: #dummy).\n\tresult := suite run.\n\tself assert: resource hasSetup\n\t\t\t! !\n\n!SimpleTestResourceTestCase methodsFor: 'running' stamp: ' 17/7/10 17:28'!\nsetUp\n\t\"Ensure that we error, not just fail, if resource is nil so that #should:raise: checks cannot mistake such an error for what they are trapping.\"\n\t\n\tresource := SimpleTestResource rawCurrentForTest.\n\tself\n\t\tdeny: resource isNil\n\t\tdescription: 'SimpleTestResource has no current value in test'.\n\tself\n\t\tassert: resource class == SimpleTestResource\n\t\tdescription: 'SimpleTestResource current is not an instance of itself'.\n\tself\n\t\tassert: resource hasSetup\n\t\tdescription: 'This test uses a resource but it was not set up'! !\n\n!SimpleTestResourceTestCase methodsFor: 'running' stamp: 'nfr 1/3/2010 18:09'!\ntestDebugTestWithResource\n\t\"The debug will raise an error if the resource is not set up properly.\"\n\t\n\tself clearOuterResourceStateDuring: [(self class selector: #setRun) debug]! !\n\n!SimpleTestResourceTestCase methodsFor: 'running' stamp: 'NiallRoss 7/18/2010 12:28'!\ntestResourceCollection\n\tself assert: self class buildSuiteFromSelectors resources size = self resources size\n\t\tdescription: 'The suite should have the same number of resources as its test'.\n\tself class buildSuiteFromSelectors resources do:\n\t\t[:each |\n\t\tself assert: (self resources includes: each)\n\t\t\tdescription: each name , ':  I have this resource but my suite does not'].! !\n\n!SimpleTestResourceTestCase methodsFor: 'running' stamp: 'NiallRoss 7/18/2010 12:30'!\ntestRunSuiteWithResource\n\t| suite |\n\tsuite := TestSuite new.\n\tsuite addTest: (SimpleTestResourceTestCase selector: #error).\n\tsuite addTest: (SimpleTestResourceTestCase selector: #fail).\n\tsuite addTest: (self class selector: #dummy).\n\tself clearOuterResourceStateDuring:\n\t\t[self\n\t\t\tassert: suite run printString = '3 run, 1 passes, 0 expected failures, 1 failures, 1 errors, 0 unexpected passes'\n\t\t\tdescription: 'A suite of tests needing SimpleTestResource did not run as expected'].! !\n\n!SimpleTestResourceTestCase methodsFor: 'running' stamp: 'NiallRoss 7/18/2010 12:31'!\ntestRunTestWithResource\n\tself clearOuterResourceStateDuring:\n\t\t[self\n\t\t\tassert: (self class selector: #dummy) run printString =\n\t\t\t\t\t\t\t'1 run, 1 passes, 0 expected failures, 0 failures, 0 errors, 0 unexpected passes'\n\t\t\tdescription: 'A dummy test that needed a resource did not pass']! !\n\n!SimpleTestResourceTestCase methodsFor: 'utility' stamp: 'NiallRoss 7/18/2010 11:53'!\nclearOuterResourceStateDuring: aBlock\n\t\"This self-testing test must clear the outer state of its resources before starting and after finishing, so that it can construct test cases and suites of itself and test them.\"\n\t\n\tself\n\t\tassert: SimpleTestResource isAlreadyAvailable\n\t\tdescription: 'The resource was not set up for the test'.\n\tSimpleTestResource reset.\n\tself\n\t\tdeny: SimpleTestResource isAlreadyAvailable\n\t\tdescription: 'The resource was still set up before we began the run'.\n\t^aBlock\n\t\tensure:\n\t\t\t[self\n\t\t\t\tdeny: SimpleTestResource isAlreadyAvailable\n\t\t\t\tdescription: 'The resource was still set up after we finished the run'.\n\t\t\tSimpleTestResource isAvailable.\n\t\t\tself\n\t\t\t\tassert: SimpleTestResource isAlreadyAvailable\n\t\t\t\tdescription: 'The resource was not set up again after the test']! !\n\n!SimpleTestResourceTestCase methodsFor: 'private' stamp: 'BaseSystem 8/30/2009 09:40'!\ndummy\n\tself assert: resource hasSetup\n\t\tdescription: 'This test uses a resource but it was not set up'.\n\tself setRun.\n\tself assert: resource hasRun\n\t\tdescription: 'This test uses a resource but we could not interact with it'.! !\n\n!SimpleTestResourceTestCase methodsFor: 'private' stamp: 'BaseSystem 8/30/2009 09:40'!\nerror\n\t'foo' odd! !\n\n!SimpleTestResourceTestCase methodsFor: 'private' stamp: 'BaseSystem 8/30/2009 09:40'!\nfail\n\tself assert: false! !\n\n!SimpleTestResourceTestCase methodsFor: 'private' stamp: 'BaseSystem 8/30/2009 09:40'!\nsetRun\n\tresource setRun! !\n\n!SimpleTestResourceTestCase class methodsFor: 'accessing' stamp: 'BaseSystem 8/30/2009 09:40'!\nresources\n\t^Array with: SimpleTestResource! !\n\n!SimpleTestResourceTestCase class methodsFor: 'history' stamp: 'AdrianLienhard 10/19/2009 10:49'!\nlastStoredRun\n\t^ ((Dictionary new) add: (#passed->((Set new) add: #testResourceInitRelease; add: #testResourcesCollection; yourself)); add: (#timeStamp->'22 November 2008 10:11:35 pm'); add: (#failures->((Set new))); add: (#errors->((Set new))); yourself)! !\n\n!Sly class methodsFor: 'testing' stamp: 'dmu 8/27/2010 13:38'!\nisSlySelector: aSelector\n\t\"True if its has SlySelectorModifers\"\n\t^(aSelector beginsWith: SlySelectorModifier asAWhole)\n\t\tor:[(aSelector includesSubString: SlySelectorModifier adverbColon)\n\t\tor:[aSelector includesSubString: SlySelectorModifier gerundColon]]! !\n\n!Sly class methodsFor: 'user interfacing' stamp: 'dmu 8/27/2010 14:15'!\ndashboard \n\t\"Sly dashboard      \"   \n\t| topView  buttons lastView subViewCount |\n\ttopView := RVMStandardSystemView new  .\n\ttopView borderWidth:1. \n\tbuttons _ {\n\t\tTranscript showInConsoleSwitch.\n\t\tself keepFlyingSwitch.\n\t\tRVMButtonView label:'[ SlyBoids new run ] fork' \n\t\t\t\t\taction:[[ SlyBoids new run ] fork].\n\t\tRVMButtonView label:'Restore normal cursor' \n\t\t\t\t\taction:[Cursor normal show].\n\t\tRVMButtonView label:'process browser' \n\t\t\t\t\taction:[ProcessBrowser  open].\n\t\tRVMButtonView label: 'SlySyntaxTests runAll'\n\t\t\t\t\taction: [SlySyntaxTests runAll].\n\t}.\n\tlastView _ nil.\n\tbuttons do:[:view| topView addSubView: view below: lastView.\n\t\tlastView _ view].\n\ttopView label: 'Sly'.\n\tsubViewCount _ topView subViews size.\n\ttopView minimumSize: 165@(subViewCount*27).\n\ttopView maximumSize: topView minimumSize.\n\ttopView controller open! !\n\n!Sly class methodsFor: 'user interfacing' stamp: 'dmu 8/30/2010 10:44'!\nkeepFlyingSwitch\n\t\"Sly3 keepFlyingSwitch demo\"\n\t^RVMCheckBoxView on: self label: 'Keep SlyBoids Flying' \n\t\t\t\t\t\tcheckState: [Sly3 keepFlying] \n\t\t\t\t\t\twhenChecked: [Sly3 keepFlying:true] \n\t\t\t\t\t\twhenUnchecked: [Sly3 keepFlying:false].! !\n\n!Sly class methodsFor: 'accessing' stamp: 'ssa 3/25/2010 16:29'!\nkeepFlying\n\n\tKeepFlying isNil ifTrue:[KeepFlying _ true].\n\t^KeepFlying! !\n\n!Sly class methodsFor: 'accessing' stamp: 'ssa 3/25/2010 16:32'!\nkeepFlying: aBoolean\n\n\tKeepFlying _ aBoolean! !\n\n!Sly class methodsFor: 'accessing' stamp: 'ssa 3/25/2010 16:32'!\ntoggleKeepFlying\n\n\tself keepFlying: self keepFlying not! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/12/2010 10:58'!\nactualSelector\n\t\"Answer the value of actualSelector\"\n\n\tactualSelector isNil ifTrue:[self determineActualSelector].\n\t^ actualSelector! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 7/16/2010 19:19'!\nactualSelector: anObject\n\t\"Set the value of actualSelector\"\n\n\tactualSelector _ anObject asSymbol.\n\t\t\"(actualSelector = #readStream) ifTrue:[self halt:'FOUND IT!!']\"! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 7/16/2010 19:34'!\nargumentAdverbs\n\t\"Answer the value of argumentAdverbs\"\n\n\targumentAdverbs isNil ifTrue:[self argumentAdverbs: \"OrderedCollection new \"(self arguments collect:[:e| nil])].\n\t^ argumentAdverbs! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 4/20/2010 16:19'!\nargumentAdverbs: anObject\n\t\"Set the value of argumentAdverbs\"\n\n\targumentAdverbs _ anObject! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/28/2010 14:23'!\nargumentSources\n\t\"Answer the value of argumentSources\"\n\n\targumentSources isNil ifTrue:[self argumentSources: Dictionary new].\n\t^ argumentSources! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/28/2010 14:23'!\nargumentSources: anObject\n\t\"Set the value of argumentSources\"\n\n\targumentSources _ anObject! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/28/2010 15:41'!\narguments\n\t\"Answer the value of arguments\"\n\n\targuments isNil ifTrue:[self arguments: self  originalArguments].\n\t^ arguments! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 6/1/2010 16:30'!\narguments: anObject\n\t\"Set the value of arguments\"\n\n\targuments _ anObject asOrderedCollection! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 7/14/2010 13:50'!\nexecutingSerially\n\t\"Answer the value of executingSerially\"\n\n\texecutingSerially isNil ifTrue:[self executingSerially: false].\n\t^ executingSerially! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 7/14/2010 13:50'!\nexecutingSerially: anObject\n\t\"Set the value of executingSerially\"\n\n\texecutingSerially _ anObject! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 6/1/2010 16:27'!\ngerund\n\t\"Answer the value of gerund, nil, a #symbol, or a block\"\n\n\tgerund isNil ifTrue:[self gerund: nil].\n\t^ gerund! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 6/1/2010 16:27'!\ngerund: anObject\n\t\"Set the value of gerund\"\n\n\tgerund _ anObject! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 6/1/2010 16:27'!\nhasGerund\n\t\"Answer true if we have a gerund\"\n\n\t^self gerund notNil! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 8/27/2010 14:28'!\nisAsAWhole\n\t\"Answer the value of isAsAWhole\"\n\n\tisAsAWhole isNil ifTrue:[self isAsAWhole: false].\n\t^ isAsAWhole! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 8/27/2010 14:28'!\nisAsAWhole: anObject\n\t\"Set the value of isAsAWhole\"\n\n\tisAsAWhole _ anObject! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 3/28/2010 23:04'!\nmembers\n\t\"Answer the value of members\"\n\n\tmembers isNil ifTrue:[self members: nil].\n\t^ members! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 3/28/2010 23:04'!\nmembers: anObject\n\t\"Set the value of members\"\n\n\tmembers _ anObject! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 3/28/2010 23:04'!\nmessage\n\t\"Answer the value of message\"\n\n\tmessage isNil ifTrue:[self message: nil].\n\t^ message! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 8/27/2010 15:55'!\nmessage: anObject\n\t\"Set the value of message\"\n\n\tmessage _ anObject.\n\t\"force initialization\"\n\tself arguments.! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 4/20/2010 16:19'!\nmessageAdverb\n\t\"Answer the value of messageAdverb\"\n\n\tmessageAdverb isNil ifTrue:[self messageAdverb: nil].\n\t^ messageAdverb! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 4/20/2010 16:19'!\nmessageAdverb: anObject\n\t\"Set the value of messageAdverb\"\n\n\tmessageAdverb _ anObject! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/12/2010 16:08'!\nmessageEnvelopes: anObject\n\t\"Set the value of messageEnvelopes\"\n\n\tmessageEnvelopes _ anObject! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/12/2010 15:28'!\noriginalArguments\n\n\t^ self message arguments! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 4/20/2010 16:22'!\noriginalSelector\n\t\"Answer the value of originalSelector\"\n\n\toriginalSelector isNil ifTrue:[self originalSelector: self message selector].\n\t^ originalSelector! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 7/16/2010 18:48'!\noriginalSelector: anObject\n\t\"Set the value of originalSelector\"\n\"anObject = #selector ifTrue:[self halt].\"    \"useful for debugging\"\n\tTranscript cr;show:'Dispatching #',anObject.\n\toriginalSelector _ anObject ! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/12/2010 19:32'!\nrandomNumberSource\n\n\tRandomNumberSource isNil ifTrue:[RandomNumberSource _ Random new].\n\t^RandomNumberSource! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/28/2010 14:36'!\nreceiverSource\n\t\"Answer the value of receiverSource\"\n\n\treceiverSource isNil ifTrue:[self receiverSource: self determineReceiverSource].\n\t^ receiverSource! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/28/2010 14:35'!\nreceiverSource: anObject\n\t\"Set the value of receiverSource\"\n\n\treceiverSource _ anObject! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/28/2010 14:41'!\nreceivers\n\t\"Answer the value of receivers\"\n\n\treceivers isNil ifTrue:[self receivers: self determineReceivers].\n\t^ receivers! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/28/2010 14:41'!\nreceivers: anObject\n\t\"Set the value of receivers\"\n\n\treceivers _ anObject! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/11/2010 11:11'!\nreturn\n\t\"Answer the value of return\"\n\n\tself halt:'Special case...hould never access this way'.\n\treturn isNil ifTrue:[self return: nil].\n\t^ return! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/28/2010 16:54'!\nrobinCount\n\t\"Answer the value of robinCount\"\n\n\trobinCount isNil ifTrue:[self robinCount: 0].\n\t^ robinCount! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/28/2010 16:54'!\nrobinCount: anObject\n\t\"Set the value of robinCount\"\n\n\trobinCount _ anObject! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 8/27/2010 14:29'!\nsetAsAWhole\n\n\tself isAsAWhole: true! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 8/27/2010 16:00'!\ntheEnsemble\n\t\"Answer the value of theEnsemble\"\n\t^ theEnsemble! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 8/27/2010 16:00'!\ntheEnsemble: anObject\n\t\"Set the value of theEnsemble\"\n\n\ttheEnsemble _ anObject! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/28/2010 15:16'!\nusingRoundRobin\n\t\"Answer the value of usingRoundRobin\"\n\n\tusingRoundRobin isNil ifTrue:[self usingRoundRobin: self determineRoundRobin].\n\t^ usingRoundRobin! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/28/2010 14:47'!\nusingRoundRobin: anObject\n\t\"Set the value of usingRoundRobin\"\n\n\tusingRoundRobin _ anObject! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'applying adverbs' stamp: 'ssa 5/28/2010 14:26'!\napplyAdverb: adverb toArgument: argument inEnvelope: envelope\n\t\"Answer the final argument to send with the message being dispatched via this envelope.\n\tCommon cases are \n\t\t#wholly (batch all args to each member with the message)\n\t\t#singly (distributed arguments one-to-one over members).  Issue here with count mismatch.\n\t\t#roundly (distribute args over members round-robin fashion, repeating members as needed.  Think of members here as a Resource Pool.  This will require collaboration with any message adverbs.\n\t\t#duplicatively (each member gets a copy of the arguments).\n\n\tDefault case is #wholly\"\n\n\tadverb isSymbol ifTrue:[^self perform: ('ARG',adverb,':inEnvelope:') asSymbol  with: argument with: envelope].\n\tadverb isBlock ifTrue:[^ adverb value: argument value: envelope].\n\tself error:'adverbs can only be unarySelectors or Blocks at this point'! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'applying adverbs' stamp: 'ssa 5/28/2010 17:04'!\ndetermineArgumentsForEachReceiver\n\t\"Support for argument adverbs that allow arguments to be distributed/shared/paired/etc across members.\"\n\t\n\t| finalArg |\n\tself messageEnvelopes  do:[:env|\n\t\tself arguments with: self argumentAdverbs \n\t\t\twithIndexDo:[:arg :adv :index|\n\t\t\t\tfinalArg _ adv isNil \n\t\t\t\t\tifTrue: [arg]\n\t\t\t\t\tifFalse:[\"use adverb to determine and process the argument\"\n\t\t\t\t\t\tself applyAdverb: adv toArgument: arg inEnvelope: env].\n\t\t\t\tenv message arguments at: index put: finalArg]]\n\t\t\t! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'applying adverbs' stamp: 'ssa 7/16/2010 19:35'!\ndetermineRoundRobin\n\t\"Do any of my argument adverbs imply a round-robin use of my receivers?\"\n\tself argumentAdverbs isEmpty ifTrue:[^false].\n\tself argumentAdverbs with: self arguments do:[:adv :arg| \n\t\tadv = #roundly ifTrue:[self robinCount: arg ENSsize. ^true]].\n\t^false! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'applying adverbs' stamp: 'ssa 5/12/2010 19:51'!\ndetermineSelectorForEachReceiver\n\t\"Support for message adverbs that allow members to modify the message selector being sent.\n\tExpect this case rarely.  Implement later.\n\tDefault case is to use the actualSelector\"\n\tself messageEnvelopes do:[:each| each message selector: self actualSelector]! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'applying adverbs' stamp: 'ssa 5/12/2010 19:27'!\nreceiversForAdverb: anAdverb\n\t\"Answer the (sub)set of my members to send a message to based on this adverb\"\n\t\n\tanAdverb isSymbol ifTrue:[^self perform: anAdverb].\n\tanAdverb isArray ifTrue:[^self perform: anAdverb first withArguments: anAdverb allButFirst].\n\tanAdverb isBlock ifTrue:[^anAdverb value: self members].\n\tself error:'Expected a #symbol or aBlock for an adverb'! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'applying gerunds' stamp: 'ssa 5/11/2010 16:38'!\nanding:results\n\t\"AND the elements in results and return the result.\n\tAssumes these elements understand &.\"\n\t\n\t| result |\n\tresults isEmpty ifTrue:[self error:'No members, how should we handle?  proceed for nil'.  ^nil].\n\tresult _ results first.\n\tresults allButFirst do:[:each| result _ each & result].\n\t^result! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'applying gerunds' stamp: 'ssa 7/7/2010 22:06'!\napplyGerundTo: results\n\t\"use the gerund that was supplied by the sender to post-process the results of the message.\n\tALL gerund processing starts here\"\n\t\n\tself gerund isSymbol ifTrue:[^self perform: self gerund asKeyword with: results].\n\tself gerund isBlock ifTrue:[^ gerund value: results].\n\tself error:'gerunds can only be unarySelectors or Blocks at this point'! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'applying gerunds' stamp: 'ssa 5/11/2010 15:47'!\naveraging:results\n\t\"Average the elements in results and return the result.\n\tAssumes these elements understand +.\"\n\t\n\t| sum |\n\tresults isEmpty ifTrue:[self error:'No members, how should we handle?  proceed for nil'.  ^nil].\n\tsum _ self totalling: results.\n\t^sum / results size! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'applying gerunds' stamp: 'ssa 5/11/2010 15:35'!\nconcatenating: results\n\t\"Concatenate each element in results and return the result.\n\tAssumes these elements are collections of some kind.\"\n\t\n\t| result |\n\tresults isEmpty ifTrue:[self error:'No members, how should we handle?  proceed for nil'.  ^nil].\n\tresult _ results first.\n\tresults allButFirst do:[:each| result _ result , each].\n\t^result! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'applying gerunds' stamp: 'ssa 5/11/2010 16:39'!\noring:results\n\t\"OR the elements in results and return the result.\n\tAssumes these elements understand |.\"\n\t\n\t| result |\n\tresults isEmpty ifTrue:[self error:'No members, how should we handle?  proceed for nil'.  ^nil].\n\tresult _ results first.\n\tresults allButFirst do:[:each| result _ each | result].\n\t^result! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'applying gerunds' stamp: 'ssa 5/11/2010 15:41'!\ntotalling:results\n\t\"Sum the elements in results and return the result.\n\tAssumes these elements understand +.\"\n\t\n\t| result |\n\tresults isEmpty ifTrue:[self error:'No members, how should we handle?  proceed for nil'.  ^nil].\n\tresult _ 0.\n\tresults do:[:each| result _ each + result].\n\t^result! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'argument adverbs' stamp: 'ssa 5/28/2010 14:27'!\nARGReadMe\n\t\"Argument adverbs set policies/strategies for how arguments participate in ensemble messages to the members.\n\tThe ARG selector prefix is used to separate possible naming conflicts between message adverbs and argument adverbs.  All argument adverbs found in a selector will get prefixed with ARG before being called.\n\tAll argument adverb methods should begin with ARG \n\t\tand be of the form 'ARGadverbName: origArg inEnvelope: envelope'\"! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'argument adverbs' stamp: 'ssa 5/28/2010 14:26'!\nARGduplicatively: originalArgument inEnvelope: envelope\n\t\"Each message uses a copy of the original argument\"\n\t^originalArgument copy! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'argument adverbs' stamp: 'ssa 5/28/2010 14:51'!\nARGroundly: originalArgument inEnvelope: envelope\n\t\"Each message uses one of the argument elements.  Reuse receivers as needed in round-robin fashion.  \"\n\t^self nextArgumentFromSource: originalArgument ifAtEnd:[^self]\n\t! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'argument adverbs' stamp: 'ssa 5/28/2010 14:11'!\nARGwholly: originalArgument inEnvelope: envelope\n\t\"Each message uses original argument\"\n\t^originalArgument! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'receiver sourcing' stamp: 'ssa 5/28/2010 14:46'!\ndetermineReceiverSource\n\t\"Answer the stream(like) object that serves up my receivers\"\n\tself usingRoundRobin ifTrue:[^RVMCircularCollection withAll: self receivers].\n\t^self receivers readStream! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'receiver sourcing' stamp: 'ssa 5/28/2010 14:42'!\ndetermineReceivers\n\t\"identify the (sub)set of my members that will actually be sent a message.\n\tThis can change based on message adverbs (completely, randomly, stochastically:aProbability, selectively:aBooleanBlock, aBlock etc)\n\tand argument adverbs (singly, aBlock, etc)\"\n\t\n\t\"only handle message adverbs for now, otherwise default to all members\"\n\t^self hasMessageAdverb \n\t\tifTrue:[self receiversForAdverb: self messageAdverb]\n\t\tifFalse:[self members asOrderedCollection].\n! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'receiver sourcing' stamp: 'ssa 5/28/2010 14:35'!\nnextReceiver\n\t\"Answer the next receiver from a stream set up over my receivers.\n\tThis stream will be linear in normal cases and circular in #roundly(round-robin) cases\"\n\t\n\t| source |\n\tsource _ self receiverSource.\n\tsource atEnd ifTrue:[self error:'not enough receivers!!'].\n\t^source next! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'argument sourcing' stamp: 'ssa 5/28/2010 14:50'!\nnextArgumentFromSource: argument\n\t\"Answer the next element from a stream set up over argument.\n\tNOTE: this implementation assumes that the argument source understands #readStream.\n\tMay want to have an alternative version passing in a block to do the stream creation\"\n\n\t^self nextArgumentFromSource: argument ifAtEnd: [self error:'not enough argument elements for members'].\n! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'argument sourcing' stamp: 'ssa 7/16/2010 19:28'!\nnextArgumentFromSource: argument ifAtEnd: aBlock\n\t\"Answer the next element from a stream set up over argument.\n\tNOTE: this implementation assumes that the argument source understands #readStream.\n\tMay want to have an alternative version passing in a block to do the stream creation\"\n\t\n\t| source |\n\tsource _ self argumentSources \n\t\t\tat: argument \n\t\t\tifAbsentPut:[argument ENSisEnsemble\n\t\t\t\t\t\tifTrue:[argument ENSmembers readStream]\n\t\t\t\t\t\tifFalse:[argument readStream]].\n\tsource atEnd ifTrue:[aBlock value].\n\t^source next! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'dispatching' stamp: 'dmu 8/27/2010 14:30'!\ndispatch\n\t|   results |\n\t\"NOTE: using non-local return to allow immediate exit from this method upon return determination\"\n\treturn _ [:result | ^ result].\n\t\"(self originalSelector endsWith:'equals:') ifTrue:[self halt].\"\n\tself  determineActualSelector.  \"gets selector to send to members and finds adverbs, gerunds and ENS\"\n\tself isAsAWhole ifTrue:[self tryReflectiveMessages ].\n\tself onlyHasGerund ifTrue:[self return: (self applyGerundTo: self members)].\n\tresults _ self sendMessageToMembersModeratedByAdverbs.\n\tself hasGerund ifTrue:[self return: (self applyGerundTo: results)].\n\tself returnEnsembleContaining: results \n! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'dispatching' stamp: 'dmu 3/29/2010 00:01'!\nreturn: r\n\treturn value: r! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'dispatching' stamp: 'dmu 8/27/2010 16:04'!\nreturnEnsembleContaining: membersOfResult\n\n\t\"self return: ((self theEnsemble perform: #ensembleSpecies) with: membersOfResult)\"\n\t\n\tself return: (SlyEnsemble with: membersOfResult)\n! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'reflection' stamp: 'dmu 8/27/2010 15:56'!\nOLDtryReflectiveMessages\n\t| reflectiveMessages r |\n\tself actualSelector = #members ifTrue:[self return: self members].\n\tself actualSelector = #size ifTrue:[self return: self members size].\n\tself actualSelector = #inspect ifTrue:[self return: self theEnsemble mirror inspect].\n\tself actualSelector = #storeString ifTrue:[self return: self storeStringForMyEnsemble].\n\tself actualSelector = #printString ifTrue:[self return: self storeStringForMyEnsemble].\n\tself actualSelector = #printOn: ifTrue:[self return: (self originalArguments first nextPutAll: self storeStringForMyEnsemble)].\n\treflectiveMessages _ #( #isNil #isNotNil #isKindOf:  #isInMemory #pointsTo: #nextObject  #mustBeBooleanIn: #class #inspect #explore #hash #printString #printOn:).\n\t(reflectiveMessages includes: self actualSelector)   ifTrue: [\n\t\t0 primitiveSetExtraPreheaderWord:  self theEnsemble.\n\t\tr _ self theEnsemble perform: self actualSelector asSymbol withArguments: self originalArguments.\n\t\tself members primitiveSetExtraPreheaderWord:  self theEnsemble.\n\t\tself return: r\n\t].! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'reflection' stamp: 'dmu 8/27/2010 15:56'!\ntryReflectiveMessages\n\t\"disable messaging dispatching to members and just send it to the ensemble object itself\"\n\t| result |\n\t0 primitiveSetExtraPreheaderWord:  self message lookupClass \"was theEnsemble\".\n\tresult _ self theEnsemble perform: self actualSelector asSymbol withArguments: self originalArguments.\n\tself theEnsemble members: self theEnsemble members.  \"force preheader update\"\n\tself return: result! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'ensemble behavior' stamp: 'ssa 6/17/2010 10:12'!\nstoreStringForMyEnsemble\n\t\"Answer a string that should compile back into an ensemble like me\"\n\t| out |\n\tout _ WriteStream on:''.\n\tout nextPutAll:'%{'.\n\tself members  do:[:mem|\n\t\tmem storeOn: out.\n\t\tout nextPutAll:'. '].\n\tout nextPutAll:'}'.\n\t^out contents! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'member messaging' stamp: 'ssa 5/28/2010 17:08'!\ndetermineEnvelopes\n\t\"Determine the number of envelopes needed and create them.\n\tNOTE: #roundly argument adverb will impact this number\"\n\tself usingRoundRobin \n\t\tifFalse:[self receivers do:[:each|\n\t\t\t\tself messageEnvelopes add: (SlyMessageEnvelope  \n\t\t\t\t\t\t\t\t\t\t\treceiver: each \n\t\t\t\t\t\t\t\t\t\t\tselector: self actualSelector \n\t\t\t\t\t\t\t\t\t\t\targuments: self arguments asArray copy)]]\n\t\tifTrue:[self robinCount timesRepeat:[\n\t\t\t\tself messageEnvelopes add: (SlyMessageEnvelope  \n\t\t\t\t\t\t\t\t\t\t\treceiver: self nextReceiver \n\t\t\t\t\t\t\t\t\t\t\tselector: self actualSelector \n\t\t\t\t\t\t\t\t\t\t\targuments: self arguments asArray copy)]]! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'member messaging' stamp: 'ssa 7/8/2010 00:43'!\nsendMessageToMembersModeratedByAdverbs\n\t\"default behavior when no adverbs found in message\"\n\tself hasAdverbs ifFalse:[  self actualSelector = #members ifTrue:[self halt:'should never dispatch #members to members'].\n\t\t^self members parallelCollect: [:elem| elem perform: self actualSelector withArguments: self arguments asArray]].\n\t\n\t\"now handle the general case for all possible adverbs\"\n\tself determineEnvelopes.\n\tself determineSelectorForEachReceiver.\n\tself determineArgumentsForEachReceiver.\n\tself relocateReceiversIfNeeded.\n\tself relocateArgumentsIfNeeded.\n\t^self sendMessages! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'member messaging' stamp: 'ssa 7/14/2010 13:49'!\nsendMessages\n\t\"Deliver the message envelopes and collect results.\n\tThis must eventually handle adverbs for timing and recurring messages, determining when the ensemble message is 'done'. etc.\n\tFor now, do the simplest thing, a parallelCollect:\"\n\t\n\t\"check for serially flag and handle appropriately\"\n\t^self executingSerially \n\t\tifTrue:[self messageEnvelopes collect:[:env| env deliver]]\n\t\tifFalse:[self messageEnvelopes parallelCollect: [:env| env deliver]]! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'message adverbs' stamp: 'ssa 5/27/2010 14:36'!\ncompletely\n\t\"A message level adverb indicating all members are to receive the message\"\n\t^self members! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'message adverbs' stamp: 'ssa 5/12/2010 19:35'!\nexclusively: aBlock \n\t\"A message level adverb indicating to exclude certain members from receiving the message\"\n\t^self rejectively: aBlock! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'message adverbs' stamp: 'ssa 5/12/2010 19:36'!\ninclusively: aBlock \n\t\"A message level adverb indicating to include certain members for receiving the message\"\n\t^self selectively: aBlock! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'message adverbs' stamp: 'ssa 5/12/2010 19:37'!\nrandomly\n\t\"A message level adverb indicating one member at random to receive the message\"\n\t^self randomly: 1! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'message adverbs' stamp: 'ssa 5/27/2010 10:42'!\nrandomly: n\n\t\"A message level adverb indicating n members at random to receive the message\"\n\t| remainders chosen picked |\n\tremainders _ self members asOrderedCollection.\n\tchosen _ OrderedCollection new.\n\tn timesRepeat:[ remainders isEmpty ifTrue:[^chosen].\n\t\tchosen add: (picked _ remainders atRandom).\n\t\tremainders remove: picked].\n\t^chosen! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'message adverbs' stamp: 'dmu 8/27/2010 15:56'!\nreflectively\n\t\"A message level adverb indicating the ensemble itself is to receive the message.\n\tThis duplicates the ENS prefix protocol using message adverbs to make it possible for programmatic\n\treflective messaging without hacking the selector.\n\tThis approach has the effect of making the ensemble itself appear as the single member of an ensemble\"\n\t^self theEnsemble! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'message adverbs' stamp: 'ssa 5/12/2010 19:35'!\nrejectively: aBlock \n\t\"A message level adverb indicating to exclude certain members from receiving the message\"\n\t^self members reject: aBlock! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'message adverbs' stamp: 'ssa 5/12/2010 19:36'!\nselectively: aBlock \n\t\"A message level adverb indicating to select certain members to receive the message\"\n\t^self members select: aBlock! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'message adverbs' stamp: 'ssa 7/14/2010 13:55'!\nserially\n\t\"Execute this message serially to all my members.\n\tThis is a hack since currently all message adverbs must return the members to make envelopes for\"\n\tself executingSerially:true.\n\t^self members! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'message adverbs' stamp: 'ssa 6/1/2010 16:38'!\nstochastically: aProbability\n\t\"A message level adverb indicating some probalilty (0.0-1.0) for each members to receive the message\"\n\t^self members select:[:each| self randomNumberSource next <= aProbability]! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'relocating' stamp: 'ssa 5/27/2010 11:28'!\nrelocateArgumentsIfNeeded\n\t\"Supports argument adverbs that desire to be in special core locations relative to each other or to their receiving members.\n\tExamples:\n\t\t#locally (same core)\n\t\t#globally (anywhere is fine)\n\t\t#closely (nearby cores)\n\t\t#distantly (on distant cores from each other.  may need a parameter here for Manhattan distance apart)\n\t\t#evenly (spread over cores so each core has same number)\n\t\t#statically (don't relocate under any circumstances)\n\tDefault case is #globally, i.e., no relocation.\n\tOthers to be implemented later.\"\n\t\n\t\t! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'relocating' stamp: 'ssa 5/27/2010 11:28'!\nrelocateReceiversIfNeeded\n\t\"Supports message adverbs that desire to have member in special core locations relative to each other or to arguments.\n\tExamples:\n\t\t#locally (same core)\n\t\t#globally (anywhere is fine)\n\t\t#closely (nearby cores)\n\t\t#distantly (on distant cores from each other.  may need a parameter here for Manhattan distance apart)\n\t\t#evenly (spread over cores so each core has same number)\n\t\t#statically (don't relocate under any circumstances)\n\tDefault case is #globally, i.e., no relocation.\n\tOthers to be implemented later.\"\n\t\n\t\t! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'selector deconstruction' stamp: 'dmu 8/27/2010 14:30'!\ndetermineActualKeywordSelector\n\t\"Answer the selector to actually send to the members, with all the LY/ING/ENS stuff removed\n\tCases follow at end of method\"\n\t\n\t| orig actual |\n\torig _ self originalSelector.\n\tactual _ orig copy asString.\n\t(orig beginsWith: SlySelectorModifier asAWhole)  \n\t\tifTrue:[self setAsAWhole.  \n\t\t\tactual _ actual withoutFirst: SlySelectorModifier asAWholeSize].\n\t((actual includesSubString: SlySelectorModifier adverbColon) or:\n\t  [actual includesSubString: SlySelectorModifier gerundColon]) \n\t\tifFalse:[^actual ]\n\t\tifTrue:[self isAsAWhole ifTrue:[self error:'reflective ENS sends can''t have adverbs or gerunds'].\n\t\t\t\"handle gerund case\"\n\t\t\t(actual last: SlySelectorModifier gerundColonSize)= SlySelectorModifier gerundColon\n\t\t\t\tifTrue:[self gerund: self arguments removeLast.\n\t\t\t\t\tactual _ actual withoutLast: SlySelectorModifier gerundColonSize.\n\t\t\t\t\t].\n\t\t\t\"handle adverb cases\"\n\t\t\t^(actual includesSubString: SlySelectorModifier adverbColon) ifTrue:[self handleAdverbKeywordIn: actual]\n\t\t\t\tifFalse:[actual].\n\t\t\t]\n\t\n\n\t\"Cases:\n\t\tNormal Smalltalk support:\n\t\t+   => +\n\t\tunary  =>  unary\n\t\tkeyword:  => keyword:\n\t\t\n\t\tAdverb support:\n\t\tunaryLY:   =>   unary\n\t\tLY:keyword:    =>   keyword:\n\t\tLY:keyword:LY:   =>   keyword:\n\t\tLY:keyword:LY:keyword:keyword:   =>   keyword:keyword:keyword:\n\t\tLY:keyword:LY:keyword:LY:keyword:   =>   keyword:keyword:keyword:\n\t\tLY:keyword:LY:keyword:LY:keyword:LY:   =>   keyword:keyword:keyword:\n\t\tLY:keyword:keyword:LY:keyword:LY:   =>   keyword:keyword:keyword:\n\t\tetc., strip all LY:s\n\t\t\n\t\tGerund (reducer) support:\n\t\tunaryING:  => unary\n\t\tkeyword:ING:   => keyword:\n\t\tkeyword:keyword:keyword:keyword:ING:  =>  keyword:keyword:keyword:keyword:\n\t\tetc., strip all ING:s, though there should only be one per selector\n\t\t\n\t\tDotDot, reflective send support:\n\t\tENSunary  => unary\n\t\tENSkeyword:  =>  keyword:\n\t\tENSkeywordLY:  =>  error, smae with ING\n\t\t\"\n\t\t! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'selector deconstruction' stamp: 'ssa 5/12/2010 15:51'!\ndetermineActualSelector\n\t\"Answer the selector to actually send to the members, with all the LY/ING/ENS stuff removed\"\n\tself actualSelector: self findActualSelector! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'selector deconstruction' stamp: 'dmu 8/27/2010 14:28'!\ndetermineActualUnarySelector\n\t\"Answer the selector to actually send to the members, with all the LY/ING/ENS stuff removed\n\tCases follow at end of method\"\n\t\n\t| orig |\n\torig _ self originalSelector.\n\t(orig beginsWith: SlySelectorModifier asAWhole) ifTrue:[self isAsAWhole: true.\n\t\t\torig _ orig copyFrom:  SlySelectorModifier asAWholeSize + 1  to: orig size].\n\t^orig.\n\t\n\t\n\t\"Cases:\n\t\tNormal Smalltalk support:\n\t\tunary  =>  unary\n\t\t\n\t\tAdverb support:\n\t\tunaryLY:   =>   unary\n\t\t\n\t\tGerund (reducer) support:\n\t\tunaryING:  => unary\n\t\t\n\t\tDotDot, reflective send support:\n\t\tENSunary  => unary\n\t\t\"\n\t\t! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'selector deconstruction' stamp: 'ssa 5/12/2010 15:45'!\nfindActualSelector\n\t\"Answer the selector to actually send to the members, with all the LY/ING/ENS stuff removed\n\tCases follow at end of method\"\n\t\n\t| orig |\n\torig _ self originalSelector.\n\torig isInfix ifTrue:[^orig].  \"strategy extensions not supported on binary messages\"\n\torig isUnary ifTrue:[^self determineActualUnarySelector].\n\torig isKeyword ifTrue:[^self determineActualKeywordSelector].\n\tself error:'Unknown selector type for ',orig.\n\n\t\"Cases:\n\t\tNormal Smalltalk support:\n\t\t+   => +\n\t\tunary  =>  unary\n\t\tkeyword:  => keyword:\n\t\t\n\t\tAdverb support:\n\t\tunaryLY:   =>   unary\n\t\tLY:keyword:    =>   keyword:\n\t\tLY:keyword:LY:   =>   keyword:\n\t\tLY:keyword:LY:keyword:keyword:   =>   keyword:keyword:keyword:\n\t\tLY:keyword:LY:keyword:LY:keyword:   =>   keyword:keyword:keyword:\n\t\tLY:keyword:LY:keyword:LY:keyword:LY:   =>   keyword:keyword:keyword:\n\t\tLY:keyword:keyword:LY:keyword:LY:   =>   keyword:keyword:keyword:\n\t\tetc., strip all LY:s\n\t\t\n\t\tGerund (reducer) support:\n\t\tunaryING:  => unary\n\t\tkeyword:ING:   => keyword:\n\t\tkeyword:keyword:keyword:keyword:ING:  =>  keyword:keyword:keyword:keyword:\n\t\tetc., strip all ING:s, though there should only be one per selector\n\t\t\n\t\tDotDot, reflective send support:\n\t\tENSunary  => unary\n\t\tENSkeyword:  =>  keyword:\n\t\tENSkeywordLY:  =>  error, same with ING\n\t\t\"\n\t\t! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'selector deconstruction' stamp: 'dmu 8/27/2010 15:33'!\nhandleAdverbKeywordIn: selector\n\t\"Locate the *LY: keywords and extract adverb arguments, and set real arguments,\n\tAnswer the selector stripped of LY:s \"\n\t| keywords adverbOffset keyword argIndex strippedSelector realArgs lastWasAdverb |\n\tlastWasAdverb _ true.\n\tkeywords _  selector subStrings: {$:}.\n\tadverbOffset _ 0.\n\trealArgs _ OrderedCollection new.\n\tstrippedSelector _ ''.\n\t1 to: keywords size do:[:index|\n\t\tkeyword _  keywords at: index.\n\t\t(keyword endsWith: SlySelectorModifier adverb) ifTrue:[\"found an adverb keyword\"\n\t\t\tindex = 1 ifTrue:[\"its the message adverb\"\t\n\t\t\t\t\t\tself messageAdverb: (self arguments first).\n\t\t\t\t\t\tadverbOffset _ 1.\n\t\t\t\t\t\tkeyword = SlySelectorModifier adverb\n\t\t\t\t\t\t\tifFalse:[\" the unary case,  e.g., oddLY \"\n\t\t\t\t\t\t\t\tstrippedSelector _ (keyword withoutLast: SlySelectorModifier adverbSize).\n\t\t\t\t\t\t\t\tkeywords size > 1 ifTrue:[strippedSelector _ strippedSelector,':']]\n\t\t\t\t\t\t\tifTrue:[\"the keyword case LY: adv foo: bar\"\n\t\t\t\t\t\t\t\t\"do nothing, let the first keyword drop\"]]\n\t\t\t\t\tifFalse:[\"its an argument adverb\"\n\t\t\t\t\t\tlastWasAdverb _ true.\n\t\t\t\t\t\targIndex _ index - adverbOffset.\n\t\t\t\t\t\tself argumentAdverbs at: argIndex put:(self arguments at: argIndex).\n\t\t\t\t\t\t\"DO NOTHING HERE  was:   strippedSelector _ strippedSelector,(keyword withoutLast: SlySelectorModifier adverbSize),':'\"]]\n\t\t\t\tifFalse:[\"normal keyword found or ING found\"\n\t\t\t\t\t(keyword endsWith: SlySelectorModifier gerund) ifFalse:[\n\t\t\t\t\t\tlastWasAdverb ifFalse:[self argumentAdverbs add: nil].\n\t\t\t\t\t\tlastWasAdverb _ false.\n\t\t\t\t\t\trealArgs add:(self arguments at: index).\n\t\t\t\t\t\tstrippedSelector _ strippedSelector,keyword,':']]].\n\t\t\tself arguments: realArgs.\n\t^strippedSelector! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'testing' stamp: 'ssa 5/12/2010 11:12'!\nhasAdverbs\n\n\t^self hasMessageAdverb or:[self hasArgumentAdverbs]! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'testing' stamp: 'ssa 5/12/2010 11:13'!\nhasArgumentAdverbs\n\n\tself argumentAdverbs detect:[:each| each notNil] ifNone:[^false].\n\t^true! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'testing' stamp: 'ssa 5/12/2010 11:13'!\nhasMessageAdverb\n\n\t^self messageAdverb notNil! !\n\n!Sly2EnsembleMessageDispatcher methodsFor: 'testing' stamp: 'ssa 5/11/2010 15:45'!\nonlyHasGerund\n\t\"True is the selector is only #ING: \"\n\t^self originalSelector == #ING:! !\n\n!Sly2EnsembleMessageDispatcher class methodsFor: 'dispatching' stamp: 'dmu 8/27/2010 16:01'!\ndispatch: aMessage members: aCollection theEnsemble: anObject\n\t^ self new theEnsemble: anObject; message: aMessage; members: aCollection; dispatch! !\n\n!Sly3 class methodsFor: 'user interfacing' stamp: 'dmu 9/23/2010 13:41'!\ndashboard \n\t\"Sly3 dashboard      \"   \n\t| topView  buttons lastView subViewCount |\n\ttopView := RVMStandardSystemView new  .\n\ttopView borderWidth:1. \n\tbuttons _ {\n\t\tTranscript showInConsoleSwitch.\n\t\tself keepFlyingSwitch.\n\t\tself serializeForDebuggingSwitch.\n\t\tRVMButtonView label: 'Suspend member processes' action: [Processor suspendMemberProcesses].\n\t\tRVMButtonView label: 'Terminate member processes' action: [Processor terminateMemberProcesses].\n\t\tRVMButtonView label: 'Debug member processes' action: [Processor suspendMemberProcesses. ProcessBrowser open].\n\t\t\n\t\tRVMButtonView label:'[ Sly3Boids new run ] fork' \n\t\t\t\t\taction:[[ Sly3Boids new run ] fork].\n\t\tRVMButtonView label: '[Sly3aBoids new run ] fork'\n\t\t\t\t\taction: [[Sly3aBoids new run ] fork ].\n\t\tRVMButtonView label:'Restore normal cursor' \n\t\t\t\t\taction:[Cursor normal show].\n\t\tRVMButtonView label:'process browser' \n\t\t\t\t\taction:[ProcessBrowser  open].\n\t\tRVMButtonView label: 'Sly3SyntaxTests runAll'\n\t\t\t\t\taction: [Sly3SyntaxTests runAll].\n\t}.\n\tlastView _ nil.\n\tbuttons do:[:view| topView addSubView: view below: lastView.\n\t\tlastView _ view].\n\ttopView label: 'Sly3'.\n\tsubViewCount _ topView subViews size.\n\ttopView minimumSize: 165@(subViewCount*27).\n\ttopView maximumSize: topView minimumSize.\n\ttopView controller open! !\n\n!Sly3 class methodsFor: 'user interfacing' stamp: 'ssa 3/25/2010 16:41'!\nkeepFlyingSwitch\n\t\"Sly3 keepFlyingSwitch demo\"\n\t^RVMCheckBoxView on: self label: 'Keep SlyBoids Flying' \n\t\t\t\t\t\tcheckState: [Sly3 keepFlying] \n\t\t\t\t\t\twhenChecked: [Sly3 keepFlying:true] \n\t\t\t\t\t\twhenUnchecked: [Sly3 keepFlying:false].! !\n\n!Sly3 class methodsFor: 'user interfacing' stamp: 'dmu 9/7/2010 17:25'!\nserializeForDebuggingSwitch\n\t\"Sly3 serializeForDebuggingSwitch demo\"\n\t^RVMCheckBoxView on: self label: 'Serialize for debugging' \n\t\t\t\t\t\tcheckState: [Sly3 serializeForDebugging] \n\t\t\t\t\t\twhenChecked: [Sly3 serializeForDebugging:true] \n\t\t\t\t\t\twhenUnchecked: [Sly3 serializeForDebugging:false].! !\n\n!Sly3 class methodsFor: 'accessing' stamp: 'ssa 3/25/2010 16:29'!\nkeepFlying\n\n\tKeepFlying isNil ifTrue:[KeepFlying _ true].\n\t^KeepFlying! !\n\n!Sly3 class methodsFor: 'accessing' stamp: 'ssa 3/25/2010 16:32'!\nkeepFlying: aBoolean\n\n\tKeepFlying _ aBoolean! !\n\n!Sly3 class methodsFor: 'accessing' stamp: 'dmu 9/7/2010 17:24'!\nserializeForDebugging\n\t^ SerializeForDebugging ifNil: [SerializeForDebugging _ false] ifNotNil: [SerializeForDebugging]! !\n\n!Sly3 class methodsFor: 'accessing' stamp: 'dmu 9/7/2010 17:25'!\nserializeForDebugging: aBool\n\tSerializeForDebugging _ aBool! !\n\n!Sly3 class methodsFor: 'accessing' stamp: 'ssa 3/25/2010 16:32'!\ntoggleKeepFlying\n\n\tself keepFlying: self keepFlying not! !\n\n!Sly3AbstractEnsembleMessageDispatcher methodsFor: 'dispatching' stamp: 'dmu 8/29/2010 18:28'!\ndispatch\n! !\n\n!Sly3AbstractEnsembleMessageDispatcher methodsFor: 'ensemble behavior' stamp: 'dmu 8/29/2010 12:56'!\nstoreStringForMyEnsemble\n\t\"Answer a string that should compile back into an ensemble like me\"\n\t| out |\n\tout _ WriteStream on:''.\n\tout nextPutAll:'%{'.\n\tself unprocessedMessage members  do:[:mem|\n\t\tmem storeOn: out.\n\t\tout nextPutAll:'. '].\n\tout nextPutAll:'}'.\n\t^out contents! !\n\n!Sly3AbstractEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 8/29/2010 18:24'!\ndoneBlock\n\t\"Answer the value of doneBlock\"\n\n\tdoneBlock isNil ifTrue:[self doneBlock: [:r | ^ r]].\n\t^ doneBlock! !\n\n!Sly3AbstractEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 8/29/2010 18:24'!\ndoneBlock: anObject\n\t\"Set the value of doneBlock\"\n\n\tdoneBlock _ anObject! !\n\n!Sly3AbstractEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 8/29/2010 12:56'!\nunprocessedMessage\n\t\"Answer the value of unprocessedMessage\"\n\n\tunprocessedMessage isNil ifTrue:[self unprocessedMessage: Sly3UnprocessedEnsembleMessage new].\n\t^ unprocessedMessage! !\n\n!Sly3AbstractEnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 8/29/2010 12:55'!\nunprocessedMessage: anObject\n\t\"Set the value of unprocessedMessage\"\n\n\tunprocessedMessage _ anObject! !\n\n!Sly3AbstractEnsembleMessageDispatcher methodsFor: 'created processed message' stamp: 'dmu 8/29/2010 18:32'!\njustReturn: anObject\n\tself doneBlock value: anObject! !\n\n!Sly3AbstractEnsembleMessageDispatcher methodsFor: 'created processed message' stamp: 'dmu 9/1/2010 23:30'!\nsendToMembers: selector\n\tself doneBlock value: (Sly3MessageEnvelope receiver: self unprocessedMessage members selector: selector arguments: self unprocessedMessage arguments) deliver! !\n\n!Sly3AbstractEnsembleMessageDispatcher methodsFor: 'as yet unclassified' stamp: 'dmu 8/29/2010 13:29'!\nsetUnprocessedSelector: sel\n\tself unprocessedMessage selector: sel! !\n\n!Sly3AbstractEnsembleMessageDispatcher class methodsFor: 'dispatching' stamp: 'dmu 8/29/2010 18:27'!\ndispatch: anUnprocessedMessage \n\tself dispatch: anUnprocessedMessage andDo: [:r | ^ r].\n\tself error: 'unhandled'! !\n\n!Sly3AbstractEnsembleMessageDispatcher class methodsFor: 'dispatching' stamp: 'dmu 8/29/2010 18:26'!\ndispatch: anUnprocessedMessage andDo: doneBlock\n\t^ self new unprocessedMessage: anUnprocessedMessage; doneBlock: [:r | ^ doneBlock value: r]; dispatch! !\n\n!Sly3AbstractIndirectOperandDistributor methodsFor: 'accessing' stamp: 'dmu 9/4/2010 23:01'!\nisIndirect\n\t^ true! !\n\n!Sly3AbstractIndirectOperandDistributor methodsFor: 'accessing' stamp: 'dmu 9/4/2010 23:00'!\nparameter\n\t\"Answer the value of parameter\"\n\n\tparameter isNil ifTrue:[self parameter: nil].\n\t^ parameter! !\n\n!Sly3AbstractIndirectOperandDistributor methodsFor: 'accessing' stamp: 'dmu 9/4/2010 23:00'!\nparameter: anObject\n\t\"Set the value of parameter\"\n\n\tparameter _ anObject! !\n\n!Sly3AbstractModifier methodsFor: 'testing' stamp: 'dmu 8/30/2010 18:33'!\nisAdverb\n\t^ self class isAdverb! !\n\n!Sly3AbstractModifier methodsFor: 'testing' stamp: 'dmu 8/30/2010 18:34'!\nisArgumentModifier\n\t^ self class isArgumentModifier! !\n\n!Sly3AbstractModifier methodsFor: 'testing' stamp: 'dmu 9/3/2010 22:16'!\nisDirect\n\t^ self isIndirect not! !\n\n!Sly3AbstractModifier methodsFor: 'testing' stamp: 'dmu 8/30/2010 18:34'!\nisGerund\n\t^ self class isGerund! !\n\n!Sly3AbstractModifier methodsFor: 'testing' stamp: 'dmu 8/30/2010 18:34'!\nisMessageModifier\n\t^ self class isMessageModifier! !\n\n!Sly3AbstractModifier methodsFor: 'testing' stamp: 'dmu 9/11/2010 16:58'!\nisOperandDistributor ^ false! !\n\n!Sly3AbstractModifier methodsFor: 'accessing' stamp: 'dmu 8/30/2010 18:39'!\nallUppercaseSuffixes\n\t^ self class allUppercaseSuffixes! !\n\n!Sly3AbstractModifier methodsFor: 'accessing' stamp: 'dmu 8/30/2010 18:35'!\nlowercaseSuffix\n\t^ self class lowercaseSuffix! !\n\n!Sly3AbstractModifier methodsFor: 'accessing' stamp: 'dmu 8/30/2010 18:36'!\nstringWithLowercaseSuffix\n\t^ self class stringWithLowercaseSuffix! !\n\n!Sly3AbstractModifier methodsFor: 'accessing' stamp: 'dmu 8/30/2010 19:41'!\nsuffixSize\n\t^ self class suffixSize! !\n\n!Sly3AbstractModifier methodsFor: 'accessing' stamp: 'dmu 8/30/2010 18:37'!\nuppercaseSuffix\n\t^ self class uppercaseSuffix! !\n\n!Sly3AbstractModifier class methodsFor: 'accessing' stamp: 'dmu 8/30/2010 18:39'!\nallUppercaseSuffixes\n\t^ {Sly3Adverb. Sly3Gerund} collect: [:x | x uppercaseSuffix]! !\n\n!Sly3AbstractModifier class methodsFor: 'accessing' stamp: 'dmu 8/30/2010 19:52'!\nlowercaseSuffix\n\t^ self uppercaseSuffix asLowercase! !\n\n!Sly3AbstractModifier class methodsFor: 'accessing' stamp: 'dmu 8/30/2010 19:56'!\nmembersSelector\n\t^#members! !\n\n!Sly3AbstractModifier class methodsFor: 'accessing' stamp: 'dmu 9/3/2010 12:31'!\nmodifySelector: sel\n\t^ (self stringWithUppercaseSuffix, sel) asSymbol! !\n\n!Sly3AbstractModifier class methodsFor: 'accessing' stamp: 'dmu 8/30/2010 18:36'!\nstringWithLowercaseSuffix\n\t\"Sly3ModWholly  stringWithLowercaseSuffix\"\n\t^ (self  name copyFrom: 'Sly3Mod' size + 1 to: self  name size) asLowercase! !\n\n!Sly3AbstractModifier class methodsFor: 'accessing' stamp: 'dmu 8/30/2010 18:46'!\nstringWithUppercaseSuffix\n\t^ self stringWithoutSuffix, self uppercaseSuffix! !\n\n!Sly3AbstractModifier class methodsFor: 'accessing' stamp: 'dmu 8/30/2010 18:47'!\nstringWithoutSuffix\n\t| s ss |\n\ts _ self stringWithLowercaseSuffix.\n\tss _ self suffixSize.\n\t^ s copyFrom: 1 to: s size - ss! !\n\n!Sly3AbstractModifier class methodsFor: 'accessing' stamp: 'dmu 8/30/2010 19:41'!\nsuffixSize\n\t^ self uppercaseSuffix size! !\n\n!Sly3AbstractModifier class methodsFor: 'accessing' stamp: 'dmu 8/30/2010 18:37'!\nuppercaseSuffix\n\t^self subclassResponsibility! !\n\n!Sly3AbstractModifier class methodsFor: 'testing' stamp: 'dmu 8/30/2010 18:33'!\nisAdverb\n\t^ false! !\n\n!Sly3AbstractModifier class methodsFor: 'testing' stamp: 'dmu 8/30/2010 18:34'!\nisArgumentModifier\n\t^ false! !\n\n!Sly3AbstractModifier class methodsFor: 'testing' stamp: 'dmu 8/30/2010 18:34'!\nisGerund\n\t^ false! !\n\n!Sly3AbstractModifier class methodsFor: 'testing' stamp: 'dmu 8/30/2010 18:34'!\nisMessageModifier\n\t^ false! !\n\n!Sly3AbstractModifier class methodsFor: 'testing' stamp: 'dmu 8/30/2010 19:00'!\nisSlySelector: aString\n\t\"  Sly3AbstractModifier isSlySelector: 'abdc'  \"\n\t^ self allUppercaseSuffixes anySatisfy: [:s | aString includesSubString: s]! !\n\n!Sly3AbstractModifier class methodsFor: 'instance creation' stamp: 'dmu 9/1/2010 10:59'!\ninstantiateSpecificFromBaseName: baseName includingSuffix: suffix\n\t| specificClassName cls |\n\tspecificClassName _ 'Sly3Mod', baseName capitalized, suffix asLowercase.\n\tcls _ Smalltalk at: specificClassName asSymbol ifAbsent: [self error: 'could not find modifier class: ', specificClassName].\n\t^ cls new! !\n\n!Sly3Adverb methodsFor: 'testing' stamp: 'dmu 9/3/2010 18:15'!\nisIndirect\n\t^ false! !\n\n!Sly3Adverb class methodsFor: 'testing' stamp: 'dmu 8/30/2010 18:40'!\nisAdverb\n\t^ true! !\n\n!Sly3Adverb class methodsFor: 'testing' stamp: 'dmu 8/30/2010 18:38'!\nuppercaseSuffix\n\t^ 'LY'! !\n\n!Sly3Adverb class methodsFor: 'nil' stamp: 'dmu 9/12/2010 22:08'!\ndefaultArgumentOperandDistributor\n\t^Sly3ModWholly! !\n\n!Sly3Adverb class methodsFor: 'nil' stamp: 'dmu 4/12/2011 12:30'!\ndefaultReceiverOperandDistributor\n\t^Sly3ModIndividually! !\n\n!Sly3Adverb class methodsFor: 'nil' stamp: 'dmu 9/3/2010 14:33'!\nreflectiveAdverb\n\t^Sly3ModPlainly! !\n\n!Sly3Boid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:51'!\nflock\n\t\"Answer the value of flock\"\n\n\tflock isNil ifTrue:[self flock: #()].\n\t^ flock! !\n\n!Sly3Boid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 22:38'!\nflock: anObject\n\t\"Set the value of flock\"\n\n\tflock _ anObject! !\n\n!Sly3Boid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:57'!\nlastDrawnPosition\n\t\"Answer the value of lastDrawnPosition\"\n\n\tlastDrawnPosition isNil ifTrue:[self lastDrawnPosition: self position].\n\t^ lastDrawnPosition! !\n\n!Sly3Boid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:00'!\nlastDrawnPosition: anObject\n\t\"Set the value of lastDrawnPosition\"\n\n\tlastDrawnPosition _ anObject! !\n\n!Sly3Boid methodsFor: 'accessing' stamp: 'dmu 3/23/2010 00:05'!\nlastLastDrawnPosition\n\t\"Answer the value of lastLastDrawnPosition\"\n\n\tlastLastDrawnPosition isNil ifTrue:[self lastLastDrawnPosition: self lastDrawnPosition].\n\t^ lastLastDrawnPosition! !\n\n!Sly3Boid methodsFor: 'accessing' stamp: 'dmu 3/22/2010 23:53'!\nlastLastDrawnPosition: anObject\n\t\"Set the value of lastLastDrawnPosition\"\n\n\tlastLastDrawnPosition _ anObject! !\n\n!Sly3Boid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:53'!\nneighbors\n\t\"Answer the value of neighbors\"\n\n\tneighbors isNil ifTrue:[self neighbors: #()].\n\t^ neighbors! !\n\n!Sly3Boid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 22:38'!\nneighbors: anObject\n\t\"Set the value of neighbors\"\n\n\tneighbors _ anObject! !\n\n!Sly3Boid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 22:39'!\nposition\n\t\"Answer the value of position\"\n\n\tposition isNil ifTrue:[self position: 500@500].\n\t^ position! !\n\n!Sly3Boid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 22:38'!\nposition: anObject\n\t\"Set the value of position\"\n\n\tposition _ anObject! !\n\n!Sly3Boid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 22:39'!\nvelocity\n\t\"Answer the value of velocity\"\n\n\tvelocity isNil ifTrue:[self velocity: 0@0].\n\t^ velocity! !\n\n!Sly3Boid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 22:38'!\nvelocity: anObject\n\t\"Set the value of velocity\"\n\n\tvelocity _ anObject! !\n\n!Sly3Boid methodsFor: 'as yet unclassified' stamp: 'dmu 9/3/2010 00:00'!\ncomputeCentroid\n[\"buttonize next two lines for a trigger setting button\"\n\"Click To Set Trigger\"\n\"  ONEHALT _ true\"     \n].\n\n\"ONEHALT ifTrue:[ONEHALT _ false. self halt].\"\n\n\t^ (self flock boids members collect: [:m| m position]) average! !\n\n!Sly3Boid methodsFor: 'as yet unclassified' stamp: 'dmu 9/3/2010 00:01'!\ncomputeNeighbors\n\t^self flock boids members select:[:m| m isNear: self]! !\n\n!Sly3Boid methodsFor: 'as yet unclassified' stamp: 'dmu 9/8/2010 02:07'!\ndraw\n\t| p |\n\tself lastDrawnPosition = self position ifTrue: [^ self].\n\tp _ self position.\n\t\n\tfalse ifTrue: [\n\t\tSly3Graphics drawWhiteCircle: self lastDrawnPosition.\n\t\tSly3Graphics drawCircle: p.\n\t\t\"Sly3Graphics drawFrom: self lastDrawnPosition to: p.\"\n\t]\n\tifFalse: [\n\t\tSly3Graphics drawFrom: self lastDrawnPosition to: p. \n\t\tSly3Graphics eraseFrom: self lastLastDrawnPosition to: self lastDrawnPosition.\n\t].\n\t\n\tself lastLastDrawnPosition: self lastDrawnPosition.\n\tself lastDrawnPosition: p! !\n\n!Sly3Boid methodsFor: 'as yet unclassified' stamp: 'dmu 9/8/2010 02:22'!\nfly\n\t| centroid |\n\t[Sly3 keepFlying] whileTrue:[\n\t\tcentroid _ self computeCentroid.\n\t\tself moveToNewPosition: centroid.\n\t\tself flock maybeYield\n\t]! !\n\n!Sly3Boid methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:15'!\ngo\n\tself fly! !\n\n!Sly3Boid methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 22:43'!\nisNear: aBoid\n\t^ (self ~== aBoid) and: [(self position dist: aBoid position) <= 10]! !\n\n!Sly3Boid methodsFor: 'as yet unclassified' stamp: 'dmu 9/3/2010 00:04'!\nkeepAwayFromNeighbors\n\t| sum |\n\tself neighbors ifEmpty: [^ 0@0].\n\tsum _ 0.\n\tself neighbors  do: [:m | sum _ sum + (self position - m position)].\n\t^ sum / self neighbors size asFloat! !\n\n!Sly3Boid methodsFor: 'as yet unclassified' stamp: 'dmu 3/24/2010 15:30'!\nlimitPositionFrom: min to: max\n\t| r pos |\n\tpos _ self position.\n\tr _ ((pos max: min@min) min: max@max).\n\tr = pos ifTrue: [^ self].\n\tpos x < min ifTrue: [r _                 min + (min - pos x)  @  pos y. self velocity: self velocity x negated @ self velocity y].\n\tpos y < min ifTrue: [r _ pos x @ (min + (min - pos y)).               self velocity: self velocity x             @ self velocity y negated].\n\tpos x > max ifTrue: [r _                 max - (pos x - max) @ pos y.  self velocity: self velocity x negated @ self velocity y ].\n\tpos y > max ifTrue: [r _ pos x @ (max - (pos y - max)).              self velocity: self velocity x              @ self velocity y negated].\n\tself position: r! !\n\n!Sly3Boid methodsFor: 'as yet unclassified' stamp: 'dmu 3/24/2010 15:36'!\nlimitVelocityTo: n\n\t| ns v vs q |\n\tns _ n * n * 2.\n\tv _ self velocity.\n\tvs _ v x squared + v y squared.\n\tvs <= ns ifTrue: [^ self].\n\tq _ (ns / vs) sqrt.\n\tself velocity: v * q.! !\n\n!Sly3Boid methodsFor: 'as yet unclassified' stamp: 'dmu 9/3/2010 15:54'!\nmatchVelocityWithNeighbors\n\tself neighbors  size = 0 ifTrue:  [^ 0@0].\n\t^ (self neighbors  collect: [:m| m velocity]) average / 8.0! !\n\n!Sly3Boid methodsFor: 'as yet unclassified' stamp: 'dmu 3/24/2010 15:04'!\nmoveToNewPosition: centroid\n\t| a b c |\n\tself neighbors: self computeNeighbors.\n\ta _ self moveTowardCentroidOfAllOthers: centroid.\n\tb _ self keepAwayFromNeighbors.\n\tc _ self matchVelocityWithNeighbors.\n\tself velocity: self velocity + a + b + c.\n\tself limitVelocityTo: 10.\n\tself position: self position + self velocity.\n\tself limitPositionFrom: 0 to: 1000! !\n\n!Sly3Boid methodsFor: 'as yet unclassified' stamp: 'dmu 9/8/2010 02:16'!\nmoveTowardCentroidOfAllOthers: centroid\n\t| perceivedCentroid s |\n\t\"collectionLYSize introduces overhead.\"\n\ts _ self flock boids collectionLYsize.\n\ts < 2 ifTrue: [^ 0@0].\n\tperceivedCentroid _ (centroid * s - self position) / (s - 1).\n\t^ (perceivedCentroid - self position) / 100.0! !\n\n!Sly3Boid methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 22:54'!\nperturb\n\tself position: (self position perturb: 100).\n\tself velocity: (self velocity perturb: 2).! !\n\n!Sly3Boids methodsFor: 'as yet unclassified' stamp: 'dmu 8/23/2010 15:52'!\nboidClass\n\t^ Sly3Boid! !\n\n!Sly3Boids methodsFor: 'as yet unclassified' stamp: 'dmu 9/8/2010 02:29'!\ndrawerClass ^ Sly3Drawer! !\n\n!Sly3Boids methodsFor: 'as yet unclassified' stamp: 'ads 2/2/2011 14:55'!\nflockSize\n\t\"RVMOperations coreCount - 6 max: 10\".\n\t^ 30! !\n\n!Sly3Boids methodsFor: 'as yet unclassified' stamp: 'dmu 9/16/2010 23:58'!\nrun\n\t\"Transcript show: (Time millisecondsToRun: [Sly3Boids new run]); cr\"\n\t\"[ Sly3Boids new run ] fork\"\n\t| c flock drawer flockAndDrawer n |\n\tc _ OrderedCollection new.\n\tn _ self flockSize.\n\t1 to: n do: [:i| c add: self boidClass new perturb].\n\tflock _ Sly3Flock boids: c asEnsembleOfElements.\n\tflock boids flock: flock.\n\tdrawer _ self drawerClass flock: flock.\n\tflockAndDrawer _ %{flock. drawer}.\n\t\"SlyGraphics clearScreen.\"\n\tflockAndDrawer  go ! !\n\n!Sly3Boids class methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 22:30'!\nrun\n\t^ self new run! !\n\n!Sly3Drawer methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:06'!\nflock\n\t\"Answer the value of flock\"\n\n\tflock isNil ifTrue:[self flock: nil].\n\t^ flock! !\n\n!Sly3Drawer methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:06'!\nflock: anObject\n\t\"Set the value of flock\"\n\n\tflock _ anObject! !\n\n!Sly3Drawer methodsFor: 'as yet unclassified' stamp: 'dmu 9/8/2010 02:28'!\ngo\n\tProcessor thisProcess useOnlyMainCore. \"for bitblt efficiency\"\n\t[flock isDone] whileFalse: [flock boids members do: [:b| b draw]]! !\n\n!Sly3Drawer class methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:07'!\nflock: f\n\t^ self new flock: f! !\n\n!Sly3Ensemble methodsFor: 'as yet unclassified' stamp: 'dmu 3/25/2010 23:48'!\nselect: aBlock\n\t^ self members select: aBlock! !\n\n!Sly3Ensemble methodsFor: 'as yet unclassified' stamp: 'dmu 3/25/2010 21:25'!\ntotalWithIdentity: id\n\t^ self plus: id adverb: #reductively! !\n\n!Sly3Ensemble methodsFor: 'environment support' stamp: 'dmu 8/29/2010 12:53'!\ndoesNotUnderstand: aMessage\n\t\"Try to process this message as an ensemble dispatch message to help in the case of inlined primitive calls  like perform:with:with:\"\n\t^ Sly3EnsembleMessageDispatcher dispatch: (Sly3UnprocessedEnsembleMessage fromMessage: aMessage theEnsemble: self)! !\n\n!Sly3Ensemble methodsFor: 'environment support' stamp: 'dmu 3/29/2010 01:04'!\nensembleSpecies\n\t^ Sly3Ensemble! !\n\n!Sly3Ensemble methodsFor: 'exploring' stamp: 'ssa 6/15/2010 16:14'!\nexplorerContents\n\n\t^self members asOrderedCollection withIndexCollect: [:value :index |\n\t\tObjectExplorerWrapper\n\t\t\twith: value\n\t\t\tname: index printString\n\t\t\tmodel: self]! !\n\n!Sly3Ensemble methodsFor: 'exploring' stamp: 'ssa 6/15/2010 16:15'!\nhasContentsInExplorer\n\t^self members isEmpty not! !\n\n!Sly3Ensemble methodsFor: 'membership' stamp: 'dmu 9/23/2010 13:05'!\nadd: anObject\n\tmembers add: anObject! !\n\n!Sly3Ensemble methodsFor: 'membership' stamp: 'ssa 6/17/2010 10:29'!\nmembers\n\t\"you should never trust that the members collection stays the same within the ensemble\"\n\t^members copy! !\n\n!Sly3Ensemble methodsFor: 'membership' stamp: 'dmu 9/19/2010 22:53'!\nmembers: aCollection\n\t\"crude check:\"\n\tself primitiveSetExtraWordSelector: #sentToEnsemble:.\n\taCollection primitiveSetExtraPreheaderWord: self.\n\tmembers _ aCollection.\n\t^ self! !\n\n!Sly3Ensemble methodsFor: 'membership' stamp: 'dmu 9/23/2010 13:05'!\nremove: anObject\n\tmembers remove: anObject! !\n\n!Sly3Ensemble methodsFor: 'membership' stamp: 'dmu 9/23/2010 13:06'!\nremove: anObject ifAbsent: blk\n\t^ members remove: anObject ifAbsent: blk! !\n\n!Sly3Ensemble methodsFor: 'membership' stamp: 'dmu 8/30/2010 01:53'!\nsize\n\t^ members size! !\n\n!Sly3Ensemble methodsFor: 'printing' stamp: 'ssa 6/17/2010 16:35'!\nasExplorerString\n\n\t^self printString! !\n\n!Sly3Ensemble methodsFor: 'printing' stamp: 'dmu 9/3/2010 16:50'!\nprintOn: out\n\t\"Add a string that should compile back into an ensemble like me\"\n\tout nextPutAll:'%{'.\n\tself members  do:[:mem|\n\t\tmem printOn: out.\n\t\tout nextPutAll:'. '].\n\tout nextPutAll:'}'.\n! !\n\n!Sly3Ensemble methodsFor: 'printing' stamp: 'dmu 9/3/2010 16:51'!\nstoreOn: out\n\t\"Write a string on aStream that should compile back into an ensemble like me\"\n\tout nextPut:$%;nextPut:${.\n\tself members  do:[:mem|\n\t\tmem storeOn: out.\n\t\tout nextPut:$.].\n\tout nextPut:$}.\n! !\n\n!Sly3Ensemble methodsFor: 'testing' stamp: 'dmu 9/3/2010 15:55'!\nifEmpty: blk\n\t^ self collecitonLYsize = 0 ifTrue: [blk value]! !\n\n!Sly3Ensemble methodsFor: 'testing' stamp: 'dmu 9/3/2010 14:54'!\nisEnsemble\n\t\"Sly3Ensemble overrides to true\"\n\t^true! !\n\n!Sly3Ensemble class methodsFor: 'as yet unclassified' stamp: 'dmu 9/7/2010 11:13'!\ndeactivateEnsembleSendsFor: anEnsemble during: aBlock\n\t\"disable messaging dispatching to members and just send it to the ensemble object itself during aBlock\"\n\t| members r |\n\tmembers _ anEnsemble members.\n\t0 primitiveSetExtraPreheaderWord:  anEnsemble.\n\tr _ aBlock ensure: [members primitiveSetExtraPreheaderWord:  anEnsemble. \n].\n\t^ r\n\n\t! !\n\n!Sly3Ensemble class methodsFor: 'as yet unclassified' stamp: 'dmu 9/16/2010 23:37'!\nwithMembersFrom: aCollection\n\t^ self new members: aCollection! !\n\n!Sly3Ensemble class methodsFor: 'as yet unclassified' stamp: 'dmu 9/16/2010 23:39'!\nwithSoleMember: anObject\n\t^ self withMembersFrom: {anObject}! !\n\n!Sly3EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 8/29/2010 19:04'!\noriginalArguments\n\n\t^ self unprocessedMessage arguments! !\n\n!Sly3EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 8/29/2010 18:49'!\nparsedMessage\n\t\"Answer the value of parsedMessage\"\n\n\tparsedMessage isNil ifTrue:[self parsedMessage: nil].\n\t^ parsedMessage! !\n\n!Sly3EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 8/29/2010 18:49'!\nparsedMessage: anObject\n\t\"Set the value of parsedMessage\"\n\n\tparsedMessage _ anObject! !\n\n!Sly3EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'ssa 5/12/2010 19:32'!\nrandomNumberSource\n\n\tRandomNumberSource isNil ifTrue:[RandomNumberSource _ Random new].\n\t^RandomNumberSource! !\n\n!Sly3EnsembleMessageDispatcher methodsFor: 'accessing' stamp: 'dmu 8/27/2010 14:29'!\nsetAsAWhole\n\n\tself isAsAWhole: true! !\n\n!Sly3EnsembleMessageDispatcher methodsFor: 'dispatching' stamp: 'dmu 9/1/2010 23:18'!\ndispatch\n\tself parsedMessage: self parseMessage.\n         self parsedMessage ifNil: [^ self].\n         ^ self doneBlock value:  ( Sly3MessageEvaluator evaluate: self parsedMessage )\n! !\n\n!Sly3EnsembleMessageDispatcher methodsFor: 'ensemble behavior' stamp: 'dmu 8/29/2010 19:00'!\nstoreStringForMyEnsemble\n\t\"Answer a string that should compile back into an ensemble like me\"\n\t| out |\n\tout _ WriteStream on:''.\n\tout nextPutAll:'%{'.\n\tself unprocessedMessage members  do:[:mem|\n\t\tmem storeOn: out.\n\t\tout nextPutAll:'. '].\n\tout nextPutAll:'}'.\n\t^out contents! !\n\n!Sly3EnsembleMessageDispatcher methodsFor: 'parsing message' stamp: 'dmu 8/29/2010 21:54'!\nparseMessage\n\t^ Sly3MessageParser parse: self unprocessedMessage\n! !\n\n!Sly3EnsembleMessageDispatcher class methodsFor: 'dispatching' stamp: 'dmu 9/3/2010 12:27'!\ndispatch: anUnprocessedMessage andDo: doneBlock\n\t| newMessage |\n\tSly3ReflectiveMessageDispatcher dispatch: anUnprocessedMessage andDo: [:r|  ^ doneBlock value: r].\n\tnewMessage _ Sly3ReflectiveSelectorChanger modifyAsNeeded: anUnprocessedMessage.\n\t^super dispatch: newMessage andDo: doneBlock! !\n\n!Sly3EnsembleMirror methodsFor: 'accessing' stamp: 'dmu 9/5/2010 15:25'!\nmembers\n\t\"Answer the value of members\"\n\n\tmembers isNil ifTrue:[self members: nil].\n\t^ members! !\n\n!Sly3EnsembleMirror methodsFor: 'accessing' stamp: 'dmu 9/5/2010 15:25'!\nmembers: anObject\n\t\"Set the value of members\"\n\n\tmembers _ anObject! !\n\n!Sly3EnsembleMirror methodsFor: 'accessing' stamp: 'dmu 9/5/2010 15:25'!\ntheEnsemble\n\t\"Answer the value of theEnsemble\"\n\n\ttheEnsemble isNil ifTrue:[self theEnsemble: nil].\n\t^ theEnsemble! !\n\n!Sly3EnsembleMirror methodsFor: 'accessing' stamp: 'dmu 9/5/2010 15:25'!\ntheEnsemble: anObject\n\t\"Set the value of theEnsemble\"\n\n\ttheEnsemble _ anObject! !\n\n!Sly3EnsembleMirror class methodsFor: 'as yet unclassified' stamp: 'dmu 9/5/2010 15:27'!\nforEnsemble: e members: m\n\t^ self new theEnsemble: e; members: m; yourself! !\n\n!Sly3EnsembleMirror class methodsFor: 'as yet unclassified' stamp: 'dmu 9/5/2010 15:27'!\nforObject: obj\n\tself new theEnsemble: obj; members: (obj wholLYisEnsemble ifTrue: [obj collectionLY] ifFalse: [obj]); yourself! !\n\n!Sly3Flock methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:39'!\nboids\n\t\"Answer the value of boids\"\n\n\t^ boids! !\n\n!Sly3Flock methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:11'!\nboids: anObject\n\t\"Set the value of boids\"\n\n\tboids _ anObject! !\n\n!Sly3Flock methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:12'!\nisDone\n\t\"Answer the value of isDone\"\n\n\tisDone isNil ifTrue:[self isDone: false].\n\t^ isDone! !\n\n!Sly3Flock methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:12'!\nisDone: anObject\n\t\"Set the value of isDone\"\n\n\tisDone _ anObject! !\n\n!Sly3Flock methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:13'!\ngo\n\tself isDone: false.\n\tboids fly.\n\tself isDone: true! !\n\n!Sly3Flock methodsFor: 'as yet unclassified' stamp: 'dmu 9/7/2010 17:32'!\nmaybeYield\n\t| n |\n\t\"[Processor yield. ^self]value.\"\n\tSly3 serializeForDebugging ifTrue: [Processor yield. ^ self].\n\tn _self boids collectionLYsize + 1 \"1 for Drawer\".\n\tProcessor yieldIfFewerCoresThan: n! !\n\n!Sly3Flock class methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:11'!\nboids: b\n\t^ self new boids: b! !\n\n!Sly3Gerund methodsFor: 'testing' stamp: 'dmu 9/3/2010 22:16'!\nisIndirect\n\t^ false! !\n\n!Sly3Gerund methodsFor: 'as yet unclassified' stamp: 'dmu 9/3/2010 14:13'!\nreduceForEvaluator: ev\n\tself subclassResponsibility! !\n\n!Sly3Gerund class methodsFor: 'testing' stamp: 'dmu 9/1/2010 23:44'!\nisGerund\n\t^ true! !\n\n!Sly3Gerund class methodsFor: 'testing' stamp: 'dmu 8/30/2010 18:38'!\nuppercaseSuffix\n\t^ 'ING'! !\n\n!Sly3Gerund class methodsFor: 'as yet unclassified' stamp: 'dmu 9/12/2010 21:24'!\ndefaultGerund\n\t^Sly3ModEnsembling! !\n\n!Sly3Graphics class methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:05'!\nclearScreen\n\tDisplay fillWhite! !\n\n!Sly3Graphics class methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:05'!\ndrawCircle: pt\n\tDisplay drawDot5At: pt! !\n\n!Sly3Graphics class methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:03'!\ndrawFrom: ptA to: ptB\n\tDisplay drawLineFrom: ptA to: ptB color: Color black! !\n\n!Sly3Graphics class methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:04'!\ndrawWhiteCircle: pt\n\tDisplay eraseDot5At: pt! !\n\n!Sly3Graphics class methodsFor: 'as yet unclassified' stamp: 'dmu 3/23/2010 00:02'!\neraseFrom: ptA to: ptB\n\tDisplay eraseLineFrom: ptA to: ptB color: Color black! !\n\n!Sly3MessageEnvelope methodsFor: 'delivering' stamp: 'dmu 9/21/2010 00:24'!\ndeliver\n\t\"send my message to my receiver and return the reply\"\n\t| e |\n\t1 to: deactivateEnsembleBehaviorFlags size do: [:i|\n\t\t(deactivateEnsembleBehaviorFlags at: i) ifTrue: [\n\t\t\te _ i = 1 ifTrue: [ receiver] ifFalse: [message arguments at: i - 1].\n\t\t\t^ Sly3Ensemble deactivateEnsembleSendsFor: e during: [(self copy at: i putDeactivateEnsembleBehaviorFlag: false) deliver]\n\t\t\t]\n\t\t].\n\tself message arguments: self message arguments asArray.\n\t^self message sentTo: self receiver! !\n\n!Sly3MessageEnvelope methodsFor: 'accessing' stamp: 'dmu 9/3/2010 15:43'!\nat: rcvrArgIndex putDeactivateEnsembleBehaviorFlag: aBool\n\tdeactivateEnsembleBehaviorFlags at: rcvrArgIndex put: aBool! !\n\n!Sly3MessageEnvelope methodsFor: 'accessing' stamp: 'dmu 9/3/2010 15:35'!\ndeactivateEnsembleBehaviorFlags: x\n\tdeactivateEnsembleBehaviorFlags _ x! !\n\n!Sly3MessageEnvelope methodsFor: 'accessing' stamp: 'ssa 5/12/2010 15:24'!\nmessage\n\t\"Answer the value of message\"\n\n\tmessage isNil ifTrue:[self message: nil].\n\t^ message! !\n\n!Sly3MessageEnvelope methodsFor: 'accessing' stamp: 'ssa 7/16/2010 19:03'!\nmessage: anObject\n\t\"Set the value of message\"\n\n\tmessage _ anObject.\n! !\n\n!Sly3MessageEnvelope methodsFor: 'accessing' stamp: 'dmu 9/3/2010 21:27'!\nreceiver\n\t^ receiver! !\n\n!Sly3MessageEnvelope methodsFor: 'accessing' stamp: 'ssa 5/12/2010 15:24'!\nreceiver: anObject\n\t\"Set the value of receiver\"\n\n\treceiver _ anObject! !\n\n!Sly3MessageEnvelope methodsFor: 'printing' stamp: 'dmu 9/3/2010 16:51'!\nprintOn: aStream\n\n\taStream nextPutAll:'MsgEnv|rcvr:',self receiver wholLYprintString,'|message: ',self message printString! !\n\n!Sly3MessageEnvelope class methodsFor: 'instance creation' stamp: 'dmu 9/3/2010 15:35'!\nargumentCount: n\n\n\t^self new\n\t\tmessage: (Message selector: #none arguments: (Array new: n));\n\t\tdeactivateEnsembleBehaviorFlags: ((Array new: n + 1) collect: [:x| false]);\n\t\tyourself! !\n\n!Sly3MessageEnvelope class methodsFor: 'instance creation' stamp: 'ssa 5/27/2010 10:46'!\nreceiver: anObject selector: aSymbol arguments: anArray\n\n\t^self new\n\t\treceiver: anObject;\n\t\tmessage: (Message selector: aSymbol arguments: anArray);\n\t\tyourself! !\n\n!Sly3MessageEvaluator methodsFor: 'accessing' stamp: 'dmu 8/29/2010 21:55'!\nmessage\n\t\"Answer the value of message\"\n\n\tmessage isNil ifTrue:[self message: nil].\n\t^ message! !\n\n!Sly3MessageEvaluator methodsFor: 'accessing' stamp: 'dmu 8/29/2010 21:55'!\nmessage: anObject\n\t\"Set the value of message\"\n\n\tmessage _ anObject! !\n\n!Sly3MessageEvaluator methodsFor: 'accessing' stamp: 'dmu 9/22/2010 22:05'!\nputResultsIntoAnEnsemble\n\t^ putResultsIntoAnEnsemble! !\n\n!Sly3MessageEvaluator methodsFor: 'accessing' stamp: 'dmu 9/4/2010 15:34'!\nresult\n\t^ result! !\n\n!Sly3MessageEvaluator methodsFor: 'accessing' stamp: 'dmu 9/4/2010 15:33'!\nresult: r\n\tresult _ r! !\n\n!Sly3MessageEvaluator methodsFor: 'post-processing' stamp: 'dmu 9/4/2010 15:34'!\nevaluateGerunds\n\tmessage gerunds reverseDo: [:g| g reduceForEvaluator: self].\n\t^ result! !\n\n!Sly3MessageEvaluator methodsFor: 'evaluating-modified' stamp: 'dmu 9/23/2010 16:26'!\nbuildOperandTuples\n\t| mems |\n\toperandTuples _ OrderedCollection new.\n\toperandTuples _ self operandTuplesForObject: message receiver membersOrNil: message members adverbs: message messageAdverbs operandTuplesSoFar: operandTuples.\n\tmessage arguments with: message argumentAdverbs do: [:arg :ads | \n\t\tmems _ arg collectionLY.\n\t\toperandTuples _ \n\t\t\tself operandTuplesForObject: arg \n\t\t\tmembersOrNil: mems \n\t\t\tadverbs: ads \n\t\t\toperandTuplesSoFar: operandTuples].\n\t^ operandTuples! !\n\n!Sly3MessageEvaluator methodsFor: 'evaluating-modified' stamp: 'dmu 9/23/2010 15:54'!\ncalculatePutResultsIntoAnEnsemble\n\t((message messageAdverbs select: [:mm| mm isOperandDistributor]) anySatisfy: [:m | m putResultsIntoAnEnsemble])\n\t\tifTrue: [^ true].\n\t^ message argumentAdverbs anySatisfy: [:aa|\n\t\t(aa select: [:mm| mm isOperandDistributor]) anySatisfy: [:m | m putResultsIntoAnEnsemble]\n\t\t]\n! !\n\n!Sly3MessageEvaluator methodsFor: 'evaluating-modified' stamp: 'sm 2/19/2011 11:53'!\nevaluate\n\t| r  | \n\t\"message selector = #particle:ofSize:movedTo: ifTrue: [self halt].\"\n\tputResultsIntoAnEnsemble _ false.\n\toperandTuples _ self buildOperandTuples.\n\tenvelopes _ self makeEnvelopes.\n\tself stuffSelectors.\n\tself stuffReceivers.\n\tself stuffArguments.\n\tself relocateReceiversIfNeeded.\n\tself relocateArgumentsIfNeeded.\n\tself setDisableEnsembleBehaviorFlags.\n\tresult _ self sendMessages.\n\tputResultsIntoAnEnsemble _ self calculatePutResultsIntoAnEnsemble.\n\tr _ self evaluateGerunds.\n\t^ r\n! !\n\n!Sly3MessageEvaluator methodsFor: 'evaluating-modified' stamp: 'dmu 9/23/2010 16:16'!\noperandTuplesForObject: operand membersOrNil: mems adverbs: ads operandTuplesSoFar: operandTuplesSoFar\n\t| ods operandTuplesIncludingThisOne | \n\t\"Return the factor by which to multiply the number of envelopes for this operand.\"\n\tods _ ads select: [:ad| ad isOperandDistributor].\n\toperandTuplesIncludingThisOne _ ods last extendOperandTuples: operandTuplesSoFar operand: operand membersOrNil: mems.\n\tods removeLast.\n\tods  reverseDo: [:operandDistributor | \n\t\toperandTuplesIncludingThisOne _ operandDistributor amendOperandTuples: operandTuplesIncludingThisOne\n\t].\n\t^ operandTuplesIncludingThisOne! !\n\n!Sly3MessageEvaluator methodsFor: 'evaluating-modified' stamp: 'dmu 8/30/2010 01:27'!\nrelocateArgumentsIfNeeded\n\t\"Supports argument adverbs that desire to be in special core locations relative to each other or to their receiving members.\n\tExamples:\n\t\t#locally (same core)\n\t\t#globally (anywhere is fine)\n\t\t#closely (nearby cores)\n\t\t#distantly (on distant cores from each other.  may need a parameter here for Manhattan distance apart)\n\t\t#evenly (spread over cores so each core has same number)\n\t\t#statically (don't relocate under any circumstances)\n\tDefault case is #globally, i.e., no relocation.\n\tOthers to be implemented later.\"\n\t\n\t\t! !\n\n!Sly3MessageEvaluator methodsFor: 'evaluating-modified' stamp: 'dmu 8/30/2010 01:26'!\nrelocateReceiversIfNeeded\n\t\"Supports message adverbs that desire to have member in special core locations relative to each other or to arguments.\n\tExamples:\n\t\t#locally (same core)\n\t\t#globally (anywhere is fine)\n\t\t#closely (nearby cores)\n\t\t#distantly (on distant cores from each other.  may need a parameter here for Manhattan distance apart)\n\t\t#evenly (spread over cores so each core has same number)\n\t\t#statically (don't relocate under any circumstances)\n\tDefault case is #globally, i.e., no relocation.\n\tOthers to be implemented later.\"\n\t\n\t\t! !\n\n!Sly3MessageEvaluator methodsFor: 'evaluating-modified' stamp: 'dmu 9/21/2010 00:26'!\nsendMessages\n\t\"Deliver the message envelopes and collect results.\n\tThis must eventually handle adverbs for timing and recurring messages, determining when the ensemble message is 'done'. etc.\n\tFor now, do the simplest thing, a parallelCollect:\"\n\t\n\t| payloadBlock |\n\tpayloadBlock _ [:env| \n\t\tProcessor thisProcess creatorEnsemble: env receiver. \n\t\tenv deliver].\n\n\t\"check for serially flag and handle appropriately\"\n\t^(message messageAdverbs anySatisfy: [:ad| ad isKindOf: Sly3ModSerially])\n\t\tifTrue:[ envelopes collect: payloadBlock]\n\t\tifFalse:[ envelopes parallelCollect: payloadBlock]! !\n\n!Sly3MessageEvaluator methodsFor: 'evaluating-modified' stamp: 'dmu 9/23/2010 15:21'!\nstuffArguments\n \tenvelopes with: operandTuples do: [:e :ot| \n\t\t1 to: ot size -1 do: [:i|\n\t\t\te message arguments at: i put: (ot at: i + 1)]]! !\n\n!Sly3MessageEvaluator methodsFor: 'evaluating-modified' stamp: 'dmu 9/23/2010 15:18'!\nstuffReceivers\n \tenvelopes with: operandTuples do: [:e :ot| e receiver: ot first]! !\n\n!Sly3MessageEvaluator methodsFor: 'evaluating-modified' stamp: 'dmu 9/13/2010 00:13'!\nstuffSelectors\n\t\"placeholder; could vary\"\n\tenvelopes do: [:e| e message setSelector: message selector]! !\n\n!Sly3MessageEvaluator methodsFor: 'as yet unclassified' stamp: 'dmu 9/23/2010 15:17'!\nmakeEnvelopes\n\t^ (Array new: operandTuples size) collect: [:x|Sly3MessageEnvelope argumentCount: message arguments size]! !\n\n!Sly3MessageEvaluator methodsFor: 'as yet unclassified' stamp: 'dmu 9/24/2010 00:35'!\nsetDisableEnsembleBehaviorFlags\n\t| deactivateEnsembleBehaviorFlags |\n\tdeactivateEnsembleBehaviorFlags _ ((OrderedCollection with: message messageAdverbs) addAll: message argumentAdverbs; yourself)\n\t\tcollect: [:adverbs | adverbs anySatisfy: [:adverb| adverb isOperandDistributor and: [adverb shouldDisableEnsembleBehavior]]].\n\tenvelopes do: [:e|e deactivateEnsembleBehaviorFlags: deactivateEnsembleBehaviorFlags]! !\n\n!Sly3MessageEvaluator class methodsFor: 'as yet unclassified' stamp: 'dmu 9/8/2010 21:55'!\nevaluate: message\n\t| r |\n\tr _  self new message: message; evaluate.\n\t^ r! !\n\n!Sly3MessageParser methodsFor: 'accessing' stamp: 'dmu 9/3/2010 19:44'!\narguments\n\t^ arguments! !\n\n!Sly3MessageParser methodsFor: 'accessing' stamp: 'dmu 8/29/2010 21:21'!\nparsedMessage\n\t\"Answer the value of parsedMessage\"\n\n\tparsedMessage isNil ifTrue:[self parsedMessage: nil].\n\t^ parsedMessage! !\n\n!Sly3MessageParser methodsFor: 'accessing' stamp: 'dmu 8/29/2010 21:21'!\nparsedMessage: anObject\n\t\"Set the value of parsedMessage\"\n\n\tparsedMessage _ anObject! !\n\n!Sly3MessageParser methodsFor: 'accessing' stamp: 'dmu 8/29/2010 21:22'!\nunparsedMessage\n\t\"Answer the value of unparsedMessage\"\n\n\tunparsedMessage isNil ifTrue:[self unparsedMessage: nil].\n\t^ unparsedMessage! !\n\n!Sly3MessageParser methodsFor: 'accessing' stamp: 'dmu 8/29/2010 21:22'!\nunparsedMessage: anObject\n\t\"Set the value of unparsedMessage\"\n\n\tunparsedMessage _ anObject! !\n\n!Sly3MessageParser methodsFor: 'assigning modifiers to arguments' stamp: 'dmu 9/12/2010 21:17'!\nbreakKeywordModifiersForArguments\n\t| s allOperandMods directsAndStrings argDirectMods argIndirectMods |\n\ts _ ReadStream on: foldedFlatStringsAndModifiers.\n\tallOperandMods _ OrderedCollection with: (self breakModifiersForReceiverIn: s).\n\t\t\t\t\t\t\n\t[s atEnd] whileFalse: [\n\t\tdirectsAndStrings _ self nextOnesIn: s suchThat: [:x| (self isDirect: x) or: [self isNonKeywordString: x]].\n\t\targDirectMods _ directsAndStrings select: [:x | self isDirect: x].\n\t\t(self isKeyword: s peek) ifFalse: [self error: 'expected keyword'].\n\t\ts next.\n\t\targIndirectMods _ self nextOnesIn: s suchThat: [:x | self isIndirect: x].\n\t\tallOperandMods addLast: argDirectMods, argIndirectMods.\n\t].\n\t^ allOperandMods! !\n\n!Sly3MessageParser methodsFor: 'assigning modifiers to arguments' stamp: 'dmu 9/16/2010 23:24'!\nbreakModifiersForArguments\n\t\t| |\n\targuments isEmpty ifTrue: [ ^ self breakUnaryModifiersForArguments].\n\tunparsedSelector isInfix ifTrue: [ ^ OrderedCollection with: (OrderedCollection new) with: (OrderedCollection new)\n\t\t].\n\t^ self breakKeywordModifiersForArguments! !\n\n!Sly3MessageParser methodsFor: 'assigning modifiers to arguments' stamp: 'dmu 9/12/2010 20:54'!\nbreakModifiersForReceiverIn: s\n\t| rcvrDirectMods rcvrIndirectMods |\n\trcvrDirectMods _ self nextOnesIn: s suchThat: [:x| self isDirect: x].\n\trcvrIndirectMods _ self nextOnesIn: s suchThat: [:x| self isIndirect: x].\n\t^ rcvrDirectMods, rcvrIndirectMods! !\n\n!Sly3MessageParser methodsFor: 'assigning modifiers to arguments' stamp: 'dmu 9/12/2010 20:45'!\nbreakUnaryModifiersForArguments\n\t^ OrderedCollection with: (foldedFlatStringsAndModifiers select: [:x | x isKindOf: Sly3AbstractModifier])! !\n\n!Sly3MessageParser methodsFor: 'assigning modifiers to arguments' stamp: 'dmu 9/13/2010 00:02'!\nfoldInIndirectModifiers: blk\n\t| stringsAndMods args inStringsAndMods inArgs s |\n\tstringsAndMods _ OrderedCollection new.\n\targs _ OrderedCollection new.\n\tinStringsAndMods _ ReadStream on: flatKeywordsAndModifiers.\n\tinArgs _ ReadStream on: arguments.\n\n\t[inStringsAndMods atEnd] whileFalse: [\n\t\ts _ inStringsAndMods next.\n\t\t(s isKindOf: String) ifTrue: [\n\t\t\tstringsAndMods addLast: s.\n\t\t\t(s notEmpty and: [(s last = $:) or: [s first isLetter not]]) ifTrue: [args addLast: inArgs next].\n\t\t\t]\n\t\tifFalse: [\n\t\t\ts isIndirect  ifTrue: [\n\t\t\t\ts parameter: inArgs next.\n\t\t\t\t].\n\t\t\tstringsAndMods addLast: s.\n\t\t]\n\t].\n\tblk value: stringsAndMods contents value: args  asArray! !\n\n!Sly3MessageParser methodsFor: 'testing' stamp: 'dmu 9/12/2010 20:18'!\nisDirect: x\n\t^ (self isModifier: x) and: [x isDirect]! !\n\n!Sly3MessageParser methodsFor: 'testing' stamp: 'dmu 9/12/2010 20:18'!\nisIndirect: x\n\t^ (self isModifier: x) and: [x isIndirect]! !\n\n!Sly3MessageParser methodsFor: 'testing' stamp: 'dmu 9/12/2010 20:17'!\nisKeyword: x\n\t^ (self isString: x) and: [x last = $:]! !\n\n!Sly3MessageParser methodsFor: 'testing' stamp: 'dmu 9/12/2010 20:17'!\nisModifier: x\n\t^ x isKindOf: Sly3AbstractModifier! !\n\n!Sly3MessageParser methodsFor: 'testing' stamp: 'dmu 9/13/2010 00:03'!\nisNonKeywordString: x\n\t^ (self isString: x) and: [x isEmpty or: [x last ~= $:]]! !\n\n!Sly3MessageParser methodsFor: 'testing' stamp: 'dmu 9/12/2010 20:16'!\nisString: x\n\t^ x isKindOf: String! !\n\n!Sly3MessageParser methodsFor: 'testing' stamp: 'dmu 9/12/2010 20:21'!\nnextOnesIn: aStream suchThat: testBlk\n\t| result |\n\tresult _ OrderedCollection new.\n\t[\n\t\t(aStream atEnd not and:  [testBlk value: aStream peek]) ifFalse: [^ result].\n\t\tresult addLast: aStream next\n\t] repeat! !\n\n!Sly3MessageParser methodsFor: 'parsing' stamp: 'dmu 9/21/2010 00:23'!\naddDefaultModifiersTo:  allMods\n\t| r rcvr ms defaultClass ods addDefault |\n\tr _ OrderedCollection new.\n\trcvr _ true.\n\tallMods do: [:mods | \n\t\tms _ mods copy.\n\t\tdefaultClass _ rcvr ifTrue: [Sly3Adverb defaultReceiverOperandDistributor] ifFalse: [Sly3Adverb defaultArgumentOperandDistributor].\n\t\tods _ mods select: [:x|x isOperandDistributor].\n\t\taddDefault _ ods isEmpty.\n\t\taddDefault ifTrue: [ms addFirst: defaultClass new].\n\t\t(rcvr and: [mods noneSatisfy:[:x| x isGerund]]) ifTrue: [ms addFirst: Sly3Gerund defaultGerund new].\n\t\tr addLast: ms.\n\t\trcvr _ false.\n\t].\n\t^ r! !\n\n!Sly3MessageParser methodsFor: 'parsing' stamp: 'dmu 9/3/2010 19:44'!\ncreateParsedMessage.\n\t^ Sly3ParsedMessage \n\t\treceiver: self unparsedMessage receiver \n\t\tmembers: self unparsedMessage members \n\t\tmessageModifiers: messageModifiers  \n\t\tselector: actualSelector  \n\t\targuments: self  arguments \n\t\targumentAdverbs: argumentModifiers\n\t\n! !\n\n!Sly3MessageParser methodsFor: 'parsing' stamp: 'dmu 9/3/2010 19:52'!\ngatherActualSelector\n\t| sel |\n\tsel _ ((foldedFlatStringsAndModifiers select: [:a| a isKindOf: String]) gather: [:a | a ]) as: Symbol.\n\t^ sel ifEmpty: [#yourself] ifNotEmpty: [sel]! !\n\n!Sly3MessageParser methodsFor: 'parsing' stamp: 'dmu 4/12/2011 14:13'!\nparse\n\tunparsedSelector _  self unparsedMessage selector. \n\t[unparsedSelector = #mustBeBoolean ifTrue: [self halt].].\n\targuments _ self unparsedMessage arguments.\n\tflatStringsAndModifiers _ self  dissectSelectorIntoStringsAndModifiers: unparsedSelector.\n\tflatKeywordsAndModifiers _ self breakStringsIntoKeywords: flatStringsAndModifiers.\n\tself foldInIndirectModifiers: [:s :a | foldedFlatStringsAndModifiers _ s. arguments _ a].\n\tactualSelector _  self gatherActualSelector.\n\tmodifiersForRcvrAndArgs _ self breakModifiersForArguments.\n\tmodifiersWithDefaults _ self addDefaultModifiersTo: modifiersForRcvrAndArgs.\n\tmessageModifiers _ modifiersWithDefaults first.\n\targumentModifiers _ modifiersWithDefaults copyWithoutFirst.\n\tparsedMessage _ self createParsedMessage.! !\n\n!Sly3MessageParser methodsFor: 'dissecting selector' stamp: 'dmu 9/13/2010 00:09'!\nbreakStringsIntoKeywords: inCol\n\t| in out x inin outout c |\n\tin _ ReadStream on: inCol.\n\tout _ WriteStream on: (Array new: inCol size * 2).\n\t[in atEnd] whileFalse: [\n\t\tx _ in next.\n\t\t(x isKindOf: String) ifFalse: [ out nextPut: x] ifTrue: [\n\t\t\tinin _ ReadStream on: x.\n\t\t\toutout _ WriteStream on:  (String new: x size).\n\t\t\t[inin atEnd] whileFalse: [\n\t\t\t\tc _ inin next.\n\t\t\t\toutout nextPut: c.\n\t\t\t\tc = $: ifTrue: [\n\t\t\t\t\tout nextPut:  (outout contents).\n\t\t\t\t\toutout _ WriteStream on:  (String new: x size).\n\t\t\t\t]\n\t\t\t].\n\t\t\toutout isEmpty ifFalse: [out nextPut: (outout contents)]\n\t\t]\n\t].\n\t^ out contents asOrderedCollection! !\n\n!Sly3MessageParser methodsFor: 'dissecting selector' stamp: 'dmu 5/30/2011 12:11'!\ndissectSelectorIntoStringsAndModifiers: aString\n\t\"break up a sequence of characters that are part of a selector\"\n\t\"returns a collection of Strings and Sly3AbstractModifier s\"\n\t\"Examples:    snortLY -> adverb is snort selectorPart is empty\n\t\tsnortLYfoo -> adverb is snort selectorPart is foo\n\t\tfooSnortLY -> selector part is foo, adverb is Snort\"\n\t\t\n\t\"Sly3MessageParser new breakIntoStringsAndModifiers:  #serialLYRoundLYatRoundLY:atRoundLY:atRoundLY:atRoundLY:put:valueLY:\"\n\n\t| lastStart i parts modifierString foundSuffix end nextWord c endWord charAfterSuffixIndex pastModifierIndex |\n\tparts _ OrderedCollection new.\n\tlastStart _ 1.\n\ti _ 1.\n\t[i <= aString size]  whileTrue: [\n\t\tfoundSuffix _ nil.\n\t\tSly3AbstractModifier allUppercaseSuffixes do: [:suffix|\n\t\t\tend _ i + suffix size - 1.\n\t\t\t(aString size >= end  and: [ (aString copyFrom: i to: i + suffix size - 1) = suffix ])\n\t\t\t\tifTrue: [\n\t\t\t\t\tfoundSuffix ifNil: [foundSuffix _ suffix] ifNotNil: [self error: 'ambiguous']\n\t\t\t\t]\n\t\t].\n\t\tfoundSuffix ifNotNil: [\n\t\t\tcharAfterSuffixIndex _ i + foundSuffix size.\n\t\t\tmodifierString _ aString copyFrom: lastStart to: i - 1.\n\t\t\tparts addLast: (Sly3AbstractModifier instantiateSpecificFromBaseName: modifierString includingSuffix: foundSuffix).\n\t\t\tparts last isIndirect ifTrue: [\n\t\t\t\t((aString size >= charAfterSuffixIndex) and: [(aString at: charAfterSuffixIndex) = $:])\n\t\t\t\t\tifFalse: [self error: 'indirect modifier should have colon'].\n\t\t\t\t].\n\t\t\tpastModifierIndex _ charAfterSuffixIndex + (parts last isIndirect ifTrue: [1] ifFalse: [0]).\n\t\t\tlastStart _ i _ pastModifierIndex.\n\t\t\t] ifNil: [\n\t\t\t\tc _ aString at: i.\n\t\t\t\t(c isUppercase or: [c = $:]) ifTrue: [\n\t\t\t\t\tendWord _ c = $: ifTrue: [i] ifFalse: [i - 1].\n\t\t\t\t\tnextWord _ aString copyFrom: lastStart to: endWord. \n\t\t\t\t\tparts addLast: (\n\t\t\t\t\t\t(parts notEmpty and: [(parts last isKindOf: String) and: [('X', parts last) last ~= $:]]) ifFalse: [nextWord] ifTrue: [parts removeLast, nextWord ]).\n\t\t\t\t\tlastStart _ endWord + 1\n\t\t\t\t\t].\n\t\t\t\ti _ i + 1\n\t\t\t]\n\t\t].\n\tlastStart <= aString size ifTrue: [\n\t\tnextWord _ aString copyFrom: lastStart to: aString size.\n\t\tparts addLast: (\n\t\t\t(parts notEmpty and: [parts last isKindOf: String]) ifFalse: [nextWord] ifTrue: [parts removeLast, nextWord capitalized])].\n\t^ parts\n\t\t\t! !\n\n!Sly3MessageParser class methodsFor: 'as yet unclassified' stamp: 'dmu 8/29/2010 21:22'!\nparse: m\n\t^self new unparsedMessage: m; parse; parsedMessage! !\n\n!Sly3ModAnding methodsFor: 'as yet unclassified' stamp: 'dmu 9/4/2010 15:35'!\nreduceForEvaluator: ev\n\t| result results |\n\tresults _ ev result.\n\tresults isEmpty ifTrue:[self error:'No members, how should we handle?  proceed for nil'.  ^nil].\n\tresult _ results first.\n\tresults allButFirst do:[:each| result _ each & result].\n\tev result: result! !\n\n!Sly3ModAveraging methodsFor: 'as yet unclassified' stamp: 'dmu 9/8/2010 02:42'!\nreduceForEvaluator: ev\n\t| sum results |\n\tresults _ ev result.\n\tresults isEmpty ifTrue:[self error:'No members, how should we handle?  proceed for nil'.  ^nil].\n\tsum _ results sum.\n\tev result: sum  / results size ! !\n\n!Sly3ModCollectionly methodsFor: 'multiple adverb support' stamp: 'dmu 9/24/2010 00:46'!\namendOperandTuples: operandTuplesIncludingThisOne\n\t| ens |\n\tens _ (operandTuplesIncludingThisOne collect: [:ot| ot last]).\n\t^ operandTuplesIncludingThisOne collect: [:ot|\n\t\tot copy removeLast; addLast: ens; yourself]! !\n\n!Sly3ModCollectionly methodsFor: 'result handling' stamp: 'dmu 9/22/2010 22:03'!\nputResultsIntoAnEnsemble\n\t^ false! !\n\n!Sly3ModCollectionly methodsFor: 'as yet unclassified' stamp: 'dmu 9/23/2010 16:01'!\nextendOperandTuples: operandTuplesSoFar operand: operand membersOrNil: operandMembers\n\t| mems |\n\tmems _ operandMembers ifNil: [operand] ifNotNil: [operandMembers].\n\t^ operandTuplesSoFar\n\t ifEmpty: [OrderedCollection with: (OrderedCollection with: mems)]\n\tifNotEmpty: [ operandTuplesSoFar collect: [:tuple | tuple copy addLast: mems; yourself]]! !\n\n!Sly3ModCollectionly commentStamp: 'dmu 9/3/2010 16:55' prior: 0!\nUse members collection of the ensemble!\n!Sly3ModConcatenating methodsFor: 'as yet unclassified' stamp: 'dmu 9/4/2010 15:33'!\nreduceForEvaluator: ev\n\t\"Concatenate each element in results and return the result.\n\tAssumes these elements are collections of some kind.\"\n\t\n\t| result results |\n\tresults _ ev result.\n\tresults isEmpty ifTrue:[self error:'No members, how should we handle?  proceed for nil'.  ^nil].\n\tresult _ results first.\n\tresults allButFirst do:[:each| result _ result , each].\n\tev result: result! !\n\n!Sly3ModDuplicatively methodsFor: 'as yet unclassified' stamp: 'dmu 9/23/2010 15:15'!\namendOperandTuples: operandTuplesIncludingThisOne\n\t^ operandTuplesIncludingThisOne collect: [:ot| ot copy removeLast; addLast: ot last copy; yourself]! !\n\n!Sly3ModDuplicatively methodsFor: 'as yet unclassified' stamp: 'dmu 9/24/2010 14:46'!\nextendOperandTuples: operandTuplesSoFar operand: operand membersOrNil: operandMembers\n\t| r mems |\n\tmems _ operandMembers ifNil: [OrderedCollection with: operand] ifNotNil: [operandMembers].\n\t^ operandTuplesSoFar\n\t ifEmpty: [operandMembers collect: [:m| OrderedCollection with: m copy]]\n\tifNotEmpty: [ \n\t\toperandTuplesSoFar size = mems size ifFalse: [self error: 'mismatch in number'].\n\t\tr _ OrderedCollection new.\n\t\toperandTuplesSoFar with: mems do: [:ot :m| r addLast: (ot copy addLast: m copy; yourself)].\n\t\tr]! !\n\n!Sly3ModDuplicatively commentStamp: 'dmu 9/1/2010 15:58' prior: 0!\neach member gets a copy of the arguments!\n!Sly3ModEnsembling methodsFor: 'result handling' stamp: 'dmu 9/22/2010 22:05'!\nreduceForEvaluator: ev\n\t| results |\n\tresults _ ev result.\n\tev result: ( ev putResultsIntoAnEnsemble ifTrue: [results asEnsembleOfElements]\n\tifFalse: [results size = 1 ifTrue: [results first] ifFalse: [self error: 'no ensembles dismembered, but yet results have ', results size printString, ' elements']])! !\n\n!Sly3ModGathering methodsFor: 'as yet unclassified' stamp: 'dmu 11/29/2010 19:37'!\nreduceForEvaluator: ev\n\t| results |\n\tresults _ ev result.\n\tresults isEmpty ifTrue:[self error:'No members, how should we handle?  proceed for nil'.  ^nil].\n\tev result: (results gather: [:x | x]) asEnsembleOfElements! !\n\n!Sly3ModIndividually methodsFor: 'multiple adverb support' stamp: 'dmu 9/23/2010 15:10'!\namendOperandTuples: operandTuplesIncludingThisOne\n\toperandTuplesIncludingThisOne size > 1 ifTrue: [^ self error: 'what?'].\n\t^ operandTuplesIncludingThisOne first last members collect: [:m|\n\t\t\toperandTuplesIncludingThisOne first copy addLast: m; yourself\n\t\t\t]! !\n\n!Sly3ModIndividually methodsFor: 'as yet unclassified' stamp: 'dmu 9/24/2010 00:53'!\nextendOperandTuples: operandTuplesSoFar operand: operand membersOrNil: operandMembers\n\t|  mems |\n\tmems _ operandMembers ifNil: [OrderedCollection with: operand] ifNotNil: [operandMembers].\n\t^ operandTuplesSoFar\n\t ifEmpty: [operandMembers collect: [:m| OrderedCollection with: m]]\n\tifNotEmpty: [ \n\t\toperandTuplesSoFar size = mems size  ifFalse: [self error: 'mismatch in number'].\n\t\toperandTuplesSoFar with: mems collect: [:ot :m| ot copy addLast: m; yourself].\n\t\t]! !\n\n!Sly3ModIndividually commentStamp: 'dmu 4/12/2011 12:32' prior: 0!\nMeaning: use my members in parallel.\nThis is the default modifier for the receiver.\nFor arguments, it creates a parallel thread for each member of the argument ensemble.\nThe receiver arity must match this argument's arity.!\n!Sly3ModMaxing methodsFor: 'as yet unclassified' stamp: 'dmu 11/29/2010 18:53'!\nreduceForEvaluator: ev\n\t\"Sum the elements in results and return the result.\n\tAssumes these elements understand +.\"\n\t\n\t| results |\n\tresults _ ev result.\n\tresults isEmpty ifTrue:[self error:'No members, how should we handle?  proceed for nil'.  ^nil].\n\tev result: results max! !\n\n!Sly3ModMining methodsFor: 'as yet unclassified' stamp: 'dmu 11/29/2010 18:53'!\nreduceForEvaluator: ev\n\t\"Sum the elements in results and return the result.\n\tAssumes these elements understand +.\"\n\t\n\t| results |\n\tresults _ ev result.\n\tresults isEmpty ifTrue:[self error:'No members, how should we handle?  proceed for nil'.  ^nil].\n\tev result: results min! !\n\n!Sly3ModOring methodsFor: 'as yet unclassified' stamp: 'dmu 9/4/2010 15:35'!\nreduceForEvaluator: ev\n\t\"OR the elements in results and return the result.\n\tAssumes these elements understand |.\"\n\t\n\t| result results |\n\tresults _ ev result.\n\tresults isEmpty ifTrue:[self error:'No members, how should we handle?  proceed for nil'.  ^nil].\n\tresult _ results first.\n\tresults allButFirst do:[:each| result _ each | result].\n\tev result: result! !\n\n!Sly3ModPlainly methodsFor: 'testing' stamp: 'dmu 9/3/2010 15:41'!\nshouldDisableEnsembleBehavior\n\t^ true! !\n\n!Sly3ModPlainly commentStamp: 'dmu 9/3/2010 14:28' prior: 0!\nDisable all ensemble processing for the recursive duration of this send!\n!Sly3ModRandomly methodsFor: 'accessing' stamp: 'dmu 9/3/2010 18:12'!\nparameter\n\t\"Answer the value of parameter\"\n\n\tparameter isNil ifTrue:[self parameter: 1].\n\t^ parameter! !\n\n!Sly3ModRandomly methodsFor: 'accessing' stamp: 'dmu 9/3/2010 19:46'!\nrandomNumberSource\n\n\tRandomNumberSource isNil ifTrue:[RandomNumberSource _ Random new].\n\t^RandomNumberSource! !\n\n!Sly3ModRandomly methodsFor: 'multiple adverb support' stamp: 'dmu 9/23/2010 15:16'!\namendOperandTuples: operandTuplesIncludingThisOne\n\tself error: 'unimp'! !\n\n!Sly3ModRandomly methodsFor: 'multiple adverb support' stamp: 'dmu 9/24/2010 00:44'!\nextendOperandTuples: operandTuplesSoFar operand: operand membersOrNil: operandMembers\n\t| r mems |\n\tmems _ operandMembers ifNil: [OrderedCollection with: operand] ifNotNil: [operandMembers].\n\n\t^ operandTuplesSoFar\n\t ifEmpty: [\n\t\t(1 to: parameter) collect: [:m| OrderedCollection with: (mems atRandom: self randomNumberSource)]\n\t\t]\n\tifNotEmpty: [ \n\t\tr _ OrderedCollection new.\n\t\tparameter timesRepeat: [\n\t\t\tr addAll: (operandTuplesSoFar collect: [:t| t copy addLast: (mems atRandom: self randomNumberSource); yourself]).\n\t\t\t].\n\t\tr ]! !\n\n!Sly3ModRoundly methodsFor: 'as yet unclassified' stamp: 'dmu 9/23/2010 15:14'!\namendOperandTuples: operandTuplesIncludingThisOne\n\t| mems r |\n\tmems _ operandTuplesIncludingThisOne collect: [:tup | tup last].\n\tr _ OrderedCollection new.\n\toperandTuplesIncludingThisOne do: [:ot|\n\t\tmems do: [:m|\n\t\t\tr add: (ot copy removeLast; addLast: m; yourself)\n\t\t]\n\t].\n\t^ r! !\n\n!Sly3ModRoundly methodsFor: 'as yet unclassified' stamp: 'dmu 9/23/2010 16:32'!\nextendOperandTuples: operandTuplesSoFar operand: operand membersOrNil: operandMembers\n\t| r mems |\n\tmems _ operandMembers ifNil: [OrderedCollection with: operand] ifNotNil: [operandMembers].\n\t^ operandTuplesSoFar\n\t ifEmpty: [mems asOrderedCollection collect: [:m| OrderedCollection with: m]]\n\tifNotEmpty: [ \n\t\tr _ OrderedCollection new.\n\t\t1 to: operandMembers size do: [:i |\n\t\t\tr addAll: (operandTuplesSoFar collect: [:t| t copy addLast: (mems at: i); yourself])..\n\t\t\t].\n\t\tr ]! !\n\n!Sly3ModRoundly commentStamp: 'dmu 9/1/2010 15:58' prior: 0!\ndistribute args over members round-robin fashion, repeating members as needed.  Think of members here as a Resource Pool.  This will require collaboration with any message adverbs.!\n!Sly3ModSelecting methodsFor: 'as yet unclassified' stamp: 'dmu 9/16/2010 23:59'!\nreduceForEvaluator: ev\n\t| results members r |\n\tresults _ ev result.\n\tmembers _ ev message members.\n\tr _ OrderedCollection new.\n\tmembers with: results do: [:m :res | res ifTrue: [r add: m]].\n\tev result: r asEnsembleOfElements! !\n\n!Sly3ModSelectively methodsFor: 'as yet unclassified' stamp: 'dmu 9/23/2010 15:12'!\namendOperandTuples: operandTuplesIncludingThisOne\n\tself error: 'unimp'! !\n\n!Sly3ModSelectively methodsFor: 'as yet unclassified' stamp: 'dmu 9/23/2010 16:03'!\nextendOperandTuples: operandTuplesSoFar operand: operand membersOrNil: operandMembers\n\t| mems |\n\tmems _ operandMembers ifNil: [OrderedCollection with: operand] ifNotNil: [operandMembers].\n\n\t^ operandTuplesSoFar\n\t ifEmpty: [self error: 'cannot be used for receiver']\n\tifNotEmpty: [ \n\t\toperandTuplesSoFar size = mems size ifFalse: [self error: 'sizes'].\n\t\tmems _ mems copy asOrderedCollection.\n\t\toperandTuplesSoFar select: [:ot | mems removeFirst]\n\t]! !\n\n!Sly3ModSerially methodsFor: 'accessing' stamp: 'dmu 9/1/2010 15:51'!\ncachedEns\n\tself unimplemented: 'must get receiver and arg ens and construct a selected ensemble'.\n\t^ cachedEns! !\n\n!Sly3ModSerially methodsFor: 'accessing' stamp: 'dmu 9/1/2010 15:49'!\ncachedEns: anObject\n\t\"Set the value of cachedEns\"\n\n\tcachedEns _ anObject! !\n\n!Sly3ModSerially methodsFor: 'accessing' stamp: 'dmu 9/1/2010 15:49'!\ncachedMod\n\t\"Answer the value of cachedMod\"\n\n\tcachedMod isNil ifTrue:[self cachedMod: nil].\n\t^ cachedMod! !\n\n!Sly3ModSerially methodsFor: 'accessing' stamp: 'dmu 9/1/2010 15:49'!\ncachedMod: anObject\n\t\"Set the value of cachedMod\"\n\n\tcachedMod _ anObject! !\n\n!Sly3ModStandardDeviationing methodsFor: 'as yet unclassified' stamp: 'dmu 11/29/2010 18:53'!\nreduceForEvaluator: ev\n\t\"Sum the elements in results and return the result.\n\tAssumes these elements understand +.\"\n\t\n\t| results |\n\tresults _ ev result.\n\tresults isEmpty ifTrue:[self error:'No members, how should we handle?  proceed for nil'.  ^nil].\n\tev result: results standardDeviation! !\n\n!Sly3ModTotalling methodsFor: 'as yet unclassified' stamp: 'dmu 9/4/2010 15:35'!\nreduceForEvaluator: ev\n\t\"Sum the elements in results and return the result.\n\tAssumes these elements understand +.\"\n\t\n\t| result results |\n\tresults _ ev result.\n\tresults isEmpty ifTrue:[self error:'No members, how should we handle?  proceed for nil'.  ^nil].\n\tresult _ 0.\n\tresults do:[:each| result _ each + result].\n\tev result: result! !\n\n!Sly3ModValuely methodsFor: 'multiple adverb support' stamp: 'dmu 9/23/2010 15:16'!\namendOperandTuples: operandTuplesIncludingThisOne\n\tself error: 'unimp'! !\n\n!Sly3ModValuely methodsFor: 'multiple adverb support' stamp: 'dmu 9/24/2010 14:48'!\nextendOperandTuples: operandTuplesSoFar operand: operand membersOrNil: operandMembers\n\t| r mems |\n\tmems _ operandMembers ifNil: [OrderedCollection with: operand] ifNotNil: [operandMembers].\n\n\t^ operandTuplesSoFar\n\t ifEmpty: [mems collect: [:m| OrderedCollection with: (parameter value: m)]]\n\tifNotEmpty: [ \n\t\toperandTuplesSoFar size = mems size ifFalse: [self error: 'mismatch in number'].\n\t\tr _ OrderedCollection new.\n\t\toperandTuplesSoFar with: mems do: [:ot :m| r addLast: (ot copy addLast: (parameter value: m); yourself)].\n\t\tr]! !\n\n!Sly3ModWholly methodsFor: 'as yet unclassified' stamp: 'dmu 9/24/2010 00:47'!\namendOperandTuples: operandTuplesIncludingThisOne\n\t| ens |\n\tens _ (operandTuplesIncludingThisOne collect: [:ot| ot last]) asEnsembleOfElements.\n\t^ operandTuplesIncludingThisOne collect: [:ot|\n\t\tot copy removeLast; addLast: ens; yourself]! !\n\n!Sly3ModWholly methodsFor: 'as yet unclassified' stamp: 'dmu 9/22/2010 22:00'!\ndoNotDismember\n\t^ true! !\n\n!Sly3ModWholly methodsFor: 'as yet unclassified' stamp: 'dmu 9/23/2010 14:46'!\nextendOperandTuples: operandTuplesSoFar operand: operand membersOrNil: operandMembers\n\t^ operandTuplesSoFar\n\t ifEmpty: [OrderedCollection with: (OrderedCollection with: operand)]\n\tifNotEmpty: [ operandTuplesSoFar collect: [:tuple | tuple copy addLast: operand; yourself]]! !\n\n!Sly3ModWholly methodsFor: 'result handling' stamp: 'dmu 9/22/2010 22:03'!\nputResultsIntoAnEnsemble\n\t^ false! !\n\n!Sly3ModWholly commentStamp: 'dmu 9/1/2010 15:57' prior: 0!\nbatch all args to each member with the message!\n!Sly3OperandDistributor methodsFor: 'result handling' stamp: 'dmu 9/22/2010 22:03'!\nputResultsIntoAnEnsemble\n\t^ true! !\n\n!Sly3OperandDistributor methodsFor: 'testing' stamp: 'dmu 9/19/2010 20:52'!\nisOperandDistributor ^ true! !\n\n!Sly3OperandDistributor methodsFor: 'testing' stamp: 'dmu 9/19/2010 20:59'!\nshouldDisableEnsembleBehavior\n\t^ false! !\n\n!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/1/2010 23:05'!\nargumentAdverbs\n\t\"Answer the value of argumentAdverbs\"\n\n\targumentAdverbs isNil ifTrue:[self argumentAdverbs: nil].\n\t^ argumentAdverbs! !\n\n!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/3/2010 20:29'!\nargumentAdverbs: collectionPerArgument\n\t\"Set the value of argumentModifiers\"\n\t(collectionPerArgument anySatisfy: [:x | x anySatisfy: [:a | a isAdverb not]]) ifTrue: [self error: 'only adverbs for arguments'].\n\targumentAdverbs _ collectionPerArgument asArray! !\n\n!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/5/2010 15:32'!\nargumentMirrors\n\t\"Answer the value of argumentMirrors\"\n\n\targumentMirrors isNil ifTrue:[self argumentMirrors: nil].\n\t^ argumentMirrors! !\n\n!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/5/2010 15:32'!\nargumentMirrors: anObject\n\t\"Set the value of argumentMirrors\"\n\n\targumentMirrors _ anObject! !\n\n!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/19/2010 21:36'!\narguments\n\t\"Answer the value of arguments\"\n\tfalse ifTrue: [SupportMultipleAdverbs. self error: 'should rm this inst var after mirror switch'].\n\n\n\targuments isNil ifTrue:[self arguments: nil].\n\t^ arguments! !\n\n!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/6/2010 16:47'!\narguments: anObject\n\t\"Set the value of arguments\"\n\n\targuments _ anObject! !\n\n!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/1/2010 16:34'!\ngerunds\n\tgerunds ifNil: [gerunds _ {}].\n\t^ gerunds! !\n\n!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/1/2010 23:05'!\ngerunds: anObject\n\t\"Set the value of gerunds\"\n\n\tgerunds _ anObject! !\n\n!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/19/2010 21:36'!\nmembers\n\t\"Answer the value of members\"\n\tfalse ifTrue: [SupportMultipleAdverbs. self error: 'should rm this inst var after mirror switch'].\n\n\n\tmembers isNil ifTrue:[self members: nil].\n\t^ members! !\n\n!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/6/2010 16:47'!\nmembers: anObject\n\t\"Set the value of members\"\n\n\tmembers _ anObject! !\n\n!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/1/2010 16:46'!\nmessageAdverbs\n\t^ messageAdverbs ifNil: [messageAdverbs _ {}] ifNotNil: [messageAdverbs]! !\n\n!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/1/2010 23:05'!\nmessageAdverbs: anObject\n\t\"Set the value of messageAdverbs\"\n\n\tmessageAdverbs _ anObject! !\n\n!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/12/2010 21:19'!\nmessageModifiers: anObject\n\t\"Set the value of messageModifiers\"\n\n\t| |\n\tgerunds _ anObject select: [:x|x isGerund].\n\tmessageAdverbs _ anObject select: [:x| x isAdverb]\n\t\t! !\n\n!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/19/2010 21:37'!\nreceiver\n\t\"Answer the value of receiver\"\n\tfalse ifTrue: [SupportMultipleAdverbs. self error: 'should rm this inst var after mirror switch'].\n\n\t\n\t^ receiver! !\n\n!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/6/2010 16:47'!\nreceiver: anObject\n\t\"Set the value of receiver\"\n\n\treceiver _ anObject! !\n\n!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/5/2010 15:32'!\nreceiverMirror\n\t\"Answer the value of receiverMirror\"\n\n\treceiverMirror isNil ifTrue:[self receiverMirror: nil].\n\t^ receiverMirror! !\n\n!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 9/5/2010 15:32'!\nreceiverMirror: anObject\n\t\"Set the value of receiverMirror\"\n\n\treceiverMirror _ anObject! !\n\n!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 8/29/2010 21:08'!\nselector\n\t\"Answer the value of selector\"\n\n\tselector isNil ifTrue:[self selector: #noSelector].\n\t^ selector! !\n\n!Sly3ParsedMessage methodsFor: 'accessing' stamp: 'dmu 8/29/2010 21:08'!\nselector: anObject\n\t\"Set the value of selector\"\n\n\tselector _ anObject! !\n\n!Sly3ParsedMessage methodsFor: 'testing' stamp: 'dmu 9/1/2010 16:09'!\nhasGerund\n\t^ gerunds notEmpty ! !\n\n!Sly3ParsedMessage methodsFor: 'printing' stamp: 'dmu 9/1/2010 11:15'!\nprintOn: aStream\n\tsuper printOn: aStream.\n\taStream nextPutAll: ': ', self selector! !\n\n!Sly3ParsedMessage class methodsFor: 'as yet unclassified' stamp: 'dmu 9/19/2010 21:35'!\nreceiver: ens members: mems messageModifiers: m  selector: s  arguments: args  argumentAdverbs: argumentAdverbs\n\t| r |\n\tfalse  ifFalse: [\n\t\t^ self new receiver: ens; members: mems; messageModifiers: m; selector: s; arguments: args; argumentAdverbs: argumentAdverbs; yourself\n\t\t].\n\tSupportMultipleAdverbs. \"come back here later\"\n\tr _ self new.\n\tr receiverMirror: (Sly3EnsembleMirror forEnsemble: ens members: mems).\n\tr messageModifiers: m.\n\tr selector: s.\n\tr argumentMirrors: (args collect: [:a| Sly3EnsembleMirror forObject: a]).\n\tr argumentAdverbs: argumentAdverbs.\n\t^ r! !\n\n!Sly3ReflectiveMessageDispatcher methodsFor: 'dispatching' stamp: 'dmu 8/29/2010 18:40'!\ndispatch\n\tself tryReflectiveMessageSend.\n! !\n\n!Sly3ReflectiveMessageDispatcher methodsFor: 'dispatching' stamp: 'dmu 9/8/2010 02:54'!\ntryReflectiveMessageSend\n\t| message selector |\n\t\n\tmessage _ self unprocessedMessage.\n\tselector _ message selector.\n\t\n\tselector = #members ifTrue: [self justReturn: message members].\n\t\n\t((selector = #isKindOf:  and:[message arguments first = FakeClassPool])\n\t\t           or: [(selector = #==          ) and:[message arguments first = #failedDoit] ] )\n\t\t\t\tifTrue:[self justReturn: false].\n\t\t\t\t\n\t(#(hash halt error: halt: identityHash == isNil) includes: selector) ifTrue: [self justReturn: (message receiver class deactivateEnsembleSendsFor: message receiver during: [message receiver perform: message selector withArguments: message arguments])].\n\t\n\t(selector = #isKindOf:) ifTrue: [self justReturn: (Sly3Ensemble includesBehavior: message arguments first)]! !\n\n!Sly3ReflectiveSelectorChanger methodsFor: 'accessing' stamp: 'dmu 9/3/2010 12:17'!\nmessage: m\n\tmessage _ m! !\n\n!Sly3ReflectiveSelectorChanger methodsFor: 'accessing' stamp: 'dmu 9/3/2010 17:49'!\nselector: x\n\tselector _ x! !\n\n!Sly3ReflectiveSelectorChanger methodsFor: 'dispatching' stamp: 'dmu 9/3/2010 17:46'!\nmodifyMessageAsNeeded\n\t| newSelector |\n\tselector _ message selector.\n\tnewSelector _ self modifySelectorAsNeeded.\n\t^ selector = newSelector ifTrue: [message] ifFalse: [message copy selector: newSelector]! !\n\n!Sly3ReflectiveSelectorChanger methodsFor: 'dispatching' stamp: 'dmu 9/3/2010 17:51'!\nmodifySelectorAsNeeded\n\t(self isReflective or: [self isWholly or: [self isCollectionly]]) ifTrue: [^ selector].\n\t^ (self isEquals or: [self isToolMessage or: [self isToolProcess]]) ifTrue: [self modifiedSelector] ifFalse: [selector]\n! !\n\n!Sly3ReflectiveSelectorChanger methodsFor: 'modifying reflective selectors' stamp: 'dmu 9/3/2010 17:52'!\nisCollectionly\n\t^ selector beginsWith: Sly3ModCollectionly stringWithUppercaseSuffix! !\n\n!Sly3ReflectiveSelectorChanger methodsFor: 'modifying reflective selectors' stamp: 'dmu 9/8/2010 21:09'!\nisEquals\n\t^ selector = #= ifTrue:[self selector: #equals:. true] ifFalse: [false]! !\n\n!Sly3ReflectiveSelectorChanger methodsFor: 'modifying reflective selectors' stamp: 'dmu 9/3/2010 14:35'!\nisReflective\n\t^ selector beginsWith: Sly3Adverb reflectiveAdverb stringWithUppercaseSuffix! !\n\n!Sly3ReflectiveSelectorChanger methodsFor: 'modifying reflective selectors' stamp: 'dmu 9/3/2010 12:12'!\nisToolMessage\n\t| toolMessages |\n\ttoolMessages _ #(inspect explore printString asExplorerString hasContentsInExplorer explorerContents  halt error: halt: isKindOf:).\n\t^ toolMessages includes: selector! !\n\n!Sly3ReflectiveSelectorChanger methodsFor: 'modifying reflective selectors' stamp: 'dmu 9/3/2010 12:13'!\nisToolProcess\n\t| foundContext toolClasses |\t\n\ttoolClasses _ { Inspector. Debugger.  PluggableListController}.\n\tfoundContext _ thisContext findContextSuchThat:[:ctxt|  toolClasses includes: ctxt receiver class].\n\t^ foundContext notNil! !\n\n!Sly3ReflectiveSelectorChanger methodsFor: 'modifying reflective selectors' stamp: 'dmu 9/3/2010 17:52'!\nisWholly\n\t^ selector beginsWith: Sly3ModWholly stringWithUppercaseSuffix! !\n\n!Sly3ReflectiveSelectorChanger methodsFor: 'modifying reflective selectors' stamp: 'dmu 9/3/2010 14:34'!\nmodifiedSelector\n\t^ Sly3Adverb reflectiveAdverb modifySelector: selector! !\n\n!Sly3ReflectiveSelectorChanger commentStamp: 'dmu 8/27/2010 14:38' prior: 0!\nNo matter what Sly is, ST depends on some reflective messages. Handle them here. -- dmu\n\nPossible useful expressions for doIt or printIt.\n\nStructure:\n instVar1\t\ttype -- comment about the purpose of instVar1\n instVar2\t\ttype -- comment about the purpose of instVar2\n\nAny further useful comments about the general approach of this implementation.!\n!Sly3ReflectiveSelectorChanger class methodsFor: 'as yet unclassified' stamp: 'dmu 9/3/2010 12:25'!\nmodifyAsNeeded: aMessage\n\t^self new message: aMessage; modifyMessageAsNeeded! !\n\n!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/23/2010 13:11'!\naddTest\n\t\"Sly3SyntaxTests addTest run\"\n\t\"Sly3SyntaxTests runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ {{1. 2}. {3. 4}. {5. 6}} asOrderedCollection asEnsembleOfElements.\n\t\t\tresult _ ens wholLYadd: {7. 8}.\n\t\t\ttest assert:  result members asArray  = {{1. 2}. {3. 4}. {5. 6}. {7. 8}}.\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'addTest'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:50'!\nadverbKeywordTest\n\t\"Sly3SyntaxTests adverbKeywordTest run\"\n\t\"Sly3SyntaxTests runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{{1. 2}. {3. 4}. {5. 6}}.\n\t\t\tresult _ ens commaWholLY: {9. 10}.\n\t\t\ttest assert:  result members asArray  = #(#(1 2 9 10) #(3 4 9 10) #(5 6 9 10)).\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'adverbKeywordTest'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:50'!\nadverbUnaryTest\n\t\"self adverbUnaryTest run\" \n\t\"self runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens oddRandomLY: 1.\n\t\t\ttest assert:  (result members size = 1) & (result members first isBoolean).\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'adverbUnaryTest'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/22/2010 22:50'!\nargAdverbRoundlyTest\n\t\"self argAdverbRoundlyTest run\"\n\t\"self runAll\"\n\t| theTest ens result | \n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{10. 20. 30}.\n\t\t\tresult _ ens plusRoundLY: %(4. 5. 6. 7. 8. 9}.\n\t\t\ttest assert:  result members asArray = {14. 24. 34. 15. 25. 35. 16. 26. 36. 17. 27. 37. 18. 28. 38. 19. 29. 39. }.\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'argAdverbRoundlyTest'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:50'!\nargAdverbWhollyTest\n\t\"self argAdverbWhollyTest run\"\n\t\"self runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{{1. 2}. {3. 4}. {5. 6}}.\n\t\t\tresult _ ens commaWholLY: {9. 10}.\n\t\t\ttest assert:  result members asArray  = #(#(1 2 9 10) #(3 4 9 10) #(5 6 9 10)).\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'argAdverbWhollyTest'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/17/2010 00:02'!\nbinaryTest\n\t\"Sly3SyntaxTests binaryTest run\"\n\t\"Sly3SyntaxTests runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens + 10.\n\t\t\ttest assert:  result members asArray  = #(11 12 13).\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'binaryTest'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 5/30/2011 12:46'!\ndoubleAdverbParsingTest\n\t\"Sly3SyntaxTests doubleAdverbParsingTest run\"\n\t\"Sly3SyntaxTests runAll\"\n\t| theTest result p |\n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tp _ 3@4.\n\t\t\tresult _ %{ ( %{p}  roundLYDuplicativeLYx: 10) members. p}.\n\t\t\ttest assert:  result members asArray  =  { {10@4}. 3@4}.\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'doubleAdverbParsingTest'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:50'!\ngerundAndingTest \n\t\"self gerundAndingTest run\"\n\t\"self runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens andINGodd.\n\t\t\ttest assert:  result = false.\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'gerundAndingTest'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/17/2010 16:49'!\ngerundDoubleKeywordTest\n\t\"self gerundDoubleKeywordTest run\"\n\t\"self runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest  \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{#(1). #(2)}.\n\t\t\tresult _ ens concatenatINGat: 1 put: #(12 13).\n\t\t\ttest assert:  result  = #( 12 13 12 13)\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'gerundDoubleKeywordTest'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:50'!\ngerundOnlyAveragingTest\n\t\"self gerundOnlyAveragingTest run\"\n\t\"self runAll\"\n\t| theTest ens result | \n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens averagING.\n\t\t\ttest assert:  result = 2.\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'gerundOnlyAveragingTest'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:50'!\ngerundOnlyConcatenatingTest\n\t\"self gerundOnlyConcatenatingTest run\"\n\t\"self runAll\"\n\t| theTest ens result | \n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{'hello'. ' '. 'world'}.\n\t\t\tresult _ ens concatenatING.\n\t\t\ttest assert:  result = 'hello world'\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'gerundOnlyConcatenatingTest'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:50'!\ngerundOnlyTest\n\t\"self gerundOnlyTest run\"\n\t\"self runAll\" \n\t| theTest ens result |\n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens totallING.\n\t\t\ttest assert:  result = 6\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'gerundOnlyTest'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:50'!\ngerundOnlyTotallingTest\n\t\"self gerundOnlyTotallingTest run\"\n\t\"self runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"] \n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens totallING.\n\t\t\ttest assert:  result = 6\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'gerundOnlyTotallingTest'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:50'!\ngerundOringTest\n\t\"self gerundOringTest run\"\n\t\"self runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest  \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens orINGodd.\n\t\t\ttest assert:  result = true\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'gerundOringTest'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:50'!\ngerundSingleKeywordTest\n\t\"self gerundSingleKeywordTest run\"\n\t\"self runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest  \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens totallINGplus: 1.\n\t\t\ttest assert:  result = 9\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'gerundSingleKeywordTest'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:50'!\ngerundUnaryTest\n\t\"self gerundUnaryTest run\"\n\t\"self runAll\"\n\t| theTest ens result | \n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens andINGodd.\n\t\t\ttest assert:  result = false\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'gerundUnaryTest'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:50'!\nmembersTest\n\t\"Sly3SyntaxTests ensMembersTest run\"\n\t\"Sly3SyntaxTests runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest  \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{{1. 2}. {3. 4}. {5. 6}}.\n\t\t\tresult _ ens members.\n\t\t\ttest assert:  result = {{1. 2}. {3. 4}. {5. 6}}\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'ensMembersTest'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:51'!\nmsgAdvKeywordTest\n\t\"self msgAdvKeywordTest run\"\n\t\"self runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest  \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens randomLY: 1 plus:1.\n\t\t\ttest assert:  (result members size = 1)\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'msgAdvKeywordTest'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:51'!\nmsgAdvOnlyRandomlyTest\n\t\"self msgAdvOnlyRandomlyTest run\"\n\t\"self runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest  \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens randomLY: 1.\n\t\t\ttest assert:  (result members size = 1)\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'msgAdvOnlyRandomlyTest'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:51'!\nmsgAdvRandomly2Test\n\t\"self msgAdvRandomly2Test run\"\n\t\"self runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env|  \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens oddRandomLY: 2.\n\t\t\ttest assert:  (result members size = 2)\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'msgAdvRandomly2Test'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:51'!\nmsgAdvRandomlyTest\n\t\"self msgAdvRandomlyTest run\"\n\t\"self runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"] \n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens oddRandomLY: 1.\n\t\t\ttest assert:  (result members size = 1)\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'msgAdvRandomlyTest'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:51'!\nmsgAdvSeriallyTest\n\t\"self msgAdvSeriallyTest run\"\n\t\"self runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"] \n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3. 4. 5. 6. 7. 8. 9}.\n\t\t\tresult _ ens serialLY.\n\t\t\ttest assert:  (result members asArray = {1. 2. 3. 4. 5. 6. 7. 8. 9})\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'msgAdvSeriallyTest'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:51'!\nnormalBinaryTest\n\t\"self normalBinaryTest run\"\n\t\"self runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"] \n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens +1.\n\t\t\ttest assert:  result members = {2. 3. 4}\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'normalBinaryTest'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:51'!\nnormalKeywordTest\n\t\"self normalKeywordTest run\"\n\t\"self runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest  \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens plus: 1.\n\t\t\ttest assert:  result members = {2. 3. 4}\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'normalKeywordTest'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/22/2010 22:54'!\nnormalUnaryTest\n\t\"self normalUnaryTest run\"\n\t\"self runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest  \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens odd.\n\t\t\ttest assert:  result members = {true. false. true}\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'normalUnaryTest'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:59'!\nplainlyTest\n\t\"Sly3SyntaxTests plainlyTest run\"\n\t\"Sly3SyntaxTests runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{}.\n\t\t\tresult _ ens plainLYisEnsemble.\n\t\t\t\n\t\t\ttest assert:  result.\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'adverbKeywordTest'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/24/2010 00:37'!\nprintStringTest\n\t\"Sly3SyntaxTests printStringTest run\"\n\t\"Sly3SyntaxTests runAll\" \n\t| theTest ens result |\n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens plainLYprintString.\n\t\t\ttest assert:  result = '%{1. 2. 3. }'\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'printStringTest'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/23/2010 13:12'!\nremoveTest\n\t\"Sly3SyntaxTests removeTest run\"\n\t\"Sly3SyntaxTests runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ {{1. 2}. {3. 4}. {5. 6}} asOrderedCollection asEnsembleOfElements.\n\t\t\tresult _ ens wholLYremove: {3. 4}.\n\t\t\ttest assert:  result members asArray  = {{1. 2}.  {5. 6}. }.\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'removeTest'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/24/2010 00:41'!\nseveralIndirectAdverbTests\n\t\"self severalIndirectAdverbTests run\"\n\t\"self runAll\" \n\t| theTest |\n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\t%{1. 2. 3} randomLY: 2.\n\t\t\t%{1. 2. 3} oddRandomLY: 2.\n\t\t\t%{1. 3. 4} plus: %{4. 5} randomLY: 3.\n\t\t\t%{2. 4} randomLY: 3 plus: %{2. 6} randomLY: 4 .\n\t\t\ttest assert:  true.\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'severalIndirectAdverbTests'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 4/12/2011 12:34'!\nsinglyTest\n\t\"Sly3SyntaxTests singlyTest run\"\n\t\"Sly3SyntaxTests runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens plusIndividualLY: %{10. 20. 30 }.\n\t\t\ttest assert:  result members asArray  = {11. 22. 33}.\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'singlyTest'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:51'!\nsizeTest\n\t\"Sly3SyntaxTests sizeTest run\"\n\t\"Sly3SyntaxTests runAll\"\n\t| theTest ens result | \n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{{1. 2}. {3. 4}. {5. 6}}.\n\t\t\tresult _ ens collectionLYsize.\n\t\t\ttest assert:  result = 3\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'sizeTest'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/24/2010 14:51'!\nstrategyMultipleAdverbTest\n\t\"Sly3SyntaxTests strategyMultipleAdverbTest run\"\n\t\"Sly3SyntaxTests runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest  \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{{3. 30}. {4. 40}. {5. 50}}.\n\t\t\tresult _ ens serialLYatRoundLY: %{1. 2} put: %{1. 2. 3. 4. 5. 6} valueLY: [:x| x + 17].\n\t\t\ttest assert:  result members asArray  = {18. 19. 20. 21. 22. 23. }.\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'strategyMultipleAdverbTest'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'isolated failures' stamp: 'dmu 9/16/2010 23:50'!\ngerundPerformWithWithTest\n\t\"CURRENTLY FAILS\"\n\t\"self gerundPerformWithWithTest run\"\n\t\"self runAll\" \n\t| theTest ens result |\n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{#(1). #(2)}.\n\t\t\tresult _ ens perform: #at:put: with: 1 with: 4 ING:#totalling.\n\t\t\ttest assert:  result = 8\n\t\t\t\t ifFail:[test log:' failed: %{#(1). #(2)} perform: #at:put: with: 1 with 4 ING:#totalling  ==> ', result  printString].\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'gerundPerformWithWithTest'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'isolated failures' stamp: 'dmu 9/16/2010 23:51'!\nmsgAdvSelectivelyTest\n\t\"self msgAdvSelectivelyTest run\"\n\t\"self runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest  \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens serialLYselectiveLYvalueLY:  [:mbr| mbr odd].\n\t\t\ttest assert:  result members asArray = #(1 3)\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'msgAdvSelectivelyTest'.\n\t^theTest! !\n\n!Sly3SyntaxTests class methodsFor: 'tutorial' stamp: 'dmu 9/16/2010 23:51'!\ntutorialExamples\n\n\t%{1. 2. 3} isNil. \"%{false. false. false}.\"\n\t%{1. 2. 3} totallING. \"6\" \n\t%{1. 2. 3} randomLY: 2. \"%{1. 3}\"\n\t%{1. 2. 3} oddRandomLY: 2.  \"%{true. false}\"\n\t%{1. 3. 4} plus: %{4. 5} randomLY: 3.   \"%{5. 8. 8. 6. 7. 8. 6. 8. 8. }\"\n\t%{2. 4} randomLY: 3 plus: %{2. 6} randomLY: 4. \"  %{10. 8. 8. 6. 10. 8. 10. 6. 4. 6. 10. 10. }\"\n\t%{{1. 2}. {3. 4}. {5. 6}} commaWholLY: {9. 10}.  \"%{#(1 2 9 10). #(3 4 9 10). #(5 6 9 10). }\"\n  \t%{1. 2. 3} collectionLY. \" #(1 2 3)\"\n \t%{10. 20. 30} plusRoundLY: %{4. 5. 6.7. 8. 9} . \" %{14. 24. 34. 15. 25. 35. 16.7. 26.7. 36.7. 18. 28. 38. 19. 29. 39. }\"! !\n\n!Sly3SyntaxTests class methodsFor: 'harness' stamp: 'dmu 9/3/2010 11:50'!\nrunAll\n\tsuper runAll! !\n\n!Sly3UnprocessedEnsembleMessage methodsFor: 'accessing' stamp: 'dmu 8/29/2010 12:46'!\narguments\n\t\"Answer the value of arguments\"\n\n\targuments isNil ifTrue:[self arguments: #()].\n\t^ arguments! !\n\n!Sly3UnprocessedEnsembleMessage methodsFor: 'accessing' stamp: 'dmu 8/29/2010 12:45'!\narguments: anObject\n\t\"Set the value of arguments\"\n\n\targuments _ anObject! !\n\n!Sly3UnprocessedEnsembleMessage methodsFor: 'accessing' stamp: 'dmu 8/29/2010 12:46'!\nmembers\n\t\"Answer the value of members\"\n\n\tmembers isNil ifTrue:[self members: #()].\n\t^ members! !\n\n!Sly3UnprocessedEnsembleMessage methodsFor: 'accessing' stamp: 'dmu 8/29/2010 12:45'!\nmembers: anObject\n\t\"Set the value of members\"\n\n\tmembers _ anObject! !\n\n!Sly3UnprocessedEnsembleMessage methodsFor: 'accessing' stamp: 'dmu 9/16/2010 23:59'!\nreceiver\n\t\"Answer the value of receiver\"\n\t\"Send no messages; might be an ensemble\"\n\n\tnil == receiver ifTrue:[self receiver: ( %{})].\n\t^ receiver! !\n\n!Sly3UnprocessedEnsembleMessage methodsFor: 'accessing' stamp: 'dmu 8/30/2010 19:35'!\nreceiver: anObject\n\t\"Set the value of receiver\"\n\n\treceiver _ anObject! !\n\n!Sly3UnprocessedEnsembleMessage methodsFor: 'accessing' stamp: 'dmu 8/29/2010 12:46'!\nselector\n\t\"Answer the value of selector\"\n\n\tselector isNil ifTrue:[self selector: #noSelector].\n\t^ selector! !\n\n!Sly3UnprocessedEnsembleMessage methodsFor: 'accessing' stamp: 'dmu 8/29/2010 12:45'!\nselector: anObject\n\t\"Set the value of selector\"\n\n\tselector _ anObject! !\n\n!Sly3UnprocessedEnsembleMessage methodsFor: 'printing' stamp: 'dmu 9/1/2010 10:35'!\nprintOn: aStream\n\tsuper printOn: aStream.\n\taStream nextPutAll: '(', self selector, ')'! !\n\n!Sly3UnprocessedEnsembleMessage class methodsFor: 'instance creation' stamp: 'dmu 8/30/2010 19:37'!\nfromMessage: m members: members\n\t^ self new receiver: m lookupClass \"VM hack\"; selector: m selector; arguments: m arguments; members: members; yourself! !\n\n!Sly3UnprocessedEnsembleMessage class methodsFor: 'instance creation' stamp: 'dmu 8/30/2010 19:38'!\nfromMessage: m theEnsemble: e\n\t^ self new receiver: e; selector: m selector; arguments: m arguments; members: e members; yourself! !\n\n!Sly3aBoid methodsFor: 'as yet unclassified' stamp: 'dmu 9/2/2010 23:59'!\ncomputeCentroid\n[\"buttonize next two lines for a trigger setting button\"\n\"Click To Set Trigger\"\n\"  ONEHALT _ true\"     \n].\n\n\"ONEHALT ifTrue:[ONEHALT _ false. self halt].\"\n\t^ self flock boids averagINGserialLYposition! !\n\n!Sly3aBoid methodsFor: 'as yet unclassified' stamp: 'dmu 9/3/2010 00:01'!\ncomputeNeighbors\n\t\"should return ensemble\"\n\t^ self flock boids selectINGisNear: self! !\n\n!Sly3aBoid methodsFor: 'as yet unclassified' stamp: 'dmu 9/3/2010 15:56'!\nkeepAwayFromNeighbors\n\tself neighbors collectionLYsize = 0 ifTrue: [^ 0@0].\n\t^ self position - self neighbors averagINGserialLYposition! !\n\n!Sly3aBoid methodsFor: 'as yet unclassified' stamp: 'dmu 9/8/2010 03:02'!\nmatchVelocityWithNeighbors\n\tself neighbors  collectionLYsize = 0 ifTrue:  [^ 0@0].\n\t^ self neighbors averagINGvelocity / 8.0! !\n\n!Sly3aBoids methodsFor: 'as yet unclassified' stamp: 'dmu 9/8/2010 02:27'!\nboidClass ^ Sly3aBoid! !\n\n!Sly3aBoids methodsFor: 'as yet unclassified' stamp: 'dmu 9/8/2010 02:30'!\ndrawerClass ^ Sly3aDrawer! !\n\n!Sly3aBoids methodsFor: 'as yet unclassified' stamp: 'dmu 9/8/2010 03:03'!\nflockSize ^ 30! !\n\n!Sly3aDrawer methodsFor: 'as yet unclassified' stamp: 'dmu 9/8/2010 02:28'!\ngo\n\tProcessor thisProcess useOnlyMainCore. \"for bitblt efficiency\"\n\t[flock isDone] whileFalse: [flock boids serialLYdraw]! !\n\n!SlyBoid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:51'!\nflock\n\t\"Answer the value of flock\"\n\n\tflock isNil ifTrue:[self flock: #()].\n\t^ flock! !\n\n!SlyBoid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 22:38'!\nflock: anObject\n\t\"Set the value of flock\"\n\n\tflock _ anObject! !\n\n!SlyBoid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:57'!\nlastDrawnPosition\n\t\"Answer the value of lastDrawnPosition\"\n\n\tlastDrawnPosition isNil ifTrue:[self lastDrawnPosition: self position].\n\t^ lastDrawnPosition! !\n\n!SlyBoid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:00'!\nlastDrawnPosition: anObject\n\t\"Set the value of lastDrawnPosition\"\n\n\tlastDrawnPosition _ anObject! !\n\n!SlyBoid methodsFor: 'accessing' stamp: 'dmu 3/23/2010 00:05'!\nlastLastDrawnPosition\n\t\"Answer the value of lastLastDrawnPosition\"\n\n\tlastLastDrawnPosition isNil ifTrue:[self lastLastDrawnPosition: self lastDrawnPosition].\n\t^ lastLastDrawnPosition! !\n\n!SlyBoid methodsFor: 'accessing' stamp: 'dmu 3/22/2010 23:53'!\nlastLastDrawnPosition: anObject\n\t\"Set the value of lastLastDrawnPosition\"\n\n\tlastLastDrawnPosition _ anObject! !\n\n!SlyBoid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:53'!\nneighbors\n\t\"Answer the value of neighbors\"\n\n\tneighbors isNil ifTrue:[self neighbors: #()].\n\t^ neighbors! !\n\n!SlyBoid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 22:38'!\nneighbors: anObject\n\t\"Set the value of neighbors\"\n\n\tneighbors _ anObject! !\n\n!SlyBoid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 22:39'!\nposition\n\t\"Answer the value of position\"\n\n\tposition isNil ifTrue:[self position: 500@500].\n\t^ position! !\n\n!SlyBoid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 22:38'!\nposition: anObject\n\t\"Set the value of position\"\n\n\tposition _ anObject! !\n\n!SlyBoid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 22:39'!\nvelocity\n\t\"Answer the value of velocity\"\n\n\tvelocity isNil ifTrue:[self velocity: 0@0].\n\t^ velocity! !\n\n!SlyBoid methodsFor: 'accessing' stamp: 'dmu 3/16/2010 22:38'!\nvelocity: anObject\n\t\"Set the value of velocity\"\n\n\tvelocity _ anObject! !\n\n!SlyBoid methodsFor: 'as yet unclassified' stamp: 'dmu 8/23/2010 15:42'!\ncomputeCentroid\n[\"buttonize next two lines for a trigger setting button\"\n\"Click To Set Trigger\"\n\"  ONEHALT _ true\"     \n].\n\n\"ONEHALT ifTrue:[ONEHALT _ false. self halt].\"\n\n\t\"^500@500\"\n\t\"^ self flock boids  positionING: #averaging\"\n\t\"^ self flock boids  positionLY: #serially ING: #averaging\"\n\t^ (self flock boids members collect: [:m| m position]) average! !\n\n!SlyBoid methodsFor: 'as yet unclassified' stamp: 'dmu 8/23/2010 15:43'!\ncomputeNeighbors\n\t\"^self flock boids yourselfLY:{ #selectively:. [:b| b isNear: self]}\"\n\n\t^self flock boids members select:[:m| m isNear: self]! !\n\n!SlyBoid methodsFor: 'as yet unclassified' stamp: 'dmu 3/22/2010 23:55'!\ndraw\n\t| p |\n\tself lastDrawnPosition = self position ifTrue: [^ self].\n\tp _ self position.\n\t\n\tfalse ifTrue: [\n\t\tSlyGraphics drawWhiteCircle: self lastDrawnPosition.\n\t\tSlyGraphics drawCircle: p.\n\t\t\"SlyGraphics drawFrom: self lastDrawnPosition to: p.\"\n\t]\n\tifFalse: [\n\t\tSlyGraphics drawFrom: self lastDrawnPosition to: p.\n\t\tSlyGraphics eraseFrom: self lastLastDrawnPosition to: self lastDrawnPosition.\n\t].\n\t\n\tself lastLastDrawnPosition: self lastDrawnPosition.\n\tself lastDrawnPosition: p! !\n\n!SlyBoid methodsFor: 'as yet unclassified' stamp: 'ssa 3/25/2010 16:28'!\nfly\n\t| centroid |\n\t[Sly keepFlying] whileTrue:[\n\t\tcentroid _ self computeCentroid.\n\t\tself moveToNewPosition: centroid.\n\t\tself flock maybeYield\n\t]! !\n\n!SlyBoid methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:15'!\ngo\n\tself fly! !\n\n!SlyBoid methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 22:43'!\nisNear: aBoid\n\t^ (self ~== aBoid) and: [(self position dist: aBoid position) <= 10]! !\n\n!SlyBoid methodsFor: 'as yet unclassified' stamp: 'dmu 3/17/2010 00:10'!\nkeepAwayFromNeighbors\n\t| sum |\n\tself neighbors ifEmpty: [^ 0@0].\n\tsum _ 0.\n\tself neighbors  do: [:m | sum _ sum + (self position - m position)].\n\t^ sum / self neighbors size asFloat! !\n\n!SlyBoid methodsFor: 'as yet unclassified' stamp: 'dmu 3/24/2010 15:30'!\nlimitPositionFrom: min to: max\n\t| r pos |\n\tpos _ self position.\n\tr _ ((pos max: min@min) min: max@max).\n\tr = pos ifTrue: [^ self].\n\tpos x < min ifTrue: [r _                 min + (min - pos x)  @  pos y. self velocity: self velocity x negated @ self velocity y].\n\tpos y < min ifTrue: [r _ pos x @ (min + (min - pos y)).               self velocity: self velocity x             @ self velocity y negated].\n\tpos x > max ifTrue: [r _                 max - (pos x - max) @ pos y.  self velocity: self velocity x negated @ self velocity y ].\n\tpos y > max ifTrue: [r _ pos x @ (max - (pos y - max)).              self velocity: self velocity x              @ self velocity y negated].\n\tself position: r! !\n\n!SlyBoid methodsFor: 'as yet unclassified' stamp: 'dmu 3/24/2010 15:36'!\nlimitVelocityTo: n\n\t| ns v vs q |\n\tns _ n * n * 2.\n\tv _ self velocity.\n\tvs _ v x squared + v y squared.\n\tvs <= ns ifTrue: [^ self].\n\tq _ (ns / vs) sqrt.\n\tself velocity: v * q.! !\n\n!SlyBoid methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:53'!\nmatchVelocityWithNeighbors\n\tself neighbors  ifEmpty: [^ 0@0].\n\t^ (self neighbors  collect: [:m| m velocity]) average / 8.0! !\n\n!SlyBoid methodsFor: 'as yet unclassified' stamp: 'dmu 3/24/2010 15:04'!\nmoveToNewPosition: centroid\n\t| a b c |\n\tself neighbors: self computeNeighbors.\n\ta _ self moveTowardCentroidOfAllOthers: centroid.\n\tb _ self keepAwayFromNeighbors.\n\tc _ self matchVelocityWithNeighbors.\n\tself velocity: self velocity + a + b + c.\n\tself limitVelocityTo: 10.\n\tself position: self position + self velocity.\n\tself limitPositionFrom: 0 to: 1000! !\n\n!SlyBoid methodsFor: 'as yet unclassified' stamp: 'dmu 8/23/2010 15:43'!\nmoveTowardCentroidOfAllOthers: centroid\n\t| perceivedCentroid s |\n\ts _ self flock boids members size. \"was ENSsize\"\n\ts < 2 ifTrue: [^ 0@0].\n\tperceivedCentroid _ (centroid * s - self position) / (s - 1).\n\t^ (perceivedCentroid - self position) / 100.0! !\n\n!SlyBoid methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 22:54'!\nperturb\n\tself position: (self position perturb: 100).\n\tself velocity: (self velocity perturb: 2).! !\n\n!SlyBoids methodsFor: 'as yet unclassified' stamp: 'dmu 8/23/2010 15:52'!\nboidClass\n\t^ SlyBoid! !\n\n!SlyBoids methodsFor: 'as yet unclassified' stamp: 'ads 2/2/2011 14:55'!\nflockSize\n\t\"RVMOperations coreCount - 6 max: 10\".\n\t^ 250! !\n\n!SlyBoids methodsFor: 'as yet unclassified' stamp: 'dmu 9/16/2010 23:59'!\nrun\n\t\"Transcript show: (Time millisecondsToRun: [SlyBoids new run]); cr\"\n\t\"[ SlyBoids new run ] fork\"\n\t| c flock drawer flockAndDrawer n |\n\tc _ OrderedCollection new.\n\tn _ self flockSize.\n\t1 to: n do: [:i| c add: self boidClass new perturb].\n\tflock _ SlyFlock boids: c asEnsembleOfElements.\n\tflock boids flock: flock.\n\tdrawer _ SlyDrawer flock: flock.\n\tflockAndDrawer _ SlyEnsemble with: {flock. drawer}.\n\t\"SlyGraphics clearScreen.\"\n\tflockAndDrawer  go ! !\n\n!SlyBoids class methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 22:30'!\nrun\n\t^ self new run! !\n\n!SlyDrawer methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:06'!\nflock\n\t\"Answer the value of flock\"\n\n\tflock isNil ifTrue:[self flock: nil].\n\t^ flock! !\n\n!SlyDrawer methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:06'!\nflock: anObject\n\t\"Set the value of flock\"\n\n\tflock _ anObject! !\n\n!SlyDrawer methodsFor: 'as yet unclassified' stamp: 'dmu 8/23/2010 15:49'!\ngo\n\tProcessor thisProcess useOnlyMainCore. \"for bitblt efficiency\"\n\t[flock isDone] whileFalse: [flock boids members do: [:m | m draw. \"self flock maybeYield\"] ]! !\n\n!SlyDrawer class methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:07'!\nflock: f\n\t^ self new flock: f! !\n\n!SlyEnsemble methodsFor: 'as yet unclassified' stamp: 'ssa 7/8/2010 00:50'!\nENSsize\n\t^members size! !\n\n!SlyEnsemble methodsFor: 'as yet unclassified' stamp: 'dmu 8/29/2010 12:53'!\ndoesNotUnderstand: aMessage\n\t\"Try to process this message as an ensemble dispatch message to help in the case of inlined primitive calls  like perform:with:with:\"\n\t^ Sly3EnsembleMessageDispatcher dispatch: (Sly3UnprocessedEnsembleMessage fromMessage: aMessage theEnsemble: self)! !\n\n!SlyEnsemble methodsFor: 'as yet unclassified' stamp: 'dmu 3/29/2010 01:04'!\nensembleSpecies\n\t^ SlyEnsemble! !\n\n!SlyEnsemble methodsFor: 'as yet unclassified' stamp: 'dmu 3/26/2010 00:34'!\nifEmpty: blk\n\t^ self sizeAsAWhole = 0 ifTrue: [blk value]! !\n\n!SlyEnsemble methodsFor: 'as yet unclassified' stamp: 'ssa 6/11/2010 14:50'!\nisEnsemble\n\t\"Object answers false\"\n\t^true! !\n\n!SlyEnsemble methodsFor: 'as yet unclassified' stamp: 'ssa 6/17/2010 10:29'!\nmembers\n\t\"you should never trust that the members collection stays the same within the ensemble\"\n\t^members copy! !\n\n!SlyEnsemble methodsFor: 'as yet unclassified' stamp: 'ssa 7/7/2010 13:57'!\nmembers: aCollection\n\tself primitiveSetExtraWordSelector: #sentToEnsemble:.\n\taCollection primitiveSetExtraPreheaderWord: self.\n\tmembers _ aCollection.\n\t^ self! !\n\n!SlyEnsemble methodsFor: 'as yet unclassified' stamp: 'dmu 3/25/2010 23:48'!\nselect: aBlock\n\t^ self members select: aBlock! !\n\n!SlyEnsemble methodsFor: 'as yet unclassified' stamp: 'dmu 3/25/2010 21:13'!\nsize\n\t^ self members size! !\n\n!SlyEnsemble methodsFor: 'as yet unclassified' stamp: 'dmu 3/25/2010 21:25'!\ntotalWithIdentity: id\n\t^ self plus: id adverb: #reductively! !\n\n!SlyEnsemble methodsFor: 'printing' stamp: 'ssa 6/17/2010 16:35'!\nasExplorerString\n\n\t^self printString! !\n\n!SlyEnsemble methodsFor: 'printing' stamp: 'ssa 6/17/2010 13:48'!\nprintOn: out\n\t\"Add a string that should compile back into an ensemble like me\"\n\tout nextPutAll:'%{'.\n\tself members  do:[:mem|\n\t\tmem ENSprintOn: out.\n\t\tout nextPutAll:'. '].\n\tout nextPutAll:'}'.\n! !\n\n!SlyEnsemble methodsFor: 'printing' stamp: 'ssa 6/17/2010 13:51'!\nstoreOn: out\n\t\"Write a string on aStream that should compile back into an ensemble like me\"\n\tout nextPut:$%;nextPut:${.\n\tself members  do:[:mem|\n\t\tmem ENSstoreOn: out.\n\t\tout nextPut:$.].\n\tout nextPut:$}.\n! !\n\n!SlyEnsemble methodsFor: 'exploring' stamp: 'ssa 6/15/2010 16:14'!\nexplorerContents\n\n\t^self members asOrderedCollection withIndexCollect: [:value :index |\n\t\tObjectExplorerWrapper\n\t\t\twith: value\n\t\t\tname: index printString\n\t\t\tmodel: self]! !\n\n!SlyEnsemble methodsFor: 'exploring' stamp: 'ssa 6/15/2010 16:15'!\nhasContentsInExplorer\n\t^self members isEmpty not! !\n\n!SlyEnsemble methodsFor: 'disabling' stamp: 'ssa 7/7/2010 19:13'!\ndeactivateEnsembleSendsDuring: aBlock\n\t\"disable messaging dispatching to members and just send it to the ensemble object itself during aBlock\"\n\t\n\t0 primitiveSetExtraPreheaderWord:  self.\n\taBlock value.\n\tself members primitiveSetExtraPreheaderWord:  self. \n! !\n\n!SlyEnsemble class methodsFor: 'as yet unclassified' stamp: 'dmu 3/28/2010 23:48'!\nwith: aCollection\n\t^ self new members: aCollection! !\n\n!SlyField methodsFor: 'as yet unclassified' stamp: 'max 9/29/2010 13:55'!\nadd: aParticle \n\tparticles members add: aParticle.\n\taParticle setHomeField: self.\n\tsimulation running\n\t\tifTrue: [aParticle go]! !\n\n!SlyField methodsFor: 'as yet unclassified'!\ndisplayOn: t1 \n\tself shouldNotImplement! !\n\n!SlyField methodsFor: 'as yet unclassified' stamp: 'max 9/29/2010 14:33'!\ninitialize\n\tsuper initialize.\n\tparticles := OrderedCollection new asEnsembleOfElements! !\n\n!SlyField methodsFor: 'as yet unclassified'!\nparticle: t1 ofSize: t2 movedTo: t3 \n\t| t4 |\n\tt4 := self localFieldsUnderParticleAt: t3 size: t2.\n\tself hand: t1 to: t4 first.\n\t((t4\n\t\treject: [:t5 | t5 isNil])\n\t\tcollect: [:t5 | t5 particles]) asEnsembleOfElements\n\t\tparticle: t1\n\t\tofSize: t2\n\t\tmovedTo: t3! !\n\n!SlyFlock methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:39'!\nboids\n\t\"Answer the value of boids\"\n\n\t^ boids! !\n\n!SlyFlock methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:11'!\nboids: anObject\n\t\"Set the value of boids\"\n\n\tboids _ anObject! !\n\n!SlyFlock methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:12'!\nisDone\n\t\"Answer the value of isDone\"\n\n\tisDone isNil ifTrue:[self isDone: false].\n\t^ isDone! !\n\n!SlyFlock methodsFor: 'accessing' stamp: 'dmu 3/16/2010 23:12'!\nisDone: anObject\n\t\"Set the value of isDone\"\n\n\tisDone _ anObject! !\n\n!SlyFlock methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:13'!\ngo\n\tself isDone: false.\n\tboids fly.\n\tself isDone: true! !\n\n!SlyFlock methodsFor: 'as yet unclassified' stamp: 'dmu 8/23/2010 17:09'!\nmaybeYield\n\t| n |\n\t\"[Processor yield. ^self]value.\"\n\tn _self boids ENSsize + 1 \"1 for Drawer\".\n\tProcessor yieldIfFewerCoresThan: n! !\n\n!SlyFlock class methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:11'!\nboids: b\n\t^ self new boids: b! !\n\n!SlyGraphics class methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:05'!\nclearScreen\n\tDisplay fillWhite! !\n\n!SlyGraphics class methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:05'!\ndrawCircle: pt\n\tDisplay drawDot5At: pt! !\n\n!SlyGraphics class methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:03'!\ndrawFrom: ptA to: ptB\n\tDisplay drawLineFrom: ptA to: ptB color: Color black! !\n\n!SlyGraphics class methodsFor: 'as yet unclassified' stamp: 'dmu 3/16/2010 23:04'!\ndrawWhiteCircle: pt\n\tDisplay eraseDot5At: pt! !\n\n!SlyGraphics class methodsFor: 'as yet unclassified' stamp: 'dmu 3/23/2010 00:02'!\neraseFrom: ptA to: ptB\n\tDisplay eraseLineFrom: ptA to: ptB color: Color black! !\n\n!SlyMessageEnvelope methodsFor: 'delivering' stamp: 'ssa 6/1/2010 16:31'!\ndeliver\n\t\"send my message to my receiver and return the reply\"\n\tself message arguments: self message arguments asArray.\n\t^self message sentTo: self receiver! !\n\n!SlyMessageEnvelope methodsFor: 'accessing' stamp: 'ssa 5/12/2010 15:24'!\nmessage\n\t\"Answer the value of message\"\n\n\tmessage isNil ifTrue:[self message: nil].\n\t^ message! !\n\n!SlyMessageEnvelope methodsFor: 'accessing' stamp: 'ssa 7/16/2010 19:03'!\nmessage: anObject\n\t\"Set the value of message\"\n\n\tmessage _ anObject.\n! !\n\n!SlyMessageEnvelope methodsFor: 'accessing' stamp: 'ssa 5/12/2010 15:24'!\nreceiver\n\t\"Answer the value of receiver\"\n\n\treceiver isNil ifTrue:[self receiver: nil].\n\t^ receiver! !\n\n!SlyMessageEnvelope methodsFor: 'accessing' stamp: 'ssa 5/12/2010 15:24'!\nreceiver: anObject\n\t\"Set the value of receiver\"\n\n\treceiver _ anObject! !\n\n!SlyMessageEnvelope methodsFor: 'printing' stamp: 'ssa 5/28/2010 16:17'!\nprintOn: aStream\n\n\taStream nextPutAll:'MsgEnv|rcvr:',self receiver printString,'|message: ',self message printString! !\n\n!SlyMessageEnvelope class methodsFor: 'instance creation' stamp: 'dmu 9/1/2010 15:32'!\nargumentCount: n\n\n\t^self new\n\t\tmessage: (Message selector: #none arguments: (Array new: n));\n\t\tyourself! !\n\n!SlyMessageEnvelope class methodsFor: 'instance creation' stamp: 'ssa 5/27/2010 10:46'!\nreceiver: anObject selector: aSymbol arguments: anArray\n\n\t^self new\n\t\treceiver: anObject;\n\t\tmessage: (Message selector: aSymbol arguments: anArray);\n\t\tyourself! !\n\n!SlyParticle methodsFor: 'as yet unclassified'!\nhomeField\n\t^ homeField! !\n\n!SlyParticle methodsFor: 'as yet unclassified'!\nparticle: t1 ofSize: t2 movedTo: t3 \n\t((location dist: t3)\n\t\t\t\t<= (size + t2 // 2)\n\t\t\tand: [t1 ~= self])\n\t\tifTrue: [[self collideWith: t1] fork.\n\t\t\t[t1 collideWith: self] fork]! !\n\n!SlyParticleSim methodsFor: 'as yet unclassified'!\nadd: t1 \n\tparticles members add: t1.\n\tsuper add: t1! !\n\n!SlyParticleSim methodsFor: 'as yet unclassified'!\naddRandom: t1 \n\tt1\n\t\ttimesRepeat: [self\n\t\t\t\tadd: (SlyParticle\n\t\t\t\t\t\tc: Color random\n\t\t\t\t\t\ts: (10 to: 30) atRandom\n\t\t\t\t\t\tl: (0 to: extent x - 1) atRandom @ (0 to: extent y - 1) atRandom\n\t\t\t\t\t\tv: (1 to: 10) atRandom @ (1 to: 10) atRandom)]! !\n\n!SlyParticleSim methodsFor: 'as yet unclassified' stamp: 'max 9/29/2010 14:33'!\nclear\n\tparticles := OrderedCollection  new asEnsembleOfElements.\n\tsuper clear! !\n\n!SlyParticleSim methodsFor: 'as yet unclassified'!\ngo\n\trunning := true.\n\t[[running]\n\t\twhileTrue: [self refresh.\n\t\t\t(Delay forMilliseconds: 50) wait].\n\tnil] fork.\n\tparticles go! !\n\n!SlyParticleSim methodsFor: 'as yet unclassified'!\nparticles\n\t^ particles! !\n\n!SlyParticleSim methodsFor: 'as yet unclassified'!\nrefresh\n\tblankForm displayOn: form.\n\tparticles displayOn: form.\n\tcanvas displayView! !\n\n!SlyParticleSim methodsFor: 'as yet unclassified' stamp: 'max 9/29/2010 14:31'!\nsetExtent: t1 fields: t2 \n\t| t3 |\n\tparticles := OrderedCollection new asEnsembleOfElements.\n\trunning := false.\n\textent := t1.\n\tt3 := t1 // t2.\n\tform := Form extent: t1 depth: 8.\n\tfields := Matrix rows: t2 x columns: t2 y.\n\tfields\n\t\tindicesDo: [:t4 :t5 | fields\n\t\t\t\tat: t4\n\t\t\t\tat: t5\n\t\t\t\tput: (SlyField origin: t4 @ t5 - (1 @ 1) * t3 extent: t3)].\n\tfields\n\t\tindicesDo: [:t4 :t5 | (fields at: t4 at: t5)\n\t\t\t\tsetNeighborN: (fields\n\t\t\t\t\t\tat: t4\n\t\t\t\t\t\tat: t5 - 1\n\t\t\t\t\t\tifInvalid: nil);\n\t\t\t\t\n\t\t\t\tsetNeighborNE: (fields\n\t\t\t\t\t\tat: t4 + 1\n\t\t\t\t\t\tat: t5 - 1\n\t\t\t\t\t\tifInvalid: nil);\n\t\t\t\t\n\t\t\t\tsetNeighborNW: (fields\n\t\t\t\t\t\tat: t4 - 1\n\t\t\t\t\t\tat: t5 - 1\n\t\t\t\t\t\tifInvalid: nil);\n\t\t\t\t\n\t\t\t\tsetNeighborS: (fields\n\t\t\t\t\t\tat: t4\n\t\t\t\t\t\tat: t5 + 1\n\t\t\t\t\t\tifInvalid: nil);\n\t\t\t\t\n\t\t\t\tsetNeighborSE: (fields\n\t\t\t\t\t\tat: t4 + 1\n\t\t\t\t\t\tat: t5 + 1\n\t\t\t\t\t\tifInvalid: nil);\n\t\t\t\t\n\t\t\t\tsetNeighborSW: (fields\n\t\t\t\t\t\tat: t4 - 1\n\t\t\t\t\t\tat: t5 + 1\n\t\t\t\t\t\tifInvalid: nil);\n\t\t\t\t\n\t\t\t\tsetNeighborE: (fields\n\t\t\t\t\t\tat: t4 + 1\n\t\t\t\t\t\tat: t5\n\t\t\t\t\t\tifInvalid: nil);\n\t\t\t\t\n\t\t\t\tsetNeighborW: (fields\n\t\t\t\t\t\tat: t4 - 1\n\t\t\t\t\t\tat: t5\n\t\t\t\t\t\tifInvalid: nil);\n\t\t\t\t setSimulation: self].\n\tself makeBlankForm! !\n\n!SlyParticleSim methodsFor: 'as yet unclassified'!\nstep\n\tparticles step.\n\tself refresh! !\n\n!SlyParticleSim methodsFor: 'as yet unclassified'!\nstop\n\trunning := false.\n\tparticles stop! !\n\n!SlySamBoid methodsFor: 'as yet unclassified' stamp: 'dmu 8/23/2010 15:42'!\ncomputeCentroid\n[\"buttonize next two lines for a trigger setting button\"\n\"Click To Set Trigger\"\n\"  ONEHALT _ true\"     \n].\n\n\"ONEHALT ifTrue:[ONEHALT _ false. self halt].\"\n\n\t\"^500@500\"\n\t\"^ self flock boids  positionING: #averaging\"\n\t^ self flock boids  positionLY: #serially ING: #averaging\n\t\"^ (self flock boids ENSmembers collect: [:m| m position]) average\"! !\n\n!SlySamBoid methodsFor: 'as yet unclassified' stamp: 'dmu 8/23/2010 15:43'!\ncomputeNeighbors\n\t\"^self flock boids yourselfLY:{ #selectively:. [:b| b isNear: self]}\"\n\n\t^self flock boids ING:[:members| members select:[:m| m isNear: self]]! !\n\n!SlySamBoid methodsFor: 'as yet unclassified' stamp: 'dmu 8/23/2010 15:44'!\nmoveTowardCentroidOfAllOthers: centroid\n\t| perceivedCentroid s |\n\ts _ self flock boids ENSsize.\n\ts < 2 ifTrue: [^ 0@0].\n\tperceivedCentroid _ (centroid * s - self position) / (s - 1).\n\t^ (perceivedCentroid - self position) / 100.0! !\n\n!SlySamBoids methodsFor: 'as yet unclassified' stamp: 'dmu 8/23/2010 15:52'!\nboidClass\n\t^ SlySamBoid! !\n\n!SlySamBoids methodsFor: 'as yet unclassified' stamp: 'dmu 8/23/2010 15:46'!\nflockSize\n\t^ 10! !\n\n!SlySelectorModifier class methodsFor: 'basic modifiers' stamp: 'dmu 8/27/2010 13:30'!\nadverb ^ 'LY'! !\n\n!SlySelectorModifier class methodsFor: 'basic modifiers' stamp: 'dmu 8/27/2010 13:30'!\nasAWhole ^ 'ENS'! !\n\n!SlySelectorModifier class methodsFor: 'extended modifiers' stamp: 'dmu 8/27/2010 13:35'!\nadverbColon \n\t^ self adverb, ':'! !\n\n!SlySelectorModifier class methodsFor: 'extended modifiers' stamp: 'dmu 8/27/2010 13:35'!\ngerundColon \n\t^ self gerund, ':'! !\n\n!SlySelectorModifier class methodsFor: 'sizes' stamp: 'dmu 8/27/2010 13:35'!\nadverbColonSize\n\t^ self adverbColon size! !\n\n!SlySelectorModifier class methodsFor: 'sizes' stamp: 'dmu 8/27/2010 13:44'!\nadverbSize\n\t^ self adverb size! !\n\n!SlySelectorModifier class methodsFor: 'sizes' stamp: 'dmu 8/27/2010 13:40'!\nasAWholeSize\n\t^ self asAWhole size! !\n\n!SlySelectorModifier class methodsFor: 'sizes' stamp: 'dmu 8/27/2010 14:17'!\ngerundColonSize\n\t^ self gerundColon size! !\n\n!SlySelectorModifier class methodsFor: 'commonly modified selectors' stamp: 'dmu 8/29/2010 18:36'!\nasAWholeify: selector\n\t(selector beginsWith: self asAWhole) ifTrue: [^ self].\n\t^ (self asAWhole, selector) asSymbol! !\n\n!SlySelectorModifier class methodsFor: 'commonly modified selectors' stamp: 'dmu 8/27/2010 13:52'!\nsizeAsAWhole\n\t^ self asAWholeify: #size! !\n\n!SlySelectorModifier class methodsFor: 'accessing' stamp: 'dmu 8/27/2010 13:30'!\ngerund ^ 'ING'! !\n\n!SlySelectorModifier class methodsFor: 'special selectors' stamp: 'dmu 8/27/2010 13:59'!\nequalsAsAWhole\n\t^ ( self asAWhole, 'equals:' ) asSymbol! !\n\n!SlySelectorModifier class methodsFor: 'special selectors' stamp: 'dmu 8/27/2010 13:56'!\nmembers\n\t^ #members! !\n\n!SlySelectorModifier class methodsFor: 'testing' stamp: 'dmu 8/30/2010 10:01'!\nisSlySelector: aSelector\n\t\"True if its has SlySelectorModifers\"\n\t^ {self asAWhole. self adverb. self gerundColon} anySatisfy: [:ss | aSelector includesSubString: ss]! !\n\n!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:51'!\nadverbKeywordTest\n\t\"SlySyntaxTests adverbKeywordTest run\"\n\t\"SlySyntaxTests runAll\"\n\t| theTest ens result | \n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{{1. 2}. {3. 4}. {5. 6}}.\n\t\t\tself halt.\n\t\t\tresult _ ens comma: {9. 10} LY:#wholly.\n\t\t\ttest assert:  result ENSmembers asArray  = #(#(1 2 9 10) #(3 4 9 10) #(5 6 9 10))\n\t\t\t\t ifFail:[test log:' failed: %{{1. 2}. {3. 4}. {5. 6}} comma: {9. 10} LY:#wholly ==> ', result ENSmembers asArray printString].\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'adverbKeywordTest'.\n\t^theTest! !\n\n!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:51'!\nadverbUnaryTest\n\t\"self adverbUnaryTest run\"\n\t\"self runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest  \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens oddLY:#randomly.\n\t\t\ttest assert:  (result ENSmembers size = 1) & (result ENSmembers first isBoolean)\n\t\t\t\t ifFail:[test log:' failed: %{1. 2. 3} oddLY:#randomly ==> ', result ENSmembers printString].\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'adverbUnaryTest'.\n\t^theTest! !\n\n!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:51'!\nargAdverbRoundlyTest\n\t\"self argAdverbRoundlyTest run\"\n\t\"self runAll\"\n\t| theTest ens result | \n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens plus: #(4 5 6 7 8 9) LY:#roundly.\n\t\t\ttest assert:  result ENSmembers asArray = #(5 7 9 8 10 12)\n\t\t\t\t ifFail:[test log:' failed: %{1. 2. 3} plus: #(4 5 6 7 8 9) LY:#roundly ==> ', result ENSmembers asArray printString].\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'argAdverbRoundlyTest'.\n\t^theTest! !\n\n!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\nargAdverbWhollyTest\n\t\"self argAdverbWhollyTest run\"\n\t\"self runAll\"\n\t| theTest ens result | \n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{{1. 2}. {3. 4}. {5. 6}}.\n\t\t\tresult _ ens comma: {9. 10} LY:#wholly.\n\t\t\ttest assert:  result ENSmembers asArray  = #(#(1 2 9 10) #(3 4 9 10) #(5 6 9 10))\n\t\t\t\t ifFail:[test log:' failed: %{{1. 2}. {3. 4}. {5. 6}} comma: {9. 10} LY:#wholly ==> ', result ENSmembers asArray printString].\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'argAdverbWhollyTest'.\n\t^theTest! !\n\n!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\nensMembersTest\n\t\"SlySyntaxTests ensMembersTest run\"\n\t\"SlySyntaxTests runAll\"\n\t| theTest ens result | \n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{{1. 2}. {3. 4}. {5. 6}}.\n\t\t\tresult _ ens ENSmembers.\n\t\t\ttest assert:  result = {{1. 2}. {3. 4}. {5. 6}}\n\t\t\t\t ifFail:[test log:' failed: %{{1. 2}. {3. 4}. {5. 6}} ENSmembers ==> ', result ENSmembers size printString].\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'ensMembersTest'.\n\t^theTest! !\n\n!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\nensPrintStringTest\n\t\"SlySyntaxTests ensPrintStringTest run\"\n\t\"SlySyntaxTests runAll\"\n\t| theTest ens result | \n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens ENSprintString.\n\t\t\ttest assert:  result = '%{1. 2. 3. }'\n\t\t\t\t ifFail:[test log:' failed: %{1. 2. 3} ENSprintString ==> ', result ENSmembers size printString].\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'ensPrintStringTest'.\n\t^theTest! !\n\n!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\nensSizeTest\n\t\"SlySyntaxTests ensSizeTest run\"\n\t\"SlySyntaxTests runAll\" \n\t| theTest ens result |\n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{{1. 2}. {3. 4}. {5. 6}}.\n\t\t\tresult _ ens ENSsize.\n\t\t\ttest assert:  result = 3\n\t\t\t\t ifFail:[test log:' failed: %{{1. 2}. {3. 4}. {5. 6}} ENSsize ==> ', result ENSmembers size printString].\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'ensSizeTest'.\n\t^theTest! !\n\n!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\ngerundAndingTest\n\t\"self gerundAndingTest run\"\n\t\"self runAll\"\n\t| theTest ens result | \n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens oddING: #anding.\n\t\t\ttest assert:  result = false\n\t\t\t\t ifFail:[test log:' failed: %{1. 2. 3} oddING: #anding ==> ', result  printString].\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'gerundAndingTest'.\n\t^theTest! !\n\n!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\ngerundDoubleKeywordTest\n\t\"self gerundDoubleKeywordTest run\"\n\t\"self runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest  \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{#(1). #(2)}.\n\t\t\tresult _ ens at: 1 put: 4 ING:#totalling.\n\t\t\ttest assert:  result = 8\n\t\t\t\t ifFail:[test log:' failed:  %{#(1). #(2)} at: 1 put: 4 ING:#totalling  ==> ', result  printString].\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'gerundDoubleKeywordTest'.\n\t^theTest! !\n\n!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\ngerundOnlyAveragingTest\n\t\"self gerundOnlyAveragingTest run\"\n\t\"self runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"] \n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens ING: #averaging.\n\t\t\ttest assert:  result = 2\n\t\t\t\t ifFail:[test log:' failed: %{1. 2. 3} ING: #averaging ==> ', result ENSmembers printString].\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'gerundOnlyAveragingTest'.\n\t^theTest! !\n\n!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\ngerundOnlyConcatenatingTest\n\t\"self gerundOnlyConcatenatingTest run\" \n\t\"self runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{'hello'. ' '. 'world'}.\n\t\t\tresult _ ens ING: #concatenating.\n\t\t\ttest assert:  result = 'hello world'\n\t\t\t\t ifFail:[test log:' failed: %{''hello''. '' ''. ''world''} ING:#concatenating ==> ', result ENSmembers printString].\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'gerundOnlyConcatenatingTest'.\n\t^theTest! !\n\n!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\ngerundOnlyTest\n\t\"self gerundOnlyTest run\"\n\t\"self runAll\"\n\t| theTest ens result | \n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens ING: #totalling.\n\t\t\ttest assert:  result = 6\n\t\t\t\t ifFail:[test log:' failed: %{1. 2. 3} ING: #totalling ==> ', result ENSmembers printString].\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'gerundOnlyTest'.\n\t^theTest! !\n\n!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\ngerundOnlyTotallingTest\n\t\"self gerundOnlyTotallingTest run\"\n\t\"self runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest  \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens ING: #totalling.\n\t\t\ttest assert:  result = 6\n\t\t\t\t ifFail:[test log:' failed: %{1. 2. 3} ING: #totalling ==> ', result ENSmembers printString].\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'gerundOnlyTotallingTest'.\n\t^theTest! !\n\n!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\ngerundOringTest\n\t\"self gerundOringTest run\"\n\t\"self runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"] \n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens oddING: #oring.\n\t\t\ttest assert:  result = true\n\t\t\t\t ifFail:[test log:' failed: %{1. 2. 3} oddING: #oring ==> ', result  printString].\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'gerundOringTest'.\n\t^theTest! !\n\n!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\ngerundSingleKeywordTest\n\t\"self gerundSingleKeywordTest run\"\n\t\"self runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"] \n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens plus: 1 ING:#totalling.\n\t\t\ttest assert:  result = 9\n\t\t\t\t ifFail:[test log:' failed: %{1. 2. 3} plus: 1 ING:#totalling ==> ', result  printString].\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'gerundSingleKeywordTest'.\n\t^theTest! !\n\n!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\ngerundTripleKeywordTest\n\t\"self gerundTripleKeywordTest run\"\n\t\"self runAll\"\n\t| theTest ens result | \n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{#(1). #(2)}.\n\t\t\tresult _ ens changed:#foo with:#bar from:self ING:#concatenating.\n\t\t\ttest assert:  result  = #( 1 2)\n\t\t\t\t ifFail:[test log:' failed: %{#(1). #(2)} changed:#foo with:#bar from:self ING:#concatenating  ==> ', result  printString].\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'gerundTripleKeywordTest'.\n\t^theTest! !\n\n!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\ngerundUnaryTest\n\t\"self gerundUnaryTest run\"\n\t\"self runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"] \n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens oddING: #anding.\n\t\t\ttest assert:  result = false\n\t\t\t\t ifFail:[test log:' failed: %{1. 2. 3} oddING: #anding ==> ', result  printString].\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'gerundUnaryTest'.\n\t^theTest! !\n\n!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\nmsgAdvKeywordTest\n\t\"self msgAdvKeywordTest run\"\n\t\"self runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}. \n\t\t\tresult _ ens LY:#randomly plus:1.\n\t\t\ttest assert:  (result ENSmembers size = 1)\n\t\t\t\t ifFail:[test log:' failed: %{1. 2. 3} LY:#randomly plus:1 ==> ', result ENSmembers printString].\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'msgAdvKeywordTest'.\n\t^theTest! !\n\n!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\nmsgAdvOnlyRandomlyTest\n\t\"self msgAdvOnlyRandomlyTest run\"\n\t\"self runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env|  \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens yourselfLY:#randomly.\n\t\t\ttest assert:  (result ENSmembers size = 1)\n\t\t\t\t ifFail:[test log:' failed: %{1. 2. 3} LY:#randomly ==> ', result ENSmembers printString].\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'msgAdvOnlyRandomlyTest'.\n\t^theTest! !\n\n!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\nmsgAdvRandomly2Test\n\t\"self msgAdvRandomly2Test run\"\n\t\"self runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"] \n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens oddLY:#(#randomly: 2).\n\t\t\ttest assert:  (result ENSmembers size = 2)\n\t\t\t\t ifFail:[test log:' failed: %{1. 2. 3} oddLY:#(#randomly: 2) ==> ', result ENSmembers printString].\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'msgAdvRandomly2Test'.\n\t^theTest! !\n\n!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:52'!\nmsgAdvRandomlyTest\n\t\"self msgAdvRandomlyTest run\"\n\t\"self runAll\"\n\t| theTest ens result | \n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens oddLY:#randomly.\n\t\t\ttest assert:  (result ENSmembers size = 1)\n\t\t\t\t ifFail:[test log:' failed: %{1. 2. 3} oddLY:#randomly ==> ', result ENSmembers printString].\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'msgAdvRandomlyTest'.\n\t^theTest! !\n\n!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:53'!\nmsgAdvSelectivelyTest\n\t\"self msgAdvSelectivelyTest run\"\n\t\"self runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env|  \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens yourselfLY:{#selectively:. [:mbr| mbr odd]}.\n\t\t\ttest assert:  result ENSmembers asArray = #(1 3)\n\t\t\t\t ifFail:[test log:' failed: %{1. 2. 3} yourselfLy:{#selectively:. [:mbr| mbr odd]} ==> ', result ENSmembers printString].\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'msgAdvSelectivelyTest'.\n\t^theTest! !\n\n!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:53'!\nmsgAdvSeriallyTest\n\t\"self msgAdvSeriallyTest run\"\n\t\"self runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest  \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3. 4. 5. 6. 7. 8. 9}.\n\t\t\tresult _ ens yourselfLY:#serially.\n\t\t\ttest assert:  (result ENSmembers asArray = {1. 2. 3. 4. 5. 6. 7. 8. 9})\n\t\t\t\t ifFail:[test log:' failed: %{1. 2. 3. 4. 5. 6. 7. 8. 9} yourselfLY:#serially ==> ', result ENSmembers printString].\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'msgAdvSeriallyTest'.\n\t^theTest! !\n\n!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:53'!\nnormalBinaryTest\n\t\"self normalBinaryTest run\"\n\t\"self runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"] \n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens +1.\n\t\t\ttest assert:  result ENSmembers = {2. 3. 4}\n\t\t\t\t ifFail:[test log:' failed: %{1. 2. 3} + 1 ==> ', result ENSmembers printString].\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'normalBinaryTest'.\n\t^theTest! !\n\n!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:53'!\nnormalKeywordTest\n\t\"self normalKeywordTest run\"\n\t\"self runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest  \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens plus: 1.\n\t\t\ttest assert:  result ENSmembers = {2. 3. 4}\n\t\t\t\t ifFail:[test log:' failed: %{1. 2. 3} plus: 1 ==> ', result ENSmembers printString].\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'normalKeywordTest'.\n\t^theTest! !\n\n!SlySyntaxTests class methodsFor: 'tests' stamp: 'dmu 9/16/2010 23:53'!\nnormalUnaryTest\n\t\"self normalUnaryTest run\"\n\t\"self runAll\"\n\t| theTest ens result |\n\ttheTest _ RVMTest  \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{1. 2. 3}.\n\t\t\tresult _ ens odd.\n\t\t\ttest assert:  result ENSmembers = {true. false. true}\n\t\t\t\t ifFail:[test log:' failed: %{1. 2. 3} odd ==> ', result ENSmembers printString].\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'normalUnaryTest'.\n\t^theTest! !\n\n!SlySyntaxTests class methodsFor: 'isolated failures' stamp: 'dmu 9/16/2010 23:52'!\ngerundPerformWithWithTest\n\t\"CURRENTLY FAILS\"\n\t\"self gerundPerformWithWithTest run\"\n\t\"self runAll\"\n\t| theTest ens result | \n\ttheTest _ RVMTest \n\t\tsetUp: [:test|   \"no setup needed\"]\n\t\ttest:[:test :env| \n\t\t\tens _ %{#(1). #(2)}.\n\t\t\tresult _ ens perform: #at:put: with: 1 with: 4 ING:#totalling.\n\t\t\ttest assert:  result = 8\n\t\t\t\t ifFail:[test log:' failed: %{#(1). #(2)} perform: #at:put: with: 1 with 4 ING:#totalling  ==> ', result  printString].\n\t\t\t]\n\t\tasserting:[:test :outcome| true \"assertions will also be checked\"].\n\ttheTest name: 'gerundPerformWithWithTest'.\n\t^theTest! !\n\n!SlyTransporter methodsFor: 'as yet unclassified' stamp: 'sm 4/22/2011 00:52'!\nextensionInOtherPackages\n\t^ {\n\t\t{ 'EnsembleNode' }.\n\t\t{ 'EnsembleNode'. 'printOn:indent:' }.\n\t\t{ 'EnsembleNode'. 'sizeForValue:' }.\n\t\t{ 'EnsembleNode'. 'emitForValue:on:' }.\n\t\t{ 'Scanner class'. 'initialize' }.\n\t}! !\n\n!SlyTransporter methodsFor: 'as yet unclassified' stamp: 'sm 3/11/2011 20:48'!\nfiddleWithClassLoadingOrder: classes\n\t| classesThatNeedToGoAtTheEnd |\n\t\"Blecch. Need to make sure the Parser changes aren't loaded until after the classes needed to support those changes.\n\t And that the classes that depend on the Parser changes aren't loaded until after that. Maybe we want to split\n\t stuff up into separate packages? -- Adam, Dec. 2010\"\n\tclassesThatNeedToGoAtTheEnd := {Parser. \n\t\t\t\t\t\t\t\tSly3UnprocessedEnsembleMessage. \n\t\t\t\t\t\t\t\tSlySyntaxTests. \n\t\t\t\t\t\t\t\tSly3SyntaxTests. \n\t\t\t\t\t\t\t\tSly3Boids. \n\t\t\t\t\t\t\t\tSly3aBoids}.\n\t^ (classes asOrderedCollection reject: [:class | classesThatNeedToGoAtTheEnd includes: class])\n\t\taddAllLast: classesThatNeedToGoAtTheEnd;\n\t\tyourself! !\n\n!SlyTransporter methodsFor: 'as yet unclassified' stamp: 'sm 3/11/2011 23:15'!\ninitialize\n\tself initializePackage.\n\tself initializePreambleAndPostscript.! !\n\n!SlyTransporter methodsFor: 'as yet unclassified' stamp: 'sm 3/11/2011 21:24'!\ninitializePackage\n\tself package: (CompositePackageInfo new\n\t\t\t\t\tname: 'Sly';\n\t\t\t\t\tpackages: {\n\t\t\t\t\t\tPackageInfo named: 'Sly'.\n\t\t\t\t\t\tPackageInfo named: 'Sly2'.\n\t\t\t\t\t\tPackageInfo named: 'Sly3'.\n\t\t\t\t\t};\n\t\t\t\t\tyourself).\n! !\n\n!SlyTransporter methodsFor: 'as yet unclassified' stamp: 'sm 4/22/2011 01:03'!\ninitializePreambleAndPostscript\n\tself\n\t\tpreambleBlock: [:file | PackageWhoseContentsMustBeTransportedInOrder new\n\t\t\t\t\t\t\t\ttrickyModificationsThatNeedToBeDoneInOrder: self extensionInOtherPackages;\n\t\t\t\t\t\t\t\tsaveTrickyModificationsToFile: file.\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfile cr.\n\t\t\t\t\t\t\t\tfile nextChunkPut: \n'\"Make sure the Scanner gets initialized\"\nScanner initialize.'; cr.]! !\n\n!SmalltalkImage methodsFor: 'image, changes names' stamp: 'ssa 9/3/2008 14:28'!\nsourcesName\n\t\"Answer the full path to the version-stable source code\"\n\t^  SourceFileVersionString , FileDirectory dot , 'sources'! !\n\n!SmalltalkImage methodsFor: 'snapshot and quit' stamp: 'dmu 9/7/2010 14:25'!\nsnapshot: save andQuit: quit embedded: embeddedFlag\n\t\"Mark the changes file and close all files as part of #processShutdownList.\n\tIf save is true, save the current state of this Smalltalk in the image file.\n\tIf quit is true, then exit to the outer OS shell.\n\tThe latter part of this method runs when resuming a previously saved image. This resume logic checks for a document file to process when starting up.\"\n\t| resuming msg |\n\n\t\"Save a copy of the image file before you save the new one\"\n\tsave ifTrue:[(FileDirectory default fileExists:    SmalltalkImage current imageName  ) ifTrue:[FileDirectory default \n\trename: SmalltalkImage current imageName \n\t\ttoBe: SmalltalkImage current imageName , '.prev',Time now hhmm24]].\n\n\tObject flushDependents.\n\tObject flushEvents.\n\n\t(SourceFiles at: 2) ifNotNil:[\n\t\tmsg _ String streamContents: [ :s |\n\t\t\ts nextPutAll: '----';\n\t\t\tnextPutAll: (save ifTrue: [ quit ifTrue: [ 'QUIT' ] ifFalse: [ 'SNAPSHOT' ] ]\n\t\t\t\t\t\t\tifFalse: [quit ifTrue: [ 'QUIT/NOSAVE' ] ifFalse: [ 'NOP' ]]);\n\t\t\tnextPutAll: '----';\n\t\t\tprint: Date dateAndTimeNow; space;\n\t\t\tnextPutAll: (FileDirectory default localNameFor: self imageName);\n\t\t\tnextPutAll: ' priorSource: ';\n\t\t\tprint: LastQuitLogPosition ].\n\t\tself assureStartupStampLogged.\n\t\tsave ifTrue: [ LastQuitLogPosition _ (SourceFiles at: 2) setToEnd; position ].\n\t\tself logChange: msg.\n\t\tTranscript cr; show: msg\n\t].\n\n\tSmalltalk processShutDownList: quit.\n\tCursor write show.\n\tsave ifTrue: [resuming _ embeddedFlag \n\t\t\t\t\tifTrue: [self snapshotEmbeddedPrimitive] \n\t\t\t\t\tifFalse: [self snapshotPrimitive].  \"<-- PC frozen here on image file\"\n\t\t\t\tresuming == false \"guard against failure\" ifTrue:\n\t\t\t\t\t[\"Time to reclaim segment files is immediately after a save\"\n\t\t\t\t\tSmalltalk at: #ImageSegment\n\t\t\t\t\t\tifPresent: [:theClass | theClass reclaimObsoleteSegmentFiles]]]\n\t\tifFalse: [resuming _ false].\n\tquit & (resuming == false) ifTrue: [self quitPrimitive].\n\tCursor normal show.\n\tSmalltalk setGCParameters.\n\tresuming == true ifTrue: [Smalltalk clearExternalObjects].\n\tSmalltalk processStartUpList: resuming == true.\n\tresuming == true ifTrue:[\n\t\tself setPlatformPreferences.\n\t\tself readDocumentFile].\n\t\"Now it's time to raise an error\"\n\tresuming == nil ifTrue: [self error:'Failed to write image file (disk full?)'].\n\t^ resuming! !\n\n!SmalltalkImage methodsFor: 'sources, changes log' stamp: 'dmu 9/7/2010 14:25'!\nassureStartupStampLogged\n\t\"If there is a startup stamp not yet actually logged to disk, do it now.\"\n\t| changesFile |\n\tStartupStamp ifNil: [^ self].\n\t(SourceFiles isNil or: [(changesFile _ SourceFiles at: 2) == nil]) ifTrue: [^ self].\n\tchangesFile isReadOnly ifTrue:[^self].\n\tchangesFile safelyDo: [\n\t\tchangesFile setToEnd; cr; cr.\n\t\tchangesFile nextChunkPut: StartupStamp asString; cr.\n\t\tStartupStamp _ nil.\n\t\tself forceChangesToDisk.\n\t]! !\n\n!SmalltalkImage methodsFor: 'sources, changes log' stamp: 'ssa 9/3/2008 11:25'!\nforceChangesToDisk\n\t\"Ensure that the changes file has been fully written to disk by closing and re-opening it. This makes the system more robust in the face of a power failure or hard-reboot.\"\n\n\t| changesFile |\n\tchangesFile _ SourceFiles at: 2.\n\t(changesFile isKindOf: FileStream) ifTrue: [\n\t\tchangesFile flush.\n\t\ttrue ifTrue:[\n\t\t\tchangesFile close.\n\t\t\tchangesFile open: changesFile name forWrite: true].\n\t\tchangesFile setToEnd.\n\t].\n! !\n\n!SmalltalkImage methodsFor: 'sources, changes log' stamp: 'dmu 9/7/2010 14:25'!\nlogChange: aStringOrText \n\t\"Write the argument, aString, onto the changes file.\"\n\t| aString changesFile |\n\t(SourceFiles isNil or: [(SourceFiles at: 2) == nil]) ifTrue: [^ self].\n\tself assureStartupStampLogged.\n\n\taStringOrText isText\n\t\tifTrue: [aString _ aStringOrText string]\n\t\tifFalse: [aString _ aStringOrText].\n\t(aString isKindOf: String)\n\t\tifFalse: [self error: 'can''t log this change'].\n\t(aString findFirst: [:char | char isSeparator not]) = 0\n\t\tifTrue: [^ self].  \"null doits confuse replay\"\n\t(changesFile _ SourceFiles at: 2).\n\tchangesFile isReadOnly ifTrue:[^self].\n\tchangesFile safelyDo: [\n\t\tchangesFile setToEnd; cr; cr.\n\t\tchangesFile nextChunkPut: aString.\n\t\t\t\"If want style changes in DoIt, use nextChunkPutWithStyle:, and allow Texts to get here\"\n\t\tself forceChangesToDisk.\n\t]! !\n\n!SmalltalkImage methodsFor: 'sources, changes log' stamp: 'ads 1/12/2011 16:40'!\nsaveAs: newName\n\t\"Save the image  under the new name.\"\n\n\t(SourceFiles at: 2) ifNotNil:\n\t\t[self closeSourceFiles; \"so copying the changes file will always work\"\n\t\t\t saveChangesInFileNamed: (self fullNameForChangesNamed: newName)].\n\tself saveImageInFileNamed: (self fullNameForImageNamed: newName)! !\n\n!StandardFileMenu methodsFor: 'private'!\noldFileFrom: aDirectory withPattern: aPattern\n\n\tcanTypeFileName _ false.\n\tpattern _ aPattern.\n\t^self makeFileMenuFor: aDirectory! !\n\n!StandardFileMenu class methodsFor: 'instance creation' stamp: 'ssa 10/18/2008 22:56'!\noldFileMenu: aDirectory withPattern: aPattern\n\n\tSmalltalk isMorphic ifFalse: [^PluggableFileList oldFileMenu: aDirectory withPattern: aPattern].\n\t^super new oldFileFrom: aDirectory withPattern: aPattern! !\n\n!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'ssa 10/18/2008 23:01'!\noldFileFrom: aDirectory withPattern: aPattern\n\n\t^(self oldFileMenu: aDirectory withPattern: aPattern)\n\t\tstartUpWithCaption: 'Select a File:' translated! !\n\n!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'ssa 10/18/2008 23:12'!\noldFileStreamFrom: aDirectory  withPattern: aPattern\n\n\t| sfmResult fileStream |\n\tsfmResult _ self oldFileFrom: aDirectory  withPattern: aPattern. \n\tsfmResult ifNil: [^nil].\n\tfileStream _ sfmResult directory oldFileNamed: sfmResult name.\n\t[fileStream isNil] whileTrue:\n\t\t[sfmResult _ self oldFileFrom: aDirectory.\n\t\tsfmResult ifNil: [^nil].\n\t\tfileStream _ sfmResult directory oldFileNamed: sfmResult name].\n\t^fileStream\n! !\n\n!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'ssa 10/18/2008 23:12'!\noldFileStreamWithPattern: aPattern\n\n\t^self oldFileStreamFrom: (FileDirectory default) withPattern: aPattern\n! !\n\n!StandardFileMenu class methodsFor: 'standard file operations' stamp: 'ssa 10/18/2008 22:54'!\noldFileWithPattern: aPattern\n\n\t^self oldFileFrom: (FileDirectory default) withPattern: aPattern! !\n\n!StandardFileStream methodsFor: 'read, write, position' stamp: 'ssa 10/26/2008 23:47'!\nnextPut: char\n\t\"Write the given character to this file.\"\n\n\trwmode ifFalse: [^ self error: 'Cannot write a read-only file'].\n\tbuffer1 byteAt: 1 put: char.\n\tself primWrite: fileID from: buffer1 startingAt: 1 count: 1.\n\t^ char\n! !\n\n!StandardFileStream methodsFor: '*RVMBootstrap' stamp: 'dmu 9/7/2010 14:07'!\ninterlock\n\tinterlock ifNil: [self interlock: Semaphore forMutualExclusion].\n\t^ interlock! !\n\n!StandardFileStream methodsFor: '*RVMBootstrap' stamp: 'dmu 9/7/2010 14:07'!\ninterlock: aSemaphore\n\tinterlock _ aSemaphore! !\n\n!StandardFileStream methodsFor: '*RVMBootstrap' stamp: 'dmu 9/7/2010 14:14'!\nresetInterlock\n\tself interlock signal.\n\tself interlock: nil! !\n\n!StandardFileStream methodsFor: '*RVMBootstrap' stamp: 'dmu 9/7/2010 14:09'!\nsafelyDo: aBlock\n\t^ self interlock critical: aBlock! !\n\n!StandardFileStream class methodsFor: '*RVMBootstrap' stamp: 'dmu 9/7/2010 14:14'!\nresetAllInterlocks\n\t\"self resetAllInterlocks\"\n\tself allSubInstancesDo: [:sfs| sfs resetInterlock]! !\n\n!StandardSourceFileArray class methodsFor: 'initialize-release' stamp: 'dmu 9/7/2010 14:12'!\ninstall\n\t\"Replace SourceFiles by an instance of me with the standard sources and changes files.\n\tThis only works if SourceFiles is either an Array or an instance of this class\"\n\t\"StandardSourceFileArray install\"\n\tStandardFileStream resetAllInterlocks.\n\tSourceFiles _ self new initialize! !\n\n!StandardSystemController methodsFor: 'accessing' stamp: 'ssa 3/9/2010 12:56'!\npreventClosing\n\t\"Answer the value of preventClosing\"\n\n\tpreventClosing isNil ifTrue:[self preventClosing: false].\n\t^ preventClosing! !\n\n!StandardSystemController methodsFor: 'accessing' stamp: 'ssa 3/9/2010 12:25'!\npreventClosing: anObject\n\t\"Set the value of preventClosing\"\n\n\tpreventClosing _ anObject! !\n\n!StandardSystemController methodsFor: 'accessing' stamp: 'ssa 3/9/2010 12:25'!\nstatus\n\t\"Answer the value of status\"\n\n\tstatus isNil ifTrue:[self status: nil].\n\t^ status! !\n\n!StandardSystemController methodsFor: 'borders'!\nadjustWindowCorners \n        | box cornerBox p clicked f2 |\n        box _ view windowBox.\n        clicked _ false.\n        #(topLeft topRight bottomRight bottomLeft)\n                do: [:readCorner |\n                        cornerBox _ ((box insetBy: 2) perform: readCorner) - (10@10) extent: 20@20.\n                        (cornerBox containsPoint: sensor cursorPoint)\n                                ifTrue: \n                                [\"Display reverse: cornerBox.\"\n                                (Cursor perform: readCorner) showWhile:\n                                        [[(cornerBox containsPoint: (p _ sensor cursorPoint))\n                                                and: [(clicked _ sensor anyButtonPressed) not]]\n                                                whileTrue.\n                                \"Display reverse: cornerBox.\"\n                                clicked ifTrue:\n                                        [view newFrame:\n                                                [:f | p _ sensor cursorPoint.\n                                                readCorner = #topLeft ifTrue:\n                                                        [f2 _ p corner: f bottomRight].\n                                                readCorner = #bottomLeft ifTrue:\n                                                        [f2 _ (f withBottom: p y) withLeft: p x].\n                                                readCorner = #bottomRight ifTrue:\n                                                        [f2 _ f topLeft corner: p].\n                                                readCorner = #topRight ifTrue:\n                                                        [f2 _ (f withTop: p y) withRight: p x].\n                                                f2]]]]].\n        ^ clicked! !\n\n!StandardSystemController methodsFor: 'borders'!\ncheckForReframe\n        \"2/18/97 ssa - added a leftshift hack to prevent over aggressive offerings of reframing help for subpanes.\"\n\n        | cp |\n        view isCollapsed ifTrue: [^ self].\n        cp _ sensor cursorPoint.\n        ((view closeBoxFrame expandBy: 2) containsPoint: cp)\n                | ((view growBoxFrame expandBy: 2) containsPoint: cp)\n                ifTrue: [^ self].  \"Dont let reframe interfere with close/grow\"\n        self adjustWindowCorners.\n        self cursorOnBorder ifFalse: [^ self].\n        ((view insetDisplayBox insetBy: 2@2) containsPoint: cp)\n                ifFalse: [^ self adjustWindowBorders].\n\n        Sensor leftShiftDown \n                ifTrue:[        \n                        (view subviewWithLongestSide: [:s | ] near: cp) == nil\n                                ifFalse: [^ self adjustPaneBorders]].! !\n\n!StandardSystemController methodsFor: 'control defaults' stamp: 'ssa 3/9/2010 12:58'!\nblueButtonActivity\n\tself blueButtonMenu invokeOn: self! !\n\n!StandardSystemController methodsFor: 'control defaults' stamp: 'dmu 5/3/2009 12:12'!\nisClosed\n\t^ status == #closed! !\n\n!StandardSystemController methodsFor: 'control defaults' stamp: 'ssa 3/12/2010 09:50'!\nredButtonActivity\n\t\"If cursor is in label of a window when red button is pushed,\n\tcheck for closeBox or growBox, else drag the window frame\n\tor edit the label.\"\n\n\t| box p |\n\tp _ sensor cursorPoint.\n\tself labelHasCursor ifFalse: [super redButtonActivity. ^ self].\n\t((box _ view closeBoxFrame) containsPoint: p)\n\t\tifTrue:\n\t\t\t[Utilities\n\t\t\t\tawaitMouseUpIn: box\n\t\t\t\trepeating: []\n\t\t\t\tifSucceed: [Sensor shiftPressed ifFalse:[self close.  ^ self]ifTrue:[^self togglePreventClosing]].\n\t\t\t^ self].\n\t((box _ view growBoxFrame) containsPoint: p)\n\t\tifTrue:\n\t\t\t[Utilities\n\t\t\t\tawaitMouseUpIn: box\n\t\t\t\trepeating: []\n\t\t\t\tifSucceed:\n\t\t\t\t\t[Sensor controlKeyPressed ifTrue: [^ self expand; fullScreen].\n\t\t\t\t\t^ view isCollapsed\n\t\t\t\t\t\tifTrue: [self expand]\n\t\t\t\t\t\tifFalse: [self collapse]].\n\t\t\t^ self].\n\t(((box _ view labelTextRegion expandBy: 1) containsPoint: p)\n\t\t\tand: [Preferences clickOnLabelToEdit or: [sensor leftShiftDown]])\n\t\tifTrue:\n\t\t\t[Utilities\n\t\t\t\tawaitMouseUpIn: box\n\t\t\t\trepeating: []\n\t\t\t\tifSucceed: [^ self label].\n\t\t\t^ self].\n\tself move! !\n\n!StandardSystemController methodsFor: 'menu messages' stamp: 'ssa 3/24/2010 16:12'!\nclose\n\t\"The receiver's view should be removed from the screen and from the \n\tcollection of scheduled views.\"\n\n\tself preventClosing ifTrue:[^self].\n\tmodel okToChange ifFalse: [^self].\n\tself closeForReal! !\n\n!StandardSystemController methodsFor: 'menu messages' stamp: 'ssa 3/12/2010 09:47'!\ncloseForReal\n\t\"The receiver's view should be removed from the screen and from the \n\tcollection of scheduled views.\"\n\n\tstatus _ #closed.\n\tview erase! !\n\n!StandardSystemController methodsFor: 'menu messages' stamp: 'ssa 3/9/2010 13:00'!\ntogglePreventClosing\n\t\n\tself preventClosing: self preventClosing not.\n\tself view emphasizeLabel.! !\n\n!StandardSystemController methodsFor: 'pluggable menus' stamp: 'ssa 3/12/2010 09:46'!\nblueButtonMenu\n\n\t^SelectionMenu\n\t\tlabels:\n'edit label\nchoose color...\ntwo-tone/full color\nmove\nframe\nfull screen\ncollapse\n', (self preventClosing ifTrue:['enable closing']ifFalse:['disable closing\nclose'])\n\tlines: #(3 7)\n\tselections: #(label chooseColor toggleTwoTone move reframe fullScreen collapse togglePreventClosing close).\n! !\n\n!StandardSystemController methodsFor: 'scheduling' stamp: 'ssa 3/3/2010 13:57'!\ncloseAndUnscheduleIfOkWithModel\n\t\"Erase the receiver's view and remove it from the collection of scheduled \n\tviews. IF its ok with my model.  This catches unsaved changes\"\n\n\tmodel okToChange ifFalse: [^self].\n\tself closeAndUnschedule! !\n\n!StandardSystemController methodsFor: 'scheduling' stamp: 'ssa 3/10/2010 10:07'!\ncloseAndUnscheduleIfOkWithModelNoTerminate\n\t\"Erase the receiver's view and remove it from the collection of scheduled \n\tviews. IF its ok with my model.  This catches unsaved changes\"\n\n\tmodel okToChange ifFalse: [^self].\n\tself closeAndUnscheduleNoTerminate! !\n\n!StandardSystemView methodsFor: 'displaying' stamp: 'ssa 8/24/2009 07:49'!\ncacheBitsAsTwoTone\n\t^ false! !\n\n!StandardSystemView methodsFor: 'displaying' stamp: 'dmu 9/17/2010 12:42'!\ndeEmphasizeLabel\n\t\"Un-Highlight the label.\"\n\tlabelFrame height = 0 ifTrue: [^ self].  \"no label\"\n\tself critical: [\n\t\tself displayLabelBackground: false.\n\t\tself displayClosingGuardBoxIfNeeded.\n\t\tself displayLabelText.\n\t]! !\n\n!StandardSystemView methodsFor: 'displaying' stamp: 'ssa 3/9/2010 12:52'!\ndisplayClosingGuardBoxIfNeeded\n\t\"display closing guard active, if true\"\n\t\n\t| aRect |\n\tself controller preventClosing ifTrue:[\n\t\taRect _ self closeBoxFrame.\n\t\tself closingGuardIcon displayOn: Display at: aRect origin clippingBox: aRect rule: Form over fillColor: nil].\n! !\n\n!StandardSystemView methodsFor: 'displaying' stamp: 'dmu 9/17/2010 12:30'!\ndisplayDeEmphasized \n\t\"Display this view with emphasis off.\n\tIf windowBits is not nil, then simply BLT if possible,\n\t\tbut force full display for top window so color is preserved.\"\n\tself  critical: [\n\t\t(bitsValid and: [controller ~~ ScheduledControllers activeController])\n\t\t\tifTrue: [self lock.\n\t\t\t\t\twindowBits displayAt: self windowOrigin]\n\t\t\tifFalse: [Display deferUpdates: true.\n\t\t\t\t\tsuper display.\n\t\t\t\t\tDisplay deferUpdates: false; forceToScreen: self windowBox.\n\t\t\t\t\tCacheBits ifTrue: [self cacheBitsAsIs]]\n\t]\n! !\n\n!StandardSystemView methodsFor: 'displaying' stamp: 'dmu 9/17/2010 12:31'!\ndisplayEmphasized\n\t\"Display with label highlighted to indicate that it is active.\"\n\tself  critical: [\n\t\tself displayDeEmphasized; emphasize.\n\t\tisLabelComplemented _ true\n\t]! !\n\n!StandardSystemView methodsFor: 'displaying' stamp: 'ssa 3/9/2010 12:52'!\ndisplayLabelBackground: emphasized\n\t\"Clear or emphasize the inner region of the label\"\n\t| r1 r2 r3 c3 c2 c1 |\n\temphasized ifFalse:\n\t\t[\"Just clear the label if not emphasized\"\n\t\tDisplay fill: (self labelDisplayBox insetBy: 2) fillColor: self labelColor.\n\t\t^self displayClosingGuardBoxIfNeeded].\n\tr1 _ self labelDisplayBox insetBy: 2.\n\tr2 _ r1 insetBy: 0@2.\n\tr3 _ r2 insetBy: 0@3.\n\tc3 _ self labelColor.\n\tc2 _ c3 dansDarker.\n\tc1 _ c2 dansDarker.\n\tDisplay fill: r1 fillColor: c1.\n\tDisplay fill: r2 fillColor: c2.\n\tDisplay fill: r3 fillColor: c3.\n \n\"\tHere is the Mac racing stripe code\n\tstripes _ Bitmap with: (self labelColor pixelWordForDepth: Display depth)\n\t\t\t\t\twith: (Form black pixelWordForDepth: Display depth).\n\tself windowOrigin y even ifTrue: [stripes swap: 1 with: 2].\n\tDisplay fill: (self labelDisplayBox insetBy: 3) fillColor: stripes.\n\"! !\n\n!StandardSystemView methodsFor: 'displaying' stamp: 'ssa 3/9/2010 12:52'!\ndisplayLabelBoxes\n\t\"closeBox,closingGuard box growBox.\"\n\t| aRect smallRect backColor |\n\taRect _ self closeBoxFrame.\n\tbackColor _ self labelColor.\n\tDisplay fill: (aRect insetBy: -2) fillColor: backColor.\n\tDisplay fillBlack: aRect.\n\tDisplay fill: (aRect insetBy: 1) fillColor: backColor.\n\n\t\"display closing guard active, if true\"\n\tself displayClosingGuardBoxIfNeeded.\n\t\n\taRect _ self growBoxFrame.\n\tsmallRect _ aRect origin extent: 7@7.\n\tDisplay fill: (aRect insetBy: -2) fillColor: backColor.\n\taRect _ aRect insetOriginBy: 2@2 cornerBy: 0@0.\n\tDisplay fillBlack: aRect.\n\tDisplay fill: (aRect insetBy: 1) fillColor: backColor.\n\tDisplay fillBlack: smallRect.\n\tDisplay fill: (smallRect insetBy: 1) fillColor: backColor! !\n\n!StandardSystemView methodsFor: 'displaying' stamp: 'ssa 3/9/2010 15:41'!\ndisplayView\n\t\"Refer to the comment in View|displayView. \"\n\tlabelFrame height = 0 ifTrue: [^ self].  \"no label\"\n\tself displayBox width = labelFrame width ifFalse:\n\t\t[\"recompute label width when window changes size\"\n\t\tself setLabelRegion].\n\t(labelFrame align: labelFrame topLeft with: self windowOrigin)\n\t\tinsideColor: self labelColor;\n\t\tdisplayOn: Display.\n\tself displayClosingGuardBoxIfNeeded.\n\tself displayLabelText! !\n\n!StandardSystemView methodsFor: 'displaying' stamp: 'dmu 9/17/2010 12:42'!\nemphasizeLabel\n\t\"Highlight the label.\"\n\tlabelFrame height = 0 ifTrue: [^ self].  \"no label\"\n\tself critical: [\n\t\tself displayLabelBackground: true.\n\t\tself displayLabelBoxes.\n\t\tself displayLabelText.\n\t]! !\n\n!StandardSystemView methodsFor: 'framing' stamp: 'ssa 1/1/1970 00:05'!\ninitialFrame\n        \"Find a plausible initial screen area for the receiver, taking into account user preference, the size needed, and other windows currently on the screen.  5/22/96 sw: let RealEstateAgent do it for us\"\n\n       | rect |\nrect _ Rectangle originFromUser: self initialExtent + (0@self labelHeight).\n^rect origin + (0@ self labelHeight) extent: self initialExtent\n\"RealEstateAgent initialFrameFor: self world: nil\"! !\n\n!StandardSystemView methodsFor: 'label access' stamp: 'ssa 3/9/2010 12:49'!\nclosingGuardIcon\n\n^(ColorForm\n\textent: 11@11\n\tdepth: 1\n\tfromArray: #( 0 520093696 1065353216 830472192 830472192 2143289344 2143289344 2143289344 2143289344 2143289344 0)\n\toffset: 0@0)\n\tcolorsFromArray: #(#(1.0 1.0 1.0)#(0.0 0.0 0.0)   )! !\n\n!StandardSystemView methodsFor: 'label access'!\nlabelColor\n\t\"Answer the color to use as the background for the receiver's label.  By default, this is the same as the background color of the window, but need not be.  7/16/96 sw\"\n\n\t^ self backgroundColor! !\n\n!StandardSystemView methodsFor: 'updating' stamp: 'ssa 8/21/2009 12:58'!\nsetUpdatablePanesFrom: getSelectors\n\t| aList aPane |\n\t\"Set my updatablePanes inst var to the list of panes which are list panes with the given get-list selectors.  Order is important here!!  Note that the method is robust in the face of panes not found, but a warning is printed in the transcript in each such case\"\n\n\taList _ OrderedCollection new.\n\tgetSelectors do:\n\t\t[:sel | aPane _ self subViewSatisfying:\n\t\t\t\t[:pane | ((pane isKindOf: PluggableListView) or:[pane isKindOf: MSWScrollBarView]) and: [pane getListSelector == sel]].\n\t\t\taPane\n\t\t\t\tifNotNil:\n\t\t\t\t\t[aList add: aPane]\n\t\t\t\tifNil:\n\t\t\t\t\t[Transcript cr; show: 'Warning: view ', sel, ' not found.']].\n\tupdatablePanes _ aList asArray! !\n\n!StandardSystemView methodsFor: '*Sly3Bootstrap' stamp: 'dmu 9/17/2010 12:37'!\ncritical: aBlock\n\t^self displayInterlock critical: aBlock! !\n\n!StandardSystemView methodsFor: '*Sly3Bootstrap' stamp: 'dmu 9/17/2010 12:37'!\ndisplayInterlock\n\tdisplayInterlock ifNil: [self displayInterlock: Mutex new].\n\t^ displayInterlock! !\n\n!StandardSystemView methodsFor: '*Sly3Bootstrap' stamp: 'dmu 9/17/2010 12:24'!\ndisplayInterlock: aSemaphore\n\tdisplayInterlock _ aSemaphore! !\n\n!StandardSystemView methodsFor: '*Sly3Bootstrap' stamp: 'dmu 9/17/2010 12:47'!\nresetDisplayInterlock\n\tself displayInterlock: nil! !\n\n!StandardSystemView class methodsFor: 'instance creation' stamp: 'ssa 8/15/2008 17:42'!\nmodel: aModel label: aString minimumSize: aPoint\n\n\t^self new\n\t\tmodel: aModel;\n\t\tlabel: aString;\n\t\tminimumSize: aPoint;\n\t\tyourself! !\n\n!StandardSystemView class methodsFor: 'instance creation' stamp: 'ssa 3/24/2010 15:17'!\nnew\n        \"This is a rather dirty hack -- but we don't have a window builder\nyet. (ar 1/22/98 23:36)\"\n\n        ^Preferences nicerSystemViews\n                ifTrue:[MSWSystemView basicNew initialize]\n                ifFalse:[self basicNew initialize]! !\n\n!StartupBench methodsFor: 'as yet unclassified' stamp: 'StefanMarr 1/16/2011 19:55'!\nrunBench\n\tRVMOperations print: 'This Benchmark is not to be used with the harness, but requiries time measurment to be done outside of the VM. Use it directly, it works like the Harness and implements class>>#run:'.\n\tself notYetImplemented.  ! !\n\n!StartupBench class methodsFor: 'script entry' stamp: 'SM 9/13/2009 15:22'!\nrun: args\n\t\"Instantly quit the VM after Startup, this will measure only the time to initalize\n\t  the image and start its execution. This includes the time spend on object distribution\"\n\n\tSmalltalkImage current snapshot: false andQuit: true! !\n\n!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\nascent: anObject\n\t\"Set the value of ascent\"\n\n\tascent _ anObject! !\n\n!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\ncharacterToGlyphMap: anObject\n\t\"Set the value of characterToGlyphMap\"\n\n\tcharacterToGlyphMap _ anObject! !\n\n!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\nderivativeFonts\n\t\"Answer the value of derivativeFonts\"\n\n\tderivativeFonts isNil ifTrue:[self derivativeFonts: nil].\n\t^ derivativeFonts! !\n\n!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\nderivativeFonts: anObject\n\t\"Set the value of derivativeFonts\"\n\n\tderivativeFonts _ anObject! !\n\n!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\ndescent: anObject\n\t\"Set the value of descent\"\n\n\tdescent _ anObject! !\n\n!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\nemphasis\n\t\"Answer the value of emphasis\"\n\n\temphasis isNil ifTrue:[self emphasis: nil].\n\t^ emphasis! !\n\n!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\nglyphs: anObject\n\t\"Set the value of glyphs\"\n\n\tglyphs _ anObject! !\n\n!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\nmaxAscii: anObject\n\t\"Set the value of maxAscii\"\n\n\tmaxAscii _ anObject! !\n\n!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\nmaxWidth: anObject\n\t\"Set the value of maxWidth\"\n\n\tmaxWidth _ anObject! !\n\n!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\nminAscii: anObject\n\t\"Set the value of minAscii\"\n\n\tminAscii _ anObject! !\n\n!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\npointSize: anObject\n\t\"Set the value of pointSize\"\n\n\tpointSize _ anObject! !\n\n!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\nraster\n\t\"Answer the value of raster\"\n\n\traster isNil ifTrue:[self raster: nil].\n\t^ raster! !\n\n!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\nraster: anObject\n\t\"Set the value of raster\"\n\n\traster _ anObject! !\n\n!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\nstrikeLength\n\t\"Answer the value of strikeLength\"\n\n\tstrikeLength isNil ifTrue:[self strikeLength: nil].\n\t^ strikeLength! !\n\n!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\nstrikeLength: anObject\n\t\"Set the value of strikeLength\"\n\n\tstrikeLength _ anObject! !\n\n!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\nsubscript\n\t\"Answer the value of subscript\"\n\n\tsubscript isNil ifTrue:[self subscript: nil].\n\t^ subscript! !\n\n!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\nsubscript: anObject\n\t\"Set the value of subscript\"\n\n\tsubscript _ anObject! !\n\n!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\nsuperscript\n\t\"Answer the value of superscript\"\n\n\tsuperscript isNil ifTrue:[self superscript: nil].\n\t^ superscript! !\n\n!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\nsuperscript: anObject\n\t\"Set the value of superscript\"\n\n\tsuperscript _ anObject! !\n\n!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\ntype\n\t\"Answer the value of type\"\n\n\ttype isNil ifTrue:[self type: nil].\n\t^ type! !\n\n!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\ntype: anObject\n\t\"Set the value of type\"\n\n\ttype _ anObject! !\n\n!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\nxOffset\n\t\"Answer the value of xOffset\"\n\n\txOffset isNil ifTrue:[self xOffset: nil].\n\t^ xOffset! !\n\n!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\nxOffset: anObject\n\t\"Set the value of xOffset\"\n\n\txOffset _ anObject! !\n\n!StrikeFont methodsFor: 'accessing' stamp: 'ssa 2/15/2010 11:35'!\nxTable: anObject\n\t\"Set the value of xTable\"\n\n\txTable _ anObject! !\n\n!StrikeFont methodsFor: '*RVM-Archiving'!\narchiveOn: aStream\n\t\"record this instance by its name. On dearchive, the name corresponding to this instance will be looked up.\"\n\n\taStream\n\t\tstoreObject: self;\n\t\tstoreClass: self class;\n\t\tstore: self name! !\n\n!StrikeFont class methodsFor: '*RVM-Archiving'!\narchiveVersion\n\t\"This version archives only the name of the strikeFont. On dearchive, the name will be looked up and the appropriate strike font existing in that image will be returned.\"\n\n\t^3! !\n\n!StrikeFont class methodsFor: '*RVM-Archiving'!\ndearchive: versionNumber from: aStream\n\n\t| aString sf |\n\tversionNumber = self archiveVersion\n\t\tifFalse:[^super dearchiveFrom: aStream].\n\taString _ aStream read: String.\n\tsf _ self allInstances\n\t\t\tdetect:[:inst| inst name = aString]\n\t\t\tifNone:[self error:'missing strike font for this image'].\n\taStream storeObject: sf.\n\t^sf! !\n\n!String methodsFor: 'converting' stamp: 'ssa 1/20/2010 10:34'!\nasParagraphWithStyle: aTextStyle\n\t\"Answer a Paragraph whose text string is the receiver.\"\n\n\t^Paragraph withText: self asText style: aTextStyle! !\n\n!String methodsFor: 'converting' stamp: 'ssa 9/7/2009 09:29'!\nasSmalltalkObject\n\n\t^Compiler evaluate: self! !\n\n!String methodsFor: 'converting' stamp: 'ssa 7/7/2010 20:26'!\nwithoutFirst: n\n\t\"Answer a string without my first n characters.\"\n\t^self size > n \n\t\tifFalse:['']\n\t\tifTrue:[self copyFrom: n+1 to: self size]! !\n\n!String methodsFor: 'converting' stamp: 'ssa 4/20/2010 15:52'!\nwithoutLast: n\n\t\"Answer a string without my last n characters.\"\n\t^self size > n \n\t\tifFalse:['']\n\t\tifTrue:[self copyFrom: 1 to: self size-n]! !\n\n!String methodsFor: '*RVM-UI-Generic' stamp: 'ssa 1/21/2010 11:47'!\nbuttonIt\n\t\"  'Display reverse' buttonIt  \"\n\t\"launch a button to evaluate this string\"\n\t| topView someCode extent |\n\tsomeCode _ self.\n\textent _ (someCode asText asDisplayText extent + (30@20)) max: 80@30.\n\ttopView := RVMStandardSystemView new.\n\ttopView noLabel.\n\ttopView borderWidth:1.\n\ttopView minimumSize: extent .\n\ttopView maximumSize: extent.\n\t\n\ttopView addSubView: (RVMButtonView label: someCode action:[Compiler evaluate: someCode]).\n\ttopView controller open! !\n\n!String methodsFor: '*packageinfo-base' stamp: 'nk 8/30/2004 09:02'!\nescapeEntities\n\t^ self species streamContents: [:s | self do: [:c | s nextPutAll: c escapeEntities]]\n! !\n\n!String methodsFor: '*RVM-Archiving'!\narchiveOn: aStream\n\taStream\n\t\tstoreObject: self;\n\t\tstoreClass: self class;\n\t\tstore: self! !\n\n!String class methodsFor: '*RVM-Archiving-instance creation'!\ndearchiveFrom: aStream\n\n\t| anObject |\n\tanObject _ aStream read: self.\n\taStream storeObject: anObject.\n\t^anObject! !\n\n!StringHolder methodsFor: 'accessing' stamp: 'tk 4/3/98 22:50'!\ncontentsSelection\n\t\"Return the interval of text in the code pane to select when I set the pane's contents\"\n\n\t^ 1 to: 0  \"null selection\"! !\n\n!StringHolderView methodsFor: 'initialize-release' stamp: 'ssa 1/20/2010 10:35'!\ninitialize \n\t\"Refer to the comment in View|initialize.\"\n\n\tsuper initialize.\n\tdisplayContents _ '' asParagraphWithStyle: self textStyle.\n\thasUnacceptedEdits _ false.\n\taskBeforeDiscardingEdits _ true.\n! !\n\n!StringHolderView methodsFor: 'updating'!\nupdateDisplayContents\n        \"Make the text that is displayed be the contents of the receiver's model.\"\n        \"VIVA LA JUNTA!!!!  hack this to update the scroll bar when the contents changes  - ssa 1/15/98 14:39\"\n\n        self editString: model contents.\n        self displayView.\n        (self superView isKindOf: MSWScrollBarView)\n                ifTrue:[self superView updateElevator]! !\n\n!StringHolderView methodsFor: 'model access' stamp: 'ssa 1/20/2010 10:43'!\neditString: aString \n\t\"The paragraph to be displayed is created from the characters in aString.\"\n\n\tdisplayContents _ Paragraph withText: aString asText\n\t\tstyle: self textStyle copy\n\t\tcompositionRectangle: (self insetDisplayBox insetBy: 6 @ 0)\n\t\tclippingRectangle: self insetDisplayBox\n\t\tforeColor: self foregroundColor backColor: self backgroundColor.\n\t(self controller isKindOf: ParagraphEditor)\n\t\tifTrue: [controller changeParagraph: displayContents]! !\n\n!StringHolderView methodsFor: 'accessing' stamp: 'ssa 1/20/2010 10:31'!\naskBeforeDiscardingEdits\n\t\"Answer the value of askBeforeDiscardingEdits\"\n\n\taskBeforeDiscardingEdits isNil ifTrue:[self askBeforeDiscardingEdits: nil].\n\t^ askBeforeDiscardingEdits! !\n\n!StringHolderView methodsFor: 'accessing' stamp: 'ssa 1/20/2010 10:48'!\nchangeTextStyle: aTextStyle\n\n\tself textStyle: aTextStyle.\n\tself displayContents setWithText: self displayContents asText style: self textStyle ! !\n\n!StringHolderView methodsFor: 'accessing' stamp: 'ssa 1/27/2010 17:12'!\ndefaultTextStyle\n\n\t^TextStyle default ! !\n\n!StringHolderView methodsFor: 'accessing' stamp: 'ssa 1/20/2010 10:31'!\ndisplayContents: anObject\n\t\"Set the value of displayContents\"\n\n\tdisplayContents _ anObject! !\n\n!StringHolderView methodsFor: 'accessing' stamp: 'ssa 1/20/2010 10:36'!\ntextStyle\n\t\"Answer the value of textStyle\"\n\n\ttextStyle isNil ifTrue:[self textStyle: self defaultTextStyle].\n\t^ textStyle! !\n\n!StringHolderView methodsFor: 'accessing' stamp: 'ssa 1/20/2010 10:31'!\ntextStyle: anObject\n\t\"Set the value of textStyle\"\n\n\ttextStyle _ anObject! !\n\n!StringHolderView methodsFor: '*Interface-MSWLook'!\npercentPreceedingContent\n        \"Answer the percent of my content that not visible since it has been scrolled of the top of the screen.  ssa 12/5/97 15:37\"\n        | para lineIndex |\n        para _ self displayContents.\n        lineIndex _ para lineIndexOfTop: para visibleRectangle top.\n        lineIndex = 1 ifTrue:[^0.0].\n        ^lineIndex / para numberOfLines asFloat\n! !\n\n!StringHolderView methodsFor: '*Interface-MSWLook'!\ntotalContentHeight\n        \"Answer the total height of my contents. ssa 12/5/97 15:16\"\n        ^ self displayContents compositionRectangle height / self unitContentHeight! !\n\n!StringHolderView methodsFor: '*Interface-MSWLook'!\nunitContentHeight\n        \"Answer the unit height of my contents. ssa 12/5/97 15:16\"\n        ^ self displayContents lineGrid asFloat! !\n\n!StringHolderView methodsFor: '*Interface-MSWLook'!\nvisibleContentHeight\n        \"Answer the total height of my contents. ssa 12/5/97 15:16\"\n        ^ self displayContents clippingRectangle height / self unitContentHeight! !\n\n!StringHolderView class methodsFor: 'instance creation'!\nopen: aStringHolder label: aString \n        \"Create a standard system view of the model, aStringHolder, as viewed by \n        an instance of me. The label of the view is aString.\"\n        \"VIVA LA JUNTA!!  Modified to use MSWScrollBarViews - ssa 12/11/97 12:00\"\n        | aStringHolderView topView shv |\n        aStringHolderView _ self container: aStringHolder.\n        topView _ StandardSystemView new.\n        topView model: aStringHolderView model.\n        topView addSubView: (shv _ MSWScrollBarView on: aStringHolderView ).\n        shv borderWidth: 2.\n        topView label: aString.\n        topView minimumSize: 100 @ 50.\n        topView controller open! !\n\n!Symbol methodsFor: 'converting' stamp: 'ssa 5/11/2010 15:14'!\nasKeyword\n\n\t^self last == $:\n\t\tifTrue:[self]\n\t\tifFalse:[(self  copyWith:$:) asSymbol]! !\n\n!Symbol class methodsFor: 'instance creation' stamp: 'ssa 10/26/2008 08:08'!\nreadFrom: aStream\n\t\"Correctly read a Symbol from aStream.\"\n\t| string | \n\taStream skipSeparators.\n\t^(aStream peekFor: $#)\n\t\tifTrue: [(aStream upTo: Character space) asSymbol]\n\t\tifFalse: \n\t\t\t[string _ super readFrom: aStream.\n\t\t\t(aStream next: 9) = ' asSymbol'\n\t\t\t\tifTrue: [string asSymbol]\n\t\t\t\tifFalse: [self error: 'This ain''t no ', self class name]]! !\n\n!SyntaxError class methodsFor: 'instance creation' stamp: 'dmu 11/25/2008 00:25'!\nopen: aSyntaxError\n\t\"Answer a standard system view whose model is an instance of me.\"\n\t| topView |\n\t<primitive: 19> \"Simulation guard\"\n\t\n\ttopView _ self buildMVCViewOn: aSyntaxError.\n\ttopView controller openNoTerminateDisplayAt: Display extent // 2.\n\tCursor normal show.\n\tProcessor thisProcess suspend.\n! !\n\n!SystemDictionary methodsFor: 'memory space' stamp: 'sm 2/24/2011 16:41'!\ninstallLowSpaceWatcher\n\t\"Start a process to watch for low-space conditions.\"\n\t\"Smalltalk installLowSpaceWatcher\"\n\n\tself primSignalAtBytesLeft: 0.  \"disable low-space interrupts\"\n\tLowSpaceProcess == nil ifFalse: [LowSpaceProcess terminate].\n\tLowSpaceProcess _ [self lowSpaceWatcher] newProcess.\n\tLowSpaceProcess priority: Processor lowIOPriority.\n\tLowSpaceProcess name: 'LowSpaceWatcher'.\n\tLowSpaceProcess resume.\n\n! !\n\n!SystemDictionary methodsFor: 'miscellaneous' stamp: 'dmu 9/17/2010 16:39'!\nhandleUserInterrupt\n\tPreferences cmdDotEnabled ifTrue:\n\t\t[Smalltalk isMorphic\n\t\t\tifTrue: []\n\t\t\tifFalse: [[ScheduledControllers interruptName: 'User Interrupt'] forkAt: Processor thisProcess priority + 1]]! !\n\n!SystemDictionary methodsFor: 'miscellaneous' stamp: 'sm 5/25/2011 20:59'!\nlogError: errMsg inContext: aContext onConsoleAndQuitWithSaving: doSave\n\t\"Log the error message and a stack trace to the given file.\"\n\n\t| stream cnt ctx |\n\t\n\tRVMOperations print: 'Error occured in Headless mode:'.\n\tRVMOperations print: errMsg.\n\t\n\tstream := TextStream on: ''.\n\t\n\t\"aContext printOn: stream.\"\n\tctx := aContext.\n\tcnt := 0.\n\t[ctx notNil and: [(cnt := cnt + 1) < 40]] \n\t\twhileTrue: [ctx printOn: stream.\n\t\t\t\t\tstream cr.\n\t\t\t\t\tctx := ctx sender].\n\n\tRVMOperations print: stream contents.\n\tself snapshot: doSave andQuit: true.\n\t! !\n\n!SystemDictionary methodsFor: '*Sly' stamp: 'dmu 8/23/2010 15:38'!\nallClassesDoInParallel: aBlock\n\t\"Evaluate the argument, aBlock, for each class in the system.\"\n\n\t(self classNames collect: [:name | self at: name]) doInParallel: aBlock! !\n\n!SystemDictionary methodsFor: 'shrinking' stamp: 'ssa 10/8/2008 13:14'!\nmajorShrinkClassesToLeave\n\n\t| manual categoryNames classNames classNameSets |\n\tmanual := #(True False ReadOnlyVariableBinding SystemOrganizer ClassOrganizer View Switch Button EndOfStream ValueHolder EventSensorConstants ChronologyConstants InstructionPrinter Color Form ColorForm DisplayMedium DisplayObject Rectangle Point  Pen OrderedCollection Array SortedCollection Dictionary Association SequenceableCollection Collection String Text DisplayText ArrayedCollection Object GIFReadWriter ImageReadWriter \n\t\"Benchmark BinaryChoice \"  \nChangeSet ChangeSorter DualChangeSorter ChangeList Inspector BasicInspector CompiledMethodInspector DictionaryInspector OrderedCollectionInspector).\n\tcategoryNames := \"(SystemOrganization categoriesMatching:'RVM-*'), \"\n\t\t\t\t\t(SystemOrganization categoriesMatching:'PluggableGauges*'), \n\t\t\t\t\t(SystemOrganization categoriesMatching:'Tools-FileList'),\n\t\t\t\t\t(SystemOrganization categoriesMatching:'Tools-Browser'),\n\t\t\t\t\t(SystemOrganization categoriesMatching:'Kernel-ST80 Remnants'), \n\t\t\t\t\t(SystemOrganization categoriesMatching:'ST80-Framework'), \n\t\t\t\t\t(SystemOrganization categoriesMatching:'ST80-Support'), \n\t\t\t\t\t(SystemOrganization categoriesMatching:'ST80-Pluggable Views'), \n\t\t\t\t\t(SystemOrganization categoriesMatching:'ST80-Views'), \n\t\t\t\t\t(SystemOrganization categoriesMatching:'ST80-Editors'), \n\t\t\t\t\t(SystemOrganization categoriesMatching:'Tools-Process Browser').\n\tclassNameSets := categoryNames collect:[:each| SystemOrganization listAtCategoryNamed: each].\n\tclassNames := OrderedCollection new.\n\tclassNameSets do:[:set| set do:[:n| classNames add: n]].\n\t^(manual, classNames) asSet asOrderedCollection! !\n\n!SystemDictionary methodsFor: 'shrinking' stamp: 'ssa 9/3/2008 12:00'!\nmajorShrinkClassesToZap\n\n\t^#(BDFFontReader \n\t\tInstanceBrowser \n\t\tLexicon \n\t\tTarArchiveMember \n\t\tCRLookupResult\n\t\"\tPluggableDictionary\n\t\t PluggableSet \"\n\t\tMimeConverter\n\t\tQuotedPrintableMimeConverter\n\t\tRFC2047MimeConverter\n\t\tAbstractLauncher\n\t\tAutoStart\n\t\tAcornFileDirectory\n\t\t \" AssertionFailure \"\n\t\tCachedHTTPRequest \n\t\tCachingCodeLoader\n\t\tCodeLoader\n\t\tCanvasEncoder\n\t\tEToyVectorVocabulary\n\t\tEToyVocabulary\n        \tFileList2\n\t\tFontCache\n\t\tFTPConnectionException\n\t\tFullVocabulary\n\t\tHTTPClient\n\t\tHTTPLoader\n\t\tHTTPRequest \n\t\tHtmlFileStream\n\t\t\"MacFileDirectory\"\n\t\t\"MacHFSPlusFileDirectory\"\n\t\tPluginHTTPRequest\n\t\tSUnitNameResolver\n\t\tScreenedVocabulary\n\t\tScriptNameType\n\t\tSoundType\n\t\tStringType\n\t\tSymbolListType\n\t\tTestCase\n\t\tTestFailure\n\t\tTestResource\n\t\tTestResult\n\t\tTestRunner\n\t\tTestSuite\n\t\tTestCaseDebugger\n\t\tTestViaMethodCall\n\t\tTextSqkPageLink\n\t\tTextSqkProjectLink\n\t\tTextURL \n\t\tUnknownType\n\t\tVerifier\n\t\tVerifierOfProperty\n\t\tVocabulary\n\t\tBooleanType\n\t\tButtonPhaseType\n\t\tColorType\n\t\tDataType\n\t\tGraphicType\n\t\tMenuType\n\t\tNumberType\n\t\tPlayerType)! !\n\n!SystemDictionary methodsFor: 'shrinking' stamp: 'ssa 9/3/2008 13:42'!\npresumedSentMessages   | sent |\n\"Smalltalk presumedSentMessages\"\n\n\t\"The following should be preserved for doIts, etc\"\n\tsent _ IdentitySet new.\n\t#( \n\t\"menu messages from Debugger>>contextStackMenu: aMenu shifted: shifted\"\n\tfullStack restart proceed doStep stepIntoBlock send where peelToFirst\nbrowseSendersOfMessages browseMessages methodHierarchy browseVersions\nbrowseInstVarRefs browseInstVarDefs\nbrowseClassVarRefs browseClassVariables browseClassRefs\nbrowseMethodFull fileOutMessage \nshiftedYellowButtonActivity\n\n\t\"menu messages from Preferences>>presentMvcFontConfigurationMenu\"\n\tchooseSystemFont chooseListFont chooseMenuFont chooseWindowTitleFont chooseCodeFont restoreDefaultFonts\n\n\t\"others\"\n\t\n\trehashWithoutBecome compactSymbolTable rebuildAllProjects\n\t\tbrowseAllSelect: printSpaceAnalysis lastRemoval\n\t\tscrollBarValue: scrollBarMenuButtonPressed: \n\t\twithSelectionFrom:  to: removeClassNamed: instVarNamed:put:\n\t\tbreakDependents\n          maximumSize: redButtonMenu:redButtonMessages:\n\t\tdragon: hilberts: mandala: web test3 factorial tinyBenchmarks benchFib\n\t\tnewDepth: restoreAfter: forgetDoIts zapAllMethods obsoleteClasses\n\t\tremoveAllUnSentMessages abandonSources removeUnreferencedKeys\n\t\treclaimDependents zapOrganization condenseChanges browseObsoleteReferences\n\t\trenameClassNamed:as:  \" this method is used in change sets \"\n\t\tsubclass:instanceVariableNames:classVariableNames:poolDictionaries:category:\n\t\tvariableByteSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category:\n    \" subclass creation: \"\n\t\tvariableSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category:\n\t\tvariableWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category:\n\t\tweakSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category:\n\t\tmethodsFor:stamp: methodsFor:stamp:prior: instanceVariableNames:\n\t\tstartTimerInterruptWatcher unusedClasses\n\t\twidthOfString: widthOfString:from:to: clipHeight clipHeight: \n\t\tclipWidth clipWidth: clipX clipX: clipY clipY: \n          newDay:monthIndex:year: abandon pixelForValueAt:put:\n          magnifyBy: replaceColor:withColor: dotOfSize:  \"DisplayScreen> \" fullBoundingBox\n          originFromUser:\n     \" finalization \"\n          toFinalizeSend:to:with:\n\t\" StrikeFont> \"\n\t\tmaxAscii minAscii maxWidth firstIndent:\n          restIndent: rightIndent: newFontArray: fontArray:\n          readStrikeFont2Family:  familySizeFace writeAsStrike2Named:\n\t\"  Paragraph  \"\n\t\tcompositionRectangle: \n   \" Form: these methods are meeded for gif creation \"\n\t\tcolorReduced colorsUsed\n   \" protocol from Pen class: \"\n\t\tinkBrush simplePressurePen testMouseTracking testTabletTracking\n   \" two methods that are hidden from the method tracer \"\n\t\tmethod: preamble:\n\t\tinspectElement\n\t\tinspectSelection inspectBasic fileOutAllChangeSets fillAggregateChangeSet\n   \" convenience methods in True and False: \"\n\t\tand:and: and:and:and: and:and:and:and:\n\t\tor:or: or:or:or: or:or:or:or:\n  \" mics \"\n     \tpairsDo: font:  notEmpty \n  \" ExternalEvent class: \"\n\t\tregisterClient:\n     ) do:\n\t\t[:sel | sent add: sel].\n\t\"The following may be sent by perform: in dispatchOnChar...\"\n\t(ParagraphEditor classPool at: #CmdActions) asSet do:\n\t\t[:sel | sent add: sel].\n\t(ParagraphEditor classPool at: #ShiftCmdActions) asSet do:\n\t\t[:sel | sent add: sel].\n Smalltalk majorShrinkClassesToLeave do:\n  [:symbol | sent addAll: (Smalltalk at: symbol) selectors;\n                 addAll: (Smalltalk at: symbol) class selectors.].\n\t^ sent! !\n\n!SystemDictionary methodsFor: 'snapshot and quit' stamp: 'dmu 9/7/2010 14:26'!\nsnapshot: save andQuit: quit embedded: embeddedFlag\n\t\"Mark the changes file and close all files. If save is true, save the current state of this Smalltalk in the image file. If quit is true, then exit to the outer shell. The latter part of this method runs when resuming a previously saved image. The resume logic checks for a document file to process when starting up.\"\n\n\t| resuming msg sourceLink |\n\tObject flushDependents.\n\tObject flushEvents.\n\tsave & (SourceFiles at: 2) notNil ifTrue:\n\t\t[msg _  (quit\n\t\t\tifTrue: ['----QUIT----']\n\t\t\tifFalse: ['----SNAPSHOT----'])\n\t\t\t, Date dateAndTimeNow printString, ' ', (FileDirectory default localNameFor: self imageName).\n\t\tsourceLink _ ' priorSource: ' , LastQuitLogPosition printString.\n\t\tself assureStartupStampLogged.\n\t\t(SourceFiles at: 2) safelyDo: [\n\t\t\tLastQuitLogPosition _ (SourceFiles at: 2) setToEnd; position.\n\t\t\tself logChange: msg , sourceLink.\n\t\t].\n\t\tTranscript cr; show: msg].\n\n\tself processShutDownList: quit.\n\tCursor write show.\n\tsave ifTrue: [resuming _ embeddedFlag \n\t\t\t\t\tifTrue: [self snapshotEmbeddedPrimitive] \n\t\t\t\t\tifFalse: [self snapshotPrimitive].  \"<-- PC frozen here on image file\"\n\t\t\t\tresuming == false \"guard against failure\" ifTrue:\n\t\t\t\t\t[\"Time to reclaim segment files is immediately after a save\"\n\t\t\t\t\tSmalltalk at: #ImageSegment\n\t\t\t\t\t\tifPresent: [:theClass | theClass reclaimObsoleteSegmentFiles]]]\n\t\tifFalse: [resuming _ false].\n\tquit & (resuming == false) ifTrue: [self quitPrimitive].\n\tCursor normal show.\n\tself setGCParameters.\n\tresuming == true ifTrue: [self clearExternalObjects].\n\tself processStartUpList: resuming == true.\n\tresuming == true ifTrue:[\n\t\tself setPlatformPreferences.\n\t\tself readDocumentFile].\n\t\"Now it's time to raise an error\"\n\tresuming == nil ifTrue: [self error:'Failed to write image file (disk full?)'].\n\t^ resuming! !\n\n!SystemDictionary methodsFor: 'sources, change log' stamp: 'ssa 9/3/2008 11:25'!\nforceChangesToDisk\n\t\"Ensure that the changes file has been fully written to disk by closing and re-opening it. This makes the system more robust in the face of a power failure or hard-reboot.\"\n\n\t| changesFile |\n\tchangesFile _ SourceFiles at: 2.\n\t(changesFile isKindOf: FileStream) ifTrue: [\n\t\tchangesFile flush.\n\t\ttrue ifTrue:[\n\t\t\tchangesFile close.\n\t\t\tchangesFile open: changesFile name forWrite: true].\n\t\tchangesFile setToEnd.\n\t].\n! !\n\n!SystemDictionary methodsFor: 'sources, change log' stamp: 'dmu 9/7/2010 14:26'!\nwriteRecentCharacters: nCharacters toFileNamed: aFilename\n\t\"Schedule an editable text view on the last n characters of changes.\"\n\t| changes |\n\tchanges _ SourceFiles at: 2.\n\tchanges safelyDo: [\n\t\tchanges setToEnd; skip: nCharacters negated.\n\t\t(FileStream newFileNamed: aFilename) nextPutAll: (changes next: nCharacters); close; open; edit\n\t]! !\n\n!SystemDictionary methodsFor: 'window preferences' stamp: 'ssa 11/30/2009 17:48'!\nrecolorWindows\n\t\"Smalltalk recolorWindows\"\n\t\"Let the user define the color scheme for all my windows\"\n\t| menu choice color |\n\tmenu _ PopUpMenu labels:'one color for all windows\\standard color palette' withCRs.\n\tchoice _ menu startUp.\n\tchoice = 0 ifTrue:[^self].\n\tchoice = 1 ifTrue:[color _ Color fromUser.\n\t\tSmalltalk at: #WINDOWCOLORSELECTOR put:[:obj| color]].\n\tchoice = 2 ifTrue:[\n\t\tSmalltalk at: #WINDOWCOLORSELECTOR put:[:obj| Preferences windowColorFor: obj class name]].\n\tself updateAllWindowColors! !\n\n!SystemDictionary methodsFor: 'window preferences' stamp: 'ssa 11/30/2009 17:48'!\nupdateAllWindowColors\n\t\"Smalltalk updateAllWindowColors\"\n\t\n\tCursor wait showWhile:[\n\t\tView allSubInstances do:[:v| v backgroundColor: v model defaultBackgroundColor].\n\t\tScheduledControllers unCacheWindows;restore]! !\n\n!SystemNavigation methodsFor: '*Sly' stamp: 'dmu 8/23/2010 15:39'!\nparallelAllMethodsWithSourceString: aString matchCase: caseSensitive\n\t\"Answer a SortedCollection of all the methods that contain, in source code, aString as a substring.  Search the class comments also\"\n\t\"An experiment -- dmu\"\n\n\t| list classCount adder sema |\n\tlist _ Set new.\n\tsema _ Semaphore forMutualExclusion.\n\tadder _ [ :mrClass :mrSel | sema critical: [list add: ( MethodReference new\n\t\t\t\t\t\t\t\t\t\t\tsetStandardClass: mrClass\n\t\t\t\t\t\t\t\t\t\t\tmethodSymbol: mrSel)]].\n'Searching all source code...'\ndisplayProgressAt: Sensor cursorPoint\nfrom: 0 to: Smalltalk classNames size\nduring:\n\t[:bar | classCount _ 0.\n\tSmalltalk allClassesDoInParallel:\n\t\t[:class | bar value: (classCount _ classCount + 1).\n\t\t(Array with: class with: class class) do:\n\t\t\t[:cl | \n\t\t\t\tcl selectorsDo: [:sel | \n\t\t\t\t\t((cl sourceCodeAt: sel) findString: aString \n\t\t\t\t\t\tstartingAt: 1 caseSensitive: caseSensitive) > 0 ifTrue: [\n\t\t\t\t\t\t\tsel == #DoIt ifFalse: [adder copy fixTemps value: cl value: sel]]].\n\t\t\t\t(cl organization classComment asString findString: aString \n\t\t\t\t\t\tstartingAt: 1 caseSensitive: caseSensitive) > 0 ifTrue: [\n\t\t\t\t\t\t\tadder copy fixTemps value: cl value: #Comment].\n\t\t\t]]].\n\t^ list asSortedCollection! !\n\n!TestAsserter methodsFor: 'asserting'!\nassert: aBoolean\n\taBoolean ifFalse:\n\t\t[self logFailure: 'Assertion failed'.\n\t\tTestResult failure signal: 'Assertion failed'].! !\n\n!TestAsserter methodsFor: 'asserting'!\nassert: aBoolean description: aString\n\taBoolean ifFalse:\n\t\t[self logFailure: aString.\n\t\tTestResult failure signal: aString].! !\n\n!TestAsserter methodsFor: 'asserting'!\nassert: aBoolean description: aString resumable: resumableBoolean\n\t| exception |\n\taBoolean ifFalse:\n\t\t[self logFailure: aString.\n\t\texception := resumableBoolean\n\t\t\tifTrue: [TestResult resumableFailure]\n\t\t\tifFalse: [TestResult failure].\n\t\texception signal: aString].! !\n\n!TestAsserter methodsFor: 'asserting'!\ndeny: aBoolean\n\tself assert: aBoolean not.! !\n\n!TestAsserter methodsFor: 'asserting'!\ndeny: aBoolean description: aString\n\tself assert: aBoolean not description: aString.! !\n\n!TestAsserter methodsFor: 'asserting'!\ndeny: aBoolean description: aString resumable: resumableBoolean\n\tself assert: aBoolean not description: aString resumable: resumableBoolean.! !\n\n!TestAsserter methodsFor: 'asserting'!\nshould: aBlock raise: anExceptionalEvent \n\tself assert: (self executeShould: aBlock inScopeOf: anExceptionalEvent).! !\n\n!TestAsserter methodsFor: 'asserting'!\nshould: aBlock raise: anExceptionalEvent description: aString \n\tself\n\t\tassert: (self executeShould: aBlock inScopeOf: anExceptionalEvent)\n\t\tdescription: aString.! !\n\n!TestAsserter methodsFor: 'asserting'!\nshouldnt: aBlock raise: anExceptionalEvent \n\tself assert: (self executeShould: aBlock inScopeOf: anExceptionalEvent) not.! !\n\n!TestAsserter methodsFor: 'asserting'!\nshouldnt: aBlock raise: anExceptionalEvent description: aString \n\tself\n\t\tassert: (self executeShould: aBlock inScopeOf: anExceptionalEvent) not\n \t\tdescription: aString.! !\n\n!TestAsserter methodsFor: 'convenience' stamp: 'nfr 1/3/2010 18:38'!\nassert: anObject equals: anotherObject\n\tself\n\t\tassert: anObject = anotherObject\n\t\tdescription: anObject printString , ' is not equal to ' , anotherObject printString.! !\n\n!TestAsserter methodsFor: 'logging'!\nlogFailure: aString\n\tself class logFailure: aString.! !\n\n!TestAsserter methodsFor: 'private'!\nexecuteShould: aBlock inScopeOf: anExceptionalEvent\n\t^[aBlock value.\n \tfalse]\n\t\ton: anExceptionalEvent\n\t\tdo: [:ex | ex sunitExitWith: true]! !\n\n!TestAsserter commentStamp: '<historical>' prior: 0!\nI understand methods beginning #assert:... and #deny:... (and my class-side understands #assert:description:).  I am the superclass of TestCase and TestResource and can also be the superclass of any test helper classes you create to factor out test behaviour.  I exist so that test code can be refactored between my subclasses without difficulty.\n\nSend #assert:description: when you want to check for an expected value. For example, you might say\n\tself assert: socket isOpen description: 'We requested a socket but now it is not open'.\nto test whether or not a socket is open at a point in a test.  Use description strings both to give more information about where a test failed in debugger notifiers and logs, and to document the intent of a test.  Other methods include #assert:, #assert:description:resumable:, #deny:, #deny:description:, #deny:description:resumable:, #should:raise:, #should:raise:description:, #shouldnt:raise:, #shouldnt:raise:description:.  All these methods are defined on the superclass, TestAsserter.  (Any convenience assertion methods you create for general use should also be defined in my 'convenience' protocol.)\n\nOverride my class-side #isLogging in subclasses to have failed assertion descriptions shown on the Transcript.  To have them appear elsewhere, also override my class-side #failureLog.\n!\n!TestAsserter class methodsFor: 'asserting'!\nassert: aBoolean description: aString\n\t\"Minimal clone of the instance-side assert protocol so that class-side methods can use it.\"\n\n\taBoolean ifFalse:\n\t\t[self logFailure: aString.\n\t\tTestResult failure signal: aString].! !\n\n!TestAsserter class methodsFor: 'logging'!\nfailureLog\n\t^Transcript! !\n\n!TestAsserter class methodsFor: 'logging'!\nisLogging\n\t\"By default, we're not logging failures. Override in subclasses as desired.\"\n\n\t^false! !\n\n!TestAsserter class methodsFor: 'logging'!\nlogFailure: aString\n\tself isLogging ifTrue:\n\t\t[self failureLog cr; nextPutAll: aString; flush].! !\n\n!TestCase methodsFor: 'accessing'!\nresources\n\t\"We give TestCase this instance-side method so that methods polymorphic with TestSuite can be code-identical.  Having this instance-side method also helps when writing tests of resource behaviour. Except for such tests, it is rare to override this method and should not be done without thought.  If there were a good reason why a single test case needed to share tests requiring different resources, it might be legitimate.\"\n\n\t^self class resources! !\n\n!TestCase methodsFor: 'accessing'!\nselector\n\t^testSelector! !\n\n!TestCase methodsFor: 'asserting'!\nassert: aBoolean\n\n\taBoolean ifFalse: [self signalFailure: 'Assertion failed']\n\t\t\t! !\n\n!TestCase methodsFor: 'asserting' stamp: 'md 8/2/2006 11:00'!\nassert: aBooleanOrBlock description: aString\n\taBooleanOrBlock value ifFalse: [\n\t\tself logFailure: aString.\n\t\tTestResult failure signal: aString]\n\t\t\t! !\n\n!TestCase methodsFor: 'asserting' stamp: 'md 8/2/2006 11:00'!\nassert: aBooleanOrBlock description: aString resumable: resumableBoolean \n\t| exception |\n\taBooleanOrBlock value\n\t\tifFalse: \n\t\t\t[self logFailure: aString.\n\t\t\texception := resumableBoolean\n\t\t\t\t\t\tifTrue: [TestResult resumableFailure]\n\t\t\t\t\t\tifFalse: [TestResult failure].\n\t\t\texception signal: aString]\n\t\t\t! !\n\n!TestCase methodsFor: 'asserting' stamp: 'dc 4/2/2007 18:38'!\nassert: expected equals: actual\n\t^ self\n\t\tassert: (expected = actual)\n\t\tdescription: (self comparingStringBetween: expected and: actual)\n! !\n\n!TestCase methodsFor: 'asserting'!\ndeny: aBoolean\n\n\tself assert: aBoolean not\n\t\t\t! !\n\n!TestCase methodsFor: 'asserting' stamp: 'md 8/2/2006 11:00'!\ndeny: aBooleanOrBlock description: aString\n\tself assert: aBooleanOrBlock value not description: aString\n\t\t\t! !\n\n!TestCase methodsFor: 'asserting' stamp: 'md 8/2/2006 11:00'!\ndeny: aBooleanOrBlock description: aString resumable: resumableBoolean \n\tself\n\t\tassert: aBooleanOrBlock value not\n\t\tdescription: aString\n\t\tresumable: resumableBoolean\n\t\t\t! !\n\n!TestCase methodsFor: 'asserting'!\nshould: aBlock raise: anExceptionalEvent \n\t^self assert: (self executeShould: aBlock inScopeOf: anExceptionalEvent)\n\t\t\t! !\n\n!TestCase methodsFor: 'asserting'!\nshould: aBlock raise: anExceptionalEvent description: aString \n\t^self assert: (self executeShould: aBlock inScopeOf: anExceptionalEvent)\n\t\tdescription: aString\n\t\t\t! !\n\n!TestCase methodsFor: 'asserting' stamp: 'nk 5/11/2003 10:32'!\nshould: aBlock raise: anExceptionalEvent whoseDescriptionDoesNotInclude: subString description: aString \n\t^self assert: (self executeShould: aBlock inScopeOf: anExceptionalEvent withDescriptionNotContaining: subString)\n\t\tdescription: aString\n! !\n\n!TestCase methodsFor: 'asserting' stamp: 'nk 5/11/2003 10:24'!\nshould: aBlock raise: anExceptionalEvent whoseDescriptionIncludes: subString description: aString \n\t^self assert: (self executeShould: aBlock inScopeOf: anExceptionalEvent withDescriptionContaining: subString)\n\t\tdescription: aString\n! !\n\n!TestCase methodsFor: 'asserting'!\nshouldnt: aBlock raise: anExceptionalEvent \n\t^self assert: (self executeShould: aBlock inScopeOf: anExceptionalEvent) not\n\t\t\t! !\n\n!TestCase methodsFor: 'asserting'!\nshouldnt: aBlock raise: anExceptionalEvent description: aString \n\t^self assert: (self executeShould: aBlock inScopeOf: anExceptionalEvent) not \t\tdescription: aString\n\t\t\t! !\n\n!TestCase methodsFor: 'asserting' stamp: 'nk 5/11/2003 10:34'!\nshouldnt: aBlock raise: anExceptionalEvent whoseDescriptionDoesNotInclude: subString description: aString \n\t^self assert: (self executeShould: aBlock inScopeOf: anExceptionalEvent withDescriptionNotContaining: subString) not\n\t\tdescription: aString\n! !\n\n!TestCase methodsFor: 'asserting' stamp: 'nk 5/11/2003 10:34'!\nshouldnt: aBlock raise: anExceptionalEvent whoseDescriptionIncludes: subString description: aString \n\t^self assert: (self executeShould: aBlock inScopeOf: anExceptionalEvent withDescriptionContaining: subString) not\n\t\tdescription: aString\n! !\n\n!TestCase methodsFor: 'asserting' stamp: 'md 2/22/2006 14:26'!\nsignalFailure: aString\n\tTestResult failure signal: aString! !\n\n!TestCase methodsFor: 'dependencies'!\naddDependentToHierachy: anObject \n\t\"an empty method. for Composite compability with TestSuite\"! !\n\n!TestCase methodsFor: 'dependencies'!\nremoveDependentFromHierachy: anObject \n\t\"an empty method. for Composite compability with TestSuite\"! !\n\n!TestCase methodsFor: 'deprecated'!\nshould: aBlock\n\tself assert: aBlock value! !\n\n!TestCase methodsFor: 'deprecated'!\nshould: aBlock description: aString\n\tself assert: aBlock value description: aString! !\n\n!TestCase methodsFor: 'deprecated'!\nshouldnt: aBlock\n\tself deny: aBlock value! !\n\n!TestCase methodsFor: 'deprecated'!\nshouldnt: aBlock description: aString\n\tself deny: aBlock value description: aString! !\n\n!TestCase methodsFor: 'events'!\nannounce: anAnnouncementClass\n\t^ self announce: anAnnouncementClass with: nil! !\n\n!TestCase methodsFor: 'events' stamp: 'tbn 4/26/2011 09:58'!\nannounce: anAnnouncementClass withResult: result\n\t| event |\n\tself shouldAnnounce ifFalse: [ ^ self ].\n\t\n\tevent := anAnnouncementClass asAnnouncement.\n\tevent testCase: self.\n\tevent testSelector: testSelector.\n\tevent testResult: result.\n\tself announcer announce: event.! !\n\n!TestCase methodsFor: 'events'!\nannouncer\n\t^ self class announcer! !\n\n!TestCase methodsFor: 'events'!\nshouldAnnounce\n\t^ self class shouldAnnounce! !\n\n!TestCase methodsFor: 'extensions' stamp: 'mx 3/20/2006 23:32'!\nexecuteShould: aBlock inScopeOf: anException withExceptionDo: anotherBlock\n\n\t^[aBlock value.\n \tfalse] \n\t\ton: anException\n\t\tdo: [:exception | \n\t\t\tanotherBlock value: exception.\n\t\t\texception return: true]! !\n\n!TestCase methodsFor: 'extensions' stamp: 'mx 3/13/2006 23:21'!\nfail\n\n\t^self assert: false! !\n\n!TestCase methodsFor: 'extensions'!\nshould: aBlock notTakeMoreThan: aDuration\n    \"Evaluate aBlock in a forked process and if it takes more than anInteger milliseconds\n    to run we terminate the process and report a test failure.  It'' important to\n    use the active process for the test failure so that the failure reporting works correctly\n    in the context of the exception handlers.\"\n\n    | evaluated evaluationProcess result delay testProcess |\n\n    evaluated := false.\n    delay := Delay forDuration: aDuration.\n    testProcess := Processor activeProcess.\n    \"Create a new process to evaluate aBlock\"\n    evaluationProcess := [\n        result := aBlock value.\n        evaluated := true.\n        delay unschedule.\n        testProcess resume ] forkNamed: 'Process to evaluate should: notTakeMoreThanMilliseconds:'.\n\n    \"Wait the milliseconds they asked me to\"\n    delay wait.\n    \"After this point either aBlock was evaluated or not...\"\n    evaluated ifFalse: [\n        evaluationProcess terminate.\n        self assert: false description: ('Block evaluation took more than the expected <1p>' expandMacrosWith: aDuration)].\n   \n    ^result! !\n\n!TestCase methodsFor: 'extensions' stamp: 'md 8/2/2006 11:08'!\nshould: aBlock notTakeMoreThanMilliseconds: anInteger\n    \"For compatibility with other Smalltalks\"\n\n   self should: aBlock notTakeMoreThan: (Duration milliSeconds: anInteger).! !\n\n!TestCase methodsFor: 'extensions' stamp: 'mx 3/20/2006 23:52'!\nshould: aBlock raise: anException withExceptionDo: anotherBlock \n\n\t^self assert: (self executeShould: aBlock inScopeOf: anException withExceptionDo: anotherBlock)! !\n\n!TestCase methodsFor: 'extensions' stamp: 'mx 3/20/2006 21:29'!\nshouldFix: aBlock \n\n\t^self should: aBlock raise: Exception! !\n\n!TestCase methodsFor: 'printing'!\nprintOn: aStream\n\n\taStream\n\t\tnextPutAll: self class printString;\n\t\tnextPutAll: '>>#';\n\t\tnextPutAll: testSelector! !\n\n!TestCase methodsFor: 'running'!\ndebug\n\t[(self class selector: testSelector) runCase]\n\t\tensure: [TestResource resetResources: self resources]! !\n\n!TestCase methodsFor: 'running' stamp: 'nfr 1/3/2010 18:04'!\ndebugAsFailure\n\t| semaphore |\n\tsemaphore := Semaphore new.\n\t[semaphore wait.\n\tTestResource resetResources: self resources] fork.\n\t(self class selector: testSelector) runCaseAsFailure: semaphore! !\n\n!TestCase methodsFor: 'running' stamp: 'md 2/22/2006 14:17'!\nfailureLog\t\n\t^Transcript\n\n\t\t\t! !\n\n!TestCase methodsFor: 'running'!\nisLogging\n\t\"By default, we're not logging failures. If you override this in \n\ta subclass, make sure that you override #failureLog\"\n\t^false\n\t\t\t! !\n\n!TestCase methodsFor: 'running'!\nlogFailure: aString\n\tself isLogging ifTrue: [\n\t\tself failureLog \n\t\t\tcr; \n\t\t\tnextPutAll: aString; \n\t\t\tflush]\n\t\t\t! !\n\n!TestCase methodsFor: 'running'!\nopenDebuggerOnFailingTestMethod\n\t\"SUnit has halted one step in front of the failing test method. Step over the 'self halt' and \n\t send into 'self perform: testSelector' to see the failure from the beginning\"\n\n\tself\n\t\thalt;\n\t\tperformTest! !\n\n!TestCase methodsFor: 'running'!\nprepareToRunAgain \t\n\n\t\"Used by the debugger when a test is restarted\n\tI'm not 'hidding'' possible exceptions because I think it is best to popup a new debugger\n\tif some one occurs and let the programmer decide what to do - Hernan\"\n\tself \n\t\ttearDown;\n\t\tsetUp! !\n\n!TestCase methodsFor: 'running'!\nrun\n\t| result |\n\tresult := TestResult new.\n\t[self run: result]\n\t\tensure: [TestResource resetResources: self resources].\n\t^result! !\n\n!TestCase methodsFor: 'running'!\nrun: aResult\n\taResult runCase: self! !\n\n!TestCase methodsFor: 'running'!\nrunCase\n\tself resources do: [:each | each availableFor: self].\n\t[self setUp.\n\tself performTest] ensure: [\n\t\tself tearDown.\n\t\tself cleanUpInstanceVariables]! !\n\n!TestCase methodsFor: 'running'!\nrunCaseAsFailure: aSemaphore\n\t[self resources do: [:each | each availableFor: self].\n\t[self setUp.\n\tself openDebuggerOnFailingTestMethod] ensure: [self tearDown]]\n\t\tensure: [aSemaphore signal]! !\n\n!TestCase methodsFor: 'running'!\nsetUp! !\n\n!TestCase methodsFor: 'running'!\ntearDown\n\n\t! !\n\n!TestCase methodsFor: 'testing'!\nexpectedFailures\n\t\"| pragmas |\n\tpragmas := Pragma allNamed: #expectedFailure from: self class to: Object.\n\t^ pragmas collect: [:each | each method selector  ].\n\t\n\tthis implementation is far too slow and block the execution of tests since just for printing a test\n\tit scans all the literal of the system.\n\tSo I reverted the old way of declaring expectedFailures\n\t\"\n\t\n\t^ Array new! !\n\n!TestCase methodsFor: 'testing' stamp: 'JF 7/30/2003 13:39'!\nshouldPass\n\t\"Unless the selector is in the list we get from #expectedFailures, we expect it to pass\"\n\t^ (self expectedFailures includes: testSelector) not! !\n\n!TestCase methodsFor: 'private'!\ncleanUpInstanceVariables\n\tself class allInstVarNames do: [ :name |\n\t\tname = 'testSelector' ifFalse: [\n\t\t\tself instVarNamed: name put: nil ] ]! !\n\n!TestCase methodsFor: 'private' stamp: 'dc 4/2/2007 18:46'!\ncomparingStringBetween: expected and: actual\n\t^ String streamContents: [:stream |\n\t\tstream\n\t\t\tnextPutAll: 'Expected ';\n\t\t\tnextPutAll: (expected printStringLimitedTo: 10);\n\t\t\tnextPutAll: ' but was ';\n\t\t\tnextPutAll: (actual printStringLimitedTo: 10);\n\t\t\tnextPutAll: '.'\n\t\t]! !\n\n!TestCase methodsFor: 'private' stamp: 'md 2/22/2006 14:27'!\nexecuteShould: aBlock inScopeOf: anExceptionalEvent \n\t^[aBlock value.\n \tfalse] on: anExceptionalEvent\n\t\tdo: [:ex | ex return: true]\n\t\t\t! !\n\n!TestCase methodsFor: 'private' stamp: 'md 2/22/2006 14:27'!\nexecuteShould: aBlock inScopeOf: anExceptionalEvent withDescriptionContaining: aString\n\t^[aBlock value.\n \tfalse] on: anExceptionalEvent\n\t\tdo: [:ex | ex return: (ex description includesSubString: aString) ]\n\t\t\t! !\n\n!TestCase methodsFor: 'private' stamp: 'md 2/22/2006 14:27'!\nexecuteShould: aBlock inScopeOf: anExceptionalEvent withDescriptionNotContaining: aString\n\t^[aBlock value.\n \tfalse] on: anExceptionalEvent\n\t\tdo: [:ex | ex return: (ex description includesSubString: aString) not ]\n\t\t\t! !\n\n!TestCase methodsFor: 'private'!\nperformTest\n\tself perform: testSelector asSymbol! !\n\n!TestCase methodsFor: 'private'!\nsetTestSelector: aSymbol\n\ttestSelector := aSymbol! !\n\n!TestCase commentStamp: 'nfr 1/3/2010 17:56' prior: 0!\nA TestCase is an implementation of the Command pattern to run a test.  TestCase instances are created with the class method #selector:, passing the symbol that names the method to be executed when the test case runs.  Various UIs exist to run these instances and they can also be created and run programmatically.\n\nWhen you discover a new fixture, subclass TestCase and create a #test... method for the first test.  As that method develops and more #test... methods are added, you will find yourself refactoring temps into instance variables for the objects in the fixture and overriding #setUp to initialize these variables.  As required, override #tearDown to nil references, release objects and deallocate.\n\nSee my superclass' comment for assertion and logging information.!\n!TestCase class methodsFor: 'accessing' stamp: ' 17/7/10 17:28'!\nallTestSelectors\n\t| answer pivotClass lookupRoot |\n\tanswer := Set withAll: self testSelectors.\n\tself shouldInheritSelectors\n\t\tifTrue:\n\t\t\t[pivotClass := self.\n\t\t\tlookupRoot := self lookupHierarchyRoot.\n\t\t\t[pivotClass == lookupRoot]\n\t\t\t\twhileFalse:\n\t\t\t\t\t[pivotClass := pivotClass superclass.\n\t\t\t\t\tanswer addAll: pivotClass testSelectors]].\n\t^answer asSortedCollection asOrderedCollection! !\n\n!TestCase class methodsFor: 'accessing' stamp: ' 17/7/10 17:28'!\nlookupHierarchyRoot\n\t^TestCase! !\n\n!TestCase class methodsFor: 'accessing'!\nresources\n\n\t^#()! !\n\n!TestCase class methodsFor: 'accessing' stamp: ' 17/7/10 17:28'!\nsunitVersion\n\t^'4.0'! !\n\n!TestCase class methodsFor: 'accessing'!\ntestSelectors\n\t^(self selectors select: [ :each | (each beginsWith: 'test') and: [each numArgs isZero]])! !\n\n!TestCase class methodsFor: 'building suites' stamp: 'lr 3/14/2010 21:13'!\naddTestsFor: classNameString toSuite: suite\n\t| cls |\n\tcls := Smalltalk globals at: classNameString ifAbsent: [ ^ suite ].\n\t^ cls isAbstract\n\t\tifTrue: [ \n\t\t\tcls allSubclasses\n\t\t\t\tdo: [ :each | \n\t\t\t\t\teach isAbstract\n\t\t\t\t\t\tifFalse: [ each addToSuiteFromSelectors: suite ] ].\n\t\t\tsuite ]\n\t\tifFalse: [ cls addToSuiteFromSelectors: suite ]! !\n\n!TestCase class methodsFor: 'building suites' stamp: 'nk 4/21/2002 10:51'!\naddToSuite: suite fromMethods: testMethods \n\ttestMethods do:  [ :selector | \n\t\t\tsuite addTest: (self selector: selector) ].\n\t^suite! !\n\n!TestCase class methodsFor: 'building suites' stamp: 'nk 4/21/2002 16:37'!\naddToSuiteFromSelectors: suite\n\t^self addToSuite: suite fromMethods: (self shouldInheritSelectors\n\t\tifTrue: [ self allTestSelectors ]\n\t\tifFalse: [self testSelectors ])! !\n\n!TestCase class methodsFor: 'building suites'!\nbuildSuite\n\t| suite |\n\t^self isAbstract\n\t\tifTrue: \n\t\t\t[suite := self suiteClass named: self name asString.\n\t\t\tself allSubclasses \n\t\t\t\tdo: [:each | each isAbstract ifFalse: [suite addTest: each buildSuiteFromSelectors]].\n\t\t\tsuite]\n\t\tifFalse: [self buildSuiteFromSelectors]! !\n\n!TestCase class methodsFor: 'building suites'!\nbuildSuiteFromAllSelectors\n\n\t^self buildSuiteFromMethods: self allTestSelectors\n\t\t\t! !\n\n!TestCase class methodsFor: 'building suites'!\nbuildSuiteFromLocalSelectors\n\n\t^self buildSuiteFromMethods: self testSelectors\n\t\t\t! !\n\n!TestCase class methodsFor: 'building suites'!\nbuildSuiteFromMethods: testMethods\n\n\t^testMethods\n\t\tinject: (self suiteClass named: self name asString)\n\t\tinto: [:suite :selector |\n\t\t\tsuite\n\t\t\t\taddTest: (self selector: selector);\n\t\t\t\tyourself]! !\n\n!TestCase class methodsFor: 'building suites' stamp: ' 17/7/10 17:28'!\nbuildSuiteFromSelectors\n\t^self buildSuiteFromMethods: self allTestSelectors! !\n\n!TestCase class methodsFor: 'building suites'!\nsuiteClass\n\t^TestSuite! !\n\n!TestCase class methodsFor: 'coverage' stamp: 'lr 3/14/2010 21:13'!\ncoverage\n\t\"returns the coverage determined by a simple static analysis of test coverage \n\tmade by the receiver on a class that is identified by the name of the receiver.\n\tWe assume that SetTest test Set.\"\n\n\t| cls className |\n\t(self name endsWith: 'Test')\n\t\tifFalse: [ self error: 'Please, use #coverageForClass: instead' ].\n\tclassName := self name copyFrom: 1 to: self name size - 'Test' size.\n\tcls := Smalltalk globals at: className asSymbol ifAbsent: [ self error: 'Please, use #coverageForClass: instead' ].\t\"May happen with Transcript\"\n\tcls isBehavior\n\t\tifFalse: [ cls := cls class ].\n\t^ self coverageForClass: cls! !\n\n!TestCase class methodsFor: 'coverage' stamp: 'ab 12/25/2008 17:20'!\ncoverageAsString\n\t| cov className |\n\tcov := self coverage first asInteger. \n\t\"coverage already checks that the name is ends with 'Test' and if the class tested exists\"\n\t\n\tclassName := self name copyFrom: 1 to: (self name size - 'Test' size).\n\t^ self name asString, ' covers ', cov asString, '% of ', className.! !\n\n!TestCase class methodsFor: 'coverage' stamp: 'sd 1/28/2009 14:57'!\ncoverageForClass: cls\n\t\"returns the test coverage of all the methods included inherited ones\"\n\t^ self coverageForClass: cls until: ProtoObject! !\n\n!TestCase class methodsFor: 'coverage' stamp: 'sd 1/28/2009 14:58'!\ncoverageForClass: cls until: aRootClass\n\t\"returns the test coverage of all the methods included inherited ones but stopping at aRootClass included\"\n\t\n\t| definedMethods testedMethods untestedMethods |\n\tdefinedMethods := cls allSelectorsAboveUntil: aRootClass.\n\tdefinedMethods size = 0\n\t\tifTrue: [^ {0. Set new}].\n\ttestedMethods := \n\t\tself methodDictionary values inject: Set new into: \n\t\t\t\t\t\t\t[:sums :cm | sums union: cm messages].\n\ttestedMethods := testedMethods reject: [:sel | (definedMethods includes: sel) not].\n\tuntestedMethods := definedMethods select: [:selector | (testedMethods includes: selector) not].\n\t^ { (testedMethods size * 100 / definedMethods size) asFloat . untestedMethods}\n! !\n\n!TestCase class methodsFor: 'coverage' stamp: 'ab 12/25/2008 17:15'!\ncoveragePercentage\n\t^ self coverage first! !\n\n!TestCase class methodsFor: 'coverage' stamp: 'lr 3/14/2010 21:13'!\nlocalCoverage\n\t\"returns the coverage determined by a simple static analysis of test coverage \n\tmade by the receiver on a class that is identified by the name of the receiver.\n\tWe assume that SetTest test Set. The computation of the coverage takes only into\n\taccount the methods defined locally in the tested class. See coverage for a more global \n\tcoverage\"\n\n\t| cls className |\n\t(self name endsWith: 'Test')\n\t\tifFalse: [ self error: 'Please, use #localCoverageForClass: instead' ].\n\tclassName := self name copyFrom: 1 to: self name size - 'Test' size.\n\tcls := Smalltalk globals at: className asSymbol ifAbsent: [ self error: 'Please, use #localCoverageForClass: instead' ].\n\tcls isBehavior\n\t\tifFalse: [ cls := cls class ].\n\t^ self localCoverageForClass: cls! !\n\n!TestCase class methodsFor: 'coverage' stamp: 'sd 1/28/2009 15:04'!\nlocalCoverageAsString\n\t| cov className |\n\tcov := self localCoverage first asInteger. \n\t\"coverage already checks that the name is ends with 'Test' and if the class tested exists\"\n\t\n\tclassName := self name copyFrom: 1 to: (self name size - 'Test' size).\n\t^ self name asString, ' covers ', cov asString, '% of ', className.! !\n\n!TestCase class methodsFor: 'coverage' stamp: 'sd 1/28/2009 14:55'!\nlocalCoverageForClass: cls\n\t\n\t| definedMethods testedMethods untestedMethods |\n\tdefinedMethods := cls selectors.\n\t\"It happens for IdentityBag / IdentityBagTest\"\n\tdefinedMethods size = 0\n\t\tifTrue: [^ {0. Set new}].\n\n\ttestedMethods := \n\t\tself methodDictionary values inject: Set new into: \n\t\t\t\t\t\t\t[:sums :cm | sums union: cm messages].\n\t\t\t\t\t\n\t\"testedMethods contains all the methods send in test methods, which probably contains methods that have nothign to do with collection\"\n\ttestedMethods := testedMethods reject: [:sel | (definedMethods includes: sel) not].\n\n\tuntestedMethods := definedMethods select: [:selector | (testedMethods includes: selector) not].\n\n\t^ { (testedMethods size * 100 / definedMethods size) asFloat . untestedMethods}\n! !\n\n!TestCase class methodsFor: 'coverage' stamp: 'sd 1/28/2009 14:55'!\nlocalCoveragePercentage\n\t^ self localCoverage first! !\n\n!TestCase class methodsFor: 'events'!\nannouncer \n\t^ self announcers at: self ifAbsentPut: [ Announcer new ]! !\n\n!TestCase class methodsFor: 'events'!\nannouncers\n\t^ Announcers ifNil: [ Announcers := Dictionary new ] ! !\n\n!TestCase class methodsFor: 'events'!\nresetAnnouncer\n\tself announcers removeKey: self ifAbsent: []! !\n\n!TestCase class methodsFor: 'events'!\nshouldAnnounce\n\t^ self announcers includesKey: self! !\n\n!TestCase class methodsFor: 'history'!\ngenerateLastStoredRunMethod\n\n\tself shouldGenerateLastStoredRunMethod ifTrue: [\n\t\tself class\n\t\t\tcompile: (self lastRunMethodNamed: #lastStoredRun)\n\t\t\tclassified: 'history' ]! !\n\n!TestCase class methodsFor: 'history'!\nhistory\n\t^ history ifNil: [ history := self newTestDictionary ]! !\n\n!TestCase class methodsFor: 'history'!\nhistory: aDictionary\n\thistory := aDictionary! !\n\n!TestCase class methodsFor: 'history'!\nlastRun\n\t^ TestResult historyFor: self! !\n\n!TestCase class methodsFor: 'history'!\nlastRunMethodNamed: aSelector\n\t\n\t^ String streamContents: [:str |\n\t\tstr nextPutAll: aSelector asString ;cr.\n\t\tstr tab; nextPutAll: '^ ', (self lastRun) storeString]\n! !\n\n!TestCase class methodsFor: 'history'!\nlastStoredRun\n\t^ ((Dictionary new) add: (#failures->#()); add: (#passed->#()); add: (#errors->#()); yourself)! !\n\n!TestCase class methodsFor: 'history'!\nnewTestDictionary\n\n\t^ Dictionary new at: #timeStamp put: DateAndTime now;\n\t\tat: #passed put: Set new;\n\t\tat: #failures put: Set new;\n\t\tat: #errors put: Set new;\n\t\tyourself\n\t\t! !\n\n!TestCase class methodsFor: 'history'!\nresetHistory\n\thistory := nil! !\n\n!TestCase class methodsFor: 'history'!\nshouldGenerateLastStoredRunMethod\n\t| sameRun |\n\t\n\t(self class methodDictionary includesKey: #lastStoredRun)\n\t\tifFalse: [^ true].\n\tsameRun := #(#passed #failures #errors) inject: true into: \n\t\t[ :ok :set | ok and: [(self lastRun at: set) = (self lastStoredRun at: set) ]].\n\t^ sameRun not\n! !\n\n!TestCase class methodsFor: 'initialize - event'!\ninitialize\n\tsuper initialize.\n\t(SystemChangeNotifier respondsTo: #notify:ofSystemChangesOfItem:using:)\n\t\tifTrue: [\n\t\t\tSystemChangeNotifier uniqueInstance notify: self ofSystemChangesOfItem: #method using: #methodChanged:.\n\t\t].\n\t\"STEFAN: Not sure what the implication is of not having the notifications.\"\n\t\t! !\n\n!TestCase class methodsFor: 'initialize - event' stamp: 'al 2/9/2009 20:00'!\nmethodChanged: anEvent\n\t\"Remove the changed method from the known test results.\"\n\t\n\t| cls sel |\n\tanEvent item isCompiledMethod ifFalse: [ ^ self ].\n\tcls := anEvent item methodClass.\n\t(cls inheritsFrom: TestCase)\n\t\tifFalse: [^ self].\n\tsel := anEvent item selector.\n\t(sel beginsWith: 'test')\n\t\tifFalse: [^ self].\n\tTestResult removeFromTestHistory: sel in: cls.\n! !\n\n!TestCase class methodsFor: 'instance creation'!\ndebug: aSymbol\n\n\t^(self selector: aSymbol) debug! !\n\n!TestCase class methodsFor: 'instance creation'!\nrun: aSymbol\n\n\t^(self selector: aSymbol) run! !\n\n!TestCase class methodsFor: 'instance creation'!\nselector: aSymbol\n\n\t^self new setTestSelector: aSymbol! !\n\n!TestCase class methodsFor: 'instance creation'!\nsuite\n\n\t^self buildSuite! !\n\n!TestCase class methodsFor: 'testing'!\nhasMethodBeenRun: aSelector\n\t^ ((self lastRun at: #errors),\n\t\t(self lastRun at: #failures),\n\t\t(self lastRun at: #passed))\n\t\t\tincludes: aSelector! !\n\n!TestCase class methodsFor: 'testing' stamp: 'md 2/22/2006 14:21'!\nisAbstract\n\t\"Override to true if a TestCase subclass is Abstract and should not have\n\tTestCase instances built from it\"\n\n\t^self name = #TestCase\n\t\t\t! !\n\n!TestCase class methodsFor: 'testing'!\nisUnitTest\n\t^true! !\n\n!TestCase class methodsFor: 'testing'!\nmethodFailed: aSelector\n\t^ (self lastRun at: #failures) includes: aSelector! !\n\n!TestCase class methodsFor: 'testing'!\nmethodPassed: aSelector\n\t^ (self lastRun at: #passed) includes: aSelector! !\n\n!TestCase class methodsFor: 'testing'!\nmethodProgressed: aSelector\n\t^ ((self storedMethodRaisedError: aSelector) or: [self storedMethodFailed: aSelector])\n\t\tand: [self methodPassed: aSelector]\n\t\t! !\n\n!TestCase class methodsFor: 'testing'!\nmethodRaisedError: aSelector\n\t^ (self lastRun at: #errors) includes: aSelector! !\n\n!TestCase class methodsFor: 'testing'!\nmethodRegressed: aSelector\n\t^ (self storedMethodPassed: aSelector) and: [(self methodFailed: aSelector) or: [self methodRaisedError: aSelector]]! !\n\n!TestCase class methodsFor: 'testing' stamp: ' 17/7/10 17:28'!\nshouldInheritSelectors\n\t\"I should inherit from an Abstract superclass but not from a concrete one by default, unless I have no testSelectors in which case I must be expecting to inherit them from my superclass.  If a test case with selectors wants to inherit selectors from a concrete superclass, override this to true in that subclass.\"\n\t\n\t^self ~~ self lookupHierarchyRoot\n\t\tand: [self superclass isAbstract or: [self testSelectors isEmpty]]! !\n\n!TestCase class methodsFor: 'testing'!\nstoredMethodFailed: aSelector\n\t^ (self lastStoredRun at: #failures) includes: aSelector! !\n\n!TestCase class methodsFor: 'testing'!\nstoredMethodPassed: aSelector\n\t^ (self lastStoredRun at: #passed) includes: aSelector! !\n\n!TestCase class methodsFor: 'testing'!\nstoredMethodRaisedError: aSelector\n\t^ (self lastStoredRun at: #errors) includes: aSelector! !\n\n!TestCaseAnnouncement methodsFor: 'accessing' stamp: 'tbn 4/26/2011 09:56'!\ntestCase\n        \"Returns the test case.\"\n        \n        ^testCase! !\n\n!TestCaseAnnouncement methodsFor: 'accessing' stamp: 'tbn 4/26/2011 09:56'!\ntestCase: aTestCase\n        \"Sets the test case to the given test case.\"\n        \n        testCase := aTestCase! !\n\n!TestCaseAnnouncement methodsFor: 'accessing' stamp: 'tbn 4/26/2011 09:56'!\ntestResult\n        \"Returns the test result.\"\n        \n        ^testResult! !\n\n!TestCaseAnnouncement methodsFor: 'accessing' stamp: 'tbn 4/26/2011 09:56'!\ntestResult: aTestResult\n        \"Sets the test result to the given test result.\"\n        \n        testResult := aTestResult! !\n\n!TestCaseAnnouncement methodsFor: 'accessing' stamp: 'tbn 4/26/2011 09:56'!\ntestSelector\n        \"Returns the test selector.\"\n        \n        ^testSelector! !\n\n!TestCaseAnnouncement methodsFor: 'accessing' stamp: 'tbn 4/26/2011 09:57'!\ntestSelector: aSymbol\n        \"Sets the test selector to the given symbol.\"\n        \n        testSelector := aSymbol! !\n\n!TestCaseAnnouncement methodsFor: 'testing' stamp: 'tbn 4/26/2011 09:57'!\nhasErrors\n        \"Return true if the test result has errors.\"\n        \n        ^testResult hasErrors! !\n\n!TestCaseAnnouncement methodsFor: 'testing' stamp: 'tbn 4/26/2011 09:57'!\nhasFailures\n        \"Return true if the test result has failures.\"\n        \n        ^testResult hasFailures! !\n\n!TestCaseAnnouncement methodsFor: 'testing' stamp: 'tbn 4/26/2011 09:58'!\nhasPassed\n        \"Return true if the test has passed.\"\n        \n        ^testResult hasPassed! !\n\n!TestCaseAnnouncement commentStamp: 'tbn 4/26/2011 09:54' prior: 0!\nThis is a common superclass for announcements related to SUnit test cases.\n\nInstance Variables\n        testCase:                       <TestCase>\n        testResult:                     <TestResult>\n        testSelector:           \t   <Symbol>\n\ntestCase\n        - The test case\n\ntestResult\n        - The result of the test case\n\ntestSelector\n        - The selector of the test method!\n!TestCaseEnded commentStamp: 'tbn 4/26/2011 09:55' prior: 0!\nThis event is announced when testing a test case ends.!\n!TestCaseStarted commentStamp: 'tbn 4/26/2011 09:55' prior: 0!\nThis event is announced when testing a test case starts.!\n!TestCaseTest methodsFor: 'events' stamp: 'jannik.laval 10/1/2010 14:15'!\ntestAnnouncement\n\t| collection oldCollection suite unitTest |\n\tunitTest := ClassFactoryForTestCaseTest.\n\tcollection := OrderedCollection new.\n\tunitTest resetAnnouncer.\n\t\n\tself deny: (unitTest shouldAnnounce).\n\tself deny: (unitTest new shouldAnnounce).\n\t\t\n\tunitTest announcer on: TestCaseAnnouncement do: [:ann | collection add: ann ].\n\n\tself assert: (unitTest shouldAnnounce).\n\tself assert: (unitTest new shouldAnnounce).\n\n\t\"We run SUnitTest\"\n\tsuite := unitTest buildSuite.\n\tsuite run.\n\n\tself assert: (collection size = (suite tests size * 2)).\n\tself assert: (collection select: [:c | c isKindOf: TestCaseStarted]) size = (collection size / 2).\n\tself assert: (collection select: [:c | c isKindOf: TestCaseEnded]) size =( collection size / 2).\n\tself assert: (collection allSatisfy: #hasPassed).\n\tself deny: (collection anySatisfy: #hasFailures).\n\t\n\toldCollection := collection copy.\n\tunitTest resetAnnouncer.\n\tunitTest debug: #testClassCreationInDifferentCategories.\n\tself assert: (collection = oldCollection)! !\n\n!TestCaseTest methodsFor: 'testing' stamp: 'sm 5/25/2011 01:14'!\nexpectedFailures\n\t^ {#testAnnouncement }.! !\n\n!TestCaseTest methodsFor: 'testing' stamp: 'JorgeRessia 3/16/2010 20:57'!\ntestIsUnitTest\n\n\tself assert: TestCase isUnitTest! !\n\n!TestConsoleRunner methodsFor: 'initialization' stamp: 'StefanMarr 7/14/2011 17:18'!\ninitialize\n\tsuper initialize.\n\tstream := self class defaultOutputTarget! !\n\n!TestConsoleRunner methodsFor: 'initialization'!\ninitializeOn: aTestSuite\n\tsuite := aTestSuite.\n\tsuitePosition := suiteTime := suiteFailures := suiteErrors := 0! !\n\n!TestConsoleRunner methodsFor: 'running' stamp: 'StefanMarr 7/14/2011 17:26'!\nrun\n\t| execBlock |\n\texecBlock :=  [ [ \n\t\t\tself setUp.\n\t\t\tsuiteTime := [ self runAll ]\n\t\t\t\ttimeToRun ]\n\t\t\t\t\tensure: [ self tearDown.\n\t\t\t\t\t\t\tself overviewReport. ] ].\n\t\n\t(Smalltalk at: #Author ifAbsent: [ \n\t\texecBlock value.\n\t\t^ self ])\n\t\t\tuniqueInstance\n\t\t\t\tifUnknownAuthorUse: 'TestConsoleRunner'\n\t\t\t\tduring: execBlock.! !\n\n!TestConsoleRunner methodsFor: 'running'!\nrunAll\n\tsuite tests do: [ :each | each run: self ]! !\n\n!TestConsoleRunner methodsFor: 'running' stamp: 'StefanMarr 7/14/2011 17:27'!\nrunCase: aTestCase\n\t| error runtime stack |\n\truntime := [\n\t\t[\taTestCase announce: TestCaseStarted withResult: self.\n\t\t \taTestCase runCase.\n\t\t \taTestCase announce: TestCaseEnded  withResult: self.\n\t\t \tself addPass: aTestCase.] \n\t\ton: Halt , Error, TestFailure, self class failure, self class error\n\t\tdo: [ :err |\n\t\t\terror := err.\n\t\t\tstack := self stackTraceString: err of: aTestCase.\n\t\t\terr sunitAnnounce: aTestCase toResult: self ]\n\t] timeToRun.\n\n\tself beginTestCase: aTestCase time: runtime.\n\t\n\t(error isNil or: [ aTestCase expectedFailures includes: aTestCase selector ]) ifFalse: [\n\t\t(error isKindOf: TestFailure)\n\t\t\tifTrue: [ self writeError: error stack: stack ]\n\t\t\tifFalse: [ self writeError: error stack: stack ] ].\n\tself endTestCase! !\n\n!TestConsoleRunner methodsFor: 'running'!\nsetUp\n\tstream nextPutAll: 'TestSuite '; nextPutAll: suite name; nextPutAll: ':'; nextPut: Character lf.\n\tstream nextPutAll: 'Tests: '; print: suite tests size; nextPut: Character lf.\n\t\n\t\"Initialize the test resources.\"\n\tsuite resources do: [ :each |\n\t\teach isAvailable\n\t\t\tifFalse: [ each signalInitializationError ] ]! !\n\n!TestConsoleRunner methodsFor: 'running'!\ntearDown\n\tsuite resources \n\t\tdo: [ :each | each reset ].\n\t\t\n\tstream nextPutAll: 'failures='; print: suiteFailures;\n\ttab;\n\tnextPutAll:'errors='; print: suiteErrors;\n\ttab;\n\tnextPutAll: 'time='; print: suiteTime / 1000.0;\n\tnextPut: Character lf.\n! !\n\n!TestConsoleRunner methodsFor: 'private'!\nbeginTestCase: aTestCase time: time\n\tstream tab; \n\tnextPutAll: (aTestCase class category); nextPut: $.;\n\tnextPutAll: (aTestCase class name); nextPut: $.;\n\tnextPutAll: (aTestCase selector);\n\ttab;\n\tnextPutAll: 'time='; print: time / 1000.0;\n\tnextPut: Character lf! !\n\n!TestConsoleRunner methodsFor: 'private'!\nendTestCase\n\tstream tab;\n\tnextPut: Character lf! !\n\n!TestConsoleRunner methodsFor: 'private'!\nstackTraceString: err of: aTestCase\n\t^ String streamContents: [ :str | \n\t\t| context |\n\t\tcontext := err signalerContext.\n\t\t[ context isNil or: [ context receiver == aTestCase and: [ context methodSelector == #runCase ] ] ] whileFalse: [\n\t\t\tstr print: context; nextPut: Character lf.\n\t\t\tcontext := context sender ] ] ! !\n\n!TestConsoleRunner methodsFor: 'private'!\nwriteError: error stack: stack\n\tsuiteErrors := suiteErrors + 1.\n\tstream tab; tab; \n\tnextPutAll: 'Error type='; nextPutAll: (error class name); \n\ttab;\n\tnextPutAll: ' message='; nextPutAll: (error messageText ifNil: [ error description ]);\n\tnextPut: Character lf;\n\tnextPutAll: stack; \n\tnextPut: Character lf;\n\tnextPut: Character lf! !\n\n!TestConsoleRunner methodsFor: 'private'!\nwriteFailure: error stack: stack\n\tsuiteFailures := suiteFailures + 1.\n\t\n\tstream tab; tab; \n\tnextPutAll: 'Failure type='; nextPutAll: (error class name);\n\ttab;\n\tnextPutAll: 'message='; nextPutAll: (error messageText ifNil: [ error description ]);\n\tnextPut: Character lf;\n\tnextPutAll: stack;\n\tnextPut: Character lf;\n\tnextPut: Character lf! !\n\n!TestConsoleRunner methodsFor: 'reporting' stamp: 'StefanMarr 7/14/2011 17:17'!\noverviewReport\n\t| report results |\n\tresults := self.\n\treport := stream.  \"Old code...\"\n\t\n\t\t[report nextPutAll: SystemVersion current version; cr.\n\n\t\treport nextPutAll: 'Time: '; nextPutAll: DateAndTime now asString; cr; cr.\n\n\t\treport nextPutAll: 'Run: '; nextPutAll: results runCount asString; cr.\n\t\treport nextPutAll: 'Expected passes: '; nextPutAll: results expectedPassCount asString; cr.\n\t\treport nextPutAll: '------------------------------'; cr.\n\t\treport nextPutAll: 'Expected failures: '; nextPutAll: results expectedDefectCount asString; cr.\n\t\tresults expectedDefects do: [:each |\n\t\t\treport tab; nextPutAll: each asString; cr ].\n\t\treport nextPutAll: '------------------------------'; cr.\n\t\treport nextPutAll: 'Unexpected failures: '; nextPutAll: results unexpectedFailureCount asString; cr.\n\t\tresults unexpectedFailures do: [:each |\n\t\t\treport tab; nextPutAll: each asString; cr ].\n\t\treport nextPutAll: '------------------------------'; cr.\n\t\treport nextPutAll: 'Errors: '; nextPutAll: results unexpectedErrors size asString; cr.\n\t\tresults unexpectedErrors do: [:each |\n\t\t\treport tab; nextPutAll: each asString; cr ].\n\t\treport nextPutAll: '------------------------------'; cr.\n\t\treport nextPutAll: 'Unexpected passes: '; nextPutAll: results unexpectedPasses size asString; cr.\n\t\treport flush.\n\t\tresults unexpectedPasses do: [:each |\n\t\t\treport tab; nextPutAll: each asString; cr ].\n\t] on: Error do:  [:e | \n\t\treport cr; nextPutAll: 'INTERNAL ERROR'; cr.\n\t\treport nextPutAll: e asString; cr; cr.\n\t\t\"thisContext stack copy withIndexDo: [:stck :i |\n\t\t\t[report nextPutAll: i asString; space; nextPutAll: stck asString; cr] ifError: []].\"\n\t].\n\treport flush.! !\n\n!TestConsoleRunner class methodsFor: 'running' stamp: 'sm 5/25/2011 16:05'!\nrunAllTests\n\tself runClasses: Smalltalk allClasses named: 'All'.! !\n\n!TestConsoleRunner class methodsFor: 'running'!\nrunCategories: aCollectionOfStrings\n\t^ aCollectionOfStrings do: [ :each | self runCategory: each ]! !\n\n!TestConsoleRunner class methodsFor: 'running'!\nrunCategory: aString\n\t^ self runClasses: (Smalltalk organization classesInCategory: aString) named: aString! !\n\n!TestConsoleRunner class methodsFor: 'running'!\nrunClasses: aCollectionOfClasses named: aString\n\t| suite classes |\n\tsuite := TestSuite named: aString.\n\tclasses := (aCollectionOfClasses\n\t\tselect: [ :each | (each includesBehavior: TestCase) and: [ each isAbstract not ] ])\n\t\t\tasSortedCollection: [ :a :b | a name <= b name ].\n\tclasses isEmpty\n\t\tifTrue: [ ^ self ].\n\tclasses\n\t\tdo: [ :each | each addToSuiteFromSelectors: suite ].\n\t^ self runSuite: suite! !\n\n!TestConsoleRunner class methodsFor: 'running'!\nrunPackage: aString\n\t^ self runClasses: (PackageInfo named: aString) classes named: aString! !\n\n!TestConsoleRunner class methodsFor: 'running'!\nrunPackages: aCollectionOfStrings\n\t^ aCollectionOfStrings do: [ :each | self runPackage: each ]! !\n\n!TestConsoleRunner class methodsFor: 'running'!\nrunSuite: aTestSuite\n\t^ self new \n\t\tinitializeOn: aTestSuite; \n\t\trun! !\n\n!TestConsoleRunner class methodsFor: 'defaults' stamp: 'sm 5/25/2011 14:20'!\ndefaultOutputTarget\n\t^ DefaultOutputTarget ifNil: [Transcript] ifNotNil: [DefaultOutputTarget]! !\n\n!TestConsoleRunner class methodsFor: 'defaults' stamp: 'sm 5/25/2011 14:21'!\ndefaultOutputTarget: someStreamishThing\n\t\"The output target should understand some parts of the standard stream protocol.\n\t For details, see the actual usage. A Transcript is good, and most streams, too.\"\n\tDefaultOutputTarget := someStreamishThing! !\n\n!TestCoverage methodsFor: 'actions' stamp: 'lr 3/30/2009 15:20'!\ninstall\n\treference actualClass methodDictionary\n\t\tat: reference methodSymbol\n\t\tput: self! !\n\n!TestCoverage methodsFor: 'actions' stamp: 'lr 3/30/2009 15:31'!\nuninstall\n\treference actualClass methodDictionary\n\t\tat: reference methodSymbol\n\t\tput: method! !\n\n!TestCoverage methodsFor: 'evaluation' stamp: 'lr 3/30/2009 15:32'!\nrun: aSelector with: anArray in: aReceiver\n\tself mark; uninstall.\n\t^ aReceiver withArgs: anArray executeMethod: method! !\n\n!TestCoverage methodsFor: 'initialization' stamp: 'lr 3/30/2009 15:19'!\ninitializeOn: aMethodReference\n\thasRun := false.\n\treference := aMethodReference.\n\tmethod := reference compiledMethod! !\n\n!TestCoverage methodsFor: 'testing' stamp: 'lr 3/30/2009 15:09'!\nhasRun\n\t^ hasRun! !\n\n!TestCoverage methodsFor: 'private' stamp: 'lr 3/30/2009 20:26'!\ndoesNotUnderstand: aMessage\n\t^ method perform: aMessage selector withArguments: aMessage arguments! !\n\n!TestCoverage methodsFor: 'private' stamp: 'lr 4/3/2011 10:59'!\nflushCache\n\tself reference methodSymbol flushCache! !\n\n!TestCoverage methodsFor: 'private' stamp: 'lr 3/30/2009 15:21'!\nmark\n\thasRun := true! !\n\n!TestCoverage methodsFor: 'private' stamp: 'lr 3/30/2009 15:27'!\nreference\n\t^ reference! !\n\n!TestCoverage commentStamp: 'LaurentLaffont 4/15/2011 20:19' prior: 0!\nI wrap a method in order to detect whether it has been called or not. Then I can be used to calculate test coverage for SUnit.!\n!TestCoverage class methodsFor: 'instance creation' stamp: 'lr 3/30/2009 15:23'!\non: aMethodReference\n\t^ self new initializeOn: aMethodReference! !\n\n!TestFailure methodsFor: 'Camp Smalltalk' stamp: ' 17/7/10 17:28'!\nsunitAnnounce: aTestCase toResult: aTestResult\n\taTestResult addFailure: aTestCase.\n\tself sunitExitWith: false! !\n\n!TestFailure methodsFor: 'camp smalltalk' stamp: 'ajh 1/24/2003 19:23'!\ndefaultAction\n\n\tProcessor activeProcess\n\t\tdebug: self signalerContext\n\t\ttitle: self description! !\n\n!TestFailure methodsFor: 'camp smalltalk' stamp: 'ajh 2/1/2003 00:58'!\nisResumable\n\t\n\t^ false! !\n\n!TestFailure commentStamp: '<historical>' prior: 0!\nThe test framework distinguishes between failures and errors.  A failure is an event whose possibiity is explicitly anticipated and checked for in an assertion, whereas an error is an unanticipated problem like a division by 0 or an index out of bounds.  TestFailure is raised when the boolean parameter of an assert: ... or deny: ... call is the opposite of what the assertion claims.!\n!TestResource methodsFor: 'accessing'!\ndescription\n\n\tdescription isNil\n\t\tifTrue: [^''].\n\n\t^description! !\n\n!TestResource methodsFor: 'accessing'!\ndescription: aString\n\n\tdescription := aString! !\n\n!TestResource methodsFor: 'accessing'!\nname\n\n\tname isNil\n\t\tifTrue: [^self printString].\n\n\t^name! !\n\n!TestResource methodsFor: 'accessing'!\nname: aString\n\n\tname := aString! !\n\n!TestResource methodsFor: 'accessing'!\nresources\n\t^self class resources! !\n\n!TestResource methodsFor: 'initialize-release' stamp: ' 17/7/10 17:28'!\ninitialize\n\t\"This method used to call setUp but now does nothing;  setUp is called by the framework at the appropriate point.  Subclasses may override to set the object to its default state.\"\n\t\n\t! !\n\n!TestResource methodsFor: 'printing'!\nprintOn: aStream\n\n\taStream nextPutAll: self class printString! !\n\n!TestResource methodsFor: 'running'!\nsetUp\n\t\"Does nothing. Subclasses should override this to initialize their resource\"! !\n\n!TestResource methodsFor: 'running'!\ntearDown\n\t\"Does nothing. Subclasses should override this to tear down their resource\"! !\n\n!TestResource methodsFor: 'testing'!\nisAvailable\n\t\"Override to provide information on the readiness of the resource.  Put state-changing behaviour in setUp and keep this a state-preserving check as far as possible.  Where setUp is guaranteed to provide a valid resource if it completes, there is no need to override this.\"\n\t\n\t^true! !\n\n!TestResource methodsFor: 'testing'!\nisUnavailable\n\t\"override to provide information on the\n\treadiness of the resource\"\n\t\n\t^self isAvailable not\n\t\t\t! !\n\n!TestResource commentStamp: '<historical>' prior: 0!\nNormally a test will set up all the objects it needs and tear them down again after it has run.  This self-containedness makes a test more robust.  Use TestResources only for objects that are needed by several tests and that are too 'expensive' (in time or otherwise) to recreate and destroy for each test.  A viable approach is to develop the code in MyTestCase's #setUp and #tearDown methods, then at some point refactor the code into the #setUp and #tearDown of a TestResource whose class is added to MyTestCase class>>resource method.\n\nTestResource uses the singleton pattern.  A TestResource class will set up a single instance of itself when first requested and tear it down again at the end of TestSuite>>run (or TestCase>>run, >>debug and >>debugAsFailure).  Normally, a TestResource, once setUp, remains active during the running of all remaining tests and is #reset after all tests have run.  For an exception, see subclass CompetingResource in SUnitResourcePatterns.  Users can choose to #reset a resource in the #tearDown of a test that alters it, sacrificing the performance gain of having a single #setUp of the resource for the certainty that other tests using it will not see the alterations.  Generally however, this should be the exception:  if you need to reset the resource for every test that uses it, its code should just be part of your test's #setUp and #tearDown code.\n\nTo use, create a subclass of TestResource and override the following:\n\t- TestCase class>>resources, to return a collection including the TestResource class, for all test case classes that need it\n\t\t* a TestCase' resources are set up in the order returned and torn down in the reverse order\n\t- TestResource class>>resources, if the resource itself always needs some other resource to be present before it can set up\n\t\t* a TestResource's resource are set up before it and torn down after it, and are set up in the order returned and torn down in the reverse order\n\t- TestResource>>setUp and tearDown, to define initial and final behaviour (just like a test)\n\t- TestResource>>isAvailable, to return true if it is and false if it isn't (the framework calls this after setUp);  ideally, this call should not change the resource' state - that should be done in setUp\n\nTestResource implements the singleton pattern in its class-side #isAvailable and #reset methods.  Do not override these when creating specific resources;  unless you are developing a whole new pattern of use, it will always be correct to override instance-side #setUp, #tearDown and #isAvailable, and dangerous to override class>>isAvailable, class>>isAlreadyAvailable and class>>reset.\n\nGenerally, users do not code interactions with a test's resources during the running of a test.  Code that reads a resource' values while leaving its state strictly alone is safe enough.  A test must leave a resource in a clean state:  always use #reset if a test must protect later-running tests from unsafe changes (and review whether in such a case a resource is the right thing to use in the first place).\n\nSee my superclass' comment for assertion and logging information.\n!\n!TestResource class methodsFor: 'accessing' stamp: ' 17/7/10 17:28'!\ncurrent\n\t\"This is a lazy accessor:  the assert of self isAvailable does no work unless current isNil.  However this method should normally be sent only to a resource that should already have been made available, e.g. in a test whose test case class has the resource class in its #resources, so should never be able to fail the assert.\n\tIf the intent is indeed to access a possibly-unprepared or reset-in-earlier-test resource lazily, then preface the call of 'MyResource current' with 'MyResource availableFor: self'.\"\n\t\n\tself\n\t\tassert: self isAvailable\n\t\tdescription:\n\t\t\t'Sent #current to unavailable resource ' , self name ,\n\t\t\t\t\t'.  Add it to test case'' class-side #resources (recommended) or send #availableFor: beforehand'.\n\t^current! !\n\n!TestResource class methodsFor: 'accessing'!\ncurrent: aTestResource\n\n\tcurrent := aTestResource\n\t\t\t! !\n\n!TestResource class methodsFor: 'accessing'!\nresources\n\t^#()! !\n\n!TestResource class methodsFor: 'instance creation' stamp: 'nfr 1/3/2010 18:01'!\nnew\n\t\"Use #current to get the valid current instance.  Use of #new to get an instance (that should never be the current one) could be done in bizarre circumstances, so is not blocked, but will usually be inappropriate.\"\n\t\n\t^super new initialize.! !\n\n!TestResource class methodsFor: 'instance creation'!\nreset\n\t[self isAlreadyAvailable ifTrue: [current tearDown]]\n\t\tensure: [current := nil]! !\n\n!TestResource class methodsFor: 'running' stamp: ' 17/7/10 17:28'!\navailableFor: aTestAsserter\n\taTestAsserter\n\t\tassert: self isAvailable\n\t\tdescription:\n\t\t\t'Unavailable resource ' , self name , ' requested by '\n\t\t\t\t, aTestAsserter printString! !\n\n!TestResource class methodsFor: 'running' stamp: 'nfr 1/3/2010 18:01'!\nresetResources: topLevelResources\n\t\"Reset all imperfectly-set-up resources while gathering the rest for ordered resetting.\"\n\n\t| availableResources |\n\tavailableResources := OrderedCollection new: topLevelResources size.\n\ttopLevelResources\n\t\tdo: [:each | each resetOrAddResourcesTo: availableResources].\n\tavailableResources reverseDo: [:each | each reset]! !\n\n!TestResource class methodsFor: 'testing' stamp: 'md 2/22/2006 14:21'!\nisAbstract\n\t\"Override to true if a TestResource subclass is Abstract and should not have\n\tTestCase instances built from it\"\n\n\t^self name = #TestResource\n\t\t\t! !\n\n!TestResource class methodsFor: 'testing'!\nisAlreadyAvailable\n\t^current class == self! !\n\n!TestResource class methodsFor: 'testing'!\nisAvailable\n\t\"This is (and must be) a lazy method.  If my current has a value, an attempt to make me available has already been made:  trust its result.  If not, try to make me available.\"\n\n\tcurrent isNil ifTrue: [self makeAvailable].\n\t^self isAlreadyAvailable! !\n\n!TestResource class methodsFor: 'testing'!\nisUnavailable\n\n\t^self isAvailable not\n\t\t\t! !\n\n!TestResource class methodsFor: 'private'!\nmakeAvailable\n\t\"This method must be the _only_ way to set a notNil value for the unique instance (current).  First, obtain a candidate instance and set current to a notNil placeholder (any notNil object not an instance of me would do;  this version uses false).  Next, check any subordinate resources needed by this resource.  Lastly, setUp the candidate and put it in current if it is available, ensuring that it is torn down otherwise.\"\n\t\n\t| candidate |\n\tcurrent := nil.\n\tcandidate := self new.\n\tself resources do: [:each | each availableFor: candidate].\n\t[candidate setUp.\n\tcandidate isAvailable ifTrue: [current := candidate]]\n\t\tensure: [current == candidate ifFalse: [candidate tearDown]]! !\n\n!TestResource class methodsFor: 'private' stamp: 'nfr 1/3/2010 18:00'!\nresetOrAddResourcesTo: aCollection\n\t\"Add correctly set-up resources to the collection unless already there. Reset any imperfectly-set-up resources, so current isNil will return true if they are re-encountered via an indirectly self-prerequing resource;  circular references cannot be set up so will never reply true to isAlreadyAvailable, but may have correctly-set-up prereqs to add and/or imperfectly-set-up ones to reset, so do not abort the loop first time round.\"\n\n\tcurrent isNil ifTrue: [^self].\n\tself isAlreadyAvailable\n\t\tifFalse:\n\t\t\t[self reset.\n\t\t\tself resources do: [:each | each resetOrAddResourcesTo: aCollection]]\n\t\tifTrue:\n\t\t\t[(aCollection includes: self)\n\t\t\t\tifFalse:\n\t\t\t\t\t[self resources do: [:each | each resetOrAddResourcesTo: aCollection].\n\t\t\t\t\taCollection add: self]]\n\n\"The cloned 'self resources do: ...' line in both blocks is, I think, the best way to write this method so that its logic is clear.  The first loop resets this resource immediately, before traversing its resources;  the second traverses before adding\"! !\n\n!TestResult methodsFor: 'accessing'!\nclassesTested\n\t^ (self tests collect: [ :testCase | testCase class ]) asSet! !\n\n!TestResult methodsFor: 'accessing'!\ndefects\n\t^OrderedCollection new\n\t\taddAll: self errors;\n\t\taddAll: self failures; yourself! !\n\n!TestResult methodsFor: 'accessing'!\nerrorCount\n\n\t^self errors size! !\n\n!TestResult methodsFor: 'accessing' stamp: 'JF 7/30/2003 13:54'!\nexpectedDefectCount\n\t^ self expectedDefects size! !\n\n!TestResult methodsFor: 'accessing' stamp: 'md 11/25/2004 16:36'!\nexpectedDefects\n\t^ (errors, failures asOrderedCollection) select: [:each | each shouldPass not] ! !\n\n!TestResult methodsFor: 'accessing' stamp: 'JF 7/30/2003 13:54'!\nexpectedPassCount\n\t^ self expectedPasses size! !\n\n!TestResult methodsFor: 'accessing' stamp: 'JF 7/30/2003 16:14'!\nexpectedPasses\n\t^ passed select: [:each | each shouldPass] ! !\n\n!TestResult methodsFor: 'accessing'!\nfailureCount\n\n\t^self failures size! !\n\n!TestResult methodsFor: 'accessing'!\npassedCount\n\n\t^self passed size! !\n\n!TestResult methodsFor: 'accessing'!\nrunCount\n\n\t^self passedCount + self failureCount + self errorCount! !\n\n!TestResult methodsFor: 'accessing'!\ntests\n\t^(OrderedCollection new: self runCount)\n\t\taddAll: passed;\n\t\taddAll: failures;\n\t\taddAll: errors;\n\t\tyourself! !\n\n!TestResult methodsFor: 'accessing'!\ntimeStamp\n\t^ timeStamp! !\n\n!TestResult methodsFor: 'accessing'!\ntimeStamp: anObject\n\ttimeStamp := anObject! !\n\n!TestResult methodsFor: 'accessing' stamp: 'JF 7/30/2003 13:54'!\nunexpectedErrorCount\n\t^ self unexpectedErrors size! !\n\n!TestResult methodsFor: 'accessing' stamp: 'JF 7/30/2003 16:14'!\nunexpectedErrors\n\t^ errors select: [:each | each shouldPass] ! !\n\n!TestResult methodsFor: 'accessing' stamp: 'JF 7/30/2003 13:54'!\nunexpectedFailureCount\n\t^ self unexpectedFailures size! !\n\n!TestResult methodsFor: 'accessing' stamp: 'JF 7/30/2003 16:14'!\nunexpectedFailures\n\t^ failures select: [:each | each shouldPass] ! !\n\n!TestResult methodsFor: 'accessing' stamp: 'JF 7/30/2003 13:54'!\nunexpectedPassCount\n\t^ self unexpectedPasses size! !\n\n!TestResult methodsFor: 'accessing' stamp: 'JF 7/30/2003 16:14'!\nunexpectedPasses\n\t^ passed select: [:each | each shouldPass not] ! !\n\n!TestResult methodsFor: 'adding'!\naddError: aTestCase\n\t\"We cannot use self errors as that incorporates test expectations and so does not return the stored collection.\"\n\n\t^errors add: aTestCase! !\n\n!TestResult methodsFor: 'adding'!\naddFailure: aTestCase\n\t\"We cannot use self failures as that incorporates test expectations and so does not return the stored collection.\"\n\n\t^failures add: aTestCase! !\n\n!TestResult methodsFor: 'adding'!\naddPass: aTestCase\n\t\"We cannot use self passed as that incorporates test expectations and so does not return the stored collection.\"\n\n\t^passed add: aTestCase! !\n\n!TestResult methodsFor: 'compatibility' stamp: 'JF 7/30/2003 16:09'!\nerrors\n\t^ self unexpectedErrors! !\n\n!TestResult methodsFor: 'compatibility' stamp: 'md 11/25/2004 16:23'!\nfailures\n\t^ self unexpectedFailures, self unexpectedPasses ! !\n\n!TestResult methodsFor: 'compatibility' stamp: 'JF 7/30/2003 16:08'!\npassed\n\t^ self expectedPasses, self expectedDefects! !\n\n!TestResult methodsFor: 'deprecated' stamp: 'nfr 1/3/2010 17:58'!\ncorrectCount\n\t\"deprecated - use #passedCount\"\n\t\n\t^self passedCount! !\n\n!TestResult methodsFor: 'diff'!\ndiff: aTestResult\n\t\"Return a collection that contains differences\"\n\t| passed1Selectors failed1Selectors errors1Selectors passed2Selectors failed2Selectors errors2Selectors |\n\tpassed1Selectors := self passed collect: [:testCase | testCase selector].\n\tfailed1Selectors := self failures collect: [:testCase | testCase selector].\n\terrors1Selectors := self errors collect: [:testCase | testCase selector].\n\n\tpassed2Selectors := aTestResult passed collect: [:testCase | testCase selector].\n\tfailed2Selectors := aTestResult failures collect: [:testCase | testCase selector].\n\terrors2Selectors := aTestResult errors collect: [:testCase | testCase selector].\n\t\n\t^ {passed1Selectors copyWithoutAll: passed2Selectors .\n\t\tfailed1Selectors copyWithoutAll: failed2Selectors .\n\t\terrors1Selectors copyWithoutAll: errors2Selectors}! !\n\n!TestResult methodsFor: 'filein/out'!\nfileOutOn: aFileStream\n\t\"Write in aFileStream like:\n\t3 run, 2 passes, 0 expected failures, 1 failures, 0 errors, 0 unexpected passes\n\tFailures:\n\tSHParserST80Test>>#testNumbers\n\t\n\tErrors:\"\t\n\t| printer |\n\tprinter := [:title :testCases | \n\t\t\t\taFileStream cr; nextPutAll: title; cr.\n\t\t\t\ttestCases do: [:aTestCase| \n\t\t\t\t\t\t\t\taTestCase printOn: aFileStream.\n\t\t\t\t\t\t\t\taFileStream cr]].\n\t\t\t\t\n\tself printOn: aFileStream.\t\n\tprinter value: 'Failures:' value: self failures.\n\tprinter value: 'Errors:' value: self errors.! !\n\n!TestResult methodsFor: 'history'!\ndispatchResultsIntoHistory \n\n\tself classesTested do: \n\t\t[ :testClass | \n\t\tself class\n\t\t\thistoryAt: testClass\n\t\t\tput: (self selectResultsForTestCase: testClass) ].\n! !\n\n!TestResult methodsFor: 'history'!\nselectResultsForTestCase: aTestCaseClass\n\t| passedSelectors errorsSelectors failuresSelectors |\n\tpassedSelectors := self passed\n\t\t\t\t\t\tselect: [:testCase | testCase class == aTestCaseClass ] thenCollect: [:testCase | testCase selector].\n\terrorsSelectors := self errors \n\t\t\t\t\t\tselect: [:testCase | testCase class == aTestCaseClass ] thenCollect:  [:testCase | testCase selector].\n\tfailuresSelectors := self failures \n\t\t\t\t\t\tselect: [:testCase | testCase class == aTestCaseClass ] thenCollect:  [:testCase | testCase selector].\n\t\n\t^ self class newTestDictionary \n\t\tat: #passed put: passedSelectors asSet;\n\t\tat: #failures put: failuresSelectors asSet;\n\t\tat: #errors put: errorsSelectors asSet;\n\t\tyourself\n\t\t! !\n\n!TestResult methodsFor: 'history'!\nupdateResultsInHistory\n\t\n\t#(#passed #failures #errors) do: [ :status | \n\t\t(self perform: status) do: [ :testCase | \n\t\t\tself class updateTestHistoryFor: testCase status: status ] ]! !\n\n!TestResult methodsFor: 'initialization'!\ninitialize\n\tsuper initialize.\n\tpassed := OrderedCollection new.\n\tfailures := Set new.\n\terrors := OrderedCollection new.\n\ttimeStamp := DateAndTime now! !\n\n!TestResult methodsFor: 'printing'!\nprintOn: aStream\n\taStream\n\t\tnextPutAll: self runCount printString;\n\t\tnextPutAll: ' run, ';\n\t\tnextPutAll: self expectedPassCount printString;\n\t\tnextPutAll: ' passes, ';\n\t\tnextPutAll: self expectedDefectCount printString;\n\t\tnextPutAll:' expected failures, ';\n\t\tnextPutAll: self unexpectedFailureCount printString;\n\t\tnextPutAll: ' failures, ';\n\t\tnextPutAll: self unexpectedErrorCount printString;\n\t\tnextPutAll:' errors, ';\n\t\tnextPutAll: self unexpectedPassCount printString;\n\t\tnextPutAll:' unexpected passes'.! !\n\n!TestResult methodsFor: 'querying'!\nisErrorFor: class selector: selector\n\t^ self errors anySatisfy: [:testCase | testCase class == class and: [testCase selector == selector]]! !\n\n!TestResult methodsFor: 'querying'!\nisFailureFor: class selector: selector\n\t^ self failures anySatisfy: [:testCase | testCase class == class and: [testCase selector == selector]]! !\n\n!TestResult methodsFor: 'querying'!\nisPassedFor: class selector: selector\n\t^ self passed anySatisfy: [:testCase | testCase class == class and: [testCase selector == selector]]! !\n\n!TestResult methodsFor: 'running'!\nrunCase: aTestCase\n\t[\n\taTestCase announce: TestCaseStarted withResult: self.\n\taTestCase runCase.\n\taTestCase announce: TestCaseEnded  withResult: self.\n\tself addPass: aTestCase]\n\t\ton: self class failure , self class error\n\t\tdo: [:ex | ex sunitAnnounce: aTestCase toResult: self]! !\n\n!TestResult methodsFor: 'testing'!\nhasErrors\n\n\t^self errors size > 0! !\n\n!TestResult methodsFor: 'testing'!\nhasFailures\n\n\t^self failures size > 0! !\n\n!TestResult methodsFor: 'testing'!\nhasPassed\n\n\t^self hasErrors not and: [self hasFailures not]! !\n\n!TestResult methodsFor: 'testing'!\nisError: aTestCase\n\n\t^self errors includes: aTestCase! !\n\n!TestResult methodsFor: 'testing'!\nisFailure: aTestCase\n\t^self failures includes: aTestCase! !\n\n!TestResult methodsFor: 'testing'!\nisPassed: aTestCase\n\n\t^self passed includes: aTestCase! !\n\n!TestResult commentStamp: '<historical>' prior: 0!\nThis implements the Collecting Parameter pattern for running a bunch of tests.  It holds tests that have run, sorted into the result categories of passed, failures and errors.\n\nTestResult is an interesting object to subclass or substitute. #runCase: is the external protocol you need to reproduce. TestResult subclasses can  handle multi-threaded tests (see SUnitXProcPatterns) and might record coverage information or send emails when the run completes.\n!\n!TestResult class methodsFor: 'exceptions'!\nerror\n\t^self exError! !\n\n!TestResult class methodsFor: 'exceptions' stamp: 'md 2/22/2006 14:17'!\nexError\n\t^Error\n\t\t\t! !\n\n!TestResult class methodsFor: 'exceptions'!\nfailure\n\t^TestFailure! !\n\n!TestResult class methodsFor: 'exceptions'!\nresumableFailure\n\t^ResumableTestFailure! !\n\n!TestResult class methodsFor: 'exceptions' stamp: 'md 2/22/2006 14:26'!\nsignalErrorWith: aString \n\tself error signal: aString\n\t\t\t! !\n\n!TestResult class methodsFor: 'exceptions' stamp: 'md 2/22/2006 14:26'!\nsignalFailureWith: aString \n\tself failure signal: aString\n\t\t\t! !\n\n!TestResult class methodsFor: 'history'!\nhistoryAt: aTestCaseClass\n\"I will return the last test dictionary for aTestCaseClass. If none found, I will create a new empty one and link it in the history.\"\n\n\t^ aTestCaseClass history ! !\n\n!TestResult class methodsFor: 'history'!\nhistoryAt: aTestCaseClass put: aDictionary\n\taTestCaseClass history: aDictionary\n\t\"^ self history at: aTestCaseClass put: aDictionary \"! !\n\n!TestResult class methodsFor: 'history'!\nhistoryFor: aTestCaseClass\n\t\"I return the last test dictionary for aTestCaseClass. \n\tIf none found, I return an empty dictionary but will not link it to the class in the history.\"\n\t\n\t| history |\n\thistory := aTestCaseClass history.\n\thistory ifNil: [ ^ self newTestDictionary ].\n\t^ history\n\t\n\"\t^ self history at: aTestCaseClass ifAbsent: [ self newTestDictionary ]\"! !\n\n!TestResult class methodsFor: 'history'!\nnewTestDictionary\n\n\t^ Dictionary new at: #timeStamp put: DateAndTime now;\n\t\tat: #passed put: Set new;\n\t\tat: #failures put: Set new;\n\t\tat: #errors put: Set new;\n\t\tyourself\n\t\t! !\n\n!TestResult class methodsFor: 'history'!\nremoveFromTestHistory: aSelector in: aTestCaseClass\n\t| lastRun |\n\t\n\tlastRun := self historyFor: aTestCaseClass.\n\t#(#passed #failures #errors) do:\n\t\t[ :set | (lastRun at: set) remove: aSelector ifAbsent: []].\n! !\n\n!TestResult class methodsFor: 'history'!\nupdateTestHistoryFor: aTestCase status: aSymbol\n\t| cls sel |\n\t\n\tcls := aTestCase class.\n\tsel := aTestCase selector.\n\tself removeFromTestHistory: sel in: cls.\n\t((self historyAt: cls) at: aSymbol ) add: sel! !\n\n!TestRunner methodsFor: 'accessing' stamp: 'lr 10/31/2005 15:31'!\nbaseClass\n\t^ TestCase! !\n\n!TestRunner methodsFor: 'accessing' stamp: 'lr 11/3/2005 09:37'!\nsuiteAll\n\t^ TestSuite new in: [ :suite |\n\t\tclassesSelected do: [ :each | \n\t\t\teach isAbstract \n\t\t\t\tifFalse: [ each addToSuiteFromSelectors: suite ] ].\n\t\tsuite name: (self label: 'Test' forSuite: suite) ].! !\n\n!TestRunner methodsFor: 'accessing' stamp: 'lr 10/27/2005 10:29'!\nsuiteErrors\n\t^ TestSuite new in: [ :suite |\n\t\tsuite \n\t\t\taddTests: errorList; \n\t\t\tname: (self label: 'Error' forSuite: suite) ].! !\n\n!TestRunner methodsFor: 'accessing' stamp: 'lr 10/27/2005 10:42'!\nsuiteFailures\n\t^ TestSuite new in: [ :suite |\n\t\tsuite \n\t\t\taddTests: failedList; \n\t\t\tname: (self label: 'Failure' forSuite: suite) ].! !\n\n!TestRunner methodsFor: 'accessing-categories' stamp: 'lr 10/31/2005 15:09'!\ncategoryAt: anIndex\n\t^ categoriesSelected includes: (categories at: anIndex ifAbsent: [ ^ false ]).! !\n\n!TestRunner methodsFor: 'accessing-categories' stamp: 'lr 10/31/2005 15:51'!\ncategoryAt: anInteger put: aBoolean\n\tcategoriesSelected := categoriesSelected\n\t\tperform: (aBoolean ifTrue: [ #copyWith: ] ifFalse: [ #copyWithout: ])\n\t\twith: (categories at: anInteger ifAbsent: [ ^ self ]).\n\tself changed: #categorySelected; updateClasses.! !\n\n!TestRunner methodsFor: 'accessing-categories' stamp: 'lr 10/31/2005 15:10'!\ncategoryList\n\t^ categories! !\n\n!TestRunner methodsFor: 'accessing-categories' stamp: 'lr 11/1/2005 19:25'!\ncategoryMenu: aMenu\n\t^ aMenu\n\t\ttitle: 'Categories';\n\t\tadd: 'Select all' action: #selectAllCategories;\n\t\tadd: 'Select inversion' action: #selectInverseCategories;\n\t\tadd: 'Select none' action: #selectNoCategories;\n\t\taddLine;\n\t\tadd: 'Filter...' action: #filterCategories;\n\t\taddLine;\n\t\tadd: 'Refresh' action: #updateCategories;\n\t\tyourself.! !\n\n!TestRunner methodsFor: 'accessing-categories' stamp: 'lr 10/31/2005 15:11'!\ncategorySelected\n\t^ 0! !\n\n!TestRunner methodsFor: 'accessing-categories' stamp: 'lr 10/31/2005 15:12'!\ncategorySelected: anInteger\n\tself changed: #categorySelected.! !\n\n!TestRunner methodsFor: 'accessing-categories' stamp: 'lr 7/4/2009 15:08'!\nfilterCategories\n\t| pattern |\n\tpattern := UIManager default \n\t\trequest: 'Pattern to select categories:' \n\t\tinitialAnswer: '*'.\n\tpattern isNil ifTrue: [ ^ self ].\n\tcategoriesSelected := (categories \n\t\tselect: [ :each | pattern match: each ]) asSet.\n\tself changed: #allSelections; changed: #categorySelected; updateClasses! !\n\n!TestRunner methodsFor: 'accessing-categories' stamp: 'lr 7/4/2009 15:08'!\nselectAllCategories\n\tcategoriesSelected := categories asSet.\n\tself changed: #allSelections; changed: #categorySelected; updateClasses! !\n\n!TestRunner methodsFor: 'accessing-categories' stamp: 'lr 7/4/2009 15:08'!\nselectInverseCategories\n\tcategoriesSelected := categories asSet \n\t\tremoveAll: categoriesSelected;\n\t\tyourself.\n\tself changed: #allSelections; changed: #categorySelected; updateClasses! !\n\n!TestRunner methodsFor: 'accessing-categories' stamp: 'lr 7/4/2009 15:08'!\nselectNoCategories\n\tcategoriesSelected := Set new.\n\tself changed: #allSelections; changed: #categorySelected; updateClasses! !\n\n!TestRunner methodsFor: 'accessing-classes' stamp: 'lr 1/20/2009 14:49'!\nbrowseClass\n\t(classes at: classIndex ifAbsent: [ ^ self ]) browse! !\n\n!TestRunner methodsFor: 'accessing-classes' stamp: 'lr 10/8/2005 19:58'!\nclassAt: anInteger\n\t^ classesSelected includes: (classes at: anInteger ifAbsent: [ ^ false ]).! !\n\n!TestRunner methodsFor: 'accessing-classes' stamp: 'lr 11/21/2005 13:19'!\nclassAt: anInteger put: aBoolean\n\tclassesSelected := classesSelected\n\t\tperform: (aBoolean ifTrue: [ #copyWith: ] ifFalse: [ #copyWithout: ])\n\t\twith: (classes at: anInteger ifAbsent: [ ^ self ]).\n\tself changed: #classSelected; changed: #hasRunnable.! !\n\n!TestRunner methodsFor: 'accessing-classes' stamp: 'nice 1/5/2010 15:59'!\nclassList\n\t| offset |\n\tclasses isEmpty ifTrue: [ ^ classes ].\n\toffset := classes first allSuperclasses size.\n\t^ classes collect: [ :each | | ident |\n\t\tident := String \n\t\t\tnew: 2 * (0 max: each allSuperclasses size - offset) \n\t\t\twithAll: $ .\n\t\teach isAbstract\n\t\t\tifFalse: [ ident , each name ]\n\t\t\tifTrue: [ \n\t\t\t\tident asText , each name asText \n\t\t\t\t\taddAttribute: TextEmphasis italic;\n\t\t\t\t\tyourself ] ].! !\n\n!TestRunner methodsFor: 'accessing-classes'!\nclassMenu: aMenu\n\t^ aMenu\n\t\ttitle: 'Classes';\n\t\tadd: 'Browse' action: #browseClass;\n\t\taddLine;\n\t\tadd: 'Select all' action: #selectAllClasses;\n\t\tadd: 'Select unit tests' action: #selectAllUnitTests;\n\t\tadd: 'Select subclasses' action: #selectSubclasses;\n\t\tadd: 'Select inversion' action: #selectInverseClasses;\n\t\tadd: 'Select none' action: #selectNoClasses;\n\t\taddLine;\n\t\tadd: 'Filter...' action: #filterClasses;\n\t\taddLine;\n\t\tadd: 'Refresh' action: #updateClasses;\n\t\tyourself.! !\n\n!TestRunner methodsFor: 'accessing-classes' stamp: 'lr 1/20/2009 14:46'!\nclassSelected\n\t^ classIndex! !\n\n!TestRunner methodsFor: 'accessing-classes' stamp: 'lr 1/20/2009 14:48'!\nclassSelected: anInteger\n\tclassIndex := anInteger.\n\tself changed: #classSelected! !\n\n!TestRunner methodsFor: 'accessing-classes' stamp: 'lr 7/4/2009 15:10'!\nfilterClasses\n\t| pattern |\n\tpattern := UIManager default \n\t\trequest: 'Pattern to select tests:' \n\t\tinitialAnswer: '*'.\n\tpattern isNil ifTrue: [ ^ self ].\n\tclassesSelected := (classes select: [ :each | \n\t\tpattern match: each name ]) asSet.\n\tself\n\t\tchanged: #allSelections;\n\t\tchanged: #classSelected;\n\t\tchanged: #hasRunnable! !\n\n!TestRunner methodsFor: 'accessing-classes' stamp: 'gvc 7/24/2007 12:01'!\nselectAllClasses\n\t\"Fixed to update all selections now that the\n\tselection invalidation has been optimised.\"\n\t\n\tclassesSelected := classes asSet.\n\tself\n\t\tchanged: #allSelections;\n\t\tchanged: #classSelected;\n\t\tchanged: #hasRunnable! !\n\n!TestRunner methodsFor: 'accessing-classes'!\nselectAllUnitTests\n\tclassesSelected := classes asSet select: [ :eachClass | eachClass isUnitTest ].\n\tself\n\t\tchanged: #allSelections;\n\t\tchanged: #classSelected;\n\t\tchanged: #hasRunnable! !\n\n!TestRunner methodsFor: 'accessing-classes' stamp: 'gvc 7/24/2007 12:01'!\nselectInverseClasses\n\t\"Fixed to update all selections now that the\n\tselection invalidation has been optimised.\"\n\t\n\tclassesSelected := classes asSet \n\t\tremoveAll: classesSelected;\n\t\tyourself.\n\tself\n\t\tchanged: #allSelections;\n\t\tchanged: #classSelected;\n\t\tchanged: #hasRunnable! !\n\n!TestRunner methodsFor: 'accessing-classes' stamp: 'gvc 7/24/2007 11:59'!\nselectNoClasses\n\t\"Fixed to update all selections now that the\n\tselection invalidation has been optimised.\"\n\t\n\tclassesSelected := Set new.\n\tself\n\t\tchanged: #allSelections;\n\t\tchanged: #classSelected;\n\t\tchanged: #hasRunnable! !\n\n!TestRunner methodsFor: 'accessing-classes' stamp: 'gvc 7/24/2007 12:01'!\nselectSubclasses\n\t\"Fixed to update all selections now that the\n\tselection invalidation has been optimised.\"\n\t\n\t| classesForPackages |\n\tclassesForPackages := self findClassesForCategories: categoriesSelected.\t\n\tclassesSelected := (classesSelected gather: [ :class |\n\t\tclass withAllSubclasses select: [ :each |\n\t\t\tclassesForPackages includes: each ] ])\n\t\tasSet.\n\tself\n\t\tchanged: #allSelections;\n\t\tchanged: #classSelected;\n\t\tchanged: #hasRunnable! !\n\n!TestRunner methodsFor: 'accessing-menu'!\nerrorMenu: aMenu\n\t\"Add the browse item only if an item is selected\"\n\n\tself statusMenu: aMenu.\n\terrorSelected ifNotNil: [aMenu add: 'Browse test' action: #browseSelectedErrorTest].\n\t^aMenu! !\n\n!TestRunner methodsFor: 'accessing-menu'!\nfailureMenu: aMenu\n\t\"Add the browse item only if an item is selected\"\n\t\n\tfailedSelected ifNotNil: [aMenu add: 'Browse test' action: #browseSelectedFailedTest].\n\t^ aMenu! !\n\n!TestRunner methodsFor: 'accessing-menu'!\nstatusMenu: aMenu\n\t^ aMenu\n\t\tadd: 'History' action: #showHistoryMenu;\n\t\tadd: 'Store result as progress reference' action: #storeResultIntoTestCases;\n\t\tadd: 'Show progress' action: #showProgress; \n\t\tyourself! !\n\n!TestRunner methodsFor: 'accessing-testing' stamp: 'lr 10/8/2005 22:37'!\nerrorList\n\t^ errorList collect: [ :each | each printString ].! !\n\n!TestRunner methodsFor: 'accessing-testing' stamp: 'lr 10/6/2005 19:46'!\nerrorSelected\n\t^ errorList indexOf: errorSelected.! !\n\n!TestRunner methodsFor: 'accessing-testing' stamp: 'lr 10/27/2005 10:37'!\nerrorSelected: anInteger\n\terrorSelected := errorList at: anInteger ifAbsent: nil.\n\tself changed: #errorSelected.\n\terrorSelected ifNotNil: [ self debug: errorSelected ].! !\n\n!TestRunner methodsFor: 'accessing-testing' stamp: 'lr 10/8/2005 22:37'!\nfailedList\n\t^ failedList collect: [ :each | each printString ].! !\n\n!TestRunner methodsFor: 'accessing-testing' stamp: 'lr 10/6/2005 19:47'!\nfailedSelected\n\t^ failedList indexOf: failedSelected.! !\n\n!TestRunner methodsFor: 'accessing-testing' stamp: 'lr 10/6/2005 20:14'!\nfailedSelected: anInteger\n\tfailedSelected := failedList at: anInteger ifAbsent: nil.\n\tself changed: #failedSelected.\n\tfailedSelected ifNotNil: [ self debug: failedSelected ].! !\n\n!TestRunner methodsFor: 'accessing-testing' stamp: 'lr 10/6/2005 15:47'!\nresult\n\t^ result! !\n\n!TestRunner methodsFor: 'accessing-testing' stamp: 'lr 10/8/2005 22:47'!\nresult: aResult\n\tresult := aResult! !\n\n!TestRunner methodsFor: 'accessing-testing' stamp: 'lr 3/16/2010 19:37'!\nstatusColor\n\tresult hasErrors \n\t\tifTrue: [ ^ Color red ].\n\tresult hasFailures \n\t\tifTrue: [ ^ Color yellow ].\n\t^ Color green! !\n\n!TestRunner methodsFor: 'accessing-testing' stamp: 'lr 10/8/2005 22:45'!\nstatusText\n\t^ result printString.! !\n\n!TestRunner methodsFor: 'accessing-ui' stamp: 'tbn 7/29/2010 21:17'!\nbuttons\n\t^ #(( 'Run Selected' #runAll 'Run all selected tests' #hasRunnable )\n\t\t( 'Run Profiled' #runProfiled 'Run tests and profile' #hasRunnable )\n\t\t( 'Run Coverage' #runCoverage 'Run test and check code coverage' #hasRunnable )\n\t\t( 'Run Failures' #runFailures 'Run all failures' #hasFailures )\n\t\t( 'Run Errors' #runErrors 'Run all errors' #hasErrors )\n\t\t( 'File out results' #fileOutResults 'File out test results' #hasFailuresOrErrors))! !\n\n!TestRunner methodsFor: 'accessing-ui' stamp: 'lr 10/8/2005 18:39'!\nextent\n\t^ 640 @ 480! !\n\n!TestRunner methodsFor: 'accessing-ui' stamp: 'lr 1/20/2006 13:36'!\nlabel\n\t^ 'Test Runner' ! !\n\n!TestRunner methodsFor: 'actions' stamp: 'nice 10/20/2009 21:08'!\naddDeclaredPackagesUnderTestTo: packages \n\tclassesSelected do: \n\t\t[ :class | \n\t\t(class class includesSelector: #packageNamesUnderTest) ifTrue: \n\t\t\t[ class packageNamesUnderTest do: [ :name | packages add: (PackageInfo named: name) ] ] ]! !\n\n!TestRunner methodsFor: 'actions'!\naddMethodsUnderTestIn: packages to: methods \n\tpackages\n\t\tdo: [:package | package isNil\n\t\t\t\tifFalse: [package methods\n\t\t\t\t\t\tdo: [:method | ((#(#packageNamesUnderTest #classNamesNotUnderTest ) includes: method methodSymbol)\n\t\t\t\t\t\t\t\t\tor: [method compiledMethod isAbstract\n\t\t\t\t\t\t\t\t\t\t\tor: [method compiledMethod refersToLiteral: #ignoreForCoverage]])\n\t\t\t\t\t\t\t\tifFalse: [methods add: method]]]]! !\n\n!TestRunner methodsFor: 'actions'!\ncollectCoverageFor: methods\n\t| wrappers suite |\n\twrappers := methods collect: [ :each | TestCoverage on: each ].\n\tsuite := self\n\t\treset;\n\t\tsuiteAll.\n\t\n\t[ wrappers do: [ :each | each install ].\n\t[ self runSuite: suite ] ensure: [ wrappers do: [ :each | each uninstall ] ] ] valueUnpreemptively.\n\twrappers := wrappers reject: [ :each | each hasRun ].\n\twrappers isEmpty \n\t\tifTrue: \n\t\t\t[ UIManager default inform: 'Congratulations. Your tests cover all code under analysis.' ]\n\t\tifFalse: \n\t\t\t[ MessageSet \n\t\t\t\topenMessageList: (wrappers collect: [ :each | each reference ])\n\t\t\t\tname: 'Not Covered Code (' , (100 - (100 * wrappers size // methods size)) printString , '% Code Coverage)' ].\n\tself saveResultInHistory! !\n\n!TestRunner methodsFor: 'actions' stamp: 'lr 10/31/2005 17:42'!\ndebug: aTestCase\n\tself debugSuite: (TestSuite new\n\t\taddTest: aTestCase; \n\t\tyourself).! !\n\n!TestRunner methodsFor: 'actions' stamp: 'lr 10/31/2005 17:01'!\ndebugSuite: aTestSuite\n\tself basicRunSuite: aTestSuite do: [ :each | each debug ].! !\n\n!TestRunner methodsFor: 'actions' stamp: 'lr 3/14/2010 21:13'!\nexcludeClassesNotUnderTestFrom: methods\n\tclassesSelected\n\t\tdo: [ :class | \n\t\t\t(class class includesSelector: #classNamesNotUnderTest)\n\t\t\t\tifTrue: [ \n\t\t\t\t\tclass classNamesNotUnderTest\n\t\t\t\t\t\tdo: [ :className | \n\t\t\t\t\t\t\t| theClass |\n\t\t\t\t\t\t\ttheClass := Smalltalk globals classNamed: className.\n\t\t\t\t\t\t\ttheClass\n\t\t\t\t\t\t\t\tifNotNil: [ \n\t\t\t\t\t\t\t\t\ttheClass methods do: [ :each | methods remove: each methodReference ifAbsent: [  ] ].\n\t\t\t\t\t\t\t\t\ttheClass class methods do: [ :each | methods remove: each methodReference ifAbsent: [  ] ] ] ] ] ]! !\n\n!TestRunner methodsFor: 'actions'!\nfileOutResults\n\t| fileName defaultFilename stream printer |\n\t\"Save current test results into text file.\"\n\t\"Generate a filename like 'tests_Pharo-1.1-11367-Beta_23_May_2010_9:19:20_am.txt' \"\n\tdefaultFilename := \t'tests_',\n\t\t\t\t\t\tSystemVersion current version, \n\t\t\t\t\t\t'_', \n\t\t\t\t\t\t(result timeStamp asString copyReplaceAll: ' ' with: '_'),\n\t\t\t\t\t\t'.txt'.\n\tfileName := UIManager default \n\t\trequest: 'Enter the file name' \n\t\tinitialAnswer: defaultFilename.\n\t\n\tstream := CrLfFileStream newFileNamed: fileName.\t\n\t[result fileOutOn: stream] \n\t\tensure: [stream close].! !\n\n!TestRunner methodsFor: 'actions'!\npromptForPackages\n\t| packages |\n\tpackages := (PackageOrganizer default packages\n\t\t\t\treject: [:package | (package packageName beginsWith: 'Kernel')\n\t\t\t\t\t\tor: [(package packageName beginsWith: 'Collections')\n\t\t\t\t\t\t\t\tor: [(package packageName beginsWith: 'Exceptions')\n\t\t\t\t\t\t\t\t\t\tor: [(package packageName beginsWith: 'SUnit')\n\t\t\t\t\t\t\t\t\t\t\t\tor: [(package packageName beginsWith: 'System')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tor: [package packageName includesSubstring: 'Test' caseSensitive: false]]]]]])\n\t\t\t\tsort: [:a :b | a packageName < b packageName].\n\tpackages := Array\n\t\t\t\twith: (UIManager default\n\t\t\t\t\t\tchooseFrom: (packages\n\t\t\t\t\t\t\t\tcollect: [:package | package packageName])\n\t\t\t\t\t\tvalues: packages\n\t\t\t\t\t\ttitle: 'Select Package').\n\t^ packages! !\n\n!TestRunner methodsFor: 'actions' stamp: 'lr 10/8/2005 22:52'!\nreset\n\tself result: TestResult new; updateResults.! !\n\n!TestRunner methodsFor: 'actions'!\nrunAll\n\tself reset; runSuite: self suiteAll.\n\tself saveResultInHistory! !\n\n!TestRunner methodsFor: 'actions'!\nrunCoverage\n\t| packages methods |\n\tpackages := Set new.\n\tself addDeclaredPackagesUnderTestTo: packages.\n\tpackages isEmpty ifTrue: \n\t\t[ packages := self promptForPackages ].\n\tmethods := OrderedCollection new.\n\tself \n\t\taddMethodsUnderTestIn: packages\n\t\tto: methods.\n\tself excludeClassesNotUnderTestFrom: methods.\n\tmethods isEmpty ifTrue: \n\t\t[ ^ UIManager default inform: 'No methods found for coverage analysis.' ].\n\tself collectCoverageFor: methods\n! !\n\n!TestRunner methodsFor: 'actions' stamp: 'lr 10/8/2005 23:02'!\nrunErrors\n\tself result instVarNamed: 'errors' put: OrderedCollection new.\n\tself runSuite: self suiteErrors.! !\n\n!TestRunner methodsFor: 'actions' stamp: 'lr 10/27/2005 10:42'!\nrunFailures\n\tself result instVarNamed: 'failures' put: Set new.\n\tself runSuite: self suiteFailures.! !\n\n!TestRunner methodsFor: 'actions' stamp: 'lr 10/31/2005 17:13'!\nrunProfiled\n\tMessageTally spyOn: [ self runAll ].! !\n\n!TestRunner methodsFor: 'actions' stamp: 'lr 3/30/2009 14:50'!\nrunSuite: aTestSuite\n\tself basicRunSuite: aTestSuite do: [ :each | self runTest: each ].\n\tself updateResults\n\n! !\n\n!TestRunner methodsFor: 'actions' stamp: 'lr 11/3/2005 09:15'!\nrunTest: aTestCase\n\taTestCase run: result.\n\tself updateStatus: true.! !\n\n!TestRunner methodsFor: 'browsing'!\nbrowseSelectedErrorTest\n\n\terrorSelected ifNil: [^self].\n\tself browseSelectedTest: errorSelected! !\n\n!TestRunner methodsFor: 'browsing'!\nbrowseSelectedFailedTest\n\n\tfailedSelected ifNil: [^self].\n\tself browseSelectedTest: failedSelected! !\n\n!TestRunner methodsFor: 'browsing'!\nbrowseSelectedTest: aTest\n\n\tBrowser fullOnClass: aTest class selector: aTest selector! !\n\n!TestRunner methodsFor: 'building' stamp: 'tbn 7/29/2010 21:16'!\nbuildButtonsWith: aBuilder\n\t^ aBuilder pluggablePanelSpec new\n\t\tmodel: self;\n\t\tlayout: #horizontal;\n\t\tchildren: (self buttons collect: [ :each |\n\t\t\taBuilder pluggableButtonSpec new\n\t\t\t\tmodel: self; \n\t\t\t\tlabel: each first;\n\t\t\t\taction: each second;\n\t\t\t\thelp: each third;\n\t\t\t\tenabled: (each at: 4);\n\t\t\t\tyourself ]);\n\t\tyourself.! !\n\n!TestRunner methodsFor: 'building' stamp: 'lr 10/31/2005 15:12'!\nbuildCategoriesWith: aBuilder\n\t^ aBuilder pluggableMultiSelectionListSpec new\n\t\tmodel: self;\n\t\tlist: #categoryList;\n\t\tmenu: #categoryMenu:;\n\t\tgetIndex: #categorySelected;\n\t\tsetIndex: #categorySelected:;\n\t\tgetSelectionList: #categoryAt:;\n\t\tsetSelectionList: #categoryAt:put:;\n\t\tyourself.! !\n\n!TestRunner methodsFor: 'building' stamp: 'lr 10/17/2005 09:13'!\nbuildClassesWith: aBuilder\n\t^ aBuilder pluggableMultiSelectionListSpec new\n\t\tmodel: self;\n\t\tlist: #classList;\n\t\tmenu: #classMenu:;\n\t\tgetIndex: #classSelected;\n\t\tsetIndex: #classSelected:;\n\t\tgetSelectionList: #classAt:;\n\t\tsetSelectionList: #classAt:put:;\n\t\tyourself.! !\n\n!TestRunner methodsFor: 'building' stamp: 'lr 10/21/2008 18:04'!\nbuildErrorListWith: aBuilder\n\t^ aBuilder pluggableListSpec new\n\t\tmodel: self;\n\t\tname: 'Error List';\n\t\tlist: #errorList; \n\t\tmenu: #errorMenu:;\n\t\tgetIndex: #errorSelected; \n\t\tsetIndex: #errorSelected:;\n\t\tyourself.! !\n\n!TestRunner methodsFor: 'building' stamp: 'lr 10/21/2008 18:04'!\nbuildFailureListWith: aBuilder\n\t^ aBuilder pluggableListSpec new\n\t\tmodel: self;\n\t\tname: 'Failure List';\n\t\tlist: #failedList; \n\t\tmenu: #failureMenu:;\n\t\tgetIndex: #failedSelected; \n\t\tsetIndex: #failedSelected:;\n\t\tyourself.! !\n\n!TestRunner methodsFor: 'building' stamp: 'lr 10/21/2008 18:05'!\nbuildStatusWith: aBuilder\n\t^ aBuilder pluggableInputFieldSpec new\n\t\tmodel: self;\n\t\tmenu: #statusMenu:;\n\t\tcolor: #statusColor;\n\t\tgetText: #statusText;\n\t\tyourself.! !\n\n!TestRunner methodsFor: 'building' stamp: 'bp 11/22/2010 20:45'!\nbuildWith: aBuilder\n\t| window |\n\twindow := aBuilder pluggableWindowSpec new\n\t\tmodel: self; label: self label; extent: self extent;\n\t\tchildren: (OrderedCollection new \n\t\t\tadd: ((self buildCategoriesWith: aBuilder)\n\t\t\t\tframe: self categoriesFrame;\n\t\t\t\tyourself);\n\t\t\tadd: ((self buildClassesWith: aBuilder)\n\t\t\t\tframe: self classesFrame;\n\t\t\t\tyourself);\n\t\t\tadd: ((self buildStatusWith: aBuilder)\n\t\t\t\tframe: self statusFrame;\n\t\t\t\tyourself);\n\t\t\tadd: ((self buildFailureListWith: aBuilder)\n\t\t\t\tframe: self failureListFrame;\n\t\t\t\tyourself);\n\t\t\tadd: ((self buildErrorListWith: aBuilder)\n\t\t\t\tframe: self errorListFrame;\n\t\t\t\tyourself);\n\t\t\tadd: ((self buildButtonsWith: aBuilder)\n\t\t\t\tframe: self buttonsFrame;\n\t\t\t\tyourself);\n\t\t\tyourself);\n\t\tyourself.\n\t^ aBuilder build: window.! !\n\n!TestRunner methodsFor: 'building'!\nbuttonHeight\n\t^ self theme buttonMinHeight + 25! !\n\n!TestRunner methodsFor: 'building' stamp: 'bp 11/22/2010 20:45'!\nbuttonsFrame\n\t^LayoutFrame new\n\t\tleftFraction: 0 offset: 0;\n\t\ttopFraction: 1 offset: self buttonHeight negated;\n\t\trightFraction: 1 offset: 0;\n\t\tbottomFraction: 1 offset: 0! !\n\n!TestRunner methodsFor: 'building' stamp: 'bp 11/22/2010 20:48'!\ncategoriesFrame\n\t^LayoutFrame new\n\t\tleftFraction: 0 offset: 0;\n\t\ttopFraction: 0 offset: 0;\n\t\trightFraction: 0.25 offset: 0;\n\t\tbottomFraction: 1 offset: self buttonHeight negated + 4! !\n\n!TestRunner methodsFor: 'building' stamp: 'bp 11/22/2010 20:48'!\nclassesFrame\n\t^LayoutFrame new\n\t\tleftFraction: 0.25 offset: 0;\n\t\ttopFraction: 0 offset: 0;\n\t\trightFraction: 0.5 offset: 0;\n\t\tbottomFraction: 1 offset: self buttonHeight negated + 4! !\n\n!TestRunner methodsFor: 'building' stamp: 'bp 11/22/2010 20:49'!\nerrorListFrame\n\t^LayoutFrame new\n\t\tleftFraction: 0.5 offset: 0;\n\t\ttopFraction: 0.5 offset: 0;\n\t\trightFraction: 1 offset: 0;\n\t\tbottomFraction: 1 offset: self buttonHeight negated + 4! !\n\n!TestRunner methodsFor: 'building' stamp: 'bp 11/22/2010 20:43'!\nfailureListFrame\n\t^LayoutFrame new\n\t\tleftFraction: 0.5 offset: 0;\n\t\ttopFraction: 0 offset: self statusHeight;\n\t\trightFraction: 1 offset: 0;\n\t\tbottomFraction: 0.5 offset: 0! !\n\n!TestRunner methodsFor: 'building' stamp: 'bp 11/22/2010 20:41'!\nstatusFrame\n\t^LayoutFrame new\n\t\tleftFraction: 0.5 offset: 0;\n\t\ttopFraction: 0 offset: 0;\n\t\trightFraction: 1 offset: 0;\n\t\tbottomFraction: 0 offset: self statusHeight! !\n\n!TestRunner methodsFor: 'building'!\nstatusHeight\n\t^ self theme textFont height * 2 + 5! !\n\n!TestRunner methodsFor: 'history saving'!\nhasProgress\n\n\tresult classesTested do: [:cls |\n\t\t(cls class methodDictionary includesKey: #lastStoredRun)\n\t\t\tifTrue: [^ true]].\n\t^ false! !\n\n!TestRunner methodsFor: 'history saving'!\nhasResults\n\n\t^ result notNil! !\n\n!TestRunner methodsFor: 'history saving'!\nhistoryMenuList\n\t^ {'** save current result **'}, (self previousRun collect: [:ts | ts printString])! !\n\n!TestRunner methodsFor: 'history saving'!\npreviousRun\n\n\t^ previousRun ifNil: [ previousRun := OrderedCollection new ]! !\n\n!TestRunner methodsFor: 'history saving'!\nsaveResultInHistory\n\tresult dispatchResultsIntoHistory! !\n\n!TestRunner methodsFor: 'history saving'!\nshowDiffWith: aTestResult\n\t| string diff |\n\n\tdiff := result diff: aTestResult.\n\tstring := String streamContents: [:str|\n\t\tstr nextPutAll: '----------------'; cr.\n\t\tstr nextPutAll: 'Diff between current result with: ', aTestResult asString; cr.\n\t\tstr nextPutAll: 'New passed: '.\n\t\tdiff first do: [:s| str nextPutAll: s printString, ' '].\n\t\tstr cr.\n\t\tstr nextPutAll: 'New failures: '.\n\t\tdiff second do: [:s| str nextPutAll: s printString, ' '].\n\t\tstr cr.\n\t\t\n\t\tstr nextPutAll: 'New errors: '.\n\t\tdiff third do: [:s| str nextPutAll: s printString, ' '].\n\t\tstr cr].\n\t\n\tWorkspace new contents: string; openLabel: 'SUnit Progress'\n\t! !\n\n!TestRunner methodsFor: 'history saving'!\nshowHistoryMenu\n\t| selectionIndex selectedPreviousResult actionIndex |\n\tselectionIndex := UIManager default chooseFrom: self historyMenuList title: 'History:'.\n\n\t\"We pressed outside the menu\"\n\tselectionIndex isZero ifTrue: [ ^ self ]. \t\t\t\t\n\n\t\"save current result is selected\"\n\tselectionIndex = 1 ifTrue: [ self previousRun addFirst: result. ^ self ]. \t\t\t\n\n\tselectedPreviousResult := self previousRun at: (selectionIndex - 1).\n \tactionIndex := (UIManager default chooseFrom: #('delete' 'show diff')  title:  'Action:').\n\tactionIndex = 1 ifTrue: [ self previousRun remove: selectedPreviousResult. ^ self ].\n\tactionIndex = 2 ifTrue: [ self showDiffWith: selectedPreviousResult].\t! !\n\n!TestRunner methodsFor: 'history saving' stamp: 'nice 1/5/2010 15:59'!\nshowProgress\n\t| testCaseClasses d string |\n\ttestCaseClasses := (self suiteAll tests collect: [:testCase | testCase class]) asSet.\n\t\n\t\"At the end of the algorithm, d will contains all the diff between what was saved and the current result\"\n\td := Dictionary new.\n\td at: #passed put: OrderedCollection new.\n\td at: #failures put: OrderedCollection new.\n\td at: #errors put: OrderedCollection new.\n\n\ttestCaseClasses do: [ :cls | | t |\n\t\t(cls class methodDict includesKey: #lastStoredRun)\n\t\t\tifTrue: [t := cls lastStoredRun.\n\t\t\t\t\t(t at: #passed) do: [:s | \t\n\t\t\t\t\t\t\t\t\t\t\t(result isErrorFor: cls selector: s)\n\t\t\t\t\t\t\t\t\t\t\t\tifTrue: [(d at: #errors) add: {cls . s}].\n\t\t\t\t\t\t\t\t\t\t\t(result isFailureFor: cls selector: s)\n\t\t\t\t\t\t\t\t\t\t\t\tifTrue: [(d at: #failures) add: {cls . s}]  ].\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t(t at: #failures) do: [:s | (result isPassedFor: cls selector: s)\n\t\t\t\t\t\t\t\t\t\t\t\tifTrue: [(d at: #passed) add: {cls . s}].\n\t\t\t\t\t\t\t\t\t\t\t(result isErrorFor: cls selector: s)\n\t\t\t\t\t\t\t\t\t\t\t\tifTrue: [(d at: #errors) add: {cls . s}]].\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t(t at: #errors) do: [:s | \t(result isPassedFor: cls selector: s)\n\t\t\t\t\t\t\t\t\t\t\t\tifTrue: [(d at: #passed) add: {cls . s}].\n\t\t\t\t\t\t\t\t\t\t\t(result isFailureFor: cls selector: s)\n\t\t\t\t\t\t\t\t\t\t\t\tifTrue: [(d at: #failures) add: {cls . s}]]]].\n\t\t\n\t\t\t\n\tstring := String streamContents: [:str|\n\t\tstr nextPutAll: '----------------'; cr.\n\t\tstr nextPutAll: 'Diff between current result and saved result'; cr.\n\t\tstr nextPutAll: 'New passed: '.\n\t\t(d at: #passed) do: [:s| str nextPutAll: s printString, ' '].\n\t\tstr cr.\n\t\tstr nextPutAll: 'New failures: '.\n\t\t(d at: #failures) do: [:s| str nextPutAll: s printString, ' '].\n\t\tstr cr.\n\t\t\n\t\tstr nextPutAll: 'New errors: '.\n\t\t(d at: #errors) do: [:s| str nextPutAll: s printString, ' '].\n\t\tstr cr].\n\t\n\tWorkspace new contents: string; openLabel: 'SUnit Progress' string.\n\n\t! !\n\n!TestRunner methodsFor: 'history saving'!\nstoreResultIntoTestCases\n\n\tresult classesTested do: [:testCaseCls | testCaseCls generateLastStoredRunMethod ]\n! !\n\n!TestRunner methodsFor: 'initialization' stamp: 'lr 3/22/2006 19:36'!\ninitialize\n\tsuper initialize.\n\tfailedList := errorList := Array new.\n\tSystemChangeNotifier uniqueInstance \n\t\tnotify: self ofSystemChangesOfItem: #class change: #Added using: #update;\n\t\tnotify: self ofSystemChangesOfItem: #category change: #Added using: #update;\n\t\tnotify: self ofSystemChangesOfItem: #class change: #Removed using: #update;\n\t\tnotify: self ofSystemChangesOfItem: #category change: #Removed using: #update;\n\t\tnotify: self ofSystemChangesOfItem: #class change: #Renamed using: #update;\n\t\tnotify: self ofSystemChangesOfItem: #category change: #Renamed using: #update;\n\t\tnotify: self ofSystemChangesOfItem: #class change: #Recategorized using: #update;\n\t\tnotify: self ofSystemChangesOfItem: #category change: #Recategorized using: #update.\n\tself update; reset! !\n\n!TestRunner methodsFor: 'processing' stamp: 'lr 10/31/2005 17:43'!\nbasicRunSuite: aTestSuite do: aBlock\n\tself basicSetUpSuite: aTestSuite.\n\t[ aTestSuite name isEmptyOrNil\n\t\tifTrue: [ aTestSuite tests do: aBlock ]\n\t\tifFalse: [ aTestSuite tests do: aBlock displayingProgress: aTestSuite name ] ]\n\t\t\tensure: [ self basicTearDownSuite: aTestSuite ].\n\t! !\n\n!TestRunner methodsFor: 'processing' stamp: 'lr 10/27/2005 10:04'!\nbasicSetUpSuite: aTestSuite\n\taTestSuite resources do: [ :each |\n\t\teach isAvailable\n\t\t\tifFalse: [ each signalInitializationError ] ].! !\n\n!TestRunner methodsFor: 'processing' stamp: 'lr 10/27/2005 10:04'!\nbasicTearDownSuite: aTestSuite\n\taTestSuite resources do: [ :each | each reset ].! !\n\n!TestRunner methodsFor: 'testing' stamp: 'lr 11/21/2005 13:19'!\nhasErrors\n\t^ result hasErrors.! !\n\n!TestRunner methodsFor: 'testing' stamp: 'lr 11/21/2005 13:19'!\nhasFailures\n\t^ result hasFailures.! !\n\n!TestRunner methodsFor: 'testing'!\nhasFailuresOrErrors\n\t^ result hasFailures | result hasErrors.! !\n\n!TestRunner methodsFor: 'testing' stamp: 'lr 11/21/2005 13:19'!\nhasRunnable\n\t^ classesSelected notEmpty.! !\n\n!TestRunner methodsFor: 'theme'!\ntheme\n\t\"Answer the ui theme that provides controls.\"\n\n\t^UITheme current! !\n\n!TestRunner methodsFor: 'updating' stamp: 'lr 3/22/2006 19:35'!\nupdate\n\tself updateCategories; updateClasses! !\n\n!TestRunner methodsFor: 'updating' stamp: 'lr 10/31/2005 15:45'!\nupdateCategories\n\tcategories := self findCategories.\n\tcategoriesSelected := categoriesSelected isNil\n\t\tifTrue: [ Set new ]\n\t\tifFalse: [\n\t\t\tcategoriesSelected\n\t\t\t\tselect: [ :each | categories includes: each ] ].\n\tself changed: #categoryList; changed: #categorySelected.! !\n\n!TestRunner methodsFor: 'updating' stamp: 'lr 1/20/2009 14:48'!\nupdateClasses\n\t| classesForCategories |\n\tclassesForCategories := self findClassesForCategories: categoriesSelected.\n\tclasses := classesForCategories asArray\n\t\tsort: [ :a :b | self sortClass: a before: b ].\n\tclassIndex := 0.\n\tclassesSelected := classesSelected isNil\n\t\tifTrue: [ classesForCategories ]\n\t\tifFalse: [ \n\t\t\tclassesSelected\n\t\t\t\tselect: [ :each | classesForCategories includes: each ] ].\n\tself changed: #classList; changed: #classSelected; changed: #hasRunnable.! !\n\n!TestRunner methodsFor: 'updating'!\nupdateResults\n\t\"<lint: #expect rule: #guardingClause>\"\n\t\"<lint: #expect rule: #longMethods>\"\n\n\tself updateStatus: false.\n\tfailedList size = result failures size ifFalse: [\n\t\tfailedList := result failures asArray\n\t\t\tsort: [ :a :b | a printString <= b printString ].\n\t\tfailedSelected := nil.\n\t\tself \n\t\t\tchanged: #failedList; \n\t\t\tchanged: #failedSelected;\n\t\t\tchanged: #hasFailures;\n\t\t\tchanged: #hasProgress;\n\t\t\tchanged: #hasFailuresOrErrors  ].\n\terrorList size = result errors size ifFalse: [\n\t\terrorList := result errors asArray\n\t\t\tsort: [ :a :b | a printString <= b printString ].\n\t\terrorSelected := nil.\n\t\tself \n\t\t\tchanged: #errorList; \n\t\t\tchanged: #errorSelected;\n\t\t\tchanged: #hasErrors;\n\t\t\tchanged: #hasProgress;\n\t\t\tchanged: #hasFailuresOrErrors  ].! !\n\n!TestRunner methodsFor: 'updating' stamp: 'lr 11/3/2005 09:28'!\nupdateStatus: aBoolean\n\t\"Update the status display, at most once a second if aBoolean is true.\"\n\n\t(aBoolean and: [ lastUpdate = Time totalSeconds ])\n\t\tifTrue: [ ^ self ].\n\tself changed: #statusText; changed: #statusColor.\n\tlastUpdate := Time totalSeconds.! !\n\n!TestRunner methodsFor: 'utilities'!\nfindCategories\n\t| visible |\n\tvisible := Set new.\n\tself baseClass withAllSubclassesDo: [ :each |\n\t\teach category ifNotNil: [\n\t\t\tvisible add: each category ] ].\n\t^ Array streamContents: [ :stream |\n\t\tSmalltalk organization categories do: [ :each |\n\t\t\t(visible includes: each)\n\t\t\t\tifTrue: [ stream nextPut: each ] ] ].! !\n\n!TestRunner methodsFor: 'utilities' stamp: 'lr 3/14/2010 21:13'!\nfindClassesForCategories: aCollection\n\t| items |\n\taCollection isEmpty\n\t\tifTrue: [ ^ self baseClass withAllSubclasses asSet ].\n\titems := aCollection\n\t\tgather: [ :category | \n\t\t\t((Smalltalk organization listAtCategoryNamed: category) collect: [ :each | Smalltalk globals at: each ])\n\t\t\t\tselect: [ :each | each includesBehavior: self baseClass ] ].\n\t^ items asSet! !\n\n!TestRunner methodsFor: 'utilities' stamp: 'lr 10/10/2005 08:43'!\nsortClass: aFirstClass before: aSecondClass\n\t| first second |\n\tfirst := aFirstClass withAllSuperclasses reversed.\n\tsecond := aSecondClass withAllSuperclasses reversed.\n\t1 to: (first size min: second size) do: [ :index | \n\t\t(first at: index) == (second at: index)\n\t\t\tifFalse: [ ^ (first at: index) name <= (second at: index) name ] ].\n\t^ second includes: aFirstClass.! !\n\n!TestRunner methodsFor: 'private' stamp: 'lr 3/14/2010 21:13'!\nbrowserEnvironment\n\t^ Smalltalk globals classNamed: #BrowserEnvironment! !\n\n!TestRunner methodsFor: 'private' stamp: 'lr 10/27/2005 10:32'!\nlabel: aString forSuite: aTestSuite\n\t^ String streamContents: [ :stream |\n\t\tstream nextPutAll: 'Running '; print: aTestSuite tests size; space; nextPutAll: aString.\n\t\taTestSuite tests size > 1 ifTrue: [ stream nextPut: $s ] ]. ! !\n\n!TestRunner methodsFor: 'private' stamp: 'lr 12/21/2005 10:39'!\nperform: selector orSendTo: otherTarget\n\t\"<lint: #expect rule: #badMessage rational: 'this is a common morphic pattern'>\"\n\t\n\t^ (self respondsTo: selector)\n\t\tifTrue: [ self perform: selector ]\n\t\tifFalse: [ super perform: selector orSendTo: otherTarget ].! !\n\n!TestRunner methodsFor: 'private' stamp: 'lr 3/22/2006 19:26'!\nwindowIsClosing\n\tSystemChangeNotifier uniqueInstance noMoreNotificationsFor: self! !\n\n!TestRunner commentStamp: '<historical>' prior: 0!\n\"<lint: #ignore rule: #classNotReferenced rational: 'this view is only accessed from menus'>\n\n!\n!TestRunner class methodsFor: 'initialization'!\nregisterAsDefaultTestRunner\n\tTestRunnerBrowser default: self.! !\n\n!TestRunner class methodsFor: 'instance-creation' stamp: 'KR 4/28/2006 21:07'!\nbuild\n\t^ ToolBuilder build: self new.! !\n\n!TestRunner class methodsFor: 'instance-creation' stamp: 'lr 10/8/2005 18:35'!\nopen\n\t^ ToolBuilder open: self new.! !\n\n!TestRunner class methodsFor: 'window color'!\npatchworkUIThemeColor\n\t\"Answer a default color for UI themes that make use of different colors for Browser, MessageList etc...\"\n\n\t^ Color brown whiter! !\n\n!TestSuite methodsFor: 'accessing'!\naddTest: aTest\n\tself tests add: aTest! !\n\n!TestSuite methodsFor: 'accessing'!\naddTests: aCollection \n\taCollection do: [:eachTest | self addTest: eachTest]! !\n\n!TestSuite methodsFor: 'accessing'!\ndefaultResources\n\t^self tests\n\t\tinject: OrderedCollection new\n\t\tinto:\n\t\t\t[:coll :testCase |\n\t\t\ttestCase resources do:\n\t\t\t\t[:each |\n\t\t\t\t(coll includes: each) ifFalse: [coll add: each]].\n\t\t\tcoll]! !\n\n!TestSuite methodsFor: 'accessing'!\nname\n\n\t^name! !\n\n!TestSuite methodsFor: 'accessing'!\nname: aString\n\n\tname := aString! !\n\n!TestSuite methodsFor: 'accessing'!\nresources\n\tresources isNil ifTrue: [resources := self defaultResources].\n\t^resources! !\n\n!TestSuite methodsFor: 'accessing'!\nresources: someOrderedTestResourceClasses\n\t\"The parameter should understand reverseDo: and should not contain duplicates.\"\n\n\tresources := someOrderedTestResourceClasses! !\n\n!TestSuite methodsFor: 'accessing'!\ntests\n\ttests isNil ifTrue: [tests := OrderedCollection new].\n\t^tests! !\n\n!TestSuite methodsFor: 'dependencies' stamp: 'md 2/22/2006 14:24'!\naddDependentToHierachy: anObject\n\tself addDependent: anObject.\n\tself tests do: [ :each | each addDependentToHierachy: anObject]\n\t\t\t! !\n\n!TestSuite methodsFor: 'dependencies' stamp: 'md 2/22/2006 14:24'!\nremoveDependentFromHierachy: anObject\n\tself removeDependent: anObject.\n\tself tests do: [ :each | each removeDependentFromHierachy: anObject]\n\t\t\t! !\n\n!TestSuite methodsFor: 'running'!\nresourceClass\n\n\t^TestResource! !\n\n!TestSuite methodsFor: 'running'!\nresultClass\n\n\t^ TestResult! !\n\n!TestSuite methodsFor: 'running'!\nrun\n\t| result |\n\tresult := self resultClass new.\n\t[self run: result]\n\t\tensure: [self resourceClass resetResources: self resources].\n\t^result! !\n\n!TestSuite methodsFor: 'running'!\nrun: aResult \n\tself tests do: [:each | \n\t\tself changed: each.\n\t\teach run: aResult].\n\t\t\t! !\n\n!TestSuite commentStamp: '<historical>' prior: 0!\nThis is a Composite of Tests, either TestCases or other TestSuites. The top-level protocol is #run.  This creates aTestResult and sends\n\tself run: aTestResult.\nthen ensures that any TestResources made available during the run are reset.  These, and the dependencies protocol, are common between this and TestCase.!\n!TestSuite class methodsFor: 'instance creation'!\nnamed: aString\n\n\t^self new\n\t\tname: aString;\n\t\tyourself! !\n\n!Text methodsFor: 'converting' stamp: 'ssa 1/20/2010 10:35'!\nasParagraphWithStyle: aTextStyle\n\t\"Answer a Paragraph whose text is the receiver.\"\n\n\t^Paragraph withText: self style: aTextStyle! !\n\n!Text methodsFor: 'emphasis' stamp: 'ssa 11/24/2009 19:00'!\nbold\n\t\"Force this whole text to be bold.\"\n\tstring size = 0 ifTrue: [^self].\n\tself makeBoldFrom: 1 to: string size! !\n\n!Text methodsFor: 'emphasis' stamp: 'ssa 8/22/2009 17:47'!\nemphasizeFrom: start to: stop with: emphasis \n\t\"Set the emphasis for characters in the interval start-stop.\"\n\n\truns _ \n\t\truns\n\t\t\tcopyReplaceFrom: start\n\t\t\tto: stop\n\t\t\twith: (RunArray new: stop - start + 1 withAll: emphasis)! !\n\n!Text methodsFor: 'emphasis' stamp: 'ssa 11/24/2009 19:01'!\nitalic\n\t\"Force this whole text to be italic.\"\n\tstring size = 0 ifTrue: [^self].\n\tself makeItalicFrom: 1 to: string size! !\n\n!Text methodsFor: 'emphasis' stamp: 'ssa 11/24/2009 19:01'!\nmakeItalicFrom: start to: stop\n\n\t^ self addAttribute: TextEmphasis italic from: start to: stop! !\n\n!Text methodsFor: 'emphasis' stamp: 'ssa 11/27/2009 01:23'!\nmakeUnderlineFrom: start to: stop\n\n\t^ self addAttribute: TextEmphasis underline from: start to: stop! !\n\n!Text methodsFor: 'emphasis' stamp: 'ssa 11/24/2009 19:03'!\nmakeUnderlinedFrom: start to: stop\n\n\t^ self addAttribute: TextEmphasis underlined from: start to: stop! !\n\n!Text methodsFor: 'emphasis' stamp: 'ssa 11/27/2009 01:23'!\nunderline \n\t\"Force this whole text to be underline.\"\n\tstring size = 0 ifTrue: [^self].\n\tself makeUnderlineFrom: 1 to: string size! !\n\n!Text methodsFor: 'emphasis' stamp: 'ssa 11/24/2009 19:03'!\nunderlined\n\t\"Force this whole text to be underlined.\"\n\tstring size = 0 ifTrue: [^self].\n\tself makeUnderlinedFrom: 1 to: string size! !\n\n!Text methodsFor: 'attributes' stamp: 'ssa 11/27/2009 01:09'!\nfont: aFont\n\tself addAttribute: (TextFontReference toFont: aFont)! !\n\n!Text methodsFor: 'attributes' stamp: 'ssa 11/27/2009 01:28'!\nfontName: fname pointSize: ptsize\n\t\"  ('Hello World' asText fontName: #Accuny pointSize: 24) asParagraph display\"\n\t| style sizes findex font availableSize |\n\tstyle _ TextStyle named:fname.\n\tsizes _ TextStyle fontPointSizesFor: fname.\n\tavailableSize _ sizes detect:[:each| each >= ptsize] ifNone:[sizes last].\n\tfindex _ sizes indexOf: availableSize.\n\tfont _ style fontAt:findex.\n\tself font: font \n\t\n\"Accuat  #(18 )\nAccujen  #(9 10 12 14 18 24 )\nAccula  #(12 24 )\nAccumon  #(9 10 12 )\nAccuny  #(9 10 12 14 18 24 )\nAccusf  #(18 )\nAccushi  #(12 )\nAccuve  #(12 14 )\nAtlanta  #(11 22 )\nDefaultFixedTextStyle  #(11 22 )\nDefaultTextStyle  #(9 10 12 14 18 24 )\"! !\n\n!Text methodsFor: 'attributes' stamp: 'ssa 11/27/2009 00:56'!\nfontNumber: anInteger\n\n\tself addAttribute: (TextFontChange fontNumber:anInteger)! !\n\n!TextBlockDoIt methodsFor: 'accessing' stamp: 'ssa 9/15/2009 09:37'!\nactionBlock\n\t\"Answer the value of actionBlock\"\n\n\tactionBlock isNil ifTrue:[self actionBlock: [self notify:'default action block']].\n\t^ actionBlock! !\n\n!TextBlockDoIt methodsFor: 'accessing' stamp: 'ssa 9/15/2009 09:36'!\nactionBlock: anObject\n\t\"Set the value of actionBlock\"\n\n\tactionBlock _ anObject! !\n\n!TextBlockDoIt methodsFor: 'activating' stamp: 'ssa 9/15/2009 09:38'!\nactOnClickFor: anObject\n\t\n\tself actionBlock value.\n\t^true! !\n\n!TextStyle class methodsFor: 'user interface' stamp: 'ssa 9/4/2009 21:20'!\nmvcPromptForFont: aPrompt \n\t\"MVC Only!! prompt for a font and if one is provided, send it to aTarget using a message with selector aSelector.\"\n\t| aMenu aChoice aStyle namesAndSizes |\n\t\"TextStyle mvcPromptForFont: 'Choose system font style' \"\n\taMenu _ CustomMenu new.\n\tself actualTextStyles keys do:\n\t\t[:styleName |\n\t\t\taMenu add: styleName action: styleName].\n\taChoice _ aMenu startUpWithCaption: aPrompt.\n\taChoice ifNil: [^ self].\n\taMenu _ CustomMenu new.\n\taStyle _ self named: aChoice.\n\t(namesAndSizes _ aStyle fontNamesWithPointSizes) do:\n\t\t[:aString | aMenu add: aString action: aString].\n\taChoice _ aMenu startUpWithCaption: nil.\n\taChoice ifNil: [^ self].\n\t^aStyle fontAt: (namesAndSizes indexOf: aChoice).\n\t! !\n\n!TextStyle class methodsFor: 'user interface' stamp: 'ssa 9/4/2009 21:11'!\nmvcPromptForStyle: aPrompt andSendTo: aTarget withSelector: aSelector\n\t\"MVC Only!! prompt for a font and if one is provided, send it to aTarget using a message with selector aSelector.\"\n\t| aMenu aChoice aStyle namesAndSizes aFont |\n\t\"TextStyle mvcPromptForFont: 'Choose system font style' andSendTo: TextStyle withSelector: #setSystemFontTo:\"\n\taMenu _ CustomMenu new.\n\tself actualTextStyles keys do:\n\t\t[:styleName |\n\t\t\taMenu add: styleName action: styleName].\n\taChoice _ aMenu startUpWithCaption: aPrompt.\n\taChoice ifNil: [^ self].\n\taMenu _ CustomMenu new.\n\taStyle _ self named: aChoice.\n\t(namesAndSizes _ aStyle fontNamesWithPointSizes) do:\n\t\t[:aString | aMenu add: aString action: aString].\n\taChoice _ aMenu startUpWithCaption: nil.\n\taChoice ifNil: [^ self].\n\taTarget perform: aSelector with: aStyle! !\n\n!Time class methodsFor: '*SMark-squeak protocol' stamp: 'sm 5/25/2011 14:26'!\nmilliseconds: currentTime since: lastTime\n\t\"Answer the elapsed time since last recorded in milliseconds.\n\tCompensate for rollover.\"\n\n\t| delta |\n\tdelta := currentTime - lastTime.\n\t^ delta < 0\n\t\tifTrue: [SmallInteger maxVal + delta]\n\t\tifFalse: [delta]\n! !\n\n!TranscriptStream methodsFor: 'initialization' stamp: 'ssa 9/3/2008 11:13'!\nopenLabel: aString \n\t\"Open a window on this transcriptStream\"\n\n\t| topView codeView |\n\n\ttopView _ (StandardSystemView new) model: self.\n\ttopView borderWidth: 1.\n\ttopView label: aString.\n\ttopView minimumSize: 100 @ 50.\n\n\tcodeView _ PluggableTextView on: self text: nil accept: nil\n\t\t\t\t\treadSelection: nil menu: #codePaneMenu:shifted:.\n\tcodeView window: (0@0 extent: 200@200).\n\ttopView addSubView: codeView.\n\ttopView controller open! !\n\n!TranscriptStream methodsFor: '*Ly' stamp: 'ssa 7/16/2010 17:06'!\nnextPutAll: stuff\n\tself showInConsole ifTrue:[stuff printConsole].\n\tsuper nextPutAll: stuff.\n! !\n\n!TranscriptStream methodsFor: '*Ly' stamp: 'dmu 3/22/2010 02:58'!\nresetSemaphore\n\tAccessSema signal! !\n\n!TranscriptStream methodsFor: '*RVMBootstrap' stamp: 'ssa 3/24/2010 14:03'!\nshowInConsole\n\n\t^self class showInConsole! !\n\n!TranscriptStream methodsFor: '*RVMBootstrap' stamp: 'ssa 3/24/2010 14:04'!\nshowInConsole: aBoolean\n\n\t^self class showInConsole: aBoolean! !\n\n!TranscriptStream methodsFor: '*RVMBootstrap' stamp: 'ssa 7/5/2010 13:02'!\nshowInConsoleSwitch\n\t\"Transcript showInConsoleSwitch demo\"\n\t^RVMCheckBoxView on: nil label: 'Show Transcript in Console' \n\t\t\t\t\t\tcheckState: [Transcript showInConsole] \n\t\t\t\t\t\twhenChecked: [Transcript showInConsole: true] \n\t\t\t\t\t\twhenUnchecked: [Transcript showInConsole: false].! !\n\n!TranscriptStream methodsFor: '*RVMBootstrap' stamp: 'ssa 3/24/2010 14:04'!\ntoggleShowInConsole\n\n\tself class toggleShowInConsole! !\n\n!TranscriptStream methodsFor: '*RVM' stamp: 'StefanMarr 7/14/2011 17:44'!\nnextPut: chr\n\t\"Evil hack for some more platform independence....\"\n\tchr = Character lf ifTrue: [ super nextPut: Character cr.]\n\t\t\t\t\tifFalse: [super nextPut: chr ].! !\n\n!TranscriptStream class methodsFor: '*RVMBootstrap' stamp: 'ssa 3/24/2010 13:58'!\nshowInConsole\n\t\"A flag to support mirroring the transcript in the RVM console\"\n\tShowInConsole isNil ifTrue:[ShowInConsole _ false].\n\t^ShowInConsole! !\n\n!TranscriptStream class methodsFor: '*RVMBootstrap' stamp: 'ssa 3/24/2010 13:58'!\nshowInConsole: aBoolean\n\t\"A flag to support mirroring the transcript in the RVM console\"\n\tShowInConsole _ aBoolean! !\n\n!TranscriptStream class methodsFor: '*RVMBootstrap' stamp: 'ssa 3/24/2010 13:59'!\ntoggleShowInConsole\n\n\tself showInConsole: self showInConsole not! !\n\n!Transcripter methodsFor: 'command line' stamp: 'ssa 7/7/2010 19:30'!\nreadEvalPrint\n\t| line okToRevert |\n\tSensor flushKeyboard.\n\tokToRevert _ true.\n\t[#('quit' 'exit' 'done' 'restart' 'refresh' 'revert') includes: (line _ self request: '>') ]\n\t\twhileFalse:\n\t\t[line = 'refresh'\n\t\t\tifTrue:[ScheduledControllers restore halt]\n\t\t\tifFalse:[line = 'restart'\n\t\t\t\tifTrue:[ProcessorScheduler removeAllPossible]\n\t\t\t\tifFalse:[line = 'revert'\n\t\t\t\t\tifTrue: [okToRevert\n\t\t\t\t\t\tifTrue: [Utilities revertLastMethodSubmission.\n\t\t\t\t\t\t\tself cr; show: 'reverted: ' , Utilities mostRecentlySubmittedMessage.\n\t\t\t\t\t\t\tokToRevert _ false]\n\t\t\t\t\tifFalse: [self cr; show: 'Only one level of revert currently supported']]\n\t\t\tifFalse: [self cr; show: ([Compiler evaluate: line] ifError: [:err :ex | err])]]]]! !\n\n!Transcripter class methodsFor: 'utilities' stamp: 'ssa 6/11/2010 13:29'!\nemergencyEvaluator\n\t(Transcripter newInFrame: (0@0 corner: 320@200))\n\t\tshow: 'Type ''revert'' to revert your last method change.\nType ''restart'' to restart the processor scheduler.\nType ''refresh'' to refresh the display.\nType ''exit'' to exit the emergency evaluator.';\n\t\treadEvalPrint! !\n\n!TransportFormat methodsFor: 'transporter' stamp: 'ads 12/23/2010 13:47'!\ntransporter\n\t^ transporter! !\n\n!TransportFormat methodsFor: 'transporter' stamp: 'ads 12/23/2010 13:47'!\ntransporter: t\n\ttransporter := t.! !\n\n!TransportFormat methodsFor: 'root directory' stamp: 'ads 1/6/2011 13:13'!\ncreateRoot\n\tself rootDirectory: ( self createDir: self rootName in: transporter baseDirectory mustBeNew: true )! !\n\n!TransportFormat methodsFor: 'root directory' stamp: 'dmu 8/23/2010 14:04'!\nrootDirectory\n\t\"Answer the value of rootDirectory\"\n\n\trootDirectory isNil ifTrue:[self rootDirectory: nil].\n\t^ rootDirectory! !\n\n!TransportFormat methodsFor: 'root directory'!\nrootDirectory: anObject\n\t\"Set the value of rootDirectory\"\n\n\trootDirectory := anObject! !\n\n!TransportFormat methodsFor: 'root directory' stamp: 'dmu 8/23/2010 14:00'!\nrootName\n\t\"Answer the value of rootName\"\n\n\trootName isNil ifTrue:[self rootName: 'root'].\n\t^ rootName! !\n\n!TransportFormat methodsFor: 'root directory'!\nrootName: anObject\n\t\"Set the value of rootName\"\n\n\trootName := anObject! !\n\n!TransportFormat methodsFor: 'directories' stamp: 'dmu 8/23/2010 14:35'!\nclassCategoryDirFor: cat\n\t^ self createDir: cat in: self rootDirectory mustBeNew: false! !\n\n!TransportFormat methodsFor: 'directories'!\ncreateDir: leafName in: parentDir mustBeNew: mustBeNew\n\t| d validLeafName |\n\tvalidLeafName := self validNameForDir: leafName in: parentDir.\n\tleafName asString = validLeafName ifFalse: [Transcript show: 'Warning: renamed directory ', leafName asString, ' to ', validLeafName; cr].\n\td := parentDir directoryNamed: validLeafName.\n\t(mustBeNew and: [d exists]) ifTrue: [| oldDirName oldDir |\n\t\toldDirName := validLeafName, '.old'.\n\t\toldDir := parentDir directoryNamed: oldDirName.\n\t\toldDir exists ifTrue: [oldDir recursiveDelete].\n\t\tTranscript show: d fullName, ' already exists. Renaming it to ', oldDirName; cr.\n\t\tparentDir rename: validLeafName toBe: oldDirName.\n\t\td exists ifTrue: [self error: 'Assertion failure; the directory should not exist anymore, we just tried to rename it.'].\n\t].\n\td exists ifFalse: [d assureExistence].\n\t^ d\n! !\n\n!TransportFormat methodsFor: 'directories' stamp: 'ads 12/3/2010 12:04'!\nvalidNameForDir:  leafName in: parentDir\n\t\"MacOS doesn't like slashes in directory names. -- Adam\"\n\t^ leafName asString replaceAll: $/ with: $-! !\n\n!TransportFormat methodsFor: 'saving' stamp: 'ads 1/6/2011 13:14'!\nsavePackage: p\n\tself createRoot.\n\tself saveScriptForLoadingPackageBackIn: p.\n\tself saveAllClassesForPackage: p.\n\tself saveAllExtensionMethodsForPackage: p.! !\n\n!TransportFormat methodsFor: 'saving methods' stamp: 'ads 12/10/2010 12:26'!\nsaveAllExtensionMethodsForPackage: p\n\tself subclassResponsibility! !\n\n!TransportFormat methodsFor: 'saving classes' stamp: 'ads 12/14/2010 14:14'!\nsaveAllClassesForPackage: p\n\tp classes asArray\n\t\tdo: [:cls | self saveClass: cls forPackage: p]\n\t\tdisplayingProgress: 'Saving ', p name, ' classes'.\n! !\n\n!TransportFormat methodsFor: 'saving classes' stamp: 'ads 12/2/2010 15:24'!\nsaveClass: cls forPackage: p\n\tself subclassResponsibility! !\n\n!TransportFormat methodsFor: 'loading'!\nclassesInOrderForLoading: p\n\t| extensionClassNames extensionClasses coreClasses coreClassNames |\n\t\"Gotta sort them to make sure superclassOrder: always puts them in canonical order.\"\n\tcoreClassNames := (p classes collect: [:cls | cls theNonMetaClass name]) asSet asArray sort.\n\textensionClassNames := (p extensionClasses collect: [:cls | cls theNonMetaClass name]) asSet asArray sort.\n\tcoreClasses := coreClassNames collect: [:n | Smalltalk classNamed: n].\n\textensionClasses := extensionClassNames collect: [:n | Smalltalk classNamed: n].\n\t^ self transporter fiddleWithClassLoadingOrder: extensionClasses, (ChangeSet superclassOrder: coreClasses)! !\n\n!TransportFormat methodsFor: 'loading' stamp: 'ads 12/10/2010 12:27'!\nsaveScriptForLoadingPackageBackIn: p\n\tself subclassResponsibility! !\n\n!TransportFormat methodsFor: 'preamble and postscript' stamp: 'ads 12/14/2010 12:15'!\npostscriptBlock\n\t^ postscriptBlock! !\n\n!TransportFormat methodsFor: 'preamble and postscript' stamp: 'ads 12/14/2010 12:15'!\npostscriptBlock: aBlock\n\tpostscriptBlock := aBlock.! !\n\n!TransportFormat methodsFor: 'preamble and postscript' stamp: 'ads 12/10/2010 12:39'!\npreambleBlock\n\t^ preambleBlock! !\n\n!TransportFormat methodsFor: 'preamble and postscript' stamp: 'ads 12/10/2010 12:39'!\npreambleBlock: aBlock\n\tpreambleBlock := aBlock.! !\n\n!Transporter methodsFor: 'accessing' stamp: 'ads 1/4/2011 15:56'!\nbaseDirectory\n\t^ baseDirectory ifNil: [FileDirectory default]! !\n\n!Transporter methodsFor: 'accessing' stamp: 'ads 1/4/2011 15:56'!\nbaseDirectory: aDirectory\n\tbaseDirectory := aDirectory.! !\n\n!Transporter methodsFor: 'accessing' stamp: 'ads 12/10/2010 11:54'!\npackage\n\t^ package! !\n\n!Transporter methodsFor: 'accessing'!\npackage: anObject\n\tpackage := anObject! !\n\n!Transporter methodsFor: 'accessing' stamp: 'ads 12/14/2010 12:30'!\npostscriptBlock\n\t^ postscriptBlock! !\n\n!Transporter methodsFor: 'accessing' stamp: 'ads 12/14/2010 12:31'!\npostscriptBlock: aBlock\n\tpostscriptBlock := aBlock.! !\n\n!Transporter methodsFor: 'accessing' stamp: 'ads 12/14/2010 12:31'!\npreambleBlock\n\t^ preambleBlock! !\n\n!Transporter methodsFor: 'accessing' stamp: 'ads 12/14/2010 12:31'!\npreambleBlock: aBlock\n\tpreambleBlock := aBlock.! !\n\n!Transporter methodsFor: 'accessing' stamp: 'sm 7/8/2011 23:14'!\nsubTransporters: anArrayOfTransporters\n\tsubTransporters := anArrayOfTransporters! !\n\n!Transporter methodsFor: 'accessing' stamp: 'ads 12/10/2010 11:54'!\nteam\n\t^ team! !\n\n!Transporter methodsFor: 'accessing' stamp: 'ads 12/10/2010 11:54'!\nteam: anObject\n\tteam _ anObject! !\n\n!Transporter methodsFor: 'accessing' stamp: 'ads 12/10/2010 12:08'!\ntransportFormatClass\n\t^ transportFormatClass ifNil: [OneFilePerClass]! !\n\n!Transporter methodsFor: 'accessing' stamp: 'ads 12/10/2010 12:08'!\ntransportFormatClass: anObject\n\ttransportFormatClass _ anObject! !\n\n!Transporter methodsFor: 'reverting' stamp: 'ads 12/10/2010 13:04'!\nrevert\n\tself team revertPackage: self package.! !\n\n!Transporter methodsFor: 'loading' stamp: 'ads 12/23/2010 13:50'!\nfiddleWithClassLoadingOrder: classes\n\t\"Can be overridden by children who need special ordering.\"\n\t^ classes! !\n\n!Transporter methodsFor: 'saving' stamp: 'ads 12/23/2010 13:48'!\ncreateTransportFormat\n\t^ self transportFormatClass new\n\t\ttransporter: self;\n\t\trootName: self package name;\n\t\tpreambleBlock: self preambleBlock;\n\t\tpostscriptBlock: self postscriptBlock;\n\t\tyourself! !\n\n!Transporter methodsFor: 'saving' stamp: 'sm 7/8/2011 23:13'!\nsave\n\tself willAllChangesInCurrentChangeSetBeSaved ifFalse: [\n\t\t(PopUpMenu confirm: 'There are changes in the current changeset that will not be saved.' trueChoice: 'Save anyway!!' falseChoice: 'Cancel the save, show me what''s changed') ifFalse: [\n\t\t\tChangeSorter new showChangeSet: ChangeSet current; open.\n\t\t\t^ self.\n\t\t].\n\t].\n\tself createTransportFormat savePackage: self package.\n\tself saveSubTransporters.! !\n\n!Transporter methodsFor: 'saving' stamp: 'sm 7/8/2011 23:13'!\nsaveNoPopup\n\tself willAllChangesInCurrentChangeSetBeSaved ifFalse: [\n\t\tTranscript show: 'Not all changes in current ChangeSet will be saved'; cr.\n\t].\n\tself createTransportFormat savePackage: self package.\n\tself saveSubTransporters.! !\n\n!Transporter methodsFor: 'saving' stamp: 'sm 7/8/2011 23:15'!\nsaveSubTransporters\n\tsubTransporters ifNotNil: [\n\t\tsubTransporters do: [:trsp | trsp saveNoPopup ]].! !\n\n!Transporter methodsFor: 'changes' stamp: 'ads 1/26/2011 14:23'!\nwillAllChangesInCurrentChangeSetBeSaved\n\t^ ChangeSet current changedPackages allSatisfy: [:p | self package includesPackage: p]! !\n\n!Transporter methodsFor: 'searching' stamp: 'ads 12/10/2010 12:12'!\nfindMethodsWrittenByThisTeamButNotIncludedInPackage\n\t^ self team findMethodsWrittenByThisTeamButNotIncludedInPackage: self package, (PackageInfo named: 'Transporter')! !\n\n!Transporter class methodsFor: 'as yet unclassified' stamp: 'sm 3/10/2011 17:43'!\nfindAllMethodChangedByTeamButNotTransported\n\t\"Transporter findAllMethodChangedByTeamButNotTransported\"\n\t\n\t\"Find all changes in the system that were done by a team member \n\t but are not yet included in any of the Transporter packages/definitions\"\n\t| transportersByName teams packages changedMethods systemCats tricky |\n\ttransportersByName := self getAllTransporters.\n\n\t\"next: get all teams and categories\"\n\tteams := OrderedCollection new.\n\tsystemCats := OrderedCollection new.\n\tpackages := nil.\n\ttransportersByName valuesDo: [:trns | \n\t\ttrns team ifNotNil: [teams add: (trns team)].\n\t\tsystemCats addAll: trns package systemCategories.\n\t\t\n\t\tpackages \n\t\t\tifNil: [packages := trns package.]\n\t\t\tifNotNil: [packages := packages, trns package.]\n\t].\n\n\ttricky := self constructTrickySet.\n\t\n\tchangedMethods := Set new.\n\t((Smalltalk \n\t\tallClasses reject: [:cls | systemCats includes: cls category]) \n\t\t\tgather: [:cls| {cls. cls class}]) \n\t\tdo: [:cls |\n\t\t\tcls organization allMethodSelectors do: [:sel | \n\t\t\t\t| mr crs |\n\t\t\t\tmr := MethodReference new setStandardClass: cls methodSymbol: sel.\n\t\t\t\tcrs := mr changeRecords.\n\t\t\t\tcrs isEmpty ifFalse: [\n\t\t\t\t\tteams do: [:team |\n\t\t\t\t\t\t(team didProjectMemberCreateChangeRecord: crs first) ifTrue: [\n\t\t\t\t\t\t\t(packages isYourClassExtension: mr category) ifFalse: [\n\t\t\t\t\t\t\t\t(tricky includes: (((cls name asString), '>>', sel asString) asSymbol)) ifFalse: [\n\t\t\t\t\t\t\t\t\tchangedMethods add: mr.\n\t\t\t\t\t\t\t\t].\n\t\t\t\t\t\t\t].\n\t\t\t\t\t\t].\n\t\t\t\t\t].\n\t\t\t\t].\n\t\t\t].\n\t\t].\n\t^ changedMethods asArray! !\n\n!Transporter class methodsFor: 'as yet unclassified' stamp: 'ads 1/26/2011 13:26'!\nnonCategoryBasedPackages\n\t\"Not sure what would be the right way to do this. -- Adam, Jan. 2011\"\n\t^ PackageWhoseContentsMustBeTransportedInOrder allSubclasses collect: [:c | c new]! !\n\n!Transporter class methodsFor: 'private' stamp: 'sm 3/10/2011 16:54'!\nclassAndOrMethodAsUniqueSymbole: anArray\n\tanArray size = 1 \n\t\tifTrue:  [^ (anArray at: 1) asSymbol ]\n\t\tifFalse: [^  ((anArray at: 1), '>>', (anArray at: 2)) asSymbol ].! !\n\n!Transporter class methodsFor: 'private' stamp: 'sm 3/10/2011 17:31'!\nconstructTrickySet\n\t\"Transporter constructTrickySet\"\n\t\"Creates a set with symboles for all tricky elements\"\n\t| result |\n\t\n\tresult := Set new. \n\t\n\tself getAllTrickyDefinitions do: [:def |\n\t\t| uniqueSymbol |\n\t\tuniqueSymbol := self classAndOrMethodAsUniqueSymbole: def.\n\t\t(result includes: uniqueSymbol) ifTrue: [Transcript show: 'Multiple includes of ', uniqueSymbol asString.].\n\t\tresult add: uniqueSymbol.\n\t].\n\n\t^ result! !\n\n!Transporter class methodsFor: 'private' stamp: 'sm 3/10/2011 16:49'!\nconstructTrickySet: transportersByName\n\t\"Creates a set with symboles for all tricky elements\"\n\t| result |\n\t\n\tresult := Set new. \n\t\n\ttransportersByName valuesDo: [:trans |\n\t\ttrans trickyModificationsThatNeedToBeDoneInOrder do: [:trickyElem |\n\t\t\tresult add: (self classAndOrMethodAsUniqueSymbole: trickyElem )\n\t\t].\n\t].! !\n\n!Transporter class methodsFor: 'transporter' stamp: 'StefanMarr 7/14/2011 13:11'!\nfileOutPackage: aPackageName\n\t(Transporter forPackage: (PackageInfo named: aPackageName)) saveNoPopup.! !\n\n!Transporter class methodsFor: 'transporter' stamp: 'ads 12/14/2010 12:26'!\nforEntireImage\n\t^ self forPackage: CompositePackageInfo forEntireImage! !\n\n!Transporter class methodsFor: 'transporter' stamp: 'ads 12/14/2010 12:25'!\nforPackage: p\n\t^ self new\n\t\tpackage: p;\n\t\tyourself! !\n\n!Transporter class methodsFor: 'transporter' stamp: 'sm 3/10/2011 15:34'!\ngetAllTransporters\n\t\"Identify all transporters based on #transportersForFileOutMenu\"\n\t| transportersByName |\n\ttransportersByName _ Dictionary new.\n\tSmalltalk allClassesDo: [:class |\n\t\t(class respondsTo: #transportersForFileOutMenu) ifTrue: [\n\t\t\tclass transportersForFileOutMenu do: [:transporter |\n\t\t\t\ttransportersByName at: transporter package name put: transporter.\n\t\t\t].\n\t\t].\n\t].\n\t^ transportersByName.! !\n\n!Transporter class methodsFor: 'transporter' stamp: 'sm 4/22/2011 00:06'!\ngetAllTrickyDefinitions\n\t\"Transporter getAllTrickyDefinitions\"\n\t\"Identify all tricky definitions based on #trickyModificationsThatNeedToBeDoneInOrder\"\n\t| tricky |\n\ttricky _ OrderedCollection new.\n\tSmalltalk allClassesDo: [:class |\n\t\t(class canUnderstand: #trickyModificationsThatNeedToBeDoneInOrder) ifTrue: [\n\t\t\t| modifications |\n\t\t\tmodifications := class new trickyModificationsThatNeedToBeDoneInOrder.\n\t\t\tmodifications ifNotNil: [\n\t\t\t\ttricky addAll: modifications.\n\t\t\t].\n\t\t].\n\t].\n\t^ tricky.! !\n\n!Transporter class methodsFor: 'transporter' stamp: 'sm 5/24/2011 23:27'!\nloadPackage: aPackageName\n\t\"This is a convenience method to not require to remember how to file in stuff.\n\t It just uses the package name and the implemented convention to guess the file and load it.\"\n\t\n\t| stream chgSetName aNewChangeSet cls |\n\tstream := FileStream fileNamed: aPackageName, '/', aPackageName,'.st'.\n\tchgSetName := ChangeSet uniqueNameLike: stream localName sansPeriodSuffix.\n\t\n\tcls := (ChangeSet respondsTo: #newChangesFromStream:named:) ifTrue: [ChangeSet] ifFalse: [ChangeSorter].\n\t\n\taNewChangeSet := cls\tnewChangesFromStream: stream\n\t\t\t\t\t\tnamed: chgSetName.\n\t\t\n\taNewChangeSet\n\t\tifNotNil: [ChangeSorter open model showChangeSet: aNewChangeSet]! !\n\n!Transporter class methodsFor: 'transporter' stamp: 'ads 1/3/2011 17:41'!\ntransportersForFileOutMenu\n\t^ {\n\t\tTransporter forPackage: (PackageInfo named: 'Transporter')\n\t}! !\n\n!True methodsFor: 'debugging' stamp: 'ssa 3/11/2010 11:54'!\nhaltIfTrue\n\n\tself halt! !\n\n!True class methodsFor: '*RVM-Archiving'!\ndearchiveFrom: aStream\n\n\taStream storeObject: true.\n\t^true! !\n\n!UndefinedObject methodsFor: '*RVM-Archiving'!\narchiveOn: aStream\n\taStream\n\t\tstoreClass: self class! !\n\n!UndefinedObject class methodsFor: 'instance creation'!\ndearchiveFrom: aStream\n\t^nil! !\n\n!UnhandledError methodsFor: 'priv handling' stamp: 'dmu 11/25/2008 00:25'!\ndevDefaultAction\n\n\tProcessor thisProcess\n\t\tdebug: exception signalerContext\n\t\ttitle: exception description! !\n\n!UpdateImage class methodsFor: 'script entry'!\nrun: args\n\t\"The loading needs to be done after everything in startup has been done.\n\t Otherwise the snaphost routine gets confused.\n\t Thus, we do that ourselfs.\"\n\t\t\n\tScriptStarter quitVMAfterScriptExecution: false.\n\n\tself fileInAllRenaissanceCode.\n\t\n\tScriptStarter quitVMAfterScriptExecution: false.\n! !\n\n!UpdateImage class methodsFor: 'fileIn script'!\nfileInAllRenaissanceCode\n\t\"Create an up-to-date image\"\n\tTranscript show: 'Save as updated.image.'; cr.\n\t\n\tSmalltalkImage current saveAs: 'updated-tmp.image'.\n\n\tTranscript show: 'File in code.'; cr.\n\t(FileStream readOnlyFileNamed: 'FileInAllRenaissanceCode.st') fileIn.\n\t\n\tTranscript show: 'Done filing in code. Now Save and Quit.'; cr.\n\n\tSmalltalkImage current saveAs: 'updated.image'.\t\n\tSmalltalkImage current closeSourceFiles.\n\tSmalltalk snapshot: true andQuit: true.! !\n\n!Utilities class methodsFor: 'miscellaneous' stamp: 'ssa 1/21/2010 12:17'!\nexploreViewFromUser\n\tScheduledControllers screenController exploreViewFromUser! !\n\n!Utilities class methodsFor: 'user interface' stamp: 'ssa 9/3/2008 11:13'!\ninformUserDuring: aBlock\n\t\"Display a message above (or below if insufficient room) the cursor during execution of the given block.\"\n\t\"Utilities informUserDuring:[:bar|\n\t\t#(one two three) do:[:info|\n\t\t\tbar value: info.\n\t\t\t(Delay forSeconds: 1) wait]]\"\n\taBlock value:[:string| Transcript cr; show: string]! !\n\n!Utilities class methodsFor: 'finding pointers' stamp: 'ar 7/16/2005 19:56'!\npointersTo: anObject\n\t\"Find all occurrences in the system of pointers to the argument anObject.\"\n\t\"(Utilities pointersTo: Browser) inspect.\"\n\t^ self pointersTo: anObject except: #()\n! !\n\n!Utilities class methodsFor: 'finding pointers' stamp: 'dmu 3/23/2010 12:31'!\npointersTo: anObject except: objectsToExclude \n\t\"Find all occurrences in the system of pointers to the argument\n\tanObject. Remove objects in the exclusion list from the\n\tresults. \"\n\t| results anObj |\n\tTranscript cr; show: 'Calling garbageCollect from pointersTo:except:'.\n\tSmalltalk garbageCollect.\n\t\"big collection shouldn't grow, so it's contents array is always the same\"\n\tresults := OrderedCollection new: 1000.\n\t\"allObjectsDo: is expanded inline to keep spurious\n\tmethod and block contexts out of the results\"\n\tanObj := self someObject.\n\t[0 == anObj] whileFalse: [\n\t\tanObj isInMemory ifTrue: [\n\t\t\t(anObj pointsTo: anObject) ifTrue: [\n\t\t\t\t\"exclude the results collector and contexts in call chain\"\n\t\t\t\t(anObj ~~ results collector \n\t\t\t\t\tand: [anObj ~~ objectsToExclude\n\t\t\t\t\tand: [anObj ~~ thisContext\n\t\t\t\t\tand: [anObj ~~ thisContext sender\n\t\t\t\t\tand: [anObj ~~ thisContext sender sender]]]])\n\t\t\t\t\t\tifTrue: [results add: anObj]]].\n\t\tanObj := anObj nextObject].\n\tobjectsToExclude do: [:obj | results removeAllSuchThat: [:el | el == obj]].\n\t^ results asArray! !\n\n!Utilities class methodsFor: 'finding pointers' stamp: 'ar 7/16/2005 19:56'!\npointersToItem: index of: anArray\n\t\"Find all occurrences in the system of pointers to the given element of the given array. This is useful for tracing up a pointer chain from an inspector on the results of a previous call of pointersTo:. To find out who points to the second element of the results, one would evaluate:\n\n\tUtilities pointersToItem: 2 of: self\n\nin the inspector.\"\n\t^ self pointersTo: (anArray at: index) except: (Array with: anArray)! !\n\n!VersionsBrowser methodsFor: 'init & update' stamp: 'dmu 9/7/2010 14:26'!\nscanVersionsOf: method class: class meta: meta category: category selector: selector\n\t| position prevPos prevFileIndex preamble tokens sourceFilesCopy stamp |\n\tselectorOfMethod _ selector.\n\tcurrentCompiledMethod _ method.\n\tclassOfMethod _ meta ifTrue: [class class] ifFalse: [class].\n\tchangeList _ OrderedCollection new.\n\tlist _ OrderedCollection new.\n\tself addedChangeRecord ifNotNilDo: [ :change |\n\t\tself addItem: change text: ('{1} (in {2})' translated format: { change stamp. change fileName }) ].\n\tlistIndex _ 0.\n\tposition _ method filePosition.\n\tsourceFilesCopy _ SourceFiles collect:\n\t\t[:x | x isNil ifTrue: [ nil ]\n\t\t\t\tifFalse: [x readOnlyCopy]].\n\tmethod fileIndex == 0 ifTrue: [^ nil].\n\tfile _ sourceFilesCopy at: method fileIndex.\n\t[position notNil & file notNil]\n\t\twhileTrue:\n\t\t[file position: (0 max: position-150).  \"Skip back to before the preamble\"\n\t\t[file position < (position-1)]  \"then pick it up from the front\"\n\t\t\twhileTrue: [preamble _ file nextChunk].\n\n\t\t\"Preamble is likely a linked method preamble, if we're in\n\t\t\ta changes file (not the sources file).  Try to parse it\n\t\t\tfor prior source position and file index\"\n\t\tprevPos _ nil.\n\t\tstamp _ ''.\n\t\t(preamble findString: 'methodsFor:' startingAt: 1) > 0\n\t\t\tifTrue: [tokens _ Scanner new scanTokens: preamble]\n\t\t\tifFalse: [tokens _ Array new  \"ie cant be back ref\"].\n\t\t((tokens size between: 7 and: 8)\n\t\t\tand: [(tokens at: tokens size-5) = #methodsFor:])\n\t\t\tifTrue:\n\t\t\t\t[(tokens at: tokens size-3) = #stamp:\n\t\t\t\tifTrue: [\"New format gives change stamp and unified prior pointer\"\n\t\t\t\t\t\tstamp _ tokens at: tokens size-2.\n\t\t\t\t\t\tprevPos _ tokens last.\n\t\t\t\t\t\tprevFileIndex _ sourceFilesCopy fileIndexFromSourcePointer: prevPos.\n\t\t\t\t\t\tprevPos _ sourceFilesCopy filePositionFromSourcePointer: prevPos]\n\t\t\t\tifFalse: [\"Old format gives no stamp; prior pointer in two parts\"\n\t\t\t\t\t\tprevPos _ tokens at: tokens size-2.\n\t\t\t\t\t\tprevFileIndex _ tokens last].\n\t\t\t\t(prevPos = 0 or: [prevFileIndex = 0]) ifTrue: [prevPos _ nil]].\n\t\t((tokens size between: 5 and: 6)\n\t\t\tand: [(tokens at: tokens size-3) = #methodsFor:])\n\t\t\tifTrue:\n\t\t\t\t[(tokens at: tokens size-1) = #stamp:\n\t\t\t\tifTrue: [\"New format gives change stamp and unified prior pointer\"\n\t\t\t\t\t\tstamp _ tokens at: tokens size]].\n \t\tself addItem:\n\t\t\t\t(ChangeRecord new file: file position: position type: #method\n\t\t\t\t\t\tclass: class name category: category meta: meta stamp: stamp)\n\t\t\ttext: stamp , ' ' , class name , (meta ifTrue: [' class '] ifFalse: [' ']) , selector.\n\t\tposition _ prevPos.\n\t\tprevPos notNil ifTrue:\n\t\t\t[file _ sourceFilesCopy at: prevFileIndex]].\n\tsourceFilesCopy do: [:x | x notNil ifTrue: [x close]].\n\tlistSelections _ Array new: list size withAll: false! !\n\n!View methodsFor: 'initialize-release' stamp: 'ssa 11/30/2009 17:50'!\nsetDefaultBackgroundColor\n\n\tself backgroundColor: self model defaultBackgroundColor! !\n\n!View methodsFor: 'testing' stamp: 'ssa 1/1/1970 00:19'!\nisRVMView\n\n\t^false! !\n\n!View methodsFor: 'subView access' stamp: 'ssa 1/1/1970 12:58'!\nallSubViews\n\t\"Answer the receiver's collection of subViews and their subViews recursively.\"\n\n\t| all |\n\tall _ OrderedCollection new.\n\tall addAll: self subViews.\n\tself subViews do:[:sub| all addAll: sub allSubViews].\n\t^all! !\n\n!View methodsFor: 'subView access' stamp: 'ssa 10/19/2008 00:00'!\nsubViewsSatisfying: aBlock\n\t\"Return the subviews that satisfy aBlock, or #() if none does.  1/31/96 sw\"\n\n\t^ subViews select: [:aView | aBlock value: aView]! !\n\n!View methodsFor: 'lock access'!\nunlock\n        \"Unlock the receiver and all of its subViews (see View|isUnlocked). This \n        has the effect of forcing the display transformation (see \n        View|displayTransformation) and inset display box (see \n        View|insetDisplayBox) of the receiver and all its subViews to be \n        recomputed the next time they are referenced. The locking and \n        unlocking of a View is handled automatically by the internal methods of \n        the View, but can also be done explicitly if desired.\"\n        \"Added a guard clause to protect against empty subview collections.  This is one reason why lazy initialization and consistent use of accessor methods is better than direct access.  - ssa 2/27/98 11:26\"\n\n        self isUnlocked ifTrue: [^self].\n        displayTransformation _ nil.\n        insetDisplayBox _ nil.\n        subViews isNil ifFalse:[subViews do: [:aSubView | aSubView unlock]]! !\n\n!View methodsFor: 'subView inserting' stamp: 'ssa 9/13/2008 16:54'!\naddSubView: aSubView above: lowerView\n\t\"Adds aView (see View|addSubView:) so that it lies above topView.\"\n\t\"ssa - added a hack to allow nil lowerView\"\n\n\tlowerView isNil\n\t\tifTrue:[self addSubView: aSubView]\n\t\tifFalse:[self addSubView: aSubView\n\t\t\t\t\talign: aSubView viewport bottomLeft\n\t\t\t\t\twith: lowerView viewport topLeft]! !\n\n!View methodsFor: 'subView inserting' stamp: 'ssa 9/13/2008 16:55'!\naddSubView: aSubView below: lowerView\n\t\"Add the argument, aSubView, (see View|addSubView:) so that it lies \n\tbelow the view, topView.\"\n\t\"ssa - added a hack to allow nil lowerView\"\n\n\tlowerView isNil\n\t\tifTrue:[self addSubView: aSubView]\n\t\tifFalse:[self addSubView: aSubView\n\t\t\t\t\talign: aSubView viewport topLeft\n\t\t\t\t\twith: lowerView viewport bottomLeft]! !\n\n!View methodsFor: 'subView inserting' stamp: 'ssa 8/15/2008 17:31'!\naddSubView: aView in: aRelativeRectangle borderWidth: width\n\t\"ssa - added for compatibility.\"\n \n\t\"Make 'aView' into a subview. Use 'aRelativeRectangle' and the \n\tsuper view's window to compute (1) a viewport within the \n\tsuperview for 'aView' and (2) the window extent for 'aView'. Note: \n\tdefining the windowing transformation and deriving the viewport is \n\tlogically equivalent but does not seem to be easily done\"\n\n\t| subViewPort myWindow myExtent myOrigin |\n\tself addSubView: aView ifCyclic: [self error: 'cycle in subView structure.'].\n\taView borderWidth: width.\n\tmyWindow _ self window.\n\tmyExtent _ myWindow extent.\n\tmyOrigin _ myWindow origin.\n\tsubViewPort _ myExtent * aRelativeRectangle origin + myOrigin \n\t\t\t\t\t\tcorner: myExtent * aRelativeRectangle corner + myOrigin.\n\taView window: aView window viewport: subViewPort\n! !\n\n!View methodsFor: 'subView inserting' stamp: 'ssa 9/13/2008 16:55'!\naddSubView: aSubView toLeftOf: rightView\n\t\"Adds aView (see addSubView:) so that it lies to the right of rightView.\"\n\n\t\"ssa - added a hack to allow nil rightView\"\n\n\trightView isNil\n\t\tifTrue:[self addSubView: aSubView]\n\t\tifFalse:[self addSubView: aSubView\n\t\t\t\t\talign: aSubView viewport topRight\n\t\t\t\t\twith:  rightView viewport topLeft]! !\n\n!View methodsFor: 'subView inserting' stamp: 'ssa 9/13/2008 16:56'!\naddSubView: aSubView toRightOf: leftView\n\t\"Add the argument, aSubView, (see View|addSubView:) so that it lies to \n\tthe right of the view, leftView.\"\n\n\t\"ssa - added a hack to allow nil leftView\"\n\n\tleftView isNil\n\t\tifTrue:[self addSubView: aSubView]\n\t\tifFalse:[self addSubView: aSubView\n\t\t\t\t\talign: aSubView viewport topLeft\n\t\t\t\t\twith: leftView viewport topRight]! !\n\n!View methodsFor: 'miscellaneous' stamp: 'ssa 10/8/2008 17:54'!\nstretchFrame: newFrameBlock startingWith: startFrame \n\t\"Track the outline of a newFrame as long as mouse drags it.\n\tMaintain max and min constraints throughout the drag\"\n\t| frame newFrame click delay |\n\tdelay _ Delay forMilliseconds: 10.\n\tframe _ startFrame origin extent: ((startFrame extent min: self maximumSize)\n\t\t\t\t\t\t\t\t\t\t\tmax: self minimumSize).\n\tDisplay border: frame width: 2 rule: Form reverse fillColor: Color gray.\n\tclick _ false.\n\t[click and: [Sensor noButtonPressed]] whileFalse: \n\t\t[\"delay wait.\"\n\t\tclick _ click | Sensor anyButtonPressed.\n\t\tnewFrame _ newFrameBlock value: frame.\n\t\tnewFrame _ newFrame topLeft extent: ((newFrame extent min: self maximumSize)\n\t\t\t\t\t\t\t\t\t\t\tmax: self minimumSize).\n\t\tnewFrame = frame ifFalse:\n\t\t\t[Display border: frame width: 2 rule: Form reverse fillColor: Color gray.\n\t\t\tDisplay border: newFrame width: 2 rule: Form reverse fillColor: Color gray.\n\t\t\tframe _ newFrame]].\n\tDisplay border: frame width: 2 rule: Form reverse fillColor: Color gray.\n\t^ frame! !\n\n!View methodsFor: 'demonstrating' stamp: 'ssa 11/27/2008 10:05'!\ndemo\n\t\"Add me to a system view and open me on the desktop\"\n\tself demoSized: self minimumSize! !\n\n!View methodsFor: 'demonstrating' stamp: 'ssa 11/27/2008 10:05'!\ndemoSized: anExtent\n\t\"Add me to a system view and open me on the desktop\"\n\t| topView  |\n\ttopView := StandardSystemView new.\n\ttopView borderWidth:1.\n\ttopView minimumSize: anExtent.\n\ttopView addSubView: self .\n\ttopView label: self class name,' demo'.\n\ttopView controller open! !\n\n!View methodsFor: 'accessing' stamp: 'ssa 3/12/2010 10:12'!\nborderColor\n\t\"Answer the value of borderColor\"\n\n\tborderColor isNil ifTrue:[self borderColor: self foregroundColor].\n\t^ borderColor! !\n\n!View methodsFor: 'accessing' stamp: 'ssa 3/12/2010 10:12'!\nborderColor: anObject\n\t\"Set the value of borderColor\"\n\n\tborderColor _ anObject! !\n\n!View methodsFor: 'accessing' stamp: 'ssa 3/12/2010 10:12'!\nboundingBox: anObject\n\t\"Set the value of boundingBox\"\n\n\tboundingBox _ anObject! !\n\n!View methodsFor: 'accessing' stamp: 'ssa 3/12/2010 10:12'!\ndisplayTransformation: anObject\n\t\"Set the value of displayTransformation\"\n\n\tdisplayTransformation _ anObject! !\n\n!View methodsFor: 'accessing' stamp: 'ssa 3/12/2010 10:12'!\ninsetDisplayBox: anObject\n\t\"Set the value of insetDisplayBox\"\n\n\tinsetDisplayBox _ anObject! !\n\n!View methodsFor: 'accessing' stamp: 'ssa 3/12/2010 10:12'!\ninsideColor\n\t\"Answer the value of insideColor\"\n\n\tinsideColor isNil ifTrue:[self insideColor: nil].\n\t^ insideColor! !\n\n!View methodsFor: 'accessing' stamp: 'ssa 3/12/2010 10:12'!\nsubViews: anObject\n\t\"Set the value of subViews\"\n\n\tsubViews _ anObject! !\n\n!View methodsFor: 'accessing' stamp: 'ssa 3/12/2010 10:12'!\nviewport: anObject\n\t\"Set the value of viewport\"\n\n\tviewport _ anObject! !\n\n!View methodsFor: '*Ly experiments' stamp: 'ssa 3/12/2010 17:52'!\nmoveBy: delta\n\t\"Move me delta left  in my superView\"\n\t| scaledDelta |\n\tscaledDelta _ self viewport width / self insetDisplayBox width * delta.\n\tself transformUsing:[:ovp| ovp moveBy: scaledDelta]! !\n\n!View methodsFor: '*Ly experiments' stamp: 'ssa 3/12/2010 17:54'!\nmoveDown\n\t\"Move me 10 pixels down  in my superView\"\n\tself moveBy:(0@10)! !\n\n!View methodsFor: '*Ly experiments' stamp: 'ssa 3/12/2010 16:50'!\nmoveFrom: oldBox\n\t\"Move me to ensure I refect my window/viewport\"\n\n\tself uncacheBits.\n\tself displayEmphasized.\n\tself moved.  \"In case its model wishes to take note.\"\n\t(oldBox areasOutside: self windowBox) do:\n\t\t[:rect | ScheduledControllers restore: rect]! !\n\n!View methodsFor: '*Ly experiments' stamp: 'ssa 3/12/2010 17:54'!\nmoveLeft\n\t\"Move me 10 pixels left  in my superView\"\n\tself moveBy:(-10@0)! !\n\n!View methodsFor: '*Ly experiments' stamp: 'ssa 3/12/2010 17:54'!\nmoveRight\n\t\"Move me 10 pixels right  in my superView\"\n\tself moveBy:(10@0)! !\n\n!View methodsFor: '*Ly experiments' stamp: 'ssa 3/12/2010 17:54'!\nmoveUp\n\t\"Move me 10 pixels up  in my superView\"\n\tself moveBy:(0 @ -10)! !\n\n!View methodsFor: '*Ly experiments' stamp: 'ssa 3/12/2010 16:55'!\nnarrower\n\t\"Make me 5% narrower in my superView\"\n\tself transformUsing:[:ovp| ovp expandBy:(ovp width*0.05)negated@0]! !\n\n!View methodsFor: '*Ly experiments' stamp: 'ssa 3/12/2010 16:57'!\nshorter\n\t\"Make me 5% shorter in my superView\"\n\tself transformUsing:[:ovp| ovp expandBy:0@(ovp height*0.05)negated]! !\n\n!View methodsFor: '*Ly experiments' stamp: 'ssa 3/12/2010 16:57'!\ntaller\n\t\"Make me 5% taller in my superView\"\n\tself transformUsing:[:ovp| ovp expandBy:0@(ovp height*0.05)]! !\n\n!View methodsFor: '*Ly experiments' stamp: 'ssa 3/12/2010 17:43'!\ntransformUsing: aBlock\n\t\"self transformUsing: [:oldViewport |  ...return new viewport... ]  \"\n\t\"Change my viewport and update me on the display\"\n\t| ovp nvp ow |\n\tovp _ self viewport.\n\tow _ self getWindow.\n\tnvp _ aBlock value:ovp.\n\tself window: self window viewport: nvp.\n\tself moveFrom: ow.\n\tself unlock.! !\n\n!View methodsFor: '*Ly experiments' stamp: 'ssa 3/12/2010 16:55'!\nwider\n\t\"Make me 5% wider in my superView\"\n\tself transformUsing:[:ovp| ovp expandBy:(ovp width*0.05)@0]! !\n\n!View methodsFor: '*Interface-MSWLook'!\npercentContentVisible\n        \"Answer the percent of my content that is visible.  ssa 12/5/97 15:37\"\n\n        ^self visibleContentHeight / self totalContentHeight! !\n\n!View methodsFor: '*Interface-MSWLook'!\npercentPrecedingContent\n        \"Answer the percent of my content that not visible since it has been scrolled of the top of the screen.  ssa 12/5/97 15:37\"\n\n        ^0.0! !\n\n!View methodsFor: '*Interface-MSWLook'!\npercentPreceedingContent\n        \"Answer the percent of my content that not visible since it has been scrolled of the top of the screen.  ssa 12/5/97 15:37\"\n\n        ^0.0! !\n\n!View methodsFor: '*Interface-MSWLook'!\npercentVisibleContent\n        \"Answer the percent of my content that is visible.  ssa 12/5/97 15:37\"\n\n        ^self totalContentHeight = 0\n                ifTrue:[0.0]\n                ifFalse:[self visibleContentHeight / self totalContentHeight]! !\n\n!View methodsFor: '*Interface-MSWLook'!\ntotalContentHeight\n        \"Answer the height of my content, visible or not.  ssa 12/5/97 15:04\"\n\n        ^100 / self unitContentHeight! !\n\n!View methodsFor: '*Interface-MSWLook'!\nunitContentHeight\n        \"Answer the unit height of my content.  ssa 12/5/97 15:04\"\n\n        ^10.0! !\n\n!View methodsFor: '*Interface-MSWLook'!\nvisibleContentHeight\n        \"Answer the height of my visible content.  ssa 12/5/97 15:04\"\n\n        ^100 / self unitContentHeight! !\n\n!WeakArray class methodsFor: 'private' stamp: 'sm 2/24/2011 16:41'!\nrestartFinalizationProcess\n\t\"kill any old process, just in case\"\n\tFinalizationProcess\n\t\tifNotNil: [FinalizationProcess terminate.\n\t\t\tFinalizationProcess := nil].\n\n\t\"Check if Finalization is supported by this VM\"\n\tIsFinalizationSupported := nil.\n\tself isFinalizationSupported\n\t\tifFalse: [^ self].\n\n\tFinalizationSemaphore := Smalltalk specialObjectsArray at: 42.\n\tFinalizationDependents ifNil: [FinalizationDependents := WeakArray new: 10].\n\tFinalizationLock := Semaphore forMutualExclusion.\n\tFinalizationProcess := [self finalizationProcess]\n\t\tforkAt: Processor userInterruptPriority.\n\tFinalizationProcess name: 'WeakArray Finalization'.\n! !\n\n!Workspace methodsFor: 'menu commands' stamp: 'ssa 9/3/2008 10:48'!\naddModelItemsToWindowMenu: aMenu\n\t\"Add model-related items to the supplied window menu\"\n\n\taMenu addLine.\n\taMenu add: 'save contents to file...' target: self action: #saveContentsInFile.\n\taMenu addLine.\n! !\n\n!WriteStream methodsFor: '*SMark-printing' stamp: 'sm 5/25/2011 14:30'!\n<< aCollection\n\t\"we want a readable version of nextPutAll however it may be difficult to fully recreate nextPutAll:\n\tfor all the different types of stream. Rather then simply send to nextPutAll:\n\twe handle the String (or ByteArray) argument\n\tas fast as possible - the rest we delegate to putOn: This means that we handle single characters and bytes \n\twhereas nextPutAll: is only for sequencable collections.\n\t.\n\tNote this may not work in every case that nextPutAll: does subject to extensive testing, \n\tbut it should work in the important cases\"\n\n\t| newEnd |\n\tcollection class == aCollection class ifFalse:\n\t\t[ aCollection putOn: self. ^ self ].\n\n\tnewEnd := position + aCollection size.\n\tnewEnd > writeLimit ifTrue:\n\t\t[self growTo: newEnd + 10].\n\n\tcollection replaceFrom: position+1 to: newEnd  with: aCollection startingAt: 1.\n\tposition := newEnd.\n\n! !\n\r\r----STARTUP----#(14 August 2011 7:18:54 pm) as /Users/smarr/Projects/PhD/IBM/renaissance-image.git/awards-release.image!\r\r\rcondenseChanges\t\r\t\"Move all the changes onto a compacted sources file.\"\r\t\"Smalltalk condenseChanges!\r\r----QUIT----#(14 August 2011 7:19:37 pm) awards-release.image priorSource: 1985396!\n\n----STARTUP----#(15 August 2011 2:33:57 pm) as /Users/smarr/Projects/PhD/IBM/github-master/vm/src/from_squeak/iOS/vm/iPhone/iPhone.image!\n\n\n----QUIT----#(15 August 2011 2:34:20 pm) iPhone.image priorSource: 1985621!\n\n----STARTUP----#(15 August 2011 2:34:28 pm) as /Users/smarr/Projects/PhD/IBM/github-master/vm/src/from_squeak/iOS/vm/iPhone/iPhone.image!\n\n\n----QUIT----#(15 August 2011 2:34:50 pm) iPhone.image priorSource: 1985846!\n\n----STARTUP----#(15 August 2011 2:42:33 pm) as /Users/smarr/Projects/PhD/IBM/github-master/vm/src/from_squeak/iOS/vm/iPhone/iPhone.image!\n\n\n\"To activate the VM Monitors, enable Sampling in the RVM dashboard to the left\"\n\n\"Our canonical demo is a simulation of birds flying on the screen\"\n[Sly3Boids new run] fork.\n\n\"To stop them, deactivate Keep SlyBoids Flying in the dashboard to the left\"\n\n\"A brief introduction to Sly\"\n\n\"numbers and squaredNumbers are ensembles, denoted with the % sign. Sending a message to it will cause all members to evaluate the message\"\nnumbers := Sly3Ensemble withMembersFrom: {1. 2. 3. 4. 5}.\nsquaredNumbers := numbers squared. \"->  %{1. 4. 9. 16. 25. } \"\nRVMOperations coreCount!\n!RVMMonitor class methodsFor: 'user interface' stamp: 'sm 8/15/2011 14:50' prior: 34661352!\ndashboard\n\t\"RVMMonitor dashboard      \"   \n\t| topView samplingCheck turboCheck gcButton benchButton subViewCount sampleButton clearSamplesButton forgetButton shuffle56Button shuffle4Button multistripButton systemAspectsButton coreAspectsButton inspectSampleButton testAspectCheck spiderButton bytesUsedsSpiderButton delayTimingCheck recordingOptionsButton allToReadMostlyButton printAllHeapsButton printExecutionTraceButton printStackButton gridButton stripButton scanButton outlierButton locateClassesButton locatorButton locators4Button heartbeat spread56Button runningProcessesButton |\n\ttopView := RVMStandardSystemView new  .\n\ttopView borderWidth:1. \n\tsamplingCheck _ RVMCheckBoxView on: self label: 'Sampling' checkState: [self sampling] whenChecked: [self startSampling] whenUnchecked: [self stopSampling] monitor: true.\n\tturboCheck _ RVMCheckBoxView on: self label: 'Turbo' checkState: [self turboSampling] whenChecked: [self turboOn] whenUnchecked: [self turboOff] monitor: true.\n\ttestAspectCheck _ RVMCheckBoxView on: self label: 'Test Aspects' checkState: [self showTestAspects] whenChecked: [self showTestAspects:true] whenUnchecked: [self showTestAspects:false] monitor: true.\n\tdelayTimingCheck _ RVMCheckBoxView on: self label: 'Short Delay' checkState: [self delayTiming = #short] whenChecked: [self useShortDelay] whenUnchecked: [self useNormalDelay] monitor: true.\n\theartbeat _ RVMCheckBoxView on: self label: 'Heartbeat' checkState: [self showHeartbeat] whenChecked: [self startHeartbeat] whenUnchecked: [self stopHeartbeat] monitor: true.\n\tsampleButton _ RVMButtonView label:'Take Sample' action:[RVMMonitor getSample; informListeners].\n\tinspectSampleButton _ RVMButtonView label:'Inspect Sample' action:[Transcript show: 'CoreCount: ', (RVMOperations coreCount) asString . RVMMonitor lastSample inspect].\n\tclearSamplesButton _ RVMButtonView label:'Clear Samples' action:[RVMMonitor clearSamples].\n\trecordingOptionsButton _ RVMButtonView label:'Recording Options' action:[RVMMonitor recordingControls].\n\tforgetButton _ RVMButtonView label:'Forget Listeners' action:[RVMMonitor forgetListeners].\n\tgcButton _ RVMButtonView label:'GC' action:[Transcript cr show:'GC: ',Smalltalk garbageCollect printString].\n\tspread56Button _ RVMButtonView label:'Spread 56' action:[RVMOperations spreadFrom: 0 to: 55  moveRWtoRM: true moveRMtoRW: false].\n\tshuffle56Button _ RVMButtonView label:'Shuffle:56' action:[RVMOperations shuffle:56].\n\tshuffle4Button _ RVMButtonView label:'Shuffle:4' action:[RVMOperations shuffle:4].\n\tallToReadMostlyButton _ RVMButtonView label:'All->readMostly' action:[RVMOperations moveAllToReadMostlyHeaps].\n\tprintAllHeapsButton _ RVMButtonView label:'Print BytesUsed' action:[RVMOperations printAllHeapsBytesUsed].\n\tprintExecutionTraceButton _ RVMButtonView label:'Print Trace' action:[RVMOperations printExecutionTrace].\n\tprintStackButton _ RVMButtonView label:'Print Stack' action:[RVMOperations printStack].\n\tgridButton _ self relAbsButtonLabeled:'Tile Grid...' \n\t\t\t\t\trelAction:[RVMTileGridView example]\n\t\t\t\t\tabsAction:[RVMTileGridScalerView example].\n\tstripButton _ self relAbsButtonLabeled:'Tile Strip...' \n\t\t\t\t\trelAction:[RVMTileStripChartView example]\n\t\t\t\t\tabsAction:[RVMTileStripChartScalerView example].\n\tscanButton _ self relAbsButtonLabeled:'Tile Scan...' \n\t\t\t\t\trelAction:[RVMScanningStripChartView example]\n\t\t\t\t\tabsAction:[RVMAbsScanningStripChartView example].\n\tmultistripButton _ RVMButtonView label:'Multi Strip' action:[RVMCoreAspectTrace exampleView1].\n\tsystemAspectsButton _ RVMButtonView label:'System Aspects' action:[RVMAspectTrace monitorAllSystemAspects].\n\tcoreAspectsButton _ RVMButtonView label:'Core Aspects' action:[RVMCoreAspectTrace monitorAllCoreAspectsForCoreFromUser].\n\trunningProcessesButton _  RVMButtonView label:'Running Processes' action:[RVMAspectTrace exampleView8].\n\t\tspiderButton _ RVMButtonView label:'Kiviat' action:[RVMMultiKiviatView exampleBytecodesAndProcessesRunning].\n\tbytesUsedsSpiderButton _ RVMButtonView label:'heap size Kiviat' action:[RVMMultiKiviatView exampleBytesUsedTrioCommonPinned].\n\toutlierButton _ RVMButtonView label:'Outlier...' action:[RVMMonitor outlierFromUser].\n\tlocateClassesButton _ RVMButtonView label:'Class Locator' action:[RVMGroupLocatorView openOn: Smalltalk objectsSource:#allClasses labeled:'All Classes'].\n\tlocatorButton _ RVMButtonView label:'Group Locator' action:[RVMGroupLocatorView openWithSourceEditorOn: nil objectsSource:[Array allInstances]].\n\tlocators4Button _ RVMButtonView label:'4 Group Locator' action:[RVMMultiGroupLocatorView openOn: nil sources: {[String allInstances]. [Collection withAllSubclasses]. [Object withAllSubclasses]. [View allSubInstances]} colors: nil].\n\tbenchButton _ RVMButtonView label:'testCompiler' action:[Cursor wait showWhile:[RVMExperiment testCompiler]].\n\t\n\ttopView addSubView: samplingCheck.\n\ttopView addSubView:  turboCheck below:  samplingCheck.\n\ttopView addSubView:  testAspectCheck below:  turboCheck.\n\ttopView addSubView:  delayTimingCheck below:  testAspectCheck.\n\ttopView addSubView:  heartbeat below:  delayTimingCheck.\n\ttopView addSubView:  sampleButton below:  heartbeat.\n\ttopView addSubView:  inspectSampleButton below:  sampleButton.\n\ttopView addSubView:  clearSamplesButton below:  inspectSampleButton.\n\ttopView addSubView:  recordingOptionsButton below:  clearSamplesButton.\n\ttopView addSubView:  forgetButton below:  recordingOptionsButton.\n\ttopView addSubView:  gcButton below:  forgetButton.\n\ttopView addSubView:  spread56Button below:  gcButton.\n\ttopView addSubView:  shuffle56Button below:  spread56Button.\n\ttopView addSubView:  shuffle4Button below:  shuffle56Button.\n \ttopView addSubView:  allToReadMostlyButton below:  shuffle4Button.\n\ttopView addSubView:  printAllHeapsButton below:  allToReadMostlyButton.\n\ttopView addSubView:  printExecutionTraceButton below: printAllHeapsButton.\n\ttopView addSubView:  printStackButton below: printExecutionTraceButton.\n\ttopView addSubView:  gridButton below: printStackButton.\n\ttopView addSubView:  stripButton below: gridButton.\n\ttopView addSubView:  scanButton below: stripButton.\n\ttopView addSubView:  multistripButton below: scanButton.\n\ttopView addSubView:  systemAspectsButton below: multistripButton.\n\ttopView addSubView:  coreAspectsButton below: systemAspectsButton.\n\ttopView addSubView: runningProcessesButton below: coreAspectsButton.\n\ttopView addSubView:  spiderButton below: runningProcessesButton.\n\ttopView addSubView:  bytesUsedsSpiderButton below: spiderButton.\n\ttopView addSubView:  outlierButton below: bytesUsedsSpiderButton.\n\ttopView addSubView:  locateClassesButton below: outlierButton.\n\ttopView addSubView:  locatorButton below: locateClassesButton.\n\ttopView addSubView:  locators4Button below: locatorButton.\n\ttopView addSubView:  benchButton below: locators4Button.\n\ttopView label: 'RVM'.\n\tRVMMonitor forgetAll: topView allSubViews.\n\tRVMMonitor forget: topView.\n\tsubViewCount _ topView subViews size.\n\ttopView minimumSize: 120@(subViewCount*27).\n\ttopView maximumSize: topView minimumSize.\n\ttopView controller open! !\n\n----QUIT----#(15 August 2011 2:50:42 pm) iPhone.image priorSource: 1986063!"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/macintoshextra.c",
    "content": "/*\n *  macintoshextra.c\n *  Squeak iPhone\n *\n *  Created by John M McIntosh on 2/23/08.\n *  Copyright 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n *\n */\n\n\n\n#include \"macintoshextra.h\"\n#include <sys/syslimits.h>\n\n\nint ioFormPrint(int bitsAddr, int width, int height, int depth, double hScale, double vScale, int landscapeFlag) {\n\t/* experimental: print a form with the given bitmap, width, height, and depth at\n\t   the given horizontal and vertical scales in the given orientation\n           However John Mcintosh has introduced a printjob class and plugin to replace this primitive */\n#pragma unused( bitsAddr,  width,  height,  depth,  hScale,  vScale,  landscapeFlag)\n\treturn true;\n}\n\nvoid *ioFindExternalFunctionIn(char *lookupName, void *moduleHandle) {return 0;}\nvoid *ioLoadModule(char *pluginName) {return 0;}\nsqInt ioFreeModule(void *moduleHandle){return 0;}\n\nsqInt ioGetButtonState() {return 0;}\nsqInt ioGetKeystroke() {return -1;}\nsqInt ioMousePoint() {return 0;}\nsqInt ioPeekKeystroke() {return 0;}\n\nsqInt ioSetCursor( sqInt cursorBitsIndex, sqInt offsetX, sqInt offsetY) {return 0;}\nsqInt ioSetCursorWithMask( sqInt cursorBitsIndex, sqInt cursorMaskIndex, sqInt offsetX, sqInt offsetY) {return 0;}\nsqInt ioSetCursorARGB(sqInt cursorBitsIndex, sqInt extentX, sqInt extentY, sqInt offsetX, sqInt offsetY);\nsqInt ioSetCursorARGB(sqInt cursorBitsIndex, sqInt extentX, sqInt extentY, sqInt offsetX, sqInt offsetY) {return 0;}\t\n/* Retrieve the next input event from the OS. */\n\nsqInt ioSetDisplayMode( sqInt width, sqInt height, sqInt depth, sqInt fullscreenFlag) {return 0;}\n\n//int plugInTimeToReturn(void) {\n//    return false;\n//}\n\nint clearProfile(void){return 0;}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\nint dumpProfile(void){return 0;}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\nint startProfiling(void){return 0;}\t\t\t\t\t\t\t\t\t\t\t\t\t\nint stopProfiling(void)\t{return 0;}\t\t\t\n\nint plugInNotifyUser(char *msg);\nint plugInNotifyUser(char *msg) { return 0; }\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/macintoshextra.h",
    "content": "/*\n *  hydramacintoshextra.h\n *  SqueakHydraForCarbon\n *\n *  Created by John M McIntosh on 2/23/08.\n *  Copyright 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n *\n */\n#include \"sq.h\""
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/osExports.c",
    "content": "/* note: this file is only a backward compatible wrapper\n\n   for the old-style \"platform.exports\" definitions.\n\n   If your platform has migrated to the new exports\n\n   style you may as well insert the exports right here */\n\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n\n#include <stdio.h>\n\n\n/* duh ... this is ugly */\n\n#define XFN(export) {\"\", #export, (void*)export},\n\n#define XFN2(plugin, export) {#plugin, #export, (void*)plugin##_##export}\n\n\n\nvoid *os_exports[][3] = {\n\n\n\t{NULL, NULL, NULL}\n\n};\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/plugins/ClipboardExtended/sqMacExtendedClipboard.h",
    "content": "/*\n *  sqMacExtendedClipboard.h\n *  SqueakClipboardExtendedxcodeproj\n *\n *  Created by John Sterling Mcintosh on 4/21/06.\n *  Copyright 2006-2010 Corporate Smalltalk Consulting ltd. All rights reserved.\n *\n * Permission is hereby granted, free of charge, to any person\n *  obtaining a copy of this software and associated documentation\n *  files (the \"Software\"), to deal in the Software without\n *  restriction, including without limitation the rights to use,\n *  copy, modify, merge, publish, distribute, sublicense, and/or sell\n *  copies of the Software, and to permit persons to whom the\n *  Software is furnished to do so, subject to the following\n *  conditions:\n *  \n *  The above copyright notice and this permission notice shall be\n *  included in all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n *  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n *  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n *  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n *  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n *  OTHER DEALINGS IN THE SOFTWARE.\n *\n */\n/* The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n\nvoid sqPasteboardClear( void * inPasteboard );\nsqInt sqPasteboardGetItemCount ( void *inPasteboard );\nsqInt sqPasteboardCopyItemFlavorsitemNumber (  void *inPasteboard, sqInt formatNumber );\nvoid * sqCreateClipboard( void );\nvoid sqPasteboardPutItemFlavordatalengthformatTypeformatLength ( void *inPasteboard, char* inData, sqInt dataLength, char* format, sqInt formatLength);\nsqInt sqPasteboardCopyItemFlavorDataformatformatLength ( void* inPasteboard, char* format, sqInt formatLength);\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/plugins/ClipboardExtended/sqMacExtendedClipboard.m",
    "content": "/*\n *  sqMacExtendedClipboard.m\n *  SqueakClipboardExtendedxcodeproj\n *\n *  Created by John Sterling Mcintosh on 4/21/06.\n *  Copyright 2006-2010 Corporate Smalltalk Consulting ltd. All rights reserved.\n *\n * Permission is hereby granted, free of charge, to any person\n *  obtaining a copy of this software and associated documentation\n *  files (the \"Software\"), to deal in the Software without\n *  restriction, including without limitation the rights to use,\n *  copy, modify, merge, publish, distribute, sublicense, and/or sell\n *  copies of the Software, and to permit persons to whom the\n *  Software is furnished to do so, subject to the following\n *  conditions:\n *  \n *  The above copyright notice and this permission notice shall be\n *  included in all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n *  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n *  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n *  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n *  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n *  OTHER DEALINGS IN THE SOFTWARE.\n *\n */\n\n#include \"sqMacExtendedClipboard.h\"\n#import <UIKit/UIKit.h>\n\n\nextern struct VirtualMachine* interpreterProxy;\n\nvoid sqPasteboardClear(void *inPasteboard )\n{\n\tNSArray *arrayOfTypes = [[NSArray alloc] init];\n\t\n\t((UIPasteboard *) inPasteboard).items =  arrayOfTypes;\n\t[arrayOfTypes release];\n}\n\nsqInt sqPasteboardGetItemCount (void *inPasteboard )\n{\n\treturn [((UIPasteboard *)inPasteboard).items count];\n}\n\nsqInt sqPasteboardCopyItemFlavorsitemNumber (  void *inPasteboard, sqInt formatNumber )\n{\n\n\tsqInt formatTypeLength;\n\tsqInt flavorCount;\n\t\n\tflavorCount =  [[(UIPasteboard *)inPasteboard pasteboardTypes] count];\n\tif (formatNumber > flavorCount) {\n\t\treturn interpreterProxy->nilObject();\n\t}\n\t\n\tNSString *formatType = [[(UIPasteboard *)inPasteboard pasteboardTypes] objectAtIndex: formatNumber-1];\n\t\n\tconst char *utf8data = [formatType UTF8String];\n\tformatTypeLength = strlen(utf8data);\n\tsqInt outData = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), formatTypeLength);\n\tunsigned char* formatConverted = interpreterProxy->firstIndexableField(outData);\n\tmemcpy(formatConverted,utf8data,formatTypeLength);\n\t\n\treturn outData;\n}\n\nvoid * sqCreateClipboard( void )\n{\n\treturn (void*) [UIPasteboard generalPasteboard];\n}\n\nvoid sqPasteboardPutItemFlavordatalengthformatTypeformatLength ( void *inPasteboard, char* inData, sqInt dataLength, char* format, sqInt formatLength)\n{\t\n\tNSString *formatType = [[NSString alloc] initWithBytes: format length: formatLength encoding:  NSUTF8StringEncoding];\n\tNSData* data = [[NSData alloc ] initWithBytes: inData length: dataLength];\n\n\t[(UIPasteboard *)inPasteboard setData: data forPasteboardType: formatType];\n\n\t[data release];\n\t[formatType release];\n}\n\t\nsqInt sqPasteboardCopyItemFlavorDataformatformatLength ( void *inPasteboard, char* format, sqInt formatLength)\n{\n\tNSString *formatType = [[NSString alloc] initWithBytes: format length: formatLength encoding:  NSUTF8StringEncoding];\n\tNSData *dataBuffer = [(UIPasteboard *)inPasteboard dataForPasteboardType: formatType];\n\n\tif (dataBuffer == NULL) {\n\t\t[formatType  release];\n\t\treturn interpreterProxy->nilObject();\n\t}\t\t\n\tsqInt dataLength = [dataBuffer length];\n\tsqInt outData = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), dataLength );\n\tchar *outDataPtr = (char *) interpreterProxy->firstIndexableField(outData);\n\t[dataBuffer getBytes: outDataPtr];\n\n\t[formatType release];\n\treturn outData;\n}"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/plugins/HostWindowPlugin/sqMacHostWindow.c",
    "content": "/*\n *  sqMacHostWindow.c\n *  SqueakVMForCarbon\n *\n *  Created by John M McIntosh on Tue Jul 20 2004.\n *  Copyright Corporate Smalltalk Consulting Ltd 2008. All rights reserved.\n *\n\tJuly 15th 2005 add logic to flush QD buffers for os-x 10.4\n\t 3.8.15b3  Feb 19th, 2007 JMM add cursor set logic\n\tMay 15th, 2008 IPhone\n\n */\n/*\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n//\n\n#include \"sqVirtualMachine.h\"\n#include \"sqMacHostWindow.h\"\n#include <stdlib.h>\n\nextern struct VirtualMachine *interpreterProxy;\nsqInt RemoveWindowBlock(windowDescriptorBlock * thisWindow);\n\nsqInt createWindowWidthheightoriginXyattrlength(sqInt w,sqInt h,sqInt x,sqInt y,  char * list, sqInt listLength) {\n\treturn -1;\n}\n\nsqInt closeWindow(sqInt windowIndex) {\n\treturn 1;\n}\n\nsqInt ioPositionOfWindow(wIndexType windowIndex)\n{\n\tif (windowHandleFromIndex(windowIndex) == NULL)\n\t\treturn -1;\n\treturn (0 << 16) | (0 & 0xFFFF);  /* left is high 16 bits; top is low 16 bits */\n}\n\nsqInt ioPositionOfWindowSetxy(wIndexType windowIndex, sqInt x, sqInt y)\n{\n\treturn -1;\n}\n\nsqInt ioSizeOfWindow(wIndexType windowIndex)\n{\n\tsqInt w=0, h=0;\n\treturn (w << 16) | (h & 0xFFFF);  /* w is high 16 bits; h is low 16 bits */\n}\n\nint ioPositionOfNativeDisplay(unsigned long windowHandle)\n{\n\tsqInt w=0, h=0;\n\treturn (w << 16) | (h & 0xFFFF);  /* w is high 16 bits; h is low 16 bits */\n}\n\nsqInt ioSizeOfWindowSetxy(wIndexType windowIndex, sqInt x, sqInt y)\n{\n\treturn (0);  /* w is high 16 bits; h is low 16 bits */\n}\n\nsqInt ioSetTitleOfWindow(sqInt windowIndex, char * newTitle, sqInt sizeOfTitle) {\n\treturn 1;\n}\n\nsqInt ioCloseAllWindows(void) {\n\treturn 1;\n}\n\n\n\n/* addendum to sqPlatformSpecific.h */\n/* multiple host windows stuff */\n\nstatic windowDescriptorBlock *windowListRoot = NULL;\n\n/* end addendum to sqPlatformSpecific.h */\n\n/* simple linked list management code */\n/* window list management */\n\nwindowDescriptorBlock *windowBlockFromIndex(sqInt windowIndex) {\nwindowDescriptorBlock *entry;\n\tentry = windowListRoot;\n\twhile(entry) {\n\t\tif(entry->windowIndex == windowIndex) return entry;\n\t\tentry = entry->next;\n\t}\n\treturn NULL;\n}\n\nwindowDescriptorBlock *windowBlockFromHandle(wHandleType windowHandle) {\nwindowDescriptorBlock *entry;\n\tentry = windowListRoot;\n\twhile(entry) {\n\t\tif(entry->handle == windowHandle) return entry;\n\t\tentry = entry->next;\n\t}\n\treturn NULL;\n}\n\n\nwHandleType windowHandleFromIndex(sqInt windowIndex)  {\nwindowDescriptorBlock *entry;\n\tentry = windowListRoot;\n\twhile(entry) {\n\t\tif(entry->windowIndex == windowIndex) return entry->handle;\n\t\tentry = entry->next;\n\t}\n\treturn NULL;\n}\n\nsqInt windowIndexFromHandle(wHandleType windowHandle) {\nwindowDescriptorBlock *entry;\n\tentry = windowListRoot;\n\twhile(entry) {\n\t\tif(entry->handle == windowHandle) return entry->windowIndex;\n\t\tentry = entry->next;\n\t}\n\treturn 0;\n}\n\nsqInt windowIndexFromBlock( windowDescriptorBlock * thisWindow) {\nwindowDescriptorBlock *entry;\n\tentry = windowListRoot;\n\twhile(entry) {\n\t\tif(entry == thisWindow) return entry->windowIndex;\n\t\tentry = entry->next;\n\t}\n\treturn 0;\n}\n\nstatic sqInt nextIndex = 1; \n\nwindowDescriptorBlock *AddWindowBlock(void) {\n/* create a new entry in the linkedlist of windows.\n * If the calloc fails, return NULL which will then go back to the\n * prim and fail it cleanly.\n * Initialize the block to a sensible state\n */\nwindowDescriptorBlock *thisWindow;\n\n\tthisWindow = (windowDescriptorBlock*) calloc(1, sizeof(windowDescriptorBlock));\n\tif ( thisWindow == NULL) {\n\t\treturn NULL;\n\t}\n\tthisWindow->next = windowListRoot;\n\tthisWindow->windowIndex = nextIndex++;\n\tthisWindow->handle = NULL;\n\twindowListRoot = thisWindow;\n\n\treturn windowListRoot;\n}\n\n/*\n * RemoveWindowBlock:\n * Remove the given entry from the list of windows.\n * free it, if found.\n */\n sqInt RemoveWindowBlock(windowDescriptorBlock * thisWindow) {\nwindowDescriptorBlock *prevEntry;\n\n\n\t/* Unlink the entry from the module chain */\n\tif(thisWindow == windowListRoot) {\n\t\twindowListRoot = thisWindow->next;\n\t} else {\n\t\tprevEntry = windowListRoot;\n\t\twhile(prevEntry->next != thisWindow) {\n\t\t\tprevEntry = prevEntry->next;\n\t\t\tif (prevEntry == NULL) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\tprevEntry->next = thisWindow->next;\n\t}\n\tfree(thisWindow);\n\treturn 1;\n}\n\nsqInt getCurrentIndexInUse(void) {\n\treturn nextIndex-1;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/plugins/HostWindowPlugin/sqMacHostWindow.h",
    "content": "/*\n *  sqMacHostWindow.h\n *  SqueakVMForCarbon\n *\n *  Created by John M McIntosh on Tue Jul 20 2004.\n *\n \n   3.8.15b3  Feb 19th, 2007 JMM add cursor set logic\n   Altered for IPhone\n\n */\n/*\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#include \"HostWindowPlugin.h\"\n#ifdef BUILD_FOR_OSX\n#include <ApplicationServices/ApplicationServices.h>\n#else\n#include <CoreGraphics/CoreGraphics.h>\n#endif\n/* window handle type */\n#define wHandleType void *\n#define wIndexType sqInt \n\ntypedef struct windowDescriptorBlock {\n\tstruct windowDescriptorBlock * next;\n\twHandleType\t\thandle;\n\twIndexType\t\twindowIndex;\n\t/* extra fields to support your platform needs */\n\tvoid * context;\n\tCGRect\tupdateArea;\n\tsqInt\twidth;\n\tsqInt\theight;\n} windowDescriptorBlock;\n\nwindowDescriptorBlock *windowBlockFromHandle(wHandleType windowHandle);\nsqInt windowIndexFromBlock( windowDescriptorBlock * thisWindow);\nsqInt windowIndexFromHandle(wHandleType windowHandle);\nwHandleType windowHandleFromIndex(wIndexType windowIndex);\nwindowDescriptorBlock *AddWindowBlock(void);\nwindowDescriptorBlock *windowBlockFromIndex(sqInt windowIndex);\nsqInt getCurrentIndexInUse(void);\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/plugins/SqueakFFIPrims/dummyFFI.c",
    "content": "\n//\n//  dummyFFI.m\n//  SqueakNoOGLIPhone\n//\n//  Created by John M McIntosh on 5/15/08.\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\nCopyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\nMIT License\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n*/\n//\n#include <stdlib.h>\n#include \"dummyFFI.h\"\n#include \"sqFFI.h\"\n\n\nint ffiPushSignedByte(int value)\n{\nreturn 1;\n}\n\nint ffiPushUnsignedByte(int value)\n{\nreturn 1;\n}\n\nint ffiPushSignedShort(int value)\n{\n\nreturn 1;\n}\n\nint ffiPushUnsignedShort(int value)\n{\n\nreturn 1;\n}\n\nint ffiPushSignedInt(int value)\n{\n\nreturn 1;\n}\n\nint ffiPushUnsignedInt(int value)\n{\n\nreturn 1;\n}\n\n# define primitiveFail() 0\n\n\nint ffiPushSignedLongLong(int low, int high)\n{\nreturn primitiveFail();\n}\n\nint ffiPushUnsignedLongLong(int low, int high)\n{\nreturn primitiveFail();\n}\n\nint ffiPushSignedChar(int value)\n{\nreturn 1;\n}\n\nint ffiPushUnsignedChar(int value)\n{\nreturn 1;\n}\n\nint ffiPushBool(int value)\n{\nreturn 1;\n}\n\nint ffiPushSingleFloat(double value)\n{\nreturn 1;\n}\n\nint ffiPushDoubleFloat(double value)\n{\nreturn 1;\n}\n\n/*  ffiReturnFloatValue:\nReturn the value from a previous ffi call with float return type. */\ndouble ffiReturnFloatValue(void)\n{\nreturn 0;\n}\n\n/*  ffiLongLongResultLow:\nReturn the low 32bit from the 64bit result of a call to an external function */\nint ffiLongLongResultLow(void)\n{\nreturn 0;\n}\n\n\n/*  ffiLongLongResultHigh:\nReturn the high 32bit from the 64bit result of a call to an external function */\nint ffiLongLongResultHigh(void)\n{\nreturn 0;\n}\n\n/*  ffiStoreStructure:\nStore the structure result of a previous ffi call into the given address*/\nint ffiStoreStructure(int address, int structSize)\n{\nreturn 1;\n}\n\nint ffiCallAddressOfWithPointerReturn(int fn, int callType) \n{\n\treturn 0;\n}\nint ffiPushStringOfLength(int srcIndex, int length)\n{\n\treturn 0;\n}\n\nint ffiAlloc(int byteSize)\n{\n\treturn (int)malloc((unsigned) byteSize);\n}\n\n\nint ffiFree(int ptr)\n{\n\tif (ptr) free((void *)ptr);\n\treturn 1;\n}\n\nint ffiInitialize(void) {\n\treturn 1;\n}\n\nint ffiCallAddressOfWithStructReturn(int fn, int callType, \nint *structSpec, int specSize)\n{\n\treturn 0;\n}\n\nint ffiCallAddressOfWithReturnType(int fn, int callType, int typeSpec)\n{\nreturn 0;\n}\n\nint ffiCanReturn(int *structSpec, int specSize) \n{\nreturn 0;\n}\n\n/*  ffiCleanup:\n Cleanup after a foreign function call has completed.\n The generic support code only frees the temporarily\n allocated strings. */\nint ffiCleanup(void)\n{\n\treturn 0;\n}\n\n/*  ffiSupportsCallingConvention:\n Return true if the support code supports the given calling convention */\nint ffiSupportsCallingConvention(int callType)\n{\n\treturn 0;\n}\n\nint ffiPushStructureOfLength(int pointer, int* structSpec, int structSize)\n{\n\treturn 0;\n}\nint ffiPushPointer(int pointer)\n{\n\treturn 0;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/plugins/SqueakFFIPrims/dummyFFI.h",
    "content": "/*\n *  dummyFFI.h\n *  SqueakNoOGLIPhone\n *\n *  Created by John M McIntosh on 10/24/08.\n *\n */\n/*\nSome of this code was funded via a grant from the European Smalltalk User Group (ESUG)\nCopyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\nMIT License\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n*/"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/sqConfig.h",
    "content": "/* sqConfig.h -- platform identification and configuration */\n\n  /* For Apple's OS X */\n#define macintoshSqueak 1\n\n# if defined(SQ_CONFIG_DONE)\n#   error configuration conflict\n# endif\n# define SQ_CONFIG_DONE\n\n#if !defined(SQ_CONFIG_DONE)\n# error test for, and describe, your architecture here.\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/sqDummyaio.c",
    "content": "/*\n *  sqDummyaio.c\n *  SqueakNoOGLIPhone\n *\n *  Created by John M McIntosh on 5/29/08.\n */\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n *  Copyright 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n *\n *   Small parts of this code is \n *   Copyright (C) 1996-2007 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n \n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n\n#include \"sq.h\"\n#include \"sqDummyaio.h\"\n\n\nint aioPoll(int microSeconds) {\n\treturn 0;\n}\n\nvoid aioInit(void) {\n\n}\n\n/* sleep for microSeconds*/\n\nint aioSleep(int microSeconds)\n{\n#if defined(HAVE_NANOSLEEP)\n\tif (microSeconds < (1000000/60))\t/* < 1 timeslice? */\n\t{\n\t\tint error;\n\t\tstruct timespec rqtp= { 0, microSeconds * 1000 };\n\t\tstruct timespec rmtp;\n\t\terror = nanosleep(&rqtp, &rmtp);\n\t\tif (error == -1) {\n\t\t\twhy := errno;\n\t\t}\n\t}\n#endif\n\treturn 0;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/sqDummyaio.h",
    "content": "/*\n *  sqDummyaio.h\n *  SqueakNoOGLIPhone\n *\n *  Created by John M McIntosh on 5/29/08.\n *\n */\n\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n\n\nint aioPoll(int microSeconds);\nvoid aioInit(void);\nint aioSleep(int microSeconds);\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/sqMacV2Memory.c",
    "content": "/****************************************************************************\n *   PROJECT:  allocate memory from somewhere for the image\n *   FILE:    sqMacV2Memory.c\n *   CONTENT: \n *\n *   AUTHOR:  John McIntosh.\n *   ADDRESS: \n *   EMAIL:   johnmci@smalltalkconsulting.com\n *   RCSID:   \n *\n *   NOTES: \n \n *****************************************************************************/\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n\n #include \"sq.h\" \n #include \"sqMacV2Memory.h\"\n #include <sys/mman.h>\n#include <errno.h>\n#include <sys/stat.h>\n#include <unistd.h>\n\n extern usqInt  gMaxHeapSize;\n extern int gSqueakUseFileMappedMMAP;\n static usqInt\tgHeapSize;\n static  void *startOfmmapForANONMemory,*startOfmmapForImageFile;\n static \t size_t fileRoundedUpToPageSize,freeSpaceRoundedUpToPageSize;\n#if defined(SQ_HOST64) && defined(SQ_IMAGE32)\n__attribute__ ((visibility(\"default\"))) char * sqMemoryBase=0;\n#endif\n\n /* compute the desired memory allocation */\n \n#if !STACKVM\nextern usqInt memory;\n#else\nusqInt\tmemory;\n#endif \n\n usqInt\tsqGetAvailableMemory() {\n#if COGVM\n\t return gMaxHeapSize - 25*1024*1024;\n#else\n\t return gMaxHeapSize;\n#endif\n }\n \nstatic size_t pageSize;\nstatic size_t pageMask;\n\n usqInt sqAllocateMemoryMac(usqInt desiredHeapSize, sqInt minHeapSize, FILE * f,usqInt headersize) {\n\t void  *possibleLocation,*startOfAnonymousMemory;\n\t off_t fileSize;\n\t struct stat sb;\n\t pageSize= getpagesize();\n\t pageMask= ~(pageSize - 1);\n\t \n\t#define valign(x)\t((x) & pageMask)\n\t#pragma unused(minHeapSize,desiredHeapSize)\n\t \n\t possibleLocation = (void*) (500*1024*1024);\n\t gHeapSize = gMaxHeapSize;\n\t if (desiredHeapSize > gHeapSize) \n\t\t return 0;\n\n\tif (gSqueakUseFileMappedMMAP) {\n\t\t/* Lets see about mmap the image file into a chunk of memory at the 500MB boundary rounding up to the page size\n\t  Then we on the next page anonymously allocate the required free space for young space*/\n\t \n\t /* Thanks to David Pennell for suggesting this */\n\t \n\t fstat(fileno((FILE *)f), &sb);\n\t fileSize = sb.st_size;\n\t fileRoundedUpToPageSize = valign(fileSize+pageSize-1);\t \n\t startOfmmapForImageFile = mmap(possibleLocation, fileRoundedUpToPageSize, PROT_READ|PROT_WRITE, MAP_FILE|MAP_PRIVATE,fileno((FILE *)f), (off_t)0);\n\t \n\t if (startOfmmapForImageFile != possibleLocation) {\n\t\t /* This isn't a failure case, let's continue and see what happens */\n\t\t /* Before we would bail, but on 4GB macs with 27 apps running it might not allow 500MB boundary, so let it suggest one and live with it */\n\t\t \n\t\t possibleLocation = startOfmmapForImageFile;\n\t }\n\t \n\t startOfAnonymousMemory = (void *) ((size_t) fileRoundedUpToPageSize + (size_t) possibleLocation);\n\t freeSpaceRoundedUpToPageSize = valign(gMaxHeapSize)-fileRoundedUpToPageSize+pageSize;\n\t startOfmmapForANONMemory = mmap(startOfAnonymousMemory, freeSpaceRoundedUpToPageSize, PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED,0,(off_t)0);\n\t \n\t if (startOfmmapForANONMemory != startOfAnonymousMemory) {\n\t\t fprintf(stderr, \"errno %d\\n\", errno);\n\t\t perror(\"startOfmmapForANONMemory failed\");\n\t\t exit(42);\n\t }\n#if defined(SQ_HOST64) && defined(SQ_IMAGE32)\n\t\tsqMemoryBase= (char*)startOfmmapForImageFile+headersize;\n\t\treturn 0;\n#else\n\t\treturn (usqInt) (char*)startOfmmapForImageFile+headersize; \n#endif\n\t} else {\n\t\tvoid * debug, *actually;\n\t\tdebug = mmap( possibleLocation, gMaxHeapSize+pageSize, PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED,-1,0);\n\t\tif(debug == MAP_FAILED) {\n\t\t\tfprintf(stderr, \"errno %d\\n\", errno);\n\t\t\tperror(\"mmap failed\");\n\t\t\texit(42);\n\t\t}\n\t\tactually = (char*) debug+pageSize-1;\n\t\tactually = (void*) (((size_t) actually) & pageMask);\n#if defined(SQ_HOST64) && defined(SQ_IMAGE32)\n\t\tsqMemoryBase= actually;\n\t\treturn 0;\n#else\n\t\treturn memory = (usqInt) actually;\n#endif\n\t}\n }\n \nsqInt sqGrowMemoryBy(sqInt memoryLimit, sqInt delta) {\n\tif ((usqInt) memoryLimit + (usqInt) delta - (usqInt) memory > gMaxHeapSize)\n\t\t\treturn memoryLimit;\n\n\tgHeapSize += delta;\n\treturn memoryLimit + delta;\n }\n \nsqInt sqShrinkMemoryBy(sqInt memoryLimit, sqInt delta) {\n\t return sqGrowMemoryBy(memoryLimit,0-delta);\n}\n\nsqInt sqMemoryExtraBytesLeft(sqInt includingSwap) {\n\treturn gMaxHeapSize - gHeapSize;\n}\n\nvoid sqMacMemoryFree() {\n\tif (gSqueakUseFileMappedMMAP) {\n\t\tmunmap(startOfmmapForImageFile,fileRoundedUpToPageSize);\n\t\tmunmap(startOfmmapForANONMemory,freeSpaceRoundedUpToPageSize);\n\t}\n}\n\n#ifdef BUILD_FOR_OSX\nsize_t sqImageFileReadEntireImage(void *ptr, size_t elementSize, size_t count, sqImageFile f) {\n\tif (gSqueakUseFileMappedMMAP) \n\t\treturn count;\n\treturn sqImageFileRead(ptr, elementSize, count, f); \n}\n#endif\n\n#if COGVM\n# define roundDownToPageBoundary(v) ((v)&pageMask)\n# define roundUpToPageBoundary(v) (((v)+pageSize-1)&pageMask)\nvoid\nsqMakeMemoryExecutableFromTo(unsigned long startAddr, unsigned long endAddr)\n{\n\tunsigned long firstPage = roundDownToPageBoundary(startAddr);\n\tif (mprotect((void *)firstPage,\n\t\t\t\t roundUpToPageBoundary(endAddr - firstPage),\n\t\t\t\t PROT_READ | PROT_WRITE | PROT_EXEC) < 0)\n\t\tperror(\"mprotect(x,y,PROT_READ | PROT_WRITE | PROT_EXEC)\");\n}\n\nvoid\nsqMakeMemoryNotExecutableFromTo(unsigned long startAddr, unsigned long endAddr)\n{\n\tunsigned long firstPage = roundDownToPageBoundary(startAddr);\n\tif (mprotect((void *)firstPage,\n\t\t\t\t roundUpToPageBoundary(endAddr - firstPage),\n\t\t\t\t PROT_READ | PROT_WRITE) < 0)\n\t\tperror(\"mprotect(x,y,PROT_READ | PROT_WRITE)\");\n}\n#endif /* COGVM */"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/sqMacV2Memory.h",
    "content": "/****************************************************************************\n*   PROJECT: Squeak Headers\n*   FILE:    sqMacV2Memory.h\n*   CONTENT: \n*\n*   AUTHOR:  John McIntosh.\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:  \n*\n*   NOTES: \n****************************************************************************/\n\n/*\n Some of this code was funded via a grant from the European Smalltalk User Group (ESUG)\n Copyright (c) 2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nThe end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n\"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \nand its contributors\", in the same place and form as other third-party acknowledgments. \nAlternately, this acknowledgment may appear in the software itself, in the same form and location as other \nsuch third-party acknowledgments.\n*///\n\nusqInt\tsqGetAvailableMemory(void);\nvoid\tsqMacMemoryFree(void);\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/iPhone/sqPlatformSpecific.h",
    "content": "/****************************************************************************\n*   PROJECT: Platform-specific prototypes and definitions for the iPhone\n*   FILE:    sqPlatformSpecific.h\n*   CONTENT: \n*\n*   AUTHOR:  John McIntosh\n*   ADDRESS: \n*   EMAIL:   johnmci@smalltalkconsulting.com\n*   RCSID:   \n \n   How to use this file:\n   This file is for general platform-specific macros and declarations.\n   Function prototypes that are unlikely to introduce name conflicts on\n   other platforms can be added directly. Macro re-definitions or conflicting\n   function prototypes can be wrapped in a #ifdefs. Alternatively, a customized\n   version of this file can be used on that platform. The goal is to keep all\n   the other header files generic across platforms. To override a definition or\n   macro from sq.h, you must first #undef it, then provide the new definition.\n   \n   Define plugin for Netscape Plugin building, needed for CodeWarrior\n*/\n/*\n Copyright (c) 2000-2008 Corporate Smalltalk Consulting Ltd. All rights reserved.\n MIT License\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n \n The end-user documentation included with the redistribution, if any, must include the following acknowledgment: \n \"This product includes software developed by Corporate Smalltalk Consulting Ltd (http://www.smalltalkconsulting.com) \n and its contributors\", in the same place and form as other third-party acknowledgments. \n Alternately, this acknowledgment may appear in the software itself, in the same form and location as other \n such third-party acknowledgments.\n */\n//\n\n#ifdef macintoshSqueak\n//#define SQUEAK_BUILTIN_PLUGIN\n#define ENABLE_URL_FETCH\n/* replace the image file manipulation macros with functions */\n\n\n#undef sqAllocateMemory\n\n//64bit function pointers undef\n#undef dispatchFunctionPointer\n#undef dispatchFunctionPointerOnin\n\n#undef squeakFileOffsetType\n#define squeakFileOffsetType off_t\n#include <unistd.h>\n\n#undef sqFTruncate\n#define sqFTruncate(f,o) ftruncate(fileno(f), o)\n#define ftell ftello\n#define fseek fseeko\n//int\t ftruncate(int, off_t);\n\n#undef sqFilenameFromStringOpen\n#undef sqFilenameFromString\nvoid\t\tsqFilenameFromStringOpen(char *buffer,sqInt fileIndex, long fileLength);\nvoid\t\tsqFilenameFromString(char *buffer,sqInt fileIndex, long fileLength);\n#undef allocateMemoryMinimumImageFileHeaderSize\n#undef sqImageFileReadEntireImage\nusqInt sqAllocateMemoryMac(usqInt desiredHeapSize,sqInt minHeapSize, FILE * f,usqInt headersize);\n#define allocateMemoryMinimumImageFileHeaderSize(heapSize, minimumMemory, fileStream, headerSize) \\\nsqAllocateMemoryMac(heapSize, minimumMemory, fileStream, headerSize)\n\n#ifdef BUILD_FOR_OSX\nsize_t sqImageFileReadEntireImage(void *ptr, size_t elementSize, size_t count, FILE * f);\n#define sqImageFileReadEntireImage(memoryAddress, elementSize,  length, fileStream) \\\nsqImageFileReadEntireImage(memoryAddress, elementSize, length, fileStream)\n#else\n#define sqImageFileReadEntireImage(memoryAddress, elementSize,  length, fileStream) length \n#endif\n\n#undef ioMSecs\n#define ioUtcWithOffset ioUtcWithOffset\n\n/* macro to return from interpret() loop in browser plugin VM */\n#define ReturnFromInterpret() return 0\n\n/* undef the memory routines for our logic */\n#undef sqGrowMemoryBy\n#undef sqShrinkMemoryBy\n#undef sqMemoryExtraBytesLeft\n\nsqInt sqGrowMemoryBy(sqInt memoryLimit, sqInt delta);\nsqInt sqShrinkMemoryBy(sqInt memoryLimit, sqInt delta);\nsqInt sqMemoryExtraBytesLeft(sqInt includingSwap);\n\n    #undef insufficientMemorySpecifiedError\n    #undef insufficientMemoryAvailableError\n    #undef unableToReadImageError\nint plugInNotifyUser(char *msg);\n    #define insufficientMemorySpecifiedError() plugInNotifyUser(\"The amount of memory specified by the Setting Slider is not enough for the installed Squeak image file.\")\n    #define insufficientMemoryAvailableError() plugInNotifyUser(\"There is not enough memory to give Squeak the amount specified by the Setting Slider\")\n    #define unableToReadImageError() plugInNotifyUser(\"Read failed or premature end of image file\")\n\t#undef browserPluginReturnIfNeeded\n\tint plugInTimeToReturn(void);\n\t#define browserPluginReturnIfNeeded() if (plugInTimeToReturn()) {ReturnFromInterpret();}\n\nsqInt ioSetCursorARGB(sqInt cursorBitsIndex, sqInt extentX, sqInt extentY, sqInt offsetX, sqInt offsetY);\n\n#if COGVM\nextern void sqMakeMemoryExecutableFromTo(unsigned long, unsigned long);\nextern void sqMakeMemoryNotExecutableFromTo(unsigned long, unsigned long);\n\nextern int isCFramePointerInUse(void);\n#endif\n\n/* Thread support for thread-safe signalSemaphoreWithIndex and/or the COGMTVM */\n#if STACKVM\n# define sqLowLevelYield() sched_yield()\n# include <pthread.h>\n# define sqOSThread pthread_t\n/* these are used both in the STACKVM & the COGMTVM */\n# define ioOSThreadsEqual(a,b) pthread_equal(a,b)\n# define ioCurrentOSThread() pthread_self()\n# if COGMTVM\n/* Please read the comment for CogThreadManager in the VMMaker package for\n * documentation of this API.\n */\ntypedef struct {\n    pthread_cond_t\tcond;\n    pthread_mutex_t mutex;\n    int\t\t\t\tcount;\n} sqOSSemaphore;\n#  define ioDestroyOSSemaphore(ptr) 0\n#  if !ForCOGMTVMImplementation /* this is a read-only export */\nextern const pthread_key_t tltiIndex;\n#  endif\n#  define ioGetThreadLocalThreadIndex() ((long)pthread_getspecific(tltiIndex))\n#  define ioSetThreadLocalThreadIndex(v) (pthread_setspecific(tltiIndex,(void*)(v)))\n#  define ioOSThreadIsAlive(thread) (pthread_kill(thread,0) == 0)\n#  define ioTransferTimeslice() sched_yield()\n#  define ioMilliSleep(ms) usleep((ms) * 1000)\n# endif /* COGMTVM */\n#endif /* STACKVM */\n\n// From Joshua Gargus, for XCode 3.1\n#ifdef __GNUC__\n# undef EXPORT\n# define EXPORT(returnType) __attribute__((visibility(\"default\"))) returnType\n//# define VM_LABEL(foo) asmXXX(\"\\n.globl L\" #foo \"\\nL\" #foo \":\")\n# define VM_LABEL(foo)  \n#endif\n\n#if !defined(VM_LABEL) || COGVM\n# undef VM_LABEL\n# define VM_LABEL(foo) 0\n#endif\n\n#endif /* macintoshSqueak */\n\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/sqGnu.h",
    "content": "/* Definitions for \"gnuified\" interp.c\n * \n *   Copyright (C) 1996 1997 1998 1999 2000 2001 Ian Piumarta and individual\n *      authors/contributors listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   This file is distributed in the hope that it will be useful, but WITHOUT\n *   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n *   FITNESS FOR A PARTICULAR PURPOSE.\n *   \n *   You may use and/or distribute this file ONLY as part of Squeak, under\n *   the terms of the Squeak License as described in `LICENSE' in the base of\n *   this distribution, subject to the following restrictions:\n * \n *   1. The origin of this software must not be misrepresented; you must not\n *      claim that you wrote the original software.  If you use this software\n *      in a product, an acknowledgment to the original author(s) (and any\n *      other contributors mentioned herein) in the product documentation\n *      would be appreciated but is not required.\n * \n *   2. This notice may not be removed or altered in any source distribution.\n * \n *   Using or modifying this file for use in any context other than Squeak\n *   changes these copyright conditions.  Read the file `COPYING' in the base\n *   of the distribution before proceeding with any such use.\n * \n *   You are STRONGLY DISCOURAGED from distributing a modified version of\n *   this file under its original name without permission.  If you must\n *   change it, rename it first.\n */\n\n/* Author: Ian.Piumarta@inria.fr\n *\n * Last edited: Fri Aug 11 08:20:28 2000 by piumarta (Ian Piumarta) on emilia\n * April 17th, 2002, John M McIntosh use jumptable register logic for PPC\n * Feb 23rd, 2006, John M McIntosh watch usage of __Apple__ also Ian's changes for GCC i386\n * December 10th 2008, Eliot Miranda, updated with FP_REG and use of GIV() for\n *      the global struct.\n *\n * NOTES:\n *\tthis file is #included IN PLACE OF sq.h\n */\n\n#include \"sq.h\"\n\n#define CASE(N)\t\tcase N: _##N:\n\n#if defined(__powerpc__) || defined(PPC) || defined(_POWER) || defined(_IBMR2) || defined(__ppc__)\n# define JUMP_TABLE_PTR\t; register void **jumpTableP JP_REG; jumpTableP= &jumpTable[0]\n# define BREAK\t\tgoto *jumpTableP[currentBytecode]\n#else\n# define JUMP_TABLE_PTR\n# define BREAK\t\tgoto *jumpTable[currentBytecode]\n#endif\n\n#if defined(SQ_USE_GLOBAL_STRUCT)\n# define PRIM_DISPATCH\tgoto *jumpTable[GIV(primitiveIndex)]\n#else\n# define PRIM_DISPATCH\tgoto *jumpTable[primitiveIndex]\n#endif\n\n#define JUMP_TABLE \\\n  static void *jumpTable[256]= { \\\n      &&_0,   &&_1,   &&_2,   &&_3,   &&_4,   &&_5,   &&_6,   &&_7,   &&_8,   &&_9, \\\n     &&_10,  &&_11,  &&_12,  &&_13,  &&_14,  &&_15,  &&_16,  &&_17,  &&_18,  &&_19, \\\n     &&_20,  &&_21,  &&_22,  &&_23,  &&_24,  &&_25,  &&_26,  &&_27,  &&_28,  &&_29, \\\n     &&_30,  &&_31,  &&_32,  &&_33,  &&_34,  &&_35,  &&_36,  &&_37,  &&_38,  &&_39, \\\n     &&_40,  &&_41,  &&_42,  &&_43,  &&_44,  &&_45,  &&_46,  &&_47,  &&_48,  &&_49, \\\n     &&_50,  &&_51,  &&_52,  &&_53,  &&_54,  &&_55,  &&_56,  &&_57,  &&_58,  &&_59, \\\n     &&_60,  &&_61,  &&_62,  &&_63,  &&_64,  &&_65,  &&_66,  &&_67,  &&_68,  &&_69, \\\n     &&_70,  &&_71,  &&_72,  &&_73,  &&_74,  &&_75,  &&_76,  &&_77,  &&_78,  &&_79, \\\n     &&_80,  &&_81,  &&_82,  &&_83,  &&_84,  &&_85,  &&_86,  &&_87,  &&_88,  &&_89, \\\n     &&_90,  &&_91,  &&_92,  &&_93,  &&_94,  &&_95,  &&_96,  &&_97,  &&_98,  &&_99, \\\n    &&_100, &&_101, &&_102, &&_103, &&_104, &&_105, &&_106, &&_107, &&_108, &&_109, \\\n    &&_110, &&_111, &&_112, &&_113, &&_114, &&_115, &&_116, &&_117, &&_118, &&_119, \\\n    &&_120, &&_121, &&_122, &&_123, &&_124, &&_125, &&_126, &&_127, &&_128, &&_129, \\\n    &&_130, &&_131, &&_132, &&_133, &&_134, &&_135, &&_136, &&_137, &&_138, &&_139, \\\n    &&_140, &&_141, &&_142, &&_143, &&_144, &&_145, &&_146, &&_147, &&_148, &&_149, \\\n    &&_150, &&_151, &&_152, &&_153, &&_154, &&_155, &&_156, &&_157, &&_158, &&_159, \\\n    &&_160, &&_161, &&_162, &&_163, &&_164, &&_165, &&_166, &&_167, &&_168, &&_169, \\\n    &&_170, &&_171, &&_172, &&_173, &&_174, &&_175, &&_176, &&_177, &&_178, &&_179, \\\n    &&_180, &&_181, &&_182, &&_183, &&_184, &&_185, &&_186, &&_187, &&_188, &&_189, \\\n    &&_190, &&_191, &&_192, &&_193, &&_194, &&_195, &&_196, &&_197, &&_198, &&_199, \\\n    &&_200, &&_201, &&_202, &&_203, &&_204, &&_205, &&_206, &&_207, &&_208, &&_209, \\\n    &&_210, &&_211, &&_212, &&_213, &&_214, &&_215, &&_216, &&_217, &&_218, &&_219, \\\n    &&_220, &&_221, &&_222, &&_223, &&_224, &&_225, &&_226, &&_227, &&_228, &&_229, \\\n    &&_230, &&_231, &&_232, &&_233, &&_234, &&_235, &&_236, &&_237, &&_238, &&_239, \\\n    &&_240, &&_241, &&_242, &&_243, &&_244, &&_245, &&_246, &&_247, &&_248, &&_249, \\\n    &&_250, &&_251, &&_252, &&_253, &&_254, &&_255 \\\n  } JUMP_TABLE_PTR\n\n#define PRIM_TABLE \\\n  static void *jumpTable[700]= { \\\n      &&_0,   &&_1,   &&_2,   &&_3,   &&_4,   &&_5,   &&_6,   &&_7,   &&_8,   &&_9, \\\n     &&_10,  &&_11,  &&_12,  &&_13,  &&_14,  &&_15,  &&_16,  &&_17,  &&_18,  &&_19, \\\n     &&_20,  &&_21,  &&_22,  &&_23,  &&_24,  &&_25,  &&_26,  &&_27,  &&_28,  &&_29, \\\n     &&_30,  &&_31,  &&_32,  &&_33,  &&_34,  &&_35,  &&_36,  &&_37,  &&_38,  &&_39, \\\n     &&_40,  &&_41,  &&_42,  &&_43,  &&_44,  &&_45,  &&_46,  &&_47,  &&_48,  &&_49, \\\n     &&_50,  &&_51,  &&_52,  &&_53,  &&_54,  &&_55,  &&_56,  &&_57,  &&_58,  &&_59, \\\n     &&_60,  &&_61,  &&_62,  &&_63,  &&_64,  &&_65,  &&_66,  &&_67,  &&_68,  &&_69, \\\n     &&_70,  &&_71,  &&_72,  &&_73,  &&_74,  &&_75,  &&_76,  &&_77,  &&_78,  &&_79, \\\n     &&_80,  &&_81,  &&_82,  &&_83,  &&_84,  &&_85,  &&_86,  &&_87,  &&_88,  &&_89, \\\n     &&_90,  &&_91,  &&_92,  &&_93,  &&_94,  &&_95,  &&_96,  &&_97,  &&_98,  &&_99, \\\n    &&_100, &&_101, &&_102, &&_103, &&_104, &&_105, &&_106, &&_107, &&_108, &&_109, \\\n    &&_110, &&_111, &&_112, &&_113, &&_114, &&_115, &&_116, &&_117, &&_118, &&_119, \\\n    &&_120, &&_121, &&_122, &&_123, &&_124, &&_125, &&_126, &&_127, &&_128, &&_129, \\\n    &&_130, &&_131, &&_132, &&_133, &&_134, &&_135, &&_136, &&_137, &&_138, &&_139, \\\n    &&_140, &&_141, &&_142, &&_143, &&_144, &&_145, &&_146, &&_147, &&_148, &&_149, \\\n    &&_150, &&_151, &&_152, &&_153, &&_154, &&_155, &&_156, &&_157, &&_158, &&_159, \\\n    &&_160, &&_161, &&_162, &&_163, &&_164, &&_165, &&_166, &&_167, &&_168, &&_169, \\\n    &&_170, &&_171, &&_172, &&_173, &&_174, &&_175, &&_176, &&_177, &&_178, &&_179, \\\n    &&_180, &&_181, &&_182, &&_183, &&_184, &&_185, &&_186, &&_187, &&_188, &&_189, \\\n    &&_190, &&_191, &&_192, &&_193, &&_194, &&_195, &&_196, &&_197, &&_198, &&_199, \\\n    &&_200, &&_201, &&_202, &&_203, &&_204, &&_205, &&_206, &&_207, &&_208, &&_209, \\\n    &&_210, &&_211, &&_212, &&_213, &&_214, &&_215, &&_216, &&_217, &&_218, &&_219, \\\n    &&_220, &&_221, &&_222, &&_223, &&_224, &&_225, &&_226, &&_227, &&_228, &&_229, \\\n    &&_230, &&_231, &&_232, &&_233, &&_234, &&_235, &&_236, &&_237, &&_238, &&_239, \\\n    &&_240, &&_241, &&_242, &&_243, &&_244, &&_245, &&_246, &&_247, &&_248, &&_249, \\\n    &&_250, &&_251, &&_252, &&_253, &&_254, &&_255, &&_256, &&_257, &&_258, &&_259, \\\n    &&_260, &&_261, &&_262, &&_263, &&_264, &&_265, &&_266, &&_267, &&_268, &&_269, \\\n    &&_270, &&_271, &&_272, &&_273, &&_274, &&_275, &&_276, &&_277, &&_278, &&_279, \\\n    &&_280, &&_281, &&_282, &&_283, &&_284, &&_285, &&_286, &&_287, &&_288, &&_289, \\\n    &&_290, &&_291, &&_292, &&_293, &&_294, &&_295, &&_296, &&_297, &&_298, &&_299, \\\n    &&_300, &&_301, &&_302, &&_303, &&_304, &&_305, &&_306, &&_307, &&_308, &&_309, \\\n    &&_310, &&_311, &&_312, &&_313, &&_314, &&_315, &&_316, &&_317, &&_318, &&_319, \\\n    &&_320, &&_321, &&_322, &&_323, &&_324, &&_325, &&_326, &&_327, &&_328, &&_329, \\\n    &&_330, &&_331, &&_332, &&_333, &&_334, &&_335, &&_336, &&_337, &&_338, &&_339, \\\n    &&_340, &&_341, &&_342, &&_343, &&_344, &&_345, &&_346, &&_347, &&_348, &&_349, \\\n    &&_350, &&_351, &&_352, &&_353, &&_354, &&_355, &&_356, &&_357, &&_358, &&_359, \\\n    &&_360, &&_361, &&_362, &&_363, &&_364, &&_365, &&_366, &&_367, &&_368, &&_369, \\\n    &&_370, &&_371, &&_372, &&_373, &&_374, &&_375, &&_376, &&_377, &&_378, &&_379, \\\n    &&_380, &&_381, &&_382, &&_383, &&_384, &&_385, &&_386, &&_387, &&_388, &&_389, \\\n    &&_390, &&_391, &&_392, &&_393, &&_394, &&_395, &&_396, &&_397, &&_398, &&_399, \\\n    &&_400, &&_401, &&_402, &&_403, &&_404, &&_405, &&_406, &&_407, &&_408, &&_409, \\\n    &&_410, &&_411, &&_412, &&_413, &&_414, &&_415, &&_416, &&_417, &&_418, &&_419, \\\n    &&_420, &&_421, &&_422, &&_423, &&_424, &&_425, &&_426, &&_427, &&_428, &&_429, \\\n    &&_430, &&_431, &&_432, &&_433, &&_434, &&_435, &&_436, &&_437, &&_438, &&_439, \\\n    &&_440, &&_441, &&_442, &&_443, &&_444, &&_445, &&_446, &&_447, &&_448, &&_449, \\\n    &&_450, &&_451, &&_452, &&_453, &&_454, &&_455, &&_456, &&_457, &&_458, &&_459, \\\n    &&_460, &&_461, &&_462, &&_463, &&_464, &&_465, &&_466, &&_467, &&_468, &&_469, \\\n    &&_470, &&_471, &&_472, &&_473, &&_474, &&_475, &&_476, &&_477, &&_478, &&_479, \\\n    &&_480, &&_481, &&_482, &&_483, &&_484, &&_485, &&_486, &&_487, &&_488, &&_489, \\\n    &&_490, &&_491, &&_492, &&_493, &&_494, &&_495, &&_496, &&_497, &&_498, &&_499, \\\n    &&_500, &&_501, &&_502, &&_503, &&_504, &&_505, &&_506, &&_507, &&_508, &&_509, \\\n    &&_510, &&_511, &&_512, &&_513, &&_514, &&_515, &&_516, &&_517, &&_518, &&_519, \\\n    &&_520, &&_521, &&_522, &&_523, &&_524, &&_525, &&_526, &&_527, &&_528, &&_529, \\\n    &&_530, &&_531, &&_532, &&_533, &&_534, &&_535, &&_536, &&_537, &&_538, &&_539, \\\n    &&_540, &&_541, &&_542, &&_543, &&_544, &&_545, &&_546, &&_547, &&_548, &&_549, \\\n    &&_550, &&_551, &&_552, &&_553, &&_554, &&_555, &&_556, &&_557, &&_558, &&_559, \\\n    &&_560, &&_561, &&_562, &&_563, &&_564, &&_565, &&_566, &&_567, &&_568, &&_569, \\\n    &&_570, &&_571, &&_572, &&_573, &&_574, &&_575, &&_576, &&_577, &&_578, &&_579, \\\n    &&_580, &&_581, &&_582, &&_583, &&_584, &&_585, &&_586, &&_587, &&_588, &&_589, \\\n    &&_590, &&_591, &&_592, &&_593, &&_594, &&_595, &&_596, &&_597, &&_598, &&_599, \\\n    &&_600, &&_601, &&_602, &&_603, &&_604, &&_605, &&_606, &&_607, &&_608, &&_609, \\\n    &&_610, &&_611, &&_612, &&_613, &&_614, &&_615, &&_616, &&_617, &&_618, &&_619, \\\n    &&_620, &&_621, &&_622, &&_623, &&_624, &&_625, &&_626, &&_627, &&_628, &&_629, \\\n    &&_630, &&_631, &&_632, &&_633, &&_634, &&_635, &&_636, &&_637, &&_638, &&_639, \\\n    &&_640, &&_641, &&_642, &&_643, &&_644, &&_645, &&_646, &&_647, &&_648, &&_649, \\\n    &&_650, &&_651, &&_652, &&_653, &&_654, &&_655, &&_656, &&_657, &&_658, &&_659, \\\n    &&_660, &&_661, &&_662, &&_663, &&_664, &&_665, &&_666, &&_667, &&_668, &&_669, \\\n    &&_670, &&_671, &&_672, &&_673, &&_674, &&_675, &&_676, &&_677, &&_678, &&_679, \\\n    &&_680, &&_681, &&_682, &&_683, &&_684, &&_685, &&_686, &&_687, &&_688, &&_689, \\\n    &&_690, &&_691, &&_692, &&_693, &&_694, &&_695, &&_696, &&_697, &&_698, &&_699, \\\n  }\n\n  /*\n     IP_REG, SP_REG, CB_REG\n        the machine registers in which to place localIP, localFP, localSP and\n        currentBytecode.  Wins big on register-deficient architectures --\n        especially Intel.\n  */\n#if defined(__mips__)\n# define IP_REG __asm__(\"$16\")\n# define SP_REG __asm__(\"$17\")\n# define CB_REG __asm__(\"$18\")\n#endif\n#if defined(__sparc__)\n# define IP_REG __asm__(\"%l0\")\n# define SP_REG __asm__(\"%l1\")\n# define CB_REG __asm__(\"%l2\")\n#endif\n#if defined(__alpha__)\n# define IP_REG __asm__(\"$9\")\n# define SP_REG __asm__(\"$10\")\n# define CB_REG __asm__(\"$11\")\n#endif\n#if defined(__i386__)\n# define IP_REG __asm__(\"%esi\")\n# define SP_REG __asm__(\"%edi\")\n# if (__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 95))\n#   define CB_REG __asm__(\"%ebx\")\n# else\n#   define CB_REG /* avoid undue register pressure */\n# endif\n#endif\n#if defined(__powerpc__) || defined(PPC) || defined(_POWER) || defined(_IBMR2) || defined(__ppc__)\n# define GP_REG __asm__(\"24\")\n# define JP_REG __asm__(\"25\")\n# define IP_REG __asm__(\"26\")\n# define SP_REG __asm__(\"27\")\n# define CB_REG __asm__(\"28\")\n#endif\n#if defined(__hppa__)\n# define IP_REG __asm__(\"%r18\")\n# define SP_REG __asm__(\"%r17\")\n# define CB_REG __asm__(\"%r16\")\n#endif\n#if defined(__mc68000__)\n# define IP_REG __asm__(\"a5\")\n# define SP_REG __asm__(\"a4\")\n# define CB_REG __asm__(\"d7\")\n#endif\n\n#if !defined(JP_REG)\n# define JP_REG\n#endif\n#ifndef IP_REG\n# define IP_REG\n#endif\n#if !defined(SP_REG)\n# define SP_REG\n#endif\n#if !defined(CB_REG)\n# define CB_REG\n#endif\n#if !defined(GP_REG)\n# define GP_REG\n#endif\n#if !defined(FOO_REG)\n# define FOO_REG /* nada */\n#endif\n#if !defined(FP_REG)\n# define FP_REG /* nada */\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/src/plugins/LocalePlugin/LocalePlugin.c",
    "content": "/* Automatically generated from Squeak on #(17 November 2008 5:58:31 pm)\nby VMMaker 3.9.1-dtl\n */\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n#include \"LocalePlugin.h\"\n\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n/*** Function Prototypes ***/\nstatic VirtualMachine * getInterpreter(void);\n#pragma export on\nEXPORT(const char*) getModuleName(void);\n#pragma export off\nstatic sqInt halt(void);\n#pragma export on\nEXPORT(sqInt) initialiseModule(void);\n#pragma export off\nstatic sqInt msg(char * s);\n#pragma export on\nEXPORT(sqInt) primitiveCountry(void);\nEXPORT(sqInt) primitiveCurrencyNotation(void);\nEXPORT(sqInt) primitiveCurrencySymbol(void);\nEXPORT(sqInt) primitiveDaylightSavings(void);\nEXPORT(sqInt) primitiveDecimalSymbol(void);\nEXPORT(sqInt) primitiveDigitGroupingSymbol(void);\nEXPORT(sqInt) primitiveLanguage(void);\nEXPORT(sqInt) primitiveLongDateFormat(void);\nEXPORT(sqInt) primitiveMeasurementMetric(void);\nEXPORT(sqInt) primitiveShortDateFormat(void);\nEXPORT(sqInt) primitiveTimeFormat(void);\nEXPORT(sqInt) primitiveTimezoneOffset(void);\nEXPORT(sqInt) primitiveVMOffsetToUTC(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine* anInterpreter);\n#pragma export off\nstatic sqInt sqAssert(sqInt aBool);\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"LocalePlugin 17 November 2008 (i)\"\n#else\n\t\"LocalePlugin 17 November 2008 (e)\"\n#endif\n;\n\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine * getInterpreter(void) {\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*) getModuleName(void) {\n\treturn moduleName;\n}\n\nstatic sqInt halt(void) {\n\t;\n}\n\nEXPORT(sqInt) initialiseModule(void) {\n\treturn sqLocInitialize();\n}\n\nstatic sqInt msg(char * s) {\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n}\n\n\n/*\treturn a 3 char string describing the country in use. ISO 3166 is the relevant source here; see http://www.unicode.org/onlinedat/countries.html for details. Using the 3 character Alpha-3 codes */\n\nEXPORT(sqInt) primitiveCountry(void) {\n\tsqInt oop;\n\n\toop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), 3);\n\tsqLocGetCountryInto(interpreterProxy->firstIndexableField(oop));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, oop);\n\treturn null;\n}\n\n\n/*\treturn a boolean specifying whether the currency symbol is pre or post fix. true -> pre */\n\nEXPORT(sqInt) primitiveCurrencyNotation(void) {\n\tsqInt _return_value;\n\n\t_return_value = ((sqLocCurrencyNotation())? interpreterProxy->trueObject(): interpreterProxy->falseObject());\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\n\n/*\treturn a string describing the currency symbol used \nStill need to find details on standard symbols - ISO 4217 is supposed to be it but cannot find on web */\n\nEXPORT(sqInt) primitiveCurrencySymbol(void) {\n\tsqInt oop;\n\tsqInt length;\n\n\tlength = sqLocCurrencySymbolSize();\n\toop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), length);\n\tsqLocGetCurrencySymbolInto(interpreterProxy->firstIndexableField(oop));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, oop);\n\treturn null;\n}\n\n\n/*\treturn a boolean specifying the DST setting. true -> active */\n\nEXPORT(sqInt) primitiveDaylightSavings(void) {\n\tsqInt _return_value;\n\n\t_return_value = ((sqLocDaylightSavings())? interpreterProxy->trueObject(): interpreterProxy->falseObject());\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\n\n/*\treturn a 1 char string describing the decimal symbol used - usually a . or a , */\n\nEXPORT(sqInt) primitiveDecimalSymbol(void) {\n\tsqInt oop;\n\n\toop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), 1);\n\tsqLocGetDecimalSymbolInto(interpreterProxy->firstIndexableField(oop));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, oop);\n\treturn null;\n}\n\n\n/*\treturn a 1 char string describing the digitGrouping symbol used - usually a . or a , between triples of digits */\n\nEXPORT(sqInt) primitiveDigitGroupingSymbol(void) {\n\tsqInt oop;\n\n\toop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), 1);\n\tsqLocGetDigitGroupingSymbolInto(interpreterProxy->firstIndexableField(oop));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, oop);\n\treturn null;\n}\n\n\n/*\treturn a 3 char string describing the language in use. ISO 639 is the relevant source here; see http://www.w3.org/WAI/ER/IG/ert/iso639.html for details */\n\nEXPORT(sqInt) primitiveLanguage(void) {\n\tsqInt oop;\n\n\toop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), 3);\n\tsqLocGetLanguageInto(interpreterProxy->firstIndexableField(oop));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, oop);\n\treturn null;\n}\n\n\n/*\treturn a string describing the long date formatting.\nFormat is made up of\nd day, m month, y year,\ndouble symbol is null padded, single not padded (m=6, mm=06)\ndddd weekday\nmmmm month name\n */\n\nEXPORT(sqInt) primitiveLongDateFormat(void) {\n\tsqInt oop;\n\tsqInt length;\n\n\tlength = sqLocLongDateFormatSize();\n\toop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), length);\n\tsqLocGetLongDateFormatInto(interpreterProxy->firstIndexableField(oop));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, oop);\n\treturn null;\n}\n\n\n/*\treturn a boolean specifying whether the currency symbol is pre or post fix. true -> pre */\n\nEXPORT(sqInt) primitiveMeasurementMetric(void) {\n\tsqInt _return_value;\n\n\t_return_value = ((sqLocMeasurementMetric())? interpreterProxy->trueObject(): interpreterProxy->falseObject());\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\n\n/*\treturn a string describing the long date formatting.\nFormat is made up of\nd day, m month, y year,\ndouble symbol is null padded, single not padded (m=6, mm=06)\ndddd weekday\nmmmm month name\n */\n\nEXPORT(sqInt) primitiveShortDateFormat(void) {\n\tsqInt oop;\n\tsqInt length;\n\n\tlength = sqLocShortDateFormatSize();\n\toop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), length);\n\tsqLocGetShortDateFormatInto(interpreterProxy->firstIndexableField(oop));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, oop);\n\treturn null;\n}\n\n\n/*\treturn a string describing the time formatting.\nFormat is made up of\nh hour (h 12, H 24), m minute, s seconds, x (am/pm String)\ndouble symbol is null padded, single not padded (h=6, hh=06) */\n\nEXPORT(sqInt) primitiveTimeFormat(void) {\n\tsqInt oop;\n\tsqInt length;\n\n\tlength = sqLocTimeFormatSize();\n\toop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), length);\n\tsqLocGetTimeFormatInto(interpreterProxy->firstIndexableField(oop));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, oop);\n\treturn null;\n}\n\n\n/*\treturn the number of minutes this VM's time value is offset from UTC */\n\nEXPORT(sqInt) primitiveTimezoneOffset(void) {\n\tsqInt _return_value;\n\n\t_return_value = interpreterProxy->integerObjectOf((sqLocGetTimezoneOffset()));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\n\n/*\treturn the number of minutes this VM's time value is offset from UTC */\n\nEXPORT(sqInt) primitiveVMOffsetToUTC(void) {\n\tsqInt _return_value;\n\n\t_return_value = interpreterProxy->integerObjectOf((sqLocGetVMOffsetToUTC()));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt) setInterpreter(struct VirtualMachine* anInterpreter) {\n\tsqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\nstatic sqInt sqAssert(sqInt aBool) {\n\t/* missing DebugCode */;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\n\nvoid* LocalePlugin_exports[][3] = {\n\t{\"LocalePlugin\", \"primitiveDecimalSymbol\", (void*)primitiveDecimalSymbol},\n\t{\"LocalePlugin\", \"primitiveMeasurementMetric\", (void*)primitiveMeasurementMetric},\n\t{\"LocalePlugin\", \"primitiveDigitGroupingSymbol\", (void*)primitiveDigitGroupingSymbol},\n\t{\"LocalePlugin\", \"primitiveCountry\", (void*)primitiveCountry},\n\t{\"LocalePlugin\", \"primitiveVMOffsetToUTC\", (void*)primitiveVMOffsetToUTC},\n\t{\"LocalePlugin\", \"primitiveCurrencyNotation\", (void*)primitiveCurrencyNotation},\n\t{\"LocalePlugin\", \"initialiseModule\", (void*)initialiseModule},\n\t{\"LocalePlugin\", \"primitiveCurrencySymbol\", (void*)primitiveCurrencySymbol},\n\t{\"LocalePlugin\", \"primitiveTimezoneOffset\", (void*)primitiveTimezoneOffset},\n\t{\"LocalePlugin\", \"primitiveLongDateFormat\", (void*)primitiveLongDateFormat},\n\t{\"LocalePlugin\", \"primitiveDaylightSavings\", (void*)primitiveDaylightSavings},\n\t{\"LocalePlugin\", \"primitiveLanguage\", (void*)primitiveLanguage},\n\t{\"LocalePlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"LocalePlugin\", \"primitiveShortDateFormat\", (void*)primitiveShortDateFormat},\n\t{\"LocalePlugin\", \"primitiveTimeFormat\", (void*)primitiveTimeFormat},\n\t{\"LocalePlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{NULL, NULL, NULL}\n};\n\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/src/plugins.int",
    "content": "# Automatically generated makefile include for internal plugins\nINTERNAL_PLUGINS = ADPCMCodecPlugin B3DAcceleratorPlugin Squeak3D B2DPlugin BitBltPlugin BMPReadWriterPlugin ZipPlugin DropPlugin DSAPrims FFTPlugin FilePlugin FloatArrayPlugin GeniePlugin HostWindowPlugin InternetConfigPlugin JPEGReaderPlugin JPEGReadWriter2Plugin Klatt LargeIntegers Matrix2x3Plugin MIDIPlugin MiscPrimitivePlugin RePlugin SecurityPlugin SocketPlugin SoundCodecPrims SoundGenerationPlugin SoundPlugin StarSqueakPlugin SurfacePlugin UUIDPlugin\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/src/vm/interp.c",
    "content": "/* This file has been post-processed for GNU C */\r\r\r/* Automatically generated from Squeak on 8 July 2010 12:32:36 pm \r   by VMMaker 4.2.6\r */\r#define SQ_USE_GLOBAL_STRUCT 1\r\r#include \"sqGnu.h\"\r#include <setjmp.h>\r\r#ifndef allocateMemoryMinimumImageFileHeaderSize\r /* Called by Interpreter>>allocateMemory:minimum:imageFile:headerSize: */\r /* Default definition if not previously defined in config.h */\r #define allocateMemoryMinimumImageFileHeaderSize(heapSize, minimumMemory, fileStream, headerSize) \\\r    sqAllocateMemory(minimumMemory, heapSize)\r#endif\r\r#ifndef sqImageFileReadEntireImage\r /* Called by Interpreter>>sqImage:read:size:length: */\r /* Default definition if not previously defined in config.h */\r #define sqImageFileReadEntireImage(memoryAddress, elementSize,  length, fileStream) \\\r    sqImageFileRead(memoryAddress, elementSize,  length, fileStream)\r#endif\r\r#ifndef error\r /* error() function called from Interpreter */\r /* Default definition if not previously defined in config.h */\r #define error(str) defaultErrorProc(str)\r#endif\r\r#ifndef ioMicroSecondClock\r /* Called by Interpreter>>primitiveMicrosecondClock and GC methods */\r /* Default definition if not previously defined in config.h */\r #define ioMicroSecondClock ioMSecs\r#endif\r\r#ifndef ioUtcWithOffset\r /* Called by Interpreter>>primitiveUtcWithOffset */\r /* Default definition if not previously defined in config.h */\r #define ioUtcWithOffset(clock, offset) setMicroSecondsandOffset(clock, offset)\r#endif\r\r#include \"sqMemoryAccess.h\"\r\rsqInt printCallStack(void);\rvoid defaultErrorProc(char *s) {\r\t/* Print an error message and exit. */\r\tstatic sqInt printingStack = false;\r\r\tprintf(\"\\n%s\\n\\n\", s);\r\tif (!printingStack) {\r\t\t/* flag prevents recursive error when trying to print a broken stack */\r\t\tprintingStack = true;\r\t\tprintCallStack();\r\t}\r\texit(-1);\r}\r\r/*** Constants ***/\r#define ActiveProcessIndex 1\r#define AtCacheFixedFields 4\r#define AtCacheFmt 3\r#define AtCacheMask 28\r#define AtCacheOop 1\r#define AtCacheSize 2\r#define AtCacheTotalSize 64\r#define AtPutBase 32\r#define BlockArgumentCountIndex 3\r#define Byte0Mask 255\r#define Byte1Mask 65280\r#define Byte1Shift 8\r#define Byte1ShiftNegated -8\r#define Byte2Mask 16711680\r#define Byte3Mask 4278190080U\r#define Byte3Shift 24\r#define Byte3ShiftNegated -24\r#define Byte4Mask 1095216660480U\r#define Byte4Shift 32\r#define Byte4ShiftNegated -32\r#define Byte5Mask 280375465082880U\r#define Byte5Shift 40\r#define Byte5ShiftNegated -40\r#define Byte6Mask 71776119061217280U\r#define Byte7Mask 18374686479671623680U\r#define Byte7Shift 56\r#define Byte7ShiftNegated -56\r#define Bytes3to0Mask 4294967295U\r#define Bytes7to4Mask 18446744069414584320U\r#define CacheProbeMax 3\r#define CallerIndex 0\r#define CharacterTable 24\r#define CharacterValueIndex 0\r#define ClassAlien 52\r#define ClassArray 7\r#define ClassBitmap 4\r#define ClassBlockClosure 36\r#define ClassBlockContext 11\r#define ClassByteArray 26\r#define ClassCharacter 19\r#define ClassExternalAddress 43\r#define ClassExternalData 45\r#define ClassExternalFunction 46\r#define ClassExternalLibrary 47\r#define ClassExternalStructure 44\r#define ClassFloat 9\r#define ClassInteger 5\r#define ClassLargeNegativeInteger 42\r#define ClassLargePositiveInteger 13\r#define ClassMessage 15\r#define ClassMethodContext 10\r#define ClassPoint 12\r#define ClassSemaphore 18\r#define ClassString 6\r#define ClassUnsafeAlien 54\r#define ClassWeakFinalizer 55\r#define ClosureFirstCopiedValueIndex 3\r#define ClosureIndex 4\r#define ClosureNumArgsIndex 2\r#define ClosureOuterContextIndex 0\r#define ClosureStartPCIndex 1\r#define CompactClassMask 126976\r#define CompactClasses 28\r#define ConstMinusOne -1\r#define ConstOne 3\r#define ConstTwo 5\r#define ConstZero 1\r#define ContextFixedSizePlusHeader 7\r#define CrossedX 258\r#define CtxtTempFrameStart 6\r#define DoAssertionChecks 0\r#define DoBalanceChecks 0\r#define Done 4\r#define EndOfRun 257\r#define ExcessSignalsIndex 2\r#define ExternalObjectsArray 38\r#define ExtraRootSize 2048\r#define FalseObject 1\r#define FirstLinkIndex 0\r#define GCTopMarker 3\r#define HashBits 536739840\r#define HashBitsOffset 17\r#define HeaderIndex 0\r#define HeaderTypeClass 1\r#define HeaderTypeFree 2\r#define HeaderTypeGC 2\r#define HeaderTypeShort 3\r#define HeaderTypeSizeAndClass 0\r#define HomeIndex 5\r#define InitialIPIndex 4\r#define InstanceSpecificationIndex 2\r#define InstructionPointerIndex 1\r#define InterpreterSourceVersion \"4.2.6\"\r#define InvokeCallbackSelector 53\r#define LargeContextBit 262144\r#define LastLinkIndex 1\r#define LiteralStart 1\r#define MaxExternalPrimitiveTableSize 4096\r#define MaxJumpBuf 32\r#define MaxPrimitiveIndex 575\r#define MessageArgumentsIndex 1\r#define MessageDictionaryIndex 1\r#define MessageLookupClassIndex 2\r#define MessageSelectorIndex 0\r#define MethodArrayIndex 1\r#define MethodCacheClass 2\r#define MethodCacheEntries 512\r#define MethodCacheEntrySize 8\r#define MethodCacheMask 4088\r#define MethodCacheMethod 3\r#define MethodCacheNative 5\r#define MethodCachePrim 4\r#define MethodCachePrimFunction 6\r#define MethodCacheSelector 1\r#define MethodCacheSize 4096\r#define MethodIndex 3\r#define MillisecondClockMask 536870911\r#define MyListIndex 3\r#define NextLinkIndex 0\r#define NilContext 1\r#define NilObject 0\r#define PrimitiveExternalCallIndex 117\r#define PriorityIndex 2\r#define ProcessListsIndex 0\r#define ProcessSignalingLowSpace 22\r#define ReceiverIndex 5\r#define RootTableRedZone 2400\r#define RootTableSize 2500\r#define SchedulerAssociation 3\r#define SelectorAboutToReturn 48\r#define SelectorCannotInterpret 34\r#define SelectorCannotReturn 21\r#define SelectorDoesNotUnderstand 20\r#define SelectorMustBeBoolean 25\r#define SelectorRunWithIn 49\r#define SelectorStart 2\r#define SemaphoresToSignalSize 500\r#define SenderIndex 0\r#define SpecialSelectors 23\r#define StackPointerIndex 2\r#define StartField 1\r#define StartObj 2\r#define StreamArrayIndex 0\r#define StreamIndexIndex 1\r#define StreamReadLimitIndex 2\r#define StreamWriteLimitIndex 3\r#define SuperclassIndex 0\r#define SuspendedContextIndex 1\r#define TempFrameStart 6\r#define TheDisplay 14\r#define TheFinalizationSemaphore 41\r#define TheInterruptSemaphore 30\r#define TheLowSpaceSemaphore 17\r#define TheTimerSemaphore 29\r#define TrueObject 2\r#define TypeMask 3\r#define Upward 3\r#define ValueIndex 1\r#define XIndex 0\r#define YIndex 1\r\r/*** Function Prototypes ***/\rsqInt accessibleObjectAfter(sqInt oop);\rsqInt activateNewClosureMethod(sqInt blockClosure);\rsqInt activateNewMethod(void);\r#pragma export on\rEXPORT(sqInt) addGCRoot(sqInt *varLoc);\r#pragma export off\rsqInt addNewMethodToCache(void);\rsqInt addToExternalPrimitiveTable(void *functionAddress);\rsqInt adjustAllOopsBy(sqInt bytesToShift);\rsqInt allYoungand(sqInt array1, sqInt array2);\rsqInt allocateChunk(sqInt byteSize);\rsqInt allocateOrRecycleContext(sqInt needsLarge);\rsqInt argumentCountOf(sqInt methodPointer);\rvoid * arrayValueOf(sqInt arrayOop);\rsqInt asciiOfCharacter(sqInt characterObj);\rsqInt balancedStackafterPrimitivewithArgs(sqInt delta, sqInt primIdx, sqInt nArgs);\rsqInt baseHeaderSize(void);\rsqInt beRootIfOld(sqInt oop);\rsqInt beRootWhileForwarding(sqInt oop);\rsqInt becomewith(sqInt array1, sqInt array2);\rsqInt becomewithtwoWaycopyHash(sqInt array1, sqInt array2, sqInt twoWayFlag, sqInt copyHashFlag);\rsqInt biasToGrow(void);\rsqInt booleanValueOf(sqInt obj);\rsqInt byteSizeOf(sqInt oop);\rsqInt byteSwapByteObjectsFromto(sqInt startOop, sqInt stopAddr);\rsqInt byteSwapped(sqInt w);\rsqInt bytesPerWord(void);\rsqInt callExternalPrimitive(void * functionID);\r#pragma export on\rEXPORT(sqInt) callInterpreter(void);\rEXPORT(sqInt) callbackEnter(sqInt *callbackID);\rEXPORT(sqInt) callbackLeave(sqInt cbID);\r#pragma export off\rsqInt changeClassOfto(sqInt rcvr, sqInt argClass);\rsqInt characterForAscii(sqInt ascii);\rsqInt characterTable(void);\rsqInt checkForInterrupts(void);\rsqInt checkImageVersionFromstartingAt(sqImageFile  f, squeakFileOffsetType  imageOffset);\rsqInt checkedIntegerValueOf(sqInt intOop);\rsqInt checkedLongAt(sqInt byteAddress);\rsqInt classAlien(void);\rsqInt classArray(void);\rsqInt classBitmap(void);\rsqInt classByteArray(void);\rsqInt classCharacter(void);\rsqInt classExternalAddress(void);\rsqInt classExternalData(void);\rsqInt classExternalFunction(void);\rsqInt classExternalLibrary(void);\rsqInt classExternalStructure(void);\rsqInt classFloat(void);\rsqInt classLargeNegativeInteger(void);\rsqInt classLargePositiveInteger(void);\rsqInt classNameOfIs(sqInt aClass, char * className);\rsqInt classPoint(void);\rsqInt classSemaphore(void);\rsqInt classSmallInteger(void);\rsqInt classString(void);\rsqInt classUnsafeAlien(void);\rsqInt clone(sqInt oop);\rsqInt commonAt(sqInt stringy);\rsqInt commonAtPut(sqInt stringy);\rsqInt commonVariableatcacheIndex(sqInt rcvr, sqInt index, sqInt atIx);\rsqInt compare31or32Bitsequal(sqInt obj1, sqInt obj2);\rsqInt compilerCreateActualMessagestoringArgs(sqInt aMessage, sqInt argArray);\rsqInt compilerFlushCache(sqInt aCompiledMethod);\rsqInt compilerMapFromto(sqInt memStart, sqInt memEnd);\rsqInt compilerMark(void);\rsqInt compilerPostGC(void);\rsqInt compilerPostSnapshot(void);\rsqInt compilerPreGC(sqInt fullGCFlag);\rsqInt compilerPreSnapshot(void);\rsqInt compilerProcessChange(void);\rsqInt compilerProcessChangeto(sqInt oldProc, sqInt newProc);\rsqInt compilerTranslateMethod(void);\rsqInt containOnlyOopsand(sqInt array1, sqInt array2);\rsqInt contexthasSender(sqInt thisCntx, sqInt aContext);\rsqInt copyBits(void);\rsqInt copyBitsFromtoat(sqInt x0, sqInt x1, sqInt y);\rsqInt copyObjtoSegmentaddrstopAtsaveOopAtheaderAt(sqInt oop, sqInt segmentWordArray, sqInt lastSeg, sqInt stopAddr, sqInt oopPtr, sqInt hdrPtr);\rsqInt createActualMessageTo(sqInt aClass);\rsqInt dispatchFunctionPointer(void * aFunctionPointer);\rsqInt dispatchFunctionPointerOnin(sqInt primIdx, void *primTable[]);\rsqInt displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b);\rsqInt displayObject(void);\rsqInt doPrimitiveDivby(sqInt rcvr, sqInt arg);\rsqInt doPrimitiveModby(sqInt rcvr, sqInt arg);\rsqInt dummyReferToProxy(void);\r#pragma export on\rEXPORT(sqInt) dumpImage(char * fileName);\r#pragma export off\rsqInt executeNewMethodFromCache(void);\rsqInt failed(void);\rsqInt falseObject(void);\rvoid * fetchArrayofObject(sqInt fieldIndex, sqInt objectPointer);\rsqInt fetchClassOf(sqInt oop);\rsqInt fetchClassOfNonInt(sqInt oop);\rdouble fetchFloatofObject(sqInt fieldIndex, sqInt objectPointer);\rsqInt fetchIntegerofObject(sqInt fieldIndex, sqInt objectPointer);\rsqInt fetchLong32ofObject(sqInt fieldIndex, sqInt oop);\rsqInt fetchPointerofObject(sqInt fieldIndex, sqInt oop);\rsqInt fetchStackPointerOf(sqInt aContext);\rsqInt fetchWordLengthOf(sqInt objectPointer);\rsqInt finalizeReference(usqInt oop);\rsqInt findClassOfMethodforReceiver(sqInt meth, sqInt rcvr);\rsqInt findNewMethodInClass(sqInt class);\rsqInt findObsoleteNamedPrimitivelength(char * functionName, sqInt functionLength);\rsqInt findSelectorOfMethodforReceiver(sqInt meth, sqInt rcvr);\rsqInt firstAccessibleObject(void);\rchar * firstFixedField(sqInt oop);\rchar * firstIndexableField(sqInt oop);\rsqInt floatObjectOf(double  aFloat);\rdouble floatValueOf(sqInt oop);\rsqInt flushExternalPrimitiveOf(sqInt methodPtr);\rsqInt flushExternalPrimitives(void);\rsqInt forceInterruptCheck(void);\rsqInt fullDisplayUpdate(void);\rsqInt fullGC(void);\rsqInt fwdTableInit(sqInt blkSize);\rsqInt fwdTableSize(sqInt blkSize);\rsqInt getCurrentBytecode(void);\rsqInt getFullScreenFlag(void);\rsqInt getInterruptCheckCounter(void);\rsqInt getInterruptKeycode(void);\rsqInt getInterruptPending(void);\rsqInt getLongFromFileswap(sqImageFile  aFile, sqInt swapFlag);\rsqInt getNextWakeupTick(void);\rsqInt getSavedWindowSize(void);\r#pragma export on\rEXPORT(sqInt) getStackPointer(void);\r#pragma export off\rsqInt getThisSessionID(void);\rsqInt growObjectMemory(usqInt delta);\rsqInt headerOf(sqInt methodPointer);\rsqInt imageFormatBackwardCompatibilityVersion(void);\rsqInt imageFormatForwardCompatibilityVersion(void);\rsqInt imageSegmentVersion(void);\rsqInt incCompBody(void);\rsqInt incCompMakeFwd(void);\rsqInt incCompMove(sqInt bytesFreed);\rsqInt includesBehaviorThatOf(sqInt aClass, sqInt aSuperclass);\rsqInt incrementalGC(void);\rsqInt initCompilerHooks(void);\rsqInt initializeImageFormatVersionIfNeeded(void);\rsqInt initializeInterpreter(sqInt bytesToShift);\rsqInt initializeMemoryFirstFree(usqInt firstFree);\rsqInt initializeObjectMemory(sqInt bytesToShift);\rsqInt installinAtCacheatstring(sqInt rcvr, sqInt * cache, sqInt atIx, sqInt stringy);\rsqInt instantiateClassindexableSize(sqInt classPointer, sqInt size);\rsqInt instantiateContextsizeInBytes(sqInt classPointer, sqInt sizeInBytes);\rsqInt instantiateSmallClasssizeInBytes(sqInt classPointer, sqInt sizeInBytes);\rsqInt integerObjectOf(sqInt value);\rsqInt integerValueOf(sqInt objectPointer);\r#pragma export on\rEXPORT(sqInt) internalIsImmutable(sqInt oop);\rEXPORT(sqInt) internalIsMutable(sqInt oop);\r#pragma export off\rsqInt interpret(void);\rsqInt ioFilenamefromStringofLengthresolveAliases(char * aCharBuffer, char * aFilenameString, sqInt filenameLength, sqInt aBoolean);\rsqInt isKindOf(sqInt oop, char * className);\rsqInt isMemberOf(sqInt oop, char * className);\rsqInt isArray(sqInt oop);\rsqInt isBigEnder(void);\rsqInt isBytes(sqInt oop);\rsqInt isExcessiveAllocationRequestshift(sqInt size, sqInt bits);\rsqInt isFloatObject(sqInt oop);\rsqInt isHandlerMarked(sqInt aContext);\rsqInt isInMemory(sqInt address);\rsqInt isIndexable(sqInt oop);\rsqInt isIntegerObject(sqInt objectPointer);\rsqInt isIntegerValue(sqInt intValue);\rsqInt isPointers(sqInt oop);\rsqInt isWeak(sqInt oop);\rsqInt isWords(sqInt oop);\rsqInt isWordsOrBytes(sqInt oop);\rsqInt isWordsOrBytesNonInt(sqInt oop);\rsqInt lastPointerOf(sqInt oop);\rsqInt lengthOf(sqInt oop);\rsqInt literalofMethod(sqInt offset, sqInt methodPointer);\rsqInt literalCountOf(sqInt methodPointer);\rsqInt literalCountOfHeader(sqInt headerPointer);\rsqInt loadBitBltFrom(sqInt bb);\rsqInt loadInitialContext(void);\rsqInt lookupInMethodCacheSelclass(sqInt selector, sqInt class);\rsqInt lookupMethodInClass(sqInt class);\rsqInt lookupMethodInDictionary(sqInt dictionary);\rsqInt lookupMethodNoMNUEtcInClass(sqInt class);\rsqInt lowestFreeAfter(sqInt chunk);\rsqInt makePointwithxValueyValue(sqInt xValue, sqInt yValue);\rsqInt mapPointersInObjectsFromto(sqInt memStart, sqInt memEnd);\rsqInt markAndTrace(sqInt oop);\rsqInt markAndTraceInterpreterOops(void);\rsqInt markPhase(void);\rsqInt methodArgumentCount(void);\rsqInt methodPrimitiveIndex(void);\r#pragma export on\rEXPORT(sqInt) moduleUnloaded(char * aModuleName);\r#pragma export off\rsqInt nilObject(void);\rsqInt nonWeakFieldsOf(sqInt oop);\rsqInt noteAsRootheaderLoc(sqInt oop, sqInt headerLoc);\rsqInt nullCompilerHook(void);\rsqInt objectAfter(sqInt oop);\rsqInt obsoleteDontUseThisFetchWordofObject(sqInt fieldIndex, sqInt oop);\rsqInt okayFields(sqInt oop);\rsqInt okayOop(sqInt signedOop);\rsqInt oopisGreaterThan(sqInt anOop, sqInt otherOop);\rsqInt oopisGreaterThanOrEqualTo(sqInt anOop, sqInt otherOop);\rsqInt oopisLessThan(sqInt anOop, sqInt otherOop);\rsqInt oopHasAcceptableClass(sqInt signedOop);\rsqInt oopHasOkayClass(sqInt signedOop);\rsqInt pop(sqInt nItems);\rsqInt popthenPush(sqInt nItems, sqInt oop);\rdouble popFloat(void);\rsqInt popRemappableOop(void);\rsqInt popStack(void);\rsqInt positive32BitIntegerFor(sqInt integerValue);\rsqInt positive32BitValueOf(sqInt oop);\rsqInt positive64BitIntegerFor(sqLong integerValue);\rsqLong positive64BitValueOf(sqInt oop);\rsqInt possibleRootStoreIntovalue(sqInt oop, sqInt valueObj);\rsqInt postGCAction(void);\rsqInt prepareForwardingTableForBecomingwithtwoWay(sqInt array1, sqInt array2, sqInt twoWayFlag);\rsqInt primitiveAdd(void);\rsqInt primitiveArctan(void);\rsqInt primitiveArrayBecome(void);\rsqInt primitiveArrayBecomeOneWay(void);\rsqInt primitiveArrayBecomeOneWayCopyHash(void);\rsqInt primitiveAsFloat(void);\rsqInt primitiveAsOop(void);\rsqInt primitiveAt(void);\rsqInt primitiveAtEnd(void);\rsqInt primitiveAtPut(void);\rsqInt primitiveBeCursor(void);\rsqInt primitiveBeDisplay(void);\rsqInt primitiveBeep(void);\rsqInt primitiveBitAnd(void);\rsqInt primitiveBitOr(void);\rsqInt primitiveBitShift(void);\rsqInt primitiveBitXor(void);\rsqInt primitiveBlockCopy(void);\rsqInt primitiveBytesLeft(void);\rsqInt primitiveCalloutToFFI(void);\rsqInt primitiveChangeClass(void);\r#pragma export on\rEXPORT(sqInt) primitiveChangeClassWithClass(void);\r#pragma export off\rsqInt primitiveClass(void);\rsqInt primitiveClipboardText(void);\rsqInt primitiveClone(void);\rsqInt primitiveClosureCopyWithCopiedValues(void);\rsqInt primitiveClosureValue(void);\rsqInt primitiveClosureValueNoContextSwitch(void);\rsqInt primitiveClosureValueWithArgs(void);\rsqInt primitiveConstantFill(void);\rsqInt primitiveCopyObject(void);\rsqInt primitiveDeferDisplayUpdates(void);\r#pragma export on\rEXPORT(sqInt) primitiveDisablePowerManager(void);\r#pragma export off\rsqInt primitiveDiv(void);\rsqInt primitiveDivide(void);\rsqInt primitiveDoNamedPrimitiveWithArgs(void);\rsqInt primitiveDoPrimitiveWithArgs(void);\rsqInt primitiveEqual(void);\rsqInt primitiveEquivalent(void);\rsqInt primitiveExecuteMethod(void);\rsqInt primitiveExecuteMethodArgsArray(void);\rsqInt primitiveExitToDebugger(void);\rsqInt primitiveExp(void);\rsqInt primitiveExponent(void);\rsqInt primitiveExternalCall(void);\rsqInt primitiveFail(void);\rsqInt primitiveFailFor(sqInt reasonCode);\rsqInt primitiveFindHandlerContext(void);\rsqInt primitiveFindNextUnwindContext(void);\rsqInt primitiveFloatAdd(void);\rsqInt primitiveFloatAddtoArg(sqInt rcvrOop, sqInt argOop);\rsqInt primitiveFloatDivide(void);\rsqInt primitiveFloatDividebyArg(sqInt rcvrOop, sqInt argOop);\rsqInt primitiveFloatEqual(void);\rsqInt primitiveFloatEqualtoArg(sqInt rcvrOop, sqInt argOop);\rsqInt primitiveFloatGreaterthanArg(sqInt rcvrOop, sqInt argOop);\rsqInt primitiveFloatGreaterOrEqual(void);\rsqInt primitiveFloatGreaterOrEqualtoArg(sqInt rcvrOop, sqInt argOop);\rsqInt primitiveFloatGreaterThan(void);\rsqInt primitiveFloatLessthanArg(sqInt rcvrOop, sqInt argOop);\rsqInt primitiveFloatLessOrEqual(void);\rsqInt primitiveFloatLessOrEqualtoArg(sqInt rcvrOop, sqInt argOop);\rsqInt primitiveFloatLessThan(void);\rsqInt primitiveFloatMultiply(void);\rsqInt primitiveFloatMultiplybyArg(sqInt rcvrOop, sqInt argOop);\rsqInt primitiveFloatNotEqual(void);\rsqInt primitiveFloatSubtract(void);\rsqInt primitiveFloatSubtractfromArg(sqInt rcvrOop, sqInt argOop);\rsqInt primitiveFlushCache(void);\rsqInt primitiveFlushCacheByMethod(void);\rsqInt primitiveFlushCacheSelective(void);\rsqInt primitiveFlushExternalPrimitives(void);\rsqInt primitiveForceDisplayUpdate(void);\r#pragma export on\rEXPORT(sqInt) primitiveForceTenure(void);\r#pragma export off\rsqInt primitiveFormPrint(void);\rsqInt primitiveFractionalPart(void);\rsqInt primitiveFullGC(void);\rsqInt primitiveGetAttribute(void);\rsqInt primitiveGetNextEvent(void);\rsqInt primitiveGreaterOrEqual(void);\rsqInt primitiveGreaterThan(void);\r#pragma export on\rEXPORT(sqInt) primitiveImageFormatVersion(void);\r#pragma export off\rsqInt primitiveImageName(void);\rsqInt primitiveIncrementalGC(void);\rsqInt primitiveIndexOf(sqInt methodPointer);\rsqInt primitiveIndexOfMethodHeader(sqInt methodHeader);\rsqInt primitiveInputSemaphore(void);\rsqInt primitiveInputWord(void);\rsqInt primitiveInstVarAt(void);\rsqInt primitiveInstVarAtPut(void);\rsqInt primitiveInstVarsPutFromStack(void);\rsqInt primitiveIntegerAt(void);\rsqInt primitiveIntegerAtPut(void);\r#pragma export on\rEXPORT(sqInt) primitiveInterpreterSourceVersion(void);\r#pragma export off\rsqInt primitiveInterruptSemaphore(void);\rsqInt primitiveInvokeObjectAsMethod(void);\r#pragma export on\rEXPORT(sqInt) primitiveIsRoot(void);\rEXPORT(sqInt) primitiveIsYoung(void);\r#pragma export off\rsqInt primitiveKbdNext(void);\rsqInt primitiveKbdPeek(void);\rsqInt primitiveLessOrEqual(void);\rsqInt primitiveLessThan(void);\rsqInt primitiveListBuiltinModule(void);\rsqInt primitiveListExternalModule(void);\rsqInt primitiveLoadImageSegment(void);\rsqInt primitiveLoadInstVar(void);\rsqInt primitiveLogN(void);\rsqInt primitiveLowSpaceSemaphore(void);\rsqInt primitiveMakePoint(void);\rsqInt primitiveMarkHandlerMethod(void);\rsqInt primitiveMarkUnwindMethod(void);\rsqInt primitiveMethod(void);\r#pragma export on\rEXPORT(sqInt) primitiveMicrosecondClock(void);\r#pragma export off\rsqInt primitiveMillisecondClock(void);\rsqInt primitiveMod(void);\rsqInt primitiveMouseButtons(void);\rsqInt primitiveMousePoint(void);\rsqInt primitiveMultiply(void);\rsqInt primitiveNew(void);\rsqInt primitiveNewMethod(void);\rsqInt primitiveNewWithArg(void);\rsqInt primitiveNext(void);\rsqInt primitiveNextInstance(void);\rsqInt primitiveNextObject(void);\rsqInt primitiveNextPut(void);\rsqInt primitiveNoop(void);\rsqInt primitiveNotEqual(void);\rsqInt primitiveObjectAt(void);\rsqInt primitiveObjectAtPut(void);\rsqInt primitiveObjectPointsTo(void);\rsqInt primitiveObsoleteIndexedPrimitive(void);\rsqInt primitivePerform(void);\rsqInt primitivePerformAt(sqInt lookupClass);\rsqInt primitivePerformInSuperclass(void);\rsqInt primitivePerformWithArgs(void);\r#pragma export on\rEXPORT(sqInt) primitivePlatformSourceVersion(void);\r#pragma export off\rsqInt primitivePushFalse(void);\rsqInt primitivePushMinusOne(void);\rsqInt primitivePushNil(void);\rsqInt primitivePushOne(void);\rsqInt primitivePushSelf(void);\rsqInt primitivePushTrue(void);\rsqInt primitivePushTwo(void);\rsqInt primitivePushZero(void);\rsqInt primitiveQuit(void);\rsqInt primitiveQuo(void);\rsqInt primitiveRelinquishProcessor(void);\rsqInt primitiveResponse(void);\rsqInt primitiveResume(void);\r#pragma export on\rEXPORT(sqInt) primitiveRootTable(void);\rEXPORT(sqInt) primitiveRootTableAt(void);\r#pragma export off\rsqInt primitiveScanCharacters(void);\r#pragma export on\rEXPORT(sqInt) primitiveScreenDepth(void);\r#pragma export off\rsqInt primitiveScreenSize(void);\rsqInt primitiveSecondsClock(void);\rsqInt primitiveSetDisplayMode(void);\rsqInt primitiveSetFullScreen(void);\r#pragma export on\rEXPORT(sqInt) primitiveSetGCBiasToGrow(void);\rEXPORT(sqInt) primitiveSetGCBiasToGrowGCLimit(void);\rEXPORT(sqInt) primitiveSetGCSemaphore(void);\r#pragma export off\rsqInt primitiveSetInterruptKey(void);\rsqInt primitiveShortAt(void);\rsqInt primitiveShortAtPut(void);\rsqInt primitiveShowDisplayRect(void);\rsqInt primitiveSignal(void);\rsqInt primitiveSignalAtBytesLeft(void);\rsqInt primitiveSignalAtMilliseconds(void);\rsqInt primitiveSine(void);\rsqInt primitiveSize(void);\rsqInt primitiveSnapshot(void);\rsqInt primitiveSnapshotEmbedded(void);\rsqInt primitiveSomeInstance(void);\rsqInt primitiveSomeObject(void);\rsqInt primitiveSpecialObjectsOop(void);\rsqInt primitiveSquareRoot(void);\rsqInt primitiveStoreImageSegment(void);\rsqInt primitiveStoreStackp(void);\rsqInt primitiveStringAt(void);\rsqInt primitiveStringAtPut(void);\rsqInt primitiveStringReplace(void);\rsqInt primitiveSubtract(void);\rsqInt primitiveSuspend(void);\rsqInt primitiveTerminateTo(void);\rsqInt primitiveTestDisplayDepth(void);\rsqInt primitiveTimesTwoPower(void);\rsqInt primitiveTruncated(void);\rsqInt primitiveUnloadModule(void);\r#pragma export on\rEXPORT(sqInt) primitiveUtcWithOffset(void);\r#pragma export off\rsqInt primitiveVMParameter(void);\rsqInt primitiveVMPath(void);\r#pragma export on\rEXPORT(sqInt) primitiveVMVersion(void);\r#pragma export off\rsqInt primitiveValue(void);\rsqInt primitiveValueUninterruptably(void);\rsqInt primitiveValueWithArgs(void);\rsqInt primitiveWait(void);\rsqInt primitiveYield(void);\rsqInt print(char * s);\rsqInt printAllStacks(void);\rsqInt printCallStack(void);\rsqInt printCallStackOf(sqInt aContext);\rsqInt printNameOfClasscount(sqInt classOop, sqInt cnt);\rsqInt printNum(sqInt n);\rsqInt printStringOf(sqInt oop);\rsqInt printUnbalancedStack(sqInt primIdx);\rsqInt push(sqInt object);\rsqInt pushBool(sqInt trueOrFalse);\rsqInt pushFloat(double  f);\rsqInt pushInteger(sqInt integerValue);\rsqInt pushRemappableOop(sqInt oop);\rsqInt putLongtoFile(sqInt aWord, sqImageFile  aFile);\rsqInt readImageFromFileHeapSizeStartingAt(sqImageFile  f, usqInt desiredHeapSize, squeakFileOffsetType  imageOffset);\rsqInt readableFormat(sqInt imageVersion);\r#pragma export on\rEXPORT(sqInt) reestablishContextPriorToCallback(sqInt callbackContext);\r#pragma export off\rsqInt remap(sqInt oop);\rsqInt removeFirstLinkOfList(sqInt aList);\r#pragma export on\rEXPORT(sqInt) removeGCRoot(sqInt *varLoc);\r#pragma export off\rsqInt restoreHeaderOf(sqInt oop);\rsqInt restoreHeadersFromtofromandtofrom(sqInt firstIn, sqInt lastIn, sqInt hdrBaseIn, sqInt firstOut, sqInt lastOut, sqInt hdrBaseOut);\rsqInt resume(sqInt aProcess);\rsqInt reverseDisplayFromto(sqInt startIndex, sqInt endIndex);\rsqInt rewriteMethodCacheSelclassprimIndex(sqInt selector, sqInt class, sqInt localPrimIndex);\rsqInt rewriteMethodCacheSelclassprimIndexprimFunction(sqInt selector, sqInt class, sqInt localPrimIndex, void * localPrimAddress);\r#pragma export on\rEXPORT(sqInt) sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt regsPtr, sqInt jmpBufPtr);\r#pragma export off\rsqInt setCompilerInitialized(sqInt newFlag);\rsqInt setFullScreenFlag(sqInt value);\rsqInt setInterruptCheckCounter(sqInt value);\rsqInt setInterruptKeycode(sqInt value);\rsqInt setInterruptPending(sqInt value);\rsqInt setMicroSecondsandOffset(sqLong * microSeconds, int * utcOffset);\rsqInt setNextWakeupTick(sqInt value);\rsqInt setSavedWindowSize(sqInt value);\rsqInt showDisplayBitsLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b);\rsqInt signalSemaphoreWithIndex(sqInt index);\rsqInt signed32BitIntegerFor(int integerValue);\rint signed32BitValueOf(sqInt oop);\rsqInt signed64BitIntegerFor(sqLong integerValue);\rsqLong signed64BitValueOf(sqInt oop);\rsqInt sizeBitsOf(sqInt oop);\rsqInt sizeOfSTArrayFromCPrimitive(void * cPtr);\rsqInt slotSizeOf(sqInt oop);\rsqInt snapshot(sqInt embedded);\rsqInt splObj(sqInt index);\rsqInt stObjectat(sqInt array, sqInt index);\rsqInt stObjectatput(sqInt array, sqInt index, sqInt value);\rsqInt stSizeOf(sqInt oop);\rdouble stackFloatValue(sqInt offset);\rsqInt stackIntegerValue(sqInt offset);\rsqInt stackObjectValue(sqInt offset);\rsqInt stackValue(sqInt offset);\rsqInt storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integerValue);\rsqInt storePointerofObjectwithValue(sqInt fieldIndex, sqInt oop, sqInt valuePointer);\rsqInt success(sqInt successValue);\rsqInt sufficientSpaceAfterGC(usqInt minFree);\rsqInt sufficientSpaceToAllocate(usqInt bytes);\rsqInt superclassOf(sqInt classPointer);\rsqInt sweepPhase(void);\rsqInt synchronousSignal(sqInt aSemaphore);\rsqInt transferTo(sqInt aProc);\rsqInt trueObject(void);\rsqInt updatePointersInRangeFromto(sqInt memStart, sqInt memEnd);\rsqInt updatePointersInRootObjectsFromto(sqInt memStart, sqInt memEnd);\rsqInt validateRoots(void);\rsqInt verifyCleanHeaders(void);\rsqInt vmEndianness(void);\rsqInt wakeHighestPriority(void);\rsqInt wordSwapped(sqInt w);\rsqInt writeImageFile(sqInt imageBytes);\rsqInt writeImageFileIO(sqInt imageBytes);\r/*** Variables ***/\rstruct foo {\rsqInt successFlag;\rsqInt specialObjectsOop;\rsqInt nilObj;\rsqInt argumentCount;\rsqInt trueObj;\rsqInt falseObj;\rsqInt interruptCheckCounter;\rsqInt remapBufferCount;\rsqInt nextPollTick;\rsqInt primitiveIndex;\rsqInt messageSelector;\rsqInt rootTableCount;\rsqInt allocationCount;\rsqInt compilerInitialized;\rsqInt receiver;\rsqInt lkupClass;\rsqInt allocationsBetweenGCs;\rsqInt lowSpaceThreshold;\rsqInt signalLowSpace;\rsqInt freeContexts;\rsqInt lastHash;\rsqInt reclaimableContextCount;\rsqInt pendingFinalizationSignals;\rsqInt freeLargeContexts;\rsqInt methodClass;\rsqInt newNativeMethod;\rsqInt jmpDepth;\rsqInt nextWakeupTick;\rsqInt extraRootCount;\rsqInt statMarkCount;\rsqInt interruptPending;\rsqInt semaphoresToSignalCountA;\rsqInt interruptKeycode;\rsqInt receiverClass;\rsqInt semaphoresUseBufferA;\rsqInt fullScreenFlag;\rsqInt statSweepCount;\rsqInt statMkFwdCount;\rsqInt statCompMoveCount;\rsqInt semaphoresToSignalCountB;\rsqInt statRootTableOverflows;\rsqInt tenuringThreshold;\rsqInt gcBiasToGrow;\rsqInt statFullGCs;\rsqInt statIncrGCs;\rsqInt statTenures;\rsqInt gcBiasToGrowGCLimit;\rsqInt forceTenureFlag;\rsqInt statShrinkMemory;\rsqInt savedWindowSize;\rsqInt statGrowMemory;\rsqInt deferDisplayUpdates;\rsqInt shrinkThreshold;\rsqInt statpendingFinalizationSignals;\rsqInt interruptChecksEveryNms;\rsqInt totalObjectCount;\rsqInt statSpecialMarkCount;\rsqInt statAllocationCount;\rsqInt statRootTableCount;\rsqInt weakRootCount;\rsqInt gcSemaphoreIndex;\rsqInt statSurvivorCount;\rsqInt lastTick;\rsqInt interruptCheckCounterFeedBackReset;\rsqInt jmpMax;\rsqInt globalSessionID;\rsqLong statIGCDeltaTime;\rsqLong statGCTime;\rsqInt remapBuffer[26];\rsqInt headerTypeBytes[4];\rusqInt gcBiasToGrowThreshold;\rsqLong statIncrGCMSecs;\rsqLong statFullGCMSecs;\rusqInt growHeadroom;\rusqInt fwdTableLast;\rsqInt processSignalingLowSpace;\rsqInt semaphoresToSignalB[501];\rsqInt semaphoresToSignalA[501];\rsqInt atCache[65];\rusqInt method;\rusqInt theHomeContext;\rusqInt stackPointer;\rusqInt instructionPointer;\rvoid *primitiveFunctionPointer;\rusqInt newMethod;\rlong methodCache[4097];\rusqInt endOfMemory;\rsqInt* extraRoots[2049];\rsqInt rootTable[2501];\rusqInt freeBlock;\rsqInt weakRoots[2625];\rusqInt compEnd;\rusqInt compStart;\rusqInt memoryLimit;\rusqInt activeContext;\rusqInt fwdTableNext;\rvoid *externalPrimitiveTable[4097];\rsqInt suspendedCallbacks[33];\rjmp_buf jmpBuf[33];\rsqInt suspendedMethods[33];\rusqInt youngStart;\r } fum;\rstruct foo * foo = &fum;\r\rsqInt extraVMMemory;\rconst char *interpreterVersion = \"Squeak4.1 of 17 April 2010 [latest update: #9957]\";\rsqInt (*compilerHooks[16])();\rchar* obsoleteIndexedPrimitiveTable[][3] = {\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ \"BitBltPlugin\", \"primitiveCopyBits\", NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ \"BitBltPlugin\", \"primitiveDrawLoop\", NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ \"JoystickTabletPlugin\", \"primitiveReadJoystick\", NULL },\r{ \"BitBltPlugin\", \"primitiveWarpBits\", NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ \"FilePlugin\", \"primitiveFileAtEnd\", NULL },\r{ \"FilePlugin\", \"primitiveFileClose\", NULL },\r{ \"FilePlugin\", \"primitiveFileGetPosition\", NULL },\r{ \"FilePlugin\", \"primitiveFileOpen\", NULL },\r{ \"FilePlugin\", \"primitiveFileRead\", NULL },\r{ \"FilePlugin\", \"primitiveFileSetPosition\", NULL },\r{ \"FilePlugin\", \"primitiveFileDelete\", NULL },\r{ \"FilePlugin\", \"primitiveFileSize\", NULL },\r{ \"FilePlugin\", \"primitiveFileWrite\", NULL },\r{ \"FilePlugin\", \"primitiveFileRename\", NULL },\r{ \"FilePlugin\", \"primitiveDirectoryCreate\", NULL },\r{ \"FilePlugin\", \"primitiveDirectoryDelimitor\", NULL },\r{ \"FilePlugin\", \"primitiveDirectoryLookup\", NULL },\r{ \"FilePlugin\", \"primitiveDirectoryDelete\", NULL },\r{ \"FilePlugin\", \"primitiveDirectoryGetMacTypeAndCreator\", NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ \"FilePlugin\", \"primitiveDirectorySetMacTypeAndCreator\", NULL },\r{ \"SoundPlugin\", \"primitiveSoundStart\", NULL },\r{ \"SoundPlugin\", \"primitiveSoundStartWithSemaphore\", NULL },\r{ \"SoundPlugin\", \"primitiveSoundStop\", NULL },\r{ \"SoundPlugin\", \"primitiveSoundAvailableSpace\", NULL },\r{ \"SoundPlugin\", \"primitiveSoundPlaySamples\", NULL },\r{ \"SoundPlugin\", \"primitiveSoundPlaySilence\", NULL },\r{ \"SoundGenerationPlugin\", \"primitiveWaveTableSoundMix\", NULL },\r{ \"SoundGenerationPlugin\", \"primitiveFMSoundMix\", NULL },\r{ \"SoundGenerationPlugin\", \"primitivePluckedSoundMix\", NULL },\r{ \"SoundGenerationPlugin\", \"primitiveSampledSoundMix\", NULL },\r{ \"SoundGenerationPlugin\", \"primitiveMixFMSound\", NULL },\r{ \"SoundGenerationPlugin\", \"primitiveMixPluckedSound\", NULL },\r{ \"SoundGenerationPlugin\", \"primitiveOldSampledSoundMix\", NULL },\r{ \"SoundGenerationPlugin\", \"primitiveApplyReverb\", NULL },\r{ \"SoundGenerationPlugin\", \"primitiveMixLoopedSampledSound\", NULL },\r{ \"SoundGenerationPlugin\", \"primitiveMixSampledSound\", NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ \"SoundPlugin\", \"primitiveSoundInsertSamples\", NULL },\r{ \"SoundPlugin\", \"primitiveSoundStartRecording\", NULL },\r{ \"SoundPlugin\", \"primitiveSoundStopRecording\", NULL },\r{ \"SoundPlugin\", \"primitiveSoundGetRecordingSampleRate\", NULL },\r{ \"SoundPlugin\", \"primitiveSoundRecordSamples\", NULL },\r{ \"SoundPlugin\", \"primitiveSoundSetRecordLevel\", NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ \"SocketPlugin\", \"primitiveInitializeNetwork\", NULL },\r{ \"SocketPlugin\", \"primitiveResolverStartNameLookup\", NULL },\r{ \"SocketPlugin\", \"primitiveResolverNameLookupResult\", NULL },\r{ \"SocketPlugin\", \"primitiveResolverStartAddressLookup\", NULL },\r{ \"SocketPlugin\", \"primitiveResolverAddressLookupResult\", NULL },\r{ \"SocketPlugin\", \"primitiveResolverAbortLookup\", NULL },\r{ \"SocketPlugin\", \"primitiveResolverLocalAddress\", NULL },\r{ \"SocketPlugin\", \"primitiveResolverStatus\", NULL },\r{ \"SocketPlugin\", \"primitiveResolverError\", NULL },\r{ \"SocketPlugin\", \"primitiveSocketCreate\", NULL },\r{ \"SocketPlugin\", \"primitiveSocketDestroy\", NULL },\r{ \"SocketPlugin\", \"primitiveSocketConnectionStatus\", NULL },\r{ \"SocketPlugin\", \"primitiveSocketError\", NULL },\r{ \"SocketPlugin\", \"primitiveSocketLocalAddress\", NULL },\r{ \"SocketPlugin\", \"primitiveSocketLocalPort\", NULL },\r{ \"SocketPlugin\", \"primitiveSocketRemoteAddress\", NULL },\r{ \"SocketPlugin\", \"primitiveSocketRemotePort\", NULL },\r{ \"SocketPlugin\", \"primitiveSocketConnectToPort\", NULL },\r{ \"SocketPlugin\", \"primitiveSocketListenWithOrWithoutBacklog\", NULL },\r{ \"SocketPlugin\", \"primitiveSocketCloseConnection\", NULL },\r{ \"SocketPlugin\", \"primitiveSocketAbortConnection\", NULL },\r{ \"SocketPlugin\", \"primitiveSocketReceiveDataBufCount\", NULL },\r{ \"SocketPlugin\", \"primitiveSocketReceiveDataAvailable\", NULL },\r{ \"SocketPlugin\", \"primitiveSocketSendDataBufCount\", NULL },\r{ \"SocketPlugin\", \"primitiveSocketSendDone\", NULL },\r{ \"SocketPlugin\", \"primitiveSocketAccept\", NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ \"MiscPrimitivePlugin\", \"primitiveDecompressFromByteArray\", NULL },\r{ \"MiscPrimitivePlugin\", \"primitiveCompareString\", NULL },\r{ \"MiscPrimitivePlugin\", \"primitiveConvert8BitSigned\", NULL },\r{ \"MiscPrimitivePlugin\", \"primitiveCompressToByteArray\", NULL },\r{ \"SerialPlugin\", \"primitiveSerialPortOpen\", NULL },\r{ \"SerialPlugin\", \"primitiveSerialPortClose\", NULL },\r{ \"SerialPlugin\", \"primitiveSerialPortWrite\", NULL },\r{ \"SerialPlugin\", \"primitiveSerialPortRead\", NULL },\r{ NULL, NULL, NULL },\r{ \"MiscPrimitivePlugin\", \"primitiveTranslateStringWithTable\", NULL },\r{ \"MiscPrimitivePlugin\", \"primitiveFindFirstInString\", NULL },\r{ \"MiscPrimitivePlugin\", \"primitiveIndexOfAsciiInString\", NULL },\r{ \"MiscPrimitivePlugin\", \"primitiveFindSubstring\", NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ \"MIDIPlugin\", \"primitiveMIDIClosePort\", NULL },\r{ \"MIDIPlugin\", \"primitiveMIDIGetClock\", NULL },\r{ \"MIDIPlugin\", \"primitiveMIDIGetPortCount\", NULL },\r{ \"MIDIPlugin\", \"primitiveMIDIGetPortDirectionality\", NULL },\r{ \"MIDIPlugin\", \"primitiveMIDIGetPortName\", NULL },\r{ \"MIDIPlugin\", \"primitiveMIDIOpenPort\", NULL },\r{ \"MIDIPlugin\", \"primitiveMIDIParameterGetOrSet\", NULL },\r{ \"MIDIPlugin\", \"primitiveMIDIRead\", NULL },\r{ \"MIDIPlugin\", \"primitiveMIDIWrite\", NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ \"AsynchFilePlugin\", \"primitiveAsyncFileClose\", NULL },\r{ \"AsynchFilePlugin\", \"primitiveAsyncFileOpen\", NULL },\r{ \"AsynchFilePlugin\", \"primitiveAsyncFileReadResult\", NULL },\r{ \"AsynchFilePlugin\", \"primitiveAsyncFileReadStart\", NULL },\r{ \"AsynchFilePlugin\", \"primitiveAsyncFileWriteResult\", NULL },\r{ \"AsynchFilePlugin\", \"primitiveAsyncFileWriteStart\", NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ \"JoystickTabletPlugin\", \"primitiveGetTabletParameters\", NULL },\r{ \"JoystickTabletPlugin\", \"primitiveReadTablet\", NULL },\r{ \"ADPCMCodecPlugin\", \"primitiveDecodeMono\", NULL },\r{ \"ADPCMCodecPlugin\", \"primitiveDecodeStereo\", NULL },\r{ \"ADPCMCodecPlugin\", \"primitiveEncodeMono\", NULL },\r{ \"ADPCMCodecPlugin\", \"primitiveEncodeStereo\", NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL },\r{ NULL, NULL, NULL }\r};\rsqInt imageFormatVersionNumber = 0;\rconst char* obsoleteNamedPrimitiveTable[][3] = {\r{ \"gePrimitiveMergeFillFrom\", \"B2DPlugin\", \"primitiveMergeFillFrom\" },\r{ \"gePrimitiveSetClipRect\", \"B2DPlugin\", \"primitiveSetClipRect\" },\r{ \"gePrimitiveDoProfileStats\", \"B2DPlugin\", \"primitiveDoProfileStats\" },\r{ \"gePrimitiveAddCompressedShape\", \"B2DPlugin\", \"primitiveAddCompressedShape\" },\r{ \"gePrimitiveFinishedProcessing\", \"B2DPlugin\", \"primitiveFinishedProcessing\" },\r{ \"gePrimitiveGetBezierStats\", \"B2DPlugin\", \"primitiveGetBezierStats\" },\r{ \"gePrimitiveSetDepth\", \"B2DPlugin\", \"primitiveSetDepth\" },\r{ \"gePrimitiveAbortProcessing\", \"B2DPlugin\", \"primitiveAbortProcessing\" },\r{ \"gePrimitiveGetTimes\", \"B2DPlugin\", \"primitiveGetTimes\" },\r{ \"gePrimitiveNextActiveEdgeEntry\", \"B2DPlugin\", \"primitiveNextActiveEdgeEntry\" },\r{ \"gePrimitiveAddBezier\", \"B2DPlugin\", \"primitiveAddBezier\" },\r{ \"gePrimitiveRenderScanline\", \"B2DPlugin\", \"primitiveRenderScanline\" },\r{ \"gePrimitiveAddBezierShape\", \"B2DPlugin\", \"primitiveAddBezierShape\" },\r{ \"gePrimitiveAddLine\", \"B2DPlugin\", \"primitiveAddLine\" },\r{ \"gePrimitiveRenderImage\", \"B2DPlugin\", \"primitiveRenderImage\" },\r{ \"gePrimitiveGetAALevel\", \"B2DPlugin\", \"primitiveGetAALevel\" },\r{ \"gePrimitiveRegisterExternalEdge\", \"B2DPlugin\", \"primitiveRegisterExternalEdge\" },\r{ \"gePrimitiveInitializeBuffer\", \"B2DPlugin\", \"primitiveInitializeBuffer\" },\r{ \"gePrimitiveAddRect\", \"B2DPlugin\", \"primitiveAddRect\" },\r{ \"gePrimitiveInitializeProcessing\", \"B2DPlugin\", \"primitiveInitializeProcessing\" },\r{ \"gePrimitiveAddBitmapFill\", \"B2DPlugin\", \"primitiveAddBitmapFill\" },\r{ \"gePrimitiveGetClipRect\", \"B2DPlugin\", \"primitiveGetClipRect\" },\r{ \"gePrimitiveGetFailureReason\", \"B2DPlugin\", \"primitiveGetFailureReason\" },\r{ \"gePrimitiveNextGlobalEdgeEntry\", \"B2DPlugin\", \"primitiveNextGlobalEdgeEntry\" },\r{ \"gePrimitiveNextFillEntry\", \"B2DPlugin\", \"primitiveNextFillEntry\" },\r{ \"gePrimitiveSetColorTransform\", \"B2DPlugin\", \"primitiveSetColorTransform\" },\r{ \"gePrimitiveDisplaySpanBuffer\", \"B2DPlugin\", \"primitiveDisplaySpanBuffer\" },\r{ \"gePrimitiveGetOffset\", \"B2DPlugin\", \"primitiveGetOffset\" },\r{ \"gePrimitiveAddPolygon\", \"B2DPlugin\", \"primitiveAddPolygon\" },\r{ \"gePrimitiveNeedsFlush\", \"B2DPlugin\", \"primitiveNeedsFlush\" },\r{ \"gePrimitiveAddOval\", \"B2DPlugin\", \"primitiveAddOval\" },\r{ \"gePrimitiveSetAALevel\", \"B2DPlugin\", \"primitiveSetAALevel\" },\r{ \"gePrimitiveCopyBuffer\", \"B2DPlugin\", \"primitiveCopyBuffer\" },\r{ \"gePrimitiveAddActiveEdgeEntry\", \"B2DPlugin\", \"primitiveAddActiveEdgeEntry\" },\r{ \"gePrimitiveGetCounts\", \"B2DPlugin\", \"primitiveGetCounts\" },\r{ \"gePrimitiveSetOffset\", \"B2DPlugin\", \"primitiveSetOffset\" },\r{ \"gePrimitiveAddGradientFill\", \"B2DPlugin\", \"primitiveAddGradientFill\" },\r{ \"gePrimitiveChangedActiveEdgeEntry\", \"B2DPlugin\", \"primitiveChangedActiveEdgeEntry\" },\r{ \"gePrimitiveRegisterExternalFill\", \"B2DPlugin\", \"primitiveRegisterExternalFill\" },\r{ \"gePrimitiveGetDepth\", \"B2DPlugin\", \"primitiveGetDepth\" },\r{ \"gePrimitiveSetEdgeTransform\", \"B2DPlugin\", \"primitiveSetEdgeTransform\" },\r{ \"gePrimitiveNeedsFlushPut\", \"B2DPlugin\", \"primitiveNeedsFlushPut\" },\r{ \"primitiveFloatArrayAt\", \"FloatArrayPlugin\", \"primitiveAt\" },\r{ \"primitiveFloatArrayMulFloatArray\", \"FloatArrayPlugin\", \"primitiveMulFloatArray\" },\r{ \"primitiveFloatArrayAddScalar\", \"FloatArrayPlugin\", \"primitiveAddScalar\" },\r{ \"primitiveFloatArrayDivFloatArray\", \"FloatArrayPlugin\", \"primitiveDivFloatArray\" },\r{ \"primitiveFloatArrayDivScalar\", \"FloatArrayPlugin\", \"primitiveDivScalar\" },\r{ \"primitiveFloatArrayHash\", \"FloatArrayPlugin\", \"primitiveHashArray\" },\r{ \"primitiveFloatArrayAtPut\", \"FloatArrayPlugin\", \"primitiveAtPut\" },\r{ \"primitiveFloatArrayMulScalar\", \"FloatArrayPlugin\", \"primitiveMulScalar\" },\r{ \"primitiveFloatArrayAddFloatArray\", \"FloatArrayPlugin\", \"primitiveAddFloatArray\" },\r{ \"primitiveFloatArraySubScalar\", \"FloatArrayPlugin\", \"primitiveSubScalar\" },\r{ \"primitiveFloatArraySubFloatArray\", \"FloatArrayPlugin\", \"primitiveSubFloatArray\" },\r{ \"primitiveFloatArrayEqual\", \"FloatArrayPlugin\", \"primitiveEqual\" },\r{ \"primitiveFloatArrayDotProduct\", \"FloatArrayPlugin\", \"primitiveDotProduct\" },\r{ \"m23PrimitiveInvertRectInto\", \"Matrix2x3Plugin\", \"primitiveInvertRectInto\" },\r{ \"m23PrimitiveTransformPoint\", \"Matrix2x3Plugin\", \"primitiveTransformPoint\" },\r{ \"m23PrimitiveIsPureTranslation\", \"Matrix2x3Plugin\", \"primitiveIsPureTranslation\" },\r{ \"m23PrimitiveComposeMatrix\", \"Matrix2x3Plugin\", \"primitiveComposeMatrix\" },\r{ \"m23PrimitiveTransformRectInto\", \"Matrix2x3Plugin\", \"primitiveTransformRectInto\" },\r{ \"m23PrimitiveIsIdentity\", \"Matrix2x3Plugin\", \"primitiveIsIdentity\" },\r{ \"m23PrimitiveInvertPoint\", \"Matrix2x3Plugin\", \"primitiveInvertPoint\" },\r{ \"primitiveDeflateBlock\", \"ZipPlugin\", \"primitiveDeflateBlock\" },\r{ \"primitiveDeflateUpdateHashTable\", \"ZipPlugin\", \"primitiveDeflateUpdateHashTable\" },\r{ \"primitiveUpdateGZipCrc32\", \"ZipPlugin\", \"primitiveUpdateGZipCrc32\" },\r{ \"primitiveInflateDecompressBlock\", \"ZipPlugin\", \"primitiveInflateDecompressBlock\" },\r{ \"primitiveZipSendBlock\", \"ZipPlugin\", \"primitiveZipSendBlock\" },\r{ \"primitiveFFTTransformData\", \"FFTPlugin\", \"primitiveFFTTransformData\" },\r{ \"primitiveFFTScaleData\", \"FFTPlugin\", \"primitiveFFTScaleData\" },\r{ \"primitiveFFTPermuteData\", \"FFTPlugin\", \"primitiveFFTPermuteData\" },\r{ NULL, NULL, NULL }\r};\rstruct VirtualMachine* interpreterProxy;\rvoid *primitiveTable[577] = {\r\t/* 0*/ (void *)primitiveFail,\r\t/* 1*/ (void *)primitiveAdd,\r\t/* 2*/ (void *)primitiveSubtract,\r\t/* 3*/ (void *)primitiveLessThan,\r\t/* 4*/ (void *)primitiveGreaterThan,\r\t/* 5*/ (void *)primitiveLessOrEqual,\r\t/* 6*/ (void *)primitiveGreaterOrEqual,\r\t/* 7*/ (void *)primitiveEqual,\r\t/* 8*/ (void *)primitiveNotEqual,\r\t/* 9*/ (void *)primitiveMultiply,\r\t/* 10*/ (void *)primitiveDivide,\r\t/* 11*/ (void *)primitiveMod,\r\t/* 12*/ (void *)primitiveDiv,\r\t/* 13*/ (void *)primitiveQuo,\r\t/* 14*/ (void *)primitiveBitAnd,\r\t/* 15*/ (void *)primitiveBitOr,\r\t/* 16*/ (void *)primitiveBitXor,\r\t/* 17*/ (void *)primitiveBitShift,\r\t/* 18*/ (void *)primitiveMakePoint,\r\t/* 19*/ (void *)primitiveFail,\r\t/* 20*/ (void *)primitiveFail,\r\t/* 21*/ (void *)primitiveFail,\r\t/* 22*/ (void *)primitiveFail,\r\t/* 23*/ (void *)primitiveFail,\r\t/* 24*/ (void *)primitiveFail,\r\t/* 25*/ (void *)primitiveFail,\r\t/* 26*/ (void *)primitiveFail,\r\t/* 27*/ (void *)primitiveFail,\r\t/* 28*/ (void *)primitiveFail,\r\t/* 29*/ (void *)primitiveFail,\r\t/* 30*/ (void *)primitiveFail,\r\t/* 31*/ (void *)primitiveFail,\r\t/* 32*/ (void *)primitiveFail,\r\t/* 33*/ (void *)primitiveFail,\r\t/* 34*/ (void *)primitiveFail,\r\t/* 35*/ (void *)primitiveFail,\r\t/* 36*/ (void *)primitiveFail,\r\t/* 37*/ (void *)primitiveFail,\r\t/* 38*/ (void *)primitiveFail,\r\t/* 39*/ (void *)primitiveFail,\r\t/* 40*/ (void *)primitiveAsFloat,\r\t/* 41*/ (void *)primitiveFloatAdd,\r\t/* 42*/ (void *)primitiveFloatSubtract,\r\t/* 43*/ (void *)primitiveFloatLessThan,\r\t/* 44*/ (void *)primitiveFloatGreaterThan,\r\t/* 45*/ (void *)primitiveFloatLessOrEqual,\r\t/* 46*/ (void *)primitiveFloatGreaterOrEqual,\r\t/* 47*/ (void *)primitiveFloatEqual,\r\t/* 48*/ (void *)primitiveFloatNotEqual,\r\t/* 49*/ (void *)primitiveFloatMultiply,\r\t/* 50*/ (void *)primitiveFloatDivide,\r\t/* 51*/ (void *)primitiveTruncated,\r\t/* 52*/ (void *)primitiveFractionalPart,\r\t/* 53*/ (void *)primitiveExponent,\r\t/* 54*/ (void *)primitiveTimesTwoPower,\r\t/* 55*/ (void *)primitiveSquareRoot,\r\t/* 56*/ (void *)primitiveSine,\r\t/* 57*/ (void *)primitiveArctan,\r\t/* 58*/ (void *)primitiveLogN,\r\t/* 59*/ (void *)primitiveExp,\r\t/* 60*/ (void *)primitiveAt,\r\t/* 61*/ (void *)primitiveAtPut,\r\t/* 62*/ (void *)primitiveSize,\r\t/* 63*/ (void *)primitiveStringAt,\r\t/* 64*/ (void *)primitiveStringAtPut,\r\t/* 65*/ (void *)primitiveNext,\r\t/* 66*/ (void *)primitiveNextPut,\r\t/* 67*/ (void *)primitiveAtEnd,\r\t/* 68*/ (void *)primitiveObjectAt,\r\t/* 69*/ (void *)primitiveObjectAtPut,\r\t/* 70*/ (void *)primitiveNew,\r\t/* 71*/ (void *)primitiveNewWithArg,\r\t/* 72*/ (void *)primitiveArrayBecomeOneWay,\r\t/* 73*/ (void *)primitiveInstVarAt,\r\t/* 74*/ (void *)primitiveInstVarAtPut,\r\t/* 75*/ (void *)primitiveAsOop,\r\t/* 76*/ (void *)primitiveStoreStackp,\r\t/* 77*/ (void *)primitiveSomeInstance,\r\t/* 78*/ (void *)primitiveNextInstance,\r\t/* 79*/ (void *)primitiveNewMethod,\r\t/* 80*/ (void *)primitiveBlockCopy,\r\t/* 81*/ (void *)primitiveValue,\r\t/* 82*/ (void *)primitiveValueWithArgs,\r\t/* 83*/ (void *)primitivePerform,\r\t/* 84*/ (void *)primitivePerformWithArgs,\r\t/* 85*/ (void *)primitiveSignal,\r\t/* 86*/ (void *)primitiveWait,\r\t/* 87*/ (void *)primitiveResume,\r\t/* 88*/ (void *)primitiveSuspend,\r\t/* 89*/ (void *)primitiveFlushCache,\r\t/* 90*/ (void *)primitiveMousePoint,\r\t/* 91*/ (void *)primitiveTestDisplayDepth,\r\t/* 92*/ (void *)primitiveSetDisplayMode,\r\t/* 93*/ (void *)primitiveInputSemaphore,\r\t/* 94*/ (void *)primitiveGetNextEvent,\r\t/* 95*/ (void *)primitiveInputWord,\r\t/* 96*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 97*/ (void *)primitiveSnapshot,\r\t/* 98*/ (void *)primitiveStoreImageSegment,\r\t/* 99*/ (void *)primitiveLoadImageSegment,\r\t/* 100*/ (void *)primitivePerformInSuperclass,\r\t/* 101*/ (void *)primitiveBeCursor,\r\t/* 102*/ (void *)primitiveBeDisplay,\r\t/* 103*/ (void *)primitiveScanCharacters,\r\t/* 104*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 105*/ (void *)primitiveStringReplace,\r\t/* 106*/ (void *)primitiveScreenSize,\r\t/* 107*/ (void *)primitiveMouseButtons,\r\t/* 108*/ (void *)primitiveKbdNext,\r\t/* 109*/ (void *)primitiveKbdPeek,\r\t/* 110*/ (void *)primitiveEquivalent,\r\t/* 111*/ (void *)primitiveClass,\r\t/* 112*/ (void *)primitiveBytesLeft,\r\t/* 113*/ (void *)primitiveQuit,\r\t/* 114*/ (void *)primitiveExitToDebugger,\r\t/* 115*/ (void *)primitiveChangeClass,\r\t/* 116*/ (void *)primitiveFlushCacheByMethod,\r\t/* 117*/ (void *)primitiveExternalCall,\r\t/* 118*/ (void *)primitiveDoPrimitiveWithArgs,\r\t/* 119*/ (void *)primitiveFlushCacheSelective,\r\t/* 120*/ (void *)primitiveCalloutToFFI,\r\t/* 121*/ (void *)primitiveImageName,\r\t/* 122*/ (void *)primitiveNoop,\r\t/* 123*/ (void *)primitiveValueUninterruptably,\r\t/* 124*/ (void *)primitiveLowSpaceSemaphore,\r\t/* 125*/ (void *)primitiveSignalAtBytesLeft,\r\t/* 126*/ (void *)primitiveDeferDisplayUpdates,\r\t/* 127*/ (void *)primitiveShowDisplayRect,\r\t/* 128*/ (void *)primitiveArrayBecome,\r\t/* 129*/ (void *)primitiveSpecialObjectsOop,\r\t/* 130*/ (void *)primitiveFullGC,\r\t/* 131*/ (void *)primitiveIncrementalGC,\r\t/* 132*/ (void *)primitiveObjectPointsTo,\r\t/* 133*/ (void *)primitiveSetInterruptKey,\r\t/* 134*/ (void *)primitiveInterruptSemaphore,\r\t/* 135*/ (void *)primitiveMillisecondClock,\r\t/* 136*/ (void *)primitiveSignalAtMilliseconds,\r\t/* 137*/ (void *)primitiveSecondsClock,\r\t/* 138*/ (void *)primitiveSomeObject,\r\t/* 139*/ (void *)primitiveNextObject,\r\t/* 140*/ (void *)primitiveBeep,\r\t/* 141*/ (void *)primitiveClipboardText,\r\t/* 142*/ (void *)primitiveVMPath,\r\t/* 143*/ (void *)primitiveShortAt,\r\t/* 144*/ (void *)primitiveShortAtPut,\r\t/* 145*/ (void *)primitiveConstantFill,\r\t/* 146*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 147*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 148*/ (void *)primitiveClone,\r\t/* 149*/ (void *)primitiveGetAttribute,\r\t/* 150*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 151*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 152*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 153*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 154*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 155*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 156*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 157*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 158*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 159*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 160*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 161*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 162*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 163*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 164*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 165*/ (void *)primitiveIntegerAt,\r\t/* 166*/ (void *)primitiveIntegerAtPut,\r\t/* 167*/ (void *)primitiveYield,\r\t/* 168*/ (void *)primitiveCopyObject,\r\t/* 169*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 170*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 171*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 172*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 173*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 174*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 175*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 176*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 177*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 178*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 179*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 180*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 181*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 182*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 183*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 184*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 185*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 186*/ (void *)primitiveFail,\r\t/* 187*/ (void *)primitiveFail,\r\t/* 188*/ (void *)primitiveExecuteMethodArgsArray,\r\t/* 189*/ (void *)primitiveExecuteMethod,\r\t/* 190*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 191*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 192*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 193*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 194*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 195*/ (void *)primitiveFindNextUnwindContext,\r\t/* 196*/ (void *)primitiveTerminateTo,\r\t/* 197*/ (void *)primitiveFindHandlerContext,\r\t/* 198*/ (void *)primitiveMarkUnwindMethod,\r\t/* 199*/ (void *)primitiveMarkHandlerMethod,\r\t/* 200*/ (void *)primitiveClosureCopyWithCopiedValues,\r\t/* 201*/ (void *)primitiveClosureValue,\r\t/* 202*/ (void *)primitiveClosureValue,\r\t/* 203*/ (void *)primitiveClosureValue,\r\t/* 204*/ (void *)primitiveClosureValue,\r\t/* 205*/ (void *)primitiveClosureValue,\r\t/* 206*/ (void *)primitiveClosureValueWithArgs,\r\t/* 207*/ (void *)primitiveFail,\r\t/* 208*/ (void *)primitiveFail,\r\t/* 209*/ (void *)primitiveFail,\r\t/* 210*/ (void *)primitiveAt,\r\t/* 211*/ (void *)primitiveAtPut,\r\t/* 212*/ (void *)primitiveSize,\r\t/* 213*/ (void *)primitiveFail,\r\t/* 214*/ (void *)primitiveFail,\r\t/* 215*/ (void *)primitiveFail,\r\t/* 216*/ (void *)primitiveFail,\r\t/* 217*/ (void *)primitiveFail,\r\t/* 218*/ (void *)primitiveDoNamedPrimitiveWithArgs,\r\t/* 219*/ (void *)primitiveFail,\r\t/* 220*/ (void *)primitiveFail,\r\t/* 221*/ (void *)primitiveClosureValueNoContextSwitch,\r\t/* 222*/ (void *)primitiveClosureValueNoContextSwitch,\r\t/* 223*/ (void *)primitiveFail,\r\t/* 224*/ (void *)primitiveFail,\r\t/* 225*/ (void *)primitiveFail,\r\t/* 226*/ (void *)primitiveFail,\r\t/* 227*/ (void *)primitiveFail,\r\t/* 228*/ (void *)primitiveFail,\r\t/* 229*/ (void *)primitiveFail,\r\t/* 230*/ (void *)primitiveRelinquishProcessor,\r\t/* 231*/ (void *)primitiveForceDisplayUpdate,\r\t/* 232*/ (void *)primitiveFormPrint,\r\t/* 233*/ (void *)primitiveSetFullScreen,\r\t/* 234*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 235*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 236*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 237*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 238*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 239*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 240*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 241*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 242*/ (void *)primitiveFail,\r\t/* 243*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 244*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 245*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 246*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 247*/ (void *)primitiveSnapshotEmbedded,\r\t/* 248*/ (void *)primitiveInvokeObjectAsMethod,\r\t/* 249*/ (void *)primitiveArrayBecomeOneWayCopyHash,\r\t/* 250*/ (void *)clearProfile,\r\t/* 251*/ (void *)dumpProfile,\r\t/* 252*/ (void *)startProfiling,\r\t/* 253*/ (void *)stopProfiling,\r\t/* 254*/ (void *)primitiveVMParameter,\r\t/* 255*/ (void *)primitiveInstVarsPutFromStack,\r\t/* 256*/ (void *)primitivePushSelf,\r\t/* 257*/ (void *)primitivePushTrue,\r\t/* 258*/ (void *)primitivePushFalse,\r\t/* 259*/ (void *)primitivePushNil,\r\t/* 260*/ (void *)primitivePushMinusOne,\r\t/* 261*/ (void *)primitivePushZero,\r\t/* 262*/ (void *)primitivePushOne,\r\t/* 263*/ (void *)primitivePushTwo,\r\t/* 264*/ (void *)primitiveLoadInstVar,\r\t/* 265*/ (void *)primitiveLoadInstVar,\r\t/* 266*/ (void *)primitiveLoadInstVar,\r\t/* 267*/ (void *)primitiveLoadInstVar,\r\t/* 268*/ (void *)primitiveLoadInstVar,\r\t/* 269*/ (void *)primitiveLoadInstVar,\r\t/* 270*/ (void *)primitiveLoadInstVar,\r\t/* 271*/ (void *)primitiveLoadInstVar,\r\t/* 272*/ (void *)primitiveLoadInstVar,\r\t/* 273*/ (void *)primitiveLoadInstVar,\r\t/* 274*/ (void *)primitiveLoadInstVar,\r\t/* 275*/ (void *)primitiveLoadInstVar,\r\t/* 276*/ (void *)primitiveLoadInstVar,\r\t/* 277*/ (void *)primitiveLoadInstVar,\r\t/* 278*/ (void *)primitiveLoadInstVar,\r\t/* 279*/ (void *)primitiveLoadInstVar,\r\t/* 280*/ (void *)primitiveLoadInstVar,\r\t/* 281*/ (void *)primitiveLoadInstVar,\r\t/* 282*/ (void *)primitiveLoadInstVar,\r\t/* 283*/ (void *)primitiveLoadInstVar,\r\t/* 284*/ (void *)primitiveLoadInstVar,\r\t/* 285*/ (void *)primitiveLoadInstVar,\r\t/* 286*/ (void *)primitiveLoadInstVar,\r\t/* 287*/ (void *)primitiveLoadInstVar,\r\t/* 288*/ (void *)primitiveLoadInstVar,\r\t/* 289*/ (void *)primitiveLoadInstVar,\r\t/* 290*/ (void *)primitiveLoadInstVar,\r\t/* 291*/ (void *)primitiveLoadInstVar,\r\t/* 292*/ (void *)primitiveLoadInstVar,\r\t/* 293*/ (void *)primitiveLoadInstVar,\r\t/* 294*/ (void *)primitiveLoadInstVar,\r\t/* 295*/ (void *)primitiveLoadInstVar,\r\t/* 296*/ (void *)primitiveLoadInstVar,\r\t/* 297*/ (void *)primitiveLoadInstVar,\r\t/* 298*/ (void *)primitiveLoadInstVar,\r\t/* 299*/ (void *)primitiveLoadInstVar,\r\t/* 300*/ (void *)primitiveLoadInstVar,\r\t/* 301*/ (void *)primitiveLoadInstVar,\r\t/* 302*/ (void *)primitiveLoadInstVar,\r\t/* 303*/ (void *)primitiveLoadInstVar,\r\t/* 304*/ (void *)primitiveLoadInstVar,\r\t/* 305*/ (void *)primitiveLoadInstVar,\r\t/* 306*/ (void *)primitiveLoadInstVar,\r\t/* 307*/ (void *)primitiveLoadInstVar,\r\t/* 308*/ (void *)primitiveLoadInstVar,\r\t/* 309*/ (void *)primitiveLoadInstVar,\r\t/* 310*/ (void *)primitiveLoadInstVar,\r\t/* 311*/ (void *)primitiveLoadInstVar,\r\t/* 312*/ (void *)primitiveLoadInstVar,\r\t/* 313*/ (void *)primitiveLoadInstVar,\r\t/* 314*/ (void *)primitiveLoadInstVar,\r\t/* 315*/ (void *)primitiveLoadInstVar,\r\t/* 316*/ (void *)primitiveLoadInstVar,\r\t/* 317*/ (void *)primitiveLoadInstVar,\r\t/* 318*/ (void *)primitiveLoadInstVar,\r\t/* 319*/ (void *)primitiveLoadInstVar,\r\t/* 320*/ (void *)primitiveLoadInstVar,\r\t/* 321*/ (void *)primitiveLoadInstVar,\r\t/* 322*/ (void *)primitiveLoadInstVar,\r\t/* 323*/ (void *)primitiveLoadInstVar,\r\t/* 324*/ (void *)primitiveLoadInstVar,\r\t/* 325*/ (void *)primitiveLoadInstVar,\r\t/* 326*/ (void *)primitiveLoadInstVar,\r\t/* 327*/ (void *)primitiveLoadInstVar,\r\t/* 328*/ (void *)primitiveLoadInstVar,\r\t/* 329*/ (void *)primitiveLoadInstVar,\r\t/* 330*/ (void *)primitiveLoadInstVar,\r\t/* 331*/ (void *)primitiveLoadInstVar,\r\t/* 332*/ (void *)primitiveLoadInstVar,\r\t/* 333*/ (void *)primitiveLoadInstVar,\r\t/* 334*/ (void *)primitiveLoadInstVar,\r\t/* 335*/ (void *)primitiveLoadInstVar,\r\t/* 336*/ (void *)primitiveLoadInstVar,\r\t/* 337*/ (void *)primitiveLoadInstVar,\r\t/* 338*/ (void *)primitiveLoadInstVar,\r\t/* 339*/ (void *)primitiveLoadInstVar,\r\t/* 340*/ (void *)primitiveLoadInstVar,\r\t/* 341*/ (void *)primitiveLoadInstVar,\r\t/* 342*/ (void *)primitiveLoadInstVar,\r\t/* 343*/ (void *)primitiveLoadInstVar,\r\t/* 344*/ (void *)primitiveLoadInstVar,\r\t/* 345*/ (void *)primitiveLoadInstVar,\r\t/* 346*/ (void *)primitiveLoadInstVar,\r\t/* 347*/ (void *)primitiveLoadInstVar,\r\t/* 348*/ (void *)primitiveLoadInstVar,\r\t/* 349*/ (void *)primitiveLoadInstVar,\r\t/* 350*/ (void *)primitiveLoadInstVar,\r\t/* 351*/ (void *)primitiveLoadInstVar,\r\t/* 352*/ (void *)primitiveLoadInstVar,\r\t/* 353*/ (void *)primitiveLoadInstVar,\r\t/* 354*/ (void *)primitiveLoadInstVar,\r\t/* 355*/ (void *)primitiveLoadInstVar,\r\t/* 356*/ (void *)primitiveLoadInstVar,\r\t/* 357*/ (void *)primitiveLoadInstVar,\r\t/* 358*/ (void *)primitiveLoadInstVar,\r\t/* 359*/ (void *)primitiveLoadInstVar,\r\t/* 360*/ (void *)primitiveLoadInstVar,\r\t/* 361*/ (void *)primitiveLoadInstVar,\r\t/* 362*/ (void *)primitiveLoadInstVar,\r\t/* 363*/ (void *)primitiveLoadInstVar,\r\t/* 364*/ (void *)primitiveLoadInstVar,\r\t/* 365*/ (void *)primitiveLoadInstVar,\r\t/* 366*/ (void *)primitiveLoadInstVar,\r\t/* 367*/ (void *)primitiveLoadInstVar,\r\t/* 368*/ (void *)primitiveLoadInstVar,\r\t/* 369*/ (void *)primitiveLoadInstVar,\r\t/* 370*/ (void *)primitiveLoadInstVar,\r\t/* 371*/ (void *)primitiveLoadInstVar,\r\t/* 372*/ (void *)primitiveLoadInstVar,\r\t/* 373*/ (void *)primitiveLoadInstVar,\r\t/* 374*/ (void *)primitiveLoadInstVar,\r\t/* 375*/ (void *)primitiveLoadInstVar,\r\t/* 376*/ (void *)primitiveLoadInstVar,\r\t/* 377*/ (void *)primitiveLoadInstVar,\r\t/* 378*/ (void *)primitiveLoadInstVar,\r\t/* 379*/ (void *)primitiveLoadInstVar,\r\t/* 380*/ (void *)primitiveLoadInstVar,\r\t/* 381*/ (void *)primitiveLoadInstVar,\r\t/* 382*/ (void *)primitiveLoadInstVar,\r\t/* 383*/ (void *)primitiveLoadInstVar,\r\t/* 384*/ (void *)primitiveLoadInstVar,\r\t/* 385*/ (void *)primitiveLoadInstVar,\r\t/* 386*/ (void *)primitiveLoadInstVar,\r\t/* 387*/ (void *)primitiveLoadInstVar,\r\t/* 388*/ (void *)primitiveLoadInstVar,\r\t/* 389*/ (void *)primitiveLoadInstVar,\r\t/* 390*/ (void *)primitiveLoadInstVar,\r\t/* 391*/ (void *)primitiveLoadInstVar,\r\t/* 392*/ (void *)primitiveLoadInstVar,\r\t/* 393*/ (void *)primitiveLoadInstVar,\r\t/* 394*/ (void *)primitiveLoadInstVar,\r\t/* 395*/ (void *)primitiveLoadInstVar,\r\t/* 396*/ (void *)primitiveLoadInstVar,\r\t/* 397*/ (void *)primitiveLoadInstVar,\r\t/* 398*/ (void *)primitiveLoadInstVar,\r\t/* 399*/ (void *)primitiveLoadInstVar,\r\t/* 400*/ (void *)primitiveLoadInstVar,\r\t/* 401*/ (void *)primitiveLoadInstVar,\r\t/* 402*/ (void *)primitiveLoadInstVar,\r\t/* 403*/ (void *)primitiveLoadInstVar,\r\t/* 404*/ (void *)primitiveLoadInstVar,\r\t/* 405*/ (void *)primitiveLoadInstVar,\r\t/* 406*/ (void *)primitiveLoadInstVar,\r\t/* 407*/ (void *)primitiveLoadInstVar,\r\t/* 408*/ (void *)primitiveLoadInstVar,\r\t/* 409*/ (void *)primitiveLoadInstVar,\r\t/* 410*/ (void *)primitiveLoadInstVar,\r\t/* 411*/ (void *)primitiveLoadInstVar,\r\t/* 412*/ (void *)primitiveLoadInstVar,\r\t/* 413*/ (void *)primitiveLoadInstVar,\r\t/* 414*/ (void *)primitiveLoadInstVar,\r\t/* 415*/ (void *)primitiveLoadInstVar,\r\t/* 416*/ (void *)primitiveLoadInstVar,\r\t/* 417*/ (void *)primitiveLoadInstVar,\r\t/* 418*/ (void *)primitiveLoadInstVar,\r\t/* 419*/ (void *)primitiveLoadInstVar,\r\t/* 420*/ (void *)primitiveLoadInstVar,\r\t/* 421*/ (void *)primitiveLoadInstVar,\r\t/* 422*/ (void *)primitiveLoadInstVar,\r\t/* 423*/ (void *)primitiveLoadInstVar,\r\t/* 424*/ (void *)primitiveLoadInstVar,\r\t/* 425*/ (void *)primitiveLoadInstVar,\r\t/* 426*/ (void *)primitiveLoadInstVar,\r\t/* 427*/ (void *)primitiveLoadInstVar,\r\t/* 428*/ (void *)primitiveLoadInstVar,\r\t/* 429*/ (void *)primitiveLoadInstVar,\r\t/* 430*/ (void *)primitiveLoadInstVar,\r\t/* 431*/ (void *)primitiveLoadInstVar,\r\t/* 432*/ (void *)primitiveLoadInstVar,\r\t/* 433*/ (void *)primitiveLoadInstVar,\r\t/* 434*/ (void *)primitiveLoadInstVar,\r\t/* 435*/ (void *)primitiveLoadInstVar,\r\t/* 436*/ (void *)primitiveLoadInstVar,\r\t/* 437*/ (void *)primitiveLoadInstVar,\r\t/* 438*/ (void *)primitiveLoadInstVar,\r\t/* 439*/ (void *)primitiveLoadInstVar,\r\t/* 440*/ (void *)primitiveLoadInstVar,\r\t/* 441*/ (void *)primitiveLoadInstVar,\r\t/* 442*/ (void *)primitiveLoadInstVar,\r\t/* 443*/ (void *)primitiveLoadInstVar,\r\t/* 444*/ (void *)primitiveLoadInstVar,\r\t/* 445*/ (void *)primitiveLoadInstVar,\r\t/* 446*/ (void *)primitiveLoadInstVar,\r\t/* 447*/ (void *)primitiveLoadInstVar,\r\t/* 448*/ (void *)primitiveLoadInstVar,\r\t/* 449*/ (void *)primitiveLoadInstVar,\r\t/* 450*/ (void *)primitiveLoadInstVar,\r\t/* 451*/ (void *)primitiveLoadInstVar,\r\t/* 452*/ (void *)primitiveLoadInstVar,\r\t/* 453*/ (void *)primitiveLoadInstVar,\r\t/* 454*/ (void *)primitiveLoadInstVar,\r\t/* 455*/ (void *)primitiveLoadInstVar,\r\t/* 456*/ (void *)primitiveLoadInstVar,\r\t/* 457*/ (void *)primitiveLoadInstVar,\r\t/* 458*/ (void *)primitiveLoadInstVar,\r\t/* 459*/ (void *)primitiveLoadInstVar,\r\t/* 460*/ (void *)primitiveLoadInstVar,\r\t/* 461*/ (void *)primitiveLoadInstVar,\r\t/* 462*/ (void *)primitiveLoadInstVar,\r\t/* 463*/ (void *)primitiveLoadInstVar,\r\t/* 464*/ (void *)primitiveLoadInstVar,\r\t/* 465*/ (void *)primitiveLoadInstVar,\r\t/* 466*/ (void *)primitiveLoadInstVar,\r\t/* 467*/ (void *)primitiveLoadInstVar,\r\t/* 468*/ (void *)primitiveLoadInstVar,\r\t/* 469*/ (void *)primitiveLoadInstVar,\r\t/* 470*/ (void *)primitiveLoadInstVar,\r\t/* 471*/ (void *)primitiveLoadInstVar,\r\t/* 472*/ (void *)primitiveLoadInstVar,\r\t/* 473*/ (void *)primitiveLoadInstVar,\r\t/* 474*/ (void *)primitiveLoadInstVar,\r\t/* 475*/ (void *)primitiveLoadInstVar,\r\t/* 476*/ (void *)primitiveLoadInstVar,\r\t/* 477*/ (void *)primitiveLoadInstVar,\r\t/* 478*/ (void *)primitiveLoadInstVar,\r\t/* 479*/ (void *)primitiveLoadInstVar,\r\t/* 480*/ (void *)primitiveLoadInstVar,\r\t/* 481*/ (void *)primitiveLoadInstVar,\r\t/* 482*/ (void *)primitiveLoadInstVar,\r\t/* 483*/ (void *)primitiveLoadInstVar,\r\t/* 484*/ (void *)primitiveLoadInstVar,\r\t/* 485*/ (void *)primitiveLoadInstVar,\r\t/* 486*/ (void *)primitiveLoadInstVar,\r\t/* 487*/ (void *)primitiveLoadInstVar,\r\t/* 488*/ (void *)primitiveLoadInstVar,\r\t/* 489*/ (void *)primitiveLoadInstVar,\r\t/* 490*/ (void *)primitiveLoadInstVar,\r\t/* 491*/ (void *)primitiveLoadInstVar,\r\t/* 492*/ (void *)primitiveLoadInstVar,\r\t/* 493*/ (void *)primitiveLoadInstVar,\r\t/* 494*/ (void *)primitiveLoadInstVar,\r\t/* 495*/ (void *)primitiveLoadInstVar,\r\t/* 496*/ (void *)primitiveLoadInstVar,\r\t/* 497*/ (void *)primitiveLoadInstVar,\r\t/* 498*/ (void *)primitiveLoadInstVar,\r\t/* 499*/ (void *)primitiveLoadInstVar,\r\t/* 500*/ (void *)primitiveLoadInstVar,\r\t/* 501*/ (void *)primitiveLoadInstVar,\r\t/* 502*/ (void *)primitiveLoadInstVar,\r\t/* 503*/ (void *)primitiveLoadInstVar,\r\t/* 504*/ (void *)primitiveLoadInstVar,\r\t/* 505*/ (void *)primitiveLoadInstVar,\r\t/* 506*/ (void *)primitiveLoadInstVar,\r\t/* 507*/ (void *)primitiveLoadInstVar,\r\t/* 508*/ (void *)primitiveLoadInstVar,\r\t/* 509*/ (void *)primitiveLoadInstVar,\r\t/* 510*/ (void *)primitiveLoadInstVar,\r\t/* 511*/ (void *)primitiveLoadInstVar,\r\t/* 512*/ (void *)primitiveLoadInstVar,\r\t/* 513*/ (void *)primitiveLoadInstVar,\r\t/* 514*/ (void *)primitiveLoadInstVar,\r\t/* 515*/ (void *)primitiveLoadInstVar,\r\t/* 516*/ (void *)primitiveLoadInstVar,\r\t/* 517*/ (void *)primitiveLoadInstVar,\r\t/* 518*/ (void *)primitiveLoadInstVar,\r\t/* 519*/ (void *)primitiveLoadInstVar,\r\t/* 520*/ (void *)primitiveFail,\r\t/* 521*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 522*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 523*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 524*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 525*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 526*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 527*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 528*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 529*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 530*/ (void *)primitiveFail,\r\t/* 531*/ (void *)primitiveFail,\r\t/* 532*/ (void *)primitiveFail,\r\t/* 533*/ (void *)primitiveFail,\r\t/* 534*/ (void *)primitiveFail,\r\t/* 535*/ (void *)primitiveFail,\r\t/* 536*/ (void *)primitiveFail,\r\t/* 537*/ (void *)primitiveFail,\r\t/* 538*/ (void *)primitiveFail,\r\t/* 539*/ (void *)primitiveFail,\r\t/* 540*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 541*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 542*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 543*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 544*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 545*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 546*/ (void *)primitiveFail,\r\t/* 547*/ (void *)primitiveFail,\r\t/* 548*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 549*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 550*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 551*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 552*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 553*/ (void *)primitiveObsoleteIndexedPrimitive,\r\t/* 554*/ (void *)primitiveFail,\r\t/* 555*/ (void *)primitiveFail,\r\t/* 556*/ (void *)primitiveFail,\r\t/* 557*/ (void *)primitiveFail,\r\t/* 558*/ (void *)primitiveFail,\r\t/* 559*/ (void *)primitiveFail,\r\t/* 560*/ (void *)primitiveFail,\r\t/* 561*/ (void *)primitiveFail,\r\t/* 562*/ (void *)primitiveFail,\r\t/* 563*/ (void *)primitiveFail,\r\t/* 564*/ (void *)primitiveFail,\r\t/* 565*/ (void *)primitiveFail,\r\t/* 566*/ (void *)primitiveFail,\r\t/* 567*/ (void *)primitiveFail,\r\t/* 568*/ (void *)primitiveFail,\r\t/* 569*/ (void *)primitiveFail,\r\t/* 570*/ (void *)primitiveFlushExternalPrimitives,\r\t/* 571*/ (void *)primitiveUnloadModule,\r\t/* 572*/ (void *)primitiveListBuiltinModule,\r\t/* 573*/ (void *)primitiveListExternalModule,\r\t/* 574*/ (void *)primitiveFail,\r\t/* 575*/ (void *)primitiveFail,\r 0 };\rusqInt memory;\rvoid* showSurfaceFn;\r\r\r\r/*\tReturn the accessible object following the given object or \r\tfree chunk in the heap. Return nil when heap is exhausted. */\r\rsqInt accessibleObjectAfter(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt obj;\r    sqInt sz;\r    sqInt sz1;\r    sqInt header;\r    sqInt header1;\r\r\t/* begin objectAfter: */\r\tif (DoAssertionChecks) {\r\t\tif ((((usqInt) oop)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\terror(\"no objects after the end of memory\");\r\t\t}\r\t}\r\tif (((longAt(oop)) & TypeMask) == HeaderTypeFree) {\r\t\tsz1 = (longAt(oop)) & (ALL_BUT_TYPE_MASK);\r\t} else {\r\t\t/* begin sizeBitsOf: */\r\t\theader = longAt(oop);\r\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\tsz1 = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\tsz1 = header & (SIZE_MASK);\r\t\t\tgoto l1;\r\t\t}\r\tl1:\t/* end sizeBitsOf: */;\r\t}\r\tobj = (oop + sz1) + (foo->headerTypeBytes[(longAt(oop + sz1)) & TypeMask]);\r\twhile ((((usqInt) obj)) < (((usqInt) foo->endOfMemory))) {\r\t\tif (!(((longAt(obj)) & TypeMask) == HeaderTypeFree)) {\r\t\t\treturn obj;\r\t\t}\r\t\t/* begin objectAfter: */\r\t\tif (DoAssertionChecks) {\r\t\t\tif ((((usqInt) obj)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t}\r\t\t}\r\t\tif (((longAt(obj)) & TypeMask) == HeaderTypeFree) {\r\t\t\tsz = (longAt(obj)) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader1 = longAt(obj);\r\t\t\tif ((header1 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(obj - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l2;\r\t\t\t} else {\r\t\t\t\tsz = header1 & (SIZE_MASK);\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\tl2:\t/* end sizeBitsOf: */;\r\t\t}\r\t\tobj = (obj + sz) + (foo->headerTypeBytes[(longAt(obj + sz)) & TypeMask]);\r\t}\r\treturn null;\r}\r\r\r/*\tSimilar to activateNewMethod but for Closure and newMethod. */\r\rsqInt activateNewClosureMethod(sqInt blockClosure) {\rregister struct foo * foo = &fum;\r    sqInt numCopied;\r    sqInt where;\r    sqInt i;\r    sqInt theBlockClosure;\r    sqInt closureMethod;\r    sqInt newContext;\r    sqInt methodHeader;\r    sqInt outerContext;\r    sqInt oop;\r    sqInt activeCntx;\r    sqInt valuePointer;\r    sqInt valuePointer1;\r    sqInt tmp;\r\r\tif (DoAssertionChecks) {\r\t\tokayOop(blockClosure);\r\t}\r\touterContext = longAt((blockClosure + (BASE_HEADER_SIZE)) + (ClosureOuterContextIndex << (SHIFT_FOR_WORD)));\r\tif (DoAssertionChecks) {\r\t\tokayOop(outerContext);\r\t}\r\tclosureMethod = longAt((outerContext + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\tmethodHeader = longAt((closureMethod + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD)));\r\t/* begin pushRemappableOop: */\r\tfoo->remapBuffer[foo->remapBufferCount += 1] = blockClosure;\r\r\t/* All for one, and one for all! */\r\t/* allocateOrRecycleContext: may cause a GC; restore blockClosure and refetch outerContext et al */\r\r\tnewContext = allocateOrRecycleContext(methodHeader & LargeContextBit);\r\t/* begin popRemappableOop */\r\toop = foo->remapBuffer[foo->remapBufferCount];\r\tfoo->remapBufferCount -= 1;\r\ttheBlockClosure = oop;\r\touterContext = longAt((theBlockClosure + (BASE_HEADER_SIZE)) + (ClosureOuterContextIndex << (SHIFT_FOR_WORD)));\r\r\t/* Assume: newContext will be recorded as a root if necessary by the\r\t call to newActiveContext: below, so we can use unchecked stores. */\r\r\tnumCopied = (fetchWordLengthOf(theBlockClosure)) - ClosureFirstCopiedValueIndex;\r\twhere = newContext + (BASE_HEADER_SIZE);\r\tlongAtput(where + (SenderIndex << (SHIFT_FOR_WORD)), foo->activeContext);\r\tlongAtput(where + (InstructionPointerIndex << (SHIFT_FOR_WORD)), longAt((theBlockClosure + (BASE_HEADER_SIZE)) + (ClosureStartPCIndex << (SHIFT_FOR_WORD))));\r\tlongAtput(where + (StackPointerIndex << (SHIFT_FOR_WORD)), (((foo->argumentCount + numCopied) << 1) | 1));\r\tlongAtput(where + (MethodIndex << (SHIFT_FOR_WORD)), longAt((outerContext + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD))));\r\tlongAtput(where + (ClosureIndex << (SHIFT_FOR_WORD)), theBlockClosure);\r\tlongAtput(where + (ReceiverIndex << (SHIFT_FOR_WORD)), longAt((outerContext + (BASE_HEADER_SIZE)) + (ReceiverIndex << (SHIFT_FOR_WORD))));\r\tfor (i = 1; i <= foo->argumentCount; i += 1) {\r\t\tlongAtput(where + ((ReceiverIndex + i) << (SHIFT_FOR_WORD)), longAt(foo->stackPointer - ((foo->argumentCount - i) * (BYTES_PER_WORD))));\r\t}\r\twhere = (newContext + (BASE_HEADER_SIZE)) + (((ReceiverIndex + 1) + foo->argumentCount) << (SHIFT_FOR_WORD));\r\tfor (i = 0; i <= (numCopied - 1); i += 1) {\r\t\tlongAtput(where + (i << (SHIFT_FOR_WORD)), longAt((theBlockClosure + (BASE_HEADER_SIZE)) + ((i + ClosureFirstCopiedValueIndex) << (SHIFT_FOR_WORD))));\r\t}\r\t/* begin pop: */\r\tfoo->stackPointer -= (foo->argumentCount + 1) * (BYTES_PER_WORD);\r\t/* begin newActiveContext: */\r\t/* begin storeContextRegisters: */\r\tactiveCntx = foo->activeContext;\r\t/* begin storePointerUnchecked:ofObject:withValue: */\r\tvaluePointer = ((((foo->instructionPointer - foo->method) - ((BASE_HEADER_SIZE) - 2)) << 1) | 1);\r\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t/* begin storePointerUnchecked:ofObject:withValue: */\r\tvaluePointer1 = (((((((usqInt) ((foo->stackPointer - foo->activeContext) - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD)) - TempFrameStart) + 1) << 1) | 1);\r\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\tif ((((usqInt) newContext)) < (((usqInt) foo->youngStart))) {\r\t\tbeRootIfOld(newContext);\r\t}\r\tfoo->activeContext = newContext;\r\t/* begin fetchContextRegisters: */\r\ttmp = longAt((newContext + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\tif ((tmp & 1)) {\r\t\ttmp = longAt((newContext + (BASE_HEADER_SIZE)) + (HomeIndex << (SHIFT_FOR_WORD)));\r\t\tif ((((usqInt) tmp)) < (((usqInt) foo->youngStart))) {\r\t\t\tbeRootIfOld(tmp);\r\t\t}\r\t} else {\r\t\ttmp = newContext;\r\t}\r\tfoo->theHomeContext = tmp;\r\tfoo->receiver = longAt((tmp + (BASE_HEADER_SIZE)) + (ReceiverIndex << (SHIFT_FOR_WORD)));\r\tfoo->method = longAt((tmp + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\ttmp = ((longAt((newContext + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tfoo->instructionPointer = ((foo->method + tmp) + (BASE_HEADER_SIZE)) - 2;\r\ttmp = ((longAt((newContext + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tfoo->stackPointer = (newContext + (BASE_HEADER_SIZE)) + (((TempFrameStart + tmp) - 1) * (BYTES_PER_WORD));\r}\r\rsqInt activateNewMethod(void) {\rregister struct foo * foo = &fum;\r    sqInt tempCount;\r    sqInt nilOop;\r    sqInt where;\r    sqInt initialIP;\r    sqInt i;\r    sqInt newContext;\r    sqInt methodHeader;\r    sqInt methodPointer;\r    sqInt tmp;\r    sqInt activeCntx;\r    sqInt valuePointer;\r    sqInt valuePointer1;\r\r\t/* begin headerOf: */\r\tmethodPointer = foo->newMethod;\r\tmethodHeader = longAt((methodPointer + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD)));\r\tnewContext = allocateOrRecycleContext(methodHeader & LargeContextBit);\r\tinitialIP = ((LiteralStart + ((((usqInt) methodHeader) >> 10) & 255)) * (BYTES_PER_WORD)) + 1;\r\r\t/* Assume: newContext will be recorded as a root if necessary by the\r\t call to newActiveContext: below, so we can use unchecked stores. */\r\r\ttempCount = (((usqInt) methodHeader) >> 19) & 63;\r\twhere = newContext + (BASE_HEADER_SIZE);\r\tlongAtput(where + (SenderIndex << (SHIFT_FOR_WORD)), foo->activeContext);\r\tlongAtput(where + (InstructionPointerIndex << (SHIFT_FOR_WORD)), ((initialIP << 1) | 1));\r\tlongAtput(where + (StackPointerIndex << (SHIFT_FOR_WORD)), ((tempCount << 1) | 1));\r\tlongAtput(where + (MethodIndex << (SHIFT_FOR_WORD)), foo->newMethod);\r\tlongAtput(where + (ClosureIndex << (SHIFT_FOR_WORD)), foo->nilObj);\r\tfor (i = 0; i <= foo->argumentCount; i += 1) {\r\t\tlongAtput(where + ((ReceiverIndex + i) << (SHIFT_FOR_WORD)), longAt(foo->stackPointer - ((foo->argumentCount - i) * (BYTES_PER_WORD))));\r\t}\r\tnilOop = foo->nilObj;\r\tfor (i = ((foo->argumentCount + 1) + ReceiverIndex); i <= (tempCount + ReceiverIndex); i += 1) {\r\t\tlongAtput(where + (i << (SHIFT_FOR_WORD)), nilOop);\r\t}\r\t/* begin pop: */\r\tfoo->stackPointer -= (foo->argumentCount + 1) * (BYTES_PER_WORD);\r\tfoo->reclaimableContextCount += 1;\r\t/* begin newActiveContext: */\r\t/* begin storeContextRegisters: */\r\tactiveCntx = foo->activeContext;\r\t/* begin storePointerUnchecked:ofObject:withValue: */\r\tvaluePointer = ((((foo->instructionPointer - foo->method) - ((BASE_HEADER_SIZE) - 2)) << 1) | 1);\r\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t/* begin storePointerUnchecked:ofObject:withValue: */\r\tvaluePointer1 = (((((((usqInt) ((foo->stackPointer - foo->activeContext) - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD)) - TempFrameStart) + 1) << 1) | 1);\r\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\tif ((((usqInt) newContext)) < (((usqInt) foo->youngStart))) {\r\t\tbeRootIfOld(newContext);\r\t}\r\tfoo->activeContext = newContext;\r\t/* begin fetchContextRegisters: */\r\ttmp = longAt((newContext + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\tif ((tmp & 1)) {\r\t\ttmp = longAt((newContext + (BASE_HEADER_SIZE)) + (HomeIndex << (SHIFT_FOR_WORD)));\r\t\tif ((((usqInt) tmp)) < (((usqInt) foo->youngStart))) {\r\t\t\tbeRootIfOld(tmp);\r\t\t}\r\t} else {\r\t\ttmp = newContext;\r\t}\r\tfoo->theHomeContext = tmp;\r\tfoo->receiver = longAt((tmp + (BASE_HEADER_SIZE)) + (ReceiverIndex << (SHIFT_FOR_WORD)));\r\tfoo->method = longAt((tmp + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\ttmp = ((longAt((newContext + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tfoo->instructionPointer = ((foo->method + tmp) + (BASE_HEADER_SIZE)) - 2;\r\ttmp = ((longAt((newContext + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tfoo->stackPointer = (newContext + (BASE_HEADER_SIZE)) + (((TempFrameStart + tmp) - 1) * (BYTES_PER_WORD));\r}\r\r\r/*\tAdd the given variable location to the extra roots table */\r\rEXPORT(sqInt) addGCRoot(sqInt *varLoc) {\rregister struct foo * foo = &fum;\r\tif (foo->extraRootCount >= ExtraRootSize) {\r\t\treturn 0;\r\t}\r\tfoo->extraRoots[foo->extraRootCount += 1] = varLoc;\r\treturn 1;\r}\r\r\r/*\tAdd the given entry to the method cache.\r\tThe policy is as follows:\r\t\tLook for an empty entry anywhere in the reprobe chain.\r\t\tIf found, install the new entry there.\r\t\tIf not found, then install the new entry at the first probe position\r\t\t\tand delete the entries in the rest of the reprobe chain.\r\t\tThis has two useful purposes:\r\t\t\tIf there is active contention over the first slot, the second\r\t\t\t\tor third will likely be free for reentry after ejection.\r\t\t\tAlso, flushing is good when reprobe chains are getting full. */\r\rsqInt addNewMethodToCache(void) {\rregister struct foo * foo = &fum;\r    sqInt hash;\r    sqInt p;\r    sqInt probe;\r\r\tfoo->compilerInitialized && (compilerTranslateMethod());\r\r\t/* drop low-order zeros from addresses */\r\r\thash = foo->messageSelector ^ foo->lkupClass;\r\tfoo->primitiveFunctionPointer = primitiveTable[foo->primitiveIndex];\r\tfor (p = 0; p <= (CacheProbeMax - 1); p += 1) {\r\t\tprobe = (((usqInt) hash) >> p) & MethodCacheMask;\r\t\tif ((foo->methodCache[probe + MethodCacheSelector]) == 0) {\r\t\t\tfoo->methodCache[probe + MethodCacheSelector] = foo->messageSelector;\r\t\t\tfoo->methodCache[probe + MethodCacheClass] = foo->lkupClass;\r\t\t\tfoo->methodCache[probe + MethodCacheMethod] = foo->newMethod;\r\t\t\tfoo->methodCache[probe + MethodCachePrim] = foo->primitiveIndex;\r\t\t\tfoo->methodCache[probe + MethodCacheNative] = foo->newNativeMethod;\r\t\t\tfoo->methodCache[probe + MethodCachePrimFunction] = (((long) foo->primitiveFunctionPointer));\r\t\t\treturn null;\r\t\t}\r\t}\r\r\t/* first probe */\r\r\tprobe = hash & MethodCacheMask;\r\tfoo->methodCache[probe + MethodCacheSelector] = foo->messageSelector;\r\tfoo->methodCache[probe + MethodCacheClass] = foo->lkupClass;\r\tfoo->methodCache[probe + MethodCacheMethod] = foo->newMethod;\r\tfoo->methodCache[probe + MethodCachePrim] = foo->primitiveIndex;\r\tfoo->methodCache[probe + MethodCacheNative] = foo->newNativeMethod;\r\tfoo->methodCache[probe + MethodCachePrimFunction] = (((long) foo->primitiveFunctionPointer));\r\tfor (p = 1; p <= (CacheProbeMax - 1); p += 1) {\r\t\tprobe = (((usqInt) hash) >> p) & MethodCacheMask;\r\t\tfoo->methodCache[probe + MethodCacheSelector] = 0;\r\t}\r}\r\r\r/*\tAdd the given function address to the external primitive table and return the index where it's stored. This function doesn't need to be fast since it is only called when an external primitive has been looked up (which takes quite a bit of time itself). So there's nothing specifically complicated here.\r\tNote: Return index will be one-based (ST convention) */\r\rsqInt addToExternalPrimitiveTable(void *functionAddress) {\rregister struct foo * foo = &fum;\r    sqInt i;\r\r\tfor (i = 0; i <= (MaxExternalPrimitiveTableSize - 1); i += 1) {\r\t\tif ((foo->externalPrimitiveTable[i]) == 0) {\r\t\t\tfoo->externalPrimitiveTable[i] = functionAddress;\r\t\t\treturn i + 1;\r\t\t}\r\t}\r\treturn 0;\r}\r\r\r/*\tAdjust all oop references by the given number of bytes. This \r\tis done just after reading in an image when the new base \r\taddress of the object heap is different from the base address \r\tin the image. */\r/*\tdi 11/18/2000 - return number of objects found */\r\rsqInt adjustAllOopsBy(sqInt bytesToShift) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r    sqInt totalObjects;\r    sqInt fieldAddr;\r    sqInt classHeader;\r    sqInt fieldOop;\r    sqInt newClassOop;\r    sqInt sz;\r    sqInt header;\r\r\tif (bytesToShift == 0) {\r\t\treturn 300000;\r\t}\r\ttotalObjects = 0;\r\toop = memory + (foo->headerTypeBytes[(longAt(memory)) & TypeMask]);\r\twhile ((((usqInt) oop)) < (((usqInt) foo->endOfMemory))) {\r\t\tif (!(((longAt(oop)) & TypeMask) == HeaderTypeFree)) {\r\t\t\ttotalObjects += 1;\r\t\t\t/* begin adjustFieldsAndClassOf:by: */\r\t\t\tif (bytesToShift == 0) {\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t\tfieldAddr = oop + (lastPointerOf(oop));\r\t\t\twhile ((((usqInt) fieldAddr)) > (((usqInt) oop))) {\r\t\t\t\tfieldOop = longAt(fieldAddr);\r\t\t\t\tif (!((fieldOop & 1))) {\r\t\t\t\t\tlongAtput(fieldAddr, fieldOop + bytesToShift);\r\t\t\t\t}\r\t\t\t\tfieldAddr -= BYTES_PER_WORD;\r\t\t\t}\r\t\t\tif (((longAt(oop)) & TypeMask) != HeaderTypeShort) {\r\t\t\t\tclassHeader = longAt(oop - (BYTES_PER_WORD));\r\t\t\t\tnewClassOop = (classHeader & (ALL_BUT_TYPE_MASK)) + bytesToShift;\r\t\t\t\tlongAtput(oop - (BYTES_PER_WORD), newClassOop | (classHeader & TypeMask));\r\t\t\t}\r\t\tl1:\t/* end adjustFieldsAndClassOf:by: */;\r\t\t}\r\t\t/* begin objectAfter: */\r\t\tif (DoAssertionChecks) {\r\t\t\tif ((((usqInt) oop)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t}\r\t\t}\r\t\tif (((longAt(oop)) & TypeMask) == HeaderTypeFree) {\r\t\t\tsz = (longAt(oop)) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader = longAt(oop);\r\t\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l2;\r\t\t\t} else {\r\t\t\t\tsz = header & (SIZE_MASK);\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\tl2:\t/* end sizeBitsOf: */;\r\t\t}\r\t\toop = (oop + sz) + (foo->headerTypeBytes[(longAt(oop + sz)) & TypeMask]);\r\t}\r\treturn totalObjects;\r}\r\r\r/*\tReturn true if all the oops in both arrays, and the arrays \r\tthemselves, are in the young object space. */\r\rsqInt allYoungand(sqInt array1, sqInt array2) {\rregister struct foo * foo = &fum;\r    sqInt fieldOffset;\r    sqInt sz;\r    sqInt header;\r    sqInt contextSize;\r    sqInt fmt;\r    sqInt methodHeader;\r    sqInt header1;\r    sqInt type;\r    sqInt sp;\r\r\tif ((((usqInt) array1)) < (((usqInt) foo->youngStart))) {\r\t\treturn 0;\r\t}\r\tif ((((usqInt) array2)) < (((usqInt) foo->youngStart))) {\r\t\treturn 0;\r\t}\r\t/* begin lastPointerOf: */\r\theader = longAt(array1);\r\tfmt = (((usqInt) header) >> 8) & 15;\r\tif (fmt <= 4) {\r\t\tif ((fmt == 3) && ((((((usqInt) header) >> 12) & 31) == 13) || ((((((usqInt) header) >> 12) & 31) == 14) || (((((usqInt) header) >> 12) & 31) == 4)))) {\r\t\t\t/* begin fetchStackPointerOf: */\r\t\t\tsp = longAt((array1 + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)));\r\t\t\tif (!((sp & 1))) {\r\t\t\t\tcontextSize = 0;\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\t\tcontextSize = (sp >> 1);\r\t\tl2:\t/* end fetchStackPointerOf: */;\r\t\t\tfieldOffset = (CtxtTempFrameStart + contextSize) * (BYTES_PER_WORD);\r\t\t\tgoto l4;\r\t\t}\r\t\t/* begin sizeBitsOfSafe: */\r\t\theader1 = longAt(array1);\r\t\t/* begin rightType: */\r\t\tif ((header1 & (SIZE_MASK)) == 0) {\r\t\t\ttype = HeaderTypeSizeAndClass;\r\t\t\tgoto l3;\r\t\t} else {\r\t\t\tif ((header1 & CompactClassMask) == 0) {\r\t\t\t\ttype = HeaderTypeClass;\r\t\t\t\tgoto l3;\r\t\t\t} else {\r\t\t\t\ttype = HeaderTypeShort;\r\t\t\t\tgoto l3;\r\t\t\t}\r\t\t}\r\tl3:\t/* end rightType: */;\r\t\tif (type == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(array1 - ((BYTES_PER_WORD) * 2))) & (ALL_BUT_TYPE_MASK);\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\tsz = header1 & (SIZE_MASK);\r\t\t\tgoto l1;\r\t\t}\r\tl1:\t/* end sizeBitsOfSafe: */;\r\t\tfieldOffset = sz - (BASE_HEADER_SIZE);\r\t\tgoto l4;\r\t}\r\tif (fmt < 12) {\r\t\tfieldOffset = 0;\r\t\tgoto l4;\r\t}\r\tmethodHeader = longAt(array1 + (BASE_HEADER_SIZE));\r\tfieldOffset = (((((usqInt) methodHeader) >> 10) & 255) * (BYTES_PER_WORD)) + (BASE_HEADER_SIZE);\rl4:\t/* end lastPointerOf: */;\r\twhile (fieldOffset >= (BASE_HEADER_SIZE)) {\r\t\tif ((((usqInt) (longAt(array1 + fieldOffset)))) < (((usqInt) foo->youngStart))) {\r\t\t\treturn 0;\r\t\t}\r\t\tif ((((usqInt) (longAt(array2 + fieldOffset)))) < (((usqInt) foo->youngStart))) {\r\t\t\treturn 0;\r\t\t}\r\t\tfieldOffset -= BYTES_PER_WORD;\r\t}\r\treturn 1;\r}\r\r\r/*\tAllocate a chunk of the given size. Sender must be sure that  the requested size includes enough space for the header  word(s).  */\r/*\tDetails: To limit the time per incremental GC, do one every so many allocations. The number is settable via primitiveVMParameter to tune your memory system */\r\rsqInt allocateChunk(sqInt byteSize) {\rregister struct foo * foo = &fum;\r    sqInt newFreeSize;\r    sqInt enoughSpace;\r    sqInt newChunk;\r    usqInt minFree;\r    sqInt sched;\r    sqInt lastSavedProcess;\r    sqInt currentProc;\r    sqInt oop;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\tif (foo->allocationCount >= foo->allocationsBetweenGCs) {\r\t\tincrementalGC();\r\t}\r\t/* begin sufficientSpaceToAllocate: */\r\tminFree = (foo->lowSpaceThreshold + byteSize) + (BASE_HEADER_SIZE);\r\tif (oopisGreaterThanOrEqualTo((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), minFree)) {\r\t\tenoughSpace = 1;\r\t\tgoto l1;\r\t} else {\r\t\tenoughSpace = sufficientSpaceAfterGC(minFree);\r\t\tgoto l1;\r\t}\rl1:\t/* end sufficientSpaceToAllocate: */;\r\tif (!(enoughSpace)) {\r\r\t\t/* signal that space is running low, but proceed with allocation if possible */\r\r\t\tfoo->signalLowSpace = 1;\r\r\t\t/* disable additional interrupts until lowSpaceThreshold is reset by image */\r\r\t\tfoo->lowSpaceThreshold = 0;\r\t\t/* begin saveProcessSignalingLowSpace */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tlastSavedProcess = longAt((oop1 + (BASE_HEADER_SIZE)) + (ProcessSignalingLowSpace << (SHIFT_FOR_WORD)));\r\t\tif (lastSavedProcess == foo->nilObj) {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop2 = foo->specialObjectsOop;\r\t\t\toop = longAt((oop2 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\t\t\tsched = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\tcurrentProc = longAt((sched + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)));\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\toop3 = foo->specialObjectsOop;\r\t\t\tif ((((usqInt) oop3)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(oop3, currentProc);\r\t\t\t}\r\t\t\tlongAtput((oop3 + (BASE_HEADER_SIZE)) + (ProcessSignalingLowSpace << (SHIFT_FOR_WORD)), currentProc);\r\t\t}\r\t\t/* begin forceInterruptCheck */\r\t\tfoo->interruptCheckCounter = -1000;\r\t\tfoo->nextPollTick = 0;\r\t}\r\tif (oopisLessThan((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), byteSize + (BASE_HEADER_SIZE))) {\r\t\terror(\"out of memory\");\r\t}\r\tnewFreeSize = ((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK)) - byteSize;\r\tnewChunk = foo->freeBlock;\r\r\t/* Assume: client will initialize object header of free chunk, so following is not needed: */\r\t/* self setSizeOfFree: newChunk to: byteSize. */\r\r\tfoo->freeBlock += byteSize;\r\t/* begin setSizeOfFree:to: */\r\tlongAtput(foo->freeBlock, (newFreeSize & (ALL_BUT_TYPE_MASK)) | HeaderTypeFree);\r\tfoo->allocationCount += 1;\r\treturn newChunk;\r}\r\r\r/*\tReturn a recycled context or a newly allocated one if none is available for recycling. */\r\rsqInt allocateOrRecycleContext(sqInt needsLarge) {\rregister struct foo * foo = &fum;\r    sqInt cntxt;\r    sqInt valuePointer;\r\r\tif (needsLarge == 0) {\r\t\tif (foo->freeContexts != NilContext) {\r\t\t\tcntxt = foo->freeContexts;\r\t\t\tfoo->freeContexts = longAt((cntxt + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)));\r\t\t\treturn cntxt;\r\t\t}\r\t} else {\r\t\tif (foo->freeLargeContexts != NilContext) {\r\t\t\tcntxt = foo->freeLargeContexts;\r\t\t\tfoo->freeLargeContexts = longAt((cntxt + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)));\r\t\t\treturn cntxt;\r\t\t}\r\t}\r\tif (needsLarge == 0) {\r\t\tcntxt = instantiateContextsizeInBytes(fetchPointerofObject(ClassMethodContext, foo->specialObjectsOop), SMALL_CONTEXT_SIZE);\r\t} else {\r\t\tcntxt = instantiateContextsizeInBytes(fetchPointerofObject(ClassMethodContext, foo->specialObjectsOop), LARGE_CONTEXT_SIZE);\r\t}\r\t/* begin storePointerUnchecked:ofObject:withValue: */\r\tvaluePointer = foo->nilObj;\r\tlongAtput((cntxt + (BASE_HEADER_SIZE)) + (4 << (SHIFT_FOR_WORD)), valuePointer);\r\treturn cntxt;\r}\r\rsqInt argumentCountOf(sqInt methodPointer) {\r\treturn (((usqInt) (longAt((methodPointer + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD))))) >> 25) & 15;\r}\r\r\r/*\tReturn the address of first indexable field of resulting array object, or fail if the instance variable does not contain an indexable bytes or words object. */\r/*\tNote: May be called by translated primitive code. */\r\rvoid * arrayValueOf(sqInt arrayOop) {\r\tif ((!((arrayOop & 1))) && (((arrayOop & 1) == 0) && (isWordsOrBytesNonInt(arrayOop)))) {\r\t\treturn pointerForOop(arrayOop + (BASE_HEADER_SIZE));\r\t}\r\t/* begin primitiveFail */\r\tfoo->successFlag = 0;\r}\r\r\r/*\tReturns an integer object */\r\rsqInt asciiOfCharacter(sqInt characterObj) {\rregister struct foo * foo = &fum;\r    sqInt classOop;\r    sqInt cl;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop;\r\r\t/* begin assertClassOf:is: */\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\tclassOop = longAt((oop + (BASE_HEADER_SIZE)) + (ClassCharacter << (SHIFT_FOR_WORD)));\r\tif ((characterObj & 1)) {\r\t\tfoo->successFlag = 0;\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(characterObj))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tcl = (longAt(characterObj - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop2 = foo->specialObjectsOop;\r\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tcl = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t}\r\t/* begin success: */\r\tfoo->successFlag = (cl == classOop) && foo->successFlag;\rl1:\t/* end assertClassOf:is: */;\r\tif (foo->successFlag) {\r\t\treturn longAt((characterObj + (BASE_HEADER_SIZE)) + (CharacterValueIndex << (SHIFT_FOR_WORD)));\r\t} else {\r\t\treturn ConstZero;\r\t}\r}\r\r\r/*\tReturn true if the stack is still balanced after executing primitive primIndex with nArgs args. Delta is 'stackPointer - activeContext' which is a relative measure for the stack pointer (so we don't have to relocate it during the primitive) */\r\rsqInt balancedStackafterPrimitivewithArgs(sqInt delta, sqInt primIdx, sqInt nArgs) {\rregister struct foo * foo = &fum;\r\tif ((primIdx >= 81) && (primIdx <= 88)) {\r\t\treturn 1;\r\t}\r\tif (foo->successFlag) {\r\t\treturn ((foo->stackPointer - foo->activeContext) + (nArgs * (BYTES_PER_WORD))) == delta;\r\t}\r\treturn (foo->stackPointer - foo->activeContext) == delta;\r}\r\r\r/*\tAnswer the size of an object memory header word in bytes. */\r\rsqInt baseHeaderSize(void) {\r\t/* inline:  */;\r\treturn BASE_HEADER_SIZE;\r}\r\r\r/*\tIf this object is old, mark it as a root (because a new object \r\tmay be stored into it) */\r\rsqInt beRootIfOld(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt header;\r\r\tif (((((usqInt) oop)) < (((usqInt) foo->youngStart))) && (!((oop & 1)))) {\r\t\t/* begin noteAsRoot:headerLoc: */\r\t\theader = longAt(oop);\r\t\tif ((header & (ROOT_BIT)) == 0) {\r\t\t\tif (foo->rootTableCount < RootTableRedZone) {\r\t\t\t\tfoo->rootTableCount += 1;\r\t\t\t\tfoo->rootTable[foo->rootTableCount] = oop;\r\t\t\t\tlongAtput(oop, header | (ROOT_BIT));\r\t\t\t} else {\r\t\t\t\tif (foo->rootTableCount < RootTableSize) {\r\t\t\t\t\tfoo->rootTableCount += 1;\r\t\t\t\t\tfoo->rootTable[foo->rootTableCount] = oop;\r\t\t\t\t\tlongAtput(oop, header | (ROOT_BIT));\r\t\t\t\t\tfoo->allocationCount = foo->allocationsBetweenGCs + 1;\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t}\r}\r\r\r/*\tRecord that the given oop in the old object area points to an object in the young area when oop may be forwarded. */\r/*\tWarning: No young objects should be recorded as roots. Callers are responsible for ensuring this constraint is not violated. */\r\rsqInt beRootWhileForwarding(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt header;\r    sqInt fwdBlock;\r    sqInt header1;\r    sqInt header2;\r\r\theader = longAt(oop);\r\tif ((header & (MARK_BIT)) != 0) {\r\r\t\t/* This oop is forwarded */\r\r\t\tfwdBlock = (header & (ALL_BUT_MARK_BIT_AND_TYPE_MASK)) << 1;\r\t\tif (DoAssertionChecks) {\r\t\t\t/* begin fwdBlockValidate: */\r\t\t\tif (!(((((usqInt) fwdBlock)) > (((usqInt) foo->endOfMemory))) && (((((usqInt) fwdBlock)) <= (((usqInt) foo->fwdTableNext))) && ((fwdBlock & 3) == 0)))) {\r\t\t\t\terror(\"invalid fwd table entry\");\r\t\t\t}\r\t\t}\r\t\t/* begin noteAsRoot:headerLoc: */\r\t\theader1 = longAt(fwdBlock + (BYTES_PER_WORD));\r\t\tif ((header1 & (ROOT_BIT)) == 0) {\r\t\t\tif (foo->rootTableCount < RootTableRedZone) {\r\t\t\t\tfoo->rootTableCount += 1;\r\t\t\t\tfoo->rootTable[foo->rootTableCount] = oop;\r\t\t\t\tlongAtput(fwdBlock + (BYTES_PER_WORD), header1 | (ROOT_BIT));\r\t\t\t} else {\r\t\t\t\tif (foo->rootTableCount < RootTableSize) {\r\t\t\t\t\tfoo->rootTableCount += 1;\r\t\t\t\t\tfoo->rootTable[foo->rootTableCount] = oop;\r\t\t\t\t\tlongAtput(fwdBlock + (BYTES_PER_WORD), header1 | (ROOT_BIT));\r\t\t\t\t\tfoo->allocationCount = foo->allocationsBetweenGCs + 1;\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t} else {\r\t\t/* begin noteAsRoot:headerLoc: */\r\t\theader2 = longAt(oop);\r\t\tif ((header2 & (ROOT_BIT)) == 0) {\r\t\t\tif (foo->rootTableCount < RootTableRedZone) {\r\t\t\t\tfoo->rootTableCount += 1;\r\t\t\t\tfoo->rootTable[foo->rootTableCount] = oop;\r\t\t\t\tlongAtput(oop, header2 | (ROOT_BIT));\r\t\t\t} else {\r\t\t\t\tif (foo->rootTableCount < RootTableSize) {\r\t\t\t\t\tfoo->rootTableCount += 1;\r\t\t\t\t\tfoo->rootTable[foo->rootTableCount] = oop;\r\t\t\t\t\tlongAtput(oop, header2 | (ROOT_BIT));\r\t\t\t\t\tfoo->allocationCount = foo->allocationsBetweenGCs + 1;\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t}\r}\r\rsqInt becomewith(sqInt array1, sqInt array2) {\r\treturn becomewithtwoWaycopyHash(array1, array2, 1, 1);\r}\r\r\r/*\tAll references to each object in array1 are swapped with all references to the corresponding object in array2. That is, all pointers to one object are replaced with with pointers to the other. The arguments must be arrays of the same length. \r\tReturns true if the primitive succeeds. */\r/*\tImplementation: Uses forwarding blocks to update references as done in compaction. */\r\rsqInt becomewithtwoWaycopyHash(sqInt array1, sqInt array2, sqInt twoWayFlag, sqInt copyHashFlag) {\rregister struct foo * foo = &fum;\r    sqInt hdr1;\r    sqInt fieldOffset;\r    sqInt oop1;\r    sqInt hdr2;\r    sqInt oop2;\r    sqInt hdr11;\r    sqInt oop11;\r    sqInt hdr21;\r    sqInt fwdBlock;\r    sqInt oop21;\r    sqInt sz;\r    sqInt header;\r    sqInt contextSize;\r    sqInt fmt;\r    sqInt methodHeader;\r    sqInt header1;\r    sqInt type;\r    sqInt sp;\r\r\tif (!(((array1 & 1) == 0) && (((((usqInt) (longAt(array1))) >> 8) & 15) == 2))) {\r\t\treturn 0;\r\t}\r\tif (!(((array2 & 1) == 0) && (((((usqInt) (longAt(array2))) >> 8) & 15) == 2))) {\r\t\treturn 0;\r\t}\r\tif (!((lastPointerOf(array1)) == (lastPointerOf(array2)))) {\r\t\treturn 0;\r\t}\r\tif (!(containOnlyOopsand(array1, array2))) {\r\t\treturn 0;\r\t}\r\tif (!(prepareForwardingTableForBecomingwithtwoWay(array1, array2, twoWayFlag))) {\r\t\treturn 0;\r\t}\r\tif (allYoungand(array1, array2)) {\r\t\tmapPointersInObjectsFromto(foo->youngStart, foo->endOfMemory);\r\t} else {\r\t\tmapPointersInObjectsFromto(memory, foo->endOfMemory);\r\t}\r\tif (twoWayFlag) {\r\t\t/* begin restoreHeadersAfterBecoming:with: */\r\t\t/* begin lastPointerOf: */\r\t\theader = longAt(array1);\r\t\tfmt = (((usqInt) header) >> 8) & 15;\r\t\tif (fmt <= 4) {\r\t\t\tif ((fmt == 3) && ((((((usqInt) header) >> 12) & 31) == 13) || ((((((usqInt) header) >> 12) & 31) == 14) || (((((usqInt) header) >> 12) & 31) == 4)))) {\r\t\t\t\t/* begin fetchStackPointerOf: */\r\t\t\t\tsp = longAt((array1 + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tif (!((sp & 1))) {\r\t\t\t\t\tcontextSize = 0;\r\t\t\t\t\tgoto l2;\r\t\t\t\t}\r\t\t\t\tcontextSize = (sp >> 1);\r\t\t\tl2:\t/* end fetchStackPointerOf: */;\r\t\t\t\tfieldOffset = (CtxtTempFrameStart + contextSize) * (BYTES_PER_WORD);\r\t\t\t\tgoto l4;\r\t\t\t}\r\t\t\t/* begin sizeBitsOfSafe: */\r\t\t\theader1 = longAt(array1);\r\t\t\t/* begin rightType: */\r\t\t\tif ((header1 & (SIZE_MASK)) == 0) {\r\t\t\t\ttype = HeaderTypeSizeAndClass;\r\t\t\t\tgoto l3;\r\t\t\t} else {\r\t\t\t\tif ((header1 & CompactClassMask) == 0) {\r\t\t\t\t\ttype = HeaderTypeClass;\r\t\t\t\t\tgoto l3;\r\t\t\t\t} else {\r\t\t\t\t\ttype = HeaderTypeShort;\r\t\t\t\t\tgoto l3;\r\t\t\t\t}\r\t\t\t}\r\t\tl3:\t/* end rightType: */;\r\t\t\tif (type == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(array1 - ((BYTES_PER_WORD) * 2))) & (ALL_BUT_TYPE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tsz = header1 & (SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\tl1:\t/* end sizeBitsOfSafe: */;\r\t\t\tfieldOffset = sz - (BASE_HEADER_SIZE);\r\t\t\tgoto l4;\r\t\t}\r\t\tif (fmt < 12) {\r\t\t\tfieldOffset = 0;\r\t\t\tgoto l4;\r\t\t}\r\t\tmethodHeader = longAt(array1 + (BASE_HEADER_SIZE));\r\t\tfieldOffset = (((((usqInt) methodHeader) >> 10) & 255) * (BYTES_PER_WORD)) + (BASE_HEADER_SIZE);\r\tl4:\t/* end lastPointerOf: */;\r\t\twhile (fieldOffset >= (BASE_HEADER_SIZE)) {\r\t\t\toop1 = longAt(array1 + fieldOffset);\r\t\t\toop2 = longAt(array2 + fieldOffset);\r\t\t\tif (!(oop1 == oop2)) {\r\t\t\t\trestoreHeaderOf(oop1);\r\t\t\t\trestoreHeaderOf(oop2);\r\t\t\t\thdr1 = longAt(oop1);\r\t\t\t\thdr2 = longAt(oop2);\r\t\t\t\tlongAtput(oop1, (hdr1 & (ALL_BUT_HASH_BITS)) | (hdr2 & HashBits));\r\t\t\t\tlongAtput(oop2, (hdr2 & (ALL_BUT_HASH_BITS)) | (hdr1 & HashBits));\r\t\t\t}\r\t\t\tfieldOffset -= BYTES_PER_WORD;\r\t\t}\r\t} else {\r\t\t/* begin restoreHeadersAfterForwardBecome: */\r\t\tfwdBlock = ((foo->endOfMemory + (BASE_HEADER_SIZE)) + 7) & ((WORD_MASK) - 7);\r\t\tflag(\"Dan\");\r\t\tfwdBlock += (BYTES_PER_WORD) * 4;\r\t\twhile ((((usqInt) fwdBlock)) <= (((usqInt) foo->fwdTableNext))) {\r\t\t\toop11 = longAt(fwdBlock + ((BYTES_PER_WORD) * 2));\r\t\t\toop21 = longAt(fwdBlock);\r\t\t\trestoreHeaderOf(oop11);\r\t\t\tif (copyHashFlag) {\r\t\t\t\thdr11 = longAt(oop11);\r\t\t\t\thdr21 = longAt(oop21);\r\t\t\t\tlongAtput(oop21, (hdr21 & (ALL_BUT_HASH_BITS)) | (hdr11 & HashBits));\r\t\t\t}\r\t\t\tfwdBlock += (BYTES_PER_WORD) * 4;\r\t\t}\r\t}\r\tinitializeMemoryFirstFree(foo->freeBlock);\r\t/* begin forceInterruptCheck */\r\tfoo->interruptCheckCounter = -1000;\r\tfoo->nextPollTick = 0;\r\treturn 1;\r}\r\rsqInt biasToGrow(void) {\rregister struct foo * foo = &fum;\r    usqInt growSize;\r\r\tgrowSize = (((sqInt) (foo->growHeadroom * 3) >> 1)) - ((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK));\r\tif (growSize > 0) {\r\t\tgrowObjectMemory(growSize);\r\t}\r}\r\r\r/*\tconvert true and false (Smalltalk) to true or false(C) */\r\rsqInt booleanValueOf(sqInt obj) {\rregister struct foo * foo = &fum;\r\tif (obj == foo->trueObj) {\r\t\treturn 1;\r\t}\r\tif (obj == foo->falseObj) {\r\t\treturn 0;\r\t}\r\tfoo->successFlag = 0;\r\treturn null;\r}\r\rsqInt byteSizeOf(sqInt oop) {\r    sqInt slots;\r    sqInt header;\r    sqInt sz;\r\r\tflag(\"Dan\");\r\tif ((oop & 1)) {\r\t\treturn 0;\r\t}\r\t/* begin slotSizeOf: */\r\tif ((oop & 1)) {\r\t\tslots = 0;\r\t\tgoto l1;\r\t}\r\t/* begin lengthOf: */\r\theader = longAt(oop);\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz = header & (SIZE_MASK);\r\t}\r\tsz -= header & (SIZE_4_BIT);\r\tif (((((usqInt) header) >> 8) & 15) <= 4) {\r\t\tslots = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tgoto l2;\r\t}\r\tif (((((usqInt) header) >> 8) & 15) < 8) {\r\t\tslots = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> 2;\r\t\tgoto l2;\r\t} else {\r\t\tslots = (sz - (BASE_HEADER_SIZE)) - (((((usqInt) header) >> 8) & 15) & 3);\r\t\tgoto l2;\r\t}\rl2:\t/* end lengthOf:baseHeader:format: */;\rl1:\t/* end slotSizeOf: */;\r\tif (((((usqInt) (longAt(oop))) >> 8) & 15) >= 8) {\r\t\treturn slots;\r\t} else {\r\t\treturn slots * 4;\r\t}\r}\r\r\r/*\tByte-swap the words of all bytes objects in a range of the \r\timage, including Strings, ByteArrays, and CompiledMethods. \r\tThis returns these objects to their original byte ordering \r\tafter blindly byte-swapping the entire image. For compiled \r\tmethods, byte-swap only their bytecodes part. */\r\rsqInt byteSwapByteObjectsFromto(sqInt startOop, sqInt stopAddr) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r    sqInt fmt;\r    sqInt methodHeader;\r    sqInt wordAddr;\r    sqInt stopAddr1;\r    sqInt addr;\r    sqInt stopAddr2;\r    sqInt addr1;\r    sqInt sz;\r    sqInt header;\r\r\toop = startOop;\r\twhile ((((usqInt) oop)) < (((usqInt) stopAddr))) {\r\t\tif (!(((longAt(oop)) & TypeMask) == HeaderTypeFree)) {\r\t\t\tfmt = (((usqInt) (longAt(oop))) >> 8) & 15;\r\t\t\tif (fmt >= 8) {\r\r\t\t\t\t/* oop contains bytes */\r\r\t\t\t\twordAddr = oop + (BASE_HEADER_SIZE);\r\t\t\t\tif (fmt >= 12) {\r\r\t\t\t\t\t/* compiled method; start after methodHeader and literals */\r\r\t\t\t\t\tmethodHeader = longAt(oop + (BASE_HEADER_SIZE));\r\t\t\t\t\twordAddr = (wordAddr + (BYTES_PER_WORD)) + (((((usqInt) methodHeader) >> 10) & 255) * (BYTES_PER_WORD));\r\t\t\t\t}\r\t\t\t\t/* begin reverseBytesFrom:to: */\r\t\t\t\tstopAddr1 = oop + (sizeBitsOf(oop));\r\t\t\t\tflag(\"Dan\");\r\t\t\t\taddr = wordAddr;\r\t\t\t\twhile ((((usqInt) addr)) < (((usqInt) stopAddr1))) {\r\t\t\t\t\tlongAtput(addr, byteSwapped(longAt(addr)));\r\t\t\t\t\taddr += BYTES_PER_WORD;\r\t\t\t\t}\r\t\t\t}\r\t\t\tif ((fmt == 6) && ((BYTES_PER_WORD) == 8)) {\r\r\t\t\t\t/* Object contains 32-bit half-words packed into 64-bit machine words. */\r\r\t\t\t\twordAddr = oop + (BASE_HEADER_SIZE);\r\t\t\t\t/* begin reverseWordsFrom:to: */\r\t\t\t\tstopAddr2 = oop + (sizeBitsOf(oop));\r\t\t\t\taddr1 = wordAddr;\r\t\t\t\twhile ((((usqInt) addr1)) < (((usqInt) stopAddr2))) {\r\t\t\t\t\tlongAtput(addr1, wordSwapped(longAt(addr1)));\r\t\t\t\t\taddr1 += BYTES_PER_WORD;\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t\t/* begin objectAfter: */\r\t\tif (DoAssertionChecks) {\r\t\t\tif ((((usqInt) oop)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t}\r\t\t}\r\t\tif (((longAt(oop)) & TypeMask) == HeaderTypeFree) {\r\t\t\tsz = (longAt(oop)) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader = longAt(oop);\r\t\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tsz = header & (SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\tl1:\t/* end sizeBitsOf: */;\r\t\t}\r\t\toop = (oop + sz) + (foo->headerTypeBytes[(longAt(oop + sz)) & TypeMask]);\r\t}\r}\r\r\r/*\tAnswer the given integer with its bytes in the reverse order. */\r\rsqInt byteSwapped(sqInt w) {\r\t\r# if (BYTES_PER_WORD == 4)  // swap bytes in an object word\r\treturn ((((((usqInt) w >> 24)) & Byte0Mask) + ((((usqInt) w >> 8)) & Byte1Mask)) + ((((usqInt) w << 8)) & Byte2Mask)) + ((((usqInt) w << 24)) & Byte3Mask);\r# else\r\treturn ((((((((((usqInt) w >> 56)) & Byte0Mask) + ((((usqInt) w >> 40)) & Byte1Mask)) + ((((usqInt) w >> 24)) & Byte2Mask)) + ((((usqInt) w >> 8)) & Byte3Mask)) + ((((usqInt) w << 8)) & Byte4Mask)) + ((((usqInt) w << 24)) & Byte5Mask)) + ((((usqInt) w << 40)) & Byte6Mask)) + ((((usqInt) w << 56)) & Byte7Mask);\r# endif  // BYTES_PER_WORD == 4\r\t\r}\r\r\r/*\tAnswer the size of an object memory word in bytes. */\r\rsqInt bytesPerWord(void) {\r\t/* inline:  */;\r\treturn BYTES_PER_WORD;\r}\r\r\r/*\tCall the external plugin function identified. In the VM this is an address, see \tInterpreterSimulator for it's version.  */\r\rsqInt callExternalPrimitive(void * functionID) {\r\tdispatchFunctionPointer(functionID);\r}\r\r\r/*\tExternal call into the interpreter */\r\rEXPORT(sqInt) callInterpreter(void) {\r\tinterpret();\r}\r\r\r/*\tRe-enter the interpreter for executing a callback */\r\rEXPORT(sqInt) callbackEnter(sqInt *callbackID) {\rregister struct foo * foo = &fum;\r    sqInt activeProc;\r    sqInt result;\r    sqInt oop;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r    sqInt oop4;\r    sqInt oop5;\r    sqInt processLists;\r    sqInt priority;\r    sqInt processList;\r    sqInt oop6;\r    sqInt oop11;\r    sqInt lastLink;\r    sqInt oop21;\r\r\tif (foo->primitiveIndex == 0) {\r\t\treturn 0;\r\t}\r\tif (foo->jmpDepth >= foo->jmpMax) {\r\t\treturn 0;\r\t}\r\r\t/* Suspend the currently active process */\r\r\tfoo->jmpDepth += 1;\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\toop4 = foo->specialObjectsOop;\r\toop2 = longAt((oop4 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\toop = longAt((oop2 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\tactiveProc = longAt((oop + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)));\r\tfoo->suspendedCallbacks[foo->jmpDepth] = activeProc;\r\tfoo->suspendedMethods[foo->jmpDepth] = foo->newMethod;\r\ttransferTo(wakeHighestPriority());\r\t/* begin forceInterruptCheck */\r\tfoo->interruptCheckCounter = -1000;\r\tfoo->nextPollTick = 0;\r\tresult = setjmp(foo->jmpBuf[foo->jmpDepth]);\r\tif (result == 0) {\r\t\tcallbackID[0] = foo->jmpDepth;\r\t\tinterpret();\r\t}\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\toop5 = foo->specialObjectsOop;\r\toop3 = longAt((oop5 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\toop1 = longAt((oop3 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\tactiveProc = longAt((oop1 + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)));\r\t/* begin putToSleep: */\r\tpriority = ((longAt((activeProc + (BASE_HEADER_SIZE)) + (PriorityIndex << (SHIFT_FOR_WORD)))) >> 1);\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\toop21 = foo->specialObjectsOop;\r\toop11 = longAt((oop21 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\toop6 = longAt((oop11 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\tprocessLists = longAt((oop6 + (BASE_HEADER_SIZE)) + (ProcessListsIndex << (SHIFT_FOR_WORD)));\r\tprocessList = longAt((processLists + (BASE_HEADER_SIZE)) + ((priority - 1) << (SHIFT_FOR_WORD)));\r\t/* begin addLastLink:toList: */\r\tif ((longAt((processList + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)))) == foo->nilObj) {\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tif ((((usqInt) processList)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(processList, activeProc);\r\t\t}\r\t\tlongAtput((processList + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)), activeProc);\r\t} else {\r\t\tlastLink = longAt((processList + (BASE_HEADER_SIZE)) + (LastLinkIndex << (SHIFT_FOR_WORD)));\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tif ((((usqInt) lastLink)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(lastLink, activeProc);\r\t\t}\r\t\tlongAtput((lastLink + (BASE_HEADER_SIZE)) + (NextLinkIndex << (SHIFT_FOR_WORD)), activeProc);\r\t}\r\t/* begin storePointer:ofObject:withValue: */\r\tif ((((usqInt) processList)) < (((usqInt) foo->youngStart))) {\r\t\tpossibleRootStoreIntovalue(processList, activeProc);\r\t}\r\tlongAtput((processList + (BASE_HEADER_SIZE)) + (LastLinkIndex << (SHIFT_FOR_WORD)), activeProc);\r\t/* begin storePointer:ofObject:withValue: */\r\tif ((((usqInt) activeProc)) < (((usqInt) foo->youngStart))) {\r\t\tpossibleRootStoreIntovalue(activeProc, processList);\r\t}\r\tlongAtput((activeProc + (BASE_HEADER_SIZE)) + (MyListIndex << (SHIFT_FOR_WORD)), processList);\r\tactiveProc = foo->suspendedCallbacks[foo->jmpDepth];\r\r\t/* see comment above */\r\r\tfoo->newMethod = foo->suspendedMethods[foo->jmpDepth];\r\ttransferTo(activeProc);\r\tfoo->jmpDepth -= 1;\r\treturn 1;\r}\r\r\r/*\tLeave from a previous callback */\r\rEXPORT(sqInt) callbackLeave(sqInt cbID) {\rregister struct foo * foo = &fum;\r\tif (foo->primitiveIndex == 0) {\r\t\treturn 0;\r\t}\r\tif (!(cbID == foo->jmpDepth)) {\r\t\treturn 0;\r\t}\r\tif (cbID < 1) {\r\t\treturn 0;\r\t}\r\tlongjmp(foo->jmpBuf[foo->jmpDepth], 1);\r}\r\r\r/*\tChange the class of the receiver into the class specified by the argument given that the format of the receiver matches the format of the argument. Fail if receiver or argument are SmallIntegers, or the receiver is an instance of a compact class and the argument isn't, or when the argument's class is compact and the receiver isn't, or when the format of the receiver is different from the format of the argument's class, or when the arguments class is fixed and the receiver's size differs from the size that an instance of the argument's class should have. */\r/*\tCheck what the format of the class says */\r\rsqInt changeClassOfto(sqInt rcvr, sqInt argClass) {\rregister struct foo * foo = &fum;\r    sqInt argFormat;\r    sqInt sizeHiBits;\r    sqInt rcvrFormat;\r    sqInt classHdr;\r    sqInt byteSize;\r    sqInt ccIndex;\r    sqInt i;\r\r\r\t/* Low 2 bits are 0 */\r\t/* Compute the size of instances of the class (used for fixed field classes only) */\r\r\tclassHdr = (longAt((argClass + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1;\r\tsizeHiBits = ((usqInt) (classHdr & 393216)) >> 9;\r\tclassHdr = classHdr & 131071;\r\r\t/* size in bytes -- low 2 bits are 0 */\r\t/* Check the receiver's format against that of the class */\r\r\tbyteSize = (classHdr & (SIZE_MASK)) + sizeHiBits;\r\targFormat = (((usqInt) classHdr) >> 8) & 15;\r\trcvrFormat = (((usqInt) (longAt(rcvr))) >> 8) & 15;\r\tif (!(argFormat == rcvrFormat)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif (argFormat < 2) {\r\t\tif (!((byteSize - (BASE_HEADER_SIZE)) == (byteSizeOf(rcvr)))) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t}\r\tif (((longAt(rcvr)) & TypeMask) == HeaderTypeShort) {\r\r\t\t/* Compact classes. Check if the arg's class is compact and exchange ccIndex */\r\r\t\tccIndex = classHdr & CompactClassMask;\r\t\tif (ccIndex == 0) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t\tlongAtput(rcvr, ((longAt(rcvr)) & (~CompactClassMask)) | ccIndex);\r\t} else {\r\t\tlongAtput(rcvr - (BASE_HEADER_SIZE), argClass | ((longAt(rcvr)) & TypeMask));\r\t\tif ((((usqInt) rcvr)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(rcvr, argClass);\r\t\t}\r\t}\r\t/* begin flushMethodCache */\r\tfor (i = 1; i <= MethodCacheSize; i += 1) {\r\t\tfoo->methodCache[i] = 0;\r\t}\r\tfor (i = 1; i <= AtCacheTotalSize; i += 1) {\r\t\tfoo->atCache[i] = 0;\r\t}\r}\r\r\r/*\tArg must lie in range 0-255! */\r\rsqInt characterForAscii(sqInt ascii) {\r    sqInt oop;\r    sqInt oop1;\r\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\toop1 = foo->specialObjectsOop;\r\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (CharacterTable << (SHIFT_FOR_WORD)));\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ascii << (SHIFT_FOR_WORD)));\r}\r\rsqInt characterTable(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (CharacterTable << (SHIFT_FOR_WORD)));\r}\r\r\r/*\tCheck for possible interrupts and handle one if necessary. */\r\rsqInt checkForInterrupts(void) {\rregister struct foo * foo = &fum;\r    sqInt now;\r    sqInt sema;\r    sqInt oop;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r    sqInt i;\r    sqInt xArray;\r    sqInt xSize;\r    sqInt index;\r    sqInt sema1;\r    sqInt oop4;\r\r\tnow = (ioMSecs()) & MillisecondClockMask;\r\tif (!(foo->interruptCheckCounter < -100)) {\r\t\tif ((now - foo->lastTick) < foo->interruptChecksEveryNms) {\r\r\t\t\t/* don't play with the feedback if we forced a check. It only makes life difficult */\r\t\t\t/* wrapping is not a concern, it'll get caught quickly  \r\t\t\t\tenough. This clause is trying to keep a reasonable  \r\t\t\t\tguess of how many times per \tinterruptChecksEveryNms we are calling  \r\t\t\t\tquickCheckForInterrupts. Not sure how effective it really is. */\r\r\t\t\tfoo->interruptCheckCounterFeedBackReset += 10;\r\t\t} else {\r\t\t\tif (foo->interruptCheckCounterFeedBackReset <= 1000) {\r\t\t\t\tfoo->interruptCheckCounterFeedBackReset = 1000;\r\t\t\t} else {\r\t\t\t\tfoo->interruptCheckCounterFeedBackReset -= 12;\r\t\t\t}\r\t\t}\r\t}\r\tfoo->interruptCheckCounter = foo->interruptCheckCounterFeedBackReset;\r\tif (foo->signalLowSpace) {\r\r\t\t/* reset flag */\r\r\t\tfoo->signalLowSpace = 0;\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop = foo->specialObjectsOop;\r\t\tsema = longAt((oop + (BASE_HEADER_SIZE)) + (TheLowSpaceSemaphore << (SHIFT_FOR_WORD)));\r\t\tif (!(sema == foo->nilObj)) {\r\t\t\tsynchronousSignal(sema);\r\t\t}\r\t}\r\tif (now < foo->lastTick) {\r\r\t\t/* millisecond clock wrapped so correct the nextPollTick */\r\r\t\tfoo->nextPollTick = (foo->nextPollTick - MillisecondClockMask) - 1;\r\t}\r\tif (now >= foo->nextPollTick) {\r\t\tioProcessEvents();\r\r\t\t/* msecs to wait before next call to ioProcessEvents.  \r\t\t\tNote that strictly speaking we might need to update  \r\t\t\t'now' at this point since ioProcessEvents could take a  \r\t\t\tvery long time on some platforms */\r\r\t\tfoo->nextPollTick = now + 200;\r\t}\r\tif (foo->interruptPending) {\r\r\t\t/* reset interrupt flag */\r\r\t\tfoo->interruptPending = 0;\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tsema = longAt((oop1 + (BASE_HEADER_SIZE)) + (TheInterruptSemaphore << (SHIFT_FOR_WORD)));\r\t\tif (!(sema == foo->nilObj)) {\r\t\t\tsynchronousSignal(sema);\r\t\t}\r\t}\r\tif (foo->nextWakeupTick != 0) {\r\t\tif (now < foo->lastTick) {\r\r\t\t\t/* the clock has wrapped. Subtract the wrap  \r\t\t\t\t\tinterval from nextWakeupTick - this might just  \r\t\t\t\t\tpossibly result in 0. Since this is used as a flag  \r\t\t\t\t\tvalue for 'no timer' we do the 0 check above */\r\r\t\t\tfoo->nextWakeupTick = (foo->nextWakeupTick - MillisecondClockMask) - 1;\r\t\t}\r\t\tif (now >= foo->nextWakeupTick) {\r\r\t\t\t/* set timer interrupt to 0 for 'no timer' */\r\r\t\t\tfoo->nextWakeupTick = 0;\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop2 = foo->specialObjectsOop;\r\t\t\tsema = longAt((oop2 + (BASE_HEADER_SIZE)) + (TheTimerSemaphore << (SHIFT_FOR_WORD)));\r\t\t\tif (!(sema == foo->nilObj)) {\r\t\t\t\tsynchronousSignal(sema);\r\t\t\t}\r\t\t}\r\t}\r\tif (foo->pendingFinalizationSignals > 0) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\tsema = longAt((oop3 + (BASE_HEADER_SIZE)) + (TheFinalizationSemaphore << (SHIFT_FOR_WORD)));\r\t\tif ((fetchClassOf(sema)) == (fetchPointerofObject(ClassSemaphore, foo->specialObjectsOop))) {\r\t\t\tsynchronousSignal(sema);\r\t\t}\r\t\tfoo->pendingFinalizationSignals = 0;\r\t}\r\tif ((foo->semaphoresToSignalCountA > 0) || (foo->semaphoresToSignalCountB > 0)) {\r\t\t/* begin signalExternalSemaphores */\r\t\tfoo->semaphoresUseBufferA = !foo->semaphoresUseBufferA;\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop4 = foo->specialObjectsOop;\r\t\txArray = longAt((oop4 + (BASE_HEADER_SIZE)) + (ExternalObjectsArray << (SHIFT_FOR_WORD)));\r\t\txSize = stSizeOf(xArray);\r\t\tif (foo->semaphoresUseBufferA) {\r\t\t\tfor (i = 1; i <= foo->semaphoresToSignalCountB; i += 1) {\r\t\t\t\tindex = foo->semaphoresToSignalB[i];\r\t\t\t\tif (index <= xSize) {\r\t\t\t\t\tsema1 = longAt((xArray + (BASE_HEADER_SIZE)) + ((index - 1) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tif ((fetchClassOf(sema1)) == (fetchPointerofObject(ClassSemaphore, foo->specialObjectsOop))) {\r\t\t\t\t\t\tsynchronousSignal(sema1);\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t}\r\t\t\tfoo->semaphoresToSignalCountB = 0;\r\t\t} else {\r\t\t\tfor (i = 1; i <= foo->semaphoresToSignalCountA; i += 1) {\r\t\t\t\tindex = foo->semaphoresToSignalA[i];\r\t\t\t\tif (index <= xSize) {\r\t\t\t\t\tsema1 = longAt((xArray + (BASE_HEADER_SIZE)) + ((index - 1) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tif ((fetchClassOf(sema1)) == (fetchPointerofObject(ClassSemaphore, foo->specialObjectsOop))) {\r\t\t\t\t\t\tsynchronousSignal(sema1);\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t}\r\t\t\tfoo->semaphoresToSignalCountA = 0;\r\t\t}\r\t}\r\tfoo->lastTick = now;\r}\r\r\r/*\tRead and verify the image file version number and return true if the the given image file needs to be byte-swapped. As a side effect, position the file stream just after the version number of the image header. This code prints a warning and does a hard-exit if it cannot find a valid version number. */\r/*\tThis code is based on C code by Ian Piumarta. */\r\rsqInt checkImageVersionFromstartingAt(sqImageFile  f, squeakFileOffsetType  imageOffset) {\r    sqInt version;\r    sqInt firstVersion;\r\r\tsqImageFileSeek(f, imageOffset);\r\tversion = firstVersion = getLongFromFileswap(f, 0);\r\tif ((version == imageFormatVersionNumber) || ((version == (imageFormatForwardCompatibilityVersion())) || (version == (imageFormatBackwardCompatibilityVersion())))) {\r\t\treturn 0;\r\t}\r\tsqImageFileSeek(f, imageOffset);\r\tversion = getLongFromFileswap(f, 1);\r\tif ((version == imageFormatVersionNumber) || ((version == (imageFormatForwardCompatibilityVersion())) || (version == (imageFormatBackwardCompatibilityVersion())))) {\r\t\treturn 1;\r\t}\r\tif (imageOffset == 0) {\r\t\tsqImageFileSeek(f, 512);\r\t\tversion = getLongFromFileswap(f, 0);\r\t\tif ((version == imageFormatVersionNumber) || ((version == (imageFormatForwardCompatibilityVersion())) || (version == (imageFormatBackwardCompatibilityVersion())))) {\r\t\t\treturn 0;\r\t\t}\r\t\tsqImageFileSeek(f, 512);\r\t\tversion = getLongFromFileswap(f, 1);\r\t\tif ((version == imageFormatVersionNumber) || ((version == (imageFormatForwardCompatibilityVersion())) || (version == (imageFormatBackwardCompatibilityVersion())))) {\r\t\t\treturn 1;\r\t\t}\r\t}\r\tprint(\"This interpreter (vers. \");\r\tprintNum(imageFormatVersionNumber);\r\tprint(\") cannot read image file (vers. \");\r\tprintNum(firstVersion);\r\tprint(\").\");\r\t/* begin cr */\r\tprintf(\"\\n\");\r\tprint(\"Press CR to quit...\");\r\tgetchar();\r\tioExit();\r}\r\r\r/*\tNote: May be called by translated primitive code. */\r\rsqInt checkedIntegerValueOf(sqInt intOop) {\r\tif ((intOop & 1)) {\r\t\treturn (intOop >> 1);\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn 0;\r\t}\r}\r\r\r/*\tAssumes zero-based array indexing. For testing in Smalltalk, this method should be overridden in a subclass. */\r\rsqInt checkedLongAt(sqInt byteAddress) {\rregister struct foo * foo = &fum;\r\t/* begin checkAddress: */\r\tif ((((usqInt) byteAddress)) < (((usqInt) memory))) {\r\t\terror(\"bad address: negative\");\r\t}\r\tif ((((usqInt) byteAddress)) >= (((usqInt) foo->memoryLimit))) {\r\t\terror(\"bad address: past end of heap\");\r\t}\r\t/* begin checkAddress: */\r\tif ((((usqInt) (byteAddress + 3))) < (((usqInt) memory))) {\r\t\terror(\"bad address: negative\");\r\t}\r\tif ((((usqInt) (byteAddress + 3))) >= (((usqInt) foo->memoryLimit))) {\r\t\terror(\"bad address: past end of heap\");\r\t}\r\treturn longAt(byteAddress);\r}\r\rsqInt classAlien(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassAlien << (SHIFT_FOR_WORD)));\r}\r\rsqInt classArray(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassArray << (SHIFT_FOR_WORD)));\r}\r\rsqInt classBitmap(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassBitmap << (SHIFT_FOR_WORD)));\r}\r\rsqInt classByteArray(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassByteArray << (SHIFT_FOR_WORD)));\r}\r\rsqInt classCharacter(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassCharacter << (SHIFT_FOR_WORD)));\r}\r\rsqInt classExternalAddress(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassExternalAddress << (SHIFT_FOR_WORD)));\r}\r\rsqInt classExternalData(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassExternalData << (SHIFT_FOR_WORD)));\r}\r\rsqInt classExternalFunction(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassExternalFunction << (SHIFT_FOR_WORD)));\r}\r\rsqInt classExternalLibrary(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassExternalLibrary << (SHIFT_FOR_WORD)));\r}\r\rsqInt classExternalStructure(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassExternalStructure << (SHIFT_FOR_WORD)));\r}\r\rsqInt classFloat(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassFloat << (SHIFT_FOR_WORD)));\r}\r\rsqInt classLargeNegativeInteger(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassLargeNegativeInteger << (SHIFT_FOR_WORD)));\r}\r\rsqInt classLargePositiveInteger(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassLargePositiveInteger << (SHIFT_FOR_WORD)));\r}\r\r\r/*\tCheck if aClass's name is className */\r\rsqInt classNameOfIs(sqInt aClass, char * className) {\r    sqInt length;\r    sqInt name;\r    sqInt i;\r    char * srcName;\r\r\tif ((lengthOf(aClass)) <= 6) {\r\t\treturn 0;\r\t}\r\tname = longAt((aClass + (BASE_HEADER_SIZE)) + (6 << (SHIFT_FOR_WORD)));\r\tif (!(((name & 1) == 0) && (((((usqInt) (longAt(name))) >> 8) & 15) >= 8))) {\r\t\treturn 0;\r\t}\r\tlength = stSizeOf(name);\r\tsrcName = ((char *) (arrayValueOf(name)));\r\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\tif (!((srcName[i]) == (className[i]))) {\r\t\t\treturn 0;\r\t\t}\r\t}\r\treturn (className[length]) == 0;\r}\r\rsqInt classPoint(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassPoint << (SHIFT_FOR_WORD)));\r}\r\rsqInt classSemaphore(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassSemaphore << (SHIFT_FOR_WORD)));\r}\r\rsqInt classSmallInteger(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r}\r\rsqInt classString(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassString << (SHIFT_FOR_WORD)));\r}\r\rsqInt classUnsafeAlien(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassUnsafeAlien << (SHIFT_FOR_WORD)));\r}\r\r\r/*\tReturn a shallow copy of the given object. May cause GC */\r/*\tAssume: Oop is a real object, not a small integer. */\r\rsqInt clone(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt newOop;\r    sqInt hash;\r    usqInt fromIndex;\r    sqInt header;\r    sqInt remappedOop;\r    sqInt extraHdrBytes;\r    usqInt bytes;\r    sqInt newChunk;\r    usqInt lastFrom;\r    sqInt toIndex;\r    sqInt oop1;\r    sqInt header1;\r    sqInt newFreeSize;\r    sqInt enoughSpace;\r    sqInt newChunk1;\r    usqInt minFree;\r    sqInt sched;\r    sqInt lastSavedProcess;\r    sqInt currentProc;\r    sqInt oop4;\r    sqInt oop11;\r    sqInt oop2;\r    sqInt oop3;\r\r\textraHdrBytes = foo->headerTypeBytes[(longAt(oop)) & TypeMask];\r\t/* begin sizeBitsOf: */\r\theader1 = longAt(oop);\r\tif ((header1 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tbytes = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\tbytes = header1 & (SIZE_MASK);\r\t\tgoto l1;\r\t}\rl1:\t/* end sizeBitsOf: */;\r\r\t/* allocate space for the copy, remapping oop in case of a GC */\r\r\tbytes += extraHdrBytes;\r\t/* begin pushRemappableOop: */\r\tfoo->remapBuffer[foo->remapBufferCount += 1] = oop;\r\tif (!(sufficientSpaceToAllocate(2500 + bytes))) {\r\t\treturn 0;\r\t}\r\t/* begin allocateChunk: */\r\tif (foo->allocationCount >= foo->allocationsBetweenGCs) {\r\t\tincrementalGC();\r\t}\r\t/* begin sufficientSpaceToAllocate: */\r\tminFree = (foo->lowSpaceThreshold + bytes) + (BASE_HEADER_SIZE);\r\tif (oopisGreaterThanOrEqualTo((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), minFree)) {\r\t\tenoughSpace = 1;\r\t\tgoto l2;\r\t} else {\r\t\tenoughSpace = sufficientSpaceAfterGC(minFree);\r\t\tgoto l2;\r\t}\rl2:\t/* end sufficientSpaceToAllocate: */;\r\tif (!(enoughSpace)) {\r\t\tfoo->signalLowSpace = 1;\r\t\tfoo->lowSpaceThreshold = 0;\r\t\t/* begin saveProcessSignalingLowSpace */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop11 = foo->specialObjectsOop;\r\t\tlastSavedProcess = longAt((oop11 + (BASE_HEADER_SIZE)) + (ProcessSignalingLowSpace << (SHIFT_FOR_WORD)));\r\t\tif (lastSavedProcess == foo->nilObj) {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop2 = foo->specialObjectsOop;\r\t\t\toop4 = longAt((oop2 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\t\t\tsched = longAt((oop4 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\tcurrentProc = longAt((sched + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)));\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\toop3 = foo->specialObjectsOop;\r\t\t\tif ((((usqInt) oop3)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(oop3, currentProc);\r\t\t\t}\r\t\t\tlongAtput((oop3 + (BASE_HEADER_SIZE)) + (ProcessSignalingLowSpace << (SHIFT_FOR_WORD)), currentProc);\r\t\t}\r\t\t/* begin forceInterruptCheck */\r\t\tfoo->interruptCheckCounter = -1000;\r\t\tfoo->nextPollTick = 0;\r\t}\r\tif (oopisLessThan((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), bytes + (BASE_HEADER_SIZE))) {\r\t\terror(\"out of memory\");\r\t}\r\tnewFreeSize = ((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK)) - bytes;\r\tnewChunk1 = foo->freeBlock;\r\tfoo->freeBlock += bytes;\r\t/* begin setSizeOfFree:to: */\r\tlongAtput(foo->freeBlock, (newFreeSize & (ALL_BUT_TYPE_MASK)) | HeaderTypeFree);\r\tfoo->allocationCount += 1;\r\tnewChunk = newChunk1;\r\t/* begin popRemappableOop */\r\toop1 = foo->remapBuffer[foo->remapBufferCount];\r\tfoo->remapBufferCount -= 1;\r\tremappedOop = oop1;\r\r\t/* loop below uses pre-increment */\r\r\ttoIndex = newChunk - (BYTES_PER_WORD);\r\tfromIndex = (remappedOop - extraHdrBytes) - (BYTES_PER_WORD);\r\tlastFrom = fromIndex + bytes;\r\twhile (fromIndex < lastFrom) {\r\t\tlongAtput(toIndex += BYTES_PER_WORD, longAt(fromIndex += BYTES_PER_WORD));\r\t}\r\r\t/* convert from chunk to oop */\r\t/* fix base header: compute new hash and clear Mark and Root bits */\r\r\tnewOop = newChunk + extraHdrBytes;\r\t/* begin newObjectHash */\r\tfoo->lastHash = (13849 + (27181 * foo->lastHash)) & 65535;\r\thash = foo->lastHash;\r\r\t/* use old ccIndex, format, size, and header-type fields */\r\r\theader = (longAt(newOop)) & 131071;\r\theader = header | ((hash << 17) & 536739840);\r\tlongAtput(newOop, header);\r\treturn newOop;\r}\r\r\r/*\tThis code is called if the receiver responds primitively to at:.\r\tIf this is so, it will be installed in the atCache so that subsequent calls of at:\r\tor next may be handled immediately in bytecode primitive routines. */\r\rsqInt commonAt(sqInt stringy) {\rregister struct foo * foo = &fum;\r    sqInt result;\r    sqInt atIx;\r    sqInt rcvr;\r    sqInt index;\r    sqInt sp;\r    sqInt oop;\r    sqInt sp1;\r    sqInt oop1;\r\r\r\t/* Sets successFlag */\r\r\tindex = positive32BitValueOf(longAt(foo->stackPointer));\r\trcvr = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\tif (!(foo->successFlag && (!((rcvr & 1))))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif ((foo->messageSelector == (fetchPointerofObject(16 * 2, fetchPointerofObject(SpecialSelectors, foo->specialObjectsOop)))) && (foo->lkupClass == (fetchClassOfNonInt(rcvr)))) {\r\r\t\t/* OK -- look in the at-cache */\r\t\t/* Index into atCache = 4N, for N = 0 ... 7 */\r\r\t\tatIx = rcvr & AtCacheMask;\r\t\tif (!((foo->atCache[atIx + AtCacheOop]) == rcvr)) {\r\t\t\tinstallinAtCacheatstring(rcvr, foo->atCache, atIx, stringy);\r\t\t}\r\t\tif (foo->successFlag) {\r\t\t\tresult = commonVariableatcacheIndex(rcvr, index, atIx);\r\t\t}\r\t\tif (foo->successFlag) {\r\t\t\t/* begin pop:thenPush: */\r\t\t\tlongAtput(sp = foo->stackPointer - (((foo->argumentCount + 1) - 1) * (BYTES_PER_WORD)), result);\r\t\t\tfoo->stackPointer = sp;\r\t\t\treturn null;\r\t\t}\r\t}\r\tfoo->successFlag = 1;\r\tresult = stObjectat(rcvr, index);\r\tif (foo->successFlag) {\r\t\tif (stringy) {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop1 = foo->specialObjectsOop;\r\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (CharacterTable << (SHIFT_FOR_WORD)));\r\t\t\tresult = longAt((oop + (BASE_HEADER_SIZE)) + (((result >> 1)) << (SHIFT_FOR_WORD)));\r\t\t}\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp1 = foo->stackPointer - (((foo->argumentCount + 1) - 1) * (BYTES_PER_WORD)), result);\r\t\tfoo->stackPointer = sp1;\r\t\treturn null;\r\t}\r}\r\r\r/*\tThis code is called if the receiver responds primitively to at:Put:.\r\tIf this is so, it will be installed in the atPutCache so that subsequent calls of at:\r\tor  next may be handled immediately in bytecode primitive routines. */\r\rsqInt commonAtPut(sqInt stringy) {\rregister struct foo * foo = &fum;\r    sqInt value;\r    sqInt atIx;\r    sqInt rcvr;\r    sqInt index;\r    sqInt sp;\r    sqInt sp1;\r    sqInt valToPut;\r    sqInt fmt;\r    sqInt fixedFields;\r    sqInt stSize;\r\r\tvalue = longAt(foo->stackPointer);\r\r\t/* Sets successFlag */\r\r\tindex = positive32BitValueOf(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))));\r\trcvr = longAt(foo->stackPointer - (2 * (BYTES_PER_WORD)));\r\tif (!(foo->successFlag && (!((rcvr & 1))))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif ((foo->messageSelector == (fetchPointerofObject(17 * 2, fetchPointerofObject(SpecialSelectors, foo->specialObjectsOop)))) && (foo->lkupClass == (fetchClassOfNonInt(rcvr)))) {\r\r\t\t/* OK -- look in the at-cache */\r\t\t/* Index into atPutCache */\r\r\t\tatIx = (rcvr & AtCacheMask) + AtPutBase;\r\t\tif (!((foo->atCache[atIx + AtCacheOop]) == rcvr)) {\r\t\t\tinstallinAtCacheatstring(rcvr, foo->atCache, atIx, stringy);\r\t\t}\r\t\tif (foo->successFlag) {\r\t\t\t/* begin commonVariable:at:put:cacheIndex: */\r\t\t\tstSize = foo->atCache[atIx + AtCacheSize];\r\t\t\tif (((((usqInt) index)) >= (((usqInt) 1))) && ((((usqInt) index)) <= (((usqInt) stSize)))) {\r\t\t\t\tfmt = foo->atCache[atIx + AtCacheFmt];\r\t\t\t\tif (fmt <= 4) {\r\t\t\t\t\tfixedFields = foo->atCache[atIx + AtCacheFixedFields];\r\t\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\t\tif ((((usqInt) rcvr)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\tpossibleRootStoreIntovalue(rcvr, value);\r\t\t\t\t\t}\r\t\t\t\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (((index + fixedFields) - 1) << (SHIFT_FOR_WORD)), value);\r\t\t\t\t\tgoto l1;\r\t\t\t\t}\r\t\t\t\tif (fmt < 8) {\r\t\t\t\t\tvalToPut = positive32BitValueOf(value);\r\t\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t\tlong32Atput((rcvr + (BASE_HEADER_SIZE)) + ((index - 1) << 2), valToPut);\r\t\t\t\t\t}\r\t\t\t\t\tgoto l1;\r\t\t\t\t}\r\t\t\t\tif (fmt >= 16) {\r\t\t\t\t\tvalToPut = asciiOfCharacter(value);\r\t\t\t\t\tif (!(foo->successFlag)) {\r\t\t\t\t\t\tgoto l1;\r\t\t\t\t\t}\r\t\t\t\t} else {\r\t\t\t\t\tvalToPut = value;\r\t\t\t\t}\r\t\t\t\tif ((valToPut & 1)) {\r\t\t\t\t\tvalToPut = (valToPut >> 1);\r\t\t\t\t\tif (!((valToPut >= 0) && (valToPut <= 255))) {\r\t\t\t\t\t\t/* begin primitiveFail */\r\t\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t\t\tgoto l1;\r\t\t\t\t\t}\r\t\t\t\t\tbyteAtput((rcvr + (BASE_HEADER_SIZE)) + (index - 1), valToPut);\r\t\t\t\t\tgoto l1;\r\t\t\t\t}\r\t\t\t}\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\tl1:\t/* end commonVariable:at:put:cacheIndex: */;\r\t\t}\r\t\tif (foo->successFlag) {\r\t\t\t/* begin pop:thenPush: */\r\t\t\tlongAtput(sp = foo->stackPointer - (((foo->argumentCount + 1) - 1) * (BYTES_PER_WORD)), value);\r\t\t\tfoo->stackPointer = sp;\r\t\t\treturn null;\r\t\t}\r\t}\r\tfoo->successFlag = 1;\r\tif (stringy) {\r\t\tstObjectatput(rcvr, index, asciiOfCharacter(value));\r\t} else {\r\t\tstObjectatput(rcvr, index, value);\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp1 = foo->stackPointer - (((foo->argumentCount + 1) - 1) * (BYTES_PER_WORD)), value);\r\t\tfoo->stackPointer = sp1;\r\t\treturn null;\r\t}\r}\r\r\r/*\tThis code assumes the receiver has been identified at location atIx in the atCache. */\r\rsqInt commonVariableatcacheIndex(sqInt rcvr, sqInt index, sqInt atIx) {\rregister struct foo * foo = &fum;\r    sqInt result;\r    sqInt fmt;\r    sqInt fixedFields;\r    sqInt stSize;\r    sqInt oop;\r    sqInt oop1;\r\r\tstSize = foo->atCache[atIx + AtCacheSize];\r\tif (((((usqInt) index)) >= (((usqInt) 1))) && ((((usqInt) index)) <= (((usqInt) stSize)))) {\r\t\tfmt = foo->atCache[atIx + AtCacheFmt];\r\t\tif (fmt <= 4) {\r\t\t\tfixedFields = foo->atCache[atIx + AtCacheFixedFields];\r\t\t\treturn longAt((rcvr + (BASE_HEADER_SIZE)) + (((index + fixedFields) - 1) << (SHIFT_FOR_WORD)));\r\t\t}\r\t\tif (fmt < 8) {\r\r\t\t\t/* Bitmap */\r\r\t\t\tresult = long32At((rcvr + (BASE_HEADER_SIZE)) + ((index - 1) << 2));\r\t\t\tresult = positive32BitIntegerFor(result);\r\t\t\treturn result;\r\t\t}\r\t\tif (fmt >= 16) {\r\t\t\t/* begin characterForAscii: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop1 = foo->specialObjectsOop;\r\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (CharacterTable << (SHIFT_FOR_WORD)));\r\t\t\treturn longAt((oop + (BASE_HEADER_SIZE)) + ((byteAt((rcvr + (BASE_HEADER_SIZE)) + (index - 1))) << (SHIFT_FOR_WORD)));\r\t\t} else {\r\t\t\treturn (((byteAt((rcvr + (BASE_HEADER_SIZE)) + (index - 1))) << 1) | 1);\r\t\t}\r\t}\r\t/* begin primitiveFail */\r\tfoo->successFlag = 0;\r}\r\r\r/*\tMay set success to false */\r/*\tFirst compare two ST integers... */\r\rsqInt compare31or32Bitsequal(sqInt obj1, sqInt obj2) {\r\tif (((obj1 & 1)) && ((obj2 & 1))) {\r\t\treturn obj1 == obj2;\r\t}\r\treturn (positive32BitValueOf(obj1)) == (positive32BitValueOf(obj2));\r}\r\rsqInt compilerCreateActualMessagestoringArgs(sqInt aMessage, sqInt argArray) {\r\treturn compilerHooks[14](aMessage, argArray);\r}\r\rsqInt compilerFlushCache(sqInt aCompiledMethod) {\r\treturn compilerHooks[2](aCompiledMethod);\r}\r\rsqInt compilerMapFromto(sqInt memStart, sqInt memEnd) {\r\treturn compilerHooks[4](memStart, memEnd);\r}\r\rsqInt compilerMark(void) {\r\treturn compilerHooks[9]();\r}\r\rsqInt compilerPostGC(void) {\r\treturn compilerHooks[5]();\r}\r\rsqInt compilerPostSnapshot(void) {\r\treturn compilerHooks[8]();\r}\r\rsqInt compilerPreGC(sqInt fullGCFlag) {\r\treturn compilerHooks[3](fullGCFlag);\r}\r\rsqInt compilerPreSnapshot(void) {\r\treturn compilerHooks[7]();\r}\r\rsqInt compilerProcessChange(void) {\r\treturn compilerHooks[6]();\r}\r\rsqInt compilerProcessChangeto(sqInt oldProc, sqInt newProc) {\r\treturn compilerHooks[6](oldProc, newProc);\r}\r\rsqInt compilerTranslateMethod(void) {\r\treturn compilerHooks[1]();\r}\r\r\r/*\tReturn true if neither array contains a small integer. You \r\tcan't become: integers! */\r\rsqInt containOnlyOopsand(sqInt array1, sqInt array2) {\r    sqInt fieldOffset;\r    sqInt sz;\r    sqInt header;\r    sqInt contextSize;\r    sqInt fmt;\r    sqInt methodHeader;\r    sqInt header1;\r    sqInt type;\r    sqInt sp;\r\r\t/* begin lastPointerOf: */\r\theader = longAt(array1);\r\tfmt = (((usqInt) header) >> 8) & 15;\r\tif (fmt <= 4) {\r\t\tif ((fmt == 3) && ((((((usqInt) header) >> 12) & 31) == 13) || ((((((usqInt) header) >> 12) & 31) == 14) || (((((usqInt) header) >> 12) & 31) == 4)))) {\r\t\t\t/* begin fetchStackPointerOf: */\r\t\t\tsp = longAt((array1 + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)));\r\t\t\tif (!((sp & 1))) {\r\t\t\t\tcontextSize = 0;\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\t\tcontextSize = (sp >> 1);\r\t\tl2:\t/* end fetchStackPointerOf: */;\r\t\t\tfieldOffset = (CtxtTempFrameStart + contextSize) * (BYTES_PER_WORD);\r\t\t\tgoto l4;\r\t\t}\r\t\t/* begin sizeBitsOfSafe: */\r\t\theader1 = longAt(array1);\r\t\t/* begin rightType: */\r\t\tif ((header1 & (SIZE_MASK)) == 0) {\r\t\t\ttype = HeaderTypeSizeAndClass;\r\t\t\tgoto l3;\r\t\t} else {\r\t\t\tif ((header1 & CompactClassMask) == 0) {\r\t\t\t\ttype = HeaderTypeClass;\r\t\t\t\tgoto l3;\r\t\t\t} else {\r\t\t\t\ttype = HeaderTypeShort;\r\t\t\t\tgoto l3;\r\t\t\t}\r\t\t}\r\tl3:\t/* end rightType: */;\r\t\tif (type == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(array1 - ((BYTES_PER_WORD) * 2))) & (ALL_BUT_TYPE_MASK);\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\tsz = header1 & (SIZE_MASK);\r\t\t\tgoto l1;\r\t\t}\r\tl1:\t/* end sizeBitsOfSafe: */;\r\t\tfieldOffset = sz - (BASE_HEADER_SIZE);\r\t\tgoto l4;\r\t}\r\tif (fmt < 12) {\r\t\tfieldOffset = 0;\r\t\tgoto l4;\r\t}\r\tmethodHeader = longAt(array1 + (BASE_HEADER_SIZE));\r\tfieldOffset = (((((usqInt) methodHeader) >> 10) & 255) * (BYTES_PER_WORD)) + (BASE_HEADER_SIZE);\rl4:\t/* end lastPointerOf: */;\r\twhile (fieldOffset >= (BASE_HEADER_SIZE)) {\r\t\tif (((longAt(array1 + fieldOffset)) & 1)) {\r\t\t\treturn 0;\r\t\t}\r\t\tif (((longAt(array2 + fieldOffset)) & 1)) {\r\t\t\treturn 0;\r\t\t}\r\t\tfieldOffset -= BYTES_PER_WORD;\r\t}\r\treturn 1;\r}\r\r\r/*\tDoes thisCntx have aContext in its sender chain? */\r\rsqInt contexthasSender(sqInt thisCntx, sqInt aContext) {\r    sqInt nilOop;\r    sqInt s;\r\r\tif (thisCntx == aContext) {\r\t\treturn 0;\r\t}\r\tnilOop = foo->nilObj;\r\ts = longAt((thisCntx + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\twhile (!(s == nilOop)) {\r\t\tif (s == aContext) {\r\t\t\treturn 1;\r\t\t}\r\t\ts = longAt((s + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\t}\r\treturn 0;\r}\r\r\r/*\tThis entry point needs to be implemented for the interpreter proxy.\r\tSince BitBlt is now a plugin we need to look up BitBltPlugin:=copyBits\r\tand call it. This entire mechanism should eventually go away and be\r\treplaced with a dynamic lookup from BitBltPlugin itself but for backward\r\tcompatibility this stub is provided */\r\rsqInt copyBits(void) {\r    void * fn;\r\r\tfn = ioLoadFunctionFrom(\"copyBits\", \"BitBltPlugin\");\r\tif (fn == 0) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\treturn ((sqInt (*)(void))fn)();\r}\r\r\r/*\tThis entry point needs to be implemented for the interpreter proxy.\r\tSince BitBlt is now a plugin we need to look up BitBltPlugin:=copyBitsFrom:to:at:\r\tand call it. This entire mechanism should eventually go away and be\r\treplaced with a dynamic lookup from BitBltPlugin itself but for backward\r\tcompatibility this stub is provided */\r\rsqInt copyBitsFromtoat(sqInt x0, sqInt x1, sqInt y) {\r    void * fn;\r\r\tfn = ioLoadFunctionFrom(\"copyBitsFromtoat\", \"BitBltPlugin\");\r\tif (fn == 0) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\treturn ((sqInt (*)(sqInt, sqInt, sqInt))fn)(x0, x1, y);\r}\r\r\r/*\tCopy this object into the segment beginning at lastSeg.\r\tInstall a forwarding pointer, and save oop and header.\r\tFail if out of space.  Return the next segmentAddr if successful. */\r/*\tCopy the object... */\r\rsqInt copyObjtoSegmentaddrstopAtsaveOopAtheaderAt(sqInt oop, sqInt segmentWordArray, sqInt lastSeg, sqInt stopAddr, sqInt oopPtr, sqInt hdrPtr) {\rregister struct foo * foo = &fum;\r    sqInt bodySize;\r    sqInt extraSize;\r    sqInt hdrAddr;\r    sqInt in;\r    sqInt lastIn;\r    sqInt out;\r    sqInt header;\r\r\tflag(\"Dan\");\r\tif (!(foo->successFlag)) {\r\t\treturn lastSeg;\r\t}\r\textraSize = foo->headerTypeBytes[(longAt(oop)) & TypeMask];\r\t/* begin sizeBitsOf: */\r\theader = longAt(oop);\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tbodySize = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\tbodySize = header & (SIZE_MASK);\r\t\tgoto l1;\r\t}\rl1:\t/* end sizeBitsOf: */;\r\tif ((((usqInt) ((lastSeg + extraSize) + bodySize))) >= (((usqInt) stopAddr))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin transfer:from:to: */\r\tflag(\"Dan\");\r\tin = (oop - extraSize) - (BYTES_PER_WORD);\r\tlastIn = in + (((extraSize + bodySize) / (BYTES_PER_WORD)) * (BYTES_PER_WORD));\r\tout = (lastSeg + (BYTES_PER_WORD)) - (BYTES_PER_WORD);\r\twhile ((((usqInt) in)) < (((usqInt) lastIn))) {\r\t\tlongAtput(out += BYTES_PER_WORD, longAt(in += BYTES_PER_WORD));\r\t}\r\thdrAddr = (lastSeg + (BYTES_PER_WORD)) + extraSize;\r\tlongAtput(hdrAddr, (longAt(hdrAddr)) & ((ALL_BUT_ROOT_BIT) - (MARK_BIT)));\r\t/* begin forward:to:savingOopAt:andHeaderAt: */\r\tlongAtput(oopPtr, oop);\r\tlongAtput(hdrPtr, longAt(oop));\r\tlongAtput(oop, (((lastSeg + (BYTES_PER_WORD)) + extraSize) - segmentWordArray) + HeaderTypeFree);\r\treturn (lastSeg + extraSize) + bodySize;\r}\r\r\r/*\tBundle up the selector, arguments and lookupClass into a Message object. \r\tIn the process it pops the arguments off the stack, and pushes the message object. \r\tThis can then be presented as the argument of e.g. #doesNotUnderstand:. \r\tikp 11/20/1999 03:59 -- added hook for external runtime compilers. */\r/*\tremap lookupClass in case GC happens during allocation */\r\rsqInt createActualMessageTo(sqInt aClass) {\rregister struct foo * foo = &fum;\r    sqInt message;\r    sqInt argumentArray;\r    sqInt lookupClass;\r    sqInt count;\r    sqInt src;\r    sqInt in;\r    sqInt lastIn;\r    sqInt out;\r    sqInt sp;\r    sqInt oop;\r    sqInt oop1;\r    sqInt valuePointer;\r\r\t/* begin pushRemappableOop: */\r\tfoo->remapBuffer[foo->remapBufferCount += 1] = aClass;\r\r\t/* remap argumentArray in case GC happens during allocation */\r\r\targumentArray = instantiateClassindexableSize(fetchPointerofObject(ClassArray, foo->specialObjectsOop), foo->argumentCount);\r\t/* begin pushRemappableOop: */\r\tfoo->remapBuffer[foo->remapBufferCount += 1] = argumentArray;\r\tmessage = instantiateClassindexableSize(fetchPointerofObject(ClassMessage, foo->specialObjectsOop), 0);\r\t/* begin popRemappableOop */\r\toop = foo->remapBuffer[foo->remapBufferCount];\r\tfoo->remapBufferCount -= 1;\r\targumentArray = oop;\r\t/* begin popRemappableOop */\r\toop1 = foo->remapBuffer[foo->remapBufferCount];\r\tfoo->remapBufferCount -= 1;\r\tlookupClass = oop1;\r\tbeRootIfOld(argumentArray);\r\tif (foo->compilerInitialized) {\r\t\tcompilerCreateActualMessagestoringArgs(message, argumentArray);\r\t} else {\r\t\t/* begin transfer:from:to: */\r\t\tcount = foo->argumentCount;\r\t\tsrc = foo->stackPointer - ((foo->argumentCount - 1) * (BYTES_PER_WORD));\r\t\tflag(\"Dan\");\r\t\tin = src - (BYTES_PER_WORD);\r\t\tlastIn = in + (count * (BYTES_PER_WORD));\r\t\tout = (argumentArray + (BASE_HEADER_SIZE)) - (BYTES_PER_WORD);\r\t\twhile ((((usqInt) in)) < (((usqInt) lastIn))) {\r\t\t\tlongAtput(out += BYTES_PER_WORD, longAt(in += BYTES_PER_WORD));\r\t\t}\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp = foo->stackPointer - ((foo->argumentCount - 1) * (BYTES_PER_WORD)), message);\r\t\tfoo->stackPointer = sp;\r\t}\r\tfoo->argumentCount = 1;\r\t/* begin storePointer:ofObject:withValue: */\r\tvaluePointer = foo->messageSelector;\r\tif ((((usqInt) message)) < (((usqInt) foo->youngStart))) {\r\t\tpossibleRootStoreIntovalue(message, valuePointer);\r\t}\r\tlongAtput((message + (BASE_HEADER_SIZE)) + (MessageSelectorIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t/* begin storePointer:ofObject:withValue: */\r\tif ((((usqInt) message)) < (((usqInt) foo->youngStart))) {\r\t\tpossibleRootStoreIntovalue(message, argumentArray);\r\t}\r\tlongAtput((message + (BASE_HEADER_SIZE)) + (MessageArgumentsIndex << (SHIFT_FOR_WORD)), argumentArray);\r\tif ((lastPointerOf(message)) >= ((MessageLookupClassIndex * (BYTES_PER_WORD)) + (BASE_HEADER_SIZE))) {\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tif ((((usqInt) message)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(message, lookupClass);\r\t\t}\r\t\tlongAtput((message + (BASE_HEADER_SIZE)) + (MessageLookupClassIndex << (SHIFT_FOR_WORD)), lookupClass);\r\t}\r}\r\rsqInt dispatchFunctionPointer(void * aFunctionPointer) {\r\t((void (*)(void))aFunctionPointer)();\r}\r\r\r/*\tCall the primitive at index primIdx in the primitiveTable. */\r\rsqInt dispatchFunctionPointerOnin(sqInt primIdx, void *primTable[]) {\r\treturn dispatchFunctionPointer(primTable[primIdx]);\r}\r\r\r/*\tRepaint the portion of the Smalltalk screen bounded by the affected rectangle. Used to synchronize the screen after a Bitblt to the Smalltalk Display object. */\r\rsqInt displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b) {\rregister struct foo * foo = &fum;\r    sqInt displayObj;\r    sqInt d;\r    sqInt right;\r    sqInt dispBits;\r    sqInt bottom;\r    sqInt h;\r    sqInt top;\r    sqInt left;\r    sqInt surfaceHandle;\r    sqInt w;\r    sqInt dispBitsIndex;\r    sqInt oop;\r    sqInt successValue;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\tdisplayObj = longAt((oop + (BASE_HEADER_SIZE)) + (TheDisplay << (SHIFT_FOR_WORD)));\r\tif (!(aForm == displayObj)) {\r\t\treturn null;\r\t}\r\t/* begin success: */\r\tsuccessValue = (((displayObj & 1) == 0) && (((((usqInt) (longAt(displayObj))) >> 8) & 15) <= 4)) && ((lengthOf(displayObj)) >= 4);\r\tfoo->successFlag = successValue && foo->successFlag;\r\tif (foo->successFlag) {\r\t\tdispBits = longAt((displayObj + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)));\r\t\tw = fetchIntegerofObject(1, displayObj);\r\t\th = fetchIntegerofObject(2, displayObj);\r\t\td = fetchIntegerofObject(3, displayObj);\r\t}\r\tif (l < 0) {\r\t\tleft = 0;\r\t} else {\r\t\tleft = l;\r\t}\r\tif (r > w) {\r\t\tright = w;\r\t} else {\r\t\tright = r;\r\t}\r\tif (t < 0) {\r\t\ttop = 0;\r\t} else {\r\t\ttop = t;\r\t}\r\tif (b > h) {\r\t\tbottom = h;\r\t} else {\r\t\tbottom = b;\r\t}\r\tif (!((left <= right) && (top <= bottom))) {\r\t\treturn null;\r\t}\r\tif (foo->successFlag) {\r\t\tif ((dispBits & 1)) {\r\t\t\tsurfaceHandle = (dispBits >> 1);\r\t\t\tif (showSurfaceFn == 0) {\r\t\t\t\tshowSurfaceFn = ioLoadFunctionFrom(\"ioShowSurface\", \"SurfacePlugin\");\r\t\t\t\tif (showSurfaceFn == 0) {\r\t\t\t\t\t/* begin success: */\r\t\t\t\t\tfoo->successFlag = 0 && foo->successFlag;\r\t\t\t\t\treturn null;\r\t\t\t\t}\r\t\t\t}\r\t\t\t((sqInt (*)(sqInt, sqInt, sqInt, sqInt, sqInt))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top);\r\t\t} else {\r\r\t\t\t/* index in memory byte array */\r\r\t\t\tdispBitsIndex = dispBits + (BASE_HEADER_SIZE);\r\t\t\tioShowDisplay(dispBitsIndex, w, h, d, left, right, top, bottom);\r\t\t}\r\t}\r}\r\rsqInt displayObject(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (TheDisplay << (SHIFT_FOR_WORD)));\r}\r\r\r/*\tRounds negative results towards negative infinity, rather than zero. */\r\rsqInt doPrimitiveDivby(sqInt rcvr, sqInt arg) {\rregister struct foo * foo = &fum;\r    sqInt integerArg;\r    sqInt result;\r    sqInt integerRcvr;\r    sqInt posRcvr;\r    sqInt posArg;\r    sqInt successValue;\r\r\tif (((rcvr & arg) & 1) != 0) {\r\t\tintegerRcvr = (rcvr >> 1);\r\t\tintegerArg = (arg >> 1);\r\t\t/* begin success: */\r\t\tfoo->successFlag = (integerArg != 0) && foo->successFlag;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t}\r\tif (!(foo->successFlag)) {\r\t\treturn 1;\r\t}\r\tif (integerRcvr > 0) {\r\t\tif (integerArg > 0) {\r\t\t\tresult = integerRcvr / integerArg;\r\t\t} else {\r\r\t\t\t/* round negative result toward negative infinity */\r\r\t\t\tposArg = 0 - integerArg;\r\t\t\tresult = 0 - ((integerRcvr + (posArg - 1)) / posArg);\r\t\t}\r\t} else {\r\t\tposRcvr = 0 - integerRcvr;\r\t\tif (integerArg > 0) {\r\r\t\t\t/* round negative result toward negative infinity */\r\r\t\t\tresult = 0 - ((posRcvr + (integerArg - 1)) / integerArg);\r\t\t} else {\r\t\t\tposArg = 0 - integerArg;\r\t\t\tresult = posRcvr / posArg;\r\t\t}\r\t}\r\t/* begin success: */\r\tsuccessValue = \r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t(((((int) result)) ^ ((((int) result)) << 1)) >= 0)\r# else\r\t\t((result >= -1073741824) && (result <= 1073741823))\r# endif  // SQ_HOST32\r\t;\r\tfoo->successFlag = successValue && foo->successFlag;\r\treturn result;\r}\r\rsqInt doPrimitiveModby(sqInt rcvr, sqInt arg) {\rregister struct foo * foo = &fum;\r    sqInt integerArg;\r    sqInt integerResult;\r    sqInt integerRcvr;\r    sqInt successValue;\r\r\tif (((rcvr & arg) & 1) != 0) {\r\t\tintegerRcvr = (rcvr >> 1);\r\t\tintegerArg = (arg >> 1);\r\t\t/* begin success: */\r\t\tfoo->successFlag = (integerArg != 0) && foo->successFlag;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t}\r\tif (!(foo->successFlag)) {\r\t\treturn 1;\r\t}\r\r\t/* ensure that the result has the same sign as the integerArg */\r\r\tintegerResult = integerRcvr % integerArg;\r\tif (integerArg < 0) {\r\t\tif (integerResult > 0) {\r\t\t\tintegerResult += integerArg;\r\t\t}\r\t} else {\r\t\tif (integerResult < 0) {\r\t\t\tintegerResult += integerArg;\r\t\t}\r\t}\r\t/* begin success: */\r\tsuccessValue = \r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t(((((int) integerResult)) ^ ((((int) integerResult)) << 1)) >= 0)\r# else\r\t\t((integerResult >= -1073741824) && (integerResult <= 1073741823))\r# endif  // SQ_HOST32\r\t;\r\tfoo->successFlag = successValue && foo->successFlag;\r\treturn integerResult;\r}\r\rsqInt dummyReferToProxy(void) {\r\tinterpreterProxy = interpreterProxy;\r}\r\r\r/*\tDump the entire image out to the given file. Intended for debugging only. */\r\rEXPORT(sqInt) dumpImage(char * fileName) {\r    sqInt result;\r    sqInt dataSize;\r    sqImageFile f;\r\r\tf = sqImageFileOpen(fileName, \"wb\");\r\tif (f == null) {\r\t\treturn -1;\r\t}\r\tdataSize = foo->endOfMemory - memory;\r\tresult = sqImageFileWrite(pointerForOop(memory), sizeof(unsigned char), dataSize, f);\r\tsqImageFileClose(f);\r\treturn result;\r}\r\r\r/*\texecute a method found in the mCache - which means that \r\tprimitiveIndex & primitiveFunctionPointer are already set. Any sender \r\tneeds to have previously sent findMethodInClass: or equivalent */\r\rsqInt executeNewMethodFromCache(void) {\rregister struct foo * foo = &fum;\r    sqInt delta;\r    sqInt nArgs;\r\r\tif (foo->primitiveIndex > 0) {\r\t\tif (DoBalanceChecks) {\r\r\t\t\t/* check stack balance */\r\r\t\t\tnArgs = foo->argumentCount;\r\t\t\tdelta = foo->stackPointer - foo->activeContext;\r\t\t}\r\t\tfoo->successFlag = 1;\r\t\tdispatchFunctionPointer(foo->primitiveFunctionPointer);\r\t\tif (DoBalanceChecks) {\r\t\t\tif (!(balancedStackafterPrimitivewithArgs(delta, foo->primitiveIndex, nArgs))) {\r\t\t\t\tprintUnbalancedStack(foo->primitiveIndex);\r\t\t\t}\r\t\t}\r\t\tif (foo->successFlag) {\r\t\t\treturn null;\r\t\t}\r\t}\r\tactivateNewMethod();\r\t/* begin quickCheckForInterrupts */\r\tif ((foo->interruptCheckCounter -= 1) <= 0) {\r\t\tcheckForInterrupts();\r\t}\r}\r\rsqInt failed(void) {\r\treturn !foo->successFlag;\r}\r\rsqInt falseObject(void) {\r\treturn foo->falseObj;\r}\r\r\r/*\tFetch the instance variable at the given index of the given object. Return the address of first indexable field of resulting array object, or fail if the instance variable does not contain an indexable bytes or words object. */\r/*\tNote: May be called by translated primitive code. */\r\rvoid * fetchArrayofObject(sqInt fieldIndex, sqInt objectPointer) {\r    sqInt arrayOop;\r\r\tarrayOop = longAt((objectPointer + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t/* begin arrayValueOf: */\r\tif ((!((arrayOop & 1))) && (((arrayOop & 1) == 0) && (isWordsOrBytesNonInt(arrayOop)))) {\r\t\treturn pointerForOop(arrayOop + (BASE_HEADER_SIZE));\r\t}\r\t/* begin primitiveFail */\r\tfoo->successFlag = 0;\r\treturn null;\r}\r\rsqInt fetchClassOf(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\tif ((oop & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\treturn longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t}\r\tccIndex = (((usqInt) (longAt(oop))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\treturn (longAt(oop - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\treturn longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t}\r}\r\rsqInt fetchClassOfNonInt(sqInt oop) {\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r\r\tccIndex = (((usqInt) (longAt(oop))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\treturn (longAt(oop - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop2 = foo->specialObjectsOop;\r\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\treturn longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t}\r}\r\r\r/*\tFetch the instance variable at the given index of the given object. Return the C double precision floating point value of that instance variable, or fail if it is not a Float. */\r/*\tNote: May be called by translated primitive code. */\r\rdouble fetchFloatofObject(sqInt fieldIndex, sqInt objectPointer) {\r    sqInt floatOop;\r\r\tfloatOop = longAt((objectPointer + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\treturn floatValueOf(floatOop);\r}\r\r\r/*\tNote: May be called by translated primitive code. */\r\rsqInt fetchIntegerofObject(sqInt fieldIndex, sqInt objectPointer) {\r    sqInt intOop;\r\r\tintOop = longAt((objectPointer + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((intOop & 1)) {\r\t\treturn (intOop >> 1);\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn 0;\r\t}\r\treturn null;\r}\r\r\r/*\t index by 32-bit units, and return a 32-bit value. Intended to replace fetchWord:ofObject: */\r\rsqInt fetchLong32ofObject(sqInt fieldIndex, sqInt oop) {\r\treturn long32At((oop + (BASE_HEADER_SIZE)) + (fieldIndex << 2));\r}\r\r\r/*\tindex by word size, and return a pointer as long as the word size */\r\rsqInt fetchPointerofObject(sqInt fieldIndex, sqInt oop) {\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r}\r\r\r/*\tReturn the stackPointer of a Context or BlockContext. */\r\rsqInt fetchStackPointerOf(sqInt aContext) {\r    sqInt sp;\r\r\tsp = longAt((aContext + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)));\r\tif (!((sp & 1))) {\r\t\treturn 0;\r\t}\r\treturn (sp >> 1);\r}\r\r\r/*\tNOTE: this gives size appropriate for fetchPointer: n, but not in general for, eg, fetchLong32, etc. */\r\rsqInt fetchWordLengthOf(sqInt objectPointer) {\r    sqInt sz;\r    sqInt header;\r\r\t/* begin sizeBitsOf: */\r\theader = longAt(objectPointer);\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(objectPointer - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\tsz = header & (SIZE_MASK);\r\t\tgoto l1;\r\t}\rl1:\t/* end sizeBitsOf: */;\r\treturn ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r}\r\r\r/*\tDuring sweep phase we have encountered a weak reference. \r\tCheck if  its object has gone away (or is about to) and if so, signal a \r\tsemaphore.  */\r/*\tDo *not* inline this in sweepPhase - it is quite an unlikely \r\tcase to run into a weak reference */\r\rsqInt finalizeReference(usqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt chunk;\r    sqInt lastField;\r    sqInt nonWeakCnt;\r    sqInt oopGone;\r    sqInt firstField;\r    usqInt weakOop;\r    sqInt i;\r    sqInt listOop;\r    sqInt listItemOop;\r    sqInt sz;\r    sqInt header;\r    sqInt contextSize;\r    sqInt fmt;\r    sqInt methodHeader;\r    sqInt header1;\r    sqInt type;\r    sqInt sp;\r\r\tnonWeakCnt = nonWeakFieldsOf(oop);\r\tfirstField = (BASE_HEADER_SIZE) + (nonWeakCnt << (SHIFT_FOR_WORD));\r\t/* begin lastPointerOf: */\r\theader = longAt(oop);\r\tfmt = (((usqInt) header) >> 8) & 15;\r\tif (fmt <= 4) {\r\t\tif ((fmt == 3) && ((((((usqInt) header) >> 12) & 31) == 13) || ((((((usqInt) header) >> 12) & 31) == 14) || (((((usqInt) header) >> 12) & 31) == 4)))) {\r\t\t\t/* begin fetchStackPointerOf: */\r\t\t\tsp = longAt((oop + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)));\r\t\t\tif (!((sp & 1))) {\r\t\t\t\tcontextSize = 0;\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\t\tcontextSize = (sp >> 1);\r\t\tl2:\t/* end fetchStackPointerOf: */;\r\t\t\tlastField = (CtxtTempFrameStart + contextSize) * (BYTES_PER_WORD);\r\t\t\tgoto l4;\r\t\t}\r\t\t/* begin sizeBitsOfSafe: */\r\t\theader1 = longAt(oop);\r\t\t/* begin rightType: */\r\t\tif ((header1 & (SIZE_MASK)) == 0) {\r\t\t\ttype = HeaderTypeSizeAndClass;\r\t\t\tgoto l3;\r\t\t} else {\r\t\t\tif ((header1 & CompactClassMask) == 0) {\r\t\t\t\ttype = HeaderTypeClass;\r\t\t\t\tgoto l3;\r\t\t\t} else {\r\t\t\t\ttype = HeaderTypeShort;\r\t\t\t\tgoto l3;\r\t\t\t}\r\t\t}\r\tl3:\t/* end rightType: */;\r\t\tif (type == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (ALL_BUT_TYPE_MASK);\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\tsz = header1 & (SIZE_MASK);\r\t\t\tgoto l1;\r\t\t}\r\tl1:\t/* end sizeBitsOfSafe: */;\r\t\tlastField = sz - (BASE_HEADER_SIZE);\r\t\tgoto l4;\r\t}\r\tif (fmt < 12) {\r\t\tlastField = 0;\r\t\tgoto l4;\r\t}\r\tmethodHeader = longAt(oop + (BASE_HEADER_SIZE));\r\tlastField = (((((usqInt) methodHeader) >> 10) & 255) * (BYTES_PER_WORD)) + (BASE_HEADER_SIZE);\rl4:\t/* end lastPointerOf: */;\r\tfor (i = firstField; i <= lastField; i += (BYTES_PER_WORD)) {\r\r\t\t/* ar 1/18/2005: Added oop < youngStart test to make sure we're not testing\r\t\t\tobjects in non-GCable region. This could lead to a forward reference in\r\t\t\told space with the oop pointed to not being marked and thus treated as free. */\r\r\t\tweakOop = longAt(oop + i);\r\t\tif (!((weakOop == foo->nilObj) || (((weakOop & 1)) || (weakOop < foo->youngStart)))) {\r\t\t\tif (weakOop < oop) {\r\r\t\t\t\t/* Check if the object is being collected. \r\t\t\t\t\tIf the weak reference points  \r\t\t\t\t\t* backward: check if the weakOops chunk is free\r\t\t\t\t\t* forward: check if the weakOoop has been marked by GC */\r\r\t\t\t\tchunk = weakOop - (foo->headerTypeBytes[(longAt(weakOop)) & TypeMask]);\r\t\t\t\toopGone = ((longAt(chunk)) & TypeMask) == HeaderTypeFree;\r\t\t\t} else {\r\t\t\t\toopGone = ((longAt(weakOop)) & (MARK_BIT)) == 0;\r\t\t\t}\r\t\t\tif (oopGone) {\r\t\t\t\tlongAtput(oop + i, foo->nilObj);\r\t\t\t\tif (nonWeakCnt >= 2) {\r\t\t\t\t\t/* begin weakFinalizerCheck: */\r\t\t\t\t\tlistOop = longAt((oop + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)));\r\t\t\t\t\tif ((fetchClassOf(listOop)) == (fetchPointerofObject(ClassWeakFinalizer, foo->specialObjectsOop))) {\r\t\t\t\t\t\tlistItemOop = longAt((listOop + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)));\r\t\t\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\t\t\tif ((((usqInt) oop)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\t\tpossibleRootStoreIntovalue(oop, listItemOop);\r\t\t\t\t\t\t}\r\t\t\t\t\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + (1 << (SHIFT_FOR_WORD)), listItemOop);\r\t\t\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\t\t\tif ((((usqInt) listOop)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\t\tpossibleRootStoreIntovalue(listOop, oop);\r\t\t\t\t\t\t}\r\t\t\t\t\t\tlongAtput((listOop + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)), oop);\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\t/* begin signalFinalization: */\r\t\t\t\t/* begin forceInterruptCheck */\r\t\t\t\tfoo->interruptCheckCounter = -1000;\r\t\t\t\tfoo->nextPollTick = 0;\r\t\t\t\tfoo->pendingFinalizationSignals += 1;\r\t\t\t}\r\t\t}\r\t}\r}\r\rsqInt findClassOfMethodforReceiver(sqInt meth, sqInt rcvr) {\rregister struct foo * foo = &fum;\r    sqInt done;\r    sqInt classDict;\r    sqInt classDictSize;\r    sqInt i;\r    sqInt currClass;\r    sqInt methodArray;\r    sqInt sz;\r    sqInt ccIndex;\r    sqInt ccIndex1;\r    sqInt oop;\r    sqInt oop1;\r    sqInt header;\r    sqInt oop2;\r    sqInt oop3;\r    sqInt oop4;\r    sqInt oop5;\r\r\t/* begin fetchClassOf: */\r\tif ((rcvr & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop = foo->specialObjectsOop;\r\t\tcurrClass = longAt((oop + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tcurrClass = (longAt(rcvr - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop4 = foo->specialObjectsOop;\r\t\toop1 = longAt((oop4 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tcurrClass = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\rl1:\t/* end fetchClassOf: */;\r\tdone = 0;\r\twhile (!(done)) {\r\t\tclassDict = longAt((currClass + (BASE_HEADER_SIZE)) + (MessageDictionaryIndex << (SHIFT_FOR_WORD)));\r\t\t/* begin fetchWordLengthOf: */\r\t\t/* begin sizeBitsOf: */\r\t\theader = longAt(classDict);\r\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(classDict - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\tgoto l2;\r\t\t} else {\r\t\t\tsz = header & (SIZE_MASK);\r\t\t\tgoto l2;\r\t\t}\r\tl2:\t/* end sizeBitsOf: */;\r\t\tclassDictSize = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tmethodArray = longAt((classDict + (BASE_HEADER_SIZE)) + (MethodArrayIndex << (SHIFT_FOR_WORD)));\r\t\ti = 0;\r\t\twhile (i < (classDictSize - SelectorStart)) {\r\t\t\tif (meth == (longAt((methodArray + (BASE_HEADER_SIZE)) + (i << (SHIFT_FOR_WORD))))) {\r\t\t\t\treturn currClass;\r\t\t\t}\r\t\t\ti += 1;\r\t\t}\r\t\tcurrClass = longAt((currClass + (BASE_HEADER_SIZE)) + (SuperclassIndex << (SHIFT_FOR_WORD)));\r\t\tdone = currClass == foo->nilObj;\r\t}\r\t/* begin fetchClassOf: */\r\tif ((rcvr & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop2 = foo->specialObjectsOop;\r\t\treturn longAt((oop2 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t}\r\tccIndex1 = (((usqInt) (longAt(rcvr))) >> 12) & 31;\r\tif (ccIndex1 == 0) {\r\t\treturn (longAt(rcvr - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop5 = foo->specialObjectsOop;\r\t\toop3 = longAt((oop5 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\treturn longAt((oop3 + (BASE_HEADER_SIZE)) + ((ccIndex1 - 1) << (SHIFT_FOR_WORD)));\r\t}\r\treturn null;\r}\r\r\r/*\tFind the compiled method to be run when the current \r\tmessageSelector is sent to the given class, setting the values \r\tof 'newMethod' and 'primitiveIndex'. */\r\rsqInt findNewMethodInClass(sqInt class) {\rregister struct foo * foo = &fum;\r    sqInt ok;\r    sqInt hash;\r    sqInt probe;\r\r\t/* begin lookupInMethodCacheSel:class: */\r\thash = foo->messageSelector ^ class;\r\tprobe = hash & MethodCacheMask;\r\tif (((foo->methodCache[probe + MethodCacheSelector]) == foo->messageSelector) && ((foo->methodCache[probe + MethodCacheClass]) == class)) {\r\t\tfoo->newMethod = foo->methodCache[probe + MethodCacheMethod];\r\t\tfoo->primitiveIndex = foo->methodCache[probe + MethodCachePrim];\r\t\tfoo->newNativeMethod = foo->methodCache[probe + MethodCacheNative];\r\t\tfoo->primitiveFunctionPointer = ((void *) (foo->methodCache[probe + MethodCachePrimFunction]));\r\t\tok = 1;\r\t\tgoto l1;\r\t}\r\tprobe = (((usqInt) hash) >> 1) & MethodCacheMask;\r\tif (((foo->methodCache[probe + MethodCacheSelector]) == foo->messageSelector) && ((foo->methodCache[probe + MethodCacheClass]) == class)) {\r\t\tfoo->newMethod = foo->methodCache[probe + MethodCacheMethod];\r\t\tfoo->primitiveIndex = foo->methodCache[probe + MethodCachePrim];\r\t\tfoo->newNativeMethod = foo->methodCache[probe + MethodCacheNative];\r\t\tfoo->primitiveFunctionPointer = ((void *) (foo->methodCache[probe + MethodCachePrimFunction]));\r\t\tok = 1;\r\t\tgoto l1;\r\t}\r\tprobe = (((usqInt) hash) >> 2) & MethodCacheMask;\r\tif (((foo->methodCache[probe + MethodCacheSelector]) == foo->messageSelector) && ((foo->methodCache[probe + MethodCacheClass]) == class)) {\r\t\tfoo->newMethod = foo->methodCache[probe + MethodCacheMethod];\r\t\tfoo->primitiveIndex = foo->methodCache[probe + MethodCachePrim];\r\t\tfoo->newNativeMethod = foo->methodCache[probe + MethodCacheNative];\r\t\tfoo->primitiveFunctionPointer = ((void *) (foo->methodCache[probe + MethodCachePrimFunction]));\r\t\tok = 1;\r\t\tgoto l1;\r\t}\r\tok = 0;\rl1:\t/* end lookupInMethodCacheSel:class: */;\r\tif (!(ok)) {\r\t\tlookupMethodInClass(class);\r\t\tfoo->lkupClass = class;\r\t\taddNewMethodToCache();\r\t}\r}\r\r\r/*\tSearch the obsolete named primitive table for the given function.\r\tReturn the index if it's found, -1 otherwise. */\r\rsqInt findObsoleteNamedPrimitivelength(char * functionName, sqInt functionLength) {\r    sqInt chIndex;\r    sqInt index;\r    const char * entry;\r\r\tindex = 0;\r\twhile (1) {\r\t\tentry = obsoleteNamedPrimitiveTable[index][0];\r\t\tif (entry == null) {\r\t\t\treturn -1;\r\t\t}\r\t\t;\r\t\tchIndex = 0;\r\t\twhile (((entry[chIndex]) == (functionName[chIndex])) && (chIndex < functionLength)) {\r\t\t\tchIndex += 1;\r\t\t}\r\t\tif ((chIndex == functionLength) && ((entry[chIndex]) == 0)) {\r\t\t\treturn index;\r\t\t}\r\t\tindex += 1;\r\t}\r}\r\rsqInt findSelectorOfMethodforReceiver(sqInt meth, sqInt rcvr) {\rregister struct foo * foo = &fum;\r    sqInt done;\r    sqInt classDict;\r    sqInt classDictSize;\r    sqInt i;\r    sqInt currClass;\r    sqInt methodArray;\r    sqInt sz;\r    sqInt ccIndex;\r    sqInt oop;\r    sqInt oop1;\r    sqInt header;\r    sqInt oop2;\r\r\t/* begin fetchClassOf: */\r\tif ((rcvr & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop = foo->specialObjectsOop;\r\t\tcurrClass = longAt((oop + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tcurrClass = (longAt(rcvr - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop2 = foo->specialObjectsOop;\r\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tcurrClass = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\rl1:\t/* end fetchClassOf: */;\r\tdone = 0;\r\twhile (!(done)) {\r\t\tclassDict = longAt((currClass + (BASE_HEADER_SIZE)) + (MessageDictionaryIndex << (SHIFT_FOR_WORD)));\r\t\t/* begin fetchWordLengthOf: */\r\t\t/* begin sizeBitsOf: */\r\t\theader = longAt(classDict);\r\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(classDict - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\tgoto l2;\r\t\t} else {\r\t\t\tsz = header & (SIZE_MASK);\r\t\t\tgoto l2;\r\t\t}\r\tl2:\t/* end sizeBitsOf: */;\r\t\tclassDictSize = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tmethodArray = longAt((classDict + (BASE_HEADER_SIZE)) + (MethodArrayIndex << (SHIFT_FOR_WORD)));\r\t\ti = 0;\r\t\twhile (i <= (classDictSize - SelectorStart)) {\r\t\t\tif (meth == (longAt((methodArray + (BASE_HEADER_SIZE)) + (i << (SHIFT_FOR_WORD))))) {\r\t\t\t\treturn longAt((classDict + (BASE_HEADER_SIZE)) + ((i + SelectorStart) << (SHIFT_FOR_WORD)));\r\t\t\t}\r\t\t\ti += 1;\r\t\t}\r\t\tcurrClass = longAt((currClass + (BASE_HEADER_SIZE)) + (SuperclassIndex << (SHIFT_FOR_WORD)));\r\t\tdone = currClass == foo->nilObj;\r\t}\r\treturn foo->nilObj;\r}\r\r\r/*\tReturn the first accessible object in the heap. */\r\rsqInt firstAccessibleObject(void) {\rregister struct foo * foo = &fum;\r    sqInt obj;\r    sqInt sz;\r    sqInt header;\r\r\tobj = memory + (foo->headerTypeBytes[(longAt(memory)) & TypeMask]);\r\twhile ((((usqInt) obj)) < (((usqInt) foo->endOfMemory))) {\r\t\tif (!(((longAt(obj)) & TypeMask) == HeaderTypeFree)) {\r\t\t\treturn obj;\r\t\t}\r\t\t/* begin objectAfter: */\r\t\tif (DoAssertionChecks) {\r\t\t\tif ((((usqInt) obj)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t}\r\t\t}\r\t\tif (((longAt(obj)) & TypeMask) == HeaderTypeFree) {\r\t\t\tsz = (longAt(obj)) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader = longAt(obj);\r\t\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(obj - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tsz = header & (SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\tl1:\t/* end sizeBitsOf: */;\r\t\t}\r\t\tobj = (obj + sz) + (foo->headerTypeBytes[(longAt(obj + sz)) & TypeMask]);\r\t}\r\terror(\"heap is empty\");\r}\r\rchar * firstFixedField(sqInt oop) {\r\treturn pointerForOop(oop + (BASE_HEADER_SIZE));\r}\r\r\r/*\tNOTE: copied in InterpreterSimulator, so please duplicate any changes */\r\rchar * firstIndexableField(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt totalLength;\r    sqInt fmt;\r    sqInt fixedFields;\r    sqInt hdr;\r    sqInt sz;\r    sqInt classFormat;\r    sqInt class;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\thdr = longAt(oop);\r\tfmt = (((usqInt) hdr) >> 8) & 15;\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((hdr & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz = hdr & (SIZE_MASK);\r\t}\r\tsz -= hdr & (SIZE_4_BIT);\r\tif (fmt <= 4) {\r\t\ttotalLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tgoto l1;\r\t}\r\tif (fmt < 8) {\r\t\ttotalLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> 2;\r\t\tgoto l1;\r\t} else {\r\t\ttotalLength = (sz - (BASE_HEADER_SIZE)) - (fmt & 3);\r\t\tgoto l1;\r\t}\rl1:\t/* end lengthOf:baseHeader:format: */;\r\t/* begin fixedFieldsOf:format:length: */\r\tif ((fmt > 4) || (fmt == 2)) {\r\t\tfixedFields = 0;\r\t\tgoto l3;\r\t}\r\tif (fmt < 2) {\r\t\tfixedFields = totalLength;\r\t\tgoto l3;\r\t}\r\t/* begin fetchClassOf: */\r\tif ((oop & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tclass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l2;\r\t}\r\tccIndex = (((usqInt) (longAt(oop))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tclass = (longAt(oop - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tclass = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l2;\r\t}\rl2:\t/* end fetchClassOf: */;\r\tclassFormat = (longAt((class + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1;\r\tfixedFields = (((((usqInt) classFormat) >> 11) & 192) + ((((usqInt) classFormat) >> 2) & 63)) - 1;\rl3:\t/* end fixedFieldsOf:format:length: */;\r\tif (fmt < 8) {\r\t\tif (fmt == 6) {\r\t\t\treturn pointerForOop((oop + (BASE_HEADER_SIZE)) + (fixedFields << 2));\r\t\t}\r\t\treturn pointerForOop((oop + (BASE_HEADER_SIZE)) + (fixedFields << (SHIFT_FOR_WORD)));\r\t} else {\r\t\treturn pointerForOop((oop + (BASE_HEADER_SIZE)) + fixedFields);\r\t}\r}\r\rsqInt floatObjectOf(double  aFloat) {\r    sqInt newFloatObj;\r\r\tflag(\"Dan\");\r\tnewFloatObj = instantiateSmallClasssizeInBytes(fetchPointerofObject(ClassFloat, foo->specialObjectsOop), 8 + (BASE_HEADER_SIZE));\r\tstoreFloatAtfrom(newFloatObj + (BASE_HEADER_SIZE), aFloat);\r\treturn newFloatObj;\r}\r\r\r/*\tFetch the instance variable at the given index of the given object. Return the C double precision floating point value of that instance variable, or fail if it is not a Float. */\r/*\tNote: May be called by translated primitive code. */\r\rdouble floatValueOf(sqInt oop) {\rregister struct foo * foo = &fum;\r    double  result;\r    sqInt classOop;\r    sqInt cl;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\tflag(\"Dan\");\r\t/* begin assertClassOf:is: */\r\t/* begin fetchPointer:ofObject: */\r\toop3 = foo->specialObjectsOop;\r\tclassOop = longAt((oop3 + (BASE_HEADER_SIZE)) + (ClassFloat << (SHIFT_FOR_WORD)));\r\tif ((oop & 1)) {\r\t\tfoo->successFlag = 0;\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(oop))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tcl = (longAt(oop - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop2 = foo->specialObjectsOop;\r\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tcl = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t}\r\t/* begin success: */\r\tfoo->successFlag = (cl == classOop) && foo->successFlag;\rl1:\t/* end assertClassOf:is: */;\r\tif (foo->successFlag) {\r\t\t;\r\t\tfetchFloatAtinto(oop + (BASE_HEADER_SIZE), result);\r\t} else {\r\t\tresult = 0.0;\r\t}\r\treturn result;\r}\r\r\r/*\tmethodPtr is a CompiledMethod containing an external primitive. Flush the function address and session ID of the CM */\r\rsqInt flushExternalPrimitiveOf(sqInt methodPtr) {\r    sqInt lit;\r\r\tif (!((literalCountOfHeader(longAt((methodPtr + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD))))) > 0)) {\r\t\treturn null;\r\t}\r\tlit = longAt((methodPtr + (BASE_HEADER_SIZE)) + ((0 + LiteralStart) << (SHIFT_FOR_WORD)));\r\tif (!((((lit & 1) == 0) && (((((usqInt) (longAt(lit))) >> 8) & 15) == 2)) && ((lengthOf(lit)) == 4))) {\r\t\treturn null;\r\t}\r\tlongAtput((lit + (BASE_HEADER_SIZE)) + (2 << (SHIFT_FOR_WORD)), ConstZero);\r\tlongAtput((lit + (BASE_HEADER_SIZE)) + (3 << (SHIFT_FOR_WORD)), ConstZero);\r}\r\r\r/*\tFlush the references to external functions from plugin \r\tprimitives. This will force a reload of those primitives when \r\taccessed next. \r\tNote: We must flush the method cache here so that any \r\tfailed primitives are looked up again. */\r\rsqInt flushExternalPrimitives(void) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r    sqInt primIdx;\r    sqInt primBits;\r    sqInt sz;\r    sqInt header;\r    sqInt i;\r    sqInt i1;\r    sqInt i2;\r\r\toop = memory + (foo->headerTypeBytes[(longAt(memory)) & TypeMask]);\r\twhile ((((usqInt) oop)) < (((usqInt) foo->endOfMemory))) {\r\t\tif (!(((longAt(oop)) & TypeMask) == HeaderTypeFree)) {\r\t\t\tif (((((usqInt) (longAt(oop))) >> 8) & 15) >= 12) {\r\t\t\t\t/* begin primitiveIndexOf: */\r\t\t\t\tprimBits = (((usqInt) (longAt((oop + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD))))) >> 1) & 268435967;\r\t\t\t\tprimIdx = (primBits & 511) + (((usqInt) primBits) >> 19);\r\t\t\t\tif (primIdx == PrimitiveExternalCallIndex) {\r\t\t\t\t\tflushExternalPrimitiveOf(oop);\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t\t/* begin objectAfter: */\r\t\tif (DoAssertionChecks) {\r\t\t\tif ((((usqInt) oop)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t}\r\t\t}\r\t\tif (((longAt(oop)) & TypeMask) == HeaderTypeFree) {\r\t\t\tsz = (longAt(oop)) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader = longAt(oop);\r\t\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tsz = header & (SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\tl1:\t/* end sizeBitsOf: */;\r\t\t}\r\t\toop = (oop + sz) + (foo->headerTypeBytes[(longAt(oop + sz)) & TypeMask]);\r\t}\r\t/* begin flushMethodCache */\r\tfor (i = 1; i <= MethodCacheSize; i += 1) {\r\t\tfoo->methodCache[i] = 0;\r\t}\r\tfor (i = 1; i <= AtCacheTotalSize; i += 1) {\r\t\tfoo->atCache[i] = 0;\r\t}\r\t/* begin flushObsoleteIndexedPrimitives */\r\tfor (i1 = 1; i1 <= MaxPrimitiveIndex; i1 += 1) {\r\t\t(obsoleteIndexedPrimitiveTable[i1])[2] = null;\r\t}\r\t/* begin flushExternalPrimitiveTable */\r\tfor (i2 = 0; i2 <= (MaxExternalPrimitiveTableSize - 1); i2 += 1) {\r\t\tfoo->externalPrimitiveTable[i2] = 0;\r\t}\r}\r\r\r/*\tforce an interrupt check ASAP - setting interruptCheckCounter to a large -ve number is used as a flag to skip messing with the feedback mechanism and nextPollTick resetting makes sure that ioProcess gets called as near immediately as we can manage */\r\rsqInt forceInterruptCheck(void) {\rregister struct foo * foo = &fum;\r\tfoo->interruptCheckCounter = -1000;\r\tfoo->nextPollTick = 0;\r}\r\r\r/*\tRepaint the entire smalltalk screen, ignoring the affected rectangle. Used in some platform's code when the Smalltalk window is brought to the front or uncovered. */\r\rsqInt fullDisplayUpdate(void) {\r    sqInt displayObj;\r    sqInt h;\r    sqInt w;\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\tdisplayObj = longAt((oop + (BASE_HEADER_SIZE)) + (TheDisplay << (SHIFT_FOR_WORD)));\r\tif ((((displayObj & 1) == 0) && (((((usqInt) (longAt(displayObj))) >> 8) & 15) <= 4)) && ((lengthOf(displayObj)) >= 4)) {\r\t\tw = fetchIntegerofObject(1, displayObj);\r\t\th = fetchIntegerofObject(2, displayObj);\r\t\tdisplayBitsOfLeftTopRightBottom(displayObj, 0, 0, w, h);\r\t\tioForceDisplayUpdate();\r\t}\r}\r\r\r/*\tDo a mark/sweep garbage collection of the entire object memory. Free inaccessible objects but do not move them. */\r\rsqInt fullGC(void) {\rregister struct foo * foo = &fum;\r    sqLong startTime;\r    sqInt oop;\r    sqInt i;\r    sqInt sz;\r    sqInt activeCntx;\r    sqInt valuePointer;\r    sqInt valuePointer1;\r\r\tif (DoAssertionChecks) {\r\t\treverseDisplayFromto(0, 7);\r\t}\r\t/* begin preGCAction: */\r\tif (foo->compilerInitialized) {\r\t\tcompilerPreGC(1);\r\t} else {\r\t\t/* begin storeContextRegisters: */\r\t\tactiveCntx = foo->activeContext;\r\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\tvaluePointer = ((((foo->instructionPointer - foo->method) - ((BASE_HEADER_SIZE) - 2)) << 1) | 1);\r\t\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\tvaluePointer1 = (((((((usqInt) ((foo->stackPointer - foo->activeContext) - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD)) - TempFrameStart) + 1) << 1) | 1);\r\t\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\t}\r\tstartTime = ioMicroSecondClock();\r\tfoo->statSweepCount = foo->statMarkCount = foo->statMkFwdCount = foo->statCompMoveCount = 0;\r\t/* begin clearRootsTable */\r\tfor (i = 1; i <= foo->rootTableCount; i += 1) {\r\t\toop = foo->rootTable[i];\r\t\tlongAtput(oop, (longAt(oop)) & (ALL_BUT_ROOT_BIT));\r\t\tfoo->rootTable[i] = 0;\r\t}\r\tfoo->rootTableCount = 0;\r\r\t/* process all of memory */\r\r\tfoo->youngStart = memory;\r\tmarkPhase();\r\tfoo->totalObjectCount = sweepPhase();\r\t/* begin fullCompaction */\r\tfoo->compStart = lowestFreeAfter(memory);\r\tif (foo->compStart == foo->freeBlock) {\r\t\tinitializeMemoryFirstFree(foo->freeBlock);\r\t\tgoto l1;\r\t}\r\tif ((sz = fwdTableSize(8)) < foo->totalObjectCount) {\r\t\tgrowObjectMemory(((foo->totalObjectCount - sz) + 10000) * 8);\r\t}\r\twhile (foo->compStart < foo->freeBlock) {\r\t\tfoo->compStart = incCompBody();\r\t}\rl1:\t/* end fullCompaction */;\r\tfoo->allocationCount = 0;\r\tfoo->statFullGCs += 1;\r\tfoo->statGCTime = ioMicroSecondClock();\r\tfoo->statFullGCMSecs += foo->statGCTime - startTime;\r\t/* begin capturePendingFinalizationSignals */\r\tfoo->statpendingFinalizationSignals = foo->pendingFinalizationSignals;\r\r\t/* reset the young object boundary */\r\r\tfoo->youngStart = foo->freeBlock;\r\tpostGCAction();\r\tif (DoAssertionChecks) {\r\t\treverseDisplayFromto(0, 7);\r\t}\r}\r\r\r/*\tSet the limits for a table of two- or three-word forwarding blocks above the last used oop. The pointer fwdTableNext moves up to fwdTableLast. Used for compaction of memory and become-ing objects. Returns the number of forwarding blocks available. */\r\rsqInt fwdTableInit(sqInt blkSize) {\rregister struct foo * foo = &fum;\r\t/* begin setSizeOfFree:to: */\r\tlongAtput(foo->freeBlock, ((BASE_HEADER_SIZE) & (ALL_BUT_TYPE_MASK)) | HeaderTypeFree);\r\r\t/* make a fake free chunk at endOfMemory for use as a sentinal in memory scans */\r\r\tfoo->endOfMemory = foo->freeBlock + (BASE_HEADER_SIZE);\r\t/* begin setSizeOfFree:to: */\r\tlongAtput(foo->endOfMemory, ((BASE_HEADER_SIZE) & (ALL_BUT_TYPE_MASK)) | HeaderTypeFree);\r\tfoo->fwdTableNext = ((foo->endOfMemory + (BASE_HEADER_SIZE)) + 7) & ((WORD_MASK) - 7);\r\tflag(\"Dan\");\r\r\t/* last forwarding table entry */\r\t/* return the number of forwarding blocks available */\r\r\tfoo->fwdTableLast = foo->memoryLimit - blkSize;\r\treturn (foo->fwdTableLast - foo->fwdTableNext) / blkSize;\r}\r\r\r/*\tEstimate the number of forwarding blocks available for compaction */\r\rsqInt fwdTableSize(sqInt blkSize) {\rregister struct foo * foo = &fum;\r    sqInt fwdLast;\r    sqInt eom;\r    sqInt fwdFirst;\r\r\r\t/* use all memory free between freeBlock and memoryLimit for forwarding table */\r\t/* Note: Forward blocks must be quadword aligned. */\r\r\teom = foo->freeBlock + (BASE_HEADER_SIZE);\r\tfwdFirst = ((eom + (BASE_HEADER_SIZE)) + 7) & ((WORD_MASK) - 7);\r\tflag(\"Dan\");\r\r\t/* last forwarding table entry */\r\t/* return the number of forwarding blocks available */\r\r\tfwdLast = foo->memoryLimit - blkSize;\r\treturn (fwdLast - fwdFirst) / blkSize;\r}\r\r\r/*\tcurrentBytecode will be private to the main dispatch loop in the generated code. This method allows the currentBytecode to be retrieved from global variables. */\r\rsqInt getCurrentBytecode(void) {\r\treturn byteAt(foo->instructionPointer);\r}\r\rsqInt getFullScreenFlag(void) {\r\treturn foo->fullScreenFlag;\r}\r\rsqInt getInterruptCheckCounter(void) {\r\treturn foo->interruptCheckCounter;\r}\r\rsqInt getInterruptKeycode(void) {\r\treturn foo->interruptKeycode;\r}\r\rsqInt getInterruptPending(void) {\r\treturn foo->interruptPending;\r}\r\r\r/*\tAnswer the next word read from aFile, byte-swapped according to the swapFlag. */\r\rsqInt getLongFromFileswap(sqImageFile  aFile, sqInt swapFlag) {\r    sqInt w;\r\r\tw = 0;\r\tsqImageFileRead(&w, sizeof(w), 1, aFile);\r\tif (swapFlag) {\r\t\t/* begin byteSwapped: */\r\t\t\r# if (BYTES_PER_WORD == 4)  // swap bytes in an object word\r\t\treturn ((((((usqInt) w >> 24)) & Byte0Mask) + ((((usqInt) w >> 8)) & Byte1Mask)) + ((((usqInt) w << 8)) & Byte2Mask)) + ((((usqInt) w << 24)) & Byte3Mask);\r# else\r\t\treturn ((((((((((usqInt) w >> 56)) & Byte0Mask) + ((((usqInt) w >> 40)) & Byte1Mask)) + ((((usqInt) w >> 24)) & Byte2Mask)) + ((((usqInt) w >> 8)) & Byte3Mask)) + ((((usqInt) w << 8)) & Byte4Mask)) + ((((usqInt) w << 24)) & Byte5Mask)) + ((((usqInt) w << 40)) & Byte6Mask)) + ((((usqInt) w << 56)) & Byte7Mask);\r# endif  // BYTES_PER_WORD == 4\r\t\t\r\t\treturn null;\r\t} else {\r\t\treturn w;\r\t}\r}\r\rsqInt getNextWakeupTick(void) {\r\treturn foo->nextWakeupTick;\r}\r\rsqInt getSavedWindowSize(void) {\r\treturn foo->savedWindowSize;\r}\r\r\r/*\tFor Newsqueak FFI */\r\rEXPORT(sqInt) getStackPointer(void) {\r\treturn foo->stackPointer;\r}\r\r\r/*\treturn the global session ID value */\r\rsqInt getThisSessionID(void) {\r\treturn foo->globalSessionID;\r}\r\r\r/*\tAttempt to grow the object memory by the given delta \r\tamount  */\r\rsqInt growObjectMemory(usqInt delta) {\rregister struct foo * foo = &fum;\r    usqInt limit;\r\r\tif (!(isExcessiveAllocationRequestshift(delta, 0))) {\r\t\tfoo->statGrowMemory += 1;\r\t\tlimit = sqGrowMemoryBy(foo->memoryLimit, delta);\r\t\tif (!(limit == foo->memoryLimit)) {\r\r\t\t\t/* remove a tad for safety */\r\r\t\t\tfoo->memoryLimit = limit - 24;\r\t\t\tinitializeMemoryFirstFree(foo->freeBlock);\r\t\t}\r\t}\r}\r\rsqInt headerOf(sqInt methodPointer) {\r\treturn longAt((methodPointer + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD)));\r}\r\r\r/*\tThis VM is backwards-compatible with the immediately preceeding pre-closure version, and will allow loading images (or image segments) of that version. */\r\rsqInt imageFormatBackwardCompatibilityVersion(void) {\r\tif ((BYTES_PER_WORD) == 4) {\r\t\treturn 6502;\r\t} else {\r\t\treturn 68000;\r\t}\r}\r\r\r/*\tThis VM is forwards-compatible with the immediately following closure version, and\r\t will write the new version number in snapshots if the closure creation bytecode is used. */\r\rsqInt imageFormatForwardCompatibilityVersion(void) {\r\tif ((BYTES_PER_WORD) == 4) {\r\t\treturn 6504;\r\t} else {\r\t\treturn 68002;\r\t}\r}\r\r\r/*\ta more complex version that tells both the word reversal and the endianness of the machine it came from.  Low half of word is 6502.  Top byte is top byte of #doesNotUnderstand: on this machine. ($d on the Mac or $s on the PC) */\r\rsqInt imageSegmentVersion(void) {\r    sqInt wholeWord;\r\r\r\t/* first data word, 'does'  */\r\r\twholeWord = longAt((fetchPointerofObject(SelectorDoesNotUnderstand, foo->specialObjectsOop)) + (BASE_HEADER_SIZE));\r\treturn imageFormatVersionNumber | (wholeWord & 4278190080U);\r}\r\r\r/*\tMove objects to consolidate free space into one big chunk. Return the newly created free chunk. */\r\rsqInt incCompBody(void) {\rregister struct foo * foo = &fum;\r    sqInt bytesFreed;\r\r\tfwdTableInit((BYTES_PER_WORD) * 2);\r\r\t/* update pointers to point at new oops */\r\r\tbytesFreed = incCompMakeFwd();\r\tmapPointersInObjectsFromto(foo->youngStart, foo->endOfMemory);\r\treturn incCompMove(bytesFreed);\r}\r\r\r/*\tCreate and initialize forwarding blocks for all non-free objects  \r\tfollowing compStart. If the supply of forwarding blocks is exhausted,  \r\tset compEnd to the first chunk above the area to be \r\tcompacted; otherwise, set it to endOfMemory. Return the number of \r\tbytes to be freed. */\r\rsqInt incCompMakeFwd(void) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r    sqInt newOop;\r    sqInt fwdBlock;\r    sqInt bytesFreed;\r    sqInt originalHeader;\r    sqInt originalHeaderType;\r    sqInt sz;\r    sqInt header;\r    sqInt fwdBlock1;\r    sqInt realHeader;\r    sqInt sz1;\r    sqInt header1;\r\r\tbytesFreed = 0;\r\toop = foo->compStart + (foo->headerTypeBytes[(longAt(foo->compStart)) & TypeMask]);\r\twhile ((((usqInt) oop)) < (((usqInt) foo->endOfMemory))) {\r\t\tfoo->statMkFwdCount += 1;\r\t\tif (((longAt(oop)) & TypeMask) == HeaderTypeFree) {\r\t\t\tbytesFreed += (longAt(oop)) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin fwdBlockGet: */\r\t\t\tfoo->fwdTableNext += (BYTES_PER_WORD) * 2;\r\t\t\tif (foo->fwdTableNext <= foo->fwdTableLast) {\r\t\t\t\tfwdBlock = foo->fwdTableNext;\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tfwdBlock = null;\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\tl1:\t/* end fwdBlockGet: */;\r\t\t\tif (fwdBlock == null) {\r\r\t\t\t\t/* stop; we have used all available forwarding blocks */\r\r\t\t\t\tfoo->compEnd = oop - (foo->headerTypeBytes[(longAt(oop)) & TypeMask]);\r\t\t\t\treturn bytesFreed;\r\t\t\t}\r\t\t\tnewOop = oop - bytesFreed;\r\t\t\t/* begin initForwardBlock:mapping:to:withBackPtr: */\r\t\t\toriginalHeader = longAt(oop);\r\t\t\tif (DoAssertionChecks) {\r\t\t\t\tif (fwdBlock == null) {\r\t\t\t\t\terror(\"ran out of forwarding blocks in become\");\r\t\t\t\t}\r\t\t\t\tif ((originalHeader & (MARK_BIT)) != 0) {\r\t\t\t\t\terror(\"object already has a forwarding table entry\");\r\t\t\t\t}\r\t\t\t}\r\t\t\toriginalHeaderType = originalHeader & TypeMask;\r\t\t\tlongAtput(fwdBlock, newOop);\r\t\t\tlongAtput(fwdBlock + (BYTES_PER_WORD), originalHeader);\r\t\t\tif (0) {\r\t\t\t\tlongAtput(fwdBlock + ((BYTES_PER_WORD) * 2), oop);\r\t\t\t}\r\t\t\tlongAtput(oop, (((usqInt) fwdBlock) >> 1) | ((MARK_BIT) | originalHeaderType));\r\t\t}\r\t\t/* begin objectAfterWhileForwarding: */\r\t\theader = longAt(oop);\r\t\tif ((header & (MARK_BIT)) == 0) {\r\t\t\t/* begin objectAfter: */\r\t\t\tif (DoAssertionChecks) {\r\t\t\t\tif ((((usqInt) oop)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t\t}\r\t\t\t}\r\t\t\tif (((longAt(oop)) & TypeMask) == HeaderTypeFree) {\r\t\t\t\tsz1 = (longAt(oop)) & (ALL_BUT_TYPE_MASK);\r\t\t\t} else {\r\t\t\t\t/* begin sizeBitsOf: */\r\t\t\t\theader1 = longAt(oop);\r\t\t\t\tif ((header1 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\t\tsz1 = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\t\tgoto l2;\r\t\t\t\t} else {\r\t\t\t\t\tsz1 = header1 & (SIZE_MASK);\r\t\t\t\t\tgoto l2;\r\t\t\t\t}\r\t\t\tl2:\t/* end sizeBitsOf: */;\r\t\t\t}\r\t\t\toop = (oop + sz1) + (foo->headerTypeBytes[(longAt(oop + sz1)) & TypeMask]);\r\t\t\tgoto l3;\r\t\t}\r\t\tfwdBlock1 = (header & (ALL_BUT_MARK_BIT_AND_TYPE_MASK)) << 1;\r\t\tif (DoAssertionChecks) {\r\t\t\t/* begin fwdBlockValidate: */\r\t\t\tif (!(((((usqInt) fwdBlock1)) > (((usqInt) foo->endOfMemory))) && (((((usqInt) fwdBlock1)) <= (((usqInt) foo->fwdTableNext))) && ((fwdBlock1 & 3) == 0)))) {\r\t\t\t\terror(\"invalid fwd table entry\");\r\t\t\t}\r\t\t}\r\t\trealHeader = longAt(fwdBlock1 + (BYTES_PER_WORD));\r\t\tif ((realHeader & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t} else {\r\t\t\tsz = realHeader & (SIZE_MASK);\r\t\t}\r\t\toop = (oop + sz) + (foo->headerTypeBytes[(longAt(oop + sz)) & TypeMask]);\r\tl3:\t/* end objectAfterWhileForwarding: */;\r\t}\r\tfoo->compEnd = foo->endOfMemory;\r\treturn bytesFreed;\r}\r\r\r/*\tMove all non-free objects between compStart and compEnd to their new  \r\tlocations, restoring their headers in the process. Create a new free  \r\tblock at the end of memory. Return the newly created free chunk.  */\r/*\tNote: The free block used by the allocator always must be the last free  \r\tblock in memory. It may take several compaction passes to make all  \r\tfree space bubble up to the end of memory. */\r\rsqInt incCompMove(sqInt bytesFreed) {\rregister struct foo * foo = &fum;\r    usqInt w;\r    usqInt lastWord;\r    sqInt oop;\r    sqInt target;\r    sqInt newOop;\r    sqInt sz;\r    sqInt next;\r    sqInt fwdBlock;\r    sqInt header;\r    sqInt bytesToMove;\r    sqInt newFreeChunk;\r    usqInt firstWord;\r    sqInt header1;\r    sqInt sz2;\r    sqInt header2;\r    sqInt fwdBlock1;\r    sqInt realHeader;\r    sqInt sz1;\r    sqInt header11;\r\r\tnewOop = null;\r\toop = foo->compStart + (foo->headerTypeBytes[(longAt(foo->compStart)) & TypeMask]);\r\twhile ((((usqInt) oop)) < (((usqInt) foo->compEnd))) {\r\t\tfoo->statCompMoveCount += 1;\r\t\t/* begin objectAfterWhileForwarding: */\r\t\theader2 = longAt(oop);\r\t\tif ((header2 & (MARK_BIT)) == 0) {\r\t\t\t/* begin objectAfter: */\r\t\t\tif (DoAssertionChecks) {\r\t\t\t\tif ((((usqInt) oop)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t\t}\r\t\t\t}\r\t\t\tif (((longAt(oop)) & TypeMask) == HeaderTypeFree) {\r\t\t\t\tsz1 = (longAt(oop)) & (ALL_BUT_TYPE_MASK);\r\t\t\t} else {\r\t\t\t\t/* begin sizeBitsOf: */\r\t\t\t\theader11 = longAt(oop);\r\t\t\t\tif ((header11 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\t\tsz1 = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\t\tgoto l2;\r\t\t\t\t} else {\r\t\t\t\t\tsz1 = header11 & (SIZE_MASK);\r\t\t\t\t\tgoto l2;\r\t\t\t\t}\r\t\t\tl2:\t/* end sizeBitsOf: */;\r\t\t\t}\r\t\t\tnext = (oop + sz1) + (foo->headerTypeBytes[(longAt(oop + sz1)) & TypeMask]);\r\t\t\tgoto l3;\r\t\t}\r\t\tfwdBlock1 = (header2 & (ALL_BUT_MARK_BIT_AND_TYPE_MASK)) << 1;\r\t\tif (DoAssertionChecks) {\r\t\t\t/* begin fwdBlockValidate: */\r\t\t\tif (!(((((usqInt) fwdBlock1)) > (((usqInt) foo->endOfMemory))) && (((((usqInt) fwdBlock1)) <= (((usqInt) foo->fwdTableNext))) && ((fwdBlock1 & 3) == 0)))) {\r\t\t\t\terror(\"invalid fwd table entry\");\r\t\t\t}\r\t\t}\r\t\trealHeader = longAt(fwdBlock1 + (BYTES_PER_WORD));\r\t\tif ((realHeader & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\tsz2 = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t} else {\r\t\t\tsz2 = realHeader & (SIZE_MASK);\r\t\t}\r\t\tnext = (oop + sz2) + (foo->headerTypeBytes[(longAt(oop + sz2)) & TypeMask]);\r\tl3:\t/* end objectAfterWhileForwarding: */;\r\t\tif (!(((longAt(oop)) & TypeMask) == HeaderTypeFree)) {\r\r\t\t\t/* a moving object; unwind its forwarding block */\r\r\t\t\tfwdBlock = ((longAt(oop)) & (ALL_BUT_MARK_BIT_AND_TYPE_MASK)) << 1;\r\t\t\tif (DoAssertionChecks) {\r\t\t\t\t/* begin fwdBlockValidate: */\r\t\t\t\tif (!(((((usqInt) fwdBlock)) > (((usqInt) foo->endOfMemory))) && (((((usqInt) fwdBlock)) <= (((usqInt) foo->fwdTableNext))) && ((fwdBlock & 3) == 0)))) {\r\t\t\t\t\terror(\"invalid fwd table entry\");\r\t\t\t\t}\r\t\t\t}\r\t\t\tnewOop = longAt(fwdBlock);\r\t\t\theader = longAt(fwdBlock + (BYTES_PER_WORD));\r\t\t\tlongAtput(oop, header);\r\r\t\t\t/* move the oop (including any extra header words)  */\r\r\t\t\tbytesToMove = oop - newOop;\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader1 = longAt(oop);\r\t\t\tif ((header1 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tsz = header1 & (SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\tl1:\t/* end sizeBitsOf: */;\r\t\t\tfirstWord = oop - (foo->headerTypeBytes[(longAt(oop)) & TypeMask]);\r\t\t\tlastWord = (oop + sz) - (BASE_HEADER_SIZE);\r\t\t\ttarget = firstWord - bytesToMove;\r\t\t\tfor (w = firstWord; w <= lastWord; w += (BYTES_PER_WORD)) {\r\t\t\t\tlongAtput(target, longAt(w));\r\t\t\t\ttarget += BYTES_PER_WORD;\r\t\t\t}\r\t\t}\r\t\toop = next;\r\t}\r\tif (newOop == null) {\r\r\t\t/* no objects moved */\r\r\t\toop = foo->compStart + (foo->headerTypeBytes[(longAt(foo->compStart)) & TypeMask]);\r\t\tif ((((longAt(oop)) & TypeMask) == HeaderTypeFree) && ((objectAfter(oop)) == (foo->compEnd + (foo->headerTypeBytes[(longAt(foo->compEnd)) & TypeMask])))) {\r\t\t\tnewFreeChunk = oop;\r\t\t} else {\r\t\t\tnewFreeChunk = foo->freeBlock;\r\t\t}\r\t} else {\r\r\t\t/* initialize the newly freed memory chunk */\r\t\t/* newOop is the last object moved; free chunk starts \r\t\t\tright after it */\r\r\t\tnewFreeChunk = newOop + (sizeBitsOf(newOop));\r\t\t/* begin setSizeOfFree:to: */\r\t\tlongAtput(newFreeChunk, (bytesFreed & (ALL_BUT_TYPE_MASK)) | HeaderTypeFree);\r\t}\r\tif (DoAssertionChecks) {\r\t\tif (!((objectAfter(newFreeChunk)) == (foo->compEnd + (foo->headerTypeBytes[(longAt(foo->compEnd)) & TypeMask])))) {\r\t\t\terror(\"problem creating free chunk after compaction\");\r\t\t}\r\t}\r\tif ((objectAfter(newFreeChunk)) == foo->endOfMemory) {\r\t\tinitializeMemoryFirstFree(newFreeChunk);\r\t} else {\r\t\tinitializeMemoryFirstFree(foo->freeBlock);\r\t}\r\treturn newFreeChunk;\r}\r\r\r/*\tReturn the equivalent of \r\t\taClass includesBehavior: aSuperclass.\r\tNote: written for efficiency and better inlining (only 1 temp) */\r\rsqInt includesBehaviorThatOf(sqInt aClass, sqInt aSuperclass) {\rregister struct foo * foo = &fum;\r    sqInt theClass;\r\r\tif (((theClass = aClass) == aSuperclass) || (aSuperclass == foo->nilObj)) {\r\t\treturn 1;\r\t}\r\tdo {\r\t\tif ((theClass = longAt((theClass + (BASE_HEADER_SIZE)) + (SuperclassIndex << (SHIFT_FOR_WORD)))) == aSuperclass) {\r\t\t\treturn 1;\r\t\t}\r\t} while(theClass != foo->nilObj);\r\treturn 0;\r}\r\r\r/*\tDo a mark/sweep garbage collection of just the young object \r\tarea of object memory (i.e., objects above youngStart), using \r\tthe root table to identify objects containing pointers to \r\tyoung objects from the old object area. */\r\rsqInt incrementalGC(void) {\rregister struct foo * foo = &fum;\r    sqInt weDidGrow;\r    sqLong startTime;\r    sqInt survivorCount;\r    sqInt i;\r    sqInt growth;\r    sqInt oop;\r    sqInt i1;\r    sqInt activeCntx;\r    sqInt valuePointer;\r    sqInt valuePointer1;\r\r\tif (foo->rootTableCount >= RootTableSize) {\r\r\t\t/* root table overflow; cannot do an incremental GC (this should be very rare) */\r\r\t\tfoo->statRootTableOverflows += 1;\r\t\treturn fullGC();\r\t}\r\tif (DoAssertionChecks) {\r\t\treverseDisplayFromto(8, 15);\r\t\tvalidateRoots();\r\t\t/* begin validate */\r\t}\r\t/* begin preGCAction: */\r\tif (foo->compilerInitialized) {\r\t\tcompilerPreGC(0);\r\t} else {\r\t\t/* begin storeContextRegisters: */\r\t\tactiveCntx = foo->activeContext;\r\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\tvaluePointer = ((((foo->instructionPointer - foo->method) - ((BASE_HEADER_SIZE) - 2)) << 1) | 1);\r\t\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\tvaluePointer1 = (((((((usqInt) ((foo->stackPointer - foo->activeContext) - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD)) - TempFrameStart) + 1) << 1) | 1);\r\t\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\t}\r\tstartTime = ioMicroSecondClock();\r\tfoo->weakRootCount = 0;\r\tfoo->statSweepCount = foo->statMarkCount = foo->statMkFwdCount = foo->statCompMoveCount = 0;\r\tmarkPhase();\r\tfor (i = 1; i <= foo->weakRootCount; i += 1) {\r\t\tfinalizeReference(foo->weakRoots[i]);\r\t}\r\tsurvivorCount = sweepPhase();\r\t/* begin incrementalCompaction */\r\tif (foo->compStart == foo->freeBlock) {\r\t\tinitializeMemoryFirstFree(foo->freeBlock);\r\t} else {\r\t\tincCompBody();\r\t}\r\tfoo->statAllocationCount = foo->allocationCount;\r\tfoo->allocationCount = 0;\r\tfoo->statIncrGCs += 1;\r\tfoo->statGCTime = ioMicroSecondClock();\r\tfoo->statIGCDeltaTime = foo->statGCTime - startTime;\r\tfoo->statIncrGCMSecs += foo->statIGCDeltaTime;\r\t/* begin capturePendingFinalizationSignals */\r\tfoo->statpendingFinalizationSignals = foo->pendingFinalizationSignals;\r\t/* begin forceInterruptCheck */\r\tfoo->interruptCheckCounter = -1000;\r\tfoo->nextPollTick = 0;\r\tfoo->statRootTableCount = foo->rootTableCount;\r\tfoo->statSurvivorCount = survivorCount;\r\tweDidGrow = 0;\r\tif (((survivorCount > foo->tenuringThreshold) || (foo->rootTableCount >= RootTableRedZone)) || (foo->forceTenureFlag == 1)) {\r\r\t\t/* move up the young space boundary if \r\t\t\t* there are too many survivors: \r\t\t\tthis limits the number of objects that must be \r\t\t\tprocessed on future incremental GC's \r\t\t\t* we're about to overflow the roots table \r\t\t\tthis limits the number of full GCs that may be caused \r\t\t\tby root table overflows in the near future */\r\r\t\tfoo->forceTenureFlag = 0;\r\t\tfoo->statTenures += 1;\r\t\t/* begin clearRootsTable */\r\t\tfor (i1 = 1; i1 <= foo->rootTableCount; i1 += 1) {\r\t\t\toop = foo->rootTable[i1];\r\t\t\tlongAtput(oop, (longAt(oop)) & (ALL_BUT_ROOT_BIT));\r\t\t\tfoo->rootTable[i1] = 0;\r\t\t}\r\t\tfoo->rootTableCount = 0;\r\t\tif ((foo->freeBlock < foo->growHeadroom) && (foo->gcBiasToGrow > 0)) {\r\t\t\tbiasToGrow();\r\t\t\tweDidGrow = 1;\r\t\t}\r\t\tfoo->youngStart = foo->freeBlock;\r\t}\r\tpostGCAction();\r\tif (DoAssertionChecks) {\r\t\tvalidateRoots();\r\t\t/* begin validate */\r\t\treverseDisplayFromto(8, 15);\r\t}\r\tif (weDidGrow) {\r\t\t/* begin biasToGrowCheckGCLimit */\r\t\tgrowth = (foo->youngStart - memory) - foo->gcBiasToGrowThreshold;\r\t\tif (growth < 0) {\r\t\t\tfoo->gcBiasToGrowThreshold = foo->youngStart - memory;\r\t\t}\r\t\tif (growth > foo->gcBiasToGrowGCLimit) {\r\t\t\tfullGC();\r\t\t\tfoo->gcBiasToGrowThreshold = foo->youngStart - memory;\r\t\t}\r\t}\r}\r\r\r/*\tInitialize hooks for the 'null compiler' */\r\rsqInt initCompilerHooks(void) {\r\tcompilerHooks[1]= nullCompilerHook;\r\tcompilerHooks[2]= nullCompilerHook;\r\tcompilerHooks[3]= nullCompilerHook;\r\tcompilerHooks[4]= nullCompilerHook;\r\tcompilerHooks[5]= nullCompilerHook;\r\tcompilerHooks[6]= nullCompilerHook;\r\tcompilerHooks[7]= nullCompilerHook;\r\tcompilerHooks[8]= nullCompilerHook;\r\tcompilerHooks[9]= nullCompilerHook;\r\tcompilerHooks[10]= nullCompilerHook;\r\tcompilerHooks[11]= nullCompilerHook;\r\tcompilerHooks[12]= nullCompilerHook;\r\tcompilerHooks[13]= nullCompilerHook;\r\tcompilerHooks[14]= nullCompilerHook;\r\tfoo->compilerInitialized = 0;\r}\r\r\r/*\tSet the imageFormatVersionNumber to a default value for this word\r\tsize. Normally this will have been set at image load time, but set it to\r\ta reasonable default if this has not been done. */\r\rsqInt initializeImageFormatVersionIfNeeded(void) {\r\tif (imageFormatVersionNumber == 0) {\r\t\tif ((BYTES_PER_WORD) == 8) {\r\t\t\timageFormatVersionNumber = 68000;\r\t\t} else {\r\t\t\timageFormatVersionNumber = 6502;\r\t\t}\r\t}\r}\r\r\r/*\tInitialize Interpreter state before starting execution of a new image. */\r\rsqInt initializeInterpreter(sqInt bytesToShift) {\rregister struct foo * foo = &fum;\r    sqInt i;\r    sqInt proc;\r    sqInt sched;\r    sqInt oop;\r    sqInt oop1;\r    sqInt activeCntx;\r    sqInt tmp;\r\r\tinterpreterProxy = sqGetInterpreterProxy();\r\tdummyReferToProxy();\r\tinitializeObjectMemory(bytesToShift);\r\tinitCompilerHooks();\r\tfoo->activeContext = foo->nilObj;\r\tfoo->theHomeContext = foo->nilObj;\r\tfoo->method = foo->nilObj;\r\tfoo->receiver = foo->nilObj;\r\tfoo->messageSelector = foo->nilObj;\r\tfoo->newMethod = foo->nilObj;\r\tfoo->methodClass = foo->nilObj;\r\tfoo->lkupClass = foo->nilObj;\r\tfoo->receiverClass = foo->nilObj;\r\tfoo->newNativeMethod = foo->nilObj;\r\t/* begin flushMethodCache */\r\tfor (i = 1; i <= MethodCacheSize; i += 1) {\r\t\tfoo->methodCache[i] = 0;\r\t}\r\tfor (i = 1; i <= AtCacheTotalSize; i += 1) {\r\t\tfoo->atCache[i] = 0;\r\t}\r\t/* begin loadInitialContext */\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\toop1 = foo->specialObjectsOop;\r\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\tsched = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\tproc = longAt((sched + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)));\r\tfoo->activeContext = longAt((proc + (BASE_HEADER_SIZE)) + (SuspendedContextIndex << (SHIFT_FOR_WORD)));\r\tif ((((usqInt) foo->activeContext)) < (((usqInt) foo->youngStart))) {\r\t\tbeRootIfOld(foo->activeContext);\r\t}\r\t/* begin fetchContextRegisters: */\r\tactiveCntx = foo->activeContext;\r\ttmp = longAt((activeCntx + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\tif ((tmp & 1)) {\r\t\ttmp = longAt((activeCntx + (BASE_HEADER_SIZE)) + (HomeIndex << (SHIFT_FOR_WORD)));\r\t\tif ((((usqInt) tmp)) < (((usqInt) foo->youngStart))) {\r\t\t\tbeRootIfOld(tmp);\r\t\t}\r\t} else {\r\t\ttmp = activeCntx;\r\t}\r\tfoo->theHomeContext = tmp;\r\tfoo->receiver = longAt((tmp + (BASE_HEADER_SIZE)) + (ReceiverIndex << (SHIFT_FOR_WORD)));\r\tfoo->method = longAt((tmp + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\ttmp = ((longAt((activeCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tfoo->instructionPointer = ((foo->method + tmp) + (BASE_HEADER_SIZE)) - 2;\r\ttmp = ((longAt((activeCntx + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tfoo->stackPointer = (activeCntx + (BASE_HEADER_SIZE)) + (((TempFrameStart + tmp) - 1) * (BYTES_PER_WORD));\r\tfoo->reclaimableContextCount = 0;\r\t/* begin initialCleanup */\r\tif (((longAt(foo->activeContext)) & (ROOT_BIT)) == 0) {\r\t\tgoto l1;\r\t}\r\tlongAtput(foo->activeContext, (longAt(foo->activeContext)) & (ALL_BUT_ROOT_BIT));\r\tflushExternalPrimitives();\rl1:\t/* end initialCleanup */;\r\tfoo->interruptCheckCounter = 0;\r\tfoo->interruptCheckCounterFeedBackReset = 1000;\r\tfoo->interruptChecksEveryNms = 1;\r\tfoo->nextPollTick = 0;\r\tfoo->nextWakeupTick = 0;\r\tfoo->lastTick = 0;\r\r\t/* cmd-. as used for Mac but no other OS */\r\r\tfoo->interruptKeycode = 2094;\r\tfoo->interruptPending = 0;\r\tfoo->semaphoresUseBufferA = 1;\r\tfoo->semaphoresToSignalCountA = 0;\r\tfoo->semaphoresToSignalCountB = 0;\r\tfoo->deferDisplayUpdates = 0;\r\tfoo->pendingFinalizationSignals = 0;\r\tfoo->globalSessionID = 0;\r\twhile (foo->globalSessionID == 0) {\r\t\tfoo->globalSessionID = time(NULL) + ioMSecs();\r\t}\r\tfoo->jmpDepth = 0;\r\tfoo->jmpMax = MaxJumpBuf;\r}\r\r\r/*\tInitialize endOfMemory to the top of oop storage space, reserving some space for forwarding blocks, and create the freeBlock from which space is allocated. Also create a fake free chunk at endOfMemory to act as a sentinal for memory scans.  */\r/*\tNote: The amount of space reserved for forwarding blocks should be chosen to ensure that incremental compactions can usually be done in a single pass. However, there should be enough forwarding blocks so a full compaction can be done in a reasonable number of passes, say ten. (A full compaction requires N object-moving passes, where N = number of non-garbage objects / number of forwarding blocks). \r\tdi 11/18/2000 Re totalObjectCount: Provide a margin of one byte per object to be used for forwarding pointers at GC time. Since fwd blocks are 8 bytes, this means an absolute worst case of 8 passes to compact memory. In most cases it will be adequate to do compaction in a single pass.  */\r\rsqInt initializeMemoryFirstFree(usqInt firstFree) {\rregister struct foo * foo = &fum;\r    usqInt fwdBlockBytes;\r\r\tfwdBlockBytes = foo->totalObjectCount & (((WORD_MASK) - (BYTES_PER_WORD)) + 1);\r\tif (!((((usqInt) (foo->memoryLimit - fwdBlockBytes))) >= (((usqInt) (firstFree + (BASE_HEADER_SIZE)))))) {\r\r\t\t/* reserve enough space for a minimal free block of BaseHeaderSize bytes */\r\r\t\tfwdBlockBytes = foo->memoryLimit - (firstFree + (BASE_HEADER_SIZE));\r\t}\r\tfoo->endOfMemory = foo->memoryLimit - fwdBlockBytes;\r\tfoo->freeBlock = firstFree;\r\t/* begin setSizeOfFree:to: */\r\tlongAtput(foo->freeBlock, ((foo->endOfMemory - firstFree) & (ALL_BUT_TYPE_MASK)) | HeaderTypeFree);\r\t/* begin setSizeOfFree:to: */\r\tlongAtput(foo->endOfMemory, ((BASE_HEADER_SIZE) & (ALL_BUT_TYPE_MASK)) | HeaderTypeFree);\r\tif (DoAssertionChecks) {\r\t\tif (!((foo->freeBlock < foo->endOfMemory) && (foo->endOfMemory < foo->memoryLimit))) {\r\t\t\terror(\"error in free space computation\");\r\t\t}\r\t\tif (!((foo->endOfMemory + (foo->headerTypeBytes[(longAt(foo->endOfMemory)) & TypeMask])) == foo->endOfMemory)) {\r\t\t\terror(\"header format must have changed\");\r\t\t}\r\t\tif (!((objectAfter(foo->freeBlock)) == foo->endOfMemory)) {\r\t\t\terror(\"free block not properly initialized\");\r\t\t}\r\t}\r}\r\r\r/*\tInitialize object memory variables at startup time. Assume endOfMemory is initially set (by the image-reading code) to the end of the last object in the image. Initialization redefines endOfMemory to be the end of the object allocation area based on the total available memory, but reserving some space for forwarding blocks. */\r/*\tAssume: image reader initializes the following variables:\r\t\tmemory\r\t\tendOfMemory\r\t\tmemoryLimit\r\t\tspecialObjectsOop\r\t\tlastHash\r\t */\r/*\tdi 11/18/2000 fix slow full GC */\r\rsqInt initializeObjectMemory(sqInt bytesToShift) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r    sqInt oop1;\r    sqInt oop2;\r\r\r\t/* image may be at a different address; adjust oops for new location */\r\r\tfoo->youngStart = foo->endOfMemory;\r\tfoo->totalObjectCount = adjustAllOopsBy(bytesToShift);\r\tinitializeMemoryFirstFree(foo->endOfMemory);\r\r\t/* heavily used special objects */\r\r\tfoo->specialObjectsOop += bytesToShift;\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\tfoo->nilObj = longAt((oop + (BASE_HEADER_SIZE)) + (NilObject << (SHIFT_FOR_WORD)));\r\t/* begin fetchPointer:ofObject: */\r\toop1 = foo->specialObjectsOop;\r\tfoo->falseObj = longAt((oop1 + (BASE_HEADER_SIZE)) + (FalseObject << (SHIFT_FOR_WORD)));\r\t/* begin fetchPointer:ofObject: */\r\toop2 = foo->specialObjectsOop;\r\tfoo->trueObj = longAt((oop2 + (BASE_HEADER_SIZE)) + (TrueObject << (SHIFT_FOR_WORD)));\r\tfoo->rootTableCount = 0;\r\tfoo->freeContexts = NilContext;\r\tfoo->freeLargeContexts = NilContext;\r\tfoo->allocationCount = 0;\r\tfoo->lowSpaceThreshold = 0;\r\tfoo->signalLowSpace = 0;\r\tfoo->compStart = 0;\r\tfoo->compEnd = 0;\r\tfoo->fwdTableNext = 0;\r\tfoo->fwdTableLast = 0;\r\tfoo->remapBufferCount = 0;\r\r\t/* do incremental GC after this many allocations */\r\r\tfoo->allocationsBetweenGCs = 4000;\r\r\t/* tenure all suriving objects if count is over this threshold */\r\r\tfoo->tenuringThreshold = 2000;\r\r\t/* four megabyte of headroom when growing */\r\r\tfoo->growHeadroom = (4 * 1024) * 1024;\r\r\t/* eight megabyte of free space before shrinking */\r\t/* garbage collection statistics */\r\r\tfoo->shrinkThreshold = (8 * 1024) * 1024;\r\tfoo->statFullGCs = 0;\r\tfoo->statFullGCMSecs = 0;\r\tfoo->statIncrGCs = 0;\r\tfoo->statIncrGCMSecs = 0;\r\tfoo->statTenures = 0;\r\tfoo->statRootTableOverflows = 0;\r\tfoo->statGrowMemory = 0;\r\tfoo->statShrinkMemory = 0;\r\tfoo->forceTenureFlag = 0;\r\tfoo->gcBiasToGrow = 0;\r\tfoo->gcBiasToGrowGCLimit = 0;\r\tfoo->extraRootCount = 0;\r}\r\r\r/*\tInstall the oop of this object in the given cache (at or atPut), along with\r\tits size, format and fixedSize */\r\rsqInt installinAtCacheatstring(sqInt rcvr, sqInt * cache, sqInt atIx, sqInt stringy) {\rregister struct foo * foo = &fum;\r    sqInt totalLength;\r    sqInt fmt;\r    sqInt fixedFields;\r    sqInt hdr;\r    sqInt sz;\r    sqInt classFormat;\r    sqInt class;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\thdr = longAt(rcvr);\r\tfmt = (((usqInt) hdr) >> 8) & 15;\r\tif ((fmt == 3) && ((((((usqInt) hdr) >> 12) & 31) == 13) || ((((((usqInt) hdr) >> 12) & 31) == 14) || (((((usqInt) hdr) >> 12) & 31) == 4)))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((hdr & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(rcvr - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz = hdr & (SIZE_MASK);\r\t}\r\tsz -= hdr & (SIZE_4_BIT);\r\tif (fmt <= 4) {\r\t\ttotalLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tgoto l1;\r\t}\r\tif (fmt < 8) {\r\t\ttotalLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> 2;\r\t\tgoto l1;\r\t} else {\r\t\ttotalLength = (sz - (BASE_HEADER_SIZE)) - (fmt & 3);\r\t\tgoto l1;\r\t}\rl1:\t/* end lengthOf:baseHeader:format: */;\r\t/* begin fixedFieldsOf:format:length: */\r\tif ((fmt > 4) || (fmt == 2)) {\r\t\tfixedFields = 0;\r\t\tgoto l3;\r\t}\r\tif (fmt < 2) {\r\t\tfixedFields = totalLength;\r\t\tgoto l3;\r\t}\r\t/* begin fetchClassOf: */\r\tif ((rcvr & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tclass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l2;\r\t}\r\tccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tclass = (longAt(rcvr - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tclass = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l2;\r\t}\rl2:\t/* end fetchClassOf: */;\r\tclassFormat = (longAt((class + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1;\r\tfixedFields = (((((usqInt) classFormat) >> 11) & 192) + ((((usqInt) classFormat) >> 2) & 63)) - 1;\rl3:\t/* end fixedFieldsOf:format:length: */;\r\tcache[atIx + AtCacheOop] = rcvr;\r\tif (stringy) {\r\t\tcache[atIx + AtCacheFmt] = (fmt + 16);\r\t} else {\r\t\tcache[atIx + AtCacheFmt] = fmt;\r\t}\r\tcache[atIx + AtCacheFixedFields] = fixedFields;\r\tcache[atIx + AtCacheSize] = (totalLength - fixedFields);\r}\r\r\r/*\tNOTE: This method supports the backward-compatible split instSize field of the \r\tclass format word. The sizeHiBits will go away and other shifts change by 2 \r\twhen the split fields get merged in an (incompatible) image change. */\r\rsqInt instantiateClassindexableSize(sqInt classPointer, sqInt size) {\rregister struct foo * foo = &fum;\r    sqInt header1;\r    sqInt binc;\r    sqInt byteSize;\r    sqInt hash;\r    sqInt bm1;\r    sqInt classFormat;\r    sqInt header2;\r    sqInt sizeHiBits;\r    sqInt hdrSize;\r    sqInt cClass;\r    sqInt fillWord;\r    sqInt newObj;\r    sqInt format;\r    sqInt header3;\r    usqInt end;\r    sqInt remappedClassOop;\r    usqInt i;\r    sqInt newObj1;\r    sqInt oop;\r    sqInt newFreeSize;\r    sqInt enoughSpace;\r    sqInt newChunk;\r    usqInt minFree;\r    sqInt sched;\r    sqInt lastSavedProcess;\r    sqInt currentProc;\r    sqInt oop4;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\tif (DoAssertionChecks) {\r\t\tif (size < 0) {\r\t\t\terror(\"cannot have a negative indexable field count\");\r\t\t}\r\t}\r\t/* begin newObjectHash */\r\tfoo->lastHash = (13849 + (27181 * foo->lastHash)) & 65535;\r\thash = foo->lastHash;\r\r\t/* Low 2 bits are 0 */\r\r\tclassFormat = (longAt((classPointer + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1;\r\theader1 = (classFormat & 130816) | ((hash << HashBitsOffset) & HashBits);\r\theader2 = classPointer;\r\theader3 = 0;\r\tsizeHiBits = ((usqInt) (classFormat & 393216)) >> 9;\r\r\t/* compact class field from format word */\r\r\tcClass = header1 & CompactClassMask;\r\r\t/* size in bytes -- low 2 bits are 0 */\r\t/* Note this byteSize comes from the format word of the class which is pre-shifted\r\t\tto 4 bytes per field.  Need another shift for 8 bytes per word... */\r\r\tbyteSize = (classFormat & ((SIZE_MASK) + (SIZE_4_BIT))) + sizeHiBits;\r\tbyteSize = byteSize << ((SHIFT_FOR_WORD) - 2);\r\tformat = (((usqInt) classFormat) >> 8) & 15;\r\tflag(\"sizeLowBits\");\r\tif (format < 8) {\r\t\tif (format == 6) {\r\r\t\t\t/* long32 bitmaps */\r\r\t\t\tbm1 = (BYTES_PER_WORD) - 1;\r\r\t\t\t/* round up */\r\r\t\t\tbyteSize = ((byteSize + (size * 4)) + bm1) & (LONG_SIZE_MASK);\r\r\t\t\t/* odd bytes */\r\t\t\t/* extra low bit (4) for 64-bit VM goes in 4-bit (betw hdr bits and sizeBits) */\r\r\t\t\tbinc = bm1 - (((size * 4) + bm1) & bm1);\r\t\t\theader1 = header1 | (binc & 4);\r\t\t} else {\r\r\t\t\t/* Arrays and 64-bit bitmaps */\r\r\t\t\tbyteSize += size * (BYTES_PER_WORD);\r\t\t}\r\t} else {\r\r\t\t/* Strings and Methods */\r\r\t\tbm1 = (BYTES_PER_WORD) - 1;\r\r\t\t/* round up */\r\r\t\tbyteSize = ((byteSize + size) + bm1) & (LONG_SIZE_MASK);\r\r\t\t/* odd bytes */\r\t\t/* low bits of byte size go in format field */\r\r\t\tbinc = bm1 - ((size + bm1) & bm1);\r\r\t\t/* extra low bit (4) for 64-bit VM goes in 4-bit (betw hdr bits and sizeBits) */\r\r\t\theader1 = header1 | ((binc & 3) << 8);\r\t\theader1 = header1 | (binc & 4);\r\t}\r\tif (byteSize > 255) {\r\r\t\t/* requires size header word */\r\r\t\theader3 = byteSize;\r\t\theader1 = header1;\r\t} else {\r\t\theader1 = header1 | byteSize;\r\t}\r\tif (header3 > 0) {\r\r\t\t/* requires full header */\r\r\t\thdrSize = 3;\r\t} else {\r\t\tif (cClass == 0) {\r\t\t\thdrSize = 2;\r\t\t} else {\r\t\t\thdrSize = 1;\r\t\t}\r\t}\r\tif (format <= 4) {\r\r\t\t/* if pointers, fill with nil oop */\r\r\t\tfillWord = foo->nilObj;\r\t} else {\r\t\tfillWord = 0;\r\t}\r\t/* begin allocate:headerSize:h1:h2:h3:doFill:with: */\r\tif (hdrSize > 1) {\r\t\t/* begin pushRemappableOop: */\r\t\tfoo->remapBuffer[foo->remapBufferCount += 1] = header2;\r\t}\r\t/* begin allocateChunk: */\r\tif (foo->allocationCount >= foo->allocationsBetweenGCs) {\r\t\tincrementalGC();\r\t}\r\t/* begin sufficientSpaceToAllocate: */\r\tminFree = (foo->lowSpaceThreshold + (byteSize + ((hdrSize - 1) * (BYTES_PER_WORD)))) + (BASE_HEADER_SIZE);\r\tif (oopisGreaterThanOrEqualTo((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), minFree)) {\r\t\tenoughSpace = 1;\r\t\tgoto l1;\r\t} else {\r\t\tenoughSpace = sufficientSpaceAfterGC(minFree);\r\t\tgoto l1;\r\t}\rl1:\t/* end sufficientSpaceToAllocate: */;\r\tif (!(enoughSpace)) {\r\t\tfoo->signalLowSpace = 1;\r\t\tfoo->lowSpaceThreshold = 0;\r\t\t/* begin saveProcessSignalingLowSpace */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tlastSavedProcess = longAt((oop1 + (BASE_HEADER_SIZE)) + (ProcessSignalingLowSpace << (SHIFT_FOR_WORD)));\r\t\tif (lastSavedProcess == foo->nilObj) {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop2 = foo->specialObjectsOop;\r\t\t\toop4 = longAt((oop2 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\t\t\tsched = longAt((oop4 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\tcurrentProc = longAt((sched + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)));\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\toop3 = foo->specialObjectsOop;\r\t\t\tif ((((usqInt) oop3)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(oop3, currentProc);\r\t\t\t}\r\t\t\tlongAtput((oop3 + (BASE_HEADER_SIZE)) + (ProcessSignalingLowSpace << (SHIFT_FOR_WORD)), currentProc);\r\t\t}\r\t\t/* begin forceInterruptCheck */\r\t\tfoo->interruptCheckCounter = -1000;\r\t\tfoo->nextPollTick = 0;\r\t}\r\tif (oopisLessThan((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), (byteSize + ((hdrSize - 1) * (BYTES_PER_WORD))) + (BASE_HEADER_SIZE))) {\r\t\terror(\"out of memory\");\r\t}\r\tnewFreeSize = ((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK)) - (byteSize + ((hdrSize - 1) * (BYTES_PER_WORD)));\r\tnewChunk = foo->freeBlock;\r\tfoo->freeBlock += byteSize + ((hdrSize - 1) * (BYTES_PER_WORD));\r\t/* begin setSizeOfFree:to: */\r\tlongAtput(foo->freeBlock, (newFreeSize & (ALL_BUT_TYPE_MASK)) | HeaderTypeFree);\r\tfoo->allocationCount += 1;\r\tnewObj1 = newChunk;\r\tif (hdrSize > 1) {\r\t\t/* begin popRemappableOop */\r\t\toop = foo->remapBuffer[foo->remapBufferCount];\r\t\tfoo->remapBufferCount -= 1;\r\t\tremappedClassOop = oop;\r\t}\r\tif (hdrSize == 3) {\r\t\tlongAtput(newObj1, header3 | HeaderTypeSizeAndClass);\r\t\tlongAtput(newObj1 + (BYTES_PER_WORD), remappedClassOop | HeaderTypeSizeAndClass);\r\t\tlongAtput(newObj1 + ((BYTES_PER_WORD) * 2), header1 | HeaderTypeSizeAndClass);\r\t\tnewObj1 += (BYTES_PER_WORD) * 2;\r\t}\r\tif (hdrSize == 2) {\r\t\tlongAtput(newObj1, remappedClassOop | HeaderTypeClass);\r\t\tlongAtput(newObj1 + (BYTES_PER_WORD), header1 | HeaderTypeClass);\r\t\tnewObj1 += BYTES_PER_WORD;\r\t}\r\tif (hdrSize == 1) {\r\t\tlongAtput(newObj1, header1 | HeaderTypeShort);\r\t}\r\tif (1) {\r\t\tend = newObj1 + byteSize;\r\t\ti = newObj1 + (BYTES_PER_WORD);\r\t\twhile (i < end) {\r\t\t\tlongAtput(i, fillWord);\r\t\t\ti += BYTES_PER_WORD;\r\t\t}\r\t}\r\tif (DoAssertionChecks) {\r\t\tokayOop(newObj1);\r\t\toopHasOkayClass(newObj1);\r\t\tif (!((objectAfter(newObj1)) == foo->freeBlock)) {\r\t\t\terror(\"allocate bug: did not set header of new oop correctly\");\r\t\t}\r\t\tif (!((objectAfter(foo->freeBlock)) == foo->endOfMemory)) {\r\t\t\terror(\"allocate bug: did not set header of freeBlock correctly\");\r\t\t}\r\t}\r\tnewObj = newObj1;\r\treturn newObj;\r}\r\r\r/*\tThis version of instantiateClass assumes that the total object \r\tsize is under 256 bytes, the limit for objects with only one or \r\ttwo header words. Note that the size is specified in bytes \r\tand should include four bytes for the base header word. */\r\rsqInt instantiateContextsizeInBytes(sqInt classPointer, sqInt sizeInBytes) {\rregister struct foo * foo = &fum;\r    sqInt header1;\r    sqInt hash;\r    sqInt header2;\r    sqInt hdrSize;\r    sqInt extendedSize;\r    usqInt end;\r    sqInt remappedClassOop;\r    usqInt i;\r    sqInt newObj;\r    sqInt oop;\r    sqInt newFreeSize;\r    sqInt enoughSpace;\r    sqInt newChunk;\r    usqInt minFree;\r    sqInt sched;\r    sqInt lastSavedProcess;\r    sqInt currentProc;\r    sqInt oop4;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\t/* begin newObjectHash */\r\tfoo->lastHash = (13849 + (27181 * foo->lastHash)) & 65535;\r\thash = foo->lastHash;\r\theader1 = ((hash << HashBitsOffset) & HashBits) | ((longAt((classPointer + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1);\r\theader2 = classPointer;\r\tif ((header1 & CompactClassMask) > 0) {\r\r\t\t/* are contexts compact? */\r\r\t\thdrSize = 1;\r\t} else {\r\t\thdrSize = 2;\r\t}\r\tif (sizeInBytes <= (SIZE_MASK)) {\r\r\t\t/* OR size into header1.  Must not do this if size > SizeMask */\r\r\t\theader1 += sizeInBytes - (header1 & (SIZE_MASK));\r\t} else {\r\r\t\t/* Zero the size field of header1 if large */\r\r\t\thdrSize = 3;\r\t\theader1 -= header1 & (SIZE_MASK);\r\t}\r\tflag(\"Dan\");\r\t/* begin allocate:headerSize:h1:h2:h3:doFill:with: */\r\textendedSize = LARGE_CONTEXT_SIZE;\r\tif (hdrSize > 1) {\r\t\t/* begin pushRemappableOop: */\r\t\tfoo->remapBuffer[foo->remapBufferCount += 1] = header2;\r\t}\r\t/* begin allocateChunk: */\r\tif (foo->allocationCount >= foo->allocationsBetweenGCs) {\r\t\tincrementalGC();\r\t}\r\t/* begin sufficientSpaceToAllocate: */\r\tminFree = (foo->lowSpaceThreshold + (sizeInBytes + ((hdrSize - 1) * (BYTES_PER_WORD)))) + (BASE_HEADER_SIZE);\r\tif (oopisGreaterThanOrEqualTo((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), minFree)) {\r\t\tenoughSpace = 1;\r\t\tgoto l1;\r\t} else {\r\t\tenoughSpace = sufficientSpaceAfterGC(minFree);\r\t\tgoto l1;\r\t}\rl1:\t/* end sufficientSpaceToAllocate: */;\r\tif (!(enoughSpace)) {\r\t\tfoo->signalLowSpace = 1;\r\t\tfoo->lowSpaceThreshold = 0;\r\t\t/* begin saveProcessSignalingLowSpace */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tlastSavedProcess = longAt((oop1 + (BASE_HEADER_SIZE)) + (ProcessSignalingLowSpace << (SHIFT_FOR_WORD)));\r\t\tif (lastSavedProcess == foo->nilObj) {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop2 = foo->specialObjectsOop;\r\t\t\toop4 = longAt((oop2 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\t\t\tsched = longAt((oop4 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\tcurrentProc = longAt((sched + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)));\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\toop3 = foo->specialObjectsOop;\r\t\t\tif ((((usqInt) oop3)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(oop3, currentProc);\r\t\t\t}\r\t\t\tlongAtput((oop3 + (BASE_HEADER_SIZE)) + (ProcessSignalingLowSpace << (SHIFT_FOR_WORD)), currentProc);\r\t\t}\r\t\t/* begin forceInterruptCheck */\r\t\tfoo->interruptCheckCounter = -1000;\r\t\tfoo->nextPollTick = 0;\r\t}\r\tif (oopisLessThan((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), (sizeInBytes + ((hdrSize - 1) * (BYTES_PER_WORD))) + (BASE_HEADER_SIZE))) {\r\t\terror(\"out of memory\");\r\t}\r\tnewFreeSize = ((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK)) - (sizeInBytes + ((hdrSize - 1) * (BYTES_PER_WORD)));\r\tnewChunk = foo->freeBlock;\r\tfoo->freeBlock += sizeInBytes + ((hdrSize - 1) * (BYTES_PER_WORD));\r\t/* begin setSizeOfFree:to: */\r\tlongAtput(foo->freeBlock, (newFreeSize & (ALL_BUT_TYPE_MASK)) | HeaderTypeFree);\r\tfoo->allocationCount += 1;\r\tnewObj = newChunk;\r\tif (hdrSize > 1) {\r\t\t/* begin popRemappableOop */\r\t\toop = foo->remapBuffer[foo->remapBufferCount];\r\t\tfoo->remapBufferCount -= 1;\r\t\tremappedClassOop = oop;\r\t}\r\tif (hdrSize == 3) {\r\t\tlongAtput(newObj, extendedSize | HeaderTypeSizeAndClass);\r\t\tlongAtput(newObj + (BYTES_PER_WORD), remappedClassOop | HeaderTypeSizeAndClass);\r\t\tlongAtput(newObj + ((BYTES_PER_WORD) * 2), header1 | HeaderTypeSizeAndClass);\r\t\tnewObj += (BYTES_PER_WORD) * 2;\r\t}\r\tif (hdrSize == 2) {\r\t\tlongAtput(newObj, remappedClassOop | HeaderTypeClass);\r\t\tlongAtput(newObj + (BYTES_PER_WORD), header1 | HeaderTypeClass);\r\t\tnewObj += BYTES_PER_WORD;\r\t}\r\tif (hdrSize == 1) {\r\t\tlongAtput(newObj, header1 | HeaderTypeShort);\r\t}\r\tif (0) {\r\t\tend = newObj + sizeInBytes;\r\t\ti = newObj + (BYTES_PER_WORD);\r\t\twhile (i < end) {\r\t\t\tlongAtput(i, 0);\r\t\t\ti += BYTES_PER_WORD;\r\t\t}\r\t}\r\tif (DoAssertionChecks) {\r\t\tokayOop(newObj);\r\t\toopHasOkayClass(newObj);\r\t\tif (!((objectAfter(newObj)) == foo->freeBlock)) {\r\t\t\terror(\"allocate bug: did not set header of new oop correctly\");\r\t\t}\r\t\tif (!((objectAfter(foo->freeBlock)) == foo->endOfMemory)) {\r\t\t\terror(\"allocate bug: did not set header of freeBlock correctly\");\r\t\t}\r\t}\r\treturn newObj;\r}\r\r\r/*\tThis version of instantiateClass assumes that the total object \r\tsize is under 256 bytes, the limit for objects with only one or \r\ttwo header words. Note that the size is specified in bytes \r\tand should include 4 or 8 bytes for the base header word. \r\tNOTE this code will only work for sizes that are an integral number of words\r\t\t(like not a 32-bit LargeInteger in a 64-bit system). \r\tMay cause a GC.\r\tNote that the created small object IS NOT FILLED and must be completed before returning it to Squeak. Since this call is used in routines that do jsut that we are safe. Break this rule and die. */\r\rsqInt instantiateSmallClasssizeInBytes(sqInt classPointer, sqInt sizeInBytes) {\rregister struct foo * foo = &fum;\r    sqInt header1;\r    sqInt hash;\r    sqInt header2;\r    sqInt hdrSize;\r    usqInt end;\r    sqInt remappedClassOop;\r    usqInt i;\r    sqInt newObj;\r    sqInt oop;\r    sqInt newFreeSize;\r    sqInt enoughSpace;\r    sqInt newChunk;\r    usqInt minFree;\r    sqInt sched;\r    sqInt lastSavedProcess;\r    sqInt currentProc;\r    sqInt oop4;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\tif (!((sizeInBytes & ((BYTES_PER_WORD) - 1)) == 0)) {\r\t\terror(\"size must be integral number of words\");\r\t}\r\t/* begin newObjectHash */\r\tfoo->lastHash = (13849 + (27181 * foo->lastHash)) & 65535;\r\thash = foo->lastHash;\r\theader1 = ((hash << HashBitsOffset) & HashBits) | ((longAt((classPointer + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1);\r\theader2 = classPointer;\r\tif ((header1 & CompactClassMask) > 0) {\r\r\t\t/* is this a compact class */\r\r\t\thdrSize = 1;\r\t} else {\r\t\thdrSize = 2;\r\t}\r\theader1 += sizeInBytes - (header1 & ((SIZE_MASK) + (SIZE_4_BIT)));\r\t/* begin allocate:headerSize:h1:h2:h3:doFill:with: */\r\tif (hdrSize > 1) {\r\t\t/* begin pushRemappableOop: */\r\t\tfoo->remapBuffer[foo->remapBufferCount += 1] = header2;\r\t}\r\t/* begin allocateChunk: */\r\tif (foo->allocationCount >= foo->allocationsBetweenGCs) {\r\t\tincrementalGC();\r\t}\r\t/* begin sufficientSpaceToAllocate: */\r\tminFree = (foo->lowSpaceThreshold + (sizeInBytes + ((hdrSize - 1) * (BYTES_PER_WORD)))) + (BASE_HEADER_SIZE);\r\tif (oopisGreaterThanOrEqualTo((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), minFree)) {\r\t\tenoughSpace = 1;\r\t\tgoto l1;\r\t} else {\r\t\tenoughSpace = sufficientSpaceAfterGC(minFree);\r\t\tgoto l1;\r\t}\rl1:\t/* end sufficientSpaceToAllocate: */;\r\tif (!(enoughSpace)) {\r\t\tfoo->signalLowSpace = 1;\r\t\tfoo->lowSpaceThreshold = 0;\r\t\t/* begin saveProcessSignalingLowSpace */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tlastSavedProcess = longAt((oop1 + (BASE_HEADER_SIZE)) + (ProcessSignalingLowSpace << (SHIFT_FOR_WORD)));\r\t\tif (lastSavedProcess == foo->nilObj) {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop2 = foo->specialObjectsOop;\r\t\t\toop4 = longAt((oop2 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\t\t\tsched = longAt((oop4 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\tcurrentProc = longAt((sched + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)));\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\toop3 = foo->specialObjectsOop;\r\t\t\tif ((((usqInt) oop3)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(oop3, currentProc);\r\t\t\t}\r\t\t\tlongAtput((oop3 + (BASE_HEADER_SIZE)) + (ProcessSignalingLowSpace << (SHIFT_FOR_WORD)), currentProc);\r\t\t}\r\t\t/* begin forceInterruptCheck */\r\t\tfoo->interruptCheckCounter = -1000;\r\t\tfoo->nextPollTick = 0;\r\t}\r\tif (oopisLessThan((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), (sizeInBytes + ((hdrSize - 1) * (BYTES_PER_WORD))) + (BASE_HEADER_SIZE))) {\r\t\terror(\"out of memory\");\r\t}\r\tnewFreeSize = ((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK)) - (sizeInBytes + ((hdrSize - 1) * (BYTES_PER_WORD)));\r\tnewChunk = foo->freeBlock;\r\tfoo->freeBlock += sizeInBytes + ((hdrSize - 1) * (BYTES_PER_WORD));\r\t/* begin setSizeOfFree:to: */\r\tlongAtput(foo->freeBlock, (newFreeSize & (ALL_BUT_TYPE_MASK)) | HeaderTypeFree);\r\tfoo->allocationCount += 1;\r\tnewObj = newChunk;\r\tif (hdrSize > 1) {\r\t\t/* begin popRemappableOop */\r\t\toop = foo->remapBuffer[foo->remapBufferCount];\r\t\tfoo->remapBufferCount -= 1;\r\t\tremappedClassOop = oop;\r\t}\r\tif (hdrSize == 3) {\r\t\tlongAtput(newObj, 0 | HeaderTypeSizeAndClass);\r\t\tlongAtput(newObj + (BYTES_PER_WORD), remappedClassOop | HeaderTypeSizeAndClass);\r\t\tlongAtput(newObj + ((BYTES_PER_WORD) * 2), header1 | HeaderTypeSizeAndClass);\r\t\tnewObj += (BYTES_PER_WORD) * 2;\r\t}\r\tif (hdrSize == 2) {\r\t\tlongAtput(newObj, remappedClassOop | HeaderTypeClass);\r\t\tlongAtput(newObj + (BYTES_PER_WORD), header1 | HeaderTypeClass);\r\t\tnewObj += BYTES_PER_WORD;\r\t}\r\tif (hdrSize == 1) {\r\t\tlongAtput(newObj, header1 | HeaderTypeShort);\r\t}\r\tif (0) {\r\t\tend = newObj + sizeInBytes;\r\t\ti = newObj + (BYTES_PER_WORD);\r\t\twhile (i < end) {\r\t\t\tlongAtput(i, 0);\r\t\t\ti += BYTES_PER_WORD;\r\t\t}\r\t}\r\tif (DoAssertionChecks) {\r\t\tokayOop(newObj);\r\t\toopHasOkayClass(newObj);\r\t\tif (!((objectAfter(newObj)) == foo->freeBlock)) {\r\t\t\terror(\"allocate bug: did not set header of new oop correctly\");\r\t\t}\r\t\tif (!((objectAfter(foo->freeBlock)) == foo->endOfMemory)) {\r\t\t\terror(\"allocate bug: did not set header of freeBlock correctly\");\r\t\t}\r\t}\r\treturn newObj;\r}\r\rsqInt integerObjectOf(sqInt value) {\r\treturn (value << 1) + 1;\r}\r\r\r/*\tTranslator produces 'objectPointer >> 1' */\r\rsqInt integerValueOf(sqInt objectPointer) {\r\tif ((objectPointer & 2147483648U) != 0) {\r\t\treturn ((((usqInt) (objectPointer & 2147483647U)) >> 1) - 1073741823) - 1;\r\t} else {\r\t\treturn ((usqInt) objectPointer) >> 1;\r\t}\r}\r\rEXPORT(sqInt) internalIsImmutable(sqInt oop) {\r\treturn 0;\r}\r\rEXPORT(sqInt) internalIsMutable(sqInt oop) {\r\treturn 1;\r}\r\r\r/*\tThis is the main interpreter loop. It normally loops forever, fetching and executing bytecodes. When running in the context of a browser plugin VM, however, it must return control to the browser periodically. This should done only when the state of the currently running Squeak thread is safely stored in the object heap. Since this is the case at the moment that a check for interrupts is performed, that is when we return to the browser if it is time to do so. Interrupt checks happen quite frequently. */\r\rsqInt interpret(void) {\r#ifdef FOO_REG\r    register struct foo * foo FOO_REG = &fum;\r#endif\r    sqInt localReturnValue;\r    sqInt localReturnContext;\r    sqInt localHomeContext;\r    char* localSP;\r    char* localIP;\r    sqInt currentBytecode;\r    JUMP_TABLE;\r\tbrowserPluginInitialiseIfNeeded();\r\tinitializeImageFormatVersionIfNeeded();\r\t/* begin internalizeIPandSP */\r\tlocalIP = pointerForOop(foo->instructionPointer);\r\tlocalSP = pointerForOop(foo->stackPointer);\r\tlocalHomeContext = foo->theHomeContext;\r\t/* begin fetchNextBytecode */\r\tcurrentBytecode = byteAtPointer(++localIP);\r\twhile (1) {\r\t\tswitch (currentBytecode) {\r\t\tCASE(0)\r\t\t\t/* pushReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\tfieldIndex = 0 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->receiver;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(1)\r\t\t\t/* pushReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\tfieldIndex = 1 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->receiver;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(2)\r\t\t\t/* pushReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\tfieldIndex = 2 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->receiver;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(3)\r\t\t\t/* pushReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\tfieldIndex = 3 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->receiver;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(4)\r\t\t\t/* pushReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\tfieldIndex = 4 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->receiver;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(5)\r\t\t\t/* pushReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\tfieldIndex = 5 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->receiver;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(6)\r\t\t\t/* pushReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\tfieldIndex = 6 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->receiver;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(7)\r\t\t\t/* pushReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\tfieldIndex = 7 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->receiver;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(8)\r\t\t\t/* pushReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\tfieldIndex = 8 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->receiver;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(9)\r\t\t\t/* pushReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\tfieldIndex = 9 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->receiver;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(10)\r\t\t\t/* pushReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\tfieldIndex = 10 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->receiver;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(11)\r\t\t\t/* pushReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\tfieldIndex = 11 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->receiver;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(12)\r\t\t\t/* pushReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\tfieldIndex = 12 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->receiver;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(13)\r\t\t\t/* pushReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\tfieldIndex = 13 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->receiver;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(14)\r\t\t\t/* pushReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\tfieldIndex = 14 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->receiver;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(15)\r\t\t\t/* pushReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\tfieldIndex = 15 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->receiver;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(16)\r\t\t\t/* pushTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt temporaryIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\ttemporaryIndex = 16 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + ((temporaryIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(17)\r\t\t\t/* pushTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt temporaryIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\ttemporaryIndex = 17 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + ((temporaryIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(18)\r\t\t\t/* pushTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt temporaryIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\ttemporaryIndex = 18 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + ((temporaryIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(19)\r\t\t\t/* pushTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt temporaryIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\ttemporaryIndex = 19 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + ((temporaryIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(20)\r\t\t\t/* pushTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt temporaryIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\ttemporaryIndex = 20 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + ((temporaryIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(21)\r\t\t\t/* pushTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt temporaryIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\ttemporaryIndex = 21 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + ((temporaryIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(22)\r\t\t\t/* pushTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt temporaryIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\ttemporaryIndex = 22 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + ((temporaryIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(23)\r\t\t\t/* pushTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt temporaryIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\ttemporaryIndex = 23 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + ((temporaryIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(24)\r\t\t\t/* pushTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt temporaryIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\ttemporaryIndex = 24 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + ((temporaryIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(25)\r\t\t\t/* pushTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt temporaryIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\ttemporaryIndex = 25 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + ((temporaryIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(26)\r\t\t\t/* pushTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt temporaryIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\ttemporaryIndex = 26 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + ((temporaryIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(27)\r\t\t\t/* pushTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt temporaryIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\ttemporaryIndex = 27 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + ((temporaryIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(28)\r\t\t\t/* pushTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt temporaryIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\ttemporaryIndex = 28 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + ((temporaryIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(29)\r\t\t\t/* pushTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt temporaryIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\ttemporaryIndex = 29 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + ((temporaryIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(30)\r\t\t\t/* pushTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt temporaryIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\ttemporaryIndex = 30 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + ((temporaryIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(31)\r\t\t\t/* pushTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt temporaryIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\ttemporaryIndex = 31 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + ((temporaryIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(32)\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 32 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(33)\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 33 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(34)\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 34 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(35)\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 35 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(36)\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 36 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(37)\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 37 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(38)\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 38 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(39)\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 39 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(40)\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 40 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(41)\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 41 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(42)\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 42 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(43)\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 43 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(44)\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 44 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(45)\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 45 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(46)\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 46 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(47)\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 47 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(48)\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 48 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(49)\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 49 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(50)\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 50 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(51)\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 51 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(52)\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 52 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(53)\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 53 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(54)\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 54 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(55)\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 55 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(56)\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 56 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(57)\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 57 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(58)\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 58 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(59)\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 59 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(60)\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 60 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(61)\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 61 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(62)\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 62 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(63)\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 63 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(64)\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 64 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(65)\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 65 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(66)\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 66 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(67)\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 67 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(68)\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 68 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(69)\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 69 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(70)\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 70 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(71)\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 71 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(72)\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 72 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(73)\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 73 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(74)\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 74 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(75)\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 75 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(76)\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 76 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(77)\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 77 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(78)\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 78 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(79)\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 79 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(80)\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 80 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(81)\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 81 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(82)\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 82 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(83)\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 83 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(84)\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 84 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(85)\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 85 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(86)\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 86 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(87)\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 87 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(88)\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 88 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(89)\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 89 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(90)\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 90 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(91)\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 91 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(92)\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 92 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(93)\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 93 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(94)\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 94 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(95)\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 95 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(96)\r\t\t\t/* storeAndPopReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt top;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\trcvr = foo->receiver;\r\t\t\t\ttop = longAtPointer(localSP);\r\t\t\t\tif ((((usqInt) rcvr)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\tpossibleRootStoreIntovalue(rcvr, top);\r\t\t\t\t}\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tfieldIndex = 96 & 7;\r\t\t\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), top);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(97)\r\t\t\t/* storeAndPopReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt top;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\trcvr = foo->receiver;\r\t\t\t\ttop = longAtPointer(localSP);\r\t\t\t\tif ((((usqInt) rcvr)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\tpossibleRootStoreIntovalue(rcvr, top);\r\t\t\t\t}\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tfieldIndex = 97 & 7;\r\t\t\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), top);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(98)\r\t\t\t/* storeAndPopReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt top;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\trcvr = foo->receiver;\r\t\t\t\ttop = longAtPointer(localSP);\r\t\t\t\tif ((((usqInt) rcvr)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\tpossibleRootStoreIntovalue(rcvr, top);\r\t\t\t\t}\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tfieldIndex = 98 & 7;\r\t\t\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), top);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(99)\r\t\t\t/* storeAndPopReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt top;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\trcvr = foo->receiver;\r\t\t\t\ttop = longAtPointer(localSP);\r\t\t\t\tif ((((usqInt) rcvr)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\tpossibleRootStoreIntovalue(rcvr, top);\r\t\t\t\t}\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tfieldIndex = 99 & 7;\r\t\t\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), top);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(100)\r\t\t\t/* storeAndPopReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt top;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\trcvr = foo->receiver;\r\t\t\t\ttop = longAtPointer(localSP);\r\t\t\t\tif ((((usqInt) rcvr)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\tpossibleRootStoreIntovalue(rcvr, top);\r\t\t\t\t}\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tfieldIndex = 100 & 7;\r\t\t\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), top);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(101)\r\t\t\t/* storeAndPopReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt top;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\trcvr = foo->receiver;\r\t\t\t\ttop = longAtPointer(localSP);\r\t\t\t\tif ((((usqInt) rcvr)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\tpossibleRootStoreIntovalue(rcvr, top);\r\t\t\t\t}\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tfieldIndex = 101 & 7;\r\t\t\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), top);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(102)\r\t\t\t/* storeAndPopReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt top;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\trcvr = foo->receiver;\r\t\t\t\ttop = longAtPointer(localSP);\r\t\t\t\tif ((((usqInt) rcvr)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\tpossibleRootStoreIntovalue(rcvr, top);\r\t\t\t\t}\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tfieldIndex = 102 & 7;\r\t\t\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), top);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(103)\r\t\t\t/* storeAndPopReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt top;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\trcvr = foo->receiver;\r\t\t\t\ttop = longAtPointer(localSP);\r\t\t\t\tif ((((usqInt) rcvr)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\tpossibleRootStoreIntovalue(rcvr, top);\r\t\t\t\t}\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tfieldIndex = 103 & 7;\r\t\t\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), top);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(104)\r\t\t\t/* storeAndPopTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tfieldIndex = (104 & 7) + TempFrameStart;\r\t\t\t\toop = localHomeContext;\r\t\t\t\tvaluePointer = longAtPointer(localSP);\r\t\t\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(105)\r\t\t\t/* storeAndPopTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tfieldIndex = (105 & 7) + TempFrameStart;\r\t\t\t\toop = localHomeContext;\r\t\t\t\tvaluePointer = longAtPointer(localSP);\r\t\t\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(106)\r\t\t\t/* storeAndPopTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tfieldIndex = (106 & 7) + TempFrameStart;\r\t\t\t\toop = localHomeContext;\r\t\t\t\tvaluePointer = longAtPointer(localSP);\r\t\t\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(107)\r\t\t\t/* storeAndPopTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tfieldIndex = (107 & 7) + TempFrameStart;\r\t\t\t\toop = localHomeContext;\r\t\t\t\tvaluePointer = longAtPointer(localSP);\r\t\t\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(108)\r\t\t\t/* storeAndPopTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tfieldIndex = (108 & 7) + TempFrameStart;\r\t\t\t\toop = localHomeContext;\r\t\t\t\tvaluePointer = longAtPointer(localSP);\r\t\t\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(109)\r\t\t\t/* storeAndPopTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tfieldIndex = (109 & 7) + TempFrameStart;\r\t\t\t\toop = localHomeContext;\r\t\t\t\tvaluePointer = longAtPointer(localSP);\r\t\t\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(110)\r\t\t\t/* storeAndPopTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tfieldIndex = (110 & 7) + TempFrameStart;\r\t\t\t\toop = localHomeContext;\r\t\t\t\tvaluePointer = longAtPointer(localSP);\r\t\t\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(111)\r\t\t\t/* storeAndPopTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tfieldIndex = (111 & 7) + TempFrameStart;\r\t\t\t\toop = localHomeContext;\r\t\t\t\tvaluePointer = longAtPointer(localSP);\r\t\t\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(112)\r\t\t\t/* pushReceiverBytecode */\r\t\t\t{\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin internalPush: */\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->receiver);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(113)\r\t\t\t/* pushConstantTrueBytecode */\r\t\t\t{\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin internalPush: */\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->trueObj);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(114)\r\t\t\t/* pushConstantFalseBytecode */\r\t\t\t{\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin internalPush: */\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->falseObj);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(115)\r\t\t\t/* pushConstantNilBytecode */\r\t\t\t{\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin internalPush: */\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->nilObj);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(116)\r\t\t\t/* pushConstantMinusOneBytecode */\r\t\t\t{\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin internalPush: */\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, ConstMinusOne);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(117)\r\t\t\t/* pushConstantZeroBytecode */\r\t\t\t{\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin internalPush: */\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, ConstZero);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(118)\r\t\t\t/* pushConstantOneBytecode */\r\t\t\t{\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin internalPush: */\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, ConstOne);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(119)\r\t\t\t/* pushConstantTwoBytecode */\r\t\t\t{\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin internalPush: */\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, ConstTwo);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(120)\r\t\t\t/* returnReceiver */\r\t\t\t{\r\t\t\t\tsqInt context;\r\t\t\t\tsqInt closureOrNil;\r\t\t\t\t/* begin sender */\r\t\t\t\tcontext = localHomeContext;\r\t\t\t\twhile ((closureOrNil = longAt((context + (BASE_HEADER_SIZE)) + (ClosureIndex << (SHIFT_FOR_WORD)))) != foo->nilObj) {\r\t\t\t\t\tcontext = longAt((closureOrNil + (BASE_HEADER_SIZE)) + (ClosureOuterContextIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t}\r\t\t\t\tlocalReturnContext = longAt((context + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlocalReturnValue = foo->receiver;\r\t\t\t\t/* goto commonReturn */\r\t\t\t}\r;\r\t\t\t\r\t\tcommonReturn:\r\t\t\t/* commonReturn */\r\t\t\t{\r\t\t\t\tsqInt localVal;\r\t\t\t\tsqInt nilOop;\r\t\t\t\tsqInt unwindMarked;\r\t\t\t\tsqInt thisCntx;\r\t\t\t\tsqInt contextOfCaller;\r\t\t\t\tsqInt localCntx;\r\t\t\t\tsqInt meth;\r\t\t\t\tsqInt header;\r\t\t\t\tsqInt pIndex;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt oop2;\r\t\t\t\tsqInt oop3;\r\t\t\t\tsqInt primBits;\r\t\t\t\tsqInt header1;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tsqInt valuePointer1;\r\t\t\t\tsqInt tmp;\r\t\t\t\t/* inline:  */;\r\t\t\t\tnilOop = foo->nilObj;\r\t\t\t\tthisCntx = foo->activeContext;\r\t\t\t\tlocalCntx = localReturnContext;\r\t\t\t\tlocalVal = localReturnValue;\r\t\t\t\tif ((localCntx == nilOop) || ((longAt((localCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)))) == nilOop)) {\r\t\t\t\t\t/* begin internalCannotReturn: */\r\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->activeContext);\r\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, localVal);\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\t\tfoo->messageSelector = longAt((oop1 + (BASE_HEADER_SIZE)) + (SelectorCannotReturn << (SHIFT_FOR_WORD)));\r\t\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\t\tgoto normalSend;\r\t\t\t\t\tgoto l42;\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->activeContext;\r\t\t\t\tthisCntx = longAt((oop + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\t\t\t\twhile (!(thisCntx == localCntx)) {\r\t\t\t\t\tif (thisCntx == nilOop) {\r\t\t\t\t\t\t/* begin internalCannotReturn: */\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->activeContext);\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, localVal);\r\t\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t\toop2 = foo->specialObjectsOop;\r\t\t\t\t\t\tfoo->messageSelector = longAt((oop2 + (BASE_HEADER_SIZE)) + (SelectorCannotReturn << (SHIFT_FOR_WORD)));\r\t\t\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\t\t\tgoto normalSend;\r\t\t\t\t\t\tgoto l42;\r\t\t\t\t\t}\r\t\t\t\t\t/* begin isUnwindMarked: */\r\t\t\t\t\theader = longAt(thisCntx);\r\t\t\t\t\tif (!(((((usqInt) header) >> 12) & 31) == 14)) {\r\t\t\t\t\t\tunwindMarked = 0;\r\t\t\t\t\t\tgoto l43;\r\t\t\t\t\t}\r\t\t\t\t\tmeth = longAt((thisCntx + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t\t/* begin primitiveIndexOf: */\r\t\t\t\t\tprimBits = (((usqInt) (longAt((meth + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD))))) >> 1) & 268435967;\r\t\t\t\t\tpIndex = (primBits & 511) + (((usqInt) primBits) >> 19);\r\t\t\t\t\tunwindMarked = pIndex == 198;\r\t\t\t\tl43:\t/* end isUnwindMarked: */;\r\t\t\t\t\tif (unwindMarked) {\r\t\t\t\t\t\t/* begin internalAboutToReturn:through: */\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->activeContext);\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, localVal);\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, thisCntx);\r\t\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t\toop3 = foo->specialObjectsOop;\r\t\t\t\t\t\tfoo->messageSelector = longAt((oop3 + (BASE_HEADER_SIZE)) + (SelectorAboutToReturn << (SHIFT_FOR_WORD)));\r\t\t\t\t\t\tfoo->argumentCount = 2;\r\t\t\t\t\t\tgoto normalSend;\r\t\t\t\t\t\tgoto l42;\r\t\t\t\t\t}\r\t\t\t\t\tthisCntx = longAt((thisCntx + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t}\r\t\t\t\tthisCntx = foo->activeContext;\r\t\t\t\twhile (!(thisCntx == localCntx)) {\r\t\t\t\t\tcontextOfCaller = longAt((thisCntx + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t\tlongAtput((thisCntx + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)), nilOop);\r\t\t\t\t\tlongAtput((thisCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), nilOop);\r\t\t\t\t\tif (foo->reclaimableContextCount > 0) {\r\t\t\t\t\t\tfoo->reclaimableContextCount -= 1;\r\t\t\t\t\t\t/* begin recycleContextIfPossible: */\r\t\t\t\t\t\tif ((((usqInt) thisCntx)) >= (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\t\theader1 = longAt(thisCntx);\r\t\t\t\t\t\t\tif (((((usqInt) header1) >> 12) & 31) == 14) {\r\t\t\t\t\t\t\t\tif ((header1 & (SIZE_MASK)) == (SMALL_CONTEXT_SIZE)) {\r\t\t\t\t\t\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\t\t\t\t\t\tvaluePointer = foo->freeContexts;\r\t\t\t\t\t\t\t\t\tlongAtput((thisCntx + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t\t\t\t\t\tfoo->freeContexts = thisCntx;\r\t\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\t\tif ((header1 & (SIZE_MASK)) == (LARGE_CONTEXT_SIZE)) {\r\t\t\t\t\t\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\t\t\t\t\t\tvaluePointer1 = foo->freeLargeContexts;\r\t\t\t\t\t\t\t\t\tlongAtput((thisCntx + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)), valuePointer1);\r\t\t\t\t\t\t\t\t\tfoo->freeLargeContexts = thisCntx;\r\t\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tthisCntx = contextOfCaller;\r\t\t\t\t}\r\t\t\t\tfoo->activeContext = thisCntx;\r\t\t\t\tif ((((usqInt) thisCntx)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\tbeRootIfOld(thisCntx);\r\t\t\t\t}\r\t\t\t\t/* begin internalFetchContextRegisters: */\r\t\t\t\ttmp = longAt((thisCntx + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tif ((tmp & 1)) {\r\t\t\t\t\ttmp = longAt((thisCntx + (BASE_HEADER_SIZE)) + (HomeIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t\tif ((((usqInt) tmp)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\tbeRootIfOld(tmp);\r\t\t\t\t\t}\r\t\t\t\t} else {\r\t\t\t\t\ttmp = thisCntx;\r\t\t\t\t}\r\t\t\t\tlocalHomeContext = tmp;\r\t\t\t\tfoo->receiver = longAt((tmp + (BASE_HEADER_SIZE)) + (ReceiverIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->method = longAt((tmp + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\t\t\t\ttmp = ((longAt((thisCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\t\t\t\tlocalIP = pointerForOop(((foo->method + tmp) + (BASE_HEADER_SIZE)) - 2);\r\t\t\t\ttmp = ((longAt((thisCntx + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\t\t\t\tlocalSP = pointerForOop((thisCntx + (BASE_HEADER_SIZE)) + (((TempFrameStart + tmp) - 1) * (BYTES_PER_WORD)));\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin internalPush: */\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, localVal);\r\t\t\t}\r;\r\t\tl42:\t/* end case */;\r\t\t\tBREAK;\r\t\tCASE(121)\r\t\t\t/* returnTrue */\r\t\t\t{\r\t\t\t\tsqInt context;\r\t\t\t\tsqInt closureOrNil;\r\t\t\t\t/* begin sender */\r\t\t\t\tcontext = localHomeContext;\r\t\t\t\twhile ((closureOrNil = longAt((context + (BASE_HEADER_SIZE)) + (ClosureIndex << (SHIFT_FOR_WORD)))) != foo->nilObj) {\r\t\t\t\t\tcontext = longAt((closureOrNil + (BASE_HEADER_SIZE)) + (ClosureOuterContextIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t}\r\t\t\t\tlocalReturnContext = longAt((context + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlocalReturnValue = foo->trueObj;\r\t\t\t\tgoto commonReturn;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(122)\r\t\t\t/* returnFalse */\r\t\t\t{\r\t\t\t\tsqInt context;\r\t\t\t\tsqInt closureOrNil;\r\t\t\t\t/* begin sender */\r\t\t\t\tcontext = localHomeContext;\r\t\t\t\twhile ((closureOrNil = longAt((context + (BASE_HEADER_SIZE)) + (ClosureIndex << (SHIFT_FOR_WORD)))) != foo->nilObj) {\r\t\t\t\t\tcontext = longAt((closureOrNil + (BASE_HEADER_SIZE)) + (ClosureOuterContextIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t}\r\t\t\t\tlocalReturnContext = longAt((context + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlocalReturnValue = foo->falseObj;\r\t\t\t\tgoto commonReturn;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(123)\r\t\t\t/* returnNil */\r\t\t\t{\r\t\t\t\tsqInt context;\r\t\t\t\tsqInt closureOrNil;\r\t\t\t\t/* begin sender */\r\t\t\t\tcontext = localHomeContext;\r\t\t\t\twhile ((closureOrNil = longAt((context + (BASE_HEADER_SIZE)) + (ClosureIndex << (SHIFT_FOR_WORD)))) != foo->nilObj) {\r\t\t\t\t\tcontext = longAt((closureOrNil + (BASE_HEADER_SIZE)) + (ClosureOuterContextIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t}\r\t\t\t\tlocalReturnContext = longAt((context + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlocalReturnValue = foo->nilObj;\r\t\t\t\tgoto commonReturn;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(124)\r\t\t\t/* returnTopFromMethod */\r\t\t\t{\r\t\t\t\tsqInt context;\r\t\t\t\tsqInt closureOrNil;\r\t\t\t\t/* begin sender */\r\t\t\t\tcontext = localHomeContext;\r\t\t\t\twhile ((closureOrNil = longAt((context + (BASE_HEADER_SIZE)) + (ClosureIndex << (SHIFT_FOR_WORD)))) != foo->nilObj) {\r\t\t\t\t\tcontext = longAt((closureOrNil + (BASE_HEADER_SIZE)) + (ClosureOuterContextIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t}\r\t\t\t\tlocalReturnContext = longAt((context + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlocalReturnValue = longAtPointer(localSP);\r\t\t\t\tgoto commonReturn;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(125)\r\t\t\t/* returnTopFromBlock */\r\t\t\t{\r\t\t\t\tsqInt oop;\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->activeContext;\r\t\t\t\tlocalReturnContext = longAt((oop + (BASE_HEADER_SIZE)) + (CallerIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlocalReturnValue = longAtPointer(localSP);\r\t\t\t\tgoto commonReturn;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(126)\r\t\tCASE(127)\r\t\t\t/* unknownBytecode */\r\t\t\t{\r\t\t\t\terror(\"Unknown bytecode\");\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(128)\r\t\t\t/* extendedPushBytecode */\r\t\t\t{\r\t\t\t\tsqInt variableIndex;\r\t\t\t\tsqInt descriptor;\r\t\t\t\tsqInt variableType;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt object1;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt object2;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tsqInt object3;\r\t\t\t\tsqInt oop2;\r\t\t\t\tsqInt methodPointer1;\r\t\t\t\tdescriptor = byteAtPointer(++localIP);\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\tvariableType = (((usqInt) descriptor) >> 6) & 3;\r\t\t\t\tvariableIndex = descriptor & 63;\r\t\t\t\tif (variableType == 0) {\r\t\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\toop = foo->receiver;\r\t\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (variableIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t\t\tgoto l1;\r\t\t\t\t}\r\t\t\t\tif (variableType == 1) {\r\t\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\toop1 = localHomeContext;\r\t\t\t\t\tobject1 = longAt((oop1 + (BASE_HEADER_SIZE)) + ((variableIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object1);\r\t\t\t\t\tgoto l1;\r\t\t\t\t}\r\t\t\t\tif (variableType == 2) {\r\t\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\t\tmethodPointer = foo->method;\r\t\t\t\t\tobject2 = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((variableIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object2);\r\t\t\t\t\tgoto l1;\r\t\t\t\t}\r\t\t\t\tif (variableType == 3) {\r\t\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\t\tmethodPointer1 = foo->method;\r\t\t\t\t\toop2 = longAt((methodPointer1 + (BASE_HEADER_SIZE)) + ((variableIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tobject3 = longAt((oop2 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object3);\r\t\t\t\t\tgoto l1;\r\t\t\t\t}\r\t\t\t}\r;\r\t\tl1:\t/* end case */;\r\t\t\tBREAK;\r\t\tCASE(129)\r\t\t\t/* extendedStoreBytecode */\r\t\t\t{\r\t\t\t\tsqInt variableIndex;\r\t\t\t\tsqInt association;\r\t\t\t\tsqInt descriptor;\r\t\t\t\tsqInt variableType;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt valuePointer1;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tsqInt valuePointer2;\r\t\t\t\tdescriptor = byteAtPointer(++localIP);\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\tvariableType = (((usqInt) descriptor) >> 6) & 3;\r\t\t\t\tvariableIndex = descriptor & 63;\r\t\t\t\tif (variableType == 0) {\r\t\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\t\toop1 = foo->receiver;\r\t\t\t\t\tvaluePointer1 = longAtPointer(localSP);\r\t\t\t\t\tif ((((usqInt) oop1)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\tpossibleRootStoreIntovalue(oop1, valuePointer1);\r\t\t\t\t\t}\r\t\t\t\t\tlongAtput((oop1 + (BASE_HEADER_SIZE)) + (variableIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\t\t\t\t\tgoto l2;\r\t\t\t\t}\r\t\t\t\tif (variableType == 1) {\r\t\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\t\toop = localHomeContext;\r\t\t\t\t\tvaluePointer = longAtPointer(localSP);\r\t\t\t\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + ((variableIndex + TempFrameStart) << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t\tgoto l2;\r\t\t\t\t}\r\t\t\t\tif (variableType == 2) {\r\t\t\t\t\terror(\"illegal store\");\r\t\t\t\t}\r\t\t\t\tif (variableType == 3) {\r\t\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\t\tmethodPointer = foo->method;\r\t\t\t\t\tassociation = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((variableIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\t\tvaluePointer2 = longAtPointer(localSP);\r\t\t\t\t\tif ((((usqInt) association)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\tpossibleRootStoreIntovalue(association, valuePointer2);\r\t\t\t\t\t}\r\t\t\t\t\tlongAtput((association + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)), valuePointer2);\r\t\t\t\t\tgoto l2;\r\t\t\t\t}\r\t\t\t}\r;\r\t\tl2:\t/* end case */;\r\t\t\tBREAK;\r\t\tCASE(130)\r\t\t\t/* extendedStoreAndPopBytecode */\r\t\t\t{\r\t\t\t\tsqInt variableIndex;\r\t\t\t\tsqInt association;\r\t\t\t\tsqInt descriptor;\r\t\t\t\tsqInt variableType;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt valuePointer1;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tsqInt valuePointer2;\r\t\t\t\t/* begin extendedStoreBytecode */\r\t\t\t\tdescriptor = byteAtPointer(++localIP);\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\tvariableType = (((usqInt) descriptor) >> 6) & 3;\r\t\t\t\tvariableIndex = descriptor & 63;\r\t\t\t\tif (variableType == 0) {\r\t\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\t\toop1 = foo->receiver;\r\t\t\t\t\tvaluePointer1 = longAtPointer(localSP);\r\t\t\t\t\tif ((((usqInt) oop1)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\tpossibleRootStoreIntovalue(oop1, valuePointer1);\r\t\t\t\t\t}\r\t\t\t\t\tlongAtput((oop1 + (BASE_HEADER_SIZE)) + (variableIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\t\t\t\t\tgoto l3;\r\t\t\t\t}\r\t\t\t\tif (variableType == 1) {\r\t\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\t\toop = localHomeContext;\r\t\t\t\t\tvaluePointer = longAtPointer(localSP);\r\t\t\t\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + ((variableIndex + TempFrameStart) << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t\tgoto l3;\r\t\t\t\t}\r\t\t\t\tif (variableType == 2) {\r\t\t\t\t\terror(\"illegal store\");\r\t\t\t\t}\r\t\t\t\tif (variableType == 3) {\r\t\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\t\tmethodPointer = foo->method;\r\t\t\t\t\tassociation = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((variableIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\t\tvaluePointer2 = longAtPointer(localSP);\r\t\t\t\t\tif ((((usqInt) association)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\tpossibleRootStoreIntovalue(association, valuePointer2);\r\t\t\t\t\t}\r\t\t\t\t\tlongAtput((association + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)), valuePointer2);\r\t\t\t\t\tgoto l3;\r\t\t\t\t}\r\t\t\tl3:\t/* end extendedStoreBytecode */;\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(131)\r\t\t\t/* singleExtendedSendBytecode */\r\t\t\t{\r\t\t\t\tsqInt descriptor;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tdescriptor = byteAtPointer(++localIP);\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + (((descriptor & 31) + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((usqInt) descriptor) >> 5;\r\t\t\t\t/* goto normalSend */\r\t\t\t}\r;\r\t\t\t\r\t\tnormalSend:\r\t\t\t/* normalSend */\r\t\t\t{\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt ccIndex;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt oop2;\r\t\t\t\t/* inline:  */;\r\t\t\t\trcvr = longAtPointer(localSP - (foo->argumentCount * (BYTES_PER_WORD)));\r\t\t\t\t/* begin fetchClassOf: */\r\t\t\t\tif ((rcvr & 1)) {\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\toop = foo->specialObjectsOop;\r\t\t\t\t\tfoo->lkupClass = longAt((oop + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\t\t\t\tgoto l44;\r\t\t\t\t}\r\t\t\t\tccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31;\r\t\t\t\tif (ccIndex == 0) {\r\t\t\t\t\tfoo->lkupClass = (longAt(rcvr - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\t\t\t\tgoto l44;\r\t\t\t\t} else {\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\toop2 = foo->specialObjectsOop;\r\t\t\t\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\t\t\t\tfoo->lkupClass = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tgoto l44;\r\t\t\t\t}\r\t\t\tl44:\t/* end fetchClassOf: */;\r\t\t\t\tfoo->receiverClass = foo->lkupClass;\r\t\t\t\t/* goto commonSend */\r\t\t\t}\r;\r\t\t\t\r\t\tcommonSend:\r\t\t\t/* commonSend */\r\t\t\t{\r\t\t\t\tsqInt ok;\r\t\t\t\tsqInt hash;\r\t\t\t\tsqInt probe;\r\t\t\t\tsqInt delta;\r\t\t\t\tsqInt localPrimIndex;\r\t\t\t\tsqInt nArgs;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt tempCount;\r\t\t\t\tsqInt where;\r\t\t\t\tsqInt needsLarge;\r\t\t\t\tsqInt i;\r\t\t\t\tsqInt argCount2;\r\t\t\t\tsqInt newContext;\r\t\t\t\tsqInt methodHeader;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tsqInt activeCntx;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tsqInt valuePointer1;\r\t\t\t\tsqInt tmp;\r\t\t\t\t/* begin internalFindNewMethod */\r\t\t\t\t/* begin lookupInMethodCacheSel:class: */\r\t\t\t\thash = foo->messageSelector ^ foo->lkupClass;\r\t\t\t\tprobe = hash & MethodCacheMask;\r\t\t\t\tif (((foo->methodCache[probe + MethodCacheSelector]) == foo->messageSelector) && ((foo->methodCache[probe + MethodCacheClass]) == foo->lkupClass)) {\r\t\t\t\t\tfoo->newMethod = foo->methodCache[probe + MethodCacheMethod];\r\t\t\t\t\tfoo->primitiveIndex = foo->methodCache[probe + MethodCachePrim];\r\t\t\t\t\tfoo->newNativeMethod = foo->methodCache[probe + MethodCacheNative];\r\t\t\t\t\tfoo->primitiveFunctionPointer = ((void *) (foo->methodCache[probe + MethodCachePrimFunction]));\r\t\t\t\t\tok = 1;\r\t\t\t\t\tgoto l45;\r\t\t\t\t}\r\t\t\t\tprobe = (((usqInt) hash) >> 1) & MethodCacheMask;\r\t\t\t\tif (((foo->methodCache[probe + MethodCacheSelector]) == foo->messageSelector) && ((foo->methodCache[probe + MethodCacheClass]) == foo->lkupClass)) {\r\t\t\t\t\tfoo->newMethod = foo->methodCache[probe + MethodCacheMethod];\r\t\t\t\t\tfoo->primitiveIndex = foo->methodCache[probe + MethodCachePrim];\r\t\t\t\t\tfoo->newNativeMethod = foo->methodCache[probe + MethodCacheNative];\r\t\t\t\t\tfoo->primitiveFunctionPointer = ((void *) (foo->methodCache[probe + MethodCachePrimFunction]));\r\t\t\t\t\tok = 1;\r\t\t\t\t\tgoto l45;\r\t\t\t\t}\r\t\t\t\tprobe = (((usqInt) hash) >> 2) & MethodCacheMask;\r\t\t\t\tif (((foo->methodCache[probe + MethodCacheSelector]) == foo->messageSelector) && ((foo->methodCache[probe + MethodCacheClass]) == foo->lkupClass)) {\r\t\t\t\t\tfoo->newMethod = foo->methodCache[probe + MethodCacheMethod];\r\t\t\t\t\tfoo->primitiveIndex = foo->methodCache[probe + MethodCachePrim];\r\t\t\t\t\tfoo->newNativeMethod = foo->methodCache[probe + MethodCacheNative];\r\t\t\t\t\tfoo->primitiveFunctionPointer = ((void *) (foo->methodCache[probe + MethodCachePrimFunction]));\r\t\t\t\t\tok = 1;\r\t\t\t\t\tgoto l45;\r\t\t\t\t}\r\t\t\t\tok = 0;\r\t\t\tl45:\t/* end lookupInMethodCacheSel:class: */;\r\t\t\t\tif (!(ok)) {\r\t\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t\tlookupMethodInClass(foo->lkupClass);\r\t\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\t\taddNewMethodToCache();\r\t\t\t\t}\r\t\t\t\t/* begin internalExecuteNewMethod */\r\t\t\t\tlocalPrimIndex = foo->primitiveIndex;\r\t\t\t\tif (localPrimIndex > 0) {\r\t\t\t\t\tif ((localPrimIndex > 255) && (localPrimIndex < 520)) {\r\t\t\t\t\t\tif (localPrimIndex >= 264) {\r\t\t\t\t\t\t\t/* begin internalPop:thenPush: */\r\t\t\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t\t\toop1 = longAtPointer(localSP);\r\t\t\t\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + ((localPrimIndex - 264) << (SHIFT_FOR_WORD)));\r\t\t\t\t\t\t\tlongAtPointerput(localSP -= (1 - 1) * (BYTES_PER_WORD), oop);\r\t\t\t\t\t\t\tgoto l46;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\tif (localPrimIndex == 256) {\r\t\t\t\t\t\t\t\tgoto l46;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\tif (localPrimIndex == 257) {\r\t\t\t\t\t\t\t\t/* begin internalPop:thenPush: */\r\t\t\t\t\t\t\t\tlongAtPointerput(localSP -= (1 - 1) * (BYTES_PER_WORD), foo->trueObj);\r\t\t\t\t\t\t\t\tgoto l46;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\tif (localPrimIndex == 258) {\r\t\t\t\t\t\t\t\t/* begin internalPop:thenPush: */\r\t\t\t\t\t\t\t\tlongAtPointerput(localSP -= (1 - 1) * (BYTES_PER_WORD), foo->falseObj);\r\t\t\t\t\t\t\t\tgoto l46;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\tif (localPrimIndex == 259) {\r\t\t\t\t\t\t\t\t/* begin internalPop:thenPush: */\r\t\t\t\t\t\t\t\tlongAtPointerput(localSP -= (1 - 1) * (BYTES_PER_WORD), foo->nilObj);\r\t\t\t\t\t\t\t\tgoto l46;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\t/* begin internalPop:thenPush: */\r\t\t\t\t\t\t\tlongAtPointerput(localSP -= (1 - 1) * (BYTES_PER_WORD), (((localPrimIndex - 261) << 1) | 1));\r\t\t\t\t\t\t\tgoto l46;\r\t\t\t\t\t\t}\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t\t\tif (DoBalanceChecks) {\r\t\t\t\t\t\t\tnArgs = foo->argumentCount;\r\t\t\t\t\t\t\tdelta = foo->stackPointer - foo->activeContext;\r\t\t\t\t\t\t}\r\t\t\t\t\t\tfoo->successFlag = 1;\r\t\t\t\t\t\tdispatchFunctionPointer(foo->primitiveFunctionPointer);\r\t\t\t\t\t\tif (DoBalanceChecks) {\r\t\t\t\t\t\t\tif (!(balancedStackafterPrimitivewithArgs(delta, localPrimIndex, nArgs))) {\r\t\t\t\t\t\t\t\tprintUnbalancedStack(localPrimIndex);\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t}\r\t\t\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t\t\tbrowserPluginReturnIfNeeded();\r\t\t\t\t\t\t\tgoto l46;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\t/* begin internalActivateNewMethod */\r\t\t\t\t/* begin headerOf: */\r\t\t\t\tmethodPointer = foo->newMethod;\r\t\t\t\tmethodHeader = longAt((methodPointer + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tneedsLarge = methodHeader & LargeContextBit;\r\t\t\t\tif ((needsLarge == 0) && (foo->freeContexts != NilContext)) {\r\t\t\t\t\tnewContext = foo->freeContexts;\r\t\t\t\t\tfoo->freeContexts = longAt((newContext + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)));\r\t\t\t\t} else {\r\t\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t\tnewContext = allocateOrRecycleContext(needsLarge);\r\t\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\t}\r\t\t\t\ttempCount = (((usqInt) methodHeader) >> 19) & 63;\r\t\t\t\twhere = newContext + (BASE_HEADER_SIZE);\r\t\t\t\tlongAtput(where + (SenderIndex << (SHIFT_FOR_WORD)), foo->activeContext);\r\t\t\t\tlongAtput(where + (InstructionPointerIndex << (SHIFT_FOR_WORD)), (((((LiteralStart + ((((usqInt) methodHeader) >> 10) & 255)) * (BYTES_PER_WORD)) + 1) << 1) | 1));\r\t\t\t\tlongAtput(where + (StackPointerIndex << (SHIFT_FOR_WORD)), ((tempCount << 1) | 1));\r\t\t\t\tlongAtput(where + (MethodIndex << (SHIFT_FOR_WORD)), foo->newMethod);\r\t\t\t\tlongAtput(where + (ClosureIndex << (SHIFT_FOR_WORD)), foo->nilObj);\r\t\t\t\targCount2 = foo->argumentCount;\r\t\t\t\tfor (i = 0; i <= argCount2; i += 1) {\r\t\t\t\t\tlongAtput(where + ((ReceiverIndex + i) << (SHIFT_FOR_WORD)), longAtPointer(localSP - ((argCount2 - i) * (BYTES_PER_WORD))));\r\t\t\t\t}\r\t\t\t\tmethodHeader = foo->nilObj;\r\t\t\t\tfor (i = ((argCount2 + 1) + ReceiverIndex); i <= (tempCount + ReceiverIndex); i += 1) {\r\t\t\t\t\tlongAtput(where + (i << (SHIFT_FOR_WORD)), methodHeader);\r\t\t\t\t}\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= (argCount2 + 1) * (BYTES_PER_WORD);\r\t\t\t\tfoo->reclaimableContextCount += 1;\r\t\t\t\t/* begin internalNewActiveContext: */\r\t\t\t\t/* begin internalStoreContextRegisters: */\r\t\t\t\tactiveCntx = foo->activeContext;\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tvaluePointer = (((((oopForPointer(localIP)) + 2) - (foo->method + (BASE_HEADER_SIZE))) << 1) | 1);\r\t\t\t\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tvaluePointer1 = (((((((usqInt) ((oopForPointer(localSP)) - (activeCntx + (BASE_HEADER_SIZE)))) >> (SHIFT_FOR_WORD)) - TempFrameStart) + 1) << 1) | 1);\r\t\t\t\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\t\t\t\tif ((((usqInt) newContext)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\tbeRootIfOld(newContext);\r\t\t\t\t}\r\t\t\t\tfoo->activeContext = newContext;\r\t\t\t\t/* begin internalFetchContextRegisters: */\r\t\t\t\ttmp = longAt((newContext + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tif ((tmp & 1)) {\r\t\t\t\t\ttmp = longAt((newContext + (BASE_HEADER_SIZE)) + (HomeIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t\tif ((((usqInt) tmp)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\tbeRootIfOld(tmp);\r\t\t\t\t\t}\r\t\t\t\t} else {\r\t\t\t\t\ttmp = newContext;\r\t\t\t\t}\r\t\t\t\tlocalHomeContext = tmp;\r\t\t\t\tfoo->receiver = longAt((tmp + (BASE_HEADER_SIZE)) + (ReceiverIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->method = longAt((tmp + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\t\t\t\ttmp = ((longAt((newContext + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\t\t\t\tlocalIP = pointerForOop(((foo->method + tmp) + (BASE_HEADER_SIZE)) - 2);\r\t\t\t\ttmp = ((longAt((newContext + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\t\t\t\tlocalSP = pointerForOop((newContext + (BASE_HEADER_SIZE)) + (((TempFrameStart + tmp) - 1) * (BYTES_PER_WORD)));\r\t\t\t\t/* begin internalQuickCheckForInterrupts */\r\t\t\t\tif ((foo->interruptCheckCounter -= 1) <= 0) {\r\t\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t\tcheckForInterrupts();\r\t\t\t\t\tbrowserPluginReturnIfNeeded();\r\t\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\t}\r\t\t\tl46:\t/* end internalExecuteNewMethod */;\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(132)\r\t\t\t/* doubleExtendedDoAnythingBytecode */\r\t\t\t{\r\t\t\t\tsqInt top;\r\t\t\t\tsqInt opType;\r\t\t\t\tsqInt byte3;\r\t\t\t\tsqInt byte2;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt oop2;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tsqInt methodPointer1;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop3;\r\t\t\t\tsqInt methodPointer2;\r\t\t\t\tsqInt object1;\r\t\t\t\tsqInt methodPointer3;\r\t\t\t\tsqInt object2;\r\t\t\t\tsqInt oop4;\r\t\t\t\tsqInt methodPointer4;\r\t\t\t\tbyte2 = byteAtPointer(++localIP);\r\t\t\t\tbyte3 = byteAtPointer(++localIP);\r\t\t\t\topType = ((usqInt) byte2) >> 5;\r\t\t\t\tif (opType == 0) {\r\t\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\t\tmethodPointer = foo->method;\r\t\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((byte3 + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tfoo->argumentCount = byte2 & 31;\r\t\t\t\t\tgoto normalSend;\r\t\t\t\t\tgoto l4;\r\t\t\t\t}\r\t\t\t\tif (opType == 1) {\r\t\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\t\tmethodPointer1 = foo->method;\r\t\t\t\t\tfoo->messageSelector = longAt((methodPointer1 + (BASE_HEADER_SIZE)) + ((byte3 + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tfoo->argumentCount = byte2 & 31;\r\t\t\t\t\tgoto commonSupersend;\r\t\t\t\t\tgoto l4;\r\t\t\t\t}\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\tif (opType == 2) {\r\t\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\toop3 = foo->receiver;\r\t\t\t\t\tobject = longAt((oop3 + (BASE_HEADER_SIZE)) + (byte3 << (SHIFT_FOR_WORD)));\r\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t\t\tgoto l4;\r\t\t\t\t}\r\t\t\t\tif (opType == 3) {\r\t\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\t\tmethodPointer3 = foo->method;\r\t\t\t\t\tobject1 = longAt((methodPointer3 + (BASE_HEADER_SIZE)) + ((byte3 + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object1);\r\t\t\t\t\tgoto l4;\r\t\t\t\t}\r\t\t\t\tif (opType == 4) {\r\t\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\t\tmethodPointer4 = foo->method;\r\t\t\t\t\toop4 = longAt((methodPointer4 + (BASE_HEADER_SIZE)) + ((byte3 + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tobject2 = longAt((oop4 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object2);\r\t\t\t\t\tgoto l4;\r\t\t\t\t}\r\t\t\t\tif (opType == 5) {\r\t\t\t\t\ttop = longAtPointer(localSP);\r\t\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\t\toop = foo->receiver;\r\t\t\t\t\tif ((((usqInt) oop)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\tpossibleRootStoreIntovalue(oop, top);\r\t\t\t\t\t}\r\t\t\t\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + (byte3 << (SHIFT_FOR_WORD)), top);\r\t\t\t\t\tgoto l4;\r\t\t\t\t}\r\t\t\t\tif (opType == 6) {\r\t\t\t\t\ttop = longAtPointer(localSP);\r\t\t\t\t\t/* begin internalPop: */\r\t\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\t\toop1 = foo->receiver;\r\t\t\t\t\tif ((((usqInt) oop1)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\tpossibleRootStoreIntovalue(oop1, top);\r\t\t\t\t\t}\r\t\t\t\t\tlongAtput((oop1 + (BASE_HEADER_SIZE)) + (byte3 << (SHIFT_FOR_WORD)), top);\r\t\t\t\t\tgoto l4;\r\t\t\t\t}\r\t\t\t\tif (opType == 7) {\r\t\t\t\t\ttop = longAtPointer(localSP);\r\t\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\t\tmethodPointer2 = foo->method;\r\t\t\t\t\toop2 = longAt((methodPointer2 + (BASE_HEADER_SIZE)) + ((byte3 + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tif ((((usqInt) oop2)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\tpossibleRootStoreIntovalue(oop2, top);\r\t\t\t\t\t}\r\t\t\t\t\tlongAtput((oop2 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)), top);\r\t\t\t\t\tgoto l4;\r\t\t\t\t}\r\t\t\t}\r;\r\t\tl4:\t/* end case */;\r\t\t\tBREAK;\r\t\tCASE(133)\r\t\t\t/* singleExtendedSuperBytecode */\r\t\t\t{\r\t\t\t\tsqInt descriptor;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tdescriptor = byteAtPointer(++localIP);\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + (((descriptor & 31) + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((usqInt) descriptor) >> 5;\r\t\t\t\t/* goto commonSupersend */\r\t\t\t}\r;\r\t\t\t\r\t\tcommonSupersend:\r\t\t\t/* superclassSend */\r\t\t\t{\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt classPointer;\r\t\t\t\tsqInt ccIndex;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt oop2;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tsqInt oop3;\r\t\t\t\tsqInt offset;\r\t\t\t\t/* inline:  */;\r\t\t\t\t/* begin superclassOf: */\r\t\t\t\t/* begin methodClassOf: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\toffset = (literalCountOfHeader(longAt((methodPointer + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD))))) - 1;\r\t\t\t\toop3 = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tclassPointer = longAt((oop3 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->lkupClass = longAt((classPointer + (BASE_HEADER_SIZE)) + (SuperclassIndex << (SHIFT_FOR_WORD)));\r\t\t\t\trcvr = longAtPointer(localSP - (foo->argumentCount * (BYTES_PER_WORD)));\r\t\t\t\t/* begin fetchClassOf: */\r\t\t\t\tif ((rcvr & 1)) {\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\toop = foo->specialObjectsOop;\r\t\t\t\t\tfoo->receiverClass = longAt((oop + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\t\t\t\tgoto l47;\r\t\t\t\t}\r\t\t\t\tccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31;\r\t\t\t\tif (ccIndex == 0) {\r\t\t\t\t\tfoo->receiverClass = (longAt(rcvr - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\t\t\t\tgoto l47;\r\t\t\t\t} else {\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\toop2 = foo->specialObjectsOop;\r\t\t\t\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\t\t\t\tfoo->receiverClass = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tgoto l47;\r\t\t\t\t}\r\t\t\tl47:\t/* end fetchClassOf: */;\r\t\t\t\tgoto commonSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(134)\r\t\t\t/* secondExtendedSendBytecode */\r\t\t\t{\r\t\t\t\tsqInt descriptor;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tdescriptor = byteAtPointer(++localIP);\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + (((descriptor & 63) + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((usqInt) descriptor) >> 6;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(135)\r\t\t\t/* popStackBytecode */\r\t\t\t{\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(136)\r\t\t\t/* duplicateTopBytecode */\r\t\t\t{\r\t\t\t\tsqInt object;\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin internalPush: */\r\t\t\t\tobject = longAtPointer(localSP);\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(137)\r\t\t\t/* pushActiveContextBytecode */\r\t\t\t{\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\tfoo->reclaimableContextCount = 0;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->activeContext);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(138)\r\t\t\t/* pushNewArrayBytecode */\r\t\t\t{\r\t\t\t\tsqInt i;\r\t\t\t\tsqInt size;\r\t\t\t\tsqInt array;\r\t\t\t\tsqInt popValues;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tsize = byteAtPointer(++localIP);\r\t\t\t\tpopValues = size > 127;\r\t\t\t\tsize = size & 127;\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\tarray = instantiateClassindexableSize(fetchPointerofObject(ClassArray, foo->specialObjectsOop), size);\r\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\tif (popValues) {\r\t\t\t\t\tfor (i = 0; i <= (size - 1); i += 1) {\r\t\t\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\t\t\tvaluePointer = longAtPointer(localSP - (((size - i) - 1) * (BYTES_PER_WORD)));\r\t\t\t\t\t\tlongAtput((array + (BASE_HEADER_SIZE)) + (i << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t\t}\r\t\t\t\t\t/* begin internalPop: */\r\t\t\t\t\tlocalSP -= size * (BYTES_PER_WORD);\r\t\t\t\t}\r\t\t\t\t/* begin internalPush: */\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, array);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(139)\r\t\t\t/* unknownBytecode */\r\t\t\t{\r\t\t\t\terror(\"Unknown bytecode\");\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(140)\r\t\t\t/* pushRemoteTempLongBytecode */\r\t\t\t{\r\t\t\t\tsqInt tempVectorIndex;\r\t\t\t\tsqInt remoteTempIndex;\r\t\t\t\tsqInt tempVector;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt object;\r\t\t\t\tremoteTempIndex = byteAtPointer(++localIP);\r\t\t\t\ttempVectorIndex = byteAtPointer(++localIP);\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushRemoteTemp:inVectorAt: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\ttempVector = longAt((oop + (BASE_HEADER_SIZE)) + ((tempVectorIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\t/* begin internalPush: */\r\t\t\t\tobject = longAt((tempVector + (BASE_HEADER_SIZE)) + (remoteTempIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(141)\r\t\t\t/* storeRemoteTempLongBytecode */\r\t\t\t{\r\t\t\t\tsqInt tempVectorIndex;\r\t\t\t\tsqInt remoteTempIndex;\r\t\t\t\tsqInt tempVector;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tremoteTempIndex = byteAtPointer(++localIP);\r\t\t\t\ttempVectorIndex = byteAtPointer(++localIP);\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin storeRemoteTemp:inVectorAt: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\ttempVector = longAt((oop + (BASE_HEADER_SIZE)) + ((tempVectorIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\tvaluePointer = longAtPointer(localSP);\r\t\t\t\tif ((((usqInt) tempVector)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\tpossibleRootStoreIntovalue(tempVector, valuePointer);\r\t\t\t\t}\r\t\t\t\tlongAtput((tempVector + (BASE_HEADER_SIZE)) + (remoteTempIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(142)\r\t\t\t/* storeAndPopRemoteTempLongBytecode */\r\t\t\t{\r\t\t\t\tsqInt tempVectorIndex;\r\t\t\t\tsqInt remoteTempIndex;\r\t\t\t\tsqInt tempVector;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\t/* begin storeRemoteTempLongBytecode */\r\t\t\t\tremoteTempIndex = byteAtPointer(++localIP);\r\t\t\t\ttempVectorIndex = byteAtPointer(++localIP);\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin storeRemoteTemp:inVectorAt: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\ttempVector = longAt((oop + (BASE_HEADER_SIZE)) + ((tempVectorIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\tvaluePointer = longAtPointer(localSP);\r\t\t\t\tif ((((usqInt) tempVector)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\tpossibleRootStoreIntovalue(tempVector, valuePointer);\r\t\t\t\t}\r\t\t\t\tlongAtput((tempVector + (BASE_HEADER_SIZE)) + (remoteTempIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(143)\r\t\t\t/* pushClosureCopyCopiedValuesBytecode */\r\t\t\t{\r\t\t\t\tsqInt numArgsNumCopied;\r\t\t\t\tsqInt numCopied;\r\t\t\t\tsqInt i;\r\t\t\t\tsqInt numArgs;\r\t\t\t\tsqInt newClosure;\r\t\t\t\tsqInt blockSize;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tsqInt initialIP;\r\t\t\t\tsqInt newClosure1;\r\t\t\t\tsqInt valuePointer1;\r\t\t\t\tif ((BYTES_PER_WORD) == 4) {\r\t\t\t\t\timageFormatVersionNumber = 6504;\r\t\t\t\t} else {\r\t\t\t\t\timageFormatVersionNumber = 68002;\r\t\t\t\t}\r\t\t\t\tnumArgsNumCopied = byteAtPointer(++localIP);\r\t\t\t\tnumArgs = numArgsNumCopied & 15;\r\t\t\t\tnumCopied = ((usqInt) numArgsNumCopied >> 4);\r\t\t\t\tblockSize = (byteAtPointer(++localIP)) << 8;\r\t\t\t\tblockSize += byteAtPointer(++localIP);\r\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t/* begin closureNumArgs:instructionPointer:numCopiedValues: */\r\t\t\t\tinitialIP = ((oopForPointer(localIP)) + 2) - (foo->method + (BASE_HEADER_SIZE));\r\t\t\t\tnewClosure1 = instantiateSmallClasssizeInBytes(fetchPointerofObject(ClassBlockClosure, foo->specialObjectsOop), ((BYTES_PER_WORD) * (ClosureFirstCopiedValueIndex + numCopied)) + (BASE_HEADER_SIZE));\r\t\t\t\tlongAtput((newClosure1 + (BASE_HEADER_SIZE)) + (ClosureStartPCIndex << (SHIFT_FOR_WORD)), ((initialIP << 1) | 1));\r\t\t\t\tlongAtput((newClosure1 + (BASE_HEADER_SIZE)) + (ClosureNumArgsIndex << (SHIFT_FOR_WORD)), ((numArgs << 1) | 1));\r\t\t\t\tnewClosure = newClosure1;\r\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tvaluePointer1 = foo->activeContext;\r\t\t\t\tlongAtput((newClosure + (BASE_HEADER_SIZE)) + (ClosureOuterContextIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\t\t\t\tfoo->reclaimableContextCount = 0;\r\t\t\t\tif (numCopied > 0) {\r\t\t\t\t\tfor (i = 0; i <= (numCopied - 1); i += 1) {\r\t\t\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\t\t\tvaluePointer = longAtPointer(localSP - (((numCopied - i) - 1) * (BYTES_PER_WORD)));\r\t\t\t\t\t\tlongAtput((newClosure + (BASE_HEADER_SIZE)) + ((i + ClosureFirstCopiedValueIndex) << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t\t}\r\t\t\t\t\t/* begin internalPop: */\r\t\t\t\t\tlocalSP -= numCopied * (BYTES_PER_WORD);\r\t\t\t\t}\r\t\t\t\tlocalIP += blockSize;\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin internalPush: */\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, newClosure);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(144)\r\t\t\t/* shortUnconditionalJump */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\t/* begin jump: */\r\t\t\t\toffset = (144 & 7) + 1;\r\t\t\t\tlocalIP = (localIP + offset) + 1;\r\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(145)\r\t\t\t/* shortUnconditionalJump */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\t/* begin jump: */\r\t\t\t\toffset = (145 & 7) + 1;\r\t\t\t\tlocalIP = (localIP + offset) + 1;\r\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(146)\r\t\t\t/* shortUnconditionalJump */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\t/* begin jump: */\r\t\t\t\toffset = (146 & 7) + 1;\r\t\t\t\tlocalIP = (localIP + offset) + 1;\r\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(147)\r\t\t\t/* shortUnconditionalJump */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\t/* begin jump: */\r\t\t\t\toffset = (147 & 7) + 1;\r\t\t\t\tlocalIP = (localIP + offset) + 1;\r\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(148)\r\t\t\t/* shortUnconditionalJump */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\t/* begin jump: */\r\t\t\t\toffset = (148 & 7) + 1;\r\t\t\t\tlocalIP = (localIP + offset) + 1;\r\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(149)\r\t\t\t/* shortUnconditionalJump */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\t/* begin jump: */\r\t\t\t\toffset = (149 & 7) + 1;\r\t\t\t\tlocalIP = (localIP + offset) + 1;\r\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(150)\r\t\t\t/* shortUnconditionalJump */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\t/* begin jump: */\r\t\t\t\toffset = (150 & 7) + 1;\r\t\t\t\tlocalIP = (localIP + offset) + 1;\r\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(151)\r\t\t\t/* shortUnconditionalJump */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\t/* begin jump: */\r\t\t\t\toffset = (151 & 7) + 1;\r\t\t\t\tlocalIP = (localIP + offset) + 1;\r\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(152)\r\t\tCASE(153)\r\t\tCASE(154)\r\t\tCASE(155)\r\t\tCASE(156)\r\t\tCASE(157)\r\t\tCASE(158)\r\t\tCASE(159)\r\t\t\t/* shortConditionalJump */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt boolean;\r\t\t\t\tsqInt oop;\r\t\t\t\t/* begin jumplfFalseBy: */\r\t\t\t\toffset = (currentBytecode & 7) + 1;\r\t\t\t\tboolean = longAtPointer(localSP);\r\t\t\t\tif (boolean == foo->falseObj) {\r\t\t\t\t\t/* begin jump: */\r\t\t\t\t\tlocalIP = (localIP + offset) + 1;\r\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t} else {\r\t\t\t\t\tif (!(boolean == foo->trueObj)) {\r\t\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t\toop = foo->specialObjectsOop;\r\t\t\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + (SelectorMustBeBoolean << (SHIFT_FOR_WORD)));\r\t\t\t\t\t\tfoo->argumentCount = 0;\r\t\t\t\t\t\tgoto normalSend;\r\t\t\t\t\t\tgoto l5;\r\t\t\t\t\t}\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t}\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\tl5:\t/* end jumplfFalseBy: */;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(160)\r\t\tCASE(161)\r\t\tCASE(162)\r\t\tCASE(163)\r\t\tCASE(164)\r\t\tCASE(165)\r\t\tCASE(166)\r\t\tCASE(167)\r\t\t\t/* longUnconditionalJump */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\toffset = (((currentBytecode & 7) - 4) * 256) + (byteAtPointer(++localIP));\r\t\t\t\tlocalIP += offset;\r\t\t\t\tif (offset < 0) {\r\t\t\t\t\t/* begin internalQuickCheckForInterrupts */\r\t\t\t\t\tif ((foo->interruptCheckCounter -= 1) <= 0) {\r\t\t\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t\t\tcheckForInterrupts();\r\t\t\t\t\t\tbrowserPluginReturnIfNeeded();\r\t\t\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(168)\r\t\tCASE(169)\r\t\tCASE(170)\r\t\tCASE(171)\r\t\t\t/* longJumpIfTrue */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt boolean;\r\t\t\t\tsqInt oop;\r\t\t\t\t/* begin jumplfTrueBy: */\r\t\t\t\toffset = ((currentBytecode & 3) * 256) + (byteAtPointer(++localIP));\r\t\t\t\tboolean = longAtPointer(localSP);\r\t\t\t\tif (boolean == foo->trueObj) {\r\t\t\t\t\t/* begin jump: */\r\t\t\t\t\tlocalIP = (localIP + offset) + 1;\r\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t} else {\r\t\t\t\t\tif (!(boolean == foo->falseObj)) {\r\t\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t\toop = foo->specialObjectsOop;\r\t\t\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + (SelectorMustBeBoolean << (SHIFT_FOR_WORD)));\r\t\t\t\t\t\tfoo->argumentCount = 0;\r\t\t\t\t\t\tgoto normalSend;\r\t\t\t\t\t\tgoto l6;\r\t\t\t\t\t}\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t}\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\tl6:\t/* end jumplfTrueBy: */;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(172)\r\t\tCASE(173)\r\t\tCASE(174)\r\t\tCASE(175)\r\t\t\t/* longJumpIfFalse */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt boolean;\r\t\t\t\tsqInt oop;\r\t\t\t\t/* begin jumplfFalseBy: */\r\t\t\t\toffset = ((currentBytecode & 3) * 256) + (byteAtPointer(++localIP));\r\t\t\t\tboolean = longAtPointer(localSP);\r\t\t\t\tif (boolean == foo->falseObj) {\r\t\t\t\t\t/* begin jump: */\r\t\t\t\t\tlocalIP = (localIP + offset) + 1;\r\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t} else {\r\t\t\t\t\tif (!(boolean == foo->trueObj)) {\r\t\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t\toop = foo->specialObjectsOop;\r\t\t\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + (SelectorMustBeBoolean << (SHIFT_FOR_WORD)));\r\t\t\t\t\t\tfoo->argumentCount = 0;\r\t\t\t\t\t\tgoto normalSend;\r\t\t\t\t\t\tgoto l7;\r\t\t\t\t\t}\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t}\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\tl7:\t/* end jumplfFalseBy: */;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(176)\r\t\t\t/* bytecodePrimAdd */\r\t\t\t{\r\t\t\t\tsqInt arg;\r\t\t\t\tsqInt result;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\trcvr = longAtPointer(localSP - (1 * (BYTES_PER_WORD)));\r\t\t\t\targ = longAtPointer(localSP - (0 * (BYTES_PER_WORD)));\r\t\t\t\tif (((rcvr & arg) & 1) != 0) {\r\t\t\t\t\tresult = ((rcvr >> 1)) + ((arg >> 1));\r\t\t\t\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t\t\t\t(((((int) result)) ^ ((((int) result)) << 1)) >= 0)\r# else\r\t\t\t\t\t\t((result >= -1073741824) && (result <= 1073741823))\r# endif  // SQ_HOST32\r\t\t\t\t\t) {\r\t\t\t\t\t\t/* begin internalPop:thenPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP -= (2 - 1) * (BYTES_PER_WORD), ((result << 1) | 1));\r\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\tgoto l8;\r\t\t\t\t\t}\r\t\t\t\t} else {\r\t\t\t\t\tfoo->successFlag = 1;\r\t\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t\tprimitiveFloatAddtoArg(rcvr, arg);\r\t\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\tgoto l8;\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((0 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl8:\t/* end case */;\r\t\t\tBREAK;\r\t\tCASE(177)\r\t\t\t/* bytecodePrimSubtract */\r\t\t\t{\r\t\t\t\tsqInt arg;\r\t\t\t\tsqInt result;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\trcvr = longAtPointer(localSP - (1 * (BYTES_PER_WORD)));\r\t\t\t\targ = longAtPointer(localSP - (0 * (BYTES_PER_WORD)));\r\t\t\t\tif (((rcvr & arg) & 1) != 0) {\r\t\t\t\t\tresult = ((rcvr >> 1)) - ((arg >> 1));\r\t\t\t\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t\t\t\t(((((int) result)) ^ ((((int) result)) << 1)) >= 0)\r# else\r\t\t\t\t\t\t((result >= -1073741824) && (result <= 1073741823))\r# endif  // SQ_HOST32\r\t\t\t\t\t) {\r\t\t\t\t\t\t/* begin internalPop:thenPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP -= (2 - 1) * (BYTES_PER_WORD), ((result << 1) | 1));\r\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\tgoto l9;\r\t\t\t\t\t}\r\t\t\t\t} else {\r\t\t\t\t\tfoo->successFlag = 1;\r\t\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t\tprimitiveFloatSubtractfromArg(rcvr, arg);\r\t\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\tgoto l9;\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((1 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl9:\t/* end case */;\r\t\t\tBREAK;\r\t\tCASE(178)\r\t\t\t/* bytecodePrimLessThan */\r\t\t\t{\r\t\t\t\tsqInt arg;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt aBool;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt bytecode;\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt bytecode1;\r\t\t\t\tsqInt offset1;\r\t\t\t\tsqInt bytecode2;\r\t\t\t\tsqInt offset2;\r\t\t\t\trcvr = longAtPointer(localSP - (1 * (BYTES_PER_WORD)));\r\t\t\t\targ = longAtPointer(localSP - (0 * (BYTES_PER_WORD)));\r\t\t\t\tif (((rcvr & arg) & 1) != 0) {\r\t\t\t\t\t;\r\t\t\t\t\t/* begin booleanCheat: */\r\t\t\t\t\tbytecode1 = byteAtPointer(++localIP);\r\t\t\t\t\t/* begin internalPop: */\r\t\t\t\t\tlocalSP -= 2 * (BYTES_PER_WORD);\r\t\t\t\t\tif ((bytecode1 < 160) && (bytecode1 > 151)) {\r\t\t\t\t\t\tif (rcvr < arg) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l10;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + (bytecode1 - 151)) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l10;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tif (bytecode1 == 172) {\r\t\t\t\t\t\toffset1 = byteAtPointer(++localIP);\r\t\t\t\t\t\tif (rcvr < arg) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l10;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + offset1) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l10;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tlocalIP -= 1;\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tif (rcvr < arg) {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->trueObj);\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->falseObj);\r\t\t\t\t\t}\r\t\t\t\t\tgoto l10;\r\t\t\t\t}\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\taBool = primitiveFloatLessthanArg(rcvr, arg);\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin booleanCheat: */\r\t\t\t\t\tbytecode2 = byteAtPointer(++localIP);\r\t\t\t\t\t/* begin internalPop: */\r\t\t\t\t\tlocalSP -= 2 * (BYTES_PER_WORD);\r\t\t\t\t\tif ((bytecode2 < 160) && (bytecode2 > 151)) {\r\t\t\t\t\t\tif (aBool) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l10;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + (bytecode2 - 151)) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l10;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tif (bytecode2 == 172) {\r\t\t\t\t\t\toffset2 = byteAtPointer(++localIP);\r\t\t\t\t\t\tif (aBool) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l10;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + offset2) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l10;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tlocalIP -= 1;\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tif (aBool) {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->trueObj);\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->falseObj);\r\t\t\t\t\t}\r\t\t\t\t\tgoto l10;\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((2 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl10:\t/* end case */;\r\t\t\tBREAK;\r\t\tCASE(179)\r\t\t\t/* bytecodePrimGreaterThan */\r\t\t\t{\r\t\t\t\tsqInt arg;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt aBool;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt bytecode;\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt bytecode1;\r\t\t\t\tsqInt offset1;\r\t\t\t\tsqInt bytecode2;\r\t\t\t\tsqInt offset2;\r\t\t\t\trcvr = longAtPointer(localSP - (1 * (BYTES_PER_WORD)));\r\t\t\t\targ = longAtPointer(localSP - (0 * (BYTES_PER_WORD)));\r\t\t\t\tif (((rcvr & arg) & 1) != 0) {\r\t\t\t\t\t;\r\t\t\t\t\t/* begin booleanCheat: */\r\t\t\t\t\tbytecode1 = byteAtPointer(++localIP);\r\t\t\t\t\t/* begin internalPop: */\r\t\t\t\t\tlocalSP -= 2 * (BYTES_PER_WORD);\r\t\t\t\t\tif ((bytecode1 < 160) && (bytecode1 > 151)) {\r\t\t\t\t\t\tif (rcvr > arg) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l11;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + (bytecode1 - 151)) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l11;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tif (bytecode1 == 172) {\r\t\t\t\t\t\toffset1 = byteAtPointer(++localIP);\r\t\t\t\t\t\tif (rcvr > arg) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l11;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + offset1) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l11;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tlocalIP -= 1;\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tif (rcvr > arg) {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->trueObj);\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->falseObj);\r\t\t\t\t\t}\r\t\t\t\t\tgoto l11;\r\t\t\t\t}\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\taBool = primitiveFloatGreaterthanArg(rcvr, arg);\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin booleanCheat: */\r\t\t\t\t\tbytecode2 = byteAtPointer(++localIP);\r\t\t\t\t\t/* begin internalPop: */\r\t\t\t\t\tlocalSP -= 2 * (BYTES_PER_WORD);\r\t\t\t\t\tif ((bytecode2 < 160) && (bytecode2 > 151)) {\r\t\t\t\t\t\tif (aBool) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l11;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + (bytecode2 - 151)) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l11;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tif (bytecode2 == 172) {\r\t\t\t\t\t\toffset2 = byteAtPointer(++localIP);\r\t\t\t\t\t\tif (aBool) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l11;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + offset2) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l11;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tlocalIP -= 1;\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tif (aBool) {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->trueObj);\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->falseObj);\r\t\t\t\t\t}\r\t\t\t\t\tgoto l11;\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((3 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl11:\t/* end case */;\r\t\t\tBREAK;\r\t\tCASE(180)\r\t\t\t/* bytecodePrimLessOrEqual */\r\t\t\t{\r\t\t\t\tsqInt arg;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt aBool;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt bytecode;\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt bytecode1;\r\t\t\t\tsqInt offset1;\r\t\t\t\tsqInt bytecode2;\r\t\t\t\tsqInt offset2;\r\t\t\t\trcvr = longAtPointer(localSP - (1 * (BYTES_PER_WORD)));\r\t\t\t\targ = longAtPointer(localSP - (0 * (BYTES_PER_WORD)));\r\t\t\t\tif (((rcvr & arg) & 1) != 0) {\r\t\t\t\t\t;\r\t\t\t\t\t/* begin booleanCheat: */\r\t\t\t\t\tbytecode1 = byteAtPointer(++localIP);\r\t\t\t\t\t/* begin internalPop: */\r\t\t\t\t\tlocalSP -= 2 * (BYTES_PER_WORD);\r\t\t\t\t\tif ((bytecode1 < 160) && (bytecode1 > 151)) {\r\t\t\t\t\t\tif (rcvr <= arg) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l12;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + (bytecode1 - 151)) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l12;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tif (bytecode1 == 172) {\r\t\t\t\t\t\toffset1 = byteAtPointer(++localIP);\r\t\t\t\t\t\tif (rcvr <= arg) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l12;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + offset1) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l12;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tlocalIP -= 1;\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tif (rcvr <= arg) {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->trueObj);\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->falseObj);\r\t\t\t\t\t}\r\t\t\t\t\tgoto l12;\r\t\t\t\t}\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\taBool = primitiveFloatLessOrEqualtoArg(rcvr, arg);\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin booleanCheat: */\r\t\t\t\t\tbytecode2 = byteAtPointer(++localIP);\r\t\t\t\t\t/* begin internalPop: */\r\t\t\t\t\tlocalSP -= 2 * (BYTES_PER_WORD);\r\t\t\t\t\tif ((bytecode2 < 160) && (bytecode2 > 151)) {\r\t\t\t\t\t\tif (aBool) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l12;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + (bytecode2 - 151)) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l12;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tif (bytecode2 == 172) {\r\t\t\t\t\t\toffset2 = byteAtPointer(++localIP);\r\t\t\t\t\t\tif (aBool) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l12;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + offset2) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l12;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tlocalIP -= 1;\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tif (aBool) {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->trueObj);\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->falseObj);\r\t\t\t\t\t}\r\t\t\t\t\tgoto l12;\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((4 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl12:\t/* end case */;\r\t\t\tBREAK;\r\t\tCASE(181)\r\t\t\t/* bytecodePrimGreaterOrEqual */\r\t\t\t{\r\t\t\t\tsqInt arg;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt aBool;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt bytecode;\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt bytecode1;\r\t\t\t\tsqInt offset1;\r\t\t\t\tsqInt bytecode2;\r\t\t\t\tsqInt offset2;\r\t\t\t\trcvr = longAtPointer(localSP - (1 * (BYTES_PER_WORD)));\r\t\t\t\targ = longAtPointer(localSP - (0 * (BYTES_PER_WORD)));\r\t\t\t\tif (((rcvr & arg) & 1) != 0) {\r\t\t\t\t\t;\r\t\t\t\t\t/* begin booleanCheat: */\r\t\t\t\t\tbytecode1 = byteAtPointer(++localIP);\r\t\t\t\t\t/* begin internalPop: */\r\t\t\t\t\tlocalSP -= 2 * (BYTES_PER_WORD);\r\t\t\t\t\tif ((bytecode1 < 160) && (bytecode1 > 151)) {\r\t\t\t\t\t\tif (rcvr >= arg) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l13;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + (bytecode1 - 151)) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l13;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tif (bytecode1 == 172) {\r\t\t\t\t\t\toffset1 = byteAtPointer(++localIP);\r\t\t\t\t\t\tif (rcvr >= arg) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l13;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + offset1) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l13;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tlocalIP -= 1;\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tif (rcvr >= arg) {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->trueObj);\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->falseObj);\r\t\t\t\t\t}\r\t\t\t\t\tgoto l13;\r\t\t\t\t}\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\taBool = primitiveFloatGreaterOrEqualtoArg(rcvr, arg);\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin booleanCheat: */\r\t\t\t\t\tbytecode2 = byteAtPointer(++localIP);\r\t\t\t\t\t/* begin internalPop: */\r\t\t\t\t\tlocalSP -= 2 * (BYTES_PER_WORD);\r\t\t\t\t\tif ((bytecode2 < 160) && (bytecode2 > 151)) {\r\t\t\t\t\t\tif (aBool) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l13;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + (bytecode2 - 151)) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l13;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tif (bytecode2 == 172) {\r\t\t\t\t\t\toffset2 = byteAtPointer(++localIP);\r\t\t\t\t\t\tif (aBool) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l13;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + offset2) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l13;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tlocalIP -= 1;\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tif (aBool) {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->trueObj);\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->falseObj);\r\t\t\t\t\t}\r\t\t\t\t\tgoto l13;\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((5 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl13:\t/* end case */;\r\t\t\tBREAK;\r\t\tCASE(182)\r\t\t\t/* bytecodePrimEqual */\r\t\t\t{\r\t\t\t\tsqInt arg;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt aBool;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt bytecode;\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt bytecode1;\r\t\t\t\tsqInt offset1;\r\t\t\t\trcvr = longAtPointer(localSP - (1 * (BYTES_PER_WORD)));\r\t\t\t\targ = longAtPointer(localSP - (0 * (BYTES_PER_WORD)));\r\t\t\t\tif (((rcvr & arg) & 1) != 0) {\r\t\t\t\t\t/* begin booleanCheat: */\r\t\t\t\t\tbytecode = byteAtPointer(++localIP);\r\t\t\t\t\t/* begin internalPop: */\r\t\t\t\t\tlocalSP -= 2 * (BYTES_PER_WORD);\r\t\t\t\t\tif ((bytecode < 160) && (bytecode > 151)) {\r\t\t\t\t\t\tif (rcvr == arg) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l14;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + (bytecode - 151)) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l14;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tif (bytecode == 172) {\r\t\t\t\t\t\toffset = byteAtPointer(++localIP);\r\t\t\t\t\t\tif (rcvr == arg) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l14;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + offset) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l14;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tlocalIP -= 1;\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tif (rcvr == arg) {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->trueObj);\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->falseObj);\r\t\t\t\t\t}\r\t\t\t\t\tgoto l14;\r\t\t\t\t}\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\taBool = primitiveFloatEqualtoArg(rcvr, arg);\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin booleanCheat: */\r\t\t\t\t\tbytecode1 = byteAtPointer(++localIP);\r\t\t\t\t\t/* begin internalPop: */\r\t\t\t\t\tlocalSP -= 2 * (BYTES_PER_WORD);\r\t\t\t\t\tif ((bytecode1 < 160) && (bytecode1 > 151)) {\r\t\t\t\t\t\tif (aBool) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l14;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + (bytecode1 - 151)) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l14;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tif (bytecode1 == 172) {\r\t\t\t\t\t\toffset1 = byteAtPointer(++localIP);\r\t\t\t\t\t\tif (aBool) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l14;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + offset1) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l14;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tlocalIP -= 1;\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tif (aBool) {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->trueObj);\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->falseObj);\r\t\t\t\t\t}\r\t\t\t\t\tgoto l14;\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((6 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl14:\t/* end case */;\r\t\t\tBREAK;\r\t\tCASE(183)\r\t\t\t/* bytecodePrimNotEqual */\r\t\t\t{\r\t\t\t\tsqInt arg;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt aBool;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt bytecode;\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt bytecode1;\r\t\t\t\tsqInt offset1;\r\t\t\t\trcvr = longAtPointer(localSP - (1 * (BYTES_PER_WORD)));\r\t\t\t\targ = longAtPointer(localSP - (0 * (BYTES_PER_WORD)));\r\t\t\t\tif (((rcvr & arg) & 1) != 0) {\r\t\t\t\t\t/* begin booleanCheat: */\r\t\t\t\t\tbytecode = byteAtPointer(++localIP);\r\t\t\t\t\t/* begin internalPop: */\r\t\t\t\t\tlocalSP -= 2 * (BYTES_PER_WORD);\r\t\t\t\t\tif ((bytecode < 160) && (bytecode > 151)) {\r\t\t\t\t\t\tif (rcvr != arg) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l15;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + (bytecode - 151)) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l15;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tif (bytecode == 172) {\r\t\t\t\t\t\toffset = byteAtPointer(++localIP);\r\t\t\t\t\t\tif (rcvr != arg) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l15;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + offset) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l15;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tlocalIP -= 1;\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tif (rcvr != arg) {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->trueObj);\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->falseObj);\r\t\t\t\t\t}\r\t\t\t\t\tgoto l15;\r\t\t\t\t}\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\taBool = primitiveFloatEqualtoArg(rcvr, arg);\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin booleanCheat: */\r\t\t\t\t\tbytecode1 = byteAtPointer(++localIP);\r\t\t\t\t\t/* begin internalPop: */\r\t\t\t\t\tlocalSP -= 2 * (BYTES_PER_WORD);\r\t\t\t\t\tif ((bytecode1 < 160) && (bytecode1 > 151)) {\r\t\t\t\t\t\tif (!aBool) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l15;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + (bytecode1 - 151)) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l15;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tif (bytecode1 == 172) {\r\t\t\t\t\t\toffset1 = byteAtPointer(++localIP);\r\t\t\t\t\t\tif (!aBool) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l15;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + offset1) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l15;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tlocalIP -= 1;\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tif (!aBool) {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->trueObj);\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->falseObj);\r\t\t\t\t\t}\r\t\t\t\t\tgoto l15;\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((7 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl15:\t/* end case */;\r\t\t\tBREAK;\r\t\tCASE(184)\r\t\t\t/* bytecodePrimMultiply */\r\t\t\t{\r\t\t\t\tsqInt arg;\r\t\t\t\tsqInt result;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\trcvr = longAtPointer(localSP - (1 * (BYTES_PER_WORD)));\r\t\t\t\targ = longAtPointer(localSP - (0 * (BYTES_PER_WORD)));\r\t\t\t\tif (((rcvr & arg) & 1) != 0) {\r\t\t\t\t\trcvr = (rcvr >> 1);\r\t\t\t\t\targ = (arg >> 1);\r\t\t\t\t\tresult = rcvr * arg;\r\t\t\t\t\tif (((arg == 0) || ((result / arg) == rcvr)) && (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t(((((int) result)) ^ ((((int) result)) << 1)) >= 0)\r# else\r\t((result >= -1073741824) && (result <= 1073741823))\r# endif  // SQ_HOST32\r)) {\r\t\t\t\t\t\t/* begin internalPop:thenPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP -= (2 - 1) * (BYTES_PER_WORD), ((result << 1) | 1));\r\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\tgoto l16;\r\t\t\t\t\t}\r\t\t\t\t} else {\r\t\t\t\t\tfoo->successFlag = 1;\r\t\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t\tprimitiveFloatMultiplybyArg(rcvr, arg);\r\t\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\tgoto l16;\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((8 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl16:\t/* end case */;\r\t\t\tBREAK;\r\t\tCASE(185)\r\t\t\t/* bytecodePrimDivide */\r\t\t\t{\r\t\t\t\tsqInt arg;\r\t\t\t\tsqInt result;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\trcvr = longAtPointer(localSP - (1 * (BYTES_PER_WORD)));\r\t\t\t\targ = longAtPointer(localSP - (0 * (BYTES_PER_WORD)));\r\t\t\t\tif (((rcvr & arg) & 1) != 0) {\r\t\t\t\t\trcvr = (rcvr >> 1);\r\t\t\t\t\targ = (arg >> 1);\r\t\t\t\t\tif ((arg != 0) && ((rcvr % arg) == 0)) {\r\t\t\t\t\t\tresult = rcvr / arg;\r\t\t\t\t\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t\t\t\t\t(((((int) result)) ^ ((((int) result)) << 1)) >= 0)\r# else\r\t\t\t\t\t\t\t((result >= -1073741824) && (result <= 1073741823))\r# endif  // SQ_HOST32\r\t\t\t\t\t\t) {\r\t\t\t\t\t\t\t/* begin internalPop:thenPush: */\r\t\t\t\t\t\t\tlongAtPointerput(localSP -= (2 - 1) * (BYTES_PER_WORD), ((result << 1) | 1));\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l17;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t} else {\r\t\t\t\t\tfoo->successFlag = 1;\r\t\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t\tprimitiveFloatDividebyArg(rcvr, arg);\r\t\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\tgoto l17;\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((9 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl17:\t/* end case */;\r\t\t\tBREAK;\r\t\tCASE(186)\r\t\t\t/* bytecodePrimMod */\r\t\t\t{\r\t\t\t\tsqInt mod;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\tmod = doPrimitiveModby(longAtPointer(localSP - (1 * (BYTES_PER_WORD))), longAtPointer(localSP - (0 * (BYTES_PER_WORD))));\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin internalPop:thenPush: */\r\t\t\t\t\tlongAtPointerput(localSP -= (2 - 1) * (BYTES_PER_WORD), ((mod << 1) | 1));\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tgoto l18;\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((10 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl18:\t/* end case */;\r\t\t\tBREAK;\r\t\tCASE(187)\r\t\t\t/* bytecodePrimMakePoint */\r\t\t\t{\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt argument;\r\t\t\t\tsqInt pt;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt pointResult;\r\t\t\t\tsqInt pointResult1;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tsqInt pointResult2;\r\t\t\t\tsqInt valuePointer1;\r\t\t\t\tsqInt valuePointer2;\r\t\t\t\tsqInt sp;\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t/* begin primitiveMakePoint */\r\t\t\t\targument = longAt(foo->stackPointer);\r\t\t\t\trcvr = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t\t\t\tif ((rcvr & 1)) {\r\t\t\t\t\tif ((argument & 1)) {\r\t\t\t\t\t\t/* begin makePointwithxValue:yValue: */\r\t\t\t\t\t\tpointResult = instantiateSmallClasssizeInBytes(fetchPointerofObject(ClassPoint, foo->specialObjectsOop), 3 * (BYTES_PER_WORD));\r\t\t\t\t\t\tlongAtput((pointResult + (BASE_HEADER_SIZE)) + (XIndex << (SHIFT_FOR_WORD)), ((((rcvr >> 1)) << 1) | 1));\r\t\t\t\t\t\tlongAtput((pointResult + (BASE_HEADER_SIZE)) + (YIndex << (SHIFT_FOR_WORD)), ((((argument >> 1)) << 1) | 1));\r\t\t\t\t\t\tpt = pointResult;\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin makePointwithxValue:yValue: */\r\t\t\t\t\t\tpointResult1 = instantiateSmallClasssizeInBytes(fetchPointerofObject(ClassPoint, foo->specialObjectsOop), 3 * (BYTES_PER_WORD));\r\t\t\t\t\t\tlongAtput((pointResult1 + (BASE_HEADER_SIZE)) + (XIndex << (SHIFT_FOR_WORD)), ((((rcvr >> 1)) << 1) | 1));\r\t\t\t\t\t\tlongAtput((pointResult1 + (BASE_HEADER_SIZE)) + (YIndex << (SHIFT_FOR_WORD)), ((0 << 1) | 1));\r\t\t\t\t\t\tpt = pointResult1;\r\t\t\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\t\t\tvaluePointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t\t\t\t\t\tif ((((usqInt) pt)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\t\tpossibleRootStoreIntovalue(pt, valuePointer);\r\t\t\t\t\t\t}\r\t\t\t\t\t\tlongAtput((pt + (BASE_HEADER_SIZE)) + (1 << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t\t}\r\t\t\t\t} else {\r\t\t\t\t\tif (!((fetchClassOf(rcvr)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop)))) {\r\t\t\t\t\t\t/* begin success: */\r\t\t\t\t\t\tfoo->successFlag = 0 && foo->successFlag;\r\t\t\t\t\t\tgoto l20;\r\t\t\t\t\t}\r\t\t\t\t\t/* begin makePointwithxValue:yValue: */\r\t\t\t\t\tpointResult2 = instantiateSmallClasssizeInBytes(fetchPointerofObject(ClassPoint, foo->specialObjectsOop), 3 * (BYTES_PER_WORD));\r\t\t\t\t\tlongAtput((pointResult2 + (BASE_HEADER_SIZE)) + (XIndex << (SHIFT_FOR_WORD)), ((0 << 1) | 1));\r\t\t\t\t\tlongAtput((pointResult2 + (BASE_HEADER_SIZE)) + (YIndex << (SHIFT_FOR_WORD)), ((0 << 1) | 1));\r\t\t\t\t\tpt = pointResult2;\r\t\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\t\tvaluePointer1 = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t\t\t\t\tif ((((usqInt) pt)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\tpossibleRootStoreIntovalue(pt, valuePointer1);\r\t\t\t\t\t}\r\t\t\t\t\tlongAtput((pt + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)), valuePointer1);\r\t\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\t\tvaluePointer2 = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t\t\t\t\tif ((((usqInt) pt)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\tpossibleRootStoreIntovalue(pt, valuePointer2);\r\t\t\t\t\t}\r\t\t\t\t\tlongAtput((pt + (BASE_HEADER_SIZE)) + (1 << (SHIFT_FOR_WORD)), valuePointer2);\r\t\t\t\t}\r\t\t\t\t/* begin pop:thenPush: */\r\t\t\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), pt);\r\t\t\t\tfoo->stackPointer = sp;\r\t\t\tl20:\t/* end primitiveMakePoint */;\r\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tgoto l19;\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((11 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl19:\t/* end case */;\r\t\t\tBREAK;\r\t\tCASE(188)\r\t\t\t/* bytecodePrimBitShift */\r\t\t\t{\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt integerArgument;\r\t\t\t\tsqInt shifted;\r\t\t\t\tsqInt integerReceiver;\r\t\t\t\tsqInt integerPointer;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt sp;\r\t\t\t\tsqInt top;\r\t\t\t\tsqInt top2;\r\t\t\t\tsqInt top1;\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t/* begin primitiveBitShift */\r\t\t\t\t/* begin popInteger */\r\t\t\t\t/* begin popStack */\r\t\t\t\ttop = longAt(foo->stackPointer);\r\t\t\t\tfoo->stackPointer -= BYTES_PER_WORD;\r\t\t\t\tintegerPointer = top;\r\t\t\t\t/* begin checkedIntegerValueOf: */\r\t\t\t\tif ((integerPointer & 1)) {\r\t\t\t\t\tintegerArgument = (integerPointer >> 1);\r\t\t\t\t\tgoto l22;\r\t\t\t\t} else {\r\t\t\t\t\t/* begin primitiveFail */\r\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t\tintegerArgument = 0;\r\t\t\t\t\tgoto l22;\r\t\t\t\t}\r\t\t\tl22:\t/* end checkedIntegerValueOf: */;\r\t\t\t\t/* begin popPos32BitInteger */\r\t\t\t\t/* begin popStack */\r\t\t\t\ttop1 = longAt(foo->stackPointer);\r\t\t\t\tfoo->stackPointer -= BYTES_PER_WORD;\r\t\t\t\ttop2 = top1;\r\t\t\t\tintegerReceiver = positive32BitValueOf(top2);\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\tif (integerArgument >= 0) {\r\t\t\t\t\t\t/* begin success: */\r\t\t\t\t\t\tfoo->successFlag = (integerArgument <= 31) && foo->successFlag;\r\t\t\t\t\t\tshifted = integerReceiver << integerArgument;\r\t\t\t\t\t\t/* begin success: */\r\t\t\t\t\t\tfoo->successFlag = ((((usqInt) shifted) >> integerArgument) == integerReceiver) && foo->successFlag;\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin success: */\r\t\t\t\t\t\tfoo->successFlag = (integerArgument >= -31) && foo->successFlag;\r\t\t\t\t\t\tshifted = ((integerArgument < 0) ? ((usqInt) integerReceiver >> -integerArgument) : ((usqInt) integerReceiver << integerArgument));\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin push: */\r\t\t\t\t\tobject = positive32BitIntegerFor(shifted);\r\t\t\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\t\t\t\t\tfoo->stackPointer = sp;\r\t\t\t\t} else {\r\t\t\t\t\t/* begin unPop: */\r\t\t\t\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t\t\t\t}\r\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tgoto l21;\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((12 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl21:\t/* end case */;\r\t\t\tBREAK;\r\t\tCASE(189)\r\t\t\t/* bytecodePrimDiv */\r\t\t\t{\r\t\t\t\tsqInt quotient;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\tquotient = doPrimitiveDivby(longAtPointer(localSP - (1 * (BYTES_PER_WORD))), longAtPointer(localSP - (0 * (BYTES_PER_WORD))));\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin internalPop:thenPush: */\r\t\t\t\t\tlongAtPointerput(localSP -= (2 - 1) * (BYTES_PER_WORD), ((quotient << 1) | 1));\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tgoto l23;\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((13 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl23:\t/* end case */;\r\t\t\tBREAK;\r\t\tCASE(190)\r\t\t\t/* bytecodePrimBitAnd */\r\t\t\t{\r\t\t\t\tsqInt integerArgument;\r\t\t\t\tsqInt integerReceiver;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt sp;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt top;\r\t\t\t\tsqInt top1;\r\t\t\t\tsqInt top2;\r\t\t\t\tsqInt top11;\r\t\t\t\tsqInt oop1;\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t/* begin primitiveBitAnd */\r\t\t\t\t/* begin popPos32BitInteger */\r\t\t\t\t/* begin popStack */\r\t\t\t\ttop1 = longAt(foo->stackPointer);\r\t\t\t\tfoo->stackPointer -= BYTES_PER_WORD;\r\t\t\t\ttop = top1;\r\t\t\t\tintegerArgument = positive32BitValueOf(top);\r\t\t\t\t/* begin popPos32BitInteger */\r\t\t\t\t/* begin popStack */\r\t\t\t\ttop11 = longAt(foo->stackPointer);\r\t\t\t\tfoo->stackPointer -= BYTES_PER_WORD;\r\t\t\t\ttop2 = top11;\r\t\t\t\tintegerReceiver = positive32BitValueOf(top2);\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin push: */\r\t\t\t\t\tobject = positive32BitIntegerFor(integerReceiver & integerArgument);\r\t\t\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\t\t\t\t\tfoo->stackPointer = sp;\r\t\t\t\t} else {\r\t\t\t\t\t/* begin unPop: */\r\t\t\t\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t\t\t\t}\r\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tgoto l24;\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((14 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl24:\t/* end case */;\r\t\t\tBREAK;\r\t\tCASE(191)\r\t\t\t/* bytecodePrimBitOr */\r\t\t\t{\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt integerArgument;\r\t\t\t\tsqInt integerReceiver;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt sp;\r\t\t\t\tsqInt top;\r\t\t\t\tsqInt top1;\r\t\t\t\tsqInt top2;\r\t\t\t\tsqInt top11;\r\t\t\t\tsqInt oop1;\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t/* begin primitiveBitOr */\r\t\t\t\t/* begin popPos32BitInteger */\r\t\t\t\t/* begin popStack */\r\t\t\t\ttop1 = longAt(foo->stackPointer);\r\t\t\t\tfoo->stackPointer -= BYTES_PER_WORD;\r\t\t\t\ttop = top1;\r\t\t\t\tintegerArgument = positive32BitValueOf(top);\r\t\t\t\t/* begin popPos32BitInteger */\r\t\t\t\t/* begin popStack */\r\t\t\t\ttop11 = longAt(foo->stackPointer);\r\t\t\t\tfoo->stackPointer -= BYTES_PER_WORD;\r\t\t\t\ttop2 = top11;\r\t\t\t\tintegerReceiver = positive32BitValueOf(top2);\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin push: */\r\t\t\t\t\tobject = positive32BitIntegerFor(integerReceiver | integerArgument);\r\t\t\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\t\t\t\t\tfoo->stackPointer = sp;\r\t\t\t\t} else {\r\t\t\t\t\t/* begin unPop: */\r\t\t\t\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t\t\t\t}\r\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tgoto l25;\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((15 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl25:\t/* end case */;\r\t\t\tBREAK;\r\t\tCASE(192)\r\t\t\t/* bytecodePrimAt */\r\t\t\t{\r\t\t\t\tsqInt result;\r\t\t\t\tsqInt atIx;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt index;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt result1;\r\t\t\t\tsqInt fmt;\r\t\t\t\tsqInt fixedFields;\r\t\t\t\tsqInt stSize;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt oop2;\r\t\t\t\tsqInt oop11;\r\t\t\t\tindex = longAtPointer(localSP);\r\t\t\t\trcvr = longAtPointer(localSP - (1 * (BYTES_PER_WORD)));\r\t\t\t\tfoo->successFlag = (!((rcvr & 1))) && ((index & 1));\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\tatIx = rcvr & AtCacheMask;\r\t\t\t\t\tif ((foo->atCache[atIx + AtCacheOop]) == rcvr) {\r\t\t\t\t\t\t/* begin commonVariableInternal:at:cacheIndex: */\r\t\t\t\t\t\tstSize = foo->atCache[atIx + AtCacheSize];\r\t\t\t\t\t\tif (((((usqInt) ((index >> 1)))) >= (((usqInt) 1))) && ((((usqInt) ((index >> 1)))) <= (((usqInt) stSize)))) {\r\t\t\t\t\t\t\tfmt = foo->atCache[atIx + AtCacheFmt];\r\t\t\t\t\t\t\tif (fmt <= 4) {\r\t\t\t\t\t\t\t\tfixedFields = foo->atCache[atIx + AtCacheFixedFields];\r\t\t\t\t\t\t\t\tresult = longAt((rcvr + (BASE_HEADER_SIZE)) + (((((index >> 1)) + fixedFields) - 1) << (SHIFT_FOR_WORD)));\r\t\t\t\t\t\t\t\tgoto l27;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\tif (fmt < 8) {\r\t\t\t\t\t\t\t\tresult1 = long32At((rcvr + (BASE_HEADER_SIZE)) + ((((index >> 1)) - 1) << 2));\r\t\t\t\t\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\t\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\t\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\t\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t\t\t\t\tresult1 = positive32BitIntegerFor(result1);\r\t\t\t\t\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\t\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\t\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\t\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\t\t\t\t\tresult = result1;\r\t\t\t\t\t\t\t\tgoto l27;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\tif (fmt >= 16) {\r\t\t\t\t\t\t\t\t/* begin characterForAscii: */\r\t\t\t\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t\t\t\toop11 = foo->specialObjectsOop;\r\t\t\t\t\t\t\t\toop2 = longAt((oop11 + (BASE_HEADER_SIZE)) + (CharacterTable << (SHIFT_FOR_WORD)));\r\t\t\t\t\t\t\t\tresult = longAt((oop2 + (BASE_HEADER_SIZE)) + ((byteAt((rcvr + (BASE_HEADER_SIZE)) + (((index >> 1)) - 1))) << (SHIFT_FOR_WORD)));\r\t\t\t\t\t\t\t\tgoto l27;\r\t\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t\tresult = (((byteAt((rcvr + (BASE_HEADER_SIZE)) + (((index >> 1)) - 1))) << 1) | 1);\r\t\t\t\t\t\t\t\tgoto l27;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t}\r\t\t\t\t\t\t/* begin primitiveFail */\r\t\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t\tl27:\t/* end commonVariableInternal:at:cacheIndex: */;\r\t\t\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\t/* begin internalPop:thenPush: */\r\t\t\t\t\t\t\tlongAtPointerput(localSP -= (2 - 1) * (BYTES_PER_WORD), result);\r\t\t\t\t\t\t\tgoto l26;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((16 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl26:\t/* end case */;\r\t\t\tBREAK;\r\t\tCASE(193)\r\t\t\t/* bytecodePrimAtPut */\r\t\t\t{\r\t\t\t\tsqInt value;\r\t\t\t\tsqInt atIx;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt index;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt valToPut;\r\t\t\t\tsqInt fmt;\r\t\t\t\tsqInt fixedFields;\r\t\t\t\tsqInt stSize;\r\t\t\t\tvalue = longAtPointer(localSP);\r\t\t\t\tindex = longAtPointer(localSP - (1 * (BYTES_PER_WORD)));\r\t\t\t\trcvr = longAtPointer(localSP - (2 * (BYTES_PER_WORD)));\r\t\t\t\tfoo->successFlag = (!((rcvr & 1))) && ((index & 1));\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\tatIx = (rcvr & AtCacheMask) + AtPutBase;\r\t\t\t\t\tif ((foo->atCache[atIx + AtCacheOop]) == rcvr) {\r\t\t\t\t\t\t/* begin commonVariable:at:put:cacheIndex: */\r\t\t\t\t\t\tstSize = foo->atCache[atIx + AtCacheSize];\r\t\t\t\t\t\tif (((((usqInt) ((index >> 1)))) >= (((usqInt) 1))) && ((((usqInt) ((index >> 1)))) <= (((usqInt) stSize)))) {\r\t\t\t\t\t\t\tfmt = foo->atCache[atIx + AtCacheFmt];\r\t\t\t\t\t\t\tif (fmt <= 4) {\r\t\t\t\t\t\t\t\tfixedFields = foo->atCache[atIx + AtCacheFixedFields];\r\t\t\t\t\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\t\t\t\t\tif ((((usqInt) rcvr)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\t\t\t\tpossibleRootStoreIntovalue(rcvr, value);\r\t\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (((((index >> 1)) + fixedFields) - 1) << (SHIFT_FOR_WORD)), value);\r\t\t\t\t\t\t\t\tgoto l29;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\tif (fmt < 8) {\r\t\t\t\t\t\t\t\tvalToPut = positive32BitValueOf(value);\r\t\t\t\t\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t\t\t\t\tlong32Atput((rcvr + (BASE_HEADER_SIZE)) + ((((index >> 1)) - 1) << 2), valToPut);\r\t\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\t\tgoto l29;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\tif (fmt >= 16) {\r\t\t\t\t\t\t\t\tvalToPut = asciiOfCharacter(value);\r\t\t\t\t\t\t\t\tif (!(foo->successFlag)) {\r\t\t\t\t\t\t\t\t\tgoto l29;\r\t\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t\tvalToPut = value;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\tif ((valToPut & 1)) {\r\t\t\t\t\t\t\t\tvalToPut = (valToPut >> 1);\r\t\t\t\t\t\t\t\tif (!((valToPut >= 0) && (valToPut <= 255))) {\r\t\t\t\t\t\t\t\t\t/* begin primitiveFail */\r\t\t\t\t\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t\t\t\t\t\tgoto l29;\r\t\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\t\tbyteAtput((rcvr + (BASE_HEADER_SIZE)) + (((index >> 1)) - 1), valToPut);\r\t\t\t\t\t\t\t\tgoto l29;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t}\r\t\t\t\t\t\t/* begin primitiveFail */\r\t\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t\tl29:\t/* end commonVariable:at:put:cacheIndex: */;\r\t\t\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\t/* begin internalPop:thenPush: */\r\t\t\t\t\t\t\tlongAtPointerput(localSP -= (3 - 1) * (BYTES_PER_WORD), value);\r\t\t\t\t\t\t\tgoto l28;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((17 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 2;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl28:\t/* end case */;\r\t\t\tBREAK;\r\t\tCASE(194)\r\t\t\t/* bytecodePrimSize */\r\t\t\t{\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((18 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 0;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(195)\r\t\t\t/* bytecodePrimNext */\r\t\t\t{\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((19 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 0;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(196)\r\t\t\t/* bytecodePrimNextPut */\r\t\t\t{\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((20 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(197)\r\t\t\t/* bytecodePrimAtEnd */\r\t\t\t{\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((21 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 0;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(198)\r\t\t\t/* bytecodePrimEquivalent */\r\t\t\t{\r\t\t\t\tsqInt arg;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt bytecode;\r\t\t\t\tsqInt offset;\r\t\t\t\trcvr = longAtPointer(localSP - (1 * (BYTES_PER_WORD)));\r\t\t\t\targ = longAtPointer(localSP - (0 * (BYTES_PER_WORD)));\r\t\t\t\t/* begin booleanCheat: */\r\t\t\t\tbytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 2 * (BYTES_PER_WORD);\r\t\t\t\tif ((bytecode < 160) && (bytecode > 151)) {\r\t\t\t\t\tif (rcvr == arg) {\r\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\tgoto l30;\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\tlocalIP = (localIP + (bytecode - 151)) + 1;\r\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\tgoto l30;\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\tif (bytecode == 172) {\r\t\t\t\t\toffset = byteAtPointer(++localIP);\r\t\t\t\t\tif (rcvr == arg) {\r\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\tgoto l30;\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\tlocalIP = (localIP + offset) + 1;\r\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\tgoto l30;\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\tlocalIP -= 1;\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\tif (rcvr == arg) {\r\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->trueObj);\r\t\t\t\t} else {\r\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->falseObj);\r\t\t\t\t}\r\t\t\tl30:\t/* end booleanCheat: */;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(199)\r\t\t\t/* bytecodePrimClass */\r\t\t\t{\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt ccIndex;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt oop2;\r\t\t\t\tsqInt oop3;\r\t\t\t\trcvr = longAtPointer(localSP);\r\t\t\t\t/* begin internalPop:thenPush: */\r\t\t\t\t/* begin fetchClassOf: */\r\t\t\t\tif ((rcvr & 1)) {\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\t\t\t\tgoto l31;\r\t\t\t\t}\r\t\t\t\tccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31;\r\t\t\t\tif (ccIndex == 0) {\r\t\t\t\t\toop = (longAt(rcvr - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\t\t\t\tgoto l31;\r\t\t\t\t} else {\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\toop3 = foo->specialObjectsOop;\r\t\t\t\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\t\t\t\toop = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tgoto l31;\r\t\t\t\t}\r\t\t\tl31:\t/* end fetchClassOf: */;\r\t\t\t\tlongAtPointerput(localSP -= (1 - 1) * (BYTES_PER_WORD), oop);\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(200)\r\t\t\t/* bytecodePrimBlockCopy */\r\t\t\t{\r\t\t\t\tsqInt hdr;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt successValue;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt methodContext;\r\t\t\t\tsqInt context;\r\t\t\t\tsqInt initialIP;\r\t\t\t\tsqInt newContext;\r\t\t\t\tsqInt contextSize;\r\t\t\t\tsqInt header;\r\t\t\t\tsqInt oop2;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tsqInt valuePointer1;\r\t\t\t\tsqInt sp;\r\t\t\t\trcvr = longAtPointer(localSP - (1 * (BYTES_PER_WORD)));\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\thdr = longAt(rcvr);\r\t\t\t\t/* begin success: */\r\t\t\t\tsuccessValue = (((((usqInt) hdr) >> 12) & 31) == 13) || ((((((usqInt) hdr) >> 12) & 31) == 14) || (((((usqInt) hdr) >> 12) & 31) == 4));\r\t\t\t\tfoo->successFlag = successValue && foo->successFlag;\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t\t/* begin primitiveBlockCopy */\r\t\t\t\t\tcontext = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t\t\t\t\tif (((longAt((context + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)))) & 1)) {\r\t\t\t\t\t\tmethodContext = longAt((context + (BASE_HEADER_SIZE)) + (HomeIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t\t} else {\r\t\t\t\t\t\tmethodContext = context;\r\t\t\t\t\t}\r\t\t\t\t\t/* begin sizeBitsOf: */\r\t\t\t\t\theader = longAt(methodContext);\r\t\t\t\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\t\t\tcontextSize = (longAt(methodContext - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\t\t\tgoto l33;\r\t\t\t\t\t} else {\r\t\t\t\t\t\tcontextSize = header & (SIZE_MASK);\r\t\t\t\t\t\tgoto l33;\r\t\t\t\t\t}\r\t\t\t\tl33:\t/* end sizeBitsOf: */;\r\t\t\t\t\tcontext = null;\r\t\t\t\t\t/* begin pushRemappableOop: */\r\t\t\t\t\tfoo->remapBuffer[foo->remapBufferCount += 1] = methodContext;\r\t\t\t\t\tnewContext = instantiateContextsizeInBytes(fetchPointerofObject(ClassBlockContext, foo->specialObjectsOop), contextSize);\r\t\t\t\t\t/* begin popRemappableOop */\r\t\t\t\t\toop2 = foo->remapBuffer[foo->remapBufferCount];\r\t\t\t\t\tfoo->remapBufferCount -= 1;\r\t\t\t\t\tmethodContext = oop2;\r\t\t\t\t\tinitialIP = (((((foo->instructionPointer + 1) + 3) - (foo->method + (BASE_HEADER_SIZE))) << 1) | 1);\r\t\t\t\t\tlongAtput((newContext + (BASE_HEADER_SIZE)) + (InitialIPIndex << (SHIFT_FOR_WORD)), initialIP);\r\t\t\t\t\tlongAtput((newContext + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), initialIP);\r\t\t\t\t\t/* begin storeStackPointerValue:inContext: */\r\t\t\t\t\tlongAtput((newContext + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)), ((0 << 1) | 1));\r\t\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\t\tvaluePointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t\t\t\t\tlongAtput((newContext + (BASE_HEADER_SIZE)) + (BlockArgumentCountIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t\tlongAtput((newContext + (BASE_HEADER_SIZE)) + (HomeIndex << (SHIFT_FOR_WORD)), methodContext);\r\t\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\t\tvaluePointer1 = foo->nilObj;\r\t\t\t\t\tlongAtput((newContext + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\t\t\t\t\t/* begin pop:thenPush: */\r\t\t\t\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), newContext);\r\t\t\t\t\tfoo->stackPointer = sp;\r\t\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\t}\r\t\t\t\tif (!(foo->successFlag)) {\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((24 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\t\tgoto normalSend;\r\t\t\t\t\tgoto l32;\r\t\t\t\t}\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t}\r;\r\t\tl32:\t/* end case */;\r\t\t\tBREAK;\r\t\tCASE(201)\r\t\t\t/* bytecodePrimValue */\r\t\t\t{\r\t\t\t\tsqInt rcvrClass;\r\t\t\t\tsqInt maybeBlock;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt ccIndex;\r\t\t\t\tsqInt oop11;\r\t\t\t\tsqInt oop2;\r\t\t\t\tmaybeBlock = longAtPointer(localSP);\r\t\t\t\tfoo->argumentCount = 0;\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\tif ((maybeBlock & 1) == 0) {\r\t\t\t\t\t/* begin fetchClassOfNonInt: */\r\t\t\t\t\tccIndex = (((usqInt) (longAt(maybeBlock))) >> 12) & 31;\r\t\t\t\t\tif (ccIndex == 0) {\r\t\t\t\t\t\trcvrClass = (longAt(maybeBlock - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\t\t\t\t\tgoto l35;\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t\toop2 = foo->specialObjectsOop;\r\t\t\t\t\t\toop11 = longAt((oop2 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\t\t\t\t\trcvrClass = longAt((oop11 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\t\t\t\t\tgoto l35;\r\t\t\t\t\t}\r\t\t\t\tl35:\t/* end fetchClassOfNonInt: */;\r\t\t\t\t\tif (rcvrClass == (fetchPointerofObject(ClassBlockClosure, foo->specialObjectsOop))) {\r\t\t\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t\t\tprimitiveClosureValue();\r\t\t\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\t\t} else {\r\t\t\t\t\t\tif (rcvrClass == (fetchPointerofObject(ClassBlockContext, foo->specialObjectsOop))) {\r\t\t\t\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t\t\t\tprimitiveValue();\r\t\t\t\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\tif (!(foo->successFlag)) {\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((25 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tgoto normalSend;\r\t\t\t\t\tgoto l34;\r\t\t\t\t}\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t}\r;\r\t\tl34:\t/* end case */;\r\t\t\tBREAK;\r\t\tCASE(202)\r\t\t\t/* bytecodePrimValueWithArg */\r\t\t\t{\r\t\t\t\tsqInt rcvrClass;\r\t\t\t\tsqInt maybeBlock;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt ccIndex;\r\t\t\t\tsqInt oop11;\r\t\t\t\tsqInt oop2;\r\t\t\t\tmaybeBlock = longAtPointer(localSP - (1 * (BYTES_PER_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\tif ((maybeBlock & 1) == 0) {\r\t\t\t\t\t/* begin fetchClassOfNonInt: */\r\t\t\t\t\tccIndex = (((usqInt) (longAt(maybeBlock))) >> 12) & 31;\r\t\t\t\t\tif (ccIndex == 0) {\r\t\t\t\t\t\trcvrClass = (longAt(maybeBlock - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\t\t\t\t\tgoto l37;\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t\toop2 = foo->specialObjectsOop;\r\t\t\t\t\t\toop11 = longAt((oop2 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\t\t\t\t\trcvrClass = longAt((oop11 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\t\t\t\t\tgoto l37;\r\t\t\t\t\t}\r\t\t\t\tl37:\t/* end fetchClassOfNonInt: */;\r\t\t\t\t\tif (rcvrClass == (fetchPointerofObject(ClassBlockClosure, foo->specialObjectsOop))) {\r\t\t\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t\t\tprimitiveClosureValue();\r\t\t\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\t\t} else {\r\t\t\t\t\t\tif (rcvrClass == (fetchPointerofObject(ClassBlockContext, foo->specialObjectsOop))) {\r\t\t\t\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t\t\t\tprimitiveValue();\r\t\t\t\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\tif (!(foo->successFlag)) {\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((26 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tgoto normalSend;\r\t\t\t\t\tgoto l36;\r\t\t\t\t}\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t}\r;\r\t\tl36:\t/* end case */;\r\t\t\tBREAK;\r\t\tCASE(203)\r\t\t\t/* bytecodePrimDo */\r\t\t\t{\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((27 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(204)\r\t\t\t/* bytecodePrimNew */\r\t\t\t{\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((28 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 0;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(205)\r\t\t\t/* bytecodePrimNewWithArg */\r\t\t\t{\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((29 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(206)\r\t\t\t/* bytecodePrimPointX */\r\t\t\t{\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt oop2;\r\t\t\t\tsqInt classOop;\r\t\t\t\tsqInt cl;\r\t\t\t\tsqInt ccIndex;\r\t\t\t\tsqInt oop11;\r\t\t\t\tsqInt oop21;\r\t\t\t\tsqInt oop3;\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\trcvr = longAtPointer(localSP);\r\t\t\t\t/* begin assertClassOf:is: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop3 = foo->specialObjectsOop;\r\t\t\t\tclassOop = longAt((oop3 + (BASE_HEADER_SIZE)) + (ClassPoint << (SHIFT_FOR_WORD)));\r\t\t\t\tif ((rcvr & 1)) {\r\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t\tgoto l39;\r\t\t\t\t}\r\t\t\t\tccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31;\r\t\t\t\tif (ccIndex == 0) {\r\t\t\t\t\tcl = (longAt(rcvr - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\t\t\t} else {\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\toop21 = foo->specialObjectsOop;\r\t\t\t\t\toop11 = longAt((oop21 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\t\t\t\tcl = longAt((oop11 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\t\t\t}\r\t\t\t\t/* begin success: */\r\t\t\t\tfoo->successFlag = (cl == classOop) && foo->successFlag;\r\t\t\tl39:\t/* end assertClassOf:is: */;\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin internalPop:thenPush: */\r\t\t\t\t\toop = longAt((rcvr + (BASE_HEADER_SIZE)) + (XIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t\tlongAtPointerput(localSP -= (1 - 1) * (BYTES_PER_WORD), oop);\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tgoto l38;\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop2 = foo->specialObjectsOop;\r\t\t\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop1 + (BASE_HEADER_SIZE)) + ((30 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 0;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl38:\t/* end case */;\r\t\t\tBREAK;\r\t\tCASE(207)\r\t\t\t/* bytecodePrimPointY */\r\t\t\t{\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt oop2;\r\t\t\t\tsqInt classOop;\r\t\t\t\tsqInt cl;\r\t\t\t\tsqInt ccIndex;\r\t\t\t\tsqInt oop11;\r\t\t\t\tsqInt oop21;\r\t\t\t\tsqInt oop3;\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\trcvr = longAtPointer(localSP);\r\t\t\t\t/* begin assertClassOf:is: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop3 = foo->specialObjectsOop;\r\t\t\t\tclassOop = longAt((oop3 + (BASE_HEADER_SIZE)) + (ClassPoint << (SHIFT_FOR_WORD)));\r\t\t\t\tif ((rcvr & 1)) {\r\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t\tgoto l41;\r\t\t\t\t}\r\t\t\t\tccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31;\r\t\t\t\tif (ccIndex == 0) {\r\t\t\t\t\tcl = (longAt(rcvr - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\t\t\t} else {\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\toop21 = foo->specialObjectsOop;\r\t\t\t\t\toop11 = longAt((oop21 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\t\t\t\tcl = longAt((oop11 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\t\t\t}\r\t\t\t\t/* begin success: */\r\t\t\t\tfoo->successFlag = (cl == classOop) && foo->successFlag;\r\t\t\tl41:\t/* end assertClassOf:is: */;\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin internalPop:thenPush: */\r\t\t\t\t\toop = longAt((rcvr + (BASE_HEADER_SIZE)) + (YIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t\tlongAtPointerput(localSP -= (1 - 1) * (BYTES_PER_WORD), oop);\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tgoto l40;\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop2 = foo->specialObjectsOop;\r\t\t\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop1 + (BASE_HEADER_SIZE)) + ((31 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 0;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl40:\t/* end case */;\r\t\t\tBREAK;\r\t\tCASE(208)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 208 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 208) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(209)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 209 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 209) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(210)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 210 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 210) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(211)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 211 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 211) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(212)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 212 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 212) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(213)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 213 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 213) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(214)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 214 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 214) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(215)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 215 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 215) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(216)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 216 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 216) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(217)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 217 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 217) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(218)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 218 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 218) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(219)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 219 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 219) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(220)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 220 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 220) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(221)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 221 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 221) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(222)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 222 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 222) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(223)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 223 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 223) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(224)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 224 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 224) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(225)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 225 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 225) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(226)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 226 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 226) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(227)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 227 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 227) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(228)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 228 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 228) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(229)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 229 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 229) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(230)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 230 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 230) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(231)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 231 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 231) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(232)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 232 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 232) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(233)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 233 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 233) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(234)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 234 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 234) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(235)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 235 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 235) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(236)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 236 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 236) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(237)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 237 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 237) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(238)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 238 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 238) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(239)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 239 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 239) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(240)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 240 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 240) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(241)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 241 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 241) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(242)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 242 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 242) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(243)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 243 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 243) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(244)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 244 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 244) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(245)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 245 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 245) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(246)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 246 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 246) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(247)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 247 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 247) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(248)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 248 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 248) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(249)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 249 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 249) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(250)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 250 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 250) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(251)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 251 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 251) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(252)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 252 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 252) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(253)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 253 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 253) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(254)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 254 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 254) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\tCASE(255)\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 255 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 255) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tBREAK;\r\t\t}\r\t}\r\r\t/* undo the pre-increment of IP before returning */\r\r\tlocalIP -= 1;\r\t/* begin externalizeIPandSP */\r\tfoo->instructionPointer = oopForPointer(localIP);\r\tfoo->stackPointer = oopForPointer(localSP);\r\tfoo->theHomeContext = localHomeContext;\r}\r\r\r/*\tthe vm has to convert aFilenameString via any canonicalization and char-mapping and put the result in aCharBuffer.\rNote the resolveAliases flag - this is an awful artefact of OSX and Apples demented alias handling. When opening a file, the flag must be  true, when closing or renaming it must be false. Sigh. */\r\rsqInt ioFilenamefromStringofLengthresolveAliases(char * aCharBuffer, char * aFilenameString, sqInt filenameLength, sqInt aBoolean) {\r\tsqGetFilenameFromString(aCharBuffer, aFilenameString, filenameLength, aBoolean);\r}\r\r\r/*\tSupport for external primitives. */\r\rsqInt isKindOf(sqInt oop, char * className) {\rregister struct foo * foo = &fum;\r    sqInt oopClass;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\t/* begin fetchClassOf: */\r\tif ((oop & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\toopClass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(oop))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\toopClass = (longAt(oop - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\toopClass = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\rl1:\t/* end fetchClassOf: */;\r\twhile (!(oopClass == foo->nilObj)) {\r\t\tif (classNameOfIs(oopClass, className)) {\r\t\t\treturn 1;\r\t\t}\r\t\toopClass = longAt((oopClass + (BASE_HEADER_SIZE)) + (SuperclassIndex << (SHIFT_FOR_WORD)));\r\t}\r\treturn 0;\r}\r\r\r/*\tSupport for external primitives */\r\rsqInt isMemberOf(sqInt oop, char * className) {\rregister struct foo * foo = &fum;\r    sqInt oopClass;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\t/* begin fetchClassOf: */\r\tif ((oop & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\toopClass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(oop))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\toopClass = (longAt(oop - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\toopClass = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\rl1:\t/* end fetchClassOf: */;\r\treturn classNameOfIs(oopClass, className);\r}\r\r\r/*\tAnswer true if this is an indexable object with pointer elements, e.g., an array */\r\rsqInt isArray(sqInt oop) {\r\treturn ((oop & 1) == 0) && (((((usqInt) (longAt(oop))) >> 8) & 15) == 2);\r}\r\r\r/*\tAnswer true (non-zero) if running on a big endian machine. */\r\rsqInt isBigEnder(void) {\r    char * cString;\r    sqInt i;\r    sqInt anInt;\r    static sqInt endianness = -1;\r    sqInt len;\r\r\tif (!(endianness == -1)) {\r\t\treturn endianness;\r\t}\r\tlen = sizeof(anInt);\r\tcString = (char *) &anInt;\r\ti = 0;\r\twhile (i < len) {\r\t\tcString[i] = i;\r\t\ti += 1;\r\t}\r\tendianness = anInt & 255;\r\treturn endianness;\r}\r\r\r/*\tAnswer true if the argument contains indexable bytes. See comment in formatOf: */\r/*\tNote: Includes CompiledMethods. */\r\rsqInt isBytes(sqInt oop) {\r\treturn ((oop & 1) == 0) && (((((usqInt) (longAt(oop))) >> 8) & 15) >= 8);\r}\r\r\r/*\tAnswer true if size is greater than (((2 raisedTo: 31) - 1) >> bits). Used\r\tto limit size of allocation requests to 31 bit integer maximum to prevent\r\tarithmetic overflow in subsequent calculations. Always answers false\r\tin interpreter simulation.\r\r\tAssumes that sizeof(int) is 4 for all platforms. */\r\rsqInt isExcessiveAllocationRequestshift(sqInt size, sqInt bits) {\r    sqInt shiftCount;\r    int int32;\r\r\tint32 = size;\r\tshiftCount = 0;\r\tif (int32 < 0) {\r\t\treturn 1;\r\t}\r\twhile (shiftCount < bits) {\r\t\tint32 = int32 << 1;\r\t\tif (int32 < 0) {\r\t\t\treturn 1;\r\t\t}\r\t\tshiftCount += 1;\r\t}\r\treturn 0;\r}\r\rsqInt isFloatObject(sqInt oop) {\r\treturn (fetchClassOf(oop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop));\r}\r\r\r/*\tIs this a MethodContext whose meth has a primitive number of 199? */\r/*\tNB: the use of a primitive number for marking the method is pretty grungy, but it is simple to use for a test sytem, not too expensive and we don't actually have the two spare method header bits we need. We can probably obtain them when the method format is changed.\r\tNB 2: actually, the jitter will probably implement the prim to actually mark the volatile frame by changing the return function pointer. */\r\rsqInt isHandlerMarked(sqInt aContext) {\r    sqInt meth;\r    sqInt header;\r    sqInt pIndex;\r    sqInt primBits;\r\r\theader = longAt(aContext);\r\tif (!(((((usqInt) header) >> 12) & 31) == 14)) {\r\t\treturn 0;\r\t}\r\tmeth = longAt((aContext + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\t/* begin primitiveIndexOf: */\r\tprimBits = (((usqInt) (longAt((meth + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD))))) >> 1) & 268435967;\r\tpIndex = (primBits & 511) + (((usqInt) primBits) >> 19);\r\treturn pIndex == 199;\r}\r\r\r/*\tReturn true if the given address is in ST object memory */\r\rsqInt isInMemory(sqInt address) {\r\treturn ((((usqInt) address)) >= (((usqInt) memory))) && ((((usqInt) address)) < (((usqInt) foo->endOfMemory)));\r}\r\rsqInt isIndexable(sqInt oop) {\r\treturn ((((usqInt) (longAt(oop))) >> 8) & 15) >= 2;\r}\r\rsqInt isIntegerObject(sqInt objectPointer) {\r\treturn (objectPointer & 1) > 0;\r}\r\r\r/*\tReturn true if the given value can be represented as a Smalltalk integer value. */\r/*\tUse a shift and XOR to set the sign bit if and only if the top two bits of the given\r\tvalue are the same, then test the sign bit. Note that the top two bits are equal for\r\texactly those integers in the range that can be represented in 31-bits or 63-bits.\r\r\tOperands are coerced to machine integer size so the test will work with 64 bit\r\timages on 32 bit hosts. When running on a 32 bit host, the cast to int has little\r\tor no performance impact for either 32 bit or 64 bit images.\r\r\tOn a 64 bit host, the shift and XOR test is replaced by an explicit range check,\r\twhich provides the best performance for both 32 bit and 64 bit images.\r\r\tIf the range of small integers is enlarged for 64 bit images, this method must\r\tbe updated accordingly. */\r\rsqInt isIntegerValue(sqInt intValue) {\r\treturn \r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t(((((int) intValue)) ^ ((((int) intValue)) << 1)) >= 0)\r# else\r\t\t((intValue >= -1073741824) && (intValue <= 1073741823))\r# endif  // SQ_HOST32\r\t;\r}\r\r\r/*\tAnswer true if the argument has only fields that can hold oops. See comment in formatOf: */\r\rsqInt isPointers(sqInt oop) {\r\treturn ((oop & 1) == 0) && (((((usqInt) (longAt(oop))) >> 8) & 15) <= 4);\r}\r\r\r/*\tAnswer true if the argument has only weak fields that can hold oops. See comment in formatOf: */\r\rsqInt isWeak(sqInt oop) {\r\treturn ((oop & 1) == 0) && (((((usqInt) (longAt(oop))) >> 8) & 15) == 4);\r}\r\r\r/*\tAnswer true if the argument contains only indexable words (no oops). See comment in formatOf: */\r\rsqInt isWords(sqInt oop) {\r\treturn ((oop & 1) == 0) && (((((usqInt) (longAt(oop))) >> 8) & 15) == 6);\r}\r\r\r/*\tAnswer true if the contains only indexable words or bytes (no oops). See comment in formatOf: */\r/*\tNote: Excludes CompiledMethods. */\r\rsqInt isWordsOrBytes(sqInt oop) {\r\treturn ((oop & 1) == 0) && (isWordsOrBytesNonInt(oop));\r}\r\r\r/*\tAnswer true if the contains only indexable words or bytes (no oops). See comment in formatOf: */\r/*\tNote: Excludes CompiledMethods. */\r\rsqInt isWordsOrBytesNonInt(sqInt oop) {\r    sqInt fmt;\r\r\tfmt = (((usqInt) (longAt(oop))) >> 8) & 15;\r\treturn (fmt == 6) || ((fmt >= 8) && (fmt <= 11));\r}\r\r\r/*\tReturn the byte offset of the last pointer field of the given object.  \r\tWorks with CompiledMethods, as well as ordinary objects. \r\tCan be used even when the type bits are not correct. */\r\rsqInt lastPointerOf(sqInt oop) {\r    sqInt sz;\r    sqInt header;\r    sqInt contextSize;\r    sqInt fmt;\r    sqInt methodHeader;\r    sqInt header1;\r    sqInt type;\r    sqInt sp;\r\r\theader = longAt(oop);\r\tfmt = (((usqInt) header) >> 8) & 15;\r\tif (fmt <= 4) {\r\t\tif ((fmt == 3) && ((((((usqInt) header) >> 12) & 31) == 13) || ((((((usqInt) header) >> 12) & 31) == 14) || (((((usqInt) header) >> 12) & 31) == 4)))) {\r\t\t\t/* begin fetchStackPointerOf: */\r\t\t\tsp = longAt((oop + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)));\r\t\t\tif (!((sp & 1))) {\r\t\t\t\tcontextSize = 0;\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\t\tcontextSize = (sp >> 1);\r\t\tl2:\t/* end fetchStackPointerOf: */;\r\t\t\treturn (CtxtTempFrameStart + contextSize) * (BYTES_PER_WORD);\r\t\t}\r\t\t/* begin sizeBitsOfSafe: */\r\t\theader1 = longAt(oop);\r\t\t/* begin rightType: */\r\t\tif ((header1 & (SIZE_MASK)) == 0) {\r\t\t\ttype = HeaderTypeSizeAndClass;\r\t\t\tgoto l3;\r\t\t} else {\r\t\t\tif ((header1 & CompactClassMask) == 0) {\r\t\t\t\ttype = HeaderTypeClass;\r\t\t\t\tgoto l3;\r\t\t\t} else {\r\t\t\t\ttype = HeaderTypeShort;\r\t\t\t\tgoto l3;\r\t\t\t}\r\t\t}\r\tl3:\t/* end rightType: */;\r\t\tif (type == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (ALL_BUT_TYPE_MASK);\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\tsz = header1 & (SIZE_MASK);\r\t\t\tgoto l1;\r\t\t}\r\tl1:\t/* end sizeBitsOfSafe: */;\r\t\treturn sz - (BASE_HEADER_SIZE);\r\t}\r\tif (fmt < 12) {\r\t\treturn 0;\r\t}\r\tmethodHeader = longAt(oop + (BASE_HEADER_SIZE));\r\treturn (((((usqInt) methodHeader) >> 10) & 255) * (BYTES_PER_WORD)) + (BASE_HEADER_SIZE);\r}\r\r\r/*\tReturn the number of indexable bytes or words in the given object. Assume the argument is not an integer. For a CompiledMethod, the size of the method header (in bytes) should be subtracted from the result. */\r\rsqInt lengthOf(sqInt oop) {\r    sqInt header;\r    sqInt sz;\r\r\theader = longAt(oop);\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz = header & (SIZE_MASK);\r\t}\r\tsz -= header & (SIZE_4_BIT);\r\tif (((((usqInt) header) >> 8) & 15) <= 4) {\r\t\treturn ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t}\r\tif (((((usqInt) header) >> 8) & 15) < 8) {\r\t\treturn ((usqInt) (sz - (BASE_HEADER_SIZE))) >> 2;\r\t} else {\r\t\treturn (sz - (BASE_HEADER_SIZE)) - (((((usqInt) header) >> 8) & 15) & 3);\r\t}\r\treturn null;\r}\r\rsqInt literalofMethod(sqInt offset, sqInt methodPointer) {\r\treturn longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r}\r\rsqInt literalCountOf(sqInt methodPointer) {\r    sqInt headerPointer;\r\r\t/* begin literalCountOfHeader: */\r\theaderPointer = longAt((methodPointer + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD)));\r\treturn (((usqInt) headerPointer) >> 10) & 255;\r}\r\rsqInt literalCountOfHeader(sqInt headerPointer) {\r\treturn (((usqInt) headerPointer) >> 10) & 255;\r}\r\r\r/*\tThis entry point needs to be implemented for the interpreter proxy.\r\tSince BitBlt is now a plugin we need to look up BitBltPlugin:=loadBitBltFrom\r\tand call it. This entire mechanism should eventually go away and be\r\treplaced with a dynamic lookup from BitBltPlugin itself but for backward\r\tcompatibility this stub is provided */\r\rsqInt loadBitBltFrom(sqInt bb) {\r    void * fn;\r\r\tfn = ioLoadFunctionFrom(\"loadBitBltFrom\", \"BitBltPlugin\");\r\tif (fn == 0) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\treturn ((sqInt (*)(sqInt))fn)(bb);\r}\r\rsqInt loadInitialContext(void) {\rregister struct foo * foo = &fum;\r    sqInt proc;\r    sqInt sched;\r    sqInt oop;\r    sqInt oop1;\r    sqInt activeCntx;\r    sqInt tmp;\r\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\toop1 = foo->specialObjectsOop;\r\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\tsched = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\tproc = longAt((sched + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)));\r\tfoo->activeContext = longAt((proc + (BASE_HEADER_SIZE)) + (SuspendedContextIndex << (SHIFT_FOR_WORD)));\r\tif ((((usqInt) foo->activeContext)) < (((usqInt) foo->youngStart))) {\r\t\tbeRootIfOld(foo->activeContext);\r\t}\r\t/* begin fetchContextRegisters: */\r\tactiveCntx = foo->activeContext;\r\ttmp = longAt((activeCntx + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\tif ((tmp & 1)) {\r\t\ttmp = longAt((activeCntx + (BASE_HEADER_SIZE)) + (HomeIndex << (SHIFT_FOR_WORD)));\r\t\tif ((((usqInt) tmp)) < (((usqInt) foo->youngStart))) {\r\t\t\tbeRootIfOld(tmp);\r\t\t}\r\t} else {\r\t\ttmp = activeCntx;\r\t}\r\tfoo->theHomeContext = tmp;\r\tfoo->receiver = longAt((tmp + (BASE_HEADER_SIZE)) + (ReceiverIndex << (SHIFT_FOR_WORD)));\r\tfoo->method = longAt((tmp + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\ttmp = ((longAt((activeCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tfoo->instructionPointer = ((foo->method + tmp) + (BASE_HEADER_SIZE)) - 2;\r\ttmp = ((longAt((activeCntx + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tfoo->stackPointer = (activeCntx + (BASE_HEADER_SIZE)) + (((TempFrameStart + tmp) - 1) * (BYTES_PER_WORD));\r\tfoo->reclaimableContextCount = 0;\r}\r\r\r/*\tThis method implements a simple method lookup cache. If an entry for the given selector and class is found in the cache, set the values of 'newMethod' and 'primitiveIndex' and return true. Otherwise, return false. */\r/*\tAbout the re-probe scheme: The hash is the low bits of the XOR of two large addresses, minus their useless lowest two bits. If a probe doesn't get a hit, the hash is shifted right one bit to compute the next probe, introducing a new randomish bit. The cache is probed CacheProbeMax times before giving up. */\r/*\tWARNING: Since the hash computation is based on the object addresses of the class and selector, we must rehash or flush when compacting storage. We've chosen to flush, since that also saves the trouble of updating the addresses of the objects in the cache. */\r\rsqInt lookupInMethodCacheSelclass(sqInt selector, sqInt class) {\rregister struct foo * foo = &fum;\r    sqInt hash;\r    sqInt probe;\r\r\r\t/* shift drops two low-order zeros from addresses */\r\r\thash = selector ^ class;\r\r\t/* first probe */\r\r\tprobe = hash & MethodCacheMask;\r\tif (((foo->methodCache[probe + MethodCacheSelector]) == selector) && ((foo->methodCache[probe + MethodCacheClass]) == class)) {\r\t\tfoo->newMethod = foo->methodCache[probe + MethodCacheMethod];\r\t\tfoo->primitiveIndex = foo->methodCache[probe + MethodCachePrim];\r\t\tfoo->newNativeMethod = foo->methodCache[probe + MethodCacheNative];\r\t\tfoo->primitiveFunctionPointer = ((void *) (foo->methodCache[probe + MethodCachePrimFunction]));\r\t\treturn 1;\r\t}\r\r\t/* second probe */\r\r\tprobe = (((usqInt) hash) >> 1) & MethodCacheMask;\r\tif (((foo->methodCache[probe + MethodCacheSelector]) == selector) && ((foo->methodCache[probe + MethodCacheClass]) == class)) {\r\t\tfoo->newMethod = foo->methodCache[probe + MethodCacheMethod];\r\t\tfoo->primitiveIndex = foo->methodCache[probe + MethodCachePrim];\r\t\tfoo->newNativeMethod = foo->methodCache[probe + MethodCacheNative];\r\t\tfoo->primitiveFunctionPointer = ((void *) (foo->methodCache[probe + MethodCachePrimFunction]));\r\t\treturn 1;\r\t}\r\tprobe = (((usqInt) hash) >> 2) & MethodCacheMask;\r\tif (((foo->methodCache[probe + MethodCacheSelector]) == selector) && ((foo->methodCache[probe + MethodCacheClass]) == class)) {\r\t\tfoo->newMethod = foo->methodCache[probe + MethodCacheMethod];\r\t\tfoo->primitiveIndex = foo->methodCache[probe + MethodCachePrim];\r\t\tfoo->newNativeMethod = foo->methodCache[probe + MethodCacheNative];\r\t\tfoo->primitiveFunctionPointer = ((void *) (foo->methodCache[probe + MethodCachePrimFunction]));\r\t\treturn 1;\r\t}\r\treturn 0;\r}\r\rsqInt lookupMethodInClass(sqInt class) {\rregister struct foo * foo = &fum;\r    sqInt dictionary;\r    sqInt currentClass;\r    sqInt rclass;\r    sqInt found;\r    sqInt oop;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r    sqInt length;\r    sqInt wrapAround;\r    sqInt index;\r    sqInt nextSelector;\r    sqInt mask;\r    sqInt methodArray;\r    sqInt sz;\r    sqInt methodPointer;\r    sqInt primBits;\r    sqInt header;\r\r\tcurrentClass = class;\r\twhile (currentClass != foo->nilObj) {\r\t\tdictionary = longAt((currentClass + (BASE_HEADER_SIZE)) + (MessageDictionaryIndex << (SHIFT_FOR_WORD)));\r\t\tif (dictionary == foo->nilObj) {\r\t\t\t/* begin pushRemappableOop: */\r\t\t\tfoo->remapBuffer[foo->remapBufferCount += 1] = currentClass;\r\t\t\tcreateActualMessageTo(class);\r\t\t\t/* begin popRemappableOop */\r\t\t\toop = foo->remapBuffer[foo->remapBufferCount];\r\t\t\tfoo->remapBufferCount -= 1;\r\t\t\tcurrentClass = oop;\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop1 = foo->specialObjectsOop;\r\t\t\tfoo->messageSelector = longAt((oop1 + (BASE_HEADER_SIZE)) + (SelectorCannotInterpret << (SHIFT_FOR_WORD)));\r\t\t\treturn lookupMethodInClass(longAt((currentClass + (BASE_HEADER_SIZE)) + (SuperclassIndex << (SHIFT_FOR_WORD))));\r\t\t}\r\t\t/* begin lookupMethodInDictionary: */\r\t\t/* begin fetchWordLengthOf: */\r\t\t/* begin sizeBitsOf: */\r\t\theader = longAt(dictionary);\r\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(dictionary - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\tsz = header & (SIZE_MASK);\r\t\t\tgoto l1;\r\t\t}\r\tl1:\t/* end sizeBitsOf: */;\r\t\tlength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tmask = (length - SelectorStart) - 1;\r\t\tif ((foo->messageSelector & 1)) {\r\t\t\tindex = (mask & ((foo->messageSelector >> 1))) + SelectorStart;\r\t\t} else {\r\t\t\tindex = (mask & ((((usqInt) (longAt(foo->messageSelector))) >> 17) & 4095)) + SelectorStart;\r\t\t}\r\t\twrapAround = 0;\r\t\twhile (1) {\r\t\t\tnextSelector = longAt((dictionary + (BASE_HEADER_SIZE)) + (index << (SHIFT_FOR_WORD)));\r\t\t\tif (nextSelector == foo->nilObj) {\r\t\t\t\tfound = 0;\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\t\tif (nextSelector == foo->messageSelector) {\r\t\t\t\tmethodArray = longAt((dictionary + (BASE_HEADER_SIZE)) + (MethodArrayIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->newMethod = longAt((methodArray + (BASE_HEADER_SIZE)) + ((index - SelectorStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tif (((((usqInt) (longAt(foo->newMethod))) >> 8) & 15) >= 12) {\r\t\t\t\t\t/* begin primitiveIndexOf: */\r\t\t\t\t\tmethodPointer = foo->newMethod;\r\t\t\t\t\tprimBits = (((usqInt) (longAt((methodPointer + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD))))) >> 1) & 268435967;\r\t\t\t\t\tfoo->primitiveIndex = (primBits & 511) + (((usqInt) primBits) >> 19);\r\t\t\t\t\tif (foo->primitiveIndex > MaxPrimitiveIndex) {\r\t\t\t\t\t\tfoo->primitiveIndex = 0;\r\t\t\t\t\t}\r\t\t\t\t} else {\r\t\t\t\t\tfoo->primitiveIndex = 248;\r\t\t\t\t}\r\t\t\t\tfound = 1;\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\t\tindex += 1;\r\t\t\tif (index == length) {\r\t\t\t\tif (wrapAround) {\r\t\t\t\t\tfound = 0;\r\t\t\t\t\tgoto l2;\r\t\t\t\t}\r\t\t\t\twrapAround = 1;\r\t\t\t\tindex = SelectorStart;\r\t\t\t}\r\t\t}\r\tl2:\t/* end lookupMethodInDictionary: */;\r\t\tif (found) {\r\t\t\treturn foo->methodClass = currentClass;\r\t\t}\r\t\tcurrentClass = longAt((currentClass + (BASE_HEADER_SIZE)) + (SuperclassIndex << (SHIFT_FOR_WORD)));\r\t}\r\tif (foo->messageSelector == (fetchPointerofObject(SelectorDoesNotUnderstand, foo->specialObjectsOop))) {\r\t\terror(\"Recursive not understood error encountered\");\r\t}\r\t/* begin pushRemappableOop: */\r\tfoo->remapBuffer[foo->remapBufferCount += 1] = class;\r\tcreateActualMessageTo(class);\r\t/* begin popRemappableOop */\r\toop2 = foo->remapBuffer[foo->remapBufferCount];\r\tfoo->remapBufferCount -= 1;\r\trclass = oop2;\r\t/* begin fetchPointer:ofObject: */\r\toop3 = foo->specialObjectsOop;\r\tfoo->messageSelector = longAt((oop3 + (BASE_HEADER_SIZE)) + (SelectorDoesNotUnderstand << (SHIFT_FOR_WORD)));\r\treturn lookupMethodInClass(rclass);\r}\r\r\r/*\tThis method lookup tolerates integers as Dictionary keys to \r\tsupport execution of images in which Symbols have been \r\tcompacted out */\r\rsqInt lookupMethodInDictionary(sqInt dictionary) {\rregister struct foo * foo = &fum;\r    sqInt length;\r    sqInt wrapAround;\r    sqInt index;\r    sqInt nextSelector;\r    sqInt mask;\r    sqInt methodArray;\r    sqInt sz;\r    sqInt methodPointer;\r    sqInt primBits;\r    sqInt header;\r\r\t/* begin fetchWordLengthOf: */\r\t/* begin sizeBitsOf: */\r\theader = longAt(dictionary);\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(dictionary - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\tsz = header & (SIZE_MASK);\r\t\tgoto l1;\r\t}\rl1:\t/* end sizeBitsOf: */;\r\tlength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\tmask = (length - SelectorStart) - 1;\r\tif ((foo->messageSelector & 1)) {\r\t\tindex = (mask & ((foo->messageSelector >> 1))) + SelectorStart;\r\t} else {\r\t\tindex = (mask & ((((usqInt) (longAt(foo->messageSelector))) >> 17) & 4095)) + SelectorStart;\r\t}\r\twrapAround = 0;\r\twhile (1) {\r\t\tnextSelector = longAt((dictionary + (BASE_HEADER_SIZE)) + (index << (SHIFT_FOR_WORD)));\r\t\tif (nextSelector == foo->nilObj) {\r\t\t\treturn 0;\r\t\t}\r\t\tif (nextSelector == foo->messageSelector) {\r\t\t\tmethodArray = longAt((dictionary + (BASE_HEADER_SIZE)) + (MethodArrayIndex << (SHIFT_FOR_WORD)));\r\r\t\t\t/* Check if newMethod is a CompiledMethod. */\r\r\t\t\tfoo->newMethod = longAt((methodArray + (BASE_HEADER_SIZE)) + ((index - SelectorStart) << (SHIFT_FOR_WORD)));\r\t\t\tif (((((usqInt) (longAt(foo->newMethod))) >> 8) & 15) >= 12) {\r\t\t\t\t/* begin primitiveIndexOf: */\r\t\t\t\tmethodPointer = foo->newMethod;\r\t\t\t\tprimBits = (((usqInt) (longAt((methodPointer + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD))))) >> 1) & 268435967;\r\t\t\t\tfoo->primitiveIndex = (primBits & 511) + (((usqInt) primBits) >> 19);\r\t\t\t\tif (foo->primitiveIndex > MaxPrimitiveIndex) {\r\r\t\t\t\t\t/* If primitiveIndex is out of range, set to zero before putting in \r\t\t\t\t\t\t\t\t\tcache. This is equiv to primFail, and avoids the need to check on \r\t\t\t\t\t\t\t\t\tevery send. */\r\r\t\t\t\t\tfoo->primitiveIndex = 0;\r\t\t\t\t}\r\t\t\t} else {\r\r\t\t\t\t/* indicate that this is no compiled method - use primitiveInvokeObjectAsMethod */\r\r\t\t\t\tfoo->primitiveIndex = 248;\r\t\t\t}\r\t\t\treturn 1;\r\t\t}\r\t\tindex += 1;\r\t\tif (index == length) {\r\t\t\tif (wrapAround) {\r\t\t\t\treturn 0;\r\t\t\t}\r\t\t\twrapAround = 1;\r\t\t\tindex = SelectorStart;\r\t\t}\r\t}\r}\r\r\r/*\tLookup.  Answer false on failure father than performing MNU processing etc. */\r\rsqInt lookupMethodNoMNUEtcInClass(sqInt class) {\rregister struct foo * foo = &fum;\r    sqInt dictionary;\r    sqInt currentClass;\r\r\tcurrentClass = class;\r\twhile (currentClass != foo->nilObj) {\r\t\tdictionary = longAt((currentClass + (BASE_HEADER_SIZE)) + (MessageDictionaryIndex << (SHIFT_FOR_WORD)));\r\t\tif ((dictionary != foo->nilObj) && (lookupMethodInDictionary(dictionary))) {\r\t\t\tfoo->methodClass = currentClass;\r\t\t\treturn 1;\r\t\t}\r\t\tcurrentClass = longAt((currentClass + (BASE_HEADER_SIZE)) + (SuperclassIndex << (SHIFT_FOR_WORD)));\r\t}\r\treturn 0;\r}\r\r\r/*\tReturn the first free block after the given chunk in memory. */\r\rsqInt lowestFreeAfter(sqInt chunk) {\rregister struct foo * foo = &fum;\r    sqInt oopSize;\r    sqInt oop;\r    sqInt oopHeaderType;\r    sqInt oopHeader;\r\r\toop = chunk + (foo->headerTypeBytes[(longAt(chunk)) & TypeMask]);\r\twhile ((((usqInt) oop)) < (((usqInt) foo->endOfMemory))) {\r\t\toopHeader = longAt(oop);\r\t\toopHeaderType = oopHeader & TypeMask;\r\t\tif (oopHeaderType == HeaderTypeFree) {\r\t\t\treturn oop;\r\t\t} else {\r\t\t\tif (oopHeaderType == HeaderTypeSizeAndClass) {\r\t\t\t\toopSize = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (ALL_BUT_TYPE_MASK);\r\t\t\t} else {\r\t\t\t\toopSize = oopHeader & (SIZE_MASK);\r\t\t\t}\r\t\t}\r\t\toop = (oop + oopSize) + (foo->headerTypeBytes[(longAt(oop + oopSize)) & TypeMask]);\r\t}\r\terror(\"expected to find at least one free object\");\r}\r\r\r/*\tmake a Point xValue@yValue.\rWe know both will be integers so no value nor root checking is needed */\r\rsqInt makePointwithxValueyValue(sqInt xValue, sqInt yValue) {\r    sqInt pointResult;\r\r\tpointResult = instantiateSmallClasssizeInBytes(fetchPointerofObject(ClassPoint, foo->specialObjectsOop), 3 * (BYTES_PER_WORD));\r\tlongAtput((pointResult + (BASE_HEADER_SIZE)) + (XIndex << (SHIFT_FOR_WORD)), ((xValue << 1) | 1));\r\tlongAtput((pointResult + (BASE_HEADER_SIZE)) + (YIndex << (SHIFT_FOR_WORD)), ((yValue << 1) | 1));\r\treturn pointResult;\r}\r\r\r/*\tUse the forwarding table to update the pointers of all non-free objects in the given range of memory. Also remap pointers in root objects which may contains pointers into the given memory range, and don't forget to flush the method cache based on the range */\r\rsqInt mapPointersInObjectsFromto(sqInt memStart, sqInt memEnd) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r    sqInt i;\r    sqInt oop1;\r    sqInt i1;\r    sqInt i2;\r    sqInt probe;\r\r\t/* begin compilerMapHookFrom:to: */\r\tif (foo->compilerInitialized) {\r\t\tcompilerMapFromto(memStart, memEnd);\r\t}\r\t/* begin mapInterpreterOops */\r\tfoo->nilObj = remap(foo->nilObj);\r\tfoo->falseObj = remap(foo->falseObj);\r\tfoo->trueObj = remap(foo->trueObj);\r\tfoo->specialObjectsOop = remap(foo->specialObjectsOop);\r\tif (!(foo->compilerInitialized)) {\r\t\tfoo->stackPointer -= foo->activeContext;\r\t\tfoo->activeContext = remap(foo->activeContext);\r\t\tfoo->stackPointer += foo->activeContext;\r\t\tfoo->theHomeContext = remap(foo->theHomeContext);\r\t}\r\tfoo->instructionPointer -= foo->method;\r\tfoo->method = remap(foo->method);\r\tfoo->instructionPointer += foo->method;\r\tfoo->receiver = remap(foo->receiver);\r\tfoo->messageSelector = remap(foo->messageSelector);\r\tfoo->newMethod = remap(foo->newMethod);\r\tfoo->methodClass = remap(foo->methodClass);\r\tfoo->lkupClass = remap(foo->lkupClass);\r\tfoo->receiverClass = remap(foo->receiverClass);\r\tfor (i1 = 1; i1 <= foo->remapBufferCount; i1 += 1) {\r\t\toop1 = foo->remapBuffer[i1];\r\t\tif (!((oop1 & 1))) {\r\t\t\tfoo->remapBuffer[i1] = (remap(oop1));\r\t\t}\r\t}\r\tfor (i1 = 1; i1 <= foo->jmpDepth; i1 += 1) {\r\t\toop1 = foo->suspendedCallbacks[i1];\r\t\tif (!((oop1 & 1))) {\r\t\t\tfoo->suspendedCallbacks[i1] = (remap(oop1));\r\t\t}\r\t\toop1 = foo->suspendedMethods[i1];\r\t\tif (!((oop1 & 1))) {\r\t\t\tfoo->suspendedMethods[i1] = (remap(oop1));\r\t\t}\r\t}\r\tfor (i = 1; i <= foo->extraRootCount; i += 1) {\r\t\toop = (foo->extraRoots[i])[0];\r\t\tif (!((oop & 1))) {\r\t\t\t(foo->extraRoots[i])[0] = (remap(oop));\r\t\t}\r\t}\r\t/* begin flushMethodCacheFrom:to: */\r\tprobe = 0;\r\tfor (i2 = 1; i2 <= MethodCacheEntries; i2 += 1) {\r\t\tif (!((foo->methodCache[probe + MethodCacheSelector]) == 0)) {\r\t\t\tif ((((((((usqInt) (foo->methodCache[probe + MethodCacheSelector]))) >= (((usqInt) memStart))) && ((((usqInt) (foo->methodCache[probe + MethodCacheSelector]))) < (((usqInt) memEnd)))) || (((((usqInt) (foo->methodCache[probe + MethodCacheClass]))) >= (((usqInt) memStart))) && ((((usqInt) (foo->methodCache[probe + MethodCacheClass]))) < (((usqInt) memEnd))))) || (((((usqInt) (foo->methodCache[probe + MethodCacheMethod]))) >= (((usqInt) memStart))) && ((((usqInt) (foo->methodCache[probe + MethodCacheMethod]))) < (((usqInt) memEnd))))) || (((((usqInt) (foo->methodCache[probe + MethodCacheNative]))) >= (((usqInt) memStart))) && ((((usqInt) (foo->methodCache[probe + MethodCacheNative]))) < (((usqInt) memEnd))))) {\r\t\t\t\tfoo->methodCache[probe + MethodCacheSelector] = 0;\r\t\t\t}\r\t\t}\r\t\tprobe += MethodCacheEntrySize;\r\t}\r\tfor (i2 = 1; i2 <= AtCacheTotalSize; i2 += 1) {\r\t\tfoo->atCache[i2] = 0;\r\t}\r\tupdatePointersInRootObjectsFromto(memStart, memEnd);\r\tupdatePointersInRangeFromto(memStart, memEnd);\r}\r\r\r/*\tMark all objects reachable from the given one.\r\tTrace from the given object even if it is old.\r\tDo not trace if it is already marked.\r\tMark it only if it is a young object. */\r/*\tTracer state variables:\r\t\tchild\t\tobject being examined\r\t\tfield\t\tnext field of child to examine\r\t\tparentField\tfield where child was stored in its referencing object */\r\rsqInt markAndTrace(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt lastFieldOffset;\r    sqInt action;\r    sqInt header;\r    sqInt statMarkCountLocal;\r    sqInt typeBits;\r    sqInt childType;\r    sqInt lastFieldOffset1;\r    sqInt oop1;\r    sqInt header1;\r    sqInt type;\r    sqInt header2;\r    sqInt sz;\r    sqInt header3;\r    sqInt contextSize;\r    sqInt fmt;\r    sqInt methodHeader;\r    sqInt header11;\r    sqInt type1;\r    sqInt sp;\r    sqInt sz1;\r    sqInt header4;\r    sqInt contextSize1;\r    sqInt fmt1;\r    sqInt methodHeader1;\r    sqInt header12;\r    sqInt type2;\r    sqInt sp1;\r    sqInt child;\r    usqInt youngStartLocal;\r    sqInt parentField;\r    sqInt field;\r\r\theader = longAt(oop);\r\tif (!((header & (MARK_BIT)) == 0)) {\r\t\treturn 0;\r\t}\r\theader = (header & (ALL_BUT_TYPE_MASK)) | HeaderTypeGC;\r\tif ((((usqInt) oop)) >= (((usqInt) foo->youngStart))) {\r\t\theader = header | (MARK_BIT);\r\t}\r\tlongAtput(oop, header);\r\tparentField = GCTopMarker;\r\tchild = oop;\r\tif (((((usqInt) (longAt(oop))) >> 8) & 15) == 4) {\r\r\t\t/* Set lastFieldOffset before the weak fields in the receiver */\r\t\t/* And remember as weak root */\r\r\t\tlastFieldOffset = (nonWeakFieldsOf(oop)) << (SHIFT_FOR_WORD);\r\t\tfoo->weakRootCount += 1;\r\t\tfoo->weakRoots[foo->weakRootCount] = oop;\r\t} else {\r\t\t/* begin lastPointerOf: */\r\t\theader3 = longAt(oop);\r\t\tfmt = (((usqInt) header3) >> 8) & 15;\r\t\tif (fmt <= 4) {\r\t\t\tif ((fmt == 3) && ((((((usqInt) header3) >> 12) & 31) == 13) || ((((((usqInt) header3) >> 12) & 31) == 14) || (((((usqInt) header3) >> 12) & 31) == 4)))) {\r\t\t\t\t/* begin fetchStackPointerOf: */\r\t\t\t\tsp = longAt((oop + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tif (!((sp & 1))) {\r\t\t\t\t\tcontextSize = 0;\r\t\t\t\t\tgoto l8;\r\t\t\t\t}\r\t\t\t\tcontextSize = (sp >> 1);\r\t\t\tl8:\t/* end fetchStackPointerOf: */;\r\t\t\t\tlastFieldOffset = (CtxtTempFrameStart + contextSize) * (BYTES_PER_WORD);\r\t\t\t\tgoto l10;\r\t\t\t}\r\t\t\t/* begin sizeBitsOfSafe: */\r\t\t\theader11 = longAt(oop);\r\t\t\t/* begin rightType: */\r\t\t\tif ((header11 & (SIZE_MASK)) == 0) {\r\t\t\t\ttype1 = HeaderTypeSizeAndClass;\r\t\t\t\tgoto l9;\r\t\t\t} else {\r\t\t\t\tif ((header11 & CompactClassMask) == 0) {\r\t\t\t\t\ttype1 = HeaderTypeClass;\r\t\t\t\t\tgoto l9;\r\t\t\t\t} else {\r\t\t\t\t\ttype1 = HeaderTypeShort;\r\t\t\t\t\tgoto l9;\r\t\t\t\t}\r\t\t\t}\r\t\tl9:\t/* end rightType: */;\r\t\t\tif (type1 == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (ALL_BUT_TYPE_MASK);\r\t\t\t\tgoto l7;\r\t\t\t} else {\r\t\t\t\tsz = header11 & (SIZE_MASK);\r\t\t\t\tgoto l7;\r\t\t\t}\r\t\tl7:\t/* end sizeBitsOfSafe: */;\r\t\t\tlastFieldOffset = sz - (BASE_HEADER_SIZE);\r\t\t\tgoto l10;\r\t\t}\r\t\tif (fmt < 12) {\r\t\t\tlastFieldOffset = 0;\r\t\t\tgoto l10;\r\t\t}\r\t\tmethodHeader = longAt(oop + (BASE_HEADER_SIZE));\r\t\tlastFieldOffset = (((((usqInt) methodHeader) >> 10) & 255) * (BYTES_PER_WORD)) + (BASE_HEADER_SIZE);\r\tl10:\t/* end lastPointerOf: */;\r\t}\r\tfield = oop + lastFieldOffset;\r\taction = StartField;\r\tyoungStartLocal = foo->youngStart;\r\r\t/* run the tracer state machine until all objects reachable from oop are marked */\r\r\tstatMarkCountLocal = foo->statMarkCount;\r\twhile (!(action == Done)) {\r\t\tstatMarkCountLocal += 1;\r\t\tif (action == StartField) {\r\t\t\t/* begin startField */\r\t\t\tchild = longAt(field);\r\t\t\ttypeBits = child & TypeMask;\r\t\t\tif ((typeBits & 1) == 1) {\r\t\t\t\tfield -= BYTES_PER_WORD;\r\t\t\t\taction = StartField;\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\t\tif (typeBits == 0) {\r\t\t\t\tlongAtput(field, parentField);\r\t\t\t\tparentField = field;\r\t\t\t\taction = StartObj;\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\t\tif (typeBits == 2) {\r\t\t\t\tif ((child & CompactClassMask) != 0) {\r\t\t\t\t\tchild = child & (ALL_BUT_TYPE_MASK);\r\t\t\t\t\t/* begin rightType: */\r\t\t\t\t\tif ((child & (SIZE_MASK)) == 0) {\r\t\t\t\t\t\tchildType = HeaderTypeSizeAndClass;\r\t\t\t\t\t\tgoto l1;\r\t\t\t\t\t} else {\r\t\t\t\t\t\tif ((child & CompactClassMask) == 0) {\r\t\t\t\t\t\t\tchildType = HeaderTypeClass;\r\t\t\t\t\t\t\tgoto l1;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\tchildType = HeaderTypeShort;\r\t\t\t\t\t\t\tgoto l1;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\tl1:\t/* end rightType: */;\r\t\t\t\t\tlongAtput(field, child | childType);\r\t\t\t\t\taction = Upward;\r\t\t\t\t\tgoto l2;\r\t\t\t\t} else {\r\t\t\t\t\tchild = longAt(field - (BYTES_PER_WORD));\r\t\t\t\t\tchild = child & (ALL_BUT_TYPE_MASK);\r\t\t\t\t\tlongAtput(field - (BYTES_PER_WORD), parentField);\r\t\t\t\t\tparentField = (field - (BYTES_PER_WORD)) | 1;\r\t\t\t\t\taction = StartObj;\r\t\t\t\t\tgoto l2;\r\t\t\t\t}\r\t\t\t}\r\t\tl2:\t/* end startField */;\r\t\t}\r\t\tif (action == StartObj) {\r\t\t\t/* begin startObj */\r\t\t\toop1 = child;\r\t\t\tif ((((usqInt) oop1)) < (((usqInt) youngStartLocal))) {\r\t\t\t\tfield = oop1;\r\t\t\t\taction = Upward;\r\t\t\t\tgoto l3;\r\t\t\t}\r\t\t\theader1 = longAt(oop1);\r\t\t\tif ((header1 & (MARK_BIT)) == 0) {\r\t\t\t\tif (((((usqInt) (longAt(oop1))) >> 8) & 15) == 4) {\r\t\t\t\t\tlastFieldOffset1 = (nonWeakFieldsOf(oop1)) << (SHIFT_FOR_WORD);\r\t\t\t\t} else {\r\t\t\t\t\t/* begin lastPointerOf: */\r\t\t\t\t\theader4 = longAt(oop1);\r\t\t\t\t\tfmt1 = (((usqInt) header4) >> 8) & 15;\r\t\t\t\t\tif (fmt1 <= 4) {\r\t\t\t\t\t\tif ((fmt1 == 3) && ((((((usqInt) header4) >> 12) & 31) == 13) || ((((((usqInt) header4) >> 12) & 31) == 14) || (((((usqInt) header4) >> 12) & 31) == 4)))) {\r\t\t\t\t\t\t\t/* begin fetchStackPointerOf: */\r\t\t\t\t\t\t\tsp1 = longAt((oop1 + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t\t\t\tif (!((sp1 & 1))) {\r\t\t\t\t\t\t\t\tcontextSize1 = 0;\r\t\t\t\t\t\t\t\tgoto l12;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\tcontextSize1 = (sp1 >> 1);\r\t\t\t\t\t\tl12:\t/* end fetchStackPointerOf: */;\r\t\t\t\t\t\t\tlastFieldOffset1 = (CtxtTempFrameStart + contextSize1) * (BYTES_PER_WORD);\r\t\t\t\t\t\t\tgoto l14;\r\t\t\t\t\t\t}\r\t\t\t\t\t\t/* begin sizeBitsOfSafe: */\r\t\t\t\t\t\theader12 = longAt(oop1);\r\t\t\t\t\t\t/* begin rightType: */\r\t\t\t\t\t\tif ((header12 & (SIZE_MASK)) == 0) {\r\t\t\t\t\t\t\ttype2 = HeaderTypeSizeAndClass;\r\t\t\t\t\t\t\tgoto l13;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\tif ((header12 & CompactClassMask) == 0) {\r\t\t\t\t\t\t\t\ttype2 = HeaderTypeClass;\r\t\t\t\t\t\t\t\tgoto l13;\r\t\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t\ttype2 = HeaderTypeShort;\r\t\t\t\t\t\t\t\tgoto l13;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t}\r\t\t\t\t\tl13:\t/* end rightType: */;\r\t\t\t\t\t\tif (type2 == HeaderTypeSizeAndClass) {\r\t\t\t\t\t\t\tsz1 = (longAt(oop1 - ((BYTES_PER_WORD) * 2))) & (ALL_BUT_TYPE_MASK);\r\t\t\t\t\t\t\tgoto l11;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\tsz1 = header12 & (SIZE_MASK);\r\t\t\t\t\t\t\tgoto l11;\r\t\t\t\t\t\t}\r\t\t\t\t\tl11:\t/* end sizeBitsOfSafe: */;\r\t\t\t\t\t\tlastFieldOffset1 = sz1 - (BASE_HEADER_SIZE);\r\t\t\t\t\t\tgoto l14;\r\t\t\t\t\t}\r\t\t\t\t\tif (fmt1 < 12) {\r\t\t\t\t\t\tlastFieldOffset1 = 0;\r\t\t\t\t\t\tgoto l14;\r\t\t\t\t\t}\r\t\t\t\t\tmethodHeader1 = longAt(oop1 + (BASE_HEADER_SIZE));\r\t\t\t\t\tlastFieldOffset1 = (((((usqInt) methodHeader1) >> 10) & 255) * (BYTES_PER_WORD)) + (BASE_HEADER_SIZE);\r\t\t\t\tl14:\t/* end lastPointerOf: */;\r\t\t\t\t}\r\t\t\t\theader1 = header1 & (ALL_BUT_TYPE_MASK);\r\t\t\t\theader1 = (header1 | (MARK_BIT)) | HeaderTypeGC;\r\t\t\t\tlongAtput(oop1, header1);\r\t\t\t\tfield = oop1 + lastFieldOffset1;\r\t\t\t\taction = StartField;\r\t\t\t\tgoto l3;\r\t\t\t} else {\r\t\t\t\tfield = oop1;\r\t\t\t\taction = Upward;\r\t\t\t\tgoto l3;\r\t\t\t}\r\t\tl3:\t/* end startObj */;\r\t\t}\r\t\tif (action == Upward) {\r\t\t\t/* begin upward */\r\t\t\tif ((parentField & 1) == 1) {\r\t\t\t\tif (parentField == GCTopMarker) {\r\t\t\t\t\theader2 = (longAt(field)) & (ALL_BUT_TYPE_MASK);\r\t\t\t\t\t/* begin rightType: */\r\t\t\t\t\tif ((header2 & (SIZE_MASK)) == 0) {\r\t\t\t\t\t\ttype = HeaderTypeSizeAndClass;\r\t\t\t\t\t\tgoto l4;\r\t\t\t\t\t} else {\r\t\t\t\t\t\tif ((header2 & CompactClassMask) == 0) {\r\t\t\t\t\t\t\ttype = HeaderTypeClass;\r\t\t\t\t\t\t\tgoto l4;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\ttype = HeaderTypeShort;\r\t\t\t\t\t\t\tgoto l4;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\tl4:\t/* end rightType: */;\r\t\t\t\t\tlongAtput(field, header2 | type);\r\t\t\t\t\taction = Done;\r\t\t\t\t\tgoto l6;\r\t\t\t\t} else {\r\t\t\t\t\tchild = field;\r\t\t\t\t\tfield = parentField - 1;\r\t\t\t\t\tparentField = longAt(field);\r\t\t\t\t\theader2 = longAt(field + (BYTES_PER_WORD));\r\t\t\t\t\t/* begin rightType: */\r\t\t\t\t\tif ((header2 & (SIZE_MASK)) == 0) {\r\t\t\t\t\t\ttype = HeaderTypeSizeAndClass;\r\t\t\t\t\t\tgoto l5;\r\t\t\t\t\t} else {\r\t\t\t\t\t\tif ((header2 & CompactClassMask) == 0) {\r\t\t\t\t\t\t\ttype = HeaderTypeClass;\r\t\t\t\t\t\t\tgoto l5;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\ttype = HeaderTypeShort;\r\t\t\t\t\t\t\tgoto l5;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\tl5:\t/* end rightType: */;\r\t\t\t\t\tlongAtput(field, child | type);\r\t\t\t\t\tfield += BYTES_PER_WORD;\r\t\t\t\t\theader2 = header2 & (ALL_BUT_TYPE_MASK);\r\t\t\t\t\tlongAtput(field, header2 | type);\r\t\t\t\t\taction = Upward;\r\t\t\t\t\tgoto l6;\r\t\t\t\t}\r\t\t\t} else {\r\t\t\t\tchild = field;\r\t\t\t\tfield = parentField;\r\t\t\t\tparentField = longAt(field);\r\t\t\t\tlongAtput(field, child);\r\t\t\t\tfield -= BYTES_PER_WORD;\r\t\t\t\taction = StartField;\r\t\t\t\tgoto l6;\r\t\t\t}\r\t\tl6:\t/* end upward */;\r\t\t}\r\t}\r\tfoo->statMarkCount = statMarkCountLocal;\r}\r\r\r/*\tMark and trace all oops in the interpreter's state. */\r/*\tAssume: All traced variables contain valid oops. */\r\rsqInt markAndTraceInterpreterOops(void) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r    sqInt i;\r\r\t/* begin compilerMarkHook */\r\tif (foo->compilerInitialized) {\r\t\tcompilerMark();\r\t}\r\tmarkAndTrace(foo->specialObjectsOop);\r\tif (foo->compilerInitialized) {\r\t\tmarkAndTrace(foo->receiver);\r\t\tmarkAndTrace(foo->method);\r\t} else {\r\t\tmarkAndTrace(foo->activeContext);\r\t}\r\tmarkAndTrace(foo->messageSelector);\r\tmarkAndTrace(foo->newMethod);\r\tmarkAndTrace(foo->methodClass);\r\tmarkAndTrace(foo->lkupClass);\r\tmarkAndTrace(foo->receiverClass);\r\tfor (i = 1; i <= foo->remapBufferCount; i += 1) {\r\t\toop = foo->remapBuffer[i];\r\t\tif (!((oop & 1))) {\r\t\t\tmarkAndTrace(oop);\r\t\t}\r\t}\r\tfor (i = 1; i <= foo->jmpDepth; i += 1) {\r\t\toop = foo->suspendedCallbacks[i];\r\t\tif (!((oop & 1))) {\r\t\t\tmarkAndTrace(oop);\r\t\t}\r\t\toop = foo->suspendedMethods[i];\r\t\tif (!((oop & 1))) {\r\t\t\tmarkAndTrace(oop);\r\t\t}\r\t}\r}\r\r\r/*\tMark phase of the mark and sweep garbage collector. Set \r\tthe mark bits of all reachable objects. Free chunks are \r\tuntouched by this process. */\r/*\tAssume: All non-free objects are initially unmarked. Root \r\tobjects were unmarked when they were made roots. (Make \r\tsure this stays true!!). */\r\rsqInt markPhase(void) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r    sqInt i;\r\r\tfoo->freeContexts = NilContext;\r\r\t/* trace the interpreter's objects, including the active stack \r\tand special objects array */\r\r\tfoo->freeLargeContexts = NilContext;\r\tmarkAndTraceInterpreterOops();\r\r\t/* trace the roots */\r\r\tfoo->statSpecialMarkCount = foo->statMarkCount;\r\tfor (i = 1; i <= foo->rootTableCount; i += 1) {\r\t\toop = foo->rootTable[i];\r\t\tmarkAndTrace(oop);\r\t}\r\tfor (i = 1; i <= foo->extraRootCount; i += 1) {\r\t\toop = (foo->extraRoots[i])[0];\r\t\tif (!((oop & 1))) {\r\t\t\tmarkAndTrace(oop);\r\t\t}\r\t}\r}\r\rsqInt methodArgumentCount(void) {\r\treturn foo->argumentCount;\r}\r\rsqInt methodPrimitiveIndex(void) {\r\treturn foo->primitiveIndex;\r}\r\r\r/*\tThe module with the given name was just unloaded. \r\tMake sure we have no dangling references. */\r\rEXPORT(sqInt) moduleUnloaded(char * aModuleName) {\r\tif ((strcmp(aModuleName, \"SurfacePlugin\")) == 0) {\r\r\t\t/* Surface plugin went away. Should never happen. But  then, who knows */\r\r\t\tshowSurfaceFn = 0;\r\t}\r}\r\r\r/*\tFor access from BitBlt module */\r\rsqInt nilObject(void) {\r\treturn foo->nilObj;\r}\r\r\r/*\tReturn the number of non-weak fields in oop (i.e. the number of fixed fields).\r\tNote: The following is copied from fixedFieldsOf:format:length: since we do know\r\tthe format of the oop (e.g. format = 4) and thus don't need the length. */\r\rsqInt nonWeakFieldsOf(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt classFormat;\r    sqInt class;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\tif (!(((((usqInt) (longAt(oop))) >> 8) & 15) == 4)) {\r\t\terror(\"Called fixedFieldsOfWeak: with a non-weak oop\");\r\t}\r\t/* begin fetchClassOf: */\r\tif ((oop & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tclass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(oop))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tclass = (longAt(oop - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tclass = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\rl1:\t/* end fetchClassOf: */;\r\tclassFormat = (longAt((class + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1;\r\treturn (((((usqInt) classFormat) >> 11) & 192) + ((((usqInt) classFormat) >> 2) & 63)) - 1;\r}\r\r\r/*\tRecord that the given oop in the old object area points to an \r\tobject in the young area. \r\tHeaderLoc is usually = oop, but may be an addr in a \r\tforwarding block. */\r\rsqInt noteAsRootheaderLoc(sqInt oop, sqInt headerLoc) {\rregister struct foo * foo = &fum;\r    sqInt header;\r\r\theader = longAt(headerLoc);\r\tif ((header & (ROOT_BIT)) == 0) {\r\t\tif (foo->rootTableCount < RootTableRedZone) {\r\r\t\t\t/* record oop as root only if not already recorded */\r\t\t\t/* record root if there is enough room in the roots \r\t\t\t\t\ttable  */\r\r\t\t\tfoo->rootTableCount += 1;\r\t\t\tfoo->rootTable[foo->rootTableCount] = oop;\r\t\t\tlongAtput(headerLoc, header | (ROOT_BIT));\r\t\t} else {\r\t\t\tif (foo->rootTableCount < RootTableSize) {\r\r\t\t\t\t/* we're getting in the red zone */\r\t\t\t\t/* but there's still space to record it */\r\r\t\t\t\tfoo->rootTableCount += 1;\r\t\t\t\tfoo->rootTable[foo->rootTableCount] = oop;\r\t\t\t\tlongAtput(headerLoc, header | (ROOT_BIT));\r\t\t\t\tfoo->allocationCount = foo->allocationsBetweenGCs + 1;\r\t\t\t}\r\t\t}\r\t}\r}\r\r\r/*\tThis should never be called: either the compiler is uninitialised (in which case the hooks should never be reached) or the compiler initialisation should have replaced all the hook with their external implementations. */\r\rsqInt nullCompilerHook(void) {\r\terror(\"uninitialised compiler hook called\");\r\treturn 0;\r}\r\r\r/*\tReturn the object or free chunk immediately following the \r\tgiven object or free chunk in memory. Return endOfMemory \r\twhen enumeration is complete. */\r\rsqInt objectAfter(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt sz;\r    sqInt header;\r\r\tif (DoAssertionChecks) {\r\t\tif ((((usqInt) oop)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\terror(\"no objects after the end of memory\");\r\t\t}\r\t}\r\tif (((longAt(oop)) & TypeMask) == HeaderTypeFree) {\r\t\tsz = (longAt(oop)) & (ALL_BUT_TYPE_MASK);\r\t} else {\r\t\t/* begin sizeBitsOf: */\r\t\theader = longAt(oop);\r\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\tsz = header & (SIZE_MASK);\r\t\t\tgoto l1;\r\t\t}\r\tl1:\t/* end sizeBitsOf: */;\r\t}\r\treturn (oop + sz) + (foo->headerTypeBytes[(longAt(oop + sz)) & TypeMask]);\r}\r\r\r/*\tThis message is deprecated but supported for a while via a tweak to sqVirtualMachine.[ch] Use fetchLong32, fetchLong64 or fetchPointer instead for new code */\r\rsqInt obsoleteDontUseThisFetchWordofObject(sqInt fieldIndex, sqInt oop) {\r\treturn long32At((oop + (BASE_HEADER_SIZE)) + (fieldIndex << 2));\r}\r\r\r/*\tIf this is a pointers object, check that its fields are all okay oops. */\r\rsqInt okayFields(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt i;\r    sqInt c;\r    sqInt fieldOop;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\tif ((oop == null) || (oop == 0)) {\r\t\treturn 1;\r\t}\r\tif ((oop & 1)) {\r\t\treturn 1;\r\t}\r\tokayOop(oop);\r\toopHasOkayClass(oop);\r\tif (!(((oop & 1) == 0) && (((((usqInt) (longAt(oop))) >> 8) & 15) <= 4))) {\r\t\treturn 1;\r\t}\r\t/* begin fetchClassOf: */\r\tif ((oop & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tc = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(oop))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tc = (longAt(oop - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tc = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\rl1:\t/* end fetchClassOf: */;\r\tif ((c == (fetchPointerofObject(ClassMethodContext, foo->specialObjectsOop))) || (c == (fetchPointerofObject(ClassBlockContext, foo->specialObjectsOop)))) {\r\t\ti = (CtxtTempFrameStart + (fetchStackPointerOf(oop))) - 1;\r\t} else {\r\t\ti = (lengthOf(oop)) - 1;\r\t}\r\twhile (i >= 0) {\r\t\tfieldOop = longAt((oop + (BASE_HEADER_SIZE)) + (i << (SHIFT_FOR_WORD)));\r\t\tif (!((fieldOop & 1))) {\r\t\t\tokayOop(fieldOop);\r\t\t\toopHasOkayClass(fieldOop);\r\t\t}\r\t\ti -= 1;\r\t}\r}\r\r\r/*\tVerify that the given oop is legitimate. Check address, header, and size but not class. */\r\rsqInt okayOop(sqInt signedOop) {\rregister struct foo * foo = &fum;\r    usqInt oop;\r    sqInt unusedBit;\r    sqInt sz;\r    sqInt type;\r    sqInt fmt;\r    sqInt header;\r\r\r\t/* address and size checks */\r\r\toop = ((usqInt) signedOop);\r\tif ((oop & 1)) {\r\t\treturn 1;\r\t}\r\tif (!(oop < foo->endOfMemory)) {\r\t\terror(\"oop is not a valid address\");\r\t}\r\tif (!((oop % (BYTES_PER_WORD)) == 0)) {\r\t\terror(\"oop is not a word-aligned address\");\r\t}\r\t/* begin sizeBitsOf: */\r\theader = longAt(oop);\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\tsz = header & (SIZE_MASK);\r\t\tgoto l1;\r\t}\rl1:\t/* end sizeBitsOf: */;\r\tif (!((oop + sz) < foo->endOfMemory)) {\r\t\terror(\"oop size would make it extend beyond the end of memory\");\r\t}\r\ttype = (longAt(oop)) & TypeMask;\r\tif (type == HeaderTypeFree) {\r\t\terror(\"oop is a free chunk, not an object\");\r\t}\r\tif (type == HeaderTypeShort) {\r\t\tif (((((usqInt) (longAt(oop))) >> 12) & 31) == 0) {\r\t\t\terror(\"cannot have zero compact class field in a short header\");\r\t\t}\r\t}\r\tif (type == HeaderTypeClass) {\r\t\tif (!((oop >= (BYTES_PER_WORD)) && (((longAt(oop - (BYTES_PER_WORD))) & TypeMask) == type))) {\r\t\t\terror(\"class header word has wrong type\");\r\t\t}\r\t}\r\tif (type == HeaderTypeSizeAndClass) {\r\t\tif (!((oop >= ((BYTES_PER_WORD) * 2)) && ((((longAt(oop - ((BYTES_PER_WORD) * 2))) & TypeMask) == type) && (((longAt(oop - (BYTES_PER_WORD))) & TypeMask) == type)))) {\r\t\t\terror(\"class header word has wrong type\");\r\t\t}\r\t}\r\tfmt = (((usqInt) (longAt(oop))) >> 8) & 15;\r\tif ((fmt == 5) || (fmt == 7)) {\r\t\terror(\"oop has an unknown format type\");\r\t}\r\tunusedBit = 536870912;\r\tif ((BYTES_PER_WORD) == 8) {\r\t\tunusedBit = unusedBit << 16;\r\t\tunusedBit = unusedBit << 16;\r\t}\r\tif (!(((longAt(oop)) & unusedBit) == 0)) {\r\t\terror(\"unused header bit 30 is set; should be zero\");\r\t}\r\tif ((((longAt(oop)) & (ROOT_BIT)) == 1) && (oop >= foo->youngStart)) {\r\t\terror(\"root bit is set in a young object\");\r\t}\r\treturn 1;\r}\r\r\r/*\tCompare two oop values, treating them as object memory locations.\r\tUse #cCoerce:to: to ensure comparison of unsigned magnitudes. This\r\tmethod will be inlined during C translation. */\r\rsqInt oopisGreaterThan(sqInt anOop, sqInt otherOop) {\r\treturn (((usqInt) anOop)) > (((usqInt) otherOop));\r}\r\r\r/*\tCompare two oop values, treating them as object memory locations.\r\tUse #cCoerce:to: to ensure comparison of unsigned magnitudes. This\r\tmethod will be inlined during C translation. */\r\rsqInt oopisGreaterThanOrEqualTo(sqInt anOop, sqInt otherOop) {\r\treturn (((usqInt) anOop)) >= (((usqInt) otherOop));\r}\r\r\r/*\tCompare two oop values, treating them as object memory locations.\r\tUse #cCoerce:to: to ensure comparison of unsigned magnitudes. This\r\tmethod will be inlined during C translation. */\r\rsqInt oopisLessThan(sqInt anOop, sqInt otherOop) {\r\treturn (((usqInt) anOop)) < (((usqInt) otherOop));\r}\r\r\r/*\tSimilar to oopHasOkayClass:, except that it only returns true or false. */\r\rsqInt oopHasAcceptableClass(sqInt signedOop) {\rregister struct foo * foo = &fum;\r    usqInt oop;\r    sqInt formatMask;\r    usqInt oopClass;\r    sqInt behaviorFormatBits;\r    sqInt oopFormatBits;\r\r\tif ((signedOop & 1)) {\r\t\treturn 1;\r\t}\r\toop = ((usqInt) signedOop);\r\tif (!(oop < foo->endOfMemory)) {\r\t\treturn 0;\r\t}\r\tif (!((oop % (BYTES_PER_WORD)) == 0)) {\r\t\treturn 0;\r\t}\r\tif (!((oop + (sizeBitsOf(oop))) < foo->endOfMemory)) {\r\t\treturn 0;\r\t}\r\toopClass = ((usqInt) (fetchClassOf(oop)));\r\tif ((oopClass & 1)) {\r\t\treturn 0;\r\t}\r\tif (!(oopClass < foo->endOfMemory)) {\r\t\treturn 0;\r\t}\r\tif (!((oopClass % (BYTES_PER_WORD)) == 0)) {\r\t\treturn 0;\r\t}\r\tif (!((oopClass + (sizeBitsOf(oopClass))) < foo->endOfMemory)) {\r\t\treturn 0;\r\t}\r\tif (!((((oopClass & 1) == 0) && (((((usqInt) (longAt(oopClass))) >> 8) & 15) <= 4)) && ((lengthOf(oopClass)) >= 3))) {\r\t\treturn 0;\r\t}\r\tif (((oop & 1) == 0) && (((((usqInt) (longAt(oop))) >> 8) & 15) >= 8)) {\r\r\t\t/* ignore extra bytes size bits */\r\r\t\tformatMask = 3072;\r\t} else {\r\t\tformatMask = 3840;\r\t}\r\tbehaviorFormatBits = ((longAt((oopClass + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1) & formatMask;\r\toopFormatBits = (longAt(oop)) & formatMask;\r\tif (!(behaviorFormatBits == oopFormatBits)) {\r\t\treturn 0;\r\t}\r\treturn 1;\r}\r\r\r/*\tAttempt to verify that the given oop has a reasonable behavior. The class must be a valid, non-integer oop and must not be nilObj. It must be a pointers object with three or more fields. Finally, the instance specification field of the behavior must match that of the instance. */\r\rsqInt oopHasOkayClass(sqInt signedOop) {\r    usqInt oop;\r    sqInt formatMask;\r    usqInt oopClass;\r    sqInt behaviorFormatBits;\r    sqInt oopFormatBits;\r\r\toop = ((usqInt) signedOop);\r\tokayOop(oop);\r\toopClass = ((usqInt) (fetchClassOf(oop)));\r\tif ((oopClass & 1)) {\r\t\terror(\"a SmallInteger is not a valid class or behavior\");\r\t}\r\tokayOop(oopClass);\r\tif (!((((oopClass & 1) == 0) && (((((usqInt) (longAt(oopClass))) >> 8) & 15) <= 4)) && ((lengthOf(oopClass)) >= 3))) {\r\t\terror(\"a class (behavior) must be a pointers object of size >= 3\");\r\t}\r\tif (((oop & 1) == 0) && (((((usqInt) (longAt(oop))) >> 8) & 15) >= 8)) {\r\r\t\t/* ignore extra bytes size bits */\r\r\t\tformatMask = 3072;\r\t} else {\r\t\tformatMask = 3840;\r\t}\r\tbehaviorFormatBits = ((longAt((oopClass + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1) & formatMask;\r\toopFormatBits = (longAt(oop)) & formatMask;\r\tif (!(behaviorFormatBits == oopFormatBits)) {\r\t\terror(\"object and its class (behavior) formats differ\");\r\t}\r\treturn 1;\r}\r\r\r/*\tNote: May be called by translated primitive code. */\r\rsqInt pop(sqInt nItems) {\rregister struct foo * foo = &fum;\r\tfoo->stackPointer -= nItems * (BYTES_PER_WORD);\r}\r\rsqInt popthenPush(sqInt nItems, sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt sp;\r\r\tlongAtput(sp = foo->stackPointer - ((nItems - 1) * (BYTES_PER_WORD)), oop);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tNote: May be called by translated primitive code. */\r\rdouble popFloat(void) {\rregister struct foo * foo = &fum;\r    double  result;\r    sqInt top;\r    sqInt top1;\r    sqInt classOop;\r    sqInt cl;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop;\r\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\ttop = top1;\r\t/* begin assertClassOf:is: */\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\tclassOop = longAt((oop + (BASE_HEADER_SIZE)) + (ClassFloat << (SHIFT_FOR_WORD)));\r\tif ((top & 1)) {\r\t\tfoo->successFlag = 0;\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(top))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tcl = (longAt(top - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop2 = foo->specialObjectsOop;\r\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tcl = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t}\r\t/* begin success: */\r\tfoo->successFlag = (cl == classOop) && foo->successFlag;\rl1:\t/* end assertClassOf:is: */;\r\tif (foo->successFlag) {\r\t\t;\r\t\tfetchFloatAtinto(top + (BASE_HEADER_SIZE), result);\r\t}\r\treturn result;\r}\r\r\r/*\tPop and return the possibly remapped object from the remap buffer. */\r\rsqInt popRemappableOop(void) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r\r\toop = foo->remapBuffer[foo->remapBufferCount];\r\tfoo->remapBufferCount -= 1;\r\treturn oop;\r}\r\rsqInt popStack(void) {\rregister struct foo * foo = &fum;\r    sqInt top;\r\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\treturn top;\r}\r\r\r/*\tNote - integerValue is interpreted as POSITIVE, eg, as the result of\r\t\tBitmap>at:, or integer>bitAnd:. */\r\rsqInt positive32BitIntegerFor(sqInt integerValue) {\rregister struct foo * foo = &fum;\r    sqInt newLargeInteger;\r\r\tif (integerValue >= 0) {\r\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t(((((int) integerValue)) ^ ((((int) integerValue)) << 1)) >= 0)\r# else\r\t\t\t((integerValue >= -1073741824) && (integerValue <= 1073741823))\r# endif  // SQ_HOST32\r\t\t) {\r\t\t\treturn ((integerValue << 1) | 1);\r\t\t}\r\t}\r\tif ((BYTES_PER_WORD) == 4) {\r\r\t\t/* Faster instantiateSmallClass: currently only works with integral word size. */\r\r\t\tnewLargeInteger = instantiateSmallClasssizeInBytes(fetchPointerofObject(ClassLargePositiveInteger, foo->specialObjectsOop), (BASE_HEADER_SIZE) + 4);\r\t} else {\r\r\t\t/* Cant use instantiateSmallClass: due to integral word requirement. */\r\r\t\tnewLargeInteger = instantiateClassindexableSize(fetchPointerofObject(ClassLargePositiveInteger, foo->specialObjectsOop), 4);\r\t}\r\tbyteAtput((newLargeInteger + (BASE_HEADER_SIZE)) + 3, (((usqInt) integerValue) >> 24) & 255);\r\tbyteAtput((newLargeInteger + (BASE_HEADER_SIZE)) + 2, (((usqInt) integerValue) >> 16) & 255);\r\tbyteAtput((newLargeInteger + (BASE_HEADER_SIZE)) + 1, (((usqInt) integerValue) >> 8) & 255);\r\tbyteAtput((newLargeInteger + (BASE_HEADER_SIZE)) + 0, integerValue & 255);\r\treturn newLargeInteger;\r}\r\r\r/*\tConvert the given object into an integer value.\r\tThe object may be either a positive ST integer or a four-byte LargePositiveInteger. */\r\rsqInt positive32BitValueOf(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt sz;\r    sqInt value;\r    sqInt header;\r    sqInt sz1;\r    sqInt classOop;\r    sqInt cl;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\tif ((oop & 1)) {\r\t\tvalue = (oop >> 1);\r\t\tif (value < 0) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t\treturn value;\r\t}\r\t/* begin assertClassOf:is: */\r\t/* begin fetchPointer:ofObject: */\r\toop3 = foo->specialObjectsOop;\r\tclassOop = longAt((oop3 + (BASE_HEADER_SIZE)) + (ClassLargePositiveInteger << (SHIFT_FOR_WORD)));\r\tif ((oop & 1)) {\r\t\tfoo->successFlag = 0;\r\t\tgoto l2;\r\t}\r\tccIndex = (((usqInt) (longAt(oop))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tcl = (longAt(oop - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop2 = foo->specialObjectsOop;\r\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tcl = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t}\r\t/* begin success: */\r\tfoo->successFlag = (cl == classOop) && foo->successFlag;\rl2:\t/* end assertClassOf:is: */;\r\tif (foo->successFlag) {\r\t\t/* begin lengthOf: */\r\t\theader = longAt(oop);\r\t\t/* begin lengthOf:baseHeader:format: */\r\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\tsz1 = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t} else {\r\t\t\tsz1 = header & (SIZE_MASK);\r\t\t}\r\t\tsz1 -= header & (SIZE_4_BIT);\r\t\tif (((((usqInt) header) >> 8) & 15) <= 4) {\r\t\t\tsz = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\t\tgoto l1;\r\t\t}\r\t\tif (((((usqInt) header) >> 8) & 15) < 8) {\r\t\t\tsz = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> 2;\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\tsz = (sz1 - (BASE_HEADER_SIZE)) - (((((usqInt) header) >> 8) & 15) & 3);\r\t\t\tgoto l1;\r\t\t}\r\tl1:\t/* end lengthOf:baseHeader:format: */;\r\t\tif (!(sz == 4)) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t}\r\tif (foo->successFlag) {\r\t\treturn (((byteAt((oop + (BASE_HEADER_SIZE)) + 0)) + ((byteAt((oop + (BASE_HEADER_SIZE)) + 1)) << 8)) + ((byteAt((oop + (BASE_HEADER_SIZE)) + 2)) << 16)) + ((byteAt((oop + (BASE_HEADER_SIZE)) + 3)) << 24);\r\t}\r}\r\r\r/*\tNote - integerValue is interpreted as POSITIVE, eg, as the result of\r\t\tBitmap>at:, or integer>bitAnd:. */\r\rsqInt positive64BitIntegerFor(sqLong integerValue) {\r    sqInt sz;\r    sqInt highWord;\r    sqInt i;\r    sqInt value;\r    sqInt newLargeInteger;\r\r\tif ((sizeof(integerValue)) == 4) {\r\t\treturn positive32BitIntegerFor(integerValue);\r\t}\r\r\t/* shift is coerced to usqInt otherwise */\r\r\thighWord = integerValue >> 32;\r\tif (highWord == 0) {\r\t\treturn positive32BitIntegerFor(integerValue);\r\t}\r\tsz = 5;\r\tif (!((highWord = ((usqInt) highWord) >> 8) == 0)) {\r\t\tsz += 1;\r\t}\r\tif (!((highWord = ((usqInt) highWord) >> 8) == 0)) {\r\t\tsz += 1;\r\t}\r\tif (!((highWord = ((usqInt) highWord) >> 8) == 0)) {\r\t\tsz += 1;\r\t}\r\tnewLargeInteger = instantiateClassindexableSize(fetchPointerofObject(ClassLargePositiveInteger, foo->specialObjectsOop), sz);\r\tfor (i = 0; i <= (sz - 1); i += 1) {\r\t\tvalue = (integerValue >> (i * 8)) & 255;\r\t\tbyteAtput((newLargeInteger + (BASE_HEADER_SIZE)) + i, value);\r\t}\r\treturn newLargeInteger;\r}\r\r\r/*\tConvert the given object into an integer value.\r\tThe object may be either a positive ST integer or a eight-byte LargePositiveInteger. */\r\rsqLong positive64BitValueOf(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt sz;\r    sqInt i;\r    sqLong value;\r    sqInt szsqLong;\r    sqInt header;\r    sqInt sz1;\r    sqInt classOop;\r    sqInt cl;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\tif ((oop & 1)) {\r\t\tvalue = (oop >> 1);\r\t\tif (value < 0) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t\treturn value;\r\t}\r\t/* begin assertClassOf:is: */\r\t/* begin fetchPointer:ofObject: */\r\toop3 = foo->specialObjectsOop;\r\tclassOop = longAt((oop3 + (BASE_HEADER_SIZE)) + (ClassLargePositiveInteger << (SHIFT_FOR_WORD)));\r\tif ((oop & 1)) {\r\t\tfoo->successFlag = 0;\r\t\tgoto l2;\r\t}\r\tccIndex = (((usqInt) (longAt(oop))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tcl = (longAt(oop - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop2 = foo->specialObjectsOop;\r\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tcl = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t}\r\t/* begin success: */\r\tfoo->successFlag = (cl == classOop) && foo->successFlag;\rl2:\t/* end assertClassOf:is: */;\r\tif (!(foo->successFlag)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tszsqLong = sizeof(sqLong);\r\t/* begin lengthOf: */\r\theader = longAt(oop);\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz1 = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz1 = header & (SIZE_MASK);\r\t}\r\tsz1 -= header & (SIZE_4_BIT);\r\tif (((((usqInt) header) >> 8) & 15) <= 4) {\r\t\tsz = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tgoto l1;\r\t}\r\tif (((((usqInt) header) >> 8) & 15) < 8) {\r\t\tsz = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> 2;\r\t\tgoto l1;\r\t} else {\r\t\tsz = (sz1 - (BASE_HEADER_SIZE)) - (((((usqInt) header) >> 8) & 15) & 3);\r\t\tgoto l1;\r\t}\rl1:\t/* end lengthOf:baseHeader:format: */;\r\tif (sz > szsqLong) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tvalue = 0;\r\tfor (i = 0; i <= (sz - 1); i += 1) {\r\t\tvalue += (((sqLong) (byteAt((oop + (BASE_HEADER_SIZE)) + i)))) << (i * 8);\r\t}\r\treturn value;\r}\r\r\r/*\toop is an old object. If valueObj is young, mark the object as a root. */\r\rsqInt possibleRootStoreIntovalue(sqInt oop, sqInt valueObj) {\rregister struct foo * foo = &fum;\r    sqInt header;\r\r\tif (((((usqInt) valueObj)) >= (((usqInt) foo->youngStart))) && (!((valueObj & 1)))) {\r\t\t/* begin noteAsRoot:headerLoc: */\r\t\theader = longAt(oop);\r\t\tif ((header & (ROOT_BIT)) == 0) {\r\t\t\tif (foo->rootTableCount < RootTableRedZone) {\r\t\t\t\tfoo->rootTableCount += 1;\r\t\t\t\tfoo->rootTable[foo->rootTableCount] = oop;\r\t\t\t\tlongAtput(oop, header | (ROOT_BIT));\r\t\t\t} else {\r\t\t\t\tif (foo->rootTableCount < RootTableSize) {\r\t\t\t\t\tfoo->rootTableCount += 1;\r\t\t\t\t\tfoo->rootTable[foo->rootTableCount] = oop;\r\t\t\t\t\tlongAtput(oop, header | (ROOT_BIT));\r\t\t\t\t\tfoo->allocationCount = foo->allocationsBetweenGCs + 1;\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t}\r}\r\r\r/*\tMark the active and home contexts as roots if old. This \r\tallows the interpreter to use storePointerUnchecked to \r\tstore into them. */\r\rsqInt postGCAction(void) {\rregister struct foo * foo = &fum;\r    sqInt delta;\r    sqInt limit;\r\r\tif (foo->compilerInitialized) {\r\t\tcompilerPostGC();\r\t} else {\r\t\tif ((((usqInt) foo->activeContext)) < (((usqInt) foo->youngStart))) {\r\t\t\tbeRootIfOld(foo->activeContext);\r\t\t}\r\t\tif ((((usqInt) foo->theHomeContext)) < (((usqInt) foo->youngStart))) {\r\t\t\tbeRootIfOld(foo->theHomeContext);\r\t\t}\r\t}\r\tif (oopisGreaterThan((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), foo->shrinkThreshold)) {\r\t\t/* begin shrinkObjectMemory: */\r\t\tdelta = ((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK)) - foo->growHeadroom;\r\t\tfoo->statShrinkMemory += 1;\r\t\tlimit = sqShrinkMemoryBy(foo->memoryLimit, delta);\r\t\tif (!(limit == foo->memoryLimit)) {\r\t\t\tfoo->memoryLimit = limit - 24;\r\t\t\tinitializeMemoryFirstFree(foo->freeBlock);\r\t\t}\r\t}\r\t/* begin signalSemaphoreWithIndex: */\r\tif (foo->gcSemaphoreIndex <= 0) {\r\t\tgoto l1;\r\t}\r\tif (foo->semaphoresUseBufferA) {\r\t\tif (foo->semaphoresToSignalCountA < SemaphoresToSignalSize) {\r\t\t\tfoo->semaphoresToSignalCountA += 1;\r\t\t\tfoo->semaphoresToSignalA[foo->semaphoresToSignalCountA] = foo->gcSemaphoreIndex;\r\t\t}\r\t} else {\r\t\tif (foo->semaphoresToSignalCountB < SemaphoresToSignalSize) {\r\t\t\tfoo->semaphoresToSignalCountB += 1;\r\t\t\tfoo->semaphoresToSignalB[foo->semaphoresToSignalCountB] = foo->gcSemaphoreIndex;\r\t\t}\r\t}\r\t/* begin forceInterruptCheck */\r\tfoo->interruptCheckCounter = -1000;\r\tfoo->nextPollTick = 0;\rl1:\t/* end signalSemaphoreWithIndex: */;\r}\r\r\r/*\tEnsure that there are enough forwarding blocks to \r\taccomodate this become, then prepare forwarding blocks for \r\tthe pointer swap. Return true if successful. */\r/*\tDetails: Doing a GC might generate enough space for \r\tforwarding blocks if we're short. However, this is an \r\tuncommon enough case that it is better handled by primitive \r\tfail code at the Smalltalk level. */\r/*\tImportant note on multiple references to same object  - since the preparation of\r\tfwdBlocks is NOT idempotent we get VM crashes if the same object is referenced more\r\tthan once in such a way as to require multiple fwdBlocks.\r\toop1 forwardBecome: oop1 is ok since only a single fwdBlock is needed.\r\toop1 become: oop1 would fail because the second fwdBlock woudl not have the actual object\r\theader but rather the mutated ref to the first fwdBlock.\r\tFurther problems can arise with an array1 or array2 that refer multiply to the same \r\tobject. This would notbe expected input for programmer writen code but might arise from\r\tautomatic usage such as in ImageSegment loading.\r\tTo avoid the simple and rather common case of oop1 become*: oop1, we skip such pairs\r\tand simply avoid making fwdBlocks - it is redundant anyway */\r\rsqInt prepareForwardingTableForBecomingwithtwoWay(sqInt array1, sqInt array2, sqInt twoWayFlag) {\rregister struct foo * foo = &fum;\r    sqInt fieldOffset;\r    sqInt oop1;\r    sqInt entriesAvailable;\r    sqInt entriesNeeded;\r    sqInt fwdBlock;\r    sqInt oop2;\r    sqInt fwdBlkSize;\r    sqInt originalHeader;\r    sqInt originalHeaderType;\r    sqInt originalHeader1;\r    sqInt originalHeaderType1;\r    sqInt sz;\r    sqInt header;\r    sqInt contextSize;\r    sqInt fmt;\r    sqInt methodHeader;\r    sqInt header1;\r    sqInt type;\r    sqInt sp;\r\r\r\t/* need enough entries for all oops */\r\t/* Note: Forward blocks must be quadword aligned - see fwdTableInit:. */\r\r\tentriesNeeded = (lastPointerOf(array1)) / (BYTES_PER_WORD);\r\tif (twoWayFlag) {\r\r\t\t/* Double the number of blocks for two-way become */\r\r\t\tentriesNeeded = entriesNeeded * 2;\r\t\tfwdBlkSize = (BYTES_PER_WORD) * 2;\r\t} else {\r\r\t\t/* One-way become needs backPointers in fwd blocks. */\r\r\t\tfwdBlkSize = (BYTES_PER_WORD) * 4;\r\t}\r\tentriesAvailable = fwdTableInit(fwdBlkSize);\r\tif (entriesAvailable < entriesNeeded) {\r\t\tinitializeMemoryFirstFree(foo->freeBlock);\r\t\treturn 0;\r\t}\r\t/* begin lastPointerOf: */\r\theader = longAt(array1);\r\tfmt = (((usqInt) header) >> 8) & 15;\r\tif (fmt <= 4) {\r\t\tif ((fmt == 3) && ((((((usqInt) header) >> 12) & 31) == 13) || ((((((usqInt) header) >> 12) & 31) == 14) || (((((usqInt) header) >> 12) & 31) == 4)))) {\r\t\t\t/* begin fetchStackPointerOf: */\r\t\t\tsp = longAt((array1 + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)));\r\t\t\tif (!((sp & 1))) {\r\t\t\t\tcontextSize = 0;\r\t\t\t\tgoto l5;\r\t\t\t}\r\t\t\tcontextSize = (sp >> 1);\r\t\tl5:\t/* end fetchStackPointerOf: */;\r\t\t\tfieldOffset = (CtxtTempFrameStart + contextSize) * (BYTES_PER_WORD);\r\t\t\tgoto l6;\r\t\t}\r\t\t/* begin sizeBitsOfSafe: */\r\t\theader1 = longAt(array1);\r\t\t/* begin rightType: */\r\t\tif ((header1 & (SIZE_MASK)) == 0) {\r\t\t\ttype = HeaderTypeSizeAndClass;\r\t\t\tgoto l3;\r\t\t} else {\r\t\t\tif ((header1 & CompactClassMask) == 0) {\r\t\t\t\ttype = HeaderTypeClass;\r\t\t\t\tgoto l3;\r\t\t\t} else {\r\t\t\t\ttype = HeaderTypeShort;\r\t\t\t\tgoto l3;\r\t\t\t}\r\t\t}\r\tl3:\t/* end rightType: */;\r\t\tif (type == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(array1 - ((BYTES_PER_WORD) * 2))) & (ALL_BUT_TYPE_MASK);\r\t\t\tgoto l4;\r\t\t} else {\r\t\t\tsz = header1 & (SIZE_MASK);\r\t\t\tgoto l4;\r\t\t}\r\tl4:\t/* end sizeBitsOfSafe: */;\r\t\tfieldOffset = sz - (BASE_HEADER_SIZE);\r\t\tgoto l6;\r\t}\r\tif (fmt < 12) {\r\t\tfieldOffset = 0;\r\t\tgoto l6;\r\t}\r\tmethodHeader = longAt(array1 + (BASE_HEADER_SIZE));\r\tfieldOffset = (((((usqInt) methodHeader) >> 10) & 255) * (BYTES_PER_WORD)) + (BASE_HEADER_SIZE);\rl6:\t/* end lastPointerOf: */;\r\twhile (fieldOffset >= (BASE_HEADER_SIZE)) {\r\t\toop1 = longAt(array1 + fieldOffset);\r\r\t\t/* if oop1 == oop2, no need to do any work for this pair.\r\t\t\tMay still be other entries in the arrays though so keep looking */\r\r\t\toop2 = longAt(array2 + fieldOffset);\r\t\tif (!(oop1 == oop2)) {\r\t\t\t/* begin fwdBlockGet: */\r\t\t\tfoo->fwdTableNext += fwdBlkSize;\r\t\t\tif (foo->fwdTableNext <= foo->fwdTableLast) {\r\t\t\t\tfwdBlock = foo->fwdTableNext;\r\t\t\t\tgoto l2;\r\t\t\t} else {\r\t\t\t\tfwdBlock = null;\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\tl2:\t/* end fwdBlockGet: */;\r\t\t\t/* begin initForwardBlock:mapping:to:withBackPtr: */\r\t\t\toriginalHeader1 = longAt(oop1);\r\t\t\tif (DoAssertionChecks) {\r\t\t\t\tif (fwdBlock == null) {\r\t\t\t\t\terror(\"ran out of forwarding blocks in become\");\r\t\t\t\t}\r\t\t\t\tif ((originalHeader1 & (MARK_BIT)) != 0) {\r\t\t\t\t\terror(\"object already has a forwarding table entry\");\r\t\t\t\t}\r\t\t\t}\r\t\t\toriginalHeaderType1 = originalHeader1 & TypeMask;\r\t\t\tlongAtput(fwdBlock, oop2);\r\t\t\tlongAtput(fwdBlock + (BYTES_PER_WORD), originalHeader1);\r\t\t\tif (!twoWayFlag) {\r\t\t\t\tlongAtput(fwdBlock + ((BYTES_PER_WORD) * 2), oop1);\r\t\t\t}\r\t\t\tlongAtput(oop1, (((usqInt) fwdBlock) >> 1) | ((MARK_BIT) | originalHeaderType1));\r\t\t\tif (twoWayFlag) {\r\t\t\t\t/* begin fwdBlockGet: */\r\t\t\t\tfoo->fwdTableNext += fwdBlkSize;\r\t\t\t\tif (foo->fwdTableNext <= foo->fwdTableLast) {\r\t\t\t\t\tfwdBlock = foo->fwdTableNext;\r\t\t\t\t\tgoto l1;\r\t\t\t\t} else {\r\t\t\t\t\tfwdBlock = null;\r\t\t\t\t\tgoto l1;\r\t\t\t\t}\r\t\t\tl1:\t/* end fwdBlockGet: */;\r\t\t\t\t/* begin initForwardBlock:mapping:to:withBackPtr: */\r\t\t\t\toriginalHeader = longAt(oop2);\r\t\t\t\tif (DoAssertionChecks) {\r\t\t\t\t\tif (fwdBlock == null) {\r\t\t\t\t\t\terror(\"ran out of forwarding blocks in become\");\r\t\t\t\t\t}\r\t\t\t\t\tif ((originalHeader & (MARK_BIT)) != 0) {\r\t\t\t\t\t\terror(\"object already has a forwarding table entry\");\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\toriginalHeaderType = originalHeader & TypeMask;\r\t\t\t\tlongAtput(fwdBlock, oop1);\r\t\t\t\tlongAtput(fwdBlock + (BYTES_PER_WORD), originalHeader);\r\t\t\t\tif (!twoWayFlag) {\r\t\t\t\t\tlongAtput(fwdBlock + ((BYTES_PER_WORD) * 2), oop2);\r\t\t\t\t}\r\t\t\t\tlongAtput(oop2, (((usqInt) fwdBlock) >> 1) | ((MARK_BIT) | originalHeaderType));\r\t\t\t}\r\t\t}\r\t\tfieldOffset -= BYTES_PER_WORD;\r\t}\r\treturn 1;\r}\r\rsqInt primitiveAdd(void) {\rregister struct foo * foo = &fum;\r    sqInt integerResult;\r    sqInt sp;\r\r\t/* begin pop2AndPushIntegerIfOK: */\r\tintegerResult = (stackIntegerValue(1)) + (stackIntegerValue(0));\r\tif (foo->successFlag) {\r\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t(((((int) integerResult)) ^ ((((int) integerResult)) << 1)) >= 0)\r# else\r\t\t\t((integerResult >= -1073741824) && (integerResult <= 1073741823))\r# endif  // SQ_HOST32\r\t\t) {\r\t\t\t/* begin pop:thenPush: */\r\t\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), ((integerResult << 1) | 1));\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\tfoo->successFlag = 0;\r\t\t}\r\t}\r}\r\rsqInt primitiveArctan(void) {\rregister struct foo * foo = &fum;\r    double  rcvr;\r\r\trcvr = popFloat();\r\tif (foo->successFlag) {\r\t\tpushFloat(atan(rcvr));\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 1 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tWe must flush the method cache here, to eliminate stale references\r\tto mutated classes and/or selectors. */\r\rsqInt primitiveArrayBecome(void) {\rregister struct foo * foo = &fum;\r    sqInt arg;\r    sqInt rcvr;\r    sqInt successValue;\r\r\targ = longAt(foo->stackPointer);\r\trcvr = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin success: */\r\tsuccessValue = becomewithtwoWaycopyHash(rcvr, arg, 1, 1);\r\tfoo->successFlag = successValue && foo->successFlag;\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tWe must flush the method cache here, to eliminate stale references\r\tto mutated classes and/or selectors. */\r\rsqInt primitiveArrayBecomeOneWay(void) {\rregister struct foo * foo = &fum;\r    sqInt arg;\r    sqInt rcvr;\r    sqInt successValue;\r\r\targ = longAt(foo->stackPointer);\r\trcvr = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin success: */\r\tsuccessValue = becomewithtwoWaycopyHash(rcvr, arg, 0, 1);\r\tfoo->successFlag = successValue && foo->successFlag;\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tSimilar to primitiveArrayBecomeOneWay but accepts a third argument whether to copy\r\tthe receiver's identity hash over the argument's identity hash. */\r\rsqInt primitiveArrayBecomeOneWayCopyHash(void) {\rregister struct foo * foo = &fum;\r    sqInt arg;\r    sqInt rcvr;\r    sqInt copyHashFlag;\r    sqInt successValue;\r\r\t/* begin booleanValueOf: */\r\tif ((longAt(foo->stackPointer)) == foo->trueObj) {\r\t\tcopyHashFlag = 1;\r\t\tgoto l1;\r\t}\r\tif ((longAt(foo->stackPointer)) == foo->falseObj) {\r\t\tcopyHashFlag = 0;\r\t\tgoto l1;\r\t}\r\tfoo->successFlag = 0;\r\tcopyHashFlag = null;\rl1:\t/* end booleanValueOf: */;\r\targ = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\trcvr = longAt(foo->stackPointer - (2 * (BYTES_PER_WORD)));\r\t/* begin success: */\r\tsuccessValue = becomewithtwoWaycopyHash(rcvr, arg, 0, copyHashFlag);\r\tfoo->successFlag = successValue && foo->successFlag;\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t}\r}\r\rsqInt primitiveAsFloat(void) {\rregister struct foo * foo = &fum;\r    sqInt arg;\r    sqInt integerPointer;\r    sqInt top;\r\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer = top;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\targ = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\targ = 0;\r\t\tgoto l1;\r\t}\rl1:\t/* end checkedIntegerValueOf: */;\r\tif (foo->successFlag) {\r\t\tpushFloat(((double) arg));\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 1 * (BYTES_PER_WORD);\r\t}\r}\r\rsqInt primitiveAsOop(void) {\rregister struct foo * foo = &fum;\r    sqInt thisReceiver;\r    sqInt sp;\r\r\tthisReceiver = longAt(foo->stackPointer);\r\t/* begin success: */\r\tfoo->successFlag = (!((thisReceiver & 1))) && foo->successFlag;\r\tif (foo->successFlag) {\r\t\t/* begin pop:thenPushInteger: */\r\t\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), ((((((usqInt) (longAt(thisReceiver))) >> 17) & 4095) << 1) | 1));\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\rsqInt primitiveAt(void) {\r\tcommonAt(0);\r}\r\rsqInt primitiveAtEnd(void) {\rregister struct foo * foo = &fum;\r    sqInt stream;\r    sqInt index;\r    sqInt limit;\r    sqInt sp;\r    sqInt sp1;\r    sqInt top;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tstream = top;\r\tfoo->successFlag = (((stream & 1) == 0) && (((((usqInt) (longAt(stream))) >> 8) & 15) <= 4)) && ((lengthOf(stream)) >= (StreamReadLimitIndex + 1));\r\tif (foo->successFlag) {\r\t\tindex = fetchIntegerofObject(StreamIndexIndex, stream);\r\t\tlimit = fetchIntegerofObject(StreamReadLimitIndex, stream);\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin pushBool: */\r\t\tif (index >= limit) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 1 * (BYTES_PER_WORD);\r\t}\r}\r\rsqInt primitiveAtPut(void) {\r\tcommonAtPut(0);\r}\r\r\r/*\tSet the cursor to the given shape. The Mac only supports 16x16 pixel cursors. Cursor offsets are handled by Smalltalk. */\r\rsqInt primitiveBeCursor(void) {\rregister struct foo * foo = &fum;\r    sqInt ourCursor;\r    sqInt maskObj;\r    sqInt offsetY;\r    sqInt offsetX;\r    sqInt offsetObj;\r    sqInt cursorObj;\r    sqInt i;\r    sqInt extentY;\r    sqInt maskBitsIndex;\r    sqInt extentX;\r    sqInt bitsObj;\r    sqInt depth;\r    sqInt cursorBitsIndex;\r    sqInt successValue;\r    sqInt successValue1;\r    sqInt successValue2;\r    sqInt successValue3;\r    sqInt successValue4;\r    sqInt successValue5;\r    sqInt successValue6;\r    sqInt successValue7;\r    sqInt successValue8;\r    sqInt successValue9;\r    sqInt successValue10;\r    sqInt successValue11;\r    sqInt successValue12;\r\r\tflag(\"Dan\");\r\tif ((BYTES_PER_WORD) == 8) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= foo->argumentCount * (BYTES_PER_WORD);\r\t\treturn null;\r\t}\r\tif (foo->argumentCount == 0) {\r\t\tcursorObj = longAt(foo->stackPointer);\r\t\tmaskBitsIndex = null;\r\t}\r\tif (foo->argumentCount == 1) {\r\t\tcursorObj = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t\tmaskObj = longAt(foo->stackPointer);\r\t}\r\t/* begin success: */\r\tfoo->successFlag = (foo->argumentCount < 2) && foo->successFlag;\r\t/* begin success: */\r\tsuccessValue11 = (((cursorObj & 1) == 0) && (((((usqInt) (longAt(cursorObj))) >> 8) & 15) <= 4)) && ((lengthOf(cursorObj)) >= 5);\r\tfoo->successFlag = successValue11 && foo->successFlag;\r\tif (foo->successFlag) {\r\t\tbitsObj = longAt((cursorObj + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)));\r\t\textentX = fetchIntegerofObject(1, cursorObj);\r\t\textentY = fetchIntegerofObject(2, cursorObj);\r\t\tdepth = fetchIntegerofObject(3, cursorObj);\r\t\toffsetObj = longAt((cursorObj + (BASE_HEADER_SIZE)) + (4 << (SHIFT_FOR_WORD)));\r\t}\r\t/* begin success: */\r\tsuccessValue12 = (((offsetObj & 1) == 0) && (((((usqInt) (longAt(offsetObj))) >> 8) & 15) <= 4)) && ((lengthOf(offsetObj)) >= 2);\r\tfoo->successFlag = successValue12 && foo->successFlag;\r\tif (foo->successFlag) {\r\t\toffsetX = fetchIntegerofObject(0, offsetObj);\r\t\toffsetY = fetchIntegerofObject(1, offsetObj);\r\t\tif ((foo->argumentCount == 0) && (depth == 32)) {\r\t\t\t/* begin success: */\r\t\t\tsuccessValue = (extentX > 0) && (extentY > 0);\r\t\t\tfoo->successFlag = successValue && foo->successFlag;\r\t\t\t/* begin success: */\r\t\t\tsuccessValue1 = (offsetX >= (extentX * -1)) && (offsetX <= 0);\r\t\t\tfoo->successFlag = successValue1 && foo->successFlag;\r\t\t\t/* begin success: */\r\t\t\tsuccessValue2 = (offsetY >= (extentY * -1)) && (offsetY <= 0);\r\t\t\tfoo->successFlag = successValue2 && foo->successFlag;\r\t\t\tcursorBitsIndex = bitsObj + (BASE_HEADER_SIZE);\r\t\t\t/* begin success: */\r\t\t\tsuccessValue3 = (((bitsObj & 1) == 0) && (((((usqInt) (longAt(bitsObj))) >> 8) & 15) == 6)) && ((lengthOf(bitsObj)) == (extentX * extentY));\r\t\t\tfoo->successFlag = successValue3 && foo->successFlag;\r\t\t\t;\r\t\t} else {\r\t\t\t/* begin success: */\r\t\t\tsuccessValue4 = (extentX == 16) && ((extentY == 16) && (depth == 1));\r\t\t\tfoo->successFlag = successValue4 && foo->successFlag;\r\t\t\t/* begin success: */\r\t\t\tsuccessValue5 = (offsetX >= -16) && (offsetX <= 0);\r\t\t\tfoo->successFlag = successValue5 && foo->successFlag;\r\t\t\t/* begin success: */\r\t\t\tsuccessValue6 = (offsetY >= -16) && (offsetY <= 0);\r\t\t\tfoo->successFlag = successValue6 && foo->successFlag;\r\t\t\t/* begin success: */\r\t\t\tsuccessValue7 = (((bitsObj & 1) == 0) && (((((usqInt) (longAt(bitsObj))) >> 8) & 15) == 6)) && ((lengthOf(bitsObj)) == 16);\r\t\t\tfoo->successFlag = successValue7 && foo->successFlag;\r\t\t\tcursorBitsIndex = bitsObj + (BASE_HEADER_SIZE);\r\t\t\t;\r\t\t}\r\t}\r\tif (foo->argumentCount == 1) {\r\t\t/* begin success: */\r\t\tsuccessValue10 = (((maskObj & 1) == 0) && (((((usqInt) (longAt(maskObj))) >> 8) & 15) <= 4)) && ((lengthOf(maskObj)) >= 5);\r\t\tfoo->successFlag = successValue10 && foo->successFlag;\r\t\tif (foo->successFlag) {\r\t\t\tbitsObj = longAt((maskObj + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)));\r\t\t\textentX = fetchIntegerofObject(1, maskObj);\r\t\t\textentY = fetchIntegerofObject(2, maskObj);\r\t\t\tdepth = fetchIntegerofObject(3, maskObj);\r\t\t}\r\t\tif (foo->successFlag) {\r\t\t\t/* begin success: */\r\t\t\tsuccessValue8 = (extentX == 16) && ((extentY == 16) && (depth == 1));\r\t\t\tfoo->successFlag = successValue8 && foo->successFlag;\r\t\t\t/* begin success: */\r\t\t\tsuccessValue9 = (((bitsObj & 1) == 0) && (((((usqInt) (longAt(bitsObj))) >> 8) & 15) == 6)) && ((lengthOf(bitsObj)) == 16);\r\t\t\tfoo->successFlag = successValue9 && foo->successFlag;\r\t\t\tmaskBitsIndex = bitsObj + (BASE_HEADER_SIZE);\r\t\t}\r\t}\r\tif (foo->successFlag) {\r\t\tif (foo->argumentCount == 0) {\r\t\t\tif (depth == 32) {\r\t\t\t\tif (!(ioSetCursorARGB(cursorBitsIndex, extentX, extentY, offsetX, offsetY))) {\r\t\t\t\t\t/* begin success: */\r\t\t\t\t\tfoo->successFlag = 0 && foo->successFlag;\r\t\t\t\t\treturn null;\r\t\t\t\t}\r\t\t\t} else {\r\t\t\t\tioSetCursor(cursorBitsIndex, offsetX, offsetY);\r\t\t\t}\r\t\t} else {\r\t\t\tioSetCursorWithMask(cursorBitsIndex, maskBitsIndex, offsetX, offsetY);\r\t\t}\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= foo->argumentCount * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tRecord the system Display object in the specialObjectsTable. */\r\rsqInt primitiveBeDisplay(void) {\rregister struct foo * foo = &fum;\r    sqInt rcvr;\r    sqInt oop;\r    sqInt successValue;\r\r\trcvr = longAt(foo->stackPointer);\r\t/* begin success: */\r\tsuccessValue = (((rcvr & 1) == 0) && (((((usqInt) (longAt(rcvr))) >> 8) & 15) <= 4)) && ((lengthOf(rcvr)) >= 4);\r\tfoo->successFlag = successValue && foo->successFlag;\r\tif (foo->successFlag) {\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\toop = foo->specialObjectsOop;\r\t\tif ((((usqInt) oop)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(oop, rcvr);\r\t\t}\r\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + (TheDisplay << (SHIFT_FOR_WORD)), rcvr);\r\t}\r}\r\r\r/*\tmake the basic beep noise */\r\rsqInt primitiveBeep(void) {\r\tioBeep();\r}\r\rsqInt primitiveBitAnd(void) {\rregister struct foo * foo = &fum;\r    sqInt integerArgument;\r    sqInt integerReceiver;\r    sqInt object;\r    sqInt sp;\r    sqInt top;\r    sqInt top1;\r    sqInt top2;\r    sqInt top11;\r\r\t/* begin popPos32BitInteger */\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\ttop = top1;\r\tintegerArgument = positive32BitValueOf(top);\r\t/* begin popPos32BitInteger */\r\t/* begin popStack */\r\ttop11 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\ttop2 = top11;\r\tintegerReceiver = positive32BitValueOf(top2);\r\tif (foo->successFlag) {\r\t\t/* begin push: */\r\t\tobject = positive32BitIntegerFor(integerReceiver & integerArgument);\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\t\tfoo->stackPointer = sp;\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t}\r}\r\rsqInt primitiveBitOr(void) {\rregister struct foo * foo = &fum;\r    sqInt integerArgument;\r    sqInt integerReceiver;\r    sqInt object;\r    sqInt sp;\r    sqInt top;\r    sqInt top1;\r    sqInt top2;\r    sqInt top11;\r\r\t/* begin popPos32BitInteger */\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\ttop = top1;\r\tintegerArgument = positive32BitValueOf(top);\r\t/* begin popPos32BitInteger */\r\t/* begin popStack */\r\ttop11 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\ttop2 = top11;\r\tintegerReceiver = positive32BitValueOf(top2);\r\tif (foo->successFlag) {\r\t\t/* begin push: */\r\t\tobject = positive32BitIntegerFor(integerReceiver | integerArgument);\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\t\tfoo->stackPointer = sp;\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t}\r}\r\rsqInt primitiveBitShift(void) {\rregister struct foo * foo = &fum;\r    sqInt integerArgument;\r    sqInt shifted;\r    sqInt integerReceiver;\r    sqInt integerPointer;\r    sqInt object;\r    sqInt sp;\r    sqInt top;\r    sqInt top2;\r    sqInt top1;\r\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer = top;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tintegerArgument = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tintegerArgument = 0;\r\t\tgoto l1;\r\t}\rl1:\t/* end checkedIntegerValueOf: */;\r\t/* begin popPos32BitInteger */\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\ttop2 = top1;\r\tintegerReceiver = positive32BitValueOf(top2);\r\tif (foo->successFlag) {\r\t\tif (integerArgument >= 0) {\r\t\t\t/* begin success: */\r\t\t\tfoo->successFlag = (integerArgument <= 31) && foo->successFlag;\r\t\t\tshifted = integerReceiver << integerArgument;\r\t\t\t/* begin success: */\r\t\t\tfoo->successFlag = ((((usqInt) shifted) >> integerArgument) == integerReceiver) && foo->successFlag;\r\t\t} else {\r\t\t\t/* begin success: */\r\t\t\tfoo->successFlag = (integerArgument >= -31) && foo->successFlag;\r\t\t\tshifted = ((integerArgument < 0) ? ((usqInt) integerReceiver >> -integerArgument) : ((usqInt) integerReceiver << integerArgument));\r\t\t}\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin push: */\r\t\tobject = positive32BitIntegerFor(shifted);\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\t\tfoo->stackPointer = sp;\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t}\r}\r\rsqInt primitiveBitXor(void) {\rregister struct foo * foo = &fum;\r    sqInt integerArgument;\r    sqInt integerReceiver;\r    sqInt object;\r    sqInt sp;\r    sqInt top;\r    sqInt top1;\r    sqInt top2;\r    sqInt top11;\r\r\t/* begin popPos32BitInteger */\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\ttop = top1;\r\tintegerArgument = positive32BitValueOf(top);\r\t/* begin popPos32BitInteger */\r\t/* begin popStack */\r\ttop11 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\ttop2 = top11;\r\tintegerReceiver = positive32BitValueOf(top2);\r\tif (foo->successFlag) {\r\t\t/* begin push: */\r\t\tobject = positive32BitIntegerFor(integerReceiver ^ integerArgument);\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\t\tfoo->stackPointer = sp;\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t}\r}\r\rsqInt primitiveBlockCopy(void) {\rregister struct foo * foo = &fum;\r    sqInt methodContext;\r    sqInt context;\r    sqInt initialIP;\r    sqInt newContext;\r    sqInt contextSize;\r    sqInt header;\r    sqInt oop;\r    sqInt valuePointer;\r    sqInt valuePointer1;\r    sqInt sp;\r\r\tcontext = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\tif (((longAt((context + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)))) & 1)) {\r\r\t\t/* context is a block; get the context of its enclosing method */\r\r\t\tmethodContext = longAt((context + (BASE_HEADER_SIZE)) + (HomeIndex << (SHIFT_FOR_WORD)));\r\t} else {\r\t\tmethodContext = context;\r\t}\r\t/* begin sizeBitsOf: */\r\theader = longAt(methodContext);\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tcontextSize = (longAt(methodContext - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\tcontextSize = header & (SIZE_MASK);\r\t\tgoto l1;\r\t}\rl1:\t/* end sizeBitsOf: */;\r\r\t/* context is no longer needed and is not preserved across allocation */\r\t/* remap methodContext in case GC happens during allocation */\r\r\tcontext = null;\r\t/* begin pushRemappableOop: */\r\tfoo->remapBuffer[foo->remapBufferCount += 1] = methodContext;\r\tnewContext = instantiateContextsizeInBytes(fetchPointerofObject(ClassBlockContext, foo->specialObjectsOop), contextSize);\r\t/* begin popRemappableOop */\r\toop = foo->remapBuffer[foo->remapBufferCount];\r\tfoo->remapBufferCount -= 1;\r\tmethodContext = oop;\r\r\t/* Was instructionPointer + 3, but now it's greater by 1 due to preIncrement */\r\t/* Assume: have just allocated a new context; it must be young.\r\t Thus, can use uncheck stores. See the comment in fetchContextRegisters. */\r\r\tinitialIP = (((((foo->instructionPointer + 1) + 3) - (foo->method + (BASE_HEADER_SIZE))) << 1) | 1);\r\tlongAtput((newContext + (BASE_HEADER_SIZE)) + (InitialIPIndex << (SHIFT_FOR_WORD)), initialIP);\r\tlongAtput((newContext + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), initialIP);\r\t/* begin storeStackPointerValue:inContext: */\r\tlongAtput((newContext + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)), ((0 << 1) | 1));\r\t/* begin storePointerUnchecked:ofObject:withValue: */\r\tvaluePointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\tlongAtput((newContext + (BASE_HEADER_SIZE)) + (BlockArgumentCountIndex << (SHIFT_FOR_WORD)), valuePointer);\r\tlongAtput((newContext + (BASE_HEADER_SIZE)) + (HomeIndex << (SHIFT_FOR_WORD)), methodContext);\r\t/* begin storePointerUnchecked:ofObject:withValue: */\r\tvaluePointer1 = foo->nilObj;\r\tlongAtput((newContext + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\t/* begin pop:thenPush: */\r\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), newContext);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tReports bytes available at this moment. For more meaningful \r\tresults, calls to this primitive should be preceeded by a full \r\tor incremental garbage collection. */\r\rsqInt primitiveBytesLeft(void) {\rregister struct foo * foo = &fum;\r    sqInt aBool;\r    sqInt integerVal;\r    sqInt sp;\r    sqInt integerVal1;\r    sqInt sp1;\r\r\tif (foo->argumentCount == 0) {\r\t\t/* begin pop:thenPushInteger: */\r\t\tintegerVal = (longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK);\r\t\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), ((integerVal << 1) | 1));\r\t\tfoo->stackPointer = sp;\r\t\treturn null;\r\t}\r\tif (foo->argumentCount == 1) {\r\t\t/* begin booleanValueOf: */\r\t\tif ((longAt(foo->stackPointer)) == foo->trueObj) {\r\t\t\taBool = 1;\r\t\t\tgoto l1;\r\t\t}\r\t\tif ((longAt(foo->stackPointer)) == foo->falseObj) {\r\t\t\taBool = 0;\r\t\t\tgoto l1;\r\t\t}\r\t\tfoo->successFlag = 0;\r\t\taBool = null;\r\tl1:\t/* end booleanValueOf: */;\r\t\tif (!(foo->successFlag)) {\r\t\t\treturn null;\r\t\t}\r\t\t/* begin pop:thenPushInteger: */\r\t\tintegerVal1 = ((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK)) + (sqMemoryExtraBytesLeft(aBool));\r\t\tlongAtput(sp1 = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), ((integerVal1 << 1) | 1));\r\t\tfoo->stackPointer = sp1;\r\t\treturn null;\r\t}\r\t/* begin primitiveFail */\r\tfoo->successFlag = 0;\r\treturn null;\r}\r\r\r/*\tPerform a function call to a foreign function.\r\tOnly invoked from method containing explicit external call spec.\r\tDue to this we use the pluggable prim mechanism explicitly here\r\t(the first literal of any FFI spec'ed method is an ExternalFunction\r\tand not an array as used in the pluggable primitive mechanism). */\r\rsqInt primitiveCalloutToFFI(void) {\r    static char *functionName = \"primitiveCallout\";\r    static char *moduleName = \"SqueakFFIPrims\";\r    static void *function = 0;\r\r\tif (function == 0) {\r\t\tfunction = ioLoadExternalFunctionOfLengthFromModuleOfLength(oopForPointer(functionName), 16, oopForPointer(moduleName), 14);\r\t\tif (function == 0) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t}\r\treturn ((sqInt (*)(void))function)();\r}\r\r\r/*\tPrimitive. Change the class of the receiver into the class of the argument given that the format of the receiver matches the format of the argument's class. Fail if receiver or argument are SmallIntegers, or the receiver is an instance of a compact class and the argument isn't, or when the argument's class is compact and the receiver isn't, or when the format of the receiver is different from the format of the argument's class, or when the arguments class is fixed and the receiver's size differs from the size that an instance of the argument's class should have. */\r\rsqInt primitiveChangeClass(void) {\rregister struct foo * foo = &fum;\r    sqInt arg;\r    sqInt argClass;\r    sqInt rcvr;\r    sqInt oop;\r    sqInt oop1;\r    sqInt ccIndex;\r    sqInt oop2;\r    sqInt oop3;\r    sqInt oop4;\r\r\tif (!(foo->argumentCount == 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin stackObjectValue: */\r\toop = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\tif ((oop & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\targ = null;\r\t\tgoto l1;\r\t}\r\targ = oop;\rl1:\t/* end stackObjectValue: */;\r\t/* begin stackObjectValue: */\r\toop1 = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\tif ((oop1 & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\trcvr = null;\r\t\tgoto l2;\r\t}\r\trcvr = oop1;\rl2:\t/* end stackObjectValue: */;\r\t/* begin fetchClassOf: */\r\tif ((arg & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop2 = foo->specialObjectsOop;\r\t\targClass = longAt((oop2 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l3;\r\t}\r\tccIndex = (((usqInt) (longAt(arg))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\targClass = (longAt(arg - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l3;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop4 = foo->specialObjectsOop;\r\t\toop3 = longAt((oop4 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\targClass = longAt((oop3 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l3;\r\t}\rl3:\t/* end fetchClassOf: */;\r\tchangeClassOfto(rcvr, argClass);\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t}\r\treturn null;\r}\r\r\r/*\tPrimitive. Change the class of the receiver into the class of the argument given that the format of the receiver matches the format of the argument's class. Fail if receiver or argument are SmallIntegers, or the receiver is an instance of a compact class and the argument isn't, or when the argument's class is compact and the receiver isn't, or when the format of the receiver is different from the format of the argument's class, or when the arguments class is fixed and the receiver's size differs from the size that an instance of the argument's class should have. */\r\rEXPORT(sqInt) primitiveChangeClassWithClass(void) {\rregister struct foo * foo = &fum;\r    sqInt argClass;\r    sqInt rcvr;\r    sqInt oop;\r    sqInt oop1;\r\r\tif (!(foo->argumentCount == 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin stackObjectValue: */\r\toop = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\tif ((oop & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\targClass = null;\r\t\tgoto l1;\r\t}\r\targClass = oop;\rl1:\t/* end stackObjectValue: */;\r\t/* begin stackObjectValue: */\r\toop1 = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\tif ((oop1 & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\trcvr = null;\r\t\tgoto l2;\r\t}\r\trcvr = oop1;\rl2:\t/* end stackObjectValue: */;\r\tchangeClassOfto(rcvr, argClass);\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t}\r\treturn null;\r}\r\rsqInt primitiveClass(void) {\rregister struct foo * foo = &fum;\r    sqInt instance;\r    sqInt oop;\r    sqInt sp;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\tinstance = longAt(foo->stackPointer);\r\t/* begin pop:thenPush: */\r\t/* begin fetchClassOf: */\r\tif ((instance & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(instance))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\toop = (longAt(instance - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\toop = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\rl1:\t/* end fetchClassOf: */;\r\tlongAtput(sp = foo->stackPointer - (((foo->argumentCount + 1) - 1) * (BYTES_PER_WORD)), oop);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tWhen called with a single string argument, post the string to \r\tthe clipboard. When called with zero arguments, return a \r\tstring containing the current clipboard contents. */\r\rsqInt primitiveClipboardText(void) {\rregister struct foo * foo = &fum;\r    sqInt sz;\r    sqInt s;\r    sqInt sp;\r\r\tif (foo->argumentCount == 1) {\r\t\ts = longAt(foo->stackPointer);\r\t\tif (!(((s & 1) == 0) && (((((usqInt) (longAt(s))) >> 8) & 15) >= 8))) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t\tif (foo->successFlag) {\r\t\t\tsz = stSizeOf(s);\r\t\t\tclipboardWriteFromAt(sz, s + (BASE_HEADER_SIZE), 0);\r\t\t\t/* begin pop: */\r\t\t\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t\t}\r\t} else {\r\t\tsz = clipboardSize();\r\t\tif (!(sufficientSpaceToAllocate(sz))) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t\ts = instantiateClassindexableSize(fetchPointerofObject(ClassString, foo->specialObjectsOop), sz);\r\t\tclipboardReadIntoAt(sz, s + (BASE_HEADER_SIZE), 0);\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), s);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\r\r/*\tReturn a shallow copy of the receiver. */\r\rsqInt primitiveClone(void) {\rregister struct foo * foo = &fum;\r    sqInt newCopy;\r    sqInt sp;\r\r\tnewCopy = clone(longAt(foo->stackPointer));\r\tif (newCopy == 0) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin pop:thenPush: */\r\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), newCopy);\r\tfoo->stackPointer = sp;\r}\r\rsqInt primitiveClosureCopyWithCopiedValues(void) {\rregister struct foo * foo = &fum;\r    sqInt copiedValues;\r    sqInt numCopiedValues;\r    sqInt i;\r    sqInt numArgs;\r    sqInt newClosure;\r    sqInt valuePointer;\r    sqInt integerPointer;\r    sqInt successValue;\r    sqInt sz;\r    sqInt valuePointer1;\r    sqInt sp;\r    sqInt header;\r    sqInt initialIP;\r    sqInt newClosure1;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tnumArgs = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tnumArgs = 0;\r\t\tgoto l1;\r\t}\rl1:\t/* end checkedIntegerValueOf: */;\r\tcopiedValues = longAt(foo->stackPointer);\r\t/* begin success: */\r\tsuccessValue = (fetchClassOf(copiedValues)) == (fetchPointerofObject(ClassArray, foo->specialObjectsOop));\r\tfoo->successFlag = successValue && foo->successFlag;\r\tif (!(foo->successFlag)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin fetchWordLengthOf: */\r\t/* begin sizeBitsOf: */\r\theader = longAt(copiedValues);\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(copiedValues - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\tgoto l2;\r\t} else {\r\t\tsz = header & (SIZE_MASK);\r\t\tgoto l2;\r\t}\rl2:\t/* end sizeBitsOf: */;\r\tnumCopiedValues = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t/* begin closureNumArgs:instructionPointer:numCopiedValues: */\r\tinitialIP = (foo->instructionPointer + 2) - (foo->method + (BASE_HEADER_SIZE));\r\tnewClosure1 = instantiateSmallClasssizeInBytes(fetchPointerofObject(ClassBlockClosure, foo->specialObjectsOop), ((BYTES_PER_WORD) * (ClosureFirstCopiedValueIndex + numCopiedValues)) + (BASE_HEADER_SIZE));\r\tlongAtput((newClosure1 + (BASE_HEADER_SIZE)) + (ClosureStartPCIndex << (SHIFT_FOR_WORD)), ((initialIP << 1) | 1));\r\tlongAtput((newClosure1 + (BASE_HEADER_SIZE)) + (ClosureNumArgsIndex << (SHIFT_FOR_WORD)), ((numArgs << 1) | 1));\r\tnewClosure = newClosure1;\r\t/* begin storePointerUnchecked:ofObject:withValue: */\r\tvaluePointer1 = longAt(foo->stackPointer - (2 * (BYTES_PER_WORD)));\r\tlongAtput((newClosure + (BASE_HEADER_SIZE)) + (ClosureOuterContextIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\tif (numCopiedValues > 0) {\r\r\t\t/* Allocation may have done a GC and copiedValues may have moved. */\r\r\t\tcopiedValues = longAt(foo->stackPointer);\r\t\tfor (i = 0; i <= (numCopiedValues - 1); i += 1) {\r\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\tvaluePointer = longAt((copiedValues + (BASE_HEADER_SIZE)) + (i << (SHIFT_FOR_WORD)));\r\t\t\tlongAtput((newClosure + (BASE_HEADER_SIZE)) + ((i + ClosureFirstCopiedValueIndex) << (SHIFT_FOR_WORD)), valuePointer);\r\t\t}\r\t}\r\t/* begin pop:thenPush: */\r\tlongAtput(sp = foo->stackPointer - ((3 - 1) * (BYTES_PER_WORD)), newClosure);\r\tfoo->stackPointer = sp;\r}\r\rsqInt primitiveClosureValue(void) {\rregister struct foo * foo = &fum;\r    sqInt blockArgumentCount;\r    sqInt closureMethod;\r    sqInt blockClosure;\r    sqInt outerContext;\r\r\tblockClosure = longAt(foo->stackPointer - (foo->argumentCount * (BYTES_PER_WORD)));\r\tblockArgumentCount = ((longAt((blockClosure + (BASE_HEADER_SIZE)) + (ClosureNumArgsIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tif (!(foo->argumentCount == blockArgumentCount)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\touterContext = longAt((blockClosure + (BASE_HEADER_SIZE)) + (ClosureOuterContextIndex << (SHIFT_FOR_WORD)));\r\tif (!(((outerContext & 1) == 0) && ((((((usqInt) (longAt(outerContext))) >> 12) & 31) == 13) || ((((((usqInt) (longAt(outerContext))) >> 12) & 31) == 14) || (((((usqInt) (longAt(outerContext))) >> 12) & 31) == 4))))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\r\t/* Check if the closure's method is actually a CompiledMethod. */\r\r\tclosureMethod = longAt((outerContext + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\tif (!(((closureMethod & 1) == 0) && (((((usqInt) (longAt(closureMethod))) >> 8) & 15) >= 12))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tactivateNewClosureMethod(blockClosure);\r\t/* begin quickCheckForInterrupts */\r\tif ((foo->interruptCheckCounter -= 1) <= 0) {\r\t\tcheckForInterrupts();\r\t}\r}\r\r\r/*\tAn exact clone of primitiveClosureValue except that this version will not\r\t check for interrupts on stack overflow. */\r\rsqInt primitiveClosureValueNoContextSwitch(void) {\rregister struct foo * foo = &fum;\r    sqInt blockArgumentCount;\r    sqInt closureMethod;\r    sqInt blockClosure;\r    sqInt outerContext;\r\r\tblockClosure = longAt(foo->stackPointer - (foo->argumentCount * (BYTES_PER_WORD)));\r\tblockArgumentCount = ((longAt((blockClosure + (BASE_HEADER_SIZE)) + (ClosureNumArgsIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tif (!(foo->argumentCount == blockArgumentCount)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\touterContext = longAt((blockClosure + (BASE_HEADER_SIZE)) + (ClosureOuterContextIndex << (SHIFT_FOR_WORD)));\r\tif (!(((outerContext & 1) == 0) && ((((((usqInt) (longAt(outerContext))) >> 12) & 31) == 13) || ((((((usqInt) (longAt(outerContext))) >> 12) & 31) == 14) || (((((usqInt) (longAt(outerContext))) >> 12) & 31) == 4))))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\r\t/* Check if the closure's method is actually a CompiledMethod. */\r\r\tclosureMethod = longAt((outerContext + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\tif (!(((closureMethod & 1) == 0) && (((((usqInt) (longAt(closureMethod))) >> 8) & 15) >= 12))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tactivateNewClosureMethod(blockClosure);\r}\r\rsqInt primitiveClosureValueWithArgs(void) {\rregister struct foo * foo = &fum;\r    sqInt blockArgumentCount;\r    sqInt cntxSize;\r    sqInt closureMethod;\r    sqInt arraySize;\r    sqInt blockClosure;\r    sqInt outerContext;\r    sqInt argumentArray;\r    sqInt index;\r    sqInt object;\r    sqInt sp;\r    sqInt sz;\r    sqInt objectPointer;\r    sqInt sz1;\r    sqInt top;\r    sqInt header;\r    sqInt header1;\r\r\targumentArray = longAt(foo->stackPointer);\r\tif (!(((argumentArray & 1) == 0) && (((((usqInt) (longAt(argumentArray))) >> 8) & 15) == 2))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin fetchWordLengthOf: */\r\t/* begin sizeBitsOf: */\r\theader = longAt(argumentArray);\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(argumentArray - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\tsz = header & (SIZE_MASK);\r\t\tgoto l1;\r\t}\rl1:\t/* end sizeBitsOf: */;\r\tarraySize = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t/* begin fetchWordLengthOf: */\r\tobjectPointer = foo->activeContext;\r\t/* begin sizeBitsOf: */\r\theader1 = longAt(objectPointer);\r\tif ((header1 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz1 = (longAt(objectPointer - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\tgoto l2;\r\t} else {\r\t\tsz1 = header1 & (SIZE_MASK);\r\t\tgoto l2;\r\t}\rl2:\t/* end sizeBitsOf: */;\r\tcntxSize = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\tif (!(((((usqInt) ((foo->stackPointer - foo->activeContext) - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD)) + arraySize) < cntxSize)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tblockClosure = longAt(foo->stackPointer - (foo->argumentCount * (BYTES_PER_WORD)));\r\tblockArgumentCount = ((longAt((blockClosure + (BASE_HEADER_SIZE)) + (ClosureNumArgsIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tif (!(arraySize == blockArgumentCount)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\touterContext = longAt((blockClosure + (BASE_HEADER_SIZE)) + (ClosureOuterContextIndex << (SHIFT_FOR_WORD)));\r\tif (!(((outerContext & 1) == 0) && ((((((usqInt) (longAt(outerContext))) >> 12) & 31) == 13) || ((((((usqInt) (longAt(outerContext))) >> 12) & 31) == 14) || (((((usqInt) (longAt(outerContext))) >> 12) & 31) == 4))))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\r\t/* Check if the closure's method is actually a CompiledMethod. */\r\r\tclosureMethod = longAt((outerContext + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\tif (!(((closureMethod & 1) == 0) && (((((usqInt) (longAt(closureMethod))) >> 8) & 15) >= 12))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tindex = 1;\r\twhile (index <= arraySize) {\r\t\t/* begin push: */\r\t\tobject = longAt((argumentArray + (BASE_HEADER_SIZE)) + ((index - 1) << (SHIFT_FOR_WORD)));\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\t\tfoo->stackPointer = sp;\r\t\tindex += 1;\r\t}\r\tfoo->argumentCount = arraySize;\r\tactivateNewClosureMethod(blockClosure);\r\t/* begin quickCheckForInterrupts */\r\tif ((foo->interruptCheckCounter -= 1) <= 0) {\r\t\tcheckForInterrupts();\r\t}\r}\r\r\r/*\tFill the receiver, which must be an indexable bytes or words \r\tobjects, with the given integer value. */\r\rsqInt primitiveConstantFill(void) {\rregister struct foo * foo = &fum;\r    usqInt end;\r    usqInt i;\r    sqInt fillValue;\r    sqInt rcvr;\r    sqInt rcvrIsBytes;\r    sqInt successValue;\r    sqInt successValue1;\r\r\tfillValue = positive32BitValueOf(longAt(foo->stackPointer));\r\trcvr = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin success: */\r\tsuccessValue1 = ((rcvr & 1) == 0) && (isWordsOrBytesNonInt(rcvr));\r\tfoo->successFlag = successValue1 && foo->successFlag;\r\trcvrIsBytes = ((rcvr & 1) == 0) && (((((usqInt) (longAt(rcvr))) >> 8) & 15) >= 8);\r\tif (rcvrIsBytes) {\r\t\t/* begin success: */\r\t\tsuccessValue = (fillValue >= 0) && (fillValue <= 255);\r\t\tfoo->successFlag = successValue && foo->successFlag;\r\t}\r\tif (foo->successFlag) {\r\t\tend = rcvr + (sizeBitsOf(rcvr));\r\t\ti = rcvr + (BASE_HEADER_SIZE);\r\t\tif (rcvrIsBytes) {\r\t\t\twhile (i < end) {\r\t\t\t\tbyteAtput(i, fillValue);\r\t\t\t\ti += 1;\r\t\t\t}\r\t\t} else {\r\t\t\twhile (i < end) {\r\t\t\t\tlong32Atput(i, fillValue);\r\t\t\t\ti += 4;\r\t\t\t}\r\t\t}\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tPrimitive. Copy the state of the receiver from the argument. \r\t\tFail if receiver and argument are of a different class. \r\t\tFail if the receiver or argument are non-pointer objects.\r\t\tFail if receiver and argument have different lengths (for indexable objects).\r\t */\r\rsqInt primitiveCopyObject(void) {\rregister struct foo * foo = &fum;\r    sqInt arg;\r    sqInt length;\r    sqInt i;\r    sqInt rcvr;\r    sqInt valuePointer;\r    sqInt oop;\r    sqInt oop1;\r    sqInt header;\r    sqInt sz;\r\r\tif (!(foo->argumentCount == 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin stackObjectValue: */\r\toop = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\tif ((oop & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\targ = null;\r\t\tgoto l1;\r\t}\r\targ = oop;\rl1:\t/* end stackObjectValue: */;\r\t/* begin stackObjectValue: */\r\toop1 = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\tif ((oop1 & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\trcvr = null;\r\t\tgoto l2;\r\t}\r\trcvr = oop1;\rl2:\t/* end stackObjectValue: */;\r\tif (!foo->successFlag) {\r\t\treturn null;\r\t}\r\tif (!(((rcvr & 1) == 0) && (((((usqInt) (longAt(rcvr))) >> 8) & 15) <= 4))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif (!((fetchClassOf(rcvr)) == (fetchClassOf(arg)))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin lengthOf: */\r\theader = longAt(rcvr);\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(rcvr - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz = header & (SIZE_MASK);\r\t}\r\tsz -= header & (SIZE_4_BIT);\r\tif (((((usqInt) header) >> 8) & 15) <= 4) {\r\t\tlength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tgoto l3;\r\t}\r\tif (((((usqInt) header) >> 8) & 15) < 8) {\r\t\tlength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> 2;\r\t\tgoto l3;\r\t} else {\r\t\tlength = (sz - (BASE_HEADER_SIZE)) - (((((usqInt) header) >> 8) & 15) & 3);\r\t\tgoto l3;\r\t}\rl3:\t/* end lengthOf:baseHeader:format: */;\r\tif (!(length == (lengthOf(arg)))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer = longAt((arg + (BASE_HEADER_SIZE)) + (i << (SHIFT_FOR_WORD)));\r\t\tif ((((usqInt) rcvr)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(rcvr, valuePointer);\r\t\t}\r\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (i << (SHIFT_FOR_WORD)), valuePointer);\r\t}\r\t/* begin pop: */\r\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r}\r\r\r/*\tSet or clear the flag that controls whether modifications of \r\tthe Display object are propagated to the underlying \r\tplatform's screen. */\r\rsqInt primitiveDeferDisplayUpdates(void) {\rregister struct foo * foo = &fum;\r    sqInt flag;\r\r\tflag = longAt(foo->stackPointer);\r\tif (flag == foo->trueObj) {\r\t\tfoo->deferDisplayUpdates = 1;\r\t} else {\r\t\tif (flag == foo->falseObj) {\r\t\t\tfoo->deferDisplayUpdates = 0;\r\t\t} else {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t}\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tPass in a non-negative value to disable the architectures powermanager if any, zero to enable. This is a named (not numbered) primitive in the null module (ie the VM) */\r\rEXPORT(sqInt) primitiveDisablePowerManager(void) {\rregister struct foo * foo = &fum;\r    sqInt integer;\r    sqInt integerPointer;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tinteger = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tinteger = 0;\r\t\tgoto l1;\r\t}\rl1:\t/* end checkedIntegerValueOf: */;\r\tif (foo->successFlag) {\r\t\tioDisablePowerManager(integer);\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t}\r}\r\rsqInt primitiveDiv(void) {\rregister struct foo * foo = &fum;\r    sqInt quotient;\r    sqInt sp;\r\r\tquotient = doPrimitiveDivby(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))), longAt(foo->stackPointer));\r\t/* begin pop2AndPushIntegerIfOK: */\r\tif (foo->successFlag) {\r\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t(((((int) quotient)) ^ ((((int) quotient)) << 1)) >= 0)\r# else\r\t\t\t((quotient >= -1073741824) && (quotient <= 1073741823))\r# endif  // SQ_HOST32\r\t\t) {\r\t\t\t/* begin pop:thenPush: */\r\t\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), ((quotient << 1) | 1));\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\tfoo->successFlag = 0;\r\t\t}\r\t}\r}\r\rsqInt primitiveDivide(void) {\rregister struct foo * foo = &fum;\r    sqInt integerArgument;\r    sqInt integerReceiver;\r    sqInt integerPointer;\r    sqInt integerPointer1;\r    sqInt sp;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tintegerReceiver = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tintegerReceiver = 0;\r\t\tgoto l1;\r\t}\rl1:\t/* end checkedIntegerValueOf: */;\r\t/* begin stackIntegerValue: */\r\tintegerPointer1 = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer1 & 1)) {\r\t\tintegerArgument = (integerPointer1 >> 1);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tintegerArgument = 0;\r\t\tgoto l2;\r\t}\rl2:\t/* end checkedIntegerValueOf: */;\r\tif ((integerArgument != 0) && ((integerReceiver % integerArgument) == 0)) {\r\t\t/* begin pop2AndPushIntegerIfOK: */\r\t\tif (foo->successFlag) {\r\t\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t\t(((((int) (integerReceiver / integerArgument))) ^ ((((int) (integerReceiver / integerArgument))) << 1)) >= 0)\r# else\r\t\t\t\t(((integerReceiver / integerArgument) >= -1073741824) && ((integerReceiver / integerArgument) <= 1073741823))\r# endif  // SQ_HOST32\r\t\t\t) {\r\t\t\t\t/* begin pop:thenPush: */\r\t\t\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), (((integerReceiver / integerArgument) << 1) | 1));\r\t\t\t\tfoo->stackPointer = sp;\r\t\t\t} else {\r\t\t\t\tfoo->successFlag = 0;\r\t\t\t}\r\t\t}\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t}\r}\r\r\r/*\tSimulate an primitiveExternalCall invocation (e.g. for the Debugger).  Do not cache anything.\r\t e.g. ContextPart>>tryNamedPrimitiveIn: aCompiledMethod for: aReceiver withArgs: arguments */\r\rsqInt primitiveDoNamedPrimitiveWithArgs(void) {\rregister struct foo * foo = &fum;\r    sqInt functionName;\r    sqInt functionLength;\r    sqInt methodArg;\r    sqInt moduleName;\r    sqInt arraySize;\r    sqInt methodHeader;\r    sqInt spec;\r    sqInt moduleLength;\r    sqInt argumentArray;\r    sqInt index;\r    void (*addr)();\r    sqInt successValue;\r    sqInt header;\r    sqInt object;\r    sqInt sp;\r    sqInt sp1;\r    sqInt sz;\r    sqInt successValue1;\r    sqInt oop;\r    sqInt successValue2;\r    sqInt header1;\r    sqInt oop1;\r    sqInt sz1;\r    sqInt header2;\r    sqInt cntxSize;\r    sqInt sz2;\r    sqInt oop3;\r    sqInt classOop;\r    sqInt cl;\r    sqInt ccIndex;\r    sqInt oop11;\r    sqInt oop2;\r    sqInt oop4;\r\r\targumentArray = longAt(foo->stackPointer);\r\tif (!(((argumentArray & 1) == 0) && (((((usqInt) (longAt(argumentArray))) >> 8) & 15) == 2))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin fetchWordLengthOf: */\r\t/* begin sizeBitsOf: */\r\theader2 = longAt(argumentArray);\r\tif ((header2 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(argumentArray - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\tgoto l3;\r\t} else {\r\t\tsz = header2 & (SIZE_MASK);\r\t\tgoto l3;\r\t}\rl3:\t/* end sizeBitsOf: */;\r\tarraySize = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t/* begin success: */\r\t/* begin roomToPushNArgs: */\r\tif (((headerOf(foo->method)) & LargeContextBit) != 0) {\r\t\tcntxSize = ((LARGE_CONTEXT_SIZE) / (BYTES_PER_WORD)) - ReceiverIndex;\r\t} else {\r\t\tcntxSize = ((SMALL_CONTEXT_SIZE) / (BYTES_PER_WORD)) - ReceiverIndex;\r\t}\r\tsuccessValue1 = ((((usqInt) ((foo->stackPointer - foo->activeContext) - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD)) + arraySize) <= cntxSize;\r\tfoo->successFlag = successValue1 && foo->successFlag;\r\t/* begin stackObjectValue: */\r\toop = longAt(foo->stackPointer - (2 * (BYTES_PER_WORD)));\r\tif ((oop & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tmethodArg = null;\r\t\tgoto l1;\r\t}\r\tmethodArg = oop;\rl1:\t/* end stackObjectValue: */;\r\tif (!(foo->successFlag)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif (!(((((usqInt) (longAt(methodArg))) >> 8) & 15) >= 12)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tmethodHeader = longAt((methodArg + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD)));\r\tif (!(((((usqInt) methodHeader) >> 10) & 255) > 2)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin assertClassOf:is: */\r\toop3 = spec = longAt((methodArg + (BASE_HEADER_SIZE)) + (1 << (SHIFT_FOR_WORD)));\r\t/* begin fetchPointer:ofObject: */\r\toop4 = foo->specialObjectsOop;\r\tclassOop = longAt((oop4 + (BASE_HEADER_SIZE)) + (ClassArray << (SHIFT_FOR_WORD)));\r\tif ((oop3 & 1)) {\r\t\tfoo->successFlag = 0;\r\t\tgoto l5;\r\t}\r\tccIndex = (((usqInt) (longAt(oop3))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tcl = (longAt(oop3 - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop2 = foo->specialObjectsOop;\r\t\toop11 = longAt((oop2 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tcl = longAt((oop11 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t}\r\t/* begin success: */\r\tfoo->successFlag = (cl == classOop) && foo->successFlag;\rl5:\t/* end assertClassOf:is: */;\r\tif (!(foo->successFlag && (((lengthOf(spec)) == 4) && ((primitiveIndexOfMethodHeader(methodHeader)) == 117)))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif (!(((((usqInt) methodHeader) >> 25) & 15) == arraySize)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tmoduleName = longAt((spec + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)));\r\tif (moduleName == foo->nilObj) {\r\t\tmoduleLength = 0;\r\t} else {\r\t\t/* begin success: */\r\t\tsuccessValue = ((moduleName & 1) == 0) && (((((usqInt) (longAt(moduleName))) >> 8) & 15) >= 8);\r\t\tfoo->successFlag = successValue && foo->successFlag;\r\t\t/* begin lengthOf: */\r\t\theader = longAt(moduleName);\r\t\t/* begin lengthOf:baseHeader:format: */\r\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\tsz1 = (longAt(moduleName - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t} else {\r\t\t\tsz1 = header & (SIZE_MASK);\r\t\t}\r\t\tsz1 -= header & (SIZE_4_BIT);\r\t\tif (((((usqInt) header) >> 8) & 15) <= 4) {\r\t\t\tmoduleLength = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\t\tgoto l2;\r\t\t}\r\t\tif (((((usqInt) header) >> 8) & 15) < 8) {\r\t\t\tmoduleLength = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> 2;\r\t\t\tgoto l2;\r\t\t} else {\r\t\t\tmoduleLength = (sz1 - (BASE_HEADER_SIZE)) - (((((usqInt) header) >> 8) & 15) & 3);\r\t\t\tgoto l2;\r\t\t}\r\tl2:\t/* end lengthOf:baseHeader:format: */;\r\t\t;\r\t}\r\tfunctionName = longAt((spec + (BASE_HEADER_SIZE)) + (1 << (SHIFT_FOR_WORD)));\r\t/* begin success: */\r\tsuccessValue2 = ((functionName & 1) == 0) && (((((usqInt) (longAt(functionName))) >> 8) & 15) >= 8);\r\tfoo->successFlag = successValue2 && foo->successFlag;\r\t/* begin lengthOf: */\r\theader1 = longAt(functionName);\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((header1 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz2 = (longAt(functionName - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz2 = header1 & (SIZE_MASK);\r\t}\r\tsz2 -= header1 & (SIZE_4_BIT);\r\tif (((((usqInt) header1) >> 8) & 15) <= 4) {\r\t\tfunctionLength = ((usqInt) (sz2 - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tgoto l4;\r\t}\r\tif (((((usqInt) header1) >> 8) & 15) < 8) {\r\t\tfunctionLength = ((usqInt) (sz2 - (BASE_HEADER_SIZE))) >> 2;\r\t\tgoto l4;\r\t} else {\r\t\tfunctionLength = (sz2 - (BASE_HEADER_SIZE)) - (((((usqInt) header1) >> 8) & 15) & 3);\r\t\tgoto l4;\r\t}\rl4:\t/* end lengthOf:baseHeader:format: */;\r\tif (!(foo->successFlag)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\taddr = ioLoadExternalFunctionOfLengthFromModuleOfLength(functionName + (BASE_HEADER_SIZE), functionLength, moduleName + (BASE_HEADER_SIZE), moduleLength);\r\tif (addr == 0) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin pop: */\r\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\tfoo->argumentCount = arraySize;\r\tindex = 1;\r\twhile (index <= arraySize) {\r\t\t/* begin push: */\r\t\tobject = longAt((argumentArray + (BASE_HEADER_SIZE)) + ((index - 1) << (SHIFT_FOR_WORD)));\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\t\tfoo->stackPointer = sp;\r\t\tindex += 1;\r\t}\r\t/* begin pushRemappableOop: */\r\tfoo->remapBuffer[foo->remapBufferCount += 1] = argumentArray;\r\tfoo->lkupClass = foo->nilObj;\r\tcallExternalPrimitive(addr);\r\t/* begin popRemappableOop */\r\toop1 = foo->remapBuffer[foo->remapBufferCount];\r\tfoo->remapBufferCount -= 1;\r\targumentArray = oop1;\r\tif (!(foo->successFlag)) {\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp1 = foo->stackPointer - ((arraySize - 1) * (BYTES_PER_WORD)), argumentArray);\r\t\tfoo->stackPointer = sp1;\r\t\tfoo->argumentCount = 3;\r\t}\r}\r\rsqInt primitiveDoPrimitiveWithArgs(void) {\rregister struct foo * foo = &fum;\r    sqInt cntxSize;\r    sqInt primIdx;\r    sqInt arraySize;\r    sqInt argumentArray;\r    sqInt index;\r    sqInt object;\r    sqInt sp;\r    sqInt sp1;\r    sqInt sp2;\r    sqInt sz;\r    sqInt objectPointer;\r    sqInt sz1;\r    sqInt successValue;\r    sqInt integerPointer;\r    sqInt oop;\r    sqInt header;\r    sqInt header1;\r\r\targumentArray = longAt(foo->stackPointer);\r\t/* begin fetchWordLengthOf: */\r\t/* begin sizeBitsOf: */\r\theader = longAt(argumentArray);\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(argumentArray - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\tgoto l2;\r\t} else {\r\t\tsz = header & (SIZE_MASK);\r\t\tgoto l2;\r\t}\rl2:\t/* end sizeBitsOf: */;\r\tarraySize = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t/* begin fetchWordLengthOf: */\r\tobjectPointer = foo->activeContext;\r\t/* begin sizeBitsOf: */\r\theader1 = longAt(objectPointer);\r\tif ((header1 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz1 = (longAt(objectPointer - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\tgoto l3;\r\t} else {\r\t\tsz1 = header1 & (SIZE_MASK);\r\t\tgoto l3;\r\t}\rl3:\t/* end sizeBitsOf: */;\r\tcntxSize = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t/* begin success: */\r\tsuccessValue = ((((usqInt) ((foo->stackPointer - foo->activeContext) - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD)) + arraySize) < cntxSize;\r\tfoo->successFlag = successValue && foo->successFlag;\r\tif (!(((argumentArray & 1) == 0) && (((((usqInt) (longAt(argumentArray))) >> 8) & 15) == 2))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tprimIdx = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tprimIdx = 0;\r\t\tgoto l1;\r\t}\r\tprimIdx = null;\rl1:\t/* end stackIntegerValue: */;\r\tif (!(foo->successFlag)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin pop: */\r\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\tfoo->primitiveIndex = primIdx;\r\tfoo->argumentCount = arraySize;\r\tindex = 1;\r\twhile (index <= foo->argumentCount) {\r\t\t/* begin push: */\r\t\tobject = longAt((argumentArray + (BASE_HEADER_SIZE)) + ((index - 1) << (SHIFT_FOR_WORD)));\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\t\tfoo->stackPointer = sp;\r\t\tindex += 1;\r\t}\r\t/* begin pushRemappableOop: */\r\tfoo->remapBuffer[foo->remapBufferCount += 1] = argumentArray;\r\tfoo->lkupClass = foo->nilObj;\r\tprimitiveResponse();\r\t/* begin popRemappableOop */\r\toop = foo->remapBuffer[foo->remapBufferCount];\r\tfoo->remapBufferCount -= 1;\r\targumentArray = oop;\r\tif (!(foo->successFlag)) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= arraySize * (BYTES_PER_WORD);\r\t\t/* begin pushInteger: */\r\t\t/* begin push: */\r\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), ((primIdx << 1) | 1));\r\t\tfoo->stackPointer = sp1;\r\t\t/* begin push: */\r\t\tlongAtput(sp2 = foo->stackPointer + (BYTES_PER_WORD), argumentArray);\r\t\tfoo->stackPointer = sp2;\r\t\tfoo->argumentCount = 2;\r\t}\r}\r\rsqInt primitiveEqual(void) {\rregister struct foo * foo = &fum;\r    sqInt integerArgument;\r    sqInt result;\r    sqInt integerReceiver;\r    sqInt top;\r    sqInt top1;\r    sqInt sp;\r    sqInt sp1;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerArgument = top;\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerReceiver = top1;\r\t/* begin compare31or32Bits:equal: */\r\tif (((integerReceiver & 1)) && ((integerArgument & 1))) {\r\t\tresult = integerReceiver == integerArgument;\r\t\tgoto l1;\r\t}\r\tresult = (positive32BitValueOf(integerReceiver)) == (positive32BitValueOf(integerArgument));\rl1:\t/* end compare31or32Bits:equal: */;\r\t/* begin checkBooleanResult: */\r\tif (foo->successFlag) {\r\t\t/* begin pushBool: */\r\t\tif (result) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tis the receiver the same object as the argument? */\r\rsqInt primitiveEquivalent(void) {\rregister struct foo * foo = &fum;\r    sqInt thisObject;\r    sqInt otherObject;\r    sqInt top;\r    sqInt top1;\r    sqInt sp;\r    sqInt sp1;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\totherObject = top;\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tthisObject = top1;\r\t/* begin pushBool: */\r\tif (thisObject == otherObject) {\r\t\t/* begin push: */\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\tfoo->stackPointer = sp;\r\t} else {\r\t\t/* begin push: */\r\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\tfoo->stackPointer = sp1;\r\t}\r}\r\r\r/*\treceiver, args, then method are on top of stack. Execute method against receiver and args */\r\rsqInt primitiveExecuteMethod(void) {\rregister struct foo * foo = &fum;\r    sqInt top;\r    sqInt successValue;\r    sqInt methodPointer;\r    sqInt primBits;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tfoo->newMethod = top;\r\t/* begin primitiveIndexOf: */\r\tmethodPointer = foo->newMethod;\r\tprimBits = (((usqInt) (longAt((methodPointer + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD))))) >> 1) & 268435967;\r\tfoo->primitiveIndex = (primBits & 511) + (((usqInt) primBits) >> 19);\r\t/* begin success: */\r\tsuccessValue = (foo->argumentCount - 1) == (argumentCountOf(foo->newMethod));\r\tfoo->successFlag = successValue && foo->successFlag;\r\tif (foo->successFlag) {\r\t\tfoo->argumentCount -= 1;\r\t\t/* begin executeNewMethod */\r\t\tif (foo->primitiveIndex > 0) {\r\t\t\tprimitiveResponse();\r\t\t\tif (foo->successFlag) {\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t}\r\t\tactivateNewMethod();\r\t\t/* begin quickCheckForInterrupts */\r\t\tif ((foo->interruptCheckCounter -= 1) <= 0) {\r\t\t\tcheckForInterrupts();\r\t\t}\r\tl1:\t/* end executeNewMethod */;\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 1 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\treceiver, argsArray, then method are on top of stack.  Execute method against receiver and args */\r\rsqInt primitiveExecuteMethodArgsArray(void) {\rregister struct foo * foo = &fum;\r    sqInt methodArgument;\r    sqInt argCnt;\r    sqInt argumentArray;\r    sqInt top;\r    sqInt top1;\r    sqInt dst;\r    sqInt in;\r    sqInt lastIn;\r    sqInt out;\r    sqInt methodPointer;\r    sqInt primBits;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tmethodArgument = top;\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\targumentArray = top1;\r\tif (!(((methodArgument & 1) == 0) && ((((((usqInt) (longAt(foo->newMethod))) >> 8) & 15) >= 12) && (((argumentArray & 1) == 0) && (((((usqInt) (longAt(argumentArray))) >> 8) & 15) == 2))))) {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\targCnt = (((usqInt) (longAt((methodArgument + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD))))) >> 25) & 15;\r\tif (!(argCnt == (fetchWordLengthOf(argumentArray)))) {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin transfer:from:to: */\r\tdst = foo->stackPointer + (BYTES_PER_WORD);\r\tflag(\"Dan\");\r\tin = (argumentArray + (BASE_HEADER_SIZE)) - (BYTES_PER_WORD);\r\tlastIn = in + (argCnt * (BYTES_PER_WORD));\r\tout = dst - (BYTES_PER_WORD);\r\twhile ((((usqInt) in)) < (((usqInt) lastIn))) {\r\t\tlongAtput(out += BYTES_PER_WORD, longAt(in += BYTES_PER_WORD));\r\t}\r\t/* begin unPop: */\r\tfoo->stackPointer += argCnt * (BYTES_PER_WORD);\r\tfoo->newMethod = methodArgument;\r\t/* begin primitiveIndexOf: */\r\tmethodPointer = foo->newMethod;\r\tprimBits = (((usqInt) (longAt((methodPointer + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD))))) >> 1) & 268435967;\r\tfoo->primitiveIndex = (primBits & 511) + (((usqInt) primBits) >> 19);\r\tfoo->argumentCount = argCnt;\r\t/* begin executeNewMethod */\r\tif (foo->primitiveIndex > 0) {\r\t\tprimitiveResponse();\r\t\tif (foo->successFlag) {\r\t\t\tgoto l1;\r\t\t}\r\t}\r\tactivateNewMethod();\r\t/* begin quickCheckForInterrupts */\r\tif ((foo->interruptCheckCounter -= 1) <= 0) {\r\t\tcheckForInterrupts();\r\t}\rl1:\t/* end executeNewMethod */;\r\tfoo->successFlag = 1;\r}\r\rsqInt primitiveExitToDebugger(void) {\r\terror(\"Exit to debugger at user request\");\r}\r\r\r/*\tComputes E raised to the receiver power. */\r\rsqInt primitiveExp(void) {\rregister struct foo * foo = &fum;\r    double  rcvr;\r\r\trcvr = popFloat();\r\tif (foo->successFlag) {\r\t\tpushFloat(exp(rcvr));\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 1 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tExponent part of this float. */\r\rsqInt primitiveExponent(void) {\rregister struct foo * foo = &fum;\r    int  pwr;\r    double  frac;\r    double  rcvr;\r    sqInt sp;\r\r\trcvr = popFloat();\r\tif (foo->successFlag) {\r\t\tfrac = frexp(rcvr, &pwr);\r\t\t/* begin pushInteger: */\r\t\t/* begin push: */\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), (((pwr - 1) << 1) | 1));\r\t\tfoo->stackPointer = sp;\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 1 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tCall an external primitive. The external primitive methods \r\tcontain as first literal an array consisting of: \r\t* The module name (String | Symbol) \r\t* The function name (String | Symbol) \r\t* The session ID (SmallInteger) [OBSOLETE] \r\t* The function index (Integer) in the externalPrimitiveTable \r\tFor fast failures the primitive index of any method where the \r\texternal prim is not found is rewritten in the method cache \r\twith zero. This allows for ultra fast responses as long as the \r\tmethod stays in the cache. \r\tThe fast failure response relies on lkupClass being properly \r\tset. This is done in \r\t#addToMethodCacheSel:class:method:primIndex: to \r\tcompensate for execution of methods that are looked up in a \r\tsuperclass (such as in primitivePerformAt). \r\tWith the latest modifications (e.g., actually flushing the \r\tfunction addresses from the VM), the session ID is obsolete. \r\tBut for backward compatibility it is still kept around. Also, a \r\tfailed lookup is reported specially. If a method has been \r\tlooked up and not been found, the function address is stored \r\tas -1 (e.g., the SmallInteger -1 to distinguish from \r\t16rFFFFFFFF which may be returned from the lookup). \r\tIt is absolutely okay to remove the rewrite if we run into any \r\tproblems later on. It has an approximate speed difference of \r\t30% per failed primitive call which may be noticable but if, \r\tfor any reasons, we run into problems (like with J3) we can \r\talways remove the rewrite. \r\t */\r\rsqInt primitiveExternalCall(void) {\rregister struct foo * foo = &fum;\r    sqInt functionName;\r    sqInt functionLength;\r    sqInt moduleName;\r    sqInt moduleLength;\r    sqInt index;\r    sqInt lit;\r    void * addr;\r    sqInt successValue;\r    sqInt header;\r    sqInt successValue1;\r    sqInt methodPointer;\r    sqInt successValue2;\r    sqInt successValue3;\r    sqInt header1;\r    sqInt sz;\r    sqInt sz1;\r\r\t/* begin success: */\r\tsuccessValue1 = (literalCountOf(foo->newMethod)) > 0;\r\tfoo->successFlag = successValue1 && foo->successFlag;\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\t/* begin literal:ofMethod: */\r\tmethodPointer = foo->newMethod;\r\tlit = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((0 + LiteralStart) << (SHIFT_FOR_WORD)));\r\t/* begin success: */\r\tsuccessValue2 = (((lit & 1) == 0) && (((((usqInt) (longAt(lit))) >> 8) & 15) == 2)) && ((lengthOf(lit)) == 4);\r\tfoo->successFlag = successValue2 && foo->successFlag;\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\tindex = longAt((lit + (BASE_HEADER_SIZE)) + (3 << (SHIFT_FOR_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((index & 1)) {\r\t\tindex = (index >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tindex = 0;\r\t\tgoto l1;\r\t}\rl1:\t/* end checkedIntegerValueOf: */;\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\tif (index < 0) {\r\t\trewriteMethodCacheSelclassprimIndex(foo->messageSelector, foo->lkupClass, 0);\r\t\t/* begin success: */\r\t\tfoo->successFlag = 0 && foo->successFlag;\r\t\treturn null;\r\t}\r\tif ((index > 0) && (index <= MaxExternalPrimitiveTableSize)) {\r\t\taddr = foo->externalPrimitiveTable[index - 1];\r\t\tif (addr != 0) {\r\t\t\trewriteMethodCacheSelclassprimIndexprimFunction(foo->messageSelector, foo->lkupClass, 1000 + index, addr);\r\t\t\tcallExternalPrimitive(addr);\r\t\t\treturn null;\r\t\t}\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tlongAtput((lit + (BASE_HEADER_SIZE)) + (2 << (SHIFT_FOR_WORD)), ConstZero);\r\tlongAtput((lit + (BASE_HEADER_SIZE)) + (3 << (SHIFT_FOR_WORD)), ConstZero);\r\tmoduleName = longAt((lit + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)));\r\tif (moduleName == foo->nilObj) {\r\t\tmoduleLength = 0;\r\t} else {\r\t\t/* begin success: */\r\t\tsuccessValue = ((moduleName & 1) == 0) && (((((usqInt) (longAt(moduleName))) >> 8) & 15) >= 8);\r\t\tfoo->successFlag = successValue && foo->successFlag;\r\t\t/* begin lengthOf: */\r\t\theader = longAt(moduleName);\r\t\t/* begin lengthOf:baseHeader:format: */\r\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(moduleName - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t} else {\r\t\t\tsz = header & (SIZE_MASK);\r\t\t}\r\t\tsz -= header & (SIZE_4_BIT);\r\t\tif (((((usqInt) header) >> 8) & 15) <= 4) {\r\t\t\tmoduleLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\t\tgoto l2;\r\t\t}\r\t\tif (((((usqInt) header) >> 8) & 15) < 8) {\r\t\t\tmoduleLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> 2;\r\t\t\tgoto l2;\r\t\t} else {\r\t\t\tmoduleLength = (sz - (BASE_HEADER_SIZE)) - (((((usqInt) header) >> 8) & 15) & 3);\r\t\t\tgoto l2;\r\t\t}\r\tl2:\t/* end lengthOf:baseHeader:format: */;\r\t\t;\r\t}\r\tfunctionName = longAt((lit + (BASE_HEADER_SIZE)) + (1 << (SHIFT_FOR_WORD)));\r\t/* begin success: */\r\tsuccessValue3 = ((functionName & 1) == 0) && (((((usqInt) (longAt(functionName))) >> 8) & 15) >= 8);\r\tfoo->successFlag = successValue3 && foo->successFlag;\r\t/* begin lengthOf: */\r\theader1 = longAt(functionName);\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((header1 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz1 = (longAt(functionName - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz1 = header1 & (SIZE_MASK);\r\t}\r\tsz1 -= header1 & (SIZE_4_BIT);\r\tif (((((usqInt) header1) >> 8) & 15) <= 4) {\r\t\tfunctionLength = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tgoto l3;\r\t}\r\tif (((((usqInt) header1) >> 8) & 15) < 8) {\r\t\tfunctionLength = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> 2;\r\t\tgoto l3;\r\t} else {\r\t\tfunctionLength = (sz1 - (BASE_HEADER_SIZE)) - (((((usqInt) header1) >> 8) & 15) & 3);\r\t\tgoto l3;\r\t}\rl3:\t/* end lengthOf:baseHeader:format: */;\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\r\t/* Addr ~= 0 indicates we have a compat match later */\r\r\taddr = 0;\r\tif (moduleLength == 0) {\r\r\t\t/* Search the obsolete named primitive table for a match  */\r\t\t/* The returned value is the index into the obsolete primitive table. \r\t\t\tIf the index is found, use the 'C-style' version of the lookup.  */\r\r\t\tindex = findObsoleteNamedPrimitivelength((pointerForOop(functionName)) + (BASE_HEADER_SIZE), functionLength);\r\t\tif (!(index < 0)) {\r\t\t\taddr = ioLoadFunctionFrom(((char*) ((obsoleteNamedPrimitiveTable[index])[2])), ((char*) ((obsoleteNamedPrimitiveTable[index])[1])));\r\t\t}\r\t}\r\tif (addr == 0) {\r\r\t\t/* Only if no compat version was found */\r\r\t\taddr = ioLoadExternalFunctionOfLengthFromModuleOfLength(functionName + (BASE_HEADER_SIZE), functionLength, moduleName + (BASE_HEADER_SIZE), moduleLength);\r\t}\r\tif (addr == 0) {\r\t\tindex = -1;\r\t} else {\r\r\t\t/* add the function to the external primitive table */\r\r\t\tindex = addToExternalPrimitiveTable(addr);\r\t}\r\t/* begin success: */\r\tfoo->successFlag = (index >= 0) && foo->successFlag;\r\tlongAtput((lit + (BASE_HEADER_SIZE)) + (3 << (SHIFT_FOR_WORD)), ((index << 1) | 1));\r\tif (foo->successFlag && (addr != 0)) {\r\t\trewriteMethodCacheSelclassprimIndexprimFunction(foo->messageSelector, foo->lkupClass, 1000 + index, addr);\r\t\tcallExternalPrimitive(addr);\r\t} else {\r\t\trewriteMethodCacheSelclassprimIndex(foo->messageSelector, foo->lkupClass, 0);\r\t}\r}\r\rsqInt primitiveFail(void) {\r\tfoo->successFlag = 0;\r}\r\r\r/*\tSet specific primitive failure. */\r\rsqInt primitiveFailFor(sqInt reasonCode) {\rregister struct foo * foo = &fum;\r    sqInt primFailCode;\r\r\tprimFailCode = reasonCode;\r\t/* begin primitiveFail */\r\tfoo->successFlag = 0;\r}\r\r\r/*\tPrimitive. Search up the context stack for the next method context marked for exception handling starting at the receiver. Return nil if none found */\r\rsqInt primitiveFindHandlerContext(void) {\rregister struct foo * foo = &fum;\r    sqInt nilOop;\r    sqInt thisCntx;\r    sqInt sp;\r    sqInt top;\r    sqInt sp1;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tthisCntx = top;\r\tnilOop = foo->nilObj;\r\tdo {\r\t\tif (isHandlerMarked(thisCntx)) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), thisCntx);\r\t\t\tfoo->stackPointer = sp;\r\t\t\treturn null;\r\t\t}\r\t\tthisCntx = longAt((thisCntx + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\t} while(!(thisCntx == nilOop));\r\t/* begin push: */\r\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->nilObj);\r\tfoo->stackPointer = sp1;\r\treturn null;\r}\r\r\r/*\tPrimitive. Search up the context stack for the next method context marked for unwind handling from the receiver up to but not including the argument. Return nil if none found. */\r\rsqInt primitiveFindNextUnwindContext(void) {\rregister struct foo * foo = &fum;\r    sqInt nilOop;\r    sqInt unwindMarked;\r    sqInt thisCntx;\r    sqInt aContext;\r    sqInt sp;\r    sqInt meth;\r    sqInt header;\r    sqInt pIndex;\r    sqInt top;\r    sqInt oop;\r    sqInt sp1;\r    sqInt top1;\r    sqInt primBits;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\taContext = top;\r\t/* begin fetchPointer:ofObject: */\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\toop = top1;\r\tthisCntx = longAt((oop + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\tnilOop = foo->nilObj;\r\twhile (!((thisCntx == aContext) || (thisCntx == nilOop))) {\r\t\t/* begin isUnwindMarked: */\r\t\theader = longAt(thisCntx);\r\t\tif (!(((((usqInt) header) >> 12) & 31) == 14)) {\r\t\t\tunwindMarked = 0;\r\t\t\tgoto l1;\r\t\t}\r\t\tmeth = longAt((thisCntx + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\t\t/* begin primitiveIndexOf: */\r\t\tprimBits = (((usqInt) (longAt((meth + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD))))) >> 1) & 268435967;\r\t\tpIndex = (primBits & 511) + (((usqInt) primBits) >> 19);\r\t\tunwindMarked = pIndex == 198;\r\tl1:\t/* end isUnwindMarked: */;\r\t\tif (unwindMarked) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), thisCntx);\r\t\t\tfoo->stackPointer = sp;\r\t\t\treturn null;\r\t\t}\r\t\tthisCntx = longAt((thisCntx + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\t}\r\t/* begin push: */\r\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), nilOop);\r\tfoo->stackPointer = sp1;\r\treturn null;\r}\r\rsqInt primitiveFloatAdd(void) {\rregister struct foo * foo = &fum;\r\treturn primitiveFloatAddtoArg(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))), longAt(foo->stackPointer));\r}\r\rsqInt primitiveFloatAddtoArg(sqInt rcvrOop, sqInt argOop) {\rregister struct foo * foo = &fum;\r    double arg;\r    double rcvr;\r\r\t/* begin loadFloatOrIntFrom: */\r\tif ((rcvrOop & 1)) {\r\t\trcvr = ((double) ((rcvrOop >> 1)) );\r\t\tgoto l1;\r\t}\r\tif ((fetchClassOfNonInt(rcvrOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\trcvr = floatValueOf(rcvrOop);\r\t\tgoto l1;\r\t}\r\tfoo->successFlag = 0;\rl1:\t/* end loadFloatOrIntFrom: */;\r\t/* begin loadFloatOrIntFrom: */\r\tif ((argOop & 1)) {\r\t\targ = ((double) ((argOop >> 1)) );\r\t\tgoto l2;\r\t}\r\tif ((fetchClassOfNonInt(argOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\targ = floatValueOf(argOop);\r\t\tgoto l2;\r\t}\r\tfoo->successFlag = 0;\rl2:\t/* end loadFloatOrIntFrom: */;\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\tpushFloat(rcvr + arg);\r\t}\r}\r\rsqInt primitiveFloatDivide(void) {\rregister struct foo * foo = &fum;\r\treturn primitiveFloatDividebyArg(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))), longAt(foo->stackPointer));\r}\r\rsqInt primitiveFloatDividebyArg(sqInt rcvrOop, sqInt argOop) {\rregister struct foo * foo = &fum;\r    double arg;\r    double rcvr;\r\r\t/* begin loadFloatOrIntFrom: */\r\tif ((rcvrOop & 1)) {\r\t\trcvr = ((double) ((rcvrOop >> 1)) );\r\t\tgoto l1;\r\t}\r\tif ((fetchClassOfNonInt(rcvrOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\trcvr = floatValueOf(rcvrOop);\r\t\tgoto l1;\r\t}\r\tfoo->successFlag = 0;\rl1:\t/* end loadFloatOrIntFrom: */;\r\t/* begin loadFloatOrIntFrom: */\r\tif ((argOop & 1)) {\r\t\targ = ((double) ((argOop >> 1)) );\r\t\tgoto l2;\r\t}\r\tif ((fetchClassOfNonInt(argOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\targ = floatValueOf(argOop);\r\t\tgoto l2;\r\t}\r\tfoo->successFlag = 0;\rl2:\t/* end loadFloatOrIntFrom: */;\r\tif (foo->successFlag) {\r\t\t/* begin success: */\r\t\tfoo->successFlag = (arg != 0.0) && foo->successFlag;\r\t\tif (foo->successFlag) {\r\t\t\t/* begin pop: */\r\t\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\t\tpushFloat(rcvr / arg);\r\t\t}\r\t}\r}\r\rsqInt primitiveFloatEqual(void) {\rregister struct foo * foo = &fum;\r    sqInt aBool;\r    sqInt sp;\r    sqInt sp1;\r\r\taBool = primitiveFloatEqualtoArg(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))), longAt(foo->stackPointer));\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\t/* begin pushBool: */\r\t\tif (aBool) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t}\r}\r\rsqInt primitiveFloatEqualtoArg(sqInt rcvrOop, sqInt argOop) {\rregister struct foo * foo = &fum;\r    double arg;\r    double rcvr;\r\r\t/* begin loadFloatOrIntFrom: */\r\tif ((rcvrOop & 1)) {\r\t\trcvr = ((double) ((rcvrOop >> 1)) );\r\t\tgoto l1;\r\t}\r\tif ((fetchClassOfNonInt(rcvrOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\trcvr = floatValueOf(rcvrOop);\r\t\tgoto l1;\r\t}\r\tfoo->successFlag = 0;\rl1:\t/* end loadFloatOrIntFrom: */;\r\t/* begin loadFloatOrIntFrom: */\r\tif ((argOop & 1)) {\r\t\targ = ((double) ((argOop >> 1)) );\r\t\tgoto l2;\r\t}\r\tif ((fetchClassOfNonInt(argOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\targ = floatValueOf(argOop);\r\t\tgoto l2;\r\t}\r\tfoo->successFlag = 0;\rl2:\t/* end loadFloatOrIntFrom: */;\r\tif (foo->successFlag) {\r\t\treturn rcvr == arg;\r\t}\r}\r\rsqInt primitiveFloatGreaterthanArg(sqInt rcvrOop, sqInt argOop) {\rregister struct foo * foo = &fum;\r    double arg;\r    double rcvr;\r\r\t/* begin loadFloatOrIntFrom: */\r\tif ((rcvrOop & 1)) {\r\t\trcvr = ((double) ((rcvrOop >> 1)) );\r\t\tgoto l1;\r\t}\r\tif ((fetchClassOfNonInt(rcvrOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\trcvr = floatValueOf(rcvrOop);\r\t\tgoto l1;\r\t}\r\tfoo->successFlag = 0;\rl1:\t/* end loadFloatOrIntFrom: */;\r\t/* begin loadFloatOrIntFrom: */\r\tif ((argOop & 1)) {\r\t\targ = ((double) ((argOop >> 1)) );\r\t\tgoto l2;\r\t}\r\tif ((fetchClassOfNonInt(argOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\targ = floatValueOf(argOop);\r\t\tgoto l2;\r\t}\r\tfoo->successFlag = 0;\rl2:\t/* end loadFloatOrIntFrom: */;\r\tif (foo->successFlag) {\r\t\treturn rcvr > arg;\r\t}\r}\r\rsqInt primitiveFloatGreaterOrEqual(void) {\rregister struct foo * foo = &fum;\r    sqInt aBool;\r    sqInt sp;\r    sqInt sp1;\r\r\taBool = primitiveFloatGreaterOrEqualtoArg(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))), longAt(foo->stackPointer));\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\t/* begin pushBool: */\r\t\tif (aBool) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t}\r}\r\rsqInt primitiveFloatGreaterOrEqualtoArg(sqInt rcvrOop, sqInt argOop) {\rregister struct foo * foo = &fum;\r    double arg;\r    double rcvr;\r\r\t/* begin loadFloatOrIntFrom: */\r\tif ((rcvrOop & 1)) {\r\t\trcvr = ((double) ((rcvrOop >> 1)) );\r\t\tgoto l1;\r\t}\r\tif ((fetchClassOfNonInt(rcvrOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\trcvr = floatValueOf(rcvrOop);\r\t\tgoto l1;\r\t}\r\tfoo->successFlag = 0;\rl1:\t/* end loadFloatOrIntFrom: */;\r\t/* begin loadFloatOrIntFrom: */\r\tif ((argOop & 1)) {\r\t\targ = ((double) ((argOop >> 1)) );\r\t\tgoto l2;\r\t}\r\tif ((fetchClassOfNonInt(argOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\targ = floatValueOf(argOop);\r\t\tgoto l2;\r\t}\r\tfoo->successFlag = 0;\rl2:\t/* end loadFloatOrIntFrom: */;\r\tif (foo->successFlag) {\r\t\treturn rcvr >= arg;\r\t}\r}\r\rsqInt primitiveFloatGreaterThan(void) {\rregister struct foo * foo = &fum;\r    sqInt aBool;\r    sqInt sp;\r    sqInt sp1;\r\r\taBool = primitiveFloatGreaterthanArg(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))), longAt(foo->stackPointer));\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\t/* begin pushBool: */\r\t\tif (aBool) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t}\r}\r\rsqInt primitiveFloatLessthanArg(sqInt rcvrOop, sqInt argOop) {\rregister struct foo * foo = &fum;\r    double arg;\r    double rcvr;\r\r\t/* begin loadFloatOrIntFrom: */\r\tif ((rcvrOop & 1)) {\r\t\trcvr = ((double) ((rcvrOop >> 1)) );\r\t\tgoto l1;\r\t}\r\tif ((fetchClassOfNonInt(rcvrOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\trcvr = floatValueOf(rcvrOop);\r\t\tgoto l1;\r\t}\r\tfoo->successFlag = 0;\rl1:\t/* end loadFloatOrIntFrom: */;\r\t/* begin loadFloatOrIntFrom: */\r\tif ((argOop & 1)) {\r\t\targ = ((double) ((argOop >> 1)) );\r\t\tgoto l2;\r\t}\r\tif ((fetchClassOfNonInt(argOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\targ = floatValueOf(argOop);\r\t\tgoto l2;\r\t}\r\tfoo->successFlag = 0;\rl2:\t/* end loadFloatOrIntFrom: */;\r\tif (foo->successFlag) {\r\t\treturn rcvr < arg;\r\t}\r}\r\rsqInt primitiveFloatLessOrEqual(void) {\rregister struct foo * foo = &fum;\r    sqInt aBool;\r    sqInt sp;\r    sqInt sp1;\r\r\taBool = primitiveFloatLessOrEqualtoArg(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))), longAt(foo->stackPointer));\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\t/* begin pushBool: */\r\t\tif (aBool) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t}\r}\r\rsqInt primitiveFloatLessOrEqualtoArg(sqInt rcvrOop, sqInt argOop) {\rregister struct foo * foo = &fum;\r    double arg;\r    double rcvr;\r\r\t/* begin loadFloatOrIntFrom: */\r\tif ((rcvrOop & 1)) {\r\t\trcvr = ((double) ((rcvrOop >> 1)) );\r\t\tgoto l1;\r\t}\r\tif ((fetchClassOfNonInt(rcvrOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\trcvr = floatValueOf(rcvrOop);\r\t\tgoto l1;\r\t}\r\tfoo->successFlag = 0;\rl1:\t/* end loadFloatOrIntFrom: */;\r\t/* begin loadFloatOrIntFrom: */\r\tif ((argOop & 1)) {\r\t\targ = ((double) ((argOop >> 1)) );\r\t\tgoto l2;\r\t}\r\tif ((fetchClassOfNonInt(argOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\targ = floatValueOf(argOop);\r\t\tgoto l2;\r\t}\r\tfoo->successFlag = 0;\rl2:\t/* end loadFloatOrIntFrom: */;\r\tif (foo->successFlag) {\r\t\treturn rcvr <= arg;\r\t}\r}\r\rsqInt primitiveFloatLessThan(void) {\rregister struct foo * foo = &fum;\r    sqInt aBool;\r    sqInt sp;\r    sqInt sp1;\r\r\taBool = primitiveFloatLessthanArg(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))), longAt(foo->stackPointer));\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\t/* begin pushBool: */\r\t\tif (aBool) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t}\r}\r\rsqInt primitiveFloatMultiply(void) {\rregister struct foo * foo = &fum;\r\treturn primitiveFloatMultiplybyArg(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))), longAt(foo->stackPointer));\r}\r\rsqInt primitiveFloatMultiplybyArg(sqInt rcvrOop, sqInt argOop) {\rregister struct foo * foo = &fum;\r    double arg;\r    double rcvr;\r\r\t/* begin loadFloatOrIntFrom: */\r\tif ((rcvrOop & 1)) {\r\t\trcvr = ((double) ((rcvrOop >> 1)) );\r\t\tgoto l1;\r\t}\r\tif ((fetchClassOfNonInt(rcvrOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\trcvr = floatValueOf(rcvrOop);\r\t\tgoto l1;\r\t}\r\tfoo->successFlag = 0;\rl1:\t/* end loadFloatOrIntFrom: */;\r\t/* begin loadFloatOrIntFrom: */\r\tif ((argOop & 1)) {\r\t\targ = ((double) ((argOop >> 1)) );\r\t\tgoto l2;\r\t}\r\tif ((fetchClassOfNonInt(argOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\targ = floatValueOf(argOop);\r\t\tgoto l2;\r\t}\r\tfoo->successFlag = 0;\rl2:\t/* end loadFloatOrIntFrom: */;\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\tpushFloat(rcvr * arg);\r\t}\r}\r\rsqInt primitiveFloatNotEqual(void) {\rregister struct foo * foo = &fum;\r    sqInt aBool;\r    sqInt sp;\r    sqInt sp1;\r\r\taBool = primitiveFloatEqualtoArg(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))), longAt(foo->stackPointer));\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\t/* begin pushBool: */\r\t\tif (!aBool) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t}\r}\r\rsqInt primitiveFloatSubtract(void) {\rregister struct foo * foo = &fum;\r\treturn primitiveFloatSubtractfromArg(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))), longAt(foo->stackPointer));\r}\r\rsqInt primitiveFloatSubtractfromArg(sqInt rcvrOop, sqInt argOop) {\rregister struct foo * foo = &fum;\r    double arg;\r    double rcvr;\r\r\t/* begin loadFloatOrIntFrom: */\r\tif ((rcvrOop & 1)) {\r\t\trcvr = ((double) ((rcvrOop >> 1)) );\r\t\tgoto l1;\r\t}\r\tif ((fetchClassOfNonInt(rcvrOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\trcvr = floatValueOf(rcvrOop);\r\t\tgoto l1;\r\t}\r\tfoo->successFlag = 0;\rl1:\t/* end loadFloatOrIntFrom: */;\r\t/* begin loadFloatOrIntFrom: */\r\tif ((argOop & 1)) {\r\t\targ = ((double) ((argOop >> 1)) );\r\t\tgoto l2;\r\t}\r\tif ((fetchClassOfNonInt(argOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\targ = floatValueOf(argOop);\r\t\tgoto l2;\r\t}\r\tfoo->successFlag = 0;\rl2:\t/* end loadFloatOrIntFrom: */;\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\tpushFloat(rcvr - arg);\r\t}\r}\r\r\r/*\tClear the method lookup cache. This must be done after every programming change. */\r\rsqInt primitiveFlushCache(void) {\rregister struct foo * foo = &fum;\r    sqInt i;\r    sqInt aCompiledMethod;\r\r\t/* begin flushMethodCache */\r\tfor (i = 1; i <= MethodCacheSize; i += 1) {\r\t\tfoo->methodCache[i] = 0;\r\t}\r\tfor (i = 1; i <= AtCacheTotalSize; i += 1) {\r\t\tfoo->atCache[i] = 0;\r\t}\r\t/* begin compilerFlushCacheHook: */\r\taCompiledMethod = null;\r\tif (foo->compilerInitialized) {\r\t\tcompilerFlushCache(aCompiledMethod);\r\t}\r}\r\r\r/*\tThe receiver is a compiledMethod.  Clear all entries in the method lookup cache that refer to this method, presumably because it has been redefined, overridden or removed. */\r\rsqInt primitiveFlushCacheByMethod(void) {\rregister struct foo * foo = &fum;\r    sqInt oldMethod;\r    sqInt i;\r    sqInt probe;\r\r\toldMethod = longAt(foo->stackPointer);\r\tprobe = 0;\r\tfor (i = 1; i <= MethodCacheEntries; i += 1) {\r\t\tif ((foo->methodCache[probe + MethodCacheMethod]) == oldMethod) {\r\t\t\tfoo->methodCache[probe + MethodCacheSelector] = 0;\r\t\t}\r\t\tprobe += MethodCacheEntrySize;\r\t}\r\t/* begin compilerFlushCacheHook: */\r\tif (foo->compilerInitialized) {\r\t\tcompilerFlushCache(oldMethod);\r\t}\r}\r\r\r/*\tThe receiver is a message selector.  Clear all entries in the method lookup cache with this selector, presumably because an associated method has been redefined. */\r\rsqInt primitiveFlushCacheSelective(void) {\rregister struct foo * foo = &fum;\r    sqInt selector;\r    sqInt i;\r    sqInt probe;\r\r\tselector = longAt(foo->stackPointer);\r\tprobe = 0;\r\tfor (i = 1; i <= MethodCacheEntries; i += 1) {\r\t\tif ((foo->methodCache[probe + MethodCacheSelector]) == selector) {\r\t\t\tfoo->methodCache[probe + MethodCacheSelector] = 0;\r\t\t}\r\t\tprobe += MethodCacheEntrySize;\r\t}\r}\r\r\r/*\tPrimitive. Flush all the existing external primitives in the image thus forcing a reload on next invokation. */\r\rsqInt primitiveFlushExternalPrimitives(void) {\r\treturn flushExternalPrimitives();\r}\r\r\r/*\tOn some platforms, this primitive forces enqueued display updates to be processed immediately. On others, it does nothing. */\r\rsqInt primitiveForceDisplayUpdate(void) {\r\tioForceDisplayUpdate();\r}\r\r\r/*\tSet force tenure flag to true, this forces a tenure operation on the next incremental GC */\r\rEXPORT(sqInt) primitiveForceTenure(void) {\r\tfoo->forceTenureFlag = 1;\r}\r\r\r/*\tOn platforms that support it, this primitive prints the receiver, assumed to be a Form, to the default printer. */\r\rsqInt primitiveFormPrint(void) {\rregister struct foo * foo = &fum;\r    sqInt landscapeFlag;\r    double  vScale;\r    sqInt bitsArraySize;\r    sqInt wordsPerLine;\r    sqInt h;\r    sqInt pixelsPerWord;\r    sqInt rcvr;\r    sqInt depth;\r    sqInt ok;\r    sqInt bitsArray;\r    double  hScale;\r    sqInt w;\r    sqInt sz;\r    sqInt header;\r    sqInt fmt;\r\r\t/* begin booleanValueOf: */\r\tif ((longAt(foo->stackPointer)) == foo->trueObj) {\r\t\tlandscapeFlag = 1;\r\t\tgoto l1;\r\t}\r\tif ((longAt(foo->stackPointer)) == foo->falseObj) {\r\t\tlandscapeFlag = 0;\r\t\tgoto l1;\r\t}\r\tfoo->successFlag = 0;\r\tlandscapeFlag = null;\rl1:\t/* end booleanValueOf: */;\r\tvScale = floatValueOf(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))));\r\thScale = floatValueOf(longAt(foo->stackPointer - (2 * (BYTES_PER_WORD))));\r\trcvr = longAt(foo->stackPointer - (3 * (BYTES_PER_WORD)));\r\tif ((rcvr & 1)) {\r\t\t/* begin success: */\r\t\tfoo->successFlag = 0 && foo->successFlag;\r\t}\r\tif (foo->successFlag) {\r\t\tif (!((((rcvr & 1) == 0) && (((((usqInt) (longAt(rcvr))) >> 8) & 15) <= 4)) && ((lengthOf(rcvr)) >= 4))) {\r\t\t\t/* begin success: */\r\t\t\tfoo->successFlag = 0 && foo->successFlag;\r\t\t}\r\t}\r\tif (foo->successFlag) {\r\t\tbitsArray = longAt((rcvr + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)));\r\t\tw = fetchIntegerofObject(1, rcvr);\r\t\th = fetchIntegerofObject(2, rcvr);\r\t\tdepth = fetchIntegerofObject(3, rcvr);\r\t\tif (!((w > 0) && (h > 0))) {\r\t\t\t/* begin success: */\r\t\t\tfoo->successFlag = 0 && foo->successFlag;\r\t\t}\r\t\tpixelsPerWord = 32 / depth;\r\t\twordsPerLine = (w + (pixelsPerWord - 1)) / pixelsPerWord;\r\t\tif ((!((rcvr & 1))) && (((bitsArray & 1) == 0) && (isWordsOrBytesNonInt(bitsArray)))) {\r\t\t\t/* begin byteLengthOf: */\r\t\t\theader = longAt(bitsArray);\r\t\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(bitsArray - ((BYTES_PER_WORD) * 2))) & (ALL_BUT_TYPE_MASK);\r\t\t\t} else {\r\t\t\t\tsz = header & (SIZE_MASK);\r\t\t\t}\r\t\t\tfmt = (((usqInt) header) >> 8) & 15;\r\t\t\tif (fmt < 8) {\r\t\t\t\tbitsArraySize = sz - (BASE_HEADER_SIZE);\r\t\t\t\tgoto l2;\r\t\t\t} else {\r\t\t\t\tbitsArraySize = (sz - (BASE_HEADER_SIZE)) - (fmt & 3);\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\tl2:\t/* end byteLengthOf: */;\r\t\t\t/* begin success: */\r\t\t\tfoo->successFlag = (bitsArraySize == ((wordsPerLine * h) * 4)) && foo->successFlag;\r\t\t} else {\r\t\t\t/* begin success: */\r\t\t\tfoo->successFlag = 0 && foo->successFlag;\r\t\t}\r\t}\r\tif (foo->successFlag) {\r\t\tif ((BYTES_PER_WORD) == 8) {\r\t\t\tok = ioFormPrint(bitsArray + 8, w, h, depth, hScale, vScale, landscapeFlag);\r\t\t} else {\r\t\t\tok = ioFormPrint(bitsArray + 4, w, h, depth, hScale, vScale, landscapeFlag);\r\t\t}\r\t\t/* begin success: */\r\t\tfoo->successFlag = ok && foo->successFlag;\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 3 * (BYTES_PER_WORD);\r\t}\r}\r\rsqInt primitiveFractionalPart(void) {\rregister struct foo * foo = &fum;\r    double  trunc;\r    double  frac;\r    double  rcvr;\r\r\trcvr = popFloat();\r\tif (foo->successFlag) {\r\t\tfrac = modf(rcvr, &trunc);\r\t\tpushFloat(frac);\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 1 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tDo a full garbage collection and return the number of bytes available (including swap space if dynamic memory management is supported). */\r\rsqInt primitiveFullGC(void) {\rregister struct foo * foo = &fum;\r    sqInt integerValue;\r    sqInt sp;\r\r\t/* begin pop: */\r\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\tincrementalGC();\r\tfullGC();\r\t/* begin pushInteger: */\r\tintegerValue = ((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK)) + (sqMemoryExtraBytesLeft(1));\r\t/* begin push: */\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), ((integerValue << 1) | 1));\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tFetch the system attribute with the given integer ID. The \r\tresult is a string, which will be empty if the attribute is not \r\tdefined. */\r\rsqInt primitiveGetAttribute(void) {\rregister struct foo * foo = &fum;\r    sqInt sz;\r    sqInt s;\r    sqInt attr;\r    sqInt sp;\r    sqInt integerPointer;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tattr = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tattr = 0;\r\t\tgoto l1;\r\t}\rl1:\t/* end checkedIntegerValueOf: */;\r\tif (foo->successFlag) {\r\t\tsz = attributeSize(attr);\r\t}\r\tif (foo->successFlag) {\r\t\ts = instantiateClassindexableSize(fetchPointerofObject(ClassString, foo->specialObjectsOop), sz);\r\t\tgetAttributeIntoLength(attr, s + (BASE_HEADER_SIZE), sz);\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), s);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\r\r/*\tPrimitive. Return the next input event from the VM event queue. */\r\rsqInt primitiveGetNextEvent(void) {\rregister struct foo * foo = &fum;\r    sqInt arg;\r    int evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };\r    sqInt i;\r    sqInt value;\r    sqInt eventTypeIs;\r    sqInt oop;\r\r\t;\r\targ = longAt(foo->stackPointer);\r\tif (!((((arg & 1) == 0) && (((((usqInt) (longAt(arg))) >> 8) & 15) == 2)) && ((slotSizeOf(arg)) == 8))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tioGetNextEvent(((sqInputEvent*) evtBuf));\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\teventTypeIs = evtBuf[0];\r\t/* begin storeInteger:ofObject:withValue: */\r\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t(((((int) (evtBuf[0]))) ^ ((((int) (evtBuf[0]))) << 1)) >= 0)\r# else\r\t\t(((evtBuf[0]) >= -1073741824) && ((evtBuf[0]) <= 1073741823))\r# endif  // SQ_HOST32\r\t) {\r\t\tlongAtput((arg + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)), (((evtBuf[0]) << 1) | 1));\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t}\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\tif (eventTypeIs == 6) {\r\t\tfor (i = 1; i <= 7; i += 1) {\r\t\t\tvalue = evtBuf[i];\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tif ((((usqInt) arg)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(arg, value);\r\t\t\t}\r\t\t\tlongAtput((arg + (BASE_HEADER_SIZE)) + (i << (SHIFT_FOR_WORD)), value);\r\t\t}\r\t} else {\r\t\t/* begin storeInteger:ofObject:withValue: */\r\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t(((((int) ((evtBuf[1]) & MillisecondClockMask))) ^ ((((int) ((evtBuf[1]) & MillisecondClockMask))) << 1)) >= 0)\r# else\r\t\t\t((((evtBuf[1]) & MillisecondClockMask) >= -1073741824) && (((evtBuf[1]) & MillisecondClockMask) <= 1073741823))\r# endif  // SQ_HOST32\r\t\t) {\r\t\t\tlongAtput((arg + (BASE_HEADER_SIZE)) + (1 << (SHIFT_FOR_WORD)), ((((evtBuf[1]) & MillisecondClockMask) << 1) | 1));\r\t\t} else {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t}\r\t\tif (!(foo->successFlag)) {\r\t\t\treturn null;\r\t\t}\r\t\tfor (i = 2; i <= 7; i += 1) {\r\t\t\tvalue = evtBuf[i];\r\t\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t\t(((((int) value)) ^ ((((int) value)) << 1)) >= 0)\r# else\r\t\t\t\t((value >= -1073741824) && (value <= 1073741823))\r# endif  // SQ_HOST32\r\t\t\t) {\r\t\t\t\t/* begin storeInteger:ofObject:withValue: */\r\t\t\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t\t\t(((((int) value)) ^ ((((int) value)) << 1)) >= 0)\r# else\r\t\t\t\t\t((value >= -1073741824) && (value <= 1073741823))\r# endif  // SQ_HOST32\r\t\t\t\t) {\r\t\t\t\t\tlongAtput((arg + (BASE_HEADER_SIZE)) + (i << (SHIFT_FOR_WORD)), ((value << 1) | 1));\r\t\t\t\t} else {\r\t\t\t\t\t/* begin primitiveFail */\r\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t}\r\t\t\t} else {\r\t\t\t\t/* begin pushRemappableOop: */\r\t\t\t\tfoo->remapBuffer[foo->remapBufferCount += 1] = arg;\r\t\t\t\tvalue = positive32BitIntegerFor(value);\r\t\t\t\t/* begin popRemappableOop */\r\t\t\t\toop = foo->remapBuffer[foo->remapBufferCount];\r\t\t\t\tfoo->remapBufferCount -= 1;\r\t\t\t\targ = oop;\r\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\tif ((((usqInt) arg)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\tpossibleRootStoreIntovalue(arg, value);\r\t\t\t\t}\r\t\t\t\tlongAtput((arg + (BASE_HEADER_SIZE)) + (i << (SHIFT_FOR_WORD)), value);\r\t\t\t}\r\t\t}\r\t}\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\t/* begin pop: */\r\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r}\r\rsqInt primitiveGreaterOrEqual(void) {\rregister struct foo * foo = &fum;\r    sqInt integerArgument;\r    sqInt integerReceiver;\r    sqInt integerPointer;\r    sqInt integerPointer1;\r    sqInt sp;\r    sqInt sp1;\r    sqInt top;\r    sqInt top1;\r\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer = top;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tintegerArgument = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tintegerArgument = 0;\r\t\tgoto l1;\r\t}\rl1:\t/* end checkedIntegerValueOf: */;\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer1 = top1;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer1 & 1)) {\r\t\tintegerReceiver = (integerPointer1 >> 1);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tintegerReceiver = 0;\r\t\tgoto l2;\r\t}\rl2:\t/* end checkedIntegerValueOf: */;\r\t/* begin checkBooleanResult: */\r\tif (foo->successFlag) {\r\t\t/* begin pushBool: */\r\t\tif (integerReceiver >= integerArgument) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t}\r}\r\rsqInt primitiveGreaterThan(void) {\rregister struct foo * foo = &fum;\r    sqInt integerArgument;\r    sqInt integerReceiver;\r    sqInt integerPointer;\r    sqInt integerPointer1;\r    sqInt top;\r    sqInt top1;\r    sqInt sp;\r    sqInt sp1;\r\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer = top;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tintegerArgument = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tintegerArgument = 0;\r\t\tgoto l1;\r\t}\rl1:\t/* end checkedIntegerValueOf: */;\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer1 = top1;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer1 & 1)) {\r\t\tintegerReceiver = (integerPointer1 >> 1);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tintegerReceiver = 0;\r\t\tgoto l2;\r\t}\rl2:\t/* end checkedIntegerValueOf: */;\r\t/* begin checkBooleanResult: */\r\tif (foo->successFlag) {\r\t\t/* begin pushBool: */\r\t\tif (integerReceiver > integerArgument) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tAnswer an integer identifying the type of image. The image version number may\r\tidentify the format of the image (e.g. 32 or 64-bit word size) or specific requirements\r\tof the image (e.g. block closure support required).\r\t\r\tThis is a named (not numbered) primitive in the null module (ie the VM) */\r\rEXPORT(sqInt) primitiveImageFormatVersion(void) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r    sqInt sp;\r\r\t/* begin pop:thenPush: */\r\toop = positive32BitIntegerFor(imageFormatVersionNumber);\r\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), oop);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tWhen called with a single string argument, record the string as the current image file name. When called with zero arguments, return a string containing the current image file name. */\r\rsqInt primitiveImageName(void) {\rregister struct foo * foo = &fum;\r    void * sCRIfn;\r    sqInt sz;\r    sqInt okToRename;\r    sqInt s;\r    sqInt sp;\r    sqInt classOop;\r    sqInt cl;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop;\r\r\tif (foo->argumentCount == 1) {\r\r\t\t/* If the security plugin can be loaded, use it to check for rename permission.\r\t\tIf not, assume it's ok */\r\r\t\tsCRIfn = ioLoadFunctionFrom(\"secCanRenameImage\", \"SecurityPlugin\");\r\t\tif (sCRIfn != 0) {\r\t\t\tokToRename =  ((sqInt (*)(void))sCRIfn)();\r\t\t\tif (!(okToRename)) {\r\t\t\t\t/* begin primitiveFail */\r\t\t\t\tfoo->successFlag = 0;\r\t\t\t\treturn null;\r\t\t\t}\r\t\t}\r\t\ts = longAt(foo->stackPointer);\r\t\t/* begin assertClassOf:is: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop = foo->specialObjectsOop;\r\t\tclassOop = longAt((oop + (BASE_HEADER_SIZE)) + (ClassString << (SHIFT_FOR_WORD)));\r\t\tif ((s & 1)) {\r\t\t\tfoo->successFlag = 0;\r\t\t\tgoto l1;\r\t\t}\r\t\tccIndex = (((usqInt) (longAt(s))) >> 12) & 31;\r\t\tif (ccIndex == 0) {\r\t\t\tcl = (longAt(s - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop2 = foo->specialObjectsOop;\r\t\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\t\tcl = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\t}\r\t\t/* begin success: */\r\t\tfoo->successFlag = (cl == classOop) && foo->successFlag;\r\tl1:\t/* end assertClassOf:is: */;\r\t\tif (foo->successFlag) {\r\t\t\tsz = stSizeOf(s);\r\t\t\timageNamePutLength(s + (BASE_HEADER_SIZE), sz);\r\t\t\t/* begin pop: */\r\t\t\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t\t}\r\t} else {\r\t\tsz = imageNameSize();\r\t\ts = instantiateClassindexableSize(fetchPointerofObject(ClassString, foo->specialObjectsOop), sz);\r\t\timageNameGetLength(s + (BASE_HEADER_SIZE), sz);\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t\t/* begin push: */\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), s);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\r\r/*\tDo a quick, incremental garbage collection and return the number of bytes immediately available. (Note: more space may be made available by doing a full garbage collection. */\r\rsqInt primitiveIncrementalGC(void) {\rregister struct foo * foo = &fum;\r    sqInt integerValue;\r    sqInt sp;\r\r\t/* begin pop: */\r\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\tincrementalGC();\r\t/* begin pushInteger: */\r\tintegerValue = ((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK)) + (sqMemoryExtraBytesLeft(0));\r\t/* begin push: */\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), ((integerValue << 1) | 1));\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tNote: We now have 10 bits of primitive index, but they are in two places\r\tfor temporary backward compatibility.  The time to unpack is negligible,\r\tsince the reconstituted full index is stored in the method cache. */\r\rsqInt primitiveIndexOf(sqInt methodPointer) {\r    sqInt primBits;\r\r\tprimBits = (((usqInt) (longAt((methodPointer + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD))))) >> 1) & 268435967;\r\treturn (primBits & 511) + (((usqInt) primBits) >> 19);\r}\r\r\r/*\tNote: We now have 10 bits of primitive index, but they are in two places\r\tfor temporary backward compatibility.  The time to unpack is negligible,\r\t since the derived primitive function pointer is stored in the method cache. */\r\rsqInt primitiveIndexOfMethodHeader(sqInt methodHeader) {\r    sqInt primBits;\r\r\tprimBits = ((usqInt) methodHeader) >> 1;\r\treturn (primBits & 511) + ((((usqInt) primBits) >> 19) & 512);\r}\r\r\r/*\tRegister the input semaphore. The argument is an index into the ExternalObjectsArray part of the specialObjectsArray and must have been allocated via 'Smalltalk registerExternalObject: the Semaphore'  */\r\rsqInt primitiveInputSemaphore(void) {\rregister struct foo * foo = &fum;\r    sqInt arg;\r\r\targ = longAt(foo->stackPointer);\r\tif ((arg & 1)) {\r\t\tioSetInputSemaphore((arg >> 1));\r\t\tif (foo->successFlag) {\r\t\t\t/* begin pop: */\r\t\t\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t\t}\r\t\treturn null;\r\t}\r}\r\r\r/*\tReturn an integer indicating the reason for the most recent input interrupt. */\r\rsqInt primitiveInputWord(void) {\rregister struct foo * foo = &fum;\r    sqInt sp;\r\r\t/* begin pop:thenPushInteger: */\r\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), ((0 << 1) | 1));\r\tfoo->stackPointer = sp;\r}\r\rsqInt primitiveInstVarAt(void) {\rregister struct foo * foo = &fum;\r    sqInt totalLength;\r    sqInt fmt;\r    sqInt fixedFields;\r    sqInt value;\r    sqInt hdr;\r    sqInt rcvr;\r    sqInt index;\r    sqInt sp;\r    sqInt integerPointer;\r    sqInt sz;\r    sqInt classFormat;\r    sqInt class;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tindex = (integerPointer >> 1);\r\t\tgoto l3;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tindex = 0;\r\t\tgoto l3;\r\t}\rl3:\t/* end checkedIntegerValueOf: */;\r\trcvr = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\tif (foo->successFlag) {\r\t\thdr = longAt(rcvr);\r\t\tfmt = (((usqInt) hdr) >> 8) & 15;\r\t\t/* begin lengthOf:baseHeader:format: */\r\t\tif ((hdr & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(rcvr - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t} else {\r\t\t\tsz = hdr & (SIZE_MASK);\r\t\t}\r\t\tsz -= hdr & (SIZE_4_BIT);\r\t\tif (fmt <= 4) {\r\t\t\ttotalLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\t\tgoto l2;\r\t\t}\r\t\tif (fmt < 8) {\r\t\t\ttotalLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> 2;\r\t\t\tgoto l2;\r\t\t} else {\r\t\t\ttotalLength = (sz - (BASE_HEADER_SIZE)) - (fmt & 3);\r\t\t\tgoto l2;\r\t\t}\r\tl2:\t/* end lengthOf:baseHeader:format: */;\r\t\t/* begin fixedFieldsOf:format:length: */\r\t\tif ((fmt > 4) || (fmt == 2)) {\r\t\t\tfixedFields = 0;\r\t\t\tgoto l5;\r\t\t}\r\t\tif (fmt < 2) {\r\t\t\tfixedFields = totalLength;\r\t\t\tgoto l5;\r\t\t}\r\t\t/* begin fetchClassOf: */\r\t\tif ((rcvr & 1)) {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop1 = foo->specialObjectsOop;\r\t\t\tclass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\t\tgoto l4;\r\t\t}\r\t\tccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31;\r\t\tif (ccIndex == 0) {\r\t\t\tclass = (longAt(rcvr - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\t\tgoto l4;\r\t\t} else {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop3 = foo->specialObjectsOop;\r\t\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\t\tclass = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\t\tgoto l4;\r\t\t}\r\tl4:\t/* end fetchClassOf: */;\r\t\tclassFormat = (longAt((class + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1;\r\t\tfixedFields = (((((usqInt) classFormat) >> 11) & 192) + ((((usqInt) classFormat) >> 2) & 63)) - 1;\r\tl5:\t/* end fixedFieldsOf:format:length: */;\r\t\tif (!((index >= 1) && (index <= fixedFields))) {\r\t\t\tfoo->successFlag = 0;\r\t\t}\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin subscript:with:format: */\r\t\tif (fmt <= 4) {\r\t\t\tvalue = longAt((rcvr + (BASE_HEADER_SIZE)) + ((index - 1) << (SHIFT_FOR_WORD)));\r\t\t\tgoto l1;\r\t\t}\r\t\tif (fmt < 8) {\r\t\t\tvalue = positive32BitIntegerFor(long32At((rcvr + (BASE_HEADER_SIZE)) + ((index - 1) << 2)));\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\tvalue = (((byteAt((rcvr + (BASE_HEADER_SIZE)) + (index - 1))) << 1) | 1);\r\t\t\tgoto l1;\r\t\t}\r\tl1:\t/* end subscript:with:format: */;\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp = foo->stackPointer - (((foo->argumentCount + 1) - 1) * (BYTES_PER_WORD)), value);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\rsqInt primitiveInstVarAtPut(void) {\rregister struct foo * foo = &fum;\r    sqInt newValue;\r    sqInt totalLength;\r    sqInt fmt;\r    sqInt fixedFields;\r    sqInt hdr;\r    sqInt rcvr;\r    sqInt index;\r    sqInt valueToStore;\r    sqInt sp;\r    sqInt integerPointer;\r    sqInt sz;\r    sqInt classFormat;\r    sqInt class;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\tnewValue = longAt(foo->stackPointer);\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tindex = (integerPointer >> 1);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tindex = 0;\r\t\tgoto l2;\r\t}\rl2:\t/* end checkedIntegerValueOf: */;\r\trcvr = longAt(foo->stackPointer - (2 * (BYTES_PER_WORD)));\r\tif (foo->successFlag) {\r\t\thdr = longAt(rcvr);\r\t\tfmt = (((usqInt) hdr) >> 8) & 15;\r\t\t/* begin lengthOf:baseHeader:format: */\r\t\tif ((hdr & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(rcvr - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t} else {\r\t\t\tsz = hdr & (SIZE_MASK);\r\t\t}\r\t\tsz -= hdr & (SIZE_4_BIT);\r\t\tif (fmt <= 4) {\r\t\t\ttotalLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\t\tgoto l1;\r\t\t}\r\t\tif (fmt < 8) {\r\t\t\ttotalLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> 2;\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\ttotalLength = (sz - (BASE_HEADER_SIZE)) - (fmt & 3);\r\t\t\tgoto l1;\r\t\t}\r\tl1:\t/* end lengthOf:baseHeader:format: */;\r\t\t/* begin fixedFieldsOf:format:length: */\r\t\tif ((fmt > 4) || (fmt == 2)) {\r\t\t\tfixedFields = 0;\r\t\t\tgoto l4;\r\t\t}\r\t\tif (fmt < 2) {\r\t\t\tfixedFields = totalLength;\r\t\t\tgoto l4;\r\t\t}\r\t\t/* begin fetchClassOf: */\r\t\tif ((rcvr & 1)) {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop1 = foo->specialObjectsOop;\r\t\t\tclass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\t\tgoto l3;\r\t\t}\r\t\tccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31;\r\t\tif (ccIndex == 0) {\r\t\t\tclass = (longAt(rcvr - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\t\tgoto l3;\r\t\t} else {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop3 = foo->specialObjectsOop;\r\t\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\t\tclass = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\t\tgoto l3;\r\t\t}\r\tl3:\t/* end fetchClassOf: */;\r\t\tclassFormat = (longAt((class + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1;\r\t\tfixedFields = (((((usqInt) classFormat) >> 11) & 192) + ((((usqInt) classFormat) >> 2) & 63)) - 1;\r\tl4:\t/* end fixedFieldsOf:format:length: */;\r\t\tif (!((index >= 1) && (index <= fixedFields))) {\r\t\t\tfoo->successFlag = 0;\r\t\t}\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin subscript:with:storing:format: */\r\t\tif (fmt <= 4) {\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tif ((((usqInt) rcvr)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(rcvr, newValue);\r\t\t\t}\r\t\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + ((index - 1) << (SHIFT_FOR_WORD)), newValue);\r\t\t} else {\r\t\t\tif (fmt < 8) {\r\t\t\t\tvalueToStore = positive32BitValueOf(newValue);\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\tlong32Atput((rcvr + (BASE_HEADER_SIZE)) + ((index - 1) << 2), valueToStore);\r\t\t\t\t}\r\t\t\t} else {\r\t\t\t\tif (!((newValue & 1))) {\r\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t}\r\t\t\t\tvalueToStore = (newValue >> 1);\r\t\t\t\tif (!((valueToStore >= 0) && (valueToStore <= 255))) {\r\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t}\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\tbyteAtput((rcvr + (BASE_HEADER_SIZE)) + (index - 1), valueToStore);\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp = foo->stackPointer - (((foo->argumentCount + 1) - 1) * (BYTES_PER_WORD)), newValue);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\r\r/*\tNote:  this primitive has been decommissioned.  It is only here for short-term compatibility with an internal 2.3beta-d image that used this.  It did not save much time and it complicated several things.  Plus Jitter will do it right anyway. */\r\rsqInt primitiveInstVarsPutFromStack(void) {\rregister struct foo * foo = &fum;\r    sqInt offsetBits;\r    sqInt i;\r    sqInt rcvr;\r    sqInt valuePointer;\r\r\r\t/* Mark dirty so stores below can be unchecked */\r\r\trcvr = longAt(foo->stackPointer - (foo->argumentCount * (BYTES_PER_WORD)));\r\tif ((((usqInt) rcvr)) < (((usqInt) foo->youngStart))) {\r\t\tbeRootIfOld(rcvr);\r\t}\r\tfor (i = 0; i <= (foo->argumentCount - 1); i += 1) {\r\t\tif ((i & 3) == 0) {\r\t\t\toffsetBits = positive32BitValueOf(literalofMethod(((sqInt) i >> 2), foo->newMethod));\r\t\t}\r\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\tvaluePointer = longAt(foo->stackPointer - (i * (BYTES_PER_WORD)));\r\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + ((offsetBits & 255) << (SHIFT_FOR_WORD)), valuePointer);\r\t\toffsetBits = ((usqInt) offsetBits) >> 8;\r\t}\r\t/* begin pop: */\r\tfoo->stackPointer -= foo->argumentCount * (BYTES_PER_WORD);\r}\r\r\r/*\tReturn the 32bit signed integer contents of a words receiver */\r\rsqInt primitiveIntegerAt(void) {\rregister struct foo * foo = &fum;\r    sqInt sz;\r    sqInt value;\r    int intValue;\r    sqInt rcvr;\r    sqInt index;\r    sqInt addr;\r    sqInt sp;\r    sqInt object;\r    sqInt sp1;\r    sqInt integerPointer;\r    sqInt header;\r    sqInt successValue;\r    sqInt sz1;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tindex = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tindex = 0;\r\t\tgoto l1;\r\t}\r\tindex = null;\rl1:\t/* end stackIntegerValue: */;\r\trcvr = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\tif ((rcvr & 1)) {\r\t\t/* begin success: */\r\t\tfoo->successFlag = 0 && foo->successFlag;\r\t\treturn null;\r\t}\r\tif (!(((rcvr & 1) == 0) && (((((usqInt) (longAt(rcvr))) >> 8) & 15) == 6))) {\r\t\t/* begin success: */\r\t\tfoo->successFlag = 0 && foo->successFlag;\r\t\treturn null;\r\t}\r\t/* begin lengthOf: */\r\theader = longAt(rcvr);\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz1 = (longAt(rcvr - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz1 = header & (SIZE_MASK);\r\t}\r\tsz1 -= header & (SIZE_4_BIT);\r\tif (((((usqInt) header) >> 8) & 15) <= 4) {\r\t\tsz = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tgoto l2;\r\t}\r\tif (((((usqInt) header) >> 8) & 15) < 8) {\r\t\tsz = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> 2;\r\t\tgoto l2;\r\t} else {\r\t\tsz = (sz1 - (BASE_HEADER_SIZE)) - (((((usqInt) header) >> 8) & 15) & 3);\r\t\tgoto l2;\r\t}\rl2:\t/* end lengthOf:baseHeader:format: */;\r\t/* begin success: */\r\tsuccessValue = (index >= 1) && (index <= sz);\r\tfoo->successFlag = successValue && foo->successFlag;\r\tif (foo->successFlag) {\r\r\t\t/* for zero indexing */\r\r\t\taddr = ((rcvr + (BASE_HEADER_SIZE)) - 4) + (index * 4);\r\t\tvalue = intAt(addr);\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t(((((int) value)) ^ ((((int) value)) << 1)) >= 0)\r# else\r\t\t\t((value >= -1073741824) && (value <= 1073741823))\r# endif  // SQ_HOST32\r\t\t) {\r\t\t\t/* begin pushInteger: */\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), ((value << 1) | 1));\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\r\t\t\t/* 32 bit int may have been stored in 32 or 64 bit sqInt */\r\r\t\t\tintValue = value;\r\t\t\t/* begin push: */\r\t\t\tobject = signed32BitIntegerFor(intValue);\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), object);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t}\r}\r\r\r/*\tReturn the 32bit signed integer contents of a words receiver */\r\rsqInt primitiveIntegerAtPut(void) {\rregister struct foo * foo = &fum;\r    sqInt sz;\r    sqInt valueOop;\r    sqInt value;\r    sqInt rcvr;\r    sqInt index;\r    sqInt addr;\r    sqInt sp;\r    sqInt integerPointer;\r    sqInt header;\r    sqInt sz1;\r\r\tvalueOop = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tindex = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tindex = 0;\r\t\tgoto l1;\r\t}\r\tindex = null;\rl1:\t/* end stackIntegerValue: */;\r\trcvr = longAt(foo->stackPointer - (2 * (BYTES_PER_WORD)));\r\tif ((rcvr & 1)) {\r\t\t/* begin success: */\r\t\tfoo->successFlag = 0 && foo->successFlag;\r\t\treturn null;\r\t}\r\tif (!(((rcvr & 1) == 0) && (((((usqInt) (longAt(rcvr))) >> 8) & 15) == 6))) {\r\t\t/* begin success: */\r\t\tfoo->successFlag = 0 && foo->successFlag;\r\t\treturn null;\r\t}\r\t/* begin lengthOf: */\r\theader = longAt(rcvr);\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz1 = (longAt(rcvr - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz1 = header & (SIZE_MASK);\r\t}\r\tsz1 -= header & (SIZE_4_BIT);\r\tif (((((usqInt) header) >> 8) & 15) <= 4) {\r\t\tsz = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tgoto l2;\r\t}\r\tif (((((usqInt) header) >> 8) & 15) < 8) {\r\t\tsz = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> 2;\r\t\tgoto l2;\r\t} else {\r\t\tsz = (sz1 - (BASE_HEADER_SIZE)) - (((((usqInt) header) >> 8) & 15) & 3);\r\t\tgoto l2;\r\t}\rl2:\t/* end lengthOf:baseHeader:format: */;\r\tif (!((index >= 1) && (index <= sz))) {\r\t\t/* begin success: */\r\t\tfoo->successFlag = 0 && foo->successFlag;\r\t\treturn null;\r\t}\r\tif ((valueOop & 1)) {\r\t\tvalue = (valueOop >> 1);\r\t} else {\r\t\tvalue = signed32BitValueOf(valueOop);\r\t}\r\tif (foo->successFlag) {\r\r\t\t/* for zero indexing */\r\r\t\taddr = ((rcvr + (BASE_HEADER_SIZE)) - 4) + (index * 4);\r\t\tvalue = intAtput(addr, value);\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp = foo->stackPointer - ((3 - 1) * (BYTES_PER_WORD)), valueOop);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\r\r/*\tAnswer a string corresponding to the version of the interpreter source. This\r\trepresents the version level of the Smalltalk source code (interpreter and various\r\tplugins) that is translated to C by a CCodeGenerator, as distinct from the external\r\tplatform source code, typically written in C and managed separately for each platform.\r\tThis is a named (not numbered) primitive in the null module (ie the VM) */\r\rEXPORT(sqInt) primitiveInterpreterSourceVersion(void) {\rregister struct foo * foo = &fum;\r    void * p;\r    char * cString;\r    sqInt versionString;\r    sqInt len;\r    sqInt sp;\r\r\tcString = InterpreterSourceVersion;\r\tlen = strlen(cString);\r\tversionString = instantiateClassindexableSize(fetchPointerofObject(ClassString, foo->specialObjectsOop), len);\r\t/* begin arrayValueOf: */\r\tif ((!((versionString & 1))) && (((versionString & 1) == 0) && (isWordsOrBytesNonInt(versionString)))) {\r\t\tp = pointerForOop(versionString + (BASE_HEADER_SIZE));\r\t\tgoto l1;\r\t}\r\t/* begin primitiveFail */\r\tfoo->successFlag = 0;\rl1:\t/* end arrayValueOf: */;\r\tstrncpy(p, cString, len);\r\t/* begin pop:thenPush: */\r\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), versionString);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tRegister the user interrupt semaphore. If the argument is \r\tnot a Semaphore, unregister the current interrupt \r\tsemaphore.  */\r\rsqInt primitiveInterruptSemaphore(void) {\rregister struct foo * foo = &fum;\r    sqInt arg;\r    sqInt top;\r    sqInt oop;\r    sqInt oop1;\r    sqInt valuePointer;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\targ = top;\r\tif ((fetchClassOf(arg)) == (fetchPointerofObject(ClassSemaphore, foo->specialObjectsOop))) {\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\toop = foo->specialObjectsOop;\r\t\tif ((((usqInt) oop)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(oop, arg);\r\t\t}\r\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + (TheInterruptSemaphore << (SHIFT_FOR_WORD)), arg);\r\t} else {\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tvaluePointer = foo->nilObj;\r\t\tif ((((usqInt) oop1)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(oop1, valuePointer);\r\t\t}\r\t\tlongAtput((oop1 + (BASE_HEADER_SIZE)) + (TheInterruptSemaphore << (SHIFT_FOR_WORD)), valuePointer);\r\t}\r}\r\r\r/*\tPrimitive. 'Invoke' an object like a function, sending the special message \r\t\trun: originalSelector with: arguments in: aReceiver.\r\t */\r\rsqInt primitiveInvokeObjectAsMethod(void) {\rregister struct foo * foo = &fum;\r    sqInt newReceiver;\r    sqInt runReceiver;\r    sqInt runArgs;\r    sqInt runSelector;\r    sqInt lookupClass;\r    sqInt sp;\r    sqInt sp1;\r    sqInt sp2;\r    sqInt sp3;\r    sqInt count;\r    sqInt src;\r    sqInt in;\r    sqInt lastIn;\r    sqInt out;\r    sqInt oop;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\trunArgs = instantiateClassindexableSize(fetchPointerofObject(ClassArray, foo->specialObjectsOop), foo->argumentCount);\r\tbeRootIfOld(runArgs);\r\t/* begin transfer:from:to: */\r\tcount = foo->argumentCount;\r\tsrc = foo->stackPointer - ((foo->argumentCount - 1) * (BYTES_PER_WORD));\r\tflag(\"Dan\");\r\tin = src - (BYTES_PER_WORD);\r\tlastIn = in + (count * (BYTES_PER_WORD));\r\tout = (runArgs + (BASE_HEADER_SIZE)) - (BYTES_PER_WORD);\r\twhile ((((usqInt) in)) < (((usqInt) lastIn))) {\r\t\tlongAtput(out += BYTES_PER_WORD, longAt(in += BYTES_PER_WORD));\r\t}\r\trunSelector = foo->messageSelector;\r\trunReceiver = longAt(foo->stackPointer - (foo->argumentCount * (BYTES_PER_WORD)));\r\t/* begin pop: */\r\tfoo->stackPointer -= (foo->argumentCount + 1) * (BYTES_PER_WORD);\r\tnewReceiver = foo->newMethod;\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + (SelectorRunWithIn << (SHIFT_FOR_WORD)));\r\tfoo->argumentCount = 3;\r\t/* begin push: */\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), newReceiver);\r\tfoo->stackPointer = sp;\r\t/* begin push: */\r\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), runSelector);\r\tfoo->stackPointer = sp1;\r\t/* begin push: */\r\tlongAtput(sp2 = foo->stackPointer + (BYTES_PER_WORD), runArgs);\r\tfoo->stackPointer = sp2;\r\t/* begin push: */\r\tlongAtput(sp3 = foo->stackPointer + (BYTES_PER_WORD), runReceiver);\r\tfoo->stackPointer = sp3;\r\t/* begin fetchClassOf: */\r\tif ((newReceiver & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tlookupClass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(newReceiver))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tlookupClass = (longAt(newReceiver - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tlookupClass = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\rl1:\t/* end fetchClassOf: */;\r\tfindNewMethodInClass(lookupClass);\r\texecuteNewMethodFromCache();\r\tfoo->successFlag = 1;\r}\r\r\r/*\tPrimitive. Answer whether the argument to the primitive is a root for young space */\r\rEXPORT(sqInt) primitiveIsRoot(void) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r    sqInt trueOrFalse;\r    sqInt sp;\r    sqInt sp1;\r    sqInt oop1;\r\r\t/* begin stackObjectValue: */\r\toop1 = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\tif ((oop1 & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\toop = null;\r\t\tgoto l1;\r\t}\r\toop = oop1;\rl1:\t/* end stackObjectValue: */;\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= (foo->argumentCount + 1) * (BYTES_PER_WORD);\r\t\t/* begin pushBool: */\r\t\ttrueOrFalse = (longAt(oop)) & (ROOT_BIT);\r\t\tif (trueOrFalse) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t}\r}\r\r\r/*\tPrimitive. Answer whether the argument to the primitive resides in young space. */\r\rEXPORT(sqInt) primitiveIsYoung(void) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r    sqInt oop1;\r    sqInt sp;\r    sqInt sp1;\r\r\t/* begin stackObjectValue: */\r\toop1 = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\tif ((oop1 & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\toop = null;\r\t\tgoto l1;\r\t}\r\toop = oop1;\rl1:\t/* end stackObjectValue: */;\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= (foo->argumentCount + 1) * (BYTES_PER_WORD);\r\t\t/* begin pushBool: */\r\t\tif ((((usqInt) oop)) >= (((usqInt) foo->youngStart))) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t}\r}\r\r\r/*\tObsolete on virtually all platforms; old style input polling code.\r\tReturn the next keycode and remove it from the input buffer. The low byte is the 8-bit ISO character. The next four bits are the Smalltalk modifier bits <cmd><option><ctrl><shift>. */\r\rsqInt primitiveKbdNext(void) {\rregister struct foo * foo = &fum;\r    sqInt keystrokeWord;\r    sqInt sp;\r    sqInt sp1;\r\r\t/* begin pop: */\r\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\tkeystrokeWord = ioGetKeystroke();\r\tif (keystrokeWord >= 0) {\r\t\t/* begin pushInteger: */\r\t\t/* begin push: */\r\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), ((keystrokeWord << 1) | 1));\r\t\tfoo->stackPointer = sp1;\r\t} else {\r\t\t/* begin push: */\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->nilObj);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\r\r/*\tObsolete on virtually all platforms; old style input polling code.\r\tReturn the next keycode and without removing it from the input buffer. The low byte is the 8-bit ISO character. The next four bits are the Smalltalk modifier bits <cmd><option><ctrl><shift>. */\r\rsqInt primitiveKbdPeek(void) {\rregister struct foo * foo = &fum;\r    sqInt keystrokeWord;\r    sqInt sp;\r    sqInt sp1;\r\r\t/* begin pop: */\r\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\tkeystrokeWord = ioPeekKeystroke();\r\tif (keystrokeWord >= 0) {\r\t\t/* begin pushInteger: */\r\t\t/* begin push: */\r\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), ((keystrokeWord << 1) | 1));\r\t\tfoo->stackPointer = sp1;\r\t} else {\r\t\t/* begin push: */\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->nilObj);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\rsqInt primitiveLessOrEqual(void) {\rregister struct foo * foo = &fum;\r    sqInt integerArgument;\r    sqInt integerReceiver;\r    sqInt integerPointer;\r    sqInt integerPointer1;\r    sqInt top;\r    sqInt top1;\r    sqInt sp;\r    sqInt sp1;\r\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer = top;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tintegerArgument = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tintegerArgument = 0;\r\t\tgoto l1;\r\t}\rl1:\t/* end checkedIntegerValueOf: */;\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer1 = top1;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer1 & 1)) {\r\t\tintegerReceiver = (integerPointer1 >> 1);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tintegerReceiver = 0;\r\t\tgoto l2;\r\t}\rl2:\t/* end checkedIntegerValueOf: */;\r\t/* begin checkBooleanResult: */\r\tif (foo->successFlag) {\r\t\t/* begin pushBool: */\r\t\tif (integerReceiver <= integerArgument) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t}\r}\r\rsqInt primitiveLessThan(void) {\rregister struct foo * foo = &fum;\r    sqInt integerArgument;\r    sqInt integerReceiver;\r    sqInt integerPointer;\r    sqInt integerPointer1;\r    sqInt top;\r    sqInt top1;\r    sqInt sp;\r    sqInt sp1;\r\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer = top;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tintegerArgument = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tintegerArgument = 0;\r\t\tgoto l1;\r\t}\rl1:\t/* end checkedIntegerValueOf: */;\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer1 = top1;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer1 & 1)) {\r\t\tintegerReceiver = (integerPointer1 >> 1);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tintegerReceiver = 0;\r\t\tgoto l2;\r\t}\rl2:\t/* end checkedIntegerValueOf: */;\r\t/* begin checkBooleanResult: */\r\tif (foo->successFlag) {\r\t\t/* begin pushBool: */\r\t\tif (integerReceiver < integerArgument) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tPrimitive. Return the n-th builtin module name. */\r\rsqInt primitiveListBuiltinModule(void) {\rregister struct foo * foo = &fum;\r    sqInt length;\r    sqInt i;\r    char * moduleName;\r    sqInt nameOop;\r    sqInt index;\r    sqInt sp;\r    sqInt integerPointer;\r    sqInt sp1;\r\r\tif (!(foo->argumentCount == 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tindex = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tindex = 0;\r\t\tgoto l1;\r\t}\rl1:\t/* end checkedIntegerValueOf: */;\r\tif (index <= 0) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tmoduleName = ioListBuiltinModule(index);\r\tif (moduleName == null) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\t/* begin push: */\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->nilObj);\r\t\tfoo->stackPointer = sp;\r\t\treturn null;\r\t}\r\tlength = strlen(moduleName);\r\tnameOop = instantiateClassindexableSize(splObj(ClassString), length);\r\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\tbyteAtput((nameOop + (BASE_HEADER_SIZE)) + i, moduleName[i]);\r\t}\r\t/* begin forceInterruptCheck */\r\tfoo->interruptCheckCounter = -1000;\r\tfoo->nextPollTick = 0;\r\t/* begin pop:thenPush: */\r\tlongAtput(sp1 = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), nameOop);\r\tfoo->stackPointer = sp1;\r}\r\r\r/*\tPrimitive. Return the n-th loaded external module name. */\r\rsqInt primitiveListExternalModule(void) {\rregister struct foo * foo = &fum;\r    sqInt length;\r    sqInt i;\r    char * moduleName;\r    sqInt nameOop;\r    sqInt index;\r    sqInt sp;\r    sqInt integerPointer;\r    sqInt sp1;\r\r\tif (!(foo->argumentCount == 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tindex = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tindex = 0;\r\t\tgoto l1;\r\t}\r\tindex = null;\rl1:\t/* end stackIntegerValue: */;\r\tif (index <= 0) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tmoduleName = ioListLoadedModule(index);\r\tif (moduleName == null) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\t/* begin push: */\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->nilObj);\r\t\tfoo->stackPointer = sp;\r\t\treturn null;\r\t}\r\tlength = strlen(moduleName);\r\tnameOop = instantiateClassindexableSize(fetchPointerofObject(ClassString, foo->specialObjectsOop), length);\r\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\tbyteAtput((nameOop + (BASE_HEADER_SIZE)) + i, moduleName[i]);\r\t}\r\t/* begin forceInterruptCheck */\r\tfoo->interruptCheckCounter = -1000;\r\tfoo->nextPollTick = 0;\r\t/* begin pop:thenPush: */\r\tlongAtput(sp1 = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), nameOop);\r\tfoo->stackPointer = sp1;\r}\r\r\r/*\tThis primitive is called from Squeak as...\r\t\t<imageSegment> loadSegmentFrom: aWordArray outPointers: anArray. */\r/*\tThis primitive will load a binary image segment created by primitiveStoreImageSegment.  It expects the outPointer array to be of the proper size, and the wordArray to be well formed.  It will return as its value the original array of roots, and the erstwhile segmentWordArray will have been truncated to a size of zero.  If this primitive should fail, the segmentWordArray will, sadly, have been reduced to an unrecognizable and unusable jumble.  But what more could you have done with it anyway? */\r\rsqInt primitiveLoadImageSegment(void) {\rregister struct foo * foo = &fum;\r    sqInt mapOop;\r    usqInt segOop;\r    sqInt hdrTypeBits;\r    usqInt lastPtr;\r    sqInt segmentWordArray;\r    sqInt doingClass;\r    sqInt header;\r    sqInt data;\r    sqInt fieldOop;\r    usqInt fieldPtr;\r    usqInt lastOut;\r    sqInt extraSize;\r    usqInt outPtr;\r    usqInt endSeg;\r    sqInt outPointerArray;\r    sqInt addr;\r    sqInt addr1;\r    sqInt sz;\r    sqInt sz1;\r    sqInt sp;\r    sqInt header1;\r    sqInt header2;\r\r\tif (DoAssertionChecks) {\r\t\tverifyCleanHeaders();\r\t}\r\toutPointerArray = longAt(foo->stackPointer);\r\tlastOut = outPointerArray + (lastPointerOf(outPointerArray));\r\tsegmentWordArray = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\r\t/* Essential type checks */\r\r\tendSeg = (segmentWordArray + (sizeBitsOf(segmentWordArray))) - (BASE_HEADER_SIZE);\r\tif (!((((((usqInt) (longAt(outPointerArray))) >> 8) & 15) == 2) && (((((usqInt) (longAt(segmentWordArray))) >> 8) & 15) == 6))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tdata = longAt(segmentWordArray + (BASE_HEADER_SIZE));\r\tif (!(((data & 65535) == imageFormatVersionNumber) || (((data & 65535) == (imageFormatForwardCompatibilityVersion())) || ((data & 65535) == (imageFormatBackwardCompatibilityVersion()))))) {\r\t\t/* begin reverseBytesFrom:to: */\r\t\tflag(\"Dan\");\r\t\taddr1 = segmentWordArray + (BASE_HEADER_SIZE);\r\t\twhile ((((usqInt) addr1)) < (((usqInt) (endSeg + (BYTES_PER_WORD))))) {\r\t\t\tlongAtput(addr1, byteSwapped(longAt(addr1)));\r\t\t\taddr1 += BYTES_PER_WORD;\r\t\t}\r\t\tdata = longAt(segmentWordArray + (BASE_HEADER_SIZE));\r\t\tif (!(((data & 65535) == imageFormatVersionNumber) || (((data & 65535) == (imageFormatForwardCompatibilityVersion())) || ((data & 65535) == (imageFormatBackwardCompatibilityVersion()))))) {\r\t\t\t/* begin reverseBytesFrom:to: */\r\t\t\tflag(\"Dan\");\r\t\t\taddr = segmentWordArray + (BASE_HEADER_SIZE);\r\t\t\twhile ((((usqInt) addr)) < (((usqInt) (endSeg + (BYTES_PER_WORD))))) {\r\t\t\t\tlongAtput(addr, byteSwapped(longAt(addr)));\r\t\t\t\taddr += BYTES_PER_WORD;\r\t\t\t}\r\t\t\tif (DoAssertionChecks) {\r\t\t\t\tverifyCleanHeaders();\r\t\t\t}\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t}\r\tif (!((((usqInt) data) >> 16) == (((usqInt) (imageSegmentVersion())) >> 16))) {\r\r\t\t/* Reverse the byte-type objects once */\r\t\t/* Oop of first embedded object */\r\r\t\tsegOop = ((segmentWordArray + (BASE_HEADER_SIZE)) + (BYTES_PER_WORD)) + (foo->headerTypeBytes[(longAt((segmentWordArray + (BASE_HEADER_SIZE)) + (BYTES_PER_WORD))) & TypeMask]);\r\t\tbyteSwapByteObjectsFromto(segOop, endSeg + (BYTES_PER_WORD));\r\t}\r\tsegOop = ((segmentWordArray + (BASE_HEADER_SIZE)) + (BYTES_PER_WORD)) + (foo->headerTypeBytes[(longAt((segmentWordArray + (BASE_HEADER_SIZE)) + (BYTES_PER_WORD))) & TypeMask]);\r\twhile (segOop <= endSeg) {\r\t\tif (((longAt(segOop)) & TypeMask) <= 1) {\r\r\t\t\t/* This object has a class field (type = 0 or 1) -- start with that. */\r\r\t\t\tfieldPtr = segOop - (BYTES_PER_WORD);\r\t\t\tdoingClass = 1;\r\t\t} else {\r\r\t\t\t/* No class field -- start with first data field */\r\r\t\t\tfieldPtr = segOop + (BASE_HEADER_SIZE);\r\t\t\tdoingClass = 0;\r\t\t}\r\r\t\t/* last field */\r\r\t\tlastPtr = segOop + (lastPointerOf(segOop));\r\t\tif (lastPtr > endSeg) {\r\t\t\tif (DoAssertionChecks) {\r\t\t\t\tverifyCleanHeaders();\r\t\t\t}\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t\twhile (!(fieldPtr > lastPtr)) {\r\r\t\t\t/* Examine each pointer field */\r\r\t\t\tfieldOop = longAt(fieldPtr);\r\t\t\tif (doingClass) {\r\t\t\t\thdrTypeBits = (longAt(fieldPtr)) & TypeMask;\r\t\t\t\tfieldOop -= hdrTypeBits;\r\t\t\t}\r\t\t\tif ((fieldOop & 1)) {\r\r\t\t\t\t/* Integer -- nothing to do */\r\r\t\t\t\tfieldPtr += BYTES_PER_WORD;\r\t\t\t} else {\r\t\t\t\tif (!((fieldOop & 3) == 0)) {\r\t\t\t\t\t/* begin primitiveFail */\r\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t\treturn null;\r\t\t\t\t}\r\t\t\t\tif ((fieldOop & 2147483648U) == 0) {\r\r\t\t\t\t\t/* Internal pointer -- add segment offset */\r\r\t\t\t\t\tmapOop = fieldOop + segmentWordArray;\r\t\t\t\t} else {\r\r\t\t\t\t\t/* External pointer -- look it up in outPointers */\r\r\t\t\t\t\toutPtr = outPointerArray + (fieldOop & 2147483647U);\r\t\t\t\t\tif (outPtr > lastOut) {\r\t\t\t\t\t\t/* begin primitiveFail */\r\t\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t\t\treturn null;\r\t\t\t\t\t}\r\t\t\t\t\tmapOop = longAt(outPtr);\r\t\t\t\t}\r\t\t\t\tif (doingClass) {\r\t\t\t\t\tlongAtput(fieldPtr, mapOop + hdrTypeBits);\r\t\t\t\t\tfieldPtr += 8;\r\t\t\t\t\tdoingClass = 0;\r\t\t\t\t} else {\r\t\t\t\t\tlongAtput(fieldPtr, mapOop);\r\t\t\t\t\tfieldPtr += BYTES_PER_WORD;\r\t\t\t\t}\r\t\t\t\tif (segOop < foo->youngStart) {\r\t\t\t\t\tpossibleRootStoreIntovalue(segOop, mapOop);\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t\t/* begin objectAfter: */\r\t\tif (DoAssertionChecks) {\r\t\t\tif ((((usqInt) segOop)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t}\r\t\t}\r\t\tif (((longAt(segOop)) & TypeMask) == HeaderTypeFree) {\r\t\t\tsz = (longAt(segOop)) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader1 = longAt(segOop);\r\t\t\tif ((header1 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(segOop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tsz = header1 & (SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\tl1:\t/* end sizeBitsOf: */;\r\t\t}\r\t\tsegOop = (segOop + sz) + (foo->headerTypeBytes[(longAt(segOop + sz)) & TypeMask]);\r\t}\r\tsegOop = ((segmentWordArray + (BASE_HEADER_SIZE)) + (BYTES_PER_WORD)) + (foo->headerTypeBytes[(longAt((segmentWordArray + (BASE_HEADER_SIZE)) + (BYTES_PER_WORD))) & TypeMask]);\r\twhile (segOop <= endSeg) {\r\t\tif (!(oopHasAcceptableClass(segOop))) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\r\t\t/* first field */\r\r\t\tfieldPtr = segOop + (BASE_HEADER_SIZE);\r\r\t\t/* last field */\r\t\t/* Go through all oops, remapping them... */\r\r\t\tlastPtr = segOop + (lastPointerOf(segOop));\r\t\twhile (!(fieldPtr > lastPtr)) {\r\r\t\t\t/* Examine each pointer field */\r\r\t\t\tfieldOop = longAt(fieldPtr);\r\t\t\tif (!(oopHasAcceptableClass(fieldOop))) {\r\t\t\t\t/* begin primitiveFail */\r\t\t\t\tfoo->successFlag = 0;\r\t\t\t\treturn null;\r\t\t\t}\r\t\t\tfieldPtr += BYTES_PER_WORD;\r\t\t}\r\t\t/* begin objectAfter: */\r\t\tif (DoAssertionChecks) {\r\t\t\tif ((((usqInt) segOop)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t}\r\t\t}\r\t\tif (((longAt(segOop)) & TypeMask) == HeaderTypeFree) {\r\t\t\tsz1 = (longAt(segOop)) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader2 = longAt(segOop);\r\t\t\tif ((header2 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz1 = (longAt(segOop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l2;\r\t\t\t} else {\r\t\t\t\tsz1 = header2 & (SIZE_MASK);\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\tl2:\t/* end sizeBitsOf: */;\r\t\t}\r\t\tsegOop = (segOop + sz1) + (foo->headerTypeBytes[(longAt(segOop + sz1)) & TypeMask]);\r\t}\r\textraSize = foo->headerTypeBytes[(longAt(segmentWordArray)) & TypeMask];\r\thdrTypeBits = (longAt(segmentWordArray)) & TypeMask;\r\tif (extraSize == 8) {\r\t\tlongAtput(segmentWordArray - extraSize, ((BASE_HEADER_SIZE) + (BYTES_PER_WORD)) + hdrTypeBits);\r\t} else {\r\t\theader = longAt(segmentWordArray);\r\t\tlongAtput(segmentWordArray, ((header - (header & (SIZE_MASK))) + (BASE_HEADER_SIZE)) + (BYTES_PER_WORD));\r\t}\r\tif (DoAssertionChecks) {\r\t\tverifyCleanHeaders();\r\t}\r\t/* begin pop:thenPush: */\r\tlongAtput(sp = foo->stackPointer - ((3 - 1) * (BYTES_PER_WORD)), ((segmentWordArray + (BASE_HEADER_SIZE)) + (BYTES_PER_WORD)) + (foo->headerTypeBytes[(longAt((segmentWordArray + (BASE_HEADER_SIZE)) + (BYTES_PER_WORD))) & TypeMask]));\r\tfoo->stackPointer = sp;\r}\r\rsqInt primitiveLoadInstVar(void) {\rregister struct foo * foo = &fum;\r    sqInt thisReceiver;\r    sqInt top;\r    sqInt object;\r    sqInt sp;\r    sqInt fieldIndex;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tthisReceiver = top;\r\t/* begin push: */\r\t/* begin fetchPointer:ofObject: */\r\tfieldIndex = foo->primitiveIndex - 264;\r\tobject = longAt((thisReceiver + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tNatural log. */\r\rsqInt primitiveLogN(void) {\rregister struct foo * foo = &fum;\r    double  rcvr;\r\r\trcvr = popFloat();\r\tif (foo->successFlag) {\r\t\tpushFloat(log(rcvr));\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 1 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tRegister the low-space semaphore. If the argument is not a \r\tSemaphore, unregister the current low-space Semaphore. */\r\rsqInt primitiveLowSpaceSemaphore(void) {\rregister struct foo * foo = &fum;\r    sqInt arg;\r    sqInt top;\r    sqInt oop;\r    sqInt oop1;\r    sqInt valuePointer;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\targ = top;\r\tif ((fetchClassOf(arg)) == (fetchPointerofObject(ClassSemaphore, foo->specialObjectsOop))) {\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\toop = foo->specialObjectsOop;\r\t\tif ((((usqInt) oop)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(oop, arg);\r\t\t}\r\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + (TheLowSpaceSemaphore << (SHIFT_FOR_WORD)), arg);\r\t} else {\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tvaluePointer = foo->nilObj;\r\t\tif ((((usqInt) oop1)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(oop1, valuePointer);\r\t\t}\r\t\tlongAtput((oop1 + (BASE_HEADER_SIZE)) + (TheLowSpaceSemaphore << (SHIFT_FOR_WORD)), valuePointer);\r\t}\r}\r\rsqInt primitiveMakePoint(void) {\rregister struct foo * foo = &fum;\r    sqInt argument;\r    sqInt pt;\r    sqInt rcvr;\r    sqInt pointResult;\r    sqInt pointResult1;\r    sqInt valuePointer;\r    sqInt pointResult2;\r    sqInt valuePointer1;\r    sqInt valuePointer2;\r    sqInt sp;\r\r\targument = longAt(foo->stackPointer);\r\trcvr = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\tif ((rcvr & 1)) {\r\t\tif ((argument & 1)) {\r\t\t\t/* begin makePointwithxValue:yValue: */\r\t\t\tpointResult = instantiateSmallClasssizeInBytes(fetchPointerofObject(ClassPoint, foo->specialObjectsOop), 3 * (BYTES_PER_WORD));\r\t\t\tlongAtput((pointResult + (BASE_HEADER_SIZE)) + (XIndex << (SHIFT_FOR_WORD)), ((((rcvr >> 1)) << 1) | 1));\r\t\t\tlongAtput((pointResult + (BASE_HEADER_SIZE)) + (YIndex << (SHIFT_FOR_WORD)), ((((argument >> 1)) << 1) | 1));\r\t\t\tpt = pointResult;\r\t\t} else {\r\t\t\t/* begin makePointwithxValue:yValue: */\r\t\t\tpointResult1 = instantiateSmallClasssizeInBytes(fetchPointerofObject(ClassPoint, foo->specialObjectsOop), 3 * (BYTES_PER_WORD));\r\t\t\tlongAtput((pointResult1 + (BASE_HEADER_SIZE)) + (XIndex << (SHIFT_FOR_WORD)), ((((rcvr >> 1)) << 1) | 1));\r\t\t\tlongAtput((pointResult1 + (BASE_HEADER_SIZE)) + (YIndex << (SHIFT_FOR_WORD)), ((0 << 1) | 1));\r\t\t\tpt = pointResult1;\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tvaluePointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t\t\tif ((((usqInt) pt)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(pt, valuePointer);\r\t\t\t}\r\t\t\tlongAtput((pt + (BASE_HEADER_SIZE)) + (1 << (SHIFT_FOR_WORD)), valuePointer);\r\t\t}\r\t} else {\r\t\tif (!((fetchClassOf(rcvr)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop)))) {\r\t\t\t/* begin success: */\r\t\t\tfoo->successFlag = 0 && foo->successFlag;\r\t\t\treturn null;\r\t\t}\r\t\t/* begin makePointwithxValue:yValue: */\r\t\tpointResult2 = instantiateSmallClasssizeInBytes(fetchPointerofObject(ClassPoint, foo->specialObjectsOop), 3 * (BYTES_PER_WORD));\r\t\tlongAtput((pointResult2 + (BASE_HEADER_SIZE)) + (XIndex << (SHIFT_FOR_WORD)), ((0 << 1) | 1));\r\t\tlongAtput((pointResult2 + (BASE_HEADER_SIZE)) + (YIndex << (SHIFT_FOR_WORD)), ((0 << 1) | 1));\r\t\tpt = pointResult2;\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer1 = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t\tif ((((usqInt) pt)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(pt, valuePointer1);\r\t\t}\r\t\tlongAtput((pt + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)), valuePointer1);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer2 = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t\tif ((((usqInt) pt)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(pt, valuePointer2);\r\t\t}\r\t\tlongAtput((pt + (BASE_HEADER_SIZE)) + (1 << (SHIFT_FOR_WORD)), valuePointer2);\r\t}\r\t/* begin pop:thenPush: */\r\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), pt);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tPrimitive. Mark the method for exception handling. The primitive must fail after marking the context so that the regular code is run. */\r\rsqInt primitiveMarkHandlerMethod(void) {\r\t/* begin primitiveFail */\r\tfoo->successFlag = 0;\r\treturn null;\r}\r\r\r/*\tPrimitive. Mark the method for exception unwinding. The primitive must fail after marking the context so that the regular code is run. */\r\rsqInt primitiveMarkUnwindMethod(void) {\r\t/* begin primitiveFail */\r\tfoo->successFlag = 0;\r\treturn null;\r}\r\r\r/*\tReturn the method an external primitive was defined in */\r\rsqInt primitiveMethod(void) {\r\treturn foo->newMethod;\r}\r\r\r/*\tThis is a named (not numbered) primitive in the null module (ie the VM) */\r\rEXPORT(sqInt) primitiveMicrosecondClock(void) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r    sqInt sp;\r\r\t/* begin pop:thenPush: */\r\toop = positive64BitIntegerFor(ioMicroSecondClock());\r\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), oop);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tReturn the value of the millisecond clock as an integer. Note that the millisecond clock wraps around periodically. On some platforms it can wrap daily. The range is limited to SmallInteger maxVal / 2 to allow delays of up to that length without overflowing a SmallInteger. */\r\rsqInt primitiveMillisecondClock(void) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r    sqInt sp;\r\r\t/* begin pop:thenPush: */\r\toop = ((((ioMSecs()) & MillisecondClockMask) << 1) | 1);\r\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), oop);\r\tfoo->stackPointer = sp;\r}\r\rsqInt primitiveMod(void) {\rregister struct foo * foo = &fum;\r    sqInt mod;\r    sqInt sp;\r\r\tmod = doPrimitiveModby(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))), longAt(foo->stackPointer));\r\t/* begin pop2AndPushIntegerIfOK: */\r\tif (foo->successFlag) {\r\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t(((((int) mod)) ^ ((((int) mod)) << 1)) >= 0)\r# else\r\t\t\t((mod >= -1073741824) && (mod <= 1073741823))\r# endif  // SQ_HOST32\r\t\t) {\r\t\t\t/* begin pop:thenPush: */\r\t\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), ((mod << 1) | 1));\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\tfoo->successFlag = 0;\r\t\t}\r\t}\r}\r\r\r/*\tObsolete on virtually all platforms; old style input polling code.\r\tReturn the mouse button state. The low three bits encode the state of the <red><yellow><blue> mouse buttons. The next four bits encode the Smalltalk modifier bits <cmd><option><ctrl><shift>. */\r\rsqInt primitiveMouseButtons(void) {\rregister struct foo * foo = &fum;\r    sqInt buttonWord;\r    sqInt sp;\r\r\t/* begin pop: */\r\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\tbuttonWord = ioGetButtonState();\r\t/* begin pushInteger: */\r\t/* begin push: */\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), ((buttonWord << 1) | 1));\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tObsolete on virtually all platforms; old style input polling code.\r\tReturn a Point indicating current position of the mouse. Note that mouse coordinates may be negative if the mouse moves above or to the left of the top-left corner of the Smalltalk window. */\r\rsqInt primitiveMousePoint(void) {\rregister struct foo * foo = &fum;\r    sqInt y;\r    sqInt pointWord;\r    sqInt x;\r    sqInt object;\r    sqInt sp;\r    sqInt pointResult;\r\r\t/* begin pop: */\r\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\tpointWord = ioMousePoint();\r\t/* begin signExtend16: */\r\tif ((((((usqInt) pointWord) >> 16) & 65535) & 32768) == 0) {\r\t\tx = (((usqInt) pointWord) >> 16) & 65535;\r\t\tgoto l1;\r\t} else {\r\t\tx = ((((usqInt) pointWord) >> 16) & 65535) - 65536;\r\t\tgoto l1;\r\t}\rl1:\t/* end signExtend16: */;\r\t/* begin signExtend16: */\r\tif (((pointWord & 65535) & 32768) == 0) {\r\t\ty = pointWord & 65535;\r\t\tgoto l2;\r\t} else {\r\t\ty = (pointWord & 65535) - 65536;\r\t\tgoto l2;\r\t}\rl2:\t/* end signExtend16: */;\r\t/* begin push: */\r\t/* begin makePointwithxValue:yValue: */\r\tpointResult = instantiateSmallClasssizeInBytes(fetchPointerofObject(ClassPoint, foo->specialObjectsOop), 3 * (BYTES_PER_WORD));\r\tlongAtput((pointResult + (BASE_HEADER_SIZE)) + (XIndex << (SHIFT_FOR_WORD)), ((x << 1) | 1));\r\tlongAtput((pointResult + (BASE_HEADER_SIZE)) + (YIndex << (SHIFT_FOR_WORD)), ((y << 1) | 1));\r\tobject = pointResult;\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\tfoo->stackPointer = sp;\r}\r\rsqInt primitiveMultiply(void) {\rregister struct foo * foo = &fum;\r    sqInt integerArg;\r    sqInt integerResult;\r    sqInt integerRcvr;\r    sqInt integerPointer;\r    sqInt integerPointer1;\r    sqInt sp;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tintegerRcvr = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tintegerRcvr = 0;\r\t\tgoto l1;\r\t}\rl1:\t/* end checkedIntegerValueOf: */;\r\t/* begin stackIntegerValue: */\r\tintegerPointer1 = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer1 & 1)) {\r\t\tintegerArg = (integerPointer1 >> 1);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tintegerArg = 0;\r\t\tgoto l2;\r\t}\rl2:\t/* end checkedIntegerValueOf: */;\r\tif (foo->successFlag) {\r\r\t\t/* check for C overflow by seeing if computation is reversible */\r\r\t\tintegerResult = integerRcvr * integerArg;\r\t\tif ((integerArg == 0) || ((integerResult / integerArg) == integerRcvr)) {\r\t\t\t/* begin pop2AndPushIntegerIfOK: */\r\t\t\tif (foo->successFlag) {\r\t\t\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t\t\t(((((int) integerResult)) ^ ((((int) integerResult)) << 1)) >= 0)\r# else\r\t\t\t\t\t((integerResult >= -1073741824) && (integerResult <= 1073741823))\r# endif  // SQ_HOST32\r\t\t\t\t) {\r\t\t\t\t\t/* begin pop:thenPush: */\r\t\t\t\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), ((integerResult << 1) | 1));\r\t\t\t\t\tfoo->stackPointer = sp;\r\t\t\t\t} else {\r\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t}\r\t\t\t}\r\t\t} else {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t}\r\t}\r}\r\r\r/*\tAllocate a new fixed-size instance. Fail if the allocation would leave less than lowSpaceThreshold bytes free. May cause a GC */\r\rsqInt primitiveNew(void) {\rregister struct foo * foo = &fum;\r    sqInt spaceOkay;\r    sqInt class;\r    sqInt object;\r    sqInt sp;\r    sqInt format;\r    usqInt minFree;\r    usqInt minFree1;\r\r\r\t/* The following may cause GC! */\r\r\tclass = longAt(foo->stackPointer);\r\t/* begin sufficientSpaceToInstantiate:indexableSize: */\r\tformat = (((usqInt) ((longAt((class + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1)) >> 8) & 15;\r\tif ((0 > 0) && (format < 2)) {\r\t\tspaceOkay = 0;\r\t\tgoto l1;\r\t}\r\tif (format < 8) {\r\t\tif (isExcessiveAllocationRequestshift(0, SHIFT_FOR_WORD)) {\r\t\t\tspaceOkay = 0;\r\t\t\tgoto l1;\r\t\t}\r\t\t/* begin sufficientSpaceToAllocate: */\r\t\tminFree = (foo->lowSpaceThreshold + (2500 + (0 * (BYTES_PER_WORD)))) + (BASE_HEADER_SIZE);\r\t\tif (oopisGreaterThanOrEqualTo((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), minFree)) {\r\t\t\tspaceOkay = 1;\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\tspaceOkay = sufficientSpaceAfterGC(minFree);\r\t\t\tgoto l1;\r\t\t}\r\t\tspaceOkay = null;\r\t\tgoto l1;\r\t} else {\r\t\tif (isExcessiveAllocationRequestshift(0, 0)) {\r\t\t\tspaceOkay = 0;\r\t\t\tgoto l1;\r\t\t}\r\t\t/* begin sufficientSpaceToAllocate: */\r\t\tminFree1 = (foo->lowSpaceThreshold + (2500 + 0)) + (BASE_HEADER_SIZE);\r\t\tif (oopisGreaterThanOrEqualTo((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), minFree1)) {\r\t\t\tspaceOkay = 1;\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\tspaceOkay = sufficientSpaceAfterGC(minFree1);\r\t\t\tgoto l1;\r\t\t}\r\t\tspaceOkay = null;\r\t\tgoto l1;\r\t}\rl1:\t/* end sufficientSpaceToInstantiate:indexableSize: */;\r\t/* begin success: */\r\tfoo->successFlag = spaceOkay && foo->successFlag;\r\tif (foo->successFlag) {\r\t\t/* begin push: */\r\t\tobject = instantiateClassindexableSize(popStack(), 0);\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\rsqInt primitiveNewMethod(void) {\rregister struct foo * foo = &fum;\r    sqInt bytecodeCount;\r    sqInt header;\r    sqInt i;\r    sqInt literalCount;\r    sqInt size;\r    sqInt class;\r    sqInt theMethod;\r    sqInt valuePointer;\r    sqInt top;\r    sqInt integerPointer;\r    sqInt top1;\r    sqInt top2;\r    sqInt sp;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\theader = top;\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer = top1;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tbytecodeCount = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tbytecodeCount = 0;\r\t\tgoto l1;\r\t}\r\tbytecodeCount = null;\rl1:\t/* end popInteger */;\r\t/* begin success: */\r\tfoo->successFlag = ((header & 1)) && foo->successFlag;\r\tif (!(foo->successFlag)) {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t\treturn null;\r\t}\r\t/* begin popStack */\r\ttop2 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tclass = top2;\r\tsize = ((((((usqInt) header) >> 10) & 255) + 1) * (BYTES_PER_WORD)) + bytecodeCount;\r\ttheMethod = instantiateClassindexableSize(class, size);\r\tlongAtput((theMethod + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD)), header);\r\tliteralCount = (((usqInt) header) >> 10) & 255;\r\tfor (i = 1; i <= literalCount; i += 1) {\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer = foo->nilObj;\r\t\tif ((((usqInt) theMethod)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(theMethod, valuePointer);\r\t\t}\r\t\tlongAtput((theMethod + (BASE_HEADER_SIZE)) + (i << (SHIFT_FOR_WORD)), valuePointer);\r\t}\r\t/* begin push: */\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), theMethod);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tAllocate a new indexable instance. Fail if the allocation would leave less than lowSpaceThreshold bytes free. */\r\rsqInt primitiveNewWithArg(void) {\rregister struct foo * foo = &fum;\r    sqInt spaceOkay;\r    usqInt size;\r    sqInt class;\r    sqInt oop;\r    sqInt sp;\r    sqInt format;\r    usqInt minFree;\r    usqInt minFree1;\r\r\tsize = positive32BitValueOf(longAt(foo->stackPointer));\r\tclass = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin success: */\r\tfoo->successFlag = (size >= 0) && foo->successFlag;\r\tif (foo->successFlag) {\r\t\t/* begin sufficientSpaceToInstantiate:indexableSize: */\r\t\tformat = (((usqInt) ((longAt((class + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1)) >> 8) & 15;\r\t\tif ((size > 0) && (format < 2)) {\r\t\t\tspaceOkay = 0;\r\t\t\tgoto l1;\r\t\t}\r\t\tif (format < 8) {\r\t\t\tif (isExcessiveAllocationRequestshift(size, SHIFT_FOR_WORD)) {\r\t\t\t\tspaceOkay = 0;\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t\t/* begin sufficientSpaceToAllocate: */\r\t\t\tminFree = (foo->lowSpaceThreshold + (2500 + (size * (BYTES_PER_WORD)))) + (BASE_HEADER_SIZE);\r\t\t\tif (oopisGreaterThanOrEqualTo((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), minFree)) {\r\t\t\t\tspaceOkay = 1;\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tspaceOkay = sufficientSpaceAfterGC(minFree);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t\tspaceOkay = null;\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\tif (isExcessiveAllocationRequestshift(size, 0)) {\r\t\t\t\tspaceOkay = 0;\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t\t/* begin sufficientSpaceToAllocate: */\r\t\t\tminFree1 = (foo->lowSpaceThreshold + (2500 + size)) + (BASE_HEADER_SIZE);\r\t\t\tif (oopisGreaterThanOrEqualTo((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), minFree1)) {\r\t\t\t\tspaceOkay = 1;\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tspaceOkay = sufficientSpaceAfterGC(minFree1);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t\tspaceOkay = null;\r\t\t\tgoto l1;\r\t\t}\r\tl1:\t/* end sufficientSpaceToInstantiate:indexableSize: */;\r\t\t/* begin success: */\r\t\tfoo->successFlag = spaceOkay && foo->successFlag;\r\t\tclass = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin pop:thenPush: */\r\t\toop = instantiateClassindexableSize(class, size);\r\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), oop);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\r\r/*\tPrimitiveNext will succeed only if the stream's array is in the atCache.\r\tOtherwise failure will lead to proper message lookup of at: and\r\tsubsequent installation in the cache if appropriate. */\r\rsqInt primitiveNext(void) {\rregister struct foo * foo = &fum;\r    sqInt stream;\r    sqInt result;\r    sqInt atIx;\r    sqInt array;\r    sqInt index;\r    sqInt limit;\r    sqInt sp;\r\r\tstream = longAt(foo->stackPointer);\r\tif (!((((stream & 1) == 0) && (((((usqInt) (longAt(stream))) >> 8) & 15) <= 4)) && ((lengthOf(stream)) >= (StreamReadLimitIndex + 1)))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tarray = longAt((stream + (BASE_HEADER_SIZE)) + (StreamArrayIndex << (SHIFT_FOR_WORD)));\r\tindex = fetchIntegerofObject(StreamIndexIndex, stream);\r\tlimit = fetchIntegerofObject(StreamReadLimitIndex, stream);\r\tatIx = array & AtCacheMask;\r\tif (!((index < limit) && ((foo->atCache[atIx + AtCacheOop]) == array))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tindex += 1;\r\r\t/* Above may cause GC, so can't use stream, array etc. below it */\r\r\tresult = commonVariableatcacheIndex(array, index, atIx);\r\tif (foo->successFlag) {\r\t\tstream = longAt(foo->stackPointer);\r\t\t/* begin storeInteger:ofObject:withValue: */\r\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t(((((int) index)) ^ ((((int) index)) << 1)) >= 0)\r# else\r\t\t\t((index >= -1073741824) && (index <= 1073741823))\r# endif  // SQ_HOST32\r\t\t) {\r\t\t\tlongAtput((stream + (BASE_HEADER_SIZE)) + (StreamIndexIndex << (SHIFT_FOR_WORD)), ((index << 1) | 1));\r\t\t} else {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t}\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), result);\r\t\tfoo->stackPointer = sp;\r\t\treturn null;\r\t}\r}\r\rsqInt primitiveNextInstance(void) {\rregister struct foo * foo = &fum;\r    sqInt object;\r    sqInt instance;\r    sqInt sp;\r    sqInt thisClass;\r    sqInt classPointer;\r    sqInt thisObj;\r    sqInt ccIndex;\r    sqInt ccIndex1;\r    sqInt oop;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r    sqInt oop4;\r    sqInt oop5;\r\r\tobject = longAt(foo->stackPointer);\r\t/* begin instanceAfter: */\r\t/* begin fetchClassOf: */\r\tif ((object & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop = foo->specialObjectsOop;\r\t\tclassPointer = longAt((oop + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l3;\r\t}\r\tccIndex1 = (((usqInt) (longAt(object))) >> 12) & 31;\r\tif (ccIndex1 == 0) {\r\t\tclassPointer = (longAt(object - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l3;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop4 = foo->specialObjectsOop;\r\t\toop1 = longAt((oop4 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tclassPointer = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex1 - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l3;\r\t}\rl3:\t/* end fetchClassOf: */;\r\tthisObj = accessibleObjectAfter(object);\r\twhile (!(thisObj == null)) {\r\t\t/* begin fetchClassOf: */\r\t\tif ((thisObj & 1)) {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop2 = foo->specialObjectsOop;\r\t\t\tthisClass = longAt((oop2 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\t\tgoto l2;\r\t\t}\r\t\tccIndex = (((usqInt) (longAt(thisObj))) >> 12) & 31;\r\t\tif (ccIndex == 0) {\r\t\t\tthisClass = (longAt(thisObj - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\t\tgoto l2;\r\t\t} else {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop5 = foo->specialObjectsOop;\r\t\t\toop3 = longAt((oop5 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\t\tthisClass = longAt((oop3 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\t\tgoto l2;\r\t\t}\r\tl2:\t/* end fetchClassOf: */;\r\t\tif (thisClass == classPointer) {\r\t\t\tinstance = thisObj;\r\t\t\tgoto l1;\r\t\t}\r\t\tthisObj = accessibleObjectAfter(thisObj);\r\t}\r\tinstance = foo->nilObj;\rl1:\t/* end instanceAfter: */;\r\tif (instance == foo->nilObj) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t} else {\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp = foo->stackPointer - (((foo->argumentCount + 1) - 1) * (BYTES_PER_WORD)), instance);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\r\r/*\tReturn the object following the receiver in the heap. Return the SmallInteger zero when there are no more objects. */\r\rsqInt primitiveNextObject(void) {\rregister struct foo * foo = &fum;\r    sqInt object;\r    sqInt instance;\r    sqInt sp;\r    sqInt sp1;\r\r\tobject = longAt(foo->stackPointer);\r\tinstance = accessibleObjectAfter(object);\r\tif (instance == null) {\r\t\t/* begin pop:thenPushInteger: */\r\t\tlongAtput(sp = foo->stackPointer - (((foo->argumentCount + 1) - 1) * (BYTES_PER_WORD)), ((0 << 1) | 1));\r\t\tfoo->stackPointer = sp;\r\t} else {\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp1 = foo->stackPointer - (((foo->argumentCount + 1) - 1) * (BYTES_PER_WORD)), instance);\r\t\tfoo->stackPointer = sp1;\r\t}\r}\r\r\r/*\tPrimitiveNextPut will succeed only if the stream's array is in the atPutCache.\r\tOtherwise failure will lead to proper message lookup of at:put: and\r\tsubsequent installation in the cache if appropriate. */\r\rsqInt primitiveNextPut(void) {\rregister struct foo * foo = &fum;\r    sqInt stream;\r    sqInt value;\r    sqInt atIx;\r    sqInt array;\r    sqInt index;\r    sqInt limit;\r    sqInt sp;\r    sqInt valToPut;\r    sqInt fmt;\r    sqInt fixedFields;\r    sqInt stSize;\r\r\tvalue = longAt(foo->stackPointer);\r\tstream = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\tif (!((((stream & 1) == 0) && (((((usqInt) (longAt(stream))) >> 8) & 15) <= 4)) && ((lengthOf(stream)) >= (StreamReadLimitIndex + 1)))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tarray = longAt((stream + (BASE_HEADER_SIZE)) + (StreamArrayIndex << (SHIFT_FOR_WORD)));\r\tindex = fetchIntegerofObject(StreamIndexIndex, stream);\r\tlimit = fetchIntegerofObject(StreamWriteLimitIndex, stream);\r\tatIx = (array & AtCacheMask) + AtPutBase;\r\tif (!((index < limit) && ((foo->atCache[atIx + AtCacheOop]) == array))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tindex += 1;\r\t/* begin commonVariable:at:put:cacheIndex: */\r\tstSize = foo->atCache[atIx + AtCacheSize];\r\tif (((((usqInt) index)) >= (((usqInt) 1))) && ((((usqInt) index)) <= (((usqInt) stSize)))) {\r\t\tfmt = foo->atCache[atIx + AtCacheFmt];\r\t\tif (fmt <= 4) {\r\t\t\tfixedFields = foo->atCache[atIx + AtCacheFixedFields];\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tif ((((usqInt) array)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(array, value);\r\t\t\t}\r\t\t\tlongAtput((array + (BASE_HEADER_SIZE)) + (((index + fixedFields) - 1) << (SHIFT_FOR_WORD)), value);\r\t\t\tgoto l1;\r\t\t}\r\t\tif (fmt < 8) {\r\t\t\tvalToPut = positive32BitValueOf(value);\r\t\t\tif (foo->successFlag) {\r\t\t\t\tlong32Atput((array + (BASE_HEADER_SIZE)) + ((index - 1) << 2), valToPut);\r\t\t\t}\r\t\t\tgoto l1;\r\t\t}\r\t\tif (fmt >= 16) {\r\t\t\tvalToPut = asciiOfCharacter(value);\r\t\t\tif (!(foo->successFlag)) {\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t} else {\r\t\t\tvalToPut = value;\r\t\t}\r\t\tif ((valToPut & 1)) {\r\t\t\tvalToPut = (valToPut >> 1);\r\t\t\tif (!((valToPut >= 0) && (valToPut <= 255))) {\r\t\t\t\t/* begin primitiveFail */\r\t\t\t\tfoo->successFlag = 0;\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t\tbyteAtput((array + (BASE_HEADER_SIZE)) + (index - 1), valToPut);\r\t\t\tgoto l1;\r\t\t}\r\t}\r\t/* begin primitiveFail */\r\tfoo->successFlag = 0;\rl1:\t/* end commonVariable:at:put:cacheIndex: */;\r\tif (foo->successFlag) {\r\t\t/* begin storeInteger:ofObject:withValue: */\r\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t(((((int) index)) ^ ((((int) index)) << 1)) >= 0)\r# else\r\t\t\t((index >= -1073741824) && (index <= 1073741823))\r# endif  // SQ_HOST32\r\t\t) {\r\t\t\tlongAtput((stream + (BASE_HEADER_SIZE)) + (StreamIndexIndex << (SHIFT_FOR_WORD)), ((index << 1) | 1));\r\t\t} else {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t}\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), value);\r\t\tfoo->stackPointer = sp;\r\t\treturn null;\r\t}\r}\r\r\r/*\tA placeholder for primitives that haven't been implemented or are being withdrawn gradually. Just absorbs any arguments and returns the receiver. */\r\rsqInt primitiveNoop(void) {\rregister struct foo * foo = &fum;\r\t/* begin pop: */\r\tfoo->stackPointer -= foo->argumentCount * (BYTES_PER_WORD);\r}\r\rsqInt primitiveNotEqual(void) {\rregister struct foo * foo = &fum;\r    sqInt integerArgument;\r    sqInt result;\r    sqInt integerReceiver;\r    sqInt top;\r    sqInt top1;\r    sqInt sp;\r    sqInt sp1;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerArgument = top;\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerReceiver = top1;\r\tresult = !(compare31or32Bitsequal(integerReceiver, integerArgument));\r\t/* begin checkBooleanResult: */\r\tif (foo->successFlag) {\r\t\t/* begin pushBool: */\r\t\tif (result) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tDefined for CompiledMethods only */\r\rsqInt primitiveObjectAt(void) {\rregister struct foo * foo = &fum;\r    sqInt thisReceiver;\r    sqInt index;\r    sqInt object;\r    sqInt sp;\r    sqInt integerPointer;\r    sqInt top;\r    sqInt top1;\r    sqInt successValue;\r\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer = top;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tindex = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tindex = 0;\r\t\tgoto l1;\r\t}\r\tindex = null;\rl1:\t/* end popInteger */;\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tthisReceiver = top1;\r\t/* begin success: */\r\tfoo->successFlag = (index > 0) && foo->successFlag;\r\t/* begin success: */\r\tsuccessValue = index <= ((literalCountOfHeader(longAt((thisReceiver + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD))))) + LiteralStart);\r\tfoo->successFlag = successValue && foo->successFlag;\r\tif (foo->successFlag) {\r\t\t/* begin push: */\r\t\tobject = longAt((thisReceiver + (BASE_HEADER_SIZE)) + ((index - 1) << (SHIFT_FOR_WORD)));\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\t\tfoo->stackPointer = sp;\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tDefined for CompiledMethods only */\r\rsqInt primitiveObjectAtPut(void) {\rregister struct foo * foo = &fum;\r    sqInt newValue;\r    sqInt thisReceiver;\r    sqInt index;\r    sqInt sp;\r    sqInt top;\r    sqInt integerPointer;\r    sqInt top1;\r    sqInt top2;\r    sqInt successValue;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tnewValue = top;\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer = top1;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tindex = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tindex = 0;\r\t\tgoto l1;\r\t}\r\tindex = null;\rl1:\t/* end popInteger */;\r\t/* begin popStack */\r\ttop2 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tthisReceiver = top2;\r\t/* begin success: */\r\tfoo->successFlag = (index > 0) && foo->successFlag;\r\t/* begin success: */\r\tsuccessValue = index <= ((literalCountOfHeader(longAt((thisReceiver + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD))))) + LiteralStart);\r\tfoo->successFlag = successValue && foo->successFlag;\r\tif (foo->successFlag) {\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tif ((((usqInt) thisReceiver)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(thisReceiver, newValue);\r\t\t}\r\t\tlongAtput((thisReceiver + (BASE_HEADER_SIZE)) + ((index - 1) << (SHIFT_FOR_WORD)), newValue);\r\t\t/* begin push: */\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), newValue);\r\t\tfoo->stackPointer = sp;\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 3 * (BYTES_PER_WORD);\r\t}\r}\r\rsqInt primitiveObjectPointsTo(void) {\rregister struct foo * foo = &fum;\r    sqInt thang;\r    sqInt i;\r    sqInt rcvr;\r    sqInt lastField;\r    sqInt top;\r    sqInt top1;\r    sqInt sp;\r    sqInt sp1;\r    sqInt sp2;\r    sqInt sp11;\r    sqInt sp3;\r    sqInt sp12;\r    sqInt sz;\r    sqInt header;\r    sqInt contextSize;\r    sqInt fmt;\r    sqInt methodHeader;\r    sqInt header1;\r    sqInt type;\r    sqInt sp4;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tthang = top;\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\trcvr = top1;\r\tif ((rcvr & 1)) {\r\t\t/* begin pushBool: */\r\t\tif (0) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t\treturn null;\r\t}\r\t/* begin lastPointerOf: */\r\theader = longAt(rcvr);\r\tfmt = (((usqInt) header) >> 8) & 15;\r\tif (fmt <= 4) {\r\t\tif ((fmt == 3) && ((((((usqInt) header) >> 12) & 31) == 13) || ((((((usqInt) header) >> 12) & 31) == 14) || (((((usqInt) header) >> 12) & 31) == 4)))) {\r\t\t\t/* begin fetchStackPointerOf: */\r\t\t\tsp4 = longAt((rcvr + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)));\r\t\t\tif (!((sp4 & 1))) {\r\t\t\t\tcontextSize = 0;\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\t\tcontextSize = (sp4 >> 1);\r\t\tl2:\t/* end fetchStackPointerOf: */;\r\t\t\tlastField = (CtxtTempFrameStart + contextSize) * (BYTES_PER_WORD);\r\t\t\tgoto l4;\r\t\t}\r\t\t/* begin sizeBitsOfSafe: */\r\t\theader1 = longAt(rcvr);\r\t\t/* begin rightType: */\r\t\tif ((header1 & (SIZE_MASK)) == 0) {\r\t\t\ttype = HeaderTypeSizeAndClass;\r\t\t\tgoto l3;\r\t\t} else {\r\t\t\tif ((header1 & CompactClassMask) == 0) {\r\t\t\t\ttype = HeaderTypeClass;\r\t\t\t\tgoto l3;\r\t\t\t} else {\r\t\t\t\ttype = HeaderTypeShort;\r\t\t\t\tgoto l3;\r\t\t\t}\r\t\t}\r\tl3:\t/* end rightType: */;\r\t\tif (type == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(rcvr - ((BYTES_PER_WORD) * 2))) & (ALL_BUT_TYPE_MASK);\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\tsz = header1 & (SIZE_MASK);\r\t\t\tgoto l1;\r\t\t}\r\tl1:\t/* end sizeBitsOfSafe: */;\r\t\tlastField = sz - (BASE_HEADER_SIZE);\r\t\tgoto l4;\r\t}\r\tif (fmt < 12) {\r\t\tlastField = 0;\r\t\tgoto l4;\r\t}\r\tmethodHeader = longAt(rcvr + (BASE_HEADER_SIZE));\r\tlastField = (((((usqInt) methodHeader) >> 10) & 255) * (BYTES_PER_WORD)) + (BASE_HEADER_SIZE);\rl4:\t/* end lastPointerOf: */;\r\tfor (i = (BASE_HEADER_SIZE); i <= lastField; i += (BYTES_PER_WORD)) {\r\t\tif ((longAt(rcvr + i)) == thang) {\r\t\t\t/* begin pushBool: */\r\t\t\tif (1) {\r\t\t\t\t/* begin push: */\r\t\t\t\tlongAtput(sp2 = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\t\tfoo->stackPointer = sp2;\r\t\t\t} else {\r\t\t\t\t/* begin push: */\r\t\t\t\tlongAtput(sp11 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\t\tfoo->stackPointer = sp11;\r\t\t\t}\r\t\t\treturn null;\r\t\t}\r\t}\r\t/* begin pushBool: */\r\tif (0) {\r\t\t/* begin push: */\r\t\tlongAtput(sp3 = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\tfoo->stackPointer = sp3;\r\t} else {\r\t\t/* begin push: */\r\t\tlongAtput(sp12 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\tfoo->stackPointer = sp12;\r\t}\r}\r\r\r/*\tPrimitive. Invoke an obsolete indexed primitive. */\r\rsqInt primitiveObsoleteIndexedPrimitive(void) {\rregister struct foo * foo = &fum;\r    char * functionName;\r    char * pluginName;\r    void * functionAddress;\r\r\tfunctionAddress = ((void *) ((obsoleteIndexedPrimitiveTable[foo->primitiveIndex])[2]));\r\tif (!(functionAddress == null)) {\r\t\treturn ((sqInt (*)(void))functionAddress)();\r\t}\r\tpluginName = (obsoleteIndexedPrimitiveTable[foo->primitiveIndex])[0];\r\tfunctionName = (obsoleteIndexedPrimitiveTable[foo->primitiveIndex])[1];\r\tif ((pluginName == null) && (functionName == null)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tfunctionAddress = ioLoadFunctionFrom(functionName, pluginName);\r\tif (!(functionAddress == 0)) {\r\t\t(obsoleteIndexedPrimitiveTable[foo->primitiveIndex])[2] = (((char*) functionAddress));\r\t\treturn ((sqInt (*)(void))functionAddress)();\r\t}\r\t/* begin primitiveFail */\r\tfoo->successFlag = 0;\r\treturn null;\r}\r\rsqInt primitivePerform(void) {\rregister struct foo * foo = &fum;\r    sqInt newReceiver;\r    sqInt performMethod;\r    sqInt i;\r    sqInt performSelector;\r    sqInt selectorIndex;\r    sqInt lookupClass;\r    sqInt successValue;\r    sqInt fieldIndex;\r    sqInt oop;\r    sqInt valuePointer;\r    sqInt oop1;\r    sqInt valuePointer1;\r    sqInt count;\r    sqInt fromOop;\r    sqInt toOop;\r    sqInt fromIndex;\r    sqInt lastFrom;\r    sqInt toIndex;\r    sqInt ccIndex;\r    sqInt oop11;\r    sqInt oop2;\r    sqInt oop3;\r    sqInt fieldIndex1;\r    sqInt oop4;\r\r\tperformSelector = foo->messageSelector;\r\tperformMethod = foo->newMethod;\r\tfoo->messageSelector = longAt(foo->stackPointer - ((foo->argumentCount - 1) * (BYTES_PER_WORD)));\r\r\t/* NOTE: the following lookup may fail and be converted to #doesNotUnderstand:, so we must adjust argumentCount and slide args now, so that would work. */\r\t/* Slide arguments down over selector */\r\r\tnewReceiver = longAt(foo->stackPointer - (foo->argumentCount * (BYTES_PER_WORD)));\r\tfoo->argumentCount -= 1;\r\tselectorIndex = (((usqInt) ((foo->stackPointer - foo->activeContext) - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD)) - foo->argumentCount;\r\t/* begin transfer:fromIndex:ofObject:toIndex:ofObject: */\r\tcount = foo->argumentCount;\r\tfromOop = foo->activeContext;\r\ttoOop = foo->activeContext;\r\tflag(\"Dan\");\r\tfromIndex = fromOop + ((selectorIndex + 1) * (BYTES_PER_WORD));\r\ttoIndex = toOop + (selectorIndex * (BYTES_PER_WORD));\r\tlastFrom = fromIndex + (count * (BYTES_PER_WORD));\r\twhile ((((usqInt) fromIndex)) < (((usqInt) lastFrom))) {\r\t\tfromIndex += BYTES_PER_WORD;\r\t\ttoIndex += BYTES_PER_WORD;\r\t\tlongAtput(toIndex, longAt(fromIndex));\r\t}\r\t/* begin pop: */\r\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t/* begin fetchClassOf: */\r\tif ((newReceiver & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop11 = foo->specialObjectsOop;\r\t\tlookupClass = longAt((oop11 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(newReceiver))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tlookupClass = (longAt(newReceiver - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tlookupClass = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\rl1:\t/* end fetchClassOf: */;\r\tfindNewMethodInClass(lookupClass);\r\tif (((((usqInt) (longAt(foo->newMethod))) >> 8) & 15) >= 12) {\r\t\t/* begin success: */\r\t\tsuccessValue = (argumentCountOf(foo->newMethod)) == foo->argumentCount;\r\t\tfoo->successFlag = successValue && foo->successFlag;\r\t}\r\tif (foo->successFlag) {\r\t\texecuteNewMethodFromCache();\r\t\tfoo->successFlag = 1;\r\t} else {\r\t\tfor (i = 1; i <= foo->argumentCount; i += 1) {\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tfieldIndex = ((foo->argumentCount - i) + 1) + selectorIndex;\r\t\t\toop = foo->activeContext;\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\tfieldIndex1 = (foo->argumentCount - i) + selectorIndex;\r\t\t\toop4 = foo->activeContext;\r\t\t\tvaluePointer = longAt((oop4 + (BASE_HEADER_SIZE)) + (fieldIndex1 << (SHIFT_FOR_WORD)));\r\t\t\tif ((((usqInt) oop)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(oop, valuePointer);\r\t\t\t}\r\t\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t}\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 1 * (BYTES_PER_WORD);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\toop1 = foo->activeContext;\r\t\tvaluePointer1 = foo->messageSelector;\r\t\tif ((((usqInt) oop1)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(oop1, valuePointer1);\r\t\t}\r\t\tlongAtput((oop1 + (BASE_HEADER_SIZE)) + (selectorIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\t\tfoo->argumentCount += 1;\r\t\tfoo->newMethod = performMethod;\r\t\tfoo->messageSelector = performSelector;\r\t}\r}\r\r\r/*\tCommon routine used by perform:withArgs: and perform:withArgs:inSuperclass: */\r/*\tNOTE:  The case of doesNotUnderstand: is not a failure to perform.\r\tThe only failures are arg types and consistency of argumentCount. */\r\rsqInt primitivePerformAt(sqInt lookupClass) {\rregister struct foo * foo = &fum;\r    sqInt performArgCount;\r    sqInt cntxSize;\r    sqInt performMethod;\r    sqInt performSelector;\r    sqInt arraySize;\r    sqInt argumentArray;\r    sqInt index;\r    sqInt sz;\r    sqInt objectPointer;\r    sqInt sz1;\r    sqInt successValue;\r    sqInt object;\r    sqInt sp;\r    sqInt successValue1;\r    sqInt sp1;\r    sqInt sp2;\r    sqInt top;\r    sqInt top1;\r    sqInt header;\r    sqInt header1;\r\r\targumentArray = longAt(foo->stackPointer);\r\tif (!(((argumentArray & 1) == 0) && (((((usqInt) (longAt(argumentArray))) >> 8) & 15) == 2))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin fetchWordLengthOf: */\r\t\t/* begin sizeBitsOf: */\r\t\theader = longAt(argumentArray);\r\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(argumentArray - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\tsz = header & (SIZE_MASK);\r\t\t\tgoto l1;\r\t\t}\r\tl1:\t/* end sizeBitsOf: */;\r\t\tarraySize = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\t/* begin fetchWordLengthOf: */\r\t\tobjectPointer = foo->activeContext;\r\t\t/* begin sizeBitsOf: */\r\t\theader1 = longAt(objectPointer);\r\t\tif ((header1 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\tsz1 = (longAt(objectPointer - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\tgoto l2;\r\t\t} else {\r\t\t\tsz1 = header1 & (SIZE_MASK);\r\t\t\tgoto l2;\r\t\t}\r\tl2:\t/* end sizeBitsOf: */;\r\t\tcntxSize = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\t/* begin success: */\r\t\tsuccessValue = ((((usqInt) ((foo->stackPointer - foo->activeContext) - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD)) + arraySize) < cntxSize;\r\t\tfoo->successFlag = successValue && foo->successFlag;\r\t}\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\tperformSelector = foo->messageSelector;\r\tperformMethod = foo->newMethod;\r\r\t/* pop the arg array and the selector, then push the args out of the array, as if they were on the stack */\r\r\tperformArgCount = foo->argumentCount;\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tfoo->messageSelector = top1;\r\tindex = 1;\r\twhile (index <= arraySize) {\r\t\t/* begin push: */\r\t\tobject = longAt((argumentArray + (BASE_HEADER_SIZE)) + ((index - 1) << (SHIFT_FOR_WORD)));\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\t\tfoo->stackPointer = sp;\r\t\tindex += 1;\r\t}\r\tfoo->argumentCount = arraySize;\r\tfindNewMethodInClass(lookupClass);\r\tif (((((usqInt) (longAt(foo->newMethod))) >> 8) & 15) >= 12) {\r\t\t/* begin success: */\r\t\tsuccessValue1 = (argumentCountOf(foo->newMethod)) == foo->argumentCount;\r\t\tfoo->successFlag = successValue1 && foo->successFlag;\r\t}\r\tif (foo->successFlag) {\r\t\texecuteNewMethodFromCache();\r\t\tfoo->successFlag = 1;\r\t} else {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= foo->argumentCount * (BYTES_PER_WORD);\r\t\t/* begin push: */\r\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->messageSelector);\r\t\tfoo->stackPointer = sp1;\r\t\t/* begin push: */\r\t\tlongAtput(sp2 = foo->stackPointer + (BYTES_PER_WORD), argumentArray);\r\t\tfoo->stackPointer = sp2;\r\t\tfoo->messageSelector = performSelector;\r\t\tfoo->newMethod = performMethod;\r\t\tfoo->argumentCount = performArgCount;\r\t}\r}\r\rsqInt primitivePerformInSuperclass(void) {\rregister struct foo * foo = &fum;\r    sqInt currentClass;\r    sqInt rcvr;\r    sqInt lookupClass;\r    sqInt sp;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt top;\r    sqInt oop;\r\r\tlookupClass = longAt(foo->stackPointer);\r\trcvr = longAt(foo->stackPointer - (foo->argumentCount * (BYTES_PER_WORD)));\r\t/* begin fetchClassOf: */\r\tif ((rcvr & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tcurrentClass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tcurrentClass = (longAt(rcvr - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop = foo->specialObjectsOop;\r\t\toop2 = longAt((oop + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tcurrentClass = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\rl1:\t/* end fetchClassOf: */;\r\twhile (currentClass != lookupClass) {\r\t\tcurrentClass = longAt((currentClass + (BASE_HEADER_SIZE)) + (SuperclassIndex << (SHIFT_FOR_WORD)));\r\t\tif (currentClass == foo->nilObj) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t}\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tprimitivePerformAt(lookupClass);\r\tif (!(foo->successFlag)) {\r\t\t/* begin push: */\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), lookupClass);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\rsqInt primitivePerformWithArgs(void) {\rregister struct foo * foo = &fum;\r    sqInt rcvr;\r    sqInt lookupClass;\r    sqInt ccIndex;\r    sqInt oop;\r    sqInt oop1;\r    sqInt oop2;\r\r\trcvr = longAt(foo->stackPointer - (foo->argumentCount * (BYTES_PER_WORD)));\r\t/* begin fetchClassOf: */\r\tif ((rcvr & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop = foo->specialObjectsOop;\r\t\tlookupClass = longAt((oop + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tlookupClass = (longAt(rcvr - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop2 = foo->specialObjectsOop;\r\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tlookupClass = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\rl1:\t/* end fetchClassOf: */;\r\tprimitivePerformAt(lookupClass);\r}\r\r\r/*\tAnswer a string corresponding to the version of the external platform source\r\tcode, typically written in C and managed separately for each platform.\r\tThis is a named (not numbered) primitive in the null module (ie the VM) */\r\rEXPORT(sqInt) primitivePlatformSourceVersion(void) {\rregister struct foo * foo = &fum;\r    void * p;\r    sqInt versionString;\r    sqInt len;\r    sqInt sp;\r\r\t\r# ifdef PLATFORM_SOURCE_VERSION  // version level of platform support code\r\tlen = strlen(PLATFORM_SOURCE_VERSION);\r\tversionString = instantiateClassindexableSize(fetchPointerofObject(ClassString, foo->specialObjectsOop), len);\r\t/* begin arrayValueOf: */\r\tif ((!((versionString & 1))) && (((versionString & 1) == 0) && (isWordsOrBytesNonInt(versionString)))) {\r\t\tp = pointerForOop(versionString + (BASE_HEADER_SIZE));\r\t\tgoto l1;\r\t}\r\t/* begin primitiveFail */\r\tfoo->successFlag = 0;\rl1:\t/* end arrayValueOf: */;\r\tstrncpy(p, PLATFORM_SOURCE_VERSION, len);\r# else\r\t/* begin primitiveFail */\r\tfoo->successFlag = 0;\r\treturn null;\r# endif  // PLATFORM_SOURCE_VERSION\r\t\r\t/* begin pop:thenPush: */\r\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), versionString);\r\tfoo->stackPointer = sp;\r}\r\rsqInt primitivePushFalse(void) {\rregister struct foo * foo = &fum;\r    sqInt top;\r    sqInt sp;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\t/* begin push: */\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\tfoo->stackPointer = sp;\r}\r\rsqInt primitivePushMinusOne(void) {\rregister struct foo * foo = &fum;\r    sqInt top;\r    sqInt sp;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\t/* begin push: */\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), ConstMinusOne);\r\tfoo->stackPointer = sp;\r}\r\rsqInt primitivePushNil(void) {\rregister struct foo * foo = &fum;\r    sqInt top;\r    sqInt sp;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\t/* begin push: */\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->nilObj);\r\tfoo->stackPointer = sp;\r}\r\rsqInt primitivePushOne(void) {\rregister struct foo * foo = &fum;\r    sqInt top;\r    sqInt sp;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\t/* begin push: */\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), ConstOne);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\t\tno-op, really...\r\tthisReceiver := self popStack.\r\tself push: thisReceiver\r */\r\rsqInt primitivePushSelf(void) {\r}\r\rsqInt primitivePushTrue(void) {\rregister struct foo * foo = &fum;\r    sqInt top;\r    sqInt sp;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\t/* begin push: */\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\tfoo->stackPointer = sp;\r}\r\rsqInt primitivePushTwo(void) {\rregister struct foo * foo = &fum;\r    sqInt top;\r    sqInt sp;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\t/* begin push: */\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), ConstTwo);\r\tfoo->stackPointer = sp;\r}\r\rsqInt primitivePushZero(void) {\rregister struct foo * foo = &fum;\r    sqInt top;\r    sqInt sp;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\t/* begin push: */\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), ConstZero);\r\tfoo->stackPointer = sp;\r}\r\rsqInt primitiveQuit(void) {\r\tioExit();\r}\r\r\r/*\tRounds negative results towards zero. */\r\rsqInt primitiveQuo(void) {\rregister struct foo * foo = &fum;\r    sqInt integerArg;\r    sqInt integerResult;\r    sqInt integerRcvr;\r    sqInt integerPointer;\r    sqInt integerPointer1;\r    sqInt sp;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tintegerRcvr = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tintegerRcvr = 0;\r\t\tgoto l1;\r\t}\rl1:\t/* end checkedIntegerValueOf: */;\r\t/* begin stackIntegerValue: */\r\tintegerPointer1 = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer1 & 1)) {\r\t\tintegerArg = (integerPointer1 >> 1);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tintegerArg = 0;\r\t\tgoto l2;\r\t}\rl2:\t/* end checkedIntegerValueOf: */;\r\t/* begin success: */\r\tfoo->successFlag = (integerArg != 0) && foo->successFlag;\r\tif (foo->successFlag) {\r\t\tif (integerRcvr > 0) {\r\t\t\tif (integerArg > 0) {\r\t\t\t\tintegerResult = integerRcvr / integerArg;\r\t\t\t} else {\r\t\t\t\tintegerResult = 0 - (integerRcvr / (0 - integerArg));\r\t\t\t}\r\t\t} else {\r\t\t\tif (integerArg > 0) {\r\t\t\t\tintegerResult = 0 - ((0 - integerRcvr) / integerArg);\r\t\t\t} else {\r\t\t\t\tintegerResult = (0 - integerRcvr) / (0 - integerArg);\r\t\t\t}\r\t\t}\r\t}\r\t/* begin pop2AndPushIntegerIfOK: */\r\tif (foo->successFlag) {\r\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t(((((int) integerResult)) ^ ((((int) integerResult)) << 1)) >= 0)\r# else\r\t\t\t((integerResult >= -1073741824) && (integerResult <= 1073741823))\r# endif  // SQ_HOST32\r\t\t) {\r\t\t\t/* begin pop:thenPush: */\r\t\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), ((integerResult << 1) | 1));\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\tfoo->successFlag = 0;\r\t\t}\r\t}\r}\r\r\r/*\tRelinquish the processor for up to the given number of microseconds. The exact behavior of this primitive is platform dependent. */\r\rsqInt primitiveRelinquishProcessor(void) {\rregister struct foo * foo = &fum;\r    sqInt microSecs;\r    sqInt integerPointer;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tmicroSecs = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tmicroSecs = 0;\r\t\tgoto l1;\r\t}\rl1:\t/* end checkedIntegerValueOf: */;\r\tif (foo->successFlag) {\r\t\tioRelinquishProcessorForMicroseconds(microSecs);\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tNB: tpr removed the timer checks here and moved them to the primitiveExternalCall method.\r\tWe make the possibly unwarranted assumption that numbered prims are quick and external prims are slow. */\r\rsqInt primitiveResponse(void) {\rregister struct foo * foo = &fum;\r    sqInt delta;\r    sqInt primIdx;\r    sqInt nArgs;\r\r\tif (DoBalanceChecks) {\r\r\t\t/* check stack balance */\r\r\t\tnArgs = foo->argumentCount;\r\t\tdelta = foo->stackPointer - foo->activeContext;\r\t}\r\tprimIdx = foo->primitiveIndex;\r\r\t/* self dispatchOn: primitiveIndex in: primitiveTable. */\r\r\tfoo->successFlag = 1;\r\tdispatchFunctionPointerOnin(primIdx, primitiveTable);\r\tif (DoBalanceChecks) {\r\t\tif (!(balancedStackafterPrimitivewithArgs(delta, primIdx, nArgs))) {\r\t\t\tprintUnbalancedStack(primIdx);\r\t\t}\r\t}\r\r\t/* clear out primIndex so VM knows we're no longer in primitive */\r\r\tfoo->primitiveIndex = 0;\r\treturn foo->successFlag;\r}\r\r\r/*\tput this process on the scheduler's lists thus allowing it to proceed next time there is a chance for processes of it's priority level */\r\rsqInt primitiveResume(void) {\rregister struct foo * foo = &fum;\r    sqInt proc;\r\r\r\t/* rcvr */\r\t/* self success: ((self fetchClassOf: proc) = (self splObj: ClassProcess)). */\r\r\tproc = longAt(foo->stackPointer);\r\tif (foo->successFlag) {\r\t\tresume(proc);\r\t}\r}\r\r\r/*\tPrimitive. Answer a copy (snapshot) element of the root table.\r\tThe primitive can cause GC itself and if so the return value may\r\tbe inaccurate - in this case one should guard the read operation\r\tby looking at the gc counter statistics. */\r\rEXPORT(sqInt) primitiveRootTable(void) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r    sqInt sz;\r    sqInt i;\r    sqInt valuePointer;\r    sqInt sp;\r\r\tsz = foo->rootTableCount;\r\r\t/* can cause GC */\r\r\toop = instantiateClassindexableSize(splObj(ClassArray), sz);\r\tif (sz > foo->rootTableCount) {\r\t\tsz = foo->rootTableCount;\r\t}\r\tfor (i = 1; i <= sz; i += 1) {\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer = foo->rootTable[i];\r\t\tif ((((usqInt) oop)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(oop, valuePointer);\r\t\t}\r\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + ((i - 1) << (SHIFT_FOR_WORD)), valuePointer);\r\t}\r\t/* begin pop: */\r\tfoo->stackPointer -= (foo->argumentCount + 1) * (BYTES_PER_WORD);\r\t/* begin push: */\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), oop);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tPrimitive. Answer the nth element of the root table.\r\tThis primitive avoids the creation of an extra array;\r\tit is intended for enumerations of the form:\r\t\tindex := 1.\r\t\t[root := Smalltalk rootTableAt: index.\r\t\troot == nil] whileFalse:[index := index + 1].\r\t */\r\rEXPORT(sqInt) primitiveRootTableAt(void) {\rregister struct foo * foo = &fum;\r    sqInt index;\r    sqInt successValue;\r    sqInt sp;\r    sqInt integerPointer;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tindex = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tindex = 0;\r\t\tgoto l1;\r\t}\rl1:\t/* end checkedIntegerValueOf: */;\r\t/* begin success: */\r\tsuccessValue = (index > 0) && (index <= foo->rootTableCount);\r\tfoo->successFlag = successValue && foo->successFlag;\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= (foo->argumentCount + 1) * (BYTES_PER_WORD);\r\t\t/* begin push: */\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->rootTable[index]);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\r\r/*\tThe character scanner primitive. */\r\rsqInt primitiveScanCharacters(void) {\rregister struct foo * foo = &fum;\r    sqInt ascii;\r    sqInt stopReason;\r    sqInt nextDestX;\r    sqInt scanStartIndex;\r    sqInt nilOop;\r    sqInt scanMap;\r    sqInt scanStopIndex;\r    sqInt scanDestX;\r    sqInt sourceX;\r    sqInt scanLastIndex;\r    sqInt kernDelta;\r    sqInt rcvr;\r    sqInt stops;\r    sqInt maxGlyph;\r    sqInt sourceX2;\r    sqInt scanRightX;\r    sqInt scanXTable;\r    sqInt glyphIndex;\r    sqInt sourceString;\r    sqInt sp;\r    sqInt object;\r    sqInt sp1;\r    sqInt integerPointer;\r    sqInt oop;\r    sqInt integerPointer1;\r    sqInt oop1;\r    sqInt integerPointer2;\r    sqInt integerPointer3;\r    sqInt oop2;\r    sqInt object1;\r    sqInt sp2;\r\r\tif (!(foo->argumentCount == 6)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tkernDelta = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tkernDelta = 0;\r\t\tgoto l1;\r\t}\r\tkernDelta = null;\rl1:\t/* end stackIntegerValue: */;\r\t/* begin stackObjectValue: */\r\toop = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\tif ((oop & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tstops = null;\r\t\tgoto l2;\r\t}\r\tstops = oop;\rl2:\t/* end stackObjectValue: */;\r\tif (!(((stops & 1) == 0) && (((((usqInt) (longAt(stops))) >> 8) & 15) == 2))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif (!((slotSizeOf(stops)) >= 258)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin stackIntegerValue: */\r\tintegerPointer1 = longAt(foo->stackPointer - (2 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer1 & 1)) {\r\t\tscanRightX = (integerPointer1 >> 1);\r\t\tgoto l3;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tscanRightX = 0;\r\t\tgoto l3;\r\t}\r\tscanRightX = null;\rl3:\t/* end stackIntegerValue: */;\r\t/* begin stackObjectValue: */\r\toop1 = longAt(foo->stackPointer - (3 * (BYTES_PER_WORD)));\r\tif ((oop1 & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tsourceString = null;\r\t\tgoto l4;\r\t}\r\tsourceString = oop1;\rl4:\t/* end stackObjectValue: */;\r\tif (!(((sourceString & 1) == 0) && (((((usqInt) (longAt(sourceString))) >> 8) & 15) >= 8))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin stackIntegerValue: */\r\tintegerPointer2 = longAt(foo->stackPointer - (4 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer2 & 1)) {\r\t\tscanStopIndex = (integerPointer2 >> 1);\r\t\tgoto l5;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tscanStopIndex = 0;\r\t\tgoto l5;\r\t}\r\tscanStopIndex = null;\rl5:\t/* end stackIntegerValue: */;\r\t/* begin stackIntegerValue: */\r\tintegerPointer3 = longAt(foo->stackPointer - (5 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer3 & 1)) {\r\t\tscanStartIndex = (integerPointer3 >> 1);\r\t\tgoto l6;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tscanStartIndex = 0;\r\t\tgoto l6;\r\t}\r\tscanStartIndex = null;\rl6:\t/* end stackIntegerValue: */;\r\tif (!((scanStartIndex > 0) && ((scanStopIndex > 0) && (scanStopIndex <= (byteSizeOf(sourceString)))))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin stackObjectValue: */\r\toop2 = longAt(foo->stackPointer - (6 * (BYTES_PER_WORD)));\r\tif ((oop2 & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\trcvr = null;\r\t\tgoto l7;\r\t}\r\trcvr = oop2;\rl7:\t/* end stackObjectValue: */;\r\tif (!((((rcvr & 1) == 0) && (((((usqInt) (longAt(rcvr))) >> 8) & 15) <= 4)) && ((slotSizeOf(rcvr)) >= 4))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tscanDestX = fetchIntegerofObject(0, rcvr);\r\tscanLastIndex = fetchIntegerofObject(1, rcvr);\r\tscanXTable = longAt((rcvr + (BASE_HEADER_SIZE)) + (2 << (SHIFT_FOR_WORD)));\r\tscanMap = longAt((rcvr + (BASE_HEADER_SIZE)) + (3 << (SHIFT_FOR_WORD)));\r\tif (!((((scanXTable & 1) == 0) && (((((usqInt) (longAt(scanXTable))) >> 8) & 15) == 2)) && (((scanMap & 1) == 0) && (((((usqInt) (longAt(scanMap))) >> 8) & 15) == 2)))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif (!((slotSizeOf(scanMap)) == 256)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\r\t/* Okay, here we go. We have eliminated nearly all failure \r\tconditions, to optimize the inner fetches. */\r\r\tmaxGlyph = (slotSizeOf(scanXTable)) - 2;\r\tscanLastIndex = scanStartIndex;\r\tnilOop = foo->nilObj;\r\twhile (scanLastIndex <= scanStopIndex) {\r\r\t\t/* Known to be okay since scanStartIndex > 0 and scanStopIndex <= sourceString size */\r\t\t/* Known to be okay since stops size >= 258 */\r\r\t\tascii = byteAt((sourceString + (BASE_HEADER_SIZE)) + (scanLastIndex - 1));\r\t\tif (!((stopReason = longAt((stops + (BASE_HEADER_SIZE)) + (ascii << (SHIFT_FOR_WORD)))) == nilOop)) {\r\t\t\tif (!(\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t\t(((((int) scanDestX)) ^ ((((int) scanDestX)) << 1)) >= 0)\r# else\r\t\t\t\t((scanDestX >= -1073741824) && (scanDestX <= 1073741823))\r# endif  // SQ_HOST32\r\t\t\t)) {\r\t\t\t\t/* begin primitiveFail */\r\t\t\t\tfoo->successFlag = 0;\r\t\t\t\treturn null;\r\t\t\t}\r\t\t\t/* begin storeInteger:ofObject:withValue: */\r\t\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t\t(((((int) scanDestX)) ^ ((((int) scanDestX)) << 1)) >= 0)\r# else\r\t\t\t\t((scanDestX >= -1073741824) && (scanDestX <= 1073741823))\r# endif  // SQ_HOST32\r\t\t\t) {\r\t\t\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)), ((scanDestX << 1) | 1));\r\t\t\t} else {\r\t\t\t\t/* begin primitiveFail */\r\t\t\t\tfoo->successFlag = 0;\r\t\t\t}\r\t\t\t/* begin storeInteger:ofObject:withValue: */\r\t\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t\t(((((int) scanLastIndex)) ^ ((((int) scanLastIndex)) << 1)) >= 0)\r# else\r\t\t\t\t((scanLastIndex >= -1073741824) && (scanLastIndex <= 1073741823))\r# endif  // SQ_HOST32\r\t\t\t) {\r\t\t\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (1 << (SHIFT_FOR_WORD)), ((scanLastIndex << 1) | 1));\r\t\t\t} else {\r\t\t\t\t/* begin primitiveFail */\r\t\t\t\tfoo->successFlag = 0;\r\t\t\t}\r\t\t\t/* begin pop: */\r\t\t\tfoo->stackPointer -= 7 * (BYTES_PER_WORD);\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), stopReason);\r\t\t\tfoo->stackPointer = sp;\r\t\t\treturn null;\r\t\t}\r\r\t\t/* fail if the glyphIndex is out of range */\r\r\t\tglyphIndex = fetchIntegerofObject(ascii, scanMap);\r\t\tif ((!foo->successFlag) || ((glyphIndex < 0) || (glyphIndex > maxGlyph))) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t\tsourceX = fetchIntegerofObject(glyphIndex, scanXTable);\r\r\t\t/* Above may fail if non-integer entries in scanXTable */\r\r\t\tsourceX2 = fetchIntegerofObject(glyphIndex + 1, scanXTable);\r\t\tif (!foo->successFlag) {\r\t\t\treturn null;\r\t\t}\r\t\tnextDestX = (scanDestX + sourceX2) - sourceX;\r\t\tif (nextDestX > scanRightX) {\r\t\t\tif (!(\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t\t(((((int) scanDestX)) ^ ((((int) scanDestX)) << 1)) >= 0)\r# else\r\t\t\t\t((scanDestX >= -1073741824) && (scanDestX <= 1073741823))\r# endif  // SQ_HOST32\r\t\t\t)) {\r\t\t\t\t/* begin primitiveFail */\r\t\t\t\tfoo->successFlag = 0;\r\t\t\t\treturn null;\r\t\t\t}\r\t\t\t/* begin storeInteger:ofObject:withValue: */\r\t\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t\t(((((int) scanDestX)) ^ ((((int) scanDestX)) << 1)) >= 0)\r# else\r\t\t\t\t((scanDestX >= -1073741824) && (scanDestX <= 1073741823))\r# endif  // SQ_HOST32\r\t\t\t) {\r\t\t\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)), ((scanDestX << 1) | 1));\r\t\t\t} else {\r\t\t\t\t/* begin primitiveFail */\r\t\t\t\tfoo->successFlag = 0;\r\t\t\t}\r\t\t\t/* begin storeInteger:ofObject:withValue: */\r\t\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t\t(((((int) scanLastIndex)) ^ ((((int) scanLastIndex)) << 1)) >= 0)\r# else\r\t\t\t\t((scanLastIndex >= -1073741824) && (scanLastIndex <= 1073741823))\r# endif  // SQ_HOST32\r\t\t\t) {\r\t\t\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (1 << (SHIFT_FOR_WORD)), ((scanLastIndex << 1) | 1));\r\t\t\t} else {\r\t\t\t\t/* begin primitiveFail */\r\t\t\t\tfoo->successFlag = 0;\r\t\t\t}\r\t\t\t/* begin pop: */\r\t\t\tfoo->stackPointer -= 7 * (BYTES_PER_WORD);\r\t\t\t/* begin push: */\r\t\t\tobject = longAt((stops + (BASE_HEADER_SIZE)) + ((CrossedX - 1) << (SHIFT_FOR_WORD)));\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), object);\r\t\t\tfoo->stackPointer = sp1;\r\t\t\treturn null;\r\t\t}\r\t\tscanDestX = nextDestX + kernDelta;\r\t\tscanLastIndex += 1;\r\t}\r\tif (!(\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t(((((int) scanDestX)) ^ ((((int) scanDestX)) << 1)) >= 0)\r# else\r\t\t((scanDestX >= -1073741824) && (scanDestX <= 1073741823))\r# endif  // SQ_HOST32\r\t)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin storeInteger:ofObject:withValue: */\r\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t(((((int) scanDestX)) ^ ((((int) scanDestX)) << 1)) >= 0)\r# else\r\t\t((scanDestX >= -1073741824) && (scanDestX <= 1073741823))\r# endif  // SQ_HOST32\r\t) {\r\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)), ((scanDestX << 1) | 1));\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t}\r\t/* begin storeInteger:ofObject:withValue: */\r\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t(((((int) scanStopIndex)) ^ ((((int) scanStopIndex)) << 1)) >= 0)\r# else\r\t\t((scanStopIndex >= -1073741824) && (scanStopIndex <= 1073741823))\r# endif  // SQ_HOST32\r\t) {\r\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (1 << (SHIFT_FOR_WORD)), ((scanStopIndex << 1) | 1));\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t}\r\t/* begin pop: */\r\tfoo->stackPointer -= 7 * (BYTES_PER_WORD);\r\t/* begin push: */\r\tobject1 = longAt((stops + (BASE_HEADER_SIZE)) + ((EndOfRun - 1) << (SHIFT_FOR_WORD)));\r\tlongAtput(sp2 = foo->stackPointer + (BYTES_PER_WORD), object1);\r\tfoo->stackPointer = sp2;\r\treturn null;\r}\r\r\r/*\tReturn a SmallInteger indicating the current depth of the OS screen. Negative values are used to imply LSB type pixel format an there is some support in the VM for handling either MSB or LSB */\r\rEXPORT(sqInt) primitiveScreenDepth(void) {\rregister struct foo * foo = &fum;\r    sqInt depth;\r    sqInt sp;\r\r\tdepth = ioScreenDepth();\r\tif (!foo->successFlag) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin pop:thenPushInteger: */\r\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), ((depth << 1) | 1));\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tReturn a point indicating the current size of the Smalltalk window. Currently there is a limit of 65535 in each direction because the point is encoded into a single 32bit value in the image header. This might well become a problem one day */\r\rsqInt primitiveScreenSize(void) {\rregister struct foo * foo = &fum;\r    sqInt pointWord;\r    sqInt object;\r    sqInt sp;\r    sqInt pointResult;\r\r\t/* begin pop: */\r\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\tpointWord = ioScreenSize();\r\t/* begin push: */\r\t/* begin makePointwithxValue:yValue: */\r\tpointResult = instantiateSmallClasssizeInBytes(fetchPointerofObject(ClassPoint, foo->specialObjectsOop), 3 * (BYTES_PER_WORD));\r\tlongAtput((pointResult + (BASE_HEADER_SIZE)) + (XIndex << (SHIFT_FOR_WORD)), ((((((usqInt) pointWord) >> 16) & 65535) << 1) | 1));\r\tlongAtput((pointResult + (BASE_HEADER_SIZE)) + (YIndex << (SHIFT_FOR_WORD)), (((pointWord & 65535) << 1) | 1));\r\tobject = pointResult;\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tReturn the number of seconds since January 1, 1901 as an integer. */\r\rsqInt primitiveSecondsClock(void) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r    sqInt sp;\r\r\t/* begin pop:thenPush: */\r\toop = positive32BitIntegerFor(ioSeconds());\r\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), oop);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tSet to OS to the requested display mode.\r\tSee also DisplayScreen setDisplayDepth:extent:fullscreen: */\r\rsqInt primitiveSetDisplayMode(void) {\rregister struct foo * foo = &fum;\r    sqInt okay;\r    sqInt fsFlag;\r    sqInt d;\r    sqInt h;\r    sqInt w;\r    sqInt sp;\r    sqInt sp1;\r    sqInt integerPointer;\r    sqInt integerPointer1;\r    sqInt integerPointer2;\r\r\t/* begin booleanValueOf: */\r\tif ((longAt(foo->stackPointer)) == foo->trueObj) {\r\t\tfsFlag = 1;\r\t\tgoto l1;\r\t}\r\tif ((longAt(foo->stackPointer)) == foo->falseObj) {\r\t\tfsFlag = 0;\r\t\tgoto l1;\r\t}\r\tfoo->successFlag = 0;\r\tfsFlag = null;\rl1:\t/* end booleanValueOf: */;\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\th = (integerPointer >> 1);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\th = 0;\r\t\tgoto l2;\r\t}\r\th = null;\rl2:\t/* end stackIntegerValue: */;\r\t/* begin stackIntegerValue: */\r\tintegerPointer1 = longAt(foo->stackPointer - (2 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer1 & 1)) {\r\t\tw = (integerPointer1 >> 1);\r\t\tgoto l3;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tw = 0;\r\t\tgoto l3;\r\t}\r\tw = null;\rl3:\t/* end stackIntegerValue: */;\r\t/* begin stackIntegerValue: */\r\tintegerPointer2 = longAt(foo->stackPointer - (3 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer2 & 1)) {\r\t\td = (integerPointer2 >> 1);\r\t\tgoto l4;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\td = 0;\r\t\tgoto l4;\r\t}\r\td = null;\rl4:\t/* end stackIntegerValue: */;\r\tif (foo->successFlag) {\r\t\tokay = ioSetDisplayMode(w, h, d, fsFlag);\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 5 * (BYTES_PER_WORD);\r\t\t/* begin pushBool: */\r\t\tif (okay) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t}\r}\r\r\r/*\tOn platforms that support it, set full-screen mode to the value of the boolean argument. */\r\rsqInt primitiveSetFullScreen(void) {\rregister struct foo * foo = &fum;\r    sqInt argOop;\r\r\targOop = longAt(foo->stackPointer);\r\tif (argOop == foo->trueObj) {\r\t\tioSetFullScreen(1);\r\t} else {\r\t\tif (argOop == foo->falseObj) {\r\t\t\tioSetFullScreen(0);\r\t\t} else {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t}\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tPrimitive. Indicate if the GC logic should have bias to grow */\r\rEXPORT(sqInt) primitiveSetGCBiasToGrow(void) {\rregister struct foo * foo = &fum;\r    sqInt flag;\r    sqInt integerPointer;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tflag = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tflag = 0;\r\t\tgoto l1;\r\t}\rl1:\t/* end checkedIntegerValueOf: */;\r\tif (foo->successFlag) {\r\t\tfoo->gcBiasToGrow = flag;\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= foo->argumentCount * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tPrimitive. If the GC logic has  bias to grow, set growth limit */\r\rEXPORT(sqInt) primitiveSetGCBiasToGrowGCLimit(void) {\rregister struct foo * foo = &fum;\r    sqInt value;\r    sqInt integerPointer;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tvalue = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tvalue = 0;\r\t\tgoto l1;\r\t}\rl1:\t/* end checkedIntegerValueOf: */;\r\tif (foo->successFlag) {\r\t\tfoo->gcBiasToGrowGCLimit = value;\r\t\tfoo->gcBiasToGrowThreshold = foo->youngStart - (((int) memory));\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= foo->argumentCount * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tPrimitive. Indicate the semaphore to be signalled for upon garbage collection */\r\rEXPORT(sqInt) primitiveSetGCSemaphore(void) {\rregister struct foo * foo = &fum;\r    sqInt index;\r    sqInt integerPointer;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tindex = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tindex = 0;\r\t\tgoto l1;\r\t}\rl1:\t/* end checkedIntegerValueOf: */;\r\tif (foo->successFlag) {\r\t\tfoo->gcSemaphoreIndex = index;\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= foo->argumentCount * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tSet the user interrupt keycode. The keycode is an integer whose encoding is described in the comment for primitiveKbdNext. */\r\rsqInt primitiveSetInterruptKey(void) {\rregister struct foo * foo = &fum;\r    sqInt keycode;\r    sqInt integerPointer;\r    sqInt top;\r\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer = top;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tkeycode = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tkeycode = 0;\r\t\tgoto l1;\r\t}\rl1:\t/* end checkedIntegerValueOf: */;\r\tif (foo->successFlag) {\r\t\tfoo->interruptKeycode = keycode;\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 1 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tTreat the receiver, which can be indexible by either bytes or words, as an array of signed 16-bit values. Return the contents of the given index. Note that the index specifies the i-th 16-bit entry, not the i-th byte or word. */\r\rsqInt primitiveShortAt(void) {\rregister struct foo * foo = &fum;\r    sqInt sz;\r    sqInt value;\r    sqInt rcvr;\r    sqInt index;\r    sqInt addr;\r    sqInt sp;\r    sqInt integerPointer;\r    sqInt successValue;\r    sqInt successValue1;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tindex = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tindex = 0;\r\t\tgoto l1;\r\t}\rl1:\t/* end checkedIntegerValueOf: */;\r\trcvr = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin success: */\r\tsuccessValue = (!((rcvr & 1))) && (((rcvr & 1) == 0) && (isWordsOrBytesNonInt(rcvr)));\r\tfoo->successFlag = successValue && foo->successFlag;\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\r\t/* number of 16-bit fields */\r\r\tsz = ((sqInt) ((sizeBitsOf(rcvr)) - (BASE_HEADER_SIZE)) >> 1);\r\t/* begin success: */\r\tsuccessValue1 = (index >= 1) && (index <= sz);\r\tfoo->successFlag = successValue1 && foo->successFlag;\r\tif (foo->successFlag) {\r\t\taddr = (rcvr + (BASE_HEADER_SIZE)) + (2 * (index - 1));\r\t\tvalue = shortAt(addr);\r\t\t/* begin pop:thenPushInteger: */\r\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), ((value << 1) | 1));\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\r\r/*\tTreat the receiver, which can be indexible by either bytes or words, as an array of signed 16-bit values. Set the contents of the given index to the given value. Note that the index specifies the i-th 16-bit entry, not the i-th byte or word. */\r\rsqInt primitiveShortAtPut(void) {\rregister struct foo * foo = &fum;\r    sqInt sz;\r    sqInt value;\r    sqInt rcvr;\r    sqInt index;\r    sqInt addr;\r    sqInt integerPointer;\r    sqInt integerPointer1;\r    sqInt successValue;\r    sqInt successValue1;\r    sqInt successValue2;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tvalue = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tvalue = 0;\r\t\tgoto l1;\r\t}\rl1:\t/* end checkedIntegerValueOf: */;\r\t/* begin stackIntegerValue: */\r\tintegerPointer1 = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer1 & 1)) {\r\t\tindex = (integerPointer1 >> 1);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tindex = 0;\r\t\tgoto l2;\r\t}\rl2:\t/* end checkedIntegerValueOf: */;\r\trcvr = longAt(foo->stackPointer - (2 * (BYTES_PER_WORD)));\r\t/* begin success: */\r\tsuccessValue = (!((rcvr & 1))) && (((rcvr & 1) == 0) && (isWordsOrBytesNonInt(rcvr)));\r\tfoo->successFlag = successValue && foo->successFlag;\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\r\t/* number of 16-bit fields */\r\r\tsz = ((sqInt) ((sizeBitsOf(rcvr)) - (BASE_HEADER_SIZE)) >> 1);\r\t/* begin success: */\r\tsuccessValue1 = (index >= 1) && (index <= sz);\r\tfoo->successFlag = successValue1 && foo->successFlag;\r\t/* begin success: */\r\tsuccessValue2 = (value >= -32768) && (value <= 32767);\r\tfoo->successFlag = successValue2 && foo->successFlag;\r\tif (foo->successFlag) {\r\t\taddr = (rcvr + (BASE_HEADER_SIZE)) + (2 * (index - 1));\r\t\tshortAtput(addr, value);\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tForce the given rectangular section of the Display to be \r\tcopied to the screen. */\r\rsqInt primitiveShowDisplayRect(void) {\rregister struct foo * foo = &fum;\r    sqInt right;\r    sqInt bottom;\r    sqInt top;\r    sqInt left;\r    sqInt integerPointer;\r    sqInt integerPointer1;\r    sqInt integerPointer2;\r    sqInt integerPointer3;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tbottom = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tbottom = 0;\r\t\tgoto l1;\r\t}\rl1:\t/* end checkedIntegerValueOf: */;\r\t/* begin stackIntegerValue: */\r\tintegerPointer1 = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer1 & 1)) {\r\t\ttop = (integerPointer1 >> 1);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\ttop = 0;\r\t\tgoto l2;\r\t}\rl2:\t/* end checkedIntegerValueOf: */;\r\t/* begin stackIntegerValue: */\r\tintegerPointer2 = longAt(foo->stackPointer - (2 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer2 & 1)) {\r\t\tright = (integerPointer2 >> 1);\r\t\tgoto l3;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tright = 0;\r\t\tgoto l3;\r\t}\rl3:\t/* end checkedIntegerValueOf: */;\r\t/* begin stackIntegerValue: */\r\tintegerPointer3 = longAt(foo->stackPointer - (3 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer3 & 1)) {\r\t\tleft = (integerPointer3 >> 1);\r\t\tgoto l4;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tleft = 0;\r\t\tgoto l4;\r\t}\rl4:\t/* end checkedIntegerValueOf: */;\r\tdisplayBitsOfLeftTopRightBottom(fetchPointerofObject(TheDisplay, foo->specialObjectsOop), left, top, right, bottom);\r\tif (foo->successFlag) {\r\t\tioForceDisplayUpdate();\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 4 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tsynchromously signal the semaphore. This may change the active process as a result */\r\rsqInt primitiveSignal(void) {\rregister struct foo * foo = &fum;\r    sqInt sema;\r    sqInt classOop;\r    sqInt cl;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop;\r\r\r\t/* rcvr */\r\r\tsema = longAt(foo->stackPointer);\r\t/* begin assertClassOf:is: */\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\tclassOop = longAt((oop + (BASE_HEADER_SIZE)) + (ClassSemaphore << (SHIFT_FOR_WORD)));\r\tif ((sema & 1)) {\r\t\tfoo->successFlag = 0;\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(sema))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tcl = (longAt(sema - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop2 = foo->specialObjectsOop;\r\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tcl = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t}\r\t/* begin success: */\r\tfoo->successFlag = (cl == classOop) && foo->successFlag;\rl1:\t/* end assertClassOf:is: */;\r\tif (foo->successFlag) {\r\t\tsynchronousSignal(sema);\r\t}\r}\r\r\r/*\tSet the low-water mark for free space. When the free space \r\tfalls below this level, the new and new: primitives fail and \r\tsystem attempts to allocate space (e.g., to create a method \r\tcontext) cause the low-space semaphore (if one is \r\tregistered) to be signalled. */\r\rsqInt primitiveSignalAtBytesLeft(void) {\rregister struct foo * foo = &fum;\r    sqInt bytes;\r    sqInt integerPointer;\r    sqInt top;\r\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer = top;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tbytes = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tbytes = 0;\r\t\tgoto l1;\r\t}\rl1:\t/* end checkedIntegerValueOf: */;\r\tif (foo->successFlag) {\r\t\tfoo->lowSpaceThreshold = bytes;\r\t} else {\r\t\tfoo->lowSpaceThreshold = 0;\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 1 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tCause the time semaphore, if one has been registered, to\r\tbe signalled when the millisecond clock is greater than or\r\tequal to the given tick value. A tick value of zero turns off\r\ttimer interrupts. */\r\rsqInt primitiveSignalAtMilliseconds(void) {\rregister struct foo * foo = &fum;\r    sqInt tick;\r    sqInt sema;\r    sqInt integerPointer;\r    sqInt top;\r    sqInt top1;\r    sqInt oop;\r    sqInt oop1;\r    sqInt valuePointer;\r\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer = top;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\ttick = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\ttick = 0;\r\t\tgoto l1;\r\t}\rl1:\t/* end checkedIntegerValueOf: */;\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tsema = top1;\r\tif (foo->successFlag) {\r\t\tif ((fetchClassOf(sema)) == (fetchPointerofObject(ClassSemaphore, foo->specialObjectsOop))) {\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\toop = foo->specialObjectsOop;\r\t\t\tif ((((usqInt) oop)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(oop, sema);\r\t\t\t}\r\t\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + (TheTimerSemaphore << (SHIFT_FOR_WORD)), sema);\r\t\t\tfoo->nextWakeupTick = tick;\r\t\t} else {\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\toop1 = foo->specialObjectsOop;\r\t\t\tvaluePointer = foo->nilObj;\r\t\t\tif ((((usqInt) oop1)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(oop1, valuePointer);\r\t\t\t}\r\t\t\tlongAtput((oop1 + (BASE_HEADER_SIZE)) + (TheTimerSemaphore << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\tfoo->nextWakeupTick = 0;\r\t\t}\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t}\r}\r\rsqInt primitiveSine(void) {\rregister struct foo * foo = &fum;\r    double  rcvr;\r\r\trcvr = popFloat();\r\tif (foo->successFlag) {\r\t\tpushFloat(sin(rcvr));\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 1 * (BYTES_PER_WORD);\r\t}\r}\r\rsqInt primitiveSize(void) {\rregister struct foo * foo = &fum;\r    sqInt sz;\r    sqInt rcvr;\r    sqInt oop;\r    sqInt sp;\r\r\trcvr = longAt(foo->stackPointer);\r\tif ((rcvr & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif (((((usqInt) (longAt(rcvr))) >> 8) & 15) < 2) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tsz = stSizeOf(rcvr);\r\tif (foo->successFlag) {\r\t\t/* begin pop:thenPush: */\r\t\toop = positive32BitIntegerFor(sz);\r\t\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), oop);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\r\r/*\tsave a normal snapshot under the same name as it was loaded unless it has been renamed by the last primitiveImageName */\r\rsqInt primitiveSnapshot(void) {\r\treturn snapshot(0);\r}\r\r\r/*\tsave an embedded snapshot */\r\rsqInt primitiveSnapshotEmbedded(void) {\r\treturn snapshot(1);\r}\r\rsqInt primitiveSomeInstance(void) {\rregister struct foo * foo = &fum;\r    sqInt class;\r    sqInt instance;\r    sqInt sp;\r    sqInt thisClass;\r    sqInt thisObj;\r    sqInt ccIndex;\r    sqInt oop;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt obj;\r    sqInt sz;\r    sqInt header;\r\r\tclass = longAt(foo->stackPointer);\r\t/* begin initialInstanceOf: */\r\t/* begin firstAccessibleObject */\r\tobj = memory + (foo->headerTypeBytes[(longAt(memory)) & TypeMask]);\r\twhile ((((usqInt) obj)) < (((usqInt) foo->endOfMemory))) {\r\t\tif (!(((longAt(obj)) & TypeMask) == HeaderTypeFree)) {\r\t\t\tthisObj = obj;\r\t\t\tgoto l4;\r\t\t}\r\t\t/* begin objectAfter: */\r\t\tif (DoAssertionChecks) {\r\t\t\tif ((((usqInt) obj)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t}\r\t\t}\r\t\tif (((longAt(obj)) & TypeMask) == HeaderTypeFree) {\r\t\t\tsz = (longAt(obj)) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader = longAt(obj);\r\t\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(obj - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l3;\r\t\t\t} else {\r\t\t\t\tsz = header & (SIZE_MASK);\r\t\t\t\tgoto l3;\r\t\t\t}\r\t\tl3:\t/* end sizeBitsOf: */;\r\t\t}\r\t\tobj = (obj + sz) + (foo->headerTypeBytes[(longAt(obj + sz)) & TypeMask]);\r\t}\r\terror(\"heap is empty\");\rl4:\t/* end firstAccessibleObject */;\r\twhile (!(thisObj == null)) {\r\t\t/* begin fetchClassOf: */\r\t\tif ((thisObj & 1)) {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop = foo->specialObjectsOop;\r\t\t\tthisClass = longAt((oop + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\t\tgoto l2;\r\t\t}\r\t\tccIndex = (((usqInt) (longAt(thisObj))) >> 12) & 31;\r\t\tif (ccIndex == 0) {\r\t\t\tthisClass = (longAt(thisObj - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\t\tgoto l2;\r\t\t} else {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop2 = foo->specialObjectsOop;\r\t\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\t\tthisClass = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\t\tgoto l2;\r\t\t}\r\tl2:\t/* end fetchClassOf: */;\r\t\tif (thisClass == class) {\r\t\t\tinstance = thisObj;\r\t\t\tgoto l1;\r\t\t}\r\t\tthisObj = accessibleObjectAfter(thisObj);\r\t}\r\tinstance = foo->nilObj;\rl1:\t/* end initialInstanceOf: */;\r\tif (instance == foo->nilObj) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t} else {\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp = foo->stackPointer - (((foo->argumentCount + 1) - 1) * (BYTES_PER_WORD)), instance);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\r\r/*\tReturn the first object in the heap. */\r\rsqInt primitiveSomeObject(void) {\rregister struct foo * foo = &fum;\r    sqInt object;\r    sqInt sp;\r    sqInt obj;\r    sqInt sz;\r    sqInt header;\r\r\t/* begin pop: */\r\tfoo->stackPointer -= (foo->argumentCount + 1) * (BYTES_PER_WORD);\r\t/* begin push: */\r\t/* begin firstAccessibleObject */\r\tobj = memory + (foo->headerTypeBytes[(longAt(memory)) & TypeMask]);\r\twhile ((((usqInt) obj)) < (((usqInt) foo->endOfMemory))) {\r\t\tif (!(((longAt(obj)) & TypeMask) == HeaderTypeFree)) {\r\t\t\tobject = obj;\r\t\t\tgoto l2;\r\t\t}\r\t\t/* begin objectAfter: */\r\t\tif (DoAssertionChecks) {\r\t\t\tif ((((usqInt) obj)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t}\r\t\t}\r\t\tif (((longAt(obj)) & TypeMask) == HeaderTypeFree) {\r\t\t\tsz = (longAt(obj)) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader = longAt(obj);\r\t\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(obj - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tsz = header & (SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\tl1:\t/* end sizeBitsOf: */;\r\t\t}\r\t\tobj = (obj + sz) + (foo->headerTypeBytes[(longAt(obj + sz)) & TypeMask]);\r\t}\r\terror(\"heap is empty\");\rl2:\t/* end firstAccessibleObject */;\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tReturn the oop of the SpecialObjectsArray. */\r\rsqInt primitiveSpecialObjectsOop(void) {\rregister struct foo * foo = &fum;\r    sqInt sp;\r\r\t/* begin pop:thenPush: */\r\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), foo->specialObjectsOop);\r\tfoo->stackPointer = sp;\r}\r\rsqInt primitiveSquareRoot(void) {\rregister struct foo * foo = &fum;\r    double  rcvr;\r\r\trcvr = popFloat();\r\t/* begin success: */\r\tfoo->successFlag = (rcvr >= 0.0) && foo->successFlag;\r\tif (foo->successFlag) {\r\t\tpushFloat(sqrt(rcvr));\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 1 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tThis primitive is called from Squeak as...\r\t\t<imageSegment> storeSegmentFor: arrayOfRoots into: aWordArray outPointers: anArray. */\r/*\tThis primitive will store a binary image segment (in the same format as the Squeak image file) of the receiver and every object in its proper tree of subParts (ie, that is not refered to from anywhere else outside the tree).  All pointers from within the tree to objects outside the tree will be copied into the array of outpointers.  In their place in the image segment will be an oop equal to the offset in the outPointer array (the first would be 4). but with the high bit set. */\r/*\tThe primitive expects the array and wordArray to be more than adequately long.  In this case it returns normally, and truncates the two arrays to exactly the right size.  To simplify truncation, both incoming arrays are required to be 256 bytes or more long (ie with 3-word headers).  If either array is too small, the primitive will fail, but in no other case.\r\rDuring operation of the primitive, it is necessary to convert from both internal and external oops to their mapped values.  To make this fast, the headers of the original objects in question are replaced by the mapped values (and this is noted by adding the forbidden XX header type).  Tables are kept of both kinds of oops, as well as of the original headers for restoration.\r\rTo be specific, there are two similar two-part tables, the outpointer array, and one in the upper fifth of the segmentWordArray.  Each grows oops from the bottom up, and preserved headers from halfway up.\r\rIn case of either success or failure, the headers must be restored.  In the event of primitive failure, the table of outpointers must also be nilled out (since the garbage in the high half will not have been discarded. */\r\rsqInt primitiveStoreImageSegment(void) {\rregister struct foo * foo = &fum;\r    usqInt hdrBaseOut;\r    sqInt mapOop;\r    usqInt segOop;\r    sqInt versionOffset;\r    usqInt savedYoungStart;\r    sqInt hdrTypeBits;\r    usqInt lastPtr;\r    sqInt segmentWordArray;\r    usqInt lastIn;\r    usqInt firstIn;\r    sqInt doingClass;\r    sqInt header;\r    sqInt fieldOop;\r    usqInt fieldPtr;\r    usqInt lastOut;\r    usqInt hdrBaseIn;\r    sqInt extraSize;\r    usqInt lastSeg;\r    sqInt outPointerArray;\r    usqInt endSeg;\r    usqInt firstOut;\r    sqInt arrayOfRoots;\r    sqInt i;\r    sqInt lastAddr;\r    sqInt i1;\r    sqInt lastAddr1;\r    sqInt i2;\r    sqInt lastAddr2;\r    sqInt sz;\r    sqInt i3;\r    sqInt lastAddr3;\r    sqInt in;\r    sqInt lastIn1;\r    sqInt out;\r    sqInt in1;\r    sqInt lastIn2;\r    sqInt out1;\r    sqInt header1;\r\r\toutPointerArray = longAt(foo->stackPointer);\r\tsegmentWordArray = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\r\t/* Essential type checks */\r\r\tarrayOfRoots = longAt(foo->stackPointer - (2 * (BYTES_PER_WORD)));\r\tif (!((((((usqInt) (longAt(arrayOfRoots))) >> 8) & 15) == 2) && ((((((usqInt) (longAt(outPointerArray))) >> 8) & 15) == 2) && (((((usqInt) (longAt(segmentWordArray))) >> 8) & 15) == 6)))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif (!((((longAt(outPointerArray)) & TypeMask) == HeaderTypeSizeAndClass) && (((longAt(segmentWordArray)) & TypeMask) == HeaderTypeSizeAndClass))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif (DoAssertionChecks) {\r\t\tverifyCleanHeaders();\r\t}\r\tfirstOut = outPointerArray + (BASE_HEADER_SIZE);\r\tlastOut = firstOut - (BYTES_PER_WORD);\r\r\t/* top half */\r\r\thdrBaseOut = outPointerArray + (((lastPointerOf(outPointerArray)) / ((BYTES_PER_WORD) * 2)) * (BYTES_PER_WORD));\r\tlastSeg = segmentWordArray;\r\r\t/* Write a version number for byte order and version check */\r\r\tendSeg = (segmentWordArray + (sizeBitsOf(segmentWordArray))) - (BYTES_PER_WORD);\r\tversionOffset = BYTES_PER_WORD;\r\tlastSeg += versionOffset;\r\tif (lastSeg > endSeg) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tlongAtput(lastSeg, imageSegmentVersion());\r\r\t/* Take 1/8 of seg */\r\r\tfirstIn = endSeg - (((sizeBitsOf(segmentWordArray)) / ((BYTES_PER_WORD) * 8)) * (BYTES_PER_WORD));\r\tlastIn = firstIn - (BYTES_PER_WORD);\r\r\t/* top half of that */\r\t/* First mark the rootArray and all root objects. */\r\r\thdrBaseIn = firstIn + (((sizeBitsOf(segmentWordArray)) / ((BYTES_PER_WORD) * 16)) * (BYTES_PER_WORD));\r\tlongAtput(arrayOfRoots, (longAt(arrayOfRoots)) | (MARK_BIT));\r\tlastPtr = arrayOfRoots + (lastPointerOf(arrayOfRoots));\r\tfieldPtr = arrayOfRoots + (BASE_HEADER_SIZE);\r\twhile (fieldPtr <= lastPtr) {\r\t\tfieldOop = longAt(fieldPtr);\r\t\tif (!((fieldOop & 1))) {\r\t\t\tlongAtput(fieldOop, (longAt(fieldOop)) | (MARK_BIT));\r\t\t}\r\t\tfieldPtr += BYTES_PER_WORD;\r\t}\r\tsavedYoungStart = foo->youngStart;\r\r\t/* process all of memory */\r\t/* clear the recycled context lists */\r\r\tfoo->youngStart = memory;\r\tfoo->freeContexts = NilContext;\r\tfoo->freeLargeContexts = NilContext;\r\tmarkAndTraceInterpreterOops();\r\r\t/* Finally unmark the rootArray and all root objects. */\r\r\tfoo->youngStart = savedYoungStart;\r\tlongAtput(arrayOfRoots, (longAt(arrayOfRoots)) & (ALL_BUT_MARK_BIT));\r\tfieldPtr = arrayOfRoots + (BASE_HEADER_SIZE);\r\twhile (fieldPtr <= lastPtr) {\r\t\tfieldOop = longAt(fieldPtr);\r\t\tif (!((fieldOop & 1))) {\r\t\t\tlongAtput(fieldOop, (longAt(fieldOop)) & (ALL_BUT_MARK_BIT));\r\t\t}\r\t\tfieldPtr += BYTES_PER_WORD;\r\t}\r\tlastIn += BYTES_PER_WORD;\r\tif (lastIn >= hdrBaseIn) {\r\t\tfoo->successFlag = 0;\r\t}\r\tlastSeg = copyObjtoSegmentaddrstopAtsaveOopAtheaderAt(arrayOfRoots, segmentWordArray, lastSeg, firstIn, lastIn, hdrBaseIn + (lastIn - firstIn));\r\tif (!(foo->successFlag)) {\r\t\tlastIn -= BYTES_PER_WORD;\r\t\trestoreHeadersFromtofromandtofrom(firstIn, lastIn, hdrBaseIn, firstOut, lastOut, hdrBaseOut);\r\t\t/* begin primitiveFailAfterCleanup: */\r\t\tlastAddr = outPointerArray + (lastPointerOf(outPointerArray));\r\t\ti = outPointerArray + (BASE_HEADER_SIZE);\r\t\twhile (i <= lastAddr) {\r\t\t\tlongAtput(i, foo->nilObj);\r\t\t\ti += BYTES_PER_WORD;\r\t\t}\r\t\tif (DoAssertionChecks) {\r\t\t\tverifyCleanHeaders();\r\t\t}\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tsegOop = ((segmentWordArray + versionOffset) + (BASE_HEADER_SIZE)) + (foo->headerTypeBytes[(longAt((segmentWordArray + versionOffset) + (BASE_HEADER_SIZE))) & TypeMask]);\r\twhile (segOop <= lastSeg) {\r\t\tif (((longAt(segOop)) & TypeMask) <= 1) {\r\r\t\t\t/* This object has a class field (type=0 or 1) -- start with that. */\r\r\t\t\tfieldPtr = segOop - (BYTES_PER_WORD);\r\t\t\tdoingClass = 1;\r\t\t} else {\r\r\t\t\t/* No class field -- start with first data field */\r\r\t\t\tfieldPtr = segOop + (BASE_HEADER_SIZE);\r\t\t\tdoingClass = 0;\r\t\t}\r\r\t\t/* last field */\r\t\t/* Go through all oops, remapping them... */\r\r\t\tlastPtr = segOop + (lastPointerOf(segOop));\r\t\twhile (!(fieldPtr > lastPtr)) {\r\r\t\t\t/* Examine each pointer field */\r\r\t\t\tfieldOop = longAt(fieldPtr);\r\t\t\tif (doingClass) {\r\t\t\t\thdrTypeBits = fieldOop & TypeMask;\r\t\t\t\tfieldOop -= hdrTypeBits;\r\t\t\t}\r\t\t\tif ((fieldOop & 1)) {\r\r\t\t\t\t/* Just an integer -- nothing to do */\r\r\t\t\t\tfieldPtr += BYTES_PER_WORD;\r\t\t\t} else {\r\t\t\t\theader = longAt(fieldOop);\r\t\t\t\tif ((header & TypeMask) == HeaderTypeFree) {\r\r\t\t\t\t\t/* Has already been forwarded -- this is the link */\r\r\t\t\t\t\tmapOop = header & (ALL_BUT_TYPE_MASK);\r\t\t\t\t} else {\r\t\t\t\t\tif (((longAt(fieldOop)) & (MARK_BIT)) == 0) {\r\r\t\t\t\t\t\t/* Points to an unmarked obj -- an internal pointer.\r\t\t\t\t\t\t\tCopy the object into the segment, and forward its oop. */\r\r\t\t\t\t\t\tlastIn += BYTES_PER_WORD;\r\t\t\t\t\t\tif (lastIn >= hdrBaseIn) {\r\t\t\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t\t\t}\r\t\t\t\t\t\tlastSeg = copyObjtoSegmentaddrstopAtsaveOopAtheaderAt(fieldOop, segmentWordArray, lastSeg, firstIn, lastIn, hdrBaseIn + (lastIn - firstIn));\r\t\t\t\t\t\tif (!(foo->successFlag)) {\r\r\t\t\t\t\t\t\t/* Out of space in segment */\r\r\t\t\t\t\t\t\tlastIn -= BYTES_PER_WORD;\r\t\t\t\t\t\t\trestoreHeadersFromtofromandtofrom(firstIn, lastIn, hdrBaseIn, firstOut, lastOut, hdrBaseOut);\r\t\t\t\t\t\t\t/* begin primitiveFailAfterCleanup: */\r\t\t\t\t\t\t\tlastAddr1 = outPointerArray + (lastPointerOf(outPointerArray));\r\t\t\t\t\t\t\ti1 = outPointerArray + (BASE_HEADER_SIZE);\r\t\t\t\t\t\t\twhile (i1 <= lastAddr1) {\r\t\t\t\t\t\t\t\tlongAtput(i1, foo->nilObj);\r\t\t\t\t\t\t\t\ti1 += BYTES_PER_WORD;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\tif (DoAssertionChecks) {\r\t\t\t\t\t\t\t\tverifyCleanHeaders();\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\t/* begin primitiveFail */\r\t\t\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t\t\t\treturn null;\r\t\t\t\t\t\t}\r\t\t\t\t\t\tmapOop = (longAt(fieldOop)) & (ALL_BUT_TYPE_MASK);\r\t\t\t\t\t} else {\r\r\t\t\t\t\t\t/* Points to a marked obj -- an external pointer.\r\t\t\t\t\t\t\tMap it as a tagged index in outPointers, and forward its oop. */\r\r\t\t\t\t\t\tlastOut += BYTES_PER_WORD;\r\t\t\t\t\t\tif (lastOut >= hdrBaseOut) {\r\r\t\t\t\t\t\t\t/* Out of space in outPointerArray */\r\r\t\t\t\t\t\t\tlastOut -= BYTES_PER_WORD;\r\t\t\t\t\t\t\trestoreHeadersFromtofromandtofrom(firstIn, lastIn, hdrBaseIn, firstOut, lastOut, hdrBaseOut);\r\t\t\t\t\t\t\t/* begin primitiveFailAfterCleanup: */\r\t\t\t\t\t\t\tlastAddr2 = outPointerArray + (lastPointerOf(outPointerArray));\r\t\t\t\t\t\t\ti2 = outPointerArray + (BASE_HEADER_SIZE);\r\t\t\t\t\t\t\twhile (i2 <= lastAddr2) {\r\t\t\t\t\t\t\t\tlongAtput(i2, foo->nilObj);\r\t\t\t\t\t\t\t\ti2 += BYTES_PER_WORD;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\tif (DoAssertionChecks) {\r\t\t\t\t\t\t\t\tverifyCleanHeaders();\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\t/* begin primitiveFail */\r\t\t\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t\t\t\treturn null;\r\t\t\t\t\t\t}\r\t\t\t\t\t\tmapOop = (lastOut - outPointerArray) | 2147483648U;\r\t\t\t\t\t\t/* begin forward:to:savingOopAt:andHeaderAt: */\r\t\t\t\t\t\tlongAtput(lastOut, fieldOop);\r\t\t\t\t\t\tlongAtput(hdrBaseOut + (lastOut - firstOut), longAt(fieldOop));\r\t\t\t\t\t\tlongAtput(fieldOop, mapOop + HeaderTypeFree);\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\tif (doingClass) {\r\t\t\t\t\tlongAtput(fieldPtr, mapOop + hdrTypeBits);\r\t\t\t\t\tfieldPtr += (BYTES_PER_WORD) * 2;\r\t\t\t\t\tdoingClass = 0;\r\t\t\t\t} else {\r\t\t\t\t\tlongAtput(fieldPtr, mapOop);\r\t\t\t\t\tfieldPtr += BYTES_PER_WORD;\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t\t/* begin objectAfter: */\r\t\tif (DoAssertionChecks) {\r\t\t\tif ((((usqInt) segOop)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t}\r\t\t}\r\t\tif (((longAt(segOop)) & TypeMask) == HeaderTypeFree) {\r\t\t\tsz = (longAt(segOop)) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader1 = longAt(segOop);\r\t\t\tif ((header1 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(segOop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tsz = header1 & (SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\tl1:\t/* end sizeBitsOf: */;\r\t\t}\r\t\tsegOop = (segOop + sz) + (foo->headerTypeBytes[(longAt(segOop + sz)) & TypeMask]);\r\t}\r\trestoreHeadersFromtofromandtofrom(firstIn, lastIn, hdrBaseIn, firstOut, lastOut, hdrBaseOut);\r\tif ((((outPointerArray + (lastPointerOf(outPointerArray))) - lastOut) < 12) || ((endSeg - lastSeg) < 12)) {\r\t\t/* begin primitiveFailAfterCleanup: */\r\t\tlastAddr3 = outPointerArray + (lastPointerOf(outPointerArray));\r\t\ti3 = outPointerArray + (BASE_HEADER_SIZE);\r\t\twhile (i3 <= lastAddr3) {\r\t\t\tlongAtput(i3, foo->nilObj);\r\t\t\ti3 += BYTES_PER_WORD;\r\t\t}\r\t\tif (DoAssertionChecks) {\r\t\t\tverifyCleanHeaders();\r\t\t}\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\textraSize = foo->headerTypeBytes[(longAt(segmentWordArray)) & TypeMask];\r\r\t/* Copy the 3-word wordArray header to establish a free chunk. */\r\r\thdrTypeBits = (longAt(segmentWordArray)) & TypeMask;\r\t/* begin transfer:from:to: */\r\tflag(\"Dan\");\r\tin = (segmentWordArray - extraSize) - (BYTES_PER_WORD);\r\tlastIn1 = in + (3 * (BYTES_PER_WORD));\r\tout = (lastOut + (BYTES_PER_WORD)) - (BYTES_PER_WORD);\r\twhile ((((usqInt) in)) < (((usqInt) lastIn1))) {\r\t\tlongAtput(out += BYTES_PER_WORD, longAt(in += BYTES_PER_WORD));\r\t}\r\tlongAtput(lastOut + (BYTES_PER_WORD), (((outPointerArray + (lastPointerOf(outPointerArray))) - lastOut) - extraSize) + hdrTypeBits);\r\tlongAtput(outPointerArray - extraSize, ((lastOut - firstOut) + ((BYTES_PER_WORD) * 2)) + hdrTypeBits);\r\tbeRootIfOld(outPointerArray);\r\t/* begin transfer:from:to: */\r\tflag(\"Dan\");\r\tin1 = (segmentWordArray - extraSize) - (BYTES_PER_WORD);\r\tlastIn2 = in1 + (3 * (BYTES_PER_WORD));\r\tout1 = (lastSeg + (BYTES_PER_WORD)) - (BYTES_PER_WORD);\r\twhile ((((usqInt) in1)) < (((usqInt) lastIn2))) {\r\t\tlongAtput(out1 += BYTES_PER_WORD, longAt(in1 += BYTES_PER_WORD));\r\t}\r\tlongAtput(segmentWordArray - extraSize, ((lastSeg - segmentWordArray) + (BASE_HEADER_SIZE)) + hdrTypeBits);\r\tlongAtput(lastSeg + (BYTES_PER_WORD), ((endSeg - lastSeg) - extraSize) + hdrTypeBits);\r\tif (DoAssertionChecks) {\r\t\tverifyCleanHeaders();\r\t}\r\t/* begin pop: */\r\tfoo->stackPointer -= 3 * (BYTES_PER_WORD);\r}\r\r\r/*\tAtomic store into context stackPointer. \r\tAlso ensures that any newly accessible cells are initialized to nil  */\r\rsqInt primitiveStoreStackp(void) {\rregister struct foo * foo = &fum;\r    sqInt stackp;\r    sqInt i;\r    sqInt newStackp;\r    sqInt ctxt;\r    sqInt integerPointer;\r    sqInt successValue;\r    sqInt valuePointer;\r    sqInt otherOop;\r    sqInt sp;\r\r\tctxt = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tnewStackp = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tnewStackp = 0;\r\t\tgoto l1;\r\t}\rl1:\t/* end checkedIntegerValueOf: */;\r\t/* begin success: */\r\tfoo->successFlag = ((((usqInt) newStackp)) >= (((usqInt) 0))) && foo->successFlag;\r\t/* begin success: */\r\t/* begin oop:isLessThanOrEqualTo: */\r\totherOop = (((LARGE_CONTEXT_SIZE) - (BASE_HEADER_SIZE)) / (BYTES_PER_WORD)) - CtxtTempFrameStart;\r\tsuccessValue = (((usqInt) newStackp)) <= (((usqInt) otherOop));\r\tfoo->successFlag = successValue && foo->successFlag;\r\tif (!(foo->successFlag)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin fetchStackPointerOf: */\r\tsp = longAt((ctxt + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)));\r\tif (!((sp & 1))) {\r\t\tstackp = 0;\r\t\tgoto l2;\r\t}\r\tstackp = (sp >> 1);\rl2:\t/* end fetchStackPointerOf: */;\r\tif ((((usqInt) newStackp)) > (((usqInt) stackp))) {\r\t\tfor (i = (stackp + 1); i <= newStackp; i += 1) {\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tvaluePointer = foo->nilObj;\r\t\t\tif ((((usqInt) ctxt)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(ctxt, valuePointer);\r\t\t\t}\r\t\t\tlongAtput((ctxt + (BASE_HEADER_SIZE)) + (((i + CtxtTempFrameStart) - 1) << (SHIFT_FOR_WORD)), valuePointer);\r\t\t}\r\t}\r\t/* begin storeStackPointerValue:inContext: */\r\tlongAtput((ctxt + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)), ((newStackp << 1) | 1));\r\t/* begin pop: */\r\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r}\r\rsqInt primitiveStringAt(void) {\r\tcommonAt(1);\r}\r\rsqInt primitiveStringAtPut(void) {\r\tcommonAtPut(1);\r}\r\r\r/*\t \r\t<array> primReplaceFrom: start to: stop with: replacement \r\tstartingAt: repStart  \r\t<primitive: 105>\r\t */\r\rsqInt primitiveStringReplace(void) {\rregister struct foo * foo = &fum;\r    sqInt stop;\r    sqInt start;\r    sqInt totalLength;\r    sqInt srcIndex;\r    sqInt i;\r    sqInt arrayInstSize;\r    sqInt replInstSize;\r    sqInt hdr;\r    sqInt replFmt;\r    sqInt array;\r    sqInt replStart;\r    sqInt repl;\r    sqInt arrayFmt;\r    sqInt valuePointer;\r    sqInt valueWord;\r    sqInt integerPointer;\r    sqInt integerPointer1;\r    sqInt integerPointer2;\r    sqInt sz;\r    sqInt sz1;\r    sqInt classFormat;\r    sqInt class;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r    sqInt classFormat1;\r    sqInt class1;\r    sqInt ccIndex1;\r    sqInt oop11;\r    sqInt oop21;\r    sqInt oop31;\r\r\tarray = longAt(foo->stackPointer - (4 * (BYTES_PER_WORD)));\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (3 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tstart = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tstart = 0;\r\t\tgoto l1;\r\t}\r\tstart = null;\rl1:\t/* end stackIntegerValue: */;\r\t/* begin stackIntegerValue: */\r\tintegerPointer1 = longAt(foo->stackPointer - (2 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer1 & 1)) {\r\t\tstop = (integerPointer1 >> 1);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tstop = 0;\r\t\tgoto l2;\r\t}\r\tstop = null;\rl2:\t/* end stackIntegerValue: */;\r\trepl = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin stackIntegerValue: */\r\tintegerPointer2 = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer2 & 1)) {\r\t\treplStart = (integerPointer2 >> 1);\r\t\tgoto l3;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treplStart = 0;\r\t\tgoto l3;\r\t}\r\treplStart = null;\rl3:\t/* end stackIntegerValue: */;\r\tif (!(foo->successFlag)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif ((repl & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\thdr = longAt(array);\r\tarrayFmt = (((usqInt) hdr) >> 8) & 15;\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((hdr & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(array - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz = hdr & (SIZE_MASK);\r\t}\r\tsz -= hdr & (SIZE_4_BIT);\r\tif (arrayFmt <= 4) {\r\t\ttotalLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tgoto l4;\r\t}\r\tif (arrayFmt < 8) {\r\t\ttotalLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> 2;\r\t\tgoto l4;\r\t} else {\r\t\ttotalLength = (sz - (BASE_HEADER_SIZE)) - (arrayFmt & 3);\r\t\tgoto l4;\r\t}\rl4:\t/* end lengthOf:baseHeader:format: */;\r\t/* begin fixedFieldsOf:format:length: */\r\tif ((arrayFmt > 4) || (arrayFmt == 2)) {\r\t\tarrayInstSize = 0;\r\t\tgoto l7;\r\t}\r\tif (arrayFmt < 2) {\r\t\tarrayInstSize = totalLength;\r\t\tgoto l7;\r\t}\r\t/* begin fetchClassOf: */\r\tif ((array & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tclass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l6;\r\t}\r\tccIndex = (((usqInt) (longAt(array))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tclass = (longAt(array - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l6;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tclass = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l6;\r\t}\rl6:\t/* end fetchClassOf: */;\r\tclassFormat = (longAt((class + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1;\r\tarrayInstSize = (((((usqInt) classFormat) >> 11) & 192) + ((((usqInt) classFormat) >> 2) & 63)) - 1;\rl7:\t/* end fixedFieldsOf:format:length: */;\r\tif (!((start >= 1) && (((start - 1) <= stop) && ((stop + arrayInstSize) <= totalLength)))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\thdr = longAt(repl);\r\treplFmt = (((usqInt) hdr) >> 8) & 15;\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((hdr & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz1 = (longAt(repl - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz1 = hdr & (SIZE_MASK);\r\t}\r\tsz1 -= hdr & (SIZE_4_BIT);\r\tif (replFmt <= 4) {\r\t\ttotalLength = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tgoto l5;\r\t}\r\tif (replFmt < 8) {\r\t\ttotalLength = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> 2;\r\t\tgoto l5;\r\t} else {\r\t\ttotalLength = (sz1 - (BASE_HEADER_SIZE)) - (replFmt & 3);\r\t\tgoto l5;\r\t}\rl5:\t/* end lengthOf:baseHeader:format: */;\r\t/* begin fixedFieldsOf:format:length: */\r\tif ((replFmt > 4) || (replFmt == 2)) {\r\t\treplInstSize = 0;\r\t\tgoto l9;\r\t}\r\tif (replFmt < 2) {\r\t\treplInstSize = totalLength;\r\t\tgoto l9;\r\t}\r\t/* begin fetchClassOf: */\r\tif ((repl & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop11 = foo->specialObjectsOop;\r\t\tclass1 = longAt((oop11 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l8;\r\t}\r\tccIndex1 = (((usqInt) (longAt(repl))) >> 12) & 31;\r\tif (ccIndex1 == 0) {\r\t\tclass1 = (longAt(repl - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l8;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop31 = foo->specialObjectsOop;\r\t\toop21 = longAt((oop31 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tclass1 = longAt((oop21 + (BASE_HEADER_SIZE)) + ((ccIndex1 - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l8;\r\t}\rl8:\t/* end fetchClassOf: */;\r\tclassFormat1 = (longAt((class1 + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1;\r\treplInstSize = (((((usqInt) classFormat1) >> 11) & 192) + ((((usqInt) classFormat1) >> 2) & 63)) - 1;\rl9:\t/* end fixedFieldsOf:format:length: */;\r\tif (!((replStart >= 1) && ((((stop - start) + replStart) + replInstSize) <= totalLength))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif (arrayFmt < 8) {\r\t\tif (!(arrayFmt == replFmt)) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t} else {\r\t\tif (!((arrayFmt & 12) == (replFmt & 12))) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t}\r\r\t/* - 1 for 0-based access */\r\r\tsrcIndex = (replStart + replInstSize) - 1;\r\tif (arrayFmt <= 4) {\r\t\tfor (i = ((start + arrayInstSize) - 1); i <= ((stop + arrayInstSize) - 1); i += 1) {\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tvaluePointer = longAt((repl + (BASE_HEADER_SIZE)) + (srcIndex << (SHIFT_FOR_WORD)));\r\t\t\tif ((((usqInt) array)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(array, valuePointer);\r\t\t\t}\r\t\t\tlongAtput((array + (BASE_HEADER_SIZE)) + (i << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\tsrcIndex += 1;\r\t\t}\r\t} else {\r\t\tif (arrayFmt < 8) {\r\t\t\tfor (i = ((start + arrayInstSize) - 1); i <= ((stop + arrayInstSize) - 1); i += 1) {\r\t\t\t\t/* begin storeLong32:ofObject:withValue: */\r\t\t\t\tvalueWord = long32At((repl + (BASE_HEADER_SIZE)) + (srcIndex << 2));\r\t\t\t\tlong32Atput((array + (BASE_HEADER_SIZE)) + (i << 2), valueWord);\r\t\t\t\tsrcIndex += 1;\r\t\t\t}\r\t\t} else {\r\t\t\tfor (i = ((start + arrayInstSize) - 1); i <= ((stop + arrayInstSize) - 1); i += 1) {\r\t\t\t\tbyteAtput((array + (BASE_HEADER_SIZE)) + i, byteAt((repl + (BASE_HEADER_SIZE)) + srcIndex));\r\t\t\t\tsrcIndex += 1;\r\t\t\t}\r\t\t}\r\t}\r\t/* begin pop: */\r\tfoo->stackPointer -= foo->argumentCount * (BYTES_PER_WORD);\r}\r\rsqInt primitiveSubtract(void) {\rregister struct foo * foo = &fum;\r    sqInt integerResult;\r    sqInt sp;\r\r\t/* begin pop2AndPushIntegerIfOK: */\r\tintegerResult = (stackIntegerValue(1)) - (stackIntegerValue(0));\r\tif (foo->successFlag) {\r\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t(((((int) integerResult)) ^ ((((int) integerResult)) << 1)) >= 0)\r# else\r\t\t\t((integerResult >= -1073741824) && (integerResult <= 1073741823))\r# endif  // SQ_HOST32\r\t\t) {\r\t\t\t/* begin pop:thenPush: */\r\t\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), ((integerResult << 1) | 1));\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\tfoo->successFlag = 0;\r\t\t}\r\t}\r}\r\rsqInt primitiveSuspend(void) {\rregister struct foo * foo = &fum;\r    sqInt activeProc;\r    sqInt sp;\r    sqInt oop;\r    sqInt oop1;\r    sqInt oop2;\r\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\toop2 = foo->specialObjectsOop;\r\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\tactiveProc = longAt((oop + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)));\r\t/* begin success: */\r\tfoo->successFlag = ((longAt(foo->stackPointer)) == activeProc) && foo->successFlag;\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t\t/* begin push: */\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->nilObj);\r\t\tfoo->stackPointer = sp;\r\t\ttransferTo(wakeHighestPriority());\r\t}\r}\r\r\r/*\tPrimitive. Terminate up the context stack from the receiver up to but not including the argument, if previousContext is on my Context stack. Make previousContext my sender. This prim has to shadow the code in ContextPart>terminateTo: to be correct */\r\rsqInt primitiveTerminateTo(void) {\rregister struct foo * foo = &fum;\r    sqInt nilOop;\r    sqInt thisCntx;\r    sqInt aContext;\r    sqInt nextCntx;\r    sqInt currentCntx;\r    sqInt top;\r    sqInt top1;\r    sqInt sp;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\taContext = top;\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tthisCntx = top1;\r\tif (contexthasSender(thisCntx, aContext)) {\r\t\tnilOop = foo->nilObj;\r\t\tcurrentCntx = longAt((thisCntx + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\t\twhile (!(currentCntx == aContext)) {\r\t\t\tnextCntx = longAt((currentCntx + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tif ((((usqInt) currentCntx)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(currentCntx, nilOop);\r\t\t\t}\r\t\t\tlongAtput((currentCntx + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)), nilOop);\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tif ((((usqInt) currentCntx)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(currentCntx, nilOop);\r\t\t\t}\r\t\t\tlongAtput((currentCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), nilOop);\r\t\t\tcurrentCntx = nextCntx;\r\t\t}\r\t}\r\t/* begin storePointer:ofObject:withValue: */\r\tif ((((usqInt) thisCntx)) < (((usqInt) foo->youngStart))) {\r\t\tpossibleRootStoreIntovalue(thisCntx, aContext);\r\t}\r\tlongAtput((thisCntx + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)), aContext);\r\t/* begin push: */\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), thisCntx);\r\tfoo->stackPointer = sp;\r\treturn null;\r}\r\r\r/*\tReturn true if the host OS does support the given display depth. */\r\rsqInt primitiveTestDisplayDepth(void) {\rregister struct foo * foo = &fum;\r    sqInt okay;\r    sqInt bitsPerPixel;\r    sqInt sp;\r    sqInt sp1;\r    sqInt integerPointer;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tbitsPerPixel = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tbitsPerPixel = 0;\r\t\tgoto l1;\r\t}\rl1:\t/* end checkedIntegerValueOf: */;\r\tif (foo->successFlag) {\r\t\tokay = ioHasDisplayDepth(bitsPerPixel);\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\t/* begin pushBool: */\r\t\tif (okay) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t}\r}\r\rsqInt primitiveTimesTwoPower(void) {\rregister struct foo * foo = &fum;\r    sqInt arg;\r    double  rcvr;\r    sqInt integerPointer;\r    sqInt top;\r\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer = top;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\targ = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\targ = 0;\r\t\tgoto l1;\r\t}\rl1:\t/* end checkedIntegerValueOf: */;\r\trcvr = popFloat();\r\tif (foo->successFlag) {\r\t\tpushFloat(ldexp(rcvr, arg));\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t}\r}\r\rsqInt primitiveTruncated(void) {\rregister struct foo * foo = &fum;\r    double  trunc;\r    double  frac;\r    double  rcvr;\r    sqInt successValue;\r    sqInt sp;\r\r\trcvr = popFloat();\r\tif (foo->successFlag) {\r\t\tfrac = modf(rcvr, &trunc);\r\t\tflag(\"Dan\");\r\t\tsuccess((-1073741824.0 <= trunc) && (trunc <= 1073741823.0));\r\t}\r\tif (foo->successFlag) {\r\t\tpushInteger((sqInt) trunc);\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 1 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tPrimitive. Unload the module with the given name. */\r/*\tReloading of the module will happen *later* automatically, when a \r\tfunction from it is called. This is ensured by invalidating current sessionID. */\r\rsqInt primitiveUnloadModule(void) {\rregister struct foo * foo = &fum;\r    sqInt moduleName;\r\r\tif (!(foo->argumentCount == 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tmoduleName = longAt(foo->stackPointer);\r\tif ((moduleName & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif (!(((moduleName & 1) == 0) && (((((usqInt) (longAt(moduleName))) >> 8) & 15) >= 8))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif (!(ioUnloadModuleOfLength(oopForPointer(firstIndexableField(moduleName)), byteSizeOf(moduleName)))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tflushExternalPrimitives();\r\t/* begin forceInterruptCheck */\r\tfoo->interruptCheckCounter = -1000;\r\tfoo->nextPollTick = 0;\r\t/* begin pop: */\r\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r}\r\r\r/*\tAnswer an array with UTC mocroseconds since the Posix epoch and tthe\r\tcurrent seconds offset from GMT in the local time zone.\r\tThis is a named (not numbered) primitive in the null module (ie the VM) */\r\rEXPORT(sqInt) primitiveUtcWithOffset(void) {\rregister struct foo * foo = &fum;\r    sqInt resultArray;\r    sqLong clock;\r    int offset;\r    sqInt oop;\r    sqInt sp;\r\r\tif ((ioUtcWithOffset(&clock, &offset)) == -1) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin pushRemappableOop: */\r\toop = positive64BitIntegerFor(clock);\r\tfoo->remapBuffer[foo->remapBufferCount += 1] = oop;\r\tresultArray = instantiateClassindexableSize(splObj(ClassArray), 2);\r\tstObjectatput(resultArray, 1, popRemappableOop());\r\tstObjectatput(resultArray, 2, ((offset << 1) | 1));\r\t/* begin pop:thenPush: */\r\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), resultArray);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tBehaviour depends on argument count:\r\t\t0 args:\treturn an Array of VM parameter values;\r\t\t1 arg:\treturn the indicated VM parameter;\r\t\t2 args:\tset the VM indicated parameter.\r\tVM parameters are numbered as follows:\r\t\t1\tend of old-space (0-based, read-only)\r\t\t2\tend of young-space (read-only)\r\t\t3\tend of memory (read-only)\r\t\t4\tallocationCount (read-only)\r\t\t5\tallocations between GCs (read-write)\r\t\t6\tsurvivor count tenuring threshold (read-write)\r\t\t7\tfull GCs since startup (read-only)\r\t\t8\ttotal milliseconds in full GCs since startup (read-only)\r\t\t9\tincremental GCs since startup (read-only)\r\t\t10\ttotal milliseconds in incremental GCs since startup (read-only)\r\t\t11\ttenures of surving objects since startup (read-only)\r\t\t12-20 specific to the translating VM\r\t\t21\troot table size (read-only)\r\t\t22\troot table overflows since startup (read-only)\r\t\t23\tbytes of extra memory to reserve for VM buffers, plugins, etc.\r\t\t24\tmemory threshold above which shrinking object memory (rw)\r\t\t25\tmemory headroom when growing object memory (rw)\r\t\t26  interruptChecksEveryNms - force an ioProcessEvents every N milliseconds, in case the image  is not calling getNextEvent often (rw)\r\t\t27\tnumber of times mark loop iterated for current IGC/FGC (read-only) includes ALL marking\r\t\t28\tnumber of times sweep loop iterated  for current IGC/FGC (read-only)\r\t\t29\tnumber of times make forward loop iterated for current IGC/FGC (read-only)\r\t\t30\tnumber of times compact move loop iterated for current IGC/FGC (read-only)\r\t\t31\tnumber of grow memory requests (read-only)\r\t\t32\tnumber of shrink memory requests (read-only)\r\t\t33\tnumber of root table entries used for current IGC/FGC (read-only)\r\t\t34\tnumber of allocations done before current IGC/FGC (read-only)\r\t\t35\tnumber of survivor objects after current IGC/FGC (read-only)\r\t\t36  millisecond clock when current IGC/FGC completed (read-only)\r\t\t37  number of marked objects for Roots of the world, not including Root Table entries for current IGC/FGC (read-only)\r\t\t38  milliseconds taken by current IGC  (read-only)\r\t\t39  Number of finalization signals for Weak Objects pending when current IGC/FGC completed (read-only)\r\t\t40 BytesPerWord for this image\r\t\t\r\tNote: Thanks to Ian Piumarta for this primitive. */\r\rsqInt primitiveVMParameter(void) {\rregister struct foo * foo = &fum;\r    sqInt statIncrGCMSecsObj;\r    sqInt statFullGCMSecsObj;\r    sqInt mem;\r    sqInt arg;\r    sqInt result;\r    sqInt i;\r    sqInt statGCTimeObj;\r    sqInt statIGCDeltaTimeObj;\r    sqLong resultLargePositiveInteger;\r    sqInt paramsArraySize;\r    sqInt index;\r    sqInt oop;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r    sqInt oop4;\r    sqInt oop5;\r    sqInt oop6;\r    sqInt oop7;\r    sqInt oop8;\r    sqInt sp;\r    sqInt sp1;\r    sqInt oop9;\r    sqInt sp2;\r    sqInt sp3;\r    sqInt valuePointer;\r    sqInt valuePointer1;\r    sqInt valuePointer2;\r    sqInt valuePointer3;\r    sqInt valuePointer4;\r    sqInt valuePointer5;\r    sqInt valuePointer6;\r    sqInt valuePointer7;\r    sqInt valuePointer8;\r    sqInt valuePointer9;\r    sqInt valuePointer10;\r    sqInt valuePointer11;\r    sqInt valuePointer12;\r    sqInt valuePointer13;\r    sqInt valuePointer14;\r    sqInt valuePointer15;\r    sqInt valuePointer16;\r    sqInt valuePointer17;\r    sqInt valuePointer18;\r    sqInt valuePointer19;\r    sqInt valuePointer20;\r    sqInt valuePointer21;\r    sqInt valuePointer22;\r    sqInt valuePointer23;\r    sqInt valuePointer24;\r    sqInt valuePointer25;\r\r\tmem = memory;\r\tparamsArraySize = 40;\r\tif (foo->argumentCount == 0) {\r\t\tresult = instantiateClassindexableSize(fetchPointerofObject(ClassArray, foo->specialObjectsOop), paramsArraySize);\r\t\t/* begin pushRemappableOop: */\r\t\tfoo->remapBuffer[foo->remapBufferCount += 1] = result;\r\t\t/* begin pushRemappableOop: */\r\t\toop = positive64BitIntegerFor(foo->statFullGCMSecs);\r\t\tfoo->remapBuffer[foo->remapBufferCount += 1] = oop;\r\t\t/* begin pushRemappableOop: */\r\t\toop1 = positive64BitIntegerFor(foo->statIncrGCMSecs);\r\t\tfoo->remapBuffer[foo->remapBufferCount += 1] = oop1;\r\t\t/* begin pushRemappableOop: */\r\t\toop2 = positive64BitIntegerFor(foo->statGCTime);\r\t\tfoo->remapBuffer[foo->remapBufferCount += 1] = oop2;\r\t\t/* begin pushRemappableOop: */\r\t\toop3 = positive64BitIntegerFor(foo->statIGCDeltaTime);\r\t\tfoo->remapBuffer[foo->remapBufferCount += 1] = oop3;\r\t\t/* begin popRemappableOop */\r\t\toop4 = foo->remapBuffer[foo->remapBufferCount];\r\t\tfoo->remapBufferCount -= 1;\r\t\tstatIGCDeltaTimeObj = oop4;\r\t\t/* begin popRemappableOop */\r\t\toop5 = foo->remapBuffer[foo->remapBufferCount];\r\t\tfoo->remapBufferCount -= 1;\r\t\tstatGCTimeObj = oop5;\r\t\t/* begin popRemappableOop */\r\t\toop6 = foo->remapBuffer[foo->remapBufferCount];\r\t\tfoo->remapBufferCount -= 1;\r\t\tstatIncrGCMSecsObj = oop6;\r\t\t/* begin popRemappableOop */\r\t\toop7 = foo->remapBuffer[foo->remapBufferCount];\r\t\tfoo->remapBufferCount -= 1;\r\t\tstatFullGCMSecsObj = oop7;\r\t\t/* begin popRemappableOop */\r\t\toop8 = foo->remapBuffer[foo->remapBufferCount];\r\t\tfoo->remapBufferCount -= 1;\r\t\tresult = oop8;\r\t\tfor (i = 0; i <= (paramsArraySize - 1); i += 1) {\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(result, ConstZero);\r\t\t\t}\r\t\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (i << (SHIFT_FOR_WORD)), ConstZero);\r\t\t}\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer = (((foo->youngStart - mem) << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)), valuePointer);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer1 = (((foo->freeBlock - mem) << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer1);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (1 << (SHIFT_FOR_WORD)), valuePointer1);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer2 = (((foo->endOfMemory - mem) << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer2);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (2 << (SHIFT_FOR_WORD)), valuePointer2);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer3 = ((foo->allocationCount << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer3);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (3 << (SHIFT_FOR_WORD)), valuePointer3);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer4 = ((foo->allocationsBetweenGCs << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer4);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (4 << (SHIFT_FOR_WORD)), valuePointer4);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer5 = ((foo->tenuringThreshold << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer5);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (5 << (SHIFT_FOR_WORD)), valuePointer5);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer6 = ((foo->statFullGCs << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer6);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (6 << (SHIFT_FOR_WORD)), valuePointer6);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, statFullGCMSecsObj);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (7 << (SHIFT_FOR_WORD)), statFullGCMSecsObj);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer7 = ((foo->statIncrGCs << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer7);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (8 << (SHIFT_FOR_WORD)), valuePointer7);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, statIncrGCMSecsObj);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (9 << (SHIFT_FOR_WORD)), statIncrGCMSecsObj);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer8 = ((foo->statTenures << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer8);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (10 << (SHIFT_FOR_WORD)), valuePointer8);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer9 = ((foo->rootTableCount << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer9);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (20 << (SHIFT_FOR_WORD)), valuePointer9);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer10 = ((foo->statRootTableOverflows << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer10);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (21 << (SHIFT_FOR_WORD)), valuePointer10);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer11 = ((extraVMMemory << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer11);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (22 << (SHIFT_FOR_WORD)), valuePointer11);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer12 = ((foo->shrinkThreshold << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer12);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (23 << (SHIFT_FOR_WORD)), valuePointer12);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer13 = ((foo->growHeadroom << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer13);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (24 << (SHIFT_FOR_WORD)), valuePointer13);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer14 = ((foo->interruptChecksEveryNms << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer14);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (25 << (SHIFT_FOR_WORD)), valuePointer14);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer15 = ((foo->statMarkCount << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer15);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (26 << (SHIFT_FOR_WORD)), valuePointer15);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer16 = ((foo->statSweepCount << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer16);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (27 << (SHIFT_FOR_WORD)), valuePointer16);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer17 = ((foo->statMkFwdCount << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer17);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (28 << (SHIFT_FOR_WORD)), valuePointer17);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer18 = ((foo->statCompMoveCount << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer18);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (29 << (SHIFT_FOR_WORD)), valuePointer18);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer19 = ((foo->statGrowMemory << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer19);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (30 << (SHIFT_FOR_WORD)), valuePointer19);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer20 = ((foo->statShrinkMemory << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer20);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (31 << (SHIFT_FOR_WORD)), valuePointer20);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer21 = ((foo->statRootTableCount << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer21);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (32 << (SHIFT_FOR_WORD)), valuePointer21);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer22 = ((foo->statAllocationCount << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer22);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (33 << (SHIFT_FOR_WORD)), valuePointer22);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer23 = ((foo->statSurvivorCount << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer23);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (34 << (SHIFT_FOR_WORD)), valuePointer23);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, statGCTimeObj);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (35 << (SHIFT_FOR_WORD)), statGCTimeObj);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer24 = ((foo->statSpecialMarkCount << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer24);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (36 << (SHIFT_FOR_WORD)), valuePointer24);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, statIGCDeltaTimeObj);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (37 << (SHIFT_FOR_WORD)), statIGCDeltaTimeObj);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer25 = ((foo->statpendingFinalizationSignals << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer25);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (38 << (SHIFT_FOR_WORD)), valuePointer25);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, (((BYTES_PER_WORD) << 1) | 1));\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (39 << (SHIFT_FOR_WORD)), (((BYTES_PER_WORD) << 1) | 1));\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), result);\r\t\tfoo->stackPointer = sp;\r\t\treturn null;\r\t}\r\targ = longAt(foo->stackPointer);\r\tif (!((arg & 1))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\targ = (arg >> 1);\r\tresultLargePositiveInteger = -1;\r\tif (foo->argumentCount == 1) {\r\t\tif ((arg < 1) || (arg > paramsArraySize)) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t\tif (arg == 1) {\r\t\t\tresult = foo->youngStart - mem;\r\t\t}\r\t\tif (arg == 2) {\r\t\t\tresult = foo->freeBlock - mem;\r\t\t}\r\t\tif (arg == 3) {\r\t\t\tresult = foo->endOfMemory - mem;\r\t\t}\r\t\tif (arg == 4) {\r\t\t\tresult = foo->allocationCount;\r\t\t}\r\t\tif (arg == 5) {\r\t\t\tresult = foo->allocationsBetweenGCs;\r\t\t}\r\t\tif (arg == 6) {\r\t\t\tresult = foo->tenuringThreshold;\r\t\t}\r\t\tif (arg == 7) {\r\t\t\tresult = foo->statFullGCs;\r\t\t}\r\t\tif (arg == 8) {\r\t\t\tresultLargePositiveInteger = foo->statFullGCMSecs;\r\t\t}\r\t\tif (arg == 9) {\r\t\t\tresult = foo->statIncrGCs;\r\t\t}\r\t\tif (arg == 10) {\r\t\t\tresultLargePositiveInteger = foo->statIncrGCMSecs;\r\t\t}\r\t\tif (arg == 11) {\r\t\t\tresult = foo->statTenures;\r\t\t}\r\t\tif ((arg >= 12) && (arg <= 20)) {\r\t\t\tresult = 0;\r\t\t}\r\t\tif (arg == 21) {\r\t\t\tresult = foo->rootTableCount;\r\t\t}\r\t\tif (arg == 22) {\r\t\t\tresult = foo->statRootTableOverflows;\r\t\t}\r\t\tif (arg == 23) {\r\t\t\tresult = extraVMMemory;\r\t\t}\r\t\tif (arg == 24) {\r\t\t\tresult = foo->shrinkThreshold;\r\t\t}\r\t\tif (arg == 25) {\r\t\t\tresult = foo->growHeadroom;\r\t\t}\r\t\tif (arg == 26) {\r\t\t\tresult = foo->interruptChecksEveryNms;\r\t\t}\r\t\tif (arg == 27) {\r\t\t\tresult = foo->statMarkCount;\r\t\t}\r\t\tif (arg == 28) {\r\t\t\tresult = foo->statSweepCount;\r\t\t}\r\t\tif (arg == 29) {\r\t\t\tresult = foo->statMkFwdCount;\r\t\t}\r\t\tif (arg == 30) {\r\t\t\tresult = foo->statCompMoveCount;\r\t\t}\r\t\tif (arg == 31) {\r\t\t\tresult = foo->statGrowMemory;\r\t\t}\r\t\tif (arg == 32) {\r\t\t\tresult = foo->statShrinkMemory;\r\t\t}\r\t\tif (arg == 33) {\r\t\t\tresult = foo->statRootTableCount;\r\t\t}\r\t\tif (arg == 34) {\r\t\t\tresult = foo->statAllocationCount;\r\t\t}\r\t\tif (arg == 35) {\r\t\t\tresult = foo->statSurvivorCount;\r\t\t}\r\t\tif (arg == 36) {\r\t\t\tresultLargePositiveInteger = foo->statGCTime;\r\t\t}\r\t\tif (arg == 37) {\r\t\t\tresult = foo->statSpecialMarkCount;\r\t\t}\r\t\tif (arg == 38) {\r\t\t\tresultLargePositiveInteger = foo->statIGCDeltaTime;\r\t\t}\r\t\tif (arg == 39) {\r\t\t\tresult = foo->statpendingFinalizationSignals;\r\t\t}\r\t\tif (arg == 40) {\r\t\t\tresult = BYTES_PER_WORD;\r\t\t}\r\t\tif (resultLargePositiveInteger == -1) {\r\t\t\t/* begin pop:thenPush: */\r\t\t\tlongAtput(sp1 = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), ((result << 1) | 1));\r\t\t\tfoo->stackPointer = sp1;\r\t\t} else {\r\t\t\t/* begin pop:thenPush: */\r\t\t\toop9 = positive64BitIntegerFor(resultLargePositiveInteger);\r\t\t\tlongAtput(sp2 = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), oop9);\r\t\t\tfoo->stackPointer = sp2;\r\t\t}\r\t\treturn null;\r\t}\r\tif (!(foo->argumentCount == 2)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tindex = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\tif (!((index & 1))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tindex = (index >> 1);\r\tif (index <= 0) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tfoo->successFlag = 0;\r\tif (index == 5) {\r\t\tresult = foo->allocationsBetweenGCs;\r\t\tfoo->allocationsBetweenGCs = arg;\r\t\tfoo->successFlag = 1;\r\t}\r\tif (index == 6) {\r\t\tresult = foo->tenuringThreshold;\r\t\tfoo->tenuringThreshold = arg;\r\t\tfoo->successFlag = 1;\r\t}\r\tif (index == 23) {\r\t\tresult = extraVMMemory;\r\t\textraVMMemory = arg;\r\t\tfoo->successFlag = 1;\r\t}\r\tif (index == 24) {\r\t\tresult = foo->shrinkThreshold;\r\t\tif (arg > 0) {\r\t\t\tfoo->shrinkThreshold = arg;\r\t\t\tfoo->successFlag = 1;\r\t\t}\r\t}\r\tif (index == 25) {\r\t\tresult = foo->growHeadroom;\r\t\tif (arg > 0) {\r\t\t\tfoo->growHeadroom = arg;\r\t\t\tfoo->successFlag = 1;\r\t\t}\r\t}\r\tif (index == 26) {\r\t\tif (arg > 1) {\r\t\t\tresult = foo->interruptChecksEveryNms;\r\t\t\tfoo->interruptChecksEveryNms = arg;\r\t\t\tfoo->successFlag = 1;\r\t\t}\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp3 = foo->stackPointer - ((3 - 1) * (BYTES_PER_WORD)), ((result << 1) | 1));\r\t\tfoo->stackPointer = sp3;\r\t\treturn null;\r\t}\r\t/* begin primitiveFail */\r\tfoo->successFlag = 0;\r}\r\r\r/*\tReturn a string containing the path name of VM's directory. */\r\rsqInt primitiveVMPath(void) {\rregister struct foo * foo = &fum;\r    sqInt sz;\r    sqInt s;\r    sqInt sp;\r\r\tsz = vmPathSize();\r\ts = instantiateClassindexableSize(fetchPointerofObject(ClassString, foo->specialObjectsOop), sz);\r\tvmPathGetLength(s + (BASE_HEADER_SIZE), sz);\r\t/* begin pop:thenPush: */\r\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), s);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tAnswer a string corresponding to the version of virtual machine. This\r\trepresents the version level of the Smalltalk source code (interpreter and various\r\tplugins) that is translated to C by a CCodeGenerator,  in addition to the external\r\tplatform source code, typically written in C and managed separately for each platform.\r\tBy convention, this is a string composed of the interpreter source version and the\r\tplatform source version, e.g. '4.0.2-2172'.\r\t\r\tThis is a named (not numbered) primitive in the null module (ie the VM) */\r\rEXPORT(sqInt) primitiveVMVersion(void) {\rregister struct foo * foo = &fum;\r    void * p;\r    sqInt versionString;\r    sqInt len;\r    sqInt sp;\r\r\t\r# ifdef VM_VERSION  // version level of interpreter plus platform support code\r\tlen = strlen(VM_VERSION);\r\tversionString = instantiateClassindexableSize(fetchPointerofObject(ClassString, foo->specialObjectsOop), len);\r\t/* begin arrayValueOf: */\r\tif ((!((versionString & 1))) && (((versionString & 1) == 0) && (isWordsOrBytesNonInt(versionString)))) {\r\t\tp = pointerForOop(versionString + (BASE_HEADER_SIZE));\r\t\tgoto l1;\r\t}\r\t/* begin primitiveFail */\r\tfoo->successFlag = 0;\rl1:\t/* end arrayValueOf: */;\r\tstrncpy(p, VM_VERSION, len);\r# else\r\t/* begin primitiveFail */\r\tfoo->successFlag = 0;\r\treturn null;\r# endif  // VM_VERSION\r\t\r\t/* begin pop:thenPush: */\r\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), versionString);\r\tfoo->stackPointer = sp;\r}\r\rsqInt primitiveValue(void) {\rregister struct foo * foo = &fum;\r    sqInt blockContext;\r    sqInt blockArgumentCount;\r    sqInt initialIP;\r    sqInt count;\r    sqInt firstFrom;\r    sqInt fromOop;\r    sqInt fromIndex;\r    sqInt lastFrom;\r    sqInt toIndex;\r    sqInt valuePointer;\r    sqInt localArgCount;\r    sqInt successValue;\r    sqInt value;\r    sqInt tmp;\r    sqInt activeCntx;\r    sqInt valuePointer2;\r    sqInt valuePointer1;\r\r\tblockContext = longAt(foo->stackPointer - (foo->argumentCount * (BYTES_PER_WORD)));\r\t/* begin argumentCountOfBlock: */\r\tlocalArgCount = longAt((blockContext + (BASE_HEADER_SIZE)) + (BlockArgumentCountIndex << (SHIFT_FOR_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((localArgCount & 1)) {\r\t\tblockArgumentCount = (localArgCount >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tblockArgumentCount = 0;\r\t\tgoto l1;\r\t}\rl1:\t/* end checkedIntegerValueOf: */;\r\t/* begin success: */\r\tsuccessValue = (foo->argumentCount == blockArgumentCount) && ((longAt((blockContext + (BASE_HEADER_SIZE)) + (CallerIndex << (SHIFT_FOR_WORD)))) == foo->nilObj);\r\tfoo->successFlag = successValue && foo->successFlag;\r\tif (foo->successFlag) {\r\t\t/* begin transfer:fromIndex:ofObject:toIndex:ofObject: */\r\t\tcount = foo->argumentCount;\r\t\tfirstFrom = ((((usqInt) ((foo->stackPointer - foo->activeContext) - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD)) - foo->argumentCount) + 1;\r\t\tfromOop = foo->activeContext;\r\t\tflag(\"Dan\");\r\t\tfromIndex = fromOop + (firstFrom * (BYTES_PER_WORD));\r\t\ttoIndex = blockContext + (TempFrameStart * (BYTES_PER_WORD));\r\t\tlastFrom = fromIndex + (count * (BYTES_PER_WORD));\r\t\twhile ((((usqInt) fromIndex)) < (((usqInt) lastFrom))) {\r\t\t\tfromIndex += BYTES_PER_WORD;\r\t\t\ttoIndex += BYTES_PER_WORD;\r\t\t\tlongAtput(toIndex, longAt(fromIndex));\r\t\t}\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= (foo->argumentCount + 1) * (BYTES_PER_WORD);\r\t\tinitialIP = longAt((blockContext + (BASE_HEADER_SIZE)) + (InitialIPIndex << (SHIFT_FOR_WORD)));\r\t\tlongAtput((blockContext + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), initialIP);\r\t\t/* begin storeStackPointerValue:inContext: */\r\t\tvalue = foo->argumentCount;\r\t\tlongAtput((blockContext + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)), ((value << 1) | 1));\r\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\tvaluePointer = foo->activeContext;\r\t\tlongAtput((blockContext + (BASE_HEADER_SIZE)) + (CallerIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t/* begin newActiveContext: */\r\t\t/* begin storeContextRegisters: */\r\t\tactiveCntx = foo->activeContext;\r\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\tvaluePointer2 = ((((foo->instructionPointer - foo->method) - ((BASE_HEADER_SIZE) - 2)) << 1) | 1);\r\t\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), valuePointer2);\r\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\tvaluePointer1 = (((((((usqInt) ((foo->stackPointer - foo->activeContext) - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD)) - TempFrameStart) + 1) << 1) | 1);\r\t\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\t\tif ((((usqInt) blockContext)) < (((usqInt) foo->youngStart))) {\r\t\t\tbeRootIfOld(blockContext);\r\t\t}\r\t\tfoo->activeContext = blockContext;\r\t\t/* begin fetchContextRegisters: */\r\t\ttmp = longAt((blockContext + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\t\tif ((tmp & 1)) {\r\t\t\ttmp = longAt((blockContext + (BASE_HEADER_SIZE)) + (HomeIndex << (SHIFT_FOR_WORD)));\r\t\t\tif ((((usqInt) tmp)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tbeRootIfOld(tmp);\r\t\t\t}\r\t\t} else {\r\t\t\ttmp = blockContext;\r\t\t}\r\t\tfoo->theHomeContext = tmp;\r\t\tfoo->receiver = longAt((tmp + (BASE_HEADER_SIZE)) + (ReceiverIndex << (SHIFT_FOR_WORD)));\r\t\tfoo->method = longAt((tmp + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\t\ttmp = ((longAt((blockContext + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\t\tfoo->instructionPointer = ((foo->method + tmp) + (BASE_HEADER_SIZE)) - 2;\r\t\ttmp = ((longAt((blockContext + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\t\tfoo->stackPointer = (blockContext + (BASE_HEADER_SIZE)) + (((TempFrameStart + tmp) - 1) * (BYTES_PER_WORD));\r\t}\r}\r\r\r/*\tThe only purpose of this primitive is to indicate that the new EH mechanisms are supported. */\r\rsqInt primitiveValueUninterruptably(void) {\r\treturn primitiveValue();\r}\r\rsqInt primitiveValueWithArgs(void) {\rregister struct foo * foo = &fum;\r    sqInt arrayArgumentCount;\r    sqInt blockContext;\r    sqInt blockArgumentCount;\r    sqInt initialIP;\r    sqInt argumentArray;\r    sqInt sz;\r    sqInt successValue;\r    sqInt fromIndex;\r    sqInt lastFrom;\r    sqInt toIndex;\r    sqInt valuePointer;\r    sqInt top;\r    sqInt top1;\r    sqInt localArgCount;\r    sqInt header;\r    sqInt tmp;\r    sqInt activeCntx;\r    sqInt valuePointer2;\r    sqInt valuePointer1;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\targumentArray = top;\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tblockContext = top1;\r\t/* begin argumentCountOfBlock: */\r\tlocalArgCount = longAt((blockContext + (BASE_HEADER_SIZE)) + (BlockArgumentCountIndex << (SHIFT_FOR_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((localArgCount & 1)) {\r\t\tblockArgumentCount = (localArgCount >> 1);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tblockArgumentCount = 0;\r\t\tgoto l2;\r\t}\rl2:\t/* end checkedIntegerValueOf: */;\r\tif (!(((argumentArray & 1) == 0) && (((((usqInt) (longAt(argumentArray))) >> 8) & 15) == 2))) {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin fetchWordLengthOf: */\r\t\t/* begin sizeBitsOf: */\r\t\theader = longAt(argumentArray);\r\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(argumentArray - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\tsz = header & (SIZE_MASK);\r\t\t\tgoto l1;\r\t\t}\r\tl1:\t/* end sizeBitsOf: */;\r\t\tarrayArgumentCount = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\t/* begin success: */\r\t\tsuccessValue = (arrayArgumentCount == blockArgumentCount) && ((longAt((blockContext + (BASE_HEADER_SIZE)) + (CallerIndex << (SHIFT_FOR_WORD)))) == foo->nilObj);\r\t\tfoo->successFlag = successValue && foo->successFlag;\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin transfer:fromIndex:ofObject:toIndex:ofObject: */\r\t\tflag(\"Dan\");\r\t\tfromIndex = argumentArray + (0 * (BYTES_PER_WORD));\r\t\ttoIndex = blockContext + (TempFrameStart * (BYTES_PER_WORD));\r\t\tlastFrom = fromIndex + (arrayArgumentCount * (BYTES_PER_WORD));\r\t\twhile ((((usqInt) fromIndex)) < (((usqInt) lastFrom))) {\r\t\t\tfromIndex += BYTES_PER_WORD;\r\t\t\ttoIndex += BYTES_PER_WORD;\r\t\t\tlongAtput(toIndex, longAt(fromIndex));\r\t\t}\r\t\tinitialIP = longAt((blockContext + (BASE_HEADER_SIZE)) + (InitialIPIndex << (SHIFT_FOR_WORD)));\r\t\tlongAtput((blockContext + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), initialIP);\r\t\t/* begin storeStackPointerValue:inContext: */\r\t\tlongAtput((blockContext + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)), ((arrayArgumentCount << 1) | 1));\r\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\tvaluePointer = foo->activeContext;\r\t\tlongAtput((blockContext + (BASE_HEADER_SIZE)) + (CallerIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t/* begin newActiveContext: */\r\t\t/* begin storeContextRegisters: */\r\t\tactiveCntx = foo->activeContext;\r\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\tvaluePointer2 = ((((foo->instructionPointer - foo->method) - ((BASE_HEADER_SIZE) - 2)) << 1) | 1);\r\t\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), valuePointer2);\r\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\tvaluePointer1 = (((((((usqInt) ((foo->stackPointer - foo->activeContext) - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD)) - TempFrameStart) + 1) << 1) | 1);\r\t\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\t\tif ((((usqInt) blockContext)) < (((usqInt) foo->youngStart))) {\r\t\t\tbeRootIfOld(blockContext);\r\t\t}\r\t\tfoo->activeContext = blockContext;\r\t\t/* begin fetchContextRegisters: */\r\t\ttmp = longAt((blockContext + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\t\tif ((tmp & 1)) {\r\t\t\ttmp = longAt((blockContext + (BASE_HEADER_SIZE)) + (HomeIndex << (SHIFT_FOR_WORD)));\r\t\t\tif ((((usqInt) tmp)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tbeRootIfOld(tmp);\r\t\t\t}\r\t\t} else {\r\t\t\ttmp = blockContext;\r\t\t}\r\t\tfoo->theHomeContext = tmp;\r\t\tfoo->receiver = longAt((tmp + (BASE_HEADER_SIZE)) + (ReceiverIndex << (SHIFT_FOR_WORD)));\r\t\tfoo->method = longAt((tmp + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\t\ttmp = ((longAt((blockContext + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\t\tfoo->instructionPointer = ((foo->method + tmp) + (BASE_HEADER_SIZE)) - 2;\r\t\ttmp = ((longAt((blockContext + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\t\tfoo->stackPointer = (blockContext + (BASE_HEADER_SIZE)) + (((TempFrameStart + tmp) - 1) * (BYTES_PER_WORD));\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t}\r}\r\rsqInt primitiveWait(void) {\rregister struct foo * foo = &fum;\r    sqInt activeProc;\r    sqInt excessSignals;\r    sqInt sema;\r    sqInt oop;\r    sqInt oop1;\r    sqInt lastLink;\r    sqInt oop2;\r    sqInt classOop;\r    sqInt cl;\r    sqInt ccIndex;\r    sqInt oop11;\r    sqInt oop21;\r    sqInt oop3;\r\r\r\t/* rcvr */\r\r\tsema = longAt(foo->stackPointer);\r\t/* begin assertClassOf:is: */\r\t/* begin fetchPointer:ofObject: */\r\toop3 = foo->specialObjectsOop;\r\tclassOop = longAt((oop3 + (BASE_HEADER_SIZE)) + (ClassSemaphore << (SHIFT_FOR_WORD)));\r\tif ((sema & 1)) {\r\t\tfoo->successFlag = 0;\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(sema))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tcl = (longAt(sema - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop21 = foo->specialObjectsOop;\r\t\toop11 = longAt((oop21 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tcl = longAt((oop11 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t}\r\t/* begin success: */\r\tfoo->successFlag = (cl == classOop) && foo->successFlag;\rl1:\t/* end assertClassOf:is: */;\r\tif (foo->successFlag) {\r\t\texcessSignals = fetchIntegerofObject(ExcessSignalsIndex, sema);\r\t\tif (excessSignals > 0) {\r\t\t\t/* begin storeInteger:ofObject:withValue: */\r\t\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t\t(((((int) (excessSignals - 1))) ^ ((((int) (excessSignals - 1))) << 1)) >= 0)\r# else\r\t\t\t\t(((excessSignals - 1) >= -1073741824) && ((excessSignals - 1) <= 1073741823))\r# endif  // SQ_HOST32\r\t\t\t) {\r\t\t\t\tlongAtput((sema + (BASE_HEADER_SIZE)) + (ExcessSignalsIndex << (SHIFT_FOR_WORD)), (((excessSignals - 1) << 1) | 1));\r\t\t\t} else {\r\t\t\t\t/* begin primitiveFail */\r\t\t\t\tfoo->successFlag = 0;\r\t\t\t}\r\t\t} else {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop2 = foo->specialObjectsOop;\r\t\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\tactiveProc = longAt((oop + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)));\r\t\t\t/* begin addLastLink:toList: */\r\t\t\tif ((longAt((sema + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)))) == foo->nilObj) {\r\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\tif ((((usqInt) sema)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\tpossibleRootStoreIntovalue(sema, activeProc);\r\t\t\t\t}\r\t\t\t\tlongAtput((sema + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)), activeProc);\r\t\t\t} else {\r\t\t\t\tlastLink = longAt((sema + (BASE_HEADER_SIZE)) + (LastLinkIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\tif ((((usqInt) lastLink)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\tpossibleRootStoreIntovalue(lastLink, activeProc);\r\t\t\t\t}\r\t\t\t\tlongAtput((lastLink + (BASE_HEADER_SIZE)) + (NextLinkIndex << (SHIFT_FOR_WORD)), activeProc);\r\t\t\t}\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tif ((((usqInt) sema)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(sema, activeProc);\r\t\t\t}\r\t\t\tlongAtput((sema + (BASE_HEADER_SIZE)) + (LastLinkIndex << (SHIFT_FOR_WORD)), activeProc);\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tif ((((usqInt) activeProc)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(activeProc, sema);\r\t\t\t}\r\t\t\tlongAtput((activeProc + (BASE_HEADER_SIZE)) + (MyListIndex << (SHIFT_FOR_WORD)), sema);\r\t\t\ttransferTo(wakeHighestPriority());\r\t\t}\r\t}\r}\r\r\r/*\tprimitively do the equivalent of Process>yield */\r\rsqInt primitiveYield(void) {\rregister struct foo * foo = &fum;\r    sqInt processLists;\r    sqInt activeProc;\r    sqInt priority;\r    sqInt processList;\r    sqInt oop;\r    sqInt oop1;\r    sqInt lastLink;\r    sqInt oop2;\r    sqInt oop3;\r    sqInt oop4;\r    sqInt oop5;\r\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\toop4 = foo->specialObjectsOop;\r\toop2 = longAt((oop4 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\toop = longAt((oop2 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\tactiveProc = longAt((oop + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)));\r\tpriority = ((longAt((activeProc + (BASE_HEADER_SIZE)) + (PriorityIndex << (SHIFT_FOR_WORD)))) >> 1);\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\toop5 = foo->specialObjectsOop;\r\toop3 = longAt((oop5 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\toop1 = longAt((oop3 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\tprocessLists = longAt((oop1 + (BASE_HEADER_SIZE)) + (ProcessListsIndex << (SHIFT_FOR_WORD)));\r\tprocessList = longAt((processLists + (BASE_HEADER_SIZE)) + ((priority - 1) << (SHIFT_FOR_WORD)));\r\tif (!((longAt((processList + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)))) == foo->nilObj)) {\r\t\t/* begin addLastLink:toList: */\r\t\tif ((longAt((processList + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)))) == foo->nilObj) {\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tif ((((usqInt) processList)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(processList, activeProc);\r\t\t\t}\r\t\t\tlongAtput((processList + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)), activeProc);\r\t\t} else {\r\t\t\tlastLink = longAt((processList + (BASE_HEADER_SIZE)) + (LastLinkIndex << (SHIFT_FOR_WORD)));\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tif ((((usqInt) lastLink)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(lastLink, activeProc);\r\t\t\t}\r\t\t\tlongAtput((lastLink + (BASE_HEADER_SIZE)) + (NextLinkIndex << (SHIFT_FOR_WORD)), activeProc);\r\t\t}\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tif ((((usqInt) processList)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(processList, activeProc);\r\t\t}\r\t\tlongAtput((processList + (BASE_HEADER_SIZE)) + (LastLinkIndex << (SHIFT_FOR_WORD)), activeProc);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tif ((((usqInt) activeProc)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(activeProc, processList);\r\t\t}\r\t\tlongAtput((activeProc + (BASE_HEADER_SIZE)) + (MyListIndex << (SHIFT_FOR_WORD)), processList);\r\t\ttransferTo(wakeHighestPriority());\r\t}\r}\r\r\r/*\tFor testing in Smalltalk, this method should be overridden in a subclass. */\r\rsqInt print(char * s) {\r\tprintf(\"%s\", s);\r}\r\r\r/*\tPrint all the stacks of all running processes, including those that are currently suspended. */\r\rsqInt printAllStacks(void) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r    sqInt proc;\r    sqInt ctx;\r    sqInt sz;\r    sqInt header;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\toop3 = foo->specialObjectsOop;\r\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\tproc = longAt((oop1 + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)));\r\tprintNameOfClasscount(fetchClassOf(proc), 5);\r\t/* begin cr */\r\tprintf(\"\\n\");\r\tprintCallStackOf(foo->activeContext);\r\toop = memory + (foo->headerTypeBytes[(longAt(memory)) & TypeMask]);\r\twhile ((((usqInt) oop)) < (((usqInt) foo->endOfMemory))) {\r\t\tif ((fetchClassOf(oop)) == (fetchPointerofObject(ClassSemaphore, foo->specialObjectsOop))) {\r\t\t\t/* begin cr */\r\t\t\tprintf(\"\\n\");\r\t\t\tproc = longAt((oop + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)));\r\t\t\twhile (!(proc == foo->nilObj)) {\r\t\t\t\tprintNameOfClasscount(fetchClassOf(proc), 5);\r\t\t\t\t/* begin cr */\r\t\t\t\tprintf(\"\\n\");\r\t\t\t\tctx = longAt((proc + (BASE_HEADER_SIZE)) + (SuspendedContextIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tif (!(ctx == foo->nilObj)) {\r\t\t\t\t\tprintCallStackOf(ctx);\r\t\t\t\t}\r\t\t\t\tproc = longAt((proc + (BASE_HEADER_SIZE)) + (NextLinkIndex << (SHIFT_FOR_WORD)));\r\t\t\t}\r\t\t}\r\t\t/* begin objectAfter: */\r\t\tif (DoAssertionChecks) {\r\t\t\tif ((((usqInt) oop)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t}\r\t\t}\r\t\tif (((longAt(oop)) & TypeMask) == HeaderTypeFree) {\r\t\t\tsz = (longAt(oop)) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader = longAt(oop);\r\t\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tsz = header & (SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\tl1:\t/* end sizeBitsOf: */;\r\t\t}\r\t\toop = (oop + sz) + (foo->headerTypeBytes[(longAt(oop + sz)) & TypeMask]);\r\t}\r}\r\rsqInt printCallStack(void) {\r\treturn printCallStackOf(foo->activeContext);\r}\r\rsqInt printCallStackOf(sqInt aContext) {\rregister struct foo * foo = &fum;\r    sqInt methClass;\r    sqInt methodSel;\r    sqInt home;\r    sqInt message;\r    sqInt ctxt;\r    sqInt meth;\r    sqInt rcvr;\r    sqInt done;\r    sqInt classDict;\r    sqInt classDictSize;\r    sqInt i;\r    sqInt currClass;\r    sqInt methodArray;\r    sqInt sz;\r    sqInt ccIndex;\r    sqInt oop;\r    sqInt oop1;\r    sqInt header;\r    sqInt oop2;\r    sqInt meth1;\r    sqInt rcvr1;\r    sqInt done1;\r    sqInt classDict1;\r    sqInt classDictSize1;\r    sqInt i1;\r    sqInt currClass1;\r    sqInt methodArray1;\r    sqInt sz1;\r    sqInt ccIndex2;\r    sqInt ccIndex1;\r    sqInt oop6;\r    sqInt oop11;\r    sqInt header1;\r    sqInt oop21;\r    sqInt oop3;\r    sqInt oop4;\r    sqInt oop5;\r\r\tctxt = aContext;\r\twhile (!(ctxt == foo->nilObj)) {\r\t\tif ((fetchClassOf(ctxt)) == (fetchPointerofObject(ClassBlockContext, foo->specialObjectsOop))) {\r\t\t\thome = longAt((ctxt + (BASE_HEADER_SIZE)) + (HomeIndex << (SHIFT_FOR_WORD)));\r\t\t} else {\r\t\t\thome = ctxt;\r\t\t}\r\t\t/* begin findClassOfMethod:forReceiver: */\r\t\tmeth1 = longAt((home + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\t\trcvr1 = longAt((home + (BASE_HEADER_SIZE)) + (ReceiverIndex << (SHIFT_FOR_WORD)));\r\t\t/* begin fetchClassOf: */\r\t\tif ((rcvr1 & 1)) {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop6 = foo->specialObjectsOop;\r\t\t\tcurrClass1 = longAt((oop6 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\t\tgoto l4;\r\t\t}\r\t\tccIndex2 = (((usqInt) (longAt(rcvr1))) >> 12) & 31;\r\t\tif (ccIndex2 == 0) {\r\t\t\tcurrClass1 = (longAt(rcvr1 - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\t\tgoto l4;\r\t\t} else {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop4 = foo->specialObjectsOop;\r\t\t\toop11 = longAt((oop4 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\t\tcurrClass1 = longAt((oop11 + (BASE_HEADER_SIZE)) + ((ccIndex2 - 1) << (SHIFT_FOR_WORD)));\r\t\t\tgoto l4;\r\t\t}\r\tl4:\t/* end fetchClassOf: */;\r\t\tdone1 = 0;\r\t\twhile (!(done1)) {\r\t\t\tclassDict1 = longAt((currClass1 + (BASE_HEADER_SIZE)) + (MessageDictionaryIndex << (SHIFT_FOR_WORD)));\r\t\t\t/* begin fetchWordLengthOf: */\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader1 = longAt(classDict1);\r\t\t\tif ((header1 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz1 = (longAt(classDict1 - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l5;\r\t\t\t} else {\r\t\t\t\tsz1 = header1 & (SIZE_MASK);\r\t\t\t\tgoto l5;\r\t\t\t}\r\t\tl5:\t/* end sizeBitsOf: */;\r\t\t\tclassDictSize1 = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\t\tmethodArray1 = longAt((classDict1 + (BASE_HEADER_SIZE)) + (MethodArrayIndex << (SHIFT_FOR_WORD)));\r\t\t\ti1 = 0;\r\t\t\twhile (i1 < (classDictSize1 - SelectorStart)) {\r\t\t\t\tif (meth1 == (longAt((methodArray1 + (BASE_HEADER_SIZE)) + (i1 << (SHIFT_FOR_WORD))))) {\r\t\t\t\t\tmethClass = currClass1;\r\t\t\t\t\tgoto l6;\r\t\t\t\t}\r\t\t\t\ti1 += 1;\r\t\t\t}\r\t\t\tcurrClass1 = longAt((currClass1 + (BASE_HEADER_SIZE)) + (SuperclassIndex << (SHIFT_FOR_WORD)));\r\t\t\tdone1 = currClass1 == foo->nilObj;\r\t\t}\r\t\t/* begin fetchClassOf: */\r\t\tif ((rcvr1 & 1)) {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop21 = foo->specialObjectsOop;\r\t\t\tmethClass = longAt((oop21 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\t\tgoto l6;\r\t\t}\r\t\tccIndex1 = (((usqInt) (longAt(rcvr1))) >> 12) & 31;\r\t\tif (ccIndex1 == 0) {\r\t\t\tmethClass = (longAt(rcvr1 - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\t\tgoto l6;\r\t\t} else {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop5 = foo->specialObjectsOop;\r\t\t\toop3 = longAt((oop5 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\t\tmethClass = longAt((oop3 + (BASE_HEADER_SIZE)) + ((ccIndex1 - 1) << (SHIFT_FOR_WORD)));\r\t\t\tgoto l6;\r\t\t}\r\t\tmethClass = null;\r\tl6:\t/* end findClassOfMethod:forReceiver: */;\r\t\t/* begin findSelectorOfMethod:forReceiver: */\r\t\tmeth = longAt((home + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\t\trcvr = longAt((home + (BASE_HEADER_SIZE)) + (ReceiverIndex << (SHIFT_FOR_WORD)));\r\t\t/* begin fetchClassOf: */\r\t\tif ((rcvr & 1)) {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop = foo->specialObjectsOop;\r\t\t\tcurrClass = longAt((oop + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\t\tgoto l1;\r\t\t}\r\t\tccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31;\r\t\tif (ccIndex == 0) {\r\t\t\tcurrClass = (longAt(rcvr - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop2 = foo->specialObjectsOop;\r\t\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\t\tcurrClass = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\t\tgoto l1;\r\t\t}\r\tl1:\t/* end fetchClassOf: */;\r\t\tdone = 0;\r\t\twhile (!(done)) {\r\t\t\tclassDict = longAt((currClass + (BASE_HEADER_SIZE)) + (MessageDictionaryIndex << (SHIFT_FOR_WORD)));\r\t\t\t/* begin fetchWordLengthOf: */\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader = longAt(classDict);\r\t\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(classDict - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l2;\r\t\t\t} else {\r\t\t\t\tsz = header & (SIZE_MASK);\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\tl2:\t/* end sizeBitsOf: */;\r\t\t\tclassDictSize = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\t\tmethodArray = longAt((classDict + (BASE_HEADER_SIZE)) + (MethodArrayIndex << (SHIFT_FOR_WORD)));\r\t\t\ti = 0;\r\t\t\twhile (i <= (classDictSize - SelectorStart)) {\r\t\t\t\tif (meth == (longAt((methodArray + (BASE_HEADER_SIZE)) + (i << (SHIFT_FOR_WORD))))) {\r\t\t\t\t\tmethodSel = longAt((classDict + (BASE_HEADER_SIZE)) + ((i + SelectorStart) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tgoto l3;\r\t\t\t\t}\r\t\t\t\ti += 1;\r\t\t\t}\r\t\t\tcurrClass = longAt((currClass + (BASE_HEADER_SIZE)) + (SuperclassIndex << (SHIFT_FOR_WORD)));\r\t\t\tdone = currClass == foo->nilObj;\r\t\t}\r\t\tmethodSel = foo->nilObj;\r\tl3:\t/* end findSelectorOfMethod:forReceiver: */;\r\t\tprintNum(ctxt);\r\t\tprint(\" \");\r\t\tif (!(ctxt == home)) {\r\t\t\tprint(\"[] in \");\r\t\t}\r\t\tprintNameOfClasscount(methClass, 5);\r\t\tprint(\">\");\r\t\tif (methodSel == foo->nilObj) {\r\t\t\tprint(\"?\");\r\t\t} else {\r\t\t\tprintStringOf(methodSel);\r\t\t}\r\t\tif (methodSel == (fetchPointerofObject(SelectorDoesNotUnderstand, foo->specialObjectsOop))) {\r\r\t\t\t/* print arg message selector */\r\r\t\t\tmessage = longAt((home + (BASE_HEADER_SIZE)) + ((0 + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\tmethodSel = longAt((message + (BASE_HEADER_SIZE)) + (MessageSelectorIndex << (SHIFT_FOR_WORD)));\r\t\t\tprint(\" \");\r\t\t\tprintStringOf(methodSel);\r\t\t}\r\t\t/* begin cr */\r\t\tprintf(\"\\n\");\r\t\tctxt = longAt((ctxt + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\t}\r}\r\r\r/*\tDetails: The count argument is used to avoid a possible infinite recursion if classOop is a corrupted object. */\r\rsqInt printNameOfClasscount(sqInt classOop, sqInt cnt) {\r\tif (cnt <= 0) {\r\t\treturn print(\"bad class\");\r\t}\r\tif ((sizeBitsOf(classOop)) == (7 * (BYTES_PER_WORD))) {\r\t\tprintNameOfClasscount(longAt((classOop + (BASE_HEADER_SIZE)) + (5 << (SHIFT_FOR_WORD))), cnt - 1);\r\t\tprint(\" class\");\r\t} else {\r\t\tprintStringOf(longAt((classOop + (BASE_HEADER_SIZE)) + (6 << (SHIFT_FOR_WORD))));\r\t}\r}\r\r\r/*\tFor testing in Smalltalk, this method should be overridden in a subclass. */\r\rsqInt printNum(sqInt n) {\r\tprintf(\"%ld\", (long) n);\r}\r\rsqInt printStringOf(sqInt oop) {\r    sqInt cnt;\r    sqInt fmt;\r    sqInt i;\r\r\tif ((oop & 1)) {\r\t\treturn null;\r\t}\r\tfmt = (((usqInt) (longAt(oop))) >> 8) & 15;\r\tif (fmt < 8) {\r\t\treturn null;\r\t}\r\tcnt = ((100 < (lengthOf(oop))) ? 100 : (lengthOf(oop)));\r\ti = 0;\r\twhile (i < cnt) {\r\t\t/* begin printChar: */\r\t\tputchar(byteAt((oop + (BASE_HEADER_SIZE)) + i));\r\t\ti += 1;\r\t}\r}\r\rsqInt printUnbalancedStack(sqInt primIdx) {\r\tprint(\"Stack unbalanced after \");\r\tif (foo->successFlag) {\r\t\tprint(\"successful primitive \");\r\t} else {\r\t\tprint(\"failed primitive \");\r\t}\r\tprintNum(primIdx);\r\t/* begin cr */\r\tprintf(\"\\n\");\r}\r\rsqInt push(sqInt object) {\rregister struct foo * foo = &fum;\r    sqInt sp;\r\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\tfoo->stackPointer = sp;\r}\r\rsqInt pushBool(sqInt trueOrFalse) {\rregister struct foo * foo = &fum;\r    sqInt sp;\r    sqInt sp1;\r\r\tif (trueOrFalse) {\r\t\t/* begin push: */\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\tfoo->stackPointer = sp;\r\t} else {\r\t\t/* begin push: */\r\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\tfoo->stackPointer = sp1;\r\t}\r}\r\rsqInt pushFloat(double  f) {\rregister struct foo * foo = &fum;\r    sqInt object;\r    sqInt sp;\r\r\t/* begin push: */\r\tobject = floatObjectOf(f);\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\tfoo->stackPointer = sp;\r}\r\rsqInt pushInteger(sqInt integerValue) {\rregister struct foo * foo = &fum;\r    sqInt sp;\r\r\t/* begin push: */\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), ((integerValue << 1) | 1));\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tRecord the given object in a the remap buffer. Objects in this buffer are remapped when a compaction occurs. This facility is used by the interpreter to ensure that objects in temporary variables are properly remapped. */\r\rsqInt pushRemappableOop(sqInt oop) {\rregister struct foo * foo = &fum;\r\tfoo->remapBuffer[foo->remapBufferCount += 1] = oop;\r}\r\r\r/*\tAppend aWord to aFile in this platforms 'natural' byte order.  (Bytes will be swapped, if\r\tnecessary, when the image is read on a different platform.) Set successFlag to false if\r\tthe write fails. */\r\rsqInt putLongtoFile(sqInt aWord, sqImageFile  aFile) {\rregister struct foo * foo = &fum;\r    sqInt objectsWritten;\r\r\tobjectsWritten = sqImageFileWrite(&aWord, sizeof(aWord), 1, aFile);\r\t/* begin success: */\r\tfoo->successFlag = (objectsWritten == 1) && foo->successFlag;\r}\r\r\r/*\tRead an image from the given file stream, allocating the given amount of memory to its object heap. Fail if the image has an unknown format or requires more than the given amount of memory. */\r/*\tDetails: This method detects when the image was stored on a machine with the opposite byte ordering from this machine and swaps the bytes automatically. Furthermore, it allows the header information to start 512 bytes into the file, since some file transfer programs for the Macintosh apparently prepend a Mac-specific header of this size. Note that this same 512 bytes of prefix area could also be used to store an exec command on Unix systems, allowing one to launch Smalltalk by invoking the image name as a command. */\r/*\tThis code is based on C code by Ian Piumarta and Smalltalk code by Tim Rowledge. Many thanks to both of you!! */\r\rsqInt readImageFromFileHeapSizeStartingAt(sqImageFile  f, usqInt desiredHeapSize, squeakFileOffsetType  imageOffset) {\rregister struct foo * foo = &fum;\r    sqInt memStart;\r    size_t bytesRead;\r    sqInt headerSize;\r    squeakFileOffsetType  headerStart;\r    sqInt swapBytes;\r    size_t  dataSize;\r    sqInt heapSize;\r    sqInt bytesToShift;\r    sqInt oldBaseAddr;\r    sqInt minimumMemory;\r    char * memoryAddress;\r    sqInt startAddr;\r    sqInt stopAddr;\r    sqInt addr;\r\r\tswapBytes = checkImageVersionFromstartingAt(f, imageOffset);\r\r\t/* record header start position */\r\r\theaderStart = (sqImageFilePosition(f)) - (BYTES_PER_WORD);\r\theaderSize = getLongFromFileswap(f, swapBytes);\r\tdataSize = getLongFromFileswap(f, swapBytes);\r\toldBaseAddr = getLongFromFileswap(f, swapBytes);\r\tfoo->specialObjectsOop = getLongFromFileswap(f, swapBytes);\r\tfoo->lastHash = getLongFromFileswap(f, swapBytes);\r\tfoo->savedWindowSize = getLongFromFileswap(f, swapBytes);\r\tfoo->fullScreenFlag = getLongFromFileswap(f, swapBytes);\r\textraVMMemory = getLongFromFileswap(f, swapBytes);\r\tif (foo->lastHash == 0) {\r\r\t\t/* lastHash wasn't stored (e.g. by the cloner); use 999 as the seed */\r\r\t\tfoo->lastHash = 999;\r\t}\r\theapSize = reserveExtraCHeapBytes(desiredHeapSize, extraVMMemory);\r\r\t/* need at least 100K of breathing room */\r\r\tminimumMemory = dataSize + 100000;\r\tif (heapSize < minimumMemory) {\r\t\tinsufficientMemorySpecifiedError();\r\t}\r\tmemory = allocateMemoryMinimumImageFileHeaderSize(heapSize, minimumMemory, f, headerSize);\r\tif (memory == null) {\r\t\tinsufficientMemoryAvailableError();\r\t}\r\tmemStart = memory;\r\r\t/* decrease memoryLimit a tad for safety */\r\r\tfoo->memoryLimit = (memStart + heapSize) - 24;\r\r\t/* position file after the header */\r\r\tfoo->endOfMemory = memStart + dataSize;\r\tsqImageFileSeek(f, headerStart + headerSize);\r\t/* begin sqImage:read:size:length: */\r\tmemoryAddress = pointerForOop(memory);\r\tbytesRead = sqImageFileReadEntireImage(memoryAddress, sizeof(unsigned char), dataSize, f);\r\tif (bytesRead != dataSize) {\r\t\tunableToReadImageError();\r\t}\r\tfoo->headerTypeBytes[0] = ((BYTES_PER_WORD) * 2);\r\tfoo->headerTypeBytes[1] = (BYTES_PER_WORD);\r\tfoo->headerTypeBytes[2] = 0;\r\tfoo->headerTypeBytes[3] = 0;\r\tif (swapBytes) {\r\t\t/* begin reverseBytesInImage */\r\t\t/* begin reverseBytesFrom:to: */\r\t\tstartAddr = memory;\r\t\tstopAddr = foo->endOfMemory;\r\t\tflag(\"Dan\");\r\t\taddr = startAddr;\r\t\twhile ((((usqInt) addr)) < (((usqInt) stopAddr))) {\r\t\t\tlongAtput(addr, byteSwapped(longAt(addr)));\r\t\t\taddr += BYTES_PER_WORD;\r\t\t}\r\t\t/* begin byteSwapByteObjects */\r\t\tbyteSwapByteObjectsFromto(memory + (foo->headerTypeBytes[(longAt(memory)) & TypeMask]), foo->endOfMemory);\r\t}\r\tbytesToShift = memStart - oldBaseAddr;\r\tinitializeInterpreter(bytesToShift);\r\tisBigEnder();\r\treturn dataSize;\r}\r\r\r/*\tAnwer true if images of the given format are readable by this interpreter. Allows a virtual machine to accept selected older image formats.  In our case we can select a newer (closure) image format as well as the existing format. */\r\rsqInt readableFormat(sqInt imageVersion) {\r\treturn (imageVersion == imageFormatVersionNumber) || ((imageVersion == (imageFormatForwardCompatibilityVersion())) || (imageVersion == (imageFormatBackwardCompatibilityVersion())));\r}\r\r\r/*\tcallbackContext is an activation of invokeCallback:stack:registers:jmpbuf:.  Its sender\r\t is the interpreter's state prior to the callback.  Reestablish that state. */\r\rEXPORT(sqInt) reestablishContextPriorToCallback(sqInt callbackContext) {\rregister struct foo * foo = &fum;\r    sqInt calloutContext;\r    sqInt activeCntx;\r    sqInt valuePointer;\r    sqInt valuePointer1;\r    sqInt tmp;\r\r\tif ((fetchClassOf(callbackContext)) != (fetchPointerofObject(ClassMethodContext, foo->specialObjectsOop))) {\r\t\treturn 0;\r\t}\r\tcalloutContext = longAt((callbackContext + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\t/* begin newActiveContext: */\r\t/* begin storeContextRegisters: */\r\tactiveCntx = foo->activeContext;\r\t/* begin storePointerUnchecked:ofObject:withValue: */\r\tvaluePointer = ((((foo->instructionPointer - foo->method) - ((BASE_HEADER_SIZE) - 2)) << 1) | 1);\r\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t/* begin storePointerUnchecked:ofObject:withValue: */\r\tvaluePointer1 = (((((((usqInt) ((foo->stackPointer - foo->activeContext) - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD)) - TempFrameStart) + 1) << 1) | 1);\r\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\tif ((((usqInt) calloutContext)) < (((usqInt) foo->youngStart))) {\r\t\tbeRootIfOld(calloutContext);\r\t}\r\tfoo->activeContext = calloutContext;\r\t/* begin fetchContextRegisters: */\r\ttmp = longAt((calloutContext + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\tif ((tmp & 1)) {\r\t\ttmp = longAt((calloutContext + (BASE_HEADER_SIZE)) + (HomeIndex << (SHIFT_FOR_WORD)));\r\t\tif ((((usqInt) tmp)) < (((usqInt) foo->youngStart))) {\r\t\t\tbeRootIfOld(tmp);\r\t\t}\r\t} else {\r\t\ttmp = calloutContext;\r\t}\r\tfoo->theHomeContext = tmp;\r\tfoo->receiver = longAt((tmp + (BASE_HEADER_SIZE)) + (ReceiverIndex << (SHIFT_FOR_WORD)));\r\tfoo->method = longAt((tmp + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\ttmp = ((longAt((calloutContext + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tfoo->instructionPointer = ((foo->method + tmp) + (BASE_HEADER_SIZE)) - 2;\r\ttmp = ((longAt((calloutContext + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tfoo->stackPointer = (calloutContext + (BASE_HEADER_SIZE)) + (((TempFrameStart + tmp) - 1) * (BYTES_PER_WORD));\r\treturn 1;\r}\r\r\r/*\tMap the given oop to its new value during a compaction or \r\tbecome: operation. If it has no forwarding table entry, \r\treturn the oop itself. */\r\rsqInt remap(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt fwdBlock;\r\r\tif (((oop & 1) == 0) && (((longAt(oop)) & (MARK_BIT)) != 0)) {\r\r\t\t/* get the new value for oop from its forwarding block */\r\r\t\tfwdBlock = ((longAt(oop)) & (ALL_BUT_MARK_BIT_AND_TYPE_MASK)) << 1;\r\t\tif (DoAssertionChecks) {\r\t\t\t/* begin fwdBlockValidate: */\r\t\t\tif (!(((((usqInt) fwdBlock)) > (((usqInt) foo->endOfMemory))) && (((((usqInt) fwdBlock)) <= (((usqInt) foo->fwdTableNext))) && ((fwdBlock & 3) == 0)))) {\r\t\t\t\terror(\"invalid fwd table entry\");\r\t\t\t}\r\t\t}\r\t\treturn longAt(fwdBlock);\r\t}\r\treturn oop;\r}\r\r\r/*\tRemove the first process from the given linked list. */\r\rsqInt removeFirstLinkOfList(sqInt aList) {\rregister struct foo * foo = &fum;\r    sqInt next;\r    sqInt first;\r    sqInt last;\r    sqInt valuePointer;\r    sqInt valuePointer1;\r    sqInt valuePointer2;\r\r\tfirst = longAt((aList + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)));\r\tlast = longAt((aList + (BASE_HEADER_SIZE)) + (LastLinkIndex << (SHIFT_FOR_WORD)));\r\tif (first == last) {\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer = foo->nilObj;\r\t\tif ((((usqInt) aList)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(aList, valuePointer);\r\t\t}\r\t\tlongAtput((aList + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer1 = foo->nilObj;\r\t\tif ((((usqInt) aList)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(aList, valuePointer1);\r\t\t}\r\t\tlongAtput((aList + (BASE_HEADER_SIZE)) + (LastLinkIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\t} else {\r\t\tnext = longAt((first + (BASE_HEADER_SIZE)) + (NextLinkIndex << (SHIFT_FOR_WORD)));\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tif ((((usqInt) aList)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(aList, next);\r\t\t}\r\t\tlongAtput((aList + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)), next);\r\t}\r\t/* begin storePointer:ofObject:withValue: */\r\tvaluePointer2 = foo->nilObj;\r\tif ((((usqInt) first)) < (((usqInt) foo->youngStart))) {\r\t\tpossibleRootStoreIntovalue(first, valuePointer2);\r\t}\r\tlongAtput((first + (BASE_HEADER_SIZE)) + (NextLinkIndex << (SHIFT_FOR_WORD)), valuePointer2);\r\treturn first;\r}\r\r\r/*\tRemove the given variable location to the extra roots table */\r\rEXPORT(sqInt) removeGCRoot(sqInt *varLoc) {\rregister struct foo * foo = &fum;\r    sqInt *root;\r    sqInt i;\r\r\tfor (i = 1; i <= foo->extraRootCount; i += 1) {\r\t\troot = foo->extraRoots[i];\r\t\tif (root == varLoc) {\r\t\t\tfoo->extraRoots[i] = (foo->extraRoots[foo->extraRootCount]);\r\t\t\tfoo->extraRootCount -= 1;\r\t\t\treturn 1;\r\t\t}\r\t}\r\treturn 0;\r}\r\r\r/*\tRestore the original header of the given oop from its \r\tforwarding block. */\r\rsqInt restoreHeaderOf(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt fwdBlock;\r    sqInt fwdHeader;\r\r\tfwdHeader = longAt(oop);\r\tfwdBlock = (fwdHeader & (ALL_BUT_MARK_BIT_AND_TYPE_MASK)) << 1;\r\tif (DoAssertionChecks) {\r\t\tif ((fwdHeader & (MARK_BIT)) == 0) {\r\t\t\terror(\"attempting to restore the header of an object that has no forwarding block\");\r\t\t}\r\t\t/* begin fwdBlockValidate: */\r\t\tif (!(((((usqInt) fwdBlock)) > (((usqInt) foo->endOfMemory))) && (((((usqInt) fwdBlock)) <= (((usqInt) foo->fwdTableNext))) && ((fwdBlock & 3) == 0)))) {\r\t\t\terror(\"invalid fwd table entry\");\r\t\t}\r\t}\r\tlongAtput(oop, longAt(fwdBlock + (BYTES_PER_WORD)));\r}\r\r\r/*\tRestore headers smashed by forwarding links */\r\rsqInt restoreHeadersFromtofromandtofrom(sqInt firstIn, sqInt lastIn, sqInt hdrBaseIn, sqInt firstOut, sqInt lastOut, sqInt hdrBaseOut) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r    sqInt header;\r    sqInt tablePtr;\r    sqInt sz;\r    sqInt header1;\r\r\ttablePtr = firstIn;\r\twhile ((((usqInt) tablePtr)) <= (((usqInt) lastIn))) {\r\t\toop = longAt(tablePtr);\r\t\theader = longAt(hdrBaseIn + (tablePtr - firstIn));\r\t\tlongAtput(oop, header);\r\t\ttablePtr += BYTES_PER_WORD;\r\t}\r\ttablePtr = firstOut;\r\twhile ((((usqInt) tablePtr)) <= (((usqInt) lastOut))) {\r\t\toop = longAt(tablePtr);\r\t\theader = longAt(hdrBaseOut + (tablePtr - firstOut));\r\t\tlongAtput(oop, header);\r\t\ttablePtr += BYTES_PER_WORD;\r\t}\r\toop = memory + (foo->headerTypeBytes[(longAt(memory)) & TypeMask]);\r\twhile ((((usqInt) oop)) < (((usqInt) foo->endOfMemory))) {\r\t\tif (!(((longAt(oop)) & TypeMask) == HeaderTypeFree)) {\r\t\t\tlongAtput(oop, (longAt(oop)) & (ALL_BUT_MARK_BIT));\r\t\t}\r\t\t/* begin objectAfter: */\r\t\tif (DoAssertionChecks) {\r\t\t\tif ((((usqInt) oop)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t}\r\t\t}\r\t\tif (((longAt(oop)) & TypeMask) == HeaderTypeFree) {\r\t\t\tsz = (longAt(oop)) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader1 = longAt(oop);\r\t\t\tif ((header1 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tsz = header1 & (SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\tl1:\t/* end sizeBitsOf: */;\r\t\t}\r\t\toop = (oop + sz) + (foo->headerTypeBytes[(longAt(oop + sz)) & TypeMask]);\r\t}\r}\r\rsqInt resume(sqInt aProcess) {\rregister struct foo * foo = &fum;\r    sqInt activeProc;\r    sqInt activePriority;\r    sqInt newPriority;\r    sqInt oop;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt processLists;\r    sqInt priority;\r    sqInt processList;\r    sqInt oop3;\r    sqInt oop11;\r    sqInt lastLink;\r    sqInt oop21;\r    sqInt processLists1;\r    sqInt priority1;\r    sqInt processList1;\r    sqInt oop4;\r    sqInt oop12;\r    sqInt lastLink1;\r    sqInt oop22;\r\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\toop2 = foo->specialObjectsOop;\r\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\tactiveProc = longAt((oop + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)));\r\tactivePriority = ((longAt((activeProc + (BASE_HEADER_SIZE)) + (PriorityIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tnewPriority = ((longAt((aProcess + (BASE_HEADER_SIZE)) + (PriorityIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tif (newPriority > activePriority) {\r\t\t/* begin putToSleep: */\r\t\tpriority = ((longAt((activeProc + (BASE_HEADER_SIZE)) + (PriorityIndex << (SHIFT_FOR_WORD)))) >> 1);\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop21 = foo->specialObjectsOop;\r\t\toop11 = longAt((oop21 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\t\toop3 = longAt((oop11 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\tprocessLists = longAt((oop3 + (BASE_HEADER_SIZE)) + (ProcessListsIndex << (SHIFT_FOR_WORD)));\r\t\tprocessList = longAt((processLists + (BASE_HEADER_SIZE)) + ((priority - 1) << (SHIFT_FOR_WORD)));\r\t\t/* begin addLastLink:toList: */\r\t\tif ((longAt((processList + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)))) == foo->nilObj) {\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tif ((((usqInt) processList)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(processList, activeProc);\r\t\t\t}\r\t\t\tlongAtput((processList + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)), activeProc);\r\t\t} else {\r\t\t\tlastLink = longAt((processList + (BASE_HEADER_SIZE)) + (LastLinkIndex << (SHIFT_FOR_WORD)));\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tif ((((usqInt) lastLink)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(lastLink, activeProc);\r\t\t\t}\r\t\t\tlongAtput((lastLink + (BASE_HEADER_SIZE)) + (NextLinkIndex << (SHIFT_FOR_WORD)), activeProc);\r\t\t}\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tif ((((usqInt) processList)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(processList, activeProc);\r\t\t}\r\t\tlongAtput((processList + (BASE_HEADER_SIZE)) + (LastLinkIndex << (SHIFT_FOR_WORD)), activeProc);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tif ((((usqInt) activeProc)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(activeProc, processList);\r\t\t}\r\t\tlongAtput((activeProc + (BASE_HEADER_SIZE)) + (MyListIndex << (SHIFT_FOR_WORD)), processList);\r\t\ttransferTo(aProcess);\r\t} else {\r\t\t/* begin putToSleep: */\r\t\tpriority1 = ((longAt((aProcess + (BASE_HEADER_SIZE)) + (PriorityIndex << (SHIFT_FOR_WORD)))) >> 1);\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop22 = foo->specialObjectsOop;\r\t\toop12 = longAt((oop22 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\t\toop4 = longAt((oop12 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\tprocessLists1 = longAt((oop4 + (BASE_HEADER_SIZE)) + (ProcessListsIndex << (SHIFT_FOR_WORD)));\r\t\tprocessList1 = longAt((processLists1 + (BASE_HEADER_SIZE)) + ((priority1 - 1) << (SHIFT_FOR_WORD)));\r\t\t/* begin addLastLink:toList: */\r\t\tif ((longAt((processList1 + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)))) == foo->nilObj) {\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tif ((((usqInt) processList1)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(processList1, aProcess);\r\t\t\t}\r\t\t\tlongAtput((processList1 + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)), aProcess);\r\t\t} else {\r\t\t\tlastLink1 = longAt((processList1 + (BASE_HEADER_SIZE)) + (LastLinkIndex << (SHIFT_FOR_WORD)));\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tif ((((usqInt) lastLink1)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(lastLink1, aProcess);\r\t\t\t}\r\t\t\tlongAtput((lastLink1 + (BASE_HEADER_SIZE)) + (NextLinkIndex << (SHIFT_FOR_WORD)), aProcess);\r\t\t}\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tif ((((usqInt) processList1)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(processList1, aProcess);\r\t\t}\r\t\tlongAtput((processList1 + (BASE_HEADER_SIZE)) + (LastLinkIndex << (SHIFT_FOR_WORD)), aProcess);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tif ((((usqInt) aProcess)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(aProcess, processList1);\r\t\t}\r\t\tlongAtput((aProcess + (BASE_HEADER_SIZE)) + (MyListIndex << (SHIFT_FOR_WORD)), processList1);\r\t}\r}\r\r\r/*\tReverse the given range of Display words (at different bit \r\tdepths, this will reverse different numbers of pixels). Used to \r\tgive feedback during VM activities such as garbage \r\tcollection when debugging. It is assumed that the given \r\tword range falls entirely within the first line of the Display. */\r\rsqInt reverseDisplayFromto(sqInt startIndex, sqInt endIndex) {\rregister struct foo * foo = &fum;\r    sqInt displayObj;\r    sqInt ptr;\r    sqInt reversed;\r    sqInt dispBitsPtr;\r    sqInt w;\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\tdisplayObj = longAt((oop + (BASE_HEADER_SIZE)) + (TheDisplay << (SHIFT_FOR_WORD)));\r\tif (!((((displayObj & 1) == 0) && (((((usqInt) (longAt(displayObj))) >> 8) & 15) <= 4)) && ((lengthOf(displayObj)) >= 4))) {\r\t\treturn null;\r\t}\r\tw = fetchIntegerofObject(1, displayObj);\r\tdispBitsPtr = longAt((displayObj + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)));\r\tif ((dispBitsPtr & 1)) {\r\t\treturn null;\r\t}\r\tdispBitsPtr += BASE_HEADER_SIZE;\r\tfor (ptr = (dispBitsPtr + (startIndex * 4)); ptr <= (dispBitsPtr + (endIndex * 4)); ptr += 4) {\r\t\treversed = (long32At(ptr)) ^ 4294967295U;\r\t\tlongAtput(ptr, reversed);\r\t}\r\tfoo->successFlag = 1;\r\tdisplayBitsOfLeftTopRightBottom(displayObj, 0, 0, w, 1);\r\tioForceDisplayUpdate();\r}\r\r\r/*\tRewrite the cache entry with the given primitive index and matching function pointer */\r\rsqInt rewriteMethodCacheSelclassprimIndex(sqInt selector, sqInt class, sqInt localPrimIndex) {\r    void * primPtr;\r\r\tif (localPrimIndex == 0) {\r\t\tprimPtr = 0;\r\t} else {\r\t\tprimPtr = primitiveTable[localPrimIndex];\r\t}\r\trewriteMethodCacheSelclassprimIndexprimFunction(selector, class, localPrimIndex, primPtr);\r}\r\r\r/*\tRewrite an existing entry in the method cache with a new primitive \r\tindex & function address. Used by primExternalCall to make direct jumps to found external prims */\r\rsqInt rewriteMethodCacheSelclassprimIndexprimFunction(sqInt selector, sqInt class, sqInt localPrimIndex, void * localPrimAddress) {\rregister struct foo * foo = &fum;\r    sqInt hash;\r    sqInt p;\r    sqInt probe;\r\r\thash = selector ^ class;\r\tfor (p = 0; p <= (CacheProbeMax - 1); p += 1) {\r\t\tprobe = (((usqInt) hash) >> p) & MethodCacheMask;\r\t\tif (((foo->methodCache[probe + MethodCacheSelector]) == selector) && ((foo->methodCache[probe + MethodCacheClass]) == class)) {\r\t\t\tfoo->methodCache[probe + MethodCachePrim] = localPrimIndex;\r\t\t\tfoo->methodCache[probe + MethodCachePrimFunction] = (((long) localPrimAddress));\r\t\t\treturn null;\r\t\t}\r\t}\r}\r\r\r/*\tSend the 4 argument callback message invokeCallback:stack:registers:jmpbuf:\r\t to Alien class with the supplied args.  The arguments are raw C addresses\r\t and are converted to integer objects on the way. */\r\rEXPORT(sqInt) sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt regsPtr, sqInt jmpBufPtr) {\rregister struct foo * foo = &fum;\r    sqInt where;\r    sqInt oop;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r    sqInt oop4;\r    sqInt oop5;\r    sqInt tempCount;\r    sqInt where1;\r    sqInt initialIP;\r    sqInt needsLarge;\r    sqInt i;\r    sqInt newContext;\r    sqInt methodHeader;\r    sqInt activeCntx;\r    sqInt tmp;\r    sqInt activeCntx1;\r    sqInt valuePointer;\r    sqInt valuePointer1;\r    sqInt methodPointer;\r    sqInt oop6;\r    sqInt ccIndex;\r    sqInt oop11;\r    sqInt oop21;\r\r\t/* begin pushRemappableOop: */\r\toop = positive32BitIntegerFor(jmpBufPtr);\r\tfoo->remapBuffer[foo->remapBufferCount += 1] = oop;\r\t/* begin pushRemappableOop: */\r\toop1 = positive32BitIntegerFor(regsPtr);\r\tfoo->remapBuffer[foo->remapBufferCount += 1] = oop1;\r\t/* begin pushRemappableOop: */\r\toop2 = positive32BitIntegerFor(stackPtr);\r\tfoo->remapBuffer[foo->remapBufferCount += 1] = oop2;\r\t/* begin pushRemappableOop: */\r\toop3 = positive32BitIntegerFor(thunkPtr);\r\tfoo->remapBuffer[foo->remapBufferCount += 1] = oop3;\r\t/* begin fetchPointer:ofObject: */\r\toop4 = foo->specialObjectsOop;\r\tfoo->receiver = longAt((oop4 + (BASE_HEADER_SIZE)) + (ClassAlien << (SHIFT_FOR_WORD)));\r\t/* begin fetchClassOfNonInt: */\r\toop6 = foo->receiver;\r\tccIndex = (((usqInt) (longAt(oop6))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tfoo->lkupClass = (longAt(oop6 - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop21 = foo->specialObjectsOop;\r\t\toop11 = longAt((oop21 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tfoo->lkupClass = longAt((oop11 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\rl1:\t/* end fetchClassOfNonInt: */;\r\t/* begin fetchPointer:ofObject: */\r\toop5 = foo->specialObjectsOop;\r\tfoo->messageSelector = longAt((oop5 + (BASE_HEADER_SIZE)) + (InvokeCallbackSelector << (SHIFT_FOR_WORD)));\r\tif (!(lookupInMethodCacheSelclass(foo->messageSelector, foo->lkupClass))) {\r\t\tif (!(lookupMethodNoMNUEtcInClass(foo->lkupClass))) {\r\t\t\treturn 0;\r\t\t}\r\t}\r\tif (foo->primitiveIndex != 0) {\r\t\treturn 0;\r\t}\r\t/* begin storeContextRegisters: */\r\tactiveCntx1 = foo->activeContext;\r\t/* begin storePointerUnchecked:ofObject:withValue: */\r\tvaluePointer = ((((foo->instructionPointer - foo->method) - ((BASE_HEADER_SIZE) - 2)) << 1) | 1);\r\tlongAtput((activeCntx1 + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t/* begin storePointerUnchecked:ofObject:withValue: */\r\tvaluePointer1 = (((((((usqInt) ((foo->stackPointer - foo->activeContext) - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD)) - TempFrameStart) + 1) << 1) | 1);\r\tlongAtput((activeCntx1 + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\t/* begin internalJustActivateNewMethod */\r\t/* begin headerOf: */\r\tmethodPointer = foo->newMethod;\r\tmethodHeader = longAt((methodPointer + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD)));\r\tneedsLarge = methodHeader & LargeContextBit;\r\tif ((needsLarge == 0) && (foo->freeContexts != NilContext)) {\r\t\tnewContext = foo->freeContexts;\r\t\tfoo->freeContexts = longAt((newContext + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)));\r\t} else {\r\t\tnewContext = allocateOrRecycleContext(needsLarge);\r\t}\r\tinitialIP = ((LiteralStart + ((((usqInt) methodHeader) >> 10) & 255)) * (BYTES_PER_WORD)) + 1;\r\ttempCount = (((usqInt) methodHeader) >> 19) & 63;\r\twhere1 = newContext + (BASE_HEADER_SIZE);\r\tlongAtput(where1 + (SenderIndex << (SHIFT_FOR_WORD)), foo->activeContext);\r\tlongAtput(where1 + (InstructionPointerIndex << (SHIFT_FOR_WORD)), ((initialIP << 1) | 1));\r\tlongAtput(where1 + (StackPointerIndex << (SHIFT_FOR_WORD)), ((tempCount << 1) | 1));\r\tlongAtput(where1 + (MethodIndex << (SHIFT_FOR_WORD)), foo->newMethod);\r\tlongAtput(where1 + (ReceiverIndex << (SHIFT_FOR_WORD)), foo->receiver);\r\tneedsLarge = foo->nilObj;\r\tfor (i = (ReceiverIndex + 1); i <= (tempCount + ReceiverIndex); i += 1) {\r\t\tlongAtput(where1 + (i << (SHIFT_FOR_WORD)), needsLarge);\r\t}\r\tfoo->reclaimableContextCount += 1;\r\tfoo->activeContext = newContext;\r\twhere = (foo->activeContext + (BASE_HEADER_SIZE)) + (ReceiverIndex << (SHIFT_FOR_WORD));\r\tlongAtput(where + (1 << (SHIFT_FOR_WORD)), popRemappableOop());\r\tlongAtput(where + (2 << (SHIFT_FOR_WORD)), popRemappableOop());\r\tlongAtput(where + (3 << (SHIFT_FOR_WORD)), popRemappableOop());\r\tlongAtput(where + (4 << (SHIFT_FOR_WORD)), popRemappableOop());\r\t/* begin fetchContextRegisters: */\r\tactiveCntx = foo->activeContext;\r\ttmp = longAt((activeCntx + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\tif ((tmp & 1)) {\r\t\ttmp = longAt((activeCntx + (BASE_HEADER_SIZE)) + (HomeIndex << (SHIFT_FOR_WORD)));\r\t\tif ((((usqInt) tmp)) < (((usqInt) foo->youngStart))) {\r\t\t\tbeRootIfOld(tmp);\r\t\t}\r\t} else {\r\t\ttmp = activeCntx;\r\t}\r\tfoo->theHomeContext = tmp;\r\tfoo->receiver = longAt((tmp + (BASE_HEADER_SIZE)) + (ReceiverIndex << (SHIFT_FOR_WORD)));\r\tfoo->method = longAt((tmp + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\ttmp = ((longAt((activeCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tfoo->instructionPointer = ((foo->method + tmp) + (BASE_HEADER_SIZE)) - 2;\r\ttmp = ((longAt((activeCntx + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tfoo->stackPointer = (activeCntx + (BASE_HEADER_SIZE)) + (((TempFrameStart + tmp) - 1) * (BYTES_PER_WORD));\r\tcallInterpreter();\r\treturn 1;\r}\r\rsqInt setCompilerInitialized(sqInt newFlag) {\rregister struct foo * foo = &fum;\r    sqInt oldFlag;\r\r\toldFlag = foo->compilerInitialized;\r\tfoo->compilerInitialized = newFlag;\r\treturn oldFlag;\r}\r\r\r\rsqInt setInterruptCheckCounter(sqInt value) {\r\tfoo->interruptCheckCounter = value;\r}\r\rsqInt setInterruptKeycode(sqInt value) {\r\tfoo->interruptKeycode = value;\r}\r\rsqInt setInterruptPending(sqInt value) {\r\tfoo->interruptPending = value;\r}\r\r\r/*\tA default substitute for unimplemented ioUtcWithOffset external function. */\r\rsqInt setMicroSecondsandOffset(sqLong * microSeconds, int * utcOffset) {\r\tflag(\"toRemove\");\r\treturn -1;\r}\r\rsqInt setNextWakeupTick(sqInt value) {\r\tfoo->nextWakeupTick = value;\r}\r\rsqInt setSavedWindowSize(sqInt value) {\r\tfoo->savedWindowSize = value;\r}\r\r\r/*\tRepaint the portion of the Smalltalk screen bounded by the affected rectangle. Used to synchronize the screen after a Bitblt to the Smalltalk Display object. */\r\rsqInt showDisplayBitsLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b) {\r\tif (foo->deferDisplayUpdates) {\r\t\treturn null;\r\t}\r\tdisplayBitsOfLeftTopRightBottom(aForm, l, t, r, b);\r}\r\r\r/*\tRecord the given semaphore index in the double buffer semaphores array to be signaled at the next convenient moment. Force a real interrupt check as soon as possible. */\r\rsqInt signalSemaphoreWithIndex(sqInt index) {\rregister struct foo * foo = &fum;\r\tif (index <= 0) {\r\t\treturn null;\r\t}\r\tif (foo->semaphoresUseBufferA) {\r\t\tif (foo->semaphoresToSignalCountA < SemaphoresToSignalSize) {\r\t\t\tfoo->semaphoresToSignalCountA += 1;\r\t\t\tfoo->semaphoresToSignalA[foo->semaphoresToSignalCountA] = index;\r\t\t}\r\t} else {\r\t\tif (foo->semaphoresToSignalCountB < SemaphoresToSignalSize) {\r\t\t\tfoo->semaphoresToSignalCountB += 1;\r\t\t\tfoo->semaphoresToSignalB[foo->semaphoresToSignalCountB] = index;\r\t\t}\r\t}\r\t/* begin forceInterruptCheck */\r\tfoo->interruptCheckCounter = -1000;\r\tfoo->nextPollTick = 0;\r}\r\r\r/*\tReturn a full 32 bit integer object for the given integer value */\r\rsqInt signed32BitIntegerFor(int integerValue) {\rregister struct foo * foo = &fum;\r    sqInt value;\r    sqInt newLargeInteger;\r    sqInt largeClass;\r    sqInt oop;\r    sqInt oop1;\r\r\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t(((((int) integerValue)) ^ ((((int) integerValue)) << 1)) >= 0)\r# else\r\t\t((integerValue >= -1073741824) && (integerValue <= 1073741823))\r# endif  // SQ_HOST32\r\t) {\r\t\treturn ((integerValue << 1) | 1);\r\t}\r\tif (integerValue < 0) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop = foo->specialObjectsOop;\r\t\tlargeClass = longAt((oop + (BASE_HEADER_SIZE)) + (ClassLargeNegativeInteger << (SHIFT_FOR_WORD)));\r\t\tvalue = 0 - integerValue;\r\t} else {\r\t\t/* begin splObj: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tlargeClass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassLargePositiveInteger << (SHIFT_FOR_WORD)));\r\t\tvalue = integerValue;\r\t}\r\tnewLargeInteger = instantiateClassindexableSize(largeClass, 4);\r\tbyteAtput((newLargeInteger + (BASE_HEADER_SIZE)) + 3, (((usqInt) value) >> 24) & 255);\r\tbyteAtput((newLargeInteger + (BASE_HEADER_SIZE)) + 2, (((usqInt) value) >> 16) & 255);\r\tbyteAtput((newLargeInteger + (BASE_HEADER_SIZE)) + 1, (((usqInt) value) >> 8) & 255);\r\tbyteAtput((newLargeInteger + (BASE_HEADER_SIZE)) + 0, value & 255);\r\treturn newLargeInteger;\r}\r\r\r/*\tConvert the given object into an integer value.\r\tThe object may be either a positive ST integer or a four-byte LargeInteger. */\r\rint signed32BitValueOf(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt sz;\r    int value;\r    sqInt negative;\r    sqInt largeClass;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt header;\r    sqInt oop3;\r    sqInt sz1;\r\r\tif ((oop & 1)) {\r\t\treturn (oop >> 1);\r\t}\r\tif ((lengthOf(oop)) > 4) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin fetchClassOf: */\r\tif ((oop & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tlargeClass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(oop))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tlargeClass = (longAt(oop - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tlargeClass = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\rl1:\t/* end fetchClassOf: */;\r\tif (largeClass == (splObj(ClassLargePositiveInteger))) {\r\t\tnegative = 0;\r\t} else {\r\t\tif (largeClass == (fetchPointerofObject(ClassLargeNegativeInteger, foo->specialObjectsOop))) {\r\t\t\tnegative = 1;\r\t\t} else {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t}\r\t/* begin lengthOf: */\r\theader = longAt(oop);\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz1 = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz1 = header & (SIZE_MASK);\r\t}\r\tsz1 -= header & (SIZE_4_BIT);\r\tif (((((usqInt) header) >> 8) & 15) <= 4) {\r\t\tsz = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tgoto l2;\r\t}\r\tif (((((usqInt) header) >> 8) & 15) < 8) {\r\t\tsz = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> 2;\r\t\tgoto l2;\r\t} else {\r\t\tsz = (sz1 - (BASE_HEADER_SIZE)) - (((((usqInt) header) >> 8) & 15) & 3);\r\t\tgoto l2;\r\t}\rl2:\t/* end lengthOf:baseHeader:format: */;\r\tif (!(sz == 4)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\r\t/* Fail if value exceeds range of a 32-bit two's-complement signed integer. */\r\r\tvalue = (((byteAt((oop + (BASE_HEADER_SIZE)) + 0)) + ((byteAt((oop + (BASE_HEADER_SIZE)) + 1)) << 8)) + ((byteAt((oop + (BASE_HEADER_SIZE)) + 2)) << 16)) + ((byteAt((oop + (BASE_HEADER_SIZE)) + 3)) << 24);\r\tif (negative) {\r\t\tvalue = 0 - value;\r\t\tif (value >= 0) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t} else {\r\t\tif (value < 0) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t}\r\treturn value;\r}\r\r\r/*\tReturn a Large Integer object for the given integer value */\r\rsqInt signed64BitIntegerFor(sqLong integerValue) {\rregister struct foo * foo = &fum;\r    unsigned sqLong magnitude;\r    sqInt sz;\r    usqInt highWord;\r    sqInt i;\r    sqInt newLargeInteger;\r    sqInt intValue;\r    sqInt largeClass;\r    sqInt oop;\r    sqInt oop1;\r\r\tif (integerValue < 0) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop = foo->specialObjectsOop;\r\t\tlargeClass = longAt((oop + (BASE_HEADER_SIZE)) + (ClassLargeNegativeInteger << (SHIFT_FOR_WORD)));\r\t\tmagnitude = 0 - integerValue;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tlargeClass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassLargePositiveInteger << (SHIFT_FOR_WORD)));\r\t\tmagnitude = integerValue;\r\t}\r\tif (magnitude <= 2147483647U) {\r\t\treturn signed32BitIntegerFor(integerValue);\r\t}\r\r\t/* shift is coerced to usqInt otherwise */\r\r\thighWord = magnitude >> 32;\r\tif (highWord == 0) {\r\t\tsz = 4;\r\t} else {\r\t\tsz = 5;\r\t\tif (!((highWord = ((usqInt) highWord) >> 8) == 0)) {\r\t\t\tsz += 1;\r\t\t}\r\t\tif (!((highWord = ((usqInt) highWord) >> 8) == 0)) {\r\t\t\tsz += 1;\r\t\t}\r\t\tif (!((highWord = ((usqInt) highWord) >> 8) == 0)) {\r\t\t\tsz += 1;\r\t\t}\r\t}\r\tnewLargeInteger = instantiateClassindexableSize(largeClass, sz);\r\tfor (i = 0; i <= (sz - 1); i += 1) {\r\t\tintValue = (magnitude >> (i * 8)) & 255;\r\t\tbyteAtput((newLargeInteger + (BASE_HEADER_SIZE)) + i, intValue);\r\t}\r\treturn newLargeInteger;\r}\r\r\r/*\tConvert the given object into an integer value.\r\tThe object may be either a positive ST integer or a eight-byte LargeInteger. */\r\rsqLong signed64BitValueOf(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt sz;\r    sqInt i;\r    sqLong value;\r    sqInt szsqLong;\r    sqInt negative;\r    sqInt largeClass;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt header;\r    sqInt oop3;\r    sqInt sz1;\r\r\tif ((oop & 1)) {\r\t\treturn ((sqLong) ((oop >> 1)));\r\t}\r\t/* begin lengthOf: */\r\theader = longAt(oop);\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz1 = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz1 = header & (SIZE_MASK);\r\t}\r\tsz1 -= header & (SIZE_4_BIT);\r\tif (((((usqInt) header) >> 8) & 15) <= 4) {\r\t\tsz = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tgoto l2;\r\t}\r\tif (((((usqInt) header) >> 8) & 15) < 8) {\r\t\tsz = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> 2;\r\t\tgoto l2;\r\t} else {\r\t\tsz = (sz1 - (BASE_HEADER_SIZE)) - (((((usqInt) header) >> 8) & 15) & 3);\r\t\tgoto l2;\r\t}\rl2:\t/* end lengthOf:baseHeader:format: */;\r\tif (sz > 8) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin fetchClassOf: */\r\tif ((oop & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tlargeClass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(oop))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tlargeClass = (longAt(oop - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tlargeClass = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\rl1:\t/* end fetchClassOf: */;\r\tif (largeClass == (splObj(ClassLargePositiveInteger))) {\r\t\tnegative = 0;\r\t} else {\r\t\tif (largeClass == (fetchPointerofObject(ClassLargeNegativeInteger, foo->specialObjectsOop))) {\r\t\t\tnegative = 1;\r\t\t} else {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t}\r\tszsqLong = sizeof(sqLong);\r\tif (sz > szsqLong) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tvalue = 0;\r\tfor (i = 0; i <= (sz - 1); i += 1) {\r\t\tvalue += (((sqLong) (byteAt((oop + (BASE_HEADER_SIZE)) + i)))) << (i * 8);\r\t}\r\tif (negative) {\r\t\tvalue = 0 - value;\r\t\tif (value >= 0) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t} else {\r\t\tif (value < 0) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t}\r\treturn value;\r}\r\r\r/*\tAnswer the number of bytes in the given object, including its base header, rounded up to an integral number of words. */\r/*\tNote: byte indexable objects need to have low bits subtracted from this size. */\r\rsqInt sizeBitsOf(sqInt oop) {\r    sqInt header;\r\r\theader = longAt(oop);\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\treturn (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\treturn header & (SIZE_MASK);\r\t}\r}\r\r\r/*\tReturn the number of indexable fields of the given object. This method is to be called from an automatically generated C primitive. The argument is assumed to be a pointer to the first indexable field of a words or bytes object; the object header starts 4 bytes before that. */\r/*\tNote: Only called by translated primitive code. */\r\rsqInt sizeOfSTArrayFromCPrimitive(void * cPtr) {\r    sqInt oop;\r    sqInt header;\r    sqInt sz;\r\r\toop = (oopForPointer(((char *) cPtr))) - (BASE_HEADER_SIZE);\r\tif (!(((oop & 1) == 0) && (isWordsOrBytesNonInt(oop)))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn 0;\r\t}\r\t/* begin lengthOf: */\r\theader = longAt(oop);\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz = header & (SIZE_MASK);\r\t}\r\tsz -= header & (SIZE_4_BIT);\r\tif (((((usqInt) header) >> 8) & 15) <= 4) {\r\t\treturn ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t}\r\tif (((((usqInt) header) >> 8) & 15) < 8) {\r\t\treturn ((usqInt) (sz - (BASE_HEADER_SIZE))) >> 2;\r\t} else {\r\t\treturn (sz - (BASE_HEADER_SIZE)) - (((((usqInt) header) >> 8) & 15) & 3);\r\t}\r\treturn null;\r}\r\r\r/*\tReturns the number of slots in the receiver.\r\tIf the receiver is a byte object, return the number of bytes.\r\tOtherwise return the number of words. */\r\rsqInt slotSizeOf(sqInt oop) {\r    sqInt header;\r    sqInt sz;\r\r\tif ((oop & 1)) {\r\t\treturn 0;\r\t}\r\t/* begin lengthOf: */\r\theader = longAt(oop);\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz = header & (SIZE_MASK);\r\t}\r\tsz -= header & (SIZE_4_BIT);\r\tif (((((usqInt) header) >> 8) & 15) <= 4) {\r\t\treturn ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t}\r\tif (((((usqInt) header) >> 8) & 15) < 8) {\r\t\treturn ((usqInt) (sz - (BASE_HEADER_SIZE))) >> 2;\r\t} else {\r\t\treturn (sz - (BASE_HEADER_SIZE)) - (((((usqInt) header) >> 8) & 15) & 3);\r\t}\r\treturn null;\r}\r\r\r/*\tupdate state of active context */\r\rsqInt snapshot(sqInt embedded) {\rregister struct foo * foo = &fum;\r    sqInt activeProc;\r    void * setMacType;\r    sqInt dataSize;\r    sqInt rcvr;\r    sqInt top;\r    sqInt sp;\r    sqInt sp1;\r    sqInt sp2;\r    sqInt oop;\r    sqInt valuePointer;\r    sqInt oop1;\r    sqInt activeCntx;\r    sqInt valuePointer2;\r    sqInt valuePointer1;\r    sqInt oop2;\r    sqInt oop3;\r    sqInt sz;\r    sqInt header;\r    sqInt fmt;\r    sqInt i;\r    sqInt header1;\r    sqInt sz1;\r    sqInt oop11;\r    sqInt i1;\r    sqInt header2;\r\r\tif (foo->compilerInitialized) {\r\t\tcompilerPreSnapshot();\r\t} else {\r\t\t/* begin storeContextRegisters: */\r\t\tactiveCntx = foo->activeContext;\r\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\tvaluePointer2 = ((((foo->instructionPointer - foo->method) - ((BASE_HEADER_SIZE) - 2)) << 1) | 1);\r\t\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), valuePointer2);\r\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\tvaluePointer1 = (((((((usqInt) ((foo->stackPointer - foo->activeContext) - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD)) - TempFrameStart) + 1) << 1) | 1);\r\t\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\t}\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\toop2 = foo->specialObjectsOop;\r\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\tactiveProc = longAt((oop + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)));\r\t/* begin storePointer:ofObject:withValue: */\r\tvaluePointer = foo->activeContext;\r\tif ((((usqInt) activeProc)) < (((usqInt) foo->youngStart))) {\r\t\tpossibleRootStoreIntovalue(activeProc, valuePointer);\r\t}\r\tlongAtput((activeProc + (BASE_HEADER_SIZE)) + (SuspendedContextIndex << (SHIFT_FOR_WORD)), valuePointer);\r\tincrementalGC();\r\tfullGC();\r\t/* begin snapshotCleanUp */\r\toop3 = memory + (foo->headerTypeBytes[(longAt(memory)) & TypeMask]);\r\twhile ((((usqInt) oop3)) < (((usqInt) foo->endOfMemory))) {\r\t\tif (!(((longAt(oop3)) & TypeMask) == HeaderTypeFree)) {\r\t\t\theader = longAt(oop3);\r\t\t\tfmt = (((usqInt) header) >> 8) & 15;\r\t\t\tif ((fmt == 3) && ((((((usqInt) header) >> 12) & 31) == 13) || ((((((usqInt) header) >> 12) & 31) == 14) || (((((usqInt) header) >> 12) & 31) == 4)))) {\r\t\t\t\t/* begin sizeBitsOf: */\r\t\t\t\theader1 = longAt(oop3);\r\t\t\t\tif ((header1 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\t\tsz = (longAt(oop3 - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\t\tgoto l1;\r\t\t\t\t} else {\r\t\t\t\t\tsz = header1 & (SIZE_MASK);\r\t\t\t\t\tgoto l1;\r\t\t\t\t}\r\t\t\tl1:\t/* end sizeBitsOf: */;\r\t\t\t\tfor (i = ((lastPointerOf(oop3)) + (BYTES_PER_WORD)); i <= (sz - (BASE_HEADER_SIZE)); i += (BYTES_PER_WORD)) {\r\t\t\t\t\tlongAtput(oop3 + i, foo->nilObj);\r\t\t\t\t}\r\t\t\t}\r\t\t\tif (fmt >= 12) {\r\t\t\t\tif ((primitiveIndexOf(oop3)) == PrimitiveExternalCallIndex) {\r\t\t\t\t\tflushExternalPrimitiveOf(oop3);\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t\t/* begin objectAfter: */\r\t\tif (DoAssertionChecks) {\r\t\t\tif ((((usqInt) oop3)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t}\r\t\t}\r\t\tif (((longAt(oop3)) & TypeMask) == HeaderTypeFree) {\r\t\t\tsz1 = (longAt(oop3)) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader2 = longAt(oop3);\r\t\t\tif ((header2 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz1 = (longAt(oop3 - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l2;\r\t\t\t} else {\r\t\t\t\tsz1 = header2 & (SIZE_MASK);\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\tl2:\t/* end sizeBitsOf: */;\r\t\t}\r\t\toop3 = (oop3 + sz1) + (foo->headerTypeBytes[(longAt(oop3 + sz1)) & TypeMask]);\r\t}\r\t/* begin clearRootsTable */\r\tfor (i1 = 1; i1 <= foo->rootTableCount; i1 += 1) {\r\t\toop11 = foo->rootTable[i1];\r\t\tlongAtput(oop11, (longAt(oop11)) & (ALL_BUT_ROOT_BIT));\r\t\tfoo->rootTable[i1] = 0;\r\t}\r\tfoo->rootTableCount = 0;\r\r\t/* Assume all objects are below the start of the free block */\r\r\tdataSize = foo->freeBlock - memory;\r\tif (foo->successFlag) {\r\t\t/* begin popStack */\r\t\ttop = longAt(foo->stackPointer);\r\t\tfoo->stackPointer -= BYTES_PER_WORD;\r\t\trcvr = top;\r\t\t/* begin push: */\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\tfoo->stackPointer = sp;\r\t\twriteImageFile(dataSize);\r\t\tif (!(embedded)) {\r\r\t\t\t/* set Mac file type and creator; this is a noop on other platforms */\r\r\t\t\tsetMacType = ioLoadFunctionFrom(\"setMacFileTypeAndCreator\", \"FilePlugin\");\r\t\t\tif (!(setMacType == 0)) {\r\t\t\t\t((sqInt (*)(char *, char *, char *))setMacType)(imageName, \"STim\", \"FAST\");\r\t\t\t}\r\t\t}\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t}\r\tbeRootIfOld(foo->activeContext);\r\tif (foo->successFlag) {\r\t\t/* begin push: */\r\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\tfoo->stackPointer = sp1;\r\t} else {\r\t\t/* begin push: */\r\t\tlongAtput(sp2 = foo->stackPointer + (BYTES_PER_WORD), rcvr);\r\t\tfoo->stackPointer = sp2;\r\t}\r\tif (foo->compilerInitialized) {\r\t\tcompilerPostSnapshot();\r\t}\r}\r\r\r/*\tReturn one of the objects in the SpecialObjectsArray */\r\rsqInt splObj(sqInt index) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (index << (SHIFT_FOR_WORD)));\r}\r\r\r/*\tReturn what ST would return for <obj> at: index. */\r\rsqInt stObjectat(sqInt array, sqInt index) {\rregister struct foo * foo = &fum;\r    sqInt totalLength;\r    sqInt fmt;\r    sqInt fixedFields;\r    sqInt hdr;\r    sqInt stSize;\r    sqInt sp;\r    sqInt sz;\r    sqInt classFormat;\r    sqInt class;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\thdr = longAt(array);\r\tfmt = (((usqInt) hdr) >> 8) & 15;\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((hdr & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(array - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz = hdr & (SIZE_MASK);\r\t}\r\tsz -= hdr & (SIZE_4_BIT);\r\tif (fmt <= 4) {\r\t\ttotalLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tgoto l2;\r\t}\r\tif (fmt < 8) {\r\t\ttotalLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> 2;\r\t\tgoto l2;\r\t} else {\r\t\ttotalLength = (sz - (BASE_HEADER_SIZE)) - (fmt & 3);\r\t\tgoto l2;\r\t}\rl2:\t/* end lengthOf:baseHeader:format: */;\r\t/* begin fixedFieldsOf:format:length: */\r\tif ((fmt > 4) || (fmt == 2)) {\r\t\tfixedFields = 0;\r\t\tgoto l4;\r\t}\r\tif (fmt < 2) {\r\t\tfixedFields = totalLength;\r\t\tgoto l4;\r\t}\r\t/* begin fetchClassOf: */\r\tif ((array & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tclass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l3;\r\t}\r\tccIndex = (((usqInt) (longAt(array))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tclass = (longAt(array - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l3;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tclass = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l3;\r\t}\rl3:\t/* end fetchClassOf: */;\r\tclassFormat = (longAt((class + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1;\r\tfixedFields = (((((usqInt) classFormat) >> 11) & 192) + ((((usqInt) classFormat) >> 2) & 63)) - 1;\rl4:\t/* end fixedFieldsOf:format:length: */;\r\tif ((fmt == 3) && ((((((usqInt) hdr) >> 12) & 31) == 13) || ((((((usqInt) hdr) >> 12) & 31) == 14) || (((((usqInt) hdr) >> 12) & 31) == 4)))) {\r\t\t/* begin fetchStackPointerOf: */\r\t\tsp = longAt((array + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)));\r\t\tif (!((sp & 1))) {\r\t\t\tstSize = 0;\r\t\t\tgoto l1;\r\t\t}\r\t\tstSize = (sp >> 1);\r\tl1:\t/* end fetchStackPointerOf: */;\r\t} else {\r\t\tstSize = totalLength - fixedFields;\r\t}\r\tif (((((usqInt) index)) >= (((usqInt) 1))) && ((((usqInt) index)) <= (((usqInt) stSize)))) {\r\t\t/* begin subscript:with:format: */\r\t\tif (fmt <= 4) {\r\t\t\treturn longAt((array + (BASE_HEADER_SIZE)) + (((index + fixedFields) - 1) << (SHIFT_FOR_WORD)));\r\t\t}\r\t\tif (fmt < 8) {\r\t\t\treturn positive32BitIntegerFor(long32At((array + (BASE_HEADER_SIZE)) + (((index + fixedFields) - 1) << 2)));\r\t\t} else {\r\t\t\treturn (((byteAt((array + (BASE_HEADER_SIZE)) + ((index + fixedFields) - 1))) << 1) | 1);\r\t\t}\r\t\treturn null;\r\t} else {\r\t\tfoo->successFlag = 0;\r\t\treturn 0;\r\t}\r}\r\r\r/*\tDo what ST would return for <obj> at: index put: value. */\r\rsqInt stObjectatput(sqInt array, sqInt index, sqInt value) {\rregister struct foo * foo = &fum;\r    sqInt totalLength;\r    sqInt fmt;\r    sqInt fixedFields;\r    sqInt hdr;\r    sqInt stSize;\r    sqInt sp;\r    sqInt valueToStore;\r    sqInt sz;\r    sqInt classFormat;\r    sqInt class;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\thdr = longAt(array);\r\tfmt = (((usqInt) hdr) >> 8) & 15;\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((hdr & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(array - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz = hdr & (SIZE_MASK);\r\t}\r\tsz -= hdr & (SIZE_4_BIT);\r\tif (fmt <= 4) {\r\t\ttotalLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tgoto l2;\r\t}\r\tif (fmt < 8) {\r\t\ttotalLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> 2;\r\t\tgoto l2;\r\t} else {\r\t\ttotalLength = (sz - (BASE_HEADER_SIZE)) - (fmt & 3);\r\t\tgoto l2;\r\t}\rl2:\t/* end lengthOf:baseHeader:format: */;\r\t/* begin fixedFieldsOf:format:length: */\r\tif ((fmt > 4) || (fmt == 2)) {\r\t\tfixedFields = 0;\r\t\tgoto l4;\r\t}\r\tif (fmt < 2) {\r\t\tfixedFields = totalLength;\r\t\tgoto l4;\r\t}\r\t/* begin fetchClassOf: */\r\tif ((array & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tclass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l3;\r\t}\r\tccIndex = (((usqInt) (longAt(array))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tclass = (longAt(array - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l3;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tclass = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l3;\r\t}\rl3:\t/* end fetchClassOf: */;\r\tclassFormat = (longAt((class + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1;\r\tfixedFields = (((((usqInt) classFormat) >> 11) & 192) + ((((usqInt) classFormat) >> 2) & 63)) - 1;\rl4:\t/* end fixedFieldsOf:format:length: */;\r\tif ((fmt == 3) && ((((((usqInt) hdr) >> 12) & 31) == 13) || ((((((usqInt) hdr) >> 12) & 31) == 14) || (((((usqInt) hdr) >> 12) & 31) == 4)))) {\r\t\t/* begin fetchStackPointerOf: */\r\t\tsp = longAt((array + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)));\r\t\tif (!((sp & 1))) {\r\t\t\tstSize = 0;\r\t\t\tgoto l1;\r\t\t}\r\t\tstSize = (sp >> 1);\r\tl1:\t/* end fetchStackPointerOf: */;\r\t} else {\r\t\tstSize = totalLength - fixedFields;\r\t}\r\tif (((((usqInt) index)) >= (((usqInt) 1))) && ((((usqInt) index)) <= (((usqInt) stSize)))) {\r\t\t/* begin subscript:with:storing:format: */\r\t\tif (fmt <= 4) {\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tif ((((usqInt) array)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(array, value);\r\t\t\t}\r\t\t\tlongAtput((array + (BASE_HEADER_SIZE)) + (((index + fixedFields) - 1) << (SHIFT_FOR_WORD)), value);\r\t\t} else {\r\t\t\tif (fmt < 8) {\r\t\t\t\tvalueToStore = positive32BitValueOf(value);\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\tlong32Atput((array + (BASE_HEADER_SIZE)) + (((index + fixedFields) - 1) << 2), valueToStore);\r\t\t\t\t}\r\t\t\t} else {\r\t\t\t\tif (!((value & 1))) {\r\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t}\r\t\t\t\tvalueToStore = (value >> 1);\r\t\t\t\tif (!((valueToStore >= 0) && (valueToStore <= 255))) {\r\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t}\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\tbyteAtput((array + (BASE_HEADER_SIZE)) + ((index + fixedFields) - 1), valueToStore);\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t} else {\r\t\tfoo->successFlag = 0;\r\t}\r}\r\r\r/*\tReturn the number of indexable fields in the given object. (i.e., what Smalltalk would return for <obj> size). */\r/*\tNote: Assume oop is not a SmallInteger! */\r\rsqInt stSizeOf(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt totalLength;\r    sqInt fmt;\r    sqInt fixedFields;\r    sqInt hdr;\r    sqInt sp;\r    sqInt sz;\r    sqInt classFormat;\r    sqInt class;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\thdr = longAt(oop);\r\tfmt = (((usqInt) hdr) >> 8) & 15;\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((hdr & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz = hdr & (SIZE_MASK);\r\t}\r\tsz -= hdr & (SIZE_4_BIT);\r\tif (fmt <= 4) {\r\t\ttotalLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tgoto l1;\r\t}\r\tif (fmt < 8) {\r\t\ttotalLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> 2;\r\t\tgoto l1;\r\t} else {\r\t\ttotalLength = (sz - (BASE_HEADER_SIZE)) - (fmt & 3);\r\t\tgoto l1;\r\t}\rl1:\t/* end lengthOf:baseHeader:format: */;\r\t/* begin fixedFieldsOf:format:length: */\r\tif ((fmt > 4) || (fmt == 2)) {\r\t\tfixedFields = 0;\r\t\tgoto l3;\r\t}\r\tif (fmt < 2) {\r\t\tfixedFields = totalLength;\r\t\tgoto l3;\r\t}\r\t/* begin fetchClassOf: */\r\tif ((oop & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tclass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l2;\r\t}\r\tccIndex = (((usqInt) (longAt(oop))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tclass = (longAt(oop - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tclass = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l2;\r\t}\rl2:\t/* end fetchClassOf: */;\r\tclassFormat = (longAt((class + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1;\r\tfixedFields = (((((usqInt) classFormat) >> 11) & 192) + ((((usqInt) classFormat) >> 2) & 63)) - 1;\rl3:\t/* end fixedFieldsOf:format:length: */;\r\tif ((fmt == 3) && ((((((usqInt) hdr) >> 12) & 31) == 13) || ((((((usqInt) hdr) >> 12) & 31) == 14) || (((((usqInt) hdr) >> 12) & 31) == 4)))) {\r\t\t/* begin fetchStackPointerOf: */\r\t\tsp = longAt((oop + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)));\r\t\tif (!((sp & 1))) {\r\t\t\treturn 0;\r\t\t}\r\t\treturn (sp >> 1);\r\t} else {\r\t\treturn totalLength - fixedFields;\r\t}\r}\r\r\r/*\tNote: May be called by translated primitive code. */\r\rdouble stackFloatValue(sqInt offset) {\rregister struct foo * foo = &fum;\r    double  result;\r    sqInt floatPointer;\r\r\tfloatPointer = longAt(foo->stackPointer - (offset * (BYTES_PER_WORD)));\r\tif (!((fetchClassOf(floatPointer)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop)))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn 0.0;\r\t}\r\t;\r\tfetchFloatAtinto(floatPointer + (BASE_HEADER_SIZE), result);\r\treturn result;\r}\r\rsqInt stackIntegerValue(sqInt offset) {\rregister struct foo * foo = &fum;\r    sqInt integerPointer;\r\r\tintegerPointer = longAt(foo->stackPointer - (offset * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\treturn (integerPointer >> 1);\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn 0;\r\t}\r\treturn null;\r}\r\r\r/*\tEnsures that the given object is a real object, not a SmallInteger. */\r\rsqInt stackObjectValue(sqInt offset) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r\r\toop = longAt(foo->stackPointer - (offset * (BYTES_PER_WORD)));\r\tif ((oop & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\treturn oop;\r}\r\rsqInt stackValue(sqInt offset) {\r\treturn longAt(foo->stackPointer - (offset * (BYTES_PER_WORD)));\r}\r\r\r/*\tNote: May be called by translated primitive code. */\r\rsqInt storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integerValue) {\r\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t(((((int) integerValue)) ^ ((((int) integerValue)) << 1)) >= 0)\r# else\r\t\t((integerValue >= -1073741824) && (integerValue <= 1073741823))\r# endif  // SQ_HOST32\r\t) {\r\t\tlongAtput((objectPointer + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), ((integerValue << 1) | 1));\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t}\r}\r\r\r/*\tNote must check here for stores of young objects into old ones. */\r\rsqInt storePointerofObjectwithValue(sqInt fieldIndex, sqInt oop, sqInt valuePointer) {\r\tif ((((usqInt) oop)) < (((usqInt) foo->youngStart))) {\r\t\tpossibleRootStoreIntovalue(oop, valuePointer);\r\t}\r\treturn longAtput((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), valuePointer);\r}\r\rsqInt success(sqInt successValue) {\rregister struct foo * foo = &fum;\r\tfoo->successFlag = successValue && foo->successFlag;\r}\r\r\r/*\tReturn true if there is enough free space after doing a garbage collection. If not, signal that space is low. */\r\rsqInt sufficientSpaceAfterGC(usqInt minFree) {\rregister struct foo * foo = &fum;\r    usqInt minFreePlus;\r    usqInt growSize;\r\r\tincrementalGC();\r\tif (oopisLessThan((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), minFree)) {\r\t\tif (foo->signalLowSpace) {\r\t\t\treturn 0;\r\t\t}\r\t\tfullGC();\r\t\tminFreePlus = minFree + 15000;\r\t\tif (minFreePlus < minFree) {\r\t\t\treturn 0;\r\t\t}\r\t\tif (oopisGreaterThanOrEqualTo((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), minFreePlus)) {\r\t\t\treturn 1;\r\t\t}\r\t\tgrowSize = (minFree - ((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK))) + foo->growHeadroom;\r\t\tgrowObjectMemory(growSize);\r\t\tif (oopisGreaterThanOrEqualTo((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), minFreePlus)) {\r\t\t\treturn 1;\r\t\t}\r\t\treturn 0;\r\t}\r\treturn 1;\r}\r\r\r/*\tReturn true if there is enough space to allocate the given number of bytes,\r\tperhaps after doing a garbage collection. Sender is responsible for ensuring\r\tthat requested size does result in arithmetic overflow, see note below. */\r\rsqInt sufficientSpaceToAllocate(usqInt bytes) {\rregister struct foo * foo = &fum;\r    usqInt minFree;\r\r\r\t/* check for low-space */\r\r\tminFree = (foo->lowSpaceThreshold + bytes) + (BASE_HEADER_SIZE);\r\tif (oopisGreaterThanOrEqualTo((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), minFree)) {\r\t\treturn 1;\r\t} else {\r\t\treturn sufficientSpaceAfterGC(minFree);\r\t}\r}\r\rsqInt superclassOf(sqInt classPointer) {\r\treturn longAt((classPointer + (BASE_HEADER_SIZE)) + (SuperclassIndex << (SHIFT_FOR_WORD)));\r}\r\r\r/*\tSweep memory from youngStart through the end of memory. Free all \r\tinaccessible objects and coalesce adjacent free chunks. Clear the mark \r\tbits of accessible objects. Compute the starting point for the first pass of \r\tincremental compaction (compStart). Return the number of surviving \r\tobjects.  */\r/*\tDetails: Each time a non-free object is encountered, decrement the \r\tnumber of available forward table entries. If all entries are spoken for \r\t(i.e., entriesAvailable reaches zero), set compStart to the last free \r\tchunk before that object or, if there is no free chunk before the given \r\tobject, the first free chunk after it. Thus, at the end of the sweep \r\tphase, compStart through compEnd spans the highest collection of \r\tnon-free objects that can be accomodated by the forwarding table. This \r\tinformation is used by the first pass of incremental compaction to \r\tensure that space is initially freed at the end of memory. Note that \r\tthere should always be at least one free chunk--the one at the end of \r\tthe heap. */\r\rsqInt sweepPhase(void) {\rregister struct foo * foo = &fum;\r    sqInt oopSize;\r    usqInt oop;\r    sqInt entriesAvailable;\r    sqInt freeChunkSize;\r    sqInt hdrBytes;\r    sqInt oopHeaderType;\r    sqInt firstFree;\r    usqInt endOfMemoryLocal;\r    sqInt freeChunk;\r    sqInt oopHeader;\r    sqInt survivors;\r\r\tentriesAvailable = fwdTableInit((BYTES_PER_WORD) * 2);\r\tsurvivors = 0;\r\r\t/* an invalid object pointer, note that 0 may refer to a meaningful slot */\r\r\tfreeChunk = -1;\r\r\t/* will be updated later */\r\r\tfirstFree = -1;\r\tendOfMemoryLocal = foo->endOfMemory;\r\toop = foo->youngStart + (foo->headerTypeBytes[(longAt(foo->youngStart)) & TypeMask]);\r\twhile (oop < endOfMemoryLocal) {\r\r\t\t/* get oop's header, header type, size, and header size */\r\r\t\tfoo->statSweepCount += 1;\r\t\toopHeader = longAt(oop);\r\t\toopHeaderType = oopHeader & TypeMask;\r\t\thdrBytes = foo->headerTypeBytes[oopHeaderType];\r\t\tif ((oopHeaderType & 1) == 1) {\r\t\t\toopSize = oopHeader & (SIZE_MASK);\r\t\t} else {\r\t\t\tif (oopHeaderType == HeaderTypeSizeAndClass) {\r\t\t\t\toopSize = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t} else {\r\r\t\t\t\t/* free chunk */\r\r\t\t\t\toopSize = oopHeader & (LONG_SIZE_MASK);\r\t\t\t}\r\t\t}\r\t\tif ((oopHeader & (MARK_BIT)) == 0) {\r\t\t\tlongAtput(oop - hdrBytes, HeaderTypeFree);\r\t\t\tif (freeChunk != -1) {\r\r\t\t\t\t/* enlarge current free chunk to include this oop */\r\r\t\t\t\tfreeChunkSize = (freeChunkSize + oopSize) + hdrBytes;\r\t\t\t} else {\r\r\t\t\t\t/* start a new free chunk */\r\t\t\t\t/* chunk may start 4 or 8 bytes before oop */\r\r\t\t\t\tfreeChunk = oop - hdrBytes;\r\r\t\t\t\t/* adjust size for possible extra header bytes */\r\r\t\t\t\tfreeChunkSize = oopSize + (oop - freeChunk);\r\t\t\t\tif (firstFree == -1) {\r\t\t\t\t\tfirstFree = freeChunk;\r\t\t\t\t}\r\t\t\t}\r\t\t} else {\r\t\t\tlongAtput(oop, oopHeader & (ALL_BUT_MARK_BIT));\r\t\t\tif (((((usqInt) (longAt(oop))) >> 8) & 15) == 4) {\r\t\t\t\tfinalizeReference(oop);\r\t\t\t}\r\t\t\tif (entriesAvailable > 0) {\r\t\t\t\tentriesAvailable -= 1;\r\t\t\t} else {\r\r\t\t\t\t/* start compaction at the last free chunk before this object */\r\r\t\t\t\tfirstFree = freeChunk;\r\t\t\t}\r\t\t\tif (freeChunk != -1) {\r\t\t\t\tlongAtput(freeChunk, (freeChunkSize & (LONG_SIZE_MASK)) | HeaderTypeFree);\r\t\t\t\tfreeChunk = -1;\r\t\t\t}\r\t\t\tsurvivors += 1;\r\t\t}\r\t\toop = (oop + oopSize) + (foo->headerTypeBytes[(longAt(oop + oopSize)) & TypeMask]);\r\t}\r\tif (freeChunk != -1) {\r\t\tlongAtput(freeChunk, (freeChunkSize & (LONG_SIZE_MASK)) | HeaderTypeFree);\r\t}\r\tif (!(oop == foo->endOfMemory)) {\r\t\terror(\"sweep failed to find exact end of memory\");\r\t}\r\tif (firstFree == -1) {\r\t\terror(\"expected to find at least one free object\");\r\t} else {\r\t\tfoo->compStart = firstFree;\r\t}\r\treturn survivors;\r}\r\r\r/*\tSignal the given semaphore from within the interpreter. */\r\rsqInt synchronousSignal(sqInt aSemaphore) {\rregister struct foo * foo = &fum;\r    sqInt excessSignals;\r\r\tif ((longAt((aSemaphore + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)))) == foo->nilObj) {\r\r\t\t/* no process is waiting on this semaphore */\r\r\t\texcessSignals = fetchIntegerofObject(ExcessSignalsIndex, aSemaphore);\r\t\t/* begin storeInteger:ofObject:withValue: */\r\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t(((((int) (excessSignals + 1))) ^ ((((int) (excessSignals + 1))) << 1)) >= 0)\r# else\r\t\t\t(((excessSignals + 1) >= -1073741824) && ((excessSignals + 1) <= 1073741823))\r# endif  // SQ_HOST32\r\t\t) {\r\t\t\tlongAtput((aSemaphore + (BASE_HEADER_SIZE)) + (ExcessSignalsIndex << (SHIFT_FOR_WORD)), (((excessSignals + 1) << 1) | 1));\r\t\t} else {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t}\r\t} else {\r\t\tresume(removeFirstLinkOfList(aSemaphore));\r\t}\r}\r\r\r/*\tRecord a process to be awoken on the next interpreter cycle. \r\tikp 11/24/1999 06:07 -- added hook for external runtime \r\tcompiler  */\r\rsqInt transferTo(sqInt aProc) {\rregister struct foo * foo = &fum;\r    sqInt sched;\r    sqInt oldProc;\r    sqInt newProc;\r    sqInt oop;\r    sqInt valuePointer;\r    sqInt aContext;\r    sqInt valuePointer1;\r    sqInt oop1;\r    sqInt activeCntx;\r    sqInt valuePointer2;\r    sqInt valuePointer11;\r    sqInt tmp;\r\r\tnewProc = aProc;\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\toop1 = foo->specialObjectsOop;\r\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\tsched = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\toldProc = longAt((sched + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)));\r\t/* begin storePointer:ofObject:withValue: */\r\tif ((((usqInt) sched)) < (((usqInt) foo->youngStart))) {\r\t\tpossibleRootStoreIntovalue(sched, newProc);\r\t}\r\tlongAtput((sched + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)), newProc);\r\tif (foo->compilerInitialized) {\r\t\tcompilerProcessChangeto(oldProc, newProc);\r\t} else {\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer = foo->activeContext;\r\t\tif ((((usqInt) oldProc)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(oldProc, valuePointer);\r\t\t}\r\t\tlongAtput((oldProc + (BASE_HEADER_SIZE)) + (SuspendedContextIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t/* begin newActiveContext: */\r\t\taContext = longAt((newProc + (BASE_HEADER_SIZE)) + (SuspendedContextIndex << (SHIFT_FOR_WORD)));\r\t\t/* begin storeContextRegisters: */\r\t\tactiveCntx = foo->activeContext;\r\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\tvaluePointer2 = ((((foo->instructionPointer - foo->method) - ((BASE_HEADER_SIZE) - 2)) << 1) | 1);\r\t\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), valuePointer2);\r\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\tvaluePointer11 = (((((((usqInt) ((foo->stackPointer - foo->activeContext) - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD)) - TempFrameStart) + 1) << 1) | 1);\r\t\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)), valuePointer11);\r\t\tif ((((usqInt) aContext)) < (((usqInt) foo->youngStart))) {\r\t\t\tbeRootIfOld(aContext);\r\t\t}\r\t\tfoo->activeContext = aContext;\r\t\t/* begin fetchContextRegisters: */\r\t\ttmp = longAt((aContext + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\t\tif ((tmp & 1)) {\r\t\t\ttmp = longAt((aContext + (BASE_HEADER_SIZE)) + (HomeIndex << (SHIFT_FOR_WORD)));\r\t\t\tif ((((usqInt) tmp)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tbeRootIfOld(tmp);\r\t\t\t}\r\t\t} else {\r\t\t\ttmp = aContext;\r\t\t}\r\t\tfoo->theHomeContext = tmp;\r\t\tfoo->receiver = longAt((tmp + (BASE_HEADER_SIZE)) + (ReceiverIndex << (SHIFT_FOR_WORD)));\r\t\tfoo->method = longAt((tmp + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\t\ttmp = ((longAt((aContext + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\t\tfoo->instructionPointer = ((foo->method + tmp) + (BASE_HEADER_SIZE)) - 2;\r\t\ttmp = ((longAt((aContext + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\t\tfoo->stackPointer = (aContext + (BASE_HEADER_SIZE)) + (((TempFrameStart + tmp) - 1) * (BYTES_PER_WORD));\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer1 = foo->nilObj;\r\t\tif ((((usqInt) newProc)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(newProc, valuePointer1);\r\t\t}\r\t\tlongAtput((newProc + (BASE_HEADER_SIZE)) + (SuspendedContextIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\t}\r\tfoo->reclaimableContextCount = 0;\r}\r\rsqInt trueObject(void) {\r\treturn foo->trueObj;\r}\r\r\r/*\tupdate pointers in the given memory range */\r\rsqInt updatePointersInRangeFromto(sqInt memStart, sqInt memEnd) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r    sqInt newOop;\r    sqInt fieldOffset;\r    sqInt fwdBlock;\r    sqInt fieldOop;\r    sqInt size;\r    sqInt header;\r    sqInt fwdBlock1;\r    sqInt contextSize;\r    sqInt fmt;\r    sqInt methodHeader;\r    sqInt sp;\r    sqInt classHeader;\r    sqInt newClassHeader;\r    sqInt fwdBlock2;\r    sqInt newClassOop;\r    sqInt classOop;\r    sqInt sz;\r    sqInt header2;\r    sqInt fwdBlock3;\r    sqInt realHeader;\r    sqInt sz1;\r    sqInt header1;\r\r\toop = memStart + (foo->headerTypeBytes[(longAt(memStart)) & TypeMask]);\r\twhile ((((usqInt) oop)) < (((usqInt) memEnd))) {\r\t\tif (!(((longAt(oop)) & TypeMask) == HeaderTypeFree)) {\r\t\t\t/* begin remapFieldsAndClassOf: */\r\t\t\t/* begin lastPointerWhileForwarding: */\r\t\t\theader = longAt(oop);\r\t\t\tif ((header & (MARK_BIT)) != 0) {\r\t\t\t\tfwdBlock1 = (header & (ALL_BUT_MARK_BIT_AND_TYPE_MASK)) << 1;\r\t\t\t\tif (DoAssertionChecks) {\r\t\t\t\t\t/* begin fwdBlockValidate: */\r\t\t\t\t\tif (!(((((usqInt) fwdBlock1)) > (((usqInt) foo->endOfMemory))) && (((((usqInt) fwdBlock1)) <= (((usqInt) foo->fwdTableNext))) && ((fwdBlock1 & 3) == 0)))) {\r\t\t\t\t\t\terror(\"invalid fwd table entry\");\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\theader = longAt(fwdBlock1 + (BYTES_PER_WORD));\r\t\t\t}\r\t\t\tfmt = (((usqInt) header) >> 8) & 15;\r\t\t\tif (fmt <= 4) {\r\t\t\t\tif ((fmt == 3) && ((((((usqInt) header) >> 12) & 31) == 13) || ((((((usqInt) header) >> 12) & 31) == 14) || (((((usqInt) header) >> 12) & 31) == 4)))) {\r\t\t\t\t\t/* begin fetchStackPointerOf: */\r\t\t\t\t\tsp = longAt((oop + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t\tif (!((sp & 1))) {\r\t\t\t\t\t\tcontextSize = 0;\r\t\t\t\t\t\tgoto l1;\r\t\t\t\t\t}\r\t\t\t\t\tcontextSize = (sp >> 1);\r\t\t\t\tl1:\t/* end fetchStackPointerOf: */;\r\t\t\t\t\tfieldOffset = (CtxtTempFrameStart + contextSize) * (BYTES_PER_WORD);\r\t\t\t\t\tgoto l2;\r\t\t\t\t}\r\t\t\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\t\tsize = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (ALL_BUT_TYPE_MASK);\r\t\t\t\t} else {\r\t\t\t\t\tsize = header & (SIZE_MASK);\r\t\t\t\t}\r\t\t\t\tfieldOffset = size - (BASE_HEADER_SIZE);\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\t\tif (fmt < 12) {\r\t\t\t\tfieldOffset = 0;\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\t\tmethodHeader = longAt(oop + (BASE_HEADER_SIZE));\r\t\t\tfieldOffset = (((((usqInt) methodHeader) >> 10) & 255) * (BYTES_PER_WORD)) + (BASE_HEADER_SIZE);\r\t\tl2:\t/* end lastPointerWhileForwarding: */;\r\t\t\twhile (fieldOffset >= (BASE_HEADER_SIZE)) {\r\t\t\t\tfieldOop = longAt(oop + fieldOffset);\r\t\t\t\tif (((fieldOop & 1) == 0) && (((longAt(fieldOop)) & (MARK_BIT)) != 0)) {\r\t\t\t\t\tfwdBlock = ((longAt(fieldOop)) & (ALL_BUT_MARK_BIT_AND_TYPE_MASK)) << 1;\r\t\t\t\t\tif (DoAssertionChecks) {\r\t\t\t\t\t\t/* begin fwdBlockValidate: */\r\t\t\t\t\t\tif (!(((((usqInt) fwdBlock)) > (((usqInt) foo->endOfMemory))) && (((((usqInt) fwdBlock)) <= (((usqInt) foo->fwdTableNext))) && ((fwdBlock & 3) == 0)))) {\r\t\t\t\t\t\t\terror(\"invalid fwd table entry\");\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tnewOop = longAt(fwdBlock);\r\t\t\t\t\tlongAtput(oop + fieldOffset, newOop);\r\t\t\t\t\tif (((((usqInt) oop)) < (((usqInt) foo->youngStart))) && ((((usqInt) newOop)) >= (((usqInt) foo->youngStart)))) {\r\t\t\t\t\t\tbeRootWhileForwarding(oop);\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\tfieldOffset -= BYTES_PER_WORD;\r\t\t\t}\r\t\t\t/* begin remapClassOf: */\r\t\t\tif (((longAt(oop)) & TypeMask) == HeaderTypeShort) {\r\t\t\t\tgoto l3;\r\t\t\t}\r\t\t\tclassHeader = longAt(oop - (BYTES_PER_WORD));\r\t\t\tclassOop = classHeader & (ALL_BUT_TYPE_MASK);\r\t\t\tif (((classOop & 1) == 0) && (((longAt(classOop)) & (MARK_BIT)) != 0)) {\r\t\t\t\tfwdBlock2 = ((longAt(classOop)) & (ALL_BUT_MARK_BIT_AND_TYPE_MASK)) << 1;\r\t\t\t\tif (DoAssertionChecks) {\r\t\t\t\t\t/* begin fwdBlockValidate: */\r\t\t\t\t\tif (!(((((usqInt) fwdBlock2)) > (((usqInt) foo->endOfMemory))) && (((((usqInt) fwdBlock2)) <= (((usqInt) foo->fwdTableNext))) && ((fwdBlock2 & 3) == 0)))) {\r\t\t\t\t\t\terror(\"invalid fwd table entry\");\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\tnewClassOop = longAt(fwdBlock2);\r\t\t\t\tnewClassHeader = newClassOop | (classHeader & TypeMask);\r\t\t\t\tlongAtput(oop - (BYTES_PER_WORD), newClassHeader);\r\t\t\t\tif (((((usqInt) oop)) < (((usqInt) foo->youngStart))) && ((((usqInt) newClassOop)) >= (((usqInt) foo->youngStart)))) {\r\t\t\t\t\tbeRootWhileForwarding(oop);\r\t\t\t\t}\r\t\t\t}\r\t\tl3:\t/* end remapClassOf: */;\r\t\t}\r\t\t/* begin objectAfterWhileForwarding: */\r\t\theader2 = longAt(oop);\r\t\tif ((header2 & (MARK_BIT)) == 0) {\r\t\t\t/* begin objectAfter: */\r\t\t\tif (DoAssertionChecks) {\r\t\t\t\tif ((((usqInt) oop)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t\t}\r\t\t\t}\r\t\t\tif (((longAt(oop)) & TypeMask) == HeaderTypeFree) {\r\t\t\t\tsz1 = (longAt(oop)) & (ALL_BUT_TYPE_MASK);\r\t\t\t} else {\r\t\t\t\t/* begin sizeBitsOf: */\r\t\t\t\theader1 = longAt(oop);\r\t\t\t\tif ((header1 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\t\tsz1 = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\t\tgoto l4;\r\t\t\t\t} else {\r\t\t\t\t\tsz1 = header1 & (SIZE_MASK);\r\t\t\t\t\tgoto l4;\r\t\t\t\t}\r\t\t\tl4:\t/* end sizeBitsOf: */;\r\t\t\t}\r\t\t\toop = (oop + sz1) + (foo->headerTypeBytes[(longAt(oop + sz1)) & TypeMask]);\r\t\t\tgoto l5;\r\t\t}\r\t\tfwdBlock3 = (header2 & (ALL_BUT_MARK_BIT_AND_TYPE_MASK)) << 1;\r\t\tif (DoAssertionChecks) {\r\t\t\t/* begin fwdBlockValidate: */\r\t\t\tif (!(((((usqInt) fwdBlock3)) > (((usqInt) foo->endOfMemory))) && (((((usqInt) fwdBlock3)) <= (((usqInt) foo->fwdTableNext))) && ((fwdBlock3 & 3) == 0)))) {\r\t\t\t\terror(\"invalid fwd table entry\");\r\t\t\t}\r\t\t}\r\t\trealHeader = longAt(fwdBlock3 + (BYTES_PER_WORD));\r\t\tif ((realHeader & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t} else {\r\t\t\tsz = realHeader & (SIZE_MASK);\r\t\t}\r\t\toop = (oop + sz) + (foo->headerTypeBytes[(longAt(oop + sz)) & TypeMask]);\r\tl5:\t/* end objectAfterWhileForwarding: */;\r\t}\r}\r\r\r/*\tupdate pointers in root objects */\r\rsqInt updatePointersInRootObjectsFromto(sqInt memStart, sqInt memEnd) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r    sqInt i;\r    sqInt newOop;\r    sqInt fieldOffset;\r    sqInt fwdBlock;\r    sqInt fieldOop;\r    sqInt size;\r    sqInt header;\r    sqInt fwdBlock1;\r    sqInt contextSize;\r    sqInt fmt;\r    sqInt methodHeader;\r    sqInt sp;\r    sqInt classHeader;\r    sqInt newClassHeader;\r    sqInt fwdBlock2;\r    sqInt newClassOop;\r    sqInt classOop;\r\r\tfor (i = 1; i <= foo->rootTableCount; i += 1) {\r\t\toop = foo->rootTable[i];\r\t\tif (((((usqInt) oop)) < (((usqInt) memStart))) || ((((usqInt) oop)) >= (((usqInt) memEnd)))) {\r\t\t\t/* begin remapFieldsAndClassOf: */\r\t\t\t/* begin lastPointerWhileForwarding: */\r\t\t\theader = longAt(oop);\r\t\t\tif ((header & (MARK_BIT)) != 0) {\r\t\t\t\tfwdBlock1 = (header & (ALL_BUT_MARK_BIT_AND_TYPE_MASK)) << 1;\r\t\t\t\tif (DoAssertionChecks) {\r\t\t\t\t\t/* begin fwdBlockValidate: */\r\t\t\t\t\tif (!(((((usqInt) fwdBlock1)) > (((usqInt) foo->endOfMemory))) && (((((usqInt) fwdBlock1)) <= (((usqInt) foo->fwdTableNext))) && ((fwdBlock1 & 3) == 0)))) {\r\t\t\t\t\t\terror(\"invalid fwd table entry\");\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\theader = longAt(fwdBlock1 + (BYTES_PER_WORD));\r\t\t\t}\r\t\t\tfmt = (((usqInt) header) >> 8) & 15;\r\t\t\tif (fmt <= 4) {\r\t\t\t\tif ((fmt == 3) && ((((((usqInt) header) >> 12) & 31) == 13) || ((((((usqInt) header) >> 12) & 31) == 14) || (((((usqInt) header) >> 12) & 31) == 4)))) {\r\t\t\t\t\t/* begin fetchStackPointerOf: */\r\t\t\t\t\tsp = longAt((oop + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t\tif (!((sp & 1))) {\r\t\t\t\t\t\tcontextSize = 0;\r\t\t\t\t\t\tgoto l1;\r\t\t\t\t\t}\r\t\t\t\t\tcontextSize = (sp >> 1);\r\t\t\t\tl1:\t/* end fetchStackPointerOf: */;\r\t\t\t\t\tfieldOffset = (CtxtTempFrameStart + contextSize) * (BYTES_PER_WORD);\r\t\t\t\t\tgoto l2;\r\t\t\t\t}\r\t\t\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\t\tsize = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (ALL_BUT_TYPE_MASK);\r\t\t\t\t} else {\r\t\t\t\t\tsize = header & (SIZE_MASK);\r\t\t\t\t}\r\t\t\t\tfieldOffset = size - (BASE_HEADER_SIZE);\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\t\tif (fmt < 12) {\r\t\t\t\tfieldOffset = 0;\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\t\tmethodHeader = longAt(oop + (BASE_HEADER_SIZE));\r\t\t\tfieldOffset = (((((usqInt) methodHeader) >> 10) & 255) * (BYTES_PER_WORD)) + (BASE_HEADER_SIZE);\r\t\tl2:\t/* end lastPointerWhileForwarding: */;\r\t\t\twhile (fieldOffset >= (BASE_HEADER_SIZE)) {\r\t\t\t\tfieldOop = longAt(oop + fieldOffset);\r\t\t\t\tif (((fieldOop & 1) == 0) && (((longAt(fieldOop)) & (MARK_BIT)) != 0)) {\r\t\t\t\t\tfwdBlock = ((longAt(fieldOop)) & (ALL_BUT_MARK_BIT_AND_TYPE_MASK)) << 1;\r\t\t\t\t\tif (DoAssertionChecks) {\r\t\t\t\t\t\t/* begin fwdBlockValidate: */\r\t\t\t\t\t\tif (!(((((usqInt) fwdBlock)) > (((usqInt) foo->endOfMemory))) && (((((usqInt) fwdBlock)) <= (((usqInt) foo->fwdTableNext))) && ((fwdBlock & 3) == 0)))) {\r\t\t\t\t\t\t\terror(\"invalid fwd table entry\");\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tnewOop = longAt(fwdBlock);\r\t\t\t\t\tlongAtput(oop + fieldOffset, newOop);\r\t\t\t\t\tif (((((usqInt) oop)) < (((usqInt) foo->youngStart))) && ((((usqInt) newOop)) >= (((usqInt) foo->youngStart)))) {\r\t\t\t\t\t\tbeRootWhileForwarding(oop);\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\tfieldOffset -= BYTES_PER_WORD;\r\t\t\t}\r\t\t\t/* begin remapClassOf: */\r\t\t\tif (((longAt(oop)) & TypeMask) == HeaderTypeShort) {\r\t\t\t\tgoto l3;\r\t\t\t}\r\t\t\tclassHeader = longAt(oop - (BYTES_PER_WORD));\r\t\t\tclassOop = classHeader & (ALL_BUT_TYPE_MASK);\r\t\t\tif (((classOop & 1) == 0) && (((longAt(classOop)) & (MARK_BIT)) != 0)) {\r\t\t\t\tfwdBlock2 = ((longAt(classOop)) & (ALL_BUT_MARK_BIT_AND_TYPE_MASK)) << 1;\r\t\t\t\tif (DoAssertionChecks) {\r\t\t\t\t\t/* begin fwdBlockValidate: */\r\t\t\t\t\tif (!(((((usqInt) fwdBlock2)) > (((usqInt) foo->endOfMemory))) && (((((usqInt) fwdBlock2)) <= (((usqInt) foo->fwdTableNext))) && ((fwdBlock2 & 3) == 0)))) {\r\t\t\t\t\t\terror(\"invalid fwd table entry\");\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\tnewClassOop = longAt(fwdBlock2);\r\t\t\t\tnewClassHeader = newClassOop | (classHeader & TypeMask);\r\t\t\t\tlongAtput(oop - (BYTES_PER_WORD), newClassHeader);\r\t\t\t\tif (((((usqInt) oop)) < (((usqInt) foo->youngStart))) && ((((usqInt) newClassOop)) >= (((usqInt) foo->youngStart)))) {\r\t\t\t\t\tbeRootWhileForwarding(oop);\r\t\t\t\t}\r\t\t\t}\r\t\tl3:\t/* end remapClassOf: */;\r\t\t}\r\t}\r}\r\r\r/*\tVerify that every old object that points to a new object \r\t\thas its root bit set, and\r\t\tappears in the rootTable.\r\tThis method should not be called if the rootTable is full, because roots\r\tare no longer recorded, and incremental collections are not attempted.\r\tIf DoAssertionChecks is true, this routine will halt on an unmarked root.\r\tOtherwise, this routine will merely return true in that case. */\r\rsqInt validateRoots(void) {\rregister struct foo * foo = &fum;\r    usqInt fieldAddr;\r    usqInt oop;\r    sqInt header;\r    usqInt fieldOop;\r    sqInt badRoot;\r    sqInt sz;\r    sqInt header1;\r\r\tbadRoot = 0;\r\toop = memory + (foo->headerTypeBytes[(longAt(memory)) & TypeMask]);\r\twhile (oop < foo->youngStart) {\r\t\tif (!(((longAt(oop)) & TypeMask) == HeaderTypeFree)) {\r\t\t\tfieldAddr = oop + (lastPointerOf(oop));\r\t\t\twhile (fieldAddr > oop) {\r\t\t\t\tfieldOop = longAt(fieldAddr);\r\t\t\t\tif ((fieldOop >= foo->youngStart) && (!((fieldOop & 1)))) {\r\r\t\t\t\t\t/* fieldOop is a pointer to a young object */\r\r\t\t\t\t\theader = longAt(oop);\r\t\t\t\t\tif ((header & (ROOT_BIT)) == 0) {\r\t\t\t\t\t\tif (DoAssertionChecks) {\r\t\t\t\t\t\t\terror(\"root bit not set\");\r\t\t\t\t\t\t}\r\t\t\t\t\t\tbadRoot = 1;\r\t\t\t\t\t} else {\r\t\t\t\t\t\tnull;\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\tfieldAddr -= BYTES_PER_WORD;\r\t\t\t}\r\t\t}\r\t\t/* begin objectAfter: */\r\t\tif (DoAssertionChecks) {\r\t\t\tif ((((usqInt) oop)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t}\r\t\t}\r\t\tif (((longAt(oop)) & TypeMask) == HeaderTypeFree) {\r\t\t\tsz = (longAt(oop)) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader1 = longAt(oop);\r\t\t\tif ((header1 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tsz = header1 & (SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\tl1:\t/* end sizeBitsOf: */;\r\t\t}\r\t\toop = (oop + sz) + (foo->headerTypeBytes[(longAt(oop + sz)) & TypeMask]);\r\t}\r\treturn badRoot;\r}\r\rsqInt verifyCleanHeaders(void) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r    sqInt sz;\r    sqInt header;\r\r\toop = memory + (foo->headerTypeBytes[(longAt(memory)) & TypeMask]);\r\twhile ((((usqInt) oop)) < (((usqInt) foo->endOfMemory))) {\r\t\tif (((longAt(oop)) & TypeMask) == HeaderTypeFree) {\r\t\t\tif (!((objectAfter(oop)) == foo->endOfMemory)) {\r\t\t\t\terror(\"Invalid obj with HeaderTypeBits = Free.\");\r\t\t\t}\r\t\t} else {\r\t\t\tif (!(((longAt(oop)) & (MARK_BIT)) == 0)) {\r\t\t\t\terror(\"Invalid obj with MarkBit set.\");\r\t\t\t}\r\t\t}\r\t\t/* begin objectAfter: */\r\t\tif (DoAssertionChecks) {\r\t\t\tif ((((usqInt) oop)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t}\r\t\t}\r\t\tif (((longAt(oop)) & TypeMask) == HeaderTypeFree) {\r\t\t\tsz = (longAt(oop)) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader = longAt(oop);\r\t\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tsz = header & (SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\tl1:\t/* end sizeBitsOf: */;\r\t\t}\r\t\toop = (oop + sz) + (foo->headerTypeBytes[(longAt(oop + sz)) & TypeMask]);\r\t}\r}\r\r\r/*\treturn 0 for little endian, 1 for big endian */\r\rsqInt vmEndianness(void) {\r\tif (isBigEnder()) {\r\t\treturn 1;\r\t} else {\r\t\treturn 0;\r\t}\r}\r\r\r/*\tReturn the highest priority process that is ready to run. */\r/*\tNote: It is a fatal VM error if there is no runnable process. */\r\rsqInt wakeHighestPriority(void) {\rregister struct foo * foo = &fum;\r    sqInt p;\r    sqInt schedLists;\r    sqInt processList;\r    sqInt oop;\r    sqInt sz;\r    sqInt oop1;\r    sqInt header;\r    sqInt oop2;\r\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\toop2 = foo->specialObjectsOop;\r\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\tschedLists = longAt((oop + (BASE_HEADER_SIZE)) + (ProcessListsIndex << (SHIFT_FOR_WORD)));\r\t/* begin fetchWordLengthOf: */\r\t/* begin sizeBitsOf: */\r\theader = longAt(schedLists);\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(schedLists - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\tsz = header & (SIZE_MASK);\r\t\tgoto l1;\r\t}\rl1:\t/* end sizeBitsOf: */;\r\tp = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\r\t/* index of last indexable field */\r\r\tp -= 1;\r\tprocessList = longAt((schedLists + (BASE_HEADER_SIZE)) + (p << (SHIFT_FOR_WORD)));\r\twhile ((longAt((processList + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)))) == foo->nilObj) {\r\t\tp -= 1;\r\t\tif (p < 0) {\r\t\t\terror(\"scheduler could not find a runnable process\");\r\t\t}\r\t\tprocessList = longAt((schedLists + (BASE_HEADER_SIZE)) + (p << (SHIFT_FOR_WORD)));\r\t}\r\treturn removeFirstLinkOfList(processList);\r}\r\r\r/*\tReturn the given 64-bit integer with its halves in the reverse order. */\r\rsqInt wordSwapped(sqInt w) {\r\t\r# if (BYTES_PER_WORD == 8)  // swap 32-bit ends of a 64-bit object word\r\treturn ((((usqInt) w >> 32)) & Bytes3to0Mask) + ((((usqInt) w << 32)) & Bytes7to4Mask);\r# else\r\terror(\"This cannot happen.\");\r# endif  // BYTES_PER_WORD == 8\r\t\r}\r\rsqInt writeImageFile(sqInt imageBytes) {\r    void * fn;\r\r\twriteImageFileIO(imageBytes);\r\tfn = ioLoadFunctionFrom(\"setMacFileTypeAndCreator\", \"FilePlugin\");\r\tif (!(fn == 0)) {\r\t\t((sqInt (*)(char*, char*, char*))fn)(imageName, \"STim\", \"FAST\");\r\t}\r}\r\rsqInt writeImageFileIO(sqInt imageBytes) {\rregister struct foo * foo = &fum;\r    sqInt headerSize;\r    sqInt i;\r    void * sCWIfn;\r    squeakFileOffsetType  headerStart;\r    size_t bytesWritten;\r    sqInt okToWrite;\r    sqImageFile f;\r    char * memoryAddress;\r\r\tsCWIfn = ioLoadFunctionFrom(\"secCanWriteImage\", \"SecurityPlugin\");\r\tif (sCWIfn != 0) {\r\t\tokToWrite = ((sqInt (*)(void))sCWIfn)();\r\t\tif (!(okToWrite)) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t}\r\theaderStart = 0;\r\r\t/* header size in bytes; do not change! */\r\r\theaderSize = 64;\r\tf = sqImageFileOpen(imageName, \"wb\");\r\tif (f == null) {\r\t\t/* begin success: */\r\t\tfoo->successFlag = 0 && foo->successFlag;\r\t\treturn null;\r\t}\r\theaderStart = sqImageFileStartLocation(f,imageName,headerSize+imageBytes);\r\t/* Note: on Unix systems one could put an exec command here, padded to 512 bytes */;\r\tsqImageFileSeek(f, headerStart);\r\tputLongtoFile(imageFormatVersionNumber, f);\r\tputLongtoFile(headerSize, f);\r\tputLongtoFile(imageBytes, f);\r\tputLongtoFile(memory, f);\r\tputLongtoFile(foo->specialObjectsOop, f);\r\tputLongtoFile(foo->lastHash, f);\r\tputLongtoFile(ioScreenSize(), f);\r\tputLongtoFile(foo->fullScreenFlag, f);\r\tputLongtoFile(extraVMMemory, f);\r\tfor (i = 1; i <= 7; i += 1) {\r\t\tputLongtoFile(0, f);\r\t}\r\tif (!(foo->successFlag)) {\r\t\tsqImageFileClose(f);\r\t\treturn null;\r\t}\r\tsqImageFileSeek(f, headerStart + headerSize);\r\t/* begin sqImage:write:size:length: */\r\tmemoryAddress = pointerForOop(memory);\r\tbytesWritten = sqImageFileWrite(memoryAddress, sizeof(unsigned char), imageBytes, f);\r\t/* begin success: */\r\tfoo->successFlag = (bytesWritten == imageBytes) && foo->successFlag;\r\tsqImageFileClose(f);\r}\r\r\rvoid* vm_exports[][3] = {\r\t{\"\", \"primitiveSetGCBiasToGrow\", (void*)primitiveSetGCBiasToGrow},\r\t{\"\", \"internalIsMutable\", (void*)internalIsMutable},\r\t{\"\", \"getStackPointer\", (void*)getStackPointer},\r\t{\"\", \"primitiveImageFormatVersion\", (void*)primitiveImageFormatVersion},\r\t{\"\", \"primitiveUtcWithOffset\", (void*)primitiveUtcWithOffset},\r\t{\"\", \"sendInvokeCallbackStackRegistersJmpbuf\", (void*)sendInvokeCallbackStackRegistersJmpbuf},\r\t{\"\", \"primitiveIsRoot\", (void*)primitiveIsRoot},\r\t{\"\", \"primitiveMicrosecondClock\", (void*)primitiveMicrosecondClock},\r\t{\"\", \"primitiveDisablePowerManager\", (void*)primitiveDisablePowerManager},\r\t{\"\", \"primitiveIsYoung\", (void*)primitiveIsYoung},\r\t{\"\", \"callbackEnter\", (void*)callbackEnter},\r\t{\"\", \"primitiveChangeClassWithClass\", (void*)primitiveChangeClassWithClass},\r\t{\"\", \"internalIsImmutable\", (void*)internalIsImmutable},\r\t{\"\", \"callbackLeave\", (void*)callbackLeave},\r\t{\"\", \"primitivePlatformSourceVersion\", (void*)primitivePlatformSourceVersion},\r\t{\"\", \"moduleUnloaded\", (void*)moduleUnloaded},\r\t{\"\", \"primitiveRootTableAt\", (void*)primitiveRootTableAt},\r\t{\"\", \"primitiveSetGCBiasToGrowGCLimit\", (void*)primitiveSetGCBiasToGrowGCLimit},\r\t{\"\", \"primitiveForceTenure\", (void*)primitiveForceTenure},\r\t{\"\", \"primitiveVMVersion\", (void*)primitiveVMVersion},\r\t{\"\", \"primitiveInterpreterSourceVersion\", (void*)primitiveInterpreterSourceVersion},\r\t{\"\", \"primitiveScreenDepth\", (void*)primitiveScreenDepth},\r\t{\"\", \"removeGCRoot\", (void*)removeGCRoot},\r\t{\"\", \"primitiveRootTable\", (void*)primitiveRootTable},\r\t{\"\", \"addGCRoot\", (void*)addGCRoot},\r\t{\"\", \"dumpImage\", (void*)dumpImage},\r\t{\"\", \"primitiveSetGCSemaphore\", (void*)primitiveSetGCSemaphore},\r\t{\"\", \"callInterpreter\", (void*)callInterpreter},\r\t{\"\", \"reestablishContextPriorToCallback\", (void*)reestablishContextPriorToCallback},\r\t{NULL, NULL, NULL}\r};\r"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/src/vm/interp.h",
    "content": "/* Automatically generated from Squeak on 8 July 2010 12:32:31 pm \n   by VMMaker 4.2.6\n */\n\n//#define VMMAKER_VERSION \"4.2.6\"\n\n/*\n * define SQ_VI_BYTES_PER_WORD 8 for a 64-bit word size VM\n * and default to SQ_VI_BYTES_PER_WORD 4 for a 32-bit word size VM\n */\n#ifndef SQ_VI_BYTES_PER_WORD\n# define SQ_VI_BYTES_PER_WORD 4\n#endif\n\n#define BYTES_PER_WORD SQ_VI_BYTES_PER_WORD\n\n// Is already defined for the RoarVM based on Object::BaseHeaderSize\n# ifndef ROAR_VM\n  #define BASE_HEADER_SIZE sizeof(long int)\n# endif // !ROAR_VM\n\n\n/*\n#define BASE_HEADER_SIZE SQ_VI_BYTES_PER_WORD\n#if (BYTES_PER_WORD == 4) // 32-bit object memory\n# define WORD_MASK 0xffffffff\n# define SHIFT_FOR_WORD 2\n# define SMALL_CONTEXT_SIZE 92\n# define LARGE_CONTEXT_SIZE 252\n# define SIZE_MASK 0xfc\n# define LONG_SIZE_MASK 0xfffffffc\n# define SIZE_4_BIT 0\n# define MARK_BIT 0x80000000\n# define ROOT_BIT 0x40000000\n# define ALL_BUT_MARK_BIT 0x7fffffff\n# define ALL_BUT_ROOT_BIT 0xbfffffff\n# define ALL_BUT_TYPE_MASK 0xfffffffc\n# define ALL_BUT_MARK_BIT_AND_TYPE_MASK 0x7ffffffc\n# define ALL_BUT_HASH_BITS 0xe001ffff\n#else // 64-bit object memory\n# define WORD_MASK 0xffffffffffffffff\n# define SHIFT_FOR_WORD 3\n# define SMALL_CONTEXT_SIZE 184\n# define LARGE_CONTEXT_SIZE 504\n# define SIZE_MASK 0xf8\n# define LONG_SIZE_MASK 0xfffffffffffffff8\n# define SIZE_4_BIT 4\n# define MARK_BIT 0x8000000000000000\n# define ROOT_BIT 0x4000000000000000\n# define ALL_BUT_MARK_BIT 0x7fffffffffffffff\n# define ALL_BUT_ROOT_BIT 0xbfffffffffffffff\n# define ALL_BUT_TYPE_MASK 0xfffffffffffffffc\n# define ALL_BUT_MARK_BIT_AND_TYPE_MASK 0x7ffffffffffffffc\n# define ALL_BUT_HASH_BITS 0xffffffffe001ffff\n#endif //  (BYTES_PER_WORD == 4)\n*/\n\n"
  },
  {
    "path": "vm/src/from_squeak/iOS/vm/src/vm/sqNamedPrims.h",
    "content": "/* Automatically generated from Squeak on #(15 May 2008 3:27:04 pm)\nby VMMaker 3.8b6\n */\n/* This is an automatically generated table of all builtin modules in the VM */\n\n\n//extern sqExport vm_exports[];\nextern sqExport os_exports[];\n//extern sqExport ADPCMCodecPlugin_exports[];\nextern sqExport Squeak3D_exports[];\nextern sqExport B2DPlugin_exports[];\nextern sqExport BitBltPlugin_exports[];\nextern sqExport BMPReadWriterPlugin_exports[];\nextern sqExport ZipPlugin_exports[];\nextern sqExport DSAPrims_exports[];\n\n# ifndef ROAR_VM\nextern sqExport SqueakFFIPrims_exports[];\n# endif // !ROAR_VM\n\nextern sqExport FFTPlugin_exports[];\nextern sqExport FilePlugin_exports[];\nextern sqExport FloatArrayPlugin_exports[];\nextern sqExport GeniePlugin_exports[];\nextern sqExport HostWindowPlugin_exports[];\nextern sqExport JPEGReaderPlugin_exports[];\nextern sqExport JPEGReadWriter2Plugin_exports[];\nextern sqExport Klatt_exports[];\nextern sqExport LargeIntegers_exports[];\nextern sqExport Matrix2x3Plugin_exports[];\nextern sqExport MiscPrimitivePlugin_exports[];\nextern sqExport ObjectiveCPlugin_exports[];\nextern sqExport RePlugin_exports[];\nextern sqExport SecurityPlugin_exports[];\nextern sqExport SocketPlugin_exports[];\nextern sqExport SoundCodecPrims_exports[];\nextern sqExport SoundGenerationPlugin_exports[];\nextern sqExport SoundPlugin_exports[];\nextern sqExport StarSqueakPlugin_exports[];\nextern sqExport SurfacePlugin_exports[];\nextern sqExport UUIDPlugin_exports[];\nextern sqExport RVMPlugin_exports[];\n\nsqExport *pluginExports[] = {\n//\tvm_exports,\n\tos_exports,\n//\tADPCMCodecPlugin_exports,\n\tSqueak3D_exports,\n\tB2DPlugin_exports,\n\tBitBltPlugin_exports,\n\tBMPReadWriterPlugin_exports,\n\tZipPlugin_exports,\n\tDSAPrims_exports,\n  \n# ifndef ROAR_VM\n\tSqueakFFIPrims_exports,\n# endif // !ROAR_VM\n  \n\tFFTPlugin_exports,\n\tFilePlugin_exports,\n\tFloatArrayPlugin_exports,\n\tGeniePlugin_exports,\n\tHostWindowPlugin_exports,\n\tJPEGReaderPlugin_exports,\n\tJPEGReadWriter2Plugin_exports,\n\tKlatt_exports,\n\tLargeIntegers_exports,\n\tMatrix2x3Plugin_exports,\n\tMiscPrimitivePlugin_exports,\n\tObjectiveCPlugin_exports,\n\tRePlugin_exports,\n\tSecurityPlugin_exports,\n#if !On_iOS\n\tSocketPlugin_exports,\n#endif\n\tSoundCodecPrims_exports,\n\tSoundGenerationPlugin_exports,\n\tSoundPlugin_exports,\n\tStarSqueakPlugin_exports,\n\tSurfacePlugin_exports,\n\tUUIDPlugin_exports,\n  RVMPlugin_exports, // RoarVM\n\tNULL\n};\n\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c",
    "content": "/* Automatically generated by\n\tVMPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tADPCMCodecPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"ADPCMCodecPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"sqMemoryAccess.h\"\n\n\n/*** Proxy Functions ***/\n#define stackValue(i) (interpreterProxy->stackValue(i))\n#define stackIntegerValue(i) (interpreterProxy->stackIntegerValue(i))\n#define successFlag (!interpreterProxy->failed())\n#define success(bool) (interpreterProxy->success(bool))\n#define arrayValueOf(oop) (interpreterProxy->arrayValueOf(oop))\n#define checkedIntegerValueOf(oop) (interpreterProxy->checkedIntegerValueOf(oop))\n#define fetchArrayofObject(idx,oop) (interpreterProxy->fetchArrayofObject(idx,oop))\n#define fetchFloatofObject(idx,oop) (interpreterProxy->fetchFloatofObject(idx,oop))\n#define fetchIntegerofObject(idx,oop) (interpreterProxy->fetchIntegerofObject(idx,oop))\n#define floatValueOf(oop) (interpreterProxy->floatValueOf(oop))\n#define pop(n) (interpreterProxy->pop(n))\n#define pushInteger(n) (interpreterProxy->pushInteger(n))\n#define sizeOfSTArrayFromCPrimitive(cPtr) (interpreterProxy->sizeOfSTArrayFromCPrimitive(cPtr))\n#define storeIntegerofObjectwithValue(idx,oop,value) (interpreterProxy->storeIntegerofObjectwithValue(idx,oop,value))\n#define primitiveFail() interpreterProxy->primitiveFail()\n/* allows accessing Strings in both C and Smalltalk */\n#define asciiValue(c) c\n\n\n\n/*** Constants ***/\n\n\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"ADPCMCodecPlugin VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"ADPCMCodecPlugin VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\n\n\n/*** Function Prototypes ***/\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nstatic sqInt msg(char *s);\nEXPORT(sqInt) primitiveDecodeMono(void);\nEXPORT(sqInt) primitiveDecodeStereo(void);\nEXPORT(sqInt) primitiveEncodeMono(void);\nEXPORT(sqInt) primitiveEncodeStereo(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\n\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\nEXPORT(sqInt)\nprimitiveDecodeMono(void)\n{\n    sqInt bit;\n    sqInt bitPosition;\n    sqInt bitsPerSample;\n    sqInt byteIndex;\n    sqInt count;\n    sqInt currentByte;\n    sqInt delta;\n    sqInt deltaSignMask;\n    sqInt deltaValueHighBit;\n    sqInt deltaValueMask;\n    unsigned char *encodedBytes;\n    sqInt frameSizeMask;\n    sqInt i;\n    sqInt index;\n    short int *indexTable;\n    sqInt predicted;\n    sqInt predictedDelta;\n    sqInt rcvr;\n    sqInt remaining;\n    sqInt remaining1;\n    sqInt remaining2;\n    sqInt result;\n    sqInt result1;\n    sqInt result2;\n    sqInt sampleIndex;\n    short int *samples;\n    sqInt shift;\n    sqInt shift1;\n    sqInt shift2;\n    sqInt step;\n    short int *stepSizeTable;\n\n\trcvr = stackValue(1);\n\tcount = stackIntegerValue(0);\n\tpredicted = fetchIntegerofObject(0, rcvr);\n\tindex = fetchIntegerofObject(1, rcvr);\n\tdeltaSignMask = fetchIntegerofObject(2, rcvr);\n\tdeltaValueMask = fetchIntegerofObject(3, rcvr);\n\tdeltaValueHighBit = fetchIntegerofObject(4, rcvr);\n\tframeSizeMask = fetchIntegerofObject(5, rcvr);\n\tcurrentByte = fetchIntegerofObject(6, rcvr);\n\tbitPosition = fetchIntegerofObject(7, rcvr);\n\tbyteIndex = fetchIntegerofObject(8, rcvr);\n\tencodedBytes = fetchArrayofObject(9, rcvr);\n\tencodedBytes -= 1;\n\tsamples = fetchArrayofObject(10, rcvr);\n\tsamples -= 1;\n\tsampleIndex = fetchIntegerofObject(12, rcvr);\n\tbitsPerSample = fetchIntegerofObject(13, rcvr);\n\tstepSizeTable = fetchArrayofObject(14, rcvr);\n\tstepSizeTable -= 1;\n\tindexTable = fetchArrayofObject(15, rcvr);\n\tindexTable -= 1;\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tfor (i = 1; i <= count; i += 1) {\n\t\tif ((i & frameSizeMask) == 1) {\n\t\t\t/* begin nextBits: */\n\t\t\tresult = 0;\n\t\t\tremaining = 16;\n\t\t\twhile (1) {\n\t\t\t\tshift = remaining - bitPosition;\n\t\t\t\tresult += ((shift < 0) ? ((usqInt) currentByte >> -shift) : ((usqInt) currentByte << shift));\n\t\t\t\tif (shift > 0) {\n\n\t\t\t\t\t/* consumed currentByte buffer; fetch next byte */\n\n\t\t\t\t\tremaining -= bitPosition;\n\t\t\t\t\tcurrentByte = encodedBytes[(byteIndex += 1)];\n\t\t\t\t\tbitPosition = 8;\n\t\t\t\t}\n\t\t\t\telse {\n\n\t\t\t\t\t/* still some bits left in currentByte buffer */\n\t\t\t\t\t/* mask out the consumed bits: */\n\n\t\t\t\t\tbitPosition -= remaining;\n\t\t\t\t\tcurrentByte = currentByte & ((((bitPosition - 8) < 0) ? ((usqInt) 255 >> -(bitPosition - 8)) : ((usqInt) 255 << (bitPosition - 8))));\n\t\t\t\t\tpredicted = result;\n\t\t\t\t\tgoto l1;\n\t\t\t\t}\n\t\t\t}\n\t\tl1:\t/* end nextBits: */;\n\t\t\tif (predicted > 32767) {\n\t\t\t\tpredicted -= 65536;\n\t\t\t}\n\t\t\t/* begin nextBits: */\n\t\t\tresult1 = 0;\n\t\t\tremaining1 = 6;\n\t\t\twhile (1) {\n\t\t\t\tshift1 = remaining1 - bitPosition;\n\t\t\t\tresult1 += ((shift1 < 0) ? ((usqInt) currentByte >> -shift1) : ((usqInt) currentByte << shift1));\n\t\t\t\tif (shift1 > 0) {\n\n\t\t\t\t\t/* consumed currentByte buffer; fetch next byte */\n\n\t\t\t\t\tremaining1 -= bitPosition;\n\t\t\t\t\tcurrentByte = encodedBytes[(byteIndex += 1)];\n\t\t\t\t\tbitPosition = 8;\n\t\t\t\t}\n\t\t\t\telse {\n\n\t\t\t\t\t/* still some bits left in currentByte buffer */\n\t\t\t\t\t/* mask out the consumed bits: */\n\n\t\t\t\t\tbitPosition -= remaining1;\n\t\t\t\t\tcurrentByte = currentByte & ((((bitPosition - 8) < 0) ? ((usqInt) 255 >> -(bitPosition - 8)) : ((usqInt) 255 << (bitPosition - 8))));\n\t\t\t\t\tindex = result1;\n\t\t\t\t\tgoto l2;\n\t\t\t\t}\n\t\t\t}\n\t\tl2:\t/* end nextBits: */;\n\t\t\tsamples[(sampleIndex += 1)] = predicted;\n\t\t}\n\t\telse {\n\t\t\t/* begin nextBits: */\n\t\t\tresult2 = 0;\n\t\t\tremaining2 = bitsPerSample;\n\t\t\twhile (1) {\n\t\t\t\tshift2 = remaining2 - bitPosition;\n\t\t\t\tresult2 += ((shift2 < 0) ? ((usqInt) currentByte >> -shift2) : ((usqInt) currentByte << shift2));\n\t\t\t\tif (shift2 > 0) {\n\n\t\t\t\t\t/* consumed currentByte buffer; fetch next byte */\n\n\t\t\t\t\tremaining2 -= bitPosition;\n\t\t\t\t\tcurrentByte = encodedBytes[(byteIndex += 1)];\n\t\t\t\t\tbitPosition = 8;\n\t\t\t\t}\n\t\t\t\telse {\n\n\t\t\t\t\t/* still some bits left in currentByte buffer */\n\t\t\t\t\t/* mask out the consumed bits: */\n\n\t\t\t\t\tbitPosition -= remaining2;\n\t\t\t\t\tcurrentByte = currentByte & ((((bitPosition - 8) < 0) ? ((usqInt) 255 >> -(bitPosition - 8)) : ((usqInt) 255 << (bitPosition - 8))));\n\t\t\t\t\tdelta = result2;\n\t\t\t\t\tgoto l3;\n\t\t\t\t}\n\t\t\t}\n\t\tl3:\t/* end nextBits: */;\n\t\t\tstep = stepSizeTable[index + 1];\n\t\t\tpredictedDelta = 0;\n\t\t\tbit = deltaValueHighBit;\n\t\t\twhile (bit > 0) {\n\t\t\t\tif ((delta & bit) > 0) {\n\t\t\t\t\tpredictedDelta += step;\n\t\t\t\t}\n\t\t\t\tstep = ((usqInt) step >> 1);\n\t\t\t\tbit = ((usqInt) bit >> 1);\n\t\t\t}\n\t\t\tpredictedDelta += step;\n\t\t\tif ((delta & deltaSignMask) > 0) {\n\t\t\t\tpredicted -= predictedDelta;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpredicted += predictedDelta;\n\t\t\t}\n\t\t\tif (predicted > 32767) {\n\t\t\t\tpredicted = 32767;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (predicted < -32768) {\n\t\t\t\t\tpredicted = -32768;\n\t\t\t\t}\n\t\t\t}\n\t\t\tindex += indexTable[(delta & deltaValueMask) + 1];\n\t\t\tif (index < 0) {\n\t\t\t\tindex = 0;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (index > 88) {\n\t\t\t\t\tindex = 88;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsamples[(sampleIndex += 1)] = predicted;\n\t\t}\n\t}\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tstoreIntegerofObjectwithValue(0, rcvr, predicted);\n\tstoreIntegerofObjectwithValue(1, rcvr, index);\n\tstoreIntegerofObjectwithValue(6, rcvr, currentByte);\n\tstoreIntegerofObjectwithValue(7, rcvr, bitPosition);\n\tstoreIntegerofObjectwithValue(8, rcvr, byteIndex);\n\tstoreIntegerofObjectwithValue(12, rcvr, sampleIndex);\n\tpop(1);\n}\n\nEXPORT(sqInt)\nprimitiveDecodeStereo(void)\n{\n    sqInt bit;\n    sqInt bitPosition;\n    sqInt bitsPerSample;\n    sqInt byteIndex;\n    sqInt count;\n    sqInt currentByte;\n    sqInt deltaLeft;\n    sqInt deltaRight;\n    sqInt deltaSignMask;\n    sqInt deltaValueHighBit;\n    sqInt deltaValueMask;\n    unsigned char *encodedBytes;\n    sqInt frameSizeMask;\n    sqInt i;\n    short int *index;\n    sqInt indexLeft;\n    sqInt indexRight;\n    short int *indexTable;\n    short int *predicted;\n    sqInt predictedDeltaLeft;\n    sqInt predictedDeltaRight;\n    sqInt predictedLeft;\n    sqInt predictedRight;\n    sqInt rcvr;\n    sqInt remaining;\n    sqInt remaining1;\n    sqInt remaining2;\n    sqInt remaining3;\n    sqInt remaining4;\n    sqInt remaining5;\n    sqInt result;\n    sqInt result1;\n    sqInt result2;\n    sqInt result3;\n    sqInt result4;\n    sqInt result5;\n    short int *rightSamples;\n    sqInt sampleIndex;\n    short int *samples;\n    sqInt shift;\n    sqInt shift1;\n    sqInt shift2;\n    sqInt shift3;\n    sqInt shift4;\n    sqInt shift5;\n    sqInt stepLeft;\n    sqInt stepRight;\n    short int *stepSizeTable;\n\n\trcvr = stackValue(1);\n\tcount = stackIntegerValue(0);\n\tpredicted = fetchArrayofObject(0, rcvr);\n\tpredicted -= 1;\n\tindex = fetchArrayofObject(1, rcvr);\n\tindex -= 1;\n\tdeltaSignMask = fetchIntegerofObject(2, rcvr);\n\tdeltaValueMask = fetchIntegerofObject(3, rcvr);\n\tdeltaValueHighBit = fetchIntegerofObject(4, rcvr);\n\tframeSizeMask = fetchIntegerofObject(5, rcvr);\n\tcurrentByte = fetchIntegerofObject(6, rcvr);\n\tbitPosition = fetchIntegerofObject(7, rcvr);\n\tbyteIndex = fetchIntegerofObject(8, rcvr);\n\tencodedBytes = fetchArrayofObject(9, rcvr);\n\tencodedBytes -= 1;\n\tsamples = fetchArrayofObject(10, rcvr);\n\tsamples -= 1;\n\trightSamples = fetchArrayofObject(11, rcvr);\n\trightSamples -= 1;\n\tsampleIndex = fetchIntegerofObject(12, rcvr);\n\tbitsPerSample = fetchIntegerofObject(13, rcvr);\n\tstepSizeTable = fetchArrayofObject(14, rcvr);\n\tstepSizeTable -= 1;\n\tindexTable = fetchArrayofObject(15, rcvr);\n\tindexTable -= 1;\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\n\t/* make local copies of decoder state variables */\n\n\tpredictedLeft = predicted[1];\n\tpredictedRight = predicted[2];\n\tindexLeft = index[1];\n\tindexRight = index[2];\n\tfor (i = 1; i <= count; i += 1) {\n\t\tif ((i & frameSizeMask) == 1) {\n\t\t\t/* begin nextBits: */\n\t\t\tresult = 0;\n\t\t\tremaining = 16;\n\t\t\twhile (1) {\n\t\t\t\tshift = remaining - bitPosition;\n\t\t\t\tresult += ((shift < 0) ? ((usqInt) currentByte >> -shift) : ((usqInt) currentByte << shift));\n\t\t\t\tif (shift > 0) {\n\n\t\t\t\t\t/* consumed currentByte buffer; fetch next byte */\n\n\t\t\t\t\tremaining -= bitPosition;\n\t\t\t\t\tcurrentByte = encodedBytes[(byteIndex += 1)];\n\t\t\t\t\tbitPosition = 8;\n\t\t\t\t}\n\t\t\t\telse {\n\n\t\t\t\t\t/* still some bits left in currentByte buffer */\n\t\t\t\t\t/* mask out the consumed bits: */\n\n\t\t\t\t\tbitPosition -= remaining;\n\t\t\t\t\tcurrentByte = currentByte & ((((bitPosition - 8) < 0) ? ((usqInt) 255 >> -(bitPosition - 8)) : ((usqInt) 255 << (bitPosition - 8))));\n\t\t\t\t\tpredictedLeft = result;\n\t\t\t\t\tgoto l1;\n\t\t\t\t}\n\t\t\t}\n\t\tl1:\t/* end nextBits: */;\n\t\t\t/* begin nextBits: */\n\t\t\tresult1 = 0;\n\t\t\tremaining1 = 6;\n\t\t\twhile (1) {\n\t\t\t\tshift1 = remaining1 - bitPosition;\n\t\t\t\tresult1 += ((shift1 < 0) ? ((usqInt) currentByte >> -shift1) : ((usqInt) currentByte << shift1));\n\t\t\t\tif (shift1 > 0) {\n\n\t\t\t\t\t/* consumed currentByte buffer; fetch next byte */\n\n\t\t\t\t\tremaining1 -= bitPosition;\n\t\t\t\t\tcurrentByte = encodedBytes[(byteIndex += 1)];\n\t\t\t\t\tbitPosition = 8;\n\t\t\t\t}\n\t\t\t\telse {\n\n\t\t\t\t\t/* still some bits left in currentByte buffer */\n\t\t\t\t\t/* mask out the consumed bits: */\n\n\t\t\t\t\tbitPosition -= remaining1;\n\t\t\t\t\tcurrentByte = currentByte & ((((bitPosition - 8) < 0) ? ((usqInt) 255 >> -(bitPosition - 8)) : ((usqInt) 255 << (bitPosition - 8))));\n\t\t\t\t\tindexLeft = result1;\n\t\t\t\t\tgoto l2;\n\t\t\t\t}\n\t\t\t}\n\t\tl2:\t/* end nextBits: */;\n\t\t\t/* begin nextBits: */\n\t\t\tresult2 = 0;\n\t\t\tremaining2 = 16;\n\t\t\twhile (1) {\n\t\t\t\tshift2 = remaining2 - bitPosition;\n\t\t\t\tresult2 += ((shift2 < 0) ? ((usqInt) currentByte >> -shift2) : ((usqInt) currentByte << shift2));\n\t\t\t\tif (shift2 > 0) {\n\n\t\t\t\t\t/* consumed currentByte buffer; fetch next byte */\n\n\t\t\t\t\tremaining2 -= bitPosition;\n\t\t\t\t\tcurrentByte = encodedBytes[(byteIndex += 1)];\n\t\t\t\t\tbitPosition = 8;\n\t\t\t\t}\n\t\t\t\telse {\n\n\t\t\t\t\t/* still some bits left in currentByte buffer */\n\t\t\t\t\t/* mask out the consumed bits: */\n\n\t\t\t\t\tbitPosition -= remaining2;\n\t\t\t\t\tcurrentByte = currentByte & ((((bitPosition - 8) < 0) ? ((usqInt) 255 >> -(bitPosition - 8)) : ((usqInt) 255 << (bitPosition - 8))));\n\t\t\t\t\tpredictedRight = result2;\n\t\t\t\t\tgoto l3;\n\t\t\t\t}\n\t\t\t}\n\t\tl3:\t/* end nextBits: */;\n\t\t\t/* begin nextBits: */\n\t\t\tresult3 = 0;\n\t\t\tremaining3 = 6;\n\t\t\twhile (1) {\n\t\t\t\tshift3 = remaining3 - bitPosition;\n\t\t\t\tresult3 += ((shift3 < 0) ? ((usqInt) currentByte >> -shift3) : ((usqInt) currentByte << shift3));\n\t\t\t\tif (shift3 > 0) {\n\n\t\t\t\t\t/* consumed currentByte buffer; fetch next byte */\n\n\t\t\t\t\tremaining3 -= bitPosition;\n\t\t\t\t\tcurrentByte = encodedBytes[(byteIndex += 1)];\n\t\t\t\t\tbitPosition = 8;\n\t\t\t\t}\n\t\t\t\telse {\n\n\t\t\t\t\t/* still some bits left in currentByte buffer */\n\t\t\t\t\t/* mask out the consumed bits: */\n\n\t\t\t\t\tbitPosition -= remaining3;\n\t\t\t\t\tcurrentByte = currentByte & ((((bitPosition - 8) < 0) ? ((usqInt) 255 >> -(bitPosition - 8)) : ((usqInt) 255 << (bitPosition - 8))));\n\t\t\t\t\tindexRight = result3;\n\t\t\t\t\tgoto l4;\n\t\t\t\t}\n\t\t\t}\n\t\tl4:\t/* end nextBits: */;\n\t\t\tif (predictedLeft > 32767) {\n\t\t\t\tpredictedLeft -= 65536;\n\t\t\t}\n\t\t\tif (predictedRight > 32767) {\n\t\t\t\tpredictedRight -= 65536;\n\t\t\t}\n\t\t\tsamples[(sampleIndex += 1)] = predictedLeft;\n\t\t\trightSamples[sampleIndex] = predictedRight;\n\t\t}\n\t\telse {\n\t\t\t/* begin nextBits: */\n\t\t\tresult4 = 0;\n\t\t\tremaining4 = bitsPerSample;\n\t\t\twhile (1) {\n\t\t\t\tshift4 = remaining4 - bitPosition;\n\t\t\t\tresult4 += ((shift4 < 0) ? ((usqInt) currentByte >> -shift4) : ((usqInt) currentByte << shift4));\n\t\t\t\tif (shift4 > 0) {\n\n\t\t\t\t\t/* consumed currentByte buffer; fetch next byte */\n\n\t\t\t\t\tremaining4 -= bitPosition;\n\t\t\t\t\tcurrentByte = encodedBytes[(byteIndex += 1)];\n\t\t\t\t\tbitPosition = 8;\n\t\t\t\t}\n\t\t\t\telse {\n\n\t\t\t\t\t/* still some bits left in currentByte buffer */\n\t\t\t\t\t/* mask out the consumed bits: */\n\n\t\t\t\t\tbitPosition -= remaining4;\n\t\t\t\t\tcurrentByte = currentByte & ((((bitPosition - 8) < 0) ? ((usqInt) 255 >> -(bitPosition - 8)) : ((usqInt) 255 << (bitPosition - 8))));\n\t\t\t\t\tdeltaLeft = result4;\n\t\t\t\t\tgoto l5;\n\t\t\t\t}\n\t\t\t}\n\t\tl5:\t/* end nextBits: */;\n\t\t\t/* begin nextBits: */\n\t\t\tresult5 = 0;\n\t\t\tremaining5 = bitsPerSample;\n\t\t\twhile (1) {\n\t\t\t\tshift5 = remaining5 - bitPosition;\n\t\t\t\tresult5 += ((shift5 < 0) ? ((usqInt) currentByte >> -shift5) : ((usqInt) currentByte << shift5));\n\t\t\t\tif (shift5 > 0) {\n\n\t\t\t\t\t/* consumed currentByte buffer; fetch next byte */\n\n\t\t\t\t\tremaining5 -= bitPosition;\n\t\t\t\t\tcurrentByte = encodedBytes[(byteIndex += 1)];\n\t\t\t\t\tbitPosition = 8;\n\t\t\t\t}\n\t\t\t\telse {\n\n\t\t\t\t\t/* still some bits left in currentByte buffer */\n\t\t\t\t\t/* mask out the consumed bits: */\n\n\t\t\t\t\tbitPosition -= remaining5;\n\t\t\t\t\tcurrentByte = currentByte & ((((bitPosition - 8) < 0) ? ((usqInt) 255 >> -(bitPosition - 8)) : ((usqInt) 255 << (bitPosition - 8))));\n\t\t\t\t\tdeltaRight = result5;\n\t\t\t\t\tgoto l6;\n\t\t\t\t}\n\t\t\t}\n\t\tl6:\t/* end nextBits: */;\n\t\t\tstepLeft = stepSizeTable[indexLeft + 1];\n\t\t\tstepRight = stepSizeTable[indexRight + 1];\n\t\t\tpredictedDeltaLeft = predictedDeltaRight = 0;\n\t\t\tbit = deltaValueHighBit;\n\t\t\twhile (bit > 0) {\n\t\t\t\tif ((deltaLeft & bit) > 0) {\n\t\t\t\t\tpredictedDeltaLeft += stepLeft;\n\t\t\t\t}\n\t\t\t\tif ((deltaRight & bit) > 0) {\n\t\t\t\t\tpredictedDeltaRight += stepRight;\n\t\t\t\t}\n\t\t\t\tstepLeft = ((usqInt) stepLeft >> 1);\n\t\t\t\tstepRight = ((usqInt) stepRight >> 1);\n\t\t\t\tbit = ((usqInt) bit >> 1);\n\t\t\t}\n\t\t\tpredictedDeltaLeft += stepLeft;\n\t\t\tpredictedDeltaRight += stepRight;\n\t\t\tif ((deltaLeft & deltaSignMask) > 0) {\n\t\t\t\tpredictedLeft -= predictedDeltaLeft;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpredictedLeft += predictedDeltaLeft;\n\t\t\t}\n\t\t\tif ((deltaRight & deltaSignMask) > 0) {\n\t\t\t\tpredictedRight -= predictedDeltaRight;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpredictedRight += predictedDeltaRight;\n\t\t\t}\n\t\t\tif (predictedLeft > 32767) {\n\t\t\t\tpredictedLeft = 32767;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (predictedLeft < -32768) {\n\t\t\t\t\tpredictedLeft = -32768;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (predictedRight > 32767) {\n\t\t\t\tpredictedRight = 32767;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (predictedRight < -32768) {\n\t\t\t\t\tpredictedRight = -32768;\n\t\t\t\t}\n\t\t\t}\n\t\t\tindexLeft += indexTable[(deltaLeft & deltaValueMask) + 1];\n\t\t\tif (indexLeft < 0) {\n\t\t\t\tindexLeft = 0;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (indexLeft > 88) {\n\t\t\t\t\tindexLeft = 88;\n\t\t\t\t}\n\t\t\t}\n\t\t\tindexRight += indexTable[(deltaRight & deltaValueMask) + 1];\n\t\t\tif (indexRight < 0) {\n\t\t\t\tindexRight = 0;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (indexRight > 88) {\n\t\t\t\t\tindexRight = 88;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsamples[(sampleIndex += 1)] = predictedLeft;\n\t\t\trightSamples[sampleIndex] = predictedRight;\n\t\t}\n\t}\n\tpredicted[1] = predictedLeft;\n\tpredicted[2] = predictedRight;\n\tindex[1] = indexLeft;\n\tindex[2] = indexRight;\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tstoreIntegerofObjectwithValue(6, rcvr, currentByte);\n\tstoreIntegerofObjectwithValue(7, rcvr, bitPosition);\n\tstoreIntegerofObjectwithValue(8, rcvr, byteIndex);\n\tstoreIntegerofObjectwithValue(12, rcvr, sampleIndex);\n\tpop(1);\n}\n\nEXPORT(sqInt)\nprimitiveEncodeMono(void)\n{\n    sqInt bestIndex;\n    sqInt bit;\n    sqInt bitPosition;\n    sqInt bitsAvailable;\n    sqInt bitsAvailable1;\n    sqInt bitsAvailable2;\n    sqInt bitsPerSample;\n    sqInt buf;\n    sqInt buf1;\n    sqInt buf2;\n    sqInt bufBits;\n    sqInt bufBits1;\n    sqInt bufBits2;\n    sqInt byteIndex;\n    sqInt count;\n    sqInt currentByte;\n    sqInt delta;\n    sqInt deltaSignMask;\n    sqInt deltaValueHighBit;\n    sqInt diff;\n    sqInt diff1;\n    unsigned char *encodedBytes;\n    sqInt frameSizeMask;\n    sqInt i;\n    sqInt index;\n    short int *indexTable;\n    sqInt j;\n    sqInt p;\n    sqInt predicted;\n    sqInt predictedDelta;\n    sqInt rcvr;\n    sqInt sampleIndex;\n    short int *samples;\n    sqInt shift;\n    sqInt shift1;\n    sqInt shift2;\n    sqInt sign;\n    sqInt step;\n    short int *stepSizeTable;\n\n\trcvr = stackValue(1);\n\tcount = stackIntegerValue(0);\n\tpredicted = fetchIntegerofObject(0, rcvr);\n\tindex = fetchIntegerofObject(1, rcvr);\n\tdeltaSignMask = fetchIntegerofObject(2, rcvr);\n\tdeltaValueHighBit = fetchIntegerofObject(4, rcvr);\n\tframeSizeMask = fetchIntegerofObject(5, rcvr);\n\tcurrentByte = fetchIntegerofObject(6, rcvr);\n\tbitPosition = fetchIntegerofObject(7, rcvr);\n\tbyteIndex = fetchIntegerofObject(8, rcvr);\n\tencodedBytes = fetchArrayofObject(9, rcvr);\n\tencodedBytes -= 1;\n\tsamples = fetchArrayofObject(10, rcvr);\n\tsamples -= 1;\n\tsampleIndex = fetchIntegerofObject(12, rcvr);\n\tbitsPerSample = fetchIntegerofObject(13, rcvr);\n\tstepSizeTable = fetchArrayofObject(14, rcvr);\n\tstepSizeTable -= 1;\n\tindexTable = fetchArrayofObject(15, rcvr);\n\tindexTable -= 1;\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tstep = stepSizeTable[1];\n\tfor (i = 1; i <= count; i += 1) {\n\t\tif ((i & frameSizeMask) == 1) {\n\t\t\tpredicted = samples[(sampleIndex += 1)];\n\t\t\tif (((p = predicted)) < 0) {\n\t\t\t\tp += 65536;\n\t\t\t}\n\t\t\t/* begin nextBits:put: */\n\t\t\tbuf = p;\n\t\t\tbufBits = 16;\n\t\t\twhile (1) {\n\t\t\t\tbitsAvailable = 8 - bitPosition;\n\n\t\t\t\t/* either left or right shift */\n\t\t\t\t/* append high bits of buf to end of currentByte: */\n\n\t\t\t\tshift = bitsAvailable - bufBits;\n\t\t\t\tcurrentByte += ((shift < 0) ? ((usqInt) buf >> -shift) : ((usqInt) buf << shift));\n\t\t\t\tif (shift < 0) {\n\t\t\t\t\tencodedBytes[(byteIndex += 1)] = currentByte;\n\t\t\t\t\tbitPosition = 0;\n\n\t\t\t\t\t/* clear saved high bits of buf: */\n\n\t\t\t\t\tcurrentByte = 0;\n\t\t\t\t\tbuf = buf & (((((0 - shift) < 0) ? ((usqInt) 1 >> -(0 - shift)) : ((usqInt) 1 << (0 - shift)))) - 1);\n\t\t\t\t\tbufBits -= bitsAvailable;\n\t\t\t\t}\n\t\t\t\telse {\n\n\t\t\t\t\t/* still some bits available in currentByte buffer */\n\n\t\t\t\t\tbitPosition += bufBits;\n\t\t\t\t\tgoto l1;\n\t\t\t\t}\n\t\t\t}\n\t\tl1:\t/* end nextBits:put: */;\n\t\t\tif (i < count) {\n\t\t\t\t/* begin indexForDeltaFrom:to: */\n\t\t\t\tdiff1 = (samples[sampleIndex + 1]) - predicted;\n\t\t\t\tif (diff1 < 0) {\n\t\t\t\t\tdiff1 = 0 - diff1;\n\t\t\t\t}\n\t\t\t\tbestIndex = 63;\n\t\t\t\tfor (j = 1; j <= 62; j += 1) {\n\t\t\t\t\tif (bestIndex == 63) {\n\t\t\t\t\t\tif ((stepSizeTable[j]) >= diff1) {\n\t\t\t\t\t\t\tbestIndex = j;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tindex = bestIndex;\n\t\t\t}\n\t\t\t/* begin nextBits:put: */\n\t\t\tbuf1 = index;\n\t\t\tbufBits1 = 6;\n\t\t\twhile (1) {\n\t\t\t\tbitsAvailable1 = 8 - bitPosition;\n\n\t\t\t\t/* either left or right shift */\n\t\t\t\t/* append high bits of buf to end of currentByte: */\n\n\t\t\t\tshift1 = bitsAvailable1 - bufBits1;\n\t\t\t\tcurrentByte += ((shift1 < 0) ? ((usqInt) buf1 >> -shift1) : ((usqInt) buf1 << shift1));\n\t\t\t\tif (shift1 < 0) {\n\t\t\t\t\tencodedBytes[(byteIndex += 1)] = currentByte;\n\t\t\t\t\tbitPosition = 0;\n\n\t\t\t\t\t/* clear saved high bits of buf: */\n\n\t\t\t\t\tcurrentByte = 0;\n\t\t\t\t\tbuf1 = buf1 & (((((0 - shift1) < 0) ? ((usqInt) 1 >> -(0 - shift1)) : ((usqInt) 1 << (0 - shift1)))) - 1);\n\t\t\t\t\tbufBits1 -= bitsAvailable1;\n\t\t\t\t}\n\t\t\t\telse {\n\n\t\t\t\t\t/* still some bits available in currentByte buffer */\n\n\t\t\t\t\tbitPosition += bufBits1;\n\t\t\t\t\tgoto l2;\n\t\t\t\t}\n\t\t\t}\n\t\tl2:\t/* end nextBits:put: */;\n\t\t}\n\t\telse {\n\n\t\t\t/* compute sign and magnitude of difference from the predicted sample */\n\n\t\t\tsign = 0;\n\t\t\tdiff = (samples[(sampleIndex += 1)]) - predicted;\n\t\t\tif (diff < 0) {\n\t\t\t\tsign = deltaSignMask;\n\t\t\t\tdiff = 0 - diff;\n\t\t\t}\n\t\t\tdelta = 0;\n\t\t\tpredictedDelta = 0;\n\t\t\tbit = deltaValueHighBit;\n\t\t\twhile (bit > 0) {\n\t\t\t\tif (diff >= step) {\n\t\t\t\t\tdelta += bit;\n\t\t\t\t\tpredictedDelta += step;\n\t\t\t\t\tdiff -= step;\n\t\t\t\t}\n\t\t\t\tstep = ((usqInt) step >> 1);\n\t\t\t\tbit = ((usqInt) bit >> 1);\n\t\t\t}\n\n\t\t\t/* compute and clamp new prediction */\n\n\t\t\tpredictedDelta += step;\n\t\t\tif (sign > 0) {\n\t\t\t\tpredicted -= predictedDelta;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpredicted += predictedDelta;\n\t\t\t}\n\t\t\tif (predicted > 32767) {\n\t\t\t\tpredicted = 32767;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (predicted < -32768) {\n\t\t\t\t\tpredicted = -32768;\n\t\t\t\t}\n\t\t\t}\n\t\t\tindex += indexTable[delta + 1];\n\t\t\tif (index < 0) {\n\t\t\t\tindex = 0;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (index > 88) {\n\t\t\t\t\tindex = 88;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* output encoded, signed delta */\n\n\t\t\tstep = stepSizeTable[index + 1];\n\t\t\t/* begin nextBits:put: */\n\t\t\tbuf2 = sign | delta;\n\t\t\tbufBits2 = bitsPerSample;\n\t\t\twhile (1) {\n\t\t\t\tbitsAvailable2 = 8 - bitPosition;\n\n\t\t\t\t/* either left or right shift */\n\t\t\t\t/* append high bits of buf to end of currentByte: */\n\n\t\t\t\tshift2 = bitsAvailable2 - bufBits2;\n\t\t\t\tcurrentByte += ((shift2 < 0) ? ((usqInt) buf2 >> -shift2) : ((usqInt) buf2 << shift2));\n\t\t\t\tif (shift2 < 0) {\n\t\t\t\t\tencodedBytes[(byteIndex += 1)] = currentByte;\n\t\t\t\t\tbitPosition = 0;\n\n\t\t\t\t\t/* clear saved high bits of buf: */\n\n\t\t\t\t\tcurrentByte = 0;\n\t\t\t\t\tbuf2 = buf2 & (((((0 - shift2) < 0) ? ((usqInt) 1 >> -(0 - shift2)) : ((usqInt) 1 << (0 - shift2)))) - 1);\n\t\t\t\t\tbufBits2 -= bitsAvailable2;\n\t\t\t\t}\n\t\t\t\telse {\n\n\t\t\t\t\t/* still some bits available in currentByte buffer */\n\n\t\t\t\t\tbitPosition += bufBits2;\n\t\t\t\t\tgoto l3;\n\t\t\t\t}\n\t\t\t}\n\t\tl3:\t/* end nextBits:put: */;\n\t\t}\n\t}\n\tif (bitPosition > 0) {\n\t\tencodedBytes[(byteIndex += 1)] = currentByte;\n\t}\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tstoreIntegerofObjectwithValue(0, rcvr, predicted);\n\tstoreIntegerofObjectwithValue(1, rcvr, index);\n\tstoreIntegerofObjectwithValue(6, rcvr, currentByte);\n\tstoreIntegerofObjectwithValue(7, rcvr, bitPosition);\n\tstoreIntegerofObjectwithValue(8, rcvr, byteIndex);\n\tstoreIntegerofObjectwithValue(12, rcvr, sampleIndex);\n\tpop(1);\n}\n\n\n/*\tnot yet implemented */\n\nEXPORT(sqInt)\nprimitiveEncodeStereo(void)\n{\n    sqInt count;\n    sqInt rcvr;\n\n\trcvr = stackValue(1);\n\tcount = stackIntegerValue(0);\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tsuccess(0);\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tpop(1);\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n    sqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* ADPCMCodecPlugin_exports[][3] = {\n\t{\"ADPCMCodecPlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"ADPCMCodecPlugin\", \"primitiveDecodeMono\", (void*)primitiveDecodeMono},\n\t{\"ADPCMCodecPlugin\", \"primitiveDecodeStereo\", (void*)primitiveDecodeStereo},\n\t{\"ADPCMCodecPlugin\", \"primitiveEncodeMono\", (void*)primitiveEncodeMono},\n\t{\"ADPCMCodecPlugin\", \"primitiveEncodeStereo\", (void*)primitiveEncodeStereo},\n\t{\"ADPCMCodecPlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/AsynchFilePlugin/AsynchFilePlugin.c",
    "content": "/* Automatically generated by\n\tSmartSyntaxPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tAsynchFilePlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"AsynchFilePlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"AsynchFilePlugin.h\"\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n\n/*** Function Prototypes ***/\nstatic AsyncFile * asyncFileValueOf(sqInt oop);\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nEXPORT(sqInt) initialiseModule(void);\nEXPORT(void) moduleUnloaded(char *aModuleName);\nstatic sqInt msg(char *s);\nEXPORT(sqInt) primitiveAsyncFileClose(void);\nEXPORT(sqInt) primitiveAsyncFileOpen(void);\nEXPORT(sqInt) primitiveAsyncFileReadResult(void);\nEXPORT(sqInt) primitiveAsyncFileReadStart(void);\nEXPORT(sqInt) primitiveAsyncFileWriteResult(void);\nEXPORT(sqInt) primitiveAsyncFileWriteStart(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\nEXPORT(sqInt) shutdownModule(void);\nstatic void sqAssert(sqInt aBool);\n\n\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"AsynchFilePlugin VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"AsynchFilePlugin VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\nstatic void * sCOAFfn;\n\n\n\n/*\tReturn a pointer to the first byte of the async file record within the\n\tgiven Smalltalk bytes object, or nil if oop is not an async file record.\n */\n\nstatic AsyncFile *\nasyncFileValueOf(sqInt oop)\n{\n\tinterpreterProxy->success((!((oop & 1)))\n\t && ((interpreterProxy->isBytes(oop))\n && ((interpreterProxy->slotSizeOf(oop)) == (sizeof(AsyncFile)))));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\treturn (AsyncFile *) (oop + 4);\n}\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\n\n/*\tInitialise the module */\n\nEXPORT(sqInt)\ninitialiseModule(void)\n{\n\tsCOAFfn = interpreterProxy->ioLoadFunctionFrom(\"secCanOpenAsyncFileOfSizeWritable\", \"SecurityPlugin\");\n\treturn asyncFileInit();\n}\n\n\n/*\tThe module with the given name was just unloaded. \n\tMake sure we have no dangling references. */\n\nEXPORT(void)\nmoduleUnloaded(char *aModuleName)\n{\n\tif ((strcmp(aModuleName, \"SecurityPlugin\")) == 0) {\n\n\t\t/* The security plugin just shut down. How odd. Zero the function pointer we have into it */\n\n\t\tsCOAFfn = 0;\n\t}\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\nEXPORT(sqInt)\nprimitiveAsyncFileClose(void)\n{\n\tAsyncFile *f;\n\tsqInt fh;\n\n\tfh = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tf = asyncFileValueOf(fh);\n\tasyncFileClose(f);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(1);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveAsyncFileOpen(void)\n{\n\tAsyncFile *f;\n\tchar *fileName;\n\tsqInt fileNameSize;\n\tsqInt fOop;\n\tsqInt okToOpen;\n\tsqInt semaIndex;\n\tsqInt writeFlag;\n\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(2)));\n\tfileName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(2))));\n\twriteFlag = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(1));\n\tsemaIndex = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\n\t/* If the security plugin can be loaded, use it to check for permission.\n\tIf not, assume it's ok */\n\n\tfileNameSize = interpreterProxy->slotSizeOf(((int) fileName) - 4);\n\tif (sCOAFfn != 0) {\n\t\tokToOpen =  ((sqInt (*) (char *, sqInt, sqInt)) sCOAFfn)(fileName, fileNameSize, writeFlag);\n\t\tif (!(okToOpen)) {\n\t\t\tinterpreterProxy->primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tfOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(AsyncFile));\n\tf = asyncFileValueOf(fOop);\n\tif (!(interpreterProxy->failed())) {\n\t\tasyncFileOpen(f, (int)fileName, fileNameSize, writeFlag, semaIndex);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(4, fOop);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveAsyncFileReadResult(void)\n{\n\tsqInt buffer;\n\tsqInt bufferPtr;\n\tsqInt bufferSize;\n\tsqInt count;\n\tAsyncFile *f;\n\tsqInt fhandle;\n\tsqInt num;\n\tsqInt r;\n\tsqInt start;\n\tsqInt startIndex;\n\tsqInt _return_value;\n\n\tfhandle = interpreterProxy->stackValue(3);\n\tbuffer = interpreterProxy->stackValue(2);\n\tstart = interpreterProxy->stackIntegerValue(1);\n\tnum = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tf = asyncFileValueOf(fhandle);\n\tcount = num;\n\tstartIndex = start;\n\n\t/* in bytes or words */\n\n\tbufferSize = interpreterProxy->slotSizeOf(buffer);\n\tif (interpreterProxy->isWords(buffer)) {\n\n\t\t/* covert word counts to byte counts */\n\n\t\tcount = count * 4;\n\t\tstartIndex = ((startIndex - 1) * 4) + 1;\n\t\tbufferSize = bufferSize * 4;\n\t}\n\tinterpreterProxy->success((startIndex >= 1)\n\t && (((startIndex + count) - 1) <= bufferSize));\n\n\t/* adjust for zero-origin indexing */\n\n\tbufferPtr = ((((int) (interpreterProxy->firstIndexableField(buffer)))) + startIndex) - 1;\n\tif (!(interpreterProxy->failed())) {\n\t\tr = asyncFileReadResult(f, bufferPtr, count);\n\t}\n\t_return_value = interpreterProxy->integerObjectOf(r);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(5, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveAsyncFileReadStart(void)\n{\n\tsqInt count;\n\tAsyncFile *f;\n\tsqInt fHandle;\n\tsqInt fPosition;\n\n\tfHandle = interpreterProxy->stackValue(2);\n\tfPosition = interpreterProxy->stackIntegerValue(1);\n\tcount = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tf = asyncFileValueOf(fHandle);\n\tasyncFileReadStart(f, fPosition, count);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(3);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveAsyncFileWriteResult(void)\n{\n\tAsyncFile *f;\n\tsqInt fHandle;\n\tsqInt r;\n\tsqInt _return_value;\n\n\tfHandle = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tf = asyncFileValueOf(fHandle);\n\tr =  asyncFileWriteResult(f);\n\t_return_value = interpreterProxy->integerObjectOf(r);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveAsyncFileWriteStart(void)\n{\n\tsqInt buffer;\n\tsqInt bufferPtr;\n\tsqInt bufferSize;\n\tsqInt count;\n\tAsyncFile *f;\n\tsqInt fHandle;\n\tsqInt fPosition;\n\tsqInt num;\n\tsqInt start;\n\tsqInt startIndex;\n\n\tfHandle = interpreterProxy->stackValue(4);\n\tfPosition = interpreterProxy->stackIntegerValue(3);\n\tbuffer = interpreterProxy->stackValue(2);\n\tstart = interpreterProxy->stackIntegerValue(1);\n\tnum = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tf = asyncFileValueOf(fHandle);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tcount = num;\n\tstartIndex = start;\n\n\t/* in bytes or words */\n\n\tbufferSize = interpreterProxy->slotSizeOf(buffer);\n\tif (interpreterProxy->isWords(buffer)) {\n\n\t\t/* covert word counts to byte counts */\n\n\t\tcount = count * 4;\n\t\tstartIndex = ((startIndex - 1) * 4) + 1;\n\t\tbufferSize = bufferSize * 4;\n\t}\n\tinterpreterProxy->success((startIndex >= 1)\n\t && (((startIndex + count) - 1) <= bufferSize));\n\n\t/* adjust for zero-origin indexing */\n\n\tbufferPtr = ((((int) (interpreterProxy->firstIndexableField(buffer)))) + startIndex) - 1;\n\tif (!(interpreterProxy->failed())) {\n\t\tasyncFileWriteStart(f, fPosition, bufferPtr, count);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(5);\n\treturn null;\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n\tsqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\n/*\tInitialise the module */\n\nEXPORT(sqInt)\nshutdownModule(void)\n{\n\treturn asyncFileShutdown();\n}\n\nstatic void\nsqAssert(sqInt aBool)\n{\n\t/* missing DebugCode */;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* AsynchFilePlugin_exports[][3] = {\n\t{\"AsynchFilePlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"AsynchFilePlugin\", \"initialiseModule\", (void*)initialiseModule},\n\t{\"AsynchFilePlugin\", \"moduleUnloaded\", (void*)moduleUnloaded},\n\t{\"AsynchFilePlugin\", \"primitiveAsyncFileClose\", (void*)primitiveAsyncFileClose},\n\t{\"AsynchFilePlugin\", \"primitiveAsyncFileOpen\", (void*)primitiveAsyncFileOpen},\n\t{\"AsynchFilePlugin\", \"primitiveAsyncFileReadResult\", (void*)primitiveAsyncFileReadResult},\n\t{\"AsynchFilePlugin\", \"primitiveAsyncFileReadStart\", (void*)primitiveAsyncFileReadStart},\n\t{\"AsynchFilePlugin\", \"primitiveAsyncFileWriteResult\", (void*)primitiveAsyncFileWriteResult},\n\t{\"AsynchFilePlugin\", \"primitiveAsyncFileWriteStart\", (void*)primitiveAsyncFileWriteStart},\n\t{\"AsynchFilePlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{\"AsynchFilePlugin\", \"shutdownModule\", (void*)shutdownModule},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/B2DPlugin/B2DPlugin.c",
    "content": "/* Automatically generated by\n\tVMPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tBalloonEnginePlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"BalloonEnginePlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n#define BEBalloonEngineSize 12\n#define BEBitBltIndex 2\n#define BEFormsIndex 3\n#define BESpanIndex 1\n#define BEWorkBufferIndex 0\n#define ETBalloonEdgeDataSize 6\n#define ETIndexIndex 0\n#define ETLinesIndex 4\n#define ETXValueIndex 1\n#define ETYValueIndex 2\n#define ETZValueIndex 3\n#define FTBalloonFillDataSize 6\n#define FTIndexIndex 0\n#define FTMaxXIndex 2\n#define FTMinXIndex 1\n#define FTYValueIndex 3\n#define GBBaseSize 16\n#define GBBitmapDepth 12\n#define GBBitmapHeight 11\n#define GBBitmapRaster 14\n#define GBBitmapSize 13\n#define GBBitmapWidth 10\n#define GBColormapOffset 18\n#define GBColormapSize 15\n#define GBEndX 14\n#define GBEndY 15\n#define GBFinalX 21\n#define GBMBaseSize 18\n#define GBTileFlag 16\n#define GBUpdateData 10\n#define GBUpdateDDX 4\n#define GBUpdateDDY 5\n#define GBUpdateDX 2\n#define GBUpdateDY 3\n#define GBUpdateX 0\n#define GBUpdateY 1\n#define GBViaX 12\n#define GBViaY 13\n#define GBWideEntry 18\n#define GBWideExit 19\n#define GBWideExtent 20\n#define GBWideFill 16\n#define GBWideSize 28\n#define GBWideUpdateData 22\n#define GBWideWidth 17\n#define GEBaseEdgeSize 10\n#define GEBaseFillSize 4\n#define GEEdgeFillsInvalid 0x10000\n#define GEFAlreadyFailed 100\n#define GEFBadPoint 121\n#define GEFBitBltLoadFailed 122\n#define GEFClassMismatch 114\n#define GEFEdgeDataTooSmall 112\n#define GEFEngineIsInteger 101\n#define GEFEngineIsWords 102\n#define GEFEngineStopped 104\n#define GEFEngineTooSmall 103\n#define GEFEntityCheckFailed 120\n#define GEFEntityLoadFailed 119\n#define GEFFillDataTooSmall 113\n#define GEFFormLoadFailed 123\n#define GEFillIndexLeft 8\n#define GEFillIndexRight 9\n#define GEFSizeMismatch 115\n#define GEFWorkBufferBadMagic 108\n#define GEFWorkBufferIsInteger 105\n#define GEFWorkBufferIsPointers 106\n#define GEFWorkBufferStartWrong 110\n#define GEFWorkBufferTooSmall 107\n#define GEFWorkBufferWrongSize 109\n#define GEFWorkTooBig 111\n#define GEFWrongEdge 118\n#define GEFWrongFill 117\n#define GEFWrongState 116\n#define GENumLines 7\n#define GEObjectIndex 2\n#define GEObjectLength 1\n#define GEObjectType 0\n#define GEPrimitiveBezier 6\n#define GEPrimitiveClippedBitmapFill 0x400\n#define GEPrimitiveEdge 2\n#define GEPrimitiveEdgeMask 0xFF\n#define GEPrimitiveFill 0x100\n#define GEPrimitiveFillMask 0xFF00\n#define GEPrimitiveLine 4\n#define GEPrimitiveLinearGradientFill 0x200\n#define GEPrimitiveRadialGradientFill 0x300\n#define GEPrimitiveTypeMask 0xFFFF\n#define GEPrimitiveWide 1\n#define GEPrimitiveWideBezier 7\n#define GEPrimitiveWideLine 5\n#define GEPrimitiveWideMask 0xFE\n#define GErrorAETEntry 6\n#define GErrorBadState 2\n#define GErrorFillEntry 5\n#define GErrorGETEntry 4\n#define GErrorNeedFlush 3\n#define GErrorNoMoreSpace 1\n#define GEStateAddingFromGET 1\n#define GEStateBlitBuffer 5\n#define GEStateCompleted 8\n#define GEStateScanningAET 3\n#define GEStateUnlocked 0\n#define GEStateUpdateEdges 6\n#define GEStateWaitingChange 7\n#define GEStateWaitingForEdge 2\n#define GEStateWaitingForFill 4\n#define GEXValue 4\n#define GEYValue 5\n#define GEZValue 6\n#define GFDirectionX 6\n#define GFDirectionY 7\n#define GFNormalX 8\n#define GFNormalY 9\n#define GFOriginX 4\n#define GFOriginY 5\n#define GFRampLength 10\n#define GFRampOffset 12\n#define GGBaseSize 12\n#define GLBaseSize 16\n#define GLEndX 14\n#define GLEndY 15\n#define GLError 13\n#define GLErrorAdjDown 15\n#define GLErrorAdjUp 14\n#define GLWideEntry 18\n#define GLWideExit 19\n#define GLWideExtent 20\n#define GLWideFill 16\n#define GLWideSize 21\n#define GLWideWidth 17\n#define GLXDirection 10\n#define GLXIncrement 12\n#define GLYDirection 11\n#define GWAAColorMask 0x33\n#define GWAAColorShift 50\n#define GWAAHalfPixel 53\n#define GWAALevel 48\n#define GWAAScanMask 0x34\n#define GWAAShift 49\n#define GWAETStart 13\n#define GWAETUsed 14\n#define GWBezierHeightSubdivisions 109\n#define GWBezierLineConversions 111\n#define GWBezierMonotonSubdivisions 108\n#define GWBezierOverflowSubdivisions 110\n#define GWBufferTop 10\n#define GWClearSpanBuffer 69\n#define GWClipMaxX 43\n#define GWClipMaxY 45\n#define GWClipMinX 42\n#define GWClipMinY 44\n#define GWColorTransform 24\n#define GWCountAddAETEntry 97\n#define GWCountChangeAETEntry 107\n#define GWCountDisplaySpan 103\n#define GWCountFinishTest 93\n#define GWCountInitializing 91\n#define GWCountMergeFill 101\n#define GWCountNextAETEntry 105\n#define GWCountNextFillEntry 99\n#define GWCountNextGETEntry 95\n#define GWCurrentY 88\n#define GWCurrentZ 113\n#define GWDestOffsetX 46\n#define GWDestOffsetY 47\n#define GWEdgeTransform 18\n#define GWFillMaxX 37\n#define GWFillMaxY 39\n#define GWFillMinX 36\n#define GWFillMinY 38\n#define GWFillOffsetX 40\n#define GWFillOffsetY 41\n#define GWGETStart 11\n#define GWGETUsed 12\n#define GWHasColorTransform 17\n#define GWHasEdgeTransform 16\n#define GWHeaderSize 128\n#define GWLastExportedEdge 65\n#define GWLastExportedFill 66\n#define GWLastExportedLeftX 67\n#define GWLastExportedRightX 68\n#define GWMagicIndex 0\n#define GWMagicNumber 1097753705\n#define GWMinimalSize 256\n#define GWNeedsFlush 63\n#define GWObjStart 8\n#define GWObjUsed 9\n#define GWPoint1 80\n#define GWPoint2 82\n#define GWPoint3 84\n#define GWPoint4 86\n#define GWPointListFirst 70\n#define GWSize 1\n#define GWSpanEnd 34\n#define GWSpanEndAA 35\n#define GWSpanSize 33\n#define GWSpanStart 32\n#define GWState 2\n#define GWStopReason 64\n#define GWTimeAddAETEntry 96\n#define GWTimeChangeAETEntry 106\n#define GWTimeDisplaySpan 102\n#define GWTimeFinishTest 92\n#define GWTimeInitializing 90\n#define GWTimeMergeFill 100\n#define GWTimeNextAETEntry 104\n#define GWTimeNextFillEntry 98\n#define GWTimeNextGETEntry 94\n#define PrimErrBadArgument 3\n#define PrimErrBadNumArgs 5\n\n\n/*** Function Prototypes ***/\nstatic sqInt aaColorMaskGet(void);\nstatic sqInt aaColorMaskPut(sqInt value);\nstatic sqInt aaColorShiftGet(void);\nstatic sqInt aaColorShiftPut(sqInt value);\nstatic sqInt aaFirstPixelFromto(sqInt leftX, sqInt rightX);\nstatic sqInt aaHalfPixelGet(void);\nstatic sqInt aaHalfPixelPut(sqInt value);\nstatic sqInt aaLastPixelFromto(sqInt leftX, sqInt rightX);\nstatic sqInt aaLevelGet(void);\nstatic sqInt aaLevelPut(sqInt value);\nstatic sqInt aaScanMaskGet(void);\nstatic sqInt aaScanMaskPut(sqInt value);\nstatic sqInt aaShiftGet(void);\nstatic sqInt aaShiftPut(sqInt value);\nstatic sqInt absoluteSquared8Dot24(sqInt value);\nstatic sqInt accurateLengthOfwith(sqInt deltaX, sqInt deltaY);\nstatic sqInt addEdgeToGET(sqInt edge);\nstatic sqInt adjustAALevel(void);\nstatic sqInt adjustWideBezierLeftwidthoffsetendX(sqInt bezier, sqInt lineWidth, sqInt lineOffset, sqInt endX);\nstatic sqInt adjustWideBezierRightwidthoffsetendX(sqInt bezier, sqInt lineWidth, sqInt lineOffset, sqInt endX);\nstatic sqInt adjustWideLineafterSteppingFromto(sqInt line, sqInt lastX, sqInt nextX);\nstatic sqInt aetStartGet(void);\nstatic sqInt aetStartPut(sqInt value);\nstatic sqInt aetUsedGet(void);\nstatic sqInt aetUsedPut(sqInt value);\nstatic sqInt allocateAETEntry(sqInt nSlots);\nstatic sqInt allocateBezier(void);\nstatic sqInt allocateBezierStackEntry(void);\nstatic sqInt allocateBitmapFillcolormap(sqInt cmSize, int *cmBits);\nstatic sqInt allocateGETEntry(sqInt nSlots);\nstatic sqInt allocateGradientFillrampWidthisRadial(int *ramp, sqInt rampWidth, sqInt isRadial);\nstatic sqInt allocateLine(void);\nstatic sqInt allocateObjEntry(sqInt nSlots);\nstatic sqInt allocateStackEntry(sqInt nSlots);\nstatic sqInt allocateStackFillEntry(void);\nstatic sqInt allocateWideBezier(void);\nstatic sqInt allocateWideLine(void);\nstatic sqInt areEdgeFillsValid(sqInt edge);\nstatic sqInt assureValuebetweenand(sqInt val1, sqInt val2, sqInt val3);\nstatic sqInt bezierEndXOf(sqInt bezier);\nstatic sqInt bezierEndXOfput(sqInt bezier, sqInt value);\nstatic sqInt bezierEndYOf(sqInt bezier);\nstatic sqInt bezierEndYOfput(sqInt bezier, sqInt value);\nstatic sqInt bezierFinalXOf(sqInt bezier);\nstatic sqInt bezierFinalXOfput(sqInt bezier, sqInt value);\nstatic int * bezierUpdateDataOf(sqInt bezier);\nstatic sqInt bezierViaXOf(sqInt bezier);\nstatic sqInt bezierViaXOfput(sqInt bezier, sqInt value);\nstatic sqInt bezierViaYOf(sqInt bezier);\nstatic sqInt bezierViaYOfput(sqInt bezier, sqInt value);\nstatic sqInt bitmapCmSizeOf(sqInt bmFill);\nstatic sqInt bitmapCmSizeOfput(sqInt bmFill, sqInt value);\nstatic sqInt bitmapDepthOf(sqInt bmFill);\nstatic sqInt bitmapDepthOfput(sqInt bmFill, sqInt value);\nstatic sqInt bitmapHeightOf(sqInt bmFill);\nstatic sqInt bitmapHeightOfput(sqInt bmFill, sqInt value);\nstatic sqInt bitmapRasterOf(sqInt bmFill);\nstatic sqInt bitmapRasterOfput(sqInt bmFill, sqInt value);\nstatic sqInt bitmapSizeOf(sqInt bmFill);\nstatic sqInt bitmapSizeOfput(sqInt bmFill, sqInt value);\nstatic sqInt bitmapTileFlagOf(sqInt bmFill);\nstatic sqInt bitmapTileFlagOfput(sqInt bmFill, sqInt value);\nstatic sqInt bitmapValuebitsatXy(sqInt bmFill, sqInt bits, sqInt xp, sqInt yp);\nstatic sqInt bitmapWidthOf(sqInt bmFill);\nstatic sqInt bitmapWidthOfput(sqInt bmFill, sqInt value);\nstatic sqInt bzEndX(sqInt index);\nstatic sqInt bzEndXput(sqInt index, sqInt value);\nstatic sqInt bzEndY(sqInt index);\nstatic sqInt bzEndYput(sqInt index, sqInt value);\nstatic sqInt bzStartX(sqInt index);\nstatic sqInt bzStartXput(sqInt index, sqInt value);\nstatic sqInt bzStartY(sqInt index);\nstatic sqInt bzStartYput(sqInt index, sqInt value);\nstatic sqInt bzViaX(sqInt index);\nstatic sqInt bzViaXput(sqInt index, sqInt value);\nstatic sqInt bzViaY(sqInt index);\nstatic sqInt bzViaYput(sqInt index, sqInt value);\nstatic sqInt checkCompressedFillIndexListmaxsegments(sqInt fillList, sqInt maxIndex, sqInt nSegs);\nstatic sqInt checkCompressedFills(sqInt indexList);\nstatic sqInt checkCompressedLineWidthssegments(sqInt lineWidthList, sqInt nSegments);\nstatic sqInt checkCompressedPointssegments(sqInt points, sqInt nSegments);\nstatic sqInt checkCompressedShapesegmentsleftFillsrightFillslineWidthslineFillsfillIndexList(sqInt points, sqInt nSegments, sqInt leftFills, sqInt rightFills, sqInt lineWidths, sqInt lineFills, sqInt fillIndexList);\nstatic sqInt checkedAddBezierToGET(sqInt bezier);\nstatic sqInt checkedAddEdgeToGET(sqInt edge);\nstatic sqInt checkedAddLineToGET(sqInt line);\nstatic double * circleCosTable(void);\nstatic double * circleSinTable(void);\nstatic sqInt clampValuemax(sqInt value, sqInt maxValue);\nstatic sqInt clearSpanBuffer(void);\nstatic sqInt clearSpanBufferGet(void);\nstatic sqInt clearSpanBufferPut(sqInt value);\nstatic sqInt clipMaxXGet(void);\nstatic sqInt clipMaxXPut(sqInt value);\nstatic sqInt clipMaxYGet(void);\nstatic sqInt clipMaxYPut(sqInt value);\nstatic sqInt clipMinXGet(void);\nstatic sqInt clipMinXPut(sqInt value);\nstatic sqInt clipMinYGet(void);\nstatic sqInt clipMinYPut(sqInt value);\nstatic int * colormapOf(sqInt bmFill);\nstatic float * colorTransform(void);\nstatic sqInt computeBezierSplitAtHalf(sqInt index);\nstatic sqInt computeBeziersplitAt(sqInt index, double  param);\nstatic sqInt computeFinalWideBezierValueswidth(sqInt bezier, sqInt lineWidth);\nstatic sqInt computeSqrt(sqInt length2);\nstatic sqInt copyBitsFromtoat(sqInt x0, sqInt x1, sqInt yValue);\nstatic sqInt createGlobalEdgeTable(void);\nstatic sqInt currentYGet(void);\nstatic sqInt currentYPut(sqInt value);\nstatic sqInt currentZGet(void);\nstatic sqInt currentZPut(sqInt value);\nstatic sqInt destOffsetXGet(void);\nstatic sqInt destOffsetXPut(sqInt value);\nstatic sqInt destOffsetYGet(void);\nstatic sqInt destOffsetYPut(sqInt value);\nstatic sqInt displaySpanBufferAt(sqInt y);\nstatic sqInt drawWideEdgefrom(sqInt edge, sqInt leftX);\nstatic sqInt edgeFillsInvalidate(sqInt edge);\nstatic sqInt edgeFillsValidate(sqInt edge);\nstatic sqInt edgeLeftFillOf(sqInt edge);\nstatic sqInt edgeLeftFillOfput(sqInt edge, sqInt value);\nstatic sqInt edgeNumLinesOf(sqInt edge);\nstatic sqInt edgeNumLinesOfput(sqInt edge, sqInt value);\nstatic sqInt edgeRightFillOf(sqInt edge);\nstatic sqInt edgeRightFillOfput(sqInt edge, sqInt value);\nstatic float * edgeTransform(void);\nstatic sqInt edgeTypeOf(sqInt edge);\nstatic sqInt edgeXValueOf(sqInt edge);\nstatic sqInt edgeXValueOfput(sqInt edge, sqInt value);\nstatic sqInt edgeYValueOf(sqInt edge);\nstatic sqInt edgeYValueOfput(sqInt edge, sqInt value);\nstatic sqInt edgeZValueOf(sqInt edge);\nstatic sqInt edgeZValueOfput(sqInt edge, sqInt value);\nstatic sqInt errorWrongIndex(void);\nstatic sqInt estimatedLengthOfwith(sqInt deltaX, sqInt deltaY);\nstatic sqInt fillAllFromto(sqInt leftX, sqInt rightX);\nstatic sqInt fillBitmapSpan(void);\nstatic sqInt fillBitmapSpanAAfromtoat(sqInt bmFill, sqInt leftX, sqInt rightX, sqInt yValue);\nstatic sqInt fillBitmapSpanfromto(int *bits, sqInt leftX, sqInt rightX);\nstatic sqInt fillBitmapSpanfromtoat(sqInt bmFill, sqInt leftX, sqInt rightX, sqInt yValue);\nstatic sqInt fillColorSpanAAx0x1(sqInt pixelValue32, sqInt leftX, sqInt rightX);\nstatic sqInt fillColorSpanfromto(sqInt pixelValue32, sqInt leftX, sqInt rightX);\nstatic sqInt fillDirectionXOf(sqInt fill);\nstatic sqInt fillDirectionXOfput(sqInt fill, sqInt value);\nstatic sqInt fillDirectionYOf(sqInt fill);\nstatic sqInt fillDirectionYOfput(sqInt fill, sqInt value);\nstatic sqInt fillLinearGradient(void);\nstatic sqInt fillLinearGradientAArampdsdsXfromto(sqInt fill, int *ramp, sqInt deltaS, sqInt dsX, sqInt leftX, sqInt rightX);\nstatic sqInt fillLinearGradientfromtoat(sqInt fill, sqInt leftX, sqInt rightX, sqInt yValue);\nstatic sqInt fillMaxXGet(void);\nstatic sqInt fillMaxXPut(sqInt value);\nstatic sqInt fillMaxYGet(void);\nstatic sqInt fillMaxYPut(sqInt value);\nstatic sqInt fillMinXGet(void);\nstatic sqInt fillMinXPut(sqInt value);\nstatic sqInt fillMinYGet(void);\nstatic sqInt fillMinYPut(sqInt value);\nstatic sqInt fillNormalXOf(sqInt fill);\nstatic sqInt fillNormalXOfput(sqInt fill, sqInt value);\nstatic sqInt fillNormalYOf(sqInt fill);\nstatic sqInt fillNormalYOfput(sqInt fill, sqInt value);\nstatic sqInt fillOffsetXGet(void);\nstatic sqInt fillOffsetXPut(sqInt value);\nstatic sqInt fillOffsetYGet(void);\nstatic sqInt fillOffsetYPut(sqInt value);\nstatic sqInt fillOriginXOf(sqInt fill);\nstatic sqInt fillOriginXOfput(sqInt fill, sqInt value);\nstatic sqInt fillOriginYOf(sqInt fill);\nstatic sqInt fillOriginYOfput(sqInt fill, sqInt value);\nstatic sqInt fillRadialDecreasingAArampdeltaSTdsXdtXfromto(sqInt fill, int *ramp,  int *deltaST, sqInt dsX, sqInt dtX, sqInt leftX, sqInt rightX);\nstatic sqInt fillRadialDecreasingrampdeltaSTdsXdtXfromto(sqInt fill, sqInt ramp, sqInt deltaST, sqInt dsX, sqInt dtX, sqInt leftX, sqInt rightX);\nstatic sqInt fillRadialGradient(void);\nstatic sqInt fillRadialGradientfromtoat(sqInt fill, sqInt leftX, sqInt rightX, sqInt yValue);\nstatic sqInt fillRadialIncreasingAArampdeltaSTdsXdtXfromto(sqInt fill, int *ramp,  int *deltaST, sqInt dsX, sqInt dtX, sqInt leftX, sqInt rightX);\nstatic sqInt fillRadialIncreasingrampdeltaSTdsXdtXfromto(sqInt fill, sqInt ramp, sqInt deltaST, sqInt dsX, sqInt dtX, sqInt leftX, sqInt rightX);\nstatic sqInt fillSortsbefore(sqInt fillEntry1, sqInt fillEntry2);\nstatic sqInt fillSpanfromto(unsigned int fill, sqInt leftX, sqInt rightX);\nstatic sqInt fillTypeOf(sqInt fill);\nstatic sqInt findNextAETEdgeFrom(sqInt leftEdge);\nstatic sqInt findNextExternalEntryFromGET(void);\nstatic sqInt findNextExternalFillFromAET(void);\nstatic sqInt findNextExternalUpdateFromAET(void);\nstatic sqInt findStackFilldepth(sqInt fillIndex, sqInt depth);\nstatic sqInt finishedProcessing(void);\nstatic sqInt firstPointListGet(void);\nstatic sqInt firstPointListPut(sqInt value);\nstatic sqInt freeStackFillEntry(void);\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt getSortsbefore(sqInt edge1, sqInt edge2);\nstatic sqInt getStartGet(void);\nstatic sqInt getStartPut(sqInt value);\nstatic sqInt getUsedGet(void);\nstatic sqInt getUsedPut(sqInt value);\nstatic sqInt gradientRampLengthOf(sqInt fill);\nstatic sqInt gradientRampLengthOfput(sqInt fill, sqInt value);\nstatic int * gradientRampOf(sqInt fill);\nstatic sqInt halt(void);\nstatic sqInt hasColorTransform(void);\nstatic sqInt hasColorTransformGet(void);\nstatic sqInt hasColorTransformPut(sqInt value);\nstatic sqInt hasEdgeTransform(void);\nstatic sqInt hasEdgeTransformGet(void);\nstatic sqInt hasEdgeTransformPut(sqInt value);\nstatic sqInt hideFilldepth(sqInt fillIndex, sqInt depth);\nstatic sqInt incrementPointby(int *point, sqInt delta);\nstatic sqInt incrementStatby(sqInt statIndex, sqInt value);\nstatic sqInt indexForInsertingIntoAET(sqInt edge);\nstatic sqInt initColorTransform(void);\nstatic sqInt initEdgeTransform(void);\nEXPORT(sqInt) initialiseModule(void);\nstatic sqInt initializeGETProcessing(void);\nstatic sqInt insertEdgeIntoAET(sqInt edge);\nstatic sqInt insertToAETbeforeIndex(sqInt edge, sqInt index);\nstatic sqInt isBezier(sqInt bezier);\nstatic sqInt isEdge(sqInt edge);\nstatic sqInt isFillColor(sqInt fill);\nstatic sqInt isFillOkay(sqInt fill);\nstatic sqInt isFill(sqInt fill);\nstatic sqInt isLine(sqInt line);\nstatic sqInt isObject(sqInt obj);\nstatic sqInt isRealFill(sqInt fill);\nstatic sqInt isStackEntry(sqInt entry);\nstatic sqInt isStackIndex(sqInt index);\nstatic sqInt isWideBezier(sqInt bezier);\nstatic sqInt isWideLine(sqInt line);\nstatic sqInt isWide(sqInt object);\nstatic sqInt lastExportedEdgeGet(void);\nstatic sqInt lastExportedEdgePut(sqInt value);\nstatic sqInt lastExportedFillGet(void);\nstatic sqInt lastExportedFillPut(sqInt value);\nstatic sqInt lastExportedLeftXGet(void);\nstatic sqInt lastExportedLeftXPut(sqInt value);\nstatic sqInt lastExportedRightXGet(void);\nstatic sqInt lastExportedRightXPut(sqInt value);\nstatic sqInt lineEndXOf(sqInt line);\nstatic sqInt lineEndXOfput(sqInt line, sqInt value);\nstatic sqInt lineEndYOf(sqInt line);\nstatic sqInt lineEndYOfput(sqInt line, sqInt value);\nstatic sqInt lineErrorAdjDownOf(sqInt line);\nstatic sqInt lineErrorAdjDownOfput(sqInt line, sqInt value);\nstatic sqInt lineErrorAdjUpOf(sqInt line);\nstatic sqInt lineErrorAdjUpOfput(sqInt line, sqInt value);\nstatic sqInt lineErrorOf(sqInt line);\nstatic sqInt lineErrorOfput(sqInt line, sqInt value);\nstatic sqInt lineXDirectionOf(sqInt line);\nstatic sqInt lineXDirectionOfput(sqInt line, sqInt value);\nstatic sqInt lineXIncrementOf(sqInt line);\nstatic sqInt lineXIncrementOfput(sqInt line, sqInt value);\nstatic sqInt lineYDirectionOf(sqInt line);\nstatic sqInt lineYDirectionOfput(sqInt line, sqInt value);\nstatic sqInt loadAndSubdivideBezierFromviatoisWide(int *point1, int *point2, int *point3, sqInt wideFlag);\nstatic sqInt loadArrayPolygonnPointsfilllineWidthlineFill(sqInt points, sqInt nPoints, sqInt fillIndex, sqInt lineWidth, sqInt lineFill);\nstatic sqInt loadArrayShapenSegmentsfilllineWidthlineFill(sqInt points, sqInt nSegments, sqInt fillIndex, sqInt lineWidth, sqInt lineFill);\nstatic sqInt loadArrayTransformFromintolength(sqInt transformOop, float *destPtr, sqInt n);\nstatic sqInt loadBeziersegmentleftFillrightFilloffset(sqInt bezier, sqInt index, sqInt leftFillIndex, sqInt rightFillIndex, sqInt yOffset);\nstatic sqInt loadBitBltFrom(sqInt bbObj);\nstatic sqInt loadBitmapFillcolormaptilefromalongnormalxIndex(sqInt formOop, sqInt cmOop, sqInt tileFlag, int *point1, int *point2, int *point3, sqInt xIndex);\nstatic int * loadBitsFrom(sqInt bmFill);\nstatic sqInt loadColorTransformFrom(sqInt transformOop);\nstatic sqInt loadCompressedSegmentfromshortleftFillrightFilllineWidthlineColor(sqInt segmentIndex, sqInt points, sqInt pointsShort, sqInt leftFill, sqInt rightFill, sqInt lineWidth, sqInt lineFill);\nstatic sqInt loadCompressedShapesegmentsleftFillsrightFillslineWidthslineFillsfillIndexListpointShort(int *points, sqInt nSegments, int *leftFills, int *rightFills, int *lineWidths, int *lineFills, int *fillIndexList, sqInt pointsShort);\nstatic sqInt loadEdgeStateFrom(sqInt edgeOop);\nstatic sqInt loadEdgeTransformFrom(sqInt transformOop);\nstatic sqInt loadFillOrientationfromalongnormalwidthheight(sqInt fill, int *point1, int *point2, int *point3, sqInt fillWidth, sqInt fillHeight);\nstatic sqInt loadFormsFrom(sqInt arrayOop);\nstatic sqInt loadGradientFillfromalongnormalisRadial(sqInt rampOop, int *point1, int *point2, int *point3, sqInt isRadial);\nstatic sqInt loadLinefromtooffsetleftFillrightFill(sqInt line, int *point1, int *point2, sqInt yOffset, sqInt leftFill, sqInt rightFill);\nstatic sqInt loadOvalSegmentwhcxcy(sqInt seg, sqInt w, sqInt h, sqInt cx, sqInt cy);\nstatic sqInt loadOvallineFillleftFillrightFill(sqInt lineWidth, sqInt lineFill, sqInt leftFill, sqInt rightFill);\nstatic sqInt loadPointIntAtfrom(sqInt index, sqInt intArray);\nstatic short loadPointShortAtfrom(sqInt index, sqInt shortArray);\nstatic sqInt loadPointfrom(int *pointArray, sqInt pointOop);\nstatic sqInt loadPolygonnPointsfilllineWidthlineFillpointsShort(int *points, sqInt nPoints, sqInt fillIndex, sqInt lineWidth, sqInt lineFill, sqInt isShort);\nstatic sqInt loadRectanglelineFillleftFillrightFill(sqInt lineWidth, sqInt lineFill, sqInt leftFill, sqInt rightFill);\nstatic sqInt loadRenderingState(void);\nstatic sqInt loadShapenSegmentsfilllineWidthlineFillpointsShort(int *points, sqInt nSegments, sqInt fillIndex, sqInt lineWidth, sqInt lineFill, sqInt pointsShort);\nstatic sqInt loadSpanBufferFrom(sqInt spanOop);\nstatic sqInt loadTransformFromintolength(sqInt transformOop, float *destPtr, sqInt n);\nstatic sqInt loadWideBezierlineFillleftFillrightFilln(sqInt lineWidth, sqInt lineFill, sqInt leftFill, sqInt rightFill, sqInt nSegments);\nstatic sqInt loadWideLinefromtolineFillleftFillrightFill(sqInt lineWidth, int *p1, int *p2, sqInt lineFill, sqInt leftFill, sqInt rightFill);\nstatic sqInt loadWordTransformFromintolength(sqInt transformOop, float *destPtr, sqInt n);\nstatic sqInt loadWorkBufferFrom(sqInt wbOop);\nstatic sqInt magicNumberGet(void);\nstatic sqInt magicNumberPut(sqInt value);\nstatic sqInt makeRectFromPoints(void);\nstatic sqInt makeUnsignedFrom(sqInt someIntegerValue);\nEXPORT(sqInt) moduleUnloaded(char *aModuleName);\nstatic sqInt moveAETEntryFromedgex(sqInt index, sqInt edge, sqInt xValue);\nstatic sqInt msg(char *s);\nstatic sqInt needAvailableSpace(sqInt nSlots);\nstatic sqInt needsFlush(void);\nstatic sqInt needsFlushGet(void);\nstatic sqInt needsFlushPut(sqInt value);\nstatic sqInt objectHeaderOf(sqInt obj);\nstatic sqInt objectIndexOf(sqInt obj);\nstatic sqInt objectIndexOfput(sqInt obj, sqInt value);\nstatic sqInt objectLengthOf(sqInt obj);\nstatic sqInt objectLengthOfput(sqInt obj, sqInt value);\nstatic sqInt objectTypeOf(sqInt obj);\nstatic sqInt objectTypeOfput(sqInt obj, sqInt value);\nstatic sqInt objStartGet(void);\nstatic sqInt objStartPut(sqInt value);\nstatic sqInt objUsedGet(void);\nstatic sqInt objUsedPut(sqInt value);\nstatic sqInt objat(sqInt object, sqInt index);\nstatic sqInt objatput(sqInt object, sqInt index, sqInt value);\nstatic sqInt offsetFromWidth(sqInt lineWidth);\nstatic int * point1Get(void);\nstatic int * point2Get(void);\nstatic int * point3Get(void);\nstatic int * point4Get(void);\nstatic sqInt postDisplayAction(void);\nEXPORT(sqInt) primitiveAbortProcessing(void);\nEXPORT(sqInt) primitiveAddActiveEdgeEntry(void);\nEXPORT(sqInt) primitiveAddBezier(void);\nEXPORT(sqInt) primitiveAddBezierShape(void);\nEXPORT(sqInt) primitiveAddBitmapFill(void);\nEXPORT(sqInt) primitiveAddCompressedShape(void);\nEXPORT(sqInt) primitiveAddGradientFill(void);\nEXPORT(sqInt) primitiveAddLine(void);\nEXPORT(sqInt) primitiveAddOval(void);\nEXPORT(sqInt) primitiveAddPolygon(void);\nEXPORT(sqInt) primitiveAddRect(void);\nEXPORT(sqInt) primitiveChangedActiveEdgeEntry(void);\nEXPORT(sqInt) primitiveCopyBuffer(void);\nEXPORT(sqInt) primitiveDisplaySpanBuffer(void);\nEXPORT(sqInt) primitiveDoProfileStats(void);\nEXPORT(sqInt) primitiveFinishedProcessing(void);\nEXPORT(sqInt) primitiveGetAALevel(void);\nEXPORT(sqInt) primitiveGetBezierStats(void);\nEXPORT(sqInt) primitiveGetClipRect(void);\nEXPORT(sqInt) primitiveGetCounts(void);\nEXPORT(sqInt) primitiveGetDepth(void);\nEXPORT(sqInt) primitiveGetFailureReason(void);\nEXPORT(sqInt) primitiveGetOffset(void);\nEXPORT(sqInt) primitiveGetTimes(void);\nEXPORT(sqInt) primitiveInitializeBuffer(void);\nEXPORT(sqInt) primitiveInitializeProcessing(void);\nEXPORT(sqInt) primitiveMergeFillFrom(void);\nEXPORT(sqInt) primitiveNeedsFlush(void);\nEXPORT(sqInt) primitiveNeedsFlushPut(void);\nEXPORT(sqInt) primitiveNextActiveEdgeEntry(void);\nEXPORT(sqInt) primitiveNextFillEntry(void);\nEXPORT(sqInt) primitiveNextGlobalEdgeEntry(void);\nEXPORT(sqInt) primitiveRegisterExternalEdge(void);\nEXPORT(sqInt) primitiveRegisterExternalFill(void);\nEXPORT(sqInt) primitiveRenderImage(void);\nEXPORT(sqInt) primitiveRenderScanline(void);\nEXPORT(sqInt) primitiveSetAALevel(void);\nEXPORT(sqInt) primitiveSetBitBltPlugin(void);\nEXPORT(sqInt) primitiveSetClipRect(void);\nEXPORT(sqInt) primitiveSetColorTransform(void);\nEXPORT(sqInt) primitiveSetDepth(void);\nEXPORT(sqInt) primitiveSetEdgeTransform(void);\nEXPORT(sqInt) primitiveSetOffset(void);\nstatic sqInt proceedRenderingImage(void);\nstatic sqInt proceedRenderingScanline(void);\nstatic sqInt quickLoadEngineFrom(sqInt engineOop);\nstatic sqInt quickLoadEngineFromrequiredState(sqInt oop, sqInt requiredState);\nstatic sqInt quickLoadEngineFromrequiredStateor(sqInt oop, sqInt requiredState, sqInt alternativeState);\nstatic sqInt quickRemoveInvalidFillsAt(sqInt leftX);\nstatic sqInt quickSortGlobalEdgeTablefromto(int *array, sqInt i, sqInt j);\nstatic sqInt removeFirstAETEntry(void);\nstatic sqInt repeatValuemax(sqInt delta, sqInt maxValue);\nstatic sqInt resetGraphicsEngineStats(void);\nstatic sqInt resortFirstAETEntry(void);\nstatic sqInt returnWideBezierFill(void);\nstatic sqInt returnWideBezierWidth(void);\nstatic sqInt returnWideLineFill(void);\nstatic sqInt returnWideLineWidth(void);\nstatic int * rShiftTable(void);\nstatic sqInt setAALevel(sqInt level);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\nstatic sqInt shortRunLengthAtfrom(sqInt i, sqInt runArray);\nstatic sqInt shortRunValueAtfrom(sqInt i, sqInt runArray);\nstatic sqInt showFilldepthrightX(sqInt fillIndex, sqInt depth, sqInt rightX);\nstatic int * smallSqrtTable(void);\nstatic sqInt sortGlobalEdgeTable(void);\nstatic sqInt spanEndAAGet(void);\nstatic sqInt spanEndAAPut(sqInt value);\nstatic sqInt spanEndGet(void);\nstatic sqInt spanEndPut(sqInt value);\nstatic sqInt spanSizeGet(void);\nstatic sqInt spanSizePut(sqInt value);\nstatic sqInt spanStartGet(void);\nstatic sqInt spanStartPut(sqInt value);\nstatic sqInt squaredLengthOfwith(sqInt deltaX, sqInt deltaY);\nstatic sqInt stackFillDepth(sqInt index);\nstatic sqInt stackFillDepthput(sqInt index, sqInt value);\nstatic sqInt stackFillEntryLength(void);\nstatic sqInt stackFillRightX(sqInt index);\nstatic sqInt stackFillRightXput(sqInt index, sqInt value);\nstatic sqInt stackFillSize(void);\nstatic sqInt stackFillValue(sqInt index);\nstatic sqInt stackFillValueput(sqInt index, sqInt value);\nstatic sqInt stateGet(void);\nstatic sqInt statePut(sqInt value);\nstatic sqInt stepToFirstBezier(void);\nstatic sqInt stepToFirstBezierInat(sqInt bezier, sqInt yValue);\nstatic sqInt stepToFirstLine(void);\nstatic sqInt stepToFirstLineInat(sqInt line, sqInt yValue);\nstatic sqInt stepToFirstWideBezier(void);\nstatic sqInt stepToFirstWideBezierInat(sqInt bezier, sqInt yValue);\nstatic sqInt stepToFirstWideLine(void);\nstatic sqInt stepToFirstWideLineInat(sqInt line, sqInt yValue);\nstatic sqInt stepToNextBezier(void);\nstatic sqInt stepToNextBezierForwardat(sqInt updateData, sqInt yValue);\nstatic sqInt stepToNextBezierInat(sqInt bezier, sqInt yValue);\nstatic sqInt stepToNextLine(void);\nstatic sqInt stepToNextLineInat(sqInt line, sqInt yValue);\nstatic sqInt stepToNextWideBezier(void);\nstatic sqInt stepToNextWideBezierInat(sqInt bezier, sqInt yValue);\nstatic sqInt stepToNextWideLine(void);\nstatic sqInt stepToNextWideLineInat(sqInt line, sqInt yValue);\nstatic sqInt stopBecauseOf(sqInt stopReason);\nstatic sqInt stopReasonGet(void);\nstatic sqInt stopReasonPut(sqInt value);\nstatic sqInt storeEdgeStateFrominto(sqInt edge, sqInt edgeOop);\nstatic sqInt storeEngineStateInto(sqInt oop);\nstatic sqInt storeFillStateInto(sqInt fillOop);\nstatic sqInt storeRenderingState(void);\nstatic sqInt storeStopStateIntoEdgefill(sqInt edgeOop, sqInt fillOop);\nstatic sqInt subdivideBezierFrom(sqInt index);\nstatic sqInt subdivideBezier(sqInt index);\nstatic sqInt subdivideToBeMonotonInX(sqInt index);\nstatic sqInt subdivideToBeMonotonInY(sqInt index);\nstatic sqInt subdivideToBeMonotoninX(sqInt base, sqInt doTestX);\nstatic sqInt toggleFillsOf(sqInt edge);\nstatic sqInt toggleFilldepthrightX(sqInt fillIndex, sqInt depth, sqInt rightX);\nstatic sqInt toggleWideFillOf(sqInt edge);\nstatic sqInt topDepth(void);\nstatic sqInt topFill(void);\nstatic sqInt topFillDepth(void);\nstatic sqInt topFillDepthPut(sqInt value);\nstatic sqInt topFillRightX(void);\nstatic sqInt topFillRightXPut(sqInt value);\nstatic sqInt topFillValue(void);\nstatic sqInt topFillValuePut(sqInt value);\nstatic sqInt topRightX(void);\nstatic sqInt transformColor(sqInt fillIndex);\nstatic sqInt transformPoints(sqInt n);\nstatic sqInt transformPointXyinto(double  xValue, double  yValue, int *dstPoint);\nstatic sqInt transformPoint(int *point);\nstatic sqInt transformPointinto(sqInt srcPoint, sqInt dstPoint);\nstatic sqInt transformWidth(sqInt w);\nstatic sqInt uncheckedTransformColor(sqInt fillIndex);\nstatic sqInt wbSizeGet(void);\nstatic sqInt wbSizePut(sqInt value);\nstatic sqInt wbStackClear(void);\nstatic sqInt wbStackPop(sqInt nItems);\nstatic sqInt wbStackPush(sqInt nItems);\nstatic sqInt wbStackSize(void);\nstatic sqInt wbStackValue(sqInt index);\nstatic sqInt wbStackValueput(sqInt index, sqInt value);\nstatic sqInt wbTopGet(void);\nstatic sqInt wbTopPut(sqInt value);\nstatic sqInt wideBezierEntryOf(sqInt line);\nstatic sqInt wideBezierEntryOfput(sqInt line, sqInt value);\nstatic sqInt wideBezierExitOf(sqInt line);\nstatic sqInt wideBezierExitOfput(sqInt line, sqInt value);\nstatic sqInt wideBezierExtentOf(sqInt bezier);\nstatic sqInt wideBezierExtentOfput(sqInt bezier, sqInt value);\nstatic sqInt wideBezierFillOf(sqInt bezier);\nstatic sqInt wideBezierFillOfput(sqInt bezier, sqInt value);\nstatic int * wideBezierUpdateDataOf(sqInt bezier);\nstatic sqInt wideBezierWidthOf(sqInt line);\nstatic sqInt wideBezierWidthOfput(sqInt line, sqInt value);\nstatic sqInt wideLineEntryOf(sqInt line);\nstatic sqInt wideLineEntryOfput(sqInt line, sqInt value);\nstatic sqInt wideLineExitOf(sqInt line);\nstatic sqInt wideLineExitOfput(sqInt line, sqInt value);\nstatic sqInt wideLineExtentOf(sqInt line);\nstatic sqInt wideLineExtentOfput(sqInt line, sqInt value);\nstatic sqInt wideLineFillOf(sqInt line);\nstatic sqInt wideLineFillOfput(sqInt line, sqInt value);\nstatic sqInt wideLineWidthOf(sqInt line);\nstatic sqInt wideLineWidthOfput(sqInt line, sqInt value);\nstatic sqInt workBufferPut(sqInt wbOop);\n\n\n/*** Variables ***/\nstatic int* aetBuffer;\nstatic char bbPluginName[256] = \"BitBltPlugin\";\nstatic void * copyBitsFn;\nstatic sqInt dispatchedValue;\nstatic sqInt dispatchReturnValue;\nstatic int doProfileStats = 0;\nstatic sqInt engine;\nstatic sqInt engineStopped;\nstatic sqInt formArray;\nstatic sqInt geProfileTime;\nstatic int* getBuffer;\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic void * loadBBFn;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"B2DPlugin VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"B2DPlugin VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\nstatic int* objBuffer;\nstatic sqInt objUsed;\nstatic unsigned int* spanBuffer;\nstatic int* workBuffer;\n\n\nstatic sqInt\naaColorMaskGet(void)\n{\n\treturn workBuffer[GWAAColorMask];\n}\n\nstatic sqInt\naaColorMaskPut(sqInt value)\n{\n\treturn workBuffer[GWAAColorMask] = value;\n}\n\nstatic sqInt\naaColorShiftGet(void)\n{\n\treturn workBuffer[GWAAColorShift];\n}\n\nstatic sqInt\naaColorShiftPut(sqInt value)\n{\n\treturn workBuffer[GWAAColorShift] = value;\n}\n\n\n/*\tCommon function to compute the first full pixel for AA drawing */\n\nstatic sqInt\naaFirstPixelFromto(sqInt leftX, sqInt rightX)\n{\n    sqInt firstPixel;\n\n\tfirstPixel = ((leftX + (workBuffer[GWAALevel])) - 1) & (~((workBuffer[GWAALevel]) - 1));\n\tif (firstPixel > rightX) {\n\t\treturn rightX;\n\t}\n\telse {\n\t\treturn firstPixel;\n\t}\n}\n\nstatic sqInt\naaHalfPixelGet(void)\n{\n\treturn workBuffer[GWAAHalfPixel];\n}\n\nstatic sqInt\naaHalfPixelPut(sqInt value)\n{\n\treturn workBuffer[GWAAHalfPixel] = value;\n}\n\n\n/*\tCommon function to compute the last full pixel for AA drawing */\n\nstatic sqInt\naaLastPixelFromto(sqInt leftX, sqInt rightX)\n{\n\treturn (rightX - 1) & (~((workBuffer[GWAALevel]) - 1));\n}\n\nstatic sqInt\naaLevelGet(void)\n{\n\treturn workBuffer[GWAALevel];\n}\n\nstatic sqInt\naaLevelPut(sqInt value)\n{\n\treturn workBuffer[GWAALevel] = value;\n}\n\nstatic sqInt\naaScanMaskGet(void)\n{\n\treturn workBuffer[GWAAScanMask];\n}\n\nstatic sqInt\naaScanMaskPut(sqInt value)\n{\n\treturn workBuffer[GWAAScanMask] = value;\n}\n\nstatic sqInt\naaShiftGet(void)\n{\n\treturn workBuffer[GWAAShift];\n}\n\nstatic sqInt\naaShiftPut(sqInt value)\n{\n\treturn workBuffer[GWAAShift] = value;\n}\n\n\n/*\tCompute the squared value of a 8.24 number with 0.0 <= value < 1.0,\n\te.g., compute (value * value) bitShift: -24 */\n\nstatic sqInt\nabsoluteSquared8Dot24(sqInt value)\n{\n    sqInt word1;\n    sqInt word2;\n\n\tword1 = value & 65535;\n\tword2 = (((usqInt) value >> 16)) & 255;\n\treturn ((usqInt) (((((usqInt) (((unsigned) (word1 * word1))) >> 16)) + ((word1 * word2) * 2)) + (((usqInt) (word2 * word2) << 16))) >> 8);\n}\n\n\n/*\tReturn the accurate length of the vector described by deltaX and deltaY */\n\nstatic sqInt\naccurateLengthOfwith(sqInt deltaX, sqInt deltaY)\n{\n    sqInt length2;\n\n\tif (deltaX == 0) {\n\t\tif (deltaY < 0) {\n\t\t\treturn 0 - deltaY;\n\t\t}\n\t\telse {\n\t\t\treturn deltaY;\n\t\t}\n\t}\n\tif (deltaY == 0) {\n\t\tif (deltaX < 0) {\n\t\t\treturn 0 - deltaX;\n\t\t}\n\t\telse {\n\t\t\treturn deltaX;\n\t\t}\n\t}\n\tlength2 = (deltaX * deltaX) + (deltaY * deltaY);\n\t/* begin computeSqrt: */\n\tif (length2 < 32) {\n\t\treturn (smallSqrtTable())[length2];\n\t}\n\telse {\n\t\treturn ((sqInt)((sqrt(((double) length2 ))) + 0.5));\n\t}\n}\n\nstatic sqInt\naddEdgeToGET(sqInt edge)\n{\n\tif (!(allocateGETEntry(1))) {\n\t\treturn 0;\n\t}\n\tgetBuffer[workBuffer[GWGETUsed]] = edge;\n\tworkBuffer[GWGETUsed] = ((workBuffer[GWGETUsed]) + 1);\n}\n\n\n/*\tNOTE: This method is (hopefully) obsolete due to unrolling \n\tthe fill loops to deal with full pixels. */\n/*\tAdjust the span buffers values by the appropriate color offset for\n\tanti-aliasing. We do this by replicating the top bits of each color in the\n\tlower bits. The idea is that we can scale each color value uniquely from 0\n\tto 255 and thus fill the entire range of colors.\n */\n\nstatic sqInt\nadjustAALevel(void)\n{\n    sqInt adjustMask;\n    sqInt adjustShift;\n    sqInt pixelValue;\n    sqInt x0;\n    sqInt x1;\n\n\tadjustShift = 8 - (workBuffer[GWAAColorShift]);\n\tadjustMask = ~(workBuffer[GWAAColorMask]);\n\tx0 = ((usqInt) (workBuffer[GWSpanStart])) >> (workBuffer[GWAAShift]);\n\tx1 = ((usqInt) (workBuffer[GWSpanEnd])) >> (workBuffer[GWAAShift]);\n\twhile (x0 < x1) {\n\t\tpixelValue = spanBuffer[x0];\n\t\tspanBuffer[x0] = (pixelValue | ((((usqInt) pixelValue) >> adjustShift) & adjustMask));\n\t\tx0 += 1;\n\t}\n}\n\n\n/*\tAdjust the wide bezier curve (dx < 0) to start/end at the right point */\n\nstatic sqInt\nadjustWideBezierLeftwidthoffsetendX(sqInt bezier, sqInt lineWidth, sqInt lineOffset, sqInt endX)\n{\n    sqInt lastX;\n    sqInt lastY;\n\n\t(bezierUpdateDataOf(bezier))[GBUpdateX] = (((bezierUpdateDataOf(bezier))[GBUpdateX]) - (lineOffset * 256));\n\tlastX = (wideBezierUpdateDataOf(bezier))[GBUpdateX];\n\t(wideBezierUpdateDataOf(bezier))[GBUpdateX] = (lastX + ((lineWidth - lineOffset) * 256));\n\tlastY = (wideBezierUpdateDataOf(bezier))[GBUpdateY];\n\t(wideBezierUpdateDataOf(bezier))[GBUpdateY] = (lastY + (lineWidth * 256));\n\tobjBuffer[bezier + GBFinalX] = (endX - lineOffset);\n}\n\n\n/*\tAdjust the wide bezier curve (dx >= 0) to start/end at the right point */\n\nstatic sqInt\nadjustWideBezierRightwidthoffsetendX(sqInt bezier, sqInt lineWidth, sqInt lineOffset, sqInt endX)\n{\n    sqInt lastX;\n    sqInt lastY;\n\n\t(bezierUpdateDataOf(bezier))[GBUpdateX] = (((bezierUpdateDataOf(bezier))[GBUpdateX]) + (lineOffset * 256));\n\tlastX = (wideBezierUpdateDataOf(bezier))[GBUpdateX];\n\t(wideBezierUpdateDataOf(bezier))[GBUpdateX] = (lastX - ((lineWidth - lineOffset) * 256));\n\n\t/* Set lineWidth pixels down */\n\n\tlastY = (wideBezierUpdateDataOf(bezier))[GBUpdateY];\n\t(wideBezierUpdateDataOf(bezier))[GBUpdateY] = (lastY + (lineWidth * 256));\n\tobjBuffer[bezier + GBFinalX] = ((endX - lineOffset) + lineWidth);\n}\n\n\n/*\tAdjust the wide line after it has been stepped from lastX to nextX.\n\tSpecial adjustments of line width and start position are made here\n\tto simulate a rectangular brush */\n\nstatic sqInt\nadjustWideLineafterSteppingFromto(sqInt line, sqInt lastX, sqInt nextX)\n{\n    sqInt baseWidth;\n    sqInt deltaX;\n    sqInt lineOffset;\n    sqInt lineWidth;\n    sqInt xDir;\n    sqInt yEntry;\n    sqInt yExit;\n\n\n\t/* Don't inline this */\n\t/* Fetch the values the adjustment decisions are based on */\n\n\tyEntry = objBuffer[line + GLWideEntry];\n\tyExit = objBuffer[line + GLWideExit];\n\tbaseWidth = objBuffer[line + GLWideExtent];\n\tlineOffset = ((sqInt) baseWidth >> 1);\n\tlineWidth = objBuffer[line + GLWideWidth];\n\txDir = objBuffer[line + GLXDirection];\n\n\t/* Adjust the start of the line to fill an entire rectangle */\n\n\tdeltaX = nextX - lastX;\n\tif (yEntry < baseWidth) {\n\t\tif (xDir < 0) {\n\n\t\t\t/* effectively adding */\n\n\t\t\tlineWidth -= deltaX;\n\t\t}\n\t\telse {\n\t\t\tlineWidth += deltaX;\n\t\t\tobjBuffer[line + GEXValue] = lastX;\n\t\t}\n\t}\n\tif ((yExit + lineOffset) == 0) {\n\t\tif (xDir > 0) {\n\t\t\tlineWidth -= objBuffer[line + GLXIncrement];\n\t\t}\n\t\telse {\n\n\t\t\t/* effectively subtracting */\n\n\t\t\tlineWidth += objBuffer[line + GLXIncrement];\n\t\t\tobjBuffer[line + GEXValue] = lastX;\n\t\t}\n\t}\n\tif ((yExit + lineOffset) > 0) {\n\t\tif (xDir < 0) {\n\n\t\t\t/* effectively subtracting */\n\n\t\t\tlineWidth += deltaX;\n\t\t\tobjBuffer[line + GEXValue] = lastX;\n\t\t}\n\t\telse {\n\t\t\tlineWidth -= deltaX;\n\t\t}\n\t}\n\tobjBuffer[line + GLWideWidth] = lineWidth;\n}\n\nstatic sqInt\naetStartGet(void)\n{\n\treturn workBuffer[GWAETStart];\n}\n\nstatic sqInt\naetStartPut(sqInt value)\n{\n\treturn workBuffer[GWAETStart] = value;\n}\n\nstatic sqInt\naetUsedGet(void)\n{\n\treturn workBuffer[GWAETUsed];\n}\n\nstatic sqInt\naetUsedPut(sqInt value)\n{\n\treturn workBuffer[GWAETUsed] = value;\n}\n\n\n/*\tAllocate n slots in the active edge table */\n\nstatic sqInt\nallocateAETEntry(sqInt nSlots)\n{\n\t/* begin needAvailableSpace: */\n\tif (((((GWHeaderSize + objUsed) + (workBuffer[GWGETUsed])) + (workBuffer[GWAETUsed])) + nSlots) > (workBuffer[GWBufferTop])) {\n\t\t/* begin stopBecauseOf: */\n\t\tworkBuffer[GWStopReason] = GErrorNoMoreSpace;\n\t\tengineStopped = 1;\n\t\treturn 0;\n\t}\n\treturn 1;\n}\n\nstatic sqInt\nallocateBezier(void)\n{\n    sqInt bezier;\n\n\tif (!(allocateObjEntry(GBBaseSize))) {\n\t\treturn 0;\n\t}\n\tbezier = objUsed;\n\tobjUsed = bezier + GBBaseSize;\n\tobjBuffer[bezier + GEObjectType] = GEPrimitiveBezier;\n\tobjBuffer[bezier + GEObjectIndex] = 0;\n\tobjBuffer[bezier + GEObjectLength] = GBBaseSize;\n\treturn bezier;\n}\n\nstatic sqInt\nallocateBezierStackEntry(void)\n{\n\t/* begin wbStackPush: */\n\tif (!(needAvailableSpace(6))) {\n\t\tgoto l1;\n\t}\n\tworkBuffer[GWBufferTop] = ((workBuffer[GWBufferTop]) - 6);\nl1:\t/* end wbStackPush: */;\n\treturn (workBuffer[GWSize]) - (workBuffer[GWBufferTop]);\n}\n\nstatic sqInt\nallocateBitmapFillcolormap(sqInt cmSize, int *cmBits)\n{\n    int *cm;\n    sqInt fill;\n    sqInt fillSize;\n    sqInt i;\n\n\tfillSize = GBMBaseSize + cmSize;\n\tif (!(allocateObjEntry(fillSize))) {\n\t\treturn 0;\n\t}\n\tfill = objUsed;\n\tobjUsed = fill + fillSize;\n\tobjBuffer[fill + GEObjectType] = GEPrimitiveClippedBitmapFill;\n\tobjBuffer[fill + GEObjectIndex] = 0;\n\tobjBuffer[fill + GEObjectLength] = fillSize;\n\t/* begin colormapOf: */\n\tcm = (objBuffer + fill) + GBColormapOffset;\n\tif ((workBuffer[GWHasColorTransform]) != 0) {\n\t\tfor (i = 0; i <= (cmSize - 1); i += 1) {\n\t\t\tcm[i] = (transformColor(cmBits[i]));\n\t\t}\n\t}\n\telse {\n\t\tfor (i = 0; i <= (cmSize - 1); i += 1) {\n\t\t\tcm[i] = (cmBits[i]);\n\t\t}\n\t}\n\tobjBuffer[fill + GBColormapSize] = cmSize;\n\treturn fill;\n}\n\n\n/*\tAllocate n slots in the global edge table */\n\nstatic sqInt\nallocateGETEntry(sqInt nSlots)\n{\n    sqInt dstIndex;\n    sqInt i;\n    sqInt srcIndex;\n\n\tif (!(needAvailableSpace(nSlots))) {\n\t\treturn 0;\n\t}\n\tif (!((workBuffer[GWAETUsed]) == 0)) {\n\n\t\t/* Then move the AET upwards */\n\n\t\tsrcIndex = workBuffer[GWAETUsed];\n\t\tdstIndex = (workBuffer[GWAETUsed]) + nSlots;\n\t\tfor (i = 1; i <= (workBuffer[GWAETUsed]); i += 1) {\n\t\t\taetBuffer[(dstIndex -= 1)] = (aetBuffer[(srcIndex -= 1)]);\n\t\t}\n\t}\n\taetBuffer += nSlots;\n\treturn 1;\n}\n\nstatic sqInt\nallocateGradientFillrampWidthisRadial(int *ramp, sqInt rampWidth, sqInt isRadial)\n{\n    sqInt fill;\n    sqInt fillSize;\n    sqInt i;\n    int *rampPtr;\n\n\tfillSize = GGBaseSize + rampWidth;\n\tif (!(allocateObjEntry(fillSize))) {\n\t\treturn 0;\n\t}\n\tfill = objUsed;\n\tobjUsed = fill + fillSize;\n\tif (isRadial) {\n\t\tobjBuffer[fill + GEObjectType] = GEPrimitiveRadialGradientFill;\n\t}\n\telse {\n\t\tobjBuffer[fill + GEObjectType] = GEPrimitiveLinearGradientFill;\n\t}\n\tobjBuffer[fill + GEObjectIndex] = 0;\n\tobjBuffer[fill + GEObjectLength] = fillSize;\n\t/* begin gradientRampOf: */\n\trampPtr = (objBuffer + fill) + GFRampOffset;\n\tif ((workBuffer[GWHasColorTransform]) != 0) {\n\t\tfor (i = 0; i <= (rampWidth - 1); i += 1) {\n\t\t\trampPtr[i] = (transformColor(ramp[i]));\n\t\t}\n\t}\n\telse {\n\t\tfor (i = 0; i <= (rampWidth - 1); i += 1) {\n\t\t\trampPtr[i] = (ramp[i]);\n\t\t}\n\t}\n\tobjBuffer[fill + GFRampLength] = rampWidth;\n\treturn fill;\n}\n\nstatic sqInt\nallocateLine(void)\n{\n    sqInt line;\n\n\tif (!(allocateObjEntry(GLBaseSize))) {\n\t\treturn 0;\n\t}\n\tline = objUsed;\n\tobjUsed = line + GLBaseSize;\n\tobjBuffer[line + GEObjectType] = GEPrimitiveLine;\n\tobjBuffer[line + GEObjectIndex] = 0;\n\tobjBuffer[line + GEObjectLength] = GLBaseSize;\n\treturn line;\n}\n\n\n/*\tAllocate n slots in the object buffer */\n\nstatic sqInt\nallocateObjEntry(sqInt nSlots)\n{\n    sqInt dstIndex;\n    sqInt i;\n    sqInt srcIndex;\n\n\tif (!(allocateGETEntry(nSlots))) {\n\t\treturn 0;\n\t}\n\tif (!((workBuffer[GWGETUsed]) == 0)) {\n\n\t\t/* Then move the GET upwards */\n\n\t\tsrcIndex = workBuffer[GWGETUsed];\n\t\tdstIndex = (workBuffer[GWGETUsed]) + nSlots;\n\t\tfor (i = 1; i <= (workBuffer[GWGETUsed]); i += 1) {\n\t\t\tgetBuffer[(dstIndex -= 1)] = (getBuffer[(srcIndex -= 1)]);\n\t\t}\n\t}\n\tgetBuffer += nSlots;\n\treturn 1;\n}\n\n\n/*\tAET and Stack allocation are symmetric */\n\nstatic sqInt\nallocateStackEntry(sqInt nSlots)\n{\n\t/* begin needAvailableSpace: */\n\tif (((((GWHeaderSize + objUsed) + (workBuffer[GWGETUsed])) + (workBuffer[GWAETUsed])) + nSlots) > (workBuffer[GWBufferTop])) {\n\t\t/* begin stopBecauseOf: */\n\t\tworkBuffer[GWStopReason] = GErrorNoMoreSpace;\n\t\tengineStopped = 1;\n\t\treturn 0;\n\t}\n\treturn 1;\n}\n\nstatic sqInt\nallocateStackFillEntry(void)\n{\n\t/* begin wbStackPush: */\n\tif (!(needAvailableSpace(3))) {\n\t\treturn 0;\n\t}\n\tworkBuffer[GWBufferTop] = ((workBuffer[GWBufferTop]) - 3);\n\treturn 1;\n}\n\nstatic sqInt\nallocateWideBezier(void)\n{\n    sqInt bezier;\n\n\tif (!(allocateObjEntry(GBWideSize))) {\n\t\treturn 0;\n\t}\n\tbezier = objUsed;\n\tobjUsed = bezier + GBWideSize;\n\tobjBuffer[bezier + GEObjectType] = GEPrimitiveWideBezier;\n\tobjBuffer[bezier + GEObjectIndex] = 0;\n\tobjBuffer[bezier + GEObjectLength] = GBWideSize;\n\treturn bezier;\n}\n\nstatic sqInt\nallocateWideLine(void)\n{\n    sqInt line;\n\n\tif (!(allocateObjEntry(GLWideSize))) {\n\t\treturn 0;\n\t}\n\tline = objUsed;\n\tobjUsed = line + GLWideSize;\n\tobjBuffer[line + GEObjectType] = GEPrimitiveWideLine;\n\tobjBuffer[line + GEObjectIndex] = 0;\n\tobjBuffer[line + GEObjectLength] = GLWideSize;\n\treturn line;\n}\n\nstatic sqInt\nareEdgeFillsValid(sqInt edge)\n{\n\treturn ((objBuffer[edge + GEObjectType]) & GEEdgeFillsInvalid) == 0;\n}\n\n\n/*\tMake sure that val1 is between val2 and val3. */\n\nstatic sqInt\nassureValuebetweenand(sqInt val1, sqInt val2, sqInt val3)\n{\n\tif (val2 > val3) {\n\t\tif (val1 > val2) {\n\t\t\treturn val2;\n\t\t}\n\t\tif (val1 < val3) {\n\t\t\treturn val3;\n\t\t}\n\t}\n\telse {\n\t\tif (val1 < val2) {\n\t\t\treturn val2;\n\t\t}\n\t\tif (val1 > val3) {\n\t\t\treturn val3;\n\t\t}\n\t}\n\treturn val1;\n}\n\nstatic sqInt\nbezierEndXOf(sqInt bezier)\n{\n\treturn objBuffer[bezier + GBEndX];\n}\n\nstatic sqInt\nbezierEndXOfput(sqInt bezier, sqInt value)\n{\n\treturn objBuffer[bezier + GBEndX] = value;\n}\n\nstatic sqInt\nbezierEndYOf(sqInt bezier)\n{\n\treturn objBuffer[bezier + GBEndY];\n}\n\nstatic sqInt\nbezierEndYOfput(sqInt bezier, sqInt value)\n{\n\treturn objBuffer[bezier + GBEndY] = value;\n}\n\nstatic sqInt\nbezierFinalXOf(sqInt bezier)\n{\n\treturn objBuffer[bezier + GBFinalX];\n}\n\nstatic sqInt\nbezierFinalXOfput(sqInt bezier, sqInt value)\n{\n\treturn objBuffer[bezier + GBFinalX] = value;\n}\n\nstatic int *\nbezierUpdateDataOf(sqInt bezier)\n{\n\treturn (objBuffer + bezier) + GBUpdateData;\n}\n\nstatic sqInt\nbezierViaXOf(sqInt bezier)\n{\n\treturn objBuffer[bezier + GBViaX];\n}\n\nstatic sqInt\nbezierViaXOfput(sqInt bezier, sqInt value)\n{\n\treturn objBuffer[bezier + GBViaX] = value;\n}\n\nstatic sqInt\nbezierViaYOf(sqInt bezier)\n{\n\treturn objBuffer[bezier + GBViaY];\n}\n\nstatic sqInt\nbezierViaYOfput(sqInt bezier, sqInt value)\n{\n\treturn objBuffer[bezier + GBViaY] = value;\n}\n\nstatic sqInt\nbitmapCmSizeOf(sqInt bmFill)\n{\n\treturn objBuffer[bmFill + GBColormapSize];\n}\n\nstatic sqInt\nbitmapCmSizeOfput(sqInt bmFill, sqInt value)\n{\n\treturn objBuffer[bmFill + GBColormapSize] = value;\n}\n\nstatic sqInt\nbitmapDepthOf(sqInt bmFill)\n{\n\treturn objBuffer[bmFill + GBBitmapDepth];\n}\n\nstatic sqInt\nbitmapDepthOfput(sqInt bmFill, sqInt value)\n{\n\treturn objBuffer[bmFill + GBBitmapDepth] = value;\n}\n\nstatic sqInt\nbitmapHeightOf(sqInt bmFill)\n{\n\treturn objBuffer[bmFill + GBBitmapHeight];\n}\n\nstatic sqInt\nbitmapHeightOfput(sqInt bmFill, sqInt value)\n{\n\treturn objBuffer[bmFill + GBBitmapHeight] = value;\n}\n\nstatic sqInt\nbitmapRasterOf(sqInt bmFill)\n{\n\treturn objBuffer[bmFill + GBBitmapRaster];\n}\n\nstatic sqInt\nbitmapRasterOfput(sqInt bmFill, sqInt value)\n{\n\treturn objBuffer[bmFill + GBBitmapRaster] = value;\n}\n\nstatic sqInt\nbitmapSizeOf(sqInt bmFill)\n{\n\treturn objBuffer[bmFill + GBBitmapSize];\n}\n\nstatic sqInt\nbitmapSizeOfput(sqInt bmFill, sqInt value)\n{\n\treturn objBuffer[bmFill + GBBitmapSize] = value;\n}\n\nstatic sqInt\nbitmapTileFlagOf(sqInt bmFill)\n{\n\treturn objBuffer[bmFill + GBTileFlag];\n}\n\nstatic sqInt\nbitmapTileFlagOfput(sqInt bmFill, sqInt value)\n{\n\treturn objBuffer[bmFill + GBTileFlag] = value;\n}\n\nstatic sqInt\nbitmapValuebitsatXy(sqInt bmFill, sqInt bits, sqInt xp, sqInt yp)\n{\n    sqInt a;\n    sqInt b;\n    sqInt bmDepth;\n    sqInt bmRaster;\n    sqInt cMask;\n    sqInt g;\n    sqInt r;\n    sqInt rShift;\n    sqInt someIntegerValue;\n    sqInt value;\n\n\tbmDepth = objBuffer[bmFill + GBBitmapDepth];\n\tbmRaster = objBuffer[bmFill + GBBitmapRaster];\n\tif (bmDepth == 32) {\n\t\tvalue = (((int*) bits))[(bmRaster * yp) + xp];\n\t\tif ((value != 0)\n\t\t && ((value & 4278190080UL) == 0)) {\n\t\t\tvalue = value | 4278190080UL;\n\t\t}\n\t\treturn uncheckedTransformColor(value);\n\t}\n\trShift = (rShiftTable())[bmDepth];\n\n\t/* cMask - mask out the pixel from the word */\n\n\tvalue = (((int*) bits))[(bmRaster * yp) + (((usqInt) xp) >> rShift)];\n\n\t/* rShift - shift value to move the pixel in the word to the lowest bit position */\n\n\tcMask = (1 << bmDepth) - 1;\n\trShift = (32 - bmDepth) - ((xp & ((1 << rShift) - 1)) * bmDepth);\n\tvalue = (((usqInt) value) >> rShift) & cMask;\n\tif (bmDepth == 16) {\n\t\tif (!(value == 0)) {\n\n\t\t\t/* Must convert by expanding bits */\n\n\t\t\tb = (value & 31) << 3;\n\t\t\tb += ((usqInt) b) >> 5;\n\t\t\tg = ((((usqInt) value) >> 5) & 31) << 3;\n\t\t\tg += ((usqInt) g) >> 5;\n\t\t\tr = ((((usqInt) value) >> 10) & 31) << 3;\n\t\t\tr += ((usqInt) r) >> 5;\n\t\t\ta = 255;\n\t\t\tvalue = ((b + (g << 8)) + (r << 16)) + (a << 24);\n\t\t}\n\t}\n\telse {\n\t\tif ((objBuffer[bmFill + GBColormapSize]) == 0) {\n\n\t\t\t/* Must convert by using color map */\n\n\t\t\tvalue = 0;\n\t\t}\n\t\telse {\n\t\t\t/* begin makeUnsignedFrom: */\n\t\t\tsomeIntegerValue = (colormapOf(bmFill))[value];\n\t\t\tvalue = someIntegerValue;\n\t\t}\n\t}\n\treturn uncheckedTransformColor(value);\n}\n\nstatic sqInt\nbitmapWidthOf(sqInt bmFill)\n{\n\treturn objBuffer[bmFill + GBBitmapWidth];\n}\n\nstatic sqInt\nbitmapWidthOfput(sqInt bmFill, sqInt value)\n{\n\treturn objBuffer[bmFill + GBBitmapWidth] = value;\n}\n\nstatic sqInt\nbzEndX(sqInt index)\n{\n\treturn workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 4)];\n}\n\nstatic sqInt\nbzEndXput(sqInt index, sqInt value)\n{\n\treturn workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 4)] = value;\n}\n\nstatic sqInt\nbzEndY(sqInt index)\n{\n\treturn workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 5)];\n}\n\nstatic sqInt\nbzEndYput(sqInt index, sqInt value)\n{\n\treturn workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 5)] = value;\n}\n\nstatic sqInt\nbzStartX(sqInt index)\n{\n\treturn workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 0)];\n}\n\nstatic sqInt\nbzStartXput(sqInt index, sqInt value)\n{\n\treturn workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 0)] = value;\n}\n\nstatic sqInt\nbzStartY(sqInt index)\n{\n\treturn workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 1)];\n}\n\nstatic sqInt\nbzStartYput(sqInt index, sqInt value)\n{\n\treturn workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 1)] = value;\n}\n\nstatic sqInt\nbzViaX(sqInt index)\n{\n\treturn workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 2)];\n}\n\nstatic sqInt\nbzViaXput(sqInt index, sqInt value)\n{\n\treturn workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 2)] = value;\n}\n\nstatic sqInt\nbzViaY(sqInt index)\n{\n\treturn workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 3)];\n}\n\nstatic sqInt\nbzViaYput(sqInt index, sqInt value)\n{\n\treturn workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 3)] = value;\n}\n\n\n/*\tCheck the fill indexes in the run-length encoded fillList */\n\nstatic sqInt\ncheckCompressedFillIndexListmaxsegments(sqInt fillList, sqInt maxIndex, sqInt nSegs)\n{\n    int *fillPtr;\n    sqInt i;\n    sqInt length;\n    sqInt nFills;\n    sqInt runLength;\n    sqInt runValue;\n\n\tlength = interpreterProxy->slotSizeOf(fillList);\n\tfillPtr = interpreterProxy->firstIndexableField(fillList);\n\tnFills = 0;\n\tfor (i = 0; i <= (length - 1); i += 1) {\n\t\trunLength = ((usqInt) ((((int *) fillPtr))[i]) >> 16);\n\t\trunValue = ((((int *) fillPtr))[i]) & 65535;\n\t\tif (!((runValue >= 0)\n\t\t\t && (runValue <= maxIndex))) {\n\t\t\treturn 0;\n\t\t}\n\t\tnFills += runLength;\n\t}\n\treturn nFills == nSegs;\n}\n\n\n/*\tCheck if the indexList (containing fill handles) is okay. */\n\nstatic sqInt\ncheckCompressedFills(sqInt indexList)\n{\n    sqInt fillIndex;\n    int *fillPtr;\n    sqInt i;\n    sqInt length;\n\n\tif (!(interpreterProxy->isWords(indexList))) {\n\t\treturn 0;\n\t}\n\tlength = interpreterProxy->slotSizeOf(indexList);\n\tfillPtr = interpreterProxy->firstIndexableField(indexList);\n\tfor (i = 0; i <= (length - 1); i += 1) {\n\n\t\t/* Make sure the fill is okay */\n\n\t\tfillIndex = fillPtr[i];\n\t\tif (!(isFillOkay(fillIndex))) {\n\t\t\treturn 0;\n\t\t}\n\t}\n\treturn 1;\n}\n\n\n/*\tCheck the run-length encoded lineWidthList matches nSegments */\n\nstatic sqInt\ncheckCompressedLineWidthssegments(sqInt lineWidthList, sqInt nSegments)\n{\n    sqInt i;\n    sqInt length;\n    sqInt nItems;\n    int *ptr;\n    sqInt runLength;\n\n\tlength = interpreterProxy->slotSizeOf(lineWidthList);\n\tptr = interpreterProxy->firstIndexableField(lineWidthList);\n\tnItems = 0;\n\tfor (i = 0; i <= (length - 1); i += 1) {\n\t\trunLength = ((usqInt) ((((int *) ptr))[i]) >> 16);\n\t\tnItems += runLength;\n\t}\n\treturn nItems == nSegments;\n}\n\n\n/*\tCheck if the given point array can be handled by the engine. */\n\nstatic sqInt\ncheckCompressedPointssegments(sqInt points, sqInt nSegments)\n{\n    sqInt pSize;\n\n\tif (!(interpreterProxy->isWords(points))) {\n\t\treturn 0;\n\t}\n\n\t/* The points must be either in PointArray format or ShortPointArray format.\n\tAlso, we currently handle only quadratic segments (e.g., 3 points each) and thus either\n\t\tpSize = nSegments * 3,\t\tfor ShortPointArrays or,\n\t\tpSize = nSegments * 6,\t\tfor PointArrays */\n\n\tpSize = interpreterProxy->slotSizeOf(points);\n\tif (!((pSize == (nSegments * 3))\n\t\t || (pSize == (nSegments * 6)))) {\n\t\treturn 0;\n\t}\n\treturn 1;\n}\n\n\n/*\tCheck if the given shape can be handled by the engine. \n\tSince there are a number of requirements this is an extra method. */\n\nstatic sqInt\ncheckCompressedShapesegmentsleftFillsrightFillslineWidthslineFillsfillIndexList(sqInt points, sqInt nSegments, sqInt leftFills, sqInt rightFills, sqInt lineWidths, sqInt lineFills, sqInt fillIndexList)\n{\n    sqInt maxFillIndex;\n\n\tif (!(checkCompressedPointssegments(points, nSegments))) {\n\t\treturn 0;\n\t}\n\tif (!(checkCompressedFills(fillIndexList))) {\n\t\treturn 0;\n\t}\n\tmaxFillIndex = interpreterProxy->slotSizeOf(fillIndexList);\n\tif (!(checkCompressedFillIndexListmaxsegments(leftFills, maxFillIndex, nSegments))) {\n\t\treturn 0;\n\t}\n\tif (!(checkCompressedFillIndexListmaxsegments(rightFills, maxFillIndex, nSegments))) {\n\t\treturn 0;\n\t}\n\tif (!(checkCompressedFillIndexListmaxsegments(lineFills, maxFillIndex, nSegments))) {\n\t\treturn 0;\n\t}\n\tif (!(checkCompressedLineWidthssegments(lineWidths, nSegments))) {\n\t\treturn 0;\n\t}\n\treturn 1;\n}\n\n\n/*\tAdd the bezier to the global edge table if it intersects the clipping\n\tregion \n */\n\nstatic sqInt\ncheckedAddBezierToGET(sqInt bezier)\n{\n    sqInt lineWidth;\n\n\tif ((((objBuffer[bezier + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveWide) != 0) {\n\t\tlineWidth = objBuffer[bezier + GBWideExtent];\n\t}\n\telse {\n\t\tlineWidth = 0;\n\t}\n\tif (((objBuffer[bezier + GBEndY]) + lineWidth) < (workBuffer[GWFillMinY])) {\n\t\treturn 0;\n\t}\n\tif ((((objBuffer[bezier + GEXValue]) - lineWidth) >= (workBuffer[GWFillMaxX]))\n\t && (((objBuffer[bezier + GBEndX]) - lineWidth) >= (workBuffer[GWFillMaxX]))) {\n\t\treturn 0;\n\t}\n\taddEdgeToGET(bezier);\n}\n\n\n/*\tAdd the edge to the global edge table.\n\tFor known edge types, check if the edge intersects the visible region */\n\nstatic sqInt\ncheckedAddEdgeToGET(sqInt edge)\n{\n    sqInt lineWidth;\n    sqInt lineWidth1;\n\n\tif ((((objBuffer[edge + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveWideMask) == GEPrimitiveLine) {\n\t\t/* begin checkedAddLineToGET: */\n\t\tif ((((objBuffer[edge + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveWide) != 0) {\n\t\t\tlineWidth1 = objBuffer[edge + GLWideExtent];\n\t\t}\n\t\telse {\n\t\t\tlineWidth1 = 0;\n\t\t}\n\t\tif (((objBuffer[edge + GLEndY]) + lineWidth1) < (workBuffer[GWFillMinY])) {\n\t\t\treturn 0;\n\t\t}\n\t\tif ((((objBuffer[edge + GEXValue]) - lineWidth1) >= (workBuffer[GWFillMaxX]))\n\t\t && (((objBuffer[edge + GLEndX]) - lineWidth1) >= (workBuffer[GWFillMaxX]))) {\n\t\t\treturn 0;\n\t\t}\n\t\taddEdgeToGET(edge);\n\t\treturn null;\n\t}\n\tif ((((objBuffer[edge + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveWideMask) == GEPrimitiveBezier) {\n\t\t/* begin checkedAddBezierToGET: */\n\t\tif ((((objBuffer[edge + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveWide) != 0) {\n\t\t\tlineWidth = objBuffer[edge + GBWideExtent];\n\t\t}\n\t\telse {\n\t\t\tlineWidth = 0;\n\t\t}\n\t\tif (((objBuffer[edge + GBEndY]) + lineWidth) < (workBuffer[GWFillMinY])) {\n\t\t\treturn 0;\n\t\t}\n\t\tif ((((objBuffer[edge + GEXValue]) - lineWidth) >= (workBuffer[GWFillMaxX]))\n\t\t && (((objBuffer[edge + GBEndX]) - lineWidth) >= (workBuffer[GWFillMaxX]))) {\n\t\t\treturn 0;\n\t\t}\n\t\taddEdgeToGET(edge);\n\t\treturn null;\n\t}\n\taddEdgeToGET(edge);\n}\n\n\n/*\tAdd the line to the global edge table if it intersects the clipping region */\n\nstatic sqInt\ncheckedAddLineToGET(sqInt line)\n{\n    sqInt lineWidth;\n\n\tif ((((objBuffer[line + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveWide) != 0) {\n\t\tlineWidth = objBuffer[line + GLWideExtent];\n\t}\n\telse {\n\t\tlineWidth = 0;\n\t}\n\tif (((objBuffer[line + GLEndY]) + lineWidth) < (workBuffer[GWFillMinY])) {\n\t\treturn 0;\n\t}\n\tif ((((objBuffer[line + GEXValue]) - lineWidth) >= (workBuffer[GWFillMaxX]))\n\t && (((objBuffer[line + GLEndX]) - lineWidth) >= (workBuffer[GWFillMaxX]))) {\n\t\treturn 0;\n\t}\n\taddEdgeToGET(line);\n}\n\nstatic double *\ncircleCosTable(void)\n{\n    static double theTable[33] =\n\t\t{1.0, 0.98078528040323, 0.923879532511287, 0.831469612302545,\n\t\t0.7071067811865475, 0.555570233019602, 0.38268343236509, 0.1950903220161286,\n\t\t0.0, -0.1950903220161283, -0.3826834323650896, -0.555570233019602,\n\t\t-0.707106781186547, -0.831469612302545, -0.9238795325112865, -0.98078528040323,\n\t\t-1.0, -0.98078528040323, -0.923879532511287, -0.831469612302545,\n\t\t-0.707106781186548, -0.555570233019602, -0.3826834323650903, -0.1950903220161287,\n\t\t0.0, 0.1950903220161282, 0.38268343236509, 0.555570233019602,\n\t\t0.707106781186547, 0.831469612302545, 0.9238795325112865, 0.98078528040323,\n\t\t1.0 };\n\n\treturn theTable;\n}\n\nstatic double *\ncircleSinTable(void)\n{\n    static double theTable[33] =\n\t\t{0.0, 0.1950903220161282, 0.3826834323650897, 0.555570233019602,\n\t\t0.707106781186547, 0.831469612302545, 0.923879532511287, 0.98078528040323,\n\t\t1.0, 0.98078528040323, 0.923879532511287, 0.831469612302545,\n\t\t0.7071067811865475, 0.555570233019602, 0.38268343236509, 0.1950903220161286,\n\t\t0.0, -0.1950903220161283, -0.3826834323650896, -0.555570233019602,\n\t\t-0.707106781186547, -0.831469612302545, -0.9238795325112865, -0.98078528040323,\n\t\t-1.0, -0.98078528040323, -0.923879532511287, -0.831469612302545,\n\t\t-0.707106781186548, -0.555570233019602, -0.3826834323650903, -0.1950903220161287,\n\t\t 0.0 };\n\n\treturn theTable;\n}\n\nstatic sqInt\nclampValuemax(sqInt value, sqInt maxValue)\n{\n\tif (value < 0) {\n\t\treturn 0;\n\t}\n\telse {\n\t\tif (value >= maxValue) {\n\t\t\treturn maxValue - 1;\n\t\t}\n\t\telse {\n\t\t\treturn value;\n\t\t}\n\t}\n}\n\n\n/*\tClear the current span buffer.\n\tThe span buffer is only cleared in the area that has been used by the\n\tprevious scan line.\n */\n\nstatic sqInt\nclearSpanBuffer(void)\n{\n    sqInt x0;\n    sqInt x1;\n\n\tx0 = ((usqInt) (workBuffer[GWSpanStart])) >> (workBuffer[GWAAShift]);\n\tx1 = (((usqInt) (workBuffer[GWSpanEnd])) >> (workBuffer[GWAAShift])) + 1;\n\tif (x0 < 0) {\n\t\tx0 = 0;\n\t}\n\tif (x1 > (workBuffer[GWSpanSize])) {\n\t\tx1 = workBuffer[GWSpanSize];\n\t}\n\twhile (x0 < x1) {\n\t\tspanBuffer[x0] = 0;\n\t\tx0 += 1;\n\t}\n\tworkBuffer[GWSpanStart] = (workBuffer[GWSpanSize]);\n\tworkBuffer[GWSpanEnd] = 0;\n}\n\nstatic sqInt\nclearSpanBufferGet(void)\n{\n\treturn workBuffer[GWClearSpanBuffer];\n}\n\nstatic sqInt\nclearSpanBufferPut(sqInt value)\n{\n\treturn workBuffer[GWClearSpanBuffer] = value;\n}\n\nstatic sqInt\nclipMaxXGet(void)\n{\n\treturn workBuffer[GWClipMaxX];\n}\n\nstatic sqInt\nclipMaxXPut(sqInt value)\n{\n\treturn workBuffer[GWClipMaxX] = value;\n}\n\nstatic sqInt\nclipMaxYGet(void)\n{\n\treturn workBuffer[GWClipMaxY];\n}\n\nstatic sqInt\nclipMaxYPut(sqInt value)\n{\n\treturn workBuffer[GWClipMaxY] = value;\n}\n\nstatic sqInt\nclipMinXGet(void)\n{\n\treturn workBuffer[GWClipMinX];\n}\n\nstatic sqInt\nclipMinXPut(sqInt value)\n{\n\treturn workBuffer[GWClipMinX] = value;\n}\n\nstatic sqInt\nclipMinYGet(void)\n{\n\treturn workBuffer[GWClipMinY];\n}\n\nstatic sqInt\nclipMinYPut(sqInt value)\n{\n\treturn workBuffer[GWClipMinY] = value;\n}\n\nstatic int *\ncolormapOf(sqInt bmFill)\n{\n\treturn (objBuffer + bmFill) + GBColormapOffset;\n}\n\nstatic float *\ncolorTransform(void)\n{\n\treturn ((float *) (workBuffer + GWColorTransform));\n}\n\n\n/*\tSplit the bezier curve at 0.5. */\n\nstatic sqInt\ncomputeBezierSplitAtHalf(sqInt index)\n{\n    sqInt endX;\n    sqInt endY;\n    sqInt leftViaX;\n    sqInt leftViaY;\n    sqInt newIndex;\n    sqInt rightViaX;\n    sqInt rightViaY;\n    sqInt sharedX;\n    sqInt sharedY;\n    sqInt startX;\n    sqInt startY;\n    sqInt viaX;\n    sqInt viaY;\n\n\t/* begin allocateBezierStackEntry */\n\t/* begin wbStackPush: */\n\tif (!(needAvailableSpace(6))) {\n\t\tgoto l1;\n\t}\n\tworkBuffer[GWBufferTop] = ((workBuffer[GWBufferTop]) - 6);\nl1:\t/* end wbStackPush: */;\n\tnewIndex = (workBuffer[GWSize]) - (workBuffer[GWBufferTop]);\n\tif (engineStopped) {\n\t\treturn 0;\n\t}\n\tleftViaX = startX = workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 0)];\n\tleftViaY = startY = workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 1)];\n\trightViaX = viaX = workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 2)];\n\trightViaY = viaY = workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 3)];\n\tendX = workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 4)];\n\n\t/* Compute intermediate points */\n\n\tendY = workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 5)];\n\tleftViaX += ((sqInt) (viaX - startX) >> 1);\n\tleftViaY += ((sqInt) (viaY - startY) >> 1);\n\tsharedX = rightViaX += ((sqInt) (endX - viaX) >> 1);\n\n\t/* Compute new shared point */\n\n\tsharedY = rightViaY += ((sqInt) (endY - viaY) >> 1);\n\tsharedX += ((sqInt) (leftViaX - rightViaX) >> 1);\n\n\t/* Store the first part back */\n\n\tsharedY += ((sqInt) (leftViaY - rightViaY) >> 1);\n\tworkBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 2)] = leftViaX;\n\tworkBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 3)] = leftViaY;\n\tworkBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 4)] = sharedX;\n\tworkBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 5)] = sharedY;\n\tworkBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - newIndex) + 0)] = sharedX;\n\tworkBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - newIndex) + 1)] = sharedY;\n\tworkBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - newIndex) + 2)] = rightViaX;\n\tworkBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - newIndex) + 3)] = rightViaY;\n\tworkBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - newIndex) + 4)] = endX;\n\tworkBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - newIndex) + 5)] = endY;\n\treturn newIndex;\n}\n\n\n/*\tSplit the bezier curve at the given parametric value.\n\tNote: Since this method is only invoked to make non-monoton\n\tbeziers monoton we must check for the resulting y values\n\tto be *really* between the start and end value. */\n\nstatic sqInt\ncomputeBeziersplitAt(sqInt index, double  param)\n{\n    sqInt endX;\n    sqInt endY;\n    sqInt leftViaX;\n    sqInt leftViaY;\n    sqInt newIndex;\n    sqInt rightViaX;\n    sqInt rightViaY;\n    sqInt sharedX;\n    sqInt sharedY;\n    sqInt startX;\n    sqInt startY;\n    sqInt viaX;\n    sqInt viaY;\n\n\tleftViaX = startX = workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 0)];\n\tleftViaY = startY = workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 1)];\n\trightViaX = viaX = workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 2)];\n\trightViaY = viaY = workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 3)];\n\tendX = workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 4)];\n\n\t/* Compute intermediate points */\n\n\tendY = workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 5)];\n\tsharedX = leftViaX += ((sqInt)((((double) (viaX - startX) )) * param));\n\tsharedY = leftViaY += ((sqInt)((((double) (viaY - startY) )) * param));\n\trightViaX += ((sqInt)((((double) (endX - viaX) )) * param));\n\n\t/* Compute new shared point */\n\n\trightViaY += ((sqInt)((((double) (endY - viaY) )) * param));\n\tsharedX += ((sqInt)((((double) (rightViaX - leftViaX) )) * param));\n\n\t/* Check the new via points */\n\n\tsharedY += ((sqInt)((((double) (rightViaY - leftViaY) )) * param));\n\t/* begin assureValue:between:and: */\n\tif (startY > sharedY) {\n\t\tif (leftViaY > startY) {\n\t\t\tleftViaY = startY;\n\t\t\tgoto l1;\n\t\t}\n\t\tif (leftViaY < sharedY) {\n\t\t\tleftViaY = sharedY;\n\t\t\tgoto l1;\n\t\t}\n\t}\n\telse {\n\t\tif (leftViaY < startY) {\n\t\t\tleftViaY = startY;\n\t\t\tgoto l1;\n\t\t}\n\t\tif (leftViaY > sharedY) {\n\t\t\tleftViaY = sharedY;\n\t\t\tgoto l1;\n\t\t}\n\t}\n\tleftViaY = leftViaY;\nl1:\t/* end assureValue:between:and: */;\n\t/* begin assureValue:between:and: */\n\tif (sharedY > endY) {\n\t\tif (rightViaY > sharedY) {\n\t\t\trightViaY = sharedY;\n\t\t\tgoto l2;\n\t\t}\n\t\tif (rightViaY < endY) {\n\t\t\trightViaY = endY;\n\t\t\tgoto l2;\n\t\t}\n\t}\n\telse {\n\t\tif (rightViaY < sharedY) {\n\t\t\trightViaY = sharedY;\n\t\t\tgoto l2;\n\t\t}\n\t\tif (rightViaY > endY) {\n\t\t\trightViaY = endY;\n\t\t\tgoto l2;\n\t\t}\n\t}\n\trightViaY = rightViaY;\nl2:\t/* end assureValue:between:and: */;\n\t/* begin allocateBezierStackEntry */\n\t/* begin wbStackPush: */\n\tif (!(needAvailableSpace(6))) {\n\t\tgoto l3;\n\t}\n\tworkBuffer[GWBufferTop] = ((workBuffer[GWBufferTop]) - 6);\nl3:\t/* end wbStackPush: */;\n\tnewIndex = (workBuffer[GWSize]) - (workBuffer[GWBufferTop]);\n\tif (engineStopped) {\n\t\treturn 0;\n\t}\n\tworkBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 2)] = leftViaX;\n\tworkBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 3)] = leftViaY;\n\tworkBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 4)] = sharedX;\n\tworkBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 5)] = sharedY;\n\tworkBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - newIndex) + 0)] = sharedX;\n\tworkBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - newIndex) + 1)] = sharedY;\n\tworkBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - newIndex) + 2)] = rightViaX;\n\tworkBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - newIndex) + 3)] = rightViaY;\n\tworkBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - newIndex) + 4)] = endX;\n\tworkBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - newIndex) + 5)] = endY;\n\treturn newIndex;\n}\n\n\n/*\tGet both values from the two boundaries of the given bezier \n\tand compute the actual position/width of the line */\n\nstatic sqInt\ncomputeFinalWideBezierValueswidth(sqInt bezier, sqInt lineWidth)\n{\n    sqInt leftX;\n    sqInt rightX;\n    sqInt temp;\n\n\tleftX = ((sqInt) ((bezierUpdateDataOf(bezier))[GBUpdateX]) >> 8);\n\trightX = ((sqInt) ((wideBezierUpdateDataOf(bezier))[GBUpdateX]) >> 8);\n\tif (leftX > rightX) {\n\t\ttemp = leftX;\n\t\tleftX = rightX;\n\t\trightX = temp;\n\t}\n\tobjBuffer[bezier + GEXValue] = leftX;\n\tif ((rightX - leftX) > lineWidth) {\n\t\tobjBuffer[bezier + GBWideWidth] = (rightX - leftX);\n\t}\n\telse {\n\t\tobjBuffer[bezier + GBWideWidth] = lineWidth;\n\t}\n}\n\nstatic sqInt\ncomputeSqrt(sqInt length2)\n{\n\tif (length2 < 32) {\n\t\treturn (smallSqrtTable())[length2];\n\t}\n\telse {\n\t\treturn ((sqInt)((sqrt(((double) length2 ))) + 0.5));\n\t}\n}\n\nstatic sqInt\ncopyBitsFromtoat(sqInt x0, sqInt x1, sqInt yValue)\n{\n\tif (copyBitsFn == 0) {\n\t\tif (!(initialiseModule())) {\n\t\t\treturn 0;\n\t\t}\n\t}\n\treturn ((sqInt (*)(sqInt, sqInt, sqInt))copyBitsFn)(x0, x1, yValue);\n}\n\n\n/*\tCreate the global edge table */\n\nstatic sqInt\ncreateGlobalEdgeTable(void)\n{\n    sqInt end;\n    sqInt lineWidth;\n    sqInt lineWidth1;\n    sqInt object;\n\n\tobject = 0;\n\tend = objUsed;\n\twhile (object < end) {\n\t\tif (isEdge(object)) {\n\t\t\tif (!((objBuffer[object + GEYValue]) >= (workBuffer[GWFillMaxY]))) {\n\t\t\t\t/* begin checkedAddEdgeToGET: */\n\t\t\t\tif ((((objBuffer[object + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveWideMask) == GEPrimitiveLine) {\n\t\t\t\t\t/* begin checkedAddLineToGET: */\n\t\t\t\t\tif ((((objBuffer[object + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveWide) != 0) {\n\t\t\t\t\t\tlineWidth1 = objBuffer[object + GLWideExtent];\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tlineWidth1 = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif (((objBuffer[object + GLEndY]) + lineWidth1) < (workBuffer[GWFillMinY])) {\n\t\t\t\t\t\tgoto l1;\n\t\t\t\t\t}\n\t\t\t\t\tif ((((objBuffer[object + GEXValue]) - lineWidth1) >= (workBuffer[GWFillMaxX]))\n\t\t\t\t\t && (((objBuffer[object + GLEndX]) - lineWidth1) >= (workBuffer[GWFillMaxX]))) {\n\t\t\t\t\t\tgoto l1;\n\t\t\t\t\t}\n\t\t\t\t\taddEdgeToGET(object);\n\t\t\t\t\tgoto l1;\n\t\t\t\t}\n\t\t\t\tif ((((objBuffer[object + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveWideMask) == GEPrimitiveBezier) {\n\t\t\t\t\t/* begin checkedAddBezierToGET: */\n\t\t\t\t\tif ((((objBuffer[object + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveWide) != 0) {\n\t\t\t\t\t\tlineWidth = objBuffer[object + GBWideExtent];\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tlineWidth = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif (((objBuffer[object + GBEndY]) + lineWidth) < (workBuffer[GWFillMinY])) {\n\t\t\t\t\t\tgoto l1;\n\t\t\t\t\t}\n\t\t\t\t\tif ((((objBuffer[object + GEXValue]) - lineWidth) >= (workBuffer[GWFillMaxX]))\n\t\t\t\t\t && (((objBuffer[object + GBEndX]) - lineWidth) >= (workBuffer[GWFillMaxX]))) {\n\t\t\t\t\t\tgoto l1;\n\t\t\t\t\t}\n\t\t\t\t\taddEdgeToGET(object);\n\t\t\t\t\tgoto l1;\n\t\t\t\t}\n\t\t\t\taddEdgeToGET(object);\n\t\t\tl1:\t/* end checkedAddEdgeToGET: */;\n\t\t\t}\n\t\t}\n\t\tobject += objBuffer[object + GEObjectLength];\n\t}\n}\n\nstatic sqInt\ncurrentYGet(void)\n{\n\treturn workBuffer[GWCurrentY];\n}\n\nstatic sqInt\ncurrentYPut(sqInt value)\n{\n\treturn workBuffer[GWCurrentY] = value;\n}\n\nstatic sqInt\ncurrentZGet(void)\n{\n\treturn workBuffer[GWCurrentZ];\n}\n\nstatic sqInt\ncurrentZPut(sqInt value)\n{\n\treturn workBuffer[GWCurrentZ] = value;\n}\n\nstatic sqInt\ndestOffsetXGet(void)\n{\n\treturn workBuffer[GWDestOffsetX];\n}\n\nstatic sqInt\ndestOffsetXPut(sqInt value)\n{\n\treturn workBuffer[GWDestOffsetX] = value;\n}\n\nstatic sqInt\ndestOffsetYGet(void)\n{\n\treturn workBuffer[GWDestOffsetY];\n}\n\nstatic sqInt\ndestOffsetYPut(sqInt value)\n{\n\treturn workBuffer[GWDestOffsetY] = value;\n}\n\n\n/*\tDisplay the span buffer at the current scan line. */\n\nstatic sqInt\ndisplaySpanBufferAt(sqInt y)\n{\n    sqInt targetX0;\n    sqInt targetX1;\n    sqInt targetY;\n\n\n\t/* self aaLevelGet > 1 ifTrue:[self adjustAALevel]. */\n\n\ttargetX0 = ((usqInt) (workBuffer[GWSpanStart])) >> (workBuffer[GWAAShift]);\n\tif (targetX0 < (workBuffer[GWClipMinX])) {\n\t\ttargetX0 = workBuffer[GWClipMinX];\n\t}\n\ttargetX1 = ((usqInt) (((workBuffer[GWSpanEnd]) + (workBuffer[GWAALevel])) - 1)) >> (workBuffer[GWAAShift]);\n\tif (targetX1 > (workBuffer[GWClipMaxX])) {\n\t\ttargetX1 = workBuffer[GWClipMaxX];\n\t}\n\ttargetY = ((usqInt) y) >> (workBuffer[GWAAShift]);\n\tif ((targetY < (workBuffer[GWClipMinY]))\n\t || ((targetY >= (workBuffer[GWClipMaxY]))\n || ((targetX1 < (workBuffer[GWClipMinX]))\n || (targetX0 >= (workBuffer[GWClipMaxX]))))) {\n\t\treturn 0;\n\t}\n\tcopyBitsFromtoat(targetX0, targetX1, targetY);\n}\n\n\n/*\tDraw the given edge starting from leftX with the edge's fill.\n\tReturn the end value of the drawing operation. */\n\nstatic sqInt\ndrawWideEdgefrom(sqInt edge, sqInt leftX)\n{\n    sqInt fill;\n    sqInt lineWidth;\n    sqInt rightX;\n    sqInt type;\n\n\n\t/* Not for the moment */\n\n\ttype = ((usqInt) ((objBuffer[edge + GEObjectType]) & GEPrimitiveTypeMask)) >> 1;\n\tdispatchedValue = edge;\n\tswitch (type) {\n\tcase 0:\n\tcase 1:\n\t\terrorWrongIndex();\n\t\tbreak;\n\tcase 2:\n\t\tdispatchReturnValue = objBuffer[dispatchedValue + GLWideWidth];\n\t\tbreak;\n\tcase 3:\n\t\tdispatchReturnValue = objBuffer[dispatchedValue + GBWideWidth];\n\t\tbreak;\n\t}\n\tlineWidth = dispatchReturnValue;\n\tswitch (type) {\n\tcase 0:\n\tcase 1:\n\t\terrorWrongIndex();\n\t\tbreak;\n\tcase 2:\n\t\tdispatchReturnValue = objBuffer[dispatchedValue + GLWideFill];\n\t\tbreak;\n\tcase 3:\n\t\tdispatchReturnValue = objBuffer[dispatchedValue + GBWideFill];\n\t\tbreak;\n\t}\n\tfill = dispatchReturnValue;\n\tif (fill == 0) {\n\t\treturn leftX;\n\t}\n\trightX = leftX + lineWidth;\n\tfillSpanfromto(fill, leftX, rightX);\n\treturn rightX;\n}\n\nstatic sqInt\nedgeFillsInvalidate(sqInt edge)\n{\n\treturn objBuffer[edge + GEObjectType] = (((objBuffer[edge + GEObjectType]) & GEPrimitiveTypeMask) | GEEdgeFillsInvalid);\n}\n\nstatic sqInt\nedgeFillsValidate(sqInt edge)\n{\n\treturn objBuffer[edge + GEObjectType] = (((objBuffer[edge + GEObjectType]) & GEPrimitiveTypeMask) & (~GEEdgeFillsInvalid));\n}\n\nstatic sqInt\nedgeLeftFillOf(sqInt edge)\n{\n\treturn objBuffer[edge + GEFillIndexLeft];\n}\n\nstatic sqInt\nedgeLeftFillOfput(sqInt edge, sqInt value)\n{\n\treturn objBuffer[edge + GEFillIndexLeft] = value;\n}\n\nstatic sqInt\nedgeNumLinesOf(sqInt edge)\n{\n\treturn objBuffer[edge + GENumLines];\n}\n\nstatic sqInt\nedgeNumLinesOfput(sqInt edge, sqInt value)\n{\n\treturn objBuffer[edge + GENumLines] = value;\n}\n\nstatic sqInt\nedgeRightFillOf(sqInt edge)\n{\n\treturn objBuffer[edge + GEFillIndexRight];\n}\n\nstatic sqInt\nedgeRightFillOfput(sqInt edge, sqInt value)\n{\n\treturn objBuffer[edge + GEFillIndexRight] = value;\n}\n\nstatic float *\nedgeTransform(void)\n{\n\treturn ((float *) (workBuffer + GWEdgeTransform));\n}\n\n\n/*\tReturn the edge type (e.g., witout the wide edge flag) */\n\nstatic sqInt\nedgeTypeOf(sqInt edge)\n{\n\treturn ((usqInt) ((objBuffer[edge + GEObjectType]) & GEPrimitiveTypeMask)) >> 1;\n}\n\nstatic sqInt\nedgeXValueOf(sqInt edge)\n{\n\treturn objBuffer[edge + GEXValue];\n}\n\nstatic sqInt\nedgeXValueOfput(sqInt edge, sqInt value)\n{\n\treturn objBuffer[edge + GEXValue] = value;\n}\n\nstatic sqInt\nedgeYValueOf(sqInt edge)\n{\n\treturn objBuffer[edge + GEYValue];\n}\n\nstatic sqInt\nedgeYValueOfput(sqInt edge, sqInt value)\n{\n\treturn objBuffer[edge + GEYValue] = value;\n}\n\nstatic sqInt\nedgeZValueOf(sqInt edge)\n{\n\treturn objBuffer[edge + GEZValue];\n}\n\nstatic sqInt\nedgeZValueOfput(sqInt edge, sqInt value)\n{\n\treturn objBuffer[edge + GEZValue] = value;\n}\n\n\n/*\tIgnore dispatch errors when translating to C\n\t(since we have no entry point for #error in the VM proxy) */\n\nstatic sqInt\nerrorWrongIndex(void)\n{\n\t;\n}\n\n\n/*\tEstimate the length of the vector described by deltaX and deltaY.\n\tThis method may be extremely inaccurate - use it only\n\tif you know exactly that this doesn't matter. Otherwise\n\tuse #accurateLengthOf:width: */\n\nstatic sqInt\nestimatedLengthOfwith(sqInt deltaX, sqInt deltaY)\n{\n    sqInt absDx;\n    sqInt absDy;\n\n\tif (deltaX >= 0) {\n\t\tabsDx = deltaX;\n\t}\n\telse {\n\t\tabsDx = 0 - deltaX;\n\t}\n\tif (deltaY >= 0) {\n\t\tabsDy = deltaY;\n\t}\n\telse {\n\t\tabsDy = 0 - deltaY;\n\t}\n\tif (absDx > absDy) {\n\t\treturn absDx + (((sqInt) absDy >> 1));\n\t}\n\telse {\n\t\treturn absDy + (((sqInt) absDx >> 1));\n\t}\n}\n\n\n/*\tFill the span buffer from leftX to rightX with the given fill. */\n\nstatic sqInt\nfillAllFromto(sqInt leftX, sqInt rightX)\n{\n    sqInt fill;\n    sqInt someIntegerValue;\n    sqInt someIntegerValue1;\n    sqInt startX;\n    sqInt stopX;\n\n\t/* begin topFill */\n\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\tfill = 0;\n\t\tgoto l4;\n\t}\n\telse {\n\t\tfill = workBuffer[(workBuffer[GWBufferTop]) + (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3)];\n\t\tgoto l4;\n\t}\nl4:\t/* end topFill */;\n\tstartX = leftX;\n\t/* begin topRightX */\n\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\tstopX = 999999999;\n\t\tgoto l5;\n\t}\n\telse {\n\t\tstopX = workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3) + 2)];\n\t\tgoto l5;\n\t}\nl5:\t/* end topRightX */;\n\twhile (stopX < rightX) {\n\t\t/* begin makeUnsignedFrom: */\n\t\t/* begin topFill */\n\t\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\t\tsomeIntegerValue = 0;\n\t\t\tgoto l2;\n\t\t}\n\t\telse {\n\t\t\tsomeIntegerValue = workBuffer[(workBuffer[GWBufferTop]) + (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3)];\n\t\t\tgoto l2;\n\t\t}\n\tl2:\t/* end topFill */;\n\t\tfill = someIntegerValue;\n\t\tif (!(fill == 0)) {\n\t\t\tif (fillSpanfromto(fill, startX, stopX)) {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\t\t/* begin quickRemoveInvalidFillsAt: */\n\t\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\t\tgoto l1;\n\t\t}\n\t\twhile ((topRightX()) <= stopX) {\n\t\t\thideFilldepth(topFill(), topDepth());\n\t\t\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t}\n\tl1:\t/* end quickRemoveInvalidFillsAt: */;\n\t\tstartX = stopX;\n\t\t/* begin topRightX */\n\t\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\t\tstopX = 999999999;\n\t\t\tgoto l3;\n\t\t}\n\t\telse {\n\t\t\tstopX = workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3) + 2)];\n\t\t\tgoto l3;\n\t\t}\n\tl3:\t/* end topRightX */;\n\t}\n\t/* begin makeUnsignedFrom: */\n\t/* begin topFill */\n\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\tsomeIntegerValue1 = 0;\n\t\tgoto l6;\n\t}\n\telse {\n\t\tsomeIntegerValue1 = workBuffer[(workBuffer[GWBufferTop]) + (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3)];\n\t\tgoto l6;\n\t}\nl6:\t/* end topFill */;\n\tfill = someIntegerValue1;\n\tif (!(fill == 0)) {\n\t\treturn fillSpanfromto(fill, startX, rightX);\n\t}\n\treturn 0;\n}\n\nstatic sqInt\nfillBitmapSpan(void)\n{\n\treturn fillBitmapSpanfromtoat(workBuffer[GWLastExportedFill], workBuffer[GWLastExportedLeftX], workBuffer[GWLastExportedRightX], workBuffer[GWCurrentY]);\n}\n\nstatic sqInt\nfillBitmapSpanAAfromtoat(sqInt bmFill, sqInt leftX, sqInt rightX, sqInt yValue)\n{\n    sqInt a;\n    sqInt a1;\n    sqInt a2;\n    sqInt aaLevel;\n    sqInt b;\n    sqInt b1;\n    sqInt b2;\n    sqInt baseShift;\n    int *bits;\n    sqInt bmDepth;\n    sqInt bmDepth1;\n    sqInt bmDepth2;\n    sqInt bmHeight;\n    sqInt bmRaster;\n    sqInt bmRaster1;\n    sqInt bmRaster2;\n    sqInt bmWidth;\n    sqInt cMask;\n    sqInt cMask1;\n    sqInt cMask2;\n    sqInt cMask3;\n    sqInt cShift;\n    sqInt deltaX;\n    sqInt deltaY;\n    sqInt ds;\n    sqInt dsX;\n    sqInt dt;\n    sqInt dtX;\n    sqInt fillValue;\n    sqInt firstPixel;\n    sqInt firstPixel1;\n    sqInt g;\n    sqInt g1;\n    sqInt g2;\n    sqInt idx;\n    sqInt lastPixel;\n    sqInt newDelta;\n    sqInt newDelta1;\n    sqInt newDelta2;\n    sqInt newDelta3;\n    sqInt newDelta4;\n    sqInt newDelta5;\n    sqInt r;\n    sqInt r1;\n    sqInt r2;\n    sqInt rShift;\n    sqInt rShift1;\n    sqInt rShift2;\n    sqInt someIntegerValue;\n    sqInt someIntegerValue1;\n    sqInt someIntegerValue2;\n    sqInt tileFlag;\n    sqInt value;\n    sqInt value1;\n    sqInt value2;\n    sqInt x;\n    sqInt xp;\n    sqInt yp;\n\n\tbits = loadBitsFrom(bmFill);\n\tif (bits == null) {\n\t\treturn null;\n\t}\n\tbmWidth = objBuffer[bmFill + GBBitmapWidth];\n\tbmHeight = objBuffer[bmFill + GBBitmapHeight];\n\ttileFlag = (objBuffer[bmFill + GBTileFlag]) == 1;\n\tdeltaX = leftX - (objBuffer[bmFill + GFOriginX]);\n\tdeltaY = yValue - (objBuffer[bmFill + GFOriginY]);\n\tdsX = objBuffer[bmFill + GFDirectionX];\n\tdtX = objBuffer[bmFill + GFNormalX];\n\tds = (deltaX * dsX) + (deltaY * (objBuffer[bmFill + GFDirectionY]));\n\tdt = (deltaX * dtX) + (deltaY * (objBuffer[bmFill + GFNormalY]));\n\taaLevel = workBuffer[GWAALevel];\n\t/* begin aaFirstPixelFrom:to: */\n\tfirstPixel1 = ((leftX + (workBuffer[GWAALevel])) - 1) & (~((workBuffer[GWAALevel]) - 1));\n\tif (firstPixel1 > rightX) {\n\t\tfirstPixel = rightX;\n\t\tgoto l10;\n\t}\n\telse {\n\t\tfirstPixel = firstPixel1;\n\t\tgoto l10;\n\t}\nl10:\t/* end aaFirstPixelFrom:to: */;\n\tlastPixel = (rightX - 1) & (~((workBuffer[GWAALevel]) - 1));\n\tbaseShift = workBuffer[GWAAShift];\n\tcMask = workBuffer[GWAAColorMask];\n\tcShift = workBuffer[GWAAColorShift];\n\tx = leftX;\n\twhile (x < firstPixel) {\n\t\tif (tileFlag) {\n\t\t\t/* begin repeatValue:max: */\n\t\t\tnewDelta = ds;\n\t\t\twhile (newDelta < 0) {\n\t\t\t\tnewDelta += bmWidth << 16;\n\t\t\t}\n\t\t\twhile (newDelta >= (bmWidth << 16)) {\n\t\t\t\tnewDelta -= bmWidth << 16;\n\t\t\t}\n\t\t\tds = newDelta;\n\t\t\t/* begin repeatValue:max: */\n\t\t\tnewDelta1 = dt;\n\t\t\twhile (newDelta1 < 0) {\n\t\t\t\tnewDelta1 += bmHeight << 16;\n\t\t\t}\n\t\t\twhile (newDelta1 >= (bmHeight << 16)) {\n\t\t\t\tnewDelta1 -= bmHeight << 16;\n\t\t\t}\n\t\t\tdt = newDelta1;\n\t\t}\n\t\txp = ((sqInt) ds >> 16);\n\t\typ = ((sqInt) dt >> 16);\n\t\tif (!(tileFlag)) {\n\t\t\t/* begin clampValue:max: */\n\t\t\tif (xp < 0) {\n\t\t\t\txp = 0;\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (xp >= bmWidth) {\n\t\t\t\t\txp = bmWidth - 1;\n\t\t\t\t\tgoto l1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\txp = xp;\n\t\t\t\t\tgoto l1;\n\t\t\t\t}\n\t\t\t}\n\t\tl1:\t/* end clampValue:max: */;\n\t\t\t/* begin clampValue:max: */\n\t\t\tif (yp < 0) {\n\t\t\t\typ = 0;\n\t\t\t\tgoto l2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (yp >= bmHeight) {\n\t\t\t\t\typ = bmHeight - 1;\n\t\t\t\t\tgoto l2;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\typ = yp;\n\t\t\t\t\tgoto l2;\n\t\t\t\t}\n\t\t\t}\n\t\tl2:\t/* end clampValue:max: */;\n\t\t}\n\t\tif ((xp >= 0)\n\t\t && ((yp >= 0)\n && ((xp < bmWidth)\n && (yp < bmHeight)))) {\n\t\t\t/* begin bitmapValue:bits:atX:y: */\n\t\t\tbmDepth = objBuffer[bmFill + GBBitmapDepth];\n\t\t\tbmRaster = objBuffer[bmFill + GBBitmapRaster];\n\t\t\tif (bmDepth == 32) {\n\t\t\t\tvalue = (((int*) bits))[(bmRaster * yp) + xp];\n\t\t\t\tif ((value != 0)\n\t\t\t\t && ((value & 4278190080UL) == 0)) {\n\t\t\t\t\tvalue = value | 4278190080UL;\n\t\t\t\t}\n\t\t\t\tfillValue = uncheckedTransformColor(value);\n\t\t\t\tgoto l3;\n\t\t\t}\n\t\t\trShift = (rShiftTable())[bmDepth];\n\n\t\t\t/* cMask - mask out the pixel from the word */\n\n\t\t\tvalue = (((int*) bits))[(bmRaster * yp) + (((usqInt) xp) >> rShift)];\n\n\t\t\t/* rShift - shift value to move the pixel in the word to the lowest bit position */\n\n\t\t\tcMask1 = (1 << bmDepth) - 1;\n\t\t\trShift = (32 - bmDepth) - ((xp & ((1 << rShift) - 1)) * bmDepth);\n\t\t\tvalue = (((usqInt) value) >> rShift) & cMask1;\n\t\t\tif (bmDepth == 16) {\n\t\t\t\tif (!(value == 0)) {\n\n\t\t\t\t\t/* Must convert by expanding bits */\n\n\t\t\t\t\tb = (value & 31) << 3;\n\t\t\t\t\tb += ((usqInt) b) >> 5;\n\t\t\t\t\tg = ((((usqInt) value) >> 5) & 31) << 3;\n\t\t\t\t\tg += ((usqInt) g) >> 5;\n\t\t\t\t\tr = ((((usqInt) value) >> 10) & 31) << 3;\n\t\t\t\t\tr += ((usqInt) r) >> 5;\n\t\t\t\t\ta = 255;\n\t\t\t\t\tvalue = ((b + (g << 8)) + (r << 16)) + (a << 24);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif ((objBuffer[bmFill + GBColormapSize]) == 0) {\n\n\t\t\t\t\t/* Must convert by using color map */\n\n\t\t\t\t\tvalue = 0;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t/* begin makeUnsignedFrom: */\n\t\t\t\t\tsomeIntegerValue = (colormapOf(bmFill))[value];\n\t\t\t\t\tvalue = someIntegerValue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfillValue = uncheckedTransformColor(value);\n\t\tl3:\t/* end bitmapValue:bits:atX:y: */;\n\t\t\tfillValue = ((usqInt) (fillValue & cMask)) >> cShift;\n\t\t\tidx = ((usqInt) x) >> baseShift;\n\t\t\tspanBuffer[idx] = ((spanBuffer[idx]) + fillValue);\n\t\t}\n\t\tds += dsX;\n\t\tdt += dtX;\n\t\tx += 1;\n\t}\n\tcMask = (((usqInt) (workBuffer[GWAAColorMask])) >> (workBuffer[GWAAShift])) | 4042322160UL;\n\tcShift = workBuffer[GWAAShift];\n\twhile (x < lastPixel) {\n\t\tif (tileFlag) {\n\t\t\t/* begin repeatValue:max: */\n\t\t\tnewDelta2 = ds;\n\t\t\twhile (newDelta2 < 0) {\n\t\t\t\tnewDelta2 += bmWidth << 16;\n\t\t\t}\n\t\t\twhile (newDelta2 >= (bmWidth << 16)) {\n\t\t\t\tnewDelta2 -= bmWidth << 16;\n\t\t\t}\n\t\t\tds = newDelta2;\n\t\t\t/* begin repeatValue:max: */\n\t\t\tnewDelta3 = dt;\n\t\t\twhile (newDelta3 < 0) {\n\t\t\t\tnewDelta3 += bmHeight << 16;\n\t\t\t}\n\t\t\twhile (newDelta3 >= (bmHeight << 16)) {\n\t\t\t\tnewDelta3 -= bmHeight << 16;\n\t\t\t}\n\t\t\tdt = newDelta3;\n\t\t}\n\t\txp = ((sqInt) ds >> 16);\n\t\typ = ((sqInt) dt >> 16);\n\t\tif (!(tileFlag)) {\n\t\t\t/* begin clampValue:max: */\n\t\t\tif (xp < 0) {\n\t\t\t\txp = 0;\n\t\t\t\tgoto l4;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (xp >= bmWidth) {\n\t\t\t\t\txp = bmWidth - 1;\n\t\t\t\t\tgoto l4;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\txp = xp;\n\t\t\t\t\tgoto l4;\n\t\t\t\t}\n\t\t\t}\n\t\tl4:\t/* end clampValue:max: */;\n\t\t\t/* begin clampValue:max: */\n\t\t\tif (yp < 0) {\n\t\t\t\typ = 0;\n\t\t\t\tgoto l5;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (yp >= bmHeight) {\n\t\t\t\t\typ = bmHeight - 1;\n\t\t\t\t\tgoto l5;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\typ = yp;\n\t\t\t\t\tgoto l5;\n\t\t\t\t}\n\t\t\t}\n\t\tl5:\t/* end clampValue:max: */;\n\t\t}\n\t\tif ((xp >= 0)\n\t\t && ((yp >= 0)\n && ((xp < bmWidth)\n && (yp < bmHeight)))) {\n\t\t\t/* begin bitmapValue:bits:atX:y: */\n\t\t\tbmDepth1 = objBuffer[bmFill + GBBitmapDepth];\n\t\t\tbmRaster1 = objBuffer[bmFill + GBBitmapRaster];\n\t\t\tif (bmDepth1 == 32) {\n\t\t\t\tvalue1 = (((int*) bits))[(bmRaster1 * yp) + xp];\n\t\t\t\tif ((value1 != 0)\n\t\t\t\t && ((value1 & 4278190080UL) == 0)) {\n\t\t\t\t\tvalue1 = value1 | 4278190080UL;\n\t\t\t\t}\n\t\t\t\tfillValue = uncheckedTransformColor(value1);\n\t\t\t\tgoto l6;\n\t\t\t}\n\t\t\trShift1 = (rShiftTable())[bmDepth1];\n\n\t\t\t/* cMask - mask out the pixel from the word */\n\n\t\t\tvalue1 = (((int*) bits))[(bmRaster1 * yp) + (((usqInt) xp) >> rShift1)];\n\n\t\t\t/* rShift - shift value to move the pixel in the word to the lowest bit position */\n\n\t\t\tcMask2 = (1 << bmDepth1) - 1;\n\t\t\trShift1 = (32 - bmDepth1) - ((xp & ((1 << rShift1) - 1)) * bmDepth1);\n\t\t\tvalue1 = (((usqInt) value1) >> rShift1) & cMask2;\n\t\t\tif (bmDepth1 == 16) {\n\t\t\t\tif (!(value1 == 0)) {\n\n\t\t\t\t\t/* Must convert by expanding bits */\n\n\t\t\t\t\tb1 = (value1 & 31) << 3;\n\t\t\t\t\tb1 += ((usqInt) b1) >> 5;\n\t\t\t\t\tg1 = ((((usqInt) value1) >> 5) & 31) << 3;\n\t\t\t\t\tg1 += ((usqInt) g1) >> 5;\n\t\t\t\t\tr1 = ((((usqInt) value1) >> 10) & 31) << 3;\n\t\t\t\t\tr1 += ((usqInt) r1) >> 5;\n\t\t\t\t\ta1 = 255;\n\t\t\t\t\tvalue1 = ((b1 + (g1 << 8)) + (r1 << 16)) + (a1 << 24);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif ((objBuffer[bmFill + GBColormapSize]) == 0) {\n\n\t\t\t\t\t/* Must convert by using color map */\n\n\t\t\t\t\tvalue1 = 0;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t/* begin makeUnsignedFrom: */\n\t\t\t\t\tsomeIntegerValue1 = (colormapOf(bmFill))[value1];\n\t\t\t\t\tvalue1 = someIntegerValue1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfillValue = uncheckedTransformColor(value1);\n\t\tl6:\t/* end bitmapValue:bits:atX:y: */;\n\t\t\tfillValue = ((usqInt) (fillValue & cMask)) >> cShift;\n\t\t\tidx = ((usqInt) x) >> baseShift;\n\t\t\tspanBuffer[idx] = ((spanBuffer[idx]) + fillValue);\n\t\t}\n\t\tds += dsX << cShift;\n\t\tdt += dtX << cShift;\n\t\tx += aaLevel;\n\t}\n\tcMask = workBuffer[GWAAColorMask];\n\tcShift = workBuffer[GWAAColorShift];\n\twhile (x < rightX) {\n\t\tif (tileFlag) {\n\t\t\t/* begin repeatValue:max: */\n\t\t\tnewDelta4 = ds;\n\t\t\twhile (newDelta4 < 0) {\n\t\t\t\tnewDelta4 += bmWidth << 16;\n\t\t\t}\n\t\t\twhile (newDelta4 >= (bmWidth << 16)) {\n\t\t\t\tnewDelta4 -= bmWidth << 16;\n\t\t\t}\n\t\t\tds = newDelta4;\n\t\t\t/* begin repeatValue:max: */\n\t\t\tnewDelta5 = dt;\n\t\t\twhile (newDelta5 < 0) {\n\t\t\t\tnewDelta5 += bmHeight << 16;\n\t\t\t}\n\t\t\twhile (newDelta5 >= (bmHeight << 16)) {\n\t\t\t\tnewDelta5 -= bmHeight << 16;\n\t\t\t}\n\t\t\tdt = newDelta5;\n\t\t}\n\t\txp = ((sqInt) ds >> 16);\n\t\typ = ((sqInt) dt >> 16);\n\t\tif (!(tileFlag)) {\n\t\t\t/* begin clampValue:max: */\n\t\t\tif (xp < 0) {\n\t\t\t\txp = 0;\n\t\t\t\tgoto l7;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (xp >= bmWidth) {\n\t\t\t\t\txp = bmWidth - 1;\n\t\t\t\t\tgoto l7;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\txp = xp;\n\t\t\t\t\tgoto l7;\n\t\t\t\t}\n\t\t\t}\n\t\tl7:\t/* end clampValue:max: */;\n\t\t\t/* begin clampValue:max: */\n\t\t\tif (yp < 0) {\n\t\t\t\typ = 0;\n\t\t\t\tgoto l8;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (yp >= bmHeight) {\n\t\t\t\t\typ = bmHeight - 1;\n\t\t\t\t\tgoto l8;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\typ = yp;\n\t\t\t\t\tgoto l8;\n\t\t\t\t}\n\t\t\t}\n\t\tl8:\t/* end clampValue:max: */;\n\t\t}\n\t\tif ((xp >= 0)\n\t\t && ((yp >= 0)\n && ((xp < bmWidth)\n && (yp < bmHeight)))) {\n\t\t\t/* begin bitmapValue:bits:atX:y: */\n\t\t\tbmDepth2 = objBuffer[bmFill + GBBitmapDepth];\n\t\t\tbmRaster2 = objBuffer[bmFill + GBBitmapRaster];\n\t\t\tif (bmDepth2 == 32) {\n\t\t\t\tvalue2 = (((int*) bits))[(bmRaster2 * yp) + xp];\n\t\t\t\tif ((value2 != 0)\n\t\t\t\t && ((value2 & 4278190080UL) == 0)) {\n\t\t\t\t\tvalue2 = value2 | 4278190080UL;\n\t\t\t\t}\n\t\t\t\tfillValue = uncheckedTransformColor(value2);\n\t\t\t\tgoto l9;\n\t\t\t}\n\t\t\trShift2 = (rShiftTable())[bmDepth2];\n\n\t\t\t/* cMask - mask out the pixel from the word */\n\n\t\t\tvalue2 = (((int*) bits))[(bmRaster2 * yp) + (((usqInt) xp) >> rShift2)];\n\n\t\t\t/* rShift - shift value to move the pixel in the word to the lowest bit position */\n\n\t\t\tcMask3 = (1 << bmDepth2) - 1;\n\t\t\trShift2 = (32 - bmDepth2) - ((xp & ((1 << rShift2) - 1)) * bmDepth2);\n\t\t\tvalue2 = (((usqInt) value2) >> rShift2) & cMask3;\n\t\t\tif (bmDepth2 == 16) {\n\t\t\t\tif (!(value2 == 0)) {\n\n\t\t\t\t\t/* Must convert by expanding bits */\n\n\t\t\t\t\tb2 = (value2 & 31) << 3;\n\t\t\t\t\tb2 += ((usqInt) b2) >> 5;\n\t\t\t\t\tg2 = ((((usqInt) value2) >> 5) & 31) << 3;\n\t\t\t\t\tg2 += ((usqInt) g2) >> 5;\n\t\t\t\t\tr2 = ((((usqInt) value2) >> 10) & 31) << 3;\n\t\t\t\t\tr2 += ((usqInt) r2) >> 5;\n\t\t\t\t\ta2 = 255;\n\t\t\t\t\tvalue2 = ((b2 + (g2 << 8)) + (r2 << 16)) + (a2 << 24);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif ((objBuffer[bmFill + GBColormapSize]) == 0) {\n\n\t\t\t\t\t/* Must convert by using color map */\n\n\t\t\t\t\tvalue2 = 0;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t/* begin makeUnsignedFrom: */\n\t\t\t\t\tsomeIntegerValue2 = (colormapOf(bmFill))[value2];\n\t\t\t\t\tvalue2 = someIntegerValue2;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfillValue = uncheckedTransformColor(value2);\n\t\tl9:\t/* end bitmapValue:bits:atX:y: */;\n\t\t\tfillValue = ((usqInt) (fillValue & cMask)) >> cShift;\n\t\t\tidx = ((usqInt) x) >> baseShift;\n\t\t\tspanBuffer[idx] = ((spanBuffer[idx]) + fillValue);\n\t\t}\n\t\tds += dsX;\n\t\tdt += dtX;\n\t\tx += 1;\n\t}\n}\n\n\n/*\tFill the span buffer between leftEdge and rightEdge using the given bits.\n\tNote: We always start from zero - this avoids using huge bitmap buffers if\n\tthe bitmap is to be displayed at the very far right hand side and also\n\tgives us a chance of using certain bitmaps (e.g., those with depth 32)\n\tdirectly. \n */\n\nstatic sqInt\nfillBitmapSpanfromto(int *bits, sqInt leftX, sqInt rightX)\n{\n    sqInt baseShift;\n    sqInt bitX;\n    sqInt colorMask;\n    sqInt colorShift;\n    sqInt fillValue;\n    sqInt x;\n    sqInt x0;\n    sqInt x1;\n\n\tx0 = leftX;\n\tx1 = rightX;\n\n\t/* Hack for pre-increment */\n\n\tbitX = -1;\n\tif ((workBuffer[GWAALevel]) == 1) {\n\t\twhile (x0 < x1) {\n\t\t\tfillValue = (((int *) bits))[(bitX += 1)];\n\t\t\tspanBuffer[x0] = fillValue;\n\t\t\tx0 += 1;\n\t\t}\n\t}\n\telse {\n\n\t\t/* Generic version with anti-aliasing */\n\n\t\tcolorMask = workBuffer[GWAAColorMask];\n\t\tcolorShift = workBuffer[GWAAColorShift];\n\t\tbaseShift = workBuffer[GWAAShift];\n\t\twhile (x0 < x1) {\n\t\t\tx = ((usqInt) x0) >> baseShift;\n\t\t\tfillValue = (((int *) bits))[(bitX += 1)];\n\t\t\tfillValue = ((usqInt) (fillValue & colorMask)) >> colorShift;\n\t\t\tspanBuffer[x] = ((spanBuffer[x]) + fillValue);\n\t\t\tx0 += 1;\n\t\t}\n\t}\n\tif (x1 > (workBuffer[GWSpanEnd])) {\n\t\tworkBuffer[GWSpanEnd] = x1;\n\t}\n\tif (x1 > (workBuffer[GWSpanEndAA])) {\n\t\tworkBuffer[GWSpanEndAA] = x1;\n\t}\n}\n\nstatic sqInt\nfillBitmapSpanfromtoat(sqInt bmFill, sqInt leftX, sqInt rightX, sqInt yValue)\n{\n    sqInt a;\n    sqInt b;\n    int *bits;\n    sqInt bmDepth;\n    sqInt bmHeight;\n    sqInt bmRaster;\n    sqInt bmWidth;\n    sqInt cMask;\n    sqInt deltaX;\n    sqInt deltaY;\n    sqInt ds;\n    sqInt dsX;\n    sqInt dt;\n    sqInt dtX;\n    sqInt fillValue;\n    sqInt g;\n    sqInt newDelta;\n    sqInt newDelta1;\n    sqInt r;\n    sqInt rShift;\n    sqInt someIntegerValue;\n    sqInt tileFlag;\n    sqInt value;\n    sqInt x;\n    sqInt x1;\n    sqInt xp;\n    sqInt yp;\n\n\tif (!((workBuffer[GWAALevel]) == 1)) {\n\t\treturn fillBitmapSpanAAfromtoat(bmFill, leftX, rightX, yValue);\n\t}\n\tbits = loadBitsFrom(bmFill);\n\tif (bits == null) {\n\t\treturn null;\n\t}\n\tbmWidth = objBuffer[bmFill + GBBitmapWidth];\n\tbmHeight = objBuffer[bmFill + GBBitmapHeight];\n\ttileFlag = (objBuffer[bmFill + GBTileFlag]) == 1;\n\tdeltaX = leftX - (objBuffer[bmFill + GFOriginX]);\n\tdeltaY = yValue - (objBuffer[bmFill + GFOriginY]);\n\tdsX = objBuffer[bmFill + GFDirectionX];\n\tdtX = objBuffer[bmFill + GFNormalX];\n\tds = (deltaX * dsX) + (deltaY * (objBuffer[bmFill + GFDirectionY]));\n\tdt = (deltaX * dtX) + (deltaY * (objBuffer[bmFill + GFNormalY]));\n\tx = leftX;\n\tx1 = rightX;\n\twhile (x < x1) {\n\t\tif (tileFlag) {\n\t\t\t/* begin repeatValue:max: */\n\t\t\tnewDelta = ds;\n\t\t\twhile (newDelta < 0) {\n\t\t\t\tnewDelta += bmWidth << 16;\n\t\t\t}\n\t\t\twhile (newDelta >= (bmWidth << 16)) {\n\t\t\t\tnewDelta -= bmWidth << 16;\n\t\t\t}\n\t\t\tds = newDelta;\n\t\t\t/* begin repeatValue:max: */\n\t\t\tnewDelta1 = dt;\n\t\t\twhile (newDelta1 < 0) {\n\t\t\t\tnewDelta1 += bmHeight << 16;\n\t\t\t}\n\t\t\twhile (newDelta1 >= (bmHeight << 16)) {\n\t\t\t\tnewDelta1 -= bmHeight << 16;\n\t\t\t}\n\t\t\tdt = newDelta1;\n\t\t}\n\t\txp = ((sqInt) ds >> 16);\n\t\typ = ((sqInt) dt >> 16);\n\t\tif (!(tileFlag)) {\n\t\t\t/* begin clampValue:max: */\n\t\t\tif (xp < 0) {\n\t\t\t\txp = 0;\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (xp >= bmWidth) {\n\t\t\t\t\txp = bmWidth - 1;\n\t\t\t\t\tgoto l1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\txp = xp;\n\t\t\t\t\tgoto l1;\n\t\t\t\t}\n\t\t\t}\n\t\tl1:\t/* end clampValue:max: */;\n\t\t\t/* begin clampValue:max: */\n\t\t\tif (yp < 0) {\n\t\t\t\typ = 0;\n\t\t\t\tgoto l2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (yp >= bmHeight) {\n\t\t\t\t\typ = bmHeight - 1;\n\t\t\t\t\tgoto l2;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\typ = yp;\n\t\t\t\t\tgoto l2;\n\t\t\t\t}\n\t\t\t}\n\t\tl2:\t/* end clampValue:max: */;\n\t\t}\n\t\tif ((xp >= 0)\n\t\t && ((yp >= 0)\n && ((xp < bmWidth)\n && (yp < bmHeight)))) {\n\t\t\t/* begin bitmapValue:bits:atX:y: */\n\t\t\tbmDepth = objBuffer[bmFill + GBBitmapDepth];\n\t\t\tbmRaster = objBuffer[bmFill + GBBitmapRaster];\n\t\t\tif (bmDepth == 32) {\n\t\t\t\tvalue = (((int*) bits))[(bmRaster * yp) + xp];\n\t\t\t\tif ((value != 0)\n\t\t\t\t && ((value & 4278190080UL) == 0)) {\n\t\t\t\t\tvalue = value | 4278190080UL;\n\t\t\t\t}\n\t\t\t\tfillValue = uncheckedTransformColor(value);\n\t\t\t\tgoto l3;\n\t\t\t}\n\t\t\trShift = (rShiftTable())[bmDepth];\n\n\t\t\t/* cMask - mask out the pixel from the word */\n\n\t\t\tvalue = (((int*) bits))[(bmRaster * yp) + (((usqInt) xp) >> rShift)];\n\n\t\t\t/* rShift - shift value to move the pixel in the word to the lowest bit position */\n\n\t\t\tcMask = (1 << bmDepth) - 1;\n\t\t\trShift = (32 - bmDepth) - ((xp & ((1 << rShift) - 1)) * bmDepth);\n\t\t\tvalue = (((usqInt) value) >> rShift) & cMask;\n\t\t\tif (bmDepth == 16) {\n\t\t\t\tif (!(value == 0)) {\n\n\t\t\t\t\t/* Must convert by expanding bits */\n\n\t\t\t\t\tb = (value & 31) << 3;\n\t\t\t\t\tb += ((usqInt) b) >> 5;\n\t\t\t\t\tg = ((((usqInt) value) >> 5) & 31) << 3;\n\t\t\t\t\tg += ((usqInt) g) >> 5;\n\t\t\t\t\tr = ((((usqInt) value) >> 10) & 31) << 3;\n\t\t\t\t\tr += ((usqInt) r) >> 5;\n\t\t\t\t\ta = 255;\n\t\t\t\t\tvalue = ((b + (g << 8)) + (r << 16)) + (a << 24);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif ((objBuffer[bmFill + GBColormapSize]) == 0) {\n\n\t\t\t\t\t/* Must convert by using color map */\n\n\t\t\t\t\tvalue = 0;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t/* begin makeUnsignedFrom: */\n\t\t\t\t\tsomeIntegerValue = (colormapOf(bmFill))[value];\n\t\t\t\t\tvalue = someIntegerValue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfillValue = uncheckedTransformColor(value);\n\t\tl3:\t/* end bitmapValue:bits:atX:y: */;\n\t\t\tspanBuffer[x] = fillValue;\n\t\t}\n\t\tds += dsX;\n\t\tdt += dtX;\n\t\tx += 1;\n\t}\n}\n\n\n/*\tThis is the inner loop for solid color fills with anti-aliasing.\n\tThis loop has been unrolled for speed and quality into three parts:\n\ta) copy all pixels that fall into the first full pixel.\n\tb) copy aaLevel pixels between the first and the last full pixel\n\tc) copy all pixels that fall in the last full pixel */\n\nstatic sqInt\nfillColorSpanAAx0x1(sqInt pixelValue32, sqInt leftX, sqInt rightX)\n{\n    sqInt aaLevel;\n    sqInt baseShift;\n    sqInt colorMask;\n    sqInt firstPixel;\n    sqInt firstPixel1;\n    sqInt idx;\n    sqInt lastPixel;\n    sqInt pv32;\n    sqInt x;\n\n\t/* begin aaFirstPixelFrom:to: */\n\tfirstPixel1 = ((leftX + (workBuffer[GWAALevel])) - 1) & (~((workBuffer[GWAALevel]) - 1));\n\tif (firstPixel1 > rightX) {\n\t\tfirstPixel = rightX;\n\t\tgoto l1;\n\t}\n\telse {\n\t\tfirstPixel = firstPixel1;\n\t\tgoto l1;\n\t}\nl1:\t/* end aaFirstPixelFrom:to: */;\n\tlastPixel = (rightX - 1) & (~((workBuffer[GWAALevel]) - 1));\n\taaLevel = workBuffer[GWAALevel];\n\tbaseShift = workBuffer[GWAAShift];\n\n\t/* Part a: Deal with the first n sub-pixels */\n\n\tx = leftX;\n\tif (x < firstPixel) {\n\t\tpv32 = ((usqInt) (pixelValue32 & (workBuffer[GWAAColorMask]))) >> (workBuffer[GWAAColorShift]);\n\t\twhile (x < firstPixel) {\n\t\t\tidx = ((usqInt) x) >> baseShift;\n\t\t\tspanBuffer[idx] = ((spanBuffer[idx]) + pv32);\n\t\t\tx += 1;\n\t\t}\n\t}\n\tif (x < lastPixel) {\n\t\tcolorMask = (((usqInt) (workBuffer[GWAAColorMask])) >> (workBuffer[GWAAShift])) | 4042322160UL;\n\t\tpv32 = ((usqInt) (pixelValue32 & colorMask)) >> (workBuffer[GWAAShift]);\n\t\twhile (x < lastPixel) {\n\t\t\tidx = ((usqInt) x) >> baseShift;\n\t\t\tspanBuffer[idx] = ((spanBuffer[idx]) + pv32);\n\t\t\tx += aaLevel;\n\t\t}\n\t}\n\tif (x < rightX) {\n\t\tpv32 = ((usqInt) (pixelValue32 & (workBuffer[GWAAColorMask]))) >> (workBuffer[GWAAColorShift]);\n\t\twhile (x < rightX) {\n\t\t\tidx = ((usqInt) x) >> baseShift;\n\t\t\tspanBuffer[idx] = ((spanBuffer[idx]) + pv32);\n\t\t\tx += 1;\n\t\t}\n\t}\n}\n\n\n/*\tFill the span buffer between leftEdge and rightEdge with the given pixel\n\tvalue. \n */\n\nstatic sqInt\nfillColorSpanfromto(sqInt pixelValue32, sqInt leftX, sqInt rightX)\n{\n    sqInt x0;\n    sqInt x1;\n\n\tif (!((workBuffer[GWAALevel]) == 1)) {\n\t\treturn fillColorSpanAAx0x1(pixelValue32, leftX, rightX);\n\t}\n\tx0 = leftX;\n\n\t/* Unroll the inner loop four times, since we're only storing data. */\n\n\tx1 = rightX;\n\twhile ((x0 + 4) < x1) {\n\t\tspanBuffer[x0] = pixelValue32;\n\t\tspanBuffer[x0 + 1] = pixelValue32;\n\t\tspanBuffer[x0 + 2] = pixelValue32;\n\t\tspanBuffer[x0 + 3] = pixelValue32;\n\t\tx0 += 4;\n\t}\n\twhile (x0 < x1) {\n\t\tspanBuffer[x0] = pixelValue32;\n\t\tx0 += 1;\n\t}\n}\n\nstatic sqInt\nfillDirectionXOf(sqInt fill)\n{\n\treturn objBuffer[fill + GFDirectionX];\n}\n\nstatic sqInt\nfillDirectionXOfput(sqInt fill, sqInt value)\n{\n\treturn objBuffer[fill + GFDirectionX] = value;\n}\n\nstatic sqInt\nfillDirectionYOf(sqInt fill)\n{\n\treturn objBuffer[fill + GFDirectionY];\n}\n\nstatic sqInt\nfillDirectionYOfput(sqInt fill, sqInt value)\n{\n\treturn objBuffer[fill + GFDirectionY] = value;\n}\n\nstatic sqInt\nfillLinearGradient(void)\n{\n\treturn fillLinearGradientfromtoat(workBuffer[GWLastExportedFill], workBuffer[GWLastExportedLeftX], workBuffer[GWLastExportedRightX], workBuffer[GWCurrentY]);\n}\n\n\n/*\tThis is the AA version of linear gradient filling. */\n\nstatic sqInt\nfillLinearGradientAArampdsdsXfromto(sqInt fill, int *ramp, sqInt deltaS, sqInt dsX, sqInt leftX, sqInt rightX)\n{\n    sqInt aaLevel;\n    sqInt baseShift;\n    sqInt colorMask;\n    sqInt colorShift;\n    sqInt ds;\n    sqInt firstPixel;\n    sqInt firstPixel1;\n    sqInt idx;\n    sqInt lastPixel;\n    sqInt rampIndex;\n    sqInt rampSize;\n    sqInt rampValue;\n    sqInt x;\n\n\taaLevel = workBuffer[GWAALevel];\n\tbaseShift = workBuffer[GWAAShift];\n\trampSize = objBuffer[fill + GFRampLength];\n\tds = deltaS;\n\tx = leftX;\n\trampIndex = ((sqInt) ds >> 16);\n\t/* begin aaFirstPixelFrom:to: */\n\tfirstPixel1 = ((leftX + (workBuffer[GWAALevel])) - 1) & (~((workBuffer[GWAALevel]) - 1));\n\tif (firstPixel1 > rightX) {\n\t\tfirstPixel = rightX;\n\t\tgoto l1;\n\t}\n\telse {\n\t\tfirstPixel = firstPixel1;\n\t\tgoto l1;\n\t}\nl1:\t/* end aaFirstPixelFrom:to: */;\n\n\t/* Deal with the first n sub-pixels */\n\n\tlastPixel = (rightX - 1) & (~((workBuffer[GWAALevel]) - 1));\n\tcolorMask = workBuffer[GWAAColorMask];\n\tcolorShift = workBuffer[GWAAColorShift];\n\twhile ((x < firstPixel)\n && ((rampIndex < rampSize)\n && (rampIndex >= 0))) {\n\t\trampValue = (((int *) ramp))[rampIndex];\n\n\t\t/* Copy as many pixels as possible */\n\n\t\trampValue = ((usqInt) (rampValue & colorMask)) >> colorShift;\n\t\twhile ((x < firstPixel)\n && ((((sqInt) ds >> 16)) == rampIndex)) {\n\t\t\tidx = ((usqInt) x) >> baseShift;\n\t\t\tspanBuffer[idx] = ((spanBuffer[idx]) + rampValue);\n\t\t\tx += 1;\n\t\t\tds += dsX;\n\t\t}\n\t\trampIndex = ((sqInt) ds >> 16);\n\t}\n\tcolorMask = (((usqInt) (workBuffer[GWAAColorMask])) >> (workBuffer[GWAAShift])) | 4042322160UL;\n\tcolorShift = workBuffer[GWAAShift];\n\twhile ((x < lastPixel)\n && ((rampIndex < rampSize)\n && (rampIndex >= 0))) {\n\t\trampValue = (((int *) ramp))[rampIndex];\n\n\t\t/* Copy as many pixels as possible */\n\n\t\trampValue = ((usqInt) (rampValue & colorMask)) >> colorShift;\n\t\twhile ((x < lastPixel)\n && ((((sqInt) ds >> 16)) == rampIndex)) {\n\t\t\tidx = ((usqInt) x) >> baseShift;\n\t\t\tspanBuffer[idx] = ((spanBuffer[idx]) + rampValue);\n\t\t\tx += aaLevel;\n\t\t\tds += dsX << colorShift;\n\t\t}\n\t\trampIndex = ((sqInt) ds >> 16);\n\t}\n\tcolorMask = workBuffer[GWAAColorMask];\n\tcolorShift = workBuffer[GWAAColorShift];\n\twhile ((x < rightX)\n && ((rampIndex < rampSize)\n && (rampIndex >= 0))) {\n\t\trampValue = (((int *) ramp))[rampIndex];\n\n\t\t/* Copy as many pixels as possible */\n\n\t\trampValue = ((usqInt) (rampValue & colorMask)) >> colorShift;\n\t\twhile ((x < rightX)\n && ((((sqInt) ds >> 16)) == rampIndex)) {\n\t\t\tidx = ((usqInt) x) >> baseShift;\n\t\t\tspanBuffer[idx] = ((spanBuffer[idx]) + rampValue);\n\t\t\tx += 1;\n\t\t\tds += dsX;\n\t\t}\n\t\trampIndex = ((sqInt) ds >> 16);\n\t}\n\treturn x;\n}\n\n\n/*\tDraw a linear gradient fill. */\n\nstatic sqInt\nfillLinearGradientfromtoat(sqInt fill, sqInt leftX, sqInt rightX, sqInt yValue)\n{\n    sqInt ds;\n    sqInt dsX;\n    int *ramp;\n    sqInt rampIndex;\n    sqInt rampSize;\n    sqInt x;\n    sqInt x0;\n    sqInt x01;\n    sqInt x02;\n    sqInt x1;\n    sqInt x11;\n    sqInt x12;\n\n\t/* begin gradientRampOf: */\n\tramp = (objBuffer + fill) + GFRampOffset;\n\trampSize = objBuffer[fill + GFRampLength];\n\tdsX = objBuffer[fill + GFDirectionX];\n\tds = ((leftX - (objBuffer[fill + GFOriginX])) * dsX) + ((yValue - (objBuffer[fill + GFOriginY])) * (objBuffer[fill + GFDirectionY]));\n\tx = x0 = leftX;\n\n\t/* Note: The inner loop has been divided into three parts for speed */\n\t/* Part one: Fill everything outside the left boundary */\n\n\tx1 = rightX;\n\twhile (((((rampIndex = ((sqInt) ds >> 16))) < 0)\n || (rampIndex >= rampSize))\n && (x < x1)) {\n\t\tx += 1;\n\t\tds += dsX;\n\t}\n\tif (x > x0) {\n\t\tif (rampIndex < 0) {\n\t\t\trampIndex = 0;\n\t\t}\n\t\tif (rampIndex >= rampSize) {\n\t\t\trampIndex = rampSize - 1;\n\t\t}\n\t\t/* begin fillColorSpan:from:to: */\n\t\tif (!((workBuffer[GWAALevel]) == 1)) {\n\t\t\tfillColorSpanAAx0x1(ramp[rampIndex], x0, x);\n\t\t\tgoto l1;\n\t\t}\n\t\tx01 = x0;\n\n\t\t/* Unroll the inner loop four times, since we're only storing data. */\n\n\t\tx11 = x;\n\t\twhile ((x01 + 4) < x11) {\n\t\t\tspanBuffer[x01] = (ramp[rampIndex]);\n\t\t\tspanBuffer[x01 + 1] = (ramp[rampIndex]);\n\t\t\tspanBuffer[x01 + 2] = (ramp[rampIndex]);\n\t\t\tspanBuffer[x01 + 3] = (ramp[rampIndex]);\n\t\t\tx01 += 4;\n\t\t}\n\t\twhile (x01 < x11) {\n\t\t\tspanBuffer[x01] = (ramp[rampIndex]);\n\t\t\tx01 += 1;\n\t\t}\n\tl1:\t/* end fillColorSpan:from:to: */;\n\t}\n\tif ((workBuffer[GWAALevel]) == 1) {\n\t\twhile (((((rampIndex = ((sqInt) ds >> 16))) < rampSize)\n && (rampIndex >= 0))\n && (x < x1)) {\n\t\t\tspanBuffer[x] = (ramp[rampIndex]);\n\t\t\tx += 1;\n\t\t\tds += dsX;\n\t\t}\n\t}\n\telse {\n\t\tx = fillLinearGradientAArampdsdsXfromto(fill, ramp, ds, dsX, x, rightX);\n\t}\n\tif (x < x1) {\n\t\tif (rampIndex < 0) {\n\t\t\trampIndex = 0;\n\t\t}\n\t\tif (rampIndex >= rampSize) {\n\t\t\trampIndex = rampSize - 1;\n\t\t}\n\t\t/* begin fillColorSpan:from:to: */\n\t\tif (!((workBuffer[GWAALevel]) == 1)) {\n\t\t\tfillColorSpanAAx0x1(ramp[rampIndex], x, x1);\n\t\t\tgoto l2;\n\t\t}\n\t\tx02 = x;\n\n\t\t/* Unroll the inner loop four times, since we're only storing data. */\n\n\t\tx12 = x1;\n\t\twhile ((x02 + 4) < x12) {\n\t\t\tspanBuffer[x02] = (ramp[rampIndex]);\n\t\t\tspanBuffer[x02 + 1] = (ramp[rampIndex]);\n\t\t\tspanBuffer[x02 + 2] = (ramp[rampIndex]);\n\t\t\tspanBuffer[x02 + 3] = (ramp[rampIndex]);\n\t\t\tx02 += 4;\n\t\t}\n\t\twhile (x02 < x12) {\n\t\t\tspanBuffer[x02] = (ramp[rampIndex]);\n\t\t\tx02 += 1;\n\t\t}\n\tl2:\t/* end fillColorSpan:from:to: */;\n\t}\n}\n\nstatic sqInt\nfillMaxXGet(void)\n{\n\treturn workBuffer[GWFillMaxX];\n}\n\nstatic sqInt\nfillMaxXPut(sqInt value)\n{\n\treturn workBuffer[GWFillMaxX] = value;\n}\n\nstatic sqInt\nfillMaxYGet(void)\n{\n\treturn workBuffer[GWFillMaxY];\n}\n\nstatic sqInt\nfillMaxYPut(sqInt value)\n{\n\treturn workBuffer[GWFillMaxY] = value;\n}\n\nstatic sqInt\nfillMinXGet(void)\n{\n\treturn workBuffer[GWFillMinX];\n}\n\nstatic sqInt\nfillMinXPut(sqInt value)\n{\n\treturn workBuffer[GWFillMinX] = value;\n}\n\nstatic sqInt\nfillMinYGet(void)\n{\n\treturn workBuffer[GWFillMinY];\n}\n\nstatic sqInt\nfillMinYPut(sqInt value)\n{\n\treturn workBuffer[GWFillMinY] = value;\n}\n\nstatic sqInt\nfillNormalXOf(sqInt fill)\n{\n\treturn objBuffer[fill + GFNormalX];\n}\n\nstatic sqInt\nfillNormalXOfput(sqInt fill, sqInt value)\n{\n\treturn objBuffer[fill + GFNormalX] = value;\n}\n\nstatic sqInt\nfillNormalYOf(sqInt fill)\n{\n\treturn objBuffer[fill + GFNormalY];\n}\n\nstatic sqInt\nfillNormalYOfput(sqInt fill, sqInt value)\n{\n\treturn objBuffer[fill + GFNormalY] = value;\n}\n\nstatic sqInt\nfillOffsetXGet(void)\n{\n\treturn workBuffer[GWFillOffsetX];\n}\n\nstatic sqInt\nfillOffsetXPut(sqInt value)\n{\n\treturn workBuffer[GWFillOffsetX] = value;\n}\n\nstatic sqInt\nfillOffsetYGet(void)\n{\n\treturn workBuffer[GWFillOffsetY];\n}\n\nstatic sqInt\nfillOffsetYPut(sqInt value)\n{\n\treturn workBuffer[GWFillOffsetY] = value;\n}\n\nstatic sqInt\nfillOriginXOf(sqInt fill)\n{\n\treturn objBuffer[fill + GFOriginX];\n}\n\nstatic sqInt\nfillOriginXOfput(sqInt fill, sqInt value)\n{\n\treturn objBuffer[fill + GFOriginX] = value;\n}\n\nstatic sqInt\nfillOriginYOf(sqInt fill)\n{\n\treturn objBuffer[fill + GFOriginY];\n}\n\nstatic sqInt\nfillOriginYOfput(sqInt fill, sqInt value)\n{\n\treturn objBuffer[fill + GFOriginY] = value;\n}\n\n\n/*\tPart 2a) Compute the decreasing part of the ramp */\n\nstatic sqInt\nfillRadialDecreasingAArampdeltaSTdsXdtXfromto(sqInt fill, int *ramp,  int *deltaST, sqInt dsX, sqInt dtX, sqInt leftX, sqInt rightX)\n{\n    sqInt aaLevel;\n    sqInt baseShift;\n    sqInt colorMask;\n    sqInt colorShift;\n    sqInt ds;\n    sqInt dt;\n    sqInt firstPixel;\n    sqInt firstPixel1;\n    sqInt index;\n    sqInt lastPixel;\n    sqInt length2;\n    sqInt nextLength;\n    sqInt rampIndex;\n    sqInt rampValue;\n    sqInt x;\n    sqInt x1;\n\n\tds = (((int*) deltaST))[0];\n\tdt = (((int*) deltaST))[1];\n\taaLevel = workBuffer[GWAALevel];\n\tbaseShift = workBuffer[GWAAShift];\n\trampIndex = accurateLengthOfwith(((sqInt) ds >> 16), ((sqInt) dt >> 16));\n\tlength2 = (rampIndex - 1) * (rampIndex - 1);\n\tx = leftX;\n\tx1 = objBuffer[fill + GFOriginX];\n\tif (x1 > rightX) {\n\t\tx1 = rightX;\n\t}\n\t/* begin aaFirstPixelFrom:to: */\n\tfirstPixel1 = ((leftX + (workBuffer[GWAALevel])) - 1) & (~((workBuffer[GWAALevel]) - 1));\n\tif (firstPixel1 > x1) {\n\t\tfirstPixel = x1;\n\t\tgoto l1;\n\t}\n\telse {\n\t\tfirstPixel = firstPixel1;\n\t\tgoto l1;\n\t}\nl1:\t/* end aaFirstPixelFrom:to: */;\n\n\t/* Deal with the first n sub-pixels */\n\n\tlastPixel = (x1 - 1) & (~((workBuffer[GWAALevel]) - 1));\n\tif (x < firstPixel) {\n\t\tcolorMask = workBuffer[GWAAColorMask];\n\t\tcolorShift = workBuffer[GWAAColorShift];\n\t\trampValue = (((int *) ramp))[rampIndex];\n\t\trampValue = ((usqInt) (rampValue & colorMask)) >> colorShift;\n\t\twhile (x < firstPixel) {\n\t\t\twhile ((x < firstPixel)\n && ((((((sqInt) ds >> 16)) * (((sqInt) ds >> 16))) + ((((sqInt) dt >> 16)) * (((sqInt) dt >> 16)))) >= length2)) {\n\t\t\t\tindex = ((usqInt) x) >> baseShift;\n\t\t\t\tspanBuffer[index] = ((spanBuffer[index]) + rampValue);\n\t\t\t\tx += 1;\n\t\t\t\tds += dsX;\n\t\t\t\tdt += dtX;\n\t\t\t}\n\t\t\tnextLength = ((((sqInt) ds >> 16)) * (((sqInt) ds >> 16))) + ((((sqInt) dt >> 16)) * (((sqInt) dt >> 16)));\n\t\t\twhile (nextLength < length2) {\n\t\t\t\trampIndex -= 1;\n\t\t\t\trampValue = (((int *) ramp))[rampIndex];\n\t\t\t\trampValue = ((usqInt) (rampValue & colorMask)) >> colorShift;\n\t\t\t\tlength2 = (rampIndex - 1) * (rampIndex - 1);\n\t\t\t}\n\t\t}\n\t}\n\tif (x < lastPixel) {\n\t\tcolorMask = (((usqInt) (workBuffer[GWAAColorMask])) >> (workBuffer[GWAAShift])) | 4042322160UL;\n\t\tcolorShift = workBuffer[GWAAShift];\n\t\trampValue = (((int *) ramp))[rampIndex];\n\t\trampValue = ((usqInt) (rampValue & colorMask)) >> colorShift;\n\t\twhile (x < lastPixel) {\n\t\t\twhile ((x < lastPixel)\n && ((((((sqInt) ds >> 16)) * (((sqInt) ds >> 16))) + ((((sqInt) dt >> 16)) * (((sqInt) dt >> 16)))) >= length2)) {\n\t\t\t\tindex = ((usqInt) x) >> baseShift;\n\t\t\t\tspanBuffer[index] = ((spanBuffer[index]) + rampValue);\n\t\t\t\tx += aaLevel;\n\t\t\t\tds += dsX << colorShift;\n\t\t\t\tdt += dtX << colorShift;\n\t\t\t}\n\t\t\tnextLength = ((((sqInt) ds >> 16)) * (((sqInt) ds >> 16))) + ((((sqInt) dt >> 16)) * (((sqInt) dt >> 16)));\n\t\t\twhile (nextLength < length2) {\n\t\t\t\trampIndex -= 1;\n\t\t\t\trampValue = (((int *) ramp))[rampIndex];\n\t\t\t\trampValue = ((usqInt) (rampValue & colorMask)) >> colorShift;\n\t\t\t\tlength2 = (rampIndex - 1) * (rampIndex - 1);\n\t\t\t}\n\t\t}\n\t}\n\tif (x < x1) {\n\t\tcolorMask = workBuffer[GWAAColorMask];\n\t\tcolorShift = workBuffer[GWAAColorShift];\n\t\trampValue = (((int *) ramp))[rampIndex];\n\t\trampValue = ((usqInt) (rampValue & colorMask)) >> colorShift;\n\t\twhile (x < x1) {\n\t\t\twhile ((x < x1)\n && ((((((sqInt) ds >> 16)) * (((sqInt) ds >> 16))) + ((((sqInt) dt >> 16)) * (((sqInt) dt >> 16)))) >= length2)) {\n\t\t\t\tindex = ((usqInt) x) >> baseShift;\n\t\t\t\tspanBuffer[index] = ((spanBuffer[index]) + rampValue);\n\t\t\t\tx += 1;\n\t\t\t\tds += dsX;\n\t\t\t\tdt += dtX;\n\t\t\t}\n\t\t\tnextLength = ((((sqInt) ds >> 16)) * (((sqInt) ds >> 16))) + ((((sqInt) dt >> 16)) * (((sqInt) dt >> 16)));\n\t\t\twhile (nextLength < length2) {\n\t\t\t\trampIndex -= 1;\n\t\t\t\trampValue = (((int *) ramp))[rampIndex];\n\t\t\t\trampValue = ((usqInt) (rampValue & colorMask)) >> colorShift;\n\t\t\t\tlength2 = (rampIndex - 1) * (rampIndex - 1);\n\t\t\t}\n\t\t}\n\t}\n\t(((int *) deltaST))[0] = ds;\n\t(((int *) deltaST))[1] = dt;\n\treturn x;\n}\n\n\n/*\tPart 2a) Compute the decreasing part of the ramp */\n\nstatic sqInt\nfillRadialDecreasingrampdeltaSTdsXdtXfromto(sqInt fill, sqInt ramp, sqInt deltaST, sqInt dsX, sqInt dtX, sqInt leftX, sqInt rightX)\n{\n    sqInt ds;\n    sqInt dt;\n    sqInt length2;\n    sqInt nextLength;\n    sqInt rampIndex;\n    sqInt rampValue;\n    sqInt x;\n    sqInt x1;\n\n\tds = (((int*) deltaST))[0];\n\tdt = (((int*) deltaST))[1];\n\trampIndex = accurateLengthOfwith(((sqInt) ds >> 16), ((sqInt) dt >> 16));\n\trampValue = (((int *) ramp))[rampIndex];\n\tlength2 = (rampIndex - 1) * (rampIndex - 1);\n\tx = leftX;\n\tx1 = rightX;\n\tif (x1 > (objBuffer[fill + GFOriginX])) {\n\t\tx1 = objBuffer[fill + GFOriginX];\n\t}\n\twhile (x < x1) {\n\t\twhile ((x < x1)\n && ((((((sqInt) ds >> 16)) * (((sqInt) ds >> 16))) + ((((sqInt) dt >> 16)) * (((sqInt) dt >> 16)))) >= length2)) {\n\t\t\tspanBuffer[x] = rampValue;\n\t\t\tx += 1;\n\t\t\tds += dsX;\n\t\t\tdt += dtX;\n\t\t}\n\t\tnextLength = ((((sqInt) ds >> 16)) * (((sqInt) ds >> 16))) + ((((sqInt) dt >> 16)) * (((sqInt) dt >> 16)));\n\t\twhile (nextLength < length2) {\n\t\t\trampIndex -= 1;\n\t\t\trampValue = (((int *) ramp))[rampIndex];\n\t\t\tlength2 = (rampIndex - 1) * (rampIndex - 1);\n\t\t}\n\t}\n\t(((int *) deltaST))[0] = ds;\n\t(((int *) deltaST))[1] = dt;\n\treturn x;\n}\n\nstatic sqInt\nfillRadialGradient(void)\n{\n\treturn fillRadialGradientfromtoat(workBuffer[GWLastExportedFill], workBuffer[GWLastExportedLeftX], workBuffer[GWLastExportedRightX], workBuffer[GWCurrentY]);\n}\n\n\n/*\tDraw a radial gradient fill. */\n\nstatic sqInt\nfillRadialGradientfromtoat(sqInt fill, sqInt leftX, sqInt rightX, sqInt yValue)\n{\n    int *deltaST;\n    sqInt deltaX;\n    sqInt deltaY;\n    sqInt ds;\n    sqInt ds1;\n    sqInt ds2;\n    sqInt dsX;\n    sqInt dt;\n    sqInt dt1;\n    sqInt dt2;\n    sqInt dtX;\n    sqInt lastLength;\n    sqInt length2;\n    sqInt length21;\n    sqInt length22;\n    sqInt nextLength;\n    sqInt nextLength1;\n    int *ramp;\n    sqInt rampIndex;\n    sqInt rampIndex1;\n    sqInt rampSize;\n    sqInt rampSize1;\n    sqInt rampValue;\n    sqInt rampValue1;\n    sqInt x;\n    sqInt x0;\n    sqInt x01;\n    sqInt x1;\n    sqInt x11;\n    sqInt x12;\n    sqInt x13;\n    sqInt x14;\n    sqInt x2;\n    sqInt x3;\n\n\t/* begin gradientRampOf: */\n\tramp = (objBuffer + fill) + GFRampOffset;\n\trampSize = objBuffer[fill + GFRampLength];\n\tdeltaX = leftX - (objBuffer[fill + GFOriginX]);\n\tdeltaY = yValue - (objBuffer[fill + GFOriginY]);\n\tdsX = objBuffer[fill + GFDirectionX];\n\tdtX = objBuffer[fill + GFNormalX];\n\tds = (deltaX * dsX) + (deltaY * (objBuffer[fill + GFDirectionY]));\n\tdt = (deltaX * dtX) + (deltaY * (objBuffer[fill + GFNormalY]));\n\tx = leftX;\n\n\t/* Note: The inner loop has been divided into three parts for speed */\n\t/* Part one: Fill everything outside the left boundary */\n\n\tx1 = rightX;\n\n\t/* This is the upper bound */\n\n\tlength2 = (rampSize - 1) * (rampSize - 1);\n\twhile (((((((sqInt) ds >> 16)) * (((sqInt) ds >> 16))) + ((((sqInt) dt >> 16)) * (((sqInt) dt >> 16)))) >= length2)\n && (x < x1)) {\n\t\tx += 1;\n\t\tds += dsX;\n\t\tdt += dtX;\n\t}\n\tif (x > leftX) {\n\t\t/* begin fillColorSpan:from:to: */\n\t\tif (!((workBuffer[GWAALevel]) == 1)) {\n\t\t\tfillColorSpanAAx0x1(ramp[rampSize - 1], leftX, x);\n\t\t\tgoto l1;\n\t\t}\n\t\tx0 = leftX;\n\n\t\t/* Unroll the inner loop four times, since we're only storing data. */\n\n\t\tx11 = x;\n\t\twhile ((x0 + 4) < x11) {\n\t\t\tspanBuffer[x0] = (ramp[rampSize - 1]);\n\t\t\tspanBuffer[x0 + 1] = (ramp[rampSize - 1]);\n\t\t\tspanBuffer[x0 + 2] = (ramp[rampSize - 1]);\n\t\t\tspanBuffer[x0 + 3] = (ramp[rampSize - 1]);\n\t\t\tx0 += 4;\n\t\t}\n\t\twhile (x0 < x11) {\n\t\t\tspanBuffer[x0] = (ramp[rampSize - 1]);\n\t\t\tx0 += 1;\n\t\t}\n\tl1:\t/* end fillColorSpan:from:to: */;\n\t}\n\t/* begin point1Get */\n\tdeltaST = ((int *) (workBuffer + GWPoint1));\n\tdeltaST[0] = ds;\n\tdeltaST[1] = dt;\n\tif (x < (objBuffer[fill + GFOriginX])) {\n\t\tif ((workBuffer[GWAALevel]) == 1) {\n\t\t\t/* begin fillRadialDecreasing:ramp:deltaST:dsX:dtX:from:to: */\n\t\t\tds1 = (((int*) deltaST))[0];\n\t\t\tdt1 = (((int*) deltaST))[1];\n\t\t\trampIndex = accurateLengthOfwith(((sqInt) ds1 >> 16), ((sqInt) dt1 >> 16));\n\t\t\trampValue = (((int *) ramp))[rampIndex];\n\t\t\tlength21 = (rampIndex - 1) * (rampIndex - 1);\n\t\t\tx2 = x;\n\t\t\tx12 = x1;\n\t\t\tif (x12 > (objBuffer[fill + GFOriginX])) {\n\t\t\t\tx12 = objBuffer[fill + GFOriginX];\n\t\t\t}\n\t\t\twhile (x2 < x12) {\n\t\t\t\twhile ((x2 < x12)\n && ((((((sqInt) ds1 >> 16)) * (((sqInt) ds1 >> 16))) + ((((sqInt) dt1 >> 16)) * (((sqInt) dt1 >> 16)))) >= length21)) {\n\t\t\t\t\tspanBuffer[x2] = rampValue;\n\t\t\t\t\tx2 += 1;\n\t\t\t\t\tds1 += dsX;\n\t\t\t\t\tdt1 += dtX;\n\t\t\t\t}\n\t\t\t\tnextLength = ((((sqInt) ds1 >> 16)) * (((sqInt) ds1 >> 16))) + ((((sqInt) dt1 >> 16)) * (((sqInt) dt1 >> 16)));\n\t\t\t\twhile (nextLength < length21) {\n\t\t\t\t\trampIndex -= 1;\n\t\t\t\t\trampValue = (((int *) ramp))[rampIndex];\n\t\t\t\t\tlength21 = (rampIndex - 1) * (rampIndex - 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t(((int *) deltaST))[0] = ds1;\n\t\t\t(((int *) deltaST))[1] = dt1;\n\t\t\tx = x2;\n\t\t}\n\t\telse {\n\t\t\tx = fillRadialDecreasingAArampdeltaSTdsXdtXfromto(fill, ramp, deltaST, dsX, dtX, x, x1);\n\t\t}\n\t}\n\tif (x < x1) {\n\t\tif ((workBuffer[GWAALevel]) == 1) {\n\t\t\t/* begin fillRadialIncreasing:ramp:deltaST:dsX:dtX:from:to: */\n\t\t\tds2 = (((int*) deltaST))[0];\n\t\t\tdt2 = (((int*) deltaST))[1];\n\t\t\trampIndex1 = accurateLengthOfwith(((sqInt) ds2 >> 16), ((sqInt) dt2 >> 16));\n\t\t\trampValue1 = (((int *) ramp))[rampIndex1];\n\t\t\trampSize1 = objBuffer[fill + GFRampLength];\n\n\t\t\t/* This is the upper bound */\n\n\t\t\tlength22 = (rampSize1 - 1) * (rampSize1 - 1);\n\t\t\tnextLength1 = (rampIndex1 + 1) * (rampIndex1 + 1);\n\t\t\tlastLength = ((((sqInt) ds2 >> 16)) * (((sqInt) ds2 >> 16))) + ((((sqInt) dt2 >> 16)) * (((sqInt) dt2 >> 16)));\n\t\t\tx3 = x;\n\t\t\tx14 = x1;\n\t\t\twhile ((x3 < x14)\n && (lastLength < length22)) {\n\t\t\t\twhile ((x3 < x14)\n && ((((((sqInt) ds2 >> 16)) * (((sqInt) ds2 >> 16))) + ((((sqInt) dt2 >> 16)) * (((sqInt) dt2 >> 16)))) <= nextLength1)) {\n\t\t\t\t\tspanBuffer[x3] = rampValue1;\n\t\t\t\t\tx3 += 1;\n\t\t\t\t\tds2 += dsX;\n\t\t\t\t\tdt2 += dtX;\n\t\t\t\t}\n\t\t\t\tlastLength = ((((sqInt) ds2 >> 16)) * (((sqInt) ds2 >> 16))) + ((((sqInt) dt2 >> 16)) * (((sqInt) dt2 >> 16)));\n\t\t\t\twhile (lastLength > nextLength1) {\n\t\t\t\t\trampIndex1 += 1;\n\t\t\t\t\trampValue1 = (((int *) ramp))[rampIndex1];\n\t\t\t\t\tnextLength1 = (rampIndex1 + 1) * (rampIndex1 + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t(((int *) deltaST))[0] = ds2;\n\t\t\t(((int *) deltaST))[1] = dt2;\n\t\t\tx = x3;\n\t\t}\n\t\telse {\n\t\t\tx = fillRadialIncreasingAArampdeltaSTdsXdtXfromto(fill, ramp, deltaST, dsX, dtX, x, x1);\n\t\t}\n\t}\n\tif (x < rightX) {\n\t\t/* begin fillColorSpan:from:to: */\n\t\tif (!((workBuffer[GWAALevel]) == 1)) {\n\t\t\tfillColorSpanAAx0x1(ramp[rampSize - 1], x, rightX);\n\t\t\tgoto l2;\n\t\t}\n\t\tx01 = x;\n\n\t\t/* Unroll the inner loop four times, since we're only storing data. */\n\n\t\tx13 = rightX;\n\t\twhile ((x01 + 4) < x13) {\n\t\t\tspanBuffer[x01] = (ramp[rampSize - 1]);\n\t\t\tspanBuffer[x01 + 1] = (ramp[rampSize - 1]);\n\t\t\tspanBuffer[x01 + 2] = (ramp[rampSize - 1]);\n\t\t\tspanBuffer[x01 + 3] = (ramp[rampSize - 1]);\n\t\t\tx01 += 4;\n\t\t}\n\t\twhile (x01 < x13) {\n\t\t\tspanBuffer[x01] = (ramp[rampSize - 1]);\n\t\t\tx01 += 1;\n\t\t}\n\tl2:\t/* end fillColorSpan:from:to: */;\n\t}\n}\n\n\n/*\tPart 2b) Compute the increasing part of the ramp */\n\nstatic sqInt\nfillRadialIncreasingAArampdeltaSTdsXdtXfromto(sqInt fill, int *ramp,  int *deltaST, sqInt dsX, sqInt dtX, sqInt leftX, sqInt rightX)\n{\n    sqInt aaLevel;\n    sqInt baseShift;\n    sqInt colorMask;\n    sqInt colorShift;\n    sqInt ds;\n    sqInt dt;\n    sqInt firstPixel;\n    sqInt firstPixel1;\n    sqInt index;\n    sqInt lastLength;\n    sqInt lastPixel;\n    sqInt length2;\n    sqInt nextLength;\n    sqInt rampIndex;\n    sqInt rampSize;\n    sqInt rampValue;\n    sqInt x;\n\n\tds = (((int*) deltaST))[0];\n\tdt = (((int*) deltaST))[1];\n\taaLevel = workBuffer[GWAALevel];\n\tbaseShift = workBuffer[GWAAShift];\n\trampIndex = accurateLengthOfwith(((sqInt) ds >> 16), ((sqInt) dt >> 16));\n\trampSize = objBuffer[fill + GFRampLength];\n\n\t/* This is the upper bound */\n\n\tlength2 = (rampSize - 1) * (rampSize - 1);\n\tnextLength = (rampIndex + 1) * (rampIndex + 1);\n\tlastLength = ((((sqInt) ds >> 16)) * (((sqInt) ds >> 16))) + ((((sqInt) dt >> 16)) * (((sqInt) dt >> 16)));\n\tx = leftX;\n\t/* begin aaFirstPixelFrom:to: */\n\tfirstPixel1 = ((leftX + (workBuffer[GWAALevel])) - 1) & (~((workBuffer[GWAALevel]) - 1));\n\tif (firstPixel1 > rightX) {\n\t\tfirstPixel = rightX;\n\t\tgoto l1;\n\t}\n\telse {\n\t\tfirstPixel = firstPixel1;\n\t\tgoto l1;\n\t}\nl1:\t/* end aaFirstPixelFrom:to: */;\n\n\t/* Deal with the first n subPixels */\n\n\tlastPixel = (rightX - 1) & (~((workBuffer[GWAALevel]) - 1));\n\tif ((x < firstPixel)\n\t && (lastLength < length2)) {\n\t\tcolorMask = workBuffer[GWAAColorMask];\n\t\tcolorShift = workBuffer[GWAAColorShift];\n\t\trampValue = (((int *) ramp))[rampIndex];\n\t\trampValue = ((usqInt) (rampValue & colorMask)) >> colorShift;\n\t\twhile ((x < firstPixel)\n && (lastLength < length2)) {\n\t\t\twhile ((x < firstPixel)\n && ((((((sqInt) ds >> 16)) * (((sqInt) ds >> 16))) + ((((sqInt) dt >> 16)) * (((sqInt) dt >> 16)))) <= nextLength)) {\n\t\t\t\tindex = ((usqInt) x) >> baseShift;\n\t\t\t\tspanBuffer[index] = ((spanBuffer[index]) + rampValue);\n\t\t\t\tx += 1;\n\t\t\t\tds += dsX;\n\t\t\t\tdt += dtX;\n\t\t\t}\n\t\t\tlastLength = ((((sqInt) ds >> 16)) * (((sqInt) ds >> 16))) + ((((sqInt) dt >> 16)) * (((sqInt) dt >> 16)));\n\t\t\twhile (lastLength > nextLength) {\n\t\t\t\trampIndex += 1;\n\t\t\t\trampValue = (((int *) ramp))[rampIndex];\n\t\t\t\trampValue = ((usqInt) (rampValue & colorMask)) >> colorShift;\n\t\t\t\tnextLength = (rampIndex + 1) * (rampIndex + 1);\n\t\t\t}\n\t\t}\n\t}\n\tif ((x < lastPixel)\n\t && (lastLength < length2)) {\n\t\tcolorMask = (((usqInt) (workBuffer[GWAAColorMask])) >> (workBuffer[GWAAShift])) | 4042322160UL;\n\t\tcolorShift = workBuffer[GWAAShift];\n\t\trampValue = (((int *) ramp))[rampIndex];\n\t\trampValue = ((usqInt) (rampValue & colorMask)) >> colorShift;\n\t\twhile ((x < lastPixel)\n && (lastLength < length2)) {\n\t\t\twhile ((x < lastPixel)\n && ((((((sqInt) ds >> 16)) * (((sqInt) ds >> 16))) + ((((sqInt) dt >> 16)) * (((sqInt) dt >> 16)))) <= nextLength)) {\n\t\t\t\tindex = ((usqInt) x) >> baseShift;\n\t\t\t\tspanBuffer[index] = ((spanBuffer[index]) + rampValue);\n\t\t\t\tx += aaLevel;\n\t\t\t\tds += dsX << colorShift;\n\t\t\t\tdt += dtX << colorShift;\n\t\t\t}\n\t\t\tlastLength = ((((sqInt) ds >> 16)) * (((sqInt) ds >> 16))) + ((((sqInt) dt >> 16)) * (((sqInt) dt >> 16)));\n\t\t\twhile (lastLength > nextLength) {\n\t\t\t\trampIndex += 1;\n\t\t\t\trampValue = (((int *) ramp))[rampIndex];\n\t\t\t\trampValue = ((usqInt) (rampValue & colorMask)) >> colorShift;\n\t\t\t\tnextLength = (rampIndex + 1) * (rampIndex + 1);\n\t\t\t}\n\t\t}\n\t}\n\tif ((x < rightX)\n\t && (lastLength < length2)) {\n\t\tcolorMask = workBuffer[GWAAColorMask];\n\t\tcolorShift = workBuffer[GWAAColorShift];\n\t\trampValue = (((int *) ramp))[rampIndex];\n\t\trampValue = ((usqInt) (rampValue & colorMask)) >> colorShift;\n\t\twhile ((x < rightX)\n && (lastLength < length2)) {\n\t\t\twhile ((x < rightX)\n && ((((((sqInt) ds >> 16)) * (((sqInt) ds >> 16))) + ((((sqInt) dt >> 16)) * (((sqInt) dt >> 16)))) <= nextLength)) {\n\t\t\t\tindex = ((usqInt) x) >> baseShift;\n\t\t\t\tspanBuffer[index] = ((spanBuffer[index]) + rampValue);\n\t\t\t\tx += 1;\n\t\t\t\tds += dsX;\n\t\t\t\tdt += dtX;\n\t\t\t}\n\t\t\tlastLength = ((((sqInt) ds >> 16)) * (((sqInt) ds >> 16))) + ((((sqInt) dt >> 16)) * (((sqInt) dt >> 16)));\n\t\t\twhile (lastLength > nextLength) {\n\t\t\t\trampIndex += 1;\n\t\t\t\trampValue = (((int *) ramp))[rampIndex];\n\t\t\t\trampValue = ((usqInt) (rampValue & colorMask)) >> colorShift;\n\t\t\t\tnextLength = (rampIndex + 1) * (rampIndex + 1);\n\t\t\t}\n\t\t}\n\t}\n\t(((int *) deltaST))[0] = ds;\n\t(((int *) deltaST))[1] = dt;\n\treturn x;\n}\n\n\n/*\tPart 2b) Compute the increasing part of the ramp */\n\nstatic sqInt\nfillRadialIncreasingrampdeltaSTdsXdtXfromto(sqInt fill, sqInt ramp, sqInt deltaST, sqInt dsX, sqInt dtX, sqInt leftX, sqInt rightX)\n{\n    sqInt ds;\n    sqInt dt;\n    sqInt lastLength;\n    sqInt length2;\n    sqInt nextLength;\n    sqInt rampIndex;\n    sqInt rampSize;\n    sqInt rampValue;\n    sqInt x;\n    sqInt x1;\n\n\tds = (((int*) deltaST))[0];\n\tdt = (((int*) deltaST))[1];\n\trampIndex = accurateLengthOfwith(((sqInt) ds >> 16), ((sqInt) dt >> 16));\n\trampValue = (((int *) ramp))[rampIndex];\n\trampSize = objBuffer[fill + GFRampLength];\n\n\t/* This is the upper bound */\n\n\tlength2 = (rampSize - 1) * (rampSize - 1);\n\tnextLength = (rampIndex + 1) * (rampIndex + 1);\n\tlastLength = ((((sqInt) ds >> 16)) * (((sqInt) ds >> 16))) + ((((sqInt) dt >> 16)) * (((sqInt) dt >> 16)));\n\tx = leftX;\n\tx1 = rightX;\n\twhile ((x < x1)\n && (lastLength < length2)) {\n\t\twhile ((x < x1)\n && ((((((sqInt) ds >> 16)) * (((sqInt) ds >> 16))) + ((((sqInt) dt >> 16)) * (((sqInt) dt >> 16)))) <= nextLength)) {\n\t\t\tspanBuffer[x] = rampValue;\n\t\t\tx += 1;\n\t\t\tds += dsX;\n\t\t\tdt += dtX;\n\t\t}\n\t\tlastLength = ((((sqInt) ds >> 16)) * (((sqInt) ds >> 16))) + ((((sqInt) dt >> 16)) * (((sqInt) dt >> 16)));\n\t\twhile (lastLength > nextLength) {\n\t\t\trampIndex += 1;\n\t\t\trampValue = (((int *) ramp))[rampIndex];\n\t\t\tnextLength = (rampIndex + 1) * (rampIndex + 1);\n\t\t}\n\t}\n\t(((int *) deltaST))[0] = ds;\n\t(((int *) deltaST))[1] = dt;\n\treturn x;\n}\n\n\n/*\tReturn true if fillEntry1 should be drawn before fillEntry2 */\n\nstatic sqInt\nfillSortsbefore(sqInt fillEntry1, sqInt fillEntry2)\n{\n    sqInt diff;\n\n\n\t/* First check the depth value */\n\n\tdiff = (workBuffer[(workBuffer[GWBufferTop]) + (fillEntry1 + 1)]) - (workBuffer[(workBuffer[GWBufferTop]) + (fillEntry2 + 1)]);\n\tif (!(diff == 0)) {\n\t\treturn diff > 0;\n\t}\n\treturn (((unsigned) (workBuffer[(workBuffer[GWBufferTop]) + fillEntry1]))) < (((unsigned) (workBuffer[(workBuffer[GWBufferTop]) + fillEntry2])));\n}\n\n\n/*\tFill the span buffer from leftX to rightX with the given fill.\n\tClip before performing any operations. Return true if the fill must\n\tbe handled by some Smalltalk code. */\n\nstatic sqInt\nfillSpanfromto(unsigned int fill, sqInt leftX, sqInt rightX)\n{\n    sqInt type;\n    sqInt x0;\n    sqInt x01;\n    sqInt x1;\n    sqInt x11;\n\n\tif (fill == 0) {\n\t\treturn 0;\n\t}\n\tif (leftX < (workBuffer[GWSpanEndAA])) {\n\t\tx0 = workBuffer[GWSpanEndAA];\n\t}\n\telse {\n\t\tx0 = leftX;\n\t}\n\tif (rightX > ((workBuffer[GWSpanSize]) << (workBuffer[GWAAShift]))) {\n\t\tx1 = (workBuffer[GWSpanSize]) << (workBuffer[GWAAShift]);\n\t}\n\telse {\n\t\tx1 = rightX;\n\t}\n\tif (x0 < (workBuffer[GWFillMinX])) {\n\t\tx0 = workBuffer[GWFillMinX];\n\t}\n\tif (x1 > (workBuffer[GWFillMaxX])) {\n\t\tx1 = workBuffer[GWFillMaxX];\n\t}\n\tif (x0 < (workBuffer[GWSpanStart])) {\n\t\tworkBuffer[GWSpanStart] = x0;\n\t}\n\tif (x1 > (workBuffer[GWSpanEnd])) {\n\t\tworkBuffer[GWSpanEnd] = x1;\n\t}\n\tif (x1 > (workBuffer[GWSpanEndAA])) {\n\t\tworkBuffer[GWSpanEndAA] = x1;\n\t}\n\tif (x0 >= x1) {\n\t\treturn 0;\n\t}\n\tif ((fill & 4278190080UL) != 0) {\n\t\t/* begin fillColorSpan:from:to: */\n\t\tif (!((workBuffer[GWAALevel]) == 1)) {\n\t\t\tfillColorSpanAAx0x1(fill, x0, x1);\n\t\t\tgoto l1;\n\t\t}\n\t\tx01 = x0;\n\n\t\t/* Unroll the inner loop four times, since we're only storing data. */\n\n\t\tx11 = x1;\n\t\twhile ((x01 + 4) < x11) {\n\t\t\tspanBuffer[x01] = fill;\n\t\t\tspanBuffer[x01 + 1] = fill;\n\t\t\tspanBuffer[x01 + 2] = fill;\n\t\t\tspanBuffer[x01 + 3] = fill;\n\t\t\tx01 += 4;\n\t\t}\n\t\twhile (x01 < x11) {\n\t\t\tspanBuffer[x01] = fill;\n\t\t\tx01 += 1;\n\t\t}\n\tl1:\t/* end fillColorSpan:from:to: */;\n\t}\n\telse {\n\t\tworkBuffer[GWLastExportedFill] = fill;\n\t\tworkBuffer[GWLastExportedLeftX] = x0;\n\t\tworkBuffer[GWLastExportedRightX] = x1;\n\t\ttype = ((usqInt) (((objBuffer[fill + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveFillMask)) >> 8;\n\t\tif (type <= 1) {\n\t\t\treturn 1;\n\t\t}\n\t\tswitch (type) {\n\t\tcase 0:\n\t\tcase 1:\n\t\t\terrorWrongIndex();\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tfillLinearGradientfromtoat(workBuffer[GWLastExportedFill], workBuffer[GWLastExportedLeftX], workBuffer[GWLastExportedRightX], workBuffer[GWCurrentY]);\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tfillRadialGradientfromtoat(workBuffer[GWLastExportedFill], workBuffer[GWLastExportedLeftX], workBuffer[GWLastExportedRightX], workBuffer[GWCurrentY]);\n\t\t\tbreak;\n\t\tcase 4:\n\t\tcase 5:\n\t\t\tfillBitmapSpanfromtoat(workBuffer[GWLastExportedFill], workBuffer[GWLastExportedLeftX], workBuffer[GWLastExportedRightX], workBuffer[GWCurrentY]);\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn 0;\n}\n\nstatic sqInt\nfillTypeOf(sqInt fill)\n{\n\treturn ((usqInt) (((objBuffer[fill + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveFillMask)) >> 8;\n}\n\nstatic sqInt\nfindNextAETEdgeFrom(sqInt leftEdge)\n{\n    sqInt depth;\n    sqInt rightEdge;\n\n\tdepth = objBuffer[leftEdge + GEZValue];\n\twhile ((workBuffer[GWAETStart]) < (workBuffer[GWAETUsed])) {\n\t\trightEdge = aetBuffer[workBuffer[GWAETStart]];\n\t\tif ((objBuffer[rightEdge + GEZValue]) >= depth) {\n\t\t\treturn rightEdge;\n\t\t}\n\t\tworkBuffer[GWAETStart] = ((workBuffer[GWAETStart]) + 1);\n\t}\n\treturn null;\n}\n\n\n/*\tCheck the global edge table for any entries that cannot be handled by the\n\tengine itself.\n\tIf there are any, return true. Otherwise, initialize the the edge and add\n\tit to the AET\n */\n\nstatic sqInt\nfindNextExternalEntryFromGET(void)\n{\n    sqInt edge;\n    sqInt type;\n    sqInt yValue;\n\n\n\t/* As long as we have entries in the GET */\n\n\tyValue = workBuffer[GWCurrentY];\n\twhile ((workBuffer[GWGETStart]) < (workBuffer[GWGETUsed])) {\n\t\tedge = getBuffer[workBuffer[GWGETStart]];\n\t\tif ((objBuffer[edge + GEYValue]) > yValue) {\n\t\t\treturn 0;\n\t\t}\n\t\ttype = (objBuffer[edge + GEObjectType]) & GEPrimitiveTypeMask;\n\t\tif ((type & GEPrimitiveWideMask) == GEPrimitiveEdge) {\n\t\t\treturn 1;\n\t\t}\n\t\tif (!(needAvailableSpace(1))) {\n\t\t\treturn 0;\n\t\t}\n\t\tswitch (type) {\n\t\tcase 0:\n\t\tcase 1:\n\t\tcase 2:\n\t\tcase 3:\n\t\t\terrorWrongIndex();\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tstepToFirstLineInat(getBuffer[workBuffer[GWGETStart]], workBuffer[GWCurrentY]);\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tstepToFirstWideLineInat(getBuffer[workBuffer[GWGETStart]], workBuffer[GWCurrentY]);\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tstepToFirstBezierInat(getBuffer[workBuffer[GWGETStart]], workBuffer[GWCurrentY]);\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tstepToFirstWideBezierInat(getBuffer[workBuffer[GWGETStart]], workBuffer[GWCurrentY]);\n\t\t\tbreak;\n\t\t}\n\t\tinsertEdgeIntoAET(edge);\n\t\tworkBuffer[GWGETStart] = ((workBuffer[GWGETStart]) + 1);\n\t}\n\treturn 0;\n}\n\n\n/*\tScan the active edge table. If there is any fill that cannot be handled by\n\tthe engine itself, return true. Otherwise handle the fills and return\n\tfalse. \n */\n/*\tself currentYGet >= 680 ifTrue:[\n\tself printAET.\n\tself halt.\n\t].\n */\n\nstatic sqInt\nfindNextExternalFillFromAET(void)\n{\n    sqInt fill;\n    sqInt fill1;\n    sqInt leftEdge;\n    sqInt leftX;\n    sqInt rightEdge;\n    sqInt rightX;\n    sqInt someIntegerValue;\n    sqInt someIntegerValue1;\n    sqInt someIntegerValue11;\n    sqInt someIntegerValue2;\n    sqInt startX;\n    sqInt startX1;\n    sqInt stopX;\n    sqInt stopX1;\n\n\tleftX = rightX = workBuffer[GWFillMaxX];\n\twhile ((workBuffer[GWAETStart]) < (workBuffer[GWAETUsed])) {\n\n\t\t/* TODO: We should check if leftX from last operation \n\t\t\tis  greater than leftX from next edge.\n\t\t\tCurrently, we rely here on spanEndAA\n\t\t\tfrom the span buffer fill. */\n\n\t\tleftEdge = rightEdge = aetBuffer[workBuffer[GWAETStart]];\n\t\tleftX = rightX = objBuffer[leftEdge + GEXValue];\n\t\tif (leftX >= (workBuffer[GWFillMaxX])) {\n\t\t\treturn 0;\n\t\t}\n\t\t/* begin quickRemoveInvalidFillsAt: */\n\t\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\t\tgoto l3;\n\t\t}\n\t\twhile ((topRightX()) <= leftX) {\n\t\t\thideFilldepth(topFill(), topDepth());\n\t\t\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\t\t\tgoto l3;\n\t\t\t}\n\t\t}\n\tl3:\t/* end quickRemoveInvalidFillsAt: */;\n\t\tif ((((objBuffer[leftEdge + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveWide) != 0) {\n\t\t\ttoggleWideFillOf(leftEdge);\n\t\t}\n\t\tif (((objBuffer[leftEdge + GEObjectType]) & GEEdgeFillsInvalid) == 0) {\n\t\t\ttoggleFillsOf(leftEdge);\n\t\t\tif (engineStopped) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\tworkBuffer[GWAETStart] = ((workBuffer[GWAETStart]) + 1);\n\t\tif ((workBuffer[GWAETStart]) < (workBuffer[GWAETUsed])) {\n\t\t\trightEdge = aetBuffer[workBuffer[GWAETStart]];\n\t\t\trightX = objBuffer[rightEdge + GEXValue];\n\t\t\tif (rightX >= (workBuffer[GWFillMinX])) {\n\t\t\t\t/* begin fillAllFrom:to: */\n\t\t\t\t/* begin topFill */\n\t\t\t\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\t\t\t\tfill = 0;\n\t\t\t\t\tgoto l8;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfill = workBuffer[(workBuffer[GWBufferTop]) + (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3)];\n\t\t\t\t\tgoto l8;\n\t\t\t\t}\n\t\t\tl8:\t/* end topFill */;\n\t\t\t\tstartX = leftX;\n\t\t\t\t/* begin topRightX */\n\t\t\t\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\t\t\t\tstopX = 999999999;\n\t\t\t\t\tgoto l9;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tstopX = workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3) + 2)];\n\t\t\t\t\tgoto l9;\n\t\t\t\t}\n\t\t\tl9:\t/* end topRightX */;\n\t\t\t\twhile (stopX < rightX) {\n\t\t\t\t\t/* begin makeUnsignedFrom: */\n\t\t\t\t\t/* begin topFill */\n\t\t\t\t\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\t\t\t\t\tsomeIntegerValue = 0;\n\t\t\t\t\t\tgoto l6;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tsomeIntegerValue = workBuffer[(workBuffer[GWBufferTop]) + (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3)];\n\t\t\t\t\t\tgoto l6;\n\t\t\t\t\t}\n\t\t\t\tl6:\t/* end topFill */;\n\t\t\t\t\tfill = someIntegerValue;\n\t\t\t\t\tif (!(fill == 0)) {\n\t\t\t\t\t\tif (fillSpanfromto(fill, startX, stopX)) {\n\t\t\t\t\t\t\tgoto l2;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t/* begin quickRemoveInvalidFillsAt: */\n\t\t\t\t\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\t\t\t\t\tgoto l1;\n\t\t\t\t\t}\n\t\t\t\t\twhile ((topRightX()) <= stopX) {\n\t\t\t\t\t\thideFilldepth(topFill(), topDepth());\n\t\t\t\t\t\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\t\t\t\t\t\tgoto l1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tl1:\t/* end quickRemoveInvalidFillsAt: */;\n\t\t\t\t\tstartX = stopX;\n\t\t\t\t\t/* begin topRightX */\n\t\t\t\t\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\t\t\t\t\tstopX = 999999999;\n\t\t\t\t\t\tgoto l7;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tstopX = workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3) + 2)];\n\t\t\t\t\t\tgoto l7;\n\t\t\t\t\t}\n\t\t\t\tl7:\t/* end topRightX */;\n\t\t\t\t}\n\t\t\t\t/* begin makeUnsignedFrom: */\n\t\t\t\t/* begin topFill */\n\t\t\t\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\t\t\t\tsomeIntegerValue1 = 0;\n\t\t\t\t\tgoto l10;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tsomeIntegerValue1 = workBuffer[(workBuffer[GWBufferTop]) + (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3)];\n\t\t\t\t\tgoto l10;\n\t\t\t\t}\n\t\t\tl10:\t/* end topFill */;\n\t\t\t\tfill = someIntegerValue1;\n\t\t\t\tif (!(fill == 0)) {\n\t\t\t\t\tfillSpanfromto(fill, startX, rightX);\n\t\t\t\t\tgoto l2;\n\t\t\t\t}\n\t\t\tl2:\t/* end fillAllFrom:to: */;\n\t\t\t}\n\t\t}\n\t}\n\tif (rightX < (workBuffer[GWFillMaxX])) {\n\t\t/* begin fillAllFrom:to: */\n\t\t/* begin topFill */\n\t\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\t\tfill1 = 0;\n\t\t\tgoto l13;\n\t\t}\n\t\telse {\n\t\t\tfill1 = workBuffer[(workBuffer[GWBufferTop]) + (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3)];\n\t\t\tgoto l13;\n\t\t}\n\tl13:\t/* end topFill */;\n\t\tstartX1 = rightX;\n\t\t/* begin topRightX */\n\t\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\t\tstopX1 = 999999999;\n\t\t\tgoto l14;\n\t\t}\n\t\telse {\n\t\t\tstopX1 = workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3) + 2)];\n\t\t\tgoto l14;\n\t\t}\n\tl14:\t/* end topRightX */;\n\t\twhile (stopX1 < (workBuffer[GWFillMaxX])) {\n\t\t\t/* begin makeUnsignedFrom: */\n\t\t\t/* begin topFill */\n\t\t\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\t\t\tsomeIntegerValue2 = 0;\n\t\t\t\tgoto l11;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsomeIntegerValue2 = workBuffer[(workBuffer[GWBufferTop]) + (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3)];\n\t\t\t\tgoto l11;\n\t\t\t}\n\t\tl11:\t/* end topFill */;\n\t\t\tfill1 = someIntegerValue2;\n\t\t\tif (!(fill1 == 0)) {\n\t\t\t\tif (fillSpanfromto(fill1, startX1, stopX1)) {\n\t\t\t\t\tgoto l5;\n\t\t\t\t}\n\t\t\t}\n\t\t\t/* begin quickRemoveInvalidFillsAt: */\n\t\t\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\t\t\tgoto l4;\n\t\t\t}\n\t\t\twhile ((topRightX()) <= stopX1) {\n\t\t\t\thideFilldepth(topFill(), topDepth());\n\t\t\t\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\t\t\t\tgoto l4;\n\t\t\t\t}\n\t\t\t}\n\t\tl4:\t/* end quickRemoveInvalidFillsAt: */;\n\t\t\tstartX1 = stopX1;\n\t\t\t/* begin topRightX */\n\t\t\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\t\t\tstopX1 = 999999999;\n\t\t\t\tgoto l12;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tstopX1 = workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3) + 2)];\n\t\t\t\tgoto l12;\n\t\t\t}\n\t\tl12:\t/* end topRightX */;\n\t\t}\n\t\t/* begin makeUnsignedFrom: */\n\t\t/* begin topFill */\n\t\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\t\tsomeIntegerValue11 = 0;\n\t\t\tgoto l15;\n\t\t}\n\t\telse {\n\t\t\tsomeIntegerValue11 = workBuffer[(workBuffer[GWBufferTop]) + (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3)];\n\t\t\tgoto l15;\n\t\t}\n\tl15:\t/* end topFill */;\n\t\tfill1 = someIntegerValue11;\n\t\tif (!(fill1 == 0)) {\n\t\t\tfillSpanfromto(fill1, startX1, workBuffer[GWFillMaxX]);\n\t\t\tgoto l5;\n\t\t}\n\tl5:\t/* end fillAllFrom:to: */;\n\t}\n\treturn 0;\n}\n\n\n/*\tCheck the active edge table for any entries that cannot be handled by the\n\tengine itself.\n\tIf there are any, return true. Otherwise, step the the edge to the next y\n\tvalue. \n */\n\nstatic sqInt\nfindNextExternalUpdateFromAET(void)\n{\n    sqInt count;\n    sqInt edge;\n    sqInt type;\n\n\twhile ((workBuffer[GWAETStart]) < (workBuffer[GWAETUsed])) {\n\t\tedge = aetBuffer[workBuffer[GWAETStart]];\n\t\tcount = (objBuffer[edge + GENumLines]) - 1;\n\t\tif (count == 0) {\n\t\t\tremoveFirstAETEntry();\n\t\t}\n\t\telse {\n\t\t\tobjBuffer[edge + GENumLines] = count;\n\t\t\ttype = (objBuffer[edge + GEObjectType]) & GEPrimitiveTypeMask;\n\t\t\tif ((type & GEPrimitiveWideMask) == GEPrimitiveEdge) {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tswitch (type) {\n\t\t\tcase 0:\n\t\t\tcase 1:\n\t\t\tcase 2:\n\t\t\tcase 3:\n\t\t\t\terrorWrongIndex();\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tstepToNextLineInat(aetBuffer[workBuffer[GWAETStart]], workBuffer[GWCurrentY]);\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tstepToNextWideLineInat(aetBuffer[workBuffer[GWAETStart]], workBuffer[GWCurrentY]);\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\tstepToNextBezierInat(aetBuffer[workBuffer[GWAETStart]], workBuffer[GWCurrentY]);\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\tstepToNextWideBezier();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tresortFirstAETEntry();\n\t\t\tworkBuffer[GWAETStart] = ((workBuffer[GWAETStart]) + 1);\n\t\t}\n\t}\n\treturn 0;\n}\n\nstatic sqInt\nfindStackFilldepth(sqInt fillIndex, sqInt depth)\n{\n    sqInt index;\n\n\tindex = 0;\n\twhile ((index < ((workBuffer[GWSize]) - (workBuffer[GWBufferTop])))\n && (((workBuffer[(workBuffer[GWBufferTop]) + index]) != fillIndex)\n || ((workBuffer[(workBuffer[GWBufferTop]) + (index + 1)]) != depth))) {\n\t\tindex += 3;\n\t}\n\tif (index >= ((workBuffer[GWSize]) - (workBuffer[GWBufferTop]))) {\n\t\treturn -1;\n\t}\n\telse {\n\t\treturn index;\n\t}\n}\n\n\n/*\tReturn true if processing is finished */\n\nstatic sqInt\nfinishedProcessing(void)\n{\n\treturn (workBuffer[GWState]) == GEStateCompleted;\n}\n\nstatic sqInt\nfirstPointListGet(void)\n{\n\treturn workBuffer[GWPointListFirst];\n}\n\nstatic sqInt\nfirstPointListPut(sqInt value)\n{\n\treturn workBuffer[GWPointListFirst] = value;\n}\n\nstatic sqInt\nfreeStackFillEntry(void)\n{\n\t/* begin wbStackPop: */\n\tworkBuffer[GWBufferTop] = ((workBuffer[GWBufferTop]) + 3);\n}\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\n\n/*\tReturn true if the edge at index i should sort before the edge at index j. */\n\nstatic sqInt\ngetSortsbefore(sqInt edge1, sqInt edge2)\n{\n    sqInt diff;\n\n\tif (edge1 == edge2) {\n\t\treturn 1;\n\t}\n\tdiff = (objBuffer[edge1 + GEYValue]) - (objBuffer[edge2 + GEYValue]);\n\tif (!(diff == 0)) {\n\t\treturn diff < 0;\n\t}\n\tdiff = (objBuffer[edge1 + GEXValue]) - (objBuffer[edge2 + GEXValue]);\n\treturn diff < 0;\n}\n\nstatic sqInt\ngetStartGet(void)\n{\n\treturn workBuffer[GWGETStart];\n}\n\nstatic sqInt\ngetStartPut(sqInt value)\n{\n\treturn workBuffer[GWGETStart] = value;\n}\n\nstatic sqInt\ngetUsedGet(void)\n{\n\treturn workBuffer[GWGETUsed];\n}\n\nstatic sqInt\ngetUsedPut(sqInt value)\n{\n\treturn workBuffer[GWGETUsed] = value;\n}\n\nstatic sqInt\ngradientRampLengthOf(sqInt fill)\n{\n\treturn objBuffer[fill + GFRampLength];\n}\n\nstatic sqInt\ngradientRampLengthOfput(sqInt fill, sqInt value)\n{\n\treturn objBuffer[fill + GFRampLength] = value;\n}\n\nstatic int *\ngradientRampOf(sqInt fill)\n{\n\treturn (objBuffer + fill) + GFRampOffset;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nstatic sqInt\nhasColorTransform(void)\n{\n\treturn (workBuffer[GWHasColorTransform]) != 0;\n}\n\nstatic sqInt\nhasColorTransformGet(void)\n{\n\treturn workBuffer[GWHasColorTransform];\n}\n\nstatic sqInt\nhasColorTransformPut(sqInt value)\n{\n\treturn workBuffer[GWHasColorTransform] = value;\n}\n\nstatic sqInt\nhasEdgeTransform(void)\n{\n\treturn (workBuffer[GWHasEdgeTransform]) != 0;\n}\n\nstatic sqInt\nhasEdgeTransformGet(void)\n{\n\treturn workBuffer[GWHasEdgeTransform];\n}\n\nstatic sqInt\nhasEdgeTransformPut(sqInt value)\n{\n\treturn workBuffer[GWHasEdgeTransform] = value;\n}\n\n\n/*\tMake the fill style with the given index invisible */\n\nstatic sqInt\nhideFilldepth(sqInt fillIndex, sqInt depth)\n{\n    sqInt index;\n    sqInt newDepth;\n    sqInt newRightX;\n    sqInt newTop;\n    sqInt newTopIndex;\n\n\tindex = findStackFilldepth(fillIndex, depth);\n\tif (index == -1) {\n\t\treturn 0;\n\t}\n\tif (index == 0) {\n\t\t/* begin freeStackFillEntry */\n\t\t/* begin wbStackPop: */\n\t\tworkBuffer[GWBufferTop] = ((workBuffer[GWBufferTop]) + 3);\n\t\treturn 1;\n\t}\n\tworkBuffer[(workBuffer[GWBufferTop]) + index] = (workBuffer[(workBuffer[GWBufferTop]) + 0]);\n\tworkBuffer[(workBuffer[GWBufferTop]) + (index + 1)] = (workBuffer[(workBuffer[GWBufferTop]) + (0 + 1)]);\n\tworkBuffer[(workBuffer[GWBufferTop]) + (index + 2)] = (workBuffer[(workBuffer[GWBufferTop]) + (0 + 2)]);\n\t/* begin freeStackFillEntry */\n\t/* begin wbStackPop: */\n\tworkBuffer[GWBufferTop] = ((workBuffer[GWBufferTop]) + 3);\n\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) <= 3) {\n\t\treturn 1;\n\t}\n\tnewTopIndex = 0;\n\tindex = 3;\n\twhile (index < ((workBuffer[GWSize]) - (workBuffer[GWBufferTop]))) {\n\t\tif (fillSortsbefore(index, newTopIndex)) {\n\t\t\tnewTopIndex = index;\n\t\t}\n\t\tindex += 3;\n\t}\n\tif ((newTopIndex + 3) == ((workBuffer[GWSize]) - (workBuffer[GWBufferTop]))) {\n\t\treturn 1;\n\t}\n\tnewTop = workBuffer[(workBuffer[GWBufferTop]) + newTopIndex];\n\tworkBuffer[(workBuffer[GWBufferTop]) + newTopIndex] = (workBuffer[(workBuffer[GWBufferTop]) + (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3)]);\n\tworkBuffer[(workBuffer[GWBufferTop]) + (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3)] = newTop;\n\tnewDepth = workBuffer[(workBuffer[GWBufferTop]) + (newTopIndex + 1)];\n\tworkBuffer[(workBuffer[GWBufferTop]) + (newTopIndex + 1)] = (workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3) + 1)]);\n\tworkBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3) + 1)] = newDepth;\n\tnewRightX = workBuffer[(workBuffer[GWBufferTop]) + (newTopIndex + 2)];\n\tworkBuffer[(workBuffer[GWBufferTop]) + (newTopIndex + 2)] = (workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3) + 2)]);\n\tworkBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3) + 2)] = newRightX;\n\treturn 1;\n}\n\nstatic sqInt\nincrementPointby(int *point, sqInt delta)\n{\n\tpoint[0] = ((point[0]) + delta);\n\tpoint[1] = ((point[1]) + delta);\n}\n\nstatic sqInt\nincrementStatby(sqInt statIndex, sqInt value)\n{\n\treturn workBuffer[statIndex] = ((workBuffer[statIndex]) + value);\n}\n\n\n/*\tFind insertion point for the given edge in the AET */\n\nstatic sqInt\nindexForInsertingIntoAET(sqInt edge)\n{\n    sqInt index;\n    sqInt initialX;\n\n\tinitialX = objBuffer[edge + GEXValue];\n\tindex = 0;\n\twhile ((index < (workBuffer[GWAETUsed]))\n && ((objBuffer[(aetBuffer[index]) + GEXValue]) < initialX)) {\n\t\tindex += 1;\n\t}\n\twhile ((index < (workBuffer[GWAETUsed]))\n && (((objBuffer[(aetBuffer[index]) + GEXValue]) == initialX)\n && (getSortsbefore(aetBuffer[index], edge)))) {\n\t\tindex += 1;\n\t}\n\treturn index;\n}\n\nstatic sqInt\ninitColorTransform(void)\n{\n    float *transform;\n\n\t/* begin colorTransform */\n\ttransform = ((float *) (workBuffer + GWColorTransform));\n\ttransform[0] = (((float) 1.0));\n\ttransform[1] = (((float) 0.0));\n\ttransform[2] = (((float) 1.0));\n\ttransform[3] = (((float) 0.0));\n\ttransform[4] = (((float) 1.0));\n\ttransform[5] = (((float) 0.0));\n\ttransform[6] = (((float) 1.0));\n\ttransform[7] = (((float) 0.0));\n\tworkBuffer[GWHasColorTransform] = 0;\n}\n\nstatic sqInt\ninitEdgeTransform(void)\n{\n    float *transform;\n\n\t/* begin edgeTransform */\n\ttransform = ((float *) (workBuffer + GWEdgeTransform));\n\ttransform[0] = (((float) 1.0));\n\ttransform[1] = (((float) 0.0));\n\ttransform[2] = (((float) 0.0));\n\ttransform[3] = (((float) 0.0));\n\ttransform[4] = (((float) 1.0));\n\ttransform[5] = (((float) 0.0));\n\tworkBuffer[GWHasEdgeTransform] = 0;\n}\n\nEXPORT(sqInt)\ninitialiseModule(void)\n{\n\tloadBBFn = interpreterProxy->ioLoadFunctionFrom(\"loadBitBltFrom\", bbPluginName);\n\tcopyBitsFn = interpreterProxy->ioLoadFunctionFrom(\"copyBitsFromtoat\", bbPluginName);\n\treturn (loadBBFn != 0)\n\t && (copyBitsFn != 0);\n}\n\n\n/*\tInitialization stuff that needs to be done before any processing can take\n\tplace. \n */\n/*\tMake sure aaLevel is initialized */\n\nstatic sqInt\ninitializeGETProcessing(void)\n{\n\tsetAALevel(workBuffer[GWAALevel]);\n\tif ((workBuffer[GWClipMinX]) < 0) {\n\t\tworkBuffer[GWClipMinX] = 0;\n\t}\n\tif ((workBuffer[GWClipMaxX]) > (workBuffer[GWSpanSize])) {\n\t\tworkBuffer[GWClipMaxX] = (workBuffer[GWSpanSize]);\n\t}\n\tworkBuffer[GWFillMinX] = ((workBuffer[GWClipMinX]) << (workBuffer[GWAAShift]));\n\tworkBuffer[GWFillMinY] = ((workBuffer[GWClipMinY]) << (workBuffer[GWAAShift]));\n\tworkBuffer[GWFillMaxX] = ((workBuffer[GWClipMaxX]) << (workBuffer[GWAAShift]));\n\tworkBuffer[GWFillMaxY] = ((workBuffer[GWClipMaxY]) << (workBuffer[GWAAShift]));\n\tworkBuffer[GWGETUsed] = 0;\n\tworkBuffer[GWAETUsed] = 0;\n\tgetBuffer = objBuffer + objUsed;\n\n\t/* Create the global edge table */\n\n\taetBuffer = objBuffer + objUsed;\n\tcreateGlobalEdgeTable();\n\tif (engineStopped) {\n\t\treturn null;\n\t}\n\tif ((workBuffer[GWGETUsed]) == 0) {\n\t\tworkBuffer[GWCurrentY] = (workBuffer[GWFillMaxY]);\n\t\treturn 0;\n\t}\n\t/* begin sortGlobalEdgeTable */\n\tquickSortGlobalEdgeTablefromto(getBuffer, 0, (workBuffer[GWGETUsed]) - 1);\n\tworkBuffer[GWCurrentY] = (objBuffer[(getBuffer[0]) + GEYValue]);\n\tif ((workBuffer[GWCurrentY]) < (workBuffer[GWFillMinY])) {\n\t\tworkBuffer[GWCurrentY] = (workBuffer[GWFillMinY]);\n\t}\n\tworkBuffer[GWSpanStart] = 0;\n\tworkBuffer[GWSpanEnd] = (((workBuffer[GWSpanSize]) << (workBuffer[GWAAShift])) - 1);\n\tclearSpanBuffer();\n}\n\n\n/*\tInsert the edge with the given index from the global edge table into the\n\tactive edge table.\n\tThe edge has already been stepped to the initial yValue -- thus\n\tremainingLines and rasterX\n\tare both set.\n */\n\nstatic sqInt\ninsertEdgeIntoAET(sqInt edge)\n{\n    sqInt index;\n\n\tif ((objBuffer[edge + GENumLines]) <= 0) {\n\t\treturn null;\n\t}\n\n\t/* And insert edge */\n\n\tindex = indexForInsertingIntoAET(edge);\n\tinsertToAETbeforeIndex(edge, index);\n}\n\n\n/*\tInsert the given edge into the AET. */\n\nstatic sqInt\ninsertToAETbeforeIndex(sqInt edge, sqInt index)\n{\n    sqInt i;\n\n\tif (!(needAvailableSpace(1))) {\n\t\treturn null;\n\t}\n\ti = (workBuffer[GWAETUsed]) - 1;\n\twhile (!(i < index)) {\n\t\taetBuffer[i + 1] = (aetBuffer[i]);\n\t\ti -= 1;\n\t}\n\taetBuffer[index] = edge;\n\tworkBuffer[GWAETUsed] = ((workBuffer[GWAETUsed]) + 1);\n}\n\nstatic sqInt\nisBezier(sqInt bezier)\n{\n\treturn (((objBuffer[bezier + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveWideMask) == GEPrimitiveBezier;\n}\n\nstatic sqInt\nisEdge(sqInt edge)\n{\n    sqInt type;\n\n\ttype = (objBuffer[edge + GEObjectType]) & GEPrimitiveTypeMask;\n\tif (type > GEPrimitiveEdgeMask) {\n\t\treturn 0;\n\t}\n\treturn (((objBuffer[edge + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveEdgeMask) != 0;\n}\n\nstatic sqInt\nisFillColor(sqInt fill)\n{\n\treturn (fill & 4278190080UL) != 0;\n}\n\nstatic sqInt\nisFillOkay(sqInt fill)\n{\n\treturn (fill == 0)\n\t || (((fill & 4278190080UL) != 0)\n || (((fill >= 0)\n && (fill < objUsed))\n && (((fill & 4278190080UL) != 0)\n || ((((objBuffer[fill + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveFillMask) != 0))));\n}\n\nstatic sqInt\nisFill(sqInt fill)\n{\n\treturn ((fill & 4278190080UL) != 0)\n\t || ((((objBuffer[fill + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveFillMask) != 0);\n}\n\nstatic sqInt\nisLine(sqInt line)\n{\n\treturn (((objBuffer[line + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveWideMask) == GEPrimitiveLine;\n}\n\nstatic sqInt\nisObject(sqInt obj)\n{\n\treturn (obj >= 0)\n\t && (obj < objUsed);\n}\n\nstatic sqInt\nisRealFill(sqInt fill)\n{\n\treturn (((objBuffer[fill + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveFillMask) != 0;\n}\n\nstatic sqInt\nisStackEntry(sqInt entry)\n{\n\treturn (entry >= (workBuffer[GWBufferTop]))\n\t && (entry < (workBuffer[GWSize]));\n}\n\nstatic sqInt\nisStackIndex(sqInt index)\n{\n\treturn (index >= 0)\n\t && (index < ((workBuffer[GWSize]) - (workBuffer[GWBufferTop])));\n}\n\nstatic sqInt\nisWideBezier(sqInt bezier)\n{\n\treturn ((((objBuffer[bezier + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveWideMask) == GEPrimitiveBezier)\n\t && ((((objBuffer[bezier + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveWide) != 0);\n}\n\nstatic sqInt\nisWideLine(sqInt line)\n{\n\treturn ((((objBuffer[line + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveWideMask) == GEPrimitiveLine)\n\t && ((((objBuffer[line + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveWide) != 0);\n}\n\nstatic sqInt\nisWide(sqInt object)\n{\n\treturn (((objBuffer[object + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveWide) != 0;\n}\n\nstatic sqInt\nlastExportedEdgeGet(void)\n{\n\treturn workBuffer[GWLastExportedEdge];\n}\n\nstatic sqInt\nlastExportedEdgePut(sqInt value)\n{\n\treturn workBuffer[GWLastExportedEdge] = value;\n}\n\nstatic sqInt\nlastExportedFillGet(void)\n{\n\treturn workBuffer[GWLastExportedFill];\n}\n\nstatic sqInt\nlastExportedFillPut(sqInt value)\n{\n\treturn workBuffer[GWLastExportedFill] = value;\n}\n\nstatic sqInt\nlastExportedLeftXGet(void)\n{\n\treturn workBuffer[GWLastExportedLeftX];\n}\n\nstatic sqInt\nlastExportedLeftXPut(sqInt value)\n{\n\treturn workBuffer[GWLastExportedLeftX] = value;\n}\n\nstatic sqInt\nlastExportedRightXGet(void)\n{\n\treturn workBuffer[GWLastExportedRightX];\n}\n\nstatic sqInt\nlastExportedRightXPut(sqInt value)\n{\n\treturn workBuffer[GWLastExportedRightX] = value;\n}\n\nstatic sqInt\nlineEndXOf(sqInt line)\n{\n\treturn objBuffer[line + GLEndX];\n}\n\nstatic sqInt\nlineEndXOfput(sqInt line, sqInt value)\n{\n\treturn objBuffer[line + GLEndX] = value;\n}\n\nstatic sqInt\nlineEndYOf(sqInt line)\n{\n\treturn objBuffer[line + GLEndY];\n}\n\nstatic sqInt\nlineEndYOfput(sqInt line, sqInt value)\n{\n\treturn objBuffer[line + GLEndY] = value;\n}\n\nstatic sqInt\nlineErrorAdjDownOf(sqInt line)\n{\n\treturn objBuffer[line + GLErrorAdjDown];\n}\n\nstatic sqInt\nlineErrorAdjDownOfput(sqInt line, sqInt value)\n{\n\treturn objBuffer[line + GLErrorAdjDown] = value;\n}\n\nstatic sqInt\nlineErrorAdjUpOf(sqInt line)\n{\n\treturn objBuffer[line + GLErrorAdjUp];\n}\n\nstatic sqInt\nlineErrorAdjUpOfput(sqInt line, sqInt value)\n{\n\treturn objBuffer[line + GLErrorAdjUp] = value;\n}\n\nstatic sqInt\nlineErrorOf(sqInt line)\n{\n\treturn objBuffer[line + GLError];\n}\n\nstatic sqInt\nlineErrorOfput(sqInt line, sqInt value)\n{\n\treturn objBuffer[line + GLError] = value;\n}\n\nstatic sqInt\nlineXDirectionOf(sqInt line)\n{\n\treturn objBuffer[line + GLXDirection];\n}\n\nstatic sqInt\nlineXDirectionOfput(sqInt line, sqInt value)\n{\n\treturn objBuffer[line + GLXDirection] = value;\n}\n\nstatic sqInt\nlineXIncrementOf(sqInt line)\n{\n\treturn objBuffer[line + GLXIncrement];\n}\n\nstatic sqInt\nlineXIncrementOfput(sqInt line, sqInt value)\n{\n\treturn objBuffer[line + GLXIncrement] = value;\n}\n\nstatic sqInt\nlineYDirectionOf(sqInt line)\n{\n\treturn objBuffer[line + GLYDirection];\n}\n\nstatic sqInt\nlineYDirectionOfput(sqInt line, sqInt value)\n{\n\treturn objBuffer[line + GLYDirection] = value;\n}\n\n\n/*\tLoad and subdivide the bezier curve from point1/point2/point3.\n\tIf wideFlag is set then make sure the curve is monoton in X. */\n\nstatic sqInt\nloadAndSubdivideBezierFromviatoisWide(int *point1, int *point2, int *point3, sqInt wideFlag)\n{\n    sqInt bz1;\n    sqInt bz2;\n    sqInt index;\n    sqInt index1;\n    sqInt index2;\n\n\t/* begin allocateBezierStackEntry */\n\t/* begin wbStackPush: */\n\tif (!(needAvailableSpace(6))) {\n\t\tgoto l1;\n\t}\n\tworkBuffer[GWBufferTop] = ((workBuffer[GWBufferTop]) - 6);\nl1:\t/* end wbStackPush: */;\n\tbz1 = (workBuffer[GWSize]) - (workBuffer[GWBufferTop]);\n\tif (engineStopped) {\n\t\treturn 0;\n\t}\n\tworkBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - bz1) + 0)] = (point1[0]);\n\tworkBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - bz1) + 1)] = (point1[1]);\n\tworkBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - bz1) + 2)] = (point2[0]);\n\tworkBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - bz1) + 3)] = (point2[1]);\n\tworkBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - bz1) + 4)] = (point3[0]);\n\tworkBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - bz1) + 5)] = (point3[1]);\n\tindex2 = bz2 = subdivideToBeMonotoninX(bz1, wideFlag);\n\tfor (index = bz1; index <= bz2; index += 6) {\n\t\tindex1 = subdivideBezierFrom(index);\n\t\tif (index1 > index2) {\n\t\t\tindex2 = index1;\n\t\t}\n\t\tif (engineStopped) {\n\t\t\treturn 0;\n\t\t}\n\t}\n\treturn index2 / 6;\n}\n\nstatic sqInt\nloadArrayPolygonnPointsfilllineWidthlineFill(sqInt points, sqInt nPoints, sqInt fillIndex, sqInt lineWidth, sqInt lineFill)\n{\n    sqInt i;\n    int *point;\n    int *point1;\n    int *point2;\n    int *point3;\n    float *transform;\n    float *transform1;\n    float *transform2;\n    float *transform3;\n    sqInt x;\n    sqInt x0;\n    sqInt x1;\n    sqInt x2;\n    sqInt x3;\n    sqInt x4;\n    sqInt y;\n    sqInt y0;\n    sqInt y1;\n    sqInt y2;\n    sqInt y3;\n    sqInt y4;\n\n\tloadPointfrom(point1Get(), interpreterProxy->fetchPointerofObject(0, points));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tx0 = (point1Get())[0];\n\ty0 = (point1Get())[1];\n\tfor (i = 1; i <= (nPoints - 1); i += 1) {\n\t\tloadPointfrom(point1Get(), interpreterProxy->fetchPointerofObject(i, points));\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tx1 = (point1Get())[0];\n\t\ty1 = (point1Get())[1];\n\t\t(point1Get())[0] = x0;\n\t\t(point1Get())[1] = y0;\n\t\t(point2Get())[0] = x1;\n\t\t(point2Get())[1] = y1;\n\t\t/* begin transformPoints: */\n\t\tif (2 > 0) {\n\t\t\t/* begin transformPoint: */\n\t\t\t/* begin point1Get */\n\t\t\tpoint = ((int *) (workBuffer + GWPoint1));\n\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t/* begin edgeTransform */\n\t\t\t\ttransform = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\tx = ((sqInt)(((((transform[0]) * (((double) ((((int *) point))[0]) ))) + ((transform[1]) * (((double) ((((int *) point))[1]) )))) + (transform[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\ty = ((sqInt)(((((transform[3]) * (((double) ((((int *) point))[0]) ))) + ((transform[4]) * (((double) ((((int *) point))[1]) )))) + (transform[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t(((int *) point))[0] = x;\n\t\t\t\t(((int *) point))[1] = y;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpoint[0] = (((point[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\tpoint[1] = (((point[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t}\n\t\t}\n\t\tif (2 > 1) {\n\t\t\t/* begin transformPoint: */\n\t\t\t/* begin point2Get */\n\t\t\tpoint1 = ((int *) (workBuffer + GWPoint2));\n\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t/* begin edgeTransform */\n\t\t\t\ttransform1 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\tx2 = ((sqInt)(((((transform1[0]) * (((double) ((((int *) point1))[0]) ))) + ((transform1[1]) * (((double) ((((int *) point1))[1]) )))) + (transform1[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\ty2 = ((sqInt)(((((transform1[3]) * (((double) ((((int *) point1))[0]) ))) + ((transform1[4]) * (((double) ((((int *) point1))[1]) )))) + (transform1[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t(((int *) point1))[0] = x2;\n\t\t\t\t(((int *) point1))[1] = y2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpoint1[0] = (((point1[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\tpoint1[1] = (((point1[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t}\n\t\t}\n\t\tif (2 > 2) {\n\t\t\t/* begin transformPoint: */\n\t\t\t/* begin point3Get */\n\t\t\tpoint2 = ((int *) (workBuffer + GWPoint3));\n\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t/* begin edgeTransform */\n\t\t\t\ttransform2 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\tx3 = ((sqInt)(((((transform2[0]) * (((double) ((((int *) point2))[0]) ))) + ((transform2[1]) * (((double) ((((int *) point2))[1]) )))) + (transform2[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\ty3 = ((sqInt)(((((transform2[3]) * (((double) ((((int *) point2))[0]) ))) + ((transform2[4]) * (((double) ((((int *) point2))[1]) )))) + (transform2[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t(((int *) point2))[0] = x3;\n\t\t\t\t(((int *) point2))[1] = y3;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpoint2[0] = (((point2[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\tpoint2[1] = (((point2[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t}\n\t\t}\n\t\tif (2 > 3) {\n\t\t\t/* begin transformPoint: */\n\t\t\t/* begin point4Get */\n\t\t\tpoint3 = ((int *) (workBuffer + GWPoint4));\n\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t/* begin edgeTransform */\n\t\t\t\ttransform3 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\tx4 = ((sqInt)(((((transform3[0]) * (((double) ((((int *) point3))[0]) ))) + ((transform3[1]) * (((double) ((((int *) point3))[1]) )))) + (transform3[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\ty4 = ((sqInt)(((((transform3[3]) * (((double) ((((int *) point3))[0]) ))) + ((transform3[4]) * (((double) ((((int *) point3))[1]) )))) + (transform3[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t(((int *) point3))[0] = x4;\n\t\t\t\t(((int *) point3))[1] = y4;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpoint3[0] = (((point3[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\tpoint3[1] = (((point3[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t}\n\t\t}\n\t\tloadWideLinefromtolineFillleftFillrightFill(lineWidth, point1Get(), point2Get(), lineFill, fillIndex, 0);\n\t\tif (engineStopped) {\n\t\t\treturn null;\n\t\t}\n\t\tx0 = x1;\n\t\ty0 = y1;\n\t}\n}\n\nstatic sqInt\nloadArrayShapenSegmentsfilllineWidthlineFill(sqInt points, sqInt nSegments, sqInt fillIndex, sqInt lineWidth, sqInt lineFill)\n{\n    sqInt i;\n    int *point;\n    int *point1;\n    int *point2;\n    int *point3;\n    sqInt pointOop;\n    sqInt segs;\n    float *transform;\n    float *transform1;\n    float *transform2;\n    float *transform3;\n    sqInt x;\n    sqInt x0;\n    sqInt x1;\n    sqInt x2;\n    sqInt x3;\n    sqInt x4;\n    sqInt x5;\n    sqInt y;\n    sqInt y0;\n    sqInt y1;\n    sqInt y2;\n    sqInt y3;\n    sqInt y4;\n    sqInt y5;\n\n\tfor (i = 0; i <= (nSegments - 1); i += 1) {\n\t\tpointOop = interpreterProxy->fetchPointerofObject(i * 3, points);\n\t\tloadPointfrom(point1Get(), pointOop);\n\t\tpointOop = interpreterProxy->fetchPointerofObject((i * 3) + 1, points);\n\t\tloadPointfrom(point2Get(), pointOop);\n\t\tpointOop = interpreterProxy->fetchPointerofObject((i * 3) + 2, points);\n\t\tloadPointfrom(point3Get(), pointOop);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\t/* begin transformPoints: */\n\t\tif (3 > 0) {\n\t\t\t/* begin transformPoint: */\n\t\t\t/* begin point1Get */\n\t\t\tpoint = ((int *) (workBuffer + GWPoint1));\n\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t/* begin edgeTransform */\n\t\t\t\ttransform = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\tx = ((sqInt)(((((transform[0]) * (((double) ((((int *) point))[0]) ))) + ((transform[1]) * (((double) ((((int *) point))[1]) )))) + (transform[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\ty = ((sqInt)(((((transform[3]) * (((double) ((((int *) point))[0]) ))) + ((transform[4]) * (((double) ((((int *) point))[1]) )))) + (transform[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t(((int *) point))[0] = x;\n\t\t\t\t(((int *) point))[1] = y;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpoint[0] = (((point[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\tpoint[1] = (((point[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t}\n\t\t}\n\t\tif (3 > 1) {\n\t\t\t/* begin transformPoint: */\n\t\t\t/* begin point2Get */\n\t\t\tpoint1 = ((int *) (workBuffer + GWPoint2));\n\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t/* begin edgeTransform */\n\t\t\t\ttransform1 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\tx3 = ((sqInt)(((((transform1[0]) * (((double) ((((int *) point1))[0]) ))) + ((transform1[1]) * (((double) ((((int *) point1))[1]) )))) + (transform1[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\ty3 = ((sqInt)(((((transform1[3]) * (((double) ((((int *) point1))[0]) ))) + ((transform1[4]) * (((double) ((((int *) point1))[1]) )))) + (transform1[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t(((int *) point1))[0] = x3;\n\t\t\t\t(((int *) point1))[1] = y3;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpoint1[0] = (((point1[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\tpoint1[1] = (((point1[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t}\n\t\t}\n\t\tif (3 > 2) {\n\t\t\t/* begin transformPoint: */\n\t\t\t/* begin point3Get */\n\t\t\tpoint2 = ((int *) (workBuffer + GWPoint3));\n\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t/* begin edgeTransform */\n\t\t\t\ttransform2 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\tx4 = ((sqInt)(((((transform2[0]) * (((double) ((((int *) point2))[0]) ))) + ((transform2[1]) * (((double) ((((int *) point2))[1]) )))) + (transform2[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\ty4 = ((sqInt)(((((transform2[3]) * (((double) ((((int *) point2))[0]) ))) + ((transform2[4]) * (((double) ((((int *) point2))[1]) )))) + (transform2[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t(((int *) point2))[0] = x4;\n\t\t\t\t(((int *) point2))[1] = y4;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpoint2[0] = (((point2[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\tpoint2[1] = (((point2[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t}\n\t\t}\n\t\tif (3 > 3) {\n\t\t\t/* begin transformPoint: */\n\t\t\t/* begin point4Get */\n\t\t\tpoint3 = ((int *) (workBuffer + GWPoint4));\n\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t/* begin edgeTransform */\n\t\t\t\ttransform3 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\tx5 = ((sqInt)(((((transform3[0]) * (((double) ((((int *) point3))[0]) ))) + ((transform3[1]) * (((double) ((((int *) point3))[1]) )))) + (transform3[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\ty5 = ((sqInt)(((((transform3[3]) * (((double) ((((int *) point3))[0]) ))) + ((transform3[4]) * (((double) ((((int *) point3))[1]) )))) + (transform3[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t(((int *) point3))[0] = x5;\n\t\t\t\t(((int *) point3))[1] = y5;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpoint3[0] = (((point3[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\tpoint3[1] = (((point3[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t}\n\t\t}\n\t\tx0 = (point1Get())[0];\n\t\ty0 = (point1Get())[1];\n\t\tx1 = (point2Get())[0];\n\t\ty1 = (point2Get())[1];\n\t\tx2 = (point3Get())[0];\n\n\t\t/* Check if we can use a line */\n\n\t\ty2 = (point3Get())[1];\n\t\tif (((x0 == y0)\n && (x1 == y1))\n\t\t || ((x1 == x2)\n && (y1 == y2))) {\n\t\t\tloadWideLinefromtolineFillleftFillrightFill(lineWidth, point1Get(), point3Get(), lineFill, fillIndex, 0);\n\t\t}\n\t\telse {\n\t\t\tsegs = loadAndSubdivideBezierFromviatoisWide(point1Get(), point2Get(), point3Get(), (lineWidth != 0)\n\t\t\t && (lineFill != 0));\n\t\t\tif (engineStopped) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tloadWideBezierlineFillleftFillrightFilln(lineWidth, lineFill, fillIndex, 0, segs);\n\t\t}\n\t\tif (engineStopped) {\n\t\t\treturn null;\n\t\t}\n\t}\n}\n\n\n/*\tLoad a transformation from the given array. */\n\nstatic sqInt\nloadArrayTransformFromintolength(sqInt transformOop, float *destPtr, sqInt n)\n{\n    sqInt i;\n    sqInt value;\n\n\tfor (i = 0; i <= (n - 1); i += 1) {\n\t\tvalue = interpreterProxy->fetchPointerofObject(i, transformOop);\n\t\tif (!(((value & 1))\n\t\t\t || (interpreterProxy->isFloatObject(value)))) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t\tif ((value & 1)) {\n\t\t\tdestPtr[i] = (((float) (((double) ((value >> 1)) ))));\n\t\t}\n\t\telse {\n\t\t\tdestPtr[i] = (((float) (interpreterProxy->floatValueOf(value))));\n\t\t}\n\t}\n}\n\n\n/*\tInitialize the bezier segment stored on the stack */\n\nstatic sqInt\nloadBeziersegmentleftFillrightFilloffset(sqInt bezier, sqInt index, sqInt leftFillIndex, sqInt rightFillIndex, sqInt yOffset)\n{\n\tif ((workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 5)]) >= (workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 1)])) {\n\t\tobjBuffer[bezier + GEXValue] = (workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 0)]);\n\t\tobjBuffer[bezier + GEYValue] = ((workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 1)]) - yOffset);\n\t\tobjBuffer[bezier + GBViaX] = (workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 2)]);\n\t\tobjBuffer[bezier + GBViaY] = ((workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 3)]) - yOffset);\n\t\tobjBuffer[bezier + GBEndX] = (workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 4)]);\n\t\tobjBuffer[bezier + GBEndY] = ((workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 5)]) - yOffset);\n\t}\n\telse {\n\t\tobjBuffer[bezier + GEXValue] = (workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 4)]);\n\t\tobjBuffer[bezier + GEYValue] = ((workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 5)]) - yOffset);\n\t\tobjBuffer[bezier + GBViaX] = (workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 2)]);\n\t\tobjBuffer[bezier + GBViaY] = ((workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 3)]) - yOffset);\n\t\tobjBuffer[bezier + GBEndX] = (workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 0)]);\n\t\tobjBuffer[bezier + GBEndY] = ((workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 1)]) - yOffset);\n\t}\n\tobjBuffer[bezier + GEZValue] = (workBuffer[GWCurrentZ]);\n\tobjBuffer[bezier + GEFillIndexLeft] = leftFillIndex;\n\tobjBuffer[bezier + GEFillIndexRight] = rightFillIndex;\n}\n\nstatic sqInt\nloadBitBltFrom(sqInt bbObj)\n{\n\tif (loadBBFn == 0) {\n\t\tif (!(initialiseModule())) {\n\t\t\treturn 0;\n\t\t}\n\t}\n\treturn ((sqInt (*)(sqInt))loadBBFn)(bbObj);\n}\n\n\n/*\tLoad the bitmap fill. */\n\nstatic sqInt\nloadBitmapFillcolormaptilefromalongnormalxIndex(sqInt formOop, sqInt cmOop, sqInt tileFlag, int *point1, int *point2, int *point3, sqInt xIndex)\n{\n    sqInt bmBits;\n    sqInt bmBitsSize;\n    sqInt bmDepth;\n    sqInt bmFill;\n    sqInt bmHeight;\n    sqInt bmRaster;\n    sqInt bmWidth;\n    int *cm;\n    int *cmBits;\n    sqInt cmSize;\n    sqInt fill;\n    sqInt fillSize;\n    sqInt i;\n    sqInt ppw;\n\n\tif (cmOop == (interpreterProxy->nilObject())) {\n\t\tcmSize = 0;\n\t\tcmBits = null;\n\t}\n\telse {\n\t\tif (!((interpreterProxy->fetchClassOf(cmOop)) == (interpreterProxy->classBitmap()))) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t\tcmSize = interpreterProxy->slotSizeOf(cmOop);\n\t\tcmBits = interpreterProxy->firstIndexableField(cmOop);\n\t}\n\tif ((formOop & 1)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!(interpreterProxy->isPointers(formOop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif ((interpreterProxy->slotSizeOf(formOop)) < 5) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tbmBits = interpreterProxy->fetchPointerofObject(0, formOop);\n\tif (!((interpreterProxy->fetchClassOf(bmBits)) == (interpreterProxy->classBitmap()))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tbmBitsSize = interpreterProxy->slotSizeOf(bmBits);\n\tbmWidth = interpreterProxy->fetchIntegerofObject(1, formOop);\n\tbmHeight = interpreterProxy->fetchIntegerofObject(2, formOop);\n\tbmDepth = interpreterProxy->fetchIntegerofObject(3, formOop);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!((bmWidth >= 0)\n\t\t && (bmHeight >= 0))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!((((((bmDepth == 32) || (bmDepth == 8)) || (bmDepth == 16)) || (bmDepth == 1)) || (bmDepth == 2)) || (bmDepth == 4))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!((cmSize == 0)\n\t\t || (cmSize == (1 << bmDepth)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tppw = 32 / bmDepth;\n\tbmRaster = (bmWidth + (ppw - 1)) / ppw;\n\tif (!(bmBitsSize == (bmRaster * bmHeight))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\t/* begin allocateBitmapFill:colormap: */\n\tfillSize = GBMBaseSize + cmSize;\n\tif (!(allocateObjEntry(fillSize))) {\n\t\tbmFill = 0;\n\t\tgoto l1;\n\t}\n\tfill = objUsed;\n\tobjUsed = fill + fillSize;\n\tobjBuffer[fill + GEObjectType] = GEPrimitiveClippedBitmapFill;\n\tobjBuffer[fill + GEObjectIndex] = 0;\n\tobjBuffer[fill + GEObjectLength] = fillSize;\n\t/* begin colormapOf: */\n\tcm = (objBuffer + fill) + GBColormapOffset;\n\tif ((workBuffer[GWHasColorTransform]) != 0) {\n\t\tfor (i = 0; i <= (cmSize - 1); i += 1) {\n\t\t\tcm[i] = (transformColor(cmBits[i]));\n\t\t}\n\t}\n\telse {\n\t\tfor (i = 0; i <= (cmSize - 1); i += 1) {\n\t\t\tcm[i] = (cmBits[i]);\n\t\t}\n\t}\n\tobjBuffer[fill + GBColormapSize] = cmSize;\n\tbmFill = fill;\nl1:\t/* end allocateBitmapFill:colormap: */;\n\tif (engineStopped) {\n\t\treturn null;\n\t}\n\tobjBuffer[bmFill + GBBitmapWidth] = bmWidth;\n\tobjBuffer[bmFill + GBBitmapHeight] = bmHeight;\n\tobjBuffer[bmFill + GBBitmapDepth] = bmDepth;\n\tobjBuffer[bmFill + GBBitmapRaster] = bmRaster;\n\tobjBuffer[bmFill + GBBitmapSize] = bmBitsSize;\n\tobjBuffer[bmFill + GBTileFlag] = tileFlag;\n\tobjBuffer[bmFill + GEObjectIndex] = xIndex;\n\tloadFillOrientationfromalongnormalwidthheight(bmFill, point1, point2, point3, bmWidth, bmHeight);\n\treturn bmFill;\n}\n\n\n/*\tNote: Assumes that the contents of formArray has been checked before */\n\nstatic int *\nloadBitsFrom(sqInt bmFill)\n{\n    sqInt bitsLen;\n    sqInt bitsOop;\n    sqInt formOop;\n    sqInt xIndex;\n\n\txIndex = objBuffer[bmFill + GEObjectIndex];\n\tif (xIndex > (interpreterProxy->slotSizeOf(formArray))) {\n\t\treturn null;\n\t}\n\tformOop = interpreterProxy->fetchPointerofObject(xIndex, formArray);\n\tbitsOop = interpreterProxy->fetchPointerofObject(0, formOop);\n\tbitsLen = interpreterProxy->slotSizeOf(bitsOop);\n\tif (!(bitsLen == (objBuffer[bmFill + GBBitmapSize]))) {\n\t\treturn null;\n\t}\n\treturn interpreterProxy->firstIndexableField(bitsOop);\n}\n\n\n/*\tLoad a 2x3 transformation matrix from the given oop.\n\tReturn true if the matrix is not nil, false otherwise */\n\nstatic sqInt\nloadColorTransformFrom(sqInt transformOop)\n{\n    sqInt okay;\n    float *transform;\n\n\t/* begin colorTransform */\n\ttransform = ((float *) (workBuffer + GWColorTransform));\n\tworkBuffer[GWHasColorTransform] = 0;\n\tokay = loadTransformFromintolength(transformOop, transform, 8);\n\tif (!(okay)) {\n\t\treturn 0;\n\t}\n\tworkBuffer[GWHasColorTransform] = 1;\n\ttransform[1] = ((transform[1]) * (((float) 256.0)));\n\ttransform[3] = ((transform[3]) * (((float) 256.0)));\n\ttransform[5] = ((transform[5]) * (((float) 256.0)));\n\ttransform[7] = ((transform[7]) * (((float) 256.0)));\n\treturn okay;\n}\n\n\n/*\tLoad the compressed segment identified by segment index */\n\nstatic sqInt\nloadCompressedSegmentfromshortleftFillrightFilllineWidthlineColor(sqInt segmentIndex, sqInt points, sqInt pointsShort, sqInt leftFill, sqInt rightFill, sqInt lineWidth, sqInt lineFill)\n{\n    sqInt index;\n    int *point;\n    int *point1;\n    int *point2;\n    int *point3;\n    int *point4;\n    int *point5;\n    int *point6;\n    int *point7;\n    sqInt segs;\n    float *transform;\n    float *transform1;\n    float *transform2;\n    float *transform3;\n    float *transform4;\n    float *transform5;\n    float *transform6;\n    float *transform7;\n    sqInt x;\n    sqInt x0;\n    sqInt x1;\n    sqInt x2;\n    sqInt x3;\n    sqInt x4;\n    sqInt x5;\n    sqInt x6;\n    sqInt x7;\n    sqInt x8;\n    sqInt x9;\n    sqInt y;\n    sqInt y0;\n    sqInt y1;\n    sqInt y2;\n    sqInt y3;\n    sqInt y4;\n    sqInt y5;\n    sqInt y6;\n    sqInt y7;\n    sqInt y8;\n    sqInt y9;\n\n\tif ((leftFill == rightFill)\n\t && ((lineWidth == 0)\n || (lineFill == 0))) {\n\t\treturn null;\n\t}\n\n\t/* 3 points with x/y each */\n\n\tindex = segmentIndex * 6;\n\tif (pointsShort) {\n\t\t/* begin loadPointShortAt:from: */\n\t\tx0 = ((short) ((((short *) points))[index + 0]));\n\t\t/* begin loadPointShortAt:from: */\n\t\ty0 = ((short) ((((short *) points))[index + 1]));\n\t\t/* begin loadPointShortAt:from: */\n\t\tx1 = ((short) ((((short *) points))[index + 2]));\n\t\t/* begin loadPointShortAt:from: */\n\t\ty1 = ((short) ((((short *) points))[index + 3]));\n\t\t/* begin loadPointShortAt:from: */\n\t\tx2 = ((short) ((((short *) points))[index + 4]));\n\t\t/* begin loadPointShortAt:from: */\n\t\ty2 = ((short) ((((short *) points))[index + 5]));\n\t}\n\telse {\n\t\tx0 = (((int *) points))[index + 0];\n\t\ty0 = (((int *) points))[index + 1];\n\t\tx1 = (((int *) points))[index + 2];\n\t\ty1 = (((int *) points))[index + 3];\n\t\tx2 = (((int *) points))[index + 4];\n\t\ty2 = (((int *) points))[index + 5];\n\t}\n\tif (((x0 == x1)\n && (y0 == y1))\n\t || ((x1 == x2)\n && (y1 == y2))) {\n\t\tif ((x0 == x2)\n\t\t && (y0 == y2)) {\n\t\t\treturn null;\n\t\t}\n\t\t(point1Get())[0] = x0;\n\t\t(point1Get())[1] = y0;\n\t\t(point2Get())[0] = x2;\n\t\t(point2Get())[1] = y2;\n\t\t/* begin transformPoints: */\n\t\tif (2 > 0) {\n\t\t\t/* begin transformPoint: */\n\t\t\t/* begin point1Get */\n\t\t\tpoint = ((int *) (workBuffer + GWPoint1));\n\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t/* begin edgeTransform */\n\t\t\t\ttransform = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\tx = ((sqInt)(((((transform[0]) * (((double) ((((int *) point))[0]) ))) + ((transform[1]) * (((double) ((((int *) point))[1]) )))) + (transform[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\ty = ((sqInt)(((((transform[3]) * (((double) ((((int *) point))[0]) ))) + ((transform[4]) * (((double) ((((int *) point))[1]) )))) + (transform[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t(((int *) point))[0] = x;\n\t\t\t\t(((int *) point))[1] = y;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpoint[0] = (((point[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\tpoint[1] = (((point[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t}\n\t\t}\n\t\tif (2 > 1) {\n\t\t\t/* begin transformPoint: */\n\t\t\t/* begin point2Get */\n\t\t\tpoint1 = ((int *) (workBuffer + GWPoint2));\n\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t/* begin edgeTransform */\n\t\t\t\ttransform1 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\tx3 = ((sqInt)(((((transform1[0]) * (((double) ((((int *) point1))[0]) ))) + ((transform1[1]) * (((double) ((((int *) point1))[1]) )))) + (transform1[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\ty3 = ((sqInt)(((((transform1[3]) * (((double) ((((int *) point1))[0]) ))) + ((transform1[4]) * (((double) ((((int *) point1))[1]) )))) + (transform1[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t(((int *) point1))[0] = x3;\n\t\t\t\t(((int *) point1))[1] = y3;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpoint1[0] = (((point1[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\tpoint1[1] = (((point1[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t}\n\t\t}\n\t\tif (2 > 2) {\n\t\t\t/* begin transformPoint: */\n\t\t\t/* begin point3Get */\n\t\t\tpoint2 = ((int *) (workBuffer + GWPoint3));\n\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t/* begin edgeTransform */\n\t\t\t\ttransform2 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\tx4 = ((sqInt)(((((transform2[0]) * (((double) ((((int *) point2))[0]) ))) + ((transform2[1]) * (((double) ((((int *) point2))[1]) )))) + (transform2[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\ty4 = ((sqInt)(((((transform2[3]) * (((double) ((((int *) point2))[0]) ))) + ((transform2[4]) * (((double) ((((int *) point2))[1]) )))) + (transform2[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t(((int *) point2))[0] = x4;\n\t\t\t\t(((int *) point2))[1] = y4;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpoint2[0] = (((point2[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\tpoint2[1] = (((point2[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t}\n\t\t}\n\t\tif (2 > 3) {\n\t\t\t/* begin transformPoint: */\n\t\t\t/* begin point4Get */\n\t\t\tpoint3 = ((int *) (workBuffer + GWPoint4));\n\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t/* begin edgeTransform */\n\t\t\t\ttransform3 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\tx5 = ((sqInt)(((((transform3[0]) * (((double) ((((int *) point3))[0]) ))) + ((transform3[1]) * (((double) ((((int *) point3))[1]) )))) + (transform3[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\ty5 = ((sqInt)(((((transform3[3]) * (((double) ((((int *) point3))[0]) ))) + ((transform3[4]) * (((double) ((((int *) point3))[1]) )))) + (transform3[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t(((int *) point3))[0] = x5;\n\t\t\t\t(((int *) point3))[1] = y5;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpoint3[0] = (((point3[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\tpoint3[1] = (((point3[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t}\n\t\t}\n\t\treturn loadWideLinefromtolineFillleftFillrightFill(lineWidth, point1Get(), point2Get(), lineFill, leftFill, rightFill);\n\t}\n\t(point1Get())[0] = x0;\n\t(point1Get())[1] = y0;\n\t(point2Get())[0] = x1;\n\t(point2Get())[1] = y1;\n\t(point3Get())[0] = x2;\n\t(point3Get())[1] = y2;\n\t/* begin transformPoints: */\n\tif (3 > 0) {\n\t\t/* begin transformPoint: */\n\t\t/* begin point1Get */\n\t\tpoint4 = ((int *) (workBuffer + GWPoint1));\n\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t/* begin transformPoint:into: */\n\t\t\t/* begin transformPointX:y:into: */\n\t\t\t/* begin edgeTransform */\n\t\t\ttransform4 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\tx6 = ((sqInt)(((((transform4[0]) * (((double) ((((int *) point4))[0]) ))) + ((transform4[1]) * (((double) ((((int *) point4))[1]) )))) + (transform4[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\ty6 = ((sqInt)(((((transform4[3]) * (((double) ((((int *) point4))[0]) ))) + ((transform4[4]) * (((double) ((((int *) point4))[1]) )))) + (transform4[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t(((int *) point4))[0] = x6;\n\t\t\t(((int *) point4))[1] = y6;\n\t\t}\n\t\telse {\n\t\t\tpoint4[0] = (((point4[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\tpoint4[1] = (((point4[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t}\n\t}\n\tif (3 > 1) {\n\t\t/* begin transformPoint: */\n\t\t/* begin point2Get */\n\t\tpoint5 = ((int *) (workBuffer + GWPoint2));\n\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t/* begin transformPoint:into: */\n\t\t\t/* begin transformPointX:y:into: */\n\t\t\t/* begin edgeTransform */\n\t\t\ttransform5 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\tx7 = ((sqInt)(((((transform5[0]) * (((double) ((((int *) point5))[0]) ))) + ((transform5[1]) * (((double) ((((int *) point5))[1]) )))) + (transform5[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\ty7 = ((sqInt)(((((transform5[3]) * (((double) ((((int *) point5))[0]) ))) + ((transform5[4]) * (((double) ((((int *) point5))[1]) )))) + (transform5[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t(((int *) point5))[0] = x7;\n\t\t\t(((int *) point5))[1] = y7;\n\t\t}\n\t\telse {\n\t\t\tpoint5[0] = (((point5[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\tpoint5[1] = (((point5[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t}\n\t}\n\tif (3 > 2) {\n\t\t/* begin transformPoint: */\n\t\t/* begin point3Get */\n\t\tpoint6 = ((int *) (workBuffer + GWPoint3));\n\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t/* begin transformPoint:into: */\n\t\t\t/* begin transformPointX:y:into: */\n\t\t\t/* begin edgeTransform */\n\t\t\ttransform6 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\tx8 = ((sqInt)(((((transform6[0]) * (((double) ((((int *) point6))[0]) ))) + ((transform6[1]) * (((double) ((((int *) point6))[1]) )))) + (transform6[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\ty8 = ((sqInt)(((((transform6[3]) * (((double) ((((int *) point6))[0]) ))) + ((transform6[4]) * (((double) ((((int *) point6))[1]) )))) + (transform6[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t(((int *) point6))[0] = x8;\n\t\t\t(((int *) point6))[1] = y8;\n\t\t}\n\t\telse {\n\t\t\tpoint6[0] = (((point6[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\tpoint6[1] = (((point6[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t}\n\t}\n\tif (3 > 3) {\n\t\t/* begin transformPoint: */\n\t\t/* begin point4Get */\n\t\tpoint7 = ((int *) (workBuffer + GWPoint4));\n\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t/* begin transformPoint:into: */\n\t\t\t/* begin transformPointX:y:into: */\n\t\t\t/* begin edgeTransform */\n\t\t\ttransform7 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\tx9 = ((sqInt)(((((transform7[0]) * (((double) ((((int *) point7))[0]) ))) + ((transform7[1]) * (((double) ((((int *) point7))[1]) )))) + (transform7[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\ty9 = ((sqInt)(((((transform7[3]) * (((double) ((((int *) point7))[0]) ))) + ((transform7[4]) * (((double) ((((int *) point7))[1]) )))) + (transform7[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t(((int *) point7))[0] = x9;\n\t\t\t(((int *) point7))[1] = y9;\n\t\t}\n\t\telse {\n\t\t\tpoint7[0] = (((point7[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\tpoint7[1] = (((point7[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t}\n\t}\n\tsegs = loadAndSubdivideBezierFromviatoisWide(point1Get(), point2Get(), point3Get(), (lineWidth != 0)\n\t && (lineFill != 0));\n\tif (engineStopped) {\n\t\treturn null;\n\t}\n\tloadWideBezierlineFillleftFillrightFilln(lineWidth, lineFill, leftFill, rightFill, segs);\n}\n\n\n/*\tLoad a compressed shape into the engine.\n\tWARNING: THIS METHOD NEEDS THE FULL FRAME SIZE!!!!\n\t */\n\nstatic sqInt\nloadCompressedShapesegmentsleftFillsrightFillslineWidthslineFillsfillIndexListpointShort(int *points, sqInt nSegments, int *leftFills, int *rightFills, int *lineWidths, int *lineFills, int *fillIndexList, sqInt pointsShort)\n{\n    sqInt i;\n    sqInt index;\n    sqInt leftLength;\n    sqInt leftRun;\n    sqInt leftValue;\n    sqInt lineFillLength;\n    sqInt lineFillRun;\n    sqInt lineFillValue;\n    int *point;\n    int *point1;\n    int *point2;\n    int *point3;\n    int *point4;\n    int *point5;\n    int *point6;\n    int *point7;\n    sqInt rightLength;\n    sqInt rightRun;\n    sqInt rightValue;\n    sqInt segs;\n    float *transform;\n    float *transform1;\n    float *transform2;\n    float *transform3;\n    float *transform4;\n    float *transform5;\n    float *transform6;\n    float *transform7;\n    sqInt widthLength;\n    sqInt widthRun;\n    sqInt widthValue;\n    sqInt x;\n    sqInt x0;\n    sqInt x1;\n    sqInt x2;\n    sqInt x3;\n    sqInt x4;\n    sqInt x5;\n    sqInt x6;\n    sqInt x7;\n    sqInt x8;\n    sqInt x9;\n    sqInt y;\n    sqInt y0;\n    sqInt y1;\n    sqInt y2;\n    sqInt y3;\n    sqInt y4;\n    sqInt y5;\n    sqInt y6;\n    sqInt y7;\n    sqInt y8;\n    sqInt y9;\n\n\tif (nSegments == 0) {\n\t\treturn 0;\n\t}\n\tleftRun = rightRun = widthRun = lineFillRun = -1;\n\tleftLength = rightLength = widthLength = lineFillLength = 1;\n\tleftValue = rightValue = widthValue = lineFillValue = 0;\n\tfor (i = 1; i <= nSegments; i += 1) {\n\t\tif (((leftLength -= 1)) <= 0) {\n\n\t\t\t/* Decrement current run length and load new stuff */\n\n\t\t\tleftRun += 1;\n\t\t\tleftLength = ((usqInt) ((((int *) leftFills))[leftRun]) >> 16);\n\t\t\tleftValue = ((((int *) leftFills))[leftRun]) & 65535;\n\t\t\tif (!(leftValue == 0)) {\n\t\t\t\tleftValue = fillIndexList[leftValue - 1];\n\t\t\t\tleftValue = transformColor(leftValue);\n\t\t\t\tif (engineStopped) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (((rightLength -= 1)) <= 0) {\n\t\t\trightRun += 1;\n\t\t\trightLength = ((usqInt) ((((int *) rightFills))[rightRun]) >> 16);\n\t\t\trightValue = ((((int *) rightFills))[rightRun]) & 65535;\n\t\t\tif (!(rightValue == 0)) {\n\t\t\t\trightValue = fillIndexList[rightValue - 1];\n\t\t\t\trightValue = transformColor(rightValue);\n\t\t\t}\n\t\t}\n\t\tif (((widthLength -= 1)) <= 0) {\n\t\t\twidthRun += 1;\n\t\t\twidthLength = ((usqInt) ((((int *) lineWidths))[widthRun]) >> 16);\n\t\t\twidthValue = ((((int *) lineWidths))[widthRun]) & 65535;\n\t\t\tif (!(widthValue == 0)) {\n\t\t\t\twidthValue = transformWidth(widthValue);\n\t\t\t}\n\t\t}\n\t\tif (((lineFillLength -= 1)) <= 0) {\n\t\t\tlineFillRun += 1;\n\t\t\tlineFillLength = ((usqInt) ((((int *) lineFills))[lineFillRun]) >> 16);\n\t\t\tlineFillValue = ((((int *) lineFills))[lineFillRun]) & 65535;\n\t\t\tif (!(lineFillValue == 0)) {\n\t\t\t\tlineFillValue = fillIndexList[lineFillValue - 1];\n\t\t\t}\n\t\t}\n\t\t/* begin loadCompressedSegment:from:short:leftFill:rightFill:lineWidth:lineColor: */\n\t\tif ((leftValue == rightValue)\n\t\t && ((widthValue == 0)\n || (lineFillValue == 0))) {\n\t\t\tgoto l1;\n\t\t}\n\n\t\t/* 3 points with x/y each */\n\n\t\tindex = (i - 1) * 6;\n\t\tif (pointsShort) {\n\t\t\t/* begin loadPointShortAt:from: */\n\t\t\tx0 = ((short) ((((short *) points))[index + 0]));\n\t\t\t/* begin loadPointShortAt:from: */\n\t\t\ty0 = ((short) ((((short *) points))[index + 1]));\n\t\t\t/* begin loadPointShortAt:from: */\n\t\t\tx1 = ((short) ((((short *) points))[index + 2]));\n\t\t\t/* begin loadPointShortAt:from: */\n\t\t\ty1 = ((short) ((((short *) points))[index + 3]));\n\t\t\t/* begin loadPointShortAt:from: */\n\t\t\tx2 = ((short) ((((short *) points))[index + 4]));\n\t\t\t/* begin loadPointShortAt:from: */\n\t\t\ty2 = ((short) ((((short *) points))[index + 5]));\n\t\t}\n\t\telse {\n\t\t\tx0 = (((int *) points))[index + 0];\n\t\t\ty0 = (((int *) points))[index + 1];\n\t\t\tx1 = (((int *) points))[index + 2];\n\t\t\ty1 = (((int *) points))[index + 3];\n\t\t\tx2 = (((int *) points))[index + 4];\n\t\t\ty2 = (((int *) points))[index + 5];\n\t\t}\n\t\tif (((x0 == x1)\n && (y0 == y1))\n\t\t || ((x1 == x2)\n && (y1 == y2))) {\n\t\t\tif ((x0 == x2)\n\t\t\t && (y0 == y2)) {\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t\t(point1Get())[0] = x0;\n\t\t\t(point1Get())[1] = y0;\n\t\t\t(point2Get())[0] = x2;\n\t\t\t(point2Get())[1] = y2;\n\t\t\t/* begin transformPoints: */\n\t\t\tif (2 > 0) {\n\t\t\t\t/* begin transformPoint: */\n\t\t\t\t/* begin point1Get */\n\t\t\t\tpoint = ((int *) (workBuffer + GWPoint1));\n\t\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t\t/* begin edgeTransform */\n\t\t\t\t\ttransform = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\t\tx = ((sqInt)(((((transform[0]) * (((double) ((((int *) point))[0]) ))) + ((transform[1]) * (((double) ((((int *) point))[1]) )))) + (transform[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t\ty = ((sqInt)(((((transform[3]) * (((double) ((((int *) point))[0]) ))) + ((transform[4]) * (((double) ((((int *) point))[1]) )))) + (transform[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t\t(((int *) point))[0] = x;\n\t\t\t\t\t(((int *) point))[1] = y;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpoint[0] = (((point[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\t\tpoint[1] = (((point[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (2 > 1) {\n\t\t\t\t/* begin transformPoint: */\n\t\t\t\t/* begin point2Get */\n\t\t\t\tpoint1 = ((int *) (workBuffer + GWPoint2));\n\t\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t\t/* begin edgeTransform */\n\t\t\t\t\ttransform1 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\t\tx3 = ((sqInt)(((((transform1[0]) * (((double) ((((int *) point1))[0]) ))) + ((transform1[1]) * (((double) ((((int *) point1))[1]) )))) + (transform1[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t\ty3 = ((sqInt)(((((transform1[3]) * (((double) ((((int *) point1))[0]) ))) + ((transform1[4]) * (((double) ((((int *) point1))[1]) )))) + (transform1[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t\t(((int *) point1))[0] = x3;\n\t\t\t\t\t(((int *) point1))[1] = y3;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpoint1[0] = (((point1[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\t\tpoint1[1] = (((point1[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (2 > 2) {\n\t\t\t\t/* begin transformPoint: */\n\t\t\t\t/* begin point3Get */\n\t\t\t\tpoint2 = ((int *) (workBuffer + GWPoint3));\n\t\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t\t/* begin edgeTransform */\n\t\t\t\t\ttransform2 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\t\tx4 = ((sqInt)(((((transform2[0]) * (((double) ((((int *) point2))[0]) ))) + ((transform2[1]) * (((double) ((((int *) point2))[1]) )))) + (transform2[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t\ty4 = ((sqInt)(((((transform2[3]) * (((double) ((((int *) point2))[0]) ))) + ((transform2[4]) * (((double) ((((int *) point2))[1]) )))) + (transform2[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t\t(((int *) point2))[0] = x4;\n\t\t\t\t\t(((int *) point2))[1] = y4;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpoint2[0] = (((point2[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\t\tpoint2[1] = (((point2[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (2 > 3) {\n\t\t\t\t/* begin transformPoint: */\n\t\t\t\t/* begin point4Get */\n\t\t\t\tpoint3 = ((int *) (workBuffer + GWPoint4));\n\t\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t\t/* begin edgeTransform */\n\t\t\t\t\ttransform3 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\t\tx5 = ((sqInt)(((((transform3[0]) * (((double) ((((int *) point3))[0]) ))) + ((transform3[1]) * (((double) ((((int *) point3))[1]) )))) + (transform3[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t\ty5 = ((sqInt)(((((transform3[3]) * (((double) ((((int *) point3))[0]) ))) + ((transform3[4]) * (((double) ((((int *) point3))[1]) )))) + (transform3[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t\t(((int *) point3))[0] = x5;\n\t\t\t\t\t(((int *) point3))[1] = y5;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpoint3[0] = (((point3[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\t\tpoint3[1] = (((point3[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t\t}\n\t\t\t}\n\t\t\tloadWideLinefromtolineFillleftFillrightFill(widthValue, point1Get(), point2Get(), lineFillValue, leftValue, rightValue);\n\t\t\tgoto l1;\n\t\t}\n\t\t(point1Get())[0] = x0;\n\t\t(point1Get())[1] = y0;\n\t\t(point2Get())[0] = x1;\n\t\t(point2Get())[1] = y1;\n\t\t(point3Get())[0] = x2;\n\t\t(point3Get())[1] = y2;\n\t\t/* begin transformPoints: */\n\t\tif (3 > 0) {\n\t\t\t/* begin transformPoint: */\n\t\t\t/* begin point1Get */\n\t\t\tpoint4 = ((int *) (workBuffer + GWPoint1));\n\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t/* begin edgeTransform */\n\t\t\t\ttransform4 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\tx6 = ((sqInt)(((((transform4[0]) * (((double) ((((int *) point4))[0]) ))) + ((transform4[1]) * (((double) ((((int *) point4))[1]) )))) + (transform4[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\ty6 = ((sqInt)(((((transform4[3]) * (((double) ((((int *) point4))[0]) ))) + ((transform4[4]) * (((double) ((((int *) point4))[1]) )))) + (transform4[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t(((int *) point4))[0] = x6;\n\t\t\t\t(((int *) point4))[1] = y6;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpoint4[0] = (((point4[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\tpoint4[1] = (((point4[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t}\n\t\t}\n\t\tif (3 > 1) {\n\t\t\t/* begin transformPoint: */\n\t\t\t/* begin point2Get */\n\t\t\tpoint5 = ((int *) (workBuffer + GWPoint2));\n\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t/* begin edgeTransform */\n\t\t\t\ttransform5 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\tx7 = ((sqInt)(((((transform5[0]) * (((double) ((((int *) point5))[0]) ))) + ((transform5[1]) * (((double) ((((int *) point5))[1]) )))) + (transform5[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\ty7 = ((sqInt)(((((transform5[3]) * (((double) ((((int *) point5))[0]) ))) + ((transform5[4]) * (((double) ((((int *) point5))[1]) )))) + (transform5[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t(((int *) point5))[0] = x7;\n\t\t\t\t(((int *) point5))[1] = y7;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpoint5[0] = (((point5[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\tpoint5[1] = (((point5[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t}\n\t\t}\n\t\tif (3 > 2) {\n\t\t\t/* begin transformPoint: */\n\t\t\t/* begin point3Get */\n\t\t\tpoint6 = ((int *) (workBuffer + GWPoint3));\n\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t/* begin edgeTransform */\n\t\t\t\ttransform6 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\tx8 = ((sqInt)(((((transform6[0]) * (((double) ((((int *) point6))[0]) ))) + ((transform6[1]) * (((double) ((((int *) point6))[1]) )))) + (transform6[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\ty8 = ((sqInt)(((((transform6[3]) * (((double) ((((int *) point6))[0]) ))) + ((transform6[4]) * (((double) ((((int *) point6))[1]) )))) + (transform6[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t(((int *) point6))[0] = x8;\n\t\t\t\t(((int *) point6))[1] = y8;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpoint6[0] = (((point6[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\tpoint6[1] = (((point6[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t}\n\t\t}\n\t\tif (3 > 3) {\n\t\t\t/* begin transformPoint: */\n\t\t\t/* begin point4Get */\n\t\t\tpoint7 = ((int *) (workBuffer + GWPoint4));\n\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t/* begin edgeTransform */\n\t\t\t\ttransform7 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\tx9 = ((sqInt)(((((transform7[0]) * (((double) ((((int *) point7))[0]) ))) + ((transform7[1]) * (((double) ((((int *) point7))[1]) )))) + (transform7[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\ty9 = ((sqInt)(((((transform7[3]) * (((double) ((((int *) point7))[0]) ))) + ((transform7[4]) * (((double) ((((int *) point7))[1]) )))) + (transform7[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t(((int *) point7))[0] = x9;\n\t\t\t\t(((int *) point7))[1] = y9;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpoint7[0] = (((point7[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\tpoint7[1] = (((point7[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t}\n\t\t}\n\t\tsegs = loadAndSubdivideBezierFromviatoisWide(point1Get(), point2Get(), point3Get(), (widthValue != 0)\n\t\t && (lineFillValue != 0));\n\t\tif (engineStopped) {\n\t\t\tgoto l1;\n\t\t}\n\t\tloadWideBezierlineFillleftFillrightFilln(widthValue, lineFillValue, leftValue, rightValue, segs);\n\tl1:\t/* end loadCompressedSegment:from:short:leftFill:rightFill:lineWidth:lineColor: */;\n\t\tif (engineStopped) {\n\t\t\treturn null;\n\t\t}\n\t}\n}\n\nstatic sqInt\nloadEdgeStateFrom(sqInt edgeOop)\n{\n    sqInt edge;\n    sqInt value;\n    sqInt value1;\n    sqInt value2;\n    sqInt value3;\n\n\tedge = workBuffer[GWLastExportedEdge];\n\tif ((interpreterProxy->slotSizeOf(edgeOop)) < ETBalloonEdgeDataSize) {\n\t\treturn null;\n\t}\n\t/* begin edgeXValueOf:put: */\n\tvalue = interpreterProxy->fetchIntegerofObject(ETXValueIndex, edgeOop);\n\tobjBuffer[edge + GEXValue] = value;\n\t/* begin edgeYValueOf:put: */\n\tvalue1 = interpreterProxy->fetchIntegerofObject(ETYValueIndex, edgeOop);\n\tobjBuffer[edge + GEYValue] = value1;\n\t/* begin edgeZValueOf:put: */\n\tvalue2 = interpreterProxy->fetchIntegerofObject(ETZValueIndex, edgeOop);\n\tobjBuffer[edge + GEZValue] = value2;\n\t/* begin edgeNumLinesOf:put: */\n\tvalue3 = interpreterProxy->fetchIntegerofObject(ETLinesIndex, edgeOop);\n\tobjBuffer[edge + GENumLines] = value3;\n\treturn edge;\n}\n\n\n/*\tLoad a 2x3 transformation matrix from the given oop.\n\tReturn true if the matrix is not nil, false otherwise */\n\nstatic sqInt\nloadEdgeTransformFrom(sqInt transformOop)\n{\n    sqInt okay;\n    float *transform;\n\n\tworkBuffer[GWHasEdgeTransform] = 0;\n\t/* begin edgeTransform */\n\ttransform = ((float *) (workBuffer + GWEdgeTransform));\n\tokay = loadTransformFromintolength(transformOop, transform, 6);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!(okay)) {\n\t\treturn 0;\n\t}\n\tworkBuffer[GWHasEdgeTransform] = 1;\n\ttransform[2] = (((float) ((transform[2]) + (((double) (workBuffer[GWDestOffsetX]) )))));\n\ttransform[5] = (((float) ((transform[5]) + (((double) (workBuffer[GWDestOffsetY]) )))));\n\treturn 1;\n}\n\n\n/*\tTransform the points */\n\nstatic sqInt\nloadFillOrientationfromalongnormalwidthheight(sqInt fill, int *point1, int *point2, int *point3, sqInt fillWidth, sqInt fillHeight)\n{\n    sqInt dirX;\n    sqInt dirY;\n    sqInt dsLength2;\n    sqInt dsX;\n    sqInt dsY;\n    sqInt dtLength2;\n    sqInt dtX;\n    sqInt dtY;\n    sqInt nrmX;\n    sqInt nrmY;\n    float *transform;\n    float *transform1;\n    float *transform2;\n    sqInt x;\n    sqInt x1;\n    sqInt x2;\n    sqInt y;\n    sqInt y1;\n    sqInt y2;\n\n\tpoint2[0] = ((point2[0]) + (point1[0]));\n\tpoint2[1] = ((point2[1]) + (point1[1]));\n\tpoint3[0] = ((point3[0]) + (point1[0]));\n\tpoint3[1] = ((point3[1]) + (point1[1]));\n\t/* begin transformPoint: */\n\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t/* begin transformPoint:into: */\n\t\t/* begin transformPointX:y:into: */\n\t\t/* begin edgeTransform */\n\t\ttransform = ((float *) (workBuffer + GWEdgeTransform));\n\t\tx = ((sqInt)(((((transform[0]) * (((double) ((((int *) point1))[0]) ))) + ((transform[1]) * (((double) ((((int *) point1))[1]) )))) + (transform[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\ty = ((sqInt)(((((transform[3]) * (((double) ((((int *) point1))[0]) ))) + ((transform[4]) * (((double) ((((int *) point1))[1]) )))) + (transform[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t(((int *) point1))[0] = x;\n\t\t(((int *) point1))[1] = y;\n\t}\n\telse {\n\t\tpoint1[0] = (((point1[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\tpoint1[1] = (((point1[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t}\n\t/* begin transformPoint: */\n\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t/* begin transformPoint:into: */\n\t\t/* begin transformPointX:y:into: */\n\t\t/* begin edgeTransform */\n\t\ttransform1 = ((float *) (workBuffer + GWEdgeTransform));\n\t\tx1 = ((sqInt)(((((transform1[0]) * (((double) ((((int *) point2))[0]) ))) + ((transform1[1]) * (((double) ((((int *) point2))[1]) )))) + (transform1[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\ty1 = ((sqInt)(((((transform1[3]) * (((double) ((((int *) point2))[0]) ))) + ((transform1[4]) * (((double) ((((int *) point2))[1]) )))) + (transform1[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t(((int *) point2))[0] = x1;\n\t\t(((int *) point2))[1] = y1;\n\t}\n\telse {\n\t\tpoint2[0] = (((point2[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\tpoint2[1] = (((point2[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t}\n\t/* begin transformPoint: */\n\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t/* begin transformPoint:into: */\n\t\t/* begin transformPointX:y:into: */\n\t\t/* begin edgeTransform */\n\t\ttransform2 = ((float *) (workBuffer + GWEdgeTransform));\n\t\tx2 = ((sqInt)(((((transform2[0]) * (((double) ((((int *) point3))[0]) ))) + ((transform2[1]) * (((double) ((((int *) point3))[1]) )))) + (transform2[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\ty2 = ((sqInt)(((((transform2[3]) * (((double) ((((int *) point3))[0]) ))) + ((transform2[4]) * (((double) ((((int *) point3))[1]) )))) + (transform2[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t(((int *) point3))[0] = x2;\n\t\t(((int *) point3))[1] = y2;\n\t}\n\telse {\n\t\tpoint3[0] = (((point3[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\tpoint3[1] = (((point3[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t}\n\tdirX = (point2[0]) - (point1[0]);\n\tdirY = (point2[1]) - (point1[1]);\n\tnrmX = (point3[0]) - (point1[0]);\n\n\t/* Compute the scale from direction/normal into ramp size */\n\n\tnrmY = (point3[1]) - (point1[1]);\n\tdsLength2 = (dirX * dirX) + (dirY * dirY);\n\tif (dsLength2 > 0) {\n\t\tdsX = ((sqInt)((((((double) dirX )) * (((double) fillWidth ))) * 65536.0) / (((double) dsLength2 ))));\n\t\tdsY = ((sqInt)((((((double) dirY )) * (((double) fillWidth ))) * 65536.0) / (((double) dsLength2 ))));\n\t}\n\telse {\n\t\tdsX = 0;\n\t\tdsY = 0;\n\t}\n\tdtLength2 = (nrmX * nrmX) + (nrmY * nrmY);\n\tif (dtLength2 > 0) {\n\t\tdtX = ((sqInt)((((((double) nrmX )) * (((double) fillHeight ))) * 65536.0) / (((double) dtLength2 ))));\n\t\tdtY = ((sqInt)((((((double) nrmY )) * (((double) fillHeight ))) * 65536.0) / (((double) dtLength2 ))));\n\t}\n\telse {\n\t\tdtX = 0;\n\t\tdtY = 0;\n\t}\n\tobjBuffer[fill + GFOriginX] = (point1[0]);\n\tobjBuffer[fill + GFOriginY] = (point1[1]);\n\tobjBuffer[fill + GFDirectionX] = dsX;\n\tobjBuffer[fill + GFDirectionY] = dsY;\n\tobjBuffer[fill + GFNormalX] = dtX;\n\tobjBuffer[fill + GFNormalY] = dtY;\n}\n\n\n/*\tCheck all the forms from arrayOop. */\n\nstatic sqInt\nloadFormsFrom(sqInt arrayOop)\n{\n    sqInt bmBits;\n    sqInt bmBitsSize;\n    sqInt bmDepth;\n    sqInt bmHeight;\n    sqInt bmRaster;\n    sqInt bmWidth;\n    sqInt formOop;\n    sqInt i;\n    sqInt ppw;\n\n\tif (!(interpreterProxy->isArray(arrayOop))) {\n\t\treturn 0;\n\t}\n\tformArray = arrayOop;\n\tfor (i = 0; i <= ((interpreterProxy->slotSizeOf(formArray)) - 1); i += 1) {\n\t\tformOop = interpreterProxy->fetchPointerofObject(i, formArray);\n\t\tif ((formOop & 1)) {\n\t\t\treturn 0;\n\t\t}\n\t\tif (!(interpreterProxy->isPointers(formOop))) {\n\t\t\treturn 0;\n\t\t}\n\t\tif ((interpreterProxy->slotSizeOf(formOop)) < 5) {\n\t\t\treturn 0;\n\t\t}\n\t\tbmBits = interpreterProxy->fetchPointerofObject(0, formOop);\n\t\tif (!((interpreterProxy->fetchClassOf(bmBits)) == (interpreterProxy->classBitmap()))) {\n\t\t\treturn 0;\n\t\t}\n\t\tbmBitsSize = interpreterProxy->slotSizeOf(bmBits);\n\t\tbmWidth = interpreterProxy->fetchIntegerofObject(1, formOop);\n\t\tbmHeight = interpreterProxy->fetchIntegerofObject(2, formOop);\n\t\tbmDepth = interpreterProxy->fetchIntegerofObject(3, formOop);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn 0;\n\t\t}\n\t\tif (!((bmWidth >= 0)\n\t\t\t && (bmHeight >= 0))) {\n\t\t\treturn 0;\n\t\t}\n\t\tppw = 32 / bmDepth;\n\t\tbmRaster = (bmWidth + (ppw - 1)) / ppw;\n\t\tif (!(bmBitsSize == (bmRaster * bmHeight))) {\n\t\t\treturn 0;\n\t\t}\n\t}\n\treturn 1;\n}\n\n\n/*\tLoad the gradient fill as defined by the color ramp. */\n\nstatic sqInt\nloadGradientFillfromalongnormalisRadial(sqInt rampOop, int *point1, int *point2, int *point3, sqInt isRadial)\n{\n    sqInt fill;\n    sqInt fill1;\n    sqInt fillSize;\n    sqInt i;\n    int *ramp;\n    int *rampPtr;\n    sqInt rampWidth;\n\n\tif (!((interpreterProxy->fetchClassOf(rampOop)) == (interpreterProxy->classBitmap()))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\trampWidth = interpreterProxy->slotSizeOf(rampOop);\n\t/* begin allocateGradientFill:rampWidth:isRadial: */\n\tramp = interpreterProxy->firstIndexableField(rampOop);\n\tfillSize = GGBaseSize + rampWidth;\n\tif (!(allocateObjEntry(fillSize))) {\n\t\tfill = 0;\n\t\tgoto l1;\n\t}\n\tfill1 = objUsed;\n\tobjUsed = fill1 + fillSize;\n\tif (isRadial) {\n\t\tobjBuffer[fill1 + GEObjectType] = GEPrimitiveRadialGradientFill;\n\t}\n\telse {\n\t\tobjBuffer[fill1 + GEObjectType] = GEPrimitiveLinearGradientFill;\n\t}\n\tobjBuffer[fill1 + GEObjectIndex] = 0;\n\tobjBuffer[fill1 + GEObjectLength] = fillSize;\n\t/* begin gradientRampOf: */\n\trampPtr = (objBuffer + fill1) + GFRampOffset;\n\tif ((workBuffer[GWHasColorTransform]) != 0) {\n\t\tfor (i = 0; i <= (rampWidth - 1); i += 1) {\n\t\t\trampPtr[i] = (transformColor(ramp[i]));\n\t\t}\n\t}\n\telse {\n\t\tfor (i = 0; i <= (rampWidth - 1); i += 1) {\n\t\t\trampPtr[i] = (ramp[i]);\n\t\t}\n\t}\n\tobjBuffer[fill1 + GFRampLength] = rampWidth;\n\tfill = fill1;\nl1:\t/* end allocateGradientFill:rampWidth:isRadial: */;\n\tif (engineStopped) {\n\t\treturn null;\n\t}\n\tloadFillOrientationfromalongnormalwidthheight(fill, point1, point2, point3, rampWidth, rampWidth);\n\treturn fill;\n}\n\n\n/*\tLoad the line defined by point1 and point2. */\n\nstatic sqInt\nloadLinefromtooffsetleftFillrightFill(sqInt line, int *point1, int *point2, sqInt yOffset, sqInt leftFill, sqInt rightFill)\n{\n    int *p1;\n    int *p2;\n    sqInt yDir;\n\n\tif ((point1[1]) <= (point2[1])) {\n\t\tp1 = point1;\n\t\tp2 = point2;\n\t\tyDir = 1;\n\t}\n\telse {\n\t\tp1 = point2;\n\t\tp2 = point1;\n\t\tyDir = -1;\n\t}\n\tobjBuffer[line + GEXValue] = (p1[0]);\n\tobjBuffer[line + GEYValue] = ((p1[1]) - yOffset);\n\tobjBuffer[line + GEZValue] = (workBuffer[GWCurrentZ]);\n\tobjBuffer[line + GEFillIndexLeft] = leftFill;\n\tobjBuffer[line + GEFillIndexRight] = rightFill;\n\tobjBuffer[line + GLEndX] = (p2[0]);\n\tobjBuffer[line + GLEndY] = ((p2[1]) - yOffset);\n\tobjBuffer[line + GLYDirection] = yDir;\n}\n\nstatic sqInt\nloadOvalSegmentwhcxcy(sqInt seg, sqInt w, sqInt h, sqInt cx, sqInt cy)\n{\n    sqInt x0;\n    sqInt x1;\n    sqInt x2;\n    sqInt y0;\n    sqInt y1;\n    sqInt y2;\n\n\n\t/* Load start point of segment */\n\n\tx0 = ((sqInt)((((circleCosTable())[(seg * 2) + 0]) * (((double) w ))) + cx));\n\ty0 = ((sqInt)((((circleSinTable())[(seg * 2) + 0]) * (((double) h ))) + cy));\n\t(point1Get())[0] = x0;\n\t(point1Get())[1] = y0;\n\tx2 = ((sqInt)((((circleCosTable())[(seg * 2) + 2]) * (((double) w ))) + cx));\n\ty2 = ((sqInt)((((circleSinTable())[(seg * 2) + 2]) * (((double) h ))) + cy));\n\t(point3Get())[0] = x2;\n\t(point3Get())[1] = y2;\n\tx1 = ((sqInt)((((circleCosTable())[(seg * 2) + 1]) * (((double) w ))) + cx));\n\n\t/* NOTE: The intermediate point is the point ON the curve\n\tand not yet the control point (which is OFF the curve) */\n\n\ty1 = ((sqInt)((((circleSinTable())[(seg * 2) + 1]) * (((double) h ))) + cy));\n\tx1 = (x1 * 2) - (((sqInt) (x0 + x2) >> 1));\n\ty1 = (y1 * 2) - (((sqInt) (y0 + y2) >> 1));\n\t(point2Get())[0] = x1;\n\t(point2Get())[1] = y1;\n}\n\n\n/*\tLoad a rectangular oval currently defined by point1/point2 */\n\nstatic sqInt\nloadOvallineFillleftFillrightFill(sqInt lineWidth, sqInt lineFill, sqInt leftFill, sqInt rightFill)\n{\n    sqInt cx;\n    sqInt cy;\n    sqInt h;\n    sqInt i;\n    sqInt nSegments;\n    int *point;\n    int *point1;\n    int *point2;\n    int *point3;\n    float *transform;\n    float *transform1;\n    float *transform2;\n    float *transform3;\n    sqInt w;\n    sqInt x;\n    sqInt x1;\n    sqInt x2;\n    sqInt x3;\n    sqInt y;\n    sqInt y1;\n    sqInt y2;\n    sqInt y3;\n\n\tw = ((sqInt) (((point2Get())[0]) - ((point1Get())[0])) >> 1);\n\th = ((sqInt) (((point2Get())[1]) - ((point1Get())[1])) >> 1);\n\tcx = ((sqInt) (((point2Get())[0]) + ((point1Get())[0])) >> 1);\n\tcy = ((sqInt) (((point2Get())[1]) + ((point1Get())[1])) >> 1);\n\tfor (i = 0; i <= 15; i += 1) {\n\t\tloadOvalSegmentwhcxcy(i, w, h, cx, cy);\n\t\t/* begin transformPoints: */\n\t\tif (3 > 0) {\n\t\t\t/* begin transformPoint: */\n\t\t\t/* begin point1Get */\n\t\t\tpoint = ((int *) (workBuffer + GWPoint1));\n\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t/* begin edgeTransform */\n\t\t\t\ttransform = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\tx = ((sqInt)(((((transform[0]) * (((double) ((((int *) point))[0]) ))) + ((transform[1]) * (((double) ((((int *) point))[1]) )))) + (transform[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\ty = ((sqInt)(((((transform[3]) * (((double) ((((int *) point))[0]) ))) + ((transform[4]) * (((double) ((((int *) point))[1]) )))) + (transform[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t(((int *) point))[0] = x;\n\t\t\t\t(((int *) point))[1] = y;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpoint[0] = (((point[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\tpoint[1] = (((point[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t}\n\t\t}\n\t\tif (3 > 1) {\n\t\t\t/* begin transformPoint: */\n\t\t\t/* begin point2Get */\n\t\t\tpoint1 = ((int *) (workBuffer + GWPoint2));\n\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t/* begin edgeTransform */\n\t\t\t\ttransform1 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\tx1 = ((sqInt)(((((transform1[0]) * (((double) ((((int *) point1))[0]) ))) + ((transform1[1]) * (((double) ((((int *) point1))[1]) )))) + (transform1[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\ty1 = ((sqInt)(((((transform1[3]) * (((double) ((((int *) point1))[0]) ))) + ((transform1[4]) * (((double) ((((int *) point1))[1]) )))) + (transform1[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t(((int *) point1))[0] = x1;\n\t\t\t\t(((int *) point1))[1] = y1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpoint1[0] = (((point1[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\tpoint1[1] = (((point1[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t}\n\t\t}\n\t\tif (3 > 2) {\n\t\t\t/* begin transformPoint: */\n\t\t\t/* begin point3Get */\n\t\t\tpoint2 = ((int *) (workBuffer + GWPoint3));\n\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t/* begin edgeTransform */\n\t\t\t\ttransform2 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\tx2 = ((sqInt)(((((transform2[0]) * (((double) ((((int *) point2))[0]) ))) + ((transform2[1]) * (((double) ((((int *) point2))[1]) )))) + (transform2[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\ty2 = ((sqInt)(((((transform2[3]) * (((double) ((((int *) point2))[0]) ))) + ((transform2[4]) * (((double) ((((int *) point2))[1]) )))) + (transform2[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t(((int *) point2))[0] = x2;\n\t\t\t\t(((int *) point2))[1] = y2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpoint2[0] = (((point2[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\tpoint2[1] = (((point2[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t}\n\t\t}\n\t\tif (3 > 3) {\n\t\t\t/* begin transformPoint: */\n\t\t\t/* begin point4Get */\n\t\t\tpoint3 = ((int *) (workBuffer + GWPoint4));\n\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t/* begin edgeTransform */\n\t\t\t\ttransform3 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\tx3 = ((sqInt)(((((transform3[0]) * (((double) ((((int *) point3))[0]) ))) + ((transform3[1]) * (((double) ((((int *) point3))[1]) )))) + (transform3[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\ty3 = ((sqInt)(((((transform3[3]) * (((double) ((((int *) point3))[0]) ))) + ((transform3[4]) * (((double) ((((int *) point3))[1]) )))) + (transform3[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t(((int *) point3))[0] = x3;\n\t\t\t\t(((int *) point3))[1] = y3;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpoint3[0] = (((point3[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\tpoint3[1] = (((point3[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t}\n\t\t}\n\t\tnSegments = loadAndSubdivideBezierFromviatoisWide(point1Get(), point2Get(), point3Get(), (lineWidth != 0)\n\t\t && (lineFill != 0));\n\t\tif (engineStopped) {\n\t\t\treturn null;\n\t\t}\n\t\tloadWideBezierlineFillleftFillrightFilln(lineWidth, lineFill, leftFill, rightFill, nSegments);\n\t\tif (engineStopped) {\n\t\t\treturn null;\n\t\t}\n\t}\n}\n\n\n/*\tLoad the int value from the given index in intArray */\n\nstatic sqInt\nloadPointIntAtfrom(sqInt index, sqInt intArray)\n{\n\treturn (((int *) intArray))[index];\n}\n\n\n/*\tLoad the short value from the given index in shortArray */\n\nstatic short\nloadPointShortAtfrom(sqInt index, sqInt shortArray)\n{\n\treturn (((short *) shortArray))[index];\n}\n\n\n/*\tLoad the contents of pointOop into pointArray */\n\nstatic sqInt\nloadPointfrom(int *pointArray, sqInt pointOop)\n{\n    sqInt value;\n\n\tif (!((interpreterProxy->fetchClassOf(pointOop)) == (interpreterProxy->classPoint()))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tvalue = interpreterProxy->fetchPointerofObject(0, pointOop);\n\tif (!(((value & 1))\n\t\t || (interpreterProxy->isFloatObject(value)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif ((value & 1)) {\n\t\tpointArray[0] = ((value >> 1));\n\t}\n\telse {\n\t\tpointArray[0] = (((sqInt)(interpreterProxy->floatValueOf(value))));\n\t}\n\tvalue = interpreterProxy->fetchPointerofObject(1, pointOop);\n\tif (!(((value & 1))\n\t\t || (interpreterProxy->isFloatObject(value)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif ((value & 1)) {\n\t\tpointArray[1] = ((value >> 1));\n\t}\n\telse {\n\t\tpointArray[1] = (((sqInt)(interpreterProxy->floatValueOf(value))));\n\t}\n}\n\nstatic sqInt\nloadPolygonnPointsfilllineWidthlineFillpointsShort(int *points, sqInt nPoints, sqInt fillIndex, sqInt lineWidth, sqInt lineFill, sqInt isShort)\n{\n    sqInt i;\n    int *point;\n    int *point1;\n    int *point2;\n    int *point3;\n    float *transform;\n    float *transform1;\n    float *transform2;\n    float *transform3;\n    sqInt x;\n    sqInt x0;\n    sqInt x1;\n    sqInt x2;\n    sqInt x3;\n    sqInt x4;\n    sqInt y;\n    sqInt y0;\n    sqInt y1;\n    sqInt y2;\n    sqInt y3;\n    sqInt y4;\n\n\tif (isShort) {\n\t\t/* begin loadPointShortAt:from: */\n\t\tx0 = ((short) ((((short *) points))[0]));\n\t\t/* begin loadPointShortAt:from: */\n\t\ty0 = ((short) ((((short *) points))[1]));\n\t}\n\telse {\n\t\tx0 = (((int *) points))[0];\n\t\ty0 = (((int *) points))[1];\n\t}\n\tfor (i = 1; i <= (nPoints - 1); i += 1) {\n\t\tif (isShort) {\n\t\t\t/* begin loadPointShortAt:from: */\n\t\t\tx1 = ((short) ((((short *) points))[i * 2]));\n\t\t\t/* begin loadPointShortAt:from: */\n\t\t\ty1 = ((short) ((((short *) points))[(i * 2) + 1]));\n\t\t}\n\t\telse {\n\t\t\tx1 = (((int *) points))[i * 2];\n\t\t\ty1 = (((int *) points))[(i * 2) + 1];\n\t\t}\n\t\t(point1Get())[0] = x0;\n\t\t(point1Get())[1] = y0;\n\t\t(point2Get())[0] = x1;\n\t\t(point2Get())[1] = y1;\n\t\t/* begin transformPoints: */\n\t\tif (2 > 0) {\n\t\t\t/* begin transformPoint: */\n\t\t\t/* begin point1Get */\n\t\t\tpoint = ((int *) (workBuffer + GWPoint1));\n\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t/* begin edgeTransform */\n\t\t\t\ttransform = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\tx = ((sqInt)(((((transform[0]) * (((double) ((((int *) point))[0]) ))) + ((transform[1]) * (((double) ((((int *) point))[1]) )))) + (transform[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\ty = ((sqInt)(((((transform[3]) * (((double) ((((int *) point))[0]) ))) + ((transform[4]) * (((double) ((((int *) point))[1]) )))) + (transform[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t(((int *) point))[0] = x;\n\t\t\t\t(((int *) point))[1] = y;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpoint[0] = (((point[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\tpoint[1] = (((point[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t}\n\t\t}\n\t\tif (2 > 1) {\n\t\t\t/* begin transformPoint: */\n\t\t\t/* begin point2Get */\n\t\t\tpoint1 = ((int *) (workBuffer + GWPoint2));\n\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t/* begin edgeTransform */\n\t\t\t\ttransform1 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\tx2 = ((sqInt)(((((transform1[0]) * (((double) ((((int *) point1))[0]) ))) + ((transform1[1]) * (((double) ((((int *) point1))[1]) )))) + (transform1[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\ty2 = ((sqInt)(((((transform1[3]) * (((double) ((((int *) point1))[0]) ))) + ((transform1[4]) * (((double) ((((int *) point1))[1]) )))) + (transform1[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t(((int *) point1))[0] = x2;\n\t\t\t\t(((int *) point1))[1] = y2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpoint1[0] = (((point1[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\tpoint1[1] = (((point1[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t}\n\t\t}\n\t\tif (2 > 2) {\n\t\t\t/* begin transformPoint: */\n\t\t\t/* begin point3Get */\n\t\t\tpoint2 = ((int *) (workBuffer + GWPoint3));\n\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t/* begin edgeTransform */\n\t\t\t\ttransform2 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\tx3 = ((sqInt)(((((transform2[0]) * (((double) ((((int *) point2))[0]) ))) + ((transform2[1]) * (((double) ((((int *) point2))[1]) )))) + (transform2[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\ty3 = ((sqInt)(((((transform2[3]) * (((double) ((((int *) point2))[0]) ))) + ((transform2[4]) * (((double) ((((int *) point2))[1]) )))) + (transform2[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t(((int *) point2))[0] = x3;\n\t\t\t\t(((int *) point2))[1] = y3;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpoint2[0] = (((point2[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\tpoint2[1] = (((point2[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t}\n\t\t}\n\t\tif (2 > 3) {\n\t\t\t/* begin transformPoint: */\n\t\t\t/* begin point4Get */\n\t\t\tpoint3 = ((int *) (workBuffer + GWPoint4));\n\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t/* begin edgeTransform */\n\t\t\t\ttransform3 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\tx4 = ((sqInt)(((((transform3[0]) * (((double) ((((int *) point3))[0]) ))) + ((transform3[1]) * (((double) ((((int *) point3))[1]) )))) + (transform3[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\ty4 = ((sqInt)(((((transform3[3]) * (((double) ((((int *) point3))[0]) ))) + ((transform3[4]) * (((double) ((((int *) point3))[1]) )))) + (transform3[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t(((int *) point3))[0] = x4;\n\t\t\t\t(((int *) point3))[1] = y4;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpoint3[0] = (((point3[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\tpoint3[1] = (((point3[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t}\n\t\t}\n\t\tloadWideLinefromtolineFillleftFillrightFill(lineWidth, point1Get(), point2Get(), lineFill, fillIndex, 0);\n\t\tif (engineStopped) {\n\t\t\treturn null;\n\t\t}\n\t\tx0 = x1;\n\t\ty0 = y1;\n\t}\n}\n\n\n/*\tLoad a rectangle currently defined by point1-point4 */\n\nstatic sqInt\nloadRectanglelineFillleftFillrightFill(sqInt lineWidth, sqInt lineFill, sqInt leftFill, sqInt rightFill)\n{\n\tloadWideLinefromtolineFillleftFillrightFill(lineWidth, point1Get(), point2Get(), lineFill, leftFill, rightFill);\n\tloadWideLinefromtolineFillleftFillrightFill(lineWidth, point2Get(), point3Get(), lineFill, leftFill, rightFill);\n\tloadWideLinefromtolineFillleftFillrightFill(lineWidth, point3Get(), point4Get(), lineFill, leftFill, rightFill);\n\tloadWideLinefromtolineFillleftFillrightFill(lineWidth, point4Get(), point1Get(), lineFill, leftFill, rightFill);\n}\n\n\n/*\tLoad the entire state from the interpreter for the rendering primitives.\n\tAnswer 0 on success or a non-zero failure code on failure. */\n\nstatic sqInt\nloadRenderingState(void)\n{\n    sqInt edgeOop;\n    sqInt failCode;\n    sqInt fillOop;\n    sqInt state;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 2)) {\n\t\treturn PrimErrBadNumArgs;\n\t}\n\tif (((failCode = quickLoadEngineFrom(interpreterProxy->stackValue(2)))) != 0) {\n\t\treturn failCode;\n\t}\n\tfillOop = interpreterProxy->stackObjectValue(0);\n\tedgeOop = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn PrimErrBadArgument;\n\t}\n\tif (!(((failCode = loadSpanBufferFrom(interpreterProxy->fetchPointerofObject(BESpanIndex, engine)))) == 0)) {\n\t\treturn failCode;\n\t}\n\tif (!(loadBitBltFrom(interpreterProxy->fetchPointerofObject(BEBitBltIndex, engine)))) {\n\t\treturn GEFBitBltLoadFailed;\n\t}\n\tif (!(loadFormsFrom(interpreterProxy->fetchPointerofObject(BEFormsIndex, engine)))) {\n\t\treturn GEFFormLoadFailed;\n\t}\n\tif ((interpreterProxy->slotSizeOf(edgeOop)) < ETBalloonEdgeDataSize) {\n\t\treturn GEFEdgeDataTooSmall;\n\t}\n\tif ((interpreterProxy->slotSizeOf(fillOop)) < FTBalloonFillDataSize) {\n\t\treturn GEFFillDataTooSmall;\n\t}\n\tstate = workBuffer[GWState];\n\tif ((state == GEStateWaitingForEdge)\n\t || ((state == GEStateWaitingForFill)\n || (state == GEStateWaitingChange))) {\n\t\treturn GEFWrongState;\n\t}\n\treturn 0;\n}\n\nstatic sqInt\nloadShapenSegmentsfilllineWidthlineFillpointsShort(int *points, sqInt nSegments, sqInt fillIndex, sqInt lineWidth, sqInt lineFill, sqInt pointsShort)\n{\n    sqInt i;\n    sqInt index;\n    int *point;\n    int *point1;\n    int *point2;\n    int *point3;\n    int *point4;\n    int *point5;\n    int *point6;\n    int *point7;\n    sqInt segs;\n    float *transform;\n    float *transform1;\n    float *transform2;\n    float *transform3;\n    float *transform4;\n    float *transform5;\n    float *transform6;\n    float *transform7;\n    sqInt x;\n    sqInt x0;\n    sqInt x1;\n    sqInt x2;\n    sqInt x3;\n    sqInt x4;\n    sqInt x5;\n    sqInt x6;\n    sqInt x7;\n    sqInt x8;\n    sqInt x9;\n    sqInt y;\n    sqInt y0;\n    sqInt y1;\n    sqInt y2;\n    sqInt y3;\n    sqInt y4;\n    sqInt y5;\n    sqInt y6;\n    sqInt y7;\n    sqInt y8;\n    sqInt y9;\n\n\tfor (i = 1; i <= nSegments; i += 1) {\n\t\t/* begin loadCompressedSegment:from:short:leftFill:rightFill:lineWidth:lineColor: */\n\t\tif ((fillIndex == 0)\n\t\t && ((lineWidth == 0)\n || (lineFill == 0))) {\n\t\t\tgoto l1;\n\t\t}\n\n\t\t/* 3 points with x/y each */\n\n\t\tindex = (i - 1) * 6;\n\t\tif (pointsShort) {\n\t\t\t/* begin loadPointShortAt:from: */\n\t\t\tx0 = ((short) ((((short *) points))[index + 0]));\n\t\t\t/* begin loadPointShortAt:from: */\n\t\t\ty0 = ((short) ((((short *) points))[index + 1]));\n\t\t\t/* begin loadPointShortAt:from: */\n\t\t\tx1 = ((short) ((((short *) points))[index + 2]));\n\t\t\t/* begin loadPointShortAt:from: */\n\t\t\ty1 = ((short) ((((short *) points))[index + 3]));\n\t\t\t/* begin loadPointShortAt:from: */\n\t\t\tx2 = ((short) ((((short *) points))[index + 4]));\n\t\t\t/* begin loadPointShortAt:from: */\n\t\t\ty2 = ((short) ((((short *) points))[index + 5]));\n\t\t}\n\t\telse {\n\t\t\tx0 = (((int *) points))[index + 0];\n\t\t\ty0 = (((int *) points))[index + 1];\n\t\t\tx1 = (((int *) points))[index + 2];\n\t\t\ty1 = (((int *) points))[index + 3];\n\t\t\tx2 = (((int *) points))[index + 4];\n\t\t\ty2 = (((int *) points))[index + 5];\n\t\t}\n\t\tif (((x0 == x1)\n && (y0 == y1))\n\t\t || ((x1 == x2)\n && (y1 == y2))) {\n\t\t\tif ((x0 == x2)\n\t\t\t && (y0 == y2)) {\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t\t(point1Get())[0] = x0;\n\t\t\t(point1Get())[1] = y0;\n\t\t\t(point2Get())[0] = x2;\n\t\t\t(point2Get())[1] = y2;\n\t\t\t/* begin transformPoints: */\n\t\t\tif (2 > 0) {\n\t\t\t\t/* begin transformPoint: */\n\t\t\t\t/* begin point1Get */\n\t\t\t\tpoint = ((int *) (workBuffer + GWPoint1));\n\t\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t\t/* begin edgeTransform */\n\t\t\t\t\ttransform = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\t\tx = ((sqInt)(((((transform[0]) * (((double) ((((int *) point))[0]) ))) + ((transform[1]) * (((double) ((((int *) point))[1]) )))) + (transform[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t\ty = ((sqInt)(((((transform[3]) * (((double) ((((int *) point))[0]) ))) + ((transform[4]) * (((double) ((((int *) point))[1]) )))) + (transform[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t\t(((int *) point))[0] = x;\n\t\t\t\t\t(((int *) point))[1] = y;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpoint[0] = (((point[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\t\tpoint[1] = (((point[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (2 > 1) {\n\t\t\t\t/* begin transformPoint: */\n\t\t\t\t/* begin point2Get */\n\t\t\t\tpoint1 = ((int *) (workBuffer + GWPoint2));\n\t\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t\t/* begin edgeTransform */\n\t\t\t\t\ttransform1 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\t\tx3 = ((sqInt)(((((transform1[0]) * (((double) ((((int *) point1))[0]) ))) + ((transform1[1]) * (((double) ((((int *) point1))[1]) )))) + (transform1[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t\ty3 = ((sqInt)(((((transform1[3]) * (((double) ((((int *) point1))[0]) ))) + ((transform1[4]) * (((double) ((((int *) point1))[1]) )))) + (transform1[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t\t(((int *) point1))[0] = x3;\n\t\t\t\t\t(((int *) point1))[1] = y3;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpoint1[0] = (((point1[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\t\tpoint1[1] = (((point1[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (2 > 2) {\n\t\t\t\t/* begin transformPoint: */\n\t\t\t\t/* begin point3Get */\n\t\t\t\tpoint2 = ((int *) (workBuffer + GWPoint3));\n\t\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t\t/* begin edgeTransform */\n\t\t\t\t\ttransform2 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\t\tx4 = ((sqInt)(((((transform2[0]) * (((double) ((((int *) point2))[0]) ))) + ((transform2[1]) * (((double) ((((int *) point2))[1]) )))) + (transform2[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t\ty4 = ((sqInt)(((((transform2[3]) * (((double) ((((int *) point2))[0]) ))) + ((transform2[4]) * (((double) ((((int *) point2))[1]) )))) + (transform2[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t\t(((int *) point2))[0] = x4;\n\t\t\t\t\t(((int *) point2))[1] = y4;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpoint2[0] = (((point2[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\t\tpoint2[1] = (((point2[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (2 > 3) {\n\t\t\t\t/* begin transformPoint: */\n\t\t\t\t/* begin point4Get */\n\t\t\t\tpoint3 = ((int *) (workBuffer + GWPoint4));\n\t\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t\t/* begin edgeTransform */\n\t\t\t\t\ttransform3 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\t\tx5 = ((sqInt)(((((transform3[0]) * (((double) ((((int *) point3))[0]) ))) + ((transform3[1]) * (((double) ((((int *) point3))[1]) )))) + (transform3[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t\ty5 = ((sqInt)(((((transform3[3]) * (((double) ((((int *) point3))[0]) ))) + ((transform3[4]) * (((double) ((((int *) point3))[1]) )))) + (transform3[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t\t(((int *) point3))[0] = x5;\n\t\t\t\t\t(((int *) point3))[1] = y5;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpoint3[0] = (((point3[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\t\tpoint3[1] = (((point3[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t\t}\n\t\t\t}\n\t\t\tloadWideLinefromtolineFillleftFillrightFill(lineWidth, point1Get(), point2Get(), lineFill, fillIndex, 0);\n\t\t\tgoto l1;\n\t\t}\n\t\t(point1Get())[0] = x0;\n\t\t(point1Get())[1] = y0;\n\t\t(point2Get())[0] = x1;\n\t\t(point2Get())[1] = y1;\n\t\t(point3Get())[0] = x2;\n\t\t(point3Get())[1] = y2;\n\t\t/* begin transformPoints: */\n\t\tif (3 > 0) {\n\t\t\t/* begin transformPoint: */\n\t\t\t/* begin point1Get */\n\t\t\tpoint4 = ((int *) (workBuffer + GWPoint1));\n\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t/* begin edgeTransform */\n\t\t\t\ttransform4 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\tx6 = ((sqInt)(((((transform4[0]) * (((double) ((((int *) point4))[0]) ))) + ((transform4[1]) * (((double) ((((int *) point4))[1]) )))) + (transform4[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\ty6 = ((sqInt)(((((transform4[3]) * (((double) ((((int *) point4))[0]) ))) + ((transform4[4]) * (((double) ((((int *) point4))[1]) )))) + (transform4[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t(((int *) point4))[0] = x6;\n\t\t\t\t(((int *) point4))[1] = y6;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpoint4[0] = (((point4[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\tpoint4[1] = (((point4[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t}\n\t\t}\n\t\tif (3 > 1) {\n\t\t\t/* begin transformPoint: */\n\t\t\t/* begin point2Get */\n\t\t\tpoint5 = ((int *) (workBuffer + GWPoint2));\n\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t/* begin edgeTransform */\n\t\t\t\ttransform5 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\tx7 = ((sqInt)(((((transform5[0]) * (((double) ((((int *) point5))[0]) ))) + ((transform5[1]) * (((double) ((((int *) point5))[1]) )))) + (transform5[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\ty7 = ((sqInt)(((((transform5[3]) * (((double) ((((int *) point5))[0]) ))) + ((transform5[4]) * (((double) ((((int *) point5))[1]) )))) + (transform5[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t(((int *) point5))[0] = x7;\n\t\t\t\t(((int *) point5))[1] = y7;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpoint5[0] = (((point5[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\tpoint5[1] = (((point5[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t}\n\t\t}\n\t\tif (3 > 2) {\n\t\t\t/* begin transformPoint: */\n\t\t\t/* begin point3Get */\n\t\t\tpoint6 = ((int *) (workBuffer + GWPoint3));\n\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t/* begin edgeTransform */\n\t\t\t\ttransform6 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\tx8 = ((sqInt)(((((transform6[0]) * (((double) ((((int *) point6))[0]) ))) + ((transform6[1]) * (((double) ((((int *) point6))[1]) )))) + (transform6[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\ty8 = ((sqInt)(((((transform6[3]) * (((double) ((((int *) point6))[0]) ))) + ((transform6[4]) * (((double) ((((int *) point6))[1]) )))) + (transform6[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t(((int *) point6))[0] = x8;\n\t\t\t\t(((int *) point6))[1] = y8;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpoint6[0] = (((point6[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\tpoint6[1] = (((point6[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t}\n\t\t}\n\t\tif (3 > 3) {\n\t\t\t/* begin transformPoint: */\n\t\t\t/* begin point4Get */\n\t\t\tpoint7 = ((int *) (workBuffer + GWPoint4));\n\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t/* begin edgeTransform */\n\t\t\t\ttransform7 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\tx9 = ((sqInt)(((((transform7[0]) * (((double) ((((int *) point7))[0]) ))) + ((transform7[1]) * (((double) ((((int *) point7))[1]) )))) + (transform7[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\ty9 = ((sqInt)(((((transform7[3]) * (((double) ((((int *) point7))[0]) ))) + ((transform7[4]) * (((double) ((((int *) point7))[1]) )))) + (transform7[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t(((int *) point7))[0] = x9;\n\t\t\t\t(((int *) point7))[1] = y9;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpoint7[0] = (((point7[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\tpoint7[1] = (((point7[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t}\n\t\t}\n\t\tsegs = loadAndSubdivideBezierFromviatoisWide(point1Get(), point2Get(), point3Get(), (lineWidth != 0)\n\t\t && (lineFill != 0));\n\t\tif (engineStopped) {\n\t\t\tgoto l1;\n\t\t}\n\t\tloadWideBezierlineFillleftFillrightFilln(lineWidth, lineFill, fillIndex, 0, segs);\n\tl1:\t/* end loadCompressedSegment:from:short:leftFill:rightFill:lineWidth:lineColor: */;\n\t\tif (engineStopped) {\n\t\t\treturn null;\n\t\t}\n\t}\n}\n\n\n/*\tLoad the span buffer from the given oop.\n\tAnswer 0 on success or a non-zero failure code on failure. */\n\nstatic sqInt\nloadSpanBufferFrom(sqInt spanOop)\n{\n    sqInt value;\n\n\tif (!((interpreterProxy->fetchClassOf(spanOop)) == (interpreterProxy->classBitmap()))) {\n\t\treturn GEFClassMismatch;\n\t}\n\n\t/* Leave last entry unused to avoid complications */\n\n\tspanBuffer = interpreterProxy->firstIndexableField(spanOop);\n\t/* begin spanSizePut: */\n\tvalue = (interpreterProxy->slotSizeOf(spanOop)) - 1;\n\tworkBuffer[GWSpanSize] = value;\n\treturn 0;\n}\n\n\n/*\tLoad a transformation from transformOop into the float array\n\tdefined by destPtr. The transformation is assumed to be either\n\tan array or a FloatArray of length n. */\n\nstatic sqInt\nloadTransformFromintolength(sqInt transformOop, float *destPtr, sqInt n)\n{\n\tif (transformOop == (interpreterProxy->nilObject())) {\n\t\treturn 0;\n\t}\n\tif ((transformOop & 1)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!((interpreterProxy->slotSizeOf(transformOop)) == n)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (interpreterProxy->isWords(transformOop)) {\n\t\tloadWordTransformFromintolength(transformOop, destPtr, n);\n\t}\n\telse {\n\t\tloadArrayTransformFromintolength(transformOop, destPtr, n);\n\t}\n\treturn 1;\n}\n\n\n/*\tLoad the (possibly wide) bezier from the segments currently on the bezier\n\tstack. \n */\n\nstatic sqInt\nloadWideBezierlineFillleftFillrightFilln(sqInt lineWidth, sqInt lineFill, sqInt leftFill, sqInt rightFill, sqInt nSegments)\n{\n    sqInt bezier;\n    sqInt bezier1;\n    sqInt bezier2;\n    sqInt index;\n    sqInt offset;\n    sqInt wide;\n\n\tif ((lineWidth == 0)\n\t || (lineFill == 0)) {\n\t\twide = 0;\n\t\toffset = 0;\n\t}\n\telse {\n\t\twide = 1;\n\t\toffset = ((sqInt) lineWidth >> 1);\n\t}\n\tindex = nSegments * 6;\n\twhile (index > 0) {\n\t\tif (wide) {\n\t\t\t/* begin allocateWideBezier */\n\t\t\tif (!(allocateObjEntry(GBWideSize))) {\n\t\t\t\tbezier = 0;\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t\tbezier1 = objUsed;\n\t\t\tobjUsed = bezier1 + GBWideSize;\n\t\t\tobjBuffer[bezier1 + GEObjectType] = GEPrimitiveWideBezier;\n\t\t\tobjBuffer[bezier1 + GEObjectIndex] = 0;\n\t\t\tobjBuffer[bezier1 + GEObjectLength] = GBWideSize;\n\t\t\tbezier = bezier1;\n\t\tl1:\t/* end allocateWideBezier */;\n\t\t}\n\t\telse {\n\t\t\t/* begin allocateBezier */\n\t\t\tif (!(allocateObjEntry(GBBaseSize))) {\n\t\t\t\tbezier = 0;\n\t\t\t\tgoto l2;\n\t\t\t}\n\t\t\tbezier2 = objUsed;\n\t\t\tobjUsed = bezier2 + GBBaseSize;\n\t\t\tobjBuffer[bezier2 + GEObjectType] = GEPrimitiveBezier;\n\t\t\tobjBuffer[bezier2 + GEObjectIndex] = 0;\n\t\t\tobjBuffer[bezier2 + GEObjectLength] = GBBaseSize;\n\t\t\tbezier = bezier2;\n\t\tl2:\t/* end allocateBezier */;\n\t\t}\n\t\tif (engineStopped) {\n\t\t\treturn 0;\n\t\t}\n\t\tloadBeziersegmentleftFillrightFilloffset(bezier, index, leftFill, rightFill, offset);\n\t\tif (wide) {\n\t\t\tobjBuffer[bezier + GBWideFill] = lineFill;\n\t\t\tobjBuffer[bezier + GBWideWidth] = lineWidth;\n\t\t\tobjBuffer[bezier + GBWideExtent] = lineWidth;\n\t\t}\n\t\tindex -= 6;\n\t}\n\t/* begin wbStackClear */\n\tworkBuffer[GWBufferTop] = (workBuffer[GWSize]);\n}\n\n\n/*\tLoad a (possibly wide) line defined by the points p1 and p2 */\n\nstatic sqInt\nloadWideLinefromtolineFillleftFillrightFill(sqInt lineWidth, int *p1, int *p2, sqInt lineFill, sqInt leftFill, sqInt rightFill)\n{\n    sqInt line;\n    sqInt line1;\n    sqInt line2;\n    sqInt offset;\n    int *p11;\n    int *p21;\n    sqInt yDir;\n\n\tif ((lineWidth == 0)\n\t || (lineFill == 0)) {\n\t\t/* begin allocateLine */\n\t\tif (!(allocateObjEntry(GLBaseSize))) {\n\t\t\tline = 0;\n\t\t\tgoto l1;\n\t\t}\n\t\tline1 = objUsed;\n\t\tobjUsed = line1 + GLBaseSize;\n\t\tobjBuffer[line1 + GEObjectType] = GEPrimitiveLine;\n\t\tobjBuffer[line1 + GEObjectIndex] = 0;\n\t\tobjBuffer[line1 + GEObjectLength] = GLBaseSize;\n\t\tline = line1;\n\tl1:\t/* end allocateLine */;\n\t\toffset = 0;\n\t}\n\telse {\n\t\t/* begin allocateWideLine */\n\t\tif (!(allocateObjEntry(GLWideSize))) {\n\t\t\tline = 0;\n\t\t\tgoto l2;\n\t\t}\n\t\tline2 = objUsed;\n\t\tobjUsed = line2 + GLWideSize;\n\t\tobjBuffer[line2 + GEObjectType] = GEPrimitiveWideLine;\n\t\tobjBuffer[line2 + GEObjectIndex] = 0;\n\t\tobjBuffer[line2 + GEObjectLength] = GLWideSize;\n\t\tline = line2;\n\tl2:\t/* end allocateWideLine */;\n\t\toffset = ((sqInt) lineWidth >> 1);\n\t}\n\tif (engineStopped) {\n\t\treturn 0;\n\t}\n\t/* begin loadLine:from:to:offset:leftFill:rightFill: */\n\tif ((p1[1]) <= (p2[1])) {\n\t\tp11 = p1;\n\t\tp21 = p2;\n\t\tyDir = 1;\n\t}\n\telse {\n\t\tp11 = p2;\n\t\tp21 = p1;\n\t\tyDir = -1;\n\t}\n\tobjBuffer[line + GEXValue] = (p11[0]);\n\tobjBuffer[line + GEYValue] = ((p11[1]) - offset);\n\tobjBuffer[line + GEZValue] = (workBuffer[GWCurrentZ]);\n\tobjBuffer[line + GEFillIndexLeft] = leftFill;\n\tobjBuffer[line + GEFillIndexRight] = rightFill;\n\tobjBuffer[line + GLEndX] = (p21[0]);\n\tobjBuffer[line + GLEndY] = ((p21[1]) - offset);\n\tobjBuffer[line + GLYDirection] = yDir;\n\tif ((((objBuffer[line + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveWide) != 0) {\n\t\tobjBuffer[line + GLWideFill] = lineFill;\n\t\tobjBuffer[line + GLWideWidth] = lineWidth;\n\t\tobjBuffer[line + GLWideExtent] = lineWidth;\n\t}\n}\n\n\n/*\tLoad a float array transformation from the given oop */\n\nstatic sqInt\nloadWordTransformFromintolength(sqInt transformOop, float *destPtr, sqInt n)\n{\n    sqInt i;\n    float *srcPtr;\n\n\tsrcPtr = ((float *) (interpreterProxy->firstIndexableField(transformOop)));\n\tfor (i = 0; i <= (n - 1); i += 1) {\n\t\tdestPtr[i] = (srcPtr[i]);\n\t}\n}\n\n\n/*\tLoad the working buffer from the given oop */\n\nstatic sqInt\nloadWorkBufferFrom(sqInt wbOop)\n{\n\tif ((wbOop & 1)) {\n\t\treturn GEFWorkBufferIsInteger;\n\t}\n\tif (!(interpreterProxy->isWords(wbOop))) {\n\t\treturn GEFWorkBufferIsPointers;\n\t}\n\tif ((interpreterProxy->slotSizeOf(wbOop)) < GWMinimalSize) {\n\t\treturn GEFWorkBufferTooSmall;\n\t}\n\t/* begin workBufferPut: */\n\tworkBuffer = interpreterProxy->firstIndexableField(wbOop);\n\tif (!((workBuffer[GWMagicIndex]) == GWMagicNumber)) {\n\t\treturn GEFWorkBufferBadMagic;\n\t}\n\tif (!((workBuffer[GWSize]) == (interpreterProxy->slotSizeOf(wbOop)))) {\n\t\treturn GEFWorkBufferWrongSize;\n\t}\n\tif (!((workBuffer[GWObjStart]) == GWHeaderSize)) {\n\t\treturn GEFWorkBufferStartWrong;\n\t}\n\tobjBuffer = workBuffer + (workBuffer[GWObjStart]);\n\tgetBuffer = objBuffer + (workBuffer[GWObjUsed]);\n\n\t/* Make sure we don't exceed the work buffer */\n\n\taetBuffer = getBuffer + (workBuffer[GWGETUsed]);\n\tif ((((GWHeaderSize + (workBuffer[GWObjUsed])) + (workBuffer[GWGETUsed])) + (workBuffer[GWAETUsed])) > (workBuffer[GWSize])) {\n\t\treturn GEFWorkTooBig;\n\t}\n\treturn 0;\n}\n\nstatic sqInt\nmagicNumberGet(void)\n{\n\treturn workBuffer[GWMagicIndex];\n}\n\nstatic sqInt\nmagicNumberPut(sqInt value)\n{\n\treturn workBuffer[GWMagicIndex] = value;\n}\n\nstatic sqInt\nmakeRectFromPoints(void)\n{\n\t(point2Get())[0] = ((point3Get())[0]);\n\t(point2Get())[1] = ((point1Get())[1]);\n\t(point4Get())[0] = ((point1Get())[0]);\n\t(point4Get())[1] = ((point3Get())[1]);\n}\n\nstatic sqInt\nmakeUnsignedFrom(sqInt someIntegerValue)\n{\n\treturn someIntegerValue;\n}\n\n\n/*\tThe module with the given name was just unloaded.\n\tMake sure we have no dangling references. */\n\nEXPORT(sqInt)\nmoduleUnloaded(char *aModuleName)\n{\n\tif ((strcmp(aModuleName, bbPluginName)) == 0) {\n\n\t\t/* BitBlt just shut down. How nasty. */\n\n\t\tloadBBFn = 0;\n\t\tcopyBitsFn = 0;\n\t}\n}\n\n\n/*\tThe entry at index is not in the right position of the AET. \n\tMove it to the left until the position is okay. */\n\nstatic sqInt\nmoveAETEntryFromedgex(sqInt index, sqInt edge, sqInt xValue)\n{\n    sqInt newIndex;\n\n\tnewIndex = index;\n\twhile ((newIndex > 0)\n && ((objBuffer[(aetBuffer[newIndex - 1]) + GEXValue]) > xValue)) {\n\t\taetBuffer[newIndex] = (aetBuffer[newIndex - 1]);\n\t\tnewIndex -= 1;\n\t}\n\taetBuffer[newIndex] = edge;\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\n\n/*\tCheck if we have n slots available */\n\nstatic sqInt\nneedAvailableSpace(sqInt nSlots)\n{\n\tif (((((GWHeaderSize + objUsed) + (workBuffer[GWGETUsed])) + (workBuffer[GWAETUsed])) + nSlots) > (workBuffer[GWBufferTop])) {\n\t\t/* begin stopBecauseOf: */\n\t\tworkBuffer[GWStopReason] = GErrorNoMoreSpace;\n\t\tengineStopped = 1;\n\t\treturn 0;\n\t}\n\treturn 1;\n}\n\nstatic sqInt\nneedsFlush(void)\n{\n\treturn (workBuffer[GWNeedsFlush]) != 0;\n}\n\nstatic sqInt\nneedsFlushGet(void)\n{\n\treturn workBuffer[GWNeedsFlush];\n}\n\nstatic sqInt\nneedsFlushPut(sqInt value)\n{\n\treturn workBuffer[GWNeedsFlush] = value;\n}\n\nstatic sqInt\nobjectHeaderOf(sqInt obj)\n{\n\treturn objBuffer[obj + GEObjectType];\n}\n\nstatic sqInt\nobjectIndexOf(sqInt obj)\n{\n\treturn objBuffer[obj + GEObjectIndex];\n}\n\nstatic sqInt\nobjectIndexOfput(sqInt obj, sqInt value)\n{\n\treturn objBuffer[obj + GEObjectIndex] = value;\n}\n\nstatic sqInt\nobjectLengthOf(sqInt obj)\n{\n\treturn objBuffer[obj + GEObjectLength];\n}\n\nstatic sqInt\nobjectLengthOfput(sqInt obj, sqInt value)\n{\n\treturn objBuffer[obj + GEObjectLength] = value;\n}\n\nstatic sqInt\nobjectTypeOf(sqInt obj)\n{\n\treturn (objBuffer[obj + GEObjectType]) & GEPrimitiveTypeMask;\n}\n\nstatic sqInt\nobjectTypeOfput(sqInt obj, sqInt value)\n{\n\treturn objBuffer[obj + GEObjectType] = value;\n}\n\nstatic sqInt\nobjStartGet(void)\n{\n\treturn workBuffer[GWObjStart];\n}\n\nstatic sqInt\nobjStartPut(sqInt value)\n{\n\treturn workBuffer[GWObjStart] = value;\n}\n\nstatic sqInt\nobjUsedGet(void)\n{\n\treturn workBuffer[GWObjUsed];\n}\n\nstatic sqInt\nobjUsedPut(sqInt value)\n{\n\treturn workBuffer[GWObjUsed] = value;\n}\n\nstatic sqInt\nobjat(sqInt object, sqInt index)\n{\n\treturn objBuffer[object + index];\n}\n\nstatic sqInt\nobjatput(sqInt object, sqInt index, sqInt value)\n{\n\treturn objBuffer[object + index] = value;\n}\n\n\n/*\tCommon function so that we don't compute that wrong in any place\n\tand can easily find all the places where we deal with one-pixel offsets. */\n\nstatic sqInt\noffsetFromWidth(sqInt lineWidth)\n{\n\treturn ((sqInt) lineWidth >> 1);\n}\n\nstatic int *\npoint1Get(void)\n{\n\treturn ((int *) (workBuffer + GWPoint1));\n}\n\nstatic int *\npoint2Get(void)\n{\n\treturn ((int *) (workBuffer + GWPoint2));\n}\n\nstatic int *\npoint3Get(void)\n{\n\treturn ((int *) (workBuffer + GWPoint3));\n}\n\nstatic int *\npoint4Get(void)\n{\n\treturn ((int *) (workBuffer + GWPoint4));\n}\n\n\n/*\tWe have just blitted a scan line to the screen.\n\tDo whatever seems to be a good idea here. */\n/*\tNote: In the future we may check the time needed for this scan line and\n\tinterrupt processing to give the Smalltalk code a chance to run at a\n\tcertain time.\n */\n/*\tCheck if there is any more work to do. */\n\nstatic sqInt\npostDisplayAction(void)\n{\n\tif (((workBuffer[GWGETStart]) >= (workBuffer[GWGETUsed]))\n\t && ((workBuffer[GWAETUsed]) == 0)) {\n\t\tworkBuffer[GWState] = GEStateCompleted;\n\t}\n\tif ((workBuffer[GWCurrentY]) >= (workBuffer[GWFillMaxY])) {\n\t\tworkBuffer[GWState] = GEStateCompleted;\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveAbortProcessing(void)\n{\n    sqInt failureCode;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (!(((failureCode = quickLoadEngineFrom(interpreterProxy->stackValue(0)))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tworkBuffer[GWState] = GEStateCompleted;\n\t/* begin storeEngineStateInto: */\n\tworkBuffer[GWObjUsed] = objUsed;\n}\n\n\n/*\tNote: No need to load either bitBlt or spanBuffer */\n\nEXPORT(sqInt)\nprimitiveAddActiveEdgeEntry(void)\n{\n    sqInt edge;\n    sqInt edgeOop;\n    sqInt failureCode;\n    sqInt value;\n\n\tif (doProfileStats) {\n\t\tgeProfileTime = interpreterProxy->ioMicroMSecs();\n\t}\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (!(((failureCode = quickLoadEngineFromrequiredState(interpreterProxy->stackValue(1), GEStateWaitingForEdge))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tedgeOop = interpreterProxy->stackObjectValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tedge = loadEdgeStateFrom(edgeOop);\n\tif (edge == null) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFEdgeDataTooSmall);\n\t}\n\tif (!(needAvailableSpace(1))) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFWorkTooBig);\n\t}\n\tif ((objBuffer[edge + GENumLines]) > 0) {\n\t\tinsertEdgeIntoAET(edge);\n\t}\n\tif (engineStopped) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFEngineStopped);\n\t}\n\tworkBuffer[GWState] = GEStateAddingFromGET;\n\t/* begin storeEngineStateInto: */\n\tworkBuffer[GWObjUsed] = objUsed;\n\tinterpreterProxy->pop(1);\n\tif (doProfileStats) {\n\t\tworkBuffer[GWCountAddAETEntry] = ((workBuffer[GWCountAddAETEntry]) + 1);\n\t\t/* begin incrementStat:by: */\n\t\tvalue = (interpreterProxy->ioMicroMSecs()) - geProfileTime;\n\t\tworkBuffer[GWTimeAddAETEntry] = ((workBuffer[GWTimeAddAETEntry]) + value);\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveAddBezier(void)\n{\n    sqInt endOop;\n    sqInt failureCode;\n    sqInt leftFill;\n    sqInt nSegments;\n    int *point;\n    int *point1;\n    int *point2;\n    int *point3;\n    sqInt rightFill;\n    sqInt startOop;\n    float *transform;\n    float *transform1;\n    float *transform2;\n    float *transform3;\n    sqInt viaOop;\n    sqInt x;\n    sqInt x1;\n    sqInt x2;\n    sqInt x3;\n    sqInt y;\n    sqInt y1;\n    sqInt y2;\n    sqInt y3;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 5)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\trightFill = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(0));\n\tleftFill = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(1));\n\tviaOop = interpreterProxy->stackObjectValue(2);\n\tendOop = interpreterProxy->stackObjectValue(3);\n\tstartOop = interpreterProxy->stackObjectValue(4);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!(((failureCode = quickLoadEngineFromrequiredState(interpreterProxy->stackValue(5), GEStateUnlocked))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tif (!((isFillOkay(leftFill))\n\t\t && (isFillOkay(rightFill)))) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFWrongFill);\n\t}\n\tif ((leftFill == rightFill) && 0) {\n\t\treturn interpreterProxy->pop(6);\n\t}\n\tloadPointfrom(point1Get(), startOop);\n\tloadPointfrom(point2Get(), viaOop);\n\tloadPointfrom(point3Get(), endOop);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\t/* begin transformPoints: */\n\tif (3 > 0) {\n\t\t/* begin transformPoint: */\n\t\t/* begin point1Get */\n\t\tpoint = ((int *) (workBuffer + GWPoint1));\n\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t/* begin transformPoint:into: */\n\t\t\t/* begin transformPointX:y:into: */\n\t\t\t/* begin edgeTransform */\n\t\t\ttransform = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\tx = ((sqInt)(((((transform[0]) * (((double) ((((int *) point))[0]) ))) + ((transform[1]) * (((double) ((((int *) point))[1]) )))) + (transform[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\ty = ((sqInt)(((((transform[3]) * (((double) ((((int *) point))[0]) ))) + ((transform[4]) * (((double) ((((int *) point))[1]) )))) + (transform[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t(((int *) point))[0] = x;\n\t\t\t(((int *) point))[1] = y;\n\t\t}\n\t\telse {\n\t\t\tpoint[0] = (((point[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\tpoint[1] = (((point[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t}\n\t}\n\tif (3 > 1) {\n\t\t/* begin transformPoint: */\n\t\t/* begin point2Get */\n\t\tpoint1 = ((int *) (workBuffer + GWPoint2));\n\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t/* begin transformPoint:into: */\n\t\t\t/* begin transformPointX:y:into: */\n\t\t\t/* begin edgeTransform */\n\t\t\ttransform1 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\tx1 = ((sqInt)(((((transform1[0]) * (((double) ((((int *) point1))[0]) ))) + ((transform1[1]) * (((double) ((((int *) point1))[1]) )))) + (transform1[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\ty1 = ((sqInt)(((((transform1[3]) * (((double) ((((int *) point1))[0]) ))) + ((transform1[4]) * (((double) ((((int *) point1))[1]) )))) + (transform1[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t(((int *) point1))[0] = x1;\n\t\t\t(((int *) point1))[1] = y1;\n\t\t}\n\t\telse {\n\t\t\tpoint1[0] = (((point1[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\tpoint1[1] = (((point1[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t}\n\t}\n\tif (3 > 2) {\n\t\t/* begin transformPoint: */\n\t\t/* begin point3Get */\n\t\tpoint2 = ((int *) (workBuffer + GWPoint3));\n\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t/* begin transformPoint:into: */\n\t\t\t/* begin transformPointX:y:into: */\n\t\t\t/* begin edgeTransform */\n\t\t\ttransform2 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\tx2 = ((sqInt)(((((transform2[0]) * (((double) ((((int *) point2))[0]) ))) + ((transform2[1]) * (((double) ((((int *) point2))[1]) )))) + (transform2[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\ty2 = ((sqInt)(((((transform2[3]) * (((double) ((((int *) point2))[0]) ))) + ((transform2[4]) * (((double) ((((int *) point2))[1]) )))) + (transform2[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t(((int *) point2))[0] = x2;\n\t\t\t(((int *) point2))[1] = y2;\n\t\t}\n\t\telse {\n\t\t\tpoint2[0] = (((point2[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\tpoint2[1] = (((point2[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t}\n\t}\n\tif (3 > 3) {\n\t\t/* begin transformPoint: */\n\t\t/* begin point4Get */\n\t\tpoint3 = ((int *) (workBuffer + GWPoint4));\n\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t/* begin transformPoint:into: */\n\t\t\t/* begin transformPointX:y:into: */\n\t\t\t/* begin edgeTransform */\n\t\t\ttransform3 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\tx3 = ((sqInt)(((((transform3[0]) * (((double) ((((int *) point3))[0]) ))) + ((transform3[1]) * (((double) ((((int *) point3))[1]) )))) + (transform3[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\ty3 = ((sqInt)(((((transform3[3]) * (((double) ((((int *) point3))[0]) ))) + ((transform3[4]) * (((double) ((((int *) point3))[1]) )))) + (transform3[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t(((int *) point3))[0] = x3;\n\t\t\t(((int *) point3))[1] = y3;\n\t\t}\n\t\telse {\n\t\t\tpoint3[0] = (((point3[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\tpoint3[1] = (((point3[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t}\n\t}\n\tnSegments = loadAndSubdivideBezierFromviatoisWide(point1Get(), point2Get(), point3Get(), 0);\n\t/* begin needAvailableSpace: */\n\tif (((((GWHeaderSize + objUsed) + (workBuffer[GWGETUsed])) + (workBuffer[GWAETUsed])) + (nSegments * GBBaseSize)) > (workBuffer[GWBufferTop])) {\n\t\t/* begin stopBecauseOf: */\n\t\tworkBuffer[GWStopReason] = GErrorNoMoreSpace;\n\t\tengineStopped = 1;\n\t\tgoto l1;\n\t}\nl1:\t/* end needAvailableSpace: */;\n\tif (!(engineStopped)) {\n\t\tleftFill = transformColor(leftFill);\n\t\trightFill = transformColor(rightFill);\n\t}\n\tif (!(engineStopped)) {\n\t\tloadWideBezierlineFillleftFillrightFilln(0, 0, leftFill, rightFill, nSegments);\n\t}\n\tif (engineStopped) {\n\t\t/* begin wbStackClear */\n\t\tworkBuffer[GWBufferTop] = (workBuffer[GWSize]);\n\t\treturn interpreterProxy->primitiveFailFor(GEFEngineStopped);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFEntityLoadFailed);\n\t}\n\t/* begin storeEngineStateInto: */\n\tworkBuffer[GWObjUsed] = objUsed;\n\tinterpreterProxy->pop(5);\n}\n\nEXPORT(sqInt)\nprimitiveAddBezierShape(void)\n{\n    sqInt failureCode;\n    sqInt fillIndex;\n    sqInt isArray;\n    sqInt length;\n    sqInt lineFill;\n    sqInt lineWidth;\n    sqInt nSegments;\n    sqInt points;\n    sqInt segSize;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 5)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tlineFill = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(0));\n\tlineWidth = interpreterProxy->stackIntegerValue(1);\n\tfillIndex = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(2));\n\tnSegments = interpreterProxy->stackIntegerValue(3);\n\tpoints = interpreterProxy->stackObjectValue(4);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!(((failureCode = quickLoadEngineFromrequiredState(interpreterProxy->stackValue(5), GEStateUnlocked))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tlength = interpreterProxy->slotSizeOf(points);\n\tif (interpreterProxy->isWords(points)) {\n\n\t\t/* Either PointArray or ShortPointArray */\n\n\t\tisArray = 0;\n\t\tif (!((length == (nSegments * 3))\n\t\t\t || (length == (nSegments * 6)))) {\n\t\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t\t}\n\t}\n\telse {\n\t\tif (!(interpreterProxy->isArray(points))) {\n\t\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t\t}\n\t\tif (!(length == (nSegments * 3))) {\n\t\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t\t}\n\t\tisArray = 1;\n\t}\n\tif ((lineWidth == 0)\n\t || (lineFill == 0)) {\n\t\tsegSize = GLBaseSize;\n\t}\n\telse {\n\t\tsegSize = GLWideSize;\n\t}\n\tif (!(needAvailableSpace(segSize * nSegments))) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFWorkTooBig);\n\t}\n\tif (!((isFillOkay(lineFill))\n\t\t && (isFillOkay(fillIndex)))) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFWrongFill);\n\t}\n\tlineFill = transformColor(lineFill);\n\tfillIndex = transformColor(fillIndex);\n\tif (engineStopped) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFEngineStopped);\n\t}\n\tif (((lineFill == 0)\n || (lineWidth == 0))\n\t && (fillIndex == 0)) {\n\t\treturn interpreterProxy->pop(5);\n\t}\n\tif (!(lineWidth == 0)) {\n\t\tlineWidth = transformWidth(lineWidth);\n\t\tif (lineWidth < 1) {\n\t\t\tlineWidth = 1;\n\t\t}\n\t}\n\tif (isArray) {\n\t\tloadArrayShapenSegmentsfilllineWidthlineFill(points, nSegments, fillIndex, lineWidth, lineFill);\n\t}\n\telse {\n\t\tloadShapenSegmentsfilllineWidthlineFillpointsShort(interpreterProxy->firstIndexableField(points), nSegments, fillIndex, lineWidth, lineFill, (nSegments * 3) == length);\n\t}\n\tif (engineStopped) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFEngineStopped);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFEntityLoadFailed);\n\t}\n\tworkBuffer[GWNeedsFlush] = 1;\n\t/* begin storeEngineStateInto: */\n\tworkBuffer[GWObjUsed] = objUsed;\n\tinterpreterProxy->pop(5);\n}\n\nEXPORT(sqInt)\nprimitiveAddBitmapFill(void)\n{\n    sqInt bmBits;\n    sqInt bmBitsSize;\n    sqInt bmDepth;\n    sqInt bmFill;\n    sqInt bmHeight;\n    sqInt bmRaster;\n    sqInt bmWidth;\n    int *cm;\n    int *cmBits;\n    sqInt cmOop;\n    sqInt cmSize;\n    sqInt dirOop;\n    sqInt failureCode;\n    sqInt fill;\n    sqInt fill1;\n    sqInt fillSize;\n    sqInt formOop;\n    sqInt i;\n    sqInt nrmOop;\n    sqInt originOop;\n    int *point1;\n    int *point2;\n    int *point3;\n    sqInt ppw;\n    sqInt tileFlag;\n    sqInt tileFlag1;\n    sqInt xIndex;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 7)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\txIndex = interpreterProxy->stackIntegerValue(0);\n\tif (xIndex <= 0) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tnrmOop = interpreterProxy->stackObjectValue(1);\n\tdirOop = interpreterProxy->stackObjectValue(2);\n\toriginOop = interpreterProxy->stackObjectValue(3);\n\ttileFlag = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(4));\n\tcmOop = interpreterProxy->stackObjectValue(5);\n\tformOop = interpreterProxy->stackObjectValue(6);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!(((failureCode = quickLoadEngineFromrequiredState(interpreterProxy->stackValue(7), GEStateUnlocked))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tloadPointfrom(point1Get(), originOop);\n\tloadPointfrom(point2Get(), dirOop);\n\tloadPointfrom(point3Get(), nrmOop);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFBadPoint);\n\t}\n\t/* begin loadBitmapFill:colormap:tile:from:along:normal:xIndex: */\n\ttileFlag1 = (tileFlag\n\t\t? 1\n\t\t: 0);\n\t/* begin point1Get */\n\tpoint1 = ((int *) (workBuffer + GWPoint1));\n\t/* begin point2Get */\n\tpoint2 = ((int *) (workBuffer + GWPoint2));\n\t/* begin point3Get */\n\tpoint3 = ((int *) (workBuffer + GWPoint3));\n\tif (cmOop == (interpreterProxy->nilObject())) {\n\t\tcmSize = 0;\n\t\tcmBits = null;\n\t}\n\telse {\n\t\tif (!((interpreterProxy->fetchClassOf(cmOop)) == (interpreterProxy->classBitmap()))) {\n\t\t\tfill = interpreterProxy->primitiveFail();\n\t\t\tgoto l1;\n\t\t}\n\t\tcmSize = interpreterProxy->slotSizeOf(cmOop);\n\t\tcmBits = interpreterProxy->firstIndexableField(cmOop);\n\t}\n\tif ((formOop & 1)) {\n\t\tfill = interpreterProxy->primitiveFail();\n\t\tgoto l1;\n\t}\n\tif (!(interpreterProxy->isPointers(formOop))) {\n\t\tfill = interpreterProxy->primitiveFail();\n\t\tgoto l1;\n\t}\n\tif ((interpreterProxy->slotSizeOf(formOop)) < 5) {\n\t\tfill = interpreterProxy->primitiveFail();\n\t\tgoto l1;\n\t}\n\tbmBits = interpreterProxy->fetchPointerofObject(0, formOop);\n\tif (!((interpreterProxy->fetchClassOf(bmBits)) == (interpreterProxy->classBitmap()))) {\n\t\tfill = interpreterProxy->primitiveFail();\n\t\tgoto l1;\n\t}\n\tbmBitsSize = interpreterProxy->slotSizeOf(bmBits);\n\tbmWidth = interpreterProxy->fetchIntegerofObject(1, formOop);\n\tbmHeight = interpreterProxy->fetchIntegerofObject(2, formOop);\n\tbmDepth = interpreterProxy->fetchIntegerofObject(3, formOop);\n\tif (interpreterProxy->failed()) {\n\t\tfill = null;\n\t\tgoto l1;\n\t}\n\tif (!((bmWidth >= 0)\n\t\t && (bmHeight >= 0))) {\n\t\tfill = interpreterProxy->primitiveFail();\n\t\tgoto l1;\n\t}\n\tif (!((((((bmDepth == 32) || (bmDepth == 8)) || (bmDepth == 16)) || (bmDepth == 1)) || (bmDepth == 2)) || (bmDepth == 4))) {\n\t\tfill = interpreterProxy->primitiveFail();\n\t\tgoto l1;\n\t}\n\tif (!((cmSize == 0)\n\t\t || (cmSize == (1 << bmDepth)))) {\n\t\tfill = interpreterProxy->primitiveFail();\n\t\tgoto l1;\n\t}\n\tppw = 32 / bmDepth;\n\tbmRaster = (bmWidth + (ppw - 1)) / ppw;\n\tif (!(bmBitsSize == (bmRaster * bmHeight))) {\n\t\tfill = interpreterProxy->primitiveFail();\n\t\tgoto l1;\n\t}\n\t/* begin allocateBitmapFill:colormap: */\n\tfillSize = GBMBaseSize + cmSize;\n\tif (!(allocateObjEntry(fillSize))) {\n\t\tbmFill = 0;\n\t\tgoto l2;\n\t}\n\tfill1 = objUsed;\n\tobjUsed = fill1 + fillSize;\n\tobjBuffer[fill1 + GEObjectType] = GEPrimitiveClippedBitmapFill;\n\tobjBuffer[fill1 + GEObjectIndex] = 0;\n\tobjBuffer[fill1 + GEObjectLength] = fillSize;\n\t/* begin colormapOf: */\n\tcm = (objBuffer + fill1) + GBColormapOffset;\n\tif ((workBuffer[GWHasColorTransform]) != 0) {\n\t\tfor (i = 0; i <= (cmSize - 1); i += 1) {\n\t\t\tcm[i] = (transformColor(cmBits[i]));\n\t\t}\n\t}\n\telse {\n\t\tfor (i = 0; i <= (cmSize - 1); i += 1) {\n\t\t\tcm[i] = (cmBits[i]);\n\t\t}\n\t}\n\tobjBuffer[fill1 + GBColormapSize] = cmSize;\n\tbmFill = fill1;\nl2:\t/* end allocateBitmapFill:colormap: */;\n\tif (engineStopped) {\n\t\tfill = null;\n\t\tgoto l1;\n\t}\n\tobjBuffer[bmFill + GBBitmapWidth] = bmWidth;\n\tobjBuffer[bmFill + GBBitmapHeight] = bmHeight;\n\tobjBuffer[bmFill + GBBitmapDepth] = bmDepth;\n\tobjBuffer[bmFill + GBBitmapRaster] = bmRaster;\n\tobjBuffer[bmFill + GBBitmapSize] = bmBitsSize;\n\tobjBuffer[bmFill + GBTileFlag] = tileFlag1;\n\tobjBuffer[bmFill + GEObjectIndex] = (xIndex - 1);\n\tloadFillOrientationfromalongnormalwidthheight(bmFill, point1, point2, point3, bmWidth, bmHeight);\n\tfill = bmFill;\nl1:\t/* end loadBitmapFill:colormap:tile:from:along:normal:xIndex: */;\n\tif (engineStopped) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFEngineStopped);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFEntityLoadFailed);\n\t}\n\t/* begin storeEngineStateInto: */\n\tworkBuffer[GWObjUsed] = objUsed;\n\tinterpreterProxy->popthenPush(8, interpreterProxy->positive32BitIntegerFor(fill));\n}\n\nEXPORT(sqInt)\nprimitiveAddCompressedShape(void)\n{\n    sqInt failureCode;\n    sqInt fillIndexList;\n    sqInt leftFills;\n    sqInt lineFills;\n    sqInt lineWidths;\n    sqInt nSegments;\n    sqInt points;\n    sqInt pointsShort;\n    sqInt rightFills;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 7)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tfillIndexList = interpreterProxy->stackObjectValue(0);\n\tlineFills = interpreterProxy->stackObjectValue(1);\n\tlineWidths = interpreterProxy->stackObjectValue(2);\n\trightFills = interpreterProxy->stackObjectValue(3);\n\tleftFills = interpreterProxy->stackObjectValue(4);\n\tnSegments = interpreterProxy->stackIntegerValue(5);\n\tpoints = interpreterProxy->stackObjectValue(6);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!(((failureCode = quickLoadEngineFromrequiredState(interpreterProxy->stackValue(7), GEStateUnlocked))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tif (!(checkCompressedShapesegmentsleftFillsrightFillslineWidthslineFillsfillIndexList(points, nSegments, leftFills, rightFills, lineWidths, lineFills, fillIndexList))) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFEntityCheckFailed);\n\t}\n\tif (!(needAvailableSpace((((GBBaseSize < GLBaseSize) ? GLBaseSize : GBBaseSize)) * nSegments))) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFWorkTooBig);\n\t}\n\n\t/* Then actually load the compressed shape */\n\n\tpointsShort = (interpreterProxy->slotSizeOf(points)) == (nSegments * 3);\n\tloadCompressedShapesegmentsleftFillsrightFillslineWidthslineFillsfillIndexListpointShort(interpreterProxy->firstIndexableField(points), nSegments, interpreterProxy->firstIndexableField(leftFills), interpreterProxy->firstIndexableField(rightFills), interpreterProxy->firstIndexableField(lineWidths), interpreterProxy->firstIndexableField(lineFills), interpreterProxy->firstIndexableField(fillIndexList), pointsShort);\n\tif (engineStopped) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFEngineStopped);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFEntityLoadFailed);\n\t}\n\tworkBuffer[GWNeedsFlush] = 1;\n\t/* begin storeEngineStateInto: */\n\tworkBuffer[GWObjUsed] = objUsed;\n\tinterpreterProxy->pop(7);\n}\n\nEXPORT(sqInt)\nprimitiveAddGradientFill(void)\n{\n    sqInt dirOop;\n    sqInt failureCode;\n    sqInt fill;\n    sqInt isRadial;\n    sqInt nrmOop;\n    sqInt originOop;\n    sqInt rampOop;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 5)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tisRadial = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(0));\n\tnrmOop = interpreterProxy->stackValue(1);\n\tdirOop = interpreterProxy->stackValue(2);\n\toriginOop = interpreterProxy->stackValue(3);\n\trampOop = interpreterProxy->stackValue(4);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!(((failureCode = quickLoadEngineFromrequiredState(interpreterProxy->stackValue(5), GEStateUnlocked))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tloadPointfrom(point1Get(), originOop);\n\tloadPointfrom(point2Get(), dirOop);\n\tloadPointfrom(point3Get(), nrmOop);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFBadPoint);\n\t}\n\tfill = loadGradientFillfromalongnormalisRadial(rampOop, point1Get(), point2Get(), point3Get(), isRadial);\n\tif (engineStopped) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFEngineStopped);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFEntityLoadFailed);\n\t}\n\t/* begin storeEngineStateInto: */\n\tworkBuffer[GWObjUsed] = objUsed;\n\tinterpreterProxy->popthenPush(6, interpreterProxy->positive32BitIntegerFor(fill));\n}\n\nEXPORT(sqInt)\nprimitiveAddLine(void)\n{\n    sqInt endOop;\n    sqInt failureCode;\n    sqInt leftFill;\n    int *point;\n    int *point1;\n    int *point2;\n    int *point3;\n    sqInt rightFill;\n    sqInt startOop;\n    float *transform;\n    float *transform1;\n    float *transform2;\n    float *transform3;\n    sqInt x;\n    sqInt x1;\n    sqInt x2;\n    sqInt x3;\n    sqInt y;\n    sqInt y1;\n    sqInt y2;\n    sqInt y3;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 4)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\trightFill = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(0));\n\tleftFill = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(1));\n\tendOop = interpreterProxy->stackObjectValue(2);\n\tstartOop = interpreterProxy->stackObjectValue(3);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!(((failureCode = quickLoadEngineFromrequiredState(interpreterProxy->stackValue(4), GEStateUnlocked))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tif (!((isFillOkay(leftFill))\n\t\t && (isFillOkay(rightFill)))) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFWrongFill);\n\t}\n\tloadPointfrom(point1Get(), startOop);\n\tloadPointfrom(point2Get(), endOop);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFBadPoint);\n\t}\n\t/* begin transformPoints: */\n\tif (2 > 0) {\n\t\t/* begin transformPoint: */\n\t\t/* begin point1Get */\n\t\tpoint = ((int *) (workBuffer + GWPoint1));\n\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t/* begin transformPoint:into: */\n\t\t\t/* begin transformPointX:y:into: */\n\t\t\t/* begin edgeTransform */\n\t\t\ttransform = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\tx = ((sqInt)(((((transform[0]) * (((double) ((((int *) point))[0]) ))) + ((transform[1]) * (((double) ((((int *) point))[1]) )))) + (transform[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\ty = ((sqInt)(((((transform[3]) * (((double) ((((int *) point))[0]) ))) + ((transform[4]) * (((double) ((((int *) point))[1]) )))) + (transform[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t(((int *) point))[0] = x;\n\t\t\t(((int *) point))[1] = y;\n\t\t}\n\t\telse {\n\t\t\tpoint[0] = (((point[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\tpoint[1] = (((point[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t}\n\t}\n\tif (2 > 1) {\n\t\t/* begin transformPoint: */\n\t\t/* begin point2Get */\n\t\tpoint1 = ((int *) (workBuffer + GWPoint2));\n\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t/* begin transformPoint:into: */\n\t\t\t/* begin transformPointX:y:into: */\n\t\t\t/* begin edgeTransform */\n\t\t\ttransform1 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\tx1 = ((sqInt)(((((transform1[0]) * (((double) ((((int *) point1))[0]) ))) + ((transform1[1]) * (((double) ((((int *) point1))[1]) )))) + (transform1[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\ty1 = ((sqInt)(((((transform1[3]) * (((double) ((((int *) point1))[0]) ))) + ((transform1[4]) * (((double) ((((int *) point1))[1]) )))) + (transform1[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t(((int *) point1))[0] = x1;\n\t\t\t(((int *) point1))[1] = y1;\n\t\t}\n\t\telse {\n\t\t\tpoint1[0] = (((point1[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\tpoint1[1] = (((point1[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t}\n\t}\n\tif (2 > 2) {\n\t\t/* begin transformPoint: */\n\t\t/* begin point3Get */\n\t\tpoint2 = ((int *) (workBuffer + GWPoint3));\n\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t/* begin transformPoint:into: */\n\t\t\t/* begin transformPointX:y:into: */\n\t\t\t/* begin edgeTransform */\n\t\t\ttransform2 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\tx2 = ((sqInt)(((((transform2[0]) * (((double) ((((int *) point2))[0]) ))) + ((transform2[1]) * (((double) ((((int *) point2))[1]) )))) + (transform2[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\ty2 = ((sqInt)(((((transform2[3]) * (((double) ((((int *) point2))[0]) ))) + ((transform2[4]) * (((double) ((((int *) point2))[1]) )))) + (transform2[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t(((int *) point2))[0] = x2;\n\t\t\t(((int *) point2))[1] = y2;\n\t\t}\n\t\telse {\n\t\t\tpoint2[0] = (((point2[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\tpoint2[1] = (((point2[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t}\n\t}\n\tif (2 > 3) {\n\t\t/* begin transformPoint: */\n\t\t/* begin point4Get */\n\t\tpoint3 = ((int *) (workBuffer + GWPoint4));\n\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t/* begin transformPoint:into: */\n\t\t\t/* begin transformPointX:y:into: */\n\t\t\t/* begin edgeTransform */\n\t\t\ttransform3 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\tx3 = ((sqInt)(((((transform3[0]) * (((double) ((((int *) point3))[0]) ))) + ((transform3[1]) * (((double) ((((int *) point3))[1]) )))) + (transform3[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\ty3 = ((sqInt)(((((transform3[3]) * (((double) ((((int *) point3))[0]) ))) + ((transform3[4]) * (((double) ((((int *) point3))[1]) )))) + (transform3[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t(((int *) point3))[0] = x3;\n\t\t\t(((int *) point3))[1] = y3;\n\t\t}\n\t\telse {\n\t\t\tpoint3[0] = (((point3[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\tpoint3[1] = (((point3[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t}\n\t}\n\tleftFill = transformColor(leftFill);\n\trightFill = transformColor(rightFill);\n\tif (engineStopped) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFEngineStopped);\n\t}\n\tloadWideLinefromtolineFillleftFillrightFill(0, point1Get(), point2Get(), 0, leftFill, rightFill);\n\tif (engineStopped) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFEngineStopped);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFEntityLoadFailed);\n\t}\n\t/* begin storeEngineStateInto: */\n\tworkBuffer[GWObjUsed] = objUsed;\n\tinterpreterProxy->pop(4);\n}\n\nEXPORT(sqInt)\nprimitiveAddOval(void)\n{\n    sqInt borderIndex;\n    sqInt borderWidth;\n    sqInt endOop;\n    sqInt failureCode;\n    sqInt fillIndex;\n    sqInt startOop;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 5)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tborderIndex = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(0));\n\tborderWidth = interpreterProxy->stackIntegerValue(1);\n\tfillIndex = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(2));\n\tendOop = interpreterProxy->stackObjectValue(3);\n\tstartOop = interpreterProxy->stackObjectValue(4);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!(((failureCode = quickLoadEngineFromrequiredState(interpreterProxy->stackValue(5), GEStateUnlocked))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tif (!((isFillOkay(borderIndex))\n\t\t && (isFillOkay(fillIndex)))) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFWrongFill);\n\t}\n\tfillIndex = transformColor(fillIndex);\n\tborderIndex = transformColor(borderIndex);\n\tif (engineStopped) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFEngineStopped);\n\t}\n\tif ((fillIndex == 0)\n\t && ((borderIndex == 0)\n || (borderWidth <= 0))) {\n\t\treturn interpreterProxy->pop(5);\n\t}\n\tif (!(needAvailableSpace(16 * GBBaseSize))) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFWorkTooBig);\n\t}\n\tif ((borderWidth > 0)\n\t && (borderIndex != 0)) {\n\t\tborderWidth = transformWidth(borderWidth);\n\t}\n\telse {\n\t\tborderWidth = 0;\n\t}\n\tloadPointfrom(point1Get(), startOop);\n\tloadPointfrom(point2Get(), endOop);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFBadPoint);\n\t}\n\tloadOvallineFillleftFillrightFill(borderWidth, borderIndex, 0, fillIndex);\n\tif (engineStopped) {\n\t\t/* begin wbStackClear */\n\t\tworkBuffer[GWBufferTop] = (workBuffer[GWSize]);\n\t\treturn interpreterProxy->primitiveFailFor(GEFEngineStopped);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFEntityLoadFailed);\n\t}\n\tworkBuffer[GWNeedsFlush] = 1;\n\t/* begin storeEngineStateInto: */\n\tworkBuffer[GWObjUsed] = objUsed;\n\tinterpreterProxy->pop(5);\n}\n\nEXPORT(sqInt)\nprimitiveAddPolygon(void)\n{\n    sqInt failureCode;\n    sqInt fillIndex;\n    sqInt i;\n    sqInt i1;\n    sqInt isArray;\n    sqInt length;\n    sqInt lineFill;\n    sqInt lineWidth;\n    sqInt nPoints;\n    int *point;\n    int *point1;\n    int *point2;\n    int *point3;\n    int *point4;\n    int *point5;\n    int *point6;\n    int *point7;\n    sqInt points;\n    int *points1;\n    sqInt segSize;\n    float *transform;\n    float *transform1;\n    float *transform2;\n    float *transform3;\n    float *transform4;\n    float *transform5;\n    float *transform6;\n    float *transform7;\n    sqInt x;\n    sqInt x0;\n    sqInt x01;\n    sqInt x1;\n    sqInt x11;\n    sqInt x2;\n    sqInt x3;\n    sqInt x4;\n    sqInt x5;\n    sqInt x6;\n    sqInt x7;\n    sqInt x8;\n    sqInt y;\n    sqInt y0;\n    sqInt y01;\n    sqInt y1;\n    sqInt y11;\n    sqInt y2;\n    sqInt y3;\n    sqInt y4;\n    sqInt y5;\n    sqInt y6;\n    sqInt y7;\n    sqInt y8;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 5)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tlineFill = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(0));\n\tlineWidth = interpreterProxy->stackIntegerValue(1);\n\tfillIndex = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(2));\n\tnPoints = interpreterProxy->stackIntegerValue(3);\n\tpoints = interpreterProxy->stackObjectValue(4);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!(((failureCode = quickLoadEngineFromrequiredState(interpreterProxy->stackValue(5), GEStateUnlocked))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tlength = interpreterProxy->slotSizeOf(points);\n\tif (interpreterProxy->isWords(points)) {\n\n\t\t/* Either PointArray or ShortPointArray */\n\n\t\tisArray = 0;\n\t\tif (!((length == nPoints)\n\t\t\t || ((nPoints * 2) == length))) {\n\t\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t\t}\n\t}\n\telse {\n\t\tif (!(interpreterProxy->isArray(points))) {\n\t\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t\t}\n\t\tif (!(length == nPoints)) {\n\t\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t\t}\n\t\tisArray = 1;\n\t}\n\tif ((lineWidth == 0)\n\t || (lineFill == 0)) {\n\t\tsegSize = GLBaseSize;\n\t}\n\telse {\n\t\tsegSize = GLWideSize;\n\t}\n\tif (!(needAvailableSpace(segSize * nPoints))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!((isFillOkay(lineFill))\n\t\t && (isFillOkay(fillIndex)))) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFWrongFill);\n\t}\n\tlineFill = transformColor(lineFill);\n\tfillIndex = transformColor(fillIndex);\n\tif (engineStopped) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFEngineStopped);\n\t}\n\tif (((lineFill == 0)\n || (lineWidth == 0))\n\t && (fillIndex == 0)) {\n\t\treturn interpreterProxy->pop(6);\n\t}\n\tif (!(lineWidth == 0)) {\n\t\tlineWidth = transformWidth(lineWidth);\n\t}\n\tif (isArray) {\n\t\t/* begin loadArrayPolygon:nPoints:fill:lineWidth:lineFill: */\n\t\tloadPointfrom(point1Get(), interpreterProxy->fetchPointerofObject(0, points));\n\t\tif (interpreterProxy->failed()) {\n\t\t\tgoto l1;\n\t\t}\n\t\tx0 = (point1Get())[0];\n\t\ty0 = (point1Get())[1];\n\t\tfor (i = 1; i <= (nPoints - 1); i += 1) {\n\t\t\tloadPointfrom(point1Get(), interpreterProxy->fetchPointerofObject(i, points));\n\t\t\tif (interpreterProxy->failed()) {\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t\tx1 = (point1Get())[0];\n\t\t\ty1 = (point1Get())[1];\n\t\t\t(point1Get())[0] = x0;\n\t\t\t(point1Get())[1] = y0;\n\t\t\t(point2Get())[0] = x1;\n\t\t\t(point2Get())[1] = y1;\n\t\t\t/* begin transformPoints: */\n\t\t\tif (2 > 0) {\n\t\t\t\t/* begin transformPoint: */\n\t\t\t\t/* begin point1Get */\n\t\t\t\tpoint = ((int *) (workBuffer + GWPoint1));\n\t\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t\t/* begin edgeTransform */\n\t\t\t\t\ttransform = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\t\tx = ((sqInt)(((((transform[0]) * (((double) ((((int *) point))[0]) ))) + ((transform[1]) * (((double) ((((int *) point))[1]) )))) + (transform[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t\ty = ((sqInt)(((((transform[3]) * (((double) ((((int *) point))[0]) ))) + ((transform[4]) * (((double) ((((int *) point))[1]) )))) + (transform[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t\t(((int *) point))[0] = x;\n\t\t\t\t\t(((int *) point))[1] = y;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpoint[0] = (((point[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\t\tpoint[1] = (((point[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (2 > 1) {\n\t\t\t\t/* begin transformPoint: */\n\t\t\t\t/* begin point2Get */\n\t\t\t\tpoint1 = ((int *) (workBuffer + GWPoint2));\n\t\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t\t/* begin edgeTransform */\n\t\t\t\t\ttransform1 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\t\tx2 = ((sqInt)(((((transform1[0]) * (((double) ((((int *) point1))[0]) ))) + ((transform1[1]) * (((double) ((((int *) point1))[1]) )))) + (transform1[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t\ty2 = ((sqInt)(((((transform1[3]) * (((double) ((((int *) point1))[0]) ))) + ((transform1[4]) * (((double) ((((int *) point1))[1]) )))) + (transform1[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t\t(((int *) point1))[0] = x2;\n\t\t\t\t\t(((int *) point1))[1] = y2;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpoint1[0] = (((point1[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\t\tpoint1[1] = (((point1[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (2 > 2) {\n\t\t\t\t/* begin transformPoint: */\n\t\t\t\t/* begin point3Get */\n\t\t\t\tpoint2 = ((int *) (workBuffer + GWPoint3));\n\t\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t\t/* begin edgeTransform */\n\t\t\t\t\ttransform2 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\t\tx3 = ((sqInt)(((((transform2[0]) * (((double) ((((int *) point2))[0]) ))) + ((transform2[1]) * (((double) ((((int *) point2))[1]) )))) + (transform2[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t\ty3 = ((sqInt)(((((transform2[3]) * (((double) ((((int *) point2))[0]) ))) + ((transform2[4]) * (((double) ((((int *) point2))[1]) )))) + (transform2[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t\t(((int *) point2))[0] = x3;\n\t\t\t\t\t(((int *) point2))[1] = y3;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpoint2[0] = (((point2[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\t\tpoint2[1] = (((point2[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (2 > 3) {\n\t\t\t\t/* begin transformPoint: */\n\t\t\t\t/* begin point4Get */\n\t\t\t\tpoint3 = ((int *) (workBuffer + GWPoint4));\n\t\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t\t/* begin edgeTransform */\n\t\t\t\t\ttransform3 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\t\tx4 = ((sqInt)(((((transform3[0]) * (((double) ((((int *) point3))[0]) ))) + ((transform3[1]) * (((double) ((((int *) point3))[1]) )))) + (transform3[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t\ty4 = ((sqInt)(((((transform3[3]) * (((double) ((((int *) point3))[0]) ))) + ((transform3[4]) * (((double) ((((int *) point3))[1]) )))) + (transform3[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t\t(((int *) point3))[0] = x4;\n\t\t\t\t\t(((int *) point3))[1] = y4;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpoint3[0] = (((point3[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\t\tpoint3[1] = (((point3[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t\t}\n\t\t\t}\n\t\t\tloadWideLinefromtolineFillleftFillrightFill(lineWidth, point1Get(), point2Get(), lineFill, fillIndex, 0);\n\t\t\tif (engineStopped) {\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t\tx0 = x1;\n\t\t\ty0 = y1;\n\t\t}\n\tl1:\t/* end loadArrayPolygon:nPoints:fill:lineWidth:lineFill: */;\n\t}\n\telse {\n\t\t/* begin loadPolygon:nPoints:fill:lineWidth:lineFill:pointsShort: */\n\t\tpoints1 = interpreterProxy->firstIndexableField(points);\n\t\tif (nPoints == length) {\n\t\t\t/* begin loadPointShortAt:from: */\n\t\t\tx01 = ((short) ((((short *) points1))[0]));\n\t\t\t/* begin loadPointShortAt:from: */\n\t\t\ty01 = ((short) ((((short *) points1))[1]));\n\t\t}\n\t\telse {\n\t\t\tx01 = (((int *) points1))[0];\n\t\t\ty01 = (((int *) points1))[1];\n\t\t}\n\t\tfor (i1 = 1; i1 <= (nPoints - 1); i1 += 1) {\n\t\t\tif (nPoints == length) {\n\t\t\t\t/* begin loadPointShortAt:from: */\n\t\t\t\tx11 = ((short) ((((short *) points1))[i1 * 2]));\n\t\t\t\t/* begin loadPointShortAt:from: */\n\t\t\t\ty11 = ((short) ((((short *) points1))[(i1 * 2) + 1]));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tx11 = (((int *) points1))[i1 * 2];\n\t\t\t\ty11 = (((int *) points1))[(i1 * 2) + 1];\n\t\t\t}\n\t\t\t(point1Get())[0] = x01;\n\t\t\t(point1Get())[1] = y01;\n\t\t\t(point2Get())[0] = x11;\n\t\t\t(point2Get())[1] = y11;\n\t\t\t/* begin transformPoints: */\n\t\t\tif (2 > 0) {\n\t\t\t\t/* begin transformPoint: */\n\t\t\t\t/* begin point1Get */\n\t\t\t\tpoint4 = ((int *) (workBuffer + GWPoint1));\n\t\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t\t/* begin edgeTransform */\n\t\t\t\t\ttransform4 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\t\tx5 = ((sqInt)(((((transform4[0]) * (((double) ((((int *) point4))[0]) ))) + ((transform4[1]) * (((double) ((((int *) point4))[1]) )))) + (transform4[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t\ty5 = ((sqInt)(((((transform4[3]) * (((double) ((((int *) point4))[0]) ))) + ((transform4[4]) * (((double) ((((int *) point4))[1]) )))) + (transform4[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t\t(((int *) point4))[0] = x5;\n\t\t\t\t\t(((int *) point4))[1] = y5;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpoint4[0] = (((point4[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\t\tpoint4[1] = (((point4[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (2 > 1) {\n\t\t\t\t/* begin transformPoint: */\n\t\t\t\t/* begin point2Get */\n\t\t\t\tpoint5 = ((int *) (workBuffer + GWPoint2));\n\t\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t\t/* begin edgeTransform */\n\t\t\t\t\ttransform5 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\t\tx6 = ((sqInt)(((((transform5[0]) * (((double) ((((int *) point5))[0]) ))) + ((transform5[1]) * (((double) ((((int *) point5))[1]) )))) + (transform5[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t\ty6 = ((sqInt)(((((transform5[3]) * (((double) ((((int *) point5))[0]) ))) + ((transform5[4]) * (((double) ((((int *) point5))[1]) )))) + (transform5[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t\t(((int *) point5))[0] = x6;\n\t\t\t\t\t(((int *) point5))[1] = y6;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpoint5[0] = (((point5[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\t\tpoint5[1] = (((point5[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (2 > 2) {\n\t\t\t\t/* begin transformPoint: */\n\t\t\t\t/* begin point3Get */\n\t\t\t\tpoint6 = ((int *) (workBuffer + GWPoint3));\n\t\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t\t/* begin edgeTransform */\n\t\t\t\t\ttransform6 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\t\tx7 = ((sqInt)(((((transform6[0]) * (((double) ((((int *) point6))[0]) ))) + ((transform6[1]) * (((double) ((((int *) point6))[1]) )))) + (transform6[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t\ty7 = ((sqInt)(((((transform6[3]) * (((double) ((((int *) point6))[0]) ))) + ((transform6[4]) * (((double) ((((int *) point6))[1]) )))) + (transform6[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t\t(((int *) point6))[0] = x7;\n\t\t\t\t\t(((int *) point6))[1] = y7;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpoint6[0] = (((point6[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\t\tpoint6[1] = (((point6[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (2 > 3) {\n\t\t\t\t/* begin transformPoint: */\n\t\t\t\t/* begin point4Get */\n\t\t\t\tpoint7 = ((int *) (workBuffer + GWPoint4));\n\t\t\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t\t\t/* begin transformPoint:into: */\n\t\t\t\t\t/* begin transformPointX:y:into: */\n\t\t\t\t\t/* begin edgeTransform */\n\t\t\t\t\ttransform7 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\t\t\tx8 = ((sqInt)(((((transform7[0]) * (((double) ((((int *) point7))[0]) ))) + ((transform7[1]) * (((double) ((((int *) point7))[1]) )))) + (transform7[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t\ty8 = ((sqInt)(((((transform7[3]) * (((double) ((((int *) point7))[0]) ))) + ((transform7[4]) * (((double) ((((int *) point7))[1]) )))) + (transform7[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t\t\t(((int *) point7))[0] = x8;\n\t\t\t\t\t(((int *) point7))[1] = y8;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpoint7[0] = (((point7[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\t\t\tpoint7[1] = (((point7[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t\t\t}\n\t\t\t}\n\t\t\tloadWideLinefromtolineFillleftFillrightFill(lineWidth, point1Get(), point2Get(), lineFill, fillIndex, 0);\n\t\t\tif (engineStopped) {\n\t\t\t\tgoto l2;\n\t\t\t}\n\t\t\tx01 = x11;\n\t\t\ty01 = y11;\n\t\t}\n\tl2:\t/* end loadPolygon:nPoints:fill:lineWidth:lineFill:pointsShort: */;\n\t}\n\tif (engineStopped) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFEngineStopped);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFEntityLoadFailed);\n\t}\n\tworkBuffer[GWNeedsFlush] = 1;\n\t/* begin storeEngineStateInto: */\n\tworkBuffer[GWObjUsed] = objUsed;\n\tinterpreterProxy->pop(5);\n}\n\nEXPORT(sqInt)\nprimitiveAddRect(void)\n{\n    sqInt borderIndex;\n    sqInt borderWidth;\n    sqInt endOop;\n    sqInt failureCode;\n    sqInt fillIndex;\n    int *point;\n    int *point1;\n    int *point2;\n    int *point3;\n    sqInt startOop;\n    float *transform;\n    float *transform1;\n    float *transform2;\n    float *transform3;\n    sqInt x;\n    sqInt x1;\n    sqInt x2;\n    sqInt x3;\n    sqInt y;\n    sqInt y1;\n    sqInt y2;\n    sqInt y3;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 5)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tborderIndex = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(0));\n\tborderWidth = interpreterProxy->stackIntegerValue(1);\n\tfillIndex = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(2));\n\tendOop = interpreterProxy->stackObjectValue(3);\n\tstartOop = interpreterProxy->stackObjectValue(4);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!(((failureCode = quickLoadEngineFromrequiredState(interpreterProxy->stackValue(5), GEStateUnlocked))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tif (!((isFillOkay(borderIndex))\n\t\t && (isFillOkay(fillIndex)))) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFWrongFill);\n\t}\n\tborderIndex = transformColor(borderIndex);\n\tfillIndex = transformColor(fillIndex);\n\tif (engineStopped) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFEngineStopped);\n\t}\n\tif ((fillIndex == 0)\n\t && ((borderIndex == 0)\n || (borderWidth == 0))) {\n\t\treturn interpreterProxy->pop(5);\n\t}\n\tif (!(needAvailableSpace(4 * GLBaseSize))) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFWorkTooBig);\n\t}\n\tif ((borderWidth > 0)\n\t && (borderIndex != 0)) {\n\t\tborderWidth = transformWidth(borderWidth);\n\t}\n\telse {\n\t\tborderWidth = 0;\n\t}\n\tloadPointfrom(point1Get(), startOop);\n\tloadPointfrom(point3Get(), endOop);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFBadPoint);\n\t}\n\t(point2Get())[0] = ((point3Get())[0]);\n\t(point2Get())[1] = ((point1Get())[1]);\n\t(point4Get())[0] = ((point1Get())[0]);\n\t(point4Get())[1] = ((point3Get())[1]);\n\t/* begin transformPoints: */\n\tif (4 > 0) {\n\t\t/* begin transformPoint: */\n\t\t/* begin point1Get */\n\t\tpoint = ((int *) (workBuffer + GWPoint1));\n\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t/* begin transformPoint:into: */\n\t\t\t/* begin transformPointX:y:into: */\n\t\t\t/* begin edgeTransform */\n\t\t\ttransform = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\tx = ((sqInt)(((((transform[0]) * (((double) ((((int *) point))[0]) ))) + ((transform[1]) * (((double) ((((int *) point))[1]) )))) + (transform[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\ty = ((sqInt)(((((transform[3]) * (((double) ((((int *) point))[0]) ))) + ((transform[4]) * (((double) ((((int *) point))[1]) )))) + (transform[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t(((int *) point))[0] = x;\n\t\t\t(((int *) point))[1] = y;\n\t\t}\n\t\telse {\n\t\t\tpoint[0] = (((point[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\tpoint[1] = (((point[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t}\n\t}\n\tif (4 > 1) {\n\t\t/* begin transformPoint: */\n\t\t/* begin point2Get */\n\t\tpoint1 = ((int *) (workBuffer + GWPoint2));\n\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t/* begin transformPoint:into: */\n\t\t\t/* begin transformPointX:y:into: */\n\t\t\t/* begin edgeTransform */\n\t\t\ttransform1 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\tx1 = ((sqInt)(((((transform1[0]) * (((double) ((((int *) point1))[0]) ))) + ((transform1[1]) * (((double) ((((int *) point1))[1]) )))) + (transform1[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\ty1 = ((sqInt)(((((transform1[3]) * (((double) ((((int *) point1))[0]) ))) + ((transform1[4]) * (((double) ((((int *) point1))[1]) )))) + (transform1[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t(((int *) point1))[0] = x1;\n\t\t\t(((int *) point1))[1] = y1;\n\t\t}\n\t\telse {\n\t\t\tpoint1[0] = (((point1[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\tpoint1[1] = (((point1[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t}\n\t}\n\tif (4 > 2) {\n\t\t/* begin transformPoint: */\n\t\t/* begin point3Get */\n\t\tpoint2 = ((int *) (workBuffer + GWPoint3));\n\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t/* begin transformPoint:into: */\n\t\t\t/* begin transformPointX:y:into: */\n\t\t\t/* begin edgeTransform */\n\t\t\ttransform2 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\tx2 = ((sqInt)(((((transform2[0]) * (((double) ((((int *) point2))[0]) ))) + ((transform2[1]) * (((double) ((((int *) point2))[1]) )))) + (transform2[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\ty2 = ((sqInt)(((((transform2[3]) * (((double) ((((int *) point2))[0]) ))) + ((transform2[4]) * (((double) ((((int *) point2))[1]) )))) + (transform2[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t(((int *) point2))[0] = x2;\n\t\t\t(((int *) point2))[1] = y2;\n\t\t}\n\t\telse {\n\t\t\tpoint2[0] = (((point2[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\tpoint2[1] = (((point2[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t}\n\t}\n\tif (4 > 3) {\n\t\t/* begin transformPoint: */\n\t\t/* begin point4Get */\n\t\tpoint3 = ((int *) (workBuffer + GWPoint4));\n\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t/* begin transformPoint:into: */\n\t\t\t/* begin transformPointX:y:into: */\n\t\t\t/* begin edgeTransform */\n\t\t\ttransform3 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\tx3 = ((sqInt)(((((transform3[0]) * (((double) ((((int *) point3))[0]) ))) + ((transform3[1]) * (((double) ((((int *) point3))[1]) )))) + (transform3[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\ty3 = ((sqInt)(((((transform3[3]) * (((double) ((((int *) point3))[0]) ))) + ((transform3[4]) * (((double) ((((int *) point3))[1]) )))) + (transform3[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t(((int *) point3))[0] = x3;\n\t\t\t(((int *) point3))[1] = y3;\n\t\t}\n\t\telse {\n\t\t\tpoint3[0] = (((point3[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\tpoint3[1] = (((point3[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t}\n\t}\n\t/* begin loadRectangle:lineFill:leftFill:rightFill: */\n\tloadWideLinefromtolineFillleftFillrightFill(borderWidth, point1Get(), point2Get(), borderIndex, 0, fillIndex);\n\tloadWideLinefromtolineFillleftFillrightFill(borderWidth, point2Get(), point3Get(), borderIndex, 0, fillIndex);\n\tloadWideLinefromtolineFillleftFillrightFill(borderWidth, point3Get(), point4Get(), borderIndex, 0, fillIndex);\n\tloadWideLinefromtolineFillleftFillrightFill(borderWidth, point4Get(), point1Get(), borderIndex, 0, fillIndex);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFEntityLoadFailed);\n\t}\n\tworkBuffer[GWNeedsFlush] = 1;\n\t/* begin storeEngineStateInto: */\n\tworkBuffer[GWObjUsed] = objUsed;\n\tinterpreterProxy->pop(5);\n}\n\n\n/*\tNote: No need to load either bitBlt or spanBuffer */\n\nEXPORT(sqInt)\nprimitiveChangedActiveEdgeEntry(void)\n{\n    sqInt edge;\n    sqInt edgeOop;\n    sqInt failureCode;\n    sqInt value;\n\n\tif (doProfileStats) {\n\t\tgeProfileTime = interpreterProxy->ioMicroMSecs();\n\t}\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (!(((failureCode = quickLoadEngineFromrequiredState(interpreterProxy->stackValue(1), GEStateWaitingChange))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tedgeOop = interpreterProxy->stackObjectValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tedge = loadEdgeStateFrom(edgeOop);\n\tif (edge == null) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFEdgeDataTooSmall);\n\t}\n\tif ((objBuffer[edge + GENumLines]) == 0) {\n\t\tremoveFirstAETEntry();\n\t}\n\telse {\n\t\tresortFirstAETEntry();\n\t\tworkBuffer[GWAETStart] = ((workBuffer[GWAETStart]) + 1);\n\t}\n\tworkBuffer[GWState] = GEStateUpdateEdges;\n\t/* begin storeEngineStateInto: */\n\tworkBuffer[GWObjUsed] = objUsed;\n\tinterpreterProxy->pop(1);\n\tif (doProfileStats) {\n\t\tworkBuffer[GWCountChangeAETEntry] = ((workBuffer[GWCountChangeAETEntry]) + 1);\n\t\t/* begin incrementStat:by: */\n\t\tvalue = (interpreterProxy->ioMicroMSecs()) - geProfileTime;\n\t\tworkBuffer[GWTimeChangeAETEntry] = ((workBuffer[GWTimeChangeAETEntry]) + value);\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveCopyBuffer(void)\n{\n    sqInt buf1;\n    sqInt buf2;\n    sqInt diff;\n    int *  dst;\n    sqInt failCode;\n    sqInt i;\n    int *  src;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 2)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tbuf2 = interpreterProxy->stackValue(0);\n\n\t/* Make sure the old buffer is properly initialized */\n\n\tbuf1 = interpreterProxy->stackValue(1);\n\tif (!(((failCode = loadWorkBufferFrom(buf1))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failCode);\n\t}\n\tif (!((interpreterProxy->fetchClassOf(buf1)) == (interpreterProxy->fetchClassOf(buf2)))) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFClassMismatch);\n\t}\n\tdiff = (interpreterProxy->slotSizeOf(buf2)) - (interpreterProxy->slotSizeOf(buf1));\n\tif (diff < 0) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFSizeMismatch);\n\t}\n\tsrc = workBuffer;\n\tdst = interpreterProxy->firstIndexableField(buf2);\n\tfor (i = 0; i <= ((workBuffer[GWBufferTop]) - 1); i += 1) {\n\t\tdst[i] = (src[i]);\n\t}\n\tdst[GWBufferTop] = ((workBuffer[GWBufferTop]) + diff);\n\tdst[GWSize] = ((workBuffer[GWSize]) + diff);\n\tsrc += workBuffer[GWBufferTop];\n\tdst = (dst + (workBuffer[GWBufferTop])) + diff;\n\tfor (i = 0; i <= (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 1); i += 1) {\n\t\tdst[i] = (src[i]);\n\t}\n\tif (!(((failCode = loadWorkBufferFrom(buf2))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failCode);\n\t}\n\tinterpreterProxy->pop(2);\n}\n\n\n/*\tNote: Must load bitBlt and spanBuffer */\n\nEXPORT(sqInt)\nprimitiveDisplaySpanBuffer(void)\n{\n    sqInt failureCode;\n    sqInt value;\n\n\tif (doProfileStats) {\n\t\tgeProfileTime = interpreterProxy->ioMicroMSecs();\n\t}\n\tif (!((interpreterProxy->methodArgumentCount()) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (!(((failureCode = quickLoadEngineFromrequiredState(interpreterProxy->stackValue(0), GEStateBlitBuffer))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tif (!(((failureCode = loadSpanBufferFrom(interpreterProxy->fetchPointerofObject(BESpanIndex, engine)))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tif (!(loadBitBltFrom(interpreterProxy->fetchPointerofObject(BEBitBltIndex, engine)))) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFBitBltLoadFailed);\n\t}\n\tif (((workBuffer[GWCurrentY]) & (workBuffer[GWAAScanMask])) == (workBuffer[GWAAScanMask])) {\n\t\tdisplaySpanBufferAt(workBuffer[GWCurrentY]);\n\t\tpostDisplayAction();\n\t}\n\tif (!((workBuffer[GWState]) == GEStateCompleted)) {\n\t\tworkBuffer[GWAETStart] = 0;\n\t\tworkBuffer[GWCurrentY] = ((workBuffer[GWCurrentY]) + 1);\n\t\tworkBuffer[GWState] = GEStateUpdateEdges;\n\t}\n\t/* begin storeEngineStateInto: */\n\tworkBuffer[GWObjUsed] = objUsed;\n\tif (doProfileStats) {\n\t\tworkBuffer[GWCountDisplaySpan] = ((workBuffer[GWCountDisplaySpan]) + 1);\n\t\t/* begin incrementStat:by: */\n\t\tvalue = (interpreterProxy->ioMicroMSecs()) - geProfileTime;\n\t\tworkBuffer[GWTimeDisplaySpan] = ((workBuffer[GWTimeDisplaySpan]) + value);\n\t}\n}\n\n\n/*\tTurn on/off profiling. Return the old value of the flag. */\n\nEXPORT(sqInt)\nprimitiveDoProfileStats(void)\n{\n    sqInt newValue;\n    sqInt oldValue;\n\n\toldValue = doProfileStats;\n\tnewValue = interpreterProxy->stackObjectValue(0);\n\tnewValue = interpreterProxy->booleanValueOf(newValue);\n\tif (!(interpreterProxy->failed())) {\n\t\tdoProfileStats = newValue;\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushBool(oldValue);\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveFinishedProcessing(void)\n{\n    sqInt failureCode;\n    sqInt finished;\n    sqInt value;\n\n\tif (doProfileStats) {\n\t\tgeProfileTime = interpreterProxy->ioMicroMSecs();\n\t}\n\tif (!((interpreterProxy->methodArgumentCount()) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (!(((failureCode = quickLoadEngineFrom(interpreterProxy->stackValue(0)))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tfinished = (workBuffer[GWState]) == GEStateCompleted;\n\t/* begin storeEngineStateInto: */\n\tworkBuffer[GWObjUsed] = objUsed;\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushBool(finished);\n\tif (doProfileStats) {\n\t\tworkBuffer[GWCountFinishTest] = ((workBuffer[GWCountFinishTest]) + 1);\n\t\t/* begin incrementStat:by: */\n\t\tvalue = (interpreterProxy->ioMicroMSecs()) - geProfileTime;\n\t\tworkBuffer[GWTimeFinishTest] = ((workBuffer[GWTimeFinishTest]) + value);\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveGetAALevel(void)\n{\n    sqInt failureCode;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (!(((failureCode = quickLoadEngineFrom(interpreterProxy->stackValue(0)))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(workBuffer[GWAALevel]);\n}\n\nEXPORT(sqInt)\nprimitiveGetBezierStats(void)\n{\n    sqInt failureCode;\n    sqInt statOop;\n    int *stats;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (!(((failureCode = quickLoadEngineFrom(interpreterProxy->stackValue(1)))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tstatOop = interpreterProxy->stackObjectValue(0);\n\tif (!((!(interpreterProxy->failed()))\n\t\t && ((interpreterProxy->isWords(statOop))\n && ((interpreterProxy->slotSizeOf(statOop)) >= 4)))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tstats = interpreterProxy->firstIndexableField(statOop);\n\tstats[0] = ((stats[0]) + (workBuffer[GWBezierMonotonSubdivisions]));\n\tstats[1] = ((stats[1]) + (workBuffer[GWBezierHeightSubdivisions]));\n\tstats[2] = ((stats[2]) + (workBuffer[GWBezierOverflowSubdivisions]));\n\tstats[3] = ((stats[3]) + (workBuffer[GWBezierLineConversions]));\n\tinterpreterProxy->pop(1);\n}\n\nEXPORT(sqInt)\nprimitiveGetClipRect(void)\n{\n    sqInt failureCode;\n    sqInt pointOop;\n    sqInt rectOop;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (!(((failureCode = quickLoadEngineFrom(interpreterProxy->stackValue(1)))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\trectOop = interpreterProxy->stackObjectValue(0);\n\tif (!((!(interpreterProxy->failed()))\n\t\t && ((interpreterProxy->isPointers(rectOop))\n && ((interpreterProxy->slotSizeOf(rectOop)) >= 2)))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tinterpreterProxy->pushRemappableOop(rectOop);\n\tpointOop = interpreterProxy->makePointwithxValueyValue(workBuffer[GWClipMinX], workBuffer[GWClipMinY]);\n\tinterpreterProxy->storePointerofObjectwithValue(0, interpreterProxy->topRemappableOop(), pointOop);\n\tpointOop = interpreterProxy->makePointwithxValueyValue(workBuffer[GWClipMaxX], workBuffer[GWClipMaxY]);\n\trectOop = interpreterProxy->popRemappableOop();\n\tinterpreterProxy->storePointerofObjectwithValue(1, rectOop, pointOop);\n\tinterpreterProxy->popthenPush(2, rectOop);\n}\n\nEXPORT(sqInt)\nprimitiveGetCounts(void)\n{\n    sqInt failureCode;\n    sqInt statOop;\n    int *stats;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (!(((failureCode = quickLoadEngineFrom(interpreterProxy->stackValue(1)))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tstatOop = interpreterProxy->stackObjectValue(0);\n\tif (!((!(interpreterProxy->failed()))\n\t\t && ((interpreterProxy->isWords(statOop))\n && ((interpreterProxy->slotSizeOf(statOop)) >= 9)))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tstats = interpreterProxy->firstIndexableField(statOop);\n\tstats[0] = ((stats[0]) + (workBuffer[GWCountInitializing]));\n\tstats[1] = ((stats[1]) + (workBuffer[GWCountFinishTest]));\n\tstats[2] = ((stats[2]) + (workBuffer[GWCountNextGETEntry]));\n\tstats[3] = ((stats[3]) + (workBuffer[GWCountAddAETEntry]));\n\tstats[4] = ((stats[4]) + (workBuffer[GWCountNextFillEntry]));\n\tstats[5] = ((stats[5]) + (workBuffer[GWCountMergeFill]));\n\tstats[6] = ((stats[6]) + (workBuffer[GWCountDisplaySpan]));\n\tstats[7] = ((stats[7]) + (workBuffer[GWCountNextAETEntry]));\n\tstats[8] = ((stats[8]) + (workBuffer[GWCountChangeAETEntry]));\n\tinterpreterProxy->pop(1);\n}\n\nEXPORT(sqInt)\nprimitiveGetDepth(void)\n{\n    sqInt failureCode;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (!(((failureCode = quickLoadEngineFrom(interpreterProxy->stackValue(0)))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(workBuffer[GWCurrentZ]);\n}\n\n\n/*\tReturn the reason why the last operation failed. */\n\nEXPORT(sqInt)\nprimitiveGetFailureReason(void)\n{\n    sqInt failCode;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\n\t/* Note -- don't call loadEngineFrom here because this will override the stopReason with Zero */\n\n\tengine = interpreterProxy->stackValue(0);\n\tif ((engine & 1)) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFEngineIsInteger);\n\t}\n\tif (!(interpreterProxy->isPointers(engine))) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFEngineIsWords);\n\t}\n\tif ((interpreterProxy->slotSizeOf(engine)) < BEBalloonEngineSize) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFEngineTooSmall);\n\t}\n\tif (!(((failCode = loadWorkBufferFrom(interpreterProxy->fetchPointerofObject(BEWorkBufferIndex, engine)))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failCode);\n\t}\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(workBuffer[GWStopReason]);\n}\n\nEXPORT(sqInt)\nprimitiveGetOffset(void)\n{\n    sqInt failureCode;\n    sqInt pointOop;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (!(((failureCode = quickLoadEngineFrom(interpreterProxy->stackValue(0)))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tpointOop = interpreterProxy->makePointwithxValueyValue(workBuffer[GWDestOffsetX], workBuffer[GWDestOffsetY]);\n\tinterpreterProxy->popthenPush(1, pointOop);\n}\n\nEXPORT(sqInt)\nprimitiveGetTimes(void)\n{\n    sqInt failureCode;\n    sqInt statOop;\n    int *stats;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (!(((failureCode = quickLoadEngineFrom(interpreterProxy->stackValue(1)))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tstatOop = interpreterProxy->stackObjectValue(0);\n\tif (!((!(interpreterProxy->failed()))\n\t\t && ((interpreterProxy->isWords(statOop))\n && ((interpreterProxy->slotSizeOf(statOop)) >= 9)))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tstats = interpreterProxy->firstIndexableField(statOop);\n\tstats[0] = ((stats[0]) + (workBuffer[GWTimeInitializing]));\n\tstats[1] = ((stats[1]) + (workBuffer[GWTimeFinishTest]));\n\tstats[2] = ((stats[2]) + (workBuffer[GWTimeNextGETEntry]));\n\tstats[3] = ((stats[3]) + (workBuffer[GWTimeAddAETEntry]));\n\tstats[4] = ((stats[4]) + (workBuffer[GWTimeNextFillEntry]));\n\tstats[5] = ((stats[5]) + (workBuffer[GWTimeMergeFill]));\n\tstats[6] = ((stats[6]) + (workBuffer[GWTimeDisplaySpan]));\n\tstats[7] = ((stats[7]) + (workBuffer[GWTimeNextAETEntry]));\n\tstats[8] = ((stats[8]) + (workBuffer[GWTimeChangeAETEntry]));\n\tinterpreterProxy->pop(1);\n}\n\nEXPORT(sqInt)\nprimitiveInitializeBuffer(void)\n{\n    sqInt size;\n    sqInt wbOop;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\twbOop = interpreterProxy->stackObjectValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!(interpreterProxy->isWords(wbOop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (((size = interpreterProxy->slotSizeOf(wbOop))) < GWMinimalSize) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\t/* begin workBufferPut: */\n\tworkBuffer = interpreterProxy->firstIndexableField(wbOop);\n\tobjBuffer = workBuffer + GWHeaderSize;\n\tworkBuffer[GWMagicIndex] = GWMagicNumber;\n\tworkBuffer[GWSize] = size;\n\tworkBuffer[GWBufferTop] = size;\n\tworkBuffer[GWState] = GEStateUnlocked;\n\tworkBuffer[GWObjStart] = GWHeaderSize;\n\tworkBuffer[GWObjUsed] = 4;\n\tobjBuffer[0 + GEObjectType] = GEPrimitiveFill;\n\tobjBuffer[0 + GEObjectLength] = 4;\n\tobjBuffer[0 + GEObjectIndex] = 0;\n\tworkBuffer[GWGETStart] = 0;\n\tworkBuffer[GWGETUsed] = 0;\n\tworkBuffer[GWAETStart] = 0;\n\tworkBuffer[GWAETUsed] = 0;\n\tworkBuffer[GWStopReason] = 0;\n\tworkBuffer[GWNeedsFlush] = 0;\n\tworkBuffer[GWClipMinX] = 0;\n\tworkBuffer[GWClipMaxX] = 0;\n\tworkBuffer[GWClipMinY] = 0;\n\tworkBuffer[GWClipMaxY] = 0;\n\tworkBuffer[GWCurrentZ] = 0;\n\tresetGraphicsEngineStats();\n\tinitEdgeTransform();\n\tinitColorTransform();\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->push(wbOop);\n}\n\n\n/*\tNote: No need to load bitBlt but must load spanBuffer */\n\nEXPORT(sqInt)\nprimitiveInitializeProcessing(void)\n{\n    sqInt failureCode;\n    sqInt value;\n\n\tif (doProfileStats) {\n\t\tgeProfileTime = interpreterProxy->ioMicroMSecs();\n\t}\n\tif (!((interpreterProxy->methodArgumentCount()) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (!(((failureCode = quickLoadEngineFromrequiredState(interpreterProxy->stackValue(0), GEStateUnlocked))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tif (!(((failureCode = loadSpanBufferFrom(interpreterProxy->fetchPointerofObject(BESpanIndex, engine)))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tinitializeGETProcessing();\n\tif (engineStopped) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFEngineStopped);\n\t}\n\tworkBuffer[GWState] = GEStateAddingFromGET;\n\tif (!(interpreterProxy->failed())) {\n\t\t/* begin storeEngineStateInto: */\n\t\tworkBuffer[GWObjUsed] = objUsed;\n\t}\n\tif (doProfileStats) {\n\t\tworkBuffer[GWCountInitializing] = ((workBuffer[GWCountInitializing]) + 1);\n\t\t/* begin incrementStat:by: */\n\t\tvalue = (interpreterProxy->ioMicroMSecs()) - geProfileTime;\n\t\tworkBuffer[GWTimeInitializing] = ((workBuffer[GWTimeInitializing]) + value);\n\t}\n}\n\n\n/*\tNote: No need to load bitBlt but must load spanBuffer */\n\nEXPORT(sqInt)\nprimitiveMergeFillFrom(void)\n{\n    sqInt bitsOop;\n    sqInt failureCode;\n    sqInt fillOop;\n    sqInt value;\n    sqInt value1;\n\n\tif (doProfileStats) {\n\t\tgeProfileTime = interpreterProxy->ioMicroMSecs();\n\t}\n\tif (!((interpreterProxy->methodArgumentCount()) == 2)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (!(((failureCode = quickLoadEngineFromrequiredState(interpreterProxy->stackValue(2), GEStateWaitingForFill))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tif (!(((failureCode = loadSpanBufferFrom(interpreterProxy->fetchPointerofObject(BESpanIndex, engine)))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tfillOop = interpreterProxy->stackObjectValue(0);\n\n\t/* Check bitmap */\n\n\tbitsOop = interpreterProxy->stackObjectValue(1);\n\tif (!((!(interpreterProxy->failed()))\n\t\t && ((interpreterProxy->fetchClassOf(bitsOop)) == (interpreterProxy->classBitmap())))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif ((interpreterProxy->slotSizeOf(fillOop)) < FTBalloonFillDataSize) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFFillDataTooSmall);\n\t}\n\tvalue = interpreterProxy->fetchIntegerofObject(FTIndexIndex, fillOop);\n\tif (!((objBuffer[(workBuffer[GWLastExportedFill]) + GEObjectIndex]) == value)) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFWrongFill);\n\t}\n\tvalue = interpreterProxy->fetchIntegerofObject(FTMinXIndex, fillOop);\n\tif (!((workBuffer[GWLastExportedLeftX]) == value)) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFWrongFill);\n\t}\n\tvalue = interpreterProxy->fetchIntegerofObject(FTMaxXIndex, fillOop);\n\tif (!((workBuffer[GWLastExportedRightX]) == value)) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFWrongFill);\n\t}\n\tif ((interpreterProxy->slotSizeOf(bitsOop)) < ((workBuffer[GWLastExportedRightX]) - (workBuffer[GWLastExportedLeftX]))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfillBitmapSpanfromto(interpreterProxy->firstIndexableField(bitsOop), workBuffer[GWLastExportedLeftX], workBuffer[GWLastExportedRightX]);\n\tworkBuffer[GWState] = GEStateScanningAET;\n\t/* begin storeEngineStateInto: */\n\tworkBuffer[GWObjUsed] = objUsed;\n\tinterpreterProxy->pop(2);\n\tif (doProfileStats) {\n\t\tworkBuffer[GWCountMergeFill] = ((workBuffer[GWCountMergeFill]) + 1);\n\t\t/* begin incrementStat:by: */\n\t\tvalue1 = (interpreterProxy->ioMicroMSecs()) - geProfileTime;\n\t\tworkBuffer[GWTimeMergeFill] = ((workBuffer[GWTimeMergeFill]) + value1);\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveNeedsFlush(void)\n{\n    sqInt failureCode;\n    sqInt needFlush;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (!(((failureCode = quickLoadEngineFrom(interpreterProxy->stackValue(0)))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tneedFlush = (workBuffer[GWNeedsFlush]) != 0;\n\t/* begin storeEngineStateInto: */\n\tworkBuffer[GWObjUsed] = objUsed;\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushBool(needFlush);\n}\n\nEXPORT(sqInt)\nprimitiveNeedsFlushPut(void)\n{\n    sqInt failureCode;\n    sqInt needFlush;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (!(((failureCode = quickLoadEngineFrom(interpreterProxy->stackValue(1)))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tneedFlush = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(0));\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (needFlush == 1) {\n\t\tworkBuffer[GWNeedsFlush] = 1;\n\t}\n\telse {\n\t\tworkBuffer[GWNeedsFlush] = 0;\n\t}\n\t/* begin storeEngineStateInto: */\n\tworkBuffer[GWObjUsed] = objUsed;\n\tinterpreterProxy->pop(1);\n}\n\n\n/*\tNote: No need to load either bitBlt or spanBuffer */\n\nEXPORT(sqInt)\nprimitiveNextActiveEdgeEntry(void)\n{\n    sqInt edge;\n    sqInt edgeOop;\n    sqInt failureCode;\n    sqInt hasEdge;\n    sqInt value;\n\n\tif (doProfileStats) {\n\t\tgeProfileTime = interpreterProxy->ioMicroMSecs();\n\t}\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (!(((failureCode = quickLoadEngineFromrequiredStateor(interpreterProxy->stackValue(1), GEStateUpdateEdges, GEStateCompleted))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tedgeOop = interpreterProxy->stackObjectValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\thasEdge = 0;\n\tif (!((workBuffer[GWState]) == GEStateCompleted)) {\n\t\thasEdge = findNextExternalUpdateFromAET();\n\t\tif (hasEdge) {\n\t\t\tedge = aetBuffer[workBuffer[GWAETStart]];\n\t\t\tstoreEdgeStateFrominto(edge, edgeOop);\n\t\t\tworkBuffer[GWState] = GEStateWaitingChange;\n\t\t}\n\t\telse {\n\t\t\tworkBuffer[GWState] = GEStateAddingFromGET;\n\t\t}\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin storeEngineStateInto: */\n\tworkBuffer[GWObjUsed] = objUsed;\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->pushBool(!hasEdge);\n\tif (doProfileStats) {\n\t\tworkBuffer[GWCountNextAETEntry] = ((workBuffer[GWCountNextAETEntry]) + 1);\n\t\t/* begin incrementStat:by: */\n\t\tvalue = (interpreterProxy->ioMicroMSecs()) - geProfileTime;\n\t\tworkBuffer[GWTimeNextAETEntry] = ((workBuffer[GWTimeNextAETEntry]) + value);\n\t}\n}\n\n\n/*\tNote: No need to load bitBlt but must load spanBuffer */\n\nEXPORT(sqInt)\nprimitiveNextFillEntry(void)\n{\n    sqInt failureCode;\n    sqInt fillOop;\n    sqInt hasFill;\n    sqInt value;\n\n\tif (doProfileStats) {\n\t\tgeProfileTime = interpreterProxy->ioMicroMSecs();\n\t}\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (!(((failureCode = quickLoadEngineFromrequiredState(interpreterProxy->stackValue(1), GEStateScanningAET))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tif (!(((failureCode = loadSpanBufferFrom(interpreterProxy->fetchPointerofObject(BESpanIndex, engine)))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tif (!(loadFormsFrom(interpreterProxy->fetchPointerofObject(BEFormsIndex, engine)))) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFFormLoadFailed);\n\t}\n\tif (!((workBuffer[GWClearSpanBuffer]) == 0)) {\n\t\tif (((workBuffer[GWCurrentY]) & (workBuffer[GWAAScanMask])) == 0) {\n\t\t\tclearSpanBuffer();\n\t\t}\n\t\tworkBuffer[GWClearSpanBuffer] = 0;\n\t}\n\tfillOop = interpreterProxy->stackObjectValue(0);\n\thasFill = findNextExternalFillFromAET();\n\tif (engineStopped) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFEngineStopped);\n\t}\n\tif (hasFill) {\n\t\tstoreFillStateInto(fillOop);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFWrongFill);\n\t}\n\tif (hasFill) {\n\t\tworkBuffer[GWState] = GEStateWaitingForFill;\n\t}\n\telse {\n\t\t/* begin wbStackClear */\n\t\tworkBuffer[GWBufferTop] = (workBuffer[GWSize]);\n\t\tworkBuffer[GWSpanEndAA] = 0;\n\t\tworkBuffer[GWState] = GEStateBlitBuffer;\n\t}\n\t/* begin storeEngineStateInto: */\n\tworkBuffer[GWObjUsed] = objUsed;\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->pushBool(!hasFill);\n\tif (doProfileStats) {\n\t\tworkBuffer[GWCountNextFillEntry] = ((workBuffer[GWCountNextFillEntry]) + 1);\n\t\t/* begin incrementStat:by: */\n\t\tvalue = (interpreterProxy->ioMicroMSecs()) - geProfileTime;\n\t\tworkBuffer[GWTimeNextFillEntry] = ((workBuffer[GWTimeNextFillEntry]) + value);\n\t}\n}\n\n\n/*\tNote: No need to load either bitBlt or spanBuffer */\n\nEXPORT(sqInt)\nprimitiveNextGlobalEdgeEntry(void)\n{\n    sqInt edge;\n    sqInt edgeOop;\n    sqInt failureCode;\n    sqInt hasEdge;\n    sqInt value;\n\n\tif (doProfileStats) {\n\t\tgeProfileTime = interpreterProxy->ioMicroMSecs();\n\t}\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (!(((failureCode = quickLoadEngineFromrequiredState(interpreterProxy->stackValue(1), GEStateAddingFromGET))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tedgeOop = interpreterProxy->stackObjectValue(0);\n\thasEdge = findNextExternalEntryFromGET();\n\tif (hasEdge) {\n\t\tedge = getBuffer[workBuffer[GWGETStart]];\n\t\tstoreEdgeStateFrominto(edge, edgeOop);\n\t\tworkBuffer[GWGETStart] = ((workBuffer[GWGETStart]) + 1);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFWrongEdge);\n\t}\n\tif (hasEdge) {\n\t\tworkBuffer[GWState] = GEStateWaitingForEdge;\n\t}\n\telse {\n\t\tworkBuffer[GWState] = GEStateScanningAET;\n\t\tworkBuffer[GWClearSpanBuffer] = 1;\n\t\tworkBuffer[GWAETStart] = 0;\n\t\t/* begin wbStackClear */\n\t\tworkBuffer[GWBufferTop] = (workBuffer[GWSize]);\n\t}\n\t/* begin storeEngineStateInto: */\n\tworkBuffer[GWObjUsed] = objUsed;\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->pushBool(!hasEdge);\n\tif (doProfileStats) {\n\t\tworkBuffer[GWCountNextGETEntry] = ((workBuffer[GWCountNextGETEntry]) + 1);\n\t\t/* begin incrementStat:by: */\n\t\tvalue = (interpreterProxy->ioMicroMSecs()) - geProfileTime;\n\t\tworkBuffer[GWTimeNextGETEntry] = ((workBuffer[GWTimeNextGETEntry]) + value);\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveRegisterExternalEdge(void)\n{\n    sqInt edge;\n    sqInt failureCode;\n    sqInt index;\n    sqInt initialX;\n    sqInt initialY;\n    sqInt initialZ;\n    sqInt leftFillIndex;\n    sqInt rightFillIndex;\n    sqInt value;\n    sqInt value1;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 6)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (!(((failureCode = quickLoadEngineFromrequiredState(interpreterProxy->stackValue(6), GEStateUnlocked))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\trightFillIndex = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(0));\n\tleftFillIndex = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(1));\n\tinitialZ = interpreterProxy->stackIntegerValue(2);\n\tinitialY = interpreterProxy->stackIntegerValue(3);\n\tinitialX = interpreterProxy->stackIntegerValue(4);\n\tindex = interpreterProxy->stackIntegerValue(5);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!(allocateObjEntry(GEBaseEdgeSize))) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFWorkTooBig);\n\t}\n\tif (!((isFillOkay(leftFillIndex))\n\t\t && (isFillOkay(rightFillIndex)))) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFWrongFill);\n\t}\n\tedge = objUsed;\n\n\t/* Install type and length */\n\n\tobjUsed = edge + GEBaseEdgeSize;\n\tobjBuffer[edge + GEObjectType] = GEPrimitiveEdge;\n\tobjBuffer[edge + GEObjectLength] = GEBaseEdgeSize;\n\tobjBuffer[edge + GEObjectIndex] = index;\n\tobjBuffer[edge + GEXValue] = initialX;\n\tobjBuffer[edge + GEYValue] = initialY;\n\tobjBuffer[edge + GEZValue] = initialZ;\n\t/* begin edgeLeftFillOf:put: */\n\tvalue = transformColor(leftFillIndex);\n\tobjBuffer[edge + GEFillIndexLeft] = value;\n\t/* begin edgeRightFillOf:put: */\n\tvalue1 = transformColor(rightFillIndex);\n\tobjBuffer[edge + GEFillIndexRight] = value1;\n\tif (engineStopped) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFEngineStopped);\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\t/* begin storeEngineStateInto: */\n\t\tworkBuffer[GWObjUsed] = objUsed;\n\t\tinterpreterProxy->pop(6);\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveRegisterExternalFill(void)\n{\n    sqInt failureCode;\n    sqInt fill;\n    sqInt index;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (!(((failureCode = quickLoadEngineFromrequiredState(interpreterProxy->stackValue(1), GEStateUnlocked))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tindex = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tfill = 0;\n\twhile (fill == 0) {\n\t\tif (!(allocateObjEntry(GEBaseEdgeSize))) {\n\t\t\treturn interpreterProxy->primitiveFailFor(GEFWorkTooBig);\n\t\t}\n\t\tfill = objUsed;\n\n\t\t/* Install type and length */\n\n\t\tobjUsed = fill + GEBaseFillSize;\n\t\tobjBuffer[fill + GEObjectType] = GEPrimitiveFill;\n\t\tobjBuffer[fill + GEObjectLength] = GEBaseFillSize;\n\t\tobjBuffer[fill + GEObjectIndex] = index;\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\t/* begin storeEngineStateInto: */\n\t\tworkBuffer[GWObjUsed] = objUsed;\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(fill);\n\t}\n}\n\n\n/*\tStart/Proceed rendering the entire image */\n\nEXPORT(sqInt)\nprimitiveRenderImage(void)\n{\n    sqInt failCode;\n\n\tif (!(((failCode = loadRenderingState())) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failCode);\n\t}\n\tproceedRenderingScanline();\n\tif (engineStopped) {\n\t\treturn storeRenderingState();\n\t}\n\tproceedRenderingImage();\n\tstoreRenderingState();\n}\n\n\n/*\tStart rendering the entire image */\n\nEXPORT(sqInt)\nprimitiveRenderScanline(void)\n{\n    sqInt failCode;\n\n\tif (!(((failCode = loadRenderingState())) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failCode);\n\t}\n\tproceedRenderingScanline();\n\tstoreRenderingState();\n}\n\nEXPORT(sqInt)\nprimitiveSetAALevel(void)\n{\n    sqInt failureCode;\n    sqInt level;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (!(((failureCode = quickLoadEngineFromrequiredState(interpreterProxy->stackValue(1), GEStateUnlocked))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tlevel = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tsetAALevel(level);\n\t/* begin storeEngineStateInto: */\n\tworkBuffer[GWObjUsed] = objUsed;\n\tinterpreterProxy->pop(1);\n}\n\n\n/*\tPrimitive. Set the BitBlt plugin to use. */\n\nEXPORT(sqInt)\nprimitiveSetBitBltPlugin(void)\n{\n    sqInt i;\n    sqInt length;\n    sqInt needReload;\n    sqInt pluginName;\n    char *ptr;\n\n\n\t/* Must be string to work */\n\n\tpluginName = interpreterProxy->stackValue(0);\n\tif (!(interpreterProxy->isBytes(pluginName))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tlength = interpreterProxy->byteSizeOf(pluginName);\n\tif (length >= 256) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tptr = interpreterProxy->firstIndexableField(pluginName);\n\tneedReload = 0;\n\tfor (i = 0; i <= (length - 1); i += 1) {\n\t\tif (!((bbPluginName[i]) == (ptr[i]))) {\n\t\t\tbbPluginName[i] = (ptr[i]);\n\t\t\tneedReload = 1;\n\t\t}\n\t}\n\tif (!((bbPluginName[length]) == 0)) {\n\t\tbbPluginName[length] = 0;\n\t\tneedReload = 1;\n\t}\n\tif (needReload) {\n\t\tif (!(initialiseModule())) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\tinterpreterProxy->pop(1);\n}\n\nEXPORT(sqInt)\nprimitiveSetClipRect(void)\n{\n    sqInt failureCode;\n    sqInt rectOop;\n    sqInt value;\n    sqInt value1;\n    sqInt value2;\n    sqInt value3;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (!(((failureCode = quickLoadEngineFromrequiredState(interpreterProxy->stackValue(1), GEStateUnlocked))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\trectOop = interpreterProxy->stackObjectValue(0);\n\tif (!((!(interpreterProxy->failed()))\n\t\t && ((interpreterProxy->isPointers(rectOop))\n && ((interpreterProxy->slotSizeOf(rectOop)) >= 2)))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tloadPointfrom(point1Get(), interpreterProxy->fetchPointerofObject(0, rectOop));\n\tloadPointfrom(point2Get(), interpreterProxy->fetchPointerofObject(1, rectOop));\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\t/* begin clipMinXPut: */\n\tvalue = (point1Get())[0];\n\tworkBuffer[GWClipMinX] = value;\n\t/* begin clipMinYPut: */\n\tvalue1 = (point1Get())[1];\n\tworkBuffer[GWClipMinY] = value1;\n\t/* begin clipMaxXPut: */\n\tvalue2 = (point2Get())[0];\n\tworkBuffer[GWClipMaxX] = value2;\n\t/* begin clipMaxYPut: */\n\tvalue3 = (point2Get())[1];\n\tworkBuffer[GWClipMaxY] = value3;\n\t/* begin storeEngineStateInto: */\n\tworkBuffer[GWObjUsed] = objUsed;\n\tinterpreterProxy->pop(1);\n}\n\nEXPORT(sqInt)\nprimitiveSetColorTransform(void)\n{\n    sqInt failureCode;\n    sqInt okay;\n    float *transform;\n    sqInt transformOop;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (!(((failureCode = quickLoadEngineFromrequiredState(interpreterProxy->stackValue(1), GEStateUnlocked))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\ttransformOop = interpreterProxy->stackObjectValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\t/* begin loadColorTransformFrom: */\n\t/* begin colorTransform */\n\ttransform = ((float *) (workBuffer + GWColorTransform));\n\tworkBuffer[GWHasColorTransform] = 0;\n\tokay = loadTransformFromintolength(transformOop, transform, 8);\n\tif (!(okay)) {\n\t\tgoto l1;\n\t}\n\tworkBuffer[GWHasColorTransform] = 1;\n\ttransform[1] = ((transform[1]) * (((float) 256.0)));\n\ttransform[3] = ((transform[3]) * (((float) 256.0)));\n\ttransform[5] = ((transform[5]) * (((float) 256.0)));\n\ttransform[7] = ((transform[7]) * (((float) 256.0)));\nl1:\t/* end loadColorTransformFrom: */;\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(GEFEntityLoadFailed);\n\t}\n\t/* begin storeEngineStateInto: */\n\tworkBuffer[GWObjUsed] = objUsed;\n\tinterpreterProxy->pop(1);\n}\n\nEXPORT(sqInt)\nprimitiveSetDepth(void)\n{\n    sqInt depth;\n    sqInt failureCode;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (!(((failureCode = quickLoadEngineFromrequiredState(interpreterProxy->stackValue(1), GEStateUnlocked))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tdepth = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tworkBuffer[GWCurrentZ] = depth;\n\t/* begin storeEngineStateInto: */\n\tworkBuffer[GWObjUsed] = objUsed;\n\tinterpreterProxy->pop(1);\n}\n\nEXPORT(sqInt)\nprimitiveSetEdgeTransform(void)\n{\n    sqInt failureCode;\n    sqInt transformOop;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (!(((failureCode = quickLoadEngineFromrequiredState(interpreterProxy->stackValue(1), GEStateUnlocked))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\ttransformOop = interpreterProxy->stackObjectValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tloadEdgeTransformFrom(transformOop);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\t/* begin storeEngineStateInto: */\n\tworkBuffer[GWObjUsed] = objUsed;\n\tinterpreterProxy->pop(1);\n}\n\nEXPORT(sqInt)\nprimitiveSetOffset(void)\n{\n    sqInt failureCode;\n    sqInt pointOop;\n    sqInt value;\n    sqInt value1;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (!(((failureCode = quickLoadEngineFromrequiredState(interpreterProxy->stackValue(1), GEStateUnlocked))) == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(failureCode);\n\t}\n\tpointOop = interpreterProxy->stackValue(0);\n\tif (!((interpreterProxy->fetchClassOf(pointOop)) == (interpreterProxy->classPoint()))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tloadPointfrom(point1Get(), pointOop);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\t/* begin destOffsetXPut: */\n\tvalue = (point1Get())[0];\n\tworkBuffer[GWDestOffsetX] = value;\n\t/* begin destOffsetYPut: */\n\tvalue1 = (point1Get())[1];\n\tworkBuffer[GWDestOffsetY] = value1;\n\t/* begin storeEngineStateInto: */\n\tworkBuffer[GWObjUsed] = objUsed;\n\tinterpreterProxy->pop(1);\n}\n\n\n/*\tThis is the main rendering entry */\n\nstatic sqInt\nproceedRenderingImage(void)\n{\n    sqInt external;\n    sqInt value;\n    sqInt value1;\n    sqInt value2;\n    sqInt value3;\n\n\twhile (!((workBuffer[GWState]) == GEStateCompleted)) {\n\t\tif (doProfileStats) {\n\t\t\tgeProfileTime = interpreterProxy->ioMicroMSecs();\n\t\t}\n\t\texternal = findNextExternalEntryFromGET();\n\t\tif (doProfileStats) {\n\t\t\tworkBuffer[GWCountNextGETEntry] = ((workBuffer[GWCountNextGETEntry]) + 1);\n\t\t\t/* begin incrementStat:by: */\n\t\t\tvalue = (interpreterProxy->ioMicroMSecs()) - geProfileTime;\n\t\t\tworkBuffer[GWTimeNextGETEntry] = ((workBuffer[GWTimeNextGETEntry]) + value);\n\t\t}\n\t\tif (engineStopped) {\n\t\t\treturn workBuffer[GWState] = GEStateAddingFromGET;\n\t\t}\n\t\tif (external) {\n\t\t\tworkBuffer[GWState] = GEStateWaitingForEdge;\n\t\t\t/* begin stopBecauseOf: */\n\t\t\tworkBuffer[GWStopReason] = GErrorGETEntry;\n\t\t\tengineStopped = 1;\n\t\t\treturn null;\n\t\t}\n\t\tworkBuffer[GWAETStart] = 0;\n\t\t/* begin wbStackClear */\n\t\tworkBuffer[GWBufferTop] = (workBuffer[GWSize]);\n\t\tworkBuffer[GWClearSpanBuffer] = 1;\n\t\tif (doProfileStats) {\n\t\t\tgeProfileTime = interpreterProxy->ioMicroMSecs();\n\t\t}\n\t\tif (((workBuffer[GWClearSpanBuffer]) != 0)\n\t\t && (((workBuffer[GWCurrentY]) & (workBuffer[GWAAScanMask])) == 0)) {\n\t\t\tclearSpanBuffer();\n\t\t}\n\t\tworkBuffer[GWClearSpanBuffer] = 0;\n\t\texternal = findNextExternalFillFromAET();\n\t\tif (doProfileStats) {\n\t\t\tworkBuffer[GWCountNextFillEntry] = ((workBuffer[GWCountNextFillEntry]) + 1);\n\t\t\t/* begin incrementStat:by: */\n\t\t\tvalue1 = (interpreterProxy->ioMicroMSecs()) - geProfileTime;\n\t\t\tworkBuffer[GWTimeNextFillEntry] = ((workBuffer[GWTimeNextFillEntry]) + value1);\n\t\t}\n\t\tif (engineStopped) {\n\t\t\treturn workBuffer[GWState] = GEStateScanningAET;\n\t\t}\n\t\tif (external) {\n\t\t\tworkBuffer[GWState] = GEStateWaitingForFill;\n\t\t\t/* begin stopBecauseOf: */\n\t\t\tworkBuffer[GWStopReason] = GErrorFillEntry;\n\t\t\tengineStopped = 1;\n\t\t\treturn null;\n\t\t}\n\t\t/* begin wbStackClear */\n\t\tworkBuffer[GWBufferTop] = (workBuffer[GWSize]);\n\t\tworkBuffer[GWSpanEndAA] = 0;\n\t\tif (doProfileStats) {\n\t\t\tgeProfileTime = interpreterProxy->ioMicroMSecs();\n\t\t}\n\t\tif (((workBuffer[GWCurrentY]) & (workBuffer[GWAAScanMask])) == (workBuffer[GWAAScanMask])) {\n\t\t\tdisplaySpanBufferAt(workBuffer[GWCurrentY]);\n\t\t\tpostDisplayAction();\n\t\t}\n\t\tif (doProfileStats) {\n\t\t\tworkBuffer[GWCountDisplaySpan] = ((workBuffer[GWCountDisplaySpan]) + 1);\n\t\t\t/* begin incrementStat:by: */\n\t\t\tvalue2 = (interpreterProxy->ioMicroMSecs()) - geProfileTime;\n\t\t\tworkBuffer[GWTimeDisplaySpan] = ((workBuffer[GWTimeDisplaySpan]) + value2);\n\t\t}\n\t\tif (engineStopped) {\n\t\t\treturn workBuffer[GWState] = GEStateBlitBuffer;\n\t\t}\n\t\tif ((workBuffer[GWState]) == GEStateCompleted) {\n\t\t\treturn 0;\n\t\t}\n\t\tworkBuffer[GWAETStart] = 0;\n\t\tworkBuffer[GWCurrentY] = ((workBuffer[GWCurrentY]) + 1);\n\t\tif (doProfileStats) {\n\t\t\tgeProfileTime = interpreterProxy->ioMicroMSecs();\n\t\t}\n\t\texternal = findNextExternalUpdateFromAET();\n\t\tif (doProfileStats) {\n\t\t\tworkBuffer[GWCountNextAETEntry] = ((workBuffer[GWCountNextAETEntry]) + 1);\n\t\t\t/* begin incrementStat:by: */\n\t\t\tvalue3 = (interpreterProxy->ioMicroMSecs()) - geProfileTime;\n\t\t\tworkBuffer[GWTimeNextAETEntry] = ((workBuffer[GWTimeNextAETEntry]) + value3);\n\t\t}\n\t\tif (engineStopped) {\n\t\t\treturn workBuffer[GWState] = GEStateUpdateEdges;\n\t\t}\n\t\tif (external) {\n\t\t\tworkBuffer[GWState] = GEStateWaitingChange;\n\t\t\t/* begin stopBecauseOf: */\n\t\t\tworkBuffer[GWStopReason] = GErrorAETEntry;\n\t\t\tengineStopped = 1;\n\t\t\treturn null;\n\t\t}\n\t}\n}\n\n\n/*\tProceed rendering the current scan line.\n\tThis method may be called after some Smalltalk code has been executed\n\tinbetween. \n */\n/*\tThis is the main rendering entry */\n\nstatic sqInt\nproceedRenderingScanline(void)\n{\n    sqInt external;\n    sqInt state;\n    sqInt value;\n    sqInt value1;\n    sqInt value2;\n    sqInt value3;\n\n\tstate = workBuffer[GWState];\n\tif (state == GEStateUnlocked) {\n\t\tinitializeGETProcessing();\n\t\tif (engineStopped) {\n\t\t\treturn 0;\n\t\t}\n\t\tstate = GEStateAddingFromGET;\n\t}\n\tif (state == GEStateAddingFromGET) {\n\t\tif (doProfileStats) {\n\t\t\tgeProfileTime = interpreterProxy->ioMicroMSecs();\n\t\t}\n\t\texternal = findNextExternalEntryFromGET();\n\t\tif (doProfileStats) {\n\t\t\tworkBuffer[GWCountNextGETEntry] = ((workBuffer[GWCountNextGETEntry]) + 1);\n\t\t\t/* begin incrementStat:by: */\n\t\t\tvalue = (interpreterProxy->ioMicroMSecs()) - geProfileTime;\n\t\t\tworkBuffer[GWTimeNextGETEntry] = ((workBuffer[GWTimeNextGETEntry]) + value);\n\t\t}\n\t\tif (engineStopped) {\n\t\t\treturn workBuffer[GWState] = GEStateAddingFromGET;\n\t\t}\n\t\tif (external) {\n\t\t\tworkBuffer[GWState] = GEStateWaitingForEdge;\n\t\t\t/* begin stopBecauseOf: */\n\t\t\tworkBuffer[GWStopReason] = GErrorGETEntry;\n\t\t\tengineStopped = 1;\n\t\t\treturn null;\n\t\t}\n\t\tworkBuffer[GWAETStart] = 0;\n\t\t/* begin wbStackClear */\n\t\tworkBuffer[GWBufferTop] = (workBuffer[GWSize]);\n\t\tworkBuffer[GWClearSpanBuffer] = 1;\n\t\tstate = GEStateScanningAET;\n\t}\n\tif (state == GEStateScanningAET) {\n\t\tif (doProfileStats) {\n\t\t\tgeProfileTime = interpreterProxy->ioMicroMSecs();\n\t\t}\n\t\tif (((workBuffer[GWClearSpanBuffer]) != 0)\n\t\t && (((workBuffer[GWCurrentY]) & (workBuffer[GWAAScanMask])) == 0)) {\n\t\t\tclearSpanBuffer();\n\t\t}\n\t\tworkBuffer[GWClearSpanBuffer] = 0;\n\t\texternal = findNextExternalFillFromAET();\n\t\tif (doProfileStats) {\n\t\t\tworkBuffer[GWCountNextFillEntry] = ((workBuffer[GWCountNextFillEntry]) + 1);\n\t\t\t/* begin incrementStat:by: */\n\t\t\tvalue1 = (interpreterProxy->ioMicroMSecs()) - geProfileTime;\n\t\t\tworkBuffer[GWTimeNextFillEntry] = ((workBuffer[GWTimeNextFillEntry]) + value1);\n\t\t}\n\t\tif (engineStopped) {\n\t\t\treturn workBuffer[GWState] = GEStateScanningAET;\n\t\t}\n\t\tif (external) {\n\t\t\tworkBuffer[GWState] = GEStateWaitingForFill;\n\t\t\t/* begin stopBecauseOf: */\n\t\t\tworkBuffer[GWStopReason] = GErrorFillEntry;\n\t\t\tengineStopped = 1;\n\t\t\treturn null;\n\t\t}\n\t\tstate = GEStateBlitBuffer;\n\t\t/* begin wbStackClear */\n\t\tworkBuffer[GWBufferTop] = (workBuffer[GWSize]);\n\t\tworkBuffer[GWSpanEndAA] = 0;\n\t}\n\tif (state == GEStateBlitBuffer) {\n\t\tif (doProfileStats) {\n\t\t\tgeProfileTime = interpreterProxy->ioMicroMSecs();\n\t\t}\n\t\tif (((workBuffer[GWCurrentY]) & (workBuffer[GWAAScanMask])) == (workBuffer[GWAAScanMask])) {\n\t\t\tdisplaySpanBufferAt(workBuffer[GWCurrentY]);\n\t\t\tpostDisplayAction();\n\t\t}\n\t\tif (doProfileStats) {\n\t\t\tworkBuffer[GWCountDisplaySpan] = ((workBuffer[GWCountDisplaySpan]) + 1);\n\t\t\t/* begin incrementStat:by: */\n\t\t\tvalue2 = (interpreterProxy->ioMicroMSecs()) - geProfileTime;\n\t\t\tworkBuffer[GWTimeDisplaySpan] = ((workBuffer[GWTimeDisplaySpan]) + value2);\n\t\t}\n\t\tif (engineStopped) {\n\t\t\treturn workBuffer[GWState] = GEStateBlitBuffer;\n\t\t}\n\t\tif ((workBuffer[GWState]) == GEStateCompleted) {\n\t\t\treturn 0;\n\t\t}\n\t\tstate = GEStateUpdateEdges;\n\t\tworkBuffer[GWAETStart] = 0;\n\t\tworkBuffer[GWCurrentY] = ((workBuffer[GWCurrentY]) + 1);\n\t}\n\tif (state == GEStateUpdateEdges) {\n\t\tif (doProfileStats) {\n\t\t\tgeProfileTime = interpreterProxy->ioMicroMSecs();\n\t\t}\n\t\texternal = findNextExternalUpdateFromAET();\n\t\tif (doProfileStats) {\n\t\t\tworkBuffer[GWCountNextAETEntry] = ((workBuffer[GWCountNextAETEntry]) + 1);\n\t\t\t/* begin incrementStat:by: */\n\t\t\tvalue3 = (interpreterProxy->ioMicroMSecs()) - geProfileTime;\n\t\t\tworkBuffer[GWTimeNextAETEntry] = ((workBuffer[GWTimeNextAETEntry]) + value3);\n\t\t}\n\t\tif (engineStopped) {\n\t\t\treturn workBuffer[GWState] = GEStateUpdateEdges;\n\t\t}\n\t\tif (external) {\n\t\t\tworkBuffer[GWState] = GEStateWaitingChange;\n\t\t\t/* begin stopBecauseOf: */\n\t\t\tworkBuffer[GWStopReason] = GErrorAETEntry;\n\t\t\tengineStopped = 1;\n\t\t\treturn null;\n\t\t}\n\t\tworkBuffer[GWState] = GEStateAddingFromGET;\n\t}\n}\n\n\n/*\tLoad the minimal required state from the engineOop, e.g., just the work\n\tbuffer. Answer 0 on success or non-zero a failure code on failure */\n\nstatic sqInt\nquickLoadEngineFrom(sqInt engineOop)\n{\n    sqInt failCode;\n\n\tif (interpreterProxy->failed()) {\n\t\treturn GEFAlreadyFailed;\n\t}\n\tif ((engineOop & 1)) {\n\t\treturn GEFEngineIsInteger;\n\t}\n\tif (!(interpreterProxy->isPointers(engineOop))) {\n\t\treturn GEFEngineIsWords;\n\t}\n\tif ((interpreterProxy->slotSizeOf(engineOop)) < BEBalloonEngineSize) {\n\t\treturn GEFEngineTooSmall;\n\t}\n\tengine = engineOop;\n\tif (!(((failCode = loadWorkBufferFrom(interpreterProxy->fetchPointerofObject(BEWorkBufferIndex, engineOop)))) == 0)) {\n\t\treturn failCode;\n\t}\n\tworkBuffer[GWStopReason] = 0;\n\tobjUsed = workBuffer[GWObjUsed];\n\tengineStopped = 0;\n\treturn 0;\n}\n\nstatic sqInt\nquickLoadEngineFromrequiredState(sqInt oop, sqInt requiredState)\n{\n    sqInt failureCode;\n\n\tif (!(((failureCode = quickLoadEngineFrom(oop))) == 0)) {\n\t\treturn failureCode;\n\t}\n\tif ((workBuffer[GWState]) == requiredState) {\n\t\treturn 0;\n\t}\n\tworkBuffer[GWStopReason] = GErrorBadState;\n\treturn GEFWrongState;\n}\n\nstatic sqInt\nquickLoadEngineFromrequiredStateor(sqInt oop, sqInt requiredState, sqInt alternativeState)\n{\n    sqInt failureCode;\n\n\tif (!(((failureCode = quickLoadEngineFrom(oop))) == 0)) {\n\t\treturn failureCode;\n\t}\n\tif ((workBuffer[GWState]) == requiredState) {\n\t\treturn 0;\n\t}\n\tif ((workBuffer[GWState]) == alternativeState) {\n\t\treturn 0;\n\t}\n\tworkBuffer[GWStopReason] = GErrorBadState;\n\treturn GEFWrongState;\n}\n\n\n/*\tRemove any top fills if they have become invalid. */\n\nstatic sqInt\nquickRemoveInvalidFillsAt(sqInt leftX)\n{\n\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\treturn null;\n\t}\n\twhile ((topRightX()) <= leftX) {\n\t\thideFilldepth(topFill(), topDepth());\n\t\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\t\treturn null;\n\t\t}\n\t}\n}\n\n\n/*\tSort elements i through j of self to be nondescending according to\n\tsortBlock. */\n/*\tNote: The original loop has been heavily re-written for C translation */\n\nstatic sqInt\nquickSortGlobalEdgeTablefromto(int *array, sqInt i, sqInt j)\n{\n    sqInt again;\n    sqInt before;\n    sqInt di;\n    sqInt dij;\n    sqInt dj;\n    sqInt ij;\n    sqInt k;\n    sqInt l;\n    sqInt n;\n    sqInt tmp;\n    sqInt tt;\n\n\tif (((n = (j + 1) - i)) <= 1) {\n\t\treturn 0;\n\t}\n\tdi = array[i];\n\tdj = array[j];\n\n\t/* i.e., should di precede dj? */\n\n\tbefore = getSortsbefore(di, dj);\n\tif (!(before)) {\n\t\ttmp = array[i];\n\t\tarray[i] = (array[j]);\n\t\tarray[j] = tmp;\n\t\ttt = di;\n\t\tdi = dj;\n\t\tdj = tt;\n\t}\n\tif (n <= 2) {\n\t\treturn 0;\n\t}\n\n\t/* ij is the midpoint of i and j. */\n\n\tij = ((sqInt) (i + j) >> 1);\n\n\t/* Sort di,dij,dj.  Make dij be their median. */\n\n\tdij = array[ij];\n\n\t/* i.e. should di precede dij? */\n\n\tbefore = getSortsbefore(di, dij);\n\tif (before) {\n\n\t\t/* i.e., should dij precede dj? */\n\n\t\tbefore = getSortsbefore(dij, dj);\n\t\tif (!(before)) {\n\n\t\t\t/* i.e., should dij precede dj? */\n\n\t\t\ttmp = array[j];\n\t\t\tarray[j] = (array[ij]);\n\t\t\tarray[ij] = tmp;\n\t\t\tdij = dj;\n\t\t}\n\t}\n\telse {\n\n\t\t/* i.e. di should come after dij */\n\n\t\ttmp = array[i];\n\t\tarray[i] = (array[ij]);\n\t\tarray[ij] = tmp;\n\t\tdij = di;\n\t}\n\tif (n <= 3) {\n\t\treturn 0;\n\t}\n\tk = i;\n\tl = j;\n\tagain = 1;\n\twhile (again) {\n\t\tbefore = 1;\n\t\twhile (before) {\n\t\t\tif (k <= ((l -= 1))) {\n\t\t\t\ttmp = array[l];\n\t\t\t\tbefore = getSortsbefore(dij, tmp);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tbefore = 0;\n\t\t\t}\n\t\t}\n\t\tbefore = 1;\n\t\twhile (before) {\n\t\t\tif (((k += 1)) <= l) {\n\t\t\t\ttmp = array[k];\n\t\t\t\tbefore = getSortsbefore(tmp, dij);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tbefore = 0;\n\t\t\t}\n\t\t}\n\t\tagain = k <= l;\n\t\tif (again) {\n\t\t\ttmp = array[k];\n\t\t\tarray[k] = (array[l]);\n\t\t\tarray[l] = tmp;\n\t\t}\n\t}\n\tquickSortGlobalEdgeTablefromto(array, i, l);\n\tquickSortGlobalEdgeTablefromto(array, k, j);\n}\n\nstatic sqInt\nremoveFirstAETEntry(void)\n{\n    sqInt index;\n\n\tindex = workBuffer[GWAETStart];\n\tworkBuffer[GWAETUsed] = ((workBuffer[GWAETUsed]) - 1);\n\twhile (index < (workBuffer[GWAETUsed])) {\n\t\taetBuffer[index] = (aetBuffer[index + 1]);\n\t\tindex += 1;\n\t}\n}\n\nstatic sqInt\nrepeatValuemax(sqInt delta, sqInt maxValue)\n{\n    sqInt newDelta;\n\n\tnewDelta = delta;\n\twhile (newDelta < 0) {\n\t\tnewDelta += maxValue;\n\t}\n\twhile (newDelta >= maxValue) {\n\t\tnewDelta -= maxValue;\n\t}\n\treturn newDelta;\n}\n\nstatic sqInt\nresetGraphicsEngineStats(void)\n{\n\tworkBuffer[GWTimeInitializing] = 0;\n\tworkBuffer[GWTimeFinishTest] = 0;\n\tworkBuffer[GWTimeNextGETEntry] = 0;\n\tworkBuffer[GWTimeAddAETEntry] = 0;\n\tworkBuffer[GWTimeNextFillEntry] = 0;\n\tworkBuffer[GWTimeMergeFill] = 0;\n\tworkBuffer[GWTimeDisplaySpan] = 0;\n\tworkBuffer[GWTimeNextAETEntry] = 0;\n\tworkBuffer[GWTimeChangeAETEntry] = 0;\n\tworkBuffer[GWCountInitializing] = 0;\n\tworkBuffer[GWCountFinishTest] = 0;\n\tworkBuffer[GWCountNextGETEntry] = 0;\n\tworkBuffer[GWCountAddAETEntry] = 0;\n\tworkBuffer[GWCountNextFillEntry] = 0;\n\tworkBuffer[GWCountMergeFill] = 0;\n\tworkBuffer[GWCountDisplaySpan] = 0;\n\tworkBuffer[GWCountNextAETEntry] = 0;\n\tworkBuffer[GWCountChangeAETEntry] = 0;\n\tworkBuffer[GWBezierMonotonSubdivisions] = 0;\n\tworkBuffer[GWBezierHeightSubdivisions] = 0;\n\tworkBuffer[GWBezierOverflowSubdivisions] = 0;\n\tworkBuffer[GWBezierLineConversions] = 0;\n}\n\nstatic sqInt\nresortFirstAETEntry(void)\n{\n    sqInt edge;\n    sqInt leftEdge;\n    sqInt xValue;\n\n\tif ((workBuffer[GWAETStart]) == 0) {\n\t\treturn null;\n\t}\n\tedge = aetBuffer[workBuffer[GWAETStart]];\n\txValue = objBuffer[edge + GEXValue];\n\tleftEdge = aetBuffer[(workBuffer[GWAETStart]) - 1];\n\tif ((objBuffer[leftEdge + GEXValue]) <= xValue) {\n\t\treturn null;\n\t}\n\tmoveAETEntryFromedgex(workBuffer[GWAETStart], edge, xValue);\n}\n\nstatic sqInt\nreturnWideBezierFill(void)\n{\n\treturn dispatchReturnValue = objBuffer[dispatchedValue + GBWideFill];\n}\n\nstatic sqInt\nreturnWideBezierWidth(void)\n{\n\treturn dispatchReturnValue = objBuffer[dispatchedValue + GBWideWidth];\n}\n\n\n/*\tReturn the fill of the (wide) line - this method is called from a case. */\n\nstatic sqInt\nreturnWideLineFill(void)\n{\n\treturn dispatchReturnValue = objBuffer[dispatchedValue + GLWideFill];\n}\n\n\n/*\tReturn the width of the (wide) line - this method is called from a case. */\n\nstatic sqInt\nreturnWideLineWidth(void)\n{\n\treturn dispatchReturnValue = objBuffer[dispatchedValue + GLWideWidth];\n}\n\nstatic int *\nrShiftTable(void)\n{\n    static int theTable[17] =\n\t\t{0, 5, 4, 0, 3, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1};\n\n\treturn theTable;\n}\n\n\n/*\tSet the anti-aliasing level. Three levels are supported:\n\t1 - No antialiasing\n\t2 - 2x2 unweighted anti-aliasing\n\t4 - 4x4 unweighted anti-aliasing.\n\t */\n\nstatic sqInt\nsetAALevel(sqInt level)\n{\n    sqInt aaLevel;\n\n\tif (level >= 4) {\n\t\taaLevel = 4;\n\t}\n\tif ((level >= 2) && (level < 4)) {\n\t\taaLevel = 2;\n\t}\n\tif (level < 2) {\n\t\taaLevel = 1;\n\t}\n\tworkBuffer[GWAALevel] = aaLevel;\n\tif (aaLevel == 1) {\n\t\tworkBuffer[GWAAShift] = 0;\n\t\tworkBuffer[GWAAColorMask] = 4294967295UL;\n\t\tworkBuffer[GWAAScanMask] = 0;\n\t}\n\tif (aaLevel == 2) {\n\t\tworkBuffer[GWAAShift] = 1;\n\t\tworkBuffer[GWAAColorMask] = 4244438268UL;\n\t\tworkBuffer[GWAAScanMask] = 1;\n\t}\n\tif (aaLevel == 4) {\n\t\tworkBuffer[GWAAShift] = 2;\n\t\tworkBuffer[GWAAColorMask] = 4042322160UL;\n\t\tworkBuffer[GWAAScanMask] = 3;\n\t}\n\tworkBuffer[GWAAColorShift] = ((workBuffer[GWAAShift]) * 2);\n\tworkBuffer[GWAAHalfPixel] = (workBuffer[GWAAShift]);\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n    sqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\n/*\tReturn the run-length value from the given ShortRunArray. */\n\nstatic sqInt\nshortRunLengthAtfrom(sqInt i, sqInt runArray)\n{\n\treturn ((usqInt) ((((int *) runArray))[i]) >> 16);\n}\n\n\n/*\tReturn the run-length value from the given ShortRunArray.\n\tNote: We don't need any coercion to short/int here, since\n\twe deal basically only with unsigned values. */\n\nstatic sqInt\nshortRunValueAtfrom(sqInt i, sqInt runArray)\n{\n\treturn ((((int *) runArray))[i]) & 65535;\n}\n\nstatic sqInt\nshowFilldepthrightX(sqInt fillIndex, sqInt depth, sqInt rightX)\n{\n\tif (!(wbStackPush(3))) {\n\t\treturn null;\n\t}\n\tworkBuffer[(workBuffer[GWBufferTop]) + 0] = fillIndex;\n\tworkBuffer[(workBuffer[GWBufferTop]) + (0 + 1)] = depth;\n\tworkBuffer[(workBuffer[GWBufferTop]) + (0 + 2)] = rightX;\n\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 3) {\n\t\treturn null;\n\t}\n\tif (fillSortsbefore(0, ((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3)) {\n\t\tworkBuffer[(workBuffer[GWBufferTop]) + 0] = (workBuffer[(workBuffer[GWBufferTop]) + (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3)]);\n\t\tworkBuffer[(workBuffer[GWBufferTop]) + (0 + 1)] = (workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3) + 1)]);\n\t\tworkBuffer[(workBuffer[GWBufferTop]) + (0 + 2)] = (workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3) + 2)]);\n\t\tworkBuffer[(workBuffer[GWBufferTop]) + (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3)] = fillIndex;\n\t\tworkBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3) + 1)] = depth;\n\t\tworkBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3) + 2)] = rightX;\n\t}\n}\n\nstatic int *\nsmallSqrtTable(void)\n{\n    static int theTable[32] = \n\t{0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6};\n\n\treturn theTable;\n}\n\n\n/*\tSort the entire global edge table */\n\nstatic sqInt\nsortGlobalEdgeTable(void)\n{\n\tquickSortGlobalEdgeTablefromto(getBuffer, 0, (workBuffer[GWGETUsed]) - 1);\n}\n\nstatic sqInt\nspanEndAAGet(void)\n{\n\treturn workBuffer[GWSpanEndAA];\n}\n\nstatic sqInt\nspanEndAAPut(sqInt value)\n{\n\treturn workBuffer[GWSpanEndAA] = value;\n}\n\nstatic sqInt\nspanEndGet(void)\n{\n\treturn workBuffer[GWSpanEnd];\n}\n\nstatic sqInt\nspanEndPut(sqInt value)\n{\n\treturn workBuffer[GWSpanEnd] = value;\n}\n\nstatic sqInt\nspanSizeGet(void)\n{\n\treturn workBuffer[GWSpanSize];\n}\n\nstatic sqInt\nspanSizePut(sqInt value)\n{\n\treturn workBuffer[GWSpanSize] = value;\n}\n\nstatic sqInt\nspanStartGet(void)\n{\n\treturn workBuffer[GWSpanStart];\n}\n\nstatic sqInt\nspanStartPut(sqInt value)\n{\n\treturn workBuffer[GWSpanStart] = value;\n}\n\nstatic sqInt\nsquaredLengthOfwith(sqInt deltaX, sqInt deltaY)\n{\n\treturn (deltaX * deltaX) + (deltaY * deltaY);\n}\n\nstatic sqInt\nstackFillDepth(sqInt index)\n{\n\treturn workBuffer[(workBuffer[GWBufferTop]) + (index + 1)];\n}\n\nstatic sqInt\nstackFillDepthput(sqInt index, sqInt value)\n{\n\treturn workBuffer[(workBuffer[GWBufferTop]) + (index + 1)] = value;\n}\n\nstatic sqInt\nstackFillEntryLength(void)\n{\n\treturn 3;\n}\n\nstatic sqInt\nstackFillRightX(sqInt index)\n{\n\treturn workBuffer[(workBuffer[GWBufferTop]) + (index + 2)];\n}\n\nstatic sqInt\nstackFillRightXput(sqInt index, sqInt value)\n{\n\treturn workBuffer[(workBuffer[GWBufferTop]) + (index + 2)] = value;\n}\n\nstatic sqInt\nstackFillSize(void)\n{\n\treturn (workBuffer[GWSize]) - (workBuffer[GWBufferTop]);\n}\n\nstatic sqInt\nstackFillValue(sqInt index)\n{\n\treturn workBuffer[(workBuffer[GWBufferTop]) + index];\n}\n\nstatic sqInt\nstackFillValueput(sqInt index, sqInt value)\n{\n\treturn workBuffer[(workBuffer[GWBufferTop]) + index] = value;\n}\n\nstatic sqInt\nstateGet(void)\n{\n\treturn workBuffer[GWState];\n}\n\nstatic sqInt\nstatePut(sqInt value)\n{\n\treturn workBuffer[GWState] = value;\n}\n\n\n/*\tInitialize the current entry in the GET by stepping to the current scan\n\tline \n */\n\nstatic sqInt\nstepToFirstBezier(void)\n{\n\treturn stepToFirstBezierInat(getBuffer[workBuffer[GWGETStart]], workBuffer[GWCurrentY]);\n}\n\n\n/*\tInitialize the bezier at yValue.\n\tTODO: Check if reducing maxSteps from 2*deltaY to deltaY \n\tbrings a *significant* performance improvement.\n\tIn theory this should make for double step performance\n\tbut will cost in quality. Might be that the AA stuff will\n\tcompensate for this - but I'm not really sure. */\n\nstatic sqInt\nstepToFirstBezierInat(sqInt bezier, sqInt yValue)\n{\n    sqInt deltaY;\n    sqInt endX;\n    sqInt endY;\n    sqInt fwDDx;\n    sqInt fwDDy;\n    sqInt fwDx;\n    sqInt fwDx1;\n    sqInt fwDy;\n    sqInt fwDy1;\n    sqInt fwX1;\n    sqInt fwX2;\n    sqInt fwY1;\n    sqInt fwY2;\n    sqInt lastX;\n    sqInt lastY;\n    sqInt maxSteps;\n    sqInt minY;\n    sqInt scaledStepSize;\n    sqInt squaredStepSize;\n    sqInt startX;\n    sqInt startY;\n    int *updateData;\n    sqInt updateData1;\n    sqInt viaX;\n    sqInt viaY;\n    sqInt word1;\n    sqInt word2;\n    sqInt xValue;\n\n\tif ((!((((objBuffer[bezier + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveWide) != 0))\n\t && (yValue >= (objBuffer[bezier + GBEndY]))) {\n\t\treturn objBuffer[bezier + GENumLines] = 0;\n\t}\n\tstartX = objBuffer[bezier + GEXValue];\n\tstartY = objBuffer[bezier + GEYValue];\n\tviaX = objBuffer[bezier + GBViaX];\n\tviaY = objBuffer[bezier + GBViaY];\n\tendX = objBuffer[bezier + GBEndX];\n\tendY = objBuffer[bezier + GBEndY];\n\n\t/* Initialize integer forward differencing */\n\n\tdeltaY = endY - startY;\n\tfwX1 = (viaX - startX) * 2;\n\tfwX2 = (startX + endX) - (viaX * 2);\n\tfwY1 = (viaY - startY) * 2;\n\tfwY2 = (startY + endY) - (viaY * 2);\n\tmaxSteps = deltaY * 2;\n\tif (maxSteps < 2) {\n\t\tmaxSteps = 2;\n\t}\n\tscaledStepSize = 16777216 / maxSteps;\n\t/* begin absoluteSquared8Dot24: */\n\tword1 = scaledStepSize & 65535;\n\tword2 = (((usqInt) scaledStepSize >> 16)) & 255;\n\tsquaredStepSize = ((usqInt) (((((usqInt) (((unsigned) (word1 * word1))) >> 16)) + ((word1 * word2) * 2)) + (((usqInt) (word2 * word2) << 16))) >> 8);\n\tfwDx = fwX1 * scaledStepSize;\n\tfwDDx = (fwX2 * squaredStepSize) * 2;\n\tfwDx += ((sqInt) fwDDx >> 1);\n\tfwDy = fwY1 * scaledStepSize;\n\tfwDDy = (fwY2 * squaredStepSize) * 2;\n\n\t/* Store the values */\n\n\tfwDy += ((sqInt) fwDDy >> 1);\n\tobjBuffer[bezier + GENumLines] = deltaY;\n\t/* begin bezierUpdateDataOf: */\n\tupdateData = (objBuffer + bezier) + GBUpdateData;\n\tupdateData[GBUpdateX] = (startX * 256);\n\tupdateData[GBUpdateY] = (startY * 256);\n\tupdateData[GBUpdateDX] = fwDx;\n\tupdateData[GBUpdateDY] = fwDy;\n\tupdateData[GBUpdateDDX] = fwDDx;\n\tupdateData[GBUpdateDDY] = fwDDy;\n\tif (!(((startY = objBuffer[bezier + GEYValue])) == yValue)) {\n\t\t/* begin stepToNextBezierIn:at: */\n\t\t/* begin stepToNextBezierForward:at: */\n\t\t/* begin bezierUpdateDataOf: */\n\t\tupdateData1 = ((int *) ((objBuffer + bezier) + GBUpdateData));\n\t\tlastX = (((int*) updateData1))[GBUpdateX];\n\t\tlastY = (((int*) updateData1))[GBUpdateY];\n\t\tfwDx1 = (((int*) updateData1))[GBUpdateDX];\n\t\tfwDy1 = (((int*) updateData1))[GBUpdateDY];\n\n\t\t/* Step as long as we haven't yet reached minY and also\n\tas long as fwDy is greater than zero thus stepping down.\n\tNote: The test for fwDy should not be necessary in theory\n\t\tbut is a good insurance in practice. */\n\n\t\tminY = yValue * 256;\n\t\twhile ((minY > lastY)\n && (fwDy1 >= 0)) {\n\t\t\tlastX += ((sqInt) (fwDx1 + 32768) >> 16);\n\t\t\tlastY += ((sqInt) (fwDy1 + 32768) >> 16);\n\t\t\tfwDx1 += (((int*) updateData1))[GBUpdateDDX];\n\t\t\tfwDy1 += (((int*) updateData1))[GBUpdateDDY];\n\t\t}\n\t\t(((int*) updateData1))[GBUpdateX] = lastX;\n\t\t(((int*) updateData1))[GBUpdateY] = lastY;\n\t\t(((int*) updateData1))[GBUpdateDX] = fwDx1;\n\t\t(((int*) updateData1))[GBUpdateDY] = fwDy1;\n\t\txValue = ((sqInt) lastX >> 8);\n\t\tobjBuffer[bezier + GEXValue] = xValue;\n\t\tobjBuffer[bezier + GENumLines] = (deltaY - (yValue - startY));\n\t}\n}\n\n\n/*\tInitialize the current entry in the GET by stepping to the current scan\n\tline \n */\n\nstatic sqInt\nstepToFirstLine(void)\n{\n\treturn stepToFirstLineInat(getBuffer[workBuffer[GWGETStart]], workBuffer[GWCurrentY]);\n}\n\n\n/*\tInitialize the line at yValue */\n\nstatic sqInt\nstepToFirstLineInat(sqInt line, sqInt yValue)\n{\n    sqInt deltaX;\n    sqInt deltaY;\n    sqInt err;\n    sqInt error;\n    sqInt errorAdjUp;\n    sqInt i;\n    sqInt startY;\n    sqInt widthX;\n    sqInt x;\n    sqInt xDir;\n    sqInt xInc;\n\n\tif ((!((((objBuffer[line + GEObjectType]) & GEPrimitiveTypeMask) & GEPrimitiveWide) != 0))\n\t && (yValue >= (objBuffer[line + GLEndY]))) {\n\t\treturn objBuffer[line + GENumLines] = 0;\n\t}\n\tdeltaX = (objBuffer[line + GLEndX]) - (objBuffer[line + GEXValue]);\n\n\t/* Check if edge goes left to right */\n\n\tdeltaY = (objBuffer[line + GLEndY]) - (objBuffer[line + GEYValue]);\n\tif (deltaX >= 0) {\n\t\txDir = 1;\n\t\twidthX = deltaX;\n\t\terror = 0;\n\t}\n\telse {\n\t\txDir = -1;\n\t\twidthX = 0 - deltaX;\n\t\terror = 1 - deltaY;\n\t}\n\tif (deltaY == 0) {\n\n\t\t/* No error for horizontal edges */\n\n\t\terror = 0;\n\n\t\t/* Encodes width and direction */\n\n\t\txInc = deltaX;\n\t\terrorAdjUp = 0;\n\t}\n\telse {\n\t\tif (deltaY > widthX) {\n\n\t\t\t/* Check if edge is y-major */\n\t\t\t/* Note: The '>' instead of '>=' could be important here... */\n\n\t\t\txInc = 0;\n\t\t\terrorAdjUp = widthX;\n\t\t}\n\t\telse {\n\t\t\txInc = (widthX / deltaY) * xDir;\n\t\t\terrorAdjUp = widthX % deltaY;\n\t\t}\n\t}\n\tobjBuffer[line + GENumLines] = deltaY;\n\tobjBuffer[line + GLXDirection] = xDir;\n\tobjBuffer[line + GLXIncrement] = xInc;\n\tobjBuffer[line + GLError] = error;\n\tobjBuffer[line + GLErrorAdjUp] = errorAdjUp;\n\tobjBuffer[line + GLErrorAdjDown] = deltaY;\n\tif (!(((startY = objBuffer[line + GEYValue])) == yValue)) {\n\t\tfor (i = startY; i <= (yValue - 1); i += 1) {\n\t\t\t/* begin stepToNextLineIn:at: */\n\t\t\tx = (objBuffer[line + GEXValue]) + (objBuffer[line + GLXIncrement]);\n\t\t\terr = (objBuffer[line + GLError]) + (objBuffer[line + GLErrorAdjUp]);\n\t\t\tif (err > 0) {\n\t\t\t\tx += objBuffer[line + GLXDirection];\n\t\t\t\terr -= objBuffer[line + GLErrorAdjDown];\n\t\t\t}\n\t\t\tobjBuffer[line + GLError] = err;\n\t\t\tobjBuffer[line + GEXValue] = x;\n\t\t}\n\t\tobjBuffer[line + GENumLines] = (deltaY - (yValue - startY));\n\t}\n}\n\n\n/*\tInitialize the current entry in the GET by stepping to the current scan\n\tline \n */\n\nstatic sqInt\nstepToFirstWideBezier(void)\n{\n\treturn stepToFirstWideBezierInat(getBuffer[workBuffer[GWGETStart]], workBuffer[GWCurrentY]);\n}\n\n\n/*\tInitialize the bezier at yValue */\n\nstatic sqInt\nstepToFirstWideBezierInat(sqInt bezier, sqInt yValue)\n{\n    sqInt endX;\n    sqInt i;\n    sqInt lineOffset;\n    sqInt lineWidth;\n    sqInt nLines;\n    sqInt startY;\n    sqInt xDir;\n    sqInt yEntry;\n    sqInt yExit;\n\n\n\t/* Get some values */\n\n\tlineWidth = objBuffer[bezier + GBWideExtent];\n\n\t/* Compute the incremental values of the bezier */\n\n\tlineOffset = ((sqInt) lineWidth >> 1);\n\tendX = objBuffer[bezier + GBEndX];\n\tstartY = objBuffer[bezier + GEYValue];\n\tstepToFirstBezierInat(bezier, startY);\n\n\t/* Copy the incremental update data */\n\n\tnLines = objBuffer[bezier + GENumLines];\n\tfor (i = 0; i <= 5; i += 1) {\n\t\t(wideBezierUpdateDataOf(bezier))[i] = ((bezierUpdateDataOf(bezier))[i]);\n\t}\n\txDir = (bezierUpdateDataOf(bezier))[GBUpdateDX];\n\tif (xDir == 0) {\n\t\t(bezierUpdateDataOf(bezier))[GBUpdateDDX];\n\t}\n\tif (xDir >= 0) {\n\t\txDir = 1;\n\t}\n\telse {\n\t\txDir = -1;\n\t}\n\tif (xDir < 0) {\n\t\tadjustWideBezierLeftwidthoffsetendX(bezier, lineWidth, lineOffset, endX);\n\t}\n\telse {\n\t\tadjustWideBezierRightwidthoffsetendX(bezier, lineWidth, lineOffset, endX);\n\t}\n\tif (nLines == 0) {\n\t\t(bezierUpdateDataOf(bezier))[GBUpdateX] = ((objBuffer[bezier + GBFinalX]) * 256);\n\t}\n\tobjBuffer[bezier + GENumLines] = (nLines + lineWidth);\n\n\t/* turned on at lineOffset */\n\n\tyEntry = 0;\n\n\t/* turned off at zero */\n\n\tyExit = (0 - nLines) - lineOffset;\n\tobjBuffer[bezier + GBWideEntry] = yEntry;\n\tobjBuffer[bezier + GBWideExit] = yExit;\n\tif ((yEntry >= lineOffset)\n\t && (yExit < 0)) {\n\t\tobjBuffer[bezier + GEObjectType] = (((objBuffer[bezier + GEObjectType]) & GEPrimitiveTypeMask) & (~GEEdgeFillsInvalid));\n\t}\n\telse {\n\t\tobjBuffer[bezier + GEObjectType] = (((objBuffer[bezier + GEObjectType]) & GEPrimitiveTypeMask) | GEEdgeFillsInvalid);\n\t}\n\tcomputeFinalWideBezierValueswidth(bezier, lineWidth);\n\tif (!(startY == yValue)) {\n\t\tfor (i = startY; i <= (yValue - 1); i += 1) {\n\t\t\tstepToNextWideBezierInat(bezier, i);\n\t\t}\n\t\tobjBuffer[bezier + GENumLines] = ((objBuffer[bezier + GENumLines]) - (yValue - startY));\n\t}\n}\n\n\n/*\tInitialize the current entry in the GET by stepping to the current scan\n\tline \n */\n\nstatic sqInt\nstepToFirstWideLine(void)\n{\n\treturn stepToFirstWideLineInat(getBuffer[workBuffer[GWGETStart]], workBuffer[GWCurrentY]);\n}\n\n\n/*\tInitialize the wide line at yValue. */\n\nstatic sqInt\nstepToFirstWideLineInat(sqInt line, sqInt yValue)\n{\n    sqInt err;\n    sqInt i;\n    sqInt lastX;\n    sqInt lineOffset;\n    sqInt lineOffset1;\n    sqInt lineWidth;\n    sqInt lineWidth1;\n    sqInt nextX;\n    sqInt nLines;\n    sqInt startX;\n    sqInt startY;\n    sqInt x;\n    sqInt xDir;\n    sqInt yEntry;\n    sqInt yEntry1;\n    sqInt yExit;\n    sqInt yExit1;\n\n\n\t/* Get some values */\n\n\tlineWidth = objBuffer[line + GLWideExtent];\n\n\t/* Compute the incremental values of the line */\n\n\tlineOffset = ((sqInt) lineWidth >> 1);\n\tstartX = objBuffer[line + GEXValue];\n\tstartY = objBuffer[line + GEYValue];\n\tstepToFirstLineInat(line, startY);\n\tnLines = objBuffer[line + GENumLines];\n\n\t/* Adjust the line to start at the correct X position */\n\n\txDir = objBuffer[line + GLXDirection];\n\tobjBuffer[line + GEXValue] = (startX - lineOffset);\n\tobjBuffer[line + GENumLines] = (nLines + lineWidth);\n\tif (xDir > 0) {\n\t\tobjBuffer[line + GLWideWidth] = ((objBuffer[line + GLXIncrement]) + lineWidth);\n\t}\n\telse {\n\t\tobjBuffer[line + GLWideWidth] = (lineWidth - (objBuffer[line + GLXIncrement]));\n\t\tobjBuffer[line + GEXValue] = ((objBuffer[line + GEXValue]) + (objBuffer[line + GLXIncrement]));\n\t}\n\n\t/* turned on at lineOffset */\n\n\tyEntry = 0;\n\n\t/* turned off at zero */\n\n\tyExit = (0 - nLines) - lineOffset;\n\tobjBuffer[line + GLWideEntry] = yEntry;\n\tobjBuffer[line + GLWideExit] = yExit;\n\tif ((yEntry >= lineOffset)\n\t && (yExit < 0)) {\n\t\tobjBuffer[line + GEObjectType] = (((objBuffer[line + GEObjectType]) & GEPrimitiveTypeMask) & (~GEEdgeFillsInvalid));\n\t}\n\telse {\n\t\tobjBuffer[line + GEObjectType] = (((objBuffer[line + GEObjectType]) & GEPrimitiveTypeMask) | GEEdgeFillsInvalid);\n\t}\n\tif (!(startY == yValue)) {\n\t\tfor (i = startY; i <= (yValue - 1); i += 1) {\n\t\t\t/* begin stepToNextWideLineIn:at: */\n\n\t\t\t/* Adjust entry/exit values */\n\n\t\t\tyEntry1 = (objBuffer[line + GLWideEntry]) + 1;\n\t\t\tyExit1 = (objBuffer[line + GLWideExit]) + 1;\n\t\t\tobjBuffer[line + GLWideEntry] = yEntry1;\n\t\t\tobjBuffer[line + GLWideExit] = yExit1;\n\t\t\tlineWidth1 = objBuffer[line + GLWideExtent];\n\t\t\tlineOffset1 = ((sqInt) lineWidth1 >> 1);\n\t\t\tif (yEntry1 >= lineOffset1) {\n\t\t\t\tobjBuffer[line + GEObjectType] = (((objBuffer[line + GEObjectType]) & GEPrimitiveTypeMask) & (~GEEdgeFillsInvalid));\n\t\t\t}\n\t\t\tif (yExit1 >= 0) {\n\t\t\t\tobjBuffer[line + GEObjectType] = (((objBuffer[line + GEObjectType]) & GEPrimitiveTypeMask) | GEEdgeFillsInvalid);\n\t\t\t}\n\t\t\tlastX = objBuffer[line + GEXValue];\n\t\t\t/* begin stepToNextLineIn:at: */\n\t\t\tx = (objBuffer[line + GEXValue]) + (objBuffer[line + GLXIncrement]);\n\t\t\terr = (objBuffer[line + GLError]) + (objBuffer[line + GLErrorAdjUp]);\n\t\t\tif (err > 0) {\n\t\t\t\tx += objBuffer[line + GLXDirection];\n\t\t\t\terr -= objBuffer[line + GLErrorAdjDown];\n\t\t\t}\n\t\t\tobjBuffer[line + GLError] = err;\n\t\t\tobjBuffer[line + GEXValue] = x;\n\n\t\t\t/* Check for special start/end adjustments */\n\n\t\t\tnextX = objBuffer[line + GEXValue];\n\t\t\tif ((yEntry1 <= lineWidth1)\n\t\t\t || ((yExit1 + lineOffset1) >= 0)) {\n\t\t\t\tadjustWideLineafterSteppingFromto(line, lastX, nextX);\n\t\t\t}\n\t\t}\n\t\tobjBuffer[line + GENumLines] = ((objBuffer[line + GENumLines]) - (yValue - startY));\n\t}\n}\n\n\n/*\tProcess the current entry in the AET by stepping to the next scan line */\n\nstatic sqInt\nstepToNextBezier(void)\n{\n    sqInt fwDx;\n    sqInt fwDy;\n    sqInt lastX;\n    sqInt lastY;\n    sqInt minY;\n    sqInt updateData;\n    sqInt xValue;\n\n\t/* begin stepToNextBezierIn:at: */\n\t/* begin stepToNextBezierForward:at: */\n\t/* begin bezierUpdateDataOf: */\n\tupdateData = ((int *) ((objBuffer + (aetBuffer[workBuffer[GWAETStart]])) + GBUpdateData));\n\tlastX = (((int*) updateData))[GBUpdateX];\n\tlastY = (((int*) updateData))[GBUpdateY];\n\tfwDx = (((int*) updateData))[GBUpdateDX];\n\tfwDy = (((int*) updateData))[GBUpdateDY];\n\n\t/* Step as long as we haven't yet reached minY and also\n\tas long as fwDy is greater than zero thus stepping down.\n\tNote: The test for fwDy should not be necessary in theory\n\t\tbut is a good insurance in practice. */\n\n\tminY = (workBuffer[GWCurrentY]) * 256;\n\twhile ((minY > lastY)\n && (fwDy >= 0)) {\n\t\tlastX += ((sqInt) (fwDx + 32768) >> 16);\n\t\tlastY += ((sqInt) (fwDy + 32768) >> 16);\n\t\tfwDx += (((int*) updateData))[GBUpdateDDX];\n\t\tfwDy += (((int*) updateData))[GBUpdateDDY];\n\t}\n\t(((int*) updateData))[GBUpdateX] = lastX;\n\t(((int*) updateData))[GBUpdateY] = lastY;\n\t(((int*) updateData))[GBUpdateDX] = fwDx;\n\t(((int*) updateData))[GBUpdateDY] = fwDy;\n\txValue = ((sqInt) lastX >> 8);\n\tobjBuffer[(aetBuffer[workBuffer[GWAETStart]]) + GEXValue] = xValue;\n\treturn null;\n}\n\n\n/*\tIncrementally step to the next scan line in the given bezier update data.\n\tNote: This method has been written so that inlining works, e.g.,\n\tnot declaring updateData as 'int*' but casting it on every use. */\n\nstatic sqInt\nstepToNextBezierForwardat(sqInt updateData, sqInt yValue)\n{\n    sqInt fwDx;\n    sqInt fwDy;\n    sqInt lastX;\n    sqInt lastY;\n    sqInt minY;\n\n\tlastX = (((int*) updateData))[GBUpdateX];\n\tlastY = (((int*) updateData))[GBUpdateY];\n\tfwDx = (((int*) updateData))[GBUpdateDX];\n\tfwDy = (((int*) updateData))[GBUpdateDY];\n\n\t/* Step as long as we haven't yet reached minY and also\n\tas long as fwDy is greater than zero thus stepping down.\n\tNote: The test for fwDy should not be necessary in theory\n\t\tbut is a good insurance in practice. */\n\n\tminY = yValue * 256;\n\twhile ((minY > lastY)\n && (fwDy >= 0)) {\n\t\tlastX += ((sqInt) (fwDx + 32768) >> 16);\n\t\tlastY += ((sqInt) (fwDy + 32768) >> 16);\n\t\tfwDx += (((int*) updateData))[GBUpdateDDX];\n\t\tfwDy += (((int*) updateData))[GBUpdateDDY];\n\t}\n\t(((int*) updateData))[GBUpdateX] = lastX;\n\t(((int*) updateData))[GBUpdateY] = lastY;\n\t(((int*) updateData))[GBUpdateDX] = fwDx;\n\t(((int*) updateData))[GBUpdateDY] = fwDy;\n\treturn ((sqInt) lastX >> 8);\n}\n\n\n/*\tIncrementally step to the next scan line in the given bezier */\n\nstatic sqInt\nstepToNextBezierInat(sqInt bezier, sqInt yValue)\n{\n    sqInt fwDx;\n    sqInt fwDy;\n    sqInt lastX;\n    sqInt lastY;\n    sqInt minY;\n    sqInt updateData;\n    sqInt xValue;\n\n\t/* begin stepToNextBezierForward:at: */\n\t/* begin bezierUpdateDataOf: */\n\tupdateData = ((int *) ((objBuffer + bezier) + GBUpdateData));\n\tlastX = (((int*) updateData))[GBUpdateX];\n\tlastY = (((int*) updateData))[GBUpdateY];\n\tfwDx = (((int*) updateData))[GBUpdateDX];\n\tfwDy = (((int*) updateData))[GBUpdateDY];\n\n\t/* Step as long as we haven't yet reached minY and also\n\tas long as fwDy is greater than zero thus stepping down.\n\tNote: The test for fwDy should not be necessary in theory\n\t\tbut is a good insurance in practice. */\n\n\tminY = yValue * 256;\n\twhile ((minY > lastY)\n && (fwDy >= 0)) {\n\t\tlastX += ((sqInt) (fwDx + 32768) >> 16);\n\t\tlastY += ((sqInt) (fwDy + 32768) >> 16);\n\t\tfwDx += (((int*) updateData))[GBUpdateDDX];\n\t\tfwDy += (((int*) updateData))[GBUpdateDDY];\n\t}\n\t(((int*) updateData))[GBUpdateX] = lastX;\n\t(((int*) updateData))[GBUpdateY] = lastY;\n\t(((int*) updateData))[GBUpdateDX] = fwDx;\n\t(((int*) updateData))[GBUpdateDY] = fwDy;\n\txValue = ((sqInt) lastX >> 8);\n\tobjBuffer[bezier + GEXValue] = xValue;\n}\n\n\n/*\tProcess the current entry in the AET by stepping to the next scan line */\n\nstatic sqInt\nstepToNextLine(void)\n{\n    sqInt err;\n    sqInt x;\n\n\t/* begin stepToNextLineIn:at: */\n\tx = (objBuffer[(aetBuffer[workBuffer[GWAETStart]]) + GEXValue]) + (objBuffer[(aetBuffer[workBuffer[GWAETStart]]) + GLXIncrement]);\n\terr = (objBuffer[(aetBuffer[workBuffer[GWAETStart]]) + GLError]) + (objBuffer[(aetBuffer[workBuffer[GWAETStart]]) + GLErrorAdjUp]);\n\tif (err > 0) {\n\t\tx += objBuffer[(aetBuffer[workBuffer[GWAETStart]]) + GLXDirection];\n\t\terr -= objBuffer[(aetBuffer[workBuffer[GWAETStart]]) + GLErrorAdjDown];\n\t}\n\tobjBuffer[(aetBuffer[workBuffer[GWAETStart]]) + GLError] = err;\n\tobjBuffer[(aetBuffer[workBuffer[GWAETStart]]) + GEXValue] = x;\n\treturn null;\n}\n\n\n/*\tIncrementally step to the next scan line in the given line */\n\nstatic sqInt\nstepToNextLineInat(sqInt line, sqInt yValue)\n{\n    sqInt err;\n    sqInt x;\n\n\tx = (objBuffer[line + GEXValue]) + (objBuffer[line + GLXIncrement]);\n\terr = (objBuffer[line + GLError]) + (objBuffer[line + GLErrorAdjUp]);\n\tif (err > 0) {\n\t\tx += objBuffer[line + GLXDirection];\n\t\terr -= objBuffer[line + GLErrorAdjDown];\n\t}\n\tobjBuffer[line + GLError] = err;\n\tobjBuffer[line + GEXValue] = x;\n}\n\n\n/*\tInitialize the current entry in the GET by stepping to the current scan\n\tline \n */\n\nstatic sqInt\nstepToNextWideBezier(void)\n{\n\tstepToNextWideBezierInat(aetBuffer[workBuffer[GWAETStart]], workBuffer[GWCurrentY]);\n}\n\n\n/*\tIncrementally step to the next scan line in the given wide bezier */\n\nstatic sqInt\nstepToNextWideBezierInat(sqInt bezier, sqInt yValue)\n{\n    sqInt fwDx;\n    sqInt fwDx1;\n    sqInt fwDy;\n    sqInt fwDy1;\n    sqInt lastX;\n    sqInt lastX1;\n    sqInt lastY;\n    sqInt lastY1;\n    sqInt lineOffset;\n    sqInt lineWidth;\n    sqInt minY;\n    sqInt minY1;\n    sqInt updateData;\n    sqInt updateData1;\n    sqInt yEntry;\n    sqInt yExit;\n\n\n\t/* Don't inline this */\n\n\tlineWidth = objBuffer[bezier + GBWideExtent];\n\tlineOffset = ((sqInt) lineWidth >> 1);\n\tyEntry = (objBuffer[bezier + GBWideEntry]) + 1;\n\tyExit = (objBuffer[bezier + GBWideExit]) + 1;\n\tobjBuffer[bezier + GBWideEntry] = yEntry;\n\tobjBuffer[bezier + GBWideExit] = yExit;\n\tif (yEntry >= lineOffset) {\n\t\tobjBuffer[bezier + GEObjectType] = (((objBuffer[bezier + GEObjectType]) & GEPrimitiveTypeMask) & (~GEEdgeFillsInvalid));\n\t}\n\tif (yExit >= 0) {\n\t\tobjBuffer[bezier + GEObjectType] = (((objBuffer[bezier + GEObjectType]) & GEPrimitiveTypeMask) | GEEdgeFillsInvalid);\n\t}\n\tif ((yExit + lineOffset) < 0) {\n\t\t/* begin stepToNextBezierForward:at: */\n\t\t/* begin bezierUpdateDataOf: */\n\t\tupdateData = ((int *) ((objBuffer + bezier) + GBUpdateData));\n\t\tlastX = (((int*) updateData))[GBUpdateX];\n\t\tlastY = (((int*) updateData))[GBUpdateY];\n\t\tfwDx = (((int*) updateData))[GBUpdateDX];\n\t\tfwDy = (((int*) updateData))[GBUpdateDY];\n\n\t\t/* Step as long as we haven't yet reached minY and also\n\tas long as fwDy is greater than zero thus stepping down.\n\tNote: The test for fwDy should not be necessary in theory\n\t\tbut is a good insurance in practice. */\n\n\t\tminY = yValue * 256;\n\t\twhile ((minY > lastY)\n && (fwDy >= 0)) {\n\t\t\tlastX += ((sqInt) (fwDx + 32768) >> 16);\n\t\t\tlastY += ((sqInt) (fwDy + 32768) >> 16);\n\t\t\tfwDx += (((int*) updateData))[GBUpdateDDX];\n\t\t\tfwDy += (((int*) updateData))[GBUpdateDDY];\n\t\t}\n\t\t(((int*) updateData))[GBUpdateX] = lastX;\n\t\t(((int*) updateData))[GBUpdateY] = lastY;\n\t\t(((int*) updateData))[GBUpdateDX] = fwDx;\n\t\t(((int*) updateData))[GBUpdateDY] = fwDy;\n\t\t((sqInt) lastX >> 8);\n\t}\n\telse {\n\t\t(bezierUpdateDataOf(bezier))[GBUpdateX] = ((objBuffer[bezier + GBFinalX]) * 256);\n\t}\n\t/* begin stepToNextBezierForward:at: */\n\t/* begin wideBezierUpdateDataOf: */\n\tupdateData1 = ((int *) ((objBuffer + bezier) + GBWideUpdateData));\n\tlastX1 = (((int*) updateData1))[GBUpdateX];\n\tlastY1 = (((int*) updateData1))[GBUpdateY];\n\tfwDx1 = (((int*) updateData1))[GBUpdateDX];\n\tfwDy1 = (((int*) updateData1))[GBUpdateDY];\n\n\t/* Step as long as we haven't yet reached minY and also\n\tas long as fwDy is greater than zero thus stepping down.\n\tNote: The test for fwDy should not be necessary in theory\n\t\tbut is a good insurance in practice. */\n\n\tminY1 = yValue * 256;\n\twhile ((minY1 > lastY1)\n && (fwDy1 >= 0)) {\n\t\tlastX1 += ((sqInt) (fwDx1 + 32768) >> 16);\n\t\tlastY1 += ((sqInt) (fwDy1 + 32768) >> 16);\n\t\tfwDx1 += (((int*) updateData1))[GBUpdateDDX];\n\t\tfwDy1 += (((int*) updateData1))[GBUpdateDDY];\n\t}\n\t(((int*) updateData1))[GBUpdateX] = lastX1;\n\t(((int*) updateData1))[GBUpdateY] = lastY1;\n\t(((int*) updateData1))[GBUpdateDX] = fwDx1;\n\t(((int*) updateData1))[GBUpdateDY] = fwDy1;\n\t((sqInt) lastX1 >> 8);\n\tcomputeFinalWideBezierValueswidth(bezier, lineWidth);\n}\n\n\n/*\tProcess the current entry in the AET by stepping to the next scan line */\n\nstatic sqInt\nstepToNextWideLine(void)\n{\n    sqInt err;\n    sqInt lastX;\n    sqInt lineOffset;\n    sqInt lineWidth;\n    sqInt nextX;\n    sqInt x;\n    sqInt yEntry;\n    sqInt yExit;\n\n\t/* begin stepToNextWideLineIn:at: */\n\n\t/* Adjust entry/exit values */\n\n\tyEntry = (objBuffer[(aetBuffer[workBuffer[GWAETStart]]) + GLWideEntry]) + 1;\n\tyExit = (objBuffer[(aetBuffer[workBuffer[GWAETStart]]) + GLWideExit]) + 1;\n\tobjBuffer[(aetBuffer[workBuffer[GWAETStart]]) + GLWideEntry] = yEntry;\n\tobjBuffer[(aetBuffer[workBuffer[GWAETStart]]) + GLWideExit] = yExit;\n\tlineWidth = objBuffer[(aetBuffer[workBuffer[GWAETStart]]) + GLWideExtent];\n\tlineOffset = ((sqInt) lineWidth >> 1);\n\tif (yEntry >= lineOffset) {\n\t\tobjBuffer[(aetBuffer[workBuffer[GWAETStart]]) + GEObjectType] = (((objBuffer[(aetBuffer[workBuffer[GWAETStart]]) + GEObjectType]) & GEPrimitiveTypeMask) & (~GEEdgeFillsInvalid));\n\t}\n\tif (yExit >= 0) {\n\t\tobjBuffer[(aetBuffer[workBuffer[GWAETStart]]) + GEObjectType] = (((objBuffer[(aetBuffer[workBuffer[GWAETStart]]) + GEObjectType]) & GEPrimitiveTypeMask) | GEEdgeFillsInvalid);\n\t}\n\tlastX = objBuffer[(aetBuffer[workBuffer[GWAETStart]]) + GEXValue];\n\t/* begin stepToNextLineIn:at: */\n\tx = (objBuffer[(aetBuffer[workBuffer[GWAETStart]]) + GEXValue]) + (objBuffer[(aetBuffer[workBuffer[GWAETStart]]) + GLXIncrement]);\n\terr = (objBuffer[(aetBuffer[workBuffer[GWAETStart]]) + GLError]) + (objBuffer[(aetBuffer[workBuffer[GWAETStart]]) + GLErrorAdjUp]);\n\tif (err > 0) {\n\t\tx += objBuffer[(aetBuffer[workBuffer[GWAETStart]]) + GLXDirection];\n\t\terr -= objBuffer[(aetBuffer[workBuffer[GWAETStart]]) + GLErrorAdjDown];\n\t}\n\tobjBuffer[(aetBuffer[workBuffer[GWAETStart]]) + GLError] = err;\n\tobjBuffer[(aetBuffer[workBuffer[GWAETStart]]) + GEXValue] = x;\n\n\t/* Check for special start/end adjustments */\n\n\tnextX = objBuffer[(aetBuffer[workBuffer[GWAETStart]]) + GEXValue];\n\tif ((yEntry <= lineWidth)\n\t || ((yExit + lineOffset) >= 0)) {\n\t\tadjustWideLineafterSteppingFromto(aetBuffer[workBuffer[GWAETStart]], lastX, nextX);\n\t}\n\treturn null;\n}\n\n\n/*\tIncrementally step to the next scan line in the given wide line */\n\nstatic sqInt\nstepToNextWideLineInat(sqInt line, sqInt yValue)\n{\n    sqInt err;\n    sqInt lastX;\n    sqInt lineOffset;\n    sqInt lineWidth;\n    sqInt nextX;\n    sqInt x;\n    sqInt yEntry;\n    sqInt yExit;\n\n\n\t/* Adjust entry/exit values */\n\n\tyEntry = (objBuffer[line + GLWideEntry]) + 1;\n\tyExit = (objBuffer[line + GLWideExit]) + 1;\n\tobjBuffer[line + GLWideEntry] = yEntry;\n\tobjBuffer[line + GLWideExit] = yExit;\n\tlineWidth = objBuffer[line + GLWideExtent];\n\tlineOffset = ((sqInt) lineWidth >> 1);\n\tif (yEntry >= lineOffset) {\n\t\tobjBuffer[line + GEObjectType] = (((objBuffer[line + GEObjectType]) & GEPrimitiveTypeMask) & (~GEEdgeFillsInvalid));\n\t}\n\tif (yExit >= 0) {\n\t\tobjBuffer[line + GEObjectType] = (((objBuffer[line + GEObjectType]) & GEPrimitiveTypeMask) | GEEdgeFillsInvalid);\n\t}\n\tlastX = objBuffer[line + GEXValue];\n\t/* begin stepToNextLineIn:at: */\n\tx = (objBuffer[line + GEXValue]) + (objBuffer[line + GLXIncrement]);\n\terr = (objBuffer[line + GLError]) + (objBuffer[line + GLErrorAdjUp]);\n\tif (err > 0) {\n\t\tx += objBuffer[line + GLXDirection];\n\t\terr -= objBuffer[line + GLErrorAdjDown];\n\t}\n\tobjBuffer[line + GLError] = err;\n\tobjBuffer[line + GEXValue] = x;\n\n\t/* Check for special start/end adjustments */\n\n\tnextX = objBuffer[line + GEXValue];\n\tif ((yEntry <= lineWidth)\n\t || ((yExit + lineOffset) >= 0)) {\n\t\tadjustWideLineafterSteppingFromto(line, lastX, nextX);\n\t}\n}\n\nstatic sqInt\nstopBecauseOf(sqInt stopReason)\n{\n\tworkBuffer[GWStopReason] = stopReason;\n\tengineStopped = 1;\n}\n\nstatic sqInt\nstopReasonGet(void)\n{\n\treturn workBuffer[GWStopReason];\n}\n\nstatic sqInt\nstopReasonPut(sqInt value)\n{\n\treturn workBuffer[GWStopReason] = value;\n}\n\nstatic sqInt\nstoreEdgeStateFrominto(sqInt edge, sqInt edgeOop)\n{\n\tif ((interpreterProxy->slotSizeOf(edgeOop)) < ETBalloonEdgeDataSize) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->storeIntegerofObjectwithValue(ETIndexIndex, edgeOop, objBuffer[edge + GEObjectIndex]);\n\tinterpreterProxy->storeIntegerofObjectwithValue(ETXValueIndex, edgeOop, objBuffer[edge + GEXValue]);\n\tinterpreterProxy->storeIntegerofObjectwithValue(ETYValueIndex, edgeOop, workBuffer[GWCurrentY]);\n\tinterpreterProxy->storeIntegerofObjectwithValue(ETZValueIndex, edgeOop, objBuffer[edge + GEZValue]);\n\tinterpreterProxy->storeIntegerofObjectwithValue(ETLinesIndex, edgeOop, objBuffer[edge + GENumLines]);\n\tworkBuffer[GWLastExportedEdge] = edge;\n}\n\nstatic sqInt\nstoreEngineStateInto(sqInt oop)\n{\n\tworkBuffer[GWObjUsed] = objUsed;\n}\n\nstatic sqInt\nstoreFillStateInto(sqInt fillOop)\n{\n    sqInt fillIndex;\n    sqInt leftX;\n    sqInt rightX;\n\n\tfillIndex = workBuffer[GWLastExportedFill];\n\tleftX = workBuffer[GWLastExportedLeftX];\n\trightX = workBuffer[GWLastExportedRightX];\n\tif ((interpreterProxy->slotSizeOf(fillOop)) < FTBalloonFillDataSize) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->storeIntegerofObjectwithValue(FTIndexIndex, fillOop, objBuffer[fillIndex + GEObjectIndex]);\n\tinterpreterProxy->storeIntegerofObjectwithValue(FTMinXIndex, fillOop, leftX);\n\tinterpreterProxy->storeIntegerofObjectwithValue(FTMaxXIndex, fillOop, rightX);\n\tinterpreterProxy->storeIntegerofObjectwithValue(FTYValueIndex, fillOop, workBuffer[GWCurrentY]);\n}\n\nstatic sqInt\nstoreRenderingState(void)\n{\n    sqInt edge;\n    sqInt edgeOop;\n    sqInt fillOop;\n    sqInt reason;\n\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (engineStopped) {\n\t\t/* begin storeStopStateIntoEdge:fill: */\n\t\tedgeOop = interpreterProxy->stackObjectValue(1);\n\t\tfillOop = interpreterProxy->stackObjectValue(0);\n\t\treason = workBuffer[GWStopReason];\n\t\tif (reason == GErrorGETEntry) {\n\t\t\tedge = getBuffer[workBuffer[GWGETStart]];\n\t\t\tstoreEdgeStateFrominto(edge, edgeOop);\n\t\t\tworkBuffer[GWGETStart] = ((workBuffer[GWGETStart]) + 1);\n\t\t}\n\t\tif (reason == GErrorFillEntry) {\n\t\t\tstoreFillStateInto(fillOop);\n\t\t}\n\t\tif (reason == GErrorAETEntry) {\n\t\t\tedge = aetBuffer[workBuffer[GWAETStart]];\n\t\t\tstoreEdgeStateFrominto(edge, edgeOop);\n\t\t}\n\t}\n\t/* begin storeEngineStateInto: */\n\tworkBuffer[GWObjUsed] = objUsed;\n\tinterpreterProxy->pop(3);\n\tinterpreterProxy->pushInteger(workBuffer[GWStopReason]);\n}\n\nstatic sqInt\nstoreStopStateIntoEdgefill(sqInt edgeOop, sqInt fillOop)\n{\n    sqInt edge;\n    sqInt reason;\n\n\treason = workBuffer[GWStopReason];\n\tif (reason == GErrorGETEntry) {\n\t\tedge = getBuffer[workBuffer[GWGETStart]];\n\t\tstoreEdgeStateFrominto(edge, edgeOop);\n\t\tworkBuffer[GWGETStart] = ((workBuffer[GWGETStart]) + 1);\n\t}\n\tif (reason == GErrorFillEntry) {\n\t\tstoreFillStateInto(fillOop);\n\t}\n\tif (reason == GErrorAETEntry) {\n\t\tedge = aetBuffer[workBuffer[GWAETStart]];\n\t\tstoreEdgeStateFrominto(edge, edgeOop);\n\t}\n}\n\n\n/*\tRecursively subdivide the curve on the bezier stack. */\n\nstatic sqInt\nsubdivideBezierFrom(sqInt index)\n{\n    sqInt index1;\n    sqInt index2;\n    sqInt otherIndex;\n\n\totherIndex = subdivideBezier(index);\n\tif (!(otherIndex == index)) {\n\t\tindex1 = subdivideBezierFrom(index);\n\t\tif (engineStopped) {\n\t\t\treturn 0;\n\t\t}\n\t\tindex2 = subdivideBezierFrom(otherIndex);\n\t\tif (engineStopped) {\n\t\t\treturn 0;\n\t\t}\n\t\tif (index1 >= index2) {\n\t\t\treturn index1;\n\t\t}\n\t\telse {\n\t\t\treturn index2;\n\t\t}\n\t}\n\treturn index;\n}\n\n\n/*\tSubdivide the given bezier curve if necessary */\n\nstatic sqInt\nsubdivideBezier(sqInt index)\n{\n    sqInt deltaX;\n    sqInt deltaY;\n    sqInt endX;\n    sqInt endY;\n    sqInt startX;\n    sqInt startY;\n\n\tstartY = workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 1)];\n\n\t/* If the receiver is horizontal, don't do anything */\n\n\tendY = workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 5)];\n\tif (endY == startY) {\n\t\treturn index;\n\t}\n\tdeltaY = endY - startY;\n\tif (deltaY < 0) {\n\t\tdeltaY = 0 - deltaY;\n\t}\n\tif (deltaY > 255) {\n\t\tworkBuffer[GWBezierHeightSubdivisions] = ((workBuffer[GWBezierHeightSubdivisions]) + 1);\n\t\treturn computeBezierSplitAtHalf(index);\n\t}\n\tstartX = workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 0)];\n\tendX = workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 4)];\n\tdeltaX = endX - startX;\n\tif (deltaX < 0) {\n\t\tdeltaX = 0 - deltaX;\n\t}\n\tif ((deltaY * 32) < deltaX) {\n\t\tworkBuffer[GWBezierOverflowSubdivisions] = ((workBuffer[GWBezierOverflowSubdivisions]) + 1);\n\t\treturn computeBezierSplitAtHalf(index);\n\t}\n\treturn index;\n}\n\n\n/*\tCheck if the given bezier curve is monoton in X. If not, subdivide it */\n\nstatic sqInt\nsubdivideToBeMonotonInX(sqInt index)\n{\n    sqInt denom;\n    sqInt dx1;\n    sqInt dx2;\n    sqInt endX;\n    sqInt num;\n    sqInt startX;\n    sqInt viaX;\n\n\tstartX = workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 0)];\n\tviaX = workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 2)];\n\tendX = workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 4)];\n\tdx1 = viaX - startX;\n\tdx2 = endX - viaX;\n\tif ((dx1 * dx2) >= 0) {\n\t\treturn index;\n\t}\n\tworkBuffer[GWBezierMonotonSubdivisions] = ((workBuffer[GWBezierMonotonSubdivisions]) + 1);\n\tdenom = dx2 - dx1;\n\tnum = dx1;\n\tif (num < 0) {\n\t\tnum = 0 - num;\n\t}\n\tif (denom < 0) {\n\t\tdenom = 0 - denom;\n\t}\n\treturn computeBeziersplitAt(index, (((double) num )) / (((double) denom )));\n}\n\n\n/*\tCheck if the given bezier curve is monoton in Y. If not, subdivide it */\n\nstatic sqInt\nsubdivideToBeMonotonInY(sqInt index)\n{\n    sqInt denom;\n    sqInt dy1;\n    sqInt dy2;\n    sqInt endY;\n    sqInt num;\n    sqInt startY;\n    sqInt viaY;\n\n\tstartY = workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 1)];\n\tviaY = workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 3)];\n\tendY = workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - index) + 5)];\n\tdy1 = viaY - startY;\n\tdy2 = endY - viaY;\n\tif ((dy1 * dy2) >= 0) {\n\t\treturn index;\n\t}\n\tworkBuffer[GWBezierMonotonSubdivisions] = ((workBuffer[GWBezierMonotonSubdivisions]) + 1);\n\tdenom = dy2 - dy1;\n\tnum = dy1;\n\tif (num < 0) {\n\t\tnum = 0 - num;\n\t}\n\tif (denom < 0) {\n\t\tdenom = 0 - denom;\n\t}\n\treturn computeBeziersplitAt(index, (((double) num )) / (((double) denom )));\n}\n\n\n/*\tCheck if the given bezier curve is monoton in Y, and, if desired in X. \n\tIf not, subdivide it */\n\nstatic sqInt\nsubdivideToBeMonotoninX(sqInt base, sqInt doTestX)\n{\n    sqInt base2;\n    sqInt index1;\n    sqInt index2;\n\n\tbase2 = index1 = index2 = subdivideToBeMonotonInY(base);\n\tif (doTestX) {\n\t\tindex1 = subdivideToBeMonotonInX(base);\n\t}\n\tif (index1 > index2) {\n\t\tindex2 = index1;\n\t}\n\tif ((base != base2)\n\t && (doTestX)) {\n\t\tindex1 = subdivideToBeMonotonInX(base2);\n\t}\n\tif (index1 > index2) {\n\t\tindex2 = index1;\n\t}\n\treturn index2;\n}\n\nstatic sqInt\ntoggleFillsOf(sqInt edge)\n{\n    sqInt depth;\n    sqInt fillIndex;\n\n\tif (!(needAvailableSpace(3 * 2))) {\n\t\treturn null;\n\t}\n\tdepth = (objBuffer[edge + GEZValue]) << 1;\n\tfillIndex = objBuffer[edge + GEFillIndexLeft];\n\tif (!(fillIndex == 0)) {\n\t\ttoggleFilldepthrightX(fillIndex, depth, 999999999);\n\t}\n\tfillIndex = objBuffer[edge + GEFillIndexRight];\n\tif (!(fillIndex == 0)) {\n\t\ttoggleFilldepthrightX(fillIndex, depth, 999999999);\n\t}\n\t/* begin quickRemoveInvalidFillsAt: */\n\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\tgoto l1;\n\t}\n\twhile ((topRightX()) <= (objBuffer[edge + GEXValue])) {\n\t\thideFilldepth(topFill(), topDepth());\n\t\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\t\tgoto l1;\n\t\t}\n\t}\nl1:\t/* end quickRemoveInvalidFillsAt: */;\n}\n\n\n/*\tMake the fill style with the given index either visible or invisible */\n\nstatic sqInt\ntoggleFilldepthrightX(sqInt fillIndex, sqInt depth, sqInt rightX)\n{\n    sqInt hidden;\n\n\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\tif (wbStackPush(3)) {\n\t\t\tworkBuffer[(workBuffer[GWBufferTop]) + (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3)] = fillIndex;\n\t\t\tworkBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3) + 1)] = depth;\n\t\t\tworkBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3) + 2)] = rightX;\n\t\t}\n\t}\n\telse {\n\t\thidden = hideFilldepth(fillIndex, depth);\n\t\tif (!(hidden)) {\n\t\t\tshowFilldepthrightX(fillIndex, depth, rightX);\n\t\t}\n\t}\n}\n\nstatic sqInt\ntoggleWideFillOf(sqInt edge)\n{\n    sqInt depth;\n    sqInt fill;\n    sqInt index;\n    sqInt lineWidth;\n    sqInt rightX;\n    sqInt type;\n\n\ttype = ((usqInt) ((objBuffer[edge + GEObjectType]) & GEPrimitiveTypeMask)) >> 1;\n\tdispatchedValue = edge;\n\tswitch (type) {\n\tcase 0:\n\tcase 1:\n\t\terrorWrongIndex();\n\t\tbreak;\n\tcase 2:\n\t\tdispatchReturnValue = objBuffer[dispatchedValue + GLWideWidth];\n\t\tbreak;\n\tcase 3:\n\t\tdispatchReturnValue = objBuffer[dispatchedValue + GBWideWidth];\n\t\tbreak;\n\t}\n\tlineWidth = dispatchReturnValue;\n\tswitch (type) {\n\tcase 0:\n\tcase 1:\n\t\terrorWrongIndex();\n\t\tbreak;\n\tcase 2:\n\t\tdispatchReturnValue = objBuffer[dispatchedValue + GLWideFill];\n\t\tbreak;\n\tcase 3:\n\t\tdispatchReturnValue = objBuffer[dispatchedValue + GBWideFill];\n\t\tbreak;\n\t}\n\tfill = dispatchReturnValue;\n\tif (fill == 0) {\n\t\treturn null;\n\t}\n\tif (!(needAvailableSpace(3))) {\n\t\treturn null;\n\t}\n\n\t/* So lines sort before interior fills */\n\n\tdepth = ((objBuffer[edge + GEZValue]) << 1) + 1;\n\trightX = (objBuffer[edge + GEXValue]) + lineWidth;\n\tindex = findStackFilldepth(fill, depth);\n\tif (index == -1) {\n\t\tshowFilldepthrightX(fill, depth, rightX);\n\t}\n\telse {\n\t\tif ((workBuffer[(workBuffer[GWBufferTop]) + (index + 2)]) < rightX) {\n\t\t\tworkBuffer[(workBuffer[GWBufferTop]) + (index + 2)] = rightX;\n\t\t}\n\t}\n\t/* begin quickRemoveInvalidFillsAt: */\n\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\tgoto l1;\n\t}\n\twhile ((topRightX()) <= (objBuffer[edge + GEXValue])) {\n\t\thideFilldepth(topFill(), topDepth());\n\t\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\t\tgoto l1;\n\t\t}\n\t}\nl1:\t/* end quickRemoveInvalidFillsAt: */;\n}\n\nstatic sqInt\ntopDepth(void)\n{\n\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\treturn -1;\n\t}\n\telse {\n\t\treturn workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3) + 1)];\n\t}\n}\n\nstatic sqInt\ntopFill(void)\n{\n\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\treturn 0;\n\t}\n\telse {\n\t\treturn workBuffer[(workBuffer[GWBufferTop]) + (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3)];\n\t}\n}\n\nstatic sqInt\ntopFillDepth(void)\n{\n\treturn workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3) + 1)];\n}\n\nstatic sqInt\ntopFillDepthPut(sqInt value)\n{\n\treturn workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3) + 1)] = value;\n}\n\nstatic sqInt\ntopFillRightX(void)\n{\n\treturn workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3) + 2)];\n}\n\nstatic sqInt\ntopFillRightXPut(sqInt value)\n{\n\treturn workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3) + 2)] = value;\n}\n\nstatic sqInt\ntopFillValue(void)\n{\n\treturn workBuffer[(workBuffer[GWBufferTop]) + (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3)];\n}\n\nstatic sqInt\ntopFillValuePut(sqInt value)\n{\n\treturn workBuffer[(workBuffer[GWBufferTop]) + (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3)] = value;\n}\n\nstatic sqInt\ntopRightX(void)\n{\n\tif (((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) == 0) {\n\t\treturn 999999999;\n\t}\n\telse {\n\t\treturn workBuffer[(workBuffer[GWBufferTop]) + ((((workBuffer[GWSize]) - (workBuffer[GWBufferTop])) - 3) + 2)];\n\t}\n}\n\nstatic sqInt\ntransformColor(sqInt fillIndex)\n{\n    sqInt a;\n    double  alphaScale;\n    sqInt b;\n    sqInt g;\n    sqInt r;\n    float *transform;\n\n\tif (!((fillIndex == 0)\n\t\t || ((fillIndex & 4278190080UL) != 0))) {\n\t\treturn fillIndex;\n\t}\n\tb = fillIndex & 255;\n\tg = (((usqInt) fillIndex) >> 8) & 255;\n\tr = (((usqInt) fillIndex) >> 16) & 255;\n\ta = (((usqInt) fillIndex) >> 24) & 255;\n\tif ((workBuffer[GWHasColorTransform]) != 0) {\n\t\t/* begin colorTransform */\n\t\ttransform = ((float *) (workBuffer + GWColorTransform));\n\t\talphaScale = ((a * (transform[6])) + (transform[7])) / a;\n\t\tr = ((sqInt)(((r * (transform[0])) + (transform[1])) * alphaScale));\n\t\tg = ((sqInt)(((g * (transform[2])) + (transform[3])) * alphaScale));\n\t\tb = ((sqInt)(((b * (transform[4])) + (transform[5])) * alphaScale));\n\t\ta = a * alphaScale;\n\t\tr = ((r < 0) ? 0 : r);\n\t\tr = ((r < 255) ? r : 255);\n\t\tg = ((g < 0) ? 0 : g);\n\t\tg = ((g < 255) ? g : 255);\n\t\tb = ((b < 0) ? 0 : b);\n\t\tb = ((b < 255) ? b : 255);\n\t\ta = ((a < 0) ? 0 : a);\n\t\ta = ((a < 255) ? a : 255);\n\t}\n\tif (a < 1) {\n\t\treturn 0;\n\t}\n\tif ((a < 255)\n\t && ((workBuffer[GWNeedsFlush]) != 0)) {\n\t\t/* begin stopBecauseOf: */\n\t\tworkBuffer[GWStopReason] = GErrorNeedFlush;\n\t\tengineStopped = 1;\n\t}\n\treturn ((b + (g << 8)) + (r << 16)) + (a << 24);\n}\n\n\n/*\tTransform n (n=1,2,3) points.\n\tIf haveMatrix is true then the matrix contains the actual transformation. */\n\nstatic sqInt\ntransformPoints(sqInt n)\n{\n    int *point;\n    int *point1;\n    int *point2;\n    int *point3;\n    float *transform;\n    float *transform1;\n    float *transform2;\n    float *transform3;\n    sqInt x;\n    sqInt x1;\n    sqInt x2;\n    sqInt x3;\n    sqInt y;\n    sqInt y1;\n    sqInt y2;\n    sqInt y3;\n\n\tif (n > 0) {\n\t\t/* begin transformPoint: */\n\t\t/* begin point1Get */\n\t\tpoint = ((int *) (workBuffer + GWPoint1));\n\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t/* begin transformPoint:into: */\n\t\t\t/* begin transformPointX:y:into: */\n\t\t\t/* begin edgeTransform */\n\t\t\ttransform = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\tx = ((sqInt)(((((transform[0]) * (((double) ((((int *) point))[0]) ))) + ((transform[1]) * (((double) ((((int *) point))[1]) )))) + (transform[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\ty = ((sqInt)(((((transform[3]) * (((double) ((((int *) point))[0]) ))) + ((transform[4]) * (((double) ((((int *) point))[1]) )))) + (transform[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t(((int *) point))[0] = x;\n\t\t\t(((int *) point))[1] = y;\n\t\t}\n\t\telse {\n\t\t\tpoint[0] = (((point[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\tpoint[1] = (((point[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t}\n\t}\n\tif (n > 1) {\n\t\t/* begin transformPoint: */\n\t\t/* begin point2Get */\n\t\tpoint1 = ((int *) (workBuffer + GWPoint2));\n\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t/* begin transformPoint:into: */\n\t\t\t/* begin transformPointX:y:into: */\n\t\t\t/* begin edgeTransform */\n\t\t\ttransform1 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\tx1 = ((sqInt)(((((transform1[0]) * (((double) ((((int *) point1))[0]) ))) + ((transform1[1]) * (((double) ((((int *) point1))[1]) )))) + (transform1[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\ty1 = ((sqInt)(((((transform1[3]) * (((double) ((((int *) point1))[0]) ))) + ((transform1[4]) * (((double) ((((int *) point1))[1]) )))) + (transform1[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t(((int *) point1))[0] = x1;\n\t\t\t(((int *) point1))[1] = y1;\n\t\t}\n\t\telse {\n\t\t\tpoint1[0] = (((point1[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\tpoint1[1] = (((point1[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t}\n\t}\n\tif (n > 2) {\n\t\t/* begin transformPoint: */\n\t\t/* begin point3Get */\n\t\tpoint2 = ((int *) (workBuffer + GWPoint3));\n\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t/* begin transformPoint:into: */\n\t\t\t/* begin transformPointX:y:into: */\n\t\t\t/* begin edgeTransform */\n\t\t\ttransform2 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\tx2 = ((sqInt)(((((transform2[0]) * (((double) ((((int *) point2))[0]) ))) + ((transform2[1]) * (((double) ((((int *) point2))[1]) )))) + (transform2[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\ty2 = ((sqInt)(((((transform2[3]) * (((double) ((((int *) point2))[0]) ))) + ((transform2[4]) * (((double) ((((int *) point2))[1]) )))) + (transform2[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t(((int *) point2))[0] = x2;\n\t\t\t(((int *) point2))[1] = y2;\n\t\t}\n\t\telse {\n\t\t\tpoint2[0] = (((point2[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\tpoint2[1] = (((point2[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t}\n\t}\n\tif (n > 3) {\n\t\t/* begin transformPoint: */\n\t\t/* begin point4Get */\n\t\tpoint3 = ((int *) (workBuffer + GWPoint4));\n\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t/* begin transformPoint:into: */\n\t\t\t/* begin transformPointX:y:into: */\n\t\t\t/* begin edgeTransform */\n\t\t\ttransform3 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\tx3 = ((sqInt)(((((transform3[0]) * (((double) ((((int *) point3))[0]) ))) + ((transform3[1]) * (((double) ((((int *) point3))[1]) )))) + (transform3[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\ty3 = ((sqInt)(((((transform3[3]) * (((double) ((((int *) point3))[0]) ))) + ((transform3[4]) * (((double) ((((int *) point3))[1]) )))) + (transform3[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t(((int *) point3))[0] = x3;\n\t\t\t(((int *) point3))[1] = y3;\n\t\t}\n\t\telse {\n\t\t\tpoint3[0] = (((point3[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\tpoint3[1] = (((point3[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t}\n\t}\n}\n\n\n/*\tTransform srcPoint into dstPoint by using the currently loaded matrix */\n/*\tNote: This should be rewritten so that inlining works (e.g., removing\n\tthe declarations and adding argument coercions at the appropriate points) */\n\nstatic sqInt\ntransformPointXyinto(double  xValue, double  yValue, int *dstPoint)\n{\n    float *transform;\n    sqInt x;\n    sqInt y;\n\n\t/* begin edgeTransform */\n\ttransform = ((float *) (workBuffer + GWEdgeTransform));\n\tx = ((sqInt)(((((transform[0]) * xValue) + ((transform[1]) * yValue)) + (transform[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\ty = ((sqInt)(((((transform[3]) * xValue) + ((transform[4]) * yValue)) + (transform[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\tdstPoint[0] = x;\n\tdstPoint[1] = y;\n}\n\n\n/*\tTransform the given point. If haveMatrix is true then use the current\n\ttransformation. \n */\n\nstatic sqInt\ntransformPoint(int *point)\n{\n    float *transform;\n    sqInt x;\n    sqInt y;\n\n\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t/* begin transformPoint:into: */\n\t\t/* begin transformPointX:y:into: */\n\t\t/* begin edgeTransform */\n\t\ttransform = ((float *) (workBuffer + GWEdgeTransform));\n\t\tx = ((sqInt)(((((transform[0]) * (((double) ((((int *) point))[0]) ))) + ((transform[1]) * (((double) ((((int *) point))[1]) )))) + (transform[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\ty = ((sqInt)(((((transform[3]) * (((double) ((((int *) point))[0]) ))) + ((transform[4]) * (((double) ((((int *) point))[1]) )))) + (transform[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t(((int *) point))[0] = x;\n\t\t(((int *) point))[1] = y;\n\t}\n\telse {\n\t\tpoint[0] = (((point[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\tpoint[1] = (((point[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t}\n}\n\n\n/*\tTransform srcPoint into dstPoint by using the currently loaded matrix */\n/*\tNote: This method has been rewritten so that inlining works (e.g.,\n\tremoving the declarations and adding argument coercions at the appropriate\n\tpoints) \n */\n\nstatic sqInt\ntransformPointinto(sqInt srcPoint, sqInt dstPoint)\n{\n    float *transform;\n    sqInt x;\n    sqInt y;\n\n\t/* begin transformPointX:y:into: */\n\t/* begin edgeTransform */\n\ttransform = ((float *) (workBuffer + GWEdgeTransform));\n\tx = ((sqInt)(((((transform[0]) * (((double) ((((int *) srcPoint))[0]) ))) + ((transform[1]) * (((double) ((((int *) srcPoint))[1]) )))) + (transform[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\ty = ((sqInt)(((((transform[3]) * (((double) ((((int *) srcPoint))[0]) ))) + ((transform[4]) * (((double) ((((int *) srcPoint))[1]) )))) + (transform[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t(((int *) dstPoint))[0] = x;\n\t(((int *) dstPoint))[1] = y;\n}\n\n\n/*\tTransform the given width */\n\nstatic sqInt\ntransformWidth(sqInt w)\n{\n    double  deltaX;\n    double  deltaY;\n    sqInt dstWidth;\n    sqInt dstWidth2;\n    int *point;\n    int *point1;\n    int *point2;\n    int *point3;\n    float *transform;\n    float *transform1;\n    float *transform2;\n    float *transform3;\n    sqInt x;\n    sqInt x1;\n    sqInt x2;\n    sqInt x3;\n    sqInt y;\n    sqInt y1;\n    sqInt y2;\n    sqInt y3;\n\n\tif (w == 0) {\n\t\treturn 0;\n\t}\n\t(point1Get())[0] = 0;\n\t(point1Get())[1] = 0;\n\t(point2Get())[0] = (w * 256);\n\t(point2Get())[1] = 0;\n\t(point3Get())[0] = 0;\n\t(point3Get())[1] = (w * 256);\n\t/* begin transformPoints: */\n\tif (3 > 0) {\n\t\t/* begin transformPoint: */\n\t\t/* begin point1Get */\n\t\tpoint = ((int *) (workBuffer + GWPoint1));\n\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t/* begin transformPoint:into: */\n\t\t\t/* begin transformPointX:y:into: */\n\t\t\t/* begin edgeTransform */\n\t\t\ttransform = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\tx = ((sqInt)(((((transform[0]) * (((double) ((((int *) point))[0]) ))) + ((transform[1]) * (((double) ((((int *) point))[1]) )))) + (transform[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\ty = ((sqInt)(((((transform[3]) * (((double) ((((int *) point))[0]) ))) + ((transform[4]) * (((double) ((((int *) point))[1]) )))) + (transform[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t(((int *) point))[0] = x;\n\t\t\t(((int *) point))[1] = y;\n\t\t}\n\t\telse {\n\t\t\tpoint[0] = (((point[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\tpoint[1] = (((point[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t}\n\t}\n\tif (3 > 1) {\n\t\t/* begin transformPoint: */\n\t\t/* begin point2Get */\n\t\tpoint1 = ((int *) (workBuffer + GWPoint2));\n\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t/* begin transformPoint:into: */\n\t\t\t/* begin transformPointX:y:into: */\n\t\t\t/* begin edgeTransform */\n\t\t\ttransform1 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\tx1 = ((sqInt)(((((transform1[0]) * (((double) ((((int *) point1))[0]) ))) + ((transform1[1]) * (((double) ((((int *) point1))[1]) )))) + (transform1[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\ty1 = ((sqInt)(((((transform1[3]) * (((double) ((((int *) point1))[0]) ))) + ((transform1[4]) * (((double) ((((int *) point1))[1]) )))) + (transform1[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t(((int *) point1))[0] = x1;\n\t\t\t(((int *) point1))[1] = y1;\n\t\t}\n\t\telse {\n\t\t\tpoint1[0] = (((point1[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\tpoint1[1] = (((point1[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t}\n\t}\n\tif (3 > 2) {\n\t\t/* begin transformPoint: */\n\t\t/* begin point3Get */\n\t\tpoint2 = ((int *) (workBuffer + GWPoint3));\n\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t/* begin transformPoint:into: */\n\t\t\t/* begin transformPointX:y:into: */\n\t\t\t/* begin edgeTransform */\n\t\t\ttransform2 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\tx2 = ((sqInt)(((((transform2[0]) * (((double) ((((int *) point2))[0]) ))) + ((transform2[1]) * (((double) ((((int *) point2))[1]) )))) + (transform2[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\ty2 = ((sqInt)(((((transform2[3]) * (((double) ((((int *) point2))[0]) ))) + ((transform2[4]) * (((double) ((((int *) point2))[1]) )))) + (transform2[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t(((int *) point2))[0] = x2;\n\t\t\t(((int *) point2))[1] = y2;\n\t\t}\n\t\telse {\n\t\t\tpoint2[0] = (((point2[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\tpoint2[1] = (((point2[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t}\n\t}\n\tif (3 > 3) {\n\t\t/* begin transformPoint: */\n\t\t/* begin point4Get */\n\t\tpoint3 = ((int *) (workBuffer + GWPoint4));\n\t\tif ((workBuffer[GWHasEdgeTransform]) != 0) {\n\t\t\t/* begin transformPoint:into: */\n\t\t\t/* begin transformPointX:y:into: */\n\t\t\t/* begin edgeTransform */\n\t\t\ttransform3 = ((float *) (workBuffer + GWEdgeTransform));\n\t\t\tx3 = ((sqInt)(((((transform3[0]) * (((double) ((((int *) point3))[0]) ))) + ((transform3[1]) * (((double) ((((int *) point3))[1]) )))) + (transform3[2])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\ty3 = ((sqInt)(((((transform3[3]) * (((double) ((((int *) point3))[0]) ))) + ((transform3[4]) * (((double) ((((int *) point3))[1]) )))) + (transform3[5])) * (((double) (workBuffer[GWAALevel]) ))));\n\t\t\t(((int *) point3))[0] = x3;\n\t\t\t(((int *) point3))[1] = y3;\n\t\t}\n\t\telse {\n\t\t\tpoint3[0] = (((point3[0]) + (workBuffer[GWDestOffsetX])) * (workBuffer[GWAALevel]));\n\t\t\tpoint3[1] = (((point3[1]) + (workBuffer[GWDestOffsetY])) * (workBuffer[GWAALevel]));\n\t\t}\n\t}\n\tdeltaX = ((double) (((point2Get())[0]) - ((point1Get())[0])) );\n\tdeltaY = ((double) (((point2Get())[1]) - ((point1Get())[1])) );\n\tdstWidth = ((sqInt) ((((sqInt)(sqrt((deltaX * deltaX) + (deltaY * deltaY))))) + 128) >> 8);\n\tdeltaX = ((double) (((point3Get())[0]) - ((point1Get())[0])) );\n\tdeltaY = ((double) (((point3Get())[1]) - ((point1Get())[1])) );\n\tdstWidth2 = ((sqInt) ((((sqInt)(sqrt((deltaX * deltaX) + (deltaY * deltaY))))) + 128) >> 8);\n\tif (dstWidth2 < dstWidth) {\n\t\tdstWidth = dstWidth2;\n\t}\n\tif (dstWidth == 0) {\n\t\treturn 1;\n\t}\n\telse {\n\t\treturn dstWidth;\n\t}\n}\n\nstatic sqInt\nuncheckedTransformColor(sqInt fillIndex)\n{\n    sqInt a;\n    sqInt b;\n    sqInt g;\n    sqInt r;\n    float *transform;\n\n\tif (!((workBuffer[GWHasColorTransform]) != 0)) {\n\t\treturn fillIndex;\n\t}\n\tb = fillIndex & 255;\n\tg = (((usqInt) fillIndex) >> 8) & 255;\n\tr = (((usqInt) fillIndex) >> 16) & 255;\n\ta = (((usqInt) fillIndex) >> 24) & 255;\n\t/* begin colorTransform */\n\ttransform = ((float *) (workBuffer + GWColorTransform));\n\tr = ((sqInt)((r * (transform[0])) + (transform[1])));\n\tg = ((sqInt)((g * (transform[2])) + (transform[3])));\n\tb = ((sqInt)((b * (transform[4])) + (transform[5])));\n\ta = ((sqInt)((a * (transform[6])) + (transform[7])));\n\tr = ((r < 0) ? 0 : r);\n\tr = ((r < 255) ? r : 255);\n\tg = ((g < 0) ? 0 : g);\n\tg = ((g < 255) ? g : 255);\n\tb = ((b < 0) ? 0 : b);\n\tb = ((b < 255) ? b : 255);\n\ta = ((a < 0) ? 0 : a);\n\ta = ((a < 255) ? a : 255);\n\tif (a < 16) {\n\t\treturn 0;\n\t}\n\treturn ((b + (g << 8)) + (r << 16)) + (a << 24);\n}\n\nstatic sqInt\nwbSizeGet(void)\n{\n\treturn workBuffer[GWSize];\n}\n\nstatic sqInt\nwbSizePut(sqInt value)\n{\n\treturn workBuffer[GWSize] = value;\n}\n\nstatic sqInt\nwbStackClear(void)\n{\n\tworkBuffer[GWBufferTop] = (workBuffer[GWSize]);\n}\n\nstatic sqInt\nwbStackPop(sqInt nItems)\n{\n\tworkBuffer[GWBufferTop] = ((workBuffer[GWBufferTop]) + nItems);\n}\n\nstatic sqInt\nwbStackPush(sqInt nItems)\n{\n\tif (!(needAvailableSpace(nItems))) {\n\t\treturn 0;\n\t}\n\tworkBuffer[GWBufferTop] = ((workBuffer[GWBufferTop]) - nItems);\n\treturn 1;\n}\n\nstatic sqInt\nwbStackSize(void)\n{\n\treturn (workBuffer[GWSize]) - (workBuffer[GWBufferTop]);\n}\n\nstatic sqInt\nwbStackValue(sqInt index)\n{\n\treturn workBuffer[(workBuffer[GWBufferTop]) + index];\n}\n\nstatic sqInt\nwbStackValueput(sqInt index, sqInt value)\n{\n\treturn workBuffer[(workBuffer[GWBufferTop]) + index] = value;\n}\n\nstatic sqInt\nwbTopGet(void)\n{\n\treturn workBuffer[GWBufferTop];\n}\n\nstatic sqInt\nwbTopPut(sqInt value)\n{\n\treturn workBuffer[GWBufferTop] = value;\n}\n\nstatic sqInt\nwideBezierEntryOf(sqInt line)\n{\n\treturn objBuffer[line + GBWideEntry];\n}\n\nstatic sqInt\nwideBezierEntryOfput(sqInt line, sqInt value)\n{\n\treturn objBuffer[line + GBWideEntry] = value;\n}\n\nstatic sqInt\nwideBezierExitOf(sqInt line)\n{\n\treturn objBuffer[line + GBWideExit];\n}\n\nstatic sqInt\nwideBezierExitOfput(sqInt line, sqInt value)\n{\n\treturn objBuffer[line + GBWideExit] = value;\n}\n\nstatic sqInt\nwideBezierExtentOf(sqInt bezier)\n{\n\treturn objBuffer[bezier + GBWideExtent];\n}\n\nstatic sqInt\nwideBezierExtentOfput(sqInt bezier, sqInt value)\n{\n\treturn objBuffer[bezier + GBWideExtent] = value;\n}\n\nstatic sqInt\nwideBezierFillOf(sqInt bezier)\n{\n\treturn objBuffer[bezier + GBWideFill];\n}\n\nstatic sqInt\nwideBezierFillOfput(sqInt bezier, sqInt value)\n{\n\treturn objBuffer[bezier + GBWideFill] = value;\n}\n\nstatic int *\nwideBezierUpdateDataOf(sqInt bezier)\n{\n\treturn (objBuffer + bezier) + GBWideUpdateData;\n}\n\nstatic sqInt\nwideBezierWidthOf(sqInt line)\n{\n\treturn objBuffer[line + GBWideWidth];\n}\n\nstatic sqInt\nwideBezierWidthOfput(sqInt line, sqInt value)\n{\n\treturn objBuffer[line + GBWideWidth] = value;\n}\n\nstatic sqInt\nwideLineEntryOf(sqInt line)\n{\n\treturn objBuffer[line + GLWideEntry];\n}\n\nstatic sqInt\nwideLineEntryOfput(sqInt line, sqInt value)\n{\n\treturn objBuffer[line + GLWideEntry] = value;\n}\n\nstatic sqInt\nwideLineExitOf(sqInt line)\n{\n\treturn objBuffer[line + GLWideExit];\n}\n\nstatic sqInt\nwideLineExitOfput(sqInt line, sqInt value)\n{\n\treturn objBuffer[line + GLWideExit] = value;\n}\n\nstatic sqInt\nwideLineExtentOf(sqInt line)\n{\n\treturn objBuffer[line + GLWideExtent];\n}\n\nstatic sqInt\nwideLineExtentOfput(sqInt line, sqInt value)\n{\n\treturn objBuffer[line + GLWideExtent] = value;\n}\n\nstatic sqInt\nwideLineFillOf(sqInt line)\n{\n\treturn objBuffer[line + GLWideFill];\n}\n\nstatic sqInt\nwideLineFillOfput(sqInt line, sqInt value)\n{\n\treturn objBuffer[line + GLWideFill] = value;\n}\n\nstatic sqInt\nwideLineWidthOf(sqInt line)\n{\n\treturn objBuffer[line + GLWideWidth];\n}\n\nstatic sqInt\nwideLineWidthOfput(sqInt line, sqInt value)\n{\n\treturn objBuffer[line + GLWideWidth] = value;\n}\n\nstatic sqInt\nworkBufferPut(sqInt wbOop)\n{\n\tworkBuffer = interpreterProxy->firstIndexableField(wbOop);\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* B2DPlugin_exports[][3] = {\n\t{\"B2DPlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"B2DPlugin\", \"initialiseModule\", (void*)initialiseModule},\n\t{\"B2DPlugin\", \"moduleUnloaded\", (void*)moduleUnloaded},\n\t{\"B2DPlugin\", \"primitiveAbortProcessing\", (void*)primitiveAbortProcessing},\n\t{\"B2DPlugin\", \"primitiveAddActiveEdgeEntry\", (void*)primitiveAddActiveEdgeEntry},\n\t{\"B2DPlugin\", \"primitiveAddBezier\", (void*)primitiveAddBezier},\n\t{\"B2DPlugin\", \"primitiveAddBezierShape\", (void*)primitiveAddBezierShape},\n\t{\"B2DPlugin\", \"primitiveAddBitmapFill\", (void*)primitiveAddBitmapFill},\n\t{\"B2DPlugin\", \"primitiveAddCompressedShape\", (void*)primitiveAddCompressedShape},\n\t{\"B2DPlugin\", \"primitiveAddGradientFill\", (void*)primitiveAddGradientFill},\n\t{\"B2DPlugin\", \"primitiveAddLine\", (void*)primitiveAddLine},\n\t{\"B2DPlugin\", \"primitiveAddOval\", (void*)primitiveAddOval},\n\t{\"B2DPlugin\", \"primitiveAddPolygon\", (void*)primitiveAddPolygon},\n\t{\"B2DPlugin\", \"primitiveAddRect\", (void*)primitiveAddRect},\n\t{\"B2DPlugin\", \"primitiveChangedActiveEdgeEntry\", (void*)primitiveChangedActiveEdgeEntry},\n\t{\"B2DPlugin\", \"primitiveCopyBuffer\", (void*)primitiveCopyBuffer},\n\t{\"B2DPlugin\", \"primitiveDisplaySpanBuffer\", (void*)primitiveDisplaySpanBuffer},\n\t{\"B2DPlugin\", \"primitiveDoProfileStats\", (void*)primitiveDoProfileStats},\n\t{\"B2DPlugin\", \"primitiveFinishedProcessing\", (void*)primitiveFinishedProcessing},\n\t{\"B2DPlugin\", \"primitiveGetAALevel\", (void*)primitiveGetAALevel},\n\t{\"B2DPlugin\", \"primitiveGetBezierStats\", (void*)primitiveGetBezierStats},\n\t{\"B2DPlugin\", \"primitiveGetClipRect\", (void*)primitiveGetClipRect},\n\t{\"B2DPlugin\", \"primitiveGetCounts\", (void*)primitiveGetCounts},\n\t{\"B2DPlugin\", \"primitiveGetDepth\", (void*)primitiveGetDepth},\n\t{\"B2DPlugin\", \"primitiveGetFailureReason\", (void*)primitiveGetFailureReason},\n\t{\"B2DPlugin\", \"primitiveGetOffset\", (void*)primitiveGetOffset},\n\t{\"B2DPlugin\", \"primitiveGetTimes\", (void*)primitiveGetTimes},\n\t{\"B2DPlugin\", \"primitiveInitializeBuffer\", (void*)primitiveInitializeBuffer},\n\t{\"B2DPlugin\", \"primitiveInitializeProcessing\", (void*)primitiveInitializeProcessing},\n\t{\"B2DPlugin\", \"primitiveMergeFillFrom\", (void*)primitiveMergeFillFrom},\n\t{\"B2DPlugin\", \"primitiveNeedsFlush\", (void*)primitiveNeedsFlush},\n\t{\"B2DPlugin\", \"primitiveNeedsFlushPut\", (void*)primitiveNeedsFlushPut},\n\t{\"B2DPlugin\", \"primitiveNextActiveEdgeEntry\", (void*)primitiveNextActiveEdgeEntry},\n\t{\"B2DPlugin\", \"primitiveNextFillEntry\", (void*)primitiveNextFillEntry},\n\t{\"B2DPlugin\", \"primitiveNextGlobalEdgeEntry\", (void*)primitiveNextGlobalEdgeEntry},\n\t{\"B2DPlugin\", \"primitiveRegisterExternalEdge\", (void*)primitiveRegisterExternalEdge},\n\t{\"B2DPlugin\", \"primitiveRegisterExternalFill\", (void*)primitiveRegisterExternalFill},\n\t{\"B2DPlugin\", \"primitiveRenderImage\", (void*)primitiveRenderImage},\n\t{\"B2DPlugin\", \"primitiveRenderScanline\", (void*)primitiveRenderScanline},\n\t{\"B2DPlugin\", \"primitiveSetAALevel\", (void*)primitiveSetAALevel},\n\t{\"B2DPlugin\", \"primitiveSetBitBltPlugin\", (void*)primitiveSetBitBltPlugin},\n\t{\"B2DPlugin\", \"primitiveSetClipRect\", (void*)primitiveSetClipRect},\n\t{\"B2DPlugin\", \"primitiveSetColorTransform\", (void*)primitiveSetColorTransform},\n\t{\"B2DPlugin\", \"primitiveSetDepth\", (void*)primitiveSetDepth},\n\t{\"B2DPlugin\", \"primitiveSetEdgeTransform\", (void*)primitiveSetEdgeTransform},\n\t{\"B2DPlugin\", \"primitiveSetOffset\", (void*)primitiveSetOffset},\n\t{\"B2DPlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/B3DAcceleratorPlugin/B3DAcceleratorPlugin.c",
    "content": "/* Automatically generated by\n\tVMPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tB3DAcceleratorPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"B3DAcceleratorPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"B3DAcceleratorPlugin.h\"\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n\n/*** Function Prototypes ***/\nstatic sqInt checkBoundsRangefacescount(sqInt vertices, unsigned int *facePtr, sqInt faceCount);\nstatic sqInt checkVertexData(sqInt vertices);\nstatic void* fetchLightSourceofObject(sqInt index, sqInt anArray);\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nEXPORT(sqInt) initialiseModule(void);\nstatic sqInt loadClientStateverticescolorsnormalstexCoords(sqInt handle, sqInt vertices, sqInt colors, sqInt normals, sqInt texCoords);\nstatic sqInt msg(char *s);\nEXPORT(sqInt) primitiveAllocateTexture(void);\nEXPORT(sqInt) primitiveClearDepthBuffer(void);\nEXPORT(sqInt) primitiveClearViewport(void);\nEXPORT(sqInt) primitiveCompositeTexture(void);\nEXPORT(sqInt) primitiveCreateRenderer(void);\nEXPORT(sqInt) primitiveCreateRendererFlags(void);\nEXPORT(sqInt) primitiveDestroyRenderer(void);\nEXPORT(sqInt) primitiveDestroyTexture(void);\nEXPORT(sqInt) primitiveDrawArrays(void);\nEXPORT(sqInt) primitiveDrawElements(void);\nEXPORT(sqInt) primitiveDrawRangeElements(void);\nEXPORT(sqInt) primitiveEnableDrawRangeChecks(void);\nEXPORT(sqInt) primitiveFinishRenderer(void);\nEXPORT(sqInt) primitiveFlushRenderer(void);\nEXPORT(sqInt) primitiveGetIntProperty(void);\nEXPORT(sqInt) primitiveGetRendererColorMasks(void);\nEXPORT(sqInt) primitiveGetRendererSurfaceDepth(void);\nEXPORT(sqInt) primitiveGetRendererSurfaceHandle(void);\nEXPORT(sqInt) primitiveGetRendererSurfaceHeight(void);\nEXPORT(sqInt) primitiveGetRendererSurfaceWidth(void);\nEXPORT(sqInt) primitiveIsOverlayRenderer(void);\nEXPORT(sqInt) primitiveRendererVersion(void);\nEXPORT(sqInt) primitiveRenderVertexBuffer(void);\nEXPORT(sqInt) primitiveSetBufferRect(void);\nEXPORT(sqInt) primitiveSetFog(void);\nEXPORT(sqInt) primitiveSetIntProperty(void);\nEXPORT(sqInt) primitiveSetLights(void);\nEXPORT(sqInt) primitiveSetMaterial(void);\nEXPORT(sqInt) primitiveSetTransform(void);\nEXPORT(sqInt) primitiveSetVerboseLevel(void);\nEXPORT(sqInt) primitiveSetViewport(void);\nEXPORT(sqInt) primitiveSwapRendererBuffers(void);\nEXPORT(sqInt) primitiveTextureByteSex(void);\nEXPORT(sqInt) primitiveTextureDepth(void);\nEXPORT(sqInt) primitiveTextureGetColorMasks(void);\nEXPORT(sqInt) primitiveTextureSurfaceHandle(void);\nEXPORT(sqInt) primitiveTextureUpload(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\nEXPORT(sqInt) shutdownModule(void);\nstatic sqInt stackLightArrayValue(sqInt stackIndex);\nstatic void * stackMaterialValue(sqInt stackIndex);\nstatic void* stackMatrix(sqInt index);\nstatic void* stackPrimitiveIndexArrayofSizevalidateforVertexSize(sqInt stackIndex, sqInt nItems, sqInt aBool, sqInt maxIndex);\nstatic void* stackPrimitiveVertexArrayofSize(sqInt index, sqInt nItems);\nstatic void* stackPrimitiveVertex(sqInt index);\n\n\n/*** Variables ***/\nstatic sqInt doRangeChecks;\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"B3DAcceleratorPlugin VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"B3DAcceleratorPlugin VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\n\n\n\n/*\tVerify the bounds condition on the entire faces array */\n\nstatic sqInt\ncheckBoundsRangefacescount(sqInt vertices, unsigned int *facePtr, sqInt faceCount)\n{\n    sqInt i;\n    sqInt vtxSize;\n\n\tvtxSize = (interpreterProxy->slotSizeOf(vertices)) / 3;\n\tfor (i = 0; i <= (faceCount - 1); i += 1) {\n\t\tif ((facePtr[i]) > vtxSize) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n}\n\n\n/*\tCheck the entire vertex data to ensure no nan/inf values */\n\nstatic sqInt\ncheckVertexData(sqInt vertices)\n{\n    float f;\n    sqInt i;\n    float *vtxPtr;\n    sqInt vtxSize;\n\n\tvtxSize = interpreterProxy->slotSizeOf(vertices);\n\tvtxPtr = interpreterProxy->firstIndexableField(vertices);\n\tfor (i = 0; i <= (vtxSize - 1); i += 1) {\n\t\tf = vtxPtr[i];\n\t\tif (isnan(f - f)) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n}\n\n\n/*\tFetch the primitive light source from the given array.\n\tNote: No checks are done within here - that happened in\n\tstackLightArrayValue: \n */\n\nstatic void*\nfetchLightSourceofObject(sqInt index, sqInt anArray)\n{\n    sqInt lightOop;\n\n\tlightOop = interpreterProxy->fetchPointerofObject(index, anArray);\n\treturn interpreterProxy->firstIndexableField(lightOop);\n}\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nEXPORT(sqInt)\ninitialiseModule(void)\n{\n\tdoRangeChecks = 1;\n\treturn b3dxInitialize();\n}\n\n\n/*\tCommon method to set up client state for some render ops */\n\nstatic sqInt\nloadClientStateverticescolorsnormalstexCoords(sqInt handle, sqInt vertices, sqInt colors, sqInt normals, sqInt texCoords)\n{\n    void *colorPtr;\n    void *normalPtr;\n    sqInt ok;\n    sqInt sz;\n    void *txPtr;\n    void *vertexPtr;\n    sqInt vtxSize;\n\n\n\t/* Verify vertex data */\n\n\tcolorPtr = normalPtr = txPtr = vertexPtr = null;\n\tif (!(interpreterProxy->isWords(vertices))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\n\t/* Verify assumptions of color, normal, texCoords data */\n\n\tvtxSize = (interpreterProxy->slotSizeOf(vertices)) / 3;\n\tif (!((colors == (interpreterProxy->nilObject()))\n\t\t || ((interpreterProxy->isWords(colors))\n && ((interpreterProxy->slotSizeOf(colors)) == (vtxSize * 4))))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!((normals == (interpreterProxy->nilObject()))\n\t\t || ((interpreterProxy->isWords(normals))\n && ((interpreterProxy->slotSizeOf(normals)) == (vtxSize * 3))))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!((texCoords == (interpreterProxy->nilObject()))\n\t\t || (interpreterProxy->isWords(texCoords)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!(colors == (interpreterProxy->nilObject()))) {\n\t\tcolorPtr = interpreterProxy->firstIndexableField(colors);\n\t}\n\tif (!(normals == (interpreterProxy->nilObject()))) {\n\t\tnormalPtr = interpreterProxy->firstIndexableField(normals);\n\t}\n\tif (!(texCoords == (interpreterProxy->nilObject()))) {\n\t\tsz = (interpreterProxy->slotSizeOf(texCoords)) / vtxSize;\n\t\ttxPtr = interpreterProxy->firstIndexableField(texCoords);\n\t}\n\tvertexPtr = interpreterProxy->firstIndexableField(vertices);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tok = b3dLoadClientState(handle, vertexPtr, 3, colorPtr, 4, normalPtr, 3, txPtr, sz);\n\tif (!(ok)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\nEXPORT(sqInt)\nprimitiveAllocateTexture(void)\n{\n    sqInt d;\n    sqInt h;\n    sqInt renderer;\n    sqInt result;\n    sqInt w;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 4)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\th = interpreterProxy->stackIntegerValue(0);\n\tw = interpreterProxy->stackIntegerValue(1);\n\td = interpreterProxy->stackIntegerValue(2);\n\trenderer = interpreterProxy->stackIntegerValue(3);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = b3dxAllocateTexture(renderer, w, h, d);\n\tif (result == -1) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop(5);\n\treturn interpreterProxy->pushInteger(result);\n}\n\nEXPORT(sqInt)\nprimitiveClearDepthBuffer(void)\n{\n    sqInt handle;\n    sqInt result;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\thandle = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = b3dxClearDepthBuffer(handle);\n\tif (!(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\treturn interpreterProxy->pop(1);\n}\n\nEXPORT(sqInt)\nprimitiveClearViewport(void)\n{\n    sqInt handle;\n    sqInt pv;\n    sqInt result;\n    sqInt rgba;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 3)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tpv = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(0));\n\trgba = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(1));\n\thandle = interpreterProxy->stackIntegerValue(2);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = b3dxClearViewport(handle, rgba, pv);\n\tif (!(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\treturn interpreterProxy->pop(3);\n}\n\nEXPORT(sqInt)\nprimitiveCompositeTexture(void)\n{\n    sqInt h;\n    sqInt rendererHandle;\n    sqInt result;\n    sqInt texHandle;\n    sqInt translucent;\n    sqInt w;\n    sqInt x;\n    sqInt y;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 7)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\ttranslucent = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(0));\n\th = interpreterProxy->stackIntegerValue(1);\n\tw = interpreterProxy->stackIntegerValue(2);\n\ty = interpreterProxy->stackIntegerValue(3);\n\tx = interpreterProxy->stackIntegerValue(4);\n\ttexHandle = interpreterProxy->stackIntegerValue(5);\n\trendererHandle = interpreterProxy->stackIntegerValue(6);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = b3dxCompositeTexture(rendererHandle, texHandle, x, y, w, h, translucent);\n\tif (!(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\treturn interpreterProxy->pop(7);\n}\n\n\n/*\tNOTE: This primitive is obsolete but should be supported for older images */\n\nEXPORT(sqInt)\nprimitiveCreateRenderer(void)\n{\n    sqInt allowHardware;\n    sqInt allowSoftware;\n    sqInt h;\n    sqInt result;\n    sqInt w;\n    sqInt x;\n    sqInt y;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 6)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\th = interpreterProxy->stackIntegerValue(0);\n\tw = interpreterProxy->stackIntegerValue(1);\n\ty = interpreterProxy->stackIntegerValue(2);\n\tx = interpreterProxy->stackIntegerValue(3);\n\tallowHardware = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(4));\n\tallowSoftware = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(5));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = b3dxCreateRenderer(allowSoftware, allowHardware, x, y, w, h);\n\tif (result < 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop(7);\n\treturn interpreterProxy->pushInteger(result);\n}\n\nEXPORT(sqInt)\nprimitiveCreateRendererFlags(void)\n{\n    sqInt flags;\n    sqInt h;\n    sqInt result;\n    sqInt w;\n    sqInt x;\n    sqInt y;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 5)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\th = interpreterProxy->stackIntegerValue(0);\n\tw = interpreterProxy->stackIntegerValue(1);\n\ty = interpreterProxy->stackIntegerValue(2);\n\tx = interpreterProxy->stackIntegerValue(3);\n\tflags = interpreterProxy->stackIntegerValue(4);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = b3dxCreateRendererFlags(x, y, w, h, flags);\n\tif (result < 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop(6);\n\treturn interpreterProxy->pushInteger(result);\n}\n\nEXPORT(sqInt)\nprimitiveDestroyRenderer(void)\n{\n    sqInt handle;\n    sqInt result;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\thandle = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = b3dxDestroyRenderer(handle);\n\tif (!(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\treturn interpreterProxy->pop(1);\n}\n\nEXPORT(sqInt)\nprimitiveDestroyTexture(void)\n{\n    sqInt handle;\n    sqInt renderer;\n    sqInt result;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 2)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\thandle = interpreterProxy->stackIntegerValue(0);\n\trenderer = interpreterProxy->stackIntegerValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = b3dxDestroyTexture(renderer, handle);\n\tif (!(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\treturn interpreterProxy->pop(2);\n}\n\n\n/*\tPrimitive. Setup non-VBO client state and call drawRangeElements in one go\n\tto avoid\n\tgarbage collection to move the buffers underneith.\n */\n\nEXPORT(sqInt)\nprimitiveDrawArrays(void)\n{\n    sqInt colors;\n    float f;\n    sqInt handle;\n    sqInt i;\n    sqInt maxIdx;\n    sqInt minIdx;\n    sqInt mode;\n    sqInt normals;\n    sqInt ok;\n    sqInt texCoords;\n    sqInt vertices;\n    float *vtxPtr;\n    sqInt vtxSize;\n    sqInt vtxSize1;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 8)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tmaxIdx = interpreterProxy->stackIntegerValue(0);\n\tminIdx = interpreterProxy->stackIntegerValue(1);\n\tmode = interpreterProxy->stackIntegerValue(2);\n\ttexCoords = interpreterProxy->stackValue(3);\n\tnormals = interpreterProxy->stackValue(4);\n\tcolors = interpreterProxy->stackValue(5);\n\tvertices = interpreterProxy->stackValue(6);\n\thandle = interpreterProxy->stackIntegerValue(7);\n\tloadClientStateverticescolorsnormalstexCoords(handle, vertices, colors, normals, texCoords);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (doRangeChecks) {\n\t\t/* begin checkVertexData: */\n\t\tvtxSize1 = interpreterProxy->slotSizeOf(vertices);\n\t\tvtxPtr = interpreterProxy->firstIndexableField(vertices);\n\t\tfor (i = 0; i <= (vtxSize1 - 1); i += 1) {\n\t\t\tf = vtxPtr[i];\n\t\t\tif (isnan(f - f)) {\n\t\t\t\tinterpreterProxy->primitiveFail();\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t}\n\tl1:\t/* end checkVertexData: */;\n\t\tvtxSize = (interpreterProxy->slotSizeOf(vertices)) / 3;\n\t\tif ((minIdx < 0)\n\t\t || ((minIdx > maxIdx)\n || (maxIdx > vtxSize))) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tok = b3dDrawArrays(handle, mode, minIdx, maxIdx);\n\tif (!(ok)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->pop(interpreterProxy->methodArgumentCount());\n\t}\n}\n\n\n/*\tPrimitive. Setup non-VBO client state and call drawElements in one go to\n\tavoid garbage collection to move the buffers underneith. */\n\nEXPORT(sqInt)\nprimitiveDrawElements(void)\n{\n    sqInt colors;\n    float f;\n    unsigned int *facePtr;\n    sqInt faceSize;\n    sqInt faces;\n    sqInt handle;\n    sqInt i;\n    sqInt i1;\n    sqInt mode;\n    sqInt normals;\n    sqInt ok;\n    sqInt texCoords;\n    sqInt vertices;\n    float *vtxPtr;\n    sqInt vtxSize;\n    sqInt vtxSize1;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 7)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tfaces = interpreterProxy->stackValue(0);\n\tif (!(interpreterProxy->isWords(faces))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tfaceSize = interpreterProxy->slotSizeOf(faces);\n\tfacePtr = interpreterProxy->firstIndexableField(faces);\n\tmode = interpreterProxy->stackIntegerValue(1);\n\ttexCoords = interpreterProxy->stackValue(2);\n\tnormals = interpreterProxy->stackValue(3);\n\tcolors = interpreterProxy->stackValue(4);\n\tvertices = interpreterProxy->stackValue(5);\n\thandle = interpreterProxy->stackIntegerValue(6);\n\tloadClientStateverticescolorsnormalstexCoords(handle, vertices, colors, normals, texCoords);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (doRangeChecks) {\n\t\t/* begin checkVertexData: */\n\t\tvtxSize = interpreterProxy->slotSizeOf(vertices);\n\t\tvtxPtr = interpreterProxy->firstIndexableField(vertices);\n\t\tfor (i = 0; i <= (vtxSize - 1); i += 1) {\n\t\t\tf = vtxPtr[i];\n\t\t\tif (isnan(f - f)) {\n\t\t\t\tinterpreterProxy->primitiveFail();\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t}\n\tl1:\t/* end checkVertexData: */;\n\t\t/* begin checkBoundsRange:faces:count: */\n\t\tvtxSize1 = (interpreterProxy->slotSizeOf(vertices)) / 3;\n\t\tfor (i1 = 0; i1 <= (faceSize - 1); i1 += 1) {\n\t\t\tif ((facePtr[i1]) > vtxSize1) {\n\t\t\t\tinterpreterProxy->primitiveFail();\n\t\t\t\tgoto l2;\n\t\t\t}\n\t\t}\n\tl2:\t/* end checkBoundsRange:faces:count: */;\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tok = b3dDrawElements(handle, mode, faceSize, facePtr);\n\tif (!(ok)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->pop(interpreterProxy->methodArgumentCount());\n\t}\n}\n\n\n/*\tPrimitive. Setup non-VBO client state and call drawRangeElements in one go\n\tto avoid\n\tgarbage collection to move the buffers underneith.\n */\n\nEXPORT(sqInt)\nprimitiveDrawRangeElements(void)\n{\n    sqInt colors;\n    float f;\n    unsigned int *facePtr;\n    sqInt faceSize;\n    sqInt faces;\n    sqInt handle;\n    sqInt i;\n    sqInt i1;\n    sqInt maxIdx;\n    sqInt minIdx;\n    sqInt mode;\n    sqInt normals;\n    sqInt ok;\n    sqInt texCoords;\n    sqInt vertices;\n    float *vtxPtr;\n    sqInt vtxSize;\n    sqInt vtxSize1;\n    sqInt vtxSize2;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 9)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tfaces = interpreterProxy->stackValue(0);\n\tif (!(interpreterProxy->isWords(faces))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tfaceSize = interpreterProxy->slotSizeOf(faces);\n\tfacePtr = interpreterProxy->firstIndexableField(faces);\n\tmaxIdx = interpreterProxy->stackIntegerValue(1);\n\tminIdx = interpreterProxy->stackIntegerValue(2);\n\tmode = interpreterProxy->stackIntegerValue(3);\n\ttexCoords = interpreterProxy->stackValue(4);\n\tnormals = interpreterProxy->stackValue(5);\n\tcolors = interpreterProxy->stackValue(6);\n\tvertices = interpreterProxy->stackValue(7);\n\thandle = interpreterProxy->stackIntegerValue(8);\n\tloadClientStateverticescolorsnormalstexCoords(handle, vertices, colors, normals, texCoords);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (doRangeChecks) {\n\t\t/* begin checkVertexData: */\n\t\tvtxSize1 = interpreterProxy->slotSizeOf(vertices);\n\t\tvtxPtr = interpreterProxy->firstIndexableField(vertices);\n\t\tfor (i = 0; i <= (vtxSize1 - 1); i += 1) {\n\t\t\tf = vtxPtr[i];\n\t\t\tif (isnan(f - f)) {\n\t\t\t\tinterpreterProxy->primitiveFail();\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t}\n\tl1:\t/* end checkVertexData: */;\n\t\t/* begin checkBoundsRange:faces:count: */\n\t\tvtxSize2 = (interpreterProxy->slotSizeOf(vertices)) / 3;\n\t\tfor (i1 = 0; i1 <= (faceSize - 1); i1 += 1) {\n\t\t\tif ((facePtr[i1]) > vtxSize2) {\n\t\t\t\tinterpreterProxy->primitiveFail();\n\t\t\t\tgoto l2;\n\t\t\t}\n\t\t}\n\tl2:\t/* end checkBoundsRange:faces:count: */;\n\t\tvtxSize = (interpreterProxy->slotSizeOf(vertices)) / 3;\n\t\tif ((minIdx < 0)\n\t\t || ((minIdx > maxIdx)\n || (maxIdx > vtxSize))) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tok = b3dDrawRangeElements(handle, mode, minIdx, maxIdx, faceSize,  facePtr);\n\tif (!(ok)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->pop(interpreterProxy->methodArgumentCount());\n\t}\n}\n\n\n/*\tPrimitive. Enable/disable draw (range) checks */\n\nEXPORT(sqInt)\nprimitiveEnableDrawRangeChecks(void)\n{\n    sqInt enabled;\n\n\tif ((interpreterProxy->methodArgumentCount()) == 0) {\n\t\tinterpreterProxy->pop(1);\n\t\treturn interpreterProxy->pushBool(doRangeChecks);\n\t}\n\tif ((interpreterProxy->methodArgumentCount()) == 1) {\n\t\tenabled = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(0));\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tdoRangeChecks = enabled;\n\t\treturn interpreterProxy->pop(1);\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveFinishRenderer(void)\n{\n    sqInt handle;\n    sqInt result;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\thandle = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = b3dxFinishRenderer(handle);\n\tif (!(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\treturn interpreterProxy->pop(1);\n}\n\nEXPORT(sqInt)\nprimitiveFlushRenderer(void)\n{\n    sqInt handle;\n    sqInt result;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\thandle = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = b3dxFlushRenderer(handle);\n\tif (!(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\treturn interpreterProxy->pop(1);\n}\n\nEXPORT(sqInt)\nprimitiveGetIntProperty(void)\n{\n    sqInt handle;\n    sqInt prop;\n    sqInt result;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 2)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tprop = interpreterProxy->stackIntegerValue(0);\n\thandle = interpreterProxy->stackIntegerValue(1);\n\tresult = b3dxGetIntProperty(handle, prop);\n\tinterpreterProxy->pop(3);\n\treturn interpreterProxy->pushInteger(result);\n}\n\nEXPORT(sqInt)\nprimitiveGetRendererColorMasks(void)\n{\n    sqInt array;\n    sqInt arrayOop;\n    sqInt handle;\n    sqInt i;\n    int masks[4];\n    sqInt result;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 2)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tarray = interpreterProxy->stackObjectValue(0);\n\thandle = interpreterProxy->stackIntegerValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!((interpreterProxy->fetchClassOf(array)) == (interpreterProxy->classArray()))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!((interpreterProxy->slotSizeOf(array)) == 4)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tresult = b3dxGetRendererColorMasks(handle, masks);\n\tif (!(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tarrayOop = array;\n\tfor (i = 0; i <= 3; i += 1) {\n\t\tinterpreterProxy->pushRemappableOop(arrayOop);\n\t\tresult = interpreterProxy->positive32BitIntegerFor(masks[i]);\n\t\tarrayOop = interpreterProxy->popRemappableOop();\n\t\tinterpreterProxy->storePointerofObjectwithValue(i, arrayOop, result);\n\t}\n\treturn interpreterProxy->pop(2);\n}\n\nEXPORT(sqInt)\nprimitiveGetRendererSurfaceDepth(void)\n{\n    sqInt handle;\n    sqInt result;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\thandle = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = b3dxGetRendererSurfaceDepth(handle);\n\tif (result < 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop(2);\n\treturn interpreterProxy->pushInteger(result);\n}\n\nEXPORT(sqInt)\nprimitiveGetRendererSurfaceHandle(void)\n{\n    sqInt handle;\n    sqInt result;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\thandle = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = b3dxGetRendererSurfaceHandle(handle);\n\tif (result < 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop(2);\n\treturn interpreterProxy->pushInteger(result);\n}\n\nEXPORT(sqInt)\nprimitiveGetRendererSurfaceHeight(void)\n{\n    sqInt handle;\n    sqInt result;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\thandle = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = b3dxGetRendererSurfaceHeight(handle);\n\tif (result < 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop(2);\n\treturn interpreterProxy->pushInteger(result);\n}\n\nEXPORT(sqInt)\nprimitiveGetRendererSurfaceWidth(void)\n{\n    sqInt handle;\n    sqInt result;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\thandle = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = b3dxGetRendererSurfaceWidth(handle);\n\tif (result < 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop(2);\n\treturn interpreterProxy->pushInteger(result);\n}\n\nEXPORT(sqInt)\nprimitiveIsOverlayRenderer(void)\n{\n    sqInt handle;\n    sqInt result;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\thandle = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = b3dxIsOverlayRenderer(handle);\n\tinterpreterProxy->pop(2);\n\treturn interpreterProxy->pushBool(result);\n}\n\nEXPORT(sqInt)\nprimitiveRendererVersion(void)\n{\n\tif (!((interpreterProxy->methodArgumentCount()) == 0)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop(1);\n\treturn interpreterProxy->pushInteger(1);\n}\n\nEXPORT(sqInt)\nprimitiveRenderVertexBuffer(void)\n{\n    sqInt flags;\n    sqInt handle;\n    int *idxArray;\n    sqInt idxCount;\n    sqInt primType;\n    sqInt result;\n    sqInt texHandle;\n    float *vtxArray;\n    sqInt vtxCount;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 8)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tidxCount = interpreterProxy->stackIntegerValue(0);\n\tvtxCount = interpreterProxy->stackIntegerValue(2);\n\ttexHandle = interpreterProxy->stackIntegerValue(4);\n\tflags = interpreterProxy->stackIntegerValue(5);\n\tprimType = interpreterProxy->stackIntegerValue(6);\n\thandle = interpreterProxy->stackIntegerValue(7);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tvtxArray = stackPrimitiveVertexArrayofSize(3, vtxCount);\n\tidxArray = stackPrimitiveIndexArrayofSizevalidateforVertexSize(1, idxCount, 1, vtxCount);\n\tif ((vtxArray == null)\n\t || ((idxArray == null)\n || ((primType < 1)\n || ((primType > 6)\n || (interpreterProxy->failed()))))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tresult = b3dxRenderVertexBuffer(handle, primType, flags, texHandle, vtxArray, vtxCount, idxArray, idxCount);\n\tif (!(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\treturn interpreterProxy->pop(8);\n}\n\n\n/*\tPrimitive. Set the buffer rectangle (e.g., the pixel area on screen) to\n\tuse for this renderer.\n\tThe viewport is positioned within the buffer rectangle.\n */\n\nEXPORT(sqInt)\nprimitiveSetBufferRect(void)\n{\n    sqInt h;\n    sqInt handle;\n    sqInt result;\n    sqInt w;\n    sqInt x;\n    sqInt y;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 5)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\th = interpreterProxy->stackIntegerValue(0);\n\tw = interpreterProxy->stackIntegerValue(1);\n\ty = interpreterProxy->stackIntegerValue(2);\n\tx = interpreterProxy->stackIntegerValue(3);\n\thandle = interpreterProxy->stackIntegerValue(4);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = b3dxSetBufferRect(handle, x, y, w, h);\n\tif (!(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\treturn interpreterProxy->pop(5);\n}\n\nEXPORT(sqInt)\nprimitiveSetFog(void)\n{\n    double density;\n    sqInt fogType;\n    sqInt handle;\n    sqInt result;\n    sqInt rgba;\n    double start;\n    double stop;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 6)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\trgba = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(0));\n\tstop = interpreterProxy->floatValueOf(interpreterProxy->stackValue(1));\n\tstart = interpreterProxy->floatValueOf(interpreterProxy->stackValue(2));\n\tdensity = interpreterProxy->floatValueOf(interpreterProxy->stackValue(3));\n\tfogType = interpreterProxy->stackIntegerValue(4);\n\thandle = interpreterProxy->stackIntegerValue(5);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = b3dxSetFog(handle, fogType, density, start, stop, rgba);\n\tif (!(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\treturn interpreterProxy->pop(6);\n}\n\nEXPORT(sqInt)\nprimitiveSetIntProperty(void)\n{\n    sqInt handle;\n    sqInt prop;\n    sqInt result;\n    sqInt value;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 3)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tvalue = interpreterProxy->stackIntegerValue(0);\n\tprop = interpreterProxy->stackIntegerValue(1);\n\thandle = interpreterProxy->stackIntegerValue(2);\n\tresult = b3dxSetIntProperty(handle, prop, value);\n\tif (!(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\treturn interpreterProxy->pop(3);\n}\n\nEXPORT(sqInt)\nprimitiveSetLights(void)\n{\n    sqInt handle;\n    sqInt i;\n    void*light;\n    sqInt lightArray;\n    sqInt lightCount;\n    sqInt lightOop;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 2)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tlightArray = stackLightArrayValue(0);\n\thandle = interpreterProxy->stackIntegerValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!(b3dxDisableLights(handle))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (lightArray == null) {\n\t\treturn null;\n\t}\n\n\t/* For each enabled light source */\n\n\tlightCount = interpreterProxy->slotSizeOf(lightArray);\n\tfor (i = 0; i <= (lightCount - 1); i += 1) {\n\t\t/* begin fetchLightSource:ofObject: */\n\t\tlightOop = interpreterProxy->fetchPointerofObject(i, lightArray);\n\t\tlight = interpreterProxy->firstIndexableField(lightOop);\n\t\tif (!(b3dxLoadLight(handle, i, light))) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\treturn interpreterProxy->pop(2);\n}\n\nEXPORT(sqInt)\nprimitiveSetMaterial(void)\n{\n    sqInt handle;\n    void*material;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 2)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tmaterial = stackMaterialValue(0);\n\thandle = interpreterProxy->stackIntegerValue(1);\n\tif (!(b3dxLoadMaterial(handle, material))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\treturn interpreterProxy->pop(2);\n}\n\n\n/*\tTransform an entire vertex buffer using the supplied modelview and\n\tprojection matrix.\n */\n\nEXPORT(sqInt)\nprimitiveSetTransform(void)\n{\n    sqInt handle;\n    float *modelViewMatrix;\n    float *projectionMatrix;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 3)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tprojectionMatrix = stackMatrix(0);\n\tmodelViewMatrix = stackMatrix(1);\n\thandle = interpreterProxy->stackIntegerValue(2);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tb3dxSetTransform(handle, modelViewMatrix, projectionMatrix);\n\treturn interpreterProxy->pop(3);\n}\n\nEXPORT(sqInt)\nprimitiveSetVerboseLevel(void)\n{\n    sqInt level;\n    sqInt result;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tlevel = interpreterProxy->stackIntegerValue(0);\n\tresult = b3dxSetVerboseLevel(level);\n\tinterpreterProxy->pop(2);\n\treturn interpreterProxy->pushInteger(result);\n}\n\nEXPORT(sqInt)\nprimitiveSetViewport(void)\n{\n    sqInt h;\n    sqInt handle;\n    sqInt result;\n    sqInt w;\n    sqInt x;\n    sqInt y;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 5)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\th = interpreterProxy->stackIntegerValue(0);\n\tw = interpreterProxy->stackIntegerValue(1);\n\ty = interpreterProxy->stackIntegerValue(2);\n\tx = interpreterProxy->stackIntegerValue(3);\n\thandle = interpreterProxy->stackIntegerValue(4);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = b3dxSetViewport(handle, x, y, w, h);\n\tif (!(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\treturn interpreterProxy->pop(5);\n}\n\nEXPORT(sqInt)\nprimitiveSwapRendererBuffers(void)\n{\n    sqInt handle;\n    sqInt result;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\thandle = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = b3dxSwapRendererBuffers(handle);\n\tif (!(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\treturn interpreterProxy->pop(1);\n}\n\nEXPORT(sqInt)\nprimitiveTextureByteSex(void)\n{\n    sqInt handle;\n    sqInt renderer;\n    sqInt result;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 2)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\thandle = interpreterProxy->stackIntegerValue(0);\n\trenderer = interpreterProxy->stackIntegerValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = b3dxTextureByteSex(renderer, handle);\n\tif (result < 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop(3);\n\treturn interpreterProxy->pushBool(result);\n}\n\nEXPORT(sqInt)\nprimitiveTextureDepth(void)\n{\n    sqInt handle;\n    sqInt renderer;\n    sqInt result;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 2)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\thandle = interpreterProxy->stackIntegerValue(0);\n\trenderer = interpreterProxy->stackIntegerValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = b3dxActualTextureDepth(renderer, handle);\n\tif (result < 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop(3);\n\treturn interpreterProxy->pushInteger(result);\n}\n\nEXPORT(sqInt)\nprimitiveTextureGetColorMasks(void)\n{\n    sqInt array;\n    sqInt arrayOop;\n    sqInt handle;\n    sqInt i;\n    int masks[4];\n    sqInt renderer;\n    sqInt result;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 3)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tarray = interpreterProxy->stackObjectValue(0);\n\thandle = interpreterProxy->stackIntegerValue(1);\n\trenderer = interpreterProxy->stackIntegerValue(2);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!((interpreterProxy->fetchClassOf(array)) == (interpreterProxy->classArray()))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!((interpreterProxy->slotSizeOf(array)) == 4)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tresult = b3dxTextureColorMasks(renderer, handle, masks);\n\tif (!(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tarrayOop = array;\n\tfor (i = 0; i <= 3; i += 1) {\n\t\tinterpreterProxy->pushRemappableOop(arrayOop);\n\t\tresult = interpreterProxy->positive32BitIntegerFor(masks[i]);\n\t\tarrayOop = interpreterProxy->popRemappableOop();\n\t\tinterpreterProxy->storePointerofObjectwithValue(i, arrayOop, result);\n\t}\n\treturn interpreterProxy->pop(3);\n}\n\nEXPORT(sqInt)\nprimitiveTextureSurfaceHandle(void)\n{\n    sqInt handle;\n    sqInt renderer;\n    sqInt result;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 2)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\thandle = interpreterProxy->stackIntegerValue(0);\n\trenderer = interpreterProxy->stackIntegerValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = b3dxTextureSurfaceHandle(renderer, handle);\n\tif (result < 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop(3);\n\treturn interpreterProxy->pushInteger(result);\n}\n\nEXPORT(sqInt)\nprimitiveTextureUpload(void)\n{\n    sqInt bits;\n    void*bitsPtr;\n    sqInt d;\n    sqInt form;\n    sqInt h;\n    sqInt handle;\n    sqInt ppw;\n    sqInt renderer;\n    sqInt result;\n    sqInt w;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 3)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tform = interpreterProxy->stackValue(0);\n\tif (!((interpreterProxy->isPointers(form))\n\t\t && ((interpreterProxy->slotSizeOf(form)) >= 4))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tbits = interpreterProxy->fetchPointerofObject(0, form);\n\tw = interpreterProxy->fetchIntegerofObject(1, form);\n\th = interpreterProxy->fetchIntegerofObject(2, form);\n\td = interpreterProxy->fetchIntegerofObject(3, form);\n\tppw = 32 / d;\n\tif (!(interpreterProxy->isWords(bits))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!((interpreterProxy->slotSizeOf(bits)) == ((((w + ppw) - 1) / ppw) * h))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tbitsPtr = interpreterProxy->firstIndexableField(bits);\n\thandle = interpreterProxy->stackIntegerValue(1);\n\trenderer = interpreterProxy->stackIntegerValue(2);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = b3dxUploadTexture(renderer, handle, w, h, d, bitsPtr);\n\tif (!(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\treturn interpreterProxy->pop(3);\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n    sqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\nEXPORT(sqInt)\nshutdownModule(void)\n{\n\treturn b3dxShutdown();\n}\n\n\n/*\tLoad an Array of B3DPrimitiveLights from the given stack index */\n\nstatic sqInt\nstackLightArrayValue(sqInt stackIndex)\n{\n    sqInt array;\n    sqInt arraySize;\n    sqInt i;\n    sqInt oop;\n\n\tarray = interpreterProxy->stackObjectValue(stackIndex);\n\tif (array == null) {\n\t\treturn null;\n\t}\n\tif (array == (interpreterProxy->nilObject())) {\n\t\treturn null;\n\t}\n\tif (!((interpreterProxy->fetchClassOf(array)) == (interpreterProxy->classArray()))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tarraySize = interpreterProxy->slotSizeOf(array);\n\tfor (i = 0; i <= (arraySize - 1); i += 1) {\n\t\toop = interpreterProxy->fetchPointerofObject(i, array);\n\t\tif ((oop & 1)) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t\tif (!((interpreterProxy->isWords(oop))\n\t\t\t && ((interpreterProxy->slotSizeOf(oop)) == 32))) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\treturn array;\n}\n\n\n/*\tLoad a B3DMaterial from the given stack index */\n\nstatic void *\nstackMaterialValue(sqInt stackIndex)\n{\n    sqInt oop;\n\n\toop = interpreterProxy->stackObjectValue(stackIndex);\n\tif (oop == null) {\n\t\treturn null;\n\t}\n\tif (oop == (interpreterProxy->nilObject())) {\n\t\treturn null;\n\t}\n\tif ((interpreterProxy->isWords(oop))\n\t && ((interpreterProxy->slotSizeOf(oop)) == 17)) {\n\t\treturn interpreterProxy->firstIndexableField(oop);\n\t}\n\treturn null;\n}\n\n\n/*\tLoad a 4x4 transformation matrix from the interpreter stack.\n\tReturn a pointer to the matrix data if successful, nil otherwise. */\n\nstatic void*\nstackMatrix(sqInt index)\n{\n    sqInt oop;\n\n\toop = interpreterProxy->stackObjectValue(index);\n\tif (oop == null) {\n\t\treturn null;\n\t}\n\tif ((interpreterProxy->isWords(oop))\n\t && ((interpreterProxy->slotSizeOf(oop)) == 16)) {\n\t\treturn interpreterProxy->firstIndexableField(oop);\n\t}\n\treturn null;\n}\n\n\n/*\tLoad a primitive index array from the interpreter stack.\n\tIf aBool is true then check that all the indexes are in the range\n\t(1,maxIndex). Return a pointer to the index data if successful, nil\n\totherwise. \n */\n\nstatic void*\nstackPrimitiveIndexArrayofSizevalidateforVertexSize(sqInt stackIndex, sqInt nItems, sqInt aBool, sqInt maxIndex)\n{\n    sqInt i;\n    int *idxPtr;\n    sqInt index;\n    sqInt oop;\n    sqInt oopSize;\n\n\toop = interpreterProxy->stackObjectValue(stackIndex);\n\tif (oop == null) {\n\t\treturn null;\n\t}\n\tif (!(interpreterProxy->isWords(oop))) {\n\t\treturn null;\n\t}\n\toopSize = interpreterProxy->slotSizeOf(oop);\n\tif (oopSize < nItems) {\n\t\treturn null;\n\t}\n\tidxPtr = ((int *) (interpreterProxy->firstIndexableField(oop)));\n\tif (aBool) {\n\t\tfor (i = 0; i <= (nItems - 1); i += 1) {\n\t\t\tindex = idxPtr[i];\n\t\t\tif ((index < 0)\n\t\t\t || (index > maxIndex)) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t}\n\treturn idxPtr;\n}\n\n\n/*\tLoad a primitive vertex array from the interpreter stack.\n\tReturn a pointer to the vertex data if successful, nil otherwise. */\n\nstatic void*\nstackPrimitiveVertexArrayofSize(sqInt index, sqInt nItems)\n{\n    sqInt oop;\n    sqInt oopSize;\n\n\toop = interpreterProxy->stackObjectValue(index);\n\tif (oop == null) {\n\t\treturn null;\n\t}\n\tif (interpreterProxy->isWords(oop)) {\n\t\toopSize = interpreterProxy->slotSizeOf(oop);\n\t\tif (((oopSize >= nItems) * 16)\n\t\t && ((oopSize % 16) == 0)) {\n\t\t\treturn interpreterProxy->firstIndexableField(oop);\n\t\t}\n\t}\n\treturn null;\n}\n\n\n/*\tLoad a primitive vertex from the interpreter stack.\n\tReturn a pointer to the vertex data if successful, nil otherwise. */\n\nstatic void*\nstackPrimitiveVertex(sqInt index)\n{\n    sqInt oop;\n\n\toop = interpreterProxy->stackObjectValue(index);\n\tif (oop == null) {\n\t\treturn null;\n\t}\n\tif ((interpreterProxy->isWords(oop))\n\t && ((interpreterProxy->slotSizeOf(oop)) == 16)) {\n\t\treturn interpreterProxy->firstIndexableField(oop);\n\t}\n\treturn null;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* B3DAcceleratorPlugin_exports[][3] = {\n\t{\"B3DAcceleratorPlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"B3DAcceleratorPlugin\", \"initialiseModule\", (void*)initialiseModule},\n\t{\"B3DAcceleratorPlugin\", \"primitiveAllocateTexture\", (void*)primitiveAllocateTexture},\n\t{\"B3DAcceleratorPlugin\", \"primitiveClearDepthBuffer\", (void*)primitiveClearDepthBuffer},\n\t{\"B3DAcceleratorPlugin\", \"primitiveClearViewport\", (void*)primitiveClearViewport},\n\t{\"B3DAcceleratorPlugin\", \"primitiveCompositeTexture\", (void*)primitiveCompositeTexture},\n\t{\"B3DAcceleratorPlugin\", \"primitiveCreateRenderer\", (void*)primitiveCreateRenderer},\n\t{\"B3DAcceleratorPlugin\", \"primitiveCreateRendererFlags\", (void*)primitiveCreateRendererFlags},\n\t{\"B3DAcceleratorPlugin\", \"primitiveDestroyRenderer\", (void*)primitiveDestroyRenderer},\n\t{\"B3DAcceleratorPlugin\", \"primitiveDestroyTexture\", (void*)primitiveDestroyTexture},\n\t{\"B3DAcceleratorPlugin\", \"primitiveDrawArrays\", (void*)primitiveDrawArrays},\n\t{\"B3DAcceleratorPlugin\", \"primitiveDrawElements\", (void*)primitiveDrawElements},\n\t{\"B3DAcceleratorPlugin\", \"primitiveDrawRangeElements\", (void*)primitiveDrawRangeElements},\n\t{\"B3DAcceleratorPlugin\", \"primitiveEnableDrawRangeChecks\", (void*)primitiveEnableDrawRangeChecks},\n\t{\"B3DAcceleratorPlugin\", \"primitiveFinishRenderer\", (void*)primitiveFinishRenderer},\n\t{\"B3DAcceleratorPlugin\", \"primitiveFlushRenderer\", (void*)primitiveFlushRenderer},\n\t{\"B3DAcceleratorPlugin\", \"primitiveGetIntProperty\", (void*)primitiveGetIntProperty},\n\t{\"B3DAcceleratorPlugin\", \"primitiveGetRendererColorMasks\", (void*)primitiveGetRendererColorMasks},\n\t{\"B3DAcceleratorPlugin\", \"primitiveGetRendererSurfaceDepth\", (void*)primitiveGetRendererSurfaceDepth},\n\t{\"B3DAcceleratorPlugin\", \"primitiveGetRendererSurfaceHandle\", (void*)primitiveGetRendererSurfaceHandle},\n\t{\"B3DAcceleratorPlugin\", \"primitiveGetRendererSurfaceHeight\", (void*)primitiveGetRendererSurfaceHeight},\n\t{\"B3DAcceleratorPlugin\", \"primitiveGetRendererSurfaceWidth\", (void*)primitiveGetRendererSurfaceWidth},\n\t{\"B3DAcceleratorPlugin\", \"primitiveIsOverlayRenderer\", (void*)primitiveIsOverlayRenderer},\n\t{\"B3DAcceleratorPlugin\", \"primitiveRendererVersion\", (void*)primitiveRendererVersion},\n\t{\"B3DAcceleratorPlugin\", \"primitiveRenderVertexBuffer\", (void*)primitiveRenderVertexBuffer},\n\t{\"B3DAcceleratorPlugin\", \"primitiveSetBufferRect\", (void*)primitiveSetBufferRect},\n\t{\"B3DAcceleratorPlugin\", \"primitiveSetFog\", (void*)primitiveSetFog},\n\t{\"B3DAcceleratorPlugin\", \"primitiveSetIntProperty\", (void*)primitiveSetIntProperty},\n\t{\"B3DAcceleratorPlugin\", \"primitiveSetLights\", (void*)primitiveSetLights},\n\t{\"B3DAcceleratorPlugin\", \"primitiveSetMaterial\", (void*)primitiveSetMaterial},\n\t{\"B3DAcceleratorPlugin\", \"primitiveSetTransform\", (void*)primitiveSetTransform},\n\t{\"B3DAcceleratorPlugin\", \"primitiveSetVerboseLevel\", (void*)primitiveSetVerboseLevel},\n\t{\"B3DAcceleratorPlugin\", \"primitiveSetViewport\", (void*)primitiveSetViewport},\n\t{\"B3DAcceleratorPlugin\", \"primitiveSwapRendererBuffers\", (void*)primitiveSwapRendererBuffers},\n\t{\"B3DAcceleratorPlugin\", \"primitiveTextureByteSex\", (void*)primitiveTextureByteSex},\n\t{\"B3DAcceleratorPlugin\", \"primitiveTextureDepth\", (void*)primitiveTextureDepth},\n\t{\"B3DAcceleratorPlugin\", \"primitiveTextureGetColorMasks\", (void*)primitiveTextureGetColorMasks},\n\t{\"B3DAcceleratorPlugin\", \"primitiveTextureSurfaceHandle\", (void*)primitiveTextureSurfaceHandle},\n\t{\"B3DAcceleratorPlugin\", \"primitiveTextureUpload\", (void*)primitiveTextureUpload},\n\t{\"B3DAcceleratorPlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{\"B3DAcceleratorPlugin\", \"shutdownModule\", (void*)shutdownModule},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/BMPReadWriterPlugin/BMPReadWriterPlugin.c",
    "content": "/* Automatically generated by\n\tVMPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tBMPReadWriterPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"BMPReadWriterPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n\n/*** Function Prototypes ***/\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nstatic sqInt msg(char *s);\nEXPORT(sqInt) primitiveRead24BmpLine(void);\nEXPORT(sqInt) primitiveWrite24BmpLine(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\n\n\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"BMPReadWriterPlugin VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"BMPReadWriterPlugin VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\n\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\nEXPORT(sqInt)\nprimitiveRead24BmpLine(void)\n{\n    unsigned int *formBits;\n    sqInt formBitsIndex;\n    sqInt formBitsOop;\n    sqInt formBitsSize;\n    unsigned char *pixelLine;\n    sqInt pixelLineOop;\n    sqInt pixelLineSize;\n    sqInt width;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 4)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\twidth = interpreterProxy->stackIntegerValue(0);\n\tformBitsIndex = interpreterProxy->stackIntegerValue(1);\n\tformBitsOop = interpreterProxy->stackObjectValue(2);\n\tpixelLineOop = interpreterProxy->stackObjectValue(3);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!(interpreterProxy->isWords(formBitsOop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!(interpreterProxy->isBytes(pixelLineOop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tformBitsSize = interpreterProxy->slotSizeOf(formBitsOop);\n\tformBits = interpreterProxy->firstIndexableField(formBitsOop);\n\tpixelLineSize = interpreterProxy->slotSizeOf(pixelLineOop);\n\tpixelLine = interpreterProxy->firstIndexableField(pixelLineOop);\n\tif (!(((formBitsIndex + width) <= formBitsSize)\n\t\t && ((width * 3) <= pixelLineSize))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\t\n\tformBits += formBitsIndex-1;\n\twhile(width--) {\n\t\tunsigned int rgb;\n\t\trgb = (*pixelLine++);\n\t\trgb += (*pixelLine++) << 8;\n\t\trgb += (*pixelLine++) << 16;\n\t\tif(rgb) rgb |= 0xFF000000; else rgb |= 0xFF000001;\n\t\t*formBits++ = rgb;\n\t}\n\t;\n\tinterpreterProxy->pop(4);\n}\n\nEXPORT(sqInt)\nprimitiveWrite24BmpLine(void)\n{\n    unsigned int *formBits;\n    sqInt formBitsIndex;\n    sqInt formBitsOop;\n    sqInt formBitsSize;\n    unsigned char *pixelLine;\n    sqInt pixelLineOop;\n    sqInt pixelLineSize;\n    sqInt width;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 4)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\twidth = interpreterProxy->stackIntegerValue(0);\n\tformBitsIndex = interpreterProxy->stackIntegerValue(1);\n\tformBitsOop = interpreterProxy->stackObjectValue(2);\n\tpixelLineOop = interpreterProxy->stackObjectValue(3);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!(interpreterProxy->isWords(formBitsOop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!(interpreterProxy->isBytes(pixelLineOop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tformBitsSize = interpreterProxy->slotSizeOf(formBitsOop);\n\tformBits = interpreterProxy->firstIndexableField(formBitsOop);\n\tpixelLineSize = interpreterProxy->slotSizeOf(pixelLineOop);\n\tpixelLine = interpreterProxy->firstIndexableField(pixelLineOop);\n\tif (!(((formBitsIndex + width) <= formBitsSize)\n\t\t && ((width * 3) <= pixelLineSize))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\t\n\tformBits += formBitsIndex-1;\n\n\twhile(width--) {\n\t\tunsigned int rgb;\n\t\trgb = *formBits++;\n\t\t(*pixelLine++) = (rgb      ) & 0xFF;\n\t\t(*pixelLine++) = (rgb >> 8 ) & 0xFF;\n\t\t(*pixelLine++) = (rgb >> 16) & 0xFF;\n\t}\n\n\t;\n\tinterpreterProxy->pop(4);\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n    sqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* BMPReadWriterPlugin_exports[][3] = {\n\t{\"BMPReadWriterPlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"BMPReadWriterPlugin\", \"primitiveRead24BmpLine\", (void*)primitiveRead24BmpLine},\n\t{\"BMPReadWriterPlugin\", \"primitiveWrite24BmpLine\", (void*)primitiveWrite24BmpLine},\n\t{\"BMPReadWriterPlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/BitBltPlugin/BitBltPlugin.c",
    "content": "/* Automatically generated by\n\tVMPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tBitBltSimulation VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"BitBltSimulation VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n#define AllOnes 0xFFFFFFFFUL\n#define AlphaIndex 3\n#define BBClipHeightIndex 13\n#define BBClipWidthIndex 12\n#define BBClipXIndex 10\n#define BBClipYIndex 11\n#define BBColorMapIndex 14\n#define BBDestFormIndex 0\n#define BBDestXIndex 4\n#define BBDestYIndex 5\n#define BBHalftoneFormIndex 2\n#define BBHeightIndex 7\n#define BBRuleIndex 3\n#define BBSourceFormIndex 1\n#define BBSourceXIndex 8\n#define BBSourceYIndex 9\n#define BBWarpBase 15\n#define BBWidthIndex 6\n#define BinaryPoint 14\n#define BlueIndex 2\n#define ColorMapFixedPart 2\n#define ColorMapIndexedPart 4\n#define ColorMapNewStyle 8\n#define ColorMapPresent 1\n#define FixedPt1 0x4000\n#define FormBitsIndex 0\n#define FormDepthIndex 3\n#define FormHeightIndex 2\n#define FormWidthIndex 1\n#define GreenIndex 1\n#define OpTableSize 42\n#define RedIndex 0\n\n\n/*** Function Prototypes ***/\nstatic sqInt addWordwith(sqInt sourceWord, sqInt destinationWord);\nstatic sqInt affectedBottom(void);\nstatic sqInt affectedLeft(void);\nstatic sqInt affectedRight(void);\nstatic sqInt affectedTop(void);\nstatic sqInt alphaBlendConstwith(sqInt sourceWord, sqInt destinationWord);\nstatic sqInt alphaBlendConstwithpaintMode(sqInt sourceWord, sqInt destinationWord, sqInt paintMode);\nstatic sqInt alphaBlendScaledwith(sqInt sourceWord, sqInt destinationWord);\nstatic sqInt alphaBlendwith(sqInt sourceWord, sqInt destinationWord);\nstatic sqInt alphaPaintConstwith(sqInt sourceWord, sqInt destinationWord);\nstatic sqInt alphaSourceBlendBits16(void);\nstatic sqInt alphaSourceBlendBits32(void);\nstatic sqInt alphaSourceBlendBits8(void);\nstatic sqInt bitAndInvertwith(sqInt sourceWord, sqInt destinationWord);\nstatic sqInt bitAndwith(sqInt sourceWord, sqInt destinationWord);\nstatic sqInt bitInvertAndInvertwith(sqInt sourceWord, sqInt destinationWord);\nstatic sqInt bitInvertAndwith(sqInt sourceWord, sqInt destinationWord);\nstatic sqInt bitInvertDestinationwith(sqInt sourceWord, sqInt destinationWord);\nstatic sqInt bitInvertOrInvertwith(sqInt sourceWord, sqInt destinationWord);\nstatic sqInt bitInvertOrwith(sqInt sourceWord, sqInt destinationWord);\nstatic sqInt bitInvertSourcewith(sqInt sourceWord, sqInt destinationWord);\nstatic sqInt bitInvertXorwith(sqInt sourceWord, sqInt destinationWord);\nstatic sqInt bitOrInvertwith(sqInt sourceWord, sqInt destinationWord);\nstatic sqInt bitOrwith(sqInt sourceWord, sqInt destinationWord);\nstatic sqInt bitXorwith(sqInt sourceWord, sqInt destinationWord);\nstatic sqInt checkSourceOverlap(void);\nstatic sqInt clearWordwith(sqInt source, sqInt destination);\nstatic sqInt clipRange(void);\nEXPORT(sqInt) copyBits(void);\nEXPORT(sqInt) copyBitsFromtoat(sqInt startX, sqInt stopX, sqInt yValue);\nstatic sqInt copyBitsLockedAndClipped(void);\nstatic sqInt copyLoop(void);\nstatic sqInt copyLoopNoSource(void);\nstatic sqInt copyLoopPixMap(void);\nstatic unsigned int * default8To32Table(void);\nstatic sqInt deltaFromtonSteps(sqInt x1, sqInt x2, sqInt n);\nstatic sqInt destinationWordwith(sqInt sourceWord, sqInt destinationWord);\nstatic sqInt destMaskAndPointerInit(void);\nstatic sqInt dither32To16threshold(sqInt srcWord, sqInt ditherValue);\nstatic sqInt drawLoopXY(sqInt xDelta, sqInt yDelta);\nstatic sqInt dstLongAt(sqInt idx);\nstatic sqInt dstLongAtput(sqInt idx, sqInt value);\nstatic sqInt dstLongAtputmask(sqInt idx, sqInt srcValue, sqInt dstMask);\nstatic sqInt expensiveDither32To16threshold(sqInt srcWord, sqInt ditherValue);\nstatic sqInt fetchIntOrFloatofObject(sqInt fieldIndex, sqInt objectPointer);\nstatic sqInt fetchIntOrFloatofObjectifNil(sqInt fieldIndex, sqInt objectPointer, sqInt defaultValue);\nstatic sqInt fixAlphawith(sqInt sourceWord, sqInt destinationWord);\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halftoneAt(sqInt idx);\nstatic sqInt halt(void);\nstatic sqInt ignoreSourceOrHalftone(sqInt formPointer);\nstatic sqInt initBBOpTable(void);\nstatic sqInt initDither8Lookup(void);\nEXPORT(sqInt) initialiseModule(void);\nstatic sqInt isIdentityMapwith(int *shifts, unsigned int *masks);\nstatic sqInt loadBitBltDestForm(void);\nEXPORT(sqInt) loadBitBltFrom(sqInt bbObj);\nstatic sqInt loadBitBltFromwarping(sqInt bbObj, sqInt aBool);\nstatic sqInt loadBitBltSourceForm(void);\nstatic sqInt loadColorMap(void);\nstatic void * loadColorMapShiftOrMaskFrom(sqInt mapOop);\nstatic sqInt loadHalftoneForm(void);\nstatic sqInt loadSurfacePlugin(void);\nstatic sqInt loadWarpBltFrom(sqInt bbObj);\nstatic sqInt lockSurfaces(void);\nstatic sqInt mapPixelflags(sqInt sourcePixel, sqInt mapperFlags);\nstatic sqInt mergewith(sqInt sourceWord, sqInt destinationWord);\nEXPORT(sqInt) moduleUnloaded(char *aModuleName);\nstatic sqInt msg(char *s);\nstatic sqInt OLDrgbDiffwith(sqInt sourceWord, sqInt destinationWord);\nstatic sqInt OLDtallyIntoMapwith(sqInt sourceWord, sqInt destinationWord);\nstatic sqInt partitionedAddtonBitsnPartitions(unsigned int word1, unsigned int word2, sqInt nBits, sqInt nParts);\nstatic sqInt partitionedANDtonBitsnPartitions(sqInt word1, sqInt word2, sqInt nBits, sqInt nParts);\nstatic sqInt partitionedMaxwithnBitsnPartitions(unsigned int word1, unsigned int word2, sqInt nBits, sqInt nParts);\nstatic sqInt partitionedMinwithnBitsnPartitions(unsigned int word1, unsigned int word2, sqInt nBits, sqInt nParts);\nstatic sqInt partitionedMulwithnBitsnPartitions(sqInt word1, sqInt word2, sqInt nBits, sqInt nParts);\nstatic sqInt partitionedSubfromnBitsnPartitions(unsigned int word1, unsigned int word2, sqInt nBits, sqInt nParts);\nstatic sqInt performCopyLoop(void);\nstatic sqInt pickSourcePixelsflagssrcMaskdestMasksrcShiftIncdstShiftInc(sqInt nPixels, sqInt mapperFlags, sqInt srcMask, sqInt dstMask, sqInt srcShiftInc, sqInt dstShiftInc);\nstatic sqInt pickWarpPixelAtXy(sqInt xx, sqInt yy);\nstatic sqInt pixClearwith(sqInt sourceWord, sqInt destinationWord);\nstatic sqInt pixMaskwith(sqInt sourceWord, sqInt destinationWord);\nstatic sqInt pixPaintwith(sqInt sourceWord, sqInt destinationWord);\nstatic sqInt pixSwapwith(sqInt sourceWord, sqInt destWord);\nEXPORT(sqInt) primitiveCopyBits(void);\nEXPORT(sqInt) primitiveDisplayString(void);\nEXPORT(sqInt) primitiveDrawLoop(void);\nEXPORT(sqInt) primitiveWarpBits(void);\nstatic sqInt queryDestSurface(sqInt handle);\nstatic sqInt querySourceSurface(sqInt handle);\nstatic sqInt rgbAddwith(sqInt sourceWord, sqInt destinationWord);\nstatic sqInt rgbDiffwith(sqInt sourceWord, sqInt destinationWord);\nstatic sqInt rgbMap16To32(sqInt sourcePixel);\nstatic sqInt rgbMap32To32(sqInt sourcePixel);\nstatic sqInt rgbMapPixelflags(sqInt sourcePixel, sqInt mapperFlags);\nstatic sqInt rgbMapfromto(sqInt sourcePixel, sqInt nBitsIn, sqInt nBitsOut);\nstatic sqInt rgbMaxwith(sqInt sourceWord, sqInt destinationWord);\nstatic sqInt rgbMinInvertwith(sqInt wordToInvert, sqInt destinationWord);\nstatic sqInt rgbMinwith(sqInt sourceWord, sqInt destinationWord);\nstatic sqInt rgbMulwith(sqInt sourceWord, sqInt destinationWord);\nstatic sqInt rgbSubwith(sqInt sourceWord, sqInt destinationWord);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\nstatic sqInt setupColorMasks(void);\nstatic sqInt setupColorMasksFromto(sqInt srcBits, sqInt targetBits);\nstatic sqInt showDisplayBits(void);\nstatic sqInt sourceSkewAndPointerInit(void);\nstatic sqInt sourceWordwith(sqInt sourceWord, sqInt destinationWord);\nstatic sqInt srcLongAt(sqInt idx);\nstatic sqInt subWordwith(sqInt sourceWord, sqInt destinationWord);\nstatic sqInt tallyIntoMapwith(sqInt sourceWord, sqInt destinationWord);\nstatic sqInt tallyMapAt(sqInt idx);\nstatic sqInt tallyMapAtput(sqInt idx, sqInt value);\nstatic sqInt tryCopyingBitsQuickly(void);\nstatic sqInt unlockSurfaces(void);\nstatic sqInt warpBits(void);\nstatic sqInt warpLoop(void);\nstatic sqInt warpLoopSetup(void);\nstatic sqInt warpPickSmoothPixelsxDeltahyDeltahxDeltavyDeltavsourceMapsmoothingdstShiftInc(sqInt nPixels, sqInt xDeltah, sqInt yDeltah, sqInt xDeltav, sqInt yDeltav, sqInt sourceMap, sqInt n, sqInt dstShiftInc);\nstatic sqInt warpPickSourcePixelsxDeltahyDeltahxDeltavyDeltavdstShiftIncflags(sqInt nPixels, sqInt xDeltah, sqInt yDeltah, sqInt xDeltav, sqInt yDeltav, sqInt dstShiftInc, sqInt mapperFlags);\n\n\n/*** Variables ***/\nstatic sqInt affectedB;\nstatic sqInt affectedL;\nstatic sqInt affectedR;\nstatic sqInt affectedT;\nstatic sqInt bbH;\nstatic sqInt bbW;\nstatic sqInt bitBltOop;\nstatic sqInt bitCount;\nstatic sqInt clipHeight;\nstatic sqInt clipWidth;\nstatic sqInt clipX;\nstatic sqInt clipY;\nstatic sqInt cmBitsPerColor;\nstatic sqInt cmFlags;\nstatic unsigned int * cmLookupTable;\nstatic sqInt cmMask;\nstatic unsigned int * cmMaskTable;\nstatic int * cmShiftTable;\nstatic sqInt combinationRule;\nstatic sqInt destBits;\nstatic sqInt destBitsOop_xxx_dmu;\nstatic sqInt destDelta;\nstatic sqInt destDepth;\nstatic sqInt destForm;\nstatic sqInt destHeight;\nstatic sqInt destIndex;\nstatic sqInt destMask;\nstatic sqInt destMSB;\nstatic sqInt destPitch;\nstatic sqInt destPPW;\nstatic sqInt destWidth;\nstatic sqInt destX;\nstatic sqInt destY;\nstatic  unsigned char dither8Lookup[4096];\nstatic const int ditherMatrix4x4[16] = {\n0,\t8,\t2,\t10,\n12,\t4,\t14,\t6,\n3,\t11,\t1,\t9,\n15,\t7,\t13,\t5\n};\nstatic const int ditherThresholds16[8] = { 0, 2, 4, 6, 8, 12, 14, 16 };\nstatic const int ditherValues16[32] = {\n0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,\n15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30\n};\nstatic sqInt dstBitShift;\nstatic sqInt dx;\nstatic sqInt dy;\nstatic sqInt halftoneBase;\nstatic sqInt halftoneForm;\nstatic sqInt halftoneHeight;\nstatic sqInt hasSurfaceLock;\nstatic sqInt hDir;\nstatic sqInt height;\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic sqInt isWarping;\nstatic void * lockSurfaceFn;\nstatic sqInt mask1;\nstatic sqInt mask2;\nstatic int maskTable[33] = {\n0, 1, 3, 0, 15, 31, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 65535,\n0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1\n};\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"BitBltPlugin VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"BitBltPlugin VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\nstatic sqInt noHalftone;\nstatic sqInt noSource;\nstatic sqInt nWords;\nstatic void *opTable[42];\nstatic sqInt preload;\nstatic void * querySurfaceFn;\nstatic sqInt skew;\nstatic sqInt sourceAlpha;\nstatic sqInt sourceBits;\nstatic sqInt sourceBitsOop_xxx_dmu;\nstatic sqInt sourceDelta;\nstatic sqInt sourceDepth;\nstatic sqInt sourceForm;\nstatic sqInt sourceHeight;\nstatic sqInt sourceIndex;\nstatic sqInt sourceMSB;\nstatic sqInt sourcePitch;\nstatic sqInt sourcePPW;\nstatic sqInt sourceWidth;\nstatic sqInt sourceX;\nstatic sqInt sourceY;\nstatic sqInt srcBitShift;\nstatic sqInt sx;\nstatic sqInt sy;\nstatic void * unlockSurfaceFn;\nstatic sqInt vDir;\nstatic sqInt warpAlignMask;\nstatic sqInt warpAlignShift;\nstatic int warpBitShiftTable[32];\nstatic sqInt warpSrcMask;\nstatic sqInt warpSrcShift;\nstatic sqInt width;\n\n\nstatic sqInt\naddWordwith(sqInt sourceWord, sqInt destinationWord)\n{\n\treturn sourceWord + destinationWord;\n}\n\nstatic sqInt\naffectedBottom(void)\n{\n\treturn affectedB;\n}\n\nstatic sqInt\naffectedLeft(void)\n{\n\treturn affectedL;\n}\n\nstatic sqInt\naffectedRight(void)\n{\n\treturn affectedR;\n}\n\nstatic sqInt\naffectedTop(void)\n{\n\treturn affectedT;\n}\n\nstatic sqInt\nalphaBlendConstwith(sqInt sourceWord, sqInt destinationWord)\n{\n\treturn alphaBlendConstwithpaintMode(sourceWord, destinationWord, 0);\n}\n\n\n/*\tBlend sourceWord with destinationWord using a constant alpha.\n\tAlpha is encoded as 0 meaning 0.0, and 255 meaning 1.0.\n\tThe blend produced is alpha*source + (1.0-alpha)*dest, with the\n\tcomputation being performed independently on each color component.\n\tThis function could eventually blend into any depth destination,\n\tusing the same color averaging and mapping as warpBlt.\n\tpaintMode = true means do nothing if the source pixel value is zero. */\n/*\tThis first implementation works with dest depths of 16 and 32 bits only.\n\tNormal color mapping will allow sources of lower depths in this case,\n\tand results can be mapped directly by truncation, so no extra color maps\n\tare needed.\n\tTo allow storing into any depth will require subsequent addition of two\n\tother colormaps, as is the case with WarpBlt.\n */\n\nstatic sqInt\nalphaBlendConstwithpaintMode(sqInt sourceWord, sqInt destinationWord, sqInt paintMode)\n{\n    sqInt bitsPerColor;\n    sqInt blend;\n    sqInt destPixVal;\n    sqInt destShifted;\n    sqInt i;\n    sqInt j;\n    sqInt maskShifted;\n    sqInt pixBlend;\n    sqInt pixMask;\n    sqInt result;\n    sqInt rgbMask;\n    sqInt shift;\n    sqInt sourcePixVal;\n    sqInt sourceShifted;\n    sqInt unAlpha;\n\n\tif (destDepth < 16) {\n\t\treturn destinationWord;\n\t}\n\tunAlpha = 255 - sourceAlpha;\n\tpixMask = maskTable[destDepth];\n\tif (destDepth == 16) {\n\t\tbitsPerColor = 5;\n\t}\n\telse {\n\t\tbitsPerColor = 8;\n\t}\n\trgbMask = (1 << bitsPerColor) - 1;\n\tmaskShifted = destMask;\n\tdestShifted = destinationWord;\n\tsourceShifted = sourceWord;\n\tresult = destinationWord;\n\tif (destPPW == 1) {\n\t\tif (!(paintMode && (sourceWord == 0))) {\n\n\t\t\t/* 32bpp blends include alpha */\n\t\t\t/* painting a transparent pixel */\n\n\t\t\tresult = 0;\n\t\t\tfor (i = 1; i <= 4; i += 1) {\n\t\t\t\tshift = (i - 1) * 8;\n\t\t\t\tblend = ((((((((usqInt) sourceWord) >> shift) & rgbMask) * sourceAlpha) + (((((usqInt) destinationWord) >> shift) & rgbMask) * unAlpha)) + 254) / 255) & rgbMask;\n\t\t\t\tresult = result | (blend << shift);\n\t\t\t}\n\t\t}\n\t}\n\telse {\n\t\tfor (j = 1; j <= destPPW; j += 1) {\n\t\t\tsourcePixVal = sourceShifted & pixMask;\n\t\t\tif (!(((maskShifted & pixMask) == 0)\n\t\t\t\t || (paintMode && (sourcePixVal == 0)))) {\n\t\t\t\tdestPixVal = destShifted & pixMask;\n\t\t\t\tpixBlend = 0;\n\t\t\t\tfor (i = 1; i <= 3; i += 1) {\n\t\t\t\t\tshift = (i - 1) * bitsPerColor;\n\t\t\t\t\tblend = ((((((((usqInt) sourcePixVal) >> shift) & rgbMask) * sourceAlpha) + (((((usqInt) destPixVal) >> shift) & rgbMask) * unAlpha)) + 254) / 255) & rgbMask;\n\t\t\t\t\tpixBlend = pixBlend | (blend << shift);\n\t\t\t\t}\n\t\t\t\tif (destDepth == 16) {\n\t\t\t\t\tresult = (result & (~(pixMask << ((j - 1) * 16)))) | (pixBlend << ((j - 1) * 16));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tresult = pixBlend;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmaskShifted = ((usqInt) maskShifted) >> destDepth;\n\t\t\tsourceShifted = ((usqInt) sourceShifted) >> destDepth;\n\t\t\tdestShifted = ((usqInt) destShifted) >> destDepth;\n\t\t}\n\t}\n\treturn result;\n}\n\n\n/*\tBlend sourceWord with destinationWord using the alpha value from\n\tsourceWord. Alpha is encoded as 0 meaning 0.0, and 255 meaning 1.0.\n\tIn contrast to alphaBlend:with: the color produced is\n\t\n\tsrcColor + (1-srcAlpha) * dstColor\n\t\n\te.g., it is assumed that the source color is already scaled.\n */\n\nstatic sqInt\nalphaBlendScaledwith(sqInt sourceWord, sqInt destinationWord)\n{\n    sqInt a;\n    sqInt b;\n    sqInt dstMask;\n    sqInt g;\n    sqInt r;\n    sqInt srcMask;\n    sqInt unAlpha;\n\n\n\t/* Do NOT inline this into optimized loops */\n\t/* High 8 bits of source pixel */\n\n\tunAlpha = 255 - (((usqInt) sourceWord) >> 24);\n\tdstMask = destinationWord;\n\tsrcMask = sourceWord;\n\tb = (((usqInt) ((dstMask & 255) * unAlpha)) >> 8) + (srcMask & 255);\n\tif (b > 255) {\n\t\tb = 255;\n\t}\n\tdstMask = ((usqInt) dstMask) >> 8;\n\tsrcMask = ((usqInt) srcMask) >> 8;\n\tg = (((usqInt) ((dstMask & 255) * unAlpha)) >> 8) + (srcMask & 255);\n\tif (g > 255) {\n\t\tg = 255;\n\t}\n\tdstMask = ((usqInt) dstMask) >> 8;\n\tsrcMask = ((usqInt) srcMask) >> 8;\n\tr = (((usqInt) ((dstMask & 255) * unAlpha)) >> 8) + (srcMask & 255);\n\tif (r > 255) {\n\t\tr = 255;\n\t}\n\tdstMask = ((usqInt) dstMask) >> 8;\n\tsrcMask = ((usqInt) srcMask) >> 8;\n\ta = (((usqInt) ((dstMask & 255) * unAlpha)) >> 8) + (srcMask & 255);\n\tif (a > 255) {\n\t\ta = 255;\n\t}\n\treturn (((((a << 8) + r) << 8) + g) << 8) + b;\n}\n\n\n/*\tBlend sourceWord with destinationWord, assuming both are 32-bit pixels.\n\tThe source is assumed to have 255*alpha in the high 8 bits of each pixel,\n\twhile the high 8 bits of the destinationWord will be ignored.\n\tThe blend produced is alpha*source + (1-alpha)*dest, with\n\tthe computation being performed independently on each color\n\tcomponent. The high byte of the result will be 0. */\n\nstatic sqInt\nalphaBlendwith(sqInt sourceWord, sqInt destinationWord)\n{\n    sqInt alpha;\n    sqInt blend;\n    sqInt colorMask;\n    sqInt result;\n    sqInt shift;\n    sqInt unAlpha;\n\n\n\t/* High 8 bits of source pixel */\n\n\talpha = ((usqInt) sourceWord) >> 24;\n\tif (alpha == 0) {\n\t\treturn destinationWord;\n\t}\n\tif (alpha == 255) {\n\t\treturn sourceWord;\n\t}\n\tunAlpha = 255 - alpha;\n\tcolorMask = 255;\n\n\t/* red */\n\n\tresult = 0;\n\tshift = 0;\n\tblend = ((((((((usqInt) sourceWord) >> shift) & colorMask) * alpha) + (((((usqInt) destinationWord) >> shift) & colorMask) * unAlpha)) + 254) / 255) & colorMask;\n\n\t/* green */\n\n\tresult = result | (blend << shift);\n\tshift = 8;\n\tblend = ((((((((usqInt) sourceWord) >> shift) & colorMask) * alpha) + (((((usqInt) destinationWord) >> shift) & colorMask) * unAlpha)) + 254) / 255) & colorMask;\n\n\t/* blue */\n\n\tresult = result | (blend << shift);\n\tshift = 16;\n\tblend = ((((((((usqInt) sourceWord) >> shift) & colorMask) * alpha) + (((((usqInt) destinationWord) >> shift) & colorMask) * unAlpha)) + 254) / 255) & colorMask;\n\n\t/* alpha (pre-multiplied) */\n\n\tresult = result | (blend << shift);\n\tshift = 24;\n\tblend = ((((alpha * 255) + (((((usqInt) destinationWord) >> shift) & colorMask) * unAlpha)) + 254) / 255) & colorMask;\n\tresult = result | (blend << shift);\n\treturn result;\n}\n\nstatic sqInt\nalphaPaintConstwith(sqInt sourceWord, sqInt destinationWord)\n{\n\tif (sourceWord == 0) {\n\t\treturn destinationWord;\n\t}\n\treturn alphaBlendConstwithpaintMode(sourceWord, destinationWord, 1);\n}\n\n\n/*\tThis version assumes \n\tcombinationRule = 34\n\tsourcePixSize = 32\n\tdestPixSize = 16\n\tsourceForm ~= destForm.\n\t */\n\nstatic sqInt\nalphaSourceBlendBits16(void)\n{\n    sqInt addThreshold;\n    sqInt addThreshold1;\n    sqInt deltaX;\n    sqInt deltaY;\n    sqInt destWord;\n    sqInt ditherBase;\n    sqInt ditherIndex;\n    sqInt ditherThreshold;\n    sqInt dstIndex;\n    sqInt dstMask;\n    sqInt dstValue;\n    sqInt dstValue1;\n    sqInt dstY;\n    sqInt sourceWord;\n    sqInt srcAlpha;\n    sqInt srcIndex;\n    sqInt srcShift;\n    sqInt srcY;\n\n\n\t/* This particular method should be optimized in itself */\n\t/* So we can pre-decrement */\n\n\tdeltaY = bbH + 1;\n\tsrcY = sy;\n\tdstY = dy;\n\tsrcShift = (dx & 1) * 16;\n\tif (destMSB) {\n\t\tsrcShift = 16 - srcShift;\n\t}\n\n\t/* This is the outer loop */\n\n\tmask1 = 65535 << (16 - srcShift);\n\twhile (((deltaY -= 1)) != 0) {\n\t\tsrcIndex = (sourceBits + (srcY * sourcePitch)) + (sx * 4);\n\t\tdstIndex = (destBits + (dstY * destPitch)) + ((((sqInt) dx >> 1)) * 4);\n\t\tditherBase = (dstY & 3) * 4;\n\n\t\t/* For pre-increment */\n\n\t\tditherIndex = (sx & 3) - 1;\n\n\t\t/* So we can pre-decrement */\n\n\t\tdeltaX = bbW + 1;\n\t\tdstMask = mask1;\n\t\tif (dstMask == 65535) {\n\t\t\tsrcShift = 16;\n\t\t}\n\t\telse {\n\t\t\tsrcShift = 0;\n\t\t}\n\t\twhile (((deltaX -= 1)) != 0) {\n\t\t\tditherThreshold = ditherMatrix4x4[ditherBase + ((ditherIndex = (ditherIndex + 1) & 3))];\n\t\t\tsourceWord = long32AtPointer(srcIndex);\n\t\t\tsrcAlpha = ((usqInt) sourceWord) >> 24;\n\t\t\tif (srcAlpha == 255) {\n\t\t\t\t/* begin dither32To16:threshold: */\n\n\t\t\t\t/* You bet */\n\n\t\t\t\taddThreshold = ((usqInt) ditherThreshold << 8);\n\t\t\t\tsourceWord = ((((usqInt) (dither8Lookup[addThreshold + ((((usqInt) sourceWord >> 16)) & 255)]) << 10)) + (((usqInt) (dither8Lookup[addThreshold + ((((usqInt) sourceWord >> 8)) & 255)]) << 5))) + (dither8Lookup[addThreshold + (sourceWord & 255)]);\n\t\t\t\tif (sourceWord == 0) {\n\t\t\t\t\tsourceWord = 1 << srcShift;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tsourceWord = sourceWord << srcShift;\n\t\t\t\t}\n\t\t\t\t/* begin dstLongAt:put:mask: */\n\t\t\t\tdstValue = long32AtPointer(dstIndex);\n\t\t\t\tdstValue = dstValue & dstMask;\n\t\t\t\tdstValue = dstValue | sourceWord;\n\t\t\t\tlong32AtPointerput(dstIndex, dstValue);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!(srcAlpha == 0)) {\n\n\t\t\t\t\t/* srcAlpha ~= 255 */\n\t\t\t\t\t/* 0 < srcAlpha < 255 */\n\t\t\t\t\t/* If we have to mix colors then just copy a single word */\n\n\t\t\t\t\tdestWord = long32AtPointer(dstIndex);\n\t\t\t\t\tdestWord = destWord & (~dstMask);\n\n\t\t\t\t\t/* Expand from 16 to 32 bit by adding zero bits */\n\n\t\t\t\t\tdestWord = ((usqInt) destWord) >> srcShift;\n\n\t\t\t\t\t/* Mix colors */\n\n\t\t\t\t\tdestWord = ((((usqInt) (destWord & 31744) << 9)) | (((usqInt) (destWord & 992) << 6))) | ((((usqInt) (destWord & 31) << 3)) | 4278190080UL);\n\n\t\t\t\t\t/* And dither */\n\n\t\t\t\t\tsourceWord = alphaBlendScaledwith(sourceWord, destWord);\n\t\t\t\t\t/* begin dither32To16:threshold: */\n\n\t\t\t\t\t/* You bet */\n\n\t\t\t\t\taddThreshold1 = ((usqInt) ditherThreshold << 8);\n\t\t\t\t\tsourceWord = ((((usqInt) (dither8Lookup[addThreshold1 + ((((usqInt) sourceWord >> 16)) & 255)]) << 10)) + (((usqInt) (dither8Lookup[addThreshold1 + ((((usqInt) sourceWord >> 8)) & 255)]) << 5))) + (dither8Lookup[addThreshold1 + (sourceWord & 255)]);\n\t\t\t\t\tif (sourceWord == 0) {\n\t\t\t\t\t\tsourceWord = 1 << srcShift;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tsourceWord = sourceWord << srcShift;\n\t\t\t\t\t}\n\t\t\t\t\t/* begin dstLongAt:put:mask: */\n\t\t\t\t\tdstValue1 = long32AtPointer(dstIndex);\n\t\t\t\t\tdstValue1 = dstValue1 & dstMask;\n\t\t\t\t\tdstValue1 = dstValue1 | sourceWord;\n\t\t\t\t\tlong32AtPointerput(dstIndex, dstValue1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tsrcIndex += 4;\n\t\t\tif (destMSB) {\n\t\t\t\tif (srcShift == 0) {\n\t\t\t\t\tdstIndex += 4;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!(srcShift == 0)) {\n\t\t\t\t\tdstIndex += 4;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* Toggle between 0 and 16 */\n\n\t\t\tsrcShift = srcShift ^ 16;\n\t\t\tdstMask = ~dstMask;\n\t\t}\n\t\tsrcY += 1;\n\t\tdstY += 1;\n\t}\n}\n\n\n/*\tThis version assumes \n\tcombinationRule = 34\n\tsourcePixSize = destPixSize = 32\n\tsourceForm ~= destForm.\n\tNote: The inner loop has been optimized for dealing\n\twith the special cases of srcAlpha = 0.0 and srcAlpha = 1.0 \n\t */\n\nstatic sqInt\nalphaSourceBlendBits32(void)\n{\n    sqInt deltaX;\n    sqInt deltaY;\n    sqInt destWord;\n    sqInt dstIndex;\n    sqInt dstY;\n    sqInt sourceWord;\n    sqInt srcAlpha;\n    sqInt srcIndex;\n    sqInt srcY;\n\n\n\t/* This particular method should be optimized in itself */\n\t/* Give the compile a couple of hints */\n\t/* The following should be declared as pointers so the compiler will\n\tnotice that they're used for accessing memory locations \n\t(good to know on an Intel architecture) but then the increments\n\twould be different between ST code and C code so must hope the\n\tcompiler notices what happens (MS Visual C does) */\n\t/* So we can pre-decrement */\n\n\tdeltaY = bbH + 1;\n\tsrcY = sy;\n\n\t/* This is the outer loop */\n\n\tdstY = dy;\n\twhile (((deltaY -= 1)) != 0) {\n\t\tsrcIndex = (sourceBits + (srcY * sourcePitch)) + (sx * 4);\n\t\tdstIndex = (destBits + (dstY * destPitch)) + (dx * 4);\n\n\t\t/* So we can pre-decrement */\n\t\t/* This is the inner loop */\n\n\t\tdeltaX = bbW + 1;\n\t\twhile (((deltaX -= 1)) != 0) {\n\t\t\tsourceWord = long32AtPointer(srcIndex);\n\t\t\tsrcAlpha = ((usqInt) sourceWord) >> 24;\n\t\t\tif (srcAlpha == 255) {\n\t\t\t\tlong32AtPointerput(dstIndex, sourceWord);\n\t\t\t\tsrcIndex += 4;\n\n\t\t\t\t/* Now copy as many words as possible with alpha = 255 */\n\n\t\t\t\tdstIndex += 4;\n\t\t\t\twhile ((((deltaX -= 1)) != 0)\n && ((((usqInt) ((sourceWord = long32AtPointer(srcIndex)))) >> 24) == 255)) {\n\t\t\t\t\tlong32AtPointerput(dstIndex, sourceWord);\n\t\t\t\t\tsrcIndex += 4;\n\t\t\t\t\tdstIndex += 4;\n\t\t\t\t}\n\t\t\t\tdeltaX += 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (srcAlpha == 0) {\n\n\t\t\t\t\t/* srcAlpha ~= 255 */\n\n\t\t\t\t\tsrcIndex += 4;\n\n\t\t\t\t\t/* Now skip as many words as possible, */\n\n\t\t\t\t\tdstIndex += 4;\n\t\t\t\t\twhile ((((deltaX -= 1)) != 0)\n && ((((usqInt) ((sourceWord = long32AtPointer(srcIndex)))) >> 24) == 0)) {\n\t\t\t\t\t\tsrcIndex += 4;\n\t\t\t\t\t\tdstIndex += 4;\n\t\t\t\t\t}\n\t\t\t\t\tdeltaX += 1;\n\t\t\t\t}\n\t\t\t\telse {\n\n\t\t\t\t\t/* 0 < srcAlpha < 255 */\n\t\t\t\t\t/* If we have to mix colors then just copy a single word */\n\n\t\t\t\t\tdestWord = long32AtPointer(dstIndex);\n\t\t\t\t\tdestWord = alphaBlendScaledwith(sourceWord, destWord);\n\t\t\t\t\tlong32AtPointerput(dstIndex, destWord);\n\t\t\t\t\tsrcIndex += 4;\n\t\t\t\t\tdstIndex += 4;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsrcY += 1;\n\t\tdstY += 1;\n\t}\n}\n\n\n/*\tThis version assumes \n\tcombinationRule = 34\n\tsourcePixSize = 32\n\tdestPixSize = 8\n\tsourceForm ~= destForm.\n\tNote: This is not real blending since we don't have the source colors\n\tavailable.  */\n\nstatic sqInt\nalphaSourceBlendBits8(void)\n{\n    sqInt adjust;\n    sqInt deltaX;\n    sqInt deltaY;\n    sqInt destWord;\n    sqInt dstIndex;\n    sqInt dstMask;\n    sqInt dstValue;\n    sqInt dstY;\n    sqInt mapperFlags;\n    unsigned int *mappingTable;\n    sqInt pv;\n    sqInt sourceWord;\n    sqInt srcAlpha;\n    sqInt srcIndex;\n    sqInt srcShift;\n    sqInt srcY;\n    sqInt val;\n\n\tmappingTable = default8To32Table();\n\tmapperFlags = cmFlags & (~ColorMapNewStyle);\n\n\t/* So we can pre-decrement */\n\n\tdeltaY = bbH + 1;\n\tsrcY = sy;\n\tdstY = dy;\n\tmask1 = (dx & 3) * 8;\n\tif (destMSB) {\n\t\tmask1 = 24 - mask1;\n\t}\n\tmask2 = AllOnes ^ (255 << mask1);\n\tif ((dx & 1) == 0) {\n\t\tadjust = 0;\n\t}\n\telse {\n\t\tadjust = 522133279;\n\t}\n\tif ((dy & 1) == 0) {\n\t\tadjust = adjust ^ 522133279;\n\t}\n\twhile (((deltaY -= 1)) != 0) {\n\t\tadjust = adjust ^ 522133279;\n\t\tsrcIndex = (sourceBits + (srcY * sourcePitch)) + (sx * 4);\n\t\tdstIndex = (destBits + (dstY * destPitch)) + ((((sqInt) dx >> 2)) * 4);\n\n\t\t/* So we can pre-decrement */\n\n\t\tdeltaX = bbW + 1;\n\t\tsrcShift = mask1;\n\n\t\t/* This is the inner loop */\n\n\t\tdstMask = mask2;\n\t\twhile (((deltaX -= 1)) != 0) {\n\t\t\tsourceWord = ((long32AtPointer(srcIndex)) & (~adjust)) + adjust;\n\t\t\tsrcAlpha = ((usqInt) sourceWord) >> 24;\n\t\t\tif (srcAlpha > 31) {\n\t\t\t\tif (srcAlpha < 224) {\n\n\t\t\t\t\t/* Everything below 31 is transparent */\n\t\t\t\t\t/* Everything above 224 is opaque */\n\n\t\t\t\t\tdestWord = long32AtPointer(dstIndex);\n\t\t\t\t\tdestWord = destWord & (~dstMask);\n\t\t\t\t\tdestWord = ((usqInt) destWord) >> srcShift;\n\t\t\t\t\tdestWord = mappingTable[destWord];\n\t\t\t\t\tsourceWord = alphaBlendScaledwith(sourceWord, destWord);\n\t\t\t\t}\n\t\t\t\t/* begin mapPixel:flags: */\n\t\t\t\tpv = sourceWord;\n\t\t\t\tif ((mapperFlags & ColorMapPresent) != 0) {\n\t\t\t\t\tif ((mapperFlags & ColorMapFixedPart) != 0) {\n\t\t\t\t\t\t/* begin rgbMapPixel:flags: */\n\t\t\t\t\t\tval = (((cmShiftTable[0]) < 0) ? ((usqInt) (sourceWord & (cmMaskTable[0])) >> -(cmShiftTable[0])) : ((usqInt) (sourceWord & (cmMaskTable[0])) << (cmShiftTable[0])));\n\t\t\t\t\t\tval = val | ((((cmShiftTable[1]) < 0) ? ((usqInt) (sourceWord & (cmMaskTable[1])) >> -(cmShiftTable[1])) : ((usqInt) (sourceWord & (cmMaskTable[1])) << (cmShiftTable[1]))));\n\t\t\t\t\t\tval = val | ((((cmShiftTable[2]) < 0) ? ((usqInt) (sourceWord & (cmMaskTable[2])) >> -(cmShiftTable[2])) : ((usqInt) (sourceWord & (cmMaskTable[2])) << (cmShiftTable[2]))));\n\t\t\t\t\t\tpv = val | ((((cmShiftTable[3]) < 0) ? ((usqInt) (sourceWord & (cmMaskTable[3])) >> -(cmShiftTable[3])) : ((usqInt) (sourceWord & (cmMaskTable[3])) << (cmShiftTable[3]))));\n\t\t\t\t\t\tif ((pv == 0)\n\t\t\t\t\t\t && (sourceWord != 0)) {\n\t\t\t\t\t\t\tpv = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ((mapperFlags & ColorMapIndexedPart) != 0) {\n\t\t\t\t\t\tpv = cmLookupTable[pv & cmMask];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsourceWord = pv;\n\n\t\t\t\t/* Store back */\n\n\t\t\t\tsourceWord = sourceWord << srcShift;\n\t\t\t\t/* begin dstLongAt:put:mask: */\n\t\t\t\tdstValue = long32AtPointer(dstIndex);\n\t\t\t\tdstValue = dstValue & dstMask;\n\t\t\t\tdstValue = dstValue | sourceWord;\n\t\t\t\tlong32AtPointerput(dstIndex, dstValue);\n\t\t\t}\n\t\t\tsrcIndex += 4;\n\t\t\tif (destMSB) {\n\t\t\t\tif (srcShift == 0) {\n\t\t\t\t\tdstIndex += 4;\n\t\t\t\t\tsrcShift = 24;\n\t\t\t\t\tdstMask = 16777215;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tsrcShift -= 8;\n\t\t\t\t\tdstMask = (((usqInt) dstMask) >> 8) | 4278190080UL;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (srcShift == 32) {\n\t\t\t\t\tdstIndex += 4;\n\t\t\t\t\tsrcShift = 0;\n\t\t\t\t\tdstMask = 4294967040UL;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tsrcShift += 8;\n\t\t\t\t\tdstMask = (dstMask << 8) | 255;\n\t\t\t\t}\n\t\t\t}\n\t\t\tadjust = adjust ^ 522133279;\n\t\t}\n\t\tsrcY += 1;\n\t\tdstY += 1;\n\t}\n}\n\nstatic sqInt\nbitAndInvertwith(sqInt sourceWord, sqInt destinationWord)\n{\n\treturn sourceWord & (~destinationWord);\n}\n\nstatic sqInt\nbitAndwith(sqInt sourceWord, sqInt destinationWord)\n{\n\treturn sourceWord & destinationWord;\n}\n\nstatic sqInt\nbitInvertAndInvertwith(sqInt sourceWord, sqInt destinationWord)\n{\n\treturn (~sourceWord) & (~destinationWord);\n}\n\nstatic sqInt\nbitInvertAndwith(sqInt sourceWord, sqInt destinationWord)\n{\n\treturn (~sourceWord) & destinationWord;\n}\n\nstatic sqInt\nbitInvertDestinationwith(sqInt sourceWord, sqInt destinationWord)\n{\n\treturn ~destinationWord;\n}\n\nstatic sqInt\nbitInvertOrInvertwith(sqInt sourceWord, sqInt destinationWord)\n{\n\treturn (~sourceWord) | (~destinationWord);\n}\n\nstatic sqInt\nbitInvertOrwith(sqInt sourceWord, sqInt destinationWord)\n{\n\treturn (~sourceWord) | destinationWord;\n}\n\nstatic sqInt\nbitInvertSourcewith(sqInt sourceWord, sqInt destinationWord)\n{\n\treturn ~sourceWord;\n}\n\nstatic sqInt\nbitInvertXorwith(sqInt sourceWord, sqInt destinationWord)\n{\n\treturn (~sourceWord) ^ destinationWord;\n}\n\nstatic sqInt\nbitOrInvertwith(sqInt sourceWord, sqInt destinationWord)\n{\n\treturn sourceWord | (~destinationWord);\n}\n\nstatic sqInt\nbitOrwith(sqInt sourceWord, sqInt destinationWord)\n{\n\treturn sourceWord | destinationWord;\n}\n\nstatic sqInt\nbitXorwith(sqInt sourceWord, sqInt destinationWord)\n{\n\treturn sourceWord ^ destinationWord;\n}\n\n\n/*\tcheck for possible overlap of source and destination */\n/*\tar 10/19/1999: This method requires surfaces to be locked. */\n\nstatic sqInt\ncheckSourceOverlap(void)\n{\n    sqInt t;\n\n\tif ((sourceForm == destForm)\n\t && (dy >= sy)) {\n\t\tif (dy > sy) {\n\n\t\t\t/* have to start at bottom */\n\n\t\t\tvDir = -1;\n\t\t\tsy = (sy + bbH) - 1;\n\t\t\tdy = (dy + bbH) - 1;\n\t\t}\n\t\telse {\n\t\t\tif ((dy == sy) && (dx > sx)) {\n\n\t\t\t\t/* y's are equal, but x's are backward */\n\n\t\t\t\thDir = -1;\n\n\t\t\t\t/* start at right */\n\n\t\t\t\tsx = (sx + bbW) - 1;\n\n\t\t\t\t/* and fix up masks */\n\n\t\t\t\tdx = (dx + bbW) - 1;\n\t\t\t\tif (nWords > 1) {\n\t\t\t\t\tt = mask1;\n\t\t\t\t\tmask1 = mask2;\n\t\t\t\t\tmask2 = t;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdestIndex = (destBits + (dy * destPitch)) + ((dx / destPPW) * 4);\n\t\tdestDelta = (destPitch * vDir) - (4 * (nWords * hDir));\n\t}\n}\n\nstatic sqInt\nclearWordwith(sqInt source, sqInt destination)\n{\n\treturn 0;\n}\n\n\n/*\tclip and adjust source origin and extent appropriately */\n/*\tfirst in x */\n\nstatic sqInt\nclipRange(void)\n{\n\tif (destX >= clipX) {\n\t\tsx = sourceX;\n\t\tdx = destX;\n\t\tbbW = width;\n\t}\n\telse {\n\t\tsx = sourceX + (clipX - destX);\n\t\tbbW = width - (clipX - destX);\n\t\tdx = clipX;\n\t}\n\tif ((dx + bbW) > (clipX + clipWidth)) {\n\t\tbbW -= (dx + bbW) - (clipX + clipWidth);\n\t}\n\tif (destY >= clipY) {\n\t\tsy = sourceY;\n\t\tdy = destY;\n\t\tbbH = height;\n\t}\n\telse {\n\t\tsy = (sourceY + clipY) - destY;\n\t\tbbH = height - (clipY - destY);\n\t\tdy = clipY;\n\t}\n\tif ((dy + bbH) > (clipY + clipHeight)) {\n\t\tbbH -= (dy + bbH) - (clipY + clipHeight);\n\t}\n\tif (noSource) {\n\t\treturn null;\n\t}\n\tif (sx < 0) {\n\t\tdx -= sx;\n\t\tbbW += sx;\n\t\tsx = 0;\n\t}\n\tif ((sx + bbW) > sourceWidth) {\n\t\tbbW -= (sx + bbW) - sourceWidth;\n\t}\n\tif (sy < 0) {\n\t\tdy -= sy;\n\t\tbbH += sy;\n\t\tsy = 0;\n\t}\n\tif ((sy + bbH) > sourceHeight) {\n\t\tbbH -= (sy + bbH) - sourceHeight;\n\t}\n}\n\n\n/*\tThis function is exported for the Balloon engine */\n\nEXPORT(sqInt)\ncopyBits(void)\n{\n    sqInt done;\n    sqInt dWid;\n    sqInt dxLowBits;\n    sqInt endBits;\n    sqInt pixPerM1;\n    sqInt pixPerM11;\n    sqInt startBits;\n    sqInt sxLowBits;\n    sqInt t;\n\n\tclipRange();\n\tif ((bbW <= 0)\n\t || (bbH <= 0)) {\n\n\t\t/* zero width or height; noop */\n\n\t\taffectedL = affectedR = affectedT = affectedB = 0;\n\t\treturn null;\n\t}\n\tif (!(lockSurfaces())) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\t/* begin copyBitsLockedAndClipped */\n\t/* begin tryCopyingBitsQuickly */\n\tif (noSource) {\n\t\tdone = 0;\n\t\tgoto l2;\n\t}\n\tif (!(combinationRule == 34)) {\n\t\tdone = 0;\n\t\tgoto l2;\n\t}\n\tif (!(sourceDepth == 32)) {\n\t\tdone = 0;\n\t\tgoto l2;\n\t}\n\tif (sourceForm == destForm) {\n\t\tdone = 0;\n\t\tgoto l2;\n\t}\n\tif (destDepth < 8) {\n\t\tdone = 0;\n\t\tgoto l2;\n\t}\n\tif ((destDepth == 8)\n\t && ((cmFlags & ColorMapPresent) == 0)) {\n\t\tdone = 0;\n\t\tgoto l2;\n\t}\n\tif (destDepth == 32) {\n\t\talphaSourceBlendBits32();\n\t}\n\tif (destDepth == 16) {\n\t\talphaSourceBlendBits16();\n\t}\n\tif (destDepth == 8) {\n\t\talphaSourceBlendBits8();\n\t}\n\taffectedL = dx;\n\taffectedR = dx + bbW;\n\taffectedT = dy;\n\taffectedB = dy + bbH;\n\tdone = 1;\nl2:\t/* end tryCopyingBitsQuickly */;\n\tif (done) {\n\t\tgoto l1;\n\t}\n\tif ((combinationRule == 30) || (combinationRule == 31)) {\n\t\tif ((interpreterProxy->methodArgumentCount()) == 1) {\n\n\t\t\t/* Check and fetch source alpha parameter for alpha blend */\n\n\t\t\tsourceAlpha = interpreterProxy->stackIntegerValue(0);\n\t\t\tif (!((!(interpreterProxy->failed()))\n\t\t\t\t && ((sourceAlpha >= 0) && (sourceAlpha <= 255)))) {\n\t\t\t\tinterpreterProxy->primitiveFail();\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tinterpreterProxy->primitiveFail();\n\t\t\tgoto l1;\n\t\t}\n\t}\n\n\t/* Choose and perform the actual copy loop. */\n\n\tbitCount = 0;\n\t/* begin performCopyLoop */\n\t/* begin destMaskAndPointerInit */\n\n\t/* A mask, assuming power of two */\n\t/* how many pixels in first word */\n\n\tpixPerM1 = destPPW - 1;\n\tstartBits = destPPW - (dx & pixPerM1);\n\tif (destMSB) {\n\t\tmask1 = ((usqInt) AllOnes) >> (32 - (startBits * destDepth));\n\t}\n\telse {\n\t\tmask1 = AllOnes << (32 - (startBits * destDepth));\n\t}\n\tendBits = (((dx + bbW) - 1) & pixPerM1) + 1;\n\tif (destMSB) {\n\t\tmask2 = AllOnes << (32 - (endBits * destDepth));\n\t}\n\telse {\n\t\tmask2 = ((usqInt) AllOnes) >> (32 - (endBits * destDepth));\n\t}\n\tif (bbW < startBits) {\n\t\tmask1 = mask1 & mask2;\n\t\tmask2 = 0;\n\t\tnWords = 1;\n\t}\n\telse {\n\t\tnWords = (((bbW - startBits) + pixPerM1) / destPPW) + 1;\n\t}\n\n\t/* defaults for no overlap with source */\n\t/* calculate byte addr and delta, based on first word of data */\n\t/* Note pitch is bytes and nWords is longs, not bytes */\n\n\thDir = vDir = 1;\n\tdestIndex = (destBits + (dy * destPitch)) + ((dx / destPPW) * 4);\n\tdestDelta = (destPitch * vDir) - (4 * (nWords * hDir));\n\tif (noSource) {\n\t\tcopyLoopNoSource();\n\t}\n\telse {\n\t\t/* begin checkSourceOverlap */\n\t\tif ((sourceForm == destForm)\n\t\t && (dy >= sy)) {\n\t\t\tif (dy > sy) {\n\n\t\t\t\t/* have to start at bottom */\n\n\t\t\t\tvDir = -1;\n\t\t\t\tsy = (sy + bbH) - 1;\n\t\t\t\tdy = (dy + bbH) - 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif ((dy == sy) && (dx > sx)) {\n\n\t\t\t\t\t/* y's are equal, but x's are backward */\n\n\t\t\t\t\thDir = -1;\n\n\t\t\t\t\t/* start at right */\n\n\t\t\t\t\tsx = (sx + bbW) - 1;\n\n\t\t\t\t\t/* and fix up masks */\n\n\t\t\t\t\tdx = (dx + bbW) - 1;\n\t\t\t\t\tif (nWords > 1) {\n\t\t\t\t\t\tt = mask1;\n\t\t\t\t\t\tmask1 = mask2;\n\t\t\t\t\t\tmask2 = t;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tdestIndex = (destBits + (dy * destPitch)) + ((dx / destPPW) * 4);\n\t\t\tdestDelta = (destPitch * vDir) - (4 * (nWords * hDir));\n\t\t}\n\t\tif ((sourceDepth != destDepth)\n\t\t || ((cmFlags != 0)\n || (sourceMSB != destMSB))) {\n\t\t\tcopyLoopPixMap();\n\t\t}\n\t\telse {\n\t\t\t/* begin sourceSkewAndPointerInit */\n\n\t\t\t/* A mask, assuming power of two */\n\n\t\t\tpixPerM11 = destPPW - 1;\n\t\t\tsxLowBits = sx & pixPerM11;\n\n\t\t\t/* check if need to preload buffer\n\t(i.e., two words of source needed for first word of destination) */\n\n\t\t\tdxLowBits = dx & pixPerM11;\n\t\t\tif (hDir > 0) {\n\n\t\t\t\t/* n Bits stored in 1st word of dest */\n\n\t\t\t\tdWid = ((bbW < (destPPW - dxLowBits)) ? bbW : (destPPW - dxLowBits));\n\t\t\t\tpreload = (sxLowBits + dWid) > pixPerM11;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdWid = ((bbW < (dxLowBits + 1)) ? bbW : (dxLowBits + 1));\n\t\t\t\tpreload = ((sxLowBits - dWid) + 1) < 0;\n\t\t\t}\n\t\t\tif (sourceMSB) {\n\t\t\t\tskew = (sxLowBits - dxLowBits) * destDepth;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tskew = (dxLowBits - sxLowBits) * destDepth;\n\t\t\t}\n\t\t\tif (preload) {\n\t\t\t\tif (skew < 0) {\n\t\t\t\t\tskew += 32;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tskew -= 32;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* calculate increments from end of 1 line to start of next */\n\n\t\t\tsourceIndex = (sourceBits + (sy * sourcePitch)) + ((sx / (32 / sourceDepth)) * 4);\n\t\t\tsourceDelta = (sourcePitch * vDir) - (4 * (nWords * hDir));\n\t\t\tif (preload) {\n\n\t\t\t\t/* Compensate for extra source word fetched */\n\n\t\t\t\tsourceDelta -= 4 * hDir;\n\t\t\t}\n\t\t\tcopyLoop();\n\t\t}\n\t}\n\tif ((combinationRule == 22) || (combinationRule == 32)) {\n\n\t\t/* zero width and height; return the count */\n\n\t\taffectedL = affectedR = affectedT = affectedB = 0;\n\t}\n\tif (hDir > 0) {\n\t\taffectedL = dx;\n\t\taffectedR = dx + bbW;\n\t}\n\telse {\n\t\taffectedL = (dx - bbW) + 1;\n\t\taffectedR = dx + 1;\n\t}\n\tif (vDir > 0) {\n\t\taffectedT = dy;\n\t\taffectedB = dy + bbH;\n\t}\n\telse {\n\t\taffectedT = (dy - bbH) + 1;\n\t\taffectedB = dy + 1;\n\t}\nl1:\t/* end copyBitsLockedAndClipped */;\n\tunlockSurfaces();\n}\n\n\n/*\tSupport for the balloon engine. */\n\nEXPORT(sqInt)\ncopyBitsFromtoat(sqInt startX, sqInt stopX, sqInt yValue)\n{\n\tdestX = startX;\n\tdestY = yValue;\n\tsourceX = startX;\n\twidth = stopX - startX;\n\tcopyBits();\n\t/* begin showDisplayBits */\n\tinterpreterProxy->showDisplayBitsLeftTopRightBottom(destForm, affectedL, affectedT, affectedR, affectedB);\n}\n\n\n/*\tPerform the actual copyBits operation.\n\tAssume: Surfaces have been locked and clipping was performed. */\n\nstatic sqInt\ncopyBitsLockedAndClipped(void)\n{\n    sqInt done;\n    sqInt dWid;\n    sqInt dxLowBits;\n    sqInt endBits;\n    sqInt pixPerM1;\n    sqInt pixPerM11;\n    sqInt startBits;\n    sqInt sxLowBits;\n    sqInt t;\n\n\t/* begin tryCopyingBitsQuickly */\n\tif (noSource) {\n\t\tdone = 0;\n\t\tgoto l1;\n\t}\n\tif (!(combinationRule == 34)) {\n\t\tdone = 0;\n\t\tgoto l1;\n\t}\n\tif (!(sourceDepth == 32)) {\n\t\tdone = 0;\n\t\tgoto l1;\n\t}\n\tif (sourceForm == destForm) {\n\t\tdone = 0;\n\t\tgoto l1;\n\t}\n\tif (destDepth < 8) {\n\t\tdone = 0;\n\t\tgoto l1;\n\t}\n\tif ((destDepth == 8)\n\t && ((cmFlags & ColorMapPresent) == 0)) {\n\t\tdone = 0;\n\t\tgoto l1;\n\t}\n\tif (destDepth == 32) {\n\t\talphaSourceBlendBits32();\n\t}\n\tif (destDepth == 16) {\n\t\talphaSourceBlendBits16();\n\t}\n\tif (destDepth == 8) {\n\t\talphaSourceBlendBits8();\n\t}\n\taffectedL = dx;\n\taffectedR = dx + bbW;\n\taffectedT = dy;\n\taffectedB = dy + bbH;\n\tdone = 1;\nl1:\t/* end tryCopyingBitsQuickly */;\n\tif (done) {\n\t\treturn null;\n\t}\n\tif ((combinationRule == 30) || (combinationRule == 31)) {\n\t\tif ((interpreterProxy->methodArgumentCount()) == 1) {\n\n\t\t\t/* Check and fetch source alpha parameter for alpha blend */\n\n\t\t\tsourceAlpha = interpreterProxy->stackIntegerValue(0);\n\t\t\tif (!((!(interpreterProxy->failed()))\n\t\t\t\t && ((sourceAlpha >= 0) && (sourceAlpha <= 255)))) {\n\t\t\t\treturn interpreterProxy->primitiveFail();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\n\t/* Choose and perform the actual copy loop. */\n\n\tbitCount = 0;\n\t/* begin performCopyLoop */\n\t/* begin destMaskAndPointerInit */\n\n\t/* A mask, assuming power of two */\n\t/* how many pixels in first word */\n\n\tpixPerM1 = destPPW - 1;\n\tstartBits = destPPW - (dx & pixPerM1);\n\tif (destMSB) {\n\t\tmask1 = ((usqInt) AllOnes) >> (32 - (startBits * destDepth));\n\t}\n\telse {\n\t\tmask1 = AllOnes << (32 - (startBits * destDepth));\n\t}\n\tendBits = (((dx + bbW) - 1) & pixPerM1) + 1;\n\tif (destMSB) {\n\t\tmask2 = AllOnes << (32 - (endBits * destDepth));\n\t}\n\telse {\n\t\tmask2 = ((usqInt) AllOnes) >> (32 - (endBits * destDepth));\n\t}\n\tif (bbW < startBits) {\n\t\tmask1 = mask1 & mask2;\n\t\tmask2 = 0;\n\t\tnWords = 1;\n\t}\n\telse {\n\t\tnWords = (((bbW - startBits) + pixPerM1) / destPPW) + 1;\n\t}\n\n\t/* defaults for no overlap with source */\n\t/* calculate byte addr and delta, based on first word of data */\n\t/* Note pitch is bytes and nWords is longs, not bytes */\n\n\thDir = vDir = 1;\n\tdestIndex = (destBits + (dy * destPitch)) + ((dx / destPPW) * 4);\n\tdestDelta = (destPitch * vDir) - (4 * (nWords * hDir));\n\tif (noSource) {\n\t\tcopyLoopNoSource();\n\t}\n\telse {\n\t\t/* begin checkSourceOverlap */\n\t\tif ((sourceForm == destForm)\n\t\t && (dy >= sy)) {\n\t\t\tif (dy > sy) {\n\n\t\t\t\t/* have to start at bottom */\n\n\t\t\t\tvDir = -1;\n\t\t\t\tsy = (sy + bbH) - 1;\n\t\t\t\tdy = (dy + bbH) - 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif ((dy == sy) && (dx > sx)) {\n\n\t\t\t\t\t/* y's are equal, but x's are backward */\n\n\t\t\t\t\thDir = -1;\n\n\t\t\t\t\t/* start at right */\n\n\t\t\t\t\tsx = (sx + bbW) - 1;\n\n\t\t\t\t\t/* and fix up masks */\n\n\t\t\t\t\tdx = (dx + bbW) - 1;\n\t\t\t\t\tif (nWords > 1) {\n\t\t\t\t\t\tt = mask1;\n\t\t\t\t\t\tmask1 = mask2;\n\t\t\t\t\t\tmask2 = t;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tdestIndex = (destBits + (dy * destPitch)) + ((dx / destPPW) * 4);\n\t\t\tdestDelta = (destPitch * vDir) - (4 * (nWords * hDir));\n\t\t}\n\t\tif ((sourceDepth != destDepth)\n\t\t || ((cmFlags != 0)\n || (sourceMSB != destMSB))) {\n\t\t\tcopyLoopPixMap();\n\t\t}\n\t\telse {\n\t\t\t/* begin sourceSkewAndPointerInit */\n\n\t\t\t/* A mask, assuming power of two */\n\n\t\t\tpixPerM11 = destPPW - 1;\n\t\t\tsxLowBits = sx & pixPerM11;\n\n\t\t\t/* check if need to preload buffer\n\t(i.e., two words of source needed for first word of destination) */\n\n\t\t\tdxLowBits = dx & pixPerM11;\n\t\t\tif (hDir > 0) {\n\n\t\t\t\t/* n Bits stored in 1st word of dest */\n\n\t\t\t\tdWid = ((bbW < (destPPW - dxLowBits)) ? bbW : (destPPW - dxLowBits));\n\t\t\t\tpreload = (sxLowBits + dWid) > pixPerM11;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdWid = ((bbW < (dxLowBits + 1)) ? bbW : (dxLowBits + 1));\n\t\t\t\tpreload = ((sxLowBits - dWid) + 1) < 0;\n\t\t\t}\n\t\t\tif (sourceMSB) {\n\t\t\t\tskew = (sxLowBits - dxLowBits) * destDepth;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tskew = (dxLowBits - sxLowBits) * destDepth;\n\t\t\t}\n\t\t\tif (preload) {\n\t\t\t\tif (skew < 0) {\n\t\t\t\t\tskew += 32;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tskew -= 32;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* calculate increments from end of 1 line to start of next */\n\n\t\t\tsourceIndex = (sourceBits + (sy * sourcePitch)) + ((sx / (32 / sourceDepth)) * 4);\n\t\t\tsourceDelta = (sourcePitch * vDir) - (4 * (nWords * hDir));\n\t\t\tif (preload) {\n\n\t\t\t\t/* Compensate for extra source word fetched */\n\n\t\t\t\tsourceDelta -= 4 * hDir;\n\t\t\t}\n\t\t\tcopyLoop();\n\t\t}\n\t}\n\tif ((combinationRule == 22) || (combinationRule == 32)) {\n\n\t\t/* zero width and height; return the count */\n\n\t\taffectedL = affectedR = affectedT = affectedB = 0;\n\t}\n\tif (hDir > 0) {\n\t\taffectedL = dx;\n\t\taffectedR = dx + bbW;\n\t}\n\telse {\n\t\taffectedL = (dx - bbW) + 1;\n\t\taffectedR = dx + 1;\n\t}\n\tif (vDir > 0) {\n\t\taffectedT = dy;\n\t\taffectedB = dy + bbH;\n\t}\n\telse {\n\t\taffectedT = (dy - bbH) + 1;\n\t\taffectedB = dy + 1;\n\t}\n}\n\n\n/*\tThis version of the inner loop assumes noSource = false. */\n\nstatic sqInt\ncopyLoop(void)\n{\n    sqInt destWord;\n    sqInt halftoneWord;\n    sqInt hInc;\n    sqInt i;\n    sqInt (*mergeFnwith)(sqInt, sqInt);\n    sqInt mergeWord;\n    sqInt notSkewMask;\n    sqInt prevWord;\n    sqInt skewMask;\n    sqInt skewWord;\n    sqInt thisWord;\n    sqInt unskew;\n    sqInt word;\n    sqInt y;\n\n\tmergeFnwith = ((sqInt (*)(sqInt, sqInt)) (opTable[combinationRule + 1]));\n\tmergeFnwith;\n\n\t/* Byte delta */\n\t/* degenerate skew fixed for Sparc. 10/20/96 ikp */\n\n\thInc = hDir * 4;\n\tif (skew == -32) {\n\t\tskew = unskew = skewMask = 0;\n\t}\n\telse {\n\t\tif (skew < 0) {\n\t\t\tunskew = skew + 32;\n\t\t\tskewMask = AllOnes << (0 - skew);\n\t\t}\n\t\telse {\n\t\t\tif (skew == 0) {\n\t\t\t\tunskew = 0;\n\t\t\t\tskewMask = AllOnes;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tunskew = skew - 32;\n\t\t\t\tskewMask = ((usqInt) AllOnes) >> skew;\n\t\t\t}\n\t\t}\n\t}\n\tnotSkewMask = ~skewMask;\n\tif (noHalftone) {\n\t\thalftoneWord = AllOnes;\n\t\thalftoneHeight = 0;\n\t}\n\telse {\n\t\thalftoneWord = long32AtPointer(halftoneBase + ((0 % halftoneHeight) * 4));\n\t}\n\ty = dy;\n\tfor (i = 1; i <= bbH; i += 1) {\n\t\tif (halftoneHeight > 1) {\n\n\t\t\t/* here is the vertical loop */\n\t\t\t/* Otherwise, its always the same */\n\n\t\t\thalftoneWord = long32AtPointer(halftoneBase + ((y % halftoneHeight) * 4));\n\t\t\ty += vDir;\n\t\t}\n\t\tif (preload) {\n\n\t\t\t/* load the 64-bit shifter */\n\n\t\t\tprevWord = long32AtPointer(sourceIndex);\n\t\t\tsourceIndex += hInc;\n\t\t}\n\t\telse {\n\t\t\tprevWord = 0;\n\t\t}\n\t\tdestMask = mask1;\n\n\t\t/* pick up next word */\n\n\t\tthisWord = long32AtPointer(sourceIndex);\n\t\tsourceIndex += hInc;\n\n\t\t/* 32-bit rotate */\n\n\t\tskewWord = (((unskew < 0) ? ((usqInt) (prevWord & notSkewMask) >> -unskew) : ((usqInt) (prevWord & notSkewMask) << unskew))) | (((skew < 0) ? ((usqInt) (thisWord & skewMask) >> -skew) : ((usqInt) (thisWord & skewMask) << skew)));\n\t\tprevWord = thisWord;\n\t\tdestWord = long32AtPointer(destIndex);\n\t\tmergeWord = mergeFnwith(skewWord & halftoneWord, destWord);\n\t\tdestWord = (destMask & mergeWord) | (destWord & (~destMask));\n\t\tlong32AtPointerput(destIndex, destWord);\n\n\t\t/* This central horizontal loop requires no store masking */\n\n\t\tdestIndex += hInc;\n\t\tdestMask = AllOnes;\n\t\tif (combinationRule == 3) {\n\t\t\tif ((skew == 0) && (halftoneWord == AllOnes)) {\n\t\t\t\tif (hDir == -1) {\n\t\t\t\t\tfor (word = 2; word <= (nWords - 1); word += 1) {\n\n\t\t\t\t\t\t/* Very special inner loop for STORE mode with no skew -- just move words */\n\t\t\t\t\t\t/* Woeful patch: revert to older code for hDir = -1 */\n\n\t\t\t\t\t\tthisWord = long32AtPointer(sourceIndex);\n\t\t\t\t\t\tsourceIndex += hInc;\n\t\t\t\t\t\tlong32AtPointerput(destIndex, thisWord);\n\t\t\t\t\t\tdestIndex += hInc;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfor (word = 2; word <= (nWords - 1); word += 1) {\n\t\t\t\t\t\tlong32AtPointerput(destIndex, prevWord);\n\t\t\t\t\t\tdestIndex += hInc;\n\t\t\t\t\t\tprevWord = long32AtPointer(sourceIndex);\n\t\t\t\t\t\tsourceIndex += hInc;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfor (word = 2; word <= (nWords - 1); word += 1) {\n\n\t\t\t\t\t/* Special inner loop for STORE mode -- no need to call merge */\n\n\t\t\t\t\tthisWord = long32AtPointer(sourceIndex);\n\t\t\t\t\tsourceIndex += hInc;\n\n\t\t\t\t\t/* 32-bit rotate */\n\n\t\t\t\t\tskewWord = (((unskew < 0) ? ((usqInt) (prevWord & notSkewMask) >> -unskew) : ((usqInt) (prevWord & notSkewMask) << unskew))) | (((skew < 0) ? ((usqInt) (thisWord & skewMask) >> -skew) : ((usqInt) (thisWord & skewMask) << skew)));\n\t\t\t\t\tprevWord = thisWord;\n\t\t\t\t\tlong32AtPointerput(destIndex, skewWord & halftoneWord);\n\t\t\t\t\tdestIndex += hInc;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tfor (word = 2; word <= (nWords - 1); word += 1) {\n\n\t\t\t\t/* Normal inner loop does merge: */\n\t\t\t\t/* pick up next word */\n\n\t\t\t\tthisWord = long32AtPointer(sourceIndex);\n\t\t\t\tsourceIndex += hInc;\n\n\t\t\t\t/* 32-bit rotate */\n\n\t\t\t\tskewWord = (((unskew < 0) ? ((usqInt) (prevWord & notSkewMask) >> -unskew) : ((usqInt) (prevWord & notSkewMask) << unskew))) | (((skew < 0) ? ((usqInt) (thisWord & skewMask) >> -skew) : ((usqInt) (thisWord & skewMask) << skew)));\n\t\t\t\tprevWord = thisWord;\n\t\t\t\tmergeWord = mergeFnwith(skewWord & halftoneWord, long32AtPointer(destIndex));\n\t\t\t\tlong32AtPointerput(destIndex, mergeWord);\n\t\t\t\tdestIndex += hInc;\n\t\t\t}\n\t\t}\n\t\tif (nWords > 1) {\n\t\t\tdestMask = mask2;\n\n\t\t\t/* pick up next word */\n\n\t\t\tthisWord = long32AtPointer(sourceIndex);\n\t\t\tsourceIndex += hInc;\n\n\t\t\t/* 32-bit rotate */\n\n\t\t\tskewWord = (((unskew < 0) ? ((usqInt) (prevWord & notSkewMask) >> -unskew) : ((usqInt) (prevWord & notSkewMask) << unskew))) | (((skew < 0) ? ((usqInt) (thisWord & skewMask) >> -skew) : ((usqInt) (thisWord & skewMask) << skew)));\n\t\t\tdestWord = long32AtPointer(destIndex);\n\t\t\tmergeWord = mergeFnwith(skewWord & halftoneWord, destWord);\n\t\t\tdestWord = (destMask & mergeWord) | (destWord & (~destMask));\n\t\t\tlong32AtPointerput(destIndex, destWord);\n\t\t\tdestIndex += hInc;\n\t\t}\n\t\tsourceIndex += sourceDelta;\n\t\tdestIndex += destDelta;\n\t}\n}\n\n\n/*\tFaster copyLoop when source not used. hDir and vDir are both\n\tpositive, and perload and skew are unused */\n\nstatic sqInt\ncopyLoopNoSource(void)\n{\n    sqInt destWord;\n    sqInt halftoneWord;\n    sqInt i;\n    sqInt (*mergeFnwith)(sqInt, sqInt);\n    sqInt mergeWord;\n    sqInt word;\n\n\tmergeFnwith = ((sqInt (*)(sqInt, sqInt)) (opTable[combinationRule + 1]));\n\tmergeFnwith;\n\tfor (i = 1; i <= bbH; i += 1) {\n\t\tif (noHalftone) {\n\n\t\t\t/* here is the vertical loop */\n\n\t\t\thalftoneWord = AllOnes;\n\t\t}\n\t\telse {\n\t\t\thalftoneWord = long32AtPointer(halftoneBase + ((((dy + i) - 1) % halftoneHeight) * 4));\n\t\t}\n\t\tdestMask = mask1;\n\t\tdestWord = long32AtPointer(destIndex);\n\t\tmergeWord = mergeFnwith(halftoneWord, destWord);\n\t\tdestWord = (destMask & mergeWord) | (destWord & (~destMask));\n\t\tlong32AtPointerput(destIndex, destWord);\n\n\t\t/* This central horizontal loop requires no store masking */\n\n\t\tdestIndex += 4;\n\t\tdestMask = AllOnes;\n\t\tif (combinationRule == 3) {\n\n\t\t\t/* Special inner loop for STORE */\n\n\t\t\tdestWord = halftoneWord;\n\t\t\tfor (word = 2; word <= (nWords - 1); word += 1) {\n\t\t\t\tlong32AtPointerput(destIndex, destWord);\n\t\t\t\tdestIndex += 4;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tfor (word = 2; word <= (nWords - 1); word += 1) {\n\n\t\t\t\t/* Normal inner loop does merge */\n\t\t\t\t/* Normal inner loop does merge */\n\n\t\t\t\tdestWord = long32AtPointer(destIndex);\n\t\t\t\tmergeWord = mergeFnwith(halftoneWord, destWord);\n\t\t\t\tlong32AtPointerput(destIndex, mergeWord);\n\t\t\t\tdestIndex += 4;\n\t\t\t}\n\t\t}\n\t\tif (nWords > 1) {\n\t\t\tdestMask = mask2;\n\t\t\tdestWord = long32AtPointer(destIndex);\n\t\t\tmergeWord = mergeFnwith(halftoneWord, destWord);\n\t\t\tdestWord = (destMask & mergeWord) | (destWord & (~destMask));\n\t\t\tlong32AtPointerput(destIndex, destWord);\n\t\t\tdestIndex += 4;\n\t\t}\n\t\tdestIndex += destDelta;\n\t}\n}\n\n\n/*\tThis version of the inner loop maps source pixels\n\tto a destination form with different depth. Because it is already\n\tunweildy, the loop is not unrolled as in the other versions.\n\tPreload, skew and skewMask are all overlooked, since pickSourcePixels\n\tdelivers its destination word already properly aligned.\n\tNote that pickSourcePixels could be copied in-line at the top of\n\tthe horizontal loop, and some of its inits moved out of the loop. */\n/*\tar 12/7/1999:\n\tThe loop has been rewritten to use only one pickSourcePixels call.\n\tThe idea is that the call itself could be inlined. If we decide not\n\tto inline pickSourcePixels we could optimize the loop instead. */\n\nstatic sqInt\ncopyLoopPixMap(void)\n{\n    sqInt destPix;\n    sqInt destPixMask;\n    sqInt destWord;\n    sqInt destWord1;\n    sqInt dstShift;\n    sqInt dstShift1;\n    sqInt dstShiftInc;\n    sqInt dstShiftLeft;\n    sqInt endBits;\n    sqInt halftoneWord;\n    sqInt i;\n    sqInt idx;\n    sqInt idx1;\n    sqInt mapperFlags;\n    sqInt (*mergeFnwith)(sqInt, sqInt);\n    sqInt mergeWord;\n    sqInt nPix;\n    sqInt nPix1;\n    sqInt nSourceIncs;\n    sqInt pv;\n    sqInt scrStartBits;\n    sqInt skewWord;\n    sqInt sourcePix;\n    sqInt sourcePixMask;\n    sqInt sourceWord;\n    sqInt srcShift;\n    sqInt srcShift1;\n    sqInt srcShiftInc;\n    sqInt startBits;\n    sqInt val;\n    sqInt words;\n\n\tmergeFnwith = ((sqInt (*)(sqInt, sqInt)) (opTable[combinationRule + 1]));\n\tmergeFnwith;\n\tsourcePPW = 32 / sourceDepth;\n\tsourcePixMask = maskTable[sourceDepth];\n\tdestPixMask = maskTable[destDepth];\n\tmapperFlags = cmFlags & (~ColorMapNewStyle);\n\tsourceIndex = (sourceBits + (sy * sourcePitch)) + ((sx / sourcePPW) * 4);\n  \n\tscrStartBits = sourcePPW - (sx & (sourcePPW - 1));\n\tif (bbW < scrStartBits) {\n\t\tnSourceIncs = 0;\n\t}\n\telse {\n\t\tnSourceIncs = ((bbW - scrStartBits) / sourcePPW) + 1;\n\t}\n\n\t/* Note following two items were already calculated in destmask setup! */\n\n\tsourceDelta = sourcePitch - (nSourceIncs * 4);\n\tstartBits = destPPW - (dx & (destPPW - 1));\n\tendBits = (((dx + bbW) - 1) & (destPPW - 1)) + 1;\n\tif (bbW < startBits) {\n\t\tstartBits = bbW;\n\t}\n\tsrcShift = (sx & (sourcePPW - 1)) * sourceDepth;\n\tdstShift = (dx & (destPPW - 1)) * destDepth;\n\tsrcShiftInc = sourceDepth;\n\tdstShiftInc = destDepth;\n\tdstShiftLeft = 0;\n\tif (sourceMSB) {\n\t\tsrcShift = (32 - sourceDepth) - srcShift;\n\t\tsrcShiftInc = 0 - srcShiftInc;\n\t}\n\tif (destMSB) {\n\t\tdstShift = (32 - destDepth) - dstShift;\n\t\tdstShiftInc = 0 - dstShiftInc;\n\t\tdstShiftLeft = 32 - destDepth;\n\t}\n\tfor (i = 1; i <= bbH; i += 1) {\n\t\tif (noHalftone) {\n\n\t\t\t/* here is the vertical loop */\n\t\t\t/* *** is it possible at all that noHalftone == false? *** */\n\n\t\t\thalftoneWord = AllOnes;\n\t\t}\n\t\telse {\n\t\t\thalftoneWord = long32AtPointer(halftoneBase + ((((dy + i) - 1) % halftoneHeight) * 4));\n\t\t}\n\t\tsrcBitShift = srcShift;\n\t\tdstBitShift = dstShift;\n\t\tdestMask = mask1;\n\n\t\t/* Here is the horizontal loop... */\n\n\t\tnPix = startBits;\n\t\twords = nWords;\n\t\tdo {\n\t\t\t/* begin pickSourcePixels:flags:srcMask:destMask:srcShiftInc:dstShiftInc: */\n\n\t\t\t/* oh please */\n\n\t\t\tsourceWord = long32AtPointer(sourceIndex);\n\t\t\tdestWord1 = 0;\n\n\t\t\t/* Hint: Keep in register */\n\n\t\t\tsrcShift1 = srcBitShift;\n\n\t\t\t/* Hint: Keep in register */\n\n\t\t\tdstShift1 = dstBitShift;\n\n\t\t\t/* always > 0 so we can use do { } while(--nPix); */\n\n\t\t\tnPix1 = nPix;\n\t\t\tif (mapperFlags == (ColorMapPresent | ColorMapIndexedPart)) {\n\t\t\t\tdo {\n\n\t\t\t\t\t/* a little optimization for (pretty crucial) blits using indexed lookups only */\n\t\t\t\t\t/* grab, colormap and mix in pixel */\n\n\t\t\t\t\tsourcePix = (((usqInt) sourceWord) >> srcShift1) & sourcePixMask;\n\t\t\t\t\tdestPix = cmLookupTable[sourcePix & cmMask];\n\n\t\t\t\t\t/* adjust dest pix index */\n\n\t\t\t\t\tdestWord1 = destWord1 | ((destPix & destPixMask) << dstShift1);\n\n\t\t\t\t\t/* adjust source pix index */\n\n\t\t\t\t\tdstShift1 += dstShiftInc;\n\t\t\t\t\tif (!((((srcShift1 += srcShiftInc)) & 4294967264UL) == 0)) {\n\t\t\t\t\t\tif (sourceMSB) {\n\t\t\t\t\t\t\tsrcShift1 += 32;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tsrcShift1 -= 32;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t/* begin srcLongAt: */\n\t\t\t\t\t\tidx = sourceIndex += 4;\n\t\t\t\t\t\tsourceWord = long32AtPointer(idx);\n\t\t\t\t\t}\n\t\t\t\t} while(!(((nPix1 -= 1)) == 0));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdo {\n\n\t\t\t\t\t/* grab, colormap and mix in pixel */\n\n\t\t\t\t\tsourcePix = (((usqInt) sourceWord) >> srcShift1) & sourcePixMask;\n\t\t\t\t\t/* begin mapPixel:flags: */\n\t\t\t\t\tpv = sourcePix;\n\t\t\t\t\tif ((mapperFlags & ColorMapPresent) != 0) {\n\t\t\t\t\t\tif ((mapperFlags & ColorMapFixedPart) != 0) {\n\t\t\t\t\t\t\t/* begin rgbMapPixel:flags: */\n\t\t\t\t\t\t\tval = (((cmShiftTable[0]) < 0) ? ((usqInt) (sourcePix & (cmMaskTable[0])) >> -(cmShiftTable[0])) : ((usqInt) (sourcePix & (cmMaskTable[0])) << (cmShiftTable[0])));\n\t\t\t\t\t\t\tval = val | ((((cmShiftTable[1]) < 0) ? ((usqInt) (sourcePix & (cmMaskTable[1])) >> -(cmShiftTable[1])) : ((usqInt) (sourcePix & (cmMaskTable[1])) << (cmShiftTable[1]))));\n\t\t\t\t\t\t\tval = val | ((((cmShiftTable[2]) < 0) ? ((usqInt) (sourcePix & (cmMaskTable[2])) >> -(cmShiftTable[2])) : ((usqInt) (sourcePix & (cmMaskTable[2])) << (cmShiftTable[2]))));\n\t\t\t\t\t\t\tpv = val | ((((cmShiftTable[3]) < 0) ? ((usqInt) (sourcePix & (cmMaskTable[3])) >> -(cmShiftTable[3])) : ((usqInt) (sourcePix & (cmMaskTable[3])) << (cmShiftTable[3]))));\n\t\t\t\t\t\t\tif ((pv == 0)\n\t\t\t\t\t\t\t && (sourcePix != 0)) {\n\t\t\t\t\t\t\t\tpv = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ((mapperFlags & ColorMapIndexedPart) != 0) {\n\t\t\t\t\t\t\tpv = cmLookupTable[pv & cmMask];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdestPix = pv;\n\n\t\t\t\t\t/* adjust dest pix index */\n\n\t\t\t\t\tdestWord1 = destWord1 | ((destPix & destPixMask) << dstShift1);\n\n\t\t\t\t\t/* adjust source pix index */\n\n\t\t\t\t\tdstShift1 += dstShiftInc;\n\t\t\t\t\tif (!((((srcShift1 += srcShiftInc)) & 4294967264UL) == 0)) {\n\t\t\t\t\t\tif (sourceMSB) {\n\t\t\t\t\t\t\tsrcShift1 += 32;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tsrcShift1 -= 32;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t/* begin srcLongAt: */\n\t\t\t\t\t\tidx1 = sourceIndex += 4;\n\t\t\t\t\t\tsourceWord = long32AtPointer(idx1);\n\t\t\t\t\t}\n\t\t\t\t} while(!(((nPix1 -= 1)) == 0));\n\t\t\t}\n\n\t\t\t/* Store back */\n\n\t\t\tsrcBitShift = srcShift1;\n\t\t\tskewWord = destWord1;\n\t\t\tdstBitShift = dstShiftLeft;\n\t\t\tif (destMask == AllOnes) {\n\n\t\t\t\t/* avoid read-modify-write */\n\n\t\t\t\tmergeWord = mergeFnwith(skewWord & halftoneWord, long32AtPointer(destIndex));\n\t\t\t\tlong32AtPointerput(destIndex, destMask & mergeWord);\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\t/* General version using dest masking */\n\n\t\t\t\tdestWord = long32AtPointer(destIndex);\n\t\t\t\tmergeWord = mergeFnwith(skewWord & halftoneWord, destWord & destMask);\n\t\t\t\tdestWord = (destMask & mergeWord) | (destWord & (~destMask));\n\t\t\t\tlong32AtPointerput(destIndex, destWord);\n\t\t\t}\n\t\t\tdestIndex += 4;\n\t\t\tif (words == 2) {\n\n\t\t\t\t/* e.g., is the next word the last word? */\n\t\t\t\t/* set mask for last word in this row */\n\n\t\t\t\tdestMask = mask2;\n\t\t\t\tnPix = endBits;\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\t/* use fullword mask for inner loop */\n\n\t\t\t\tdestMask = AllOnes;\n\t\t\t\tnPix = destPPW;\n\t\t\t}\n\t\t} while(!(((words -= 1)) == 0));\n\t\tsourceIndex += sourceDelta;\n\t\tdestIndex += destDelta;\n\t}\n}\n\n\n/*\tReturn the default translation table from 1..8 bit indexed colors to 32bit */\n/*\tThe table has been generated by the following statements */\n/*\t| pvs hex |\n\tString streamContents:[:s|\n\ts nextPutAll:'static unsigned int theTable[256] = { '.\n\tpvs := (Color colorMapIfNeededFrom: 8 to: 32) asArray.\n\t1 to: pvs size do:[:i|\n\ti > 1 ifTrue:[s nextPutAll:', '].\n\t(i-1 \\\\ 8) = 0 ifTrue:[s cr].\n\ts nextPutAll:'0x'.\n\thex := (pvs at: i) printStringBase: 16.\n\ts nextPutAll: (hex copyFrom: 4 to: hex size).\n\t].\n\ts nextPutAll:'};'.\n\t]. */\n\nstatic unsigned int *\ndefault8To32Table(void)\n{\n    static unsigned int theTable[256] = { \n0x0, 0xFF000001, 0xFFFFFFFF, 0xFF808080, 0xFFFF0000, 0xFF00FF00, 0xFF0000FF, 0xFF00FFFF, \n0xFFFFFF00, 0xFFFF00FF, 0xFF202020, 0xFF404040, 0xFF606060, 0xFF9F9F9F, 0xFFBFBFBF, 0xFFDFDFDF, \n0xFF080808, 0xFF101010, 0xFF181818, 0xFF282828, 0xFF303030, 0xFF383838, 0xFF484848, 0xFF505050, \n0xFF585858, 0xFF686868, 0xFF707070, 0xFF787878, 0xFF878787, 0xFF8F8F8F, 0xFF979797, 0xFFA7A7A7, \n0xFFAFAFAF, 0xFFB7B7B7, 0xFFC7C7C7, 0xFFCFCFCF, 0xFFD7D7D7, 0xFFE7E7E7, 0xFFEFEFEF, 0xFFF7F7F7, \n0xFF000001, 0xFF003300, 0xFF006600, 0xFF009900, 0xFF00CC00, 0xFF00FF00, 0xFF000033, 0xFF003333, \n0xFF006633, 0xFF009933, 0xFF00CC33, 0xFF00FF33, 0xFF000066, 0xFF003366, 0xFF006666, 0xFF009966, \n0xFF00CC66, 0xFF00FF66, 0xFF000099, 0xFF003399, 0xFF006699, 0xFF009999, 0xFF00CC99, 0xFF00FF99, \n0xFF0000CC, 0xFF0033CC, 0xFF0066CC, 0xFF0099CC, 0xFF00CCCC, 0xFF00FFCC, 0xFF0000FF, 0xFF0033FF, \n0xFF0066FF, 0xFF0099FF, 0xFF00CCFF, 0xFF00FFFF, 0xFF330000, 0xFF333300, 0xFF336600, 0xFF339900, \n0xFF33CC00, 0xFF33FF00, 0xFF330033, 0xFF333333, 0xFF336633, 0xFF339933, 0xFF33CC33, 0xFF33FF33, \n0xFF330066, 0xFF333366, 0xFF336666, 0xFF339966, 0xFF33CC66, 0xFF33FF66, 0xFF330099, 0xFF333399, \n0xFF336699, 0xFF339999, 0xFF33CC99, 0xFF33FF99, 0xFF3300CC, 0xFF3333CC, 0xFF3366CC, 0xFF3399CC, \n0xFF33CCCC, 0xFF33FFCC, 0xFF3300FF, 0xFF3333FF, 0xFF3366FF, 0xFF3399FF, 0xFF33CCFF, 0xFF33FFFF, \n0xFF660000, 0xFF663300, 0xFF666600, 0xFF669900, 0xFF66CC00, 0xFF66FF00, 0xFF660033, 0xFF663333, \n0xFF666633, 0xFF669933, 0xFF66CC33, 0xFF66FF33, 0xFF660066, 0xFF663366, 0xFF666666, 0xFF669966, \n0xFF66CC66, 0xFF66FF66, 0xFF660099, 0xFF663399, 0xFF666699, 0xFF669999, 0xFF66CC99, 0xFF66FF99, \n0xFF6600CC, 0xFF6633CC, 0xFF6666CC, 0xFF6699CC, 0xFF66CCCC, 0xFF66FFCC, 0xFF6600FF, 0xFF6633FF, \n0xFF6666FF, 0xFF6699FF, 0xFF66CCFF, 0xFF66FFFF, 0xFF990000, 0xFF993300, 0xFF996600, 0xFF999900, \n0xFF99CC00, 0xFF99FF00, 0xFF990033, 0xFF993333, 0xFF996633, 0xFF999933, 0xFF99CC33, 0xFF99FF33, \n0xFF990066, 0xFF993366, 0xFF996666, 0xFF999966, 0xFF99CC66, 0xFF99FF66, 0xFF990099, 0xFF993399, \n0xFF996699, 0xFF999999, 0xFF99CC99, 0xFF99FF99, 0xFF9900CC, 0xFF9933CC, 0xFF9966CC, 0xFF9999CC, \n0xFF99CCCC, 0xFF99FFCC, 0xFF9900FF, 0xFF9933FF, 0xFF9966FF, 0xFF9999FF, 0xFF99CCFF, 0xFF99FFFF, \n0xFFCC0000, 0xFFCC3300, 0xFFCC6600, 0xFFCC9900, 0xFFCCCC00, 0xFFCCFF00, 0xFFCC0033, 0xFFCC3333, \n0xFFCC6633, 0xFFCC9933, 0xFFCCCC33, 0xFFCCFF33, 0xFFCC0066, 0xFFCC3366, 0xFFCC6666, 0xFFCC9966, \n0xFFCCCC66, 0xFFCCFF66, 0xFFCC0099, 0xFFCC3399, 0xFFCC6699, 0xFFCC9999, 0xFFCCCC99, 0xFFCCFF99, \n0xFFCC00CC, 0xFFCC33CC, 0xFFCC66CC, 0xFFCC99CC, 0xFFCCCCCC, 0xFFCCFFCC, 0xFFCC00FF, 0xFFCC33FF, \n0xFFCC66FF, 0xFFCC99FF, 0xFFCCCCFF, 0xFFCCFFFF, 0xFFFF0000, 0xFFFF3300, 0xFFFF6600, 0xFFFF9900, \n0xFFFFCC00, 0xFFFFFF00, 0xFFFF0033, 0xFFFF3333, 0xFFFF6633, 0xFFFF9933, 0xFFFFCC33, 0xFFFFFF33, \n0xFFFF0066, 0xFFFF3366, 0xFFFF6666, 0xFFFF9966, 0xFFFFCC66, 0xFFFFFF66, 0xFFFF0099, 0xFFFF3399, \n0xFFFF6699, 0xFFFF9999, 0xFFFFCC99, 0xFFFFFF99, 0xFFFF00CC, 0xFFFF33CC, 0xFFFF66CC, 0xFFFF99CC, \n0xFFFFCCCC, 0xFFFFFFCC, 0xFFFF00FF, 0xFFFF33FF, 0xFFFF66FF, 0xFFFF99FF, 0xFFFFCCFF, 0xFFFFFFFF};;\n\n\treturn theTable;\n}\n\n\n/*\tUtility routine for computing Warp increments. */\n\nstatic sqInt\ndeltaFromtonSteps(sqInt x1, sqInt x2, sqInt n)\n{\n\tif (x2 > x1) {\n\t\treturn (((x2 - x1) + FixedPt1) / (n + 1)) + 1;\n\t}\n\telse {\n\t\tif (x2 == x1) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn 0 - ((((x1 - x2) + FixedPt1) / (n + 1)) + 1);\n\t}\n}\n\nstatic sqInt\ndestinationWordwith(sqInt sourceWord, sqInt destinationWord)\n{\n\treturn destinationWord;\n}\n\n\n/*\tCompute masks for left and right destination words */\n\nstatic sqInt\ndestMaskAndPointerInit(void)\n{\n    sqInt endBits;\n    sqInt pixPerM1;\n    sqInt startBits;\n\n\n\t/* A mask, assuming power of two */\n\t/* how many pixels in first word */\n\n\tpixPerM1 = destPPW - 1;\n\tstartBits = destPPW - (dx & pixPerM1);\n\tif (destMSB) {\n\t\tmask1 = ((usqInt) AllOnes) >> (32 - (startBits * destDepth));\n\t}\n\telse {\n\t\tmask1 = AllOnes << (32 - (startBits * destDepth));\n\t}\n\tendBits = (((dx + bbW) - 1) & pixPerM1) + 1;\n\tif (destMSB) {\n\t\tmask2 = AllOnes << (32 - (endBits * destDepth));\n\t}\n\telse {\n\t\tmask2 = ((usqInt) AllOnes) >> (32 - (endBits * destDepth));\n\t}\n\tif (bbW < startBits) {\n\t\tmask1 = mask1 & mask2;\n\t\tmask2 = 0;\n\t\tnWords = 1;\n\t}\n\telse {\n\t\tnWords = (((bbW - startBits) + pixPerM1) / destPPW) + 1;\n\t}\n\n\t/* defaults for no overlap with source */\n\t/* calculate byte addr and delta, based on first word of data */\n\t/* Note pitch is bytes and nWords is longs, not bytes */\n\n\thDir = vDir = 1;\n\tdestIndex = (destBits + (dy * destPitch)) + ((dx / destPPW) * 4);\n\tdestDelta = (destPitch * vDir) - (4 * (nWords * hDir));\n}\n\n\n/*\tDither the given 32bit word to 16 bit. Ignore alpha. */\n\nstatic sqInt\ndither32To16threshold(sqInt srcWord, sqInt ditherValue)\n{\n    sqInt addThreshold;\n\n\n\t/* You bet */\n\n\taddThreshold = ((usqInt) ditherValue << 8);\n\treturn ((((usqInt) (dither8Lookup[addThreshold + ((((usqInt) srcWord >> 16)) & 255)]) << 10)) + (((usqInt) (dither8Lookup[addThreshold + ((((usqInt) srcWord >> 8)) & 255)]) << 5))) + (dither8Lookup[addThreshold + (srcWord & 255)]);\n}\n\n\n/*\tThis is the primitive implementation of the line-drawing loop.\n\tSee the comments in BitBlt>>drawLoopX:Y: */\n\nstatic sqInt\ndrawLoopXY(sqInt xDelta, sqInt yDelta)\n{\n    sqInt affB;\n    sqInt affL;\n    sqInt affR;\n    sqInt affT;\n    sqInt dx1;\n    sqInt dy1;\n    sqInt i;\n    sqInt P;\n    sqInt px;\n    sqInt py;\n\n\tif (xDelta > 0) {\n\t\tdx1 = 1;\n\t}\n\telse {\n\t\tif (xDelta == 0) {\n\t\t\tdx1 = 0;\n\t\t}\n\t\telse {\n\t\t\tdx1 = -1;\n\t\t}\n\t}\n\tif (yDelta > 0) {\n\t\tdy1 = 1;\n\t}\n\telse {\n\t\tif (yDelta == 0) {\n\t\t\tdy1 = 0;\n\t\t}\n\t\telse {\n\t\t\tdy1 = -1;\n\t\t}\n\t}\n\tpx = abs(yDelta);\n\tpy = abs(xDelta);\n\n\t/* init null rectangle */\n\n\taffL = affT = 9999;\n\taffR = affB = -9999;\n\tif (py > px) {\n\n\t\t/* more horizontal */\n\n\t\tP = ((sqInt) py >> 1);\n\t\tfor (i = 1; i <= py; i += 1) {\n\t\t\tdestX += dx1;\n\t\t\tif (((P -= px)) < 0) {\n\t\t\t\tdestY += dy1;\n\t\t\t\tP += py;\n\t\t\t}\n\t\t\tif (i < py) {\n\t\t\t\tcopyBits();\n\t\t\t\tif (interpreterProxy->failed()) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\tif ((affectedL < affectedR)\n\t\t\t\t && (affectedT < affectedB)) {\n\n\t\t\t\t\t/* Affected rectangle grows along the line */\n\n\t\t\t\t\taffL = ((affL < affectedL) ? affL : affectedL);\n\t\t\t\t\taffR = ((affR < affectedR) ? affectedR : affR);\n\t\t\t\t\taffT = ((affT < affectedT) ? affT : affectedT);\n\t\t\t\t\taffB = ((affB < affectedB) ? affectedB : affB);\n\t\t\t\t\tif (((affR - affL) * (affB - affT)) > 4000) {\n\n\t\t\t\t\t\t/* If affected rectangle gets large, update it in chunks */\n\n\t\t\t\t\t\taffectedL = affL;\n\t\t\t\t\t\taffectedR = affR;\n\t\t\t\t\t\taffectedT = affT;\n\t\t\t\t\t\taffectedB = affB;\n\t\t\t\t\t\t/* begin showDisplayBits */\n\t\t\t\t\t\tinterpreterProxy->showDisplayBitsLeftTopRightBottom(destForm, affectedL, affectedT, affectedR, affectedB);\n\n\t\t\t\t\t\t/* init null rectangle */\n\n\t\t\t\t\t\taffL = affT = 9999;\n\t\t\t\t\t\taffR = affB = -9999;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\telse {\n\n\t\t/* more vertical */\n\n\t\tP = ((sqInt) px >> 1);\n\t\tfor (i = 1; i <= px; i += 1) {\n\t\t\tdestY += dy1;\n\t\t\tif (((P -= py)) < 0) {\n\t\t\t\tdestX += dx1;\n\t\t\t\tP += px;\n\t\t\t}\n\t\t\tif (i < px) {\n\t\t\t\tcopyBits();\n\t\t\t\tif (interpreterProxy->failed()) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\tif ((affectedL < affectedR)\n\t\t\t\t && (affectedT < affectedB)) {\n\n\t\t\t\t\t/* Affected rectangle grows along the line */\n\n\t\t\t\t\taffL = ((affL < affectedL) ? affL : affectedL);\n\t\t\t\t\taffR = ((affR < affectedR) ? affectedR : affR);\n\t\t\t\t\taffT = ((affT < affectedT) ? affT : affectedT);\n\t\t\t\t\taffB = ((affB < affectedB) ? affectedB : affB);\n\t\t\t\t\tif (((affR - affL) * (affB - affT)) > 4000) {\n\n\t\t\t\t\t\t/* If affected rectangle gets large, update it in chunks */\n\n\t\t\t\t\t\taffectedL = affL;\n\t\t\t\t\t\taffectedR = affR;\n\t\t\t\t\t\taffectedT = affT;\n\t\t\t\t\t\taffectedB = affB;\n\t\t\t\t\t\t/* begin showDisplayBits */\n\t\t\t\t\t\tinterpreterProxy->showDisplayBitsLeftTopRightBottom(destForm, affectedL, affectedT, affectedR, affectedB);\n\n\t\t\t\t\t\t/* init null rectangle */\n\n\t\t\t\t\t\taffL = affT = 9999;\n\t\t\t\t\t\taffR = affB = -9999;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\taffectedL = affL;\n\taffectedR = affR;\n\taffectedT = affT;\n\n\t/* store destX, Y back */\n\n\taffectedB = affB;\n\tinterpreterProxy->storeIntegerofObjectwithValue(BBDestXIndex, bitBltOop, destX);\n\tinterpreterProxy->storeIntegerofObjectwithValue(BBDestYIndex, bitBltOop, destY);\n}\n\nstatic sqInt\ndstLongAt(sqInt idx)\n{\n\treturn long32AtPointer(idx);\n}\n\nstatic sqInt\ndstLongAtput(sqInt idx, sqInt value)\n{\n\treturn long32AtPointerput(idx, value);\n}\n\n\n/*\tStore the given value back into destination form, using dstMask\n\tto mask out the bits to be modified. This is an essiantial\n\tread-modify-write operation on the destination form. */\n\nstatic sqInt\ndstLongAtputmask(sqInt idx, sqInt srcValue, sqInt dstMask)\n{\n    sqInt dstValue;\n\n\tdstValue = long32AtPointer(idx);\n\tdstValue = dstValue & dstMask;\n\tdstValue = dstValue | srcValue;\n\tlong32AtPointerput(idx, dstValue);\n}\n\n\n/*\tDither the given 32bit word to 16 bit. Ignore alpha. */\n\nstatic sqInt\nexpensiveDither32To16threshold(sqInt srcWord, sqInt ditherValue)\n{\n    sqInt out;\n    sqInt pv;\n    sqInt threshold;\n    sqInt value;\n\n\n\t/* You bet */\n\n\tpv = srcWord & 255;\n\tthreshold = ditherThresholds16[pv & 7];\n\tvalue = ditherValues16[((usqInt) pv >> 3)];\n\tif (ditherValue < threshold) {\n\t\tout = value + 1;\n\t}\n\telse {\n\t\tout = value;\n\t}\n\tpv = (((usqInt) srcWord >> 8)) & 255;\n\tthreshold = ditherThresholds16[pv & 7];\n\tvalue = ditherValues16[((usqInt) pv >> 3)];\n\tif (ditherValue < threshold) {\n\t\tout = out | (((usqInt) (value + 1) << 5));\n\t}\n\telse {\n\t\tout = out | (((usqInt) value << 5));\n\t}\n\tpv = (((usqInt) srcWord >> 16)) & 255;\n\tthreshold = ditherThresholds16[pv & 7];\n\tvalue = ditherValues16[((usqInt) pv >> 3)];\n\tif (ditherValue < threshold) {\n\t\tout = out | (((usqInt) (value + 1) << 10));\n\t}\n\telse {\n\t\tout = out | (((usqInt) value << 10));\n\t}\n\treturn out;\n}\n\n\n/*\tReturn the integer value of the given field of the given object. If the\n\tfield contains a Float, truncate it and return its integral part. Fail if\n\tthe given field does not contain a small integer or Float, or if the\n\ttruncated Float is out of the range of small integers.\n */\n\nstatic sqInt\nfetchIntOrFloatofObject(sqInt fieldIndex, sqInt objectPointer)\n{\n    sqInt fieldOop;\n    double  floatValue;\n\n\tfieldOop = interpreterProxy->fetchPointerofObject(fieldIndex, objectPointer); // OK xxx_dmu\n\tif ((fieldOop & 1)) {\n\t\treturn (fieldOop >> 1);\n\t}\n\tfloatValue = interpreterProxy->floatValueOf(fieldOop);\n\tif (!((-2.147483648e9 <= floatValue)\n\t\t && (floatValue <= 2.147483647e9))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn 0;\n\t}\n\treturn ((sqInt)floatValue);\n}\n\n\n/*\tReturn the integer value of the given field of the given object. If the\n\tfield contains a Float, truncate it and return its integral part. Fail if\n\tthe given field does not contain a small integer or Float, or if the\n\ttruncated Float is out of the range of small integers.\n */\n\nstatic sqInt\nfetchIntOrFloatofObjectifNil(sqInt fieldIndex, sqInt objectPointer, sqInt defaultValue)\n{\n    sqInt fieldOop;\n    double  floatValue;\n\n\tfieldOop = interpreterProxy->fetchPointerofObject(fieldIndex, objectPointer); // OK xxx_dmu\n\tif ((fieldOop & 1)) {\n\t\treturn (fieldOop >> 1);\n\t}\n\tif (fieldOop == (interpreterProxy->nilObject())) {\n\t\treturn defaultValue;\n\t}\n\tfloatValue = interpreterProxy->floatValueOf(fieldOop);\n\tif (!((-2.147483648e9 <= floatValue)\n\t\t && (floatValue <= 2.147483647e9))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn 0;\n\t}\n\treturn ((sqInt)floatValue);\n}\n\n\n/*\tFor any non-zero pixel value in destinationWord with zero alpha channel\n\ttake the alpha from sourceWord and fill it in. Intended for fixing alpha\n\tchannels left at zero during 16->32 bpp conversions.\n */\n\nstatic sqInt\nfixAlphawith(sqInt sourceWord, sqInt destinationWord)\n{\n\tif (!(destDepth == 32)) {\n\t\treturn destinationWord;\n\t}\n\tif (destinationWord == 0) {\n\t\treturn 0;\n\t}\n\tif (!((destinationWord & 4278190080UL) == 0)) {\n\t\treturn destinationWord;\n\t}\n\treturn destinationWord | (sourceWord & 4278190080UL);\n}\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\n\n/*\tReturn a value from the halftone pattern. */\n\nstatic sqInt\nhalftoneAt(sqInt idx)\n{\n\treturn long32AtPointer(halftoneBase + ((idx % halftoneHeight) * 4));\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nstatic sqInt\nignoreSourceOrHalftone(sqInt formPointer)\n{\n\tif (formPointer == (interpreterProxy->nilObject())) {\n\t\treturn 1;\n\t}\n\tif (combinationRule == 0) {\n\t\treturn 1;\n\t}\n\tif (combinationRule == 5) {\n\t\treturn 1;\n\t}\n\tif (combinationRule == 10) {\n\t\treturn 1;\n\t}\n\tif (combinationRule == 15) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}\n\nstatic sqInt\ninitBBOpTable(void)\n{\n\topTable[0+1] = (void *)clearWordwith;\n\topTable[1+1] = (void *)bitAndwith;\n\topTable[2+1] = (void *)bitAndInvertwith;\n\topTable[3+1] = (void *)sourceWordwith;\n\topTable[4+1] = (void *)bitInvertAndwith;\n\topTable[5+1] = (void *)destinationWordwith;\n\topTable[6+1] = (void *)bitXorwith;\n\topTable[7+1] = (void *)bitOrwith;\n\topTable[8+1] = (void *)bitInvertAndInvertwith;\n\topTable[9+1] = (void *)bitInvertXorwith;\n\topTable[10+1] = (void *)bitInvertDestinationwith;\n\topTable[11+1] = (void *)bitOrInvertwith;\n\topTable[12+1] = (void *)bitInvertSourcewith;\n\topTable[13+1] = (void *)bitInvertOrwith;\n\topTable[14+1] = (void *)bitInvertOrInvertwith;\n\topTable[15+1] = (void *)destinationWordwith;\n\topTable[16+1] = (void *)destinationWordwith;\n\topTable[17+1] = (void *)destinationWordwith;\n\topTable[18+1] = (void *)addWordwith;\n\topTable[19+1] = (void *)subWordwith;\n\topTable[20+1] = (void *)rgbAddwith;\n\topTable[21+1] = (void *)rgbSubwith;\n\topTable[22+1] = (void *)OLDrgbDiffwith;\n\topTable[23+1] = (void *)OLDtallyIntoMapwith;\n\topTable[24+1] = (void *)alphaBlendwith;\n\topTable[25+1] = (void *)pixPaintwith;\n\topTable[26+1] = (void *)pixMaskwith;\n\topTable[27+1] = (void *)rgbMaxwith;\n\topTable[28+1] = (void *)rgbMinwith;\n\topTable[29+1] = (void *)rgbMinInvertwith;\n\topTable[30+1] = (void *)alphaBlendConstwith;\n\topTable[31+1] = (void *)alphaPaintConstwith;\n\topTable[32+1] = (void *)rgbDiffwith;\n\topTable[33+1] = (void *)tallyIntoMapwith;\n\topTable[34+1] = (void *)alphaBlendScaledwith;\n\topTable[35+1] = (void *)alphaBlendScaledwith;\n\topTable[36+1] = (void *)alphaBlendScaledwith;\n\topTable[37+1] = (void *)rgbMulwith;\n\topTable[38+1] = (void *)pixSwapwith;\n\topTable[39+1] = (void *)pixClearwith;\n\topTable[40+1] = (void *)fixAlphawith;\n}\n\nstatic sqInt\ninitDither8Lookup(void)\n{\n    sqInt b;\n    sqInt out;\n    sqInt pv;\n    sqInt t;\n    sqInt threshold;\n    sqInt value;\n    sqInt value1;\n\n\tfor (b = 0; b <= 255; b += 1) {\n\t\tfor (t = 0; t <= 15; t += 1) {\n\t\t\t/* begin expensiveDither32To16:threshold: */\n\n\t\t\t/* You bet */\n\n\t\t\tpv = b & 255;\n\t\t\tthreshold = ditherThresholds16[pv & 7];\n\t\t\tvalue1 = ditherValues16[((usqInt) pv >> 3)];\n\t\t\tif (t < threshold) {\n\t\t\t\tout = value1 + 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tout = value1;\n\t\t\t}\n\t\t\tpv = (((usqInt) b >> 8)) & 255;\n\t\t\tthreshold = ditherThresholds16[pv & 7];\n\t\t\tvalue1 = ditherValues16[((usqInt) pv >> 3)];\n\t\t\tif (t < threshold) {\n\t\t\t\tout = out | (((usqInt) (value1 + 1) << 5));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tout = out | (((usqInt) value1 << 5));\n\t\t\t}\n\t\t\tpv = (((usqInt) b >> 16)) & 255;\n\t\t\tthreshold = ditherThresholds16[pv & 7];\n\t\t\tvalue1 = ditherValues16[((usqInt) pv >> 3)];\n\t\t\tif (t < threshold) {\n\t\t\t\tout = out | (((usqInt) (value1 + 1) << 10));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tout = out | (((usqInt) value1 << 10));\n\t\t\t}\n\t\t\tvalue = out;\n\t\t\tdither8Lookup[(t << 8) + b] = value;\n\t\t}\n\t}\n}\n\nEXPORT(sqInt)\ninitialiseModule(void)\n{\n\tinitBBOpTable();\n\tinitDither8Lookup();\n\treturn 1;\n}\n\n\n/*\tReturn true if shiftTable/maskTable define an identity mapping. */\n\nstatic sqInt\nisIdentityMapwith(int *shifts, unsigned int *masks)\n{\n\tif ((shifts == null)\n\t || (masks == null)) {\n\t\treturn 1;\n\t}\n\tif (((shifts[RedIndex]) == 0)\n\t && (((shifts[GreenIndex]) == 0)\n && (((shifts[BlueIndex]) == 0)\n && (((shifts[AlphaIndex]) == 0)\n && (((masks[RedIndex]) == 16711680)\n && (((masks[GreenIndex]) == 65280)\n && (((masks[BlueIndex]) == 255)\n && ((masks[AlphaIndex]) == 4278190080UL)))))))) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}\n\n\n/*\tLoad the dest form for BitBlt. Return false if anything is wrong, true\n\totherwise. \n */\n\nstatic sqInt\nloadBitBltDestForm(void)\n{\n    sqInt destBitsSize;\n\n\tdestBitsOop_xxx_dmu = interpreterProxy->fetchPointerofObject(FormBitsIndex, destForm); // maybe xxx_dmu\n\tdestWidth = interpreterProxy->fetchIntegerofObject(FormWidthIndex, destForm);\n\tdestHeight = interpreterProxy->fetchIntegerofObject(FormHeightIndex, destForm);\n\tif (!((destWidth >= 0)\n\t\t && (destHeight >= 0))) {\n\t\treturn 0;\n\t}\n\tdestDepth = interpreterProxy->fetchIntegerofObject(FormDepthIndex, destForm);\n\tdestMSB = destDepth > 0;\n\tif (destDepth < 0) {\n\t\tdestDepth = 0 - destDepth;\n\t}\n\tif ((destBitsOop_xxx_dmu & 1)) {\n\t\tif (!(queryDestSurface((destBitsOop_xxx_dmu >> 1)))) {\n\t\t\treturn 0;\n\t\t}\n\t\tdestPPW = 32 / destDepth;\n\t\tdestBits = destPitch = 0;\n\t}\n\telse {\n\t\tdestPPW = 32 / destDepth;\n\t\tdestPitch = ((destWidth + (destPPW - 1)) / destPPW) * 4;\n\t\tdestBitsSize = interpreterProxy->byteSizeOf(destBitsOop_xxx_dmu);\n\t\tif (!((interpreterProxy->isWordsOrBytes(destBitsOop_xxx_dmu))\n\t\t\t && (destBitsSize == (destPitch * destHeight)))) {\n\t\t\treturn 0;\n\t\t}\n\t\t// xxx_dmu destBits = oopForPointer(interpreterProxy->firstIndexableField(destBits));\n\t\tdestBits = (sqInt) interpreterProxy->firstIndexableField(destBitsOop_xxx_dmu);\n\t}\n\treturn 1;\n}\n\n\n/*\tLoad BitBlt from the oop.\n\tThis function is exported for the Balloon engine. */\n\nEXPORT(sqInt)\nloadBitBltFrom(sqInt bbObj)\n{\n\treturn loadBitBltFromwarping(bbObj, 0);\n}\n\n\n/*\tLoad context from BitBlt instance. Return false if anything is amiss */\n/*\tNOTE this should all be changed to minX/maxX coordinates for simpler\n\tclipping -- once it works! */\n\nstatic sqInt\nloadBitBltFromwarping(sqInt bbObj, sqInt aBool)\n{\n    sqInt cmOop;\n    sqInt cmSize;\n    sqInt destBitsSize;\n    sqInt fieldOop;\n    sqInt fieldOop1;\n    double  floatValue;\n    double  floatValue1;\n    sqInt halftoneBits;\n    sqInt mapOop;\n    sqInt mapOop1;\n    sqInt ok;\n    sqInt oldStyle;\n    sqInt oop;\n    sqInt sourceBitsSize;\n\n\tbitBltOop = bbObj;\n\tisWarping = aBool;\n\tcombinationRule = interpreterProxy->fetchIntegerofObject(BBRuleIndex, bitBltOop);\n\tif ((interpreterProxy->failed())\n\t || ((combinationRule < 0)\n || (combinationRule > (OpTableSize - 2)))) {\n\t\treturn 0;\n\t}\n\tif ((combinationRule >= 16)\n\t && (combinationRule <= 17)) {\n\t\treturn 0;\n\t}\n\tsourceForm = interpreterProxy->fetchPointerofObject(BBSourceFormIndex, bitBltOop); // maybe xxx_dmu\n\t/* begin ignoreSourceOrHalftone: */\n\tif (sourceForm == (interpreterProxy->nilObject())) {\n\t\tnoSource = 1;\n\t\tgoto l1;\n\t}\n\tif (combinationRule == 0) {\n\t\tnoSource = 1;\n\t\tgoto l1;\n\t}\n\tif (combinationRule == 5) {\n\t\tnoSource = 1;\n\t\tgoto l1;\n\t}\n\tif (combinationRule == 10) {\n\t\tnoSource = 1;\n\t\tgoto l1;\n\t}\n\tif (combinationRule == 15) {\n\t\tnoSource = 1;\n\t\tgoto l1;\n\t}\n\tnoSource = 0;\nl1:\t/* end ignoreSourceOrHalftone: */;\n\thalftoneForm = interpreterProxy->fetchPointerofObject(BBHalftoneFormIndex, bitBltOop); // maybe xxx_dmu\n\t/* begin ignoreSourceOrHalftone: */\n\tif (halftoneForm == (interpreterProxy->nilObject())) {\n\t\tnoHalftone = 1;\n\t\tgoto l2;\n\t}\n\tif (combinationRule == 0) {\n\t\tnoHalftone = 1;\n\t\tgoto l2;\n\t}\n\tif (combinationRule == 5) {\n\t\tnoHalftone = 1;\n\t\tgoto l2;\n\t}\n\tif (combinationRule == 10) {\n\t\tnoHalftone = 1;\n\t\tgoto l2;\n\t}\n\tif (combinationRule == 15) {\n\t\tnoHalftone = 1;\n\t\tgoto l2;\n\t}\n\tnoHalftone = 0;\nl2:\t/* end ignoreSourceOrHalftone: */;\n\tdestForm = interpreterProxy->fetchPointerofObject(BBDestFormIndex, bbObj); // maybe xxx_dmu\n\tif (!((interpreterProxy->isPointers(destForm))\n\t\t && ((interpreterProxy->slotSizeOf(destForm)) >= 4))) {\n\t\treturn 0;\n\t}\n\t/* begin loadBitBltDestForm */\n\tdestBitsOop_xxx_dmu = interpreterProxy->fetchPointerofObject(FormBitsIndex, destForm); // maybe xxx_dmu\n\tdestWidth = interpreterProxy->fetchIntegerofObject(FormWidthIndex, destForm);\n\tdestHeight = interpreterProxy->fetchIntegerofObject(FormHeightIndex, destForm);\n\tif (!((destWidth >= 0)\n\t\t && (destHeight >= 0))) {\n\t\tok = 0;\n\t\tgoto l3;\n\t}\n\tdestDepth = interpreterProxy->fetchIntegerofObject(FormDepthIndex, destForm);\n\tdestMSB = destDepth > 0;\n\tif (destDepth < 0) {\n\t\tdestDepth = 0 - destDepth;\n\t}\n\tif ((destBitsOop_xxx_dmu & 1)) {\n\t\tif (!(queryDestSurface((destBitsOop_xxx_dmu >> 1)))) {\n\t\t\tok = 0;\n\t\t\tgoto l3;\n\t\t}\n\t\tdestPPW = 32 / destDepth;\n\t\tdestBits = destPitch = 0;\n\t}\n\telse {\n\t\tdestPPW = 32 / destDepth;\n\t\tdestPitch = ((destWidth + (destPPW - 1)) / destPPW) * 4;\n\t\tdestBitsSize = interpreterProxy->byteSizeOf(destBitsOop_xxx_dmu);\n\t\tif (!((interpreterProxy->isWordsOrBytes(destBitsOop_xxx_dmu))\n\t\t\t && (destBitsSize == (destPitch * destHeight)))) {\n\t\t\tok = 0;\n\t\t\tgoto l3;\n\t\t}\n\t\t// xxx_dmu destBits = oopForPointer(interpreterProxy->firstIndexableField(destBits));\n\t\tdestBits = (sqInt) interpreterProxy->firstIndexableField(destBitsOop_xxx_dmu);\n\t}\n\tok = 1;\nl3:\t/* end loadBitBltDestForm */;\n\tif (!(ok)) {\n\t\treturn 0;\n\t}\n\tdestX = fetchIntOrFloatofObjectifNil(BBDestXIndex, bitBltOop, 0);\n\tdestY = fetchIntOrFloatofObjectifNil(BBDestYIndex, bitBltOop, 0);\n\twidth = fetchIntOrFloatofObjectifNil(BBWidthIndex, bitBltOop, destWidth);\n\theight = fetchIntOrFloatofObjectifNil(BBHeightIndex, bitBltOop, destHeight);\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\tif (noSource) {\n\t\tsourceX = sourceY = 0;\n\t}\n\telse {\n\t\tif (!((interpreterProxy->isPointers(sourceForm))\n\t\t\t && ((interpreterProxy->slotSizeOf(sourceForm)) >= 4))) {\n\t\t\treturn 0;\n\t\t}\n\t\t/* begin loadBitBltSourceForm */\n\t\tsourceBitsOop_xxx_dmu = interpreterProxy->fetchPointerofObject(FormBitsIndex, sourceForm); // maybe xxx_dmu\n\t\t/* begin fetchIntOrFloat:ofObject: */\n\t\tfieldOop = interpreterProxy->fetchPointerofObject(FormWidthIndex, sourceForm);\n\t\tif ((fieldOop & 1)) {\n\t\t\tsourceWidth = (fieldOop >> 1);\n\t\t\tgoto l8;\n\t\t}\n\t\tfloatValue = interpreterProxy->floatValueOf(fieldOop);\n\t\tif (!((-2.147483648e9 <= floatValue)\n\t\t\t && (floatValue <= 2.147483647e9))) {\n\t\t\tinterpreterProxy->primitiveFail();\n\t\t\tsourceWidth = 0;\n\t\t\tgoto l8;\n\t\t}\n\t\tsourceWidth = ((sqInt)floatValue);\n\tl8:\t/* end fetchIntOrFloat:ofObject: */;\n\t\t/* begin fetchIntOrFloat:ofObject: */\n\t\tfieldOop1 = interpreterProxy->fetchPointerofObject(FormHeightIndex, sourceForm);\n\t\tif ((fieldOop1 & 1)) {\n\t\t\tsourceHeight = (fieldOop1 >> 1);\n\t\t\tgoto l9;\n\t\t}\n\t\tfloatValue1 = interpreterProxy->floatValueOf(fieldOop1);\n\t\tif (!((-2.147483648e9 <= floatValue1)\n\t\t\t && (floatValue1 <= 2.147483647e9))) {\n\t\t\tinterpreterProxy->primitiveFail();\n\t\t\tsourceHeight = 0;\n\t\t\tgoto l9;\n\t\t}\n\t\tsourceHeight = ((sqInt)floatValue1);\n\tl9:\t/* end fetchIntOrFloat:ofObject: */;\n\t\tif (!((sourceWidth >= 0)\n\t\t\t && (sourceHeight >= 0))) {\n\t\t\tok = 0;\n\t\t\tgoto l10;\n\t\t}\n\t\tsourceDepth = interpreterProxy->fetchIntegerofObject(FormDepthIndex, sourceForm);\n\t\tsourceMSB = sourceDepth > 0;\n\t\tif (sourceDepth < 0) {\n\t\t\tsourceDepth = 0 - sourceDepth;\n\t\t}\n\t\tif ((sourceBitsOop_xxx_dmu & 1)) {\n\t\t\tif (!(querySourceSurface((sourceBitsOop_xxx_dmu >> 1)))) {\n\t\t\t\tok = 0;\n\t\t\t\tgoto l10;\n\t\t\t}\n\t\t\tsourcePPW = 32 / sourceDepth;\n\t\t\tsourceBits = sourcePitch = 0;\n\t\t}\n\t\telse {\n\t\t\tsourcePPW = 32 / sourceDepth;\n\t\t\tsourcePitch = ((sourceWidth + (sourcePPW - 1)) / sourcePPW) * 4;\n\t\t\tsourceBitsSize = interpreterProxy->byteSizeOf(sourceBitsOop_xxx_dmu);\n\t\t\tif (!((interpreterProxy->isWordsOrBytes(sourceBitsOop_xxx_dmu))\n\t\t\t\t && (sourceBitsSize == (sourcePitch * sourceHeight)))) {\n\t\t\t\tok = 0;\n\t\t\t\tgoto l10;\n\t\t\t}\n\t\t\t// xxx_dmu sourceBits = oopForPointer(interpreterProxy->firstIndexableField(sourceBits));\n\t\t\tsourceBits = (sqInt)(interpreterProxy->firstIndexableField(sourceBitsOop_xxx_dmu));\n\t\t}\n\t\tok = 1;\n\tl10:\t/* end loadBitBltSourceForm */;\n\t\tif (!(ok)) {\n\t\t\treturn 0;\n\t\t}\n\t\t/* begin loadColorMap */\n\t\tcmFlags = cmMask = cmBitsPerColor = 0;\n\t\tcmShiftTable = null;\n\t\tcmMaskTable = null;\n\t\tcmLookupTable = null;\n\t\tcmOop = interpreterProxy->fetchPointerofObject(BBColorMapIndex, bitBltOop); // OK xxx_dmu\n\t\tif (cmOop == (interpreterProxy->nilObject())) {\n\t\t\tok = 1;\n\t\t\tgoto l4;\n\t\t}\n\n\t\t/* even if identity or somesuch - may be cleared later */\n\n\t\tcmFlags = ColorMapPresent;\n\t\toldStyle = 0;\n\t\tif (interpreterProxy->isWords(cmOop)) {\n\n\t\t\t/* This is an old-style color map (indexed only, with implicit RGBA conversion) */\n\n\t\t\tcmSize = interpreterProxy->slotSizeOf(cmOop);\n\t\t\tcmLookupTable = interpreterProxy->firstIndexableField(cmOop);\n\t\t\toldStyle = 1;\n\t\t\t;\n\t\t}\n\t\telse {\n\t\t\tif (!((interpreterProxy->isPointers(cmOop))\n\t\t\t\t && ((interpreterProxy->slotSizeOf(cmOop)) >= 3))) {\n\t\t\t\tok = 0;\n\t\t\t\tgoto l4;\n\t\t\t}\n\t\t\t/* begin loadColorMapShiftOrMaskFrom: */\n\t\t\tmapOop = interpreterProxy->fetchPointerofObject(0, cmOop); // OK xxx_dmu\n\t\t\tif (mapOop == (interpreterProxy->nilObject())) {\n\t\t\t\tcmShiftTable = ((void *) null);\n\t\t\t\tgoto l6;\n\t\t\t}\n\t\t\tif ((mapOop & 1)) {\n\t\t\t\tinterpreterProxy->primitiveFail();\n\t\t\t\tcmShiftTable = ((void *) null);\n\t\t\t\tgoto l6;\n\t\t\t}\n\t\t\tif (!((interpreterProxy->isWords(mapOop))\n\t\t\t\t && ((interpreterProxy->slotSizeOf(mapOop)) == 4))) {\n\t\t\t\tinterpreterProxy->primitiveFail();\n\t\t\t\tcmShiftTable = ((void *) null);\n\t\t\t\tgoto l6;\n\t\t\t}\n\t\t\tcmShiftTable = ((void *) (interpreterProxy->firstIndexableField(mapOop)));\n\t\tl6:\t/* end loadColorMapShiftOrMaskFrom: */;\n\t\t\t/* begin loadColorMapShiftOrMaskFrom: */\n\t\t\tmapOop1 = interpreterProxy->fetchPointerofObject(1, cmOop); // OK xxx_dmu\n\t\t\tif (mapOop1 == (interpreterProxy->nilObject())) {\n\t\t\t\tcmMaskTable = ((void *) null);\n\t\t\t\tgoto l7;\n\t\t\t}\n\t\t\tif ((mapOop1 & 1)) {\n\t\t\t\tinterpreterProxy->primitiveFail();\n\t\t\t\tcmMaskTable = ((void *) null);\n\t\t\t\tgoto l7;\n\t\t\t}\n\t\t\tif (!((interpreterProxy->isWords(mapOop1))\n\t\t\t\t && ((interpreterProxy->slotSizeOf(mapOop1)) == 4))) {\n\t\t\t\tinterpreterProxy->primitiveFail();\n\t\t\t\tcmMaskTable = ((void *) null);\n\t\t\t\tgoto l7;\n\t\t\t}\n\t\t\tcmMaskTable = ((void *) (interpreterProxy->firstIndexableField(mapOop1)));\n\t\tl7:\t/* end loadColorMapShiftOrMaskFrom: */;\n\t\t\toop = interpreterProxy->fetchPointerofObject(2, cmOop); // maybe xxx_dmu\n\t\t\tif (oop == (interpreterProxy->nilObject())) {\n\t\t\t\tcmSize = 0;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!(interpreterProxy->isWords(oop))) {\n\t\t\t\t\tok = 0;\n\t\t\t\t\tgoto l4;\n\t\t\t\t}\n\t\t\t\tcmSize = interpreterProxy->slotSizeOf(oop);\n\t\t\t\tcmLookupTable = interpreterProxy->firstIndexableField(oop);\n\t\t\t}\n\t\t\tcmFlags = cmFlags | ColorMapNewStyle;\n\t\t\t;\n\t\t}\n\t\tif (!((cmSize & (cmSize - 1)) == 0)) {\n\t\t\tok = 0;\n\t\t\tgoto l4;\n\t\t}\n\t\tcmMask = cmSize - 1;\n\t\tcmBitsPerColor = 0;\n\t\tif (cmSize == 512) {\n\t\t\tcmBitsPerColor = 3;\n\t\t}\n\t\tif (cmSize == 4096) {\n\t\t\tcmBitsPerColor = 4;\n\t\t}\n\t\tif (cmSize == 32768) {\n\t\t\tcmBitsPerColor = 5;\n\t\t}\n\t\tif (cmSize == 0) {\n\t\t\tcmLookupTable = null;\n\t\t\tcmMask = 0;\n\t\t}\n\t\telse {\n\t\t\tcmFlags = cmFlags | ColorMapIndexedPart;\n\t\t}\n\t\tif (oldStyle) {\n\t\t\tsetupColorMasks();\n\t\t}\n\t\tif (isIdentityMapwith(cmShiftTable, cmMaskTable)) {\n\t\t\tcmMaskTable = null;\n\t\t\tcmShiftTable = null;\n\t\t}\n\t\telse {\n\t\t\tcmFlags = cmFlags | ColorMapFixedPart;\n\t\t}\n\t\tok = 1;\n\tl4:\t/* end loadColorMap */;\n\t\tif (!(ok)) {\n\t\t\treturn 0;\n\t\t}\n\t\tif ((cmFlags & ColorMapNewStyle) == 0) {\n\t\t\tsetupColorMasks();\n\t\t}\n\t\tsourceX = fetchIntOrFloatofObjectifNil(BBSourceXIndex, bitBltOop, 0);\n\t\tsourceY = fetchIntOrFloatofObjectifNil(BBSourceYIndex, bitBltOop, 0);\n\t}\n\t/* begin loadHalftoneForm */\n\tif (noHalftone) {\n\t\thalftoneBase = null;\n\t\tok = 1;\n\t\tgoto l5;\n\t}\n\tif ((interpreterProxy->isPointers(halftoneForm))\n\t && ((interpreterProxy->slotSizeOf(halftoneForm)) >= 4)) {\n\n\t\t/* Old-style 32xN monochrome halftone Forms */\n\n\t\thalftoneBits = interpreterProxy->fetchPointerofObject(FormBitsIndex, halftoneForm);\n\t\thalftoneHeight = interpreterProxy->fetchIntegerofObject(FormHeightIndex, halftoneForm);\n\t\tif (!(interpreterProxy->isWords(halftoneBits))) {\n\t\t\tnoHalftone = 1;\n\t\t}\n\t}\n\telse {\n\t\tif (!((!(interpreterProxy->isPointers(halftoneForm)))\n\t\t\t && (interpreterProxy->isWords(halftoneForm)))) {\n\t\t\tok = 0;\n\t\t\tgoto l5;\n\t\t}\n\t\thalftoneBits = halftoneForm;\n\t\thalftoneHeight = interpreterProxy->slotSizeOf(halftoneBits);\n\t}\n\t// xxx_dmu halftoneBase = oopForPointer(interpreterProxy->firstIndexableField(halftoneBits));\n\thalftoneBase = (sqInt)(interpreterProxy->firstIndexableField(halftoneBits));\n\tok = 1;\nl5:\t/* end loadHalftoneForm */;\n\tif (!(ok)) {\n\t\treturn 0;\n\t}\n\tclipX = fetchIntOrFloatofObjectifNil(BBClipXIndex, bitBltOop, 0);\n\tclipY = fetchIntOrFloatofObjectifNil(BBClipYIndex, bitBltOop, 0);\n\tclipWidth = fetchIntOrFloatofObjectifNil(BBClipWidthIndex, bitBltOop, destWidth);\n\tclipHeight = fetchIntOrFloatofObjectifNil(BBClipHeightIndex, bitBltOop, destHeight);\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\tif (clipX < 0) {\n\t\tclipWidth += clipX;\n\t\tclipX = 0;\n\t}\n\tif (clipY < 0) {\n\t\tclipHeight += clipY;\n\t\tclipY = 0;\n\t}\n\tif ((clipX + clipWidth) > destWidth) {\n\t\tclipWidth = destWidth - clipX;\n\t}\n\tif ((clipY + clipHeight) > destHeight) {\n\t\tclipHeight = destHeight - clipY;\n\t}\n\treturn 1;\n}\n\n\n/*\tLoad the source form for BitBlt. Return false if anything is wrong, true\n\totherwise. \n */\n\nstatic sqInt\nloadBitBltSourceForm(void)\n{\n    sqInt fieldOop;\n    sqInt fieldOop1;\n    double  floatValue;\n    double  floatValue1;\n    sqInt sourceBitsSize;\n\n\tsourceBitsOop_xxx_dmu = interpreterProxy->fetchPointerofObject(FormBitsIndex, sourceForm); // maybe xxx_dmu\n\t/* begin fetchIntOrFloat:ofObject: */\n\tfieldOop = interpreterProxy->fetchPointerofObject(FormWidthIndex, sourceForm);\n\tif ((fieldOop & 1)) {\n\t\tsourceWidth = (fieldOop >> 1);\n\t\tgoto l1;\n\t}\n\tfloatValue = interpreterProxy->floatValueOf(fieldOop);\n\tif (!((-2.147483648e9 <= floatValue)\n\t\t && (floatValue <= 2.147483647e9))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tsourceWidth = 0;\n\t\tgoto l1;\n\t}\n\tsourceWidth = ((sqInt)floatValue);\nl1:\t/* end fetchIntOrFloat:ofObject: */;\n\t/* begin fetchIntOrFloat:ofObject: */\n\tfieldOop1 = interpreterProxy->fetchPointerofObject(FormHeightIndex, sourceForm);\n\tif ((fieldOop1 & 1)) {\n\t\tsourceHeight = (fieldOop1 >> 1);\n\t\tgoto l2;\n\t}\n\tfloatValue1 = interpreterProxy->floatValueOf(fieldOop1);\n\tif (!((-2.147483648e9 <= floatValue1)\n\t\t && (floatValue1 <= 2.147483647e9))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tsourceHeight = 0;\n\t\tgoto l2;\n\t}\n\tsourceHeight = ((sqInt)floatValue1);\nl2:\t/* end fetchIntOrFloat:ofObject: */;\n\tif (!((sourceWidth >= 0)\n\t\t && (sourceHeight >= 0))) {\n\t\treturn 0;\n\t}\n\tsourceDepth = interpreterProxy->fetchIntegerofObject(FormDepthIndex, sourceForm);\n\tsourceMSB = sourceDepth > 0;\n\tif (sourceDepth < 0) {\n\t\tsourceDepth = 0 - sourceDepth;\n\t}\n\tif ((sourceBitsOop_xxx_dmu & 1)) {\n\t\tif (!(querySourceSurface((sourceBitsOop_xxx_dmu >> 1)))) {\n\t\t\treturn 0;\n\t\t}\n\t\tsourcePPW = 32 / sourceDepth;\n\t\tsourceBits = sourcePitch = 0;\n\t}\n\telse {\n\t\tsourcePPW = 32 / sourceDepth;\n\t\tsourcePitch = ((sourceWidth + (sourcePPW - 1)) / sourcePPW) * 4;\n\t\tsourceBitsSize = interpreterProxy->byteSizeOf(sourceBitsOop_xxx_dmu);\n\t\tif (!((interpreterProxy->isWordsOrBytes(sourceBitsOop_xxx_dmu))\n\t\t\t && (sourceBitsSize == (sourcePitch * sourceHeight)))) {\n\t\t\treturn 0;\n\t\t}\n\t\t// xxx_dmu sourceBits = oopForPointer(interpreterProxy->firstIndexableField(sourceBits));\n\t\tsourceBits = (sqInt)(interpreterProxy->firstIndexableField(sourceBitsOop_xxx_dmu));\n\t}\n\treturn 1;\n}\n\n\n/*\tColorMap, if not nil, must be longWords, and \n\t2^N long, where N = sourceDepth for 1, 2, 4, 8 bits, \n\tor N = 9, 12, or 15 (3, 4, 5 bits per color) for 16 or 32 bits. */\n\nstatic sqInt\nloadColorMap(void)\n{\n    sqInt cmOop;\n    sqInt cmSize;\n    sqInt mapOop;\n    sqInt mapOop1;\n    sqInt oldStyle;\n    sqInt oop;\n\n\tcmFlags = cmMask = cmBitsPerColor = 0;\n\tcmShiftTable = null;\n\tcmMaskTable = null;\n\tcmLookupTable = null;\n\tcmOop = interpreterProxy->fetchPointerofObject(BBColorMapIndex, bitBltOop); // OK xxx_dmu\n\tif (cmOop == (interpreterProxy->nilObject())) {\n\t\treturn 1;\n\t}\n\n\t/* even if identity or somesuch - may be cleared later */\n\n\tcmFlags = ColorMapPresent;\n\toldStyle = 0;\n\tif (interpreterProxy->isWords(cmOop)) {\n\n\t\t/* This is an old-style color map (indexed only, with implicit RGBA conversion) */\n\n\t\tcmSize = interpreterProxy->slotSizeOf(cmOop);\n\t\tcmLookupTable = interpreterProxy->firstIndexableField(cmOop);\n\t\toldStyle = 1;\n\t\t;\n\t}\n\telse {\n\t\tif (!((interpreterProxy->isPointers(cmOop))\n\t\t\t && ((interpreterProxy->slotSizeOf(cmOop)) >= 3))) {\n\t\t\treturn 0;\n\t\t}\n\t\t/* begin loadColorMapShiftOrMaskFrom: */\n\t\tmapOop = interpreterProxy->fetchPointerofObject(0, cmOop);  // OK xxx_dmu\n\t\tif (mapOop == (interpreterProxy->nilObject())) {\n\t\t\tcmShiftTable = ((void *) null);\n\t\t\tgoto l1;\n\t\t}\n\t\tif ((mapOop & 1)) {\n\t\t\tinterpreterProxy->primitiveFail();\n\t\t\tcmShiftTable = ((void *) null);\n\t\t\tgoto l1;\n\t\t}\n\t\tif (!((interpreterProxy->isWords(mapOop))\n\t\t\t && ((interpreterProxy->slotSizeOf(mapOop)) == 4))) {\n\t\t\tinterpreterProxy->primitiveFail();\n\t\t\tcmShiftTable = ((void *) null);\n\t\t\tgoto l1;\n\t\t}\n\t\tcmShiftTable = ((void *) (interpreterProxy->firstIndexableField(mapOop)));\n\tl1:\t/* end loadColorMapShiftOrMaskFrom: */;\n\t\t/* begin loadColorMapShiftOrMaskFrom: */\n\t\tmapOop1 = interpreterProxy->fetchPointerofObject(1, cmOop); // maybe xxx_dmu\n\t\tif (mapOop1 == (interpreterProxy->nilObject())) {\n\t\t\tcmMaskTable = ((void *) null);\n\t\t\tgoto l2;\n\t\t}\n\t\tif ((mapOop1 & 1)) {\n\t\t\tinterpreterProxy->primitiveFail();\n\t\t\tcmMaskTable = ((void *) null);\n\t\t\tgoto l2;\n\t\t}\n\t\tif (!((interpreterProxy->isWords(mapOop1))\n\t\t\t && ((interpreterProxy->slotSizeOf(mapOop1)) == 4))) {\n\t\t\tinterpreterProxy->primitiveFail();\n\t\t\tcmMaskTable = ((void *) null);\n\t\t\tgoto l2;\n\t\t}\n\t\tcmMaskTable = ((void *) (interpreterProxy->firstIndexableField(mapOop1)));\n\tl2:\t/* end loadColorMapShiftOrMaskFrom: */;\n\t\toop = interpreterProxy->fetchPointerofObject(2, cmOop);  // OK xxx_dmu\n\t\tif (oop == (interpreterProxy->nilObject())) {\n\t\t\tcmSize = 0;\n\t\t}\n\t\telse {\n\t\t\tif (!(interpreterProxy->isWords(oop))) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tcmSize = interpreterProxy->slotSizeOf(oop);\n\t\t\tcmLookupTable = interpreterProxy->firstIndexableField(oop);\n\t\t}\n\t\tcmFlags = cmFlags | ColorMapNewStyle;\n\t\t;\n\t}\n\tif (!((cmSize & (cmSize - 1)) == 0)) {\n\t\treturn 0;\n\t}\n\tcmMask = cmSize - 1;\n\tcmBitsPerColor = 0;\n\tif (cmSize == 512) {\n\t\tcmBitsPerColor = 3;\n\t}\n\tif (cmSize == 4096) {\n\t\tcmBitsPerColor = 4;\n\t}\n\tif (cmSize == 32768) {\n\t\tcmBitsPerColor = 5;\n\t}\n\tif (cmSize == 0) {\n\t\tcmLookupTable = null;\n\t\tcmMask = 0;\n\t}\n\telse {\n\t\tcmFlags = cmFlags | ColorMapIndexedPart;\n\t}\n\tif (oldStyle) {\n\t\tsetupColorMasks();\n\t}\n\tif (isIdentityMapwith(cmShiftTable, cmMaskTable)) {\n\t\tcmMaskTable = null;\n\t\tcmShiftTable = null;\n\t}\n\telse {\n\t\tcmFlags = cmFlags | ColorMapFixedPart;\n\t}\n\treturn 1;\n}\n\nstatic void *\nloadColorMapShiftOrMaskFrom(sqInt mapOop)\n{\n\tif (mapOop == (interpreterProxy->nilObject())) {\n\t\treturn null;\n\t}\n\tif ((mapOop & 1)) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\tif (!((interpreterProxy->isWords(mapOop))\n\t\t && ((interpreterProxy->slotSizeOf(mapOop)) == 4))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\treturn interpreterProxy->firstIndexableField(mapOop);\n}\n\n\n/*\tLoad the halftone form */\n\nstatic sqInt\nloadHalftoneForm(void)\n{\n    sqInt halftoneBits;\n\n\tif (noHalftone) {\n\t\thalftoneBase = null;\n\t\treturn 1;\n\t}\n\tif ((interpreterProxy->isPointers(halftoneForm))\n\t && ((interpreterProxy->slotSizeOf(halftoneForm)) >= 4)) {\n\n\t\t/* Old-style 32xN monochrome halftone Forms */\n\n\t\thalftoneBits = interpreterProxy->fetchPointerofObject(FormBitsIndex, halftoneForm);\n\t\thalftoneHeight = interpreterProxy->fetchIntegerofObject(FormHeightIndex, halftoneForm);\n\t\tif (!(interpreterProxy->isWords(halftoneBits))) {\n\t\t\tnoHalftone = 1;\n\t\t}\n\t}\n\telse {\n\t\tif (!((!(interpreterProxy->isPointers(halftoneForm)))\n\t\t\t && (interpreterProxy->isWords(halftoneForm)))) {\n\t\t\treturn 0;\n\t\t}\n\t\thalftoneBits = halftoneForm;\n\t\thalftoneHeight = interpreterProxy->slotSizeOf(halftoneBits);\n\t}\n\t// xxx_dmu halftoneBase = oopForPointer(interpreterProxy->firstIndexableField(halftoneBits));\n\thalftoneBase = (sqInt)(interpreterProxy->firstIndexableField(halftoneBits));\n\treturn 1;\n}\n\n\n/*\tLoad the surface support plugin */\n\nstatic sqInt\nloadSurfacePlugin(void)\n{\n\tquerySurfaceFn = interpreterProxy->ioLoadFunctionFrom(\"ioGetSurfaceFormat\", \"SurfacePlugin\");\n\tlockSurfaceFn = interpreterProxy->ioLoadFunctionFrom(\"ioLockSurface\", \"SurfacePlugin\");\n\tunlockSurfaceFn = interpreterProxy->ioLoadFunctionFrom(\"ioUnlockSurface\", \"SurfacePlugin\");\n\treturn (querySurfaceFn != 0)\n\t && ((lockSurfaceFn != 0)\n && (unlockSurfaceFn != 0));\n}\n\nstatic sqInt\nloadWarpBltFrom(sqInt bbObj)\n{\n\treturn loadBitBltFromwarping(bbObj, 1);\n}\n\n\n/*\tGet a pointer to the bits of any OS surfaces. */\n/*\tNotes: \n\t* For equal source/dest handles only one locking operation is performed.\n\tThis is to prevent locking of overlapping areas which does not work with\n\tcertain APIs (as an example, DirectDraw prevents locking of overlapping\n\tareas). \n\tA special case for non-overlapping but equal source/dest handle would \n\tbe possible but we would have to transfer this information over to \n\tunlockSurfaces somehow (currently, only one unlock operation is \n\tperformed for equal source and dest handles). Also, this would require\n\ta change in the notion of ioLockSurface() which is right now interpreted\n\tas a hint and not as a requirement to lock only the specific portion of\n\tthe surface.\n\t\n\t* The arguments in ioLockSurface() provide the implementation with\n\tan explicit hint what area is affected. It can be very useful to\n\tknow the max. affected area beforehand if getting the bits requires\n\texpensive copy operations (e.g., like a roundtrip to the X server or a\n\tglReadPixel op).\n\tHowever, the returned pointer *MUST* point to the virtual origin of the\n\tsurface and not to the beginning of the rectangle. The promise made by\n\tBitBlt is to never access data outside the given rectangle (aligned to\n\t4byte boundaries!)\n\tso it is okay to return a pointer to the virtual origin that is actually\n\toutside the valid memory area.\n\t\n\t* The area provided in ioLockSurface() is already clipped (e.g., it will\n\talways be inside the source and dest boundingBox) but it is not aligned to\n\tword boundaries\n\tyet. It is up to the support code to compute accurate alignment if\n\tnecessary. \n\t* Warping always requires the entire source surface to be locked because\n\tthere is no beforehand knowledge about what area will actually be\n\ttraversed. \n\t\n */\n\nstatic sqInt\nlockSurfaces(void)\n{\n    sqInt b;\n    sqInt destHandle;\n    sqInt (*fn)(sqInt, sqInt*, sqInt, sqInt, sqInt, sqInt);\n    sqInt l;\n    sqInt r;\n    sqInt sourceHandle;\n    sqInt t;\n\n\thasSurfaceLock = 0;\n\tif (destBits == 0) {\n\t\tif (lockSurfaceFn == 0) {\n\t\t\tif (!(loadSurfacePlugin())) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\tfn = ((sqInt (*)(sqInt, sqInt*, sqInt, sqInt, sqInt, sqInt)) lockSurfaceFn);\n\t\tdestHandle = interpreterProxy->fetchIntegerofObject(FormBitsIndex, destForm);\n\t\tif ((sourceBits == 0)\n\t\t && (!noSource)) {\n\n\t\t\t/* Handle the special case of equal source and dest handles */\n\n\t\t\tsourceHandle = interpreterProxy->fetchIntegerofObject(FormBitsIndex, sourceForm);\n\t\t\tif (sourceHandle == destHandle) {\n\t\t\t\tif (isWarping) {\n\n\t\t\t\t\t/* Otherwise use overlapping area */\n\n\t\t\t\t\tl = ((sx < dx) ? sx : dx);\n\t\t\t\t\tr = (((sx < dx) ? dx : sx)) + bbW;\n\t\t\t\t\tt = ((sy < dy) ? sy : dy);\n\t\t\t\t\tb = (((sy < sy) ? sy : sy)) + bbH;\n\t\t\t\t\tsourceBits = fn(sourceHandle, &sourcePitch, l, t, r-l, b-t);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tsourceBits = fn(sourceHandle, &sourcePitch, 0,0, sourceWidth, sourceHeight);\n\t\t\t\t}\n\t\t\t\tdestBits = sourceBits;\n\t\t\t\tdestBitsOop_xxx_dmu = sourceBitsOop_xxx_dmu;\n\t\t\t\tdestPitch = sourcePitch;\n\t\t\t\thasSurfaceLock = 1;\n\t\t\t\treturn destBits != 0;\n\t\t\t}\n\t\t}\n\t\tdestBits = fn(destHandle, &destPitch, dx, dy, bbW, bbH);\n\t\thasSurfaceLock = 1;\n\t}\n\tif ((sourceBits == 0)\n\t && (!noSource)) {\n\n\t\t/* Blitting *from* OS surface */\n\n\t\tsourceHandle = interpreterProxy->fetchIntegerofObject(FormBitsIndex, sourceForm);\n\t\tif (lockSurfaceFn == 0) {\n\t\t\tif (!(loadSurfacePlugin())) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\t/* Warping requiring the entire surface */\n\n\t\tfn = ((sqInt (*)(sqInt, sqInt*, sqInt, sqInt, sqInt, sqInt)) lockSurfaceFn);\n\t\tif (isWarping) {\n\t\t\tsourceBits = fn(sourceHandle, &sourcePitch, 0, 0, sourceWidth, sourceHeight);\n\t\t}\n\t\telse {\n\t\t\tsourceBits = fn(sourceHandle, &sourcePitch, sx, sy, bbW, bbH);\n\t\t}\n\t\thasSurfaceLock = 1;\n\t}\n\treturn (destBits != 0)\n\t && ((sourceBits != 0)\n || (noSource));\n}\n\n\n/*\tColor map the given source pixel. */\n\nstatic sqInt\nmapPixelflags(sqInt sourcePixel, sqInt mapperFlags)\n{\n    sqInt pv;\n    sqInt val;\n\n\tpv = sourcePixel;\n\tif ((mapperFlags & ColorMapPresent) != 0) {\n\t\tif ((mapperFlags & ColorMapFixedPart) != 0) {\n\t\t\t/* begin rgbMapPixel:flags: */\n\t\t\tval = (((cmShiftTable[0]) < 0) ? ((usqInt) (sourcePixel & (cmMaskTable[0])) >> -(cmShiftTable[0])) : ((usqInt) (sourcePixel & (cmMaskTable[0])) << (cmShiftTable[0])));\n\t\t\tval = val | ((((cmShiftTable[1]) < 0) ? ((usqInt) (sourcePixel & (cmMaskTable[1])) >> -(cmShiftTable[1])) : ((usqInt) (sourcePixel & (cmMaskTable[1])) << (cmShiftTable[1]))));\n\t\t\tval = val | ((((cmShiftTable[2]) < 0) ? ((usqInt) (sourcePixel & (cmMaskTable[2])) >> -(cmShiftTable[2])) : ((usqInt) (sourcePixel & (cmMaskTable[2])) << (cmShiftTable[2]))));\n\t\t\tpv = val | ((((cmShiftTable[3]) < 0) ? ((usqInt) (sourcePixel & (cmMaskTable[3])) >> -(cmShiftTable[3])) : ((usqInt) (sourcePixel & (cmMaskTable[3])) << (cmShiftTable[3]))));\n\t\t\tif ((pv == 0)\n\t\t\t && (sourcePixel != 0)) {\n\t\t\t\tpv = 1;\n\t\t\t}\n\t\t}\n\t\tif ((mapperFlags & ColorMapIndexedPart) != 0) {\n\t\t\tpv = cmLookupTable[pv & cmMask];\n\t\t}\n\t}\n\treturn pv;\n}\n\n\n/*\tSender warpLoop is too big to include this in-line */\n\nstatic sqInt\nmergewith(sqInt sourceWord, sqInt destinationWord)\n{\n    sqInt (*mergeFnwith)(sqInt, sqInt);\n\n\tmergeFnwith = ((sqInt (*)(sqInt, sqInt)) (opTable[combinationRule + 1]));\n\tmergeFnwith;\n\treturn mergeFnwith(sourceWord, destinationWord);\n}\n\n\n/*\tThe module with the given name was just unloaded.\n\tMake sure we have no dangling references. */\n\nEXPORT(sqInt)\nmoduleUnloaded(char *aModuleName)\n{\n\tif ((strcmp(aModuleName, \"SurfacePlugin\")) == 0) {\n\t\tquerySurfaceFn = lockSurfaceFn = unlockSurfaceFn = 0;\n\t}\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\n\n/*\tSubract the pixels in the source and destination, color by color,\n\tand return the sum of the absolute value of all the differences.\n\tFor non-rgb, XOR the two and return the number of differing pixels.\n\tNote that the region is not clipped to bit boundaries, but only to the\n\tnearest (enclosing) word. This is because copyLoop does not do\n\tpre-merge masking. For accurate results, you must subtract the\n\tvalues obtained from the left and right fringes. */\n\nstatic sqInt\nOLDrgbDiffwith(sqInt sourceWord, sqInt destinationWord)\n{\n    sqInt diff;\n    sqInt pixMask;\n\n\tif (destDepth < 16) {\n\n\t\t/* Just xor and count differing bits if not RGB */\n\n\t\tdiff = sourceWord ^ destinationWord;\n\t\tpixMask = maskTable[destDepth];\n\t\twhile (!(diff == 0)) {\n\t\t\tif ((diff & pixMask) != 0) {\n\t\t\t\tbitCount += 1;\n\t\t\t}\n\t\t\tdiff = ((usqInt) diff) >> destDepth;\n\t\t}\n\t\treturn destinationWord;\n\t}\n\tif (destDepth == 16) {\n\t\tdiff = partitionedSubfromnBitsnPartitions(sourceWord, destinationWord, 5, 3);\n\t\tbitCount = ((bitCount + (diff & 31)) + ((((usqInt) diff) >> 5) & 31)) + ((((usqInt) diff) >> 10) & 31);\n\t\tdiff = partitionedSubfromnBitsnPartitions(((usqInt) sourceWord) >> 16, ((usqInt) destinationWord) >> 16, 5, 3);\n\t\tbitCount = ((bitCount + (diff & 31)) + ((((usqInt) diff) >> 5) & 31)) + ((((usqInt) diff) >> 10) & 31);\n\t}\n\telse {\n\t\tdiff = partitionedSubfromnBitsnPartitions(sourceWord, destinationWord, 8, 3);\n\t\tbitCount = ((bitCount + (diff & 255)) + ((((usqInt) diff) >> 8) & 255)) + ((((usqInt) diff) >> 16) & 255);\n\t}\n\treturn destinationWord;\n}\n\n\n/*\tTally pixels into the color map. Note that the source should be \n\tspecified = destination, in order for the proper color map checks \n\tto be performed at setup.\n\tNote that the region is not clipped to bit boundaries, but only to the\n\tnearest (enclosing) word. This is because copyLoop does not do\n\tpre-merge masking. For accurate results, you must subtract the\n\tvalues obtained from the left and right fringes. */\n\nstatic sqInt\nOLDtallyIntoMapwith(sqInt sourceWord, sqInt destinationWord)\n{\n    sqInt d;\n    sqInt d1;\n    sqInt d2;\n    sqInt destPix;\n    sqInt destPix1;\n    sqInt destPix2;\n    sqInt i;\n    sqInt mapIndex;\n    sqInt mask;\n    sqInt mask3;\n    sqInt mask4;\n    sqInt pixMask;\n    sqInt shiftWord;\n    sqInt srcPix;\n    sqInt srcPix1;\n    sqInt srcPix2;\n\n\tif (!((cmFlags & (ColorMapPresent | ColorMapIndexedPart)) == (ColorMapPresent | ColorMapIndexedPart))) {\n\t\treturn destinationWord;\n\t}\n\tif (destDepth < 16) {\n\n\t\t/* loop through all packed pixels. */\n\n\t\tpixMask = (maskTable[destDepth]) & cmMask;\n\t\tshiftWord = destinationWord;\n\t\tfor (i = 1; i <= destPPW; i += 1) {\n\t\t\tmapIndex = shiftWord & pixMask;\n\t\t\tcmLookupTable[mapIndex & cmMask] = ((cmLookupTable[mapIndex & cmMask]) + 1);\n\t\t\tshiftWord = ((usqInt) shiftWord) >> destDepth;\n\t\t}\n\t\treturn destinationWord;\n\t}\n\tif (destDepth == 16) {\n\t\t/* begin rgbMap:from:to: */\n\t\tif (((d = cmBitsPerColor - 5)) > 0) {\n\n\t\t\t/* Expand to more bits by zero-fill */\n\t\t\t/* Transfer mask */\n\n\t\t\tmask = (1 << 5) - 1;\n\t\t\tsrcPix = (destinationWord & 65535) << d;\n\t\t\tmask = mask << d;\n\t\t\tdestPix = srcPix & mask;\n\t\t\tmask = mask << cmBitsPerColor;\n\t\t\tsrcPix = srcPix << d;\n\t\t\tmapIndex = (destPix + (srcPix & mask)) + ((srcPix << d) & (mask << cmBitsPerColor));\n\t\t\tgoto l1;\n\t\t}\n\t\telse {\n\t\t\tif (d == 0) {\n\t\t\t\tif (5 == 5) {\n\t\t\t\t\tmapIndex = (destinationWord & 65535) & 32767;\n\t\t\t\t\tgoto l1;\n\t\t\t\t}\n\t\t\t\tif (5 == 8) {\n\t\t\t\t\tmapIndex = (destinationWord & 65535) & 16777215;\n\t\t\t\t\tgoto l1;\n\t\t\t\t}\n\t\t\t\tmapIndex = destinationWord & 65535;\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t\tif ((destinationWord & 65535) == 0) {\n\t\t\t\tmapIndex = destinationWord & 65535;\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t\td = 5 - cmBitsPerColor;\n\n\t\t\t/* Transfer mask */\n\n\t\t\tmask = (1 << cmBitsPerColor) - 1;\n\t\t\tsrcPix = ((usqInt) (destinationWord & 65535)) >> d;\n\t\t\tdestPix = srcPix & mask;\n\t\t\tmask = mask << cmBitsPerColor;\n\t\t\tsrcPix = ((usqInt) srcPix) >> d;\n\t\t\tdestPix = (destPix + (srcPix & mask)) + ((((usqInt) srcPix) >> d) & (mask << cmBitsPerColor));\n\t\t\tif (destPix == 0) {\n\t\t\t\tmapIndex = 1;\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t\tmapIndex = destPix;\n\t\t\tgoto l1;\n\t\t}\n\tl1:\t/* end rgbMap:from:to: */;\n\t\tcmLookupTable[mapIndex & cmMask] = ((cmLookupTable[mapIndex & cmMask]) + 1);\n\t\t/* begin rgbMap:from:to: */\n\t\tif (((d1 = cmBitsPerColor - 5)) > 0) {\n\n\t\t\t/* Expand to more bits by zero-fill */\n\t\t\t/* Transfer mask */\n\n\t\t\tmask3 = (1 << 5) - 1;\n\t\t\tsrcPix1 = (((usqInt) destinationWord) >> 16) << d1;\n\t\t\tmask3 = mask3 << d1;\n\t\t\tdestPix1 = srcPix1 & mask3;\n\t\t\tmask3 = mask3 << cmBitsPerColor;\n\t\t\tsrcPix1 = srcPix1 << d1;\n\t\t\tmapIndex = (destPix1 + (srcPix1 & mask3)) + ((srcPix1 << d1) & (mask3 << cmBitsPerColor));\n\t\t\tgoto l2;\n\t\t}\n\t\telse {\n\t\t\tif (d1 == 0) {\n\t\t\t\tif (5 == 5) {\n\t\t\t\t\tmapIndex = (((usqInt) destinationWord) >> 16) & 32767;\n\t\t\t\t\tgoto l2;\n\t\t\t\t}\n\t\t\t\tif (5 == 8) {\n\t\t\t\t\tmapIndex = (((usqInt) destinationWord) >> 16) & 16777215;\n\t\t\t\t\tgoto l2;\n\t\t\t\t}\n\t\t\t\tmapIndex = ((usqInt) destinationWord) >> 16;\n\t\t\t\tgoto l2;\n\t\t\t}\n\t\t\tif ((((usqInt) destinationWord) >> 16) == 0) {\n\t\t\t\tmapIndex = ((usqInt) destinationWord) >> 16;\n\t\t\t\tgoto l2;\n\t\t\t}\n\t\t\td1 = 5 - cmBitsPerColor;\n\n\t\t\t/* Transfer mask */\n\n\t\t\tmask3 = (1 << cmBitsPerColor) - 1;\n\t\t\tsrcPix1 = ((usqInt) (((usqInt) destinationWord) >> 16)) >> d1;\n\t\t\tdestPix1 = srcPix1 & mask3;\n\t\t\tmask3 = mask3 << cmBitsPerColor;\n\t\t\tsrcPix1 = ((usqInt) srcPix1) >> d1;\n\t\t\tdestPix1 = (destPix1 + (srcPix1 & mask3)) + ((((usqInt) srcPix1) >> d1) & (mask3 << cmBitsPerColor));\n\t\t\tif (destPix1 == 0) {\n\t\t\t\tmapIndex = 1;\n\t\t\t\tgoto l2;\n\t\t\t}\n\t\t\tmapIndex = destPix1;\n\t\t\tgoto l2;\n\t\t}\n\tl2:\t/* end rgbMap:from:to: */;\n\t\tcmLookupTable[mapIndex & cmMask] = ((cmLookupTable[mapIndex & cmMask]) + 1);\n\t}\n\telse {\n\t\t/* begin rgbMap:from:to: */\n\t\tif (((d2 = cmBitsPerColor - 8)) > 0) {\n\n\t\t\t/* Expand to more bits by zero-fill */\n\t\t\t/* Transfer mask */\n\n\t\t\tmask4 = (1 << 8) - 1;\n\t\t\tsrcPix2 = destinationWord << d2;\n\t\t\tmask4 = mask4 << d2;\n\t\t\tdestPix2 = srcPix2 & mask4;\n\t\t\tmask4 = mask4 << cmBitsPerColor;\n\t\t\tsrcPix2 = srcPix2 << d2;\n\t\t\tmapIndex = (destPix2 + (srcPix2 & mask4)) + ((srcPix2 << d2) & (mask4 << cmBitsPerColor));\n\t\t\tgoto l3;\n\t\t}\n\t\telse {\n\t\t\tif (d2 == 0) {\n\t\t\t\tif (8 == 5) {\n\t\t\t\t\tmapIndex = destinationWord & 32767;\n\t\t\t\t\tgoto l3;\n\t\t\t\t}\n\t\t\t\tif (8 == 8) {\n\t\t\t\t\tmapIndex = destinationWord & 16777215;\n\t\t\t\t\tgoto l3;\n\t\t\t\t}\n\t\t\t\tmapIndex = destinationWord;\n\t\t\t\tgoto l3;\n\t\t\t}\n\t\t\tif (destinationWord == 0) {\n\t\t\t\tmapIndex = destinationWord;\n\t\t\t\tgoto l3;\n\t\t\t}\n\t\t\td2 = 8 - cmBitsPerColor;\n\n\t\t\t/* Transfer mask */\n\n\t\t\tmask4 = (1 << cmBitsPerColor) - 1;\n\t\t\tsrcPix2 = ((usqInt) destinationWord) >> d2;\n\t\t\tdestPix2 = srcPix2 & mask4;\n\t\t\tmask4 = mask4 << cmBitsPerColor;\n\t\t\tsrcPix2 = ((usqInt) srcPix2) >> d2;\n\t\t\tdestPix2 = (destPix2 + (srcPix2 & mask4)) + ((((usqInt) srcPix2) >> d2) & (mask4 << cmBitsPerColor));\n\t\t\tif (destPix2 == 0) {\n\t\t\t\tmapIndex = 1;\n\t\t\t\tgoto l3;\n\t\t\t}\n\t\t\tmapIndex = destPix2;\n\t\t\tgoto l3;\n\t\t}\n\tl3:\t/* end rgbMap:from:to: */;\n\t\tcmLookupTable[mapIndex & cmMask] = ((cmLookupTable[mapIndex & cmMask]) + 1);\n\t}\n\treturn destinationWord;\n}\n\n\n/*\tAdd word1 to word2 as nParts partitions of nBits each.\n\tThis is useful for packed pixels, or packed colors */\n/*\tIn C, most arithmetic operations answer the same bit pattern regardless of\n\tthe operands being signed or unsigned ints\n\t(this is due to the way 2's complement numbers work). However,\n\tcomparisions might fail. Add the proper declaration of\n\twords as unsigned int in those cases where comparisions are done (jmv)\n */\n\nstatic sqInt\npartitionedAddtonBitsnPartitions(unsigned int word1, unsigned int word2, sqInt nBits, sqInt nParts)\n{\n    sqInt i;\n    unsigned int mask;\n    unsigned int maskedWord1;\n    unsigned int result;\n    unsigned int sum;\n\n\n\t/* partition mask starts at the right */\n\n\tmask = maskTable[nBits];\n\tresult = 0;\n\tfor (i = 1; i <= nParts; i += 1) {\n\t\tmaskedWord1 = word1 & mask;\n\t\tsum = maskedWord1 + (word2 & mask);\n\t\tif ((sum <= mask)\n\t\t && (sum >= maskedWord1)) {\n\n\t\t\t/* This is needed because in C, integer arithmetic overflows silently! (jmv) */\n\n\t\t\tresult = result | sum;\n\t\t}\n\t\telse {\n\t\t\tresult = result | mask;\n\t\t}\n\n\t\t/* slide left to next partition */\n\n\t\tmask = mask << nBits;\n\t}\n\treturn result;\n}\n\n\n/*\tAND word1 to word2 as nParts partitions of nBits each.\n\tAny field of word1 not all-ones is treated as all-zeroes.\n\tUsed for erasing, eg, brush shapes prior to ORing in a color */\n\nstatic sqInt\npartitionedANDtonBitsnPartitions(sqInt word1, sqInt word2, sqInt nBits, sqInt nParts)\n{\n    sqInt i;\n    sqInt mask;\n    sqInt result;\n\n\n\t/* partition mask starts at the right */\n\n\tmask = maskTable[nBits];\n\tresult = 0;\n\tfor (i = 1; i <= nParts; i += 1) {\n\t\tif ((word1 & mask) == mask) {\n\t\t\tresult = result | (word2 & mask);\n\t\t}\n\n\t\t/* slide left to next partition */\n\n\t\tmask = mask << nBits;\n\t}\n\treturn result;\n}\n\n\n/*\tMax word1 to word2 as nParts partitions of nBits each */\n/*\tIn C, most arithmetic operations answer the same bit pattern regardless of\n\tthe operands being signed or unsigned ints\n\t(this is due to the way 2's complement numbers work). However,\n\tcomparisions might fail. Add the proper declaration of\n\twords as unsigned int in those cases where comparisions are done (jmv)\n */\n\nstatic sqInt\npartitionedMaxwithnBitsnPartitions(unsigned int word1, unsigned int word2, sqInt nBits, sqInt nParts)\n{\n    sqInt i;\n    unsigned int mask;\n    unsigned int result;\n\n\n\t/* partition mask starts at the right */\n\n\tmask = maskTable[nBits];\n\tresult = 0;\n\tfor (i = 1; i <= nParts; i += 1) {\n\t\tresult = result | ((((word2 & mask) < (word1 & mask)) ? (word1 & mask) : (word2 & mask)));\n\n\t\t/* slide left to next partition */\n\n\t\tmask = mask << nBits;\n\t}\n\treturn result;\n}\n\n\n/*\tMin word1 to word2 as nParts partitions of nBits each */\n/*\tIn C, most arithmetic operations answer the same bit pattern regardless of\n\tthe operands being signed or unsigned ints\n\t(this is due to the way 2's complement numbers work). However,\n\tcomparisions might fail. Add the proper declaration of\n\twords as unsigned int in those cases where comparisions are done (jmv)\n */\n\nstatic sqInt\npartitionedMinwithnBitsnPartitions(unsigned int word1, unsigned int word2, sqInt nBits, sqInt nParts)\n{\n    sqInt i;\n    unsigned int mask;\n    unsigned int result;\n\n\n\t/* partition mask starts at the right */\n\n\tmask = maskTable[nBits];\n\tresult = 0;\n\tfor (i = 1; i <= nParts; i += 1) {\n\t\tresult = result | ((((word2 & mask) < (word1 & mask)) ? (word2 & mask) : (word1 & mask)));\n\n\t\t/* slide left to next partition */\n\n\t\tmask = mask << nBits;\n\t}\n\treturn result;\n}\n\n\n/*\tMultiply word1 with word2 as nParts partitions of nBits each.\n\tThis is useful for packed pixels, or packed colors.\n\tBug in loop version when non-white background */\n/*\tIn C, integer multiplication might answer a wrong value if the unsigned\n\tvalues are declared as signed.\n\tThis problem does not affect this method, because the most significant bit\n\t(i.e. the sign bit) will\n\talways be zero (jmv)\n */\n\nstatic sqInt\npartitionedMulwithnBitsnPartitions(sqInt word1, sqInt word2, sqInt nBits, sqInt nParts)\n{\n    sqInt dMask;\n    sqInt product;\n    sqInt result;\n    sqInt sMask;\n\n\n\t/* partition mask starts at the right */\n\n\tsMask = maskTable[nBits];\n\tdMask = sMask << nBits;\n\n\t/* optimized first step */\n\n\tresult = ((usqInt) (((((word1 & sMask) + 1) * ((word2 & sMask) + 1)) - 1) & dMask)) >> nBits;\n\tif (nParts == 1) {\n\t\treturn result;\n\t}\n\tproduct = (((((((usqInt) word1) >> nBits) & sMask) + 1) * (((((usqInt) word2) >> nBits) & sMask) + 1)) - 1) & dMask;\n\tresult = result | product;\n\tif (nParts == 2) {\n\t\treturn result;\n\t}\n\tproduct = (((((((usqInt) word1) >> (2 * nBits)) & sMask) + 1) * (((((usqInt) word2) >> (2 * nBits)) & sMask) + 1)) - 1) & dMask;\n\tresult = result | (product << nBits);\n\tif (nParts == 3) {\n\t\treturn result;\n\t}\n\tproduct = (((((((usqInt) word1) >> (3 * nBits)) & sMask) + 1) * (((((usqInt) word2) >> (3 * nBits)) & sMask) + 1)) - 1) & dMask;\n\tresult = result | (product << (2 * nBits));\n\treturn result;\n}\n\n\n/*\tSubtract word1 from word2 as nParts partitions of nBits each.\n\tThis is useful for packed pixels, or packed colors */\n/*\tIn C, most arithmetic operations answer the same bit pattern regardless of\n\tthe operands being signed or unsigned ints\n\t(this is due to the way 2's complement numbers work). However,\n\tcomparisions might fail. Add the proper declaration of\n\twords as unsigned int in those cases where comparisions are done (jmv)\n */\n\nstatic sqInt\npartitionedSubfromnBitsnPartitions(unsigned int word1, unsigned int word2, sqInt nBits, sqInt nParts)\n{\n    sqInt i;\n    unsigned int mask;\n    unsigned int p1;\n    unsigned int p2;\n    unsigned int result;\n\n\n\t/* partition mask starts at the right */\n\n\tmask = maskTable[nBits];\n\tresult = 0;\n\tfor (i = 1; i <= nParts; i += 1) {\n\t\tp1 = word1 & mask;\n\t\tp2 = word2 & mask;\n\t\tif (p1 < p2) {\n\n\t\t\t/* result is really abs value of thedifference */\n\n\t\t\tresult = result | (p2 - p1);\n\t\t}\n\t\telse {\n\t\t\tresult = result | (p1 - p2);\n\t\t}\n\n\t\t/* slide left to next partition */\n\n\t\tmask = mask << nBits;\n\t}\n\treturn result;\n}\n\n\n/*\tBased on the values provided during setup choose and\n\tperform the appropriate inner loop function. */\n/*\tShould be inlined into caller for speed */\n\nstatic sqInt\nperformCopyLoop(void)\n{\n    sqInt dWid;\n    sqInt dxLowBits;\n    sqInt endBits;\n    sqInt pixPerM1;\n    sqInt pixPerM11;\n    sqInt startBits;\n    sqInt sxLowBits;\n    sqInt t;\n\n\t/* begin destMaskAndPointerInit */\n\n\t/* A mask, assuming power of two */\n\t/* how many pixels in first word */\n\n\tpixPerM1 = destPPW - 1;\n\tstartBits = destPPW - (dx & pixPerM1);\n\tif (destMSB) {\n\t\tmask1 = ((usqInt) AllOnes) >> (32 - (startBits * destDepth));\n\t}\n\telse {\n\t\tmask1 = AllOnes << (32 - (startBits * destDepth));\n\t}\n\tendBits = (((dx + bbW) - 1) & pixPerM1) + 1;\n\tif (destMSB) {\n\t\tmask2 = AllOnes << (32 - (endBits * destDepth));\n\t}\n\telse {\n\t\tmask2 = ((usqInt) AllOnes) >> (32 - (endBits * destDepth));\n\t}\n\tif (bbW < startBits) {\n\t\tmask1 = mask1 & mask2;\n\t\tmask2 = 0;\n\t\tnWords = 1;\n\t}\n\telse {\n\t\tnWords = (((bbW - startBits) + pixPerM1) / destPPW) + 1;\n\t}\n\n\t/* defaults for no overlap with source */\n\t/* calculate byte addr and delta, based on first word of data */\n\t/* Note pitch is bytes and nWords is longs, not bytes */\n\n\thDir = vDir = 1;\n\tdestIndex = (destBits + (dy * destPitch)) + ((dx / destPPW) * 4);\n\tdestDelta = (destPitch * vDir) - (4 * (nWords * hDir));\n\tif (noSource) {\n\t\tcopyLoopNoSource();\n\t}\n\telse {\n\t\t/* begin checkSourceOverlap */\n\t\tif ((sourceForm == destForm)\n\t\t && (dy >= sy)) {\n\t\t\tif (dy > sy) {\n\n\t\t\t\t/* have to start at bottom */\n\n\t\t\t\tvDir = -1;\n\t\t\t\tsy = (sy + bbH) - 1;\n\t\t\t\tdy = (dy + bbH) - 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif ((dy == sy) && (dx > sx)) {\n\n\t\t\t\t\t/* y's are equal, but x's are backward */\n\n\t\t\t\t\thDir = -1;\n\n\t\t\t\t\t/* start at right */\n\n\t\t\t\t\tsx = (sx + bbW) - 1;\n\n\t\t\t\t\t/* and fix up masks */\n\n\t\t\t\t\tdx = (dx + bbW) - 1;\n\t\t\t\t\tif (nWords > 1) {\n\t\t\t\t\t\tt = mask1;\n\t\t\t\t\t\tmask1 = mask2;\n\t\t\t\t\t\tmask2 = t;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tdestIndex = (destBits + (dy * destPitch)) + ((dx / destPPW) * 4);\n\t\t\tdestDelta = (destPitch * vDir) - (4 * (nWords * hDir));\n\t\t}\n\t\tif ((sourceDepth != destDepth)\n\t\t || ((cmFlags != 0)\n || (sourceMSB != destMSB))) {\n\t\t\tcopyLoopPixMap();\n\t\t}\n\t\telse {\n\t\t\t/* begin sourceSkewAndPointerInit */\n\n\t\t\t/* A mask, assuming power of two */\n\n\t\t\tpixPerM11 = destPPW - 1;\n\t\t\tsxLowBits = sx & pixPerM11;\n\n\t\t\t/* check if need to preload buffer\n\t(i.e., two words of source needed for first word of destination) */\n\n\t\t\tdxLowBits = dx & pixPerM11;\n\t\t\tif (hDir > 0) {\n\n\t\t\t\t/* n Bits stored in 1st word of dest */\n\n\t\t\t\tdWid = ((bbW < (destPPW - dxLowBits)) ? bbW : (destPPW - dxLowBits));\n\t\t\t\tpreload = (sxLowBits + dWid) > pixPerM11;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdWid = ((bbW < (dxLowBits + 1)) ? bbW : (dxLowBits + 1));\n\t\t\t\tpreload = ((sxLowBits - dWid) + 1) < 0;\n\t\t\t}\n\t\t\tif (sourceMSB) {\n\t\t\t\tskew = (sxLowBits - dxLowBits) * destDepth;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tskew = (dxLowBits - sxLowBits) * destDepth;\n\t\t\t}\n\t\t\tif (preload) {\n\t\t\t\tif (skew < 0) {\n\t\t\t\t\tskew += 32;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tskew -= 32;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* calculate increments from end of 1 line to start of next */\n\n\t\t\tsourceIndex = (sourceBits + (sy * sourcePitch)) + ((sx / (32 / sourceDepth)) * 4);\n\t\t\tsourceDelta = (sourcePitch * vDir) - (4 * (nWords * hDir));\n\t\t\tif (preload) {\n\n\t\t\t\t/* Compensate for extra source word fetched */\n\n\t\t\t\tsourceDelta -= 4 * hDir;\n\t\t\t}\n\t\t\tcopyLoop();\n\t\t}\n\t}\n}\n\n\n/*\tPick nPix pixels starting at srcBitIndex from the source, map by the\n\tcolor map, and justify them according to dstBitIndex in the resulting\n\tdestWord. \n */\n\nstatic sqInt\npickSourcePixelsflagssrcMaskdestMasksrcShiftIncdstShiftInc(sqInt nPixels, sqInt mapperFlags, sqInt srcMask, sqInt dstMask, sqInt srcShiftInc, sqInt dstShiftInc)\n{\n    sqInt destPix;\n    sqInt destWord;\n    sqInt dstShift;\n    sqInt idx;\n    sqInt idx1;\n    sqInt nPix;\n    sqInt pv;\n    sqInt sourcePix;\n    sqInt sourceWord;\n    sqInt srcShift;\n    sqInt val;\n\n\n\t/* oh please */\n\n\tsourceWord = long32AtPointer(sourceIndex);\n\tdestWord = 0;\n\n\t/* Hint: Keep in register */\n\n\tsrcShift = srcBitShift;\n\n\t/* Hint: Keep in register */\n\n\tdstShift = dstBitShift;\n\n\t/* always > 0 so we can use do { } while(--nPix); */\n\n\tnPix = nPixels;\n\tif (mapperFlags == (ColorMapPresent | ColorMapIndexedPart)) {\n\t\tdo {\n\n\t\t\t/* a little optimization for (pretty crucial) blits using indexed lookups only */\n\t\t\t/* grab, colormap and mix in pixel */\n\n\t\t\tsourcePix = (((usqInt) sourceWord) >> srcShift) & srcMask;\n\t\t\tdestPix = cmLookupTable[sourcePix & cmMask];\n\n\t\t\t/* adjust dest pix index */\n\n\t\t\tdestWord = destWord | ((destPix & dstMask) << dstShift);\n\n\t\t\t/* adjust source pix index */\n\n\t\t\tdstShift += dstShiftInc;\n\t\t\tif (!((((srcShift += srcShiftInc)) & 4294967264UL) == 0)) {\n\t\t\t\tif (sourceMSB) {\n\t\t\t\t\tsrcShift += 32;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tsrcShift -= 32;\n\t\t\t\t}\n\t\t\t\t/* begin srcLongAt: */\n\t\t\t\tidx = sourceIndex += 4;\n\t\t\t\tsourceWord = long32AtPointer(idx);\n\t\t\t}\n\t\t} while(!(((nPix -= 1)) == 0));\n\t}\n\telse {\n\t\tdo {\n\n\t\t\t/* grab, colormap and mix in pixel */\n\n\t\t\tsourcePix = (((usqInt) sourceWord) >> srcShift) & srcMask;\n\t\t\t/* begin mapPixel:flags: */\n\t\t\tpv = sourcePix;\n\t\t\tif ((mapperFlags & ColorMapPresent) != 0) {\n\t\t\t\tif ((mapperFlags & ColorMapFixedPart) != 0) {\n\t\t\t\t\t/* begin rgbMapPixel:flags: */\n\t\t\t\t\tval = (((cmShiftTable[0]) < 0) ? ((usqInt) (sourcePix & (cmMaskTable[0])) >> -(cmShiftTable[0])) : ((usqInt) (sourcePix & (cmMaskTable[0])) << (cmShiftTable[0])));\n\t\t\t\t\tval = val | ((((cmShiftTable[1]) < 0) ? ((usqInt) (sourcePix & (cmMaskTable[1])) >> -(cmShiftTable[1])) : ((usqInt) (sourcePix & (cmMaskTable[1])) << (cmShiftTable[1]))));\n\t\t\t\t\tval = val | ((((cmShiftTable[2]) < 0) ? ((usqInt) (sourcePix & (cmMaskTable[2])) >> -(cmShiftTable[2])) : ((usqInt) (sourcePix & (cmMaskTable[2])) << (cmShiftTable[2]))));\n\t\t\t\t\tpv = val | ((((cmShiftTable[3]) < 0) ? ((usqInt) (sourcePix & (cmMaskTable[3])) >> -(cmShiftTable[3])) : ((usqInt) (sourcePix & (cmMaskTable[3])) << (cmShiftTable[3]))));\n\t\t\t\t\tif ((pv == 0)\n\t\t\t\t\t && (sourcePix != 0)) {\n\t\t\t\t\t\tpv = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ((mapperFlags & ColorMapIndexedPart) != 0) {\n\t\t\t\t\tpv = cmLookupTable[pv & cmMask];\n\t\t\t\t}\n\t\t\t}\n\t\t\tdestPix = pv;\n\n\t\t\t/* adjust dest pix index */\n\n\t\t\tdestWord = destWord | ((destPix & dstMask) << dstShift);\n\n\t\t\t/* adjust source pix index */\n\n\t\t\tdstShift += dstShiftInc;\n\t\t\tif (!((((srcShift += srcShiftInc)) & 4294967264UL) == 0)) {\n\t\t\t\tif (sourceMSB) {\n\t\t\t\t\tsrcShift += 32;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tsrcShift -= 32;\n\t\t\t\t}\n\t\t\t\t/* begin srcLongAt: */\n\t\t\t\tidx1 = sourceIndex += 4;\n\t\t\t\tsourceWord = long32AtPointer(idx1);\n\t\t\t}\n\t\t} while(!(((nPix -= 1)) == 0));\n\t}\n\n\t/* Store back */\n\n\tsrcBitShift = srcShift;\n\treturn destWord;\n}\n\n\n/*\tPick a single pixel from the source for WarpBlt.\n\tNote: This method is crucial for WarpBlt speed w/o smoothing\n\tand still relatively important when smoothing is used. */\n\nstatic sqInt\npickWarpPixelAtXy(sqInt xx, sqInt yy)\n{\n    sqInt sourcePix;\n    sqInt sourceWord;\n    sqInt srcIndex;\n    sqInt x;\n    sqInt y;\n\n\tif ((xx < 0)\n\t || ((yy < 0)\n || ((((x = ((usqInt) xx) >> BinaryPoint)) >= sourceWidth)\n || (((y = ((usqInt) yy) >> BinaryPoint)) >= sourceHeight)))) {\n\t\treturn 0;\n\t}\n\tsrcIndex = (sourceBits + (y * sourcePitch)) + ((((usqInt) x) >> warpAlignShift) * 4);\n\n\t/* Extract pixel from word */\n\n\tsourceWord = long32AtPointer(srcIndex);\n\tsrcBitShift = warpBitShiftTable[x & warpAlignMask];\n\tsourcePix = (((usqInt) sourceWord) >> srcBitShift) & warpSrcMask;\n\treturn sourcePix;\n}\n\n\n/*\tClear all pixels in destinationWord for which the pixels of sourceWord\n\thave the same values. Used to clear areas of some constant color to zero.\n */\n\nstatic sqInt\npixClearwith(sqInt sourceWord, sqInt destinationWord)\n{\n    sqInt i;\n    sqInt mask;\n    sqInt nBits;\n    sqInt pv;\n    sqInt result;\n\n\tif (destDepth == 32) {\n\t\tif (sourceWord == destinationWord) {\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\treturn destinationWord;\n\t\t}\n\t}\n\tnBits = destDepth;\n\n\t/* partition mask starts at the right */\n\n\tmask = maskTable[nBits];\n\tresult = 0;\n\tfor (i = 1; i <= destPPW; i += 1) {\n\t\tpv = destinationWord & mask;\n\t\tif ((sourceWord & mask) == pv) {\n\t\t\tpv = 0;\n\t\t}\n\t\tresult = result | pv;\n\n\t\t/* slide left to next partition */\n\n\t\tmask = mask << nBits;\n\t}\n\treturn result;\n}\n\nstatic sqInt\npixMaskwith(sqInt sourceWord, sqInt destinationWord)\n{\n    sqInt i;\n    sqInt mask;\n    sqInt result;\n\n\t/* begin partitionedAND:to:nBits:nPartitions: */\n\n\t/* partition mask starts at the right */\n\n\tmask = maskTable[destDepth];\n\tresult = 0;\n\tfor (i = 1; i <= destPPW; i += 1) {\n\t\tif (((~sourceWord) & mask) == mask) {\n\t\t\tresult = result | (destinationWord & mask);\n\t\t}\n\n\t\t/* slide left to next partition */\n\n\t\tmask = mask << destDepth;\n\t}\n\treturn result;\n}\n\nstatic sqInt\npixPaintwith(sqInt sourceWord, sqInt destinationWord)\n{\n\tif (sourceWord == 0) {\n\t\treturn destinationWord;\n\t}\n\treturn sourceWord | (partitionedANDtonBitsnPartitions(~sourceWord, destinationWord, destDepth, destPPW));\n}\n\n\n/*\tSwap the pixels in destWord */\n\nstatic sqInt\npixSwapwith(sqInt sourceWord, sqInt destWord)\n{\n    sqInt highMask;\n    sqInt i;\n    sqInt lowMask;\n    sqInt result;\n    sqInt shift;\n\n\tif (destPPW == 1) {\n\t\treturn destWord;\n\t}\n\tresult = 0;\n\n\t/* mask low pixel */\n\n\tlowMask = (1 << destDepth) - 1;\n\n\t/* mask high pixel */\n\n\thighMask = lowMask << ((destPPW - 1) * destDepth);\n\tshift = 32 - destDepth;\n\tresult = result | (((destWord & lowMask) << shift) | (((usqInt) (destWord & highMask)) >> shift));\n\tif (destPPW <= 2) {\n\t\treturn result;\n\t}\n\tfor (i = 2; i <= (((sqInt) destPPW >> 1)); i += 1) {\n\t\tlowMask = lowMask << destDepth;\n\t\thighMask = ((usqInt) highMask) >> destDepth;\n\t\tshift -= destDepth * 2;\n\t\tresult = result | (((destWord & lowMask) << shift) | (((usqInt) (destWord & highMask)) >> shift));\n\t}\n\treturn result;\n}\n\n\n/*\tInvoke the copyBits primitive. If the destination is the display, then\n\tcopy it to the screen.\n */\n\nEXPORT(sqInt)\nprimitiveCopyBits(void)\n{\n    sqInt rcvr;\n\n\trcvr = interpreterProxy->stackValue(interpreterProxy->methodArgumentCount());\n\tif (!(loadBitBltFromwarping(rcvr, 0))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tcopyBits();\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin showDisplayBits */\n\tinterpreterProxy->showDisplayBitsLeftTopRightBottom(destForm, affectedL, affectedT, affectedR, affectedB);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(interpreterProxy->methodArgumentCount());\n\tif ((combinationRule == 22) || (combinationRule == 32)) {\n\t\tinterpreterProxy->pop(1);\n\t\treturn interpreterProxy->pushInteger(bitCount);\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveDisplayString(void)\n{\n    sqInt ascii;\n    sqInt bbObj;\n    sqInt charIndex;\n    sqInt endBits;\n    sqInt glyphIndex;\n    sqInt glyphMap;\n    sqInt kernDelta;\n    sqInt left;\n    sqInt maxGlyph;\n    sqInt pixPerM1;\n    sqInt quickBlt;\n    char *sourcePtr;\n    sqInt sourceString;\n    sqInt startBits;\n    sqInt startIndex;\n    sqInt stopIndex;\n    sqInt xTable;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 6)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tkernDelta = interpreterProxy->stackIntegerValue(0);\n\txTable = interpreterProxy->stackObjectValue(1);\n\tglyphMap = interpreterProxy->stackObjectValue(2);\n\tif (!(((interpreterProxy->fetchClassOf(xTable)) == (interpreterProxy->classArray()))\n\t\t && ((interpreterProxy->fetchClassOf(glyphMap)) == (interpreterProxy->classArray())))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!((interpreterProxy->slotSizeOf(glyphMap)) == 256)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tmaxGlyph = (interpreterProxy->slotSizeOf(xTable)) - 2;\n\tstopIndex = interpreterProxy->stackIntegerValue(3);\n\tstartIndex = interpreterProxy->stackIntegerValue(4);\n\tsourceString = interpreterProxy->stackObjectValue(5);\n\tif (!(interpreterProxy->isBytes(sourceString))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!((startIndex > 0)\n\t\t && ((stopIndex > 0)\n && (stopIndex <= (interpreterProxy->byteSizeOf(sourceString)))))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tbbObj = interpreterProxy->stackObjectValue(6);\n\tif (!(loadBitBltFromwarping(bbObj, 0))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif ((combinationRule == 30)\n\t || (combinationRule == 31)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tquickBlt = (destBits != 0)\n\t && ((sourceBits != 0)\n && ((noSource == 0)\n && ((sourceForm != destForm)\n && ((cmFlags != 0)\n || ((sourceMSB != destMSB)\n || (sourceDepth != destDepth))))));\n\tleft = destX;\n\tsourcePtr = interpreterProxy->firstIndexableField(sourceString);\n\tfor (charIndex = startIndex; charIndex <= stopIndex; charIndex += 1) {\n\t\tascii = byteAtPointer((sourcePtr + charIndex) - 1);\n\t\tglyphIndex = interpreterProxy->fetchIntegerofObject(ascii, glyphMap);\n\t\tif ((glyphIndex < 0)\n\t\t || (glyphIndex > maxGlyph)) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t\tsourceX = interpreterProxy->fetchIntegerofObject(glyphIndex, xTable);\n\t\twidth = (interpreterProxy->fetchIntegerofObject(glyphIndex + 1, xTable)) - sourceX;\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tclipRange();\n\t\tif ((bbW > 0)\n\t\t && (bbH > 0)) {\n\t\t\tif (quickBlt) {\n\t\t\t\t/* begin destMaskAndPointerInit */\n\n\t\t\t\t/* A mask, assuming power of two */\n\t\t\t\t/* how many pixels in first word */\n\n\t\t\t\tpixPerM1 = destPPW - 1;\n\t\t\t\tstartBits = destPPW - (dx & pixPerM1);\n\t\t\t\tif (destMSB) {\n\t\t\t\t\tmask1 = ((usqInt) AllOnes) >> (32 - (startBits * destDepth));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmask1 = AllOnes << (32 - (startBits * destDepth));\n\t\t\t\t}\n\t\t\t\tendBits = (((dx + bbW) - 1) & pixPerM1) + 1;\n\t\t\t\tif (destMSB) {\n\t\t\t\t\tmask2 = AllOnes << (32 - (endBits * destDepth));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmask2 = ((usqInt) AllOnes) >> (32 - (endBits * destDepth));\n\t\t\t\t}\n\t\t\t\tif (bbW < startBits) {\n\t\t\t\t\tmask1 = mask1 & mask2;\n\t\t\t\t\tmask2 = 0;\n\t\t\t\t\tnWords = 1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tnWords = (((bbW - startBits) + pixPerM1) / destPPW) + 1;\n\t\t\t\t}\n\n\t\t\t\t/* defaults for no overlap with source */\n\t\t\t\t/* calculate byte addr and delta, based on first word of data */\n\t\t\t\t/* Note pitch is bytes and nWords is longs, not bytes */\n\n\t\t\t\thDir = vDir = 1;\n\t\t\t\tdestIndex = (destBits + (dy * destPitch)) + ((dx / destPPW) * 4);\n\t\t\t\tdestDelta = (destPitch * vDir) - (4 * (nWords * hDir));\n\t\t\t\tcopyLoopPixMap();\n\t\t\t\taffectedL = dx;\n\t\t\t\taffectedR = dx + bbW;\n\t\t\t\taffectedT = dy;\n\t\t\t\taffectedB = dy + bbH;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcopyBits();\n\t\t\t}\n\t\t}\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tdestX = (destX + width) + kernDelta;\n\t}\n\taffectedL = left;\n\t/* begin showDisplayBits */\n\tinterpreterProxy->showDisplayBitsLeftTopRightBottom(destForm, affectedL, affectedT, affectedR, affectedB);\n\tinterpreterProxy->pop(6);\n}\n\n\n/*\tInvoke the line drawing primitive. */\n\nEXPORT(sqInt)\nprimitiveDrawLoop(void)\n{\n    sqInt affB;\n    sqInt affL;\n    sqInt affR;\n    sqInt affT;\n    sqInt dx1;\n    sqInt dy1;\n    sqInt i;\n    sqInt P;\n    sqInt px;\n    sqInt py;\n    sqInt rcvr;\n    sqInt xDelta;\n    sqInt yDelta;\n\n\trcvr = interpreterProxy->stackValue(2);\n\txDelta = interpreterProxy->stackIntegerValue(1);\n\tyDelta = interpreterProxy->stackIntegerValue(0);\n\tif (!(loadBitBltFromwarping(rcvr, 0))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\t/* begin drawLoopX:Y: */\n\t\tif (xDelta > 0) {\n\t\t\tdx1 = 1;\n\t\t}\n\t\telse {\n\t\t\tif (xDelta == 0) {\n\t\t\t\tdx1 = 0;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdx1 = -1;\n\t\t\t}\n\t\t}\n\t\tif (yDelta > 0) {\n\t\t\tdy1 = 1;\n\t\t}\n\t\telse {\n\t\t\tif (yDelta == 0) {\n\t\t\t\tdy1 = 0;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdy1 = -1;\n\t\t\t}\n\t\t}\n\t\tpx = abs(yDelta);\n\t\tpy = abs(xDelta);\n\n\t\t/* init null rectangle */\n\n\t\taffL = affT = 9999;\n\t\taffR = affB = -9999;\n\t\tif (py > px) {\n\n\t\t\t/* more horizontal */\n\n\t\t\tP = ((sqInt) py >> 1);\n\t\t\tfor (i = 1; i <= py; i += 1) {\n\t\t\t\tdestX += dx1;\n\t\t\t\tif (((P -= px)) < 0) {\n\t\t\t\t\tdestY += dy1;\n\t\t\t\t\tP += py;\n\t\t\t\t}\n\t\t\t\tif (i < py) {\n\t\t\t\t\tcopyBits();\n\t\t\t\t\tif (interpreterProxy->failed()) {\n\t\t\t\t\t\tgoto l1;\n\t\t\t\t\t}\n\t\t\t\t\tif ((affectedL < affectedR)\n\t\t\t\t\t && (affectedT < affectedB)) {\n\n\t\t\t\t\t\t/* Affected rectangle grows along the line */\n\n\t\t\t\t\t\taffL = ((affL < affectedL) ? affL : affectedL);\n\t\t\t\t\t\taffR = ((affR < affectedR) ? affectedR : affR);\n\t\t\t\t\t\taffT = ((affT < affectedT) ? affT : affectedT);\n\t\t\t\t\t\taffB = ((affB < affectedB) ? affectedB : affB);\n\t\t\t\t\t\tif (((affR - affL) * (affB - affT)) > 4000) {\n\n\t\t\t\t\t\t\t/* If affected rectangle gets large, update it in chunks */\n\n\t\t\t\t\t\t\taffectedL = affL;\n\t\t\t\t\t\t\taffectedR = affR;\n\t\t\t\t\t\t\taffectedT = affT;\n\t\t\t\t\t\t\taffectedB = affB;\n\t\t\t\t\t\t\t/* begin showDisplayBits */\n\t\t\t\t\t\t\tinterpreterProxy->showDisplayBitsLeftTopRightBottom(destForm, affectedL, affectedT, affectedR, affectedB);\n\n\t\t\t\t\t\t\t/* init null rectangle */\n\n\t\t\t\t\t\t\taffL = affT = 9999;\n\t\t\t\t\t\t\taffR = affB = -9999;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\n\t\t\t/* more vertical */\n\n\t\t\tP = ((sqInt) px >> 1);\n\t\t\tfor (i = 1; i <= px; i += 1) {\n\t\t\t\tdestY += dy1;\n\t\t\t\tif (((P -= py)) < 0) {\n\t\t\t\t\tdestX += dx1;\n\t\t\t\t\tP += px;\n\t\t\t\t}\n\t\t\t\tif (i < px) {\n\t\t\t\t\tcopyBits();\n\t\t\t\t\tif (interpreterProxy->failed()) {\n\t\t\t\t\t\tgoto l1;\n\t\t\t\t\t}\n\t\t\t\t\tif ((affectedL < affectedR)\n\t\t\t\t\t && (affectedT < affectedB)) {\n\n\t\t\t\t\t\t/* Affected rectangle grows along the line */\n\n\t\t\t\t\t\taffL = ((affL < affectedL) ? affL : affectedL);\n\t\t\t\t\t\taffR = ((affR < affectedR) ? affectedR : affR);\n\t\t\t\t\t\taffT = ((affT < affectedT) ? affT : affectedT);\n\t\t\t\t\t\taffB = ((affB < affectedB) ? affectedB : affB);\n\t\t\t\t\t\tif (((affR - affL) * (affB - affT)) > 4000) {\n\n\t\t\t\t\t\t\t/* If affected rectangle gets large, update it in chunks */\n\n\t\t\t\t\t\t\taffectedL = affL;\n\t\t\t\t\t\t\taffectedR = affR;\n\t\t\t\t\t\t\taffectedT = affT;\n\t\t\t\t\t\t\taffectedB = affB;\n\t\t\t\t\t\t\t/* begin showDisplayBits */\n\t\t\t\t\t\t\tinterpreterProxy->showDisplayBitsLeftTopRightBottom(destForm, affectedL, affectedT, affectedR, affectedB);\n\n\t\t\t\t\t\t\t/* init null rectangle */\n\n\t\t\t\t\t\t\taffL = affT = 9999;\n\t\t\t\t\t\t\taffR = affB = -9999;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\taffectedL = affL;\n\t\taffectedR = affR;\n\t\taffectedT = affT;\n\n\t\t/* store destX, Y back */\n\n\t\taffectedB = affB;\n\t\tinterpreterProxy->storeIntegerofObjectwithValue(BBDestXIndex, bitBltOop, destX);\n\t\tinterpreterProxy->storeIntegerofObjectwithValue(BBDestYIndex, bitBltOop, destY);\n\tl1:\t/* end drawLoopX:Y: */;\n\t\t/* begin showDisplayBits */\n\t\tinterpreterProxy->showDisplayBitsLeftTopRightBottom(destForm, affectedL, affectedT, affectedR, affectedB);\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->pop(2);\n\t}\n}\n\n\n/*\tInvoke the warpBits primitive. If the destination is the display, then\n\tcopy it to the screen.\n */\n\nEXPORT(sqInt)\nprimitiveWarpBits(void)\n{\n    sqInt endBits;\n    sqInt ns;\n    sqInt pixPerM1;\n    sqInt rcvr;\n    sqInt startBits;\n\n\trcvr = interpreterProxy->stackValue(interpreterProxy->methodArgumentCount());\n\tif (!(loadBitBltFromwarping(rcvr, 1))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\t/* begin warpBits */\n\tns = noSource;\n\tnoSource = 1;\n\tclipRange();\n\tnoSource = ns;\n\tif (noSource\n\t || ((bbW <= 0)\n || (bbH <= 0))) {\n\n\t\t/* zero width or height; noop */\n\n\t\taffectedL = affectedR = affectedT = affectedB = 0;\n\t\tgoto l1;\n\t}\n\tif (!(lockSurfaces())) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tgoto l1;\n\t}\n\t/* begin destMaskAndPointerInit */\n\n\t/* A mask, assuming power of two */\n\t/* how many pixels in first word */\n\n\tpixPerM1 = destPPW - 1;\n\tstartBits = destPPW - (dx & pixPerM1);\n\tif (destMSB) {\n\t\tmask1 = ((usqInt) AllOnes) >> (32 - (startBits * destDepth));\n\t}\n\telse {\n\t\tmask1 = AllOnes << (32 - (startBits * destDepth));\n\t}\n\tendBits = (((dx + bbW) - 1) & pixPerM1) + 1;\n\tif (destMSB) {\n\t\tmask2 = AllOnes << (32 - (endBits * destDepth));\n\t}\n\telse {\n\t\tmask2 = ((usqInt) AllOnes) >> (32 - (endBits * destDepth));\n\t}\n\tif (bbW < startBits) {\n\t\tmask1 = mask1 & mask2;\n\t\tmask2 = 0;\n\t\tnWords = 1;\n\t}\n\telse {\n\t\tnWords = (((bbW - startBits) + pixPerM1) / destPPW) + 1;\n\t}\n\n\t/* defaults for no overlap with source */\n\t/* calculate byte addr and delta, based on first word of data */\n\t/* Note pitch is bytes and nWords is longs, not bytes */\n\n\thDir = vDir = 1;\n\tdestIndex = (destBits + (dy * destPitch)) + ((dx / destPPW) * 4);\n\tdestDelta = (destPitch * vDir) - (4 * (nWords * hDir));\n\twarpLoop();\n\tif (hDir > 0) {\n\t\taffectedL = dx;\n\t\taffectedR = dx + bbW;\n\t}\n\telse {\n\t\taffectedL = (dx - bbW) + 1;\n\t\taffectedR = dx + 1;\n\t}\n\tif (vDir > 0) {\n\t\taffectedT = dy;\n\t\taffectedB = dy + bbH;\n\t}\n\telse {\n\t\taffectedT = (dy - bbH) + 1;\n\t\taffectedB = dy + 1;\n\t}\n\tunlockSurfaces();\nl1:\t/* end warpBits */;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin showDisplayBits */\n\tinterpreterProxy->showDisplayBitsLeftTopRightBottom(destForm, affectedL, affectedT, affectedR, affectedB);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(interpreterProxy->methodArgumentCount());\n}\n\n\n/*\tQuery the dimension of an OS surface.\n\tThis method is provided so that in case the inst vars of the\n\tsource form are broken, *actual* values of the OS surface\n\tcan be obtained. This might, for instance, happen if the user\n\tresizes the main window.\n\tNote: Moved to a separate function for better inlining of the caller. */\n\nstatic sqInt\nqueryDestSurface(sqInt handle)\n{\n\tif (querySurfaceFn == 0) {\n\t\tif (!(loadSurfacePlugin())) {\n\t\t\treturn 0;\n\t\t}\n\t}\n\treturn  ((sqInt (*) (sqInt, sqInt*, sqInt*, sqInt*, sqInt*))querySurfaceFn)\n\t\t(handle, &destWidth, &destHeight, &destDepth, &destMSB);\n}\n\n\n/*\tQuery the dimension of an OS surface.\n\tThis method is provided so that in case the inst vars of the\n\tsource form are broken, *actual* values of the OS surface\n\tcan be obtained. This might, for instance, happen if the user\n\tresizes the main window.\n\tNote: Moved to a separate function for better inlining of the caller. */\n\nstatic sqInt\nquerySourceSurface(sqInt handle)\n{\n\tif (querySurfaceFn == 0) {\n\t\tif (!(loadSurfacePlugin())) {\n\t\t\treturn 0;\n\t\t}\n\t}\n\treturn  ((sqInt (*) (sqInt, sqInt*, sqInt*, sqInt*, sqInt*))querySurfaceFn)\n\t\t(handle, &sourceWidth, &sourceHeight, &sourceDepth, &sourceMSB);\n}\n\nstatic sqInt\nrgbAddwith(sqInt sourceWord, sqInt destinationWord)\n{\n\tif (destDepth < 16) {\n\t\treturn partitionedAddtonBitsnPartitions(sourceWord, destinationWord, destDepth, destPPW);\n\t}\n\tif (destDepth == 16) {\n\t\treturn (partitionedAddtonBitsnPartitions(sourceWord, destinationWord, 5, 3)) + ((partitionedAddtonBitsnPartitions(((usqInt) sourceWord) >> 16, ((usqInt) destinationWord) >> 16, 5, 3)) << 16);\n\t}\n\telse {\n\t\treturn partitionedAddtonBitsnPartitions(sourceWord, destinationWord, 8, 4);\n\t}\n}\n\n\n/*\tSubract the pixels in the source and destination, color by color,\n\tand return the sum of the absolute value of all the differences.\n\tFor non-rgb, return the number of differing pixels. */\n\nstatic sqInt\nrgbDiffwith(sqInt sourceWord, sqInt destinationWord)\n{\n    sqInt bitsPerColor;\n    sqInt destPixVal;\n    sqInt destShifted;\n    sqInt diff;\n    sqInt i;\n    sqInt maskShifted;\n    sqInt pixMask;\n    sqInt rgbMask;\n    sqInt sourcePixVal;\n    sqInt sourceShifted;\n\n\tpixMask = maskTable[destDepth];\n\tif (destDepth == 16) {\n\t\tbitsPerColor = 5;\n\t\trgbMask = 31;\n\t}\n\telse {\n\t\tbitsPerColor = 8;\n\t\trgbMask = 255;\n\t}\n\tmaskShifted = destMask;\n\tdestShifted = destinationWord;\n\tsourceShifted = sourceWord;\n\tfor (i = 1; i <= destPPW; i += 1) {\n\t\tif ((maskShifted & pixMask) > 0) {\n\n\t\t\t/* Only tally pixels within the destination rectangle */\n\n\t\t\tdestPixVal = destShifted & pixMask;\n\t\t\tsourcePixVal = sourceShifted & pixMask;\n\t\t\tif (destDepth < 16) {\n\t\t\t\tif (sourcePixVal == destPixVal) {\n\t\t\t\t\tdiff = 0;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdiff = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdiff = partitionedSubfromnBitsnPartitions(sourcePixVal, destPixVal, bitsPerColor, 3);\n\t\t\t\tdiff = ((diff & rgbMask) + ((((usqInt) diff) >> bitsPerColor) & rgbMask)) + ((((usqInt) (((usqInt) diff) >> bitsPerColor)) >> bitsPerColor) & rgbMask);\n\t\t\t}\n\t\t\tbitCount += diff;\n\t\t}\n\t\tmaskShifted = ((usqInt) maskShifted) >> destDepth;\n\t\tsourceShifted = ((usqInt) sourceShifted) >> destDepth;\n\t\tdestShifted = ((usqInt) destShifted) >> destDepth;\n\t}\n\treturn destinationWord;\n}\n\n\n/*\tConvert the given 16bit pixel value to a 32bit RGBA value.\n\tNote: This method is intended to deal with different source formats. */\n\nstatic sqInt\nrgbMap16To32(sqInt sourcePixel)\n{\n\treturn (((sourcePixel & 31) << 3) | ((sourcePixel & 992) << 6)) | ((sourcePixel & 31744) << 9);\n}\n\n\n/*\tConvert the given 32bit pixel value to a 32bit RGBA value.\n\tNote: This method is intended to deal with different source formats. */\n\nstatic sqInt\nrgbMap32To32(sqInt sourcePixel)\n{\n\treturn sourcePixel;\n}\n\n\n/*\tPerform the RGBA conversion for the given source pixel */\n\nstatic sqInt\nrgbMapPixelflags(sqInt sourcePixel, sqInt mapperFlags)\n{\n    sqInt val;\n\n\tval = (((cmShiftTable[0]) < 0) ? ((usqInt) (sourcePixel & (cmMaskTable[0])) >> -(cmShiftTable[0])) : ((usqInt) (sourcePixel & (cmMaskTable[0])) << (cmShiftTable[0])));\n\tval = val | ((((cmShiftTable[1]) < 0) ? ((usqInt) (sourcePixel & (cmMaskTable[1])) >> -(cmShiftTable[1])) : ((usqInt) (sourcePixel & (cmMaskTable[1])) << (cmShiftTable[1]))));\n\tval = val | ((((cmShiftTable[2]) < 0) ? ((usqInt) (sourcePixel & (cmMaskTable[2])) >> -(cmShiftTable[2])) : ((usqInt) (sourcePixel & (cmMaskTable[2])) << (cmShiftTable[2]))));\n\treturn val | ((((cmShiftTable[3]) < 0) ? ((usqInt) (sourcePixel & (cmMaskTable[3])) >> -(cmShiftTable[3])) : ((usqInt) (sourcePixel & (cmMaskTable[3])) << (cmShiftTable[3]))));\n}\n\n\n/*\tConvert the given pixel value with nBitsIn bits for each color component\n\tto a pixel value with nBitsOut bits for each color component. Typical\n\tvalues for nBitsIn/nBitsOut are 3, 5, or 8.\n */\n\nstatic sqInt\nrgbMapfromto(sqInt sourcePixel, sqInt nBitsIn, sqInt nBitsOut)\n{\n    sqInt d;\n    sqInt destPix;\n    sqInt mask;\n    sqInt srcPix;\n\n\tif (((d = nBitsOut - nBitsIn)) > 0) {\n\n\t\t/* Expand to more bits by zero-fill */\n\t\t/* Transfer mask */\n\n\t\tmask = (1 << nBitsIn) - 1;\n\t\tsrcPix = sourcePixel << d;\n\t\tmask = mask << d;\n\t\tdestPix = srcPix & mask;\n\t\tmask = mask << nBitsOut;\n\t\tsrcPix = srcPix << d;\n\t\treturn (destPix + (srcPix & mask)) + ((srcPix << d) & (mask << nBitsOut));\n\t}\n\telse {\n\t\tif (d == 0) {\n\t\t\tif (nBitsIn == 5) {\n\t\t\t\treturn sourcePixel & 32767;\n\t\t\t}\n\t\t\tif (nBitsIn == 8) {\n\t\t\t\treturn sourcePixel & 16777215;\n\t\t\t}\n\t\t\treturn sourcePixel;\n\t\t}\n\t\tif (sourcePixel == 0) {\n\t\t\treturn sourcePixel;\n\t\t}\n\t\td = nBitsIn - nBitsOut;\n\n\t\t/* Transfer mask */\n\n\t\tmask = (1 << nBitsOut) - 1;\n\t\tsrcPix = ((usqInt) sourcePixel) >> d;\n\t\tdestPix = srcPix & mask;\n\t\tmask = mask << nBitsOut;\n\t\tsrcPix = ((usqInt) srcPix) >> d;\n\t\tdestPix = (destPix + (srcPix & mask)) + ((((usqInt) srcPix) >> d) & (mask << nBitsOut));\n\t\tif (destPix == 0) {\n\t\t\treturn 1;\n\t\t}\n\t\treturn destPix;\n\t}\n}\n\nstatic sqInt\nrgbMaxwith(sqInt sourceWord, sqInt destinationWord)\n{\n    sqInt i;\n    sqInt i1;\n    unsigned int mask;\n    unsigned int mask3;\n    unsigned int result;\n    unsigned int result1;\n\n\tif (destDepth < 16) {\n\t\t/* begin partitionedMax:with:nBits:nPartitions: */\n\n\t\t/* partition mask starts at the right */\n\n\t\tmask = maskTable[destDepth];\n\t\tresult = 0;\n\t\tfor (i = 1; i <= destPPW; i += 1) {\n\t\t\tresult = result | ((((destinationWord & mask) < (sourceWord & mask)) ? (sourceWord & mask) : (destinationWord & mask)));\n\n\t\t\t/* slide left to next partition */\n\n\t\t\tmask = mask << destDepth;\n\t\t}\n\t\treturn result;\n\t}\n\tif (destDepth == 16) {\n\t\treturn (partitionedMaxwithnBitsnPartitions(sourceWord, destinationWord, 5, 3)) + ((partitionedMaxwithnBitsnPartitions(((usqInt) sourceWord) >> 16, ((usqInt) destinationWord) >> 16, 5, 3)) << 16);\n\t}\n\telse {\n\t\t/* begin partitionedMax:with:nBits:nPartitions: */\n\n\t\t/* partition mask starts at the right */\n\n\t\tmask3 = maskTable[8];\n\t\tresult1 = 0;\n\t\tfor (i1 = 1; i1 <= 4; i1 += 1) {\n\t\t\tresult1 = result1 | ((((destinationWord & mask3) < (sourceWord & mask3)) ? (sourceWord & mask3) : (destinationWord & mask3)));\n\n\t\t\t/* slide left to next partition */\n\n\t\t\tmask3 = mask3 << 8;\n\t\t}\n\t\treturn result1;\n\t}\n}\n\nstatic sqInt\nrgbMinInvertwith(sqInt wordToInvert, sqInt destinationWord)\n{\n    sqInt i;\n    sqInt i1;\n    unsigned int mask;\n    unsigned int mask3;\n    unsigned int result;\n    unsigned int result1;\n    sqInt sourceWord;\n\n\tsourceWord = ~wordToInvert;\n\tif (destDepth < 16) {\n\t\t/* begin partitionedMin:with:nBits:nPartitions: */\n\n\t\t/* partition mask starts at the right */\n\n\t\tmask = maskTable[destDepth];\n\t\tresult = 0;\n\t\tfor (i = 1; i <= destPPW; i += 1) {\n\t\t\tresult = result | ((((destinationWord & mask) < (sourceWord & mask)) ? (destinationWord & mask) : (sourceWord & mask)));\n\n\t\t\t/* slide left to next partition */\n\n\t\t\tmask = mask << destDepth;\n\t\t}\n\t\treturn result;\n\t}\n\tif (destDepth == 16) {\n\t\treturn (partitionedMinwithnBitsnPartitions(sourceWord, destinationWord, 5, 3)) + ((partitionedMinwithnBitsnPartitions(((usqInt) sourceWord) >> 16, ((usqInt) destinationWord) >> 16, 5, 3)) << 16);\n\t}\n\telse {\n\t\t/* begin partitionedMin:with:nBits:nPartitions: */\n\n\t\t/* partition mask starts at the right */\n\n\t\tmask3 = maskTable[8];\n\t\tresult1 = 0;\n\t\tfor (i1 = 1; i1 <= 4; i1 += 1) {\n\t\t\tresult1 = result1 | ((((destinationWord & mask3) < (sourceWord & mask3)) ? (destinationWord & mask3) : (sourceWord & mask3)));\n\n\t\t\t/* slide left to next partition */\n\n\t\t\tmask3 = mask3 << 8;\n\t\t}\n\t\treturn result1;\n\t}\n}\n\nstatic sqInt\nrgbMinwith(sqInt sourceWord, sqInt destinationWord)\n{\n    sqInt i;\n    sqInt i1;\n    unsigned int mask;\n    unsigned int mask3;\n    unsigned int result;\n    unsigned int result1;\n\n\tif (destDepth < 16) {\n\t\t/* begin partitionedMin:with:nBits:nPartitions: */\n\n\t\t/* partition mask starts at the right */\n\n\t\tmask = maskTable[destDepth];\n\t\tresult = 0;\n\t\tfor (i = 1; i <= destPPW; i += 1) {\n\t\t\tresult = result | ((((destinationWord & mask) < (sourceWord & mask)) ? (destinationWord & mask) : (sourceWord & mask)));\n\n\t\t\t/* slide left to next partition */\n\n\t\t\tmask = mask << destDepth;\n\t\t}\n\t\treturn result;\n\t}\n\tif (destDepth == 16) {\n\t\treturn (partitionedMinwithnBitsnPartitions(sourceWord, destinationWord, 5, 3)) + ((partitionedMinwithnBitsnPartitions(((usqInt) sourceWord) >> 16, ((usqInt) destinationWord) >> 16, 5, 3)) << 16);\n\t}\n\telse {\n\t\t/* begin partitionedMin:with:nBits:nPartitions: */\n\n\t\t/* partition mask starts at the right */\n\n\t\tmask3 = maskTable[8];\n\t\tresult1 = 0;\n\t\tfor (i1 = 1; i1 <= 4; i1 += 1) {\n\t\t\tresult1 = result1 | ((((destinationWord & mask3) < (sourceWord & mask3)) ? (destinationWord & mask3) : (sourceWord & mask3)));\n\n\t\t\t/* slide left to next partition */\n\n\t\t\tmask3 = mask3 << 8;\n\t\t}\n\t\treturn result1;\n\t}\n}\n\nstatic sqInt\nrgbMulwith(sqInt sourceWord, sqInt destinationWord)\n{\n\tif (destDepth < 16) {\n\t\treturn partitionedMulwithnBitsnPartitions(sourceWord, destinationWord, destDepth, destPPW);\n\t}\n\tif (destDepth == 16) {\n\t\treturn (partitionedMulwithnBitsnPartitions(sourceWord, destinationWord, 5, 3)) + ((partitionedMulwithnBitsnPartitions(((usqInt) sourceWord) >> 16, ((usqInt) destinationWord) >> 16, 5, 3)) << 16);\n\t}\n\telse {\n\t\treturn partitionedMulwithnBitsnPartitions(sourceWord, destinationWord, 8, 4);\n\t}\n}\n\nstatic sqInt\nrgbSubwith(sqInt sourceWord, sqInt destinationWord)\n{\n\tif (destDepth < 16) {\n\t\treturn partitionedSubfromnBitsnPartitions(sourceWord, destinationWord, destDepth, destPPW);\n\t}\n\tif (destDepth == 16) {\n\t\treturn (partitionedSubfromnBitsnPartitions(sourceWord, destinationWord, 5, 3)) + ((partitionedSubfromnBitsnPartitions(((usqInt) sourceWord) >> 16, ((usqInt) destinationWord) >> 16, 5, 3)) << 16);\n\t}\n\telse {\n\t\treturn partitionedSubfromnBitsnPartitions(sourceWord, destinationWord, 8, 4);\n\t}\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n    sqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\n/*\tWARNING: For WarpBlt w/ smoothing the source depth is wrong here! */\n\nstatic sqInt\nsetupColorMasks(void)\n{\n    sqInt bits;\n    sqInt targetBits;\n\n\tbits = targetBits = 0;\n\tif (sourceDepth <= 8) {\n\t\treturn null;\n\t}\n\tif (sourceDepth == 16) {\n\t\tbits = 5;\n\t}\n\tif (sourceDepth == 32) {\n\t\tbits = 8;\n\t}\n\tif (cmBitsPerColor == 0) {\n\t\tif (destDepth <= 8) {\n\t\t\treturn null;\n\t\t}\n\t\tif (destDepth == 16) {\n\t\t\ttargetBits = 5;\n\t\t}\n\t\tif (destDepth == 32) {\n\t\t\ttargetBits = 8;\n\t\t}\n\t}\n\telse {\n\t\ttargetBits = cmBitsPerColor;\n\t}\n\tsetupColorMasksFromto(bits, targetBits);\n}\n\n\n/*\tSetup color masks for converting an incoming RGB pixel value from srcBits\n\tto targetBits.\n */\n\nstatic sqInt\nsetupColorMasksFromto(sqInt srcBits, sqInt targetBits)\n{\n    sqInt deltaBits;\n    sqInt mask;\n    static unsigned int masks[4] = {0, 0, 0, 0};\n    static int shifts[4] = {0, 0, 0, 0};\n\n\t;\n\tdeltaBits = targetBits - srcBits;\n\tif (deltaBits == 0) {\n\t\treturn 0;\n\t}\n\tif (deltaBits <= 0) {\n\n\t\t/* Mask for extracting a color part of the source */\n\n\t\tmask = (1 << targetBits) - 1;\n\t\tmasks[RedIndex] = (mask << ((srcBits * 2) - deltaBits));\n\t\tmasks[GreenIndex] = (mask << (srcBits - deltaBits));\n\t\tmasks[BlueIndex] = (mask << (0 - deltaBits));\n\t\tmasks[AlphaIndex] = 0;\n\t}\n\telse {\n\n\t\t/* Mask for extracting a color part of the source */\n\n\t\tmask = (1 << srcBits) - 1;\n\t\tmasks[RedIndex] = (mask << (srcBits * 2));\n\t\tmasks[GreenIndex] = (mask << srcBits);\n\t\tmasks[BlueIndex] = mask;\n\t}\n\tshifts[RedIndex] = (deltaBits * 3);\n\tshifts[GreenIndex] = (deltaBits * 2);\n\tshifts[BlueIndex] = deltaBits;\n\tshifts[AlphaIndex] = 0;\n\tcmShiftTable = shifts;\n\tcmMaskTable = masks;\n\tcmFlags = cmFlags | (ColorMapPresent | ColorMapFixedPart);\n}\n\nstatic sqInt\nshowDisplayBits(void)\n{\n\tinterpreterProxy->showDisplayBitsLeftTopRightBottom(destForm, affectedL, affectedT, affectedR, affectedB);\n}\n\n\n/*\tThis is only used when source and dest are same depth,\n\tie, when the barrel-shift copy loop is used. */\n\nstatic sqInt\nsourceSkewAndPointerInit(void)\n{\n    sqInt dWid;\n    sqInt dxLowBits;\n    sqInt pixPerM1;\n    sqInt sxLowBits;\n\n\n\t/* A mask, assuming power of two */\n\n\tpixPerM1 = destPPW - 1;\n\tsxLowBits = sx & pixPerM1;\n\n\t/* check if need to preload buffer\n\t(i.e., two words of source needed for first word of destination) */\n\n\tdxLowBits = dx & pixPerM1;\n\tif (hDir > 0) {\n\n\t\t/* n Bits stored in 1st word of dest */\n\n\t\tdWid = ((bbW < (destPPW - dxLowBits)) ? bbW : (destPPW - dxLowBits));\n\t\tpreload = (sxLowBits + dWid) > pixPerM1;\n\t}\n\telse {\n\t\tdWid = ((bbW < (dxLowBits + 1)) ? bbW : (dxLowBits + 1));\n\t\tpreload = ((sxLowBits - dWid) + 1) < 0;\n\t}\n\tif (sourceMSB) {\n\t\tskew = (sxLowBits - dxLowBits) * destDepth;\n\t}\n\telse {\n\t\tskew = (dxLowBits - sxLowBits) * destDepth;\n\t}\n\tif (preload) {\n\t\tif (skew < 0) {\n\t\t\tskew += 32;\n\t\t}\n\t\telse {\n\t\t\tskew -= 32;\n\t\t}\n\t}\n\n\t/* calculate increments from end of 1 line to start of next */\n\n\tsourceIndex = (sourceBits + (sy * sourcePitch)) + ((sx / (32 / sourceDepth)) * 4);\n\tsourceDelta = (sourcePitch * vDir) - (4 * (nWords * hDir));\n\tif (preload) {\n\n\t\t/* Compensate for extra source word fetched */\n\n\t\tsourceDelta -= 4 * hDir;\n\t}\n}\n\nstatic sqInt\nsourceWordwith(sqInt sourceWord, sqInt destinationWord)\n{\n\treturn sourceWord;\n}\n\nstatic sqInt\nsrcLongAt(sqInt idx)\n{\n\treturn long32AtPointer(idx);\n}\n\nstatic sqInt\nsubWordwith(sqInt sourceWord, sqInt destinationWord)\n{\n\treturn sourceWord - destinationWord;\n}\n\n\n/*\tTally pixels into the color map. Those tallied are exactly those\n\tin the destination rectangle. Note that the source should be \n\tspecified == destination, in order for the proper color map checks \n\tto be performed at setup. */\n\nstatic sqInt\ntallyIntoMapwith(sqInt sourceWord, sqInt destinationWord)\n{\n    sqInt d;\n    sqInt d1;\n    sqInt destPix;\n    sqInt destPix1;\n    sqInt destShifted;\n    sqInt i;\n    sqInt mapIndex;\n    sqInt mask;\n    sqInt mask3;\n    sqInt maskShifted;\n    sqInt pixMask;\n    sqInt pixVal;\n    sqInt srcPix;\n    sqInt srcPix1;\n\n\tif (!((cmFlags & (ColorMapPresent | ColorMapIndexedPart)) == (ColorMapPresent | ColorMapIndexedPart))) {\n\t\treturn destinationWord;\n\t}\n\tpixMask = maskTable[destDepth];\n\tdestShifted = destinationWord;\n\tmaskShifted = destMask;\n\tfor (i = 1; i <= destPPW; i += 1) {\n\t\tif (!((maskShifted & pixMask) == 0)) {\n\n\t\t\t/* Only tally pixels within the destination rectangle */\n\n\t\t\tpixVal = destShifted & pixMask;\n\t\t\tif (destDepth < 16) {\n\t\t\t\tmapIndex = pixVal;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (destDepth == 16) {\n\t\t\t\t\t/* begin rgbMap:from:to: */\n\t\t\t\t\tif (((d = cmBitsPerColor - 5)) > 0) {\n\n\t\t\t\t\t\t/* Expand to more bits by zero-fill */\n\t\t\t\t\t\t/* Transfer mask */\n\n\t\t\t\t\t\tmask = (1 << 5) - 1;\n\t\t\t\t\t\tsrcPix = pixVal << d;\n\t\t\t\t\t\tmask = mask << d;\n\t\t\t\t\t\tdestPix = srcPix & mask;\n\t\t\t\t\t\tmask = mask << cmBitsPerColor;\n\t\t\t\t\t\tsrcPix = srcPix << d;\n\t\t\t\t\t\tmapIndex = (destPix + (srcPix & mask)) + ((srcPix << d) & (mask << cmBitsPerColor));\n\t\t\t\t\t\tgoto l1;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (d == 0) {\n\t\t\t\t\t\t\tif (5 == 5) {\n\t\t\t\t\t\t\t\tmapIndex = pixVal & 32767;\n\t\t\t\t\t\t\t\tgoto l1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (5 == 8) {\n\t\t\t\t\t\t\t\tmapIndex = pixVal & 16777215;\n\t\t\t\t\t\t\t\tgoto l1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmapIndex = pixVal;\n\t\t\t\t\t\t\tgoto l1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (pixVal == 0) {\n\t\t\t\t\t\t\tmapIndex = pixVal;\n\t\t\t\t\t\t\tgoto l1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\td = 5 - cmBitsPerColor;\n\n\t\t\t\t\t\t/* Transfer mask */\n\n\t\t\t\t\t\tmask = (1 << cmBitsPerColor) - 1;\n\t\t\t\t\t\tsrcPix = ((usqInt) pixVal) >> d;\n\t\t\t\t\t\tdestPix = srcPix & mask;\n\t\t\t\t\t\tmask = mask << cmBitsPerColor;\n\t\t\t\t\t\tsrcPix = ((usqInt) srcPix) >> d;\n\t\t\t\t\t\tdestPix = (destPix + (srcPix & mask)) + ((((usqInt) srcPix) >> d) & (mask << cmBitsPerColor));\n\t\t\t\t\t\tif (destPix == 0) {\n\t\t\t\t\t\t\tmapIndex = 1;\n\t\t\t\t\t\t\tgoto l1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmapIndex = destPix;\n\t\t\t\t\t\tgoto l1;\n\t\t\t\t\t}\n\t\t\t\tl1:\t/* end rgbMap:from:to: */;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t/* begin rgbMap:from:to: */\n\t\t\t\t\tif (((d1 = cmBitsPerColor - 8)) > 0) {\n\n\t\t\t\t\t\t/* Expand to more bits by zero-fill */\n\t\t\t\t\t\t/* Transfer mask */\n\n\t\t\t\t\t\tmask3 = (1 << 8) - 1;\n\t\t\t\t\t\tsrcPix1 = pixVal << d1;\n\t\t\t\t\t\tmask3 = mask3 << d1;\n\t\t\t\t\t\tdestPix1 = srcPix1 & mask3;\n\t\t\t\t\t\tmask3 = mask3 << cmBitsPerColor;\n\t\t\t\t\t\tsrcPix1 = srcPix1 << d1;\n\t\t\t\t\t\tmapIndex = (destPix1 + (srcPix1 & mask3)) + ((srcPix1 << d1) & (mask3 << cmBitsPerColor));\n\t\t\t\t\t\tgoto l2;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (d1 == 0) {\n\t\t\t\t\t\t\tif (8 == 5) {\n\t\t\t\t\t\t\t\tmapIndex = pixVal & 32767;\n\t\t\t\t\t\t\t\tgoto l2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (8 == 8) {\n\t\t\t\t\t\t\t\tmapIndex = pixVal & 16777215;\n\t\t\t\t\t\t\t\tgoto l2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmapIndex = pixVal;\n\t\t\t\t\t\t\tgoto l2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (pixVal == 0) {\n\t\t\t\t\t\t\tmapIndex = pixVal;\n\t\t\t\t\t\t\tgoto l2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\td1 = 8 - cmBitsPerColor;\n\n\t\t\t\t\t\t/* Transfer mask */\n\n\t\t\t\t\t\tmask3 = (1 << cmBitsPerColor) - 1;\n\t\t\t\t\t\tsrcPix1 = ((usqInt) pixVal) >> d1;\n\t\t\t\t\t\tdestPix1 = srcPix1 & mask3;\n\t\t\t\t\t\tmask3 = mask3 << cmBitsPerColor;\n\t\t\t\t\t\tsrcPix1 = ((usqInt) srcPix1) >> d1;\n\t\t\t\t\t\tdestPix1 = (destPix1 + (srcPix1 & mask3)) + ((((usqInt) srcPix1) >> d1) & (mask3 << cmBitsPerColor));\n\t\t\t\t\t\tif (destPix1 == 0) {\n\t\t\t\t\t\t\tmapIndex = 1;\n\t\t\t\t\t\t\tgoto l2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmapIndex = destPix1;\n\t\t\t\t\t\tgoto l2;\n\t\t\t\t\t}\n\t\t\t\tl2:\t/* end rgbMap:from:to: */;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcmLookupTable[mapIndex & cmMask] = ((cmLookupTable[mapIndex & cmMask]) + 1);\n\t\t}\n\t\tmaskShifted = ((usqInt) maskShifted) >> destDepth;\n\t\tdestShifted = ((usqInt) destShifted) >> destDepth;\n\t}\n\treturn destinationWord;\n}\n\n\n/*\tReturn the word at position idx from the colorMap */\n\nstatic sqInt\ntallyMapAt(sqInt idx)\n{\n\treturn cmLookupTable[idx & cmMask];\n}\n\n\n/*\tStore the word at position idx in the colorMap */\n\nstatic sqInt\ntallyMapAtput(sqInt idx, sqInt value)\n{\n\treturn cmLookupTable[idx & cmMask] = value;\n}\n\n\n/*\tShortcut for stuff that's being run from the balloon engine.\n\tSince we do this at each scan line we should avoid the expensive \n\tsetup for source and destination. */\n/*\tWe need a source. */\n\nstatic sqInt\ntryCopyingBitsQuickly(void)\n{\n\tif (noSource) {\n\t\treturn 0;\n\t}\n\tif (!(combinationRule == 34)) {\n\t\treturn 0;\n\t}\n\tif (!(sourceDepth == 32)) {\n\t\treturn 0;\n\t}\n\tif (sourceForm == destForm) {\n\t\treturn 0;\n\t}\n\tif (destDepth < 8) {\n\t\treturn 0;\n\t}\n\tif ((destDepth == 8)\n\t && ((cmFlags & ColorMapPresent) == 0)) {\n\t\treturn 0;\n\t}\n\tif (destDepth == 32) {\n\t\talphaSourceBlendBits32();\n\t}\n\tif (destDepth == 16) {\n\t\talphaSourceBlendBits16();\n\t}\n\tif (destDepth == 8) {\n\t\talphaSourceBlendBits8();\n\t}\n\taffectedL = dx;\n\taffectedR = dx + bbW;\n\taffectedT = dy;\n\taffectedB = dy + bbH;\n\treturn 1;\n}\n\n\n/*\tUnlock the bits of any OS surfaces. */\n/*\tSee the comment in lockSurfaces. Similar rules apply. That is, the area\n\tprovided in ioUnlockSurface can be used to determine the dirty region\n\tafter drawing. If a source is unlocked, then the area will be (0,0,0,0) to\n\tindicate that no portion is dirty.\n */\n\nstatic sqInt\nunlockSurfaces(void)\n{\n    sqInt destHandle;\n    sqInt destLocked;\n    sqInt (*fn)(sqInt, sqInt, sqInt, sqInt, sqInt);\n    sqInt sourceHandle;\n\n\tif (hasSurfaceLock) {\n\t\tif (unlockSurfaceFn == 0) {\n\t\t\tif (!(loadSurfacePlugin())) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\tfn = ((sqInt (*)(sqInt, sqInt, sqInt, sqInt, sqInt)) unlockSurfaceFn);\n\t\tdestLocked = 0;\n\t\tdestHandle = interpreterProxy->fetchPointerofObject(FormBitsIndex, destForm); // maybe xxx_dmu\n\t\tif ((destHandle & 1)) {\n\n\t\t\t/* The destBits are always assumed to be dirty */\n\n\t\t\tdestHandle = (destHandle >> 1);\n\t\t\tfn(destHandle, affectedL, affectedT, affectedR-affectedL, affectedB-affectedT);\n\t\t\tdestBits = destPitch = 0;\n\t\t\tdestLocked = 1;\n\t\t}\n\t\tif (!(noSource)) {\n\t\t\tsourceHandle = interpreterProxy->fetchPointerofObject(FormBitsIndex, sourceForm); // maybe xxx_dmu\n\t\t\tif ((sourceHandle & 1)) {\n\n\t\t\t\t/* Only unlock sourceHandle if different from destHandle */\n\n\t\t\t\tsourceHandle = (sourceHandle >> 1);\n\t\t\t\tif (!(destLocked\n\t\t\t\t\t && (sourceHandle == destHandle))) {\n\t\t\t\t\tfn(sourceHandle, 0, 0, 0, 0);\n\t\t\t\t}\n\t\t\t\tsourceBits = sourcePitch = 0;\n\t\t\t}\n\t\t}\n\t\thasSurfaceLock = 0;\n\t}\n}\n\nstatic sqInt\nwarpBits(void)\n{\n    sqInt endBits;\n    sqInt ns;\n    sqInt pixPerM1;\n    sqInt startBits;\n\n\tns = noSource;\n\tnoSource = 1;\n\tclipRange();\n\tnoSource = ns;\n\tif (noSource\n\t || ((bbW <= 0)\n || (bbH <= 0))) {\n\n\t\t/* zero width or height; noop */\n\n\t\taffectedL = affectedR = affectedT = affectedB = 0;\n\t\treturn null;\n\t}\n\tif (!(lockSurfaces())) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\t/* begin destMaskAndPointerInit */\n\n\t/* A mask, assuming power of two */\n\t/* how many pixels in first word */\n\n\tpixPerM1 = destPPW - 1;\n\tstartBits = destPPW - (dx & pixPerM1);\n\tif (destMSB) {\n\t\tmask1 = ((usqInt) AllOnes) >> (32 - (startBits * destDepth));\n\t}\n\telse {\n\t\tmask1 = AllOnes << (32 - (startBits * destDepth));\n\t}\n\tendBits = (((dx + bbW) - 1) & pixPerM1) + 1;\n\tif (destMSB) {\n\t\tmask2 = AllOnes << (32 - (endBits * destDepth));\n\t}\n\telse {\n\t\tmask2 = ((usqInt) AllOnes) >> (32 - (endBits * destDepth));\n\t}\n\tif (bbW < startBits) {\n\t\tmask1 = mask1 & mask2;\n\t\tmask2 = 0;\n\t\tnWords = 1;\n\t}\n\telse {\n\t\tnWords = (((bbW - startBits) + pixPerM1) / destPPW) + 1;\n\t}\n\n\t/* defaults for no overlap with source */\n\t/* calculate byte addr and delta, based on first word of data */\n\t/* Note pitch is bytes and nWords is longs, not bytes */\n\n\thDir = vDir = 1;\n\tdestIndex = (destBits + (dy * destPitch)) + ((dx / destPPW) * 4);\n\tdestDelta = (destPitch * vDir) - (4 * (nWords * hDir));\n\twarpLoop();\n\tif (hDir > 0) {\n\t\taffectedL = dx;\n\t\taffectedR = dx + bbW;\n\t}\n\telse {\n\t\taffectedL = (dx - bbW) + 1;\n\t\taffectedR = dx + 1;\n\t}\n\tif (vDir > 0) {\n\t\taffectedT = dy;\n\t\taffectedB = dy + bbH;\n\t}\n\telse {\n\t\taffectedT = (dy - bbH) + 1;\n\t\taffectedB = dy + 1;\n\t}\n\tunlockSurfaces();\n}\n\n\n/*\tThis version of the inner loop traverses an arbirary quadrilateral\n\tsource, thus producing a general affine transformation. */\n\nstatic sqInt\nwarpLoop(void)\n{\n    sqInt deltaP12x;\n    sqInt deltaP12y;\n    sqInt deltaP43x;\n    sqInt deltaP43y;\n    sqInt destPix;\n    sqInt destWord;\n    sqInt destWord1;\n    sqInt dstMask;\n    sqInt dstShiftInc;\n    sqInt dstShiftLeft;\n    sqInt endBits;\n    sqInt fieldOop;\n    sqInt fieldOop1;\n    sqInt fieldOop2;\n    sqInt fieldOop3;\n    sqInt fieldOop4;\n    sqInt fieldOop5;\n    sqInt fieldOop6;\n    sqInt fieldOop7;\n    double  floatValue;\n    double  floatValue1;\n    double  floatValue2;\n    double  floatValue3;\n    double  floatValue4;\n    double  floatValue5;\n    double  floatValue6;\n    double  floatValue7;\n    sqInt halftoneWord;\n    sqInt i;\n    sqInt i1;\n    sqInt mapperFlags;\n    sqInt (*mergeFnwith)(sqInt, sqInt);\n    sqInt mergeWord;\n    sqInt nPix;\n    sqInt nPix1;\n    sqInt nSteps;\n    sqInt pAx;\n    sqInt pAy;\n    sqInt pBx;\n    sqInt pBy;\n    sqInt pv;\n    sqInt skewWord;\n    sqInt smoothingCount;\n    sqInt sourceMapOop;\n    sqInt sourceMapIndex_xxx_dmu; \n    sqInt sourcePix;\n    sqInt sourcePix1;\n    sqInt sourcePix2;\n    sqInt sourceWord;\n    sqInt sourceWord1;\n    sqInt srcIndex;\n    sqInt srcIndex1;\n    sqInt startBits;\n    sqInt val;\n    sqInt words;\n    sqInt words1;\n    sqInt x;\n    sqInt x1;\n    sqInt xDelta;\n    sqInt y;\n    sqInt y1;\n    sqInt yDelta;\n\n\tmergeFnwith = ((sqInt (*)(sqInt, sqInt)) (opTable[combinationRule + 1]));\n\tmergeFnwith;\n\tif (!((interpreterProxy->slotSizeOf(bitBltOop)) >= (BBWarpBase + 12))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tnSteps = height - 1;\n\tif (nSteps <= 0) {\n\t\tnSteps = 1;\n\t}\n\t/* begin fetchIntOrFloat:ofObject: */\n\tfieldOop = interpreterProxy->fetchPointerofObject(BBWarpBase, bitBltOop);\n\tif ((fieldOop & 1)) {\n\t\tpAx = (fieldOop >> 1);\n\t\tgoto l3;\n\t}\n\tfloatValue = interpreterProxy->floatValueOf(fieldOop);\n\tif (!((-2.147483648e9 <= floatValue)\n\t\t && (floatValue <= 2.147483647e9))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tpAx = 0;\n\t\tgoto l3;\n\t}\n\tpAx = ((sqInt)floatValue);\nl3:\t/* end fetchIntOrFloat:ofObject: */;\n\t/* begin fetchIntOrFloat:ofObject: */\n\tfieldOop1 = interpreterProxy->fetchPointerofObject(BBWarpBase + 3, bitBltOop);\n\tif ((fieldOop1 & 1)) {\n\t\twords = (fieldOop1 >> 1);\n\t\tgoto l4;\n\t}\n\tfloatValue1 = interpreterProxy->floatValueOf(fieldOop1);\n\tif (!((-2.147483648e9 <= floatValue1)\n\t\t && (floatValue1 <= 2.147483647e9))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\twords = 0;\n\t\tgoto l4;\n\t}\n\twords = ((sqInt)floatValue1);\nl4:\t/* end fetchIntOrFloat:ofObject: */;\n\t/* begin deltaFrom:to:nSteps: */\n\tif (words > pAx) {\n\t\tdeltaP12x = (((words - pAx) + FixedPt1) / (nSteps + 1)) + 1;\n\t\tgoto l5;\n\t}\n\telse {\n\t\tif (words == pAx) {\n\t\t\tdeltaP12x = 0;\n\t\t\tgoto l5;\n\t\t}\n\t\tdeltaP12x = 0 - ((((pAx - words) + FixedPt1) / (nSteps + 1)) + 1);\n\t\tgoto l5;\n\t}\nl5:\t/* end deltaFrom:to:nSteps: */;\n\tif (deltaP12x < 0) {\n\t\tpAx = words - (nSteps * deltaP12x);\n\t}\n\t/* begin fetchIntOrFloat:ofObject: */\n\tfieldOop2 = interpreterProxy->fetchPointerofObject(BBWarpBase + 1, bitBltOop);\n\tif ((fieldOop2 & 1)) {\n\t\tpAy = (fieldOop2 >> 1);\n\t\tgoto l6;\n\t}\n\tfloatValue2 = interpreterProxy->floatValueOf(fieldOop2);\n\tif (!((-2.147483648e9 <= floatValue2)\n\t\t && (floatValue2 <= 2.147483647e9))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tpAy = 0;\n\t\tgoto l6;\n\t}\n\tpAy = ((sqInt)floatValue2);\nl6:\t/* end fetchIntOrFloat:ofObject: */;\n\t/* begin fetchIntOrFloat:ofObject: */\n\tfieldOop3 = interpreterProxy->fetchPointerofObject(BBWarpBase + 4, bitBltOop);\n\tif ((fieldOop3 & 1)) {\n\t\twords = (fieldOop3 >> 1);\n\t\tgoto l7;\n\t}\n\tfloatValue3 = interpreterProxy->floatValueOf(fieldOop3);\n\tif (!((-2.147483648e9 <= floatValue3)\n\t\t && (floatValue3 <= 2.147483647e9))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\twords = 0;\n\t\tgoto l7;\n\t}\n\twords = ((sqInt)floatValue3);\nl7:\t/* end fetchIntOrFloat:ofObject: */;\n\t/* begin deltaFrom:to:nSteps: */\n\tif (words > pAy) {\n\t\tdeltaP12y = (((words - pAy) + FixedPt1) / (nSteps + 1)) + 1;\n\t\tgoto l8;\n\t}\n\telse {\n\t\tif (words == pAy) {\n\t\t\tdeltaP12y = 0;\n\t\t\tgoto l8;\n\t\t}\n\t\tdeltaP12y = 0 - ((((pAy - words) + FixedPt1) / (nSteps + 1)) + 1);\n\t\tgoto l8;\n\t}\nl8:\t/* end deltaFrom:to:nSteps: */;\n\tif (deltaP12y < 0) {\n\t\tpAy = words - (nSteps * deltaP12y);\n\t}\n\t/* begin fetchIntOrFloat:ofObject: */\n\tfieldOop4 = interpreterProxy->fetchPointerofObject(BBWarpBase + 9, bitBltOop);\n\tif ((fieldOop4 & 1)) {\n\t\tpBx = (fieldOop4 >> 1);\n\t\tgoto l9;\n\t}\n\tfloatValue4 = interpreterProxy->floatValueOf(fieldOop4);\n\tif (!((-2.147483648e9 <= floatValue4)\n\t\t && (floatValue4 <= 2.147483647e9))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tpBx = 0;\n\t\tgoto l9;\n\t}\n\tpBx = ((sqInt)floatValue4);\nl9:\t/* end fetchIntOrFloat:ofObject: */;\n\t/* begin fetchIntOrFloat:ofObject: */\n\tfieldOop5 = interpreterProxy->fetchPointerofObject(BBWarpBase + 6, bitBltOop);\n\tif ((fieldOop5 & 1)) {\n\t\twords = (fieldOop5 >> 1);\n\t\tgoto l10;\n\t}\n\tfloatValue5 = interpreterProxy->floatValueOf(fieldOop5);\n\tif (!((-2.147483648e9 <= floatValue5)\n\t\t && (floatValue5 <= 2.147483647e9))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\twords = 0;\n\t\tgoto l10;\n\t}\n\twords = ((sqInt)floatValue5);\nl10:\t/* end fetchIntOrFloat:ofObject: */;\n\t/* begin deltaFrom:to:nSteps: */\n\tif (words > pBx) {\n\t\tdeltaP43x = (((words - pBx) + FixedPt1) / (nSteps + 1)) + 1;\n\t\tgoto l11;\n\t}\n\telse {\n\t\tif (words == pBx) {\n\t\t\tdeltaP43x = 0;\n\t\t\tgoto l11;\n\t\t}\n\t\tdeltaP43x = 0 - ((((pBx - words) + FixedPt1) / (nSteps + 1)) + 1);\n\t\tgoto l11;\n\t}\nl11:\t/* end deltaFrom:to:nSteps: */;\n\tif (deltaP43x < 0) {\n\t\tpBx = words - (nSteps * deltaP43x);\n\t}\n\t/* begin fetchIntOrFloat:ofObject: */\n\tfieldOop6 = interpreterProxy->fetchPointerofObject(BBWarpBase + 10, bitBltOop);\n\tif ((fieldOop6 & 1)) {\n\t\tpBy = (fieldOop6 >> 1);\n\t\tgoto l12;\n\t}\n\tfloatValue6 = interpreterProxy->floatValueOf(fieldOop6);\n\tif (!((-2.147483648e9 <= floatValue6)\n\t\t && (floatValue6 <= 2.147483647e9))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tpBy = 0;\n\t\tgoto l12;\n\t}\n\tpBy = ((sqInt)floatValue6);\nl12:\t/* end fetchIntOrFloat:ofObject: */;\n\t/* begin fetchIntOrFloat:ofObject: */\n\tfieldOop7 = interpreterProxy->fetchPointerofObject(BBWarpBase + 7, bitBltOop);\n\tif ((fieldOop7 & 1)) {\n\t\twords = (fieldOop7 >> 1);\n\t\tgoto l13;\n\t}\n\tfloatValue7 = interpreterProxy->floatValueOf(fieldOop7);\n\tif (!((-2.147483648e9 <= floatValue7)\n\t\t && (floatValue7 <= 2.147483647e9))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\twords = 0;\n\t\tgoto l13;\n\t}\n\twords = ((sqInt)floatValue7);\nl13:\t/* end fetchIntOrFloat:ofObject: */;\n\t/* begin deltaFrom:to:nSteps: */\n\tif (words > pBy) {\n\t\tdeltaP43y = (((words - pBy) + FixedPt1) / (nSteps + 1)) + 1;\n\t\tgoto l14;\n\t}\n\telse {\n\t\tif (words == pBy) {\n\t\t\tdeltaP43y = 0;\n\t\t\tgoto l14;\n\t\t}\n\t\tdeltaP43y = 0 - ((((pBy - words) + FixedPt1) / (nSteps + 1)) + 1);\n\t\tgoto l14;\n\t}\nl14:\t/* end deltaFrom:to:nSteps: */;\n\tif (deltaP43y < 0) {\n\t\tpBy = words - (nSteps * deltaP43y);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\tif ((interpreterProxy->methodArgumentCount()) == 2) {\n\t\tsmoothingCount = interpreterProxy->stackIntegerValue(1);\n\t\tsourceMapOop = interpreterProxy->stackValue(0);\n\t\tif (sourceMapOop == (interpreterProxy->nilObject())) {\n\t\t\tif (sourceDepth < 16) {\n\t\t\t\treturn interpreterProxy->primitiveFail();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif ((interpreterProxy->slotSizeOf(sourceMapOop)) < (1 << sourceDepth)) {\n\t\t\t\treturn interpreterProxy->primitiveFail();\n\t\t\t}\n\t\t\t// xxx_dmu sourceMapOop = oopForPointer(interpreterProxy->firstIndexableField(sourceMapOop));\n\t\t\tsourceMapIndex_xxx_dmu = (sqInt)(interpreterProxy->firstIndexableField(sourceMapOop));\n\t\t}\n\t}\n\telse {\n\t\tsmoothingCount = 1;\n\t\tsourceMapOop = interpreterProxy->nilObject();\n\t\tsourceMapIndex_xxx_dmu = 0;\n\t}\n\tnSteps = width - 1;\n\tif (nSteps <= 0) {\n\t\tnSteps = 1;\n\t}\n\tstartBits = destPPW - (dx & (destPPW - 1));\n\tendBits = (((dx + bbW) - 1) & (destPPW - 1)) + 1;\n\tif (bbW < startBits) {\n\t\tstartBits = bbW;\n\t}\n\tif (destY < clipY) {\n\n\t\t/* Advance increments if there was clipping in y */\n\n\t\tpAx += (clipY - destY) * deltaP12x;\n\t\tpAy += (clipY - destY) * deltaP12y;\n\t\tpBx += (clipY - destY) * deltaP43x;\n\t\tpBy += (clipY - destY) * deltaP43y;\n\t}\n\t/* begin warpLoopSetup */\n\n\t/* warpSrcShift = log2(sourceDepth) */\n\n\twarpSrcShift = 0;\n\n\t/* recycle temp */\n\n\twords1 = sourceDepth;\n\twhile (!(words1 == 1)) {\n\t\twarpSrcShift += 1;\n\t\twords1 = ((usqInt) words1) >> 1;\n\t}\n\n\t/* warpAlignShift: Shift for aligning x position to word boundary */\n\n\twarpSrcMask = maskTable[sourceDepth];\n\n\t/* warpAlignMask: Mask for extracting the pixel position from an x position */\n\n\twarpAlignShift = 5 - warpSrcShift;\n\n\t/* Setup the lookup table for source bit shifts */\n\t/* warpBitShiftTable: given an sub-word x value what's the bit shift? */\n\n\twarpAlignMask = (1 << warpAlignShift) - 1;\n\tfor (i1 = 0; i1 <= warpAlignMask; i1 += 1) {\n\t\tif (sourceMSB) {\n\t\t\twarpBitShiftTable[i1] = (32 - ((i1 + 1) << warpSrcShift));\n\t\t}\n\t\telse {\n\t\t\twarpBitShiftTable[i1] = (i1 << warpSrcShift);\n\t\t}\n\t}\n\tif ((smoothingCount > 1)\n\t && ((cmFlags & ColorMapNewStyle) == 0)) {\n\t\tif (cmLookupTable == null) {\n\t\t\tif (destDepth == 16) {\n\t\t\t\tsetupColorMasksFromto(8, 5);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tsetupColorMasksFromto(8, cmBitsPerColor);\n\t\t}\n\t}\n\tmapperFlags = cmFlags & (~ColorMapNewStyle);\n\tif (destMSB) {\n\t\tdstShiftInc = 0 - destDepth;\n\t\tdstShiftLeft = 32 - destDepth;\n\t}\n\telse {\n\t\tdstShiftInc = destDepth;\n\t\tdstShiftLeft = 0;\n\t}\n\tfor (i = 1; i <= bbH; i += 1) {\n\t\t/* begin deltaFrom:to:nSteps: */\n\t\tif (pBx > pAx) {\n\t\t\txDelta = (((pBx - pAx) + FixedPt1) / (nSteps + 1)) + 1;\n\t\t\tgoto l1;\n\t\t}\n\t\telse {\n\t\t\tif (pBx == pAx) {\n\t\t\t\txDelta = 0;\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t\txDelta = 0 - ((((pAx - pBx) + FixedPt1) / (nSteps + 1)) + 1);\n\t\t\tgoto l1;\n\t\t}\n\tl1:\t/* end deltaFrom:to:nSteps: */;\n\t\tif (xDelta >= 0) {\n\t\t\tsx = pAx;\n\t\t}\n\t\telse {\n\t\t\tsx = pBx - (nSteps * xDelta);\n\t\t}\n\t\t/* begin deltaFrom:to:nSteps: */\n\t\tif (pBy > pAy) {\n\t\t\tyDelta = (((pBy - pAy) + FixedPt1) / (nSteps + 1)) + 1;\n\t\t\tgoto l2;\n\t\t}\n\t\telse {\n\t\t\tif (pBy == pAy) {\n\t\t\t\tyDelta = 0;\n\t\t\t\tgoto l2;\n\t\t\t}\n\t\t\tyDelta = 0 - ((((pAy - pBy) + FixedPt1) / (nSteps + 1)) + 1);\n\t\t\tgoto l2;\n\t\t}\n\tl2:\t/* end deltaFrom:to:nSteps: */;\n\t\tif (yDelta >= 0) {\n\t\t\tsy = pAy;\n\t\t}\n\t\telse {\n\t\t\tsy = pBy - (nSteps * yDelta);\n\t\t}\n\t\tif (destMSB) {\n\t\t\tdstBitShift = 32 - (((dx & (destPPW - 1)) + 1) * destDepth);\n\t\t}\n\t\telse {\n\t\t\tdstBitShift = (dx & (destPPW - 1)) * destDepth;\n\t\t}\n\t\tif (destX < clipX) {\n\n\t\t\t/* Advance increments if there was clipping in x */\n\n\t\t\tsx += (clipX - destX) * xDelta;\n\t\t\tsy += (clipX - destX) * yDelta;\n\t\t}\n\t\tif (noHalftone) {\n\t\t\thalftoneWord = AllOnes;\n\t\t}\n\t\telse {\n\t\t\thalftoneWord = long32AtPointer(halftoneBase + ((((dy + i) - 1) % halftoneHeight) * 4));\n\t\t}\n\t\tdestMask = mask1;\n\n\t\t/* Here is the inner loop... */\n\n\t\tnPix = startBits;\n\t\twords = nWords;\n\t\tdo {\n\t\t\tif (smoothingCount == 1) {\n\t\t\t\t/* begin warpPickSourcePixels:xDeltah:yDeltah:xDeltav:yDeltav:dstShiftInc:flags: */\n\n\t\t\t\t/* Yepp - this should go into warpLoop */\n\n\t\t\t\tdstMask = maskTable[destDepth];\n\t\t\t\tdestWord1 = 0;\n\t\t\t\tnPix1 = nPix;\n\t\t\t\tif (mapperFlags == (ColorMapPresent | ColorMapIndexedPart)) {\n\t\t\t\t\tdo {\n\t\t\t\t\t\t/* begin pickWarpPixelAtX:y: */\n\t\t\t\t\t\tif ((sx < 0)\n\t\t\t\t\t\t || ((sy < 0)\n || ((((x = ((usqInt) sx) >> BinaryPoint)) >= sourceWidth)\n || (((y = ((usqInt) sy) >> BinaryPoint)) >= sourceHeight)))) {\n\t\t\t\t\t\t\tsourcePix = 0;\n\t\t\t\t\t\t\tgoto l15;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsrcIndex = (sourceBits + (y * sourcePitch)) + ((((usqInt) x) >> warpAlignShift) * 4);\n\n\t\t\t\t\t\t/* Extract pixel from word */\n\n\t\t\t\t\t\tsourceWord = long32AtPointer(srcIndex);\n\t\t\t\t\t\tsrcBitShift = warpBitShiftTable[x & warpAlignMask];\n\t\t\t\t\t\tsourcePix1 = (((usqInt) sourceWord) >> srcBitShift) & warpSrcMask;\n\t\t\t\t\t\tsourcePix = sourcePix1;\n\t\t\t\t\tl15:\t/* end pickWarpPixelAtX:y: */;\n\t\t\t\t\t\tdestPix = cmLookupTable[sourcePix & cmMask];\n\t\t\t\t\t\tdestWord1 = destWord1 | ((destPix & dstMask) << dstBitShift);\n\t\t\t\t\t\tdstBitShift += dstShiftInc;\n\t\t\t\t\t\tsx += xDelta;\n\t\t\t\t\t\tsy += yDelta;\n\t\t\t\t\t} while(!(((nPix1 -= 1)) == 0));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdo {\n\t\t\t\t\t\t/* begin pickWarpPixelAtX:y: */\n\t\t\t\t\t\tif ((sx < 0)\n\t\t\t\t\t\t || ((sy < 0)\n || ((((x1 = ((usqInt) sx) >> BinaryPoint)) >= sourceWidth)\n || (((y1 = ((usqInt) sy) >> BinaryPoint)) >= sourceHeight)))) {\n\t\t\t\t\t\t\tsourcePix = 0;\n\t\t\t\t\t\t\tgoto l16;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsrcIndex1 = (sourceBits + (y1 * sourcePitch)) + ((((usqInt) x1) >> warpAlignShift) * 4);\n\n\t\t\t\t\t\t/* Extract pixel from word */\n\n\t\t\t\t\t\tsourceWord1 = long32AtPointer(srcIndex1);\n\t\t\t\t\t\tsrcBitShift = warpBitShiftTable[x1 & warpAlignMask];\n\t\t\t\t\t\tsourcePix2 = (((usqInt) sourceWord1) >> srcBitShift) & warpSrcMask;\n\t\t\t\t\t\tsourcePix = sourcePix2;\n\t\t\t\t\tl16:\t/* end pickWarpPixelAtX:y: */;\n\t\t\t\t\t\t/* begin mapPixel:flags: */\n\t\t\t\t\t\tpv = sourcePix;\n\t\t\t\t\t\tif ((mapperFlags & ColorMapPresent) != 0) {\n\t\t\t\t\t\t\tif ((mapperFlags & ColorMapFixedPart) != 0) {\n\t\t\t\t\t\t\t\t/* begin rgbMapPixel:flags: */\n\t\t\t\t\t\t\t\tval = (((cmShiftTable[0]) < 0) ? ((usqInt) (sourcePix & (cmMaskTable[0])) >> -(cmShiftTable[0])) : ((usqInt) (sourcePix & (cmMaskTable[0])) << (cmShiftTable[0])));\n\t\t\t\t\t\t\t\tval = val | ((((cmShiftTable[1]) < 0) ? ((usqInt) (sourcePix & (cmMaskTable[1])) >> -(cmShiftTable[1])) : ((usqInt) (sourcePix & (cmMaskTable[1])) << (cmShiftTable[1]))));\n\t\t\t\t\t\t\t\tval = val | ((((cmShiftTable[2]) < 0) ? ((usqInt) (sourcePix & (cmMaskTable[2])) >> -(cmShiftTable[2])) : ((usqInt) (sourcePix & (cmMaskTable[2])) << (cmShiftTable[2]))));\n\t\t\t\t\t\t\t\tpv = val | ((((cmShiftTable[3]) < 0) ? ((usqInt) (sourcePix & (cmMaskTable[3])) >> -(cmShiftTable[3])) : ((usqInt) (sourcePix & (cmMaskTable[3])) << (cmShiftTable[3]))));\n\t\t\t\t\t\t\t\tif ((pv == 0)\n\t\t\t\t\t\t\t\t && (sourcePix != 0)) {\n\t\t\t\t\t\t\t\t\tpv = 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ((mapperFlags & ColorMapIndexedPart) != 0) {\n\t\t\t\t\t\t\t\tpv = cmLookupTable[pv & cmMask];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdestPix = pv;\n\t\t\t\t\t\tdestWord1 = destWord1 | ((destPix & dstMask) << dstBitShift);\n\t\t\t\t\t\tdstBitShift += dstShiftInc;\n\t\t\t\t\t\tsx += xDelta;\n\t\t\t\t\t\tsy += yDelta;\n\t\t\t\t\t} while(!(((nPix1 -= 1)) == 0));\n\t\t\t\t}\n\t\t\t\tskewWord = destWord1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tskewWord = warpPickSmoothPixelsxDeltahyDeltahxDeltavyDeltavsourceMapsmoothingdstShiftInc(nPix, xDelta, yDelta, deltaP12x, deltaP12y, sourceMapIndex_xxx_dmu, smoothingCount, dstShiftInc);\n\t\t\t}\n\t\t\tdstBitShift = dstShiftLeft;\n\t\t\tif (destMask == AllOnes) {\n\n\t\t\t\t/* avoid read-modify-write */\n\n\t\t\t\tmergeWord = mergeFnwith(skewWord & halftoneWord, long32AtPointer(destIndex));\n\t\t\t\tlong32AtPointerput(destIndex, destMask & mergeWord);\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\t/* General version using dest masking */\n\n\t\t\t\tdestWord = long32AtPointer(destIndex);\n\t\t\t\tmergeWord = mergeFnwith(skewWord & halftoneWord, destWord & destMask);\n\t\t\t\tdestWord = (destMask & mergeWord) | (destWord & (~destMask));\n\t\t\t\tlong32AtPointerput(destIndex, destWord);\n\t\t\t}\n\t\t\tdestIndex += 4;\n\t\t\tif (words == 2) {\n\n\t\t\t\t/* e.g., is the next word the last word? */\n\t\t\t\t/* set mask for last word in this row */\n\n\t\t\t\tdestMask = mask2;\n\t\t\t\tnPix = endBits;\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\t/* use fullword mask for inner loop */\n\n\t\t\t\tdestMask = AllOnes;\n\t\t\t\tnPix = destPPW;\n\t\t\t}\n\t\t} while(!(((words -= 1)) == 0));\n\t\tpAx += deltaP12x;\n\t\tpAy += deltaP12y;\n\t\tpBx += deltaP43x;\n\t\tpBy += deltaP43y;\n\t\tdestIndex += destDelta;\n\t}\n}\n\n\n/*\tSetup values for faster pixel fetching. */\n\nstatic sqInt\nwarpLoopSetup(void)\n{\n    sqInt i;\n    sqInt words;\n\n\n\t/* warpSrcShift = log2(sourceDepth) */\n\n\twarpSrcShift = 0;\n\n\t/* recycle temp */\n\n\twords = sourceDepth;\n\twhile (!(words == 1)) {\n\t\twarpSrcShift += 1;\n\t\twords = ((usqInt) words) >> 1;\n\t}\n\n\t/* warpAlignShift: Shift for aligning x position to word boundary */\n\n\twarpSrcMask = maskTable[sourceDepth];\n\n\t/* warpAlignMask: Mask for extracting the pixel position from an x position */\n\n\twarpAlignShift = 5 - warpSrcShift;\n\n\t/* Setup the lookup table for source bit shifts */\n\t/* warpBitShiftTable: given an sub-word x value what's the bit shift? */\n\n\twarpAlignMask = (1 << warpAlignShift) - 1;\n\tfor (i = 0; i <= warpAlignMask; i += 1) {\n\t\tif (sourceMSB) {\n\t\t\twarpBitShiftTable[i] = (32 - ((i + 1) << warpSrcShift));\n\t\t}\n\t\telse {\n\t\t\twarpBitShiftTable[i] = (i << warpSrcShift);\n\t\t}\n\t}\n}\n\n\n/*\tPick n (sub-) pixels from the source form, mapped by sourceMap,\n\taverage the RGB values, map by colorMap and return the new word.\n\tThis version is only called from WarpBlt with smoothingCount > 1 */\n\nstatic sqInt\nwarpPickSmoothPixelsxDeltahyDeltahxDeltavyDeltavsourceMapsmoothingdstShiftInc(sqInt nPixels, sqInt xDeltah, sqInt yDeltah, sqInt xDeltav, sqInt yDeltav, sqInt sourceMap, sqInt n, sqInt dstShiftInc)\n{\n    sqInt a;\n    sqInt b;\n    sqInt destWord;\n    sqInt dstMask;\n    sqInt g;\n    sqInt i;\n    sqInt j;\n    sqInt k;\n    sqInt nPix;\n    sqInt pv;\n    sqInt r;\n    sqInt rgb;\n    sqInt sourcePix;\n    sqInt sourceWord;\n    sqInt srcIndex;\n    sqInt val;\n    sqInt x;\n    sqInt x1;\n    sqInt xdh;\n    sqInt xdv;\n    sqInt xx;\n    sqInt y;\n    sqInt y1;\n    sqInt ydh;\n    sqInt ydv;\n    sqInt yy;\n\n\n\t/* nope - too much stuff in here */\n\n\tdstMask = maskTable[destDepth];\n\tdestWord = 0;\n\tif (n == 2) {\n\n\t\t/* Try avoiding divides for most common n (divide by 2 is generated as shift) */\n\n\t\txdh = ((sqInt) xDeltah >> 1);\n\t\tydh = ((sqInt) yDeltah >> 1);\n\t\txdv = ((sqInt) xDeltav >> 1);\n\t\tydv = ((sqInt) yDeltav >> 1);\n\t}\n\telse {\n\t\txdh = xDeltah / n;\n\t\tydh = yDeltah / n;\n\t\txdv = xDeltav / n;\n\t\tydv = yDeltav / n;\n\t}\n\ti = nPixels;\n\tdo {\n\t\tx = sx;\n\t\ty = sy;\n\n\t\t/* Pick and average n*n subpixels */\n\n\t\ta = r = g = b = 0;\n\n\t\t/* actual number of pixels (not clipped and not transparent) */\n\n\t\tnPix = 0;\n\t\tj = n;\n\t\tdo {\n\t\t\txx = x;\n\t\t\tyy = y;\n\t\t\tk = n;\n\t\t\tdo {\n\t\t\t\t/* begin pickWarpPixelAtX:y: */\n\t\t\t\tif ((xx < 0)\n\t\t\t\t || ((yy < 0)\n || ((((x1 = ((usqInt) xx) >> BinaryPoint)) >= sourceWidth)\n || (((y1 = ((usqInt) yy) >> BinaryPoint)) >= sourceHeight)))) {\n\t\t\t\t\trgb = 0;\n\t\t\t\t\tgoto l1;\n\t\t\t\t}\n\t\t\t\tsrcIndex = (sourceBits + (y1 * sourcePitch)) + ((((usqInt) x1) >> warpAlignShift) * 4);\n\n\t\t\t\t/* Extract pixel from word */\n\n\t\t\t\tsourceWord = long32AtPointer(srcIndex);\n\t\t\t\tsrcBitShift = warpBitShiftTable[x1 & warpAlignMask];\n\t\t\t\tsourcePix = (((usqInt) sourceWord) >> srcBitShift) & warpSrcMask;\n\t\t\t\trgb = sourcePix;\n\t\t\tl1:\t/* end pickWarpPixelAtX:y: */;\n\t\t\t\tif (!((combinationRule == 25)\n\t\t\t\t\t && (rgb == 0))) {\n\n\t\t\t\t\t/* If not clipped and not transparent, then tally rgb values */\n\n\t\t\t\t\tnPix += 1;\n\t\t\t\t\tif (sourceDepth < 16) {\n\t\t\t\t\t\trgb = long32AtPointer(sourceMap + (rgb << 2));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (sourceDepth == 16) {\n\n\t\t\t\t\t\t\t/* Already in RGB format */\n\n\t\t\t\t\t\t\trgb = (((rgb & 31) << 3) | ((rgb & 992) << 6)) | ((rgb & 31744) << 9);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\trgb = rgb;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tb += rgb & 255;\n\t\t\t\t\tg += (((usqInt) rgb) >> 8) & 255;\n\t\t\t\t\tr += (((usqInt) rgb) >> 16) & 255;\n\t\t\t\t\ta += ((usqInt) rgb) >> 24;\n\t\t\t\t}\n\t\t\t\txx += xdh;\n\t\t\t\tyy += ydh;\n\t\t\t} while(!(((k -= 1)) == 0));\n\t\t\tx += xdv;\n\t\t\ty += ydv;\n\t\t} while(!(((j -= 1)) == 0));\n\t\tif ((nPix == 0)\n\t\t || ((combinationRule == 25)\n && (nPix < (((sqInt) (n * n) >> 1))))) {\n\n\t\t\t/* All pixels were 0, or most were transparent */\n\n\t\t\trgb = 0;\n\t\t}\n\t\telse {\n\t\t\tif (nPix == 4) {\n\n\t\t\t\t/* normalize rgba sums */\n\t\t\t\t/* Try to avoid divides for most common n */\n\n\t\t\t\tr = ((usqInt) r) >> 2;\n\t\t\t\tg = ((usqInt) g) >> 2;\n\t\t\t\tb = ((usqInt) b) >> 2;\n\t\t\t\ta = ((usqInt) a) >> 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tr = r / nPix;\n\t\t\t\tg = g / nPix;\n\t\t\t\tb = b / nPix;\n\t\t\t\ta = a / nPix;\n\t\t\t}\n\n\t\t\t/* map the pixel */\n\n\t\t\trgb = (((a << 24) + (r << 16)) + (g << 8)) + b;\n\t\t\tif (rgb == 0) {\n\t\t\t\tif ((((r + g) + b) + a) > 0) {\n\n\t\t\t\t\t/* only generate zero if pixel is really transparent */\n\n\t\t\t\t\trgb = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t/* begin mapPixel:flags: */\n\t\t\tpv = rgb;\n\t\t\tif ((cmFlags & ColorMapPresent) != 0) {\n\t\t\t\tif ((cmFlags & ColorMapFixedPart) != 0) {\n\t\t\t\t\t/* begin rgbMapPixel:flags: */\n\t\t\t\t\tval = (((cmShiftTable[0]) < 0) ? ((usqInt) (rgb & (cmMaskTable[0])) >> -(cmShiftTable[0])) : ((usqInt) (rgb & (cmMaskTable[0])) << (cmShiftTable[0])));\n\t\t\t\t\tval = val | ((((cmShiftTable[1]) < 0) ? ((usqInt) (rgb & (cmMaskTable[1])) >> -(cmShiftTable[1])) : ((usqInt) (rgb & (cmMaskTable[1])) << (cmShiftTable[1]))));\n\t\t\t\t\tval = val | ((((cmShiftTable[2]) < 0) ? ((usqInt) (rgb & (cmMaskTable[2])) >> -(cmShiftTable[2])) : ((usqInt) (rgb & (cmMaskTable[2])) << (cmShiftTable[2]))));\n\t\t\t\t\tpv = val | ((((cmShiftTable[3]) < 0) ? ((usqInt) (rgb & (cmMaskTable[3])) >> -(cmShiftTable[3])) : ((usqInt) (rgb & (cmMaskTable[3])) << (cmShiftTable[3]))));\n\t\t\t\t\tif ((pv == 0)\n\t\t\t\t\t && (rgb != 0)) {\n\t\t\t\t\t\tpv = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ((cmFlags & ColorMapIndexedPart) != 0) {\n\t\t\t\t\tpv = cmLookupTable[pv & cmMask];\n\t\t\t\t}\n\t\t\t}\n\t\t\trgb = pv;\n\t\t}\n\t\tdestWord = destWord | ((rgb & dstMask) << dstBitShift);\n\t\tdstBitShift += dstShiftInc;\n\t\tsx += xDeltah;\n\t\tsy += yDeltah;\n\t} while(!(((i -= 1)) == 0));\n\treturn destWord;\n}\n\n\n/*\tPick n pixels from the source form,\n\tmap by colorMap and return aligned by dstBitShift.\n\tThis version is only called from WarpBlt with smoothingCount = 1 */\n\nstatic sqInt\nwarpPickSourcePixelsxDeltahyDeltahxDeltavyDeltavdstShiftIncflags(sqInt nPixels, sqInt xDeltah, sqInt yDeltah, sqInt xDeltav, sqInt yDeltav, sqInt dstShiftInc, sqInt mapperFlags)\n{\n    sqInt destPix;\n    sqInt destWord;\n    sqInt dstMask;\n    sqInt nPix;\n    sqInt pv;\n    sqInt sourcePix;\n    sqInt sourcePix1;\n    sqInt sourcePix2;\n    sqInt sourceWord;\n    sqInt sourceWord1;\n    sqInt srcIndex;\n    sqInt srcIndex1;\n    sqInt val;\n    sqInt x;\n    sqInt x1;\n    sqInt y;\n    sqInt y1;\n\n\n\t/* Yepp - this should go into warpLoop */\n\n\tdstMask = maskTable[destDepth];\n\tdestWord = 0;\n\tnPix = nPixels;\n\tif (mapperFlags == (ColorMapPresent | ColorMapIndexedPart)) {\n\t\tdo {\n\t\t\t/* begin pickWarpPixelAtX:y: */\n\t\t\tif ((sx < 0)\n\t\t\t || ((sy < 0)\n || ((((x = ((usqInt) sx) >> BinaryPoint)) >= sourceWidth)\n || (((y = ((usqInt) sy) >> BinaryPoint)) >= sourceHeight)))) {\n\t\t\t\tsourcePix = 0;\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t\tsrcIndex = (sourceBits + (y * sourcePitch)) + ((((usqInt) x) >> warpAlignShift) * 4);\n\n\t\t\t/* Extract pixel from word */\n\n\t\t\tsourceWord = long32AtPointer(srcIndex);\n\t\t\tsrcBitShift = warpBitShiftTable[x & warpAlignMask];\n\t\t\tsourcePix1 = (((usqInt) sourceWord) >> srcBitShift) & warpSrcMask;\n\t\t\tsourcePix = sourcePix1;\n\t\tl1:\t/* end pickWarpPixelAtX:y: */;\n\t\t\tdestPix = cmLookupTable[sourcePix & cmMask];\n\t\t\tdestWord = destWord | ((destPix & dstMask) << dstBitShift);\n\t\t\tdstBitShift += dstShiftInc;\n\t\t\tsx += xDeltah;\n\t\t\tsy += yDeltah;\n\t\t} while(!(((nPix -= 1)) == 0));\n\t}\n\telse {\n\t\tdo {\n\t\t\t/* begin pickWarpPixelAtX:y: */\n\t\t\tif ((sx < 0)\n\t\t\t || ((sy < 0)\n || ((((x1 = ((usqInt) sx) >> BinaryPoint)) >= sourceWidth)\n || (((y1 = ((usqInt) sy) >> BinaryPoint)) >= sourceHeight)))) {\n\t\t\t\tsourcePix = 0;\n\t\t\t\tgoto l2;\n\t\t\t}\n\t\t\tsrcIndex1 = (sourceBits + (y1 * sourcePitch)) + ((((usqInt) x1) >> warpAlignShift) * 4);\n\n\t\t\t/* Extract pixel from word */\n\n\t\t\tsourceWord1 = long32AtPointer(srcIndex1);\n\t\t\tsrcBitShift = warpBitShiftTable[x1 & warpAlignMask];\n\t\t\tsourcePix2 = (((usqInt) sourceWord1) >> srcBitShift) & warpSrcMask;\n\t\t\tsourcePix = sourcePix2;\n\t\tl2:\t/* end pickWarpPixelAtX:y: */;\n\t\t\t/* begin mapPixel:flags: */\n\t\t\tpv = sourcePix;\n\t\t\tif ((mapperFlags & ColorMapPresent) != 0) {\n\t\t\t\tif ((mapperFlags & ColorMapFixedPart) != 0) {\n\t\t\t\t\t/* begin rgbMapPixel:flags: */\n\t\t\t\t\tval = (((cmShiftTable[0]) < 0) ? ((usqInt) (sourcePix & (cmMaskTable[0])) >> -(cmShiftTable[0])) : ((usqInt) (sourcePix & (cmMaskTable[0])) << (cmShiftTable[0])));\n\t\t\t\t\tval = val | ((((cmShiftTable[1]) < 0) ? ((usqInt) (sourcePix & (cmMaskTable[1])) >> -(cmShiftTable[1])) : ((usqInt) (sourcePix & (cmMaskTable[1])) << (cmShiftTable[1]))));\n\t\t\t\t\tval = val | ((((cmShiftTable[2]) < 0) ? ((usqInt) (sourcePix & (cmMaskTable[2])) >> -(cmShiftTable[2])) : ((usqInt) (sourcePix & (cmMaskTable[2])) << (cmShiftTable[2]))));\n\t\t\t\t\tpv = val | ((((cmShiftTable[3]) < 0) ? ((usqInt) (sourcePix & (cmMaskTable[3])) >> -(cmShiftTable[3])) : ((usqInt) (sourcePix & (cmMaskTable[3])) << (cmShiftTable[3]))));\n\t\t\t\t\tif ((pv == 0)\n\t\t\t\t\t && (sourcePix != 0)) {\n\t\t\t\t\t\tpv = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ((mapperFlags & ColorMapIndexedPart) != 0) {\n\t\t\t\t\tpv = cmLookupTable[pv & cmMask];\n\t\t\t\t}\n\t\t\t}\n\t\t\tdestPix = pv;\n\t\t\tdestWord = destWord | ((destPix & dstMask) << dstBitShift);\n\t\t\tdstBitShift += dstShiftInc;\n\t\t\tsx += xDeltah;\n\t\t\tsy += yDeltah;\n\t\t} while(!(((nPix -= 1)) == 0));\n\t}\n\treturn destWord;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* BitBltPlugin_exports[][3] = {\n\t{\"BitBltPlugin\", \"copyBits\", (void*)copyBits},\n\t{\"BitBltPlugin\", \"copyBitsFromtoat\", (void*)copyBitsFromtoat},\n\t{\"BitBltPlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"BitBltPlugin\", \"initialiseModule\", (void*)initialiseModule},\n\t{\"BitBltPlugin\", \"loadBitBltFrom\", (void*)loadBitBltFrom},\n\t{\"BitBltPlugin\", \"moduleUnloaded\", (void*)moduleUnloaded},\n\t{\"BitBltPlugin\", \"primitiveCopyBits\", (void*)primitiveCopyBits},\n\t{\"BitBltPlugin\", \"primitiveDisplayString\", (void*)primitiveDisplayString},\n\t{\"BitBltPlugin\", \"primitiveDrawLoop\", (void*)primitiveDrawLoop},\n\t{\"BitBltPlugin\", \"primitiveWarpBits\", (void*)primitiveWarpBits},\n\t{\"BitBltPlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/CroquetPlugin/CroquetPlugin.c",
    "content": "/* Automatically generated by\n\tVMPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tCroquetPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"CroquetPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"CroquetPlugin.h\"\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n\n/*** Function Prototypes ***/\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nstatic sqInt msg(char *s);\nEXPORT(sqInt) primitiveAdj3(void);\nEXPORT(sqInt) primitiveARC4Transform(void);\nEXPORT(sqInt) primitiveDet3(void);\nEXPORT(sqInt) primitiveGatherEntropy(void);\nEXPORT(sqInt) primitiveInplaceHouseHolderInvert(void);\nEXPORT(sqInt) primitiveInverseByAdjoint(void);\nEXPORT(sqInt) primitiveMD5Transform(void);\nEXPORT(sqInt) primitiveOrthoNormInverseMatrix(void);\nEXPORT(sqInt) primitiveTransformDirection(void);\nEXPORT(sqInt) primitiveTransformMatrixWithInto(void);\nEXPORT(sqInt) primitiveTransformVector3(void);\nEXPORT(sqInt) primitiveTransposeMatrix(void);\nEXPORT(sqInt) primitiveTriBoxIntersects(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\nstatic void* stackMatrix(sqInt index);\nstatic void* stackVector3(sqInt index);\nstatic sqInt transformMatrixwithinto(float *src, float *arg, float *dst);\n\n\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"CroquetPlugin VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"CroquetPlugin VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\n\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\n\n/*\tComputes the adjoint of the Matrix4x4 receiver,\n\tplacing the results the the Matrix4x4 argument,\n\t */\n\nEXPORT(sqInt)\nprimitiveAdj3(void)\n{\n    sqInt argc;\n    const int c11 = 0;\n    const int c12 = 1;\n    const int c13 = 2;\n    const int c21 = 4;\n    const int c22 = 5;\n    const int c23 = 6;\n    const int c31 = 8;\n    const int c32 = 9;\n    const int c33 = 10;\n    float *dst;\n    sqInt dstOop;\n    double m11;\n    double m12;\n    double m13;\n    double m21;\n    double m22;\n    double m23;\n    double m31;\n    double m32;\n    double m33;\n    float *src;\n    sqInt srcOop;\n\n\t;\n\targc = interpreterProxy->methodArgumentCount();\n\tif (!(argc == 1)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tflag(\"stackArgv\");\n\tsrcOop = interpreterProxy->stackObjectValue(argc);\n\tsrc = interpreterProxy->firstIndexableField(srcOop);\n\tdstOop = interpreterProxy->stackObjectValue(argc - 1);\n\n\t/* read in the source matrix 3x3, which contains the encoded rotation and scale factors */\n\n\tdst = interpreterProxy->firstIndexableField(dstOop);\n\tm11 = src[c11];\n\tm12 = src[c12];\n\tm13 = src[c13];\n\tm21 = src[c21];\n\tm22 = src[c22];\n\tm23 = src[c23];\n\tm31 = src[c31];\n\tm32 = src[c32];\n\n\t/* do the actual work */\n\t/* compute our cofactors and transpose.  adj = transpose of cofactors */\n\n\tm33 = src[c33];\n\tdst[c11] = ((m22 * m33) - (m23 * m32));\n\tdst[c21] = (0.0 - ((m21 * m33) - (m23 * m31)));\n\tdst[c31] = ((m21 * m32) - (m22 * m31));\n\tdst[c12] = (0.0 - ((m12 * m33) - (m13 * m32)));\n\tdst[c22] = ((m11 * m33) - (m13 * m31));\n\tdst[c32] = (0.0 - ((m11 * m32) - (m12 * m31)));\n\tdst[c13] = ((m12 * m23) - (m13 * m22));\n\tdst[c23] = (0.0 - ((m11 * m23) - (m13 * m21)));\n\tdst[c33] = ((m11 * m22) - (m12 * m21));\n\tinterpreterProxy->pop(argc + 1);\n\treturn interpreterProxy->push(dstOop);\n}\n\n\n/*\tPerform an ARC4 transform of input.\n\tArguments:\n\tbuffer\t\t<ByteArray> transformed data\n\tstartIndex <Integer>\tstart of transform\n\tstopIndex\t<Integer>\tend of transform\n\tm\t\t\t<ByteArray>\tkey stream data\n\tx\t\t\t<Integer>\tkey state value\n\ty\t\t\t<Integer>\tkey state value\n\tReturn value:\n\tx@y - updated key state value\n\t */\n\nEXPORT(sqInt)\nprimitiveARC4Transform(void)\n{\n    sqInt a;\n    sqInt b;\n    unsigned char *buffer;\n    sqInt bufOop;\n    sqInt bufSize;\n    sqInt i;\n    unsigned char *m;\n    sqInt mask;\n    sqInt mOop;\n    sqInt ptOop;\n    sqInt startIndex;\n    sqInt stopIndex;\n    sqInt x;\n    sqInt xOop;\n    sqInt y;\n    sqInt yOop;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 6)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\ty = interpreterProxy->stackIntegerValue(0);\n\tx = interpreterProxy->stackIntegerValue(1);\n\tmOop = interpreterProxy->stackObjectValue(2);\n\tstopIndex = interpreterProxy->stackIntegerValue(3);\n\tstartIndex = interpreterProxy->stackIntegerValue(4);\n\tbufOop = interpreterProxy->stackObjectValue(5);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!((interpreterProxy->isBytes(mOop))\n\t\t && (interpreterProxy->isBytes(bufOop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!((interpreterProxy->byteSizeOf(mOop)) == 256)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tbufSize = interpreterProxy->byteSizeOf(bufOop);\n\tif (!((startIndex > 0)\n\t\t && (startIndex <= bufSize))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!((stopIndex >= startIndex)\n\t\t && (stopIndex <= bufSize))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tm = interpreterProxy->firstIndexableField(mOop);\n\tbuffer = interpreterProxy->firstIndexableField(bufOop);\n\tfor (i = (startIndex - 1); i <= (stopIndex - 1); i += 1) {\n\t\tx = (x + 1) & 255;\n\t\ta = m[x];\n\t\ty = (y + a) & 255;\n\t\tb = m[y];\n\t\tm[x] = b;\n\t\tm[y] = a;\n\t\tmask = m[(a + b) & 255];\n\t\tbuffer[i] = ((buffer[i]) ^ mask);\n\t}\n\tptOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classPoint(), 0);\n\tinterpreterProxy->pushRemappableOop(ptOop);\n\txOop = interpreterProxy->positive32BitIntegerFor(x);\n\tinterpreterProxy->pushRemappableOop(xOop);\n\tyOop = interpreterProxy->positive32BitIntegerFor(y);\n\txOop = interpreterProxy->popRemappableOop();\n\tptOop = interpreterProxy->popRemappableOop();\n\tinterpreterProxy->storePointerofObjectwithValue(0, ptOop, xOop);\n\tinterpreterProxy->storePointerofObjectwithValue(1, ptOop, yOop);\n\tinterpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);\n\treturn interpreterProxy->push(ptOop);\n}\n\n\n/*\tComputes the determinant of the upper 3x3 of a Matrix4x4 */\n\nEXPORT(sqInt)\nprimitiveDet3(void)\n{\n    sqInt argc;\n    double det;\n    double m11;\n    double m12;\n    double m13;\n    double m21;\n    double m22;\n    double m23;\n    double m31;\n    double m32;\n    double m33;\n    float *src;\n    sqInt srcOop;\n\n\targc = interpreterProxy->methodArgumentCount();\n\tif (!(argc == 0)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tflag(\"stackArgv\");\n\tsrcOop = interpreterProxy->stackObjectValue(argc);\n\tsrc = interpreterProxy->firstIndexableField(srcOop);\n\tm11 = src[0];\n\tm12 = src[1];\n\tm13 = src[2];\n\tm21 = src[4];\n\tm22 = src[5];\n\tm23 = src[6];\n\tm31 = src[8];\n\tm32 = src[9];\n\n\t/* do the actual work */\n\n\tm33 = src[10];\n\tdet = ((m11 * ((m22 * m33) - (m23 * m32))) + (m12 * ((m23 * m31) - (m21 * m33)))) + (m13 * ((m21 * m32) - (m22 * m31)));\n\tinterpreterProxy->pop(argc + 1);\n\treturn interpreterProxy->pushFloat(det);\n}\n\n\n/*\tPrimitive. Gather good random entropy from a system source. */\n\nEXPORT(sqInt)\nprimitiveGatherEntropy(void)\n{\n    sqInt bufOop;\n    void *bufPtr;\n    sqInt bufSize;\n    sqInt okay;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tbufOop = interpreterProxy->stackObjectValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!(interpreterProxy->isBytes(bufOop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tbufSize = interpreterProxy->byteSizeOf(bufOop);\n\tbufPtr = interpreterProxy->firstIndexableField(bufOop);\n\tokay = ioGatherEntropy(bufPtr, bufSize);\n\tif (!(okay)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);\n\treturn interpreterProxy->pushBool(1);\n}\n\n\n/*\tPrimitive. Perform an inplace house holder matrix inversion */\n\nEXPORT(sqInt)\nprimitiveInplaceHouseHolderInvert(void)\n{\n    double beta;\n    double d[4][4];\n    sqInt i;\n    sqInt j;\n    sqInt k;\n    double m[4][4];\n    sqInt r;\n    float *rcvr;\n    double s;\n    double sigma;\n    double sum;\n    double x[4][4] = { {1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1} };\n\n\t;\n\trcvr = stackMatrix(0);\n\tfor (i = 0; i <= 3; i += 1) {\n\t\tfor (j = 0; j <= 3; j += 1) {\n\t\t\t(m[i])[j] = (rcvr[(i * 4) + j]);\n\t\t}\n\t}\n\tfor (j = 0; j <= 3; j += 1) {\n\t\tsigma = 0.0;\n\t\tfor (i = j; i <= 3; i += 1) {\n\t\t\tsigma += ((m[i])[j]) * ((m[i])[j]);\n\t\t}\n\t\tif (sigma < 1.0e-10) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t\tif (((m[j])[j]) < 0.0) {\n\t\t\ts = sqrt(sigma);\n\t\t}\n\t\telse {\n\t\t\ts = 0.0 - (sqrt(sigma));\n\t\t}\n\t\tfor (r = 0; r <= 3; r += 1) {\n\t\t\t(d[j])[r] = s;\n\t\t}\n\t\tbeta = 1.0 / ((s * ((m[j])[j])) - sigma);\n\t\t(m[j])[j] = (((m[j])[j]) - s);\n\t\tfor (k = (j + 1); k <= 3; k += 1) {\n\t\t\tsum = 0.0;\n\t\t\tfor (i = j; i <= 3; i += 1) {\n\t\t\t\tsum += ((m[i])[j]) * ((m[i])[k]);\n\t\t\t}\n\t\t\tsum = sum * beta;\n\t\t\tfor (i = j; i <= 3; i += 1) {\n\t\t\t\t(m[i])[k] = (((m[i])[k]) + (((m[i])[j]) * sum));\n\t\t\t}\n\t\t}\n\t\tfor (r = 0; r <= 3; r += 1) {\n\t\t\tsum = 0.0;\n\t\t\tfor (i = j; i <= 3; i += 1) {\n\t\t\t\tsum += ((x[i])[r]) * ((m[i])[j]);\n\t\t\t}\n\t\t\tsum = sum * beta;\n\t\t\tfor (i = j; i <= 3; i += 1) {\n\t\t\t\t(x[i])[r] = (((x[i])[r]) + (sum * ((m[i])[j])));\n\t\t\t}\n\t\t}\n\t}\n\tfor (r = 0; r <= 3; r += 1) {\n\t\tfor (i = 3; i >= 0; i += -1) {\n\t\t\tfor (j = (i + 1); j <= 3; j += 1) {\n\t\t\t\t(x[i])[r] = (((x[i])[r]) - (((x[j])[r]) * ((m[i])[j])));\n\t\t\t}\n\t\t\t(x[i])[r] = (((x[i])[r]) / ((d[i])[r]));\n\t\t}\n\t}\n\tfor (i = 0; i <= 3; i += 1) {\n\t\tfor (j = 0; j <= 3; j += 1) {\n\t\t\trcvr[(i * 4) + j] = (((float) ((x[i])[j])));\n\t\t}\n\t}\n\treturn null;\n}\n\n\n/*\tComputes the inverse of the Matrix4x4 receiver, using the 'classical\n\tadjoint' method,\n\tplacing the results the the Matrix4x4 argument,\n\t\n */\n\nEXPORT(sqInt)\nprimitiveInverseByAdjoint(void)\n{\n    sqInt argc;\n    const int c11 = 0;\n    const int c12 = 1;\n    const int c13 = 2;\n    const int c14 = 3;\n    const int c21 = 4;\n    const int c22 = 5;\n    const int c23 = 6;\n    const int c24 = 7;\n    const int c31 = 8;\n    const int c32 = 9;\n    const int c33 = 10;\n    const int c34 = 11;\n    double det;\n    float *dst;\n    sqInt dstOop;\n    double m11;\n    double m12;\n    double m13;\n    double m21;\n    double m22;\n    double m23;\n    double m31;\n    double m32;\n    double m33;\n    float *src;\n    sqInt srcOop;\n    double x;\n    double y;\n    double z;\n\n\t;\n\targc = interpreterProxy->methodArgumentCount();\n\tif (!(argc == 1)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tflag(\"stackArgv\");\n\tsrcOop = interpreterProxy->stackObjectValue(argc);\n\tsrc = interpreterProxy->firstIndexableField(srcOop);\n\tdstOop = interpreterProxy->stackObjectValue(argc - 1);\n\n\t/* read in the source matrix 3x3, which contains the encoded rotation and scale factors */\n\n\tdst = interpreterProxy->firstIndexableField(dstOop);\n\tm11 = src[c11];\n\tm12 = src[c12];\n\tm13 = src[c13];\n\tm21 = src[c21];\n\tm22 = src[c22];\n\tm23 = src[c23];\n\tm31 = src[c31];\n\tm32 = src[c32];\n\n\t/* read in the source translation vector */\n\n\tm33 = src[c33];\n\tx = src[c14];\n\ty = src[c24];\n\n\t/* do the actual work */\n\t/* first, compute the determinant of the upper 3x3 of the source */\n\n\tz = src[c34];\n\n\t/* Compute the classical adjunct of the source, and divide by the source determinant\n\tstoring in the destination.  adjoint = transpose of cofactors, so we'll transpose as we store. */\n\n\tdet = ((m11 * ((m22 * m33) - (m23 * m32))) + (m12 * ((m23 * m31) - (m21 * m33)))) + (m13 * ((m21 * m32) - (m22 * m31)));\n\n\t/* let's make div by det a multiply */\n\n\tdet = 1 / det;\n\tdst[c11] = (((m22 * m33) - (m23 * m32)) * det);\n\tdst[c21] = ((0.0 - ((m21 * m33) - (m23 * m31))) * det);\n\tdst[c31] = (((m21 * m32) - (m22 * m31)) * det);\n\tdst[c12] = ((0.0 - ((m12 * m33) - (m13 * m32))) * det);\n\tdst[c22] = (((m11 * m33) - (m13 * m31)) * det);\n\tdst[c32] = ((0.0 - ((m11 * m32) - (m12 * m31))) * det);\n\tdst[c13] = (((m12 * m23) - (m13 * m22)) * det);\n\tdst[c23] = ((0.0 - ((m11 * m23) - (m13 * m21))) * det);\n\tdst[c33] = (((m11 * m22) - (m12 * m21)) * det);\n\tm11 = dst[c11];\n\tm12 = dst[c12];\n\tm13 = dst[c13];\n\tm21 = dst[c21];\n\tm22 = dst[c22];\n\tm23 = dst[c23];\n\tm31 = dst[c31];\n\tm32 = dst[c32];\n\tm33 = dst[c33];\n\tdst[c14] = (0.0 - (((x * m11) + (y * m12)) + (z * m13)));\n\tdst[c24] = (0.0 - (((x * m21) + (y * m22)) + (z * m23)));\n\tdst[c34] = (0.0 - (((x * m31) + (y * m32)) + (z * m33)));\n\tinterpreterProxy->pop(argc + 1);\n\treturn interpreterProxy->push(dstOop);\n}\n\n\n/*\tPerform an MD5 transform of input */\n\nEXPORT(sqInt)\nprimitiveMD5Transform(void)\n{\n    unsigned int *buffer;\n    sqInt bufOop;\n    unsigned int *hash;\n    sqInt hashOop;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 2)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\thashOop = interpreterProxy->stackObjectValue(0);\n\tif (!((interpreterProxy->isWords(hashOop))\n\t\t && ((interpreterProxy->slotSizeOf(hashOop)) == 4))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\thash = interpreterProxy->firstIndexableField(hashOop);\n\tbufOop = interpreterProxy->stackObjectValue(1);\n\tif (!((interpreterProxy->isWords(bufOop))\n\t\t && ((interpreterProxy->slotSizeOf(bufOop)) == 16))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tbuffer = interpreterProxy->firstIndexableField(bufOop);\n\tMD5Transform(hash, buffer);\n\tinterpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);\n\treturn interpreterProxy->push(bufOop);\n}\n\nEXPORT(sqInt)\nprimitiveOrthoNormInverseMatrix(void)\n{\n    float *dst;\n    sqInt dstOop;\n    double rx;\n    double ry;\n    double rz;\n    float *src;\n    sqInt srcOop;\n    double x;\n    double y;\n    double z;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 0)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tsrcOop = interpreterProxy->stackObjectValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!((interpreterProxy->isWords(srcOop))\n\t\t && ((interpreterProxy->slotSizeOf(srcOop)) == 16))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\n\t/* reload srcOop in case of GC */\n\n\tdstOop = interpreterProxy->clone(srcOop);\n\tsrcOop = interpreterProxy->stackObjectValue(0);\n\tsrc = interpreterProxy->firstIndexableField(srcOop);\n\n\t/* Transpose upper 3x3 matrix */\n\t/* dst at: 0 put: (src at: 0). */\n\n\tdst = interpreterProxy->firstIndexableField(dstOop);\n\tdst[1] = (src[4]);\n\tdst[2] = (src[8]);\n\tdst[4] = (src[1]);\n\tdst[6] = (src[9]);\n\tdst[8] = (src[2]);\n\tdst[9] = (src[6]);\n\tx = src[3];\n\ty = src[7];\n\tz = src[11];\n\trx = ((x * (dst[0])) + (y * (dst[1]))) + (z * (dst[2]));\n\try = ((x * (dst[4])) + (y * (dst[5]))) + (z * (dst[6]));\n\trz = ((x * (dst[8])) + (y * (dst[9]))) + (z * (dst[10]));\n\tdst[3] = (((float) (0.0 - rx)));\n\tdst[7] = (((float) (0.0 - ry)));\n\tdst[11] = (((float) (0.0 - rz)));\n\tinterpreterProxy->pop(1);\n\treturn interpreterProxy->push(dstOop);\n}\n\nEXPORT(sqInt)\nprimitiveTransformDirection(void)\n{\n    float *matrix;\n    double rx;\n    double ry;\n    double rz;\n    sqInt v3Oop;\n    float *vertex;\n    double x;\n    double y;\n    double z;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tv3Oop = interpreterProxy->stackObjectValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!((interpreterProxy->isWords(v3Oop))\n\t\t && ((interpreterProxy->slotSizeOf(v3Oop)) == 3))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tvertex = interpreterProxy->firstIndexableField(v3Oop);\n\tmatrix = stackMatrix(1);\n\tif (matrix == null) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tx = vertex[0];\n\ty = vertex[1];\n\tz = vertex[2];\n\trx = ((x * (matrix[0])) + (y * (matrix[1]))) + (z * (matrix[2]));\n\try = ((x * (matrix[4])) + (y * (matrix[5]))) + (z * (matrix[6]));\n\trz = ((x * (matrix[8])) + (y * (matrix[9]))) + (z * (matrix[10]));\n\tv3Oop = interpreterProxy->clone(v3Oop);\n\tvertex = interpreterProxy->firstIndexableField(v3Oop);\n\tvertex[0] = (((float) rx));\n\tvertex[1] = (((float) ry));\n\tvertex[2] = (((float) rz));\n\tinterpreterProxy->pop(2);\n\treturn interpreterProxy->push(v3Oop);\n}\n\n\n/*\tTransform two matrices into the third */\n\nEXPORT(sqInt)\nprimitiveTransformMatrixWithInto(void)\n{\n    double c1;\n    double c2;\n    double c3;\n    double c4;\n    sqInt i;\n    float *m1;\n    float *m11;\n    float *m2;\n    float *m21;\n    float *m3;\n    float *m31;\n\n\tm3 = stackMatrix(0);\n\tm2 = stackMatrix(1);\n\tm1 = stackMatrix(2);\n\tif (((m1 == null) || (m2 == null)) || (m3 == null)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (m2 == m3) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\t/* begin transformMatrix:with:into: */\n\tm11 = ((float *) m1);\n\tm21 = ((float *) m2);\n\tm31 = ((float *) m3);\n\tfor (i = 0; i <= 3; i += 1) {\n\n\t\t/* Compute next row */\n\n\t\tc1 = ((((((double) (m11[0]) )) * (((double) (m21[0]) ))) + ((((double) (m11[1]) )) * (((double) (m21[4]) )))) + ((((double) (m11[2]) )) * (((double) (m21[8]) )))) + ((((double) (m11[3]) )) * (((double) (m21[12]) )));\n\t\tc2 = ((((((double) (m11[0]) )) * (((double) (m21[1]) ))) + ((((double) (m11[1]) )) * (((double) (m21[5]) )))) + ((((double) (m11[2]) )) * (((double) (m21[9]) )))) + ((((double) (m11[3]) )) * (((double) (m21[13]) )));\n\t\tc3 = ((((((double) (m11[0]) )) * (((double) (m21[2]) ))) + ((((double) (m11[1]) )) * (((double) (m21[6]) )))) + ((((double) (m11[2]) )) * (((double) (m21[10]) )))) + ((((double) (m11[3]) )) * (((double) (m21[14]) )));\n\n\t\t/* Store result */\n\n\t\tc4 = ((((((double) (m11[0]) )) * (((double) (m21[3]) ))) + ((((double) (m11[1]) )) * (((double) (m21[7]) )))) + ((((double) (m11[2]) )) * (((double) (m21[11]) )))) + ((((double) (m11[3]) )) * (((double) (m21[15]) )));\n\t\tm31[0] = c1;\n\t\tm31[1] = c2;\n\t\tm31[2] = c3;\n\t\tm31[3] = c4;\n\t\tm11 += 4;\n\t\tm31 += 4;\n\t}\n\treturn interpreterProxy->pop(3);\n}\n\nEXPORT(sqInt)\nprimitiveTransformVector3(void)\n{\n    float *matrix;\n    double rw;\n    double rx;\n    double ry;\n    double rz;\n    sqInt v3Oop;\n    float *vertex;\n    double x;\n    double y;\n    double z;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tv3Oop = interpreterProxy->stackObjectValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!((interpreterProxy->isWords(v3Oop))\n\t\t && ((interpreterProxy->slotSizeOf(v3Oop)) == 3))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tvertex = interpreterProxy->firstIndexableField(v3Oop);\n\tmatrix = stackMatrix(1);\n\tif (matrix == null) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tx = vertex[0];\n\ty = vertex[1];\n\tz = vertex[2];\n\trx = (((x * (matrix[0])) + (y * (matrix[1]))) + (z * (matrix[2]))) + (matrix[3]);\n\try = (((x * (matrix[4])) + (y * (matrix[5]))) + (z * (matrix[6]))) + (matrix[7]);\n\trz = (((x * (matrix[8])) + (y * (matrix[9]))) + (z * (matrix[10]))) + (matrix[11]);\n\trw = (((x * (matrix[12])) + (y * (matrix[13]))) + (z * (matrix[14]))) + (matrix[15]);\n\tv3Oop = interpreterProxy->clone(v3Oop);\n\tvertex = interpreterProxy->firstIndexableField(v3Oop);\n\tif (rw == 1.0) {\n\t\tvertex[0] = (((float) rx));\n\t\tvertex[1] = (((float) ry));\n\t\tvertex[2] = (((float) rz));\n\t}\n\telse {\n\t\tif (rw == 0.0) {\n\t\t\trw = 0.0;\n\t\t}\n\t\telse {\n\t\t\trw = 1.0 / rw;\n\t\t}\n\t\tvertex[0] = (((float) (rx * rw)));\n\t\tvertex[1] = (((float) (ry * rw)));\n\t\tvertex[2] = (((float) (rz * rw)));\n\t}\n\tinterpreterProxy->pop(2);\n\treturn interpreterProxy->push(v3Oop);\n}\n\nEXPORT(sqInt)\nprimitiveTransposeMatrix(void)\n{\n    float *dst;\n    sqInt dstOop;\n    float *src;\n    sqInt srcOop;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 0)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tsrcOop = interpreterProxy->stackObjectValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!((interpreterProxy->isWords(srcOop))\n\t\t && ((interpreterProxy->slotSizeOf(srcOop)) == 16))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\n\t/* reload srcOop in case of GC */\n\n\tdstOop = interpreterProxy->clone(srcOop);\n\tsrcOop = interpreterProxy->stackObjectValue(0);\n\tsrc = interpreterProxy->firstIndexableField(srcOop);\n\n\t/* dst at: 0 put: (src at: 0). */\n\n\tdst = interpreterProxy->firstIndexableField(dstOop);\n\tdst[1] = (src[4]);\n\tdst[2] = (src[8]);\n\tdst[3] = (src[12]);\n\tdst[4] = (src[1]);\n\tdst[6] = (src[9]);\n\tdst[7] = (src[13]);\n\tdst[8] = (src[2]);\n\tdst[9] = (src[6]);\n\tdst[11] = (src[14]);\n\tdst[12] = (src[3]);\n\tdst[13] = (src[7]);\n\tdst[14] = (src[11]);\n\tinterpreterProxy->pop(1);\n\treturn interpreterProxy->push(dstOop);\n}\n\n\n/*\tPrimitive. Answer whether an AABB intersects with a given triangle */\n\nEXPORT(sqInt)\nprimitiveTriBoxIntersects(void)\n{\n    float *maxCorner;\n    float *minCorner;\n    sqInt result;\n    float *v0;\n    float *v1;\n    float *v2;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 5)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tv2 = stackVector3(0);\n\tv1 = stackVector3(1);\n\tv0 = stackVector3(2);\n\tmaxCorner = stackVector3(3);\n\tminCorner = stackVector3(4);\n\tresult = triBoxOverlap(minCorner, maxCorner, v0, v1, v2);\n\tif (result < 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop(6);\n\treturn interpreterProxy->pushBool(result);\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n    sqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\n/*\tLoad a 4x4 transformation matrix from the interpreter stack.\n\tReturn a pointer to the matrix data if successful, nil otherwise. */\n\nstatic void*\nstackMatrix(sqInt index)\n{\n    sqInt oop;\n\n\toop = interpreterProxy->stackObjectValue(index);\n\tif (oop == null) {\n\t\treturn null;\n\t}\n\tif ((interpreterProxy->isWords(oop))\n\t && ((interpreterProxy->slotSizeOf(oop)) == 16)) {\n\t\treturn interpreterProxy->firstIndexableField(oop);\n\t}\n\treturn null;\n}\n\n\n/*\tLoad a Vector3 from the interpreter stack.\n\tReturn a pointer to the float data if successful, nil otherwise. */\n\nstatic void*\nstackVector3(sqInt index)\n{\n    sqInt oop;\n\n\toop = interpreterProxy->stackObjectValue(index);\n\tif (oop == null) {\n\t\treturn null;\n\t}\n\tif ((interpreterProxy->isWords(oop))\n\t && ((interpreterProxy->slotSizeOf(oop)) == 3)) {\n\t\treturn interpreterProxy->firstIndexableField(oop);\n\t}\n\treturn null;\n}\n\n\n/*\tTransform src with arg into dst.\n\tIt is allowed that src == dst but not arg == dst */\n\nstatic sqInt\ntransformMatrixwithinto(float *src, float *arg, float *dst)\n{\n    double c1;\n    double c2;\n    double c3;\n    double c4;\n    sqInt i;\n    float *m1;\n    float *m2;\n    float *m3;\n\n\tm1 = ((float *) src);\n\tm2 = ((float *) arg);\n\tm3 = ((float *) dst);\n\tfor (i = 0; i <= 3; i += 1) {\n\n\t\t/* Compute next row */\n\n\t\tc1 = ((((((double) (m1[0]) )) * (((double) (m2[0]) ))) + ((((double) (m1[1]) )) * (((double) (m2[4]) )))) + ((((double) (m1[2]) )) * (((double) (m2[8]) )))) + ((((double) (m1[3]) )) * (((double) (m2[12]) )));\n\t\tc2 = ((((((double) (m1[0]) )) * (((double) (m2[1]) ))) + ((((double) (m1[1]) )) * (((double) (m2[5]) )))) + ((((double) (m1[2]) )) * (((double) (m2[9]) )))) + ((((double) (m1[3]) )) * (((double) (m2[13]) )));\n\t\tc3 = ((((((double) (m1[0]) )) * (((double) (m2[2]) ))) + ((((double) (m1[1]) )) * (((double) (m2[6]) )))) + ((((double) (m1[2]) )) * (((double) (m2[10]) )))) + ((((double) (m1[3]) )) * (((double) (m2[14]) )));\n\n\t\t/* Store result */\n\n\t\tc4 = ((((((double) (m1[0]) )) * (((double) (m2[3]) ))) + ((((double) (m1[1]) )) * (((double) (m2[7]) )))) + ((((double) (m1[2]) )) * (((double) (m2[11]) )))) + ((((double) (m1[3]) )) * (((double) (m2[15]) )));\n\t\tm3[0] = c1;\n\t\tm3[1] = c2;\n\t\tm3[2] = c3;\n\t\tm3[3] = c4;\n\t\tm1 += 4;\n\t\tm3 += 4;\n\t}\n\treturn null;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* CroquetPlugin_exports[][3] = {\n\t{\"CroquetPlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"CroquetPlugin\", \"primitiveAdj3\", (void*)primitiveAdj3},\n\t{\"CroquetPlugin\", \"primitiveARC4Transform\", (void*)primitiveARC4Transform},\n\t{\"CroquetPlugin\", \"primitiveDet3\", (void*)primitiveDet3},\n\t{\"CroquetPlugin\", \"primitiveGatherEntropy\", (void*)primitiveGatherEntropy},\n\t{\"CroquetPlugin\", \"primitiveInplaceHouseHolderInvert\", (void*)primitiveInplaceHouseHolderInvert},\n\t{\"CroquetPlugin\", \"primitiveInverseByAdjoint\", (void*)primitiveInverseByAdjoint},\n\t{\"CroquetPlugin\", \"primitiveMD5Transform\", (void*)primitiveMD5Transform},\n\t{\"CroquetPlugin\", \"primitiveOrthoNormInverseMatrix\", (void*)primitiveOrthoNormInverseMatrix},\n\t{\"CroquetPlugin\", \"primitiveTransformDirection\", (void*)primitiveTransformDirection},\n\t{\"CroquetPlugin\", \"primitiveTransformMatrixWithInto\", (void*)primitiveTransformMatrixWithInto},\n\t{\"CroquetPlugin\", \"primitiveTransformVector3\", (void*)primitiveTransformVector3},\n\t{\"CroquetPlugin\", \"primitiveTransposeMatrix\", (void*)primitiveTransposeMatrix},\n\t{\"CroquetPlugin\", \"primitiveTriBoxIntersects\", (void*)primitiveTriBoxIntersects},\n\t{\"CroquetPlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/DSAPrims/DSAPrims.c",
    "content": "/* Automatically generated by\n\tVMPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tDSAPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"DSAPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n\n/*** Function Prototypes ***/\nstatic sqInt addBackDivisorDigitShift(sqInt digitShift);\nstatic sqInt bigDivideLoop(void);\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nstatic sqInt leftRotateby(unsigned int  anInteger, sqInt bits);\nstatic sqInt msg(char *s);\nEXPORT(sqInt) primitiveBigDivide(void);\nEXPORT(sqInt) primitiveBigMultiply(void);\nEXPORT(sqInt) primitiveExpandBlock(void);\nEXPORT(sqInt) primitiveHashBlock(void);\nEXPORT(sqInt) primitiveHasSecureHashPrimitive(void);\nEXPORT(sqInt) primitiveHighestNonZeroDigitIndex(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\nstatic sqInt subtractDivisorMultipliedByDigitdigitShift(sqInt digit, sqInt digitShift);\n\n\n/*** Variables ***/\nstatic sqInt divisorDigitCount;\nstatic unsigned char* dsaDivisor;\nstatic unsigned char* dsaQuotient;\nstatic unsigned char* dsaRemainder;\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"DSAPrims VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"DSAPrims VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\nstatic sqInt remainderDigitCount;\n\n\n\n/*\tAdd back the divisor shifted left by the given number of digits. This is\n\tdone only when the estimate of quotient digit was one larger than the\n\tcorrect value.\n */\n\nstatic sqInt\naddBackDivisorDigitShift(sqInt digitShift)\n{\n    sqInt carry;\n    sqInt i;\n    sqInt rIndex;\n    sqInt sum;\n\n\tcarry = 0;\n\trIndex = digitShift + 1;\n\tfor (i = 1; i <= divisorDigitCount; i += 1) {\n\t\tsum = ((dsaRemainder[rIndex]) + (dsaDivisor[i])) + carry;\n\t\tdsaRemainder[rIndex] = (sum & 255);\n\t\tcarry = ((usqInt) sum >> 8);\n\t\trIndex += 1;\n\t}\n\tsum = (dsaRemainder[rIndex]) + carry;\n\tdsaRemainder[rIndex] = (sum & 255);\n}\n\n\n/*\tThis is the core of the divide algorithm. This loop steps through the\n\tdigit positions of the quotient, each time estimating the right quotient\n\tdigit, subtracting from the remainder the divisor times the quotient digit\n\tshifted left by the appropriate number of digits. When the loop\n\tterminates, all digits of the quotient have been filled in and the\n\tremainder contains a value less than the divisor. The tricky bit is\n\testimating the next quotient digit. Knuth shows that the digit estimate\n\tcomputed here will never be less than it should be and cannot be more than\n\tone over what it should be. Furthermore, the case where the estimate is\n\tone too large is extremely rare. For example, in a typical test of 100000\n\trandom 60-bit division problems, the rare case only occured five times.\n\tSee Knuth, volume 2 ('Semi-Numerical Algorithms') 2nd edition, pp. 257-260\n */\n/*\textract the top two digits of the divisor */\n\nstatic sqInt\nbigDivideLoop(void)\n{\n    sqInt borrow;\n    sqInt carry;\n    sqInt d1;\n    sqInt d2;\n    sqInt digitShift;\n    sqInt firstDigit;\n    sqInt firstTwoDigits;\n    sqInt i;\n    sqInt i1;\n    sqInt j;\n    sqInt prod;\n    sqInt q;\n    sqInt qTooBig;\n    sqInt resultDigit;\n    sqInt rIndex;\n    sqInt rIndex1;\n    sqInt sum;\n    sqInt thirdDigit;\n\n\td1 = dsaDivisor[divisorDigitCount];\n\td2 = dsaDivisor[divisorDigitCount - 1];\n\tfor (j = remainderDigitCount; j >= (divisorDigitCount + 1); j += -1) {\n\n\t\t/* extract the top several digits of remainder. */\n\n\t\tfirstDigit = dsaRemainder[j];\n\t\tfirstTwoDigits = (((usqInt) firstDigit << 8)) + (dsaRemainder[j - 1]);\n\n\t\t/* estimate q, the next digit of the quotient */\n\n\t\tthirdDigit = dsaRemainder[j - 2];\n\t\tif (firstDigit == d1) {\n\t\t\tq = 255;\n\t\t}\n\t\telse {\n\t\t\tq = firstTwoDigits / d1;\n\t\t}\n\t\tif ((d2 * q) > ((((usqInt) (firstTwoDigits - (q * d1)) << 8)) + thirdDigit)) {\n\t\t\tq -= 1;\n\t\t\tif ((d2 * q) > ((((usqInt) (firstTwoDigits - (q * d1)) << 8)) + thirdDigit)) {\n\t\t\t\tq -= 1;\n\t\t\t}\n\t\t}\n\t\tdigitShift = (j - divisorDigitCount) - 1;\n\t\tif (q > 0) {\n\t\t\t/* begin subtractDivisorMultipliedByDigit:digitShift: */\n\t\t\tborrow = 0;\n\t\t\trIndex1 = digitShift + 1;\n\t\t\tfor (i1 = 1; i1 <= divisorDigitCount; i1 += 1) {\n\t\t\t\tprod = ((dsaDivisor[i1]) * q) + borrow;\n\t\t\t\tborrow = ((usqInt) prod >> 8);\n\t\t\t\tresultDigit = (dsaRemainder[rIndex1]) - (prod & 255);\n\t\t\t\tif (resultDigit < 0) {\n\n\t\t\t\t\t/* borrow from the next digit */\n\n\t\t\t\t\tresultDigit += 256;\n\t\t\t\t\tborrow += 1;\n\t\t\t\t}\n\t\t\t\tdsaRemainder[rIndex1] = resultDigit;\n\t\t\t\trIndex1 += 1;\n\t\t\t}\n\t\t\tif (borrow == 0) {\n\t\t\t\tqTooBig = 0;\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t\tresultDigit = (dsaRemainder[rIndex1]) - borrow;\n\t\t\tif (resultDigit < 0) {\n\t\t\t\tdsaRemainder[rIndex1] = (resultDigit + 256);\n\t\t\t\tqTooBig = 1;\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdsaRemainder[rIndex1] = resultDigit;\n\t\t\t\tqTooBig = 0;\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\tl1:\t/* end subtractDivisorMultipliedByDigit:digitShift: */;\n\t\t\tif (qTooBig) {\n\t\t\t\t/* begin addBackDivisorDigitShift: */\n\t\t\t\tcarry = 0;\n\t\t\t\trIndex = digitShift + 1;\n\t\t\t\tfor (i = 1; i <= divisorDigitCount; i += 1) {\n\t\t\t\t\tsum = ((dsaRemainder[rIndex]) + (dsaDivisor[i])) + carry;\n\t\t\t\t\tdsaRemainder[rIndex] = (sum & 255);\n\t\t\t\t\tcarry = ((usqInt) sum >> 8);\n\t\t\t\t\trIndex += 1;\n\t\t\t\t}\n\t\t\t\tsum = (dsaRemainder[rIndex]) + carry;\n\t\t\t\tdsaRemainder[rIndex] = (sum & 255);\n\t\t\t\tq -= 1;\n\t\t\t}\n\t\t}\n\t\tdsaQuotient[digitShift + 1] = q;\n\t}\n}\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\n\n/*\tRotate the given 32-bit integer left by the given number of bits and\n\tanswer the result.\n */\n\nstatic sqInt\nleftRotateby(unsigned int  anInteger, sqInt bits)\n{\n\treturn (anInteger << bits) | (((usqInt) anInteger) >> (32 - bits));\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\n\n/*\tCalled with three LargePositiveInteger arguments, rem, div, quo. Divide\n\tdiv into rem and store the quotient into quo, leaving the remainder in\n\trem. \n */\n/*\tAssume: quo starts out filled with zeros. */\n\nEXPORT(sqInt)\nprimitiveBigDivide(void)\n{\n    sqInt borrow;\n    sqInt carry;\n    sqInt d1;\n    sqInt d2;\n    sqInt digitShift;\n    sqInt div;\n    sqInt firstDigit;\n    sqInt firstTwoDigits;\n    sqInt i;\n    sqInt i1;\n    sqInt j;\n    sqInt prod;\n    sqInt q;\n    sqInt qTooBig;\n    sqInt quo;\n    sqInt rem;\n    sqInt resultDigit;\n    sqInt rIndex;\n    sqInt rIndex1;\n    sqInt sum;\n    sqInt thirdDigit;\n\n\tquo = interpreterProxy->stackObjectValue(0);\n\tdiv = interpreterProxy->stackObjectValue(1);\n\trem = interpreterProxy->stackObjectValue(2);\n\tinterpreterProxy->success((interpreterProxy->fetchClassOf(rem)) == (interpreterProxy->classLargePositiveInteger()));\n\tinterpreterProxy->success((interpreterProxy->fetchClassOf(div)) == (interpreterProxy->classLargePositiveInteger()));\n\tinterpreterProxy->success((interpreterProxy->fetchClassOf(quo)) == (interpreterProxy->classLargePositiveInteger()));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tdsaRemainder = interpreterProxy->firstIndexableField(rem);\n\tdsaDivisor = interpreterProxy->firstIndexableField(div);\n\tdsaQuotient = interpreterProxy->firstIndexableField(quo);\n\tdivisorDigitCount = interpreterProxy->stSizeOf(div);\n\n\t/* adjust pointers for base-1 indexing */\n\n\tremainderDigitCount = interpreterProxy->stSizeOf(rem);\n\tdsaRemainder -= 1;\n\tdsaDivisor -= 1;\n\tdsaQuotient -= 1;\n\t/* begin bigDivideLoop */\n\td1 = dsaDivisor[divisorDigitCount];\n\td2 = dsaDivisor[divisorDigitCount - 1];\n\tfor (j = remainderDigitCount; j >= (divisorDigitCount + 1); j += -1) {\n\n\t\t/* extract the top several digits of remainder. */\n\n\t\tfirstDigit = dsaRemainder[j];\n\t\tfirstTwoDigits = (((usqInt) firstDigit << 8)) + (dsaRemainder[j - 1]);\n\n\t\t/* estimate q, the next digit of the quotient */\n\n\t\tthirdDigit = dsaRemainder[j - 2];\n\t\tif (firstDigit == d1) {\n\t\t\tq = 255;\n\t\t}\n\t\telse {\n\t\t\tq = firstTwoDigits / d1;\n\t\t}\n\t\tif ((d2 * q) > ((((usqInt) (firstTwoDigits - (q * d1)) << 8)) + thirdDigit)) {\n\t\t\tq -= 1;\n\t\t\tif ((d2 * q) > ((((usqInt) (firstTwoDigits - (q * d1)) << 8)) + thirdDigit)) {\n\t\t\t\tq -= 1;\n\t\t\t}\n\t\t}\n\t\tdigitShift = (j - divisorDigitCount) - 1;\n\t\tif (q > 0) {\n\t\t\t/* begin subtractDivisorMultipliedByDigit:digitShift: */\n\t\t\tborrow = 0;\n\t\t\trIndex1 = digitShift + 1;\n\t\t\tfor (i1 = 1; i1 <= divisorDigitCount; i1 += 1) {\n\t\t\t\tprod = ((dsaDivisor[i1]) * q) + borrow;\n\t\t\t\tborrow = ((usqInt) prod >> 8);\n\t\t\t\tresultDigit = (dsaRemainder[rIndex1]) - (prod & 255);\n\t\t\t\tif (resultDigit < 0) {\n\n\t\t\t\t\t/* borrow from the next digit */\n\n\t\t\t\t\tresultDigit += 256;\n\t\t\t\t\tborrow += 1;\n\t\t\t\t}\n\t\t\t\tdsaRemainder[rIndex1] = resultDigit;\n\t\t\t\trIndex1 += 1;\n\t\t\t}\n\t\t\tif (borrow == 0) {\n\t\t\t\tqTooBig = 0;\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t\tresultDigit = (dsaRemainder[rIndex1]) - borrow;\n\t\t\tif (resultDigit < 0) {\n\t\t\t\tdsaRemainder[rIndex1] = (resultDigit + 256);\n\t\t\t\tqTooBig = 1;\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdsaRemainder[rIndex1] = resultDigit;\n\t\t\t\tqTooBig = 0;\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\tl1:\t/* end subtractDivisorMultipliedByDigit:digitShift: */;\n\t\t\tif (qTooBig) {\n\t\t\t\t/* begin addBackDivisorDigitShift: */\n\t\t\t\tcarry = 0;\n\t\t\t\trIndex = digitShift + 1;\n\t\t\t\tfor (i = 1; i <= divisorDigitCount; i += 1) {\n\t\t\t\t\tsum = ((dsaRemainder[rIndex]) + (dsaDivisor[i])) + carry;\n\t\t\t\t\tdsaRemainder[rIndex] = (sum & 255);\n\t\t\t\t\tcarry = ((usqInt) sum >> 8);\n\t\t\t\t\trIndex += 1;\n\t\t\t\t}\n\t\t\t\tsum = (dsaRemainder[rIndex]) + carry;\n\t\t\t\tdsaRemainder[rIndex] = (sum & 255);\n\t\t\t\tq -= 1;\n\t\t\t}\n\t\t}\n\t\tdsaQuotient[digitShift + 1] = q;\n\t}\n\tinterpreterProxy->pop(3);\n}\n\n\n/*\tMultiple f1 by f2, placing the result into prod. f1, f2, and prod must be\n\tLargePositiveIntegers, and the length of prod must be the sum of the\n\tlengths of f1 and f2.\n */\n/*\tAssume: prod starts out filled with zeros */\n\nEXPORT(sqInt)\nprimitiveBigMultiply(void)\n{\n    sqInt carry;\n    sqInt digit;\n    sqInt f1;\n    sqInt f1Len;\n    unsigned char *f1Ptr;\n    sqInt f2;\n    sqInt f2Len;\n    unsigned char *f2Ptr;\n    sqInt i;\n    sqInt j;\n    sqInt k;\n    sqInt prod;\n    sqInt prodLen;\n    unsigned char *prodPtr;\n    sqInt sum;\n\n\tprod = interpreterProxy->stackObjectValue(0);\n\tf2 = interpreterProxy->stackObjectValue(1);\n\tf1 = interpreterProxy->stackObjectValue(2);\n\tinterpreterProxy->success(interpreterProxy->isBytes(prod));\n\tinterpreterProxy->success(interpreterProxy->isBytes(f2));\n\tinterpreterProxy->success(interpreterProxy->isBytes(f1));\n\tinterpreterProxy->success((interpreterProxy->fetchClassOf(prod)) == (interpreterProxy->classLargePositiveInteger()));\n\tinterpreterProxy->success((interpreterProxy->fetchClassOf(f2)) == (interpreterProxy->classLargePositiveInteger()));\n\tinterpreterProxy->success((interpreterProxy->fetchClassOf(f1)) == (interpreterProxy->classLargePositiveInteger()));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tprodLen = interpreterProxy->stSizeOf(prod);\n\tf1Len = interpreterProxy->stSizeOf(f1);\n\tf2Len = interpreterProxy->stSizeOf(f2);\n\tinterpreterProxy->success(prodLen == (f1Len + f2Len));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tprodPtr = interpreterProxy->firstIndexableField(prod);\n\tf2Ptr = interpreterProxy->firstIndexableField(f2);\n\tf1Ptr = interpreterProxy->firstIndexableField(f1);\n\tfor (i = 0; i <= (f1Len - 1); i += 1) {\n\t\tif (((digit = f1Ptr[i])) != 0) {\n\t\t\tcarry = 0;\n\n\t\t\t/* Loop invariants: 0 <= carry <= 16rFF, k = i + j - 1 */\n\n\t\t\tk = i;\n\t\t\tfor (j = 0; j <= (f2Len - 1); j += 1) {\n\t\t\t\tsum = (((f2Ptr[j]) * digit) + (prodPtr[k])) + carry;\n\t\t\t\tcarry = ((usqInt) sum >> 8);\n\t\t\t\tprodPtr[k] = (sum & 255);\n\t\t\t\tk += 1;\n\t\t\t}\n\t\t\tprodPtr[k] = carry;\n\t\t}\n\t}\n\tinterpreterProxy->pop(3);\n}\n\n\n/*\tExpand a 64 byte ByteArray (the first argument) into and an Bitmap of 80\n\t32-bit words (the second argument). When reading a 32-bit integer from the\n\tByteArray, consider the first byte to contain the most significant bits of\n\tthe word (i.e., use big-endian byte ordering).\n */\n\nEXPORT(sqInt)\nprimitiveExpandBlock(void)\n{\n    sqInt buf;\n    unsigned char *bytePtr;\n    sqInt expanded;\n    sqInt i;\n    sqInt src;\n    sqInt v;\n    unsigned int *wordPtr;\n\n\texpanded = interpreterProxy->stackObjectValue(0);\n\tbuf = interpreterProxy->stackObjectValue(1);\n\tinterpreterProxy->success(interpreterProxy->isWords(expanded));\n\tinterpreterProxy->success(interpreterProxy->isBytes(buf));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->success((interpreterProxy->stSizeOf(expanded)) == 80);\n\tinterpreterProxy->success((interpreterProxy->stSizeOf(buf)) == 64);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\twordPtr = interpreterProxy->firstIndexableField(expanded);\n\tbytePtr = interpreterProxy->firstIndexableField(buf);\n\tsrc = 0;\n\tfor (i = 0; i <= 15; i += 1) {\n\t\tv = ((((bytePtr[src]) << 24) + ((bytePtr[src + 1]) << 16)) + ((bytePtr[src + 2]) << 8)) + (bytePtr[src + 3]);\n\t\twordPtr[i] = v;\n\t\tsrc += 4;\n\t}\n\tfor (i = 16; i <= 79; i += 1) {\n\t\tv = (((wordPtr[i - 3]) ^ (wordPtr[i - 8])) ^ (wordPtr[i - 14])) ^ (wordPtr[i - 16]);\n\t\tv = (v << 1) | (((usqInt) v) >> (32 - 1));\n\t\twordPtr[i] = v;\n\t}\n\tinterpreterProxy->pop(2);\n}\n\n\n/*\tHash a Bitmap of 80 32-bit words (the first argument), using the given\n\tstate (the second argument).\n */\n\nEXPORT(sqInt)\nprimitiveHashBlock(void)\n{\n    sqInt a;\n    sqInt b;\n    sqInt buf;\n    unsigned int *bufPtr;\n    sqInt c;\n    sqInt d;\n    sqInt e;\n    sqInt i;\n    sqInt state;\n    unsigned int *statePtr;\n    sqInt tmp;\n\n\tstate = interpreterProxy->stackObjectValue(0);\n\tbuf = interpreterProxy->stackObjectValue(1);\n\tinterpreterProxy->success(interpreterProxy->isWords(state));\n\tinterpreterProxy->success(interpreterProxy->isWords(buf));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->success((interpreterProxy->stSizeOf(state)) == 5);\n\tinterpreterProxy->success((interpreterProxy->stSizeOf(buf)) == 80);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tstatePtr = interpreterProxy->firstIndexableField(state);\n\tbufPtr = interpreterProxy->firstIndexableField(buf);\n\ta = statePtr[0];\n\tb = statePtr[1];\n\tc = statePtr[2];\n\td = statePtr[3];\n\te = statePtr[4];\n\tfor (i = 0; i <= 19; i += 1) {\n\t\ttmp = (((1518500249 + ((b & c) | ((~b) & d))) + ((a << 5) | (((usqInt) a) >> (32 - 5)))) + e) + (bufPtr[i]);\n\t\te = d;\n\t\td = c;\n\t\tc = (b << 30) | (((usqInt) b) >> (32 - 30));\n\t\tb = a;\n\t\ta = tmp;\n\t}\n\tfor (i = 20; i <= 39; i += 1) {\n\t\ttmp = (((1859775393 + ((b ^ c) ^ d)) + ((a << 5) | (((usqInt) a) >> (32 - 5)))) + e) + (bufPtr[i]);\n\t\te = d;\n\t\td = c;\n\t\tc = (b << 30) | (((usqInt) b) >> (32 - 30));\n\t\tb = a;\n\t\ta = tmp;\n\t}\n\tfor (i = 40; i <= 59; i += 1) {\n\t\ttmp = (((2400959708UL + (((b & c) | (b & d)) | (c & d))) + ((a << 5) | (((usqInt) a) >> (32 - 5)))) + e) + (bufPtr[i]);\n\t\te = d;\n\t\td = c;\n\t\tc = (b << 30) | (((usqInt) b) >> (32 - 30));\n\t\tb = a;\n\t\ta = tmp;\n\t}\n\tfor (i = 60; i <= 79; i += 1) {\n\t\ttmp = (((3395469782UL + ((b ^ c) ^ d)) + ((a << 5) | (((usqInt) a) >> (32 - 5)))) + e) + (bufPtr[i]);\n\t\te = d;\n\t\td = c;\n\t\tc = (b << 30) | (((usqInt) b) >> (32 - 30));\n\t\tb = a;\n\t\ta = tmp;\n\t}\n\tstatePtr[0] = ((statePtr[0]) + a);\n\tstatePtr[1] = ((statePtr[1]) + b);\n\tstatePtr[2] = ((statePtr[2]) + c);\n\tstatePtr[3] = ((statePtr[3]) + d);\n\tstatePtr[4] = ((statePtr[4]) + e);\n\tinterpreterProxy->pop(2);\n}\n\n\n/*\tAnswer true if the secure hash primitive is implemented. */\n\nEXPORT(sqInt)\nprimitiveHasSecureHashPrimitive(void)\n{\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushBool(1);\n}\n\n\n/*\tCalled with one LargePositiveInteger argument. Answer the index of the\n\ttop-most non-zero digit.\n */\n\nEXPORT(sqInt)\nprimitiveHighestNonZeroDigitIndex(void)\n{\n    sqInt arg;\n    unsigned char *bigIntPtr;\n    sqInt i;\n\n\targ = interpreterProxy->stackObjectValue(0);\n\tinterpreterProxy->success((interpreterProxy->fetchClassOf(arg)) == (interpreterProxy->classLargePositiveInteger()));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tbigIntPtr = interpreterProxy->firstIndexableField(arg);\n\ti = interpreterProxy->stSizeOf(arg);\n\twhile ((i > 0)\n && ((bigIntPtr[(i -= 1)]) == 0)) {\n\t}\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(i + 1);\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n    sqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\n/*\tMultiply the divisor by the given digit (an integer in the range 0..255),\n\tshift it left by the given number of digits, and subtract the result from\n\tthe current remainder. Answer true if there is an excess borrow,\n\tindicating that digit was one too large. (This case is quite rare.)\n */\n\nstatic sqInt\nsubtractDivisorMultipliedByDigitdigitShift(sqInt digit, sqInt digitShift)\n{\n    sqInt borrow;\n    sqInt i;\n    sqInt prod;\n    sqInt resultDigit;\n    sqInt rIndex;\n\n\tborrow = 0;\n\trIndex = digitShift + 1;\n\tfor (i = 1; i <= divisorDigitCount; i += 1) {\n\t\tprod = ((dsaDivisor[i]) * digit) + borrow;\n\t\tborrow = ((usqInt) prod >> 8);\n\t\tresultDigit = (dsaRemainder[rIndex]) - (prod & 255);\n\t\tif (resultDigit < 0) {\n\n\t\t\t/* borrow from the next digit */\n\n\t\t\tresultDigit += 256;\n\t\t\tborrow += 1;\n\t\t}\n\t\tdsaRemainder[rIndex] = resultDigit;\n\t\trIndex += 1;\n\t}\n\tif (borrow == 0) {\n\t\treturn 0;\n\t}\n\tresultDigit = (dsaRemainder[rIndex]) - borrow;\n\tif (resultDigit < 0) {\n\t\tdsaRemainder[rIndex] = (resultDigit + 256);\n\t\treturn 1;\n\t}\n\telse {\n\t\tdsaRemainder[rIndex] = resultDigit;\n\t\treturn 0;\n\t}\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* DSAPrims_exports[][3] = {\n\t{\"DSAPrims\", \"getModuleName\", (void*)getModuleName},\n\t{\"DSAPrims\", \"primitiveBigDivide\", (void*)primitiveBigDivide},\n\t{\"DSAPrims\", \"primitiveBigMultiply\", (void*)primitiveBigMultiply},\n\t{\"DSAPrims\", \"primitiveExpandBlock\", (void*)primitiveExpandBlock},\n\t{\"DSAPrims\", \"primitiveHashBlock\", (void*)primitiveHashBlock},\n\t{\"DSAPrims\", \"primitiveHasSecureHashPrimitive\", (void*)primitiveHasSecureHashPrimitive},\n\t{\"DSAPrims\", \"primitiveHighestNonZeroDigitIndex\", (void*)primitiveHighestNonZeroDigitIndex},\n\t{\"DSAPrims\", \"setInterpreter\", (void*)setInterpreter},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/DropPlugin/DropPlugin.c",
    "content": "/* Automatically generated by\n\tVMPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tDropPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"DropPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"DropPlugin.h\"\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n\n/*** Function Prototypes ***/\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nEXPORT(sqInt) initialiseModule(void);\nstatic sqInt msg(char *s);\nEXPORT(sqInt) primitiveDropRequestFileHandle(void);\nEXPORT(sqInt) primitiveDropRequestFileName(void);\nEXPORT(sqInt) setFileAccessCallback(int address);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\nEXPORT(sqInt) shutdownModule(void);\n\n\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"DropPlugin VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"DropPlugin VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\n\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nEXPORT(sqInt)\ninitialiseModule(void)\n{\n\treturn dropInit();\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\n\n/*\tNote: File handle creation needs to be handled by specific support code\n\texplicitly bypassing the plugin file sand box.\n */\n\nEXPORT(sqInt)\nprimitiveDropRequestFileHandle(void)\n{\n    sqInt dropIndex;\n    sqInt handleOop;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tdropIndex = interpreterProxy->stackIntegerValue(0);\n\n\t/* dropRequestFileHandle needs to return the actual oop returned */\n\n\thandleOop = dropRequestFileHandle(dropIndex);\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->push(handleOop);\n\t}\n}\n\n\n/*\tNote: File handle creation needs to be handled by specific support code\n\texplicitly bypassing the plugin file sand box.\n */\n\nEXPORT(sqInt)\nprimitiveDropRequestFileName(void)\n{\n    sqInt dropIndex;\n    char *dropName;\n    sqInt i;\n    sqInt nameLength;\n    sqInt nameOop;\n    char *namePtr;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tdropIndex = interpreterProxy->stackIntegerValue(0);\n\n\t/* dropRequestFileName returns name or NULL on error */\n\n\tdropName = dropRequestFileName(dropIndex);\n\tif (dropName == null) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tnameLength = strlen(dropName);\n\tnameOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), nameLength);\n\tnamePtr = interpreterProxy->firstIndexableField(nameOop);\n\tfor (i = 0; i <= (nameLength - 1); i += 1) {\n\t\tnamePtr[i] = (dropName[i]);\n\t}\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->push(nameOop);\n}\n\nEXPORT(sqInt)\nsetFileAccessCallback(int address)\n{\n\treturn sqSecFileAccessCallback((void *) address);\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n    sqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\nEXPORT(sqInt)\nshutdownModule(void)\n{\n\treturn dropShutdown();\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* DropPlugin_exports[][3] = {\n\t{\"DropPlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"DropPlugin\", \"initialiseModule\", (void*)initialiseModule},\n\t{\"DropPlugin\", \"primitiveDropRequestFileHandle\", (void*)primitiveDropRequestFileHandle},\n\t{\"DropPlugin\", \"primitiveDropRequestFileName\", (void*)primitiveDropRequestFileName},\n\t{\"DropPlugin\", \"setFileAccessCallback\", (void*)setFileAccessCallback},\n\t{\"DropPlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{\"DropPlugin\", \"shutdownModule\", (void*)shutdownModule},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/FFTPlugin/FFTPlugin.c",
    "content": "/* Automatically generated by\n\tVMPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tFFTPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"FFTPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n\n/*** Function Prototypes ***/\nstatic float * checkedFloatPtrOf(sqInt oop);\nstatic unsigned int * checkedWordPtrOf(sqInt oop);\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nstatic sqInt loadFFTFrom(sqInt fftOop);\nstatic sqInt msg(char *s);\nstatic sqInt permuteData(void);\nEXPORT(sqInt) primitiveFFTPermuteData(void);\nEXPORT(sqInt) primitiveFFTScaleData(void);\nEXPORT(sqInt) primitiveFFTTransformData(void);\nstatic sqInt scaleData(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\nstatic sqInt transformData(sqInt forward);\nstatic sqInt transformForward(sqInt forward);\n\n\n/*** Variables ***/\nstatic sqInt fftSize;\nstatic float * imagData;\nstatic sqInt imagDataSize;\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"FFTPlugin VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"FFTPlugin VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\nstatic sqInt nu;\nstatic unsigned int * permTable;\nstatic sqInt permTableSize;\nstatic float * realData;\nstatic sqInt realDataSize;\nstatic float * sinTable;\nstatic sqInt sinTableSize;\n\n\n\n/*\tReturn the first indexable word of oop which is assumed to be\n\tvariableWordSubclass \n */\n\nstatic float *\ncheckedFloatPtrOf(sqInt oop)\n{\n\tinterpreterProxy->success(interpreterProxy->isWords(oop));\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\treturn ((float *) (interpreterProxy->firstIndexableField(oop)));\n}\n\n\n/*\tReturn the first indexable word of oop which is assumed to be\n\tvariableWordSubclass \n */\n\nstatic unsigned int *\ncheckedWordPtrOf(sqInt oop)\n{\n\tinterpreterProxy->success(interpreterProxy->isWords(oop));\n\treturn ((unsigned int *) (interpreterProxy->firstIndexableField(oop)));\n}\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nstatic sqInt\nloadFFTFrom(sqInt fftOop)\n{\n    sqInt oop;\n\n\tinterpreterProxy->success((interpreterProxy->slotSizeOf(fftOop)) >= 6);\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\tnu = interpreterProxy->fetchIntegerofObject(0, fftOop);\n\tfftSize = interpreterProxy->fetchIntegerofObject(1, fftOop);\n\toop = interpreterProxy->fetchPointerofObject(2, fftOop);\n\tsinTableSize = interpreterProxy->stSizeOf(oop);\n\t/* begin checkedFloatPtrOf: */\n\tinterpreterProxy->success(interpreterProxy->isWords(oop));\n\tif (interpreterProxy->failed()) {\n\t\tsinTable = 0;\n\t\tgoto l1;\n\t}\n\tsinTable = ((float *) (interpreterProxy->firstIndexableField(oop)));\nl1:\t/* end checkedFloatPtrOf: */;\n\toop = interpreterProxy->fetchPointerofObject(3, fftOop);\n\tpermTableSize = interpreterProxy->stSizeOf(oop);\n\t/* begin checkedWordPtrOf: */\n\tinterpreterProxy->success(interpreterProxy->isWords(oop));\n\tpermTable = ((unsigned int *) (interpreterProxy->firstIndexableField(oop)));\n\toop = interpreterProxy->fetchPointerofObject(4, fftOop);\n\trealDataSize = interpreterProxy->stSizeOf(oop);\n\t/* begin checkedFloatPtrOf: */\n\tinterpreterProxy->success(interpreterProxy->isWords(oop));\n\tif (interpreterProxy->failed()) {\n\t\trealData = 0;\n\t\tgoto l2;\n\t}\n\trealData = ((float *) (interpreterProxy->firstIndexableField(oop)));\nl2:\t/* end checkedFloatPtrOf: */;\n\toop = interpreterProxy->fetchPointerofObject(5, fftOop);\n\timagDataSize = interpreterProxy->stSizeOf(oop);\n\t/* begin checkedFloatPtrOf: */\n\tinterpreterProxy->success(interpreterProxy->isWords(oop));\n\tif (interpreterProxy->failed()) {\n\t\timagData = 0;\n\t\tgoto l3;\n\t}\n\timagData = ((float *) (interpreterProxy->firstIndexableField(oop)));\nl3:\t/* end checkedFloatPtrOf: */;\n\tinterpreterProxy->success((((((1 << nu) == fftSize) && (((((sqInt) fftSize >> 2)) + 1) == sinTableSize)) && (fftSize == realDataSize)) && (fftSize == imagDataSize)) && (realDataSize == imagDataSize));\n\treturn (interpreterProxy->failed()) == 0;\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\nstatic sqInt\npermuteData(void)\n{\n    sqInt a;\n    sqInt b;\n    sqInt end;\n    sqInt i;\n    float  tmp;\n\n\ti = 0;\n\tend = permTableSize;\n\twhile (i < end) {\n\t\ta = (permTable[i]) - 1;\n\t\tb = (permTable[i + 1]) - 1;\n\t\tif (!((a < realDataSize)\n\t\t\t && (b < realDataSize))) {\n\t\t\treturn interpreterProxy->success(0);\n\t\t}\n\t\ttmp = realData[a];\n\t\trealData[a] = (realData[b]);\n\t\trealData[b] = tmp;\n\t\ttmp = imagData[a];\n\t\timagData[a] = (imagData[b]);\n\t\timagData[b] = tmp;\n\t\ti += 2;\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveFFTPermuteData(void)\n{\n    sqInt rcvr;\n\n\trcvr = interpreterProxy->stackObjectValue(0);\n\tif (!(loadFFTFrom(rcvr))) {\n\t\treturn null;\n\t}\n\tpermuteData();\n\tif (interpreterProxy->failed()) {\n\t\tpermuteData();\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveFFTScaleData(void)\n{\n    sqInt rcvr;\n\n\trcvr = interpreterProxy->stackObjectValue(0);\n\tif (!(loadFFTFrom(rcvr))) {\n\t\treturn null;\n\t}\n\tscaleData();\n}\n\nEXPORT(sqInt)\nprimitiveFFTTransformData(void)\n{\n    sqInt fftScale;\n    sqInt fftSize2;\n    sqInt fftSize4;\n    sqInt forward;\n    sqInt i;\n    sqInt ii;\n    float  imagT;\n    float  imagU;\n    sqInt ip;\n    sqInt j;\n    sqInt lev;\n    sqInt lev1;\n    sqInt level;\n    sqInt rcvr;\n    float  realT;\n    float  realU;\n    sqInt theta;\n\n\tforward = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(0));\n\trcvr = interpreterProxy->stackObjectValue(1);\n\tif (!(loadFFTFrom(rcvr))) {\n\t\treturn null;\n\t}\n\t/* begin transformData: */\n\tpermuteData();\n\tif (interpreterProxy->failed()) {\n\t\tpermuteData();\n\t\tgoto l1;\n\t}\n\t/* begin transformForward: */\n\tfftSize2 = ((sqInt) fftSize >> 1);\n\tfftSize4 = ((sqInt) fftSize >> 2);\n\tfor (level = 1; level <= nu; level += 1) {\n\t\tlev = ((level < 0) ? ((usqInt) 1 >> -level) : ((usqInt) 1 << level));\n\t\tlev1 = ((sqInt) lev >> 1);\n\t\tfftScale = fftSize / lev;\n\t\tfor (j = 1; j <= lev1; j += 1) {\n\n\t\t\t/* pi * (j-1) / lev1 mapped onto 0..n/2 */\n\n\t\t\ttheta = (j - 1) * fftScale;\n\t\t\tif (theta < fftSize4) {\n\n\t\t\t\t/* Compute U, the complex multiplier for each level */\n\n\t\t\t\trealU = sinTable[(sinTableSize - theta) - 1];\n\t\t\t\timagU = sinTable[theta];\n\t\t\t}\n\t\t\telse {\n\t\t\t\trealU = 0.0 - (sinTable[theta - fftSize4]);\n\t\t\t\timagU = sinTable[fftSize2 - theta];\n\t\t\t}\n\t\t\tif (!(forward)) {\n\t\t\t\timagU = 0.0 - imagU;\n\t\t\t}\n\t\t\ti = j;\n\t\t\twhile (i <= fftSize) {\n\t\t\t\tip = (i + lev1) - 1;\n\t\t\t\tii = i - 1;\n\t\t\t\trealT = ((realData[ip]) * realU) - ((imagData[ip]) * imagU);\n\t\t\t\timagT = ((realData[ip]) * imagU) + ((imagData[ip]) * realU);\n\t\t\t\trealData[ip] = ((realData[ii]) - realT);\n\t\t\t\timagData[ip] = ((imagData[ii]) - imagT);\n\t\t\t\trealData[ii] = ((realData[ii]) + realT);\n\t\t\t\timagData[ii] = ((imagData[ii]) + imagT);\n\t\t\t\ti += lev;\n\t\t\t}\n\t\t}\n\t}\n\tif (!(forward)) {\n\t\tscaleData();\n\t}\nl1:\t/* end transformData: */;\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->pop(1);\n\t}\n}\n\n\n/*\tScale all elements by 1/n when doing inverse */\n\nstatic sqInt\nscaleData(void)\n{\n    sqInt i;\n    float  realN;\n\n\tif (fftSize <= 1) {\n\t\treturn null;\n\t}\n\trealN = ((float) (1.0 / (((double) fftSize))));\n\tfor (i = 0; i <= (fftSize - 1); i += 1) {\n\t\trealData[i] = ((realData[i]) * realN);\n\t\timagData[i] = ((imagData[i]) * realN);\n\t}\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n    sqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\nstatic sqInt\ntransformData(sqInt forward)\n{\n    sqInt fftScale;\n    sqInt fftSize2;\n    sqInt fftSize4;\n    sqInt i;\n    sqInt ii;\n    float  imagT;\n    float  imagU;\n    sqInt ip;\n    sqInt j;\n    sqInt lev;\n    sqInt lev1;\n    sqInt level;\n    float  realT;\n    float  realU;\n    sqInt theta;\n\n\tpermuteData();\n\tif (interpreterProxy->failed()) {\n\t\tpermuteData();\n\t\treturn null;\n\t}\n\t/* begin transformForward: */\n\tfftSize2 = ((sqInt) fftSize >> 1);\n\tfftSize4 = ((sqInt) fftSize >> 2);\n\tfor (level = 1; level <= nu; level += 1) {\n\t\tlev = ((level < 0) ? ((usqInt) 1 >> -level) : ((usqInt) 1 << level));\n\t\tlev1 = ((sqInt) lev >> 1);\n\t\tfftScale = fftSize / lev;\n\t\tfor (j = 1; j <= lev1; j += 1) {\n\n\t\t\t/* pi * (j-1) / lev1 mapped onto 0..n/2 */\n\n\t\t\ttheta = (j - 1) * fftScale;\n\t\t\tif (theta < fftSize4) {\n\n\t\t\t\t/* Compute U, the complex multiplier for each level */\n\n\t\t\t\trealU = sinTable[(sinTableSize - theta) - 1];\n\t\t\t\timagU = sinTable[theta];\n\t\t\t}\n\t\t\telse {\n\t\t\t\trealU = 0.0 - (sinTable[theta - fftSize4]);\n\t\t\t\timagU = sinTable[fftSize2 - theta];\n\t\t\t}\n\t\t\tif (!(forward)) {\n\t\t\t\timagU = 0.0 - imagU;\n\t\t\t}\n\t\t\ti = j;\n\t\t\twhile (i <= fftSize) {\n\t\t\t\tip = (i + lev1) - 1;\n\t\t\t\tii = i - 1;\n\t\t\t\trealT = ((realData[ip]) * realU) - ((imagData[ip]) * imagU);\n\t\t\t\timagT = ((realData[ip]) * imagU) + ((imagData[ip]) * realU);\n\t\t\t\trealData[ip] = ((realData[ii]) - realT);\n\t\t\t\timagData[ip] = ((imagData[ii]) - imagT);\n\t\t\t\trealData[ii] = ((realData[ii]) + realT);\n\t\t\t\timagData[ii] = ((imagData[ii]) + imagT);\n\t\t\t\ti += lev;\n\t\t\t}\n\t\t}\n\t}\n\tif (!(forward)) {\n\t\tscaleData();\n\t}\n}\n\nstatic sqInt\ntransformForward(sqInt forward)\n{\n    sqInt fftScale;\n    sqInt fftSize2;\n    sqInt fftSize4;\n    sqInt i;\n    sqInt ii;\n    float  imagT;\n    float  imagU;\n    sqInt ip;\n    sqInt j;\n    sqInt lev;\n    sqInt lev1;\n    sqInt level;\n    float  realT;\n    float  realU;\n    sqInt theta;\n\n\tfftSize2 = ((sqInt) fftSize >> 1);\n\tfftSize4 = ((sqInt) fftSize >> 2);\n\tfor (level = 1; level <= nu; level += 1) {\n\t\tlev = ((level < 0) ? ((usqInt) 1 >> -level) : ((usqInt) 1 << level));\n\t\tlev1 = ((sqInt) lev >> 1);\n\t\tfftScale = fftSize / lev;\n\t\tfor (j = 1; j <= lev1; j += 1) {\n\n\t\t\t/* pi * (j-1) / lev1 mapped onto 0..n/2 */\n\n\t\t\ttheta = (j - 1) * fftScale;\n\t\t\tif (theta < fftSize4) {\n\n\t\t\t\t/* Compute U, the complex multiplier for each level */\n\n\t\t\t\trealU = sinTable[(sinTableSize - theta) - 1];\n\t\t\t\timagU = sinTable[theta];\n\t\t\t}\n\t\t\telse {\n\t\t\t\trealU = 0.0 - (sinTable[theta - fftSize4]);\n\t\t\t\timagU = sinTable[fftSize2 - theta];\n\t\t\t}\n\t\t\tif (!(forward)) {\n\t\t\t\timagU = 0.0 - imagU;\n\t\t\t}\n\t\t\ti = j;\n\t\t\twhile (i <= fftSize) {\n\t\t\t\tip = (i + lev1) - 1;\n\t\t\t\tii = i - 1;\n\t\t\t\trealT = ((realData[ip]) * realU) - ((imagData[ip]) * imagU);\n\t\t\t\timagT = ((realData[ip]) * imagU) + ((imagData[ip]) * realU);\n\t\t\t\trealData[ip] = ((realData[ii]) - realT);\n\t\t\t\timagData[ip] = ((imagData[ii]) - imagT);\n\t\t\t\trealData[ii] = ((realData[ii]) + realT);\n\t\t\t\timagData[ii] = ((imagData[ii]) + imagT);\n\t\t\t\ti += lev;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* FFTPlugin_exports[][3] = {\n\t{\"FFTPlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"FFTPlugin\", \"primitiveFFTPermuteData\", (void*)primitiveFFTPermuteData},\n\t{\"FFTPlugin\", \"primitiveFFTScaleData\", (void*)primitiveFFTScaleData},\n\t{\"FFTPlugin\", \"primitiveFFTTransformData\", (void*)primitiveFFTTransformData},\n\t{\"FFTPlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/FT2Plugin/FT2Plugin.c",
    "content": "/* Automatically generated from Squeak on 23 January 2011 3:55:36 pm \n   by VMMaker 4.4.7\n */\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n#include <ft2build.h>\n#include FT_TRUETYPE_TABLES_H\n#include FT_FREETYPE_H\n#include FT_OUTLINE_H\n\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n#define FT2GlyphSlotFaceIndex 0\n#define FT2GlyphSlotInstSize 17\n#define FT2OutlineContoursIndex 4\n#define FT2OutlineContoursSizeIndex 0\n#define FT2OutlineFlagsIndex 5\n#define FT2OutlineInstSize 6\n#define FT2OutlinePointsIndex 2\n#define FT2OutlinePointsSizeIndex 1\n#define FT2OutlineTagsIndex 3\n#define FormBitsIndex 0\n#define FormDepthIndex 3\n#define FormHeightIndex 2\n#define FormInstSize 5\n#define FormWidthIndex 1\n\n/*** Function Prototypes ***/\nstatic char * fetchByteArrayofObjectassureSize(sqInt fieldIndex, sqInt objectPointer, sqInt aSize);\nstatic short* fetchShortArrayofObjectassureSize(sqInt fieldIndex, sqInt objectPointer, sqInt aSize);\nstatic long * fetchWordArrayofObjectassureSize(sqInt fieldIndex, sqInt objectPointer, sqInt aSize);\nstatic sqInt ftAllocateHandleInReceiverForPointer(void *aPointer);\nstatic sqInt ftAllocateStringForPointer(const char *aPointer);\nstatic FT_Encoding ftEncodingValueFromString(sqInt string);\nstatic void * ftHandleValueFromReceiver(sqInt rcvrOop);\nstatic int ftInitBitmapfromForm(FT_Bitmap*bitmap, sqInt formOop);\nstatic int ftInitBitmapfromFormrenderMode(FT_Bitmap*bitmap, sqInt formOop, sqInt mode);\nstatic int ftParameterError(void);\nstatic sqInt ftStringFromEncodingValue(FT_Encoding encoding);\nstatic VirtualMachine * getInterpreter(void);\n#pragma export on\nEXPORT(const char*) getModuleName(void);\n#pragma export off\nstatic sqInt halt(void);\n#pragma export on\nEXPORT(sqInt) initialiseModule(void);\n#pragma export off\nstatic sqInt msg(char *s);\n#pragma export on\nEXPORT(sqInt) primitiveCopyToExternalMemory(void);\nEXPORT(sqInt) primitiveDoneFace(void);\nEXPORT(sqInt) primitiveDoneFacePreserveFields(void);\nEXPORT(sqInt) primitiveEmboldenFaceGlyphSlotOutline(void);\nEXPORT(sqInt) primitiveErrorCode(void);\nEXPORT(sqInt) primitiveErrorString(void);\nEXPORT(sqInt) primitiveFreeExternalMemory(void);\nEXPORT(sqInt) primitiveGetFaceCharIndex(void);\nEXPORT(sqInt) primitiveGetFaceCharMap(void);\nEXPORT(sqInt) primitiveGetFaceCharMapsIntoArray(void);\nEXPORT(sqInt) primitiveGetFaceGlyphName(void);\nEXPORT(sqInt) primitiveGetKerningLeftRight(void);\nEXPORT(sqInt) primitiveGetPostscriptName(void);\nEXPORT(sqInt) primitiveGetSfntTableOS2(void);\n#pragma export off\nstatic sqInt primitiveGetTrackKerningPointSizedegree(sqInt pointSize, sqInt degree);\n#pragma export on\nEXPORT(sqInt) primitiveHasKerning(void);\nEXPORT(sqInt) primitiveLibraryHandle(void);\nEXPORT(sqInt) primitiveLoadCharacter(void);\nEXPORT(sqInt) primitiveLoadFaceBbox(void);\nEXPORT(sqInt) primitiveLoadFaceFields(void);\nEXPORT(sqInt) primitiveLoadGlyph(void);\nEXPORT(sqInt) primitiveLoadGlyphSlotFromFace(void);\nEXPORT(sqInt) primitiveLoadOutlineArraysFromFace(void);\nEXPORT(sqInt) primitiveLoadOutlineSizesFromFace(void);\nEXPORT(sqInt) primitiveModuleErrorCode(void);\nEXPORT(sqInt) primitiveNewFaceFromFileAndIndex(void);\nEXPORT(sqInt) primitiveNewMemoryFaceFromExternalMemoryAndIndex(void);\nEXPORT(sqInt) primitiveNumberOfOutlineCountours(void);\nEXPORT(sqInt) primitiveRenderGlyphIntoForm(void);\nEXPORT(sqInt) primitiveRenderGlyphIntoFormWithRenderMode(void);\nEXPORT(sqInt) primitiveResetErrorCode(void);\nEXPORT(sqInt) primitiveSetFaceCharMap(void);\nEXPORT(sqInt) primitiveSetPixelSizes(void);\nEXPORT(sqInt) primitiveSetTransform(void);\nEXPORT(sqInt) primitiveTransformFaceGlyphSlotOutline(void);\nEXPORT(sqInt) primitiveTranslateFaceGlyphSlotOutline(void);\nEXPORT(sqInt) primitiveVersion(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\nEXPORT(sqInt) shutdownModule(void);\n#pragma export off\nstatic sqInt sqAssert(sqInt aBool);\n/*** Variables ***/\nstatic int errorCode;\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic FT_Library library;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"FT2Plugin 23 January 2011 (i)\"\n#else\n\t\"FT2Plugin 23 January 2011 (e)\"\n#endif\n;\n\n\nstatic char * fetchByteArrayofObjectassureSize(sqInt fieldIndex, sqInt objectPointer, sqInt aSize) {\n\tsqInt array;\n\n\tarray = interpreterProxy->fetchPointerofObject(fieldIndex, objectPointer);\n\tif ((interpreterProxy->isBytes(array)) && ((interpreterProxy->slotSizeOf(array)) == aSize)) {\n\t\treturn interpreterProxy->arrayValueOf(array);\n\t}\n\treturn null;\n}\n\nstatic short* fetchShortArrayofObjectassureSize(sqInt fieldIndex, sqInt objectPointer, sqInt aSize) {\n\tsqInt array;\n\n\tarray = interpreterProxy->fetchPointerofObject(fieldIndex, objectPointer);\n\tif ((interpreterProxy->isWords(array)) && ((interpreterProxy->slotSizeOf(array)) == (((sqInt) (aSize + 1) >> 1)))) {\n\t\treturn interpreterProxy->arrayValueOf(array);\n\t}\n\treturn null;\n}\n\nstatic long * fetchWordArrayofObjectassureSize(sqInt fieldIndex, sqInt objectPointer, sqInt aSize) {\n\tsqInt array;\n\n\tarray = interpreterProxy->fetchPointerofObject(fieldIndex, objectPointer);\n\tif ((interpreterProxy->isWords(array)) && ((interpreterProxy->slotSizeOf(array)) == aSize)) {\n\t\treturn interpreterProxy->arrayValueOf(array);\n\t}\n\treturn null;\n}\n\n\n/*\tgiven aPointer (returned from a library call),\n\tset the receiver's (bottom of stack) first instance variable\n\tto a ByteArray containing the pointer's bytes */\n\nstatic sqInt ftAllocateHandleInReceiverForPointer(void *aPointer) {\n\tsqInt returnedHandle;\n\tvoid **extraByteArrayPtr;\n\n\tif (aPointer) {\n\n\t\t/* Allocate a Smalltalk ByteArray -- lastAlloc contains the length */\n\t\t/* Copy from the C bytecode buffer to the Smalltalk ByteArray */\n\n\t\treturnedHandle = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(void **));\n\t\textraByteArrayPtr = interpreterProxy->arrayValueOf(returnedHandle);\n\t\t*extraByteArrayPtr = (void *)(aPointer);\n\t} else {\n\t\treturnedHandle = interpreterProxy->nilObject();\n\t}\n\tinterpreterProxy->storePointerofObjectwithValue(0, interpreterProxy->stackObjectValue(interpreterProxy->methodArgumentCount()), returnedHandle);\n\t;\n\treturn returnedHandle;\n}\n\n\n/*\tgiven NUL-terminated char* aPointer (returned from a library call), \n\treturn the oop for a String containing the pointer's bytes */\n\nstatic sqInt ftAllocateStringForPointer(const char *aPointer) {\n\tsqInt returnedHandle;\n\tchar *extraByteArrayPtr;\n\n\tif (aPointer) {\n\n\t\t/* Allocate a Smalltalk ByteArray -- lastAlloc contains the length */\n\t\t/* Copy from the C bytecode buffer to the Smalltalk ByteArray */\n\n\t\treturnedHandle = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), strlen(aPointer));\n\t\textraByteArrayPtr = interpreterProxy->arrayValueOf(returnedHandle);\n\t\t;\n\t\tstrncpy(extraByteArrayPtr, aPointer, strlen(aPointer));\n\t} else {\n\t\treturnedHandle = interpreterProxy->nilObject();\n\t}\n\treturn returnedHandle;\n}\n\n\n/*\tReturn a 32-bit word from the bytes held by string. */\n\nstatic FT_Encoding ftEncodingValueFromString(sqInt string) {\n\tunsigned long retval;\n\tunsigned char*ptr;\n\n\tinterpreterProxy->success((!((string & 1))) && ((interpreterProxy->isBytes(string)) && ((interpreterProxy->slotSizeOf(string)) == (sizeof(FT_Encoding)))));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tretval = 0;\n\n\t/* \tptr := self cCode: '(unsigned char *) (string + 4)'. */\n\n\tptr = interpreterProxy->arrayValueOf(string);\n\t;\n\tretval = ((unsigned long)ptr[0]) << 24;\n\tretval += ((unsigned long)ptr[1]) << 16;\n\tretval += ((unsigned long)ptr[2]) << 8;\n\tretval += (unsigned long)ptr[3];\n\t;\n\treturn (FT_Encoding)retval;\n}\n\n\n/*\tthis is the opposite of #ftAllocateHandleIn:forPointer: .\n\tIt takes rcvr's first instance variable,\n\twhich should be a ByteArray the size of a void*,\n\tand returns its value as a C pointer. */\n\nstatic void * ftHandleValueFromReceiver(sqInt rcvrOop) {\n\tsqInt oop;\n\tsqInt btw;\n\n\toop = interpreterProxy->fetchPointerofObject(0, rcvrOop);\n\tinterpreterProxy->success((interpreterProxy->isBytes(oop)) && ((interpreterProxy->slotSizeOf(oop)) == (sizeof(void *))));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tbtw = BYTES_PER_WORD;\n\treturn *(void**)(pointerForOop(oop + btw));\n}\n\n\n/*\tInitialize the values in an FT_Bitmap from the given Form */\n\nstatic int ftInitBitmapfromForm(FT_Bitmap*bitmap, sqInt formOop) {\n\tsqInt pixelMode;\n\tsqInt numGrays;\n\tsqInt width;\n\tsqInt depth;\n\tsqInt height;\n\tsqInt wordsPerRow;\n\tsqInt pitch;\n\tunsigned char*buffer;\n\n\tinterpreterProxy->success(interpreterProxy->isPointers(formOop));\n\tinterpreterProxy->success((interpreterProxy->slotSizeOf(formOop)) >= FormInstSize);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\twidth = interpreterProxy->fetchIntegerofObject(FormWidthIndex, formOop);\n\theight = interpreterProxy->fetchIntegerofObject(FormHeightIndex, formOop);\n\tdepth = interpreterProxy->fetchIntegerofObject(FormDepthIndex, formOop);\n\tbuffer = ((void*) (interpreterProxy->fetchArrayofObject(FormBitsIndex, formOop)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (depth < 0) {\n\t\tdepth = depth * -1;\n\t}\n\tif (depth == 1) {\n\t\twordsPerRow = ((sqInt) (width + 31) >> 5);\n\t\tnumGrays = 1;\n\t\tpixelMode = FT_PIXEL_MODE_MONO;\n\t} else {\n\t\tif (depth == 8) {\n\t\t\twordsPerRow = ((sqInt) (width + 3) >> 2);\n\t\t\tnumGrays = 256;\n\t\t\tpixelMode = FT_PIXEL_MODE_GRAY;\n\t\t} else {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\t\n#ifndef WORDS_BIGENDIAN\n\tdepth = depth * -1;\n#endif\n;\n\tinterpreterProxy->storeIntegerofObjectwithValue(FormDepthIndex, formOop, depth);\n\tpitch = wordsPerRow * 4;\n\tbitmap->rows = height;\n\tbitmap->width = width;\n\tbitmap->pitch = pitch;\n\tbitmap->buffer = buffer;\n\tbitmap->num_grays = numGrays;\n\tbitmap->pixel_mode = pixelMode;\n\treturn 1;\n}\n\n\n/*\tInitialize the values in an FT_Bitmap from the given Form */\n/*\tpixelMode */\n\nstatic int ftInitBitmapfromFormrenderMode(FT_Bitmap*bitmap, sqInt formOop, sqInt mode) {\n\tsqInt numGrays;\n\tsqInt width;\n\tsqInt depth;\n\tsqInt height;\n\tsqInt wordsPerRow;\n\tsqInt pitch;\n\tunsigned char*buffer;\n\n\tinterpreterProxy->success(interpreterProxy->isPointers(formOop));\n\tinterpreterProxy->success((interpreterProxy->slotSizeOf(formOop)) >= FormInstSize);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\twidth = interpreterProxy->fetchIntegerofObject(FormWidthIndex, formOop);\n\theight = interpreterProxy->fetchIntegerofObject(FormHeightIndex, formOop);\n\tdepth = interpreterProxy->fetchIntegerofObject(FormDepthIndex, formOop);\n\tbuffer = ((void*) (interpreterProxy->fetchArrayofObject(FormBitsIndex, formOop)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (depth < 0) {\n\t\tdepth = depth * -1;\n\t}\n\tif (depth == 1) {\n\t\twordsPerRow = ((sqInt) (width + 31) >> 5);\n\t\tnumGrays = 1;\n\t} else {\n\t\tif (depth == 8) {\n\t\t\twordsPerRow = ((sqInt) (width + 3) >> 2);\n\t\t\tnumGrays = 256;\n\t\t} else {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\t\n#ifndef WORDS_BIGENDIAN\n\tdepth = depth * -1;\n#endif\n;\n\tinterpreterProxy->storeIntegerofObjectwithValue(FormDepthIndex, formOop, depth);\n\tpitch = wordsPerRow * 4;\n\tbitmap->rows = height;\n\tbitmap->width = width;\n\tbitmap->pitch = pitch;\n\tbitmap->buffer = buffer;\n\tbitmap->num_grays = numGrays;\n\tbitmap->pixel_mode = mode;\n\treturn 1;\n}\n\nstatic int ftParameterError(void) {\n\terrorCode = 255;\n\treturn interpreterProxy->primitiveFail();\n}\n\n\n/*\tReturn a newly allocated String from the given 32-bit word */\n\nstatic sqInt ftStringFromEncodingValue(FT_Encoding encoding) {\n\tunsigned char*ptr;\n\tsqInt stringOop;\n\n\tstringOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), sizeof(FT_Encoding));\n\t;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tptr = interpreterProxy->firstIndexableField(stringOop);\n\t;\n\tptr[0] = (encoding & 0xFF000000) >> 24;\n\tptr[1] = (encoding & 0x00FF0000) >> 16;\n\tptr[2] = (encoding & 0x0000FF00) >> 8;\n\tptr[3] = (encoding & 0x000000FF);\n\treturn stringOop;\n}\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine * getInterpreter(void) {\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*) getModuleName(void) {\n\treturn moduleName;\n}\n\nstatic sqInt halt(void) {\n\t;\n}\n\nEXPORT(sqInt) initialiseModule(void) {\n\tlibrary = null;\n\t\n#ifdef macintoshSqueak\n\tfetchPreferences();\n#endif\n;\n\terrorCode = FT_Init_FreeType(&library);\n\treturn errorCode == 0;\n}\n\nstatic sqInt msg(char *s) {\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n}\n\nEXPORT(sqInt) primitiveCopyToExternalMemory(void) {\n\tvoid *aPointer;\n\tsqInt rcvr;\n\tsize_t byteSize;\n\tchar *aByteArray;\n\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\n\taByteArray = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"FreeTypeExternalMemory\"));\n\trcvr = interpreterProxy->stackValue(1);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\t;\n\terrorCode = 0;\n\tbyteSize = interpreterProxy->byteSizeOf((oopForPointer( aByteArray ) - BASE_HEADER_SIZE));\n\t;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\taPointer = malloc(byteSize);\n\tmemcpy(aPointer,aByteArray,byteSize);\n\tftAllocateHandleInReceiverForPointer(aPointer);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(1);\n\treturn null;\n}\n\n\n/*\tCall the library to release the given face record.\n\tNil out the pointer fields */\n\nEXPORT(sqInt) primitiveDoneFace(void) {\n\tsqInt rcvr;\n\tsqInt i;\n\tFT_Face face;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"FT2Face\"));\n\trcvr = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tface = ftHandleValueFromReceiver(rcvr);\n\tif (face == null) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\t;\n\n\t/* nil out all the fields */\n\n\terrorCode = FT_Done_Face(face);\n\tfor (i = 0; i <= 23; i += 1) {\n\t\tinterpreterProxy->storePointerofObjectwithValue(i, rcvr, interpreterProxy->nilObject());\n\t}\n\tinterpreterProxy->success(errorCode == 0);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\treturn null;\n}\n\n\n/*\tCall the library to release the given face record.\n\tNil out the handle field, but do not nil the other fields,\n\tas their values are needed even if the face cannot be re-opened\n\tin the future due to a missing font file etc. */\n\nEXPORT(sqInt) primitiveDoneFacePreserveFields(void) {\n\tsqInt rcvr;\n\tFT_Face face;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"FT2Face\"));\n\trcvr = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tface = ftHandleValueFromReceiver(rcvr);\n\tif (face == null) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\t;\n\n\t/* nil the handle field */\n\n\terrorCode = FT_Done_Face(face);\n\tinterpreterProxy->storePointerofObjectwithValue(0, rcvr, interpreterProxy->nilObject());\n\tinterpreterProxy->success(errorCode == 0);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\treturn null;\n}\n\n\n/*\temboldens the outline in the face's glyphSlot by strength (expressed in 26.6 pixel format).\n\tThe new outline will be at most 4 times `strength' pixels wider and higher.  */\n\nEXPORT(sqInt) primitiveEmboldenFaceGlyphSlotOutline(void) {\n\tsqInt rcvr;\n\tFT_Face face;\n\tsqInt strength;\n\n\tstrength = interpreterProxy->stackIntegerValue(0);\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"FT2Face\"));\n\trcvr = interpreterProxy->stackValue(1);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tface = ftHandleValueFromReceiver(rcvr);\n\tif (face == null) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\terrorCode = FT_Outline_Embolden( &face->glyph->outline, strength );\n\tinterpreterProxy->success(errorCode == 0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(1);\n\treturn null;\n}\n\n\n/*\thigh byte is module error, low is generic error */\n\nEXPORT(sqInt) primitiveErrorCode(void) {\n\tsqInt _return_value;\n\n\t_return_value = interpreterProxy->positive32BitIntegerFor((FT_ERROR_BASE(errorCode)));\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveErrorString(void) {\n\tconst char *str;\n\tconst struct ftError *ftError;\n\n\t\nstruct ftError { int errCode; const char* errMsg; };\n#undef __FTERRORS_H__\n#define FT_ERRORDEF( e, v, s )  { e, s },\n#define FT_ERROR_START_LIST     {\n#define FT_ERROR_END_LIST       { 0xFF, \"Bad Squeak Method Parameter\" }, { 0, NULL } };\nstatic const struct ftError ftErrors[] =\n#include FT_ERRORS_H\n;\n\tftError = ftErrors;\n\t;\n\twhile ((str = ftError->errMsg) && (FT_ERROR_BASE(errorCode) != ftError->errCode)) {\n\t\tftError++;\n\t}\n\t;\n\tif (!(str)) {\n\t\tinterpreterProxy->success(0);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, ftAllocateStringForPointer(str));\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveFreeExternalMemory(void) {\n\tsqInt rcvr;\n\tvoid*memPointer;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"FreeTypeExternalMemory\"));\n\trcvr = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\t;\n\n\t/* free the memory handle */\n\n\terrorCode = 0;\n\tmemPointer = ftHandleValueFromReceiver(rcvr);\n\tif (!(memPointer == null)) {\n\t\tfree(memPointer);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\treturn null;\n}\n\n\n/*\tReturn the Freetype glyph index of the given character code, in the \n\tcurrent encoding. \n\tReturn value of 0 means 'undefined character code'. */\n\nEXPORT(sqInt) primitiveGetFaceCharIndex(void) {\n\tsqInt rcvr;\n\tsqInt result;\n\tFT_Face face;\n\tsqInt charIndex;\n\tsqInt _return_value;\n\n\tcharIndex = interpreterProxy->stackIntegerValue(0);\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"FT2Face\"));\n\trcvr = interpreterProxy->stackValue(1);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\terrorCode = 0;\n\tface = ftHandleValueFromReceiver(rcvr);\n\tif (face == null) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\tresult = FT_Get_Char_Index(face, charIndex);\n\t_return_value = interpreterProxy->positive32BitIntegerFor(result);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveGetFaceCharMap(void) {\n\tFT_Encoding encoding;\n\tsqInt rcvr;\n\tFT_CharMap charmap;\n\tsqInt stringOop;\n\tFT_Face face;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"FT2Face\"));\n\trcvr = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tface = ftHandleValueFromReceiver(rcvr);\n\tif (face == null) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\tcharmap = face->charmap;\n\tif (!(charmap)) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pushRemappableOop(rcvr);\n\tencoding = charmap->encoding;\n\tstringOop = ftStringFromEncodingValue(encoding);\n\trcvr = interpreterProxy->popRemappableOop();\n\tinterpreterProxy->storePointerofObjectwithValue(22, rcvr, stringOop);\n\tinterpreterProxy->storeIntegerofObjectwithValue(23, rcvr, charmap->platform_id);\n\tinterpreterProxy->storeIntegerofObjectwithValue(24, rcvr, charmap->encoding_id);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveGetFaceCharMapsIntoArray(void) {\n\tFT_CharMap *charmap;\n\tint numCharmaps;\n\tsqInt i;\n\tsqInt stringOop;\n\tFT_Face face;\n\tsqInt arrayOop;\n\tsqInt rcvr;\n\tsqInt *array;\n\n\tinterpreterProxy->success(interpreterProxy->isIndexable(interpreterProxy->stackValue(0)));\n\tarray = ((int *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"FT2Face\"));\n\trcvr = interpreterProxy->stackValue(1);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tface = ftHandleValueFromReceiver(rcvr);\n\tif (face == null) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\tnumCharmaps = face->num_charmaps;\n\tarrayOop = oopForPointer(array) - BASE_HEADER_SIZE;\n\tinterpreterProxy->success((interpreterProxy->slotSizeOf(arrayOop)) == numCharmaps);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tcharmap = face->charmaps;\n\t;\n\tfor (i = 0; i <= (numCharmaps - 1); i += 1) {\n\t\tinterpreterProxy->pushRemappableOop(arrayOop);\n\t\tstringOop = ftStringFromEncodingValue((*charmap)->encoding);\n\t\tarrayOop = interpreterProxy->popRemappableOop();\n\t\tinterpreterProxy->storePointerofObjectwithValue(i, arrayOop, stringOop);\n\t\tcharmap++;\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(1);\n\treturn null;\n}\n\n\n/*\treturn a String */\n\nEXPORT(sqInt) primitiveGetFaceGlyphName(void) {\n\tchar buffer[100];\n\tsqInt rcvr;\n\tsqInt string;\n\tFT_Face face;\n\tsqInt glyphIndex;\n\n\tglyphIndex = interpreterProxy->stackIntegerValue(0);\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"FT2Face\"));\n\trcvr = interpreterProxy->stackValue(1);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tface = ftHandleValueFromReceiver(rcvr);\n\tif (face == null) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\terrorCode = FT_Get_Glyph_Name(face, glyphIndex, buffer, 100);\n\tinterpreterProxy->success(errorCode == 0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tstring = ftAllocateStringForPointer(buffer);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, string);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveGetKerningLeftRight(void) {\n\tsqInt kernMode;\n\tsqInt rcvr;\n\tFT_Vector result;\n\tsqInt pointOop;\n\tFT_Face face;\n\tsqInt leftGlyph;\n\tsqInt rightGlyph;\n\n\tleftGlyph = interpreterProxy->stackIntegerValue(1);\n\trightGlyph = interpreterProxy->stackIntegerValue(0);\n\t\n\t\tresult.x=3;\n\t\tresult.y=4;;\n\t;\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(2), \"FT2Face\"));\n\trcvr = interpreterProxy->stackValue(2);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\terrorCode = 0;\n\tface = ftHandleValueFromReceiver(rcvr);\n\tif (face == null) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\tkernMode = FT_KERNING_UNSCALED;\n\t;\n\tFT_Get_Kerning(face, leftGlyph, rightGlyph, kernMode, &result);;\n\tpointOop = interpreterProxy->makePointwithxValueyValue(result.x, result.y);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(3, pointOop);\n\treturn null;\n}\n\n\n/*\treturn a String */\n\nEXPORT(sqInt) primitiveGetPostscriptName(void) {\n\tchar*buffer;\n\tsqInt rcvr;\n\tsqInt string;\n\tFT_Face face;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"FT2Face\"));\n\trcvr = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tbuffer = 0;\n\tface = ftHandleValueFromReceiver(rcvr);\n\tif (face == null) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\tbuffer = FT_Get_Postscript_Name(face);\n\tinterpreterProxy->success(buffer != 0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tstring = ftAllocateStringForPointer(buffer);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, string);\n\treturn null;\n}\n\n\n/*\treturn the bytes from the OS/2 table */\n\nEXPORT(sqInt) primitiveGetSfntTableOS2(void) {\n\tchar *buffer;\n\tsqInt rcvr;\n\tsqInt returnedHandle;\n\tchar *extraByteArrayPtr;\n\tFT_Face face;\n\tsqInt _return_value;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"FT2Face\"));\n\trcvr = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tbuffer = 0;\n\tface = ftHandleValueFromReceiver(rcvr);\n\tif (face == null) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\tbuffer = FT_Get_Sfnt_Table(face,ft_sfnt_os2);\n\tif (buffer == 0) {\n\t\t_return_value = interpreterProxy->integerObjectOf(-1);\n\t\tif (interpreterProxy->failed()) {\n\t\t\tftParameterError();\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(1, _return_value);\n\t\treturn null;\n\t}\n\n\t/* Copy from the C bytecode buffer to the Smalltalk ByteArray */\n\n\treturnedHandle = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(TT_OS2));\n\textraByteArrayPtr = interpreterProxy->arrayValueOf(returnedHandle);\n\t;\n\tmemcpy(extraByteArrayPtr, buffer, sizeof(TT_OS2));\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, returnedHandle);\n\treturn null;\n}\n\n\n/*\tdisabled becaus of yet implemented */\n\nstatic sqInt primitiveGetTrackKerningPointSizedegree(sqInt pointSize, sqInt degree) {\n\treturn interpreterProxy->primitiveFail();\n}\n\nEXPORT(sqInt) primitiveHasKerning(void) {\n\tsqInt rcvr;\n\tFT_Face face;\n\tsqInt _return_value;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"FT2Face\"));\n\trcvr = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\terrorCode = 0;\n\tface = ftHandleValueFromReceiver(rcvr);\n\tif (face == null) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\t_return_value = (((FT_HAS_KERNING( face )) << 1) | 1);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\n\n/*\tFill in the handle in an FT2Library structure with a copy of our global pointer. */\n\nEXPORT(sqInt) primitiveLibraryHandle(void) {\n\tsqInt rcvr;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"FT2Library\"));\n\trcvr = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\terrorCode = 0;\n\tftAllocateHandleInReceiverForPointer(library);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\treturn null;\n}\n\n\n/*\tLoad the glyph at the given index in the current charmap.\n\tThe default map upon opening a font is the 'unic' or Unicode charmap, if any. */\n\nEXPORT(sqInt) primitiveLoadCharacter(void) {\n\tsqInt rcvr;\n\tFT_Face face;\n\tsqInt index;\n\tsqInt flags;\n\n\tindex = interpreterProxy->stackIntegerValue(1);\n\tflags = interpreterProxy->stackIntegerValue(0);\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(2), \"FT2Face\"));\n\trcvr = interpreterProxy->stackValue(2);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tface = ftHandleValueFromReceiver(rcvr);\n\tif (face == null) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\terrorCode = FT_Load_Char(face, index, flags);\n\tinterpreterProxy->success(errorCode == 0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(2);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveLoadFaceBbox(void) {\n\tsqInt rcvr;\n\tsqInt pointOop;\n\tsqInt rectOop;\n\tFT_Face face;\n\tsqInt aRectangle;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"Rectangle\"));\n\taRectangle = interpreterProxy->stackValue(0);\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"FT2Face\"));\n\trcvr = interpreterProxy->stackValue(1);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\trectOop = aRectangle;\n\tif (!(interpreterProxy->isPointers(rectOop))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\tif ((interpreterProxy->slotSizeOf(rectOop)) < 2) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\tface = ftHandleValueFromReceiver(rcvr);\n\tif (face == null) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\t;\n\tif (!(face->face_flags & FT_FACE_FLAG_SCALABLE)) {\n\t\tinterpreterProxy->success(0);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pushRemappableOop(rectOop);\n\tpointOop = interpreterProxy->makePointwithxValueyValue(face->bbox.xMin, face->bbox.yMin);\n\trectOop = interpreterProxy->popRemappableOop();\n\tinterpreterProxy->storePointerofObjectwithValue(0, rectOop, pointOop);\n\tinterpreterProxy->pushRemappableOop(rectOop);\n\tpointOop = interpreterProxy->makePointwithxValueyValue(face->bbox.xMax, face->bbox.yMax);\n\trectOop = interpreterProxy->popRemappableOop();\n\tinterpreterProxy->storePointerofObjectwithValue(1, rectOop, pointOop);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(1);\n\treturn null;\n}\n\n\n/*\tFill in many of the receiver's (an FT2Face) fields (other than its handle)\n\tfrom the FT_Face record that it points to. */\n\nEXPORT(sqInt) primitiveLoadFaceFields(void) {\n\tsqInt rcvr;\n\tsqInt strOop;\n\tFT_Face face;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"FT2Face\"));\n\trcvr = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tface = ftHandleValueFromReceiver(rcvr);\n\tif (face == null) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\t;\n\tinterpreterProxy->storeIntegerofObjectwithValue(1, rcvr, face->num_faces);\n\tinterpreterProxy->storeIntegerofObjectwithValue(2, rcvr, face->face_index);\n\tinterpreterProxy->storeIntegerofObjectwithValue(3, rcvr, face->face_flags);\n\tinterpreterProxy->storeIntegerofObjectwithValue(4, rcvr, face->style_flags);\n\tinterpreterProxy->storeIntegerofObjectwithValue(5, rcvr, face->num_glyphs);\n\tinterpreterProxy->pushRemappableOop(rcvr);\n\tstrOop = ftAllocateStringForPointer(face->family_name);\n\trcvr = interpreterProxy->popRemappableOop();\n\tinterpreterProxy->storePointerofObjectwithValue(6, rcvr, strOop);\n\tinterpreterProxy->pushRemappableOop(rcvr);\n\tstrOop = ftAllocateStringForPointer(face->style_name);\n\trcvr = interpreterProxy->popRemappableOop();\n\tinterpreterProxy->storePointerofObjectwithValue(7, rcvr, strOop);\n\tinterpreterProxy->storeIntegerofObjectwithValue(8, rcvr, face->num_fixed_sizes);\n\tinterpreterProxy->storeIntegerofObjectwithValue(10, rcvr, face->num_charmaps);\n\tif (face->face_flags & FT_FACE_FLAG_SCALABLE) {\n\t\tinterpreterProxy->storeIntegerofObjectwithValue(13, rcvr, face->units_per_EM);\n\t\tinterpreterProxy->storeIntegerofObjectwithValue(14, rcvr, face->ascender);\n\t\tinterpreterProxy->storeIntegerofObjectwithValue(15, rcvr, face->descender);\n\t\tinterpreterProxy->storeIntegerofObjectwithValue(16, rcvr, face->height);\n\t\tinterpreterProxy->storeIntegerofObjectwithValue(17, rcvr, face->max_advance_width);\n\t\tinterpreterProxy->storeIntegerofObjectwithValue(18, rcvr, face->max_advance_height);\n\t\tinterpreterProxy->storeIntegerofObjectwithValue(19, rcvr, face->underline_position);\n\t\tinterpreterProxy->storeIntegerofObjectwithValue(20, rcvr, face->underline_thickness);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveLoadGlyph(void) {\n\tsqInt rcvr;\n\tFT_Face face;\n\tsqInt index;\n\tsqInt flags;\n\n\tindex = interpreterProxy->stackIntegerValue(1);\n\tflags = interpreterProxy->stackIntegerValue(0);\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(2), \"FT2Face\"));\n\trcvr = interpreterProxy->stackValue(2);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tface = ftHandleValueFromReceiver(rcvr);\n\tif (face == null) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\terrorCode = FT_Load_Glyph(face, index, flags);\n\tinterpreterProxy->success(errorCode == 0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(2);\n\treturn null;\n}\n\n\n/*\tAssumes that primitiveLoadGlyph:flags: has been called earlier to set face->glyph. */\n\nEXPORT(sqInt) primitiveLoadGlyphSlotFromFace(void) {\n\tsqInt rcvr;\n\tFT_GlyphSlot gs;\n\tsqInt gfOop;\n\tsqInt btw;\n\tFT_Face face;\n\tFT_Glyph_Format *gfPtr;\n\tsqInt aFace;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"FT2Face\"));\n\taFace = interpreterProxy->stackValue(0);\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"FT2GlyphSlot\"));\n\trcvr = interpreterProxy->stackValue(1);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\terrorCode = 0;\n\tif ((interpreterProxy->slotSizeOf(rcvr)) < 8) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\tface = ftHandleValueFromReceiver(aFace);\n\tif (face == null) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\tgs = face->glyph;\n\tif (!(gs)) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\t;\n\tinterpreterProxy->storePointerofObjectwithValue(0, rcvr, aFace);\n\tinterpreterProxy->storeIntegerofObjectwithValue(1, rcvr, gs->linearHoriAdvance);\n\tinterpreterProxy->storeIntegerofObjectwithValue(2, rcvr, gs->linearVertAdvance);\n\tinterpreterProxy->storeIntegerofObjectwithValue(3, rcvr, gs->advance.x);\n\tinterpreterProxy->storeIntegerofObjectwithValue(4, rcvr, gs->advance.y);\n\tinterpreterProxy->pushRemappableOop(rcvr);\n\tgfOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(FT_Glyph_Format));\n\t;\n\tbtw = BYTES_PER_WORD;\n\tgfPtr = (FT_Glyph_Format *) pointerForOop(gfOop + btw);\n\t;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t*gfPtr = gs->format;\n\trcvr = interpreterProxy->popRemappableOop();\n\tinterpreterProxy->storePointerofObjectwithValue(5, rcvr, gfOop);\n\tinterpreterProxy->storeIntegerofObjectwithValue(6, rcvr, gs->bitmap_left);\n\tinterpreterProxy->storeIntegerofObjectwithValue(7, rcvr, gs->bitmap_top);\n\tinterpreterProxy->storeIntegerofObjectwithValue(8, rcvr, gs->metrics.width);\n\tinterpreterProxy->storeIntegerofObjectwithValue(9, rcvr, gs->metrics.height);\n\tinterpreterProxy->storeIntegerofObjectwithValue(10, rcvr, gs->metrics.horiBearingX);\n\tinterpreterProxy->storeIntegerofObjectwithValue(11, rcvr, gs->metrics.horiBearingY);\n\tinterpreterProxy->storeIntegerofObjectwithValue(12, rcvr, gs->metrics.horiAdvance);\n\tinterpreterProxy->storeIntegerofObjectwithValue(13, rcvr, gs->metrics.vertBearingX);\n\tinterpreterProxy->storeIntegerofObjectwithValue(14, rcvr, gs->metrics.vertBearingY);\n\tinterpreterProxy->storeIntegerofObjectwithValue(15, rcvr, gs->metrics.vertAdvance);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(1);\n\treturn null;\n}\n\n\n/*\tAssumes that primitiveLoadGlyph:flags: has been called earlier to set face->glyph. */\n\nEXPORT(sqInt) primitiveLoadOutlineArraysFromFace(void) {\n\tsqInt i;\n\tsqInt pointsSize;\n\tFT_GlyphSlot gs;\n\tFT_Face face;\n\tsqInt rcvr;\n\tchar * tags;\n\tshort* contours;\n\tsqInt contoursSize;\n\tlong * points;\n\tsqInt aFace;\n\tsqInt array;\n\tsqInt array1;\n\tsqInt array2;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"FT2Face\"));\n\taFace = interpreterProxy->stackValue(0);\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"FT2Outline\"));\n\trcvr = interpreterProxy->stackValue(1);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\terrorCode = 0;\n\tif ((interpreterProxy->slotSizeOf(rcvr)) < FT2OutlineInstSize) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\tface = ftHandleValueFromReceiver(aFace);\n\tif (face == null) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\tgs = face->glyph;\n\tif (!(gs)) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\t;\n\tpointsSize = gs->outline.n_points;\n\t/* begin fetchWordArray:ofObject:assureSize: */\n\tarray = interpreterProxy->fetchPointerofObject(FT2OutlinePointsIndex, rcvr);\n\tif ((interpreterProxy->isWords(array)) && ((interpreterProxy->slotSizeOf(array)) == (pointsSize * 2))) {\n\t\tpoints = interpreterProxy->arrayValueOf(array);\n\t\tgoto l1;\n\t}\n\tpoints = null;\nl1:\t/* end fetchWordArray:ofObject:assureSize: */;\n\tif (points == null) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\t/* begin fetchByteArray:ofObject:assureSize: */\n\tarray1 = interpreterProxy->fetchPointerofObject(FT2OutlineTagsIndex, rcvr);\n\tif ((interpreterProxy->isBytes(array1)) && ((interpreterProxy->slotSizeOf(array1)) == pointsSize)) {\n\t\ttags = interpreterProxy->arrayValueOf(array1);\n\t\tgoto l2;\n\t}\n\ttags = null;\nl2:\t/* end fetchByteArray:ofObject:assureSize: */;\n\tif (tags == null) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\tfor (i = 0; i <= (pointsSize - 1); i += 1) {\n\t\tpoints[2 * i] = (gs->outline.points[i].x);\n\t\tpoints[(2 * i) + 1] = (gs->outline.points[i].y);\n\t\ttags[i] = (gs->outline.tags[i]);\n\t}\n\tcontoursSize = gs->outline.n_contours;\n\t/* begin fetchShortArray:ofObject:assureSize: */\n\tarray2 = interpreterProxy->fetchPointerofObject(FT2OutlineContoursIndex, rcvr);\n\tif ((interpreterProxy->isWords(array2)) && ((interpreterProxy->slotSizeOf(array2)) == (((sqInt) (contoursSize + 1) >> 1)))) {\n\t\tcontours = interpreterProxy->arrayValueOf(array2);\n\t\tgoto l3;\n\t}\n\tcontours = null;\nl3:\t/* end fetchShortArray:ofObject:assureSize: */;\n\tfor (i = 0; i <= (contoursSize - 1); i += 1) {\n\t\tcontours[i] = (gs->outline.contours[i]);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(1);\n\treturn null;\n}\n\n\n/*\tAssumes that primitiveLoadGlyph:flags: has been called earlier to set face->glyph. */\n\nEXPORT(sqInt) primitiveLoadOutlineSizesFromFace(void) {\n\tsqInt rcvr;\n\tFT_GlyphSlot gs;\n\tFT_Face face;\n\tsqInt aFace;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"FT2Face\"));\n\taFace = interpreterProxy->stackValue(0);\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"FT2Outline\"));\n\trcvr = interpreterProxy->stackValue(1);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\terrorCode = 0;\n\tif ((interpreterProxy->slotSizeOf(rcvr)) < FT2OutlineInstSize) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\tface = ftHandleValueFromReceiver(aFace);\n\tif (face == null) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\tgs = face->glyph;\n\tif (!(gs)) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\t;\n\tinterpreterProxy->storeIntegerofObjectwithValue(FT2OutlineContoursSizeIndex, rcvr, gs->outline.n_contours);\n\tinterpreterProxy->storeIntegerofObjectwithValue(FT2OutlinePointsSizeIndex, rcvr, gs->outline.n_points);\n\tinterpreterProxy->storeIntegerofObjectwithValue(FT2OutlineFlagsIndex, rcvr, gs->outline.flags);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(1);\n\treturn null;\n}\n\n\n/*\thigh byte is module error, low is generic error */\n\nEXPORT(sqInt) primitiveModuleErrorCode(void) {\n\tsqInt _return_value;\n\n\t_return_value = interpreterProxy->positive32BitIntegerFor((FT_ERROR_MODULE(errorCode)));\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\n\n/*\tFill in the receiver's (a FT2Face object) fields\n\tfrom the address and fields of a newly opened FT_Face object. */\n\nEXPORT(sqInt) primitiveNewFaceFromFileAndIndex(void) {\n\tchar translatedFilePath[1024];\n\tsqInt rcvr;\n\tsize_t byteSize;\n\tFT_Face face;\n\tchar *fontFilePath;\n\tsqInt anInteger;\n\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(1)));\n\tfontFilePath = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(1))));\n\tanInteger = interpreterProxy->stackIntegerValue(0);\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(2), \"FT2Face\"));\n\trcvr = interpreterProxy->stackValue(2);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\t;\n\terrorCode = 0;\n\tbyteSize = interpreterProxy->byteSizeOf((oopForPointer( fontFilePath ) - BASE_HEADER_SIZE));\n\t;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (byteSize > 1000) {\n\t\tinterpreterProxy->success(0);\n\t\treturn null;\n\t}\n\tinterpreterProxy->ioFilenamefromStringofLengthresolveAliases(translatedFilePath, fontFilePath, byteSize, 1);\n\terrorCode = FT_New_Face(library, translatedFilePath, anInteger, &face);\n\t;\n\t;\n\tinterpreterProxy->success(errorCode == 0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tftAllocateHandleInReceiverForPointer(face);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(2);\n\treturn null;\n}\n\n\n/*\tFill in the receiver's (a FT2Face object) fields\n\tfrom the address and fields of a newly opened FT_Face object. */\n\nEXPORT(sqInt) primitiveNewMemoryFaceFromExternalMemoryAndIndex(void) {\n\tsqInt rcvr;\n\tvoid *memPointer;\n\tFT_Face face;\n\tsqInt aFreeTypeExternalMemory;\n\tsqInt byteSize;\n\tsqInt anInteger;\n\n\taFreeTypeExternalMemory = interpreterProxy->stackValue(2);\n\tbyteSize = interpreterProxy->stackIntegerValue(1);\n\tanInteger = interpreterProxy->stackIntegerValue(0);\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(3), \"FT2Face\"));\n\trcvr = interpreterProxy->stackValue(3);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\t;\n\terrorCode = 0;\n\tmemPointer = ftHandleValueFromReceiver(aFreeTypeExternalMemory);\n\t;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\terrorCode = FT_New_Memory_Face(library, memPointer, byteSize, anInteger, &face);\n\t;\n\t;\n\tinterpreterProxy->success(errorCode == 0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tftAllocateHandleInReceiverForPointer(face);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(3);\n\treturn null;\n}\n\n\n/*\tAssumes that primitiveLoadGlyph:flags: has been called earlier to set face->glyph. */\n\nEXPORT(sqInt) primitiveNumberOfOutlineCountours(void) {\n\tsqInt rcvr;\n\tsqInt contoursSize;\n\tFT_GlyphSlot gs;\n\tsqInt aFace;\n\tFT_Face face;\n\tsqInt _return_value;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"FT2GlyphSlot\"));\n\trcvr = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\terrorCode = 0;\n\tif ((interpreterProxy->slotSizeOf(rcvr)) < FT2GlyphSlotInstSize) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\taFace = interpreterProxy->fetchPointerofObject(FT2GlyphSlotFaceIndex, rcvr);\n\tface = ftHandleValueFromReceiver(aFace);\n\tif (face == null) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\tgs = face->glyph;\n\tif (!(gs)) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\t;\n\tcontoursSize = gs->outline.n_contours;\n\t_return_value = ((contoursSize << 1) | 1);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\n\n/*\tRender this face into the given form */\n\nEXPORT(sqInt) primitiveRenderGlyphIntoForm(void) {\n\tFT_Bitmap bitmap;\n\tsqInt faceOop;\n\tFT_Face face;\n\tsqInt formOop;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"Form\"));\n\tformOop = interpreterProxy->stackValue(0);\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"FT2Face\"));\n\tfaceOop = interpreterProxy->stackValue(1);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tface = ftHandleValueFromReceiver(faceOop);\n\tif (face == null) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\tftInitBitmapfromForm(&bitmap, formOop);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\terrorCode = FT_Outline_Get_Bitmap(library, &face->glyph->outline, &bitmap);\n\tinterpreterProxy->success(errorCode == 0);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(1);\n\treturn null;\n}\n\n\n/*\tRender this face into the given form */\n\nEXPORT(sqInt) primitiveRenderGlyphIntoFormWithRenderMode(void) {\n\tFT_Bitmap bitmap;\n\tsqInt faceOop;\n\tFT_Face face;\n\tsqInt formOop;\n\tsqInt mode;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"Form\"));\n\tformOop = interpreterProxy->stackValue(1);\n\tmode = interpreterProxy->stackIntegerValue(0);\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(2), \"FT2Face\"));\n\tfaceOop = interpreterProxy->stackValue(2);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tface = ftHandleValueFromReceiver(faceOop);\n\tif (face == null) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\tftInitBitmapfromFormrenderMode(&bitmap, formOop, mode);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\terrorCode = FT_Outline_Get_Bitmap(library, &face->glyph->outline, &bitmap);\n\tinterpreterProxy->success(errorCode == 0);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(2);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveResetErrorCode(void) {\n\tsqInt oldError;\n\tsqInt _return_value;\n\n\toldError = errorCode;\n\terrorCode = 0;\n\t_return_value = interpreterProxy->positive32BitIntegerFor(oldError);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveSetFaceCharMap(void) {\n\tFT_Encoding encoding;\n\tsqInt rcvr;\n\tFT_Face face;\n\tsqInt encodingString;\n\n\tencodingString = interpreterProxy->stackValue(0);\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"FT2Face\"));\n\trcvr = interpreterProxy->stackValue(1);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tface = ftHandleValueFromReceiver(rcvr);\n\tif (face == null) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\tencoding = ftEncodingValueFromString(encodingString);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t;\n\terrorCode = FT_Select_Charmap(face, encoding);\n\tinterpreterProxy->success(errorCode == 0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(1);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveSetPixelSizes(void) {\n\tsqInt rcvr;\n\tFT_Face face;\n\tsqInt x;\n\tsqInt y;\n\n\tx = interpreterProxy->stackIntegerValue(1);\n\ty = interpreterProxy->stackIntegerValue(0);\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(2), \"FT2Face\"));\n\trcvr = interpreterProxy->stackValue(2);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tface = ftHandleValueFromReceiver(rcvr);\n\tif (face == null) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\terrorCode = FT_Set_Pixel_Sizes(face, x, y);\n\tinterpreterProxy->success(errorCode == 0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(2);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveSetTransform(void) {\n\tsqInt *matrixsqIntPtr;\n\tsqInt *deltasqIntPtr;\n\tFT_Face face;\n\tFT_Vector delta;\n\tFT_Matrix matrix;\n\tsqInt rcvr;\n\tsqInt matrixWordArray;\n\tsqInt deltaWordArray;\n\n\tmatrixWordArray = interpreterProxy->stackValue(1);\n\tdeltaWordArray = interpreterProxy->stackValue(0);\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(2), \"FT2Face\"));\n\trcvr = interpreterProxy->stackValue(2);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tface = ftHandleValueFromReceiver(rcvr);\n\tif (face == null) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\tmatrixsqIntPtr = interpreterProxy->arrayValueOf(matrixWordArray);\n\tdeltasqIntPtr = interpreterProxy->arrayValueOf(deltaWordArray);\n\tdelta.x = deltasqIntPtr[0]; delta.y = deltasqIntPtr[1];;\n\tmatrix.xx = matrixsqIntPtr[0]; matrix.xy = matrixsqIntPtr[1]; \n\t\tmatrix.yx = matrixsqIntPtr[2]; matrix.yy = matrixsqIntPtr[3]; ;\n\tif (!(interpreterProxy->failed())) {\n\t\tFT_Set_Transform( face, &matrix, &delta);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(2);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveTransformFaceGlyphSlotOutline(void) {\n\tFT_Matrix matrix;\n\tsqInt rcvr;\n\tsqInt *matrixsqIntPtr;\n\tFT_Face face;\n\tsqInt matrixWordArray;\n\n\tmatrixWordArray = interpreterProxy->stackValue(0);\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"FT2Face\"));\n\trcvr = interpreterProxy->stackValue(1);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tface = ftHandleValueFromReceiver(rcvr);\n\tif (face == null) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\tmatrixsqIntPtr = interpreterProxy->arrayValueOf(matrixWordArray);\n\tmatrix.xx = matrixsqIntPtr[0]; matrix.xy = matrixsqIntPtr[1]; \n\t\tmatrix.yx = matrixsqIntPtr[2]; matrix.yy = matrixsqIntPtr[3]; ;\n\tif (!(interpreterProxy->failed())) {\n\t\tFT_Outline_Transform( &face->glyph->outline, &matrix );\n\t}\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(1);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveTranslateFaceGlyphSlotOutline(void) {\n\tsqInt rcvr;\n\tFT_Vector delta;\n\tsqInt *deltasqIntPtr;\n\tFT_Face face;\n\tsqInt deltaWordArray;\n\n\tdeltaWordArray = interpreterProxy->stackValue(0);\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"FT2Face\"));\n\trcvr = interpreterProxy->stackValue(1);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tface = ftHandleValueFromReceiver(rcvr);\n\tif (face == null) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\tdeltasqIntPtr = interpreterProxy->arrayValueOf(deltaWordArray);\n\tdelta.x = deltasqIntPtr[0]; delta.y = deltasqIntPtr[1];;\n\tif (!(interpreterProxy->failed())) {\n\t\tFT_Outline_Translate( &face->glyph->outline, delta.x, delta.y );\n\t}\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(1);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveVersion(void) {\n\tint aminor;\n\tint apatch;\n\tsqInt rcvr;\n\tint amajor;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"FT2Version\"));\n\trcvr = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\terrorCode = 0;\n\tFT_Library_Version(library, &amajor, &aminor, &apatch);\n\t;\n\tinterpreterProxy->storeIntegerofObjectwithValue(0, rcvr, amajor);\n\t;\n\tinterpreterProxy->storeIntegerofObjectwithValue(1, rcvr, aminor);\n\t;\n\tinterpreterProxy->storeIntegerofObjectwithValue(2, rcvr, apatch);\n\tif (interpreterProxy->failed()) {\n\t\tftParameterError();\n\t\treturn null;\n\t}\n\treturn null;\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter) {\n\tsqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\nEXPORT(sqInt) shutdownModule(void) {\n\terrorCode = FT_Done_FreeType(library);\n\tif (errorCode == 0) {\n\t\tlibrary = null;\n\t}\n\treturn errorCode == 0;\n}\n\nstatic sqInt sqAssert(sqInt aBool) {\n\t/* missing DebugCode */;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\n\nvoid* FT2Plugin_exports[][3] = {\n\t{\"FT2Plugin\", \"primitiveTransformFaceGlyphSlotOutline\", (void*)primitiveTransformFaceGlyphSlotOutline},\n\t{\"FT2Plugin\", \"primitiveModuleErrorCode\", (void*)primitiveModuleErrorCode},\n\t{\"FT2Plugin\", \"primitiveLoadFaceFields\", (void*)primitiveLoadFaceFields},\n\t{\"FT2Plugin\", \"primitiveGetFaceGlyphName\", (void*)primitiveGetFaceGlyphName},\n\t{\"FT2Plugin\", \"shutdownModule\", (void*)shutdownModule},\n\t{\"FT2Plugin\", \"primitiveGetSfntTableOS2\", (void*)primitiveGetSfntTableOS2},\n\t{\"FT2Plugin\", \"primitiveDoneFace\", (void*)primitiveDoneFace},\n\t{\"FT2Plugin\", \"primitiveNewFaceFromFileAndIndex\", (void*)primitiveNewFaceFromFileAndIndex},\n\t{\"FT2Plugin\", \"primitiveLibraryHandle\", (void*)primitiveLibraryHandle},\n\t{\"FT2Plugin\", \"primitiveGetKerningLeftRight\", (void*)primitiveGetKerningLeftRight},\n\t{\"FT2Plugin\", \"primitiveLoadOutlineArraysFromFace\", (void*)primitiveLoadOutlineArraysFromFace},\n\t{\"FT2Plugin\", \"primitiveEmboldenFaceGlyphSlotOutline\", (void*)primitiveEmboldenFaceGlyphSlotOutline},\n\t{\"FT2Plugin\", \"primitiveLoadGlyph\", (void*)primitiveLoadGlyph},\n\t{\"FT2Plugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"FT2Plugin\", \"primitiveSetTransform\", (void*)primitiveSetTransform},\n\t{\"FT2Plugin\", \"primitiveLoadGlyphSlotFromFace\", (void*)primitiveLoadGlyphSlotFromFace},\n\t{\"FT2Plugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{\"FT2Plugin\", \"primitiveNumberOfOutlineCountours\", (void*)primitiveNumberOfOutlineCountours},\n\t{\"FT2Plugin\", \"primitiveSetPixelSizes\", (void*)primitiveSetPixelSizes},\n\t{\"FT2Plugin\", \"primitiveTranslateFaceGlyphSlotOutline\", (void*)primitiveTranslateFaceGlyphSlotOutline},\n\t{\"FT2Plugin\", \"primitiveGetFaceCharMapsIntoArray\", (void*)primitiveGetFaceCharMapsIntoArray},\n\t{\"FT2Plugin\", \"primitiveResetErrorCode\", (void*)primitiveResetErrorCode},\n\t{\"FT2Plugin\", \"primitiveHasKerning\", (void*)primitiveHasKerning},\n\t{\"FT2Plugin\", \"primitiveGetFaceCharIndex\", (void*)primitiveGetFaceCharIndex},\n\t{\"FT2Plugin\", \"primitiveCopyToExternalMemory\", (void*)primitiveCopyToExternalMemory},\n\t{\"FT2Plugin\", \"primitiveLoadFaceBbox\", (void*)primitiveLoadFaceBbox},\n\t{\"FT2Plugin\", \"primitiveDoneFacePreserveFields\", (void*)primitiveDoneFacePreserveFields},\n\t{\"FT2Plugin\", \"primitiveNewMemoryFaceFromExternalMemoryAndIndex\", (void*)primitiveNewMemoryFaceFromExternalMemoryAndIndex},\n\t{\"FT2Plugin\", \"primitiveGetFaceCharMap\", (void*)primitiveGetFaceCharMap},\n\t{\"FT2Plugin\", \"primitiveSetFaceCharMap\", (void*)primitiveSetFaceCharMap},\n\t{\"FT2Plugin\", \"primitiveLoadOutlineSizesFromFace\", (void*)primitiveLoadOutlineSizesFromFace},\n\t{\"FT2Plugin\", \"primitiveFreeExternalMemory\", (void*)primitiveFreeExternalMemory},\n\t{\"FT2Plugin\", \"primitiveErrorCode\", (void*)primitiveErrorCode},\n\t{\"FT2Plugin\", \"initialiseModule\", (void*)initialiseModule},\n\t{\"FT2Plugin\", \"primitiveGetPostscriptName\", (void*)primitiveGetPostscriptName},\n\t{\"FT2Plugin\", \"primitiveErrorString\", (void*)primitiveErrorString},\n\t{\"FT2Plugin\", \"primitiveLoadCharacter\", (void*)primitiveLoadCharacter},\n\t{\"FT2Plugin\", \"primitiveVersion\", (void*)primitiveVersion},\n\t{\"FT2Plugin\", \"primitiveRenderGlyphIntoForm\", (void*)primitiveRenderGlyphIntoForm},\n\t{\"FT2Plugin\", \"primitiveRenderGlyphIntoFormWithRenderMode\", (void*)primitiveRenderGlyphIntoFormWithRenderMode},\n\t{NULL, NULL, NULL}\n};\n\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/FileCopyPlugin/FileCopyPlugin.c",
    "content": "/* Automatically generated by\n\tSmartSyntaxPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tFileCopyPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"FileCopyPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n\n/*** Function Prototypes ***/\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nstatic sqInt msg(char *s);\nEXPORT(sqInt) primitiveFileCopyNamedTo(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\nstatic void sqAssert(sqInt aBool);\n\n\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"FileCopyPlugin VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"FileCopyPlugin VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\n\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\nEXPORT(sqInt)\nprimitiveFileCopyNamedTo(void)\n{\n\tchar *dstName;\n\tsqInt dstSz;\n\tsqInt ok;\n\tchar *srcName;\n\tsqInt srcSz;\n\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(1)));\n\tsrcName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(1))));\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\n\tdstName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tsrcSz = interpreterProxy->slotSizeOf(((sqInt)(long)(srcName) - 4));\n\tdstSz = interpreterProxy->slotSizeOf(((sqInt)(long)(dstName) - 4));\n\tok = sqCopyFilesizetosize(srcName, srcSz, dstName, dstSz);\n\tif (!(ok)) {\n\t\tinterpreterProxy->primitiveFail();\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(2);\n\treturn null;\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n\tsqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\nstatic void\nsqAssert(sqInt aBool)\n{\n\t/* missing DebugCode */;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* FileCopyPlugin_exports[][3] = {\n\t{\"FileCopyPlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"FileCopyPlugin\", \"primitiveFileCopyNamedTo\", (void*)primitiveFileCopyNamedTo},\n\t{\"FileCopyPlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/FilePlugin/FilePlugin.c",
    "content": "/* Automatically generated by\n\tVMPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tFilePlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"FilePlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"FilePlugin.h\"\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n#define DirBadPath 2\n#define DirNoMoreEntries 1\n#define PrimErrBadArgument 3\n#define PrimErrBadIndex 4\n#define PrimErrNoMemory 9\n#define PrimErrObjectMayMove 14\n#define PrimErrUnsupported 7\n#define PrimNoErr 0\n\n\n/*** Function Prototypes ***/\nstatic sqInt asciiDirectoryDelimiter(void);\nEXPORT(sqInt) fileOpenNamesizewritesecure(char *nameIndex, sqInt nameSize, sqInt writeFlag, sqInt secureFlag);\nsqInt fileRecordSize(void);\nSQFile * fileValueOf(sqInt objectPointer);\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nEXPORT(sqInt) getThisSession(void);\nstatic sqInt halt(void);\nEXPORT(sqInt) initialiseModule(void);\nstatic sqInt makeDirEntryNamesizecreateDatemodDateisDirfileSize(char *entryName, sqInt entryNameSize, sqInt createDate, sqInt modifiedDate, sqInt dirFlag, squeakFileOffsetType  fileSize);\nEXPORT(sqInt) moduleUnloaded(char *aModuleName);\nstatic sqInt msg(char *s);\nEXPORT(sqInt) primitiveDirectoryCreate(void);\nEXPORT(sqInt) primitiveDirectoryDelete(void);\nEXPORT(sqInt) primitiveDirectoryDelimitor(void);\nEXPORT(sqInt) primitiveDirectoryEntry(void);\nEXPORT(sqInt) primitiveDirectoryGetMacTypeAndCreator(void);\nEXPORT(sqInt) primitiveDirectoryLookup(void);\nEXPORT(sqInt) primitiveDirectorySetMacTypeAndCreator(void);\nEXPORT(sqInt) primitiveDisableFileAccess(void);\nEXPORT(sqInt) primitiveFileAtEnd(void);\nEXPORT(sqInt) primitiveFileClose(void);\nEXPORT(sqInt) primitiveFileDelete(void);\nEXPORT(sqInt) primitiveFileFlush(void);\nEXPORT(sqInt) primitiveFileGetPosition(void);\nEXPORT(sqInt) primitiveFileOpen(void);\nEXPORT(sqInt) primitiveFileRead(void);\nEXPORT(sqInt) primitiveFileRename(void);\nEXPORT(sqInt) primitiveFileSetPosition(void);\nEXPORT(sqInt) primitiveFileSize(void);\nEXPORT(sqInt) primitiveFileStdioHandles(void);\nEXPORT(sqInt) primitiveFileTruncate(void);\nEXPORT(sqInt) primitiveFileWrite(void);\nEXPORT(sqInt) primitiveHasFileAccess(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\nEXPORT(sqInt) setMacFileTypeAndCreator(char *fileName, char *typeString, char *creatorString);\nEXPORT(sqInt) shutdownModule(void);\n\n\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"FilePlugin VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"FilePlugin VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\nstatic void * sCCPfn;\nstatic void * sCDFfn;\nstatic void * sCDPfn;\nstatic void * sCGFTfn;\nstatic void * sCLPfn;\nstatic void * sCOFfn;\nstatic void * sCRFfn;\nstatic void * sCSFTfn;\nstatic void * sDFAfn;\nstatic void * sHFAfn;\n\n\nstatic sqInt\nasciiDirectoryDelimiter(void)\n{\n\treturn dir_Delimitor();\n}\n\n\n/*\tOpen the named file, possibly checking security. Answer the file oop. */\n\nEXPORT(sqInt)\nfileOpenNamesizewritesecure(char *nameIndex, sqInt nameSize, sqInt writeFlag, sqInt secureFlag)\n{\n    SQFile *file;\n    sqInt fileOop;\n    sqInt okToOpen;\n\n\tfileOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\n\t/* begin fileValueOf: */\n\tif (!((interpreterProxy->isBytes(fileOop))\n\t\t && ((interpreterProxy->byteSizeOf(fileOop)) == (fileRecordSize())))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tfile = null;\n\t\tgoto l1;\n\t}\n\tfile = interpreterProxy->firstIndexableField(fileOop);\nl1:\t/* end fileValueOf: */;\n\tif (!(interpreterProxy->failed())) {\n\t\tif (secureFlag) {\n\t\t\tif (sCOFfn != 0) {\n\t\t\t\tokToOpen = ((sqInt (*) (char *, sqInt, sqInt)) sCOFfn)(nameIndex, nameSize, writeFlag);\n\t\t\t\tif (!(okToOpen)) {\n\t\t\t\t\tinterpreterProxy->primitiveFail();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tsqFileOpen(file, nameIndex, nameSize, writeFlag);\n\t}\n\treturn fileOop;\n}\n\n\n/*\tReturn the size of a Smalltalk file record in bytes. */\n\nsqInt\nfileRecordSize(void)\n{\n\treturn sizeof(SQFile);\n}\n\n\n/*\tReturn a pointer to the first byte of of the file record within the given\n\tSmalltalk object, or nil if objectPointer is not a file record.\n */\n\nSQFile *\nfileValueOf(sqInt objectPointer)\n{\n\tif (!((interpreterProxy->isBytes(objectPointer))\n\t\t && ((interpreterProxy->byteSizeOf(objectPointer)) == (fileRecordSize())))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\treturn interpreterProxy->firstIndexableField(objectPointer);\n}\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\n\n/*\tExported entry point for the VM. Only used by AsynchFilePlugin and needs\n\tto be reowrked now we have a VM global session Id capability\n */\n\nEXPORT(sqInt)\ngetThisSession(void)\n{\n\treturn sqFileThisSession();\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nEXPORT(sqInt)\ninitialiseModule(void)\n{\n\tsCCPfn = interpreterProxy->ioLoadFunctionFrom(\"secCanCreatePathOfSize\", \"SecurityPlugin\");\n\tsCDPfn = interpreterProxy->ioLoadFunctionFrom(\"secCanDeletePathOfSize\", \"SecurityPlugin\");\n\tsCGFTfn = interpreterProxy->ioLoadFunctionFrom(\"secCanGetFileTypeOfSize\", \"SecurityPlugin\");\n\tsCLPfn = interpreterProxy->ioLoadFunctionFrom(\"secCanListPathOfSize\", \"SecurityPlugin\");\n\tsCSFTfn = interpreterProxy->ioLoadFunctionFrom(\"secCanSetFileTypeOfSize\", \"SecurityPlugin\");\n\tsDFAfn = interpreterProxy->ioLoadFunctionFrom(\"secDisableFileAccess\", \"SecurityPlugin\");\n\tsCDFfn = interpreterProxy->ioLoadFunctionFrom(\"secCanDeleteFileOfSize\", \"SecurityPlugin\");\n\tsCOFfn = interpreterProxy->ioLoadFunctionFrom(\"secCanOpenFileOfSizeWritable\", \"SecurityPlugin\");\n\tsCRFfn = interpreterProxy->ioLoadFunctionFrom(\"secCanRenameFileOfSize\", \"SecurityPlugin\");\n\tsHFAfn = interpreterProxy->ioLoadFunctionFrom(\"secHasFileAccess\", \"SecurityPlugin\");\n\treturn sqFileInit();\n}\n\nstatic sqInt\nmakeDirEntryNamesizecreateDatemodDateisDirfileSize(char *entryName, sqInt entryNameSize, sqInt createDate, sqInt modifiedDate, sqInt dirFlag, squeakFileOffsetType  fileSize)\n{\n    sqInt createDateOop;\n    sqInt fileSizeOop;\n    sqInt i;\n    sqInt modDateOop;\n    sqInt nameString;\n    sqInt results;\n    char *stringPtr;\n\n\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 5));\n\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), entryNameSize));\n\tinterpreterProxy->pushRemappableOop(interpreterProxy->positive32BitIntegerFor(createDate));\n\tinterpreterProxy->pushRemappableOop(interpreterProxy->positive32BitIntegerFor(modifiedDate));\n\tinterpreterProxy->pushRemappableOop(interpreterProxy->positive64BitIntegerFor(fileSize));\n\tfileSizeOop = interpreterProxy->popRemappableOop();\n\tmodDateOop = interpreterProxy->popRemappableOop();\n\tcreateDateOop = interpreterProxy->popRemappableOop();\n\tnameString = interpreterProxy->popRemappableOop();\n\n\t/* copy name into Smalltalk string */\n\n\tresults = interpreterProxy->popRemappableOop();\n\tstringPtr = interpreterProxy->firstIndexableField(nameString);\n\tfor (i = 0; i <= (entryNameSize - 1); i += 1) {\n\t\tstringPtr[i] = (entryName[i]);\n\t}\n\tinterpreterProxy->storePointerofObjectwithValue(0, results, nameString);\n\tinterpreterProxy->storePointerofObjectwithValue(1, results, createDateOop);\n\tinterpreterProxy->storePointerofObjectwithValue(2, results, modDateOop);\n\tif (dirFlag) {\n\t\tinterpreterProxy->storePointerofObjectwithValue(3, results, interpreterProxy->trueObject());\n\t}\n\telse {\n\t\tinterpreterProxy->storePointerofObjectwithValue(3, results, interpreterProxy->falseObject());\n\t}\n\tinterpreterProxy->storePointerofObjectwithValue(4, results, fileSizeOop);\n\treturn results;\n}\n\n\n/*\tThe module with the given name was just unloaded.\n\tMake sure we have no dangling references. */\n\nEXPORT(sqInt)\nmoduleUnloaded(char *aModuleName)\n{\n\tif ((strcmp(aModuleName, \"SecurityPlugin\")) == 0) {\n\t\tsCCPfn = sCDPfn = sCGFTfn = sCLPfn = sCSFTfn = sDFAfn = sCDFfn = sCOFfn = sCRFfn = sHFAfn = 0;\n\t}\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\nEXPORT(sqInt)\nprimitiveDirectoryCreate(void)\n{\n    sqInt dirName;\n    char *dirNameIndex;\n    sqInt dirNameSize;\n    sqInt okToCreate;\n\n\tdirName = interpreterProxy->stackValue(0);\n\tif (!(interpreterProxy->isBytes(dirName))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tdirNameIndex = interpreterProxy->firstIndexableField(dirName);\n\n\t/* If the security plugin can be loaded, use it to check for permission.\n\tIf not, assume it's ok */\n\n\tdirNameSize = interpreterProxy->byteSizeOf(dirName);\n\tif (sCCPfn != 0) {\n\t\tokToCreate =  ((sqInt (*)(char *, sqInt))sCCPfn)(dirNameIndex, dirNameSize);\n\t\tif (!(okToCreate)) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\tif (!(dir_Create(dirNameIndex, dirNameSize))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop(1);\n}\n\nEXPORT(sqInt)\nprimitiveDirectoryDelete(void)\n{\n    sqInt dirName;\n    char *dirNameIndex;\n    sqInt dirNameSize;\n    sqInt okToDelete;\n\n\tdirName = interpreterProxy->stackValue(0);\n\tif (!(interpreterProxy->isBytes(dirName))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tdirNameIndex = interpreterProxy->firstIndexableField(dirName);\n\n\t/* If the security plugin can be loaded, use it to check for permission.\n\tIf not, assume it's ok */\n\n\tdirNameSize = interpreterProxy->byteSizeOf(dirName);\n\tif (sCDPfn != 0) {\n\t\tokToDelete =  ((sqInt (*)(char *, sqInt))sCDPfn)(dirNameIndex, dirNameSize);\n\t\tif (!(okToDelete)) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\tif (!(dir_Delete(dirNameIndex, dirNameSize))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop(1);\n}\n\nEXPORT(sqInt)\nprimitiveDirectoryDelimitor(void)\n{\n    sqInt ascii;\n\n\tascii = asciiDirectoryDelimiter();\n\tif (!((ascii >= 0)\n\t\t && (ascii <= 255))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->popthenPush(1, interpreterProxy->fetchPointerofObject(ascii, interpreterProxy->characterTable()));\n}\n\n\n/*\tTwo arguments - directory path, and simple file name;\n\treturns an array (see primitiveDirectoryLookup) describing the file or\n\tdirectory, or nil if it does not exist. \n\tPrimitive fails if the outer path does not identify a readable directory.\n\t(This is a lookup-by-name variant of primitiveDirectoryLookup.) */\n\nEXPORT(sqInt)\nprimitiveDirectoryEntry(void)\n{\n    sqInt createDate;\n    sqInt dirFlag;\n    char entryName[256];\n    sqInt entryNameSize;\n    squeakFileOffsetType fileSize;\n    sqInt modifiedDate;\n    sqInt okToList;\n    sqInt pathName;\n    char *pathNameIndex;\n    sqInt pathNameSize;\n    char *reqNameIndex;\n    sqInt reqNameSize;\n    sqInt requestedName;\n    sqInt status;\n\n\trequestedName = interpreterProxy->stackValue(0);\n\tpathName = interpreterProxy->stackValue(1);\n\tif (!(interpreterProxy->isBytes(pathName))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tpathNameIndex = interpreterProxy->firstIndexableField(pathName);\n\tpathNameSize = interpreterProxy->byteSizeOf(pathName);\n\treqNameIndex = interpreterProxy->firstIndexableField(requestedName);\n\n\t/* If the security plugin can be loaded, use it to check for permission. \n\tIf not, assume it's ok */\n\n\treqNameSize = interpreterProxy->byteSizeOf(requestedName);\n\tif (sCLPfn != 0) {\n\t\tokToList = ((sqInt (*)(char *, sqInt))sCLPfn)(pathNameIndex, pathNameSize);\n\t}\n\telse {\n\t\tokToList = 1;\n\t}\n\tif (okToList) {\n\t\tstatus = dir_EntryLookup(pathNameIndex, pathNameSize, reqNameIndex, reqNameSize,\n\t\t\t\t\t\t\t\t\t\t\t\t\t  entryName, &entryNameSize, &createDate,\n\t\t\t\t\t\t\t\t\t\t\t\t\t  &modifiedDate, &dirFlag, &fileSize);\n\t}\n\telse {\n\t\tstatus = DirNoMoreEntries;\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (status == DirNoMoreEntries) {\n\t\tinterpreterProxy->popthenPush(3, interpreterProxy->nilObject());\n\t\treturn null;\n\t}\n\tif (status == DirBadPath) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->popthenPush(3, makeDirEntryNamesizecreateDatemodDateisDirfileSize(entryName, entryNameSize, createDate, modifiedDate, dirFlag, fileSize));\n}\n\nEXPORT(sqInt)\nprimitiveDirectoryGetMacTypeAndCreator(void)\n{\n    sqInt creatorString;\n    char *creatorStringIndex;\n    sqInt fileName;\n    char *fileNameIndex;\n    sqInt fileNameSize;\n    sqInt okToGet;\n    sqInt typeString;\n    char *typeStringIndex;\n\n\tcreatorString = interpreterProxy->stackValue(0);\n\ttypeString = interpreterProxy->stackValue(1);\n\tfileName = interpreterProxy->stackValue(2);\n\tif (!((interpreterProxy->isBytes(creatorString))\n\t\t && ((interpreterProxy->byteSizeOf(creatorString)) == 4))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!((interpreterProxy->isBytes(typeString))\n\t\t && ((interpreterProxy->byteSizeOf(typeString)) == 4))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!(interpreterProxy->isBytes(fileName))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tcreatorStringIndex = interpreterProxy->firstIndexableField(creatorString);\n\ttypeStringIndex = interpreterProxy->firstIndexableField(typeString);\n\tfileNameIndex = interpreterProxy->firstIndexableField(fileName);\n\n\t/* If the security plugin can be loaded, use it to check for permission.\n\tIf not, assume it's ok */\n\n\tfileNameSize = interpreterProxy->byteSizeOf(fileName);\n\tif (sCGFTfn != 0) {\n\t\tokToGet =  ((sqInt (*)(char *, sqInt))sCGFTfn)(fileNameIndex, fileNameSize);\n\t\tif (!(okToGet)) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\tif (!(dir_GetMacFileTypeAndCreator(fileNameIndex, fileNameSize, typeStringIndex, creatorStringIndex))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop(3);\n}\n\nEXPORT(sqInt)\nprimitiveDirectoryLookup(void)\n{\n    sqInt createDate;\n    sqInt dirFlag;\n    char entryName[256];\n    sqInt entryNameSize;\n    squeakFileOffsetType fileSize;\n    sqInt index;\n    sqInt modifiedDate;\n    sqInt okToList;\n    sqInt pathName;\n    char *pathNameIndex;\n    sqInt pathNameSize;\n    sqInt status;\n\n\tindex = interpreterProxy->stackIntegerValue(0);\n\tpathName = interpreterProxy->stackValue(1);\n\tif (!(interpreterProxy->isBytes(pathName))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tpathNameIndex = interpreterProxy->firstIndexableField(pathName);\n\n\t/* If the security plugin can be loaded, use it to check for permission. \n\tIf not, assume it's ok */\n\n\tpathNameSize = interpreterProxy->byteSizeOf(pathName);\n\tif (sCLPfn != 0) {\n\t\tokToList = ((sqInt (*)(char *, sqInt))sCLPfn)(pathNameIndex, pathNameSize);\n\t}\n\telse {\n\t\tokToList = 1;\n\t}\n\tif (okToList) {\n\t\tstatus = dir_Lookup(pathNameIndex, pathNameSize, index,\n\t\t\t\t\t\t\t\t\t\t\t\tentryName, &entryNameSize, &createDate,\n\t\t\t\t\t\t\t\t\t\t\t\t&modifiedDate, &dirFlag, &fileSize);\n\t}\n\telse {\n\t\tstatus = DirNoMoreEntries;\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (status == DirNoMoreEntries) {\n\t\tinterpreterProxy->popthenPush(3, interpreterProxy->nilObject());\n\t\treturn null;\n\t}\n\tif (status == DirBadPath) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->popthenPush(3, makeDirEntryNamesizecreateDatemodDateisDirfileSize(entryName, entryNameSize, createDate, modifiedDate, dirFlag, fileSize));\n}\n\nEXPORT(sqInt)\nprimitiveDirectorySetMacTypeAndCreator(void)\n{\n    sqInt creatorString;\n    char *creatorStringIndex;\n    sqInt fileName;\n    char *fileNameIndex;\n    sqInt fileNameSize;\n    sqInt okToSet;\n    sqInt typeString;\n    char *typeStringIndex;\n\n\tcreatorString = interpreterProxy->stackValue(0);\n\ttypeString = interpreterProxy->stackValue(1);\n\tfileName = interpreterProxy->stackValue(2);\n\tif (!((interpreterProxy->isBytes(creatorString))\n\t\t && ((interpreterProxy->byteSizeOf(creatorString)) == 4))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!((interpreterProxy->isBytes(typeString))\n\t\t && ((interpreterProxy->byteSizeOf(typeString)) == 4))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!(interpreterProxy->isBytes(fileName))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tcreatorStringIndex = interpreterProxy->firstIndexableField(creatorString);\n\ttypeStringIndex = interpreterProxy->firstIndexableField(typeString);\n\tfileNameIndex = interpreterProxy->firstIndexableField(fileName);\n\n\t/* If the security plugin can be loaded, use it to check for permission.\n\tIf not, assume it's ok */\n\n\tfileNameSize = interpreterProxy->byteSizeOf(fileName);\n\tif (sCSFTfn != 0) {\n\t\tokToSet =  ((sqInt (*)(char *, sqInt))sCSFTfn)(fileNameIndex, fileNameSize);\n\t\tif (!(okToSet)) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\tif (!(dir_SetMacFileTypeAndCreator(fileNameIndex, fileNameSize,typeStringIndex, creatorStringIndex))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop(3);\n}\n\n\n/*\tIf the security plugin can be loaded, use it to turn off file access\n\tIf not, assume it's ok */\n\nEXPORT(sqInt)\nprimitiveDisableFileAccess(void)\n{\n\tif (sDFAfn != 0) {\n\t\t((sqInt (*)(void))sDFAfn)();\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveFileAtEnd(void)\n{\n    sqInt atEnd;\n    SQFile *file;\n    sqInt objectPointer;\n\n\t/* begin fileValueOf: */\n\tobjectPointer = interpreterProxy->stackValue(0);\n\tif (!((interpreterProxy->isBytes(objectPointer))\n\t\t && ((interpreterProxy->byteSizeOf(objectPointer)) == (fileRecordSize())))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tfile = null;\n\t\tgoto l1;\n\t}\n\tfile = interpreterProxy->firstIndexableField(objectPointer);\nl1:\t/* end fileValueOf: */;\n\tif (!(interpreterProxy->failed())) {\n\t\tatEnd = sqFileAtEnd(file);\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushBool(atEnd);\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveFileClose(void)\n{\n    SQFile *file;\n    sqInt objectPointer;\n\n\t/* begin fileValueOf: */\n\tobjectPointer = interpreterProxy->stackValue(0);\n\tif (!((interpreterProxy->isBytes(objectPointer))\n\t\t && ((interpreterProxy->byteSizeOf(objectPointer)) == (fileRecordSize())))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tfile = null;\n\t\tgoto l1;\n\t}\n\tfile = interpreterProxy->firstIndexableField(objectPointer);\nl1:\t/* end fileValueOf: */;\n\tif (!(interpreterProxy->failed())) {\n\t\tsqFileClose(file);\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->pop(1);\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveFileDelete(void)\n{\n    char *nameIndex;\n    sqInt namePointer;\n    sqInt nameSize;\n    sqInt okToDelete;\n\n\tnamePointer = interpreterProxy->stackValue(0);\n\tif (!(interpreterProxy->isBytes(namePointer))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tnameIndex = interpreterProxy->firstIndexableField(namePointer);\n\n\t/* If the security plugin can be loaded, use it to check for permission.\n\tIf not, assume it's ok */\n\n\tnameSize = interpreterProxy->byteSizeOf(namePointer);\n\tif (sCDFfn != 0) {\n\t\tokToDelete =  ((sqInt (*)(char *, sqInt))sCDFfn)(nameIndex, nameSize);\n\t\tif (!(okToDelete)) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\tsqFileDeleteNameSize(nameIndex, nameSize);\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->pop(1);\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveFileFlush(void)\n{\n    SQFile *file;\n    sqInt objectPointer;\n\n\t/* begin fileValueOf: */\n\tobjectPointer = interpreterProxy->stackValue(0);\n\tif (!((interpreterProxy->isBytes(objectPointer))\n\t\t && ((interpreterProxy->byteSizeOf(objectPointer)) == (fileRecordSize())))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tfile = null;\n\t\tgoto l1;\n\t}\n\tfile = interpreterProxy->firstIndexableField(objectPointer);\nl1:\t/* end fileValueOf: */;\n\tif (!(interpreterProxy->failed())) {\n\t\tsqFileFlush(file);\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->pop(1);\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveFileGetPosition(void)\n{\n    SQFile *file;\n    sqInt objectPointer;\n    squeakFileOffsetType position;\n\n\t/* begin fileValueOf: */\n\tobjectPointer = interpreterProxy->stackValue(0);\n\tif (!((interpreterProxy->isBytes(objectPointer))\n\t\t && ((interpreterProxy->byteSizeOf(objectPointer)) == (fileRecordSize())))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tfile = null;\n\t\tgoto l1;\n\t}\n\tfile = interpreterProxy->firstIndexableField(objectPointer);\nl1:\t/* end fileValueOf: */;\n\tif (!(interpreterProxy->failed())) {\n\t\tposition = sqFileGetPosition(file);\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->popthenPush(2, interpreterProxy->positive64BitIntegerFor(position));\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveFileOpen(void)\n{\n    sqInt filePointer;\n    char *nameIndex;\n    sqInt namePointer;\n    sqInt nameSize;\n    sqInt writeFlag;\n\n\twriteFlag = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(0));\n\tnamePointer = interpreterProxy->stackValue(1);\n\tif (!(interpreterProxy->isBytes(namePointer))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tnameIndex = interpreterProxy->firstIndexableField(namePointer);\n\tnameSize = interpreterProxy->byteSizeOf(namePointer);\n\tfilePointer = fileOpenNamesizewritesecure(nameIndex, nameSize, writeFlag, 1);\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->popthenPush(3, filePointer);\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveFileRead(void)\n{\n    sqInt array;\n    sqInt bytesRead;\n    size_t count;\n    size_t elementSize;\n    SQFile *file;\n    sqInt objectPointer;\n    sqInt retryCount;\n    size_t startIndex;\n\n\tretryCount = 0;\n\tcount = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(0));\n\tstartIndex = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(1));\n\twhile (1) {\n\t\tarray = interpreterProxy->stackValue(2);\n\t\t/* begin fileValueOf: */\n\t\tobjectPointer = interpreterProxy->stackValue(3);\n\t\tif (!((interpreterProxy->isBytes(objectPointer))\n\t\t\t && ((interpreterProxy->byteSizeOf(objectPointer)) == (fileRecordSize())))) {\n\t\t\tinterpreterProxy->primitiveFail();\n\t\t\tfile = null;\n\t\t\tgoto l1;\n\t\t}\n\t\tfile = interpreterProxy->firstIndexableField(objectPointer);\n\tl1:\t/* end fileValueOf: */;\n\t\tif ((interpreterProxy->failed())\n\t\t || (!(interpreterProxy->isWordsOrBytes(array)))) {\n\t\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t\t}\n\t\telementSize = (interpreterProxy->isWords(array)\n\t\t\t? 4\n\t\t\t: 1);\n\t\tif (!((startIndex >= 1)\n\t\t\t && (((startIndex + count) - 1) <= (interpreterProxy->slotSizeOf(array))))) {\n\t\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadIndex);\n\t\t}\n\t\tbytesRead = sqFileReadIntoAt(file, count * elementSize, ((char *) (interpreterProxy->firstIndexableField(array))), (startIndex - 1) * elementSize);\n\t\tif (!(((interpreterProxy->primitiveFailureCode()) == PrimErrObjectMayMove)\n && (((retryCount += 1)) <= 2))) break;\n\t\tinterpreterProxy->tenuringIncrementalGC();\n\t\tinterpreterProxy->primitiveFailFor(PrimNoErr);\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->popthenPush(5, (((bytesRead / elementSize) << 1) | 1));\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveFileRename(void)\n{\n    char *newNameIndex;\n    sqInt newNamePointer;\n    sqInt newNameSize;\n    sqInt okToRename;\n    char *oldNameIndex;\n    sqInt oldNamePointer;\n    sqInt oldNameSize;\n\n\tnewNamePointer = interpreterProxy->stackValue(0);\n\toldNamePointer = interpreterProxy->stackValue(1);\n\tif (!((interpreterProxy->isBytes(newNamePointer))\n\t\t && (interpreterProxy->isBytes(oldNamePointer)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tnewNameIndex = interpreterProxy->firstIndexableField(newNamePointer);\n\tnewNameSize = interpreterProxy->byteSizeOf(newNamePointer);\n\toldNameIndex = interpreterProxy->firstIndexableField(oldNamePointer);\n\n\t/* If the security plugin can be loaded, use it to check for rename permission.\n\tIf not, assume it's ok */\n\n\toldNameSize = interpreterProxy->byteSizeOf(oldNamePointer);\n\tif (sCRFfn != 0) {\n\t\tokToRename =  ((sqInt (*)(char *, sqInt))sCRFfn)(oldNameIndex, oldNameSize);\n\t\tif (!(okToRename)) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\tsqFileRenameOldSizeNewSize(oldNameIndex, oldNameSize, newNameIndex, newNameSize);\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->pop(2);\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveFileSetPosition(void)\n{\n    SQFile *file;\n    squeakFileOffsetType newPosition;\n    sqInt objectPointer;\n    sqInt sz;\n\n\tif (!(((interpreterProxy->stackValue(0)) & 1))) {\n\t\tsz = sizeof(squeakFileOffsetType);\n\t\tif ((interpreterProxy->byteSizeOf(interpreterProxy->stackValue(0))) > sz) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\tnewPosition = interpreterProxy->positive64BitValueOf(interpreterProxy->stackValue(0));\n\t/* begin fileValueOf: */\n\tobjectPointer = interpreterProxy->stackValue(1);\n\tif (!((interpreterProxy->isBytes(objectPointer))\n\t\t && ((interpreterProxy->byteSizeOf(objectPointer)) == (fileRecordSize())))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tfile = null;\n\t\tgoto l1;\n\t}\n\tfile = interpreterProxy->firstIndexableField(objectPointer);\nl1:\t/* end fileValueOf: */;\n\tif (!(interpreterProxy->failed())) {\n\t\tsqFileSetPosition(file, newPosition);\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->pop(2);\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveFileSize(void)\n{\n    SQFile *file;\n    sqInt objectPointer;\n    squeakFileOffsetType size;\n\n\t/* begin fileValueOf: */\n\tobjectPointer = interpreterProxy->stackValue(0);\n\tif (!((interpreterProxy->isBytes(objectPointer))\n\t\t && ((interpreterProxy->byteSizeOf(objectPointer)) == (fileRecordSize())))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tfile = null;\n\t\tgoto l1;\n\t}\n\tfile = interpreterProxy->firstIndexableField(objectPointer);\nl1:\t/* end fileValueOf: */;\n\tif (!(interpreterProxy->failed())) {\n\t\tsize = sqFileSize(file);\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->popthenPush(2, interpreterProxy->positive64BitIntegerFor(size));\n\t}\n}\n\n\n/*\tAnswer an Array of file handles for standard in, standard out and standard\n\terror, with nil in entries that are unvailable, e.g. because the platform\n\tdoes not provide\n\tstandard error, etc. Fail if there are no standard i/o facilities on the\n\tplatform or\n\tif the security plugin denies access or if memory runs out. */\n\nEXPORT(sqInt)\nprimitiveFileStdioHandles(void)\n{\n    SQFile fileRecords[3];\n    sqInt index;\n    sqInt result;\n    sqInt validMask;\n\n\tif (sHFAfn != 0) {\n\t\tif (!( ((sqInt (*)(void))sHFAfn)())) {\n\t\t\treturn interpreterProxy->primitiveFailFor(PrimErrUnsupported);\n\t\t}\n\t}\n\tvalidMask = sqFileStdioHandlesInto((&fileRecords));\n\tif (validMask == 0) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrUnsupported);\n\t}\n\tresult = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 3);\n\tif (result == null) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrNoMemory);\n\t}\n\tinterpreterProxy->pushRemappableOop(result);\n\tfor (index = 0; index <= 2; index += 1) {\n\t\tif ((validMask & (1 << index)) != 0) {\n\t\t\tresult = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\n\t\t\tif (result == null) {\n\t\t\t\tinterpreterProxy->popRemappableOop();\n\t\t\t\treturn interpreterProxy->primitiveFailFor(PrimErrNoMemory);\n\t\t\t}\n\t\t\tinterpreterProxy->storePointerofObjectwithValue(index, interpreterProxy->topRemappableOop(), result);\n\t\t\tmemcpy(interpreterProxy->firstIndexableField(result), (&(fileRecords[index])), fileRecordSize());\n\t\t}\n\t}\n\t\n#  if COGMTVM\n\tinterpreterProxy->fullGC();\n\n#  endif /* COGMTVM */\n\n\tresult = interpreterProxy->popRemappableOop();\n\tinterpreterProxy->popthenPush(1, result);\n}\n\n\n/*\tftruncate is not an ansi function so we have a macro to point to a\n\tsuitable platform implementation\n */\n\nEXPORT(sqInt)\nprimitiveFileTruncate(void)\n{\n    SQFile *file;\n    sqInt objectPointer;\n    sqInt sz;\n    squeakFileOffsetType truncatePosition;\n\n\tif (!(((interpreterProxy->stackValue(0)) & 1))) {\n\t\tsz = sizeof(squeakFileOffsetType);\n\t\tif ((interpreterProxy->byteSizeOf(interpreterProxy->stackValue(0))) > sz) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\ttruncatePosition = interpreterProxy->positive64BitValueOf(interpreterProxy->stackValue(0));\n\t/* begin fileValueOf: */\n\tobjectPointer = interpreterProxy->stackValue(1);\n\tif (!((interpreterProxy->isBytes(objectPointer))\n\t\t && ((interpreterProxy->byteSizeOf(objectPointer)) == (fileRecordSize())))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tfile = null;\n\t\tgoto l1;\n\t}\n\tfile = interpreterProxy->firstIndexableField(objectPointer);\nl1:\t/* end fileValueOf: */;\n\tif (!(interpreterProxy->failed())) {\n\t\tsqFileTruncate(file, truncatePosition);\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->pop(2);\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveFileWrite(void)\n{\n    sqInt array;\n    char *arrayIndex;\n    size_t byteSize;\n    sqInt bytesWritten;\n    size_t count;\n    SQFile *file;\n    sqInt objectPointer;\n    size_t startIndex;\n\n\tcount = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(0));\n\tstartIndex = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(1));\n\tarray = interpreterProxy->stackValue(2);\n\t/* begin fileValueOf: */\n\tobjectPointer = interpreterProxy->stackValue(3);\n\tif (!((interpreterProxy->isBytes(objectPointer))\n\t\t && ((interpreterProxy->byteSizeOf(objectPointer)) == (fileRecordSize())))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tfile = null;\n\t\tgoto l1;\n\t}\n\tfile = interpreterProxy->firstIndexableField(objectPointer);\nl1:\t/* end fileValueOf: */;\n\tif (!(interpreterProxy->isWordsOrBytes(array))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (interpreterProxy->isWords(array)) {\n\t\tbyteSize = 4;\n\t}\n\telse {\n\t\tbyteSize = 1;\n\t}\n\tif (!((startIndex >= 1)\n\t\t && (((startIndex + count) - 1) <= (interpreterProxy->slotSizeOf(array))))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!(interpreterProxy->failed())) {\n\n\t\t/* Note: adjust startIndex for zero-origin indexing */\n\n\t\tarrayIndex = interpreterProxy->firstIndexableField(array);\n\t\tbytesWritten = sqFileWriteFromAt(file, count * byteSize, arrayIndex, (startIndex - 1) * byteSize);\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->popthenPush(5, (((bytesWritten / byteSize) << 1) | 1));\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveHasFileAccess(void)\n{\n    sqInt hasAccess;\n\n\tif (sHFAfn != 0) {\n\t\thasAccess =  ((sqInt (*)(void))sHFAfn)();\n\t}\n\telse {\n\t\thasAccess = 1;\n\t}\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushBool(hasAccess);\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n    sqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\n/*\tExported entry point for the VM. Needed for image saving only and no-op on\n\tanything but Macs.\n */\n\nEXPORT(sqInt)\nsetMacFileTypeAndCreator(char *fileName, char *typeString, char *creatorString)\n{\n\treturn dir_SetMacFileTypeAndCreator(fileName, strlen(fileName), typeString, creatorString);\n}\n\nEXPORT(sqInt)\nshutdownModule(void)\n{\n\treturn sqFileShutdown();\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* FilePlugin_exports[][3] = {\n\t{\"FilePlugin\", \"fileOpenNamesizewritesecure\", (void*)fileOpenNamesizewritesecure},\n\t{\"FilePlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"FilePlugin\", \"getThisSession\", (void*)getThisSession},\n\t{\"FilePlugin\", \"initialiseModule\", (void*)initialiseModule},\n\t{\"FilePlugin\", \"moduleUnloaded\", (void*)moduleUnloaded},\n\t{\"FilePlugin\", \"primitiveDirectoryCreate\", (void*)primitiveDirectoryCreate},\n\t{\"FilePlugin\", \"primitiveDirectoryDelete\", (void*)primitiveDirectoryDelete},\n\t{\"FilePlugin\", \"primitiveDirectoryDelimitor\", (void*)primitiveDirectoryDelimitor},\n\t{\"FilePlugin\", \"primitiveDirectoryEntry\", (void*)primitiveDirectoryEntry},\n\t{\"FilePlugin\", \"primitiveDirectoryGetMacTypeAndCreator\", (void*)primitiveDirectoryGetMacTypeAndCreator},\n\t{\"FilePlugin\", \"primitiveDirectoryLookup\", (void*)primitiveDirectoryLookup},\n\t{\"FilePlugin\", \"primitiveDirectorySetMacTypeAndCreator\", (void*)primitiveDirectorySetMacTypeAndCreator},\n\t{\"FilePlugin\", \"primitiveDisableFileAccess\", (void*)primitiveDisableFileAccess},\n\t{\"FilePlugin\", \"primitiveFileAtEnd\", (void*)primitiveFileAtEnd},\n\t{\"FilePlugin\", \"primitiveFileClose\", (void*)primitiveFileClose},\n\t{\"FilePlugin\", \"primitiveFileDelete\", (void*)primitiveFileDelete},\n\t{\"FilePlugin\", \"primitiveFileFlush\", (void*)primitiveFileFlush},\n\t{\"FilePlugin\", \"primitiveFileGetPosition\", (void*)primitiveFileGetPosition},\n\t{\"FilePlugin\", \"primitiveFileOpen\", (void*)primitiveFileOpen},\n\t{\"FilePlugin\", \"primitiveFileRead\", (void*)primitiveFileRead},\n\t{\"FilePlugin\", \"primitiveFileRename\", (void*)primitiveFileRename},\n\t{\"FilePlugin\", \"primitiveFileSetPosition\", (void*)primitiveFileSetPosition},\n\t{\"FilePlugin\", \"primitiveFileSize\", (void*)primitiveFileSize},\n\t{\"FilePlugin\", \"primitiveFileStdioHandles\", (void*)primitiveFileStdioHandles},\n\t{\"FilePlugin\", \"primitiveFileTruncate\", (void*)primitiveFileTruncate},\n\t{\"FilePlugin\", \"primitiveFileWrite\", (void*)primitiveFileWrite},\n\t{\"FilePlugin\", \"primitiveHasFileAccess\", (void*)primitiveHasFileAccess},\n\t{\"FilePlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{\"FilePlugin\", \"setMacFileTypeAndCreator\", (void*)setMacFileTypeAndCreator},\n\t{\"FilePlugin\", \"shutdownModule\", (void*)shutdownModule},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/FloatArrayPlugin/FloatArrayPlugin.c",
    "content": "/* Automatically generated by\n\tVMPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tFloatArrayPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"FloatArrayPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n\n/*** Function Prototypes ***/\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nstatic sqInt msg(char *s);\nEXPORT(sqInt) primitiveAddFloatArray(void);\nEXPORT(sqInt) primitiveAddScalar(void);\nEXPORT(sqInt) primitiveAt(void);\nEXPORT(sqInt) primitiveAtPut(void);\nEXPORT(sqInt) primitiveDivFloatArray(void);\nEXPORT(sqInt) primitiveDivScalar(void);\nEXPORT(sqInt) primitiveDotProduct(void);\nEXPORT(sqInt) primitiveEqual(void);\nEXPORT(sqInt) primitiveHashArray(void);\nEXPORT(sqInt) primitiveLength(void);\nEXPORT(sqInt) primitiveMulFloatArray(void);\nEXPORT(sqInt) primitiveMulScalar(void);\nEXPORT(sqInt) primitiveNormalize(void);\nEXPORT(sqInt) primitiveSubFloatArray(void);\nEXPORT(sqInt) primitiveSubScalar(void);\nEXPORT(sqInt) primitiveSum(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\n\n\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"FloatArrayPlugin VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"FloatArrayPlugin VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\n\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\n\n/*\tPrimitive. Add the receiver and the argument, both FloatArrays and store\n\tthe result into the receiver.\n */\n\nEXPORT(sqInt)\nprimitiveAddFloatArray(void)\n{\n    sqInt arg;\n    float *argPtr;\n    sqInt i;\n    sqInt length;\n    sqInt rcvr;\n    float *rcvrPtr;\n\n\targ = interpreterProxy->stackObjectValue(0);\n\trcvr = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->success(interpreterProxy->isWords(arg));\n\tinterpreterProxy->success(interpreterProxy->isWords(rcvr));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tlength = interpreterProxy->stSizeOf(arg);\n\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(rcvr)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\trcvrPtr = ((float *) (interpreterProxy->firstIndexableField(rcvr)));\n\targPtr = ((float *) (interpreterProxy->firstIndexableField(arg)));\n\tfor (i = 0; i <= (length - 1); i += 1) {\n\t\trcvrPtr[i] = ((((double) (rcvrPtr[i]))) + (((double) (argPtr[i]))));\n\t}\n\tinterpreterProxy->pop(1);\n}\n\n\n/*\tPrimitive. Add the argument, a scalar value to the receiver, a FloatArray */\n\nEXPORT(sqInt)\nprimitiveAddScalar(void)\n{\n    sqInt i;\n    sqInt length;\n    sqInt rcvr;\n    float *rcvrPtr;\n    double  value;\n\n\tvalue = interpreterProxy->stackFloatValue(0);\n\trcvr = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->success(interpreterProxy->isWords(rcvr));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tlength = interpreterProxy->stSizeOf(rcvr);\n\trcvrPtr = ((float *) (interpreterProxy->firstIndexableField(rcvr)));\n\tfor (i = 0; i <= (length - 1); i += 1) {\n\t\trcvrPtr[i] = ((((double) (rcvrPtr[i]))) + value);\n\t}\n\tinterpreterProxy->pop(1);\n}\n\nEXPORT(sqInt)\nprimitiveAt(void)\n{\n    float *floatPtr;\n    double  floatValue;\n    sqInt index;\n    sqInt rcvr;\n\n\tindex = interpreterProxy->stackIntegerValue(0);\n\trcvr = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->success(interpreterProxy->isWords(rcvr));\n\tinterpreterProxy->success((index > 0)\n\t && (index <= (interpreterProxy->slotSizeOf(rcvr))));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfloatPtr = interpreterProxy->firstIndexableField(rcvr);\n\tfloatValue = ((double) (floatPtr[index - 1]) );\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->pushFloat(floatValue);\n}\n\nEXPORT(sqInt)\nprimitiveAtPut(void)\n{\n    float *floatPtr;\n    double  floatValue;\n    sqInt index;\n    sqInt rcvr;\n    sqInt value;\n\n\tvalue = interpreterProxy->stackValue(0);\n\tif ((value & 1)) {\n\t\tfloatValue = ((double) ((value >> 1)) );\n\t}\n\telse {\n\t\tfloatValue = interpreterProxy->floatValueOf(value);\n\t}\n\tindex = interpreterProxy->stackIntegerValue(1);\n\trcvr = interpreterProxy->stackObjectValue(2);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->success(interpreterProxy->isWords(rcvr));\n\tinterpreterProxy->success((index > 0)\n\t && (index <= (interpreterProxy->slotSizeOf(rcvr))));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfloatPtr = interpreterProxy->firstIndexableField(rcvr);\n\tfloatPtr[index - 1] = (((float) floatValue));\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->popthenPush(3, value);\n\t}\n}\n\n\n/*\tPrimitive. Add the receiver and the argument, both FloatArrays and store\n\tthe result into the receiver.\n */\n\nEXPORT(sqInt)\nprimitiveDivFloatArray(void)\n{\n    sqInt arg;\n    float *argPtr;\n    sqInt i;\n    sqInt length;\n    sqInt rcvr;\n    float *rcvrPtr;\n\n\targ = interpreterProxy->stackObjectValue(0);\n\trcvr = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->success(interpreterProxy->isWords(arg));\n\tinterpreterProxy->success(interpreterProxy->isWords(rcvr));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tlength = interpreterProxy->stSizeOf(arg);\n\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(rcvr)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\trcvrPtr = ((float *) (interpreterProxy->firstIndexableField(rcvr)));\n\n\t/* Check if any of the argument's values is zero */\n\n\targPtr = ((float *) (interpreterProxy->firstIndexableField(arg)));\n\tfor (i = 0; i <= (length - 1); i += 1) {\n\t\tif ((intAtPointer(((char*) (argPtr + i)))) == 0) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\tfor (i = 0; i <= (length - 1); i += 1) {\n\t\trcvrPtr[i] = ((((double) (rcvrPtr[i]))) / (((double) (argPtr[i]))));\n\t}\n\tinterpreterProxy->pop(1);\n}\n\n\n/*\tPrimitive. Add the argument, a scalar value to the receiver, a FloatArray */\n\nEXPORT(sqInt)\nprimitiveDivScalar(void)\n{\n    sqInt i;\n    double  inverse;\n    sqInt length;\n    sqInt rcvr;\n    float *rcvrPtr;\n    double  value;\n\n\tvalue = interpreterProxy->stackFloatValue(0);\n\trcvr = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (value == 0.0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->success(interpreterProxy->isWords(rcvr));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tlength = interpreterProxy->stSizeOf(rcvr);\n\trcvrPtr = ((float *) (interpreterProxy->firstIndexableField(rcvr)));\n\tinverse = 1.0 / value;\n\tfor (i = 0; i <= (length - 1); i += 1) {\n\t\trcvrPtr[i] = ((((double) (rcvrPtr[i]))) * inverse);\n\t}\n\tinterpreterProxy->pop(1);\n}\n\n\n/*\tPrimitive. Compute the dot product of the receiver and the argument.\n\tThe dot product is defined as the sum of the products of the individual\n\telements. \n */\n\nEXPORT(sqInt)\nprimitiveDotProduct(void)\n{\n    sqInt arg;\n    float *argPtr;\n    sqInt i;\n    sqInt length;\n    sqInt rcvr;\n    float *rcvrPtr;\n    double  result;\n\n\targ = interpreterProxy->stackObjectValue(0);\n\trcvr = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->success(interpreterProxy->isWords(arg));\n\tinterpreterProxy->success(interpreterProxy->isWords(rcvr));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tlength = interpreterProxy->stSizeOf(arg);\n\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(rcvr)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\trcvrPtr = ((float *) (interpreterProxy->firstIndexableField(rcvr)));\n\targPtr = ((float *) (interpreterProxy->firstIndexableField(arg)));\n\tresult = 0.0;\n\tfor (i = 0; i <= (length - 1); i += 1) {\n\t\tresult += (((double) (rcvrPtr[i]))) * (((double) (argPtr[i])));\n\t}\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->pushFloat(result);\n}\n\nEXPORT(sqInt)\nprimitiveEqual(void)\n{\n    sqInt arg;\n    float *argPtr;\n    sqInt i;\n    sqInt length;\n    sqInt rcvr;\n    float *rcvrPtr;\n\n\targ = interpreterProxy->stackObjectValue(0);\n\trcvr = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->success(interpreterProxy->isWords(arg));\n\tinterpreterProxy->success(interpreterProxy->isWords(rcvr));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(2);\n\tlength = interpreterProxy->stSizeOf(arg);\n\tif (!(length == (interpreterProxy->stSizeOf(rcvr)))) {\n\t\treturn interpreterProxy->pushBool(0);\n\t}\n\trcvrPtr = ((float *) (interpreterProxy->firstIndexableField(rcvr)));\n\targPtr = ((float *) (interpreterProxy->firstIndexableField(arg)));\n\tfor (i = 0; i <= (length - 1); i += 1) {\n\t\tif (!((rcvrPtr[i]) == (argPtr[i]))) {\n\t\t\treturn interpreterProxy->pushBool(0);\n\t\t}\n\t}\n\treturn interpreterProxy->pushBool(1);\n}\n\nEXPORT(sqInt)\nprimitiveHashArray(void)\n{\n    sqInt i;\n    sqInt length;\n    sqInt rcvr;\n    int *rcvrPtr;\n    sqInt result;\n\n\trcvr = interpreterProxy->stackObjectValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->success(interpreterProxy->isWords(rcvr));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tlength = interpreterProxy->stSizeOf(rcvr);\n\trcvrPtr = ((int *) (interpreterProxy->firstIndexableField(rcvr)));\n\tresult = 0;\n\tfor (i = 0; i <= (length - 1); i += 1) {\n\t\tresult += rcvrPtr[i];\n\t}\n\tinterpreterProxy->pop(1);\n\treturn interpreterProxy->pushInteger(result & 536870911);\n}\n\n\n/*\tPrimitive. Compute the length of the argument (sqrt of sum of component\n\tsquares). \n */\n\nEXPORT(sqInt)\nprimitiveLength(void)\n{\n    sqInt i;\n    sqInt length;\n    sqInt rcvr;\n    float *rcvrPtr;\n    double  result;\n\n\trcvr = interpreterProxy->stackObjectValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->success(interpreterProxy->isWords(rcvr));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tlength = interpreterProxy->stSizeOf(rcvr);\n\tinterpreterProxy->success(1);\n\trcvrPtr = ((float *) (interpreterProxy->firstIndexableField(rcvr)));\n\tresult = 0.0;\n\tfor (i = 0; i <= (length - 1); i += 1) {\n\t\tresult += (((double) (rcvrPtr[i]))) * (((double) (rcvrPtr[i])));\n\t}\n\tresult = sqrt(result);\n\tinterpreterProxy->popthenPush(1, interpreterProxy->floatObjectOf(result));\n}\n\n\n/*\tPrimitive. Add the receiver and the argument, both FloatArrays and store\n\tthe result into the receiver.\n */\n\nEXPORT(sqInt)\nprimitiveMulFloatArray(void)\n{\n    sqInt arg;\n    float *argPtr;\n    sqInt i;\n    sqInt length;\n    sqInt rcvr;\n    float *rcvrPtr;\n\n\targ = interpreterProxy->stackObjectValue(0);\n\trcvr = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->success(interpreterProxy->isWords(arg));\n\tinterpreterProxy->success(interpreterProxy->isWords(rcvr));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tlength = interpreterProxy->stSizeOf(arg);\n\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(rcvr)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\trcvrPtr = ((float *) (interpreterProxy->firstIndexableField(rcvr)));\n\targPtr = ((float *) (interpreterProxy->firstIndexableField(arg)));\n\tfor (i = 0; i <= (length - 1); i += 1) {\n\t\trcvrPtr[i] = ((((double) (rcvrPtr[i]))) * (((double) (argPtr[i]))));\n\t}\n\tinterpreterProxy->pop(1);\n}\n\n\n/*\tPrimitive. Add the argument, a scalar value to the receiver, a FloatArray */\n\nEXPORT(sqInt)\nprimitiveMulScalar(void)\n{\n    sqInt i;\n    sqInt length;\n    sqInt rcvr;\n    float *rcvrPtr;\n    double  value;\n\n\tvalue = interpreterProxy->stackFloatValue(0);\n\trcvr = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->success(interpreterProxy->isWords(rcvr));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tlength = interpreterProxy->stSizeOf(rcvr);\n\trcvrPtr = ((float *) (interpreterProxy->firstIndexableField(rcvr)));\n\tfor (i = 0; i <= (length - 1); i += 1) {\n\t\trcvrPtr[i] = ((((double) (rcvrPtr[i]))) * value);\n\t}\n\tinterpreterProxy->pop(1);\n}\n\n\n/*\tPrimitive. Normalize the argument (A FloatArray) in place. */\n\nEXPORT(sqInt)\nprimitiveNormalize(void)\n{\n    sqInt i;\n    double  len;\n    sqInt length;\n    sqInt rcvr;\n    float *rcvrPtr;\n\n\trcvr = interpreterProxy->stackObjectValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->success(interpreterProxy->isWords(rcvr));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tlength = interpreterProxy->stSizeOf(rcvr);\n\tinterpreterProxy->success(1);\n\trcvrPtr = ((float *) (interpreterProxy->firstIndexableField(rcvr)));\n\tlen = 0.0;\n\tfor (i = 0; i <= (length - 1); i += 1) {\n\t\tlen += (((double) (rcvrPtr[i]))) * (((double) (rcvrPtr[i])));\n\t}\n\tinterpreterProxy->success(len > 0.0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tlen = sqrt(len);\n\tfor (i = 0; i <= (length - 1); i += 1) {\n\t\trcvrPtr[i] = ((((double) (rcvrPtr[i]))) / len);\n\t}\n}\n\n\n/*\tPrimitive. Add the receiver and the argument, both FloatArrays and store\n\tthe result into the receiver.\n */\n\nEXPORT(sqInt)\nprimitiveSubFloatArray(void)\n{\n    sqInt arg;\n    float *argPtr;\n    sqInt i;\n    sqInt length;\n    sqInt rcvr;\n    float *rcvrPtr;\n\n\targ = interpreterProxy->stackObjectValue(0);\n\trcvr = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->success(interpreterProxy->isWords(arg));\n\tinterpreterProxy->success(interpreterProxy->isWords(rcvr));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tlength = interpreterProxy->stSizeOf(arg);\n\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(rcvr)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\trcvrPtr = ((float *) (interpreterProxy->firstIndexableField(rcvr)));\n\targPtr = ((float *) (interpreterProxy->firstIndexableField(arg)));\n\tfor (i = 0; i <= (length - 1); i += 1) {\n\t\trcvrPtr[i] = ((((double) (rcvrPtr[i]))) - (((double) (argPtr[i]))));\n\t}\n\tinterpreterProxy->pop(1);\n}\n\n\n/*\tPrimitive. Add the argument, a scalar value to the receiver, a FloatArray */\n\nEXPORT(sqInt)\nprimitiveSubScalar(void)\n{\n    sqInt i;\n    sqInt length;\n    sqInt rcvr;\n    float *rcvrPtr;\n    double  value;\n\n\tvalue = interpreterProxy->stackFloatValue(0);\n\trcvr = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->success(interpreterProxy->isWords(rcvr));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tlength = interpreterProxy->stSizeOf(rcvr);\n\trcvrPtr = ((float *) (interpreterProxy->firstIndexableField(rcvr)));\n\tfor (i = 0; i <= (length - 1); i += 1) {\n\t\trcvrPtr[i] = ((((double) (rcvrPtr[i]))) - value);\n\t}\n\tinterpreterProxy->pop(1);\n}\n\n\n/*\tPrimitive. Find the sum of each float in the receiver, a FloatArray, and\n\tstash the result into the argument Float.\n */\n\nEXPORT(sqInt)\nprimitiveSum(void)\n{\n    sqInt i;\n    sqInt length;\n    sqInt rcvr;\n    float *rcvrPtr;\n    double  sum;\n\n\trcvr = interpreterProxy->stackObjectValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->success(interpreterProxy->isWords(rcvr));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tlength = interpreterProxy->stSizeOf(rcvr);\n\trcvrPtr = ((float *) (interpreterProxy->firstIndexableField(rcvr)));\n\tsum = 0.0;\n\tfor (i = 0; i <= (length - 1); i += 1) {\n\t\tsum += ((double) (rcvrPtr[i]));\n\t}\n\tinterpreterProxy->popthenPush(1, interpreterProxy->floatObjectOf(sum));\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n    sqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* FloatArrayPlugin_exports[][3] = {\n\t{\"FloatArrayPlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"FloatArrayPlugin\", \"primitiveAddFloatArray\", (void*)primitiveAddFloatArray},\n\t{\"FloatArrayPlugin\", \"primitiveAddScalar\", (void*)primitiveAddScalar},\n\t{\"FloatArrayPlugin\", \"primitiveAt\", (void*)primitiveAt},\n\t{\"FloatArrayPlugin\", \"primitiveAtPut\", (void*)primitiveAtPut},\n\t{\"FloatArrayPlugin\", \"primitiveDivFloatArray\", (void*)primitiveDivFloatArray},\n\t{\"FloatArrayPlugin\", \"primitiveDivScalar\", (void*)primitiveDivScalar},\n\t{\"FloatArrayPlugin\", \"primitiveDotProduct\", (void*)primitiveDotProduct},\n\t{\"FloatArrayPlugin\", \"primitiveEqual\", (void*)primitiveEqual},\n\t{\"FloatArrayPlugin\", \"primitiveHashArray\", (void*)primitiveHashArray},\n\t{\"FloatArrayPlugin\", \"primitiveLength\", (void*)primitiveLength},\n\t{\"FloatArrayPlugin\", \"primitiveMulFloatArray\", (void*)primitiveMulFloatArray},\n\t{\"FloatArrayPlugin\", \"primitiveMulScalar\", (void*)primitiveMulScalar},\n\t{\"FloatArrayPlugin\", \"primitiveNormalize\", (void*)primitiveNormalize},\n\t{\"FloatArrayPlugin\", \"primitiveSubFloatArray\", (void*)primitiveSubFloatArray},\n\t{\"FloatArrayPlugin\", \"primitiveSubScalar\", (void*)primitiveSubScalar},\n\t{\"FloatArrayPlugin\", \"primitiveSum\", (void*)primitiveSum},\n\t{\"FloatArrayPlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/FloatMathPlugin/FloatMathPlugin.c",
    "content": "/* Automatically generated by\n\tVMPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tFloatMathPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"FloatMathPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"FloatMathPlugin.h\"\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n\n/*** Function Prototypes ***/\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nstatic sqInt msg(char *s);\nEXPORT(sqInt) primitiveArcCos(void);\nEXPORT(sqInt) primitiveArcCosH(void);\nEXPORT(sqInt) primitiveArcSin(void);\nEXPORT(sqInt) primitiveArcSinH(void);\nEXPORT(sqInt) primitiveArcTan(void);\nEXPORT(sqInt) primitiveArcTan2(void);\nEXPORT(sqInt) primitiveArcTanH(void);\nEXPORT(sqInt) primitiveCos(void);\nEXPORT(sqInt) primitiveCosH(void);\nEXPORT(sqInt) primitiveExp(void);\nEXPORT(sqInt) primitiveFMod(void);\nEXPORT(sqInt) primitiveFractionalPart(void);\nEXPORT(sqInt) primitiveHypot(void);\nEXPORT(sqInt) primitiveLog10(void);\nEXPORT(sqInt) primitiveLogN(void);\nEXPORT(sqInt) primitiveRaisedToPower(void);\nEXPORT(sqInt) primitiveSin(void);\nEXPORT(sqInt) primitiveSinH(void);\nEXPORT(sqInt) primitiveSqrt(void);\nEXPORT(sqInt) primitiveTan(void);\nEXPORT(sqInt) primitiveTanH(void);\nEXPORT(sqInt) primitiveTimesTwoPower(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\n\n\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"FloatMathPlugin VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"FloatMathPlugin VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\n\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\n\n/*\tComputes acos(receiver) */\n\nEXPORT(sqInt)\nprimitiveArcCos(void)\n{\n    double rcvr;\n    double result;\n\n\trcvr = interpreterProxy->stackFloatValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = __ieee754_acos(rcvr);\n\tif (isnan(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);\n\tinterpreterProxy->pushFloat(result);\n}\n\n\n/*\tComputes acosh(receiver) */\n\nEXPORT(sqInt)\nprimitiveArcCosH(void)\n{\n    double rcvr;\n    double result;\n\n\trcvr = interpreterProxy->stackFloatValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = __ieee754_acosh(rcvr);\n\tif (isnan(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);\n\tinterpreterProxy->pushFloat(result);\n}\n\n\n/*\tComputes asin(receiver) */\n\nEXPORT(sqInt)\nprimitiveArcSin(void)\n{\n    double rcvr;\n    double result;\n\n\trcvr = interpreterProxy->stackFloatValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = __ieee754_asin(rcvr);\n\tif (isnan(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);\n\tinterpreterProxy->pushFloat(result);\n}\n\n\n/*\tComputes asinh(receiver) */\n\nEXPORT(sqInt)\nprimitiveArcSinH(void)\n{\n    double rcvr;\n    double result;\n\n\trcvr = interpreterProxy->stackFloatValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = __ieee754_asinh(rcvr);\n\tif (isnan(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);\n\tinterpreterProxy->pushFloat(result);\n}\n\n\n/*\tComputes atan(receiver) */\n\nEXPORT(sqInt)\nprimitiveArcTan(void)\n{\n    double rcvr;\n    double result;\n\n\trcvr = interpreterProxy->stackFloatValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = __ieee754_atan(rcvr);\n\tif (isnan(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);\n\tinterpreterProxy->pushFloat(result);\n}\n\n\n/*\tComputes atan2(receiver, arg) */\n\nEXPORT(sqInt)\nprimitiveArcTan2(void)\n{\n    double arg;\n    double rcvr;\n    double result;\n\n\targ = interpreterProxy->stackFloatValue(0);\n\trcvr = interpreterProxy->stackFloatValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = __ieee754_atan2(rcvr, arg);\n\tif (isnan(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);\n\tinterpreterProxy->pushFloat(result);\n}\n\n\n/*\tComputes atanh(receiver) */\n\nEXPORT(sqInt)\nprimitiveArcTanH(void)\n{\n    double rcvr;\n    double result;\n\n\trcvr = interpreterProxy->stackFloatValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = __ieee754_atanh(rcvr);\n\tif (isnan(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);\n\tinterpreterProxy->pushFloat(result);\n}\n\n\n/*\tComputes cos(receiver) */\n\nEXPORT(sqInt)\nprimitiveCos(void)\n{\n    double rcvr;\n    double result;\n\n\trcvr = interpreterProxy->stackFloatValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = __ieee754_cos(rcvr);\n\tif (isnan(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);\n\tinterpreterProxy->pushFloat(result);\n}\n\n\n/*\tComputes cosh(receiver) */\n\nEXPORT(sqInt)\nprimitiveCosH(void)\n{\n    double rcvr;\n    double result;\n\n\trcvr = interpreterProxy->stackFloatValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = __ieee754_cosh(rcvr);\n\tif (isnan(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);\n\tinterpreterProxy->pushFloat(result);\n}\n\n\n/*\tComputes E raised to the receiver power. */\n\nEXPORT(sqInt)\nprimitiveExp(void)\n{\n    double rcvr;\n    double result;\n\n\trcvr = interpreterProxy->stackFloatValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = __ieee754_exp(rcvr);\n\tif (isnan(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);\n\tinterpreterProxy->pushFloat(result);\n}\n\n\n/*\tComputes receiver \\\\ arg */\n\nEXPORT(sqInt)\nprimitiveFMod(void)\n{\n    double arg;\n    double rcvr;\n    double result;\n\n\targ = interpreterProxy->stackFloatValue(0);\n\trcvr = interpreterProxy->stackFloatValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = __ieee754_fmod(rcvr, arg);\n\tif (isnan(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);\n\tinterpreterProxy->pushFloat(result);\n}\n\n\n/*\tComputes receiver \\\\ 1.0 */\n\nEXPORT(sqInt)\nprimitiveFractionalPart(void)\n{\n    double rcvr;\n    double result;\n    double trunc;\n\n\trcvr = interpreterProxy->stackFloatValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = __ieee754_modf(rcvr, &trunc);\n\tif (isnan(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);\n\tinterpreterProxy->pushFloat(result);\n}\n\n\n/*\thypot(x,y) returns sqrt(x^2+y^2) with error less than 1 ulps */\n\nEXPORT(sqInt)\nprimitiveHypot(void)\n{\n    double arg;\n    double rcvr;\n    double result;\n\n\targ = interpreterProxy->stackFloatValue(0);\n\trcvr = interpreterProxy->stackFloatValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = __ieee754_hypot(rcvr, arg);\n\tif (isnan(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);\n\tinterpreterProxy->pushFloat(result);\n}\n\n\n/*\tComputes log10(receiver) */\n\nEXPORT(sqInt)\nprimitiveLog10(void)\n{\n    double rcvr;\n    double result;\n\n\trcvr = interpreterProxy->stackFloatValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (rcvr < 0.0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tresult = __ieee754_log10(rcvr);\n\tif (isnan(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);\n\tinterpreterProxy->pushFloat(result);\n}\n\n\n/*\tComputes log(receiver) */\n\nEXPORT(sqInt)\nprimitiveLogN(void)\n{\n    double rcvr;\n    double result;\n\n\trcvr = interpreterProxy->stackFloatValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (rcvr < 0.0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tresult = __ieee754_log(rcvr);\n\tif (isnan(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);\n\tinterpreterProxy->pushFloat(result);\n}\n\n\n/*\tComputes receiver**arg */\n\nEXPORT(sqInt)\nprimitiveRaisedToPower(void)\n{\n    double arg;\n    double rcvr;\n    double result;\n\n\targ = interpreterProxy->stackFloatValue(0);\n\trcvr = interpreterProxy->stackFloatValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = __ieee754_pow(rcvr, arg);\n\tif (isnan(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);\n\tinterpreterProxy->pushFloat(result);\n}\n\n\n/*\tComputes sin(receiver) */\n\nEXPORT(sqInt)\nprimitiveSin(void)\n{\n    double rcvr;\n    double result;\n\n\trcvr = interpreterProxy->stackFloatValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = __ieee754_sin(rcvr);\n\tif (isnan(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);\n\tinterpreterProxy->pushFloat(result);\n}\n\n\n/*\tComputes sinh(receiver) */\n\nEXPORT(sqInt)\nprimitiveSinH(void)\n{\n    double rcvr;\n    double result;\n\n\trcvr = interpreterProxy->stackFloatValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = __ieee754_sinh(rcvr);\n\tif (isnan(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);\n\tinterpreterProxy->pushFloat(result);\n}\n\n\n/*\tComputes sqrt(receiver) */\n\nEXPORT(sqInt)\nprimitiveSqrt(void)\n{\n    double rcvr;\n    double result;\n\n\trcvr = interpreterProxy->stackFloatValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (rcvr < 0.0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tresult = __ieee754_sqrt(rcvr);\n\tif (isnan(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);\n\tinterpreterProxy->pushFloat(result);\n}\n\n\n/*\tComputes tan(receiver) */\n\nEXPORT(sqInt)\nprimitiveTan(void)\n{\n    double rcvr;\n    double result;\n\n\trcvr = interpreterProxy->stackFloatValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = __ieee754_tan(rcvr);\n\tif (isnan(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);\n\tinterpreterProxy->pushFloat(result);\n}\n\n\n/*\tComputes tanh(receiver) */\n\nEXPORT(sqInt)\nprimitiveTanH(void)\n{\n    double rcvr;\n    double result;\n\n\trcvr = interpreterProxy->stackFloatValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = __ieee754_tanh(rcvr);\n\tif (isnan(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);\n\tinterpreterProxy->pushFloat(result);\n}\n\n\n/*\tComputes E raised to the receiver power. */\n\nEXPORT(sqInt)\nprimitiveTimesTwoPower(void)\n{\n    sqInt arg;\n    double rcvr;\n    double result;\n\n\targ = interpreterProxy->stackIntegerValue(0);\n\trcvr = interpreterProxy->stackFloatValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = __ieee754_ldexp(rcvr, arg);\n\tif (isnan(result)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);\n\tinterpreterProxy->pushFloat(result);\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n    sqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* FloatMathPlugin_exports[][3] = {\n\t{\"FloatMathPlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"FloatMathPlugin\", \"primitiveArcCos\", (void*)primitiveArcCos},\n\t{\"FloatMathPlugin\", \"primitiveArcCosH\", (void*)primitiveArcCosH},\n\t{\"FloatMathPlugin\", \"primitiveArcSin\", (void*)primitiveArcSin},\n\t{\"FloatMathPlugin\", \"primitiveArcSinH\", (void*)primitiveArcSinH},\n\t{\"FloatMathPlugin\", \"primitiveArcTan\", (void*)primitiveArcTan},\n\t{\"FloatMathPlugin\", \"primitiveArcTan2\", (void*)primitiveArcTan2},\n\t{\"FloatMathPlugin\", \"primitiveArcTanH\", (void*)primitiveArcTanH},\n\t{\"FloatMathPlugin\", \"primitiveCos\", (void*)primitiveCos},\n\t{\"FloatMathPlugin\", \"primitiveCosH\", (void*)primitiveCosH},\n\t{\"FloatMathPlugin\", \"primitiveExp\", (void*)primitiveExp},\n\t{\"FloatMathPlugin\", \"primitiveFMod\", (void*)primitiveFMod},\n\t{\"FloatMathPlugin\", \"primitiveFractionalPart\", (void*)primitiveFractionalPart},\n\t{\"FloatMathPlugin\", \"primitiveHypot\", (void*)primitiveHypot},\n\t{\"FloatMathPlugin\", \"primitiveLog10\", (void*)primitiveLog10},\n\t{\"FloatMathPlugin\", \"primitiveLogN\", (void*)primitiveLogN},\n\t{\"FloatMathPlugin\", \"primitiveRaisedToPower\", (void*)primitiveRaisedToPower},\n\t{\"FloatMathPlugin\", \"primitiveSin\", (void*)primitiveSin},\n\t{\"FloatMathPlugin\", \"primitiveSinH\", (void*)primitiveSinH},\n\t{\"FloatMathPlugin\", \"primitiveSqrt\", (void*)primitiveSqrt},\n\t{\"FloatMathPlugin\", \"primitiveTan\", (void*)primitiveTan},\n\t{\"FloatMathPlugin\", \"primitiveTanH\", (void*)primitiveTanH},\n\t{\"FloatMathPlugin\", \"primitiveTimesTwoPower\", (void*)primitiveTimesTwoPower},\n\t{\"FloatMathPlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/GeniePlugin/GeniePlugin.c",
    "content": "/* Automatically generated by\n\tSmartSyntaxPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tGeniePlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"GeniePlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n\n/*** Function Prototypes ***/\nstatic sqInt cSquaredDistanceFromto(int *   aPoint, int *   bPoint);\nstatic sqInt cSubstAngleFactorFromto(sqInt startDegreeNumber, sqInt endDegreeNumber);\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nstatic sqInt majorNO(void);\nstatic sqInt minorNO(void);\nstatic sqInt msg(char *s);\nEXPORT(sqInt) primSameClassAbsoluteStrokeDistanceMyPoints_otherPoints_myVectors_otherVectors_mySquaredLengths_otherSquaredLengths_myAngles_otherAngles_maxSizeAndReferenceFlag_rowBase_rowInsertRemove_rowInsertRemoveCount(void);\nEXPORT(sqInt) primVersionNO(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\nstatic void sqAssert(sqInt aBool);\n\n\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"GeniePlugin v2.0 22 April 2011 VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"GeniePlugin v2.0 22 April 2011 VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\n\n\n\n/*\targuments are pointer to ints paired as x,y coordinates of points */\n\nstatic sqInt\ncSquaredDistanceFromto(int *   aPoint, int *   bPoint)\n{\n\tsqInt aPointX;\n\tsqInt aPointY;\n\tsqInt bPointX;\n\tsqInt bPointY;\n\tsqInt xDiff;\n\tsqInt yDiff;\n\n\taPointX = aPoint[0];\n\taPointY = aPoint[1];\n\tbPointX = bPoint[0];\n\tbPointY = bPoint[1];\n\txDiff = bPointX - aPointX;\n\tyDiff = bPointY - aPointY;\n\treturn (xDiff * xDiff) + (yDiff * yDiff);\n}\n\nstatic sqInt\ncSubstAngleFactorFromto(sqInt startDegreeNumber, sqInt endDegreeNumber)\n{\n\tsqInt absDiff;\n\n\tabsDiff = abs(endDegreeNumber - startDegreeNumber);\n\tif (absDiff > 180) {\n\t\tabsDiff = 360 - absDiff;\n\t}\n\treturn ((usqInt) (absDiff * absDiff) >> 6);\n}\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nstatic sqInt\nmajorNO(void)\n{\n\treturn 2;\n}\n\nstatic sqInt\nminorNO(void)\n{\n\treturn 0;\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\nEXPORT(sqInt)\nprimSameClassAbsoluteStrokeDistanceMyPoints_otherPoints_myVectors_otherVectors_mySquaredLengths_otherSquaredLengths_myAngles_otherAngles_maxSizeAndReferenceFlag_rowBase_rowInsertRemove_rowInsertRemoveCount(void)\n{\n\tsqInt additionalMultiInsertRemoveCost;\n\tsqInt base;\n\tsqInt forReference;\n\tsqInt i;\n\tsqInt iM1;\n\tsqInt iM1T2;\n\tsqInt insert;\n\tsqInt insertBase;\n\tsqInt insertRemove;\n\tsqInt insertRemoveCount;\n\tsqInt j;\n\tsqInt jLimiT;\n\tsqInt jM1;\n\tsqInt jM1T2;\n\tsqInt maxDist;\n\tsqInt maxSize;\n\tsqInt maxSizeAndRefFlag;\n\tint *   myAngles;\n\tsqInt myAnglesOop;\n\tint *   myPoints;\n\tsqInt myPointsOop;\n\tint *   mySquaredLengths;\n\tsqInt mySquaredLengthsOop;\n\tint *   myVectors;\n\tsqInt myVectorsOop;\n\tsqInt myVectorsSize;\n\tint *   otherAngles;\n\tsqInt otherAnglesOop;\n\tint *   otherPoints;\n\tsqInt otherPointsOop;\n\tsqInt otherPointsSize;\n\tint *   otherSquaredLengths;\n\tsqInt otherSquaredLengthsOop;\n\tsqInt otherSquaredLengthsSize;\n\tint *   otherVectors;\n\tsqInt otherVectorsOop;\n\tsqInt otherVectorsSize;\n\tsqInt remove;\n\tsqInt removeBase;\n\tint *   rowBase;\n\tsqInt rowBaseOop;\n\tsqInt rowBaseSize;\n\tint *   rowInsertRemove;\n\tint *   rowInsertRemoveCount;\n\tsqInt rowInsertRemoveCountOop;\n\tsqInt rowInsertRemoveOop;\n\tsqInt subst;\n\tsqInt substBase;\n\tsqInt _return_value;\n\n\tmyPointsOop = interpreterProxy->stackValue(11);\n\totherPointsOop = interpreterProxy->stackValue(10);\n\tmyVectorsOop = interpreterProxy->stackValue(9);\n\totherVectorsOop = interpreterProxy->stackValue(8);\n\tmySquaredLengthsOop = interpreterProxy->stackValue(7);\n\totherSquaredLengthsOop = interpreterProxy->stackValue(6);\n\tmyAnglesOop = interpreterProxy->stackValue(5);\n\totherAnglesOop = interpreterProxy->stackValue(4);\n\tmaxSizeAndRefFlag = interpreterProxy->stackIntegerValue(3);\n\trowBaseOop = interpreterProxy->stackValue(2);\n\trowInsertRemoveOop = interpreterProxy->stackValue(1);\n\trowInsertRemoveCountOop = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (interpreterProxy->failed()) {\n\t\tmsg(\"failed 1\");\n\t\treturn null;\n\t}\n\tinterpreterProxy->success(((((((((((interpreterProxy->isWords(myPointsOop)) && (interpreterProxy->isWords(otherPointsOop))) && (interpreterProxy->isWords(myVectorsOop))) && (interpreterProxy->isWords(otherVectorsOop))) && (interpreterProxy->isWords(mySquaredLengthsOop))) && (interpreterProxy->isWords(otherSquaredLengthsOop))) && (interpreterProxy->isWords(myAnglesOop))) && (interpreterProxy->isWords(otherAnglesOop))) && (interpreterProxy->isWords(rowBaseOop))) && (interpreterProxy->isWords(rowInsertRemoveOop))) && (interpreterProxy->isWords(rowInsertRemoveCountOop)));\n\tif (interpreterProxy->failed()) {\n\t\tmsg(\"failed 2\");\n\t\treturn null;\n\t}\n\tinterpreterProxy->success((interpreterProxy->isMemberOf(myPointsOop, \"PointArray\")) && (interpreterProxy->isMemberOf(otherPointsOop, \"PointArray\")));\n\tif (interpreterProxy->failed()) {\n\t\tmsg(\"failed 3\");\n\t\treturn null;\n\t}\n\tmyPoints = interpreterProxy->firstIndexableField(myPointsOop);\n\totherPoints = interpreterProxy->firstIndexableField(otherPointsOop);\n\tmyVectors = interpreterProxy->firstIndexableField(myVectorsOop);\n\totherVectors = interpreterProxy->firstIndexableField(otherVectorsOop);\n\tmySquaredLengths = interpreterProxy->firstIndexableField(mySquaredLengthsOop);\n\totherSquaredLengths = interpreterProxy->firstIndexableField(otherSquaredLengthsOop);\n\tmyAngles = interpreterProxy->firstIndexableField(myAnglesOop);\n\totherAngles = interpreterProxy->firstIndexableField(otherAnglesOop);\n\trowBase = interpreterProxy->firstIndexableField(rowBaseOop);\n\trowInsertRemove = interpreterProxy->firstIndexableField(rowInsertRemoveOop);\n\n\t/* Note: myPointsSize and mySquaredLengthsSize variables eliminated to reduce\n\tmethod temporary variable count for closure-enabled images */\n\t/* PointArrays */\n\t/* myPointsSize := (interpreterProxy stSizeOf: myPointsOop) bitShift: -1. */\n\n\trowInsertRemoveCount = interpreterProxy->firstIndexableField(rowInsertRemoveCountOop);\n\totherPointsSize = ((usqInt) (interpreterProxy->stSizeOf(otherPointsOop)) >> 1);\n\tmyVectorsSize = ((usqInt) (interpreterProxy->stSizeOf(myVectorsOop)) >> 1);\n\n\t/* IntegerArrays */\n\t/* mySquaredLengthsSize := interpreterProxy stSizeOf: mySquaredLengthsOop. */\n\n\totherVectorsSize = ((usqInt) (interpreterProxy->stSizeOf(otherVectorsOop)) >> 1);\n\totherSquaredLengthsSize = interpreterProxy->stSizeOf(otherSquaredLengthsOop);\n\trowBaseSize = interpreterProxy->stSizeOf(rowBaseOop);\n\tinterpreterProxy->success(((rowBaseSize == (interpreterProxy->stSizeOf(rowInsertRemoveOop))) && (rowBaseSize == (interpreterProxy->stSizeOf(rowInsertRemoveCountOop)))) && (rowBaseSize > otherVectorsSize));\n\tif (interpreterProxy->failed()) {\n\t\tmsg(\"failed 4\");\n\t\treturn null;\n\t}\n\tinterpreterProxy->success(((((((interpreterProxy->stSizeOf(mySquaredLengthsOop)) >= (myVectorsSize - 1)) && ((((usqInt) (interpreterProxy->stSizeOf(myPointsOop)) >> 1)) >= myVectorsSize)) && (otherSquaredLengthsSize >= (otherVectorsSize - 1))) && (otherPointsSize >= otherVectorsSize)) && ((interpreterProxy->stSizeOf(myAnglesOop)) >= (myVectorsSize - 1))) && ((interpreterProxy->stSizeOf(otherAnglesOop)) >= (otherVectorsSize - 1)));\n\tif (interpreterProxy->failed()) {\n\t\tmsg(\"failed 5\");\n\t\treturn null;\n\t}\n\tforReference = maxSizeAndRefFlag & 1;\n\tmaxSize = ((usqInt) maxSizeAndRefFlag >> 1);\n\tmaxDist = ((usqInt) 1 << 29);\n\tif (forReference) {\n\t\tadditionalMultiInsertRemoveCost = 0;\n\t}\n\telse {\n\t\tadditionalMultiInsertRemoveCost = ((usqInt) (maxSize * maxSize) >> 10);\n\t}\n\trowBase[0] = 0;\n\trowInsertRemove[0] = 0;\n\trowInsertRemoveCount[0] = 2;\n\tinsertRemove = 0 - additionalMultiInsertRemoveCost;\n\tjLimiT = otherVectorsSize;\n\tif (!((otherPointsSize >= (jLimiT - 1)) && (otherSquaredLengthsSize >= (jLimiT - 1)))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\tfor (j = 1; j <= jLimiT; j += 1) {\n\t\tjM1 = j - 1;\n\t\tinsertRemove = (insertRemove + (((usqInt) ((otherSquaredLengths[jM1]) + (cSquaredDistanceFromto(otherPoints + (((usqInt) jM1 << 1)), myPoints))) >> 7))) + additionalMultiInsertRemoveCost;\n\t\trowInsertRemove[j] = insertRemove;\n\t\trowBase[j] = (insertRemove * j);\n\t\trowInsertRemoveCount[j] = (j + 1);\n\t}\n\tinsertRemove = (rowInsertRemove[0]) - additionalMultiInsertRemoveCost;\n\tfor (i = 1; i <= myVectorsSize; i += 1) {\n\t\tiM1 = i - 1;\n\t\tiM1T2 = ((usqInt) iM1 << 1);\n\t\tsubstBase = rowBase[0];\n\t\tinsertRemove = (insertRemove + (((usqInt) ((mySquaredLengths[iM1]) + (cSquaredDistanceFromto(myPoints + iM1T2, otherPoints))) >> 7))) + additionalMultiInsertRemoveCost;\n\t\trowInsertRemove[0] = insertRemove;\n\t\trowBase[0] = (insertRemove * i);\n\t\trowInsertRemoveCount[0] = (i + 1);\n\t\tjLimiT = otherVectorsSize;\n\t\tfor (j = 1; j <= jLimiT; j += 1) {\n\t\t\tjM1 = j - 1;\n\t\t\tjM1T2 = ((usqInt) jM1 << 1);\n\t\t\tremoveBase = rowBase[j];\n\t\t\tinsertBase = rowBase[jM1];\n\t\t\tremove = ((usqInt) ((mySquaredLengths[iM1]) + (cSquaredDistanceFromto(myPoints + iM1T2, otherPoints + (((usqInt) j << 1))))) >> 7);\n\t\t\tif (((insertRemove = rowInsertRemove[j])) == 0) {\n\t\t\t\tremoveBase += remove;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tremoveBase = (removeBase + insertRemove) + (remove * (rowInsertRemoveCount[j]));\n\t\t\t\tremove += insertRemove;\n\t\t\t}\n\t\t\tinsert = ((usqInt) ((otherSquaredLengths[jM1]) + (cSquaredDistanceFromto(otherPoints + jM1T2, myPoints + (((usqInt) i << 1))))) >> 7);\n\t\t\tif (((insertRemove = rowInsertRemove[jM1])) == 0) {\n\t\t\t\tinsertBase += insert;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tinsertBase = (insertBase + insertRemove) + (insert * (rowInsertRemoveCount[jM1]));\n\t\t\t\tinsert += insertRemove;\n\t\t\t}\n\t\t\tif (forReference) {\n\t\t\t\tsubstBase = maxDist;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsubst = ((usqInt) (((cSquaredDistanceFromto(otherVectors + jM1T2, myVectors + iM1T2)) + (cSquaredDistanceFromto(otherPoints + jM1T2, myPoints + iM1T2))) * (16 + (cSubstAngleFactorFromto(otherAngles[jM1], myAngles[iM1])))) >> 11);\n\t\t\t\tsubstBase += subst;\n\t\t\t}\n\t\t\tif ((substBase <= removeBase)\n\t\t\t && (substBase <= insertBase)) {\n\t\t\t\tbase = substBase;\n\t\t\t\tinsertRemove = 0;\n\t\t\t\tinsertRemoveCount = 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (removeBase <= insertBase) {\n\t\t\t\t\tbase = removeBase;\n\t\t\t\t\tinsertRemove = remove + additionalMultiInsertRemoveCost;\n\t\t\t\t\tinsertRemoveCount = (rowInsertRemoveCount[j]) + 1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tbase = insertBase;\n\t\t\t\t\tinsertRemove = insert + additionalMultiInsertRemoveCost;\n\t\t\t\t\tinsertRemoveCount = (rowInsertRemoveCount[jM1]) + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsubstBase = rowBase[j];\n\t\t\trowBase[j] = (((base < maxDist) ? base : maxDist));\n\t\t\trowInsertRemove[j] = (((insertRemove < maxDist) ? insertRemove : maxDist));\n\t\t\trowInsertRemoveCount[j] = insertRemoveCount;\n\t\t}\n\t\tinsertRemove = rowInsertRemove[0];\n\t}\n\t_return_value = interpreterProxy->integerObjectOf(base);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(13, _return_value);\n\treturn null;\n}\n\n\n/*\tmajorNO * 1000 + minorNO */\n\nEXPORT(sqInt)\nprimVersionNO(void)\n{\n\tsqInt _return_value;\n\n\t_return_value = interpreterProxy->integerObjectOf(((2 * 1000) + 0));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n\tsqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\nstatic void\nsqAssert(sqInt aBool)\n{\n\t/* missing DebugCode */;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* GeniePlugin_exports[][3] = {\n\t{\"GeniePlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"GeniePlugin\", \"primSameClassAbsoluteStrokeDistanceMyPoints_otherPoints_myVectors_otherVectors_mySquaredLengths_otherSquaredLengths_myAngles_otherAngles_maxSizeAndReferenceFlag_rowBase_rowInsertRemove_rowInsertRemoveCount\", (void*)primSameClassAbsoluteStrokeDistanceMyPoints_otherPoints_myVectors_otherVectors_mySquaredLengths_otherSquaredLengths_myAngles_otherAngles_maxSizeAndReferenceFlag_rowBase_rowInsertRemove_rowInsertRemoveCount},\n\t{\"GeniePlugin\", \"primVersionNO\", (void*)primVersionNO},\n\t{\"GeniePlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/HostWindowPlugin/HostWindowPlugin.c",
    "content": "/* Automatically generated by\n\tSmartSyntaxPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tHostWindowPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"HostWindowPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"HostWindowPlugin.h\"\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n\n/*** Function Prototypes ***/\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nstatic sqInt msg(char *s);\nEXPORT(sqInt) primitiveCloseHostWindow(void);\nEXPORT(sqInt) primitiveCreateHostWindow(void);\nEXPORT(sqInt) primitiveHostWindowPosition(void);\nEXPORT(sqInt) primitiveHostWindowPositionSet(void);\nEXPORT(sqInt) primitiveHostWindowSize(void);\nEXPORT(sqInt) primitiveHostWindowSizeSet(void);\nEXPORT(sqInt) primitiveHostWindowTitle(void);\nEXPORT(sqInt) primitiveShowHostWindowRect(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\nEXPORT(sqInt) shutdownModule(void);\nstatic void sqAssert(sqInt aBool);\n\n\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"HostWindowPlugin VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"HostWindowPlugin VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\n\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\n\n/*\tClose a host window. windowIndex is the SmallInt handle returned\n\tpreviously by primitiveCreateHostWindow. Fail if the index is invalid or\n\tthe platform code fails\n */\n\nEXPORT(sqInt)\nprimitiveCloseHostWindow(void)\n{\n\tsqInt ok;\n\tsqInt windowIndex;\n\n\twindowIndex = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tok = closeWindow(windowIndex);\n\tif (!(ok)) {\n\t\tinterpreterProxy->primitiveFail();\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(1);\n\treturn null;\n}\n\n\n/*\tCreate a host window of width 'w' pixels, height 'h' with the origin of\n\tthe user area at 'x@y' from the topleft corner of the screen.\n\tReturn the SmallInt value of the internal index to the window description\n\tblock - which is whatever the host platform code needs it to be.\n */\n\nEXPORT(sqInt)\nprimitiveCreateHostWindow(void)\n{\n\tsqInt h;\n\tchar *list;\n\tsqInt listLength;\n\tsqInt w;\n\tsqInt windowIndex;\n\tsqInt x;\n\tsqInt y;\n\tsqInt _return_value;\n\n\tw = interpreterProxy->stackIntegerValue(4);\n\th = interpreterProxy->stackIntegerValue(3);\n\tx = interpreterProxy->stackIntegerValue(2);\n\ty = interpreterProxy->stackIntegerValue(1);\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\n\tlist = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tlistLength = interpreterProxy->slotSizeOf(((sqInt)(long)(list) - 4));\n\twindowIndex = createWindowWidthheightoriginXyattrlength(w, h, x, y, list, listLength);\n\tif (windowIndex > 0) {\n\t\t_return_value = interpreterProxy->integerObjectOf(windowIndex);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(6, _return_value);\n\t\treturn null;\n\t}\n\telse {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n}\n\n\n/*\tReturn the origin position of the user area of the window in pixels from\n\tthe topleft corner of the screen. Fail if the windowIndex is invalid or\n\tthe platform routine returns -1 to indicate failure\n */\n\nEXPORT(sqInt)\nprimitiveHostWindowPosition(void)\n{\n\tsqInt pos;\n\tsqInt windowIndex;\n\tsqInt _return_value;\n\n\twindowIndex = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tpos = ioPositionOfWindow(windowIndex);\n\tif (pos == -1) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\telse {\n\t\t_return_value = interpreterProxy->makePointwithxValueyValue(((usqInt) pos) >> 16, pos & 65535);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(2, _return_value);\n\t\treturn null;\n\t}\n}\n\n\n/*\tSet the origin position of the user area of the window in pixels from the\n\ttopleft corner of the screen- return the position actually set by the\n\tOS/GUI/window manager. Fail if the windowIndex is invalid or the platform\n\troutine returns -1 to indicate failure\n */\n\nEXPORT(sqInt)\nprimitiveHostWindowPositionSet(void)\n{\n\tsqInt pos;\n\tsqInt windowIndex;\n\tsqInt x;\n\tsqInt y;\n\tsqInt _return_value;\n\n\twindowIndex = interpreterProxy->stackIntegerValue(2);\n\tx = interpreterProxy->stackIntegerValue(1);\n\ty = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tpos = ioPositionOfWindowSetxy(windowIndex, x, y);\n\tif (pos == -1) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\telse {\n\t\t_return_value = interpreterProxy->makePointwithxValueyValue(((usqInt) pos) >> 16, pos & 65535);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(4, _return_value);\n\t\treturn null;\n\t}\n}\n\n\n/*\tReturn the size of the user area of the window in pixels. Fail if the\n\twindowIndex is invalid or the platform routine returns -1 to indicate\n\tfailure \n */\n\nEXPORT(sqInt)\nprimitiveHostWindowSize(void)\n{\n\tsqInt size;\n\tsqInt windowIndex;\n\tsqInt _return_value;\n\n\twindowIndex = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tsize = ioSizeOfWindow(windowIndex);\n\tif (size == -1) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\telse {\n\t\t_return_value = interpreterProxy->makePointwithxValueyValue(((usqInt) size) >> 16, size & 65535);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(2, _return_value);\n\t\treturn null;\n\t}\n}\n\n\n/*\tSet the size of the user area of the window in pixels - return what is\n\tactually set by the OS/GUI/window manager. Fail if the windowIndex is\n\tinvalid or the platform routine returns -1 to indicate failure\n */\n\nEXPORT(sqInt)\nprimitiveHostWindowSizeSet(void)\n{\n\tsqInt size;\n\tsqInt windowIndex;\n\tsqInt x;\n\tsqInt y;\n\tsqInt _return_value;\n\n\twindowIndex = interpreterProxy->stackIntegerValue(2);\n\tx = interpreterProxy->stackIntegerValue(1);\n\ty = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tsize = ioSizeOfWindowSetxy(windowIndex, x, y);\n\tif (size == -1) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\telse {\n\t\t_return_value = interpreterProxy->makePointwithxValueyValue(((usqInt) size) >> 16, size & 65535);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(4, _return_value);\n\t\treturn null;\n\t}\n}\n\n\n/*\tSet the title bar label of the window. Fail if the windowIndex is invalid\n\tor the platform routine returns -1 to indicate failure\n */\n\nEXPORT(sqInt)\nprimitiveHostWindowTitle(void)\n{\n\tsqInt id;\n\tsqInt res;\n\tsqInt titleLength;\n\tchar *titleString;\n\n\tid = interpreterProxy->stackIntegerValue(1);\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\n\ttitleString = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\ttitleLength = interpreterProxy->slotSizeOf(((sqInt)(long)(titleString) - 4));\n\tres = ioSetTitleOfWindow(id, titleString, titleLength);\n\tif (res == -1) {\n\t\tinterpreterProxy->primitiveFail();\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(2);\n\treturn null;\n}\n\n\n/*\tHost window analogue of DisplayScreen> primShowRectLeft:right:top:bottom:\n\t(Interpreter>primitiveShowDisplayRect) which takes the window index,\n\tbitmap details and the rectangle bounds. Fail if the windowIndex is\n\tinvalid or the\n\tplatform routine returns false to indicate failure\n */\n\nEXPORT(sqInt)\nprimitiveShowHostWindowRect(void)\n{\n\tsqInt bottom;\n\tsqInt d;\n\tusqInt *dispBits;\n\tsqInt h;\n\tsqInt left;\n\tsqInt ok;\n\tsqInt right;\n\tsqInt top;\n\tsqInt w;\n\tsqInt windowIndex;\n\n\twindowIndex = interpreterProxy->stackIntegerValue(8);\n\tinterpreterProxy->success(interpreterProxy->isWords(interpreterProxy->stackValue(7)));\n\tdispBits = ((unsigned *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(7))));\n\tw = interpreterProxy->stackIntegerValue(6);\n\th = interpreterProxy->stackIntegerValue(5);\n\td = interpreterProxy->stackIntegerValue(4);\n\tleft = interpreterProxy->stackIntegerValue(3);\n\tright = interpreterProxy->stackIntegerValue(2);\n\ttop = interpreterProxy->stackIntegerValue(1);\n\tbottom = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tok = ioShowDisplayOnWindow(dispBits, w, h, d, left, right, top,\nbottom, windowIndex);\n\tif (!(ok)) {\n\t\tinterpreterProxy->primitiveFail();\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(9);\n\treturn null;\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n\tsqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\n/*\tdo any window related VM closing down work your platform requires. */\n\nEXPORT(sqInt)\nshutdownModule(void)\n{\n\treturn ioCloseAllWindows();\n}\n\nstatic void\nsqAssert(sqInt aBool)\n{\n\t/* missing DebugCode */;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* HostWindowPlugin_exports[][3] = {\n\t{\"HostWindowPlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"HostWindowPlugin\", \"primitiveCloseHostWindow\", (void*)primitiveCloseHostWindow},\n\t{\"HostWindowPlugin\", \"primitiveCreateHostWindow\", (void*)primitiveCreateHostWindow},\n\t{\"HostWindowPlugin\", \"primitiveHostWindowPosition\", (void*)primitiveHostWindowPosition},\n\t{\"HostWindowPlugin\", \"primitiveHostWindowPositionSet\", (void*)primitiveHostWindowPositionSet},\n\t{\"HostWindowPlugin\", \"primitiveHostWindowSize\", (void*)primitiveHostWindowSize},\n\t{\"HostWindowPlugin\", \"primitiveHostWindowSizeSet\", (void*)primitiveHostWindowSizeSet},\n\t{\"HostWindowPlugin\", \"primitiveHostWindowTitle\", (void*)primitiveHostWindowTitle},\n\t{\"HostWindowPlugin\", \"primitiveShowHostWindowRect\", (void*)primitiveShowHostWindowRect},\n\t{\"HostWindowPlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{\"HostWindowPlugin\", \"shutdownModule\", (void*)shutdownModule},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/IA32ABI/IA32ABI.c",
    "content": "/* Automatically generated by\n\tVMPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tIA32ABIPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"IA32ABIPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n#include <setjmp.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"vmCallback.h\"\n#include \"ia32abi.h\"\n#include \"sqMemoryAccess.h\"\n\ntypedef struct {\n\tint\ttype;\n\tint\tpad;\n\tunion {\n\t\t\t\t\t\t\tlong valword;\n\t\t\t\t\t\t\tstruct { int low, high; } valleint64;\n\t\t\t\t\t\t\tstruct { int high, low; } valbeint64;\n\t\t\t\t\t\t\tdouble valflt64;\n\t\t\t\t\t\t\tstruct { void *addr; long size; } valstruct;\n\t\t\t\t\t\t}\tcrvrvs;\n } VMCallbackReturnValue;\n\n\n\n/*** Constants ***/\n#define BaseHeaderSize 4\n#define BytesPerOop 4\n#define PrimErrBadArgument 3\n#define PrimErrBadIndex 4\n#define PrimErrBadReceiver 2\n#define PrimErrInappropriate 6\n#define PrimErrNoCMemory 10\n#define PrimErrNoMemory 9\n#define PrimErrNotFound 11\n#define PrimErrUnsupported 7\n\n\n/*** Function Prototypes ***/\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nstatic sqInt indexlengthinRange(sqInt byteIndex, sqInt length, sqInt rcvr);\nEXPORT(sqInt) isAlien(sqInt anOop);\nstatic sqInt msg(char *s);\nEXPORT(sqInt) primAddressField(void);\nEXPORT(sqInt) primAddressFieldPut(void);\nEXPORT(sqInt) primAlienReplace(void);\nEXPORT(sqInt) primAllocateExecutablePage(void);\nEXPORT(sqInt) primBoxedFree(void);\nEXPORT(sqInt) primCallOutDoubleReturn(void);\nEXPORT(sqInt) primCallOutFloatReturn(void);\nEXPORT(sqInt) primCallOutIntegralReturn(void);\nEXPORT(sqInt) primCalloc(void);\nEXPORT(sqInt) primDoubleAt(void);\nEXPORT(sqInt) primDoubleAtPut(void);\nEXPORT(sqInt) primFloatAt(void);\nEXPORT(sqInt) primFloatAtPut(void);\nEXPORT(sqInt) primFree(void);\nEXPORT(sqInt) primInIOProcessEventsFlagAddress(void);\nEXPORT(sqInt) primInLibraryFindSymbol(void);\nEXPORT(sqInt) primLoadLibrary(void);\nEXPORT(sqInt) primMalloc(void);\nEXPORT(sqInt) primReturnAsFromContextThrough(void);\nEXPORT(sqInt) primReturnFromContextThrough(void);\nEXPORT(sqInt) primSignedByteAt(void);\nEXPORT(sqInt) primSignedByteAtPut(void);\nEXPORT(sqInt) primSignedLongAt(void);\nEXPORT(sqInt) primSignedLongAtPut(void);\nEXPORT(sqInt) primSignedLongLongAt(void);\nEXPORT(sqInt) primSignedLongLongAtPut(void);\nEXPORT(sqInt) primSignedShortAt(void);\nEXPORT(sqInt) primSignedShortAtPut(void);\nEXPORT(sqInt) primSizeField(void);\nEXPORT(sqInt) primSizeFieldPut(void);\nEXPORT(sqInt) primStrlenFromStartIndex(void);\nEXPORT(sqInt) primStrlenThroughPointerAtIndex(void);\nEXPORT(sqInt) primThunkEntryAddress(void);\nEXPORT(sqInt) primUnsignedByteAt(void);\nEXPORT(sqInt) primUnsignedByteAtPut(void);\nEXPORT(sqInt) primUnsignedLongAt(void);\nEXPORT(sqInt) primUnsignedLongAtPut(void);\nEXPORT(sqInt) primUnsignedLongLongAt(void);\nEXPORT(sqInt) primUnsignedLongLongAtPut(void);\nEXPORT(sqInt) primUnsignedShortAt(void);\nEXPORT(sqInt) primUnsignedShortAtPut(void);\nEXPORT(sqInt) primVarArgsCallOutDoubleReturn(void);\nEXPORT(sqInt) primVarArgsCallOutFloatReturn(void);\nEXPORT(sqInt) primVarArgsCallOutIntegralReturn(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\nstatic sqInt sizeField(sqInt rcvr);\nstatic sqInt startOfByteData(sqInt rcvr);\nstatic sqInt startOfData(sqInt rcvr);\nstatic sqInt startOfDatawithSize(sqInt rcvr, sqInt sizeField);\n\n\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"IA32ABI VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"IA32ABI VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\n\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\n\n/*\tAnswer if the indices byteIndex to byteIndex + length - 1 are valid\n\tzero-relative indices into the rcvr.\n\tN.B. This code only works when translated because asUnisgnedInteger only\n\tworks for non-negative\n\tvalues. Hence the override in IA32ABIPluginSimulator. */\n\nstatic sqInt\nindexlengthinRange(sqInt byteIndex, sqInt length, sqInt rcvr)\n{\n    sqInt dataSize;\n\n\treturn (((dataSize = longAt(rcvr + BaseHeaderSize))) == 0)\n\t || (((((usqInt)byteIndex)) + length) <= (abs(dataSize)));\n}\n\nEXPORT(sqInt)\nisAlien(sqInt anOop)\n{\n\treturn interpreterProxy->includesBehaviorThatOf(interpreterProxy->fetchClassOf(anOop), interpreterProxy->classAlien());\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\n\n/*\tAnswer the unsigned 32-bit integer comprising the address field (the\n\tsecond 32-bit field).\n */\n/*\t<Alien> primAddressField ^<Integer>\n\t<primitive: 'primAddressField' error: errorCode module: 'IA32ABI'> */\n\nEXPORT(sqInt)\nprimAddressField(void)\n{\n    sqInt rcvr;\n    sqInt value;\n    sqInt valueOop;\n\n\trcvr = interpreterProxy->stackValue(0);\n\tvalue = longAt((rcvr + BaseHeaderSize) + BytesPerOop);\n\tvalueOop = interpreterProxy->positive32BitIntegerFor(value);\n\treturn interpreterProxy->popthenPush(1, valueOop);\n}\n\n\n/*\tStore an unsigned integer into the size field (the second 32 bit field;\n\tlittle endian).\n */\n/*\t<Alien> addressFieldPut: value <Integer> ^<Integer>\n\t<primitive: 'primAddressFieldPut' error: errorCode module: 'IA32ABI'> */\n\nEXPORT(sqInt)\nprimAddressFieldPut(void)\n{\n    sqInt rcvr;\n    sqInt value;\n    sqInt valueOop;\n\n\tvalueOop = interpreterProxy->stackValue(0);\n\trcvr = interpreterProxy->stackValue(1);\n\tvalue = interpreterProxy->positive32BitValueOf(valueOop);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tlongAtput((rcvr + BaseHeaderSize) + BytesPerOop, value);\n\treturn interpreterProxy->popthenPush(2, valueOop);\n}\n\n\n/*\tCopy some number of bytes from some source object starting at the index\n\tinto the receiver destination object from startIndex to stopIndex . The\n\tsource and destination may be Aliens or byte-indexable objects. The\n\tprimitive wll have either\n\tof the following signatures:\n\t<Alien | indexableByteSubclass | indexableWordSubclass>\n\tprimReplaceFrom: start <Integer>\n\tto: stop <Integer>\n\twith: replacement <Alien | indexableByteSubclass | indexableWordSubclass |\n\tInteger> startingAt: repStart <Integer> ^<self>\n\t<primitive: 'primitiveAlienReplace' error: errorCode module: 'IA32ABI'>\n\t<Anywhere>\n\tprimReplaceIn: dest <Alien | indexableByteSubclass |\n\tindexableWordSubclass> from: start <Integer>\n\tto: stop <Integer>\n\twith: replacement <Alien | indexableByteSubclass | indexableWordSubclass |\n\tInteger> startingAt: repStart <Integer> ^<self>\n\t<primitive: 'primitiveAlienReplace' error: errorCode module: 'IA32ABI'>\n\t */\n\nEXPORT(sqInt)\nprimAlienReplace(void)\n{\n    sqInt array;\n    sqInt count;\n    sqInt dest;\n    sqInt repl;\n    sqInt replStart;\n    sqInt src;\n    sqInt start;\n    sqInt stop;\n    sqInt totalLength;\n\n\tarray = interpreterProxy->stackValue(4);\n\tstart = interpreterProxy->stackIntegerValue(3);\n\tstop = interpreterProxy->stackIntegerValue(2);\n\trepl = interpreterProxy->stackValue(1);\n\treplStart = interpreterProxy->stackIntegerValue(0);\n\tif ((interpreterProxy->failed())\n\t || (!(interpreterProxy->isWordsOrBytes(array)))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (interpreterProxy->includesBehaviorThatOf(interpreterProxy->fetchClassOf(array), interpreterProxy->classAlien())) {\n\t\ttotalLength = longAt(array + BaseHeaderSize);\n\t\tdest = (((totalLength > 0\n\t? (array + BaseHeaderSize) + BytesPerOop\n\t: longAt((array + BaseHeaderSize) + BytesPerOop))) + start) - 1;\n\t\tif (totalLength == 0) {\n\n\t\t\t/* no bounds checks for zero-sized (pointer) Aliens */\n\n\t\t\ttotalLength = stop;\n\t\t}\n\t\telse {\n\t\t\ttotalLength = abs(totalLength);\n\t\t}\n\t}\n\telse {\n\t\ttotalLength = interpreterProxy->byteSizeOf(array);\n\t\tdest = ((array + BaseHeaderSize) + start) - 1;\n\t}\n\tif (!((start >= 1)\n\t\t && (((start - 1) <= stop)\n && (stop <= totalLength)))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadIndex);\n\t}\n\tif ((repl & 1)) {\n\t\tif (((repl >> 1)) <= 0) {\n\t\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t\t}\n\t\tsrc = (((repl >> 1)) + replStart) - 1;\n\t}\n\telse {\n\t\tif ((interpreterProxy->fetchClassOf(repl)) == (interpreterProxy->classLargePositiveInteger())) {\n\t\t\tsrc = ((interpreterProxy->positive32BitValueOf(repl)) + replStart) - 1;\n\t\t\tif (interpreterProxy->failed()) {\n\t\t\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (interpreterProxy->includesBehaviorThatOf(interpreterProxy->fetchClassOf(repl), interpreterProxy->classAlien())) {\n\t\t\t\ttotalLength = longAt(repl + BaseHeaderSize);\n\t\t\t\tsrc = (((totalLength > 0\n\t? (repl + BaseHeaderSize) + BytesPerOop\n\t: longAt((repl + BaseHeaderSize) + BytesPerOop))) + replStart) - 1;\n\t\t\t\tif (totalLength == 0) {\n\n\t\t\t\t\t/* no bounds checks for zero-sized (pointer) Aliens */\n\n\t\t\t\t\ttotalLength = (stop - start) + replStart;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttotalLength = abs(totalLength);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!(interpreterProxy->isWordsOrBytes(repl))) {\n\t\t\t\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t\t\t\t}\n\t\t\t\ttotalLength = interpreterProxy->byteSizeOf(repl);\n\t\t\t\tsrc = ((repl + BaseHeaderSize) + replStart) - 1;\n\t\t\t}\n\t\t\tif (!((replStart >= 1)\n\t\t\t\t && (((stop - start) + replStart) <= totalLength))) {\n\t\t\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadIndex);\n\t\t\t}\n\t\t}\n\t}\n\tcount = (stop - start) + 1;\n\tmemcpy((void *)dest,(void *)src,count);\n\tinterpreterProxy->pop(interpreterProxy->methodArgumentCount());\n}\n\n\n/*\tAnswer an Alien for an executable page; for thunks */\n/*\tprimAllocateExecutablePage ^<Alien>\n\t<primitive: 'primAllocateExecutablePage' error: errorCode module:\n\t'IA32ABI'> \n */\n\nEXPORT(sqInt)\nprimAllocateExecutablePage(void)\n{\n    sqInt alien;\n    long byteSize;\n    void *mem;\n    long *ptr;\n\n\tmem = allocateExecutablePage(&byteSize);\n\tif (mem == 0) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrNoCMemory);\n\t}\n\talien = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classAlien(), 8);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrNoMemory);\n\t}\n\tptr = interpreterProxy->firstIndexableField(alien);\n\tptr[0] = (0 - byteSize);\n\tptr[1] = (((long) mem));\n\tinterpreterProxy->popthenPush(1, alien);\n}\n\n\n/*\tFree the memory referenced by the receiver, an Alien. */\n/*\tproxy <Alien> primFree ^<Alien>\n\t<primitive: 'primBoxedFree' error: errorCode module: 'IA32ABI'> */\n\nEXPORT(sqInt)\nprimBoxedFree(void)\n{\n    sqInt addr;\n    sqInt *ptr;\n    sqInt rcvr;\n    long sizeField;\n\n\trcvr = interpreterProxy->stackObjectValue(0);\n\tif (!(((interpreterProxy->byteSizeOf(rcvr)) >= 2) * BytesPerOop)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadReceiver);\n\t}\n\tptr = interpreterProxy->firstIndexableField(rcvr);\n\tsizeField = ptr[0];\n\n\t/* Don't you dare to free Squeak's memory! */\n\n\taddr = ptr[1];\n\tif ((sizeField >= 0)\n\t || ((addr == 0)\n || (interpreterProxy->isInMemory(addr)))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrInappropriate);\n\t}\n\tfree((void *)addr);\n\tptr[0] = 0;\n\tptr[1] = 0;\n}\n\n\n/*\tCall a foreign function that answers a double-precision floating-point\n\tresult in %f0\n\taccording to IA32-ish ABI rules. The primitive will have a signature of\n\tthe form\n\tfunctionAddress <Alien> primFFICallResult: result <Alien|Object> with:\n\tfirstArg <Alien | Integer> ... with: lastArg <Alien | Integer> ^<Alien>\n\t<primitive: 'primCallOutDoubleReturn' error: errorCode module: 'IA32ABI'>.\n\tAnswer result. If result is an Alien the value answered by the call will\n\tbe assigned to result.\n */\n\nEXPORT(sqInt)\nprimCallOutDoubleReturn(void)\n{\n    sqInt errCode;\n    sqInt mac;\n    sqInt result;\n\n\tmac = interpreterProxy->methodArgumentCount();\n\terrCode = callIA32DoubleReturn(interpreterProxy->getStackPointer() - mac + 2, /* arg vec */\n\t\t\t\t\t\t\t\t\t\t\t\t\tmac - 1\t/* nargs */,\n\t\t\t\t\t\t\t\t\t\t\t\t\tmac\t/* funcOffset*/,\n\t\t\t\t\t\t\t\t\t\t\t\t\tmac - 1\t/* resultOffset */);\n\tif (errCode != 0) {\n\t\treturn interpreterProxy->primitiveFailFor(errCode);\n\t}\n\tresult = interpreterProxy->stackValue(mac - 1);\n\tinterpreterProxy->popthenPush(mac + 1, result);\n}\n\n\n/*\tCall a foreign function that answers a single-precision floating-point\n\tresult in %f0\n\taccording to IA32-ish ABI rules. The primitive will have a signature of\n\tthe form\n\tfunctionAddress <Alien> primFFICallResult: result <Alien|Object> with:\n\tfirstArg <Alien | Integer> ... with: lastArg <Alien | Integer> ^<Alien>\n\t<primitive: 'primCallOutFloatReturn' error: errorCode module: 'IA32ABI'>.\n\tAnswer result. If result is an Alien the value answered by the call will\n\tbe assigned to result.\n */\n\nEXPORT(sqInt)\nprimCallOutFloatReturn(void)\n{\n    sqInt errCode;\n    sqInt mac;\n    sqInt result;\n\n\tmac = interpreterProxy->methodArgumentCount();\n\terrCode = callIA32FloatReturn(interpreterProxy->getStackPointer() - mac + 2, /* arg vec */\n\t\t\t\t\t\t\t\t\t\t\t\tmac - 1\t/* nargs */,\n\t\t\t\t\t\t\t\t\t\t\t\tmac\t/* funcOffset*/,\n\t\t\t\t\t\t\t\t\t\t\t\tmac - 1\t/* resultOffset */);\n\tif (errCode != 0) {\n\t\treturn interpreterProxy->primitiveFailFor(errCode);\n\t}\n\tresult = interpreterProxy->stackValue(mac - 1);\n\tinterpreterProxy->popthenPush(mac + 1, result);\n}\n\n\n/*\tCall a foreign function that answers an integral result in %eax (and\n\tpossibly %edx)\n\taccording to IA32-ish ABI rules. The primitive will have a signature of\n\tthe form\n\tfunctionAddress <Alien> primFFICallResult: result <Alien|Object> with:\n\tfirstArg <Alien | Integer> ... with: lastArg <Alien | Integer> ^<Alien>\n\t<primitive: 'primCallOutIntegralReturn' error: errorCode module:\n\t'IA32ABI'>. Answer result. If result is an Alien the value answered by the\n\tcall will be assigned to result.\n */\n\nEXPORT(sqInt)\nprimCallOutIntegralReturn(void)\n{\n    sqInt errCode;\n    sqInt mac;\n    sqInt result;\n\n\tmac = interpreterProxy->methodArgumentCount();\n\terrCode = callIA32IntegralReturn(interpreterProxy->getStackPointer() - mac + 2, /* arg vec */\n\t\t\t\t\t\t\t\t\t\t\t\t\tmac - 1\t/* nargs */,\n\t\t\t\t\t\t\t\t\t\t\t\t\tmac\t/* funcOffset*/,\n\t\t\t\t\t\t\t\t\t\t\t\t\tmac - 1\t/* resultOffset */);\n\tif (errCode != 0) {\n\t\treturn interpreterProxy->primitiveFailFor(errCode);\n\t}\n\tresult = interpreterProxy->stackValue(mac - 1);\n\tinterpreterProxy->popthenPush(mac + 1, result);\n}\n\n\n/*\tcalloc (malloc + zero-fill) arg bytes. */\n/*\tprimCalloc: byteSize <Integer> ^<Integer>\n\t<primitive: 'primCalloc' error: errorCode module: 'IA32ABI'> */\n\nEXPORT(sqInt)\nprimCalloc(void)\n{\n    sqInt addr;\n    long byteSize;\n\n\tbyteSize = interpreterProxy->stackIntegerValue(0);\n\tif ((interpreterProxy->failed())\n\t || (byteSize <= 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\taddr = (sqInt)calloc(1,byteSize);\n\tif (addr == 0) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrNoCMemory);\n\t}\n\tinterpreterProxy->popthenPush(2, interpreterProxy->positive32BitIntegerFor(addr));\n}\n\n\n/*\tAnswer the 64-bit double starting at the given byte offset (little\n\tendian). \n */\n/*\t<Alien> doubleAt: index <Integer> ^<Float>\n\t<primitive: 'primDoubleAt' error: errorCode module: 'IA32ABI'> */\n\nEXPORT(sqInt)\nprimDoubleAt(void)\n{\n    sqInt addr;\n    sqInt byteOffset;\n    sqInt dataSize;\n    double  floatValue;\n    sqInt rcvr;\n\n\tbyteOffset = (interpreterProxy->stackPositiveMachineIntegerValue(0)) - 1;\n\trcvr = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!((((dataSize = longAt(rcvr + BaseHeaderSize))) == 0)\n\t\t || (((((usqInt)byteOffset)) + 8) <= (abs(dataSize))))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadIndex);\n\t}\n\taddr = (((longAt(rcvr + BaseHeaderSize)) > 0\n\t? (rcvr + BaseHeaderSize) + BytesPerOop\n\t: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;\n\t((long *)(&floatValue))[0] = ((long *)addr)[0]; ((long *)(&floatValue))[1] = ((long *)addr)[1];\n\tinterpreterProxy->pop(2);\n\treturn interpreterProxy->pushFloat(floatValue);\n}\n\n\n/*\tStore a double into 64 bits starting at the given byte offset (little\n\tendian). \n */\n/*\t<Alien> doubleAt: index <Integer> put: value <Float | Integer> ^<Float |\n\tInteger> <primitive: 'primDoubleAtPut' error: errorCode module: 'IA32ABI'> */\n\nEXPORT(sqInt)\nprimDoubleAtPut(void)\n{\n    sqInt addr;\n    sqInt byteOffset;\n    sqInt dataSize;\n    double  floatValue;\n    sqInt rcvr;\n    sqInt valueOop;\n\n\tvalueOop = interpreterProxy->stackValue(0);\n\tif ((valueOop & 1)) {\n\t\tfloatValue = ((double) ((valueOop >> 1)));\n\t}\n\telse {\n\t\tfloatValue = ((double) (interpreterProxy->floatValueOf(valueOop)));\n\t}\n\tbyteOffset = (interpreterProxy->stackPositiveMachineIntegerValue(1)) - 1;\n\trcvr = interpreterProxy->stackObjectValue(2);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!((((dataSize = longAt(rcvr + BaseHeaderSize))) == 0)\n\t\t || (((((usqInt)byteOffset)) + 8) <= (abs(dataSize))))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadIndex);\n\t}\n\taddr = (((longAt(rcvr + BaseHeaderSize)) > 0\n\t? (rcvr + BaseHeaderSize) + BytesPerOop\n\t: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;\n\t((int*)addr)[0] = ((int*)(&floatValue))[0];\n\t((int*)addr)[1] = ((int*)(&floatValue))[1];\n\tinterpreterProxy->popthenPush(3, valueOop);\n}\n\n\n/*\tAnswer the 32-bit float starting at the given byte offset (little endian). */\n/*\t<Alien> floatAt: index <Integer> ^<Float>\n\t<primitive: 'primFloatAt' error: errorCode module: 'IA32ABI'> */\n\nEXPORT(sqInt)\nprimFloatAt(void)\n{\n    sqInt addr;\n    sqInt byteOffset;\n    sqInt dataSize;\n    float  floatValue;\n    sqInt rcvr;\n\n\tbyteOffset = (interpreterProxy->stackPositiveMachineIntegerValue(0)) - 1;\n\trcvr = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!((((dataSize = longAt(rcvr + BaseHeaderSize))) == 0)\n\t\t || (((((usqInt)byteOffset)) + 4) <= (abs(dataSize))))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadIndex);\n\t}\n\taddr = (((longAt(rcvr + BaseHeaderSize)) > 0\n\t? (rcvr + BaseHeaderSize) + BytesPerOop\n\t: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;\n\t((long *)(&floatValue))[0] = ((long *)addr)[0];\n\tinterpreterProxy->pop(2);\n\treturn interpreterProxy->pushFloat(floatValue);\n}\n\n\n/*\tStore a float into 32 bits starting at the given byte offset (little\n\tendian). \n */\n/*\t<Alien> floatAt: index <Integer> put: value <Float | Integer> ^<Float |\n\tInteger> <primitive: 'primFloatAtPut' error: errorCode module: 'IA32ABI'> */\n\nEXPORT(sqInt)\nprimFloatAtPut(void)\n{\n    sqInt addr;\n    sqInt byteOffset;\n    sqInt dataSize;\n    float  floatValue;\n    sqInt rcvr;\n    sqInt valueOop;\n\n\tvalueOop = interpreterProxy->stackValue(0);\n\tif ((valueOop & 1)) {\n\t\tfloatValue = ((double) ((valueOop >> 1)));\n\t}\n\telse {\n\t\tfloatValue = ((double) (interpreterProxy->floatValueOf(valueOop)));\n\t}\n\tbyteOffset = (interpreterProxy->stackPositiveMachineIntegerValue(1)) - 1;\n\trcvr = interpreterProxy->stackObjectValue(2);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!((((dataSize = longAt(rcvr + BaseHeaderSize))) == 0)\n\t\t || (((((usqInt)byteOffset)) + 4) <= (abs(dataSize))))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadIndex);\n\t}\n\taddr = (((longAt(rcvr + BaseHeaderSize)) > 0\n\t? (rcvr + BaseHeaderSize) + BytesPerOop\n\t: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;\n\t((long *)addr)[0] = ((long *)(&floatValue))[0];\n\tinterpreterProxy->popthenPush(3, valueOop);\n}\n\n\n/*\tFree the memory referenced by the argument, an integer. */\n/*\t<Anywhere> primFree: address <Integer>\n\t<primitive: 'primFree' error: errorCode module: 'IA32ABI'> */\n\nEXPORT(sqInt)\nprimFree(void)\n{\n    sqInt addr;\n\n\taddr = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(0));\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif ((addr == 0)\n\t || (interpreterProxy->isInMemory(addr))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrInappropriate);\n\t}\n\tfree((void *)addr);\n\tinterpreterProxy->pop(1);\n}\n\n\n/*\tAnswer the address of the int inIOProcessEvents flag. This can be used to\n\tdisable invocation of ioProcessEvents and is for backward-compatibility.\n\tPlease use the core VM primitiveEventProcessingControl in new code. */\n\nEXPORT(sqInt)\nprimInIOProcessEventsFlagAddress(void)\n{\n    sqInt address;\n\n\t{ extern int inIOProcessEvents; address = (sqInt)&inIOProcessEvents; }\n\tinterpreterProxy->popthenPush(1, interpreterProxy->positive32BitIntegerFor(address));\n}\n\n\n/*\tAttempt to find the address of a symbol in a loaded library.\n\tThe primitive can have a signature either of the form:\n\t<Anywhere> primInLibrary: libraryHandle <Alien> findSymbol: symbolName\n\t<String> ^<Integer>\n\t<primitive: 'primInLibraryFindSymbol' error: errorCode module: 'IA32ABI'>\n\tor:\n\tlibraryHandle <Alien> primFindSymbol: symbolName <String> ^<Integer>\n\t<primitive: 'primInLibraryFindSymbol' error: errorCode module: 'IA32ABI'> */\n\nEXPORT(sqInt)\nprimInLibraryFindSymbol(void)\n{\n    sqInt address;\n    sqInt functionName;\n    sqInt libraryProxy;\n\n\tfunctionName = interpreterProxy->stackValue(0);\n\tlibraryProxy = interpreterProxy->stackValue(1);\n\tif (!((interpreterProxy->includesBehaviorThatOf(interpreterProxy->fetchClassOf(libraryProxy), interpreterProxy->classAlien()))\n\t\t && ((((interpreterProxy->byteSizeOf(libraryProxy)) >= 2) * BytesPerOop)\n && (interpreterProxy->isBytes(functionName))))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\taddress = interpreterProxy->ioLoadSymbolOfLengthFromModule(((sqInt) (interpreterProxy->firstIndexableField(functionName))), interpreterProxy->byteSizeOf(functionName), longAt((libraryProxy + BaseHeaderSize) + BytesPerOop));\n\tif ((interpreterProxy->failed())\n\t || (address == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrNotFound);\n\t}\n\tinterpreterProxy->popthenPush((interpreterProxy->methodArgumentCount()) + 1, interpreterProxy->positive32BitIntegerFor(address));\n}\n\n\n/*\tAttempt to load a library of the given name. The primitive will have a\n\tsignature of the form:\n\t<Anywhere> primLoadLibrary: libraryName <String> ^<Integer>\n\t<primitive: 'primLoadLibrary' error: errorCode module: 'IA32ABI'> */\n\nEXPORT(sqInt)\nprimLoadLibrary(void)\n{\n    sqInt libraryHandle;\n    sqInt libraryName;\n\n\tlibraryName = interpreterProxy->stackValue(0);\n\tif (!(interpreterProxy->isBytes(libraryName))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tlibraryHandle = interpreterProxy->ioLoadModuleOfLength(((sqInt) (interpreterProxy->firstIndexableField(libraryName))), interpreterProxy->byteSizeOf(libraryName));\n\tif (libraryHandle == 0) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrNotFound);\n\t}\n\tinterpreterProxy->popthenPush(2, interpreterProxy->positive32BitIntegerFor(libraryHandle));\n}\n\n\n/*\tMalloc arg bytes. */\n/*\tprimMalloc: byteSize <Integer> <^Integer>\n\t<primitive: 'primMalloc' error: errorCode module: 'IA32ABI'> */\n\nEXPORT(sqInt)\nprimMalloc(void)\n{\n    sqInt addr;\n    long byteSize;\n\n\tbyteSize = interpreterProxy->stackIntegerValue(0);\n\tif ((interpreterProxy->failed())\n\t || (byteSize <= 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\taddr = (sqInt)malloc(byteSize);\n\tif (addr == 0) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrNoCMemory);\n\t}\n\tinterpreterProxy->popthenPush(2, interpreterProxy->positive32BitIntegerFor(addr));\n}\n\n\n/*\tReturn a result from a callback to the callback's callee. The primitive\n\thas a signature of the form:\n\tresult <VMCallbackContext32/64>\n\tprimReturnAs: returnTypeCode <Integer>\n\tFromContext: callbackContext <Context>\n\t<primitive: 'primReturnAsFromContextThrough' error: errorCode module:\n\t'IA32ABI'>  */\n\nEXPORT(sqInt)\nprimReturnAsFromContextThrough(void)\n{\n\tif (!(interpreterProxy->returnAsThroughCallbackContext(interpreterProxy->stackValue(1), ((VMCallbackContext *) (startOfData(interpreterProxy->stackValue(2)))), interpreterProxy->stackValue(0)))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n}\n\n\n/*\tReturn a result from a callback to the callback's callee. The primitive\n\thas a signature of the form:\n\tresult <FFICallbackResult> primReturnFromContext: callbackContext\n\t<Context> through: jmpBuf <Integer>\n\t<primitive: 'primReturnFromContextThrough' error: errorCode module:\n\t'IA32ABI'>  */\n\nEXPORT(sqInt)\nprimReturnFromContextThrough(void)\n{\n    VMCallbackContext *vmCallbackContext;\n    VMCallbackReturnValue *vmCallbackReturnValue;\n\n\tvmCallbackReturnValue = ((VMCallbackReturnValue *) (startOfData(interpreterProxy->stackValue(2))));\n\tvmCallbackContext = ((VMCallbackContext *) (interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(0))));\n\tif ((interpreterProxy->failed())\n\t || (vmCallbackContext == 0)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!(interpreterProxy->reestablishContextPriorToCallback(interpreterProxy->stackValue(1)))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tmemcpy((&((vmCallbackContext->rvs))), (&((vmCallbackReturnValue->crvrvs))), sizeof((vmCallbackContext->rvs)));\n\tlongjmp((vmCallbackContext->trampoline), ((vmCallbackReturnValue->type)) + 1);\n}\n\n\n/*\tAnswer the signed 8-bit integer starting at the given byte offset (little\n\tendian). \n */\n/*\t<Alien> unsignedByteAt: index <Integer> ^<Integer>\n\t<primitive: 'primSignedByteAt' error: errorCode module: 'IA32ABI'> */\n\nEXPORT(sqInt)\nprimSignedByteAt(void)\n{\n    sqInt addr;\n    sqInt byteOffset;\n    sqInt dataSize;\n    sqInt rcvr;\n    signed char  value;\n    sqInt valueOop;\n\n\tbyteOffset = (interpreterProxy->stackPositiveMachineIntegerValue(0)) - 1;\n\trcvr = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!((((dataSize = longAt(rcvr + BaseHeaderSize))) == 0)\n\t\t || (((((usqInt)byteOffset)) + 1) <= (abs(dataSize))))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadIndex);\n\t}\n\taddr = (((longAt(rcvr + BaseHeaderSize)) > 0\n\t? (rcvr + BaseHeaderSize) + BytesPerOop\n\t: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;\n\tvalue = byteAt(addr);\n\tvalueOop = interpreterProxy->signed32BitIntegerFor(value);\n\treturn interpreterProxy->popthenPush(2, valueOop);\n}\n\n\n/*\tStore a signed integer into 8 bits starting at the given byte offset\n\t(little endian).\n */\n/*\t<Alien> signedByteAt: index <Integer> put: value <Integer> ^<Integer>\n\t<primitive: 'primSignedByteAtPut' error: errorCode module: 'IA32ABI'> */\n\nEXPORT(sqInt)\nprimSignedByteAtPut(void)\n{\n    sqInt addr;\n    sqInt byteOffset;\n    sqInt dataSize;\n    sqInt rcvr;\n    sqInt value;\n    sqInt valueOop;\n\n\tvalueOop = interpreterProxy->stackValue(0);\n\tbyteOffset = (interpreterProxy->stackPositiveMachineIntegerValue(1)) - 1;\n\trcvr = interpreterProxy->stackObjectValue(2);\n\tvalue = interpreterProxy->signed32BitValueOf(valueOop);\n\tif ((interpreterProxy->failed())\n\t || ((value < -128)\n || (value > 127))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!((((dataSize = longAt(rcvr + BaseHeaderSize))) == 0)\n\t\t || (((((usqInt)byteOffset)) + 1) <= (abs(dataSize))))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadIndex);\n\t}\n\taddr = (((longAt(rcvr + BaseHeaderSize)) > 0\n\t? (rcvr + BaseHeaderSize) + BytesPerOop\n\t: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;\n\tbyteAtput(addr, value);\n\treturn interpreterProxy->popthenPush(3, valueOop);\n}\n\n\n/*\tAnswer the signed 32-bit integer starting at the given byte offset (little\n\tendian). \n */\n/*\t<Alien> signedLongAt: index <Integer> ^<Integer>\n\t<primitive: 'primSignedLongAt' error: errorCode module: 'IA32ABI'> */\n\nEXPORT(sqInt)\nprimSignedLongAt(void)\n{\n    sqInt addr;\n    sqInt byteOffset;\n    sqInt dataSize;\n    sqInt rcvr;\n    sqInt value;\n    sqInt valueOop;\n\n\tbyteOffset = (interpreterProxy->stackPositiveMachineIntegerValue(0)) - 1;\n\trcvr = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!((((dataSize = longAt(rcvr + BaseHeaderSize))) == 0)\n\t\t || (((((usqInt)byteOffset)) + 4) <= (abs(dataSize))))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadIndex);\n\t}\n\taddr = (((longAt(rcvr + BaseHeaderSize)) > 0\n\t? (rcvr + BaseHeaderSize) + BytesPerOop\n\t: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;\n\tvalue = longAt(addr);\n\tvalueOop = interpreterProxy->signed32BitIntegerFor(value);\n\treturn interpreterProxy->popthenPush(2, valueOop);\n}\n\n\n/*\tStore a signed integer into 32 bits starting at the given byte offset\n\t(little endian).\n */\n/*\t<Alien> signedLongAt: index <Integer> put: value <Integer> ^<Integer>\n\t<primitive: 'primSignedLongAtPut' error: errorCode module: 'IA32ABI'> */\n\nEXPORT(sqInt)\nprimSignedLongAtPut(void)\n{\n    sqInt addr;\n    sqInt byteOffset;\n    sqInt dataSize;\n    sqInt rcvr;\n    sqInt value;\n    sqInt valueOop;\n\n\tvalueOop = interpreterProxy->stackValue(0);\n\tbyteOffset = (interpreterProxy->stackPositiveMachineIntegerValue(1)) - 1;\n\trcvr = interpreterProxy->stackObjectValue(2);\n\tvalue = interpreterProxy->signed32BitValueOf(valueOop);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!((((dataSize = longAt(rcvr + BaseHeaderSize))) == 0)\n\t\t || (((((usqInt)byteOffset)) + 4) <= (abs(dataSize))))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadIndex);\n\t}\n\taddr = (((longAt(rcvr + BaseHeaderSize)) > 0\n\t? (rcvr + BaseHeaderSize) + BytesPerOop\n\t: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;\n\tlongAtput(addr, value);\n\treturn interpreterProxy->popthenPush(3, valueOop);\n}\n\n\n/*\tAnswer the signed 64-bit integer starting at the given byte offset (little\n\tendian). \n */\n/*\t<Alien> signedLongLongAt: index <Integer> ^<Integer>\n\t<primitive: 'primSignedLongLongAt' error: errorCode module: 'IA32ABI'> */\n\nEXPORT(sqInt)\nprimSignedLongLongAt(void)\n{\n    sqInt addr;\n    sqInt byteOffset;\n    sqInt dataSize;\n    sqInt rcvr;\n    long long signedlonglongvalue;\n    long long *signedlonglongvaluePtr;\n    sqInt valueOop;\n\n\tsignedlonglongvaluePtr = 0;\n\t;\n\tbyteOffset = (interpreterProxy->stackPositiveMachineIntegerValue(0)) - 1;\n\trcvr = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!((((dataSize = longAt(rcvr + BaseHeaderSize))) == 0)\n\t\t || (((((usqInt)byteOffset)) + 8) <= (abs(dataSize))))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadIndex);\n\t}\n\taddr = (((longAt(rcvr + BaseHeaderSize)) > 0\n\t? (rcvr + BaseHeaderSize) + BytesPerOop\n\t: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;\n\tsignedlonglongvaluePtr = ((long long*) addr);\n\tsignedlonglongvalue = *signedlonglongvaluePtr;\n\tvalueOop = interpreterProxy->signed64BitIntegerFor(signedlonglongvalue);\n\treturn interpreterProxy->popthenPush(2, valueOop);\n}\n\n\n/*\tStore a signed integer into 64 bits starting at the given byte offset\n\t(little endian).\n */\n/*\t<Alien> signedLongLongAt: index <Integer> put: value <Integer> ^<Integer>\n\t<primitive: 'primSignedLongLongAtPut' error: errorCode module: 'IA32ABI'> */\n\nEXPORT(sqInt)\nprimSignedLongLongAtPut(void)\n{\n    sqInt addr;\n    sqInt byteOffset;\n    sqInt dataSize;\n    sqInt rcvr;\n    long long signedlonglongvalue;\n    long long *signedlonglongvaluePtr;\n    sqInt valueOop;\n\n\tsignedlonglongvaluePtr = 0;\n\t;\n\tvalueOop = interpreterProxy->stackValue(0);\n\tbyteOffset = (interpreterProxy->stackPositiveMachineIntegerValue(1)) - 1;\n\trcvr = interpreterProxy->stackObjectValue(2);\n\tsignedlonglongvalue = interpreterProxy->signed64BitValueOf(valueOop);\n\t;\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!((((dataSize = longAt(rcvr + BaseHeaderSize))) == 0)\n\t\t || (((((usqInt)byteOffset)) + 8) <= (abs(dataSize))))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadIndex);\n\t}\n\taddr = (((longAt(rcvr + BaseHeaderSize)) > 0\n\t? (rcvr + BaseHeaderSize) + BytesPerOop\n\t: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;\n\tsignedlonglongvaluePtr = ((long long*) addr);\n\t*signedlonglongvaluePtr = signedlonglongvalue;\n\treturn interpreterProxy->popthenPush(3, valueOop);\n}\n\n\n/*\tAnswer the signed 32-bit integer starting at the given byte offset (little\n\tendian). \n */\n/*\t<Alien> signedShortAt: index <Integer> ^<Integer>\n\t<primitive: 'primSignedShortAt' error: errorCode module: 'IA32ABI'> */\n\nEXPORT(sqInt)\nprimSignedShortAt(void)\n{\n    sqInt addr;\n    sqInt byteOffset;\n    sqInt dataSize;\n    sqInt rcvr;\n    short  value;\n    sqInt valueOop;\n\n\tbyteOffset = (interpreterProxy->stackPositiveMachineIntegerValue(0)) - 1;\n\trcvr = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!((((dataSize = longAt(rcvr + BaseHeaderSize))) == 0)\n\t\t || (((((usqInt)byteOffset)) + 2) <= (abs(dataSize))))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadIndex);\n\t}\n\taddr = (((longAt(rcvr + BaseHeaderSize)) > 0\n\t? (rcvr + BaseHeaderSize) + BytesPerOop\n\t: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;\n\tvalue = shortAt(addr);\n\tvalueOop = interpreterProxy->signed32BitIntegerFor(value);\n\treturn interpreterProxy->popthenPush(2, valueOop);\n}\n\n\n/*\tStore a signed integer into 16 bits starting at the given byte offset\n\t(little endian).\n */\n/*\t<Alien> signedShortAt: index <Integer> put: value <Integer> ^<Integer>\n\t<primitive: 'primSignedShortAtPut' error: errorCode module: 'IA32ABI'> */\n\nEXPORT(sqInt)\nprimSignedShortAtPut(void)\n{\n    sqInt addr;\n    sqInt byteOffset;\n    sqInt dataSize;\n    sqInt rcvr;\n    sqInt value;\n    sqInt valueOop;\n\n\tvalueOop = interpreterProxy->stackValue(0);\n\tbyteOffset = (interpreterProxy->stackPositiveMachineIntegerValue(1)) - 1;\n\trcvr = interpreterProxy->stackObjectValue(2);\n\tvalue = interpreterProxy->signed32BitValueOf(valueOop);\n\tif ((interpreterProxy->failed())\n\t || ((value < -32768)\n || (value > 32767))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!((((dataSize = longAt(rcvr + BaseHeaderSize))) == 0)\n\t\t || (((((usqInt)byteOffset)) + 2) <= (abs(dataSize))))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadIndex);\n\t}\n\taddr = (((longAt(rcvr + BaseHeaderSize)) > 0\n\t? (rcvr + BaseHeaderSize) + BytesPerOop\n\t: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;\n\tshortAtput(addr, value);\n\treturn interpreterProxy->popthenPush(3, valueOop);\n}\n\n\n/*\tAnswer the signed 32-bit integer comprising the size field (the first\n\t32-bit field).\n */\n/*\t<Alien> primSizeField ^<Integer>\n\t<primitive: 'primSizeField' error: errorCode module: 'IA32ABI'> */\n\nEXPORT(sqInt)\nprimSizeField(void)\n{\n    sqInt rcvr;\n    sqInt value;\n    sqInt valueOop;\n\n\trcvr = interpreterProxy->stackValue(0);\n\tvalue = longAt(rcvr + BaseHeaderSize);\n\tvalueOop = interpreterProxy->signed32BitIntegerFor(value);\n\treturn interpreterProxy->popthenPush(1, valueOop);\n}\n\n\n/*\tStore a signed integer into the size field (the first 32 bit field; little\n\tendian). \n */\n/*\t<Alien> sizeFieldPut: value <Integer> ^<Integer>\n\t<primitive: 'primSizeFieldPut' error: errorCode module: 'IA32ABI'> */\n\nEXPORT(sqInt)\nprimSizeFieldPut(void)\n{\n    sqInt rcvr;\n    sqInt value;\n    sqInt valueOop;\n\n\tvalueOop = interpreterProxy->stackValue(0);\n\trcvr = interpreterProxy->stackValue(1);\n\tvalue = interpreterProxy->signed32BitValueOf(valueOop);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tlongAtput(rcvr + BaseHeaderSize, value);\n\treturn interpreterProxy->popthenPush(2, valueOop);\n}\n\n\n/*\tAnswer the number of non-null bytes starting at index. If\n\tthere isn't a null byte before the end of the object then the\n\tresult will be the number of bytes from index to the end of\n\tthe object, i.e. the result will be within the bounds of the object. */\n/*\t<Alien> primStrlenFrom: index <Integer> ^<Integer>\n\t<primitive: 'primStrlenFromStartIndex' error: errorCode module: 'IA32ABI'> */\n\nEXPORT(sqInt)\nprimStrlenFromStartIndex(void)\n{\n    sqInt byteOffset;\n    sqInt dataSize;\n    sqInt index;\n    sqInt limit;\n    char *ptr;\n    sqInt rcvr;\n\n\tbyteOffset = (interpreterProxy->stackPositiveMachineIntegerValue(0)) - 1;\n\trcvr = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!((((dataSize = longAt(rcvr + BaseHeaderSize))) == 0)\n\t\t || (((((usqInt)byteOffset)) + 1) <= (abs(dataSize))))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadIndex);\n\t}\n\tlimit = longAt(rcvr + BaseHeaderSize);\n\tptr = ((char *) (((limit > 0\n\t? (rcvr + BaseHeaderSize) + BytesPerOop\n\t: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset));\n\tif (limit == 0) {\n\t\tindex = strlen(ptr);\n\t}\n\telse {\n\t\tlimit = abs(limit);\n\t\tindex = 0;\n\t\twhile ((index < limit)\n && ((ptr[index]) != 0)) {\n\t\t\tindex += 1;\n\t\t}\n\t}\n\treturn interpreterProxy->popthenPush(2, interpreterProxy->positive32BitIntegerFor(index));\n}\n\n\n/*\tAnswer the number of non-null bytes starting at the byte addressed by\n\tthe 4-byte pointer at index. */\n/*\t<Alien> strlenThroughPointerAt: index <Integer> ^<Integer>\n\t<primitive: 'primStrlenThroughPointerAtIndex' error: errorCode module:\n\t'IA32ABI'> \n */\n\nEXPORT(sqInt)\nprimStrlenThroughPointerAtIndex(void)\n{\n    sqInt addr;\n    sqInt byteOffset;\n    sqInt dataSize;\n    char *ptr;\n    sqInt rcvr;\n\n\tbyteOffset = (interpreterProxy->stackPositiveMachineIntegerValue(0)) - 1;\n\trcvr = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!((((dataSize = longAt(rcvr + BaseHeaderSize))) == 0)\n\t\t || (((((usqInt)byteOffset)) + 4) <= (abs(dataSize))))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadIndex);\n\t}\n\taddr = (((longAt(rcvr + BaseHeaderSize)) > 0\n\t? (rcvr + BaseHeaderSize) + BytesPerOop\n\t: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;\n\tptr = ((char *) (longAt(addr)));\n\treturn interpreterProxy->popthenPush(2, interpreterProxy->positive32BitIntegerFor(strlen(ptr)));\n}\n\n\n/*\tAnswer the address of the entry-point for thunk callbacks:\n\tlong thunkEntry(void *thunkp, long *stackp);\n\tThis could be derived via loadModule: findSymbol: etc but that would\n\tpreclude making the plugin internal. */\n\nEXPORT(sqInt)\nprimThunkEntryAddress(void)\n{\n    sqInt address;\n\n\taddress = (sqInt)thunkEntry;\n\tinterpreterProxy->popthenPush(1, interpreterProxy->positive32BitIntegerFor(address));\n}\n\n\n/*\tAnswer the unsigned 8-bit integer starting at the given byte offset\n\t(little endian).\n */\n/*\t<Alien> unsignedByteAt: index <Integer> ^<Integer>\n\t<primitive: 'primUnsignedByteAt' error: errorCode module: 'IA32ABI'> */\n\nEXPORT(sqInt)\nprimUnsignedByteAt(void)\n{\n    sqInt addr;\n    sqInt byteOffset;\n    sqInt dataSize;\n    sqInt rcvr;\n    unsigned char  value;\n    sqInt valueOop;\n\n\tbyteOffset = (interpreterProxy->stackPositiveMachineIntegerValue(0)) - 1;\n\trcvr = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!((((dataSize = longAt(rcvr + BaseHeaderSize))) == 0)\n\t\t || (((((usqInt)byteOffset)) + 1) <= (abs(dataSize))))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadIndex);\n\t}\n\taddr = (((longAt(rcvr + BaseHeaderSize)) > 0\n\t? (rcvr + BaseHeaderSize) + BytesPerOop\n\t: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;\n\tvalue = byteAt(addr);\n\tvalueOop = interpreterProxy->positive32BitIntegerFor(value);\n\treturn interpreterProxy->popthenPush(2, valueOop);\n}\n\n\n/*\tStore an unsigned integer into 8 bits starting at the given byte offset\n\t(little endian).\n */\n/*\t<Alien> unsignedByteAt: index <Integer> put: value <Integer> ^<Integer>\n\t<primitive: 'primUnsignedByteAtPut' error: errorCode module: 'IA32ABI'> */\n\nEXPORT(sqInt)\nprimUnsignedByteAtPut(void)\n{\n    sqInt addr;\n    sqInt byteOffset;\n    sqInt dataSize;\n    sqInt rcvr;\n    sqInt value;\n    sqInt valueOop;\n\n\tvalueOop = interpreterProxy->stackValue(0);\n\tbyteOffset = (interpreterProxy->stackPositiveMachineIntegerValue(1)) - 1;\n\trcvr = interpreterProxy->stackObjectValue(2);\n\tvalue = interpreterProxy->positive32BitValueOf(valueOop);\n\tif ((interpreterProxy->failed())\n\t || (value > 255)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!((((dataSize = longAt(rcvr + BaseHeaderSize))) == 0)\n\t\t || (((((usqInt)byteOffset)) + 1) <= (abs(dataSize))))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadIndex);\n\t}\n\taddr = (((longAt(rcvr + BaseHeaderSize)) > 0\n\t? (rcvr + BaseHeaderSize) + BytesPerOop\n\t: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;\n\tbyteAtput(addr, value);\n\treturn interpreterProxy->popthenPush(3, valueOop);\n}\n\n\n/*\tAnswer the unsigned 32-bit integer starting at the given byte offset\n\t(little endian).\n */\n/*\t<Alien> unsignedLongAt: index <Integer> ^<Integer>\n\t<primitive: 'primUnsignedLongAt' error: errorCode module: 'IA32ABI'> */\n\nEXPORT(sqInt)\nprimUnsignedLongAt(void)\n{\n    sqInt addr;\n    sqInt byteOffset;\n    sqInt dataSize;\n    sqInt rcvr;\n    sqInt value;\n    sqInt valueOop;\n\n\tbyteOffset = (interpreterProxy->stackPositiveMachineIntegerValue(0)) - 1;\n\trcvr = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!((((dataSize = longAt(rcvr + BaseHeaderSize))) == 0)\n\t\t || (((((usqInt)byteOffset)) + 4) <= (abs(dataSize))))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadIndex);\n\t}\n\taddr = (((longAt(rcvr + BaseHeaderSize)) > 0\n\t? (rcvr + BaseHeaderSize) + BytesPerOop\n\t: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;\n\tvalue = longAt(addr);\n\tvalueOop = interpreterProxy->positive32BitIntegerFor(value);\n\treturn interpreterProxy->popthenPush(2, valueOop);\n}\n\n\n/*\tStore an unsigned integer into 32 bits starting at the given byte offset\n\t(little endian).\n */\n/*\t<Alien> unsignedLongAt: index <Integer> put: value <Integer> ^<Integer>\n\t<primitive: 'primUnsignedLongAtPut' error: errorCode module: 'IA32ABI'> */\n\nEXPORT(sqInt)\nprimUnsignedLongAtPut(void)\n{\n    sqInt addr;\n    sqInt byteOffset;\n    sqInt dataSize;\n    sqInt rcvr;\n    sqInt value;\n    sqInt valueOop;\n\n\tvalueOop = interpreterProxy->stackValue(0);\n\tbyteOffset = (interpreterProxy->stackPositiveMachineIntegerValue(1)) - 1;\n\trcvr = interpreterProxy->stackObjectValue(2);\n\tvalue = interpreterProxy->positive32BitValueOf(valueOop);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!((((dataSize = longAt(rcvr + BaseHeaderSize))) == 0)\n\t\t || (((((usqInt)byteOffset)) + 4) <= (abs(dataSize))))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadIndex);\n\t}\n\taddr = (((longAt(rcvr + BaseHeaderSize)) > 0\n\t? (rcvr + BaseHeaderSize) + BytesPerOop\n\t: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;\n\tlongAtput(addr, value);\n\treturn interpreterProxy->popthenPush(3, valueOop);\n}\n\n\n/*\tAnswer the unsigned 64-bit integer starting at the given byte offset\n\t(little endian).\n */\n/*\t<Alien>unsignedLongLongAt: index <Integer> ^<Integer>\n\t<primitive: 'primUnsignedLongLongAt' error: errorCode module: 'IA32ABI'> */\n\nEXPORT(sqInt)\nprimUnsignedLongLongAt(void)\n{\n    sqInt addr;\n    sqInt byteOffset;\n    sqInt dataSize;\n    sqInt rcvr;\n    unsigned long long unsignedlonglongvalue;\n    unsigned long long *unsignedlonglongvaluePtr;\n    sqInt valueOop;\n\n\tunsignedlonglongvaluePtr = 0;\n\t;\n\tbyteOffset = (interpreterProxy->stackPositiveMachineIntegerValue(0)) - 1;\n\trcvr = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!((((dataSize = longAt(rcvr + BaseHeaderSize))) == 0)\n\t\t || (((((usqInt)byteOffset)) + 8) <= (abs(dataSize))))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadIndex);\n\t}\n\taddr = (((longAt(rcvr + BaseHeaderSize)) > 0\n\t? (rcvr + BaseHeaderSize) + BytesPerOop\n\t: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;\n\tunsignedlonglongvaluePtr = ((unsigned long long*) addr);\n\tunsignedlonglongvalue = *unsignedlonglongvaluePtr;\n\tvalueOop = interpreterProxy->positive64BitIntegerFor(unsignedlonglongvalue);\n\treturn interpreterProxy->popthenPush(2, valueOop);\n}\n\n\n/*\tStore a signed integer into 64 bits starting at the given byte offset\n\t(little endian).\n */\n/*\t<Alien> unsignedLongLongAt: index <Integer> put: value <Integer>\n\t^<Integer> <primitive: 'primUnSignedLongLongAtPut' error: errorCode\n\tmodule: 'IA32ABI'> */\n\nEXPORT(sqInt)\nprimUnsignedLongLongAtPut(void)\n{\n    sqInt addr;\n    sqInt byteOffset;\n    sqInt dataSize;\n    sqInt rcvr;\n    unsigned long long unsignedlonglongvalue;\n    unsigned long long *unsignedlonglongvaluePtr;\n    sqInt valueOop;\n\n\tunsignedlonglongvaluePtr = 0;\n\t;\n\tvalueOop = interpreterProxy->stackValue(0);\n\tbyteOffset = (interpreterProxy->stackPositiveMachineIntegerValue(1)) - 1;\n\trcvr = interpreterProxy->stackObjectValue(2);\n\tunsignedlonglongvalue = interpreterProxy->positive64BitValueOf(valueOop);\n\t;\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!((((dataSize = longAt(rcvr + BaseHeaderSize))) == 0)\n\t\t || (((((usqInt)byteOffset)) + 8) <= (abs(dataSize))))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadIndex);\n\t}\n\taddr = (((longAt(rcvr + BaseHeaderSize)) > 0\n\t? (rcvr + BaseHeaderSize) + BytesPerOop\n\t: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;\n\tunsignedlonglongvaluePtr = ((unsigned long long*) addr);\n\t*unsignedlonglongvaluePtr = unsignedlonglongvalue;\n\treturn interpreterProxy->popthenPush(3, valueOop);\n}\n\n\n/*\tAnswer the unsigned 16-bit integer starting at the given byte offset\n\t(little endian).\n */\n/*\t<Alien> unsignedShortAt: index <Integer> ^<Integer>\n\t<primitive: 'primUnsignedShortAt' error: errorCode module: 'IA32ABI'> */\n\nEXPORT(sqInt)\nprimUnsignedShortAt(void)\n{\n    sqInt addr;\n    sqInt byteOffset;\n    sqInt dataSize;\n    sqInt rcvr;\n    unsigned short value;\n    sqInt valueOop;\n\n\tbyteOffset = (interpreterProxy->stackPositiveMachineIntegerValue(0)) - 1;\n\trcvr = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!((((dataSize = longAt(rcvr + BaseHeaderSize))) == 0)\n\t\t || (((((usqInt)byteOffset)) + 2) <= (abs(dataSize))))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadIndex);\n\t}\n\taddr = (((longAt(rcvr + BaseHeaderSize)) > 0\n\t? (rcvr + BaseHeaderSize) + BytesPerOop\n\t: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;\n\tvalue = shortAt(addr);\n\tvalueOop = interpreterProxy->positive32BitIntegerFor(value);\n\treturn interpreterProxy->popthenPush(2, valueOop);\n}\n\n\n/*\tStore an unsigned integer into 16 bits starting at the given byte offset\n\t(little endian).\n */\n/*\t<Alien> unsignedShortAt: index <Integer> put: value <Integer> ^<Integer>\n\t<primitive: 'primUnsignedShortAtPut' error: errorCode module: 'IA32ABI'> */\n\nEXPORT(sqInt)\nprimUnsignedShortAtPut(void)\n{\n    sqInt addr;\n    sqInt byteOffset;\n    sqInt dataSize;\n    sqInt rcvr;\n    sqInt value;\n    sqInt valueOop;\n\n\tvalueOop = interpreterProxy->stackValue(0);\n\tbyteOffset = (interpreterProxy->stackPositiveMachineIntegerValue(1)) - 1;\n\trcvr = interpreterProxy->stackObjectValue(2);\n\tvalue = interpreterProxy->positive32BitValueOf(valueOop);\n\tif ((interpreterProxy->failed())\n\t || (value > 65535)) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!((((dataSize = longAt(rcvr + BaseHeaderSize))) == 0)\n\t\t || (((((usqInt)byteOffset)) + 2) <= (abs(dataSize))))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadIndex);\n\t}\n\taddr = (((longAt(rcvr + BaseHeaderSize)) > 0\n\t? (rcvr + BaseHeaderSize) + BytesPerOop\n\t: longAt((rcvr + BaseHeaderSize) + BytesPerOop))) + byteOffset;\n\tshortAtput(addr, value);\n\treturn interpreterProxy->popthenPush(3, valueOop);\n}\n\n\n/*\tCall a foreign function that answers a double-precision floating-point\n\tresult in %f0\n\taccording to IA32-ish ABI rules. The primitive will have a signature of\n\tthe form\n\tfunctionAddress <Alien> primFFICallResult: result <Alien|Object>\n\twithArguments: args <Array of: Alien | Integer> ^<Alien>\n\t<primitive: 'primVarArgsCallOutDoubleReturn' error: errorCode module:\n\t'IA32ABI'>. Answer result. If result is an Alien the value answered by the\n\tcall will be assigned to result.\n */\n\nEXPORT(sqInt)\nprimVarArgsCallOutDoubleReturn(void)\n{\n    sqInt array;\n    sqInt errCode;\n    sqInt result;\n\n\tarray = interpreterProxy->stackValue(0);\n\tif (!(interpreterProxy->isArray(array))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\terrCode = callIA32DoubleReturn(interpreterProxy->firstIndexableField(array),\t/* arg vec */\n\t\t\t\t\t\t\t\t\t\t\t\t\tinterpreterProxy->stSizeOf(array)\t\t\t/* nargs */,\n\t\t\t\t\t\t\t\t\t\t\t\t\t2\t\t\t\t\t\t\t\t\t\t\t/* funcOffset*/,\n\t\t\t\t\t\t\t\t\t\t\t\t\t1\t\t\t\t\t\t\t\t\t\t\t/* resultOffset */);\n\tif (errCode != 0) {\n\t\treturn interpreterProxy->primitiveFailFor(errCode);\n\t}\n\tresult = interpreterProxy->stackValue(1);\n\tinterpreterProxy->popthenPush(3, result);\n}\n\n\n/*\tCall a foreign function that answers a single-precision floating-point\n\tresult in %f0\n\taccording to IA32-ish ABI rules. The primitive will have a signature of\n\tthe form\n\tfunctionAddress <Alien> primFFICallResult: result <Alien|Object>\n\twithArguments: args <Array of: Alien | Integer> ^<Alien>\n\t<primitive: 'primVarArgsCallOutFloatReturn' error: errorCode module:\n\t'IA32ABI'>. Answer result. If result is an Alien the value answered by the\n\tcall will be assigned to result.\n */\n\nEXPORT(sqInt)\nprimVarArgsCallOutFloatReturn(void)\n{\n    sqInt array;\n    sqInt errCode;\n    sqInt result;\n\n\tarray = interpreterProxy->stackValue(0);\n\tif (!(interpreterProxy->isArray(array))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\terrCode = callIA32FloatReturn(interpreterProxy->firstIndexableField(array),\t/* arg vec */\n\t\t\t\t\t\t\t\t\t\t\t\tinterpreterProxy->stSizeOf(array)\t\t\t\t/* nargs */,\n\t\t\t\t\t\t\t\t\t\t\t\t2\t\t\t\t\t\t\t\t\t\t\t\t/* funcOffset*/,\n\t\t\t\t\t\t\t\t\t\t\t\t1\t\t\t\t\t\t\t\t\t\t\t\t/* resultOffset */);\n\tif (errCode != 0) {\n\t\treturn interpreterProxy->primitiveFailFor(errCode);\n\t}\n\tresult = interpreterProxy->stackValue(1);\n\tinterpreterProxy->popthenPush(3, result);\n}\n\n\n/*\tCall a foreign function that answers an integral result in %eax (and\n\tpossibly %edx)\n\taccording to IA32-ish ABI rules. The primitive will have a signature of\n\tthe form\n\tfunctionAddress <Alien> primFFICallResult: result <Alien|Object>\n\twithArguments: args <Array of: Alien | Integer> ^<Alien>\n\t<primitive: 'primVarArgsCallOutIntegralReturn' error: errorCode module:\n\t'IA32ABI'>. Answer result. If result is an Alien the value answered by the\n\tcall will be assigned to result.\n */\n\nEXPORT(sqInt)\nprimVarArgsCallOutIntegralReturn(void)\n{\n    sqInt array;\n    sqInt errCode;\n    sqInt result;\n\n\tarray = interpreterProxy->stackValue(0);\n\tif (!(interpreterProxy->isArray(array))) {\n\t\treturn interpreterProxy->primitiveFailFor(PrimErrBadArgument);\n\t}\n\terrCode = callIA32IntegralReturn(interpreterProxy->firstIndexableField(array),\t/* arg vec */\n\t\t\t\t\t\t\t\t\t\t\t\t\tinterpreterProxy->stSizeOf(array)\t\t\t/* nargs */,\n\t\t\t\t\t\t\t\t\t\t\t\t\t2\t\t\t\t\t\t\t\t\t\t\t/* funcOffset*/,\n\t\t\t\t\t\t\t\t\t\t\t\t\t1\t\t\t\t\t\t\t\t\t\t\t/* resultOffset */);\n\tif (errCode != 0) {\n\t\treturn interpreterProxy->primitiveFailFor(errCode);\n\t}\n\tresult = interpreterProxy->stackValue(1);\n\tinterpreterProxy->popthenPush(3, result);\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n    sqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\n/*\tAnswer the first field of rcvr which is assumed to be an Alien of at least\n\t8 bytes\n */\n\nstatic sqInt\nsizeField(sqInt rcvr)\n{\n\treturn longAt(rcvr + BaseHeaderSize);\n}\n\n\n/*\t<byte indexable oop> ^<Integer> */\n/*\tAnswer the start of rcvr's data, given that it is not an alien. */\n\nstatic sqInt\nstartOfByteData(sqInt rcvr)\n{\n\treturn rcvr + BaseHeaderSize;\n}\n\n\n/*\t<Alien oop> ^<Integer> */\n/*\tAnswer the start of rcvr's data. For direct aliens this is the address of\n\tthe second field. For indirect and pointer aliens it is what the second\n\tfield points to. */\n\nstatic sqInt\nstartOfData(sqInt rcvr)\n{\n\treturn ((longAt(rcvr + BaseHeaderSize)) > 0\n\t\t? (rcvr + BaseHeaderSize) + BytesPerOop\n\t\t: longAt((rcvr + BaseHeaderSize) + BytesPerOop));\n}\n\n\n/*\t<Alien oop> */\n/*\t<Integer> ^<Integer> */\n/*\tAnswer the start of rcvr's data. For direct aliens this is the address of\n\tthe second field. For indirect and pointer aliens it is what the second\n\tfield points to. */\n\nstatic sqInt\nstartOfDatawithSize(sqInt rcvr, sqInt sizeField)\n{\n\treturn (sizeField > 0\n\t\t? (rcvr + BaseHeaderSize) + BytesPerOop\n\t\t: longAt((rcvr + BaseHeaderSize) + BytesPerOop));\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* IA32ABI_exports[][3] = {\n\t{\"IA32ABI\", \"getModuleName\", (void*)getModuleName},\n\t{\"IA32ABI\", \"isAlien\", (void*)isAlien},\n\t{\"IA32ABI\", \"primAddressField\", (void*)primAddressField},\n\t{\"IA32ABI\", \"primAddressFieldPut\", (void*)primAddressFieldPut},\n\t{\"IA32ABI\", \"primAlienReplace\", (void*)primAlienReplace},\n\t{\"IA32ABI\", \"primAllocateExecutablePage\", (void*)primAllocateExecutablePage},\n\t{\"IA32ABI\", \"primBoxedFree\", (void*)primBoxedFree},\n\t{\"IA32ABI\", \"primCallOutDoubleReturn\", (void*)primCallOutDoubleReturn},\n\t{\"IA32ABI\", \"primCallOutFloatReturn\", (void*)primCallOutFloatReturn},\n\t{\"IA32ABI\", \"primCallOutIntegralReturn\", (void*)primCallOutIntegralReturn},\n\t{\"IA32ABI\", \"primCalloc\", (void*)primCalloc},\n\t{\"IA32ABI\", \"primDoubleAt\", (void*)primDoubleAt},\n\t{\"IA32ABI\", \"primDoubleAtPut\", (void*)primDoubleAtPut},\n\t{\"IA32ABI\", \"primFloatAt\", (void*)primFloatAt},\n\t{\"IA32ABI\", \"primFloatAtPut\", (void*)primFloatAtPut},\n\t{\"IA32ABI\", \"primFree\", (void*)primFree},\n\t{\"IA32ABI\", \"primInIOProcessEventsFlagAddress\", (void*)primInIOProcessEventsFlagAddress},\n\t{\"IA32ABI\", \"primInLibraryFindSymbol\", (void*)primInLibraryFindSymbol},\n\t{\"IA32ABI\", \"primLoadLibrary\", (void*)primLoadLibrary},\n\t{\"IA32ABI\", \"primMalloc\", (void*)primMalloc},\n\t{\"IA32ABI\", \"primReturnAsFromContextThrough\", (void*)primReturnAsFromContextThrough},\n\t{\"IA32ABI\", \"primReturnFromContextThrough\", (void*)primReturnFromContextThrough},\n\t{\"IA32ABI\", \"primSignedByteAt\", (void*)primSignedByteAt},\n\t{\"IA32ABI\", \"primSignedByteAtPut\", (void*)primSignedByteAtPut},\n\t{\"IA32ABI\", \"primSignedLongAt\", (void*)primSignedLongAt},\n\t{\"IA32ABI\", \"primSignedLongAtPut\", (void*)primSignedLongAtPut},\n\t{\"IA32ABI\", \"primSignedLongLongAt\", (void*)primSignedLongLongAt},\n\t{\"IA32ABI\", \"primSignedLongLongAtPut\", (void*)primSignedLongLongAtPut},\n\t{\"IA32ABI\", \"primSignedShortAt\", (void*)primSignedShortAt},\n\t{\"IA32ABI\", \"primSignedShortAtPut\", (void*)primSignedShortAtPut},\n\t{\"IA32ABI\", \"primSizeField\", (void*)primSizeField},\n\t{\"IA32ABI\", \"primSizeFieldPut\", (void*)primSizeFieldPut},\n\t{\"IA32ABI\", \"primStrlenFromStartIndex\", (void*)primStrlenFromStartIndex},\n\t{\"IA32ABI\", \"primStrlenThroughPointerAtIndex\", (void*)primStrlenThroughPointerAtIndex},\n\t{\"IA32ABI\", \"primThunkEntryAddress\", (void*)primThunkEntryAddress},\n\t{\"IA32ABI\", \"primUnsignedByteAt\", (void*)primUnsignedByteAt},\n\t{\"IA32ABI\", \"primUnsignedByteAtPut\", (void*)primUnsignedByteAtPut},\n\t{\"IA32ABI\", \"primUnsignedLongAt\", (void*)primUnsignedLongAt},\n\t{\"IA32ABI\", \"primUnsignedLongAtPut\", (void*)primUnsignedLongAtPut},\n\t{\"IA32ABI\", \"primUnsignedLongLongAt\", (void*)primUnsignedLongLongAt},\n\t{\"IA32ABI\", \"primUnsignedLongLongAtPut\", (void*)primUnsignedLongLongAtPut},\n\t{\"IA32ABI\", \"primUnsignedShortAt\", (void*)primUnsignedShortAt},\n\t{\"IA32ABI\", \"primUnsignedShortAtPut\", (void*)primUnsignedShortAtPut},\n\t{\"IA32ABI\", \"primVarArgsCallOutDoubleReturn\", (void*)primVarArgsCallOutDoubleReturn},\n\t{\"IA32ABI\", \"primVarArgsCallOutFloatReturn\", (void*)primVarArgsCallOutFloatReturn},\n\t{\"IA32ABI\", \"primVarArgsCallOutIntegralReturn\", (void*)primVarArgsCallOutIntegralReturn},\n\t{\"IA32ABI\", \"setInterpreter\", (void*)setInterpreter},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.c",
    "content": "/* Automatically generated by\n\tSmartSyntaxPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tJPEGReadWriter2Plugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"JPEGReadWriter2Plugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"JPEGReadWriter2Plugin.h\"\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n\n/*** Function Prototypes ***/\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nEXPORT(sqInt) initialiseModule(void);\nstatic sqInt msg(char *s);\nEXPORT(sqInt) primImageHeight(void);\nEXPORT(sqInt) primImageWidth(void);\nEXPORT(sqInt) primJPEGCompressStructSize(void);\nEXPORT(sqInt) primJPEGDecompressStructSize(void);\nEXPORT(sqInt) primJPEGErrorMgr2StructSize(void);\nEXPORT(sqInt) primJPEGPluginIsPresent(void);\nEXPORT(sqInt) primJPEGReadHeaderfromByteArrayerrorMgr(void);\nEXPORT(sqInt) primJPEGReadImagefromByteArrayonFormdoDitheringerrorMgr(void);\nEXPORT(sqInt) primJPEGWriteImageonByteArrayformqualityprogressiveJPEGerrorMgr(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\nEXPORT(sqInt) shutdownModule(void);\nstatic void sqAssert(sqInt aBool);\n\n\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"JPEGReadWriter2Plugin VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"JPEGReadWriter2Plugin VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\n\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nEXPORT(sqInt)\ninitialiseModule(void)\n{\n\treturn 1;\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\nEXPORT(sqInt)\nprimImageHeight(void)\n{\n\tchar *aJPEGDecompressStruct;\n\tsqInt _return_value;\n\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\n\taJPEGDecompressStruct = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t\n\t\tinterpreterProxy->success\n\t\t\t((interpreterProxy->stSizeOf(interpreterProxy->stackValue(0))) >= (sizeof(struct jpeg_decompress_struct))); \n\t\tif (interpreterProxy->failed()) return null;\n\t;\n\t_return_value = interpreterProxy->integerObjectOf((((j_decompress_ptr)aJPEGDecompressStruct)->image_height));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimImageWidth(void)\n{\n\tchar *aJPEGDecompressStruct;\n\tsqInt _return_value;\n\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\n\taJPEGDecompressStruct = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t\n\t\tinterpreterProxy->success\n\t\t\t((interpreterProxy->stSizeOf(interpreterProxy->stackValue(0))) >= (sizeof(struct jpeg_decompress_struct))); \n\t\tif (interpreterProxy->failed()) return null;\n\t;\n\t_return_value = interpreterProxy->integerObjectOf((((j_decompress_ptr)aJPEGDecompressStruct)->image_width));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimJPEGCompressStructSize(void)\n{\n\tsqInt _return_value;\n\n\t_return_value = interpreterProxy->integerObjectOf((sizeof(struct jpeg_compress_struct)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimJPEGDecompressStructSize(void)\n{\n\tsqInt _return_value;\n\n\t_return_value = interpreterProxy->integerObjectOf((sizeof(struct jpeg_decompress_struct)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimJPEGErrorMgr2StructSize(void)\n{\n\tsqInt _return_value;\n\n\t_return_value = interpreterProxy->integerObjectOf((sizeof(struct error_mgr2)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimJPEGPluginIsPresent(void)\n{\n\tsqInt _return_value;\n\n\t_return_value = (1? interpreterProxy->trueObject(): interpreterProxy->falseObject());\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimJPEGReadHeaderfromByteArrayerrorMgr(void)\n{\n\tchar *aJPEGDecompressStruct;\n\tchar *aJPEGErrorMgr2Struct;\n\tj_decompress_ptr  pcinfo;\n\terror_ptr2  pjerr;\n\tchar *source;\n\tsqInt sourceSize;\n\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(2)));\n\taJPEGDecompressStruct = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(2))));\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(1)));\n\tsource = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(1))));\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\n\taJPEGErrorMgr2Struct = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tpcinfo = null;\n\tpjerr = null;\n\tsourceSize = null;\n\tpcinfo;\n\tpjerr;\n\tsourceSize;\n\t\n\t\tinterpreterProxy->success\n\t\t\t((interpreterProxy->stSizeOf(interpreterProxy->stackValue(2))) >= (sizeof(struct jpeg_decompress_struct)));\n\t\tinterpreterProxy->success\n\t\t\t((interpreterProxy->stSizeOf(interpreterProxy->stackValue(0))) >= (sizeof(struct error_mgr2))); \n\t\tif (interpreterProxy->failed()) return null;\n\t;\n\t\n\t\tsourceSize = interpreterProxy->stSizeOf(interpreterProxy->stackValue(1));\n\t\tpcinfo = (j_decompress_ptr)aJPEGDecompressStruct;\n\t\tpjerr = (error_ptr2)aJPEGErrorMgr2Struct;\n\t\tif (sourceSize) {\n\t\t\tpcinfo->err = jpeg_std_error(&pjerr->pub);\n\t\t\tpjerr->pub.error_exit = error_exit;\n\t\t\tif (setjmp(pjerr->setjmp_buffer)) {\n\t\t\t\tjpeg_destroy_decompress(pcinfo);\n\t\t\t\tsourceSize = 0;\n\t\t\t}\n\t\t\tif (sourceSize) {\n\t\t\t\tjpeg_create_decompress(pcinfo);\n\t\t\t\tjpeg_mem_src(pcinfo, source, sourceSize);\n\t\t\t\tjpeg_read_header(pcinfo, TRUE);\n\t\t\t}\n\t\t}\n\t;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(3);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimJPEGReadImagefromByteArrayonFormdoDitheringerrorMgr(void)\n{\n\tchar *aJPEGDecompressStruct;\n\tchar *aJPEGErrorMgr2Struct;\n\tsqInt b1;\n\tsqInt b2;\n\tsqInt bOff;\n\tsqInt bOff2;\n\tJSAMPARRAY  buffer;\n\tsqInt di;\n\tsqInt ditherFlag;\n\tsqInt dmi;\n\tsqInt dmo;\n\tsqInt dmv1;\n\tsqInt dmv2;\n\tsqInt form;\n\tunsigned *  formBits;\n\tsqInt formBitsAsInt;\n\tsqInt formBitsSize;\n\tsqInt formDepth;\n\tsqInt formHeight;\n\tsqInt formPitch;\n\tsqInt formPix;\n\tsqInt formWidth;\n\tsqInt g1;\n\tsqInt g2;\n\tsqInt gOff;\n\tsqInt gOff2;\n\tsqInt i;\n\tsqInt j;\n\tsqInt ok;\n\tj_decompress_ptr  pcinfo;\n\tsqInt pixPerWord;\n\terror_ptr2  pjerr;\n\tsqInt r1;\n\tsqInt r2;\n\tsqInt rOff;\n\tsqInt rOff2;\n\tsqInt rowStride;\n\tchar *source;\n\tsqInt sourceSize;\n\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(4)));\n\taJPEGDecompressStruct = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(4))));\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(3)));\n\tsource = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(3))));\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(2), \"Form\"));\n\tform = interpreterProxy->stackValue(2);\n\tditherFlag = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(1));\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\n\taJPEGErrorMgr2Struct = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tpcinfo = null;\n\tpjerr = null;\n\tbuffer = null;\n\trowStride = null;\n\tformDepth = null;\n\tformBits = null;\n\ti = null;\n\tj = null;\n\tformPix = null;\n\tok = null;\n\trOff = null;\n\tgOff = null;\n\tbOff = null;\n\trOff2 = null;\n\tgOff2 = null;\n\tbOff2 = null;\n\tsourceSize = null;\n\tr1 = null;\n\tr2 = null;\n\tg1 = null;\n\tg2 = null;\n\tb1 = null;\n\tb2 = null;\n\tdmv1 = null;\n\tdmv2 = null;\n\tdi = null;\n\tdmi = null;\n\tdmo = null;\n\tpcinfo;\n\tpjerr;\n\tbuffer;\n\trowStride;\n\tformBits;\n\tformDepth;\n\ti;\n\tj;\n\tformPix;\n\tok;\n\trOff;\n\tgOff;\n\tbOff;\n\trOff2;\n\tgOff2;\n\tbOff2;\n\tsourceSize;\n\tr1;\n\tr2;\n\tg1;\n\tg2;\n\tb1;\n\tb2;\n\tdmv1;\n\tdmv2;\n\tdi;\n\tdmi;\n\tdmo;\n\tformBits = ((unsigned *) (interpreterProxy->fetchPointerofObject(0, form)));\n\tformBitsAsInt = interpreterProxy->fetchPointerofObject(0, form);\n\n\t/* Various parameter checks */\n\n\tformDepth = interpreterProxy->fetchIntegerofObject(3, form);\n\t\n\t\tinterpreterProxy->success\n\t\t\t((interpreterProxy->stSizeOf(interpreterProxy->stackValue(4))) >= (sizeof(struct jpeg_decompress_struct)));\n\t\tinterpreterProxy->success\n\t\t\t((interpreterProxy->stSizeOf(interpreterProxy->stackValue(0))) >= (sizeof(struct error_mgr2))); \n\t\tif (interpreterProxy->failed()) return null;\n\t;\n\tformWidth = ((j_decompress_ptr)aJPEGDecompressStruct)->image_width;\n\tformHeight = ((j_decompress_ptr)aJPEGDecompressStruct)->image_height;\n\tpixPerWord = 32 / formDepth;\n\tformPitch = ((formWidth + (pixPerWord - 1)) / pixPerWord) * 4;\n\tformBitsSize = interpreterProxy->byteSizeOf(formBitsAsInt);\n\tinterpreterProxy->success((interpreterProxy->isWordsOrBytes(formBitsAsInt))\n\t && (formBitsSize == (formPitch * formHeight)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t\n\t\tsourceSize = interpreterProxy->stSizeOf(interpreterProxy->stackValue(3));\n\t\tif (sourceSize == 0) {\n\t\t\tinterpreterProxy->success(false);\n\t\t\treturn null;\n\t\t}\n\t\tpcinfo = (j_decompress_ptr)aJPEGDecompressStruct;\n\t\tpjerr = (error_ptr2)aJPEGErrorMgr2Struct;\n\t\tpcinfo->err = jpeg_std_error(&pjerr->pub);\n\t\tpjerr->pub.error_exit = error_exit;\n\t\tok = 1;\n\t\tif (setjmp(pjerr->setjmp_buffer)) {\n\t\t\tjpeg_destroy_decompress(pcinfo);\n\t\t\tok = 0;\n\t\t}\n\t\tif (ok) {\n\t\t\tok = jpeg_mem_src_newLocationOfData(pcinfo, source, sourceSize);\n\t\t\tif (ok) {\n\t\t\t\t/* Dither Matrix taken from Form>>orderedDither32To16, but rewritten for this method. */\n\t\t\t\tint ditherMatrix1[] = { 2, 0, 14, 12, 1, 3, 13, 15 };\n\t\t\t\tint ditherMatrix2[] = { 10, 8, 6, 4, 9, 11, 5, 7 };\n \t\t\t\tjpeg_start_decompress(pcinfo);\n\t\t\t\trowStride = pcinfo->output_width * pcinfo->output_components;\n\t\t\t\tif (pcinfo->out_color_components == 3) {\n\t\t\t\t\trOff = 0; gOff = 1; bOff = 2;\n\t\t\t\t\trOff2 = 3; gOff2 = 4; bOff2 = 5;\n\t\t\t\t} else {\n\t\t\t\t\trOff = 0; gOff = 0; bOff = 0;\n\t\t\t\t\trOff2 = 1; gOff2 = 1; bOff2 = 1;\n\t\t\t\t}\n\t\t\t\t/* Make a one-row-high sample array that will go away when done with image */\n\t\t\t\tbuffer = (*(pcinfo->mem)->alloc_sarray)\n\t\t\t\t\t((j_common_ptr) pcinfo, JPOOL_IMAGE, rowStride, 1);\n\n\t\t\t\t/* Step 6: while (scan lines remain to be read) */\n\t\t\t\t/*           jpeg_read_scanlines(...); */\n\n\t\t\t\t/* Here we use the library state variable cinfo.output_scanline as the\n\t\t\t\t * loop counter, so that we dont have to keep track ourselves.\n\t\t\t\t */\n\t\t\t\twhile (pcinfo->output_scanline < pcinfo->output_height) {\n\t\t\t\t\t/* jpeg_read_scanlines expects an array of pointers to scanlines.\n\t\t\t\t\t * Here the array is only one element long, but you could ask for\n\t\t\t\t\t * more than one scanline at a time if thats more convenient.\n\t\t\t\t\t */\n\t\t\t\t\t(void) jpeg_read_scanlines(pcinfo, buffer, 1);\n\n\t\t\t\t\tswitch (formDepth) {\n\t\t\t\t\t\tcase 32:\n\t\t\t\t\t\t\tfor(i = 0, j = 1; i < rowStride; i +=(pcinfo->out_color_components), j++) {\n\t\t\t\t\t\t\t\tformPix = (255 << 24) | (buffer[0][i+rOff] << 16) | (buffer[0][i+gOff] << 8) | buffer[0][i+bOff];\n\t\t\t\t\t\t\t\tif (formPix == 0) formPix = 1;\n\t\t\t\t\t\t\t\tformBits [ ((pcinfo->output_scanline - 1) * (pcinfo->image_width)) + j ] = formPix;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 16:\n\t\t\t\t\t\t\tfor(i = 0, j = 1; i < rowStride; i +=(pcinfo->out_color_components*2), j++) {\n\t\t\t\t\t\t\t\tr1 = buffer[0][i+rOff];\n\t\t\t\t\t\t\t\tr2 = buffer[0][i+rOff2];\n\t\t\t\t\t\t\t\tg1 = buffer[0][i+gOff];\n\t\t\t\t\t\t\t\tg2 = buffer[0][i+gOff2];\n\t\t\t\t\t\t\t\tb1 = buffer[0][i+bOff];\n\t\t\t\t\t\t\t\tb2 = buffer[0][i+bOff2];\n\n\t\t\t\t\t\t\t\tif (!ditherFlag) {\n\t\t\t\t\t\t\t\t\tr1 = r1 >> 3;\n\t\t\t\t\t\t\t\t\tr2 = r2 >> 3;\n\t\t\t\t\t\t\t\t\tg1 = g1 >> 3;\n\t\t\t\t\t\t\t\t\tg2 = g2 >> 3;\n\t\t\t\t\t\t\t\t\tb1 = b1 >> 3;\n\t\t\t\t\t\t\t\t\tb2 = b2 >> 3;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t/* Do 4x4 ordered dithering. Taken from Form>>orderedDither32To16 */\n\t\t\t\t\t\t\t\t\tdmv1 = ditherMatrix1[ ((pcinfo->output_scanline & 3 )<< 1) | (j&1) ];\n\t\t\t\t\t\t\t\t\tdmv2 = ditherMatrix2[ ((pcinfo->output_scanline & 3 )<< 1) | (j&1) ];\n\n\t\t\t\t\t\t\t\t\tdi = (r1 * 496) >> 8; dmi = di & 15; dmo = di >> 4;\n\t\t\t\t\t\t\t\t\tif(dmv1 < dmi) { r1 = dmo+1; } else { r1 = dmo; };\n\t\t\t\t\t\t\t\t\tdi = (g1 * 496) >> 8; dmi = di & 15; dmo = di >> 4;\n\t\t\t\t\t\t\t\t\tif(dmv1 < dmi) { g1 = dmo+1; } else { g1 = dmo; };\n\t\t\t\t\t\t\t\t\tdi = (b1 * 496) >> 8; dmi = di & 15; dmo = di >> 4;\n\t\t\t\t\t\t\t\t\tif(dmv1 < dmi) { b1 = dmo+1; } else { b1 = dmo; };\n\n\t\t\t\t\t\t\t\t\tdi = (r2 * 496) >> 8; dmi = di & 15; dmo = di >> 4;\n\t\t\t\t\t\t\t\t\tif(dmv2 < dmi) { r2 = dmo+1; } else { r2 = dmo; };\n\t\t\t\t\t\t\t\t\tdi = (g2 * 496) >> 8; dmi = di & 15; dmo = di >> 4;\n\t\t\t\t\t\t\t\t\tif(dmv2 < dmi) { g2 = dmo+1; } else { g2 = dmo; };\n\t\t\t\t\t\t\t\t\tdi = (b2 * 496) >> 8; dmi = di & 15; dmo = di >> 4;\n\t\t\t\t\t\t\t\t\tif(dmv2 < dmi) { b2 = dmo+1; } else { b2 = dmo; };\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tformPix = (r1 << 10) | (g1 << 5) | b1;\n\t\t\t\t\t\t\t\tif (!formPix) formPix = 1;\n\t\t\t\t\t\t\t\tformPix = (formPix << 16) | (r2 << 10) | (g2 << 5) | b2;\n\t\t\t\t\t\t\t\tif (!(formPix & 65535)) formPix = formPix | 1;\n\t\t\t\t\t\t\t\tformBits [ ((pcinfo->output_scanline - 1) * (pcinfo->image_width)) / 2 + j ] = formPix;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tjpeg_finish_decompress(pcinfo);\n\t\t\t}\n\t\t\tjpeg_destroy_decompress(pcinfo);\n\t\t}\n\t;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(5);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimJPEGWriteImageonByteArrayformqualityprogressiveJPEGerrorMgr(void)\n{\n\tchar *aJPEGCompressStruct;\n\tchar *aJPEGErrorMgr2Struct;\n\tJSAMPARRAY  buffer;\n\tchar *destination;\n\tunsigned int destinationSize;\n\tsqInt form;\n\tunsigned *  formBits;\n\tsqInt formBitsAsInt;\n\tsqInt formBitsSize;\n\tsqInt formDepth;\n\tsqInt formHeight;\n\tsqInt formPitch;\n\tsqInt formPix;\n\tsqInt formWidth;\n\tsqInt i;\n\tsqInt j;\n\tj_compress_ptr  pcinfo;\n\tsqInt pixPerWord;\n\terror_ptr2  pjerr;\n\tsqInt progressiveFlag;\n\tsqInt quality;\n\tsqInt rowStride;\n\tsqInt _return_value;\n\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(5)));\n\taJPEGCompressStruct = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(5))));\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(4)));\n\tdestination = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(4))));\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(3), \"Form\"));\n\tform = interpreterProxy->stackValue(3);\n\tquality = interpreterProxy->stackIntegerValue(2);\n\tprogressiveFlag = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(1));\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\n\taJPEGErrorMgr2Struct = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tpcinfo = null;\n\tpjerr = null;\n\tbuffer = null;\n\trowStride = null;\n\tformBits = null;\n\tformWidth = null;\n\tformHeight = null;\n\tformDepth = null;\n\ti = null;\n\tj = null;\n\tformPix = null;\n\tdestinationSize = null;\n\tpcinfo;\n\tpjerr;\n\tbuffer;\n\trowStride;\n\tformBits;\n\tformWidth;\n\tformHeight;\n\tformDepth;\n\ti;\n\tj;\n\tformPix;\n\tdestinationSize;\n\tformBits = ((unsigned *) (interpreterProxy->fetchPointerofObject(0, form)));\n\tformBitsAsInt = interpreterProxy->fetchPointerofObject(0, form);\n\tformWidth = interpreterProxy->fetchIntegerofObject(1, form);\n\tformHeight = interpreterProxy->fetchIntegerofObject(2, form);\n\n\t/* Various parameter checks */\n\n\tformDepth = interpreterProxy->fetchIntegerofObject(3, form);\n\t\n\t\tinterpreterProxy->success\n\t\t\t((interpreterProxy->stSizeOf(interpreterProxy->stackValue(5))) >= (sizeof(struct jpeg_compress_struct)));\n\t\tinterpreterProxy->success\n\t\t\t((interpreterProxy->stSizeOf(interpreterProxy->stackValue(0))) >= (sizeof(struct error_mgr2))); \n\t\tif (interpreterProxy->failed()) return null;\n\t;\n\tpixPerWord = 32 / formDepth;\n\tformPitch = ((formWidth + (pixPerWord - 1)) / pixPerWord) * 4;\n\tformBitsSize = interpreterProxy->byteSizeOf(formBitsAsInt);\n\tinterpreterProxy->success((interpreterProxy->isWordsOrBytes(formBitsAsInt))\n\t && (formBitsSize == (formPitch * formHeight)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t\n\t\tdestinationSize = interpreterProxy->stSizeOf(interpreterProxy->stackValue(4));\n\t\tpcinfo = (j_compress_ptr)aJPEGCompressStruct;\n\t\tpjerr = (error_ptr2)aJPEGErrorMgr2Struct;\n\t\tif (destinationSize) {\n\t\t\tpcinfo->err = jpeg_std_error(&pjerr->pub);\n\t\t\tpjerr->pub.error_exit = error_exit;\n\t\t\tif (setjmp(pjerr->setjmp_buffer)) {\n\t\t\t\tjpeg_destroy_compress(pcinfo);\n\t\t\t\tdestinationSize = 0;\n\t\t\t}\n\t\t\tif (destinationSize) {\n\t\t\t\tjpeg_create_compress(pcinfo);\n\t\t\t\tjpeg_mem_dest(pcinfo, destination, &destinationSize);\n\t\t\t\tpcinfo->image_width = formWidth;\n\t\t\t\tpcinfo->image_height = formHeight;\n\t\t\t\tpcinfo->input_components = 3;\n\t\t\t\tpcinfo->in_color_space = JCS_RGB;\n\t\t\t\tjpeg_set_defaults(pcinfo);\n\t\t\t\tif (quality > 0)\n\t\t\t\t\tjpeg_set_quality (pcinfo, quality, 1);\n\t\t\t\tif (progressiveFlag)\n\t\t\t\t\tjpeg_simple_progression(pcinfo);\n\t\t\t\tjpeg_start_compress(pcinfo, TRUE);\n\t\t\t\trowStride = formWidth * 3;\n\n\t\t\t\t/* Make a one-row-high sample array that will go away \n\t\t\t\t  when done with image */\n\t\t\t\tbuffer = (*(pcinfo->mem)->alloc_sarray)\n\t\t\t\t\t((j_common_ptr) pcinfo, JPOOL_IMAGE, rowStride, 1);\n\n\t\t\t\twhile (pcinfo->next_scanline < pcinfo->image_height) {\n\t\t\t\t\tswitch (formDepth) {\n\t\t\t\t\t\tcase 32:\n\t\t\t\t\t\t\tfor(i = 0, j = 1; i < rowStride; i +=3, j++) {\n\t\t\t\t\t\t\t\tformPix = formBits [ ((pcinfo->next_scanline) * formWidth) + j ];\n\t\t\t\t\t\t\t\tbuffer[0][i] = (formPix >> 16) & 255;\n\t\t\t\t\t\t\t\tbuffer[0][i+1] = (formPix >> 8) & 255;\n\t\t\t\t\t\t\t\tbuffer[0][i+2] = formPix & 255;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 16:\n\t\t\t\t\t\t\tfor(i = 0, j = 1; i < rowStride; i +=6, j++) {\n\t\t\t\t\t\t\t\tformPix = formBits [ ((pcinfo->next_scanline) * formWidth) / 2 + j ];\n\t\t\t\t\t\t\t\tbuffer[0][i] = (formPix >> 23) & 248;\n\t\t\t\t\t\t\t\tbuffer[0][i+1] = (formPix >> 18) & 248;\n\t\t\t\t\t\t\t\tbuffer[0][i+2] = (formPix >> 13) & 248;\n\t\t\t\t\t\t\t\tbuffer[0][i+3] = (formPix >> 7) & 248;\n\t\t\t\t\t\t\t\tbuffer[0][i+4] = (formPix >> 2) & 248;\n\t\t\t\t\t\t\t\tbuffer[0][i+5] = (formPix << 3) & 248;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t(void) jpeg_write_scanlines(pcinfo, buffer, 1);\n\n\t\t\t\t}\n\t\t\t\tjpeg_finish_compress(pcinfo);\n\t\t\t\tjpeg_destroy_compress(pcinfo);\n\t\t\t}\n\t\t}\n\t;\n\t_return_value = interpreterProxy->integerObjectOf((destinationSize));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(7, _return_value);\n\treturn null;\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n\tsqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\nEXPORT(sqInt)\nshutdownModule(void)\n{\n\treturn 1;\n}\n\nstatic void\nsqAssert(sqInt aBool)\n{\n\t/* missing DebugCode */;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* JPEGReadWriter2Plugin_exports[][3] = {\n\t{\"JPEGReadWriter2Plugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"JPEGReadWriter2Plugin\", \"initialiseModule\", (void*)initialiseModule},\n\t{\"JPEGReadWriter2Plugin\", \"primImageHeight\", (void*)primImageHeight},\n\t{\"JPEGReadWriter2Plugin\", \"primImageWidth\", (void*)primImageWidth},\n\t{\"JPEGReadWriter2Plugin\", \"primJPEGCompressStructSize\", (void*)primJPEGCompressStructSize},\n\t{\"JPEGReadWriter2Plugin\", \"primJPEGDecompressStructSize\", (void*)primJPEGDecompressStructSize},\n\t{\"JPEGReadWriter2Plugin\", \"primJPEGErrorMgr2StructSize\", (void*)primJPEGErrorMgr2StructSize},\n\t{\"JPEGReadWriter2Plugin\", \"primJPEGPluginIsPresent\", (void*)primJPEGPluginIsPresent},\n\t{\"JPEGReadWriter2Plugin\", \"primJPEGReadHeaderfromByteArrayerrorMgr\", (void*)primJPEGReadHeaderfromByteArrayerrorMgr},\n\t{\"JPEGReadWriter2Plugin\", \"primJPEGReadImagefromByteArrayonFormdoDitheringerrorMgr\", (void*)primJPEGReadImagefromByteArrayonFormdoDitheringerrorMgr},\n\t{\"JPEGReadWriter2Plugin\", \"primJPEGWriteImageonByteArrayformqualityprogressiveJPEGerrorMgr\", (void*)primJPEGWriteImageonByteArrayformqualityprogressiveJPEGerrorMgr},\n\t{\"JPEGReadWriter2Plugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{\"JPEGReadWriter2Plugin\", \"shutdownModule\", (void*)shutdownModule},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/JPEGReaderPlugin/JPEGReaderPlugin.c",
    "content": "/* Automatically generated by\n\tVMPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tJPEGReaderPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"JPEGReaderPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n#define BlockWidthIndex 5\n#define BlueIndex 2\n#define ConstBits 13\n#define CurrentXIndex 0\n#define CurrentYIndex 1\n#define DCTSize 8\n#define DCTSize2 64\n#define FIXn0n298631336 2446\n#define FIXn0n34414 22554\n#define FIXn0n390180644 0xC7C\n#define FIXn0n541196100 4433\n#define FIXn0n71414 46802\n#define FIXn0n765366865 6270\n#define FIXn0n899976223 7373\n#define FIXn1n175875602 9633\n#define FIXn1n40200 91881\n#define FIXn1n501321110 12299\n#define FIXn1n77200 116130\n#define FIXn1n847759065 15137\n#define FIXn1n961570560 16069\n#define FIXn2n053119869 16819\n#define FIXn2n562915447 20995\n#define FIXn3n072711026 25172\n#define GreenIndex 1\n#define HScaleIndex 2\n#define MaxBits 16\n#define MaxMCUBlocks 128\n#define MaxSample 255\n#define MCUBlockIndex 4\n#define MCUWidthIndex 8\n#define MinComponentSize 11\n#define Pass1Bits 2\n#define Pass1Div 0x800\n#define Pass2Div 0x40000\n#define PriorDCValueIndex 10\n#define RedIndex 0\n#define SampleOffset 127\n#define VScaleIndex 3\n\n\n/*** Function Prototypes ***/\nstatic sqInt cbColorComponentFrom(sqInt oop);\nstatic sqInt colorComponentBlocksfrom(int **blocks, sqInt oop);\nstatic sqInt colorComponentfrom(int *aColorComponent, sqInt oop);\nstatic sqInt colorConvertGrayscaleMCU(void);\nstatic sqInt colorConvertMCU(void);\nstatic sqInt crColorComponentFrom(sqInt oop);\nstatic sqInt decodeBlockIntocomponent(int *anArray, int *aColorComponent);\nstatic sqInt fillBuffer(void);\nstatic sqInt getBits(sqInt requestedBits);\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nstatic sqInt idctBlockIntqt(int *anArray, int *qt);\nstatic sqInt jpegDecodeValueFromsize(int *table, sqInt tableSize);\nstatic sqInt loadJPEGStreamFrom(sqInt streamOop);\nstatic sqInt msg(char *s);\nstatic sqInt nextSampleCb(void);\nstatic sqInt nextSampleCr(void);\nstatic sqInt nextSampleFromblocks(int *aComponent, int **aBlockArray);\nstatic sqInt nextSampleY(void);\nEXPORT(sqInt) primitiveColorConvertGrayscaleMCU(void);\nEXPORT(sqInt) primitiveColorConvertMCU(void);\nEXPORT(sqInt) primitiveDecodeMCU(void);\nEXPORT(sqInt) primitiveIdctInt(void);\nstatic sqInt scaleAndSignExtendinFieldWidth(sqInt aNumber, sqInt w);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\nstatic sqInt stInit(void);\nstatic sqInt storeJPEGStreamOn(sqInt streamOop);\nstatic sqInt yColorComponentFrom(sqInt oop);\n\n\n/*** Variables ***/\nstatic int *acTable;\nstatic sqInt acTableSize;\nstatic int *cbBlocks[128];\nstatic int cbComponent[11];\nstatic sqInt cbSampleStream;\nstatic int *crBlocks[128];\nstatic int crComponent[11];\nstatic sqInt crSampleStream;\nstatic int *dcTable;\nstatic sqInt dcTableSize;\nstatic sqInt ditherMask;\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic int *jpegBits;\nstatic sqInt jpegBitsSize;\nstatic int jpegNaturalOrder[64] = {\n\t0, 1, 8, 16, 9, 2, 3, 10, \n\t17, 24, 32, 25, 18, 11, 4, 5, \n\t12, 19, 26, 33, 40, 48, 41, 34, \n\t27, 20, 13, 6, 7, 14, 21, 28, \n\t35, 42, 49, 56, 57, 50, 43, 36, \n\t29, 22, 15, 23, 30, 37, 44, 51, \n\t58, 59, 52, 45, 38, 31, 39, 46, \n\t53, 60, 61, 54, 47, 55, 62, 63\n};\nstatic sqInt jsBitBuffer;\nstatic sqInt jsBitCount;\nstatic unsigned char *jsCollection;\nstatic sqInt jsPosition;\nstatic sqInt jsReadLimit;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"JPEGReaderPlugin VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"JPEGReaderPlugin VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\nstatic int *residuals;\nstatic int *yBlocks[128];\nstatic int yComponent[11];\nstatic sqInt ySampleStream;\n\n\nstatic sqInt\ncbColorComponentFrom(sqInt oop)\n{\n\treturn (colorComponentfrom(cbComponent, oop))\n\t && (colorComponentBlocksfrom(cbBlocks, oop));\n}\n\nstatic sqInt\ncolorComponentBlocksfrom(int **blocks, sqInt oop)\n{\n    sqInt arrayOop;\n    sqInt blockOop;\n    sqInt i;\n    sqInt max;\n\n\tif ((oop & 1)) {\n\t\treturn 0;\n\t}\n\tif (!(interpreterProxy->isPointers(oop))) {\n\t\treturn 0;\n\t}\n\tif ((interpreterProxy->slotSizeOf(oop)) < MinComponentSize) {\n\t\treturn 0;\n\t}\n\tarrayOop = interpreterProxy->fetchPointerofObject(MCUBlockIndex, oop);\n\tif ((arrayOop & 1)) {\n\t\treturn 0;\n\t}\n\tif (!(interpreterProxy->isPointers(arrayOop))) {\n\t\treturn 0;\n\t}\n\tmax = interpreterProxy->slotSizeOf(arrayOop);\n\tif (max > MaxMCUBlocks) {\n\t\treturn 0;\n\t}\n\tfor (i = 0; i <= (max - 1); i += 1) {\n\t\tblockOop = interpreterProxy->fetchPointerofObject(i, arrayOop);\n\t\tif ((blockOop & 1)) {\n\t\t\treturn 0;\n\t\t}\n\t\tif (!(interpreterProxy->isWords(blockOop))) {\n\t\t\treturn 0;\n\t\t}\n\t\tif (!((interpreterProxy->slotSizeOf(blockOop)) == DCTSize2)) {\n\t\t\treturn 0;\n\t\t}\n\t\tblocks[i] = (interpreterProxy->firstIndexableField(blockOop));\n\t}\n\treturn !(interpreterProxy->failed());\n}\n\nstatic sqInt\ncolorComponentfrom(int *aColorComponent, sqInt oop)\n{\n\tif ((oop & 1)) {\n\t\treturn 0;\n\t}\n\tif (!(interpreterProxy->isPointers(oop))) {\n\t\treturn 0;\n\t}\n\tif ((interpreterProxy->slotSizeOf(oop)) < MinComponentSize) {\n\t\treturn 0;\n\t}\n\taColorComponent[CurrentXIndex] = (interpreterProxy->fetchIntegerofObject(CurrentXIndex, oop));\n\taColorComponent[CurrentYIndex] = (interpreterProxy->fetchIntegerofObject(CurrentYIndex, oop));\n\taColorComponent[HScaleIndex] = (interpreterProxy->fetchIntegerofObject(HScaleIndex, oop));\n\taColorComponent[VScaleIndex] = (interpreterProxy->fetchIntegerofObject(VScaleIndex, oop));\n\taColorComponent[BlockWidthIndex] = (interpreterProxy->fetchIntegerofObject(BlockWidthIndex, oop));\n\taColorComponent[MCUWidthIndex] = (interpreterProxy->fetchIntegerofObject(MCUWidthIndex, oop));\n\taColorComponent[PriorDCValueIndex] = (interpreterProxy->fetchIntegerofObject(PriorDCValueIndex, oop));\n\treturn !(interpreterProxy->failed());\n}\n\nstatic sqInt\ncolorConvertGrayscaleMCU(void)\n{\n    sqInt blockIndex;\n    sqInt curX;\n    sqInt dx;\n    sqInt dy;\n    sqInt i;\n    sqInt sample;\n    sqInt sampleIndex;\n    sqInt sx;\n    sqInt sy;\n    sqInt y;\n\n\tyComponent[CurrentXIndex] = 0;\n\tyComponent[CurrentYIndex] = 0;\n\tfor (i = 0; i <= (jpegBitsSize - 1); i += 1) {\n\t\t/* begin nextSampleY */\n\t\tdx = curX = yComponent[CurrentXIndex];\n\t\tdy = yComponent[CurrentYIndex];\n\t\tsx = yComponent[HScaleIndex];\n\t\tsy = yComponent[VScaleIndex];\n\t\tif (!((sx == 0)\n\t\t\t && (sy == 0))) {\n\t\t\tdx = dx / sx;\n\t\t\tdy = dy / sy;\n\t\t}\n\t\tblockIndex = ((((usqInt) dy >> 3)) * (yComponent[BlockWidthIndex])) + (((usqInt) dx >> 3));\n\t\tsampleIndex = (((usqInt) (dy & 7) << 3)) + (dx & 7);\n\t\tsample = (yBlocks[blockIndex])[sampleIndex];\n\t\tcurX += 1;\n\t\tif (curX < ((yComponent[MCUWidthIndex]) * 8)) {\n\t\t\tyComponent[CurrentXIndex] = curX;\n\t\t}\n\t\telse {\n\t\t\tyComponent[CurrentXIndex] = 0;\n\t\t\tyComponent[CurrentYIndex] = ((yComponent[CurrentYIndex]) + 1);\n\t\t}\n\t\ty = sample;\n\t\ty += residuals[GreenIndex];\n\t\ty = ((y < MaxSample) ? y : MaxSample);\n\t\tresiduals[GreenIndex] = (y & ditherMask);\n\t\ty = y & (MaxSample - ditherMask);\n\t\ty = ((y < 1) ? 1 : y);\n\t\tjpegBits[i] = (((4278190080UL + (y << 16)) + (y << 8)) + y);\n\t}\n}\n\nstatic sqInt\ncolorConvertMCU(void)\n{\n    sqInt blockIndex;\n    sqInt blockIndex1;\n    sqInt blockIndex2;\n    sqInt blue;\n    sqInt cb;\n    sqInt cr;\n    sqInt curX;\n    sqInt curX1;\n    sqInt curX2;\n    sqInt dx;\n    sqInt dx1;\n    sqInt dx2;\n    sqInt dy;\n    sqInt dy1;\n    sqInt dy2;\n    sqInt green;\n    sqInt i;\n    sqInt red;\n    sqInt sample;\n    sqInt sample1;\n    sqInt sample2;\n    sqInt sampleIndex;\n    sqInt sampleIndex1;\n    sqInt sampleIndex2;\n    sqInt sx;\n    sqInt sx1;\n    sqInt sx2;\n    sqInt sy;\n    sqInt sy1;\n    sqInt sy2;\n    sqInt y;\n\n\tyComponent[CurrentXIndex] = 0;\n\tyComponent[CurrentYIndex] = 0;\n\tcbComponent[CurrentXIndex] = 0;\n\tcbComponent[CurrentYIndex] = 0;\n\tcrComponent[CurrentXIndex] = 0;\n\tcrComponent[CurrentYIndex] = 0;\n\tfor (i = 0; i <= (jpegBitsSize - 1); i += 1) {\n\t\t/* begin nextSampleY */\n\t\tdx = curX = yComponent[CurrentXIndex];\n\t\tdy = yComponent[CurrentYIndex];\n\t\tsx = yComponent[HScaleIndex];\n\t\tsy = yComponent[VScaleIndex];\n\t\tif (!((sx == 0)\n\t\t\t && (sy == 0))) {\n\t\t\tdx = dx / sx;\n\t\t\tdy = dy / sy;\n\t\t}\n\t\tblockIndex = ((((usqInt) dy >> 3)) * (yComponent[BlockWidthIndex])) + (((usqInt) dx >> 3));\n\t\tsampleIndex = (((usqInt) (dy & 7) << 3)) + (dx & 7);\n\t\tsample = (yBlocks[blockIndex])[sampleIndex];\n\t\tcurX += 1;\n\t\tif (curX < ((yComponent[MCUWidthIndex]) * 8)) {\n\t\t\tyComponent[CurrentXIndex] = curX;\n\t\t}\n\t\telse {\n\t\t\tyComponent[CurrentXIndex] = 0;\n\t\t\tyComponent[CurrentYIndex] = ((yComponent[CurrentYIndex]) + 1);\n\t\t}\n\t\ty = sample;\n\t\t/* begin nextSampleCb */\n\t\tdx1 = curX1 = cbComponent[CurrentXIndex];\n\t\tdy1 = cbComponent[CurrentYIndex];\n\t\tsx1 = cbComponent[HScaleIndex];\n\t\tsy1 = cbComponent[VScaleIndex];\n\t\tif (!((sx1 == 0)\n\t\t\t && (sy1 == 0))) {\n\t\t\tdx1 = dx1 / sx1;\n\t\t\tdy1 = dy1 / sy1;\n\t\t}\n\t\tblockIndex1 = ((((usqInt) dy1 >> 3)) * (cbComponent[BlockWidthIndex])) + (((usqInt) dx1 >> 3));\n\t\tsampleIndex1 = (((usqInt) (dy1 & 7) << 3)) + (dx1 & 7);\n\t\tsample1 = (cbBlocks[blockIndex1])[sampleIndex1];\n\t\tcurX1 += 1;\n\t\tif (curX1 < ((cbComponent[MCUWidthIndex]) * 8)) {\n\t\t\tcbComponent[CurrentXIndex] = curX1;\n\t\t}\n\t\telse {\n\t\t\tcbComponent[CurrentXIndex] = 0;\n\t\t\tcbComponent[CurrentYIndex] = ((cbComponent[CurrentYIndex]) + 1);\n\t\t}\n\t\tcb = sample1;\n\t\tcb -= SampleOffset;\n\t\t/* begin nextSampleCr */\n\t\tdx2 = curX2 = crComponent[CurrentXIndex];\n\t\tdy2 = crComponent[CurrentYIndex];\n\t\tsx2 = crComponent[HScaleIndex];\n\t\tsy2 = crComponent[VScaleIndex];\n\t\tif (!((sx2 == 0)\n\t\t\t && (sy2 == 0))) {\n\t\t\tdx2 = dx2 / sx2;\n\t\t\tdy2 = dy2 / sy2;\n\t\t}\n\t\tblockIndex2 = ((((usqInt) dy2 >> 3)) * (crComponent[BlockWidthIndex])) + (((usqInt) dx2 >> 3));\n\t\tsampleIndex2 = (((usqInt) (dy2 & 7) << 3)) + (dx2 & 7);\n\t\tsample2 = (crBlocks[blockIndex2])[sampleIndex2];\n\t\tcurX2 += 1;\n\t\tif (curX2 < ((crComponent[MCUWidthIndex]) * 8)) {\n\t\t\tcrComponent[CurrentXIndex] = curX2;\n\t\t}\n\t\telse {\n\t\t\tcrComponent[CurrentXIndex] = 0;\n\t\t\tcrComponent[CurrentYIndex] = ((crComponent[CurrentYIndex]) + 1);\n\t\t}\n\t\tcr = sample2;\n\t\tcr -= SampleOffset;\n\t\tred = (y + (((sqInt) (FIXn1n40200 * cr) >> 16))) + (residuals[RedIndex]);\n\t\tred = ((red < MaxSample) ? red : MaxSample);\n\t\tred = ((red < 0) ? 0 : red);\n\t\tresiduals[RedIndex] = (red & ditherMask);\n\t\tred = red & (MaxSample - ditherMask);\n\t\tred = ((red < 1) ? 1 : red);\n\t\tgreen = ((y - (((sqInt) (FIXn0n34414 * cb) >> 16))) - (((sqInt) (FIXn0n71414 * cr) >> 16))) + (residuals[GreenIndex]);\n\t\tgreen = ((green < MaxSample) ? green : MaxSample);\n\t\tgreen = ((green < 0) ? 0 : green);\n\t\tresiduals[GreenIndex] = (green & ditherMask);\n\t\tgreen = green & (MaxSample - ditherMask);\n\t\tgreen = ((green < 1) ? 1 : green);\n\t\tblue = (y + (((sqInt) (FIXn1n77200 * cb) >> 16))) + (residuals[BlueIndex]);\n\t\tblue = ((blue < MaxSample) ? blue : MaxSample);\n\t\tblue = ((blue < 0) ? 0 : blue);\n\t\tresiduals[BlueIndex] = (blue & ditherMask);\n\t\tblue = blue & (MaxSample - ditherMask);\n\t\tblue = ((blue < 1) ? 1 : blue);\n\t\tjpegBits[i] = (((4278190080UL + (((usqInt) red << 16))) + (((usqInt) green << 8))) + blue);\n\t}\n}\n\nstatic sqInt\ncrColorComponentFrom(sqInt oop)\n{\n\treturn (colorComponentfrom(crComponent, oop))\n\t && (colorComponentBlocksfrom(crBlocks, oop));\n}\n\nstatic sqInt\ndecodeBlockIntocomponent(int *anArray, int *aColorComponent)\n{\n    sqInt bits;\n    sqInt byte;\n    sqInt i;\n    sqInt index;\n    sqInt zeroCount;\n\n\tbyte = jpegDecodeValueFromsize(dcTable, dcTableSize);\n\tif (byte < 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (byte != 0) {\n\t\tbits = getBits(byte);\n\t\t/* begin scaleAndSignExtend:inFieldWidth: */\n\t\tif (bits < ((((byte - 1) < 0) ? ((usqInt) 1 >> -(byte - 1)) : ((usqInt) 1 << (byte - 1))))) {\n\t\t\tbyte = (bits - (((byte < 0) ? ((usqInt) 1 >> -byte) : ((usqInt) 1 << byte)))) + 1;\n\t\t\tgoto l1;\n\t\t}\n\t\telse {\n\t\t\tbyte = bits;\n\t\t\tgoto l1;\n\t\t}\n\tl1:\t/* end scaleAndSignExtend:inFieldWidth: */;\n\t}\n\tbyte = aColorComponent[PriorDCValueIndex] = ((aColorComponent[PriorDCValueIndex]) + byte);\n\tanArray[0] = byte;\n\tfor (i = 1; i <= (DCTSize2 - 1); i += 1) {\n\t\tanArray[i] = 0;\n\t}\n\tindex = 1;\n\twhile (index < DCTSize2) {\n\t\tbyte = jpegDecodeValueFromsize(acTable, acTableSize);\n\t\tif (byte < 0) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t\tzeroCount = ((usqInt) byte) >> 4;\n\t\tbyte = byte & 15;\n\t\tif (byte != 0) {\n\t\t\tindex += zeroCount;\n\t\t\tbits = getBits(byte);\n\t\t\t/* begin scaleAndSignExtend:inFieldWidth: */\n\t\t\tif (bits < ((((byte - 1) < 0) ? ((usqInt) 1 >> -(byte - 1)) : ((usqInt) 1 << (byte - 1))))) {\n\t\t\t\tbyte = (bits - (((byte < 0) ? ((usqInt) 1 >> -byte) : ((usqInt) 1 << byte)))) + 1;\n\t\t\t\tgoto l2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tbyte = bits;\n\t\t\t\tgoto l2;\n\t\t\t}\n\t\tl2:\t/* end scaleAndSignExtend:inFieldWidth: */;\n\t\t\tif ((index < 0)\n\t\t\t || (index >= DCTSize2)) {\n\t\t\t\treturn interpreterProxy->primitiveFail();\n\t\t\t}\n\t\t\tanArray[jpegNaturalOrder[index]] = byte;\n\t\t}\n\t\telse {\n\t\t\tif (zeroCount == 15) {\n\t\t\t\tindex += zeroCount;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\tindex += 1;\n\t}\n}\n\nstatic sqInt\nfillBuffer(void)\n{\n    sqInt byte;\n\n\twhile (jsBitCount <= 16) {\n\t\tif (!(jsPosition < jsReadLimit)) {\n\t\t\treturn jsBitCount;\n\t\t}\n\t\tbyte = jsCollection[jsPosition];\n\t\tjsPosition += 1;\n\t\tif (byte == 255) {\n\t\t\tif (!((jsPosition < jsReadLimit)\n\t\t\t\t && ((jsCollection[jsPosition]) == 0))) {\n\t\t\t\tjsPosition -= 1;\n\t\t\t\treturn jsBitCount;\n\t\t\t}\n\t\t\tjsPosition += 1;\n\t\t}\n\t\tjsBitBuffer = (((usqInt) jsBitBuffer << 8)) | byte;\n\t\tjsBitCount += 8;\n\t}\n\treturn jsBitCount;\n}\n\nstatic sqInt\ngetBits(sqInt requestedBits)\n{\n    sqInt byte;\n    sqInt value;\n\n\tif (requestedBits > jsBitCount) {\n\t\t/* begin fillBuffer */\n\t\twhile (jsBitCount <= 16) {\n\t\t\tif (!(jsPosition < jsReadLimit)) {\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t\tbyte = jsCollection[jsPosition];\n\t\t\tjsPosition += 1;\n\t\t\tif (byte == 255) {\n\t\t\t\tif (!((jsPosition < jsReadLimit)\n\t\t\t\t\t && ((jsCollection[jsPosition]) == 0))) {\n\t\t\t\t\tjsPosition -= 1;\n\t\t\t\t\tgoto l1;\n\t\t\t\t}\n\t\t\t\tjsPosition += 1;\n\t\t\t}\n\t\t\tjsBitBuffer = (((usqInt) jsBitBuffer << 8)) | byte;\n\t\t\tjsBitCount += 8;\n\t\t}\n\tl1:\t/* end fillBuffer */;\n\t\tif (requestedBits > jsBitCount) {\n\t\t\treturn -1;\n\t\t}\n\t}\n\tvalue = (((requestedBits - jsBitCount) < 0) ? ((usqInt) jsBitBuffer >> -(requestedBits - jsBitCount)) : ((usqInt) jsBitBuffer << (requestedBits - jsBitCount)));\n\tjsBitBuffer = jsBitBuffer & (((((jsBitCount - requestedBits) < 0) ? ((usqInt) 1 >> -(jsBitCount - requestedBits)) : ((usqInt) 1 << (jsBitCount - requestedBits)))) - 1);\n\tjsBitCount -= requestedBits;\n\treturn value;\n}\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nstatic sqInt\nidctBlockIntqt(int *anArray, int *qt)\n{\n    sqInt anACTerm;\n    sqInt dcval;\n    sqInt i;\n    sqInt j;\n    sqInt row;\n    sqInt t0;\n    sqInt t1;\n    sqInt t10;\n    sqInt t11;\n    sqInt t12;\n    sqInt t13;\n    sqInt t2;\n    sqInt t3;\n    sqInt v;\n    int ws[64];\n    sqInt z1;\n    sqInt z2;\n    sqInt z3;\n    sqInt z4;\n    sqInt z5;\n\n\t;\n\tfor (i = 0; i <= (DCTSize - 1); i += 1) {\n\t\tanACTerm = -1;\n\t\tfor (row = 1; row <= (DCTSize - 1); row += 1) {\n\t\t\tif (anACTerm == -1) {\n\t\t\t\tif (!((anArray[(row * DCTSize) + i]) == 0)) {\n\t\t\t\t\tanACTerm = row;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (anACTerm == -1) {\n\t\t\tdcval = ((usqInt) ((anArray[i]) * (qt[0])) << 2);\n\t\t\tfor (j = 0; j <= (DCTSize - 1); j += 1) {\n\t\t\t\tws[(j * DCTSize) + i] = dcval;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tz2 = (anArray[(DCTSize * 2) + i]) * (qt[(DCTSize * 2) + i]);\n\t\t\tz3 = (anArray[(DCTSize * 6) + i]) * (qt[(DCTSize * 6) + i]);\n\t\t\tz1 = (z2 + z3) * FIXn0n541196100;\n\t\t\tt2 = z1 + (z3 * (0 - FIXn1n847759065));\n\t\t\tt3 = z1 + (z2 * FIXn0n765366865);\n\t\t\tz2 = (anArray[i]) * (qt[i]);\n\t\t\tz3 = (anArray[(DCTSize * 4) + i]) * (qt[(DCTSize * 4) + i]);\n\t\t\tt0 = ((usqInt) (z2 + z3) << 13);\n\t\t\tt1 = ((usqInt) (z2 - z3) << 13);\n\t\t\tt10 = t0 + t3;\n\t\t\tt13 = t0 - t3;\n\t\t\tt11 = t1 + t2;\n\t\t\tt12 = t1 - t2;\n\t\t\tt0 = (anArray[(DCTSize * 7) + i]) * (qt[(DCTSize * 7) + i]);\n\t\t\tt1 = (anArray[(DCTSize * 5) + i]) * (qt[(DCTSize * 5) + i]);\n\t\t\tt2 = (anArray[(DCTSize * 3) + i]) * (qt[(DCTSize * 3) + i]);\n\t\t\tt3 = (anArray[DCTSize + i]) * (qt[DCTSize + i]);\n\t\t\tz1 = t0 + t3;\n\t\t\tz2 = t1 + t2;\n\t\t\tz3 = t0 + t2;\n\t\t\tz4 = t1 + t3;\n\t\t\tz5 = (z3 + z4) * FIXn1n175875602;\n\t\t\tt0 = t0 * FIXn0n298631336;\n\t\t\tt1 = t1 * FIXn2n053119869;\n\t\t\tt2 = t2 * FIXn3n072711026;\n\t\t\tt3 = t3 * FIXn1n501321110;\n\t\t\tz1 = z1 * (0 - FIXn0n899976223);\n\t\t\tz2 = z2 * (0 - FIXn2n562915447);\n\t\t\tz3 = z3 * (0 - FIXn1n961570560);\n\t\t\tz4 = z4 * (0 - FIXn0n390180644);\n\t\t\tz3 += z5;\n\t\t\tz4 += z5;\n\t\t\tt0 = (t0 + z1) + z3;\n\t\t\tt1 = (t1 + z2) + z4;\n\t\t\tt2 = (t2 + z2) + z3;\n\t\t\tt3 = (t3 + z1) + z4;\n\t\t\tws[i] = (((sqInt) (t10 + t3) >> 11));\n\t\t\tws[(DCTSize * 7) + i] = (((sqInt) (t10 - t3) >> 11));\n\t\t\tws[(DCTSize * 1) + i] = (((sqInt) (t11 + t2) >> 11));\n\t\t\tws[(DCTSize * 6) + i] = (((sqInt) (t11 - t2) >> 11));\n\t\t\tws[(DCTSize * 2) + i] = (((sqInt) (t12 + t1) >> 11));\n\t\t\tws[(DCTSize * 5) + i] = (((sqInt) (t12 - t1) >> 11));\n\t\t\tws[(DCTSize * 3) + i] = (((sqInt) (t13 + t0) >> 11));\n\t\t\tws[(DCTSize * 4) + i] = (((sqInt) (t13 - t0) >> 11));\n\t\t}\n\t}\n\tfor (i = 0; i <= (DCTSize2 - DCTSize); i += DCTSize) {\n\t\tz2 = ws[i + 2];\n\t\tz3 = ws[i + 6];\n\t\tz1 = (z2 + z3) * FIXn0n541196100;\n\t\tt2 = z1 + (z3 * (0 - FIXn1n847759065));\n\t\tt3 = z1 + (z2 * FIXn0n765366865);\n\t\tt0 = ((usqInt) ((ws[i]) + (ws[i + 4])) << 13);\n\t\tt1 = ((usqInt) ((ws[i]) - (ws[i + 4])) << 13);\n\t\tt10 = t0 + t3;\n\t\tt13 = t0 - t3;\n\t\tt11 = t1 + t2;\n\t\tt12 = t1 - t2;\n\t\tt0 = ws[i + 7];\n\t\tt1 = ws[i + 5];\n\t\tt2 = ws[i + 3];\n\t\tt3 = ws[i + 1];\n\t\tz1 = t0 + t3;\n\t\tz2 = t1 + t2;\n\t\tz3 = t0 + t2;\n\t\tz4 = t1 + t3;\n\t\tz5 = (z3 + z4) * FIXn1n175875602;\n\t\tt0 = t0 * FIXn0n298631336;\n\t\tt1 = t1 * FIXn2n053119869;\n\t\tt2 = t2 * FIXn3n072711026;\n\t\tt3 = t3 * FIXn1n501321110;\n\t\tz1 = z1 * (0 - FIXn0n899976223);\n\t\tz2 = z2 * (0 - FIXn2n562915447);\n\t\tz3 = z3 * (0 - FIXn1n961570560);\n\t\tz4 = z4 * (0 - FIXn0n390180644);\n\t\tz3 += z5;\n\t\tz4 += z5;\n\t\tt0 = (t0 + z1) + z3;\n\t\tt1 = (t1 + z2) + z4;\n\t\tt2 = (t2 + z2) + z3;\n\t\tt3 = (t3 + z1) + z4;\n\t\tv = (((sqInt) (t10 + t3) >> 18)) + SampleOffset;\n\t\tv = ((v < MaxSample) ? v : MaxSample);\n\t\tv = ((v < 0) ? 0 : v);\n\t\tanArray[i] = v;\n\t\tv = (((sqInt) (t10 - t3) >> 18)) + SampleOffset;\n\t\tv = ((v < MaxSample) ? v : MaxSample);\n\t\tv = ((v < 0) ? 0 : v);\n\t\tanArray[i + 7] = v;\n\t\tv = (((sqInt) (t11 + t2) >> 18)) + SampleOffset;\n\t\tv = ((v < MaxSample) ? v : MaxSample);\n\t\tv = ((v < 0) ? 0 : v);\n\t\tanArray[i + 1] = v;\n\t\tv = (((sqInt) (t11 - t2) >> 18)) + SampleOffset;\n\t\tv = ((v < MaxSample) ? v : MaxSample);\n\t\tv = ((v < 0) ? 0 : v);\n\t\tanArray[i + 6] = v;\n\t\tv = (((sqInt) (t12 + t1) >> 18)) + SampleOffset;\n\t\tv = ((v < MaxSample) ? v : MaxSample);\n\t\tv = ((v < 0) ? 0 : v);\n\t\tanArray[i + 2] = v;\n\t\tv = (((sqInt) (t12 - t1) >> 18)) + SampleOffset;\n\t\tv = ((v < MaxSample) ? v : MaxSample);\n\t\tv = ((v < 0) ? 0 : v);\n\t\tanArray[i + 5] = v;\n\t\tv = (((sqInt) (t13 + t0) >> 18)) + SampleOffset;\n\t\tv = ((v < MaxSample) ? v : MaxSample);\n\t\tv = ((v < 0) ? 0 : v);\n\t\tanArray[i + 3] = v;\n\t\tv = (((sqInt) (t13 - t0) >> 18)) + SampleOffset;\n\t\tv = ((v < MaxSample) ? v : MaxSample);\n\t\tv = ((v < 0) ? 0 : v);\n\t\tanArray[i + 4] = v;\n\t}\n}\n\n\n/*\tDecode the next value in the receiver using the given huffman table. */\n\nstatic sqInt\njpegDecodeValueFromsize(int *table, sqInt tableSize)\n{\n    sqInt bits;\n    sqInt bitsNeeded;\n    sqInt index;\n    sqInt tableIndex;\n    sqInt value;\n\n\n\t/* Initial bits needed */\n\n\tbitsNeeded = ((usqInt) (table[0])) >> 24;\n\tif (bitsNeeded > MaxBits) {\n\t\treturn -1;\n\t}\n\n\t/* First real table */\n\n\ttableIndex = 2;\n\twhile (1) {\n\n\t\t/* Get bits */\n\n\t\tbits = getBits(bitsNeeded);\n\t\tif (bits < 0) {\n\t\t\treturn -1;\n\t\t}\n\t\tindex = (tableIndex + bits) - 1;\n\t\tif (index >= tableSize) {\n\t\t\treturn -1;\n\t\t}\n\n\t\t/* Lookup entry in table */\n\n\t\tvalue = table[index];\n\t\tif ((value & 1056964608) == 0) {\n\t\t\treturn value;\n\t\t}\n\n\t\t/* Table offset in low 16 bit */\n\n\t\ttableIndex = value & 65535;\n\n\t\t/* Additional bits in high 8 bit */\n\n\t\tbitsNeeded = (((usqInt) value) >> 24) & 255;\n\t\tif (bitsNeeded > MaxBits) {\n\t\t\treturn -1;\n\t\t}\n\t}\n\treturn -1;\n}\n\nstatic sqInt\nloadJPEGStreamFrom(sqInt streamOop)\n{\n    sqInt oop;\n    sqInt sz;\n\n\tif ((interpreterProxy->slotSizeOf(streamOop)) < 5) {\n\t\treturn 0;\n\t}\n\tif (!(interpreterProxy->isPointers(streamOop))) {\n\t\treturn 0;\n\t}\n\toop = interpreterProxy->fetchPointerofObject(0, streamOop);\n\tif ((oop & 1)) {\n\t\treturn 0;\n\t}\n\tif (!(interpreterProxy->isBytes(oop))) {\n\t\treturn 0;\n\t}\n\tjsCollection = interpreterProxy->firstIndexableField(oop);\n\tsz = interpreterProxy->byteSizeOf(oop);\n\tjsPosition = interpreterProxy->fetchIntegerofObject(1, streamOop);\n\tjsReadLimit = interpreterProxy->fetchIntegerofObject(2, streamOop);\n\tjsBitBuffer = interpreterProxy->fetchIntegerofObject(3, streamOop);\n\tjsBitCount = interpreterProxy->fetchIntegerofObject(4, streamOop);\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\tif (sz < jsReadLimit) {\n\t\treturn 0;\n\t}\n\tif ((jsPosition < 0)\n\t || (jsPosition >= jsReadLimit)) {\n\t\treturn 0;\n\t}\n\treturn 1;\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\nstatic sqInt\nnextSampleCb(void)\n{\n    sqInt blockIndex;\n    sqInt curX;\n    sqInt dx;\n    sqInt dy;\n    sqInt sample;\n    sqInt sampleIndex;\n    sqInt sx;\n    sqInt sy;\n\n\tdx = curX = cbComponent[CurrentXIndex];\n\tdy = cbComponent[CurrentYIndex];\n\tsx = cbComponent[HScaleIndex];\n\tsy = cbComponent[VScaleIndex];\n\tif (!((sx == 0)\n\t\t && (sy == 0))) {\n\t\tdx = dx / sx;\n\t\tdy = dy / sy;\n\t}\n\tblockIndex = ((((usqInt) dy >> 3)) * (cbComponent[BlockWidthIndex])) + (((usqInt) dx >> 3));\n\tsampleIndex = (((usqInt) (dy & 7) << 3)) + (dx & 7);\n\tsample = (cbBlocks[blockIndex])[sampleIndex];\n\tcurX += 1;\n\tif (curX < ((cbComponent[MCUWidthIndex]) * 8)) {\n\t\tcbComponent[CurrentXIndex] = curX;\n\t}\n\telse {\n\t\tcbComponent[CurrentXIndex] = 0;\n\t\tcbComponent[CurrentYIndex] = ((cbComponent[CurrentYIndex]) + 1);\n\t}\n\treturn sample;\n}\n\nstatic sqInt\nnextSampleCr(void)\n{\n    sqInt blockIndex;\n    sqInt curX;\n    sqInt dx;\n    sqInt dy;\n    sqInt sample;\n    sqInt sampleIndex;\n    sqInt sx;\n    sqInt sy;\n\n\tdx = curX = crComponent[CurrentXIndex];\n\tdy = crComponent[CurrentYIndex];\n\tsx = crComponent[HScaleIndex];\n\tsy = crComponent[VScaleIndex];\n\tif (!((sx == 0)\n\t\t && (sy == 0))) {\n\t\tdx = dx / sx;\n\t\tdy = dy / sy;\n\t}\n\tblockIndex = ((((usqInt) dy >> 3)) * (crComponent[BlockWidthIndex])) + (((usqInt) dx >> 3));\n\tsampleIndex = (((usqInt) (dy & 7) << 3)) + (dx & 7);\n\tsample = (crBlocks[blockIndex])[sampleIndex];\n\tcurX += 1;\n\tif (curX < ((crComponent[MCUWidthIndex]) * 8)) {\n\t\tcrComponent[CurrentXIndex] = curX;\n\t}\n\telse {\n\t\tcrComponent[CurrentXIndex] = 0;\n\t\tcrComponent[CurrentYIndex] = ((crComponent[CurrentYIndex]) + 1);\n\t}\n\treturn sample;\n}\n\nstatic sqInt\nnextSampleFromblocks(int *aComponent, int **aBlockArray)\n{\n    sqInt blockIndex;\n    sqInt curX;\n    sqInt dx;\n    sqInt dy;\n    sqInt sample;\n    sqInt sampleIndex;\n    sqInt sx;\n    sqInt sy;\n\n\tdx = curX = aComponent[CurrentXIndex];\n\tdy = aComponent[CurrentYIndex];\n\tsx = aComponent[HScaleIndex];\n\tsy = aComponent[VScaleIndex];\n\tif (!((sx == 0)\n\t\t && (sy == 0))) {\n\t\tdx = dx / sx;\n\t\tdy = dy / sy;\n\t}\n\tblockIndex = ((((usqInt) dy >> 3)) * (aComponent[BlockWidthIndex])) + (((usqInt) dx >> 3));\n\tsampleIndex = (((usqInt) (dy & 7) << 3)) + (dx & 7);\n\tsample = (aBlockArray[blockIndex])[sampleIndex];\n\tcurX += 1;\n\tif (curX < ((aComponent[MCUWidthIndex]) * 8)) {\n\t\taComponent[CurrentXIndex] = curX;\n\t}\n\telse {\n\t\taComponent[CurrentXIndex] = 0;\n\t\taComponent[CurrentYIndex] = ((aComponent[CurrentYIndex]) + 1);\n\t}\n\treturn sample;\n}\n\nstatic sqInt\nnextSampleY(void)\n{\n    sqInt blockIndex;\n    sqInt curX;\n    sqInt dx;\n    sqInt dy;\n    sqInt sample;\n    sqInt sampleIndex;\n    sqInt sx;\n    sqInt sy;\n\n\tdx = curX = yComponent[CurrentXIndex];\n\tdy = yComponent[CurrentYIndex];\n\tsx = yComponent[HScaleIndex];\n\tsy = yComponent[VScaleIndex];\n\tif (!((sx == 0)\n\t\t && (sy == 0))) {\n\t\tdx = dx / sx;\n\t\tdy = dy / sy;\n\t}\n\tblockIndex = ((((usqInt) dy >> 3)) * (yComponent[BlockWidthIndex])) + (((usqInt) dx >> 3));\n\tsampleIndex = (((usqInt) (dy & 7) << 3)) + (dx & 7);\n\tsample = (yBlocks[blockIndex])[sampleIndex];\n\tcurX += 1;\n\tif (curX < ((yComponent[MCUWidthIndex]) * 8)) {\n\t\tyComponent[CurrentXIndex] = curX;\n\t}\n\telse {\n\t\tyComponent[CurrentXIndex] = 0;\n\t\tyComponent[CurrentYIndex] = ((yComponent[CurrentYIndex]) + 1);\n\t}\n\treturn sample;\n}\n\n\n/*\tRequires:\n\tJPEGColorComponent\n\tbits\n\tWordArray with: 3*Integer (residuals)\n\tditherMask\n\t */\n\nEXPORT(sqInt)\nprimitiveColorConvertGrayscaleMCU(void)\n{\n    sqInt arrayOop;\n    sqInt blockIndex;\n    sqInt curX;\n    sqInt dx;\n    sqInt dy;\n    sqInt i;\n    sqInt sample;\n    sqInt sampleIndex;\n    sqInt sx;\n    sqInt sy;\n    sqInt y;\n\n\tstInit();\n\tif (!((interpreterProxy->methodArgumentCount()) == 4)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tditherMask = interpreterProxy->stackIntegerValue(0);\n\tarrayOop = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!((interpreterProxy->isWords(arrayOop))\n\t\t && ((interpreterProxy->slotSizeOf(arrayOop)) == 3))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tresiduals = interpreterProxy->firstIndexableField(arrayOop);\n\tarrayOop = interpreterProxy->stackObjectValue(2);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!(interpreterProxy->isWords(arrayOop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tjpegBitsSize = interpreterProxy->slotSizeOf(arrayOop);\n\tjpegBits = interpreterProxy->firstIndexableField(arrayOop);\n\tarrayOop = interpreterProxy->stackObjectValue(3);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!((colorComponentfrom(yComponent, arrayOop))\n\t\t && (colorComponentBlocksfrom(yBlocks, arrayOop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\t/* begin colorConvertGrayscaleMCU */\n\tyComponent[CurrentXIndex] = 0;\n\tyComponent[CurrentYIndex] = 0;\n\tfor (i = 0; i <= (jpegBitsSize - 1); i += 1) {\n\t\t/* begin nextSampleY */\n\t\tdx = curX = yComponent[CurrentXIndex];\n\t\tdy = yComponent[CurrentYIndex];\n\t\tsx = yComponent[HScaleIndex];\n\t\tsy = yComponent[VScaleIndex];\n\t\tif (!((sx == 0)\n\t\t\t && (sy == 0))) {\n\t\t\tdx = dx / sx;\n\t\t\tdy = dy / sy;\n\t\t}\n\t\tblockIndex = ((((usqInt) dy >> 3)) * (yComponent[BlockWidthIndex])) + (((usqInt) dx >> 3));\n\t\tsampleIndex = (((usqInt) (dy & 7) << 3)) + (dx & 7);\n\t\tsample = (yBlocks[blockIndex])[sampleIndex];\n\t\tcurX += 1;\n\t\tif (curX < ((yComponent[MCUWidthIndex]) * 8)) {\n\t\t\tyComponent[CurrentXIndex] = curX;\n\t\t}\n\t\telse {\n\t\t\tyComponent[CurrentXIndex] = 0;\n\t\t\tyComponent[CurrentYIndex] = ((yComponent[CurrentYIndex]) + 1);\n\t\t}\n\t\ty = sample;\n\t\ty += residuals[GreenIndex];\n\t\ty = ((y < MaxSample) ? y : MaxSample);\n\t\tresiduals[GreenIndex] = (y & ditherMask);\n\t\ty = y & (MaxSample - ditherMask);\n\t\ty = ((y < 1) ? 1 : y);\n\t\tjpegBits[i] = (((4278190080UL + (y << 16)) + (y << 8)) + y);\n\t}\n\tinterpreterProxy->pop(4);\n}\n\n\n/*\tRequires:\n\tArray with: 3*JPEGColorComponent\n\tbits\n\tWordArray with: 3*Integer (residuals)\n\tditherMask\n\t */\n\nEXPORT(sqInt)\nprimitiveColorConvertMCU(void)\n{\n    sqInt arrayOop;\n    sqInt blockIndex;\n    sqInt blockIndex1;\n    sqInt blockIndex2;\n    sqInt blue;\n    sqInt cb;\n    sqInt cr;\n    sqInt curX;\n    sqInt curX1;\n    sqInt curX2;\n    sqInt dx;\n    sqInt dx1;\n    sqInt dx2;\n    sqInt dy;\n    sqInt dy1;\n    sqInt dy2;\n    sqInt green;\n    sqInt i;\n    sqInt red;\n    sqInt sample;\n    sqInt sample1;\n    sqInt sample2;\n    sqInt sampleIndex;\n    sqInt sampleIndex1;\n    sqInt sampleIndex2;\n    sqInt sx;\n    sqInt sx1;\n    sqInt sx2;\n    sqInt sy;\n    sqInt sy1;\n    sqInt sy2;\n    sqInt y;\n\n\tstInit();\n\tif (!((interpreterProxy->methodArgumentCount()) == 4)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tditherMask = interpreterProxy->stackIntegerValue(0);\n\tarrayOop = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!((interpreterProxy->isWords(arrayOop))\n\t\t && ((interpreterProxy->slotSizeOf(arrayOop)) == 3))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tresiduals = interpreterProxy->firstIndexableField(arrayOop);\n\tarrayOop = interpreterProxy->stackObjectValue(2);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!(interpreterProxy->isWords(arrayOop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tjpegBitsSize = interpreterProxy->slotSizeOf(arrayOop);\n\tjpegBits = interpreterProxy->firstIndexableField(arrayOop);\n\tarrayOop = interpreterProxy->stackObjectValue(3);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!((interpreterProxy->isPointers(arrayOop))\n\t\t && ((interpreterProxy->slotSizeOf(arrayOop)) == 3))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!(yColorComponentFrom(interpreterProxy->fetchPointerofObject(0, arrayOop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!(cbColorComponentFrom(interpreterProxy->fetchPointerofObject(1, arrayOop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!(crColorComponentFrom(interpreterProxy->fetchPointerofObject(2, arrayOop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\t/* begin colorConvertMCU */\n\tyComponent[CurrentXIndex] = 0;\n\tyComponent[CurrentYIndex] = 0;\n\tcbComponent[CurrentXIndex] = 0;\n\tcbComponent[CurrentYIndex] = 0;\n\tcrComponent[CurrentXIndex] = 0;\n\tcrComponent[CurrentYIndex] = 0;\n\tfor (i = 0; i <= (jpegBitsSize - 1); i += 1) {\n\t\t/* begin nextSampleY */\n\t\tdx = curX = yComponent[CurrentXIndex];\n\t\tdy = yComponent[CurrentYIndex];\n\t\tsx = yComponent[HScaleIndex];\n\t\tsy = yComponent[VScaleIndex];\n\t\tif (!((sx == 0)\n\t\t\t && (sy == 0))) {\n\t\t\tdx = dx / sx;\n\t\t\tdy = dy / sy;\n\t\t}\n\t\tblockIndex = ((((usqInt) dy >> 3)) * (yComponent[BlockWidthIndex])) + (((usqInt) dx >> 3));\n\t\tsampleIndex = (((usqInt) (dy & 7) << 3)) + (dx & 7);\n\t\tsample = (yBlocks[blockIndex])[sampleIndex];\n\t\tcurX += 1;\n\t\tif (curX < ((yComponent[MCUWidthIndex]) * 8)) {\n\t\t\tyComponent[CurrentXIndex] = curX;\n\t\t}\n\t\telse {\n\t\t\tyComponent[CurrentXIndex] = 0;\n\t\t\tyComponent[CurrentYIndex] = ((yComponent[CurrentYIndex]) + 1);\n\t\t}\n\t\ty = sample;\n\t\t/* begin nextSampleCb */\n\t\tdx1 = curX1 = cbComponent[CurrentXIndex];\n\t\tdy1 = cbComponent[CurrentYIndex];\n\t\tsx1 = cbComponent[HScaleIndex];\n\t\tsy1 = cbComponent[VScaleIndex];\n\t\tif (!((sx1 == 0)\n\t\t\t && (sy1 == 0))) {\n\t\t\tdx1 = dx1 / sx1;\n\t\t\tdy1 = dy1 / sy1;\n\t\t}\n\t\tblockIndex1 = ((((usqInt) dy1 >> 3)) * (cbComponent[BlockWidthIndex])) + (((usqInt) dx1 >> 3));\n\t\tsampleIndex1 = (((usqInt) (dy1 & 7) << 3)) + (dx1 & 7);\n\t\tsample1 = (cbBlocks[blockIndex1])[sampleIndex1];\n\t\tcurX1 += 1;\n\t\tif (curX1 < ((cbComponent[MCUWidthIndex]) * 8)) {\n\t\t\tcbComponent[CurrentXIndex] = curX1;\n\t\t}\n\t\telse {\n\t\t\tcbComponent[CurrentXIndex] = 0;\n\t\t\tcbComponent[CurrentYIndex] = ((cbComponent[CurrentYIndex]) + 1);\n\t\t}\n\t\tcb = sample1;\n\t\tcb -= SampleOffset;\n\t\t/* begin nextSampleCr */\n\t\tdx2 = curX2 = crComponent[CurrentXIndex];\n\t\tdy2 = crComponent[CurrentYIndex];\n\t\tsx2 = crComponent[HScaleIndex];\n\t\tsy2 = crComponent[VScaleIndex];\n\t\tif (!((sx2 == 0)\n\t\t\t && (sy2 == 0))) {\n\t\t\tdx2 = dx2 / sx2;\n\t\t\tdy2 = dy2 / sy2;\n\t\t}\n\t\tblockIndex2 = ((((usqInt) dy2 >> 3)) * (crComponent[BlockWidthIndex])) + (((usqInt) dx2 >> 3));\n\t\tsampleIndex2 = (((usqInt) (dy2 & 7) << 3)) + (dx2 & 7);\n\t\tsample2 = (crBlocks[blockIndex2])[sampleIndex2];\n\t\tcurX2 += 1;\n\t\tif (curX2 < ((crComponent[MCUWidthIndex]) * 8)) {\n\t\t\tcrComponent[CurrentXIndex] = curX2;\n\t\t}\n\t\telse {\n\t\t\tcrComponent[CurrentXIndex] = 0;\n\t\t\tcrComponent[CurrentYIndex] = ((crComponent[CurrentYIndex]) + 1);\n\t\t}\n\t\tcr = sample2;\n\t\tcr -= SampleOffset;\n\t\tred = (y + (((sqInt) (FIXn1n40200 * cr) >> 16))) + (residuals[RedIndex]);\n\t\tred = ((red < MaxSample) ? red : MaxSample);\n\t\tred = ((red < 0) ? 0 : red);\n\t\tresiduals[RedIndex] = (red & ditherMask);\n\t\tred = red & (MaxSample - ditherMask);\n\t\tred = ((red < 1) ? 1 : red);\n\t\tgreen = ((y - (((sqInt) (FIXn0n34414 * cb) >> 16))) - (((sqInt) (FIXn0n71414 * cr) >> 16))) + (residuals[GreenIndex]);\n\t\tgreen = ((green < MaxSample) ? green : MaxSample);\n\t\tgreen = ((green < 0) ? 0 : green);\n\t\tresiduals[GreenIndex] = (green & ditherMask);\n\t\tgreen = green & (MaxSample - ditherMask);\n\t\tgreen = ((green < 1) ? 1 : green);\n\t\tblue = (y + (((sqInt) (FIXn1n77200 * cb) >> 16))) + (residuals[BlueIndex]);\n\t\tblue = ((blue < MaxSample) ? blue : MaxSample);\n\t\tblue = ((blue < 0) ? 0 : blue);\n\t\tresiduals[BlueIndex] = (blue & ditherMask);\n\t\tblue = blue & (MaxSample - ditherMask);\n\t\tblue = ((blue < 1) ? 1 : blue);\n\t\tjpegBits[i] = (((4278190080UL + (((usqInt) red << 16))) + (((usqInt) green << 8))) + blue);\n\t}\n\tinterpreterProxy->pop(4);\n}\n\n\n/*\tIn:\n\tanArray WordArray of: DCTSize2\n\taColorComponent JPEGColorComponent\n\tdcTable\t\t\tWordArray\n\tacTable\t\t\tWordArray\n\tstream\t\t\tJPEGStream\n\t */\n\nEXPORT(sqInt)\nprimitiveDecodeMCU(void)\n{\n    int *anArray;\n    sqInt arrayOop;\n    sqInt bits;\n    sqInt byte;\n    sqInt i;\n    sqInt index;\n    sqInt oop;\n    sqInt streamOop;\n    sqInt zeroCount;\n\n\t;\n\tif (!((interpreterProxy->methodArgumentCount()) == 5)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\toop = interpreterProxy->stackObjectValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!(loadJPEGStreamFrom(oop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tarrayOop = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!(interpreterProxy->isWords(arrayOop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tacTableSize = interpreterProxy->slotSizeOf(arrayOop);\n\tacTable = interpreterProxy->firstIndexableField(arrayOop);\n\tarrayOop = interpreterProxy->stackObjectValue(2);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!(interpreterProxy->isWords(arrayOop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tdcTableSize = interpreterProxy->slotSizeOf(arrayOop);\n\tdcTable = interpreterProxy->firstIndexableField(arrayOop);\n\toop = interpreterProxy->stackObjectValue(3);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!(colorComponentfrom(yComponent, oop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tarrayOop = interpreterProxy->stackObjectValue(4);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!(interpreterProxy->isWords(arrayOop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!((interpreterProxy->slotSizeOf(arrayOop)) == DCTSize2)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tanArray = interpreterProxy->firstIndexableField(arrayOop);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin decodeBlockInto:component: */\n\tbyte = jpegDecodeValueFromsize(dcTable, dcTableSize);\n\tif (byte < 0) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tgoto l1;\n\t}\n\tif (byte != 0) {\n\t\tbits = getBits(byte);\n\t\t/* begin scaleAndSignExtend:inFieldWidth: */\n\t\tif (bits < ((((byte - 1) < 0) ? ((usqInt) 1 >> -(byte - 1)) : ((usqInt) 1 << (byte - 1))))) {\n\t\t\tbyte = (bits - (((byte < 0) ? ((usqInt) 1 >> -byte) : ((usqInt) 1 << byte)))) + 1;\n\t\t\tgoto l2;\n\t\t}\n\t\telse {\n\t\t\tbyte = bits;\n\t\t\tgoto l2;\n\t\t}\n\tl2:\t/* end scaleAndSignExtend:inFieldWidth: */;\n\t}\n\tbyte = yComponent[PriorDCValueIndex] = ((yComponent[PriorDCValueIndex]) + byte);\n\tanArray[0] = byte;\n\tfor (i = 1; i <= (DCTSize2 - 1); i += 1) {\n\t\tanArray[i] = 0;\n\t}\n\tindex = 1;\n\twhile (index < DCTSize2) {\n\t\tbyte = jpegDecodeValueFromsize(acTable, acTableSize);\n\t\tif (byte < 0) {\n\t\t\tinterpreterProxy->primitiveFail();\n\t\t\tgoto l1;\n\t\t}\n\t\tzeroCount = ((usqInt) byte) >> 4;\n\t\tbyte = byte & 15;\n\t\tif (byte != 0) {\n\t\t\tindex += zeroCount;\n\t\t\tbits = getBits(byte);\n\t\t\t/* begin scaleAndSignExtend:inFieldWidth: */\n\t\t\tif (bits < ((((byte - 1) < 0) ? ((usqInt) 1 >> -(byte - 1)) : ((usqInt) 1 << (byte - 1))))) {\n\t\t\t\tbyte = (bits - (((byte < 0) ? ((usqInt) 1 >> -byte) : ((usqInt) 1 << byte)))) + 1;\n\t\t\t\tgoto l3;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tbyte = bits;\n\t\t\t\tgoto l3;\n\t\t\t}\n\t\tl3:\t/* end scaleAndSignExtend:inFieldWidth: */;\n\t\t\tif ((index < 0)\n\t\t\t || (index >= DCTSize2)) {\n\t\t\t\tinterpreterProxy->primitiveFail();\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t\tanArray[jpegNaturalOrder[index]] = byte;\n\t\t}\n\t\telse {\n\t\t\tif (zeroCount == 15) {\n\t\t\t\tindex += zeroCount;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t}\n\t\tindex += 1;\n\t}\nl1:\t/* end decodeBlockInto:component: */;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin storeJPEGStreamOn: */\n\tstreamOop = interpreterProxy->stackValue(0);\n\tinterpreterProxy->storeIntegerofObjectwithValue(1, streamOop, jsPosition);\n\tinterpreterProxy->storeIntegerofObjectwithValue(3, streamOop, jsBitBuffer);\n\tinterpreterProxy->storeIntegerofObjectwithValue(4, streamOop, jsBitCount);\n\tinterpreterProxy->storeIntegerofObjectwithValue(PriorDCValueIndex, interpreterProxy->stackValue(3), yComponent[PriorDCValueIndex]);\n\tinterpreterProxy->pop(5);\n}\n\n\n/*\tIn:\n\tanArray: IntegerArray new: DCTSize2\n\tqt: IntegerArray new: DCTSize2.\n\t */\n\nEXPORT(sqInt)\nprimitiveIdctInt(void)\n{\n    int *anArray;\n    sqInt arrayOop;\n    int *qt;\n\n\t;\n\tif (!((interpreterProxy->methodArgumentCount()) == 2)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tarrayOop = interpreterProxy->stackObjectValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!((interpreterProxy->isWords(arrayOop))\n\t\t && ((interpreterProxy->slotSizeOf(arrayOop)) == DCTSize2))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tqt = interpreterProxy->firstIndexableField(arrayOop);\n\tarrayOop = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!((interpreterProxy->isWords(arrayOop))\n\t\t && ((interpreterProxy->slotSizeOf(arrayOop)) == DCTSize2))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tanArray = interpreterProxy->firstIndexableField(arrayOop);\n\tidctBlockIntqt(anArray, qt);\n\tinterpreterProxy->pop(2);\n}\n\nstatic sqInt\nscaleAndSignExtendinFieldWidth(sqInt aNumber, sqInt w)\n{\n\tif (aNumber < ((((w - 1) < 0) ? ((usqInt) 1 >> -(w - 1)) : ((usqInt) 1 << (w - 1))))) {\n\t\treturn (aNumber - (((w < 0) ? ((usqInt) 1 >> -w) : ((usqInt) 1 << w)))) + 1;\n\t}\n\telse {\n\t\treturn aNumber;\n\t}\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n    sqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\nstatic sqInt\nstInit(void)\n{\n\t;\n}\n\nstatic sqInt\nstoreJPEGStreamOn(sqInt streamOop)\n{\n\tinterpreterProxy->storeIntegerofObjectwithValue(1, streamOop, jsPosition);\n\tinterpreterProxy->storeIntegerofObjectwithValue(3, streamOop, jsBitBuffer);\n\tinterpreterProxy->storeIntegerofObjectwithValue(4, streamOop, jsBitCount);\n}\n\nstatic sqInt\nyColorComponentFrom(sqInt oop)\n{\n\treturn (colorComponentfrom(yComponent, oop))\n\t && (colorComponentBlocksfrom(yBlocks, oop));\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* JPEGReaderPlugin_exports[][3] = {\n\t{\"JPEGReaderPlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"JPEGReaderPlugin\", \"primitiveColorConvertGrayscaleMCU\", (void*)primitiveColorConvertGrayscaleMCU},\n\t{\"JPEGReaderPlugin\", \"primitiveColorConvertMCU\", (void*)primitiveColorConvertMCU},\n\t{\"JPEGReaderPlugin\", \"primitiveDecodeMCU\", (void*)primitiveDecodeMCU},\n\t{\"JPEGReaderPlugin\", \"primitiveIdctInt\", (void*)primitiveIdctInt},\n\t{\"JPEGReaderPlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/JoystickTabletPlugin/JoystickTabletPlugin.c",
    "content": "/* Automatically generated by\n\tSmartSyntaxPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tJoystickTabletPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"JoystickTabletPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"JoystickTabletPlugin.h\"\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n\n/*** Function Prototypes ***/\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nEXPORT(sqInt) initialiseModule(void);\nstatic sqInt msg(char *s);\nEXPORT(sqInt) primitiveGetTabletParameters(void);\nEXPORT(sqInt) primitiveReadJoystick(void);\nEXPORT(sqInt) primitiveReadTablet(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\nEXPORT(sqInt) shutdownModule(void);\nstatic void sqAssert(sqInt aBool);\n\n\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"JoystickTabletPlugin VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"JoystickTabletPlugin VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\n\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nEXPORT(sqInt)\ninitialiseModule(void)\n{\n\treturn joystickInit();\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\n\n/*\tGet information on the pen tablet attached to this machine. Fail if there\n\tis no tablet. If successful, the result is an array of integers; see the\n\tSmalltalk call on this primitive for its interpretation.\n */\n\nEXPORT(sqInt)\nprimitiveGetTabletParameters(void)\n{\n\tsqInt cursorIndex;\n\tsqInt result;\n\tint *  resultPtr;\n\tsqInt resultSize;\n\n\tcursorIndex = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresultSize = tabletResultSize();\n\tresult = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classBitmap(), resultSize);\n\tresultPtr = (int *) interpreterProxy->firstIndexableField(result);\n\tinterpreterProxy->success(tabletGetParameters(cursorIndex, resultPtr));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, result);\n\treturn null;\n}\n\n\n/*\tRead an input word from the joystick with the given index. */\n\nEXPORT(sqInt)\nprimitiveReadJoystick(void)\n{\n\tsqInt index;\n\tsqInt _return_value;\n\n\tindex = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t_return_value = interpreterProxy->positive32BitIntegerFor((joystickRead(index)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\n\n/*\tGet the current state of the cursor of the pen tablet specified by my\n\targument. Fail if there is no tablet. If successful, the result is an\n\tarray of integers; see the Smalltalk call on this primitive for its\n\tinterpretation. \n */\n\nEXPORT(sqInt)\nprimitiveReadTablet(void)\n{\n\tsqInt cursorIndex;\n\tsqInt result;\n\tint *  resultPtr;\n\tsqInt resultSize;\n\n\tcursorIndex = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresultSize = tabletResultSize();\n\tresult = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classBitmap(), resultSize);\n\tresultPtr = (int *) interpreterProxy->firstIndexableField(result);\n\tinterpreterProxy->success(tabletRead(cursorIndex, resultPtr));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, result);\n\treturn null;\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n\tsqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\nEXPORT(sqInt)\nshutdownModule(void)\n{\n\treturn joystickShutdown();\n}\n\nstatic void\nsqAssert(sqInt aBool)\n{\n\t/* missing DebugCode */;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* JoystickTabletPlugin_exports[][3] = {\n\t{\"JoystickTabletPlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"JoystickTabletPlugin\", \"initialiseModule\", (void*)initialiseModule},\n\t{\"JoystickTabletPlugin\", \"primitiveGetTabletParameters\", (void*)primitiveGetTabletParameters},\n\t{\"JoystickTabletPlugin\", \"primitiveReadJoystick\", (void*)primitiveReadJoystick},\n\t{\"JoystickTabletPlugin\", \"primitiveReadTablet\", (void*)primitiveReadTablet},\n\t{\"JoystickTabletPlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{\"JoystickTabletPlugin\", \"shutdownModule\", (void*)shutdownModule},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/Klatt/Klatt.c",
    "content": "/* Automatically generated by\n\tVMPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tKlattSynthesizerPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"KlattSynthesizerPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n#define A1v 46\n#define A2f 34\n#define A2v 47\n#define A3f 35\n#define A3v 48\n#define A4f 36\n#define A4v 49\n#define A5f 37\n#define A6f 38\n#define Anv 45\n#define Aspiration 9\n#define Atv 50\n#define B1 13\n#define B2 17\n#define B2f 40\n#define B3 19\n#define B3f 41\n#define B4 21\n#define B4f 42\n#define B5 23\n#define B5f 43\n#define B6 25\n#define B6f 44\n#define Bnp 27\n#define Bnz 29\n#define Btp 31\n#define Btz 33\n#define Bypass 39\n#define Diplophonia 4\n#define Epsilon 0.0001\n#define F0 0\n#define F1 12\n#define F2 16\n#define F3 18\n#define F4 20\n#define F5 22\n#define F6 24\n#define Flutter 1\n#define Fnp 26\n#define Fnz 28\n#define Friction 10\n#define Ftp 30\n#define Ftz 32\n#define Gain 51\n#define Jitter 2\n#define PI 3.141592653589793\n#define R1c 12\n#define R1vp 3\n#define R2c 13\n#define R2fp 7\n#define R2vp 4\n#define R3c 14\n#define R3fp 8\n#define R3vp 5\n#define R4c 15\n#define R4fp 9\n#define R4vp 6\n#define R5c 16\n#define R5fp 10\n#define R6c 17\n#define R6fp 11\n#define R7c 18\n#define R8c 19\n#define Ra 7\n#define Rk 8\n#define Rnpc 20\n#define Rnpp 1\n#define Rnz 21\n#define Ro 6\n#define Rout 24\n#define Rtpc 22\n#define Rtpp 2\n#define Rtz 23\n#define Shimmer 3\n#define Turbulence 11\n#define Voicing 5\n\n\n/*** Function Prototypes ***/\nstatic void addAmplitudeDiplophonia(void);\nstatic void addFlutter(void);\nstatic void addFrequencyDiplophonia(void);\nstatic void addJitter(void);\nstatic void addShimmer(void);\nstatic void antiResonatorfrequencybandwidth(sqInt index, float  freq, float  bw);\nstatic float antiResonatorvalue(sqInt index, double  aFloat);\nstatic float cascadeBranch(float  source);\nstatic float * checkedFloatPtrOf(sqInt oop);\nstatic short * checkedShortPtrOf(sqInt oop);\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic float glottalSource(void);\nstatic sqInt halt(void);\nstatic float linearFromdB(double  aNumber);\nstatic sqInt loadFrom(sqInt klattOop);\nstatic sqInt msg(char *s);\nstatic sqInt nextRandom(void);\nstatic void normalizeGlottalPulse(void);\nstatic float parallelFrictionBranch(float  source);\nstatic float parallelVoicedBranch(float  source);\nstatic void pitchSynchronousReset(void);\nEXPORT(sqInt) primitiveSynthesizeFrameIntoStartingAt(void);\nstatic float quphicosphisinphirphid(float  u, float  phi, float  cosphi, float  sinphi, float  rphid);\nstatic float resonatorA(sqInt index);\nstatic void resonatorAput(sqInt index, float  aFloat);\nstatic float resonatorB(sqInt index);\nstatic void resonatorBput(sqInt index, float  aFloat);\nstatic float resonatorC(sqInt index);\nstatic void resonatorCput(sqInt index, float  aFloat);\nstatic float resonatorP1(sqInt index);\nstatic void resonatorP1put(sqInt index, float  aFloat);\nstatic float resonatorP2(sqInt index);\nstatic void resonatorP2put(sqInt index, float  aFloat);\nstatic void resonatorfrequencybandwidth(sqInt index, float  freq, float  bw);\nstatic void resonatorfrequencybandwidthgain(sqInt index, float  freq, float  bw, float  gain);\nstatic float resonatorvalue(sqInt index, float  aFloat);\nstatic void rorark(float  roNumber, float  raNumber, float  rkNumber);\nstatic sqInt saveTo(sqInt origKlattOop);\nstatic void setCurrentFrame(float *aKlattFrame);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\nstatic void synthesizeFrameintostartingAt(float *aKlattFrame, short *buffer, sqInt startIndex);\nstatic void voicedPitchSynchronousReset(void);\nstatic float zeroQphicosphisinphirphid(float  phi, float  cosphi, float  sinphi, float  rphid);\n\n\n/*** Variables ***/\nstatic float a1;\nstatic float a2;\nstatic float b1;\nstatic float c1;\nstatic sqInt cascade;\nstatic float * frame;\nstatic float glast;\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"Klatt VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"Klatt VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\nstatic float nlast;\nstatic sqInt nmod;\nstatic sqInt nopen;\nstatic sqInt nper;\nstatic sqInt periodCount;\nstatic float pitch;\nstatic float * resonators;\nstatic sqInt samplesCount;\nstatic sqInt samplesPerFrame;\nstatic sqInt samplingRate;\nstatic sqInt seed;\nstatic sqInt t0;\nstatic float vlast;\nstatic float x1;\nstatic float x2;\n\n\n\n/*\tAdd diplophonia (bicyclic voice). Change voicing amplitude. */\n\nstatic void\naddAmplitudeDiplophonia(void)\n{\n\tif (!((periodCount % 2) == 0)) {\n\n\t\t/* x1 must be <= 0 */\n\n\t\tx1 = x1 * (1.0 - (frame[Diplophonia]));\n\t\tif (x1 > 0) {\n\t\t\tx1 = 0;\n\t\t}\n\t}\n}\n\n\n/*\tAdd F0 flutter, as specified in:\n\t'Analysis, synthesis and perception of voice quality variations among\n\tfemale and male talkers' D.H. Klatt and L.C. Klatt JASA 87(2) February\n\t1990. Flutter is added by applying a quasi-random element constructed from\n\tthree slowly varying sine waves. */\n\nstatic void\naddFlutter(void)\n{\n    float  asin;\n    float  bsin;\n    float  csin;\n    double  deltaF0;\n    float  timeCount;\n\n\ttimeCount = (((float) samplesCount)) / (((float) samplingRate));\n\tasin = sin(((2.0 * PI) * 12.7) * timeCount);\n\tbsin = sin(((2.0 * PI) * 7.1) * timeCount);\n\tcsin = sin(((2.0 * PI) * 4.7) * timeCount);\n\tdeltaF0 = ((((frame[Flutter]) * 2.0) * (frame[F0])) / 100.0) * ((asin + bsin) + csin);\n\tpitch += deltaF0;\n}\n\n\n/*\tAdd diplophonia (bicyclic voice). Change F0. */\n\nstatic void\naddFrequencyDiplophonia(void)\n{\n\tif ((periodCount % 2) == 0) {\n\t\tpitch += ((frame[Diplophonia]) * (frame[F0])) * (1.0 - (frame[Ro]));\n\t}\n\telse {\n\t\tpitch -= ((frame[Diplophonia]) * (frame[F0])) * (1.0 - (frame[Ro]));\n\t}\n}\n\n\n/*\tAdd jitter (random F0 perturbation). */\n\nstatic void\naddJitter(void)\n{\n\tpitch += ((((nextRandom()) - 32767) * (frame[Jitter])) / 32768.0) * (frame[F0]);\n}\n\n\n/*\tAdd shimmer (random voicing amplitude perturbation). */\n\nstatic void\naddShimmer(void)\n{\n\n\t/* x1 must be <= 0 */\n\n\tx1 += ((((nextRandom()) - 32767) * (frame[Shimmer])) / 32768.0) * x1;\n\tif (x1 > 0) {\n\t\tx1 = 0;\n\t}\n}\n\n\n/*\tSet up an anti-resonator */\n\nstatic void\nantiResonatorfrequencybandwidth(sqInt index, float  freq, float  bw)\n{\n    float  a;\n    double  arg;\n    float  b;\n    float  c;\n    float  r;\n\n\targ = ((0.0 - PI) / samplingRate) * bw;\n\tr = exp(arg);\n\tc = 0.0 - (r * r);\n\targ = ((PI * 2.0) / samplingRate) * freq;\n\tb = (r * (cos(arg))) * 2.0;\n\ta = (1.0 - b) - c;\n\ta = 1.0 / a;\n\tb = (0.0 - b) * a;\n\tc = (0.0 - c) * a;\n\t/* begin resonatorA:put: */\n\tresonators[(index * 5) - 5] = a;\n\t/* begin resonatorB:put: */\n\tresonators[(index * 5) - 4] = b;\n\t/* begin resonatorC:put: */\n\tresonators[(index * 5) - 3] = c;\n}\n\nstatic float\nantiResonatorvalue(sqInt index, double  aFloat)\n{\n    double  answer;\n    double  p1;\n\n\tanswer = (((resonatorA(index)) * aFloat) + ((resonatorB(index)) * ((p1 = resonatorP1(index))))) + ((resonatorC(index)) * (resonatorP2(index)));\n\t/* begin resonatorP2:put: */\n\tresonators[(index * 5) - 1] = p1;\n\t/* begin resonatorP1:put: */\n\tresonators[(index * 5) - 2] = aFloat;\n\treturn answer;\n}\n\n\n/*\tCascade vocal tract, excited by laryngeal sources.\n\tNasal antiresonator, nasal resonator, tracheal antirresonator,\n\ttracheal resonator, then formants F8, F7, F6, F5, F4, F3, F2, F1. */\n\nstatic float\ncascadeBranch(float  source)\n{\n    double  answer;\n    double  answer1;\n    float  answer10;\n    float  answer11;\n    float  answer2;\n    float  answer3;\n    float  answer4;\n    float  answer5;\n    float  answer6;\n    float  answer7;\n    float  answer8;\n    float  answer9;\n    float  out;\n    double  p1;\n    double  p11;\n    float  p110;\n    float  p111;\n    float  p12;\n    float  p13;\n    float  p14;\n    float  p15;\n    float  p16;\n    float  p17;\n    float  p18;\n    float  p19;\n\n\tif (!(cascade > 0)) {\n\t\treturn 0.0;\n\t}\n\t/* begin antiResonator:value: */\n\tanswer = (((resonatorA(Rnz)) * source) + ((resonatorB(Rnz)) * ((p1 = resonatorP1(Rnz))))) + ((resonatorC(Rnz)) * (resonatorP2(Rnz)));\n\t/* begin resonatorP2:put: */\n\tresonators[(Rnz * 5) - 1] = p1;\n\t/* begin resonatorP1:put: */\n\tresonators[(Rnz * 5) - 2] = source;\n\tout = answer;\n\t/* begin resonator:value: */\n\n\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\tanswer10 = (((resonatorA(Rnpc)) * out) + ((resonatorB(Rnpc)) * ((p110 = resonatorP1(Rnpc))))) + ((resonatorC(Rnpc)) * (resonatorP2(Rnpc)));\n\t/* begin resonatorP2:put: */\n\tresonators[(Rnpc * 5) - 1] = p110;\n\t/* begin resonatorP1:put: */\n\tresonators[(Rnpc * 5) - 2] = answer10;\n\tout = answer10;\n\t/* begin antiResonator:value: */\n\tanswer1 = (((resonatorA(Rtz)) * out) + ((resonatorB(Rtz)) * ((p11 = resonatorP1(Rtz))))) + ((resonatorC(Rtz)) * (resonatorP2(Rtz)));\n\t/* begin resonatorP2:put: */\n\tresonators[(Rtz * 5) - 1] = p11;\n\t/* begin resonatorP1:put: */\n\tresonators[(Rtz * 5) - 2] = out;\n\tout = answer1;\n\t/* begin resonator:value: */\n\n\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\tanswer11 = (((resonatorA(Rtpc)) * out) + ((resonatorB(Rtpc)) * ((p111 = resonatorP1(Rtpc))))) + ((resonatorC(Rtpc)) * (resonatorP2(Rtpc)));\n\t/* begin resonatorP2:put: */\n\tresonators[(Rtpc * 5) - 1] = p111;\n\t/* begin resonatorP1:put: */\n\tresonators[(Rtpc * 5) - 2] = answer11;\n\tout = answer11;\n\tif (cascade >= 8) {\n\t\t/* begin resonator:value: */\n\n\t\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\t\tanswer2 = (((resonatorA(R8c)) * out) + ((resonatorB(R8c)) * ((p12 = resonatorP1(R8c))))) + ((resonatorC(R8c)) * (resonatorP2(R8c)));\n\t\t/* begin resonatorP2:put: */\n\t\tresonators[(R8c * 5) - 1] = p12;\n\t\t/* begin resonatorP1:put: */\n\t\tresonators[(R8c * 5) - 2] = answer2;\n\t\tout = answer2;\n\t}\n\tif (cascade >= 7) {\n\t\t/* begin resonator:value: */\n\n\t\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\t\tanswer3 = (((resonatorA(R7c)) * out) + ((resonatorB(R7c)) * ((p13 = resonatorP1(R7c))))) + ((resonatorC(R7c)) * (resonatorP2(R7c)));\n\t\t/* begin resonatorP2:put: */\n\t\tresonators[(R7c * 5) - 1] = p13;\n\t\t/* begin resonatorP1:put: */\n\t\tresonators[(R7c * 5) - 2] = answer3;\n\t\tout = answer3;\n\t}\n\tif (cascade >= 6) {\n\t\t/* begin resonator:value: */\n\n\t\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\t\tanswer4 = (((resonatorA(R6c)) * out) + ((resonatorB(R6c)) * ((p14 = resonatorP1(R6c))))) + ((resonatorC(R6c)) * (resonatorP2(R6c)));\n\t\t/* begin resonatorP2:put: */\n\t\tresonators[(R6c * 5) - 1] = p14;\n\t\t/* begin resonatorP1:put: */\n\t\tresonators[(R6c * 5) - 2] = answer4;\n\t\tout = answer4;\n\t}\n\tif (cascade >= 5) {\n\t\t/* begin resonator:value: */\n\n\t\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\t\tanswer5 = (((resonatorA(R5c)) * out) + ((resonatorB(R5c)) * ((p15 = resonatorP1(R5c))))) + ((resonatorC(R5c)) * (resonatorP2(R5c)));\n\t\t/* begin resonatorP2:put: */\n\t\tresonators[(R5c * 5) - 1] = p15;\n\t\t/* begin resonatorP1:put: */\n\t\tresonators[(R5c * 5) - 2] = answer5;\n\t\tout = answer5;\n\t}\n\tif (cascade >= 4) {\n\t\t/* begin resonator:value: */\n\n\t\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\t\tanswer6 = (((resonatorA(R4c)) * out) + ((resonatorB(R4c)) * ((p16 = resonatorP1(R4c))))) + ((resonatorC(R4c)) * (resonatorP2(R4c)));\n\t\t/* begin resonatorP2:put: */\n\t\tresonators[(R4c * 5) - 1] = p16;\n\t\t/* begin resonatorP1:put: */\n\t\tresonators[(R4c * 5) - 2] = answer6;\n\t\tout = answer6;\n\t}\n\tif (cascade >= 3) {\n\t\t/* begin resonator:value: */\n\n\t\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\t\tanswer7 = (((resonatorA(R3c)) * out) + ((resonatorB(R3c)) * ((p17 = resonatorP1(R3c))))) + ((resonatorC(R3c)) * (resonatorP2(R3c)));\n\t\t/* begin resonatorP2:put: */\n\t\tresonators[(R3c * 5) - 1] = p17;\n\t\t/* begin resonatorP1:put: */\n\t\tresonators[(R3c * 5) - 2] = answer7;\n\t\tout = answer7;\n\t}\n\tif (cascade >= 2) {\n\t\t/* begin resonator:value: */\n\n\t\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\t\tanswer8 = (((resonatorA(R2c)) * out) + ((resonatorB(R2c)) * ((p18 = resonatorP1(R2c))))) + ((resonatorC(R2c)) * (resonatorP2(R2c)));\n\t\t/* begin resonatorP2:put: */\n\t\tresonators[(R2c * 5) - 1] = p18;\n\t\t/* begin resonatorP1:put: */\n\t\tresonators[(R2c * 5) - 2] = answer8;\n\t\tout = answer8;\n\t}\n\tif (cascade >= 1) {\n\t\t/* begin resonator:value: */\n\n\t\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\t\tanswer9 = (((resonatorA(R1c)) * out) + ((resonatorB(R1c)) * ((p19 = resonatorP1(R1c))))) + ((resonatorC(R1c)) * (resonatorP2(R1c)));\n\t\t/* begin resonatorP2:put: */\n\t\tresonators[(R1c * 5) - 1] = p19;\n\t\t/* begin resonatorP1:put: */\n\t\tresonators[(R1c * 5) - 2] = answer9;\n\t\tout = answer9;\n\t}\n\treturn out;\n}\n\n\n/*\tReturn the first indexable word of oop which is assumed to be\n\tvariableWordSubclass \n */\n\nstatic float *\ncheckedFloatPtrOf(sqInt oop)\n{\n\tinterpreterProxy->success(interpreterProxy->isWords(oop));\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\treturn ((float *) (interpreterProxy->firstIndexableField(oop)));\n}\n\n\n/*\tReturn the first indexable word of oop which is assumed to be\n\tvariableWordSubclass \n */\n\nstatic short *\ncheckedShortPtrOf(sqInt oop)\n{\n\tinterpreterProxy->success(interpreterProxy->isWords(oop));\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\treturn ((short *) (interpreterProxy->firstIndexableField(oop)));\n}\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic float\nglottalSource(void)\n{\n    float  asin;\n    float  bsin;\n    float  cosphi;\n    float  csin;\n    float  d;\n    double  deltaF0;\n    float  expuphi;\n    float  expuphi1;\n    float  expuphi2;\n    float  expuphi3;\n    float  expuphi4;\n    float  expuphi5;\n    float  gamma;\n    float  gammapwr;\n    sqInt ingore;\n    float  phi;\n    float  qa;\n    float  qb;\n    float  qc;\n    float  qzero;\n    float  r;\n    float  ra;\n    float  rho;\n    float  rk;\n    float  ro;\n    float  rphid;\n    float  s0;\n    float  s1;\n    float  s2;\n    float  sinphi;\n    sqInt te;\n    float  theta;\n    float  timeCount;\n    float  u;\n    float  ua;\n    float  ub;\n    float  uc;\n    float  x0;\n\n\tif (t0 == 0) {\n\t\treturn 0;\n\t}\n\tif (nper < nopen) {\n\t\tx0 = (a1 * x1) + (a2 * x2);\n\t\tx2 = x1;\n\t\tx1 = x0;\n\t}\n\telse {\n\t\tx0 = (b1 * x1) - c1;\n\t\tx1 = x0;\n\t}\n\tif (nper >= t0) {\n\t\tnper = 0;\n\t\t/* begin pitchSynchronousReset */\n\t\tif ((frame[F0]) > 0) {\n\t\t\t/* begin voicedPitchSynchronousReset */\n\n\t\t\t/* Add flutter and jitter (F0 perturbations). */\n\n\t\t\tpitch = frame[F0];\n\t\t\t/* begin addFlutter */\n\t\t\ttimeCount = (((float) samplesCount)) / (((float) samplingRate));\n\t\t\tasin = sin(((2.0 * PI) * 12.7) * timeCount);\n\t\t\tbsin = sin(((2.0 * PI) * 7.1) * timeCount);\n\t\t\tcsin = sin(((2.0 * PI) * 4.7) * timeCount);\n\t\t\tdeltaF0 = ((((frame[Flutter]) * 2.0) * (frame[F0])) / 100.0) * ((asin + bsin) + csin);\n\t\t\tpitch += deltaF0;\n\t\t\t/* begin addJitter */\n\t\t\tpitch += ((((nextRandom()) - 32767) * (frame[Jitter])) / 32768.0) * (frame[F0]);\n\t\t\t/* begin addFrequencyDiplophonia */\n\t\t\tif ((periodCount % 2) == 0) {\n\t\t\t\tpitch += ((frame[Diplophonia]) * (frame[F0])) * (1.0 - (frame[Ro]));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpitch -= ((frame[Diplophonia]) * (frame[F0])) * (1.0 - (frame[Ro]));\n\t\t\t}\n\t\t\tif (pitch < 0) {\n\t\t\t\tpitch = 0;\n\t\t\t}\n\n\t\t\t/* Duration of period before amplitude modulation. */\n\n\t\t\tt0 = ((sqInt)(samplingRate / pitch));\n\t\t\tnmod = t0;\n\t\t\tif ((frame[Voicing]) > 0) {\n\t\t\t\tnmod = ((sqInt) nmod >> 1);\n\t\t\t}\n\n\t\t\t/* Set the LF glottal pulse model parameters. */\n\n\t\t\tnopen = ((sqInt)(t0 * (frame[Ro])));\n\t\t\t/* begin ro:ra:rk: */\n\t\t\tte = ((sqInt)(t0 * (frame[Ro])));\n\t\t\tro = (((double) te )) / (((double) t0 ));\n\t\t\trk = frame[Rk];\n\t\t\tra = frame[Ra];\n\t\t\tif (ra <= 0.0) {\n\t\t\t\td = 1.0;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tr = (1.0 - ro) / ra;\n\t\t\t\td = 1.0 - (r / ((exp(r)) - 1.0));\n\t\t\t}\n\t\t\tphi = PI * (rk + 1.0);\n\t\t\tcosphi = cos(phi);\n\t\t\tsinphi = sin(phi);\n\t\t\trphid = ((ra / ro) * phi) * d;\n\t\t\t/* begin zeroQphi:cosphi:sinphi:rphid: */\n\t\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\t\texpuphi5 = exp(0 * phi);\n\t\t\tqzero = (expuphi5 * ((((rphid * ((0 * 0) + 1.0)) + 0) * sinphi) - cosphi)) + 1.0;\n\t\t\tif (qzero > 0) {\n\t\t\t\tua = 0;\n\t\t\t\tub = 1;\n\t\t\t\tqa = qzero;\n\t\t\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\t\t\texpuphi1 = exp(ub * phi);\n\t\t\t\tqb = (expuphi1 * ((((rphid * ((ub * ub) + 1.0)) + ub) * sinphi) - cosphi)) + 1.0;\n\t\t\t\twhile (qb > 0) {\n\t\t\t\t\tua = ub;\n\t\t\t\t\tqa = qb;\n\t\t\t\t\tub = ub * 2;\n\t\t\t\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\t\t\t\texpuphi = exp(ub * phi);\n\t\t\t\t\tqb = (expuphi * ((((rphid * ((ub * ub) + 1.0)) + ub) * sinphi) - cosphi)) + 1.0;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tua = -1;\n\t\t\t\tub = 0;\n\t\t\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\t\t\texpuphi3 = exp(ua * phi);\n\t\t\t\tqa = (expuphi3 * ((((rphid * ((ua * ua) + 1.0)) + ua) * sinphi) - cosphi)) + 1.0;\n\t\t\t\tqb = qzero;\n\t\t\t\twhile (qa < 0) {\n\t\t\t\t\tub = ua;\n\t\t\t\t\tqb = qa;\n\t\t\t\t\tua = ua * 2;\n\t\t\t\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\t\t\t\texpuphi2 = exp(ua * phi);\n\t\t\t\t\tqa = (expuphi2 * ((((rphid * ((ua * ua) + 1.0)) + ua) * sinphi) - cosphi)) + 1.0;\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile ((ub - ua) > Epsilon) {\n\t\t\t\tuc = (ub + ua) / 2.0;\n\t\t\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\t\t\texpuphi4 = exp(uc * phi);\n\t\t\t\tqc = (expuphi4 * ((((rphid * ((uc * uc) + 1.0)) + uc) * sinphi) - cosphi)) + 1.0;\n\t\t\t\tif (qc > 0) {\n\t\t\t\t\tua = uc;\n\t\t\t\t\tqa = qc;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tub = uc;\n\t\t\t\t\tqb = qc;\n\t\t\t\t}\n\t\t\t}\n\t\t\tu = (ub + ua) / 2.0;\n\t\t\ttheta = phi / te;\n\t\t\trho = exp(u * theta);\n\t\t\ta1 = (2.0 * (cos(theta))) * rho;\n\t\t\ta2 = 0.0 - (rho * rho);\n\t\t\tx2 = 0.0;\n\t\t\tx1 = rho * (sin(theta));\n\t\t\tgamma = exp(-1.0 / (ra * t0));\n\t\t\tgammapwr = pow(gamma,(t0 - te));\n\t\t\tb1 = gamma;\n\t\t\tc1 = ((1.0 - gamma) * gammapwr) / (1.0 - gammapwr);\n\t\t\t/* begin normalizeGlottalPulse */\n\t\t\ts0 = 0.0;\n\t\t\ts1 = x1;\n\t\t\ts2 = x2;\n\t\t\tfor (ingore = 1; ingore <= nopen; ingore += 1) {\n\t\t\t\ts0 = (a1 * s1) + (a2 * s2);\n\t\t\t\ts2 = s1;\n\t\t\t\ts1 = s0;\n\t\t\t}\n\t\t\tif (!(s0 == 0.0)) {\n\t\t\t\tx1 = (x1 / s0) * 10000.0;\n\t\t\t}\n\t\t\t/* begin addShimmer */\n\n\t\t\t/* x1 must be <= 0 */\n\n\t\t\tx1 += ((((nextRandom()) - 32767) * (frame[Shimmer])) / 32768.0) * x1;\n\t\t\tif (x1 > 0) {\n\t\t\t\tx1 = 0;\n\t\t\t}\n\t\t\t/* begin addAmplitudeDiplophonia */\n\t\t\tif (!((periodCount % 2) == 0)) {\n\n\t\t\t\t/* x1 must be <= 0 */\n\n\t\t\t\tx1 = x1 * (1.0 - (frame[Diplophonia]));\n\t\t\t\tif (x1 > 0) {\n\t\t\t\t\tx1 = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tperiodCount = (periodCount + 1) % 65535;\n\t\t}\n\t\telse {\n\t\t\tt0 = 1;\n\t\t\tnmod = t0;\n\t\t}\n\t}\n\tnper += 1;\n\treturn x0;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nstatic float\nlinearFromdB(double  aNumber)\n{\n\treturn (pow(2.0,((aNumber - 87.0) / 6.0))) * 32.767;\n}\n\nstatic sqInt\nloadFrom(sqInt klattOop)\n{\n    sqInt oop;\n\n\tinterpreterProxy->success((interpreterProxy->slotSizeOf(klattOop)) == 22);\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\toop = interpreterProxy->fetchPointerofObject(0, klattOop);\n\t/* begin checkedFloatPtrOf: */\n\tinterpreterProxy->success(interpreterProxy->isWords(oop));\n\tif (interpreterProxy->failed()) {\n\t\tresonators = 0;\n\t\tgoto l1;\n\t}\n\tresonators = ((float *) (interpreterProxy->firstIndexableField(oop)));\nl1:\t/* end checkedFloatPtrOf: */;\n\tpitch = interpreterProxy->fetchFloatofObject(2, klattOop);\n\tt0 = interpreterProxy->fetchIntegerofObject(3, klattOop);\n\tnper = interpreterProxy->fetchIntegerofObject(4, klattOop);\n\tnopen = interpreterProxy->fetchIntegerofObject(5, klattOop);\n\tnmod = interpreterProxy->fetchIntegerofObject(6, klattOop);\n\ta1 = interpreterProxy->fetchFloatofObject(7, klattOop);\n\ta2 = interpreterProxy->fetchFloatofObject(8, klattOop);\n\tx1 = interpreterProxy->fetchFloatofObject(9, klattOop);\n\tx2 = interpreterProxy->fetchFloatofObject(10, klattOop);\n\tb1 = interpreterProxy->fetchFloatofObject(11, klattOop);\n\tc1 = interpreterProxy->fetchFloatofObject(12, klattOop);\n\tglast = interpreterProxy->fetchFloatofObject(13, klattOop);\n\tvlast = interpreterProxy->fetchFloatofObject(14, klattOop);\n\tnlast = interpreterProxy->fetchFloatofObject(15, klattOop);\n\tperiodCount = interpreterProxy->fetchIntegerofObject(16, klattOop);\n\tsamplesCount = interpreterProxy->fetchIntegerofObject(17, klattOop);\n\tseed = interpreterProxy->fetchIntegerofObject(18, klattOop);\n\tcascade = interpreterProxy->fetchIntegerofObject(19, klattOop);\n\tsamplesPerFrame = interpreterProxy->fetchIntegerofObject(20, klattOop);\n\tsamplingRate = interpreterProxy->fetchIntegerofObject(21, klattOop);\n\treturn (interpreterProxy->failed()) == 0;\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\n\n/*\tAnswer a random number between 0 and 65535. */\n\nstatic sqInt\nnextRandom(void)\n{\n\tseed = ((seed * 1309) + 13849) & 65535;\n\treturn seed;\n}\n\nstatic void\nnormalizeGlottalPulse(void)\n{\n    sqInt ingore;\n    float  s0;\n    float  s1;\n    float  s2;\n\n\ts0 = 0.0;\n\ts1 = x1;\n\ts2 = x2;\n\tfor (ingore = 1; ingore <= nopen; ingore += 1) {\n\t\ts0 = (a1 * s1) + (a2 * s2);\n\t\ts2 = s1;\n\t\ts1 = s0;\n\t}\n\tif (!(s0 == 0.0)) {\n\t\tx1 = (x1 / s0) * 10000.0;\n\t}\n}\n\n\n/*\tFriction-excited parallel vocal tract formants F6, F5, F4, F3, F2,\n\toutputs added with alternating sign. Sound source for other\n\tparallel resonators is friction plus first difference of\n\tvoicing waveform. */\n\nstatic float\nparallelFrictionBranch(float  source)\n{\n\treturn ((((resonatorvalue(R2fp, source)) - (resonatorvalue(R3fp, source))) + (resonatorvalue(R4fp, source))) - (resonatorvalue(R5fp, source))) + (resonatorvalue(R6fp, source));\n}\n\n\n/*\tVoice-excited parallel vocal tract F1, F2, F3, F4, FNP and FTP. */\n\nstatic float\nparallelVoicedBranch(float  source)\n{\n\treturn (((((resonatorvalue(R1vp, source)) + (resonatorvalue(R2vp, source))) + (resonatorvalue(R3vp, source))) + (resonatorvalue(R4vp, source))) + (resonatorvalue(Rnpp, source))) + (resonatorvalue(Rtpp, source));\n}\n\nstatic void\npitchSynchronousReset(void)\n{\n    float  asin;\n    float  bsin;\n    float  cosphi;\n    float  csin;\n    float  d;\n    double  deltaF0;\n    float  expuphi;\n    float  expuphi1;\n    float  expuphi2;\n    float  expuphi3;\n    float  expuphi4;\n    float  expuphi5;\n    float  gamma;\n    float  gammapwr;\n    sqInt ingore;\n    float  phi;\n    float  qa;\n    float  qb;\n    float  qc;\n    float  qzero;\n    float  r;\n    float  ra;\n    float  rho;\n    float  rk;\n    float  ro;\n    float  rphid;\n    float  s0;\n    float  s1;\n    float  s2;\n    float  sinphi;\n    sqInt te;\n    float  theta;\n    float  timeCount;\n    float  u;\n    float  ua;\n    float  ub;\n    float  uc;\n\n\tif ((frame[F0]) > 0) {\n\t\t/* begin voicedPitchSynchronousReset */\n\n\t\t/* Add flutter and jitter (F0 perturbations). */\n\n\t\tpitch = frame[F0];\n\t\t/* begin addFlutter */\n\t\ttimeCount = (((float) samplesCount)) / (((float) samplingRate));\n\t\tasin = sin(((2.0 * PI) * 12.7) * timeCount);\n\t\tbsin = sin(((2.0 * PI) * 7.1) * timeCount);\n\t\tcsin = sin(((2.0 * PI) * 4.7) * timeCount);\n\t\tdeltaF0 = ((((frame[Flutter]) * 2.0) * (frame[F0])) / 100.0) * ((asin + bsin) + csin);\n\t\tpitch += deltaF0;\n\t\t/* begin addJitter */\n\t\tpitch += ((((nextRandom()) - 32767) * (frame[Jitter])) / 32768.0) * (frame[F0]);\n\t\t/* begin addFrequencyDiplophonia */\n\t\tif ((periodCount % 2) == 0) {\n\t\t\tpitch += ((frame[Diplophonia]) * (frame[F0])) * (1.0 - (frame[Ro]));\n\t\t}\n\t\telse {\n\t\t\tpitch -= ((frame[Diplophonia]) * (frame[F0])) * (1.0 - (frame[Ro]));\n\t\t}\n\t\tif (pitch < 0) {\n\t\t\tpitch = 0;\n\t\t}\n\n\t\t/* Duration of period before amplitude modulation. */\n\n\t\tt0 = ((sqInt)(samplingRate / pitch));\n\t\tnmod = t0;\n\t\tif ((frame[Voicing]) > 0) {\n\t\t\tnmod = ((sqInt) nmod >> 1);\n\t\t}\n\n\t\t/* Set the LF glottal pulse model parameters. */\n\n\t\tnopen = ((sqInt)(t0 * (frame[Ro])));\n\t\t/* begin ro:ra:rk: */\n\t\tte = ((sqInt)(t0 * (frame[Ro])));\n\t\tro = (((double) te )) / (((double) t0 ));\n\t\trk = frame[Rk];\n\t\tra = frame[Ra];\n\t\tif (ra <= 0.0) {\n\t\t\td = 1.0;\n\t\t}\n\t\telse {\n\t\t\tr = (1.0 - ro) / ra;\n\t\t\td = 1.0 - (r / ((exp(r)) - 1.0));\n\t\t}\n\t\tphi = PI * (rk + 1.0);\n\t\tcosphi = cos(phi);\n\t\tsinphi = sin(phi);\n\t\trphid = ((ra / ro) * phi) * d;\n\t\t/* begin zeroQphi:cosphi:sinphi:rphid: */\n\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\texpuphi5 = exp(0 * phi);\n\t\tqzero = (expuphi5 * ((((rphid * ((0 * 0) + 1.0)) + 0) * sinphi) - cosphi)) + 1.0;\n\t\tif (qzero > 0) {\n\t\t\tua = 0;\n\t\t\tub = 1;\n\t\t\tqa = qzero;\n\t\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\t\texpuphi1 = exp(ub * phi);\n\t\t\tqb = (expuphi1 * ((((rphid * ((ub * ub) + 1.0)) + ub) * sinphi) - cosphi)) + 1.0;\n\t\t\twhile (qb > 0) {\n\t\t\t\tua = ub;\n\t\t\t\tqa = qb;\n\t\t\t\tub = ub * 2;\n\t\t\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\t\t\texpuphi = exp(ub * phi);\n\t\t\t\tqb = (expuphi * ((((rphid * ((ub * ub) + 1.0)) + ub) * sinphi) - cosphi)) + 1.0;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tua = -1;\n\t\t\tub = 0;\n\t\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\t\texpuphi3 = exp(ua * phi);\n\t\t\tqa = (expuphi3 * ((((rphid * ((ua * ua) + 1.0)) + ua) * sinphi) - cosphi)) + 1.0;\n\t\t\tqb = qzero;\n\t\t\twhile (qa < 0) {\n\t\t\t\tub = ua;\n\t\t\t\tqb = qa;\n\t\t\t\tua = ua * 2;\n\t\t\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\t\t\texpuphi2 = exp(ua * phi);\n\t\t\t\tqa = (expuphi2 * ((((rphid * ((ua * ua) + 1.0)) + ua) * sinphi) - cosphi)) + 1.0;\n\t\t\t}\n\t\t}\n\t\twhile ((ub - ua) > Epsilon) {\n\t\t\tuc = (ub + ua) / 2.0;\n\t\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\t\texpuphi4 = exp(uc * phi);\n\t\t\tqc = (expuphi4 * ((((rphid * ((uc * uc) + 1.0)) + uc) * sinphi) - cosphi)) + 1.0;\n\t\t\tif (qc > 0) {\n\t\t\t\tua = uc;\n\t\t\t\tqa = qc;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tub = uc;\n\t\t\t\tqb = qc;\n\t\t\t}\n\t\t}\n\t\tu = (ub + ua) / 2.0;\n\t\ttheta = phi / te;\n\t\trho = exp(u * theta);\n\t\ta1 = (2.0 * (cos(theta))) * rho;\n\t\ta2 = 0.0 - (rho * rho);\n\t\tx2 = 0.0;\n\t\tx1 = rho * (sin(theta));\n\t\tgamma = exp(-1.0 / (ra * t0));\n\t\tgammapwr = pow(gamma,(t0 - te));\n\t\tb1 = gamma;\n\t\tc1 = ((1.0 - gamma) * gammapwr) / (1.0 - gammapwr);\n\t\t/* begin normalizeGlottalPulse */\n\t\ts0 = 0.0;\n\t\ts1 = x1;\n\t\ts2 = x2;\n\t\tfor (ingore = 1; ingore <= nopen; ingore += 1) {\n\t\t\ts0 = (a1 * s1) + (a2 * s2);\n\t\t\ts2 = s1;\n\t\t\ts1 = s0;\n\t\t}\n\t\tif (!(s0 == 0.0)) {\n\t\t\tx1 = (x1 / s0) * 10000.0;\n\t\t}\n\t\t/* begin addShimmer */\n\n\t\t/* x1 must be <= 0 */\n\n\t\tx1 += ((((nextRandom()) - 32767) * (frame[Shimmer])) / 32768.0) * x1;\n\t\tif (x1 > 0) {\n\t\t\tx1 = 0;\n\t\t}\n\t\t/* begin addAmplitudeDiplophonia */\n\t\tif (!((periodCount % 2) == 0)) {\n\n\t\t\t/* x1 must be <= 0 */\n\n\t\t\tx1 = x1 * (1.0 - (frame[Diplophonia]));\n\t\t\tif (x1 > 0) {\n\t\t\t\tx1 = 0;\n\t\t\t}\n\t\t}\n\t\tperiodCount = (periodCount + 1) % 65535;\n\t}\n\telse {\n\t\tt0 = 1;\n\t\tnmod = t0;\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveSynthesizeFrameIntoStartingAt(void)\n{\n    float  aFloat;\n    float  aFloat1;\n    float  aFloat10;\n    float  aFloat11;\n    float  aFloat2;\n    float  aFloat3;\n    float  aFloat4;\n    float  aFloat5;\n    float  aFloat6;\n    float  aFloat7;\n    float  aFloat8;\n    float  aFloat9;\n    float *aKlattFrame;\n    float  ampF1V;\n    float  ampF2F;\n    float  ampF2V;\n    float  ampF3F;\n    float  ampF3V;\n    float  ampF4F;\n    float  ampF4V;\n    float  ampF5F;\n    float  ampF6F;\n    float  ampFNV;\n    float  ampFTV;\n    float  ampGain;\n    float  answer;\n    double  answer1;\n    float  answer10;\n    float  answer11;\n    double  answer12;\n    float  answer2;\n    float  answer3;\n    float  answer4;\n    float  answer5;\n    float  answer6;\n    float  answer7;\n    float  answer8;\n    float  answer9;\n    float  asin;\n    float  aspiration;\n    float  aspirationNoise;\n    float  bsin;\n    short *buffer;\n    sqInt bufferOop;\n    float  bypass;\n    float  cosphi;\n    float  csin;\n    float  d;\n    double  deltaF0;\n    float  expuphi;\n    float  expuphi1;\n    float  expuphi2;\n    float  expuphi3;\n    float  expuphi4;\n    float  expuphi5;\n    float  friction;\n    float  frictionNoise;\n    float  gain;\n    float  gamma;\n    float  gammapwr;\n    float  glotout;\n    sqInt index;\n    sqInt ingore;\n    float  noise;\n    sqInt oop;\n    sqInt oop1;\n    float  out;\n    float  out1;\n    float  p1;\n    double  p11;\n    float  p110;\n    float  p111;\n    double  p112;\n    float  p12;\n    float  p13;\n    float  p14;\n    float  p15;\n    float  p16;\n    float  p17;\n    float  p18;\n    float  p19;\n    float  parGlotout;\n    float  parVoicing;\n    float  phi;\n    float  qa;\n    float  qb;\n    float  qc;\n    float  qzero;\n    float  r;\n    float  ra;\n    sqInt rcvr;\n    float  rho;\n    float  rk;\n    float  ro;\n    float  rphid;\n    float  s0;\n    float  s1;\n    float  s2;\n    float  sinphi;\n    float  source;\n    sqInt startIndex;\n    sqInt te;\n    sqInt temp;\n    float  theta;\n    float  timeCount;\n    sqInt top;\n    float  turbulence;\n    float  u;\n    float  ua;\n    float  ub;\n    float  uc;\n    float  voice;\n    float  voicing;\n    float  x0;\n\n\t/* begin checkedFloatPtrOf: */\n\toop = interpreterProxy->stackValue(2);\n\tinterpreterProxy->success(interpreterProxy->isWords(oop));\n\tif (interpreterProxy->failed()) {\n\t\taKlattFrame = 0;\n\t\tgoto l1;\n\t}\n\taKlattFrame = ((float *) (interpreterProxy->firstIndexableField(oop)));\nl1:\t/* end checkedFloatPtrOf: */;\n\t/* begin checkedShortPtrOf: */\n\toop1 = bufferOop = interpreterProxy->stackValue(1);\n\tinterpreterProxy->success(interpreterProxy->isWords(oop1));\n\tif (interpreterProxy->failed()) {\n\t\tbuffer = 0;\n\t\tgoto l2;\n\t}\n\tbuffer = ((short *) (interpreterProxy->firstIndexableField(oop1)));\nl2:\t/* end checkedShortPtrOf: */;\n\tstartIndex = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\trcvr = interpreterProxy->stackObjectValue(3);\n\tif (!(loadFrom(rcvr))) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->success(((interpreterProxy->stSizeOf(bufferOop)) * 2) >= samplesPerFrame);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin synthesizeFrame:into:startingAt: */\n\t/* begin setCurrentFrame: */\n\n\t/* Fudge factors... */\n\n\tframe = aKlattFrame;\n\n\t/* -4.44 dB */\n\n\tampFNV = (linearFromdB(frame[Anv])) * 0.6;\n\n\t/* -4.44 dB */\n\n\tampFTV = (linearFromdB(frame[Atv])) * 0.6;\n\n\t/* -7.96 dB */\n\n\tampF1V = (linearFromdB(frame[A1v])) * 0.4;\n\n\t/* -16.5 dB */\n\n\tampF2V = (linearFromdB(frame[A2v])) * 0.15;\n\n\t/* -24.4 dB */\n\n\tampF3V = (linearFromdB(frame[A3v])) * 0.06;\n\n\t/* -28.0 dB */\n\n\tampF4V = (linearFromdB(frame[A4v])) * 0.04;\n\n\t/* -16.5 dB */\n\n\tampF2F = (linearFromdB(frame[A2f])) * 0.15;\n\n\t/* -24.4 dB */\n\n\tampF3F = (linearFromdB(frame[A3f])) * 0.06;\n\n\t/* -28.0 dB */\n\n\tampF4F = (linearFromdB(frame[A4f])) * 0.04;\n\n\t/* -33.2 dB */\n\n\tampF5F = (linearFromdB(frame[A5f])) * 0.022;\n\n\t/* -30.5 dB */\n\t/* Set coefficients of variable cascade resonators */\n\n\tampF6F = (linearFromdB(frame[A6f])) * 0.03;\n\tif (cascade >= 8) {\n\t\tif (samplingRate >= 16000) {\n\t\t\tresonatorfrequencybandwidth(R8c, 7500, 600);\n\t\t}\n\t\telse {\n\t\t\tcascade = 6;\n\t\t}\n\t}\n\tif (cascade >= 7) {\n\t\tif (samplingRate >= 16000) {\n\t\t\tresonatorfrequencybandwidth(R7c, 6500, 500);\n\t\t}\n\t\telse {\n\t\t\tcascade = 6;\n\t\t}\n\t}\n\tif (cascade >= 6) {\n\t\tresonatorfrequencybandwidth(R6c, frame[F6], frame[B6]);\n\t}\n\tif (cascade >= 5) {\n\t\tresonatorfrequencybandwidth(R5c, frame[F5], frame[B5]);\n\t}\n\tresonatorfrequencybandwidth(R4c, frame[F4], frame[B4]);\n\tresonatorfrequencybandwidth(R3c, frame[F3], frame[B3]);\n\tresonatorfrequencybandwidth(R2c, frame[F2], frame[B2]);\n\tresonatorfrequencybandwidth(R1c, frame[F1], frame[B1]);\n\tresonatorfrequencybandwidth(Rnpc, frame[Fnp], frame[Bnp]);\n\tresonatorfrequencybandwidth(Rtpc, frame[Ftp], frame[Btp]);\n\tantiResonatorfrequencybandwidth(Rnz, frame[Fnz], frame[Bnz]);\n\tantiResonatorfrequencybandwidth(Rtz, frame[Ftz], frame[Btz]);\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(Rnpp, frame[Fnp], frame[Bnp]);\n\t/* begin resonatorA:put: */\n\taFloat = (resonatorA(Rnpp)) * ampFNV;\n\tresonators[(Rnpp * 5) - 5] = aFloat;\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(Rtpp, frame[Ftp], frame[Btp]);\n\t/* begin resonatorA:put: */\n\taFloat1 = (resonatorA(Rtpp)) * ampFTV;\n\tresonators[(Rtpp * 5) - 5] = aFloat1;\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(R1vp, frame[F1], frame[B1]);\n\t/* begin resonatorA:put: */\n\taFloat2 = (resonatorA(R1vp)) * ampF1V;\n\tresonators[(R1vp * 5) - 5] = aFloat2;\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(R2vp, frame[F2], frame[B2]);\n\t/* begin resonatorA:put: */\n\taFloat3 = (resonatorA(R2vp)) * ampF2V;\n\tresonators[(R2vp * 5) - 5] = aFloat3;\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(R3vp, frame[F3], frame[B3]);\n\t/* begin resonatorA:put: */\n\taFloat4 = (resonatorA(R3vp)) * ampF3V;\n\tresonators[(R3vp * 5) - 5] = aFloat4;\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(R4vp, frame[F4], frame[B4]);\n\t/* begin resonatorA:put: */\n\taFloat5 = (resonatorA(R4vp)) * ampF4V;\n\tresonators[(R4vp * 5) - 5] = aFloat5;\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(R2fp, frame[F2], frame[B2f]);\n\t/* begin resonatorA:put: */\n\taFloat6 = (resonatorA(R2fp)) * ampF2F;\n\tresonators[(R2fp * 5) - 5] = aFloat6;\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(R3fp, frame[F3], frame[B3f]);\n\t/* begin resonatorA:put: */\n\taFloat7 = (resonatorA(R3fp)) * ampF3F;\n\tresonators[(R3fp * 5) - 5] = aFloat7;\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(R4fp, frame[F4], frame[B4f]);\n\t/* begin resonatorA:put: */\n\taFloat8 = (resonatorA(R4fp)) * ampF4F;\n\tresonators[(R4fp * 5) - 5] = aFloat8;\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(R5fp, frame[F5], frame[B5f]);\n\t/* begin resonatorA:put: */\n\taFloat9 = (resonatorA(R5fp)) * ampF5F;\n\tresonators[(R5fp * 5) - 5] = aFloat9;\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(R6fp, frame[F6], frame[B6f]);\n\t/* begin resonatorA:put: */\n\taFloat10 = (resonatorA(R6fp)) * ampF6F;\n\tresonators[(R6fp * 5) - 5] = aFloat10;\n\tif (pitch > 0) {\n\t\t/* begin linearFromdB: */\n\t\tvoicing = (pow(2.0,((((frame[Voicing]) - 7) - 87.0) / 6.0))) * 32.767;\n\t\t/* begin linearFromdB: */\n\t\tparVoicing = (pow(2.0,(((frame[Voicing]) - 87.0) / 6.0))) * 32.767;\n\t\tturbulence = (linearFromdB(frame[Turbulence])) * 0.1;\n\t}\n\telse {\n\t\tvoicing = parVoicing = turbulence = 0.0;\n\t}\n\tfriction = (linearFromdB(frame[Friction])) * 0.25;\n\taspiration = (linearFromdB(frame[Aspiration])) * 0.05;\n\n\t/* -26.0 dB */\n\t/* Flod overall gain into output resonator (low-pass filter) */\n\n\tbypass = (linearFromdB(frame[Bypass])) * 0.05;\n\tgain = (frame[Gain]) - 3;\n\tif (gain <= 0) {\n\t\tgain = 57;\n\t}\n\t/* begin linearFromdB: */\n\tampGain = (pow(2.0,((gain - 87.0) / 6.0))) * 32.767;\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(Rout, 0, samplingRate);\n\t/* begin resonatorA:put: */\n\taFloat11 = (resonatorA(Rout)) * ampGain;\n\tresonators[(Rout * 5) - 5] = aFloat11;\n\tnoise = nlast;\n\tindex = startIndex;\n\ttop = (samplesPerFrame + startIndex) - 1;\n\twhile (index <= top) {\n\n\t\t/* Get low-passed random number for aspiration and friction noise */\n\t\t/* radom number between -8196.0 and 8196.0 */\n\t\t/* Tilt down noise spectrum by soft low-pass filter having\n\t\t a pole near the origin in the z-plane. */\n\n\t\tnoise = (((double) ((nextRandom()) - 32768) )) / 4.0;\n\t\tnoise += 0.75 * nlast;\n\n\t\t/* Amplitude modulate noise (reduce noise amplitude during second\n\t\t half of glottal period) if voicing  simultaneously present. */\n\n\t\tnlast = noise;\n\t\tif (nper > nmod) {\n\t\t\tnoise = noise * 0.5;\n\t\t}\n\n\t\t/* Compute voicing waveform. */\n\n\t\tfrictionNoise = friction * noise;\n\t\t/* begin glottalSource */\n\t\tif (t0 == 0) {\n\t\t\tvoice = 0;\n\t\t\tgoto l3;\n\t\t}\n\t\tif (nper < nopen) {\n\t\t\tx0 = (a1 * x1) + (a2 * x2);\n\t\t\tx2 = x1;\n\t\t\tx1 = x0;\n\t\t}\n\t\telse {\n\t\t\tx0 = (b1 * x1) - c1;\n\t\t\tx1 = x0;\n\t\t}\n\t\tif (nper >= t0) {\n\t\t\tnper = 0;\n\t\t\t/* begin pitchSynchronousReset */\n\t\t\tif ((frame[F0]) > 0) {\n\t\t\t\t/* begin voicedPitchSynchronousReset */\n\n\t\t\t\t/* Add flutter and jitter (F0 perturbations). */\n\n\t\t\t\tpitch = frame[F0];\n\t\t\t\t/* begin addFlutter */\n\t\t\t\ttimeCount = (((float) samplesCount)) / (((float) samplingRate));\n\t\t\t\tasin = sin(((2.0 * PI) * 12.7) * timeCount);\n\t\t\t\tbsin = sin(((2.0 * PI) * 7.1) * timeCount);\n\t\t\t\tcsin = sin(((2.0 * PI) * 4.7) * timeCount);\n\t\t\t\tdeltaF0 = ((((frame[Flutter]) * 2.0) * (frame[F0])) / 100.0) * ((asin + bsin) + csin);\n\t\t\t\tpitch += deltaF0;\n\t\t\t\t/* begin addJitter */\n\t\t\t\tpitch += ((((nextRandom()) - 32767) * (frame[Jitter])) / 32768.0) * (frame[F0]);\n\t\t\t\t/* begin addFrequencyDiplophonia */\n\t\t\t\tif ((periodCount % 2) == 0) {\n\t\t\t\t\tpitch += ((frame[Diplophonia]) * (frame[F0])) * (1.0 - (frame[Ro]));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpitch -= ((frame[Diplophonia]) * (frame[F0])) * (1.0 - (frame[Ro]));\n\t\t\t\t}\n\t\t\t\tif (pitch < 0) {\n\t\t\t\t\tpitch = 0;\n\t\t\t\t}\n\n\t\t\t\t/* Duration of period before amplitude modulation. */\n\n\t\t\t\tt0 = ((sqInt)(samplingRate / pitch));\n\t\t\t\tnmod = t0;\n\t\t\t\tif ((frame[Voicing]) > 0) {\n\t\t\t\t\tnmod = ((sqInt) nmod >> 1);\n\t\t\t\t}\n\n\t\t\t\t/* Set the LF glottal pulse model parameters. */\n\n\t\t\t\tnopen = ((sqInt)(t0 * (frame[Ro])));\n\t\t\t\t/* begin ro:ra:rk: */\n\t\t\t\tte = ((sqInt)(t0 * (frame[Ro])));\n\t\t\t\tro = (((double) te )) / (((double) t0 ));\n\t\t\t\trk = frame[Rk];\n\t\t\t\tra = frame[Ra];\n\t\t\t\tif (ra <= 0.0) {\n\t\t\t\t\td = 1.0;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tr = (1.0 - ro) / ra;\n\t\t\t\t\td = 1.0 - (r / ((exp(r)) - 1.0));\n\t\t\t\t}\n\t\t\t\tphi = PI * (rk + 1.0);\n\t\t\t\tcosphi = cos(phi);\n\t\t\t\tsinphi = sin(phi);\n\t\t\t\trphid = ((ra / ro) * phi) * d;\n\t\t\t\t/* begin zeroQphi:cosphi:sinphi:rphid: */\n\t\t\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\t\t\texpuphi5 = exp(0 * phi);\n\t\t\t\tqzero = (expuphi5 * ((((rphid * ((0 * 0) + 1.0)) + 0) * sinphi) - cosphi)) + 1.0;\n\t\t\t\tif (qzero > 0) {\n\t\t\t\t\tua = 0;\n\t\t\t\t\tub = 1;\n\t\t\t\t\tqa = qzero;\n\t\t\t\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\t\t\t\texpuphi1 = exp(ub * phi);\n\t\t\t\t\tqb = (expuphi1 * ((((rphid * ((ub * ub) + 1.0)) + ub) * sinphi) - cosphi)) + 1.0;\n\t\t\t\t\twhile (qb > 0) {\n\t\t\t\t\t\tua = ub;\n\t\t\t\t\t\tqa = qb;\n\t\t\t\t\t\tub = ub * 2;\n\t\t\t\t\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\t\t\t\t\texpuphi = exp(ub * phi);\n\t\t\t\t\t\tqb = (expuphi * ((((rphid * ((ub * ub) + 1.0)) + ub) * sinphi) - cosphi)) + 1.0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tua = -1;\n\t\t\t\t\tub = 0;\n\t\t\t\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\t\t\t\texpuphi3 = exp(ua * phi);\n\t\t\t\t\tqa = (expuphi3 * ((((rphid * ((ua * ua) + 1.0)) + ua) * sinphi) - cosphi)) + 1.0;\n\t\t\t\t\tqb = qzero;\n\t\t\t\t\twhile (qa < 0) {\n\t\t\t\t\t\tub = ua;\n\t\t\t\t\t\tqb = qa;\n\t\t\t\t\t\tua = ua * 2;\n\t\t\t\t\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\t\t\t\t\texpuphi2 = exp(ua * phi);\n\t\t\t\t\t\tqa = (expuphi2 * ((((rphid * ((ua * ua) + 1.0)) + ua) * sinphi) - cosphi)) + 1.0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile ((ub - ua) > Epsilon) {\n\t\t\t\t\tuc = (ub + ua) / 2.0;\n\t\t\t\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\t\t\t\texpuphi4 = exp(uc * phi);\n\t\t\t\t\tqc = (expuphi4 * ((((rphid * ((uc * uc) + 1.0)) + uc) * sinphi) - cosphi)) + 1.0;\n\t\t\t\t\tif (qc > 0) {\n\t\t\t\t\t\tua = uc;\n\t\t\t\t\t\tqa = qc;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tub = uc;\n\t\t\t\t\t\tqb = qc;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tu = (ub + ua) / 2.0;\n\t\t\t\ttheta = phi / te;\n\t\t\t\trho = exp(u * theta);\n\t\t\t\ta1 = (2.0 * (cos(theta))) * rho;\n\t\t\t\ta2 = 0.0 - (rho * rho);\n\t\t\t\tx2 = 0.0;\n\t\t\t\tx1 = rho * (sin(theta));\n\t\t\t\tgamma = exp(-1.0 / (ra * t0));\n\t\t\t\tgammapwr = pow(gamma,(t0 - te));\n\t\t\t\tb1 = gamma;\n\t\t\t\tc1 = ((1.0 - gamma) * gammapwr) / (1.0 - gammapwr);\n\t\t\t\t/* begin normalizeGlottalPulse */\n\t\t\t\ts0 = 0.0;\n\t\t\t\ts1 = x1;\n\t\t\t\ts2 = x2;\n\t\t\t\tfor (ingore = 1; ingore <= nopen; ingore += 1) {\n\t\t\t\t\ts0 = (a1 * s1) + (a2 * s2);\n\t\t\t\t\ts2 = s1;\n\t\t\t\t\ts1 = s0;\n\t\t\t\t}\n\t\t\t\tif (!(s0 == 0.0)) {\n\t\t\t\t\tx1 = (x1 / s0) * 10000.0;\n\t\t\t\t}\n\t\t\t\t/* begin addShimmer */\n\n\t\t\t\t/* x1 must be <= 0 */\n\n\t\t\t\tx1 += ((((nextRandom()) - 32767) * (frame[Shimmer])) / 32768.0) * x1;\n\t\t\t\tif (x1 > 0) {\n\t\t\t\t\tx1 = 0;\n\t\t\t\t}\n\t\t\t\t/* begin addAmplitudeDiplophonia */\n\t\t\t\tif (!((periodCount % 2) == 0)) {\n\n\t\t\t\t\t/* x1 must be <= 0 */\n\n\t\t\t\t\tx1 = x1 * (1.0 - (frame[Diplophonia]));\n\t\t\t\t\tif (x1 > 0) {\n\t\t\t\t\t\tx1 = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tperiodCount = (periodCount + 1) % 65535;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tt0 = 1;\n\t\t\t\tnmod = t0;\n\t\t\t}\n\t\t}\n\t\tnper += 1;\n\t\tvoice = x0;\n\tl3:\t/* end glottalSource */;\n\n\t\t/* Add turbulence during glottal open phase.\n\t\t Use random rather than noise because noise is low-passed. */\n\n\t\tvlast = voice;\n\t\tif (nper < nopen) {\n\t\t\tvoice += (turbulence * (((double) ((nextRandom()) - 32768) ))) / 4.0;\n\t\t}\n\t\tglotout = voicing * voice;\n\n\t\t/* Compute aspiration amplitude and add to voicing source. */\n\n\t\tparGlotout = parVoicing * voice;\n\t\taspirationNoise = aspiration * noise;\n\t\tglotout += aspirationNoise;\n\n\t\t/* Cascade vocal tract, excited by laryngeal sources.\n\t\t Nasal antiresonator, nasal resonator, trachearl antirresonator,\n\t\t tracheal resonator, then formants F8, F7, F6, F5, F4, F3, F2, F1. */\n\n\t\tparGlotout += aspirationNoise;\n\t\t/* begin cascadeBranch: */\n\t\tif (!(cascade > 0)) {\n\t\t\tout = 0.0;\n\t\t\tgoto l4;\n\t\t}\n\t\t/* begin antiResonator:value: */\n\t\tanswer12 = (((resonatorA(Rnz)) * glotout) + ((resonatorB(Rnz)) * ((p112 = resonatorP1(Rnz))))) + ((resonatorC(Rnz)) * (resonatorP2(Rnz)));\n\t\t/* begin resonatorP2:put: */\n\t\tresonators[(Rnz * 5) - 1] = p112;\n\t\t/* begin resonatorP1:put: */\n\t\tresonators[(Rnz * 5) - 2] = glotout;\n\t\tout1 = answer12;\n\t\t/* begin resonator:value: */\n\n\t\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\t\tanswer10 = (((resonatorA(Rnpc)) * out1) + ((resonatorB(Rnpc)) * ((p110 = resonatorP1(Rnpc))))) + ((resonatorC(Rnpc)) * (resonatorP2(Rnpc)));\n\t\t/* begin resonatorP2:put: */\n\t\tresonators[(Rnpc * 5) - 1] = p110;\n\t\t/* begin resonatorP1:put: */\n\t\tresonators[(Rnpc * 5) - 2] = answer10;\n\t\tout1 = answer10;\n\t\t/* begin antiResonator:value: */\n\t\tanswer1 = (((resonatorA(Rtz)) * out1) + ((resonatorB(Rtz)) * ((p11 = resonatorP1(Rtz))))) + ((resonatorC(Rtz)) * (resonatorP2(Rtz)));\n\t\t/* begin resonatorP2:put: */\n\t\tresonators[(Rtz * 5) - 1] = p11;\n\t\t/* begin resonatorP1:put: */\n\t\tresonators[(Rtz * 5) - 2] = out1;\n\t\tout1 = answer1;\n\t\t/* begin resonator:value: */\n\n\t\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\t\tanswer11 = (((resonatorA(Rtpc)) * out1) + ((resonatorB(Rtpc)) * ((p111 = resonatorP1(Rtpc))))) + ((resonatorC(Rtpc)) * (resonatorP2(Rtpc)));\n\t\t/* begin resonatorP2:put: */\n\t\tresonators[(Rtpc * 5) - 1] = p111;\n\t\t/* begin resonatorP1:put: */\n\t\tresonators[(Rtpc * 5) - 2] = answer11;\n\t\tout1 = answer11;\n\t\tif (cascade >= 8) {\n\t\t\t/* begin resonator:value: */\n\n\t\t\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\t\t\tanswer2 = (((resonatorA(R8c)) * out1) + ((resonatorB(R8c)) * ((p12 = resonatorP1(R8c))))) + ((resonatorC(R8c)) * (resonatorP2(R8c)));\n\t\t\t/* begin resonatorP2:put: */\n\t\t\tresonators[(R8c * 5) - 1] = p12;\n\t\t\t/* begin resonatorP1:put: */\n\t\t\tresonators[(R8c * 5) - 2] = answer2;\n\t\t\tout1 = answer2;\n\t\t}\n\t\tif (cascade >= 7) {\n\t\t\t/* begin resonator:value: */\n\n\t\t\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\t\t\tanswer3 = (((resonatorA(R7c)) * out1) + ((resonatorB(R7c)) * ((p13 = resonatorP1(R7c))))) + ((resonatorC(R7c)) * (resonatorP2(R7c)));\n\t\t\t/* begin resonatorP2:put: */\n\t\t\tresonators[(R7c * 5) - 1] = p13;\n\t\t\t/* begin resonatorP1:put: */\n\t\t\tresonators[(R7c * 5) - 2] = answer3;\n\t\t\tout1 = answer3;\n\t\t}\n\t\tif (cascade >= 6) {\n\t\t\t/* begin resonator:value: */\n\n\t\t\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\t\t\tanswer4 = (((resonatorA(R6c)) * out1) + ((resonatorB(R6c)) * ((p14 = resonatorP1(R6c))))) + ((resonatorC(R6c)) * (resonatorP2(R6c)));\n\t\t\t/* begin resonatorP2:put: */\n\t\t\tresonators[(R6c * 5) - 1] = p14;\n\t\t\t/* begin resonatorP1:put: */\n\t\t\tresonators[(R6c * 5) - 2] = answer4;\n\t\t\tout1 = answer4;\n\t\t}\n\t\tif (cascade >= 5) {\n\t\t\t/* begin resonator:value: */\n\n\t\t\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\t\t\tanswer5 = (((resonatorA(R5c)) * out1) + ((resonatorB(R5c)) * ((p15 = resonatorP1(R5c))))) + ((resonatorC(R5c)) * (resonatorP2(R5c)));\n\t\t\t/* begin resonatorP2:put: */\n\t\t\tresonators[(R5c * 5) - 1] = p15;\n\t\t\t/* begin resonatorP1:put: */\n\t\t\tresonators[(R5c * 5) - 2] = answer5;\n\t\t\tout1 = answer5;\n\t\t}\n\t\tif (cascade >= 4) {\n\t\t\t/* begin resonator:value: */\n\n\t\t\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\t\t\tanswer6 = (((resonatorA(R4c)) * out1) + ((resonatorB(R4c)) * ((p16 = resonatorP1(R4c))))) + ((resonatorC(R4c)) * (resonatorP2(R4c)));\n\t\t\t/* begin resonatorP2:put: */\n\t\t\tresonators[(R4c * 5) - 1] = p16;\n\t\t\t/* begin resonatorP1:put: */\n\t\t\tresonators[(R4c * 5) - 2] = answer6;\n\t\t\tout1 = answer6;\n\t\t}\n\t\tif (cascade >= 3) {\n\t\t\t/* begin resonator:value: */\n\n\t\t\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\t\t\tanswer7 = (((resonatorA(R3c)) * out1) + ((resonatorB(R3c)) * ((p17 = resonatorP1(R3c))))) + ((resonatorC(R3c)) * (resonatorP2(R3c)));\n\t\t\t/* begin resonatorP2:put: */\n\t\t\tresonators[(R3c * 5) - 1] = p17;\n\t\t\t/* begin resonatorP1:put: */\n\t\t\tresonators[(R3c * 5) - 2] = answer7;\n\t\t\tout1 = answer7;\n\t\t}\n\t\tif (cascade >= 2) {\n\t\t\t/* begin resonator:value: */\n\n\t\t\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\t\t\tanswer8 = (((resonatorA(R2c)) * out1) + ((resonatorB(R2c)) * ((p18 = resonatorP1(R2c))))) + ((resonatorC(R2c)) * (resonatorP2(R2c)));\n\t\t\t/* begin resonatorP2:put: */\n\t\t\tresonators[(R2c * 5) - 1] = p18;\n\t\t\t/* begin resonatorP1:put: */\n\t\t\tresonators[(R2c * 5) - 2] = answer8;\n\t\t\tout1 = answer8;\n\t\t}\n\t\tif (cascade >= 1) {\n\t\t\t/* begin resonator:value: */\n\n\t\t\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\t\t\tanswer9 = (((resonatorA(R1c)) * out1) + ((resonatorB(R1c)) * ((p19 = resonatorP1(R1c))))) + ((resonatorC(R1c)) * (resonatorP2(R1c)));\n\t\t\t/* begin resonatorP2:put: */\n\t\t\tresonators[(R1c * 5) - 1] = p19;\n\t\t\t/* begin resonatorP1:put: */\n\t\t\tresonators[(R1c * 5) - 2] = answer9;\n\t\t\tout1 = answer9;\n\t\t}\n\t\tout = out1;\n\tl4:\t/* end cascadeBranch: */;\n\n\t\t/* Source is voicing plus aspiration. */\n\n\t\tsource = parGlotout;\n\n\t\t/* Friction-excited parallel vocal tract formants F6, F5, F4, F3, F2,\n\t\t outputs added with alternating sign. Sound source for other\n\t\t parallel resonators is friction plus first difference of\n\t\t voicing waveform. */\n\n\t\tout += parallelVoicedBranch(source);\n\t\tsource = (frictionNoise + parGlotout) - glast;\n\t\tglast = parGlotout;\n\n\t\t/* Apply bypas and output low-pass filter */\n\n\t\tout = (parallelFrictionBranch(source)) - out;\n\t\tout = (bypass * source) - out;\n\t\t/* begin resonator:value: */\n\n\t\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\t\tanswer = (((resonatorA(Rout)) * out) + ((resonatorB(Rout)) * ((p1 = resonatorP1(Rout))))) + ((resonatorC(Rout)) * (resonatorP2(Rout)));\n\t\t/* begin resonatorP2:put: */\n\t\tresonators[(Rout * 5) - 1] = p1;\n\t\t/* begin resonatorP1:put: */\n\t\tresonators[(Rout * 5) - 2] = answer;\n\t\tout = answer;\n\t\ttemp = ((sqInt)(out * ampGain));\n\t\tif (temp < -32768) {\n\t\t\ttemp = -32768;\n\t\t}\n\t\tif (temp > 32767) {\n\t\t\ttemp = 32767;\n\t\t}\n\t\tbuffer[index - 1] = temp;\n\t\tindex += 1;\n\t\tsamplesCount += 1;\n\t}\n\tif (!(saveTo(rcvr))) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(3);\n}\n\nstatic float\nquphicosphisinphirphid(float  u, float  phi, float  cosphi, float  sinphi, float  rphid)\n{\n    float  expuphi;\n\n\texpuphi = exp(u * phi);\n\treturn (expuphi * ((((rphid * ((u * u) + 1.0)) + u) * sinphi) - cosphi)) + 1.0;\n}\n\nstatic float\nresonatorA(sqInt index)\n{\n\treturn resonators[(index * 5) - 5];\n}\n\nstatic void\nresonatorAput(sqInt index, float  aFloat)\n{\n\tresonators[(index * 5) - 5] = aFloat;\n}\n\nstatic float\nresonatorB(sqInt index)\n{\n\treturn resonators[(index * 5) - 4];\n}\n\nstatic void\nresonatorBput(sqInt index, float  aFloat)\n{\n\tresonators[(index * 5) - 4] = aFloat;\n}\n\nstatic float\nresonatorC(sqInt index)\n{\n\treturn resonators[(index * 5) - 3];\n}\n\nstatic void\nresonatorCput(sqInt index, float  aFloat)\n{\n\tresonators[(index * 5) - 3] = aFloat;\n}\n\nstatic float\nresonatorP1(sqInt index)\n{\n\treturn resonators[(index * 5) - 2];\n}\n\nstatic void\nresonatorP1put(sqInt index, float  aFloat)\n{\n\tresonators[(index * 5) - 2] = aFloat;\n}\n\nstatic float\nresonatorP2(sqInt index)\n{\n\treturn resonators[(index * 5) - 1];\n}\n\nstatic void\nresonatorP2put(sqInt index, float  aFloat)\n{\n\tresonators[(index * 5) - 1] = aFloat;\n}\n\n\n/*\tConvert formant frequencies and bandwidth into\n\tresonator difference equation coefficients. */\n\nstatic void\nresonatorfrequencybandwidth(sqInt index, float  freq, float  bw)\n{\n    float  a;\n    double  arg;\n    float  b;\n    float  c;\n    float  r;\n\n\targ = ((0.0 - PI) / samplingRate) * bw;\n\tr = exp(arg);\n\tc = 0.0 - (r * r);\n\targ = ((PI * 2.0) / samplingRate) * freq;\n\tb = (r * (cos(arg))) * 2.0;\n\ta = (1.0 - b) - c;\n\t/* begin resonatorA:put: */\n\tresonators[(index * 5) - 5] = a;\n\t/* begin resonatorB:put: */\n\tresonators[(index * 5) - 4] = b;\n\t/* begin resonatorC:put: */\n\tresonators[(index * 5) - 3] = c;\n}\n\n\n/*\tConvert formant frequencies and bandwidth into\n\tresonator difference equation coefficients. */\n\nstatic void\nresonatorfrequencybandwidthgain(sqInt index, float  freq, float  bw, float  gain)\n{\n    float  aFloat;\n\n\tresonatorfrequencybandwidth(index, freq, bw);\n\t/* begin resonatorA:put: */\n\taFloat = (resonatorA(index)) * gain;\n\tresonators[(index * 5) - 5] = aFloat;\n}\n\nstatic float\nresonatorvalue(sqInt index, float  aFloat)\n{\n    float  answer;\n    float  p1;\n\n\n\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\tanswer = (((resonatorA(index)) * aFloat) + ((resonatorB(index)) * ((p1 = resonatorP1(index))))) + ((resonatorC(index)) * (resonatorP2(index)));\n\t/* begin resonatorP2:put: */\n\tresonators[(index * 5) - 1] = p1;\n\t/* begin resonatorP1:put: */\n\tresonators[(index * 5) - 2] = answer;\n\treturn answer;\n}\n\nstatic void\nrorark(float  roNumber, float  raNumber, float  rkNumber)\n{\n    float  cosphi;\n    float  d;\n    float  expuphi;\n    float  expuphi1;\n    float  expuphi2;\n    float  expuphi3;\n    float  expuphi4;\n    float  expuphi5;\n    float  gamma;\n    float  gammapwr;\n    sqInt ingore;\n    float  phi;\n    float  qa;\n    float  qb;\n    float  qc;\n    float  qzero;\n    float  r;\n    float  ra;\n    float  rho;\n    float  rk;\n    float  ro;\n    float  rphid;\n    float  s0;\n    float  s1;\n    float  s2;\n    float  sinphi;\n    sqInt te;\n    float  theta;\n    float  u;\n    float  ua;\n    float  ub;\n    float  uc;\n\n\tte = ((sqInt)(t0 * roNumber));\n\tro = (((double) te )) / (((double) t0 ));\n\trk = rkNumber;\n\tra = raNumber;\n\tif (ra <= 0.0) {\n\t\td = 1.0;\n\t}\n\telse {\n\t\tr = (1.0 - ro) / ra;\n\t\td = 1.0 - (r / ((exp(r)) - 1.0));\n\t}\n\tphi = PI * (rk + 1.0);\n\tcosphi = cos(phi);\n\tsinphi = sin(phi);\n\trphid = ((ra / ro) * phi) * d;\n\t/* begin zeroQphi:cosphi:sinphi:rphid: */\n\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\texpuphi5 = exp(0 * phi);\n\tqzero = (expuphi5 * ((((rphid * ((0 * 0) + 1.0)) + 0) * sinphi) - cosphi)) + 1.0;\n\tif (qzero > 0) {\n\t\tua = 0;\n\t\tub = 1;\n\t\tqa = qzero;\n\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\texpuphi1 = exp(ub * phi);\n\t\tqb = (expuphi1 * ((((rphid * ((ub * ub) + 1.0)) + ub) * sinphi) - cosphi)) + 1.0;\n\t\twhile (qb > 0) {\n\t\t\tua = ub;\n\t\t\tqa = qb;\n\t\t\tub = ub * 2;\n\t\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\t\texpuphi = exp(ub * phi);\n\t\t\tqb = (expuphi * ((((rphid * ((ub * ub) + 1.0)) + ub) * sinphi) - cosphi)) + 1.0;\n\t\t}\n\t}\n\telse {\n\t\tua = -1;\n\t\tub = 0;\n\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\texpuphi3 = exp(ua * phi);\n\t\tqa = (expuphi3 * ((((rphid * ((ua * ua) + 1.0)) + ua) * sinphi) - cosphi)) + 1.0;\n\t\tqb = qzero;\n\t\twhile (qa < 0) {\n\t\t\tub = ua;\n\t\t\tqb = qa;\n\t\t\tua = ua * 2;\n\t\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\t\texpuphi2 = exp(ua * phi);\n\t\t\tqa = (expuphi2 * ((((rphid * ((ua * ua) + 1.0)) + ua) * sinphi) - cosphi)) + 1.0;\n\t\t}\n\t}\n\twhile ((ub - ua) > Epsilon) {\n\t\tuc = (ub + ua) / 2.0;\n\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\texpuphi4 = exp(uc * phi);\n\t\tqc = (expuphi4 * ((((rphid * ((uc * uc) + 1.0)) + uc) * sinphi) - cosphi)) + 1.0;\n\t\tif (qc > 0) {\n\t\t\tua = uc;\n\t\t\tqa = qc;\n\t\t}\n\t\telse {\n\t\t\tub = uc;\n\t\t\tqb = qc;\n\t\t}\n\t}\n\tu = (ub + ua) / 2.0;\n\ttheta = phi / te;\n\trho = exp(u * theta);\n\ta1 = (2.0 * (cos(theta))) * rho;\n\ta2 = 0.0 - (rho * rho);\n\tx2 = 0.0;\n\tx1 = rho * (sin(theta));\n\tgamma = exp(-1.0 / (ra * t0));\n\tgammapwr = pow(gamma,(t0 - te));\n\tb1 = gamma;\n\tc1 = ((1.0 - gamma) * gammapwr) / (1.0 - gammapwr);\n\t/* begin normalizeGlottalPulse */\n\ts0 = 0.0;\n\ts1 = x1;\n\ts2 = x2;\n\tfor (ingore = 1; ingore <= nopen; ingore += 1) {\n\t\ts0 = (a1 * s1) + (a2 * s2);\n\t\ts2 = s1;\n\t\ts1 = s0;\n\t}\n\tif (!(s0 == 0.0)) {\n\t\tx1 = (x1 / s0) * 10000.0;\n\t}\n}\n\nstatic sqInt\nsaveTo(sqInt origKlattOop)\n{\n    sqInt a1Oop;\n    sqInt a2Oop;\n    sqInt b1Oop;\n    sqInt c1Oop;\n    sqInt glastOop;\n    sqInt klattOop;\n    sqInt nlastOop;\n    sqInt pitchOop;\n    sqInt vlastOop;\n    sqInt x1Oop;\n    sqInt x2Oop;\n\n\tinterpreterProxy->pushRemappableOop(origKlattOop);\n\tinterpreterProxy->pushRemappableOop(interpreterProxy->floatObjectOf(pitch));\n\tinterpreterProxy->pushRemappableOop(interpreterProxy->floatObjectOf(a1));\n\tinterpreterProxy->pushRemappableOop(interpreterProxy->floatObjectOf(a2));\n\tinterpreterProxy->pushRemappableOop(interpreterProxy->floatObjectOf(x1));\n\tinterpreterProxy->pushRemappableOop(interpreterProxy->floatObjectOf(x2));\n\tinterpreterProxy->pushRemappableOop(interpreterProxy->floatObjectOf(b1));\n\tinterpreterProxy->pushRemappableOop(interpreterProxy->floatObjectOf(c1));\n\tinterpreterProxy->pushRemappableOop(interpreterProxy->floatObjectOf(glast));\n\tinterpreterProxy->pushRemappableOop(interpreterProxy->floatObjectOf(vlast));\n\tnlastOop = interpreterProxy->floatObjectOf(nlast);\n\tvlastOop = interpreterProxy->popRemappableOop();\n\tglastOop = interpreterProxy->popRemappableOop();\n\tc1Oop = interpreterProxy->popRemappableOop();\n\tb1Oop = interpreterProxy->popRemappableOop();\n\tx2Oop = interpreterProxy->popRemappableOop();\n\tx1Oop = interpreterProxy->popRemappableOop();\n\ta2Oop = interpreterProxy->popRemappableOop();\n\ta1Oop = interpreterProxy->popRemappableOop();\n\tpitchOop = interpreterProxy->popRemappableOop();\n\tklattOop = interpreterProxy->popRemappableOop();\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\tinterpreterProxy->storePointerofObjectwithValue(2, klattOop, pitchOop);\n\tinterpreterProxy->storeIntegerofObjectwithValue(3, klattOop, t0);\n\tinterpreterProxy->storeIntegerofObjectwithValue(4, klattOop, nper);\n\tinterpreterProxy->storeIntegerofObjectwithValue(5, klattOop, nopen);\n\tinterpreterProxy->storeIntegerofObjectwithValue(6, klattOop, nmod);\n\tinterpreterProxy->storePointerofObjectwithValue(7, klattOop, a1Oop);\n\tinterpreterProxy->storePointerofObjectwithValue(8, klattOop, a2Oop);\n\tinterpreterProxy->storePointerofObjectwithValue(9, klattOop, x1Oop);\n\tinterpreterProxy->storePointerofObjectwithValue(10, klattOop, x2Oop);\n\tinterpreterProxy->storePointerofObjectwithValue(11, klattOop, b1Oop);\n\tinterpreterProxy->storePointerofObjectwithValue(12, klattOop, c1Oop);\n\tinterpreterProxy->storePointerofObjectwithValue(13, klattOop, glastOop);\n\tinterpreterProxy->storePointerofObjectwithValue(14, klattOop, vlastOop);\n\tinterpreterProxy->storePointerofObjectwithValue(15, klattOop, nlastOop);\n\tinterpreterProxy->storeIntegerofObjectwithValue(16, klattOop, periodCount);\n\tinterpreterProxy->storeIntegerofObjectwithValue(17, klattOop, samplesCount);\n\tinterpreterProxy->storeIntegerofObjectwithValue(18, klattOop, seed);\n\treturn (interpreterProxy->failed()) == 0;\n}\n\nstatic void\nsetCurrentFrame(float *aKlattFrame)\n{\n    float  aFloat;\n    float  aFloat1;\n    float  aFloat10;\n    float  aFloat2;\n    float  aFloat3;\n    float  aFloat4;\n    float  aFloat5;\n    float  aFloat6;\n    float  aFloat7;\n    float  aFloat8;\n    float  aFloat9;\n    float  ampF1V;\n    float  ampF2F;\n    float  ampF2V;\n    float  ampF3F;\n    float  ampF3V;\n    float  ampF4F;\n    float  ampF4V;\n    float  ampF5F;\n    float  ampF6F;\n    float  ampFNV;\n    float  ampFTV;\n\n\n\t/* Fudge factors... */\n\n\tframe = aKlattFrame;\n\n\t/* -4.44 dB */\n\n\tampFNV = (linearFromdB(frame[Anv])) * 0.6;\n\n\t/* -4.44 dB */\n\n\tampFTV = (linearFromdB(frame[Atv])) * 0.6;\n\n\t/* -7.96 dB */\n\n\tampF1V = (linearFromdB(frame[A1v])) * 0.4;\n\n\t/* -16.5 dB */\n\n\tampF2V = (linearFromdB(frame[A2v])) * 0.15;\n\n\t/* -24.4 dB */\n\n\tampF3V = (linearFromdB(frame[A3v])) * 0.06;\n\n\t/* -28.0 dB */\n\n\tampF4V = (linearFromdB(frame[A4v])) * 0.04;\n\n\t/* -16.5 dB */\n\n\tampF2F = (linearFromdB(frame[A2f])) * 0.15;\n\n\t/* -24.4 dB */\n\n\tampF3F = (linearFromdB(frame[A3f])) * 0.06;\n\n\t/* -28.0 dB */\n\n\tampF4F = (linearFromdB(frame[A4f])) * 0.04;\n\n\t/* -33.2 dB */\n\n\tampF5F = (linearFromdB(frame[A5f])) * 0.022;\n\n\t/* -30.5 dB */\n\t/* Set coefficients of variable cascade resonators */\n\n\tampF6F = (linearFromdB(frame[A6f])) * 0.03;\n\tif (cascade >= 8) {\n\t\tif (samplingRate >= 16000) {\n\t\t\tresonatorfrequencybandwidth(R8c, 7500, 600);\n\t\t}\n\t\telse {\n\t\t\tcascade = 6;\n\t\t}\n\t}\n\tif (cascade >= 7) {\n\t\tif (samplingRate >= 16000) {\n\t\t\tresonatorfrequencybandwidth(R7c, 6500, 500);\n\t\t}\n\t\telse {\n\t\t\tcascade = 6;\n\t\t}\n\t}\n\tif (cascade >= 6) {\n\t\tresonatorfrequencybandwidth(R6c, frame[F6], frame[B6]);\n\t}\n\tif (cascade >= 5) {\n\t\tresonatorfrequencybandwidth(R5c, frame[F5], frame[B5]);\n\t}\n\tresonatorfrequencybandwidth(R4c, frame[F4], frame[B4]);\n\tresonatorfrequencybandwidth(R3c, frame[F3], frame[B3]);\n\tresonatorfrequencybandwidth(R2c, frame[F2], frame[B2]);\n\tresonatorfrequencybandwidth(R1c, frame[F1], frame[B1]);\n\tresonatorfrequencybandwidth(Rnpc, frame[Fnp], frame[Bnp]);\n\tresonatorfrequencybandwidth(Rtpc, frame[Ftp], frame[Btp]);\n\tantiResonatorfrequencybandwidth(Rnz, frame[Fnz], frame[Bnz]);\n\tantiResonatorfrequencybandwidth(Rtz, frame[Ftz], frame[Btz]);\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(Rnpp, frame[Fnp], frame[Bnp]);\n\t/* begin resonatorA:put: */\n\taFloat = (resonatorA(Rnpp)) * ampFNV;\n\tresonators[(Rnpp * 5) - 5] = aFloat;\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(Rtpp, frame[Ftp], frame[Btp]);\n\t/* begin resonatorA:put: */\n\taFloat1 = (resonatorA(Rtpp)) * ampFTV;\n\tresonators[(Rtpp * 5) - 5] = aFloat1;\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(R1vp, frame[F1], frame[B1]);\n\t/* begin resonatorA:put: */\n\taFloat2 = (resonatorA(R1vp)) * ampF1V;\n\tresonators[(R1vp * 5) - 5] = aFloat2;\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(R2vp, frame[F2], frame[B2]);\n\t/* begin resonatorA:put: */\n\taFloat3 = (resonatorA(R2vp)) * ampF2V;\n\tresonators[(R2vp * 5) - 5] = aFloat3;\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(R3vp, frame[F3], frame[B3]);\n\t/* begin resonatorA:put: */\n\taFloat4 = (resonatorA(R3vp)) * ampF3V;\n\tresonators[(R3vp * 5) - 5] = aFloat4;\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(R4vp, frame[F4], frame[B4]);\n\t/* begin resonatorA:put: */\n\taFloat5 = (resonatorA(R4vp)) * ampF4V;\n\tresonators[(R4vp * 5) - 5] = aFloat5;\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(R2fp, frame[F2], frame[B2f]);\n\t/* begin resonatorA:put: */\n\taFloat6 = (resonatorA(R2fp)) * ampF2F;\n\tresonators[(R2fp * 5) - 5] = aFloat6;\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(R3fp, frame[F3], frame[B3f]);\n\t/* begin resonatorA:put: */\n\taFloat7 = (resonatorA(R3fp)) * ampF3F;\n\tresonators[(R3fp * 5) - 5] = aFloat7;\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(R4fp, frame[F4], frame[B4f]);\n\t/* begin resonatorA:put: */\n\taFloat8 = (resonatorA(R4fp)) * ampF4F;\n\tresonators[(R4fp * 5) - 5] = aFloat8;\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(R5fp, frame[F5], frame[B5f]);\n\t/* begin resonatorA:put: */\n\taFloat9 = (resonatorA(R5fp)) * ampF5F;\n\tresonators[(R5fp * 5) - 5] = aFloat9;\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(R6fp, frame[F6], frame[B6f]);\n\t/* begin resonatorA:put: */\n\taFloat10 = (resonatorA(R6fp)) * ampF6F;\n\tresonators[(R6fp * 5) - 5] = aFloat10;\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n    sqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\nstatic void\nsynthesizeFrameintostartingAt(float *aKlattFrame, short *buffer, sqInt startIndex)\n{\n    float  aFloat;\n    float  aFloat1;\n    float  aFloat10;\n    float  aFloat11;\n    float  aFloat2;\n    float  aFloat3;\n    float  aFloat4;\n    float  aFloat5;\n    float  aFloat6;\n    float  aFloat7;\n    float  aFloat8;\n    float  aFloat9;\n    float  ampF1V;\n    float  ampF2F;\n    float  ampF2V;\n    float  ampF3F;\n    float  ampF3V;\n    float  ampF4F;\n    float  ampF4V;\n    float  ampF5F;\n    float  ampF6F;\n    float  ampFNV;\n    float  ampFTV;\n    float  ampGain;\n    float  answer;\n    double  answer1;\n    float  answer10;\n    float  answer11;\n    double  answer12;\n    float  answer2;\n    float  answer3;\n    float  answer4;\n    float  answer5;\n    float  answer6;\n    float  answer7;\n    float  answer8;\n    float  answer9;\n    float  asin;\n    float  aspiration;\n    float  aspirationNoise;\n    float  bsin;\n    float  bypass;\n    float  cosphi;\n    float  csin;\n    float  d;\n    double  deltaF0;\n    float  expuphi;\n    float  expuphi1;\n    float  expuphi2;\n    float  expuphi3;\n    float  expuphi4;\n    float  expuphi5;\n    float  friction;\n    float  frictionNoise;\n    float  gain;\n    float  gamma;\n    float  gammapwr;\n    float  glotout;\n    sqInt index;\n    sqInt ingore;\n    float  noise;\n    float  out;\n    float  out1;\n    float  p1;\n    double  p11;\n    float  p110;\n    float  p111;\n    double  p112;\n    float  p12;\n    float  p13;\n    float  p14;\n    float  p15;\n    float  p16;\n    float  p17;\n    float  p18;\n    float  p19;\n    float  parGlotout;\n    float  parVoicing;\n    float  phi;\n    float  qa;\n    float  qb;\n    float  qc;\n    float  qzero;\n    float  r;\n    float  ra;\n    float  rho;\n    float  rk;\n    float  ro;\n    float  rphid;\n    float  s0;\n    float  s1;\n    float  s2;\n    float  sinphi;\n    float  source;\n    sqInt te;\n    sqInt temp;\n    float  theta;\n    float  timeCount;\n    sqInt top;\n    float  turbulence;\n    float  u;\n    float  ua;\n    float  ub;\n    float  uc;\n    float  voice;\n    float  voicing;\n    float  x0;\n\n\t/* begin setCurrentFrame: */\n\n\t/* Fudge factors... */\n\n\tframe = aKlattFrame;\n\n\t/* -4.44 dB */\n\n\tampFNV = (linearFromdB(frame[Anv])) * 0.6;\n\n\t/* -4.44 dB */\n\n\tampFTV = (linearFromdB(frame[Atv])) * 0.6;\n\n\t/* -7.96 dB */\n\n\tampF1V = (linearFromdB(frame[A1v])) * 0.4;\n\n\t/* -16.5 dB */\n\n\tampF2V = (linearFromdB(frame[A2v])) * 0.15;\n\n\t/* -24.4 dB */\n\n\tampF3V = (linearFromdB(frame[A3v])) * 0.06;\n\n\t/* -28.0 dB */\n\n\tampF4V = (linearFromdB(frame[A4v])) * 0.04;\n\n\t/* -16.5 dB */\n\n\tampF2F = (linearFromdB(frame[A2f])) * 0.15;\n\n\t/* -24.4 dB */\n\n\tampF3F = (linearFromdB(frame[A3f])) * 0.06;\n\n\t/* -28.0 dB */\n\n\tampF4F = (linearFromdB(frame[A4f])) * 0.04;\n\n\t/* -33.2 dB */\n\n\tampF5F = (linearFromdB(frame[A5f])) * 0.022;\n\n\t/* -30.5 dB */\n\t/* Set coefficients of variable cascade resonators */\n\n\tampF6F = (linearFromdB(frame[A6f])) * 0.03;\n\tif (cascade >= 8) {\n\t\tif (samplingRate >= 16000) {\n\t\t\tresonatorfrequencybandwidth(R8c, 7500, 600);\n\t\t}\n\t\telse {\n\t\t\tcascade = 6;\n\t\t}\n\t}\n\tif (cascade >= 7) {\n\t\tif (samplingRate >= 16000) {\n\t\t\tresonatorfrequencybandwidth(R7c, 6500, 500);\n\t\t}\n\t\telse {\n\t\t\tcascade = 6;\n\t\t}\n\t}\n\tif (cascade >= 6) {\n\t\tresonatorfrequencybandwidth(R6c, frame[F6], frame[B6]);\n\t}\n\tif (cascade >= 5) {\n\t\tresonatorfrequencybandwidth(R5c, frame[F5], frame[B5]);\n\t}\n\tresonatorfrequencybandwidth(R4c, frame[F4], frame[B4]);\n\tresonatorfrequencybandwidth(R3c, frame[F3], frame[B3]);\n\tresonatorfrequencybandwidth(R2c, frame[F2], frame[B2]);\n\tresonatorfrequencybandwidth(R1c, frame[F1], frame[B1]);\n\tresonatorfrequencybandwidth(Rnpc, frame[Fnp], frame[Bnp]);\n\tresonatorfrequencybandwidth(Rtpc, frame[Ftp], frame[Btp]);\n\tantiResonatorfrequencybandwidth(Rnz, frame[Fnz], frame[Bnz]);\n\tantiResonatorfrequencybandwidth(Rtz, frame[Ftz], frame[Btz]);\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(Rnpp, frame[Fnp], frame[Bnp]);\n\t/* begin resonatorA:put: */\n\taFloat = (resonatorA(Rnpp)) * ampFNV;\n\tresonators[(Rnpp * 5) - 5] = aFloat;\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(Rtpp, frame[Ftp], frame[Btp]);\n\t/* begin resonatorA:put: */\n\taFloat1 = (resonatorA(Rtpp)) * ampFTV;\n\tresonators[(Rtpp * 5) - 5] = aFloat1;\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(R1vp, frame[F1], frame[B1]);\n\t/* begin resonatorA:put: */\n\taFloat2 = (resonatorA(R1vp)) * ampF1V;\n\tresonators[(R1vp * 5) - 5] = aFloat2;\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(R2vp, frame[F2], frame[B2]);\n\t/* begin resonatorA:put: */\n\taFloat3 = (resonatorA(R2vp)) * ampF2V;\n\tresonators[(R2vp * 5) - 5] = aFloat3;\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(R3vp, frame[F3], frame[B3]);\n\t/* begin resonatorA:put: */\n\taFloat4 = (resonatorA(R3vp)) * ampF3V;\n\tresonators[(R3vp * 5) - 5] = aFloat4;\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(R4vp, frame[F4], frame[B4]);\n\t/* begin resonatorA:put: */\n\taFloat5 = (resonatorA(R4vp)) * ampF4V;\n\tresonators[(R4vp * 5) - 5] = aFloat5;\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(R2fp, frame[F2], frame[B2f]);\n\t/* begin resonatorA:put: */\n\taFloat6 = (resonatorA(R2fp)) * ampF2F;\n\tresonators[(R2fp * 5) - 5] = aFloat6;\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(R3fp, frame[F3], frame[B3f]);\n\t/* begin resonatorA:put: */\n\taFloat7 = (resonatorA(R3fp)) * ampF3F;\n\tresonators[(R3fp * 5) - 5] = aFloat7;\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(R4fp, frame[F4], frame[B4f]);\n\t/* begin resonatorA:put: */\n\taFloat8 = (resonatorA(R4fp)) * ampF4F;\n\tresonators[(R4fp * 5) - 5] = aFloat8;\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(R5fp, frame[F5], frame[B5f]);\n\t/* begin resonatorA:put: */\n\taFloat9 = (resonatorA(R5fp)) * ampF5F;\n\tresonators[(R5fp * 5) - 5] = aFloat9;\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(R6fp, frame[F6], frame[B6f]);\n\t/* begin resonatorA:put: */\n\taFloat10 = (resonatorA(R6fp)) * ampF6F;\n\tresonators[(R6fp * 5) - 5] = aFloat10;\n\tif (pitch > 0) {\n\t\t/* begin linearFromdB: */\n\t\tvoicing = (pow(2.0,((((frame[Voicing]) - 7) - 87.0) / 6.0))) * 32.767;\n\t\t/* begin linearFromdB: */\n\t\tparVoicing = (pow(2.0,(((frame[Voicing]) - 87.0) / 6.0))) * 32.767;\n\t\tturbulence = (linearFromdB(frame[Turbulence])) * 0.1;\n\t}\n\telse {\n\t\tvoicing = parVoicing = turbulence = 0.0;\n\t}\n\tfriction = (linearFromdB(frame[Friction])) * 0.25;\n\taspiration = (linearFromdB(frame[Aspiration])) * 0.05;\n\n\t/* -26.0 dB */\n\t/* Flod overall gain into output resonator (low-pass filter) */\n\n\tbypass = (linearFromdB(frame[Bypass])) * 0.05;\n\tgain = (frame[Gain]) - 3;\n\tif (gain <= 0) {\n\t\tgain = 57;\n\t}\n\t/* begin linearFromdB: */\n\tampGain = (pow(2.0,((gain - 87.0) / 6.0))) * 32.767;\n\t/* begin resonator:frequency:bandwidth:gain: */\n\tresonatorfrequencybandwidth(Rout, 0, samplingRate);\n\t/* begin resonatorA:put: */\n\taFloat11 = (resonatorA(Rout)) * ampGain;\n\tresonators[(Rout * 5) - 5] = aFloat11;\n\tnoise = nlast;\n\tindex = startIndex;\n\ttop = (samplesPerFrame + startIndex) - 1;\n\twhile (index <= top) {\n\n\t\t/* Get low-passed random number for aspiration and friction noise */\n\t\t/* radom number between -8196.0 and 8196.0 */\n\t\t/* Tilt down noise spectrum by soft low-pass filter having\n\t\t a pole near the origin in the z-plane. */\n\n\t\tnoise = (((double) ((nextRandom()) - 32768) )) / 4.0;\n\t\tnoise += 0.75 * nlast;\n\n\t\t/* Amplitude modulate noise (reduce noise amplitude during second\n\t\t half of glottal period) if voicing  simultaneously present. */\n\n\t\tnlast = noise;\n\t\tif (nper > nmod) {\n\t\t\tnoise = noise * 0.5;\n\t\t}\n\n\t\t/* Compute voicing waveform. */\n\n\t\tfrictionNoise = friction * noise;\n\t\t/* begin glottalSource */\n\t\tif (t0 == 0) {\n\t\t\tvoice = 0;\n\t\t\tgoto l1;\n\t\t}\n\t\tif (nper < nopen) {\n\t\t\tx0 = (a1 * x1) + (a2 * x2);\n\t\t\tx2 = x1;\n\t\t\tx1 = x0;\n\t\t}\n\t\telse {\n\t\t\tx0 = (b1 * x1) - c1;\n\t\t\tx1 = x0;\n\t\t}\n\t\tif (nper >= t0) {\n\t\t\tnper = 0;\n\t\t\t/* begin pitchSynchronousReset */\n\t\t\tif ((frame[F0]) > 0) {\n\t\t\t\t/* begin voicedPitchSynchronousReset */\n\n\t\t\t\t/* Add flutter and jitter (F0 perturbations). */\n\n\t\t\t\tpitch = frame[F0];\n\t\t\t\t/* begin addFlutter */\n\t\t\t\ttimeCount = (((float) samplesCount)) / (((float) samplingRate));\n\t\t\t\tasin = sin(((2.0 * PI) * 12.7) * timeCount);\n\t\t\t\tbsin = sin(((2.0 * PI) * 7.1) * timeCount);\n\t\t\t\tcsin = sin(((2.0 * PI) * 4.7) * timeCount);\n\t\t\t\tdeltaF0 = ((((frame[Flutter]) * 2.0) * (frame[F0])) / 100.0) * ((asin + bsin) + csin);\n\t\t\t\tpitch += deltaF0;\n\t\t\t\t/* begin addJitter */\n\t\t\t\tpitch += ((((nextRandom()) - 32767) * (frame[Jitter])) / 32768.0) * (frame[F0]);\n\t\t\t\t/* begin addFrequencyDiplophonia */\n\t\t\t\tif ((periodCount % 2) == 0) {\n\t\t\t\t\tpitch += ((frame[Diplophonia]) * (frame[F0])) * (1.0 - (frame[Ro]));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpitch -= ((frame[Diplophonia]) * (frame[F0])) * (1.0 - (frame[Ro]));\n\t\t\t\t}\n\t\t\t\tif (pitch < 0) {\n\t\t\t\t\tpitch = 0;\n\t\t\t\t}\n\n\t\t\t\t/* Duration of period before amplitude modulation. */\n\n\t\t\t\tt0 = ((sqInt)(samplingRate / pitch));\n\t\t\t\tnmod = t0;\n\t\t\t\tif ((frame[Voicing]) > 0) {\n\t\t\t\t\tnmod = ((sqInt) nmod >> 1);\n\t\t\t\t}\n\n\t\t\t\t/* Set the LF glottal pulse model parameters. */\n\n\t\t\t\tnopen = ((sqInt)(t0 * (frame[Ro])));\n\t\t\t\t/* begin ro:ra:rk: */\n\t\t\t\tte = ((sqInt)(t0 * (frame[Ro])));\n\t\t\t\tro = (((double) te )) / (((double) t0 ));\n\t\t\t\trk = frame[Rk];\n\t\t\t\tra = frame[Ra];\n\t\t\t\tif (ra <= 0.0) {\n\t\t\t\t\td = 1.0;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tr = (1.0 - ro) / ra;\n\t\t\t\t\td = 1.0 - (r / ((exp(r)) - 1.0));\n\t\t\t\t}\n\t\t\t\tphi = PI * (rk + 1.0);\n\t\t\t\tcosphi = cos(phi);\n\t\t\t\tsinphi = sin(phi);\n\t\t\t\trphid = ((ra / ro) * phi) * d;\n\t\t\t\t/* begin zeroQphi:cosphi:sinphi:rphid: */\n\t\t\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\t\t\texpuphi5 = exp(0 * phi);\n\t\t\t\tqzero = (expuphi5 * ((((rphid * ((0 * 0) + 1.0)) + 0) * sinphi) - cosphi)) + 1.0;\n\t\t\t\tif (qzero > 0) {\n\t\t\t\t\tua = 0;\n\t\t\t\t\tub = 1;\n\t\t\t\t\tqa = qzero;\n\t\t\t\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\t\t\t\texpuphi1 = exp(ub * phi);\n\t\t\t\t\tqb = (expuphi1 * ((((rphid * ((ub * ub) + 1.0)) + ub) * sinphi) - cosphi)) + 1.0;\n\t\t\t\t\twhile (qb > 0) {\n\t\t\t\t\t\tua = ub;\n\t\t\t\t\t\tqa = qb;\n\t\t\t\t\t\tub = ub * 2;\n\t\t\t\t\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\t\t\t\t\texpuphi = exp(ub * phi);\n\t\t\t\t\t\tqb = (expuphi * ((((rphid * ((ub * ub) + 1.0)) + ub) * sinphi) - cosphi)) + 1.0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tua = -1;\n\t\t\t\t\tub = 0;\n\t\t\t\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\t\t\t\texpuphi3 = exp(ua * phi);\n\t\t\t\t\tqa = (expuphi3 * ((((rphid * ((ua * ua) + 1.0)) + ua) * sinphi) - cosphi)) + 1.0;\n\t\t\t\t\tqb = qzero;\n\t\t\t\t\twhile (qa < 0) {\n\t\t\t\t\t\tub = ua;\n\t\t\t\t\t\tqb = qa;\n\t\t\t\t\t\tua = ua * 2;\n\t\t\t\t\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\t\t\t\t\texpuphi2 = exp(ua * phi);\n\t\t\t\t\t\tqa = (expuphi2 * ((((rphid * ((ua * ua) + 1.0)) + ua) * sinphi) - cosphi)) + 1.0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile ((ub - ua) > Epsilon) {\n\t\t\t\t\tuc = (ub + ua) / 2.0;\n\t\t\t\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\t\t\t\texpuphi4 = exp(uc * phi);\n\t\t\t\t\tqc = (expuphi4 * ((((rphid * ((uc * uc) + 1.0)) + uc) * sinphi) - cosphi)) + 1.0;\n\t\t\t\t\tif (qc > 0) {\n\t\t\t\t\t\tua = uc;\n\t\t\t\t\t\tqa = qc;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tub = uc;\n\t\t\t\t\t\tqb = qc;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tu = (ub + ua) / 2.0;\n\t\t\t\ttheta = phi / te;\n\t\t\t\trho = exp(u * theta);\n\t\t\t\ta1 = (2.0 * (cos(theta))) * rho;\n\t\t\t\ta2 = 0.0 - (rho * rho);\n\t\t\t\tx2 = 0.0;\n\t\t\t\tx1 = rho * (sin(theta));\n\t\t\t\tgamma = exp(-1.0 / (ra * t0));\n\t\t\t\tgammapwr = pow(gamma,(t0 - te));\n\t\t\t\tb1 = gamma;\n\t\t\t\tc1 = ((1.0 - gamma) * gammapwr) / (1.0 - gammapwr);\n\t\t\t\t/* begin normalizeGlottalPulse */\n\t\t\t\ts0 = 0.0;\n\t\t\t\ts1 = x1;\n\t\t\t\ts2 = x2;\n\t\t\t\tfor (ingore = 1; ingore <= nopen; ingore += 1) {\n\t\t\t\t\ts0 = (a1 * s1) + (a2 * s2);\n\t\t\t\t\ts2 = s1;\n\t\t\t\t\ts1 = s0;\n\t\t\t\t}\n\t\t\t\tif (!(s0 == 0.0)) {\n\t\t\t\t\tx1 = (x1 / s0) * 10000.0;\n\t\t\t\t}\n\t\t\t\t/* begin addShimmer */\n\n\t\t\t\t/* x1 must be <= 0 */\n\n\t\t\t\tx1 += ((((nextRandom()) - 32767) * (frame[Shimmer])) / 32768.0) * x1;\n\t\t\t\tif (x1 > 0) {\n\t\t\t\t\tx1 = 0;\n\t\t\t\t}\n\t\t\t\t/* begin addAmplitudeDiplophonia */\n\t\t\t\tif (!((periodCount % 2) == 0)) {\n\n\t\t\t\t\t/* x1 must be <= 0 */\n\n\t\t\t\t\tx1 = x1 * (1.0 - (frame[Diplophonia]));\n\t\t\t\t\tif (x1 > 0) {\n\t\t\t\t\t\tx1 = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tperiodCount = (periodCount + 1) % 65535;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tt0 = 1;\n\t\t\t\tnmod = t0;\n\t\t\t}\n\t\t}\n\t\tnper += 1;\n\t\tvoice = x0;\n\tl1:\t/* end glottalSource */;\n\n\t\t/* Add turbulence during glottal open phase.\n\t\t Use random rather than noise because noise is low-passed. */\n\n\t\tvlast = voice;\n\t\tif (nper < nopen) {\n\t\t\tvoice += (turbulence * (((double) ((nextRandom()) - 32768) ))) / 4.0;\n\t\t}\n\t\tglotout = voicing * voice;\n\n\t\t/* Compute aspiration amplitude and add to voicing source. */\n\n\t\tparGlotout = parVoicing * voice;\n\t\taspirationNoise = aspiration * noise;\n\t\tglotout += aspirationNoise;\n\n\t\t/* Cascade vocal tract, excited by laryngeal sources.\n\t\t Nasal antiresonator, nasal resonator, trachearl antirresonator,\n\t\t tracheal resonator, then formants F8, F7, F6, F5, F4, F3, F2, F1. */\n\n\t\tparGlotout += aspirationNoise;\n\t\t/* begin cascadeBranch: */\n\t\tif (!(cascade > 0)) {\n\t\t\tout = 0.0;\n\t\t\tgoto l2;\n\t\t}\n\t\t/* begin antiResonator:value: */\n\t\tanswer12 = (((resonatorA(Rnz)) * glotout) + ((resonatorB(Rnz)) * ((p112 = resonatorP1(Rnz))))) + ((resonatorC(Rnz)) * (resonatorP2(Rnz)));\n\t\t/* begin resonatorP2:put: */\n\t\tresonators[(Rnz * 5) - 1] = p112;\n\t\t/* begin resonatorP1:put: */\n\t\tresonators[(Rnz * 5) - 2] = glotout;\n\t\tout1 = answer12;\n\t\t/* begin resonator:value: */\n\n\t\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\t\tanswer10 = (((resonatorA(Rnpc)) * out1) + ((resonatorB(Rnpc)) * ((p110 = resonatorP1(Rnpc))))) + ((resonatorC(Rnpc)) * (resonatorP2(Rnpc)));\n\t\t/* begin resonatorP2:put: */\n\t\tresonators[(Rnpc * 5) - 1] = p110;\n\t\t/* begin resonatorP1:put: */\n\t\tresonators[(Rnpc * 5) - 2] = answer10;\n\t\tout1 = answer10;\n\t\t/* begin antiResonator:value: */\n\t\tanswer1 = (((resonatorA(Rtz)) * out1) + ((resonatorB(Rtz)) * ((p11 = resonatorP1(Rtz))))) + ((resonatorC(Rtz)) * (resonatorP2(Rtz)));\n\t\t/* begin resonatorP2:put: */\n\t\tresonators[(Rtz * 5) - 1] = p11;\n\t\t/* begin resonatorP1:put: */\n\t\tresonators[(Rtz * 5) - 2] = out1;\n\t\tout1 = answer1;\n\t\t/* begin resonator:value: */\n\n\t\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\t\tanswer11 = (((resonatorA(Rtpc)) * out1) + ((resonatorB(Rtpc)) * ((p111 = resonatorP1(Rtpc))))) + ((resonatorC(Rtpc)) * (resonatorP2(Rtpc)));\n\t\t/* begin resonatorP2:put: */\n\t\tresonators[(Rtpc * 5) - 1] = p111;\n\t\t/* begin resonatorP1:put: */\n\t\tresonators[(Rtpc * 5) - 2] = answer11;\n\t\tout1 = answer11;\n\t\tif (cascade >= 8) {\n\t\t\t/* begin resonator:value: */\n\n\t\t\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\t\t\tanswer2 = (((resonatorA(R8c)) * out1) + ((resonatorB(R8c)) * ((p12 = resonatorP1(R8c))))) + ((resonatorC(R8c)) * (resonatorP2(R8c)));\n\t\t\t/* begin resonatorP2:put: */\n\t\t\tresonators[(R8c * 5) - 1] = p12;\n\t\t\t/* begin resonatorP1:put: */\n\t\t\tresonators[(R8c * 5) - 2] = answer2;\n\t\t\tout1 = answer2;\n\t\t}\n\t\tif (cascade >= 7) {\n\t\t\t/* begin resonator:value: */\n\n\t\t\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\t\t\tanswer3 = (((resonatorA(R7c)) * out1) + ((resonatorB(R7c)) * ((p13 = resonatorP1(R7c))))) + ((resonatorC(R7c)) * (resonatorP2(R7c)));\n\t\t\t/* begin resonatorP2:put: */\n\t\t\tresonators[(R7c * 5) - 1] = p13;\n\t\t\t/* begin resonatorP1:put: */\n\t\t\tresonators[(R7c * 5) - 2] = answer3;\n\t\t\tout1 = answer3;\n\t\t}\n\t\tif (cascade >= 6) {\n\t\t\t/* begin resonator:value: */\n\n\t\t\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\t\t\tanswer4 = (((resonatorA(R6c)) * out1) + ((resonatorB(R6c)) * ((p14 = resonatorP1(R6c))))) + ((resonatorC(R6c)) * (resonatorP2(R6c)));\n\t\t\t/* begin resonatorP2:put: */\n\t\t\tresonators[(R6c * 5) - 1] = p14;\n\t\t\t/* begin resonatorP1:put: */\n\t\t\tresonators[(R6c * 5) - 2] = answer4;\n\t\t\tout1 = answer4;\n\t\t}\n\t\tif (cascade >= 5) {\n\t\t\t/* begin resonator:value: */\n\n\t\t\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\t\t\tanswer5 = (((resonatorA(R5c)) * out1) + ((resonatorB(R5c)) * ((p15 = resonatorP1(R5c))))) + ((resonatorC(R5c)) * (resonatorP2(R5c)));\n\t\t\t/* begin resonatorP2:put: */\n\t\t\tresonators[(R5c * 5) - 1] = p15;\n\t\t\t/* begin resonatorP1:put: */\n\t\t\tresonators[(R5c * 5) - 2] = answer5;\n\t\t\tout1 = answer5;\n\t\t}\n\t\tif (cascade >= 4) {\n\t\t\t/* begin resonator:value: */\n\n\t\t\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\t\t\tanswer6 = (((resonatorA(R4c)) * out1) + ((resonatorB(R4c)) * ((p16 = resonatorP1(R4c))))) + ((resonatorC(R4c)) * (resonatorP2(R4c)));\n\t\t\t/* begin resonatorP2:put: */\n\t\t\tresonators[(R4c * 5) - 1] = p16;\n\t\t\t/* begin resonatorP1:put: */\n\t\t\tresonators[(R4c * 5) - 2] = answer6;\n\t\t\tout1 = answer6;\n\t\t}\n\t\tif (cascade >= 3) {\n\t\t\t/* begin resonator:value: */\n\n\t\t\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\t\t\tanswer7 = (((resonatorA(R3c)) * out1) + ((resonatorB(R3c)) * ((p17 = resonatorP1(R3c))))) + ((resonatorC(R3c)) * (resonatorP2(R3c)));\n\t\t\t/* begin resonatorP2:put: */\n\t\t\tresonators[(R3c * 5) - 1] = p17;\n\t\t\t/* begin resonatorP1:put: */\n\t\t\tresonators[(R3c * 5) - 2] = answer7;\n\t\t\tout1 = answer7;\n\t\t}\n\t\tif (cascade >= 2) {\n\t\t\t/* begin resonator:value: */\n\n\t\t\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\t\t\tanswer8 = (((resonatorA(R2c)) * out1) + ((resonatorB(R2c)) * ((p18 = resonatorP1(R2c))))) + ((resonatorC(R2c)) * (resonatorP2(R2c)));\n\t\t\t/* begin resonatorP2:put: */\n\t\t\tresonators[(R2c * 5) - 1] = p18;\n\t\t\t/* begin resonatorP1:put: */\n\t\t\tresonators[(R2c * 5) - 2] = answer8;\n\t\t\tout1 = answer8;\n\t\t}\n\t\tif (cascade >= 1) {\n\t\t\t/* begin resonator:value: */\n\n\t\t\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\t\t\tanswer9 = (((resonatorA(R1c)) * out1) + ((resonatorB(R1c)) * ((p19 = resonatorP1(R1c))))) + ((resonatorC(R1c)) * (resonatorP2(R1c)));\n\t\t\t/* begin resonatorP2:put: */\n\t\t\tresonators[(R1c * 5) - 1] = p19;\n\t\t\t/* begin resonatorP1:put: */\n\t\t\tresonators[(R1c * 5) - 2] = answer9;\n\t\t\tout1 = answer9;\n\t\t}\n\t\tout = out1;\n\tl2:\t/* end cascadeBranch: */;\n\n\t\t/* Source is voicing plus aspiration. */\n\n\t\tsource = parGlotout;\n\n\t\t/* Friction-excited parallel vocal tract formants F6, F5, F4, F3, F2,\n\t\t outputs added with alternating sign. Sound source for other\n\t\t parallel resonators is friction plus first difference of\n\t\t voicing waveform. */\n\n\t\tout += parallelVoicedBranch(source);\n\t\tsource = (frictionNoise + parGlotout) - glast;\n\t\tglast = parGlotout;\n\n\t\t/* Apply bypas and output low-pass filter */\n\n\t\tout = (parallelFrictionBranch(source)) - out;\n\t\tout = (bypass * source) - out;\n\t\t/* begin resonator:value: */\n\n\t\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\t\tanswer = (((resonatorA(Rout)) * out) + ((resonatorB(Rout)) * ((p1 = resonatorP1(Rout))))) + ((resonatorC(Rout)) * (resonatorP2(Rout)));\n\t\t/* begin resonatorP2:put: */\n\t\tresonators[(Rout * 5) - 1] = p1;\n\t\t/* begin resonatorP1:put: */\n\t\tresonators[(Rout * 5) - 2] = answer;\n\t\tout = answer;\n\t\ttemp = ((sqInt)(out * ampGain));\n\t\tif (temp < -32768) {\n\t\t\ttemp = -32768;\n\t\t}\n\t\tif (temp > 32767) {\n\t\t\ttemp = 32767;\n\t\t}\n\t\tbuffer[index - 1] = temp;\n\t\tindex += 1;\n\t\tsamplesCount += 1;\n\t}\n}\n\n\n/*\tSet the pitch. */\n\nstatic void\nvoicedPitchSynchronousReset(void)\n{\n    float  asin;\n    float  bsin;\n    float  cosphi;\n    float  csin;\n    float  d;\n    double  deltaF0;\n    float  expuphi;\n    float  expuphi1;\n    float  expuphi2;\n    float  expuphi3;\n    float  expuphi4;\n    float  expuphi5;\n    float  gamma;\n    float  gammapwr;\n    sqInt ingore;\n    float  phi;\n    float  qa;\n    float  qb;\n    float  qc;\n    float  qzero;\n    float  r;\n    float  ra;\n    float  rho;\n    float  rk;\n    float  ro;\n    float  rphid;\n    float  s0;\n    float  s1;\n    float  s2;\n    float  sinphi;\n    sqInt te;\n    float  theta;\n    float  timeCount;\n    float  u;\n    float  ua;\n    float  ub;\n    float  uc;\n\n\n\t/* Add flutter and jitter (F0 perturbations). */\n\n\tpitch = frame[F0];\n\t/* begin addFlutter */\n\ttimeCount = (((float) samplesCount)) / (((float) samplingRate));\n\tasin = sin(((2.0 * PI) * 12.7) * timeCount);\n\tbsin = sin(((2.0 * PI) * 7.1) * timeCount);\n\tcsin = sin(((2.0 * PI) * 4.7) * timeCount);\n\tdeltaF0 = ((((frame[Flutter]) * 2.0) * (frame[F0])) / 100.0) * ((asin + bsin) + csin);\n\tpitch += deltaF0;\n\t/* begin addJitter */\n\tpitch += ((((nextRandom()) - 32767) * (frame[Jitter])) / 32768.0) * (frame[F0]);\n\t/* begin addFrequencyDiplophonia */\n\tif ((periodCount % 2) == 0) {\n\t\tpitch += ((frame[Diplophonia]) * (frame[F0])) * (1.0 - (frame[Ro]));\n\t}\n\telse {\n\t\tpitch -= ((frame[Diplophonia]) * (frame[F0])) * (1.0 - (frame[Ro]));\n\t}\n\tif (pitch < 0) {\n\t\tpitch = 0;\n\t}\n\n\t/* Duration of period before amplitude modulation. */\n\n\tt0 = ((sqInt)(samplingRate / pitch));\n\tnmod = t0;\n\tif ((frame[Voicing]) > 0) {\n\t\tnmod = ((sqInt) nmod >> 1);\n\t}\n\n\t/* Set the LF glottal pulse model parameters. */\n\n\tnopen = ((sqInt)(t0 * (frame[Ro])));\n\t/* begin ro:ra:rk: */\n\tte = ((sqInt)(t0 * (frame[Ro])));\n\tro = (((double) te )) / (((double) t0 ));\n\trk = frame[Rk];\n\tra = frame[Ra];\n\tif (ra <= 0.0) {\n\t\td = 1.0;\n\t}\n\telse {\n\t\tr = (1.0 - ro) / ra;\n\t\td = 1.0 - (r / ((exp(r)) - 1.0));\n\t}\n\tphi = PI * (rk + 1.0);\n\tcosphi = cos(phi);\n\tsinphi = sin(phi);\n\trphid = ((ra / ro) * phi) * d;\n\t/* begin zeroQphi:cosphi:sinphi:rphid: */\n\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\texpuphi5 = exp(0 * phi);\n\tqzero = (expuphi5 * ((((rphid * ((0 * 0) + 1.0)) + 0) * sinphi) - cosphi)) + 1.0;\n\tif (qzero > 0) {\n\t\tua = 0;\n\t\tub = 1;\n\t\tqa = qzero;\n\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\texpuphi1 = exp(ub * phi);\n\t\tqb = (expuphi1 * ((((rphid * ((ub * ub) + 1.0)) + ub) * sinphi) - cosphi)) + 1.0;\n\t\twhile (qb > 0) {\n\t\t\tua = ub;\n\t\t\tqa = qb;\n\t\t\tub = ub * 2;\n\t\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\t\texpuphi = exp(ub * phi);\n\t\t\tqb = (expuphi * ((((rphid * ((ub * ub) + 1.0)) + ub) * sinphi) - cosphi)) + 1.0;\n\t\t}\n\t}\n\telse {\n\t\tua = -1;\n\t\tub = 0;\n\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\texpuphi3 = exp(ua * phi);\n\t\tqa = (expuphi3 * ((((rphid * ((ua * ua) + 1.0)) + ua) * sinphi) - cosphi)) + 1.0;\n\t\tqb = qzero;\n\t\twhile (qa < 0) {\n\t\t\tub = ua;\n\t\t\tqb = qa;\n\t\t\tua = ua * 2;\n\t\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\t\texpuphi2 = exp(ua * phi);\n\t\t\tqa = (expuphi2 * ((((rphid * ((ua * ua) + 1.0)) + ua) * sinphi) - cosphi)) + 1.0;\n\t\t}\n\t}\n\twhile ((ub - ua) > Epsilon) {\n\t\tuc = (ub + ua) / 2.0;\n\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\texpuphi4 = exp(uc * phi);\n\t\tqc = (expuphi4 * ((((rphid * ((uc * uc) + 1.0)) + uc) * sinphi) - cosphi)) + 1.0;\n\t\tif (qc > 0) {\n\t\t\tua = uc;\n\t\t\tqa = qc;\n\t\t}\n\t\telse {\n\t\t\tub = uc;\n\t\t\tqb = qc;\n\t\t}\n\t}\n\tu = (ub + ua) / 2.0;\n\ttheta = phi / te;\n\trho = exp(u * theta);\n\ta1 = (2.0 * (cos(theta))) * rho;\n\ta2 = 0.0 - (rho * rho);\n\tx2 = 0.0;\n\tx1 = rho * (sin(theta));\n\tgamma = exp(-1.0 / (ra * t0));\n\tgammapwr = pow(gamma,(t0 - te));\n\tb1 = gamma;\n\tc1 = ((1.0 - gamma) * gammapwr) / (1.0 - gammapwr);\n\t/* begin normalizeGlottalPulse */\n\ts0 = 0.0;\n\ts1 = x1;\n\ts2 = x2;\n\tfor (ingore = 1; ingore <= nopen; ingore += 1) {\n\t\ts0 = (a1 * s1) + (a2 * s2);\n\t\ts2 = s1;\n\t\ts1 = s0;\n\t}\n\tif (!(s0 == 0.0)) {\n\t\tx1 = (x1 / s0) * 10000.0;\n\t}\n\t/* begin addShimmer */\n\n\t/* x1 must be <= 0 */\n\n\tx1 += ((((nextRandom()) - 32767) * (frame[Shimmer])) / 32768.0) * x1;\n\tif (x1 > 0) {\n\t\tx1 = 0;\n\t}\n\t/* begin addAmplitudeDiplophonia */\n\tif (!((periodCount % 2) == 0)) {\n\n\t\t/* x1 must be <= 0 */\n\n\t\tx1 = x1 * (1.0 - (frame[Diplophonia]));\n\t\tif (x1 > 0) {\n\t\t\tx1 = 0;\n\t\t}\n\t}\n}\n\nstatic float\nzeroQphicosphisinphirphid(float  phi, float  cosphi, float  sinphi, float  rphid)\n{\n    float  expuphi;\n    float  expuphi1;\n    float  expuphi2;\n    float  expuphi3;\n    float  expuphi4;\n    float  expuphi5;\n    float  qa;\n    float  qb;\n    float  qc;\n    float  qzero;\n    float  ua;\n    float  ub;\n    float  uc;\n\n\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\texpuphi5 = exp(0 * phi);\n\tqzero = (expuphi5 * ((((rphid * ((0 * 0) + 1.0)) + 0) * sinphi) - cosphi)) + 1.0;\n\tif (qzero > 0) {\n\t\tua = 0;\n\t\tub = 1;\n\t\tqa = qzero;\n\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\texpuphi1 = exp(ub * phi);\n\t\tqb = (expuphi1 * ((((rphid * ((ub * ub) + 1.0)) + ub) * sinphi) - cosphi)) + 1.0;\n\t\twhile (qb > 0) {\n\t\t\tua = ub;\n\t\t\tqa = qb;\n\t\t\tub = ub * 2;\n\t\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\t\texpuphi = exp(ub * phi);\n\t\t\tqb = (expuphi * ((((rphid * ((ub * ub) + 1.0)) + ub) * sinphi) - cosphi)) + 1.0;\n\t\t}\n\t}\n\telse {\n\t\tua = -1;\n\t\tub = 0;\n\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\texpuphi3 = exp(ua * phi);\n\t\tqa = (expuphi3 * ((((rphid * ((ua * ua) + 1.0)) + ua) * sinphi) - cosphi)) + 1.0;\n\t\tqb = qzero;\n\t\twhile (qa < 0) {\n\t\t\tub = ua;\n\t\t\tqb = qa;\n\t\t\tua = ua * 2;\n\t\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\t\texpuphi2 = exp(ua * phi);\n\t\t\tqa = (expuphi2 * ((((rphid * ((ua * ua) + 1.0)) + ua) * sinphi) - cosphi)) + 1.0;\n\t\t}\n\t}\n\twhile ((ub - ua) > Epsilon) {\n\t\tuc = (ub + ua) / 2.0;\n\t\t/* begin qu:phi:cosphi:sinphi:rphid: */\n\t\texpuphi4 = exp(uc * phi);\n\t\tqc = (expuphi4 * ((((rphid * ((uc * uc) + 1.0)) + uc) * sinphi) - cosphi)) + 1.0;\n\t\tif (qc > 0) {\n\t\t\tua = uc;\n\t\t\tqa = qc;\n\t\t}\n\t\telse {\n\t\t\tub = uc;\n\t\t\tqb = qc;\n\t\t}\n\t}\n\treturn (ub + ua) / 2.0;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* Klatt_exports[][3] = {\n\t{\"Klatt\", \"getModuleName\", (void*)getModuleName},\n\t{\"Klatt\", \"primitiveSynthesizeFrameIntoStartingAt\", (void*)primitiveSynthesizeFrameIntoStartingAt},\n\t{\"Klatt\", \"setInterpreter\", (void*)setInterpreter},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/LargeIntegers/LargeIntegers.c",
    "content": "/* Automatically generated by\n\tSmartSyntaxPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tLargeIntegersPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"LargeIntegersPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n\n/*** Function Prototypes ***/\nstatic sqInt anyBitOfBytesfromto(sqInt aBytesOop, sqInt start, sqInt stopArg);\nstatic sqInt byteSizeOfBytes(sqInt bytesOop);\nstatic sqInt bytesOrIntgrowTo(sqInt oop, sqInt len);\nstatic sqInt bytesgrowTo(sqInt aBytesObject, sqInt newLen);\nstatic sqInt bytesLshift(sqInt aBytesOop, sqInt shiftCount);\nstatic sqInt bytesRshiftbyteslookfirst(sqInt aBytesOop, sqInt anInteger, sqInt b, sqInt a);\nstatic sqInt cByteOpshortlenlongleninto(sqInt opIndex, unsigned char *  pByteShort, sqInt shortLen, unsigned char *  pByteLong, sqInt longLen, unsigned char *  pByteRes);\nstatic int cBytesCopyFromtolen(unsigned char *  pFrom, unsigned char *  pTo, sqInt len);\nstatic sqInt cBytesHighBitlen(unsigned char *   pByte, sqInt len);\nstatic int cBytesLshiftfromlentolen(sqInt shiftCount, unsigned char *  pFrom, sqInt lenFrom, unsigned char *  pTo, sqInt lenTo);\nstatic int cBytesReplacefromtowithstartingAt(unsigned char *  pTo, sqInt start, sqInt stop, unsigned char *  pFrom, sqInt repStart);\nstatic void cCopyIntValtoBytes(sqInt val, sqInt bytes);\nstatic void cCoreBytesRshiftCountnmfbytesfromlentolen(sqInt count, sqInt n, sqInt m, sqInt f, sqInt b, unsigned char *  pFrom, sqInt fromLen, unsigned char *  pTo, sqInt toLen);\nstatic void cCoreDigitDivDivlenremlenquolen(unsigned char *  pDiv, sqInt divLen, unsigned char *  pRem, sqInt remLen, unsigned char *  pQuo, sqInt quoLen);\nstatic unsigned char cDigitAddlenwithleninto(unsigned char *  pByteShort, sqInt shortLen, unsigned char *  pByteLong, sqInt longLen, unsigned char *  pByteRes);\nstatic sqInt cDigitComparewithlen(unsigned char *  pFirst, unsigned char *  pSecond, sqInt len);\nstatic sqInt cDigitLengthOfCSI(sqInt csi);\nstatic unsigned char cDigitMultiplylenwithleninto(unsigned char *  pByteShort, sqInt shortLen, unsigned char *  pByteLong, sqInt longLen, unsigned char *  pByteRes);\nstatic sqInt cDigitOfCSIat(sqInt csi, sqInt ix);\nstatic void cDigitSublenwithleninto(unsigned char *  pByteSmall, sqInt smallLen, unsigned char *  pByteLarge, sqInt largeLen, unsigned char *  pByteRes);\nstatic sqInt cHighBit(sqInt uint);\nstatic sqInt createLargeFromSmallInteger(sqInt anOop);\nstatic sqInt digitAddLargewith(sqInt firstInteger, sqInt secondInteger);\nstatic sqInt digitBitLogicwithopIndex(sqInt firstInteger, sqInt secondInteger, sqInt opIx);\nstatic sqInt digitCompareLargewith(sqInt firstInteger, sqInt secondInteger);\nstatic sqInt digitDivLargewithnegative(sqInt firstInteger, sqInt secondInteger, sqInt neg);\nstatic sqInt digitLength(sqInt oop);\nstatic sqInt digitMultiplyLargewithnegative(sqInt firstInteger, sqInt secondInteger, sqInt neg);\nstatic sqInt digitOfBytesat(sqInt aBytesOop, sqInt ix);\nstatic sqInt digitOfat(sqInt oop, sqInt ix);\nstatic sqInt digitSubLargewith(sqInt firstInteger, sqInt secondInteger);\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nstatic sqInt highBitOfBytes(sqInt aBytesOop);\nstatic void initialize(void);\nstatic sqInt isNormalized(sqInt anInteger);\nstatic sqInt msg(char *s);\nstatic sqInt negative(sqInt aLarge);\nstatic sqInt normalizeNegative(sqInt aLargeNegativeInteger);\nstatic sqInt normalizePositive(sqInt aLargePositiveInteger);\nstatic sqInt normalize(sqInt aLargeInteger);\nEXPORT(sqInt) primAnyBitFromTo(void);\nEXPORT(sqInt) primAsLargeInteger(void);\nEXPORT(sqInt) primCheckIfCModuleExists(void);\nEXPORT(sqInt) primDigitAdd(void);\nEXPORT(sqInt) primDigitAddWith(void);\nEXPORT(sqInt) primDigitBitAnd(void);\nEXPORT(sqInt) primDigitBitLogicWithOp(void);\nEXPORT(sqInt) primDigitBitOr(void);\nEXPORT(sqInt) primDigitBitShift(void);\nEXPORT(sqInt) primDigitBitShiftMagnitude(void);\nEXPORT(sqInt) primDigitBitXor(void);\nEXPORT(sqInt) primDigitCompare(void);\nEXPORT(sqInt) primDigitCompareWith(void);\nEXPORT(sqInt) primDigitDivNegative(void);\nEXPORT(sqInt) primDigitDivWithNegative(void);\nEXPORT(sqInt) primDigitMultiplyNegative(void);\nEXPORT(sqInt) primDigitMultiplyWithNegative(void);\nEXPORT(sqInt) primDigitSubtract(void);\nEXPORT(sqInt) primDigitSubtractWith(void);\nEXPORT(sqInt) primGetModuleName(void);\nEXPORT(sqInt) primNormalize(void);\nEXPORT(sqInt) primNormalizeNegative(void);\nEXPORT(sqInt) primNormalizePositive(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\nstatic void sqAssert(sqInt aBool);\nstatic sqInt think(void);\nstatic sqInt unsafeByteOfat(sqInt bytesOop, sqInt ix);\nEXPORT(sqInt) _primDigitBitShift(void);\n\n\n/*** Variables ***/\nstatic const int  andOpIndex = 0;\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"LargeIntegers v1.5 VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"LargeIntegers v1.5 VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\nstatic const int  orOpIndex = 1;\nstatic const int  xorOpIndex = 2;\n\n\n\n/*\tArgument has to be aBytesOop! */\n/*\tTests for any magnitude bits in the interval from start to stopArg. */\n\nstatic sqInt\nanyBitOfBytesfromto(sqInt aBytesOop, sqInt start, sqInt stopArg)\n{\n\tsqInt digit;\n\tsqInt firstByteIx;\n\tsqInt ix;\n\tsqInt lastByteIx;\n\tsqInt leftShift;\n\tsqInt magnitude;\n\tsqInt mask;\n\tunsigned char *pointer;\n\tsqInt rightShift;\n\tsqInt stop;\n\n\t/* missing DebugCode */;\n\tif ((start < 1) || (stopArg < 1)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tmagnitude = aBytesOop;\n\tstop = ((stopArg < (cBytesHighBitlen(interpreterProxy->firstIndexableField(magnitude), interpreterProxy->slotSizeOf(magnitude)))) ? stopArg : (cBytesHighBitlen(interpreterProxy->firstIndexableField(magnitude), interpreterProxy->slotSizeOf(magnitude))));\n\tif (start > stop) {\n\t\treturn 0;\n\t}\n\tfirstByteIx = (((sqInt) (start - 1) >> 3)) + 1;\n\tlastByteIx = (((sqInt) (stop - 1) >> 3)) + 1;\n\trightShift = 0 - ((start - 1) % 8);\n\tleftShift = 7 - ((stop - 1) % 8);\n\tif (firstByteIx == lastByteIx) {\n\t\tmask = ((((0 - rightShift) < 0) ? ((usqInt) 255 >> -(0 - rightShift)) : ((usqInt) 255 << (0 - rightShift)))) & ((((0 - leftShift) < 0) ? ((usqInt) 255 >> -(0 - leftShift)) : ((usqInt) 255 << (0 - leftShift))));\n\t\t/* begin digitOfBytes:at: */\n\t\tif (firstByteIx > (interpreterProxy->slotSizeOf(magnitude))) {\n\t\t\tdigit = 0;\n\t\t\tgoto l1;\n\t\t}\n\t\telse {\n\t\t\tdigit = ((pointer = interpreterProxy->firstIndexableField(magnitude)))[firstByteIx - 1];\n\t\t\tgoto l1;\n\t\t}\n\tl1:\t/* end digitOfBytes:at: */;\n\t\treturn (digit & mask) != 0;\n\t}\n\tif ((((rightShift < 0) ? ((usqInt) (digitOfBytesat(magnitude, firstByteIx)) >> -rightShift) : ((usqInt) (digitOfBytesat(magnitude, firstByteIx)) << rightShift))) != 0) {\n\t\treturn 1;\n\t}\n\tfor (ix = (firstByteIx + 1); ix <= (lastByteIx - 1); ix += 1) {\n\t\tif ((digitOfBytesat(magnitude, ix)) != 0) {\n\t\t\treturn 1;\n\t\t}\n\t}\n\tif (((((leftShift < 0) ? ((usqInt) (digitOfBytesat(magnitude, lastByteIx)) >> -leftShift) : ((usqInt) (digitOfBytesat(magnitude, lastByteIx)) << leftShift))) & 255) != 0) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}\n\n\n/*\tPrecondition: bytesOop is not anInteger and a bytes object. */\n/*\tFunction #byteSizeOf: is used by the interpreter, be careful with name\n\tclashes... */\n\nstatic sqInt\nbyteSizeOfBytes(sqInt bytesOop)\n{\n\treturn interpreterProxy->slotSizeOf(bytesOop);\n}\n\n\n/*\tAttention: this method invalidates all oop's! Only newBytes is valid at\n\treturn. \n */\n\nstatic sqInt\nbytesOrIntgrowTo(sqInt oop, sqInt len)\n{\n\tsqInt class;\n\tsqInt ix;\n\tsqInt newBytes;\n\tunsigned char *   pByte;\n\tsqInt val;\n\n\tif ((oop & 1)) {\n\t\tval = (oop >> 1);\n\t\tif (val < 0) {\n\t\t\tclass = interpreterProxy->classLargeNegativeInteger();\n\t\t}\n\t\telse {\n\t\t\tclass = interpreterProxy->classLargePositiveInteger();\n\t\t}\n\t\tnewBytes = interpreterProxy->instantiateClassindexableSize(class, len);\n\t\t/* begin cCopyIntVal:toBytes: */\n\t\tpByte = interpreterProxy->firstIndexableField(newBytes);\n\t\tfor (ix = 1; ix <= (cDigitLengthOfCSI(val)); ix += 1) {\n\t\t\tpByte[ix - 1] = (cDigitOfCSIat(val, ix));\n\t\t}\n\t}\n\telse {\n\t\tnewBytes = bytesgrowTo(oop, len);\n\t}\n\treturn newBytes;\n}\n\n\n/*\tAttention: this method invalidates all oop's! Only newBytes is valid at\n\treturn. \n */\n/*\tDoes not normalize. */\n\nstatic sqInt\nbytesgrowTo(sqInt aBytesObject, sqInt newLen)\n{\n\tsqInt copyLen;\n\tsqInt newBytes;\n\tsqInt oldLen;\n\n\tinterpreterProxy->pushRemappableOop(aBytesObject);\n\tnewBytes = interpreterProxy->instantiateClassindexableSize(interpreterProxy->fetchClassOf(aBytesObject), newLen);\n\taBytesObject = interpreterProxy->popRemappableOop();\n\toldLen = interpreterProxy->slotSizeOf(aBytesObject);\n\tif (oldLen < newLen) {\n\t\tcopyLen = oldLen;\n\t}\n\telse {\n\t\tcopyLen = newLen;\n\t}\n\tcBytesCopyFromtolen(interpreterProxy->firstIndexableField(aBytesObject), interpreterProxy->firstIndexableField(newBytes), copyLen);\n\treturn newBytes;\n}\n\n\n/*\tAttention: this method invalidates all oop's! Only newBytes is valid at\n\treturn. \n */\n/*\tDoes not normalize. */\n\nstatic sqInt\nbytesLshift(sqInt aBytesOop, sqInt shiftCount)\n{\n\tsqInt bitShift;\n\tsqInt byteShift;\n\tsqInt carry;\n\tsqInt digit;\n\tsqInt highBit;\n\tsqInt i;\n\tsqInt lastIx;\n\tsqInt limit;\n\tsqInt mask;\n\tsqInt newBytes;\n\tsqInt newLen;\n\tsqInt oldLen;\n\tunsigned char *  pFrom;\n\tunsigned char *  pTo;\n\tsqInt rShift;\n\n\toldLen = interpreterProxy->slotSizeOf(aBytesOop);\n\tif (((highBit = cBytesHighBitlen(interpreterProxy->firstIndexableField(aBytesOop), oldLen))) == 0) {\n\t\treturn interpreterProxy->integerObjectOf(0);\n\t}\n\tnewLen = ((sqInt) ((highBit + shiftCount) + 7) >> 3);\n\tinterpreterProxy->pushRemappableOop(aBytesOop);\n\tnewBytes = interpreterProxy->instantiateClassindexableSize(interpreterProxy->fetchClassOf(aBytesOop), newLen);\n\taBytesOop = interpreterProxy->popRemappableOop();\n\t/* begin cBytesLshift:from:len:to:len: */\n\tpFrom = interpreterProxy->firstIndexableField(aBytesOop);\n\tpTo = interpreterProxy->firstIndexableField(newBytes);\n\tbyteShift = ((sqInt) shiftCount >> 3);\n\tbitShift = shiftCount % 8;\n\tif (bitShift == 0) {\n\t\t/* begin cBytesReplace:from:to:with:startingAt: */\n\t\tcBytesCopyFromtolen(pFrom + 0, pTo + byteShift, ((newLen - 1) - byteShift) + 1);\n\t\tgoto l1;\n\t}\n\tcarry = 0;\n\trShift = bitShift - 8;\n\tmask = (((0 - bitShift) < 0) ? ((usqInt) 255 >> -(0 - bitShift)) : ((usqInt) 255 << (0 - bitShift)));\n\tlimit = byteShift - 1;\n\tfor (i = 0; i <= limit; i += 1) {\n\t\tpTo[i] = 0;\n\t}\n\tlimit = (newLen - byteShift) - 2;\n\t/* begin sqAssert: */\n\t/* missing DebugCode */;\nl2:\t/* end sqAssert: */;\n\tfor (i = 0; i <= limit; i += 1) {\n\t\tdigit = pFrom[i];\n\t\tpTo[i + byteShift] = ((((bitShift < 0) ? ((usqInt) (digit & mask) >> -bitShift) : ((usqInt) (digit & mask) << bitShift))) | carry);\n\t\tcarry = ((rShift < 0) ? ((usqInt) digit >> -rShift) : ((usqInt) digit << rShift));\n\t}\n\tlastIx = limit + 1;\n\tif (lastIx > (oldLen - 1)) {\n\t\tdigit = 0;\n\t}\n\telse {\n\t\tdigit = pFrom[lastIx];\n\t}\n\tpTo[lastIx + byteShift] = ((((bitShift < 0) ? ((usqInt) (digit & mask) >> -bitShift) : ((usqInt) (digit & mask) << bitShift))) | carry);\n\tcarry = ((rShift < 0) ? ((usqInt) digit >> -rShift) : ((usqInt) digit << rShift));\n\t/* begin sqAssert: */\n\t/* missing DebugCode */;\nl3:\t/* end sqAssert: */;\nl1:\t/* end cBytesLshift:from:len:to:len: */;\n\treturn newBytes;\n}\n\n\n/*\tAttention: this method invalidates all oop's! Only newBytes is valid at\n\treturn. \n */\n/*\tShift right 8*b+anInteger bits, 0<=n<8. \n\tDiscard all digits beyond a, and all zeroes at or below a. */\n/*\tDoes not normalize. */\n\nstatic sqInt\nbytesRshiftbyteslookfirst(sqInt aBytesOop, sqInt anInteger, sqInt b, sqInt a)\n{\n\tsqInt digit;\n\tsqInt digit1;\n\tsqInt f;\n\tsqInt i;\n\tsqInt j;\n\tsqInt m;\n\tsqInt n;\n\tsqInt newBytes;\n\tsqInt newLen;\n\tsqInt oldLen;\n\tunsigned char *  pFrom;\n\tunsigned char *pointer;\n\tunsigned char *pointer1;\n\tunsigned char *  pTo;\n\tsqInt x;\n\tsqInt x1;\n\n\tn = 0 - anInteger;\n\tx = 0;\n\tf = n + 8;\n\ti = a;\n\tm = (((0 - f) < 0) ? ((usqInt) 255 >> -(0 - f)) : ((usqInt) 255 << (0 - f)));\n\t/* begin digitOfBytes:at: */\n\tif (i > (interpreterProxy->slotSizeOf(aBytesOop))) {\n\t\tdigit = 0;\n\t\tgoto l2;\n\t}\n\telse {\n\t\tdigit = ((pointer1 = interpreterProxy->firstIndexableField(aBytesOop)))[i - 1];\n\t\tgoto l2;\n\t}\nl2:\t/* end digitOfBytes:at: */;\n\twhile ((((((n < 0) ? ((usqInt) digit >> -n) : ((usqInt) digit << n))) | x) == 0)\n && (i != 1)) {\n\n\t\t/* Can't exceed 8 bits */\n\n\t\tx = ((f < 0) ? ((usqInt) digit >> -f) : ((usqInt) digit << f));\n\t\ti -= 1;\n\t\t/* begin digitOfBytes:at: */\n\t\tif (i > (interpreterProxy->slotSizeOf(aBytesOop))) {\n\t\t\tdigit = 0;\n\t\t\tgoto l1;\n\t\t}\n\t\telse {\n\t\t\tdigit = ((pointer = interpreterProxy->firstIndexableField(aBytesOop)))[i - 1];\n\t\t\tgoto l1;\n\t\t}\n\tl1:\t/* end digitOfBytes:at: */;\n\t}\n\tif (i <= b) {\n\t\treturn interpreterProxy->instantiateClassindexableSize(interpreterProxy->fetchClassOf(aBytesOop), 0);\n\t}\n\toldLen = interpreterProxy->slotSizeOf(aBytesOop);\n\tnewLen = i - b;\n\tinterpreterProxy->pushRemappableOop(aBytesOop);\n\tnewBytes = interpreterProxy->instantiateClassindexableSize(interpreterProxy->fetchClassOf(aBytesOop), newLen);\n\taBytesOop = interpreterProxy->popRemappableOop();\n\t/* begin cCoreBytesRshiftCount:n:m:f:bytes:from:len:to:len: */\n\tpFrom = interpreterProxy->firstIndexableField(aBytesOop);\n\tpTo = interpreterProxy->firstIndexableField(newBytes);\n\t/* begin sqAssert: */\n\t/* missing DebugCode */;\nl3:\t/* end sqAssert: */;\n\tx1 = ((n < 0) ? ((usqInt) (pFrom[b]) >> -n) : ((usqInt) (pFrom[b]) << n));\n\t/* begin sqAssert: */\n\t/* missing DebugCode */;\nl4:\t/* end sqAssert: */;\n\tfor (j = (b + 1); j <= (i - 1); j += 1) {\n\t\tdigit1 = pFrom[j];\n\t\tpTo[(j - b) - 1] = ((((f < 0) ? ((usqInt) (digit1 & m) >> -f) : ((usqInt) (digit1 & m) << f))) | x1);\n\t\tx1 = ((n < 0) ? ((usqInt) digit1 >> -n) : ((usqInt) digit1 << n));\n\t}\n\tif (i == oldLen) {\n\t\tdigit1 = 0;\n\t}\n\telse {\n\t\tdigit1 = pFrom[i];\n\t}\n\tpTo[(i - b) - 1] = ((((f < 0) ? ((usqInt) (digit1 & m) >> -f) : ((usqInt) (digit1 & m) << f))) | x1);\n\treturn newBytes;\n}\n\n\n/*\tpByteRes len = longLen. */\n\nstatic sqInt\ncByteOpshortlenlongleninto(sqInt opIndex, unsigned char *  pByteShort, sqInt shortLen, unsigned char *  pByteLong, sqInt longLen, unsigned char *  pByteRes)\n{\n\tsqInt i;\n\tsqInt limit;\n\n\tlimit = shortLen - 1;\n\tif (opIndex == andOpIndex) {\n\t\tfor (i = 0; i <= limit; i += 1) {\n\t\t\tpByteRes[i] = ((pByteShort[i]) & (pByteLong[i]));\n\t\t}\n\t\tlimit = longLen - 1;\n\t\tfor (i = shortLen; i <= limit; i += 1) {\n\t\t\tpByteRes[i] = 0;\n\t\t}\n\t\treturn 0;\n\t}\n\tif (opIndex == orOpIndex) {\n\t\tfor (i = 0; i <= limit; i += 1) {\n\t\t\tpByteRes[i] = ((pByteShort[i]) | (pByteLong[i]));\n\t\t}\n\t\tlimit = longLen - 1;\n\t\tfor (i = shortLen; i <= limit; i += 1) {\n\t\t\tpByteRes[i] = (pByteLong[i]);\n\t\t}\n\t\treturn 0;\n\t}\n\tif (opIndex == xorOpIndex) {\n\t\tfor (i = 0; i <= limit; i += 1) {\n\t\t\tpByteRes[i] = ((pByteShort[i]) ^ (pByteLong[i]));\n\t\t}\n\t\tlimit = longLen - 1;\n\t\tfor (i = shortLen; i <= limit; i += 1) {\n\t\t\tpByteRes[i] = (pByteLong[i]);\n\t\t}\n\t\treturn 0;\n\t}\n\treturn interpreterProxy->primitiveFail();\n}\n\nstatic int\ncBytesCopyFromtolen(unsigned char *  pFrom, unsigned char *  pTo, sqInt len)\n{\n\tsqInt i;\n\tsqInt limit;\n\n\t;\n\tlimit = len - 1;\n\tfor (i = 0; i <= limit; i += 1) {\n\t\tpTo[i] = (pFrom[i]);\n\t}\n\treturn 0;\n}\n\n\n/*\tAnswer the index (in bits) of the high order bit of the receiver, or zero\n\tif the \n\treceiver is zero. This method is allowed (and needed) for \n\tLargeNegativeIntegers as well, since Squeak's LargeIntegers are \n\tsign/magnitude. */\n\nstatic sqInt\ncBytesHighBitlen(unsigned char *   pByte, sqInt len)\n{\n\tsqInt lastDigit;\n\tsqInt realLength;\n\n\trealLength = len;\n\twhile (((lastDigit = pByte[realLength - 1])) == 0) {\n\t\tif (((realLength -= 1)) == 0) {\n\t\t\treturn 0;\n\t\t}\n\t}\n\treturn (cHighBit(lastDigit)) + (8 * (realLength - 1));\n}\n\n\n/*\tC indexed! */\n\nstatic int\ncBytesLshiftfromlentolen(sqInt shiftCount, unsigned char *  pFrom, sqInt lenFrom, unsigned char *  pTo, sqInt lenTo)\n{\n\tsqInt bitShift;\n\tsqInt byteShift;\n\tsqInt carry;\n\tsqInt digit;\n\tsqInt i;\n\tsqInt lastIx;\n\tsqInt limit;\n\tsqInt mask;\n\tsqInt rShift;\n\n\tbyteShift = ((sqInt) shiftCount >> 3);\n\tbitShift = shiftCount % 8;\n\tif (bitShift == 0) {\n\t\t/* begin cBytesReplace:from:to:with:startingAt: */\n\t\treturn cBytesCopyFromtolen(pFrom + 0, pTo + byteShift, ((lenTo - 1) - byteShift) + 1);\n\t}\n\tcarry = 0;\n\trShift = bitShift - 8;\n\tmask = (((0 - bitShift) < 0) ? ((usqInt) 255 >> -(0 - bitShift)) : ((usqInt) 255 << (0 - bitShift)));\n\tlimit = byteShift - 1;\n\tfor (i = 0; i <= limit; i += 1) {\n\t\tpTo[i] = 0;\n\t}\n\tlimit = (lenTo - byteShift) - 2;\n\t/* begin sqAssert: */\n\t/* missing DebugCode */;\nl1:\t/* end sqAssert: */;\n\tfor (i = 0; i <= limit; i += 1) {\n\t\tdigit = pFrom[i];\n\t\tpTo[i + byteShift] = ((((bitShift < 0) ? ((usqInt) (digit & mask) >> -bitShift) : ((usqInt) (digit & mask) << bitShift))) | carry);\n\t\tcarry = ((rShift < 0) ? ((usqInt) digit >> -rShift) : ((usqInt) digit << rShift));\n\t}\n\tlastIx = limit + 1;\n\tif (lastIx > (lenFrom - 1)) {\n\t\tdigit = 0;\n\t}\n\telse {\n\t\tdigit = pFrom[lastIx];\n\t}\n\tpTo[lastIx + byteShift] = ((((bitShift < 0) ? ((usqInt) (digit & mask) >> -bitShift) : ((usqInt) (digit & mask) << bitShift))) | carry);\n\tcarry = ((rShift < 0) ? ((usqInt) digit >> -rShift) : ((usqInt) digit << rShift));\n\t/* begin sqAssert: */\n\t/* missing DebugCode */;\nl2:\t/* end sqAssert: */;\n}\n\n\n/*\tC indexed! */\n\nstatic int\ncBytesReplacefromtowithstartingAt(unsigned char *  pTo, sqInt start, sqInt stop, unsigned char *  pFrom, sqInt repStart)\n{\n\treturn cBytesCopyFromtolen(pFrom + repStart, pTo + start, (stop - start) + 1);\n}\n\nstatic void\ncCopyIntValtoBytes(sqInt val, sqInt bytes)\n{\n\tsqInt ix;\n\tunsigned char *   pByte;\n\n\tpByte = interpreterProxy->firstIndexableField(bytes);\n\tfor (ix = 1; ix <= (cDigitLengthOfCSI(val)); ix += 1) {\n\t\tpByte[ix - 1] = (cDigitOfCSIat(val, ix));\n\t}\n}\n\nstatic void\ncCoreBytesRshiftCountnmfbytesfromlentolen(sqInt count, sqInt n, sqInt m, sqInt f, sqInt b, unsigned char *  pFrom, sqInt fromLen, unsigned char *  pTo, sqInt toLen)\n{\n\tsqInt digit;\n\tsqInt j;\n\tsqInt x;\n\n\t/* begin sqAssert: */\n\t/* missing DebugCode */;\nl1:\t/* end sqAssert: */;\n\tx = ((n < 0) ? ((usqInt) (pFrom[b]) >> -n) : ((usqInt) (pFrom[b]) << n));\n\t/* begin sqAssert: */\n\t/* missing DebugCode */;\nl2:\t/* end sqAssert: */;\n\tfor (j = (b + 1); j <= (count - 1); j += 1) {\n\t\tdigit = pFrom[j];\n\t\tpTo[(j - b) - 1] = ((((f < 0) ? ((usqInt) (digit & m) >> -f) : ((usqInt) (digit & m) << f))) | x);\n\t\tx = ((n < 0) ? ((usqInt) digit >> -n) : ((usqInt) digit << n));\n\t}\n\tif (count == fromLen) {\n\t\tdigit = 0;\n\t}\n\telse {\n\t\tdigit = pFrom[count];\n\t}\n\tpTo[(count - b) - 1] = ((((f < 0) ? ((usqInt) (digit & m) >> -f) : ((usqInt) (digit & m) << f))) | x);\n}\n\nstatic void\ncCoreDigitDivDivlenremlenquolen(unsigned char *  pDiv, sqInt divLen, unsigned char *  pRem, sqInt remLen, unsigned char *  pQuo, sqInt quoLen)\n{\n\tsqInt a;\n\tsqInt cond;\n\tsqInt dh;\n\tsqInt dl;\n\tsqInt dnh;\n\tsqInt hi;\n\tsqInt i;\n\tsqInt j;\n\tsqInt k;\n\tsqInt l;\n\tsqInt lo;\n\tsqInt mul;\n\tsqInt q;\n\tsqInt ql;\n\tsqInt r1r2;\n\tsqInt r3;\n\tsqInt t;\n\n\n\t/* Last actual byte of data (ST ix) */\n\n\tdl = divLen - 1;\n\tql = quoLen;\n\tdh = pDiv[dl - 1];\n\tif (dl == 1) {\n\t\tdnh = 0;\n\t}\n\telse {\n\t\tdnh = pDiv[dl - 2];\n\t}\n\tfor (k = 1; k <= ql; k += 1) {\n\n\t\t/* maintain quo*arg+rem=self */\n\t\t/* Estimate rem/div by dividing the leading two bytes of rem by dh. */\n\t\t/* The estimate is q = qhi*16+qlo, where qhi and qlo are nibbles. */\n\t\t/* Nibbles are kicked off! We use full 16 bits now, because we are in  \n\t\tthe year 2000 ;-) [sr] */\n\t\t/* r1 := rem digitAt: j. */\n\n\t\tj = (remLen + 1) - k;\n\t\tif ((pRem[j - 1]) == dh) {\n\t\t\tq = 255;\n\t\t}\n\t\telse {\n\n\t\t\t/* Compute q = (r1,r2)//dh, t = (r1,r2)\\\\dh.                \n\t\t\t\tNote that r1,r2 are bytes, not nibbles.                \n\t\t\t\tBe careful not to generate intermediate results exceeding 13  \n\t\t\t\t            bits. */\n\t\t\t/* r2 := (rem digitAt: j - 2). */\n\n\t\t\tr1r2 = (((usqInt) (pRem[j - 1]) << 8)) + (pRem[j - 2]);\n\t\t\tt = r1r2 % dh;\n\n\t\t\t/* Next compute (hi,lo) := q*dnh */\n\n\t\t\tq = r1r2 / dh;\n\t\t\tmul = q * dnh;\n\t\t\thi = ((usqInt) mul >> 8);\n\n\t\t\t/* Correct overestimate of q.                \n\t\t\t\tMax of 2 iterations through loop -- see Knuth vol. 2 */\n\n\t\t\tlo = mul & 255;\n\t\t\tif (j < 3) {\n\t\t\t\tr3 = 0;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tr3 = pRem[j - 3];\n\t\t\t}\n\t\t\t\t\twhile (1) {\n\t\t\t\tif ((t < hi)\n\t\t\t\t || ((t == hi)\n && (r3 < lo))) {\n\n\t\t\t\t\t/* i.e. (t,r3) < (hi,lo) */\n\n\t\t\t\t\tq -= 1;\n\t\t\t\t\tlo -= dnh;\n\t\t\t\t\tif (lo < 0) {\n\t\t\t\t\t\thi -= 1;\n\t\t\t\t\t\tlo += 256;\n\t\t\t\t\t}\n\t\t\t\t\tcond = hi >= dh;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcond = 0;\n\t\t\t\t}\n\t\t\t\tif (!(cond)) break;\n\t\t\t\thi -= dh;\n\t\t\t}\n\t\t}\n\t\tl = j - dl;\n\t\ta = 0;\n\t\tfor (i = 1; i <= divLen; i += 1) {\n\t\t\thi = (pDiv[i - 1]) * (((usqInt) q >> 8));\n\n\t\t\t/* pRem at: l - 1 put: lo - (lo // 256 * 256). */\n\t\t\t/* sign-tolerant form of (lo bitAnd: 255) -> obsolete... */\n\n\t\t\tlo = (a + (pRem[l - 1])) - ((pDiv[i - 1]) * (q & 255));\n\t\t\tpRem[l - 1] = (lo & 255);\n\t\t\ta = (((sqInt) lo >> 8)) - hi;\n\t\t\tl += 1;\n\t\t}\n\t\tif (a < 0) {\n\n\t\t\t/* Add div back into rem, decrease q by 1 */\n\n\t\t\tq -= 1;\n\t\t\tl = j - dl;\n\t\t\ta = 0;\n\t\t\tfor (i = 1; i <= divLen; i += 1) {\n\t\t\t\ta = ((((usqInt) a >> 8)) + (pRem[l - 1])) + (pDiv[i - 1]);\n\t\t\t\tpRem[l - 1] = (a & 255);\n\t\t\t\tl += 1;\n\t\t\t}\n\t\t}\n\t\tpQuo[quoLen - k] = q;\n\t}\n}\n\n\n/*\tpByteRes len = longLen; returns over.. */\n\nstatic unsigned char\ncDigitAddlenwithleninto(unsigned char *  pByteShort, sqInt shortLen, unsigned char *  pByteLong, sqInt longLen, unsigned char *  pByteRes)\n{\n\tsqInt accum;\n\tsqInt i;\n\tsqInt limit;\n\n\taccum = 0;\n\tlimit = shortLen - 1;\n\tfor (i = 0; i <= limit; i += 1) {\n\t\taccum = ((((usqInt) accum >> 8)) + (pByteShort[i])) + (pByteLong[i]);\n\t\tpByteRes[i] = (accum & 255);\n\t}\n\tlimit = longLen - 1;\n\tfor (i = shortLen; i <= limit; i += 1) {\n\t\taccum = (((usqInt) accum >> 8)) + (pByteLong[i]);\n\t\tpByteRes[i] = (accum & 255);\n\t}\n\treturn ((usqInt) accum >> 8);\n}\n\n\n/*\tPrecondition: pFirst len = pSecond len. */\n\nstatic sqInt\ncDigitComparewithlen(unsigned char *  pFirst, unsigned char *  pSecond, sqInt len)\n{\n\tsqInt firstDigit;\n\tsqInt ix;\n\tsqInt secondDigit;\n\n\tix = len - 1;\n\twhile (ix >= 0) {\n\t\tif (((secondDigit = pSecond[ix])) != ((firstDigit = pFirst[ix]))) {\n\t\t\tif (secondDigit < firstDigit) {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t\tix -= 1;\n\t}\n\treturn 0;\n}\n\n\n/*\tAnswer the number of indexable fields of a CSmallInteger. This value is \n\tthe same as the largest legal subscript. */\n\nstatic sqInt\ncDigitLengthOfCSI(sqInt csi)\n{\n\tif ((csi < 256)\n\t && (csi > -256)) {\n\t\treturn 1;\n\t}\n\tif ((csi < 65536)\n\t && (csi > -65536)) {\n\t\treturn 2;\n\t}\n\tif ((csi < 16777216)\n\t && (csi > -16777216)) {\n\t\treturn 3;\n\t}\n\treturn 4;\n}\n\nstatic unsigned char\ncDigitMultiplylenwithleninto(unsigned char *  pByteShort, sqInt shortLen, unsigned char *  pByteLong, sqInt longLen, unsigned char *  pByteRes)\n{\n\tsqInt ab;\n\tsqInt carry;\n\tsqInt digit;\n\tsqInt i;\n\tsqInt j;\n\tsqInt k;\n\tsqInt limitLong;\n\tsqInt limitShort;\n\n\tif ((shortLen == 1)\n\t && ((pByteShort[0]) == 0)) {\n\t\treturn 0;\n\t}\n\tif ((longLen == 1)\n\t && ((pByteLong[0]) == 0)) {\n\t\treturn 0;\n\t}\n\tlimitShort = shortLen - 1;\n\tfor (i = 0; i <= limitShort; i += 1) {\n\t\tif (((digit = pByteShort[i])) != 0) {\n\t\t\tk = i;\n\n\t\t\t/* Loop invariant: 0<=carry<=0377, k=i+j-1 (ST) */\n\t\t\t/* -> Loop invariant: 0<=carry<=0377, k=i+j (C) (?) */\n\n\t\t\tcarry = 0;\n\t\t\tlimitLong = longLen - 1;\n\t\t\tfor (j = 0; j <= limitLong; j += 1) {\n\t\t\t\tab = (((pByteLong[j]) * digit) + carry) + (pByteRes[k]);\n\t\t\t\tcarry = ((usqInt) ab >> 8);\n\t\t\t\tpByteRes[k] = (ab & 255);\n\t\t\t\tk += 1;\n\t\t\t}\n\t\t\tpByteRes[k] = carry;\n\t\t}\n\t}\n\treturn 0;\n}\n\n\n/*\tAnswer the value of an indexable field in the receiver. \n\tLargePositiveInteger uses bytes of base two number, and each is a \n\t'digit' base 256. */\n/*\tST indexed! */\n\nstatic sqInt\ncDigitOfCSIat(sqInt csi, sqInt ix)\n{\n\tif (ix < 0) {\n\t\tinterpreterProxy->primitiveFail();\n\t}\n\tif (ix > 4) {\n\t\treturn 0;\n\t}\n\tif (csi < 0) {\n\t\t;\n\t\treturn (((((1 - ix) * 8) < 0) ? ((usqInt) (0 - csi) >> -((1 - ix) * 8)) : ((usqInt) (0 - csi) << ((1 - ix) * 8)))) & 255;\n\t}\n\telse {\n\t\treturn (((((1 - ix) * 8) < 0) ? ((usqInt) csi >> -((1 - ix) * 8)) : ((usqInt) csi << ((1 - ix) * 8)))) & 255;\n\t}\n}\n\nstatic void\ncDigitSublenwithleninto(unsigned char *  pByteSmall, sqInt smallLen, unsigned char *  pByteLarge, sqInt largeLen, unsigned char *  pByteRes)\n{\n\tsqInt i;\n\tsqInt limit;\n\tsqInt z;\n\n\n\t/* Loop invariant is -1<=z<=1 */\n\n\tz = 0;\n\tlimit = smallLen - 1;\n\tfor (i = 0; i <= limit; i += 1) {\n\t\tz = (z + (pByteLarge[i])) - (pByteSmall[i]);\n\t\tpByteRes[i] = (z - ((((sqInt) z >> 8)) * 256));\n\t\tz = ((sqInt) z >> 8);\n\t}\n\tlimit = largeLen - 1;\n\tfor (i = smallLen; i <= limit; i += 1) {\n\t\tz += pByteLarge[i];\n\t\tpByteRes[i] = (z - ((((sqInt) z >> 8)) * 256));\n\t\tz = ((sqInt) z >> 8);\n\t}\n}\n\n\n/*\tAnswer the index of the high order bit of the argument, or zero if the \n\targument is zero. */\n/*\tFor 64 bit uints there could be added a 32-shift. */\n\nstatic sqInt\ncHighBit(sqInt uint)\n{\n\tsqInt bitNo;\n\tunsigned int   shifted;\n\n\tshifted = uint;\n\tbitNo = 0;\n\tif (!(shifted < (1 << 16))) {\n\t\tshifted = ((usqInt) shifted >> 16);\n\t\tbitNo += 16;\n\t}\n\tif (!(shifted < (1 << 8))) {\n\t\tshifted = ((usqInt) shifted >> 8);\n\t\tbitNo += 8;\n\t}\n\tif (!(shifted < (1 << 4))) {\n\t\tshifted = ((usqInt) shifted >> 4);\n\t\tbitNo += 4;\n\t}\n\tif (!(shifted < (1 << 2))) {\n\t\tshifted = ((usqInt) shifted >> 2);\n\t\tbitNo += 2;\n\t}\n\tif (!(shifted < (1 << 1))) {\n\t\tshifted = ((usqInt) shifted >> 1);\n\t\tbitNo += 1;\n\t}\n\treturn bitNo + shifted;\n}\n\n\n/*\tanOop has to be a SmallInteger! */\n\nstatic sqInt\ncreateLargeFromSmallInteger(sqInt anOop)\n{\n\tsqInt class;\n\tsqInt ix;\n\tunsigned char *   pByte;\n\tsqInt res;\n\tsqInt size;\n\tsqInt val;\n\n\tval = (anOop >> 1);\n\tif (val < 0) {\n\t\tclass = interpreterProxy->classLargeNegativeInteger();\n\t}\n\telse {\n\t\tclass = interpreterProxy->classLargePositiveInteger();\n\t}\n\t/* begin cDigitLengthOfCSI: */\n\tif ((val < 256)\n\t && (val > -256)) {\n\t\tsize = 1;\n\t\tgoto l1;\n\t}\n\tif ((val < 65536)\n\t && (val > -65536)) {\n\t\tsize = 2;\n\t\tgoto l1;\n\t}\n\tif ((val < 16777216)\n\t && (val > -16777216)) {\n\t\tsize = 3;\n\t\tgoto l1;\n\t}\n\tsize = 4;\nl1:\t/* end cDigitLengthOfCSI: */;\n\tres = interpreterProxy->instantiateClassindexableSize(class, size);\n\tpByte = interpreterProxy->firstIndexableField(res);\n\tfor (ix = 1; ix <= size; ix += 1) {\n\t\tpByte[ix - 1] = (cDigitOfCSIat(val, ix));\n\t}\n\treturn res;\n}\n\n\n/*\tDoes not need to normalize! */\n\nstatic sqInt\ndigitAddLargewith(sqInt firstInteger, sqInt secondInteger)\n{\n\tsqInt accum;\n\tsqInt firstLen;\n\tsqInt i;\n\tsqInt limit;\n\tsqInt longInt;\n\tsqInt longLen;\n\tsqInt newSum;\n\tunsigned char   over;\n\tunsigned char *  pByteLong;\n\tunsigned char *  pByteRes;\n\tunsigned char *  pByteShort;\n\tsqInt resClass;\n\tsqInt secondLen;\n\tsqInt shortInt;\n\tsqInt shortLen;\n\tsqInt sum;\n\n\tfirstLen = interpreterProxy->slotSizeOf(firstInteger);\n\tsecondLen = interpreterProxy->slotSizeOf(secondInteger);\n\tresClass = interpreterProxy->fetchClassOf(firstInteger);\n\tif (firstLen <= secondLen) {\n\t\tshortInt = firstInteger;\n\t\tshortLen = firstLen;\n\t\tlongInt = secondInteger;\n\t\tlongLen = secondLen;\n\t}\n\telse {\n\t\tshortInt = secondInteger;\n\t\tshortLen = secondLen;\n\t\tlongInt = firstInteger;\n\t\tlongLen = firstLen;\n\t}\n\tinterpreterProxy->pushRemappableOop(shortInt);\n\tinterpreterProxy->pushRemappableOop(longInt);\n\tsum = interpreterProxy->instantiateClassindexableSize(resClass, longLen);\n\tlongInt = interpreterProxy->popRemappableOop();\n\tshortInt = interpreterProxy->popRemappableOop();\n\t/* begin cDigitAdd:len:with:len:into: */\n\tpByteShort = interpreterProxy->firstIndexableField(shortInt);\n\tpByteLong = interpreterProxy->firstIndexableField(longInt);\n\tpByteRes = interpreterProxy->firstIndexableField(sum);\n\taccum = 0;\n\tlimit = shortLen - 1;\n\tfor (i = 0; i <= limit; i += 1) {\n\t\taccum = ((((usqInt) accum >> 8)) + (pByteShort[i])) + (pByteLong[i]);\n\t\tpByteRes[i] = (accum & 255);\n\t}\n\tlimit = longLen - 1;\n\tfor (i = shortLen; i <= limit; i += 1) {\n\t\taccum = (((usqInt) accum >> 8)) + (pByteLong[i]);\n\t\tpByteRes[i] = (accum & 255);\n\t}\n\tover = ((usqInt) accum >> 8);\n\tif (over > 0) {\n\t\tinterpreterProxy->pushRemappableOop(sum);\n\n\t\t/* sum := sum growby: 1. */\n\n\t\tnewSum = interpreterProxy->instantiateClassindexableSize(resClass, longLen + 1);\n\t\tsum = interpreterProxy->popRemappableOop();\n\t\tcBytesCopyFromtolen(interpreterProxy->firstIndexableField(sum), interpreterProxy->firstIndexableField(newSum), longLen);\n\n\t\t/* C index! */\n\n\t\tsum = newSum;\n\t\t(((unsigned char *) (interpreterProxy->firstIndexableField(sum))))[longLen] = over;\n\t}\n\treturn sum;\n}\n\n\n/*\tBit logic here is only implemented for positive integers or Zero;\n\tif rec or arg is negative, it fails. */\n\nstatic sqInt\ndigitBitLogicwithopIndex(sqInt firstInteger, sqInt secondInteger, sqInt opIx)\n{\n\tsqInt firstLarge;\n\tsqInt firstLen;\n\tsqInt i;\n\tsqInt limit;\n\tsqInt longLarge;\n\tsqInt longLen;\n\tunsigned char *  pByteLong;\n\tunsigned char *  pByteRes;\n\tunsigned char *  pByteShort;\n\tsqInt result;\n\tsqInt secondLarge;\n\tsqInt secondLen;\n\tsqInt shortLarge;\n\tsqInt shortLen;\n\n\tif ((firstInteger & 1)) {\n\t\tif (((firstInteger >> 1)) < 0) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t\tinterpreterProxy->pushRemappableOop(secondInteger);\n\t\tfirstLarge = createLargeFromSmallInteger(firstInteger);\n\t\tsecondInteger = interpreterProxy->popRemappableOop();\n\t}\n\telse {\n\t\tif ((interpreterProxy->fetchClassOf(firstInteger)) == (interpreterProxy->classLargeNegativeInteger())) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t\tfirstLarge = firstInteger;\n\t}\n\tif ((secondInteger & 1)) {\n\t\tif (((secondInteger >> 1)) < 0) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t\tinterpreterProxy->pushRemappableOop(firstLarge);\n\t\tsecondLarge = createLargeFromSmallInteger(secondInteger);\n\t\tfirstLarge = interpreterProxy->popRemappableOop();\n\t}\n\telse {\n\t\tif ((interpreterProxy->fetchClassOf(secondInteger)) == (interpreterProxy->classLargeNegativeInteger())) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t\tsecondLarge = secondInteger;\n\t}\n\tfirstLen = interpreterProxy->slotSizeOf(firstLarge);\n\tsecondLen = interpreterProxy->slotSizeOf(secondLarge);\n\tif (firstLen < secondLen) {\n\t\tshortLen = firstLen;\n\t\tshortLarge = firstLarge;\n\t\tlongLen = secondLen;\n\t\tlongLarge = secondLarge;\n\t}\n\telse {\n\t\tshortLen = secondLen;\n\t\tshortLarge = secondLarge;\n\t\tlongLen = firstLen;\n\t\tlongLarge = firstLarge;\n\t}\n\tinterpreterProxy->pushRemappableOop(shortLarge);\n\tinterpreterProxy->pushRemappableOop(longLarge);\n\tresult = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classLargePositiveInteger(), longLen);\n\tlongLarge = interpreterProxy->popRemappableOop();\n\tshortLarge = interpreterProxy->popRemappableOop();\n\t/* begin cByteOp:short:len:long:len:into: */\n\tpByteShort = interpreterProxy->firstIndexableField(shortLarge);\n\tpByteLong = interpreterProxy->firstIndexableField(longLarge);\n\tpByteRes = interpreterProxy->firstIndexableField(result);\n\tlimit = shortLen - 1;\n\tif (opIx == andOpIndex) {\n\t\tfor (i = 0; i <= limit; i += 1) {\n\t\t\tpByteRes[i] = ((pByteShort[i]) & (pByteLong[i]));\n\t\t}\n\t\tlimit = longLen - 1;\n\t\tfor (i = shortLen; i <= limit; i += 1) {\n\t\t\tpByteRes[i] = 0;\n\t\t}\n\t\tgoto l1;\n\t}\n\tif (opIx == orOpIndex) {\n\t\tfor (i = 0; i <= limit; i += 1) {\n\t\t\tpByteRes[i] = ((pByteShort[i]) | (pByteLong[i]));\n\t\t}\n\t\tlimit = longLen - 1;\n\t\tfor (i = shortLen; i <= limit; i += 1) {\n\t\t\tpByteRes[i] = (pByteLong[i]);\n\t\t}\n\t\tgoto l1;\n\t}\n\tif (opIx == xorOpIndex) {\n\t\tfor (i = 0; i <= limit; i += 1) {\n\t\t\tpByteRes[i] = ((pByteShort[i]) ^ (pByteLong[i]));\n\t\t}\n\t\tlimit = longLen - 1;\n\t\tfor (i = shortLen; i <= limit; i += 1) {\n\t\t\tpByteRes[i] = (pByteLong[i]);\n\t\t}\n\t\tgoto l1;\n\t}\n\tinterpreterProxy->primitiveFail();\nl1:\t/* end cByteOp:short:len:long:len:into: */;\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\treturn normalizePositive(result);\n}\n\n\n/*\tCompare the magnitude of firstInteger with that of secondInteger. \n\tReturn a code of 1, 0, -1 for firstInteger >, = , < secondInteger */\n\nstatic sqInt\ndigitCompareLargewith(sqInt firstInteger, sqInt secondInteger)\n{\n\tsqInt firstLen;\n\tsqInt secondLen;\n\n\tfirstLen = interpreterProxy->slotSizeOf(firstInteger);\n\tsecondLen = interpreterProxy->slotSizeOf(secondInteger);\n\tif (secondLen != firstLen) {\n\t\tif (secondLen > firstLen) {\n\t\t\treturn interpreterProxy->integerObjectOf(-1);\n\t\t}\n\t\telse {\n\t\t\treturn interpreterProxy->integerObjectOf(1);\n\t\t}\n\t}\n\treturn interpreterProxy->integerObjectOf((cDigitComparewithlen(interpreterProxy->firstIndexableField(firstInteger), interpreterProxy->firstIndexableField(secondInteger), firstLen)));\n}\n\n\n/*\tDoes not normalize. */\n/*\tDivision by zero has to be checked in caller. */\n\nstatic sqInt\ndigitDivLargewithnegative(sqInt firstInteger, sqInt secondInteger, sqInt neg)\n{\n\tsqInt a;\n\tsqInt cond;\n\tsqInt d;\n\tsqInt dh;\n\tsqInt div;\n\tsqInt divLen;\n\tsqInt dl;\n\tsqInt dnh;\n\tsqInt firstLen;\n\tsqInt hi;\n\tsqInt i;\n\tsqInt j;\n\tsqInt k;\n\tsqInt l;\n\tsqInt l1;\n\tsqInt lo;\n\tsqInt mul;\n\tunsigned char *  pDiv;\n\tunsigned char *pointer;\n\tunsigned char *  pQuo;\n\tunsigned char *  pRem;\n\tsqInt q;\n\tsqInt ql;\n\tsqInt quo;\n\tsqInt quoLen;\n\tsqInt r1r2;\n\tsqInt r3;\n\tsqInt rem;\n\tsqInt remLen;\n\tsqInt result;\n\tsqInt resultClass;\n\tsqInt secondLen;\n\tsqInt t;\n\n\tfirstLen = interpreterProxy->slotSizeOf(firstInteger);\n\tsecondLen = interpreterProxy->slotSizeOf(secondInteger);\n\tif (neg) {\n\t\tresultClass = interpreterProxy->classLargeNegativeInteger();\n\t}\n\telse {\n\t\tresultClass = interpreterProxy->classLargePositiveInteger();\n\t}\n\tl = (firstLen - secondLen) + 1;\n\tif (l <= 0) {\n\t\tinterpreterProxy->pushRemappableOop(firstInteger);\n\t\tresult = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2);\n\t\tfirstInteger = interpreterProxy->popRemappableOop();\n\t\tinterpreterProxy->stObjectatput(result,1,(interpreterProxy->integerObjectOf(0)));\n\t\tinterpreterProxy->stObjectatput(result,2,firstInteger);\n\t\treturn result;\n\t}\n\td = 8 - (cHighBit(((pointer = interpreterProxy->firstIndexableField(secondInteger)))[secondLen - 1]));\n\tinterpreterProxy->pushRemappableOop(firstInteger);\n\tdiv = bytesLshift(secondInteger, d);\n\tdiv = bytesOrIntgrowTo(div, (digitLength(div)) + 1);\n\tfirstInteger = interpreterProxy->popRemappableOop();\n\tinterpreterProxy->pushRemappableOop(div);\n\trem = bytesLshift(firstInteger, d);\n\tif ((digitLength(rem)) == firstLen) {\n\t\trem = bytesOrIntgrowTo(rem, firstLen + 1);\n\t}\n\tdiv = interpreterProxy->popRemappableOop();\n\tinterpreterProxy->pushRemappableOop(div);\n\tinterpreterProxy->pushRemappableOop(rem);\n\tquo = interpreterProxy->instantiateClassindexableSize(resultClass, l);\n\trem = interpreterProxy->popRemappableOop();\n\tdiv = interpreterProxy->popRemappableOop();\n\t/* begin cCoreDigitDivDiv:len:rem:len:quo:len: */\n\tpDiv = interpreterProxy->firstIndexableField(div);\n\t/* begin digitLength: */\n\tif ((div & 1)) {\n\t\t/* begin cDigitLengthOfCSI: */\n\t\tif ((((div >> 1)) < 256)\n\t\t && (((div >> 1)) > -256)) {\n\t\t\tdivLen = 1;\n\t\t\tgoto l1;\n\t\t}\n\t\tif ((((div >> 1)) < 65536)\n\t\t && (((div >> 1)) > -65536)) {\n\t\t\tdivLen = 2;\n\t\t\tgoto l1;\n\t\t}\n\t\tif ((((div >> 1)) < 16777216)\n\t\t && (((div >> 1)) > -16777216)) {\n\t\t\tdivLen = 3;\n\t\t\tgoto l1;\n\t\t}\n\t\tdivLen = 4;\n\t\tgoto l1;\n\t}\n\telse {\n\t\tdivLen = interpreterProxy->slotSizeOf(div);\n\t\tgoto l1;\n\t}\nl1:\t/* end digitLength: */;\n\tpRem = interpreterProxy->firstIndexableField(rem);\n\t/* begin digitLength: */\n\tif ((rem & 1)) {\n\t\t/* begin cDigitLengthOfCSI: */\n\t\tif ((((rem >> 1)) < 256)\n\t\t && (((rem >> 1)) > -256)) {\n\t\t\tremLen = 1;\n\t\t\tgoto l2;\n\t\t}\n\t\tif ((((rem >> 1)) < 65536)\n\t\t && (((rem >> 1)) > -65536)) {\n\t\t\tremLen = 2;\n\t\t\tgoto l2;\n\t\t}\n\t\tif ((((rem >> 1)) < 16777216)\n\t\t && (((rem >> 1)) > -16777216)) {\n\t\t\tremLen = 3;\n\t\t\tgoto l2;\n\t\t}\n\t\tremLen = 4;\n\t\tgoto l2;\n\t}\n\telse {\n\t\tremLen = interpreterProxy->slotSizeOf(rem);\n\t\tgoto l2;\n\t}\nl2:\t/* end digitLength: */;\n\tpQuo = interpreterProxy->firstIndexableField(quo);\n\t/* begin digitLength: */\n\tif ((quo & 1)) {\n\t\t/* begin cDigitLengthOfCSI: */\n\t\tif ((((quo >> 1)) < 256)\n\t\t && (((quo >> 1)) > -256)) {\n\t\t\tquoLen = 1;\n\t\t\tgoto l3;\n\t\t}\n\t\tif ((((quo >> 1)) < 65536)\n\t\t && (((quo >> 1)) > -65536)) {\n\t\t\tquoLen = 2;\n\t\t\tgoto l3;\n\t\t}\n\t\tif ((((quo >> 1)) < 16777216)\n\t\t && (((quo >> 1)) > -16777216)) {\n\t\t\tquoLen = 3;\n\t\t\tgoto l3;\n\t\t}\n\t\tquoLen = 4;\n\t\tgoto l3;\n\t}\n\telse {\n\t\tquoLen = interpreterProxy->slotSizeOf(quo);\n\t\tgoto l3;\n\t}\nl3:\t/* end digitLength: */;\n\n\t/* Last actual byte of data (ST ix) */\n\n\tdl = divLen - 1;\n\tql = quoLen;\n\tdh = pDiv[dl - 1];\n\tif (dl == 1) {\n\t\tdnh = 0;\n\t}\n\telse {\n\t\tdnh = pDiv[dl - 2];\n\t}\n\tfor (k = 1; k <= ql; k += 1) {\n\n\t\t/* maintain quo*arg+rem=self */\n\t\t/* Estimate rem/div by dividing the leading two bytes of rem by dh. */\n\t\t/* The estimate is q = qhi*16+qlo, where qhi and qlo are nibbles. */\n\t\t/* Nibbles are kicked off! We use full 16 bits now, because we are in  \n\t\tthe year 2000 ;-) [sr] */\n\t\t/* r1 := rem digitAt: j. */\n\n\t\tj = (remLen + 1) - k;\n\t\tif ((pRem[j - 1]) == dh) {\n\t\t\tq = 255;\n\t\t}\n\t\telse {\n\n\t\t\t/* Compute q = (r1,r2)//dh, t = (r1,r2)\\\\dh.                \n\t\t\t\tNote that r1,r2 are bytes, not nibbles.                \n\t\t\t\tBe careful not to generate intermediate results exceeding 13  \n\t\t\t\t            bits. */\n\t\t\t/* r2 := (rem digitAt: j - 2). */\n\n\t\t\tr1r2 = (((usqInt) (pRem[j - 1]) << 8)) + (pRem[j - 2]);\n\t\t\tt = r1r2 % dh;\n\n\t\t\t/* Next compute (hi,lo) := q*dnh */\n\n\t\t\tq = r1r2 / dh;\n\t\t\tmul = q * dnh;\n\t\t\thi = ((usqInt) mul >> 8);\n\n\t\t\t/* Correct overestimate of q.                \n\t\t\t\tMax of 2 iterations through loop -- see Knuth vol. 2 */\n\n\t\t\tlo = mul & 255;\n\t\t\tif (j < 3) {\n\t\t\t\tr3 = 0;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tr3 = pRem[j - 3];\n\t\t\t}\n\t\t\t\t\twhile (1) {\n\t\t\t\tif ((t < hi)\n\t\t\t\t || ((t == hi)\n && (r3 < lo))) {\n\n\t\t\t\t\t/* i.e. (t,r3) < (hi,lo) */\n\n\t\t\t\t\tq -= 1;\n\t\t\t\t\tlo -= dnh;\n\t\t\t\t\tif (lo < 0) {\n\t\t\t\t\t\thi -= 1;\n\t\t\t\t\t\tlo += 256;\n\t\t\t\t\t}\n\t\t\t\t\tcond = hi >= dh;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcond = 0;\n\t\t\t\t}\n\t\t\t\tif (!(cond)) break;\n\t\t\t\thi -= dh;\n\t\t\t}\n\t\t}\n\t\tl1 = j - dl;\n\t\ta = 0;\n\t\tfor (i = 1; i <= divLen; i += 1) {\n\t\t\thi = (pDiv[i - 1]) * (((usqInt) q >> 8));\n\n\t\t\t/* pRem at: l - 1 put: lo - (lo // 256 * 256). */\n\t\t\t/* sign-tolerant form of (lo bitAnd: 255) -> obsolete... */\n\n\t\t\tlo = (a + (pRem[l1 - 1])) - ((pDiv[i - 1]) * (q & 255));\n\t\t\tpRem[l1 - 1] = (lo & 255);\n\t\t\ta = (((sqInt) lo >> 8)) - hi;\n\t\t\tl1 += 1;\n\t\t}\n\t\tif (a < 0) {\n\n\t\t\t/* Add div back into rem, decrease q by 1 */\n\n\t\t\tq -= 1;\n\t\t\tl1 = j - dl;\n\t\t\ta = 0;\n\t\t\tfor (i = 1; i <= divLen; i += 1) {\n\t\t\t\ta = ((((usqInt) a >> 8)) + (pRem[l1 - 1])) + (pDiv[i - 1]);\n\t\t\t\tpRem[l1 - 1] = (a & 255);\n\t\t\t\tl1 += 1;\n\t\t\t}\n\t\t}\n\t\tpQuo[quoLen - k] = q;\n\t}\n\tinterpreterProxy->pushRemappableOop(quo);\n\trem = bytesRshiftbyteslookfirst(rem, d, 0, (digitLength(div)) - 1);\n\tquo = interpreterProxy->popRemappableOop();\n\tinterpreterProxy->pushRemappableOop(quo);\n\tinterpreterProxy->pushRemappableOop(rem);\n\tresult = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2);\n\trem = interpreterProxy->popRemappableOop();\n\tquo = interpreterProxy->popRemappableOop();\n\tinterpreterProxy->stObjectatput(result,1,quo);\n\tinterpreterProxy->stObjectatput(result,2,rem);\n\treturn result;\n}\n\nstatic sqInt\ndigitLength(sqInt oop)\n{\n\tif ((oop & 1)) {\n\t\t/* begin cDigitLengthOfCSI: */\n\t\tif ((((oop >> 1)) < 256)\n\t\t && (((oop >> 1)) > -256)) {\n\t\t\treturn 1;\n\t\t}\n\t\tif ((((oop >> 1)) < 65536)\n\t\t && (((oop >> 1)) > -65536)) {\n\t\t\treturn 2;\n\t\t}\n\t\tif ((((oop >> 1)) < 16777216)\n\t\t && (((oop >> 1)) > -16777216)) {\n\t\t\treturn 3;\n\t\t}\n\t\treturn 4;\n\t}\n\telse {\n\t\treturn interpreterProxy->slotSizeOf(oop);\n\t}\n}\n\n\n/*\tNormalizes. */\n\nstatic sqInt\ndigitMultiplyLargewithnegative(sqInt firstInteger, sqInt secondInteger, sqInt neg)\n{\n\tsqInt ab;\n\tsqInt carry;\n\tsqInt digit;\n\tsqInt firstLen;\n\tsqInt i;\n\tsqInt j;\n\tsqInt k;\n\tsqInt limitLong;\n\tsqInt limitShort;\n\tsqInt longInt;\n\tsqInt longLen;\n\tunsigned char *  pByteLong;\n\tunsigned char *  pByteRes;\n\tunsigned char *  pByteShort;\n\tsqInt prod;\n\tsqInt resultClass;\n\tsqInt secondLen;\n\tsqInt shortInt;\n\tsqInt shortLen;\n\n\tfirstLen = interpreterProxy->slotSizeOf(firstInteger);\n\tsecondLen = interpreterProxy->slotSizeOf(secondInteger);\n\tif (firstLen <= secondLen) {\n\t\tshortInt = firstInteger;\n\t\tshortLen = firstLen;\n\t\tlongInt = secondInteger;\n\t\tlongLen = secondLen;\n\t}\n\telse {\n\t\tshortInt = secondInteger;\n\t\tshortLen = secondLen;\n\t\tlongInt = firstInteger;\n\t\tlongLen = firstLen;\n\t}\n\tif (neg) {\n\t\tresultClass = interpreterProxy->classLargeNegativeInteger();\n\t}\n\telse {\n\t\tresultClass = interpreterProxy->classLargePositiveInteger();\n\t}\n\tinterpreterProxy->pushRemappableOop(shortInt);\n\tinterpreterProxy->pushRemappableOop(longInt);\n\tprod = interpreterProxy->instantiateClassindexableSize(resultClass, longLen + shortLen);\n\tlongInt = interpreterProxy->popRemappableOop();\n\tshortInt = interpreterProxy->popRemappableOop();\n\t/* begin cDigitMultiply:len:with:len:into: */\n\tpByteShort = interpreterProxy->firstIndexableField(shortInt);\n\tpByteLong = interpreterProxy->firstIndexableField(longInt);\n\tpByteRes = interpreterProxy->firstIndexableField(prod);\n\tif ((shortLen == 1)\n\t && ((pByteShort[0]) == 0)) {\n\t\tgoto l1;\n\t}\n\tif ((longLen == 1)\n\t && ((pByteLong[0]) == 0)) {\n\t\tgoto l1;\n\t}\n\tlimitShort = shortLen - 1;\n\tfor (i = 0; i <= limitShort; i += 1) {\n\t\tif (((digit = pByteShort[i])) != 0) {\n\t\t\tk = i;\n\n\t\t\t/* Loop invariant: 0<=carry<=0377, k=i+j-1 (ST) */\n\t\t\t/* -> Loop invariant: 0<=carry<=0377, k=i+j (C) (?) */\n\n\t\t\tcarry = 0;\n\t\t\tlimitLong = longLen - 1;\n\t\t\tfor (j = 0; j <= limitLong; j += 1) {\n\t\t\t\tab = (((pByteLong[j]) * digit) + carry) + (pByteRes[k]);\n\t\t\t\tcarry = ((usqInt) ab >> 8);\n\t\t\t\tpByteRes[k] = (ab & 255);\n\t\t\t\tk += 1;\n\t\t\t}\n\t\t\tpByteRes[k] = carry;\n\t\t}\n\t}\nl1:\t/* end cDigitMultiply:len:with:len:into: */;\n\t/* begin normalize: */\n\t/* missing DebugCode */;\n\tif ((interpreterProxy->fetchClassOf(prod)) == (interpreterProxy->classLargePositiveInteger())) {\n\t\treturn normalizePositive(prod);\n\t}\n\telse {\n\t\treturn normalizeNegative(prod);\n\t}\n}\n\n\n/*\tArgument has to be aLargeInteger! */\n\nstatic sqInt\ndigitOfBytesat(sqInt aBytesOop, sqInt ix)\n{\n\tunsigned char *pointer;\n\n\tif (ix > (interpreterProxy->slotSizeOf(aBytesOop))) {\n\t\treturn 0;\n\t}\n\telse {\n\t\treturn ((pointer = interpreterProxy->firstIndexableField(aBytesOop)))[ix - 1];\n\t}\n}\n\nstatic sqInt\ndigitOfat(sqInt oop, sqInt ix)\n{\n\tunsigned char *pointer;\n\n\tif ((oop & 1)) {\n\t\treturn cDigitOfCSIat((oop >> 1), ix);\n\t}\n\telse {\n\t\t/* begin digitOfBytes:at: */\n\t\tif (ix > (interpreterProxy->slotSizeOf(oop))) {\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\treturn ((pointer = interpreterProxy->firstIndexableField(oop)))[ix - 1];\n\t\t}\n\t}\n}\n\n\n/*\tNormalizes. */\n\nstatic sqInt\ndigitSubLargewith(sqInt firstInteger, sqInt secondInteger)\n{\n\tsqInt firstLen;\n\tsqInt firstNeg;\n\tsqInt i;\n\tsqInt larger;\n\tsqInt largerLen;\n\tsqInt limit;\n\tsqInt neg;\n\tunsigned char *  pByteLarge;\n\tunsigned char *  pByteRes;\n\tunsigned char *  pByteSmall;\n\tsqInt res;\n\tsqInt resLen;\n\tsqInt secondLen;\n\tsqInt smaller;\n\tsqInt smallerLen;\n\tsqInt z;\n\n\tfirstNeg = (interpreterProxy->fetchClassOf(firstInteger)) == (interpreterProxy->classLargeNegativeInteger());\n\tfirstLen = interpreterProxy->slotSizeOf(firstInteger);\n\tsecondLen = interpreterProxy->slotSizeOf(secondInteger);\n\tif (firstLen == secondLen) {\n\t\twhile ((firstLen > 1)\n && ((digitOfBytesat(firstInteger, firstLen)) == (digitOfBytesat(secondInteger, firstLen)))) {\n\t\t\tfirstLen -= 1;\n\t\t}\n\t\tsecondLen = firstLen;\n\t}\n\tif ((firstLen < secondLen)\n\t || ((firstLen == secondLen)\n && ((digitOfBytesat(firstInteger, firstLen)) < (digitOfBytesat(secondInteger, firstLen))))) {\n\t\tlarger = secondInteger;\n\t\tlargerLen = secondLen;\n\t\tsmaller = firstInteger;\n\t\tsmallerLen = firstLen;\n\t\tneg = firstNeg == 0;\n\t}\n\telse {\n\t\tlarger = firstInteger;\n\t\tlargerLen = firstLen;\n\t\tsmaller = secondInteger;\n\t\tsmallerLen = secondLen;\n\t\tneg = firstNeg;\n\t}\n\tresLen = largerLen;\n\tinterpreterProxy->pushRemappableOop(smaller);\n\tinterpreterProxy->pushRemappableOop(larger);\n\tres = interpreterProxy->instantiateClassindexableSize((neg\n\t\t? interpreterProxy->classLargeNegativeInteger()\n\t\t: interpreterProxy->classLargePositiveInteger()), resLen);\n\tlarger = interpreterProxy->popRemappableOop();\n\tsmaller = interpreterProxy->popRemappableOop();\n\t/* begin cDigitSub:len:with:len:into: */\n\tpByteSmall = interpreterProxy->firstIndexableField(smaller);\n\tpByteLarge = interpreterProxy->firstIndexableField(larger);\n\tpByteRes = interpreterProxy->firstIndexableField(res);\n\n\t/* Loop invariant is -1<=z<=1 */\n\n\tz = 0;\n\tlimit = smallerLen - 1;\n\tfor (i = 0; i <= limit; i += 1) {\n\t\tz = (z + (pByteLarge[i])) - (pByteSmall[i]);\n\t\tpByteRes[i] = (z - ((((sqInt) z >> 8)) * 256));\n\t\tz = ((sqInt) z >> 8);\n\t}\n\tlimit = largerLen - 1;\n\tfor (i = smallerLen; i <= limit; i += 1) {\n\t\tz += pByteLarge[i];\n\t\tpByteRes[i] = (z - ((((sqInt) z >> 8)) * 256));\n\t\tz = ((sqInt) z >> 8);\n\t}\n\treturn (neg\n\t\t? normalizeNegative(res)\n\t\t: normalizePositive(res));\n}\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nstatic sqInt\nhighBitOfBytes(sqInt aBytesOop)\n{\n\tsqInt lastDigit;\n\tsqInt len;\n\tunsigned char *   pByte;\n\tsqInt realLength;\n\n\t/* begin cBytesHighBit:len: */\n\tpByte = interpreterProxy->firstIndexableField(aBytesOop);\n\tlen = interpreterProxy->slotSizeOf(aBytesOop);\n\trealLength = len;\n\twhile (((lastDigit = pByte[realLength - 1])) == 0) {\n\t\tif (((realLength -= 1)) == 0) {\n\t\t\treturn 0;\n\t\t}\n\t}\n\treturn (cHighBit(lastDigit)) + (8 * (realLength - 1));\n}\n\n\n/*\tInitializes ST constants; C's are set by class>>declareCVarsIn:. */\n\nstatic void\ninitialize(void)\n{\n\t\"nothing to do here\";\n}\n\nstatic sqInt\nisNormalized(sqInt anInteger)\n{\n\tsqInt ix;\n\tsqInt len;\n\tsqInt maxVal;\n\tsqInt minVal;\n\tunsigned char *pointer;\n\tunsigned char *pointer1;\n\tunsigned char *pointer2;\n\tunsigned char *pointer3;\n\tsqInt sLen;\n\n\tif ((anInteger & 1)) {\n\t\treturn 1;\n\t}\n\t/* begin digitLength: */\n\tif ((anInteger & 1)) {\n\t\t/* begin cDigitLengthOfCSI: */\n\t\tif ((((anInteger >> 1)) < 256)\n\t\t && (((anInteger >> 1)) > -256)) {\n\t\t\tlen = 1;\n\t\t\tgoto l1;\n\t\t}\n\t\tif ((((anInteger >> 1)) < 65536)\n\t\t && (((anInteger >> 1)) > -65536)) {\n\t\t\tlen = 2;\n\t\t\tgoto l1;\n\t\t}\n\t\tif ((((anInteger >> 1)) < 16777216)\n\t\t && (((anInteger >> 1)) > -16777216)) {\n\t\t\tlen = 3;\n\t\t\tgoto l1;\n\t\t}\n\t\tlen = 4;\n\t\tgoto l1;\n\t}\n\telse {\n\t\tlen = interpreterProxy->slotSizeOf(anInteger);\n\t\tgoto l1;\n\t}\nl1:\t/* end digitLength: */;\n\tif (len == 0) {\n\t\treturn 0;\n\t}\n\tif ((((pointer = interpreterProxy->firstIndexableField(anInteger)))[len - 1]) == 0) {\n\t\treturn 0;\n\t}\n\n\t/* maximal digitLength of aSmallInteger */\n\n\tsLen = 4;\n\tif (len > sLen) {\n\t\treturn 1;\n\t}\n\tif (len < sLen) {\n\t\treturn 0;\n\t}\n\tif ((interpreterProxy->fetchClassOf(anInteger)) == (interpreterProxy->classLargePositiveInteger())) {\n\n\t\t/* SmallInteger maxVal */\n\t\t/* all bytes of maxVal but the highest one are just FF's */\n\n\t\tmaxVal = 1073741823;\n\t\treturn (((pointer1 = interpreterProxy->firstIndexableField(anInteger)))[sLen - 1]) > (cDigitOfCSIat(maxVal, sLen));\n\t}\n\telse {\n\n\t\t/* SmallInteger minVal */\n\t\t/* all bytes of minVal but the highest one are just 00's */\n\n\t\tminVal = -1073741824;\n\t\tif ((((pointer2 = interpreterProxy->firstIndexableField(anInteger)))[sLen - 1]) < (cDigitOfCSIat(minVal, sLen))) {\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\tfor (ix = 1; ix <= sLen; ix += 1) {\n\t\t\t\tif (!((((pointer3 = interpreterProxy->firstIndexableField(anInteger)))[ix - 1]) == (cDigitOfCSIat(minVal, ix)))) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn 0;\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\nstatic sqInt\nnegative(sqInt aLarge)\n{\n\treturn (interpreterProxy->fetchClassOf(aLarge)) == (interpreterProxy->classLargeNegativeInteger());\n}\n\n\n/*\tCheck for leading zeroes and return shortened copy if so. */\n/*\tFirst establish len = significant length. */\n\nstatic sqInt\nnormalizeNegative(sqInt aLargeNegativeInteger)\n{\n\tsqInt i;\n\tsqInt len;\n\tsqInt minVal;\n\tsqInt oldLen;\n\tunsigned char *pointer;\n\tunsigned char *pointer1;\n\tsqInt sLen;\n\tsqInt val;\n\n\tlen = oldLen = digitLength(aLargeNegativeInteger);\n\twhile ((len != 0)\n && ((((pointer = interpreterProxy->firstIndexableField(aLargeNegativeInteger)))[len - 1]) == 0)) {\n\t\tlen -= 1;\n\t}\n\tif (len == 0) {\n\t\treturn interpreterProxy->integerObjectOf(0);\n\t}\n\n\t/* SmallInteger minVal digitLength */\n\n\tsLen = 4;\n\tif (len <= sLen) {\n\n\t\t/* SmallInteger minVal */\n\n\t\tminVal = -1073741824;\n\t\tif ((len < sLen)\n\t\t || ((digitOfBytesat(aLargeNegativeInteger, sLen)) < (cDigitOfCSIat(minVal, sLen)))) {\n\n\t\t\t/* If high digit less, then can be small */\n\n\t\t\tval = 0;\n\t\t\tfor (i = len; i >= 1; i += -1) {\n\t\t\t\tval = (val * 256) - (((pointer1 = interpreterProxy->firstIndexableField(aLargeNegativeInteger)))[i - 1]);\n\t\t\t}\n\t\t\treturn interpreterProxy->integerObjectOf(val);\n\t\t}\n\t\tfor (i = 1; i <= sLen; i += 1) {\n\t\t\tif (!((digitOfBytesat(aLargeNegativeInteger, i)) == (cDigitOfCSIat(minVal, i)))) {\n\t\t\t\tif (len < oldLen) {\n\t\t\t\t\treturn bytesgrowTo(aLargeNegativeInteger, len);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn aLargeNegativeInteger;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn interpreterProxy->integerObjectOf(minVal);\n\t}\n\tif (len < oldLen) {\n\t\treturn bytesgrowTo(aLargeNegativeInteger, len);\n\t}\n\telse {\n\t\treturn aLargeNegativeInteger;\n\t}\n}\n\n\n/*\tCheck for leading zeroes and return shortened copy if so. */\n/*\tFirst establish len = significant length. */\n\nstatic sqInt\nnormalizePositive(sqInt aLargePositiveInteger)\n{\n\tsqInt i;\n\tsqInt len;\n\tsqInt oldLen;\n\tunsigned char *pointer;\n\tunsigned char *pointer1;\n\tsqInt sLen;\n\tsqInt val;\n\n\tlen = oldLen = digitLength(aLargePositiveInteger);\n\twhile ((len != 0)\n && ((((pointer = interpreterProxy->firstIndexableField(aLargePositiveInteger)))[len - 1]) == 0)) {\n\t\tlen -= 1;\n\t}\n\tif (len == 0) {\n\t\treturn interpreterProxy->integerObjectOf(0);\n\t}\n\n\t/* SmallInteger maxVal digitLength. */\n\n\tsLen = 4;\n\tif ((len <= sLen)\n\t && ((digitOfBytesat(aLargePositiveInteger, sLen)) <= (cDigitOfCSIat(1073741823, sLen)))) {\n\n\t\t/* If so, return its SmallInt value */\n\n\t\tval = 0;\n\t\tfor (i = len; i >= 1; i += -1) {\n\t\t\tval = (val * 256) + (((pointer1 = interpreterProxy->firstIndexableField(aLargePositiveInteger)))[i - 1]);\n\t\t}\n\t\treturn interpreterProxy->integerObjectOf(val);\n\t}\n\tif (len < oldLen) {\n\t\treturn bytesgrowTo(aLargePositiveInteger, len);\n\t}\n\telse {\n\t\treturn aLargePositiveInteger;\n\t}\n}\n\n\n/*\tCheck for leading zeroes and return shortened copy if so. */\n\nstatic sqInt\nnormalize(sqInt aLargeInteger)\n{\n\t/* missing DebugCode */;\n\tif ((interpreterProxy->fetchClassOf(aLargeInteger)) == (interpreterProxy->classLargePositiveInteger())) {\n\t\treturn normalizePositive(aLargeInteger);\n\t}\n\telse {\n\t\treturn normalizeNegative(aLargeInteger);\n\t}\n}\n\nEXPORT(sqInt)\nprimAnyBitFromTo(void)\n{\n\tsqInt from;\n\tsqInt integer;\n\tsqInt large;\n\tsqInt to;\n\tsqInt _return_value;\n\n\tfrom = interpreterProxy->stackIntegerValue(1);\n\tto = interpreterProxy->stackIntegerValue(0);\n\t/* missing DebugCode */;\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(2), \"Integer\"));\n\tinteger = interpreterProxy->stackValue(2);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif ((integer & 1)) {\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\tlarge = createLargeFromSmallInteger(integer);\n\t}\n\telse {\n\t\tlarge = integer;\n\t}\n\t_return_value = ((anyBitOfBytesfromto(large, from, to))? interpreterProxy->trueObject(): interpreterProxy->falseObject());\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(3, _return_value);\n\treturn null;\n}\n\n\n/*\tConverts a SmallInteger into a - non normalized! - LargeInteger; \n\taLargeInteger will be returned unchanged. */\n/*\tDo not check for forced fail, because we need this conversion to test the \n\tplugin in ST during forced fail, too. */\n\nEXPORT(sqInt)\nprimAsLargeInteger(void)\n{\n\tsqInt anInteger;\n\tsqInt _return_value;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"Integer\"));\n\tanInteger = interpreterProxy->stackValue(0);\n\t/* missing DebugCode */;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif ((anInteger & 1)) {\n\t\t_return_value = createLargeFromSmallInteger(anInteger);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(2, _return_value);\n\t\treturn null;\n\t}\n\telse {\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(2, anInteger);\n\t\treturn null;\n\t}\n}\n\n\n/*\tIf calling this primitive fails, then C module does not exist. Do not\n\tcheck for forced fail, because we want to know if module exists during\n\tforced fail, too.\n */\n\nEXPORT(sqInt)\nprimCheckIfCModuleExists(void)\n{\n\tsqInt _return_value;\n\n\t_return_value = (1? interpreterProxy->trueObject(): interpreterProxy->falseObject());\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimDigitAdd(void)\n{\n\tsqInt firstInteger;\n\tsqInt firstLarge;\n\tsqInt secondInteger;\n\tsqInt secondLarge;\n\tsqInt _return_value;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"Integer\"));\n\tsecondInteger = interpreterProxy->stackValue(0);\n\t/* missing DebugCode */;\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"Integer\"));\n\tfirstInteger = interpreterProxy->stackValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif ((firstInteger & 1)) {\n\t\tinterpreterProxy->pushRemappableOop(secondInteger);\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\tfirstLarge = createLargeFromSmallInteger(firstInteger);\n\t\tsecondInteger = interpreterProxy->popRemappableOop();\n\t}\n\telse {\n\t\tfirstLarge = firstInteger;\n\t}\n\tif ((secondInteger & 1)) {\n\t\tinterpreterProxy->pushRemappableOop(firstLarge);\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\tsecondLarge = createLargeFromSmallInteger(secondInteger);\n\t\tfirstLarge = interpreterProxy->popRemappableOop();\n\t}\n\telse {\n\t\tsecondLarge = secondInteger;\n\t}\n\t_return_value = digitAddLargewith(firstLarge, secondLarge);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimDigitAddWith(void)\n{\n\tsqInt firstInteger;\n\tsqInt firstLarge;\n\tsqInt secondInteger;\n\tsqInt secondLarge;\n\tsqInt _return_value;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"Integer\"));\n\tfirstInteger = interpreterProxy->stackValue(1);\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"Integer\"));\n\tsecondInteger = interpreterProxy->stackValue(0);\n\t/* missing DebugCode */;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif ((firstInteger & 1)) {\n\t\tinterpreterProxy->pushRemappableOop(secondInteger);\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\tfirstLarge = createLargeFromSmallInteger(firstInteger);\n\t\tsecondInteger = interpreterProxy->popRemappableOop();\n\t}\n\telse {\n\t\tfirstLarge = firstInteger;\n\t}\n\tif ((secondInteger & 1)) {\n\t\tinterpreterProxy->pushRemappableOop(firstLarge);\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\tsecondLarge = createLargeFromSmallInteger(secondInteger);\n\t\tfirstLarge = interpreterProxy->popRemappableOop();\n\t}\n\telse {\n\t\tsecondLarge = secondInteger;\n\t}\n\t_return_value = digitAddLargewith(firstLarge, secondLarge);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(3, _return_value);\n\treturn null;\n}\n\n\n/*\tBit logic here is only implemented for positive integers or Zero; if rec \n\tor arg is negative, it fails. */\n\nEXPORT(sqInt)\nprimDigitBitAnd(void)\n{\n\tsqInt firstInteger;\n\tsqInt secondInteger;\n\tsqInt _return_value;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"Integer\"));\n\tsecondInteger = interpreterProxy->stackValue(0);\n\t/* missing DebugCode */;\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"Integer\"));\n\tfirstInteger = interpreterProxy->stackValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t_return_value = digitBitLogicwithopIndex(firstInteger, secondInteger, andOpIndex);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\n\n/*\tBit logic here is only implemented for positive integers or Zero; if any\n\targ is negative, it fails.\n */\n\nEXPORT(sqInt)\nprimDigitBitLogicWithOp(void)\n{\n\tsqInt firstInteger;\n\tsqInt opIndex;\n\tsqInt secondInteger;\n\tsqInt _return_value;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(2), \"Integer\"));\n\tfirstInteger = interpreterProxy->stackValue(2);\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"Integer\"));\n\tsecondInteger = interpreterProxy->stackValue(1);\n\topIndex = interpreterProxy->stackIntegerValue(0);\n\t/* missing DebugCode */;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t_return_value = digitBitLogicwithopIndex(firstInteger, secondInteger, opIndex);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(4, _return_value);\n\treturn null;\n}\n\n\n/*\tBit logic here is only implemented for positive integers or Zero; if rec \n\tor arg is negative, it fails. */\n\nEXPORT(sqInt)\nprimDigitBitOr(void)\n{\n\tsqInt firstInteger;\n\tsqInt secondInteger;\n\tsqInt _return_value;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"Integer\"));\n\tsecondInteger = interpreterProxy->stackValue(0);\n\t/* missing DebugCode */;\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"Integer\"));\n\tfirstInteger = interpreterProxy->stackValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t_return_value = digitBitLogicwithopIndex(firstInteger, secondInteger, orOpIndex);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimDigitBitShift(void)\n{\n\tsqInt aLarge;\n\tsqInt aLargeInteger;\n\tsqInt anInteger;\n\tsqInt rShift;\n\tsqInt shiftCount;\n\tsqInt _return_value;\n\n\tshiftCount = interpreterProxy->stackIntegerValue(0);\n\t/* missing DebugCode */;\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"Integer\"));\n\tanInteger = interpreterProxy->stackValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif ((anInteger & 1)) {\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\taLarge = createLargeFromSmallInteger(anInteger);\n\t}\n\telse {\n\t\taLarge = anInteger;\n\t}\n\tif (shiftCount >= 0) {\n\t\t_return_value = bytesLshift(aLarge, shiftCount);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(2, _return_value);\n\t\treturn null;\n\t}\n\telse {\n\t\trShift = 0 - shiftCount;\n\t\t/* begin normalize: */\n\t\taLargeInteger = bytesRshiftbyteslookfirst(aLarge, rShift & 7, ((usqInt) rShift >> 3), interpreterProxy->slotSizeOf(aLarge));\n\t\t/* missing DebugCode */;\n\t\tif ((interpreterProxy->fetchClassOf(aLargeInteger)) == (interpreterProxy->classLargePositiveInteger())) {\n\t\t\t_return_value = normalizePositive(aLargeInteger);\n\t\t\tgoto l1;\n\t\t}\n\t\telse {\n\t\t\t_return_value = normalizeNegative(aLargeInteger);\n\t\t\tgoto l1;\n\t\t}\n\tl1:\t/* end normalize: */;\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(2, _return_value);\n\t\treturn null;\n\t}\n}\n\nEXPORT(sqInt)\nprimDigitBitShiftMagnitude(void)\n{\n\tsqInt aLarge;\n\tsqInt aLargeInteger;\n\tsqInt anInteger;\n\tsqInt rShift;\n\tsqInt shiftCount;\n\tsqInt _return_value;\n\n\tshiftCount = interpreterProxy->stackIntegerValue(0);\n\t/* missing DebugCode */;\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"Integer\"));\n\tanInteger = interpreterProxy->stackValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif ((anInteger & 1)) {\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\taLarge = createLargeFromSmallInteger(anInteger);\n\t}\n\telse {\n\t\taLarge = anInteger;\n\t}\n\tif (shiftCount >= 0) {\n\t\t_return_value = bytesLshift(aLarge, shiftCount);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(2, _return_value);\n\t\treturn null;\n\t}\n\telse {\n\t\trShift = 0 - shiftCount;\n\t\t/* begin normalize: */\n\t\taLargeInteger = bytesRshiftbyteslookfirst(aLarge, rShift & 7, ((usqInt) rShift >> 3), interpreterProxy->slotSizeOf(aLarge));\n\t\t/* missing DebugCode */;\n\t\tif ((interpreterProxy->fetchClassOf(aLargeInteger)) == (interpreterProxy->classLargePositiveInteger())) {\n\t\t\t_return_value = normalizePositive(aLargeInteger);\n\t\t\tgoto l1;\n\t\t}\n\t\telse {\n\t\t\t_return_value = normalizeNegative(aLargeInteger);\n\t\t\tgoto l1;\n\t\t}\n\tl1:\t/* end normalize: */;\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(2, _return_value);\n\t\treturn null;\n\t}\n}\n\n\n/*\tBit logic here is only implemented for positive integers or Zero; if rec \n\tor arg is negative, it fails. */\n\nEXPORT(sqInt)\nprimDigitBitXor(void)\n{\n\tsqInt firstInteger;\n\tsqInt secondInteger;\n\tsqInt _return_value;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"Integer\"));\n\tsecondInteger = interpreterProxy->stackValue(0);\n\t/* missing DebugCode */;\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"Integer\"));\n\tfirstInteger = interpreterProxy->stackValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t_return_value = digitBitLogicwithopIndex(firstInteger, secondInteger, xorOpIndex);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimDigitCompare(void)\n{\n\tsqInt firstInteger;\n\tsqInt firstVal;\n\tsqInt secondInteger;\n\tsqInt secondVal;\n\tsqInt _return_value;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"Integer\"));\n\tsecondInteger = interpreterProxy->stackValue(0);\n\t/* missing DebugCode */;\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"Integer\"));\n\tfirstInteger = interpreterProxy->stackValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif ((firstInteger & 1)) {\n\t\tif ((secondInteger & 1)) {\n\t\t\tif (((firstVal = (firstInteger >> 1))) > ((secondVal = (secondInteger >> 1)))) {\n\t\t\t\t_return_value = interpreterProxy->integerObjectOf(1);\n\t\t\t\tif (interpreterProxy->failed()) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\tinterpreterProxy->popthenPush(2, _return_value);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (firstVal < secondVal) {\n\t\t\t\t\t_return_value = interpreterProxy->integerObjectOf(-1);\n\t\t\t\t\tif (interpreterProxy->failed()) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tinterpreterProxy->popthenPush(2, _return_value);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t_return_value = interpreterProxy->integerObjectOf(0);\n\t\t\t\t\tif (interpreterProxy->failed()) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tinterpreterProxy->popthenPush(2, _return_value);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t_return_value = interpreterProxy->integerObjectOf(-1);\n\t\t\tif (interpreterProxy->failed()) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tinterpreterProxy->popthenPush(2, _return_value);\n\t\t\treturn null;\n\t\t}\n\t}\n\telse {\n\t\tif ((secondInteger & 1)) {\n\t\t\t_return_value = interpreterProxy->integerObjectOf(1);\n\t\t\tif (interpreterProxy->failed()) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tinterpreterProxy->popthenPush(2, _return_value);\n\t\t\treturn null;\n\t\t}\n\t\telse {\n\t\t\t_return_value = digitCompareLargewith(firstInteger, secondInteger);\n\t\t\tif (interpreterProxy->failed()) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tinterpreterProxy->popthenPush(2, _return_value);\n\t\t\treturn null;\n\t\t}\n\t}\n}\n\nEXPORT(sqInt)\nprimDigitCompareWith(void)\n{\n\tsqInt firstInteger;\n\tsqInt firstVal;\n\tsqInt secondInteger;\n\tsqInt secondVal;\n\tsqInt _return_value;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"Integer\"));\n\tfirstInteger = interpreterProxy->stackValue(1);\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"Integer\"));\n\tsecondInteger = interpreterProxy->stackValue(0);\n\t/* missing DebugCode */;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif ((firstInteger & 1)) {\n\t\tif ((secondInteger & 1)) {\n\t\t\tif (((firstVal = (firstInteger >> 1))) > ((secondVal = (secondInteger >> 1)))) {\n\t\t\t\t_return_value = interpreterProxy->integerObjectOf(1);\n\t\t\t\tif (interpreterProxy->failed()) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\tinterpreterProxy->popthenPush(3, _return_value);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (firstVal < secondVal) {\n\t\t\t\t\t_return_value = interpreterProxy->integerObjectOf(-1);\n\t\t\t\t\tif (interpreterProxy->failed()) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tinterpreterProxy->popthenPush(3, _return_value);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t_return_value = interpreterProxy->integerObjectOf(0);\n\t\t\t\t\tif (interpreterProxy->failed()) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tinterpreterProxy->popthenPush(3, _return_value);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t_return_value = interpreterProxy->integerObjectOf(-1);\n\t\t\tif (interpreterProxy->failed()) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tinterpreterProxy->popthenPush(3, _return_value);\n\t\t\treturn null;\n\t\t}\n\t}\n\telse {\n\t\tif ((secondInteger & 1)) {\n\t\t\t_return_value = interpreterProxy->integerObjectOf(1);\n\t\t\tif (interpreterProxy->failed()) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tinterpreterProxy->popthenPush(3, _return_value);\n\t\t\treturn null;\n\t\t}\n\t\telse {\n\t\t\t_return_value = digitCompareLargewith(firstInteger, secondInteger);\n\t\t\tif (interpreterProxy->failed()) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tinterpreterProxy->popthenPush(3, _return_value);\n\t\t\treturn null;\n\t\t}\n\t}\n}\n\n\n/*\tAnswer the result of dividing firstInteger by secondInteger. \n\tFail if parameters are not integers, not normalized or secondInteger is \n\tzero. */\n\nEXPORT(sqInt)\nprimDigitDivNegative(void)\n{\n\tsqInt firstAsLargeInteger;\n\tsqInt firstInteger;\n\tsqInt neg;\n\tsqInt secondAsLargeInteger;\n\tsqInt secondInteger;\n\tsqInt _return_value;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"Integer\"));\n\tsecondInteger = interpreterProxy->stackValue(1);\n\tneg = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(0));\n\t/* missing DebugCode */;\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(2), \"Integer\"));\n\tfirstInteger = interpreterProxy->stackValue(2);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!(isNormalized(firstInteger))) {\n\t\t/* missing DebugCode */;\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\tif (!(isNormalized(secondInteger))) {\n\t\t/* missing DebugCode */;\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\tif ((firstInteger & 1)) {\n\t\tinterpreterProxy->pushRemappableOop(secondInteger);\n\n\t\t/* convert to LargeInteger */\n\n\t\tfirstAsLargeInteger = createLargeFromSmallInteger(firstInteger);\n\t\tsecondInteger = interpreterProxy->popRemappableOop();\n\t}\n\telse {\n\t\tfirstAsLargeInteger = firstInteger;\n\t}\n\tif ((secondInteger & 1)) {\n\t\tif (((secondInteger >> 1)) == 0) {\n\t\t\tinterpreterProxy->primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->pushRemappableOop(firstAsLargeInteger);\n\t\tsecondAsLargeInteger = createLargeFromSmallInteger(secondInteger);\n\t\tfirstAsLargeInteger = interpreterProxy->popRemappableOop();\n\t}\n\telse {\n\t\tsecondAsLargeInteger = secondInteger;\n\t}\n\t_return_value = digitDivLargewithnegative(firstAsLargeInteger, secondAsLargeInteger, neg);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(3, _return_value);\n\treturn null;\n}\n\n\n/*\tAnswer the result of dividing firstInteger by secondInteger.\n\tFail if parameters are not integers or secondInteger is zero. */\n\nEXPORT(sqInt)\nprimDigitDivWithNegative(void)\n{\n\tsqInt firstAsLargeInteger;\n\tsqInt firstInteger;\n\tsqInt neg;\n\tsqInt secondAsLargeInteger;\n\tsqInt secondInteger;\n\tsqInt _return_value;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(2), \"Integer\"));\n\tfirstInteger = interpreterProxy->stackValue(2);\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"Integer\"));\n\tsecondInteger = interpreterProxy->stackValue(1);\n\tneg = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(0));\n\t/* missing DebugCode */;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif ((firstInteger & 1)) {\n\t\tinterpreterProxy->pushRemappableOop(secondInteger);\n\n\t\t/* convert to LargeInteger */\n\n\t\tfirstAsLargeInteger = createLargeFromSmallInteger(firstInteger);\n\t\tsecondInteger = interpreterProxy->popRemappableOop();\n\t}\n\telse {\n\t\tfirstAsLargeInteger = firstInteger;\n\t}\n\tif ((secondInteger & 1)) {\n\t\tif (((secondInteger >> 1)) == 0) {\n\t\t\tinterpreterProxy->primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->pushRemappableOop(firstAsLargeInteger);\n\t\tsecondAsLargeInteger = createLargeFromSmallInteger(secondInteger);\n\t\tfirstAsLargeInteger = interpreterProxy->popRemappableOop();\n\t}\n\telse {\n\t\tsecondAsLargeInteger = secondInteger;\n\t}\n\t_return_value = digitDivLargewithnegative(firstAsLargeInteger, secondAsLargeInteger, neg);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(4, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimDigitMultiplyNegative(void)\n{\n\tsqInt firstInteger;\n\tsqInt firstLarge;\n\tsqInt neg;\n\tsqInt secondInteger;\n\tsqInt secondLarge;\n\tsqInt _return_value;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"Integer\"));\n\tsecondInteger = interpreterProxy->stackValue(1);\n\tneg = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(0));\n\t/* missing DebugCode */;\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(2), \"Integer\"));\n\tfirstInteger = interpreterProxy->stackValue(2);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif ((firstInteger & 1)) {\n\t\tinterpreterProxy->pushRemappableOop(secondInteger);\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\tfirstLarge = createLargeFromSmallInteger(firstInteger);\n\t\tsecondInteger = interpreterProxy->popRemappableOop();\n\t}\n\telse {\n\t\tfirstLarge = firstInteger;\n\t}\n\tif ((secondInteger & 1)) {\n\t\tinterpreterProxy->pushRemappableOop(firstLarge);\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\tsecondLarge = createLargeFromSmallInteger(secondInteger);\n\t\tfirstLarge = interpreterProxy->popRemappableOop();\n\t}\n\telse {\n\t\tsecondLarge = secondInteger;\n\t}\n\t_return_value = digitMultiplyLargewithnegative(firstLarge, secondLarge, neg);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(3, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimDigitMultiplyWithNegative(void)\n{\n\tsqInt firstInteger;\n\tsqInt firstLarge;\n\tsqInt neg;\n\tsqInt secondInteger;\n\tsqInt secondLarge;\n\tsqInt _return_value;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(2), \"Integer\"));\n\tfirstInteger = interpreterProxy->stackValue(2);\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"Integer\"));\n\tsecondInteger = interpreterProxy->stackValue(1);\n\tneg = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(0));\n\t/* missing DebugCode */;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif ((firstInteger & 1)) {\n\t\tinterpreterProxy->pushRemappableOop(secondInteger);\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\tfirstLarge = createLargeFromSmallInteger(firstInteger);\n\t\tsecondInteger = interpreterProxy->popRemappableOop();\n\t}\n\telse {\n\t\tfirstLarge = firstInteger;\n\t}\n\tif ((secondInteger & 1)) {\n\t\tinterpreterProxy->pushRemappableOop(firstLarge);\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\tsecondLarge = createLargeFromSmallInteger(secondInteger);\n\t\tfirstLarge = interpreterProxy->popRemappableOop();\n\t}\n\telse {\n\t\tsecondLarge = secondInteger;\n\t}\n\t_return_value = digitMultiplyLargewithnegative(firstLarge, secondLarge, neg);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(4, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimDigitSubtract(void)\n{\n\tsqInt firstInteger;\n\tsqInt firstLarge;\n\tsqInt secondInteger;\n\tsqInt secondLarge;\n\tsqInt _return_value;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"Integer\"));\n\tsecondInteger = interpreterProxy->stackValue(0);\n\t/* missing DebugCode */;\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"Integer\"));\n\tfirstInteger = interpreterProxy->stackValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif ((firstInteger & 1)) {\n\t\tinterpreterProxy->pushRemappableOop(secondInteger);\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\tfirstLarge = createLargeFromSmallInteger(firstInteger);\n\t\tsecondInteger = interpreterProxy->popRemappableOop();\n\t}\n\telse {\n\t\tfirstLarge = firstInteger;\n\t}\n\tif ((secondInteger & 1)) {\n\t\tinterpreterProxy->pushRemappableOop(firstLarge);\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\tsecondLarge = createLargeFromSmallInteger(secondInteger);\n\t\tfirstLarge = interpreterProxy->popRemappableOop();\n\t}\n\telse {\n\t\tsecondLarge = secondInteger;\n\t}\n\t_return_value = digitSubLargewith(firstLarge, secondLarge);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimDigitSubtractWith(void)\n{\n\tsqInt firstInteger;\n\tsqInt firstLarge;\n\tsqInt secondInteger;\n\tsqInt secondLarge;\n\tsqInt _return_value;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"Integer\"));\n\tfirstInteger = interpreterProxy->stackValue(1);\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"Integer\"));\n\tsecondInteger = interpreterProxy->stackValue(0);\n\t/* missing DebugCode */;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif ((firstInteger & 1)) {\n\t\tinterpreterProxy->pushRemappableOop(secondInteger);\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\tfirstLarge = createLargeFromSmallInteger(firstInteger);\n\t\tsecondInteger = interpreterProxy->popRemappableOop();\n\t}\n\telse {\n\t\tfirstLarge = firstInteger;\n\t}\n\tif ((secondInteger & 1)) {\n\t\tinterpreterProxy->pushRemappableOop(firstLarge);\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\tsecondLarge = createLargeFromSmallInteger(secondInteger);\n\t\tfirstLarge = interpreterProxy->popRemappableOop();\n\t}\n\telse {\n\t\tsecondLarge = secondInteger;\n\t}\n\t_return_value = digitSubLargewith(firstLarge, secondLarge);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(3, _return_value);\n\treturn null;\n}\n\n\n/*\tIf calling this primitive fails, then C module does not exist. */\n\nEXPORT(sqInt)\nprimGetModuleName(void)\n{\n\tsqInt i;\n\tsqInt strLen;\n\tsqInt strOop;\n\tchar *strPtr;\n\n\t/* missing DebugCode */;\n\tstrLen = strlen(getModuleName());\n\tstrOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), strLen);\n\tstrPtr = interpreterProxy->firstIndexableField(strOop);\n\tfor (i = 0; i <= (strLen - 1); i += 1) {\n\t\tstrPtr[i] = ((getModuleName())[i]);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, strOop);\n\treturn null;\n}\n\n\n/*\tParameter specification #(Integer) doesn't convert! */\n\nEXPORT(sqInt)\nprimNormalize(void)\n{\n\tsqInt anInteger;\n\tsqInt _return_value;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"Integer\"));\n\tanInteger = interpreterProxy->stackValue(0);\n\t/* missing DebugCode */;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif ((anInteger & 1)) {\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(2, anInteger);\n\t\treturn null;\n\t}\n\t/* begin normalize: */\n\t/* missing DebugCode */;\n\tif ((interpreterProxy->fetchClassOf(anInteger)) == (interpreterProxy->classLargePositiveInteger())) {\n\t\t_return_value = normalizePositive(anInteger);\n\t\tgoto l1;\n\t}\n\telse {\n\t\t_return_value = normalizeNegative(anInteger);\n\t\tgoto l1;\n\t}\nl1:\t/* end normalize: */;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimNormalizeNegative(void)\n{\n\tsqInt rcvr;\n\tsqInt _return_value;\n\n\t/* missing DebugCode */;\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"LargeNegativeInteger\"));\n\trcvr = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t_return_value = normalizeNegative(rcvr);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimNormalizePositive(void)\n{\n\tsqInt rcvr;\n\tsqInt _return_value;\n\n\t/* missing DebugCode */;\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"LargePositiveInteger\"));\n\trcvr = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t_return_value = normalizePositive(rcvr);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n\tsqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\nstatic void\nsqAssert(sqInt aBool)\n{\n\t/* missing DebugCode */;\n}\n\n\n/*\tFlag for marking methods for later thinking. */\n\nstatic sqInt\nthink(void)\n{\n\t/* missing DebugCode */;\n\treturn null;\n}\n\n\n/*\tArgument bytesOop must not be aSmallInteger! */\n\nstatic sqInt\nunsafeByteOfat(sqInt bytesOop, sqInt ix)\n{\n\tunsigned char *pointer;\n\n\treturn ((pointer = interpreterProxy->firstIndexableField(bytesOop)))[ix - 1];\n}\n\nEXPORT(sqInt)\n_primDigitBitShift(void)\n{\n\tsqInt aLarge;\n\tsqInt aLargeInteger;\n\tsqInt anInteger;\n\tsqInt rShift;\n\tsqInt shiftCount;\n\tsqInt _return_value;\n\n\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"Integer\"));\n\tanInteger = interpreterProxy->stackValue(1);\n\tshiftCount = interpreterProxy->stackIntegerValue(0);\n\t/* missing DebugCode */;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif ((anInteger & 1)) {\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\taLarge = createLargeFromSmallInteger(anInteger);\n\t}\n\telse {\n\t\taLarge = anInteger;\n\t}\n\tif (shiftCount >= 0) {\n\t\t_return_value = bytesLshift(aLarge, shiftCount);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, _return_value);\n\t\treturn null;\n\t}\n\telse {\n\t\trShift = 0 - shiftCount;\n\t\t/* begin normalize: */\n\t\taLargeInteger = bytesRshiftbyteslookfirst(aLarge, rShift & 7, ((usqInt) rShift >> 3), interpreterProxy->slotSizeOf(aLarge));\n\t\t/* missing DebugCode */;\n\t\tif ((interpreterProxy->fetchClassOf(aLargeInteger)) == (interpreterProxy->classLargePositiveInteger())) {\n\t\t\t_return_value = normalizePositive(aLargeInteger);\n\t\t\tgoto l1;\n\t\t}\n\t\telse {\n\t\t\t_return_value = normalizeNegative(aLargeInteger);\n\t\t\tgoto l1;\n\t\t}\n\tl1:\t/* end normalize: */;\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, _return_value);\n\t\treturn null;\n\t}\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* LargeIntegers_exports[][3] = {\n\t{\"LargeIntegers\", \"getModuleName\", (void*)getModuleName},\n\t{\"LargeIntegers\", \"primAnyBitFromTo\", (void*)primAnyBitFromTo},\n\t{\"LargeIntegers\", \"primAsLargeInteger\", (void*)primAsLargeInteger},\n\t{\"LargeIntegers\", \"primCheckIfCModuleExists\", (void*)primCheckIfCModuleExists},\n\t{\"LargeIntegers\", \"primDigitAdd\", (void*)primDigitAdd},\n\t{\"LargeIntegers\", \"primDigitAddWith\", (void*)primDigitAddWith},\n\t{\"LargeIntegers\", \"primDigitBitAnd\", (void*)primDigitBitAnd},\n\t{\"LargeIntegers\", \"primDigitBitLogicWithOp\", (void*)primDigitBitLogicWithOp},\n\t{\"LargeIntegers\", \"primDigitBitOr\", (void*)primDigitBitOr},\n\t{\"LargeIntegers\", \"primDigitBitShift\", (void*)primDigitBitShift},\n\t{\"LargeIntegers\", \"primDigitBitShiftMagnitude\", (void*)primDigitBitShiftMagnitude},\n\t{\"LargeIntegers\", \"primDigitBitXor\", (void*)primDigitBitXor},\n\t{\"LargeIntegers\", \"primDigitCompare\", (void*)primDigitCompare},\n\t{\"LargeIntegers\", \"primDigitCompareWith\", (void*)primDigitCompareWith},\n\t{\"LargeIntegers\", \"primDigitDivNegative\", (void*)primDigitDivNegative},\n\t{\"LargeIntegers\", \"primDigitDivWithNegative\", (void*)primDigitDivWithNegative},\n\t{\"LargeIntegers\", \"primDigitMultiplyNegative\", (void*)primDigitMultiplyNegative},\n\t{\"LargeIntegers\", \"primDigitMultiplyWithNegative\", (void*)primDigitMultiplyWithNegative},\n\t{\"LargeIntegers\", \"primDigitSubtract\", (void*)primDigitSubtract},\n\t{\"LargeIntegers\", \"primDigitSubtractWith\", (void*)primDigitSubtractWith},\n\t{\"LargeIntegers\", \"primGetModuleName\", (void*)primGetModuleName},\n\t{\"LargeIntegers\", \"primNormalize\", (void*)primNormalize},\n\t{\"LargeIntegers\", \"primNormalizeNegative\", (void*)primNormalizeNegative},\n\t{\"LargeIntegers\", \"primNormalizePositive\", (void*)primNormalizePositive},\n\t{\"LargeIntegers\", \"setInterpreter\", (void*)setInterpreter},\n\t{\"LargeIntegers\", \"_primDigitBitShift\", (void*)_primDigitBitShift},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/LocalePlugin/LocalePlugin.c",
    "content": "/* Automatically generated by\n\tSmartSyntaxPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tLocalePlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"LocalePlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"LocalePlugin.h\"\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n\n/*** Function Prototypes ***/\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nEXPORT(sqInt) initialiseModule(void);\nstatic sqInt msg(char *s);\nEXPORT(sqInt) primitiveCountry(void);\nEXPORT(sqInt) primitiveCurrencyNotation(void);\nEXPORT(sqInt) primitiveCurrencySymbol(void);\nEXPORT(sqInt) primitiveDaylightSavings(void);\nEXPORT(sqInt) primitiveDecimalSymbol(void);\nEXPORT(sqInt) primitiveDigitGroupingSymbol(void);\nEXPORT(sqInt) primitiveLanguage(void);\nEXPORT(sqInt) primitiveLongDateFormat(void);\nEXPORT(sqInt) primitiveMeasurementMetric(void);\nEXPORT(sqInt) primitiveShortDateFormat(void);\nEXPORT(sqInt) primitiveTimeFormat(void);\nEXPORT(sqInt) primitiveTimezoneOffset(void);\nEXPORT(sqInt) primitiveVMOffsetToUTC(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\nstatic void sqAssert(sqInt aBool);\n\n\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"LocalePlugin VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"LocalePlugin VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\n\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nEXPORT(sqInt)\ninitialiseModule(void)\n{\n\treturn sqLocInitialize();\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\n\n/*\treturn a 3 char string describing the country in use. ISO 3166 is the\n\trelevant source here; see http://www.unicode.org/onlinedat/countries.html\n\tfor details. Using the 3 character Alpha-3 codes\n */\n\nEXPORT(sqInt)\nprimitiveCountry(void)\n{\n\tsqInt oop;\n\n\toop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), 3);\n\tsqLocGetCountryInto(interpreterProxy->firstIndexableField(oop));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, oop);\n\treturn null;\n}\n\n\n/*\treturn a boolean specifying whether the currency symbol is pre or post\n\tfix. true -> pre\n */\n\nEXPORT(sqInt)\nprimitiveCurrencyNotation(void)\n{\n\tsqInt _return_value;\n\n\t_return_value = ((sqLocCurrencyNotation())? interpreterProxy->trueObject(): interpreterProxy->falseObject());\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\n\n/*\treturn a string describing the currency symbol used \n\tStill need to find details on standard symbols - ISO 4217 is supposed to\n\tbe it but cannot find on web\n */\n\nEXPORT(sqInt)\nprimitiveCurrencySymbol(void)\n{\n\tsqInt length;\n\tsqInt oop;\n\n\tlength = sqLocCurrencySymbolSize();\n\toop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), length);\n\tsqLocGetCurrencySymbolInto(interpreterProxy->firstIndexableField(oop));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, oop);\n\treturn null;\n}\n\n\n/*\treturn a boolean specifying the DST setting. true -> active */\n\nEXPORT(sqInt)\nprimitiveDaylightSavings(void)\n{\n\tsqInt _return_value;\n\n\t_return_value = ((sqLocDaylightSavings())? interpreterProxy->trueObject(): interpreterProxy->falseObject());\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\n\n/*\treturn a 1 char string describing the decimal symbol used - usually a . or\n\ta ,\n */\n\nEXPORT(sqInt)\nprimitiveDecimalSymbol(void)\n{\n\tsqInt oop;\n\n\toop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), 1);\n\tsqLocGetDecimalSymbolInto(interpreterProxy->firstIndexableField(oop));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, oop);\n\treturn null;\n}\n\n\n/*\treturn a 1 char string describing the digitGrouping symbol used - usually\n\ta . or a , between triples of digits\n */\n\nEXPORT(sqInt)\nprimitiveDigitGroupingSymbol(void)\n{\n\tsqInt oop;\n\n\toop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), 1);\n\tsqLocGetDigitGroupingSymbolInto(interpreterProxy->firstIndexableField(oop));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, oop);\n\treturn null;\n}\n\n\n/*\treturn a 3 char string describing the language in use. ISO 639 is the\n\trelevant source here; see http://www.w3.org/WAI/ER/IG/ert/iso639.html for\n\tdetails \n */\n\nEXPORT(sqInt)\nprimitiveLanguage(void)\n{\n\tsqInt oop;\n\n\toop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), 3);\n\tsqLocGetLanguageInto(interpreterProxy->firstIndexableField(oop));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, oop);\n\treturn null;\n}\n\n\n/*\treturn a string describing the long date formatting.\n\tFormat is made up of\n\td day, m month, y year,\n\tdouble symbol is null padded, single not padded (m=6, mm=06)\n\tdddd weekday\n\tmmmm month nam\n\t\n */\n\nEXPORT(sqInt)\nprimitiveLongDateFormat(void)\n{\n\tsqInt length;\n\tsqInt oop;\n\n\tlength = sqLocLongDateFormatSize();\n\toop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), length);\n\tsqLocGetLongDateFormatInto(interpreterProxy->firstIndexableField(oop));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, oop);\n\treturn null;\n}\n\n\n/*\treturn a boolean specifying whether the currency symbol is pre or post\n\tfix. true -> pre\n */\n\nEXPORT(sqInt)\nprimitiveMeasurementMetric(void)\n{\n\tsqInt _return_value;\n\n\t_return_value = ((sqLocMeasurementMetric())? interpreterProxy->trueObject(): interpreterProxy->falseObject());\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\n\n/*\treturn a string describing the long date formatting.\n\tFormat is made up of\n\td day, m month, y year,\n\tdouble symbol is null padded, single not padded (m=6, mm=06)\n\tdddd weekday\n\tmmmm month nam\n\t\n */\n\nEXPORT(sqInt)\nprimitiveShortDateFormat(void)\n{\n\tsqInt length;\n\tsqInt oop;\n\n\tlength = sqLocShortDateFormatSize();\n\toop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), length);\n\tsqLocGetShortDateFormatInto(interpreterProxy->firstIndexableField(oop));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, oop);\n\treturn null;\n}\n\n\n/*\treturn a string describing the time formatting.\n\tFormat is made up of\n\th hour (h 12, H 24), m minute, s seconds, x (am/pm String)\n\tdouble symbol is null padded, single not padded (h=6, hh=06)\n */\n\nEXPORT(sqInt)\nprimitiveTimeFormat(void)\n{\n\tsqInt length;\n\tsqInt oop;\n\n\tlength = sqLocTimeFormatSize();\n\toop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), length);\n\tsqLocGetTimeFormatInto(interpreterProxy->firstIndexableField(oop));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, oop);\n\treturn null;\n}\n\n\n/*\treturn the number of minutes this VM's time value is offset from UTC */\n\nEXPORT(sqInt)\nprimitiveTimezoneOffset(void)\n{\n\tsqInt _return_value;\n\n\t_return_value = interpreterProxy->integerObjectOf((sqLocGetTimezoneOffset()));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\n\n/*\treturn the number of minutes this VM's time value is offset from UTC */\n\nEXPORT(sqInt)\nprimitiveVMOffsetToUTC(void)\n{\n\tsqInt _return_value;\n\n\t_return_value = interpreterProxy->integerObjectOf((sqLocGetVMOffsetToUTC()));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n\tsqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\nstatic void\nsqAssert(sqInt aBool)\n{\n\t/* missing DebugCode */;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* LocalePlugin_exports[][3] = {\n\t{\"LocalePlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"LocalePlugin\", \"initialiseModule\", (void*)initialiseModule},\n\t{\"LocalePlugin\", \"primitiveCountry\", (void*)primitiveCountry},\n\t{\"LocalePlugin\", \"primitiveCurrencyNotation\", (void*)primitiveCurrencyNotation},\n\t{\"LocalePlugin\", \"primitiveCurrencySymbol\", (void*)primitiveCurrencySymbol},\n\t{\"LocalePlugin\", \"primitiveDaylightSavings\", (void*)primitiveDaylightSavings},\n\t{\"LocalePlugin\", \"primitiveDecimalSymbol\", (void*)primitiveDecimalSymbol},\n\t{\"LocalePlugin\", \"primitiveDigitGroupingSymbol\", (void*)primitiveDigitGroupingSymbol},\n\t{\"LocalePlugin\", \"primitiveLanguage\", (void*)primitiveLanguage},\n\t{\"LocalePlugin\", \"primitiveLongDateFormat\", (void*)primitiveLongDateFormat},\n\t{\"LocalePlugin\", \"primitiveMeasurementMetric\", (void*)primitiveMeasurementMetric},\n\t{\"LocalePlugin\", \"primitiveShortDateFormat\", (void*)primitiveShortDateFormat},\n\t{\"LocalePlugin\", \"primitiveTimeFormat\", (void*)primitiveTimeFormat},\n\t{\"LocalePlugin\", \"primitiveTimezoneOffset\", (void*)primitiveTimezoneOffset},\n\t{\"LocalePlugin\", \"primitiveVMOffsetToUTC\", (void*)primitiveVMOffsetToUTC},\n\t{\"LocalePlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/MIDIPlugin/MIDIPlugin.c",
    "content": "/* Automatically generated by\n\tSmartSyntaxPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tMIDIPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"MIDIPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"MIDIPlugin.h\"\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n\n/*** Function Prototypes ***/\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nEXPORT(sqInt) initialiseModule(void);\nstatic sqInt msg(char *s);\nEXPORT(sqInt) primitiveMIDIClosePort(void);\nEXPORT(sqInt) primitiveMIDIGetClock(void);\nEXPORT(sqInt) primitiveMIDIGetPortCount(void);\nEXPORT(sqInt) primitiveMIDIGetPortDirectionality(void);\nEXPORT(sqInt) primitiveMIDIGetPortName(void);\nEXPORT(sqInt) primitiveMIDIOpenPort(void);\nEXPORT(sqInt) primitiveMIDIParameterGet(void);\nEXPORT(sqInt) primitiveMIDIParameterGetOrSet(void);\nEXPORT(sqInt) primitiveMIDIParameterSet(void);\nEXPORT(sqInt) primitiveMIDIRead(void);\nEXPORT(sqInt) primitiveMIDIWrite(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\nEXPORT(sqInt) shutdownModule(void);\nstatic void sqAssert(sqInt aBool);\n\n\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"MIDIPlugin VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"MIDIPlugin VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\n\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nEXPORT(sqInt)\ninitialiseModule(void)\n{\n\treturn midiInit();\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\nEXPORT(sqInt)\nprimitiveMIDIClosePort(void)\n{\n\tsqInt portNum;\n\n\tportNum = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tsqMIDIClosePort(portNum);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(1);\n\treturn null;\n}\n\n\n/*\tReturn the value of the MIDI clock as a SmallInteger. The range is limited\n\tto SmallInteger maxVal / 2 to allow scheduling MIDI events into the future\n\twithout overflowing a SmallInteger. The sqMIDIGetClock function is assumed\n\tto wrap at or before 16r20000000.\n */\n\nEXPORT(sqInt)\nprimitiveMIDIGetClock(void)\n{\n\tsqInt clockValue;\n\tsqInt _return_value;\n\n\tclockValue = (sqMIDIGetClock()) & 536870911;\n\t_return_value = interpreterProxy->integerObjectOf(clockValue);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveMIDIGetPortCount(void)\n{\n\tsqInt n;\n\tsqInt _return_value;\n\n\tn = sqMIDIGetPortCount();\n\t_return_value = interpreterProxy->integerObjectOf(n);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveMIDIGetPortDirectionality(void)\n{\n\tsqInt dir;\n\tsqInt portNum;\n\tsqInt _return_value;\n\n\tportNum = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tdir = sqMIDIGetPortDirectionality(portNum);\n\t_return_value = interpreterProxy->integerObjectOf(dir);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveMIDIGetPortName(void)\n{\n\tsqInt nameObj;\n\tchar *  namePtr;\n\tchar portName[256];\n\tsqInt portNum;\n\tsqInt sz;\n\n\tportNum = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tsz = sqMIDIGetPortName(portNum, (int) &portName, 255);\n\tnameObj = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), sz);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tnamePtr = ((char *) interpreterProxy->firstIndexableField(nameObj));\n\tmemcpy(namePtr, portName, sz);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, nameObj);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveMIDIOpenPort(void)\n{\n\tsqInt clockRate;\n\tsqInt portNum;\n\tsqInt semaIndex;\n\n\tportNum = interpreterProxy->stackIntegerValue(2);\n\tsemaIndex = interpreterProxy->stackIntegerValue(1);\n\tclockRate = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tsqMIDIOpenPort(portNum, semaIndex, clockRate);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(3);\n\treturn null;\n}\n\n\n/*\tread parameter */\n\nEXPORT(sqInt)\nprimitiveMIDIParameterGet(void)\n{\n\tsqInt currentValue;\n\tsqInt whichParameter;\n\tsqInt _return_value;\n\n\twhichParameter = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tcurrentValue = sqMIDIParameterGet(whichParameter);\n\t_return_value = interpreterProxy->integerObjectOf(currentValue);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\n\n/*\tBackward compatibility */\n\nEXPORT(sqInt)\nprimitiveMIDIParameterGetOrSet(void)\n{\n\tif ((interpreterProxy->methodArgumentCount()) == 1) {\n\t\treturn primitiveMIDIParameterGet();\n\t}\n\telse {\n\t\treturn primitiveMIDIParameterSet();\n\t}\n}\n\n\n/*\twrite parameter */\n\nEXPORT(sqInt)\nprimitiveMIDIParameterSet(void)\n{\n\tsqInt newValue;\n\tsqInt whichParameter;\n\n\twhichParameter = interpreterProxy->stackIntegerValue(1);\n\tnewValue = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tsqMIDIParameterSet(whichParameter, newValue);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(2);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveMIDIRead(void)\n{\n\tchar *array;\n\tsqInt arrayLength;\n\tsqInt bytesRead;\n\tsqInt portNum;\n\tsqInt _return_value;\n\n\tportNum = interpreterProxy->stackIntegerValue(1);\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\n\tarray = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tarrayLength = interpreterProxy->byteSizeOf(((sqInt)(long)(array) - 4));\n\tbytesRead = sqMIDIPortReadInto(portNum, arrayLength, ((sqInt)array));\n\t_return_value = interpreterProxy->integerObjectOf(bytesRead);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(3, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveMIDIWrite(void)\n{\n\tchar *array;\n\tsqInt arrayLength;\n\tsqInt bytesWritten;\n\tsqInt portNum;\n\tsqInt time;\n\tsqInt _return_value;\n\n\tportNum = interpreterProxy->stackIntegerValue(2);\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(1)));\n\tarray = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(1))));\n\ttime = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tarrayLength = interpreterProxy->byteSizeOf(((sqInt)(long)(array) - 4));\n\tbytesWritten = sqMIDIPortWriteFromAt(portNum, arrayLength, ((sqInt)array), time);\n\t_return_value = interpreterProxy->integerObjectOf(bytesWritten);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(4, _return_value);\n\treturn null;\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n\tsqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\nEXPORT(sqInt)\nshutdownModule(void)\n{\n\treturn midiShutdown();\n}\n\nstatic void\nsqAssert(sqInt aBool)\n{\n\t/* missing DebugCode */;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* MIDIPlugin_exports[][3] = {\n\t{\"MIDIPlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"MIDIPlugin\", \"initialiseModule\", (void*)initialiseModule},\n\t{\"MIDIPlugin\", \"primitiveMIDIClosePort\", (void*)primitiveMIDIClosePort},\n\t{\"MIDIPlugin\", \"primitiveMIDIGetClock\", (void*)primitiveMIDIGetClock},\n\t{\"MIDIPlugin\", \"primitiveMIDIGetPortCount\", (void*)primitiveMIDIGetPortCount},\n\t{\"MIDIPlugin\", \"primitiveMIDIGetPortDirectionality\", (void*)primitiveMIDIGetPortDirectionality},\n\t{\"MIDIPlugin\", \"primitiveMIDIGetPortName\", (void*)primitiveMIDIGetPortName},\n\t{\"MIDIPlugin\", \"primitiveMIDIOpenPort\", (void*)primitiveMIDIOpenPort},\n\t{\"MIDIPlugin\", \"primitiveMIDIParameterGet\", (void*)primitiveMIDIParameterGet},\n\t{\"MIDIPlugin\", \"primitiveMIDIParameterGetOrSet\", (void*)primitiveMIDIParameterGetOrSet},\n\t{\"MIDIPlugin\", \"primitiveMIDIParameterSet\", (void*)primitiveMIDIParameterSet},\n\t{\"MIDIPlugin\", \"primitiveMIDIRead\", (void*)primitiveMIDIRead},\n\t{\"MIDIPlugin\", \"primitiveMIDIWrite\", (void*)primitiveMIDIWrite},\n\t{\"MIDIPlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{\"MIDIPlugin\", \"shutdownModule\", (void*)shutdownModule},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/Matrix2x3Plugin/Matrix2x3Plugin.c",
    "content": "/* Automatically generated by\n\tVMPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tMatrix2x3Plugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"Matrix2x3Plugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n\n/*** Function Prototypes ***/\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nstatic float * loadArgumentMatrix(sqInt matrix);\nstatic sqInt loadArgumentPoint(sqInt point);\nstatic sqInt matrix2x3ComposeMatrixwithinto(const float *m1, const float *m2, float *m3);\nstatic sqInt matrix2x3InvertPoint(float *m);\nstatic sqInt matrix2x3TransformPoint(float *m);\nstatic sqInt msg(char *s);\nstatic sqInt okayIntValue(sqInt value);\nEXPORT(sqInt) primitiveComposeMatrix(void);\nEXPORT(sqInt) primitiveInvertPoint(void);\nEXPORT(sqInt) primitiveInvertRectInto(void);\nEXPORT(sqInt) primitiveIsIdentity(void);\nEXPORT(sqInt) primitiveIsPureTranslation(void);\nEXPORT(sqInt) primitiveTransformPoint(void);\nEXPORT(sqInt) primitiveTransformRectInto(void);\nstatic sqInt roundAndStoreResultPoint(sqInt nItemsToPop);\nstatic sqInt roundAndStoreResultRectx0y0x1y1(sqInt dstOop, double  x0, double  y0, double  x1, double  y1);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\n\n\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic double m23ArgX;\nstatic double m23ArgY;\nstatic double m23ResultX;\nstatic double m23ResultY;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"Matrix2x3Plugin VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"Matrix2x3Plugin VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\n\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\n\n/*\tLoad the argument matrix */\n\nstatic float *\nloadArgumentMatrix(sqInt matrix)\n{\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!((interpreterProxy->isWords(matrix))\n\t\t && ((interpreterProxy->slotSizeOf(matrix)) == 6))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\treturn ((float *) (interpreterProxy->firstIndexableField(matrix)));\n}\n\n\n/*\tLoad the argument point into m23ArgX and m23ArgY */\n\nstatic sqInt\nloadArgumentPoint(sqInt point)\n{\n    sqInt isInt;\n    sqInt oop;\n\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!((interpreterProxy->fetchClassOf(point)) == (interpreterProxy->classPoint()))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\toop = interpreterProxy->fetchPointerofObject(0, point);\n\tisInt = (oop & 1);\n\tif (!(isInt\n\t\t || (interpreterProxy->isFloatObject(oop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (isInt) {\n\t\tm23ArgX = (oop >> 1);\n\t}\n\telse {\n\t\tm23ArgX = interpreterProxy->floatValueOf(oop);\n\t}\n\toop = interpreterProxy->fetchPointerofObject(1, point);\n\tisInt = (oop & 1);\n\tif (!(isInt\n\t\t || (interpreterProxy->isFloatObject(oop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (isInt) {\n\t\tm23ArgY = (oop >> 1);\n\t}\n\telse {\n\t\tm23ArgY = interpreterProxy->floatValueOf(oop);\n\t}\n}\n\n\n/*\tMultiply matrix m1 with m2 and store the result into m3. */\n\nstatic sqInt\nmatrix2x3ComposeMatrixwithinto(const float *m1, const float *m2, float *m3)\n{\n    double  a11;\n    double  a12;\n    double  a13;\n    double  a21;\n    double  a22;\n    double  a23;\n\n\ta11 = ((m1[0]) * (m2[0])) + ((m1[1]) * (m2[3]));\n\ta12 = ((m1[0]) * (m2[1])) + ((m1[1]) * (m2[4]));\n\ta13 = (((m1[0]) * (m2[2])) + ((m1[1]) * (m2[5]))) + (m1[2]);\n\ta21 = ((m1[3]) * (m2[0])) + ((m1[4]) * (m2[3]));\n\ta22 = ((m1[3]) * (m2[1])) + ((m1[4]) * (m2[4]));\n\ta23 = (((m1[3]) * (m2[2])) + ((m1[4]) * (m2[5]))) + (m1[5]);\n\tm3[0] = (((float) a11));\n\tm3[1] = (((float) a12));\n\tm3[2] = (((float) a13));\n\tm3[3] = (((float) a21));\n\tm3[4] = (((float) a22));\n\tm3[5] = (((float) a23));\n}\n\n\n/*\tInvert the pre-loaded argument point by the given matrix */\n\nstatic sqInt\nmatrix2x3InvertPoint(float *m)\n{\n    double  det;\n    double  detX;\n    double  detY;\n    double  x;\n    double  y;\n\n\tx = m23ArgX - (m[2]);\n\ty = m23ArgY - (m[5]);\n\tdet = ((m[0]) * (m[4])) - ((m[1]) * (m[3]));\n\tif (det == 0.0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tdet = 1.0 / det;\n\tdetX = (x * (m[4])) - ((m[1]) * y);\n\tdetY = ((m[0]) * y) - (x * (m[3]));\n\tm23ResultX = detX * det;\n\tm23ResultY = detY * det;\n}\n\n\n/*\tTransform the pre-loaded argument point by the given matrix */\n\nstatic sqInt\nmatrix2x3TransformPoint(float *m)\n{\n\tm23ResultX = ((m23ArgX * (m[0])) + (m23ArgY * (m[1]))) + (m[2]);\n\tm23ResultY = ((m23ArgX * (m[3])) + (m23ArgY * (m[4]))) + (m[5]);\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\nstatic sqInt\nokayIntValue(sqInt value)\n{\n\treturn (value >= (((double) -1073741824 )))\n\t && (m23ResultX <= (((double) 1073741823 )));\n}\n\nEXPORT(sqInt)\nprimitiveComposeMatrix(void)\n{\n    double  a11;\n    double  a12;\n    double  a13;\n    double  a21;\n    double  a22;\n    double  a23;\n    float *m1;\n    float *m2;\n    float *m3;\n    sqInt matrix;\n    sqInt matrix1;\n    sqInt matrix2;\n    sqInt result;\n\n\t;\n\t/* begin loadArgumentMatrix: */\n\tmatrix = result = interpreterProxy->stackObjectValue(0);\n\tif (interpreterProxy->failed()) {\n\t\tm3 = null;\n\t\tgoto l1;\n\t}\n\tif (!((interpreterProxy->isWords(matrix))\n\t\t && ((interpreterProxy->slotSizeOf(matrix)) == 6))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tm3 = null;\n\t\tgoto l1;\n\t}\n\tm3 = ((float *) (interpreterProxy->firstIndexableField(matrix)));\nl1:\t/* end loadArgumentMatrix: */;\n\t/* begin loadArgumentMatrix: */\n\tmatrix1 = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\tm2 = null;\n\t\tgoto l2;\n\t}\n\tif (!((interpreterProxy->isWords(matrix1))\n\t\t && ((interpreterProxy->slotSizeOf(matrix1)) == 6))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tm2 = null;\n\t\tgoto l2;\n\t}\n\tm2 = ((float *) (interpreterProxy->firstIndexableField(matrix1)));\nl2:\t/* end loadArgumentMatrix: */;\n\t/* begin loadArgumentMatrix: */\n\tmatrix2 = interpreterProxy->stackObjectValue(2);\n\tif (interpreterProxy->failed()) {\n\t\tm1 = null;\n\t\tgoto l3;\n\t}\n\tif (!((interpreterProxy->isWords(matrix2))\n\t\t && ((interpreterProxy->slotSizeOf(matrix2)) == 6))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tm1 = null;\n\t\tgoto l3;\n\t}\n\tm1 = ((float *) (interpreterProxy->firstIndexableField(matrix2)));\nl3:\t/* end loadArgumentMatrix: */;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin matrix2x3ComposeMatrix:with:into: */\n\ta11 = ((m1[0]) * (m2[0])) + ((m1[1]) * (m2[3]));\n\ta12 = ((m1[0]) * (m2[1])) + ((m1[1]) * (m2[4]));\n\ta13 = (((m1[0]) * (m2[2])) + ((m1[1]) * (m2[5]))) + (m1[2]);\n\ta21 = ((m1[3]) * (m2[0])) + ((m1[4]) * (m2[3]));\n\ta22 = ((m1[3]) * (m2[1])) + ((m1[4]) * (m2[4]));\n\ta23 = (((m1[3]) * (m2[2])) + ((m1[4]) * (m2[5]))) + (m1[5]);\n\tm3[0] = (((float) a11));\n\tm3[1] = (((float) a12));\n\tm3[2] = (((float) a13));\n\tm3[3] = (((float) a21));\n\tm3[4] = (((float) a22));\n\tm3[5] = (((float) a23));\n\tinterpreterProxy->popthenPush(3, result);\n}\n\nEXPORT(sqInt)\nprimitiveInvertPoint(void)\n{\n    float *matrix;\n    sqInt matrix1;\n\n\tloadArgumentPoint(interpreterProxy->stackObjectValue(0));\n\t/* begin loadArgumentMatrix: */\n\tmatrix1 = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\tmatrix = null;\n\t\tgoto l1;\n\t}\n\tif (!((interpreterProxy->isWords(matrix1))\n\t\t && ((interpreterProxy->slotSizeOf(matrix1)) == 6))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tmatrix = null;\n\t\tgoto l1;\n\t}\n\tmatrix = ((float *) (interpreterProxy->firstIndexableField(matrix1)));\nl1:\t/* end loadArgumentMatrix: */;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tmatrix2x3InvertPoint(matrix);\n\tif (!(interpreterProxy->failed())) {\n\t\t/* begin roundAndStoreResultPoint: */\n\t\tm23ResultX += 0.5;\n\t\tm23ResultY += 0.5;\n\t\tif (!((m23ResultX >= (((double) -1073741824 )))\n\t\t\t && (m23ResultX <= (((double) 1073741823 ))))) {\n\t\t\tinterpreterProxy->primitiveFail();\n\t\t\tgoto l2;\n\t\t}\n\t\tif (!((m23ResultY >= (((double) -1073741824 )))\n\t\t\t && (m23ResultX <= (((double) 1073741823 ))))) {\n\t\t\tinterpreterProxy->primitiveFail();\n\t\t\tgoto l2;\n\t\t}\n\t\tinterpreterProxy->popthenPush(2, interpreterProxy->makePointwithxValueyValue(((sqInt)m23ResultX), ((sqInt)m23ResultY)));\n\tl2:\t/* end roundAndStoreResultPoint: */;\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveInvertRectInto(void)\n{\n    double  cornerX;\n    double  cornerY;\n    sqInt dstOop;\n    float *matrix;\n    sqInt matrix1;\n    double  maxX;\n    double  maxY;\n    double  minX;\n    double  minY;\n    double  originX;\n    double  originY;\n    sqInt srcOop;\n\n\tdstOop = interpreterProxy->stackObjectValue(0);\n\tsrcOop = interpreterProxy->stackObjectValue(1);\n\t/* begin loadArgumentMatrix: */\n\tmatrix1 = interpreterProxy->stackObjectValue(2);\n\tif (interpreterProxy->failed()) {\n\t\tmatrix = null;\n\t\tgoto l1;\n\t}\n\tif (!((interpreterProxy->isWords(matrix1))\n\t\t && ((interpreterProxy->slotSizeOf(matrix1)) == 6))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tmatrix = null;\n\t\tgoto l1;\n\t}\n\tmatrix = ((float *) (interpreterProxy->firstIndexableField(matrix1)));\nl1:\t/* end loadArgumentMatrix: */;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!((interpreterProxy->fetchClassOf(srcOop)) == (interpreterProxy->fetchClassOf(dstOop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!(interpreterProxy->isPointers(srcOop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!((interpreterProxy->slotSizeOf(srcOop)) == 2)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tloadArgumentPoint(interpreterProxy->fetchPointerofObject(0, srcOop));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\toriginX = m23ArgX;\n\toriginY = m23ArgY;\n\tmatrix2x3InvertPoint(matrix);\n\tminX = maxX = m23ResultX;\n\n\t/* Load bottom-right point */\n\n\tminY = maxY = m23ResultY;\n\tloadArgumentPoint(interpreterProxy->fetchPointerofObject(1, srcOop));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tcornerX = m23ArgX;\n\tcornerY = m23ArgY;\n\tmatrix2x3InvertPoint(matrix);\n\tminX = ((minX < m23ResultX) ? minX : m23ResultX);\n\tmaxX = ((maxX < m23ResultX) ? m23ResultX : maxX);\n\tminY = ((minY < m23ResultY) ? minY : m23ResultY);\n\n\t/* Load top-right point */\n\n\tmaxY = ((maxY < m23ResultY) ? m23ResultY : maxY);\n\tm23ArgX = cornerX;\n\tm23ArgY = originY;\n\tmatrix2x3InvertPoint(matrix);\n\tminX = ((minX < m23ResultX) ? minX : m23ResultX);\n\tmaxX = ((maxX < m23ResultX) ? m23ResultX : maxX);\n\tminY = ((minY < m23ResultY) ? minY : m23ResultY);\n\n\t/* Load bottom-left point */\n\n\tmaxY = ((maxY < m23ResultY) ? m23ResultY : maxY);\n\tm23ArgX = originX;\n\tm23ArgY = cornerY;\n\tmatrix2x3InvertPoint(matrix);\n\tminX = ((minX < m23ResultX) ? minX : m23ResultX);\n\tmaxX = ((maxX < m23ResultX) ? m23ResultX : maxX);\n\tminY = ((minY < m23ResultY) ? minY : m23ResultY);\n\tmaxY = ((maxY < m23ResultY) ? m23ResultY : maxY);\n\tif (!(interpreterProxy->failed())) {\n\t\tdstOop = roundAndStoreResultRectx0y0x1y1(dstOop, minX, minY, maxX, maxY);\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->popthenPush(3, dstOop);\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveIsIdentity(void)\n{\n    float *matrix;\n    sqInt matrix1;\n\n\t/* begin loadArgumentMatrix: */\n\tmatrix1 = interpreterProxy->stackObjectValue(0);\n\tif (interpreterProxy->failed()) {\n\t\tmatrix = null;\n\t\tgoto l1;\n\t}\n\tif (!((interpreterProxy->isWords(matrix1))\n\t\t && ((interpreterProxy->slotSizeOf(matrix1)) == 6))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tmatrix = null;\n\t\tgoto l1;\n\t}\n\tmatrix = ((float *) (interpreterProxy->firstIndexableField(matrix1)));\nl1:\t/* end loadArgumentMatrix: */;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushBool(((((((matrix[0]) == (((float) 1.0))) && ((matrix[1]) == (((float) 0.0)))) && ((matrix[2]) == (((float) 0.0)))) && ((matrix[3]) == (((float) 0.0)))) && ((matrix[4]) == (((float) 1.0)))) && ((matrix[5]) == (((float) 0.0))));\n}\n\nEXPORT(sqInt)\nprimitiveIsPureTranslation(void)\n{\n    float *matrix;\n    sqInt matrix1;\n\n\t/* begin loadArgumentMatrix: */\n\tmatrix1 = interpreterProxy->stackObjectValue(0);\n\tif (interpreterProxy->failed()) {\n\t\tmatrix = null;\n\t\tgoto l1;\n\t}\n\tif (!((interpreterProxy->isWords(matrix1))\n\t\t && ((interpreterProxy->slotSizeOf(matrix1)) == 6))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tmatrix = null;\n\t\tgoto l1;\n\t}\n\tmatrix = ((float *) (interpreterProxy->firstIndexableField(matrix1)));\nl1:\t/* end loadArgumentMatrix: */;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushBool(((((matrix[0]) == (((float) 1.0))) && ((matrix[1]) == (((float) 0.0)))) && ((matrix[3]) == (((float) 0.0)))) && ((matrix[4]) == (((float) 1.0))));\n}\n\nEXPORT(sqInt)\nprimitiveTransformPoint(void)\n{\n    float *matrix;\n    sqInt matrix1;\n\n\tloadArgumentPoint(interpreterProxy->stackObjectValue(0));\n\t/* begin loadArgumentMatrix: */\n\tmatrix1 = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\tmatrix = null;\n\t\tgoto l1;\n\t}\n\tif (!((interpreterProxy->isWords(matrix1))\n\t\t && ((interpreterProxy->slotSizeOf(matrix1)) == 6))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tmatrix = null;\n\t\tgoto l1;\n\t}\n\tmatrix = ((float *) (interpreterProxy->firstIndexableField(matrix1)));\nl1:\t/* end loadArgumentMatrix: */;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin matrix2x3TransformPoint: */\n\tm23ResultX = ((m23ArgX * (matrix[0])) + (m23ArgY * (matrix[1]))) + (matrix[2]);\n\tm23ResultY = ((m23ArgX * (matrix[3])) + (m23ArgY * (matrix[4]))) + (matrix[5]);\n\t/* begin roundAndStoreResultPoint: */\n\tm23ResultX += 0.5;\n\tm23ResultY += 0.5;\n\tif (!((m23ResultX >= (((double) -1073741824 )))\n\t\t && (m23ResultX <= (((double) 1073741823 ))))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tgoto l2;\n\t}\n\tif (!((m23ResultY >= (((double) -1073741824 )))\n\t\t && (m23ResultX <= (((double) 1073741823 ))))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tgoto l2;\n\t}\n\tinterpreterProxy->popthenPush(2, interpreterProxy->makePointwithxValueyValue(((sqInt)m23ResultX), ((sqInt)m23ResultY)));\nl2:\t/* end roundAndStoreResultPoint: */;\n}\n\nEXPORT(sqInt)\nprimitiveTransformRectInto(void)\n{\n    double  cornerX;\n    double  cornerY;\n    sqInt dstOop;\n    float *matrix;\n    sqInt matrix1;\n    double  maxX;\n    double  maxY;\n    double  minX;\n    double  minY;\n    double  originX;\n    double  originY;\n    sqInt srcOop;\n\n\tdstOop = interpreterProxy->stackObjectValue(0);\n\tsrcOop = interpreterProxy->stackObjectValue(1);\n\t/* begin loadArgumentMatrix: */\n\tmatrix1 = interpreterProxy->stackObjectValue(2);\n\tif (interpreterProxy->failed()) {\n\t\tmatrix = null;\n\t\tgoto l1;\n\t}\n\tif (!((interpreterProxy->isWords(matrix1))\n\t\t && ((interpreterProxy->slotSizeOf(matrix1)) == 6))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tmatrix = null;\n\t\tgoto l1;\n\t}\n\tmatrix = ((float *) (interpreterProxy->firstIndexableField(matrix1)));\nl1:\t/* end loadArgumentMatrix: */;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!((interpreterProxy->fetchClassOf(srcOop)) == (interpreterProxy->fetchClassOf(dstOop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!(interpreterProxy->isPointers(srcOop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!((interpreterProxy->slotSizeOf(srcOop)) == 2)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tloadArgumentPoint(interpreterProxy->fetchPointerofObject(0, srcOop));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\toriginX = m23ArgX;\n\toriginY = m23ArgY;\n\t/* begin matrix2x3TransformPoint: */\n\tm23ResultX = ((m23ArgX * (matrix[0])) + (m23ArgY * (matrix[1]))) + (matrix[2]);\n\tm23ResultY = ((m23ArgX * (matrix[3])) + (m23ArgY * (matrix[4]))) + (matrix[5]);\n\tminX = maxX = m23ResultX;\n\n\t/* Load bottom-right point */\n\n\tminY = maxY = m23ResultY;\n\tloadArgumentPoint(interpreterProxy->fetchPointerofObject(1, srcOop));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tcornerX = m23ArgX;\n\tcornerY = m23ArgY;\n\t/* begin matrix2x3TransformPoint: */\n\tm23ResultX = ((m23ArgX * (matrix[0])) + (m23ArgY * (matrix[1]))) + (matrix[2]);\n\tm23ResultY = ((m23ArgX * (matrix[3])) + (m23ArgY * (matrix[4]))) + (matrix[5]);\n\tminX = ((minX < m23ResultX) ? minX : m23ResultX);\n\tmaxX = ((maxX < m23ResultX) ? m23ResultX : maxX);\n\tminY = ((minY < m23ResultY) ? minY : m23ResultY);\n\n\t/* Load top-right point */\n\n\tmaxY = ((maxY < m23ResultY) ? m23ResultY : maxY);\n\tm23ArgX = cornerX;\n\tm23ArgY = originY;\n\t/* begin matrix2x3TransformPoint: */\n\tm23ResultX = ((m23ArgX * (matrix[0])) + (m23ArgY * (matrix[1]))) + (matrix[2]);\n\tm23ResultY = ((m23ArgX * (matrix[3])) + (m23ArgY * (matrix[4]))) + (matrix[5]);\n\tminX = ((minX < m23ResultX) ? minX : m23ResultX);\n\tmaxX = ((maxX < m23ResultX) ? m23ResultX : maxX);\n\tminY = ((minY < m23ResultY) ? minY : m23ResultY);\n\n\t/* Load bottom-left point */\n\n\tmaxY = ((maxY < m23ResultY) ? m23ResultY : maxY);\n\tm23ArgX = originX;\n\tm23ArgY = cornerY;\n\t/* begin matrix2x3TransformPoint: */\n\tm23ResultX = ((m23ArgX * (matrix[0])) + (m23ArgY * (matrix[1]))) + (matrix[2]);\n\tm23ResultY = ((m23ArgX * (matrix[3])) + (m23ArgY * (matrix[4]))) + (matrix[5]);\n\tminX = ((minX < m23ResultX) ? minX : m23ResultX);\n\tmaxX = ((maxX < m23ResultX) ? m23ResultX : maxX);\n\tminY = ((minY < m23ResultY) ? minY : m23ResultY);\n\tmaxY = ((maxY < m23ResultY) ? m23ResultY : maxY);\n\tdstOop = roundAndStoreResultRectx0y0x1y1(dstOop, minX, minY, maxX, maxY);\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->popthenPush(3, dstOop);\n\t}\n}\n\n\n/*\tStore the result of a previous operation.\n\tFail if we cannot represent the result as SmallInteger */\n\nstatic sqInt\nroundAndStoreResultPoint(sqInt nItemsToPop)\n{\n\tm23ResultX += 0.5;\n\tm23ResultY += 0.5;\n\tif (!((m23ResultX >= (((double) -1073741824 )))\n\t\t && (m23ResultX <= (((double) 1073741823 ))))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!((m23ResultY >= (((double) -1073741824 )))\n\t\t && (m23ResultX <= (((double) 1073741823 ))))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->popthenPush(nItemsToPop, interpreterProxy->makePointwithxValueyValue(((sqInt)m23ResultX), ((sqInt)m23ResultY)));\n}\n\n\n/*\tCheck, round and store the result of a rectangle operation */\n\nstatic sqInt\nroundAndStoreResultRectx0y0x1y1(sqInt dstOop, double  x0, double  y0, double  x1, double  y1)\n{\n    sqInt cornerOop;\n    double  maxX;\n    double  maxY;\n    double  minX;\n    double  minY;\n    sqInt originOop;\n    sqInt rectOop;\n\n\tminX = x0 + 0.5;\n\tif (!((minX >= (((double) -1073741824 )))\n\t\t && (m23ResultX <= (((double) 1073741823 ))))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tmaxX = x1 + 0.5;\n\tif (!((maxX >= (((double) -1073741824 )))\n\t\t && (m23ResultX <= (((double) 1073741823 ))))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tminY = y0 + 0.5;\n\tif (!((minY >= (((double) -1073741824 )))\n\t\t && (m23ResultX <= (((double) 1073741823 ))))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tmaxY = y1 + 0.5;\n\tif (!((maxY >= (((double) -1073741824 )))\n\t\t && (m23ResultX <= (((double) 1073741823 ))))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pushRemappableOop(dstOop);\n\toriginOop = interpreterProxy->makePointwithxValueyValue(((sqInt)minX), ((sqInt)minY));\n\tinterpreterProxy->pushRemappableOop(originOop);\n\tcornerOop = interpreterProxy->makePointwithxValueyValue(((sqInt)maxX), ((sqInt)maxY));\n\toriginOop = interpreterProxy->popRemappableOop();\n\trectOop = interpreterProxy->popRemappableOop();\n\tinterpreterProxy->storePointerofObjectwithValue(0, rectOop, originOop);\n\tinterpreterProxy->storePointerofObjectwithValue(1, rectOop, cornerOop);\n\treturn rectOop;\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n    sqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* Matrix2x3Plugin_exports[][3] = {\n\t{\"Matrix2x3Plugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"Matrix2x3Plugin\", \"primitiveComposeMatrix\", (void*)primitiveComposeMatrix},\n\t{\"Matrix2x3Plugin\", \"primitiveInvertPoint\", (void*)primitiveInvertPoint},\n\t{\"Matrix2x3Plugin\", \"primitiveInvertRectInto\", (void*)primitiveInvertRectInto},\n\t{\"Matrix2x3Plugin\", \"primitiveIsIdentity\", (void*)primitiveIsIdentity},\n\t{\"Matrix2x3Plugin\", \"primitiveIsPureTranslation\", (void*)primitiveIsPureTranslation},\n\t{\"Matrix2x3Plugin\", \"primitiveTransformPoint\", (void*)primitiveTransformPoint},\n\t{\"Matrix2x3Plugin\", \"primitiveTransformRectInto\", (void*)primitiveTransformRectInto},\n\t{\"Matrix2x3Plugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/MiscPrimitivePlugin/MiscPrimitivePlugin.c",
    "content": "/* Automatically generated by\n\tVMPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tMiscPrimitivePlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"MiscPrimitivePlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"sqMemoryAccess.h\"\n\n\n/*** Proxy Functions ***/\n#define stackValue(i) (interpreterProxy->stackValue(i))\n#define stackIntegerValue(i) (interpreterProxy->stackIntegerValue(i))\n#define successFlag (!interpreterProxy->failed())\n#define success(bool) (interpreterProxy->success(bool))\n#define arrayValueOf(oop) (interpreterProxy->arrayValueOf(oop))\n#define checkedIntegerValueOf(oop) (interpreterProxy->checkedIntegerValueOf(oop))\n#define fetchArrayofObject(idx,oop) (interpreterProxy->fetchArrayofObject(idx,oop))\n#define fetchFloatofObject(idx,oop) (interpreterProxy->fetchFloatofObject(idx,oop))\n#define fetchIntegerofObject(idx,oop) (interpreterProxy->fetchIntegerofObject(idx,oop))\n#define floatValueOf(oop) (interpreterProxy->floatValueOf(oop))\n#define pop(n) (interpreterProxy->pop(n))\n#define pushInteger(n) (interpreterProxy->pushInteger(n))\n#define sizeOfSTArrayFromCPrimitive(cPtr) (interpreterProxy->sizeOfSTArrayFromCPrimitive(cPtr))\n#define storeIntegerofObjectwithValue(idx,oop,value) (interpreterProxy->storeIntegerofObjectwithValue(idx,oop,value))\n#define primitiveFail() interpreterProxy->primitiveFail()\n/* allows accessing Strings in both C and Smalltalk */\n#define asciiValue(c) c\n\n\n\n/*** Constants ***/\n\n\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"MiscPrimitivePlugin VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"MiscPrimitivePlugin VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\n\n\n/*** Function Prototypes ***/\nstatic sqInt encodeBytesOfinat(sqInt anInt, unsigned char *ba, sqInt i);\nstatic sqInt encodeIntinat(sqInt anInt, unsigned char *ba, sqInt i);\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nstatic sqInt msg(char *s);\nEXPORT(sqInt) primitiveCompareString(void);\nEXPORT(sqInt) primitiveCompressToByteArray(void);\nEXPORT(sqInt) primitiveConvert8BitSigned(void);\nEXPORT(sqInt) primitiveDecompressFromByteArray(void);\nEXPORT(sqInt) primitiveFindFirstInString(void);\nEXPORT(sqInt) primitiveFindSubstring(void);\nEXPORT(sqInt) primitiveIndexOfAsciiInString(void);\nEXPORT(sqInt) primitiveStringHash(void);\nEXPORT(sqInt) primitiveTranslateStringWithTable(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\n\n\n\n/*\tCopy the integer anInt into byteArray ba at index i, and return the next\n\tindex \n */\n\nstatic sqInt\nencodeBytesOfinat(sqInt anInt, unsigned char *ba, sqInt i)\n{\n    sqInt j;\n\n\tfor (j = 0; j <= 3; j += 1) {\n\t\tba[i + j] = ((((usqInt) anInt) >> ((3 - j) * 8)) & 255);\n\t}\n\treturn i + 4;\n}\n\n\n/*\tEncode the integer anInt in byteArray ba at index i, and return the next\n\tindex. The encoding is as follows...\n\t0-223\t0-223\n\t224-254\t(0-30)*256 + next byte (0-7935)\n\t255\t\tnext 4 bytes */\n\nstatic sqInt\nencodeIntinat(sqInt anInt, unsigned char *ba, sqInt i)\n{\n    sqInt j;\n\n\tif (anInt <= 223) {\n\t\tba[i] = anInt;\n\t\treturn i + 1;\n\t}\n\tif (anInt <= 7935) {\n\t\tba[i] = ((((sqInt) anInt >> 8)) + 224);\n\t\tba[i + 1] = (anInt % 256);\n\t\treturn i + 2;\n\t}\n\tba[i] = 255;\n\t/* begin encodeBytesOf:in:at: */\n\tfor (j = 0; j <= 3; j += 1) {\n\t\tba[(i + 1) + j] = ((((usqInt) anInt) >> ((3 - j) * 8)) & 255);\n\t}\n\treturn (i + 1) + 4;\n}\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\n\n/*\tReturn 1, 2 or 3, if string1 is <, =, or > string2, with the collating\n\torder of characters given by the order array.\n */\n\nEXPORT(sqInt)\nprimitiveCompareString(void)\n{\n    sqInt c1;\n    sqInt c2;\n    sqInt i;\n    sqInt len1;\n    sqInt len2;\n    unsigned char *order;\n    sqInt rcvr;\n    unsigned char *string1;\n    unsigned char *string2;\n\n\trcvr = stackValue(3);\n\tif (!(isBytes(stackValue(2)))) {\n\t\treturn primitiveFail();\n\t}\n\tstring1 = arrayValueOf(stackValue(2));\n\tstring1 -= 1;\n\tif (!(isBytes(stackValue(1)))) {\n\t\treturn primitiveFail();\n\t}\n\tstring2 = arrayValueOf(stackValue(1));\n\tstring2 -= 1;\n\tif (!(isBytes(stackValue(0)))) {\n\t\treturn primitiveFail();\n\t}\n\torder = arrayValueOf(stackValue(0));\n\torder -= 1;\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tlen1 = sizeOfSTArrayFromCPrimitive(string1 + 1);\n\tlen2 = sizeOfSTArrayFromCPrimitive(string2 + 1);\n\tfor (i = 1; i <= (((len1 < len2) ? len1 : len2)); i += 1) {\n\t\tc1 = order[(string1[i]) + 1];\n\t\tc2 = order[(string2[i]) + 1];\n\t\tif (!(c1 == c2)) {\n\t\t\tif (c1 < c2) {\n\t\t\t\tif (!(successFlag)) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\tpop(4);\n\t\t\t\tpushInteger(1);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!(successFlag)) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\tpop(4);\n\t\t\t\tpushInteger(3);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t}\n\tif (len1 == len2) {\n\t\tif (!(successFlag)) {\n\t\t\treturn null;\n\t\t}\n\t\tpop(4);\n\t\tpushInteger(2);\n\t\treturn null;\n\t}\n\tif (len1 < len2) {\n\t\tif (!(successFlag)) {\n\t\t\treturn null;\n\t\t}\n\t\tpop(4);\n\t\tpushInteger(1);\n\t\treturn null;\n\t}\n\telse {\n\t\tif (!(successFlag)) {\n\t\t\treturn null;\n\t\t}\n\t\tpop(4);\n\t\tpushInteger(3);\n\t\treturn null;\n\t}\n}\n\n\n/*\tStore a run-coded compression of the receiver into the byteArray ba,\n\tand return the last index stored into. ba is assumed to be large enough.\n\tThe encoding is as follows...\n\tS {N D}*.\n\tS is the size of the original bitmap, followed by run-coded pairs.\n\tN is a run-length * 4 + data code.\n\tD, the data, depends on the data code...\n\t0\tskip N words, D is absent\n\t1\tN words with all 4 bytes = D (1 byte)\n\t2\tN words all = D (4 bytes)\n\t3\tN words follow in D (4N bytes)\n\tS and N are encoded as follows...\n\t0-223\t0-223\n\t224-254\t(0-30)*256 + next byte (0-7935)\n\t255\t\tnext 4 bytes */\n\nEXPORT(sqInt)\nprimitiveCompressToByteArray(void)\n{\n    unsigned char *ba;\n    int *bm;\n    sqInt eqBytes;\n    sqInt i;\n    sqInt j;\n    sqInt j1;\n    sqInt j2;\n    sqInt j3;\n    sqInt j4;\n    sqInt j5;\n    sqInt j6;\n    sqInt j7;\n    sqInt k;\n    sqInt lowByte;\n    sqInt m;\n    sqInt rcvr;\n    sqInt size;\n    sqInt word;\n\n\trcvr = stackValue(2);\n\tbm = arrayValueOf(stackValue(1));\n\tbm -= 1;\n\tif (!(isBytes(stackValue(0)))) {\n\t\treturn primitiveFail();\n\t}\n\tba = arrayValueOf(stackValue(0));\n\tba -= 1;\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tsize = sizeOfSTArrayFromCPrimitive(bm + 1);\n\t/* begin encodeInt:in:at: */\n\tif (size <= 223) {\n\t\tba[1] = size;\n\t\ti = 1 + 1;\n\t\tgoto l5;\n\t}\n\tif (size <= 7935) {\n\t\tba[1] = ((((sqInt) size >> 8)) + 224);\n\t\tba[1 + 1] = (size % 256);\n\t\ti = 1 + 2;\n\t\tgoto l5;\n\t}\n\tba[1] = 255;\n\t/* begin encodeBytesOf:in:at: */\n\tfor (j7 = 0; j7 <= 3; j7 += 1) {\n\t\tba[(1 + 1) + j7] = ((((usqInt) size) >> ((3 - j7) * 8)) & 255);\n\t}\n\ti = (1 + 1) + 4;\nl5:\t/* end encodeInt:in:at: */;\n\tk = 1;\n\twhile (k <= size) {\n\t\tword = bm[k];\n\t\tlowByte = word & 255;\n\t\teqBytes = (((((usqInt) word) >> 8) & 255) == lowByte)\n\t\t && ((((((usqInt) word) >> 16) & 255) == lowByte)\n && (((((usqInt) word) >> 24) & 255) == lowByte));\n\t\tj = k;\n\t\twhile ((j < size)\n && (word == (bm[j + 1]))) {\n\t\t\tj += 1;\n\t\t}\n\t\tif (j > k) {\n\t\t\tif (eqBytes) {\n\t\t\t\t/* begin encodeInt:in:at: */\n\t\t\t\tif (((((j - k) + 1) * 4) + 1) <= 223) {\n\t\t\t\t\tba[i] = ((((j - k) + 1) * 4) + 1);\n\t\t\t\t\ti += 1;\n\t\t\t\t\tgoto l1;\n\t\t\t\t}\n\t\t\t\tif (((((j - k) + 1) * 4) + 1) <= 7935) {\n\t\t\t\t\tba[i] = ((((sqInt) ((((j - k) + 1) * 4) + 1) >> 8)) + 224);\n\t\t\t\t\tba[i + 1] = (((((j - k) + 1) * 4) + 1) % 256);\n\t\t\t\t\ti += 2;\n\t\t\t\t\tgoto l1;\n\t\t\t\t}\n\t\t\t\tba[i] = 255;\n\t\t\t\t/* begin encodeBytesOf:in:at: */\n\t\t\t\tfor (j3 = 0; j3 <= 3; j3 += 1) {\n\t\t\t\t\tba[(i + 1) + j3] = ((((usqInt) ((((j - k) + 1) * 4) + 1)) >> ((3 - j3) * 8)) & 255);\n\t\t\t\t}\n\t\t\t\ti = (i + 1) + 4;\n\t\t\tl1:\t/* end encodeInt:in:at: */;\n\t\t\t\tba[i] = lowByte;\n\t\t\t\ti += 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t/* begin encodeInt:in:at: */\n\t\t\t\tif (((((j - k) + 1) * 4) + 2) <= 223) {\n\t\t\t\t\tba[i] = ((((j - k) + 1) * 4) + 2);\n\t\t\t\t\ti += 1;\n\t\t\t\t\tgoto l2;\n\t\t\t\t}\n\t\t\t\tif (((((j - k) + 1) * 4) + 2) <= 7935) {\n\t\t\t\t\tba[i] = ((((sqInt) ((((j - k) + 1) * 4) + 2) >> 8)) + 224);\n\t\t\t\t\tba[i + 1] = (((((j - k) + 1) * 4) + 2) % 256);\n\t\t\t\t\ti += 2;\n\t\t\t\t\tgoto l2;\n\t\t\t\t}\n\t\t\t\tba[i] = 255;\n\t\t\t\t/* begin encodeBytesOf:in:at: */\n\t\t\t\tfor (j4 = 0; j4 <= 3; j4 += 1) {\n\t\t\t\t\tba[(i + 1) + j4] = ((((usqInt) ((((j - k) + 1) * 4) + 2)) >> ((3 - j4) * 8)) & 255);\n\t\t\t\t}\n\t\t\t\ti = (i + 1) + 4;\n\t\t\tl2:\t/* end encodeInt:in:at: */;\n\t\t\t\t/* begin encodeBytesOf:in:at: */\n\t\t\t\tfor (j1 = 0; j1 <= 3; j1 += 1) {\n\t\t\t\t\tba[i + j1] = ((((usqInt) word) >> ((3 - j1) * 8)) & 255);\n\t\t\t\t}\n\t\t\t\ti += 4;\n\t\t\t}\n\t\t\tk = j + 1;\n\t\t}\n\t\telse {\n\t\t\tif (eqBytes) {\n\t\t\t\t/* begin encodeInt:in:at: */\n\t\t\t\tif (((1 * 4) + 1) <= 223) {\n\t\t\t\t\tba[i] = ((1 * 4) + 1);\n\t\t\t\t\ti += 1;\n\t\t\t\t\tgoto l3;\n\t\t\t\t}\n\t\t\t\tif (((1 * 4) + 1) <= 7935) {\n\t\t\t\t\tba[i] = ((((sqInt) ((1 * 4) + 1) >> 8)) + 224);\n\t\t\t\t\tba[i + 1] = (((1 * 4) + 1) % 256);\n\t\t\t\t\ti += 2;\n\t\t\t\t\tgoto l3;\n\t\t\t\t}\n\t\t\t\tba[i] = 255;\n\t\t\t\t/* begin encodeBytesOf:in:at: */\n\t\t\t\tfor (j5 = 0; j5 <= 3; j5 += 1) {\n\t\t\t\t\tba[(i + 1) + j5] = ((((usqInt) ((1 * 4) + 1)) >> ((3 - j5) * 8)) & 255);\n\t\t\t\t}\n\t\t\t\ti = (i + 1) + 4;\n\t\t\tl3:\t/* end encodeInt:in:at: */;\n\t\t\t\tba[i] = lowByte;\n\t\t\t\ti += 1;\n\t\t\t\tk += 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\twhile ((j < size)\n && ((bm[j]) != (bm[j + 1]))) {\n\t\t\t\t\tj += 1;\n\t\t\t\t}\n\t\t\t\tif (j == size) {\n\t\t\t\t\tj += 1;\n\t\t\t\t}\n\t\t\t\t/* begin encodeInt:in:at: */\n\t\t\t\tif ((((j - k) * 4) + 3) <= 223) {\n\t\t\t\t\tba[i] = (((j - k) * 4) + 3);\n\t\t\t\t\ti += 1;\n\t\t\t\t\tgoto l4;\n\t\t\t\t}\n\t\t\t\tif ((((j - k) * 4) + 3) <= 7935) {\n\t\t\t\t\tba[i] = ((((sqInt) (((j - k) * 4) + 3) >> 8)) + 224);\n\t\t\t\t\tba[i + 1] = ((((j - k) * 4) + 3) % 256);\n\t\t\t\t\ti += 2;\n\t\t\t\t\tgoto l4;\n\t\t\t\t}\n\t\t\t\tba[i] = 255;\n\t\t\t\t/* begin encodeBytesOf:in:at: */\n\t\t\t\tfor (j6 = 0; j6 <= 3; j6 += 1) {\n\t\t\t\t\tba[(i + 1) + j6] = ((((usqInt) (((j - k) * 4) + 3)) >> ((3 - j6) * 8)) & 255);\n\t\t\t\t}\n\t\t\t\ti = (i + 1) + 4;\n\t\t\tl4:\t/* end encodeInt:in:at: */;\n\t\t\t\tfor (m = k; m <= (j - 1); m += 1) {\n\t\t\t\t\t/* begin encodeBytesOf:in:at: */\n\t\t\t\t\tfor (j2 = 0; j2 <= 3; j2 += 1) {\n\t\t\t\t\t\tba[i + j2] = ((((usqInt) (bm[m])) >> ((3 - j2) * 8)) & 255);\n\t\t\t\t\t}\n\t\t\t\t\ti += 4;\n\t\t\t\t}\n\t\t\t\tk = j;\n\t\t\t}\n\t\t}\n\t}\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tpop(3);\n\tpushInteger(i - 1);\n\treturn null;\n}\n\n\n/*\tCopy the contents of the given array of signed 8-bit samples into the\n\tgiven array of 16-bit signed samples.\n */\n\nEXPORT(sqInt)\nprimitiveConvert8BitSigned(void)\n{\n    unsigned char *aByteArray;\n    unsigned short *aSoundBuffer;\n    sqInt i;\n    sqInt n;\n    sqInt rcvr;\n    sqInt s;\n\n\trcvr = stackValue(2);\n\tif (!(isBytes(stackValue(1)))) {\n\t\treturn primitiveFail();\n\t}\n\taByteArray = arrayValueOf(stackValue(1));\n\taByteArray -= 1;\n\taSoundBuffer = arrayValueOf(stackValue(0));\n\taSoundBuffer -= 1;\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tn = sizeOfSTArrayFromCPrimitive(aByteArray + 1);\n\tfor (i = 1; i <= n; i += 1) {\n\t\ts = aByteArray[i];\n\t\tif (s > 127) {\n\t\t\taSoundBuffer[i] = (((usqInt) (s - 256) << 8));\n\t\t}\n\t\telse {\n\t\t\taSoundBuffer[i] = (((usqInt) s << 8));\n\t\t}\n\t}\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tpop(2);\n}\n\n\n/*\tDecompress the body of a byteArray encoded by compressToByteArray (qv)...\n\tThe format is simply a sequence of run-coded pairs, {N D}*.\n\tN is a run-length * 4 + data code.\n\tD, the data, depends on the data code...\n\t0\tskip N words, D is absent\n\t(could be used to skip from one raster line to the next)\n\t1\tN words with all 4 bytes = D (1 byte)\n\t2\tN words all = D (4 bytes)\n\t3\tN words follow in D (4N bytes)\n\tS and N are encoded as follows (see decodeIntFrom:)...\n\t0-223\t0-223\n\t224-254\t(0-30)*256 + next byte (0-7935)\n\t255\t\tnext 4 bytes */\n/*\tNOTE: If fed with garbage, this routine could read past the end of ba, but\n\tit should fail before writing past the ned of bm. */\n\nEXPORT(sqInt)\nprimitiveDecompressFromByteArray(void)\n{\n    sqInt anInt;\n    unsigned char *ba;\n    int *bm;\n    sqInt code;\n    sqInt data;\n    sqInt end;\n    sqInt i;\n    sqInt index;\n    sqInt j;\n    sqInt k;\n    sqInt m;\n    sqInt n;\n    sqInt pastEnd;\n    sqInt rcvr;\n\n\trcvr = stackValue(3);\n\tbm = arrayValueOf(stackValue(2));\n\tbm -= 1;\n\tif (!(isBytes(stackValue(1)))) {\n\t\treturn primitiveFail();\n\t}\n\tba = arrayValueOf(stackValue(1));\n\tba -= 1;\n\tindex = stackIntegerValue(0);\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\n\t/* byteArray read index */\n\n\ti = index;\n\tend = sizeOfSTArrayFromCPrimitive(ba + 1);\n\n\t/* bitmap write index */\n\n\tk = 1;\n\tpastEnd = (sizeOfSTArrayFromCPrimitive(bm + 1)) + 1;\n\twhile (i <= end) {\n\n\t\t/* Decode next run start N */\n\n\t\tanInt = ba[i];\n\t\ti += 1;\n\t\tif (!(anInt <= 223)) {\n\t\t\tif (anInt <= 254) {\n\t\t\t\tanInt = ((anInt - 224) * 256) + (ba[i]);\n\t\t\t\ti += 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tanInt = 0;\n\t\t\t\tfor (j = 1; j <= 4; j += 1) {\n\t\t\t\t\tanInt = (((usqInt) anInt << 8)) + (ba[i]);\n\t\t\t\t\ti += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tn = ((usqInt) anInt) >> 2;\n\t\tif ((k + n) > pastEnd) {\n\t\t\tprimitiveFail();\n\t\t\treturn null;\n\t\t}\n\t\tcode = anInt & 3;\n\t\tif (code == 0) {\n\t\t\tnull;\n\t\t}\n\t\tif (code == 1) {\n\n\t\t\t/* n consecutive words of 4 bytes = the following byte */\n\n\t\t\tdata = ba[i];\n\t\t\ti += 1;\n\t\t\tdata = data | (((usqInt) data << 8));\n\t\t\tdata = data | (((usqInt) data << 16));\n\t\t\tfor (j = 1; j <= n; j += 1) {\n\t\t\t\tbm[k] = data;\n\t\t\t\tk += 1;\n\t\t\t}\n\t\t}\n\t\tif (code == 2) {\n\n\t\t\t/* n consecutive words = 4 following bytes */\n\n\t\t\tdata = 0;\n\t\t\tfor (j = 1; j <= 4; j += 1) {\n\t\t\t\tdata = (((usqInt) data << 8)) | (ba[i]);\n\t\t\t\ti += 1;\n\t\t\t}\n\t\t\tfor (j = 1; j <= n; j += 1) {\n\t\t\t\tbm[k] = data;\n\t\t\t\tk += 1;\n\t\t\t}\n\t\t}\n\t\tif (code == 3) {\n\t\t\tfor (m = 1; m <= n; m += 1) {\n\n\t\t\t\t/* n consecutive words from the data... */\n\n\t\t\t\tdata = 0;\n\t\t\t\tfor (j = 1; j <= 4; j += 1) {\n\t\t\t\t\tdata = (((usqInt) data << 8)) | (ba[i]);\n\t\t\t\t\ti += 1;\n\t\t\t\t}\n\t\t\t\tbm[k] = data;\n\t\t\t\tk += 1;\n\t\t\t}\n\t\t}\n\t}\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tpop(3);\n}\n\nEXPORT(sqInt)\nprimitiveFindFirstInString(void)\n{\n    unsigned char *aString;\n    sqInt i;\n    char *inclusionMap;\n    sqInt rcvr;\n    sqInt start;\n    sqInt stringSize;\n\n\trcvr = stackValue(3);\n\tif (!(isBytes(stackValue(2)))) {\n\t\treturn primitiveFail();\n\t}\n\taString = arrayValueOf(stackValue(2));\n\taString -= 1;\n\tif (!(isBytes(stackValue(1)))) {\n\t\treturn primitiveFail();\n\t}\n\tinclusionMap = arrayValueOf(stackValue(1));\n\tinclusionMap -= 1;\n\tstart = stackIntegerValue(0);\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tif ((sizeOfSTArrayFromCPrimitive(inclusionMap + 1)) != 256) {\n\t\tif (!(successFlag)) {\n\t\t\treturn null;\n\t\t}\n\t\tpop(4);\n\t\tpushInteger(0);\n\t\treturn null;\n\t}\n\ti = start;\n\tstringSize = sizeOfSTArrayFromCPrimitive(aString + 1);\n\twhile ((i <= stringSize)\n && ((inclusionMap[(asciiValue(aString[i])) + 1]) == 0)) {\n\t\ti += 1;\n\t}\n\tif (i > stringSize) {\n\t\tif (!(successFlag)) {\n\t\t\treturn null;\n\t\t}\n\t\tpop(4);\n\t\tpushInteger(0);\n\t\treturn null;\n\t}\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tpop(4);\n\tpushInteger(i);\n\treturn null;\n}\n\n\n/*\tAnswer the index in the string body at which the substring key first\n\toccurs, at or beyond start. The match is determined using matchTable,\n\twhich can be used to effect, eg, case-insensitive matches. If no match is\n\tfound, zero will be returned.\n\t\n\tThe algorithm below is not optimum -- it is intended to be translated to C\n\twhich will go so fast that it wont matter.\n */\n\nEXPORT(sqInt)\nprimitiveFindSubstring(void)\n{\n    unsigned char *body;\n    sqInt index;\n    unsigned char *key;\n    unsigned char *matchTable;\n    sqInt rcvr;\n    sqInt start;\n    sqInt startIndex;\n\n\trcvr = stackValue(4);\n\tif (!(isBytes(stackValue(3)))) {\n\t\treturn primitiveFail();\n\t}\n\tkey = arrayValueOf(stackValue(3));\n\tkey -= 1;\n\tif (!(isBytes(stackValue(2)))) {\n\t\treturn primitiveFail();\n\t}\n\tbody = arrayValueOf(stackValue(2));\n\tbody -= 1;\n\tstart = stackIntegerValue(1);\n\tif (!(isBytes(stackValue(0)))) {\n\t\treturn primitiveFail();\n\t}\n\tmatchTable = arrayValueOf(stackValue(0));\n\tmatchTable -= 1;\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tif ((sizeOfSTArrayFromCPrimitive(key + 1)) == 0) {\n\t\tif (!(successFlag)) {\n\t\t\treturn null;\n\t\t}\n\t\tpop(5);\n\t\tpushInteger(0);\n\t\treturn null;\n\t}\n\tfor (startIndex = start; startIndex <= (((sizeOfSTArrayFromCPrimitive(body + 1)) - (sizeOfSTArrayFromCPrimitive(key + 1))) + 1); startIndex += 1) {\n\t\tindex = 1;\n\t\twhile ((matchTable[(asciiValue(body[(startIndex + index) - 1])) + 1]) == (matchTable[(asciiValue(key[index])) + 1])) {\n\t\t\tif (index == (sizeOfSTArrayFromCPrimitive(key + 1))) {\n\t\t\t\tif (!(successFlag)) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\tpop(5);\n\t\t\t\tpushInteger(startIndex);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tindex += 1;\n\t\t}\n\t}\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tpop(5);\n\tpushInteger(0);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveIndexOfAsciiInString(void)\n{\n    sqInt anInteger;\n    unsigned char *aString;\n    sqInt pos;\n    sqInt rcvr;\n    sqInt start;\n    sqInt stringSize;\n\n\trcvr = stackValue(3);\n\tanInteger = stackIntegerValue(2);\n\tif (!(isBytes(stackValue(1)))) {\n\t\treturn primitiveFail();\n\t}\n\taString = arrayValueOf(stackValue(1));\n\taString -= 1;\n\tstart = stackIntegerValue(0);\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tstringSize = sizeOfSTArrayFromCPrimitive(aString + 1);\n\tfor (pos = start; pos <= stringSize; pos += 1) {\n\t\tif ((asciiValue(aString[pos])) == anInteger) {\n\t\t\tif (!(successFlag)) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tpop(4);\n\t\t\tpushInteger(pos);\n\t\t\treturn null;\n\t\t}\n\t}\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tpop(4);\n\tpushInteger(0);\n\treturn null;\n}\n\n\n/*\tAnswer the hash of a byte-indexed collection,\n\tusing speciesHash as the initial value.\n\tSee SmallInteger>>hashMultiply.\n\t\n\tThe primitive should be renamed at a\n\tsuitable point in the future\n */\n\nEXPORT(sqInt)\nprimitiveStringHash(void)\n{\n    unsigned char *aByteArray;\n    sqInt byteArraySize;\n    sqInt hash;\n    sqInt low;\n    sqInt pos;\n    sqInt rcvr;\n    sqInt speciesHash;\n\n\trcvr = stackValue(2);\n\tif (!(isBytes(stackValue(1)))) {\n\t\treturn primitiveFail();\n\t}\n\taByteArray = arrayValueOf(stackValue(1));\n\taByteArray -= 1;\n\tspeciesHash = stackIntegerValue(0);\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tbyteArraySize = sizeOfSTArrayFromCPrimitive(aByteArray + 1);\n\thash = speciesHash & 268435455;\n\tfor (pos = 1; pos <= byteArraySize; pos += 1) {\n\n\t\t/* Begin hashMultiply */\n\n\t\thash += aByteArray[pos];\n\t\tlow = hash & 16383;\n\t\thash = ((9741 * low) + ((((9741 * (((usqInt) hash >> 14))) + (101 * low)) & 16383) * 16384)) & 268435455;\n\t}\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tpop(3);\n\tpushInteger(hash);\n\treturn null;\n}\n\n\n/*\ttranslate the characters in the string by the given table, in place */\n\nEXPORT(sqInt)\nprimitiveTranslateStringWithTable(void)\n{\n    unsigned char *aString;\n    sqInt i;\n    sqInt rcvr;\n    sqInt start;\n    sqInt stop;\n    unsigned char *table;\n\n\trcvr = stackValue(4);\n\tif (!(isBytes(stackValue(3)))) {\n\t\treturn primitiveFail();\n\t}\n\taString = arrayValueOf(stackValue(3));\n\taString -= 1;\n\tstart = stackIntegerValue(2);\n\tstop = stackIntegerValue(1);\n\tif (!(isBytes(stackValue(0)))) {\n\t\treturn primitiveFail();\n\t}\n\ttable = arrayValueOf(stackValue(0));\n\ttable -= 1;\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tfor (i = start; i <= stop; i += 1) {\n\t\taString[i] = (table[(asciiValue(aString[i])) + 1]);\n\t}\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tpop(4);\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n    sqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* MiscPrimitivePlugin_exports[][3] = {\n\t{\"MiscPrimitivePlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"MiscPrimitivePlugin\", \"primitiveCompareString\", (void*)primitiveCompareString},\n\t{\"MiscPrimitivePlugin\", \"primitiveCompressToByteArray\", (void*)primitiveCompressToByteArray},\n\t{\"MiscPrimitivePlugin\", \"primitiveConvert8BitSigned\", (void*)primitiveConvert8BitSigned},\n\t{\"MiscPrimitivePlugin\", \"primitiveDecompressFromByteArray\", (void*)primitiveDecompressFromByteArray},\n\t{\"MiscPrimitivePlugin\", \"primitiveFindFirstInString\", (void*)primitiveFindFirstInString},\n\t{\"MiscPrimitivePlugin\", \"primitiveFindSubstring\", (void*)primitiveFindSubstring},\n\t{\"MiscPrimitivePlugin\", \"primitiveIndexOfAsciiInString\", (void*)primitiveIndexOfAsciiInString},\n\t{\"MiscPrimitivePlugin\", \"primitiveStringHash\", (void*)primitiveStringHash},\n\t{\"MiscPrimitivePlugin\", \"primitiveTranslateStringWithTable\", (void*)primitiveTranslateStringWithTable},\n\t{\"MiscPrimitivePlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/Mpeg3Plugin/Mpeg3Plugin.c",
    "content": "/* Automatically generated by\n\tSmartSyntaxPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tMpeg3Plugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"Mpeg3Plugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"Mpeg3Plugin.h\"\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n\n/*** Function Prototypes ***/\nstatic sqInt checkFileEntry(mpeg3_t *  aMpegFile);\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nEXPORT(sqInt) initialiseModule(void);\nstatic sqInt makeFileEntry(mpeg3_t *  aMpegFile);\nstatic mpeg3_t * mpeg3tValueOf(sqInt mpeg3tHandle);\nstatic sqInt msg(char *s);\nEXPORT(sqInt) primitiveMPEG3AudioChannels(void);\nEXPORT(sqInt) primitiveMPEG3AudioSamples(void);\nEXPORT(sqInt) primitiveMPEG3CheckSig(void);\nEXPORT(sqInt) primitiveMPEG3Close(void);\nEXPORT(sqInt) primitiveMPEG3DropFrames(void);\nEXPORT(sqInt) primitiveMPEG3EndOfAudio(void);\nEXPORT(sqInt) primitiveMPEG3EndOfVideo(void);\nEXPORT(sqInt) primitiveMPEG3FrameRate(void);\nEXPORT(sqInt) primitiveMPEG3GenerateToc(void);\nEXPORT(sqInt) primitiveMPEG3GetFrame(void);\nEXPORT(sqInt) primitiveMPEG3GetSample(void);\nEXPORT(sqInt) primitiveMPEG3GetTime(void);\nEXPORT(sqInt) primitiveMPEG3HasAudio(void);\nEXPORT(sqInt) primitiveMPEG3HasVideo(void);\nEXPORT(sqInt) primitiveMPEG3Open(void);\nEXPORT(sqInt) primitiveMPEG3OpenABuffer(void);\nEXPORT(sqInt) primitiveMPEG3PreviousFrame(void);\nEXPORT(sqInt) primitiveMPEG3ReadAudio(void);\nEXPORT(sqInt) primitiveMPEG3ReadFrame(void);\nEXPORT(sqInt) primitiveMPEG3ReadFrameBufferOffset(void);\nEXPORT(sqInt) primitiveMPEG3ReReadAudio(void);\nEXPORT(sqInt) primitiveMPEG3SampleRate(void);\nEXPORT(sqInt) primitiveMPEG3SeekPercentage(void);\nEXPORT(sqInt) primitiveMPEG3SetCpus(void);\nEXPORT(sqInt) primitiveMPEG3SetFrame(void);\nEXPORT(sqInt) primitiveMPEG3SetMmx(void);\nEXPORT(sqInt) primitiveMPEG3SetSample(void);\nEXPORT(sqInt) primitiveMPEG3TellPercentage(void);\nEXPORT(sqInt) primitiveMPEG3TotalAStreams(void);\nEXPORT(sqInt) primitiveMPEG3TotalVStreams(void);\nEXPORT(sqInt) primitiveMPEG3VideoFrames(void);\nEXPORT(sqInt) primitiveMPEG3VideoHeight(void);\nEXPORT(sqInt) primitiveMPEG3VideoWidth(void);\nstatic sqInt removeFileEntry(mpeg3_t *  aMpegFile);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\nEXPORT(sqInt) shutdownModule(void);\nstatic void sqAssert(sqInt aBool);\n\n\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic sqInt maximumNumberOfFilesToWatch;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"Mpeg3Plugin VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"Mpeg3Plugin VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\nstatic mpeg3_t *mpegFiles[1024+1];\n\n\nstatic sqInt\ncheckFileEntry(mpeg3_t *  aMpegFile)\n{\n\tsqInt i;\n\n\tfor (i = 1; i <= maximumNumberOfFilesToWatch; i += 1) {\n\t\tif ((mpegFiles[i]) == aMpegFile) {\n\t\t\treturn 1;\n\t\t}\n\t}\n\treturn 0;\n}\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nEXPORT(sqInt)\ninitialiseModule(void)\n{\n\tsqInt i;\n\n\tmaximumNumberOfFilesToWatch = 1024;\n\tfor (i = 1; i <= maximumNumberOfFilesToWatch; i += 1) {\n\t\tmpegFiles[i] = 0;\n\t}\n\treturn true;\n}\n\nstatic sqInt\nmakeFileEntry(mpeg3_t *  aMpegFile)\n{\n\tsqInt i;\n\n\tfor (i = 1; i <= maximumNumberOfFilesToWatch; i += 1) {\n\t\tif ((mpegFiles[i]) == 0) {\n\t\t\tmpegFiles[i] = aMpegFile;\n\t\t\treturn 1;\n\t\t}\n\t}\n\treturn 0;\n}\n\n\n/*\tReturn a pointer to the first byte of of the mpeg3_t record within the \n\tgiven Smalltalk object, or nil if socketOop is not a mpeg3_t record. */\n\nstatic mpeg3_t *\nmpeg3tValueOf(sqInt mpeg3tHandle)\n{\n\tsqInt check;\n\tmpeg3_t **  index;\n\n\tinterpreterProxy->success((interpreterProxy->isBytes(mpeg3tHandle))\n\t && ((interpreterProxy->byteSizeOf(mpeg3tHandle)) == 4));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\telse {\n\t\tindex = ((mpeg3_t **) (interpreterProxy->firstIndexableField(mpeg3tHandle)));\n\t\tcheck = checkFileEntry(*index);\n\t\tif (check == 0) {\n\t\t\treturn null;\n\t\t}\n\t\treturn *index;\n\t}\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\n\n/*\tint mpeg3_audio_channels(mpeg3_t *file,int stream) */\n\nEXPORT(sqInt)\nprimitiveMPEG3AudioChannels(void)\n{\n\tsqInt aNumber;\n\tmpeg3_t *  file;\n\tsqInt fileHandle;\n\tsqInt result;\n\tsqInt _return_value;\n\n\tfileHandle = interpreterProxy->stackValue(1);\n\taNumber = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfile = mpeg3tValueOf(fileHandle);\n\tif (file == null) {\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, 0);\n\t\treturn null;\n\t}\n\tif (aNumber < 0) {\n\t\tinterpreterProxy->success(0);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, 0);\n\t\treturn null;\n\t}\n\tif (aNumber >= (mpeg3_total_astreams(file))) {\n\t\tinterpreterProxy->success(0);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, 0);\n\t\treturn null;\n\t}\n\tresult = mpeg3_audio_channels(file,aNumber);\n\t_return_value = interpreterProxy->integerObjectOf(result);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(3, _return_value);\n\treturn null;\n}\n\n\n/*\tlong mpeg3_audio_samples(mpeg3_t *file, int stream) */\n\nEXPORT(sqInt)\nprimitiveMPEG3AudioSamples(void)\n{\n\tsqInt aNumber;\n\tmpeg3_t *  file;\n\tsqInt fileHandle;\n\tsqInt result;\n\tsqInt _return_value;\n\n\tfileHandle = interpreterProxy->stackValue(1);\n\taNumber = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfile = mpeg3tValueOf(fileHandle);\n\tif (file == null) {\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, 0);\n\t\treturn null;\n\t}\n\tif (aNumber < 0) {\n\t\tinterpreterProxy->success(0);\n\t\treturn null;\n\t}\n\tif (aNumber >= (mpeg3_total_astreams(file))) {\n\t\tinterpreterProxy->success(0);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, 0);\n\t\treturn null;\n\t}\n\tresult = mpeg3_audio_samples(file,aNumber);\n\t_return_value = interpreterProxy->floatObjectOf(result);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(3, _return_value);\n\treturn null;\n}\n\n\n/*\tint mpeg3_check_sig(char *path) */\n\nEXPORT(sqInt)\nprimitiveMPEG3CheckSig(void)\n{\n\tchar *path;\n\tsqInt result;\n\tchar storage[1024] ;\n\tsqInt sz;\n\tsqInt _return_value;\n\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\n\tpath = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tsz = interpreterProxy->byteSizeOf(((sqInt)(long)(path) - 4));\n\tsqFilenameFromStringOpen(storage, path, sz);\n\tresult = mpeg3_check_sig(storage);\n\t_return_value = (result? interpreterProxy->trueObject(): interpreterProxy->falseObject());\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\n\n/*\tint mpeg3_close(mpeg3_t *file) */\n\nEXPORT(sqInt)\nprimitiveMPEG3Close(void)\n{\n\tmpeg3_t *  file;\n\tsqInt fileHandle;\n\tmpeg3_t **  index;\n\n\tfileHandle = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfile = mpeg3tValueOf(fileHandle);\n\tif (file == null) {\n\t\treturn null;\n\t}\n\tremoveFileEntry(file); mpeg3_close(file);\n\tindex = ((mpeg3_t **) (interpreterProxy->firstIndexableField(fileHandle)));\n\t*index = 0;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(1);\n\treturn null;\n}\n\n\n/*\tint mpeg3_drop_frames(mpeg3_t *file, long frames, int stream) */\n\nEXPORT(sqInt)\nprimitiveMPEG3DropFrames(void)\n{\n\tsqInt aFrameNumber;\n\tsqInt aNumber;\n\tmpeg3_t *  file;\n\tsqInt fileHandle;\n\tsqInt result;\n\tsqInt _return_value;\n\n\tfileHandle = interpreterProxy->stackValue(2);\n\taFrameNumber = interpreterProxy->stackIntegerValue(1);\n\taNumber = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfile = mpeg3tValueOf(fileHandle);\n\tif (file == null) {\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(4, 0);\n\t\treturn null;\n\t}\n\tif (aNumber < 0) {\n\t\tinterpreterProxy->success(0);\n\t\treturn null;\n\t}\n\tif (aNumber >= (result = mpeg3_total_vstreams(file))) {\n\t\tinterpreterProxy->success(0);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(4, 0);\n\t\treturn null;\n\t}\n\tresult = mpeg3_drop_frames(file,aFrameNumber,aNumber);\n\t_return_value = interpreterProxy->integerObjectOf(result);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(4, _return_value);\n\treturn null;\n}\n\n\n/*\tint mpeg3_end_of_audio(mpeg3_t *file, int stream) */\n\nEXPORT(sqInt)\nprimitiveMPEG3EndOfAudio(void)\n{\n\tsqInt aNumber;\n\tmpeg3_t *  file;\n\tsqInt fileHandle;\n\tsqInt result;\n\tsqInt _return_value;\n\n\tfileHandle = interpreterProxy->stackValue(1);\n\taNumber = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfile = mpeg3tValueOf(fileHandle);\n\tif (file == null) {\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, 0);\n\t\treturn null;\n\t}\n\tif (aNumber < 0) {\n\t\tinterpreterProxy->success(0);\n\t\treturn null;\n\t}\n\tif (aNumber >= (result = mpeg3_total_astreams(file))) {\n\t\tinterpreterProxy->success(0);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, 0);\n\t\treturn null;\n\t}\n\tresult = mpeg3_end_of_audio(file,aNumber);\n\t_return_value = (result? interpreterProxy->trueObject(): interpreterProxy->falseObject());\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(3, _return_value);\n\treturn null;\n}\n\n\n/*\tint mpeg3_end_of_video(mpeg3_t *file, int stream) */\n\nEXPORT(sqInt)\nprimitiveMPEG3EndOfVideo(void)\n{\n\tsqInt aNumber;\n\tmpeg3_t *file;\n\tsqInt fileHandle;\n\tsqInt result;\n\tsqInt _return_value;\n\n\tfileHandle = interpreterProxy->stackValue(1);\n\taNumber = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfile = mpeg3tValueOf(fileHandle);\n\tif (file == null) {\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, 0);\n\t\treturn null;\n\t}\n\tif (aNumber < 0) {\n\t\tinterpreterProxy->success(0);\n\t\treturn null;\n\t}\n\tif (aNumber >= (result = mpeg3_total_vstreams(file))) {\n\t\tinterpreterProxy->success(0);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, 0);\n\t\treturn null;\n\t}\n\tresult = mpeg3_end_of_video(file,aNumber);\n\t_return_value = (result? interpreterProxy->trueObject(): interpreterProxy->falseObject());\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(3, _return_value);\n\treturn null;\n}\n\n\n/*\tfloat mpeg3_frame_rate(mpeg3_t *file, int stream) */\n\nEXPORT(sqInt)\nprimitiveMPEG3FrameRate(void)\n{\n\tsqInt aNumber;\n\tmpeg3_t *  file;\n\tsqInt fileHandle;\n\tdouble  result;\n\tsqInt _return_value;\n\n\tfileHandle = interpreterProxy->stackValue(1);\n\taNumber = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfile = mpeg3tValueOf(fileHandle);\n\tif (file == null) {\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, 0);\n\t\treturn null;\n\t}\n\tif (aNumber < 0) {\n\t\tinterpreterProxy->success(0);\n\t\treturn null;\n\t}\n\tif (aNumber >= (result = mpeg3_total_vstreams(file))) {\n\t\tinterpreterProxy->success(0);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, 0);\n\t\treturn null;\n\t}\n\tresult =  mpeg3_frame_rate(file,aNumber);\n\t_return_value = interpreterProxy->floatObjectOf(result);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(3, _return_value);\n\treturn null;\n}\n\n\n/*\tint mpeg3_generate_toc_for_Squeak(FILE *output, char *path, int\n\ttimecode_search, int print_streams, char *buffer)\n */\n\nEXPORT(sqInt)\nprimitiveMPEG3GenerateToc(void)\n{\n\tchar *aString;\n\tsqInt bufferSize;\n\tmpeg3_t *  file;\n\tsqInt fileHandle;\n\tsqInt streams;\n\tsqInt timecode;\n\n\tfileHandle = interpreterProxy->stackValue(3);\n\ttimecode = interpreterProxy->stackIntegerValue(2);\n\tstreams = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(1));\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\n\taString = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfile = mpeg3tValueOf(fileHandle);\n\tif (file == null) {\n\t\treturn null;\n\t}\n\tbufferSize = interpreterProxy->slotSizeOf(interpreterProxy->stackValue(0));\n\tmpeg3_generate_toc_for_Squeak(file,timecode,streams,aString,bufferSize);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(4);\n\treturn null;\n}\n\n\n/*\tlong mpeg3_get_frame(mpeg3_t *file,int stream) */\n\nEXPORT(sqInt)\nprimitiveMPEG3GetFrame(void)\n{\n\tsqInt aNumber;\n\tmpeg3_t *  file;\n\tsqInt fileHandle;\n\tsqInt result;\n\tsqInt _return_value;\n\n\tfileHandle = interpreterProxy->stackValue(1);\n\taNumber = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfile = mpeg3tValueOf(fileHandle);\n\tif (file == null) {\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, 0);\n\t\treturn null;\n\t}\n\tif (aNumber < 0) {\n\t\tinterpreterProxy->success(0);\n\t\treturn null;\n\t}\n\tif (aNumber >= (result = mpeg3_total_vstreams(file))) {\n\t\tinterpreterProxy->success(0);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, 0);\n\t\treturn null;\n\t}\n\tresult = mpeg3_get_frame(file,aNumber);\n\t_return_value = interpreterProxy->floatObjectOf(result);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(3, _return_value);\n\treturn null;\n}\n\n\n/*\tint mpeg3_video_width(mpeg3_t *file, int stream) */\n\nEXPORT(sqInt)\nprimitiveMPEG3GetSample(void)\n{\n\tsqInt aNumber;\n\tmpeg3_t *  file;\n\tsqInt fileHandle;\n\tsqInt result;\n\tsqInt _return_value;\n\n\tfileHandle = interpreterProxy->stackValue(1);\n\taNumber = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfile = mpeg3tValueOf(fileHandle);\n\tif (file == null) {\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, 0);\n\t\treturn null;\n\t}\n\tif (aNumber < 0) {\n\t\tinterpreterProxy->success(0);\n\t\treturn null;\n\t}\n\tif (aNumber >= (result = mpeg3_total_astreams(file))) {\n\t\tinterpreterProxy->success(0);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, 0);\n\t\treturn null;\n\t}\n\tresult = mpeg3_get_sample(file,aNumber);\n\t_return_value = interpreterProxy->floatObjectOf(result);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(3, _return_value);\n\treturn null;\n}\n\n\n/*\tdouble mpeg3_get_time(mpeg3_t *file) */\n\nEXPORT(sqInt)\nprimitiveMPEG3GetTime(void)\n{\n\tmpeg3_t *  file;\n\tsqInt fileHandle;\n\tdouble  result;\n\tsqInt _return_value;\n\n\tfileHandle = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfile = mpeg3tValueOf(fileHandle);\n\tif (file == null) {\n\t\treturn null;\n\t}\n\tresult = mpeg3_get_time(file);\n\t_return_value = interpreterProxy->floatObjectOf(result);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\n\n/*\tint mpeg3_has_audio(mpeg3_t *file) */\n\nEXPORT(sqInt)\nprimitiveMPEG3HasAudio(void)\n{\n\tmpeg3_t *  file;\n\tsqInt fileHandle;\n\tsqInt result;\n\tsqInt _return_value;\n\n\tfileHandle = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfile = mpeg3tValueOf(fileHandle);\n\tif (file == null) {\n\t\treturn null;\n\t}\n\tresult = mpeg3_has_audio(file);\n\t_return_value = (result? interpreterProxy->trueObject(): interpreterProxy->falseObject());\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\n\n/*\tint mpeg3_has_video(mpeg3_t *file) */\n\nEXPORT(sqInt)\nprimitiveMPEG3HasVideo(void)\n{\n\tmpeg3_t *  file;\n\tsqInt fileHandle;\n\tsqInt result;\n\tsqInt _return_value;\n\n\tfileHandle = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfile = mpeg3tValueOf(fileHandle);\n\tif (file == null) {\n\t\treturn null;\n\t}\n\tresult = mpeg3_has_video(file);\n\t_return_value = (result? interpreterProxy->trueObject(): interpreterProxy->falseObject());\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\n\n/*\tmpeg3_t* mpeg3_open(char *path) */\n\nEXPORT(sqInt)\nprimitiveMPEG3Open(void)\n{\n\tmpeg3_t ** index;\n\tsqInt mpeg3Oop;\n\tchar *path;\n\tchar storage[1024];\n\tsqInt sz;\n\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\n\tpath = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tsz = interpreterProxy->byteSizeOf(((sqInt)(long)(path) - 4));\n\tsqFilenameFromStringOpen(storage, path, sz);\n\tmpeg3Oop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), 4);\n\tindex = ((mpeg3_t **) (interpreterProxy->firstIndexableField(mpeg3Oop)));\n\t*index = mpeg3_open(storage,0); makeFileEntry(*index);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, mpeg3Oop);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveMPEG3OpenABuffer(void)\n{\n\tmpeg3_t ** index;\n\tsqInt mpeg3Oop;\n\tchar *path;\n\tsqInt size;\n\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(1)));\n\tpath = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(1))));\n\tsize = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tmpeg3Oop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), 4);\n\tindex = ((mpeg3_t **) (interpreterProxy->firstIndexableField(mpeg3Oop)));\n\t*index = mpeg3_open(path,size); makeFileEntry(*index);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(3, mpeg3Oop);\n\treturn null;\n}\n\n\n/*\tint mpeg3_previous_frame(mpeg3_t *file, int stream) */\n\nEXPORT(sqInt)\nprimitiveMPEG3PreviousFrame(void)\n{\n\tsqInt aNumber;\n\tmpeg3_t *  file;\n\tsqInt fileHandle;\n\tsqInt result;\n\tsqInt _return_value;\n\n\tfileHandle = interpreterProxy->stackValue(1);\n\taNumber = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfile = mpeg3tValueOf(fileHandle);\n\tif (aNumber < 0) {\n\t\tinterpreterProxy->success(0);\n\t\treturn null;\n\t}\n\tif (file == null) {\n\t\treturn null;\n\t}\n\tif (aNumber >= (result = mpeg3_total_vstreams(file))) {\n\t\tinterpreterProxy->success(0);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, 0);\n\t\treturn null;\n\t}\n\tresult = mpeg3_previous_frame(file,aNumber);\n\t_return_value = interpreterProxy->integerObjectOf(result);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(3, _return_value);\n\treturn null;\n}\n\n\n/*\tint mpeg3_read_audio(mpeg3_t *file, \n\tfloat *output_f, \n\tshort *output_i, \n\tint channel, \n\tlong samples,\n\tint stream) */\n\nEXPORT(sqInt)\nprimitiveMPEG3ReadAudio(void)\n{\n\tsqInt aChannelNumber;\n\tsqInt aNumber;\n\tsqInt *anArray;\n\tshort *  arrayBase;\n\tsqInt aSampleNumber;\n\tmpeg3_t *  file;\n\tsqInt fileHandle;\n\tsqInt result;\n\tsqInt _return_value;\n\n\tfileHandle = interpreterProxy->stackValue(4);\n\tinterpreterProxy->success(interpreterProxy->isIndexable(interpreterProxy->stackValue(3)));\n\tanArray = ((int *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(3))));\n\taChannelNumber = interpreterProxy->stackIntegerValue(2);\n\taSampleNumber = interpreterProxy->stackIntegerValue(1);\n\taNumber = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfile = mpeg3tValueOf(fileHandle);\n\tif (file == null) {\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(6, 0);\n\t\treturn null;\n\t}\n\tif (aNumber < 0) {\n\t\tinterpreterProxy->success(0);\n\t\treturn null;\n\t}\n\tif (aNumber >= (result = mpeg3_total_astreams(file))) {\n\t\tinterpreterProxy->success(0);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(6, 0);\n\t\treturn null;\n\t}\n\tarrayBase = ((short *) anArray);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = mpeg3_read_audio(file,(float *) NULL,arrayBase,aChannelNumber,aSampleNumber,aNumber);\n\t_return_value = interpreterProxy->integerObjectOf(result);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(6, _return_value);\n\treturn null;\n}\n\n\n/*\tint mpeg3_read_frame(mpeg3_t *file, \n\tunsigned char **output_rows, \n\tint in_x, \n\tint in_y, \n\tint in_w, \n\tint in_h, \n\tint out_w, \n\tint out_h, \n\tint color_model,\n\tint stream) */\n\nEXPORT(sqInt)\nprimitiveMPEG3ReadFrame(void)\n{\n\tusqInt *aBuffer;\n\tsqInt aByteNumber;\n\tsqInt aNumber;\n\tunsigned char *bufferBaseAddr;\n\tmpeg3_t *  file;\n\tsqInt fileHandle;\n\tsqInt height;\n\tsqInt i;\n\tsqInt model;\n\tsqInt outHeight;\n\tunsigned char  **  outputRowsPtr;\n\tsqInt outWidth;\n\tsqInt result;\n\tsqInt width;\n\tsqInt xNumber;\n\tsqInt yNumber;\n\tsqInt _return_value;\n\n\tfileHandle = interpreterProxy->stackValue(10);\n\tinterpreterProxy->success(interpreterProxy->isWords(interpreterProxy->stackValue(9)));\n\taBuffer = ((unsigned *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(9))));\n\txNumber = interpreterProxy->stackIntegerValue(8);\n\tyNumber = interpreterProxy->stackIntegerValue(7);\n\twidth = interpreterProxy->stackIntegerValue(6);\n\theight = interpreterProxy->stackIntegerValue(5);\n\toutWidth = interpreterProxy->stackIntegerValue(4);\n\toutHeight = interpreterProxy->stackIntegerValue(3);\n\tmodel = interpreterProxy->stackIntegerValue(2);\n\taNumber = interpreterProxy->stackIntegerValue(1);\n\taByteNumber = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfile = mpeg3tValueOf(fileHandle);\n\tif (file == null) {\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(12, 0);\n\t\treturn null;\n\t}\n\tif (aNumber < 0) {\n\t\tinterpreterProxy->success(0);\n\t\treturn null;\n\t}\n\tif (aNumber >= (result = mpeg3_total_vstreams(file))) {\n\t\tinterpreterProxy->success(0);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(12, 0);\n\t\treturn null;\n\t}\n\tbufferBaseAddr = ((unsigned char *) aBuffer);\n\toutputRowsPtr = (unsigned char **) memoryAllocate(1,sizeof(unsigned char*) * outHeight);\n\tfor (i = 0; i <= (outHeight - 1); i += 1) {\n\t\toutputRowsPtr[i] = (bufferBaseAddr + (aByteNumber * i));\n\t}\n\tresult = mpeg3_read_frame(file,outputRowsPtr,xNumber,yNumber,width,height,outWidth,outHeight,model,aNumber);\n\tmemoryFree(outputRowsPtr);\n\t_return_value = interpreterProxy->integerObjectOf(result);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(12, _return_value);\n\treturn null;\n}\n\n\n/*\tint mpeg3_read_frame(mpeg3_t *file, \n\tunsigned char **output_rows, \n\tint in_x, \n\tint in_y, \n\tint in_w, \n\tint in_h, \n\tint out_w, \n\tint out_h, \n\tint color_model,\n\tint stream) */\n\nEXPORT(sqInt)\nprimitiveMPEG3ReadFrameBufferOffset(void)\n{\n\tusqInt *aBuffer;\n\tsqInt aBufferOffset;\n\tsqInt aByteNumber;\n\tsqInt aNumber;\n\tunsigned char *bufferBaseAddr;\n\tmpeg3_t * file;\n\tsqInt fileHandle;\n\tsqInt height;\n\tsqInt i;\n\tsqInt model;\n\tsqInt outHeight;\n\tunsigned char  ** outputRowsPtr;\n\tsqInt outWidth;\n\tsqInt result;\n\tsqInt width;\n\tsqInt xNumber;\n\tsqInt yNumber;\n\tsqInt _return_value;\n\n\tfileHandle = interpreterProxy->stackValue(11);\n\tinterpreterProxy->success(interpreterProxy->isWords(interpreterProxy->stackValue(10)));\n\taBuffer = ((unsigned *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(10))));\n\taBufferOffset = interpreterProxy->stackIntegerValue(9);\n\txNumber = interpreterProxy->stackIntegerValue(8);\n\tyNumber = interpreterProxy->stackIntegerValue(7);\n\twidth = interpreterProxy->stackIntegerValue(6);\n\theight = interpreterProxy->stackIntegerValue(5);\n\toutWidth = interpreterProxy->stackIntegerValue(4);\n\toutHeight = interpreterProxy->stackIntegerValue(3);\n\tmodel = interpreterProxy->stackIntegerValue(2);\n\taNumber = interpreterProxy->stackIntegerValue(1);\n\taByteNumber = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfile = mpeg3tValueOf(fileHandle);\n\tif (file == null) {\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(13, 0);\n\t\treturn null;\n\t}\n\tif (aNumber < 0) {\n\t\tinterpreterProxy->success(0);\n\t\treturn null;\n\t}\n\tif (aNumber >= (result = mpeg3_total_vstreams(file))) {\n\t\tinterpreterProxy->success(0);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(13, 0);\n\t\treturn null;\n\t}\n\tbufferBaseAddr = ((unsigned char *) aBuffer);\n\toutputRowsPtr = (unsigned char **) memoryAllocate(1,sizeof(unsigned char*) * outHeight);\n\tfor (i = 0; i <= (outHeight - 1); i += 1) {\n\t\toutputRowsPtr[i] = ((bufferBaseAddr + aBufferOffset) + (aByteNumber * i));\n\t}\n\tresult = mpeg3_read_frame(file,outputRowsPtr,xNumber,yNumber,width,height,outWidth,outHeight,model,aNumber);\n\tmemoryFree(outputRowsPtr);\n\t_return_value = interpreterProxy->integerObjectOf(result);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(13, _return_value);\n\treturn null;\n}\n\n\n/*\tint mpeg3_reread_audio(mpeg3_t *file, \n\tfloat *output_f, \n\tshort *output_i, \n\tint channel, \n\tlong samples,\n\tint stream) */\n\nEXPORT(sqInt)\nprimitiveMPEG3ReReadAudio(void)\n{\n\tsqInt aChannelNumber;\n\tsqInt aNumber;\n\tsqInt *anArray;\n\tshort *  arrayBase;\n\tsqInt aSampleNumber;\n\tmpeg3_t *  file;\n\tsqInt fileHandle;\n\tsqInt result;\n\tsqInt _return_value;\n\n\tfileHandle = interpreterProxy->stackValue(4);\n\tinterpreterProxy->success(interpreterProxy->isIndexable(interpreterProxy->stackValue(3)));\n\tanArray = ((int *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(3))));\n\taChannelNumber = interpreterProxy->stackIntegerValue(2);\n\taSampleNumber = interpreterProxy->stackIntegerValue(1);\n\taNumber = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfile = mpeg3tValueOf(fileHandle);\n\tif (file == null) {\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(6, 0);\n\t\treturn null;\n\t}\n\tif (aNumber < 0) {\n\t\tinterpreterProxy->success(0);\n\t\treturn null;\n\t}\n\tif (aNumber >= (result = mpeg3_total_astreams(file))) {\n\t\tinterpreterProxy->success(0);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(6, 0);\n\t\treturn null;\n\t}\n\tarrayBase = ((short *) anArray);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = mpeg3_reread_audio(file,(float *) NULL,arrayBase,aChannelNumber,aSampleNumber,aNumber);\n\t_return_value = interpreterProxy->integerObjectOf(result);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(6, _return_value);\n\treturn null;\n}\n\n\n/*\tint mpeg3_sample_rate(mpeg3_t *file,int stream) */\n\nEXPORT(sqInt)\nprimitiveMPEG3SampleRate(void)\n{\n\tsqInt aNumber;\n\tmpeg3_t *  file;\n\tsqInt fileHandle;\n\tsqInt result;\n\tsqInt _return_value;\n\n\tfileHandle = interpreterProxy->stackValue(1);\n\taNumber = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfile = mpeg3tValueOf(fileHandle);\n\tif (file == null) {\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, 0);\n\t\treturn null;\n\t}\n\tif (aNumber < 0) {\n\t\tinterpreterProxy->success(0);\n\t\treturn null;\n\t}\n\tif (aNumber >= (result = mpeg3_total_astreams(file))) {\n\t\tinterpreterProxy->success(0);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, 0);\n\t\treturn null;\n\t}\n\tresult = mpeg3_sample_rate(file,aNumber);\n\t_return_value = interpreterProxy->integerObjectOf(result);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(3, _return_value);\n\treturn null;\n}\n\n\n/*\tint mpeg3_seek_percentage(mpeg3_t *file, double percentage) */\n\nEXPORT(sqInt)\nprimitiveMPEG3SeekPercentage(void)\n{\n\tdouble aNumber;\n\tmpeg3_t *  file;\n\tsqInt fileHandle;\n\tsqInt result;\n\tsqInt _return_value;\n\n\tfileHandle = interpreterProxy->stackValue(1);\n\taNumber = interpreterProxy->stackFloatValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfile = mpeg3tValueOf(fileHandle);\n\tif (aNumber < 0.0) {\n\t\tinterpreterProxy->success(0);\n\t\treturn null;\n\t}\n\tif (aNumber > 1.0) {\n\t\tinterpreterProxy->success(0);\n\t\treturn null;\n\t}\n\tif (file == null) {\n\t\treturn null;\n\t}\n\tresult = mpeg3_seek_percentage(file,aNumber);\n\t_return_value = interpreterProxy->integerObjectOf(result);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(3, _return_value);\n\treturn null;\n}\n\n\n/*\tint mpeg3_set_cpus(mpeg3_t *file, int cpus) */\n\nEXPORT(sqInt)\nprimitiveMPEG3SetCpus(void)\n{\n\tsqInt cpus;\n\tmpeg3_t *  file;\n\tsqInt fileHandle;\n\n\tfileHandle = interpreterProxy->stackValue(1);\n\tcpus = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfile = mpeg3tValueOf(fileHandle);\n\tif (cpus < 0) {\n\t\tinterpreterProxy->success(0);\n\t\treturn null;\n\t}\n\tif (file == null) {\n\t\treturn null;\n\t}\n\tmpeg3_set_cpus(file,cpus);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(2);\n\treturn null;\n}\n\n\n/*\tint mpeg3_set_frame(mpeg3_t *file, long frame, int stream) */\n\nEXPORT(sqInt)\nprimitiveMPEG3SetFrame(void)\n{\n\tdouble aFrameNumber;\n\tsqInt aNumber;\n\tmpeg3_t *  file;\n\tsqInt fileHandle;\n\tsqInt result;\n\tsqInt _return_value;\n\n\tfileHandle = interpreterProxy->stackValue(2);\n\taFrameNumber = interpreterProxy->stackFloatValue(1);\n\taNumber = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfile = mpeg3tValueOf(fileHandle);\n\tif (file == null) {\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(4, 0);\n\t\treturn null;\n\t}\n\tif (aNumber < 0) {\n\t\tinterpreterProxy->success(0);\n\t\treturn null;\n\t}\n\tif (aNumber >= (result = mpeg3_total_vstreams(file))) {\n\t\tinterpreterProxy->success(0);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(4, 0);\n\t\treturn null;\n\t}\n\tresult = mpeg3_set_frame(file,(long) aFrameNumber,aNumber);\n\t_return_value = interpreterProxy->integerObjectOf(result);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(4, _return_value);\n\treturn null;\n}\n\n\n/*\tint mpeg3_set_mmx(mpeg3_t *file, int use_mmx) */\n\nEXPORT(sqInt)\nprimitiveMPEG3SetMmx(void)\n{\n\tmpeg3_t *  file;\n\tsqInt fileHandle;\n\tsqInt mmx;\n\n\tfileHandle = interpreterProxy->stackValue(1);\n\tmmx = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(0));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfile = mpeg3tValueOf(fileHandle);\n\tif (file == null) {\n\t\treturn null;\n\t}\n\tmpeg3_set_mmx(file,mmx);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(2);\n\treturn null;\n}\n\n\n/*\tint mpeg3_set_sample(mpeg3_t *file, long sample, int stream) */\n\nEXPORT(sqInt)\nprimitiveMPEG3SetSample(void)\n{\n\tsqInt aNumber;\n\tdouble aSampleNumber;\n\tmpeg3_t *  file;\n\tsqInt fileHandle;\n\tsqInt result;\n\tsqInt _return_value;\n\n\tfileHandle = interpreterProxy->stackValue(2);\n\taSampleNumber = interpreterProxy->stackFloatValue(1);\n\taNumber = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfile = mpeg3tValueOf(fileHandle);\n\tif (file == null) {\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(4, 0);\n\t\treturn null;\n\t}\n\tif (aNumber < 0) {\n\t\tinterpreterProxy->success(0);\n\t\treturn null;\n\t}\n\tif (aNumber >= (result = mpeg3_total_astreams(file))) {\n\t\tinterpreterProxy->success(0);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(4, 0);\n\t\treturn null;\n\t}\n\tif (aSampleNumber < 0) {\n\t\tinterpreterProxy->success(0);\n\t\treturn null;\n\t}\n\tresult = mpeg3_set_sample(file,aSampleNumber,aNumber);\n\t_return_value = interpreterProxy->integerObjectOf(result);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(4, _return_value);\n\treturn null;\n}\n\n\n/*\tdouble mpeg3_tell_percentage(mpeg3_t *file) */\n\nEXPORT(sqInt)\nprimitiveMPEG3TellPercentage(void)\n{\n\tmpeg3_t *  file;\n\tsqInt fileHandle;\n\tdouble  result;\n\tsqInt _return_value;\n\n\tfileHandle = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfile = mpeg3tValueOf(fileHandle);\n\tif (file == null) {\n\t\treturn null;\n\t}\n\tresult = mpeg3_tell_percentage(file);\n\t_return_value = interpreterProxy->floatObjectOf(result);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\n\n/*\tint mpeg3_total_astreams(mpeg3_t *file) */\n\nEXPORT(sqInt)\nprimitiveMPEG3TotalAStreams(void)\n{\n\tmpeg3_t *  file;\n\tsqInt fileHandle;\n\tsqInt result;\n\tsqInt _return_value;\n\n\tfileHandle = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfile = mpeg3tValueOf(fileHandle);\n\tif (file == null) {\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(2, 0);\n\t\treturn null;\n\t}\n\tresult = mpeg3_total_astreams(file);\n\t_return_value = interpreterProxy->integerObjectOf(result);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\n\n/*\tint mpeg3_total_vstreams(mpeg3_t *file) */\n\nEXPORT(sqInt)\nprimitiveMPEG3TotalVStreams(void)\n{\n\tmpeg3_t *  file;\n\tsqInt fileHandle;\n\tsqInt result;\n\tsqInt _return_value;\n\n\tfileHandle = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfile = mpeg3tValueOf(fileHandle);\n\tif (file == null) {\n\t\treturn null;\n\t}\n\tresult = mpeg3_total_vstreams(file);\n\t_return_value = interpreterProxy->integerObjectOf(result);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\n\n/*\tlong mpeg3_video_frames(mpeg3_t *file, int stream) */\n\nEXPORT(sqInt)\nprimitiveMPEG3VideoFrames(void)\n{\n\tsqInt aNumber;\n\tmpeg3_t *  file;\n\tsqInt fileHandle;\n\tsqInt result;\n\tsqInt _return_value;\n\n\tfileHandle = interpreterProxy->stackValue(1);\n\taNumber = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfile = mpeg3tValueOf(fileHandle);\n\tif (file == null) {\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, 0);\n\t\treturn null;\n\t}\n\tif (aNumber < 0) {\n\t\tinterpreterProxy->success(0);\n\t\treturn null;\n\t}\n\tif (aNumber >= (result = mpeg3_total_vstreams(file))) {\n\t\tinterpreterProxy->success(0);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, 0);\n\t\treturn null;\n\t}\n\tresult = mpeg3_video_frames(file,aNumber);\n\t_return_value = interpreterProxy->floatObjectOf(result);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(3, _return_value);\n\treturn null;\n}\n\n\n/*\tint mpeg3_video_height(mpeg3_t *file,int stream) */\n\nEXPORT(sqInt)\nprimitiveMPEG3VideoHeight(void)\n{\n\tsqInt aNumber;\n\tmpeg3_t *  file;\n\tsqInt fileHandle;\n\tsqInt result;\n\tsqInt _return_value;\n\n\tfileHandle = interpreterProxy->stackValue(1);\n\taNumber = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfile = mpeg3tValueOf(fileHandle);\n\tif (file == null) {\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, 0);\n\t\treturn null;\n\t}\n\tif (aNumber < 0) {\n\t\tinterpreterProxy->success(0);\n\t\treturn null;\n\t}\n\tif (aNumber >= (result = mpeg3_total_vstreams(file))) {\n\t\tinterpreterProxy->success(0);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, 0);\n\t\treturn null;\n\t}\n\tresult = mpeg3_video_height(file,aNumber);\n\t_return_value = interpreterProxy->integerObjectOf(result);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(3, _return_value);\n\treturn null;\n}\n\n\n/*\tint mpeg3_video_width(mpeg3_t *file, int stream) */\n\nEXPORT(sqInt)\nprimitiveMPEG3VideoWidth(void)\n{\n\tsqInt aNumber;\n\tmpeg3_t *  file;\n\tsqInt fileHandle;\n\tsqInt result;\n\tsqInt _return_value;\n\n\tfileHandle = interpreterProxy->stackValue(1);\n\taNumber = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfile = mpeg3tValueOf(fileHandle);\n\tif (file == null) {\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, 0);\n\t\treturn null;\n\t}\n\tif (aNumber < 0) {\n\t\tinterpreterProxy->success(0);\n\t\treturn null;\n\t}\n\tif (aNumber >= (result = mpeg3_total_vstreams(file))) {\n\t\tinterpreterProxy->success(0);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, 0);\n\t\treturn null;\n\t}\n\tresult = mpeg3_video_width(file,aNumber);\n\t_return_value = interpreterProxy->integerObjectOf(result);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(3, _return_value);\n\treturn null;\n}\n\nstatic sqInt\nremoveFileEntry(mpeg3_t *  aMpegFile)\n{\n\tsqInt i;\n\n\tfor (i = 1; i <= maximumNumberOfFilesToWatch; i += 1) {\n\t\tif ((mpegFiles[i]) == aMpegFile) {\n\t\t\tmpegFiles[i] = 0;\n\t\t\treturn 1;\n\t\t}\n\t}\n\treturn 0;\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n\tsqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\nEXPORT(sqInt)\nshutdownModule(void)\n{\n\tsqInt i;\n\n\tfor (i = 1; i <= maximumNumberOfFilesToWatch; i += 1) {\n\t\tif ((mpegFiles[i]) != 0) {\n\t\t\tmpeg3_close(mpegFiles[i]);\n\t\t\tmpegFiles[i] = 0;\n\t\t}\n\t}\n\treturn true;\n}\n\nstatic void\nsqAssert(sqInt aBool)\n{\n\t/* missing DebugCode */;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* Mpeg3Plugin_exports[][3] = {\n\t{\"Mpeg3Plugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"Mpeg3Plugin\", \"initialiseModule\", (void*)initialiseModule},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3AudioChannels\", (void*)primitiveMPEG3AudioChannels},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3AudioSamples\", (void*)primitiveMPEG3AudioSamples},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3CheckSig\", (void*)primitiveMPEG3CheckSig},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3Close\", (void*)primitiveMPEG3Close},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3DropFrames\", (void*)primitiveMPEG3DropFrames},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3EndOfAudio\", (void*)primitiveMPEG3EndOfAudio},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3EndOfVideo\", (void*)primitiveMPEG3EndOfVideo},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3FrameRate\", (void*)primitiveMPEG3FrameRate},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3GenerateToc\", (void*)primitiveMPEG3GenerateToc},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3GetFrame\", (void*)primitiveMPEG3GetFrame},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3GetSample\", (void*)primitiveMPEG3GetSample},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3GetTime\", (void*)primitiveMPEG3GetTime},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3HasAudio\", (void*)primitiveMPEG3HasAudio},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3HasVideo\", (void*)primitiveMPEG3HasVideo},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3Open\", (void*)primitiveMPEG3Open},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3OpenABuffer\", (void*)primitiveMPEG3OpenABuffer},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3PreviousFrame\", (void*)primitiveMPEG3PreviousFrame},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3ReadAudio\", (void*)primitiveMPEG3ReadAudio},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3ReadFrame\", (void*)primitiveMPEG3ReadFrame},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3ReadFrameBufferOffset\", (void*)primitiveMPEG3ReadFrameBufferOffset},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3ReReadAudio\", (void*)primitiveMPEG3ReReadAudio},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3SampleRate\", (void*)primitiveMPEG3SampleRate},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3SeekPercentage\", (void*)primitiveMPEG3SeekPercentage},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3SetCpus\", (void*)primitiveMPEG3SetCpus},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3SetFrame\", (void*)primitiveMPEG3SetFrame},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3SetMmx\", (void*)primitiveMPEG3SetMmx},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3SetSample\", (void*)primitiveMPEG3SetSample},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3TellPercentage\", (void*)primitiveMPEG3TellPercentage},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3TotalAStreams\", (void*)primitiveMPEG3TotalAStreams},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3TotalVStreams\", (void*)primitiveMPEG3TotalVStreams},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3VideoFrames\", (void*)primitiveMPEG3VideoFrames},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3VideoHeight\", (void*)primitiveMPEG3VideoHeight},\n\t{\"Mpeg3Plugin\", \"primitiveMPEG3VideoWidth\", (void*)primitiveMPEG3VideoWidth},\n\t{\"Mpeg3Plugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{\"Mpeg3Plugin\", \"shutdownModule\", (void*)shutdownModule},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/ObjectiveCPlugin/ObjectiveCPlugin.c",
    "content": "/* Automatically generated from Squeak on 8 July 2010 5:52:05 pm \n   by VMMaker 4.2.6\n */\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n#include <Foundation/Foundation.h>\n /* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n# include \"squeak_adapters.h\"\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n/*** Function Prototypes ***/\nstatic VirtualMachine * getInterpreter(void);\n#pragma export on\nEXPORT(const char*) getModuleName(void);\n#pragma export off\nstatic sqInt halt(void);\nstatic sqInt initialiseModule(void);\nstatic sqInt msg(char * s);\n#pragma export on\nEXPORT(sqInt) primitiveCallbackLeave(void);\nEXPORT(sqInt) primitiveGetAddressFromEntryPointString(void);\nEXPORT(sqInt) primitiveGetAutoReleasePool(void);\nEXPORT(sqInt) primitiveGetClass(void);\nEXPORT(sqInt) primitiveGetDescription(void);\nEXPORT(sqInt) primitiveGetMethodSignatureForSelector(void);\nEXPORT(sqInt) primitiveGetNSStringForString(void);\nEXPORT(sqInt) primitiveGetObjCClassForString(void);\nEXPORT(sqInt) primitiveGetSelectorForString(void);\nEXPORT(sqInt) primitiveGetSuperClass(void);\nEXPORT(sqInt) primitiveIsEqual(void);\nEXPORT(sqInt) primitiveMethodSignatureGetArgumentType(void);\nEXPORT(sqInt) primitiveMethodSignatureGetMethodReturnLength(void);\nEXPORT(sqInt) primitiveMethodSignatureGetNumberOfArguments(void);\nEXPORT(sqInt) primitiveMethodSignatureGetReturnType(void);\nEXPORT(sqInt) primitiveNSInvocationCalloc(void);\nEXPORT(sqInt) primitiveNSInvocationFree(void);\nEXPORT(sqInt) primitiveNSInvocationGetArgument(void);\nEXPORT(sqInt) primitiveNSInvocationGetCType(void);\nEXPORT(sqInt) primitiveNSInvocationGetCharPointerType(void);\nEXPORT(sqInt) primitiveNSInvocationGetClassType(void);\nEXPORT(sqInt) primitiveNSInvocationGetDoubleType(void);\nEXPORT(sqInt) primitiveNSInvocationGetFloatType(void);\nEXPORT(sqInt) primitiveNSInvocationGetIntType(void);\nEXPORT(sqInt) primitiveNSInvocationGetLongLongType(void);\nEXPORT(sqInt) primitiveNSInvocationGetLongType(void);\nEXPORT(sqInt) primitiveNSInvocationGetObjectType(void);\nEXPORT(sqInt) primitiveNSInvocationGetReturnValue(void);\nEXPORT(sqInt) primitiveNSInvocationGetSelectorType(void);\nEXPORT(sqInt) primitiveNSInvocationGetShortType(void);\nEXPORT(sqInt) primitiveNSInvocationGetStructureType(void);\nEXPORT(sqInt) primitiveNSInvocationMalloc(void);\nEXPORT(sqInt) primitiveNSInvocationSetCType(void);\nEXPORT(sqInt) primitiveNSInvocationSetDoubleType(void);\nEXPORT(sqInt) primitiveNSInvocationSetFloatType(void);\nEXPORT(sqInt) primitiveNSInvocationSetIntType(void);\nEXPORT(sqInt) primitiveNSInvocationSetLongLongType(void);\nEXPORT(sqInt) primitiveNSInvocationSetLongType(void);\nEXPORT(sqInt) primitiveNSInvocationSetPointerType(void);\nEXPORT(sqInt) primitiveNSInvocationSetRetained(void);\nEXPORT(sqInt) primitiveNSInvocationSetSelector(void);\nEXPORT(sqInt) primitiveNSInvocationSetShortType(void);\nEXPORT(sqInt) primitiveNSInvocationSetStringType(void);\nEXPORT(sqInt) primitiveNSInvocationSetStructureType(void);\nEXPORT(sqInt) primitiveNSInvocationSetVoidPointerType(void);\nEXPORT(sqInt) primitiveNSInvocationWithMethodSignature(void);\nEXPORT(sqInt) primitiveNSLog(void);\nEXPORT(sqInt) primitiveNSStringToUTF8(void);\nEXPORT(sqInt) primitivePerformSelector(void);\nEXPORT(sqInt) primitivePerformSelectorOnMainThreadWithWaitTilDone(void);\nEXPORT(sqInt) primitivePerformSelectorWith(void);\nEXPORT(sqInt) primitivePerformSelectorWithWith(void);\nEXPORT(sqInt) primitiveSELGetName(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine* anInterpreter);\n#pragma export off\nstatic sqInt shutdownModule(void);\nstatic sqInt sqAssert(sqInt aBool);\nstatic sqInt stringFromCString(const char * aCString);\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"ObjectiveCPlugin 8 July 2010 (i)\"\n#else\n\t\"ObjectiveCPlugin 8 July 2010 (e)\"\n#endif\n;\n\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine * getInterpreter(void) {\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*) getModuleName(void) {\n\treturn moduleName;\n}\n\nstatic sqInt halt(void) {\n\t;\n}\n\n\n/*\tInitialise the module */\n\nstatic sqInt initialiseModule(void) {\n\treturn 1;\n}\n\nstatic sqInt msg(char * s) {\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n}\n\nEXPORT(sqInt) primitiveCallbackLeave(void) {\n\tsqInt aNumber;\n\n\taNumber = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (aNumber == 0) {\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->pop(1);\n\t\treturn null;\n\t}\n\t//interpreterProxy->callbackLeave(aNumber);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(1);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveGetAddressFromEntryPointString(void) {\n\tsqInt entryPointNameLength;\n\tvoid * fn;\n\tchar entryPointName[256];\n\tchar *aEntryPointName;\n\tsqInt _return_value;\n\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\n\taEntryPointName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tentryPointNameLength = interpreterProxy->slotSizeOf((oopForPointer( aEntryPointName ) - BASE_HEADER_SIZE));\n\tif (entryPointNameLength > 255) {\n\t\t_return_value = interpreterProxy->positive64BitIntegerFor(0);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(2, _return_value);\n\t\treturn null;\n\t}\n\tstrlcpy(entryPointName, aEntryPointName, entryPointNameLength + 1);\n\tfn = dlsym(-2, entryPointName);\n\t_return_value = interpreterProxy->positive64BitIntegerFor(((usqInt) fn));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveGetAutoReleasePool(void) {\n\tNSAutoreleasePool * pool;\n\tsqInt _return_value;\n\n\tpool = null;\n\t    NS_DURING;\n\tpool = [NSAutoreleasePool new];\n\t    NS_HANDLER \n\t\tpool = nil;;\n\t    NS_ENDHANDLER;\n\t_return_value = interpreterProxy->positive64BitIntegerFor(((usqInt) pool));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveGetClass(void) {\n\tid classOrInstanceObject;\n\tClass classObject;\n\tsqInt aClassOrInstanceOop;\n\tsqInt _return_value;\n\n\taClassOrInstanceOop = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tclassOrInstanceObject = ((id) (interpreterProxy->positive64BitValueOf(aClassOrInstanceOop)));\n\tclassObject = null;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t;\n\t;\n\t    NS_DURING;\n\tclassObject = [classOrInstanceObject class];\n\t    NS_HANDLER \n\t\tclassObject = nil;;\n\t    NS_ENDHANDLER;\n\t_return_value = interpreterProxy->positive64BitIntegerFor(((usqInt) classObject));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveGetDescription(void) {\n\tsqInt utf8StringOop;\n\tid classOrInstanceObject;\n\tconst char * utf8String;\n\tNSString* nsStringObject;\n\tsqInt aClassOrInstanceOop;\n\n\taClassOrInstanceOop = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tclassOrInstanceObject = ((id) (interpreterProxy->positive64BitValueOf(aClassOrInstanceOop)));\n\tutf8String = null;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t;\n\t    NS_DURING;\n\tnsStringObject = [classOrInstanceObject description];\n\t\t\t\tutf8String = [nsStringObject UTF8String];\n\t    NS_HANDLER \n\t\tutf8String = nil;;\n\t    NS_ENDHANDLER;\n\tif (!(utf8String)) {\n\t\tinterpreterProxy->success(0);\n\t\treturn null;\n\t}\n\tutf8StringOop = stringFromCString(utf8String);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, utf8StringOop);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveGetMethodSignatureForSelector(void) {\n\tSEL selectorObject;\n\tNSMethodSignature * messageSignatureObject;\n\tid classOrInstanceObject;\n\tsqInt aSelectorOop;\n\tsqInt aClassOrInstanceOop;\n\tsqInt _return_value;\n\n\taSelectorOop = interpreterProxy->stackValue(1);\n\taClassOrInstanceOop = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tselectorObject = ((SEL) (interpreterProxy->positive64BitValueOf(aSelectorOop)));\n\tclassOrInstanceObject = ((id) (interpreterProxy->positive64BitValueOf(aClassOrInstanceOop)));\n\tmessageSignatureObject = null;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t;\n\t;\n\t    NS_DURING;\n\tmessageSignatureObject = [classOrInstanceObject methodSignatureForSelector: selectorObject];\n\t    NS_HANDLER \n\tmessageSignatureObject = nil;;\n\t    NS_ENDHANDLER;\n\t_return_value = interpreterProxy->positive64BitIntegerFor(((usqInt) messageSignatureObject));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(3, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveGetNSStringForString(void) {\n\tNSString* aStringAsNSString;\n\tsqInt stringLength;\n\tNSUInteger encoding;\n\tchar* aString;\n\tsqInt aStringOop;\n\tsqInt anEncoding;\n\tsqInt _return_value;\n\n\taStringOop = interpreterProxy->stackValue(1);\n\tanEncoding = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tencoding = ((NSUInteger) (interpreterProxy->positive64BitValueOf(anEncoding)));\n\taString = interpreterProxy->firstIndexableField(aStringOop);\n\tstringLength = interpreterProxy->byteSizeOf(aStringOop);\n\t;\n\taStringAsNSString = 0;\n\t    NS_DURING;\n\taStringAsNSString = [[NSString alloc] initWithBytes: aString length: stringLength encoding: encoding];\n\t    NS_HANDLER \n\t\t\t\taStringAsNSString = nil;;\n\t    NS_ENDHANDLER;\n\t_return_value = interpreterProxy->positive64BitIntegerFor(((usqInt) aStringAsNSString));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(3, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveGetObjCClassForString(void) {\n\tNSString* classNameNSString;\n\tsqInt classNameLength;\n\tClass classObject;\n\tchar *aClassName;\n\tsqInt _return_value;\n\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\n\taClassName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tclassNameLength = interpreterProxy->slotSizeOf((oopForPointer( aClassName ) - BASE_HEADER_SIZE));\n\t;\n\tclassNameNSString = [[NSString alloc] initWithBytes: aClassName length: classNameLength encoding: NSUTF8StringEncoding];\n\t    NS_DURING;\n\tclassObject = NSClassFromString(classNameNSString);\n\t    NS_HANDLER \n\tclassObject = nil;;\n\t    NS_ENDHANDLER;\n\t[classNameNSString release];\n\t_return_value = interpreterProxy->positive64BitIntegerFor(((usqInt) classObject));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveGetSelectorForString(void) {\n\tSEL selectorObject;\n\tNSString * selectorNSString;\n\tsqInt selectorLength;\n\tchar *aSelectorName;\n\tsqInt _return_value;\n\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\n\taSelectorName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tselectorLength = interpreterProxy->slotSizeOf((oopForPointer( aSelectorName ) - BASE_HEADER_SIZE));\n\t;\n\tselectorNSString = [[NSString alloc] initWithBytes: aSelectorName length: selectorLength encoding: NSUTF8StringEncoding];\n\t    NS_DURING;\n\tselectorObject = NSSelectorFromString(selectorNSString);\n\t    NS_HANDLER \n\tselectorObject = nil;;\n\t    NS_ENDHANDLER;\n\t[selectorNSString release];\n\t_return_value = interpreterProxy->positive64BitIntegerFor(((usqInt) selectorObject));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveGetSuperClass(void) {\n\tid classOrInstanceObject;\n\tClass classObject;\n\tsqInt aClassOrInstanceOop;\n\tsqInt _return_value;\n\n\taClassOrInstanceOop = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tclassOrInstanceObject = ((id) (interpreterProxy->positive64BitValueOf(aClassOrInstanceOop)));\n\tclassObject = null;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t;\n\t;\n\t    NS_DURING;\n\tclassObject = [classOrInstanceObject superclass];\n\t    NS_HANDLER \n\t\tclassObject = nil;;\n\t    NS_ENDHANDLER;\n\t_return_value = interpreterProxy->positive64BitIntegerFor(((usqInt) classObject));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveIsEqual(void) {\n\tBOOL result;\n\tid oop2;\n\tid oop1;\n\tsqInt anOop1;\n\tsqInt anOop2;\n\tsqInt _return_value;\n\n\tanOop1 = interpreterProxy->stackValue(1);\n\tanOop2 = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\toop1 = ((id) (interpreterProxy->positive64BitValueOf(anOop1)));\n\toop2 = ((id) (interpreterProxy->positive64BitValueOf(anOop2)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t;\n\t;\n\tresult = 0;\n\t    NS_DURING;\n\tresult = [oop1 isEqual: oop2];\n\t    NS_HANDLER;\n\tinterpreterProxy->success(0);\n\tif (1) {\n\t\treturn null;\n\t}\n\t    NS_ENDHANDLER;\n\t_return_value = ((result == 1)) ? interpreterProxy->trueObject(): interpreterProxy->falseObject();\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(3, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveMethodSignatureGetArgumentType(void) {\n\tNSMethodSignature* nsMethodSignatureObject;\n\tconst char * string;\n\tsqInt stringOop;\n\tsqInt aMethodSignatureOop;\n\tsqInt aIndexNumber;\n\n\taMethodSignatureOop = interpreterProxy->stackValue(1);\n\taIndexNumber = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tnsMethodSignatureObject = ((NSMethodSignature *) (interpreterProxy->positive64BitValueOf(aMethodSignatureOop)));\n\tstring = null;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t;\n\t    NS_DURING;\n\tstring = [nsMethodSignatureObject getArgumentTypeAtIndex: aIndexNumber];\n\t    NS_HANDLER \n\t\tstring = nil;;\n\t    NS_ENDHANDLER;\n\tif (!(string)) {\n\t\tinterpreterProxy->success(0);\n\t\treturn null;\n\t}\n\tstringOop = stringFromCString(string);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(3, stringOop);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveMethodSignatureGetMethodReturnLength(void) {\n\tNSUInteger methodReturnLength;\n\tNSMethodSignature* nsMethodSignatureObject;\n\tsqInt aMethodSignatureOop;\n\tsqInt _return_value;\n\n\taMethodSignatureOop = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tnsMethodSignatureObject = ((NSMethodSignature *) (interpreterProxy->positive64BitValueOf(aMethodSignatureOop)));\n\tmethodReturnLength = 0;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t;\n\t    NS_DURING;\n\tmethodReturnLength = [nsMethodSignatureObject methodReturnLength];\n\t    NS_HANDLER \n\t\tmethodReturnLength = 0xFFFFFFFF;\n\t    NS_ENDHANDLER;\n\tif (methodReturnLength == 4294967295U) {\n\t\tinterpreterProxy->success(0);\n\t\treturn null;\n\t}\n\t_return_value = interpreterProxy->positive64BitIntegerFor(((usqInt) methodReturnLength));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveMethodSignatureGetNumberOfArguments(void) {\n\tNSMethodSignature* nsMethodSignatureObject;\n\tNSUInteger numberOfArguments;\n\tsqInt aMethodSignatureOop;\n\tsqInt _return_value;\n\n\taMethodSignatureOop = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tnsMethodSignatureObject = ((NSMethodSignature *) (interpreterProxy->positive64BitValueOf(aMethodSignatureOop)));\n\tnumberOfArguments = 9999999;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t;\n\t    NS_DURING;\n\tnumberOfArguments = [nsMethodSignatureObject numberOfArguments];\n\t    NS_HANDLER \n\t\tnumberOfArguments = 9999999;\n\t    NS_ENDHANDLER;\n\tif (numberOfArguments == 9999999) {\n\t\tinterpreterProxy->success(0);\n\t\treturn null;\n\t}\n\t_return_value = interpreterProxy->positive64BitIntegerFor(((usqInt) numberOfArguments));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveMethodSignatureGetReturnType(void) {\n\tNSMethodSignature* nsMethodSignatureObject;\n\tconst char * string;\n\tsqInt stringOop;\n\tsqInt aMethodSignatureOop;\n\n\taMethodSignatureOop = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tnsMethodSignatureObject = ((NSMethodSignature *) (interpreterProxy->positive64BitValueOf(aMethodSignatureOop)));\n\tstring = null;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t;\n\t    NS_DURING;\n\tstring = [nsMethodSignatureObject methodReturnType];\n\t    NS_HANDLER \n\t\tstring = nil;;\n\t    NS_ENDHANDLER;\n\tif (!(string)) {\n\t\tinterpreterProxy->success(0);\n\t\treturn null;\n\t}\n\tstringOop = stringFromCString(string);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, stringOop);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveNSInvocationCalloc(void) {\n\tvoid* pointer;\n\tsqInt size;\n\tsqInt _return_value;\n\n\tsize = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tpointer = calloc(size,1);\n\t_return_value = interpreterProxy->positive64BitIntegerFor(((usqInt) pointer));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveNSInvocationFree(void) {\n\tvoid* pointerToFree;\n\tsqInt pointer;\n\n\tpointer = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tpointerToFree = ((void *) (interpreterProxy->positive64BitValueOf(pointer)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfree((void*)pointerToFree);\n\t;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(1);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveNSInvocationGetArgument(void) {\n\tvoid * buffer;\n\tNSInvocation* nsInvocationInstance;\n\tsqInt aMethodSignatureOop;\n\tsqInt bufferOop;\n\tsqInt index;\n\n\taMethodSignatureOop = interpreterProxy->stackValue(2);\n\tbufferOop = interpreterProxy->stackValue(1);\n\tindex = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tnsInvocationInstance = ((NSInvocation *) (interpreterProxy->positive64BitValueOf(aMethodSignatureOop)));\n\tbuffer = ((void *) (interpreterProxy->positive64BitValueOf(bufferOop)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t;\n\t;\n\t    NS_DURING;\n\t[nsInvocationInstance getArgument: buffer atIndex: index];\n\t    NS_HANDLER;\n\tinterpreterProxy->success(0);\n\tif (1) {\n\t\treturn null;\n\t}\n\t    NS_ENDHANDLER;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(3);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveNSInvocationGetCType(void) {\n\tchar * buffer;\n\tsqInt newCharacterOop;\n\tchar targetOopData;\n\tsqInt bufferAddressOop;\n\tsqInt signedBoolean;\n\n\tbufferAddressOop = interpreterProxy->stackValue(1);\n\tsignedBoolean = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(0));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tbuffer = ((char *) (interpreterProxy->positive64BitValueOf(bufferAddressOop)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t;\n\tnewCharacterOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classCharacter(), 1);\n\ttargetOopData = 0;\n\t;\n\tif (signedBoolean) {\n\t\ttargetOopData = *(char*) buffer;\n\t\tinterpreterProxy->storeIntegerofObjectwithValue(0, newCharacterOop, ((sqInt) targetOopData));\n\t} else {\n\t\ttargetOopData = *(char*) buffer;\n\t\tinterpreterProxy->storeIntegerofObjectwithValue(0, newCharacterOop, ((usqInt) targetOopData));\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(3, newCharacterOop);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveNSInvocationGetCharPointerType(void) {\n\tchar * buffer;\n\tchar ** bufferPointer;\n\tsqInt stringOop;\n\tsqInt bufferAddressOop;\n\n\tbufferAddressOop = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tbufferPointer = ((char **) (interpreterProxy->positive64BitValueOf(bufferAddressOop)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tbuffer = *bufferPointer;\n\tstringOop = stringFromCString(buffer);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, stringOop);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveNSInvocationGetClassType(void) {\n\tClass * buffer;\n\tClass data;\n\tsqInt bufferAddressOop;\n\tsqInt _return_value;\n\n\tbufferAddressOop = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tbuffer = ((Class *) (interpreterProxy->positive64BitValueOf(bufferAddressOop)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t;\n\tdata = *buffer;\n\t_return_value = interpreterProxy->positive64BitIntegerFor(((usqInt) data));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveNSInvocationGetDoubleType(void) {\n\tdouble * buffer;\n\tdouble data;\n\tsqInt bufferAddressOop;\n\tsqInt _return_value;\n\n\tbufferAddressOop = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tbuffer = ((double *) (interpreterProxy->positive64BitValueOf(bufferAddressOop)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t;\n\tdata = *buffer;\n\t_return_value = interpreterProxy->floatObjectOf(data);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveNSInvocationGetFloatType(void) {\n\tfloat * buffer;\n\tfloat data;\n\tsqInt bufferAddressOop;\n\tsqInt _return_value;\n\n\tbufferAddressOop = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tbuffer = ((float *) (interpreterProxy->positive64BitValueOf(bufferAddressOop)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t;\n\tdata = *buffer;\n\t_return_value = interpreterProxy->floatObjectOf(data);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveNSInvocationGetIntType(void) {\n\tint * buffer;\n\tint data;\n\tunsigned int unsignedData;\n\tsqInt bufferAddressOop;\n\tsqInt signedBoolean;\n\tsqInt _return_value;\n\n\tbufferAddressOop = interpreterProxy->stackValue(1);\n\tsignedBoolean = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(0));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tbuffer = ((int *) (interpreterProxy->positive64BitValueOf(bufferAddressOop)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t;\n\tunsignedData = data = 0;\n\tif (signedBoolean) {\n\t\tdata = *buffer;\n\t\t_return_value = interpreterProxy->signed32BitIntegerFor(((sqInt) data));\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, _return_value);\n\t\treturn null;\n\t} else {\n\t\tunsignedData = *(unsigned int *)buffer;\n\t\t_return_value = interpreterProxy->positive32BitIntegerFor(((usqInt) unsignedData));\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, _return_value);\n\t\treturn null;\n\t}\n}\n\nEXPORT(sqInt) primitiveNSInvocationGetLongLongType(void) {\n\tlong long * buffer;\n\tlong long data;\n\tunsigned long long unsignedData;\n\tsqInt bufferAddressOop;\n\tsqInt signedBoolean;\n\tsqInt _return_value;\n\n\tbufferAddressOop = interpreterProxy->stackValue(1);\n\tsignedBoolean = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(0));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tbuffer = ((long long *) (interpreterProxy->positive64BitValueOf(bufferAddressOop)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t;\n\tunsignedData = data = 0;\n\tif (signedBoolean) {\n\t\tdata = *buffer;\n\t\t_return_value = interpreterProxy->signed64BitIntegerFor(((long long) data));\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, _return_value);\n\t\treturn null;\n\t} else {\n\t\tunsignedData = * (unsigned long long*) buffer;\n\t\t_return_value = interpreterProxy->positive64BitIntegerFor(((unsigned long long) unsignedData));\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, _return_value);\n\t\treturn null;\n\t}\n}\n\nEXPORT(sqInt) primitiveNSInvocationGetLongType(void) {\n\tlong * buffer;\n\tlong data;\n\tunsigned long unsignedData;\n\tsqInt bufferAddressOop;\n\tsqInt signedBoolean;\n\tsqInt _return_value;\n\n\tbufferAddressOop = interpreterProxy->stackValue(1);\n\tsignedBoolean = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(0));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tbuffer = ((long *) (interpreterProxy->positive64BitValueOf(bufferAddressOop)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t;\n\tunsignedData = data = 0;\n\tif (signedBoolean) {\n\t\tdata = *buffer;\n\t\t_return_value = interpreterProxy->signed64BitIntegerFor(((sqInt) data));\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, _return_value);\n\t\treturn null;\n\t} else {\n\t\tunsignedData = *(unsigned long *) buffer;\n\t\t_return_value = interpreterProxy->positive64BitIntegerFor(((usqInt) unsignedData));\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, _return_value);\n\t\treturn null;\n\t}\n}\n\nEXPORT(sqInt) primitiveNSInvocationGetObjectType(void) {\n\tid * buffer;\n\tid data;\n\tsqInt bufferAddressOop;\n\tsqInt _return_value;\n\n\tbufferAddressOop = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tbuffer = ((id *) (interpreterProxy->positive64BitValueOf(bufferAddressOop)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t;\n\tdata = *buffer;\n\t_return_value = interpreterProxy->positive64BitIntegerFor(((usqInt) data));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveNSInvocationGetReturnValue(void) {\n\tvoid * buffer;\n\tNSInvocation *nsInvoke;\n\tsqInt bufferAddressOop;\n\tsqInt aNSinvokeOops;\n\n\tbufferAddressOop = interpreterProxy->stackValue(1);\n\taNSinvokeOops = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tbuffer = ((void *) (interpreterProxy->positive64BitValueOf(bufferAddressOop)));\n\tnsInvoke = ((NSInvocation *) (interpreterProxy->positive64BitValueOf(aNSinvokeOops)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t;\n\t    NS_DURING;\n\t[nsInvoke getReturnValue: buffer];\n\t    NS_HANDLER;\n\tinterpreterProxy->success(0);\n\tif (1) {\n\t\treturn null;\n\t}\n\t    NS_ENDHANDLER;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(2);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveNSInvocationGetSelectorType(void) {\n\tSEL * buffer;\n\tSEL data;\n\tsqInt bufferAddressOop;\n\tsqInt _return_value;\n\n\tbufferAddressOop = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tbuffer = ((SEL *) (interpreterProxy->positive64BitValueOf(bufferAddressOop)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t;\n\tdata = *buffer;\n\t_return_value = interpreterProxy->positive64BitIntegerFor(((usqInt) data));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveNSInvocationGetShortType(void) {\n\tshort * buffer;\n\tshort data;\n\tunsigned short unsignedData;\n\tsqInt bufferAddressOop;\n\tsqInt signedBoolean;\n\tsqInt _return_value;\n\n\tbufferAddressOop = interpreterProxy->stackValue(1);\n\tsignedBoolean = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(0));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tbuffer = ((short *) (interpreterProxy->positive64BitValueOf(bufferAddressOop)));\n\tunsignedData = data = 0;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t;\n\tif (signedBoolean) {\n\t\tdata = *buffer;\n\t\t_return_value = interpreterProxy->signed32BitIntegerFor(((sqInt) data));\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, _return_value);\n\t\treturn null;\n\t} else {\n\t\tunsignedData = *(unsigned short *)buffer;\n\t\t_return_value = interpreterProxy->positive32BitIntegerFor(((usqInt) unsignedData));\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->popthenPush(3, _return_value);\n\t\treturn null;\n\t}\n}\n\nEXPORT(sqInt) primitiveNSInvocationGetStructureType(void) {\n\tsqInt newByteArray;\n\tchar ** bufferPointer;\n\tsqInt bufferAddressOop;\n\tsqInt length;\n\n\tbufferAddressOop = interpreterProxy->stackValue(1);\n\tlength = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tbufferPointer = ((void *) (interpreterProxy->positive64BitValueOf(bufferAddressOop)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tnewByteArray = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), length);\n\tmemcpy(interpreterProxy->arrayValueOf(newByteArray), bufferPointer, length);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(3, newByteArray);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveNSInvocationMalloc(void) {\n\tvoid* pointer;\n\tsqInt size;\n\tsqInt _return_value;\n\n\tsize = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tpointer = malloc(size);\n\t_return_value = interpreterProxy->positive64BitIntegerFor(((usqInt) pointer));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveNSInvocationSetCType(void) {\n\tvoid * buffer;\n\tunsigned char aUnsignedValue;\n\tchar aValue;\n\tNSInvocation* nsInvocationInstance;\n\tsqInt aMethodSignatureOop;\n\tsqInt signedBoolean;\n\tsqInt index;\n\tsqInt newCharacterOop;\n\tsqInt _return_value;\n\n\taMethodSignatureOop = interpreterProxy->stackValue(3);\n\tsignedBoolean = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(2));\n\tindex = interpreterProxy->stackIntegerValue(1);\n\tnewCharacterOop = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tnsInvocationInstance = ((NSInvocation *) (interpreterProxy->positive64BitValueOf(aMethodSignatureOop)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\taValue = interpreterProxy->fetchIntegerofObject(0, newCharacterOop);\n\taUnsignedValue = interpreterProxy->fetchIntegerofObject(0, newCharacterOop);\n\tif (signedBoolean) {\n\t\tbuffer = malloc(sizeof(char));\n\t\t\t\t\t*(char*) buffer = (char) aValue;\n\t} else {\n\t\tbuffer = malloc(sizeof(unsigned char));\n\t\t\t\t\t*(unsigned char*)buffer = (unsigned char) aUnsignedValue;\n\t}\n\t;\n\t;\n\t    NS_DURING;\n\t[nsInvocationInstance setArgument: buffer atIndex: index];\n\t    NS_HANDLER;\n\tinterpreterProxy->success(0);\n\tif (1) {\n\t\treturn null;\n\t}\n\t    NS_ENDHANDLER;\n\t_return_value = interpreterProxy->positive64BitIntegerFor(((usqInt) buffer));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(5, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveNSInvocationSetDoubleType(void) {\n\tvoid * buffer;\n\tNSInvocation* nsInvocationInstance;\n\tsqInt aMethodSignatureOop;\n\tsqInt index;\n\tdouble aValue;\n\tsqInt _return_value;\n\n\taMethodSignatureOop = interpreterProxy->stackValue(2);\n\tindex = interpreterProxy->stackIntegerValue(1);\n\taValue = interpreterProxy->stackFloatValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tnsInvocationInstance = ((NSInvocation *) (interpreterProxy->positive64BitValueOf(aMethodSignatureOop)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tbuffer = malloc(sizeof(double));\n\t\t\t\t*(double*) buffer = (double) aValue;\n\t;\n\t;\n\t    NS_DURING;\n\t[nsInvocationInstance setArgument: buffer atIndex: index];\n\t    NS_HANDLER;\n\tinterpreterProxy->success(0);\n\tif (1) {\n\t\treturn null;\n\t}\n\t    NS_ENDHANDLER;\n\t_return_value = interpreterProxy->positive64BitIntegerFor(((usqInt) buffer));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(4, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveNSInvocationSetFloatType(void) {\n\tvoid * buffer;\n\tNSInvocation* nsInvocationInstance;\n\tsqInt aMethodSignatureOop;\n\tsqInt index;\n\tdouble aValue;\n\tsqInt _return_value;\n\n\taMethodSignatureOop = interpreterProxy->stackValue(2);\n\tindex = interpreterProxy->stackIntegerValue(1);\n\taValue = interpreterProxy->stackFloatValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tnsInvocationInstance = ((NSInvocation *) (interpreterProxy->positive64BitValueOf(aMethodSignatureOop)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tbuffer = malloc(sizeof(float));\n\t\t\t\t*(float*) buffer = (float) aValue;\n\t;\n\t;\n\t    NS_DURING;\n\t[nsInvocationInstance setArgument: buffer atIndex: index];\n\t    NS_HANDLER;\n\tinterpreterProxy->success(0);\n\tif (1) {\n\t\treturn null;\n\t}\n\t    NS_ENDHANDLER;\n\t_return_value = interpreterProxy->positive64BitIntegerFor(((usqInt) buffer));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(4, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveNSInvocationSetIntType(void) {\n\tvoid * buffer;\n\tint aValue;\n\tNSInvocation* nsInvocationInstance;\n\tsqInt aMethodSignatureOop;\n\tsqInt signedBoolean;\n\tsqInt index;\n\tsqInt intValue;\n\tsqInt _return_value;\n\n\taMethodSignatureOop = interpreterProxy->stackValue(3);\n\tsignedBoolean = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(2));\n\tindex = interpreterProxy->stackIntegerValue(1);\n\tintValue = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tnsInvocationInstance = ((NSInvocation *) (interpreterProxy->positive64BitValueOf(aMethodSignatureOop)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (signedBoolean) {\n\t\taValue = ((int) (interpreterProxy->signed64BitValueOf(intValue)));\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tbuffer = malloc(sizeof(int));\n\t\t\t\t\t\t*(int*) buffer = (int) aValue;\n\t} else {\n\t\taValue = ((unsigned int) (interpreterProxy->positive64BitValueOf(intValue)));\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tbuffer = malloc(sizeof(unsigned int));\n\t\t\t\t\t*(unsigned int*)buffer = (unsigned int) aValue;\n\t}\n\t;\n\t;\n\t    NS_DURING;\n\t[nsInvocationInstance setArgument: buffer atIndex: index];\n\t    NS_HANDLER;\n\tinterpreterProxy->success(0);\n\tif (1) {\n\t\treturn null;\n\t}\n\t    NS_ENDHANDLER;\n\t_return_value = interpreterProxy->positive64BitIntegerFor(((usqInt) buffer));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(5, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveNSInvocationSetLongLongType(void) {\n\tvoid * buffer;\n\tlong long aValue;\n\tNSInvocation* nsInvocationInstance;\n\tsqInt aMethodSignatureOop;\n\tsqInt signedBoolean;\n\tsqInt index;\n\tsqInt intValue;\n\tsqInt _return_value;\n\n\taMethodSignatureOop = interpreterProxy->stackValue(3);\n\tsignedBoolean = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(2));\n\tindex = interpreterProxy->stackIntegerValue(1);\n\tintValue = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tnsInvocationInstance = ((NSInvocation *) (interpreterProxy->positive64BitValueOf(aMethodSignatureOop)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (signedBoolean) {\n\t\taValue = ((long long) (interpreterProxy->signed64BitValueOf(intValue)));\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tbuffer = malloc(sizeof(long long));\n\t\t\t\t\t\t*(long long*) buffer = (long long) aValue;\n\t} else {\n\t\taValue = ((unsigned long long) (interpreterProxy->positive64BitValueOf(intValue)));\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tbuffer = malloc(sizeof(unsigned long long));\n\t\t\t\t\t*(unsigned long long*)buffer = (unsigned long long) aValue;\n\t}\n\t;\n\t;\n\t    NS_DURING;\n\t[nsInvocationInstance setArgument: buffer atIndex: index];\n\t    NS_HANDLER;\n\tinterpreterProxy->success(0);\n\tif (1) {\n\t\treturn null;\n\t}\n\t    NS_ENDHANDLER;\n\t_return_value = interpreterProxy->positive64BitIntegerFor(((usqInt) buffer));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(5, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveNSInvocationSetLongType(void) {\n\tvoid * buffer;\n\tlong aValue;\n\tNSInvocation* nsInvocationInstance;\n\tsqInt aMethodSignatureOop;\n\tsqInt signedBoolean;\n\tsqInt index;\n\tsqInt intValue;\n\tsqInt _return_value;\n\n\taMethodSignatureOop = interpreterProxy->stackValue(3);\n\tsignedBoolean = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(2));\n\tindex = interpreterProxy->stackIntegerValue(1);\n\tintValue = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tnsInvocationInstance = ((NSInvocation *) (interpreterProxy->positive64BitValueOf(aMethodSignatureOop)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (signedBoolean) {\n\t\taValue = ((long) (interpreterProxy->signed64BitValueOf(intValue)));\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tbuffer = malloc(sizeof(long));\n\t\t\t\t\t\t*(long*) buffer = (long) aValue;\n\t} else {\n\t\taValue = ((unsigned long) (interpreterProxy->positive64BitValueOf(intValue)));\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tbuffer = malloc(sizeof(unsigned long));\n\t\t\t\t\t*(unsigned long*)buffer = (unsigned long) aValue;\n\t}\n\t;\n\t;\n\t    NS_DURING;\n\t[nsInvocationInstance setArgument: buffer atIndex: index];\n\t    NS_HANDLER;\n\tinterpreterProxy->success(0);\n\tif (1) {\n\t\treturn null;\n\t}\n\t    NS_ENDHANDLER;\n\t_return_value = interpreterProxy->positive64BitIntegerFor(((usqInt) buffer));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(5, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveNSInvocationSetPointerType(void) {\n\tvoid ** buffer;\n\tvoid * aValue;\n\tNSInvocation* nsInvocationInstance;\n\tsqInt aMethodSignatureOop;\n\tsqInt index;\n\tsqInt pointerValue;\n\tsqInt _return_value;\n\n\taMethodSignatureOop = interpreterProxy->stackValue(2);\n\tindex = interpreterProxy->stackIntegerValue(1);\n\tpointerValue = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tnsInvocationInstance = ((NSInvocation *) (interpreterProxy->positive64BitValueOf(aMethodSignatureOop)));\n\taValue = ((char *) (interpreterProxy->positive64BitValueOf(pointerValue)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tbuffer = malloc(sizeof(void*));\n\t\t*buffer = aValue;\n\t;\n\t;\n\t    NS_DURING;\n\t[nsInvocationInstance setArgument: buffer atIndex: index];\n\t    NS_HANDLER;\n\tinterpreterProxy->success(0);\n\tif (1) {\n\t\treturn null;\n\t}\n\t    NS_ENDHANDLER;\n\t_return_value = interpreterProxy->positive64BitIntegerFor(((usqInt) buffer));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(4, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveNSInvocationSetRetained(void) {\n\tNSInvocation* nsInvocationInstance;\n\tsqInt aMethodSignatureOop;\n\n\taMethodSignatureOop = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tnsInvocationInstance = ((NSInvocation *) (interpreterProxy->positive64BitValueOf(aMethodSignatureOop)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t    NS_DURING;\n\t[nsInvocationInstance retainArguments];\n\t    NS_HANDLER;\n\tinterpreterProxy->success(0);\n\t    NS_ENDHANDLER;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(1);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveNSInvocationSetSelector(void) {\n\tSEL selectorObject;\n\tid object1;\n\tNSInvocation *nsInvoke;\n\tsqInt aSelectorOop;\n\tsqInt object1Oops;\n\tsqInt aNSinvokeOops;\n\n\taSelectorOop = interpreterProxy->stackValue(2);\n\tobject1Oops = interpreterProxy->stackValue(1);\n\taNSinvokeOops = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tselectorObject = ((SEL) (interpreterProxy->positive64BitValueOf(aSelectorOop)));\n\tobject1 = ((id) (interpreterProxy->positive64BitValueOf(object1Oops)));\n\tnsInvoke = ((NSInvocation *) (interpreterProxy->positive64BitValueOf(aNSinvokeOops)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t    NS_DURING;\n\t[nsInvoke setSelector: selectorObject];\n\t[nsInvoke setTarget:  object1];\n\t    NS_HANDLER;\n\tinterpreterProxy->success(0);\n\tif (1) {\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy->pop(3);\n\t\treturn null;\n\t}\n\t    NS_ENDHANDLER;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(3);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveNSInvocationSetShortType(void) {\n\tvoid * buffer;\n\tshort aValue;\n\tNSInvocation* nsInvocationInstance;\n\tsqInt aMethodSignatureOop;\n\tsqInt signedBoolean;\n\tsqInt index;\n\tsqInt intValue;\n\tsqInt _return_value;\n\n\taMethodSignatureOop = interpreterProxy->stackValue(3);\n\tsignedBoolean = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(2));\n\tindex = interpreterProxy->stackIntegerValue(1);\n\tintValue = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tnsInvocationInstance = ((NSInvocation *) (interpreterProxy->positive64BitValueOf(aMethodSignatureOop)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (signedBoolean) {\n\t\taValue = ((short) (interpreterProxy->signed64BitValueOf(intValue)));\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tbuffer = malloc(sizeof(short));\n\t\t\t\t\t\t*(short*) buffer = (short) aValue;\n\t} else {\n\t\taValue = ((unsigned short) (interpreterProxy->positive64BitValueOf(intValue)));\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tbuffer = malloc(sizeof(unsigned short));\n\t\t\t\t\t*(unsigned short*)buffer = (unsigned short) aValue;\n\t}\n\t;\n\t;\n\t    NS_DURING;\n\t[nsInvocationInstance setArgument: buffer atIndex: index];\n\t    NS_HANDLER;\n\tinterpreterProxy->success(0);\n\tif (1) {\n\t\treturn null;\n\t}\n\t    NS_ENDHANDLER;\n\t_return_value = interpreterProxy->positive64BitIntegerFor(((usqInt) buffer));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(5, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveNSInvocationSetStringType(void) {\n\tchar * buffer;\n\tsqInt stringSize;\n\tNSInvocation* nsInvocationInstance;\n\tsqInt aMethodSignatureOop;\n\tsqInt index;\n\tchar *aValue;\n\tsqInt _return_value;\n\n\taMethodSignatureOop = interpreterProxy->stackValue(2);\n\tindex = interpreterProxy->stackIntegerValue(1);\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\n\taValue = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tnsInvocationInstance = ((NSInvocation *) (interpreterProxy->positive64BitValueOf(aMethodSignatureOop)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tstringSize = interpreterProxy->slotSizeOf((oopForPointer( aValue ) - BASE_HEADER_SIZE));\n\tbuffer = malloc(stringSize + 1);\n\t\tmemcpy(buffer,aValue,stringSize);\n\t\tbuffer[stringSize] = 0x00;\n\t;\n\t;\n\t    NS_DURING;\n\t[nsInvocationInstance setArgument: &buffer atIndex: index];\n\t    NS_HANDLER;\n\tinterpreterProxy->success(0);\n\tif (1) {\n\t\treturn null;\n\t}\n\t    NS_ENDHANDLER;\n\t_return_value = interpreterProxy->positive64BitIntegerFor(((usqInt) buffer));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(4, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveNSInvocationSetStructureType(void) {\n\tvoid * buffer;\n\tsqInt byteArraySize;\n\tNSInvocation* nsInvocationInstance;\n\tsqInt aMethodSignatureOop;\n\tsqInt index;\n\tchar *aValue;\n\tsqInt _return_value;\n\n\taMethodSignatureOop = interpreterProxy->stackValue(2);\n\tindex = interpreterProxy->stackIntegerValue(1);\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\n\taValue = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tnsInvocationInstance = ((NSInvocation *) (interpreterProxy->positive64BitValueOf(aMethodSignatureOop)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tbyteArraySize = interpreterProxy->slotSizeOf((oopForPointer( aValue ) - BASE_HEADER_SIZE));\n\tbuffer = malloc(byteArraySize);\n\t\tmemcpy(buffer,aValue,byteArraySize);\n\t;\n\t;\n\t;\n\t    NS_DURING;\n\t[nsInvocationInstance setArgument: buffer atIndex: index];\n\t    NS_HANDLER;\n\tinterpreterProxy->success(0);\n\tif (1) {\n\t\treturn null;\n\t}\n\t    NS_ENDHANDLER;\n\t_return_value = interpreterProxy->positive64BitIntegerFor(((usqInt) buffer));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(4, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveNSInvocationSetVoidPointerType(void) {\n\tvoid * buffer;\n\tsqInt byteArraySize;\n\tNSInvocation* nsInvocationInstance;\n\tsqInt aMethodSignatureOop;\n\tsqInt index;\n\tchar *aValue;\n\tsqInt _return_value;\n\n\taMethodSignatureOop = interpreterProxy->stackValue(2);\n\tindex = interpreterProxy->stackIntegerValue(1);\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\n\taValue = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tnsInvocationInstance = ((NSInvocation *) (interpreterProxy->positive64BitValueOf(aMethodSignatureOop)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tbyteArraySize = interpreterProxy->slotSizeOf((oopForPointer( aValue ) - BASE_HEADER_SIZE));\n\tbuffer = malloc(byteArraySize);\n\t\tmemcpy(buffer,aValue,byteArraySize);\n\t;\n\t;\n\t;\n\t    NS_DURING;\n\t[nsInvocationInstance setArgument: &buffer atIndex: index];\n\t    NS_HANDLER;\n\tinterpreterProxy->success(0);\n\tif (1) {\n\t\treturn null;\n\t}\n\t    NS_ENDHANDLER;\n\t_return_value = interpreterProxy->positive64BitIntegerFor(((usqInt) buffer));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(4, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveNSInvocationWithMethodSignature(void) {\n\tNSInvocation* nsInvocationOops;\n\tNSMethodSignature * methodSignatureOop;\n\tsqInt aMethodSignatureOop;\n\tsqInt _return_value;\n\n\taMethodSignatureOop = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tmethodSignatureOop = ((NSMethodSignature *) (interpreterProxy->positive64BitValueOf(aMethodSignatureOop)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tnsInvocationOops = 0;\n\t    NS_DURING;\n\tnsInvocationOops = [NSInvocation invocationWithMethodSignature: methodSignatureOop];\n\t    NS_HANDLER;\n\tinterpreterProxy->success(0);\n\tif (1) {\n\t\treturn null;\n\t}\n\t    NS_ENDHANDLER;\n\t_return_value = interpreterProxy->positive64BitIntegerFor(((usqInt) nsInvocationOops));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveNSLog(void) {\n\tid oop1;\n\tsqInt aNSStringOOP;\n\n\taNSStringOOP = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\toop1 = ((id) (interpreterProxy->positive64BitValueOf(aNSStringOOP)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t;\n\tNSLog(oop1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(1);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveNSStringToUTF8(void) {\n\tsqInt utf8StringOop;\n\tNSString* nsStringObject;\n\tconst char * utf8String;\n\tsqInt aNSStringOop;\n\n\taNSStringOop = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tnsStringObject = ((NSString *) (interpreterProxy->positive64BitValueOf(aNSStringOop)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tutf8String = null;\n\t;\n\t    NS_DURING;\n\tutf8String = [nsStringObject UTF8String];\n\t    NS_HANDLER \n\t\tutf8String = nil;;\n\t    NS_ENDHANDLER;\n\tif (!(utf8String)) {\n\t\tinterpreterProxy->success(0);\n\t\treturn null;\n\t}\n\tutf8StringOop = stringFromCString(utf8String);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, utf8StringOop);\n\treturn null;\n}\n\n\n/*\t- (id)performSelector:(SEL)aSelector */\n\nEXPORT(sqInt) primitivePerformSelector(void) {\n\tSEL selectorObject;\n\tid classOrInstanceObject;\n\tid returnValue;\n\tsqInt aSelectorOop;\n\tsqInt aClassOrInstanceOop;\n\tsqInt _return_value;\n\n\taSelectorOop = interpreterProxy->stackValue(1);\n\taClassOrInstanceOop = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tclassOrInstanceObject = ((id) (interpreterProxy->positive64BitValueOf(aClassOrInstanceOop)));\n\tselectorObject = ((SEL) (interpreterProxy->positive64BitValueOf(aSelectorOop)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\treturnValue = null;\n\t;\n\t;\n\t    NS_DURING;\n\treturnValue = [classOrInstanceObject performSelector: selectorObject];\n\t    NS_HANDLER \n\t\treturnValue = nil;;\n\t    NS_ENDHANDLER;\n\t_return_value = interpreterProxy->positive64BitIntegerFor(((usqInt) returnValue));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(3, _return_value);\n\treturn null;\n}\n\n\n/*\t- (id)performSelector:(SEL)aSelector */\n\nEXPORT(sqInt) primitivePerformSelectorOnMainThreadWithWaitTilDone(void) {\n\tSEL selectorObject;\n\tid classOrInstanceObject;\n\tid object1;\n\tvoid *returnAddress;\n\tsqInt aSelectorOop;\n\tsqInt aClassOrInstanceOop;\n\tsqInt anObject1;\n\tsqInt aReturnValueAddress;\n\tsqInt doneFlag;\n\n\taSelectorOop = interpreterProxy->stackValue(4);\n\taClassOrInstanceOop = interpreterProxy->stackValue(3);\n\tanObject1 = interpreterProxy->stackValue(2);\n\taReturnValueAddress = interpreterProxy->stackValue(1);\n\tdoneFlag = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(0));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tclassOrInstanceObject = ((id) (interpreterProxy->positive64BitValueOf(aClassOrInstanceOop)));\n\tselectorObject = ((SEL) (interpreterProxy->positive64BitValueOf(aSelectorOop)));\n\tobject1 = ((id) (interpreterProxy->positive64BitValueOf(anObject1)));\n\treturnAddress = ((void *) (interpreterProxy->positive64BitValueOf(aReturnValueAddress)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t;\n\t;\n\t;\n\t;\n\t    NS_DURING;\n\t[classOrInstanceObject performSelectorOnMainThread: selectorObject withObject: object1 waitUntilDone: doneFlag  ];\n\t    NS_HANDLER;\n\tinterpreterProxy->success(0);\n\tif (1) {\n\t\treturn null;\n\t}\n\t    NS_ENDHANDLER;\n\t    NS_DURING;\n\tif (returnAddress != 0) {\n\t\t[classOrInstanceObject getReturnValue: returnAddress];\n\t}\n\t    NS_HANDLER;\n\tinterpreterProxy->success(0);\n\tif (1) {\n\t\treturn null;\n\t}\n\t    NS_ENDHANDLER;\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(5);\n\treturn null;\n}\n\n\n/*\t- (id)performSelector:(SEL)aSelector */\n\nEXPORT(sqInt) primitivePerformSelectorWith(void) {\n\tSEL selectorObject;\n\tid object1;\n\tid classOrInstanceObject;\n\tid returnValue;\n\tsqInt aSelectorOop;\n\tsqInt aClassOrInstanceOop;\n\tsqInt anObject1;\n\tsqInt _return_value;\n\n\taSelectorOop = interpreterProxy->stackValue(2);\n\taClassOrInstanceOop = interpreterProxy->stackValue(1);\n\tanObject1 = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tclassOrInstanceObject = ((id) (interpreterProxy->positive64BitValueOf(aClassOrInstanceOop)));\n\tselectorObject = ((SEL) (interpreterProxy->positive64BitValueOf(aSelectorOop)));\n\tobject1 = ((id) (interpreterProxy->positive64BitValueOf(anObject1)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\treturnValue = null;\n\t;\n\t;\n\t;\n\t    NS_DURING;\n\treturnValue = [classOrInstanceObject performSelector: selectorObject withObject: object1];\n\t    NS_HANDLER \n\t\treturnValue = nil;;\n\t    NS_ENDHANDLER;\n\t_return_value = interpreterProxy->positive64BitIntegerFor(((usqInt) returnValue));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(4, _return_value);\n\treturn null;\n}\n\n\n/*\t- (id)performSelector:(SEL)aSelector */\n\nEXPORT(sqInt) primitivePerformSelectorWithWith(void) {\n\tSEL selectorObject;\n\tid object1;\n\tid classOrInstanceObject;\n\tid returnValue;\n\tid object2;\n\tsqInt aSelectorOop;\n\tsqInt aClassOrInstanceOop;\n\tsqInt anObject1;\n\tsqInt anObject2;\n\tsqInt _return_value;\n\n\taSelectorOop = interpreterProxy->stackValue(3);\n\taClassOrInstanceOop = interpreterProxy->stackValue(2);\n\tanObject1 = interpreterProxy->stackValue(1);\n\tanObject2 = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tclassOrInstanceObject = ((id) (interpreterProxy->positive64BitValueOf(aClassOrInstanceOop)));\n\tselectorObject = ((SEL) (interpreterProxy->positive64BitValueOf(aSelectorOop)));\n\tobject1 = ((id) (interpreterProxy->positive64BitValueOf(anObject1)));\n\tobject2 = ((id) (interpreterProxy->positive64BitValueOf(anObject2)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\treturnValue = null;\n\t;\n\t;\n\t;\n\t;\n\t    NS_DURING;\n\treturnValue = [classOrInstanceObject performSelector: selectorObject withObject: object1 withObject: object2 ];\n\t    NS_HANDLER \n\t\treturnValue = nil;;\n\t    NS_ENDHANDLER;\n\t_return_value = interpreterProxy->positive64BitIntegerFor(((usqInt) returnValue));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(5, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt) primitiveSELGetName(void) {\n\tSEL bufferPointer;\n\tsqInt stringOop;\n\tsqInt aSEL;\n\n\taSEL = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t#define selgetName sel_getName\n;\n\tbufferPointer = ((SEL) (interpreterProxy->positive64BitValueOf(aSEL)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tstringOop = stringFromCString(selgetName(bufferPointer));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, stringOop);\n\treturn null;\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt) setInterpreter(struct VirtualMachine* anInterpreter) {\n\tsqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\nstatic sqInt shutdownModule(void) {\n\treturn 1;\n}\n\nstatic sqInt sqAssert(sqInt aBool) {\n\t/* missing DebugCode */;\n}\n\n\n/*\tAnswer a new String copied from a null-terminated C string.\n\tCaution: This may invoke the garbage collector. */\n\nstatic sqInt stringFromCString(const char * aCString) {\n\tsqInt len;\n\tsqInt newString;\n\n\tlen = ((sqInt) (strlen(aCString)));\n\tnewString = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), len);\n\tstrncpy(interpreterProxy->arrayValueOf(newString), aCString, len);\n\treturn newString;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\n\nvoid* ObjectiveCPlugin_exports[][3] = {\n\t{\"ObjectiveCPlugin\", \"primitiveNSInvocationSetSelector\", (void*)primitiveNSInvocationSetSelector},\n\t{\"ObjectiveCPlugin\", \"primitiveNSInvocationGetDoubleType\", (void*)primitiveNSInvocationGetDoubleType},\n\t{\"ObjectiveCPlugin\", \"primitiveGetAddressFromEntryPointString\", (void*)primitiveGetAddressFromEntryPointString},\n\t{\"ObjectiveCPlugin\", \"primitiveGetObjCClassForString\", (void*)primitiveGetObjCClassForString},\n\t{\"ObjectiveCPlugin\", \"primitiveNSInvocationSetRetained\", (void*)primitiveNSInvocationSetRetained},\n\t{\"ObjectiveCPlugin\", \"primitiveNSInvocationGetLongType\", (void*)primitiveNSInvocationGetLongType},\n\t{\"ObjectiveCPlugin\", \"primitiveNSInvocationGetCType\", (void*)primitiveNSInvocationGetCType},\n\t{\"ObjectiveCPlugin\", \"primitiveNSInvocationSetShortType\", (void*)primitiveNSInvocationSetShortType},\n\t{\"ObjectiveCPlugin\", \"primitiveNSInvocationGetFloatType\", (void*)primitiveNSInvocationGetFloatType},\n\t{\"ObjectiveCPlugin\", \"primitivePerformSelectorWithWith\", (void*)primitivePerformSelectorWithWith},\n\t{\"ObjectiveCPlugin\", \"primitiveNSInvocationMalloc\", (void*)primitiveNSInvocationMalloc},\n\t{\"ObjectiveCPlugin\", \"primitiveNSInvocationSetLongLongType\", (void*)primitiveNSInvocationSetLongLongType},\n\t{\"ObjectiveCPlugin\", \"primitiveMethodSignatureGetMethodReturnLength\", (void*)primitiveMethodSignatureGetMethodReturnLength},\n\t{\"ObjectiveCPlugin\", \"primitiveNSStringToUTF8\", (void*)primitiveNSStringToUTF8},\n\t{\"ObjectiveCPlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"ObjectiveCPlugin\", \"primitiveNSInvocationGetLongLongType\", (void*)primitiveNSInvocationGetLongLongType},\n\t{\"ObjectiveCPlugin\", \"primitiveMethodSignatureGetReturnType\", (void*)primitiveMethodSignatureGetReturnType},\n\t{\"ObjectiveCPlugin\", \"primitiveSELGetName\", (void*)primitiveSELGetName},\n\t{\"ObjectiveCPlugin\", \"primitivePerformSelectorOnMainThreadWithWaitTilDone\", (void*)primitivePerformSelectorOnMainThreadWithWaitTilDone},\n\t{\"ObjectiveCPlugin\", \"primitiveNSInvocationSetDoubleType\", (void*)primitiveNSInvocationSetDoubleType},\n\t{\"ObjectiveCPlugin\", \"primitiveCallbackLeave\", (void*)primitiveCallbackLeave},\n\t{\"ObjectiveCPlugin\", \"primitiveNSInvocationGetReturnValue\", (void*)primitiveNSInvocationGetReturnValue},\n\t{\"ObjectiveCPlugin\", \"primitiveNSInvocationGetShortType\", (void*)primitiveNSInvocationGetShortType},\n\t{\"ObjectiveCPlugin\", \"primitiveNSInvocationSetStringType\", (void*)primitiveNSInvocationSetStringType},\n\t{\"ObjectiveCPlugin\", \"primitiveNSInvocationSetPointerType\", (void*)primitiveNSInvocationSetPointerType},\n\t{\"ObjectiveCPlugin\", \"primitiveNSInvocationGetObjectType\", (void*)primitiveNSInvocationGetObjectType},\n\t{\"ObjectiveCPlugin\", \"primitiveMethodSignatureGetArgumentType\", (void*)primitiveMethodSignatureGetArgumentType},\n\t{\"ObjectiveCPlugin\", \"primitiveNSInvocationSetStructureType\", (void*)primitiveNSInvocationSetStructureType},\n\t{\"ObjectiveCPlugin\", \"primitiveNSInvocationGetArgument\", (void*)primitiveNSInvocationGetArgument},\n\t{\"ObjectiveCPlugin\", \"primitiveGetSelectorForString\", (void*)primitiveGetSelectorForString},\n\t{\"ObjectiveCPlugin\", \"primitiveNSInvocationSetIntType\", (void*)primitiveNSInvocationSetIntType},\n\t{\"ObjectiveCPlugin\", \"primitiveGetNSStringForString\", (void*)primitiveGetNSStringForString},\n\t{\"ObjectiveCPlugin\", \"primitiveNSInvocationGetClassType\", (void*)primitiveNSInvocationGetClassType},\n\t{\"ObjectiveCPlugin\", \"primitiveNSInvocationCalloc\", (void*)primitiveNSInvocationCalloc},\n\t{\"ObjectiveCPlugin\", \"primitivePerformSelectorWith\", (void*)primitivePerformSelectorWith},\n\t{\"ObjectiveCPlugin\", \"primitiveIsEqual\", (void*)primitiveIsEqual},\n\t{\"ObjectiveCPlugin\", \"primitiveNSInvocationGetIntType\", (void*)primitiveNSInvocationGetIntType},\n\t{\"ObjectiveCPlugin\", \"primitiveGetMethodSignatureForSelector\", (void*)primitiveGetMethodSignatureForSelector},\n\t{\"ObjectiveCPlugin\", \"primitiveGetClass\", (void*)primitiveGetClass},\n\t{\"ObjectiveCPlugin\", \"primitiveNSInvocationSetLongType\", (void*)primitiveNSInvocationSetLongType},\n\t{\"ObjectiveCPlugin\", \"primitiveNSInvocationSetVoidPointerType\", (void*)primitiveNSInvocationSetVoidPointerType},\n\t{\"ObjectiveCPlugin\", \"primitiveNSInvocationFree\", (void*)primitiveNSInvocationFree},\n\t{\"ObjectiveCPlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{\"ObjectiveCPlugin\", \"primitiveMethodSignatureGetNumberOfArguments\", (void*)primitiveMethodSignatureGetNumberOfArguments},\n\t{\"ObjectiveCPlugin\", \"primitiveNSInvocationGetSelectorType\", (void*)primitiveNSInvocationGetSelectorType},\n\t{\"ObjectiveCPlugin\", \"primitiveNSInvocationSetCType\", (void*)primitiveNSInvocationSetCType},\n\t{\"ObjectiveCPlugin\", \"primitivePerformSelector\", (void*)primitivePerformSelector},\n\t{\"ObjectiveCPlugin\", \"primitiveNSLog\", (void*)primitiveNSLog},\n\t{\"ObjectiveCPlugin\", \"primitiveNSInvocationWithMethodSignature\", (void*)primitiveNSInvocationWithMethodSignature},\n\t{\"ObjectiveCPlugin\", \"primitiveGetAutoReleasePool\", (void*)primitiveGetAutoReleasePool},\n\t{\"ObjectiveCPlugin\", \"primitiveGetDescription\", (void*)primitiveGetDescription},\n\t{\"ObjectiveCPlugin\", \"primitiveNSInvocationGetCharPointerType\", (void*)primitiveNSInvocationGetCharPointerType},\n\t{\"ObjectiveCPlugin\", \"primitiveGetSuperClass\", (void*)primitiveGetSuperClass},\n\t{\"ObjectiveCPlugin\", \"primitiveNSInvocationSetFloatType\", (void*)primitiveNSInvocationSetFloatType},\n\t{\"ObjectiveCPlugin\", \"primitiveNSInvocationGetStructureType\", (void*)primitiveNSInvocationGetStructureType},\n\t{NULL, NULL, NULL}\n};\n\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/RePlugin/RePlugin.c",
    "content": "/* Automatically generated by\n\tSmartSyntaxPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tRePlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"RePlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"rePlugin.h\"\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n\n/*** Function Prototypes ***/\nstatic sqInt allocateByteArrayAndSetRcvrExtraPtrFrom(sqInt anExtraPtr);\nstatic sqInt allocateByteArrayAndSetRcvrPCREPtrFromPCRE(sqInt aPCREPtr);\nstatic sqInt allocateStringAndSetRcvrErrorStrFromCStr(const char *aCStrBuffer);\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nstatic void loadRcvrFromStackAt(sqInt stackInteger);\nstatic sqInt msg(char *s);\nEXPORT(void) primLastAlloc(void);\nEXPORT(void) primNetMemory(void);\nEXPORT(void) primNumAllocs(void);\nEXPORT(void) primNumFrees(void);\nEXPORT(void) primPCRECompile(void);\nEXPORT(void) primPCREExec(void);\nEXPORT(void) primPCREExecfromto(void);\nEXPORT(void) primPCRENumSubPatterns(void);\nstatic sqInt rcvrCompileFlags(void);\nstatic void rcvrErrorOffsetFrom(sqInt anInteger);\nstatic void rcvrErrorStrFrom(sqInt aString);\nstatic sqInt rcvrExtraPtr(void);\nstatic void rcvrExtraPtrFrom(sqInt aByteArrayOrNilObject);\nstatic sqInt rcvrMatchFlags(void);\nstatic int * rcvrMatchSpacePtr(void);\nstatic sqInt rcvrMatchSpaceSize(void);\nstatic char * rcvrPatternStrPtr(void);\nstatic void rcvrPCREBufferFrom(sqInt aByteArray);\nstatic sqInt rcvrPCREBufferPtr(void);\nstatic void rePluginFree(void *  aPointer);\nstatic void * rePluginMalloc(size_t  anInteger);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\nstatic void sqAssert(sqInt aBool);\n\n\n/*** Variables ***/\nstatic sqInt compileFlags;\nstatic sqInt errorOffset;\nstatic sqInt errorStr;\nstatic const char *  errorStrBuffer;\nstatic sqInt extraPtr;\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic int lastAlloc = 0;\nstatic sqInt matchFlags;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"RePlugin VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"RePlugin VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\nstatic int netMemory = 0;\nstatic int numAllocs = 0;\nstatic int numFrees = 0;\nstatic sqInt patternStr;\nstatic const char *  patternStrPtr;\nstatic sqInt pcrePtr;\nstatic sqInt rcvr;\n\n\nstatic sqInt\nallocateByteArrayAndSetRcvrExtraPtrFrom(sqInt anExtraPtr)\n{\n\tvoid *extraByteArrayPtr;\n\tsqInt extraObject;\n\n\tif (anExtraPtr) {\n\n\t\t/* Allocate a Smalltalk ByteArray -- lastAlloc contains the length */\n\n\t\textraObject = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(real_pcre_extra));\n\t\t/* begin loadRcvrFromStackAt: */\n\t\trcvr = interpreterProxy->stackObjectValue(0);\n\t\textraByteArrayPtr = interpreterProxy->arrayValueOf(extraObject);\n\t\tmemcpy(extraByteArrayPtr, (void *) anExtraPtr, sizeof(real_pcre_extra));\n\t}\n\telse {\n\t\textraObject = interpreterProxy->nilObject();\n\t}\n\t/* begin rcvrExtraPtrFrom: */\n\tinterpreterProxy->storePointerofObjectwithValue(3, rcvr, extraObject);\n\t;\n\treturn extraObject;\n}\n\nstatic sqInt\nallocateByteArrayAndSetRcvrPCREPtrFromPCRE(sqInt aPCREPtr)\n{\n\tvoid *patByteArrayPtr;\n\tsqInt patObject;\n\n\n\t/* Allocate a Smalltalk ByteArray -- lastAlloc contains the length */\n\n\tpatObject = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), lastAlloc);\n\t/* begin loadRcvrFromStackAt: */\n\trcvr = interpreterProxy->stackObjectValue(0);\n\tpatByteArrayPtr = interpreterProxy->arrayValueOf(patObject);\n\tmemcpy(patByteArrayPtr, (void *) aPCREPtr, lastAlloc);\n\t/* begin rcvrPCREBufferFrom: */\n\tinterpreterProxy->storePointerofObjectwithValue(2, rcvr, patObject);\n\t;\n\treturn patObject;\n}\n\nstatic sqInt\nallocateStringAndSetRcvrErrorStrFromCStr(const char *aCStrBuffer)\n{\n\tsqInt errorStrObj;\n\tvoid *errorStrObjPtr;\n\tsqInt length;\n\n\n\t/* Allocate errorStrObj */\n\n\tlength = strlen(aCStrBuffer);\n\terrorStrObj = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), length);\n\t/* begin loadRcvrFromStackAt: */\n\trcvr = interpreterProxy->stackObjectValue(0);\n\terrorStrObjPtr = interpreterProxy->arrayValueOf(errorStrObj);\n\tmemcpy(errorStrObjPtr,aCStrBuffer,length);\n\t;\n\t;\n\t/* begin rcvrErrorStrFrom: */\n\tinterpreterProxy->storePointerofObjectwithValue(4, rcvr, errorStrObj);\n\treturn errorStrObj;\n}\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nstatic void\nloadRcvrFromStackAt(sqInt stackInteger)\n{\n\trcvr = interpreterProxy->stackObjectValue(stackInteger);\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\nEXPORT(void)\nprimLastAlloc(void)\n{\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(lastAlloc);\n}\n\nEXPORT(void)\nprimNetMemory(void)\n{\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(netMemory);\n}\n\nEXPORT(void)\nprimNumAllocs(void)\n{\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(numAllocs);\n}\n\nEXPORT(void)\nprimNumFrees(void)\n{\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(numFrees);\n}\n\n\n/*\t<rcvr primPCRECompile>, where rcvr is an object with instance variables:\n\t\n\t'patternStr compileFlags pcrePtr extraPtr errorStr errorOffset\n\tmatchFlags'\t \n\tCompile the regular expression in patternStr, and if the compilation is\n\tsuccessful, attempt to optimize the compiled expression. Store the results\n\tin <pcrePtr> and <extratr>, or fill errorStr with a meaningful errorString\n\tand errorOffset with an indicator where the error was found, applying\n\tcompileFlags throughout. Answer nil with a clean compile (regardless of\n\twhether an optimization is possible, and answer with the string otherwise.\n */\n\nEXPORT(void)\nprimPCRECompile(void)\n{\n\t/* begin loadRcvrFromStackAt: */\n\trcvr = interpreterProxy->stackObjectValue(0);\n\t/* begin rcvrPatternStrPtr */\n\tpatternStrPtr = ((char *) (((char *) (interpreterProxy->fetchArrayofObject(0, rcvr)))));\n\tcompileFlags = interpreterProxy->fetchIntegerofObject(1, rcvr);\n\tif (interpreterProxy->failed()) {\n\t\treturn;\n\t}\n\tpcrePtr = (int) pcre_compile(patternStrPtr, compileFlags, \n\t\t\t\t\t&errorStrBuffer, &errorOffset, NULL);\n\tif (pcrePtr) {\n\t\tallocateByteArrayAndSetRcvrPCREPtrFromPCRE(pcrePtr);\n\t\textraPtr = (int) pcre_study((pcre *)pcrePtr, compileFlags, &errorStrBuffer);\n\t\tallocateByteArrayAndSetRcvrExtraPtrFrom(extraPtr);\n\t\trePluginFree(((void *) pcrePtr));\n\t\tif (extraPtr) {\n\t\t\trePluginFree(((void *) extraPtr));\n\t\t}\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn;\n\t\t}\n\t\tinterpreterProxy->popthenPush(1, interpreterProxy->nilObject());\n\t}\n\telse {\n\t\terrorStr = allocateStringAndSetRcvrErrorStrFromCStr(errorStrBuffer);\n\t\t/* begin rcvrErrorOffsetFrom: */\n\t\tinterpreterProxy->storeIntegerofObjectwithValue(5, rcvr, errorOffset);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn;\n\t\t}\n\t\tinterpreterProxy->popthenPush(1, errorStr);\n\t}\n}\n\n\n/*\t<rcvr primPCREExec: searchObject>, where rcvr is an object with instance\n\tvariables: \n\t'patternStr compileFlags pcrePtr extraPtr errorStr errorOffset\n\tmatchFlags'\t \n\tApply the regular expression (stored in <pcrePtr> and <extratr>, generated\n\tfrom calls to primPCRECompile), to smalltalk String searchObject using\n\t<matchOptions>. If there is no match, answer nil. Otherwise answer a\n\tByteArray of offsets representing the results of the match.\n */\n\nEXPORT(void)\nprimPCREExec(void)\n{\n\tsqInt length;\n\tint *matchSpacePtr;\n\tsqInt matchSpaceSize;\n\tsqInt result;\n\tchar *searchBuffer;\n\tsqInt searchObject;\n\n\n\t/* Load Parameters */\n\n\tsearchObject = interpreterProxy->stackObjectValue(0);\n\tsearchBuffer = interpreterProxy->arrayValueOf(searchObject);\n\tlength = interpreterProxy->byteSizeOf(searchObject);\n\t/* begin loadRcvrFromStackAt: */\n\trcvr = interpreterProxy->stackObjectValue(1);\n\tpcrePtr = ((int) (interpreterProxy->fetchArrayofObject(2, rcvr)));\n\textraPtr = rcvrExtraPtr();\n\tmatchFlags = interpreterProxy->fetchIntegerofObject(6, rcvr);\n\t/* begin rcvrMatchSpacePtr */\n\tmatchSpacePtr = ((int *) (interpreterProxy->fetchArrayofObject(7, rcvr)));\n\tmatchSpaceSize = ((sqInt) (interpreterProxy->byteSizeOf(interpreterProxy->fetchPointerofObject(7, rcvr))) >> 2);\n\tif (interpreterProxy->failed()) {\n\t\treturn;\n\t}\n\tresult = pcre_exec((pcre *)pcrePtr, (pcre_extra *)extraPtr, \n\t\t\t\tsearchBuffer, length, 0, matchFlags, matchSpacePtr, matchSpaceSize);\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->pushInteger(result);\n\t;\n\t;\n\t;\n\t;\n}\n\n\n/*\t<rcvr primPCREExec: searchObject> from: fromInteger to: toInteger>, where\n\trcvr is an object with instance variables:\n\t\n\t'patternStr compileFlags pcrePtr extraPtr errorStr errorOffset\n\tmatchFlags'\t \n\tApply the regular expression (stored in <pcrePtr> and <extratr>, generated\n\tfrom calls to primPCRECompile), to smalltalk String searchObject using\n\t<matchOptions>, beginning at offset <fromInteger> and continuing until\n\toffset <toInteger>. If there is no match, answer nil. Otherwise answer a\n\tByteArray of offsets representing the results of the match.\n */\n\nEXPORT(void)\nprimPCREExecfromto(void)\n{\n\tsqInt fromInteger;\n\tsqInt length;\n\tint *matchSpacePtr;\n\tsqInt matchSpaceSize;\n\tsqInt result;\n\tchar *searchBuffer;\n\tsqInt searchObject;\n\tsqInt toInteger;\n\n\n\t/* Load Parameters */\n\n\ttoInteger = interpreterProxy->stackIntegerValue(0);\n\tfromInteger = interpreterProxy->stackIntegerValue(1);\n\tsearchObject = interpreterProxy->stackObjectValue(2);\n\tsearchBuffer = interpreterProxy->arrayValueOf(searchObject);\n\tlength = interpreterProxy->byteSizeOf(searchObject);\n\t/* begin loadRcvrFromStackAt: */\n\trcvr = interpreterProxy->stackObjectValue(3);\n\tinterpreterProxy->success(1 <= fromInteger);\n\tinterpreterProxy->success(toInteger <= length);\n\n\t/* Smalltalk offsets are 1-based */\n\n\tfromInteger -= 1;\n\tinterpreterProxy->success(fromInteger <= toInteger);\n\tlength = toInteger - fromInteger;\n\n\t/* Load Instance Variables */\n\n\tsearchBuffer += fromInteger;\n\tpcrePtr = ((int) (interpreterProxy->fetchArrayofObject(2, rcvr)));\n\textraPtr = rcvrExtraPtr();\n\tmatchFlags = interpreterProxy->fetchIntegerofObject(6, rcvr);\n\t/* begin rcvrMatchSpacePtr */\n\tmatchSpacePtr = ((int *) (interpreterProxy->fetchArrayofObject(7, rcvr)));\n\tmatchSpaceSize = ((sqInt) (interpreterProxy->byteSizeOf(interpreterProxy->fetchPointerofObject(7, rcvr))) >> 2);\n\tif (interpreterProxy->failed()) {\n\t\treturn;\n\t}\n\tresult = pcre_exec((pcre *)pcrePtr, (pcre_extra *)extraPtr, \n\t\t\t\tsearchBuffer, length, 0, matchFlags, matchSpacePtr, matchSpaceSize);\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->pushInteger(result);\n\t;\n\t;\n\t;\n\t;\n}\n\n\n/*\t<rcvr primPCRENumSubPatterns>, where rcvr is an object with instance\n\tvariables: \n\t'patternStr compileFlags pcrePtr extraPtr errorStr errorOffset\n\tmatchFlags'\t \n\tReturn the number of subpatterns captured by the compiled pattern.\n */\n/*\tLoad Parameters */\n\nEXPORT(void)\nprimPCRENumSubPatterns(void)\n{\n\t/* begin loadRcvrFromStackAt: */\n\trcvr = interpreterProxy->stackObjectValue(0);\n\tpcrePtr = ((int) (interpreterProxy->fetchArrayofObject(2, rcvr)));\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(pcre_info((pcre *)pcrePtr, NULL, NULL));\n}\n\nstatic sqInt\nrcvrCompileFlags(void)\n{\n\treturn interpreterProxy->fetchIntegerofObject(1, rcvr);\n}\n\nstatic void\nrcvrErrorOffsetFrom(sqInt anInteger)\n{\n\tinterpreterProxy->storeIntegerofObjectwithValue(5, rcvr, anInteger);\n}\n\nstatic void\nrcvrErrorStrFrom(sqInt aString)\n{\n\tinterpreterProxy->storePointerofObjectwithValue(4, rcvr, aString);\n}\n\nstatic sqInt\nrcvrExtraPtr(void)\n{\n\tsqInt extraObj;\n\n\textraObj = interpreterProxy->fetchPointerofObject(3, rcvr);\n\tif (extraObj == (interpreterProxy->nilObject())) {\n\t\treturn (int) NULL;\n\t}\n\treturn ((int) (interpreterProxy->arrayValueOf(extraObj)));\n}\n\nstatic void\nrcvrExtraPtrFrom(sqInt aByteArrayOrNilObject)\n{\n\tinterpreterProxy->storePointerofObjectwithValue(3, rcvr, aByteArrayOrNilObject);\n}\n\nstatic sqInt\nrcvrMatchFlags(void)\n{\n\treturn interpreterProxy->fetchIntegerofObject(6, rcvr);\n}\n\nstatic int *\nrcvrMatchSpacePtr(void)\n{\n\treturn ((int *) (interpreterProxy->fetchArrayofObject(7, rcvr)));\n}\n\nstatic sqInt\nrcvrMatchSpaceSize(void)\n{\n\treturn ((sqInt) (interpreterProxy->byteSizeOf(interpreterProxy->fetchPointerofObject(7, rcvr))) >> 2);\n}\n\nstatic char *\nrcvrPatternStrPtr(void)\n{\n\treturn ((char *) (interpreterProxy->fetchArrayofObject(0, rcvr)));\n}\n\nstatic void\nrcvrPCREBufferFrom(sqInt aByteArray)\n{\n\tinterpreterProxy->storePointerofObjectwithValue(2, rcvr, aByteArray);\n}\n\nstatic sqInt\nrcvrPCREBufferPtr(void)\n{\n\treturn ((int) (interpreterProxy->fetchArrayofObject(2, rcvr)));\n}\n\n\n/*\tFree a block of fixed memory allocated with rePluginMalloc. Instrumented\n\tversion of C free() to facilitate leak analysis from Smalltalk.\n\tOS-specific variations on malloc/free, such as with MacOS, are handled by\n\tadding a C macro to the header file redefining malloc/free -- see the\n\tclass comment\n */\n\nstatic void\nrePluginFree(void *  aPointer)\n{\n\tnumFrees += 1;\n\tif (aPointer) {\n\t\tfree(aPointer);\n\t}\n}\n\n\n/*\tAllocate a block of fixed memory using C calls to malloc(). Instrumented\n\tto facilitate leak analysis from Smalltalk. Set global lastAlloc to\n\tanInteger. OS-specific variations on malloc/free, such as with MacOS, are\n\thandled by adding a C macro to the header file redefining malloc/free --\n\tsee the class comment\n */\n\nstatic void *\nrePluginMalloc(size_t  anInteger)\n{\n\tvoid *aPointer;\n\n\tnumAllocs += 1;\n\tif ((aPointer = malloc(anInteger))) {\n\t\tlastAlloc = anInteger;\n\t}\n\treturn aPointer;\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n\tsqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\nstatic void\nsqAssert(sqInt aBool)\n{\n\t/* missing DebugCode */;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* RePlugin_exports[][3] = {\n\t{\"RePlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"RePlugin\", \"primLastAlloc\", (void*)primLastAlloc},\n\t{\"RePlugin\", \"primNetMemory\", (void*)primNetMemory},\n\t{\"RePlugin\", \"primNumAllocs\", (void*)primNumAllocs},\n\t{\"RePlugin\", \"primNumFrees\", (void*)primNumFrees},\n\t{\"RePlugin\", \"primPCRECompile\", (void*)primPCRECompile},\n\t{\"RePlugin\", \"primPCREExec\", (void*)primPCREExec},\n\t{\"RePlugin\", \"primPCREExecfromto\", (void*)primPCREExecfromto},\n\t{\"RePlugin\", \"primPCRENumSubPatterns\", (void*)primPCRENumSubPatterns},\n\t{\"RePlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/SecurityPlugin/SecurityPlugin.c",
    "content": "/* Automatically generated by\n\tVMPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tSecurityPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"SecurityPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"SecurityPlugin.h\"\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n\n/*** Function Prototypes ***/\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nEXPORT(sqInt) initialiseModule(void);\nstatic sqInt msg(char *s);\nEXPORT(sqInt) primitiveCanWriteImage(void);\nEXPORT(sqInt) primitiveDisableImageWrite(void);\nEXPORT(sqInt) primitiveGetSecureUserDirectory(void);\nEXPORT(sqInt) primitiveGetUntrustedUserDirectory(void);\nEXPORT(sqInt) secCanConnectToPort(sqInt addr, sqInt port);\nEXPORT(sqInt) secCanCreatePathOfSize(char *dirName, sqInt dirNameSize);\nEXPORT(sqInt) secCanCreateSocketOfType(sqInt netType, sqInt socketType);\nEXPORT(sqInt) secCanDeleteFileOfSize(char *fileName, sqInt fileNameSize);\nEXPORT(sqInt) secCanDeletePathOfSize(char *dirName, sqInt dirNameSize);\nEXPORT(sqInt) secCanGetFileTypeOfSize(char *fileName, sqInt fileNameSize);\nEXPORT(sqInt) secCanListPathOfSize(char *pathName, sqInt pathNameSize);\nEXPORT(sqInt) secCanOpenAsyncFileOfSizeWritable(char *fileName, sqInt fileNameSize, sqInt writeFlag);\nEXPORT(sqInt) secCanOpenFileOfSizeWritable(char *fileName, sqInt fileNameSize, sqInt writeFlag);\nEXPORT(sqInt) secCanRenameFileOfSize(char *fileName, sqInt fileNameSize);\nEXPORT(sqInt) secCanRenameImage(void);\nEXPORT(sqInt) secCanSetFileTypeOfSize(char *fileName, sqInt fileNameSize);\nEXPORT(sqInt) secCanWriteImage(void);\nEXPORT(sqInt) secCanListenOnPort(sqInt socket, sqInt port);\nEXPORT(sqInt) secDisableFileAccess(void);\nEXPORT(sqInt) secDisableSocketAccess(void);\nEXPORT(sqInt) secHasFileAccess(void);\nEXPORT(sqInt) secHasSocketAccess(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\n\n\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"SecurityPlugin VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"SecurityPlugin VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\n\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nEXPORT(sqInt)\ninitialiseModule(void)\n{\n\treturn ioInitSecurity();\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\nEXPORT(sqInt)\nprimitiveCanWriteImage(void)\n{\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushBool(ioCanWriteImage());\n}\n\nEXPORT(sqInt)\nprimitiveDisableImageWrite(void)\n{\n\tioDisableImageWrite();\n}\n\n\n/*\tPrimitive. Return the secure directory for the current user. */\n\nEXPORT(sqInt)\nprimitiveGetSecureUserDirectory(void)\n{\n    sqInt dirLen;\n    char *dirName;\n    sqInt dirOop;\n    char *dirPtr;\n    sqInt i;\n\n\tdirName = ioGetSecureUserDirectory();\n\tif ((dirName == null)\n\t || (interpreterProxy->failed())) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tdirLen = strlen(dirName);\n\tdirOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), dirLen);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tdirPtr = interpreterProxy->firstIndexableField(dirOop);\n\tfor (i = 0; i <= (dirLen - 1); i += 1) {\n\t\tdirPtr[i] = (dirName[i]);\n\t}\n\tinterpreterProxy->popthenPush(1, dirOop);\n}\n\n\n/*\tPrimitive. Return the untrusted user directory name. */\n\nEXPORT(sqInt)\nprimitiveGetUntrustedUserDirectory(void)\n{\n    sqInt dirLen;\n    char *dirName;\n    sqInt dirOop;\n    char *dirPtr;\n    sqInt i;\n\n\tdirName = ioGetUntrustedUserDirectory();\n\tif ((dirName == null)\n\t || (interpreterProxy->failed())) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tdirLen = strlen(dirName);\n\tdirOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), dirLen);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tdirPtr = interpreterProxy->firstIndexableField(dirOop);\n\tfor (i = 0; i <= (dirLen - 1); i += 1) {\n\t\tdirPtr[i] = (dirName[i]);\n\t}\n\tinterpreterProxy->popthenPush(1, dirOop);\n}\n\nEXPORT(sqInt)\nsecCanConnectToPort(sqInt addr, sqInt port)\n{\n\treturn ioCanConnectToPort(addr, port);\n}\n\nEXPORT(sqInt)\nsecCanCreatePathOfSize(char *dirName, sqInt dirNameSize)\n{\n\treturn ioCanCreatePathOfSize(dirName, dirNameSize);\n}\n\nEXPORT(sqInt)\nsecCanCreateSocketOfType(sqInt netType, sqInt socketType)\n{\n\treturn ioCanCreateSocketOfType(netType, socketType);\n}\n\nEXPORT(sqInt)\nsecCanDeleteFileOfSize(char *fileName, sqInt fileNameSize)\n{\n\treturn ioCanDeleteFileOfSize(fileName, fileNameSize);\n}\n\nEXPORT(sqInt)\nsecCanDeletePathOfSize(char *dirName, sqInt dirNameSize)\n{\n\treturn ioCanDeletePathOfSize(dirName, dirNameSize);\n}\n\nEXPORT(sqInt)\nsecCanGetFileTypeOfSize(char *fileName, sqInt fileNameSize)\n{\n\treturn ioCanGetFileTypeOfSize(fileName, fileNameSize);\n}\n\nEXPORT(sqInt)\nsecCanListPathOfSize(char *pathName, sqInt pathNameSize)\n{\n\treturn ioCanListPathOfSize(pathName, pathNameSize);\n}\n\nEXPORT(sqInt)\nsecCanOpenAsyncFileOfSizeWritable(char *fileName, sqInt fileNameSize, sqInt writeFlag)\n{\n\treturn ioCanOpenAsyncFileOfSizeWritable(fileName, fileNameSize, writeFlag);\n}\n\nEXPORT(sqInt)\nsecCanOpenFileOfSizeWritable(char *fileName, sqInt fileNameSize, sqInt writeFlag)\n{\n\treturn ioCanOpenFileOfSizeWritable(fileName, fileNameSize, writeFlag);\n}\n\nEXPORT(sqInt)\nsecCanRenameFileOfSize(char *fileName, sqInt fileNameSize)\n{\n\treturn ioCanRenameFileOfSize(fileName, fileNameSize);\n}\n\nEXPORT(sqInt)\nsecCanRenameImage(void)\n{\n\treturn ioCanRenameImage();\n}\n\nEXPORT(sqInt)\nsecCanSetFileTypeOfSize(char *fileName, sqInt fileNameSize)\n{\n\treturn ioCanSetFileTypeOfSize(fileName, fileNameSize);\n}\n\nEXPORT(sqInt)\nsecCanWriteImage(void)\n{\n\treturn ioCanWriteImage();\n}\n\nEXPORT(sqInt)\nsecCanListenOnPort(sqInt socket, sqInt port)\n{\n\treturn ioCanListenOnPort(socket, port);\n}\n\nEXPORT(sqInt)\nsecDisableFileAccess(void)\n{\n\treturn ioDisableFileAccess();\n}\n\nEXPORT(sqInt)\nsecDisableSocketAccess(void)\n{\n\treturn ioDisableSocketAccess();\n}\n\nEXPORT(sqInt)\nsecHasFileAccess(void)\n{\n\treturn ioHasFileAccess();\n}\n\nEXPORT(sqInt)\nsecHasSocketAccess(void)\n{\n\treturn ioHasSocketAccess();\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n    sqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* SecurityPlugin_exports[][3] = {\n\t{\"SecurityPlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"SecurityPlugin\", \"initialiseModule\", (void*)initialiseModule},\n\t{\"SecurityPlugin\", \"primitiveCanWriteImage\", (void*)primitiveCanWriteImage},\n\t{\"SecurityPlugin\", \"primitiveDisableImageWrite\", (void*)primitiveDisableImageWrite},\n\t{\"SecurityPlugin\", \"primitiveGetSecureUserDirectory\", (void*)primitiveGetSecureUserDirectory},\n\t{\"SecurityPlugin\", \"primitiveGetUntrustedUserDirectory\", (void*)primitiveGetUntrustedUserDirectory},\n\t{\"SecurityPlugin\", \"secCanConnectToPort\", (void*)secCanConnectToPort},\n\t{\"SecurityPlugin\", \"secCanCreatePathOfSize\", (void*)secCanCreatePathOfSize},\n\t{\"SecurityPlugin\", \"secCanCreateSocketOfType\", (void*)secCanCreateSocketOfType},\n\t{\"SecurityPlugin\", \"secCanDeleteFileOfSize\", (void*)secCanDeleteFileOfSize},\n\t{\"SecurityPlugin\", \"secCanDeletePathOfSize\", (void*)secCanDeletePathOfSize},\n\t{\"SecurityPlugin\", \"secCanGetFileTypeOfSize\", (void*)secCanGetFileTypeOfSize},\n\t{\"SecurityPlugin\", \"secCanListenOnPort\", (void*)secCanListenOnPort},\n\t{\"SecurityPlugin\", \"secCanListPathOfSize\", (void*)secCanListPathOfSize},\n\t{\"SecurityPlugin\", \"secCanOpenAsyncFileOfSizeWritable\", (void*)secCanOpenAsyncFileOfSizeWritable},\n\t{\"SecurityPlugin\", \"secCanOpenFileOfSizeWritable\", (void*)secCanOpenFileOfSizeWritable},\n\t{\"SecurityPlugin\", \"secCanRenameFileOfSize\", (void*)secCanRenameFileOfSize},\n\t{\"SecurityPlugin\", \"secCanRenameImage\", (void*)secCanRenameImage},\n\t{\"SecurityPlugin\", \"secCanSetFileTypeOfSize\", (void*)secCanSetFileTypeOfSize},\n\t{\"SecurityPlugin\", \"secCanWriteImage\", (void*)secCanWriteImage},\n\t{\"SecurityPlugin\", \"secDisableFileAccess\", (void*)secDisableFileAccess},\n\t{\"SecurityPlugin\", \"secDisableSocketAccess\", (void*)secDisableSocketAccess},\n\t{\"SecurityPlugin\", \"secHasFileAccess\", (void*)secHasFileAccess},\n\t{\"SecurityPlugin\", \"secHasSocketAccess\", (void*)secHasSocketAccess},\n\t{\"SecurityPlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/SerialPlugin/SerialPlugin.c",
    "content": "/* Automatically generated by\n\tSmartSyntaxPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tSerialPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"SerialPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"SerialPlugin.h\"\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n\n/*** Function Prototypes ***/\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nEXPORT(sqInt) initialiseModule(void);\nstatic sqInt msg(char *s);\nEXPORT(sqInt) primitiveSerialPortClose(void);\nEXPORT(sqInt) primitiveSerialPortOpen(void);\nEXPORT(sqInt) primitiveSerialPortRead(void);\nEXPORT(sqInt) primitiveSerialPortWrite(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\nEXPORT(sqInt) shutdownModule(void);\nstatic void sqAssert(sqInt aBool);\n\n\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"SerialPlugin VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"SerialPlugin VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\n\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nEXPORT(sqInt)\ninitialiseModule(void)\n{\n\treturn serialPortInit();\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\nEXPORT(sqInt)\nprimitiveSerialPortClose(void)\n{\n\tsqInt portNum;\n\n\tportNum = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tserialPortClose(portNum);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(1);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveSerialPortOpen(void)\n{\n\tsqInt baudRate;\n\tsqInt dataBits;\n\tsqInt inFlowControl;\n\tsqInt outFlowControl;\n\tsqInt parityType;\n\tsqInt portNum;\n\tsqInt stopBitsType;\n\tsqInt xOffChar;\n\tsqInt xOnChar;\n\n\tportNum = interpreterProxy->stackIntegerValue(8);\n\tbaudRate = interpreterProxy->stackIntegerValue(7);\n\tstopBitsType = interpreterProxy->stackIntegerValue(6);\n\tparityType = interpreterProxy->stackIntegerValue(5);\n\tdataBits = interpreterProxy->stackIntegerValue(4);\n\tinFlowControl = interpreterProxy->stackIntegerValue(3);\n\toutFlowControl = interpreterProxy->stackIntegerValue(2);\n\txOnChar = interpreterProxy->stackIntegerValue(1);\n\txOffChar = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tserialPortOpen(\n\t\t\tportNum, baudRate, stopBitsType, parityType, dataBits,\n\t\t\tinFlowControl, outFlowControl, xOnChar, xOffChar);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(9);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveSerialPortRead(void)\n{\n\tchar *array;\n\tsqInt arrayPtr;\n\tsqInt bytesRead;\n\tsqInt count;\n\tsqInt portNum;\n\tsqInt startIndex;\n\tsqInt _return_value;\n\n\tportNum = interpreterProxy->stackIntegerValue(3);\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(2)));\n\tarray = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(2))));\n\tstartIndex = interpreterProxy->stackIntegerValue(1);\n\tcount = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->success((startIndex >= 1)\n\t && (((startIndex + count) - 1) <= (interpreterProxy->byteSizeOf(((sqInt)(long)(array) - 4)))));\n\tarrayPtr = ((((sqInt)array)) + startIndex) - 1;\n\tbytesRead = serialPortReadInto( portNum, count, arrayPtr);\n\t_return_value = interpreterProxy->integerObjectOf(bytesRead);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(5, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveSerialPortWrite(void)\n{\n\tchar *array;\n\tsqInt arrayPtr;\n\tsqInt bytesWritten;\n\tsqInt count;\n\tsqInt portNum;\n\tsqInt startIndex;\n\tsqInt _return_value;\n\n\tportNum = interpreterProxy->stackIntegerValue(3);\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(2)));\n\tarray = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(2))));\n\tstartIndex = interpreterProxy->stackIntegerValue(1);\n\tcount = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->success((startIndex >= 1)\n\t && (((startIndex + count) - 1) <= (interpreterProxy->byteSizeOf(((sqInt)(long)(array) - 4)))));\n\tif (!(interpreterProxy->failed())) {\n\t\tarrayPtr = ((((sqInt)array)) + startIndex) - 1;\n\t\tbytesWritten = serialPortWriteFrom(portNum, count, arrayPtr);\n\t}\n\t_return_value = interpreterProxy->integerObjectOf(bytesWritten);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(5, _return_value);\n\treturn null;\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n\tsqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\nEXPORT(sqInt)\nshutdownModule(void)\n{\n\treturn serialPortShutdown();\n}\n\nstatic void\nsqAssert(sqInt aBool)\n{\n\t/* missing DebugCode */;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* SerialPlugin_exports[][3] = {\n\t{\"SerialPlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"SerialPlugin\", \"initialiseModule\", (void*)initialiseModule},\n\t{\"SerialPlugin\", \"primitiveSerialPortClose\", (void*)primitiveSerialPortClose},\n\t{\"SerialPlugin\", \"primitiveSerialPortOpen\", (void*)primitiveSerialPortOpen},\n\t{\"SerialPlugin\", \"primitiveSerialPortRead\", (void*)primitiveSerialPortRead},\n\t{\"SerialPlugin\", \"primitiveSerialPortWrite\", (void*)primitiveSerialPortWrite},\n\t{\"SerialPlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{\"SerialPlugin\", \"shutdownModule\", (void*)shutdownModule},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/SlangTestSupportPlugin/SlangTestSupportPlugin.c",
    "content": "/* Automatically generated from Squeak on 23 January 2011 3:55:46 pm \n   by VMMaker 4.4.7\n */\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n/*** Function Prototypes ***/\nstatic sqInt declareExportFalseByMethod(void);\nstatic sqInt declareExportFalseByPragma(void);\n#pragma export on\nEXPORT(sqInt) declareExportTrueByMethod(void);\nEXPORT(sqInt) declareExportTrueByPragma(void);\n#pragma export off\nsqInt declareStaticFalseByMethod(void);\nsqInt declareStaticFalseByPragma(void);\nstatic sqInt declareStaticTrueByMethod(void);\nstatic sqInt declareStaticTrueByPragma(void);\nstatic VirtualMachine * getInterpreter(void);\n#pragma export on\nEXPORT(const char*) getModuleName(void);\n#pragma export off\nstatic sqInt halt(void);\nstatic sqInt inlineByMethod(void);\nstatic sqInt inlineByPragma(void);\nstatic sqInt methodThatShouldBeInlinedByMethod(void);\nstatic sqInt methodThatShouldBeInlinedByPragma(void);\nstatic sqInt methodThatShouldNotBeInlinedByMethod(void);\nstatic sqInt methodThatShouldNotBeInlinedByPragma(void);\nstatic sqInt msg(char *s);\nstatic char * returnTypeByMethod(void);\nstatic char * returnTypeByPragma(void);\n#pragma export on\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\n#pragma export off\nstatic sqInt varDefByMethod(void);\nstatic sqInt varDefByMethodAndPragma(void);\nstatic sqInt varDefByPragma(void);\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"SlangTestSupportPlugin 23 January 2011 (i)\"\n#else\n\t\"SlangTestSupportPlugin 23 January 2011 (e)\"\n#endif\n;\n\n\n\n/*\tSlangTestSupport asCString: #declareExportFalseByMethod */\n\nstatic sqInt declareExportFalseByMethod(void) {\n}\n\n\n/*\tSlangTestSupport asCString: #declareExportFalseByPragma */\n\nstatic sqInt declareExportFalseByPragma(void) {\n}\n\n\n/*\tSlangTestSupport asCString: #declareExportTrueByMethod */\n\nEXPORT(sqInt) declareExportTrueByMethod(void) {\n}\n\n\n/*\tSlangTestSupport asCString: #declareExportTrueByPragma */\n\nEXPORT(sqInt) declareExportTrueByPragma(void) {\n}\n\n\n/*\tSlangTestSupport asCString: #declareStaticFalseByMethod */\n\nsqInt declareStaticFalseByMethod(void) {\n}\n\n\n/*\tSlangTestSupport asCString: #declareStaticFalseByPragma */\n\nsqInt declareStaticFalseByPragma(void) {\n}\n\n\n/*\tSlangTestSupport asCString: #declareStaticTrueByMethod */\n\nstatic sqInt declareStaticTrueByMethod(void) {\n}\n\n\n/*\tSlangTestSupport asCString: #declareStaticTrueByPragma */\n\nstatic sqInt declareStaticTrueByPragma(void) {\n}\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine * getInterpreter(void) {\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*) getModuleName(void) {\n\treturn moduleName;\n}\n\nstatic sqInt halt(void) {\n\t;\n}\n\n\n/*\tSlangTestSupport asCString: #inlineByMethod */\n/*\tSlangTestSupport asInlinedCString: #inlineByMethod */\n\nstatic sqInt inlineByMethod(void) {\n    sqInt bar;\n    sqInt foo;\n\n\tfoo = \"foo\";\n\tbar = methodThatShouldNotBeInlinedByMethod();\n}\n\n\n/*\tSlangTestSupport asCString: #inlineByPragma */\n/*\tSlangTestSupport asInlinedCString: #inlineByPragma */\n\nstatic sqInt inlineByPragma(void) {\n    sqInt bar;\n    sqInt foo;\n\n\tfoo = \"foo\";\n\tbar = methodThatShouldNotBeInlinedByPragma();\n}\n\nstatic sqInt methodThatShouldBeInlinedByMethod(void) {\n\treturn \"foo\";\n}\n\nstatic sqInt methodThatShouldBeInlinedByPragma(void) {\n\treturn \"foo\";\n}\n\nstatic sqInt methodThatShouldNotBeInlinedByMethod(void) {\n\treturn \"bar\";\n}\n\nstatic sqInt methodThatShouldNotBeInlinedByPragma(void) {\n\treturn \"bar\";\n}\n\nstatic sqInt msg(char *s) {\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n}\n\n\n/*\tSlangTestSupport asCString: #returnTypeByMethod */\n\nstatic char * returnTypeByMethod(void) {\n}\n\n\n/*\tSlangTestSupport asCString: #returnTypeByPragma */\n\nstatic char * returnTypeByPragma(void) {\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter) {\n    sqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\n/*\tSlangTestSupport asCString: #varDefByMethod */\n\nstatic sqInt varDefByMethod(void) {\n    unsigned int * bar;\n    char *foo;\n\n}\n\n\n/*\tSlangTestSupportPlugin asCString: #varDefByMethodAndPragma */\n\nstatic sqInt varDefByMethodAndPragma(void) {\n    unsigned int * bar;\n    float baz;\n    char *foo;\n    double fum;\n\n}\n\n\n/*\tSlangTestSupport asCString: #varDefByPragma */\n\nstatic sqInt varDefByPragma(void) {\n    unsigned int * bar;\n    char *foo;\n\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\n\nvoid* SlangTestSupportPlugin_exports[][3] = {\n\t{\"SlangTestSupportPlugin\", \"declareExportTrueByMethod\", (void*)declareExportTrueByMethod},\n\t{\"SlangTestSupportPlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{\"SlangTestSupportPlugin\", \"declareExportTrueByPragma\", (void*)declareExportTrueByPragma},\n\t{\"SlangTestSupportPlugin\", \"getModuleName\", (void*)getModuleName},\n\t{NULL, NULL, NULL}\n};\n\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/SocketPlugin/SocketPlugin.c",
    "content": "/* Automatically generated by\n\tSmartSyntaxPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tSocketPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"SocketPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"SocketPlugin.h\"\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n\n/*** Function Prototypes ***/\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nEXPORT(sqInt) initialiseModule(void);\nstatic sqInt intToNetAddress(sqInt addr);\nEXPORT(void) moduleUnloaded(char *aModuleName);\nstatic sqInt msg(char *s);\nstatic sqInt netAddressToInt(unsigned char *  ptrToByteArray);\nEXPORT(void) primitiveDisableSocketAccess(void);\nEXPORT(void) primitiveHasSocketAccess(void);\nEXPORT(sqInt) primitiveInitializeNetwork(void);\nEXPORT(sqInt) primitiveResolverAbortLookup(void);\nEXPORT(sqInt) primitiveResolverAddressLookupResult(void);\nEXPORT(sqInt) primitiveResolverError(void);\nEXPORT(sqInt) primitiveResolverLocalAddress(void);\nEXPORT(sqInt) primitiveResolverNameLookupResult(void);\nEXPORT(sqInt) primitiveResolverStartAddressLookup(void);\nEXPORT(sqInt) primitiveResolverStartNameLookup(void);\nEXPORT(sqInt) primitiveResolverStatus(void);\nEXPORT(sqInt) primitiveSocketAbortConnection(void);\nEXPORT(sqInt) primitiveSocketAccept(void);\nEXPORT(sqInt) primitiveSocketAccept3Semaphores(void);\nEXPORT(sqInt) primitiveSocketBindToPort(void);\nEXPORT(sqInt) primitiveSocketCloseConnection(void);\nEXPORT(sqInt) primitiveSocketConnectionStatus(void);\nEXPORT(sqInt) primitiveSocketConnectToPort(void);\nEXPORT(sqInt) primitiveSocketCreate(void);\nEXPORT(sqInt) primitiveSocketCreate3Semaphores(void);\nEXPORT(sqInt) primitiveSocketCreateRAW(void);\nEXPORT(sqInt) primitiveSocketDestroy(void);\nEXPORT(sqInt) primitiveSocketError(void);\nEXPORT(sqInt) primitiveSocketGetOptions(void);\nEXPORT(sqInt) primitiveSocketListenOnPort(void);\nEXPORT(sqInt) primitiveSocketListenOnPortBacklog(void);\nEXPORT(sqInt) primitiveSocketListenOnPortBacklogInterface(void);\nEXPORT(sqInt) primitiveSocketListenWithOrWithoutBacklog(void);\nEXPORT(sqInt) primitiveSocketLocalAddress(void);\nEXPORT(sqInt) primitiveSocketLocalPort(void);\nEXPORT(sqInt) primitiveSocketReceiveDataAvailable(void);\nEXPORT(sqInt) primitiveSocketReceiveDataBufCount(void);\nEXPORT(sqInt) primitiveSocketReceiveUDPDataBufCount(void);\nEXPORT(sqInt) primitiveSocketRemoteAddress(void);\nEXPORT(sqInt) primitiveSocketRemotePort(void);\nEXPORT(sqInt) primitiveSocketSendDataBufCount(void);\nEXPORT(sqInt) primitiveSocketSendDone(void);\nEXPORT(sqInt) primitiveSocketSendUDPDataBufCount(void);\nEXPORT(sqInt) primitiveSocketSetOptions(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\nEXPORT(sqInt) shutdownModule(void);\nstatic sqInt socketRecordSize(void);\nstatic SocketPtr socketValueOf(sqInt socketOop);\nstatic void sqAssert(sqInt aBool);\n\n\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"SocketPlugin VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"SocketPlugin VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\nstatic void * sCCLOPfn;\nstatic void * sCCSOTfn;\nstatic void * sCCTPfn;\nstatic void * sDSAfn;\nstatic void * sHSAfn;\n\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nEXPORT(sqInt)\ninitialiseModule(void)\n{\n\tsDSAfn = interpreterProxy->ioLoadFunctionFrom(\"secDisableSocketAccess\", \"SecurityPlugin\");\n\tsHSAfn = interpreterProxy->ioLoadFunctionFrom(\"secHasSocketAccess\", \"SecurityPlugin\");\n\tsCCTPfn = interpreterProxy->ioLoadFunctionFrom(\"secCanConnectToPort\", \"SecurityPlugin\");\n\tsCCLOPfn = interpreterProxy->ioLoadFunctionFrom(\"secCanListenOnPort\", \"SecurityPlugin\");\n\tsCCSOTfn = interpreterProxy->ioLoadFunctionFrom(\"secCanCreateSocketOfType\", \"SecurityPlugin\");\n\treturn socketInit();\n}\n\n\n/*\tConvert the given 32-bit integer into an internet network address\n\trepresented as a four-byte ByteArray.\n */\n\nstatic sqInt\nintToNetAddress(sqInt addr)\n{\n\tchar *  naPtr;\n\tsqInt netAddressOop;\n\n\tnetAddressOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), 4);\n\tnaPtr = (char *) interpreterProxy->firstIndexableField(netAddressOop);\n\tnaPtr[0] = (((char) ((((usqInt) addr) >> 24) & 255)));\n\tnaPtr[1] = (((char) ((((usqInt) addr) >> 16) & 255)));\n\tnaPtr[2] = (((char) ((((usqInt) addr) >> 8) & 255)));\n\tnaPtr[3] = (((char) (addr & 255)));\n\treturn netAddressOop;\n}\n\n\n/*\tThe module with the given name was just unloaded.\n\tMake sure we have no dangling references. */\n\nEXPORT(void)\nmoduleUnloaded(char *aModuleName)\n{\n\tif ((strcmp(aModuleName, \"SecurityPlugin\")) == 0) {\n\t\tsDSAfn = sHSAfn = sCCTPfn = sCCLOPfn = sCCSOTfn = 0;\n\t}\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\n\n/*\tConvert the given internet network address (represented as a four-byte\n\tByteArray) into a 32-bit integer. Fail if the given ptrToByteArray does\n\tnot appear to point to a four-byte ByteArray.\n */\n\nstatic sqInt\nnetAddressToInt(unsigned char *  ptrToByteArray)\n{\n\tsqInt sz;\n\n\tsz = interpreterProxy->byteSizeOf(((sqInt)(long)(ptrToByteArray) - 4));\n\tif (!(sz == 4)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\treturn (((ptrToByteArray[3]) + ((ptrToByteArray[2]) << 8)) + ((ptrToByteArray[1]) << 16)) + ((ptrToByteArray[0]) << 24);\n}\n\n\n/*\tIf the security plugin can be loaded, use it to turn off socket access\n\tIf not, assume it's ok */\n\nEXPORT(void)\nprimitiveDisableSocketAccess(void)\n{\n\tif (sDSAfn != 0) {\n\t\t((int (*) (void)) sDSAfn)();\n\t}\n}\n\nEXPORT(void)\nprimitiveHasSocketAccess(void)\n{\n\tsqInt hasAccess;\n\n\thasAccess = (sHSAfn == 0)\n\t || ( ((int (*) (void)) sHSAfn)());\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushBool(hasAccess);\n}\n\nEXPORT(sqInt)\nprimitiveInitializeNetwork(void)\n{\n\tsqInt err;\n\tsqInt resolverSemaIndex;\n\n\tresolverSemaIndex = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\terr = sqNetworkInit(resolverSemaIndex);\n\tinterpreterProxy->success(err == 0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(1);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveResolverAbortLookup(void)\n{\n\tsqResolverAbort();\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveResolverAddressLookupResult(void)\n{\n\tsqInt s;\n\tsqInt sz;\n\n\tsz = sqResolverAddrLookupResultSize();\n\tif (!(interpreterProxy->failed())) {\n\t\ts = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), sz);\n\t\tsqResolverAddrLookupResult((char *) interpreterProxy->firstIndexableField(s), sz);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, s);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveResolverError(void)\n{\n\tsqInt _return_value;\n\n\t_return_value = interpreterProxy->integerObjectOf((sqResolverError()));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveResolverLocalAddress(void)\n{\n\tsqInt addr;\n\tsqInt _return_value;\n\n\taddr = sqResolverLocalAddress();\n\t_return_value = intToNetAddress(addr);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveResolverNameLookupResult(void)\n{\n\tsqInt addr;\n\tsqInt _return_value;\n\n\taddr = sqResolverNameLookupResult();\n\t_return_value = intToNetAddress(addr);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveResolverStartAddressLookup(void)\n{\n\tsqInt addr;\n\tchar *address;\n\tsqInt sz;\n\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\n\taddress = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin netAddressToInt: */\n\tsz = interpreterProxy->byteSizeOf(((sqInt)(long)((((unsigned char *) address))) - 4));\n\tif (!(sz == 4)) {\n\t\taddr = interpreterProxy->primitiveFail();\n\t\tgoto l1;\n\t}\n\taddr = ((((((unsigned char *) address))[3]) + (((((unsigned char *) address))[2]) << 8)) + (((((unsigned char *) address))[1]) << 16)) + (((((unsigned char *) address))[0]) << 24);\nl1:\t/* end netAddressToInt: */;\n\tif (!(interpreterProxy->failed())) {\n\t\tsqResolverStartAddrLookup(addr);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(1);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveResolverStartNameLookup(void)\n{\n\tchar *name;\n\tsqInt sz;\n\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\n\tname = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tsz = interpreterProxy->byteSizeOf(((sqInt)(long)(name) - 4));\n\t\tsqResolverStartNameLookup(name, sz);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(1);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveResolverStatus(void)\n{\n\tsqInt status;\n\tsqInt _return_value;\n\n\tstatus = sqResolverStatus();\n\t_return_value = interpreterProxy->integerObjectOf(status);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveSocketAbortConnection(void)\n{\n\tSocketPtr  s;\n\tsqInt socket;\n\tvoid *socketIndex;\n\n\tsocket = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin socketValueOf: */\n\tinterpreterProxy->success((interpreterProxy->isBytes(socket))\n\t && ((interpreterProxy->byteSizeOf(socket)) == (socketRecordSize())));\n\tif (interpreterProxy->failed()) {\n\t\ts = null;\n\t\tgoto l1;\n\t}\n\tsocketIndex = ((SocketPtr) (interpreterProxy->firstIndexableField(socket)));\n\ts = socketIndex;\nl1:\t/* end socketValueOf: */;\n\tif (!(interpreterProxy->failed())) {\n\t\tsqSocketAbortConnection(s);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(1);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveSocketAccept(void)\n{\n\tsqInt recvBufSize;\n\tSocketPtr  s;\n\tsqInt semaIndex;\n\tsqInt sendBufSize;\n\tSocketPtr  serverSocket;\n\tvoid *socketIndex;\n\tvoid *socketIndex1;\n\tsqInt socketOop;\n\tsqInt sockHandle;\n\n\tsockHandle = interpreterProxy->stackValue(3);\n\trecvBufSize = interpreterProxy->stackIntegerValue(2);\n\tsendBufSize = interpreterProxy->stackIntegerValue(1);\n\tsemaIndex = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin socketValueOf: */\n\tinterpreterProxy->success((interpreterProxy->isBytes(sockHandle))\n\t && ((interpreterProxy->byteSizeOf(sockHandle)) == (socketRecordSize())));\n\tif (interpreterProxy->failed()) {\n\t\tserverSocket = null;\n\t\tgoto l2;\n\t}\n\tsocketIndex1 = ((SocketPtr) (interpreterProxy->firstIndexableField(sockHandle)));\n\tserverSocket = socketIndex1;\nl2:\t/* end socketValueOf: */;\n\tif (!(interpreterProxy->failed())) {\n\t\tsocketOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), socketRecordSize());\n\t\t/* begin socketValueOf: */\n\t\tinterpreterProxy->success((interpreterProxy->isBytes(socketOop))\n\t\t && ((interpreterProxy->byteSizeOf(socketOop)) == (socketRecordSize())));\n\t\tif (interpreterProxy->failed()) {\n\t\t\ts = null;\n\t\t\tgoto l1;\n\t\t}\n\t\tsocketIndex = ((SocketPtr) (interpreterProxy->firstIndexableField(socketOop)));\n\t\ts = socketIndex;\n\tl1:\t/* end socketValueOf: */;\n\t\tsqSocketAcceptFromRecvBytesSendBytesSemaID(s, serverSocket, recvBufSize, sendBufSize, semaIndex);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(5, socketOop);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveSocketAccept3Semaphores(void)\n{\n\tsqInt aReadSema;\n\tsqInt aWriteSema;\n\tsqInt recvBufSize;\n\tSocketPtr  s;\n\tsqInt semaIndex;\n\tsqInt sendBufSize;\n\tSocketPtr  serverSocket;\n\tvoid *socketIndex;\n\tvoid *socketIndex1;\n\tsqInt socketOop;\n\tsqInt sockHandle;\n\n\tsockHandle = interpreterProxy->stackValue(5);\n\trecvBufSize = interpreterProxy->stackIntegerValue(4);\n\tsendBufSize = interpreterProxy->stackIntegerValue(3);\n\tsemaIndex = interpreterProxy->stackIntegerValue(2);\n\taReadSema = interpreterProxy->stackIntegerValue(1);\n\taWriteSema = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin socketValueOf: */\n\tinterpreterProxy->success((interpreterProxy->isBytes(sockHandle))\n\t && ((interpreterProxy->byteSizeOf(sockHandle)) == (socketRecordSize())));\n\tif (interpreterProxy->failed()) {\n\t\tserverSocket = null;\n\t\tgoto l2;\n\t}\n\tsocketIndex1 = ((SocketPtr) (interpreterProxy->firstIndexableField(sockHandle)));\n\tserverSocket = socketIndex1;\nl2:\t/* end socketValueOf: */;\n\tif (!(interpreterProxy->failed())) {\n\t\tsocketOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), socketRecordSize());\n\t\t/* begin socketValueOf: */\n\t\tinterpreterProxy->success((interpreterProxy->isBytes(socketOop))\n\t\t && ((interpreterProxy->byteSizeOf(socketOop)) == (socketRecordSize())));\n\t\tif (interpreterProxy->failed()) {\n\t\t\ts = null;\n\t\t\tgoto l1;\n\t\t}\n\t\tsocketIndex = ((SocketPtr) (interpreterProxy->firstIndexableField(socketOop)));\n\t\ts = socketIndex;\n\tl1:\t/* end socketValueOf: */;\n\t\tsqSocketAcceptFromRecvBytesSendBytesSemaIDReadSemaIDWriteSemaID(s, serverSocket, recvBufSize, sendBufSize, semaIndex, aReadSema, aWriteSema);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(7, socketOop);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveSocketBindToPort(void)\n{\n\tsqInt addr;\n\tchar *address;\n\tsqInt port;\n\tSocketPtr s;\n\tsqInt socket;\n\tvoid *socketIndex;\n\tsqInt sz;\n\n\tsocket = interpreterProxy->stackValue(2);\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(1)));\n\taddress = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(1))));\n\tport = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin netAddressToInt: */\n\tsz = interpreterProxy->byteSizeOf(((sqInt)(long)((((unsigned char *) address))) - 4));\n\tif (!(sz == 4)) {\n\t\taddr = interpreterProxy->primitiveFail();\n\t\tgoto l1;\n\t}\n\taddr = ((((((unsigned char *) address))[3]) + (((((unsigned char *) address))[2]) << 8)) + (((((unsigned char *) address))[1]) << 16)) + (((((unsigned char *) address))[0]) << 24);\nl1:\t/* end netAddressToInt: */;\n\t/* begin socketValueOf: */\n\tinterpreterProxy->success((interpreterProxy->isBytes(socket))\n\t && ((interpreterProxy->byteSizeOf(socket)) == (socketRecordSize())));\n\tif (interpreterProxy->failed()) {\n\t\ts = null;\n\t\tgoto l2;\n\t}\n\tsocketIndex = ((SocketPtr) (interpreterProxy->firstIndexableField(socket)));\n\ts = socketIndex;\nl2:\t/* end socketValueOf: */;\n\tif (!(interpreterProxy->failed())) {\n\t\tsqSocketBindToPort(s, addr, port);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(3);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveSocketCloseConnection(void)\n{\n\tSocketPtr  s;\n\tsqInt socket;\n\tvoid *socketIndex;\n\n\tsocket = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin socketValueOf: */\n\tinterpreterProxy->success((interpreterProxy->isBytes(socket))\n\t && ((interpreterProxy->byteSizeOf(socket)) == (socketRecordSize())));\n\tif (interpreterProxy->failed()) {\n\t\ts = null;\n\t\tgoto l1;\n\t}\n\tsocketIndex = ((SocketPtr) (interpreterProxy->firstIndexableField(socket)));\n\ts = socketIndex;\nl1:\t/* end socketValueOf: */;\n\tif (!(interpreterProxy->failed())) {\n\t\tsqSocketCloseConnection(s);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(1);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveSocketConnectionStatus(void)\n{\n\tSocketPtr  s;\n\tsqInt socket;\n\tvoid *socketIndex;\n\tsqInt status;\n\tsqInt _return_value;\n\n\tsocket = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin socketValueOf: */\n\tinterpreterProxy->success((interpreterProxy->isBytes(socket))\n\t && ((interpreterProxy->byteSizeOf(socket)) == (socketRecordSize())));\n\tif (interpreterProxy->failed()) {\n\t\ts = null;\n\t\tgoto l1;\n\t}\n\tsocketIndex = ((SocketPtr) (interpreterProxy->firstIndexableField(socket)));\n\ts = socketIndex;\nl1:\t/* end socketValueOf: */;\n\tif (!(interpreterProxy->failed())) {\n\t\tstatus = sqSocketConnectionStatus(s);\n\t}\n\t_return_value = interpreterProxy->integerObjectOf(status);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveSocketConnectToPort(void)\n{\n\tsqInt addr;\n\tchar *address;\n\tsqInt okToConnect;\n\tsqInt port;\n\tSocketPtr s;\n\tsqInt socket;\n\tvoid *socketIndex;\n\tsqInt sz;\n\n\tsocket = interpreterProxy->stackValue(2);\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(1)));\n\taddress = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(1))));\n\tport = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin netAddressToInt: */\n\tsz = interpreterProxy->byteSizeOf(((sqInt)(long)((((unsigned char *) address))) - 4));\n\tif (!(sz == 4)) {\n\t\taddr = interpreterProxy->primitiveFail();\n\t\tgoto l1;\n\t}\n\taddr = ((((((unsigned char *) address))[3]) + (((((unsigned char *) address))[2]) << 8)) + (((((unsigned char *) address))[1]) << 16)) + (((((unsigned char *) address))[0]) << 24);\nl1:\t/* end netAddressToInt: */;\n\tif (sCCTPfn != 0) {\n\t\tokToConnect =  ((int (*) (int, int)) sCCTPfn)(addr, port);\n\t\tif (!(okToConnect)) {\n\t\t\tinterpreterProxy->primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\t/* begin socketValueOf: */\n\tinterpreterProxy->success((interpreterProxy->isBytes(socket))\n\t && ((interpreterProxy->byteSizeOf(socket)) == (socketRecordSize())));\n\tif (interpreterProxy->failed()) {\n\t\ts = null;\n\t\tgoto l2;\n\t}\n\tsocketIndex = ((SocketPtr) (interpreterProxy->firstIndexableField(socket)));\n\ts = socketIndex;\nl2:\t/* end socketValueOf: */;\n\tif (!(interpreterProxy->failed())) {\n\t\tsqSocketConnectToPort(s, addr, port);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(3);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveSocketCreate(void)\n{\n\tsqInt netType;\n\tsqInt okToCreate;\n\tsqInt recvBufSize;\n\tSocketPtr  s;\n\tsqInt semaIndex;\n\tsqInt sendBufSize;\n\tvoid *socketIndex;\n\tsqInt socketOop;\n\tsqInt socketType;\n\n\tnetType = interpreterProxy->stackIntegerValue(4);\n\tsocketType = interpreterProxy->stackIntegerValue(3);\n\trecvBufSize = interpreterProxy->stackIntegerValue(2);\n\tsendBufSize = interpreterProxy->stackIntegerValue(1);\n\tsemaIndex = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (sCCSOTfn != 0) {\n\t\tokToCreate =  ((int (*) (int, int)) sCCSOTfn)(netType, socketType);\n\t\tif (!(okToCreate)) {\n\t\t\tinterpreterProxy->primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tsocketOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), socketRecordSize());\n\t/* begin socketValueOf: */\n\tinterpreterProxy->success((interpreterProxy->isBytes(socketOop))\n\t && ((interpreterProxy->byteSizeOf(socketOop)) == (socketRecordSize())));\n\tif (interpreterProxy->failed()) {\n\t\ts = null;\n\t\tgoto l1;\n\t}\n\tsocketIndex = ((SocketPtr) (interpreterProxy->firstIndexableField(socketOop)));\n\ts = socketIndex;\nl1:\t/* end socketValueOf: */;\n\tsqSocketCreateNetTypeSocketTypeRecvBytesSendBytesSemaID(s, netType, socketType, recvBufSize, sendBufSize, semaIndex);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(6, socketOop);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveSocketCreate3Semaphores(void)\n{\n\tsqInt aReadSema;\n\tsqInt aWriteSema;\n\tsqInt netType;\n\tsqInt okToCreate;\n\tsqInt recvBufSize;\n\tSocketPtr  s;\n\tsqInt semaIndex;\n\tsqInt sendBufSize;\n\tvoid *socketIndex;\n\tsqInt socketOop;\n\tsqInt socketType;\n\n\tnetType = interpreterProxy->stackIntegerValue(6);\n\tsocketType = interpreterProxy->stackIntegerValue(5);\n\trecvBufSize = interpreterProxy->stackIntegerValue(4);\n\tsendBufSize = interpreterProxy->stackIntegerValue(3);\n\tsemaIndex = interpreterProxy->stackIntegerValue(2);\n\taReadSema = interpreterProxy->stackIntegerValue(1);\n\taWriteSema = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (sCCSOTfn != 0) {\n\t\tokToCreate =  ((int (*) (int, int)) sCCSOTfn)(netType, socketType);\n\t\tif (!(okToCreate)) {\n\t\t\tinterpreterProxy->primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tsocketOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), socketRecordSize());\n\t/* begin socketValueOf: */\n\tinterpreterProxy->success((interpreterProxy->isBytes(socketOop))\n\t && ((interpreterProxy->byteSizeOf(socketOop)) == (socketRecordSize())));\n\tif (interpreterProxy->failed()) {\n\t\ts = null;\n\t\tgoto l1;\n\t}\n\tsocketIndex = ((SocketPtr) (interpreterProxy->firstIndexableField(socketOop)));\n\ts = socketIndex;\nl1:\t/* end socketValueOf: */;\n\tsqSocketCreateNetTypeSocketTypeRecvBytesSendBytesSemaIDReadSemaIDWriteSemaID(s, netType, socketType, recvBufSize, sendBufSize, semaIndex, aReadSema, aWriteSema);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(8, socketOop);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveSocketCreateRAW(void)\n{\n\tsqInt aReadSema;\n\tsqInt aWriteSema;\n\tsqInt netType;\n\tsqInt okToCreate;\n\tsqInt protoType;\n\tsqInt recvBufSize;\n\tSocketPtr  s;\n\tsqInt semaIndex;\n\tsqInt sendBufSize;\n\tvoid *socketIndex;\n\tsqInt socketOop;\n\n\tnetType = interpreterProxy->stackIntegerValue(6);\n\tprotoType = interpreterProxy->stackIntegerValue(5);\n\trecvBufSize = interpreterProxy->stackIntegerValue(4);\n\tsendBufSize = interpreterProxy->stackIntegerValue(3);\n\tsemaIndex = interpreterProxy->stackIntegerValue(2);\n\taReadSema = interpreterProxy->stackIntegerValue(1);\n\taWriteSema = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (sCCSOTfn != 0) {\n\t\tokToCreate =  ((int (*) (int, int)) sCCSOTfn)(netType, protoType);\n\t\tif (!(okToCreate)) {\n\t\t\tinterpreterProxy->primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tsocketOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), socketRecordSize());\n\t/* begin socketValueOf: */\n\tinterpreterProxy->success((interpreterProxy->isBytes(socketOop))\n\t && ((interpreterProxy->byteSizeOf(socketOop)) == (socketRecordSize())));\n\tif (interpreterProxy->failed()) {\n\t\ts = null;\n\t\tgoto l1;\n\t}\n\tsocketIndex = ((SocketPtr) (interpreterProxy->firstIndexableField(socketOop)));\n\ts = socketIndex;\nl1:\t/* end socketValueOf: */;\n\tsqSocketCreateRawProtoTypeRecvBytesSendBytesSemaIDReadSemaIDWriteSemaID(s, netType, protoType, recvBufSize, sendBufSize, semaIndex, aReadSema, aWriteSema);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(8, socketOop);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveSocketDestroy(void)\n{\n\tSocketPtr s;\n\tsqInt socket;\n\tvoid *socketIndex;\n\n\tsocket = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin socketValueOf: */\n\tinterpreterProxy->success((interpreterProxy->isBytes(socket))\n\t && ((interpreterProxy->byteSizeOf(socket)) == (socketRecordSize())));\n\tif (interpreterProxy->failed()) {\n\t\ts = null;\n\t\tgoto l1;\n\t}\n\tsocketIndex = ((SocketPtr) (interpreterProxy->firstIndexableField(socket)));\n\ts = socketIndex;\nl1:\t/* end socketValueOf: */;\n\tif (!(interpreterProxy->failed())) {\n\t\tsqSocketDestroy(s);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(1);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveSocketError(void)\n{\n\tsqInt err;\n\tSocketPtr  s;\n\tsqInt socket;\n\tvoid *socketIndex;\n\tsqInt _return_value;\n\n\tsocket = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin socketValueOf: */\n\tinterpreterProxy->success((interpreterProxy->isBytes(socket))\n\t && ((interpreterProxy->byteSizeOf(socket)) == (socketRecordSize())));\n\tif (interpreterProxy->failed()) {\n\t\ts = null;\n\t\tgoto l1;\n\t}\n\tsocketIndex = ((SocketPtr) (interpreterProxy->firstIndexableField(socket)));\n\ts = socketIndex;\nl1:\t/* end socketValueOf: */;\n\tif (!(interpreterProxy->failed())) {\n\t\terr = sqSocketError(s);\n\t}\n\t_return_value = interpreterProxy->integerObjectOf(err);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveSocketGetOptions(void)\n{\n\tsqInt errorCode;\n\tsqInt optionName;\n\tsqInt optionNameSize;\n\tchar *optionNameStart;\n\tsqInt results;\n\tsqInt returnedValue;\n\tSocketPtr s;\n\tsqInt socket;\n\tvoid *socketIndex;\n\n\tsocket = interpreterProxy->stackValue(1);\n\toptionName = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin socketValueOf: */\n\tinterpreterProxy->success((interpreterProxy->isBytes(socket))\n\t && ((interpreterProxy->byteSizeOf(socket)) == (socketRecordSize())));\n\tif (interpreterProxy->failed()) {\n\t\ts = null;\n\t\tgoto l1;\n\t}\n\tsocketIndex = ((SocketPtr) (interpreterProxy->firstIndexableField(socket)));\n\ts = socketIndex;\nl1:\t/* end socketValueOf: */;\n\tinterpreterProxy->success(interpreterProxy->isBytes(optionName));\n\toptionNameStart = ((char *) (interpreterProxy->firstIndexableField(optionName)));\n\toptionNameSize = interpreterProxy->slotSizeOf(optionName);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\treturnedValue = 0;\n\terrorCode = sqSocketGetOptionsoptionNameStartoptionNameSizereturnedValue(s, optionNameStart, optionNameSize, &returnedValue);\n\tinterpreterProxy->pushRemappableOop(interpreterProxy->integerObjectOf(returnedValue));\n\tinterpreterProxy->pushRemappableOop(interpreterProxy->integerObjectOf(errorCode));\n\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2));\n\tresults = interpreterProxy->popRemappableOop();\n\tinterpreterProxy->storePointerofObjectwithValue(0, results, interpreterProxy->popRemappableOop());\n\tinterpreterProxy->storePointerofObjectwithValue(1, results, interpreterProxy->popRemappableOop());\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(3, results);\n\treturn null;\n}\n\n\n/*\tone part of the wierdass dual prim primitiveSocketListenOnPort which \n\twas warped by some demented evil person determined to twist the very \n\tnature of reality */\n\nEXPORT(sqInt)\nprimitiveSocketListenOnPort(void)\n{\n\tsqInt okToListen;\n\tsqInt port;\n\tSocketPtr  s;\n\tsqInt socket;\n\tvoid *socketIndex;\n\n\tsocket = interpreterProxy->stackValue(1);\n\tport = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin socketValueOf: */\n\tinterpreterProxy->success((interpreterProxy->isBytes(socket))\n\t && ((interpreterProxy->byteSizeOf(socket)) == (socketRecordSize())));\n\tif (interpreterProxy->failed()) {\n\t\ts = null;\n\t\tgoto l1;\n\t}\n\tsocketIndex = ((SocketPtr) (interpreterProxy->firstIndexableField(socket)));\n\ts = socketIndex;\nl1:\t/* end socketValueOf: */;\n\tif (sCCLOPfn != 0) {\n\t\tokToListen =  ((int (*) (SocketPtr, int)) sCCLOPfn)(s, port);\n\t\tif (!(okToListen)) {\n\t\t\tinterpreterProxy->primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tsqSocketListenOnPort(s, port);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(2);\n\treturn null;\n}\n\n\n/*\tsecond part of the wierdass dual prim primitiveSocketListenOnPort \n\twhich was warped by some demented evil person determined to twist the \n\tvery nature of reality */\n\nEXPORT(sqInt)\nprimitiveSocketListenOnPortBacklog(void)\n{\n\tsqInt backlog;\n\tsqInt okToListen;\n\tsqInt port;\n\tSocketPtr s;\n\tsqInt socket;\n\tvoid *socketIndex;\n\n\tsocket = interpreterProxy->stackValue(2);\n\tport = interpreterProxy->stackIntegerValue(1);\n\tbacklog = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin socketValueOf: */\n\tinterpreterProxy->success((interpreterProxy->isBytes(socket))\n\t && ((interpreterProxy->byteSizeOf(socket)) == (socketRecordSize())));\n\tif (interpreterProxy->failed()) {\n\t\ts = null;\n\t\tgoto l1;\n\t}\n\tsocketIndex = ((SocketPtr) (interpreterProxy->firstIndexableField(socket)));\n\ts = socketIndex;\nl1:\t/* end socketValueOf: */;\n\tif (sCCLOPfn != 0) {\n\t\tokToListen =  ((int (*) (SocketPtr, int)) sCCLOPfn)(s, port);\n\t\tif (!(okToListen)) {\n\t\t\tinterpreterProxy->primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tsqSocketListenOnPortBacklogSize(s, port, backlog);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(3);\n\treturn null;\n}\n\n\n/*\tBind a socket to the given port and interface address with no more than\n\tbacklog pending connections. The socket can be UDP, in which case the\n\tbacklog should be specified as zero.\n */\n\nEXPORT(sqInt)\nprimitiveSocketListenOnPortBacklogInterface(void)\n{\n\tsqInt addr;\n\tsqInt backlog;\n\tchar *ifAddr;\n\tsqInt okToListen;\n\tsqInt port;\n\tSocketPtr s;\n\tsqInt socket;\n\tvoid *socketIndex;\n\tsqInt sz;\n\n\tsocket = interpreterProxy->stackValue(3);\n\tport = interpreterProxy->stackIntegerValue(2);\n\tbacklog = interpreterProxy->stackIntegerValue(1);\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\n\tifAddr = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin socketValueOf: */\n\tinterpreterProxy->success((interpreterProxy->isBytes(socket))\n\t && ((interpreterProxy->byteSizeOf(socket)) == (socketRecordSize())));\n\tif (interpreterProxy->failed()) {\n\t\ts = null;\n\t\tgoto l2;\n\t}\n\tsocketIndex = ((SocketPtr) (interpreterProxy->firstIndexableField(socket)));\n\ts = socketIndex;\nl2:\t/* end socketValueOf: */;\n\tif (sCCLOPfn != 0) {\n\t\tokToListen =  ((int (*) (SocketPtr, int)) sCCLOPfn)(s, port);\n\t\tif (!(okToListen)) {\n\t\t\tinterpreterProxy->primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\t/* begin netAddressToInt: */\n\tsz = interpreterProxy->byteSizeOf(((sqInt)(long)((((unsigned char *) ifAddr))) - 4));\n\tif (!(sz == 4)) {\n\t\taddr = interpreterProxy->primitiveFail();\n\t\tgoto l1;\n\t}\n\taddr = ((((((unsigned char *) ifAddr))[3]) + (((((unsigned char *) ifAddr))[2]) << 8)) + (((((unsigned char *) ifAddr))[1]) << 16)) + (((((unsigned char *) ifAddr))[0]) << 24);\nl1:\t/* end netAddressToInt: */;\n\tsqSocketListenOnPortBacklogSizeInterface(s, port, backlog, addr);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(4);\n\treturn null;\n}\n\n\n/*\tBackward compatibility */\n\nEXPORT(sqInt)\nprimitiveSocketListenWithOrWithoutBacklog(void)\n{\n\tif ((interpreterProxy->methodArgumentCount()) == 2) {\n\t\treturn primitiveSocketListenOnPort();\n\t}\n\telse {\n\t\treturn primitiveSocketListenOnPortBacklog();\n\t}\n}\n\nEXPORT(sqInt)\nprimitiveSocketLocalAddress(void)\n{\n\tsqInt addr;\n\tSocketPtr s;\n\tsqInt socket;\n\tvoid *socketIndex;\n\tsqInt _return_value;\n\n\tsocket = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin socketValueOf: */\n\tinterpreterProxy->success((interpreterProxy->isBytes(socket))\n\t && ((interpreterProxy->byteSizeOf(socket)) == (socketRecordSize())));\n\tif (interpreterProxy->failed()) {\n\t\ts = null;\n\t\tgoto l1;\n\t}\n\tsocketIndex = ((SocketPtr) (interpreterProxy->firstIndexableField(socket)));\n\ts = socketIndex;\nl1:\t/* end socketValueOf: */;\n\taddr = sqSocketLocalAddress(s);\n\t_return_value = intToNetAddress(addr);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveSocketLocalPort(void)\n{\n\tsqInt port;\n\tSocketPtr  s;\n\tsqInt socket;\n\tvoid *socketIndex;\n\tsqInt _return_value;\n\n\tsocket = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin socketValueOf: */\n\tinterpreterProxy->success((interpreterProxy->isBytes(socket))\n\t && ((interpreterProxy->byteSizeOf(socket)) == (socketRecordSize())));\n\tif (interpreterProxy->failed()) {\n\t\ts = null;\n\t\tgoto l1;\n\t}\n\tsocketIndex = ((SocketPtr) (interpreterProxy->firstIndexableField(socket)));\n\ts = socketIndex;\nl1:\t/* end socketValueOf: */;\n\tport = sqSocketLocalPort(s);\n\t_return_value = interpreterProxy->integerObjectOf(port);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveSocketReceiveDataAvailable(void)\n{\n\tsqInt dataIsAvailable;\n\tSocketPtr s;\n\tsqInt socket;\n\tvoid *socketIndex;\n\tsqInt _return_value;\n\n\tsocket = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin socketValueOf: */\n\tinterpreterProxy->success((interpreterProxy->isBytes(socket))\n\t && ((interpreterProxy->byteSizeOf(socket)) == (socketRecordSize())));\n\tif (interpreterProxy->failed()) {\n\t\ts = null;\n\t\tgoto l1;\n\t}\n\tsocketIndex = ((SocketPtr) (interpreterProxy->firstIndexableField(socket)));\n\ts = socketIndex;\nl1:\t/* end socketValueOf: */;\n\tdataIsAvailable = sqSocketReceiveDataAvailable(s);\n\t_return_value = (dataIsAvailable) ? interpreterProxy->trueObject(): interpreterProxy->falseObject();\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveSocketReceiveDataBufCount(void)\n{\n\tsqInt array;\n\tchar *arrayBase;\n\tchar *bufStart;\n\tsqInt byteSize;\n\tsqInt bytesReceived;\n\tsqInt count;\n\tSocketPtr s;\n\tsqInt socket;\n\tvoid *socketIndex;\n\tsqInt startIndex;\n\tsqInt _return_value;\n\n\tsocket = interpreterProxy->stackValue(3);\n\tarray = interpreterProxy->stackValue(2);\n\tstartIndex = interpreterProxy->stackIntegerValue(1);\n\tcount = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin socketValueOf: */\n\tinterpreterProxy->success((interpreterProxy->isBytes(socket))\n\t && ((interpreterProxy->byteSizeOf(socket)) == (socketRecordSize())));\n\tif (interpreterProxy->failed()) {\n\t\ts = null;\n\t\tgoto l1;\n\t}\n\tsocketIndex = ((SocketPtr) (interpreterProxy->firstIndexableField(socket)));\n\ts = socketIndex;\nl1:\t/* end socketValueOf: */;\n\tinterpreterProxy->success(interpreterProxy->isWordsOrBytes(array));\n\tif (interpreterProxy->isWords(array)) {\n\t\tbyteSize = 4;\n\t}\n\telse {\n\t\tbyteSize = 1;\n\t}\n\tinterpreterProxy->success((startIndex >= 1)\n\t && ((count >= 0)\n && (((startIndex + count) - 1) <= (interpreterProxy->slotSizeOf(array)))));\n\tif (!(interpreterProxy->failed())) {\n\n\t\t/* Note: adjust bufStart for zero-origin indexing */\n\n\t\tarrayBase = ((char *) (interpreterProxy->firstIndexableField(array)));\n\t\tbufStart = arrayBase + ((startIndex - 1) * byteSize);\n\t\tbytesReceived = sqSocketReceiveDataBufCount(s, bufStart, count * byteSize);\n\t}\n\t_return_value = interpreterProxy->integerObjectOf((bytesReceived / byteSize));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(5, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveSocketReceiveUDPDataBufCount(void)\n{\n\tsqInt address;\n\tsqInt array;\n\tchar *arrayBase;\n\tchar *bufStart;\n\tsqInt byteSize;\n\tsqInt bytesReceived;\n\tsqInt count;\n\tsqInt moreFlag;\n\tsqInt port;\n\tsqInt results;\n\tSocketPtr s;\n\tsqInt socket;\n\tvoid *socketIndex;\n\tsqInt startIndex;\n\n\tsocket = interpreterProxy->stackValue(3);\n\tarray = interpreterProxy->stackValue(2);\n\tstartIndex = interpreterProxy->stackIntegerValue(1);\n\tcount = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin socketValueOf: */\n\tinterpreterProxy->success((interpreterProxy->isBytes(socket))\n\t && ((interpreterProxy->byteSizeOf(socket)) == (socketRecordSize())));\n\tif (interpreterProxy->failed()) {\n\t\ts = null;\n\t\tgoto l1;\n\t}\n\tsocketIndex = ((SocketPtr) (interpreterProxy->firstIndexableField(socket)));\n\ts = socketIndex;\nl1:\t/* end socketValueOf: */;\n\tinterpreterProxy->success(interpreterProxy->isWordsOrBytes(array));\n\tif (interpreterProxy->isWords(array)) {\n\t\tbyteSize = 4;\n\t}\n\telse {\n\t\tbyteSize = 1;\n\t}\n\tinterpreterProxy->success((startIndex >= 1)\n\t && ((count >= 0)\n && (((startIndex + count) - 1) <= (interpreterProxy->slotSizeOf(array)))));\n\tif (!(interpreterProxy->failed())) {\n\n\t\t/* Note: adjust bufStart for zero-origin indexing */\n\n\t\tarrayBase = ((char *) (interpreterProxy->firstIndexableField(array)));\n\n\t\t/* allocate storage for results, remapping newly allocated\n\t\t\t oops in case GC happens during allocation */\n\n\t\tbufStart = arrayBase + ((startIndex - 1) * byteSize);\n\t\taddress = 0;\n\t\tport = 0;\n\t\tmoreFlag = 0;\n\t\tbytesReceived = sqSocketReceiveUDPDataBufCountaddressportmoreFlag(s, bufStart, count * byteSize, &address, &port, &moreFlag);\n\t\tinterpreterProxy->pushRemappableOop(interpreterProxy->integerObjectOf(port));\n\t\tinterpreterProxy->pushRemappableOop(intToNetAddress(address));\n\t\tinterpreterProxy->pushRemappableOop(interpreterProxy->integerObjectOf((bytesReceived / byteSize)));\n\t\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 4));\n\t\tresults = interpreterProxy->popRemappableOop();\n\t\tinterpreterProxy->storePointerofObjectwithValue(0, results, interpreterProxy->popRemappableOop());\n\t\tinterpreterProxy->storePointerofObjectwithValue(1, results, interpreterProxy->popRemappableOop());\n\t\tinterpreterProxy->storePointerofObjectwithValue(2, results, interpreterProxy->popRemappableOop());\n\t\tif (moreFlag) {\n\t\t\tinterpreterProxy->storePointerofObjectwithValue(3, results, interpreterProxy->trueObject());\n\t\t}\n\t\telse {\n\t\t\tinterpreterProxy->storePointerofObjectwithValue(3, results, interpreterProxy->falseObject());\n\t\t}\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(5, results);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveSocketRemoteAddress(void)\n{\n\tsqInt addr;\n\tSocketPtr s;\n\tsqInt socket;\n\tvoid *socketIndex;\n\tsqInt _return_value;\n\n\tsocket = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin socketValueOf: */\n\tinterpreterProxy->success((interpreterProxy->isBytes(socket))\n\t && ((interpreterProxy->byteSizeOf(socket)) == (socketRecordSize())));\n\tif (interpreterProxy->failed()) {\n\t\ts = null;\n\t\tgoto l1;\n\t}\n\tsocketIndex = ((SocketPtr) (interpreterProxy->firstIndexableField(socket)));\n\ts = socketIndex;\nl1:\t/* end socketValueOf: */;\n\taddr = sqSocketRemoteAddress(s);\n\t_return_value = intToNetAddress(addr);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveSocketRemotePort(void)\n{\n\tsqInt port;\n\tSocketPtr s;\n\tsqInt socket;\n\tvoid *socketIndex;\n\tsqInt _return_value;\n\n\tsocket = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin socketValueOf: */\n\tinterpreterProxy->success((interpreterProxy->isBytes(socket))\n\t && ((interpreterProxy->byteSizeOf(socket)) == (socketRecordSize())));\n\tif (interpreterProxy->failed()) {\n\t\ts = null;\n\t\tgoto l1;\n\t}\n\tsocketIndex = ((SocketPtr) (interpreterProxy->firstIndexableField(socket)));\n\ts = socketIndex;\nl1:\t/* end socketValueOf: */;\n\tport = sqSocketRemotePort(s);\n\t_return_value = interpreterProxy->integerObjectOf(port);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveSocketSendDataBufCount(void)\n{\n\tsqInt array;\n\tchar *arrayBase;\n\tchar *bufStart;\n\tsqInt byteSize;\n\tsqInt bytesSent;\n\tsqInt count;\n\tSocketPtr s;\n\tsqInt socket;\n\tvoid *socketIndex;\n\tsqInt startIndex;\n\tsqInt _return_value;\n\n\tsocket = interpreterProxy->stackValue(3);\n\tarray = interpreterProxy->stackValue(2);\n\tstartIndex = interpreterProxy->stackIntegerValue(1);\n\tcount = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin socketValueOf: */\n\tinterpreterProxy->success((interpreterProxy->isBytes(socket))\n\t && ((interpreterProxy->byteSizeOf(socket)) == (socketRecordSize())));\n\tif (interpreterProxy->failed()) {\n\t\ts = null;\n\t\tgoto l1;\n\t}\n\tsocketIndex = ((SocketPtr) (interpreterProxy->firstIndexableField(socket)));\n\ts = socketIndex;\nl1:\t/* end socketValueOf: */;\n\tinterpreterProxy->success(interpreterProxy->isWordsOrBytes(array));\n\tif (interpreterProxy->isWords(array)) {\n\t\tbyteSize = 4;\n\t}\n\telse {\n\t\tbyteSize = 1;\n\t}\n\tinterpreterProxy->success((startIndex >= 1)\n\t && ((count >= 0)\n && (((startIndex + count) - 1) <= (interpreterProxy->slotSizeOf(array)))));\n\tif (!(interpreterProxy->failed())) {\n\n\t\t/* Note: adjust bufStart for zero-origin indexing */\n\n\t\tarrayBase = ((char *) (interpreterProxy->firstIndexableField(array)));\n\t\tbufStart = arrayBase + ((startIndex - 1) * byteSize);\n\t\tbytesSent = sqSocketSendDataBufCount(s, bufStart, count * byteSize);\n\t}\n\t_return_value = interpreterProxy->integerObjectOf((bytesSent / byteSize));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(5, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveSocketSendDone(void)\n{\n\tsqInt done;\n\tSocketPtr s;\n\tsqInt socket;\n\tvoid *socketIndex;\n\tsqInt _return_value;\n\n\tsocket = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin socketValueOf: */\n\tinterpreterProxy->success((interpreterProxy->isBytes(socket))\n\t && ((interpreterProxy->byteSizeOf(socket)) == (socketRecordSize())));\n\tif (interpreterProxy->failed()) {\n\t\ts = null;\n\t\tgoto l1;\n\t}\n\tsocketIndex = ((SocketPtr) (interpreterProxy->firstIndexableField(socket)));\n\ts = socketIndex;\nl1:\t/* end socketValueOf: */;\n\tdone = sqSocketSendDone(s);\n\t_return_value = (done) ? interpreterProxy->trueObject(): interpreterProxy->falseObject();\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(2, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveSocketSendUDPDataBufCount(void)\n{\n\tsqInt address;\n\tsqInt array;\n\tchar *arrayBase;\n\tchar *bufStart;\n\tsqInt byteSize;\n\tsqInt bytesSent;\n\tsqInt count;\n\tchar *hostAddress;\n\tsqInt portNumber;\n\tSocketPtr s;\n\tsqInt socket;\n\tvoid *socketIndex;\n\tsqInt startIndex;\n\tsqInt sz;\n\tsqInt _return_value;\n\n\tsocket = interpreterProxy->stackValue(5);\n\tarray = interpreterProxy->stackValue(4);\n\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(3)));\n\thostAddress = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(3))));\n\tportNumber = interpreterProxy->stackIntegerValue(2);\n\tstartIndex = interpreterProxy->stackIntegerValue(1);\n\tcount = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin socketValueOf: */\n\tinterpreterProxy->success((interpreterProxy->isBytes(socket))\n\t && ((interpreterProxy->byteSizeOf(socket)) == (socketRecordSize())));\n\tif (interpreterProxy->failed()) {\n\t\ts = null;\n\t\tgoto l2;\n\t}\n\tsocketIndex = ((SocketPtr) (interpreterProxy->firstIndexableField(socket)));\n\ts = socketIndex;\nl2:\t/* end socketValueOf: */;\n\tinterpreterProxy->success(interpreterProxy->isWordsOrBytes(array));\n\tif (interpreterProxy->isWords(array)) {\n\t\tbyteSize = 4;\n\t}\n\telse {\n\t\tbyteSize = 1;\n\t}\n\tinterpreterProxy->success((startIndex >= 1)\n\t && ((count >= 0)\n && (((startIndex + count) - 1) <= (interpreterProxy->slotSizeOf(array)))));\n\tif (!(interpreterProxy->failed())) {\n\n\t\t/* Note: adjust bufStart for zero-origin indexing */\n\n\t\tarrayBase = ((char *) (interpreterProxy->firstIndexableField(array)));\n\t\tbufStart = arrayBase + ((startIndex - 1) * byteSize);\n\t\t/* begin netAddressToInt: */\n\t\tsz = interpreterProxy->byteSizeOf(((sqInt)(long)((((unsigned char *) hostAddress))) - 4));\n\t\tif (!(sz == 4)) {\n\t\t\taddress = interpreterProxy->primitiveFail();\n\t\t\tgoto l1;\n\t\t}\n\t\taddress = ((((((unsigned char *) hostAddress))[3]) + (((((unsigned char *) hostAddress))[2]) << 8)) + (((((unsigned char *) hostAddress))[1]) << 16)) + (((((unsigned char *) hostAddress))[0]) << 24);\n\tl1:\t/* end netAddressToInt: */;\n\t\tbytesSent = sqSockettoHostportSendDataBufCount(s, address, portNumber, bufStart, count * byteSize);\n\t}\n\t_return_value = interpreterProxy->integerObjectOf((bytesSent / byteSize));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(7, _return_value);\n\treturn null;\n}\n\nEXPORT(sqInt)\nprimitiveSocketSetOptions(void)\n{\n\tsqInt errorCode;\n\tsqInt optionName;\n\tsqInt optionNameSize;\n\tchar *optionNameStart;\n\tsqInt optionValue;\n\tsqInt optionValueSize;\n\tchar *optionValueStart;\n\tsqInt results;\n\tsqInt returnedValue;\n\tSocketPtr s;\n\tsqInt socket;\n\tvoid *socketIndex;\n\n\tsocket = interpreterProxy->stackValue(2);\n\toptionName = interpreterProxy->stackValue(1);\n\toptionValue = interpreterProxy->stackValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin socketValueOf: */\n\tinterpreterProxy->success((interpreterProxy->isBytes(socket))\n\t && ((interpreterProxy->byteSizeOf(socket)) == (socketRecordSize())));\n\tif (interpreterProxy->failed()) {\n\t\ts = null;\n\t\tgoto l1;\n\t}\n\tsocketIndex = ((SocketPtr) (interpreterProxy->firstIndexableField(socket)));\n\ts = socketIndex;\nl1:\t/* end socketValueOf: */;\n\tinterpreterProxy->success(interpreterProxy->isBytes(optionName));\n\toptionNameStart = ((char *) (interpreterProxy->firstIndexableField(optionName)));\n\toptionNameSize = interpreterProxy->slotSizeOf(optionName);\n\tinterpreterProxy->success(interpreterProxy->isBytes(optionValue));\n\toptionValueStart = ((char *) (interpreterProxy->firstIndexableField(optionValue)));\n\toptionValueSize = interpreterProxy->slotSizeOf(optionValue);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\treturnedValue = 0;\n\terrorCode = sqSocketSetOptionsoptionNameStartoptionNameSizeoptionValueStartoptionValueSizereturnedValue(s, optionNameStart, optionNameSize, optionValueStart, optionValueSize, &returnedValue);\n\tinterpreterProxy->pushRemappableOop(interpreterProxy->integerObjectOf(returnedValue));\n\tinterpreterProxy->pushRemappableOop(interpreterProxy->integerObjectOf(errorCode));\n\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2));\n\tresults = interpreterProxy->popRemappableOop();\n\tinterpreterProxy->storePointerofObjectwithValue(0, results, interpreterProxy->popRemappableOop());\n\tinterpreterProxy->storePointerofObjectwithValue(1, results, interpreterProxy->popRemappableOop());\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(4, results);\n\treturn null;\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n\tsqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\nEXPORT(sqInt)\nshutdownModule(void)\n{\n\treturn socketShutdown();\n}\n\n\n/*\tReturn the size of a Smalltalk socket record in bytes. */\n\nstatic sqInt\nsocketRecordSize(void)\n{\n\treturn sizeof(SQSocket);\n}\n\n\n/*\tReturn a pointer to the first byte of of the socket record within the \n\tgiven Smalltalk object, or nil if socketOop is not a socket record. */\n\nstatic SocketPtr\nsocketValueOf(sqInt socketOop)\n{\n\tvoid *socketIndex;\n\n\tinterpreterProxy->success((interpreterProxy->isBytes(socketOop))\n\t && ((interpreterProxy->byteSizeOf(socketOop)) == (socketRecordSize())));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tsocketIndex = ((SocketPtr) (interpreterProxy->firstIndexableField(socketOop)));\n\treturn socketIndex;\n}\n\nstatic void\nsqAssert(sqInt aBool)\n{\n\t/* missing DebugCode */;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* SocketPlugin_exports[][3] = {\n\t{\"SocketPlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"SocketPlugin\", \"initialiseModule\", (void*)initialiseModule},\n\t{\"SocketPlugin\", \"moduleUnloaded\", (void*)moduleUnloaded},\n\t{\"SocketPlugin\", \"primitiveDisableSocketAccess\", (void*)primitiveDisableSocketAccess},\n\t{\"SocketPlugin\", \"primitiveHasSocketAccess\", (void*)primitiveHasSocketAccess},\n\t{\"SocketPlugin\", \"primitiveInitializeNetwork\", (void*)primitiveInitializeNetwork},\n\t{\"SocketPlugin\", \"primitiveResolverAbortLookup\", (void*)primitiveResolverAbortLookup},\n\t{\"SocketPlugin\", \"primitiveResolverAddressLookupResult\", (void*)primitiveResolverAddressLookupResult},\n\t{\"SocketPlugin\", \"primitiveResolverError\", (void*)primitiveResolverError},\n\t{\"SocketPlugin\", \"primitiveResolverLocalAddress\", (void*)primitiveResolverLocalAddress},\n\t{\"SocketPlugin\", \"primitiveResolverNameLookupResult\", (void*)primitiveResolverNameLookupResult},\n\t{\"SocketPlugin\", \"primitiveResolverStartAddressLookup\", (void*)primitiveResolverStartAddressLookup},\n\t{\"SocketPlugin\", \"primitiveResolverStartNameLookup\", (void*)primitiveResolverStartNameLookup},\n\t{\"SocketPlugin\", \"primitiveResolverStatus\", (void*)primitiveResolverStatus},\n\t{\"SocketPlugin\", \"primitiveSocketAbortConnection\", (void*)primitiveSocketAbortConnection},\n\t{\"SocketPlugin\", \"primitiveSocketAccept\", (void*)primitiveSocketAccept},\n\t{\"SocketPlugin\", \"primitiveSocketAccept3Semaphores\", (void*)primitiveSocketAccept3Semaphores},\n\t{\"SocketPlugin\", \"primitiveSocketBindToPort\", (void*)primitiveSocketBindToPort},\n\t{\"SocketPlugin\", \"primitiveSocketCloseConnection\", (void*)primitiveSocketCloseConnection},\n\t{\"SocketPlugin\", \"primitiveSocketConnectionStatus\", (void*)primitiveSocketConnectionStatus},\n\t{\"SocketPlugin\", \"primitiveSocketConnectToPort\", (void*)primitiveSocketConnectToPort},\n\t{\"SocketPlugin\", \"primitiveSocketCreate\", (void*)primitiveSocketCreate},\n\t{\"SocketPlugin\", \"primitiveSocketCreate3Semaphores\", (void*)primitiveSocketCreate3Semaphores},\n\t{\"SocketPlugin\", \"primitiveSocketCreateRAW\", (void*)primitiveSocketCreateRAW},\n\t{\"SocketPlugin\", \"primitiveSocketDestroy\", (void*)primitiveSocketDestroy},\n\t{\"SocketPlugin\", \"primitiveSocketError\", (void*)primitiveSocketError},\n\t{\"SocketPlugin\", \"primitiveSocketGetOptions\", (void*)primitiveSocketGetOptions},\n\t{\"SocketPlugin\", \"primitiveSocketListenOnPort\", (void*)primitiveSocketListenOnPort},\n\t{\"SocketPlugin\", \"primitiveSocketListenOnPortBacklog\", (void*)primitiveSocketListenOnPortBacklog},\n\t{\"SocketPlugin\", \"primitiveSocketListenOnPortBacklogInterface\", (void*)primitiveSocketListenOnPortBacklogInterface},\n\t{\"SocketPlugin\", \"primitiveSocketListenWithOrWithoutBacklog\", (void*)primitiveSocketListenWithOrWithoutBacklog},\n\t{\"SocketPlugin\", \"primitiveSocketLocalAddress\", (void*)primitiveSocketLocalAddress},\n\t{\"SocketPlugin\", \"primitiveSocketLocalPort\", (void*)primitiveSocketLocalPort},\n\t{\"SocketPlugin\", \"primitiveSocketReceiveDataAvailable\", (void*)primitiveSocketReceiveDataAvailable},\n\t{\"SocketPlugin\", \"primitiveSocketReceiveDataBufCount\", (void*)primitiveSocketReceiveDataBufCount},\n\t{\"SocketPlugin\", \"primitiveSocketReceiveUDPDataBufCount\", (void*)primitiveSocketReceiveUDPDataBufCount},\n\t{\"SocketPlugin\", \"primitiveSocketRemoteAddress\", (void*)primitiveSocketRemoteAddress},\n\t{\"SocketPlugin\", \"primitiveSocketRemotePort\", (void*)primitiveSocketRemotePort},\n\t{\"SocketPlugin\", \"primitiveSocketSendDataBufCount\", (void*)primitiveSocketSendDataBufCount},\n\t{\"SocketPlugin\", \"primitiveSocketSendDone\", (void*)primitiveSocketSendDone},\n\t{\"SocketPlugin\", \"primitiveSocketSendUDPDataBufCount\", (void*)primitiveSocketSendUDPDataBufCount},\n\t{\"SocketPlugin\", \"primitiveSocketSetOptions\", (void*)primitiveSocketSetOptions},\n\t{\"SocketPlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{\"SocketPlugin\", \"shutdownModule\", (void*)shutdownModule},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/SoundCodecPrims/SoundCodecPrims.c",
    "content": "/* Automatically generated by\n\tVMPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tSoundCodecPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"SoundCodecPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"SoundCodecPrims.h\"\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n\n/*** Function Prototypes ***/\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nstatic sqInt msg(char *s);\nEXPORT(sqInt) primitiveGSMDecode(void);\nEXPORT(sqInt) primitiveGSMEncode(void);\nEXPORT(sqInt) primitiveGSMNewState(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\n\n\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"SoundCodecPrims VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"SoundCodecPrims VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\n\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\nEXPORT(sqInt)\nprimitiveGSMDecode(void)\n{\n    sqInt dst;\n    sqInt dstDelta;\n    sqInt dstIndex;\n    sqInt dstSize;\n    sqInt frameCount;\n    sqInt result;\n    sqInt src;\n    sqInt srcDelta;\n    sqInt srcIndex;\n    sqInt srcSize;\n    sqInt state;\n\n\tdstIndex = interpreterProxy->stackIntegerValue(0);\n\tdst = interpreterProxy->stackObjectValue(1);\n\tsrcIndex = interpreterProxy->stackIntegerValue(2);\n\tsrc = interpreterProxy->stackObjectValue(3);\n\tframeCount = interpreterProxy->stackIntegerValue(4);\n\tstate = interpreterProxy->stackObjectValue(5);\n\tinterpreterProxy->success(interpreterProxy->isWords(dst));\n\tinterpreterProxy->success(interpreterProxy->isBytes(src));\n\tinterpreterProxy->success(interpreterProxy->isBytes(state));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tsrcSize = interpreterProxy->slotSizeOf(src);\n\tdstSize = (interpreterProxy->slotSizeOf(dst)) * 2;\n\tgsmDecode(state + 4, frameCount, src, srcIndex, srcSize, dst, dstIndex, dstSize, &srcDelta, &dstDelta);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = interpreterProxy->makePointwithxValueyValue(srcDelta, dstDelta);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(6);\n\tinterpreterProxy->push(result);\n}\n\nEXPORT(sqInt)\nprimitiveGSMEncode(void)\n{\n    sqInt dst;\n    sqInt dstDelta;\n    sqInt dstIndex;\n    sqInt dstSize;\n    sqInt frameCount;\n    sqInt result;\n    sqInt src;\n    sqInt srcDelta;\n    sqInt srcIndex;\n    sqInt srcSize;\n    sqInt state;\n\n\tdstIndex = interpreterProxy->stackIntegerValue(0);\n\tdst = interpreterProxy->stackObjectValue(1);\n\tsrcIndex = interpreterProxy->stackIntegerValue(2);\n\tsrc = interpreterProxy->stackObjectValue(3);\n\tframeCount = interpreterProxy->stackIntegerValue(4);\n\tstate = interpreterProxy->stackObjectValue(5);\n\tinterpreterProxy->success(interpreterProxy->isBytes(dst));\n\tinterpreterProxy->success(interpreterProxy->isWords(src));\n\tinterpreterProxy->success(interpreterProxy->isBytes(state));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tsrcSize = (interpreterProxy->slotSizeOf(src)) * 2;\n\tdstSize = interpreterProxy->slotSizeOf(dst);\n\tgsmEncode(state + 4, frameCount, src, srcIndex, srcSize, dst, dstIndex, dstSize, &srcDelta, &dstDelta);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = interpreterProxy->makePointwithxValueyValue(srcDelta, dstDelta);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(6);\n\tinterpreterProxy->push(result);\n}\n\nEXPORT(sqInt)\nprimitiveGSMNewState(void)\n{\n    sqInt state;\n    sqInt stateBytes;\n\n\tstateBytes = gsmStateBytes();\n\tstate = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), stateBytes);\n\tgsmInitState(state + 4);\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->push(state);\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n    sqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* SoundCodecPrims_exports[][3] = {\n\t{\"SoundCodecPrims\", \"getModuleName\", (void*)getModuleName},\n\t{\"SoundCodecPrims\", \"primitiveGSMDecode\", (void*)primitiveGSMDecode},\n\t{\"SoundCodecPrims\", \"primitiveGSMEncode\", (void*)primitiveGSMEncode},\n\t{\"SoundCodecPrims\", \"primitiveGSMNewState\", (void*)primitiveGSMNewState},\n\t{\"SoundCodecPrims\", \"setInterpreter\", (void*)setInterpreter},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/SoundGenerationPlugin/SoundGenerationPlugin.c",
    "content": "/* Automatically generated by\n\tVMPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tSoundGenerationPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"SoundGenerationPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"sqMemoryAccess.h\"\n\n\n/*** Proxy Functions ***/\n#define stackValue(i) (interpreterProxy->stackValue(i))\n#define stackIntegerValue(i) (interpreterProxy->stackIntegerValue(i))\n#define successFlag (!interpreterProxy->failed())\n#define success(bool) (interpreterProxy->success(bool))\n#define arrayValueOf(oop) (interpreterProxy->arrayValueOf(oop))\n#define checkedIntegerValueOf(oop) (interpreterProxy->checkedIntegerValueOf(oop))\n#define fetchArrayofObject(idx,oop) (interpreterProxy->fetchArrayofObject(idx,oop))\n#define fetchFloatofObject(idx,oop) (interpreterProxy->fetchFloatofObject(idx,oop))\n#define fetchIntegerofObject(idx,oop) (interpreterProxy->fetchIntegerofObject(idx,oop))\n#define floatValueOf(oop) (interpreterProxy->floatValueOf(oop))\n#define pop(n) (interpreterProxy->pop(n))\n#define pushInteger(n) (interpreterProxy->pushInteger(n))\n#define sizeOfSTArrayFromCPrimitive(cPtr) (interpreterProxy->sizeOfSTArrayFromCPrimitive(cPtr))\n#define storeIntegerofObjectwithValue(idx,oop,value) (interpreterProxy->storeIntegerofObjectwithValue(idx,oop,value))\n#define primitiveFail() interpreterProxy->primitiveFail()\n/* allows accessing Strings in both C and Smalltalk */\n#define asciiValue(c) c\n\n\n\n/*** Constants ***/\n#define IncrementFractionBits 16\n#define LoopIndexFractionMask 0x1FF\n#define LoopIndexScaleFactor 0x200\n#define ScaledIndexOverflow 0x20000000\n#define ScaleFactor 0x8000\n\n\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"SoundGenerationPlugin VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"SoundGenerationPlugin VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\n\n\n/*** Function Prototypes ***/\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nstatic sqInt msg(char *s);\nEXPORT(sqInt) primitiveApplyReverb(void);\nEXPORT(sqInt) primitiveMixFMSound(void);\nEXPORT(sqInt) primitiveMixLoopedSampledSound(void);\nEXPORT(sqInt) primitiveMixPluckedSound(void);\nEXPORT(sqInt) primitiveMixSampledSound(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\n\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\nEXPORT(sqInt)\nprimitiveApplyReverb(void)\n{\n    short int *aSoundBuffer;\n    sqInt bufferIndex;\n    sqInt bufferSize;\n    sqInt delayedLeft;\n    sqInt delayedRight;\n    sqInt i;\n    sqInt j;\n    short int *leftBuffer;\n    sqInt n;\n    sqInt out;\n    sqInt rcvr;\n    short int *rightBuffer;\n    sqInt sliceIndex;\n    sqInt startIndex;\n    sqInt tapCount;\n    int *tapDelays;\n    sqInt tapGain;\n    int *tapGains;\n    sqInt tapIndex;\n\n\trcvr = stackValue(3);\n\taSoundBuffer = arrayValueOf(stackValue(2));\n\taSoundBuffer -= 1;\n\tstartIndex = stackIntegerValue(1);\n\tn = stackIntegerValue(0);\n\ttapDelays = fetchArrayofObject(7, rcvr);\n\ttapDelays -= 1;\n\ttapGains = fetchArrayofObject(8, rcvr);\n\ttapGains -= 1;\n\ttapCount = fetchIntegerofObject(9, rcvr);\n\tbufferSize = fetchIntegerofObject(10, rcvr);\n\tbufferIndex = fetchIntegerofObject(11, rcvr);\n\tleftBuffer = fetchArrayofObject(12, rcvr);\n\tleftBuffer -= 1;\n\trightBuffer = fetchArrayofObject(13, rcvr);\n\trightBuffer -= 1;\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tfor (sliceIndex = startIndex; sliceIndex <= ((startIndex + n) - 1); sliceIndex += 1) {\n\t\tdelayedLeft = delayedRight = 0;\n\t\tfor (tapIndex = 1; tapIndex <= tapCount; tapIndex += 1) {\n\t\t\ti = bufferIndex - (tapDelays[tapIndex]);\n\t\t\tif (i < 1) {\n\t\t\t\ti += bufferSize;\n\t\t\t}\n\t\t\ttapGain = tapGains[tapIndex];\n\t\t\tdelayedLeft += tapGain * (leftBuffer[i]);\n\t\t\tdelayedRight += tapGain * (rightBuffer[i]);\n\t\t}\n\t\tj = (2 * sliceIndex) - 1;\n\t\tout = (aSoundBuffer[j]) + (((sqInt) delayedLeft >> 15));\n\t\tif (out > 32767) {\n\t\t\tout = 32767;\n\t\t}\n\t\tif (out < -32767) {\n\t\t\tout = -32767;\n\t\t}\n\t\taSoundBuffer[j] = out;\n\t\tleftBuffer[bufferIndex] = out;\n\t\tj += 1;\n\t\tout = (aSoundBuffer[j]) + (((sqInt) delayedRight >> 15));\n\t\tif (out > 32767) {\n\t\t\tout = 32767;\n\t\t}\n\t\tif (out < -32767) {\n\t\t\tout = -32767;\n\t\t}\n\t\taSoundBuffer[j] = out;\n\t\trightBuffer[bufferIndex] = out;\n\t\tbufferIndex = (bufferIndex % bufferSize) + 1;\n\t}\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tstoreIntegerofObjectwithValue(11, rcvr, bufferIndex);\n\tpop(3);\n}\n\n\n/*\tPlay samples from a wave table by stepping a fixed amount through the\n\ttable on every sample. The table index and increment are scaled to allow\n\tfractional increments for greater pitch accuracy.\n */\n/*\t(FMSound pitch: 440.0 dur: 1.0 loudness: 0.5) play */\n\nEXPORT(sqInt)\nprimitiveMixFMSound(void)\n{\n    short int *aSoundBuffer;\n    sqInt count;\n    sqInt doingFM;\n    sqInt i;\n    sqInt lastIndex;\n    sqInt leftVol;\n    sqInt n;\n    sqInt normalizedModulation;\n    sqInt offset;\n    sqInt rcvr;\n    sqInt rightVol;\n    sqInt s;\n    sqInt sample;\n    sqInt scaledIndex;\n    sqInt scaledIndexIncr;\n    sqInt scaledOffsetIndex;\n    sqInt scaledOffsetIndexIncr;\n    sqInt scaledVol;\n    sqInt scaledVolIncr;\n    sqInt scaledVolLimit;\n    sqInt scaledWaveTableSize;\n    sqInt sliceIndex;\n    sqInt startIndex;\n    short int *waveTable;\n\n\trcvr = stackValue(5);\n\tn = stackIntegerValue(4);\n\taSoundBuffer = arrayValueOf(stackValue(3));\n\taSoundBuffer -= 1;\n\tstartIndex = stackIntegerValue(2);\n\tleftVol = stackIntegerValue(1);\n\trightVol = stackIntegerValue(0);\n\tscaledVol = fetchIntegerofObject(3, rcvr);\n\tscaledVolIncr = fetchIntegerofObject(4, rcvr);\n\tscaledVolLimit = fetchIntegerofObject(5, rcvr);\n\tcount = fetchIntegerofObject(7, rcvr);\n\twaveTable = fetchArrayofObject(8, rcvr);\n\twaveTable -= 1;\n\tscaledWaveTableSize = fetchIntegerofObject(9, rcvr);\n\tscaledIndex = fetchIntegerofObject(10, rcvr);\n\tscaledIndexIncr = fetchIntegerofObject(11, rcvr);\n\tnormalizedModulation = fetchIntegerofObject(14, rcvr);\n\tscaledOffsetIndex = fetchIntegerofObject(15, rcvr);\n\tscaledOffsetIndexIncr = fetchIntegerofObject(16, rcvr);\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tdoingFM = (normalizedModulation != 0)\n\t && (scaledOffsetIndexIncr != 0);\n\tlastIndex = (startIndex + n) - 1;\n\tfor (sliceIndex = startIndex; sliceIndex <= lastIndex; sliceIndex += 1) {\n\t\tsample = ((sqInt) (scaledVol * (waveTable[(((sqInt) scaledIndex >> 15)) + 1])) >> 15);\n\t\tif (doingFM) {\n\t\t\toffset = normalizedModulation * (waveTable[(((sqInt) scaledOffsetIndex >> 15)) + 1]);\n\t\t\tscaledOffsetIndex = (scaledOffsetIndex + scaledOffsetIndexIncr) % scaledWaveTableSize;\n\t\t\tif (scaledOffsetIndex < 0) {\n\t\t\t\tscaledOffsetIndex += scaledWaveTableSize;\n\t\t\t}\n\t\t\tscaledIndex = ((scaledIndex + scaledIndexIncr) + offset) % scaledWaveTableSize;\n\t\t\tif (scaledIndex < 0) {\n\t\t\t\tscaledIndex += scaledWaveTableSize;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tscaledIndex = (scaledIndex + scaledIndexIncr) % scaledWaveTableSize;\n\t\t}\n\t\tif (leftVol > 0) {\n\t\t\ti = (2 * sliceIndex) - 1;\n\t\t\ts = (aSoundBuffer[i]) + (((sqInt) (sample * leftVol) >> 15));\n\t\t\tif (s > 32767) {\n\t\t\t\ts = 32767;\n\t\t\t}\n\t\t\tif (s < -32767) {\n\t\t\t\ts = -32767;\n\t\t\t}\n\t\t\taSoundBuffer[i] = s;\n\t\t}\n\t\tif (rightVol > 0) {\n\t\t\ti = 2 * sliceIndex;\n\t\t\ts = (aSoundBuffer[i]) + (((sqInt) (sample * rightVol) >> 15));\n\t\t\tif (s > 32767) {\n\t\t\t\ts = 32767;\n\t\t\t}\n\t\t\tif (s < -32767) {\n\t\t\t\ts = -32767;\n\t\t\t}\n\t\t\taSoundBuffer[i] = s;\n\t\t}\n\t\tif (scaledVolIncr != 0) {\n\t\t\tscaledVol += scaledVolIncr;\n\t\t\tif (((scaledVolIncr > 0)\n && (scaledVol >= scaledVolLimit))\n\t\t\t || ((scaledVolIncr < 0)\n && (scaledVol <= scaledVolLimit))) {\n\n\t\t\t\t/* reached the limit; stop incrementing */\n\n\t\t\t\tscaledVol = scaledVolLimit;\n\t\t\t\tscaledVolIncr = 0;\n\t\t\t}\n\t\t}\n\t}\n\tcount -= n;\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tstoreIntegerofObjectwithValue(3, rcvr, scaledVol);\n\tstoreIntegerofObjectwithValue(4, rcvr, scaledVolIncr);\n\tstoreIntegerofObjectwithValue(7, rcvr, count);\n\tstoreIntegerofObjectwithValue(10, rcvr, scaledIndex);\n\tstoreIntegerofObjectwithValue(15, rcvr, scaledOffsetIndex);\n\tpop(5);\n}\n\n\n/*\tPlay samples from a wave table by stepping a fixed amount through the\n\ttable on every sample. The table index and increment are scaled to allow\n\tfractional increments for greater pitch accuracy. If a loop length is\n\tspecified, then the index is looped back when the loopEnd index is reached\n\tuntil count drops below releaseCount. This allows a short sampled sound to\n\tbe sustained indefinitely.\n */\n/*\t(LoopedSampledSound pitch: 440.0 dur: 5.0 loudness: 0.5) play */\n\nEXPORT(sqInt)\nprimitiveMixLoopedSampledSound(void)\n{\n    short int *aSoundBuffer;\n    sqInt compositeLeftVol;\n    sqInt compositeRightVol;\n    sqInt count;\n    sqInt i;\n    sqInt isInStereo;\n    sqInt lastIndex;\n    sqInt lastSample;\n    short int *leftSamples;\n    sqInt leftVal;\n    sqInt leftVol;\n    sqInt loopEnd;\n    sqInt m;\n    sqInt n;\n    sqInt nextSampleIndex;\n    sqInt rcvr;\n    sqInt releaseCount;\n    short int *rightSamples;\n    sqInt rightVal;\n    sqInt rightVol;\n    sqInt s;\n    sqInt sampleIndex;\n    sqInt scaledIndex;\n    sqInt scaledIndexIncr;\n    sqInt scaledLoopLength;\n    sqInt scaledVol;\n    sqInt scaledVolIncr;\n    sqInt scaledVolLimit;\n    sqInt sliceIndex;\n    sqInt startIndex;\n\n\trcvr = stackValue(5);\n\tn = stackIntegerValue(4);\n\taSoundBuffer = arrayValueOf(stackValue(3));\n\taSoundBuffer -= 1;\n\tstartIndex = stackIntegerValue(2);\n\tleftVol = stackIntegerValue(1);\n\trightVol = stackIntegerValue(0);\n\tscaledVol = fetchIntegerofObject(3, rcvr);\n\tscaledVolIncr = fetchIntegerofObject(4, rcvr);\n\tscaledVolLimit = fetchIntegerofObject(5, rcvr);\n\tcount = fetchIntegerofObject(7, rcvr);\n\treleaseCount = fetchIntegerofObject(8, rcvr);\n\tleftSamples = fetchArrayofObject(10, rcvr);\n\tleftSamples -= 1;\n\trightSamples = fetchArrayofObject(11, rcvr);\n\trightSamples -= 1;\n\tlastSample = fetchIntegerofObject(16, rcvr);\n\tloopEnd = fetchIntegerofObject(17, rcvr);\n\tscaledLoopLength = fetchIntegerofObject(18, rcvr);\n\tscaledIndex = fetchIntegerofObject(19, rcvr);\n\tscaledIndexIncr = fetchIntegerofObject(20, rcvr);\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tisInStereo = leftSamples != rightSamples;\n\tcompositeLeftVol = ((sqInt) (leftVol * scaledVol) >> 15);\n\tcompositeRightVol = ((sqInt) (rightVol * scaledVol) >> 15);\n\ti = (2 * startIndex) - 1;\n\tlastIndex = (startIndex + n) - 1;\n\tfor (sliceIndex = startIndex; sliceIndex <= lastIndex; sliceIndex += 1) {\n\t\tsampleIndex = ((sqInt) ((scaledIndex += scaledIndexIncr)) >> 9);\n\t\tif ((sampleIndex > loopEnd)\n\t\t && (count > releaseCount)) {\n\n\t\t\t/* loop back if not within releaseCount of the note end */\n\t\t\t/* note: unlooped sounds will have loopEnd = lastSample */\n\n\t\t\tsampleIndex = ((sqInt) ((scaledIndex -= scaledLoopLength)) >> 9);\n\t\t}\n\t\tif (((nextSampleIndex = sampleIndex + 1)) > lastSample) {\n\t\t\tif (sampleIndex > lastSample) {\n\t\t\t\tcount = 0;\n\t\t\t\tif (!(successFlag)) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\tstoreIntegerofObjectwithValue(3, rcvr, scaledVol);\n\t\t\t\tstoreIntegerofObjectwithValue(4, rcvr, scaledVolIncr);\n\t\t\t\tstoreIntegerofObjectwithValue(7, rcvr, count);\n\t\t\t\tstoreIntegerofObjectwithValue(19, rcvr, scaledIndex);\n\t\t\t\tpop(6);\n\t\t\t\tpushInteger(null);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tif (scaledLoopLength == 0) {\n\t\t\t\tnextSampleIndex = sampleIndex;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tnextSampleIndex = (((sqInt) (scaledIndex - scaledLoopLength) >> 9)) + 1;\n\t\t\t}\n\t\t}\n\t\tm = scaledIndex & LoopIndexFractionMask;\n\t\trightVal = leftVal = ((sqInt) (((leftSamples[sampleIndex]) * (LoopIndexScaleFactor - m)) + ((leftSamples[nextSampleIndex]) * m)) >> 9);\n\t\tif (isInStereo) {\n\t\t\trightVal = ((sqInt) (((rightSamples[sampleIndex]) * (LoopIndexScaleFactor - m)) + ((rightSamples[nextSampleIndex]) * m)) >> 9);\n\t\t}\n\t\tif (leftVol > 0) {\n\t\t\ts = (aSoundBuffer[i]) + (((sqInt) (compositeLeftVol * leftVal) >> 15));\n\t\t\tif (s > 32767) {\n\t\t\t\ts = 32767;\n\t\t\t}\n\t\t\tif (s < -32767) {\n\t\t\t\ts = -32767;\n\t\t\t}\n\t\t\taSoundBuffer[i] = s;\n\t\t}\n\t\ti += 1;\n\t\tif (rightVol > 0) {\n\t\t\ts = (aSoundBuffer[i]) + (((sqInt) (compositeRightVol * rightVal) >> 15));\n\t\t\tif (s > 32767) {\n\t\t\t\ts = 32767;\n\t\t\t}\n\t\t\tif (s < -32767) {\n\t\t\t\ts = -32767;\n\t\t\t}\n\t\t\taSoundBuffer[i] = s;\n\t\t}\n\t\ti += 1;\n\t\tif (scaledVolIncr != 0) {\n\n\t\t\t/* update volume envelope if it is changing */\n\n\t\t\tscaledVol += scaledVolIncr;\n\t\t\tif (((scaledVolIncr > 0)\n && (scaledVol >= scaledVolLimit))\n\t\t\t || ((scaledVolIncr < 0)\n && (scaledVol <= scaledVolLimit))) {\n\n\t\t\t\t/* reached the limit; stop incrementing */\n\n\t\t\t\tscaledVol = scaledVolLimit;\n\t\t\t\tscaledVolIncr = 0;\n\t\t\t}\n\t\t\tcompositeLeftVol = ((sqInt) (leftVol * scaledVol) >> 15);\n\t\t\tcompositeRightVol = ((sqInt) (rightVol * scaledVol) >> 15);\n\t\t}\n\t}\n\tcount -= n;\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tstoreIntegerofObjectwithValue(3, rcvr, scaledVol);\n\tstoreIntegerofObjectwithValue(4, rcvr, scaledVolIncr);\n\tstoreIntegerofObjectwithValue(7, rcvr, count);\n\tstoreIntegerofObjectwithValue(19, rcvr, scaledIndex);\n\tpop(5);\n}\n\n\n/*\tThe Karplus-Strong plucked string algorithm: start with a buffer full of\n\trandom noise and repeatedly play the contents of that buffer while\n\taveraging adjacent samples. High harmonics damp out more quickly,\n\ttransfering their energy to lower ones. The length of the buffer\n\tcorresponds to the length of the string.\n */\n/*\t(PluckedSound pitch: 220.0 dur: 6.0 loudness: 0.8) play */\n\nEXPORT(sqInt)\nprimitiveMixPluckedSound(void)\n{\n    short int *aSoundBuffer;\n    sqInt average;\n    sqInt count;\n    sqInt i;\n    sqInt lastIndex;\n    sqInt leftVol;\n    sqInt n;\n    sqInt rcvr;\n    sqInt rightVol;\n    short int *ring;\n    sqInt s;\n    sqInt sample;\n    sqInt scaledIndex;\n    sqInt scaledIndexIncr;\n    sqInt scaledIndexLimit;\n    sqInt scaledNextIndex;\n    sqInt scaledThisIndex;\n    sqInt scaledVol;\n    sqInt scaledVolIncr;\n    sqInt scaledVolLimit;\n    sqInt sliceIndex;\n    sqInt startIndex;\n\n\trcvr = stackValue(5);\n\tn = stackIntegerValue(4);\n\taSoundBuffer = arrayValueOf(stackValue(3));\n\taSoundBuffer -= 1;\n\tstartIndex = stackIntegerValue(2);\n\tleftVol = stackIntegerValue(1);\n\trightVol = stackIntegerValue(0);\n\tscaledVol = fetchIntegerofObject(3, rcvr);\n\tscaledVolIncr = fetchIntegerofObject(4, rcvr);\n\tscaledVolLimit = fetchIntegerofObject(5, rcvr);\n\tcount = fetchIntegerofObject(7, rcvr);\n\tring = fetchArrayofObject(8, rcvr);\n\tring -= 1;\n\tscaledIndex = fetchIntegerofObject(9, rcvr);\n\tscaledIndexIncr = fetchIntegerofObject(10, rcvr);\n\tscaledIndexLimit = fetchIntegerofObject(11, rcvr);\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tlastIndex = (startIndex + n) - 1;\n\tscaledThisIndex = scaledNextIndex = scaledIndex;\n\tfor (sliceIndex = startIndex; sliceIndex <= lastIndex; sliceIndex += 1) {\n\t\tscaledNextIndex = scaledThisIndex + scaledIndexIncr;\n\t\tif (scaledNextIndex >= scaledIndexLimit) {\n\t\t\tscaledNextIndex = ScaleFactor + (scaledNextIndex - scaledIndexLimit);\n\t\t}\n\t\taverage = ((sqInt) ((ring[((sqInt) scaledThisIndex >> 15)]) + (ring[((sqInt) scaledNextIndex >> 15)])) >> 1);\n\t\tring[((sqInt) scaledThisIndex >> 15)] = average;\n\n\t\t/* scale by volume */\n\n\t\tsample = ((sqInt) (average * scaledVol) >> 15);\n\t\tscaledThisIndex = scaledNextIndex;\n\t\tif (leftVol > 0) {\n\t\t\ti = (2 * sliceIndex) - 1;\n\t\t\ts = (aSoundBuffer[i]) + (((sqInt) (sample * leftVol) >> 15));\n\t\t\tif (s > 32767) {\n\t\t\t\ts = 32767;\n\t\t\t}\n\t\t\tif (s < -32767) {\n\t\t\t\ts = -32767;\n\t\t\t}\n\t\t\taSoundBuffer[i] = s;\n\t\t}\n\t\tif (rightVol > 0) {\n\t\t\ti = 2 * sliceIndex;\n\t\t\ts = (aSoundBuffer[i]) + (((sqInt) (sample * rightVol) >> 15));\n\t\t\tif (s > 32767) {\n\t\t\t\ts = 32767;\n\t\t\t}\n\t\t\tif (s < -32767) {\n\t\t\t\ts = -32767;\n\t\t\t}\n\t\t\taSoundBuffer[i] = s;\n\t\t}\n\t\tif (scaledVolIncr != 0) {\n\t\t\tscaledVol += scaledVolIncr;\n\t\t\tif (((scaledVolIncr > 0)\n && (scaledVol >= scaledVolLimit))\n\t\t\t || ((scaledVolIncr < 0)\n && (scaledVol <= scaledVolLimit))) {\n\n\t\t\t\t/* reached the limit; stop incrementing */\n\n\t\t\t\tscaledVol = scaledVolLimit;\n\t\t\t\tscaledVolIncr = 0;\n\t\t\t}\n\t\t}\n\t}\n\tscaledIndex = scaledNextIndex;\n\tcount -= n;\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tstoreIntegerofObjectwithValue(3, rcvr, scaledVol);\n\tstoreIntegerofObjectwithValue(4, rcvr, scaledVolIncr);\n\tstoreIntegerofObjectwithValue(7, rcvr, count);\n\tstoreIntegerofObjectwithValue(9, rcvr, scaledIndex);\n\tpop(5);\n}\n\n\n/*\tMix the given number of samples with the samples already in the given\n\tbuffer starting at the given index. Assume that the buffer size is at\n\tleast (index + count) - 1.\n */\n\nEXPORT(sqInt)\nprimitiveMixSampledSound(void)\n{\n    short int *aSoundBuffer;\n    sqInt count;\n    sqInt i;\n    sqInt indexHighBits;\n    sqInt lastIndex;\n    sqInt leftVol;\n    sqInt n;\n    sqInt outIndex;\n    sqInt overflow;\n    sqInt rcvr;\n    sqInt rightVol;\n    sqInt s;\n    sqInt sample;\n    sqInt sampleIndex;\n    short int *samples;\n    sqInt samplesSize;\n    sqInt scaledIncrement;\n    sqInt scaledIndex;\n    sqInt scaledVol;\n    sqInt scaledVolIncr;\n    sqInt scaledVolLimit;\n    sqInt startIndex;\n\n\trcvr = stackValue(5);\n\tn = stackIntegerValue(4);\n\taSoundBuffer = arrayValueOf(stackValue(3));\n\taSoundBuffer -= 1;\n\tstartIndex = stackIntegerValue(2);\n\tleftVol = stackIntegerValue(1);\n\trightVol = stackIntegerValue(0);\n\tscaledVol = fetchIntegerofObject(3, rcvr);\n\tscaledVolIncr = fetchIntegerofObject(4, rcvr);\n\tscaledVolLimit = fetchIntegerofObject(5, rcvr);\n\tcount = fetchIntegerofObject(7, rcvr);\n\tsamples = fetchArrayofObject(8, rcvr);\n\tsamples -= 1;\n\tsamplesSize = fetchIntegerofObject(10, rcvr);\n\tscaledIndex = fetchIntegerofObject(11, rcvr);\n\tindexHighBits = fetchIntegerofObject(12, rcvr);\n\tscaledIncrement = fetchIntegerofObject(13, rcvr);\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tlastIndex = (startIndex + n) - 1;\n\n\t/* index of next stereo output sample pair */\n\n\toutIndex = startIndex;\n\tsampleIndex = indexHighBits + (((usqInt) scaledIndex) >> IncrementFractionBits);\n\twhile ((sampleIndex <= samplesSize)\n && (outIndex <= lastIndex)) {\n\t\tsample = ((sqInt) ((samples[sampleIndex]) * scaledVol) >> 15);\n\t\tif (leftVol > 0) {\n\t\t\ti = (2 * outIndex) - 1;\n\t\t\ts = (aSoundBuffer[i]) + (((sqInt) (sample * leftVol) >> 15));\n\t\t\tif (s > 32767) {\n\t\t\t\ts = 32767;\n\t\t\t}\n\t\t\tif (s < -32767) {\n\t\t\t\ts = -32767;\n\t\t\t}\n\t\t\taSoundBuffer[i] = s;\n\t\t}\n\t\tif (rightVol > 0) {\n\t\t\ti = 2 * outIndex;\n\t\t\ts = (aSoundBuffer[i]) + (((sqInt) (sample * rightVol) >> 15));\n\t\t\tif (s > 32767) {\n\t\t\t\ts = 32767;\n\t\t\t}\n\t\t\tif (s < -32767) {\n\t\t\t\ts = -32767;\n\t\t\t}\n\t\t\taSoundBuffer[i] = s;\n\t\t}\n\t\tif (scaledVolIncr != 0) {\n\t\t\tscaledVol += scaledVolIncr;\n\t\t\tif (((scaledVolIncr > 0)\n && (scaledVol >= scaledVolLimit))\n\t\t\t || ((scaledVolIncr < 0)\n && (scaledVol <= scaledVolLimit))) {\n\n\t\t\t\t/* reached the limit; stop incrementing */\n\n\t\t\t\tscaledVol = scaledVolLimit;\n\t\t\t\tscaledVolIncr = 0;\n\t\t\t}\n\t\t}\n\t\tscaledIndex += scaledIncrement;\n\t\tif (scaledIndex >= ScaledIndexOverflow) {\n\t\t\toverflow = ((usqInt) scaledIndex) >> IncrementFractionBits;\n\t\t\tindexHighBits += overflow;\n\t\t\tscaledIndex -= overflow << IncrementFractionBits;\n\t\t}\n\t\tsampleIndex = indexHighBits + (((usqInt) scaledIndex) >> IncrementFractionBits);\n\t\toutIndex += 1;\n\t}\n\tcount -= n;\n\tif (!(successFlag)) {\n\t\treturn null;\n\t}\n\tstoreIntegerofObjectwithValue(3, rcvr, scaledVol);\n\tstoreIntegerofObjectwithValue(4, rcvr, scaledVolIncr);\n\tstoreIntegerofObjectwithValue(7, rcvr, count);\n\tstoreIntegerofObjectwithValue(11, rcvr, scaledIndex);\n\tstoreIntegerofObjectwithValue(12, rcvr, indexHighBits);\n\tpop(5);\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n    sqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* SoundGenerationPlugin_exports[][3] = {\n\t{\"SoundGenerationPlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"SoundGenerationPlugin\", \"primitiveApplyReverb\", (void*)primitiveApplyReverb},\n\t{\"SoundGenerationPlugin\", \"primitiveMixFMSound\", (void*)primitiveMixFMSound},\n\t{\"SoundGenerationPlugin\", \"primitiveMixLoopedSampledSound\", (void*)primitiveMixLoopedSampledSound},\n\t{\"SoundGenerationPlugin\", \"primitiveMixPluckedSound\", (void*)primitiveMixPluckedSound},\n\t{\"SoundGenerationPlugin\", \"primitiveMixSampledSound\", (void*)primitiveMixSampledSound},\n\t{\"SoundGenerationPlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/SoundPlugin/SoundPlugin.c",
    "content": "/* Automatically generated by\n\tSmartSyntaxPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tSoundPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"SoundPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"SoundPlugin.h\"\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n\n/*** Function Prototypes ***/\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nEXPORT(sqInt) initialiseModule(void);\nstatic sqInt msg(char *s);\nEXPORT(sqInt) primitiveSoundAvailableSpace(void);\nEXPORT(sqInt) primitiveSoundGetRecordingSampleRate(void);\nEXPORT(sqInt) primitiveSoundGetVolume(void);\nEXPORT(sqInt) primitiveSoundInsertSamples(void);\nEXPORT(sqInt) primitiveSoundPlaySamples(void);\nEXPORT(sqInt) primitiveSoundPlaySilence(void);\nEXPORT(sqInt) primitiveSoundRecordSamples(void);\nEXPORT(sqInt) primitiveSoundSetLeftVolume(void);\nEXPORT(sqInt) primitiveSoundSetRecordLevel(void);\nEXPORT(sqInt) primitiveSoundStart(void);\nEXPORT(sqInt) primitiveSoundStartRecording(void);\nEXPORT(sqInt) primitiveSoundStartWithSemaphore(void);\nEXPORT(sqInt) primitiveSoundStop(void);\nEXPORT(sqInt) primitiveSoundStopRecording(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\nEXPORT(sqInt) shutdownModule(void);\nstatic void sqAssert(sqInt aBool);\n\n\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"SoundPlugin VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"SoundPlugin VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\n\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nEXPORT(sqInt)\ninitialiseModule(void)\n{\n\treturn soundInit();\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\n\n/*\tReturns the number of bytes of available sound output buffer space. This\n\tshould be (frames*4) if the device is in stereo mode, or (frames*2)\n\totherwise \n */\n\nEXPORT(sqInt)\nprimitiveSoundAvailableSpace(void)\n{\n\tsqInt frames;\n\tsqInt _return_value;\n\n\n\t/* -1 if sound output not started */\n\n\tframes = snd_AvailableSpace();\n\tinterpreterProxy->success(frames >= 0);\n\t_return_value = interpreterProxy->positive32BitIntegerFor(frames);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\n\n/*\tReturn a float representing the actual sampling rate during recording.\n\tFail if not currently recording.\n */\n\nEXPORT(sqInt)\nprimitiveSoundGetRecordingSampleRate(void)\n{\n\tdouble  rate;\n\tsqInt _return_value;\n\n\n\t/* fail if not recording */\n\n\trate = snd_GetRecordingSampleRate();\n\t_return_value = interpreterProxy->floatObjectOf(rate);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\n\n/*\tSet the sound input recording level. */\n\nEXPORT(sqInt)\nprimitiveSoundGetVolume(void)\n{\n\tdouble  left;\n\tsqInt results;\n\tdouble  right;\n\n\tleft = 0;\n\tright = 0;\n\tsnd_Volume((double *) &left,(double *) &right);\n\tinterpreterProxy->pushRemappableOop(interpreterProxy->floatObjectOf(right));\n\tinterpreterProxy->pushRemappableOop(interpreterProxy->floatObjectOf(left));\n\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2));\n\tresults = interpreterProxy->popRemappableOop();\n\tinterpreterProxy->storePointerofObjectwithValue(0, results, interpreterProxy->popRemappableOop());\n\tinterpreterProxy->storePointerofObjectwithValue(1, results, interpreterProxy->popRemappableOop());\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, results);\n\treturn null;\n}\n\n\n/*\tInsert a buffer's worth of sound samples into the currently playing \n\tbuffer. Used to make a sound start playing as quickly as possible. The \n\tnew sound is mixed with the previously buffered sampled. */\n/*\tDetails: Unlike primitiveSoundPlaySamples, this primitive always starts \n\twith the first sample the given sample buffer. Its third argument \n\tspecifies the number of samples past the estimated sound output buffer \n\tposition the inserted sound should start. If successful, it returns the \n\tnumber of samples inserted. */\n\nEXPORT(sqInt)\nprimitiveSoundInsertSamples(void)\n{\n\tusqInt *buf;\n\tsqInt frameCount;\n\tsqInt framesPlayed;\n\tsqInt leadTime;\n\tsqInt _return_value;\n\n\tframeCount = interpreterProxy->stackIntegerValue(2);\n\tinterpreterProxy->success(interpreterProxy->isWords(interpreterProxy->stackValue(1)));\n\tbuf = ((unsigned *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(1))));\n\tleadTime = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->success(frameCount <= (interpreterProxy->slotSizeOf(((sqInt)(long)(buf) - 4))));\n\tif (!(interpreterProxy->failed())) {\n\t\tframesPlayed = snd_InsertSamplesFromLeadTime(frameCount, (void *)buf, leadTime);\n\t\tinterpreterProxy->success(framesPlayed >= 0);\n\t}\n\t_return_value = interpreterProxy->positive32BitIntegerFor(framesPlayed);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(4, _return_value);\n\treturn null;\n}\n\n\n/*\tOutput a buffer's worth of sound samples. */\n\nEXPORT(sqInt)\nprimitiveSoundPlaySamples(void)\n{\n\tusqInt *buf;\n\tsqInt frameCount;\n\tsqInt framesPlayed;\n\tsqInt startIndex;\n\tsqInt _return_value;\n\n\tframeCount = interpreterProxy->stackIntegerValue(2);\n\tinterpreterProxy->success(interpreterProxy->isWords(interpreterProxy->stackValue(1)));\n\tbuf = ((unsigned *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(1))));\n\tstartIndex = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->success((startIndex >= 1)\n\t && (((startIndex + frameCount) - 1) <= (interpreterProxy->slotSizeOf(((sqInt)(long)(buf) - 4)))));\n\tif (!(interpreterProxy->failed())) {\n\t\tframesPlayed = snd_PlaySamplesFromAtLength(frameCount, (void *)buf, startIndex - 1);\n\t\tinterpreterProxy->success(framesPlayed >= 0);\n\t}\n\t_return_value = interpreterProxy->positive32BitIntegerFor(framesPlayed);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(4, _return_value);\n\treturn null;\n}\n\n\n/*\tOutput a buffer's worth of silence. Returns the number of sample frames\n\tplayed. \n */\n\nEXPORT(sqInt)\nprimitiveSoundPlaySilence(void)\n{\n\tsqInt framesPlayed;\n\tsqInt _return_value;\n\n\n\t/* -1 if sound output not started */\n\n\tframesPlayed = snd_PlaySilence();\n\tinterpreterProxy->success(framesPlayed >= 0);\n\t_return_value = interpreterProxy->positive32BitIntegerFor(framesPlayed);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(1, _return_value);\n\treturn null;\n}\n\n\n/*\tRecord a buffer's worth of 16-bit sound samples. */\n\nEXPORT(sqInt)\nprimitiveSoundRecordSamples(void)\n{\n\tusqInt *buf;\n\tsqInt bufLen;\n\tchar*bufPtr;\n\tsqInt bufSizeInBytes;\n\tsqInt byteOffset;\n\tsqInt samplesRecorded;\n\tsqInt startWordIndex;\n\tsqInt _return_value;\n\n\tinterpreterProxy->success(interpreterProxy->isWords(interpreterProxy->stackValue(1)));\n\tbuf = ((unsigned *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(1))));\n\tstartWordIndex = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tbufSizeInBytes = (interpreterProxy->slotSizeOf(((sqInt)(long)(buf) - 4))) * 4;\n\t\tinterpreterProxy->success((startWordIndex >= 1)\n\t\t && (((startWordIndex - 1) * 2) < bufSizeInBytes));\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tbyteOffset = (startWordIndex - 1) * 2;\n\t\tbufPtr = (((char*) buf)) + byteOffset;\n\t\tbufLen = bufSizeInBytes - byteOffset;\n\t\tsamplesRecorded = snd_RecordSamplesIntoAtLength(bufPtr, 0, bufLen);\n\t}\n\t_return_value = interpreterProxy->positive32BitIntegerFor(samplesRecorded);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->popthenPush(3, _return_value);\n\treturn null;\n}\n\n\n/*\tSet the sound input recording level. */\n\nEXPORT(sqInt)\nprimitiveSoundSetLeftVolume(void)\n{\n\tdouble aLeftVolume;\n\tdouble aRightVolume;\n\n\taLeftVolume = interpreterProxy->stackFloatValue(1);\n\taRightVolume = interpreterProxy->stackFloatValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tsnd_SetVolume(aLeftVolume,aRightVolume);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(2);\n\treturn null;\n}\n\n\n/*\tSet the sound input recording level. */\n\nEXPORT(sqInt)\nprimitiveSoundSetRecordLevel(void)\n{\n\tsqInt level;\n\n\tlevel = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tsnd_SetRecordLevel(level);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(1);\n\treturn null;\n}\n\n\n/*\tStart the double-buffered sound output with the given buffer size, sample\n\trate, and stereo flag.\n */\n\nEXPORT(sqInt)\nprimitiveSoundStart(void)\n{\n\tsqInt bufFrames;\n\tsqInt samplesPerSec;\n\tsqInt stereoFlag;\n\n\tbufFrames = interpreterProxy->stackIntegerValue(2);\n\tsamplesPerSec = interpreterProxy->stackIntegerValue(1);\n\tstereoFlag = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(0));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->success(snd_Start(bufFrames, samplesPerSec, stereoFlag, 0));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(3);\n\treturn null;\n}\n\n\n/*\tStart recording sound with the given parameters. */\n\nEXPORT(sqInt)\nprimitiveSoundStartRecording(void)\n{\n\tsqInt desiredSamplesPerSec;\n\tsqInt semaIndex;\n\tsqInt stereoFlag;\n\n\tdesiredSamplesPerSec = interpreterProxy->stackIntegerValue(2);\n\tstereoFlag = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(1));\n\tsemaIndex = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tsnd_StartRecording(desiredSamplesPerSec, stereoFlag, semaIndex);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(3);\n\treturn null;\n}\n\n\n/*\tStart the double-buffered sound output with the given buffer size, sample\n\trate, stereo flag, and semaphore index.\n */\n\nEXPORT(sqInt)\nprimitiveSoundStartWithSemaphore(void)\n{\n\tsqInt bufFrames;\n\tsqInt samplesPerSec;\n\tsqInt semaIndex;\n\tsqInt stereoFlag;\n\n\tbufFrames = interpreterProxy->stackIntegerValue(3);\n\tsamplesPerSec = interpreterProxy->stackIntegerValue(2);\n\tstereoFlag = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(1));\n\tsemaIndex = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->success(snd_Start(bufFrames, samplesPerSec, stereoFlag, semaIndex));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->pop(4);\n\treturn null;\n}\n\n\n/*\tStop double-buffered sound output. */\n\nEXPORT(sqInt)\nprimitiveSoundStop(void)\n{\n\tsnd_Stop();\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\treturn null;\n}\n\n\n/*\tStop recording sound. */\n\nEXPORT(sqInt)\nprimitiveSoundStopRecording(void)\n{\n\tsnd_StopRecording();\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\treturn null;\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n\tsqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\nEXPORT(sqInt)\nshutdownModule(void)\n{\n\treturn soundShutdown();\n}\n\nstatic void\nsqAssert(sqInt aBool)\n{\n\t/* missing DebugCode */;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* SoundPlugin_exports[][3] = {\n\t{\"SoundPlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"SoundPlugin\", \"initialiseModule\", (void*)initialiseModule},\n\t{\"SoundPlugin\", \"primitiveSoundAvailableSpace\", (void*)primitiveSoundAvailableSpace},\n\t{\"SoundPlugin\", \"primitiveSoundGetRecordingSampleRate\", (void*)primitiveSoundGetRecordingSampleRate},\n\t{\"SoundPlugin\", \"primitiveSoundGetVolume\", (void*)primitiveSoundGetVolume},\n\t{\"SoundPlugin\", \"primitiveSoundInsertSamples\", (void*)primitiveSoundInsertSamples},\n\t{\"SoundPlugin\", \"primitiveSoundPlaySamples\", (void*)primitiveSoundPlaySamples},\n\t{\"SoundPlugin\", \"primitiveSoundPlaySilence\", (void*)primitiveSoundPlaySilence},\n\t{\"SoundPlugin\", \"primitiveSoundRecordSamples\", (void*)primitiveSoundRecordSamples},\n\t{\"SoundPlugin\", \"primitiveSoundSetLeftVolume\", (void*)primitiveSoundSetLeftVolume},\n\t{\"SoundPlugin\", \"primitiveSoundSetRecordLevel\", (void*)primitiveSoundSetRecordLevel},\n\t{\"SoundPlugin\", \"primitiveSoundStart\", (void*)primitiveSoundStart},\n\t{\"SoundPlugin\", \"primitiveSoundStartRecording\", (void*)primitiveSoundStartRecording},\n\t{\"SoundPlugin\", \"primitiveSoundStartWithSemaphore\", (void*)primitiveSoundStartWithSemaphore},\n\t{\"SoundPlugin\", \"primitiveSoundStop\", (void*)primitiveSoundStop},\n\t{\"SoundPlugin\", \"primitiveSoundStopRecording\", (void*)primitiveSoundStopRecording},\n\t{\"SoundPlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{\"SoundPlugin\", \"shutdownModule\", (void*)shutdownModule},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/Squeak3D/Squeak3D.c",
    "content": "/* Automatically generated from Squeak on 15 June 2010 5:06:07 pm \n   by VMMaker 4.2.4\n */\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n#include \"b3d.h\"\n#include \"b3d.h\"\n\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n#define AmbientPart 0\n#define DiffusePart 4\n#define EmissionAlpha 15\n#define EmissionBlue 14\n#define EmissionGreen 13\n#define EmissionRed 12\n#define FlagAmbientPart 256\n#define FlagAttenuated 4\n#define FlagDiffusePart 512\n#define FlagDirectional 2\n#define FlagHasSpot 8\n#define FlagM44Identity 1\n#define FlagM44NoPerspective 2\n#define FlagM44NoTranslation 4\n#define FlagPositional 1\n#define FlagSpecularPart 1024\n#define InAllMask 1365\n#define InBackBit 1024\n#define InBottomBit 64\n#define InFrontBit 256\n#define InLeftBit 1\n#define InRightBit 4\n#define InTopBit 16\n#define MaterialShininess 16\n#define MaterialSize 17\n#define OutAllMask 2730\n#define OutBackBit 2048\n#define OutBottomBit 128\n#define OutFrontBit 512\n#define OutLeftBit 2\n#define OutRightBit 8\n#define OutTopBit 32\n#define PrimLightAttenuationConstant 18\n#define PrimLightAttenuationLinear 19\n#define PrimLightAttenuationSquared 20\n#define PrimLightDirection 15\n#define PrimLightDirectionX 15\n#define PrimLightDirectionY 16\n#define PrimLightDirectionZ 17\n#define PrimLightFlags 21\n#define PrimLightPositionX 12\n#define PrimLightPositionY 13\n#define PrimLightPositionZ 14\n#define PrimLightSize 32\n#define PrimTypeMax 6\n#define PrimVertexSize 16\n#define PrimVtxClipFlags 13\n#define PrimVtxColor32 12\n#define PrimVtxNormal 3\n#define PrimVtxNormalX 3\n#define PrimVtxNormalY 4\n#define PrimVtxNormalZ 5\n#define PrimVtxPosition 0\n#define PrimVtxPositionX 0\n#define PrimVtxPositionY 1\n#define PrimVtxPositionZ 2\n#define PrimVtxRasterPosW 11\n#define PrimVtxRasterPosX 8\n#define PrimVtxRasterPosY 9\n#define PrimVtxRasterPosZ 10\n#define PrimVtxTexCoordU 6\n#define PrimVtxTexCoordV 7\n#define PrimVtxTexCoords 6\n#define SpecularPart 8\n#define SpotLightDeltaCos 24\n#define SpotLightExponent 25\n#define SpotLightMinCos 22\n#define VBTrackAmbient 1\n#define VBTrackDiffuse 2\n#define VBTrackEmission 8\n#define VBTrackSpecular 4\n#define VBTwoSidedLighting 64\n#define VBUseLocalViewer 128\n#define VBVtxHasNormals 16\n\n/*** Function Prototypes ***/\nstatic sqInt addPartfromtrackFlagscale(float *lightPart, float *materialPart, sqInt vbTrackFlag, double scale);\nstatic sqInt analyzeMatrix3x3Length(float *m);\nstatic sqInt analyzeMatrix(float *m);\n#pragma export on\nEXPORT(sqInt) b3dClipPolygon(void);\nEXPORT(sqInt) b3dComputeMinIndexZ(void);\nEXPORT(sqInt) b3dComputeMinZ(void);\nEXPORT(sqInt) b3dDetermineClipFlags(void);\nEXPORT(sqInt) b3dInitPrimitiveObject(void);\nEXPORT(sqInt) b3dInitializeRasterizerState(void);\nEXPORT(sqInt) b3dInplaceHouseHolderInvert(void);\nEXPORT(sqInt) b3dLoadIndexArray(void);\nEXPORT(sqInt) b3dLoadVertexBuffer(void);\nEXPORT(sqInt) b3dMapVertexBuffer(void);\nEXPORT(sqInt) b3dOrthoNormInverseMatrix(void);\nEXPORT(sqInt) b3dPrimitiveNextClippedTriangle(void);\nEXPORT(sqInt) b3dPrimitiveObjectSize(void);\nEXPORT(sqInt) b3dPrimitiveTextureSize(void);\nEXPORT(sqInt) b3dRasterizerVersion(void);\nEXPORT(sqInt) b3dShadeVertexBuffer(void);\nEXPORT(sqInt) b3dShaderVersion(void);\nEXPORT(sqInt) b3dStartRasterizer(void);\nEXPORT(sqInt) b3dTransformDirection(void);\nEXPORT(sqInt) b3dTransformMatrixWithInto(void);\nEXPORT(sqInt) b3dTransformPoint(void);\nEXPORT(sqInt) b3dTransformPrimitiveNormal(void);\nEXPORT(sqInt) b3dTransformPrimitivePosition(void);\nEXPORT(sqInt) b3dTransformPrimitiveRasterPosition(void);\nEXPORT(sqInt) b3dTransformVertexBuffer(void);\nEXPORT(sqInt) b3dTransformerVersion(void);\nEXPORT(sqInt) b3dTransposeMatrix(void);\n#pragma export off\nstatic double backClipValueFromto(sqInt last, sqInt next);\nstatic double bottomClipValueFromto(sqInt last, sqInt next);\nstatic sqInt clipPolygoncountwithmask(int *vtxArray, sqInt vtxCount, int *tempVtxArray, sqInt outMask);\nstatic sqInt clipPolygonBackFromtocount(int *buf1, int *buf2, sqInt n);\nstatic sqInt clipPolygonBottomFromtocount(int *buf1, int *buf2, sqInt n);\nstatic sqInt clipPolygonFrontFromtocount(int *buf1, int *buf2, sqInt n);\nstatic sqInt clipPolygonLeftFromtocount(int *buf1, int *buf2, sqInt n);\nstatic sqInt clipPolygonRightFromtocount(int *buf1, int *buf2, sqInt n);\nstatic sqInt clipPolygonTopFromtocount(int *buf1, int *buf2, sqInt n);\nstatic sqInt computeAttenuation(void);\nstatic sqInt computeDirection(void);\nstatic sqInt computeSpecularDirection(void);\nstatic double computeSpotFactor(void);\nstatic sqInt determineClipFlagscount(void *vtxArray, sqInt count);\nstatic double dotProductOfFloatwithDouble(float * v1, double *v2);\nstatic void* fetchLightSourceofObject(sqInt index, sqInt anArray);\nstatic double frontClipValueFromto(sqInt last, sqInt next);\nstatic VirtualMachine * getInterpreter(void);\n#pragma export on\nEXPORT(const char*) getModuleName(void);\n#pragma export off\nstatic sqInt halt(void);\n#pragma export on\nEXPORT(sqInt) initialiseModule(void);\n#pragma export off\nstatic sqInt interpolateFromtoatinto(float *last, float *next, double t, float *out);\nstatic double inverseLengthOfDouble(double * aVector);\nstatic double inverseLengthOfFloat(float * aVector);\nstatic double leftClipValueFromto(sqInt last, sqInt next);\nstatic sqInt loadObjectsFrom(sqInt stackIndex);\nstatic sqInt loadPrimitiveLightSource(void);\nstatic sqInt loadPrimitiveVertex(void);\nstatic sqInt loadRasterizerState(sqInt stackIndex);\nstatic sqInt loadTextureinto(sqInt textureOop, B3DTexture *destPtr);\nstatic sqInt loadTexturesFrom(sqInt stackIndex);\nstatic sqInt loadViewportFrom(sqInt stackIndex);\nstatic sqInt mapVBofSizeinto(void *vtxArray, sqInt vtxCount, sqInt boxArray);\n#pragma export on\nEXPORT(sqInt) moduleUnloaded(char * aModuleName);\n#pragma export off\nstatic sqInt msg(char * s);\n#pragma export on\nEXPORT(sqInt) primitiveSetBitBltPlugin(void);\n#pragma export off\nstatic double processIndexedofSizeidxArrayidxSize(float *vtxArray, sqInt vtxSize, int *idxArray, sqInt idxSize);\nstatic sqInt processIndexedIDXofSizeidxArrayidxSize(float *vtxArray, sqInt vtxSize, int *idxArray, sqInt idxSize);\nstatic double processNonIndexedofSize(float *vtxArray, sqInt vtxSize);\nstatic sqInt processNonIndexedIDXofSize(float *vtxArray, sqInt vtxSize);\nstatic double rightClipValueFromto(sqInt last, sqInt next);\n#pragma export on\nEXPORT(sqInt) setInterpreter(struct VirtualMachine* anInterpreter);\n#pragma export off\nstatic sqInt shadeVertex(void);\nstatic sqInt stackLightArrayValue(sqInt stackIndex);\nstatic void * stackMaterialValue(sqInt stackIndex);\nstatic void* stackMatrix(sqInt index);\nstatic void* stackPrimitiveIndexArrayofSizevalidateforVertexSize(sqInt stackIndex, sqInt nItems, sqInt aBool, sqInt maxIndex);\nstatic void* stackPrimitiveVertex(sqInt index);\nstatic void* stackPrimitiveVertexArrayofSize(sqInt index, sqInt nItems);\nstatic sqInt storeObjectsInto(sqInt stackIndex);\nstatic sqInt storePrimitiveVertex(void);\nstatic double topClipValueFromto(sqInt last, sqInt next);\nstatic sqInt transformMatrixwithinto(float *src, float *arg, float *dst);\nstatic sqInt transformPrimitiveNormalbyrescale(float *pVertex, float *matrix, sqInt rescale);\nstatic sqInt transformPrimitivePositionby(float *pVertex, float *matrix);\nstatic sqInt transformPrimitivePositionFastby(float *pVertex, float *matrix);\nstatic sqInt transformPrimitivePositionFasterby(float *pVertex, float *matrix);\nstatic sqInt transformPrimitiveRasterPositionby(float *pVertex, float *matrix);\nstatic sqInt transformVBcountbyandflags(float *vtxArray, sqInt vtxCount, float *modelViewMatrix, float *projectionMatrix, sqInt flags);\nstatic void* vbLoadArraysize(sqInt oop, sqInt count);\n/*** Variables ***/\nstatic char bbPluginName[256] = \"BitBltPlugin\";\nstatic sqInt copyBitsFn;\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic double l2vDirection[3];\nstatic double l2vDistance;\nstatic double l2vSpecDir[3];\nstatic sqInt lightFlags;\nstatic double lightScale;\nstatic float* litVertex;\nstatic sqInt loadBBFn;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"Squeak3D 15 June 2010 (i)\"\n#else\n\t\"Squeak3D 15 June 2010 (e)\"\n#endif\n;\nstatic float* primLight;\nstatic float* primMaterial;\nstatic B3DRasterizerState state;\nstatic sqInt vbFlags;\nstatic B3DPrimitiveViewport viewport;\nstatic double vtxInColor[4];\nstatic double vtxOutColor[4];\n\n\n\n/*\tAdd the given light part to the output color, scaled by the given scale factor.\n\tIf the given flag is set in vbFlags then load the part from the primitive vertex */\n\nstatic sqInt addPartfromtrackFlagscale(float *lightPart, float *materialPart, sqInt vbTrackFlag, double scale) {\n    double gPart;\n    double bPart;\n    double rPart;\n    double aPart;\n\n\tif (vbFlags & vbTrackFlag) {\n\t\trPart = ((vtxInColor[0]) * (lightPart[0])) * scale;\n\t\tgPart = ((vtxInColor[1]) * (lightPart[1])) * scale;\n\t\tbPart = ((vtxInColor[2]) * (lightPart[2])) * scale;\n\t\taPart = ((vtxInColor[3]) * (lightPart[3])) * scale;\n\t} else {\n\n\t\t/* Note: This should be pre-computed. */\n\n\t\trPart = ((materialPart[0]) * (lightPart[0])) * scale;\n\t\tgPart = ((materialPart[1]) * (lightPart[1])) * scale;\n\t\tbPart = ((materialPart[2]) * (lightPart[2])) * scale;\n\t\taPart = ((materialPart[3]) * (lightPart[3])) * scale;\n\t}\n\tvtxOutColor[0] = ((vtxOutColor[0]) + rPart);\n\tvtxOutColor[1] = ((vtxOutColor[1]) + gPart);\n\tvtxOutColor[2] = ((vtxOutColor[2]) + bPart);\n\tvtxOutColor[3] = ((vtxOutColor[3]) + aPart);\n}\n\n\n/*\tCheck if the matrix scales normals to non-unit length. */\n\nstatic sqInt analyzeMatrix3x3Length(float *m) {\n    double det;\n\n\tdet = (((((((m[0]) * (m[5])) * (m[10])) - (((m[2]) * (m[5])) * (m[8]))) + (((m[4]) * (m[9])) * (m[2]))) - (((m[6]) * (m[9])) * (m[0]))) + (((m[8]) * (m[1])) * (m[6]))) - (((m[10]) * (m[1])) * (m[4]));\n\treturn (det < 0.99) || (det > 1.01);\n}\n\n\n/*\tAnalyze the matrix and return the appropriate flags */\n\nstatic sqInt analyzeMatrix(float *m) {\n    sqInt flags;\n\n\tflags = 0;\n\tif (((m[12]) == 0.0) && (((m[13]) == 0.0) && (((m[14]) == 0.0) && ((m[15]) == 1.0)))) {\n\n\t\t/* Check translation */\n\n\t\tflags = flags | FlagM44NoPerspective;\n\t\tif (((m[3]) == 0.0) && (((m[7]) == 0.0) && ((m[11]) == 0.0))) {\n\n\t\t\t/* Check for identity */\n\n\t\t\tflags = flags | FlagM44NoTranslation;\n\t\t\tif (((m[0]) == 1.0) && (((m[5]) == 1.0) && (((m[10]) == 1.0) && (((m[1]) == 0.0) && (((m[2]) == 0.0) && (((m[4]) == 0.0) && (((m[6]) == 0.0) && (((m[8]) == 0.0) && ((m[9]) == 0.0))))))))) {\n\t\t\t\tflags = flags | FlagM44Identity;\n\t\t\t}\n\t\t}\n\t}\n\treturn flags;\n}\n\n\n/*\tPrimitive. Clip the polygon given in the vertexArray using the temporary vertex array which is assumed to have sufficient size. */\n\nEXPORT(sqInt) b3dClipPolygon(void) {\n    sqInt vtxCount;\n    sqInt outMask;\n    int *vtxArray;\n    int *tempVtxArray;\n    sqInt count;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 4)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\toutMask = interpreterProxy->stackIntegerValue(0);\n\tvtxCount = interpreterProxy->stackIntegerValue(2);\n\tvtxArray = stackPrimitiveVertexArrayofSize(3, vtxCount + 4);\n\ttempVtxArray = stackPrimitiveVertexArrayofSize(1, vtxCount + 4);\n\tif ((vtxArray == null) || ((tempVtxArray == null) || (interpreterProxy->failed()))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tvtxArray -= PrimVertexSize;\n\ttempVtxArray -= PrimVertexSize;\n\tcount = clipPolygoncountwithmask(vtxArray, vtxCount, tempVtxArray, outMask);\n\tinterpreterProxy->pop(5);\n\tinterpreterProxy->pushInteger(count);\n}\n\n\n/*\tPrimitive. Compute and return the index for the minimal z value of all objects in the vertex buffer. */\n\nEXPORT(sqInt) b3dComputeMinIndexZ(void) {\n    sqInt primType;\n    int *idxArray;\n    sqInt idxSize;\n    float *vtxArray;\n    sqInt vtxSize;\n    sqInt minIndex;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 5)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tidxSize = interpreterProxy->stackIntegerValue(0);\n\tvtxSize = interpreterProxy->stackIntegerValue(2);\n\tprimType = interpreterProxy->stackIntegerValue(4);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tvtxArray = stackPrimitiveVertexArrayofSize(3, vtxSize);\n\tidxArray = stackPrimitiveIndexArrayofSizevalidateforVertexSize(1, idxSize, 1, vtxSize);\n\tif ((vtxArray == null) || ((idxArray == null) || (interpreterProxy->failed()))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif ((primType < 1) || (primType > 6)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (primType <= 3) {\n\t\tminIndex = processNonIndexedIDXofSize(vtxArray, vtxSize);\n\t} else {\n\t\tminIndex = processIndexedIDXofSizeidxArrayidxSize(vtxArray, vtxSize, idxArray, idxSize);\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->pop(6);\n\t\tinterpreterProxy->pushInteger(minIndex);\n\t}\n}\n\n\n/*\tPrimitive. Compute and return the minimal z value of all objects in the vertex buffer. */\n\nEXPORT(sqInt) b3dComputeMinZ(void) {\n    sqInt primType;\n    int *idxArray;\n    sqInt idxSize;\n    float *vtxArray;\n    sqInt vtxSize;\n    double minZ;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 5)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tidxSize = interpreterProxy->stackIntegerValue(0);\n\tvtxSize = interpreterProxy->stackIntegerValue(2);\n\tprimType = interpreterProxy->stackIntegerValue(4);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tvtxArray = stackPrimitiveVertexArrayofSize(3, vtxSize);\n\tidxArray = stackPrimitiveIndexArrayofSizevalidateforVertexSize(1, idxSize, 1, vtxSize);\n\tif ((vtxArray == null) || ((idxArray == null) || (interpreterProxy->failed()))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif ((primType < 1) || (primType > 6)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (primType <= 3) {\n\t\tminZ = processNonIndexedofSize(vtxArray, vtxSize);\n\t} else {\n\t\tminZ = processIndexedofSizeidxArrayidxSize(vtxArray, vtxSize, idxArray, idxSize);\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->pop(6);\n\t\tinterpreterProxy->pushFloat(minZ);\n\t}\n}\n\n\n/*\tPrimitive. Determine the clipping flags for all vertices. */\n\nEXPORT(sqInt) b3dDetermineClipFlags(void) {\n    sqInt vtxCount;\n    sqInt result;\n    void *vtxArray;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 2)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tvtxCount = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tvtxArray = stackPrimitiveVertexArrayofSize(1, vtxCount);\n\tif ((vtxArray == null) || (interpreterProxy->failed())) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tresult = determineClipFlagscount(vtxArray, vtxCount);\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->pop(3);\n\t\tinterpreterProxy->pushInteger(result);\n\t}\n}\n\nEXPORT(sqInt) b3dInitPrimitiveObject(void) {\n    sqInt vtxSize;\n    int *vtxArray;\n    void *primObj;\n    int *idxArray;\n    sqInt idxSize;\n    sqInt primSize;\n    sqInt primOop;\n    sqInt textureIndex;\n    sqInt primitive;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 8)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\ttextureIndex = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tloadViewportFrom(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tvtxSize = interpreterProxy->stackIntegerValue(4);\n\tvtxArray = stackPrimitiveVertexArrayofSize(5, vtxSize);\n\tif (vtxArray == null) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tidxSize = interpreterProxy->stackIntegerValue(2);\n\tidxArray = stackPrimitiveIndexArrayofSizevalidateforVertexSize(3, idxSize, 1, vtxSize);\n\tif (idxArray == null) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tprimitive = interpreterProxy->stackIntegerValue(6);\n\tif ((primitive < 1) || (primitive > PrimTypeMax)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!((primitive == 3) || ((primitive == 5) || (primitive == 6)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tprimOop = interpreterProxy->stackObjectValue(7);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!(interpreterProxy->isWords(primOop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tprimObj = interpreterProxy->firstIndexableField(primOop);\n\n\t/* Do the work */\n\n\tprimSize = interpreterProxy->byteSizeOf(primOop);\n\tif (primitive == 3) {\n\t\tif (b3dAddPolygonObject((void*) primObj, primSize, B3D_FACE_RGB, textureIndex, (B3DPrimitiveVertex*) vtxArray, vtxSize, &viewport) != B3D_NO_ERROR) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\tif (primitive == 5) {\n\t\tif (b3dAddIndexedTriangleObject((void*) primObj, primSize, B3D_FACE_RGB, textureIndex, (B3DPrimitiveVertex*) vtxArray, vtxSize, (B3DInputFace*) idxArray, idxSize / 3, &viewport) != B3D_NO_ERROR) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\tif (primitive == 6) {\n\t\tif (b3dAddIndexedQuadObject((void*) primObj, primSize, B3D_FACE_RGB, textureIndex, (B3DPrimitiveVertex*) vtxArray, vtxSize, (B3DInputQuad*) idxArray, idxSize / 4, &viewport) != B3D_NO_ERROR) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\tinterpreterProxy->pop(9);\n\tinterpreterProxy->push(primOop);\n}\n\n\n/*\tPrimitive. Initialize the primitive level objects of the given rasterizer. */\n\nEXPORT(sqInt) b3dInitializeRasterizerState(void) {\n    sqInt objOop;\n    sqInt objLen;\n    sqInt stateOop;\n    void *obj;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 0)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tstateOop = interpreterProxy->stackObjectValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!((interpreterProxy->isPointers(stateOop)) && ((interpreterProxy->slotSizeOf(stateOop)) >= 7))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tobjOop = interpreterProxy->fetchPointerofObject(0, stateOop);\n\tif (((objOop & 1)) || (!(interpreterProxy->isWords(objOop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tobjLen = interpreterProxy->byteSizeOf(objOop);\n\tobj = interpreterProxy->firstIndexableField(objOop);\n\tif (b3dInitializeFaceAllocator(obj, objLen) != B3D_NO_ERROR) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tobjOop = interpreterProxy->fetchPointerofObject(1, stateOop);\n\tif (((objOop & 1)) || (!(interpreterProxy->isWords(objOop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tobjLen = interpreterProxy->byteSizeOf(objOop);\n\tobj = interpreterProxy->firstIndexableField(objOop);\n\tif (b3dInitializeEdgeAllocator(obj, objLen) != B3D_NO_ERROR) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tobjOop = interpreterProxy->fetchPointerofObject(2, stateOop);\n\tif (((objOop & 1)) || (!(interpreterProxy->isWords(objOop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tobjLen = interpreterProxy->byteSizeOf(objOop);\n\tobj = interpreterProxy->firstIndexableField(objOop);\n\tif (b3dInitializeAttrAllocator(obj, objLen) != B3D_NO_ERROR) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tobjOop = interpreterProxy->fetchPointerofObject(3, stateOop);\n\tif (((objOop & 1)) || (!(interpreterProxy->isWords(objOop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tobjLen = interpreterProxy->byteSizeOf(objOop);\n\tobj = interpreterProxy->firstIndexableField(objOop);\n\tif (b3dInitializeAET(obj, objLen) != B3D_NO_ERROR) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tobjOop = interpreterProxy->fetchPointerofObject(4, stateOop);\n\tif (((objOop & 1)) || (!(interpreterProxy->isWords(objOop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tobjLen = interpreterProxy->byteSizeOf(objOop);\n\tobj = interpreterProxy->firstIndexableField(objOop);\n\tif (b3dInitializeEdgeList(obj, objLen) != B3D_NO_ERROR) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tobjOop = interpreterProxy->fetchPointerofObject(5, stateOop);\n\tif (((objOop & 1)) || (!(interpreterProxy->isWords(objOop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tobjLen = interpreterProxy->byteSizeOf(objOop);\n\tobj = interpreterProxy->firstIndexableField(objOop);\n\tif (b3dInitializeFillList(obj, objLen) != B3D_NO_ERROR) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n}\n\n\n/*\tPrimitive. Perform an inplace house holder matrix inversion */\n\nEXPORT(sqInt) b3dInplaceHouseHolderInvert(void) {\n    sqInt j;\n    double sigma;\n    sqInt r;\n    sqInt i;\n    double beta;\n    double x[4][4] = { {1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1} };\n    float *rcvr;\n    double m[4][4];\n    double d[4][4];\n    double sum;\n    sqInt k;\n    double s;\n\n\t;\n\trcvr = stackMatrix(0);\n\tfor (i = 0; i <= 3; i += 1) {\n\t\tfor (j = 0; j <= 3; j += 1) {\n\t\t\t(m[i])[j] = (rcvr[(i * 4) + j]);\n\t\t}\n\t}\n\tfor (j = 0; j <= 3; j += 1) {\n\t\tsigma = 0.0;\n\t\tfor (i = j; i <= 3; i += 1) {\n\t\t\tsigma += ((m[i])[j]) * ((m[i])[j]);\n\t\t}\n\t\tif (sigma < 1.0e-10) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t\tif (((m[j])[j]) < 0.0) {\n\t\t\ts = sqrt(sigma);\n\t\t} else {\n\t\t\ts = 0.0 - (sqrt(sigma));\n\t\t}\n\t\tfor (r = 0; r <= 3; r += 1) {\n\t\t\t(d[j])[r] = s;\n\t\t}\n\t\tbeta = 1.0 / ((s * ((m[j])[j])) - sigma);\n\t\t(m[j])[j] = (((m[j])[j]) - s);\n\t\tfor (k = (j + 1); k <= 3; k += 1) {\n\t\t\tsum = 0.0;\n\t\t\tfor (i = j; i <= 3; i += 1) {\n\t\t\t\tsum += ((m[i])[j]) * ((m[i])[k]);\n\t\t\t}\n\t\t\tsum = sum * beta;\n\t\t\tfor (i = j; i <= 3; i += 1) {\n\t\t\t\t(m[i])[k] = (((m[i])[k]) + (((m[i])[j]) * sum));\n\t\t\t}\n\t\t}\n\t\tfor (r = 0; r <= 3; r += 1) {\n\t\t\tsum = 0.0;\n\t\t\tfor (i = j; i <= 3; i += 1) {\n\t\t\t\tsum += ((x[i])[r]) * ((m[i])[j]);\n\t\t\t}\n\t\t\tsum = sum * beta;\n\t\t\tfor (i = j; i <= 3; i += 1) {\n\t\t\t\t(x[i])[r] = (((x[i])[r]) + (sum * ((m[i])[j])));\n\t\t\t}\n\t\t}\n\t}\n\tfor (r = 0; r <= 3; r += 1) {\n\t\tfor (i = 3; i >= 0; i += -1) {\n\t\t\tfor (j = (i + 1); j <= 3; j += 1) {\n\t\t\t\t(x[i])[r] = (((x[i])[r]) - (((x[j])[r]) * ((m[i])[j])));\n\t\t\t}\n\t\t\t(x[i])[r] = (((x[i])[r]) / ((d[i])[r]));\n\t\t}\n\t}\n\tfor (i = 0; i <= 3; i += 1) {\n\t\tfor (j = 0; j <= 3; j += 1) {\n\t\t\trcvr[(i * 4) + j] = (((float) ((x[i])[j])));\n\t\t}\n\t}\n}\n\n\n/*\tPrimitive. Load the given index array into the receiver.\n\tNOTE: dstStart is a zero-based index. */\n\nEXPORT(sqInt) b3dLoadIndexArray(void) {\n    int *srcPtr;\n    sqInt i;\n    sqInt count;\n    sqInt dstStart;\n    sqInt dstSize;\n    sqInt vtxOffset;\n    sqInt dstArray;\n    sqInt idx;\n    int *dstPtr;\n    sqInt srcArray;\n    sqInt maxValue;\n\n\tvtxOffset = interpreterProxy->stackIntegerValue(0);\n\tmaxValue = interpreterProxy->stackIntegerValue(1);\n\tcount = interpreterProxy->stackIntegerValue(2);\n\tsrcArray = interpreterProxy->stackObjectValue(3);\n\tdstStart = interpreterProxy->stackIntegerValue(4);\n\tdstArray = interpreterProxy->stackObjectValue(5);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!(interpreterProxy->isWords(srcArray))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif ((interpreterProxy->slotSizeOf(srcArray)) < count) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\n\t/* Check dstArray */\n\n\tsrcPtr = ((int*) (interpreterProxy->firstIndexableField(srcArray)));\n\n\t/* Check if there is enough room left in dstArray */\n\n\tdstSize = interpreterProxy->slotSizeOf(dstArray);\n\tif ((dstStart + count) > dstSize) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\n\t/* Do the actual work */\n\n\tdstPtr = ((int *) (interpreterProxy->firstIndexableField(dstArray)));\n\tfor (i = 0; i <= (count - 1); i += 1) {\n\t\tidx = srcPtr[i];\n\t\tif ((idx < 1) || (idx > maxValue)) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t\tdstPtr[dstStart + i] = (idx + vtxOffset);\n\t}\n\tinterpreterProxy->pop(7);\n\tinterpreterProxy->pushInteger(count);\n}\n\n\n/*\tPrimitive. Load the data into the given vertex buffer.\n\tNOTE: dstStart is a zero-based index. */\n\nEXPORT(sqInt) b3dLoadVertexBuffer(void) {\n    int *normalPtr;\n    sqInt i;\n    int *colorPtr;\n    sqInt count;\n    int *vtxPtr;\n    sqInt dstStart;\n    int *defaultTexCoords;\n    int *defaultNormal;\n    int *texPtr;\n    int *dstPtr;\n    int *defaultColor;\n    int *defaultVtx;\n    int *pVtx;\n\n\tdefaultVtx = stackPrimitiveVertex(0);\n\tcount = interpreterProxy->stackIntegerValue(1);\n\ttexPtr = vbLoadArraysize(interpreterProxy->stackObjectValue(2), 2 * count);\n\tcolorPtr = vbLoadArraysize(interpreterProxy->stackObjectValue(3), count);\n\tnormalPtr = vbLoadArraysize(interpreterProxy->stackObjectValue(4), 3 * count);\n\tvtxPtr = vbLoadArraysize(interpreterProxy->stackObjectValue(5), 3 * count);\n\tdstStart = interpreterProxy->stackIntegerValue(6);\n\n\t/* Check for all problems above */\n\n\tdstPtr = stackPrimitiveVertexArrayofSize(7, dstStart + count);\n\tif ((dstPtr == null) || ((defaultVtx == null) || (interpreterProxy->failed()))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (normalPtr == null) {\n\t\tdefaultNormal = defaultVtx + PrimVtxNormal;\n\t} else {\n\t\tdefaultNormal = normalPtr;\n\t}\n\tif (texPtr == null) {\n\t\tdefaultTexCoords = defaultVtx + PrimVtxTexCoords;\n\t} else {\n\t\tdefaultTexCoords = texPtr;\n\t}\n\tif (colorPtr == null) {\n\t\tdefaultColor = defaultVtx + PrimVtxColor32;\n\t} else {\n\t\tdefaultColor = colorPtr;\n\t}\n\tpVtx = dstPtr + (dstStart * PrimVertexSize);\n\tfor (i = 0; i <= (count - 1); i += 1) {\n\t\tpVtx[PrimVtxPositionX] = (vtxPtr[0]);\n\t\tpVtx[PrimVtxPositionY] = (vtxPtr[1]);\n\t\tpVtx[PrimVtxPositionZ] = (vtxPtr[2]);\n\t\tpVtx[PrimVtxNormalX] = (defaultNormal[0]);\n\t\tpVtx[PrimVtxNormalY] = (defaultNormal[1]);\n\t\tpVtx[PrimVtxNormalZ] = (defaultNormal[2]);\n\t\tpVtx[PrimVtxColor32] = (defaultColor[0]);\n\t\tpVtx[PrimVtxTexCoordU] = (defaultTexCoords[0]);\n\t\tpVtx[PrimVtxTexCoordV] = (defaultTexCoords[1]);\n\t\tpVtx += PrimVertexSize;\n\t\tvtxPtr += 3;\n\t\tif (!(normalPtr == null)) {\n\t\t\tdefaultNormal += 3;\n\t\t}\n\t\tif (!(colorPtr == null)) {\n\t\t\tdefaultColor += 1;\n\t\t}\n\t\tif (!(texPtr == null)) {\n\t\t\tdefaultTexCoords += 2;\n\t\t}\n\t}\n\tinterpreterProxy->pop(9);\n\tinterpreterProxy->pushInteger(count);\n}\n\n\n/*\tPrimitive. Determine the bounds for all vertices in the vertex buffer. */\n\nEXPORT(sqInt) b3dMapVertexBuffer(void) {\n    sqInt vtxCount;\n    sqInt boxArray;\n    void *vtxArray;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 3)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tboxArray = interpreterProxy->stackObjectValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!(((interpreterProxy->fetchClassOf(boxArray)) == (interpreterProxy->classArray())) && ((interpreterProxy->slotSizeOf(boxArray)) == 4))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tvtxCount = interpreterProxy->stackIntegerValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tvtxArray = stackPrimitiveVertexArrayofSize(2, vtxCount);\n\tif ((vtxArray == null) || (interpreterProxy->failed())) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tmapVBofSizeinto(vtxArray, vtxCount, boxArray);\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->pop(3);\n\t}\n}\n\nEXPORT(sqInt) b3dOrthoNormInverseMatrix(void) {\n    sqInt dstOop;\n    double z;\n    float *dst;\n    double y;\n    float *src;\n    double x;\n    double rz;\n    sqInt srcOop;\n    double ry;\n    double rx;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 0)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tsrcOop = interpreterProxy->stackObjectValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!((interpreterProxy->isWords(srcOop)) && ((interpreterProxy->slotSizeOf(srcOop)) == 16))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\n\t/* reload srcOop in case of GC */\n\n\tdstOop = interpreterProxy->clone(srcOop);\n\tsrcOop = interpreterProxy->stackObjectValue(0);\n\tsrc = interpreterProxy->firstIndexableField(srcOop);\n\n\t/* Transpose upper 3x3 matrix */\n\t/* dst at: 0 put: (src at: 0). */\n\n\tdst = interpreterProxy->firstIndexableField(dstOop);\n\tdst[1] = (src[4]);\n\tdst[2] = (src[8]);\n\tdst[4] = (src[1]);\n\tdst[6] = (src[9]);\n\tdst[8] = (src[2]);\n\tdst[9] = (src[6]);\n\tx = src[3];\n\ty = src[7];\n\tz = src[11];\n\trx = ((x * (dst[0])) + (y * (dst[1]))) + (z * (dst[2]));\n\try = ((x * (dst[4])) + (y * (dst[5]))) + (z * (dst[6]));\n\trz = ((x * (dst[8])) + (y * (dst[9]))) + (z * (dst[10]));\n\tdst[3] = (((float) (0.0 - rx)));\n\tdst[7] = (((float) (0.0 - ry)));\n\tdst[11] = (((float) (0.0 - rz)));\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->push(dstOop);\n}\n\n\n/*\tPrimitive. Return the next clipped triangle from the vertex buffer and return its index. */\n\nEXPORT(sqInt) b3dPrimitiveNextClippedTriangle(void) {\n    int *vtxArray;\n    sqInt i;\n    sqInt vtxCount;\n    sqInt idx3;\n    int *idxArray;\n    sqInt firstIndex;\n    sqInt idx2;\n    sqInt triMask;\n    sqInt idxCount;\n    sqInt idx1;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 5)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tidxCount = interpreterProxy->stackIntegerValue(0);\n\tvtxCount = interpreterProxy->stackIntegerValue(2);\n\tfirstIndex = interpreterProxy->stackIntegerValue(4);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tvtxArray = stackPrimitiveVertexArrayofSize(3, vtxCount);\n\tidxArray = stackPrimitiveIndexArrayofSizevalidateforVertexSize(1, idxCount, 1, vtxCount);\n\tif ((vtxArray == null) || ((idxArray == null) || (interpreterProxy->failed()))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tidxArray -= 1;\n\tvtxArray -= PrimVertexSize;\n\tfor (i = firstIndex; i <= idxCount; i += 3) {\n\t\tidx1 = idxArray[i];\n\t\tidx2 = idxArray[i + 1];\n\t\tidx3 = idxArray[i + 2];\n\t\tif (!((idx1 == 0) || ((idx2 == 0) || (idx3 == 0)))) {\n\n\t\t\t/* Check if tri is completely inside */\n\n\t\t\ttriMask = (vtxArray[(idx1 * PrimVertexSize) + PrimVtxClipFlags]) & ((vtxArray[(idx2 * PrimVertexSize) + PrimVtxClipFlags]) & (vtxArray[(idx3 * PrimVertexSize) + PrimVtxClipFlags]));\n\t\t\tif (!((InAllMask & triMask) == InAllMask)) {\n\t\t\t\tif (triMask & OutAllMask) {\n\t\t\t\t\tidxArray[i] = 0;\n\t\t\t\t\tidxArray[i + 1] = 0;\n\t\t\t\t\tidxArray[i + 2] = 0;\n\t\t\t\t} else {\n\t\t\t\t\tinterpreterProxy->pop(6);\n\t\t\t\t\tinterpreterProxy->pushInteger(i);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy->pop(6);\n\tinterpreterProxy->pushInteger(0);\n}\n\n\n/*\tPrimitive. Return the minimal number of words needed for a primitive object. */\n\nEXPORT(sqInt) b3dPrimitiveObjectSize(void) {\n    sqInt objSize;\n\n\tobjSize = (((sqInt) (sizeof(B3DPrimitiveObject) + sizeof(B3DPrimitiveVertex)) >> 2)) + 1;\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(objSize);\n}\n\n\n/*\tPrimitive. Return the minimal number of words needed for a primitive object. */\n\nEXPORT(sqInt) b3dPrimitiveTextureSize(void) {\n    sqInt objSize;\n\n\tobjSize = (((sqInt) (sizeof(B3DTexture)) >> 2)) + 1;\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(objSize);\n}\n\n\n/*\tPrimitive. Return the version of the rasterizer. */\n\nEXPORT(sqInt) b3dRasterizerVersion(void) {\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(1);\n}\n\n\n/*\tPrimitive. Shade all the vertices in the vertex buffer using the given array of primitive light sources. Return true on success. */\n\nEXPORT(sqInt) b3dShadeVertexBuffer(void) {\n    float *vtxArray;\n    sqInt j;\n    sqInt i;\n    sqInt vtxCount;\n    sqInt lightArray;\n    sqInt lightCount;\n    sqInt lightOop;\n    sqInt rgba;\n    sqInt a;\n    sqInt r;\n    sqInt g;\n    sqInt b;\n\n\tvbFlags = interpreterProxy->stackIntegerValue(0);\n\tprimMaterial = stackMaterialValue(1);\n\tlightArray = stackLightArrayValue(2);\n\tvtxCount = interpreterProxy->stackIntegerValue(3);\n\tvtxArray = stackPrimitiveVertexArrayofSize(4, vtxCount);\n\tif ((vtxArray == null) || ((primMaterial == null) || (interpreterProxy->failed()))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tlitVertex = vtxArray;\n\n\t/* Go over all vertices */\n\n\tlightCount = interpreterProxy->slotSizeOf(lightArray);\n\tfor (i = 1; i <= vtxCount; i += 1) {\n\t\t/* begin loadPrimitiveVertex */\n\t\trgba = (((int*) litVertex))[PrimVtxColor32];\n\t\tvtxInColor[2] = ((rgba & 255) * (1.0 / 255.0));\n\t\trgba = ((usqInt) rgba) >> 8;\n\t\tvtxInColor[1] = ((rgba & 255) * (1.0 / 255.0));\n\t\trgba = ((usqInt) rgba) >> 8;\n\t\tvtxInColor[0] = ((rgba & 255) * (1.0 / 255.0));\n\t\trgba = ((usqInt) rgba) >> 8;\n\t\tvtxInColor[3] = ((rgba & 255) * (1.0 / 255.0));\n\t\tif (vbFlags & VBTrackEmission) {\n\t\t\tvtxOutColor[0] = ((vtxInColor[0]) + (primMaterial[EmissionRed]));\n\t\t\tvtxOutColor[1] = ((vtxInColor[1]) + (primMaterial[EmissionGreen]));\n\t\t\tvtxOutColor[2] = ((vtxInColor[2]) + (primMaterial[EmissionBlue]));\n\t\t\tvtxOutColor[3] = ((vtxInColor[3]) + (primMaterial[EmissionAlpha]));\n\t\t} else {\n\t\t\tvtxOutColor[0] = (primMaterial[EmissionRed]);\n\t\t\tvtxOutColor[1] = (primMaterial[EmissionGreen]);\n\t\t\tvtxOutColor[2] = (primMaterial[EmissionBlue]);\n\t\t\tvtxOutColor[3] = (primMaterial[EmissionAlpha]);\n\t\t}\n\t\tfor (j = 0; j <= (lightCount - 1); j += 1) {\n\t\t\t/* begin fetchLightSource:ofObject: */\n\t\t\tlightOop = interpreterProxy->fetchPointerofObject(j, lightArray);\n\t\t\tprimLight = interpreterProxy->firstIndexableField(lightOop);\n\t\t\t/* begin loadPrimitiveLightSource */\n\t\t\tlightFlags = (((int*) primLight))[PrimLightFlags];\n\t\t\tshadeVertex();\n\t\t}\n\t\t/* begin storePrimitiveVertex */\n\t\tr = ((sqInt) ((vtxOutColor[0]) * 255) );\n\t\tr = (((((r < 255) ? r : 255)) < 0) ? 0 : (((r < 255) ? r : 255)));\n\t\tg = ((sqInt) ((vtxOutColor[1]) * 255) );\n\t\tg = (((((g < 255) ? g : 255)) < 0) ? 0 : (((g < 255) ? g : 255)));\n\t\tb = ((sqInt) ((vtxOutColor[2]) * 255) );\n\t\tb = (((((b < 255) ? b : 255)) < 0) ? 0 : (((b < 255) ? b : 255)));\n\t\ta = ((sqInt) ((vtxOutColor[3]) * 255) );\n\t\ta = (((((a < 255) ? a : 255)) < 0) ? 0 : (((a < 255) ? a : 255)));\n\t\t(((int*) litVertex))[PrimVtxColor32] = (b + ((g + ((r + (a << 8)) << 8)) << 8));\n\t\tlitVertex += PrimVertexSize;\n\t}\n\tinterpreterProxy->pop(6);\n\tinterpreterProxy->pushBool(1);\n}\n\n\n/*\tReturn the current shader version. */\n\nEXPORT(sqInt) b3dShaderVersion(void) {\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(1);\n}\n\n\n/*\tPrimitive. Start the rasterizer. */\n\nEXPORT(sqInt) b3dStartRasterizer(void) {\n    sqInt errCode;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 3)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!(loadRasterizerState(2))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tloadTexturesFrom(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tloadObjectsFrom(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\terrCode = b3dMainLoop(&state, B3D_NO_ERROR);\n\tstoreObjectsInto(1);\n\tinterpreterProxy->pop(4);\n\tinterpreterProxy->pushInteger(errCode);\n}\n\nEXPORT(sqInt) b3dTransformDirection(void) {\n    sqInt v3Oop;\n    double z;\n    double y;\n    double x;\n    float *matrix;\n    double rz;\n    double ry;\n    double rx;\n    float *vertex;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tv3Oop = interpreterProxy->stackObjectValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!((interpreterProxy->isWords(v3Oop)) && ((interpreterProxy->slotSizeOf(v3Oop)) == 3))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tvertex = interpreterProxy->firstIndexableField(v3Oop);\n\tmatrix = stackMatrix(1);\n\tif (matrix == null) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tx = vertex[0];\n\ty = vertex[1];\n\tz = vertex[2];\n\trx = ((x * (matrix[0])) + (y * (matrix[1]))) + (z * (matrix[2]));\n\try = ((x * (matrix[4])) + (y * (matrix[5]))) + (z * (matrix[6]));\n\trz = ((x * (matrix[8])) + (y * (matrix[9]))) + (z * (matrix[10]));\n\tv3Oop = interpreterProxy->clone(v3Oop);\n\tvertex = interpreterProxy->firstIndexableField(v3Oop);\n\tvertex[0] = (((float) rx));\n\tvertex[1] = (((float) ry));\n\tvertex[2] = (((float) rz));\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->push(v3Oop);\n}\n\n\n/*\tTransform two matrices into the third */\n\nEXPORT(sqInt) b3dTransformMatrixWithInto(void) {\n    float *m3;\n    float *m2;\n    float *m1;\n\n\tm3 = stackMatrix(0);\n\tm2 = stackMatrix(1);\n\tm1 = stackMatrix(2);\n\tif (((m1 == null) || (m2 == null)) || (m3 == null)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (m2 == m3) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\ttransformMatrixwithinto(m1, m2, m3);\n\tinterpreterProxy->pop(3);\n}\n\nEXPORT(sqInt) b3dTransformPoint(void) {\n    sqInt v3Oop;\n    double z;\n    double y;\n    double x;\n    float *matrix;\n    double rz;\n    double ry;\n    double rx;\n    double rw;\n    float *vertex;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tv3Oop = interpreterProxy->stackObjectValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!((interpreterProxy->isWords(v3Oop)) && ((interpreterProxy->slotSizeOf(v3Oop)) == 3))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tvertex = interpreterProxy->firstIndexableField(v3Oop);\n\tmatrix = stackMatrix(1);\n\tif (matrix == null) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tx = vertex[0];\n\ty = vertex[1];\n\tz = vertex[2];\n\trx = (((x * (matrix[0])) + (y * (matrix[1]))) + (z * (matrix[2]))) + (matrix[3]);\n\try = (((x * (matrix[4])) + (y * (matrix[5]))) + (z * (matrix[6]))) + (matrix[7]);\n\trz = (((x * (matrix[8])) + (y * (matrix[9]))) + (z * (matrix[10]))) + (matrix[11]);\n\trw = (((x * (matrix[12])) + (y * (matrix[13]))) + (z * (matrix[14]))) + (matrix[15]);\n\tv3Oop = interpreterProxy->clone(v3Oop);\n\tvertex = interpreterProxy->firstIndexableField(v3Oop);\n\tif (rw == 1.0) {\n\t\tvertex[0] = (((float) rx));\n\t\tvertex[1] = (((float) ry));\n\t\tvertex[2] = (((float) rz));\n\t} else {\n\t\tif (rw == 0.0) {\n\t\t\trw = 0.0;\n\t\t} else {\n\t\t\trw = 1.0 / rw;\n\t\t}\n\t\tvertex[0] = (((float) (rx * rw)));\n\t\tvertex[1] = (((float) (ry * rw)));\n\t\tvertex[2] = (((float) (rz * rw)));\n\t}\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->push(v3Oop);\n}\n\n\n/*\tTransform the normal of the given primitive vertex using the argument matrix and rescale the normal if necessary. */\n\nEXPORT(sqInt) b3dTransformPrimitiveNormal(void) {\n    float *matrix;\n    sqInt rescale;\n    float *pVertex;\n\n\trescale = interpreterProxy->stackValue(0);\n\tif (!(rescale == (interpreterProxy->nilObject()))) {\n\t\trescale = interpreterProxy->booleanValueOf(rescale);\n\t}\n\tmatrix = stackMatrix(1);\n\tpVertex = stackPrimitiveVertex(2);\n\tif ((matrix == null) || (pVertex == null)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif ((rescale != 1) && (rescale != 0)) {\n\t\trescale = analyzeMatrix3x3Length(matrix);\n\t}\n\ttransformPrimitiveNormalbyrescale(pVertex, matrix, rescale);\n\tinterpreterProxy->pop(3);\n}\n\n\n/*\tTransform the position of the given primitive vertex the given matrix\n\tand store the result back inplace. */\n\nEXPORT(sqInt) b3dTransformPrimitivePosition(void) {\n    float *matrix;\n    float *pVertex;\n\n\tmatrix = stackMatrix(0);\n\tpVertex = stackPrimitiveVertex(1);\n\tif ((matrix == null) || (pVertex == null)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\ttransformPrimitivePositionby(pVertex, matrix);\n\tinterpreterProxy->pop(2);\n}\n\n\n/*\tTransform the position of the given primitive vertex the given matrix\n\tand store the result in homogenous coordinates at rasterPos. */\n\nEXPORT(sqInt) b3dTransformPrimitiveRasterPosition(void) {\n    float *matrix;\n    float *pVertex;\n\n\tmatrix = stackMatrix(0);\n\tpVertex = stackPrimitiveVertex(1);\n\tif ((matrix == null) || (pVertex == null)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\ttransformPrimitiveRasterPositionby(pVertex, matrix);\n\tinterpreterProxy->pop(2);\n}\n\n\n/*\tTransform an entire vertex buffer using the supplied modelview and projection matrix. */\n\nEXPORT(sqInt) b3dTransformVertexBuffer(void) {\n    float *projectionMatrix;\n    sqInt vtxCount;\n    sqInt flags;\n    float *modelViewMatrix;\n    float *vtxArray;\n\n\tflags = interpreterProxy->stackIntegerValue(0);\n\tprojectionMatrix = stackMatrix(1);\n\tmodelViewMatrix = stackMatrix(2);\n\tvtxCount = interpreterProxy->stackIntegerValue(3);\n\tvtxArray = stackPrimitiveVertexArrayofSize(4, vtxCount);\n\tif (((projectionMatrix == null) || (modelViewMatrix == null)) || (vtxArray == null)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\ttransformVBcountbyandflags(vtxArray, vtxCount, modelViewMatrix, projectionMatrix, flags);\n\tinterpreterProxy->pop(5);\n}\n\n\n/*\tReturn the current version of the transformer */\n\nEXPORT(sqInt) b3dTransformerVersion(void) {\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(1);\n}\n\nEXPORT(sqInt) b3dTransposeMatrix(void) {\n    float *dst;\n    sqInt dstOop;\n    sqInt srcOop;\n    float *src;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 0)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tsrcOop = interpreterProxy->stackObjectValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!((interpreterProxy->isWords(srcOop)) && ((interpreterProxy->slotSizeOf(srcOop)) == 16))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\n\t/* reload srcOop in case of GC */\n\n\tdstOop = interpreterProxy->clone(srcOop);\n\tsrcOop = interpreterProxy->stackObjectValue(0);\n\tsrc = interpreterProxy->firstIndexableField(srcOop);\n\n\t/* dst at: 0 put: (src at: 0). */\n\n\tdst = interpreterProxy->firstIndexableField(dstOop);\n\tdst[1] = (src[4]);\n\tdst[2] = (src[8]);\n\tdst[3] = (src[12]);\n\tdst[4] = (src[1]);\n\tdst[6] = (src[9]);\n\tdst[7] = (src[13]);\n\tdst[8] = (src[2]);\n\tdst[9] = (src[6]);\n\tdst[11] = (src[14]);\n\tdst[12] = (src[3]);\n\tdst[13] = (src[7]);\n\tdst[14] = (src[11]);\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->push(dstOop);\n}\n\nstatic double backClipValueFromto(sqInt last, sqInt next) {\n\treturn (((((float *) last))[PrimVtxRasterPosZ]) - ((((float *) last))[PrimVtxRasterPosW])) / ((((((float *) next))[PrimVtxRasterPosW]) - ((((float *) last))[PrimVtxRasterPosW])) - (((((float *) next))[PrimVtxRasterPosZ]) - ((((float *) last))[PrimVtxRasterPosZ])));\n}\n\nstatic double bottomClipValueFromto(sqInt last, sqInt next) {\n\treturn (0.0 - (((((float *) last))[PrimVtxRasterPosY]) + ((((float *) last))[PrimVtxRasterPosW]))) / ((((((float *) next))[PrimVtxRasterPosW]) - ((((float *) last))[PrimVtxRasterPosW])) + (((((float *) next))[PrimVtxRasterPosY]) - ((((float *) last))[PrimVtxRasterPosY])));\n}\n\nstatic sqInt clipPolygoncountwithmask(int *vtxArray, sqInt vtxCount, int *tempVtxArray, sqInt outMask) {\n    sqInt count;\n\n\tif (outMask == OutLeftBit) {\n\t\treturn clipPolygonLeftFromtocount(tempVtxArray, vtxArray, vtxCount);\n\t}\n\tif (outMask == OutRightBit) {\n\t\treturn clipPolygonRightFromtocount(tempVtxArray, vtxArray, vtxCount);\n\t}\n\tif (outMask == OutTopBit) {\n\t\treturn clipPolygonTopFromtocount(tempVtxArray, vtxArray, vtxCount);\n\t}\n\tif (outMask == OutBottomBit) {\n\t\treturn clipPolygonBottomFromtocount(tempVtxArray, vtxArray, vtxCount);\n\t}\n\tif (outMask == OutFrontBit) {\n\t\treturn clipPolygonFrontFromtocount(tempVtxArray, vtxArray, vtxCount);\n\t}\n\tif (outMask == OutBackBit) {\n\t\treturn clipPolygonBackFromtocount(tempVtxArray, vtxArray, vtxCount);\n\t}\n\tcount = vtxCount;\n\tcount = clipPolygonLeftFromtocount(vtxArray, tempVtxArray, count);\n\tif (count == 0) {\n\t\treturn 0;\n\t}\n\tcount = clipPolygonRightFromtocount(tempVtxArray, vtxArray, count);\n\tif (count == 0) {\n\t\treturn 0;\n\t}\n\tcount = clipPolygonTopFromtocount(vtxArray, tempVtxArray, count);\n\tif (count == 0) {\n\t\treturn 0;\n\t}\n\tcount = clipPolygonBottomFromtocount(tempVtxArray, vtxArray, count);\n\tif (count == 0) {\n\t\treturn 0;\n\t}\n\tcount = clipPolygonFrontFromtocount(vtxArray, tempVtxArray, count);\n\tif (count == 0) {\n\t\treturn 0;\n\t}\n\tcount = clipPolygonBackFromtocount(tempVtxArray, vtxArray, count);\n\treturn count;\n}\n\nstatic sqInt clipPolygonBackFromtocount(int *buf1, int *buf2, sqInt n) {\n    sqInt inNext;\n    sqInt j;\n    sqInt outIndex;\n    sqInt i;\n    int *last;\n    int *next;\n    double t;\n    sqInt inLast;\n\n\toutIndex = 0;\n\tlast = buf1 + (n * PrimVertexSize);\n\tnext = buf1 + PrimVertexSize;\n\tinLast = (last[PrimVtxClipFlags]) & InBackBit;\n\tfor (i = 1; i <= n; i += 1) {\n\t\tinNext = (next[PrimVtxClipFlags]) & InBackBit;\n\t\tif (!(inLast == inNext)) {\n\n\t\t\t/* Passes clip boundary */\n\n\t\t\tt = (((((float *) last))[PrimVtxRasterPosZ]) - ((((float *) last))[PrimVtxRasterPosW])) / ((((((float *) next))[PrimVtxRasterPosW]) - ((((float *) last))[PrimVtxRasterPosW])) - (((((float *) next))[PrimVtxRasterPosZ]) - ((((float *) last))[PrimVtxRasterPosZ])));\n\t\t\toutIndex += 1;\n\t\t\tinterpolateFromtoatinto(((float *) last), ((float *) next), t, ((float*) (buf2 + (outIndex * PrimVertexSize))));\n\t\t}\n\t\tif (inNext) {\n\t\t\toutIndex += 1;\n\t\t\tfor (j = 0; j <= (PrimVertexSize - 1); j += 1) {\n\t\t\t\tbuf2[(outIndex * PrimVertexSize) + j] = (next[j]);\n\t\t\t}\n\t\t}\n\t\tlast = next;\n\t\tinLast = inNext;\n\t\tnext += PrimVertexSize;\n\t}\n\treturn outIndex;\n}\n\nstatic sqInt clipPolygonBottomFromtocount(int *buf1, int *buf2, sqInt n) {\n    sqInt inNext;\n    sqInt j;\n    sqInt outIndex;\n    sqInt i;\n    int *last;\n    int *next;\n    double t;\n    sqInt inLast;\n\n\toutIndex = 0;\n\tlast = buf1 + (n * PrimVertexSize);\n\tnext = buf1 + PrimVertexSize;\n\tinLast = (last[PrimVtxClipFlags]) & InBottomBit;\n\tfor (i = 1; i <= n; i += 1) {\n\t\tinNext = (next[PrimVtxClipFlags]) & InBottomBit;\n\t\tif (!(inLast == inNext)) {\n\n\t\t\t/* Passes clip boundary */\n\n\t\t\tt = (0.0 - (((((float *) last))[PrimVtxRasterPosY]) + ((((float *) last))[PrimVtxRasterPosW]))) / ((((((float *) next))[PrimVtxRasterPosW]) - ((((float *) last))[PrimVtxRasterPosW])) + (((((float *) next))[PrimVtxRasterPosY]) - ((((float *) last))[PrimVtxRasterPosY])));\n\t\t\toutIndex += 1;\n\t\t\tinterpolateFromtoatinto(((float *) last), ((float *) next), t, ((float*) (buf2 + (outIndex * PrimVertexSize))));\n\t\t}\n\t\tif (inNext) {\n\t\t\toutIndex += 1;\n\t\t\tfor (j = 0; j <= (PrimVertexSize - 1); j += 1) {\n\t\t\t\tbuf2[(outIndex * PrimVertexSize) + j] = (next[j]);\n\t\t\t}\n\t\t}\n\t\tlast = next;\n\t\tinLast = inNext;\n\t\tnext += PrimVertexSize;\n\t}\n\treturn outIndex;\n}\n\nstatic sqInt clipPolygonFrontFromtocount(int *buf1, int *buf2, sqInt n) {\n    sqInt inNext;\n    sqInt j;\n    sqInt outIndex;\n    sqInt i;\n    int *last;\n    int *next;\n    double t;\n    sqInt inLast;\n\n\toutIndex = 0;\n\tlast = buf1 + (n * PrimVertexSize);\n\tnext = buf1 + PrimVertexSize;\n\tinLast = (last[PrimVtxClipFlags]) & InFrontBit;\n\tfor (i = 1; i <= n; i += 1) {\n\t\tinNext = (next[PrimVtxClipFlags]) & InFrontBit;\n\t\tif (!(inLast == inNext)) {\n\n\t\t\t/* Passes clip boundary */\n\n\t\t\tt = (0.0 - (((((float *) last))[PrimVtxRasterPosZ]) + ((((float *) last))[PrimVtxRasterPosW]))) / ((((((float *) next))[PrimVtxRasterPosW]) - ((((float *) last))[PrimVtxRasterPosW])) + (((((float *) next))[PrimVtxRasterPosZ]) - ((((float *) last))[PrimVtxRasterPosZ])));\n\t\t\toutIndex += 1;\n\t\t\tinterpolateFromtoatinto(((float *) last), ((float *) next), t, ((float*) (buf2 + (outIndex * PrimVertexSize))));\n\t\t}\n\t\tif (inNext) {\n\t\t\toutIndex += 1;\n\t\t\tfor (j = 0; j <= (PrimVertexSize - 1); j += 1) {\n\t\t\t\tbuf2[(outIndex * PrimVertexSize) + j] = (next[j]);\n\t\t\t}\n\t\t}\n\t\tlast = next;\n\t\tinLast = inNext;\n\t\tnext += PrimVertexSize;\n\t}\n\treturn outIndex;\n}\n\nstatic sqInt clipPolygonLeftFromtocount(int *buf1, int *buf2, sqInt n) {\n    sqInt inNext;\n    sqInt j;\n    sqInt outIndex;\n    sqInt i;\n    int *last;\n    int *next;\n    double t;\n    sqInt inLast;\n\n\toutIndex = 0;\n\tlast = buf1 + (n * PrimVertexSize);\n\tnext = buf1 + PrimVertexSize;\n\tinLast = (last[PrimVtxClipFlags]) & InLeftBit;\n\tfor (i = 1; i <= n; i += 1) {\n\t\tinNext = (next[PrimVtxClipFlags]) & InLeftBit;\n\t\tif (!(inLast == inNext)) {\n\n\t\t\t/* Passes clip boundary */\n\n\t\t\tt = (0.0 - (((((float *) last))[PrimVtxRasterPosX]) + ((((float *) last))[PrimVtxRasterPosW]))) / ((((((float *) next))[PrimVtxRasterPosW]) - ((((float *) last))[PrimVtxRasterPosW])) + (((((float *) next))[PrimVtxRasterPosX]) - ((((float *) last))[PrimVtxRasterPosX])));\n\t\t\toutIndex += 1;\n\t\t\tinterpolateFromtoatinto(((float *) last), ((float *) next), t, ((float*) (buf2 + (outIndex * PrimVertexSize))));\n\t\t}\n\t\tif (inNext) {\n\t\t\toutIndex += 1;\n\t\t\tfor (j = 0; j <= (PrimVertexSize - 1); j += 1) {\n\t\t\t\tbuf2[(outIndex * PrimVertexSize) + j] = (next[j]);\n\t\t\t}\n\t\t}\n\t\tlast = next;\n\t\tinLast = inNext;\n\t\tnext += PrimVertexSize;\n\t}\n\treturn outIndex;\n}\n\nstatic sqInt clipPolygonRightFromtocount(int *buf1, int *buf2, sqInt n) {\n    sqInt inNext;\n    sqInt j;\n    sqInt outIndex;\n    sqInt i;\n    int *last;\n    int *next;\n    double t;\n    sqInt inLast;\n\n\toutIndex = 0;\n\tlast = buf1 + (n * PrimVertexSize);\n\tnext = buf1 + PrimVertexSize;\n\tinLast = (last[PrimVtxClipFlags]) & InRightBit;\n\tfor (i = 1; i <= n; i += 1) {\n\t\tinNext = (next[PrimVtxClipFlags]) & InRightBit;\n\t\tif (!(inLast == inNext)) {\n\n\t\t\t/* Passes clip boundary */\n\n\t\t\tt = (((((float *) last))[PrimVtxRasterPosX]) - ((((float *) last))[PrimVtxRasterPosW])) / ((((((float *) next))[PrimVtxRasterPosW]) - ((((float *) last))[PrimVtxRasterPosW])) - (((((float *) next))[PrimVtxRasterPosX]) - ((((float *) last))[PrimVtxRasterPosX])));\n\t\t\toutIndex += 1;\n\t\t\tinterpolateFromtoatinto(((float *) last), ((float *) next), t, ((float*) (buf2 + (outIndex * PrimVertexSize))));\n\t\t}\n\t\tif (inNext) {\n\t\t\toutIndex += 1;\n\t\t\tfor (j = 0; j <= (PrimVertexSize - 1); j += 1) {\n\t\t\t\tbuf2[(outIndex * PrimVertexSize) + j] = (next[j]);\n\t\t\t}\n\t\t}\n\t\tlast = next;\n\t\tinLast = inNext;\n\t\tnext += PrimVertexSize;\n\t}\n\treturn outIndex;\n}\n\nstatic sqInt clipPolygonTopFromtocount(int *buf1, int *buf2, sqInt n) {\n    sqInt inNext;\n    sqInt j;\n    sqInt outIndex;\n    sqInt i;\n    int *last;\n    int *next;\n    double t;\n    sqInt inLast;\n\n\toutIndex = 0;\n\tlast = buf1 + (n * PrimVertexSize);\n\tnext = buf1 + PrimVertexSize;\n\tinLast = (last[PrimVtxClipFlags]) & InTopBit;\n\tfor (i = 1; i <= n; i += 1) {\n\t\tinNext = (next[PrimVtxClipFlags]) & InTopBit;\n\t\tif (!(inLast == inNext)) {\n\n\t\t\t/* Passes clip boundary */\n\n\t\t\tt = (((((float *) last))[PrimVtxRasterPosY]) - ((((float *) last))[PrimVtxRasterPosW])) / ((((((float *) next))[PrimVtxRasterPosW]) - ((((float *) last))[PrimVtxRasterPosW])) - (((((float *) next))[PrimVtxRasterPosY]) - ((((float *) last))[PrimVtxRasterPosY])));\n\t\t\toutIndex += 1;\n\t\t\tinterpolateFromtoatinto(((float *) last), ((float *) next), t, ((float*) (buf2 + (outIndex * PrimVertexSize))));\n\t\t}\n\t\tif (inNext) {\n\t\t\toutIndex += 1;\n\t\t\tfor (j = 0; j <= (PrimVertexSize - 1); j += 1) {\n\t\t\t\tbuf2[(outIndex * PrimVertexSize) + j] = (next[j]);\n\t\t\t}\n\t\t}\n\t\tlast = next;\n\t\tinLast = inNext;\n\t\tnext += PrimVertexSize;\n\t}\n\treturn outIndex;\n}\n\n\n/*\tCompute the attenuation for the current light and vertex */\n\nstatic sqInt computeAttenuation(void) {\n\tlightScale = 1.0;\n\tif (lightFlags & FlagAttenuated) {\n\t\tlightScale = 1.0 / ((primLight[PrimLightAttenuationConstant]) + (l2vDistance * ((primLight[PrimLightAttenuationLinear]) + (l2vDistance * (primLight[PrimLightAttenuationSquared])))));\n\t}\n}\n\n\n/*\tCompute the direction for the current light and vertex */\n\nstatic sqInt computeDirection(void) {\n    double scale;\n\n\tif (lightFlags & FlagPositional) {\n\t\tl2vDirection[0] = ((litVertex[PrimVtxPositionX]) - (primLight[PrimLightPositionX]));\n\t\tl2vDirection[1] = ((litVertex[PrimVtxPositionY]) - (primLight[PrimLightPositionY]));\n\t\tl2vDirection[2] = ((litVertex[PrimVtxPositionZ]) - (primLight[PrimLightPositionZ]));\n\t\tl2vDistance = (((l2vDirection[0]) * (l2vDirection[0])) + ((l2vDirection[1]) * (l2vDirection[1]))) + ((l2vDirection[2]) * (l2vDirection[2]));\n\t\tif (!((l2vDistance == 0.0) || (l2vDistance == 1.0))) {\n\t\t\tl2vDistance = sqrt(l2vDistance);\n\t\t\tscale = -1.0 / l2vDistance;\n\t\t}\n\t\tl2vDirection[0] = ((l2vDirection[0]) * scale);\n\t\tl2vDirection[1] = ((l2vDirection[1]) * scale);\n\t\tl2vDirection[2] = ((l2vDirection[2]) * scale);\n\t} else {\n\t\tif (lightFlags & FlagDirectional) {\n\t\t\tl2vDirection[0] = (primLight[PrimLightDirectionX]);\n\t\t\tl2vDirection[1] = (primLight[PrimLightDirectionY]);\n\t\t\tl2vDirection[2] = (primLight[PrimLightDirectionZ]);\n\t\t}\n\t}\n}\n\n\n/*\tComputes\n\t\tl2vSpecDir _ l2vSpecDir - vtx position safelyNormalized.\n\t */\n\nstatic sqInt computeSpecularDirection(void) {\n    double scale;\n\n\tscale = inverseLengthOfFloat(litVertex + PrimVtxPosition);\n\tl2vSpecDir[0] = ((l2vSpecDir[0]) - ((litVertex[PrimVtxPositionX]) * scale));\n\tl2vSpecDir[1] = ((l2vSpecDir[1]) - ((litVertex[PrimVtxPositionY]) * scale));\n\tl2vSpecDir[2] = ((l2vSpecDir[2]) - ((litVertex[PrimVtxPositionZ]) * scale));\n}\n\n\n/*\tCompute the spot factor for a spot light */\n\nstatic double computeSpotFactor(void) {\n    double deltaCos;\n    double cosAngle;\n    double minCos;\n\n\tcosAngle = dotProductOfFloatwithDouble(primLight + PrimLightDirection, l2vDirection);\n\tcosAngle = 0.0 - cosAngle;\n\tminCos = primLight[SpotLightMinCos];\n\tif (cosAngle < minCos) {\n\t\treturn 0.0;\n\t}\n\tdeltaCos = primLight[SpotLightDeltaCos];\n\tif (deltaCos <= 1.0e-5) {\n\t\treturn 1.0;\n\t}\n\tcosAngle = (cosAngle - minCos) / deltaCos;\n\treturn pow(cosAngle,(primLight[SpotLightExponent]));\n}\n\nstatic sqInt determineClipFlagscount(void *vtxArray, sqInt count) {\n    sqInt flags;\n    sqInt i;\n    double z;\n    float *vtxPtr;\n    double y;\n    double x;\n    double w;\n    double w2;\n    sqInt fullMask;\n\n\tvtxPtr = ((float *) vtxArray);\n\tfullMask = InAllMask + OutAllMask;\n\tfor (i = 1; i <= count; i += 1) {\n\t\tw = vtxPtr[PrimVtxRasterPosW];\n\t\tw2 = 0.0 - w;\n\t\tflags = 0;\n\t\tx = vtxPtr[PrimVtxRasterPosX];\n\t\tif (x >= w2) {\n\t\t\tflags = flags | InLeftBit;\n\t\t} else {\n\t\t\tflags = flags | OutLeftBit;\n\t\t}\n\t\tif (x <= w) {\n\t\t\tflags = flags | InRightBit;\n\t\t} else {\n\t\t\tflags = flags | OutRightBit;\n\t\t}\n\t\ty = vtxPtr[PrimVtxRasterPosY];\n\t\tif (y >= w2) {\n\t\t\tflags = flags | InBottomBit;\n\t\t} else {\n\t\t\tflags = flags | OutBottomBit;\n\t\t}\n\t\tif (y <= w) {\n\t\t\tflags = flags | InTopBit;\n\t\t} else {\n\t\t\tflags = flags | OutTopBit;\n\t\t}\n\t\tz = vtxPtr[PrimVtxRasterPosZ];\n\t\tif (z >= w2) {\n\t\t\tflags = flags | InFrontBit;\n\t\t} else {\n\t\t\tflags = flags | OutFrontBit;\n\t\t}\n\t\tif (z <= w) {\n\t\t\tflags = flags | InBackBit;\n\t\t} else {\n\t\t\tflags = flags | OutBackBit;\n\t\t}\n\t\tfullMask = fullMask & flags;\n\t\t(((int *) vtxPtr))[PrimVtxClipFlags] = flags;\n\t\tvtxPtr += PrimVertexSize;\n\t}\n\treturn fullMask;\n}\n\nstatic double dotProductOfFloatwithDouble(float * v1, double *v2) {\n\treturn (((v1[0]) * (v2[0])) + ((v1[1]) * (v2[1]))) + ((v1[2]) * (v2[2]));\n}\n\n\n/*\tFetch the primitive light source from the given array.\n\tNote: No checks are done within here - that happened in stackLightArrayValue: */\n\nstatic void* fetchLightSourceofObject(sqInt index, sqInt anArray) {\n    sqInt lightOop;\n\n\tlightOop = interpreterProxy->fetchPointerofObject(index, anArray);\n\treturn interpreterProxy->firstIndexableField(lightOop);\n}\n\nstatic double frontClipValueFromto(sqInt last, sqInt next) {\n\treturn (0.0 - (((((float *) last))[PrimVtxRasterPosZ]) + ((((float *) last))[PrimVtxRasterPosW]))) / ((((((float *) next))[PrimVtxRasterPosW]) - ((((float *) last))[PrimVtxRasterPosW])) + (((((float *) next))[PrimVtxRasterPosZ]) - ((((float *) last))[PrimVtxRasterPosZ])));\n}\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine * getInterpreter(void) {\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*) getModuleName(void) {\n\treturn moduleName;\n}\n\nstatic sqInt halt(void) {\n\t;\n}\n\nEXPORT(sqInt) initialiseModule(void) {\n\tloadBBFn = interpreterProxy->ioLoadFunctionFrom(\"loadBitBltFrom\", bbPluginName);\n\tcopyBitsFn = interpreterProxy->ioLoadFunctionFrom(\"copyBitsFromtoat\", bbPluginName);\n\treturn (loadBBFn != 0) && (copyBitsFn != 0);\n}\n\n\n/*\tInterpolate the primitive vertices last/next at the parameter t */\n\nstatic sqInt interpolateFromtoatinto(float *last, float *next, double t, float *out) {\n    sqInt flags;\n    unsigned int nextValue;\n    double z;\n    double y;\n    double x;\n    double delta;\n    unsigned int newValue;\n    double w;\n    unsigned int lastValue;\n    unsigned int rgbaLast;\n    unsigned int rgbaNext;\n    double w2;\n\n\tdelta = (next[PrimVtxRasterPosX]) - (last[PrimVtxRasterPosX]);\n\tx = (last[PrimVtxRasterPosX]) + (delta * t);\n\tout[PrimVtxRasterPosX] = (((float) x));\n\tdelta = (next[PrimVtxRasterPosY]) - (last[PrimVtxRasterPosY]);\n\ty = (last[PrimVtxRasterPosY]) + (delta * t);\n\tout[PrimVtxRasterPosY] = (((float) y));\n\tdelta = (next[PrimVtxRasterPosZ]) - (last[PrimVtxRasterPosZ]);\n\tz = (last[PrimVtxRasterPosZ]) + (delta * t);\n\tout[PrimVtxRasterPosZ] = (((float) z));\n\tdelta = (next[PrimVtxRasterPosW]) - (last[PrimVtxRasterPosW]);\n\tw = (last[PrimVtxRasterPosW]) + (delta * t);\n\tout[PrimVtxRasterPosW] = (((float) w));\n\tw2 = 0.0 - w;\n\tflags = 0;\n\tif (x >= w2) {\n\t\tflags = flags | InLeftBit;\n\t} else {\n\t\tflags = flags | OutLeftBit;\n\t}\n\tif (x <= w) {\n\t\tflags = flags | InRightBit;\n\t} else {\n\t\tflags = flags | OutRightBit;\n\t}\n\tif (y >= w2) {\n\t\tflags = flags | InBottomBit;\n\t} else {\n\t\tflags = flags | OutBottomBit;\n\t}\n\tif (y <= w) {\n\t\tflags = flags | InTopBit;\n\t} else {\n\t\tflags = flags | OutTopBit;\n\t}\n\tif (z >= w2) {\n\t\tflags = flags | InFrontBit;\n\t} else {\n\t\tflags = flags | OutFrontBit;\n\t}\n\tif (z <= w) {\n\t\tflags = flags | InBackBit;\n\t} else {\n\t\tflags = flags | OutBackBit;\n\t}\n\t(((int *) out))[PrimVtxClipFlags] = flags;\n\trgbaLast = (((unsigned int *) last))[PrimVtxColor32];\n\tlastValue = rgbaLast & 255;\n\trgbaLast = ((usqInt) rgbaLast) >> 8;\n\trgbaNext = (((unsigned int *) next))[PrimVtxColor32];\n\tnextValue = rgbaNext & 255;\n\trgbaNext = ((usqInt) rgbaNext) >> 8;\n\tdelta = (((int) (nextValue - lastValue))) * t;\n\tnewValue = ((sqInt) (lastValue + delta) );\n\tlastValue = rgbaLast & 255;\n\trgbaLast = ((usqInt) rgbaLast) >> 8;\n\tnextValue = rgbaNext & 255;\n\trgbaNext = ((usqInt) rgbaNext) >> 8;\n\tdelta = (((int) (nextValue - lastValue))) * t;\n\tnewValue += (((sqInt) (lastValue + delta) )) << 8;\n\tlastValue = rgbaLast & 255;\n\trgbaLast = ((usqInt) rgbaLast) >> 8;\n\tnextValue = rgbaNext & 255;\n\trgbaNext = ((usqInt) rgbaNext) >> 8;\n\tdelta = (((int) (nextValue - lastValue))) * t;\n\tnewValue += (((sqInt) (lastValue + delta) )) << 16;\n\tlastValue = rgbaLast & 255;\n\tnextValue = rgbaNext & 255;\n\tdelta = (((int) (nextValue - lastValue))) * t;\n\tnewValue += (((sqInt) (lastValue + delta) )) << 24;\n\t(((unsigned int*) out))[PrimVtxColor32] = newValue;\n\tdelta = (next[PrimVtxTexCoordU]) - (last[PrimVtxTexCoordU]);\n\tout[PrimVtxTexCoordU] = (((float) ((last[PrimVtxTexCoordU]) + (delta * t))));\n\tdelta = (next[PrimVtxTexCoordV]) - (last[PrimVtxTexCoordV]);\n\tout[PrimVtxTexCoordV] = (((float) ((last[PrimVtxTexCoordV]) + (delta * t))));\n}\n\nstatic double inverseLengthOfDouble(double * aVector) {\n    double scale;\n\n\tscale = (((aVector[0]) * (aVector[0])) + ((aVector[1]) * (aVector[1]))) + ((aVector[2]) * (aVector[2]));\n\tif ((scale == 0.0) || (scale == 1.0)) {\n\t\treturn scale;\n\t}\n\treturn 1.0 / (sqrt(scale));\n}\n\nstatic double inverseLengthOfFloat(float * aVector) {\n    double scale;\n\n\tscale = (((aVector[0]) * (aVector[0])) + ((aVector[1]) * (aVector[1]))) + ((aVector[2]) * (aVector[2]));\n\tif ((scale == 0.0) || (scale == 1.0)) {\n\t\treturn scale;\n\t}\n\treturn 1.0 / (sqrt(scale));\n}\n\nstatic double leftClipValueFromto(sqInt last, sqInt next) {\n\treturn (0.0 - (((((float *) last))[PrimVtxRasterPosX]) + ((((float *) last))[PrimVtxRasterPosW]))) / ((((((float *) next))[PrimVtxRasterPosW]) - ((((float *) last))[PrimVtxRasterPosW])) + (((((float *) next))[PrimVtxRasterPosX]) - ((((float *) last))[PrimVtxRasterPosX])));\n}\n\nstatic sqInt loadObjectsFrom(sqInt stackIndex) {\n    B3DPrimitiveObject **objArray;\n    sqInt i;\n    sqInt arraySize;\n    sqInt objOop;\n    sqInt arrayOop;\n    B3DPrimitiveObject *objPtr;\n\n\tarrayOop = interpreterProxy->stackObjectValue(stackIndex);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!((interpreterProxy->fetchClassOf(arrayOop)) == (interpreterProxy->classArray()))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tarraySize = interpreterProxy->slotSizeOf(arrayOop);\n\tif (arraySize > (state.nObjects)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tobjArray = state.objects;\n\tfor (i = 0; i <= (arraySize - 1); i += 1) {\n\t\tobjOop = interpreterProxy->fetchPointerofObject(i, arrayOop);\n\t\tif (((objOop & 1)) || (!(interpreterProxy->isWords(objOop)))) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t\tobjPtr = ((B3DPrimitiveObject*) (interpreterProxy->firstIndexableField(objOop)));\n\t\tif (objPtr->magic != B3D_PRIMITIVE_OBJECT_MAGIC) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t\tobjPtr->__oop__ = objOop;\n\t\tobjArray[i] = objPtr;\n\t}\n}\n\nstatic sqInt loadPrimitiveLightSource(void) {\n\tlightFlags = (((int*) primLight))[PrimLightFlags];\n}\n\n\n/*\tLoad the necessary values from the current primitive vertex */\n\nstatic sqInt loadPrimitiveVertex(void) {\n    sqInt rgba;\n\n\trgba = (((int*) litVertex))[PrimVtxColor32];\n\tvtxInColor[2] = ((rgba & 255) * (1.0 / 255.0));\n\trgba = ((usqInt) rgba) >> 8;\n\tvtxInColor[1] = ((rgba & 255) * (1.0 / 255.0));\n\trgba = ((usqInt) rgba) >> 8;\n\tvtxInColor[0] = ((rgba & 255) * (1.0 / 255.0));\n\trgba = ((usqInt) rgba) >> 8;\n\tvtxInColor[3] = ((rgba & 255) * (1.0 / 255.0));\n}\n\n\n/*\tLoad the rasterizer state from the given stack index. */\n\nstatic sqInt loadRasterizerState(sqInt stackIndex) {\n    sqInt objLen;\n    sqInt stateOop;\n    void *objPtr;\n    sqInt obj;\n\n\tif ((copyBitsFn == 0) || (loadBBFn == 0)) {\n\t\tif (!(initialiseModule())) {\n\t\t\treturn 0;\n\t\t}\n\t}\n\tstateOop = interpreterProxy->stackObjectValue(stackIndex);\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\tif (!((interpreterProxy->isPointers(stateOop)) && ((interpreterProxy->slotSizeOf(stateOop)) >= 10))) {\n\t\treturn 0;\n\t}\n\tobj = interpreterProxy->fetchPointerofObject(0, stateOop);\n\tif (((obj & 1)) || (!(interpreterProxy->isWords(obj)))) {\n\t\treturn 0;\n\t}\n\tobjPtr = interpreterProxy->firstIndexableField(obj);\n\tstate.faceAlloc = objPtr;\n\tobj = interpreterProxy->fetchPointerofObject(1, stateOop);\n\tif (((obj & 1)) || (!(interpreterProxy->isWords(obj)))) {\n\t\treturn 0;\n\t}\n\tobjPtr = interpreterProxy->firstIndexableField(obj);\n\tstate.edgeAlloc = objPtr;\n\tobj = interpreterProxy->fetchPointerofObject(2, stateOop);\n\tif (((obj & 1)) || (!(interpreterProxy->isWords(obj)))) {\n\t\treturn 0;\n\t}\n\tobjPtr = interpreterProxy->firstIndexableField(obj);\n\tstate.attrAlloc = objPtr;\n\tobj = interpreterProxy->fetchPointerofObject(3, stateOop);\n\tif (((obj & 1)) || (!(interpreterProxy->isWords(obj)))) {\n\t\treturn 0;\n\t}\n\tobjPtr = interpreterProxy->firstIndexableField(obj);\n\tstate.aet = objPtr;\n\tobj = interpreterProxy->fetchPointerofObject(4, stateOop);\n\tif (((obj & 1)) || (!(interpreterProxy->isWords(obj)))) {\n\t\treturn 0;\n\t}\n\tobjPtr = interpreterProxy->firstIndexableField(obj);\n\tstate.addedEdges = objPtr;\n\tobj = interpreterProxy->fetchPointerofObject(5, stateOop);\n\tif (((obj & 1)) || (!(interpreterProxy->isWords(obj)))) {\n\t\treturn 0;\n\t}\n\tobjPtr = interpreterProxy->firstIndexableField(obj);\n\tstate.fillList = objPtr;\n\tobj = interpreterProxy->fetchPointerofObject(6, stateOop);\n\tif (obj == (interpreterProxy->nilObject())) {\n\t\tstate.nObjects = 0;\n\t\tstate.objects = NULL;\n\t} else {\n\t\tif (((obj & 1)) || (!(interpreterProxy->isWords(obj)))) {\n\t\t\treturn 0;\n\t\t}\n\t\tobjLen = interpreterProxy->slotSizeOf(obj);\n\t\tobjPtr = interpreterProxy->firstIndexableField(obj);\n\t\tstate.objects = (B3DPrimitiveObject **)objPtr;\n\t\tstate.nObjects = objLen;\n\t}\n\tobj = interpreterProxy->fetchPointerofObject(7, stateOop);\n\tif (obj == (interpreterProxy->nilObject())) {\n\t\tstate.nTextures = 0;\n\t\tstate.textures = NULL;\n\t} else {\n\t\tif (((obj & 1)) || (!(interpreterProxy->isWords(obj)))) {\n\t\t\treturn 0;\n\t\t}\n\t\tobjLen = interpreterProxy->byteSizeOf(obj);\n\t\tobjPtr = interpreterProxy->firstIndexableField(obj);\n\t\tstate.textures = (B3DTexture *)objPtr;\n\t\tstate.nTextures = objLen / sizeof(B3DTexture);\n\t}\n\tobj = interpreterProxy->fetchPointerofObject(8, stateOop);\n\tif (obj == (interpreterProxy->nilObject())) {\n\t\tstate.spanSize = 0;\n\t\tstate.spanBuffer = NULL;\n\t} else {\n\t\tif (!((interpreterProxy->fetchClassOf(obj)) == (interpreterProxy->classBitmap()))) {\n\t\t\treturn 0;\n\t\t}\n\t\tobjLen = interpreterProxy->slotSizeOf(obj);\n\t\tobjPtr = interpreterProxy->firstIndexableField(obj);\n\t\tstate.spanBuffer = (unsigned int *)objPtr;\n\t\tstate.spanSize = objLen;\n\t}\n\tobj = interpreterProxy->fetchPointerofObject(9, stateOop);\n\tif (obj == (interpreterProxy->nilObject())) {\n\t\tstate.spanDrawer = NULL;\n\t} else {\n\t\tif (!(((int (*) (int))loadBBFn)(obj))) {\n\t\t\treturn 0;\n\t\t}\n\t\tstate.spanDrawer = (b3dDrawBufferFunction) copyBitsFn;\n\t}\n\treturn !(interpreterProxy->failed());\n}\n\n\n/*\tNote: This still uses the old-style textures */\n\nstatic sqInt loadTextureinto(sqInt textureOop, B3DTexture *destPtr) {\n    sqInt formWidth;\n    sqInt formDepth;\n    sqInt form;\n    sqInt formHeight;\n    sqInt formBits;\n    sqInt texInterpolate;\n    sqInt texEnvMode;\n    void *bitsPtr;\n    sqInt texWrap;\n\n\tform = textureOop;\n\tif (!(interpreterProxy->isPointers(form))) {\n\t\treturn 0;\n\t}\n\tif ((interpreterProxy->slotSizeOf(form)) < 8) {\n\t\treturn 0;\n\t}\n\tformBits = interpreterProxy->fetchPointerofObject(0, form);\n\tformWidth = interpreterProxy->fetchIntegerofObject(1, form);\n\tformHeight = interpreterProxy->fetchIntegerofObject(2, form);\n\tformDepth = interpreterProxy->fetchIntegerofObject(3, form);\n\ttexWrap = interpreterProxy->booleanValueOf(interpreterProxy->fetchPointerofObject(5, form));\n\ttexInterpolate = interpreterProxy->booleanValueOf(interpreterProxy->fetchPointerofObject(6, form));\n\ttexEnvMode = interpreterProxy->fetchIntegerofObject(7, form);\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\tif ((formWidth < 1) || ((formHeight < 1) || (formDepth != 32))) {\n\t\treturn 0;\n\t}\n\tif (!((interpreterProxy->fetchClassOf(formBits)) == (interpreterProxy->classBitmap()))) {\n\t\treturn 0;\n\t}\n\tif (!((interpreterProxy->byteSizeOf(formBits)) == ((formWidth * formHeight) * 4))) {\n\t\treturn 0;\n\t}\n\tif ((texEnvMode < 0) || (texEnvMode > 1)) {\n\t\treturn 0;\n\t}\n\n\t/* Set the texture parameters */\n\n\tbitsPtr = interpreterProxy->firstIndexableField(formBits);\n\treturn b3dLoadTexture(destPtr, formWidth, formHeight, formDepth, (unsigned int*) bitsPtr, 0, NULL) == B3D_NO_ERROR;\n}\n\nstatic sqInt loadTexturesFrom(sqInt stackIndex) {\n    sqInt i;\n    B3DTexture *destPtr;\n    sqInt n;\n    sqInt arrayOop;\n    sqInt textureOop;\n\n\tarrayOop = interpreterProxy->stackObjectValue(stackIndex);\n\tif (!((interpreterProxy->fetchClassOf(arrayOop)) == (interpreterProxy->classArray()))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tn = interpreterProxy->slotSizeOf(arrayOop);\n\tn = ((n < (state.nTextures)) ? n : (state.nTextures));\n\tfor (i = 0; i <= (n - 1); i += 1) {\n\t\tdestPtr = state.textures + i;\n\t\ttextureOop = interpreterProxy->fetchPointerofObject(i, arrayOop);\n\t\tif (!(loadTextureinto(textureOop, destPtr))) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\treturn 0;\n}\n\n\n/*\tLoad the viewport from the given stack index */\n\nstatic sqInt loadViewportFrom(sqInt stackIndex) {\n    sqInt y0;\n    sqInt oop;\n    sqInt x1;\n    sqInt x0;\n    sqInt p2;\n    sqInt y1;\n    sqInt p1;\n\n\toop = interpreterProxy->stackObjectValue(stackIndex);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!(interpreterProxy->isPointers(oop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif ((interpreterProxy->slotSizeOf(oop)) < 2) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tp1 = interpreterProxy->fetchPointerofObject(0, oop);\n\tp2 = interpreterProxy->fetchPointerofObject(1, oop);\n\tif (!((interpreterProxy->fetchClassOf(p1)) == (interpreterProxy->classPoint()))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!((interpreterProxy->fetchClassOf(p2)) == (interpreterProxy->classPoint()))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tx0 = interpreterProxy->fetchIntegerofObject(0, p1);\n\ty0 = interpreterProxy->fetchIntegerofObject(1, p1);\n\tx1 = interpreterProxy->fetchIntegerofObject(0, p2);\n\ty1 = interpreterProxy->fetchIntegerofObject(1, p2);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tviewport.x0 = x0;\n\tviewport.y0 = y0;\n\tviewport.x1 = x1;\n\tviewport.y1 = y1;\n\treturn 0;\n}\n\nstatic sqInt mapVBofSizeinto(void *vtxArray, sqInt vtxCount, sqInt boxArray) {\n    sqInt flags;\n    double bottom;\n    sqInt i;\n    double top;\n    float *vtxPtr;\n    double y;\n    sqInt oop;\n    double x;\n    double left;\n    double w;\n    double right;\n    sqInt floatOop;\n\n\tvtxPtr = ((float *) vtxArray);\n\tfor (i = 1; i <= vtxCount; i += 1) {\n\t\tflags = (((int *) vtxPtr))[PrimVtxClipFlags];\n\t\tw = vtxPtr[PrimVtxRasterPosW];\n\t\tif (!(w == 0.0)) {\n\t\t\tw = 1.0 / w;\n\t\t}\n\t\tif ((flags & OutLeftBit) != 0) {\n\t\t\tx = -1.0;\n\t\t} else {\n\t\t\tif ((flags & OutRightBit) != 0) {\n\t\t\t\tx = 1.0;\n\t\t\t} else {\n\t\t\t\tx = (vtxPtr[PrimVtxRasterPosX]) * w;\n\t\t\t}\n\t\t}\n\t\tif ((flags & OutTopBit) != 0) {\n\t\t\ty = -1.0;\n\t\t} else {\n\t\t\tif ((flags & OutBottomBit) != 0) {\n\t\t\t\ty = 1.0;\n\t\t\t} else {\n\t\t\t\ty = (vtxPtr[PrimVtxRasterPosY]) * w;\n\t\t\t}\n\t\t}\n\t\tif (i == 1) {\n\t\t\tleft = right = x;\n\t\t\ttop = bottom = y;\n\t\t}\n\t\tif (x < left) {\n\t\t\tleft = x;\n\t\t}\n\t\tif (x > right) {\n\t\t\tright = x;\n\t\t}\n\t\tif (y < top) {\n\t\t\ttop = y;\n\t\t}\n\t\tif (y > bottom) {\n\t\t\tbottom = y;\n\t\t}\n\t\tvtxPtr += PrimVertexSize;\n\t}\n\toop = boxArray;\n\tinterpreterProxy->pushRemappableOop(oop);\n\tfloatOop = interpreterProxy->floatObjectOf(left);\n\toop = interpreterProxy->popRemappableOop();\n\tinterpreterProxy->storePointerofObjectwithValue(0, oop, floatOop);\n\tinterpreterProxy->pushRemappableOop(oop);\n\tfloatOop = interpreterProxy->floatObjectOf(top);\n\toop = interpreterProxy->popRemappableOop();\n\tinterpreterProxy->storePointerofObjectwithValue(1, oop, floatOop);\n\tinterpreterProxy->pushRemappableOop(oop);\n\tfloatOop = interpreterProxy->floatObjectOf(right);\n\toop = interpreterProxy->popRemappableOop();\n\tinterpreterProxy->storePointerofObjectwithValue(2, oop, floatOop);\n\tinterpreterProxy->pushRemappableOop(oop);\n\tfloatOop = interpreterProxy->floatObjectOf(bottom);\n\toop = interpreterProxy->popRemappableOop();\n\tinterpreterProxy->storePointerofObjectwithValue(3, oop, floatOop);\n}\n\n\n/*\tThe module with the given name was just unloaded.\n\tMake sure we have no dangling references. */\n\nEXPORT(sqInt) moduleUnloaded(char * aModuleName) {\n\tif ((strcmp(aModuleName, bbPluginName)) == 0) {\n\n\t\t/* BitBlt just shut down. How nasty. */\n\n\t\tloadBBFn = 0;\n\t\tcopyBitsFn = 0;\n\t}\n}\n\nstatic sqInt msg(char * s) {\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n}\n\n\n/*\tPrimitive. Set the BitBlt plugin to use. */\n\nEXPORT(sqInt) primitiveSetBitBltPlugin(void) {\n    sqInt length;\n    sqInt i;\n    sqInt needReload;\n    sqInt pluginName;\n    char *ptr;\n\n\n\t/* Must be string to work */\n\n\tpluginName = interpreterProxy->stackValue(0);\n\tif (!(interpreterProxy->isBytes(pluginName))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tlength = interpreterProxy->byteSizeOf(pluginName);\n\tif (length >= 256) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tptr = interpreterProxy->firstIndexableField(pluginName);\n\tneedReload = 0;\n\tfor (i = 0; i <= (length - 1); i += 1) {\n\t\tif (!((bbPluginName[i]) == (ptr[i]))) {\n\t\t\tbbPluginName[i] = (ptr[i]);\n\t\t\tneedReload = 1;\n\t\t}\n\t}\n\tif (!((bbPluginName[length]) == 0)) {\n\t\tbbPluginName[length] = 0;\n\t\tneedReload = 1;\n\t}\n\tif (needReload) {\n\t\tif (!(initialiseModule())) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\tinterpreterProxy->pop(1);\n}\n\nstatic double processIndexedofSizeidxArrayidxSize(float *vtxArray, sqInt vtxSize, int *idxArray, sqInt idxSize) {\n    sqInt i;\n    float *vtxPtr;\n    sqInt index;\n    double zValue;\n    double wValue;\n    double minZ;\n\n\tminZ = 10.0;\n\tfor (i = 1; i <= idxSize; i += 1) {\n\t\tindex = idxArray[i];\n\t\tif (index > 0) {\n\t\t\tvtxPtr = vtxArray + ((index - 1) * PrimVertexSize);\n\t\t\tzValue = vtxPtr[PrimVtxRasterPosZ];\n\t\t\twValue = vtxPtr[PrimVtxRasterPosW];\n\t\t\tif (!(wValue == 0.0)) {\n\t\t\t\tzValue = zValue / wValue;\n\t\t\t}\n\t\t\tif (zValue < minZ) {\n\t\t\t\tminZ = zValue;\n\t\t\t}\n\t\t}\n\t}\n\treturn minZ;\n}\n\nstatic sqInt processIndexedIDXofSizeidxArrayidxSize(float *vtxArray, sqInt vtxSize, int *idxArray, sqInt idxSize) {\n    sqInt i;\n    float *vtxPtr;\n    sqInt minIndex;\n    sqInt index;\n    double zValue;\n    double wValue;\n    double minZ;\n\n\tminZ = 10.0;\n\tminIndex = 0;\n\tfor (i = 1; i <= idxSize; i += 1) {\n\t\tindex = idxArray[i];\n\t\tif (index > 0) {\n\t\t\tvtxPtr = vtxArray + ((index - 1) * PrimVertexSize);\n\t\t\tzValue = vtxPtr[PrimVtxRasterPosZ];\n\t\t\twValue = vtxPtr[PrimVtxRasterPosW];\n\t\t\tif (!(wValue == 0.0)) {\n\t\t\t\tzValue = zValue / wValue;\n\t\t\t}\n\t\t\tif ((minIndex == 0) || (zValue < minZ)) {\n\t\t\t\tminIndex = i;\n\t\t\t\tminZ = zValue;\n\t\t\t}\n\t\t}\n\t}\n\treturn minIndex;\n}\n\nstatic double processNonIndexedofSize(float *vtxArray, sqInt vtxSize) {\n    sqInt i;\n    float *vtxPtr;\n    double zValue;\n    double wValue;\n    double minZ;\n\n\tminZ = 10.0;\n\tvtxPtr = vtxArray;\n\tfor (i = 1; i <= vtxSize; i += 1) {\n\t\tzValue = vtxPtr[PrimVtxRasterPosZ];\n\t\twValue = vtxPtr[PrimVtxRasterPosW];\n\t\tif (!(wValue == 0.0)) {\n\t\t\tzValue = zValue / wValue;\n\t\t}\n\t\tif (zValue < minZ) {\n\t\t\tminZ = zValue;\n\t\t}\n\t}\n\treturn minZ;\n}\n\nstatic sqInt processNonIndexedIDXofSize(float *vtxArray, sqInt vtxSize) {\n    sqInt i;\n    float *vtxPtr;\n    sqInt minIndex;\n    double zValue;\n    double wValue;\n    double minZ;\n\n\tminZ = 10.0;\n\tminIndex = 0;\n\tvtxPtr = vtxArray;\n\tfor (i = 1; i <= vtxSize; i += 1) {\n\t\tzValue = vtxPtr[PrimVtxRasterPosZ];\n\t\twValue = vtxPtr[PrimVtxRasterPosW];\n\t\tif (!(wValue == 0.0)) {\n\t\t\tzValue = zValue / wValue;\n\t\t}\n\t\tif ((minIndex == 0) || (zValue < minZ)) {\n\t\t\tminIndex = i;\n\t\t\tminZ = zValue;\n\t\t}\n\t}\n\treturn minIndex;\n}\n\nstatic double rightClipValueFromto(sqInt last, sqInt next) {\n\treturn (((((float *) last))[PrimVtxRasterPosX]) - ((((float *) last))[PrimVtxRasterPosW])) / ((((((float *) next))[PrimVtxRasterPosW]) - ((((float *) last))[PrimVtxRasterPosW])) - (((((float *) next))[PrimVtxRasterPosX]) - ((((float *) last))[PrimVtxRasterPosX])));\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt) setInterpreter(struct VirtualMachine* anInterpreter) {\n    sqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\nstatic sqInt shadeVertex(void) {\n    double cosAngle;\n    double specularFactor;\n    double gPart;\n    double bPart;\n    double rPart;\n    double aPart;\n    double gPart1;\n    double bPart1;\n    double rPart1;\n    double aPart1;\n    double gPart2;\n    double bPart2;\n    double rPart2;\n    double aPart2;\n    double scale;\n\n\t/* begin computeDirection */\n\tif (lightFlags & FlagPositional) {\n\t\tl2vDirection[0] = ((litVertex[PrimVtxPositionX]) - (primLight[PrimLightPositionX]));\n\t\tl2vDirection[1] = ((litVertex[PrimVtxPositionY]) - (primLight[PrimLightPositionY]));\n\t\tl2vDirection[2] = ((litVertex[PrimVtxPositionZ]) - (primLight[PrimLightPositionZ]));\n\t\tl2vDistance = (((l2vDirection[0]) * (l2vDirection[0])) + ((l2vDirection[1]) * (l2vDirection[1]))) + ((l2vDirection[2]) * (l2vDirection[2]));\n\t\tif (!((l2vDistance == 0.0) || (l2vDistance == 1.0))) {\n\t\t\tl2vDistance = sqrt(l2vDistance);\n\t\t\tscale = -1.0 / l2vDistance;\n\t\t}\n\t\tl2vDirection[0] = ((l2vDirection[0]) * scale);\n\t\tl2vDirection[1] = ((l2vDirection[1]) * scale);\n\t\tl2vDirection[2] = ((l2vDirection[2]) * scale);\n\t} else {\n\t\tif (lightFlags & FlagDirectional) {\n\t\t\tl2vDirection[0] = (primLight[PrimLightDirectionX]);\n\t\t\tl2vDirection[1] = (primLight[PrimLightDirectionY]);\n\t\t\tl2vDirection[2] = (primLight[PrimLightDirectionZ]);\n\t\t}\n\t}\n\t/* begin computeAttenuation */\n\tlightScale = 1.0;\n\tif (lightFlags & FlagAttenuated) {\n\t\tlightScale = 1.0 / ((primLight[PrimLightAttenuationConstant]) + (l2vDistance * ((primLight[PrimLightAttenuationLinear]) + (l2vDistance * (primLight[PrimLightAttenuationSquared])))));\n\t}\n\tif (lightFlags & FlagHasSpot) {\n\t\tlightScale = lightScale * (computeSpotFactor());\n\t}\n\tif (lightScale > 0.001) {\n\t\tif (lightFlags & FlagAmbientPart) {\n\t\t\t/* begin addPart:from:trackFlag:scale: */\n\t\t\tif (vbFlags & VBTrackAmbient) {\n\t\t\t\trPart = ((vtxInColor[0]) * ((primLight + AmbientPart)[0])) * lightScale;\n\t\t\t\tgPart = ((vtxInColor[1]) * ((primLight + AmbientPart)[1])) * lightScale;\n\t\t\t\tbPart = ((vtxInColor[2]) * ((primLight + AmbientPart)[2])) * lightScale;\n\t\t\t\taPart = ((vtxInColor[3]) * ((primLight + AmbientPart)[3])) * lightScale;\n\t\t\t} else {\n\t\t\t\trPart = (((primMaterial + AmbientPart)[0]) * ((primLight + AmbientPart)[0])) * lightScale;\n\t\t\t\tgPart = (((primMaterial + AmbientPart)[1]) * ((primLight + AmbientPart)[1])) * lightScale;\n\t\t\t\tbPart = (((primMaterial + AmbientPart)[2]) * ((primLight + AmbientPart)[2])) * lightScale;\n\t\t\t\taPart = (((primMaterial + AmbientPart)[3]) * ((primLight + AmbientPart)[3])) * lightScale;\n\t\t\t}\n\t\t\tvtxOutColor[0] = ((vtxOutColor[0]) + rPart);\n\t\t\tvtxOutColor[1] = ((vtxOutColor[1]) + gPart);\n\t\t\tvtxOutColor[2] = ((vtxOutColor[2]) + bPart);\n\t\t\tvtxOutColor[3] = ((vtxOutColor[3]) + aPart);\n\t\t}\n\t\tif (lightFlags & FlagDiffusePart) {\n\n\t\t\t/* Compute angle from light->vertex to vertex normal */\n\t\t\t/* For one-sided lighting negate cosAngle if necessary */\n\n\t\t\tcosAngle = dotProductOfFloatwithDouble(litVertex + PrimVtxNormal, l2vDirection);\n\t\t\tif (((vbFlags & VBTwoSidedLighting) == 0) && (cosAngle < 0.0)) {\n\t\t\t\tcosAngle = 0.0 - cosAngle;\n\t\t\t}\n\t\t\tif (cosAngle > 0.0) {\n\t\t\t\t/* begin addPart:from:trackFlag:scale: */\n\t\t\t\tif (vbFlags & VBTrackDiffuse) {\n\t\t\t\t\trPart1 = ((vtxInColor[0]) * ((primLight + DiffusePart)[0])) * (lightScale * cosAngle);\n\t\t\t\t\tgPart1 = ((vtxInColor[1]) * ((primLight + DiffusePart)[1])) * (lightScale * cosAngle);\n\t\t\t\t\tbPart1 = ((vtxInColor[2]) * ((primLight + DiffusePart)[2])) * (lightScale * cosAngle);\n\t\t\t\t\taPart1 = ((vtxInColor[3]) * ((primLight + DiffusePart)[3])) * (lightScale * cosAngle);\n\t\t\t\t} else {\n\t\t\t\t\trPart1 = (((primMaterial + DiffusePart)[0]) * ((primLight + DiffusePart)[0])) * (lightScale * cosAngle);\n\t\t\t\t\tgPart1 = (((primMaterial + DiffusePart)[1]) * ((primLight + DiffusePart)[1])) * (lightScale * cosAngle);\n\t\t\t\t\tbPart1 = (((primMaterial + DiffusePart)[2]) * ((primLight + DiffusePart)[2])) * (lightScale * cosAngle);\n\t\t\t\t\taPart1 = (((primMaterial + DiffusePart)[3]) * ((primLight + DiffusePart)[3])) * (lightScale * cosAngle);\n\t\t\t\t}\n\t\t\t\tvtxOutColor[0] = ((vtxOutColor[0]) + rPart1);\n\t\t\t\tvtxOutColor[1] = ((vtxOutColor[1]) + gPart1);\n\t\t\t\tvtxOutColor[2] = ((vtxOutColor[2]) + bPart1);\n\t\t\t\tvtxOutColor[3] = ((vtxOutColor[3]) + aPart1);\n\t\t\t}\n\t\t}\n\t}\n\tif ((lightFlags & FlagSpecularPart) && ((primMaterial[MaterialShininess]) > 0.0)) {\n\t\tl2vSpecDir[0] = (l2vDirection[0]);\n\t\tl2vSpecDir[1] = (l2vDirection[1]);\n\t\tl2vSpecDir[2] = (l2vDirection[2]);\n\t\tif (vbFlags & VBUseLocalViewer) {\n\t\t\tcomputeSpecularDirection();\n\t\t} else {\n\t\t\tl2vSpecDir[2] = ((l2vSpecDir[2]) - 1.0);\n\t\t}\n\t\tcosAngle = dotProductOfFloatwithDouble(litVertex + PrimVtxNormal, l2vSpecDir);\n\t\tif (cosAngle > 0.0) {\n\n\t\t\t/* Normalize the angle */\n\t\t\t/* cosAngle should be somewhere between 0 and 1.\n\t\t\tIf not, then the vertex normal was not normalized */\n\n\t\t\tcosAngle = cosAngle * (inverseLengthOfDouble(l2vSpecDir));\n\t\t\tif (cosAngle > 1.0) {\n\t\t\t\tspecularFactor = pow(cosAngle,(primMaterial[MaterialShininess]));\n\t\t\t} else {\n\t\t\t\tif (cosAngle == 0.0) {\n\t\t\t\t\tspecularFactor = 1.0;\n\t\t\t\t} else {\n\t\t\t\t\tspecularFactor = pow(cosAngle,(primMaterial[MaterialShininess]));\n\t\t\t\t}\n\t\t\t}\n\t\t\t/* begin addPart:from:trackFlag:scale: */\n\t\t\tif (vbFlags & VBTrackSpecular) {\n\t\t\t\trPart2 = ((vtxInColor[0]) * ((primLight + SpecularPart)[0])) * specularFactor;\n\t\t\t\tgPart2 = ((vtxInColor[1]) * ((primLight + SpecularPart)[1])) * specularFactor;\n\t\t\t\tbPart2 = ((vtxInColor[2]) * ((primLight + SpecularPart)[2])) * specularFactor;\n\t\t\t\taPart2 = ((vtxInColor[3]) * ((primLight + SpecularPart)[3])) * specularFactor;\n\t\t\t} else {\n\t\t\t\trPart2 = (((primMaterial + SpecularPart)[0]) * ((primLight + SpecularPart)[0])) * specularFactor;\n\t\t\t\tgPart2 = (((primMaterial + SpecularPart)[1]) * ((primLight + SpecularPart)[1])) * specularFactor;\n\t\t\t\tbPart2 = (((primMaterial + SpecularPart)[2]) * ((primLight + SpecularPart)[2])) * specularFactor;\n\t\t\t\taPart2 = (((primMaterial + SpecularPart)[3]) * ((primLight + SpecularPart)[3])) * specularFactor;\n\t\t\t}\n\t\t\tvtxOutColor[0] = ((vtxOutColor[0]) + rPart2);\n\t\t\tvtxOutColor[1] = ((vtxOutColor[1]) + gPart2);\n\t\t\tvtxOutColor[2] = ((vtxOutColor[2]) + bPart2);\n\t\t\tvtxOutColor[3] = ((vtxOutColor[3]) + aPart2);\n\t\t}\n\t}\n}\n\n\n/*\tLoad an Array of B3DPrimitiveLights from the given stack index */\n\nstatic sqInt stackLightArrayValue(sqInt stackIndex) {\n    sqInt array;\n    sqInt i;\n    sqInt arraySize;\n    sqInt oop;\n\n\tarray = interpreterProxy->stackObjectValue(stackIndex);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!((interpreterProxy->fetchClassOf(array)) == (interpreterProxy->classArray()))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tarraySize = interpreterProxy->slotSizeOf(array);\n\tfor (i = 0; i <= (arraySize - 1); i += 1) {\n\t\toop = interpreterProxy->fetchPointerofObject(i, array);\n\t\tif ((oop & 1)) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t\tif (!((interpreterProxy->isWords(oop)) && ((interpreterProxy->slotSizeOf(oop)) == PrimLightSize))) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\treturn array;\n}\n\n\n/*\tLoad a B3DMaterial from the given stack index */\n\nstatic void * stackMaterialValue(sqInt stackIndex) {\n    sqInt oop;\n\n\toop = interpreterProxy->stackObjectValue(stackIndex);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif ((interpreterProxy->isWords(oop)) && ((interpreterProxy->slotSizeOf(oop)) == MaterialSize)) {\n\t\treturn interpreterProxy->firstIndexableField(oop);\n\t}\n\treturn null;\n}\n\n\n/*\tLoad a 4x4 transformation matrix from the interpreter stack.\n\tReturn a pointer to the matrix data if successful, nil otherwise. */\n\nstatic void* stackMatrix(sqInt index) {\n    sqInt oop;\n\n\toop = interpreterProxy->stackObjectValue(index);\n\tif (oop == null) {\n\t\treturn null;\n\t}\n\tif ((interpreterProxy->isWords(oop)) && ((interpreterProxy->slotSizeOf(oop)) == 16)) {\n\t\treturn interpreterProxy->firstIndexableField(oop);\n\t}\n\treturn null;\n}\n\n\n/*\tLoad a primitive index array from the interpreter stack.\n\tIf aBool is true then check that all the indexes are in the range (1,maxIndex).\n\tReturn a pointer to the index data if successful, nil otherwise. */\n\nstatic void* stackPrimitiveIndexArrayofSizevalidateforVertexSize(sqInt stackIndex, sqInt nItems, sqInt aBool, sqInt maxIndex) {\n    sqInt i;\n    sqInt oop;\n    sqInt index;\n    sqInt oopSize;\n    int *idxPtr;\n\n\toop = interpreterProxy->stackObjectValue(stackIndex);\n\tif (oop == null) {\n\t\treturn null;\n\t}\n\tif (!(interpreterProxy->isWords(oop))) {\n\t\treturn null;\n\t}\n\toopSize = interpreterProxy->slotSizeOf(oop);\n\tif (oopSize < nItems) {\n\t\treturn null;\n\t}\n\tidxPtr = ((int *) (interpreterProxy->firstIndexableField(oop)));\n\tif (aBool) {\n\t\tfor (i = 0; i <= (nItems - 1); i += 1) {\n\t\t\tindex = idxPtr[i];\n\t\t\tif ((index < 0) || (index > maxIndex)) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t}\n\treturn idxPtr;\n}\n\n\n/*\tLoad a primitive vertex from the interpreter stack.\n\tReturn a pointer to the vertex data if successful, nil otherwise. */\n\nstatic void* stackPrimitiveVertex(sqInt index) {\n    sqInt oop;\n\n\toop = interpreterProxy->stackObjectValue(index);\n\tif (oop == null) {\n\t\treturn null;\n\t}\n\tif ((interpreterProxy->isWords(oop)) && ((interpreterProxy->slotSizeOf(oop)) == PrimVertexSize)) {\n\t\treturn interpreterProxy->firstIndexableField(oop);\n\t}\n\treturn null;\n}\n\n\n/*\tLoad a primitive vertex array from the interpreter stack.\n\tReturn a pointer to the vertex data if successful, nil otherwise. */\n\nstatic void* stackPrimitiveVertexArrayofSize(sqInt index, sqInt nItems) {\n    sqInt oop;\n    sqInt oopSize;\n\n\toop = interpreterProxy->stackObjectValue(index);\n\tif (oop == null) {\n\t\treturn null;\n\t}\n\tif (interpreterProxy->isWords(oop)) {\n\t\toopSize = interpreterProxy->slotSizeOf(oop);\n\t\tif (((oopSize >= nItems) * PrimVertexSize) && ((oopSize % PrimVertexSize) == 0)) {\n\t\t\treturn interpreterProxy->firstIndexableField(oop);\n\t\t}\n\t}\n\treturn null;\n}\n\nstatic sqInt storeObjectsInto(sqInt stackIndex) {\n    sqInt i;\n    sqInt arraySize;\n    sqInt objOop;\n    sqInt arrayOop;\n\n\tarrayOop = interpreterProxy->stackObjectValue(stackIndex);\n\tarraySize = state.nObjects;\n\tfor (i = 0; i <= (arraySize - 1); i += 1) {\n\t\tobjOop = state.objects[i]->__oop__;\n\t\tinterpreterProxy->storePointerofObjectwithValue(i, arrayOop, objOop);\n\t}\n}\n\n\n/*\tStore the computed output color back into the current primitive vertex.\n\tClamp the r,g,b,a part to be in the range 0-255. */\n\nstatic sqInt storePrimitiveVertex(void) {\n    sqInt a;\n    sqInt r;\n    sqInt g;\n    sqInt b;\n\n\tr = ((sqInt) ((vtxOutColor[0]) * 255) );\n\tr = (((((r < 255) ? r : 255)) < 0) ? 0 : (((r < 255) ? r : 255)));\n\tg = ((sqInt) ((vtxOutColor[1]) * 255) );\n\tg = (((((g < 255) ? g : 255)) < 0) ? 0 : (((g < 255) ? g : 255)));\n\tb = ((sqInt) ((vtxOutColor[2]) * 255) );\n\tb = (((((b < 255) ? b : 255)) < 0) ? 0 : (((b < 255) ? b : 255)));\n\ta = ((sqInt) ((vtxOutColor[3]) * 255) );\n\n\t/* The following is equal to b + (g << 8) + (r << 16) + (a << 24) */\n\n\ta = (((((a < 255) ? a : 255)) < 0) ? 0 : (((a < 255) ? a : 255)));\n\t(((int*) litVertex))[PrimVtxColor32] = (b + ((g + ((r + (a << 8)) << 8)) << 8));\n}\n\nstatic double topClipValueFromto(sqInt last, sqInt next) {\n\treturn (((((float *) last))[PrimVtxRasterPosY]) - ((((float *) last))[PrimVtxRasterPosW])) / ((((((float *) next))[PrimVtxRasterPosW]) - ((((float *) last))[PrimVtxRasterPosW])) - (((((float *) next))[PrimVtxRasterPosY]) - ((((float *) last))[PrimVtxRasterPosY])));\n}\n\n\n/*\tTransform src with arg into dst.\n\tIt is allowed that src == dst but not arg == dst */\n\nstatic sqInt transformMatrixwithinto(float *src, float *arg, float *dst) {\n    float *m3;\n    sqInt i;\n    float *m2;\n    float *m1;\n    float c4;\n    float c3;\n    float c2;\n    float c1;\n\n\tm1 = ((float *) src);\n\tm2 = ((float *) arg);\n\tm3 = ((float *) dst);\n\tfor (i = 0; i <= 3; i += 1) {\n\n\t\t/* Compute next row */\n\n\t\tc1 = ((((m1[0]) * (m2[0])) + ((m1[1]) * (m2[4]))) + ((m1[2]) * (m2[8]))) + ((m1[3]) * (m2[12]));\n\t\tc2 = ((((m1[0]) * (m2[1])) + ((m1[1]) * (m2[5]))) + ((m1[2]) * (m2[9]))) + ((m1[3]) * (m2[13]));\n\t\tc3 = ((((m1[0]) * (m2[2])) + ((m1[1]) * (m2[6]))) + ((m1[2]) * (m2[10]))) + ((m1[3]) * (m2[14]));\n\n\t\t/* Store result */\n\n\t\tc4 = ((((m1[0]) * (m2[3])) + ((m1[1]) * (m2[7]))) + ((m1[2]) * (m2[11]))) + ((m1[3]) * (m2[15]));\n\t\tm3[0] = c1;\n\t\tm3[1] = c2;\n\t\tm3[2] = c3;\n\t\tm3[3] = c4;\n\t\tm1 += 4;\n\t\tm3 += 4;\n\t}\n}\n\n\n/*\tTransform the normal of the given primitive vertex */\n\nstatic sqInt transformPrimitiveNormalbyrescale(float *pVertex, float *matrix, sqInt rescale) {\n    double dot;\n    double z;\n    double y;\n    double x;\n    double rz;\n    double ry;\n    double rx;\n\n\tx = pVertex[PrimVtxNormalX];\n\ty = pVertex[PrimVtxNormalY];\n\tz = pVertex[PrimVtxNormalZ];\n\trx = ((x * (matrix[0])) + (y * (matrix[1]))) + (z * (matrix[2]));\n\try = ((x * (matrix[4])) + (y * (matrix[5]))) + (z * (matrix[6]));\n\trz = ((x * (matrix[8])) + (y * (matrix[9]))) + (z * (matrix[10]));\n\tif (rescale) {\n\t\tdot = ((rx * rx) + (ry * ry)) + (rz * rz);\n\t\tif (dot < 1.0e-20) {\n\t\t\trx = ry = rz = 0.0;\n\t\t} else {\n\t\t\tif (!(dot == 1.0)) {\n\t\t\t\tdot = 1.0 / (sqrt(dot));\n\t\t\t\trx = rx * dot;\n\t\t\t\try = ry * dot;\n\t\t\t\trz = rz * dot;\n\t\t\t}\n\t\t}\n\t}\n\tpVertex[PrimVtxNormalX] = (((float) rx));\n\tpVertex[PrimVtxNormalY] = (((float) ry));\n\tpVertex[PrimVtxNormalZ] = (((float) rz));\n}\n\n\n/*\tTransform the normal of the given primitive vertex */\n\nstatic sqInt transformPrimitivePositionby(float *pVertex, float *matrix) {\n    double z;\n    double y;\n    double x;\n    double rz;\n    double ry;\n    double rx;\n    double rw;\n\n\tx = pVertex[PrimVtxPositionX];\n\ty = pVertex[PrimVtxPositionY];\n\tz = pVertex[PrimVtxPositionZ];\n\trx = (((x * (matrix[0])) + (y * (matrix[1]))) + (z * (matrix[2]))) + (matrix[3]);\n\try = (((x * (matrix[4])) + (y * (matrix[5]))) + (z * (matrix[6]))) + (matrix[7]);\n\trz = (((x * (matrix[8])) + (y * (matrix[9]))) + (z * (matrix[10]))) + (matrix[11]);\n\trw = (((x * (matrix[12])) + (y * (matrix[13]))) + (z * (matrix[14]))) + (matrix[15]);\n\tif (rw == 1.0) {\n\t\tpVertex[PrimVtxPositionX] = (((float) rx));\n\t\tpVertex[PrimVtxPositionY] = (((float) ry));\n\t\tpVertex[PrimVtxPositionZ] = (((float) rz));\n\t} else {\n\t\tif (rw == 0.0) {\n\t\t\trw = 0.0;\n\t\t} else {\n\t\t\trw = 1.0 / rw;\n\t\t}\n\t\tpVertex[PrimVtxPositionX] = (((float) (rx * rw)));\n\t\tpVertex[PrimVtxPositionY] = (((float) (ry * rw)));\n\t\tpVertex[PrimVtxPositionZ] = (((float) (rz * rw)));\n\t}\n}\n\n\n/*\tTransform the position of the given primitive vertex assuming that \n\tmatrix a41 = a42 = a43 = 0.0 and a44 = 1.0 */\n\nstatic sqInt transformPrimitivePositionFastby(float *pVertex, float *matrix) {\n    double z;\n    double y;\n    double x;\n    double rz;\n    double ry;\n    double rx;\n\n\tx = pVertex[PrimVtxPositionX];\n\ty = pVertex[PrimVtxPositionY];\n\tz = pVertex[PrimVtxPositionZ];\n\trx = (((x * (matrix[0])) + (y * (matrix[1]))) + (z * (matrix[2]))) + (matrix[3]);\n\try = (((x * (matrix[4])) + (y * (matrix[5]))) + (z * (matrix[6]))) + (matrix[7]);\n\trz = (((x * (matrix[8])) + (y * (matrix[9]))) + (z * (matrix[10]))) + (matrix[11]);\n\tpVertex[PrimVtxPositionX] = (((float) rx));\n\tpVertex[PrimVtxPositionY] = (((float) ry));\n\tpVertex[PrimVtxPositionZ] = (((float) rz));\n}\n\n\n/*\tTransform the position of the given primitive vertex assuming that \n\tmatrix a14 = a24 = a34 = a41 = a42 = a43 = 0.0 and a44 = 1.0 */\n\nstatic sqInt transformPrimitivePositionFasterby(float *pVertex, float *matrix) {\n    double z;\n    double y;\n    double x;\n    double rz;\n    double ry;\n    double rx;\n\n\tx = pVertex[PrimVtxPositionX];\n\ty = pVertex[PrimVtxPositionY];\n\tz = pVertex[PrimVtxPositionZ];\n\trx = ((x * (matrix[0])) + (y * (matrix[1]))) + (z * (matrix[2]));\n\try = ((x * (matrix[4])) + (y * (matrix[5]))) + (z * (matrix[6]));\n\trz = ((x * (matrix[8])) + (y * (matrix[9]))) + (z * (matrix[10]));\n\tpVertex[PrimVtxPositionX] = (((float) rx));\n\tpVertex[PrimVtxPositionY] = (((float) ry));\n\tpVertex[PrimVtxPositionZ] = (((float) rz));\n}\n\n\n/*\tTransform the normal of the given primitive vertex */\n\nstatic sqInt transformPrimitiveRasterPositionby(float *pVertex, float *matrix) {\n    double z;\n    double y;\n    double x;\n    double rz;\n    double ry;\n    double rx;\n    double rw;\n\n\tx = pVertex[PrimVtxPositionX];\n\ty = pVertex[PrimVtxPositionY];\n\tz = pVertex[PrimVtxPositionZ];\n\trx = (((x * (matrix[0])) + (y * (matrix[1]))) + (z * (matrix[2]))) + (matrix[3]);\n\try = (((x * (matrix[4])) + (y * (matrix[5]))) + (z * (matrix[6]))) + (matrix[7]);\n\trz = (((x * (matrix[8])) + (y * (matrix[9]))) + (z * (matrix[10]))) + (matrix[11]);\n\trw = (((x * (matrix[12])) + (y * (matrix[13]))) + (z * (matrix[14]))) + (matrix[15]);\n\tpVertex[PrimVtxRasterPosX] = (((float) rx));\n\tpVertex[PrimVtxRasterPosY] = (((float) ry));\n\tpVertex[PrimVtxRasterPosZ] = (((float) rz));\n\tpVertex[PrimVtxRasterPosW] = (((float) rw));\n}\n\n\n/*\tTransform the entire vertex array by the given matrices */\n/*\tTODO: Check the actual trade-offs between vtxCount and analyzing */\n\nstatic sqInt transformVBcountbyandflags(float *vtxArray, sqInt vtxCount, float *modelViewMatrix, float *projectionMatrix, sqInt flags) {\n    sqInt mvFlags;\n    sqInt i;\n    sqInt prFlags;\n    float *pVertex;\n    sqInt hasNormals;\n    sqInt rescale;\n\n\tmvFlags = analyzeMatrix(modelViewMatrix);\n\tprFlags = analyzeMatrix(projectionMatrix);\n\tpVertex = ((float *) vtxArray);\n\n\t/* Check if we have to rescale the normals */\n\n\thasNormals = flags & VBVtxHasNormals;\n\tif (hasNormals) {\n\t\tif (mvFlags & FlagM44Identity) {\n\t\t\trescale = 0;\n\t\t} else {\n\t\t\trescale = analyzeMatrix3x3Length(modelViewMatrix);\n\t\t}\n\t}\n\tif ((mvFlags & FlagM44NoPerspective) && (prFlags == 0)) {\n\t\tif ((mvFlags == FlagM44NoTranslation) == 0) {\n\t\t\tfor (i = 1; i <= vtxCount; i += 1) {\n\t\t\t\tif (hasNormals) {\n\t\t\t\t\ttransformPrimitiveNormalbyrescale(pVertex, modelViewMatrix, rescale);\n\t\t\t\t}\n\t\t\t\ttransformPrimitivePositionFastby(pVertex, modelViewMatrix);\n\t\t\t\ttransformPrimitiveRasterPositionby(pVertex, projectionMatrix);\n\t\t\t\tpVertex += PrimVertexSize;\n\t\t\t}\n\t\t} else {\n\t\t\tfor (i = 1; i <= vtxCount; i += 1) {\n\t\t\t\tif (hasNormals) {\n\t\t\t\t\ttransformPrimitiveNormalbyrescale(pVertex, modelViewMatrix, rescale);\n\t\t\t\t}\n\t\t\t\ttransformPrimitivePositionFasterby(pVertex, modelViewMatrix);\n\t\t\t\ttransformPrimitiveRasterPositionby(pVertex, projectionMatrix);\n\t\t\t\tpVertex += PrimVertexSize;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\tif ((mvFlags & prFlags) & FlagM44Identity) {\n\t\tfor (i = 1; i <= vtxCount; i += 1) {\n\t\t\tpVertex[PrimVtxRasterPosX] = (pVertex[PrimVtxPositionX]);\n\t\t\tpVertex[PrimVtxRasterPosY] = (pVertex[PrimVtxPositionY]);\n\t\t\tpVertex[PrimVtxRasterPosZ] = (pVertex[PrimVtxPositionZ]);\n\t\t\tpVertex[PrimVtxRasterPosW] = 1.0;\n\t\t\tpVertex += PrimVertexSize;\n\t\t}\n\t\treturn null;\n\t}\n\tif (mvFlags & FlagM44Identity) {\n\t\tfor (i = 1; i <= vtxCount; i += 1) {\n\t\t\ttransformPrimitiveRasterPositionby(pVertex, projectionMatrix);\n\t\t\tpVertex += PrimVertexSize;\n\t\t}\n\t\treturn null;\n\t}\n\tif (prFlags & FlagM44Identity) {\n\t\tfor (i = 1; i <= vtxCount; i += 1) {\n\t\t\tif (hasNormals) {\n\t\t\t\ttransformPrimitiveNormalbyrescale(pVertex, modelViewMatrix, rescale);\n\t\t\t}\n\t\t\tif (mvFlags == (FlagM44NoPerspective + FlagM44NoPerspective)) {\n\t\t\t\ttransformPrimitivePositionFasterby(pVertex, modelViewMatrix);\n\t\t\t} else {\n\t\t\t\tif (mvFlags == FlagM44NoPerspective) {\n\t\t\t\t\ttransformPrimitivePositionFastby(pVertex, modelViewMatrix);\n\t\t\t\t} else {\n\t\t\t\t\ttransformPrimitivePositionby(pVertex, modelViewMatrix);\n\t\t\t\t}\n\t\t\t}\n\t\t\tpVertex[PrimVtxRasterPosX] = (pVertex[PrimVtxPositionX]);\n\t\t\tpVertex[PrimVtxRasterPosY] = (pVertex[PrimVtxPositionY]);\n\t\t\tpVertex[PrimVtxRasterPosZ] = (pVertex[PrimVtxPositionZ]);\n\t\t\tpVertex[PrimVtxRasterPosW] = 1.0;\n\t\t\tpVertex += PrimVertexSize;\n\t\t}\n\t\treturn null;\n\t}\n\tfor (i = 1; i <= vtxCount; i += 1) {\n\t\tif (hasNormals) {\n\t\t\ttransformPrimitiveNormalbyrescale(pVertex, modelViewMatrix, rescale);\n\t\t}\n\t\ttransformPrimitivePositionby(pVertex, modelViewMatrix);\n\t\ttransformPrimitiveRasterPositionby(pVertex, projectionMatrix);\n\t\tpVertex += PrimVertexSize;\n\t}\n}\n\n\n/*\tLoad the word based array of size count from the given oop */\n\nstatic void* vbLoadArraysize(sqInt oop, sqInt count) {\n\tif (oop == null) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\tif (oop == (interpreterProxy->nilObject())) {\n\t\treturn null;\n\t}\n\tif (!(interpreterProxy->isWords(oop))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\tif (!((interpreterProxy->slotSizeOf(oop)) == count)) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn null;\n\t}\n\treturn interpreterProxy->firstIndexableField(oop);\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\n\nvoid* Squeak3D_exports[][3] = {\n\t{\"Squeak3D\", \"b3dShaderVersion\", (void*)b3dShaderVersion},\n\t{\"Squeak3D\", \"b3dTransformPrimitiveNormal\", (void*)b3dTransformPrimitiveNormal},\n\t{\"Squeak3D\", \"b3dClipPolygon\", (void*)b3dClipPolygon},\n\t{\"Squeak3D\", \"b3dOrthoNormInverseMatrix\", (void*)b3dOrthoNormInverseMatrix},\n\t{\"Squeak3D\", \"b3dTransformVertexBuffer\", (void*)b3dTransformVertexBuffer},\n\t{\"Squeak3D\", \"b3dComputeMinZ\", (void*)b3dComputeMinZ},\n\t{\"Squeak3D\", \"b3dInitializeRasterizerState\", (void*)b3dInitializeRasterizerState},\n\t{\"Squeak3D\", \"b3dDetermineClipFlags\", (void*)b3dDetermineClipFlags},\n\t{\"Squeak3D\", \"getModuleName\", (void*)getModuleName},\n\t{\"Squeak3D\", \"setInterpreter\", (void*)setInterpreter},\n\t{\"Squeak3D\", \"b3dTransformPrimitiveRasterPosition\", (void*)b3dTransformPrimitiveRasterPosition},\n\t{\"Squeak3D\", \"primitiveSetBitBltPlugin\", (void*)primitiveSetBitBltPlugin},\n\t{\"Squeak3D\", \"b3dTransformMatrixWithInto\", (void*)b3dTransformMatrixWithInto},\n\t{\"Squeak3D\", \"b3dStartRasterizer\", (void*)b3dStartRasterizer},\n\t{\"Squeak3D\", \"b3dShadeVertexBuffer\", (void*)b3dShadeVertexBuffer},\n\t{\"Squeak3D\", \"b3dRasterizerVersion\", (void*)b3dRasterizerVersion},\n\t{\"Squeak3D\", \"b3dInitPrimitiveObject\", (void*)b3dInitPrimitiveObject},\n\t{\"Squeak3D\", \"b3dLoadVertexBuffer\", (void*)b3dLoadVertexBuffer},\n\t{\"Squeak3D\", \"b3dTransformDirection\", (void*)b3dTransformDirection},\n\t{\"Squeak3D\", \"moduleUnloaded\", (void*)moduleUnloaded},\n\t{\"Squeak3D\", \"b3dPrimitiveTextureSize\", (void*)b3dPrimitiveTextureSize},\n\t{\"Squeak3D\", \"b3dComputeMinIndexZ\", (void*)b3dComputeMinIndexZ},\n\t{\"Squeak3D\", \"b3dMapVertexBuffer\", (void*)b3dMapVertexBuffer},\n\t{\"Squeak3D\", \"initialiseModule\", (void*)initialiseModule},\n\t{\"Squeak3D\", \"b3dTransformerVersion\", (void*)b3dTransformerVersion},\n\t{\"Squeak3D\", \"b3dTransposeMatrix\", (void*)b3dTransposeMatrix},\n\t{\"Squeak3D\", \"b3dPrimitiveNextClippedTriangle\", (void*)b3dPrimitiveNextClippedTriangle},\n\t{\"Squeak3D\", \"b3dTransformPoint\", (void*)b3dTransformPoint},\n\t{\"Squeak3D\", \"b3dTransformPrimitivePosition\", (void*)b3dTransformPrimitivePosition},\n\t{\"Squeak3D\", \"b3dPrimitiveObjectSize\", (void*)b3dPrimitiveObjectSize},\n\t{\"Squeak3D\", \"b3dLoadIndexArray\", (void*)b3dLoadIndexArray},\n\t{\"Squeak3D\", \"b3dInplaceHouseHolderInvert\", (void*)b3dInplaceHouseHolderInvert},\n\t{NULL, NULL, NULL}\n};\n\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/SqueakFFIPrims/SqueakFFIPrims.c",
    "content": "/* Automatically generated by\n\tVMPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tReentrantIA32FFIPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"ReentrantIA32FFIPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"sqMemoryAccess.h\"\n\n\n#include \"sqAssert.h\" /* for assert */\n#undef halt /* sqAssert.h provides a halt used in the interpreter */\n\n#ifdef _MSC_VER\n# define alloca _alloca\n#endif\n#if defined(__GNUC__) && (defined(_X86_) || defined(i386) || defined(__i386) || defined(__i386__))\n# define setsp(sp) asm volatile (\"movl %0,%%esp\" : : \"m\"(sp))\n# define getsp() ({ void *esp; asm volatile (\"movl %%esp,%0\" : \"=r\"(esp) : ); esp;})\n#endif\n#if !defined(getsp)\n# define getsp() 0\n#endif \n#if !defined(setsp)\n# define setsp(ignored) 0\n#endif \n\n#if __APPLE__ && __MACH__ && __i386__\n# define STACK_ALIGN_BYTES 16\n#elif __linux__ && __i386__\n# define STACK_ALIGN_BYTES 16\n#elif defined(__amd64__) || defined(__x86_64__) ||  defined(__amd64) || defined(__x86_64)\n# define STACK_ALIGN_BYTES 16\n#elif defined(powerpc) || defined(__powerpc__) || defined(_POWER) || defined(__POWERPC__) || defined(__PPC__)\n# define STACK_ALIGN_BYTES 16\n#elif defined(__sparc64__) || defined(__sparcv9__) || defined(__sparc_v9__) /* must preceed 32-bit sparc defs */\n# define STACK_ALIGN_BYTES 16\n#elif defined(sparc) || defined(__sparc__) || defined(__sparclite__)\n# define STACK_ALIGN_BYTES 8\n#else\n# define STACK_ALIGN_BYTES 0\n#endif\n\n#if defined(_X86_) || defined(i386) || defined(__i386) || defined(__i386__)\n/* Both Mac OS X x86 and Win32 x86 return structs of a power of two in size\n * less than or equal to eight bytes in length in registers. Linux never does so.\n */\n# if __linux__\n#\tdefine WIN32_X86_STRUCT_RETURN 0\n# else\n#\tdefine WIN32_X86_STRUCT_RETURN 1\n# endif\n# if WIN32\n#\tdefine PLATFORM_API_USES_CALLEE_POPS_CONVENTION 1\n# else\n#\tdefine PLATFORM_API_USES_CALLEE_POPS_CONVENTION 0\n# endif\n# if defined(__MINGW32__) && (__GNUC__ >= 3)\n    /*\n     * cygwin -mno-cygwin (MinGW) gcc 3.4.x's alloca is a library routine that answers\n     * %esp + 4, so the outgoing stack is offset by one word if uncorrected.\n     * Grab the actual stack pointer to correct.\n     */\n#\tdefine ALLOCA_LIES_SO_USE_GETSP 1\n# endif\n#endif /* defined(_X86_) || defined(i386) || defined(__i386) || defined(__i386__) */\n\n#if !defined(ALLOCA_LIES_SO_USE_GETSP)\n# define ALLOCA_LIES_SO_USE_GETSP 0\n#endif\n\n/* The dispatchOn:in:with:with: generates an unwanted call on error.  Just squash it. */\n#define error(foo) 0\n\n/* but print assert failures. */\nvoid\nwarning(char *s) { /* Print an error message but don't exit. */\n\tprintf(\"\\n%s\\n\", s);\n}\n\ntypedef struct {\n\tchar *argVector;\n\tchar *currentArg;\n\tchar *limit;\n\tsqInt\tstructReturnSize;\n\tsqInt\tcallFlags;\n\tvoid *ffiArgSpec;\n\tsqInt\tffiArgSpecSize;\n\tsqInt\tffiArgHeader;\n\tsqInt\tffiRetHeader;\n\tsqInt\tstringArgIndex;\n\tchar *stringArgs[15];\n } CalloutState;\n\n#define ReentrantFFICalloutState CalloutState\n\n\n\n/*** Constants ***/\n#define BaseHeaderSize 4\n#define BytesPerOop 4\n#define DefaultMaxStackSize 16384\n#define ExternalFunctionArgTypesIndex 2\n#define ExternalFunctionFlagsIndex 1\n#define ExternalFunctionStackSizeIndex 3\n#define FFIAtomicTypeMask 0xF000000\n#define FFIAtomicTypeShift 24\n#define FFICallTypeApi 1\n#define FFIErrorAddressNotFound 13\n#define FFIErrorAttemptToPassVoid 14\n#define FFIErrorBadAddress 11\n#define FFIErrorBadArg 3\n#define FFIErrorBadArgs 2\n#define FFIErrorBadAtomicType 5\n#define FFIErrorBadExternalFunction 17\n#define FFIErrorBadExternalLibrary 16\n#define FFIErrorBadReturn 10\n#define FFIErrorCallFrameTooBig 19\n#define FFIErrorCallType 9\n#define FFIErrorCoercionFailed 6\n#define FFIErrorIntAsPointer 4\n#define FFIErrorInvalidPointer 18\n#define FFIErrorModuleNotFound 15\n#define FFIErrorNoModule 12\n#define FFIErrorNotFunction 1\n#define FFIErrorStructSize 8\n#define FFIErrorWrongType 7\n#define FFIFlagAtomic 0x40000\n#define FFIFlagPointer 0x20000\n#define FFIFlagStructure 0x10000\n#define FFINoCalloutAvailable -1\n#define FFIStructSizeMask 0xFFFF\n#define FFITypeBool 1\n#define FFITypeDoubleFloat 13\n#define FFITypeSignedByte 3\n#define FFITypeSignedChar 11\n#define FFITypeSignedInt 7\n#define FFITypeSignedLongLong 9\n#define FFITypeSignedShort 5\n#define FFITypeSingleFloat 12\n#define FFITypeUnsignedByte 2\n#define FFITypeVoid 0\n#define MaxNumArgs 15\n#define PrimErrBadArgument 3\n#define PrimErrBadMethod 12\n#define PrimErrBadNumArgs 5\n#define PrimErrBadReceiver 2\n#define PrimErrNoCMemory 10\n\n\n/*** Function Prototypes ***/\nstatic sqInt atomicTypeOf(sqInt typeSpec);\nstatic void cleanupCalloutState(CalloutState *calloutState);\nstatic sqInt externalFunctionHasStackSizeSlot(void);\nstatic sqInt ffiAddressOfstartingAtsize(sqInt rcvr, sqInt byteOffset, sqInt byteSize);\nstatic sqInt ffiArgByValuein(sqInt oop, CalloutState *calloutState);\nstatic sqInt ffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *calloutState);\nstatic sqInt ffiAtomicArgByReferenceClassin(sqInt oop, sqInt oopClass, CalloutState *calloutState);\nstatic sqInt ffiAtomicStructByReferenceClassin(sqInt oop, sqInt oopClass, CalloutState *calloutState);\nstatic sqInt ffiCalloutToSpecOnStackin(void *procAddr, sqInt specOnStack, CalloutState *calloutState);\nstatic sqInt ffiCallArgArrayOrNilNumArgs(sqInt externalFunction, sqInt argArrayOrNil, sqInt nArgs);\nstatic sqInt ffiCheckReturnWithin(sqInt retSpec, sqInt retClass, CalloutState *calloutState);\nstatic sqInt ffiContentsOfHandleerrCode(sqInt oop, sqInt errCode);\nstatic sqInt ffiCreateIntegralResultOopofAtomicTypein(usqLong retVal, sqInt atomicType, CalloutState *calloutState);\nstatic sqInt ffiFail(sqInt reason);\nstatic double ffiFloatValueOf(sqInt oop);\nstatic sqInt ffiIntegerValueOf(sqInt oop);\nstatic sqInt ffiLoadCalloutAddressFrom(sqInt oop);\nstatic sqInt ffiLoadCalloutAddress(sqInt lit);\nstatic sqInt ffiLoadCalloutModule(sqInt module);\nstatic void ffiLogCallout(sqInt lit);\nEXPORT(sqInt) ffiLogCallsTo(char*fileName);\nstatic sqInt ffiPushDoubleFloatin(double value, CalloutState *calloutState);\nstatic sqInt ffiPushPointerContentsOfin(sqInt oop, CalloutState *calloutState);\nstatic sqInt ffiPushPointerin(void *pointer, CalloutState *calloutState);\nstatic sqInt ffiPushSignedBytein(sqInt value, CalloutState *calloutState);\nstatic sqInt ffiPushSignedCharin(sqInt value, CalloutState *calloutState);\nstatic sqInt ffiPushSignedIntin(sqInt value, CalloutState *calloutState);\nstatic sqInt ffiPushSignedLongLongOopin(sqInt oop, CalloutState *calloutState);\nstatic sqInt ffiPushSignedLongLongin(usqLong value, CalloutState *calloutState);\nstatic sqInt ffiPushSignedShortin(sqInt value, CalloutState *calloutState);\nstatic sqInt ffiPushSingleFloatin(float value, CalloutState *calloutState);\nstatic sqInt ffiPushStringOfLengthin(char *pointer, sqInt length, CalloutState *calloutState);\nstatic sqInt ffiPushStructureContentsOfin(sqInt oop, CalloutState *calloutState);\nstatic sqInt ffiPushStructureofSizetypeSpecofLengthin(void *pointer, sqInt structSize, sqInt *argSpec, sqInt argSpecSize, CalloutState *calloutState);\nstatic sqInt ffiPushUnsignedBytein(sqInt value, CalloutState *calloutState);\nstatic sqInt ffiPushUnsignedCharin(sqInt value, CalloutState *calloutState);\nstatic sqInt ffiPushUnsignedIntin(sqInt value, CalloutState *calloutState);\nstatic sqInt ffiPushUnsignedLongLongOopin(sqInt oop, CalloutState *calloutState);\nstatic sqInt ffiPushUnsignedLongLongin(usqLong value, CalloutState *calloutState);\nstatic sqInt ffiPushUnsignedShortin(sqInt value, CalloutState *calloutState);\nstatic sqInt ffiPushVoidin(sqInt ignored, CalloutState *calloutState);\nstatic sqInt ffiReturnCStringFrom(sqInt cPointer);\nstatic sqInt ffiReturnPointerofTypein(usqLong retVal, sqInt retType, CalloutState *calloutState);\nstatic sqInt ffiReturnStructofTypein(usqLong longLongRet, sqInt ffiRetType, CalloutState *calloutState);\nstatic sqInt ffiReturnType(sqInt specOnStack);\nstatic sqInt ffiSupportsCallingConvention(sqInt aCallingConvention);\nstatic sqInt ffiValidateExternalDataAtomicType(sqInt oop, sqInt atomicType);\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nEXPORT(sqInt) initialiseModule(void);\nstatic sqInt isAlien(sqInt anOop);\nstatic sqInt isAtomicType(sqInt typeSpec);\nstatic sqInt isDirectAlien(sqInt oop);\nstatic sqInt msg(char *s);\nstatic sqInt nonRegisterStructReturnIsViaImplicitFirstArgument(void);\nEXPORT(void) primitiveCallout(void);\nEXPORT(void) primitiveCalloutWithArgs(void);\nEXPORT(sqInt) primitiveCreateManualSurface(void);\nEXPORT(sqInt) primitiveDestroyManualSurface(void);\nEXPORT(sqInt) primitiveFFIAllocate(void);\nEXPORT(sqInt) primitiveFFIDoubleAt(void);\nEXPORT(sqInt) primitiveFFIDoubleAtPut(void);\nEXPORT(sqInt) primitiveFFIFloatAt(void);\nEXPORT(sqInt) primitiveFFIFloatAtPut(void);\nEXPORT(sqInt) primitiveFFIFree(void);\nEXPORT(sqInt) primitiveFFIGetLastError(void);\nEXPORT(sqInt) primitiveFFIIntegerAt(void);\nEXPORT(sqInt) primitiveFFIIntegerAtPut(void);\nEXPORT(sqInt) primitiveForceLoad(void);\nEXPORT(sqInt) primitiveLogCallsTo(void);\nEXPORT(sqInt) primitiveSetManualSurfacePointer(void);\nstatic sqInt registerArgsSlop(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\nstatic sqInt sizeField(sqInt oop);\nstatic sqInt startOfData(sqInt oop);\n\n\n/*** Variables ***/\nstatic sqInt externalFunctionInstSize;\nstatic sqInt ffiLastError;\nstatic sqInt ffiLogEnabled;\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"SqueakFFIPrims VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"SqueakFFIPrims VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\n\n\n/*** Macros ***/\n#define allocaLiesSoUseGetsp() ALLOCA_LIES_SO_USE_GETSP\n#define cStackAlignment() STACK_ALIGN_BYTES\n#define dispatchFunctionPointer(aFunctionPointer) (aFunctionPointer)()\n#define ffiAlloc(bytes) (usqInt)malloc(bytes)\n#define ffiFree(pointer) free((void *)(pointer))\n#define isCalleePopsConvention(callType) (PLATFORM_API_USES_CALLEE_POPS_CONVENTION && (callType) == FFICallTypeApi)\n#define returnStructInRegisters(sz) (WIN32_X86_STRUCT_RETURN && (sz) <= 8 && !((sz)&((sz)-1)))\n\n\nstatic sqInt\natomicTypeOf(sqInt typeSpec)\n{\n\treturn ((usqInt) (typeSpec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\n}\n\n\n/*\tFree any temporary arg strings. */\n\nstatic void\ncleanupCalloutState(CalloutState *calloutState)\n{\n\twhile (((calloutState->stringArgIndex)) > 0) {\n\t\tfree(((calloutState->stringArgs))[(calloutState->stringArgIndex = ((calloutState->stringArgIndex)) - 1)]);\n\t}\n}\n\nstatic sqInt\nexternalFunctionHasStackSizeSlot(void)\n{\n\treturn externalFunctionInstSize > ExternalFunctionStackSizeIndex;\n}\n\n\n/*\treturn an int of the address of the byteSize slot (byte, short, int,\n\twhatever) at byteOffset in rcvr. Nominally intended for use with\n\tExternalAddress objects, this code will work (for obscure historical\n\treasons) with plain Byte or Word Arrays as well.\n */\n\nstatic sqInt\nffiAddressOfstartingAtsize(sqInt rcvr, sqInt byteOffset, sqInt byteSize)\n{\n    sqInt addr;\n    sqInt rcvrClass;\n    sqInt rcvrSize;\n\n\tif (!(interpreterProxy->isBytes(rcvr))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!(byteOffset > 0)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\trcvrClass = interpreterProxy->fetchClassOf(rcvr);\n\trcvrSize = interpreterProxy->byteSizeOf(rcvr);\n\tif (rcvrClass == (interpreterProxy->classExternalAddress())) {\n\t\tif (!(rcvrSize == 4)) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\n\t\t/* don't you dare to read from object memory! */\n\n\t\taddr = interpreterProxy->fetchPointerofObject(0, rcvr);\n\t\tif ((addr == 0)\n\t\t || (interpreterProxy->isInMemory(addr))) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\telse {\n\t\tif (!(((byteOffset + byteSize) - 1) <= rcvrSize)) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t\taddr = ((int) (interpreterProxy->firstIndexableField(rcvr)));\n\t}\n\taddr = (addr + byteOffset) - 1;\n\treturn addr;\n}\n\n\n/*\tSupport for generic callout. Prepare an argument by value for a callout. */\n\nstatic sqInt\nffiArgByValuein(sqInt oop, CalloutState *calloutState)\n{\n    sqInt atomicType;\n    double floatValue;\n    sqInt intValue;\n    sqInt oopClass;\n    sqInt oopClass1;\n    sqInt typeSpec;\n\n\t/* begin atomicTypeOf: */\n\ttypeSpec = (calloutState->ffiArgHeader);\n\tatomicType = ((usqInt) (typeSpec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\n\tif ((atomicType < 0)\n\t || (atomicType > FFITypeDoubleFloat)) {\n\t\treturn FFIErrorBadAtomicType;\n\t}\n\tif (atomicType < FFITypeSingleFloat) {\n\t\tif ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSignedLongLong) >> 1)) {\n\n\t\t\t/* integer types */\n\t\t\t/* ffi support code must coerce longlong */\n\n\t\t\tintValue = oop;\n\t\t}\n\t\telse {\n\t\t\t/* begin ffiIntegerValueOf: */\n\t\t\tif ((oop & 1)) {\n\t\t\t\tintValue = (oop >> 1);\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t\tif (oop == (interpreterProxy->nilObject())) {\n\t\t\t\tintValue = 0;\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t\tif (oop == (interpreterProxy->falseObject())) {\n\t\t\t\tintValue = 0;\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t\tif (oop == (interpreterProxy->trueObject())) {\n\t\t\t\tintValue = 1;\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t\toopClass = interpreterProxy->fetchClassOf(oop);\n\t\t\tif (oopClass == (interpreterProxy->classFloat())) {\n\t\t\t\tintValue = ((sqInt)(interpreterProxy->floatValueOf(oop)));\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t\tif (oopClass == (interpreterProxy->classCharacter())) {\n\t\t\t\tintValue = interpreterProxy->fetchIntegerofObject(0, oop);\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t\tif (oopClass == (interpreterProxy->classLargePositiveInteger())) {\n\t\t\t\tintValue = interpreterProxy->positive32BitValueOf(oop);\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t\tintValue = interpreterProxy->signed32BitValueOf(oop);\n\t\tl1:\t/* end ffiIntegerValueOf: */;\n\t\t}\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn FFIErrorCoercionFailed;\n\t\t}\n\t\t\n\t\tswitch (atomicType) {\n\t\tcase 0:\n\t\t\treturn FFIErrorAttemptToPassVoid;\n\t\tcase 1:\n\t\t\treturn ffiPushUnsignedIntin(intValue, calloutState);\n\t\tcase 2:\n\t\t\treturn ffiPushUnsignedBytein(intValue, calloutState);\n\t\tcase 3:\n\t\t\treturn ffiPushSignedBytein(intValue, calloutState);\n\t\tcase 4:\n\t\t\treturn ffiPushUnsignedShortin(intValue, calloutState);\n\t\tcase 5:\n\t\t\treturn ffiPushSignedShortin(intValue, calloutState);\n\t\tcase 6:\n\t\t\treturn ffiPushUnsignedIntin(intValue, calloutState);\n\t\tcase 7:\n\t\t\treturn ffiPushSignedIntin(intValue, calloutState);\n\t\tcase 8:\n\t\t\treturn ffiPushUnsignedLongLongOopin(intValue, calloutState);\n\t\tcase 9:\n\t\t\treturn ffiPushSignedLongLongOopin(intValue, calloutState);\n\t\tcase 10:\n\t\t\treturn ffiPushUnsignedCharin(intValue, calloutState);\n\t\tcase 11:\n\t\t\treturn ffiPushSignedCharin(intValue, calloutState);\n\n\t\tdefault:\n\t\t\terror(\"Case not found\");\n\t\t\treturn -1;\n\t\t}\n\t}\n\t/* begin ffiFloatValueOf: */\n\toopClass1 = interpreterProxy->fetchClassOf(oop);\n\tif (oopClass1 == (interpreterProxy->classFloat())) {\n\t\tfloatValue = interpreterProxy->floatValueOf(oop);\n\t\tgoto l2;\n\t}\n\tfloatValue = ((double) (ffiIntegerValueOf(oop)) );\nl2:\t/* end ffiFloatValueOf: */;\n\tif (interpreterProxy->failed()) {\n\t\treturn FFIErrorCoercionFailed;\n\t}\n\tif (atomicType == FFITypeSingleFloat) {\n\t\t/* begin ffiPushSingleFloat:in: */\n\t\tif ((((calloutState->currentArg)) + 4) > ((calloutState->limit))) {\n\t\t\treturn FFIErrorCallFrameTooBig;\n\t\t}\n\t\tstoreSingleFloatAtPointerfrom((calloutState->currentArg), floatValue);\n\t\t(calloutState->currentArg = ((calloutState->currentArg)) + 4);\n\t\treturn 0;\n\t}\n\telse {\n\t\t/* begin ffiPushDoubleFloat:in: */\n\t\tif ((((calloutState->currentArg)) + 8) > ((calloutState->limit))) {\n\t\t\treturn FFIErrorCallFrameTooBig;\n\t\t}\n\t\tstoreFloatAtPointerfrom((calloutState->currentArg), floatValue);\n\t\t(calloutState->currentArg = ((calloutState->currentArg)) + 8);\n\t\treturn 0;\n\t}\n}\n\n\n/*\tCallout support. Prepare the given oop as argument.\n\targSpec defines the compiled spec for the argument.\n\targClass (if non-nil) defines the required (super)class for the argument. */\n\nstatic sqInt\nffiArgumentSpecClassin(sqInt oop, sqInt argSpec, sqInt argClass, CalloutState *calloutState)\n{\n    sqInt *argSpec1;\n    sqInt *argSpec2;\n    sqInt argSpecSize;\n    sqInt argSpecSize1;\n    sqInt atomicType;\n    sqInt atomicType1;\n    sqInt atomicType2;\n    char *copy;\n    sqInt err;\n    double floatValue;\n    sqInt intValue;\n    sqInt isAlien;\n    sqInt isString;\n    sqInt isStruct;\n    sqInt length;\n    sqInt nilOop;\n    sqInt oopClass;\n    sqInt oopClass1;\n    sqInt oopClass2;\n    char *pointer;\n    void *pointer1;\n    void *pointer2;\n    void *pointer3;\n    sqInt ptrAddress;\n    sqInt ptrClass;\n    sqInt ptrType;\n    sqInt roundedSize;\n    sqInt roundedSize1;\n    sqInt spec;\n    sqInt specOop;\n    sqInt specType;\n    sqInt structSize;\n    sqInt structSize1;\n    sqInt typeSpec;\n    sqInt typeSpec1;\n    sqInt typeSpec2;\n    sqInt valueOop;\n    sqInt valueOop1;\n\n\n\t/* Prefetch class (we'll need it) */\n\n\toopClass = interpreterProxy->fetchClassOf(oop);\n\n\t/* Do the necessary type checks */\n\n\tnilOop = interpreterProxy->nilObject();\n\tif (!(argClass == nilOop)) {\n\t\tif (!(interpreterProxy->includesBehaviorThatOf(argClass, interpreterProxy->classExternalStructure()))) {\n\t\t\treturn FFIErrorWrongType;\n\t\t}\n\t\tif (!((nilOop == oop)\n\t\t\t || (interpreterProxy->includesBehaviorThatOf(oopClass, argClass)))) {\n\t\t\treturn FFIErrorCoercionFailed;\n\t\t}\n\t}\n\tisStruct = 0;\n\tif (!(((oop & 1))\n\t\t || (oop == nilOop))) {\n\t\tif (interpreterProxy->isPointers(oop)) {\n\n\t\t\t/* #isPointers: will fail if oop is SmallInteger so don't even attempt to use it */\n\n\t\t\tisStruct = interpreterProxy->includesBehaviorThatOf(oopClass, interpreterProxy->classExternalStructure());\n\t\t\tif (!((argClass == nilOop)\n\t\t\t\t || (isStruct))) {\n\t\t\t\treturn FFIErrorCoercionFailed;\n\t\t\t}\n\t\t}\n\t}\n\tif (isStruct) {\n\t\tvalueOop = interpreterProxy->fetchPointerofObject(0, oop);\n\t}\n\telse {\n\t\tvalueOop = oop;\n\t}\n\tif ((argSpec & 1)) {\n\t\treturn FFIErrorWrongType;\n\t}\n\tif (!(interpreterProxy->isWords(argSpec))) {\n\t\treturn FFIErrorWrongType;\n\t}\n\t(calloutState->ffiArgSpecSize = interpreterProxy->slotSizeOf(argSpec));\n\tif (((calloutState->ffiArgSpecSize)) == 0) {\n\t\treturn FFIErrorWrongType;\n\t}\n\t(calloutState->ffiArgSpec = interpreterProxy->firstIndexableField(argSpec));\n\t(calloutState->ffiArgHeader = longAt((calloutState->ffiArgSpec)));\n\tif (((calloutState->ffiArgHeader)) & FFIFlagStructure) {\n\t\tif (!(isStruct)) {\n\t\t\treturn FFIErrorCoercionFailed;\n\t\t}\n\t\tif (((calloutState->ffiArgHeader)) & FFIFlagAtomic) {\n\t\t\treturn FFIErrorWrongType;\n\t\t}\n\t\t/* begin ffiPushStructureContentsOf:in: */\n\t\tptrClass = interpreterProxy->fetchClassOf(valueOop);\n\t\tif (ptrClass == (interpreterProxy->classExternalAddress())) {\n\n\t\t\t/* ExternalAddress is bytes */\n\t\t\t/* There is no way we can make sure the structure is valid.\n\t\tBut we can at least check for attempts to pass pointers to ST memory. */\n\n\t\t\tptrAddress = interpreterProxy->fetchPointerofObject(0, valueOop);\n\t\t\tif (interpreterProxy->isInMemory(ptrAddress)) {\n\t\t\t\treturn FFIErrorInvalidPointer;\n\t\t\t}\n\t\t\t/* begin ffiPushStructure:ofSize:typeSpec:ofLength:in: */\n\t\t\tstructSize = ((calloutState->ffiArgHeader)) & FFIStructSizeMask;\n\t\t\targSpec2 = (calloutState->ffiArgSpec);\n\t\t\targSpecSize = (calloutState->ffiArgSpecSize);\n\t\t\troundedSize = (structSize + 3) & (~3);\n\t\t\tif ((((calloutState->currentArg)) + roundedSize) > ((calloutState->limit))) {\n\t\t\t\treturn FFIErrorCallFrameTooBig;\n\t\t\t}\n\t\t\tmemcpy((calloutState->currentArg), ((void *) ptrAddress), structSize);\n\t\t\t(calloutState->currentArg = ((calloutState->currentArg)) + roundedSize);\n\t\t\treturn 0;\n\t\t}\n\t\tif (ptrClass == (interpreterProxy->classByteArray())) {\n\t\t\tif (!((interpreterProxy->byteSizeOf(valueOop)) == (((calloutState->ffiArgHeader)) & FFIStructSizeMask))) {\n\t\t\t\treturn FFIErrorStructSize;\n\t\t\t}\n\t\t\tptrAddress = ((int) (interpreterProxy->firstIndexableField(valueOop)));\n\t\t\tif (!(((calloutState->ffiArgHeader)) & FFIFlagPointer)) {\n\t\t\t\t/* begin ffiPushStructure:ofSize:typeSpec:ofLength:in: */\n\t\t\t\tstructSize1 = ((calloutState->ffiArgHeader)) & FFIStructSizeMask;\n\t\t\t\targSpec1 = (calloutState->ffiArgSpec);\n\t\t\t\targSpecSize1 = (calloutState->ffiArgSpecSize);\n\t\t\t\troundedSize1 = (structSize1 + 3) & (~3);\n\t\t\t\tif ((((calloutState->currentArg)) + roundedSize1) > ((calloutState->limit))) {\n\t\t\t\t\treturn FFIErrorCallFrameTooBig;\n\t\t\t\t}\n\t\t\t\tmemcpy((calloutState->currentArg), ((void *) ptrAddress), structSize1);\n\t\t\t\t(calloutState->currentArg = ((calloutState->currentArg)) + roundedSize1);\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tif (!((((calloutState->ffiArgHeader)) & FFIStructSizeMask) == 4)) {\n\t\t\t\treturn FFIErrorStructSize;\n\t\t\t}\n\t\t\tptrAddress = interpreterProxy->fetchPointerofObject(0, valueOop);\n\t\t\tif (interpreterProxy->isInMemory(ptrAddress)) {\n\t\t\t\treturn FFIErrorInvalidPointer;\n\t\t\t}\n\t\t\t/* begin ffiPushPointer:in: */\n\t\t\tif ((((calloutState->currentArg)) + 4) > ((calloutState->limit))) {\n\t\t\t\treturn FFIErrorCallFrameTooBig;\n\t\t\t}\n\t\t\tlongAtput((calloutState->currentArg), ptrAddress);\n\t\t\t(calloutState->currentArg = ((calloutState->currentArg)) + 4);\n\t\t\treturn 0;\n\t\t}\n\t\treturn FFIErrorBadArg;\n\t}\n\tif (((calloutState->ffiArgHeader)) & FFIFlagPointer) {\n\t\tif ((oop & 1)) {\n\t\t\treturn FFIErrorIntAsPointer;\n\t\t}\n\t\tif (oop == (interpreterProxy->nilObject())) {\n\t\t\t/* begin ffiPushPointer:in: */\n\t\t\tif ((((calloutState->currentArg)) + 4) > ((calloutState->limit))) {\n\t\t\t\treturn FFIErrorCallFrameTooBig;\n\t\t\t}\n\t\t\tlongAtput((calloutState->currentArg), null);\n\t\t\t(calloutState->currentArg = ((calloutState->currentArg)) + 4);\n\t\t\treturn 0;\n\t\t}\n\t\tif (((calloutState->ffiArgHeader)) & FFIFlagAtomic) {\n\t\t\tif (isStruct) {\n\t\t\t\t/* begin ffiAtomicStructByReference:Class:in: */\n\t\t\t\tif (!(oopClass == (interpreterProxy->classExternalData()))) {\n\t\t\t\t\treturn FFIErrorCoercionFailed;\n\t\t\t\t}\n\t\t\t\t/* begin atomicTypeOf: */\n\t\t\t\ttypeSpec = (calloutState->ffiArgHeader);\n\t\t\t\tatomicType = ((usqInt) (typeSpec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\n\t\t\t\tif (atomicType != FFITypeVoid) {\n\t\t\t\t\t/* begin ffiValidateExternalData:AtomicType: */\n\t\t\t\t\tptrType = interpreterProxy->fetchPointerofObject(1, oop);\n\t\t\t\t\tif ((ptrType & 1)) {\n\t\t\t\t\t\terr = FFIErrorWrongType;\n\t\t\t\t\t\tgoto l3;\n\t\t\t\t\t}\n\t\t\t\t\tif (!(interpreterProxy->isPointers(ptrType))) {\n\t\t\t\t\t\terr = FFIErrorWrongType;\n\t\t\t\t\t\tgoto l3;\n\t\t\t\t\t}\n\t\t\t\t\tif ((interpreterProxy->slotSizeOf(ptrType)) < 2) {\n\t\t\t\t\t\terr = FFIErrorWrongType;\n\t\t\t\t\t\tgoto l3;\n\t\t\t\t\t}\n\t\t\t\t\tspecOop = interpreterProxy->fetchPointerofObject(0, ptrType);\n\t\t\t\t\tif ((specOop & 1)) {\n\t\t\t\t\t\terr = FFIErrorWrongType;\n\t\t\t\t\t\tgoto l3;\n\t\t\t\t\t}\n\t\t\t\t\tif (!(interpreterProxy->isWords(specOop))) {\n\t\t\t\t\t\terr = FFIErrorWrongType;\n\t\t\t\t\t\tgoto l3;\n\t\t\t\t\t}\n\t\t\t\t\tif ((interpreterProxy->slotSizeOf(specOop)) == 0) {\n\t\t\t\t\t\terr = FFIErrorWrongType;\n\t\t\t\t\t\tgoto l3;\n\t\t\t\t\t}\n\t\t\t\t\tspec = interpreterProxy->fetchPointerofObject(0, specOop);\n\t\t\t\t\tif (!(spec & FFIFlagAtomic)) {\n\t\t\t\t\t\terr = FFIErrorWrongType;\n\t\t\t\t\t\tgoto l3;\n\t\t\t\t\t}\n\t\t\t\t\tspecType = ((usqInt) (spec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\n\t\t\t\t\tif (specType != atomicType) {\n\t\t\t\t\t\tif (!((atomicType > FFITypeBool)\n\t\t\t\t\t\t\t && (atomicType < FFITypeSingleFloat))) {\n\t\t\t\t\t\t\terr = FFIErrorCoercionFailed;\n\t\t\t\t\t\t\tgoto l3;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!((((usqInt) atomicType) >> 1) == (((usqInt) specType) >> 1))) {\n\t\t\t\t\t\t\terr = FFIErrorCoercionFailed;\n\t\t\t\t\t\t\tgoto l3;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\terr = 0;\n\t\t\t\tl3:\t/* end ffiValidateExternalData:AtomicType: */;\n\t\t\t\t\tif (err != 0) {\n\t\t\t\t\t\treturn err;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tvalueOop1 = interpreterProxy->fetchPointerofObject(0, oop);\n\t\t\t\treturn ffiPushPointerContentsOfin(valueOop1, calloutState);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t/* begin ffiAtomicArgByReference:Class:in: */\n\t\t\t\t/* begin atomicTypeOf: */\n\t\t\t\ttypeSpec2 = (calloutState->ffiArgHeader);\n\t\t\t\tatomicType2 = ((usqInt) (typeSpec2 & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\n\t\t\t\tif (atomicType2 == FFITypeBool) {\n\t\t\t\t\treturn FFIErrorCoercionFailed;\n\t\t\t\t}\n\t\t\t\tisAlien = ((isString = interpreterProxy->includesBehaviorThatOf(oopClass, interpreterProxy->classString()))\n\t\t\t\t\t? 0\n\t\t\t\t\t: interpreterProxy->includesBehaviorThatOf(oopClass, interpreterProxy->classAlien()));\n\t\t\t\tif ((((usqInt) atomicType2) >> 1) == (((usqInt) FFITypeSignedChar) >> 1)) {\n\t\t\t\t\tif (isString) {\n\t\t\t\t\t\t/* begin ffiPushString:OfLength:in: */\n\t\t\t\t\t\tpointer = interpreterProxy->firstIndexableField(oop);\n\t\t\t\t\t\tlength = interpreterProxy->byteSizeOf(oop);\n\t\t\t\t\t\tif (((calloutState->stringArgIndex)) >= MaxNumArgs) {\n\t\t\t\t\t\t\treturn -PrimErrBadNumArgs;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcopy = malloc(length + 1);\n\t\t\t\t\t\tif (copy == null) {\n\t\t\t\t\t\t\treturn -PrimErrNoCMemory;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmemcpy(copy, pointer, length);\n\t\t\t\t\t\tcopy[length] = 0;\n\t\t\t\t\t\t((calloutState->stringArgs))[(calloutState->stringArgIndex)] = copy;\n\t\t\t\t\t\t(calloutState->stringArgIndex = ((calloutState->stringArgIndex)) + 1);\n\t\t\t\t\t\t/* begin ffiPushPointer:in: */\n\t\t\t\t\t\tif ((((calloutState->currentArg)) + 4) > ((calloutState->limit))) {\n\t\t\t\t\t\t\treturn FFIErrorCallFrameTooBig;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlongAtput((calloutState->currentArg), copy);\n\t\t\t\t\t\t(calloutState->currentArg = ((calloutState->currentArg)) + 4);\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t\tatomicType2 = FFITypeUnsignedByte;\n\t\t\t\t}\n\t\t\t\tif ((atomicType2 == FFITypeVoid)\n\t\t\t\t || ((((usqInt) atomicType2) >> 1) == (((usqInt) FFITypeSignedByte) >> 1))) {\n\t\t\t\t\tif (isString\n\t\t\t\t\t || (oopClass == (interpreterProxy->classByteArray()))) {\n\t\t\t\t\t\t/* begin ffiPushPointer:in: */\n\t\t\t\t\t\tpointer1 = interpreterProxy->firstIndexableField(oop);\n\t\t\t\t\t\tif ((((calloutState->currentArg)) + 4) > ((calloutState->limit))) {\n\t\t\t\t\t\t\treturn FFIErrorCallFrameTooBig;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlongAtput((calloutState->currentArg), pointer1);\n\t\t\t\t\t\t(calloutState->currentArg = ((calloutState->currentArg)) + 4);\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t\tif (isAlien) {\n\t\t\t\t\t\t/* begin ffiPushPointer:in: */\n\t\t\t\t\t\tpointer2 = pointerForIndex_xxx_dmu(((longAt(oop + BaseHeaderSize)) > 0\n\t\t\t\t\t\t\t? (oop + BaseHeaderSize) + BytesPerOop\n\t\t\t\t\t\t\t: longAt((oop + BaseHeaderSize) + BytesPerOop)));\n\t\t\t\t\t\tif ((((calloutState->currentArg)) + 4) > ((calloutState->limit))) {\n\t\t\t\t\t\t\treturn FFIErrorCallFrameTooBig;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlongAtput((calloutState->currentArg), pointer2);\n\t\t\t\t\t\t(calloutState->currentArg = ((calloutState->currentArg)) + 4);\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t\tif (!(atomicType2 == FFITypeVoid)) {\n\t\t\t\t\t\treturn FFIErrorCoercionFailed;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ((atomicType2 <= FFITypeSignedInt)\n\t\t\t\t || (atomicType2 == FFITypeSingleFloat)) {\n\t\t\t\t\tif (interpreterProxy->isWords(oop)) {\n\t\t\t\t\t\t/* begin ffiPushPointer:in: */\n\t\t\t\t\t\tpointer3 = interpreterProxy->firstIndexableField(oop);\n\t\t\t\t\t\tif ((((calloutState->currentArg)) + 4) > ((calloutState->limit))) {\n\t\t\t\t\t\t\treturn FFIErrorCallFrameTooBig;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlongAtput((calloutState->currentArg), pointer3);\n\t\t\t\t\t\t(calloutState->currentArg = ((calloutState->currentArg)) + 4);\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn FFIErrorCoercionFailed;\n\t\t\t}\n\t\t}\n\t\tif (!(isStruct)) {\n\t\t\treturn FFIErrorCoercionFailed;\n\t\t}\n\t\treturn ffiPushPointerContentsOfin(valueOop, calloutState);\n\t}\n\tif (((calloutState->ffiArgHeader)) & FFIFlagAtomic) {\n\t\t/* begin ffiArgByValue:in: */\n\t\t/* begin atomicTypeOf: */\n\t\ttypeSpec1 = (calloutState->ffiArgHeader);\n\t\tatomicType1 = ((usqInt) (typeSpec1 & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\n\t\tif ((atomicType1 < 0)\n\t\t || (atomicType1 > FFITypeDoubleFloat)) {\n\t\t\treturn FFIErrorBadAtomicType;\n\t\t}\n\t\tif (atomicType1 < FFITypeSingleFloat) {\n\t\t\tif ((((usqInt) atomicType1) >> 1) == (((usqInt) FFITypeSignedLongLong) >> 1)) {\n\n\t\t\t\t/* integer types */\n\t\t\t\t/* ffi support code must coerce longlong */\n\n\t\t\t\tintValue = valueOop;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t/* begin ffiIntegerValueOf: */\n\t\t\t\tif ((valueOop & 1)) {\n\t\t\t\t\tintValue = (valueOop >> 1);\n\t\t\t\t\tgoto l1;\n\t\t\t\t}\n\t\t\t\tif (valueOop == (interpreterProxy->nilObject())) {\n\t\t\t\t\tintValue = 0;\n\t\t\t\t\tgoto l1;\n\t\t\t\t}\n\t\t\t\tif (valueOop == (interpreterProxy->falseObject())) {\n\t\t\t\t\tintValue = 0;\n\t\t\t\t\tgoto l1;\n\t\t\t\t}\n\t\t\t\tif (valueOop == (interpreterProxy->trueObject())) {\n\t\t\t\t\tintValue = 1;\n\t\t\t\t\tgoto l1;\n\t\t\t\t}\n\t\t\t\toopClass2 = interpreterProxy->fetchClassOf(valueOop);\n\t\t\t\tif (oopClass2 == (interpreterProxy->classFloat())) {\n\t\t\t\t\tintValue = ((sqInt)(interpreterProxy->floatValueOf(valueOop)));\n\t\t\t\t\tgoto l1;\n\t\t\t\t}\n\t\t\t\tif (oopClass2 == (interpreterProxy->classCharacter())) {\n\t\t\t\t\tintValue = interpreterProxy->fetchIntegerofObject(0, valueOop);\n\t\t\t\t\tgoto l1;\n\t\t\t\t}\n\t\t\t\tif (oopClass2 == (interpreterProxy->classLargePositiveInteger())) {\n\t\t\t\t\tintValue = interpreterProxy->positive32BitValueOf(valueOop);\n\t\t\t\t\tgoto l1;\n\t\t\t\t}\n\t\t\t\tintValue = interpreterProxy->signed32BitValueOf(valueOop);\n\t\t\tl1:\t/* end ffiIntegerValueOf: */;\n\t\t\t}\n\t\t\tif (interpreterProxy->failed()) {\n\t\t\t\treturn FFIErrorCoercionFailed;\n\t\t\t}\n\t\t\t\n\t\t\tswitch (atomicType1) {\n\t\t\tcase 0:\n\t\t\t\treturn FFIErrorAttemptToPassVoid;\n\t\t\tcase 1:\n\t\t\t\treturn ffiPushUnsignedIntin(intValue, calloutState);\n\t\t\tcase 2:\n\t\t\t\treturn ffiPushUnsignedBytein(intValue, calloutState);\n\t\t\tcase 3:\n\t\t\t\treturn ffiPushSignedBytein(intValue, calloutState);\n\t\t\tcase 4:\n\t\t\t\treturn ffiPushUnsignedShortin(intValue, calloutState);\n\t\t\tcase 5:\n\t\t\t\treturn ffiPushSignedShortin(intValue, calloutState);\n\t\t\tcase 6:\n\t\t\t\treturn ffiPushUnsignedIntin(intValue, calloutState);\n\t\t\tcase 7:\n\t\t\t\treturn ffiPushSignedIntin(intValue, calloutState);\n\t\t\tcase 8:\n\t\t\t\treturn ffiPushUnsignedLongLongOopin(intValue, calloutState);\n\t\t\tcase 9:\n\t\t\t\treturn ffiPushSignedLongLongOopin(intValue, calloutState);\n\t\t\tcase 10:\n\t\t\t\treturn ffiPushUnsignedCharin(intValue, calloutState);\n\t\t\tcase 11:\n\t\t\t\treturn ffiPushSignedCharin(intValue, calloutState);\n\n\t\t\tdefault:\n\t\t\t\terror(\"Case not found\");\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t\t/* begin ffiFloatValueOf: */\n\t\toopClass1 = interpreterProxy->fetchClassOf(valueOop);\n\t\tif (oopClass1 == (interpreterProxy->classFloat())) {\n\t\t\tfloatValue = interpreterProxy->floatValueOf(valueOop);\n\t\t\tgoto l2;\n\t\t}\n\t\tfloatValue = ((double) (ffiIntegerValueOf(valueOop)) );\n\tl2:\t/* end ffiFloatValueOf: */;\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn FFIErrorCoercionFailed;\n\t\t}\n\t\tif (atomicType1 == FFITypeSingleFloat) {\n\t\t\t/* begin ffiPushSingleFloat:in: */\n\t\t\tif ((((calloutState->currentArg)) + 4) > ((calloutState->limit))) {\n\t\t\t\treturn FFIErrorCallFrameTooBig;\n\t\t\t}\n\t\t\tstoreSingleFloatAtPointerfrom((calloutState->currentArg), floatValue);\n\t\t\t(calloutState->currentArg = ((calloutState->currentArg)) + 4);\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\t/* begin ffiPushDoubleFloat:in: */\n\t\t\tif ((((calloutState->currentArg)) + 8) > ((calloutState->limit))) {\n\t\t\t\treturn FFIErrorCallFrameTooBig;\n\t\t\t}\n\t\t\tstoreFloatAtPointerfrom((calloutState->currentArg), floatValue);\n\t\t\t(calloutState->currentArg = ((calloutState->currentArg)) + 8);\n\t\t\treturn 0;\n\t\t}\n\t}\n\treturn FFIErrorWrongType;\n}\n\n\n/*\tSupport for generic callout. Prepare a pointer reference to an atomic type\n\tfor callout.\n\tNote: for type 'void*' we allow ByteArray/String/Symbol,\n\twordVariableSubclass or Alien.\n */\n\nstatic sqInt\nffiAtomicArgByReferenceClassin(sqInt oop, sqInt oopClass, CalloutState *calloutState)\n{\n    sqInt atomicType;\n    char *copy;\n    sqInt isAlien;\n    sqInt isString;\n    sqInt length;\n    char *pointer;\n    void *pointer1;\n    void *pointer2;\n    void *pointer3;\n    sqInt typeSpec;\n\n\t/* begin atomicTypeOf: */\n\ttypeSpec = (calloutState->ffiArgHeader);\n\tatomicType = ((usqInt) (typeSpec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\n\tif (atomicType == FFITypeBool) {\n\t\treturn FFIErrorCoercionFailed;\n\t}\n\tisAlien = ((isString = interpreterProxy->includesBehaviorThatOf(oopClass, interpreterProxy->classString()))\n\t\t? 0\n\t\t: interpreterProxy->includesBehaviorThatOf(oopClass, interpreterProxy->classAlien()));\n\tif ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSignedChar) >> 1)) {\n\t\tif (isString) {\n\t\t\t/* begin ffiPushString:OfLength:in: */\n\t\t\tpointer = interpreterProxy->firstIndexableField(oop);\n\t\t\tlength = interpreterProxy->byteSizeOf(oop);\n\t\t\tif (((calloutState->stringArgIndex)) >= MaxNumArgs) {\n\t\t\t\treturn -PrimErrBadNumArgs;\n\t\t\t}\n\t\t\tcopy = malloc(length + 1);\n\t\t\tif (copy == null) {\n\t\t\t\treturn -PrimErrNoCMemory;\n\t\t\t}\n\t\t\tmemcpy(copy, pointer, length);\n\t\t\tcopy[length] = 0;\n\t\t\t((calloutState->stringArgs))[(calloutState->stringArgIndex)] = copy;\n\t\t\t(calloutState->stringArgIndex = ((calloutState->stringArgIndex)) + 1);\n\t\t\t/* begin ffiPushPointer:in: */\n\t\t\tif ((((calloutState->currentArg)) + 4) > ((calloutState->limit))) {\n\t\t\t\treturn FFIErrorCallFrameTooBig;\n\t\t\t}\n\t\t\tlongAtput((calloutState->currentArg), copy);\n\t\t\t(calloutState->currentArg = ((calloutState->currentArg)) + 4);\n\t\t\treturn 0;\n\t\t}\n\t\tatomicType = FFITypeUnsignedByte;\n\t}\n\tif ((atomicType == FFITypeVoid)\n\t || ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSignedByte) >> 1))) {\n\t\tif (isString\n\t\t || (oopClass == (interpreterProxy->classByteArray()))) {\n\t\t\t/* begin ffiPushPointer:in: */\n\t\t\tpointer1 = interpreterProxy->firstIndexableField(oop);\n\t\t\tif ((((calloutState->currentArg)) + 4) > ((calloutState->limit))) {\n\t\t\t\treturn FFIErrorCallFrameTooBig;\n\t\t\t}\n\t\t\tlongAtput((calloutState->currentArg), pointer1);\n\t\t\t(calloutState->currentArg = ((calloutState->currentArg)) + 4);\n\t\t\treturn 0;\n\t\t}\n\t\tif (isAlien) {\n\t\t\t/* begin ffiPushPointer:in: */\n\t\t\tpointer2 = pointerForIndex_xxx_dmu(((longAt(oop + BaseHeaderSize)) > 0\n\t\t\t\t? (oop + BaseHeaderSize) + BytesPerOop\n\t\t\t\t: longAt((oop + BaseHeaderSize) + BytesPerOop)));\n\t\t\tif ((((calloutState->currentArg)) + 4) > ((calloutState->limit))) {\n\t\t\t\treturn FFIErrorCallFrameTooBig;\n\t\t\t}\n\t\t\tlongAtput((calloutState->currentArg), pointer2);\n\t\t\t(calloutState->currentArg = ((calloutState->currentArg)) + 4);\n\t\t\treturn 0;\n\t\t}\n\t\tif (!(atomicType == FFITypeVoid)) {\n\t\t\treturn FFIErrorCoercionFailed;\n\t\t}\n\t}\n\tif ((atomicType <= FFITypeSignedInt)\n\t || (atomicType == FFITypeSingleFloat)) {\n\t\tif (interpreterProxy->isWords(oop)) {\n\t\t\t/* begin ffiPushPointer:in: */\n\t\t\tpointer3 = interpreterProxy->firstIndexableField(oop);\n\t\t\tif ((((calloutState->currentArg)) + 4) > ((calloutState->limit))) {\n\t\t\t\treturn FFIErrorCallFrameTooBig;\n\t\t\t}\n\t\t\tlongAtput((calloutState->currentArg), pointer3);\n\t\t\t(calloutState->currentArg = ((calloutState->currentArg)) + 4);\n\t\t\treturn 0;\n\t\t}\n\t}\n\treturn FFIErrorCoercionFailed;\n}\n\n\n/*\tSupport for generic callout. Prepare an external pointer reference to an\n\tatomic type for callout.\n */\n\nstatic sqInt\nffiAtomicStructByReferenceClassin(sqInt oop, sqInt oopClass, CalloutState *calloutState)\n{\n    sqInt atomicType;\n    sqInt err;\n    sqInt ptrType;\n    sqInt spec;\n    sqInt specOop;\n    sqInt specType;\n    sqInt typeSpec;\n    sqInt valueOop;\n\n\tif (!(oopClass == (interpreterProxy->classExternalData()))) {\n\t\treturn FFIErrorCoercionFailed;\n\t}\n\t/* begin atomicTypeOf: */\n\ttypeSpec = (calloutState->ffiArgHeader);\n\tatomicType = ((usqInt) (typeSpec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\n\tif (atomicType != FFITypeVoid) {\n\t\t/* begin ffiValidateExternalData:AtomicType: */\n\t\tptrType = interpreterProxy->fetchPointerofObject(1, oop);\n\t\tif ((ptrType & 1)) {\n\t\t\terr = FFIErrorWrongType;\n\t\t\tgoto l1;\n\t\t}\n\t\tif (!(interpreterProxy->isPointers(ptrType))) {\n\t\t\terr = FFIErrorWrongType;\n\t\t\tgoto l1;\n\t\t}\n\t\tif ((interpreterProxy->slotSizeOf(ptrType)) < 2) {\n\t\t\terr = FFIErrorWrongType;\n\t\t\tgoto l1;\n\t\t}\n\t\tspecOop = interpreterProxy->fetchPointerofObject(0, ptrType);\n\t\tif ((specOop & 1)) {\n\t\t\terr = FFIErrorWrongType;\n\t\t\tgoto l1;\n\t\t}\n\t\tif (!(interpreterProxy->isWords(specOop))) {\n\t\t\terr = FFIErrorWrongType;\n\t\t\tgoto l1;\n\t\t}\n\t\tif ((interpreterProxy->slotSizeOf(specOop)) == 0) {\n\t\t\terr = FFIErrorWrongType;\n\t\t\tgoto l1;\n\t\t}\n\t\tspec = interpreterProxy->fetchPointerofObject(0, specOop);\n\t\tif (!(spec & FFIFlagAtomic)) {\n\t\t\terr = FFIErrorWrongType;\n\t\t\tgoto l1;\n\t\t}\n\t\tspecType = ((usqInt) (spec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\n\t\tif (specType != atomicType) {\n\t\t\tif (!((atomicType > FFITypeBool)\n\t\t\t\t && (atomicType < FFITypeSingleFloat))) {\n\t\t\t\terr = FFIErrorCoercionFailed;\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t\tif (!((((usqInt) atomicType) >> 1) == (((usqInt) specType) >> 1))) {\n\t\t\t\terr = FFIErrorCoercionFailed;\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t}\n\t\terr = 0;\n\tl1:\t/* end ffiValidateExternalData:AtomicType: */;\n\t\tif (err != 0) {\n\t\t\treturn err;\n\t\t}\n\t}\n\tvalueOop = interpreterProxy->fetchPointerofObject(0, oop);\n\treturn ffiPushPointerContentsOfin(valueOop, calloutState);\n}\n\n\n/*\tGo out, call this guy and create the return value. This *must* be inlined\n\tbecause of\n\tthe alloca of the outgoing stack frame in\n\tffiCall:WithFlags:NumArgs:Args:AndTypes: \n */\n\nstatic sqInt\nffiCalloutToSpecOnStackin(void *procAddr, sqInt specOnStack, CalloutState *calloutState)\n{\n    sqInt argTypes;\n    sqInt argTypes1;\n    sqInt atomicType;\n    sqInt atomicType1;\n    sqInt classOop;\n    char *cString;\n    sqInt ffiRetType;\n    double floatRet;\n    sqInt i;\n    usqLong intRet;\n    sqInt oop;\n    sqInt oop1;\n    sqInt *ptr;\n    sqInt retClass;\n    sqInt retClass1;\n    sqInt retOop;\n    sqInt retOop1;\n    sqInt retType;\n    sqInt specLiteral;\n    sqInt specLiteral1;\n    sqInt strLen;\n    sqInt strOop;\n    char *strPtr;\n    sqInt typeSpec;\n    sqInt typeSpec1;\n\n\tif ((0 + (cStackAlignment())) > 0) {\n\t\tsetsp((calloutState->argVector));\n\t}\n\t/* begin atomicTypeOf: */\n\ttypeSpec = (calloutState->ffiRetHeader);\n\tatomicType = ((usqInt) (typeSpec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\n\tif ((atomicType == FFITypeSingleFloat)\n\t || (atomicType == FFITypeDoubleFloat)) {\n\t\tfloatRet = dispatchFunctionPointer(((double (*)()) procAddr));\n\t}\n\telse {\n\t\tintRet = dispatchFunctionPointer(((usqLong (*)()) procAddr));\n\t}\n\tif (isCalleePopsConvention((calloutState->callFlags))) {\n\t\tsetsp((calloutState->argVector));\n\t}\n\tif (((calloutState->ffiRetHeader)) & FFIFlagPointer) {\n\t\t/* begin ffiReturnPointer:ofType:in: */\n\t\t/* begin ffiReturnType: */\n\t\tspecLiteral1 = (specOnStack\n\t\t\t? interpreterProxy->stackValue(1)\n\t\t\t: interpreterProxy->literalofMethod(0, interpreterProxy->primitiveMethod()));\n\t\targTypes1 = interpreterProxy->fetchPointerofObject(ExternalFunctionArgTypesIndex, specLiteral1);\n\t\tretType = interpreterProxy->fetchPointerofObject(0, argTypes1);\n\t\tretClass1 = interpreterProxy->fetchPointerofObject(1, retType);\n\t\tif (retClass1 == (interpreterProxy->nilObject())) {\n\t\t\t/* begin atomicTypeOf: */\n\t\t\ttypeSpec1 = (calloutState->ffiRetHeader);\n\t\t\tatomicType1 = ((usqInt) (typeSpec1 & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\n\t\t\tif ((((usqInt) atomicType1) >> 1) == (((usqInt) FFITypeSignedChar) >> 1)) {\n\t\t\t\t/* begin ffiReturnCStringFrom: */\n\t\t\t\tif ((((usqInt) intRet)) == null) {\n\t\t\t\t\treturn interpreterProxy->methodReturnValue(interpreterProxy->nilObject());\n\t\t\t\t}\n\t\t\t\tcString = ((char *) (((usqInt) intRet)));\n\t\t\t\tstrLen = 0;\n\t\t\t\twhile (!((cString[strLen]) == 0)) {\n\t\t\t\t\tstrLen += 1;\n\t\t\t\t}\n\t\t\t\tstrOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), strLen);\n\t\t\t\tstrPtr = interpreterProxy->firstIndexableField(strOop);\n\t\t\t\tfor (i = 0; i <= (strLen - 1); i += 1) {\n\t\t\t\t\tstrPtr[i] = (cString[i]);\n\t\t\t\t}\n\t\t\t\treturn interpreterProxy->methodReturnValue(strOop);\n\t\t\t}\n\t\t\tinterpreterProxy->pushRemappableOop(retType);\n\t\t\toop1 = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classExternalAddress(), 4);\n\t\t\tptr = interpreterProxy->firstIndexableField(oop1);\n\t\t\tptr[0] = (((sqInt) intRet));\n\t\t\tinterpreterProxy->pushRemappableOop(oop1);\n\t\t\tretOop1 = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classExternalData(), 0);\n\n\t\t\t/* external address */\n\n\t\t\toop1 = interpreterProxy->popRemappableOop();\n\t\t\tinterpreterProxy->storePointerofObjectwithValue(0, retOop1, oop1);\n\n\t\t\t/* return type */\n\n\t\t\toop1 = interpreterProxy->popRemappableOop();\n\t\t\tinterpreterProxy->storePointerofObjectwithValue(1, retOop1, oop1);\n\t\t\treturn interpreterProxy->methodReturnValue(retOop1);\n\t\t}\n\t\tinterpreterProxy->pushRemappableOop(retClass1);\n\t\tif (((calloutState->ffiRetHeader)) & FFIFlagStructure) {\n\t\t\tclassOop = interpreterProxy->classByteArray();\n\t\t}\n\t\telse {\n\t\t\tclassOop = interpreterProxy->classExternalAddress();\n\t\t}\n\t\toop1 = interpreterProxy->instantiateClassindexableSize(classOop, 4);\n\t\tptr = interpreterProxy->firstIndexableField(oop1);\n\t\tptr[0] = (((sqInt) intRet));\n\n\t\t/* return class */\n\n\t\tretClass1 = interpreterProxy->popRemappableOop();\n\t\tinterpreterProxy->pushRemappableOop(oop1);\n\t\tretOop1 = interpreterProxy->instantiateClassindexableSize(retClass1, 0);\n\n\t\t/* external address */\n\n\t\toop1 = interpreterProxy->popRemappableOop();\n\t\tinterpreterProxy->storePointerofObjectwithValue(0, retOop1, oop1);\n\t\treturn interpreterProxy->methodReturnValue(retOop1);\n\t}\n\tif (((calloutState->ffiRetHeader)) & FFIFlagStructure) {\n\t\t/* begin ffiReturnStruct:ofType:in: */\n\t\t/* begin ffiReturnType: */\n\t\tspecLiteral = (specOnStack\n\t\t\t? interpreterProxy->stackValue(1)\n\t\t\t: interpreterProxy->literalofMethod(0, interpreterProxy->primitiveMethod()));\n\t\targTypes = interpreterProxy->fetchPointerofObject(ExternalFunctionArgTypesIndex, specLiteral);\n\t\tffiRetType = interpreterProxy->fetchPointerofObject(0, argTypes);\n\t\tretClass = interpreterProxy->fetchPointerofObject(1, ffiRetType);\n\t\tretOop = interpreterProxy->instantiateClassindexableSize(retClass, 0);\n\t\tinterpreterProxy->pushRemappableOop(retOop);\n\t\toop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), (calloutState->structReturnSize));\n\t\tif (returnStructInRegisters((calloutState->structReturnSize))) {\n\t\t\tmemcpy(interpreterProxy->firstIndexableField(oop), (&intRet), (calloutState->structReturnSize));\n\t\t}\n\t\telse {\n\t\t\tmemcpy(interpreterProxy->firstIndexableField(oop), (calloutState->limit), (calloutState->structReturnSize));\n\t\t}\n\t\tretOop = interpreterProxy->popRemappableOop();\n\t\tinterpreterProxy->storePointerofObjectwithValue(0, retOop, oop);\n\t\treturn interpreterProxy->methodReturnValue(retOop);\n\t}\n\tif ((atomicType == FFITypeSingleFloat)\n\t || (atomicType == FFITypeDoubleFloat)) {\n\t\treturn interpreterProxy->methodReturnValue(interpreterProxy->floatObjectOf(floatRet));\n\t}\n\treturn interpreterProxy->methodReturnValue(ffiCreateIntegralResultOopofAtomicTypein(intRet, atomicType, calloutState));\n}\n\n\n/*\tGeneric callout. Does the actual work. If argArrayOrNil is nil it takes\n\targs from the stack\n\tand the spec from the method. If argArrayOrNil is not nil takes args from\n\targArrayOrNil and the spec from the receiver. */\n\nstatic sqInt\nffiCallArgArrayOrNilNumArgs(sqInt externalFunction, sqInt argArrayOrNil, sqInt nArgs)\n{\n    sqInt address;\n    sqInt address1;\n    sqInt addressPtr;\n    char *allocation;\n    sqInt argClass;\n    sqInt argSpec;\n    sqInt argType;\n    sqInt argTypeArray;\n    sqInt argTypes;\n    sqInt argTypes1;\n    sqInt atomicType;\n    sqInt atomicType1;\n    CalloutState *calloutState;\n    sqInt classOop;\n    char *cString;\n    sqInt err;\n    sqInt ffiRetType;\n    sqInt flags;\n    double floatRet;\n    sqInt functionName;\n    sqInt i;\n    sqInt i1;\n    usqLong intRet;\n    sqInt oop;\n    sqInt oop1;\n    sqInt oop2;\n    void *pointer;\n    int *ptr;\n    sqInt *ptr1;\n    sqInt requiredStackSize;\n    sqInt result;\n    sqInt retClass;\n    sqInt retClass1;\n    sqInt retOop;\n    sqInt retOop1;\n    sqInt retType;\n    sqInt specLiteral;\n    sqInt specLiteral1;\n    sqInt stackSize;\n    sqInt strLen;\n    sqInt strOop;\n    char *strPtr;\n    CalloutState theCalloutState;\n    sqInt typeSpec;\n    sqInt typeSpec1;\n\n\tif (!(interpreterProxy->isKindOfClass(externalFunction, interpreterProxy->classExternalFunction()))) {\n\t\treturn ffiFail(FFIErrorNotFunction);\n\t}\n\tflags = interpreterProxy->fetchIntegerofObject(ExternalFunctionFlagsIndex, externalFunction);\n\tif (interpreterProxy->failed()) {\n\t\treturn ffiFail(FFIErrorBadArgs);\n\t}\n\n\t/* must be array of arg types */\n\n\targTypeArray = interpreterProxy->fetchPointerofObject(ExternalFunctionArgTypesIndex, externalFunction);\n\tif (!((interpreterProxy->isArray(argTypeArray))\n\t\t && ((interpreterProxy->slotSizeOf(argTypeArray)) == (nArgs + 1)))) {\n\t\treturn ffiFail(FFIErrorBadArgs);\n\t}\n\tif (!(1)) {\n\t\treturn ffiFail(FFIErrorCallType);\n\t}\n\t/* begin ffiLoadCalloutAddress: */\n\n\t/* Lookup the address */\n\t/* Make sure it's an external handle */\n\n\taddressPtr = interpreterProxy->fetchPointerofObject(0, externalFunction);\n\t/* begin ffiContentsOfHandle:errCode: */\n\tif ((addressPtr & 1)) {\n\t\taddress1 = ffiFail(FFIErrorBadAddress);\n\t\tgoto l3;\n\t}\n\tif (!(interpreterProxy->isBytes(addressPtr))) {\n\t\taddress1 = ffiFail(FFIErrorBadAddress);\n\t\tgoto l3;\n\t}\n\tif (!((interpreterProxy->byteSizeOf(addressPtr)) == 4)) {\n\t\taddress1 = ffiFail(FFIErrorBadAddress);\n\t\tgoto l3;\n\t}\n\taddress1 = interpreterProxy->fetchPointerofObject(0, addressPtr);\nl3:\t/* end ffiContentsOfHandle:errCode: */;\n\tif (interpreterProxy->failed()) {\n\t\taddress = 0;\n\t\tgoto l4;\n\t}\n\tif (address1 == 0) {\n\t\tif (externalFunctionInstSize > ExternalFunctionStackSizeIndex) {\n\t\t\tinterpreterProxy->storePointerofObjectwithValue(ExternalFunctionStackSizeIndex, externalFunction, ((-1 << 1) | 1));\n\t\t}\n\t\tif ((interpreterProxy->slotSizeOf(externalFunction)) < 5) {\n\t\t\taddress = ffiFail(FFIErrorNoModule);\n\t\t\tgoto l4;\n\t\t}\n\t\taddress1 = ffiLoadCalloutAddressFrom(externalFunction);\n\t\tif (interpreterProxy->failed()) {\n\t\t\taddress = 0;\n\t\t\tgoto l4;\n\t\t}\n\t\tptr = interpreterProxy->firstIndexableField(addressPtr);\n\t\tptr[0] = address1;\n\t}\n\taddress = address1;\nl4:\t/* end ffiLoadCalloutAddress: */;\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\trequiredStackSize = (externalFunctionInstSize > ExternalFunctionStackSizeIndex\n\t\t? interpreterProxy->fetchIntegerofObject(ExternalFunctionStackSizeIndex, externalFunction)\n\t\t: -1);\n\tif (interpreterProxy->failed()) {\n\t\treturn interpreterProxy->primitiveFailFor((argArrayOrNil == null\n\t\t\t? PrimErrBadMethod\n\t\t\t: PrimErrBadReceiver));\n\t}\n\tstackSize = (requiredStackSize < 0\n\t\t? DefaultMaxStackSize\n\t\t: requiredStackSize);\n\tnull;\n\tcalloutState = (&theCalloutState);\n\t\tmemset(calloutState, 0, sizeof(CalloutState));\n;\n\t(calloutState->callFlags = flags);\n\targType = interpreterProxy->fetchPointerofObject(0, argTypeArray);\n\targSpec = interpreterProxy->fetchPointerofObject(0, argType);\n\targClass = interpreterProxy->fetchPointerofObject(1, argType);\n\tif (((err = ffiCheckReturnWithin(argSpec, argClass, calloutState))) != 0) {\n\t\treturn ffiFail(err);\n\t}\n\tallocation = alloca(((stackSize + ((calloutState->structReturnSize))) + 0) + (cStackAlignment()));\n\tif (allocaLiesSoUseGetsp()) {\n\t\tallocation = getsp();\n\t}\n\tif ((cStackAlignment()) != 0) {\n\t\tallocation = ((char *) ((((usqInt)allocation)) & (~((cStackAlignment()) - 1))));\n\t}\n\t(calloutState->argVector = allocation);\n\t(calloutState->currentArg = allocation + 0);\n\t(calloutState->limit = (allocation + stackSize) + 0);\n\tif ((((calloutState->structReturnSize)) > 0)\n\t && (1\n && (!(returnStructInRegisters((calloutState->structReturnSize)))))) {\n\t\t/* begin ffiPushPointer:in: */\n\t\tpointer = (calloutState->limit);\n\t\tif ((((calloutState->currentArg)) + 4) > ((calloutState->limit))) {\n\t\t\tgoto l1;\n\t\t}\n\t\tlongAtput((calloutState->currentArg), pointer);\n\t\t(calloutState->currentArg = ((calloutState->currentArg)) + 4);\n\tl1:\t/* end ffiPushPointer:in: */;\n\t}\n\tfor (i = 1; i <= nArgs; i += 1) {\n\t\targType = interpreterProxy->fetchPointerofObject(i, argTypeArray);\n\t\targSpec = interpreterProxy->fetchPointerofObject(0, argType);\n\t\targClass = interpreterProxy->fetchPointerofObject(1, argType);\n\t\toop = (argArrayOrNil == null\n\t\t\t? interpreterProxy->stackValue(nArgs - i)\n\t\t\t: interpreterProxy->fetchPointerofObject(i - 1, argArrayOrNil));\n\t\terr = ffiArgumentSpecClassin(oop, argSpec, argClass, calloutState);\n\t\tif (err != 0) {\n\t\t\t/* begin cleanupCalloutState: */\n\t\t\twhile (((calloutState->stringArgIndex)) > 0) {\n\t\t\t\tfree(((calloutState->stringArgs))[(calloutState->stringArgIndex = ((calloutState->stringArgIndex)) - 1)]);\n\t\t\t}\n\t\t\treturn ffiFail(err);\n\t\t}\n\t}\n\tassert(!(interpreterProxy->failed()));\n\t/* begin ffiLogCallout: */\n\tif (ffiLogEnabled) {\n\t\tfunctionName = interpreterProxy->fetchPointerofObject(externalFunctionInstSize, externalFunction);\n\t\tif (!(interpreterProxy->isBytes(functionName))) {\n\t\t\tgoto l2;\n\t\t}\n\t\tffiLogCallOfLength(interpreterProxy->firstIndexableField(functionName), interpreterProxy->byteSizeOf(functionName));\n\t}\nl2:\t/* end ffiLogCallout: */;\n\tif ((requiredStackSize < 0)\n\t && (externalFunctionInstSize > ExternalFunctionStackSizeIndex)) {\n\t\tstackSize = ((calloutState->currentArg)) - ((calloutState->argVector));\n\t\tinterpreterProxy->storeIntegerofObjectwithValue(ExternalFunctionStackSizeIndex, externalFunction, stackSize);\n\t}\n\t/* begin ffiCalloutTo:SpecOnStack:in: */\n\tif ((0 + (cStackAlignment())) > 0) {\n\t\tsetsp((calloutState->argVector));\n\t}\n\t/* begin atomicTypeOf: */\n\ttypeSpec = (calloutState->ffiRetHeader);\n\tatomicType = ((usqInt) (typeSpec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\n\tif ((atomicType == FFITypeSingleFloat)\n\t || (atomicType == FFITypeDoubleFloat)) {\n\t\tfloatRet = dispatchFunctionPointer(((double (*)()) address));\n\t}\n\telse {\n\t\tintRet = dispatchFunctionPointer(((usqLong (*)()) address));\n\t}\n\tif (isCalleePopsConvention((calloutState->callFlags))) {\n\t\tsetsp((calloutState->argVector));\n\t}\n\tif (((calloutState->ffiRetHeader)) & FFIFlagPointer) {\n\t\t/* begin ffiReturnPointer:ofType:in: */\n\t\t/* begin ffiReturnType: */\n\t\tspecLiteral1 = (argArrayOrNil != null\n\t\t\t? interpreterProxy->stackValue(1)\n\t\t\t: interpreterProxy->literalofMethod(0, interpreterProxy->primitiveMethod()));\n\t\targTypes1 = interpreterProxy->fetchPointerofObject(ExternalFunctionArgTypesIndex, specLiteral1);\n\t\tretType = interpreterProxy->fetchPointerofObject(0, argTypes1);\n\t\tretClass1 = interpreterProxy->fetchPointerofObject(1, retType);\n\t\tif (retClass1 == (interpreterProxy->nilObject())) {\n\t\t\t/* begin atomicTypeOf: */\n\t\t\ttypeSpec1 = (calloutState->ffiRetHeader);\n\t\t\tatomicType1 = ((usqInt) (typeSpec1 & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\n\t\t\tif ((((usqInt) atomicType1) >> 1) == (((usqInt) FFITypeSignedChar) >> 1)) {\n\t\t\t\t/* begin ffiReturnCStringFrom: */\n\t\t\t\tif ((((usqInt) intRet)) == null) {\n\t\t\t\t\tresult = interpreterProxy->methodReturnValue(interpreterProxy->nilObject());\n\t\t\t\t\tgoto l5;\n\t\t\t\t}\n\t\t\t\tcString = ((char *) (((usqInt) intRet)));\n\t\t\t\tstrLen = 0;\n\t\t\t\twhile (!((cString[strLen]) == 0)) {\n\t\t\t\t\tstrLen += 1;\n\t\t\t\t}\n\t\t\t\tstrOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), strLen);\n\t\t\t\tstrPtr = interpreterProxy->firstIndexableField(strOop);\n\t\t\t\tfor (i1 = 0; i1 <= (strLen - 1); i1 += 1) {\n\t\t\t\t\tstrPtr[i1] = (cString[i1]);\n\t\t\t\t}\n\t\t\t\tresult = interpreterProxy->methodReturnValue(strOop);\n\t\t\t\tgoto l5;\n\t\t\t}\n\t\t\tinterpreterProxy->pushRemappableOop(retType);\n\t\t\toop1 = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classExternalAddress(), 4);\n\t\t\tptr1 = interpreterProxy->firstIndexableField(oop1);\n\t\t\tptr1[0] = (((sqInt) intRet));\n\t\t\tinterpreterProxy->pushRemappableOop(oop1);\n\t\t\tretOop1 = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classExternalData(), 0);\n\n\t\t\t/* external address */\n\n\t\t\toop1 = interpreterProxy->popRemappableOop();\n\t\t\tinterpreterProxy->storePointerofObjectwithValue(0, retOop1, oop1);\n\n\t\t\t/* return type */\n\n\t\t\toop1 = interpreterProxy->popRemappableOop();\n\t\t\tinterpreterProxy->storePointerofObjectwithValue(1, retOop1, oop1);\n\t\t\tresult = interpreterProxy->methodReturnValue(retOop1);\n\t\t\tgoto l5;\n\t\t}\n\t\tinterpreterProxy->pushRemappableOop(retClass1);\n\t\tif (((calloutState->ffiRetHeader)) & FFIFlagStructure) {\n\t\t\tclassOop = interpreterProxy->classByteArray();\n\t\t}\n\t\telse {\n\t\t\tclassOop = interpreterProxy->classExternalAddress();\n\t\t}\n\t\toop1 = interpreterProxy->instantiateClassindexableSize(classOop, 4);\n\t\tptr1 = interpreterProxy->firstIndexableField(oop1);\n\t\tptr1[0] = (((sqInt) intRet));\n\n\t\t/* return class */\n\n\t\tretClass1 = interpreterProxy->popRemappableOop();\n\t\tinterpreterProxy->pushRemappableOop(oop1);\n\t\tretOop1 = interpreterProxy->instantiateClassindexableSize(retClass1, 0);\n\n\t\t/* external address */\n\n\t\toop1 = interpreterProxy->popRemappableOop();\n\t\tinterpreterProxy->storePointerofObjectwithValue(0, retOop1, oop1);\n\t\tresult = interpreterProxy->methodReturnValue(retOop1);\n\t\tgoto l5;\n\t}\n\tif (((calloutState->ffiRetHeader)) & FFIFlagStructure) {\n\t\t/* begin ffiReturnStruct:ofType:in: */\n\t\t/* begin ffiReturnType: */\n\t\tspecLiteral = (argArrayOrNil != null\n\t\t\t? interpreterProxy->stackValue(1)\n\t\t\t: interpreterProxy->literalofMethod(0, interpreterProxy->primitiveMethod()));\n\t\targTypes = interpreterProxy->fetchPointerofObject(ExternalFunctionArgTypesIndex, specLiteral);\n\t\tffiRetType = interpreterProxy->fetchPointerofObject(0, argTypes);\n\t\tretClass = interpreterProxy->fetchPointerofObject(1, ffiRetType);\n\t\tretOop = interpreterProxy->instantiateClassindexableSize(retClass, 0);\n\t\tinterpreterProxy->pushRemappableOop(retOop);\n\t\toop2 = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), (calloutState->structReturnSize));\n\t\tif (returnStructInRegisters((calloutState->structReturnSize))) {\n\t\t\tmemcpy(interpreterProxy->firstIndexableField(oop2), (&intRet), (calloutState->structReturnSize));\n\t\t}\n\t\telse {\n\t\t\tmemcpy(interpreterProxy->firstIndexableField(oop2), (calloutState->limit), (calloutState->structReturnSize));\n\t\t}\n\t\tretOop = interpreterProxy->popRemappableOop();\n\t\tinterpreterProxy->storePointerofObjectwithValue(0, retOop, oop2);\n\t\tresult = interpreterProxy->methodReturnValue(retOop);\n\t\tgoto l5;\n\t}\n\tif ((atomicType == FFITypeSingleFloat)\n\t || (atomicType == FFITypeDoubleFloat)) {\n\t\tresult = interpreterProxy->methodReturnValue(interpreterProxy->floatObjectOf(floatRet));\n\t\tgoto l5;\n\t}\n\tresult = interpreterProxy->methodReturnValue(ffiCreateIntegralResultOopofAtomicTypein(intRet, atomicType, calloutState));\nl5:\t/* end ffiCalloutTo:SpecOnStack:in: */;\n\t/* begin cleanupCalloutState: */\n\twhile (((calloutState->stringArgIndex)) > 0) {\n\t\tfree(((calloutState->stringArgs))[(calloutState->stringArgIndex = ((calloutState->stringArgIndex)) - 1)]);\n\t}\n\treturn result;\n}\n\n\n/*\tMake sure we can return an object of the given type */\n\nstatic sqInt\nffiCheckReturnWithin(sqInt retSpec, sqInt retClass, CalloutState *calloutState)\n{\n    sqInt ffiRetSpec;\n\n\tif (!(retClass == (interpreterProxy->nilObject()))) {\n\t\tif (!(interpreterProxy->includesBehaviorThatOf(retClass, interpreterProxy->classExternalStructure()))) {\n\t\t\treturn FFIErrorBadReturn;\n\t\t}\n\t}\n\tif (!(interpreterProxy->isWords(retSpec))) {\n\t\treturn FFIErrorWrongType;\n\t}\n\tif ((interpreterProxy->slotSizeOf(retSpec)) == 0) {\n\t\treturn FFIErrorWrongType;\n\t}\n\tffiRetSpec = ((int) (interpreterProxy->firstIndexableField(retSpec)));\n\t(calloutState->ffiRetHeader = longAt(ffiRetSpec));\n\tif (!(isAtomicType((calloutState->ffiRetHeader)))) {\n\t\tif (retClass == (interpreterProxy->nilObject())) {\n\t\t\treturn FFIErrorBadReturn;\n\t\t}\n\t}\n\tif ((((calloutState->ffiRetHeader)) & (FFIFlagPointer | FFIFlagStructure)) == FFIFlagStructure) {\n\t\t(calloutState->structReturnSize = ((calloutState->ffiRetHeader)) & FFIStructSizeMask);\n\t}\n\treturn 0;\n}\n\n\n/*\tMake sure that the given oop is a valid external handle */\n\nstatic sqInt\nffiContentsOfHandleerrCode(sqInt oop, sqInt errCode)\n{\n\tif ((oop & 1)) {\n\t\treturn ffiFail(errCode);\n\t}\n\tif (!(interpreterProxy->isBytes(oop))) {\n\t\treturn ffiFail(errCode);\n\t}\n\tif (!((interpreterProxy->byteSizeOf(oop)) == 4)) {\n\t\treturn ffiFail(errCode);\n\t}\n\treturn interpreterProxy->fetchPointerofObject(0, oop);\n}\n\n\n/*\tCallout support. Return the appropriate oop for the given atomic type */\n\nstatic sqInt\nffiCreateIntegralResultOopofAtomicTypein(usqLong retVal, sqInt atomicType, CalloutState *calloutState)\n{\n    sqInt byteSize;\n    sqInt mask;\n    sqInt shift;\n    sqInt value;\n\n\tassert(atomicType < FFITypeSingleFloat);\n\tif (atomicType == FFITypeBool) {\n\n\t\t/* Make sure bool honors the byte size requested */\n\n\t\tbyteSize = ((calloutState->ffiRetHeader)) & FFIStructSizeMask;\n\t\tvalue = (byteSize == 4\n\t\t\t? retVal\n\t\t\t: retVal & ((1 << (byteSize * 8)) - 1));\n\t\treturn (value == 0\n\t\t\t? interpreterProxy->falseObject()\n\t\t\t: interpreterProxy->trueObject());\n\t}\n\tif (atomicType <= FFITypeSignedInt) {\n\t\tif (atomicType <= FFITypeSignedShort) {\n\n\t\t\t/* these are all generall integer returns */\n\t\t\t/* byte/short. first extract partial word, then sign extend */\n\t\t\t/* # of significant bits */\n\n\t\t\tshift = (((usqInt) atomicType) >> 1) * 8;\n\t\t\tvalue = retVal & ((1 << shift) - 1);\n\t\t\tif (atomicType & 1) {\n\n\t\t\t\t/* make the guy signed */\n\n\t\t\t\tmask = 1 << (shift - 1);\n\t\t\t\tvalue = (value & (mask - 1)) - (value & mask);\n\t\t\t}\n\t\t\treturn ((value << 1) | 1);\n\t\t}\n\t\treturn (atomicType & 1\n\t\t\t? interpreterProxy->signed32BitIntegerFor(retVal)\n\t\t\t: interpreterProxy->positive32BitIntegerFor(retVal));\n\t}\n\tif ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSignedLongLong) >> 1)) {\n\t\treturn (atomicType & 1\n\t\t\t? interpreterProxy->signed64BitIntegerFor(retVal)\n\t\t\t: interpreterProxy->positive64BitIntegerFor(retVal));\n\t}\n\telse {\n\t\treturn interpreterProxy->fetchPointerofObject(retVal & 255, interpreterProxy->characterTable());\n\t}\n}\n\n\n/*\tMap the FFI error code into a primitive error code. If reason is negative\n\tit encodes one of the\n\tstandard PrimErr... codes, negated to distinguish it from the FFIError\n\tcodes. If it is an FFIError...\n\tcode then add the size of the primitive error table + 2 to disambiguate it\n\tfrom the PrimErr... codes.\n\tFor historic reasons the FFIError codes range from -1 on up hence adding\n\tsize + 2 maps them to\n\tsize of table + 1 on up. This OFFSET IS undone by ExternalFunction\n\tclass>>externalCallFailedWith:. Thus we can communicate back both\n\tPrimErr.. and FFIError codes. Complex but necessary. */\n\nstatic sqInt\nffiFail(sqInt reason)\n{\n\tffiLastError = reason;\n\treturn interpreterProxy->primitiveFailFor((reason >= FFINoCalloutAvailable\n\t\t? (reason + 2) + (interpreterProxy->slotSizeOf(interpreterProxy->primitiveErrorTable()))\n\t\t: -reason));\n}\n\n\n/*\tSupport for generic callout. Return a float value that is coerced as C\n\twould do.\n */\n\nstatic double\nffiFloatValueOf(sqInt oop)\n{\n    sqInt oopClass;\n\n\toopClass = interpreterProxy->fetchClassOf(oop);\n\tif (oopClass == (interpreterProxy->classFloat())) {\n\t\treturn interpreterProxy->floatValueOf(oop);\n\t}\n\treturn ((double) (ffiIntegerValueOf(oop)) );\n}\n\n\n/*\tSupport for generic callout. Return an integer value that is coerced as C\n\twould do.\n */\n\nstatic sqInt\nffiIntegerValueOf(sqInt oop)\n{\n    sqInt oopClass;\n\n\tif ((oop & 1)) {\n\t\treturn (oop >> 1);\n\t}\n\tif (oop == (interpreterProxy->nilObject())) {\n\t\treturn 0;\n\t}\n\tif (oop == (interpreterProxy->falseObject())) {\n\t\treturn 0;\n\t}\n\tif (oop == (interpreterProxy->trueObject())) {\n\t\treturn 1;\n\t}\n\toopClass = interpreterProxy->fetchClassOf(oop);\n\tif (oopClass == (interpreterProxy->classFloat())) {\n\t\treturn ((sqInt)(interpreterProxy->floatValueOf(oop)));\n\t}\n\tif (oopClass == (interpreterProxy->classCharacter())) {\n\t\treturn interpreterProxy->fetchIntegerofObject(0, oop);\n\t}\n\tif (oopClass == (interpreterProxy->classLargePositiveInteger())) {\n\t\treturn interpreterProxy->positive32BitValueOf(oop);\n\t}\n\treturn interpreterProxy->signed32BitValueOf(oop);\n}\n\n\n/*\tLoad the function address for a call out to an external function */\n\nstatic sqInt\nffiLoadCalloutAddressFrom(sqInt oop)\n{\n    sqInt address;\n    sqInt ffiModuleName;\n    sqInt functionLength;\n    sqInt functionName;\n    sqInt module;\n    sqInt moduleHandle;\n    sqInt moduleHandle1;\n    sqInt moduleHandlePtr;\n    sqInt moduleLength;\n    int *ptr;\n    sqInt rcvr;\n\n\n\t/* First find and load the module */\n\n\tmodule = interpreterProxy->fetchPointerofObject(externalFunctionInstSize + 1, oop);\n\t/* begin ffiLoadCalloutModule: */\n\tif (interpreterProxy->isBytes(module)) {\n\n\t\t/* plain module name */\n\n\t\tffiModuleName = module;\n\t\tmoduleLength = interpreterProxy->byteSizeOf(ffiModuleName);\n\t\tmoduleHandle1 = interpreterProxy->ioLoadModuleOfLength(((int) (interpreterProxy->firstIndexableField(ffiModuleName))), moduleLength);\n\t\tif ((interpreterProxy->failed())\n\t\t || (moduleHandle1 == 0)) {\n\t\t\tmoduleHandle = ffiFail(FFIErrorModuleNotFound);\n\t\t\tgoto l2;\n\t\t}\n\t\tmoduleHandle = moduleHandle1;\n\t\tgoto l2;\n\t}\n\trcvr = interpreterProxy->stackValue(interpreterProxy->methodArgumentCount());\n\tif (!(interpreterProxy->isKindOfClass(rcvr, interpreterProxy->classExternalLibrary()))) {\n\t\tmoduleHandle = ffiFail(FFIErrorNoModule);\n\t\tgoto l2;\n\t}\n\tmoduleHandlePtr = interpreterProxy->fetchPointerofObject(0, rcvr);\n\t/* begin ffiContentsOfHandle:errCode: */\n\tif ((moduleHandlePtr & 1)) {\n\t\tmoduleHandle1 = ffiFail(FFIErrorBadExternalLibrary);\n\t\tgoto l1;\n\t}\n\tif (!(interpreterProxy->isBytes(moduleHandlePtr))) {\n\t\tmoduleHandle1 = ffiFail(FFIErrorBadExternalLibrary);\n\t\tgoto l1;\n\t}\n\tif (!((interpreterProxy->byteSizeOf(moduleHandlePtr)) == 4)) {\n\t\tmoduleHandle1 = ffiFail(FFIErrorBadExternalLibrary);\n\t\tgoto l1;\n\t}\n\tmoduleHandle1 = interpreterProxy->fetchPointerofObject(0, moduleHandlePtr);\nl1:\t/* end ffiContentsOfHandle:errCode: */;\n\tif (interpreterProxy->failed()) {\n\t\tmoduleHandle = 0;\n\t\tgoto l2;\n\t}\n\tif (moduleHandle1 == 0) {\n\n\t\t/* need to reload module */\n\n\t\tffiModuleName = interpreterProxy->fetchPointerofObject(1, rcvr);\n\t\tif (!(interpreterProxy->isBytes(ffiModuleName))) {\n\t\t\tmoduleHandle = ffiFail(FFIErrorBadExternalLibrary);\n\t\t\tgoto l2;\n\t\t}\n\t\tmoduleLength = interpreterProxy->byteSizeOf(ffiModuleName);\n\t\tmoduleHandle1 = interpreterProxy->ioLoadModuleOfLength(((int) (interpreterProxy->firstIndexableField(ffiModuleName))), moduleLength);\n\t\tif ((interpreterProxy->failed())\n\t\t || (moduleHandle1 == 0)) {\n\t\t\tmoduleHandle = ffiFail(FFIErrorModuleNotFound);\n\t\t\tgoto l2;\n\t\t}\n\t\tptr = interpreterProxy->firstIndexableField(moduleHandlePtr);\n\t\tptr[0] = moduleHandle1;\n\t}\n\tmoduleHandle = moduleHandle1;\nl2:\t/* end ffiLoadCalloutModule: */;\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\tfunctionName = interpreterProxy->fetchPointerofObject(externalFunctionInstSize, oop);\n\tif (!(interpreterProxy->isBytes(functionName))) {\n\t\treturn ffiFail(FFIErrorBadExternalFunction);\n\t}\n\tfunctionLength = interpreterProxy->byteSizeOf(functionName);\n\taddress = interpreterProxy->ioLoadSymbolOfLengthFromModule(((int) (interpreterProxy->firstIndexableField(functionName))), functionLength, moduleHandle);\n\tif ((interpreterProxy->failed())\n\t || (address == 0)) {\n\t\treturn ffiFail(FFIErrorAddressNotFound);\n\t}\n\treturn address;\n}\n\n\n/*\tLoad the address of the foreign function from the given object */\n\nstatic sqInt\nffiLoadCalloutAddress(sqInt lit)\n{\n    sqInt address;\n    sqInt addressPtr;\n    int *ptr;\n\n\n\t/* Lookup the address */\n\t/* Make sure it's an external handle */\n\n\taddressPtr = interpreterProxy->fetchPointerofObject(0, lit);\n\t/* begin ffiContentsOfHandle:errCode: */\n\tif ((addressPtr & 1)) {\n\t\taddress = ffiFail(FFIErrorBadAddress);\n\t\tgoto l1;\n\t}\n\tif (!(interpreterProxy->isBytes(addressPtr))) {\n\t\taddress = ffiFail(FFIErrorBadAddress);\n\t\tgoto l1;\n\t}\n\tif (!((interpreterProxy->byteSizeOf(addressPtr)) == 4)) {\n\t\taddress = ffiFail(FFIErrorBadAddress);\n\t\tgoto l1;\n\t}\n\taddress = interpreterProxy->fetchPointerofObject(0, addressPtr);\nl1:\t/* end ffiContentsOfHandle:errCode: */;\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\tif (address == 0) {\n\t\tif (externalFunctionInstSize > ExternalFunctionStackSizeIndex) {\n\t\t\tinterpreterProxy->storePointerofObjectwithValue(ExternalFunctionStackSizeIndex, lit, ((-1 << 1) | 1));\n\t\t}\n\t\tif ((interpreterProxy->slotSizeOf(lit)) < 5) {\n\t\t\treturn ffiFail(FFIErrorNoModule);\n\t\t}\n\t\taddress = ffiLoadCalloutAddressFrom(lit);\n\t\tif (interpreterProxy->failed()) {\n\t\t\treturn 0;\n\t\t}\n\t\tptr = interpreterProxy->firstIndexableField(addressPtr);\n\t\tptr[0] = address;\n\t}\n\treturn address;\n}\n\n\n/*\tLoad the given module and return its handle */\n\nstatic sqInt\nffiLoadCalloutModule(sqInt module)\n{\n    sqInt ffiModuleName;\n    sqInt moduleHandle;\n    sqInt moduleHandlePtr;\n    sqInt moduleLength;\n    int *ptr;\n    sqInt rcvr;\n\n\tif (interpreterProxy->isBytes(module)) {\n\n\t\t/* plain module name */\n\n\t\tffiModuleName = module;\n\t\tmoduleLength = interpreterProxy->byteSizeOf(ffiModuleName);\n\t\tmoduleHandle = interpreterProxy->ioLoadModuleOfLength(((int) (interpreterProxy->firstIndexableField(ffiModuleName))), moduleLength);\n\t\tif ((interpreterProxy->failed())\n\t\t || (moduleHandle == 0)) {\n\t\t\treturn ffiFail(FFIErrorModuleNotFound);\n\t\t}\n\t\treturn moduleHandle;\n\t}\n\trcvr = interpreterProxy->stackValue(interpreterProxy->methodArgumentCount());\n\tif (!(interpreterProxy->isKindOfClass(rcvr, interpreterProxy->classExternalLibrary()))) {\n\t\treturn ffiFail(FFIErrorNoModule);\n\t}\n\tmoduleHandlePtr = interpreterProxy->fetchPointerofObject(0, rcvr);\n\t/* begin ffiContentsOfHandle:errCode: */\n\tif ((moduleHandlePtr & 1)) {\n\t\tmoduleHandle = ffiFail(FFIErrorBadExternalLibrary);\n\t\tgoto l1;\n\t}\n\tif (!(interpreterProxy->isBytes(moduleHandlePtr))) {\n\t\tmoduleHandle = ffiFail(FFIErrorBadExternalLibrary);\n\t\tgoto l1;\n\t}\n\tif (!((interpreterProxy->byteSizeOf(moduleHandlePtr)) == 4)) {\n\t\tmoduleHandle = ffiFail(FFIErrorBadExternalLibrary);\n\t\tgoto l1;\n\t}\n\tmoduleHandle = interpreterProxy->fetchPointerofObject(0, moduleHandlePtr);\nl1:\t/* end ffiContentsOfHandle:errCode: */;\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\tif (moduleHandle == 0) {\n\n\t\t/* need to reload module */\n\n\t\tffiModuleName = interpreterProxy->fetchPointerofObject(1, rcvr);\n\t\tif (!(interpreterProxy->isBytes(ffiModuleName))) {\n\t\t\treturn ffiFail(FFIErrorBadExternalLibrary);\n\t\t}\n\t\tmoduleLength = interpreterProxy->byteSizeOf(ffiModuleName);\n\t\tmoduleHandle = interpreterProxy->ioLoadModuleOfLength(((int) (interpreterProxy->firstIndexableField(ffiModuleName))), moduleLength);\n\t\tif ((interpreterProxy->failed())\n\t\t || (moduleHandle == 0)) {\n\t\t\treturn ffiFail(FFIErrorModuleNotFound);\n\t\t}\n\t\tptr = interpreterProxy->firstIndexableField(moduleHandlePtr);\n\t\tptr[0] = moduleHandle;\n\t}\n\treturn moduleHandle;\n}\n\n\n/*\tfetch the function name */\n\nstatic void\nffiLogCallout(sqInt lit)\n{\n    sqInt functionName;\n\n\tif (ffiLogEnabled) {\n\t\tfunctionName = interpreterProxy->fetchPointerofObject(externalFunctionInstSize, lit);\n\t\tif (!(interpreterProxy->isBytes(functionName))) {\n\t\t\treturn;\n\t\t}\n\t\tffiLogCallOfLength(interpreterProxy->firstIndexableField(functionName), interpreterProxy->byteSizeOf(functionName));\n\t}\n}\n\n\n/*\tThis is a special entry point exposed such that client code can \n\tenable and disable logging of FFI calls. */\n\nEXPORT(sqInt)\nffiLogCallsTo(char*fileName)\n{\n    sqInt ok;\n\n\tif (fileName == null) {\n\n\t\t/* disable logging */\n\n\t\tok = ffiLogFileNameOfLength(null, 0);\n\t\tif (!(ok)) {\n\t\t\treturn 0;\n\t\t}\n\t\tffiLogEnabled = 0;\n\t}\n\telse {\n\n\t\t/* enable logging */\n\n\t\tok = ffiLogFileNameOfLength(fileName, strlen(fileName));\n\t\tif (!(ok)) {\n\t\t\treturn 0;\n\t\t}\n\t\tffiLogEnabled = 1;\n\t}\n\treturn 1;\n}\n\nstatic sqInt\nffiPushDoubleFloatin(double value, CalloutState *calloutState)\n{\n\tif ((((calloutState->currentArg)) + 8) > ((calloutState->limit))) {\n\t\treturn FFIErrorCallFrameTooBig;\n\t}\n\tstoreFloatAtPointerfrom((calloutState->currentArg), value);\n\t(calloutState->currentArg = ((calloutState->currentArg)) + 8);\n\treturn 0;\n}\n\n\n/*\tPush the contents of the given external structure */\n\nstatic sqInt\nffiPushPointerContentsOfin(sqInt oop, CalloutState *calloutState)\n{\n    sqInt ptrAddress;\n    sqInt ptrClass;\n\n\tptrClass = interpreterProxy->fetchClassOf(oop);\n\tif (ptrClass == (interpreterProxy->classExternalAddress())) {\n\n\t\t/* Don't you dare to pass pointers into object memory */\n\n\t\tptrAddress = interpreterProxy->fetchPointerofObject(0, oop);\n\t\tif (interpreterProxy->isInMemory(ptrAddress)) {\n\t\t\treturn FFIErrorInvalidPointer;\n\t\t}\n\t\t/* begin ffiPushPointer:in: */\n\t\tif ((((calloutState->currentArg)) + 4) > ((calloutState->limit))) {\n\t\t\treturn FFIErrorCallFrameTooBig;\n\t\t}\n\t\tlongAtput((calloutState->currentArg), ptrAddress);\n\t\t(calloutState->currentArg = ((calloutState->currentArg)) + 4);\n\t\treturn 0;\n\t}\n\tif (ptrClass == (interpreterProxy->classByteArray())) {\n\t\tptrAddress = ((int) (interpreterProxy->firstIndexableField(oop)));\n\t\t/* begin ffiPushPointer:in: */\n\t\tif ((((calloutState->currentArg)) + 4) > ((calloutState->limit))) {\n\t\t\treturn FFIErrorCallFrameTooBig;\n\t\t}\n\t\tlongAtput((calloutState->currentArg), ptrAddress);\n\t\t(calloutState->currentArg = ((calloutState->currentArg)) + 4);\n\t\treturn 0;\n\t}\n\tif (interpreterProxy->includesBehaviorThatOf(ptrClass, interpreterProxy->classAlien())) {\n\t\tptrAddress = ((longAt(oop + BaseHeaderSize)) > 0\n\t\t\t? (oop + BaseHeaderSize) + BytesPerOop\n\t\t\t: longAt((oop + BaseHeaderSize) + BytesPerOop));\n\t\t/* begin ffiPushPointer:in: */\n\t\tif ((((calloutState->currentArg)) + 4) > ((calloutState->limit))) {\n\t\t\treturn FFIErrorCallFrameTooBig;\n\t\t}\n\t\tlongAtput((calloutState->currentArg), ptrAddress);\n\t\t(calloutState->currentArg = ((calloutState->currentArg)) + 4);\n\t\treturn 0;\n\t}\n\treturn FFIErrorBadArg;\n}\n\nstatic sqInt\nffiPushPointerin(void *pointer, CalloutState *calloutState)\n{\n\tif ((((calloutState->currentArg)) + 4) > ((calloutState->limit))) {\n\t\treturn FFIErrorCallFrameTooBig;\n\t}\n\tlongAtput((calloutState->currentArg), pointer);\n\t(calloutState->currentArg = ((calloutState->currentArg)) + 4);\n\treturn 0;\n}\n\nstatic sqInt\nffiPushSignedBytein(sqInt value, CalloutState *calloutState)\n{\n\tif ((((calloutState->currentArg)) + 4) > ((calloutState->limit))) {\n\t\treturn FFIErrorCallFrameTooBig;\n\t}\n\tlongAtput((calloutState->currentArg), ((signed char) value));\n\t(calloutState->currentArg = ((calloutState->currentArg)) + 4);\n\treturn 0;\n}\n\nstatic sqInt\nffiPushSignedCharin(sqInt value, CalloutState *calloutState)\n{\n\tif ((((calloutState->currentArg)) + 4) > ((calloutState->limit))) {\n\t\treturn FFIErrorCallFrameTooBig;\n\t}\n\tlongAtput((calloutState->currentArg), ((signed char) value));\n\t(calloutState->currentArg = ((calloutState->currentArg)) + 4);\n\treturn 0;\n}\n\nstatic sqInt\nffiPushSignedIntin(sqInt value, CalloutState *calloutState)\n{\n\tif ((((calloutState->currentArg)) + 4) > ((calloutState->limit))) {\n\t\treturn FFIErrorCallFrameTooBig;\n\t}\n\tlongAtput((calloutState->currentArg), value);\n\t(calloutState->currentArg = ((calloutState->currentArg)) + 4);\n\treturn 0;\n}\n\n\n/*\tPush a longlong type (e.g., a 64bit integer).\n\tNote: Coercions from float are *not* supported. */\n\nstatic sqInt\nffiPushSignedLongLongOopin(sqInt oop, CalloutState *calloutState)\n{\n    sqLong value;\n\n\tif ((oop == (interpreterProxy->nilObject()))\n\t || (oop == (interpreterProxy->falseObject()))) {\n\t\tvalue = 0;\n\t}\n\telse {\n\t\tif (oop == (interpreterProxy->trueObject())) {\n\t\t\tvalue = 1;\n\t\t}\n\t\telse {\n\t\t\tvalue = interpreterProxy->signed64BitValueOf(oop);\n\t\t\tif (interpreterProxy->failed()) {\n\t\t\t\treturn FFIErrorCoercionFailed;\n\t\t\t}\n\t\t}\n\t}\n\t/* begin ffiPushSignedLongLong:in: */\n\tif ((((calloutState->currentArg)) + 8) > ((calloutState->limit))) {\n\t\treturn FFIErrorCallFrameTooBig;\n\t}\n\tlongAtput((calloutState->currentArg), ((usqInt) value));\n\tlongAtput(((calloutState->currentArg)) + 4, ((usqInt) (((unsigned sqLong )value) >> 32)));\n\t(calloutState->currentArg = ((calloutState->currentArg)) + 8);\n\treturn 0;\n}\n\nstatic sqInt\nffiPushSignedLongLongin(usqLong value, CalloutState *calloutState)\n{\n\tif ((((calloutState->currentArg)) + 8) > ((calloutState->limit))) {\n\t\treturn FFIErrorCallFrameTooBig;\n\t}\n\tlongAtput((calloutState->currentArg), ((usqInt) value));\n\tlongAtput(((calloutState->currentArg)) + 4, ((usqInt) (value >> 32)));\n\t(calloutState->currentArg = ((calloutState->currentArg)) + 8);\n\treturn 0;\n}\n\nstatic sqInt\nffiPushSignedShortin(sqInt value, CalloutState *calloutState)\n{\n\tif ((((calloutState->currentArg)) + 4) > ((calloutState->limit))) {\n\t\treturn FFIErrorCallFrameTooBig;\n\t}\n\tlongAtput((calloutState->currentArg), ((signed short) value));\n\t(calloutState->currentArg = ((calloutState->currentArg)) + 4);\n\treturn 0;\n}\n\nstatic sqInt\nffiPushSingleFloatin(float value, CalloutState *calloutState)\n{\n\tif ((((calloutState->currentArg)) + 4) > ((calloutState->limit))) {\n\t\treturn FFIErrorCallFrameTooBig;\n\t}\n\tstoreSingleFloatAtPointerfrom((calloutState->currentArg), value);\n\t(calloutState->currentArg = ((calloutState->currentArg)) + 4);\n\treturn 0;\n}\n\nstatic sqInt\nffiPushStringOfLengthin(char *pointer, sqInt length, CalloutState *calloutState)\n{\n    char *copy;\n\n\tif (((calloutState->stringArgIndex)) >= MaxNumArgs) {\n\t\treturn -PrimErrBadNumArgs;\n\t}\n\tcopy = malloc(length + 1);\n\tif (copy == null) {\n\t\treturn -PrimErrNoCMemory;\n\t}\n\tmemcpy(copy, pointer, length);\n\tcopy[length] = 0;\n\t((calloutState->stringArgs))[(calloutState->stringArgIndex)] = copy;\n\t(calloutState->stringArgIndex = ((calloutState->stringArgIndex)) + 1);\n\t/* begin ffiPushPointer:in: */\n\tif ((((calloutState->currentArg)) + 4) > ((calloutState->limit))) {\n\t\treturn FFIErrorCallFrameTooBig;\n\t}\n\tlongAtput((calloutState->currentArg), copy);\n\t(calloutState->currentArg = ((calloutState->currentArg)) + 4);\n\treturn 0;\n}\n\n\n/*\tPush the contents of the given external structure */\n\nstatic sqInt\nffiPushStructureContentsOfin(sqInt oop, CalloutState *calloutState)\n{\n    sqInt *argSpec;\n    sqInt *argSpec1;\n    sqInt argSpecSize;\n    sqInt argSpecSize1;\n    sqInt ptrAddress;\n    sqInt ptrClass;\n    sqInt roundedSize;\n    sqInt roundedSize1;\n    sqInt structSize;\n    sqInt structSize1;\n\n\tptrClass = interpreterProxy->fetchClassOf(oop);\n\tif (ptrClass == (interpreterProxy->classExternalAddress())) {\n\n\t\t/* ExternalAddress is bytes */\n\t\t/* There is no way we can make sure the structure is valid.\n\t\tBut we can at least check for attempts to pass pointers to ST memory. */\n\n\t\tptrAddress = interpreterProxy->fetchPointerofObject(0, oop);\n\t\tif (interpreterProxy->isInMemory(ptrAddress)) {\n\t\t\treturn FFIErrorInvalidPointer;\n\t\t}\n\t\t/* begin ffiPushStructure:ofSize:typeSpec:ofLength:in: */\n\t\tstructSize = ((calloutState->ffiArgHeader)) & FFIStructSizeMask;\n\t\targSpec = (calloutState->ffiArgSpec);\n\t\targSpecSize = (calloutState->ffiArgSpecSize);\n\t\troundedSize = (structSize + 3) & (~3);\n\t\tif ((((calloutState->currentArg)) + roundedSize) > ((calloutState->limit))) {\n\t\t\treturn FFIErrorCallFrameTooBig;\n\t\t}\n\t\tmemcpy((calloutState->currentArg), ((void *) ptrAddress), structSize);\n\t\t(calloutState->currentArg = ((calloutState->currentArg)) + roundedSize);\n\t\treturn 0;\n\t}\n\tif (ptrClass == (interpreterProxy->classByteArray())) {\n\t\tif (!((interpreterProxy->byteSizeOf(oop)) == (((calloutState->ffiArgHeader)) & FFIStructSizeMask))) {\n\t\t\treturn FFIErrorStructSize;\n\t\t}\n\t\tptrAddress = ((int) (interpreterProxy->firstIndexableField(oop)));\n\t\tif (!(((calloutState->ffiArgHeader)) & FFIFlagPointer)) {\n\t\t\t/* begin ffiPushStructure:ofSize:typeSpec:ofLength:in: */\n\t\t\tstructSize1 = ((calloutState->ffiArgHeader)) & FFIStructSizeMask;\n\t\t\targSpec1 = (calloutState->ffiArgSpec);\n\t\t\targSpecSize1 = (calloutState->ffiArgSpecSize);\n\t\t\troundedSize1 = (structSize1 + 3) & (~3);\n\t\t\tif ((((calloutState->currentArg)) + roundedSize1) > ((calloutState->limit))) {\n\t\t\t\treturn FFIErrorCallFrameTooBig;\n\t\t\t}\n\t\t\tmemcpy((calloutState->currentArg), ((void *) ptrAddress), structSize1);\n\t\t\t(calloutState->currentArg = ((calloutState->currentArg)) + roundedSize1);\n\t\t\treturn 0;\n\t\t}\n\t\tif (!((((calloutState->ffiArgHeader)) & FFIStructSizeMask) == 4)) {\n\t\t\treturn FFIErrorStructSize;\n\t\t}\n\t\tptrAddress = interpreterProxy->fetchPointerofObject(0, oop);\n\t\tif (interpreterProxy->isInMemory(ptrAddress)) {\n\t\t\treturn FFIErrorInvalidPointer;\n\t\t}\n\t\t/* begin ffiPushPointer:in: */\n\t\tif ((((calloutState->currentArg)) + 4) > ((calloutState->limit))) {\n\t\t\treturn FFIErrorCallFrameTooBig;\n\t\t}\n\t\tlongAtput((calloutState->currentArg), ptrAddress);\n\t\t(calloutState->currentArg = ((calloutState->currentArg)) + 4);\n\t\treturn 0;\n\t}\n\treturn FFIErrorBadArg;\n}\n\nstatic sqInt\nffiPushStructureofSizetypeSpecofLengthin(void *pointer, sqInt structSize, sqInt *argSpec, sqInt argSpecSize, CalloutState *calloutState)\n{\n    sqInt roundedSize;\n\n\troundedSize = (structSize + 3) & (~3);\n\tif ((((calloutState->currentArg)) + roundedSize) > ((calloutState->limit))) {\n\t\treturn FFIErrorCallFrameTooBig;\n\t}\n\tmemcpy((calloutState->currentArg), pointer, structSize);\n\t(calloutState->currentArg = ((calloutState->currentArg)) + roundedSize);\n\treturn 0;\n}\n\nstatic sqInt\nffiPushUnsignedBytein(sqInt value, CalloutState *calloutState)\n{\n\tif ((((calloutState->currentArg)) + 4) > ((calloutState->limit))) {\n\t\treturn FFIErrorCallFrameTooBig;\n\t}\n\tlongAtput((calloutState->currentArg), ((unsigned char) value));\n\t(calloutState->currentArg = ((calloutState->currentArg)) + 4);\n\treturn 0;\n}\n\nstatic sqInt\nffiPushUnsignedCharin(sqInt value, CalloutState *calloutState)\n{\n\tif ((((calloutState->currentArg)) + 4) > ((calloutState->limit))) {\n\t\treturn FFIErrorCallFrameTooBig;\n\t}\n\tlongAtput((calloutState->currentArg), ((unsigned char) value));\n\t(calloutState->currentArg = ((calloutState->currentArg)) + 4);\n\treturn 0;\n}\n\nstatic sqInt\nffiPushUnsignedIntin(sqInt value, CalloutState *calloutState)\n{\n\tif ((((calloutState->currentArg)) + 4) > ((calloutState->limit))) {\n\t\treturn FFIErrorCallFrameTooBig;\n\t}\n\tlongAtput((calloutState->currentArg), value);\n\t(calloutState->currentArg = ((calloutState->currentArg)) + 4);\n\treturn 0;\n}\n\n\n/*\tPush an unsigned longlong type (e.g., a 64bit integer).\n\tNote: Coercions from float are *not* supported. */\n\nstatic sqInt\nffiPushUnsignedLongLongOopin(sqInt oop, CalloutState *calloutState)\n{\n    usqLong value;\n\n\tif ((oop == (interpreterProxy->nilObject()))\n\t || (oop == (interpreterProxy->falseObject()))) {\n\t\tvalue = 0;\n\t}\n\telse {\n\t\tif (oop == (interpreterProxy->trueObject())) {\n\t\t\tvalue = 1;\n\t\t}\n\t\telse {\n\t\t\tvalue = interpreterProxy->positive64BitValueOf(oop);\n\t\t\tif (interpreterProxy->failed()) {\n\t\t\t\treturn FFIErrorCoercionFailed;\n\t\t\t}\n\t\t}\n\t}\n\t/* begin ffiPushUnsignedLongLong:in: */\n\tif ((((calloutState->currentArg)) + 8) > ((calloutState->limit))) {\n\t\treturn FFIErrorCallFrameTooBig;\n\t}\n\tlongAtput((calloutState->currentArg), ((usqInt) value));\n\tlongAtput(((calloutState->currentArg)) + 4, ((usqInt) (value >> 32)));\n\t(calloutState->currentArg = ((calloutState->currentArg)) + 8);\n\treturn 0;\n}\n\nstatic sqInt\nffiPushUnsignedLongLongin(usqLong value, CalloutState *calloutState)\n{\n\tif ((((calloutState->currentArg)) + 8) > ((calloutState->limit))) {\n\t\treturn FFIErrorCallFrameTooBig;\n\t}\n\tlongAtput((calloutState->currentArg), ((usqInt) value));\n\tlongAtput(((calloutState->currentArg)) + 4, ((usqInt) (value >> 32)));\n\t(calloutState->currentArg = ((calloutState->currentArg)) + 8);\n\treturn 0;\n}\n\nstatic sqInt\nffiPushUnsignedShortin(sqInt value, CalloutState *calloutState)\n{\n\tif ((((calloutState->currentArg)) + 4) > ((calloutState->limit))) {\n\t\treturn FFIErrorCallFrameTooBig;\n\t}\n\tlongAtput((calloutState->currentArg), ((unsigned short) value));\n\t(calloutState->currentArg = ((calloutState->currentArg)) + 4);\n\treturn 0;\n}\n\n\n/*\tThis is a fallback in case somebody tries to pass a 'void' value.\n\tWe could simply ignore the argument but I think it's better to let\n\tthe caller know what he did */\n\nstatic sqInt\nffiPushVoidin(sqInt ignored, CalloutState *calloutState)\n{\n\treturn FFIErrorAttemptToPassVoid;\n}\n\n\n/*\tCreate a Smalltalk string from a zero terminated C string */\n\nstatic sqInt\nffiReturnCStringFrom(sqInt cPointer)\n{\n    char *cString;\n    sqInt i;\n    sqInt strLen;\n    sqInt strOop;\n    char *strPtr;\n\n\tif (cPointer == null) {\n\t\treturn interpreterProxy->methodReturnValue(interpreterProxy->nilObject());\n\t}\n\tcString = ((char *) cPointer);\n\tstrLen = 0;\n\twhile (!((cString[strLen]) == 0)) {\n\t\tstrLen += 1;\n\t}\n\tstrOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), strLen);\n\tstrPtr = interpreterProxy->firstIndexableField(strOop);\n\tfor (i = 0; i <= (strLen - 1); i += 1) {\n\t\tstrPtr[i] = (cString[i]);\n\t}\n\treturn interpreterProxy->methodReturnValue(strOop);\n}\n\n\n/*\tGeneric callout support. Create a pointer return value from an external\n\tfunction call\n */\n\nstatic sqInt\nffiReturnPointerofTypein(usqLong retVal, sqInt retType, CalloutState *calloutState)\n{\n    sqInt atomicType;\n    sqInt classOop;\n    char *cString;\n    sqInt i;\n    sqInt oop;\n    sqInt *ptr;\n    sqInt retClass;\n    sqInt retOop;\n    sqInt strLen;\n    sqInt strOop;\n    char *strPtr;\n    sqInt typeSpec;\n\n\tretClass = interpreterProxy->fetchPointerofObject(1, retType);\n\tif (retClass == (interpreterProxy->nilObject())) {\n\t\t/* begin atomicTypeOf: */\n\t\ttypeSpec = (calloutState->ffiRetHeader);\n\t\tatomicType = ((usqInt) (typeSpec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\n\t\tif ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSignedChar) >> 1)) {\n\t\t\t/* begin ffiReturnCStringFrom: */\n\t\t\tif ((((usqInt) retVal)) == null) {\n\t\t\t\treturn interpreterProxy->methodReturnValue(interpreterProxy->nilObject());\n\t\t\t}\n\t\t\tcString = ((char *) (((usqInt) retVal)));\n\t\t\tstrLen = 0;\n\t\t\twhile (!((cString[strLen]) == 0)) {\n\t\t\t\tstrLen += 1;\n\t\t\t}\n\t\t\tstrOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), strLen);\n\t\t\tstrPtr = interpreterProxy->firstIndexableField(strOop);\n\t\t\tfor (i = 0; i <= (strLen - 1); i += 1) {\n\t\t\t\tstrPtr[i] = (cString[i]);\n\t\t\t}\n\t\t\treturn interpreterProxy->methodReturnValue(strOop);\n\t\t}\n\t\tinterpreterProxy->pushRemappableOop(retType);\n\t\toop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classExternalAddress(), 4);\n\t\tptr = interpreterProxy->firstIndexableField(oop);\n\t\tptr[0] = (((sqInt) retVal));\n\t\tinterpreterProxy->pushRemappableOop(oop);\n\t\tretOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classExternalData(), 0);\n\n\t\t/* external address */\n\n\t\toop = interpreterProxy->popRemappableOop();\n\t\tinterpreterProxy->storePointerofObjectwithValue(0, retOop, oop);\n\n\t\t/* return type */\n\n\t\toop = interpreterProxy->popRemappableOop();\n\t\tinterpreterProxy->storePointerofObjectwithValue(1, retOop, oop);\n\t\treturn interpreterProxy->methodReturnValue(retOop);\n\t}\n\tinterpreterProxy->pushRemappableOop(retClass);\n\tif (((calloutState->ffiRetHeader)) & FFIFlagStructure) {\n\t\tclassOop = interpreterProxy->classByteArray();\n\t}\n\telse {\n\t\tclassOop = interpreterProxy->classExternalAddress();\n\t}\n\toop = interpreterProxy->instantiateClassindexableSize(classOop, 4);\n\tptr = interpreterProxy->firstIndexableField(oop);\n\tptr[0] = (((sqInt) retVal));\n\n\t/* return class */\n\n\tretClass = interpreterProxy->popRemappableOop();\n\tinterpreterProxy->pushRemappableOop(oop);\n\tretOop = interpreterProxy->instantiateClassindexableSize(retClass, 0);\n\n\t/* external address */\n\n\toop = interpreterProxy->popRemappableOop();\n\tinterpreterProxy->storePointerofObjectwithValue(0, retOop, oop);\n\treturn interpreterProxy->methodReturnValue(retOop);\n}\n\n\n/*\tCreate a structure return value from an external function call. The value\n\tas been stored in\n\talloca'ed space pointed to by the calloutState. */\n\nstatic sqInt\nffiReturnStructofTypein(usqLong longLongRet, sqInt ffiRetType, CalloutState *calloutState)\n{\n    sqInt oop;\n    sqInt retClass;\n    sqInt retOop;\n\n\tretClass = interpreterProxy->fetchPointerofObject(1, ffiRetType);\n\tretOop = interpreterProxy->instantiateClassindexableSize(retClass, 0);\n\tinterpreterProxy->pushRemappableOop(retOop);\n\toop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), (calloutState->structReturnSize));\n\tif (returnStructInRegisters((calloutState->structReturnSize))) {\n\t\tmemcpy(interpreterProxy->firstIndexableField(oop), (&longLongRet), (calloutState->structReturnSize));\n\t}\n\telse {\n\t\tmemcpy(interpreterProxy->firstIndexableField(oop), (calloutState->limit), (calloutState->structReturnSize));\n\t}\n\tretOop = interpreterProxy->popRemappableOop();\n\tinterpreterProxy->storePointerofObjectwithValue(0, retOop, oop);\n\treturn interpreterProxy->methodReturnValue(retOop);\n}\n\n\n/*\tAnswer the return type object for the current invocation */\n\nstatic sqInt\nffiReturnType(sqInt specOnStack)\n{\n    sqInt argTypes;\n    sqInt specLiteral;\n\n\tspecLiteral = (specOnStack\n\t\t? interpreterProxy->stackValue(1)\n\t\t: interpreterProxy->literalofMethod(0, interpreterProxy->primitiveMethod()));\n\targTypes = interpreterProxy->fetchPointerofObject(ExternalFunctionArgTypesIndex, specLiteral);\n\treturn interpreterProxy->fetchPointerofObject(0, argTypes);\n}\n\n\n/*\tCurrently all target platforms (Mac OS X ppc or x86, linux x86, Win32)\n\tanswer true\n\tfor the two calling conventions, FFICallTypeCDecl FFICallTypeApi, so let's\n\tnot waste\n\ttime by testing for these. The only issue is whether the FFICallTypeApi is\n\tcallee pops\n\tor not (which itself is of little importance to an alloca-based\n\timplementation, but does\n\tsave a few instructions if not). Subclasses can still override if\n\tnecessary.  */\n\nstatic sqInt\nffiSupportsCallingConvention(sqInt aCallingConvention)\n{\n\treturn 1;\n}\n\n\n/*\tValidate if the given oop (an instance of ExternalData) can be passed as a\n\tpointer to the given atomic type.\n */\n\nstatic sqInt\nffiValidateExternalDataAtomicType(sqInt oop, sqInt atomicType)\n{\n    sqInt ptrType;\n    sqInt spec;\n    sqInt specOop;\n    sqInt specType;\n\n\tptrType = interpreterProxy->fetchPointerofObject(1, oop);\n\tif ((ptrType & 1)) {\n\t\treturn FFIErrorWrongType;\n\t}\n\tif (!(interpreterProxy->isPointers(ptrType))) {\n\t\treturn FFIErrorWrongType;\n\t}\n\tif ((interpreterProxy->slotSizeOf(ptrType)) < 2) {\n\t\treturn FFIErrorWrongType;\n\t}\n\tspecOop = interpreterProxy->fetchPointerofObject(0, ptrType);\n\tif ((specOop & 1)) {\n\t\treturn FFIErrorWrongType;\n\t}\n\tif (!(interpreterProxy->isWords(specOop))) {\n\t\treturn FFIErrorWrongType;\n\t}\n\tif ((interpreterProxy->slotSizeOf(specOop)) == 0) {\n\t\treturn FFIErrorWrongType;\n\t}\n\tspec = interpreterProxy->fetchPointerofObject(0, specOop);\n\tif (!(spec & FFIFlagAtomic)) {\n\t\treturn FFIErrorWrongType;\n\t}\n\tspecType = ((usqInt) (spec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\n\tif (specType != atomicType) {\n\t\tif (!((atomicType > FFITypeBool)\n\t\t\t && (atomicType < FFITypeSingleFloat))) {\n\t\t\treturn FFIErrorCoercionFailed;\n\t\t}\n\t\tif (!((((usqInt) atomicType) >> 1) == (((usqInt) specType) >> 1))) {\n\t\t\treturn FFIErrorCoercionFailed;\n\t\t}\n\t}\n\treturn 0;\n}\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\n\n/*\tBy default, disable logging */\n\nEXPORT(sqInt)\ninitialiseModule(void)\n{\n\n\t/* Get the instSize of ExternalFunction to know whether it contains a cache of the stackSize,\n\t and what the offset of ExternalLibraryFunction's functionName and moduleName slots are. */\n\n\tffiLogEnabled = 0;\n\texternalFunctionInstSize = interpreterProxy->instanceSizeOf(interpreterProxy->classExternalFunction());\n\tinitSurfacePluginFunctionPointers();\n\treturn 1;\n}\n\nstatic sqInt\nisAlien(sqInt anOop)\n{\n\treturn interpreterProxy->includesBehaviorThatOf(interpreterProxy->fetchClassOf(anOop), interpreterProxy->classAlien());\n}\n\nstatic sqInt\nisAtomicType(sqInt typeSpec)\n{\n\treturn typeSpec & FFIFlagAtomic;\n}\n\nstatic sqInt\nisDirectAlien(sqInt oop)\n{\n\tassert(isAlien(oop));\n\treturn (longAt(oop + BaseHeaderSize)) > 0;\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\n\n/*\tAnswer if a struct returned in memory is returned to the\n\treferent of a pointer passed as an implciit first argument.\n\tIt almost always is. Subclasses can override if not. */\n\nstatic sqInt\nnonRegisterStructReturnIsViaImplicitFirstArgument(void)\n{\n\treturn 1;\n}\n\n\n/*\tIMPORTANT: IF YOU CHANGE THE NAME OF THIS METHOD YOU MUST CHANGE\n\tInterpreter>>primitiveCalloutToFFI\n\tTO REFLECT THE CHANGE. */\n/*\tPerform a function call to a foreign function.\n\tOnly invoked from method containing explicit external call spec. */\n\nEXPORT(void)\nprimitiveCallout(void)\n{\n    sqInt address;\n    sqInt address1;\n    sqInt addressPtr;\n    char *allocation;\n    sqInt argClass;\n    sqInt argSpec;\n    sqInt argType;\n    sqInt argTypeArray;\n    sqInt argTypes;\n    sqInt argTypes1;\n    sqInt atomicType;\n    sqInt atomicType1;\n    CalloutState *calloutState;\n    sqInt classOop;\n    char *cString;\n    sqInt err;\n    sqInt externalFunction;\n    sqInt ffiRetType;\n    sqInt flags;\n    double floatRet;\n    sqInt functionName;\n    sqInt i;\n    sqInt i1;\n    usqLong intRet;\n    sqInt meth;\n    sqInt nArgs;\n    sqInt oop;\n    sqInt oop1;\n    sqInt oop2;\n    void *pointer;\n    int *ptr;\n    sqInt *ptr1;\n    sqInt requiredStackSize;\n    sqInt result;\n    sqInt retClass;\n    sqInt retClass1;\n    sqInt retOop;\n    sqInt retOop1;\n    sqInt retType;\n    sqInt specLiteral;\n    sqInt specLiteral1;\n    sqInt stackSize;\n    sqInt strLen;\n    sqInt strOop;\n    char *strPtr;\n    CalloutState theCalloutState;\n    sqInt typeSpec;\n    sqInt typeSpec1;\n\n\tmeth = interpreterProxy->primitiveMethod();\n\tif (!((interpreterProxy->literalCountOf(meth)) > 0)) {\n\t\tinterpreterProxy->primitiveFailFor(PrimErrBadMethod); return;\n\t}\n\texternalFunction = interpreterProxy->literalofMethod(0, meth);\n\t/* begin ffiCall:ArgArrayOrNil:NumArgs: */\n\tnArgs = interpreterProxy->methodArgumentCount();\n\tif (!(interpreterProxy->isKindOfClass(externalFunction, interpreterProxy->classExternalFunction()))) {\n\t\tffiFail(FFIErrorNotFunction);\n\t\tgoto l3;\n\t}\n\tflags = interpreterProxy->fetchIntegerofObject(ExternalFunctionFlagsIndex, externalFunction);\n\tif (interpreterProxy->failed()) {\n\t\tffiFail(FFIErrorBadArgs);\n\t\tgoto l3;\n\t}\n\n\t/* must be array of arg types */\n\n\targTypeArray = interpreterProxy->fetchPointerofObject(ExternalFunctionArgTypesIndex, externalFunction);\n\tif (!((interpreterProxy->isArray(argTypeArray))\n\t\t && ((interpreterProxy->slotSizeOf(argTypeArray)) == (nArgs + 1)))) {\n\t\tffiFail(FFIErrorBadArgs);\n\t\tgoto l3;\n\t}\n\tif (!(1)) {\n\t\tffiFail(FFIErrorCallType);\n\t\tgoto l3;\n\t}\n\t/* begin ffiLoadCalloutAddress: */\n\n\t/* Lookup the address */\n\t/* Make sure it's an external handle */\n\n\taddressPtr = interpreterProxy->fetchPointerofObject(0, externalFunction);\n\t/* begin ffiContentsOfHandle:errCode: */\n\tif ((addressPtr & 1)) {\n\t\taddress1 = ffiFail(FFIErrorBadAddress);\n\t\tgoto l4;\n\t}\n\tif (!(interpreterProxy->isBytes(addressPtr))) {\n\t\taddress1 = ffiFail(FFIErrorBadAddress);\n\t\tgoto l4;\n\t}\n\tif (!((interpreterProxy->byteSizeOf(addressPtr)) == 4)) {\n\t\taddress1 = ffiFail(FFIErrorBadAddress);\n\t\tgoto l4;\n\t}\n\taddress1 = interpreterProxy->fetchPointerofObject(0, addressPtr);\nl4:\t/* end ffiContentsOfHandle:errCode: */;\n\tif (interpreterProxy->failed()) {\n\t\taddress = 0;\n\t\tgoto l5;\n\t}\n\tif (address1 == 0) {\n\t\tif (externalFunctionInstSize > ExternalFunctionStackSizeIndex) {\n\t\t\tinterpreterProxy->storePointerofObjectwithValue(ExternalFunctionStackSizeIndex, externalFunction, ((-1 << 1) | 1));\n\t\t}\n\t\tif ((interpreterProxy->slotSizeOf(externalFunction)) < 5) {\n\t\t\taddress = ffiFail(FFIErrorNoModule);\n\t\t\tgoto l5;\n\t\t}\n\t\taddress1 = ffiLoadCalloutAddressFrom(externalFunction);\n\t\tif (interpreterProxy->failed()) {\n\t\t\taddress = 0;\n\t\t\tgoto l5;\n\t\t}\n\t\tptr = interpreterProxy->firstIndexableField(addressPtr);\n\t\tptr[0] = address1;\n\t}\n\taddress = address1;\nl5:\t/* end ffiLoadCalloutAddress: */;\n\tif (interpreterProxy->failed()) {\n\t\tgoto l3;\n\t}\n\trequiredStackSize = (externalFunctionInstSize > ExternalFunctionStackSizeIndex\n\t\t? interpreterProxy->fetchIntegerofObject(ExternalFunctionStackSizeIndex, externalFunction)\n\t\t: -1);\n\tif (interpreterProxy->failed()) {\n\t\tinterpreterProxy->primitiveFailFor((null == null\n\t\t\t? PrimErrBadMethod\n\t\t\t: PrimErrBadReceiver));\n\t\tgoto l3;\n\t}\n\tstackSize = (requiredStackSize < 0\n\t\t? DefaultMaxStackSize\n\t\t: requiredStackSize);\n\tnull;\n\tcalloutState = (&theCalloutState);\n\t\tmemset(calloutState, 0, sizeof(CalloutState));\n;\n\t(calloutState->callFlags = flags);\n\targType = interpreterProxy->fetchPointerofObject(0, argTypeArray);\n\targSpec = interpreterProxy->fetchPointerofObject(0, argType);\n\targClass = interpreterProxy->fetchPointerofObject(1, argType);\n\tif (((err = ffiCheckReturnWithin(argSpec, argClass, calloutState))) != 0) {\n\t\tffiFail(err);\n\t\tgoto l3;\n\t}\n\tallocation = alloca(((stackSize + ((calloutState->structReturnSize))) + 0) + (cStackAlignment()));\n\tif (allocaLiesSoUseGetsp()) {\n\t\tallocation = getsp();\n\t}\n\tif ((cStackAlignment()) != 0) {\n\t\tallocation = ((char *) ((((usqInt)allocation)) & (~((cStackAlignment()) - 1))));\n\t}\n\t(calloutState->argVector = allocation);\n\t(calloutState->currentArg = allocation + 0);\n\t(calloutState->limit = (allocation + stackSize) + 0);\n\tif ((((calloutState->structReturnSize)) > 0)\n\t && (1\n && (!(returnStructInRegisters((calloutState->structReturnSize)))))) {\n\t\t/* begin ffiPushPointer:in: */\n\t\tpointer = (calloutState->limit);\n\t\tif ((((calloutState->currentArg)) + 4) > ((calloutState->limit))) {\n\t\t\tgoto l1;\n\t\t}\n\t\tlongAtput((calloutState->currentArg), pointer);\n\t\t(calloutState->currentArg = ((calloutState->currentArg)) + 4);\n\tl1:\t/* end ffiPushPointer:in: */;\n\t}\n\tfor (i = 1; i <= nArgs; i += 1) {\n\t\targType = interpreterProxy->fetchPointerofObject(i, argTypeArray);\n\t\targSpec = interpreterProxy->fetchPointerofObject(0, argType);\n\t\targClass = interpreterProxy->fetchPointerofObject(1, argType);\n\t\toop = (null == null\n\t\t\t? interpreterProxy->stackValue(nArgs - i)\n\t\t\t: interpreterProxy->fetchPointerofObject(i - 1, null));\n\t\terr = ffiArgumentSpecClassin(oop, argSpec, argClass, calloutState);\n\t\tif (err != 0) {\n\t\t\t/* begin cleanupCalloutState: */\n\t\t\twhile (((calloutState->stringArgIndex)) > 0) {\n\t\t\t\tfree(((calloutState->stringArgs))[(calloutState->stringArgIndex = ((calloutState->stringArgIndex)) - 1)]);\n\t\t\t}\n\t\t\tffiFail(err);\n\t\t\tgoto l3;\n\t\t}\n\t}\n\tassert(!(interpreterProxy->failed()));\n\t/* begin ffiLogCallout: */\n\tif (ffiLogEnabled) {\n\t\tfunctionName = interpreterProxy->fetchPointerofObject(externalFunctionInstSize, externalFunction);\n\t\tif (!(interpreterProxy->isBytes(functionName))) {\n\t\t\tgoto l2;\n\t\t}\n\t\tffiLogCallOfLength(interpreterProxy->firstIndexableField(functionName), interpreterProxy->byteSizeOf(functionName));\n\t}\nl2:\t/* end ffiLogCallout: */;\n\tif ((requiredStackSize < 0)\n\t && (externalFunctionInstSize > ExternalFunctionStackSizeIndex)) {\n\t\tstackSize = ((calloutState->currentArg)) - ((calloutState->argVector));\n\t\tinterpreterProxy->storeIntegerofObjectwithValue(ExternalFunctionStackSizeIndex, externalFunction, stackSize);\n\t}\n\t/* begin ffiCalloutTo:SpecOnStack:in: */\n\tif ((0 + (cStackAlignment())) > 0) {\n\t\tsetsp((calloutState->argVector));\n\t}\n\t/* begin atomicTypeOf: */\n\ttypeSpec = (calloutState->ffiRetHeader);\n\tatomicType = ((usqInt) (typeSpec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\n\tif ((atomicType == FFITypeSingleFloat)\n\t || (atomicType == FFITypeDoubleFloat)) {\n\t\tfloatRet = dispatchFunctionPointer(((double (*)()) address));\n\t}\n\telse {\n\t\tintRet = dispatchFunctionPointer(((usqLong (*)()) address));\n\t}\n\tif (isCalleePopsConvention((calloutState->callFlags))) {\n\t\tsetsp((calloutState->argVector));\n\t}\n\tif (((calloutState->ffiRetHeader)) & FFIFlagPointer) {\n\t\t/* begin ffiReturnPointer:ofType:in: */\n\t\t/* begin ffiReturnType: */\n\t\tspecLiteral1 = (null != null\n\t\t\t? interpreterProxy->stackValue(1)\n\t\t\t: interpreterProxy->literalofMethod(0, interpreterProxy->primitiveMethod()));\n\t\targTypes1 = interpreterProxy->fetchPointerofObject(ExternalFunctionArgTypesIndex, specLiteral1);\n\t\tretType = interpreterProxy->fetchPointerofObject(0, argTypes1);\n\t\tretClass1 = interpreterProxy->fetchPointerofObject(1, retType);\n\t\tif (retClass1 == (interpreterProxy->nilObject())) {\n\t\t\t/* begin atomicTypeOf: */\n\t\t\ttypeSpec1 = (calloutState->ffiRetHeader);\n\t\t\tatomicType1 = ((usqInt) (typeSpec1 & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\n\t\t\tif ((((usqInt) atomicType1) >> 1) == (((usqInt) FFITypeSignedChar) >> 1)) {\n\t\t\t\t/* begin ffiReturnCStringFrom: */\n\t\t\t\tif ((((usqInt) intRet)) == null) {\n\t\t\t\t\tresult = interpreterProxy->methodReturnValue(interpreterProxy->nilObject());\n\t\t\t\t\tgoto l6;\n\t\t\t\t}\n\t\t\t\tcString = ((char *) (((usqInt) intRet)));\n\t\t\t\tstrLen = 0;\n\t\t\t\twhile (!((cString[strLen]) == 0)) {\n\t\t\t\t\tstrLen += 1;\n\t\t\t\t}\n\t\t\t\tstrOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), strLen);\n\t\t\t\tstrPtr = interpreterProxy->firstIndexableField(strOop);\n\t\t\t\tfor (i1 = 0; i1 <= (strLen - 1); i1 += 1) {\n\t\t\t\t\tstrPtr[i1] = (cString[i1]);\n\t\t\t\t}\n\t\t\t\tresult = interpreterProxy->methodReturnValue(strOop);\n\t\t\t\tgoto l6;\n\t\t\t}\n\t\t\tinterpreterProxy->pushRemappableOop(retType);\n\t\t\toop1 = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classExternalAddress(), 4);\n\t\t\tptr1 = interpreterProxy->firstIndexableField(oop1);\n\t\t\tptr1[0] = (((sqInt) intRet));\n\t\t\tinterpreterProxy->pushRemappableOop(oop1);\n\t\t\tretOop1 = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classExternalData(), 0);\n\n\t\t\t/* external address */\n\n\t\t\toop1 = interpreterProxy->popRemappableOop();\n\t\t\tinterpreterProxy->storePointerofObjectwithValue(0, retOop1, oop1);\n\n\t\t\t/* return type */\n\n\t\t\toop1 = interpreterProxy->popRemappableOop();\n\t\t\tinterpreterProxy->storePointerofObjectwithValue(1, retOop1, oop1);\n\t\t\tresult = interpreterProxy->methodReturnValue(retOop1);\n\t\t\tgoto l6;\n\t\t}\n\t\tinterpreterProxy->pushRemappableOop(retClass1);\n\t\tif (((calloutState->ffiRetHeader)) & FFIFlagStructure) {\n\t\t\tclassOop = interpreterProxy->classByteArray();\n\t\t}\n\t\telse {\n\t\t\tclassOop = interpreterProxy->classExternalAddress();\n\t\t}\n\t\toop1 = interpreterProxy->instantiateClassindexableSize(classOop, 4);\n\t\tptr1 = interpreterProxy->firstIndexableField(oop1);\n\t\tptr1[0] = (((sqInt) intRet));\n\n\t\t/* return class */\n\n\t\tretClass1 = interpreterProxy->popRemappableOop();\n\t\tinterpreterProxy->pushRemappableOop(oop1);\n\t\tretOop1 = interpreterProxy->instantiateClassindexableSize(retClass1, 0);\n\n\t\t/* external address */\n\n\t\toop1 = interpreterProxy->popRemappableOop();\n\t\tinterpreterProxy->storePointerofObjectwithValue(0, retOop1, oop1);\n\t\tresult = interpreterProxy->methodReturnValue(retOop1);\n\t\tgoto l6;\n\t}\n\tif (((calloutState->ffiRetHeader)) & FFIFlagStructure) {\n\t\t/* begin ffiReturnStruct:ofType:in: */\n\t\t/* begin ffiReturnType: */\n\t\tspecLiteral = (null != null\n\t\t\t? interpreterProxy->stackValue(1)\n\t\t\t: interpreterProxy->literalofMethod(0, interpreterProxy->primitiveMethod()));\n\t\targTypes = interpreterProxy->fetchPointerofObject(ExternalFunctionArgTypesIndex, specLiteral);\n\t\tffiRetType = interpreterProxy->fetchPointerofObject(0, argTypes);\n\t\tretClass = interpreterProxy->fetchPointerofObject(1, ffiRetType);\n\t\tretOop = interpreterProxy->instantiateClassindexableSize(retClass, 0);\n\t\tinterpreterProxy->pushRemappableOop(retOop);\n\t\toop2 = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), (calloutState->structReturnSize));\n\t\tif (returnStructInRegisters((calloutState->structReturnSize))) {\n\t\t\tmemcpy(interpreterProxy->firstIndexableField(oop2), (&intRet), (calloutState->structReturnSize));\n\t\t}\n\t\telse {\n\t\t\tmemcpy(interpreterProxy->firstIndexableField(oop2), (calloutState->limit), (calloutState->structReturnSize));\n\t\t}\n\t\tretOop = interpreterProxy->popRemappableOop();\n\t\tinterpreterProxy->storePointerofObjectwithValue(0, retOop, oop2);\n\t\tresult = interpreterProxy->methodReturnValue(retOop);\n\t\tgoto l6;\n\t}\n\tif ((atomicType == FFITypeSingleFloat)\n\t || (atomicType == FFITypeDoubleFloat)) {\n\t\tresult = interpreterProxy->methodReturnValue(interpreterProxy->floatObjectOf(floatRet));\n\t\tgoto l6;\n\t}\n\tresult = interpreterProxy->methodReturnValue(ffiCreateIntegralResultOopofAtomicTypein(intRet, atomicType, calloutState));\nl6:\t/* end ffiCalloutTo:SpecOnStack:in: */;\n\t/* begin cleanupCalloutState: */\n\twhile (((calloutState->stringArgIndex)) > 0) {\n\t\tfree(((calloutState->stringArgs))[(calloutState->stringArgIndex = ((calloutState->stringArgIndex)) - 1)]);\n\t}\nl3:\t/* end ffiCall:ArgArrayOrNil:NumArgs: */;\n\treturn;\n}\n\n\n/*\tPerform a function call to a foreign function.\n\tOnly invoked from ExternalFunction>>invokeWithArguments: */\n\nEXPORT(void)\nprimitiveCalloutWithArgs(void)\n{\n    sqInt address;\n    sqInt address1;\n    sqInt addressPtr;\n    char *allocation;\n    sqInt argArray;\n    sqInt argClass;\n    sqInt argSpec;\n    sqInt argType;\n    sqInt argTypeArray;\n    sqInt argTypes;\n    sqInt argTypes1;\n    sqInt atomicType;\n    sqInt atomicType1;\n    CalloutState *calloutState;\n    sqInt classOop;\n    char *cString;\n    sqInt err;\n    sqInt externalFunction;\n    sqInt ffiRetType;\n    sqInt flags;\n    double floatRet;\n    sqInt functionName;\n    sqInt i;\n    sqInt i1;\n    usqLong intRet;\n    sqInt nArgs;\n    sqInt oop;\n    sqInt oop1;\n    sqInt oop2;\n    void *pointer;\n    int *ptr;\n    sqInt *ptr1;\n    sqInt requiredStackSize;\n    sqInt result;\n    sqInt retClass;\n    sqInt retClass1;\n    sqInt retOop;\n    sqInt retOop1;\n    sqInt retType;\n    sqInt specLiteral;\n    sqInt specLiteral1;\n    sqInt stackSize;\n    sqInt strLen;\n    sqInt strOop;\n    char *strPtr;\n    CalloutState theCalloutState;\n    sqInt typeSpec;\n    sqInt typeSpec1;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\tinterpreterProxy->primitiveFailFor(PrimErrBadNumArgs); return;\n\t}\n\texternalFunction = interpreterProxy->stackValue(1);\n\targArray = interpreterProxy->stackValue(0);\n\tif (!(interpreterProxy->isArray(argArray))) {\n\t\tinterpreterProxy->primitiveFailFor(PrimErrBadArgument); return;\n\t}\n\tnArgs = interpreterProxy->slotSizeOf(argArray);\n\t/* begin ffiCall:ArgArrayOrNil:NumArgs: */\n\tif (!(interpreterProxy->isKindOfClass(externalFunction, interpreterProxy->classExternalFunction()))) {\n\t\tffiFail(FFIErrorNotFunction);\n\t\tgoto l3;\n\t}\n\tflags = interpreterProxy->fetchIntegerofObject(ExternalFunctionFlagsIndex, externalFunction);\n\tif (interpreterProxy->failed()) {\n\t\tffiFail(FFIErrorBadArgs);\n\t\tgoto l3;\n\t}\n\n\t/* must be array of arg types */\n\n\targTypeArray = interpreterProxy->fetchPointerofObject(ExternalFunctionArgTypesIndex, externalFunction);\n\tif (!((interpreterProxy->isArray(argTypeArray))\n\t\t && ((interpreterProxy->slotSizeOf(argTypeArray)) == (nArgs + 1)))) {\n\t\tffiFail(FFIErrorBadArgs);\n\t\tgoto l3;\n\t}\n\tif (!(1)) {\n\t\tffiFail(FFIErrorCallType);\n\t\tgoto l3;\n\t}\n\t/* begin ffiLoadCalloutAddress: */\n\n\t/* Lookup the address */\n\t/* Make sure it's an external handle */\n\n\taddressPtr = interpreterProxy->fetchPointerofObject(0, externalFunction);\n\t/* begin ffiContentsOfHandle:errCode: */\n\tif ((addressPtr & 1)) {\n\t\taddress1 = ffiFail(FFIErrorBadAddress);\n\t\tgoto l4;\n\t}\n\tif (!(interpreterProxy->isBytes(addressPtr))) {\n\t\taddress1 = ffiFail(FFIErrorBadAddress);\n\t\tgoto l4;\n\t}\n\tif (!((interpreterProxy->byteSizeOf(addressPtr)) == 4)) {\n\t\taddress1 = ffiFail(FFIErrorBadAddress);\n\t\tgoto l4;\n\t}\n\taddress1 = interpreterProxy->fetchPointerofObject(0, addressPtr);\nl4:\t/* end ffiContentsOfHandle:errCode: */;\n\tif (interpreterProxy->failed()) {\n\t\taddress = 0;\n\t\tgoto l5;\n\t}\n\tif (address1 == 0) {\n\t\tif (externalFunctionInstSize > ExternalFunctionStackSizeIndex) {\n\t\t\tinterpreterProxy->storePointerofObjectwithValue(ExternalFunctionStackSizeIndex, externalFunction, ((-1 << 1) | 1));\n\t\t}\n\t\tif ((interpreterProxy->slotSizeOf(externalFunction)) < 5) {\n\t\t\taddress = ffiFail(FFIErrorNoModule);\n\t\t\tgoto l5;\n\t\t}\n\t\taddress1 = ffiLoadCalloutAddressFrom(externalFunction);\n\t\tif (interpreterProxy->failed()) {\n\t\t\taddress = 0;\n\t\t\tgoto l5;\n\t\t}\n\t\tptr = interpreterProxy->firstIndexableField(addressPtr);\n\t\tptr[0] = address1;\n\t}\n\taddress = address1;\nl5:\t/* end ffiLoadCalloutAddress: */;\n\tif (interpreterProxy->failed()) {\n\t\tgoto l3;\n\t}\n\trequiredStackSize = (externalFunctionInstSize > ExternalFunctionStackSizeIndex\n\t\t? interpreterProxy->fetchIntegerofObject(ExternalFunctionStackSizeIndex, externalFunction)\n\t\t: -1);\n\tif (interpreterProxy->failed()) {\n\t\tinterpreterProxy->primitiveFailFor((argArray == null\n\t\t\t? PrimErrBadMethod\n\t\t\t: PrimErrBadReceiver));\n\t\tgoto l3;\n\t}\n\tstackSize = (requiredStackSize < 0\n\t\t? DefaultMaxStackSize\n\t\t: requiredStackSize);\n\tnull;\n\tcalloutState = (&theCalloutState);\n\t\tmemset(calloutState, 0, sizeof(CalloutState));\n;\n\t(calloutState->callFlags = flags);\n\targType = interpreterProxy->fetchPointerofObject(0, argTypeArray);\n\targSpec = interpreterProxy->fetchPointerofObject(0, argType);\n\targClass = interpreterProxy->fetchPointerofObject(1, argType);\n\tif (((err = ffiCheckReturnWithin(argSpec, argClass, calloutState))) != 0) {\n\t\tffiFail(err);\n\t\tgoto l3;\n\t}\n\tallocation = alloca(((stackSize + ((calloutState->structReturnSize))) + 0) + (cStackAlignment()));\n\tif (allocaLiesSoUseGetsp()) {\n\t\tallocation = getsp();\n\t}\n\tif ((cStackAlignment()) != 0) {\n\t\tallocation = ((char *) ((((usqInt)allocation)) & (~((cStackAlignment()) - 1))));\n\t}\n\t(calloutState->argVector = allocation);\n\t(calloutState->currentArg = allocation + 0);\n\t(calloutState->limit = (allocation + stackSize) + 0);\n\tif ((((calloutState->structReturnSize)) > 0)\n\t && (1\n && (!(returnStructInRegisters((calloutState->structReturnSize)))))) {\n\t\t/* begin ffiPushPointer:in: */\n\t\tpointer = (calloutState->limit);\n\t\tif ((((calloutState->currentArg)) + 4) > ((calloutState->limit))) {\n\t\t\tgoto l1;\n\t\t}\n\t\tlongAtput((calloutState->currentArg), pointer);\n\t\t(calloutState->currentArg = ((calloutState->currentArg)) + 4);\n\tl1:\t/* end ffiPushPointer:in: */;\n\t}\n\tfor (i = 1; i <= nArgs; i += 1) {\n\t\targType = interpreterProxy->fetchPointerofObject(i, argTypeArray);\n\t\targSpec = interpreterProxy->fetchPointerofObject(0, argType);\n\t\targClass = interpreterProxy->fetchPointerofObject(1, argType);\n\t\toop = (argArray == null\n\t\t\t? interpreterProxy->stackValue(nArgs - i)\n\t\t\t: interpreterProxy->fetchPointerofObject(i - 1, argArray));\n\t\terr = ffiArgumentSpecClassin(oop, argSpec, argClass, calloutState);\n\t\tif (err != 0) {\n\t\t\t/* begin cleanupCalloutState: */\n\t\t\twhile (((calloutState->stringArgIndex)) > 0) {\n\t\t\t\tfree(((calloutState->stringArgs))[(calloutState->stringArgIndex = ((calloutState->stringArgIndex)) - 1)]);\n\t\t\t}\n\t\t\tffiFail(err);\n\t\t\tgoto l3;\n\t\t}\n\t}\n\tassert(!(interpreterProxy->failed()));\n\t/* begin ffiLogCallout: */\n\tif (ffiLogEnabled) {\n\t\tfunctionName = interpreterProxy->fetchPointerofObject(externalFunctionInstSize, externalFunction);\n\t\tif (!(interpreterProxy->isBytes(functionName))) {\n\t\t\tgoto l2;\n\t\t}\n\t\tffiLogCallOfLength(interpreterProxy->firstIndexableField(functionName), interpreterProxy->byteSizeOf(functionName));\n\t}\nl2:\t/* end ffiLogCallout: */;\n\tif ((requiredStackSize < 0)\n\t && (externalFunctionInstSize > ExternalFunctionStackSizeIndex)) {\n\t\tstackSize = ((calloutState->currentArg)) - ((calloutState->argVector));\n\t\tinterpreterProxy->storeIntegerofObjectwithValue(ExternalFunctionStackSizeIndex, externalFunction, stackSize);\n\t}\n\t/* begin ffiCalloutTo:SpecOnStack:in: */\n\tif ((0 + (cStackAlignment())) > 0) {\n\t\tsetsp((calloutState->argVector));\n\t}\n\t/* begin atomicTypeOf: */\n\ttypeSpec = (calloutState->ffiRetHeader);\n\tatomicType = ((usqInt) (typeSpec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\n\tif ((atomicType == FFITypeSingleFloat)\n\t || (atomicType == FFITypeDoubleFloat)) {\n\t\tfloatRet = dispatchFunctionPointer(((double (*)()) address));\n\t}\n\telse {\n\t\tintRet = dispatchFunctionPointer(((usqLong (*)()) address));\n\t}\n\tif (isCalleePopsConvention((calloutState->callFlags))) {\n\t\tsetsp((calloutState->argVector));\n\t}\n\tif (((calloutState->ffiRetHeader)) & FFIFlagPointer) {\n\t\t/* begin ffiReturnPointer:ofType:in: */\n\t\t/* begin ffiReturnType: */\n\t\tspecLiteral1 = (argArray != null\n\t\t\t? interpreterProxy->stackValue(1)\n\t\t\t: interpreterProxy->literalofMethod(0, interpreterProxy->primitiveMethod()));\n\t\targTypes1 = interpreterProxy->fetchPointerofObject(ExternalFunctionArgTypesIndex, specLiteral1);\n\t\tretType = interpreterProxy->fetchPointerofObject(0, argTypes1);\n\t\tretClass1 = interpreterProxy->fetchPointerofObject(1, retType);\n\t\tif (retClass1 == (interpreterProxy->nilObject())) {\n\t\t\t/* begin atomicTypeOf: */\n\t\t\ttypeSpec1 = (calloutState->ffiRetHeader);\n\t\t\tatomicType1 = ((usqInt) (typeSpec1 & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\n\t\t\tif ((((usqInt) atomicType1) >> 1) == (((usqInt) FFITypeSignedChar) >> 1)) {\n\t\t\t\t/* begin ffiReturnCStringFrom: */\n\t\t\t\tif ((((usqInt) intRet)) == null) {\n\t\t\t\t\tresult = interpreterProxy->methodReturnValue(interpreterProxy->nilObject());\n\t\t\t\t\tgoto l6;\n\t\t\t\t}\n\t\t\t\tcString = ((char *) (((usqInt) intRet)));\n\t\t\t\tstrLen = 0;\n\t\t\t\twhile (!((cString[strLen]) == 0)) {\n\t\t\t\t\tstrLen += 1;\n\t\t\t\t}\n\t\t\t\tstrOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), strLen);\n\t\t\t\tstrPtr = interpreterProxy->firstIndexableField(strOop);\n\t\t\t\tfor (i1 = 0; i1 <= (strLen - 1); i1 += 1) {\n\t\t\t\t\tstrPtr[i1] = (cString[i1]);\n\t\t\t\t}\n\t\t\t\tresult = interpreterProxy->methodReturnValue(strOop);\n\t\t\t\tgoto l6;\n\t\t\t}\n\t\t\tinterpreterProxy->pushRemappableOop(retType);\n\t\t\toop1 = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classExternalAddress(), 4);\n\t\t\tptr1 = interpreterProxy->firstIndexableField(oop1);\n\t\t\tptr1[0] = (((sqInt) intRet));\n\t\t\tinterpreterProxy->pushRemappableOop(oop1);\n\t\t\tretOop1 = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classExternalData(), 0);\n\n\t\t\t/* external address */\n\n\t\t\toop1 = interpreterProxy->popRemappableOop();\n\t\t\tinterpreterProxy->storePointerofObjectwithValue(0, retOop1, oop1);\n\n\t\t\t/* return type */\n\n\t\t\toop1 = interpreterProxy->popRemappableOop();\n\t\t\tinterpreterProxy->storePointerofObjectwithValue(1, retOop1, oop1);\n\t\t\tresult = interpreterProxy->methodReturnValue(retOop1);\n\t\t\tgoto l6;\n\t\t}\n\t\tinterpreterProxy->pushRemappableOop(retClass1);\n\t\tif (((calloutState->ffiRetHeader)) & FFIFlagStructure) {\n\t\t\tclassOop = interpreterProxy->classByteArray();\n\t\t}\n\t\telse {\n\t\t\tclassOop = interpreterProxy->classExternalAddress();\n\t\t}\n\t\toop1 = interpreterProxy->instantiateClassindexableSize(classOop, 4);\n\t\tptr1 = interpreterProxy->firstIndexableField(oop1);\n\t\tptr1[0] = (((sqInt) intRet));\n\n\t\t/* return class */\n\n\t\tretClass1 = interpreterProxy->popRemappableOop();\n\t\tinterpreterProxy->pushRemappableOop(oop1);\n\t\tretOop1 = interpreterProxy->instantiateClassindexableSize(retClass1, 0);\n\n\t\t/* external address */\n\n\t\toop1 = interpreterProxy->popRemappableOop();\n\t\tinterpreterProxy->storePointerofObjectwithValue(0, retOop1, oop1);\n\t\tresult = interpreterProxy->methodReturnValue(retOop1);\n\t\tgoto l6;\n\t}\n\tif (((calloutState->ffiRetHeader)) & FFIFlagStructure) {\n\t\t/* begin ffiReturnStruct:ofType:in: */\n\t\t/* begin ffiReturnType: */\n\t\tspecLiteral = (argArray != null\n\t\t\t? interpreterProxy->stackValue(1)\n\t\t\t: interpreterProxy->literalofMethod(0, interpreterProxy->primitiveMethod()));\n\t\targTypes = interpreterProxy->fetchPointerofObject(ExternalFunctionArgTypesIndex, specLiteral);\n\t\tffiRetType = interpreterProxy->fetchPointerofObject(0, argTypes);\n\t\tretClass = interpreterProxy->fetchPointerofObject(1, ffiRetType);\n\t\tretOop = interpreterProxy->instantiateClassindexableSize(retClass, 0);\n\t\tinterpreterProxy->pushRemappableOop(retOop);\n\t\toop2 = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), (calloutState->structReturnSize));\n\t\tif (returnStructInRegisters((calloutState->structReturnSize))) {\n\t\t\tmemcpy(interpreterProxy->firstIndexableField(oop2), (&intRet), (calloutState->structReturnSize));\n\t\t}\n\t\telse {\n\t\t\tmemcpy(interpreterProxy->firstIndexableField(oop2), (calloutState->limit), (calloutState->structReturnSize));\n\t\t}\n\t\tretOop = interpreterProxy->popRemappableOop();\n\t\tinterpreterProxy->storePointerofObjectwithValue(0, retOop, oop2);\n\t\tresult = interpreterProxy->methodReturnValue(retOop);\n\t\tgoto l6;\n\t}\n\tif ((atomicType == FFITypeSingleFloat)\n\t || (atomicType == FFITypeDoubleFloat)) {\n\t\tresult = interpreterProxy->methodReturnValue(interpreterProxy->floatObjectOf(floatRet));\n\t\tgoto l6;\n\t}\n\tresult = interpreterProxy->methodReturnValue(ffiCreateIntegralResultOopofAtomicTypein(intRet, atomicType, calloutState));\nl6:\t/* end ffiCalloutTo:SpecOnStack:in: */;\n\t/* begin cleanupCalloutState: */\n\twhile (((calloutState->stringArgIndex)) > 0) {\n\t\tfree(((calloutState->stringArgs))[(calloutState->stringArgIndex = ((calloutState->stringArgIndex)) - 1)]);\n\t}\nl3:\t/* end ffiCall:ArgArrayOrNil:NumArgs: */;\n\treturn;\n}\n\n\n/*\targuments: name(type, stack offset)\n\twidth(Integer, 4)\n\theight(Integer, 3)\n\trowPitch(Integer, 2)\n\tdepth(Integer, 1)\n\tisMSB(Boolean, 0) */\n\nEXPORT(sqInt)\nprimitiveCreateManualSurface(void)\n{\n    sqInt depth;\n    sqInt height;\n    sqInt isMSB;\n    sqInt result;\n    sqInt rowPitch;\n    sqInt width;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 5)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\twidth = interpreterProxy->stackIntegerValue(4);\n\theight = interpreterProxy->stackIntegerValue(3);\n\trowPitch = interpreterProxy->stackIntegerValue(2);\n\tdepth = interpreterProxy->stackIntegerValue(1);\n\tisMSB = interpreterProxy->stackObjectValue(0);\n\tisMSB = interpreterProxy->booleanValueOf(isMSB);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t;\n\t;\n\t;\n\t;\n\t;\n\tresult = createManualSurface(width, height, rowPitch, depth, isMSB);\n\tif (result < 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tresult = interpreterProxy->signed32BitIntegerFor(result);\n\treturn interpreterProxy->popthenPush(6, result);\n}\n\n\n/*\targuments: name(type, stack offset)\n\tsurfaceID(Integer, 0) */\n\nEXPORT(sqInt)\nprimitiveDestroyManualSurface(void)\n{\n    sqInt result;\n    sqInt surfaceID;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tsurfaceID = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tresult = destroyManualSurface(surfaceID);\n\tif (result == 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\treturn interpreterProxy->pop(1);\n}\n\n\n/*\tPrimitive. Allocate an object on the external heap. */\n\nEXPORT(sqInt)\nprimitiveFFIAllocate(void)\n{\n    sqInt addr;\n    sqInt byteSize;\n    sqInt oop;\n    int *ptr;\n\n\tbyteSize = interpreterProxy->stackIntegerValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\taddr = ffiAlloc(byteSize);\n\tif (addr == 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\toop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classExternalAddress(), 4);\n\tptr = interpreterProxy->firstIndexableField(oop);\n\tptr[0] = addr;\n\tinterpreterProxy->popthenPush(2, oop);\n}\n\n\n/*\tReturn a (signed or unsigned) n byte integer from the given byte offset. */\n\nEXPORT(sqInt)\nprimitiveFFIDoubleAt(void)\n{\n    sqInt addr;\n    sqInt byteOffset;\n    double  floatValue;\n    sqInt rcvr;\n\n\tbyteOffset = interpreterProxy->stackIntegerValue(0);\n\trcvr = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\taddr = ffiAddressOfstartingAtsize(rcvr, byteOffset, 8);\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\t((int*)(&floatValue))[0] = ((int*)addr)[0];\n\t((int*)(&floatValue))[1] = ((int*)addr)[1];\n\tinterpreterProxy->pop(2);\n\treturn interpreterProxy->pushFloat(floatValue);\n}\n\n\n/*\tReturn a (signed or unsigned) n byte integer from the given byte offset. */\n\nEXPORT(sqInt)\nprimitiveFFIDoubleAtPut(void)\n{\n    sqInt addr;\n    sqInt byteOffset;\n    sqInt floatOop;\n    double  floatValue;\n    sqInt rcvr;\n\n\tfloatOop = interpreterProxy->stackValue(0);\n\tif ((floatOop & 1)) {\n\t\tfloatValue = ((double) ((floatOop >> 1)));\n\t}\n\telse {\n\t\tfloatValue = ((double) (interpreterProxy->floatValueOf(floatOop)));\n\t}\n\tbyteOffset = interpreterProxy->stackIntegerValue(1);\n\trcvr = interpreterProxy->stackObjectValue(2);\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\taddr = ffiAddressOfstartingAtsize(rcvr, byteOffset, 8);\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\t((int*)addr)[0] = ((int*)(&floatValue))[0];\n\t((int*)addr)[1] = ((int*)(&floatValue))[1];\n\tinterpreterProxy->popthenPush(3, floatOop);\n}\n\n\n/*\tReturn a (signed or unsigned) n byte integer from the given byte offset. */\n\nEXPORT(sqInt)\nprimitiveFFIFloatAt(void)\n{\n    sqInt addr;\n    sqInt byteOffset;\n    float  floatValue;\n    sqInt rcvr;\n\n\tbyteOffset = interpreterProxy->stackIntegerValue(0);\n\trcvr = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\taddr = ffiAddressOfstartingAtsize(rcvr, byteOffset, 4);\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\t((int*)(&floatValue))[0] = ((int*)addr)[0];\n\tinterpreterProxy->pop(2);\n\treturn interpreterProxy->pushFloat(floatValue);\n}\n\n\n/*\tReturn a (signed or unsigned) n byte integer from the given byte offset. */\n\nEXPORT(sqInt)\nprimitiveFFIFloatAtPut(void)\n{\n    sqInt addr;\n    sqInt byteOffset;\n    sqInt floatOop;\n    float  floatValue;\n    sqInt rcvr;\n\n\tfloatOop = interpreterProxy->stackValue(0);\n\tif ((floatOop & 1)) {\n\t\tfloatValue = ((float) ((floatOop >> 1)));\n\t}\n\telse {\n\t\tfloatValue = ((float) (interpreterProxy->floatValueOf(floatOop)));\n\t}\n\tbyteOffset = interpreterProxy->stackIntegerValue(1);\n\trcvr = interpreterProxy->stackObjectValue(2);\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\taddr = ffiAddressOfstartingAtsize(rcvr, byteOffset, 4);\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\t((int*)addr)[0] = ((int*)(&floatValue))[0];\n\tinterpreterProxy->popthenPush(3, floatOop);\n}\n\n\n/*\tPrimitive. Free the object pointed to on the external heap. */\n\nEXPORT(sqInt)\nprimitiveFFIFree(void)\n{\n    sqInt addr;\n    sqInt oop;\n    int *ptr;\n\n\toop = interpreterProxy->stackObjectValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!((interpreterProxy->fetchClassOf(oop)) == (interpreterProxy->classExternalAddress()))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!((interpreterProxy->byteSizeOf(oop)) == 4)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tptr = interpreterProxy->firstIndexableField(oop);\n\n\t/* Don't you dare to free Squeak's memory! */\n\n\taddr = ptr[0];\n\tif ((addr == 0)\n\t || (interpreterProxy->isInMemory(addr))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tffiFree(addr);\n\treturn ptr[0] = 0;\n}\n\n\n/*\tPrimitive. Return the error code from a failed call to the foreign\n\tfunction interface.\n\tThis is for backwards-compatibility. Thread-safe access to the error code\n\tis via the\n\tprimitive error code. */\n\nEXPORT(sqInt)\nprimitiveFFIGetLastError(void)\n{\n\tinterpreterProxy->pop(1);\n\treturn interpreterProxy->pushInteger(ffiLastError);\n}\n\n\n/*\tReturn a (signed or unsigned) n byte integer from the given byte offset. */\n\nEXPORT(sqInt)\nprimitiveFFIIntegerAt(void)\n{\n    sqInt addr;\n    sqInt byteOffset;\n    sqInt byteSize;\n    sqInt isSigned;\n    sqInt mask;\n    sqInt rcvr;\n    sqInt value;\n\n\tisSigned = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(0));\n\tbyteSize = interpreterProxy->stackIntegerValue(1);\n\tbyteOffset = interpreterProxy->stackIntegerValue(2);\n\trcvr = interpreterProxy->stackObjectValue(3);\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\tif (!((byteOffset > 0)\n\t\t && ((byteSize == 1)\n || ((byteSize == 2)\n || (byteSize == 4))))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\taddr = ffiAddressOfstartingAtsize(rcvr, byteOffset, byteSize);\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\tif (byteSize < 4) {\n\t\tif (byteSize == 1) {\n\n\t\t\t/* short/byte */\n\n\t\t\tvalue = byteAt(addr);\n\t\t}\n\t\telse {\n\t\t\tvalue = *((short int *) addr);\n\t\t}\n\t\tif (isSigned) {\n\n\t\t\t/* sign extend value */\n\n\t\t\tmask = 1 << ((byteSize * 8) - 1);\n\t\t\tvalue = (value & (mask - 1)) - (value & mask);\n\t\t}\n\t\tvalue = ((value << 1) | 1);\n\t}\n\telse {\n\n\t\t/* general 32 bit integer */\n\n\t\tvalue = longAt(addr);\n\t\tvalue = (isSigned\n\t\t\t? interpreterProxy->signed32BitIntegerFor(value)\n\t\t\t: interpreterProxy->positive32BitIntegerFor(value));\n\t}\n\tinterpreterProxy->popthenPush(4, value);\n}\n\n\n/*\tStore a (signed or unsigned) n byte integer at the given byte offset. */\n\nEXPORT(sqInt)\nprimitiveFFIIntegerAtPut(void)\n{\n    sqInt addr;\n    sqInt byteOffset;\n    sqInt byteSize;\n    sqInt isSigned;\n    sqInt max;\n    sqInt rcvr;\n    sqInt value;\n    sqInt valueOop;\n\n\tisSigned = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(0));\n\tbyteSize = interpreterProxy->stackIntegerValue(1);\n\tvalueOop = interpreterProxy->stackValue(2);\n\tbyteOffset = interpreterProxy->stackIntegerValue(3);\n\trcvr = interpreterProxy->stackObjectValue(4);\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\tif (!((byteOffset > 0)\n\t\t && ((byteSize == 1)\n || ((byteSize == 2)\n || (byteSize == 4))))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\taddr = ffiAddressOfstartingAtsize(rcvr, byteOffset, byteSize);\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\tif (isSigned) {\n\t\tvalue = interpreterProxy->signed32BitValueOf(valueOop);\n\t}\n\telse {\n\t\tvalue = interpreterProxy->positive32BitValueOf(valueOop);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\tif (byteSize < 4) {\n\t\tif (isSigned) {\n\t\t\tmax = 1 << ((8 * byteSize) - 1);\n\t\t\tif (value >= max) {\n\t\t\t\treturn interpreterProxy->primitiveFail();\n\t\t\t}\n\t\t\tif (value < (0 - max)) {\n\t\t\t\treturn interpreterProxy->primitiveFail();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (value >= (1 << (8 * byteSize))) {\n\t\t\t\treturn interpreterProxy->primitiveFail();\n\t\t\t}\n\t\t}\n\t\tif (byteSize == 1) {\n\t\t\tbyteAtput(addr, value);\n\t\t}\n\t\telse {\n\t\t\t*((short int *) addr) = value;\n\t\t}\n\t}\n\telse {\n\t\tlongAtput(addr, value);\n\t}\n\tinterpreterProxy->popthenPush(5, valueOop);\n}\n\n\n/*\tPrimitive. Force loading the receiver (an instance of ExternalLibrary). */\n\nEXPORT(sqInt)\nprimitiveForceLoad(void)\n{\n    sqInt ffiModuleName;\n    sqInt moduleHandle;\n    sqInt moduleHandlePtr;\n    int *ptr;\n    sqInt rcvr;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 0)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\trcvr = interpreterProxy->stackValue(0);\n\tif (!(interpreterProxy->isKindOfClass(rcvr, interpreterProxy->classExternalLibrary()))) {\n\t\treturn ffiFail(FFIErrorBadExternalLibrary);\n\t}\n\tmoduleHandlePtr = interpreterProxy->fetchPointerofObject(0, rcvr);\n\t/* begin ffiContentsOfHandle:errCode: */\n\tif ((moduleHandlePtr & 1)) {\n\t\tmoduleHandle = ffiFail(FFIErrorBadExternalLibrary);\n\t\tgoto l1;\n\t}\n\tif (!(interpreterProxy->isBytes(moduleHandlePtr))) {\n\t\tmoduleHandle = ffiFail(FFIErrorBadExternalLibrary);\n\t\tgoto l1;\n\t}\n\tif (!((interpreterProxy->byteSizeOf(moduleHandlePtr)) == 4)) {\n\t\tmoduleHandle = ffiFail(FFIErrorBadExternalLibrary);\n\t\tgoto l1;\n\t}\n\tmoduleHandle = interpreterProxy->fetchPointerofObject(0, moduleHandlePtr);\nl1:\t/* end ffiContentsOfHandle:errCode: */;\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\tffiModuleName = interpreterProxy->fetchPointerofObject(1, rcvr);\n\tif (!(interpreterProxy->isBytes(ffiModuleName))) {\n\t\treturn ffiFail(FFIErrorBadExternalLibrary);\n\t}\n\tmoduleHandle = interpreterProxy->ioLoadModuleOfLength(((int) (interpreterProxy->firstIndexableField(ffiModuleName))), interpreterProxy->byteSizeOf(ffiModuleName));\n\tif (interpreterProxy->failed()) {\n\t\treturn ffiFail(FFIErrorModuleNotFound);\n\t}\n\tptr = interpreterProxy->firstIndexableField(moduleHandlePtr);\n\tptr[0] = moduleHandle;\n\treturn 0;\n}\n\n\n/*\tEnable logging of FFI calls by providing it with a log file name. */\n\nEXPORT(sqInt)\nprimitiveLogCallsTo(void)\n{\n    sqInt logFile;\n    sqInt ok;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tlogFile = interpreterProxy->stackObjectValue(0);\n\tif (logFile == (interpreterProxy->nilObject())) {\n\n\t\t/* disable logging */\n\n\t\tok = ffiLogFileNameOfLength(null, 0);\n\t\tif (!(ok)) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t\tffiLogEnabled = 0;\n\t}\n\telse {\n\t\tif (!(interpreterProxy->isBytes(logFile))) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t\tok = ffiLogFileNameOfLength(interpreterProxy->firstIndexableField(logFile), interpreterProxy->byteSizeOf(logFile));\n\t\tif (!(ok)) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t\tffiLogEnabled = 1;\n\t}\n\treturn interpreterProxy->pop(1);\n}\n\n\n/*\tCreate a 'manual surface' data-structure. See the ExternalForm class in\n\tthe FFI package for example usage. */\n/*\targuments: name(type, stack offset)\n\tsurfaceID(Integer, 1)\n\tptr(uint32, 0) */\n\nEXPORT(sqInt)\nprimitiveSetManualSurfacePointer(void)\n{\n    unsigned int ptr;\n    sqInt result;\n    sqInt surfaceID;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 2)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tsurfaceID = interpreterProxy->stackIntegerValue(1);\n\tptr = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(0));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t;\n\t;\n\tresult = setManualSurfacePointer(surfaceID, (void*)ptr);\n\tif (result == 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\treturn interpreterProxy->pop(2);\n}\n\n\n/*\tAnswer any space needed to prevent the alloca'ed outgoing arguments\n\tmarshalling area from\n\tbeing overwritten by any register arguments during calls during\n\tmarshalling. On x86 this is 0 */\n\nstatic sqInt\nregisterArgsSlop(void)\n{\n\treturn 0;\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n    sqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\n/*\tAnswer the first field of oop which is assumed to be an Alien of at least\n\t8 bytes\n */\n\nstatic sqInt\nsizeField(sqInt oop)\n{\n\treturn longAt(oop + BaseHeaderSize);\n}\n\n\n/*\t<Alien oop> ^<Integer> */\n/*\tAnswer the start of oop's data. For direct aliens this is the address of\n\tthe second field. For indirect and pointer aliens it is what the second\n\tfield points to. */\n\nstatic sqInt\nstartOfData(sqInt oop)\n{\n\treturn ((longAt(oop + BaseHeaderSize)) > 0\n\t\t? (oop + BaseHeaderSize) + BytesPerOop\n\t\t: longAt((oop + BaseHeaderSize) + BytesPerOop));\n}\n\n\n#if defined(SQUEAK_BUILTIN_PLUGIN) || defined(ROAR_VM)\nvoid* SqueakFFIPrims_exports[][3] = {\n\t{\"SqueakFFIPrims\", \"ffiLogCallsTo\", (void*)ffiLogCallsTo},\n\t{\"SqueakFFIPrims\", \"getModuleName\", (void*)getModuleName},\n\t{\"SqueakFFIPrims\", \"initialiseModule\", (void*)initialiseModule},\n\t{\"SqueakFFIPrims\", \"primitiveCallout\", (void*)primitiveCallout},\n\t{\"SqueakFFIPrims\", \"primitiveCalloutWithArgs\", (void*)primitiveCalloutWithArgs},\n\t{\"SqueakFFIPrims\", \"primitiveCreateManualSurface\", (void*)primitiveCreateManualSurface},\n\t{\"SqueakFFIPrims\", \"primitiveDestroyManualSurface\", (void*)primitiveDestroyManualSurface},\n\t{\"SqueakFFIPrims\", \"primitiveFFIAllocate\", (void*)primitiveFFIAllocate},\n\t{\"SqueakFFIPrims\", \"primitiveFFIDoubleAt\", (void*)primitiveFFIDoubleAt},\n\t{\"SqueakFFIPrims\", \"primitiveFFIDoubleAtPut\", (void*)primitiveFFIDoubleAtPut},\n\t{\"SqueakFFIPrims\", \"primitiveFFIFloatAt\", (void*)primitiveFFIFloatAt},\n\t{\"SqueakFFIPrims\", \"primitiveFFIFloatAtPut\", (void*)primitiveFFIFloatAtPut},\n\t{\"SqueakFFIPrims\", \"primitiveFFIFree\", (void*)primitiveFFIFree},\n\t{\"SqueakFFIPrims\", \"primitiveFFIGetLastError\", (void*)primitiveFFIGetLastError},\n\t{\"SqueakFFIPrims\", \"primitiveFFIIntegerAt\", (void*)primitiveFFIIntegerAt},\n\t{\"SqueakFFIPrims\", \"primitiveFFIIntegerAtPut\", (void*)primitiveFFIIntegerAtPut},\n\t{\"SqueakFFIPrims\", \"primitiveForceLoad\", (void*)primitiveForceLoad},\n\t{\"SqueakFFIPrims\", \"primitiveLogCallsTo\", (void*)primitiveLogCallsTo},\n\t{\"SqueakFFIPrims\", \"primitiveSetManualSurfacePointer\", (void*)primitiveSetManualSurfacePointer},\n\t{\"SqueakFFIPrims\", \"setInterpreter\", (void*)setInterpreter},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/StarSqueakPlugin/StarSqueakPlugin.c",
    "content": "/* Automatically generated by\n\tVMPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tStarSqueakPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"StarSqueakPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n\n/*** Function Prototypes ***/\nstatic unsigned int * checkedUnsignedIntPtrOf(sqInt oop);\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nstatic sqInt msg(char *s);\nEXPORT(sqInt) primitiveDiffuseFromToWidthHeightDelta(void);\nEXPORT(sqInt) primitiveEvaporateRate(void);\nEXPORT(sqInt) primitiveMapFromToWidthHeightPatchSizeRgbFlagsShift(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\n\n\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"StarSqueakPlugin VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"StarSqueakPlugin VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\n\n\n\n/*\tReturn an unsigned int pointer to the first indexable word of oop, which\n\tmust be a words object.\n */\n\nstatic unsigned int *\ncheckedUnsignedIntPtrOf(sqInt oop)\n{\n\tinterpreterProxy->success(interpreterProxy->isWords(oop));\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\treturn ((unsigned int *) (interpreterProxy->firstIndexableField(oop)));\n}\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\n\n/*\tDiffuse the integer values of the source patch variable Bitmap into the\n\toutput Bitmap. Each cell of the output is the average of the NxN area\n\taround it in the source, where N = (2 * delta) + 1.\n */\n\nEXPORT(sqInt)\nprimitiveDiffuseFromToWidthHeightDelta(void)\n{\n    sqInt area;\n    sqInt delta;\n    unsigned int *dst;\n    sqInt dstOop;\n    sqInt endX;\n    sqInt endY;\n    sqInt height;\n    sqInt rowStart;\n    unsigned int *src;\n    sqInt srcOop;\n    sqInt startX;\n    sqInt startY;\n    sqInt sum;\n    sqInt width;\n    sqInt x;\n    sqInt x2;\n    sqInt y;\n    sqInt y2;\n\n\tsrcOop = interpreterProxy->stackValue(4);\n\tdstOop = interpreterProxy->stackValue(3);\n\twidth = interpreterProxy->stackIntegerValue(2);\n\theight = interpreterProxy->stackIntegerValue(1);\n\tdelta = interpreterProxy->stackIntegerValue(0);\n\t/* begin checkedUnsignedIntPtrOf: */\n\tinterpreterProxy->success(interpreterProxy->isWords(srcOop));\n\tif (interpreterProxy->failed()) {\n\t\tsrc = 0;\n\t\tgoto l1;\n\t}\n\tsrc = ((unsigned int *) (interpreterProxy->firstIndexableField(srcOop)));\nl1:\t/* end checkedUnsignedIntPtrOf: */;\n\t/* begin checkedUnsignedIntPtrOf: */\n\tinterpreterProxy->success(interpreterProxy->isWords(dstOop));\n\tif (interpreterProxy->failed()) {\n\t\tdst = 0;\n\t\tgoto l2;\n\t}\n\tdst = ((unsigned int *) (interpreterProxy->firstIndexableField(dstOop)));\nl2:\t/* end checkedUnsignedIntPtrOf: */;\n\tinterpreterProxy->success((interpreterProxy->stSizeOf(srcOop)) == (interpreterProxy->stSizeOf(dstOop)));\n\tinterpreterProxy->success((interpreterProxy->stSizeOf(srcOop)) == (width * height));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tarea = ((2 * delta) + 1) * ((2 * delta) + 1);\n\tfor (y = 0; y <= (height - 1); y += 1) {\n\t\tstartY = y - delta;\n\t\tif (startY < 0) {\n\t\t\tstartY = 0;\n\t\t}\n\t\tendY = y + delta;\n\t\tif (endY >= height) {\n\t\t\tendY = height - 1;\n\t\t}\n\t\tfor (x = 0; x <= (width - 1); x += 1) {\n\t\t\tstartX = x - delta;\n\t\t\tif (startX < 0) {\n\t\t\t\tstartX = 0;\n\t\t\t}\n\t\t\tendX = x + delta;\n\t\t\tif (endX >= width) {\n\t\t\t\tendX = width - 1;\n\t\t\t}\n\t\t\tsum = 0;\n\t\t\tfor (y2 = startY; y2 <= endY; y2 += 1) {\n\t\t\t\trowStart = y2 * width;\n\t\t\t\tfor (x2 = startX; x2 <= endX; x2 += 1) {\n\t\t\t\t\tsum += src[rowStart + x2];\n\t\t\t\t}\n\t\t\t}\n\t\t\tdst[(y * width) + x] = (sum / area);\n\t\t}\n\t}\n\tinterpreterProxy->pop(5);\n}\n\n\n/*\tEvaporate the integer values of the source Bitmap at the given rate. The\n\trate is an integer between 0 and 1024, where 1024 is a scale factor of 1.0\n\t(i.e., no evaporation).\n */\n\nEXPORT(sqInt)\nprimitiveEvaporateRate(void)\n{\n    sqInt i;\n    unsigned int *patchVar;\n    sqInt patchVarOop;\n    sqInt rate;\n    sqInt sz;\n\n\tpatchVarOop = interpreterProxy->stackValue(1);\n\trate = interpreterProxy->stackIntegerValue(0);\n\t/* begin checkedUnsignedIntPtrOf: */\n\tinterpreterProxy->success(interpreterProxy->isWords(patchVarOop));\n\tif (interpreterProxy->failed()) {\n\t\tpatchVar = 0;\n\t\tgoto l1;\n\t}\n\tpatchVar = ((unsigned int *) (interpreterProxy->firstIndexableField(patchVarOop)));\nl1:\t/* end checkedUnsignedIntPtrOf: */;\n\tsz = interpreterProxy->stSizeOf(patchVarOop);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tfor (i = 0; i <= (sz - 1); i += 1) {\n\t\tpatchVar[i] = (((usqInt) ((patchVar[i]) * rate)) >> 10);\n\t}\n\tinterpreterProxy->pop(2);\n}\n\nEXPORT(sqInt)\nprimitiveMapFromToWidthHeightPatchSizeRgbFlagsShift(void)\n{\n    unsigned int *dst;\n    sqInt dstIndex;\n    sqInt dstOop;\n    sqInt h;\n    sqInt level;\n    sqInt offset;\n    sqInt patchSize;\n    sqInt pixel;\n    sqInt rgbFlags;\n    sqInt rgbMult;\n    sqInt rowStart;\n    sqInt shiftAmount;\n    unsigned int *src;\n    sqInt srcIndex;\n    sqInt srcOop;\n    sqInt w;\n    sqInt x;\n    sqInt y;\n\n\tsrcOop = interpreterProxy->stackValue(6);\n\tdstOop = interpreterProxy->stackValue(5);\n\tw = interpreterProxy->stackIntegerValue(4);\n\th = interpreterProxy->stackIntegerValue(3);\n\tpatchSize = interpreterProxy->stackIntegerValue(2);\n\trgbFlags = interpreterProxy->stackIntegerValue(1);\n\tshiftAmount = interpreterProxy->stackIntegerValue(0);\n\t/* begin checkedUnsignedIntPtrOf: */\n\tinterpreterProxy->success(interpreterProxy->isWords(srcOop));\n\tif (interpreterProxy->failed()) {\n\t\tsrc = 0;\n\t\tgoto l1;\n\t}\n\tsrc = ((unsigned int *) (interpreterProxy->firstIndexableField(srcOop)));\nl1:\t/* end checkedUnsignedIntPtrOf: */;\n\t/* begin checkedUnsignedIntPtrOf: */\n\tinterpreterProxy->success(interpreterProxy->isWords(dstOop));\n\tif (interpreterProxy->failed()) {\n\t\tdst = 0;\n\t\tgoto l2;\n\t}\n\tdst = ((unsigned int *) (interpreterProxy->firstIndexableField(dstOop)));\nl2:\t/* end checkedUnsignedIntPtrOf: */;\n\tinterpreterProxy->success((interpreterProxy->stSizeOf(dstOop)) == (w * h));\n\tinterpreterProxy->success((interpreterProxy->stSizeOf(dstOop)) == (((interpreterProxy->stSizeOf(srcOop)) * patchSize) * patchSize));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\trgbMult = 0;\n\tif ((rgbFlags & 4) > 0) {\n\t\trgbMult += 65536;\n\t}\n\tif ((rgbFlags & 2) > 0) {\n\t\trgbMult += 256;\n\t}\n\tif ((rgbFlags & 1) > 0) {\n\t\trgbMult += 1;\n\t}\n\tsrcIndex = -1;\n\tfor (y = 0; y <= ((h / patchSize) - 1); y += 1) {\n\t\tfor (x = 0; x <= ((w / patchSize) - 1); x += 1) {\n\t\t\tlevel = ((shiftAmount < 0) ? ((usqInt) (src[(srcIndex += 1)]) >> -shiftAmount) : ((usqInt) (src[(srcIndex += 1)]) << shiftAmount));\n\t\t\tif (level > 255) {\n\t\t\t\tlevel = 255;\n\t\t\t}\n\t\t\tif (level <= 0) {\n\n\t\t\t\t/* non-transparent black */\n\n\t\t\t\tpixel = 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpixel = level * rgbMult;\n\t\t\t}\n\t\t\toffset = ((y * w) + x) * patchSize;\n\t\t\tfor (rowStart = offset; rowStart <= (offset + ((patchSize - 1) * w)); rowStart += w) {\n\t\t\t\tfor (dstIndex = rowStart; dstIndex <= ((rowStart + patchSize) - 1); dstIndex += 1) {\n\t\t\t\t\tdst[dstIndex] = pixel;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy->pop(7);\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n    sqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* StarSqueakPlugin_exports[][3] = {\n\t{\"StarSqueakPlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"StarSqueakPlugin\", \"primitiveDiffuseFromToWidthHeightDelta\", (void*)primitiveDiffuseFromToWidthHeightDelta},\n\t{\"StarSqueakPlugin\", \"primitiveEvaporateRate\", (void*)primitiveEvaporateRate},\n\t{\"StarSqueakPlugin\", \"primitiveMapFromToWidthHeightPatchSizeRgbFlagsShift\", (void*)primitiveMapFromToWidthHeightPatchSizeRgbFlagsShift},\n\t{\"StarSqueakPlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/UUIDPlugin/UUIDPlugin.c",
    "content": "/* Automatically generated by\n\tSmartSyntaxPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tUUIDPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"UUIDPlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"UUIDPlugin.h\"\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n\n/*** Function Prototypes ***/\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nEXPORT(sqInt) initialiseModule(void);\nstatic sqInt msg(char *s);\nEXPORT(sqInt) primitiveMakeUUID(void);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\nEXPORT(sqInt) shutdownModule(void);\nstatic void sqAssert(sqInt aBool);\n\n\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"UUIDPlugin VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"UUIDPlugin VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\n\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\nEXPORT(sqInt)\ninitialiseModule(void)\n{\n\treturn sqUUIDInit();\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\nEXPORT(sqInt)\nprimitiveMakeUUID(void)\n{\n\tchar*location;\n\tsqInt oop;\n\n\toop = interpreterProxy->stackObjectValue(0);\n\tif ((interpreterProxy->failed())\n\t || (((interpreterProxy->methodArgumentCount()) != 0)\n || ((!(interpreterProxy->isBytes(oop)))\n || ((interpreterProxy->byteSizeOf(oop)) != 16)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tlocation = interpreterProxy->firstIndexableField(oop);\n\tMakeUUID(location);\n\treturn oop;\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n\tsqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\nEXPORT(sqInt)\nshutdownModule(void)\n{\n\treturn sqUUIDShutdown();\n}\n\nstatic void\nsqAssert(sqInt aBool)\n{\n\t/* missing DebugCode */;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* UUIDPlugin_exports[][3] = {\n\t{\"UUIDPlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"UUIDPlugin\", \"initialiseModule\", (void*)initialiseModule},\n\t{\"UUIDPlugin\", \"primitiveMakeUUID\", (void*)primitiveMakeUUID},\n\t{\"UUIDPlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{\"UUIDPlugin\", \"shutdownModule\", (void*)shutdownModule},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c",
    "content": "/* Automatically generated from Squeak on 23 January 2011 3:56:04 pm \n   by VMMaker 4.4.7\n */\n\n// added bu dmu\n#define AIO_X\t(1<<0)\t/* handle for exceptions */\n#define AIO_R\t(1<<1)\t/* handle for read */\n#define AIO_W\t(1<<2)\t/* handle for write */\n#define AIO_SEQ\t(1<<3)\t/* call handlers sequentially  */\n#define AIO_EXT\t(1<<4)\t/* external fd -- don't close on aio shutdown  */\n\n#define AIO_RW\t(AIO_R | AIO_W)\n#define AIO_RX\t(AIO_R | AIO_X)\n#define AIO_WX\t(AIO_W | AIO_X)\n\n#define AIO_RWX\t(AIO_R | AIO_W | AIO_X)\n\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n#include <sys/types.h>\n/* D T Lewis - UnixOSProcessPlugin.c translated from class\n   UnixOSProcessPlugin of OSProcessPlugin version 4.3.3 */\n#include <sys/time.h>\n#include <sys/wait.h>\n#include <signal.h>\n#include <unistd.h>\n#include <stdlib.h>\n#include <fcntl.h>\n#include <signal.h>\n#include <pthread.h>\n#include <sys/stat.h>\n#include <errno.h>\n#include \"config.h\"\n#define FILEHANDLETYPE FILE *  /* the type of low level stream to be used in a struct SQFile */\n#ifndef SQAIO_H\n# define SQAIO_H \"aio.h\"          /* aio.h has been renamed to sqaio.h */\n#endif\n# if Configure_Squeak_Code_for_Tilera  // xxx_dmu\n# undef SQAIO_H // xxx_dmu\n# define SQAIO_H \"sqaio.h\" // xxx_dmu\n# endif\n#include SQAIO_H\n#include \"FilePlugin.h\"\n#include \"SocketPlugin.h\"\n#define SESSIONIDENTIFIERTYPE int\n\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n\n/*** Function Prototypes ***/\nstatic void aioForwardwithDataandFlags(int fd, void *data, int flags);\nstatic char * cStringFromString(sqInt aString);\nstatic void * callocWrappersize(sqInt count, sqInt objectSize);\nstatic sqInt copyBytesFromtolength(void *charArray1, void *charArray2, sqInt len);\nstatic sqInt createPipeForReaderwriter(FILEHANDLETYPE *readerIOStreamPtr, FILEHANDLETYPE *writerIOStreamPtr);\nstatic sqInt descriptorTableSize(void);\nstatic void dupToStdErr(sqInt anSQFileDataStructure);\nstatic void dupToStdIn(sqInt anSQFileDataStructure);\nstatic void dupToStdOut(sqInt anSQFileDataStructure);\nstatic sqInt fileDescriptorFrom(sqInt aSQFileByteArray);\nstatic FILEHANDLETYPE fileHandleFrom(sqInt sqFileStructByteArray);\nstatic sqInt fileRecordSize(void);\nstatic SQFile * fileValueOf(sqInt anSQFileRecord);\nstatic sqInt fixPointersInArrayOfStringswithOffsetscount(char *flattenedArrayOfStrings, sqInt *offsetArray, sqInt count);\nstatic sqInt forkAndExecInDirectory(sqInt useSignalHandler);\n#pragma export on\nEXPORT(pid_t) forkSqueak(sqInt useSignalHandler);\n#pragma export off\nstatic void * forwardSignaltoSemaphoreAt(sqInt sigNum, sqInt semaphoreIndex);\nstatic VirtualMachine * getInterpreter(void);\n#pragma export on\nEXPORT(const char*) getModuleName(void);\n#pragma export off\nstatic sqInt getThisSessionIdentifier(void);\nstatic sqInt halt(void);\nstatic void handleSignal(int sigNum);\nstatic void * handleSignalFunctionAddress(void);\n#pragma export on\nEXPORT(sqInt) initialiseModule(void);\n#pragma export off\nstatic sqInt initializeModuleForPlatform(void);\nstatic sqInt isNonNullSQFile(sqInt objectPointer);\nstatic sqInt isNullSQSocket(sqInt objectPointer);\nstatic sqInt isSQFileObject(sqInt objectPointer);\nstatic sqInt isSQSocketObject(sqInt objectPointer);\nstatic sqInt isValidFileSession(sqInt objectPointer);\nstatic sqInt isVmThread(void);\nstatic sqInt makePipeForReaderwriter(FILEHANDLETYPE *readerIOStreamPtr, FILEHANDLETYPE *writerIOStreamPtr);\nstatic sqInt maskForThisThreadAndResend(int sigNum);\nstatic sqInt maskSignalForThisThread(int sigNum);\n#pragma export on\nEXPORT(sqInt) moduleUnloaded(char *aModuleName);\n#pragma export off\nstatic sqInt msg(char *s);\nstatic sqInt newPthreadTypeByteArray(sqInt aPthreadType);\nstatic sqInt newSQFileByteArray(void);\nstatic sqInt newSQSocketByteArray(void);\nstatic void ** originalSignalHandlers(void);\nstatic void * pointerFrom(sqInt aByteArray);\n#pragma export on\nEXPORT(sqInt) primitiveAioDisable(void);\nEXPORT(sqInt) primitiveAioEnable(void);\nEXPORT(sqInt) primitiveAioHandle(void);\nEXPORT(sqInt) primitiveAioSuspend(void);\nEXPORT(sqInt) primitiveArgumentAt(void);\nEXPORT(sqInt) primitiveCanReceiveSignals(sqInt anIntegerPid);\nEXPORT(sqInt) primitiveChdir(void);\nEXPORT(sqInt) primitiveCreatePipe(void);\nEXPORT(sqInt) primitiveCreatePipeWithSessionIdentifier(void);\nEXPORT(sqInt) primitiveDupTo(sqInt oldFileDescriptor, sqInt newFileDescriptor);\nEXPORT(sqInt) primitiveEnvironmentAt(void);\nEXPORT(sqInt) primitiveEnvironmentAtSymbol(void);\nEXPORT(sqInt) primitiveErrorMessageAt(void);\nEXPORT(sqInt) primitiveFileProtectionMask(void);\nEXPORT(sqInt) primitiveFileStat(void);\nEXPORT(sqInt) primitiveFixPointersInArrayOfStrings(void);\nEXPORT(sqInt) primitiveForkAndExecInDirectory(void);\nEXPORT(sqInt) primitiveForkExec(void);\nEXPORT(sqInt) primitiveForkSqueak(void);\nEXPORT(sqInt) primitiveForkSqueakWithoutSigHandler(void);\nEXPORT(sqInt) primitiveForwardSignalToSemaphore(void);\nEXPORT(sqInt) primitiveGetCurrentWorkingDirectory(void);\nEXPORT(sqInt) primitiveGetEGid(void);\nEXPORT(sqInt) primitiveGetEUid(void);\nEXPORT(sqInt) primitiveGetGid(void);\nEXPORT(sqInt) primitiveGetPGid(void);\nEXPORT(sqInt) primitiveGetPGrp(void);\nEXPORT(sqInt) primitiveGetPPid(void);\nEXPORT(sqInt) primitiveGetPid(void);\nEXPORT(sqInt) primitiveGetSession(void);\nEXPORT(sqInt) primitiveGetStdErrHandle(void);\nEXPORT(sqInt) primitiveGetStdErrHandleWithSessionIdentifier(void);\nEXPORT(sqInt) primitiveGetStdInHandle(void);\nEXPORT(sqInt) primitiveGetStdInHandleWithSessionIdentifier(void);\nEXPORT(sqInt) primitiveGetStdOutHandle(void);\nEXPORT(sqInt) primitiveGetStdOutHandleWithSessionIdentifier(void);\nEXPORT(sqInt) primitiveGetThreadID(void);\nEXPORT(sqInt) primitiveGetUid(void);\nEXPORT(sqInt) primitiveIsAtEndOfFile(void);\nEXPORT(sqInt) primitiveKillOnExit(void);\nEXPORT(sqInt) primitiveLockFileRegion(void);\nEXPORT(sqInt) primitiveMakePipe(void);\nEXPORT(sqInt) primitiveMakePipeWithSessionIdentifier(void);\nEXPORT(sqInt) primitiveModuleName(void);\nEXPORT(sqInt) primitiveNice(void);\nEXPORT(sqInt) primitivePutEnv(void);\nEXPORT(sqInt) primitiveRealpath(void);\nEXPORT(sqInt) primitiveReapChildProcess(void);\nEXPORT(sqInt) primitiveSQFileFlush(void);\nEXPORT(sqInt) primitiveSQFileFlushWithSessionIdentifier(void);\nEXPORT(sqInt) primitiveSQFileSetBlocking(void);\nEXPORT(sqInt) primitiveSQFileSetBlockingWithSessionIdentifier(void);\nEXPORT(sqInt) primitiveSQFileSetNonBlocking(void);\nEXPORT(sqInt) primitiveSQFileSetNonBlockingWithSessionIdentifier(void);\nEXPORT(sqInt) primitiveSQFileSetUnbuffered(void);\nEXPORT(sqInt) primitiveSQFileSetUnbufferedWithSessionIdentifier(void);\nEXPORT(sqInt) primitiveSemaIndexFor(void);\nEXPORT(sqInt) primitiveSendSigabrtTo(sqInt anIntegerPid);\nEXPORT(sqInt) primitiveSendSigalrmTo(sqInt anIntegerPid);\nEXPORT(sqInt) primitiveSendSigchldTo(sqInt anIntegerPid);\nEXPORT(sqInt) primitiveSendSigcontTo(sqInt anIntegerPid);\nEXPORT(sqInt) primitiveSendSighupTo(sqInt anIntegerPid);\nEXPORT(sqInt) primitiveSendSigintTo(sqInt anIntegerPid);\nEXPORT(sqInt) primitiveSendSigkillTo(sqInt anIntegerPid);\nEXPORT(sqInt) primitiveSendSigpipeTo(sqInt anIntegerPid);\nEXPORT(sqInt) primitiveSendSigquitTo(sqInt anIntegerPid);\nEXPORT(sqInt) primitiveSendSigstopTo(sqInt anIntegerPid);\nEXPORT(sqInt) primitiveSendSigtermTo(sqInt anIntegerPid);\nEXPORT(sqInt) primitiveSendSigusr1To(sqInt anIntegerPid);\nEXPORT(sqInt) primitiveSendSigusr2To(sqInt anIntegerPid);\nEXPORT(sqInt) primitiveSetPGid(void);\nEXPORT(sqInt) primitiveSetPGrp(void);\nEXPORT(sqInt) primitiveSetSemaIndex(void);\nEXPORT(sqInt) primitiveSetSid(void);\nEXPORT(sqInt) primitiveSigChldNumber(void);\nEXPORT(sqInt) primitiveSigHupNumber(void);\nEXPORT(sqInt) primitiveSigIntNumber(void);\nEXPORT(sqInt) primitiveSigKillNumber(void);\nEXPORT(sqInt) primitiveSigPipeNumber(void);\nEXPORT(sqInt) primitiveSigQuitNumber(void);\nEXPORT(sqInt) primitiveSigTermNumber(void);\nEXPORT(sqInt) primitiveSigUsr1Number(void);\nEXPORT(sqInt) primitiveSigUsr2Number(void);\nEXPORT(sqInt) primitiveSizeOfInt(void);\nEXPORT(sqInt) primitiveSizeOfPointer(void);\nEXPORT(sqInt) primitiveTestEndOfFileFlag(void);\nEXPORT(sqInt) primitiveTestLockableFileRegion(void);\nEXPORT(sqInt) primitiveUnixFileClose(sqInt anIntegerFileNumber);\nEXPORT(sqInt) primitiveUnixFileNumber(void);\nEXPORT(sqInt) primitiveUnlockFileRegion(void);\nEXPORT(sqInt) primitiveUnsetEnv(void);\nEXPORT(sqInt) primitiveVersionString(void);\n#pragma export off\nstatic void reapChildProcess(int sigNum);\nstatic sqInt resendSignal(int sigNum);\nstatic void restoreDefaultSignalHandlers(void);\nstatic sqInt sandboxSecurity(void);\nstatic sqInt securityHeurisitic(void);\nstatic unsigned char * semaphoreIndices(void);\nstatic sqInt sendSignaltoPid(sqInt sig, sqInt pid);\nstatic void sendSignalToPids(void);\nstatic SESSIONIDENTIFIERTYPE sessionIdentifierFrom(sqInt aByteArray);\nstatic SESSIONIDENTIFIERTYPE sessionIdentifierFromSqFile(SQFile *sqFile);\n#pragma export on\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\n#pragma export off\nstatic void setSigChldDefaultHandler(void);\nstatic void setSigChldHandler(void);\nstatic void setSigIntDefaultHandler(void);\nstatic void setSigIntIgnore(void);\nstatic void setSigPipeDefaultHandler(void);\nstatic sqInt setSigPipeHandler(void);\nstatic void setSigPipeIgnore(void);\nstatic void * setSignalNumberhandler(sqInt anInteger, void *signalHandlerAddress);\n#pragma export on\nEXPORT(sqInt) shutdownModule(void);\n#pragma export off\nstatic sqInt sigAbrtNumber(void);\nstatic sqInt sigAlrmNumber(void);\nstatic sqInt sigChldNumber(void);\nstatic sqInt sigContNumber(void);\nstatic void * sigDefaultNumber(void);\nstatic void * sigErrorNumber(void);\nstatic sqInt sigHupNumber(void);\nstatic void * sigIgnoreNumber(void);\nstatic sqInt sigIntNumber(void);\nstatic sqInt sigKillNumber(void);\nstatic sqInt sigPipeNumber(void);\nstatic sqInt sigQuitNumber(void);\nstatic sqInt sigStopNumber(void);\nstatic sqInt sigTermNumber(void);\nstatic sqInt sigUsr1Number(void);\nstatic sqInt sigUsr2Number(void);\nstatic sqInt signalArraySize(void);\nstatic void ** signalHandlers(void);\nstatic sqInt sizeOfInt(void);\nstatic sqInt sizeOfPointer(void);\nstatic sqInt sizeOfSession(void);\nstatic int socketDescriptorFrom(sqInt sqSocketOop);\nstatic sqInt socketRecordSize(void);\nstatic SQSocket * socketValueOf(sqInt anSQSocketRecord);\nstatic sqInt stringFromCString(const char *aCString);\nstatic char * transientCStringFromString(sqInt aString);\nstatic int unixFileNumber(FILEHANDLETYPE fileHandle);\nstatic char * versionString(void);\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"UnixOSProcessPlugin 23 January 2011 (i)\"\n#else\n\t\"UnixOSProcessPlugin 23 January 2011 (e)\"\n#endif\n;\nstatic void *originalSigHandlers[NSIG];\nstatic int osprocessSandboxSecurity;\nstatic pid_t *pidArray = NULL;\nstatic sqInt pidCount;\nstatic unsigned char semaIndices[NSIG];\nstatic sqInt sigChldSemaIndex;\nstatic void *sigHandlers[NSIG];\nstatic int sigNumToSend = SIGTERM;\nstatic pthread_t vmThread;\n\n\n\n/*\tDeprecated. This primitive has been replaced by a similar implementation in AioPlugin. */\n/*\tThis function is called to signal a Smalltalk Semaphore when an asynchronous event is\n\tdetected. When translated to C, the name of this method is aioForwardwithDataandFlags.\n\tThe event handler is set up by #primitiveAioHandle. */\n\nstatic void aioForwardwithDataandFlags(int fd, void *data, int flags) {\n    sqInt *pfd;\n    sqInt semaIndex;\n\n\tpfd = data;\n\tsemaIndex = *pfd;\n\tinterpreterProxy->signalSemaphoreWithIndex(semaIndex);\n}\n\n\n/*\tAnswer a new null-terminated C string copied from aString. The C string\n\tis allocated from the C runtime heap. See transientCStringFromString for\n\ta version which allocates from object memory.\n\tCaution: This may invoke the garbage collector. */\n\nstatic char * cStringFromString(sqInt aString) {\n    char *cString;\n    sqInt len;\n    char *sPtr;\n\n\tsPtr = interpreterProxy->arrayValueOf(aString);\n\tlen = interpreterProxy->sizeOfSTArrayFromCPrimitive(sPtr);\n\n\t/* Space for a null terminated C string. */\n\n\tcString = callocWrappersize(len + 1, 1);\n\t(char *) strncpy (cString, sPtr, len);\n\treturn cString;\n}\n\n\n/*\tUsing malloc() and calloc() is something I would like to avoid, since it is\n\tlikely to cause problems some time in the future if somebody redesigns\n\tobject memory allocation. This wrapper just makes it easy to find senders\n\tof calloc() in my code. -dtl */\n\nstatic void * callocWrappersize(sqInt count, sqInt objectSize) {\n\treturn calloc(count, objectSize);\n}\n\n\n/*\tself cCode: 'memcpy(charArray2, charArray1, len' */\n\nstatic sqInt copyBytesFromtolength(void *charArray1, void *charArray2, sqInt len) {\n\tmemcpy(charArray2, charArray1, len);\n}\n\n\n/*\tCreate a pipe and populate the readerIOStream and writerIOStream variables.\n\tThe SIGPIPE handler must have been set before creating the pipe. Answer true for\n\tsuccess, else false. */\n\nstatic sqInt createPipeForReaderwriter(FILEHANDLETYPE *readerIOStreamPtr, FILEHANDLETYPE *writerIOStreamPtr) {\n    int filedes[2];\n\n\tif ((pipe(filedes)) == -1) {\n\t\treturn 0;\n\t} else {\n\t\t*writerIOStreamPtr= (FILE *) fdopen (filedes[1], \"a\");\n\t\t*readerIOStreamPtr= (FILE *) fdopen (filedes[0], \"r\");\n\t\treturn 1;\n\t}\n}\n\n\n/*\tAnswer the size of the file descriptor table for a process. I am not sure of the most portable\n\tway to do this. If this implementation does not work on your Unix platform, try changing\n\tit to answer the value of FOPEN:=MAX, which will hopefully be defined in stdio.h. If\n\tall else fails, just hard code it to answer 20, which would be safe for any Unix. */\n\nstatic sqInt descriptorTableSize(void) {\n\treturn getdtablesize();\n}\n\n\n/*\tDup a file descriptor to allow it to be attached as the standard error when we\n\texec() a new executable. This is Unix specific, in that it assumes that file descriptor\n\t0 is stdin, 1 is stdout, and 2 is stderr. The dup2() call is used to copy the open file\n\tdescriptors into file descriptors 0, 1 and 2 so that the image which we execute will\n\tuse them as stdin, stdout, and stderr. */\n\nstatic void dupToStdErr(sqInt anSQFileDataStructure) {\n    sqInt filenoToDup;\n\n\t/* begin fileDescriptorFrom: */\n\tif (!((((interpreterProxy->isBytes(anSQFileDataStructure)) && ((interpreterProxy->byteSizeOf(anSQFileDataStructure)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(anSQFileDataStructure))))) && (isNonNullSQFile(anSQFileDataStructure)))) {\n\t\tfilenoToDup = -1;\n\t\tgoto l1;\n\t}\n\tfilenoToDup = fileno(fileHandleFrom(anSQFileDataStructure));\nl1:\t/* end fileDescriptorFrom: */;\n\tif (!(filenoToDup < 0)) {\n\t\tif (!(filenoToDup == 2)) {\n\t\t\tfflush(stderr);\n\t\t\tdup2(filenoToDup, 2);\n\t\t}\n\t}\n}\n\n\n/*\tDup a file descriptor to allow it to be attached as the standard input when we\n\texec() a new executable. This is Unix specific, in that it assumes that file descriptor\n\t0 is stdin, 1 is stdout, and 2 is stderr. The dup2() call is used to copy the open file\n\tdescriptors into file descriptors 0, 1 and 2 so that the image which we execute will\n\tuse them as stdin, stdout, and stderr. */\n\nstatic void dupToStdIn(sqInt anSQFileDataStructure) {\n    sqInt filenoToDup;\n\n\t/* begin fileDescriptorFrom: */\n\tif (!((((interpreterProxy->isBytes(anSQFileDataStructure)) && ((interpreterProxy->byteSizeOf(anSQFileDataStructure)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(anSQFileDataStructure))))) && (isNonNullSQFile(anSQFileDataStructure)))) {\n\t\tfilenoToDup = -1;\n\t\tgoto l1;\n\t}\n\tfilenoToDup = fileno(fileHandleFrom(anSQFileDataStructure));\nl1:\t/* end fileDescriptorFrom: */;\n\tif (!(filenoToDup < 0)) {\n\t\tif (!(filenoToDup == 0)) {\n\t\t\tfflush(stdin);\n\t\t\tdup2(filenoToDup, 0);\n\t\t\trewind(stdin);\n\t\t}\n\t}\n}\n\n\n/*\tDup a file descriptor to allow it to be attached as the standard output when we\n\texec() a new executable. This is Unix specific, in that it assumes that file descriptor\n\t0 is stdin, 1 is stdout, and 2 is stderr. The dup2() call is used to copy the open file\n\tdescriptors into file descriptors 0, 1 and 2 so that the image which we execute will\n\tuse them as stdin, stdout, and stderr. */\n\nstatic void dupToStdOut(sqInt anSQFileDataStructure) {\n    sqInt filenoToDup;\n\n\t/* begin fileDescriptorFrom: */\n\tif (!((((interpreterProxy->isBytes(anSQFileDataStructure)) && ((interpreterProxy->byteSizeOf(anSQFileDataStructure)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(anSQFileDataStructure))))) && (isNonNullSQFile(anSQFileDataStructure)))) {\n\t\tfilenoToDup = -1;\n\t\tgoto l1;\n\t}\n\tfilenoToDup = fileno(fileHandleFrom(anSQFileDataStructure));\nl1:\t/* end fileDescriptorFrom: */;\n\tif (!(filenoToDup < 0)) {\n\t\tif (!(filenoToDup == 1)) {\n\t\t\tfflush(stdout);\n\t\t\tdup2(filenoToDup, 1);\n\t\t}\n\t}\n}\n\n\n/*\tAnswer the OS file descriptor, an integer value, from a SQFile data structure\n\tbyte array, or answer -1 if unable to obtain the file descriptor (probably due\n\tto receiving an incorrect type of object as aFileHandle). */\n/*\treturn type should be int, but skip the declaration to permit inlining */\n\nstatic sqInt fileDescriptorFrom(sqInt aSQFileByteArray) {\n\tif (!((((interpreterProxy->isBytes(aSQFileByteArray)) && ((interpreterProxy->byteSizeOf(aSQFileByteArray)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(aSQFileByteArray))))) && (isNonNullSQFile(aSQFileByteArray)))) {\n\t\treturn -1;\n\t}\n\treturn fileno(fileHandleFrom(aSQFileByteArray));\n}\n\n\n/*\tAnswer a file handle from a SQFile structure. On most platforms, this\n\twill be a (FILE *). On Win32, it is a HANDLE. */\n\nstatic FILEHANDLETYPE fileHandleFrom(sqInt sqFileStructByteArray) {\n    SQFile *sqFile;\n\n\tsqFile = interpreterProxy->arrayValueOf(sqFileStructByteArray);\n\treturn sqFile->file;\n}\n\n\n/*\tAnswer the size of a SQFile data structure in bytes. */\n\nstatic sqInt fileRecordSize(void) {\n\treturn sizeof(SQFile);\n}\n\n\n/*\tReturn a pointer to the first byte of of the SQFile data structure file record within\n\tanSQFileRecord, which is expected to be a ByteArray of size self>>fileRecordSize. */\n\nstatic SQFile * fileValueOf(sqInt anSQFileRecord) {\n\treturn interpreterProxy->arrayValueOf(anSQFileRecord);\n}\n\n\n/*\tUse the address offsets in offsetArray to fix up the pointers in cStringArray.\n\tThe result is a C array of pointers to char, used for argv and env vectors. */\n\nstatic sqInt fixPointersInArrayOfStringswithOffsetscount(char *flattenedArrayOfStrings, sqInt *offsetArray, sqInt count) {\n    sqInt idx;\n    char **ptr;\n\n\tptr = ((char **) flattenedArrayOfStrings);\n\tidx = 0;\n\twhile (idx < count) {\n\t\tptr[idx] = (flattenedArrayOfStrings + (((offsetArray[idx]) >> 1)));\n\t\tidx += 1;\n\t}\n}\n\n\n/*\tFork a child OS process, and do an exec in the child. The parent continues on in\n\tSmalltalk, and this method answers the pid of the child which was created. If\n\tuseSignalHandler is true, set the signal handler for SIGCHLD. Otherwise, assume\n\tthat death of child events are handled through some other mechanism.\n\n\tIn this implementation, memory for the argument and environment arrays is allocated\n\tin the image prior to calling this primitive. This allows us to avoid invoking the\n\tgarbage collector in this primitive (thereby moving the locations of environment\n\tand argument memory), but comes at the cost of twiddling C pointers here in the\n\tprimitive. An alternative to this whole mess is just to malloc the environment and\n\targument vectors, but I think it is a good idea to avoid malloc as much as possible\n\tso as not to limit future ObjectMemory implementations.\n\n\tThis primitive replaces #primitiveForkAndExec from earlier versions of the plugin.\n\tThe new name permits backward compatibility for an image running on a VM\n\twhich does not yet have the updated plugin. This implementation uses a different\n\targument format on the stack, and differs functionally in that the child now closes\n\tall file descriptors (including sockets) not required (that is, everything except stdin,\n\tstdout, and stderr on descriptors 0, 1 and 2). This eliminates some flakey behavior\n\tin child processes connected to Squeak by pipes, which failed to exit at expected times\n\tdue to the old file descriptors remaining open. This is also cleaner in that garbage\n\tdescriptors are not left hanging around the the child.\n\n\tOn entry, the stack contains:\n\t\t0: workingDir, a null terminated string specifying the working directory to use, or nil.\n\t\t1: envOffsets, an array of integers for calculating environment string address offsets.\n\t\t2: envVecBuffer, a String buffer containing environment strings arranged to look like char **.\n\t\t3: argOffsets, an array of integers for calculating argument string address offsets.\n\t\t4: argVecBuffer, a String buffer containing argument strings arranged to look like char **.\n\t\t5: stdErr, a ByteArray handle.\n\t\t6: stdOut, a ByteArray handle.\n\t\t7: stdIn, a ByteArray handle.\n\t\t8: executableFile, a null terminated string with the name of the file to execute.\n\t\t9: the sender */\n\nstatic sqInt forkAndExecInDirectory(sqInt useSignalHandler) {\n    sqInt argCount;\n    sqInt *argOffsetPtr;\n    sqInt argOffsets;\n    sqInt argVecBuffer;\n    char **args;\n    char *argsPtr;\n    char **env;\n    sqInt envCount;\n    sqInt *envOffsetPtr;\n    sqInt envOffsets;\n    char *envPtr;\n    extern char **envVec;\n    sqInt envVecBuffer;\n    sqInt executableFile;\n    sqInt handleCount;\n    sqInt idx;\n    struct itimerval intervalTimer;\n    pid_t pid;\n    char *progNamePtr;\n    sqInt pwd;\n    char *pwdPtr;\n    struct itimerval saveIntervalTimer;\n    sqInt stdErr;\n    sqInt stdIn;\n    sqInt stdOut;\n    sqInt workingDir;\n    sqInt sigNum;\n\n\tif (useSignalHandler) {\n\t\tsetSigChldHandler();\n\t}\n\tif ((sandboxSecurity()) == 1) {\n\t\tinterpreterProxy->pop(10);\n\t\tinterpreterProxy->pushInteger(-1);\n\t} else {\n\t\tintervalTimer.it_interval.tv_sec = 0;\n\t\tintervalTimer.it_interval.tv_usec = 0;\n\t\tintervalTimer.it_value.tv_sec = 0;\n\t\tintervalTimer.it_value.tv_usec = 0;\n\t\tsetitimer (ITIMER_REAL, &intervalTimer, &saveIntervalTimer);\n\t\tif ((pid = vfork()) == 0) {\n\n\t\t\t/* This is the new child process */\n\n\t\t\tworkingDir = interpreterProxy->stackObjectValue(0);\n\t\t\tenvOffsets = interpreterProxy->stackObjectValue(1);\n\t\t\tenvVecBuffer = interpreterProxy->stackObjectValue(2);\n\t\t\targOffsets = interpreterProxy->stackObjectValue(3);\n\t\t\targVecBuffer = interpreterProxy->stackObjectValue(4);\n\t\t\tstdErr = interpreterProxy->stackObjectValue(5);\n\t\t\tstdOut = interpreterProxy->stackObjectValue(6);\n\t\t\tstdIn = interpreterProxy->stackObjectValue(7);\n\n\t\t\t/* If a new working directory has been specified, try to chdir() to it. */\n\n\t\t\texecutableFile = interpreterProxy->stackObjectValue(8);\n\t\t\tif (workingDir != (interpreterProxy->nilObject())) {\n\t\t\t\tpwdPtr = interpreterProxy->firstIndexableField(workingDir);\n\t\t\t\tif (pwdPtr == 0) {\n\t\t\t\t\tfprintf(stderr, \"bad workingDir parameter\\n\");\n\t\t\t\t\t_exit(-1);\n\t\t\t\t} else {\n\t\t\t\t\tpwd = chdir(pwdPtr);\n\t\t\t\t\tif (pwd != 0) {\n\t\t\t\t\t\tperror(\"chdir\");\n\t\t\t\t\t\t_exit(-1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* Dup the file handles to attach the new child process to the right streams\n\t\t\ton descriptors 0, 1 and 2. */\n\n\t\t\tprogNamePtr = interpreterProxy->arrayValueOf(executableFile);\n\t\t\tif (!(stdErr == (interpreterProxy->nilObject()))) {\n\t\t\t\tdupToStdErr(stdErr);\n\t\t\t}\n\t\t\tif (!(stdOut == (interpreterProxy->nilObject()))) {\n\t\t\t\tdupToStdOut(stdOut);\n\t\t\t}\n\t\t\tif (!(stdIn == (interpreterProxy->nilObject()))) {\n\t\t\t\tdupToStdIn(stdIn);\n\t\t\t}\n\n\t\t\t/* First Unix file descriptor after stdin, stdout, stderr. */\n\n\t\t\tidx = 3;\n\t\t\thandleCount = descriptorTableSize();\n\t\t\twhile (idx < handleCount) {\n\t\t\t\tclose(idx);\n\t\t\t\tidx += 1;\n\t\t\t}\n\t\t\tif (envVecBuffer == (interpreterProxy->nilObject())) {\n\t\t\t\tenv = envVec;\n\t\t\t} else {\n\t\t\t\tenvCount = interpreterProxy->stSizeOf(envOffsets);\n\t\t\t\tenvPtr = interpreterProxy->arrayValueOf(envVecBuffer);\n\t\t\t\tenvOffsetPtr = interpreterProxy->firstIndexableField(envOffsets);\n\t\t\t\tfixPointersInArrayOfStringswithOffsetscount(envPtr, envOffsetPtr, envCount);\n\t\t\t\tenv = ((char **) envPtr);\n\t\t\t}\n\t\t\targCount = interpreterProxy->stSizeOf(argOffsets);\n\t\t\targsPtr = interpreterProxy->arrayValueOf(argVecBuffer);\n\t\t\targOffsetPtr = interpreterProxy->firstIndexableField(argOffsets);\n\t\t\tfixPointersInArrayOfStringswithOffsetscount(argsPtr, argOffsetPtr, argCount);\n\n\t\t\t/* Clean things up before clobbering the running image. */\n\t\t\t/* Note: If any file descriptors, signal handlers, or other references to external\n\t\t\tresources need to be cleaned up, do it here. */\n\n\t\t\targs = ((char **) argsPtr);\n\t\t\t/* begin restoreDefaultSignalHandlers */\n\t\t\tsigNum = 1;\n\t\t\twhile (sigNum <= (signalArraySize())) {\n\t\t\t\tif ((semaIndices[sigNum]) > 0) {\n\t\t\t\t\tsetSignalNumberhandler(sigNum, originalSigHandlers[sigNum]);\n\t\t\t\t}\n\t\t\t\tsigNum += 1;\n\t\t\t}\n\t\t\tif ((execve(progNamePtr, args, env)) == -1) {\n\t\t\t\tperror(progNamePtr);\n\t\t\t\t_exit(-1);\n\t\t\t} else {\n\t\t\t\t/* Can't get here from there */;\n\t\t\t}\n\t\t} else {\n\t\t\tsetitimer (ITIMER_REAL, &saveIntervalTimer, 0L);\n\t\t\tinterpreterProxy->pop(10);\n\t\t\tinterpreterProxy->pushInteger(pid);\n\t\t}\n\t}\n}\n\n\n/*\tFork a child process, and continue running squeak in the child process.\n\tAnswer the result of the fork() call, either the child pid or zero.\n\n\tAfter calling fork(), two OS processes exist, one of which is the child of the other. On\n\tsystems which implement copy-on-write memory management, and which support the\n\tfork() system call, both processes will be running Smalltalk images, and will be sharing\n\tthe same memory space. In the original OS process, the resulting value of pid is the\n\tprocess id of the child process (a non-zero integer). In the child process, the value of\n\tpid is zero.\n\n\tThe child recreates sufficient external resources to continue running. This is done by\n\tattaching to a new X session. The child is otherwise a copy of the parent process, and\n\twill continue executing the Smalltalk image at the same point as its parent. The return\n\tvalue of this primitive may be used by the two running Smalltalk images to determine\n\twhich is the parent and which is the child.\n\n\tThe child should not depend on using existing connections to external resources. For\n\texample, the child may lose its connections to stdin, stdout, and stderr after its parent\n\texits.\n\n\tThe new child image does not start itself from the image in the file system; rather it is\n\ta clone of the parent image as it existed at the time of primitiveForkSqueak. For this\n\treason, the parent and child should agree in advance as to whom is allowed to save the\n\timage to the file system, otherwise one Smalltalk may overwrite the image of the other.\n\n\tThis is a simple call to fork(), rather than the more common idiom of vfork() followed\n\tby exec(). The vfork() call cannot be used here because it is designed to be followed by\n\tan exec(), and its semantics require the parent process to wait for the child to exit. See\n\tthe BSD programmers documentation for details. */\n\nEXPORT(pid_t) forkSqueak(sqInt useSignalHandler) {\n    struct itimerval intervalTimer;\n    pid_t pid;\n    struct itimerval saveIntervalTimer;\n\n\tintervalTimer.it_interval.tv_sec = 0;\n\tintervalTimer.it_interval.tv_usec = 0;\n\tintervalTimer.it_value.tv_sec = 0;\n\tintervalTimer.it_value.tv_usec = 0;\n\tsetitimer (ITIMER_REAL, &intervalTimer, &saveIntervalTimer);\n\tif (useSignalHandler) {\n\t\tsetSigChldHandler();\n\t}\n\n\t/* Enable the timer again before resuming Smalltalk. */\n\n\tpid = fork();\n\tsetitimer (ITIMER_REAL, &saveIntervalTimer, 0L);\n\treturn pid;\n}\n\n\n/*\tSet a signal handler in the VM which will signal a Smalltalk semaphore at\n\tsemaphoreIndex whenever an external signal sigNum is received. Answer the\n\tprior value of the signal handler. If semaphoreIndex is zero, the handler is\n\tunregistered, and the VM returns to its default behavior for handling that\n\tsignal. A handler must be unregistered before it can be registered again.\n\n\tThe Smalltalk semaphore is expected to be kept at the same index location\n\tindefinitely during the lifetime of a Squeak session. If that is not the case, the\n\thandler must be unregistered prior to unregistering the Smalltalk semaphore. */\n\nstatic void * forwardSignaltoSemaphoreAt(sqInt sigNum, sqInt semaphoreIndex) {\n    void *oldHandler;\n\n\tif (semaphoreIndex == 0) {\n\t\tif ((semaIndices[sigNum]) > 0) {\n\n\t\t\t/* Disable the handler */\n\n\t\t\toldHandler = originalSigHandlers[sigNum];\n\t\t\tsetSignalNumberhandler(sigNum, oldHandler);\n\t\t\tsemaIndices[sigNum] = 0;\n\t\t\treturn oldHandler;\n\t\t} else {\n\t\t\treturn sigErrorNumber();\n\t\t}\n\t}\n\tif ((semaIndices[sigNum]) > 0) {\n\t\treturn sigErrorNumber();\n\t}\n\toldHandler = setSignalNumberhandler(sigNum, handleSignalFunctionAddress());\n\tif (oldHandler != (sigErrorNumber())) {\n\t\toriginalSigHandlers[sigNum] = oldHandler;\n\t\tsemaIndices[sigNum] = semaphoreIndex;\n\t}\n\treturn oldHandler;\n}\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine * getInterpreter(void) {\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*) getModuleName(void) {\n\treturn moduleName;\n}\n\nstatic sqInt getThisSessionIdentifier(void) {\n\treturn interpreterProxy->getThisSessionID();\n}\n\nstatic sqInt halt(void) {\n\t;\n}\n\n\n/*\tThis is a signal handler function which runs when a signal is received\n\tfrom the operating system. When the signal is received, a Smalltalk Semaphore\n\tis signaled. This effectively passes the external signal to Squeak to allow\n\tit to be handled in Smalltalk. */\n\nstatic void handleSignal(int sigNum) {\n    sqInt semaIndex;\n\n\tsemaIndex = semaIndices[sigNum];\n\tforwardSignaltoSemaphoreAt(sigNum, semaIndex);\n\tif (isVmThread()) {\n\t\tif (semaIndex > 0) {\n\t\t\tinterpreterProxy->signalSemaphoreWithIndex(semaIndex);\n\t\t}\n\t} else {\n\t\tmaskForThisThreadAndResend(sigNum);\n\t}\n}\n\nstatic void * handleSignalFunctionAddress(void) {\n\treturn handleSignal;\n}\n\nEXPORT(sqInt) initialiseModule(void) {\n\tosprocessSandboxSecurity = -1;\n\tinitializeModuleForPlatform();\n\treturn 1;\n}\n\n\n/*\tPlatform specific initialization */\n\nstatic sqInt initializeModuleForPlatform(void) {\n\tpidCount = 0;\n\tatexit(sendSignalToPids);\n\tvmThread = pthread_self();\n}\n\n\n/*\tCheck for the common failure mode of a SQFile record with all zeros. */\n\nstatic sqInt isNonNullSQFile(sqInt objectPointer) {\n    sqInt idx;\n    unsigned char *sqFileBytes;\n\n\tsqFileBytes = interpreterProxy->arrayValueOf(objectPointer);\n\tidx = 0;\n\twhile (idx < (fileRecordSize())) {\n\t\tif ((sqFileBytes[idx]) != 0) {\n\t\t\treturn 1;\n\t\t}\n\t\tidx += 1;\n\t}\n\treturn 0;\n}\n\n\n/*\tCheck for the common failure mode of a SQSocket record with all zeros. */\n\nstatic sqInt isNullSQSocket(sqInt objectPointer) {\n    sqInt idx;\n    unsigned char *sqSocketBytes;\n\n\tsqSocketBytes = interpreterProxy->arrayValueOf(objectPointer);\n\tidx = 0;\n\twhile (idx < (socketRecordSize())) {\n\t\tif ((sqSocketBytes[idx]) != 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tidx += 1;\n\t}\n\treturn 1;\n}\n\n\n/*\tAnswer true if objectPointer appears to be a valid SQFile ByteArray.\n\tThis check is appropriate if objectPointer has been passed as a parameter\n\tto a primitive, and is expected to represent a valid file reference. */\n\nstatic sqInt isSQFileObject(sqInt objectPointer) {\n\treturn (((interpreterProxy->isBytes(objectPointer)) && ((interpreterProxy->byteSizeOf(objectPointer)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(objectPointer))))) && (isNonNullSQFile(objectPointer));\n}\n\n\n/*\tAnswer true if objectPointer appears to be a valid SQSocket ByteArray. This check\n\tis appropriate if objectPointer has been passed as a parameter to a primitive, and\n\tis expected to represent a valid socket reference. */\n\nstatic sqInt isSQSocketObject(sqInt objectPointer) {\n\treturn ((interpreterProxy->isBytes(objectPointer)) && ((interpreterProxy->byteSizeOf(objectPointer)) == (socketRecordSize()))) && (!(isNullSQSocket(objectPointer)));\n}\n\n\n/*\tAnswer true if the file session matches the current interpreter session identifier. */\n\nstatic sqInt isValidFileSession(sqInt objectPointer) {\n\treturn (interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(objectPointer)));\n}\n\n\n/*\tAnswer true if this method is executing in the context of the pthread in\n\twhich the interpreter executes. */\n\nstatic sqInt isVmThread(void) {\n    pthread_t thisThread;\n\n\tthisThread = pthread_self();\n\treturn pthread_equal(thisThread, vmThread);\n}\n\n\n/*\tCreate a pipe and populate the readerIOStream and writerIOStream variables.\n\tMake sure the SIGPIPE handler is set before creating the pipe. Answer true for\n\tsuccess, else false */\n\nstatic sqInt makePipeForReaderwriter(FILEHANDLETYPE *readerIOStreamPtr, FILEHANDLETYPE *writerIOStreamPtr) {\n    int filedes[2];\n\n\t/* begin setSigPipeHandler */\n\t/* begin setSigPipeIgnore */\n\tsetSignalNumberhandler(sigPipeNumber(), sigIgnoreNumber());\n\tif ((pipe(filedes)) == -1) {\n\t\treturn 0;\n\t} else {\n\t\t*writerIOStreamPtr= (FILE *) fdopen (filedes[1], \"a\");\n\t\t*readerIOStreamPtr= (FILE *) fdopen (filedes[0], \"r\");\n\t\treturn 1;\n\t}\n}\n\n\n/*\tPrevent any future instances of signal sigNum from being delivered\n\tto this pthread, and reschedule the current signal to be delivered to\n\tthis OS process. Any pthread other than the interpreter thread will\n\tcall this method. Eventually the signal will be delivered to the\n\tinterpreter thread, which will handle it in the context of the interpreter\n\tthread. */\n\nstatic sqInt maskForThisThreadAndResend(int sigNum) {\n\tmaskSignalForThisThread(sigNum);\n\tresendSignal(sigNum);\n}\n\n\n/*\tPrevent future invocations of signal sigNum from being delivered to this pthread. */\n\nstatic sqInt maskSignalForThisThread(int sigNum) {\n    sigset_t sigset;\n\n\tsigemptyset(&sigset);\n\tsigaddset(&sigset, sigNum);\n\tpthread_sigmask(SIG_BLOCK, &sigset, NULL);\n}\n\n\n/*\tThe module with the given name was just unloaded.\n\tMake sure we have no dangling references. */\n\nEXPORT(sqInt) moduleUnloaded(char *aModuleName) {\n}\n\nstatic sqInt msg(char *s) {\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n}\n\n\n/*\tA pthread_t is an unsigned long, which may be 8 bytes on some 64 bit\n\tplatforms. This stores the value in a byte array that can be easily\n\tpassed to the image. */\n\nstatic sqInt newPthreadTypeByteArray(sqInt aPthreadType) {\n    sqInt byteArray;\n    sqInt len;\n    pthread_t *ptr;\n\n\tlen = sizeof(pthread_t);\n\tbyteArray = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), len);\n\tptr = interpreterProxy->arrayValueOf(byteArray);\n\t*ptr = aPthreadType;\n\treturn byteArray;\n}\n\n\n/*\tAnswer a new ByteArray sized to contain a SQFile data structure. */\n\nstatic sqInt newSQFileByteArray(void) {\n\treturn interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\n}\n\n\n/*\tAnswer a new ByteArray sized to contain a SQSocket data structure. */\n\nstatic sqInt newSQSocketByteArray(void) {\n\treturn interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), socketRecordSize());\n}\n\n\n/*\tAn array of signal handler function addresses, one for each signal type. The\n\tvalue at each entry is the address of the original signal handler function prior\n\tto having set a handler. */\n\nstatic void ** originalSignalHandlers(void) {\n\treturn originalSigHandlers;\n}\n\n\n/*\tAnswer the pointer represented by aByteArray. */\n\nstatic void * pointerFrom(sqInt aByteArray) {\n    sqInt idx;\n    union {void *address; unsigned char bytes[sizeof(void *)];} pointerUnion;\n    unsigned char *ptr;\n\n\tif (!((interpreterProxy->isBytes(aByteArray)) && ((interpreterProxy->stSizeOf(aByteArray)) == (sizeOfPointer())))) {\n\t\treturn null;\n\t}\n\tptr = interpreterProxy->arrayValueOf(aByteArray);\n\tidx = 0;\n\twhile (idx < (sizeOfPointer())) {\n\t\tpointerUnion.bytes[idx] = ptr[idx];\n\t\tidx += 1;\n\t}\n\treturn pointerUnion.address;\n}\n\n\n/*\tDeprecated. This primitive has been replaced by a similar implementation in AioPlugin. */\n/*\tDefinitively disable asynchronous event notification for a descriptor. The\n\tparameter is a sqFile ByteArray representing the ioHandle for a file. */\n\nEXPORT(sqInt) primitiveAioDisable(void) {\n    int fd;\n    sqInt sqFile;\n\n\tsqFile = interpreterProxy->stackObjectValue(0);\n\t/* begin fileDescriptorFrom: */\n\tif (!((((interpreterProxy->isBytes(sqFile)) && ((interpreterProxy->byteSizeOf(sqFile)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFile))))) && (isNonNullSQFile(sqFile)))) {\n\t\tfd = -1;\n\t\tgoto l1;\n\t}\n\tfd = fileno(fileHandleFrom(sqFile));\nl1:\t/* end fileDescriptorFrom: */;\n\tif (fd < 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\taioDisable(fd);\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->pushInteger(fd);\n}\n\n\n/*\tDeprecated. This primitive has been replaced by a similar implementation in AioPlugin. */\n/*\tEnable asynchronous notification for a descriptor. The first parameter is a sqFile\n\tByteArray representing the ioHandle for a file, the second parameter is the index\n\tof a Semaphore to be notified, and the third parameter is a flag indicating that\n\tsqFile represents an external object and should not be closed on termination of\n\taio handling. Answer the semaphore index. */\n\nEXPORT(sqInt) primitiveAioEnable(void) {\n    static int eventSemaphoreIndices[FD_SETSIZE];\n    sqInt externalObject;\n    int fd;\n    int flags;\n    sqInt semaIndex;\n    sqInt sqFile;\n\n\tsqFile = interpreterProxy->stackObjectValue(2);\n\tif (!((interpreterProxy->isBytes(sqFile)) && ((interpreterProxy->stSizeOf(sqFile)) == (fileRecordSize())))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\t/* begin fileDescriptorFrom: */\n\tif (!((((interpreterProxy->isBytes(sqFile)) && ((interpreterProxy->byteSizeOf(sqFile)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFile))))) && (isNonNullSQFile(sqFile)))) {\n\t\tfd = -1;\n\t\tgoto l1;\n\t}\n\tfd = fileno(fileHandleFrom(sqFile));\nl1:\t/* end fileDescriptorFrom: */;\n\tif (fd < 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tsemaIndex = interpreterProxy->stackIntegerValue(1);\n\teventSemaphoreIndices[semaIndex] = semaIndex;\n\texternalObject = interpreterProxy->stackObjectValue(0);\n\tif (externalObject == (interpreterProxy->trueObject())) {\n\t\tflags = AIO_EXT;\n\t} else {\n\t\tflags = 0;\n\t}\n\taioEnable(fd, &(eventSemaphoreIndices[semaIndex]), flags);\n\tinterpreterProxy->pop(4);\n\tinterpreterProxy->pushInteger(semaIndex);\n}\n\n\n/*\tDeprecated. This primitive has been replaced by a similar implementation in AioPlugin. */\n/*\tHandle asynchronous event notification for a descriptor. The first parameter is\n\ta sqFile ByteArray representing the ioHandle for a file, and the remaining three\n\tparameters are Boolean flags representing the types of events for which notification\n\tis being requested: handle exceptions, handle for read, and handle for write.\n\tFlags are defined in the aio.h source as:\n\t\tAIO_X\t(1<<0)\thandle for exceptions\n\t\tAIO_R\t(1<<1)\thandle for read\n\t\tAIO_W\t(1<<2)\thandle for write */\n\nEXPORT(sqInt) primitiveAioHandle(void) {\n    sqInt exceptionWatch;\n    int fd;\n    int flags;\n    sqInt readWatch;\n    sqInt sqFile;\n    sqInt writeWatch;\n\n\tsqFile = interpreterProxy->stackObjectValue(3);\n\tif (!((interpreterProxy->isBytes(sqFile)) && ((interpreterProxy->stSizeOf(sqFile)) == (fileRecordSize())))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\t/* begin fileDescriptorFrom: */\n\tif (!((((interpreterProxy->isBytes(sqFile)) && ((interpreterProxy->byteSizeOf(sqFile)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFile))))) && (isNonNullSQFile(sqFile)))) {\n\t\tfd = -1;\n\t\tgoto l1;\n\t}\n\tfd = fileno(fileHandleFrom(sqFile));\nl1:\t/* end fileDescriptorFrom: */;\n\tif (fd < 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\texceptionWatch = interpreterProxy->stackObjectValue(2);\n\treadWatch = interpreterProxy->stackObjectValue(1);\n\twriteWatch = interpreterProxy->stackObjectValue(0);\n\tflags = 0;\n\tif (exceptionWatch == (interpreterProxy->trueObject())) {\n\t\tflags = flags | (AIO_X);\n\t}\n\tif (readWatch == (interpreterProxy->trueObject())) {\n\t\tflags = flags | (AIO_R);\n\t}\n\tif (writeWatch == (interpreterProxy->trueObject())) {\n\t\tflags = flags | (AIO_W);\n\t}\n\taioHandle(fd, aioForwardwithDataandFlags, flags);\n\tinterpreterProxy->pop(5);\n\tinterpreterProxy->pushInteger(flags);\n}\n\n\n/*\tDeprecated. This primitive has been replaced by a similar implementation in AioPlugin. */\n/*\tTemporarily suspend asynchronous event notification for a descriptor. The first\n\tparameter is a sqFile ByteArray representing the ioHandle for a file, and the\n\tremaining three parameters are Boolean flags representing the types of events\n\tfor which notification is being requested: handle exceptions, handle for read,\n\tand handle for write.\n\tFlags are defined in the aio.h source as:\n\t\tAIO_X\t(1<<0)\thandle for exceptions\n\t\tAIO_R\t(1<<1)\thandle for read\n\t\tAIO_W\t(1<<2)\thandle for write */\n\nEXPORT(sqInt) primitiveAioSuspend(void) {\n    sqInt exceptionWatch;\n    int fd;\n    int flags;\n    sqInt readWatch;\n    sqInt sqFile;\n    sqInt writeWatch;\n\n\tsqFile = interpreterProxy->stackObjectValue(3);\n\tif (!((interpreterProxy->isBytes(sqFile)) && ((interpreterProxy->stSizeOf(sqFile)) == (fileRecordSize())))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\t/* begin fileDescriptorFrom: */\n\tif (!((((interpreterProxy->isBytes(sqFile)) && ((interpreterProxy->byteSizeOf(sqFile)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFile))))) && (isNonNullSQFile(sqFile)))) {\n\t\tfd = -1;\n\t\tgoto l1;\n\t}\n\tfd = fileno(fileHandleFrom(sqFile));\nl1:\t/* end fileDescriptorFrom: */;\n\tif (fd < 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\texceptionWatch = interpreterProxy->stackObjectValue(2);\n\treadWatch = interpreterProxy->stackObjectValue(1);\n\twriteWatch = interpreterProxy->stackObjectValue(0);\n\tflags = 0;\n\tif (exceptionWatch == (interpreterProxy->trueObject())) {\n\t\tflags = flags | (AIO_X);\n\t}\n\tif (readWatch == (interpreterProxy->trueObject())) {\n\t\tflags = flags | (AIO_R);\n\t}\n\tif (writeWatch == (interpreterProxy->trueObject())) {\n\t\tflags = flags | (AIO_W);\n\t}\n\taioSuspend(fd, flags);\n\tinterpreterProxy->pop(5);\n\tinterpreterProxy->pushInteger(flags);\n}\n\n\n/*\tAnswer a string containing the OS process argument at index (an Integer) in the\n\targument list. */\n\nEXPORT(sqInt) primitiveArgumentAt(void) {\n    extern int argCnt;\n    extern char **argVec;\n    sqInt index;\n    sqInt s;\n    char *sPtr;\n\n\tindex = interpreterProxy->stackIntegerValue(0);\n\tif ((index > argCnt) || (index < 1)) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->push(interpreterProxy->nilObject());\n\t} else {\n\t\tsPtr = argVec[index - 1];\n\t\ts = stringFromCString(sPtr);\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->push(s);\n\t}\n}\n\n\n/*\tSend a null signal to the OS process identified by anIntegerPid. Answer false for\n\ta bad parameter on the stack (the common case is for anIntegerPid equal to nil,\n\tfor which case we should answer false). Answer true if the process exists and can\n\treceive signals from this process, otherwise false. This test is useful for determining\n\tif a child process still exists following a Squeak image restart. */\n\nEXPORT(sqInt) primitiveCanReceiveSignals(sqInt anIntegerPid) {\n    pid_t pidToSignal;\n    int result;\n\n\tif (((interpreterProxy->stackValue(0)) & 1)) {\n\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\n\t\tresult = kill(pidToSignal, 0);\n\t\tinterpreterProxy->pop(2);\n\t\tif (result == 0) {\n\t\t\tinterpreterProxy->push(interpreterProxy->trueObject());\n\t\t} else {\n\t\t\tinterpreterProxy->push(interpreterProxy->falseObject());\n\t\t}\n\t} else {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->push(interpreterProxy->falseObject());\n\t}\n}\n\n\n/*\tCall chdir(2) to change current working directory to the specified path string. Answer\n\tnil for success, or errno on failure. */\n\nEXPORT(sqInt) primitiveChdir(void) {\n    extern int errno;\n    char *path;\n\n\tpath = transientCStringFromString(interpreterProxy->stackObjectValue(0));\n\tif (chdir(path)) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->push(interpreterProxy->nilObject());\n\t} else {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(errno);\n\t}\n}\n\n\n/*\tCreate a pipe, and answer an array of two file handles for the pipe writer and reader.\n\tThe readerIOStream and writerIOStream variables represent the low level pipe streams,\n\twhich will be of type (FILE *) or HANDLE, depending on what the FilePlugin support\n\tcode is using to represent file streams. FILEHANDLETYPE is defined in my subclasses\n\tin the #declareCVarsIn: class method. */\n\nEXPORT(sqInt) primitiveCreatePipe(void) {\n    sqInt arrayResult;\n    sqInt reader;\n    FILEHANDLETYPE readerIOStream;\n    FILEHANDLETYPE *readerIOStreamPtr;\n    SQFile *readerPtr;\n    SESSIONIDENTIFIERTYPE thisSession;\n    sqInt writer;\n    FILEHANDLETYPE writerIOStream;\n    FILEHANDLETYPE *writerIOStreamPtr;\n    SQFile *writerPtr;\n\n\n\t/* Create the anonymous OS pipe */\n\n\tthisSession = interpreterProxy->getThisSessionID();\n\treaderIOStreamPtr = &readerIOStream;\n\twriterIOStreamPtr = &writerIOStream;\n\tif (!(createPipeForReaderwriter(readerIOStreamPtr, writerIOStreamPtr))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\twriter = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\n\twriterPtr = interpreterProxy->arrayValueOf(writer);\n\twriterPtr->file = writerIOStream;\n\twriterPtr->sessionID = thisSession;\n\twriterPtr->writable = 1;\n\twriterPtr->lastOp = 0;\n\tinterpreterProxy->pushRemappableOop(writer);\n\treader = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\n\treaderPtr = interpreterProxy->arrayValueOf(reader);\n\treaderPtr->file = readerIOStream;\n\treaderPtr->sessionID = thisSession;\n\treaderPtr->writable = 0;\n\treaderPtr->lastOp = 0;\n\tinterpreterProxy->pushRemappableOop(reader);\n\tarrayResult = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2);\n\tinterpreterProxy->stObjectatput(arrayResult, 1, interpreterProxy->popRemappableOop());\n\tinterpreterProxy->stObjectatput(arrayResult, 2, interpreterProxy->popRemappableOop());\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->push(arrayResult);\n}\n\n\n/*\tCreate a pipe, and answer an array of two file handles for the pipe writer and reader.\n\tThe session identifier is passed as the parameter to this primitive. Use this variant\n\tif the session identifier is not available directly in the VM (as may be the case if\n\tit is not possible to link from this plugin to a variable elsewhere in the VM).\n\tThe readerIOStream and writerIOStream variables represent the low level pipe streams,\n\twhich will be of type (FILE *) or HANDLE, depending on what the FilePlugin support\n\tcode is using to represent file streams. FILEHANDLETYPE is defined in my subclasses\n\tin the #declareCVarsIn: class method. */\n\nEXPORT(sqInt) primitiveCreatePipeWithSessionIdentifier(void) {\n    sqInt arrayResult;\n    sqInt reader;\n    FILEHANDLETYPE readerIOStream;\n    FILEHANDLETYPE *readerIOStreamPtr;\n    SQFile *readerPtr;\n    SESSIONIDENTIFIERTYPE thisSession;\n    sqInt writer;\n    FILEHANDLETYPE writerIOStream;\n    FILEHANDLETYPE *writerIOStreamPtr;\n    SQFile *writerPtr;\n\n\n\t/* Create the anonymous OS pipe */\n\n\tthisSession = sessionIdentifierFrom(interpreterProxy->stackObjectValue(0));\n\treaderIOStreamPtr = &readerIOStream;\n\twriterIOStreamPtr = &writerIOStream;\n\tif (!(createPipeForReaderwriter(readerIOStreamPtr, writerIOStreamPtr))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\twriter = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\n\twriterPtr = interpreterProxy->arrayValueOf(writer);\n\twriterPtr->file = writerIOStream;\n\twriterPtr->sessionID = thisSession;\n\twriterPtr->writable = 1;\n\twriterPtr->lastOp = 0;\n\tinterpreterProxy->pushRemappableOop(writer);\n\treader = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\n\treaderPtr = interpreterProxy->arrayValueOf(reader);\n\treaderPtr->file = readerIOStream;\n\treaderPtr->sessionID = thisSession;\n\treaderPtr->writable = 0;\n\treaderPtr->lastOp = 0;\n\tinterpreterProxy->pushRemappableOop(reader);\n\tarrayResult = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2);\n\tinterpreterProxy->stObjectatput(arrayResult, 1, interpreterProxy->popRemappableOop());\n\tinterpreterProxy->stObjectatput(arrayResult, 2, interpreterProxy->popRemappableOop());\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->push(arrayResult);\n}\n\n\n/*\tCall dup2() to duplicate a file descriptor. Answer the duplicated file descriptor\n\tor -1 on failure. */\n\nEXPORT(sqInt) primitiveDupTo(sqInt oldFileDescriptor, sqInt newFileDescriptor) {\n    int newfd;\n    int oldfd;\n    int result;\n\n\tnewfd = interpreterProxy->stackIntegerValue(0);\n\toldfd = interpreterProxy->stackIntegerValue(1);\n\tresult = dup2(oldfd, newfd);\n\tinterpreterProxy->pop(3);\n\tinterpreterProxy->pushInteger(result);\n}\n\n\n/*\tAnswer a string containing the OS process environment string at index (an Integer)\n\tin the environment list. */\n\nEXPORT(sqInt) primitiveEnvironmentAt(void) {\n    sqInt envCnt;\n    extern char **envVec;\n    sqInt index;\n    char **p;\n    sqInt s;\n    char *sPtr;\n\n\tp = envVec;\n\tenvCnt = 0;\n\twhile (*p++) envCnt++;\n\tindex = interpreterProxy->stackIntegerValue(0);\n\tif ((index > envCnt) || (index < 1)) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->push(interpreterProxy->nilObject());\n\t} else {\n\t\tsPtr = envVec[index - 1];\n\t\ts = stringFromCString(sPtr);\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->push(s);\n\t}\n}\n\n\n/*\tAnswer the value of an environment variable keyed by a Symbol. */\n\nEXPORT(sqInt) primitiveEnvironmentAtSymbol(void) {\n    char * getenvResult;\n\n\tgetenvResult = getenv(transientCStringFromString(interpreterProxy->stackObjectValue(0)));\n\tif (getenvResult == 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t} else {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->push(stringFromCString(getenvResult));\n\t}\n}\n\n\n/*\tAnswer a string describing an error message */\n\nEXPORT(sqInt) primitiveErrorMessageAt(void) {\n    sqInt errMessage;\n    sqInt index;\n    char *p;\n\n\tindex = interpreterProxy->stackIntegerValue(0);\n\tp = ((char *) (strerror(index)));\n\terrMessage = stringFromCString(p);\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->push(errMessage);\n}\n\n\n/*\tCall stat(2) to obtain the file protection mask for a file. Answer an Array of\n\tfour integers representing the protection mask, or answer errno on failure. The\n\tprotection mask is four Integers, each of which may be considered an octal digit\n\t(0-7), with bit values 4, 2, and 1. The first digit selects the set user ID (4) and set\n\tgroup ID (2) and save text image (1) attributes. The second digit selects permissions\n\tfor the user who owns the file: read (4), write (2), and execute (1); the third\n\tselects permissions for other users in the file's group, with the same values; and\n\tthe fourth for other users not in the file's group, with the same values. */\n\nEXPORT(sqInt) primitiveFileProtectionMask(void) {\n    sqInt buffer;\n    extern int errno;\n    sqInt mode;\n    char *path;\n    sqInt result;\n    struct stat *statBuf;\n\n\tbuffer = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(struct stat));\n\tstatBuf = interpreterProxy->arrayValueOf(buffer);\n\tpath = transientCStringFromString(interpreterProxy->stackObjectValue(0));\n\tmode = stat(path, statBuf);\n\tif (mode == 0) {\n\t\tmode = statBuf->st_mode;\n\t\tresult = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 4);\n\t\tinterpreterProxy->stObjectatput(result, 4, (((mode & 07) << 1) | 1));\n\t\tinterpreterProxy->stObjectatput(result, 3, ((((mode & 070) >> 3) << 1) | 1));\n\t\tinterpreterProxy->stObjectatput(result, 2, ((((mode & 0700) >> 6) << 1) | 1));\n\t\tinterpreterProxy->stObjectatput(result, 1, ((((mode & 07000) >> 9) << 1) | 1));\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->push(result);\n\t} else {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(errno);\n\t}\n}\n\n\n/*\tCall stat(2) to obtain the file protection mask for a file. Answer errno on failure,\n\tor on success answer an array with: UID with: GID with: protectionMask. The\t\n\tprotectionMask is an Array of four integers representing the protection mask, or\n\tanswer errno on failure. The protection mask is four Integers, each of which may\n\tbe considered an octal digit (0-7), with bit values 4, 2, and 1. The first digit selects\n\tthe set user ID (4) and set group ID (2) and save text image (1) attributes. The second\n\tdigit selects permissions for the user who owns the file: read (4), write (2), and\n\texecute (1); the third selects permissions for other users in the file's group, with\n\tthe same values; and the fourth for other users not in the file's group, with the\n\tsame values. */\n\nEXPORT(sqInt) primitiveFileStat(void) {\n    sqInt buffer;\n    extern int errno;\n    sqInt gid;\n    sqInt mask;\n    sqInt mode;\n    char *path;\n    sqInt result;\n    struct stat *statBuf;\n    sqInt uid;\n\n\tresult = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 3);\n\tuid = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(uid_t));\n\tgid = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(gid_t));\n\tmask = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 4);\n\tbuffer = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(struct stat));\n\tstatBuf = interpreterProxy->arrayValueOf(buffer);\n\tpath = transientCStringFromString(interpreterProxy->stackObjectValue(0));\n\tmode = stat(path, statBuf);\n\tif (mode == 0) {\n\t\tmode = statBuf->st_mode;\n\t\tinterpreterProxy->stObjectatput(mask, 4, (((mode & 07) << 1) | 1));\n\t\tinterpreterProxy->stObjectatput(mask, 3, ((((mode & 070) >> 3) << 1) | 1));\n\t\tinterpreterProxy->stObjectatput(mask, 2, ((((mode & 0700) >> 6) << 1) | 1));\n\t\tinterpreterProxy->stObjectatput(mask, 1, ((((mode & 07000) >> 9) << 1) | 1));\n\t\tinterpreterProxy->stObjectatput(result, 3, mask);\n\t\tinterpreterProxy->stObjectatput(result, 2, (((statBuf->st_gid) << 1) | 1));\n\t\tinterpreterProxy->stObjectatput(result, 1, (((statBuf->st_uid) << 1) | 1));\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->push(result);\n\t} else {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(errno);\n\t}\n}\n\n\n/*\tThis primitive exists only for purposes of testing the\n\tfixPointersInArrayOfStrings:withOffsets:count: method. I believe it to be\n\treasonably machine and compiler independent, but have no way of verifying\n\tthis on a variety of machines, so I'll leave this test method here in case\n\tsomeone runs into problems on other hardware or compilers. -dtl */\n\nEXPORT(sqInt) primitiveFixPointersInArrayOfStrings(void) {\n    sqInt cStringArray;\n    sqInt count;\n    char *flattenedArrayOfStrings;\n    sqInt offsetArray;\n    sqInt *offsets;\n\n\tcount = interpreterProxy->stackIntegerValue(0);\n\toffsetArray = interpreterProxy->stackObjectValue(1);\n\tcStringArray = interpreterProxy->stackObjectValue(2);\n\toffsets = interpreterProxy->firstIndexableField(offsetArray);\n\tflattenedArrayOfStrings = interpreterProxy->arrayValueOf(cStringArray);\n\tfixPointersInArrayOfStringswithOffsetscount(flattenedArrayOfStrings, offsets, count);\n\tinterpreterProxy->pop(4);\n\tinterpreterProxy->push(cStringArray);\n}\n\n\n/*\tFork a child OS process, and do an exec in the child. The parent continues on in\n\tSmalltalk, and this method answers the pid of the child which was created.\n\n\tOn entry, the stack contains:\n\t\t0: workingDir, a null terminated string specifying the working directory to use, or nil.\n\t\t1: envOffsets, an array of integers for calculating environment string address offsets.\n\t\t2: envVecBuffer, a String buffer containing environment strings arranged to look like char **.\n\t\t3: argOffsets, an array of integers for calculating argument string address offsets.\n\t\t4: argVecBuffer, a String buffer containing argument strings arranged to look like char **.\n\t\t5: stdErr, a ByteArray handle.\n\t\t6: stdOut, a ByteArray handle.\n\t\t7: stdIn, a ByteArray handle.\n\t\t8: executableFile, a null terminated string with the name of the file to execute.\n\t\t9: the sender */\n\nEXPORT(sqInt) primitiveForkAndExecInDirectory(void) {\n\treturn forkAndExecInDirectory(1);\n}\n\n\n/*\tFork a child OS process, and do an exec in the child. The parent continues on in\n\tSmalltalk, and this method answers the pid of the child which was created.\n\n\tOn entry, the stack contains:\n\t\t0: workingDir, a null terminated string specifying the working directory to use, or nil.\n\t\t1: envOffsets, an array of integers for calculating environment string address offsets.\n\t\t2: envVecBuffer, a String buffer containing environment strings arranged to look like char **.\n\t\t3: argOffsets, an array of integers for calculating argument string address offsets.\n\t\t4: argVecBuffer, a String buffer containing argument strings arranged to look like char **.\n\t\t5: stdErr, a ByteArray handle.\n\t\t6: stdOut, a ByteArray handle.\n\t\t7: stdIn, a ByteArray handle.\n\t\t8: executableFile, a null terminated string with the name of the file to execute.\n\t\t9: the sender */\n\nEXPORT(sqInt) primitiveForkExec(void) {\n\treturn forkAndExecInDirectory(0);\n}\n\n\n/*\tFork a child process, and continue running squeak in the child process. Leave the\n\tX session connected to the parent process, but close its file descriptor for the child\n\tprocess. Open a new X session for the child.\n\n\tThe child should not depend on using existing connections to external resources. For\n\texample, the child may lose its connections to stdin, stdout, and stderr after its parent\n\texits. */\n\nEXPORT(sqInt) primitiveForkSqueak(void) {\n    pid_t pid;\n\n\tif ((sandboxSecurity()) == 1) {\n\t\tinterpreterProxy->pop(1);\n\t\tinterpreterProxy->pushInteger(-1);\n\t} else {\n\t\tpid = forkSqueak(1);\n\t\tinterpreterProxy->pop(1);\n\t\tinterpreterProxy->pushInteger(pid);\n\t}\n}\n\n\n/*\tFork a child process, and continue running squeak in the child process. Leave the\n\tX session connected to the parent process, but close its file descriptor for the child\n\tprocess. Open a new X session for the child.\n\n\tThe child should not depend on using existing connections to external resources. For\n\texample, the child may lose its connections to stdin, stdout, and stderr after its parent\n\texits. */\n\nEXPORT(sqInt) primitiveForkSqueakWithoutSigHandler(void) {\n    pid_t pid;\n\n\tif ((sandboxSecurity()) == 1) {\n\t\tinterpreterProxy->pop(1);\n\t\tinterpreterProxy->pushInteger(-1);\n\t} else {\n\t\tpid = forkSqueak(0);\n\t\tinterpreterProxy->pop(1);\n\t\tinterpreterProxy->pushInteger(pid);\n\t}\n}\n\n\n/*\tSet a signal handler in the VM which will signal a Smalltalk semaphore at\n\tsemaphoreIndex whenever an external signal sigNum is received. Answer the\n\tprior value of the signal handler. If semaphoreIndex is zero or nil, the handler\n\tis unregistered, and the VM returns to its default behavior for handling that\n\tsignal.\n\n\tThe Smalltalk semaphore is expected to be kept at the same index location\n\tindefinitely during the lifetime of a Squeak session. If that is not the case, the\n\thandler must be unregistered prior to unregistering the Smalltalk semaphore. */\n\nEXPORT(sqInt) primitiveForwardSignalToSemaphore(void) {\n    char *hPtr;\n    void *handler;\n    sqInt idx;\n    sqInt index;\n    union {void *handler; unsigned char bytes[sizeof(void *)];} priorHandler;\n    sqInt priorHandlerObject;\n    sqInt semaphoreIndex;\n    sqInt sigNum;\n\n\tindex = interpreterProxy->stackValue(0);\n\tif (index == (interpreterProxy->nilObject())) {\n\t\tsemaphoreIndex = 0;\n\t} else {\n\t\tif ((index & 1)) {\n\t\t\tsemaphoreIndex = interpreterProxy->stackIntegerValue(0);\n\t\t} else {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\tsigNum = interpreterProxy->stackIntegerValue(1);\n\thandler = forwardSignaltoSemaphoreAt(sigNum, semaphoreIndex);\n\tif (handler == (sigErrorNumber())) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tpriorHandlerObject = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeOfPointer());\n\thPtr = interpreterProxy->arrayValueOf(priorHandlerObject);\n\tpriorHandler.handler = handler;\n\tidx = 0;\n\twhile (idx < (sizeOfPointer())) {\n\t\thPtr[idx] = priorHandler.bytes[idx];\n\t\tidx += 1;\n\t}\n\tinterpreterProxy->popthenPush(3, priorHandlerObject);\n}\n\n\n/*\tAnswer a string containing the current working directory. */\n\nEXPORT(sqInt) primitiveGetCurrentWorkingDirectory(void) {\n    char *buffer;\n    sqInt bufferSize;\n    char *cwd;\n    sqInt cwdString;\n    sqInt incrementBy;\n    sqInt maxSize;\n\n\tbufferSize = 100;\n\tincrementBy = 100;\n\tmaxSize = 5000;\n\twhile (1) {\n\t\tcwdString = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), bufferSize);\n\t\tbuffer = interpreterProxy->arrayValueOf(cwdString);\n\n\t\t/* getcwd(buffer, bufferSize) */\n\n\t\tcwd = getcwd(buffer, bufferSize);\n\t\tif (!((cwd == 0) && (bufferSize < maxSize))) break;\n\t\tbufferSize += incrementBy;\n\t}\n\tif (cwd == 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t} else {\n\t\tcwdString = stringFromCString(cwd);\n\t\tinterpreterProxy->pop(1);\n\t\tinterpreterProxy->push(cwdString);\n\t}\n}\n\n\n/*\tAnswer the effective group ID of my OS process */\n\nEXPORT(sqInt) primitiveGetEGid(void) {\n    gid_t eGid;\n\n\teGid = getegid();\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(eGid);\n}\n\n\n/*\tAnswer the effective user ID of my OS process */\n\nEXPORT(sqInt) primitiveGetEUid(void) {\n    uid_t eUid;\n\n\teUid = geteuid();\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(eUid);\n}\n\n\n/*\tAnswer the group ID of my OS process */\n\nEXPORT(sqInt) primitiveGetGid(void) {\n    gid_t gid;\n\n\tgid = getgid();\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(gid);\n}\n\n\n/*\tAnswer the process group ID of the process identified by pid */\n\nEXPORT(sqInt) primitiveGetPGid(void) {\n    pid_t pgid;\n    pid_t pid;\n\n\tpid = interpreterProxy->stackIntegerValue(0);\n\tpgid = getpgid(pid);\n\tif (pgid == -1) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->pushInteger(pgid);\n}\n\n\n/*\tAnswer the process group ID of this OS process */\n\nEXPORT(sqInt) primitiveGetPGrp(void) {\n    pid_t pgid;\n\n\tpgid = getpgrp();\n\tif (pgid == -1) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(pgid);\n}\n\n\n/*\tAnswer the process ID of the parent process of my OS process */\n\nEXPORT(sqInt) primitiveGetPPid(void) {\n    pid_t ppid;\n\n\tppid = getppid();\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(ppid);\n}\n\n\n/*\tAnswer the process ID of my OS process */\n\nEXPORT(sqInt) primitiveGetPid(void) {\n    pid_t pid;\n\n\tpid = getpid();\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(pid);\n}\n\n\n/*\tAnswer the unique session identifier for this Smalltalk instance running in this\n\tOS process. The C integer value is coerced into a Smalltalk ByteArray to preserve\n\tthe full range of possible values. */\n\nEXPORT(sqInt) primitiveGetSession(void) {\n    unsigned char *sessionByteArrayPointer;\n    sqInt sessionIDSize;\n    sqInt sessionOop;\n    SESSIONIDENTIFIERTYPE thisSessionID;\n\n\tthisSessionID = interpreterProxy->getThisSessionID();\n\tsessionIDSize = sizeof(thisSessionID);\n\tsessionOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sessionIDSize);\n\tsessionByteArrayPointer = interpreterProxy->arrayValueOf(sessionOop);\n\tif (thisSessionID == null) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tcopyBytesFromtolength((unsigned char *)&thisSessionID, sessionByteArrayPointer, sessionIDSize);\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->push(sessionOop);\n}\n\n\n/*\tAnswer the file handle for standard error of my OS process */\n\nEXPORT(sqInt) primitiveGetStdErrHandle(void) {\n    SQFile *file;\n    sqInt fileOop;\n    SESSIONIDENTIFIERTYPE thisSession;\n\n\tfileOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\n\tfile = interpreterProxy->arrayValueOf(fileOop);\n\tthisSession = interpreterProxy->getThisSessionID();\n\tfile->file = stderr;\n\tfile->sessionID = thisSession;\n\tfile->writable = 1;\n\tfile->lastOp = 0;\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->push(fileOop);\n}\n\n\n/*\tAnswer the file handle for standard error of my OS process. The session\n\tidentifier is passed as the parameter to this primitive. Use this variant if\n\tthe session identifier is not available directly in the VM (as may be the\n\tcase if it is not possible to link from this plugin to a variable elsewhere\n\tin the VM). */\n\nEXPORT(sqInt) primitiveGetStdErrHandleWithSessionIdentifier(void) {\n    SQFile *file;\n    sqInt fileOop;\n    SESSIONIDENTIFIERTYPE thisSession;\n\n\tfileOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\n\tfile = interpreterProxy->arrayValueOf(fileOop);\n\tthisSession = sessionIdentifierFrom(interpreterProxy->stackObjectValue(0));\n\tfile->file = stderr;\n\tfile->sessionID = thisSession;\n\tfile->writable = 1;\n\tfile->lastOp = 0;\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->push(fileOop);\n}\n\n\n/*\tAnswer the file handle for standard input of my OS process */\n\nEXPORT(sqInt) primitiveGetStdInHandle(void) {\n    SQFile *file;\n    sqInt fileOop;\n    SESSIONIDENTIFIERTYPE thisSession;\n\n\tfileOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\n\tfile = interpreterProxy->arrayValueOf(fileOop);\n\tthisSession = interpreterProxy->getThisSessionID();\n\tfile->file = stdin;\n\tfile->sessionID = thisSession;\n\tfile->writable = 0;\n\tfile->lastOp = 0;\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->push(fileOop);\n}\n\n\n/*\tAnswer the file handle for standard input of my OS process. The session\n\tidentifier is passed as the parameter to this primitive. Use this variant if\n\tthe session identifier is not available directly in the VM (as may be the\n\tcase if it is not possible to link from this plugin to a variable elsewhere\n\tin the VM). */\n\nEXPORT(sqInt) primitiveGetStdInHandleWithSessionIdentifier(void) {\n    SQFile *file;\n    sqInt fileOop;\n    SESSIONIDENTIFIERTYPE thisSession;\n\n\tfileOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\n\tfile = interpreterProxy->arrayValueOf(fileOop);\n\tthisSession = sessionIdentifierFrom(interpreterProxy->stackObjectValue(0));\n\tfile->file = stdin;\n\tfile->sessionID = thisSession;\n\tfile->writable = 0;\n\tfile->lastOp = 0;\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->push(fileOop);\n}\n\n\n/*\tAnswer the file handle for standard output of my OS process */\n\nEXPORT(sqInt) primitiveGetStdOutHandle(void) {\n    SQFile *file;\n    sqInt fileOop;\n    SESSIONIDENTIFIERTYPE thisSession;\n\n\tfileOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\n\tfile = interpreterProxy->arrayValueOf(fileOop);\n\tthisSession = interpreterProxy->getThisSessionID();\n\tfile->file = stdout;\n\tfile->sessionID = thisSession;\n\tfile->writable = 1;\n\tfile->lastOp = 0;\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->push(fileOop);\n}\n\n\n/*\tAnswer the file handle for standard output of my OS process. The session\n\tidentifier is passed as the parameter to this primitive. Use this variant if\n\tthe session identifier is not available directly in the VM (as may be the\n\tcase if it is not possible to link from this plugin to a variable elsewhere\n\tin the VM). */\n\nEXPORT(sqInt) primitiveGetStdOutHandleWithSessionIdentifier(void) {\n    SQFile *file;\n    sqInt fileOop;\n    SESSIONIDENTIFIERTYPE thisSession;\n\n\tfileOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\n\tfile = interpreterProxy->arrayValueOf(fileOop);\n\tthisSession = sessionIdentifierFrom(interpreterProxy->stackObjectValue(0));\n\tfile->file = stdout;\n\tfile->sessionID = thisSession;\n\tfile->writable = 1;\n\tfile->lastOp = 0;\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->push(fileOop);\n}\n\n\n/*\tAnswer the ID of the pthread that is currently executing (the interpreter thread).\n\tA thread ID may be a 64 bit value on some platforms, so answer a byte array\n\tcontaining the value in machine-dependent byte order. */\n\nEXPORT(sqInt) primitiveGetThreadID(void) {\n\tinterpreterProxy->popthenPush(1, newPthreadTypeByteArray(vmThread));\n}\n\n\n/*\tAnswer the user ID of my OS process */\n\nEXPORT(sqInt) primitiveGetUid(void) {\n    uid_t uid;\n\n\tuid = getuid();\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(uid);\n}\n\n\n/*\tTake a struct SQFile from the stack, and call feof(3) to determine if the file has\n\treached end of file. */\n/*\tDeprecated. The return values are reversed. Use primitiveTestEndOfFileFlag. */\n\nEXPORT(sqInt) primitiveIsAtEndOfFile(void) {\n    FILEHANDLETYPE file;\n    sqInt result;\n    sqInt sqFileOop;\n\n\tsqFileOop = interpreterProxy->stackValue(0);\n\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tfile = fileHandleFrom(sqFileOop);\n\tif (file == 0) {\n\t\treturn primitiveFail();\n\t}\n\tif (feof(file)) {\n\t\tresult = interpreterProxy->trueObject();\n\t} else {\n\t\tresult = interpreterProxy->falseObject();\n\t}\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->push(result);\n}\n\n\n/*\tSet a list of pids to kill with signum when VM exits. If the signum\n\tparameter is nil, the default value of SIGTERM will be used. */\n\nEXPORT(sqInt) primitiveKillOnExit(void) {\n    sqInt count;\n    pid_t *p;\n    pid_t pid;\n    sqInt *pidPointer;\n    sqInt pids;\n    sqInt signum;\n\n\tpids = interpreterProxy->stackValue(1);\n\tsignum = interpreterProxy->stackValue(0);\n\tpidCount = interpreterProxy->stSizeOf(pids);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!(pidArray == 0)) {\n\t\tfree(pidArray);\n\t}\n\tpidArray = malloc(pidCount * sizeof(pid_t));\n\tif (pidArray == 0) {\n\t\tpidCount = 0;\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tpidPointer = interpreterProxy->firstIndexableField(pids);\n\tcount = 0;\n\tp = pidArray;\n\twhile (count <= pidCount) {\n\t\tpid = ((*pidPointer++) >> 1);\n\t\t*p++ = pid;\n\t\tcount += 1;\n\t}\n\tif (!(signum == (interpreterProxy->nilObject()))) {\n\t\tsigNumToSend = interpreterProxy->checkedIntegerValueOf(signum);\n\t}\n\tif (interpreterProxy->failed()) {\n\t\tpidCount = 0;\n\t}\n\tinterpreterProxy->pop(2);\n}\n\n\n/*\tTake a struct SQFile from the stack, and request a lock on the specified region.\n\tIf the exclusive flag is true, then request an exclusive (F_WRLCK) lock on the\n     file. Otherwise, request a shared (F_RDLCK) lock. Any number of Unix processes\n     may hold  a read lock (shared lock) on a file region, but only one process may\n     hold a write lock (exclusive lock). Answer the result of the call to fcntl().\n\n\tIf length is zero, then the entire file will be locked, including region extents that\n\thave not yet been allocated for the file. */\n\nEXPORT(sqInt) primitiveLockFileRegion(void) {\n    sqInt exclusive;\n    int fileNo;\n    sqInt len;\n    struct flock lockStruct;\n    int result;\n    sqInt sqFileOop;\n    sqInt start;\n\n\texclusive = (interpreterProxy->stackValue(0)) == (interpreterProxy->trueObject());\n\tlen = interpreterProxy->stackIntegerValue(1);\n\tstart = interpreterProxy->stackIntegerValue(2);\n\tsqFileOop = interpreterProxy->stackValue(3);\n\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\n\t/* Set up the flock structure parameter for fcntl() */\n\n\tfileNo = unixFileNumber(fileHandleFrom(sqFileOop));\n\tif (exclusive) {\n\t\tlockStruct.l_type = F_WRLCK;\n\t} else {\n\t\tlockStruct.l_type = F_RDLCK;\n\t}\n\tlockStruct.l_whence = SEEK_SET;\n\tlockStruct.l_start = start;\n\tlockStruct.l_len = len;\n\tlockStruct.l_pid = 0;\n\tresult = fcntl(fileNo, F_SETLK, &lockStruct);\n\tinterpreterProxy->pop(5);\n\tinterpreterProxy->pushInteger(result);\n}\n\n\n/*\tCreate a pipe, and answer an array of two file handles for the pipe writer and reader.\n\tThe readerIOStream and writerIOStream variables represent the low level pipe streams,\n\twhich will be of type (FILE *) or HANDLE, depending on what the FilePlugin support\n\tcode is using to represent file streams. FILEHANDLETYPE is defined in my subclasses\n\tin the #declareCVarsIn: class method. */\n\nEXPORT(sqInt) primitiveMakePipe(void) {\n    sqInt arrayResult;\n    sqInt reader;\n    FILEHANDLETYPE readerIOStream;\n    FILEHANDLETYPE *readerIOStreamPtr;\n    SQFile *readerPtr;\n    SESSIONIDENTIFIERTYPE thisSession;\n    sqInt writer;\n    FILEHANDLETYPE writerIOStream;\n    FILEHANDLETYPE *writerIOStreamPtr;\n    SQFile *writerPtr;\n\n\n\t/* Create the anonymous OS pipe */\n\n\tthisSession = interpreterProxy->getThisSessionID();\n\treaderIOStreamPtr = &readerIOStream;\n\twriterIOStreamPtr = &writerIOStream;\n\tif (!(makePipeForReaderwriter(readerIOStreamPtr, writerIOStreamPtr))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\twriter = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\n\twriterPtr = interpreterProxy->arrayValueOf(writer);\n\twriterPtr->file = writerIOStream;\n\twriterPtr->sessionID = thisSession;\n\twriterPtr->writable = 1;\n\twriterPtr->lastOp = 0;\n\tinterpreterProxy->pushRemappableOop(writer);\n\treader = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\n\treaderPtr = interpreterProxy->arrayValueOf(reader);\n\treaderPtr->file = readerIOStream;\n\treaderPtr->sessionID = thisSession;\n\treaderPtr->writable = 0;\n\treaderPtr->lastOp = 0;\n\tinterpreterProxy->pushRemappableOop(reader);\n\tarrayResult = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2);\n\tinterpreterProxy->stObjectatput(arrayResult, 1, interpreterProxy->popRemappableOop());\n\tinterpreterProxy->stObjectatput(arrayResult, 2, interpreterProxy->popRemappableOop());\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->push(arrayResult);\n}\n\n\n/*\tCreate a pipe, and answer an array of two file handles for the pipe writer and reader.\n\tThe session identifier is passed as the parameter to this primitive. Use this variant\n\tif the session identifier is not available directly in the VM (as may be the case if\n\tit is not possible to link from this plugin to a variable elsewhere in the VM).\n\tThe readerIOStream and writerIOStream variables represent the low level pipe streams,\n\twhich will be of type (FILE *) or HANDLE, depending on what the FilePlugin support\n\tcode is using to represent file streams. FILEHANDLETYPE is defined in my subclasses\n\tin the #declareCVarsIn: class method. */\n\nEXPORT(sqInt) primitiveMakePipeWithSessionIdentifier(void) {\n    sqInt arrayResult;\n    sqInt reader;\n    FILEHANDLETYPE readerIOStream;\n    FILEHANDLETYPE *readerIOStreamPtr;\n    SQFile *readerPtr;\n    SESSIONIDENTIFIERTYPE thisSession;\n    sqInt writer;\n    FILEHANDLETYPE writerIOStream;\n    FILEHANDLETYPE *writerIOStreamPtr;\n    SQFile *writerPtr;\n\n\n\t/* Create the anonymous OS pipe */\n\n\tthisSession = sessionIdentifierFrom(interpreterProxy->stackObjectValue(0));\n\treaderIOStreamPtr = &readerIOStream;\n\twriterIOStreamPtr = &writerIOStream;\n\tif (!(makePipeForReaderwriter(readerIOStreamPtr, writerIOStreamPtr))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\twriter = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\n\twriterPtr = interpreterProxy->arrayValueOf(writer);\n\twriterPtr->file = writerIOStream;\n\twriterPtr->sessionID = thisSession;\n\twriterPtr->writable = 1;\n\twriterPtr->lastOp = 0;\n\tinterpreterProxy->pushRemappableOop(writer);\n\treader = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\n\treaderPtr = interpreterProxy->arrayValueOf(reader);\n\treaderPtr->file = readerIOStream;\n\treaderPtr->sessionID = thisSession;\n\treaderPtr->writable = 0;\n\treaderPtr->lastOp = 0;\n\tinterpreterProxy->pushRemappableOop(reader);\n\tarrayResult = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2);\n\tinterpreterProxy->stObjectatput(arrayResult, 1, interpreterProxy->popRemappableOop());\n\tinterpreterProxy->stObjectatput(arrayResult, 2, interpreterProxy->popRemappableOop());\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->push(arrayResult);\n}\n\n\n/*\tAnswer a string containing the module name string for this plugin. */\n\nEXPORT(sqInt) primitiveModuleName(void) {\n\tinterpreterProxy->popthenPush(1, stringFromCString(moduleName));\n}\n\n\n/*\tChange the scheduling priority of this process by the given nice increment.\n\tA positive increment decreases the priority. Only the superuser can specify\n\ta negative value (to increase the priority). See man(2) nice.\n\n\tDifferent versions of Unix are inconsistent in their return values. The only\n\treliable test for success is to clear errno prior to the call, and test its value\n\tif the result of nice() is -1. */\n\nEXPORT(sqInt) primitiveNice(void) {\n    extern int errno;\n    int niceIncrement;\n    sqInt result;\n\n\tniceIncrement = interpreterProxy->stackIntegerValue(0);\n\terrno = 0;\n\tresult = nice(niceIncrement);\n\tif (result == -1) {\n\t\tif (!(errno == 0)) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t}\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->pushInteger(result);\n}\n\n\n/*\tSet an environment variable using a string of the form 'KEY=value'. This\n\timplementation allocates a C string using malloc to allocate from the C heap\n\t(using cStringFromString rather than transientCStringFromString). This\n\tis necessary because the C runtime library does not make a copy of the\n\tstring into separately allocated environment memory. */\n\nEXPORT(sqInt) primitivePutEnv(void) {\n    char *cStringPtr;\n    sqInt keyValueString;\n\n\tkeyValueString = interpreterProxy->stackObjectValue(0);\n\tcStringPtr = cStringFromString(keyValueString);\n\tif ((putenv(cStringPtr)) == 0) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->push(keyValueString);\n\t} else {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n}\n\n\n/*\tAnswer the real path for a path string as determined by realpath(). */\n\nEXPORT(sqInt) primitiveRealpath(void) {\n    char *buffer;\n    sqInt bufferSize;\n    sqInt newPathString;\n    char *pathString;\n    char * realpathResult;\n    sqInt s;\n\n\tbufferSize = 1024;\n\tnewPathString = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), bufferSize);\n\tinterpreterProxy->pushRemappableOop(newPathString);\n\tpathString = transientCStringFromString(interpreterProxy->stackObjectValue(0));\n\tnewPathString = interpreterProxy->popRemappableOop();\n\tbuffer = interpreterProxy->arrayValueOf(newPathString);\n\trealpathResult = realpath(pathString, buffer);\n\tif (realpathResult == 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t} else {\n\t\tif ((strlen(realpathResult)) >= 1024) {\n\t\t\tperror(\"warning: statically allocated array exceeded in UnixOSProcessPlugin>>primitiveRealPath, object memory may have been corrupted\");\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t\ts = stringFromCString(realpathResult);\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->push(s);\n\t}\n}\n\n\n/*\tClean up after the death of a child, and answer an array with the pid and\n\tthe exit status of the child process. Answer nil if the pidToHandle does not exist. */\n\nEXPORT(sqInt) primitiveReapChildProcess(void) {\n    sqInt *arrayPtr;\n    int exitStatus;\n    pid_t pidResult;\n    sqInt pidToHandle;\n    sqInt resultArray;\n\n\n\t/* Force C code translator to declare the variable */\n\n\texitStatus = 0;\n\tpidToHandle = interpreterProxy->stackIntegerValue(0);\n\tpidResult = waitpid ( pidToHandle, &exitStatus, WNOHANG );\n\tif (pidResult <= 0) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->push(interpreterProxy->nilObject());\n\t} else {\n\n\t\t/* Answer an array with pid and result status  */\n\n\t\tresultArray = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2);\n\t\tarrayPtr = interpreterProxy->firstIndexableField(resultArray);\n\t\tarrayPtr[0] = integerObjectOf(pidResult);\n\t\tarrayPtr[1] = integerObjectOf(exitStatus);\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->push(resultArray);\n\t}\n}\n\n\n/*\tTake a struct SQFile from the stack, and call fflush() to flush the OS stream. This flushes the\n\tfile stream in the C library, not the stream in Smalltalk. For output streams, consider setting\n\tthe OS stream (C library) to unbuffered output, and letting Smalltalk do all the buffering. */\n\nEXPORT(sqInt) primitiveSQFileFlush(void) {\n    int result;\n    sqInt sqFileOop;\n\n\tsqFileOop = interpreterProxy->stackValue(0);\n\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tresult = fflush(fileHandleFrom(sqFileOop));\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->pushInteger(result);\n}\n\n\n/*\tTake a struct SQFile from the stack, and call fflush() to flush the OS stream. This flushes the\n\tfile stream in the C library, not the stream in Smalltalk. For output streams, consider setting\n\tthe OS stream (C library) to unbuffered output, and letting Smalltalk do all the buffering.\n\tThe session identifier is passed as the parameter to this primitive. Use this variant if the session\n\tidentifier is not available directly in the VM (as may be the case if it is not possible to link from\n\tthis plugin to a variable elsewhere in the VM). */\n\nEXPORT(sqInt) primitiveSQFileFlushWithSessionIdentifier(void) {\n    int result;\n    sqInt sqFileOop;\n\n\tsqFileOop = interpreterProxy->stackValue(1);\n\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tresult = fflush(fileHandleFrom(sqFileOop));\n\tinterpreterProxy->pop(3);\n\tinterpreterProxy->pushInteger(result);\n}\n\n\n/*\tTake a struct SQFile from the stack, and call fcntl() to set the file for blocking I/O. */\n\nEXPORT(sqInt) primitiveSQFileSetBlocking(void) {\n    sqInt descriptor;\n    int flags;\n    sqInt retVal;\n    sqInt sqFileOop;\n\n\tsqFileOop = interpreterProxy->stackValue(0);\n\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\t/* begin fileDescriptorFrom: */\n\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\n\t\tdescriptor = -1;\n\t\tgoto l1;\n\t}\n\tdescriptor = fileno(fileHandleFrom(sqFileOop));\nl1:\t/* end fileDescriptorFrom: */;\n\tif (descriptor == -1) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tflags = fcntl(descriptor, F_GETFL);\n\tretVal = fcntl(descriptor, F_SETFL, flags & ~O_NONBLOCK);\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->pushInteger(retVal);\n}\n\n\n/*\tTake a struct SQFile from the stack, and call fcntl() to set the file for blocking I/O.\n\tUse this variant if the session identifier is not available directly in the VM (as may be\n\tthe case if it is not possible to link from this plugin to a variable elsewhere in the VM). */\n\nEXPORT(sqInt) primitiveSQFileSetBlockingWithSessionIdentifier(void) {\n    sqInt descriptor;\n    sqInt flags;\n    sqInt retVal;\n    SQFile *sqFile;\n    sqInt sqFileOop;\n    SESSIONIDENTIFIERTYPE thisSession;\n\n\tsqFileOop = interpreterProxy->stackValue(1);\n\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tsqFile = interpreterProxy->arrayValueOf(sqFileOop);\n\tthisSession = sessionIdentifierFrom(interpreterProxy->stackObjectValue(0));\n\tif (thisSession == (sqFile->sessionID)) {\n\t\t/* begin fileDescriptorFrom: */\n\t\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\n\t\t\tdescriptor = -1;\n\t\t\tgoto l1;\n\t\t}\n\t\tdescriptor = fileno(fileHandleFrom(sqFileOop));\n\tl1:\t/* end fileDescriptorFrom: */;\n\t\tif (descriptor < 0) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t\tflags = fcntl(descriptor, F_GETFL);\n\t\tretVal = fcntl(descriptor, F_SETFL, flags & ~O_NONBLOCK);\n\t\tinterpreterProxy->pop(3);\n\t\tinterpreterProxy->pushInteger(retVal);\n\t} else {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n}\n\n\n/*\tTake a struct SQFile from the stack, and call fcntl() to set the file non-blocking I/O. */\n\nEXPORT(sqInt) primitiveSQFileSetNonBlocking(void) {\n    sqInt descriptor;\n    int flags;\n    sqInt retVal;\n    sqInt sqFileOop;\n\n\tsqFileOop = interpreterProxy->stackValue(0);\n\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\t/* begin fileDescriptorFrom: */\n\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\n\t\tdescriptor = -1;\n\t\tgoto l1;\n\t}\n\tdescriptor = fileno(fileHandleFrom(sqFileOop));\nl1:\t/* end fileDescriptorFrom: */;\n\tif (descriptor < 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tflags = fcntl(descriptor, F_GETFL);\n\tretVal = fcntl(descriptor, F_SETFL, flags | O_NONBLOCK);\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->pushInteger(retVal);\n}\n\n\n/*\tTake a struct SQFile from the stack, and call fcntl() to set the file non-blocking I/O.\n\tUse this variant if the session identifier is not available directly in the VM (as may be\n\tthe case if it is not possible to link from this plugin to a variable elsewhere in the VM). */\n\nEXPORT(sqInt) primitiveSQFileSetNonBlockingWithSessionIdentifier(void) {\n    sqInt descriptor;\n    sqInt flags;\n    sqInt retVal;\n    SQFile *sqFile;\n    sqInt sqFileOop;\n    SESSIONIDENTIFIERTYPE thisSession;\n\n\tsqFileOop = interpreterProxy->stackValue(1);\n\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tsqFile = interpreterProxy->arrayValueOf(sqFileOop);\n\tthisSession = sessionIdentifierFrom(interpreterProxy->stackObjectValue(0));\n\tif (thisSession == (sqFile->sessionID)) {\n\t\t/* begin fileDescriptorFrom: */\n\t\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\n\t\t\tdescriptor = -1;\n\t\t\tgoto l1;\n\t\t}\n\t\tdescriptor = fileno(fileHandleFrom(sqFileOop));\n\tl1:\t/* end fileDescriptorFrom: */;\n\t\tif (descriptor < 0) {\n\t\t\treturn interpreterProxy->primitiveFail();\n\t\t}\n\t\tflags = fcntl(descriptor, F_GETFL);\n\t\tretVal = fcntl(descriptor, F_SETFL, flags | O_NONBLOCK);\n\t\tinterpreterProxy->pop(3);\n\t\tinterpreterProxy->pushInteger(retVal);\n\t} else {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n}\n\n\n/*\tTake a struct SQFile from the stack, and call setbuf() to set the OS file stream\n\t(implemented in the C library) for unbuffered I/O. Answers the result of a fflush()\n\tcall, not the result of the setbuf() call (which is type void). This is nearly useless,\n\tbut may at least provide an indicator that we are operating on a valid file stream. */\n\nEXPORT(sqInt) primitiveSQFileSetUnbuffered(void) {\n    FILEHANDLETYPE file;\n    sqInt retVal;\n    sqInt sqFileOop;\n\n\tsqFileOop = interpreterProxy->stackValue(0);\n\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tfile = fileHandleFrom(sqFileOop);\n\tretVal = fflush(file);\n\tsetbuf(file, 0);\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->pushInteger(retVal);\n}\n\n\n/*\tTake a struct SQFile from the stack, and call setbuf() to set the OS file stream (implemented in\n\tthe C library) for unbuffered I/O. Answers the result of a fflush() call, not the result of the\n\tsetbuf() call (which is type void). This is nearly useless, but may at least provide an indicator\n\tthat we are operating on a valid file stream. Use this variant if the session identifier is not\n\tavailable directly in the VM (as may be the case if it is not possible to link from this plugin\n\tto a variable elsewhere in the VM). */\n\nEXPORT(sqInt) primitiveSQFileSetUnbufferedWithSessionIdentifier(void) {\n    sqInt retVal;\n    SQFile *sqFile;\n    sqInt sqFileOop;\n    SESSIONIDENTIFIERTYPE thisSession;\n\n\tsqFileOop = interpreterProxy->stackValue(1);\n\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tsqFile = interpreterProxy->arrayValueOf(sqFileOop);\n\tthisSession = sessionIdentifierFrom(interpreterProxy->stackObjectValue(0));\n\tif (thisSession == (sqFile->sessionID)) {\n\t\tretVal = fflush(sqFile->file);\n\t\tsetbuf(sqFile->file, NULL);\n\t\tinterpreterProxy->pop(3);\n\t\tinterpreterProxy->pushInteger(retVal);\n\t} else {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n}\n\n\n/*\tAnswer the registration index of the semaphore currently associated with the\n\tsignal handler for sigNum. */\n\nEXPORT(sqInt) primitiveSemaIndexFor(void) {\n    sqInt index;\n    sqInt sigNum;\n\n\tsigNum = interpreterProxy->stackIntegerValue(0);\n\tindex = semaIndices[sigNum];\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->pushInteger(index);\n}\n\n\n/*\tSend SIGABRT (abort) to the OS process identified by anIntegerPid. Use an explicit\n\tcheck for isIntegerObject so we can return -1 on error (the stackIntegerValue: method\n\tanswers 1 on error, and 1 is a valid pid number). */\n\nEXPORT(sqInt) primitiveSendSigabrtTo(sqInt anIntegerPid) {\n    pid_t pidToSignal;\n    int result;\n    sqInt sig;\n\n\tif ((sandboxSecurity()) == 1) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(-1);\n\t} else {\n\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\n\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\n\t\t\t/* begin sendSignal:toPid: */\n\t\t\tsig = sigAbrtNumber();\n\t\t\tresult = kill(pidToSignal, sig);\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(result);\n\t\t} else {\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(-1);\n\t\t}\n\t}\n}\n\n\n/*\tSend SIGALRM (alarm clock) to the OS process identified by anIntegerPid. Use an explicit\n\tcheck for isIntegerObject so we can return -1 on error (the stackIntegerValue: method\n\tanswers 1 on error, and 1 is a valid pid number). */\n\nEXPORT(sqInt) primitiveSendSigalrmTo(sqInt anIntegerPid) {\n    pid_t pidToSignal;\n    int result;\n    sqInt sig;\n\n\tif ((sandboxSecurity()) == 1) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(-1);\n\t} else {\n\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\n\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\n\t\t\t/* begin sendSignal:toPid: */\n\t\t\tsig = sigAlrmNumber();\n\t\t\tresult = kill(pidToSignal, sig);\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(result);\n\t\t} else {\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(-1);\n\t\t}\n\t}\n}\n\n\n/*\tSend SIGCHLD (child status has changed, usually death of child) to the OS process\n\tidentified by anIntegerPid. Use an explicit check for isIntegerObject so we can\n\treturn -1 on error (the stackIntegerValue: method answers 1 on error, and 1 is a\n\tvalid pid number). */\n\nEXPORT(sqInt) primitiveSendSigchldTo(sqInt anIntegerPid) {\n    pid_t pidToSignal;\n    int result;\n    sqInt sig;\n\n\tif ((sandboxSecurity()) == 1) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(-1);\n\t} else {\n\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\n\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\n\t\t\t/* begin sendSignal:toPid: */\n\t\t\tsig = sigChldNumber();\n\t\t\tresult = kill(pidToSignal, sig);\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(result);\n\t\t} else {\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(-1);\n\t\t}\n\t}\n}\n\n\n/*\tSend SIGCONT (continue) to the OS process identified by anIntegerPid. Use an explicit\n\tcheck for isIntegerObject so we can return -1 on error (the stackIntegerValue: method\n\tanswers 1 on error, and 1 is a valid pid number). */\n\nEXPORT(sqInt) primitiveSendSigcontTo(sqInt anIntegerPid) {\n    pid_t pidToSignal;\n    int result;\n    sqInt sig;\n\n\tif ((sandboxSecurity()) == 1) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(-1);\n\t} else {\n\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\n\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\n\t\t\t/* begin sendSignal:toPid: */\n\t\t\tsig = sigContNumber();\n\t\t\tresult = kill(pidToSignal, sig);\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(result);\n\t\t} else {\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(-1);\n\t\t}\n\t}\n}\n\n\n/*\tSend SIGHUP (hangup) to the OS process identified by anIntegerPid. Use an explicit\n\tcheck for isIntegerObject so we can return -1 on error (the stackIntegerValue: method\n\tanswers 1 on error, and 1 is a valid pid number). */\n\nEXPORT(sqInt) primitiveSendSighupTo(sqInt anIntegerPid) {\n    pid_t pidToSignal;\n    int result;\n    sqInt sig;\n\n\tif ((sandboxSecurity()) == 1) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(-1);\n\t} else {\n\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\n\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\n\t\t\t/* begin sendSignal:toPid: */\n\t\t\tsig = sigHupNumber();\n\t\t\tresult = kill(pidToSignal, sig);\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(result);\n\t\t} else {\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(-1);\n\t\t}\n\t}\n}\n\n\n/*\tSend SIGINT (interrupt) to the OS process identified by anIntegerPid. Use an explicit\n\tcheck for isIntegerObject so we can return -1 on error (the stackIntegerValue: method\n\tanswers 1 on error, and 1 is a valid pid number). */\n\nEXPORT(sqInt) primitiveSendSigintTo(sqInt anIntegerPid) {\n    pid_t pidToSignal;\n    int result;\n    sqInt sig;\n\n\tif ((sandboxSecurity()) == 1) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(-1);\n\t} else {\n\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\n\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\n\t\t\t/* begin sendSignal:toPid: */\n\t\t\tsig = sigIntNumber();\n\t\t\tresult = kill(pidToSignal, sig);\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(result);\n\t\t} else {\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(-1);\n\t\t}\n\t}\n}\n\n\n/*\tSend SIGKILL (kill, unblockable) to the OS process identified by anIntegerPid. Use an explicit\n\tcheck for isIntegerObject so we can return -1 on error (the stackIntegerValue: method\n\tanswers 1 on error, and 1 is a valid pid number). */\n\nEXPORT(sqInt) primitiveSendSigkillTo(sqInt anIntegerPid) {\n    pid_t pidToSignal;\n    int result;\n    sqInt sig;\n\n\tif ((sandboxSecurity()) == 1) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(-1);\n\t} else {\n\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\n\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\n\t\t\t/* begin sendSignal:toPid: */\n\t\t\tsig = sigKillNumber();\n\t\t\tresult = kill(pidToSignal, sig);\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(result);\n\t\t} else {\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(-1);\n\t\t}\n\t}\n}\n\n\n/*\tSend SIGPIPE (broken pipe) to the OS process identified by anIntegerPid. Use an explicit\n\tcheck for isIntegerObject so we can return -1 on error (the stackIntegerValue: method\n\tanswers 1 on error, and 1 is a valid pid number). */\n\nEXPORT(sqInt) primitiveSendSigpipeTo(sqInt anIntegerPid) {\n    pid_t pidToSignal;\n    int result;\n    sqInt sig;\n\n\tif ((sandboxSecurity()) == 1) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(-1);\n\t} else {\n\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\n\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\n\t\t\t/* begin sendSignal:toPid: */\n\t\t\tsig = sigPipeNumber();\n\t\t\tresult = kill(pidToSignal, sig);\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(result);\n\t\t} else {\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(-1);\n\t\t}\n\t}\n}\n\n\n/*\tSend SIGQUIT (quit) to the OS process identified by anIntegerPid. Use an explicit\n\tcheck for isIntegerObject so we can return -1 on error (the stackIntegerValue: method\n\tanswers 1 on error, and 1 is a valid pid number). */\n\nEXPORT(sqInt) primitiveSendSigquitTo(sqInt anIntegerPid) {\n    pid_t pidToSignal;\n    int result;\n    sqInt sig;\n\n\tif ((sandboxSecurity()) == 1) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(-1);\n\t} else {\n\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\n\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\n\t\t\t/* begin sendSignal:toPid: */\n\t\t\tsig = sigQuitNumber();\n\t\t\tresult = kill(pidToSignal, sig);\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(result);\n\t\t} else {\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(-1);\n\t\t}\n\t}\n}\n\n\n/*\tSend SIGSTOP (stop, unblockable) to the OS process identified by anIntegerPid. Use an explicit\n\tcheck for isIntegerObject so we can return -1 on error (the stackIntegerValue: method\n\tanswers 1 on error, and 1 is a valid pid number). */\n\nEXPORT(sqInt) primitiveSendSigstopTo(sqInt anIntegerPid) {\n    pid_t pidToSignal;\n    int result;\n    sqInt sig;\n\n\tif ((sandboxSecurity()) == 1) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(-1);\n\t} else {\n\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\n\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\n\t\t\t/* begin sendSignal:toPid: */\n\t\t\tsig = sigStopNumber();\n\t\t\tresult = kill(pidToSignal, sig);\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(result);\n\t\t} else {\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(-1);\n\t\t}\n\t}\n}\n\n\n/*\tSend SIGTERM (termination) to the OS process identified by anIntegerPid. Use an explicit\n\tcheck for isIntegerObject so we can return -1 on error (the stackIntegerValue: method\n\tanswers 1 on error, and 1 is a valid pid number). */\n\nEXPORT(sqInt) primitiveSendSigtermTo(sqInt anIntegerPid) {\n    pid_t pidToSignal;\n    int result;\n    sqInt sig;\n\n\tif ((sandboxSecurity()) == 1) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(-1);\n\t} else {\n\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\n\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\n\t\t\t/* begin sendSignal:toPid: */\n\t\t\tsig = sigTermNumber();\n\t\t\tresult = kill(pidToSignal, sig);\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(result);\n\t\t} else {\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(-1);\n\t\t}\n\t}\n}\n\n\n/*\tSend SIGUSR1 (User-defined signal 1) to the OS process identified by anIntegerPid. Use\n\tan explicit check for isIntegerObject so we can return -1 on error (the stackIntegerValue:\n\tmethod answers 1 on error, and 1 is a valid pid number). */\n\nEXPORT(sqInt) primitiveSendSigusr1To(sqInt anIntegerPid) {\n    pid_t pidToSignal;\n    int result;\n    sqInt sig;\n\n\tif ((sandboxSecurity()) == 1) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(-1);\n\t} else {\n\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\n\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\n\t\t\t/* begin sendSignal:toPid: */\n\t\t\tsig = sigUsr1Number();\n\t\t\tresult = kill(pidToSignal, sig);\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(result);\n\t\t} else {\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(-1);\n\t\t}\n\t}\n}\n\n\n/*\tSend SIGUSR2 (User-defined signal 2) to the OS process identified by anIntegerPid. Use\n\tan explicit check for isIntegerObject so we can return -1 on error (the stackIntegerValue:\n\tmethod answers 1 on error, and 1 is a valid pid number). */\n\nEXPORT(sqInt) primitiveSendSigusr2To(sqInt anIntegerPid) {\n    pid_t pidToSignal;\n    int result;\n    sqInt sig;\n\n\tif ((sandboxSecurity()) == 1) {\n\t\tinterpreterProxy->pop(2);\n\t\tinterpreterProxy->pushInteger(-1);\n\t} else {\n\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\n\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\n\t\t\t/* begin sendSignal:toPid: */\n\t\t\tsig = sigUsr2Number();\n\t\t\tresult = kill(pidToSignal, sig);\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(result);\n\t\t} else {\n\t\t\tinterpreterProxy->pop(2);\n\t\t\tinterpreterProxy->pushInteger(-1);\n\t\t}\n\t}\n}\n\n\n/*\tSet the process group ID of the process identified by pid to a new process\n\tgroup ID. */\n\nEXPORT(sqInt) primitiveSetPGid(void) {\n    pid_t pgid;\n    pid_t pid;\n\n\tpid = interpreterProxy->stackIntegerValue(1);\n\tpgid = interpreterProxy->stackIntegerValue(0);\n\tif ((setpgid(pid, pgid)) == -1) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop(2);\n}\n\n\n/*\tSet a new process group for this OS process. Newly created child processes\n\twill be members of the new process group. Note: Use setpgid(0,0) rather than\n\tthe equivalent setpgrp() because setpgrp() is implemented differently on\n\tsome flavors of Unix. */\n\nEXPORT(sqInt) primitiveSetPGrp(void) {\n\tif ((setpgid(0, 0)) == -1) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n}\n\n\n/*\tSet the index of the semaphore used by the OSProcess with which I collaborate. My\n\tOSProcess should set this value so that I can use it when handling SIGCHLD signals\n\t(death of child). In the C translation this is a static int which would be shared by all\n\tinstances of UnixOSProcessPlugin, which is expected to be a singleton. Answer the\n\tvalue of the semaphore index. */\n\nEXPORT(sqInt) primitiveSetSemaIndex(void) {\n\tsigChldSemaIndex = interpreterProxy->stackIntegerValue(0);\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->pushInteger(sigChldSemaIndex);\n}\n\n\n/*\tQuoted from Linux man pages:\n\tsetsid() creates a new session if the calling process is not a process group leader.\n\tThe calling process is the leader of the new session, the process  group  leader  of\n\tthe new process group, and has no controlling tty.  The process group ID and session\n\tID of the calling process are set to the PID of the calling  process.   The  calling\n\tprocess  will be the only process in this new process group and in this new session. */\n\nEXPORT(sqInt) primitiveSetSid(void) {\n    pid_t sessionId;\n\n\tsessionId = setsid();\n\tif (sessionId == -1) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(sessionId);\n}\n\n\n/*\tInteger value corresponding to SIGCHLD */\n\nEXPORT(sqInt) primitiveSigChldNumber(void) {\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(sigChldNumber());\n}\n\n\n/*\tInteger value corresponding to SIGHUP */\n\nEXPORT(sqInt) primitiveSigHupNumber(void) {\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(sigHupNumber());\n}\n\n\n/*\tInteger value corresponding to SIGINT */\n\nEXPORT(sqInt) primitiveSigIntNumber(void) {\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(sigIntNumber());\n}\n\n\n/*\tInteger value corresponding to SIGKILL */\n\nEXPORT(sqInt) primitiveSigKillNumber(void) {\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(sigKillNumber());\n}\n\n\n/*\tInteger value corresponding to SIGPIPE */\n\nEXPORT(sqInt) primitiveSigPipeNumber(void) {\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(sigPipeNumber());\n}\n\n\n/*\tInteger value corresponding to SIGQUIT */\n\nEXPORT(sqInt) primitiveSigQuitNumber(void) {\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(sigQuitNumber());\n}\n\n\n/*\tInteger value corresponding to SIGTERM */\n\nEXPORT(sqInt) primitiveSigTermNumber(void) {\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(sigTermNumber());\n}\n\n\n/*\tInteger value corresponding to SIGUSR1 */\n\nEXPORT(sqInt) primitiveSigUsr1Number(void) {\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(sigUsr1Number());\n}\n\n\n/*\tInteger value corresponding to SIGUSR2 */\n\nEXPORT(sqInt) primitiveSigUsr2Number(void) {\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(sigUsr2Number());\n}\n\n\n/*\tSize in bytes of an integer, for this C compiler on this machine. */\n\nEXPORT(sqInt) primitiveSizeOfInt(void) {\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(sizeOfInt());\n}\n\n\n/*\tSize in bytes of a void pointer, for this C compiler on this machine. */\n\nEXPORT(sqInt) primitiveSizeOfPointer(void) {\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->pushInteger(sizeOfPointer());\n}\n\n\n/*\tTake a struct SQFile from the stack, and call feof(3) to determine if the file has\n\treached end of file. The flag is set only by a previous read operation, so end of\n\tfile is not detected until an actual EOF condition has been detected by a read attempt. */\n\nEXPORT(sqInt) primitiveTestEndOfFileFlag(void) {\n    FILEHANDLETYPE file;\n    sqInt result;\n    sqInt sqFileOop;\n\n\tsqFileOop = interpreterProxy->stackValue(0);\n\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tfile = fileHandleFrom(sqFileOop);\n\tif (file == 0) {\n\t\treturn primitiveFail();\n\t}\n\tif (feof(file)) {\n\t\tresult = interpreterProxy->trueObject();\n\t} else {\n\t\tresult = interpreterProxy->falseObject();\n\t}\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->push(result);\n}\n\n\n/*\tTake a struct SQFile from the stack, and check for ability to lock the specified region.\n\tIf the exclusive flag is true, then specify an exclusive (F_WRLCK) lock on the\n     file. Otherwise, specify a shared (F_RDLCK) lock. Any number of Unix processes\n     may hold  a read lock (shared lock) on a file region, but only one process may\n     hold a write lock (exclusive lock).\n\n\tIf length is zero, then the request is for the entire file to be locked, including\n\tregion extents that have not yet been allocated for the file.\n\n\tIf the fcntl() call fails, answer -1 (the result of the failed call). Otherwise,\n\tanswer an array with the following six fields:\n\t\tlockable (true or false)\n\t\tl_pid (pid of the process preventing this lock request, or nil)\n\t\tl_type (request type F_WRLCK or F_RDLOCK of the process preventing this lock request)\n\t\tl_whence (the SEEK_SET, SEEK_CUR, or SEEK_END value of the lock preventing this lock request).\n\t\tl_start (offset of the region lock preventing this lock request)\n\t\tl_len (length of the region lock preventing this lock request) */\n\nEXPORT(sqInt) primitiveTestLockableFileRegion(void) {\n    sqInt canObtainLock;\n    sqInt exclusive;\n    int fileNo;\n    sqInt len;\n    struct flock lockStruct;\n    int result;\n    sqInt resultArray;\n    sqInt sqFileOop;\n    sqInt start;\n\n\texclusive = (interpreterProxy->stackValue(0)) == (interpreterProxy->trueObject());\n\tlen = interpreterProxy->stackIntegerValue(1);\n\tstart = interpreterProxy->stackIntegerValue(2);\n\tsqFileOop = interpreterProxy->stackValue(3);\n\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\n\t/* Set up the flock structure parameter for fcntl() */\n\n\tfileNo = unixFileNumber(fileHandleFrom(sqFileOop));\n\tif (exclusive) {\n\t\tlockStruct.l_type = F_WRLCK;\n\t} else {\n\t\tlockStruct.l_type = F_RDLCK;\n\t}\n\tlockStruct.l_whence = SEEK_SET;\n\tlockStruct.l_start = start;\n\tlockStruct.l_len = len;\n\tlockStruct.l_pid = 0;\n\tresult = fcntl(fileNo, F_GETLK, &lockStruct);\n\tif (result == -1) {\n\t\tinterpreterProxy->pop(5);\n\t\tinterpreterProxy->pushInteger(result);\n\t} else {\n\t\tif (lockStruct.l_type == F_UNLCK) {\n\t\t\tcanObtainLock = interpreterProxy->trueObject();\n\t\t} else {\n\t\t\tcanObtainLock = interpreterProxy->falseObject();\n\t\t}\n\t\tresultArray = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 6);\n\t\tinterpreterProxy->stObjectatput(resultArray, 1, canObtainLock);\n\t\tinterpreterProxy->stObjectatput(resultArray, 2, (((lockStruct.l_pid) << 1) | 1));\n\t\tinterpreterProxy->stObjectatput(resultArray, 3, (((lockStruct.l_type) << 1) | 1));\n\t\tinterpreterProxy->stObjectatput(resultArray, 4, (((lockStruct.l_whence) << 1) | 1));\n\t\tinterpreterProxy->stObjectatput(resultArray, 5, (((lockStruct.l_start) << 1) | 1));\n\t\tinterpreterProxy->stObjectatput(resultArray, 6, (((lockStruct.l_len) << 1) | 1));\n\t\tinterpreterProxy->popthenPush(5, resultArray);\n\t}\n}\n\n\n/*\tClose a file handle at the close(2) level, using a handle returned by\n\t#primitiveUnixFileNumber. */\n\nEXPORT(sqInt) primitiveUnixFileClose(sqInt anIntegerFileNumber) {\n    int handle;\n    int result;\n\n\thandle = interpreterProxy->stackIntegerValue(0);\n\tresult = close(handle);\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->pushInteger(result);\n}\n\n\n/*\tTake a struct SQFile from the stack, and answer the value of its Unix file number.\n\tThe Unix file number is not directly useful to Squeak, but may be interesting for\n\tdebugging problems involving failure to close unused file handles. */\n\nEXPORT(sqInt) primitiveUnixFileNumber(void) {\n    int fileNo;\n    sqInt sqFileOop;\n\n\tsqFileOop = interpreterProxy->stackValue(0);\n\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tfileNo = unixFileNumber(fileHandleFrom(sqFileOop));\n\tinterpreterProxy->pop(2);\n\tinterpreterProxy->pushInteger(fileNo);\n}\n\n\n/*\tTake a struct SQFile from the stack, and unlock the specified region.\n\tAnswer the result of the call to fcntl(). If the region is in the file lock cache,\n\tremove it, but otherwise ignore the cache. The cache supports Win32 semantics\n\twithin a single Squeak image, but not across separate images, therefore the\n\tunlock should be attempted regardless of whether this image thinks that the\n\tregion has previously been locked. Answer the result of the call to fcntl(). */\n\nEXPORT(sqInt) primitiveUnlockFileRegion(void) {\n    int fileNo;\n    sqInt len;\n    struct flock lockStruct;\n    int result;\n    sqInt sqFileOop;\n    sqInt start;\n\n\tlen = interpreterProxy->stackIntegerValue(0);\n\tstart = interpreterProxy->stackIntegerValue(1);\n\tsqFileOop = interpreterProxy->stackValue(2);\n\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\n\t/* Set up the flock structure parameter for fcntl() */\n\n\tfileNo = unixFileNumber(fileHandleFrom(sqFileOop));\n\tlockStruct.l_type = F_UNLCK;\n\tlockStruct.l_whence = SEEK_SET;\n\tlockStruct.l_start = start;\n\tlockStruct.l_len = len;\n\tlockStruct.l_pid = 0;\n\tresult = fcntl(fileNo, F_SETLK, &lockStruct);\n\tinterpreterProxy->pop(4);\n\tinterpreterProxy->pushInteger(result);\n}\n\n\n/*\tUnset an environment variable. */\n/*\tFIXME: unsetenv() is not portable. For Solaris or any other system which does not\n\tsupport unsetenv(), just comment it out in this method and rebuild the plugin. */\n\nEXPORT(sqInt) primitiveUnsetEnv(void) {\n\tunsetenv(transientCStringFromString(interpreterProxy->stackObjectValue(0)));\n\tinterpreterProxy->pop(1);\n}\n\n\n/*\tAnswer a string containing the version string for this plugin. */\n\nEXPORT(sqInt) primitiveVersionString(void) {\n\tinterpreterProxy->pop(1);\n\tinterpreterProxy->push(stringFromCString(versionString()));\n}\n\n\n/*\tThis is a signal handler for SIGCHLD. It is not meant to be called from Smalltalk,\n\tand should only be called indirectly as a result of a death of child signal from\n\tthe operating system.\n\n\tChild processes must be cleaned up by the parent, otherwise they continue\n\tto exist as zombies until the parent exits. This handler resets the signal handler\n\tto catch the next SIGCHLD signal, then sets a semaphore to notify the system\n\tthat a child process needs to be cleaned up. The actual clean up is done by a\n\tSmalltalk process which waits on the semaphore, then calls primitiveReapChildProcess.\n\n\tNote: If child processes die faster than we can clean them up, signals will be lost\n\tand child processes will remain as zombies. */\n\nstatic void reapChildProcess(int sigNum) {\n\tsetSigChldHandler();\n\tif (sigChldSemaIndex > 0) {\n\t\tinterpreterProxy->signalSemaphoreWithIndex(sigChldSemaIndex);\n\t}\n}\n\n\n/*\tSignal sigNum has been caught by a thread other than the pthread in which\n\tthe interpreter is executing. Rather than handling it in this thread, resend\n\tit to the interpreter thread. */\n\nstatic sqInt resendSignal(int sigNum) {\n\tpthread_kill(vmThread, sigNum);\n}\n\n\n/*\tRestore signal handlers to their original behaviors. */\n\nstatic void restoreDefaultSignalHandlers(void) {\n    sqInt sigNum;\n\n\tsigNum = 1;\n\twhile (sigNum <= (signalArraySize())) {\n\t\tif ((semaIndices[sigNum]) > 0) {\n\t\t\tsetSignalNumberhandler(sigNum, originalSigHandlers[sigNum]);\n\t\t}\n\t\tsigNum += 1;\n\t}\n}\n\n\n/*\tAnswer 1 if running in secure mode, else 0. The osprocessSandboxSecurity\n\tvariable is initialized to -1. On the first call to this method, set its value to\n\teither 0 (user has full access to the plugin) or 1 (user is not permitted to do\n\tdangerous things). */\n\nstatic sqInt sandboxSecurity(void) {\n\tif (osprocessSandboxSecurity < 0) {\n\t\tosprocessSandboxSecurity = securityHeurisitic();\n\t}\n\treturn osprocessSandboxSecurity;\n}\n\n\n/*\tAnswer 0 to permit full access to OSProcess functions, or 1 if access should be\n\trestricted for dangerous functions. The rules are:\n\t\t- If the security plugin is not present, grant full access\n\t\t- If the security plugin can be loaded, restrict access unless user has all\n\t\t  of secCanWriteImage, secHasFileAccess and secHasSocketAccess */\n/*\tFIXME: This function has not been tested. -dtl */\n/*\tIf the security plugin can be loaded, use it to check. If not, assume it's ok */\n\nstatic sqInt securityHeurisitic(void) {\n    sqInt canWriteImage;\n    sqInt hasFileAccess;\n    sqInt hasSocketAccess;\n    void (*sCWIfn)(void);\n    void (*sHFAfn)(void);\n    void (*sHSAfn)(void);\n\n\tsCWIfn = interpreterProxy->ioLoadFunctionFrom(\"secCanWriteImage\", \"SecurityPlugin\");\n\tif (sCWIfn == 0) {\n\t\treturn 0;\n\t}\n\tcanWriteImage =  ((int (*) (void)) sCWIfn)();\n\tsHFAfn = interpreterProxy->ioLoadFunctionFrom(\"secHasFileAccess\", \"SecurityPlugin\");\n\tif (sHFAfn == 0) {\n\t\treturn 0;\n\t}\n\thasFileAccess =  ((int (*) (void)) sHFAfn)();\n\tsHSAfn = interpreterProxy->ioLoadFunctionFrom(\"secHasSocketAccess\", \"SecurityPlugin\");\n\tif (sHSAfn == 0) {\n\t\treturn 0;\n\t}\n\thasSocketAccess =  ((int (*) (void)) sHSAfn)();\n\tif ((canWriteImage && (hasFileAccess)) && (hasSocketAccess)) {\n\t\treturn 0;\n\t} else {\n\t\treturn 1;\n\t}\n}\n\n\n/*\tAn array of Smalltalk Semaphore indices, one for each signal type for which\n\ta handler has been set. If an entry is zero, then no handler is active. */\n\nstatic unsigned char * semaphoreIndices(void) {\n\treturn semaIndices;\n}\n\n\n/*\tkill(pid, sig) */\n\nstatic sqInt sendSignaltoPid(sqInt sig, sqInt pid) {\n\treturn kill(pid, sig);\n}\n\n\n/*\tExit function to be registered with atexit() to signal child processes on VM exit. */\n\nstatic void sendSignalToPids(void) {\n    sqInt count;\n    pid_t pid;\n    sqInt sig;\n\n\tcount = 0;\n\twhile (count < pidCount) {\n\t\tpid = pidArray[count];\n\t\t/* begin sendSignal:toPid: */\n\t\tsig = sigNumToSend;\n\t\tkill(pid, sig);\n\t\tcount += 1;\n\t}\n}\n\n\n/*\tAnswer a session ID represented by aByteArray. The session ID is used in\n\tthe SQFile structure. If that data structure changes, we should see compiler\n\twarnings about type mismatch with SESSIONIDENTIFIERTYPE. */\n\nstatic SESSIONIDENTIFIERTYPE sessionIdentifierFrom(sqInt aByteArray) {\n    sqInt idx;\n    unsigned char *session;\n    union {SESSIONIDENTIFIERTYPE session; unsigned char bytes[sizeof(SESSIONIDENTIFIERTYPE)];} sessionUnion;\n\n\tif (!((interpreterProxy->isBytes(aByteArray)) && ((interpreterProxy->stSizeOf(aByteArray)) == (sizeOfSession())))) {\n\t\treturn null;\n\t}\n\tsession = interpreterProxy->arrayValueOf(aByteArray);\n\tidx = 0;\n\twhile (idx < (sizeOfSession())) {\n\t\tsessionUnion.bytes[idx] = session[idx];\n\t\tidx += 1;\n\t}\n\treturn sessionUnion.session;\n}\n\n\n/*\tAnswer the session identifier from a SQFile structure. For a valid file\n\treference, this identifier will match the session identifier supplied by\n\tthe interpreter. */\n\nstatic SESSIONIDENTIFIERTYPE sessionIdentifierFromSqFile(SQFile *sqFile) {\n\treturn sqFile->sessionID;\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter) {\n    sqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\nstatic void setSigChldDefaultHandler(void) {\n\tsetSignalNumberhandler(sigChldNumber(), sigDefaultNumber());\n}\n\n\n/*\tSet the SIGCHLD signal handler in the virtual machine. */\n\nstatic void setSigChldHandler(void) {\n\tif ((signal(SIGCHLD, reapChildProcess)) == (sigErrorNumber())) {\n\t\tperror(\"signal\");\n\t}\n}\n\nstatic void setSigIntDefaultHandler(void) {\n\tsetSignalNumberhandler(sigIntNumber(), sigDefaultNumber());\n}\n\n\n/*\tSet the SIGINT signal handler in the virtual machine to ignore interrupts. */\n\nstatic void setSigIntIgnore(void) {\n\tsetSignalNumberhandler(sigIntNumber(), sigIgnoreNumber());\n}\n\nstatic void setSigPipeDefaultHandler(void) {\n\tsetSignalNumberhandler(sigPipeNumber(), sigDefaultNumber());\n}\n\n\n/*\tSet the SIGPIPE signal handler in the virtual machine to ignore pipe error signals.\n\tIf a pipe is opened to a child process, and the child exits, then subsequent writes to\n\tthe pipe generate a SIGPIPE signal. If this signal is not handled, the VM will exit\n\twithout warning. */\n\nstatic sqInt setSigPipeHandler(void) {\n\t/* begin setSigPipeIgnore */\n\tsetSignalNumberhandler(sigPipeNumber(), sigIgnoreNumber());\n}\n\n\n/*\tSet the SIGPIPE signal handler in the virtual machine to ignore pipe error signals. */\n\nstatic void setSigPipeIgnore(void) {\n\tsetSignalNumberhandler(sigPipeNumber(), sigIgnoreNumber());\n}\n\n\n/*\tSet a signal handler. The C code translator will convert #sig:nal: into 'signal(parm1, parm2)' */\n\nstatic void * setSignalNumberhandler(sqInt anInteger, void *signalHandlerAddress) {\n\treturn signal(anInteger, signalHandlerAddress);\n}\n\nEXPORT(sqInt) shutdownModule(void) {\n    sqInt sigNum;\n\n\t/* begin restoreDefaultSignalHandlers */\n\tsigNum = 1;\n\twhile (sigNum <= (signalArraySize())) {\n\t\tif ((semaIndices[sigNum]) > 0) {\n\t\t\tsetSignalNumberhandler(sigNum, originalSigHandlers[sigNum]);\n\t\t}\n\t\tsigNum += 1;\n\t}\n}\n\n\n/*\tAbort signal from abort(3) */\n\nstatic sqInt sigAbrtNumber(void) {\n\treturn SIGABRT;\n}\n\n\n/*\tTimer signal from alarm(2) */\n\nstatic sqInt sigAlrmNumber(void) {\n\treturn SIGALRM;\n}\n\n\n/*\tChild status has changed (POSIX). */\n\nstatic sqInt sigChldNumber(void) {\n\treturn SIGCHLD;\n}\n\n\n/*\tContinue if stopped */\n\nstatic sqInt sigContNumber(void) {\n\treturn SIGCONT;\n}\n\n\n/*\tDefault action for a signal */\n\nstatic void * sigDefaultNumber(void) {\n\treturn SIG_DFL;\n}\n\n\n/*\tError return from signal() */\n\nstatic void * sigErrorNumber(void) {\n\treturn SIG_ERR;\n}\n\n\n/*\tHangup detected on controlling terminal or death of controlling process */\n\nstatic sqInt sigHupNumber(void) {\n\treturn SIGHUP;\n}\n\n\n/*\tIgnore action for a signal */\n\nstatic void * sigIgnoreNumber(void) {\n\treturn SIG_IGN;\n}\n\n\n/*\tInterrupt (ANSI). */\n\nstatic sqInt sigIntNumber(void) {\n\treturn SIGINT;\n}\n\n\n/*\tKill signal */\n\nstatic sqInt sigKillNumber(void) {\n\treturn SIGKILL;\n}\n\n\n/*\tBroken pipe (POSIX). */\n\nstatic sqInt sigPipeNumber(void) {\n\treturn SIGPIPE;\n}\n\n\n/*\tQuit from keyboard */\n\nstatic sqInt sigQuitNumber(void) {\n\treturn SIGQUIT;\n}\n\n\n/*\tStop process */\n\nstatic sqInt sigStopNumber(void) {\n\treturn SIGSTOP;\n}\n\n\n/*\tTermination signal. This is the default signal sent by the unix kill(1) command. */\n\nstatic sqInt sigTermNumber(void) {\n\treturn SIGTERM;\n}\n\n\n/*\tUser defined signal number 1. This is value is platform-dependent, so the\n\tinSmalltalk default of 10 may be wrong on some platforms. */\n\nstatic sqInt sigUsr1Number(void) {\n\treturn SIGUSR1;\n}\n\n\n/*\tUser defined signal number 2. This is value is platform-dependent, so the\n\tinSmalltalk default of 12 may be wrong on some platforms. */\n\nstatic sqInt sigUsr2Number(void) {\n\treturn SIGUSR2;\n}\n\n\n/*\tNumber of possible signals for this OS plus one. The signal handler arrays\n\tdeclared in #declareCVarsIn: are this size. */\n\nstatic sqInt signalArraySize(void) {\n\treturn NSIG;\n}\n\n\n/*\tAn array of signal handler function addresses, with each entry corresponding\n\tto a signal type. */\n\nstatic void ** signalHandlers(void) {\n\treturn sigHandlers;\n}\n\n\n/*\tSize in bytes of an integer, for this C compiler on this machine. */\n\nstatic sqInt sizeOfInt(void) {\n\treturn sizeof(int);\n}\n\n\n/*\tSize in bytes of a void pointer, for this C compiler on this machine. */\n\nstatic sqInt sizeOfPointer(void) {\n\treturn sizeof(void *);\n}\n\n\n/*\tSize of a SESSIONIDENTIFIERTYPE. Should match usage in the SQFile data structure,\n\totherwise we should get compiler warnings. */\n\nstatic sqInt sizeOfSession(void) {\n\treturn sizeof(SESSIONIDENTIFIERTYPE);\n}\n\n\n/*\tAnswer the OS file descriptor, an integer value, from a SQSocket data structure,\n\tor answer -1 if unable to obtain the file descriptor (probably due to receiving\n\tan incorrect type of object as aFileHandle).\n\n\tWarning: The first element of privateSocketStruct happens to be the Unix file\n\tnumber of the socket. See sqUnixSocket.c for the definition. This method takes\n\tadvantage of this, and will break if anyone ever redefines the data structure. */\n\nstatic int socketDescriptorFrom(sqInt sqSocketOop) {\n    void *privateSocketStruct;\n    SQSocket *sqSocket;\n\n\tsqSocket = interpreterProxy->arrayValueOf(sqSocketOop);\n\tprivateSocketStruct = sqSocket->privateSocketPtr;\n\tif (privateSocketStruct == 0) {\n\t\treturn -1;\n\t}\n\treturn * (int *) privateSocketStruct;\n}\n\n\n/*\tAnswer the size of a SQSocket data structure in bytes. */\n\nstatic sqInt socketRecordSize(void) {\n\treturn sizeof(SQSocket);\n}\n\n\n/*\tReturn a pointer to the first byte of of the SQsocket data structure socket record within\n\tanSQSocketRecord, which is expected to be a ByteArray of size self>>socketRecordSize. */\n\nstatic SQSocket * socketValueOf(sqInt anSQSocketRecord) {\n\treturn interpreterProxy->arrayValueOf(anSQSocketRecord);\n}\n\n\n/*\tAnswer a new String copied from a null-terminated C string.\n\tCaution: This may invoke the garbage collector. */\n\nstatic sqInt stringFromCString(const char *aCString) {\n    sqInt len;\n    sqInt newString;\n\n\tlen = strlen(aCString);\n\tnewString = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), len);\n\tstrncpy(interpreterProxy->arrayValueOf(newString), aCString, len);\n\treturn newString;\n}\n\n\n/*\tAnswer a new null-terminated C string copied from aString.\n\tThe string is allocated in object memory, and will be moved\n\twithout warning by the garbage collector. Any C pointer\n\treference the the result is valid only until the garbage\n\tcollector next runs. Therefore, this method should only be used\n\twithin a single primitive in a section of code in which the\n\tgarbage collector is guaranteed not to run. Note also that\n\tthis method may itself invoke the garbage collector prior\n\tto allocating the new C string.\n\n\tWarning: The result of this method will be invalidated by the\n\tnext garbage collection, including a GC triggered by creation\n\tof a new object within a primitive. Do not call this method\n\ttwice to obtain two string pointers. */\n\nstatic char * transientCStringFromString(sqInt aString) {\n    char *cString;\n    sqInt len;\n    sqInt newString;\n    char *stringPtr;\n\n\n\t/* Allocate space for a null terminated C string. */\n\n\tlen = interpreterProxy->sizeOfSTArrayFromCPrimitive(interpreterProxy->arrayValueOf(aString));\n\tinterpreterProxy->pushRemappableOop(aString);\n\tnewString = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), len + 1);\n\tstringPtr = interpreterProxy->arrayValueOf(interpreterProxy->popRemappableOop());\n\n\t/* Point to the actual C string. */\n\n\tcString = interpreterProxy->arrayValueOf(newString);\n\t(char *)strncpy(cString, stringPtr, len);\n\tcString[len] = 0;\n\treturn cString;\n}\n\n\n/*\tAnswer the integer Unix file number corresponding to a file handle (FILE* ). */\n\nstatic int unixFileNumber(FILEHANDLETYPE fileHandle) {\n\treturn fileno(fileHandle);\n}\n\n\n/*\tAnswer a string containing the version string for this plugin. Handle MNU\n\terrors, which can occur if class InterpreterPlugin has been removed from\n\tthe system.\n\n\tImportant: When this method is changed, the class side method must also be\n\tchanged to match. */\n/*\t4.0 supports 64bit code base */\n\nstatic char * versionString(void) {\n    static char version[]= \"4.3.3\";\n\n\treturn version;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\n\nvoid* UnixOSProcessPlugin_exports[][3] = {\n\t{\"UnixOSProcessPlugin\", \"primitiveSQFileSetBlocking\", (void*)primitiveSQFileSetBlocking},\n\t{\"UnixOSProcessPlugin\", \"moduleUnloaded\", (void*)moduleUnloaded},\n\t{\"UnixOSProcessPlugin\", \"primitiveSigTermNumber\", (void*)primitiveSigTermNumber},\n\t{\"UnixOSProcessPlugin\", \"primitiveSigQuitNumber\", (void*)primitiveSigQuitNumber},\n\t{\"UnixOSProcessPlugin\", \"primitiveSigHupNumber\", (void*)primitiveSigHupNumber},\n\t{\"UnixOSProcessPlugin\", \"primitiveSendSigquitTo\", (void*)primitiveSendSigquitTo},\n\t{\"UnixOSProcessPlugin\", \"forkSqueak\", (void*)forkSqueak},\n\t{\"UnixOSProcessPlugin\", \"primitiveFileStat\", (void*)primitiveFileStat},\n\t{\"UnixOSProcessPlugin\", \"primitiveFileProtectionMask\", (void*)primitiveFileProtectionMask},\n\t{\"UnixOSProcessPlugin\", \"primitiveSQFileFlush\", (void*)primitiveSQFileFlush},\n\t{\"UnixOSProcessPlugin\", \"primitiveForkSqueak\", (void*)primitiveForkSqueak},\n\t{\"UnixOSProcessPlugin\", \"primitiveGetPid\", (void*)primitiveGetPid},\n\t{\"UnixOSProcessPlugin\", \"shutdownModule\", (void*)shutdownModule},\n\t{\"UnixOSProcessPlugin\", \"primitiveVersionString\", (void*)primitiveVersionString},\n\t{\"UnixOSProcessPlugin\", \"primitiveGetCurrentWorkingDirectory\", (void*)primitiveGetCurrentWorkingDirectory},\n\t{\"UnixOSProcessPlugin\", \"primitiveForkExec\", (void*)primitiveForkExec},\n\t{\"UnixOSProcessPlugin\", \"primitiveTestEndOfFileFlag\", (void*)primitiveTestEndOfFileFlag},\n\t{\"UnixOSProcessPlugin\", \"primitiveGetPGrp\", (void*)primitiveGetPGrp},\n\t{\"UnixOSProcessPlugin\", \"primitiveGetStdOutHandleWithSessionIdentifier\", (void*)primitiveGetStdOutHandleWithSessionIdentifier},\n\t{\"UnixOSProcessPlugin\", \"primitiveGetStdInHandleWithSessionIdentifier\", (void*)primitiveGetStdInHandleWithSessionIdentifier},\n\t{\"UnixOSProcessPlugin\", \"primitiveSigUsr1Number\", (void*)primitiveSigUsr1Number},\n\t{\"UnixOSProcessPlugin\", \"primitiveGetGid\", (void*)primitiveGetGid},\n\t{\"UnixOSProcessPlugin\", \"primitiveForkSqueakWithoutSigHandler\", (void*)primitiveForkSqueakWithoutSigHandler},\n\t{\"UnixOSProcessPlugin\", \"primitiveSendSigabrtTo\", (void*)primitiveSendSigabrtTo},\n\t{\"UnixOSProcessPlugin\", \"primitivePutEnv\", (void*)primitivePutEnv},\n\t{\"UnixOSProcessPlugin\", \"primitiveGetEGid\", (void*)primitiveGetEGid},\n\t{\"UnixOSProcessPlugin\", \"primitiveSigIntNumber\", (void*)primitiveSigIntNumber},\n\t{\"UnixOSProcessPlugin\", \"primitiveSigKillNumber\", (void*)primitiveSigKillNumber},\n\t{\"UnixOSProcessPlugin\", \"primitiveTestLockableFileRegion\", (void*)primitiveTestLockableFileRegion},\n\t{\"UnixOSProcessPlugin\", \"primitiveSetPGid\", (void*)primitiveSetPGid},\n\t{\"UnixOSProcessPlugin\", \"primitiveSetSemaIndex\", (void*)primitiveSetSemaIndex},\n\t{\"UnixOSProcessPlugin\", \"primitiveLockFileRegion\", (void*)primitiveLockFileRegion},\n\t{\"UnixOSProcessPlugin\", \"primitiveSendSigusr1To\", (void*)primitiveSendSigusr1To},\n\t{\"UnixOSProcessPlugin\", \"primitiveAioHandle\", (void*)primitiveAioHandle},\n\t{\"UnixOSProcessPlugin\", \"primitiveGetThreadID\", (void*)primitiveGetThreadID},\n\t{\"UnixOSProcessPlugin\", \"primitiveSendSigalrmTo\", (void*)primitiveSendSigalrmTo},\n\t{\"UnixOSProcessPlugin\", \"primitiveMakePipe\", (void*)primitiveMakePipe},\n\t{\"UnixOSProcessPlugin\", \"primitiveGetSession\", (void*)primitiveGetSession},\n\t{\"UnixOSProcessPlugin\", \"primitiveForkAndExecInDirectory\", (void*)primitiveForkAndExecInDirectory},\n\t{\"UnixOSProcessPlugin\", \"primitiveGetUid\", (void*)primitiveGetUid},\n\t{\"UnixOSProcessPlugin\", \"primitiveSigPipeNumber\", (void*)primitiveSigPipeNumber},\n\t{\"UnixOSProcessPlugin\", \"primitiveSizeOfInt\", (void*)primitiveSizeOfInt},\n\t{\"UnixOSProcessPlugin\", \"primitiveChdir\", (void*)primitiveChdir},\n\t{\"UnixOSProcessPlugin\", \"primitiveSendSighupTo\", (void*)primitiveSendSighupTo},\n\t{\"UnixOSProcessPlugin\", \"primitiveSendSigchldTo\", (void*)primitiveSendSigchldTo},\n\t{\"UnixOSProcessPlugin\", \"primitiveForwardSignalToSemaphore\", (void*)primitiveForwardSignalToSemaphore},\n\t{\"UnixOSProcessPlugin\", \"primitiveSQFileSetNonBlocking\", (void*)primitiveSQFileSetNonBlocking},\n\t{\"UnixOSProcessPlugin\", \"primitiveSetSid\", (void*)primitiveSetSid},\n\t{\"UnixOSProcessPlugin\", \"primitiveRealpath\", (void*)primitiveRealpath},\n\t{\"UnixOSProcessPlugin\", \"primitiveSendSigpipeTo\", (void*)primitiveSendSigpipeTo},\n\t{\"UnixOSProcessPlugin\", \"primitiveGetStdOutHandle\", (void*)primitiveGetStdOutHandle},\n\t{\"UnixOSProcessPlugin\", \"primitiveSendSigintTo\", (void*)primitiveSendSigintTo},\n\t{\"UnixOSProcessPlugin\", \"primitiveAioSuspend\", (void*)primitiveAioSuspend},\n\t{\"UnixOSProcessPlugin\", \"primitiveSendSigtermTo\", (void*)primitiveSendSigtermTo},\n\t{\"UnixOSProcessPlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{\"UnixOSProcessPlugin\", \"primitiveSQFileSetBlockingWithSessionIdentifier\", (void*)primitiveSQFileSetBlockingWithSessionIdentifier},\n\t{\"UnixOSProcessPlugin\", \"primitiveGetPPid\", (void*)primitiveGetPPid},\n\t{\"UnixOSProcessPlugin\", \"initialiseModule\", (void*)initialiseModule},\n\t{\"UnixOSProcessPlugin\", \"primitiveSigUsr2Number\", (void*)primitiveSigUsr2Number},\n\t{\"UnixOSProcessPlugin\", \"primitiveSendSigusr2To\", (void*)primitiveSendSigusr2To},\n\t{\"UnixOSProcessPlugin\", \"primitiveSendSigkillTo\", (void*)primitiveSendSigkillTo},\n\t{\"UnixOSProcessPlugin\", \"primitiveSemaIndexFor\", (void*)primitiveSemaIndexFor},\n\t{\"UnixOSProcessPlugin\", \"primitiveReapChildProcess\", (void*)primitiveReapChildProcess},\n\t{\"UnixOSProcessPlugin\", \"primitiveErrorMessageAt\", (void*)primitiveErrorMessageAt},\n\t{\"UnixOSProcessPlugin\", \"primitiveArgumentAt\", (void*)primitiveArgumentAt},\n\t{\"UnixOSProcessPlugin\", \"primitiveGetPGid\", (void*)primitiveGetPGid},\n\t{\"UnixOSProcessPlugin\", \"primitiveGetStdErrHandle\", (void*)primitiveGetStdErrHandle},\n\t{\"UnixOSProcessPlugin\", \"primitiveUnixFileClose\", (void*)primitiveUnixFileClose},\n\t{\"UnixOSProcessPlugin\", \"primitiveSQFileSetNonBlockingWithSessionIdentifier\", (void*)primitiveSQFileSetNonBlockingWithSessionIdentifier},\n\t{\"UnixOSProcessPlugin\", \"primitiveAioEnable\", (void*)primitiveAioEnable},\n\t{\"UnixOSProcessPlugin\", \"primitiveSQFileSetUnbuffered\", (void*)primitiveSQFileSetUnbuffered},\n\t{\"UnixOSProcessPlugin\", \"primitiveUnixFileNumber\", (void*)primitiveUnixFileNumber},\n\t{\"UnixOSProcessPlugin\", \"primitiveGetStdErrHandleWithSessionIdentifier\", (void*)primitiveGetStdErrHandleWithSessionIdentifier},\n\t{\"UnixOSProcessPlugin\", \"primitiveKillOnExit\", (void*)primitiveKillOnExit},\n\t{\"UnixOSProcessPlugin\", \"primitiveCanReceiveSignals\", (void*)primitiveCanReceiveSignals},\n\t{\"UnixOSProcessPlugin\", \"primitiveMakePipeWithSessionIdentifier\", (void*)primitiveMakePipeWithSessionIdentifier},\n\t{\"UnixOSProcessPlugin\", \"primitiveGetEUid\", (void*)primitiveGetEUid},\n\t{\"UnixOSProcessPlugin\", \"primitiveSQFileSetUnbufferedWithSessionIdentifier\", (void*)primitiveSQFileSetUnbufferedWithSessionIdentifier},\n\t{\"UnixOSProcessPlugin\", \"primitiveSizeOfPointer\", (void*)primitiveSizeOfPointer},\n\t{\"UnixOSProcessPlugin\", \"primitiveDupTo\", (void*)primitiveDupTo},\n\t{\"UnixOSProcessPlugin\", \"primitiveSigChldNumber\", (void*)primitiveSigChldNumber},\n\t{\"UnixOSProcessPlugin\", \"primitiveGetStdInHandle\", (void*)primitiveGetStdInHandle},\n\t{\"UnixOSProcessPlugin\", \"primitiveCreatePipe\", (void*)primitiveCreatePipe},\n\t{\"UnixOSProcessPlugin\", \"primitiveUnlockFileRegion\", (void*)primitiveUnlockFileRegion},\n\t{\"UnixOSProcessPlugin\", \"primitiveModuleName\", (void*)primitiveModuleName},\n\t{\"UnixOSProcessPlugin\", \"primitiveFixPointersInArrayOfStrings\", (void*)primitiveFixPointersInArrayOfStrings},\n\t{\"UnixOSProcessPlugin\", \"primitiveUnsetEnv\", (void*)primitiveUnsetEnv},\n\t{\"UnixOSProcessPlugin\", \"primitiveNice\", (void*)primitiveNice},\n\t{\"UnixOSProcessPlugin\", \"primitiveSendSigcontTo\", (void*)primitiveSendSigcontTo},\n\t{\"UnixOSProcessPlugin\", \"primitiveEnvironmentAt\", (void*)primitiveEnvironmentAt},\n\t{\"UnixOSProcessPlugin\", \"primitiveSendSigstopTo\", (void*)primitiveSendSigstopTo},\n\t{\"UnixOSProcessPlugin\", \"primitiveEnvironmentAtSymbol\", (void*)primitiveEnvironmentAtSymbol},\n\t{\"UnixOSProcessPlugin\", \"primitiveSetPGrp\", (void*)primitiveSetPGrp},\n\t{\"UnixOSProcessPlugin\", \"primitiveCreatePipeWithSessionIdentifier\", (void*)primitiveCreatePipeWithSessionIdentifier},\n\t{\"UnixOSProcessPlugin\", \"primitiveIsAtEndOfFile\", (void*)primitiveIsAtEndOfFile},\n\t{\"UnixOSProcessPlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"UnixOSProcessPlugin\", \"primitiveAioDisable\", (void*)primitiveAioDisable},\n\t{\"UnixOSProcessPlugin\", \"primitiveSQFileFlushWithSessionIdentifier\", (void*)primitiveSQFileFlushWithSessionIdentifier},\n\t{NULL, NULL, NULL}\n};\n\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n\n"
  },
  {
    "path": "vm/src/from_squeak/intplugins/ZipPlugin/ZipPlugin.c",
    "content": "/* Automatically generated by\n\tVMPluginCodeGenerator VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n   from\n\tDeflatePlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508\n */\nstatic char __buildInfo[] = \"DeflatePlugin VMMaker-oscog.dtl.57 uuid: c1d30608-04dd-53b7-209a-34f7a46c1508 \" __DATE__ ;\n\n\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n\n#include \"sqMemoryAccess.h\"\n\n\n/*** Constants ***/\n#define DeflateHashMask 0x7FFF\n#define DeflateHashShift 5\n#define DeflateHashTableSize 32768\n#define DeflateMaxDistance 0x8000\n#define DeflateMaxDistanceCodes 30\n#define DeflateMaxLiteralCodes 0x11E\n#define DeflateMaxMatch 258\n#define DeflateMinMatch 3\n#define DeflateWindowMask 0x7FFF\n#define DeflateWindowSize 32768\n#define MaxBits 16\n#define StateNoMoreData 1\n\n\n/*** Function Prototypes ***/\nstatic sqInt comparewithmin(sqInt here, sqInt matchPos, sqInt minLength);\nstatic sqInt deflateBlockchainLengthgoodMatch(sqInt lastIndex, sqInt chainLength, sqInt goodMatch);\nstatic sqInt encodeLiteral(sqInt lit);\nstatic sqInt encodeMatchdistance(sqInt length, sqInt dist);\nstatic sqInt findMatchlastLengthlastMatchchainLengthgoodMatch(sqInt here, sqInt lastLength, sqInt lastMatch, sqInt maxChainLength, sqInt goodMatch);\nstatic VirtualMachine * getInterpreter(void);\nEXPORT(const char*) getModuleName(void);\nstatic sqInt halt(void);\nstatic sqInt insertStringAt(sqInt here);\nstatic sqInt loadDeflateStreamFrom(sqInt rcvr);\nstatic sqInt loadZipEncoderFrom(sqInt rcvr);\nstatic sqInt msg(char *s);\nstatic sqInt nextZipBitsput(sqInt nBits, sqInt value);\nEXPORT(sqInt) primitiveDeflateBlock(void);\nEXPORT(sqInt) primitiveDeflateUpdateHashTable(void);\nEXPORT(sqInt) primitiveInflateDecompressBlock(void);\nEXPORT(sqInt) primitiveUpdateAdler32(void);\nEXPORT(sqInt) primitiveUpdateGZipCrc32(void);\nEXPORT(sqInt) primitiveZipSendBlock(void);\nstatic sqInt sendBlockwithwithwith(sqInt literalStream, sqInt distanceStream, sqInt litTree, sqInt distTree);\nEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\nstatic sqInt shouldFlush(void);\nstatic sqInt updateHashAt(sqInt here);\nstatic sqInt updateHash(sqInt nextValue);\nstatic sqInt zipDecodeValueFromsize(unsigned int *table, sqInt tableSize);\nstatic sqInt zipDecompressBlock(void);\nstatic sqInt zipNextBits(sqInt n);\n\n\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"ZipPlugin VMMaker-oscog.dtl.57 (i)\"\n#else\n\t\"ZipPlugin VMMaker-oscog.dtl.57 (e)\"\n#endif\n;\nstatic unsigned int zipBaseDistance[] = {\n0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, \n256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576};\nstatic unsigned int zipBaseLength[] = {\n0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, \n32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0};\nstatic sqInt zipBitBuf;\nstatic sqInt zipBitPos;\nstatic sqInt zipBlockPos;\nstatic sqInt zipBlockStart;\nstatic unsigned char* zipCollection;\nstatic sqInt zipCollectionSize;\nstatic unsigned int zipCrcTable[] = {\n0, 1996959894, 3993919788U, 2567524794U, 124634137, 1886057615, 3915621685U, 2657392035U, 249268274, 2044508324, 3772115230U, 2547177864U, 162941995, 2125561021, 3887607047U, 2428444049U, \n498536548, 1789927666, 4089016648U, 2227061214U, 450548861, 1843258603, 4107580753U, 2211677639U, 325883990, 1684777152, 4251122042U, 2321926636U, 335633487, 1661365465, 4195302755U, 2366115317U, \n997073096, 1281953886, 3579855332U, 2724688242U, 1006888145, 1258607687, 3524101629U, 2768942443U, 901097722, 1119000684, 3686517206U, 2898065728U, 853044451, 1172266101, 3705015759U, 2882616665U, \n651767980, 1373503546, 3369554304U, 3218104598U, 565507253, 1454621731, 3485111705U, 3099436303U, 671266974, 1594198024, 3322730930U, 2970347812U, 795835527, 1483230225, 3244367275U, 3060149565U, \n1994146192, 31158534, 2563907772U, 4023717930U, 1907459465, 112637215, 2680153253U, 3904427059U, 2013776290, 251722036, 2517215374U, 3775830040U, 2137656763, 141376813, 2439277719U, 3865271297U, \n1802195444, 476864866, 2238001368U, 4066508878U, 1812370925, 453092731, 2181625025U, 4111451223U, 1706088902, 314042704, 2344532202U, 4240017532U, 1658658271, 366619977, 2362670323U, 4224994405U, \n1303535960, 984961486, 2747007092U, 3569037538U, 1256170817, 1037604311, 2765210733U, 3554079995U, 1131014506, 879679996, 2909243462U, 3663771856U, 1141124467, 855842277, 2852801631U, 3708648649U, \n1342533948, 654459306, 3188396048U, 3373015174U, 1466479909, 544179635, 3110523913U, 3462522015U, 1591671054, 702138776, 2966460450U, 3352799412U, 1504918807, 783551873, 3082640443U, 3233442989U, \n3988292384U, 2596254646U, 62317068, 1957810842, 3939845945U, 2647816111U, 81470997, 1943803523, 3814918930U, 2489596804U, 225274430, 2053790376, 3826175755U, 2466906013U, 167816743, 2097651377, \n4027552580U, 2265490386U, 503444072, 1762050814, 4150417245U, 2154129355U, 426522225, 1852507879, 4275313526U, 2312317920U, 282753626, 1742555852, 4189708143U, 2394877945U, 397917763, 1622183637, \n3604390888U, 2714866558U, 953729732, 1340076626, 3518719985U, 2797360999U, 1068828381, 1219638859, 3624741850U, 2936675148U, 906185462, 1090812512, 3747672003U, 2825379669U, 829329135, 1181335161, \n3412177804U, 3160834842U, 628085408, 1382605366, 3423369109U, 3138078467U, 570562233, 1426400815, 3317316542U, 2998733608U, 733239954, 1555261956, 3268935591U, 3050360625U, 752459403, 1541320221, \n2607071920U, 3965973030U, 1969922972, 40735498, 2617837225U, 3943577151U, 1913087877, 83908371, 2512341634U, 3803740692U, 2075208622, 213261112, 2463272603U, 3855990285U, 2094854071, 198958881, \n2262029012U, 4057260610U, 1759359992, 534414190, 2176718541U, 4139329115U, 1873836001, 414664567, 2282248934U, 4279200368U, 1711684554, 285281116, 2405801727U, 4167216745U, 1634467795, 376229701, \n2685067896U, 3608007406U, 1308918612, 956543938, 2808555105U, 3495958263U, 1231636301, 1047427035, 2932959818U, 3654703836U, 1088359270, 936918000, 2847714899U, 3736837829U, 1202900863, 817233897, \n3183342108U, 3401237130U, 1404277552, 615818150, 3134207493U, 3453421203U, 1423857449, 601450431, 3009837614U, 3294710456U, 1567103746, 711928724, 3020668471U, 3272380065U, 1510334235, 755167117};\nstatic unsigned int zipDistanceCodes[] = {\n0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, \n8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, \n10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, \n11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, \n12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, \n12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, \n13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, \n13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, \n14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, \n14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, \n14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, \n14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, \n15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, \n15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, \n15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, \n15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, \n0, 0, 16, 17, 18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, \n22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, \n24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, \n25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, \n26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, \n26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, \n27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, \n27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, \n28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, \n28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, \n28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, \n28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, \n29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, \n29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, \n29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, \n29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29};\nstatic unsigned int* zipDistanceFreq;\nstatic unsigned int* zipDistances;\nstatic unsigned int* zipDistTable;\nstatic sqInt zipDistTableSize;\nstatic unsigned int zipExtraDistanceBits[] = {\n0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, \n7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13};\nstatic unsigned int zipExtraLengthBits[] = {\n0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, \n3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0};\nstatic unsigned int* zipHashHead;\nstatic unsigned int* zipHashTail;\nstatic sqInt zipHashValue;\nstatic sqInt zipLiteralCount;\nstatic unsigned int* zipLiteralFreq;\nstatic sqInt zipLiteralSize;\nstatic unsigned char* zipLiterals;\nstatic unsigned int* zipLitTable;\nstatic sqInt zipLitTableSize;\nstatic sqInt zipMatchCount;\nstatic unsigned int zipMatchLengthCodes[] = {\n257, 258, 259, 260, 261, 262, 263, 264, 265, 265, 266, 266, 267, 267, 268, 268, \n269, 269, 269, 269, 270, 270, 270, 270, 271, 271, 271, 271, 272, 272, 272, 272, \n273, 273, 273, 273, 273, 273, 273, 273, 274, 274, 274, 274, 274, 274, 274, 274, \n275, 275, 275, 275, 275, 275, 275, 275, 276, 276, 276, 276, 276, 276, 276, 276, \n277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, \n278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, \n279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, \n280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, \n281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, \n281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, \n282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, \n282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, \n283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, \n283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, \n284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, \n284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284};\nstatic sqInt zipPosition;\nstatic sqInt zipReadLimit;\nstatic unsigned char* zipSource;\nstatic sqInt zipSourceLimit;\nstatic sqInt zipSourcePos;\nstatic sqInt zipState;\n\n\n\n/*\tCompare the two strings and return the length of matching characters.\n\tminLength is a lower bound for match lengths that will be accepted.\n\tNote: here and matchPos are zero based. */\n\nstatic sqInt\ncomparewithmin(sqInt here, sqInt matchPos, sqInt minLength)\n{\n    sqInt length;\n\n\tif (!((zipCollection[here + minLength]) == (zipCollection[matchPos + minLength]))) {\n\t\treturn 0;\n\t}\n\tif (!((zipCollection[(here + minLength) - 1]) == (zipCollection[(matchPos + minLength) - 1]))) {\n\t\treturn 0;\n\t}\n\tif (!((zipCollection[here]) == (zipCollection[matchPos]))) {\n\t\treturn 0;\n\t}\n\tif (!((zipCollection[here + 1]) == (zipCollection[matchPos + 1]))) {\n\t\treturn 1;\n\t}\n\tlength = 2;\n\twhile ((length < DeflateMaxMatch)\n && ((zipCollection[here + length]) == (zipCollection[matchPos + length]))) {\n\t\tlength += 1;\n\t}\n\treturn length;\n}\n\n\n/*\tContinue deflating the receiver's collection from blockPosition to\n\tlastIndex. Note that lastIndex must be at least MaxMatch away from the end\n\tof collection\n */\n\nstatic sqInt\ndeflateBlockchainLengthgoodMatch(sqInt lastIndex, sqInt chainLength, sqInt goodMatch)\n{\n    sqInt distance;\n    sqInt flushNeeded;\n    sqInt hasMatch;\n    sqInt here;\n    sqInt here1;\n    sqInt hereLength;\n    sqInt hereMatch;\n    sqInt i;\n    sqInt literal;\n    sqInt matchResult;\n    sqInt newLength;\n    sqInt newMatch;\n    sqInt prevEntry;\n    sqInt prevEntry1;\n    sqInt prevEntry2;\n\n\tif (zipBlockPos > lastIndex) {\n\t\treturn 0;\n\t}\n\tif (zipLiteralCount >= zipLiteralSize) {\n\t\treturn 1;\n\t}\n\thasMatch = 0;\n\there = zipBlockPos;\n\twhile (here <= lastIndex) {\n\t\tif (!(hasMatch)) {\n\n\t\t\t/* Find the first match */\n\n\t\t\tmatchResult = findMatchlastLengthlastMatchchainLengthgoodMatch(here, DeflateMinMatch - 1, here, chainLength, goodMatch);\n\t\t\t/* begin insertStringAt: */\n\t\t\tzipHashValue = ((((usqInt) zipHashValue << 5)) ^ (zipCollection[(here + DeflateMinMatch) - 1])) & DeflateHashMask;\n\t\t\tprevEntry = zipHashHead[zipHashValue];\n\t\t\tzipHashHead[zipHashValue] = here;\n\t\t\tzipHashTail[here & DeflateWindowMask] = prevEntry;\n\t\t\thereMatch = matchResult & 65535;\n\t\t\thereLength = ((usqInt) matchResult >> 16);\n\t\t}\n\t\tmatchResult = findMatchlastLengthlastMatchchainLengthgoodMatch(here + 1, hereLength, hereMatch, chainLength, goodMatch);\n\t\tnewMatch = matchResult & 65535;\n\n\t\t/* Now check if the next match is better than the current one.\n\t\tIf not, output the current match (provided that the current match\n\t\tis at least MinMatch long) */\n\n\t\tnewLength = ((usqInt) matchResult >> 16);\n\t\tif ((hereLength >= newLength)\n\t\t && (hereLength >= DeflateMinMatch)) {\n\t\t\t/* begin encodeMatch:distance: */\n\t\t\tzipLiterals[zipLiteralCount] = (hereLength - DeflateMinMatch);\n\t\t\tzipDistances[zipLiteralCount] = (here - hereMatch);\n\t\t\tliteral = zipMatchLengthCodes[hereLength - DeflateMinMatch];\n\t\t\tzipLiteralFreq[literal] = ((zipLiteralFreq[literal]) + 1);\n\t\t\tif ((here - hereMatch) < 257) {\n\t\t\t\tdistance = zipDistanceCodes[(here - hereMatch) - 1];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdistance = zipDistanceCodes[256 + (((usqInt) ((here - hereMatch) - 1) >> 7))];\n\t\t\t}\n\t\t\tzipDistanceFreq[distance] = ((zipDistanceFreq[distance]) + 1);\n\t\t\tzipLiteralCount += 1;\n\t\t\tzipMatchCount += 1;\n\t\t\tflushNeeded = (zipLiteralCount == zipLiteralSize)\n\t\t\t || (((zipLiteralCount & 4095) == 0)\n && (shouldFlush()));\n\t\t\tfor (i = 1; i <= (hereLength - 1); i += 1) {\n\t\t\t\t/* begin insertStringAt: */\n\t\t\t\there1 = here += 1;\n\t\t\t\tzipHashValue = ((((usqInt) zipHashValue << 5)) ^ (zipCollection[(here1 + DeflateMinMatch) - 1])) & DeflateHashMask;\n\t\t\t\tprevEntry1 = zipHashHead[zipHashValue];\n\t\t\t\tzipHashHead[zipHashValue] = here1;\n\t\t\t\tzipHashTail[here1 & DeflateWindowMask] = prevEntry1;\n\t\t\t}\n\t\t\thasMatch = 0;\n\t\t\there += 1;\n\t\t}\n\t\telse {\n\t\t\t/* begin encodeLiteral: */\n\t\t\tzipLiterals[zipLiteralCount] = (zipCollection[here]);\n\t\t\tzipDistances[zipLiteralCount] = 0;\n\t\t\tzipLiteralFreq[zipCollection[here]] = ((zipLiteralFreq[zipCollection[here]]) + 1);\n\t\t\tzipLiteralCount += 1;\n\t\t\tflushNeeded = (zipLiteralCount == zipLiteralSize)\n\t\t\t || (((zipLiteralCount & 4095) == 0)\n && (shouldFlush()));\n\t\t\there += 1;\n\t\t\tif ((here <= lastIndex)\n\t\t\t && (!flushNeeded)) {\n\t\t\t\t/* begin insertStringAt: */\n\t\t\t\tzipHashValue = ((((usqInt) zipHashValue << 5)) ^ (zipCollection[(here + DeflateMinMatch) - 1])) & DeflateHashMask;\n\t\t\t\tprevEntry2 = zipHashHead[zipHashValue];\n\t\t\t\tzipHashHead[zipHashValue] = here;\n\t\t\t\tzipHashTail[here & DeflateWindowMask] = prevEntry2;\n\t\t\t\thasMatch = 1;\n\t\t\t\thereMatch = newMatch;\n\t\t\t\thereLength = newLength;\n\t\t\t}\n\t\t}\n\t\tif (flushNeeded) {\n\t\t\tzipBlockPos = here;\n\t\t\treturn 1;\n\t\t}\n\t}\n\tzipBlockPos = here;\n\treturn 0;\n}\n\n\n/*\tEncode the given literal */\n\nstatic sqInt\nencodeLiteral(sqInt lit)\n{\n\tzipLiterals[zipLiteralCount] = lit;\n\tzipDistances[zipLiteralCount] = 0;\n\tzipLiteralFreq[lit] = ((zipLiteralFreq[lit]) + 1);\n\tzipLiteralCount += 1;\n\treturn (zipLiteralCount == zipLiteralSize)\n\t || (((zipLiteralCount & 4095) == 0)\n && (shouldFlush()));\n}\n\n\n/*\tEncode the given match of length length starting at dist bytes ahead */\n\nstatic sqInt\nencodeMatchdistance(sqInt length, sqInt dist)\n{\n    sqInt distance;\n    sqInt literal;\n\n\tzipLiterals[zipLiteralCount] = (length - DeflateMinMatch);\n\tzipDistances[zipLiteralCount] = dist;\n\tliteral = zipMatchLengthCodes[length - DeflateMinMatch];\n\tzipLiteralFreq[literal] = ((zipLiteralFreq[literal]) + 1);\n\tif (dist < 257) {\n\t\tdistance = zipDistanceCodes[dist - 1];\n\t}\n\telse {\n\t\tdistance = zipDistanceCodes[256 + (((usqInt) (dist - 1) >> 7))];\n\t}\n\tzipDistanceFreq[distance] = ((zipDistanceFreq[distance]) + 1);\n\tzipLiteralCount += 1;\n\tzipMatchCount += 1;\n\treturn (zipLiteralCount == zipLiteralSize)\n\t || (((zipLiteralCount & 4095) == 0)\n && (shouldFlush()));\n}\n\n\n/*\tFind the longest match for the string starting at here.\n\tIf there is no match longer than lastLength return lastMatch/lastLength.\n\tTraverse at most maxChainLength entries in the hash table.\n\tStop if a match of at least goodMatch size has been found. */\n\nstatic sqInt\nfindMatchlastLengthlastMatchchainLengthgoodMatch(sqInt here, sqInt lastLength, sqInt lastMatch, sqInt maxChainLength, sqInt goodMatch)\n{\n    sqInt bestLength;\n    sqInt chainLength;\n    sqInt distance;\n    sqInt length;\n    sqInt length1;\n    sqInt limit;\n    sqInt matchPos;\n    sqInt matchResult;\n\n\n\t/* Compute the default match result */\n\t/* There is no way to find a better match than MaxMatch */\n\n\tmatchResult = (((usqInt) lastLength << 16)) | lastMatch;\n\tif (lastLength >= DeflateMaxMatch) {\n\t\treturn matchResult;\n\t}\n\n\t/* Compute the distance to the (possible) match */\n\n\tmatchPos = zipHashHead[((((usqInt) zipHashValue << 5)) ^ (zipCollection[(here + DeflateMinMatch) - 1])) & DeflateHashMask];\n\n\t/* Note: It is required that 0 < distance < MaxDistance */\n\n\tdistance = here - matchPos;\n\tif (!((distance > 0)\n\t\t && (distance < DeflateMaxDistance))) {\n\t\treturn matchResult;\n\t}\n\n\t/* Max. nr of match chain to search */\n\n\tchainLength = maxChainLength;\n\tif (here > DeflateMaxDistance) {\n\n\t\t/* Limit for matches that are too old */\n\n\t\tlimit = here - DeflateMaxDistance;\n\t}\n\telse {\n\t\tlimit = 0;\n\t}\n\tbestLength = lastLength;\n\twhile (1) {\n\t\t/* begin compare:with:min: */\n\t\tif (!((zipCollection[here + bestLength]) == (zipCollection[matchPos + bestLength]))) {\n\t\t\tlength = 0;\n\t\t\tgoto l1;\n\t\t}\n\t\tif (!((zipCollection[(here + bestLength) - 1]) == (zipCollection[(matchPos + bestLength) - 1]))) {\n\t\t\tlength = 0;\n\t\t\tgoto l1;\n\t\t}\n\t\tif (!((zipCollection[here]) == (zipCollection[matchPos]))) {\n\t\t\tlength = 0;\n\t\t\tgoto l1;\n\t\t}\n\t\tif (!((zipCollection[here + 1]) == (zipCollection[matchPos + 1]))) {\n\t\t\tlength = 1;\n\t\t\tgoto l1;\n\t\t}\n\t\tlength1 = 2;\n\t\twhile ((length1 < DeflateMaxMatch)\n && ((zipCollection[here + length1]) == (zipCollection[matchPos + length1]))) {\n\t\t\tlength1 += 1;\n\t\t}\n\t\tlength = length1;\n\tl1:\t/* end compare:with:min: */;\n\t\tif ((here + length) > zipPosition) {\n\t\t\tlength = zipPosition - here;\n\t\t}\n\t\tif ((length == DeflateMinMatch)\n\t\t && ((here - matchPos) > (((sqInt) DeflateMaxDistance >> 2)))) {\n\t\t\tlength = DeflateMinMatch - 1;\n\t\t}\n\t\tif (length > bestLength) {\n\n\t\t\t/* We have a new (better) match than before */\n\t\t\t/* Compute the new match result */\n\n\t\t\tmatchResult = (((usqInt) length << 16)) | matchPos;\n\n\t\t\t/* There is no way to find a better match than MaxMatch */\n\n\t\t\tbestLength = length;\n\t\t\tif (bestLength >= DeflateMaxMatch) {\n\t\t\t\treturn matchResult;\n\t\t\t}\n\t\t\tif (bestLength > goodMatch) {\n\t\t\t\treturn matchResult;\n\t\t\t}\n\t\t}\n\t\tif (!(((chainLength -= 1)) > 0)) {\n\t\t\treturn matchResult;\n\t\t}\n\t\tmatchPos = zipHashTail[matchPos & DeflateWindowMask];\n\t\tif (matchPos <= limit) {\n\t\t\treturn matchResult;\n\t\t}\n\t}\n}\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nstatic VirtualMachine *\ngetInterpreter(void)\n{\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*)\ngetModuleName(void)\n{\n\treturn moduleName;\n}\n\nstatic sqInt\nhalt(void)\n{\n\t;\n\treturn 0;\n}\n\n\n/*\tInsert the string at the given start position into the hash table.\n\tNote: The hash value is updated starting at MinMatch-1 since\n\tall strings before have already been inserted into the hash table\n\t(and the hash value is updated as well). */\n\nstatic sqInt\ninsertStringAt(sqInt here)\n{\n    sqInt prevEntry;\n\n\tzipHashValue = ((((usqInt) zipHashValue << 5)) ^ (zipCollection[(here + DeflateMinMatch) - 1])) & DeflateHashMask;\n\tprevEntry = zipHashHead[zipHashValue];\n\tzipHashHead[zipHashValue] = here;\n\tzipHashTail[here & DeflateWindowMask] = prevEntry;\n}\n\nstatic sqInt\nloadDeflateStreamFrom(sqInt rcvr)\n{\n    sqInt oop;\n\n\tif (!((interpreterProxy->isPointers(rcvr))\n\t\t && ((interpreterProxy->slotSizeOf(rcvr)) >= 15))) {\n\t\treturn 0;\n\t}\n\toop = interpreterProxy->fetchPointerofObject(0, rcvr);\n\tif ((oop & 1)) {\n\t\treturn 0;\n\t}\n\tif (!(interpreterProxy->isBytes(oop))) {\n\t\treturn 0;\n\t}\n\tzipCollection = interpreterProxy->firstIndexableField(oop);\n\tzipCollectionSize = interpreterProxy->byteSizeOf(oop);\n\tzipPosition = interpreterProxy->fetchIntegerofObject(1, rcvr);\n\n\t/* zipWriteLimit := interpreterProxy fetchInteger: 3 ofObject: rcvr. */\n\n\tzipReadLimit = interpreterProxy->fetchIntegerofObject(2, rcvr);\n\toop = interpreterProxy->fetchPointerofObject(4, rcvr);\n\tif (((oop & 1))\n\t || (!(interpreterProxy->isWords(oop)))) {\n\t\treturn 0;\n\t}\n\tif (!((interpreterProxy->slotSizeOf(oop)) == DeflateHashTableSize)) {\n\t\treturn 0;\n\t}\n\tzipHashHead = interpreterProxy->firstIndexableField(oop);\n\toop = interpreterProxy->fetchPointerofObject(5, rcvr);\n\tif (((oop & 1))\n\t || (!(interpreterProxy->isWords(oop)))) {\n\t\treturn 0;\n\t}\n\tif (!((interpreterProxy->slotSizeOf(oop)) == DeflateWindowSize)) {\n\t\treturn 0;\n\t}\n\tzipHashTail = interpreterProxy->firstIndexableField(oop);\n\tzipHashValue = interpreterProxy->fetchIntegerofObject(6, rcvr);\n\n\t/* zipBlockStart := interpreterProxy fetchInteger: 8 ofObject: rcvr. */\n\n\tzipBlockPos = interpreterProxy->fetchIntegerofObject(7, rcvr);\n\toop = interpreterProxy->fetchPointerofObject(9, rcvr);\n\tif (((oop & 1))\n\t || (!(interpreterProxy->isBytes(oop)))) {\n\t\treturn 0;\n\t}\n\tzipLiteralSize = interpreterProxy->slotSizeOf(oop);\n\tzipLiterals = interpreterProxy->firstIndexableField(oop);\n\toop = interpreterProxy->fetchPointerofObject(10, rcvr);\n\tif (((oop & 1))\n\t || (!(interpreterProxy->isWords(oop)))) {\n\t\treturn 0;\n\t}\n\tif ((interpreterProxy->slotSizeOf(oop)) < zipLiteralSize) {\n\t\treturn 0;\n\t}\n\tzipDistances = interpreterProxy->firstIndexableField(oop);\n\toop = interpreterProxy->fetchPointerofObject(11, rcvr);\n\tif (((oop & 1))\n\t || (!(interpreterProxy->isWords(oop)))) {\n\t\treturn 0;\n\t}\n\tif (!((interpreterProxy->slotSizeOf(oop)) == DeflateMaxLiteralCodes)) {\n\t\treturn 0;\n\t}\n\tzipLiteralFreq = interpreterProxy->firstIndexableField(oop);\n\toop = interpreterProxy->fetchPointerofObject(12, rcvr);\n\tif (((oop & 1))\n\t || (!(interpreterProxy->isWords(oop)))) {\n\t\treturn 0;\n\t}\n\tif (!((interpreterProxy->slotSizeOf(oop)) == DeflateMaxDistanceCodes)) {\n\t\treturn 0;\n\t}\n\tzipDistanceFreq = interpreterProxy->firstIndexableField(oop);\n\tzipLiteralCount = interpreterProxy->fetchIntegerofObject(13, rcvr);\n\tzipMatchCount = interpreterProxy->fetchIntegerofObject(14, rcvr);\n\treturn !(interpreterProxy->failed());\n}\n\nstatic sqInt\nloadZipEncoderFrom(sqInt rcvr)\n{\n    sqInt oop;\n\n\tif (!((interpreterProxy->isPointers(rcvr))\n\t\t && ((interpreterProxy->slotSizeOf(rcvr)) >= 6))) {\n\t\treturn 0;\n\t}\n\toop = interpreterProxy->fetchPointerofObject(0, rcvr);\n\tif ((oop & 1)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!(interpreterProxy->isBytes(oop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tzipCollection = interpreterProxy->firstIndexableField(oop);\n\tzipCollectionSize = interpreterProxy->byteSizeOf(oop);\n\tzipPosition = interpreterProxy->fetchIntegerofObject(1, rcvr);\n\n\t/* zipWriteLimit := interpreterProxy fetchInteger: 3 ofObject: rcvr. */\n\n\tzipReadLimit = interpreterProxy->fetchIntegerofObject(2, rcvr);\n\tzipBitBuf = interpreterProxy->fetchIntegerofObject(4, rcvr);\n\tzipBitPos = interpreterProxy->fetchIntegerofObject(5, rcvr);\n\treturn !(interpreterProxy->failed());\n}\n\nstatic sqInt\nmsg(char *s)\n{\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n\treturn 0;\n}\n\n\n/*\tRequire:\n\tzipCollection, zipCollectionSize, zipPosition,\n\tzipBitBuf, zipBitPos.\n\t */\n\nstatic sqInt\nnextZipBitsput(sqInt nBits, sqInt value)\n{\n\tif (!((value >= 0)\n\t\t && ((1 << nBits) > value))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tzipBitBuf = zipBitBuf | (((zipBitPos < 0) ? ((usqInt) value >> -zipBitPos) : ((usqInt) value << zipBitPos)));\n\tzipBitPos += nBits;\n\twhile ((zipBitPos >= 8)\n && (zipPosition < zipCollectionSize)) {\n\t\tzipCollection[zipPosition] = (zipBitBuf & 255);\n\t\tzipPosition += 1;\n\t\tzipBitBuf = ((usqInt) zipBitBuf) >> 8;\n\t\tzipBitPos -= 8;\n\t}\n}\n\n\n/*\tPrimitive. Deflate the current contents of the receiver. */\n\nEXPORT(sqInt)\nprimitiveDeflateBlock(void)\n{\n    sqInt chainLength;\n    sqInt goodMatch;\n    sqInt lastIndex;\n    sqInt rcvr;\n    sqInt result;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 3)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tgoodMatch = interpreterProxy->stackIntegerValue(0);\n\tchainLength = interpreterProxy->stackIntegerValue(1);\n\tlastIndex = interpreterProxy->stackIntegerValue(2);\n\trcvr = interpreterProxy->stackObjectValue(3);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t;\n\tif (!(loadDeflateStreamFrom(rcvr))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tresult = deflateBlockchainLengthgoodMatch(lastIndex, chainLength, goodMatch);\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->storeIntegerofObjectwithValue(6, rcvr, zipHashValue);\n\t\tinterpreterProxy->storeIntegerofObjectwithValue(7, rcvr, zipBlockPos);\n\t\tinterpreterProxy->storeIntegerofObjectwithValue(13, rcvr, zipLiteralCount);\n\t\tinterpreterProxy->storeIntegerofObjectwithValue(14, rcvr, zipMatchCount);\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->pop(4);\n\t\tinterpreterProxy->pushBool(result);\n\t}\n}\n\n\n/*\tPrimitive. Update the hash tables after data has been moved by delta. */\n\nEXPORT(sqInt)\nprimitiveDeflateUpdateHashTable(void)\n{\n    sqInt delta;\n    sqInt entry;\n    sqInt i;\n    sqInt table;\n    int *tablePtr;\n    sqInt tableSize;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 2)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tdelta = interpreterProxy->stackIntegerValue(0);\n\ttable = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!(interpreterProxy->isWords(table))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\ttableSize = interpreterProxy->slotSizeOf(table);\n\ttablePtr = interpreterProxy->firstIndexableField(table);\n\tfor (i = 0; i <= (tableSize - 1); i += 1) {\n\t\tentry = tablePtr[i];\n\t\tif (entry >= delta) {\n\t\t\ttablePtr[i] = (entry - delta);\n\t\t}\n\t\telse {\n\t\t\ttablePtr[i] = 0;\n\t\t}\n\t}\n\tinterpreterProxy->pop(2);\n}\n\n\n/*\tPrimitive. Inflate a single block. */\n\nEXPORT(sqInt)\nprimitiveInflateDecompressBlock(void)\n{\n    sqInt oop;\n    sqInt rcvr;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 2)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\toop = interpreterProxy->stackObjectValue(0);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!(interpreterProxy->isWords(oop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tzipDistTable = interpreterProxy->firstIndexableField(oop);\n\n\t/* literal table */\n\n\tzipDistTableSize = interpreterProxy->slotSizeOf(oop);\n\toop = interpreterProxy->stackObjectValue(1);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!(interpreterProxy->isWords(oop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tzipLitTable = interpreterProxy->firstIndexableField(oop);\n\n\t/* Receiver (InflateStream) */\n\n\tzipLitTableSize = interpreterProxy->slotSizeOf(oop);\n\trcvr = interpreterProxy->stackObjectValue(2);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!(interpreterProxy->isPointers(rcvr))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif ((interpreterProxy->slotSizeOf(rcvr)) < 9) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tzipReadLimit = interpreterProxy->fetchIntegerofObject(2, rcvr);\n\tzipState = interpreterProxy->fetchIntegerofObject(3, rcvr);\n\tzipBitBuf = interpreterProxy->fetchIntegerofObject(4, rcvr);\n\tzipBitPos = interpreterProxy->fetchIntegerofObject(5, rcvr);\n\tzipSourcePos = interpreterProxy->fetchIntegerofObject(7, rcvr);\n\tzipSourceLimit = interpreterProxy->fetchIntegerofObject(8, rcvr);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tzipReadLimit -= 1;\n\tzipSourcePos -= 1;\n\n\t/* collection */\n\n\tzipSourceLimit -= 1;\n\toop = interpreterProxy->fetchPointerofObject(0, rcvr);\n\tif ((oop & 1)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!(interpreterProxy->isBytes(oop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tzipCollection = interpreterProxy->firstIndexableField(oop);\n\n\t/* source */\n\n\tzipCollectionSize = interpreterProxy->byteSizeOf(oop);\n\toop = interpreterProxy->fetchPointerofObject(6, rcvr);\n\tif ((oop & 1)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!(interpreterProxy->isBytes(oop))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\n\t/* do the primitive */\n\n\tzipSource = interpreterProxy->firstIndexableField(oop);\n\tzipDecompressBlock();\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->storeIntegerofObjectwithValue(2, rcvr, zipReadLimit + 1);\n\t\tinterpreterProxy->storeIntegerofObjectwithValue(3, rcvr, zipState);\n\t\tinterpreterProxy->storeIntegerofObjectwithValue(4, rcvr, zipBitBuf);\n\t\tinterpreterProxy->storeIntegerofObjectwithValue(5, rcvr, zipBitPos);\n\t\tinterpreterProxy->storeIntegerofObjectwithValue(7, rcvr, zipSourcePos + 1);\n\t\tinterpreterProxy->pop(2);\n\t}\n}\n\n\n/*\tPrimitive. Update a 32bit CRC value. */\n\nEXPORT(sqInt)\nprimitiveUpdateAdler32(void)\n{\n    unsigned int  adler32;\n    sqInt b;\n    unsigned char *bytePtr;\n    sqInt collection;\n    sqInt i;\n    sqInt length;\n    sqInt s1;\n    sqInt s2;\n    sqInt startIndex;\n    sqInt stopIndex;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 4)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tcollection = interpreterProxy->stackObjectValue(0);\n\tstopIndex = interpreterProxy->stackIntegerValue(1);\n\tstartIndex = interpreterProxy->stackIntegerValue(2);\n\tadler32 = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(3));\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\tif (!((interpreterProxy->isBytes(collection))\n\t\t && ((stopIndex >= startIndex)\n && (startIndex > 0)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tlength = interpreterProxy->byteSizeOf(collection);\n\tif (!(stopIndex <= length)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tbytePtr = interpreterProxy->firstIndexableField(collection);\n\tstartIndex -= 1;\n\tstopIndex -= 1;\n\ts1 = adler32 & 65535;\n\ts2 = (((usqInt) adler32) >> 16) & 65535;\n\tfor (i = startIndex; i <= stopIndex; i += 1) {\n\t\tb = bytePtr[i];\n\t\ts1 = (s1 + b) % 65521;\n\t\ts2 = (s2 + s1) % 65521;\n\t}\n\tadler32 = (((usqInt) s2 << 16)) + s1;\n\tinterpreterProxy->pop(5);\n\tinterpreterProxy->push(interpreterProxy->positive32BitIntegerFor(adler32));\n}\n\n\n/*\tPrimitive. Update a 32bit CRC value. */\n\nEXPORT(sqInt)\nprimitiveUpdateGZipCrc32(void)\n{\n    unsigned char *bytePtr;\n    sqInt collection;\n    unsigned int  crc;\n    sqInt i;\n    sqInt length;\n    sqInt startIndex;\n    sqInt stopIndex;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 4)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tcollection = interpreterProxy->stackObjectValue(0);\n\tstopIndex = interpreterProxy->stackIntegerValue(1);\n\tstartIndex = interpreterProxy->stackIntegerValue(2);\n\tcrc = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(3));\n\tif (interpreterProxy->failed()) {\n\t\treturn 0;\n\t}\n\tif (!((interpreterProxy->isBytes(collection))\n\t\t && ((stopIndex >= startIndex)\n && (startIndex > 0)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tlength = interpreterProxy->byteSizeOf(collection);\n\tif (!(stopIndex <= length)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tbytePtr = interpreterProxy->firstIndexableField(collection);\n\t;\n\tstartIndex -= 1;\n\tstopIndex -= 1;\n\tfor (i = startIndex; i <= stopIndex; i += 1) {\n\t\tcrc = (zipCrcTable[(crc ^ (bytePtr[i])) & 255]) ^ (((usqInt) crc) >> 8);\n\t}\n\tinterpreterProxy->pop(5);\n\tinterpreterProxy->push(interpreterProxy->positive32BitIntegerFor(crc));\n}\n\nEXPORT(sqInt)\nprimitiveZipSendBlock(void)\n{\n    sqInt code;\n    sqInt dist;\n    unsigned int *distArray;\n    unsigned int *distBitLengths;\n    sqInt distBlCount;\n    unsigned int *distCodes;\n    sqInt distStream;\n    sqInt distTree;\n    sqInt extra;\n    sqInt lit;\n    unsigned char *litArray;\n    sqInt litBlCount;\n    sqInt litLimit;\n    sqInt litPos;\n    sqInt litStream;\n    sqInt litTree;\n    unsigned int *llBitLengths;\n    unsigned int *llCodes;\n    sqInt oop;\n    sqInt rcvr;\n    sqInt result;\n    sqInt sum;\n\n\tif (!((interpreterProxy->methodArgumentCount()) == 4)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tdistTree = interpreterProxy->stackObjectValue(0);\n\tlitTree = interpreterProxy->stackObjectValue(1);\n\tdistStream = interpreterProxy->stackObjectValue(2);\n\tlitStream = interpreterProxy->stackObjectValue(3);\n\trcvr = interpreterProxy->stackObjectValue(4);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tif (!(loadZipEncoderFrom(rcvr))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!((interpreterProxy->isPointers(distTree))\n\t\t && ((interpreterProxy->slotSizeOf(distTree)) >= 2))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!((interpreterProxy->isPointers(litTree))\n\t\t && ((interpreterProxy->slotSizeOf(litTree)) >= 2))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!((interpreterProxy->isPointers(litStream))\n\t\t && ((interpreterProxy->slotSizeOf(litStream)) >= 3))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!((interpreterProxy->isPointers(distStream))\n\t\t && ((interpreterProxy->slotSizeOf(distStream)) >= 3))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\t;\n\t/* begin sendBlock:with:with:with: */\n\toop = interpreterProxy->fetchPointerofObject(0, litStream);\n\tlitPos = interpreterProxy->fetchIntegerofObject(1, litStream);\n\tlitLimit = interpreterProxy->fetchIntegerofObject(2, litStream);\n\tif (!((!((oop & 1)))\n\t\t && ((litPos <= litLimit)\n && ((litLimit <= (interpreterProxy->byteSizeOf(oop)))\n && (interpreterProxy->isBytes(oop)))))) {\n\t\tresult = interpreterProxy->primitiveFail();\n\t\tgoto l7;\n\t}\n\tlitArray = interpreterProxy->firstIndexableField(oop);\n\toop = interpreterProxy->fetchPointerofObject(0, distStream);\n\tif (!((!((oop & 1)))\n\t\t && (((interpreterProxy->fetchIntegerofObject(1, distStream)) == litPos)\n && ((interpreterProxy->fetchIntegerofObject(2, distStream)) == litLimit)))) {\n\t\tresult = interpreterProxy->primitiveFail();\n\t\tgoto l7;\n\t}\n\tif (!((interpreterProxy->isWords(oop))\n\t\t && (litLimit <= (interpreterProxy->slotSizeOf(oop))))) {\n\t\tresult = interpreterProxy->primitiveFail();\n\t\tgoto l7;\n\t}\n\tdistArray = interpreterProxy->firstIndexableField(oop);\n\toop = interpreterProxy->fetchPointerofObject(0, litTree);\n\tif (!((!((oop & 1)))\n\t\t && (interpreterProxy->isWords(oop)))) {\n\t\tresult = interpreterProxy->primitiveFail();\n\t\tgoto l7;\n\t}\n\tlitBlCount = interpreterProxy->slotSizeOf(oop);\n\tllBitLengths = interpreterProxy->firstIndexableField(oop);\n\toop = interpreterProxy->fetchPointerofObject(1, litTree);\n\tif (!((!((oop & 1)))\n\t\t && (interpreterProxy->isWords(oop)))) {\n\t\tresult = interpreterProxy->primitiveFail();\n\t\tgoto l7;\n\t}\n\tif (!(litBlCount == (interpreterProxy->slotSizeOf(oop)))) {\n\t\tresult = interpreterProxy->primitiveFail();\n\t\tgoto l7;\n\t}\n\tllCodes = interpreterProxy->firstIndexableField(oop);\n\toop = interpreterProxy->fetchPointerofObject(0, distTree);\n\tif (!((!((oop & 1)))\n\t\t && (interpreterProxy->isWords(oop)))) {\n\t\tresult = interpreterProxy->primitiveFail();\n\t\tgoto l7;\n\t}\n\tdistBlCount = interpreterProxy->slotSizeOf(oop);\n\tdistBitLengths = interpreterProxy->firstIndexableField(oop);\n\toop = interpreterProxy->fetchPointerofObject(1, distTree);\n\tif (!((!((oop & 1)))\n\t\t && (interpreterProxy->isWords(oop)))) {\n\t\tresult = interpreterProxy->primitiveFail();\n\t\tgoto l7;\n\t}\n\tif (!(distBlCount == (interpreterProxy->slotSizeOf(oop)))) {\n\t\tresult = interpreterProxy->primitiveFail();\n\t\tgoto l7;\n\t}\n\tdistCodes = interpreterProxy->firstIndexableField(oop);\n\tif (interpreterProxy->failed()) {\n\t\tresult = null;\n\t\tgoto l7;\n\t}\n\t/* begin nextZipBits:put: */\n\tif (!((0 >= 0)\n\t\t && ((1 << 0) > 0))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tgoto l6;\n\t}\n\tzipBitBuf = zipBitBuf | (((zipBitPos < 0) ? ((usqInt) 0 >> -zipBitPos) : ((usqInt) 0 << zipBitPos)));\n\tzipBitPos += 0;\n\twhile ((zipBitPos >= 8)\n && (zipPosition < zipCollectionSize)) {\n\t\tzipCollection[zipPosition] = (zipBitBuf & 255);\n\t\tzipPosition += 1;\n\t\tzipBitBuf = ((usqInt) zipBitBuf) >> 8;\n\t\tzipBitPos -= 8;\n\t}\nl6:\t/* end nextZipBits:put: */;\n\tsum = 0;\n\twhile ((litPos < litLimit)\n && ((zipPosition + 4) < zipCollectionSize)) {\n\t\tlit = litArray[litPos];\n\t\tdist = distArray[litPos];\n\t\tlitPos += 1;\n\t\tif (dist == 0) {\n\n\t\t\t/* literal */\n\n\t\t\tsum += 1;\n\t\t\tif (!(lit < litBlCount)) {\n\t\t\t\tresult = interpreterProxy->primitiveFail();\n\t\t\t\tgoto l7;\n\t\t\t}\n\t\t\t/* begin nextZipBits:put: */\n\t\t\tif (!(((llCodes[lit]) >= 0)\n\t\t\t\t && ((1 << (llBitLengths[lit])) > (llCodes[lit])))) {\n\t\t\t\tinterpreterProxy->primitiveFail();\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t\tzipBitBuf = zipBitBuf | (((zipBitPos < 0) ? ((usqInt) (llCodes[lit]) >> -zipBitPos) : ((usqInt) (llCodes[lit]) << zipBitPos)));\n\t\t\tzipBitPos += llBitLengths[lit];\n\t\t\twhile ((zipBitPos >= 8)\n && (zipPosition < zipCollectionSize)) {\n\t\t\t\tzipCollection[zipPosition] = (zipBitBuf & 255);\n\t\t\t\tzipPosition += 1;\n\t\t\t\tzipBitBuf = ((usqInt) zipBitBuf) >> 8;\n\t\t\t\tzipBitPos -= 8;\n\t\t\t}\n\t\tl1:\t/* end nextZipBits:put: */;\n\t\t}\n\t\telse {\n\n\t\t\t/* match */\n\n\t\t\tsum = (sum + lit) + DeflateMinMatch;\n\t\t\tif (!(lit < 256)) {\n\t\t\t\tresult = interpreterProxy->primitiveFail();\n\t\t\t\tgoto l7;\n\t\t\t}\n\t\t\tcode = zipMatchLengthCodes[lit];\n\t\t\tif (!(code < litBlCount)) {\n\t\t\t\tresult = interpreterProxy->primitiveFail();\n\t\t\t\tgoto l7;\n\t\t\t}\n\t\t\t/* begin nextZipBits:put: */\n\t\t\tif (!(((llCodes[code]) >= 0)\n\t\t\t\t && ((1 << (llBitLengths[code])) > (llCodes[code])))) {\n\t\t\t\tinterpreterProxy->primitiveFail();\n\t\t\t\tgoto l4;\n\t\t\t}\n\t\t\tzipBitBuf = zipBitBuf | (((zipBitPos < 0) ? ((usqInt) (llCodes[code]) >> -zipBitPos) : ((usqInt) (llCodes[code]) << zipBitPos)));\n\t\t\tzipBitPos += llBitLengths[code];\n\t\t\twhile ((zipBitPos >= 8)\n && (zipPosition < zipCollectionSize)) {\n\t\t\t\tzipCollection[zipPosition] = (zipBitBuf & 255);\n\t\t\t\tzipPosition += 1;\n\t\t\t\tzipBitBuf = ((usqInt) zipBitBuf) >> 8;\n\t\t\t\tzipBitPos -= 8;\n\t\t\t}\n\t\tl4:\t/* end nextZipBits:put: */;\n\t\t\textra = zipExtraLengthBits[code - 257];\n\t\t\tif (!(extra == 0)) {\n\t\t\t\tlit -= zipBaseLength[code - 257];\n\t\t\t\t/* begin nextZipBits:put: */\n\t\t\t\tif (!((lit >= 0)\n\t\t\t\t\t && ((1 << extra) > lit))) {\n\t\t\t\t\tinterpreterProxy->primitiveFail();\n\t\t\t\t\tgoto l2;\n\t\t\t\t}\n\t\t\t\tzipBitBuf = zipBitBuf | (((zipBitPos < 0) ? ((usqInt) lit >> -zipBitPos) : ((usqInt) lit << zipBitPos)));\n\t\t\t\tzipBitPos += extra;\n\t\t\t\twhile ((zipBitPos >= 8)\n && (zipPosition < zipCollectionSize)) {\n\t\t\t\t\tzipCollection[zipPosition] = (zipBitBuf & 255);\n\t\t\t\t\tzipPosition += 1;\n\t\t\t\t\tzipBitBuf = ((usqInt) zipBitBuf) >> 8;\n\t\t\t\t\tzipBitPos -= 8;\n\t\t\t\t}\n\t\t\tl2:\t/* end nextZipBits:put: */;\n\t\t\t}\n\t\t\tdist -= 1;\n\t\t\tif (!(dist < 32768)) {\n\t\t\t\tresult = interpreterProxy->primitiveFail();\n\t\t\t\tgoto l7;\n\t\t\t}\n\t\t\tif (dist < 256) {\n\t\t\t\tcode = zipDistanceCodes[dist];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcode = zipDistanceCodes[256 + (((usqInt) dist) >> 7)];\n\t\t\t}\n\t\t\tif (!(code < distBlCount)) {\n\t\t\t\tresult = interpreterProxy->primitiveFail();\n\t\t\t\tgoto l7;\n\t\t\t}\n\t\t\t/* begin nextZipBits:put: */\n\t\t\tif (!(((distCodes[code]) >= 0)\n\t\t\t\t && ((1 << (distBitLengths[code])) > (distCodes[code])))) {\n\t\t\t\tinterpreterProxy->primitiveFail();\n\t\t\t\tgoto l5;\n\t\t\t}\n\t\t\tzipBitBuf = zipBitBuf | (((zipBitPos < 0) ? ((usqInt) (distCodes[code]) >> -zipBitPos) : ((usqInt) (distCodes[code]) << zipBitPos)));\n\t\t\tzipBitPos += distBitLengths[code];\n\t\t\twhile ((zipBitPos >= 8)\n && (zipPosition < zipCollectionSize)) {\n\t\t\t\tzipCollection[zipPosition] = (zipBitBuf & 255);\n\t\t\t\tzipPosition += 1;\n\t\t\t\tzipBitBuf = ((usqInt) zipBitBuf) >> 8;\n\t\t\t\tzipBitPos -= 8;\n\t\t\t}\n\t\tl5:\t/* end nextZipBits:put: */;\n\t\t\textra = zipExtraDistanceBits[code];\n\t\t\tif (!(extra == 0)) {\n\t\t\t\tdist -= zipBaseDistance[code];\n\t\t\t\t/* begin nextZipBits:put: */\n\t\t\t\tif (!((dist >= 0)\n\t\t\t\t\t && ((1 << extra) > dist))) {\n\t\t\t\t\tinterpreterProxy->primitiveFail();\n\t\t\t\t\tgoto l3;\n\t\t\t\t}\n\t\t\t\tzipBitBuf = zipBitBuf | (((zipBitPos < 0) ? ((usqInt) dist >> -zipBitPos) : ((usqInt) dist << zipBitPos)));\n\t\t\t\tzipBitPos += extra;\n\t\t\t\twhile ((zipBitPos >= 8)\n && (zipPosition < zipCollectionSize)) {\n\t\t\t\t\tzipCollection[zipPosition] = (zipBitBuf & 255);\n\t\t\t\t\tzipPosition += 1;\n\t\t\t\t\tzipBitBuf = ((usqInt) zipBitBuf) >> 8;\n\t\t\t\t\tzipBitPos -= 8;\n\t\t\t\t}\n\t\t\tl3:\t/* end nextZipBits:put: */;\n\t\t\t}\n\t\t}\n\t}\n\tif (interpreterProxy->failed()) {\n\t\tresult = null;\n\t\tgoto l7;\n\t}\n\tinterpreterProxy->storeIntegerofObjectwithValue(1, litStream, litPos);\n\tinterpreterProxy->storeIntegerofObjectwithValue(1, distStream, litPos);\n\tresult = sum;\nl7:\t/* end sendBlock:with:with:with: */;\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->storeIntegerofObjectwithValue(1, rcvr, zipPosition);\n\t\tinterpreterProxy->storeIntegerofObjectwithValue(4, rcvr, zipBitBuf);\n\t\tinterpreterProxy->storeIntegerofObjectwithValue(5, rcvr, zipBitPos);\n\t}\n\tif (!(interpreterProxy->failed())) {\n\t\tinterpreterProxy->pop(5);\n\t\tinterpreterProxy->pushInteger(result);\n\t}\n}\n\n\n/*\tRequire: \n\tzipCollection, zipCollectionSize, zipPosition,\n\tzipBitBuf, zipBitPos.\n\t */\n\nstatic sqInt\nsendBlockwithwithwith(sqInt literalStream, sqInt distanceStream, sqInt litTree, sqInt distTree)\n{\n    sqInt code;\n    sqInt dist;\n    unsigned int *distArray;\n    unsigned int *distBitLengths;\n    sqInt distBlCount;\n    unsigned int *distCodes;\n    sqInt extra;\n    sqInt lit;\n    unsigned char *litArray;\n    sqInt litBlCount;\n    sqInt litLimit;\n    sqInt litPos;\n    unsigned int *llBitLengths;\n    unsigned int *llCodes;\n    sqInt oop;\n    sqInt sum;\n\n\toop = interpreterProxy->fetchPointerofObject(0, literalStream);\n\tlitPos = interpreterProxy->fetchIntegerofObject(1, literalStream);\n\tlitLimit = interpreterProxy->fetchIntegerofObject(2, literalStream);\n\tif (!((!((oop & 1)))\n\t\t && ((litPos <= litLimit)\n && ((litLimit <= (interpreterProxy->byteSizeOf(oop)))\n && (interpreterProxy->isBytes(oop)))))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tlitArray = interpreterProxy->firstIndexableField(oop);\n\toop = interpreterProxy->fetchPointerofObject(0, distanceStream);\n\tif (!((!((oop & 1)))\n\t\t && (((interpreterProxy->fetchIntegerofObject(1, distanceStream)) == litPos)\n && ((interpreterProxy->fetchIntegerofObject(2, distanceStream)) == litLimit)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!((interpreterProxy->isWords(oop))\n\t\t && (litLimit <= (interpreterProxy->slotSizeOf(oop))))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tdistArray = interpreterProxy->firstIndexableField(oop);\n\toop = interpreterProxy->fetchPointerofObject(0, litTree);\n\tif (!((!((oop & 1)))\n\t\t && (interpreterProxy->isWords(oop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tlitBlCount = interpreterProxy->slotSizeOf(oop);\n\tllBitLengths = interpreterProxy->firstIndexableField(oop);\n\toop = interpreterProxy->fetchPointerofObject(1, litTree);\n\tif (!((!((oop & 1)))\n\t\t && (interpreterProxy->isWords(oop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!(litBlCount == (interpreterProxy->slotSizeOf(oop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tllCodes = interpreterProxy->firstIndexableField(oop);\n\toop = interpreterProxy->fetchPointerofObject(0, distTree);\n\tif (!((!((oop & 1)))\n\t\t && (interpreterProxy->isWords(oop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tdistBlCount = interpreterProxy->slotSizeOf(oop);\n\tdistBitLengths = interpreterProxy->firstIndexableField(oop);\n\toop = interpreterProxy->fetchPointerofObject(1, distTree);\n\tif (!((!((oop & 1)))\n\t\t && (interpreterProxy->isWords(oop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!(distBlCount == (interpreterProxy->slotSizeOf(oop)))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tdistCodes = interpreterProxy->firstIndexableField(oop);\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\t/* begin nextZipBits:put: */\n\tif (!((0 >= 0)\n\t\t && ((1 << 0) > 0))) {\n\t\tinterpreterProxy->primitiveFail();\n\t\tgoto l6;\n\t}\n\tzipBitBuf = zipBitBuf | (((zipBitPos < 0) ? ((usqInt) 0 >> -zipBitPos) : ((usqInt) 0 << zipBitPos)));\n\tzipBitPos += 0;\n\twhile ((zipBitPos >= 8)\n && (zipPosition < zipCollectionSize)) {\n\t\tzipCollection[zipPosition] = (zipBitBuf & 255);\n\t\tzipPosition += 1;\n\t\tzipBitBuf = ((usqInt) zipBitBuf) >> 8;\n\t\tzipBitPos -= 8;\n\t}\nl6:\t/* end nextZipBits:put: */;\n\tsum = 0;\n\twhile ((litPos < litLimit)\n && ((zipPosition + 4) < zipCollectionSize)) {\n\t\tlit = litArray[litPos];\n\t\tdist = distArray[litPos];\n\t\tlitPos += 1;\n\t\tif (dist == 0) {\n\n\t\t\t/* literal */\n\n\t\t\tsum += 1;\n\t\t\tif (!(lit < litBlCount)) {\n\t\t\t\treturn interpreterProxy->primitiveFail();\n\t\t\t}\n\t\t\t/* begin nextZipBits:put: */\n\t\t\tif (!(((llCodes[lit]) >= 0)\n\t\t\t\t && ((1 << (llBitLengths[lit])) > (llCodes[lit])))) {\n\t\t\t\tinterpreterProxy->primitiveFail();\n\t\t\t\tgoto l1;\n\t\t\t}\n\t\t\tzipBitBuf = zipBitBuf | (((zipBitPos < 0) ? ((usqInt) (llCodes[lit]) >> -zipBitPos) : ((usqInt) (llCodes[lit]) << zipBitPos)));\n\t\t\tzipBitPos += llBitLengths[lit];\n\t\t\twhile ((zipBitPos >= 8)\n && (zipPosition < zipCollectionSize)) {\n\t\t\t\tzipCollection[zipPosition] = (zipBitBuf & 255);\n\t\t\t\tzipPosition += 1;\n\t\t\t\tzipBitBuf = ((usqInt) zipBitBuf) >> 8;\n\t\t\t\tzipBitPos -= 8;\n\t\t\t}\n\t\tl1:\t/* end nextZipBits:put: */;\n\t\t}\n\t\telse {\n\n\t\t\t/* match */\n\n\t\t\tsum = (sum + lit) + DeflateMinMatch;\n\t\t\tif (!(lit < 256)) {\n\t\t\t\treturn interpreterProxy->primitiveFail();\n\t\t\t}\n\t\t\tcode = zipMatchLengthCodes[lit];\n\t\t\tif (!(code < litBlCount)) {\n\t\t\t\treturn interpreterProxy->primitiveFail();\n\t\t\t}\n\t\t\t/* begin nextZipBits:put: */\n\t\t\tif (!(((llCodes[code]) >= 0)\n\t\t\t\t && ((1 << (llBitLengths[code])) > (llCodes[code])))) {\n\t\t\t\tinterpreterProxy->primitiveFail();\n\t\t\t\tgoto l4;\n\t\t\t}\n\t\t\tzipBitBuf = zipBitBuf | (((zipBitPos < 0) ? ((usqInt) (llCodes[code]) >> -zipBitPos) : ((usqInt) (llCodes[code]) << zipBitPos)));\n\t\t\tzipBitPos += llBitLengths[code];\n\t\t\twhile ((zipBitPos >= 8)\n && (zipPosition < zipCollectionSize)) {\n\t\t\t\tzipCollection[zipPosition] = (zipBitBuf & 255);\n\t\t\t\tzipPosition += 1;\n\t\t\t\tzipBitBuf = ((usqInt) zipBitBuf) >> 8;\n\t\t\t\tzipBitPos -= 8;\n\t\t\t}\n\t\tl4:\t/* end nextZipBits:put: */;\n\t\t\textra = zipExtraLengthBits[code - 257];\n\t\t\tif (!(extra == 0)) {\n\t\t\t\tlit -= zipBaseLength[code - 257];\n\t\t\t\t/* begin nextZipBits:put: */\n\t\t\t\tif (!((lit >= 0)\n\t\t\t\t\t && ((1 << extra) > lit))) {\n\t\t\t\t\tinterpreterProxy->primitiveFail();\n\t\t\t\t\tgoto l2;\n\t\t\t\t}\n\t\t\t\tzipBitBuf = zipBitBuf | (((zipBitPos < 0) ? ((usqInt) lit >> -zipBitPos) : ((usqInt) lit << zipBitPos)));\n\t\t\t\tzipBitPos += extra;\n\t\t\t\twhile ((zipBitPos >= 8)\n && (zipPosition < zipCollectionSize)) {\n\t\t\t\t\tzipCollection[zipPosition] = (zipBitBuf & 255);\n\t\t\t\t\tzipPosition += 1;\n\t\t\t\t\tzipBitBuf = ((usqInt) zipBitBuf) >> 8;\n\t\t\t\t\tzipBitPos -= 8;\n\t\t\t\t}\n\t\t\tl2:\t/* end nextZipBits:put: */;\n\t\t\t}\n\t\t\tdist -= 1;\n\t\t\tif (!(dist < 32768)) {\n\t\t\t\treturn interpreterProxy->primitiveFail();\n\t\t\t}\n\t\t\tif (dist < 256) {\n\t\t\t\tcode = zipDistanceCodes[dist];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcode = zipDistanceCodes[256 + (((usqInt) dist) >> 7)];\n\t\t\t}\n\t\t\tif (!(code < distBlCount)) {\n\t\t\t\treturn interpreterProxy->primitiveFail();\n\t\t\t}\n\t\t\t/* begin nextZipBits:put: */\n\t\t\tif (!(((distCodes[code]) >= 0)\n\t\t\t\t && ((1 << (distBitLengths[code])) > (distCodes[code])))) {\n\t\t\t\tinterpreterProxy->primitiveFail();\n\t\t\t\tgoto l5;\n\t\t\t}\n\t\t\tzipBitBuf = zipBitBuf | (((zipBitPos < 0) ? ((usqInt) (distCodes[code]) >> -zipBitPos) : ((usqInt) (distCodes[code]) << zipBitPos)));\n\t\t\tzipBitPos += distBitLengths[code];\n\t\t\twhile ((zipBitPos >= 8)\n && (zipPosition < zipCollectionSize)) {\n\t\t\t\tzipCollection[zipPosition] = (zipBitBuf & 255);\n\t\t\t\tzipPosition += 1;\n\t\t\t\tzipBitBuf = ((usqInt) zipBitBuf) >> 8;\n\t\t\t\tzipBitPos -= 8;\n\t\t\t}\n\t\tl5:\t/* end nextZipBits:put: */;\n\t\t\textra = zipExtraDistanceBits[code];\n\t\t\tif (!(extra == 0)) {\n\t\t\t\tdist -= zipBaseDistance[code];\n\t\t\t\t/* begin nextZipBits:put: */\n\t\t\t\tif (!((dist >= 0)\n\t\t\t\t\t && ((1 << extra) > dist))) {\n\t\t\t\t\tinterpreterProxy->primitiveFail();\n\t\t\t\t\tgoto l3;\n\t\t\t\t}\n\t\t\t\tzipBitBuf = zipBitBuf | (((zipBitPos < 0) ? ((usqInt) dist >> -zipBitPos) : ((usqInt) dist << zipBitPos)));\n\t\t\t\tzipBitPos += extra;\n\t\t\t\twhile ((zipBitPos >= 8)\n && (zipPosition < zipCollectionSize)) {\n\t\t\t\t\tzipCollection[zipPosition] = (zipBitBuf & 255);\n\t\t\t\t\tzipPosition += 1;\n\t\t\t\t\tzipBitBuf = ((usqInt) zipBitBuf) >> 8;\n\t\t\t\t\tzipBitPos -= 8;\n\t\t\t\t}\n\t\t\tl3:\t/* end nextZipBits:put: */;\n\t\t\t}\n\t\t}\n\t}\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy->storeIntegerofObjectwithValue(1, literalStream, litPos);\n\tinterpreterProxy->storeIntegerofObjectwithValue(1, distanceStream, litPos);\n\treturn sum;\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(sqInt)\nsetInterpreter(struct VirtualMachine*anInterpreter)\n{\n    sqInt ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\n/*\tCheck if we should flush the current block.\n\tFlushing can be useful if the input characteristics change. */\n\nstatic sqInt\nshouldFlush(void)\n{\n    sqInt nLits;\n\n\tif (zipLiteralCount == zipLiteralSize) {\n\t\treturn 1;\n\t}\n\tif (!((zipLiteralCount & 4095) == 0)) {\n\t\treturn 0;\n\t}\n\tif ((zipMatchCount * 10) <= zipLiteralCount) {\n\t\treturn 0;\n\t}\n\tnLits = zipLiteralCount - zipMatchCount;\n\tif (nLits <= zipMatchCount) {\n\t\treturn 0;\n\t}\n\treturn (nLits * 4) <= zipMatchCount;\n}\n\n\n/*\tUpdate the hash value at position here (one based) */\n\nstatic sqInt\nupdateHashAt(sqInt here)\n{\n\treturn ((((usqInt) zipHashValue << 5)) ^ (zipCollection[here])) & DeflateHashMask;\n}\n\n\n/*\tUpdate the running hash value based on the next input byte.\n\tReturn the new updated hash value. */\n\nstatic sqInt\nupdateHash(sqInt nextValue)\n{\n\treturn ((((usqInt) zipHashValue << 5)) ^ nextValue) & DeflateHashMask;\n}\n\n\n/*\tDecode the next value in the receiver using the given huffman table. */\n\nstatic sqInt\nzipDecodeValueFromsize(unsigned int *table, sqInt tableSize)\n{\n    sqInt bits;\n    sqInt bits1;\n    sqInt bitsNeeded;\n    sqInt byte;\n    sqInt index;\n    sqInt tableIndex;\n    sqInt value;\n\n\n\t/* Initial bits needed */\n\n\tbitsNeeded = ((usqInt) (table[0]) >> 24);\n\tif (bitsNeeded > MaxBits) {\n\t\tinterpreterProxy->primitiveFail();\n\t\treturn 0;\n\t}\n\n\t/* First real table */\n\n\ttableIndex = 2;\n\twhile (1) {\n\t\t/* begin zipNextBits: */\n\t\twhile (zipBitPos < bitsNeeded) {\n\t\t\tbyte = zipSource[(zipSourcePos += 1)];\n\t\t\tzipBitBuf += byte << zipBitPos;\n\t\t\tzipBitPos += 8;\n\t\t}\n\t\tbits1 = zipBitBuf & ((1 << bitsNeeded) - 1);\n\t\tzipBitBuf = ((usqInt) zipBitBuf) >> bitsNeeded;\n\t\tzipBitPos -= bitsNeeded;\n\t\tbits = bits1;\n\t\tindex = (tableIndex + bits) - 1;\n\t\tif (index >= tableSize) {\n\t\t\tinterpreterProxy->primitiveFail();\n\t\t\treturn 0;\n\t\t}\n\n\t\t/* Lookup entry in table */\n\n\t\tvalue = table[index];\n\t\tif ((value & 1056964608) == 0) {\n\t\t\treturn value;\n\t\t}\n\n\t\t/* Table offset in low 16 bit */\n\n\t\ttableIndex = value & 65535;\n\n\t\t/* Additional bits in high 8 bit */\n\n\t\tbitsNeeded = (((usqInt) value >> 24)) & 255;\n\t\tif (bitsNeeded > MaxBits) {\n\t\t\tinterpreterProxy->primitiveFail();\n\t\t\treturn 0;\n\t\t}\n\t}\n\treturn 0;\n}\n\nstatic sqInt\nzipDecompressBlock(void)\n{\n    sqInt distance;\n    sqInt dstPos;\n    sqInt extra;\n    sqInt i;\n    sqInt length;\n    sqInt max;\n    sqInt oldBitPos;\n    sqInt oldBits;\n    sqInt oldPos;\n    sqInt srcPos;\n    sqInt value;\n\n\tmax = zipCollectionSize - 1;\n\twhile ((zipReadLimit < max)\n && (zipSourcePos <= zipSourceLimit)) {\n\n\t\t/* Back up stuff if we're running out of space */\n\n\t\toldBits = zipBitBuf;\n\t\toldBitPos = zipBitPos;\n\t\toldPos = zipSourcePos;\n\t\tvalue = zipDecodeValueFromsize(zipLitTable, zipLitTableSize);\n\t\tif (value < 256) {\n\t\t\tzipCollection[(zipReadLimit += 1)] = value;\n\t\t}\n\t\telse {\n\t\t\tif (value == 256) {\n\n\t\t\t\t/* length/distance or end of block */\n\t\t\t\t/* End of block */\n\n\t\t\t\tzipState = zipState & StateNoMoreData;\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\textra = (((usqInt) value >> 16)) - 1;\n\t\t\tlength = value & 65535;\n\t\t\tif (extra > 0) {\n\t\t\t\tlength += zipNextBits(extra);\n\t\t\t}\n\t\t\tvalue = zipDecodeValueFromsize(zipDistTable, zipDistTableSize);\n\t\t\textra = ((usqInt) value >> 16);\n\t\t\tdistance = value & 65535;\n\t\t\tif (extra > 0) {\n\t\t\t\tdistance += zipNextBits(extra);\n\t\t\t}\n\t\t\tif ((zipReadLimit + length) >= max) {\n\t\t\t\tzipBitBuf = oldBits;\n\t\t\t\tzipBitPos = oldBitPos;\n\t\t\t\tzipSourcePos = oldPos;\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tdstPos = zipReadLimit;\n\t\t\tsrcPos = zipReadLimit - distance;\n\t\t\tfor (i = 1; i <= length; i += 1) {\n\t\t\t\tzipCollection[dstPos + i] = (zipCollection[srcPos + i]);\n\t\t\t}\n\t\t\tzipReadLimit += length;\n\t\t}\n\t}\n}\n\nstatic sqInt\nzipNextBits(sqInt n)\n{\n    sqInt bits;\n    sqInt byte;\n\n\twhile (zipBitPos < n) {\n\t\tbyte = zipSource[(zipSourcePos += 1)];\n\t\tzipBitBuf += byte << zipBitPos;\n\t\tzipBitPos += 8;\n\t}\n\tbits = zipBitBuf & ((1 << n) - 1);\n\tzipBitBuf = ((usqInt) zipBitBuf) >> n;\n\tzipBitPos -= n;\n\treturn bits;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\nvoid* ZipPlugin_exports[][3] = {\n\t{\"ZipPlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"ZipPlugin\", \"primitiveDeflateBlock\", (void*)primitiveDeflateBlock},\n\t{\"ZipPlugin\", \"primitiveDeflateUpdateHashTable\", (void*)primitiveDeflateUpdateHashTable},\n\t{\"ZipPlugin\", \"primitiveInflateDecompressBlock\", (void*)primitiveInflateDecompressBlock},\n\t{\"ZipPlugin\", \"primitiveUpdateAdler32\", (void*)primitiveUpdateAdler32},\n\t{\"ZipPlugin\", \"primitiveUpdateGZipCrc32\", (void*)primitiveUpdateGZipCrc32},\n\t{\"ZipPlugin\", \"primitiveZipSendBlock\", (void*)primitiveZipSendBlock},\n\t{\"ZipPlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{NULL, NULL, NULL}\n};\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n"
  },
  {
    "path": "vm/src/from_squeak/unix/CMakeLists.txt",
    "content": "# Yes, it's true: you can write makefiles in COBOL.\n# \n# Last edited: 2010-05-13 12:54:20 by piumarta on emilia-2.local\n\nPROJECT (squeak)\n\nCMAKE_MINIMUM_REQUIRED (VERSION 2.6.2)\n\nIF (NOT DEFINED VM_HOST OR NOT DEFINED VM_VERSION)\n  MESSAGE (FATAL_ERROR \"\n    You MUST NOT run CMake directly the first time you configure a build.\n    Run 'platforms/unix/cmake/configure' from within your build directory.\"\n  )\nENDIF (NOT DEFINED VM_HOST OR NOT DEFINED VM_VERSION)\n\nSET (prefix  ${CMAKE_INSTALL_PREFIX})\n\nSET (version ${VM_VERSION})\n\nSET (bindir bin)\nSET (imgdir lib/squeak)\nSET (plgdir lib/squeak/${version})\nSET (mandir man/man1)\nSET (docdir share/doc/squeak-${version})\n\nGET_CMAKE_PROPERTY (vars VARIABLES)\nFOREACH (opt ${vars})\n  IF (opt MATCHES \"OPT--.*\")\n    STRING (REGEX REPLACE \"OPT--(.*)\" \"\\\\1\" var ${opt})\n    MESSAGE (STATUS \"Setting ${var}=${${opt}}\")\n    SET (${var} ${${opt}})\n  ENDIF ()\nENDFOREACH (opt)\n\nSET (CMAKE_INSTALL_PREFIX ${prefix})\n\nSET (bld    ${CMAKE_BINARY_DIR})\nSET (unix   ${CMAKE_SOURCE_DIR})\nSET (config ${unix}/cmake)\n\nGET_FILENAME_COMPONENT (cross ${unix}/../Cross ABSOLUTE)\n\nIF (OPT--src)\n  GET_FILENAME_COMPONENT (src ${OPT--src} ABSOLUTE)\nELSE (SRC)\n  SET (src  ${unix}/src)\nENDIF (OPT--src)\n\nIF (NOT EXISTS ${src})\n  MESSAGE (FATAL_ERROR \"\n    Source directory ${src} does not exist.\"\n  )\nENDIF (NOT EXISTS ${src})\n\nINCLUDE (${config}/Utils.cmake)\nINCLUDE (${config}/Plugins.cmake)\n\nSTRING (REGEX REPLACE \"([^-]*)-([^-]*)-([^-]*).*\" \"\\\\1\" VM_HOST_CPU    ${VM_HOST})\nSTRING (REGEX REPLACE \"([^-]*)-([^-]*)-([^-]*).*\" \"\\\\2\" VM_HOST_VENDOR ${VM_HOST})\nSTRING (REGEX REPLACE \"([^-]*)-([^-]*)-([^-]*).*\" \"\\\\3\" VM_HOST_OS     ${VM_HOST})\n\nSET (vm-host     \"${VM_HOST}\")\nSET (vm-host-os  \"${VM_HOST_OS}\")\nSET (vm-host-cpu \"${VM_HOST_CPU}\")\n\nIF (OPT--CFLAGS)\n  SET (CMAKE_C_FLAGS \"${OPT--CFLAGS}\")\nENDIF ()\n\nIF (CMAKE_ARCH_FLAGS STREQUAL \"-m32\")\n  IF (VM_HOST_CPU STREQUAL \"x86_64\")\n    SET (VM_HOST_CPU \"i386\")\n  ENDIF ()\nENDIF ()\n\nIF (NOT CMAKE_C_FLAGS)\n  IF (CMAKE_COMPILER_IS_GNUCC)\n    IF     (VM_HOST_CPU MATCHES \"i.86\")\n      SET (CMAKE_C_FLAGS \"-g -O2 -fomit-frame-pointer\")\n    ELSEIF (VM_HOST_CPU STREQUAL \"ppc\" OR VM_HOST_CPU STREQUAL \"powerpc\")\n      SET (CMAKE_C_FLAGS \"-g -O3 -funroll-loops -mcpu=750 -mno-fused-madd\")\n    ENDIF ()\n  ELSE ()\n    SET (CMAKE_C_FLAGS \"${CMAKE_C_FLAGS_RELEASE}\")\n  ENDIF (CMAKE_COMPILER_IS_GNUCC)\nENDIF (NOT CMAKE_C_FLAGS)\n\nIF (NOT CMAKE_C_FLAGS)\n  SET (CMAKE_C_FLAGS \"${CMAKE_C_FLAGS_RELEASE}\")\nENDIF (NOT CMAKE_C_FLAGS)\n\nIF (CMAKE_ARCH_FLAGS)\n  SET (CMAKE_C_FLAGS \"${CMAKE_ARCH_FLAGS} ${CMAKE_C_FLAGS}\")\nENDIF (CMAKE_ARCH_FLAGS)\n\nMESSAGE (STATUS \"Using CFLAGS ${CMAKE_C_FLAGS}\")\n\nMACRO (USE_LIBRARY lib)\n  LIST (APPEND squeak_libs \"${lib}\")\nENDMACRO (USE_LIBRARY)\n\nMACRO (USE_FRAMEWORK fwk)\n  USE_LIBRARY (\"-framework ${fwk}\")\nENDMACRO (USE_FRAMEWORK)\n\nMACRO (CONFIG_DEFINE var)\n  LIST (APPEND config_vars \"${var}\")\nENDMACRO (CONFIG_DEFINE var)\n\nSET (UNIX 1)\nCONFIG_DEFINE (UNIX)\n\nSET (ioMicroSecondClock ioMicroSeconds)\nCONFIG_DEFINE (ioMicroSecondClock)\n\nSET (ioUtcWithOffset sqUnixUtcWithOffset)\nCONFIG_DEFINE (ioUtcWithOffset)\n\nSET (CMAKE_SKIP_BUILD_RPATH TRUE)\nSET (CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) \nSET (CMAKE_INSTALL_RPATH \"\")\nSET (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)\n\nINCLUDE (${unix}/vm/config.cmake)\n\nCONFIGURE_PLUGINS ()\n\nLIST (REMOVE_DUPLICATES config_vars)\nFILE (WRITE ${bld}/config.h.in \"\")\nFOREACH (var ${config_vars})\n  FILE (APPEND ${bld}/config.h.in \"#cmakedefine ${var} @${var}@\\n\")\nENDFOREACH (var)\n\nCONFIGURE_FILE (${bld}/config.h.in ${bld}/config.h)\n\nINCLUDE (${unix}/vm/build.cmake)\n\nBUILD_PLUGINS ()\n\nADD_SUBDIRECTORY (${unix}/npsqueak)\n\nSET (cmake ${unix}/../../cmake)\n\nIF (EXISTS ${cmake}/Packages.cmake)\n  INCLUDE (${cmake}/Packages.cmake)\nENDIF ()\n\nGET_CMAKE_PROPERTY (tmp VARIABLES)\nLIST (REMOVE_ITEM tmp tmp)\nLIST (SORT tmp)\nFILE (WRITE ${bld}/config.status \"\")\nFOREACH (var ${tmp})\n  FILE (APPEND ${bld}/config.status \"${var}=${${var}}\\n\")\nENDFOREACH ()\n"
  },
  {
    "path": "vm/src/from_squeak/unix/ChangeLog",
    "content": "2006-06-05  Ian Piumarta  <com -dot- gmail -at- piumarta (backwards)>\n\n\t* plugins/FilePlugin/sqUnixFile.c (dir_Delete): Invalidate cached\n\tinfo when deleting lastPath.\n\n2006-04-24  Ian Piumarta  <com -dot- gmail -at- piumarta (backwards)>\n\n\t* vm/acinclude.m4: Add CoreServices framework to link libs on\n\tDarwin.\n\n\t* vm/sqUnixMain.c (sqGetFilenameFromString): Resolve links and\n\taliases if resolveAliases is nonzero.\n\n\t* vm/mac-alias.c: Added.\n\n\t* plugins/AioPlugin/Makefile.inc (XCPPFLAGS): XCPPFLAGS defines\n\tSQAIO_H=\"sqaio.h\".\n\n\t* vm/sqUnixMain.c (ioRelinquishProcessorForMicroseconds): Reset\n\tinterruptCheckCounter iff > 1/25 sec has elapsed.\n\n----------------------------------------------------------------\n\t\n2006-04-23  Ian Piumarta  <com -dot- gmail -at- piumarta (backwards)>\n\n\t* 3.9-6 released.\n\n\t* vm/sqUnixMain.c (ioRelinquishProcessorForMicroseconds): Reset\n\tinterrupt check counter at end of sleep.\n\n\t* config/config.h.in: Add HAVE_NANOSLEEP.\n\n\t* vm/acinclude.m4: Define HAVE_NANOSLEEP if nanosleep() available.\n\n\t* vm/aio.c (aioSleep): For small timeouts always nanosleep() if\n\tavailable.\n\n\t* vm/sqUnixMain.c (ioRelinquishProcessorForMicroseconds): Obey the\n\trequested timeout without testing for overdue wakeup ticks.\n\n----------------------------------------------------------------\n\t\n2006-04-19  Ian Piumarta  <com -dot- gmail -at- piumarta (backwards)>\n\n\t* 3.9-4 released.\n\n\t* doc/3.9-4.RELEASE_NOTES: Created.\n\n2006-04-18  Ian Piumarta  <com -dot- gmail -at- piumarta (backwards)>\n\n\t* plugins/FloatMathPlugin/Makefile.inc (CFLAGS): Define NO_ISNAN=1.\n\n\t* vm-display-X11/sqUnixX11.c (handleEvent): Suppress reporting key\n\tup when KeyRelease event is from autorepeat.\n\n2006-04-17  Ian Piumarta  <com -dot- gmail -at- piumarta (backwards)>\n\n\t* vm/aio.c (aioSleep): Sleep in aioPoll (i.e, select) or\n\tnanosleep, for timeouts < 1 timeslice.\n\n\t* vm/sqUnixMain.c (ioRelinquishProcessorForMicroseconds):\n\tNanosecond sleep moved to aioSleep().\n\n\t* vm-display-X11/sqUnixX11.c (display_ioRelinquishProcessorForMicroseconds): \n\t* vm-display-Quartz/sqUnixQuartz.m (display_ioRelinquishProcessorForMicroseconds):\n\t* vm-display-null/sqUnixDisplayNull.c (display_ioRelinquishProcessorForMicroseconds): \n\t* vm-display-fbdev/sqUnixFBDev.c (display_ioRelinquishProcessorForMicroseconds): \n\t* vm-display-custom/sqUnixCustomWindow.c (display_ioRelinquishProcessorForMicroseconds): \n\tCall aioSleep() instead of aioPoll().\n\n2006-04-14  Ian Piumarta  <com -dot- gmail -at- piumarta (backwards)>\n\n\t* vm/aio.c (aioInit): SIGIO handled by forceInterruptCheck().\n\n\t* vm/aio.c (aioEnable): Set ASYNC on internal descriptors.\n\n\t* vm/sqUnixMain.c (ioRelinquishProcessorForMicroseconds): Don't\n\tnanosleep if events can be processed.\n\n\t* vm/aio.c (FPRINTF): Absolute and relative timestamps on debug\n\tmessages.\n\n\t* plugins/SocketPlugin/sqUnixSocket.c (FPRINTF): Absolute and\n\trelative timestamps on debug messages.\n\n\t* plugins/SocketPlugin/sqUnixSocket.c (socketOptions): Enable\n\tSO_REUSEPORT.\n\n2006-04-10  Ian Piumarta  <ian.piumarta@squeakland.org>\n\n\t* src: Regeneratated.\n\n2006-04-06  Ian Piumarta  <ian.piumarta@squeakland.org>\n\n\t* config/acinclude.m4: Define VM_BUILD_STRING.\n\n\t* config/config.h.in: Declare VM_BUILD_STRING.\n\n\t* vm/sqUnixMain.c (getAttribute): Answer VM_BUILD_STRING for\n\tattribute 1006.\n\n\t* sqMemoryAccess.h: Clean up recent edits.  Rename\n\tINLINING_WORKS_FOR_SMALL_ACCESSORS -> USE_INLINE_MEMORY_ACCESSORS.\n\n\t* plugins/UUIDPlugin/acinclude.m4: Require <uuid/uuid.h>.  Link\n\tagainst libuuid, if present.\n\n\t* plugins/UUIDPlugin/sqUnixUUID.c: Implemented.\n\n2006-04-05  Ian Piumarta  <ian.piumarta@squeakland.org>\n\n\t* UnixOSProcessPlugin.c (SQAIO_H): Rename aio.h -> sqaio.h.\n\n\t* vm-display-Quartz/sqUnixQuartz.m (noteKeyboardEvent): Set\n\tutf32code to 0, for now.\n\n\t* vm/sqUnixMain.c (ioGatherEntropy): Implemented.\n\n\t* plugins/SocketPlugin/sqUnixSocket.c (sqSocketBindToPort)\n\t(sqSocketSetReusable): Implemented.\n\n\t* vm/sqUnixMain.c (sqGetFilenameFromString): Copy input to\n\toutput.\n\n----------------------------------------------------------------\n\n2005-03-31  Ian Piumarta  <ian.piumarta@squeakland.org>\n\n\t* 3.8a-2 released.\n\n2005-03-31  Ian Piumarta  <ian.piumarta@squeakland.org>\n\n\t* platforms/Cross/plugins/SocketPlugin/SocketPlugin.h: 64-bit clean.\n\t* plugins/SocketPlugin/sqUnixSocket.c: 64-bit clean.\n\n----------------------------------------------------------------\n\n2005-03-29  Ian Piumarta  <ian.piumarta@squeakland.org>\n\n\t* Initial 64-bit merge complete.\n\n2005-03-29  Ian Piumarta  <ian.piumarta@squeakland.org>\n\n\t* platforms/Cross/plugins/Mpeg3Plugin/libmpeg/video/motion.c (mpeg3video_calc_dmv):\n\tDon't inline on Solaris.\n\n\t* platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c: Fix\n\tunaligned accesses to 64-bit members of SQFile.\n\n\t* platforms/Cross/vm/sqVirtualMachine.c: 64-bit cleaned.\n\n\t* platforms/Cross/vm/sqMemoryAccess.h: Conditionally include\n\t\"interp.h\"; warn obnoxiously if missing.\n\n\t* platforms/Cross/vm/sq.h: Thorough cleanup.\n\n\t* plugins/SecurityPlugin/sqUnixSecurity.c (ioInitSecurity):\n\tObey SQUEAK_USERDIR if set.\n\n\t* vm/sqUnixMemory.c (sqAllocateMemory): Answer an oop (not a\n\tpointer).\n\n\t* vm/sqPlatformSpecific.h: Allocation anwsers an oop (not a\n\tpointer); undefine prim dispatch nonsense left over from sq.h;\n\tdeclare alloca().\n\n\t* vm/sqUnixExternalPrims.c: Fix uses of sprintf() when snprintf()\n\tmissing.  Cosmetic improvements.\n\n\t* vm-sound-OSS/sqUnixSoundOSS.c: 64-bit cleaned.\n\n\t* config/Makefile.install (install-doc): Deal with compressed\n\tmanpages.\n\n\t* config/acinclude.m4 (ac_optflags): Compiler flags default to\n\t'-O'.\n\n\t* config/config.h.in: Set HAVE_ALLOCA, HAVE_ALLOCA_H, and\n\tHAVE_UNSETENV.\n\n\t* config/configure.ac: Detect alloca() and interp.h; add src/vm to\n\tINCLUDES.\n\n\t* config/gnuify: Use 64-bit types.\n\n\t* Cross/plugins/Mpeg3Plugin/libmpeg/video (mpeg3video_calc_dmv):\n\tdon't inline on Solaris.\n\n----------------------------------------------------------------\n\n2005-03-19  Ian Piumarta  <ian.piumarta@squeakland.org>\n\n\t* 3.7-7 Released.\n\n2005-03-19  Ian Piumarta  <ian.piumarta@squeakland.org>\n\n\t* config/configure.ac (INCLUDES): Version is 3.7-7.\n\n\t* config/acinclude.m4 (ac_optflags): Default optimisation flags are '-O'.\n\n\t* config/configure.ac (INCLUDES): Check for alloca().\n\n\t* plugins/UnixOSProcessPlugin/acinclude.m4: Check for libc::unsetenv().\n\n\t* plugins/AioPlugin/Makefile.inc (XCPPFLAGS): Search FilePlugin\n\tand SocketPlugin for includes.\n\n2005-03-17  Ian Piumarta  <ian.piumarta@hp.com>\n\n\t* src: Imported from generated sources.\n\t* README, README.SVN: Updated.\n\t* Makefile: Added for 'easy build'.\n\t* doc/HowToBuildFromSource.*: Updated URIs and revised for 'easy build' instructions.\n\t* doc/README.Sound,\n\t  npsqueak/npsqueak.c,\n\t  plugins/SqueakFFIPrims/00README,\n\t  vm-display-Quartz/Resources/SqueakHelp/SqueakHelp.html,\n\t  vm-display-fbdev/00_README.fbdev: E-mail and URL contact details updated.\n\t* config/configure.ac: Version is 3.7g-6.\n\n2005-03-16  Ian Piumarta  <ian.piumarta@hp.com>\n\n\t* README.SVN (added): Brief instructions for SVN source builds.\n\t* doc/squeak.1: Update URLs and email addresses.\n\n2005-03-15  Ian Piumarta  <ian.piumarta@hp.com>\n\n\t* vm/sqUnixMain.c (getImageName): Getter for global variable,\n\tFWIW.\n\n2005-03-09  Ian Piumarta  <ian.piumarta@hp.com>\n\n\t* vm/sqUnixEvent.c (recordMouseEvent): Clear windowIndex field in\n\tevents.\n\n\t* vm-display-Quartz/sqUnixQuartz.m (noteMouseEvent): Clear\n\twindowIndex field in events.\n\n2005-03-09  Bert Freudenberg <bert@squeakland.de>\n\n\t* platforms/unix/npsqueak: Check for image file in system and home\n\tdir.  Modifications to npsqueakrun, runs with bash, other shells\n\tuntested.  Make sure Squeak really gets killed.  Fixed browser\n\tcrash when closing plugin page.\n\n\t* platforms/unix/plugins/SecurityPlugin/sqUnixSecurity.c: Check\n\tfor SQUEAK_USERDIR, otherwise untrusted dir is 'My Squeak'.\n\n2005-03-09  Ian Piumarta  <ian.piumarta@hp.com>\n\n\t* platforms/unix/config/Makefile.install: NPSqueak (un)install\n\tchanges as suggested by Bert.\n\n\t* platforms/unix/config/configure.ac: Version 3.7b-6.\n\n2004-05-26  Ian Piumarta  <ian.piumarta@hp.com>\n\n\t* platforms/unix/plugins/SocketPlugin/sqUnixSocket.c (findOption):\n\tNul-terminate the converted option name before looking it up.\n\n2004-04-17  Ian Piumarta  <ian.piumarta@hp.com>\n\n\t* platforms/unix/vm/sqPlatformSpecific.h: Include <unistd.h>.\n\tDefine sqFTruncate().\n\n2004-04-12  Ian Piumarta  <ian.piumarta@hp.com>\n\n\t* platforms/unix/config/gnuify: Insert #error into output file if\n\tprocessing failed.\n\n\t* platforms/unix/vm-display-fbdev/Makefile.in ($(TARGET)): Remove\n\t$(X_LIBS) from the link command.\n\n2004-04-11  Ian Piumarta  <ian.piumarta@hp.com>\n\n\t* platforms/unix/config/gnuify: Escape all occurences of '{'\n\twithin regular expressions.\n\n2004-04-10  Ian Piumarta  <ian.piumarta@hp.com>\n\n\t* platforms/unix/config/gnuify: Remove gnu specifics.\n\n2004-04-06  Ian Piumarta  <ian.piumarta@inria.fr>\n\n\t* platforms/unix/config/configure.ac: Version is 3.7b-5.\n\n\t* platforms/unix/npsqueak/npsqueak.c: Add failureUrl to SqueakPlugin struct.\n\t(NPP_New): Check for and use explicit imageName.  \n\t(NPP_New): Check for explicit failureUrl.  \n\t(NPP_New): Check for access on imageName, set failureUrl if missing.\n\t(NPP_NewStream): Redirect to failureUrl if set.\n\t(Run): Do not start VM if failureUrl set.\n\n2004-04-04  Ian Piumarta  <ian.piumarta@inria.fr>\n\n\t* platforms/unix/vm-display-X11/sqUnixXdnd.c: New file.\n\tXDND-based drag-and-drop support.\n\n\t* platforms/unix/vm-display-X11/sqUnixX11.c: New option \"-noxdnd\"\n\twith attendant flag, command-line option, env var, and help entry.\n\tInclude \"sqUnixXdnd.c\" appropriately.\n\t(handleEvent): Pass SelectionNotify to dnd if enabled.\n\t(handleEvent): Pass ClientMessage to dnd if enabled.\n\t(initWindow): Add EnterWindowMask to stParent event_mask if dnd\n\tenabled.\n\t(initWindow): Call dndInitialise() if dnd enabled.\n\n2004-04-03  Ian Piumarta  <ian.piumarta@inria.fr>\n\n\t* platforms/unix/vm/dlfcn-dyld.c (dlsym): Don't automatically\n\treturn on error from NSIsSymbolNameDefinedInImage().\n\t(dlinit): Install error handlers for multiply-defined symbols to\n\tchoose definition from most recently loaded plugin.\n\n2004-04-02  Ian Piumarta  <ian.piumarta@inria.fr>\n\n\t* platforms/unix/vm-sound-NAS/Makefile.inc (PLIBS): Add -laudio to\n\tthe link command.\n\n\t* platforms/unix/config/acinclude.m4: Quote all macro names in\n\tAC_DEFUN()s.\n\n\t* platforms/unix/vm/sqGnu.h: Use __asm__() instead of asm().\n\n\t* platforms/unix/vm-display-fbdev/sqUnixFBDev.c (DEBUG): Only\n\tdefine if not already defined.\n\n\t* platforms/unix/vm-display-X11/sqUnixX11.c: Remove unused globals\n\t'current' and 'allRenderer'.\n\t(sendSelection): Clean up targets[] initialisation.\n\t(sendSelection): Clean up list[] initialisation.\n\t(getSelectionFrom): Remove unused variable 'xreturn'.\n\t(display_ioGLcreateRenderer): Remove unused variable 'index'.\n\t(printVisual): Reset gl error flag at end.\n\t(display_winOpen): Get saved window size only if debugging.\n\t(display_printUsage): Add new flag '-glxdebug'.\n\t(display_parseArgument): Add new flag '-glxdebug'.\n\n\t* platforms/unix/vm/sqUnixMain.c (ioRelinquishProcessorForMicroseconds):\n\tCalculate relinquish time only if a delay is pending.\n\n\t* platforms/unix/vm/sqUnixExternalPrims.c (ioFindExternalFunctionIn):\n\tSquash error messages for shutdownModule when sqIgnorePluginErrors\n\tis set.\n\n\t* platforms/unix/plugins/SocketPlugin/sqUnixSocket.c: Additional\n\tchecks for null privateSocketStruct.\n\n----------------------------------------------------------------\n\n2004-04-02  Ian Piumarta  <ian.piumarta@inria.fr>\n\n\t* 3.6-3 Released.\n\n2004-04-02  Ian Piumarta  <ian.piumarta@inria.fr>\n\n\t* vm-sound-MacOSX/sqUnixSoundMacOSX.c: Substantial rewrite for OS\n\t10.3.\n\n\t* vm-display-fbdev/sqUnixFBDevMousePS2.c: Increase all timeouts to\n\t100ms.\n\n\t* vm-display-fbdev/sqUnixFBDevKeyboard.c: Add diagnostic code.\n\n\t* vm-display-fbdev/sqUnixFBDevFramebuffer.c: Use accessors for all\n\tstruct members.  Fix problems when xres * bytesPerPix != bytes per\n\tline.\n\n\t* vm-display-fbdev/sqUnixFBDev.c: Add diagnostic code.\n\n\t* vm-display-X11/sqUnixX11.c (initCharmap): Fix prototype.\n\t(x2sqKeyInput): Print more useful diagnostic on setlocale()\n\tfailure.\n\n\t* vm-display-X11/Makefile.in (XINCLUDES): Include\n\t/usr/X11R6/include explicitly.\n\n\t* vm/sqUnixMain.c: Add runInterpreter (for display modules to\n\tinhibit entry to interpreter loop).  Reinstate -nomixer as a\n\tglobal option.\n\n\t* vm/sqUnixCharConv.c: Use Solaris encoding names on Sparc.\n\n\t* vm/glibc.h: Force all ctype operations to functions.  Alias\n\trealpath() to glibc version 2.0.\n\t\n\t* plugins/SocketPlugin/sqUnixSocket.c (sqSocketConnectionStatus):\n\tDon't check for connection closed by peer.\n\n2003-10-28  Ian Piumarta  <ian.piumarta@inria.fr>\n\n\t* platforms/unix/plugins/FilePlugin/sqUnixFile.c: Use ctime for\n\tcreationDate and mtime for modificationDate (consistent with 'ls\n\t-l').\n\n2003-09-16  Ian Piumarta  <ian.piumarta@inria.fr>\n\n\t* platforms/unix/doc/squeak.1: Updated for '-nointl',\n\tSQUEAK_NOINTL, and LC_CTYPE/LC_ALL.\n\n\t* platforms/unix/vm-display-X11/sqUnixX11.c: Make x2sqKey a\n\tfunction pointer.\n\t(x2sqKeyInput): Add support for international keyboards and\n\tdiacritical marks via dead keys.\n\t(display_parseEnvironment): Enable international support if either\n\tLC_CTYPE or LC_ALL is set in the environment.\n\t(display_parseEnvironment): SQUEAK_NOINTL disables international\n\tsupport.\n\t(display_parseArgument): '-nointl' disables international support.\n\t(display_printUsage): Add help for '-nointl' option.\n\n2003-09-05  Ian Piumarta  <ian.piumarta@inria.fr>\n\n\t* platforms/unix/vm-display-X11/sqUnixX11.c\n\t(display_parseArgument): Fix browserPipes argv indices.\n\t(display_parseArgument): Add missing comma in debug printf().\n\n2003-09-03  Ian Piumarta  <ian.piumarta@inria.fr>\n\n\t* platforms/unix/vm-display-Quartz/sqUnixQuartz.m (setUpDock):\n\tRemove warning for CPSEnableForegroundOperation, which always\n\tfails -- even when it succeeds.\n\n\t* platforms/unix/config/configure.ac: Version 3.6-beta11 3.6b-5411.\n\n\t* platforms/unix/vm/sqGnu.h (PRIM_DISPATCH): Changes for global struct.\n\t(GP_REG): Enable for PowerPC.\n\n\t* platforms/unix/plugins/PseudoTTYPlugin/sqUnixPseudoTTYPlugin.c\n\t(ptyForkAndExec): Add diagnostic DPRINTF().\n\n\t* platforms/unix/config/gnuify: Insert GP_REG for global struct in\n\tinterpret().  Recognise optional 'foo->' before primitiveIndex for\n\tprim dispatch rewrite.\n\n\t* platforms/unix/config/config.h.in: Add HAVE_LIBUTIL_H for pty\n\tplugin on FreeBSD.\n\n\t* platforms/unix/vm/sqUnixExternalPrims.c\n\t(ioFindExternalFunctionIn): Suppress warning for missing\n\t\"setInterpreter\" or \"getModuleName\".\n\n2003-09-02  Ian Piumarta  <ian.piumarta@inria.fr>\n\n\t* platforms/Cross/plugins/B3DAcceleratorPlugin/sqOpenGLRenderer.c:\n\tFix ARGB vs. RGBA problem and adhere to glColorMaterial\n\trecommendations.\n\n\t* platforms/unix/vm/sqUnixMain.c: Emergency dump conditional on\n\tIMAGE_DUMP (default is disasbled at compiled time).\n\n\t* platforms/unix/vm/sqUnixMain.c (ioProcessEvents): Create a\n\tsynchronous emergency image dump after SIGHUP received.\n\t(sigquit): Create an asynchronous emergency image dump when\n\tSIGQUIT received.  (Disabled at compile time by default.)\n\n\t* platforms/unix/vm-display-Quartz/sqUnixQuartz.m\n\t([Squeak -sendEvent:]): Add inverted CtrlKeyBit to modifiers for\n\tmouse wheel events.\n\n2003-09-01  Ian Piumarta  <ian.piumarta@inria.fr>\n\n\t* platforms/unix/config/configure.ac: Version 3.6-beta9.\n\n\t* platforms/Cross/plugins/SocketPlugin/SocketPlugin.h\n\t(sqSocketListenOnPortBacklogSizeInterface): Added.\n\n\t* platforms/unix/plugins/SocketPlugin/sqUnixSocket.c\n\t(sqSocketListenOnPortBacklogSizeInterface): Add i/f address\n\targument.\n\t(sqSocketListenOnPortBacklogSize): Punt to above with INADDR_ANY.\n\n2003-08-31  Ian Piumarta  <ian.piumarta@inria.fr>\n\n\t* platforms/unix/config/configure.ac: Version 3.6-beta8 3.6b-5402.\n\n\t* platforms/unix/config/Makefile.install (install-squeak) \n\t(uninstall-squeak): (Un)install app icons on Darwin.\n\n\t* platforms/unix/config/make.cfg.in (VM_APP_ICONS): Define\n\tVM_APP_ICONS.\n\n\t* platforms/unix/config/configure.ac: Define and export\n\tVM_APP_ICONS for Darwin.\n\n\t* platforms/unix/vm-display-Quartz/sqUnixQuartz.m: Remove explicit\n\tinit of dock icon.  Only setIcon if !fromFinder.\n\t([SqueakWindow -setIcon]): Try to find icon file in cwd, vmlibdir\n\tand resourcePath.\n\n\t* platforms/unix/config/inisqueak.in: Run the VM if Squeak is\n\talready installed.\n\n2003-08-30  Ian Piumarta  <ian.piumarta@inria.fr>\n\n\t* util/Squeak-vm.spec, util/Squeak-image.spec,\n\tutil/Squeak-sources.spec (%install): Install everything as\n\t'root.bin'.\n\n\t* platforms/unix/config/make.cfg.in (INSTALL_PROG, INSTALL_DATA):\n\tPass $(INSTALL_ARGS) to install program.\n\n\t* platforms/unix/config/configure.ac: Version 3.6-beta7.\n\n\t* platforms/unix/vm-display-Quartz/Info.plist.in: Modify icon\n\tassociations.\n\n\t* platforms/unix/vm-display-X11/sqUnixX11.c (_renderContext)\n\t(_renderWindow): Lvalue companions to render{Window,Context}().\n\n\t* platforms/unix/vm/sqUnixMain.c (jitArgs): Change // comments to\n\t/* */.\n\n\t* platforms/unix/plugins/SocketPlugin/sqUnixSocket.c (_PSP):\n\tLvalue companion to PSP().\n\n2003-08-23  Ian Piumarta  <ian.piumarta@inria.fr>\n\n\t* platforms/unix/config/Makefile.in ($(squeak)): Reduce verbiage.\n\n\t* platforms/unix/vm-display-X11/sqUnixX11.c (handleEvents): Don't\n\treset interrupt check counter.\n\n\t* platforms/unix/vm-display-Quartz/Resources/SqueakHelp/SqueakHelp.html:\n\tExplain where to put image/sources files.\n\n\t* platforms/unix/vm/aio.c (aioPoll): Bound total interrupted\n\tselect() waiting time by the original timeout.\n\n\t* platforms/unix/vm-display-Quartz/sqUnixQuartz.m\n\t([Squeak -applicationDidFinishLaunching:]): Don't reset the vmPath\n\twhen starting up.\n\n\t* platforms/unix/vm/sqUnixMain.c (recordFullPathForVmName): stat()\n\tthe result of readlink() to avoid embarassement on early linux\n\tkernels.\n\t(ioRelinquishProcessorForMicroseconds): Really sleep for < 1\n\ttimeslice then poll for i/o on Mach.\n\n\t* util/Makefile.rpm (%.spec): Unconditional rebuild.\n\n\t* platforms/unix/vm-display-X11/sqUnixX11.c\n\t(handleEvents): Return true if there are events waiting in the\n\tsqueak queue.\n\t(display_ioRelinquishProcessorForMicroseconds): Don't block if\n\thandleEvents returns true.\n\n\t* platforms/unix/vm-display-Quartz/sqUnixQuartz.m (qz2sqButton):\n\tEnable button mapping for 3-button mice.\n\n\t* platforms/unix/vm/sqUnixMain.c (recordFullPathForVmName): Read\n\tabsolute path of executable out of /proc on Linux.\n\n\t* platforms/unix/vm/sqUnixExternalPrims.c: vmLibDir moved to sqUnixMain.\n\n2003-08-22  Ian Piumarta  <ian.piumarta@inria.fr>\n\n\t* platforms/unix/vm/sqUnixMain.c (ioRelinquishProcessorForMicroseconds):\n\tCap the sleep time if it's larger than the time to next wakeup tick.\n\t(ioMSecs): Resync lowResMSecs on every call.\n\n2003-08-21  Ian Piumarta  <piumarta@felina.inria.fr>\n\n\t* platforms/unix/doc/squeak.1: Add entries for -vtlock/-vtswitch\n\tand equivalent environment variables.\n\n\t* platforms/unix/vm-display-fbdev/sqUnixFBDev.c:\n\t* platforms/unix/vm-display-fbdev/sqUnixFBDevKeyboard.c: Add\n\tsupport for vt switching.\n\n\t* platforms/unix/doc/squeak.1: Update '-kbmap' for changed keymap\n\tbehaviour.\n\n\t* platforms/unix/vm-display-fbdev/sqUnixFBDev.c\n\t(display_printUsage): Update printUsage() for changed keymap\n\tbehaviour.\n\n\t* platforms/unix/vm-display-fbdev/sqUnixFBDevKeymap.c (kb_initKeyMap):\n\tLoad default keymap from kernel rather than from fixed data.\n\n2003-08-20  Ian Piumarta  <ian.piumarta@inria.fr>\n\n\t* platforms/unix/vm/glibc.h: Eliminate glibc2.3 dependencies on\n\ttoupper() and realpath().\n\n\t* platforms/unix/config/config.h.in: Include \"glibc.h\" if\n\tHAVE_FEATURES_H.\n\n\t* platforms/unix/config/configure.ac: Check for <features.h>.\n\n\t* platforms/unix/plugins/SocketPlugin/sqUnixSocket.c: Set socket\n\tfd to -1 on close.  Don't attempt to re-close sockets with fd < 0.\n\n\t* platforms/unix/vm/aio.c (aioEnable, aioHandle, aioSuspend,\n\taioDisable): Ignore descriptors < 0.\n\n\t* platforms/unix/vm-display-fbdev: Framebuffer display driver added.\n\n2003-08-14  Ian Piumarta  <ian.piumarta@inria.fr>\n\n\t* src/plugins/XDisplayControlPlugin/XDisplayControlPlugin.c:\n\tGenerate new plugin source.\n\n\t* src/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c:\n\tRegenerate source from version 3.1.1.\n\n\t* platforms/unix/plugins/XDisplayControlPlugin/acinclude.m4:\n\tDisable plugin when X is not available.\n\n\t* platforms/unix/plugins/XDisplayControlPlugin/Makefile.inc (XCPPFLAGS):\n\tAdd X includes and libs to compile/link command.\n \n\t* platforms/unix/plugins/UnixOSProcessPlugin/acinclude.m4:\n\tDeleted.\n\n\t* platforms/unix/plugins/UnixOSProcessPlugin/Makefile.inc (XCPPFLAGS):\n\tRemove X includes and libs.\n\n\t* platforms/unix/vm/sqUnixExternalPrims.c (tryLoading): Don't skip\n\tnon-existent files (for default search).  Only print dlerror\n\tmessage when file exists.\n\n2003-08-14  Ian Piumarta  <piumarta@ina.inria.fr>\n\n\t* platforms/unix/doc/squeak.1: Update for new options and module\n\tsystem.\n\n\t* platforms/unix/npsqueak/Makefile (npsqueak.so, npsqueakrun,\n\tnpsqueakregister): Use explicit first dependency rather than $<\n\t(for BSD make).\n\n\t* platforms/unix/vm-display-X11/sqUnixX11.c: Provide PRIMARY\n\trather than CLIPBOARD for Squeak selection when requestor clears\n\tCUT_BUFFER0.\n\n\t* platforms/unix/vm/sqUnixExternalPrims.c (ioLoadModule): Search X11\n\tlibrary path for plugins.\n\t(ioLoadModule): Search build location for plugins.\n\n2003-08-08  Ian Piumarta  <piumarta@cartman.inria.fr>\n\n\t* platforms/unix/plugins/B3DAcceleratorPlugin/Makefile.inc\n\t(XLDFLAGS): Pass location of X libs to link command.\n\n\t* platforms/unix/vm-display-Quartz/Info.plist.in\n\t(CFBundleExecutable): Fix capitalization to avoid confusing the\n\tFinder on case-sensitive filesystems.\n\n2003-08-08  Ian Piumarta  <ian.piumarta@inria.fr>\n\n\t* platforms/unix/plugins/UnixOSProcessPlugin/Makefile.inc\n\t(XCPPFLAGS): Pass location of X includes to compile command.\n\t(XLDFLAGS): Pass location of X libraries to link command.\n\n\t* platforms/unix/vm-display-X11/sqUnixX11.c (sendSelection): Use\n\tprecomputed value of targetProperty in call to XChangeProperty().\n\n\t* platforms/unix/vm/sqUnixMain.c: Add support for '-vm' option and\n\tSQUEAK_VM environment variable.  Add support for default module\n\tdetection and loading.\n\n2003-08-07  Ian Piumarta  <ian.piumarta@inria.fr>\n\n\t* platforms/unix/config/make.ext.in (LINK): Use -rpath $(plgdir)\n\tinstead of $(libdir) to get correct install_name on OSX.\n\n\t* platforms/unix/vm/acinclude.m4 (AC_ICONV): Disable check for\n\tlibiconv on Mac OS X to avoid pollution from /usr/local/lib.\n\n\t* platforms/unix/config/configure.ac (AC_CHECK_FUN(dlopen)): Check\n\tfor _dyld_present before dlopen to avoid unwanted import of\n\tdlcompat on Mac OS X.\n\n\t* platforms/unix/config/acinclude.m4 (AC_C_DOUBLE_ORDER): Fix\n\t\"improved\" test so that it _really_ works and identifies\n\tbig-endian machines correctly.  (Never, _ever_ trust an\n\tendian-sensitive function contributed by an Intel user! ;)\n\n2003-08-07  Ian Piumarta  <piumarta@cartman.inria.fr>\n\n\t* platforms/unix/config/acinclude.m4 (AC_C_DOUBLE_ORDER): Use\n\timproved test that isn't fooled by over-zealous compiler\n\toptimisations.\n\n\t* platforms/unix/vm-display-X11/sqUnixX11.c: Numerous changes from\n\tNed Konz to add support for COMPOUND_TEXT and fix some problems\n\twith UTF8_STRING.\n\n\t* platforms/unix/vm/sqUnixCharConv.c: Numerous changes from Ned\n\tKonz to improve UTF-8 handling.\n\n\t* platforms/unix/plugins/SocketPlugin/sqUnixSocket.c\n\t(socketValid): Fail validation if thisNetSession is zero.\n\n\t* platforms/unix/vm/sqUnixMain.c (sigsegv): Call abort() after\n\tsegv, to leave a core for debugging.\n\n----------------------------------------------------------------\n\n2003-03-04  Ian Piumarta  <ian.piumarta@inria.fr>\n\n\t* 3.4-1 Released.\n\n2002-12-01--2003-08-07  piumarta  <piumarta@emilia.inria.fr>\n\t\n\t* platforms/unix/*/*: First pass at refactoring sound and display\n\tcode into runtime-loadable modules.\n\n2002-12-01  piumarta  <piumarta@calvin.inria.fr>\n\n\t* platforms/unix/config/mkacinc: Add `-dlopen lib' to library\n\tlist.\n\n2002-12-01  Ian Piumarta  <piumarta@calvin.inria.fr>\n\n\t* platforms/unix/vm/dlfcn-dyld.c: Added.\n\n\t* platforms/unix/config/config.h.in: Add HAVE_DYLD, DARWIN.\n\n\t* platforms/unix/config/configure.ac: Remove check for dlfcn.h.\n\tCheck for _dyld_present in libc and define HAVE_DYLD.  Checking\n\tfor dlfcn.h and -ldl only if !HAVE_DYLD.  Define DARWIN if\n\tcompiling on Darwin.\n\n\t* platforms/unix/config/make.cfg.in (SOFLAGS): Substituted by\n\tconfigure.\n\n\t* platforms/unix/vm/sqUnixExternalPrims.c: Include dlopen wrappers\n\tfor dyld on Mach.  Fix prototype for dlsym().  Provide definition\n\tfor RTLD_GLOBAL if missing.\n\t(tryLoading): Check for dir before calling dlopen().\n\t(tryLoading): Make prefix/suffix selection be table driven.\n\t(ioLoadModule): Logic simplified (prefix/suffix now handled by\n\ttryLoading).\n\n\t* platforms/unix/vm/sqXWindow.c (imageNotFound): Fix multi-line\n\tstring literals.\n\n2002-11-25  Ian Piumarta  <piumarta@dilbert.inria.fr>\n\n\t* platforms/unix/plugins/DropPlugin/sqUnixDragDrop.c:\n\tAdded missing stubs for sqSec*().\n\n2002-11-25  Bert Freudenberg  <bert@isg.cs.uni-magdeburg.de>\n\n\t* platforms/unix/plugins/B3DAcceleratorPlugin/sqUnixOpenGL.c:\n\tNew version, updated for Croquet.\n\n2002-10-27  piumarta  <ian.piumarta@inria.fr>\n\n\t* platforms/unix/config/verstamp: Remove Apple-specific garbage\n\tfrom gcc version string on Darwin.\n\n2002-10-26  piumarta  <ian.piumarta@inria.fr>\n\n\t* platforms/unix/vm/sqUnixMozilla.c (browserProcessCommand): Fix\n\tsignature to avoid link errors on BSD.\n\n\t* util/Makefile.dist (BINREL): Use `-nox' suffix on tarball if\n\tconfigured --without-x.\n\n\t* platforms/unix/config/configure.ac: Define and substitute `NOX'\n\tas `-nox' when building --without-x, empty otherwise.\n\t(disabled_plugins): Disable UnixOSProcessPlugin when building\n\t--without-x.\n\n\t* platforms/unix/config/make.cfg.in (NOX): Import definition of\n\tNOX from configure.\n\n\t* platforms/unix/config/Makefile.in: Define `squeak' as `squeak'\n\tor `squeak-nox'.  Use `$(squeak)' instead of `squeak' throughout.\n\n\t* platforms/unix/config/Makefile.install: Use $(squeak) instead of\n\t`squeak'.\n\n2002-10-26  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* platforms/unix/plugins/SoundPlugin/sqUnixSoundSun.c:\n\t* platforms/unix/plugins/SoundPlugin/sqUnixSoundNAS.c:\n\t* platforms/unix/plugins/SoundPlugin/sqUnixSound.c:\n\t* platforms/unix/plugins/SerialPlugin/sqUnixSerial.c:\n\t* platforms/unix/plugins/SecurityPlugin/sqUnixSecurity.c:\n\t* platforms/unix/plugins/MIDIPlugin/sqUnixMIDI.c:\n\t* plugins/JoystickTabletPlugin/sqUnixJoystickTablet.c:\n\t* platforms/unix/plugins/FileCopyPlugin/sqUnixFileCopyPlugin.c:\n\t* platforms/unix/plugins/FilePlugin/sqUnixFile.c:\n\t\tSystematically include generated plugin header.\n\t\n\t* platforms/unix/plugins/FilePlugin/sqUnixFile.c (dir_Lookup):\n\tType of sizeIfFile is squeakFileOffsetType not int.  (Many thanks\n\tto Alain Fischer for finding this.)\n\n2002-10-24  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* platforms/unix/vm/sqUnixExternalPrims.c: Fix several DPRINTF()s\n\tthat failed to specify the stream.\n\t(ioFindExternalFunctionIn): If set, prepend VM_DLSYM_PREFIX to\n\tlookupName.\n\n\t* platforms/unix/config/configure.ac: On Darwin add\n\t`-no-cpp-precomp' to CFLAGS, disable npsqueak, and define\n\tVM_DLSYM_PREFIX to \"_\".\n\n\t* platforms/unix/config/config.h.in: Add VM_DLYSM_PREFIX for\n\ttargets that require `_' before dlsym names (i.e., Darwin).\n\n\t* platforms/unix/config/config.guess,\n\t  platforms/unix/config/config.sub: updated to autoconf-2.54.\n\n2002-10-24  root  <piumarta@emilia.inria.fr>\n\n\t* /usr/share/aclocal/libtool.m4 (archive_cmds for darwin): Remove\n\tdouble quotes around \"x$module\" (allowing libtool to recognise\n\t`-module' flag when building loadable modules on Darwin).\n\n2002-10-23  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* platforms/unix/vm/sqXWindow.c: Remove spurious `#' from front of\n\t__snprintf extern declaration.\n\n\t* platforms/unix/plugins/SocketPlugin/sqUnixSocket.c\n\t(MAXHOSTNAMELEN): If not defined after including netdb.h (nasty,\n\twicked, evil Solaris) then define it as 256.\n\n2002-10-20  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* util/Squeak-vm.spec:\n\t(AutoReqProv): Inhibit automatic dependency generation (too much\n\tnoise from plugins).\n\t(Requires): Add (lib{X11,Xext,m}) as explicit dependencies.\n\n\t* src/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c: Updated\n\tto 3.0.2.\n\n2002-10-17  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* platforms/unix/config/Makefile.install (install-npsqueak): Add\n\tnpsqueak dependency to force build if required.\n\n2002-10-16  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* platforms/unix/npsqueak/npsqueakrun.in: Add version directory to\n\t`File' comment.\n\n\t* platforms/unix/vm/sqXWindow.c: Remove `secure' and the\n\tcorresponding option and env var.\n\n\t* platforms/unix/doc/squeak.1: Remove `-secure'.\n\n----------------------------------------------------------------\n\n2002-10-16  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* 3.2-5 Released.\n\n2002-10-16  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* platforms/unix/vm/sqXWindow.c:\n\tAdd useItimer (enabled by default, -notimer disables) and iconified.\n\t(SetUpWindow): Set wmHint IconicState if iconified.\n\t(ioLowResMSecs): Check useItimer.\n\t(SetUpTimers): Check useItimer.\n\t(usage): Add -iconic, -notimer.\n\t(ParseEnvironment): Add SQUEAK_ICONIC, SQUEAK_NOTIMER.\n\t(ParseArguments): Add -iconic, -notimer.\n\n\t* platforms/unix/doc/squeak.1: Add -iconic and -notimer.\n\n\t* platforms/unix/plugins/SqueakFFIPrims/sqUnixFFI.c\n\t(FFI_TYPE_STRUCT): Define if neccessary.  (Value is not exported\n\tfrom ffi.h in libffi-2.)\n\n\t* platforms/unix/plugins/SqueakFFIPrims/acinclude.m4: Added.\n\n2002-09-29  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* platforms/unix/vm/sqXWindow.c (ioSetFullScreen): Resize stWindow\n\t(not sqParent) for browser's benefit.\n\n2002-09-27  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* platforms/unix/config/Makefile.install (install-npsqueak): new\n\ttarget.\n\n\t* platforms/unix/config/Makefile.in (npsqueak): new target.\n\n\t* platforms/unix/config/configure.ac: add `--with-browser' setting\n\tNPSQUEAK_SO appropriately.\n\n\t* platforms/unix/config/configure.ac: renamed from configure.in to\n\tkeep debian's autoconf happy.\n\n\t* platforms/unix/config/acinclude.m4 (AC_GNU_INTERP): force\n\tAWK=gawk if --with-gnu-awk.\n\n\t* platforms/unix/config/config.h.in: additional undefines for\n\tHAVE_[__]SNPRINTF.\n\n\t* platforms/unix/vm/sqXWindow.c (SetUpWindow): Create initial\n\twindow with extent = screen extent when -fullscreen specified.\n\n2002-09-26  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* platforms/unix/vm/sqXWindow.c (SetUpWindow): `-iconic' option\n\tsets initial_state WM hint to Iconic.\n\n2002-09-16  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* platforms/unix/vm/aio.c (aioSuspend,aioDisable): remove check\n\tfor null descriptor (it's a valid fd).\n\n2002-08-21  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* platforms/unix/plugins/SoundPlugin/sqUnixSoundOSS.c (output):\n\tLoop until write() completes (for broken alsa drivers).\n\t(Suggested by Lex Spoon.)\n\n2002-08-03  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* platforms/unix/vm/sqXWindow.c (forgetXDisplay): aioDisable the X\n\tfd before closing it.  (From Dave Lewis.)\n\n2002-07-17  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* platforms/unix/vm/sqGnu.h: Define all undefined XX_REGs to be\n\tempty to prevent build errors on unsupported platforms.  (Thanks\n\tto Tommy Thorn for spotting the problem.)\n\n\t* platforms/unix/config/*: Many diverse changes for autoconf 2.53\n\tand libtool 1.4.2.\n\t\n2002-07-12  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* platforms/unix/plugins/PseudoTTYPlugin/sqUnixPseudoTTYPlugin.c\n\t(validate): Fail primitive if f->state is 0.\n\t\n\t* platforms/unix/plugins/AsynchFilePlugin/sqUnixAsynchFile.c\n\t(validate): Fail primitive if f->state is 0.\n\n----------------------------------------------------------------\n\n2002-07-11  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* 3.2-4 Released.\n\n2002-07-11  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* platforms/unix/plugins/PseudoTTYPlugin/openpty.h: Include\n\tlibutil.h if present (FreeBSD's name for util.h).\n\n\t* platforms/unix/plugins/PseudoTTYPlugin/acinclude.m4: Use test -r\n\ton /dev/ptmx.  Check for `libutil.h'.  (Thanks to Eric Dorman.)\n\n2002-07-10  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* platforms/unix/plugins/AsynchFilePlugin/sqUnixAsynchFile.c\n\t(asyncFileAttach): Broken out from asyncFileOpen() for use by\n\tPtyPlugin.\n\n\t* platforms/unix/plugins/AsynchFilePlugin/sqUnixAsynchFile.h:\n\tExport asyncFileAttach().\n\n\t* platforms/unix/plugins/PseudoTTYPlugin/openpty.h: Provide local\n\timplementations of openpty() and login_tty() if not supported by\n\tlibc.\n\n\t* platforms/unix/plugins/PseudoTTYPlugin/sqUnixPseudoTTYPlugin.c:\n\tVarious portability fixes.  Use openpty() if available.  Avoid use\n\tof nanosleep.  ptyFork() and ptyClose() perform all the work of\n\tAsyncFile creation and destruction.\n\n----------------------------------------------------------------\n\n2002-07-09  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* 3.2-3 Released.\n\n2002-07-09  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* platforms/unix/vm/sqXWindow.c: Various stubs to allow OSProcess\n\tto (mostly) work when compiled -DHEADLESS.\n\t\n\t* platforms/unix/vm/sqXWindow.c (ioGetWindow, ioGetDisplay):\n\timplemented.\n\n\t* platforms/unix/plugins/B3DAcceleratorPlugin/sqUnixOpenGL.c\n\t(glInitialize): Retrieve stDisplay and stWindow via ioGet\n\tfunctions.\n\n2002-07-08  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* platforms/unix/plugins/SocketPlugin/sqUnixSocket.c\n\t(acceptHandler, sqSocketCreate...): Remove OOBINLINE hack.\n\n\t* platforms/unix/plugins/SocketPlugin/sqUnixSocket.c\n\t(sqSocketSetOptions...): Interpret option as a string and convert\n\tit to an int before setsockopt().\n\n\t* platforms/unix/config/Makefile.in (squeak.1): Avoid $< in rule\n\tfor squeak.1.\n\n\t* platforms/unix/vm/sqUnixMozilla.c (primitivePluginBrowserReady):\n\tFail primitive if not running in browser.  (Eliminates infuriating\n\tthree second pause on return from snapshot.)\n\n\t* platforms/unix/vm/sqXWindow.c: Fix conditional compilation in\n\tvarious places -DHEADLESS.  (Many thanks to Colin Putney.)\n\n\t* platforms/unix/vm/osExports.c (os_exports): Don't export browser\n\tfunctions if compiling -DHEADLESS.\n\n\t* platforms/unix/config/make.int.in: Run RANLIB on final archive.\n\n2002-07-06  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* platforms/unix/plugins/PseudoTTYPlugin/sqUnixPseudoTTYPlugin.c:\n\tImplemented.\n\n\t* platforms/unix/plugins/AsynchFilePlugin/sqUnixAsynchFile.c:\n\tImplemented.\n\n2002-07-01  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* platforms/unix/plugins/SocketPlugin/sqUnixSocket.c (acceptHandler,\n\tsqSocketCreateNetTypeSocketTypeRecvBytesSendBytesSemaIDReadSemaIDWriteSemaID):\n\tSet option SO_OOBINLINE on new sockets (for the benefit of telnet,\n\twhich needs to pick up IAC as urgent-mode data).\n\t(dataHandler): Read (and discard) out-of-band data on exception,\n\tleaving the socket status alone.\n\n----------------------------------------------------------------\n\n2002-06-10  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* 3.2-2 Released.\n\n2002-06-10  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* platforms/unix/vm/sqXWindow.c (handleEvent): Add missing break\n\tin SelectionClear case.  (Thanks to Ned Konz.)\n\t(getAttribute): Return full path of VM for sysAttr(0).  [Thanks\n\talso to Ned Konz for spotting this.]\n\n\t* platforms/unix/vm/sqXWindow.c (recordKeyboardEvent): modifiers\n\tto use passed as argument (for mouse wheel).\n\t(handleEvent): Mouse wheel uses inverted ctrl key modifier.\n\n2002-06-08  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* platforms/unix/config/Makefile.install (install-image): install\n\tcompressed image/changes files.\n\timage/changes and inisqueak installed in imgdir.\n\n\t* platforms/unix/config/inisqueak.in: use compressed image/changes\n\tfiles.\n\timage/changes installed in imgdir.\n\n\t* platforms/unix/vm/sqPlatformSpecific.h: include <sys/types.h> to\n\tpick up off_t.\n\n----------------------------------------------------------------\n\n2002-06-07  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* 3.2-1 Released.\n\n2002-06-06  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* platforms/unix/doc/squeak.1: image/changes files in version\n\tindependent libdir.\n\n\t* platforms/unix/config/verstamp: Use abbreviated date in ISO 8601\n\tformat.  (Requires the local plarform have a POSIX-compliant `date'\n\tcommand.)\n\n2002-06-03    <piumarta@emilia.inria.fr>\n\n\t* platforms/unix/doc/squeak.1: Add `-plugins' option.\n\n\t* platforms/unix/vm/sqUnixExternalPrims.c (ioLoadModule): If set, try\n\tloading plugins through `squeakPlugins' before the default locations.\n\n\t* platforms/unix/vm/sqXWindow.c: Add option `-plugins'.\n\n2002-05-31    <piumarta@emilia.inria.fr>\n\n\t* sqXWindow.c (x2sqModifier): Ignore mod[345] to avoid possible\n\tnumLock problems.\n\n2002-05-27    <piumarta@emilia.inria.fr>\n\n\t* squeak.1: Add `-noevents' (missing) and `-nomixer' (new).\n\n\t* sqUnixSoundNAS.c (snd_Start): Select sound format based on byte\n\torder of the local machine.\n\n2002-05-26    <piumarta@emilia.inria.fr>\n\n\t* acinclude.m4:\n\tClean up checks for audio support.\n\tCheck for native support (oss, sun) before network support (nas).\n\n2002-05-25  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* sqGnu.h: CB_REG defined for intel when gcc >= 2.95.\n\n2002-05-22  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* sqUnixSoundOSS.c (outHandler): Defined only when playSema\n\tenabled.\n\t(snd_Start): Fail primitive when semaIndex > 0 and play semaphore\n\tdisabled.  Do not call aioEnable() when playSema disabled.\n\t(snd_AvailableSpace): Only call aioHandle() when playSema enabled.\n\n2002-05-21  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* sqUnixSocket.c (sqSocketReceiveDataAvailable): Change socket\n\tstate to OtherEndClosed on EOF.\n\t(dataHandler): Change socket state to OtherEndClosed on EOF.\n\n2002-05-17  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* sqUnixSoundOSS.c: Rewritten from scratch.\n\n\t* sqUnixSound.c: Broken into separate files:\n\t`sqUnixSound{OSS,NAS,Sun,None}.c'.\n\n2002-05-12  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* sqXWindow.c (ioShowDisplay): Clamp affected{R,B} at\n\t{width,height} instead of {width,height} - 1.\n\n2002-05-09  Ian Piumarta  <piumarta@felina.inria.fr>\n\n\t* sqXWindow.c (ioBeep): Check for server connection before trying\n\tto ring the bell.\n\n\t* sqUnixSound.c: New NAS/OSS recording code from Lex Spoon.\n\t(Modified for aio compatiblity.)\n\n\t* sqUnixExternalPrims.c (tryLoading): Fail silently when\n\tattempting to load a plugin that names a directory. [sf]\n\n\t* squeak.1: Remove `-swapmod'.\n\n\t* sqXWindow.c: Remove `-swapmod'.\n\t(x2sqModifier): All modifiers map to Command.\n\n\t* sqXWindow.c (ioGetButtonState, recordMouseEvent): Honour\n\t`-swapbtn' for Ctrl/Command-RedButton clicks.\n\n\t* squeak.1: Default image name is `squeak.image'.\n\n\t* sqXWindow.c (ParseEnvironment, usage): Default image name is\n\t`squeak.image'. [sf]\n\n\t* sqXWindow.c (ioFormPrint): Print form to PostScript printer\n\tusing pnmtops. [sf]\n\n2002-05-08  Ian Piumarta  <piumarta@emilia.inria.fr>\n\n\t* sqXWindow.c: Total rewrite of window resizing to fix\n\tincorrect assumptions about the behaviour of the image.\n\n\t* sqXWindow.c (SetUpWindow): Calculate initial window geometry\n\tbased on parent window if running in a browser.  (Avoids X\n\tprotocol errors.)\n\n\t* sqUnixSecurity.c (ioGetSecureUserDirectory): Fail primitive if\n\tsecurity not initialised.\n\n\t* sqXWindow.c (ioScreenSize): Answer size of saved\n\twindow when not connected to a display. [sf]\n\n2002-05-07  Ian Piumarta   <piumarta@emilia.inria.fr>\n\n\t* sqXWindow.c (handleEvent): Fixed possible infinite recursion\n\t(observed by Lex Spoon) in completion event handling.\n\n\t* sqXWindow.c: Increase default heap size to 48MB.\n\n\t* sqUnixMozilla.c (browserPostURLRequest): Comment out unused\n\tfunction to avoid compilation errors.\n\n\t* sqUnixAsynchFile.c: Remove stale security code.\n\t* sqUnixSocket.c: Remove stale security code.\n\t* sqUnixFile.c: Remove stale security functions.\n\t* sqUnixSecurity.c: New version from Bert Freudenberg. [sf]\n\n\t* sqUnixFile.c:\tRemove stale browser support code.\n\t* sqXWindow.c: Support for new browser plugin. [sf]\n\n\t* sqUnixFile.c: Include <errno.h> and <string.h>. [sf]\n\n\t* sqUnixFile.c (dir_Lookup): Retry readdir() on interrupted system\n\tcall. [sf]\n\n\t* sqXWindow.c: Handle the CLIPBOARD selection. [sf]\n\n\t* sqXWindow.c (SetUpWindow): Extra bit in valuemask for parent\n\twindow to avoid errors on Sun. [sf]\n\n2002-05-07  Ian Piumarta   <piumarta@emilia.inria.fr>\n\n\t* sqUnixSocket.c: Immediate detection of remote reset on\n\tconnection.\n\t\n\t* sqUnixSocket.c (dataHandler): Don't signal the connection\n\tsemaphore on error.\n"
  },
  {
    "path": "vm/src/from_squeak/unix/Makefile",
    "content": "# Last edited: 2005-03-16 22:47:32 by piumarta on squeak.hpl.hp.com\n\nall : .force\n\t[ -d bld ] || mkdir bld\n\t[ -f bld/Makefile ] || ( cd bld; ../config/configure; )\n\t( cd bld; $(MAKE) $(MFLAGS); )\n\ninstall : all\n\t( cd bld; $(MAKE) $(MFLAGS) install; )\n\nclean : .force\n\t/bin/rm -rf bld\n\n.force :\n"
  },
  {
    "path": "vm/src/from_squeak/unix/README",
    "content": "Building Unix Squeak\n--------------------\n\nFull documentation can be found in:\n\n   platforms/unix/doc/HowToBuildFromSource.{txt,html,ps,pdf}\n\nFor the impatient:\n\n1. Change to the 'platforms/unix' directory (if you aren't already\n   there) and type 'make' to build the VM and plugins:\n\n        cd platforms/unix\n        make\n\n2. Install the VM, plugins, man pages and documentation (as root,\n   note the 'sudo' command to gain superuser privileges):\n\n\tsudo make install\n\n3. If you haven't used Squeak before, read the manual:\n\n\tman squeak\n\n4. Enjoy!\n\nNote: The latest documentation and releases are available from:\n\n   http://squeakvm.org/\n\n----\nLast edited: 2006-04-10 12:55:06 by piumarta on emilia.local\n"
  },
  {
    "path": "vm/src/from_squeak/unix/README.CMake",
    "content": "Building Unix Squeak from SVN (Subversion) Sources using CMake\n==============================================================\n\nExecutive summary\n-----------------\n\n  svn co http://squeakvm.org/squeak/trunk squeak\n  cd squeak\n  mkdir bld\n  cd bld\n  ../platforms/unix/cmake/configure\n  make\n\nDetailed instructions\n---------------------\n\n1 Checkout the sources.\n \n    svn co http://squeakvm.org/squeak/trunk squeak\n \n  This will create a directory called 'squeak'.  Descend into it with\n  'cd squeak'.\n\n2 You can use the supplied interpreter sources in 'platforms/unix/src'\n  or you can generate your own.  If you generate your own then I\n  recommend you place then in a directory next to 'platofrms/unix/src'\n  and call them something else, 'platforms/unix/vmm' for example.\n\n3 Create a build directory.  This can be anywhere you want.  In this\n  README we will 'mkdir bld' to create the build directory in\n  'squeak', next to the 'platforms' directory.\n\n  Building directly in the source tree (starting in platforms/unix)\n  should work but is UNTESTED and UNSUPPORTED and discrouraged by\n  CMake people too.\n\n4 Descend into your build directory.  'cd bld'.\n\n5 Configure your build: '../platforms/unix/cmake/configure'.  (You can\n  pass arguments to this script; run 'cmake/configure --help' to\n  see a list of them.)\n\n6 Build it: just type 'make', sit back, and enjoy the pretty colours\n  (assuming your terminal supports them).  This should leave you with\n  an executable called 'squeak' in your build directory.\n\n7 You can test the binary in-place by running 'squeak' with a path to\n  an image file as argument; e.g: ./squeak ../../squeak.image\n\n8 If it works, install it by typing 'make install' in your build\n  directory.\n\n9 If you modify the sources you can safely type 'make' in the build\n  directory and everything affected will be rebuilt.  If you want to\n  reconfigure and rebuild only affected files, type 'cmake .' and then\n  'make'.  If you want to rebuild everything type 'make clean' and\n  then 'make'.  If you want to reconfigure everything and then rebuild\n  everything just delete your build directory and start again from\n  step 3.\n\n----\nLast edited: 2009-08-30 23:56:00 by piumarta on ubuntu.piumarta.com\n"
  },
  {
    "path": "vm/src/from_squeak/unix/README.SVN",
    "content": "Building Unix Squeak from SVN (SubVersion) Sources\n==================================================\n\n\nPart 0 -- Stuff you have to do, regardless\n------------------------------------------\n\n0.1 Checkout the sources (duh).\n \n        $ svn co http://squeakvm.org/squeak/trunk squeak\n \n    This will checkout a directory called \"squeak\".\n\n\nPart 1 -- Building the EASY way\n-------------------------------\n\n1.0 You just completed step 0.1.\n\n1.1 Everything you need is already there.  Just descend\n    into the squeak/platforms/unix directory and type\n    'make', like this:\n\n        $ cd squeak/platforms/unix\n        $ make\n\n    This will create a build directory called 'bld' and, if\n    nothing goes wrong, will build a VM and a set of plugins\n    in it.  Just type 'sudo make install' to install it all\n    in /usr/local/*.\n\n\nPart 2 -- Building the HARD way\n-------------------------------\n\n2.0 You just completed step 0.1.\n\n2.1 If you are generating your own interpreter sources from\n    within the Squeak image, put them in 'squeak/src'.\n\n2.2 You can now go back to step 1.1 and the build will use\n    your new 'squeak/src' instead of the built-in 'src'\n    directory.  Or you can continue to do it the traditional\n    way...\n\n2.3 Create a build directory in 'squeak' and descend into it.\n\n        $ cd squeak\n        $ mkdir bld\n        $ cd bld\n    \n2.4 Configure the build by running the 'configure' script\n    in the 'platforms/unix/config' directory:\n\n        $ ../platforms/unix/config/configure --with-src=srcNN\n\n    where srcNN is src32 or src64, depending on whether you\n    want to build a 32- or 64-bit VM.\n\n2.5 Build the VM and plugins and (if you like) install them.\n\n        $ make\n        $ sudo make install\n\n----\nLast edited: 2006-04-05 10:44:30 by piumarta on emilia.local\n"
  },
  {
    "path": "vm/src/from_squeak/unix/cmake/Fixes.cmake",
    "content": "# RETURN ()\n\n# # Some binary distrbutions are built badly.  Attempt to work around only those bugs that we need to fix.\n# # \n# # Last edited: 2009-08-15 12:27:17 by piumarta on emilia-2.local\n\n# IF (NOT DEFINED CMAKE_FIND_LIBRARY_PREFIXES)\n#     IF (UNIX)\n# \tSET (CMAKE_FIND_LIBRARY_PREFIXES lib)\n#     ENDIF (UNIX)\n# ENDIF (NOT DEFINED CMAKE_FIND_LIBRARY_PREFIXES)\n\n# IF (NOT DEFINED CMAKE_FIND_LIBRARY_SUFFIXES)\n#     IF (UNIX)\n#         IF (APPLE)\n#             SET (CMAKE_FIND_LIBRARY_SUFFIXES .a .dylib)\n#         ELSE (APPLE)\n#             SET (CMAKE_FIND_LIBRARY_SUFFIXES .a .so)\n#         ENDIF (APPLE)\n#     ENDIF (UNIX)\n# ENDIF (NOT DEFINED CMAKE_FIND_LIBRARY_SUFFIXES)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/cmake/PluginExternal.cmake",
    "content": "ADD_DEFINITIONS (${@plugin@_definitions})\nLINK_DIRECTORIES (${@plugin@_link_directories})\nINCLUDE_DIRECTORIES (${@plugin@_include_directories}\n    ${bld}\n    ${src}/vm\n    ${cross}/vm\n    ${src}/plugins/@plugin@\n    ${src}/vm/intplugins/@plugin@\n    ${unix}/vm\n    ${unix}/plugins/@plugin@\n    ${unix}/@plugin@\n    ${cross}/plugins/@plugin@\n)\n\nADD_LIBRARY (@plugin@ MODULE @plugin_sources@)\n\nTARGET_LINK_LIBRARIES (@plugin@ ${@plugin@_link_libraries})\n\nINSTALL (TARGETS @plugin@ LIBRARY DESTINATION @plgdir@)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/cmake/PluginInternal.cmake",
    "content": "ADD_DEFINITIONS (-DSQUEAK_BUILTIN_PLUGIN=1 ${@plugin@_definitions})\nLINK_DIRECTORIES (${@plugin@_link_directories})\nINCLUDE_DIRECTORIES (${@plugin@_include_directories}\n    ${bld}\n    ${src}/vm\n    ${cross}/vm\n    ${src}/plugins/@plugin@\n    ${src}/vm/intplugins/@plugin@\n    ${unix}/vm\n    ${unix}/plugins/@plugin@\n    ${unix}/@plugin@\n    ${cross}/plugins/@plugin@\n)\n\nADD_LIBRARY (@plugin@ STATIC @plugin_sources@)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/cmake/Plugins.cmake",
    "content": "# Figure out which plugins to build and create a configuration for each.\n# \n# Last edited: 2011-01-27 12:16:13 by piumarta on emilia.ipe.media.kyoto-u.ac.jp\n\nFILE (STRINGS ${src}/plugins.int plugins_int)\nSTRING (REGEX REPLACE \".*= (.*)\" \"\\\\1\" plugins_int ${plugins_int})\nSTRING (REPLACE \" \" \";\" plugins_int ${plugins_int})\n\nFILE (STRINGS ${src}/plugins.ext plugins_ext)\nSTRING (REGEX REPLACE \".*= (.*)\" \"\\\\1\" plugins_ext ${plugins_ext})\nSTRING (REPLACE \" \" \";\" plugins_ext ${plugins_ext})\n\nFILE (GLOB plugins_vm RELATIVE ${unix} ${unix}/vm-*)\n\nFILE_COPY (${bld}/disabledPlugins.c ${config}/disabledPlugins.c)\n\nMACRO (DISABLED_PLUGIN plugin)\n  FILE (APPEND ${bld}/disabledPlugins.c \"disabled(${plugin})\\n\")\nENDMACRO (DISABLED_PLUGIN)\n\nMACRO (INTERNAL_PLUGIN plugin)\n  SET (plugin_sources \"\")\n  IF (DEFINED ${plugin}_sources)\n    SET (plugin_sources ${${plugin}_sources})\n  ELSE (DEFINED ${plugin}_sources)\n    FOREACH (dir ${src}/vm/intplugins ${cross}/plugins ${unix}/plugins)\n      SET (tmp \"\")\n      AUX_SOURCE_DIRECTORY (${dir}/${plugin} tmp)\n      STRING_APPEND (plugin_sources \"${tmp}\")\n    ENDFOREACH (dir)\n  ENDIF (DEFINED ${plugin}_sources)\n  FILE (WRITE ${bld}/${plugin}/CMakeLists.in \"\")\n  FOREACH (dir ${unix}/plugins ${unix})\n    FILE_APPEND (${bld}/${plugin}/CMakeLists.in ${dir}/${plugin}/build.cmake)\n  ENDFOREACH (dir)\n  FILE_APPEND (${bld}/${plugin}/CMakeLists.in ${config}/PluginInternal.cmake)\n  CONFIGURE_FILE (${bld}/${plugin}/CMakeLists.in ${bld}/${plugin}/CMakeLists.txt @ONLY)\n  ADD_SUBDIRECTORY (${bld}/${plugin} ${bld}/${plugin})\nENDMACRO (INTERNAL_PLUGIN)\n\nMACRO (EXTERNAL_PLUGIN plugin)\n  SET (plugin_sources)\n  IF (DEFINED ${plugin}_sources)\n    SET (plugin_sources ${${plugin}_sources})\n  ELSE (DEFINED ${plugin}_sources)\n    FOREACH (dir ${src}/plugins ${cross}/plugins ${unix}/plugins ${unix})\n      SET (tmp \"\")\n      AUX_SOURCE_DIRECTORY (${dir}/${plugin} tmp)\n      STRING_APPEND (plugin_sources \"${tmp}\")\n    ENDFOREACH (dir)\n  ENDIF (DEFINED ${plugin}_sources)\n  IF (DEFINED ${plugin}_extra_sources)\n    STRING_APPEND (plugin_sources \"${${plugin}_extra_sources}\")\n  ENDIF (DEFINED ${plugin}_extra_sources)\n  FILE (WRITE ${bld}/${plugin}/CMakeLists.in \"\")\n  FOREACH (dir ${unix}/plugins ${unix})\n    FILE_APPEND (${bld}/${plugin}/CMakeLists.in ${dir}/${plugin}/build.cmake)\n  ENDFOREACH (dir)\n  FILE_APPEND (${bld}/${plugin}/CMakeLists.in ${config}/PluginExternal.cmake)\n  CONFIGURE_FILE (${bld}/${plugin}/CMakeLists.in ${bld}/${plugin}/CMakeLists.txt @ONLY)\n  ADD_SUBDIRECTORY (${bld}/${plugin} ${bld}/${plugin})\nENDMACRO (EXTERNAL_PLUGIN)\n\nMACRO (PLUGIN_DISABLE)\n  SET (plugin_disabled 1)\nENDMACRO (PLUGIN_DISABLE)\n\nMACRO (PLUGIN_SOURCES)\n  SET (${plugin}_sources ${ARGV})\nENDMACRO (PLUGIN_SOURCES)\n\nMACRO (PLUGIN_DEFINITIONS)\n  LIST_APPEND (${plugin}_definitions ${ARGV})\nENDMACRO (PLUGIN_DEFINITIONS)\n\nMACRO (PLUGIN_INCLUDE_DIRECTORIES)\n  LIST_APPEND (${plugin}_include_directories ${ARGV})\nENDMACRO (PLUGIN_INCLUDE_DIRECTORIES)\n\nMACRO (PLUGIN_LINK_DIRECTORIES)\n  LIST_APPEND (${plugin_target}_link_directories ${ARGV})\nENDMACRO (PLUGIN_LINK_DIRECTORIES)\n\nMACRO (PLUGIN_LINK_LIBRARIES)\n  LIST_APPEND (${plugin_target}_link_libraries ${ARGV})\nENDMACRO (PLUGIN_LINK_LIBRARIES)\n\nMACRO (CONFIGURE_PLUGIN_LIST plugins_list)\n  SET (plugins ${${plugins_list}})\n  FOREACH (plugin ${plugins})\n    FILE (MAKE_DIRECTORY ${bld}/${plugin})\n    FILE (WRITE ${bld}/${plugin}/config.cmake \"\")\n    FOREACH (dir ${unix}/plugins ${unix})\n      FILE_APPEND (${bld}/${plugin}/config.cmake ${dir}/${plugin}/config.cmake)\n    ENDFOREACH (dir)\n    #MESSAGE (\"-- plugin ${plugin}\")\n    IF (${plugins_list} STREQUAL \"plugins_int\")\n      SET (plugin_target \"vm\")\n    ELSE ()\n      SET (plugin_target \"${plugin}\")\n    ENDIF (${plugins_list} STREQUAL \"plugins_int\")\n    SET (plugin_disabled)\n    INCLUDE (${bld}/${plugin}/config.cmake)\n    IF (without-${plugin})\n      SET (plugin_disabled 1)\n    ENDIF ()\n    IF (DEFINED plugin_disabled)\n      LIST (REMOVE_ITEM ${plugins_list} ${plugin})\n      IF (${plugins_list} STREQUAL \"plugins_int\")\n        LIST (APPEND plugins_dis ${plugin})\n      ENDIF (${plugins_list} STREQUAL \"plugins_int\")\n      MESSAGE (\"!! ${plugin} disabled\")\n      SET (${plugin}_disabled 1)\n    ELSE (DEFINED plugin_disabled)\n      IF (${plugins_list} STREQUAL \"plugins_int\")\n        USE_LIBRARY (${plugin})\n      ENDIF (${plugins_list} STREQUAL \"plugins_int\")\n      SET (${plugin}_disabled)\n    ENDIF (DEFINED plugin_disabled)\n  ENDFOREACH (plugin)\nENDMACRO (CONFIGURE_PLUGIN_LIST)\n\nMACRO (CONFIGURE_PLUGINS)\n  CONFIGURE_PLUGIN_LIST (plugins_int)\n  CONFIGURE_PLUGIN_LIST (plugins_ext)\n  CONFIGURE_PLUGIN_LIST (plugins_vm)\nENDMACRO (CONFIGURE_PLUGINS)\n\nMACRO (BUILD_PLUGINS)\n  FOREACH (plugin ${plugins_dis})\n    DISABLED_PLUGIN (${plugin})\n  ENDFOREACH (plugin)\n  FOREACH (plugin ${plugins_int})\n    INTERNAL_PLUGIN (${plugin})\n  ENDFOREACH (plugin)\n  FOREACH (plugin ${plugins_ext})\n    EXTERNAL_PLUGIN (${plugin})\n  ENDFOREACH (plugin)\n  FOREACH (plugin ${plugins_vm})\n    EXTERNAL_PLUGIN (${plugin})\n  ENDFOREACH (plugin)\nENDMACRO (BUILD_PLUGINS)\n\nMACRO (PLUGIN_MESSAGE msg)\n  MESSAGE (STATUS \"${plugin}: ${msg}\")\nENDMACRO (PLUGIN_MESSAGE)\n\nMACRO (PLUGIN_FIND_INCLUDE VAR NAME)\n  FIND_PATH (${VAR}_H ${NAME} ${${plugin_target}_include_directories} ${ARGN})\n  IF (${VAR}_H)\n    PLUGIN_MESSAGE (\"${${VAR}_H}/${NAME}\")\n    SET (HAVE_${VAR}_H 1)\n    PLUGIN_INCLUDE_DIRECTORIES (${${VAR}_H})\n  ELSE ()\n    PLUGIN_MESSAGE (\"${NAME} not found\")\n  ENDIF ()\nENDMACRO ()\n\nMACRO (PLUGIN_REQUIRE_INCLUDE VAR NAME)\n  PLUGIN_FIND_INCLUDE(${VAR} ${NAME} ${ARGN})\n  IF (NOT ${VAR}_H)\n    PLUGIN_DISABLE ()\n  ENDIF ()\nENDMACRO ()\n\nMACRO (PLUGIN_FIND_LIBRARY VAR NAME)\n  FIND_LIBRARY (LIB${VAR} ${NAME})\n  IF (LIB${VAR})\n    PLUGIN_MESSAGE (\"${LIB${VAR}}\")\n    SET (HAVE_LIB${VAR} 1)\n    PLUGIN_LINK_LIBRARIES (${LIB${VAR}})\n  ELSE ()\n    PLUGIN_MESSAGE (\"lib${NAME} not found\")\n  ENDIF ()\nENDMACRO ()\n\nMACRO (PLUGIN_REQUIRE_LIBRARY VAR NAME)\n  PLUGIN_FIND_LIBRARY(${VAR} ${NAME})\n  if (NOT LIB${VAR})\n    PLUGIN_DISABLE ()\n  ENDIF ()\nENDMACRO ()\n\nMACRO (PLUGIN_FIND_PACKAGE VAR NAME)\n  IF (PKG_CONFIG_FOUND)\n    PKG_CHECK_MODULES (${VAR} ${NAME})\n    IF (${VAR}_FOUND)\n      PLUGIN_MESSAGE (\"${NAME} found\")\n      SET (HAVE_${VAR} 1)\n      PLUGIN_INCLUDE_DIRECTORIES (${${VAR}_INCLUDE_DIRS})\n      PLUGIN_LINK_DIRECTORIES (${${VAR}_LIBRARY_DIRS})\n      PLUGIN_LINK_LIBRARIES (${${VAR}_LIBRARIES})\n    ENDIF ()\n  ENDIF ()\nENDMACRO ()\n\nMACRO (PLUGIN_REQUIRE_PACKAGE VAR NAME)\n  PLUGIN_FIND_PACKAGE(${VAR} ${NAME})\n  IF (NOT ${VAR}_FOUND)\n    PLUGIN_DISABLE ()\n  ENDIF ()\nENDMACRO ()\n\nMACRO (EXPECT_UNDEFINED_SYMBOLS)\n  IF (APPLE)\n    SET (CMAKE_SHARED_MODULE_CREATE_C_FLAGS \"${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} -flat_namespace -undefined suppress\")\n    SET (CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS \"${CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS} -flat_namespace -undefined suppress\")\n  ENDIF (APPLE)\nENDMACRO (EXPECT_UNDEFINED_SYMBOLS)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/cmake/Utils.cmake",
    "content": "# Some random useful things to avoid repetition\n# \n# Last edited: 2009-08-26 10:41:32 by piumarta on ubuntu.piumarta.com\n\nMACRO (STRING_APPEND var str)\n  IF (DEFINED ${var})\n    SET (${var} \"${${var}} ${str}\")\n  ELSE (DEFINED ${var})\n    SET (${var} \"${str}\")\n  ENDIF (DEFINED ${var})\nENDMACRO (STRING_APPEND)\n\nMACRO (LIST_APPEND list)\n  LIST (APPEND ${list} \"${ARGN}\")\n  LIST (REMOVE_DUPLICATES ${list})\nENDMACRO (LIST_APPEND)\n\nMACRO (FILE_APPEND to from)\n  IF (EXISTS ${from})\n    FILE (READ ${from} tmp)\n    FILE (APPEND ${to} \"${tmp}\")\n  ENDIF (EXISTS ${from})\nENDMACRO (FILE_APPEND)\n\nMACRO (FILE_COPY to from)\n  IF (EXISTS ${from})\n    FILE (READ ${from} tmp)\n    FILE (WRITE ${to} \"${tmp}\")\n  ENDIF (EXISTS ${from})\nENDMACRO (FILE_COPY)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/cmake/config.guess",
    "content": "#! /bin/sh\n# Attempt to guess a canonical system name.\n#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,\n#   2000, 2001, 2002 Free Software Foundation, Inc.\n\ntimestamp='2002-10-21'\n\n# This file is free software; you can redistribute it and/or modify it\n# under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful, but\n# WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n# General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n#\n# As a special exception to the GNU General Public License, if you\n# distribute this file as part of a program that contains a\n# configuration script generated by Autoconf, you may include it under\n# the same distribution terms that you use for the rest of that program.\n\n# Originally written by Per Bothner <per@bothner.com>.\n# Please send patches to <config-patches@gnu.org>.  Submit a context\n# diff and a properly formatted ChangeLog entry.\n#\n# This script attempts to guess a canonical system name similar to\n# config.sub.  If it succeeds, it prints the system name on stdout, and\n# exits with 0.  Otherwise, it exits with 1.\n#\n# The plan is that this can be called by configure scripts if you\n# don't specify an explicit build system type.\n\nme=`echo \"$0\" | sed -e 's,.*/,,'`\n\nusage=\"\\\nUsage: $0 [OPTION]\n\nOutput the configuration name of the system \\`$me' is run on.\n\nOperation modes:\n  -h, --help         print this help, then exit\n  -t, --time-stamp   print date of last modification, then exit\n  -v, --version      print version number, then exit\n\nReport bugs and patches to <config-patches@gnu.org>.\"\n\nversion=\"\\\nGNU config.guess ($timestamp)\n\nOriginally written by Per Bothner.\nCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001\nFree Software Foundation, Inc.\n\nThis is free software; see the source for copying conditions.  There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\"\n\nhelp=\"\nTry \\`$me --help' for more information.\"\n\n# Parse command line\nwhile test $# -gt 0 ; do\n  case $1 in\n    --time-stamp | --time* | -t )\n       echo \"$timestamp\" ; exit 0 ;;\n    --version | -v )\n       echo \"$version\" ; exit 0 ;;\n    --help | --h* | -h )\n       echo \"$usage\"; exit 0 ;;\n    -- )     # Stop option processing\n       shift; break ;;\n    - )\t# Use stdin as input.\n       break ;;\n    -* )\n       echo \"$me: invalid option $1$help\" >&2\n       exit 1 ;;\n    * )\n       break ;;\n  esac\ndone\n\nif test $# != 0; then\n  echo \"$me: too many arguments$help\" >&2\n  exit 1\nfi\n\ntrap 'exit 1' 1 2 15\n\n# CC_FOR_BUILD -- compiler used by this script. Note that the use of a\n# compiler to aid in system detection is discouraged as it requires\n# temporary files to be created and, as you can see below, it is a\n# headache to deal with in a portable fashion.\n\n# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still\n# use `HOST_CC' if defined, but it is deprecated.\n\n# This shell variable is my proudest work .. or something. --bje\n\nset_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ;\n(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old)\n   || (echo \"$me: cannot create $tmpdir\" >&2 && exit 1) ;\ndummy=$tmpdir/dummy ;\nfiles=\"$dummy.c $dummy.o $dummy.rel $dummy\" ;\ntrap '\"'\"'rm -f $files; rmdir $tmpdir; exit 1'\"'\"' 1 2 15 ;\ncase $CC_FOR_BUILD,$HOST_CC,$CC in\n ,,)    echo \"int x;\" > $dummy.c ;\n\tfor c in cc gcc c89 c99 ; do\n\t  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then\n\t     CC_FOR_BUILD=\"$c\"; break ;\n\t  fi ;\n\tdone ;\n\trm -f $files ;\n\tif test x\"$CC_FOR_BUILD\" = x ; then\n\t  CC_FOR_BUILD=no_compiler_found ;\n\tfi\n\t;;\n ,,*)   CC_FOR_BUILD=$CC ;;\n ,*,*)  CC_FOR_BUILD=$HOST_CC ;;\nesac ;\nunset files'\n\n# This is needed to find uname on a Pyramid OSx when run in the BSD universe.\n# (ghazi@noc.rutgers.edu 1994-08-24)\nif (test -f /.attbin/uname) >/dev/null 2>&1 ; then\n\tPATH=$PATH:/.attbin ; export PATH\nfi\n\nUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown\nUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown\nUNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown\nUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown\n\n# Note: order is significant - the case branches are not exclusive.\n\ncase \"${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}\" in\n    *:NetBSD:*:*)\n\t# NetBSD (nbsd) targets should (where applicable) match one or\n\t# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,\n\t# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently\n\t# switched to ELF, *-*-netbsd* would select the old\n\t# object file format.  This provides both forward\n\t# compatibility and a consistent mechanism for selecting the\n\t# object file format.\n\t#\n\t# Note: NetBSD doesn't particularly care about the vendor\n\t# portion of the name.  We always set it to \"unknown\".\n\tsysctl=\"sysctl -n hw.machine_arch\"\n\tUNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \\\n\t    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`\n\tcase \"${UNAME_MACHINE_ARCH}\" in\n\t    armeb) machine=armeb-unknown ;;\n\t    arm*) machine=arm-unknown ;;\n\t    sh3el) machine=shl-unknown ;;\n\t    sh3eb) machine=sh-unknown ;;\n\t    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;\n\tesac\n\t# The Operating System including object format, if it has switched\n\t# to ELF recently, or will in the future.\n\tcase \"${UNAME_MACHINE_ARCH}\" in\n\t    arm*|i386|m68k|ns32k|sh3*|sparc|vax)\n\t\teval $set_cc_for_build\n\t\tif echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \\\n\t\t\t| grep __ELF__ >/dev/null\n\t\tthen\n\t\t    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).\n\t\t    # Return netbsd for either.  FIX?\n\t\t    os=netbsd\n\t\telse\n\t\t    os=netbsdelf\n\t\tfi\n\t\t;;\n\t    *)\n\t        os=netbsd\n\t\t;;\n\tesac\n\t# The OS release\n\trelease=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\\./'`\n\t# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:\n\t# contains redundant information, the shorter form:\n\t# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.\n\techo \"${machine}-${os}${release}\"\n\texit 0 ;;\n    amiga:OpenBSD:*:*)\n\techo m68k-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    arc:OpenBSD:*:*)\n\techo mipsel-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    hp300:OpenBSD:*:*)\n\techo m68k-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    mac68k:OpenBSD:*:*)\n\techo m68k-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    macppc:OpenBSD:*:*)\n\techo powerpc-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    mvme68k:OpenBSD:*:*)\n\techo m68k-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    mvme88k:OpenBSD:*:*)\n\techo m88k-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    mvmeppc:OpenBSD:*:*)\n\techo powerpc-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    pmax:OpenBSD:*:*)\n\techo mipsel-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    sgi:OpenBSD:*:*)\n\techo mipseb-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    sun3:OpenBSD:*:*)\n\techo m68k-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    wgrisc:OpenBSD:*:*)\n\techo mipsel-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    *:OpenBSD:*:*)\n\techo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    alpha:OSF1:*:*)\n\tif test $UNAME_RELEASE = \"V4.0\"; then\n\t\tUNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`\n\tfi\n\t# A Vn.n version is a released version.\n\t# A Tn.n version is a released field test version.\n\t# A Xn.n version is an unreleased experimental baselevel.\n\t# 1.2 uses \"1.2\" for uname -r.\n\teval $set_cc_for_build\n\tcat <<EOF >$dummy.s\n\t.data\n\\$Lformat:\n\t.byte 37,100,45,37,120,10,0\t# \"%d-%x\\n\"\n\n\t.text\n\t.globl main\n\t.align 4\n\t.ent main\nmain:\n\t.frame \\$30,16,\\$26,0\n\tldgp \\$29,0(\\$27)\n\t.prologue 1\n\t.long 0x47e03d80 # implver \\$0\n\tlda \\$2,-1\n\t.long 0x47e20c21 # amask \\$2,\\$1\n\tlda \\$16,\\$Lformat\n\tmov \\$0,\\$17\n\tnot \\$1,\\$18\n\tjsr \\$26,printf\n\tldgp \\$29,0(\\$26)\n\tmov 0,\\$16\n\tjsr \\$26,exit\n\t.end main\nEOF\n\t$CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null\n\tif test \"$?\" = 0 ; then\n\t\tcase `$dummy` in\n\t\t\t0-0)\n\t\t\t\tUNAME_MACHINE=\"alpha\"\n\t\t\t\t;;\n\t\t\t1-0)\n\t\t\t\tUNAME_MACHINE=\"alphaev5\"\n\t\t\t\t;;\n\t\t\t1-1)\n\t\t\t\tUNAME_MACHINE=\"alphaev56\"\n\t\t\t\t;;\n\t\t\t1-101)\n\t\t\t\tUNAME_MACHINE=\"alphapca56\"\n\t\t\t\t;;\n\t\t\t2-303)\n\t\t\t\tUNAME_MACHINE=\"alphaev6\"\n\t\t\t\t;;\n\t\t\t2-307)\n\t\t\t\tUNAME_MACHINE=\"alphaev67\"\n\t\t\t\t;;\n\t\t\t2-1307)\n\t\t\t\tUNAME_MACHINE=\"alphaev68\"\n\t\t\t\t;;\n\t\t\t3-1307)\n\t\t\t\tUNAME_MACHINE=\"alphaev7\"\n\t\t\t\t;;\n\t\tesac\n\tfi\n\trm -f $dummy.s $dummy && rmdir $tmpdir\n\techo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`\n\texit 0 ;;\n    Alpha\\ *:Windows_NT*:*)\n\t# How do we know it's Interix rather than the generic POSIX subsystem?\n\t# Should we change UNAME_MACHINE based on the output of uname instead\n\t# of the specific Alpha model?\n\techo alpha-pc-interix\n\texit 0 ;;\n    21064:Windows_NT:50:3)\n\techo alpha-dec-winnt3.5\n\texit 0 ;;\n    Amiga*:UNIX_System_V:4.0:*)\n\techo m68k-unknown-sysv4\n\texit 0;;\n    *:[Aa]miga[Oo][Ss]:*:*)\n\techo ${UNAME_MACHINE}-unknown-amigaos\n\texit 0 ;;\n    *:[Mm]orph[Oo][Ss]:*:*)\n\techo ${UNAME_MACHINE}-unknown-morphos\n\texit 0 ;;\n    *:OS/390:*:*)\n\techo i370-ibm-openedition\n\texit 0 ;;\n    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)\n\techo arm-acorn-riscix${UNAME_RELEASE}\n\texit 0;;\n    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)\n\techo hppa1.1-hitachi-hiuxmpp\n\texit 0;;\n    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)\n\t# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.\n\tif test \"`(/bin/universe) 2>/dev/null`\" = att ; then\n\t\techo pyramid-pyramid-sysv3\n\telse\n\t\techo pyramid-pyramid-bsd\n\tfi\n\texit 0 ;;\n    NILE*:*:*:dcosx)\n\techo pyramid-pyramid-svr4\n\texit 0 ;;\n    DRS?6000:UNIX_SV:4.2*:7*)\n\tcase `/usr/bin/uname -p` in\n\t    sparc) echo sparc-icl-nx7 && exit 0 ;;\n\tesac ;;\n    sun4H:SunOS:5.*:*)\n\techo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`\n\texit 0 ;;\n    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)\n\techo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`\n\texit 0 ;;\n    i86pc:SunOS:5.*:*)\n\techo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`\n\texit 0 ;;\n    sun4*:SunOS:6*:*)\n\t# According to config.sub, this is the proper way to canonicalize\n\t# SunOS6.  Hard to guess exactly what SunOS6 will be like, but\n\t# it's likely to be more like Solaris than SunOS4.\n\techo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`\n\texit 0 ;;\n    sun4*:SunOS:*:*)\n\tcase \"`/usr/bin/arch -k`\" in\n\t    Series*|S4*)\n\t\tUNAME_RELEASE=`uname -v`\n\t\t;;\n\tesac\n\t# Japanese Language versions have a version number like `4.1.3-JL'.\n\techo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`\n\texit 0 ;;\n    sun3*:SunOS:*:*)\n\techo m68k-sun-sunos${UNAME_RELEASE}\n\texit 0 ;;\n    sun*:*:4.2BSD:*)\n\tUNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`\n\ttest \"x${UNAME_RELEASE}\" = \"x\" && UNAME_RELEASE=3\n\tcase \"`/bin/arch`\" in\n\t    sun3)\n\t\techo m68k-sun-sunos${UNAME_RELEASE}\n\t\t;;\n\t    sun4)\n\t\techo sparc-sun-sunos${UNAME_RELEASE}\n\t\t;;\n\tesac\n\texit 0 ;;\n    aushp:SunOS:*:*)\n\techo sparc-auspex-sunos${UNAME_RELEASE}\n\texit 0 ;;\n    # The situation for MiNT is a little confusing.  The machine name\n    # can be virtually everything (everything which is not\n    # \"atarist\" or \"atariste\" at least should have a processor\n    # > m68000).  The system name ranges from \"MiNT\" over \"FreeMiNT\"\n    # to the lowercase version \"mint\" (or \"freemint\").  Finally\n    # the system name \"TOS\" denotes a system which is actually not\n    # MiNT.  But MiNT is downward compatible to TOS, so this should\n    # be no problem.\n    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)\n        echo m68k-atari-mint${UNAME_RELEASE}\n\texit 0 ;;\n    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)\n\techo m68k-atari-mint${UNAME_RELEASE}\n        exit 0 ;;\n    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)\n        echo m68k-atari-mint${UNAME_RELEASE}\n\texit 0 ;;\n    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)\n        echo m68k-milan-mint${UNAME_RELEASE}\n        exit 0 ;;\n    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)\n        echo m68k-hades-mint${UNAME_RELEASE}\n        exit 0 ;;\n    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)\n        echo m68k-unknown-mint${UNAME_RELEASE}\n        exit 0 ;;\n    powerpc:machten:*:*)\n\techo powerpc-apple-machten${UNAME_RELEASE}\n\texit 0 ;;\n    RISC*:Mach:*:*)\n\techo mips-dec-mach_bsd4.3\n\texit 0 ;;\n    RISC*:ULTRIX:*:*)\n\techo mips-dec-ultrix${UNAME_RELEASE}\n\texit 0 ;;\n    VAX*:ULTRIX*:*:*)\n\techo vax-dec-ultrix${UNAME_RELEASE}\n\texit 0 ;;\n    2020:CLIX:*:* | 2430:CLIX:*:*)\n\techo clipper-intergraph-clix${UNAME_RELEASE}\n\texit 0 ;;\n    mips:*:*:UMIPS | mips:*:*:RISCos)\n\teval $set_cc_for_build\n\tsed 's/^\t//' << EOF >$dummy.c\n#ifdef __cplusplus\n#include <stdio.h>  /* for printf() prototype */\n\tint main (int argc, char *argv[]) {\n#else\n\tint main (argc, argv) int argc; char *argv[]; {\n#endif\n\t#if defined (host_mips) && defined (MIPSEB)\n\t#if defined (SYSTYPE_SYSV)\n\t  printf (\"mips-mips-riscos%ssysv\\n\", argv[1]); exit (0);\n\t#endif\n\t#if defined (SYSTYPE_SVR4)\n\t  printf (\"mips-mips-riscos%ssvr4\\n\", argv[1]); exit (0);\n\t#endif\n\t#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)\n\t  printf (\"mips-mips-riscos%sbsd\\n\", argv[1]); exit (0);\n\t#endif\n\t#endif\n\t  exit (-1);\n\t}\nEOF\n\t$CC_FOR_BUILD -o $dummy $dummy.c \\\n\t  && $dummy `echo \"${UNAME_RELEASE}\" | sed -n 's/\\([0-9]*\\).*/\\1/p'` \\\n\t  && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0\n\trm -f $dummy.c $dummy && rmdir $tmpdir\n\techo mips-mips-riscos${UNAME_RELEASE}\n\texit 0 ;;\n    Motorola:PowerMAX_OS:*:*)\n\techo powerpc-motorola-powermax\n\texit 0 ;;\n    Motorola:*:4.3:PL8-*)\n\techo powerpc-harris-powermax\n\texit 0 ;;\n    Night_Hawk:*:*:PowerMAX_OS)\n\techo powerpc-harris-powermax\n\texit 0 ;;\n    Night_Hawk:Power_UNIX:*:*)\n\techo powerpc-harris-powerunix\n\texit 0 ;;\n    m88k:CX/UX:7*:*)\n\techo m88k-harris-cxux7\n\texit 0 ;;\n    m88k:*:4*:R4*)\n\techo m88k-motorola-sysv4\n\texit 0 ;;\n    m88k:*:3*:R3*)\n\techo m88k-motorola-sysv3\n\texit 0 ;;\n    AViiON:dgux:*:*)\n        # DG/UX returns AViiON for all architectures\n        UNAME_PROCESSOR=`/usr/bin/uname -p`\n\tif [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]\n\tthen\n\t    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \\\n\t       [ ${TARGET_BINARY_INTERFACE}x = x ]\n\t    then\n\t\techo m88k-dg-dgux${UNAME_RELEASE}\n\t    else\n\t\techo m88k-dg-dguxbcs${UNAME_RELEASE}\n\t    fi\n\telse\n\t    echo i586-dg-dgux${UNAME_RELEASE}\n\tfi\n \texit 0 ;;\n    M88*:DolphinOS:*:*)\t# DolphinOS (SVR3)\n\techo m88k-dolphin-sysv3\n\texit 0 ;;\n    M88*:*:R3*:*)\n\t# Delta 88k system running SVR3\n\techo m88k-motorola-sysv3\n\texit 0 ;;\n    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)\n\techo m88k-tektronix-sysv3\n\texit 0 ;;\n    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)\n\techo m68k-tektronix-bsd\n\texit 0 ;;\n    *:IRIX*:*:*)\n\techo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`\n\texit 0 ;;\n    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.\n\techo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id\n\texit 0 ;;              # Note that: echo \"'`uname -s`'\" gives 'AIX '\n    i*86:AIX:*:*)\n\techo i386-ibm-aix\n\texit 0 ;;\n    ia64:AIX:*:*)\n\tif [ -x /usr/bin/oslevel ] ; then\n\t\tIBM_REV=`/usr/bin/oslevel`\n\telse\n\t\tIBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}\n\tfi\n\techo ${UNAME_MACHINE}-ibm-aix${IBM_REV}\n\texit 0 ;;\n    *:AIX:2:3)\n\tif grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then\n\t\teval $set_cc_for_build\n\t\tsed 's/^\t\t//' << EOF >$dummy.c\n\t\t#include <sys/systemcfg.h>\n\n\t\tmain()\n\t\t\t{\n\t\t\tif (!__power_pc())\n\t\t\t\texit(1);\n\t\t\tputs(\"powerpc-ibm-aix3.2.5\");\n\t\t\texit(0);\n\t\t\t}\nEOF\n\t\t$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0\n\t\trm -f $dummy.c $dummy && rmdir $tmpdir\n\t\techo rs6000-ibm-aix3.2.5\n\telif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then\n\t\techo rs6000-ibm-aix3.2.4\n\telse\n\t\techo rs6000-ibm-aix3.2\n\tfi\n\texit 0 ;;\n    *:AIX:*:[45])\n\tIBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`\n\tif /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then\n\t\tIBM_ARCH=rs6000\n\telse\n\t\tIBM_ARCH=powerpc\n\tfi\n\tif [ -x /usr/bin/oslevel ] ; then\n\t\tIBM_REV=`/usr/bin/oslevel`\n\telse\n\t\tIBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}\n\tfi\n\techo ${IBM_ARCH}-ibm-aix${IBM_REV}\n\texit 0 ;;\n    *:AIX:*:*)\n\techo rs6000-ibm-aix\n\texit 0 ;;\n    ibmrt:4.4BSD:*|romp-ibm:BSD:*)\n\techo romp-ibm-bsd4.4\n\texit 0 ;;\n    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and\n\techo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to\n\texit 0 ;;                           # report: romp-ibm BSD 4.3\n    *:BOSX:*:*)\n\techo rs6000-bull-bosx\n\texit 0 ;;\n    DPX/2?00:B.O.S.:*:*)\n\techo m68k-bull-sysv3\n\texit 0 ;;\n    9000/[34]??:4.3bsd:1.*:*)\n\techo m68k-hp-bsd\n\texit 0 ;;\n    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)\n\techo m68k-hp-bsd4.4\n\texit 0 ;;\n    9000/[34678]??:HP-UX:*:*)\n\tHPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`\n\tcase \"${UNAME_MACHINE}\" in\n\t    9000/31? )            HP_ARCH=m68000 ;;\n\t    9000/[34]?? )         HP_ARCH=m68k ;;\n\t    9000/[678][0-9][0-9])\n\t\tif [ -x /usr/bin/getconf ]; then\n\t\t    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`\n                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`\n                    case \"${sc_cpu_version}\" in\n                      523) HP_ARCH=\"hppa1.0\" ;; # CPU_PA_RISC1_0\n                      528) HP_ARCH=\"hppa1.1\" ;; # CPU_PA_RISC1_1\n                      532)                      # CPU_PA_RISC2_0\n                        case \"${sc_kernel_bits}\" in\n                          32) HP_ARCH=\"hppa2.0n\" ;;\n                          64) HP_ARCH=\"hppa2.0w\" ;;\n\t\t\t  '') HP_ARCH=\"hppa2.0\" ;;   # HP-UX 10.20\n                        esac ;;\n                    esac\n\t\tfi\n\t\tif [ \"${HP_ARCH}\" = \"\" ]; then\n\t\t    eval $set_cc_for_build\n\t\t    sed 's/^              //' << EOF >$dummy.c\n\n              #define _HPUX_SOURCE\n              #include <stdlib.h>\n              #include <unistd.h>\n\n              int main ()\n              {\n              #if defined(_SC_KERNEL_BITS)\n                  long bits = sysconf(_SC_KERNEL_BITS);\n              #endif\n                  long cpu  = sysconf (_SC_CPU_VERSION);\n\n                  switch (cpu)\n              \t{\n              \tcase CPU_PA_RISC1_0: puts (\"hppa1.0\"); break;\n              \tcase CPU_PA_RISC1_1: puts (\"hppa1.1\"); break;\n              \tcase CPU_PA_RISC2_0:\n              #if defined(_SC_KERNEL_BITS)\n              \t    switch (bits)\n              \t\t{\n              \t\tcase 64: puts (\"hppa2.0w\"); break;\n              \t\tcase 32: puts (\"hppa2.0n\"); break;\n              \t\tdefault: puts (\"hppa2.0\"); break;\n              \t\t} break;\n              #else  /* !defined(_SC_KERNEL_BITS) */\n              \t    puts (\"hppa2.0\"); break;\n              #endif\n              \tdefault: puts (\"hppa1.0\"); break;\n              \t}\n                  exit (0);\n              }\nEOF\n\t\t    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`\n\t\t    if test -z \"$HP_ARCH\"; then HP_ARCH=hppa; fi\n\t\t    rm -f $dummy.c $dummy && rmdir $tmpdir\n\t\tfi ;;\n\tesac\n\techo ${HP_ARCH}-hp-hpux${HPUX_REV}\n\texit 0 ;;\n    ia64:HP-UX:*:*)\n\tHPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`\n\techo ia64-hp-hpux${HPUX_REV}\n\texit 0 ;;\n    3050*:HI-UX:*:*)\n\teval $set_cc_for_build\n\tsed 's/^\t//' << EOF >$dummy.c\n\t#include <unistd.h>\n\tint\n\tmain ()\n\t{\n\t  long cpu = sysconf (_SC_CPU_VERSION);\n\t  /* The order matters, because CPU_IS_HP_MC68K erroneously returns\n\t     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct\n\t     results, however.  */\n\t  if (CPU_IS_PA_RISC (cpu))\n\t    {\n\t      switch (cpu)\n\t\t{\n\t\t  case CPU_PA_RISC1_0: puts (\"hppa1.0-hitachi-hiuxwe2\"); break;\n\t\t  case CPU_PA_RISC1_1: puts (\"hppa1.1-hitachi-hiuxwe2\"); break;\n\t\t  case CPU_PA_RISC2_0: puts (\"hppa2.0-hitachi-hiuxwe2\"); break;\n\t\t  default: puts (\"hppa-hitachi-hiuxwe2\"); break;\n\t\t}\n\t    }\n\t  else if (CPU_IS_HP_MC68K (cpu))\n\t    puts (\"m68k-hitachi-hiuxwe2\");\n\t  else puts (\"unknown-hitachi-hiuxwe2\");\n\t  exit (0);\n\t}\nEOF\n\t$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0\n\trm -f $dummy.c $dummy && rmdir $tmpdir\n\techo unknown-hitachi-hiuxwe2\n\texit 0 ;;\n    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )\n\techo hppa1.1-hp-bsd\n\texit 0 ;;\n    9000/8??:4.3bsd:*:*)\n\techo hppa1.0-hp-bsd\n\texit 0 ;;\n    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)\n\techo hppa1.0-hp-mpeix\n\texit 0 ;;\n    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )\n\techo hppa1.1-hp-osf\n\texit 0 ;;\n    hp8??:OSF1:*:*)\n\techo hppa1.0-hp-osf\n\texit 0 ;;\n    i*86:OSF1:*:*)\n\tif [ -x /usr/sbin/sysversion ] ; then\n\t    echo ${UNAME_MACHINE}-unknown-osf1mk\n\telse\n\t    echo ${UNAME_MACHINE}-unknown-osf1\n\tfi\n\texit 0 ;;\n    parisc*:Lites*:*:*)\n\techo hppa1.1-hp-lites\n\texit 0 ;;\n    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)\n\techo c1-convex-bsd\n        exit 0 ;;\n    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)\n\tif getsysinfo -f scalar_acc\n\tthen echo c32-convex-bsd\n\telse echo c2-convex-bsd\n\tfi\n        exit 0 ;;\n    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)\n\techo c34-convex-bsd\n        exit 0 ;;\n    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)\n\techo c38-convex-bsd\n        exit 0 ;;\n    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)\n\techo c4-convex-bsd\n        exit 0 ;;\n    CRAY*Y-MP:*:*:*)\n\techo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\\.[^.]*$/.X/'\n\texit 0 ;;\n    CRAY*[A-Z]90:*:*:*)\n\techo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \\\n\t| sed -e 's/CRAY.*\\([A-Z]90\\)/\\1/' \\\n\t      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \\\n\t      -e 's/\\.[^.]*$/.X/'\n\texit 0 ;;\n    CRAY*TS:*:*:*)\n\techo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\\.[^.]*$/.X/'\n\texit 0 ;;\n    CRAY*T3D:*:*:*)\n\techo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\\.[^.]*$/.X/'\n\texit 0 ;;\n    CRAY*T3E:*:*:*)\n\techo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\\.[^.]*$/.X/'\n\texit 0 ;;\n    CRAY*SV1:*:*:*)\n\techo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\\.[^.]*$/.X/'\n\texit 0 ;;\n    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)\n\tFUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`\n        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\\///'`\n        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`\n        echo \"${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}\"\n        exit 0 ;;\n    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\\ Embedded/OS:*:*)\n\techo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}\n\texit 0 ;;\n    sparc*:BSD/OS:*:*)\n\techo sparc-unknown-bsdi${UNAME_RELEASE}\n\texit 0 ;;\n    *:BSD/OS:*:*)\n\techo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}\n\texit 0 ;;\n    *:FreeBSD:*:*)\n\t# Determine whether the default compiler uses glibc.\n\teval $set_cc_for_build\n\tsed 's/^\t//' << EOF >$dummy.c\n\t#include <features.h>\n\t#if __GLIBC__ >= 2\n\tLIBC=gnu\n\t#else\n\tLIBC=\n\t#endif\nEOF\n\teval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`\n\trm -f $dummy.c && rmdir $tmpdir\n\techo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}\n\texit 0 ;;\n    i*:CYGWIN*:*)\n\techo ${UNAME_MACHINE}-pc-cygwin\n\texit 0 ;;\n    i*:MINGW*:*)\n\techo ${UNAME_MACHINE}-pc-mingw32\n\texit 0 ;;\n    i*:PW*:*)\n\techo ${UNAME_MACHINE}-pc-pw32\n\texit 0 ;;\n    x86:Interix*:3*)\n\techo i386-pc-interix3\n\texit 0 ;;\n    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)\n\t# How do we know it's Interix rather than the generic POSIX subsystem?\n\t# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we\n\t# UNAME_MACHINE based on the output of uname instead of i386?\n\techo i386-pc-interix\n\texit 0 ;;\n    i*:UWIN*:*)\n\techo ${UNAME_MACHINE}-pc-uwin\n\texit 0 ;;\n    p*:CYGWIN*:*)\n\techo powerpcle-unknown-cygwin\n\texit 0 ;;\n    prep*:SunOS:5.*:*)\n\techo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`\n\texit 0 ;;\n    *:GNU:*:*)\n\techo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`\n\texit 0 ;;\n    i*86:Minix:*:*)\n\techo ${UNAME_MACHINE}-pc-minix\n\texit 0 ;;\n    arm*:Linux:*:*)\n\techo ${UNAME_MACHINE}-unknown-linux-gnu\n\texit 0 ;;\n    ia64:Linux:*:*)\n\techo ${UNAME_MACHINE}-unknown-linux-gnu\n\texit 0 ;;\n    m68*:Linux:*:*)\n\techo ${UNAME_MACHINE}-unknown-linux-gnu\n\texit 0 ;;\n    mips:Linux:*:*)\n\teval $set_cc_for_build\n\tsed 's/^\t//' << EOF >$dummy.c\n\t#undef CPU\n\t#undef mips\n\t#undef mipsel\n\t#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)\n\tCPU=mipsel\n\t#else\n\t#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)\n\tCPU=mips\n\t#else\n\tCPU=\n\t#endif\n\t#endif\nEOF\n\teval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`\n\trm -f $dummy.c && rmdir $tmpdir\n\ttest x\"${CPU}\" != x && echo \"${CPU}-pc-linux-gnu\" && exit 0\n\t;;\n    ppc:Linux:*:*)\n\techo powerpc-unknown-linux-gnu\n\texit 0 ;;\n    ppc64:Linux:*:*)\n\techo powerpc64-unknown-linux-gnu\n\texit 0 ;;\n    alpha:Linux:*:*)\n\tcase `sed -n '/^cpu model/s/^.*: \\(.*\\)/\\1/p' < /proc/cpuinfo` in\n\t  EV5)   UNAME_MACHINE=alphaev5 ;;\n\t  EV56)  UNAME_MACHINE=alphaev56 ;;\n\t  PCA56) UNAME_MACHINE=alphapca56 ;;\n\t  PCA57) UNAME_MACHINE=alphapca56 ;;\n\t  EV6)   UNAME_MACHINE=alphaev6 ;;\n\t  EV67)  UNAME_MACHINE=alphaev67 ;;\n\t  EV68*) UNAME_MACHINE=alphaev68 ;;\n        esac\n\tobjdump --private-headers /bin/sh | grep ld.so.1 >/dev/null\n\tif test \"$?\" = 0 ; then LIBC=\"libc1\" ; else LIBC=\"\" ; fi\n\techo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}\n\texit 0 ;;\n    parisc:Linux:*:* | hppa:Linux:*:*)\n\t# Look for CPU level\n\tcase `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in\n\t  PA7*) echo hppa1.1-unknown-linux-gnu ;;\n\t  PA8*) echo hppa2.0-unknown-linux-gnu ;;\n\t  *)    echo hppa-unknown-linux-gnu ;;\n\tesac\n\texit 0 ;;\n    parisc64:Linux:*:* | hppa64:Linux:*:*)\n\techo hppa64-unknown-linux-gnu\n\texit 0 ;;\n    s390:Linux:*:* | s390x:Linux:*:*)\n\techo ${UNAME_MACHINE}-ibm-linux\n\texit 0 ;;\n    sh*:Linux:*:*)\n\techo ${UNAME_MACHINE}-unknown-linux-gnu\n\texit 0 ;;\n    sparc:Linux:*:* | sparc64:Linux:*:*)\n\techo ${UNAME_MACHINE}-unknown-linux-gnu\n\texit 0 ;;\n    x86_64:Linux:*:*)\n\techo x86_64-unknown-linux-gnu\n\texit 0 ;;\n    i*86:Linux:*:*)\n\t# The BFD linker knows what the default object file format is, so\n\t# first see if it will tell us. cd to the root directory to prevent\n\t# problems with other programs or directories called `ld' in the path.\n\t# Set LC_ALL=C to ensure ld outputs messages in English.\n\tld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \\\n\t\t\t | sed -ne '/supported targets:/!d\n\t\t\t\t    s/[ \t][ \t]*/ /g\n\t\t\t\t    s/.*supported targets: *//\n\t\t\t\t    s/ .*//\n\t\t\t\t    p'`\n        case \"$ld_supported_targets\" in\n\t  elf32-i386)\n\t\tTENTATIVE=\"${UNAME_MACHINE}-pc-linux-gnu\"\n\t\t;;\n\t  a.out-i386-linux)\n\t\techo \"${UNAME_MACHINE}-pc-linux-gnuaout\"\n\t\texit 0 ;;\n\t  coff-i386)\n\t\techo \"${UNAME_MACHINE}-pc-linux-gnucoff\"\n\t\texit 0 ;;\n\t  \"\")\n\t\t# Either a pre-BFD a.out linker (linux-gnuoldld) or\n\t\t# one that does not give us useful --help.\n\t\techo \"${UNAME_MACHINE}-pc-linux-gnuoldld\"\n\t\texit 0 ;;\n\tesac\n\t# Determine whether the default compiler is a.out or elf\n\teval $set_cc_for_build\n\tsed 's/^\t//' << EOF >$dummy.c\n\t#include <features.h>\n\t#ifdef __ELF__\n\t# ifdef __GLIBC__\n\t#  if __GLIBC__ >= 2\n\tLIBC=gnu\n\t#  else\n\tLIBC=gnulibc1\n\t#  endif\n\t# else\n\tLIBC=gnulibc1\n\t# endif\n\t#else\n\t#ifdef __INTEL_COMPILER\n\tLIBC=gnu\n\t#else\n\tLIBC=gnuaout\n\t#endif\n\t#endif\nEOF\n\teval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`\n\trm -f $dummy.c && rmdir $tmpdir\n\ttest x\"${LIBC}\" != x && echo \"${UNAME_MACHINE}-pc-linux-${LIBC}\" && exit 0\n\ttest x\"${TENTATIVE}\" != x && echo \"${TENTATIVE}\" && exit 0\n\t;;\n    i*86:DYNIX/ptx:4*:*)\n\t# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.\n\t# earlier versions are messed up and put the nodename in both\n\t# sysname and nodename.\n\techo i386-sequent-sysv4\n\texit 0 ;;\n    i*86:UNIX_SV:4.2MP:2.*)\n        # Unixware is an offshoot of SVR4, but it has its own version\n        # number series starting with 2...\n        # I am not positive that other SVR4 systems won't match this,\n\t# I just have to hope.  -- rms.\n        # Use sysv4.2uw... so that sysv4* matches it.\n\techo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}\n\texit 0 ;;\n    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)\n\tUNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\\/MP$//'`\n\tif grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then\n\t\techo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}\n\telse\n\t\techo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}\n\tfi\n\texit 0 ;;\n    i*86:*:5:[78]*)\n\tcase `/bin/uname -X | grep \"^Machine\"` in\n\t    *486*)\t     UNAME_MACHINE=i486 ;;\n\t    *Pentium)\t     UNAME_MACHINE=i586 ;;\n\t    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;\n\tesac\n\techo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}\n\texit 0 ;;\n    i*86:*:3.2:*)\n\tif test -f /usr/options/cb.name; then\n\t\tUNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`\n\t\techo ${UNAME_MACHINE}-pc-isc$UNAME_REL\n\telif /bin/uname -X 2>/dev/null >/dev/null ; then\n\t\tUNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`\n\t\t(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486\n\t\t(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \\\n\t\t\t&& UNAME_MACHINE=i586\n\t\t(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \\\n\t\t\t&& UNAME_MACHINE=i686\n\t\t(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \\\n\t\t\t&& UNAME_MACHINE=i686\n\t\techo ${UNAME_MACHINE}-pc-sco$UNAME_REL\n\telse\n\t\techo ${UNAME_MACHINE}-pc-sysv32\n\tfi\n\texit 0 ;;\n    i*86:*DOS:*:*)\n\techo ${UNAME_MACHINE}-pc-msdosdjgpp\n\texit 0 ;;\n    pc:*:*:*)\n\t# Left here for compatibility:\n        # uname -m prints for DJGPP always 'pc', but it prints nothing about\n        # the processor, so we play safe by assuming i386.\n\techo i386-pc-msdosdjgpp\n        exit 0 ;;\n    Intel:Mach:3*:*)\n\techo i386-pc-mach3\n\texit 0 ;;\n    paragon:*:*:*)\n\techo i860-intel-osf1\n\texit 0 ;;\n    i860:*:4.*:*) # i860-SVR4\n\tif grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then\n\t  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4\n\telse # Add other i860-SVR4 vendors below as they are discovered.\n\t  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4\n\tfi\n\texit 0 ;;\n    mini*:CTIX:SYS*5:*)\n\t# \"miniframe\"\n\techo m68010-convergent-sysv\n\texit 0 ;;\n    mc68k:UNIX:SYSTEM5:3.51m)\n\techo m68k-convergent-sysv\n\texit 0 ;;\n    M68*:*:R3V[567]*:*)\n\ttest -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;\n    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)\n\tOS_REL=''\n\ttest -r /etc/.relid \\\n\t&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \\([0-9][0-9]\\).*/\\1/p' < /etc/.relid`\n\t/bin/uname -p 2>/dev/null | grep 86 >/dev/null \\\n\t  && echo i486-ncr-sysv4.3${OS_REL} && exit 0\n\t/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \\\n\t  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;\n    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)\n        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \\\n          && echo i486-ncr-sysv4 && exit 0 ;;\n    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)\n\techo m68k-unknown-lynxos${UNAME_RELEASE}\n\texit 0 ;;\n    mc68030:UNIX_System_V:4.*:*)\n\techo m68k-atari-sysv4\n\texit 0 ;;\n    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)\n\techo i386-unknown-lynxos${UNAME_RELEASE}\n\texit 0 ;;\n    TSUNAMI:LynxOS:2.*:*)\n\techo sparc-unknown-lynxos${UNAME_RELEASE}\n\texit 0 ;;\n    rs6000:LynxOS:2.*:*)\n\techo rs6000-unknown-lynxos${UNAME_RELEASE}\n\texit 0 ;;\n    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)\n\techo powerpc-unknown-lynxos${UNAME_RELEASE}\n\texit 0 ;;\n    SM[BE]S:UNIX_SV:*:*)\n\techo mips-dde-sysv${UNAME_RELEASE}\n\texit 0 ;;\n    RM*:ReliantUNIX-*:*:*)\n\techo mips-sni-sysv4\n\texit 0 ;;\n    RM*:SINIX-*:*:*)\n\techo mips-sni-sysv4\n\texit 0 ;;\n    *:SINIX-*:*:*)\n\tif uname -p 2>/dev/null >/dev/null ; then\n\t\tUNAME_MACHINE=`(uname -p) 2>/dev/null`\n\t\techo ${UNAME_MACHINE}-sni-sysv4\n\telse\n\t\techo ns32k-sni-sysv\n\tfi\n\texit 0 ;;\n    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort\n                      # says <Richard.M.Bartel@ccMail.Census.GOV>\n        echo i586-unisys-sysv4\n        exit 0 ;;\n    *:UNIX_System_V:4*:FTX*)\n\t# From Gerald Hewes <hewes@openmarket.com>.\n\t# How about differentiating between stratus architectures? -djm\n\techo hppa1.1-stratus-sysv4\n\texit 0 ;;\n    *:*:*:FTX*)\n\t# From seanf@swdc.stratus.com.\n\techo i860-stratus-sysv4\n\texit 0 ;;\n    *:VOS:*:*)\n\t# From Paul.Green@stratus.com.\n\techo hppa1.1-stratus-vos\n\texit 0 ;;\n    mc68*:A/UX:*:*)\n\techo m68k-apple-aux${UNAME_RELEASE}\n\texit 0 ;;\n    news*:NEWS-OS:6*:*)\n\techo mips-sony-newsos6\n\texit 0 ;;\n    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)\n\tif [ -d /usr/nec ]; then\n\t        echo mips-nec-sysv${UNAME_RELEASE}\n\telse\n\t        echo mips-unknown-sysv${UNAME_RELEASE}\n\tfi\n        exit 0 ;;\n    BeBox:BeOS:*:*)\t# BeOS running on hardware made by Be, PPC only.\n\techo powerpc-be-beos\n\texit 0 ;;\n    BeMac:BeOS:*:*)\t# BeOS running on Mac or Mac clone, PPC only.\n\techo powerpc-apple-beos\n\texit 0 ;;\n    BePC:BeOS:*:*)\t# BeOS running on Intel PC compatible.\n\techo i586-pc-beos\n\texit 0 ;;\n    SX-4:SUPER-UX:*:*)\n\techo sx4-nec-superux${UNAME_RELEASE}\n\texit 0 ;;\n    SX-5:SUPER-UX:*:*)\n\techo sx5-nec-superux${UNAME_RELEASE}\n\texit 0 ;;\n    SX-6:SUPER-UX:*:*)\n\techo sx6-nec-superux${UNAME_RELEASE}\n\texit 0 ;;\n    Power*:Rhapsody:*:*)\n\techo powerpc-apple-rhapsody${UNAME_RELEASE}\n\texit 0 ;;\n    *:Rhapsody:*:*)\n\techo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}\n\texit 0 ;;\n    *:Darwin:*:*)\n\techo `uname -p`-apple-darwin${UNAME_RELEASE}\n\texit 0 ;;\n    *:procnto*:*:* | *:QNX:[0123456789]*:*)\n\tUNAME_PROCESSOR=`uname -p`\n\tif test \"$UNAME_PROCESSOR\" = \"x86\"; then\n\t\tUNAME_PROCESSOR=i386\n\t\tUNAME_MACHINE=pc\n\tfi\n\techo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}\n\texit 0 ;;\n    *:QNX:*:4*)\n\techo i386-pc-qnx\n\texit 0 ;;\n    NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)\n\techo nsr-tandem-nsk${UNAME_RELEASE}\n\texit 0 ;;\n    *:NonStop-UX:*:*)\n\techo mips-compaq-nonstopux\n\texit 0 ;;\n    BS2000:POSIX*:*:*)\n\techo bs2000-siemens-sysv\n\texit 0 ;;\n    DS/*:UNIX_System_V:*:*)\n\techo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}\n\texit 0 ;;\n    *:Plan9:*:*)\n\t# \"uname -m\" is not consistent, so use $cputype instead. 386\n\t# is converted to i386 for consistency with other x86\n\t# operating systems.\n\tif test \"$cputype\" = \"386\"; then\n\t    UNAME_MACHINE=i386\n\telse\n\t    UNAME_MACHINE=\"$cputype\"\n\tfi\n\techo ${UNAME_MACHINE}-unknown-plan9\n\texit 0 ;;\n    i*86:OS/2:*:*)\n\t# If we were able to find `uname', then EMX Unix compatibility\n\t# is probably installed.\n\techo ${UNAME_MACHINE}-pc-os2-emx\n\texit 0 ;;\n    *:TOPS-10:*:*)\n\techo pdp10-unknown-tops10\n\texit 0 ;;\n    *:TENEX:*:*)\n\techo pdp10-unknown-tenex\n\texit 0 ;;\n    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)\n\techo pdp10-dec-tops20\n\texit 0 ;;\n    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)\n\techo pdp10-xkl-tops20\n\texit 0 ;;\n    *:TOPS-20:*:*)\n\techo pdp10-unknown-tops20\n\texit 0 ;;\n    *:ITS:*:*)\n\techo pdp10-unknown-its\n\texit 0 ;;\n    i*86:XTS-300:*:STOP)\n\techo ${UNAME_MACHINE}-unknown-stop\n\texit 0 ;;\n    i*86:atheos:*:*)\n\techo ${UNAME_MACHINE}-unknown-atheos\n\texit 0 ;;\nesac\n\n#echo '(No uname command or uname output not recognized.)' 1>&2\n#echo \"${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}\" 1>&2\n\neval $set_cc_for_build\ncat >$dummy.c <<EOF\n#ifdef _SEQUENT_\n# include <sys/types.h>\n# include <sys/utsname.h>\n#endif\nmain ()\n{\n#if defined (sony)\n#if defined (MIPSEB)\n  /* BFD wants \"bsd\" instead of \"newsos\".  Perhaps BFD should be changed,\n     I don't know....  */\n  printf (\"mips-sony-bsd\\n\"); exit (0);\n#else\n#include <sys/param.h>\n  printf (\"m68k-sony-newsos%s\\n\",\n#ifdef NEWSOS4\n          \"4\"\n#else\n\t  \"\"\n#endif\n         ); exit (0);\n#endif\n#endif\n\n#if defined (__arm) && defined (__acorn) && defined (__unix)\n  printf (\"arm-acorn-riscix\"); exit (0);\n#endif\n\n#if defined (hp300) && !defined (hpux)\n  printf (\"m68k-hp-bsd\\n\"); exit (0);\n#endif\n\n#if defined (NeXT)\n#if !defined (__ARCHITECTURE__)\n#define __ARCHITECTURE__ \"m68k\"\n#endif\n  int version;\n  version=`(hostinfo | sed -n 's/.*NeXT Mach \\([0-9]*\\).*/\\1/p') 2>/dev/null`;\n  if (version < 4)\n    printf (\"%s-next-nextstep%d\\n\", __ARCHITECTURE__, version);\n  else\n    printf (\"%s-next-openstep%d\\n\", __ARCHITECTURE__, version);\n  exit (0);\n#endif\n\n#if defined (MULTIMAX) || defined (n16)\n#if defined (UMAXV)\n  printf (\"ns32k-encore-sysv\\n\"); exit (0);\n#else\n#if defined (CMU)\n  printf (\"ns32k-encore-mach\\n\"); exit (0);\n#else\n  printf (\"ns32k-encore-bsd\\n\"); exit (0);\n#endif\n#endif\n#endif\n\n#if defined (__386BSD__)\n  printf (\"i386-pc-bsd\\n\"); exit (0);\n#endif\n\n#if defined (sequent)\n#if defined (i386)\n  printf (\"i386-sequent-dynix\\n\"); exit (0);\n#endif\n#if defined (ns32000)\n  printf (\"ns32k-sequent-dynix\\n\"); exit (0);\n#endif\n#endif\n\n#if defined (_SEQUENT_)\n    struct utsname un;\n\n    uname(&un);\n\n    if (strncmp(un.version, \"V2\", 2) == 0) {\n\tprintf (\"i386-sequent-ptx2\\n\"); exit (0);\n    }\n    if (strncmp(un.version, \"V1\", 2) == 0) { /* XXX is V1 correct? */\n\tprintf (\"i386-sequent-ptx1\\n\"); exit (0);\n    }\n    printf (\"i386-sequent-ptx\\n\"); exit (0);\n\n#endif\n\n#if defined (vax)\n# if !defined (ultrix)\n#  include <sys/param.h>\n#  if defined (BSD)\n#   if BSD == 43\n      printf (\"vax-dec-bsd4.3\\n\"); exit (0);\n#   else\n#    if BSD == 199006\n      printf (\"vax-dec-bsd4.3reno\\n\"); exit (0);\n#    else\n      printf (\"vax-dec-bsd\\n\"); exit (0);\n#    endif\n#   endif\n#  else\n    printf (\"vax-dec-bsd\\n\"); exit (0);\n#  endif\n# else\n    printf (\"vax-dec-ultrix\\n\"); exit (0);\n# endif\n#endif\n\n#if defined (alliant) && defined (i860)\n  printf (\"i860-alliant-bsd\\n\"); exit (0);\n#endif\n\n  exit (1);\n}\nEOF\n\n$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0\nrm -f $dummy.c $dummy && rmdir $tmpdir\n\n# Apollos put the system type in the environment.\n\ntest -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }\n\n# Convex versions that predate uname can use getsysinfo(1)\n\nif [ -x /usr/convex/getsysinfo ]\nthen\n    case `getsysinfo -f cpu_type` in\n    c1*)\n\techo c1-convex-bsd\n\texit 0 ;;\n    c2*)\n\tif getsysinfo -f scalar_acc\n\tthen echo c32-convex-bsd\n\telse echo c2-convex-bsd\n\tfi\n\texit 0 ;;\n    c34*)\n\techo c34-convex-bsd\n\texit 0 ;;\n    c38*)\n\techo c38-convex-bsd\n\texit 0 ;;\n    c4*)\n\techo c4-convex-bsd\n\texit 0 ;;\n    esac\nfi\n\ncat >&2 <<EOF\n$0: unable to guess system type\n\nThis script, last modified $timestamp, has failed to recognize\nthe operating system you are using. It is advised that you\ndownload the most up to date version of the config scripts from\n\n    ftp://ftp.gnu.org/pub/gnu/config/\n\nIf the version you run ($0) is already up to date, please\nsend the following data and any information you think might be\npertinent to <config-patches@gnu.org> in order to provide the needed\ninformation to handle your system.\n\nconfig.guess timestamp = $timestamp\n\nuname -m = `(uname -m) 2>/dev/null || echo unknown`\nuname -r = `(uname -r) 2>/dev/null || echo unknown`\nuname -s = `(uname -s) 2>/dev/null || echo unknown`\nuname -v = `(uname -v) 2>/dev/null || echo unknown`\n\n/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`\n/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`\n\nhostinfo               = `(hostinfo) 2>/dev/null`\n/bin/universe          = `(/bin/universe) 2>/dev/null`\n/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`\n/bin/arch              = `(/bin/arch) 2>/dev/null`\n/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`\n/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`\n\nUNAME_MACHINE = ${UNAME_MACHINE}\nUNAME_RELEASE = ${UNAME_RELEASE}\nUNAME_SYSTEM  = ${UNAME_SYSTEM}\nUNAME_VERSION = ${UNAME_VERSION}\nEOF\n\nexit 1\n\n# Local variables:\n# eval: (add-hook 'write-file-hooks 'time-stamp)\n# time-stamp-start: \"timestamp='\"\n# time-stamp-format: \"%:y-%02m-%02d\"\n# time-stamp-end: \"'\"\n# End:\n"
  },
  {
    "path": "vm/src/from_squeak/unix/cmake/config.in",
    "content": "#!/bin/sh\n\n# echo \"Configuring `basename $1` -> `basename $2`\" >&2\n\nsed \"\ns%\\[version\\]%@version@%g\ns%\\[major\\]%@major@%g\ns%\\[minor\\]%@minor@%g\ns%\\[patch\\]%@patch@%g\ns%\\[bindir\\]%@prefix@/@bindir@%g\ns%\\[imgdir\\]%@prefix@/@imgdir@%g\ns%\\[plgdir\\]%@prefix@/@plgdir@%g\ns%\\[mandir\\]%@prefix@/@mandir@%g\ns%\\[docdir\\]%@prefix@/@docdir@%g\ns%\\[useoss\\]%@useoss@%g\n\" < $1 > $2\n"
  },
  {
    "path": "vm/src/from_squeak/unix/cmake/config.sub",
    "content": "#! /bin/sh\n# Configuration validation subroutine script.\n#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,\n#   2000, 2001, 2002 Free Software Foundation, Inc.\n\ntimestamp='2002-09-05'\n\n# This file is (in principle) common to ALL GNU software.\n# The presence of a machine in this file suggests that SOME GNU software\n# can handle that machine.  It does not imply ALL GNU software can.\n#\n# This file is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 59 Temple Place - Suite 330,\n# Boston, MA 02111-1307, USA.\n\n# As a special exception to the GNU General Public License, if you\n# distribute this file as part of a program that contains a\n# configuration script generated by Autoconf, you may include it under\n# the same distribution terms that you use for the rest of that program.\n\n# Please send patches to <config-patches@gnu.org>.  Submit a context\n# diff and a properly formatted ChangeLog entry.\n#\n# Configuration subroutine to validate and canonicalize a configuration type.\n# Supply the specified configuration type as an argument.\n# If it is invalid, we print an error message on stderr and exit with code 1.\n# Otherwise, we print the canonical config type on stdout and succeed.\n\n# This file is supposed to be the same for all GNU packages\n# and recognize all the CPU types, system types and aliases\n# that are meaningful with *any* GNU software.\n# Each package is responsible for reporting which valid configurations\n# it does not support.  The user should be able to distinguish\n# a failure to support a valid configuration from a meaningless\n# configuration.\n\n# The goal of this file is to map all the various variations of a given\n# machine specification into a single specification in the form:\n#\tCPU_TYPE-MANUFACTURER-OPERATING_SYSTEM\n# or in some cases, the newer four-part form:\n#\tCPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM\n# It is wrong to echo any other type of specification.\n\nme=`echo \"$0\" | sed -e 's,.*/,,'`\n\nusage=\"\\\nUsage: $0 [OPTION] CPU-MFR-OPSYS\n       $0 [OPTION] ALIAS\n\nCanonicalize a configuration name.\n\nOperation modes:\n  -h, --help         print this help, then exit\n  -t, --time-stamp   print date of last modification, then exit\n  -v, --version      print version number, then exit\n\nReport bugs and patches to <config-patches@gnu.org>.\"\n\nversion=\"\\\nGNU config.sub ($timestamp)\n\nCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001\nFree Software Foundation, Inc.\n\nThis is free software; see the source for copying conditions.  There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\"\n\nhelp=\"\nTry \\`$me --help' for more information.\"\n\n# Parse command line\nwhile test $# -gt 0 ; do\n  case $1 in\n    --time-stamp | --time* | -t )\n       echo \"$timestamp\" ; exit 0 ;;\n    --version | -v )\n       echo \"$version\" ; exit 0 ;;\n    --help | --h* | -h )\n       echo \"$usage\"; exit 0 ;;\n    -- )     # Stop option processing\n       shift; break ;;\n    - )\t# Use stdin as input.\n       break ;;\n    -* )\n       echo \"$me: invalid option $1$help\"\n       exit 1 ;;\n\n    *local*)\n       # First pass through any local machine types.\n       echo $1\n       exit 0;;\n\n    * )\n       break ;;\n  esac\ndone\n\ncase $# in\n 0) echo \"$me: missing argument$help\" >&2\n    exit 1;;\n 1) ;;\n *) echo \"$me: too many arguments$help\" >&2\n    exit 1;;\nesac\n\n# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).\n# Here we must recognize all the valid KERNEL-OS combinations.\nmaybe_os=`echo $1 | sed 's/^\\(.*\\)-\\([^-]*-[^-]*\\)$/\\2/'`\ncase $maybe_os in\n  nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)\n    os=-$maybe_os\n    basic_machine=`echo $1 | sed 's/^\\(.*\\)-\\([^-]*-[^-]*\\)$/\\1/'`\n    ;;\n  *)\n    basic_machine=`echo $1 | sed 's/-[^-]*$//'`\n    if [ $basic_machine != $1 ]\n    then os=`echo $1 | sed 's/.*-/-/'`\n    else os=; fi\n    ;;\nesac\n\n### Let's recognize common machines as not being operating systems so\n### that things like config.sub decstation-3100 work.  We also\n### recognize some manufacturers as not being operating systems, so we\n### can provide default operating systems below.\ncase $os in\n\t-sun*os*)\n\t\t# Prevent following clause from handling this invalid input.\n\t\t;;\n\t-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \\\n\t-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \\\n\t-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \\\n\t-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\\\n\t-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \\\n\t-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \\\n\t-apple | -axis)\n\t\tos=\n\t\tbasic_machine=$1\n\t\t;;\n\t-sim | -cisco | -oki | -wec | -winbond)\n\t\tos=\n\t\tbasic_machine=$1\n\t\t;;\n\t-scout)\n\t\t;;\n\t-wrs)\n\t\tos=-vxworks\n\t\tbasic_machine=$1\n\t\t;;\n\t-chorusos*)\n\t\tos=-chorusos\n\t\tbasic_machine=$1\n\t\t;;\n \t-chorusrdb)\n \t\tos=-chorusrdb\n\t\tbasic_machine=$1\n \t\t;;\n\t-hiux*)\n\t\tos=-hiuxwe2\n\t\t;;\n\t-sco5)\n\t\tos=-sco3.2v5\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-sco4)\n\t\tos=-sco3.2v4\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-sco3.2.[4-9]*)\n\t\tos=`echo $os | sed -e 's/sco3.2./sco3.2v/'`\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-sco3.2v[4-9]*)\n\t\t# Don't forget version if it is 3.2v4 or newer.\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-sco*)\n\t\tos=-sco3.2v2\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-udk*)\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-isc)\n\t\tos=-isc2.2\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-clix*)\n\t\tbasic_machine=clipper-intergraph\n\t\t;;\n\t-isc*)\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-lynx*)\n\t\tos=-lynxos\n\t\t;;\n\t-ptx*)\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`\n\t\t;;\n\t-windowsnt*)\n\t\tos=`echo $os | sed -e 's/windowsnt/winnt/'`\n\t\t;;\n\t-psos*)\n\t\tos=-psos\n\t\t;;\n\t-mint | -mint[0-9]*)\n\t\tbasic_machine=m68k-atari\n\t\tos=-mint\n\t\t;;\nesac\n\n# Decode aliases for certain CPU-COMPANY combinations.\ncase $basic_machine in\n\t# Recognize the basic CPU types without company name.\n\t# Some are omitted here because they have special meanings below.\n\t1750a | 580 \\\n\t| a29k \\\n\t| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \\\n\t| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \\\n\t| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \\\n\t| clipper \\\n\t| d10v | d30v | dlx | dsp16xx \\\n\t| fr30 | frv \\\n\t| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \\\n\t| i370 | i860 | i960 | ia64 \\\n\t| ip2k \\\n\t| m32r | m68000 | m68k | m88k | mcore \\\n\t| mips | mipsbe | mipseb | mipsel | mipsle \\\n\t| mips16 \\\n\t| mips64 | mips64el \\\n\t| mips64vr | mips64vrel \\\n\t| mips64orion | mips64orionel \\\n\t| mips64vr4100 | mips64vr4100el \\\n\t| mips64vr4300 | mips64vr4300el \\\n\t| mips64vr5000 | mips64vr5000el \\\n\t| mipsisa32 | mipsisa32el \\\n\t| mipsisa64 | mipsisa64el \\\n\t| mipsisa64sb1 | mipsisa64sb1el \\\n\t| mipsisa64sr71k | mipsisa64sr71kel \\\n\t| mipstx39 | mipstx39el \\\n\t| mn10200 | mn10300 \\\n\t| ns16k | ns32k \\\n\t| openrisc | or32 \\\n\t| pdp10 | pdp11 | pj | pjl \\\n\t| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \\\n\t| pyramid \\\n\t| sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \\\n\t| sh64 | sh64le \\\n\t| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \\\n\t| strongarm \\\n\t| tahoe | thumb | tic80 | tron \\\n\t| v850 | v850e \\\n\t| we32k \\\n\t| x86 | xscale | xstormy16 | xtensa \\\n\t| z8k)\n\t\tbasic_machine=$basic_machine-unknown\n\t\t;;\n\tm6811 | m68hc11 | m6812 | m68hc12)\n\t\t# Motorola 68HC11/12.\n\t\tbasic_machine=$basic_machine-unknown\n\t\tos=-none\n\t\t;;\n\tm88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)\n\t\t;;\n\n\t# We use `pc' rather than `unknown'\n\t# because (1) that's what they normally are, and\n\t# (2) the word \"unknown\" tends to confuse beginning users.\n\ti*86 | x86_64)\n\t  basic_machine=$basic_machine-pc\n\t  ;;\n\t# Object if more than one company name word.\n\t*-*-*)\n\t\techo Invalid configuration \\`$1\\': machine \\`$basic_machine\\' not recognized 1>&2\n\t\texit 1\n\t\t;;\n\t# Recognize the basic CPU types with company name.\n\t580-* \\\n\t| a29k-* \\\n\t| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \\\n\t| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \\\n\t| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \\\n\t| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \\\n\t| avr-* \\\n\t| bs2000-* \\\n\t| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \\\n\t| clipper-* | cydra-* \\\n\t| d10v-* | d30v-* | dlx-* \\\n\t| elxsi-* \\\n\t| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \\\n\t| h8300-* | h8500-* \\\n\t| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \\\n\t| i*86-* | i860-* | i960-* | ia64-* \\\n\t| ip2k-* \\\n\t| m32r-* \\\n\t| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \\\n\t| m88110-* | m88k-* | mcore-* \\\n\t| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \\\n\t| mips16-* \\\n\t| mips64-* | mips64el-* \\\n\t| mips64vr-* | mips64vrel-* \\\n\t| mips64orion-* | mips64orionel-* \\\n\t| mips64vr4100-* | mips64vr4100el-* \\\n\t| mips64vr4300-* | mips64vr4300el-* \\\n\t| mips64vr5000-* | mips64vr5000el-* \\\n\t| mipsisa32-* | mipsisa32el-* \\\n\t| mipsisa64-* | mipsisa64el-* \\\n\t| mipsisa64sb1-* | mipsisa64sb1el-* \\\n\t| mipsisa64sr71k-* | mipsisa64sr71kel-* \\\n\t| mipstx39 | mipstx39el \\\n\t| none-* | np1-* | ns16k-* | ns32k-* \\\n\t| orion-* \\\n\t| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \\\n\t| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \\\n\t| pyramid-* \\\n\t| romp-* | rs6000-* \\\n\t| sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \\\n\t| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \\\n\t| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \\\n\t| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \\\n\t| tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \\\n\t| v850-* | v850e-* | vax-* \\\n\t| we32k-* \\\n\t| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \\\n\t| xtensa-* \\\n\t| ymp-* \\\n\t| z8k-*)\n\t\t;;\n\t# Recognize the various machine names and aliases which stand\n\t# for a CPU type and a company and sometimes even an OS.\n\t386bsd)\n\t\tbasic_machine=i386-unknown\n\t\tos=-bsd\n\t\t;;\n\t3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)\n\t\tbasic_machine=m68000-att\n\t\t;;\n\t3b*)\n\t\tbasic_machine=we32k-att\n\t\t;;\n\ta29khif)\n\t\tbasic_machine=a29k-amd\n\t\tos=-udi\n\t\t;;\n\tadobe68k)\n\t\tbasic_machine=m68010-adobe\n\t\tos=-scout\n\t\t;;\n\talliant | fx80)\n\t\tbasic_machine=fx80-alliant\n\t\t;;\n\taltos | altos3068)\n\t\tbasic_machine=m68k-altos\n\t\t;;\n\tam29k)\n\t\tbasic_machine=a29k-none\n\t\tos=-bsd\n\t\t;;\n\tamdahl)\n\t\tbasic_machine=580-amdahl\n\t\tos=-sysv\n\t\t;;\n\tamiga | amiga-*)\n\t\tbasic_machine=m68k-unknown\n\t\t;;\n\tamigaos | amigados)\n\t\tbasic_machine=m68k-unknown\n\t\tos=-amigaos\n\t\t;;\n\tamigaunix | amix)\n\t\tbasic_machine=m68k-unknown\n\t\tos=-sysv4\n\t\t;;\n\tapollo68)\n\t\tbasic_machine=m68k-apollo\n\t\tos=-sysv\n\t\t;;\n\tapollo68bsd)\n\t\tbasic_machine=m68k-apollo\n\t\tos=-bsd\n\t\t;;\n\taux)\n\t\tbasic_machine=m68k-apple\n\t\tos=-aux\n\t\t;;\n\tbalance)\n\t\tbasic_machine=ns32k-sequent\n\t\tos=-dynix\n\t\t;;\n\tc90)\n\t\tbasic_machine=c90-cray\n\t\tos=-unicos\n\t\t;;\n\tconvex-c1)\n\t\tbasic_machine=c1-convex\n\t\tos=-bsd\n\t\t;;\n\tconvex-c2)\n\t\tbasic_machine=c2-convex\n\t\tos=-bsd\n\t\t;;\n\tconvex-c32)\n\t\tbasic_machine=c32-convex\n\t\tos=-bsd\n\t\t;;\n\tconvex-c34)\n\t\tbasic_machine=c34-convex\n\t\tos=-bsd\n\t\t;;\n\tconvex-c38)\n\t\tbasic_machine=c38-convex\n\t\tos=-bsd\n\t\t;;\n\tcray | j90)\n\t\tbasic_machine=j90-cray\n\t\tos=-unicos\n\t\t;;\n\tcrds | unos)\n\t\tbasic_machine=m68k-crds\n\t\t;;\n\tcris | cris-* | etrax*)\n\t\tbasic_machine=cris-axis\n\t\t;;\n\tda30 | da30-*)\n\t\tbasic_machine=m68k-da30\n\t\t;;\n\tdecstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)\n\t\tbasic_machine=mips-dec\n\t\t;;\n\tdecsystem10* | dec10*)\n\t\tbasic_machine=pdp10-dec\n\t\tos=-tops10\n\t\t;;\n\tdecsystem20* | dec20*)\n\t\tbasic_machine=pdp10-dec\n\t\tos=-tops20\n\t\t;;\n\tdelta | 3300 | motorola-3300 | motorola-delta \\\n\t      | 3300-motorola | delta-motorola)\n\t\tbasic_machine=m68k-motorola\n\t\t;;\n\tdelta88)\n\t\tbasic_machine=m88k-motorola\n\t\tos=-sysv3\n\t\t;;\n\tdpx20 | dpx20-*)\n\t\tbasic_machine=rs6000-bull\n\t\tos=-bosx\n\t\t;;\n\tdpx2* | dpx2*-bull)\n\t\tbasic_machine=m68k-bull\n\t\tos=-sysv3\n\t\t;;\n\tebmon29k)\n\t\tbasic_machine=a29k-amd\n\t\tos=-ebmon\n\t\t;;\n\telxsi)\n\t\tbasic_machine=elxsi-elxsi\n\t\tos=-bsd\n\t\t;;\n\tencore | umax | mmax)\n\t\tbasic_machine=ns32k-encore\n\t\t;;\n\tes1800 | OSE68k | ose68k | ose | OSE)\n\t\tbasic_machine=m68k-ericsson\n\t\tos=-ose\n\t\t;;\n\tfx2800)\n\t\tbasic_machine=i860-alliant\n\t\t;;\n\tgenix)\n\t\tbasic_machine=ns32k-ns\n\t\t;;\n\tgmicro)\n\t\tbasic_machine=tron-gmicro\n\t\tos=-sysv\n\t\t;;\n\tgo32)\n\t\tbasic_machine=i386-pc\n\t\tos=-go32\n\t\t;;\n\th3050r* | hiux*)\n\t\tbasic_machine=hppa1.1-hitachi\n\t\tos=-hiuxwe2\n\t\t;;\n\th8300hms)\n\t\tbasic_machine=h8300-hitachi\n\t\tos=-hms\n\t\t;;\n\th8300xray)\n\t\tbasic_machine=h8300-hitachi\n\t\tos=-xray\n\t\t;;\n\th8500hms)\n\t\tbasic_machine=h8500-hitachi\n\t\tos=-hms\n\t\t;;\n\tharris)\n\t\tbasic_machine=m88k-harris\n\t\tos=-sysv3\n\t\t;;\n\thp300-*)\n\t\tbasic_machine=m68k-hp\n\t\t;;\n\thp300bsd)\n\t\tbasic_machine=m68k-hp\n\t\tos=-bsd\n\t\t;;\n\thp300hpux)\n\t\tbasic_machine=m68k-hp\n\t\tos=-hpux\n\t\t;;\n\thp3k9[0-9][0-9] | hp9[0-9][0-9])\n\t\tbasic_machine=hppa1.0-hp\n\t\t;;\n\thp9k2[0-9][0-9] | hp9k31[0-9])\n\t\tbasic_machine=m68000-hp\n\t\t;;\n\thp9k3[2-9][0-9])\n\t\tbasic_machine=m68k-hp\n\t\t;;\n\thp9k6[0-9][0-9] | hp6[0-9][0-9])\n\t\tbasic_machine=hppa1.0-hp\n\t\t;;\n\thp9k7[0-79][0-9] | hp7[0-79][0-9])\n\t\tbasic_machine=hppa1.1-hp\n\t\t;;\n\thp9k78[0-9] | hp78[0-9])\n\t\t# FIXME: really hppa2.0-hp\n\t\tbasic_machine=hppa1.1-hp\n\t\t;;\n\thp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)\n\t\t# FIXME: really hppa2.0-hp\n\t\tbasic_machine=hppa1.1-hp\n\t\t;;\n\thp9k8[0-9][13679] | hp8[0-9][13679])\n\t\tbasic_machine=hppa1.1-hp\n\t\t;;\n\thp9k8[0-9][0-9] | hp8[0-9][0-9])\n\t\tbasic_machine=hppa1.0-hp\n\t\t;;\n\thppa-next)\n\t\tos=-nextstep3\n\t\t;;\n\thppaosf)\n\t\tbasic_machine=hppa1.1-hp\n\t\tos=-osf\n\t\t;;\n\thppro)\n\t\tbasic_machine=hppa1.1-hp\n\t\tos=-proelf\n\t\t;;\n\ti370-ibm* | ibm*)\n\t\tbasic_machine=i370-ibm\n\t\t;;\n# I'm not sure what \"Sysv32\" means.  Should this be sysv3.2?\n\ti*86v32)\n\t\tbasic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`\n\t\tos=-sysv32\n\t\t;;\n\ti*86v4*)\n\t\tbasic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`\n\t\tos=-sysv4\n\t\t;;\n\ti*86v)\n\t\tbasic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`\n\t\tos=-sysv\n\t\t;;\n\ti*86sol2)\n\t\tbasic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`\n\t\tos=-solaris2\n\t\t;;\n\ti386mach)\n\t\tbasic_machine=i386-mach\n\t\tos=-mach\n\t\t;;\n\ti386-vsta | vsta)\n\t\tbasic_machine=i386-unknown\n\t\tos=-vsta\n\t\t;;\n\tiris | iris4d)\n\t\tbasic_machine=mips-sgi\n\t\tcase $os in\n\t\t    -irix*)\n\t\t\t;;\n\t\t    *)\n\t\t\tos=-irix4\n\t\t\t;;\n\t\tesac\n\t\t;;\n\tisi68 | isi)\n\t\tbasic_machine=m68k-isi\n\t\tos=-sysv\n\t\t;;\n\tm88k-omron*)\n\t\tbasic_machine=m88k-omron\n\t\t;;\n\tmagnum | m3230)\n\t\tbasic_machine=mips-mips\n\t\tos=-sysv\n\t\t;;\n\tmerlin)\n\t\tbasic_machine=ns32k-utek\n\t\tos=-sysv\n\t\t;;\n\tmingw32)\n\t\tbasic_machine=i386-pc\n\t\tos=-mingw32\n\t\t;;\n\tminiframe)\n\t\tbasic_machine=m68000-convergent\n\t\t;;\n\t*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)\n\t\tbasic_machine=m68k-atari\n\t\tos=-mint\n\t\t;;\n\tmips3*-*)\n\t\tbasic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`\n\t\t;;\n\tmips3*)\n\t\tbasic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown\n\t\t;;\n\tmmix*)\n\t\tbasic_machine=mmix-knuth\n\t\tos=-mmixware\n\t\t;;\n\tmonitor)\n\t\tbasic_machine=m68k-rom68k\n\t\tos=-coff\n\t\t;;\n\tmorphos)\n\t\tbasic_machine=powerpc-unknown\n\t\tos=-morphos\n\t\t;;\n\tmsdos)\n\t\tbasic_machine=i386-pc\n\t\tos=-msdos\n\t\t;;\n\tmvs)\n\t\tbasic_machine=i370-ibm\n\t\tos=-mvs\n\t\t;;\n\tncr3000)\n\t\tbasic_machine=i486-ncr\n\t\tos=-sysv4\n\t\t;;\n\tnetbsd386)\n\t\tbasic_machine=i386-unknown\n\t\tos=-netbsd\n\t\t;;\n\tnetwinder)\n\t\tbasic_machine=armv4l-rebel\n\t\tos=-linux\n\t\t;;\n\tnews | news700 | news800 | news900)\n\t\tbasic_machine=m68k-sony\n\t\tos=-newsos\n\t\t;;\n\tnews1000)\n\t\tbasic_machine=m68030-sony\n\t\tos=-newsos\n\t\t;;\n\tnews-3600 | risc-news)\n\t\tbasic_machine=mips-sony\n\t\tos=-newsos\n\t\t;;\n\tnecv70)\n\t\tbasic_machine=v70-nec\n\t\tos=-sysv\n\t\t;;\n\tnext | m*-next )\n\t\tbasic_machine=m68k-next\n\t\tcase $os in\n\t\t    -nextstep* )\n\t\t\t;;\n\t\t    -ns2*)\n\t\t      os=-nextstep2\n\t\t\t;;\n\t\t    *)\n\t\t      os=-nextstep3\n\t\t\t;;\n\t\tesac\n\t\t;;\n\tnh3000)\n\t\tbasic_machine=m68k-harris\n\t\tos=-cxux\n\t\t;;\n\tnh[45]000)\n\t\tbasic_machine=m88k-harris\n\t\tos=-cxux\n\t\t;;\n\tnindy960)\n\t\tbasic_machine=i960-intel\n\t\tos=-nindy\n\t\t;;\n\tmon960)\n\t\tbasic_machine=i960-intel\n\t\tos=-mon960\n\t\t;;\n\tnonstopux)\n\t\tbasic_machine=mips-compaq\n\t\tos=-nonstopux\n\t\t;;\n\tnp1)\n\t\tbasic_machine=np1-gould\n\t\t;;\n\tnsr-tandem)\n\t\tbasic_machine=nsr-tandem\n\t\t;;\n\top50n-* | op60c-*)\n\t\tbasic_machine=hppa1.1-oki\n\t\tos=-proelf\n\t\t;;\n\tor32 | or32-*)\n\t\tbasic_machine=or32-unknown\n\t\tos=-coff\n\t\t;;\n\tOSE68000 | ose68000)\n\t\tbasic_machine=m68000-ericsson\n\t\tos=-ose\n\t\t;;\n\tos68k)\n\t\tbasic_machine=m68k-none\n\t\tos=-os68k\n\t\t;;\n\tpa-hitachi)\n\t\tbasic_machine=hppa1.1-hitachi\n\t\tos=-hiuxwe2\n\t\t;;\n\tparagon)\n\t\tbasic_machine=i860-intel\n\t\tos=-osf\n\t\t;;\n\tpbd)\n\t\tbasic_machine=sparc-tti\n\t\t;;\n\tpbb)\n\t\tbasic_machine=m68k-tti\n\t\t;;\n\tpc532 | pc532-*)\n\t\tbasic_machine=ns32k-pc532\n\t\t;;\n\tpentium | p5 | k5 | k6 | nexgen | viac3)\n\t\tbasic_machine=i586-pc\n\t\t;;\n\tpentiumpro | p6 | 6x86 | athlon | athlon_*)\n\t\tbasic_machine=i686-pc\n\t\t;;\n\tpentiumii | pentium2)\n\t\tbasic_machine=i686-pc\n\t\t;;\n\tpentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)\n\t\tbasic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tpentiumpro-* | p6-* | 6x86-* | athlon-*)\n\t\tbasic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tpentiumii-* | pentium2-*)\n\t\tbasic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tpn)\n\t\tbasic_machine=pn-gould\n\t\t;;\n\tpower)\tbasic_machine=power-ibm\n\t\t;;\n\tppc)\tbasic_machine=powerpc-unknown\n\t\t;;\n\tppc-*)\tbasic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tppcle | powerpclittle | ppc-le | powerpc-little)\n\t\tbasic_machine=powerpcle-unknown\n\t\t;;\n\tppcle-* | powerpclittle-*)\n\t\tbasic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tppc64)\tbasic_machine=powerpc64-unknown\n\t\t;;\n\tppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tppc64le | powerpc64little | ppc64-le | powerpc64-little)\n\t\tbasic_machine=powerpc64le-unknown\n\t\t;;\n\tppc64le-* | powerpc64little-*)\n\t\tbasic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tps2)\n\t\tbasic_machine=i386-ibm\n\t\t;;\n\tpw32)\n\t\tbasic_machine=i586-unknown\n\t\tos=-pw32\n\t\t;;\n\trom68k)\n\t\tbasic_machine=m68k-rom68k\n\t\tos=-coff\n\t\t;;\n\trm[46]00)\n\t\tbasic_machine=mips-siemens\n\t\t;;\n\trtpc | rtpc-*)\n\t\tbasic_machine=romp-ibm\n\t\t;;\n\ts390 | s390-*)\n\t\tbasic_machine=s390-ibm\n\t\t;;\n\ts390x | s390x-*)\n\t\tbasic_machine=s390x-ibm\n\t\t;;\n\tsa29200)\n\t\tbasic_machine=a29k-amd\n\t\tos=-udi\n\t\t;;\n\tsb1)\n\t\tbasic_machine=mipsisa64sb1-unknown\n\t\t;;\n\tsb1el)\n\t\tbasic_machine=mipsisa64sb1el-unknown\n\t\t;;\n\tsequent)\n\t\tbasic_machine=i386-sequent\n\t\t;;\n\tsh)\n\t\tbasic_machine=sh-hitachi\n\t\tos=-hms\n\t\t;;\n\tsparclite-wrs | simso-wrs)\n\t\tbasic_machine=sparclite-wrs\n\t\tos=-vxworks\n\t\t;;\n\tsps7)\n\t\tbasic_machine=m68k-bull\n\t\tos=-sysv2\n\t\t;;\n\tspur)\n\t\tbasic_machine=spur-unknown\n\t\t;;\n\tst2000)\n\t\tbasic_machine=m68k-tandem\n\t\t;;\n\tstratus)\n\t\tbasic_machine=i860-stratus\n\t\tos=-sysv4\n\t\t;;\n\tsun2)\n\t\tbasic_machine=m68000-sun\n\t\t;;\n\tsun2os3)\n\t\tbasic_machine=m68000-sun\n\t\tos=-sunos3\n\t\t;;\n\tsun2os4)\n\t\tbasic_machine=m68000-sun\n\t\tos=-sunos4\n\t\t;;\n\tsun3os3)\n\t\tbasic_machine=m68k-sun\n\t\tos=-sunos3\n\t\t;;\n\tsun3os4)\n\t\tbasic_machine=m68k-sun\n\t\tos=-sunos4\n\t\t;;\n\tsun4os3)\n\t\tbasic_machine=sparc-sun\n\t\tos=-sunos3\n\t\t;;\n\tsun4os4)\n\t\tbasic_machine=sparc-sun\n\t\tos=-sunos4\n\t\t;;\n\tsun4sol2)\n\t\tbasic_machine=sparc-sun\n\t\tos=-solaris2\n\t\t;;\n\tsun3 | sun3-*)\n\t\tbasic_machine=m68k-sun\n\t\t;;\n\tsun4)\n\t\tbasic_machine=sparc-sun\n\t\t;;\n\tsun386 | sun386i | roadrunner)\n\t\tbasic_machine=i386-sun\n\t\t;;\n\tsv1)\n\t\tbasic_machine=sv1-cray\n\t\tos=-unicos\n\t\t;;\n\tsymmetry)\n\t\tbasic_machine=i386-sequent\n\t\tos=-dynix\n\t\t;;\n\tt3d)\n\t\tbasic_machine=alpha-cray\n\t\tos=-unicos\n\t\t;;\n\tt3e)\n\t\tbasic_machine=alphaev5-cray\n\t\tos=-unicos\n\t\t;;\n\tt90)\n\t\tbasic_machine=t90-cray\n\t\tos=-unicos\n\t\t;;\n        tic4x | c4x*)\n\t\tbasic_machine=tic4x-unknown\n\t\tos=-coff\n\t\t;;\n\ttic54x | c54x*)\n\t\tbasic_machine=tic54x-unknown\n\t\tos=-coff\n\t\t;;\n\ttx39)\n\t\tbasic_machine=mipstx39-unknown\n\t\t;;\n\ttx39el)\n\t\tbasic_machine=mipstx39el-unknown\n\t\t;;\n\ttoad1)\n\t\tbasic_machine=pdp10-xkl\n\t\tos=-tops20\n\t\t;;\n\ttower | tower-32)\n\t\tbasic_machine=m68k-ncr\n\t\t;;\n\tudi29k)\n\t\tbasic_machine=a29k-amd\n\t\tos=-udi\n\t\t;;\n\tultra3)\n\t\tbasic_machine=a29k-nyu\n\t\tos=-sym1\n\t\t;;\n\tv810 | necv810)\n\t\tbasic_machine=v810-nec\n\t\tos=-none\n\t\t;;\n\tvaxv)\n\t\tbasic_machine=vax-dec\n\t\tos=-sysv\n\t\t;;\n\tvms)\n\t\tbasic_machine=vax-dec\n\t\tos=-vms\n\t\t;;\n\tvpp*|vx|vx-*)\n\t\tbasic_machine=f301-fujitsu\n\t\t;;\n\tvxworks960)\n\t\tbasic_machine=i960-wrs\n\t\tos=-vxworks\n\t\t;;\n\tvxworks68)\n\t\tbasic_machine=m68k-wrs\n\t\tos=-vxworks\n\t\t;;\n\tvxworks29k)\n\t\tbasic_machine=a29k-wrs\n\t\tos=-vxworks\n\t\t;;\n\tw65*)\n\t\tbasic_machine=w65-wdc\n\t\tos=-none\n\t\t;;\n\tw89k-*)\n\t\tbasic_machine=hppa1.1-winbond\n\t\tos=-proelf\n\t\t;;\n\twindows32)\n\t\tbasic_machine=i386-pc\n\t\tos=-windows32-msvcrt\n\t\t;;\n\txps | xps100)\n\t\tbasic_machine=xps100-honeywell\n\t\t;;\n\tymp)\n\t\tbasic_machine=ymp-cray\n\t\tos=-unicos\n\t\t;;\n\tz8k-*-coff)\n\t\tbasic_machine=z8k-unknown\n\t\tos=-sim\n\t\t;;\n\tnone)\n\t\tbasic_machine=none-none\n\t\tos=-none\n\t\t;;\n\n# Here we handle the default manufacturer of certain CPU types.  It is in\n# some cases the only manufacturer, in others, it is the most popular.\n\tw89k)\n\t\tbasic_machine=hppa1.1-winbond\n\t\t;;\n\top50n)\n\t\tbasic_machine=hppa1.1-oki\n\t\t;;\n\top60c)\n\t\tbasic_machine=hppa1.1-oki\n\t\t;;\n\tromp)\n\t\tbasic_machine=romp-ibm\n\t\t;;\n\trs6000)\n\t\tbasic_machine=rs6000-ibm\n\t\t;;\n\tvax)\n\t\tbasic_machine=vax-dec\n\t\t;;\n\tpdp10)\n\t\t# there are many clones, so DEC is not a safe bet\n\t\tbasic_machine=pdp10-unknown\n\t\t;;\n\tpdp11)\n\t\tbasic_machine=pdp11-dec\n\t\t;;\n\twe32k)\n\t\tbasic_machine=we32k-att\n\t\t;;\n\tsh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele)\n\t\tbasic_machine=sh-unknown\n\t\t;;\n\tsh64)\n\t\tbasic_machine=sh64-unknown\n\t\t;;\n\tsparc | sparcv9 | sparcv9b)\n\t\tbasic_machine=sparc-sun\n\t\t;;\n\tcydra)\n\t\tbasic_machine=cydra-cydrome\n\t\t;;\n\torion)\n\t\tbasic_machine=orion-highlevel\n\t\t;;\n\torion105)\n\t\tbasic_machine=clipper-highlevel\n\t\t;;\n\tmac | mpw | mac-mpw)\n\t\tbasic_machine=m68k-apple\n\t\t;;\n\tpmac | pmac-mpw)\n\t\tbasic_machine=powerpc-apple\n\t\t;;\n\t*-unknown)\n\t\t# Make sure to match an already-canonicalized machine name.\n\t\t;;\n\t*)\n\t\techo Invalid configuration \\`$1\\': machine \\`$basic_machine\\' not recognized 1>&2\n\t\texit 1\n\t\t;;\nesac\n\n# Here we canonicalize certain aliases for manufacturers.\ncase $basic_machine in\n\t*-digital*)\n\t\tbasic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`\n\t\t;;\n\t*-commodore*)\n\t\tbasic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`\n\t\t;;\n\t*)\n\t\t;;\nesac\n\n# Decode manufacturer-specific aliases for certain operating systems.\n\nif [ x\"$os\" != x\"\" ]\nthen\ncase $os in\n        # First match some system type aliases\n        # that might get confused with valid system types.\n\t# -solaris* is a basic system type, with this one exception.\n\t-solaris1 | -solaris1.*)\n\t\tos=`echo $os | sed -e 's|solaris1|sunos4|'`\n\t\t;;\n\t-solaris)\n\t\tos=-solaris2\n\t\t;;\n\t-svr4*)\n\t\tos=-sysv4\n\t\t;;\n\t-unixware*)\n\t\tos=-sysv4.2uw\n\t\t;;\n\t-gnu/linux*)\n\t\tos=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`\n\t\t;;\n\t# First accept the basic system types.\n\t# The portable systems comes first.\n\t# Each alternative MUST END IN A *, to match a version number.\n\t# -sysv* is not here because it comes later, after sysvr4.\n\t-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \\\n\t      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\\\n\t      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \\\n\t      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \\\n\t      | -aos* \\\n\t      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \\\n\t      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \\\n\t      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \\\n\t      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \\\n\t      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \\\n\t      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \\\n\t      | -chorusos* | -chorusrdb* \\\n\t      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \\\n\t      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \\\n\t      | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \\\n\t      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \\\n\t      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \\\n\t      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \\\n\t      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*)\n\t# Remember, each alternative MUST END IN *, to match a version number.\n\t\t;;\n\t-qnx*)\n\t\tcase $basic_machine in\n\t\t    x86-* | i*86-*)\n\t\t\t;;\n\t\t    *)\n\t\t\tos=-nto$os\n\t\t\t;;\n\t\tesac\n\t\t;;\n\t-nto*)\n\t\tos=-nto-qnx\n\t\t;;\n\t-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \\\n\t      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \\\n\t      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)\n\t\t;;\n\t-mac*)\n\t\tos=`echo $os | sed -e 's|mac|macos|'`\n\t\t;;\n\t-linux*)\n\t\tos=`echo $os | sed -e 's|linux|linux-gnu|'`\n\t\t;;\n\t-sunos5*)\n\t\tos=`echo $os | sed -e 's|sunos5|solaris2|'`\n\t\t;;\n\t-sunos6*)\n\t\tos=`echo $os | sed -e 's|sunos6|solaris3|'`\n\t\t;;\n\t-opened*)\n\t\tos=-openedition\n\t\t;;\n\t-wince*)\n\t\tos=-wince\n\t\t;;\n\t-osfrose*)\n\t\tos=-osfrose\n\t\t;;\n\t-osf*)\n\t\tos=-osf\n\t\t;;\n\t-utek*)\n\t\tos=-bsd\n\t\t;;\n\t-dynix*)\n\t\tos=-bsd\n\t\t;;\n\t-acis*)\n\t\tos=-aos\n\t\t;;\n\t-atheos*)\n\t\tos=-atheos\n\t\t;;\n\t-386bsd)\n\t\tos=-bsd\n\t\t;;\n\t-ctix* | -uts*)\n\t\tos=-sysv\n\t\t;;\n\t-nova*)\n\t\tos=-rtmk-nova\n\t\t;;\n\t-ns2 )\n\t\tos=-nextstep2\n\t\t;;\n\t-nsk*)\n\t\tos=-nsk\n\t\t;;\n\t# Preserve the version number of sinix5.\n\t-sinix5.*)\n\t\tos=`echo $os | sed -e 's|sinix|sysv|'`\n\t\t;;\n\t-sinix*)\n\t\tos=-sysv4\n\t\t;;\n\t-triton*)\n\t\tos=-sysv3\n\t\t;;\n\t-oss*)\n\t\tos=-sysv3\n\t\t;;\n\t-svr4)\n\t\tos=-sysv4\n\t\t;;\n\t-svr3)\n\t\tos=-sysv3\n\t\t;;\n\t-sysvr4)\n\t\tos=-sysv4\n\t\t;;\n\t# This must come after -sysvr4.\n\t-sysv*)\n\t\t;;\n\t-ose*)\n\t\tos=-ose\n\t\t;;\n\t-es1800*)\n\t\tos=-ose\n\t\t;;\n\t-xenix)\n\t\tos=-xenix\n\t\t;;\n\t-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)\n\t\tos=-mint\n\t\t;;\n\t-none)\n\t\t;;\n\t*)\n\t\t# Get rid of the `-' at the beginning of $os.\n\t\tos=`echo $os | sed 's/[^-]*-//'`\n\t\techo Invalid configuration \\`$1\\': system \\`$os\\' not recognized 1>&2\n\t\texit 1\n\t\t;;\nesac\nelse\n\n# Here we handle the default operating systems that come with various machines.\n# The value should be what the vendor currently ships out the door with their\n# machine or put another way, the most popular os provided with the machine.\n\n# Note that if you're going to try to match \"-MANUFACTURER\" here (say,\n# \"-sun\"), then you have to tell the case statement up towards the top\n# that MANUFACTURER isn't an operating system.  Otherwise, code above\n# will signal an error saying that MANUFACTURER isn't an operating\n# system, and we'll never get to this point.\n\ncase $basic_machine in\n\t*-acorn)\n\t\tos=-riscix1.2\n\t\t;;\n\tarm*-rebel)\n\t\tos=-linux\n\t\t;;\n\tarm*-semi)\n\t\tos=-aout\n\t\t;;\n\t# This must come before the *-dec entry.\n\tpdp10-*)\n\t\tos=-tops20\n\t\t;;\n\tpdp11-*)\n\t\tos=-none\n\t\t;;\n\t*-dec | vax-*)\n\t\tos=-ultrix4.2\n\t\t;;\n\tm68*-apollo)\n\t\tos=-domain\n\t\t;;\n\ti386-sun)\n\t\tos=-sunos4.0.2\n\t\t;;\n\tm68000-sun)\n\t\tos=-sunos3\n\t\t# This also exists in the configure program, but was not the\n\t\t# default.\n\t\t# os=-sunos4\n\t\t;;\n\tm68*-cisco)\n\t\tos=-aout\n\t\t;;\n\tmips*-cisco)\n\t\tos=-elf\n\t\t;;\n\tmips*-*)\n\t\tos=-elf\n\t\t;;\n\tor32-*)\n\t\tos=-coff\n\t\t;;\n\t*-tti)\t# must be before sparc entry or we get the wrong os.\n\t\tos=-sysv3\n\t\t;;\n\tsparc-* | *-sun)\n\t\tos=-sunos4.1.1\n\t\t;;\n\t*-be)\n\t\tos=-beos\n\t\t;;\n\t*-ibm)\n\t\tos=-aix\n\t\t;;\n\t*-wec)\n\t\tos=-proelf\n\t\t;;\n\t*-winbond)\n\t\tos=-proelf\n\t\t;;\n\t*-oki)\n\t\tos=-proelf\n\t\t;;\n\t*-hp)\n\t\tos=-hpux\n\t\t;;\n\t*-hitachi)\n\t\tos=-hiux\n\t\t;;\n\ti860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)\n\t\tos=-sysv\n\t\t;;\n\t*-cbm)\n\t\tos=-amigaos\n\t\t;;\n\t*-dg)\n\t\tos=-dgux\n\t\t;;\n\t*-dolphin)\n\t\tos=-sysv3\n\t\t;;\n\tm68k-ccur)\n\t\tos=-rtu\n\t\t;;\n\tm88k-omron*)\n\t\tos=-luna\n\t\t;;\n\t*-next )\n\t\tos=-nextstep\n\t\t;;\n\t*-sequent)\n\t\tos=-ptx\n\t\t;;\n\t*-crds)\n\t\tos=-unos\n\t\t;;\n\t*-ns)\n\t\tos=-genix\n\t\t;;\n\ti370-*)\n\t\tos=-mvs\n\t\t;;\n\t*-next)\n\t\tos=-nextstep3\n\t\t;;\n\t*-gould)\n\t\tos=-sysv\n\t\t;;\n\t*-highlevel)\n\t\tos=-bsd\n\t\t;;\n\t*-encore)\n\t\tos=-bsd\n\t\t;;\n\t*-sgi)\n\t\tos=-irix\n\t\t;;\n\t*-siemens)\n\t\tos=-sysv4\n\t\t;;\n\t*-masscomp)\n\t\tos=-rtu\n\t\t;;\n\tf30[01]-fujitsu | f700-fujitsu)\n\t\tos=-uxpv\n\t\t;;\n\t*-rom68k)\n\t\tos=-coff\n\t\t;;\n\t*-*bug)\n\t\tos=-coff\n\t\t;;\n\t*-apple)\n\t\tos=-macos\n\t\t;;\n\t*-atari*)\n\t\tos=-mint\n\t\t;;\n\t*)\n\t\tos=-none\n\t\t;;\nesac\nfi\n\n# Here we handle the case where we know the os, and the CPU type, but not the\n# manufacturer.  We pick the logical manufacturer.\nvendor=unknown\ncase $basic_machine in\n\t*-unknown)\n\t\tcase $os in\n\t\t\t-riscix*)\n\t\t\t\tvendor=acorn\n\t\t\t\t;;\n\t\t\t-sunos*)\n\t\t\t\tvendor=sun\n\t\t\t\t;;\n\t\t\t-aix*)\n\t\t\t\tvendor=ibm\n\t\t\t\t;;\n\t\t\t-beos*)\n\t\t\t\tvendor=be\n\t\t\t\t;;\n\t\t\t-hpux*)\n\t\t\t\tvendor=hp\n\t\t\t\t;;\n\t\t\t-mpeix*)\n\t\t\t\tvendor=hp\n\t\t\t\t;;\n\t\t\t-hiux*)\n\t\t\t\tvendor=hitachi\n\t\t\t\t;;\n\t\t\t-unos*)\n\t\t\t\tvendor=crds\n\t\t\t\t;;\n\t\t\t-dgux*)\n\t\t\t\tvendor=dg\n\t\t\t\t;;\n\t\t\t-luna*)\n\t\t\t\tvendor=omron\n\t\t\t\t;;\n\t\t\t-genix*)\n\t\t\t\tvendor=ns\n\t\t\t\t;;\n\t\t\t-mvs* | -opened*)\n\t\t\t\tvendor=ibm\n\t\t\t\t;;\n\t\t\t-ptx*)\n\t\t\t\tvendor=sequent\n\t\t\t\t;;\n\t\t\t-vxsim* | -vxworks* | -windiss*)\n\t\t\t\tvendor=wrs\n\t\t\t\t;;\n\t\t\t-aux*)\n\t\t\t\tvendor=apple\n\t\t\t\t;;\n\t\t\t-hms*)\n\t\t\t\tvendor=hitachi\n\t\t\t\t;;\n\t\t\t-mpw* | -macos*)\n\t\t\t\tvendor=apple\n\t\t\t\t;;\n\t\t\t-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)\n\t\t\t\tvendor=atari\n\t\t\t\t;;\n\t\t\t-vos*)\n\t\t\t\tvendor=stratus\n\t\t\t\t;;\n\t\tesac\n\t\tbasic_machine=`echo $basic_machine | sed \"s/unknown/$vendor/\"`\n\t\t;;\nesac\n\necho $basic_machine$os\nexit 0\n\n# Local variables:\n# eval: (add-hook 'write-file-hooks 'time-stamp)\n# time-stamp-start: \"timestamp='\"\n# time-stamp-format: \"%:y-%02m-%02d\"\n# time-stamp-end: \"'\"\n# End:\n"
  },
  {
    "path": "vm/src/from_squeak/unix/cmake/configure",
    "content": "#!/bin/sh\n\n# Last edited: 2010-04-10 19:38:50 by piumarta on ubuntu\n\nRELEASE_TAG=\"\"\n\nhelp() {\n    cat <<EOF\nUsage: $0 [options...]\nOptions include:\n  --help                print this message and then exit\n  --src=<directory>     look for generated interpreter sources in <directory>\n  --prefix=<directory>  install into <prefix>/{bin,lib,man}\n  --CFLAGS=<flags>      override default compiler flags\n  --without-<plugin>    do not build the named plugin\n  --without-gl          disable everything that depends on OpenGL\n  --without-SUGAR       disable support for SUGAR environment\nNotes:\n1. By default the CFLAGS will be set to create optimised binaries.  If you are\n   debugging the VM you probably want to use '--CFLAGS=-g' when invoking this\n   script.\n2. --CFLAGS and -without-* settings will be preserved in subsequent invocations\n   of CMake, including those driven implicitly by changed dependencies.  If you\n   need to turn off a seting (to re-enable a plugin or restore the default\n   CFLAGS) just give the relevant options with empty arguments, like this:\n     $0 --CFLAGS= --without-UUIDPlugin=\n3. Wizards can set any CMake variable from the command line with the option:\n     --<CMakeVariableName>=<value>\n4. In case it isn't already obvious, this is NOT the autotools 'configure'\n   script.  It is named so that 'configure; make' works in the expected way.\n5. Bug reports, bug fixes and suggestions for improvement should be sent to the\n   author (Ian Piumarta) at: <firstName> (at) <lastName> (dot) com\nEOF\n    stop=true\n}\n\nconfig=\"`dirname \\\"$0\\\"`\"\nunix=\"`dirname \\\"${config}\\\"`\"\nguess=`\"${config}\"/config.guess`\nhost=`\"${config}\"/config.sub ${guess}`\nsrc=\"${unix}/src\"\n\nstop=false\ncflags=\"\"\n\nerror () {\n    echo \"$*\" >&2\n}\n\ndump () {\n    echo \"VM_VERSION = ${VM_VERSION}\"\n    echo \"unix       = ${unix}\"\n    echo \"config     = ${config}\"\n    echo \"host       = ${host}\"\n    echo \"src        = ${src}\"\n    echo \"args       = ${args}\"\n    stop=true\n}\n\nwhile [ $# -gt 0 ]; do\n    case \"$1\" in\n\t--help)\t\t\thelp; exit 0;;\n\t--debug-configure)\tdump;;\n\t--src=*)\t\trel=\"`echo \\\"$1\\\" | sed 's/\\-\\-src=//'`\"\n\t\t\t\tif test -d \"${rel}\"; then\n\t\t\t\t    src=\"`(cd \\\"${rel}\\\";  pwd)`\"\n\t\t\t\telse\n\t\t\t\t    src=\"${rel}\"\n\t\t\t\tfi\n\t\t\t\targs=\"${args} -DOPT--src=${src}\";;\n\t--CFLAGS=*)\t\tcflags=\"`echo \\\"$1\\\" | sed 's/\\-\\-CFLAGS=//'`\";;\n\t-CFLAGS=*)\t\tcflags=\"`echo \\\"$1\\\" | sed 's/\\-CFLAGS=//'`\";;\n\t--*=*)\t\t\targs=\"${args} -DOPT${1}\";;\n\t--*)\t\t\targs=\"${args} -DOPT${1}=1\";;\n\t-*)\t\t\targs=\"${args} ${1}\";;\n\t*)\t\t\terror \"unknown option: $1\";;\n    esac\n    shift\ndone\n\ninterp_h=\"${src}/vm/interp.h\"\n\nif test ! -f \"${interp_h}\"; then\n    echo \"problem locating generated source file: ${interp_h}\"\n    echo \"use --src=<directory> to locate sources relative to ${unix}\"\n    echo \"current value is: --src=\\\"${src}\\\"\"\n    exit 1\nfi\n\nvmmversion=\"`tr '\\015 ' '\\012\\012' < \\\"${interp_h}\\\" | sed '1,/VMMaker/d;q'`\"\n\nif test -d \"${unix}/.svn\"; then\n    svnversion=`svn info \"${unix}/ChangeLog\" | fgrep Revision: | awk '{print $2}'`\n    echo \"${svnversion}\" > \"${unix}/svnversion\"\nelse\n    svnversion=`cat \"${unix}/svnversion\"`\nfi\n\nVM_VERSION=\"${vmmversion}-${svnversion}${RELEASE_TAG}\"\nPLATFORM_SOURCE_VERSION=\"${svnversion}\"\n\nif ${stop}; then\n    exit 1\nfi\n\necho \"-- Configuring squeak ${VM_VERSION} for ${host}\"\necho \"-- Using source directory ${src}\"\n\nif test -n \"${cflags}\"; then\n    cmake \"${unix}\" -DVM_HOST=\"${host}\" -DVM_VERSION=\"${VM_VERSION}\" -DPLATFORM_SOURCE_VERSION=\"${PLATFORM_SOURCE_VERSION}\" -DOPT--CMAKE_C_FLAGS=\"${cflags}\" ${args}\nelse\n    cmake \"${unix}\" -DVM_HOST=\"${host}\" -DVM_VERSION=\"${VM_VERSION}\" -DPLATFORM_SOURCE_VERSION=\"${PLATFORM_SOURCE_VERSION}\"                                  ${args}\nfi\n"
  },
  {
    "path": "vm/src/from_squeak/unix/cmake/disabledPlugins.c",
    "content": "typedef struct {\n  void *a, *b, *c;\n} sqExport;\n\n#define disabled(NAME) sqExport NAME##_exports = { 0, 0, 0 };\n"
  },
  {
    "path": "vm/src/from_squeak/unix/cmake/gnuify",
    "content": "#!/bin/sh\n# \n# Last edited: 2009-09-17 08:47:30 by piumarta on ubuntu.piumarta.com\n\ngfy=\"$1\"\nsrc=\"$2\"\ndst=\"$3\"\nlog=\"${dst}.log\"\n\nrm -f \"${dst}\" \"${log}\"\n\nexec >> \"${log}\" 2>&1\n\nset -x\n\ntry () { \"$1\" -f \"${gfy}\" \"${src}\" > \"${dst}\" 2>> \"${log}\"; }\n\ntry gawk || try awk || cp -p \"${src}\" \"${dst}\"\n"
  },
  {
    "path": "vm/src/from_squeak/unix/cmake/gnuify.awk",
    "content": "#!/usr/bin/awk -f\n# \n# Rewrite the interpreter source in $1 to use GNU C extensions, writing the\n# modified file to stdout.\n# \n# Author: Ian.Piumarta@INRIA.Fr\n#\n# Last edited: 2009-09-17 08:34:23 by piumarta on ubuntu.piumarta.com\n\n#   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n#                              listed elsewhere in this file.\n#   All rights reserved.\n#   \n#   This file is part of Unix Squeak.\n# \n#   Permission is hereby granted, free of charge, to any person obtaining a copy\n#   of this software and associated documentation files (the \"Software\"), to deal\n#   in the Software without restriction, including without limitation the rights\n#   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n#   copies of the Software, and to permit persons to whom the Software is\n#   furnished to do so, subject to the following conditions:\n# \n#   The above copyright notice and this permission notice shall be included in\n#   all copies or substantial portions of the Software.\n# \n#   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n#   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n#   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n#   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n#   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n#   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n#   SOFTWARE.\n\nBEGIN {\n  print \"/* This file has been post-processed for GNU C */\\n\\n\";\n# print \"copying first section of file\" > \"/dev/stderr\";\n  stage= 0;\n}\n\n/#include \"sq.h\"/ {\n  print \"#include \\\"sqGnu.h\\\"\\n\";\n  next;\n}\n\n# An inlining comment means the interpreter was not inlined\n\n/inline\\: true/ {\n# print NR, $0 > \"/dev/stderr\";\n# print \"\" > \"/dev/stderr\";\n# print \"*** interpreter was not inlined: bailing out! ***\" > \"/dev/stderr\";\n# print \"\" > \"/dev/stderr\";\n  stage= -1;\n}\n\n\n(stage == 0) && /^int interpret\\(void\\) \\{/ {\n# print \"interpret: adding static register assignments\" > \"/dev/stderr\";\n  stage= 1;\n  print;\n  next;\n}\n\n(stage == 0) && /^sqInt interpret\\(void\\) \\{/ {\n# print \"interpret: adding static register assignments\" > \"/dev/stderr\";\n  stage= 1;\n  print;\n  next;\n}\n\n(stage == 1) && /^    char\\* localIP;/ {\n  print \"    register char* localIP IP_REG;\";\n  next;\n}\n\n(stage == 1) && /^register struct foo \\* foo = &fum;/ {\n  print \"    register struct foo * foo GP_REG= &fum;\";\n  next;\n}\n\n(stage == 1) && /^    char\\* localSP;/ {\n  print \"    register char* localSP SP_REG;\";\n  next;\n}\n\n(stage == 1) && /^    int currentBytecode;/ {\n  print \"    register int currentBytecode CB_REG;\";\n  next;\n}\n\n(stage == 1) && /^    sqInt currentBytecode;/ {\n  print \"    register int currentBytecode CB_REG;\";\n  next;\n}\n\n(stage == 1) && /^$/ {\n# print \"interpret: adding bytecode dispatch table\" > \"/dev/stderr\";\n  print \"    JUMP_TABLE;\\n\";\n# print \"interpret: rewriting case labels and outer breaks\" > \"/dev/stderr\";\n  stage= 2;\n  FS=\" \";\n# FS=\"[ \t:]+\";\n  next;\n}\n\n(stage == 2) && /^\t\tcase / {\n  print \"\t\tCASE(\" (($NF) + 0) \")\";\n# print \"\t\tCASE(\" $3 \")\";\n  next;\n}\n\n(stage == 2) && /^\t\t\tbreak;/ {\n  print \"\t\t\tBREAK;\";\n  next;\n}\n\n(stage == 2) && /^\\}/ {\n  stage= -1;\n  print;\n  next;\n}\n\n(stage == 3) && /^int primitiveResponse\\(/ {\n  print;\n# print \"primitiveResponse: adding primitive dispatch table\" > \"/dev/stderr\";\n  print \"    PRIM_TABLE;\\n\";\n# print \"primitiveResponse: rewriting case labels\" > \"/dev/stderr\";\n  stage= 4;\n  FS=\" \";\n# FS=\"[ \t:]+\";\n  next;\n}\n\n(stage == 3) && /^sqInt primitiveResponse\\(/ {\n  print;\n# print \"primitiveResponse: adding primitive dispatch table\" > \"/dev/stderr\";\n  print \"    PRIM_TABLE;\\n\";\n# print \"primitiveResponse: rewriting case labels\" > \"/dev/stderr\";\n  stage= 4;\n  FS=\" \";\n# FS=\"[ \t:]+\";\n  next;\n}\n\n\n(stage == 4) && /^\tswitch \\(primitiveIndex\\) \\{/ {\n# print \"primitiveResponse: adding primitive dispatch\" > \"/dev/stderr\";\n  print \"\tPRIM_DISPATCH;\";\n  print;\n  next;\n}\n\n(stage == 4) && /^\tswitch \\(foo->primitiveIndex\\) \\{/ {\n# print \"primitiveResponse: adding primitive dispatch\" > \"/dev/stderr\";\n  print \"\tPRIM_DISPATCH;\";\n  print;\n  next;\n}\n\n(stage == 4) && /^\tcase / {\n  print \"\tCASE(\" (($NF) + 0) \")\";\n# print \"\tCASE(\" $3 \")\";\n  next;\n}\n\n(stage == 4) && /^\\}/ {\n# print \"copying last section of file\" > \"/dev/stderr\";\n  stage= -1;\n  FS=\" \";\n  print;\n  next;\n}\n\n# default\n{\n  print;\n  next;\n}\n\nEND {\n  if (stage != -1) {\n    print \"#error GNUIFICATION FAILED (\", stage, \")\"\n  }\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/cmake/squeak.in",
    "content": "#!/bin/sh\n# \n# Launch squeakvm from the command line or a menu script, with a good\n# plugin path, text encodings and pulseaudio kludge\n# \n# Last edited: 2010-05-13 14:15:38 by piumarta on emilia-2.local\n\nPATH=/usr/bin:/bin\n\nrealpath () {\n    path=\"$1\"\n    while test -L \"${path}\"; do\n\tdir=`dirname \"${path}\"`\n\tdir=`cd \"${dir}\" && pwd -P`\n\tpath=`basename \"${path}\"`\n\tpath=`ls -l \"${dir}/${path}\" | sed 's,.* -> ,,'`\n\tif test `expr \"${path}\" : \"/\"` -eq 0; then\n\t    path=\"${dir}/${path}\"\n\tfi\n    done\n    if test -d \"${path}\"; then\n\t(cd \"${path}\" && pwd -P)\n    else\n\tdir=`dirname \"${path}\"`\n\tbase=`basename \"${path}\"`\n\t(cd \"${dir}\" && echo \"`pwd -P`/${base}\")\n    fi\n}\n\nbindir=`realpath \"${0}\"`\nbindir=`dirname  \"${bindir}\"`\nprefix=`dirname  \"${bindir}\"`\nlibdir=\"${prefix}/lib/squeak\"\nplgdir=\"${libdir}/[version]\"\nuseoss=\"[useoss]\"\nvm=\"squeakvm\"\nplugins=\"\"\nwrapper=\"\"\n\nfor opt in $*; do\n    case ${opt} in\n\t-vm-sound*)     useoss=\"false\";;\n\t-vm)            case \"$2\" in sound*) useoss=\"false\"; esac;;\n    esac\ndone\n\n# find the vm and set the plugin path\n\nif test -x \"${plgdir}/${vm}\"; then\t# bin/squeak -> lib/squeak/x.y-z/squeakvm\n    vm=\"${plgdir}/${vm}\"\n    plugins=\"${plgdir}\"\nelif test -x \"${bindir}/${vm}\"; then\t# bld/squeak -> bld/squeakvm\n    vm=\"${bindir}/${vm}\"\n    plugins=\"${bindir}/%n\"\nelif test -x `which ${vm}`; then\n    vm=`which ${vm}`\n    plugins=\"\"\nelse    \n    echo \"cannot find ${vm}\" >&2\n    exit 1\nfi\n\n# command-line overrides environment, so communicate anything we decide here via the environment\n\nif test -z \"${SQUEAK_PATHENC}\";  then SQUEAK_PATHENC=\"UTF-8\";  export SQUEAK_PATHENC;  fi\nif test -z \"${SQUEAK_ENCODING}\"; then SQUEAK_ENCODING=\"UTF-8\"; export SQUEAK_ENCODING; fi\n\nif test -z \"${SQUEAK_PLUGINS}\"; then\n    if test -n \"${plugins}\"; then\n\tSQUEAK_PLUGINS=\"${plugins}\"\n\texport SQUEAK_PLUGINS\n    fi\nfi\n\n# deal with pulseaudio if it is running\n\nif test -z \"${SQUEAK_VM}\"; then\n    if ${useoss}; then\n\tif pulseaudio --check 2>/dev/null; then\n\t    if padsp true 2>/dev/null; then\n\t\twrapper=\"padsp\"\n\t\tSQUEAK_VM=\"sound-OSS\"\n\t\texport SQUEAK_VM\n\t    fi\n\tfi\n    fi\nfi\n\n# fix broken locales\n\nif test -z \"$LC_ALL\"; then\n    LC_ALL=\"$LANG\"\n    export LC_ALL\nfi\n\n# debug output\n\nif test \"0$SQUEAK_DEBUG\" -gt \"0\"; then\n    set | fgrep SQUEAK_\n    set -x\nfi\n\n# run the vm\n\nexec ${wrapper} \"${vm}\" \"$@\"\n"
  },
  {
    "path": "vm/src/from_squeak/unix/cmake/squeak.sh.in",
    "content": "#!/bin/sh\n# \n# Launch squeak from a menu, prompting for and/or installing an image\n# \n# Last edited: 2010-04-09 04:35:35 by piumarta on ubuntu\n\nPATH=/usr/bin:/bin\n\nif pwd -P 2>/dev/null 1>&2; then pwd=\"pwd -P\"; else pwd=\"pwd\"; fi\n\nme=`basename $0`\nbindir=`dirname $0`\nbindir=`cd ${bindir}; ${pwd}`\nprefix=`dirname ${bindir}`\nlibdir=\"${prefix}/lib/squeak\"\nvm=\"squeak\"\n\n# find a way to display dialogues\n\nif test -n \"$DISPLAY\" -a -x \"`which kdialog 2>/dev/null`\"; then\n    error ()\t\t{ kdialog --error \"${me}: $*\"; exit 1; }\n    confirm ()\t\t{ if kdialog --yesno \"${1} ${2}?\"; then result=\"${2}\"; else result=\"\"; fi; }\n    chooseItem ()\t{ title=\"$1\"; shift; result=`kdialog --combobox \"${title}\" $*`; }\n    findFile ()\t\t{ result=`kdialog --title \"$1\" --getopenfilename . '*.image'`; }\n    findDirectory ()\t{ result=`kdialog --title \"$1\" --getexistingdirectory .`; }\nelif [ -n \"$DISPLAY\" -a -x \"`which zenity 2>/dev/null`\" ]; then\n    error ()\t\t{ zenity --error --text \"${me}: $*\"; exit 1; }\n    confirm ()\t\t{ if zenity --question --text=\"${1} ${2}?\"; then result=\"${2}\"; else result=\"\"; fi; }\n    chooseItem ()\t{ title=\"$1\"; shift; result=`zenity --title \"${title}\" --list --column Images $*`; }\n    findFile ()\t\t{ result=`zenity --title \"$1\" --file-selection --file-filter='*.image'`; }\n    findDirectory ()\t{ result=`zenity --title \"$1\" --file-selection --directory`; }\nelse\n    error ()\t\t{ echo \"${me}: $*\" >&2; exit 1; }\n    confirm ()\t\t{ error \"this cannot happen\"; }\n    chooseItem ()\t{ error \"this cannot happen\"; }\n    findFile ()\t\t{ error \"no image name specified\"; }\n    findDirectory ()\t{ error \"this cannot happen\"; }\nfi\n\n# succeed if there are two or more arguments\n\nplural () { test -n \"$2\"; }\n\n# find the VM\n\nif test -x \"${bindir}/${vm}\"; then\n    vm=\"${bindir}/${vm}\"\nelif test -x \"`which ${vm} 2>/dev/null`\"; then\n    vm=\"`which ${vm} 2>/dev/null`\"\nelse\n    error \"Cannot find ${vm}\"\nfi\n\n# if we have arguments then assume an image name was given or we came\n# from a command line\n\nif test $# -gt 0; then\n    exec \"${vm}\" \"$@\"\nfi\n\nfindFile \"Choose a saved image to resume or cancel to install a new one\"\n\nif test -z \"${result}\"; then\n    images=\"\"\n    if test -d \"${libdir}\"; then\n\timages=`cd \"${libdir}\"; ls *.image 2>/dev/null`\n    fi\n    if test -z \"${images}\"; then\n\terror \"no image name specified and no images found in ${libdir}\"\n\texit 1\n    fi\n    if plural ${images}; then\n\tchooseItem \"Choose an image to install\" ${images}\n    else\n\tconfirm \"Install image\" ${images}\n    fi\n    if test -z \"${result}\"; then\n\texit 0\n    fi\n    image=${result}\n    changes=`basename ${image} .image`.changes\n    findDirectory \"Choose a destination directory for the image\"\n    if test -z \"${result}\"; then\n\texit 0\n    fi\n    if test -e \"${result}/${image}\"; then\n\tconfirm \"Overwrite existing ${image} in\" \"${result}\"\n\tif test -z \"${result}\"; then\n\t    exit 0;\n\tfi\n    fi\n    cp -p \"${libdir}/${image}\"   \"${result}/.\"\n    cp -p \"${libdir}/${changes}\" \"${result}/.\"\n    ln -s \"${libdir}\"/*.sources  \"${result}/.\"\n    image=\"${result}/${image}\"\nelse\n    image=\"${result}\"\nfi\n\ncd \"`dirname ${image}`\"\nexec \"${vm}\" \"`basename ${image}`\"\n"
  },
  {
    "path": "vm/src/from_squeak/unix/cmake/testDoubleWordAlignment.c",
    "content": "int f(void *i)\n{\n  *(double *)i= *(double *)(i + 4);\n  return *(char *)i;\n}\n\nint main()\n{\n  char b[12];\n  b[0]=1; b[1]=2; b[2]=3; b[3]=4; b[4]=0; b[5]=0; b[6]=0; b[7]=0; b[8]=0; b[9]=0; b[10]=0; b[11]=0;\n  return f(b);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/cmake/testDoubleWordOrder.c",
    "content": "union { double d; int i[2]; } d;\n\nint main(void)\n{\n  d.d= 1.0;\n  return d.i[0] == 0;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/cmake/testLanginfoCodeset.c",
    "content": "#include <langinfo.h>\n\nint main(int argc, char **argv)\n{\n  char *cs= nl_langinfo(CODESET);\n  return 0;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/cmake/verstamp",
    "content": "#!/bin/sh\n# \n# Write a version stamp into $1.  $2 is the compiler name.\n# \n# Last edited: 2002-06-08 18:32:53 by piumarta on emilia.inria.fr\n\nif test -f $1; then\n  SERIAL=`head -1 $1 | cut -d ' ' -f 3 | sed 's/;//'`\n  SERIAL=`expr $SERIAL + 1`\nelse\n  SERIAL=1\nfi\n\nif expr \"$2\" : \".*gcc\" >/dev/null ; then\n  CC=`$2 -v 2>&1 | tail -1 | sed 's/.*based on//g' | awk '{print $1 , $3} '`\nelse\n  CC=$2\nfi\n\ncat <<_EOF >$1\nint vm_serial= $SERIAL;\nchar *vm_date= \"`date`\";\nchar *cc_version= \"$CC\";\nchar *ux_version= \"`uname -a | sed 's, unknown,,g'`\";\n_EOF\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/Makefile",
    "content": "configure : .force\n\t./mkacinc > acplugins.m4\n\taclocal\n\tautoconf\n\trm acplugins.m4\n\n.force :\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/Makefile.cpp-plg.in",
    "content": "# Makefile.plg.in -- default rules for plugins\t\t-*- makefile -*-\n# \n#   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n#                              listed elsewhere in this file.\n#   All rights reserved.\n#   \n#   This file is part of Unix Squeak.\n# \n#   Permission is hereby granted, free of charge, to any person obtaining a copy\n#   of this software and associated documentation files (the \"Software\"), to deal\n#   in the Software without restriction, including without limitation the rights\n#   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n#   copies of the Software, and to permit persons to whom the Software is\n#   furnished to do so, subject to the following conditions:\n# \n#   The above copyright notice and this permission notice shall be included in\n#   all copies or substantial portions of the Software.\n# \n#   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n#   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n#   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n#   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n#   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n#   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n#   SOFTWARE.\n# \n# Author: ian.piumarta@inria.fr\n# \n# Last edited: Wed Sep  1 19:01:21 PDT 2010 by eliot; alternative for c++\n\n[make_cfg]\n[make_plg]\n\nXINCLUDES\t= [includes]\nOBJS\t\t= [targets]\nTARGET\t\t= [target]\nPLIBS\t\t= [plibs]\n\n[make_inc]\n\n$(TARGET) : $(OBJS) Makefile\n\t$(LINKXX) $(TARGET) $(OBJS) $(PLIBS)\n\t$(RANLIB) $(TARGET)\n\n[make_targets]\n\n.force :\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/Makefile.in",
    "content": "# Makefile.in for Unix Squeak using VMMaker\t\t-*- makefile -*-\n# \n#   Copyright (C) 1996-2005 by Ian Piumarta and other authors/contributors\n#                              listed elsewhere in this file.\n#   All rights reserved.\n#   \n#   This file is part of Unix Squeak.\n# \n#   Permission is hereby granted, free of charge, to any person obtaining a copy\n#   of this software and associated documentation files (the \"Software\"), to deal\n#   in the Software without restriction, including without limitation the rights\n#   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n#   copies of the Software, and to permit persons to whom the Software is\n#   furnished to do so, subject to the following conditions:\n# \n#   The above copyright notice and this permission notice shall be included in\n#   all copies or substantial portions of the Software.\n# \n#   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n#   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n#   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n#   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n#   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n#   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n#   SOFTWARE.\n# \n# Author: ian.piumarta@inria.fr\n# \n# Last edited: Tue Mar  2 16:59:47 PST 2010 by eliot\n\n@make_cfg@\n@make_prg@\n\nla\t\t= .la\n\nSQLIBS\t\t= [targets]\nPLUGINS_LA\t= [plugins]\n\nsqueak\t\t= squeak\nsqueaksh\t= squeak.sh\nbinsqueaksh\t= bin.squeak.sh\n\nall : $(squeak) plugins squeak.1 $(npsqueak)\n\n# VM\n\n$(squeak) : config.sh $(SQLIBS) version.o\n\t$(LINK) $(squeak) $(SQLIBS) version.o $(LIBS) [plibs] vm/vm.a\n\t@echo\n\t@size $(squeak)\n\t@echo\n\t@./$(squeak) -version\n\t@echo\n\nversion.o : version.c\n\t$(COMPILE) version.o version.c\n\nversion.c : $(SQLIBS)\n\t${cfgdir}/verstamp version.c $(CC)\n\nplugins : config.sh $(PLUGINS_LA)\n\n# nuke everything but plugins.int & plugins.ext\n\nreallyclean:\n\tfor f in *; do case \"$$f\" in plugins.[ie][nx]t) ;; *) rm -rf $$f; esac; done\n\n# npsqueak\n\nnpsqueak : nps/npsqueak.so\n\nnps :\n\tmkdir nps\n\t$(SHELL) -ec 'cd nps; ln -s $(topdir)/platforms/unix/npsqueak/* .'\n\nnps/npsqueak.so : nps\n\t$(SHELL) -ec 'cd nps; $(MAKE) plgdir=$(plgdir) bindir=$(bindir) imgdir=$(imgdir)'\n\n# OSX app bundle\n\nosxdir=$(topdir)/platforms/unix/vm-display-Quartz\napp=Squeak-$(VM_MAJOR).$(VM_MINOR)-$(VM_RELEASE).app\nappdir=$(app)/Contents\n\nSqueak.app : squeak plugins Info.plist\n\t/bin/rm -rf $(app)\n\tmkdir -p\t\t\t$(appdir)/MacOS\n\tcp -p  squeak\t\t\t$(appdir)/MacOS/.\n\tcp -p  */.libs/*\t\t$(appdir)/MacOS/.\n\trm -f\t\t\t\t$(appdir)/MacOS/*.la\n\trm -f\t\t\t\t$(appdir)/MacOS/*.lai\n\tcp -p  Info.plist\t\t$(appdir)/.\n\tcp -p  $(osxdir)/PkgInfo\t$(appdir)/.\n\tcp -pr $(osxdir)/Resources\t$(appdir)/.\n\t-find $(app) -name '*~' | xargs rm -f\n\nbndl_version=${VM_VERSION} (${SQ_VERSION})\n\nInfo.plist : $(osxdir)/Info.plist.in $(osxdir)/mkinfo\n\t$(osxdir)/mkinfo $(osxdir)/Info.plist.in Info.plist.tmp \"${bndl_version}\"\n\tmv Info.plist.tmp Info.plist\n\n# OSX plugin bundle\n\nnposxdir=$(topdir)/platforms/unix/vm-display-Quartz\nnpapp=NPSqueak.bundle\nnpappdir=$(npapp)/Contents\n\nNPSqueak.bundle : NPSqueak plugins\n\t/bin/rm -rf $(npapp)\n\tmkdir -p\t\t\t$(npappdir)/MacOS\n\tcp -p  squeak\t\t\t$(npappdir)/MacOS/.\n\tcp -p  */.libs/*.so\t\t$(npappdir)/MacOS/.\n\tcp -p  Info.plist\t\t$(npappdir)/.\n\tcp -p  $(nposxdir)/PkgInfo\t$(npappdir)/.\n\tcp -pr $(nposxdir)/Resources\t$(npappdir)/.\n\t-find $(npapp) -name '*~' | xargs rm -f\n\nNPOBJS\t\t= vm-display-Quartz/sqUnixSafari.o vm-sound-MacOSX/sqUnixSoundMacOSX.o vm-display-Quartz/sqUnixQuartz.o\nNPLIBS\t\t= $(NPOBJS) -framework CoreAudio -framework AudioToolbox\n\nNPSqueak : config.sh $(SQLIBS) version.o $(NPOBJS)\n\tgcc -bundle -flat_namespace -undefined suppress -o NPSqueak \\\n\t  $(NPLIBS) $(SQLIBS) version.o $(LIBS)  vm/vm.a\n\n# manual page\n\nsqueak.1 : $(topdir)/platforms/unix/doc/squeak.1\n\t$(cfgdir)/mkman $(VM_MAJOR) $(VM_VERSION) \\\n\t  $(bindir) $(imgdir) $(plgdir) $(mandir) $(docdir) \\\n\t  < $(topdir)/platforms/unix/doc/squeak.1 > $@\n\n# install/distrib (these just get in the way -- suck 'em in from elsewhere)\n\n@Makefile_install@\n@Makefile_dist@\n@Makefile_rpm@\n@Makefile_deb@\n\n# VMM configuration changes\n\nconfig.sh : $(vmmcfg)/plugins.int $(vmmcfg)/plugins.ext\n\t./config.status\n\t@echo\n\t@echo \"configuration changed: please run make again\"\n\t@echo\n\t@exit 1\n\n[make_targets]\n\n.force :\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/Makefile.install",
    "content": "# Makefile.install for Unix Squeak using VMMaker\t\t-*- makefile -*-\n# \n# Author: ian.piumarta@inria.fr\n# \n# Last edited: 2005-03-22 13:05:47 by piumarta on squeak.hpl.hp.com\n\nDOCFILES\t= COPYING COPYRIGHT LICENSE \\\n\t\t  README.Contributing README.Keyboard README.Sound\n\nICONS\t\t= $(topdir)/platforms/unix/vm-display-Quartz/Resources/SqueakVM.icns\n\ninstall : install-squeak install-plugins install-doc $(install_nps)\n\nuninstall : uninstall-squeak uninstall-plugins uninstall-doc $(uninstall_nps)\n\n# squeak\n\ninstall-squeak : $(squeak)\n\t$(MKINSTALLDIRS) $(ROOT)$(plgdir)\n\t$(MKINSTALLDIRS) $(ROOT)$(bindir)\n\t$(INSTALL_PROG) $(squeak) $(ROOT)$(plgdir)\n\t$(INSTALL_SCRIPT) $(squeaksh) $(ROOT)$(exec_prefix)/$(squeak)\n\t$(INSTALL_SCRIPT) $(binsqueaksh) $(ROOT)$(bindir)/$(squeak)\n\tif test -n \"$(VM_APP_ICONS)\"; then \\\n\t  $(INSTALL_DATA) $(ICONS) $(ROOT)$(VM_APP_ICONS); \\\n\tfi\n\nuninstall-squeak : .force\n\tif test -n \"$(VM_APP_ICONS)\"; then \\\n\t  $(UNINSTALL) $(ROOT)$(VM_APP_ICONS); \\\n\tfi\n\t@$(UNINSTALL) $(ROOT)$(plgdir) $(squeak)\n\t@$(UNINSTALL) $(ROOT)$(bindir) $(squeak)\n\n# plugins\n\ninstall-plugins : plugins\n\t$(MKINSTALLDIRS) $(ROOT)$(plgdir)\n\t@list='$(PLUGINS_LA)'; for p in $$list; do \\\n\t  if test -f */$$p; then \\\n\t    echo \"$(LIBTOOL) --mode=install $(INSTALL_PROG) $$p $(ROOT)$(plgdir)/$$p\"; \\\n\t    $(LIBTOOL) --mode=install $(INSTALL_PROG) */$$p $(ROOT)$(plgdir)/$$p; \\\n\t  else :; fi; \\\n\tdone\n\t-rm $(ROOT)$(plgdir)/*.la\n\nuninstall-plugins : .force\n\t@list='$(PLUGINS_LA)'; for p in $$list; do \\\n\t  filename=$(ROOT)/$(plgdir)/`basename $$p .la`;\\\n\t  if test -f $$filename; then \\\n\t    echo \"$(LIBTOOL) --mode=uninstall rm -f $$filename\"; \\\n\t    $(LIBTOOL) --mode=uninstall rm -f $$filename; \\\n\t  else\n\t    echo \"$$filename does not exist\"; fi; \\\n\tdone\n\t@$(UNINSTALL) $(ROOT)$(plgdir)\n\n# doc\n\ninstall-doc : squeak.1\n\t$(MKINSTALLDIRS) $(ROOT)$(docdir)\n\t@list='$(DOCFILES)'; for f in $$list; do \\\n\t  echo $(INSTALL_DATA) $(topdir)/platforms/unix/doc/$$f $(ROOT)$(docdir); \\\n\t  $(INSTALL_DATA) $(topdir)/platforms/unix/doc/$$f $(ROOT)$(docdir); \\\n\tdone\n\tgzip -f9 $(ROOT)$(docdir)/*\n\t$(MKINSTALLDIRS) $(ROOT)$(mandir)/man1\n\t$(INSTALL_DATA) squeak.1 $(ROOT)$(mandir)/man1\n\trm -f $(ROOT)$(mandir)/man1/inisqueak.1 $(ROOT)$(mandir)/man1/inisqueak.1.gz\n\tif test -f $(ROOT)$(mandir)/man1/squeak.1; then $(LN) $(ROOT)$(mandir)/man1/squeak.1 $(ROOT)$(mandir)/man1/inisqueak.1; fi\n\tif test -f $(ROOT)$(mandir)/man1/squeak.1.gz; then $(LN) $(ROOT)$(mandir)/man1/squeak.1.gz $(ROOT)$(mandir)/man1/inisqueak.1.gz; fi\n\nuninstall-doc :\n\t@list='$(DOCFILES)'; for f in $$list; do \\\n\t  rm -fv $(ROOT)$(docdir)/$$f.gz; \\\n\tdone\n\t@$(UNINSTALL) $(ROOT)$(docdir) $(DOCFILES)\n\t@$(UNINSTALL) $(ROOT)$(mandir)/man1 squeak.1 inisqueak.1\n\n# image\n\ninstall-image : inisqueak $(topdir)/Squeak$(SQ_VERSION).image.gz $(topdir)/Squeak$(SQ_VERSION).changes.gz\n\t$(MKINSTALLDIRS) $(ROOT)$(imgdir)\n\t$(INSTALL_PROG) inisqueak $(ROOT)$(imgdir)\n\t$(INSTALL_DATA) $(topdir)/Squeak$(SQ_VERSION).image.gz $(ROOT)$(imgdir)\n\t$(INSTALL_DATA) $(topdir)/Squeak$(SQ_VERSION).changes.gz $(ROOT)$(imgdir)\n\t$(LN_S) Squeak$(SQ_VERSION).image.gz $(ROOT)$(imgdir)/squeak.image.gz\n\t$(LN_S) Squeak$(SQ_VERSION).changes.gz $(ROOT)$(imgdir)/squeak.changes.gz\n\t$(MKINSTALLDIRS) $(ROOT)$(bindir)\n\t( path=`$(cfgdir)/relpath $(bindir) $(imgdir)`; \\\n\t  cd $(ROOT)$(bindir); \\\n\t  rm -f inisqueak; \\\n\t  $(LN_S) $$path/inisqueak .; )\n\nuninstall-image :\n\t@$(UNINSTALL) $(ROOT)$(plgdir) Squeak$(SQ_VERSION).image.gz\n\t@$(UNINSTALL) $(ROOT)$(plgdir) Squeak$(SQ_VERSION).changes.gz\n\t@$(UNINSTALL) $(ROOT)$(plgdir) inisqueak\n\n# sources\n\ninstall-sources :\n\t$(MKINSTALLDIRS) $(ROOT)$(imgdir)\n\t$(INSTALL_DATA) $(topdir)/SqueakV$(SQ_MAJOR).sources $(ROOT)$(imgdir)\n\nuninstall-sources :\n\t@$(UNINSTALL) $(ROOT)$(imgdir) SqueakV$(SQ_MAJOR).sources\n\n# npsqueak\n\ninstall-npsqueak : npsqueak .force\n\t$(SHELL) -ec 'cd nps; $(MAKE) install ROOT=$(ROOT) VM_VERSION=$(VM_VERSION) plgdir=$(plgdir) bindir=$(bindir) imgdir=$(imgdir)'\n\nuninstall-npsqueak : npsqueak .force\n\t$(SHELL) -ec 'cd nps; $(MAKE) uninstall ROOT=$(ROOT) VM_VERSION=$(VM_VERSION) plgdir=$(plgdir) bindir=$(bindir) imgdir=$(imgdir)'\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/Makefile.plg.in",
    "content": "# Makefile.plg.in -- default rules for plugins\t\t-*- makefile -*-\n# \n#   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n#                              listed elsewhere in this file.\n#   All rights reserved.\n#   \n#   This file is part of Unix Squeak.\n# \n#   Permission is hereby granted, free of charge, to any person obtaining a copy\n#   of this software and associated documentation files (the \"Software\"), to deal\n#   in the Software without restriction, including without limitation the rights\n#   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n#   copies of the Software, and to permit persons to whom the Software is\n#   furnished to do so, subject to the following conditions:\n# \n#   The above copyright notice and this permission notice shall be included in\n#   all copies or substantial portions of the Software.\n# \n#   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n#   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n#   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n#   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n#   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n#   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n#   SOFTWARE.\n# \n# Author: ian.piumarta@inria.fr\n# \n# Last edited: 2006-10-18 10:13:37 by piumarta on emilia.local\n\n[make_cfg]\n[make_plg]\n\nXINCLUDES\t= [includes]\nOBJS\t\t= [targets]\nTARGET\t\t= [target]\nPLIBS\t\t= [plibs]\n\n[make_inc]\n\n$(TARGET) : $(OBJS) Makefile\n\t$(LINK) $(TARGET) $(OBJS) $(PLIBS)\n\t$(RANLIB) $(TARGET)\n\n[make_targets]\n\n.force :\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/README",
    "content": "Assuming you know how to update these files and want to run make to make a new\nconfigure, a word to the wise.  Do _not_ run make on eg. Mac OS X.  It will not\nproduce a valid configure.  Instead things will appear to work until libtool is\ninvoked.  libtool will go into an infinite recursion.  Instead, run make on\ne.g. linux.  make configure did work on e.g. Mac OS X 10.4 but at least on 10.6\nit fails.\n\nEliot Miranda\nJan 2010\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/Squeak.spec.in",
    "content": "Name: Squeak\nVersion: [version]\nRelease: [release]\nRequires: \nSummary: A portable implementation of the Smalltalk programming system.\nVendor: Squeak.org\nSource: [source]\nCopyright: Squeak Software License\nGroup: Development/Languages\nBuildRoot: /var/tmp/%{name}-root\n\n%description\n\nSqueak is a full-featured implementation of the Smalltalk programming\nlanguage and environment based on (and largely compatible with) the original\nSmalltalk-80 system.  Squeak has very powerful 2- and 3-D graphics, sound,\nvideo, MIDI, animation and other multimedia capabilities -- and one of the\nmost impressive development environments ever created.  It also includes a\ncustomisable framework for creating dynamic HTTP servers and interactively\nextensible Web sites.  The entire Squeak system is open source software,\ndistributed freely with a liberal license.  See <http://Squeak.org> for\nfurther information.\n\nThis package contains the binaries, libraries and data files needed to run\nversion [version] of Squeak.\n\n%prep\n%setup -q\n%build\n\nmkdir bld-rpm\ncd bld-rpm\n../platforms/unix/config/configure --prefix=/usr\nmake\n\n%install\n\nrm -rf $RPM_BUILD_ROOT\ncd bld-rpm\nmake install-bin install-image install-sources ROOT=$RPM_BUILD_ROOT\ncd ..\n# \n# package file lists\n# \nfind $RPM_BUILD_ROOT \\( -type f -o -type l \\) -print |\n  sed \"s,$RPM_BUILD_ROOT,,;s,^//,/,\" > sq-files\n\n%clean\n\necho \"rm -rf $RPM_BUILD_ROOT\"\necho \"rm -rf bld-rpm\"\n\n%files -f sq-files\n%files -f ffi-files ffi\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/acinclude.m4",
    "content": "# Local autoconf macros for configuring Unix Squeak\t\t-*- sh -*-\n# \n#   Copyright (C) 1996-2005 by Ian Piumarta and other authors/contributors\n#                              listed elsewhere in this file.\n#   All rights reserved.\n#   \n#   This file is part of Unix Squeak.\n# \n#   Permission is hereby granted, free of charge, to any person obtaining a copy\n#   of this software and associated documentation files (the \"Software\"), to deal\n#   in the Software without restriction, including without limitation the rights\n#   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n#   copies of the Software, and to permit persons to whom the Software is\n#   furnished to do so, subject to the following conditions:\n# \n#   The above copyright notice and this permission notice shall be included in\n#   all copies or substantial portions of the Software.\n# \n#   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n#   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n#   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n#   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n#   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n#   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n#   SOFTWARE.\n# \n# Author: Ian.Piumarta@squeakland.org\n# \n# Last edited: Tue Jan 26 11:07:40 PST 2010 by eliot\n\nAC_DEFUN([AC_CHECK_VMM_DIR],[\n  AC_MSG_CHECKING([sanity of generated src directory])\n  vmmcheck () {\n    if test ! ${2} ${3}; then\n      AC_MSG_RESULT(bad)\n      echo \"missing ${1}: ${3}\"\n      exit 1\n    fi\n  }\n  vmmcheck dir  -d ${vmmcfg}\n  vmmcheck file -f ${vmmcfg}/plugins.int\n  vmmcheck file -f ${vmmcfg}/plugins.ext\n  vmmcheck dir  -d ${vmmdir}\n  vmmcheck dir  -d ${vmmdir}/plugins\n  vmmcheck dir  -d ${vmmdir}/vm\n  vmmcheck file -f ${vmmdir}/vm/cogit.c\n  vmmcheck file -f ${vmmdir}/vm/cogit.h\n  vmmcheck file -f ${vmmdir}/vm/cogmethod.h\n  vmmcheck file -f ${vmmdir}/vm/cointerp.c\n  vmmcheck file -f ${vmmdir}/vm/cointerp.h\n  vmmcheck file -f ${vmmdir}/vm/gcc3x-cointerp.c\n  AC_MSG_RESULT(okay)])\n\n\nAC_DEFUN([AC_VM_VERSION],[\n  VM_MAJOR=$1\n  VM_MINOR=$2\n  VM_RELEASE=$3\n  SQ_MAJOR=$4\n  SQ_MINOR=$5\n  SQ_UPDATE=$6\n])\n\n\n\nAC_DEFUN([AC_CHECK_VERSION],[\n  gendir=\"${vmmdir}/vm\"\n  version=`${cfgdir}/version ${gendir}/cointerp.c`\n  SQ_MAJOR=`echo ${version} | cut -d ' ' -f 1`\n  SQ_MINOR=`echo ${version} | cut -d ' ' -f 2`\n  SQ_UPDATE=`echo ${version} | cut -d ' ' -f 3`\n])\n\nAC_SUBST(NM)\nAC_SUBST(LD)\n\nAC_DEFUN([AC_REQUIRE_SIZEOF],[\n  AC_MSG_CHECKING(\"size of $1\")\n  AC_TRY_RUN([#include <sys/types.h>\n\t      int main(){return(sizeof($1) == $2)?0:1;}],\n    AC_MSG_RESULT(\"okay\"),\n    AC_MSG_RESULT(\"bad\")\n    AC_MSG_ERROR(\"one or more basic data types has an incompatible size: giving up\"))])\n\n# Try to find a 64-bit integer data type.\n# NOTE: `long long' is 64 bits in ANSI C99 [ISO/IEC 9899:1999 (E)].\n\nAC_DEFUN([AC_CHECK_INT64_T],[\n  AC_CACHE_CHECK([for 64-bit integer type],ac_cv_int64_t,\n    AC_TRY_RUN([int main(){return(sizeof(long) == 8)?0:1;}],\n      ac_cv_int64_t=\"long\",\n      AC_TRY_RUN([int main(){return(sizeof(long long) == 8)?0:1;}],\n        ac_cv_int64_t=\"long long\",\n        ac_cv_int64_t=\"no\")))\n  if test \"$ac_cv_int64_t\" = \"\"; then\n    AC_MSG_ERROR([could not find a 64-bit integer type])\n  fi\n  SQUEAK_INT64_T=\"$ac_cv_int64_t\"\n  AC_DEFINE_UNQUOTED(squeakInt64, $ac_cv_int64_t)])\n  \n\nAC_DEFUN([AC_NEED_SUNOS_H],\n[case \"$host\" in\n  *-sunos*)\tAC_DEFINE(NEED_SUNOS_H, 1)\nesac])\n\n\nAC_DEFUN([AC_PROG_CC_WALL],\n[AC_PROG_CC\ntest \"$GCC\" = yes && WFLAGS=\"-Wall -Wno-unknown-pragmas\"\nAC_SUBST(WFLAGS)])\n\nAC_DEFUN([AC_GNU_OPT],\n[AC_MSG_CHECKING([for $host_cpu optimisation flags])\nac_optflags=\"no\"\nif test \"$GCC\" = yes; then\n  case $host_cpu in\n# Leave this to the configure command\n# i?86)\n#   ac_optflags=\"-fomit-frame-pointer\"\n#   ;;\n  powerpc|ppc)\n    ac_optflags=\"-O3 -funroll-loops -mcpu=750 -mno-fused-madd\"\n    ;;\n  esac\n  AC_DEFINE(VM_BUILD_STRING, [\"Unix built on \"__DATE__ \" \"__TIME__\" Compiler: \"__VERSION__])\nelse\n  ac_optflags=\"-O\"\n  ac_vm_build_date=\"`date`\"\n  AC_DEFINE(VM_BUILD_STRING, [\"Unix built on ${ac_vm_build_date}\"])\nfi\nif test \"$ac_optflags\" = \"no\"; then\n  AC_MSG_RESULT([(none)])\nelse\n  CFLAGS=\"$CFLAGS $ac_optflags\"\n  AC_MSG_RESULT(\"$ac_optflags\")\nfi])\n\nAC_DEFUN([AC_GNU_INTERP],\n[INTERP=\"cointerp\"\nAC_SUBST(INTERP)\nAC_PROG_AWK\nAC_MSG_CHECKING(whether we can compile gcc3x-cointerp.c)\nif test \"$GCC\" = \"yes\"; then\n  INTERP=\"gcc3x-$INTERP\"; AC_MSG_RESULT(yes)\nelse\n  AC_MSG_RESULT(no)\nfi])\n\nAC_DEFUN([AC_PROG_AS_GNU],\n[AC_CHECK_PROG(AS,as,as)\nAC_MSG_CHECKING(for GNU as)\ncase \"$GAS\" in\nyes|no) ;;\n*) if test \"$AS\" = \"as\" && as -v /dev/null </dev/null 2>&1 | fgrep -i gnu >/dev/null\n   then GAS=yes\n   else GAS=no\n   fi ;;\nesac\nAC_MSG_RESULT($GAS)])\n\nAC_DEFUN([AC_CHECK_ATEXIT],\n[AC_CACHE_CHECK([for atexit or on_exit], ac_cv_atexit,\n  AC_TRY_COMPILE([#include <stdlib.h>],[atexit(0);], ac_cv_atexit=\"atexit\",\n  AC_TRY_COMPILE([#include <stdlib.h>],[on_exit(0);], ac_cv_atexit=\"on_exit\",\n  ac_cv_atexit=\"no\")))\nif test \"$ac_cv_atexit\" != \"no\"; then\n  AC_DEFINE_UNQUOTED(AT_EXIT, $ac_cv_atexit)\nfi])\n\nAC_DEFUN([AC_CHECK_SOCKLEN_T],\n[AC_CACHE_CHECK([for socklen_t in sys/socket.h], ac_cv_socklen_t,\n  AC_TRY_COMPILE([#include <sys/socket.h>],[sizeof(socklen_t);],\n    ac_cv_socklen_t=\"yes\", ac_cv_socklen_t=\"no\"))\ntest \"$ac_cv_socklen_t\" != \"yes\" && AC_DEFINE(socklen_t, int)])\n\nAC_DEFUN([AC_CHECK_TZSET],\n[AC_CACHE_CHECK([for tzset], ac_cv_tzset,\n  AC_TRY_COMPILE([#include <time.h>],[tzet();],\n    ac_cv_tzset=\"yes\", ac_cv_tzset=\"no\"))\ntest \"$ac_cv_tzset\" != \"no\" && AC_DEFINE(HAVE_TZSET)])\n\nAC_DEFUN([AC_CHECK_GMTOFF],\n[AC_CACHE_CHECK([for gmtoff in struct tm], ac_cv_tm_gmtoff,\n  AC_TRY_COMPILE([#include <time.h>],[struct tm tm; tm.tm_gmtoff;],\n    ac_cv_tm_gmtoff=\"yes\", ac_cv_tm_gmtoff=\"no\"))\ntest \"$ac_cv_tm_gmtoff\" != \"no\" && AC_DEFINE(HAVE_TM_GMTOFF)])\n\nAC_DEFUN([AC_CHECK_TIMEZONE],\n[AC_CACHE_CHECK([for timezone and daylight variables], ac_cv_timezone,\n  AC_TRY_COMPILE([extern long timezone; extern int daylight;],[timezone;daylight;],\n    ac_cv_timezone=\"yes\", ac_cv_timezone=\"no\"))\ntest \"$ac_cv_timezone\" != \"no\" && AC_DEFINE(HAVE_TIMEZONE)])\n\nAC_DEFUN([AC_CHECK_GETHOSTNAME],\n[AC_CACHE_CHECK([for gethostname in unistd.h], ac_cv_gethostname_p,\n  AC_TRY_COMPILE([#include <unistd.h>],[return (int)gethostname;],\n    ac_cv_gethostname_p=\"yes\", ac_cv_gethostname_p=\"no\"))\ntest \"$ac_cv_gethostname_p\" = \"no\" && AC_DEFINE(NEED_GETHOSTNAME_P)])\n\n\nif test -x /bin/test; then\n  test=/bin/test\nelse\n  if test -x /usr/bin/test; then\n    test=/usr/bin/test\n  else\n    test=test\n  fi\nfi\n\n\nAC_DEFUN([AC_C_BYTEORDER],\n[AC_C_BIGENDIAN\nif test $ac_cv_c_bigendian != yes\nthen CFLAGS=\"$CFLAGS -DLSB_FIRST=1\"\nfi])\n\n\nAC_DEFUN([AC_C_DOUBLE_ALIGNMENT],\n[AC_CACHE_CHECK([whether unaligned access to doubles is ok], ac_cv_double_align,\n  AC_TRY_RUN([f(int i){*(double *)i=*(double *)(i+4);}\n              int main(){char b[[12]];f(b);return 0;}],\n    ac_cv_double_align=\"yes\", ac_cv_double_align=\"no\"))\ntest \"$ac_cv_double_align\" = \"no\" && AC_DEFINE(DOUBLE_WORD_ALIGNMENT)])\n\n# this assumes that libtool has already been configured and built --\n# if not then err on the side of conservatism.\nAC_DEFUN([AC_MODULE_LIB_PREFIX],\n[AC_CACHE_CHECK([for prefix to use for loadable modules], ac_cv_module_prefix,\nif test -x ./libtool &&\n   test \"`./libtool --config | fgrep need_lib_prefix`\" = \"need_lib_prefix=no\"\nthen ac_cv_module_prefix=\"(none)\";\nelse ac_cv_module_prefix=\"lib\"\nfi)\nAC_DEFINE_UNQUOTED(VM_MODULE_PREFIX,\"$mkfrags_lib_prefix\")\ntest \"$ac_cv_module_prefix\" = lib && mkfrags_lib_prefix=lib])\n\nAC_DEFUN([AC_64BIT_ARCH],\n[AC_MSG_CHECKING(for compiler flags to force 32-bit addresses)\ncase $host in\n  alpha*)\n    CFLAGS_32=\"-taso\"\n    test \"$GCC\" = \"yes\" && CC=\"\\$(utldir)/decgcc\"\n    ;;\nesac\nAC_MSG_RESULT($CFLAGS_32)])\n\n\n### plugin support\n\n\n# AC_PLUGIN_SUBST(varname,value)\n\nAC_DEFUN([AC_PLUGIN_DISABLE_PLUGIN],[\n  AC_MSG_RESULT([******** disabling $1])\n  disabled_plugins=\"${disabled_plugins} $1\"])\n  \nAC_DEFUN([AC_PLUGIN_DISABLE],[\n  AC_PLUGIN_DISABLE_PLUGIN(${plugin})])\n  \nAC_DEFUN([AC_PLUGIN_USE_LIB],[\n  plibs=\"${plibs} $1\"])\n\nAC_DEFUN([AC_PLUGIN_DEFINE_UNQUOTED],[\n  echo 's%[\\['$1'\\]]%'$2'%g' >> ${plugin}.sub])\n\n# AC_PLUGIN_SEARCH_LIBS(function,libs...)\n\nAC_DEFUN([AC_PLUGIN_SEARCH_LIBS],[\n  AC_SEARCH_LIBS($1,$2,,\n    AC_MSG_RESULT([******** disabling ${plugin} due to missing libraries])\n    disabled_plugins=\"${disabled_plugins} ${plugin}\")])\n\n# AC_PLUGIN_CHECK_LIB(lib,func,ok,bad)\n\nAC_DEFUN([AC_PLUGIN_CHECK_LIB],[\n  AC_CHECK_LIB($1,$2,\n    plibs=\"${plibs} $1\",\n    AC_MSG_RESULT([******** disabling ${plugin} due to missing libraries])\n    disabled_plugins=\"${disabled_plugins} ${plugin}\")])\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/aclocal.m4",
    "content": "# generated automatically by aclocal 1.9.6 -*- Autoconf -*-\n\n# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,\n# 2005  Free Software Foundation, Inc.\n# This file is free software; the Free Software Foundation\n# gives unlimited permission to copy and/or distribute it,\n# with or without modifications, as long as this notice is preserved.\n\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY, to the extent permitted by law; without\n# even the implied warranty of MERCHANTABILITY or FITNESS FOR A\n# PARTICULAR PURPOSE.\n\n# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-\n\n# serial 48 AC_PROG_LIBTOOL\n\n\n# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)\n# -----------------------------------------------------------\n# If this macro is not defined by Autoconf, define it here.\nm4_ifdef([AC_PROVIDE_IFELSE],\n         [],\n         [m4_define([AC_PROVIDE_IFELSE],\n\t         [m4_ifdef([AC_PROVIDE_$1],\n\t\t           [$2], [$3])])])\n\n\n# AC_PROG_LIBTOOL\n# ---------------\nAC_DEFUN([AC_PROG_LIBTOOL],\n[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl\ndnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX\ndnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.\n  AC_PROVIDE_IFELSE([AC_PROG_CXX],\n    [AC_LIBTOOL_CXX],\n    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX\n  ])])\ndnl And a similar setup for Fortran 77 support\n  AC_PROVIDE_IFELSE([AC_PROG_F77],\n    [AC_LIBTOOL_F77],\n    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77\n])])\n\ndnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.\ndnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run\ndnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.\n  AC_PROVIDE_IFELSE([AC_PROG_GCJ],\n    [AC_LIBTOOL_GCJ],\n    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],\n      [AC_LIBTOOL_GCJ],\n      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],\n\t[AC_LIBTOOL_GCJ],\n      [ifdef([AC_PROG_GCJ],\n\t     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])\n       ifdef([A][M_PROG_GCJ],\n\t     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])\n       ifdef([LT_AC_PROG_GCJ],\n\t     [define([LT_AC_PROG_GCJ],\n\t\tdefn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])\n])])# AC_PROG_LIBTOOL\n\n\n# _AC_PROG_LIBTOOL\n# ----------------\nAC_DEFUN([_AC_PROG_LIBTOOL],\n[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl\nAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl\nAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl\nAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl\n\n# This can be used to rebuild libtool when needed\nLIBTOOL_DEPS=\"$ac_aux_dir/ltmain.sh\"\n\n# Always use our own libtool.\nLIBTOOL='$(SHELL) $(top_builddir)/libtool'\nAC_SUBST(LIBTOOL)dnl\n\n# Prevent multiple expansion\ndefine([AC_PROG_LIBTOOL], [])\n])# _AC_PROG_LIBTOOL\n\n\n# AC_LIBTOOL_SETUP\n# ----------------\nAC_DEFUN([AC_LIBTOOL_SETUP],\n[AC_PREREQ(2.50)dnl\nAC_REQUIRE([AC_ENABLE_SHARED])dnl\nAC_REQUIRE([AC_ENABLE_STATIC])dnl\nAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl\nAC_REQUIRE([AC_CANONICAL_HOST])dnl\nAC_REQUIRE([AC_CANONICAL_BUILD])dnl\nAC_REQUIRE([AC_PROG_CC])dnl\nAC_REQUIRE([AC_PROG_LD])dnl\nAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl\nAC_REQUIRE([AC_PROG_NM])dnl\n\nAC_REQUIRE([AC_PROG_LN_S])dnl\nAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl\n# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!\nAC_REQUIRE([AC_OBJEXT])dnl\nAC_REQUIRE([AC_EXEEXT])dnl\ndnl\n\nAC_LIBTOOL_SYS_MAX_CMD_LEN\nAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE\nAC_LIBTOOL_OBJDIR\n\nAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl\n_LT_AC_PROG_ECHO_BACKSLASH\n\ncase $host_os in\naix3*)\n  # AIX sometimes has problems with the GCC collect2 program.  For some\n  # reason, if we set the COLLECT_NAMES environment variable, the problems\n  # vanish in a puff of smoke.\n  if test \"X${COLLECT_NAMES+set}\" != Xset; then\n    COLLECT_NAMES=\n    export COLLECT_NAMES\n  fi\n  ;;\nesac\n\n# Sed substitution that helps us do robust quoting.  It backslashifies\n# metacharacters that are still active within double-quoted strings.\nXsed='sed -e 1s/^X//'\n[sed_quote_subst='s/\\([\\\\\"\\\\`$\\\\\\\\]\\)/\\\\\\1/g']\n\n# Same as above, but do not quote variable references.\n[double_quote_subst='s/\\([\\\\\"\\\\`\\\\\\\\]\\)/\\\\\\1/g']\n\n# Sed substitution to delay expansion of an escaped shell variable in a\n# double_quote_subst'ed string.\ndelay_variable_subst='s/\\\\\\\\\\\\\\\\\\\\\\$/\\\\\\\\\\\\$/g'\n\n# Sed substitution to avoid accidental globbing in evaled expressions\nno_glob_subst='s/\\*/\\\\\\*/g'\n\n# Constants:\nrm=\"rm -f\"\n\n# Global variables:\ndefault_ofile=libtool\ncan_build_shared=yes\n\n# All known linkers require a `.a' archive for static linking (except MSVC,\n# which needs '.lib').\nlibext=a\nltmain=\"$ac_aux_dir/ltmain.sh\"\nofile=\"$default_ofile\"\nwith_gnu_ld=\"$lt_cv_prog_gnu_ld\"\n\nAC_CHECK_TOOL(AR, ar, false)\nAC_CHECK_TOOL(RANLIB, ranlib, :)\nAC_CHECK_TOOL(STRIP, strip, :)\n\nold_CC=\"$CC\"\nold_CFLAGS=\"$CFLAGS\"\n\n# Set sane defaults for various variables\ntest -z \"$AR\" && AR=ar\ntest -z \"$AR_FLAGS\" && AR_FLAGS=cru\ntest -z \"$AS\" && AS=as\ntest -z \"$CC\" && CC=cc\ntest -z \"$LTCC\" && LTCC=$CC\ntest -z \"$LTCFLAGS\" && LTCFLAGS=$CFLAGS\ntest -z \"$DLLTOOL\" && DLLTOOL=dlltool\ntest -z \"$LD\" && LD=ld\ntest -z \"$LN_S\" && LN_S=\"ln -s\"\ntest -z \"$MAGIC_CMD\" && MAGIC_CMD=file\ntest -z \"$NM\" && NM=nm\ntest -z \"$SED\" && SED=sed\ntest -z \"$OBJDUMP\" && OBJDUMP=objdump\ntest -z \"$RANLIB\" && RANLIB=:\ntest -z \"$STRIP\" && STRIP=:\ntest -z \"$ac_objext\" && ac_objext=o\n\n# Determine commands to create old-style static archives.\nold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'\nold_postinstall_cmds='chmod 644 $oldlib'\nold_postuninstall_cmds=\n\nif test -n \"$RANLIB\"; then\n  case $host_os in\n  openbsd*)\n    old_postinstall_cmds=\"$old_postinstall_cmds~\\$RANLIB -t \\$oldlib\"\n    ;;\n  *)\n    old_postinstall_cmds=\"$old_postinstall_cmds~\\$RANLIB \\$oldlib\"\n    ;;\n  esac\n  old_archive_cmds=\"$old_archive_cmds~\\$RANLIB \\$oldlib\"\nfi\n\n_LT_CC_BASENAME([$compiler])\n\n# Only perform the check for file, if the check method requires it\ncase $deplibs_check_method in\nfile_magic*)\n  if test \"$file_magic_cmd\" = '$MAGIC_CMD'; then\n    AC_PATH_MAGIC\n  fi\n  ;;\nesac\n\nAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)\nAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],\nenable_win32_dll=yes, enable_win32_dll=no)\n\nAC_ARG_ENABLE([libtool-lock],\n    [AC_HELP_STRING([--disable-libtool-lock],\n\t[avoid locking (might break parallel builds)])])\ntest \"x$enable_libtool_lock\" != xno && enable_libtool_lock=yes\n\nAC_ARG_WITH([pic],\n    [AC_HELP_STRING([--with-pic],\n\t[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],\n    [pic_mode=\"$withval\"],\n    [pic_mode=default])\ntest -z \"$pic_mode\" && pic_mode=default\n\n# Use C for the default configuration in the libtool script\ntagname=\nAC_LIBTOOL_LANG_C_CONFIG\n_LT_AC_TAGCONFIG\n])# AC_LIBTOOL_SETUP\n\n\n# _LT_AC_SYS_COMPILER\n# -------------------\nAC_DEFUN([_LT_AC_SYS_COMPILER],\n[AC_REQUIRE([AC_PROG_CC])dnl\n\n# If no C compiler was specified, use CC.\nLTCC=${LTCC-\"$CC\"}\n\n# If no C compiler flags were specified, use CFLAGS.\nLTCFLAGS=${LTCFLAGS-\"$CFLAGS\"}\n\n# Allow CC to be a program name with arguments.\ncompiler=$CC\n])# _LT_AC_SYS_COMPILER\n\n\n# _LT_CC_BASENAME(CC)\n# -------------------\n# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.\nAC_DEFUN([_LT_CC_BASENAME],\n[for cc_temp in $1\"\"; do\n  case $cc_temp in\n    compile | *[[\\\\/]]compile | ccache | *[[\\\\/]]ccache ) ;;\n    distcc | *[[\\\\/]]distcc | purify | *[[\\\\/]]purify ) ;;\n    \\-*) ;;\n    *) break;;\n  esac\ndone\ncc_basename=`$echo \"X$cc_temp\" | $Xsed -e 's%.*/%%' -e \"s%^$host_alias-%%\"`\n])\n\n\n# _LT_COMPILER_BOILERPLATE\n# ------------------------\n# Check for compiler boilerplate output or warnings with\n# the simple compiler test code.\nAC_DEFUN([_LT_COMPILER_BOILERPLATE],\n[ac_outfile=conftest.$ac_objext\nprintf \"$lt_simple_compile_test_code\" >conftest.$ac_ext\neval \"$ac_compile\" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err\n_lt_compiler_boilerplate=`cat conftest.err`\n$rm conftest*\n])# _LT_COMPILER_BOILERPLATE\n\n\n# _LT_LINKER_BOILERPLATE\n# ----------------------\n# Check for linker boilerplate output or warnings with\n# the simple link test code.\nAC_DEFUN([_LT_LINKER_BOILERPLATE],\n[ac_outfile=conftest.$ac_objext\nprintf \"$lt_simple_link_test_code\" >conftest.$ac_ext\neval \"$ac_link\" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err\n_lt_linker_boilerplate=`cat conftest.err`\n$rm conftest*\n])# _LT_LINKER_BOILERPLATE\n\n\n# _LT_AC_SYS_LIBPATH_AIX\n# ----------------------\n# Links a minimal program and checks the executable\n# for the system default hardcoded library path. In most cases,\n# this is /usr/lib:/lib, but when the MPI compilers are used\n# the location of the communication and MPI libs are included too.\n# If we don't find anything, use the default library path according\n# to the aix ld manual.\nAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],\n[AC_LINK_IFELSE(AC_LANG_PROGRAM,[\naix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\\(.*\\)$/\\1/; p; }\n}'`\n# Check for a 64-bit object if we didn't find anything.\nif test -z \"$aix_libpath\"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\\(.*\\)$/\\1/; p; }\n}'`; fi],[])\nif test -z \"$aix_libpath\"; then aix_libpath=\"/usr/lib:/lib\"; fi\n])# _LT_AC_SYS_LIBPATH_AIX\n\n\n# _LT_AC_SHELL_INIT(ARG)\n# ----------------------\nAC_DEFUN([_LT_AC_SHELL_INIT],\n[ifdef([AC_DIVERSION_NOTICE],\n\t     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],\n\t [AC_DIVERT_PUSH(NOTICE)])\n$1\nAC_DIVERT_POP\n])# _LT_AC_SHELL_INIT\n\n\n# _LT_AC_PROG_ECHO_BACKSLASH\n# --------------------------\n# Add some code to the start of the generated configure script which\n# will find an echo command which doesn't interpret backslashes.\nAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],\n[_LT_AC_SHELL_INIT([\n# Check that we are running under the correct shell.\nSHELL=${CONFIG_SHELL-/bin/sh}\n\ncase X$ECHO in\nX*--fallback-echo)\n  # Remove one level of quotation (which was required for Make).\n  ECHO=`echo \"$ECHO\" | sed 's,\\\\\\\\\\[$]\\\\[$]0,'[$]0','`\n  ;;\nesac\n\necho=${ECHO-echo}\nif test \"X[$]1\" = X--no-reexec; then\n  # Discard the --no-reexec flag, and continue.\n  shift\nelif test \"X[$]1\" = X--fallback-echo; then\n  # Avoid inline document here, it may be left over\n  :\nelif test \"X`($echo '\\t') 2>/dev/null`\" = 'X\\t' ; then\n  # Yippee, $echo works!\n  :\nelse\n  # Restart under the correct shell.\n  exec $SHELL \"[$]0\" --no-reexec ${1+\"[$]@\"}\nfi\n\nif test \"X[$]1\" = X--fallback-echo; then\n  # used as fallback echo\n  shift\n  cat <<EOF\n[$]*\nEOF\n  exit 0\nfi\n\n# The HP-UX ksh and POSIX shell print the target directory to stdout\n# if CDPATH is set.\n(unset CDPATH) >/dev/null 2>&1 && unset CDPATH\n\nif test -z \"$ECHO\"; then\nif test \"X${echo_test_string+set}\" != Xset; then\n# find a string as large as possible, as long as the shell can cope with it\n  for cmd in 'sed 50q \"[$]0\"' 'sed 20q \"[$]0\"' 'sed 10q \"[$]0\"' 'sed 2q \"[$]0\"' 'echo test'; do\n    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...\n    if (echo_test_string=`eval $cmd`) 2>/dev/null &&\n       echo_test_string=`eval $cmd` &&\n       (test \"X$echo_test_string\" = \"X$echo_test_string\") 2>/dev/null\n    then\n      break\n    fi\n  done\nfi\n\nif test \"X`($echo '\\t') 2>/dev/null`\" = 'X\\t' &&\n   echo_testing_string=`($echo \"$echo_test_string\") 2>/dev/null` &&\n   test \"X$echo_testing_string\" = \"X$echo_test_string\"; then\n  :\nelse\n  # The Solaris, AIX, and Digital Unix default echo programs unquote\n  # backslashes.  This makes it impossible to quote backslashes using\n  #   echo \"$something\" | sed 's/\\\\/\\\\\\\\/g'\n  #\n  # So, first we look for a working echo in the user's PATH.\n\n  lt_save_ifs=\"$IFS\"; IFS=$PATH_SEPARATOR\n  for dir in $PATH /usr/ucb; do\n    IFS=\"$lt_save_ifs\"\n    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&\n       test \"X`($dir/echo '\\t') 2>/dev/null`\" = 'X\\t' &&\n       echo_testing_string=`($dir/echo \"$echo_test_string\") 2>/dev/null` &&\n       test \"X$echo_testing_string\" = \"X$echo_test_string\"; then\n      echo=\"$dir/echo\"\n      break\n    fi\n  done\n  IFS=\"$lt_save_ifs\"\n\n  if test \"X$echo\" = Xecho; then\n    # We didn't find a better echo, so look for alternatives.\n    if test \"X`(print -r '\\t') 2>/dev/null`\" = 'X\\t' &&\n       echo_testing_string=`(print -r \"$echo_test_string\") 2>/dev/null` &&\n       test \"X$echo_testing_string\" = \"X$echo_test_string\"; then\n      # This shell has a builtin print -r that does the trick.\n      echo='print -r'\n    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&\n\t test \"X$CONFIG_SHELL\" != X/bin/ksh; then\n      # If we have ksh, try running configure again with it.\n      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}\n      export ORIGINAL_CONFIG_SHELL\n      CONFIG_SHELL=/bin/ksh\n      export CONFIG_SHELL\n      exec $CONFIG_SHELL \"[$]0\" --no-reexec ${1+\"[$]@\"}\n    else\n      # Try using printf.\n      echo='printf %s\\n'\n      if test \"X`($echo '\\t') 2>/dev/null`\" = 'X\\t' &&\n\t echo_testing_string=`($echo \"$echo_test_string\") 2>/dev/null` &&\n\t test \"X$echo_testing_string\" = \"X$echo_test_string\"; then\n\t# Cool, printf works\n\t:\n      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL \"[$]0\" --fallback-echo '\\t') 2>/dev/null` &&\n\t   test \"X$echo_testing_string\" = 'X\\t' &&\n\t   echo_testing_string=`($ORIGINAL_CONFIG_SHELL \"[$]0\" --fallback-echo \"$echo_test_string\") 2>/dev/null` &&\n\t   test \"X$echo_testing_string\" = \"X$echo_test_string\"; then\n\tCONFIG_SHELL=$ORIGINAL_CONFIG_SHELL\n\texport CONFIG_SHELL\n\tSHELL=\"$CONFIG_SHELL\"\n\texport SHELL\n\techo=\"$CONFIG_SHELL [$]0 --fallback-echo\"\n      elif echo_testing_string=`($CONFIG_SHELL \"[$]0\" --fallback-echo '\\t') 2>/dev/null` &&\n\t   test \"X$echo_testing_string\" = 'X\\t' &&\n\t   echo_testing_string=`($CONFIG_SHELL \"[$]0\" --fallback-echo \"$echo_test_string\") 2>/dev/null` &&\n\t   test \"X$echo_testing_string\" = \"X$echo_test_string\"; then\n\techo=\"$CONFIG_SHELL [$]0 --fallback-echo\"\n      else\n\t# maybe with a smaller string...\n\tprev=:\n\n\tfor cmd in 'echo test' 'sed 2q \"[$]0\"' 'sed 10q \"[$]0\"' 'sed 20q \"[$]0\"' 'sed 50q \"[$]0\"'; do\n\t  if (test \"X$echo_test_string\" = \"X`eval $cmd`\") 2>/dev/null\n\t  then\n\t    break\n\t  fi\n\t  prev=\"$cmd\"\n\tdone\n\n\tif test \"$prev\" != 'sed 50q \"[$]0\"'; then\n\t  echo_test_string=`eval $prev`\n\t  export echo_test_string\n\t  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} \"[$]0\" ${1+\"[$]@\"}\n\telse\n\t  # Oops.  We lost completely, so just stick with echo.\n\t  echo=echo\n\tfi\n      fi\n    fi\n  fi\nfi\nfi\n\n# Copy echo and quote the copy suitably for passing to libtool from\n# the Makefile, instead of quoting the original, which is used later.\nECHO=$echo\nif test \"X$ECHO\" = \"X$CONFIG_SHELL [$]0 --fallback-echo\"; then\n   ECHO=\"$CONFIG_SHELL \\\\\\$\\[$]0 --fallback-echo\"\nfi\n\nAC_SUBST(ECHO)\n])])# _LT_AC_PROG_ECHO_BACKSLASH\n\n\n# _LT_AC_LOCK\n# -----------\nAC_DEFUN([_LT_AC_LOCK],\n[AC_ARG_ENABLE([libtool-lock],\n    [AC_HELP_STRING([--disable-libtool-lock],\n\t[avoid locking (might break parallel builds)])])\ntest \"x$enable_libtool_lock\" != xno && enable_libtool_lock=yes\n\n# Some flags need to be propagated to the compiler or linker for good\n# libtool support.\ncase $host in\nia64-*-hpux*)\n  # Find out which ABI we are using.\n  echo 'int i;' > conftest.$ac_ext\n  if AC_TRY_EVAL(ac_compile); then\n    case `/usr/bin/file conftest.$ac_objext` in\n    *ELF-32*)\n      HPUX_IA64_MODE=\"32\"\n      ;;\n    *ELF-64*)\n      HPUX_IA64_MODE=\"64\"\n      ;;\n    esac\n  fi\n  rm -rf conftest*\n  ;;\n*-*-irix6*)\n  # Find out which ABI we are using.\n  echo '[#]line __oline__ \"configure\"' > conftest.$ac_ext\n  if AC_TRY_EVAL(ac_compile); then\n   if test \"$lt_cv_prog_gnu_ld\" = yes; then\n    case `/usr/bin/file conftest.$ac_objext` in\n    *32-bit*)\n      LD=\"${LD-ld} -melf32bsmip\"\n      ;;\n    *N32*)\n      LD=\"${LD-ld} -melf32bmipn32\"\n      ;;\n    *64-bit*)\n      LD=\"${LD-ld} -melf64bmip\"\n      ;;\n    esac\n   else\n    case `/usr/bin/file conftest.$ac_objext` in\n    *32-bit*)\n      LD=\"${LD-ld} -32\"\n      ;;\n    *N32*)\n      LD=\"${LD-ld} -n32\"\n      ;;\n    *64-bit*)\n      LD=\"${LD-ld} -64\"\n      ;;\n    esac\n   fi\n  fi\n  rm -rf conftest*\n  ;;\n\nx86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)\n  # Find out which ABI we are using.\n  echo 'int i;' > conftest.$ac_ext\n  if AC_TRY_EVAL(ac_compile); then\n    case `/usr/bin/file conftest.o` in\n    *32-bit*)\n      case $host in\n        x86_64-*linux*)\n          LD=\"${LD-ld} -m elf_i386\"\n          ;;\n        ppc64-*linux*|powerpc64-*linux*)\n          LD=\"${LD-ld} -m elf32ppclinux\"\n          ;;\n        s390x-*linux*)\n          LD=\"${LD-ld} -m elf_s390\"\n          ;;\n        sparc64-*linux*)\n          LD=\"${LD-ld} -m elf32_sparc\"\n          ;;\n      esac\n      ;;\n    *64-bit*)\n      case $host in\n        x86_64-*linux*)\n          LD=\"${LD-ld} -m elf_x86_64\"\n          ;;\n        ppc*-*linux*|powerpc*-*linux*)\n          LD=\"${LD-ld} -m elf64ppc\"\n          ;;\n        s390*-*linux*)\n          LD=\"${LD-ld} -m elf64_s390\"\n          ;;\n        sparc*-*linux*)\n          LD=\"${LD-ld} -m elf64_sparc\"\n          ;;\n      esac\n      ;;\n    esac\n  fi\n  rm -rf conftest*\n  ;;\n\n*-*-sco3.2v5*)\n  # On SCO OpenServer 5, we need -belf to get full-featured binaries.\n  SAVE_CFLAGS=\"$CFLAGS\"\n  CFLAGS=\"$CFLAGS -belf\"\n  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,\n    [AC_LANG_PUSH(C)\n     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])\n     AC_LANG_POP])\n  if test x\"$lt_cv_cc_needs_belf\" != x\"yes\"; then\n    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf\n    CFLAGS=\"$SAVE_CFLAGS\"\n  fi\n  ;;\nsparc*-*solaris*)\n  # Find out which ABI we are using.\n  echo 'int i;' > conftest.$ac_ext\n  if AC_TRY_EVAL(ac_compile); then\n    case `/usr/bin/file conftest.o` in\n    *64-bit*)\n      case $lt_cv_prog_gnu_ld in\n      yes*) LD=\"${LD-ld} -m elf64_sparc\" ;;\n      *)    LD=\"${LD-ld} -64\" ;;\n      esac\n      ;;\n    esac\n  fi\n  rm -rf conftest*\n  ;;\n\nAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],\n[*-*-cygwin* | *-*-mingw* | *-*-pw32*)\n  AC_CHECK_TOOL(DLLTOOL, dlltool, false)\n  AC_CHECK_TOOL(AS, as, false)\n  AC_CHECK_TOOL(OBJDUMP, objdump, false)\n  ;;\n  ])\nesac\n\nneed_locks=\"$enable_libtool_lock\"\n\n])# _LT_AC_LOCK\n\n\n# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,\n#\t\t[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])\n# ----------------------------------------------------------------\n# Check whether the given compiler option works\nAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],\n[AC_REQUIRE([LT_AC_PROG_SED])\nAC_CACHE_CHECK([$1], [$2],\n  [$2=no\n  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])\n   printf \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n   lt_compiler_flag=\"$3\"\n   # Insert the option either (1) after the last *FLAGS variable, or\n   # (2) before a word containing \"conftest.\", or (3) at the end.\n   # Note that $ac_compile itself does not contain backslashes and begins\n   # with a dollar sign (not a hyphen), so the echo should work correctly.\n   # The option is referenced via a variable to avoid confusing sed.\n   lt_compile=`echo \"$ac_compile\" | $SED \\\n   -e 's:.*FLAGS}\\{0,1\\} :&$lt_compiler_flag :; t' \\\n   -e 's: [[^ ]]*conftest\\.: $lt_compiler_flag&:; t' \\\n   -e 's:$: $lt_compiler_flag:'`\n   (eval echo \"\\\"\\$as_me:__oline__: $lt_compile\\\"\" >&AS_MESSAGE_LOG_FD)\n   (eval \"$lt_compile\" 2>conftest.err)\n   ac_status=$?\n   cat conftest.err >&AS_MESSAGE_LOG_FD\n   echo \"$as_me:__oline__: \\$? = $ac_status\" >&AS_MESSAGE_LOG_FD\n   if (exit $ac_status) && test -s \"$ac_outfile\"; then\n     # The compiler can only warn and ignore the option if not recognized\n     # So say no if there are warnings other than the usual output.\n     $echo \"X$_lt_compiler_boilerplate\" | $Xsed -e '/^$/d' >conftest.exp\n     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2\n     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then\n       $2=yes\n     fi\n   fi\n   $rm conftest*\n])\n\nif test x\"[$]$2\" = xyes; then\n    ifelse([$5], , :, [$5])\nelse\n    ifelse([$6], , :, [$6])\nfi\n])# AC_LIBTOOL_COMPILER_OPTION\n\n\n# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,\n#                          [ACTION-SUCCESS], [ACTION-FAILURE])\n# ------------------------------------------------------------\n# Check whether the given compiler option works\nAC_DEFUN([AC_LIBTOOL_LINKER_OPTION],\n[AC_CACHE_CHECK([$1], [$2],\n  [$2=no\n   save_LDFLAGS=\"$LDFLAGS\"\n   LDFLAGS=\"$LDFLAGS $3\"\n   printf \"$lt_simple_link_test_code\" > conftest.$ac_ext\n   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then\n     # The linker can only warn and ignore the option if not recognized\n     # So say no if there are warnings\n     if test -s conftest.err; then\n       # Append any errors to the config.log.\n       cat conftest.err 1>&AS_MESSAGE_LOG_FD\n       $echo \"X$_lt_linker_boilerplate\" | $Xsed -e '/^$/d' > conftest.exp\n       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2\n       if diff conftest.exp conftest.er2 >/dev/null; then\n         $2=yes\n       fi\n     else\n       $2=yes\n     fi\n   fi\n   $rm conftest*\n   LDFLAGS=\"$save_LDFLAGS\"\n])\n\nif test x\"[$]$2\" = xyes; then\n    ifelse([$4], , :, [$4])\nelse\n    ifelse([$5], , :, [$5])\nfi\n])# AC_LIBTOOL_LINKER_OPTION\n\n\n# AC_LIBTOOL_SYS_MAX_CMD_LEN\n# --------------------------\nAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],\n[# find the maximum length of command line arguments\nAC_MSG_CHECKING([the maximum length of command line arguments])\nAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl\n  i=0\n  teststring=\"ABCD\"\n\n  case $build_os in\n  msdosdjgpp*)\n    # On DJGPP, this test can blow up pretty badly due to problems in libc\n    # (any single argument exceeding 2000 bytes causes a buffer overrun\n    # during glob expansion).  Even if it were fixed, the result of this\n    # check would be larger than it should be.\n    lt_cv_sys_max_cmd_len=12288;    # 12K is about right\n    ;;\n\n  gnu*)\n    # Under GNU Hurd, this test is not required because there is\n    # no limit to the length of command line arguments.\n    # Libtool will interpret -1 as no limit whatsoever\n    lt_cv_sys_max_cmd_len=-1;\n    ;;\n\n  cygwin* | mingw*)\n    # On Win9x/ME, this test blows up -- it succeeds, but takes\n    # about 5 minutes as the teststring grows exponentially.\n    # Worse, since 9x/ME are not pre-emptively multitasking,\n    # you end up with a \"frozen\" computer, even though with patience\n    # the test eventually succeeds (with a max line length of 256k).\n    # Instead, let's just punt: use the minimum linelength reported by\n    # all of the supported platforms: 8192 (on NT/2K/XP).\n    lt_cv_sys_max_cmd_len=8192;\n    ;;\n\n  amigaos*)\n    # On AmigaOS with pdksh, this test takes hours, literally.\n    # So we just punt and use a minimum line length of 8192.\n    lt_cv_sys_max_cmd_len=8192;\n    ;;\n\n  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)\n    # This has been around since 386BSD, at least.  Likely further.\n    if test -x /sbin/sysctl; then\n      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`\n    elif test -x /usr/sbin/sysctl; then\n      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`\n    else\n      lt_cv_sys_max_cmd_len=65536\t# usable default for all BSDs\n    fi\n    # And add a safety zone\n    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \\/ 4`\n    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \\* 3`\n    ;;\n\n  interix*)\n    # We know the value 262144 and hardcode it with a safety zone (like BSD)\n    lt_cv_sys_max_cmd_len=196608\n    ;;\n\n  osf*)\n    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure\n    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not\n    # nice to cause kernel panics so lets avoid the loop below.\n    # First set a reasonable default.\n    lt_cv_sys_max_cmd_len=16384\n    #\n    if test -x /sbin/sysconfig; then\n      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in\n        *1*) lt_cv_sys_max_cmd_len=-1 ;;\n      esac\n    fi\n    ;;\n  sco3.2v5*)\n    lt_cv_sys_max_cmd_len=102400\n    ;;\n  sysv5* | sco5v6* | sysv4.2uw2*)\n    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`\n    if test -n \"$kargmax\"; then\n      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ \t]]//'`\n    else\n      lt_cv_sys_max_cmd_len=32768\n    fi\n    ;;\n  *)\n    # If test is not a shell built-in, we'll probably end up computing a\n    # maximum length that is only half of the actual maximum length, but\n    # we can't tell.\n    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}\n    while (test \"X\"`$SHELL [$]0 --fallback-echo \"X$teststring\" 2>/dev/null` \\\n\t       = \"XX$teststring\") >/dev/null 2>&1 &&\n\t    new_result=`expr \"X$teststring\" : \".*\" 2>&1` &&\n\t    lt_cv_sys_max_cmd_len=$new_result &&\n\t    test $i != 17 # 1/2 MB should be enough\n    do\n      i=`expr $i + 1`\n      teststring=$teststring$teststring\n    done\n    teststring=\n    # Add a significant safety factor because C++ compilers can tack on massive\n    # amounts of additional arguments before passing them to the linker.\n    # It appears as though 1/2 is a usable value.\n    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \\/ 2`\n    ;;\n  esac\n])\nif test -n $lt_cv_sys_max_cmd_len ; then\n  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)\nelse\n  AC_MSG_RESULT(none)\nfi\n])# AC_LIBTOOL_SYS_MAX_CMD_LEN\n\n\n# _LT_AC_CHECK_DLFCN\n# ------------------\nAC_DEFUN([_LT_AC_CHECK_DLFCN],\n[AC_CHECK_HEADERS(dlfcn.h)dnl\n])# _LT_AC_CHECK_DLFCN\n\n\n# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,\n#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)\n# ---------------------------------------------------------------------\nAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],\n[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl\nif test \"$cross_compiling\" = yes; then :\n  [$4]\nelse\n  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2\n  lt_status=$lt_dlunknown\n  cat > conftest.$ac_ext <<EOF\n[#line __oline__ \"configure\"\n#include \"confdefs.h\"\n\n#if HAVE_DLFCN_H\n#include <dlfcn.h>\n#endif\n\n#include <stdio.h>\n\n#ifdef RTLD_GLOBAL\n#  define LT_DLGLOBAL\t\tRTLD_GLOBAL\n#else\n#  ifdef DL_GLOBAL\n#    define LT_DLGLOBAL\t\tDL_GLOBAL\n#  else\n#    define LT_DLGLOBAL\t\t0\n#  endif\n#endif\n\n/* We may have to define LT_DLLAZY_OR_NOW in the command line if we\n   find out it does not work in some platform. */\n#ifndef LT_DLLAZY_OR_NOW\n#  ifdef RTLD_LAZY\n#    define LT_DLLAZY_OR_NOW\t\tRTLD_LAZY\n#  else\n#    ifdef DL_LAZY\n#      define LT_DLLAZY_OR_NOW\t\tDL_LAZY\n#    else\n#      ifdef RTLD_NOW\n#        define LT_DLLAZY_OR_NOW\tRTLD_NOW\n#      else\n#        ifdef DL_NOW\n#          define LT_DLLAZY_OR_NOW\tDL_NOW\n#        else\n#          define LT_DLLAZY_OR_NOW\t0\n#        endif\n#      endif\n#    endif\n#  endif\n#endif\n\n#ifdef __cplusplus\nextern \"C\" void exit (int);\n#endif\n\nvoid fnord() { int i=42;}\nint main ()\n{\n  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);\n  int status = $lt_dlunknown;\n\n  if (self)\n    {\n      if (dlsym (self,\"fnord\"))       status = $lt_dlno_uscore;\n      else if (dlsym( self,\"_fnord\")) status = $lt_dlneed_uscore;\n      /* dlclose (self); */\n    }\n  else\n    puts (dlerror ());\n\n    exit (status);\n}]\nEOF\n  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then\n    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null\n    lt_status=$?\n    case x$lt_status in\n      x$lt_dlno_uscore) $1 ;;\n      x$lt_dlneed_uscore) $2 ;;\n      x$lt_dlunknown|x*) $3 ;;\n    esac\n  else :\n    # compilation failed\n    $3\n  fi\nfi\nrm -fr conftest*\n])# _LT_AC_TRY_DLOPEN_SELF\n\n\n# AC_LIBTOOL_DLOPEN_SELF\n# ----------------------\nAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],\n[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl\nif test \"x$enable_dlopen\" != xyes; then\n  enable_dlopen=unknown\n  enable_dlopen_self=unknown\n  enable_dlopen_self_static=unknown\nelse\n  lt_cv_dlopen=no\n  lt_cv_dlopen_libs=\n\n  case $host_os in\n  beos*)\n    lt_cv_dlopen=\"load_add_on\"\n    lt_cv_dlopen_libs=\n    lt_cv_dlopen_self=yes\n    ;;\n\n  mingw* | pw32*)\n    lt_cv_dlopen=\"LoadLibrary\"\n    lt_cv_dlopen_libs=\n   ;;\n\n  cygwin*)\n    lt_cv_dlopen=\"dlopen\"\n    lt_cv_dlopen_libs=\n   ;;\n\n  darwin*)\n  # if libdl is installed we need to link against it\n    AC_CHECK_LIB([dl], [dlopen],\n\t\t[lt_cv_dlopen=\"dlopen\" lt_cv_dlopen_libs=\"-ldl\"],[\n    lt_cv_dlopen=\"dyld\"\n    lt_cv_dlopen_libs=\n    lt_cv_dlopen_self=yes\n    ])\n   ;;\n\n  *)\n    AC_CHECK_FUNC([shl_load],\n\t  [lt_cv_dlopen=\"shl_load\"],\n      [AC_CHECK_LIB([dld], [shl_load],\n\t    [lt_cv_dlopen=\"shl_load\" lt_cv_dlopen_libs=\"-dld\"],\n\t[AC_CHECK_FUNC([dlopen],\n\t      [lt_cv_dlopen=\"dlopen\"],\n\t  [AC_CHECK_LIB([dl], [dlopen],\n\t\t[lt_cv_dlopen=\"dlopen\" lt_cv_dlopen_libs=\"-ldl\"],\n\t    [AC_CHECK_LIB([svld], [dlopen],\n\t\t  [lt_cv_dlopen=\"dlopen\" lt_cv_dlopen_libs=\"-lsvld\"],\n\t      [AC_CHECK_LIB([dld], [dld_link],\n\t\t    [lt_cv_dlopen=\"dld_link\" lt_cv_dlopen_libs=\"-dld\"])\n\t      ])\n\t    ])\n\t  ])\n\t])\n      ])\n    ;;\n  esac\n\n  if test \"x$lt_cv_dlopen\" != xno; then\n    enable_dlopen=yes\n  else\n    enable_dlopen=no\n  fi\n\n  case $lt_cv_dlopen in\n  dlopen)\n    save_CPPFLAGS=\"$CPPFLAGS\"\n    test \"x$ac_cv_header_dlfcn_h\" = xyes && CPPFLAGS=\"$CPPFLAGS -DHAVE_DLFCN_H\"\n\n    save_LDFLAGS=\"$LDFLAGS\"\n    wl=$lt_prog_compiler_wl eval LDFLAGS=\\\"\\$LDFLAGS $export_dynamic_flag_spec\\\"\n\n    save_LIBS=\"$LIBS\"\n    LIBS=\"$lt_cv_dlopen_libs $LIBS\"\n\n    AC_CACHE_CHECK([whether a program can dlopen itself],\n\t  lt_cv_dlopen_self, [dnl\n\t  _LT_AC_TRY_DLOPEN_SELF(\n\t    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,\n\t    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)\n    ])\n\n    if test \"x$lt_cv_dlopen_self\" = xyes; then\n      wl=$lt_prog_compiler_wl eval LDFLAGS=\\\"\\$LDFLAGS $lt_prog_compiler_static\\\"\n      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],\n    \t  lt_cv_dlopen_self_static, [dnl\n\t  _LT_AC_TRY_DLOPEN_SELF(\n\t    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,\n\t    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)\n      ])\n    fi\n\n    CPPFLAGS=\"$save_CPPFLAGS\"\n    LDFLAGS=\"$save_LDFLAGS\"\n    LIBS=\"$save_LIBS\"\n    ;;\n  esac\n\n  case $lt_cv_dlopen_self in\n  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;\n  *) enable_dlopen_self=unknown ;;\n  esac\n\n  case $lt_cv_dlopen_self_static in\n  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;\n  *) enable_dlopen_self_static=unknown ;;\n  esac\nfi\n])# AC_LIBTOOL_DLOPEN_SELF\n\n\n# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])\n# ---------------------------------\n# Check to see if options -c and -o are simultaneously supported by compiler\nAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],\n[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl\nAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],\n  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],\n  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no\n   $rm -r conftest 2>/dev/null\n   mkdir conftest\n   cd conftest\n   mkdir out\n   printf \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n\n   lt_compiler_flag=\"-o out/conftest2.$ac_objext\"\n   # Insert the option either (1) after the last *FLAGS variable, or\n   # (2) before a word containing \"conftest.\", or (3) at the end.\n   # Note that $ac_compile itself does not contain backslashes and begins\n   # with a dollar sign (not a hyphen), so the echo should work correctly.\n   lt_compile=`echo \"$ac_compile\" | $SED \\\n   -e 's:.*FLAGS}\\{0,1\\} :&$lt_compiler_flag :; t' \\\n   -e 's: [[^ ]]*conftest\\.: $lt_compiler_flag&:; t' \\\n   -e 's:$: $lt_compiler_flag:'`\n   (eval echo \"\\\"\\$as_me:__oline__: $lt_compile\\\"\" >&AS_MESSAGE_LOG_FD)\n   (eval \"$lt_compile\" 2>out/conftest.err)\n   ac_status=$?\n   cat out/conftest.err >&AS_MESSAGE_LOG_FD\n   echo \"$as_me:__oline__: \\$? = $ac_status\" >&AS_MESSAGE_LOG_FD\n   if (exit $ac_status) && test -s out/conftest2.$ac_objext\n   then\n     # The compiler can only warn and ignore the option if not recognized\n     # So say no if there are warnings\n     $echo \"X$_lt_compiler_boilerplate\" | $Xsed -e '/^$/d' > out/conftest.exp\n     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2\n     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then\n       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes\n     fi\n   fi\n   chmod u+w . 2>&AS_MESSAGE_LOG_FD\n   $rm conftest*\n   # SGI C++ compiler will create directory out/ii_files/ for\n   # template instantiation\n   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files\n   $rm out/* && rmdir out\n   cd ..\n   rmdir conftest\n   $rm conftest*\n])\n])# AC_LIBTOOL_PROG_CC_C_O\n\n\n# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])\n# -----------------------------------------\n# Check to see if we can do hard links to lock some files if needed\nAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],\n[AC_REQUIRE([_LT_AC_LOCK])dnl\n\nhard_links=\"nottested\"\nif test \"$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)\" = no && test \"$need_locks\" != no; then\n  # do not overwrite the value of need_locks provided by the user\n  AC_MSG_CHECKING([if we can lock with hard links])\n  hard_links=yes\n  $rm conftest*\n  ln conftest.a conftest.b 2>/dev/null && hard_links=no\n  touch conftest.a\n  ln conftest.a conftest.b 2>&5 || hard_links=no\n  ln conftest.a conftest.b 2>/dev/null && hard_links=no\n  AC_MSG_RESULT([$hard_links])\n  if test \"$hard_links\" = no; then\n    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])\n    need_locks=warn\n  fi\nelse\n  need_locks=no\nfi\n])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS\n\n\n# AC_LIBTOOL_OBJDIR\n# -----------------\nAC_DEFUN([AC_LIBTOOL_OBJDIR],\n[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],\n[rm -f .libs 2>/dev/null\nmkdir .libs 2>/dev/null\nif test -d .libs; then\n  lt_cv_objdir=.libs\nelse\n  # MS-DOS does not allow filenames that begin with a dot.\n  lt_cv_objdir=_libs\nfi\nrmdir .libs 2>/dev/null])\nobjdir=$lt_cv_objdir\n])# AC_LIBTOOL_OBJDIR\n\n\n# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])\n# ----------------------------------------------\n# Check hardcoding attributes.\nAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],\n[AC_MSG_CHECKING([how to hardcode library paths into programs])\n_LT_AC_TAGVAR(hardcode_action, $1)=\nif test -n \"$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)\" || \\\n   test -n \"$_LT_AC_TAGVAR(runpath_var, $1)\" || \\\n   test \"X$_LT_AC_TAGVAR(hardcode_automatic, $1)\" = \"Xyes\" ; then\n\n  # We can hardcode non-existant directories.\n  if test \"$_LT_AC_TAGVAR(hardcode_direct, $1)\" != no &&\n     # If the only mechanism to avoid hardcoding is shlibpath_var, we\n     # have to relink, otherwise we might link with an installed library\n     # when we should be linking with a yet-to-be-installed one\n     ## test \"$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)\" != no &&\n     test \"$_LT_AC_TAGVAR(hardcode_minus_L, $1)\" != no; then\n    # Linking always hardcodes the temporary library directory.\n    _LT_AC_TAGVAR(hardcode_action, $1)=relink\n  else\n    # We can link without hardcoding, and we can hardcode nonexisting dirs.\n    _LT_AC_TAGVAR(hardcode_action, $1)=immediate\n  fi\nelse\n  # We cannot hardcode anything, or else we can only hardcode existing\n  # directories.\n  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported\nfi\nAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])\n\nif test \"$_LT_AC_TAGVAR(hardcode_action, $1)\" = relink; then\n  # Fast installation is not supported\n  enable_fast_install=no\nelif test \"$shlibpath_overrides_runpath\" = yes ||\n     test \"$enable_shared\" = no; then\n  # Fast installation is not necessary\n  enable_fast_install=needless\nfi\n])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH\n\n\n# AC_LIBTOOL_SYS_LIB_STRIP\n# ------------------------\nAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],\n[striplib=\nold_striplib=\nAC_MSG_CHECKING([whether stripping libraries is possible])\nif test -n \"$STRIP\" && $STRIP -V 2>&1 | grep \"GNU strip\" >/dev/null; then\n  test -z \"$old_striplib\" && old_striplib=\"$STRIP --strip-debug\"\n  test -z \"$striplib\" && striplib=\"$STRIP --strip-unneeded\"\n  AC_MSG_RESULT([yes])\nelse\n# FIXME - insert some real tests, host_os isn't really good enough\n  case $host_os in\n   darwin*)\n       if test -n \"$STRIP\" ; then\n         striplib=\"$STRIP -x\"\n         AC_MSG_RESULT([yes])\n       else\n  AC_MSG_RESULT([no])\nfi\n       ;;\n   *)\n  AC_MSG_RESULT([no])\n    ;;\n  esac\nfi\n])# AC_LIBTOOL_SYS_LIB_STRIP\n\n\n# AC_LIBTOOL_SYS_DYNAMIC_LINKER\n# -----------------------------\n# PORTME Fill in your ld.so characteristics\nAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],\n[AC_MSG_CHECKING([dynamic linker characteristics])\nlibrary_names_spec=\nlibname_spec='lib$name'\nsoname_spec=\nshrext_cmds=\".so\"\npostinstall_cmds=\npostuninstall_cmds=\nfinish_cmds=\nfinish_eval=\nshlibpath_var=\nshlibpath_overrides_runpath=unknown\nversion_type=none\ndynamic_linker=\"$host_os ld.so\"\nsys_lib_dlsearch_path_spec=\"/lib /usr/lib\"\nif test \"$GCC\" = yes; then\n  sys_lib_search_path_spec=`$CC -print-search-dirs | grep \"^libraries:\" | $SED -e \"s/^libraries://\" -e \"s,=/,/,g\"`\n  if echo \"$sys_lib_search_path_spec\" | grep ';' >/dev/null ; then\n    # if the path contains \";\" then we assume it to be the separator\n    # otherwise default to the standard path separator (i.e. \":\") - it is\n    # assumed that no part of a normal pathname contains \";\" but that should\n    # okay in the real world where \";\" in dirpaths is itself problematic.\n    sys_lib_search_path_spec=`echo \"$sys_lib_search_path_spec\" | $SED -e 's/;/ /g'`\n  else\n    sys_lib_search_path_spec=`echo \"$sys_lib_search_path_spec\" | $SED  -e \"s/$PATH_SEPARATOR/ /g\"`\n  fi\nelse\n  sys_lib_search_path_spec=\"/lib /usr/lib /usr/local/lib\"\nfi\nneed_lib_prefix=unknown\nhardcode_into_libs=no\n\n# when you set need_version to no, make sure it does not cause -set_version\n# flags to be left without arguments\nneed_version=unknown\n\ncase $host_os in\naix3*)\n  version_type=linux\n  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'\n  shlibpath_var=LIBPATH\n\n  # AIX 3 has no versioning support, so we append a major version to the name.\n  soname_spec='${libname}${release}${shared_ext}$major'\n  ;;\n\naix4* | aix5*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  hardcode_into_libs=yes\n  if test \"$host_cpu\" = ia64; then\n    # AIX 5 supports IA64\n    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'\n    shlibpath_var=LD_LIBRARY_PATH\n  else\n    # With GCC up to 2.95.x, collect2 would create an import file\n    # for dependence libraries.  The import file would start with\n    # the line `#! .'.  This would cause the generated library to\n    # depend on `.', always an invalid library.  This was fixed in\n    # development snapshots of GCC prior to 3.0.\n    case $host_os in\n      aix4 | aix4.[[01]] | aix4.[[01]].*)\n      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'\n\t   echo ' yes '\n\t   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then\n\t:\n      else\n\tcan_build_shared=no\n      fi\n      ;;\n    esac\n    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct\n    # soname into executable. Probably we can add versioning support to\n    # collect2, so additional links can be useful in future.\n    if test \"$aix_use_runtimelinking\" = yes; then\n      # If using run time linking (on AIX 4.2 or later) use lib<name>.so\n      # instead of lib<name>.a to let people know that these are not\n      # typical AIX shared libraries.\n      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    else\n      # We preserve .a as extension for shared libraries through AIX4.2\n      # and later when we are not doing run time linking.\n      library_names_spec='${libname}${release}.a $libname.a'\n      soname_spec='${libname}${release}${shared_ext}$major'\n    fi\n    shlibpath_var=LIBPATH\n  fi\n  ;;\n\namigaos*)\n  library_names_spec='$libname.ixlibrary $libname.a'\n  # Create ${libname}_ixlibrary.a entries in /sys/libs.\n  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo \"X$lib\" | $Xsed -e '\\''s%^.*/\\([[^/]]*\\)\\.ixlibrary$%\\1%'\\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show \"cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a\"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'\n  ;;\n\nbeos*)\n  library_names_spec='${libname}${shared_ext}'\n  dynamic_linker=\"$host_os ld.so\"\n  shlibpath_var=LIBRARY_PATH\n  ;;\n\nbsdi[[45]]*)\n  version_type=linux\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  sys_lib_search_path_spec=\"/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib\"\n  sys_lib_dlsearch_path_spec=\"/shlib /usr/lib /usr/local/lib\"\n  # the default ld.so.conf also contains /usr/contrib/lib and\n  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow\n  # libtool to hard-code these into programs\n  ;;\n\ncygwin* | mingw* | pw32*)\n  version_type=windows\n  shrext_cmds=\".dll\"\n  need_version=no\n  need_lib_prefix=no\n\n  case $GCC,$host_os in\n  yes,cygwin* | yes,mingw* | yes,pw32*)\n    library_names_spec='$libname.dll.a'\n    # DLL is installed to $(libdir)/../bin by postinstall_cmds\n    postinstall_cmds='base_file=`basename \\${file}`~\n      dlpath=`$SHELL 2>&1 -c '\\''. $dir/'\\''\\${base_file}'\\''i;echo \\$dlname'\\''`~\n      dldir=$destdir/`dirname \\$dlpath`~\n      test -d \\$dldir || mkdir -p \\$dldir~\n      $install_prog $dir/$dlname \\$dldir/$dlname~\n      chmod a+x \\$dldir/$dlname'\n    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\\''. $file; echo \\$dlname'\\''`~\n      dlpath=$dir/\\$dldll~\n       $rm \\$dlpath'\n    shlibpath_overrides_runpath=yes\n\n    case $host_os in\n    cygwin*)\n      # Cygwin DLLs use 'cyg' prefix rather than 'lib'\n      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'\n      sys_lib_search_path_spec=\"/usr/lib /lib/w32api /lib /usr/local/lib\"\n      ;;\n    mingw*)\n      # MinGW DLLs use traditional 'lib' prefix\n      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'\n      sys_lib_search_path_spec=`$CC -print-search-dirs | grep \"^libraries:\" | $SED -e \"s/^libraries://\" -e \"s,=/,/,g\"`\n      if echo \"$sys_lib_search_path_spec\" | [grep ';[c-zC-Z]:/' >/dev/null]; then\n        # It is most probably a Windows format PATH printed by\n        # mingw gcc, but we are running on Cygwin. Gcc prints its search\n        # path with ; separators, and with drive letters. We can handle the\n        # drive letters (cygwin fileutils understands them), so leave them,\n        # especially as we might pass files found there to a mingw objdump,\n        # which wouldn't understand a cygwinified path. Ahh.\n        sys_lib_search_path_spec=`echo \"$sys_lib_search_path_spec\" | $SED -e 's/;/ /g'`\n      else\n        sys_lib_search_path_spec=`echo \"$sys_lib_search_path_spec\" | $SED  -e \"s/$PATH_SEPARATOR/ /g\"`\n      fi\n      ;;\n    pw32*)\n      # pw32 DLLs use 'pw' prefix rather than 'lib'\n      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'\n      ;;\n    esac\n    ;;\n\n  *)\n    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'\n    ;;\n  esac\n  dynamic_linker='Win32 ld.exe'\n  # FIXME: first we should search . and the directory the executable is in\n  shlibpath_var=PATH\n  ;;\n\ndarwin* | rhapsody*)\n  dynamic_linker=\"$host_os dyld\"\n  version_type=darwin\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'\n  soname_spec='${libname}${release}${major}$shared_ext'\n  shlibpath_overrides_runpath=yes\n  shlibpath_var=DYLD_LIBRARY_PATH\n  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'\n  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.\n  if test \"$GCC\" = yes; then\n    sys_lib_search_path_spec=`$CC -print-search-dirs | tr \"\\n\" \"$PATH_SEPARATOR\" | sed -e 's/libraries:/@libraries:/' | tr \"@\" \"\\n\" | grep \"^libraries:\" | sed -e \"s/^libraries://\" -e \"s,=/,/,g\" -e \"s,$PATH_SEPARATOR, ,g\" -e \"s,.*,& /lib /usr/lib /usr/local/lib,g\"`\n  else\n    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'\n  fi\n  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'\n  ;;\n\ndgux*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  ;;\n\nfreebsd1*)\n  dynamic_linker=no\n  ;;\n\nkfreebsd*-gnu)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  dynamic_linker='GNU ld.so'\n  ;;\n\nfreebsd* | dragonfly*)\n  # DragonFly does not have aout.  When/if they implement a new\n  # versioning mechanism, adjust this.\n  if test -x /usr/bin/objformat; then\n    objformat=`/usr/bin/objformat`\n  else\n    case $host_os in\n    freebsd[[123]]*) objformat=aout ;;\n    *) objformat=elf ;;\n    esac\n  fi\n  version_type=freebsd-$objformat\n  case $version_type in\n    freebsd-elf*)\n      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'\n      need_version=no\n      need_lib_prefix=no\n      ;;\n    freebsd-*)\n      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'\n      need_version=yes\n      ;;\n  esac\n  shlibpath_var=LD_LIBRARY_PATH\n  case $host_os in\n  freebsd2*)\n    shlibpath_overrides_runpath=yes\n    ;;\n  freebsd3.[[01]]* | freebsdelf3.[[01]]*)\n    shlibpath_overrides_runpath=yes\n    hardcode_into_libs=yes\n    ;;\n  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \\\n  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)\n    shlibpath_overrides_runpath=no\n    hardcode_into_libs=yes\n    ;;\n  freebsd*) # from 4.6 on\n    shlibpath_overrides_runpath=yes\n    hardcode_into_libs=yes\n    ;;\n  esac\n  ;;\n\ngnu*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  hardcode_into_libs=yes\n  ;;\n\nhpux9* | hpux10* | hpux11*)\n  # Give a soname corresponding to the major version so that dld.sl refuses to\n  # link against other versions.\n  version_type=sunos\n  need_lib_prefix=no\n  need_version=no\n  case $host_cpu in\n  ia64*)\n    shrext_cmds='.so'\n    hardcode_into_libs=yes\n    dynamic_linker=\"$host_os dld.so\"\n    shlibpath_var=LD_LIBRARY_PATH\n    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    if test \"X$HPUX_IA64_MODE\" = X32; then\n      sys_lib_search_path_spec=\"/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib\"\n    else\n      sys_lib_search_path_spec=\"/usr/lib/hpux64 /usr/local/lib/hpux64\"\n    fi\n    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec\n    ;;\n   hppa*64*)\n     shrext_cmds='.sl'\n     hardcode_into_libs=yes\n     dynamic_linker=\"$host_os dld.sl\"\n     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH\n     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.\n     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n     soname_spec='${libname}${release}${shared_ext}$major'\n     sys_lib_search_path_spec=\"/usr/lib/pa20_64 /usr/ccs/lib/pa20_64\"\n     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec\n     ;;\n   *)\n    shrext_cmds='.sl'\n    dynamic_linker=\"$host_os dld.sl\"\n    shlibpath_var=SHLIB_PATH\n    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    ;;\n  esac\n  # HP-UX runs *really* slowly unless shared libraries are mode 555.\n  postinstall_cmds='chmod 555 $lib'\n  ;;\n\ninterix3*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  ;;\n\nirix5* | irix6* | nonstopux*)\n  case $host_os in\n    nonstopux*) version_type=nonstopux ;;\n    *)\n\tif test \"$lt_cv_prog_gnu_ld\" = yes; then\n\t\tversion_type=linux\n\telse\n\t\tversion_type=irix\n\tfi ;;\n  esac\n  need_lib_prefix=no\n  need_version=no\n  soname_spec='${libname}${release}${shared_ext}$major'\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'\n  case $host_os in\n  irix5* | nonstopux*)\n    libsuff= shlibsuff=\n    ;;\n  *)\n    case $LD in # libtool.m4 will add one of these switches to LD\n    *-32|*\"-32 \"|*-melf32bsmip|*\"-melf32bsmip \")\n      libsuff= shlibsuff= libmagic=32-bit;;\n    *-n32|*\"-n32 \"|*-melf32bmipn32|*\"-melf32bmipn32 \")\n      libsuff=32 shlibsuff=N32 libmagic=N32;;\n    *-64|*\"-64 \"|*-melf64bmip|*\"-melf64bmip \")\n      libsuff=64 shlibsuff=64 libmagic=64-bit;;\n    *) libsuff= shlibsuff= libmagic=never-match;;\n    esac\n    ;;\n  esac\n  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH\n  shlibpath_overrides_runpath=no\n  sys_lib_search_path_spec=\"/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}\"\n  sys_lib_dlsearch_path_spec=\"/usr/lib${libsuff} /lib${libsuff}\"\n  hardcode_into_libs=yes\n  ;;\n\n# No shared lib support for Linux oldld, aout, or coff.\nlinux*oldld* | linux*aout* | linux*coff*)\n  dynamic_linker=no\n  ;;\n\n# This must be Linux ELF.\nlinux*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -n $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  # This implies no fast_install, which is unacceptable.\n  # Some rework will be needed to allow for fast_install\n  # before this can be enabled.\n  hardcode_into_libs=yes\n\n  # find out which ABI we are using\n  libsuff=\n  case \"$host_cpu\" in\n  x86_64*|s390x*|powerpc64*)\n    echo '[#]line __oline__ \"configure\"' > conftest.$ac_ext\n    if AC_TRY_EVAL(ac_compile); then\n      case `/usr/bin/file conftest.$ac_objext` in\n      *64-bit*)\n        libsuff=64\n        sys_lib_search_path_spec=\"/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}\"\n        ;;\n      esac\n    fi\n    rm -rf conftest*\n    ;;\n  esac\n\n  # Append ld.so.conf contents to the search path\n  if test -f /etc/ld.so.conf; then\n    lt_ld_extra=`awk '/^include / { system(sprintf(\"cd /etc; cat %s 2>/dev/null\", \\[$]2)); skip = 1; } { if (!skip) print \\[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\\n' ' '`\n    sys_lib_dlsearch_path_spec=\"/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra\"\n  fi\n\n  # We used to test for /lib/ld.so.1 and disable shared libraries on\n  # powerpc, because MkLinux only supported shared libraries with the\n  # GNU dynamic linker.  Since this was broken with cross compilers,\n  # most powerpc-linux boxes support dynamic linking these days and\n  # people can always --disable-shared, the test was removed, and we\n  # assume the GNU/Linux dynamic linker is in use.\n  dynamic_linker='GNU/Linux ld.so'\n  ;;\n\nknetbsd*-gnu)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  dynamic_linker='GNU ld.so'\n  ;;\n\nnetbsd*)\n  version_type=sunos\n  need_lib_prefix=no\n  need_version=no\n  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n    finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -m $libdir'\n    dynamic_linker='NetBSD (a.out) ld.so'\n  else\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    dynamic_linker='NetBSD ld.elf_so'\n  fi\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  hardcode_into_libs=yes\n  ;;\n\nnewsos6)\n  version_type=linux\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  ;;\n\nnto-qnx*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  ;;\n\nopenbsd*)\n  version_type=sunos\n  sys_lib_dlsearch_path_spec=\"/usr/lib\"\n  need_lib_prefix=no\n  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.\n  case $host_os in\n    openbsd3.3 | openbsd3.3.*) need_version=yes ;;\n    *)                         need_version=no  ;;\n  esac\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -m $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  if test -z \"`echo __ELF__ | $CC -E - | grep __ELF__`\" || test \"$host_os-$host_cpu\" = \"openbsd2.8-powerpc\"; then\n    case $host_os in\n      openbsd2.[[89]] | openbsd2.[[89]].*)\n\tshlibpath_overrides_runpath=no\n\t;;\n      *)\n\tshlibpath_overrides_runpath=yes\n\t;;\n      esac\n  else\n    shlibpath_overrides_runpath=yes\n  fi\n  ;;\n\nos2*)\n  libname_spec='$name'\n  shrext_cmds=\".dll\"\n  need_lib_prefix=no\n  library_names_spec='$libname${shared_ext} $libname.a'\n  dynamic_linker='OS/2 ld.exe'\n  shlibpath_var=LIBPATH\n  ;;\n\nosf3* | osf4* | osf5*)\n  version_type=osf\n  need_lib_prefix=no\n  need_version=no\n  soname_spec='${libname}${release}${shared_ext}$major'\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  shlibpath_var=LD_LIBRARY_PATH\n  sys_lib_search_path_spec=\"/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib\"\n  sys_lib_dlsearch_path_spec=\"$sys_lib_search_path_spec\"\n  ;;\n\nsolaris*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  hardcode_into_libs=yes\n  # ldd complains unless libraries are executable\n  postinstall_cmds='chmod +x $lib'\n  ;;\n\nsunos4*)\n  version_type=sunos\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n  finish_cmds='PATH=\"\\$PATH:/usr/etc\" ldconfig $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  if test \"$with_gnu_ld\" = yes; then\n    need_lib_prefix=no\n  fi\n  need_version=yes\n  ;;\n\nsysv4 | sysv4.3*)\n  version_type=linux\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  case $host_vendor in\n    sni)\n      shlibpath_overrides_runpath=no\n      need_lib_prefix=no\n      export_dynamic_flag_spec='${wl}-Blargedynsym'\n      runpath_var=LD_RUN_PATH\n      ;;\n    siemens)\n      need_lib_prefix=no\n      ;;\n    motorola)\n      need_lib_prefix=no\n      need_version=no\n      shlibpath_overrides_runpath=no\n      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'\n      ;;\n  esac\n  ;;\n\nsysv4*MP*)\n  if test -d /usr/nec ;then\n    version_type=linux\n    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'\n    soname_spec='$libname${shared_ext}.$major'\n    shlibpath_var=LD_LIBRARY_PATH\n  fi\n  ;;\n\nsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)\n  version_type=freebsd-elf\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  hardcode_into_libs=yes\n  if test \"$with_gnu_ld\" = yes; then\n    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'\n    shlibpath_overrides_runpath=no\n  else\n    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'\n    shlibpath_overrides_runpath=yes\n    case $host_os in\n      sco3.2v5*)\n        sys_lib_search_path_spec=\"$sys_lib_search_path_spec /lib\"\n\t;;\n    esac\n  fi\n  sys_lib_dlsearch_path_spec='/usr/lib'\n  ;;\n\nuts4*)\n  version_type=linux\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  ;;\n\n*)\n  dynamic_linker=no\n  ;;\nesac\nAC_MSG_RESULT([$dynamic_linker])\ntest \"$dynamic_linker\" = no && can_build_shared=no\n\nvariables_saved_for_relink=\"PATH $shlibpath_var $runpath_var\"\nif test \"$GCC\" = yes; then\n  variables_saved_for_relink=\"$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH\"\nfi\n])# AC_LIBTOOL_SYS_DYNAMIC_LINKER\n\n\n# _LT_AC_TAGCONFIG\n# ----------------\nAC_DEFUN([_LT_AC_TAGCONFIG],\n[AC_ARG_WITH([tags],\n    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],\n        [include additional configurations @<:@automatic@:>@])],\n    [tagnames=\"$withval\"])\n\nif test -f \"$ltmain\" && test -n \"$tagnames\"; then\n  if test ! -f \"${ofile}\"; then\n    AC_MSG_WARN([output file `$ofile' does not exist])\n  fi\n\n  if test -z \"$LTCC\"; then\n    eval \"`$SHELL ${ofile} --config | grep '^LTCC='`\"\n    if test -z \"$LTCC\"; then\n      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])\n    else\n      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])\n    fi\n  fi\n  if test -z \"$LTCFLAGS\"; then\n    eval \"`$SHELL ${ofile} --config | grep '^LTCFLAGS='`\"\n  fi\n\n  # Extract list of available tagged configurations in $ofile.\n  # Note that this assumes the entire list is on one line.\n  available_tags=`grep \"^available_tags=\" \"${ofile}\" | $SED -e 's/available_tags=\\(.*$\\)/\\1/' -e 's/\\\"//g'`\n\n  lt_save_ifs=\"$IFS\"; IFS=\"${IFS}$PATH_SEPARATOR,\"\n  for tagname in $tagnames; do\n    IFS=\"$lt_save_ifs\"\n    # Check whether tagname contains only valid characters\n    case `$echo \"X$tagname\" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in\n    \"\") ;;\n    *)  AC_MSG_ERROR([invalid tag name: $tagname])\n\t;;\n    esac\n\n    if grep \"^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$\" < \"${ofile}\" > /dev/null\n    then\n      AC_MSG_ERROR([tag name \\\"$tagname\\\" already exists])\n    fi\n\n    # Update the list of available tags.\n    if test -n \"$tagname\"; then\n      echo appending configuration tag \\\"$tagname\\\" to $ofile\n\n      case $tagname in\n      CXX)\n\tif test -n \"$CXX\" && ( test \"X$CXX\" != \"Xno\" &&\n\t    ( (test \"X$CXX\" = \"Xg++\" && `g++ -v >/dev/null 2>&1` ) ||\n\t    (test \"X$CXX\" != \"Xg++\"))) ; then\n\t  AC_LIBTOOL_LANG_CXX_CONFIG\n\telse\n\t  tagname=\"\"\n\tfi\n\t;;\n\n      F77)\n\tif test -n \"$F77\" && test \"X$F77\" != \"Xno\"; then\n\t  AC_LIBTOOL_LANG_F77_CONFIG\n\telse\n\t  tagname=\"\"\n\tfi\n\t;;\n\n      GCJ)\n\tif test -n \"$GCJ\" && test \"X$GCJ\" != \"Xno\"; then\n\t  AC_LIBTOOL_LANG_GCJ_CONFIG\n\telse\n\t  tagname=\"\"\n\tfi\n\t;;\n\n      RC)\n\tAC_LIBTOOL_LANG_RC_CONFIG\n\t;;\n\n      *)\n\tAC_MSG_ERROR([Unsupported tag name: $tagname])\n\t;;\n      esac\n\n      # Append the new tag name to the list of available tags.\n      if test -n \"$tagname\" ; then\n      available_tags=\"$available_tags $tagname\"\n    fi\n    fi\n  done\n  IFS=\"$lt_save_ifs\"\n\n  # Now substitute the updated list of available tags.\n  if eval \"sed -e 's/^available_tags=.*\\$/available_tags=\\\"$available_tags\\\"/' \\\"$ofile\\\" > \\\"${ofile}T\\\"\"; then\n    mv \"${ofile}T\" \"$ofile\"\n    chmod +x \"$ofile\"\n  else\n    rm -f \"${ofile}T\"\n    AC_MSG_ERROR([unable to update list of available tagged configurations.])\n  fi\nfi\n])# _LT_AC_TAGCONFIG\n\n\n# AC_LIBTOOL_DLOPEN\n# -----------------\n# enable checks for dlopen support\nAC_DEFUN([AC_LIBTOOL_DLOPEN],\n [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])\n])# AC_LIBTOOL_DLOPEN\n\n\n# AC_LIBTOOL_WIN32_DLL\n# --------------------\n# declare package support for building win32 DLLs\nAC_DEFUN([AC_LIBTOOL_WIN32_DLL],\n[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])\n])# AC_LIBTOOL_WIN32_DLL\n\n\n# AC_ENABLE_SHARED([DEFAULT])\n# ---------------------------\n# implement the --enable-shared flag\n# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.\nAC_DEFUN([AC_ENABLE_SHARED],\n[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl\nAC_ARG_ENABLE([shared],\n    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],\n\t[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],\n    [p=${PACKAGE-default}\n    case $enableval in\n    yes) enable_shared=yes ;;\n    no) enable_shared=no ;;\n    *)\n      enable_shared=no\n      # Look at the argument we got.  We use all the common list separators.\n      lt_save_ifs=\"$IFS\"; IFS=\"${IFS}$PATH_SEPARATOR,\"\n      for pkg in $enableval; do\n\tIFS=\"$lt_save_ifs\"\n\tif test \"X$pkg\" = \"X$p\"; then\n\t  enable_shared=yes\n\tfi\n      done\n      IFS=\"$lt_save_ifs\"\n      ;;\n    esac],\n    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)\n])# AC_ENABLE_SHARED\n\n\n# AC_DISABLE_SHARED\n# -----------------\n# set the default shared flag to --disable-shared\nAC_DEFUN([AC_DISABLE_SHARED],\n[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl\nAC_ENABLE_SHARED(no)\n])# AC_DISABLE_SHARED\n\n\n# AC_ENABLE_STATIC([DEFAULT])\n# ---------------------------\n# implement the --enable-static flag\n# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.\nAC_DEFUN([AC_ENABLE_STATIC],\n[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl\nAC_ARG_ENABLE([static],\n    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],\n\t[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],\n    [p=${PACKAGE-default}\n    case $enableval in\n    yes) enable_static=yes ;;\n    no) enable_static=no ;;\n    *)\n     enable_static=no\n      # Look at the argument we got.  We use all the common list separators.\n      lt_save_ifs=\"$IFS\"; IFS=\"${IFS}$PATH_SEPARATOR,\"\n      for pkg in $enableval; do\n\tIFS=\"$lt_save_ifs\"\n\tif test \"X$pkg\" = \"X$p\"; then\n\t  enable_static=yes\n\tfi\n      done\n      IFS=\"$lt_save_ifs\"\n      ;;\n    esac],\n    [enable_static=]AC_ENABLE_STATIC_DEFAULT)\n])# AC_ENABLE_STATIC\n\n\n# AC_DISABLE_STATIC\n# -----------------\n# set the default static flag to --disable-static\nAC_DEFUN([AC_DISABLE_STATIC],\n[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl\nAC_ENABLE_STATIC(no)\n])# AC_DISABLE_STATIC\n\n\n# AC_ENABLE_FAST_INSTALL([DEFAULT])\n# ---------------------------------\n# implement the --enable-fast-install flag\n# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.\nAC_DEFUN([AC_ENABLE_FAST_INSTALL],\n[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl\nAC_ARG_ENABLE([fast-install],\n    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],\n    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],\n    [p=${PACKAGE-default}\n    case $enableval in\n    yes) enable_fast_install=yes ;;\n    no) enable_fast_install=no ;;\n    *)\n      enable_fast_install=no\n      # Look at the argument we got.  We use all the common list separators.\n      lt_save_ifs=\"$IFS\"; IFS=\"${IFS}$PATH_SEPARATOR,\"\n      for pkg in $enableval; do\n\tIFS=\"$lt_save_ifs\"\n\tif test \"X$pkg\" = \"X$p\"; then\n\t  enable_fast_install=yes\n\tfi\n      done\n      IFS=\"$lt_save_ifs\"\n      ;;\n    esac],\n    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)\n])# AC_ENABLE_FAST_INSTALL\n\n\n# AC_DISABLE_FAST_INSTALL\n# -----------------------\n# set the default to --disable-fast-install\nAC_DEFUN([AC_DISABLE_FAST_INSTALL],\n[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl\nAC_ENABLE_FAST_INSTALL(no)\n])# AC_DISABLE_FAST_INSTALL\n\n\n# AC_LIBTOOL_PICMODE([MODE])\n# --------------------------\n# implement the --with-pic flag\n# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.\nAC_DEFUN([AC_LIBTOOL_PICMODE],\n[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl\npic_mode=ifelse($#,1,$1,default)\n])# AC_LIBTOOL_PICMODE\n\n\n# AC_PROG_EGREP\n# -------------\n# This is predefined starting with Autoconf 2.54, so this conditional\n# definition can be removed once we require Autoconf 2.54 or later.\nm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],\n[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],\n   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1\n    then ac_cv_prog_egrep='grep -E'\n    else ac_cv_prog_egrep='egrep'\n    fi])\n EGREP=$ac_cv_prog_egrep\n AC_SUBST([EGREP])\n])])\n\n\n# AC_PATH_TOOL_PREFIX\n# -------------------\n# find a file program which can recognise shared library\nAC_DEFUN([AC_PATH_TOOL_PREFIX],\n[AC_REQUIRE([AC_PROG_EGREP])dnl\nAC_MSG_CHECKING([for $1])\nAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,\n[case $MAGIC_CMD in\n[[\\\\/*] |  ?:[\\\\/]*])\n  lt_cv_path_MAGIC_CMD=\"$MAGIC_CMD\" # Let the user override the test with a path.\n  ;;\n*)\n  lt_save_MAGIC_CMD=\"$MAGIC_CMD\"\n  lt_save_ifs=\"$IFS\"; IFS=$PATH_SEPARATOR\ndnl $ac_dummy forces splitting on constant user-supplied paths.\ndnl POSIX.2 word splitting is done only on the output of word expansions,\ndnl not every word.  This closes a longstanding sh security hole.\n  ac_dummy=\"ifelse([$2], , $PATH, [$2])\"\n  for ac_dir in $ac_dummy; do\n    IFS=\"$lt_save_ifs\"\n    test -z \"$ac_dir\" && ac_dir=.\n    if test -f $ac_dir/$1; then\n      lt_cv_path_MAGIC_CMD=\"$ac_dir/$1\"\n      if test -n \"$file_magic_test_file\"; then\n\tcase $deplibs_check_method in\n\t\"file_magic \"*)\n\t  file_magic_regex=`expr \"$deplibs_check_method\" : \"file_magic \\(.*\\)\"`\n\t  MAGIC_CMD=\"$lt_cv_path_MAGIC_CMD\"\n\t  if eval $file_magic_cmd \\$file_magic_test_file 2> /dev/null |\n\t    $EGREP \"$file_magic_regex\" > /dev/null; then\n\t    :\n\t  else\n\t    cat <<EOF 1>&2\n\n*** Warning: the command libtool uses to detect shared libraries,\n*** $file_magic_cmd, produces output that libtool cannot recognize.\n*** The result is that libtool may fail to recognize shared libraries\n*** as such.  This will affect the creation of libtool libraries that\n*** depend on shared libraries, but programs linked with such libtool\n*** libraries will work regardless of this problem.  Nevertheless, you\n*** may want to report the problem to your system manager and/or to\n*** bug-libtool@gnu.org\n\nEOF\n\t  fi ;;\n\tesac\n      fi\n      break\n    fi\n  done\n  IFS=\"$lt_save_ifs\"\n  MAGIC_CMD=\"$lt_save_MAGIC_CMD\"\n  ;;\nesac])\nMAGIC_CMD=\"$lt_cv_path_MAGIC_CMD\"\nif test -n \"$MAGIC_CMD\"; then\n  AC_MSG_RESULT($MAGIC_CMD)\nelse\n  AC_MSG_RESULT(no)\nfi\n])# AC_PATH_TOOL_PREFIX\n\n\n# AC_PATH_MAGIC\n# -------------\n# find a file program which can recognise a shared library\nAC_DEFUN([AC_PATH_MAGIC],\n[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)\nif test -z \"$lt_cv_path_MAGIC_CMD\"; then\n  if test -n \"$ac_tool_prefix\"; then\n    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)\n  else\n    MAGIC_CMD=:\n  fi\nfi\n])# AC_PATH_MAGIC\n\n\n# AC_PROG_LD\n# ----------\n# find the pathname to the GNU or non-GNU linker\nAC_DEFUN([AC_PROG_LD],\n[AC_ARG_WITH([gnu-ld],\n    [AC_HELP_STRING([--with-gnu-ld],\n\t[assume the C compiler uses GNU ld @<:@default=no@:>@])],\n    [test \"$withval\" = no || with_gnu_ld=yes],\n    [with_gnu_ld=no])\nAC_REQUIRE([LT_AC_PROG_SED])dnl\nAC_REQUIRE([AC_PROG_CC])dnl\nAC_REQUIRE([AC_CANONICAL_HOST])dnl\nAC_REQUIRE([AC_CANONICAL_BUILD])dnl\nac_prog=ld\nif test \"$GCC\" = yes; then\n  # Check if gcc -print-prog-name=ld gives a path.\n  AC_MSG_CHECKING([for ld used by $CC])\n  case $host in\n  *-*-mingw*)\n    # gcc leaves a trailing carriage return which upsets mingw\n    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\\015'` ;;\n  *)\n    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;\n  esac\n  case $ac_prog in\n    # Accept absolute paths.\n    [[\\\\/]]* | ?:[[\\\\/]]*)\n      re_direlt='/[[^/]][[^/]]*/\\.\\./'\n      # Canonicalize the pathname of ld\n      ac_prog=`echo $ac_prog| $SED 's%\\\\\\\\%/%g'`\n      while echo $ac_prog | grep \"$re_direlt\" > /dev/null 2>&1; do\n\tac_prog=`echo $ac_prog| $SED \"s%$re_direlt%/%\"`\n      done\n      test -z \"$LD\" && LD=\"$ac_prog\"\n      ;;\n  \"\")\n    # If it fails, then pretend we aren't using GCC.\n    ac_prog=ld\n    ;;\n  *)\n    # If it is relative, then search for the first ld in PATH.\n    with_gnu_ld=unknown\n    ;;\n  esac\nelif test \"$with_gnu_ld\" = yes; then\n  AC_MSG_CHECKING([for GNU ld])\nelse\n  AC_MSG_CHECKING([for non-GNU ld])\nfi\nAC_CACHE_VAL(lt_cv_path_LD,\n[if test -z \"$LD\"; then\n  lt_save_ifs=\"$IFS\"; IFS=$PATH_SEPARATOR\n  for ac_dir in $PATH; do\n    IFS=\"$lt_save_ifs\"\n    test -z \"$ac_dir\" && ac_dir=.\n    if test -f \"$ac_dir/$ac_prog\" || test -f \"$ac_dir/$ac_prog$ac_exeext\"; then\n      lt_cv_path_LD=\"$ac_dir/$ac_prog\"\n      # Check to see if the program is GNU ld.  I'd rather use --version,\n      # but apparently some variants of GNU ld only accept -v.\n      # Break only if it was the GNU/non-GNU ld that we prefer.\n      case `\"$lt_cv_path_LD\" -v 2>&1 </dev/null` in\n      *GNU* | *'with BFD'*)\n\ttest \"$with_gnu_ld\" != no && break\n\t;;\n      *)\n\ttest \"$with_gnu_ld\" != yes && break\n\t;;\n      esac\n    fi\n  done\n  IFS=\"$lt_save_ifs\"\nelse\n  lt_cv_path_LD=\"$LD\" # Let the user override the test with a path.\nfi])\nLD=\"$lt_cv_path_LD\"\nif test -n \"$LD\"; then\n  AC_MSG_RESULT($LD)\nelse\n  AC_MSG_RESULT(no)\nfi\ntest -z \"$LD\" && AC_MSG_ERROR([no acceptable ld found in \\$PATH])\nAC_PROG_LD_GNU\n])# AC_PROG_LD\n\n\n# AC_PROG_LD_GNU\n# --------------\nAC_DEFUN([AC_PROG_LD_GNU],\n[AC_REQUIRE([AC_PROG_EGREP])dnl\nAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,\n[# I'd rather use --version here, but apparently some GNU lds only accept -v.\ncase `$LD -v 2>&1 </dev/null` in\n*GNU* | *'with BFD'*)\n  lt_cv_prog_gnu_ld=yes\n  ;;\n*)\n  lt_cv_prog_gnu_ld=no\n  ;;\nesac])\nwith_gnu_ld=$lt_cv_prog_gnu_ld\n])# AC_PROG_LD_GNU\n\n\n# AC_PROG_LD_RELOAD_FLAG\n# ----------------------\n# find reload flag for linker\n#   -- PORTME Some linkers may need a different reload flag.\nAC_DEFUN([AC_PROG_LD_RELOAD_FLAG],\n[AC_CACHE_CHECK([for $LD option to reload object files],\n  lt_cv_ld_reload_flag,\n  [lt_cv_ld_reload_flag='-r'])\nreload_flag=$lt_cv_ld_reload_flag\ncase $reload_flag in\n\"\" | \" \"*) ;;\n*) reload_flag=\" $reload_flag\" ;;\nesac\nreload_cmds='$LD$reload_flag -o $output$reload_objs'\ncase $host_os in\n  darwin*)\n    if test \"$GCC\" = yes; then\n      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'\n    else\n      reload_cmds='$LD$reload_flag -o $output$reload_objs'\n    fi\n    ;;\nesac\n])# AC_PROG_LD_RELOAD_FLAG\n\n\n# AC_DEPLIBS_CHECK_METHOD\n# -----------------------\n# how to check for library dependencies\n#  -- PORTME fill in with the dynamic library characteristics\nAC_DEFUN([AC_DEPLIBS_CHECK_METHOD],\n[AC_CACHE_CHECK([how to recognise dependent libraries],\nlt_cv_deplibs_check_method,\n[lt_cv_file_magic_cmd='$MAGIC_CMD'\nlt_cv_file_magic_test_file=\nlt_cv_deplibs_check_method='unknown'\n# Need to set the preceding variable on all platforms that support\n# interlibrary dependencies.\n# 'none' -- dependencies not supported.\n# `unknown' -- same as none, but documents that we really don't know.\n# 'pass_all' -- all dependencies passed with no checks.\n# 'test_compile' -- check by making test program.\n# 'file_magic [[regex]]' -- check by looking for files in library path\n# which responds to the $file_magic_cmd with a given extended regex.\n# If you have `file' or equivalent on your system and you're not sure\n# whether `pass_all' will *always* work, you probably want this one.\n\ncase $host_os in\naix4* | aix5*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nbeos*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nbsdi[[45]]*)\n  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'\n  lt_cv_file_magic_cmd='/usr/bin/file -L'\n  lt_cv_file_magic_test_file=/shlib/libc.so\n  ;;\n\ncygwin*)\n  # func_win32_libid is a shell function defined in ltmain.sh\n  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'\n  lt_cv_file_magic_cmd='func_win32_libid'\n  ;;\n\nmingw* | pw32*)\n  # Base MSYS/MinGW do not provide the 'file' command needed by\n  # func_win32_libid shell function, so use a weaker test based on 'objdump'.\n  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'\n  lt_cv_file_magic_cmd='$OBJDUMP -f'\n  ;;\n\ndarwin* | rhapsody*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nfreebsd* | kfreebsd*-gnu | dragonfly*)\n  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then\n    case $host_cpu in\n    i*86 )\n      # Not sure whether the presence of OpenBSD here was a mistake.\n      # Let's accept both of them until this is cleared up.\n      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'\n      lt_cv_file_magic_cmd=/usr/bin/file\n      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`\n      ;;\n    esac\n  else\n    lt_cv_deplibs_check_method=pass_all\n  fi\n  ;;\n\ngnu*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nhpux10.20* | hpux11*)\n  lt_cv_file_magic_cmd=/usr/bin/file\n  case $host_cpu in\n  ia64*)\n    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'\n    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so\n    ;;\n  hppa*64*)\n    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']\n    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl\n    ;;\n  *)\n    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'\n    lt_cv_file_magic_test_file=/usr/lib/libc.sl\n    ;;\n  esac\n  ;;\n\ninterix3*)\n  # PIC code is broken on Interix 3.x, that's why |\\.a not |_pic\\.a here\n  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\\.so|\\.a)$'\n  ;;\n\nirix5* | irix6* | nonstopux*)\n  case $LD in\n  *-32|*\"-32 \") libmagic=32-bit;;\n  *-n32|*\"-n32 \") libmagic=N32;;\n  *-64|*\"-64 \") libmagic=64-bit;;\n  *) libmagic=never-match;;\n  esac\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\n# This must be Linux ELF.\nlinux*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nnetbsd*)\n  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then\n    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\\.so\\.[[0-9]]+\\.[[0-9]]+|_pic\\.a)$'\n  else\n    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\\.so|_pic\\.a)$'\n  fi\n  ;;\n\nnewos6*)\n  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'\n  lt_cv_file_magic_cmd=/usr/bin/file\n  lt_cv_file_magic_test_file=/usr/lib/libnls.so\n  ;;\n\nnto-qnx*)\n  lt_cv_deplibs_check_method=unknown\n  ;;\n\nopenbsd*)\n  if test -z \"`echo __ELF__ | $CC -E - | grep __ELF__`\" || test \"$host_os-$host_cpu\" = \"openbsd2.8-powerpc\"; then\n    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\\.so\\.[[0-9]]+\\.[[0-9]]+|\\.so|_pic\\.a)$'\n  else\n    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\\.so\\.[[0-9]]+\\.[[0-9]]+|_pic\\.a)$'\n  fi\n  ;;\n\nosf3* | osf4* | osf5*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nsolaris*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nsysv4 | sysv4.3*)\n  case $host_vendor in\n  motorola)\n    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'\n    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`\n    ;;\n  ncr)\n    lt_cv_deplibs_check_method=pass_all\n    ;;\n  sequent)\n    lt_cv_file_magic_cmd='/bin/file'\n    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'\n    ;;\n  sni)\n    lt_cv_file_magic_cmd='/bin/file'\n    lt_cv_deplibs_check_method=\"file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib\"\n    lt_cv_file_magic_test_file=/lib/libc.so\n    ;;\n  siemens)\n    lt_cv_deplibs_check_method=pass_all\n    ;;\n  pc)\n    lt_cv_deplibs_check_method=pass_all\n    ;;\n  esac\n  ;;\n\nsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\nesac\n])\nfile_magic_cmd=$lt_cv_file_magic_cmd\ndeplibs_check_method=$lt_cv_deplibs_check_method\ntest -z \"$deplibs_check_method\" && deplibs_check_method=unknown\n])# AC_DEPLIBS_CHECK_METHOD\n\n\n# AC_PROG_NM\n# ----------\n# find the pathname to a BSD-compatible name lister\nAC_DEFUN([AC_PROG_NM],\n[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,\n[if test -n \"$NM\"; then\n  # Let the user override the test.\n  lt_cv_path_NM=\"$NM\"\nelse\n  lt_nm_to_check=\"${ac_tool_prefix}nm\"\n  if test -n \"$ac_tool_prefix\" && test \"$build\" = \"$host\"; then \n    lt_nm_to_check=\"$lt_nm_to_check nm\"\n  fi\n  for lt_tmp_nm in $lt_nm_to_check; do\n    lt_save_ifs=\"$IFS\"; IFS=$PATH_SEPARATOR\n    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do\n      IFS=\"$lt_save_ifs\"\n      test -z \"$ac_dir\" && ac_dir=.\n      tmp_nm=\"$ac_dir/$lt_tmp_nm\"\n      if test -f \"$tmp_nm\" || test -f \"$tmp_nm$ac_exeext\" ; then\n\t# Check to see if the nm accepts a BSD-compat flag.\n\t# Adding the `sed 1q' prevents false positives on HP-UX, which says:\n\t#   nm: unknown option \"B\" ignored\n\t# Tru64's nm complains that /dev/null is an invalid object file\n\tcase `\"$tmp_nm\" -B /dev/null 2>&1 | sed '1q'` in\n\t*/dev/null* | *'Invalid file or object type'*)\n\t  lt_cv_path_NM=\"$tmp_nm -B\"\n\t  break\n\t  ;;\n\t*)\n\t  case `\"$tmp_nm\" -p /dev/null 2>&1 | sed '1q'` in\n\t  */dev/null*)\n\t    lt_cv_path_NM=\"$tmp_nm -p\"\n\t    break\n\t    ;;\n\t  *)\n\t    lt_cv_path_NM=${lt_cv_path_NM=\"$tmp_nm\"} # keep the first match, but\n\t    continue # so that we can try to find one that supports BSD flags\n\t    ;;\n\t  esac\n\t  ;;\n\tesac\n      fi\n    done\n    IFS=\"$lt_save_ifs\"\n  done\n  test -z \"$lt_cv_path_NM\" && lt_cv_path_NM=nm\nfi])\nNM=\"$lt_cv_path_NM\"\n])# AC_PROG_NM\n\n\n# AC_CHECK_LIBM\n# -------------\n# check for math library\nAC_DEFUN([AC_CHECK_LIBM],\n[AC_REQUIRE([AC_CANONICAL_HOST])dnl\nLIBM=\ncase $host in\n*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)\n  # These system don't have libm, or don't need it\n  ;;\n*-ncr-sysv4.3*)\n  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=\"-lmw\")\n  AC_CHECK_LIB(m, cos, LIBM=\"$LIBM -lm\")\n  ;;\n*)\n  AC_CHECK_LIB(m, cos, LIBM=\"-lm\")\n  ;;\nesac\n])# AC_CHECK_LIBM\n\n\n# AC_LIBLTDL_CONVENIENCE([DIRECTORY])\n# -----------------------------------\n# sets LIBLTDL to the link flags for the libltdl convenience library and\n# LTDLINCL to the include flags for the libltdl header and adds\n# --enable-ltdl-convenience to the configure arguments.  Note that\n# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,\n# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with\n# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'\n# (note the single quotes!).  If your package is not flat and you're not\n# using automake, define top_builddir and top_srcdir appropriately in\n# the Makefiles.\nAC_DEFUN([AC_LIBLTDL_CONVENIENCE],\n[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl\n  case $enable_ltdl_convenience in\n  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;\n  \"\") enable_ltdl_convenience=yes\n      ac_configure_args=\"$ac_configure_args --enable-ltdl-convenience\" ;;\n  esac\n  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la\n  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])\n  # For backwards non-gettext consistent compatibility...\n  INCLTDL=\"$LTDLINCL\"\n])# AC_LIBLTDL_CONVENIENCE\n\n\n# AC_LIBLTDL_INSTALLABLE([DIRECTORY])\n# -----------------------------------\n# sets LIBLTDL to the link flags for the libltdl installable library and\n# LTDLINCL to the include flags for the libltdl header and adds\n# --enable-ltdl-install to the configure arguments.  Note that\n# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,\n# and an installed libltdl is not found, it is assumed to be `libltdl'.\n# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with\n# '${top_srcdir}/' (note the single quotes!).  If your package is not\n# flat and you're not using automake, define top_builddir and top_srcdir\n# appropriately in the Makefiles.\n# In the future, this macro may have to be called after AC_PROG_LIBTOOL.\nAC_DEFUN([AC_LIBLTDL_INSTALLABLE],\n[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl\n  AC_CHECK_LIB(ltdl, lt_dlinit,\n  [test x\"$enable_ltdl_install\" != xyes && enable_ltdl_install=no],\n  [if test x\"$enable_ltdl_install\" = xno; then\n     AC_MSG_WARN([libltdl not installed, but installation disabled])\n   else\n     enable_ltdl_install=yes\n   fi\n  ])\n  if test x\"$enable_ltdl_install\" = x\"yes\"; then\n    ac_configure_args=\"$ac_configure_args --enable-ltdl-install\"\n    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la\n    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])\n  else\n    ac_configure_args=\"$ac_configure_args --enable-ltdl-install=no\"\n    LIBLTDL=\"-lltdl\"\n    LTDLINCL=\n  fi\n  # For backwards non-gettext consistent compatibility...\n  INCLTDL=\"$LTDLINCL\"\n])# AC_LIBLTDL_INSTALLABLE\n\n\n# AC_LIBTOOL_CXX\n# --------------\n# enable support for C++ libraries\nAC_DEFUN([AC_LIBTOOL_CXX],\n[AC_REQUIRE([_LT_AC_LANG_CXX])\n])# AC_LIBTOOL_CXX\n\n\n# _LT_AC_LANG_CXX\n# ---------------\nAC_DEFUN([_LT_AC_LANG_CXX],\n[AC_REQUIRE([AC_PROG_CXX])\nAC_REQUIRE([_LT_AC_PROG_CXXCPP])\n_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])\n])# _LT_AC_LANG_CXX\n\n# _LT_AC_PROG_CXXCPP\n# ------------------\nAC_DEFUN([_LT_AC_PROG_CXXCPP],\n[\nAC_REQUIRE([AC_PROG_CXX])\nif test -n \"$CXX\" && ( test \"X$CXX\" != \"Xno\" &&\n    ( (test \"X$CXX\" = \"Xg++\" && `g++ -v >/dev/null 2>&1` ) ||\n    (test \"X$CXX\" != \"Xg++\"))) ; then\n  AC_PROG_CXXCPP\nfi\n])# _LT_AC_PROG_CXXCPP\n\n# AC_LIBTOOL_F77\n# --------------\n# enable support for Fortran 77 libraries\nAC_DEFUN([AC_LIBTOOL_F77],\n[AC_REQUIRE([_LT_AC_LANG_F77])\n])# AC_LIBTOOL_F77\n\n\n# _LT_AC_LANG_F77\n# ---------------\nAC_DEFUN([_LT_AC_LANG_F77],\n[AC_REQUIRE([AC_PROG_F77])\n_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])\n])# _LT_AC_LANG_F77\n\n\n# AC_LIBTOOL_GCJ\n# --------------\n# enable support for GCJ libraries\nAC_DEFUN([AC_LIBTOOL_GCJ],\n[AC_REQUIRE([_LT_AC_LANG_GCJ])\n])# AC_LIBTOOL_GCJ\n\n\n# _LT_AC_LANG_GCJ\n# ---------------\nAC_DEFUN([_LT_AC_LANG_GCJ],\n[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],\n  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],\n    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],\n      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],\n\t [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],\n\t   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])\n_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])\n])# _LT_AC_LANG_GCJ\n\n\n# AC_LIBTOOL_RC\n# -------------\n# enable support for Windows resource files\nAC_DEFUN([AC_LIBTOOL_RC],\n[AC_REQUIRE([LT_AC_PROG_RC])\n_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])\n])# AC_LIBTOOL_RC\n\n\n# AC_LIBTOOL_LANG_C_CONFIG\n# ------------------------\n# Ensure that the configuration vars for the C compiler are\n# suitably defined.  Those variables are subsequently used by\n# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.\nAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])\nAC_DEFUN([_LT_AC_LANG_C_CONFIG],\n[lt_save_CC=\"$CC\"\nAC_LANG_PUSH(C)\n\n# Source file extension for C test sources.\nac_ext=c\n\n# Object file extension for compiled C test sources.\nobjext=o\n_LT_AC_TAGVAR(objext, $1)=$objext\n\n# Code to be used in simple compile tests\nlt_simple_compile_test_code=\"int some_variable = 0;\\n\"\n\n# Code to be used in simple link tests\nlt_simple_link_test_code='int main(){return(0);}\\n'\n\n_LT_AC_SYS_COMPILER\n\n# save warnings/boilerplate of simple test code\n_LT_COMPILER_BOILERPLATE\n_LT_LINKER_BOILERPLATE\n\nAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)\nAC_LIBTOOL_PROG_COMPILER_PIC($1)\nAC_LIBTOOL_PROG_CC_C_O($1)\nAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)\nAC_LIBTOOL_PROG_LD_SHLIBS($1)\nAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)\nAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)\nAC_LIBTOOL_SYS_LIB_STRIP\nAC_LIBTOOL_DLOPEN_SELF\n\n# Report which library types will actually be built\nAC_MSG_CHECKING([if libtool supports shared libraries])\nAC_MSG_RESULT([$can_build_shared])\n\nAC_MSG_CHECKING([whether to build shared libraries])\ntest \"$can_build_shared\" = \"no\" && enable_shared=no\n\n# On AIX, shared libraries and static libraries use the same namespace, and\n# are all built from PIC.\ncase $host_os in\naix3*)\n  test \"$enable_shared\" = yes && enable_static=no\n  if test -n \"$RANLIB\"; then\n    archive_cmds=\"$archive_cmds~\\$RANLIB \\$lib\"\n    postinstall_cmds='$RANLIB $lib'\n  fi\n  ;;\n\naix4* | aix5*)\n  if test \"$host_cpu\" != ia64 && test \"$aix_use_runtimelinking\" = no ; then\n    test \"$enable_shared\" = yes && enable_static=no\n  fi\n    ;;\nesac\nAC_MSG_RESULT([$enable_shared])\n\nAC_MSG_CHECKING([whether to build static libraries])\n# Make sure either enable_shared or enable_static is yes.\ntest \"$enable_shared\" = yes || enable_static=yes\nAC_MSG_RESULT([$enable_static])\n\nAC_LIBTOOL_CONFIG($1)\n\nAC_LANG_POP\nCC=\"$lt_save_CC\"\n])# AC_LIBTOOL_LANG_C_CONFIG\n\n\n# AC_LIBTOOL_LANG_CXX_CONFIG\n# --------------------------\n# Ensure that the configuration vars for the C compiler are\n# suitably defined.  Those variables are subsequently used by\n# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.\nAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])\nAC_DEFUN([_LT_AC_LANG_CXX_CONFIG],\n[AC_LANG_PUSH(C++)\nAC_REQUIRE([AC_PROG_CXX])\nAC_REQUIRE([_LT_AC_PROG_CXXCPP])\n\n_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no\n_LT_AC_TAGVAR(allow_undefined_flag, $1)=\n_LT_AC_TAGVAR(always_export_symbols, $1)=no\n_LT_AC_TAGVAR(archive_expsym_cmds, $1)=\n_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=\n_LT_AC_TAGVAR(hardcode_direct, $1)=no\n_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=\n_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=\n_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=\n_LT_AC_TAGVAR(hardcode_minus_L, $1)=no\n_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported\n_LT_AC_TAGVAR(hardcode_automatic, $1)=no\n_LT_AC_TAGVAR(module_cmds, $1)=\n_LT_AC_TAGVAR(module_expsym_cmds, $1)=\n_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown\n_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds\n_LT_AC_TAGVAR(no_undefined_flag, $1)=\n_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=\n_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no\n\n# Dependencies to place before and after the object being linked:\n_LT_AC_TAGVAR(predep_objects, $1)=\n_LT_AC_TAGVAR(postdep_objects, $1)=\n_LT_AC_TAGVAR(predeps, $1)=\n_LT_AC_TAGVAR(postdeps, $1)=\n_LT_AC_TAGVAR(compiler_lib_search_path, $1)=\n\n# Source file extension for C++ test sources.\nac_ext=cpp\n\n# Object file extension for compiled C++ test sources.\nobjext=o\n_LT_AC_TAGVAR(objext, $1)=$objext\n\n# Code to be used in simple compile tests\nlt_simple_compile_test_code=\"int some_variable = 0;\\n\"\n\n# Code to be used in simple link tests\nlt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\\n'\n\n# ltmain only uses $CC for tagged configurations so make sure $CC is set.\n_LT_AC_SYS_COMPILER\n\n# save warnings/boilerplate of simple test code\n_LT_COMPILER_BOILERPLATE\n_LT_LINKER_BOILERPLATE\n\n# Allow CC to be a program name with arguments.\nlt_save_CC=$CC\nlt_save_LD=$LD\nlt_save_GCC=$GCC\nGCC=$GXX\nlt_save_with_gnu_ld=$with_gnu_ld\nlt_save_path_LD=$lt_cv_path_LD\nif test -n \"${lt_cv_prog_gnu_ldcxx+set}\"; then\n  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx\nelse\n  $as_unset lt_cv_prog_gnu_ld\nfi\nif test -n \"${lt_cv_path_LDCXX+set}\"; then\n  lt_cv_path_LD=$lt_cv_path_LDCXX\nelse\n  $as_unset lt_cv_path_LD\nfi\ntest -z \"${LDCXX+set}\" || LD=$LDCXX\nCC=${CXX-\"c++\"}\ncompiler=$CC\n_LT_AC_TAGVAR(compiler, $1)=$CC\n_LT_CC_BASENAME([$compiler])\n\n# We don't want -fno-exception wen compiling C++ code, so set the\n# no_builtin_flag separately\nif test \"$GXX\" = yes; then\n  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'\nelse\n  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=\nfi\n\nif test \"$GXX\" = yes; then\n  # Set up default GNU C++ configuration\n\n  AC_PROG_LD\n\n  # Check if GNU C++ uses GNU ld as the underlying linker, since the\n  # archiving commands below assume that GNU ld is being used.\n  if test \"$with_gnu_ld\" = yes; then\n    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'\n    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n\n    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'\n    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'\n\n    # If archive_cmds runs LD, not CC, wlarc should be empty\n    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to\n    #     investigate it a little bit more. (MM)\n    wlarc='${wl}'\n\n    # ancient GNU ld didn't support --whole-archive et. al.\n    if eval \"`$CC -print-prog-name=ld` --help 2>&1\" | \\\n\tgrep 'no-whole-archive' > /dev/null; then\n      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=\"$wlarc\"'--whole-archive$convenience '\"$wlarc\"'--no-whole-archive'\n    else\n      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=\n    fi\n  else\n    with_gnu_ld=no\n    wlarc=\n\n    # A generic and very simple default shared library creation\n    # command for GNU C++ for the case where it uses the native\n    # linker, instead of GNU ld.  If possible, this setting should\n    # overridden to take advantage of the native linker features on\n    # the platform it is being used on.\n    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'\n  fi\n\n  # Commands to make compiler produce verbose output that lists\n  # what \"hidden\" libraries, object files and flags are used when\n  # linking a shared library.\n  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\\-L\"'\n\nelse\n  GXX=no\n  with_gnu_ld=no\n  wlarc=\nfi\n\n# PORTME: fill in a description of your system's C++ link characteristics\nAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])\n_LT_AC_TAGVAR(ld_shlibs, $1)=yes\ncase $host_os in\n  aix3*)\n    # FIXME: insert proper C++ library support\n    _LT_AC_TAGVAR(ld_shlibs, $1)=no\n    ;;\n  aix4* | aix5*)\n    if test \"$host_cpu\" = ia64; then\n      # On IA64, the linker does run time linking by default, so we don't\n      # have to do anything special.\n      aix_use_runtimelinking=no\n      exp_sym_flag='-Bexport'\n      no_entry_flag=\"\"\n    else\n      aix_use_runtimelinking=no\n\n      # Test if we are trying to use run time linking or normal\n      # AIX style linking. If -brtl is somewhere in LDFLAGS, we\n      # need to do runtime linking.\n      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)\n\tfor ld_flag in $LDFLAGS; do\n\t  case $ld_flag in\n\t  *-brtl*)\n\t    aix_use_runtimelinking=yes\n\t    break\n\t    ;;\n\t  esac\n\tdone\n\t;;\n      esac\n\n      exp_sym_flag='-bexport'\n      no_entry_flag='-bnoentry'\n    fi\n\n    # When large executables or shared objects are built, AIX ld can\n    # have problems creating the table of contents.  If linking a library\n    # or program results in \"error TOC overflow\" add -mminimal-toc to\n    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not\n    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.\n\n    _LT_AC_TAGVAR(archive_cmds, $1)=''\n    _LT_AC_TAGVAR(hardcode_direct, $1)=yes\n    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'\n    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes\n\n    if test \"$GXX\" = yes; then\n      case $host_os in aix4.[[012]]|aix4.[[012]].*)\n      # We only want to do this on AIX 4.2 and lower, the check\n      # below for broken collect2 doesn't work under 4.3+\n\tcollect2name=`${CC} -print-prog-name=collect2`\n\tif test -f \"$collect2name\" && \\\n\t   strings \"$collect2name\" | grep resolve_lib_name >/dev/null\n\tthen\n\t  # We have reworked collect2\n\t  _LT_AC_TAGVAR(hardcode_direct, $1)=yes\n\telse\n\t  # We have old collect2\n\t  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported\n\t  # It fails to find uninstalled libraries when the uninstalled\n\t  # path is not listed in the libpath.  Setting hardcode_minus_L\n\t  # to unsupported forces relinking\n\t  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes\n\t  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'\n\t  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=\n\tfi\n\t;;\n      esac\n      shared_flag='-shared'\n      if test \"$aix_use_runtimelinking\" = yes; then\n\tshared_flag=\"$shared_flag \"'${wl}-G'\n      fi\n    else\n      # not using gcc\n      if test \"$host_cpu\" = ia64; then\n\t# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release\n\t# chokes on -Wl,-G. The following line is correct:\n\tshared_flag='-G'\n      else\n\tif test \"$aix_use_runtimelinking\" = yes; then\n\t  shared_flag='${wl}-G'\n\telse\n\t  shared_flag='${wl}-bM:SRE'\n\tfi\n      fi\n    fi\n\n    # It seems that -bexpall does not export symbols beginning with\n    # underscore (_), so it is better to generate a list of symbols to export.\n    _LT_AC_TAGVAR(always_export_symbols, $1)=yes\n    if test \"$aix_use_runtimelinking\" = yes; then\n      # Warning - without using the other runtime loading flags (-brtl),\n      # -berok will link without error, but may produce a broken library.\n      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'\n      # Determine the default libpath from the value encoded in an empty executable.\n      _LT_AC_SYS_LIBPATH_AIX\n      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'\"$aix_libpath\"\n\n      _LT_AC_TAGVAR(archive_expsym_cmds, $1)=\"\\$CC\"' -o $output_objdir/$soname $libobjs $deplibs '\"\\${wl}$no_entry_flag\"' $compiler_flags `if test \"x${allow_undefined_flag}\" != \"x\"; then echo \"${wl}${allow_undefined_flag}\"; else :; fi` '\"\\${wl}$exp_sym_flag:\\$export_symbols $shared_flag\"\n     else\n      if test \"$host_cpu\" = ia64; then\n\t_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'\n\t_LT_AC_TAGVAR(allow_undefined_flag, $1)=\"-z nodefs\"\n\t_LT_AC_TAGVAR(archive_expsym_cmds, $1)=\"\\$CC $shared_flag\"' -o $output_objdir/$soname $libobjs $deplibs '\"\\${wl}$no_entry_flag\"' $compiler_flags ${wl}${allow_undefined_flag} '\"\\${wl}$exp_sym_flag:\\$export_symbols\"\n      else\n\t# Determine the default libpath from the value encoded in an empty executable.\n\t_LT_AC_SYS_LIBPATH_AIX\n\t_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'\"$aix_libpath\"\n\t# Warning - without using the other run time loading flags,\n\t# -berok will link without error, but may produce a broken library.\n\t_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'\n\t_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'\n\t# Exported symbols can be pulled into shared objects from archives\n\t_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'\n\t_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes\n\t# This is similar to how AIX traditionally builds its shared libraries.\n\t_LT_AC_TAGVAR(archive_expsym_cmds, $1)=\"\\$CC $shared_flag\"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'\n      fi\n    fi\n    ;;\n\n  beos*)\n    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then\n      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported\n      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc\n      # support --undefined.  This deserves some investigation.  FIXME\n      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n    else\n      _LT_AC_TAGVAR(ld_shlibs, $1)=no\n    fi\n    ;;\n\n  chorus*)\n    case $cc_basename in\n      *)\n\t# FIXME: insert proper C++ library support\n\t_LT_AC_TAGVAR(ld_shlibs, $1)=no\n\t;;\n    esac\n    ;;\n\n  cygwin* | mingw* | pw32*)\n    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,\n    # as there is no search path for DLLs.\n    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'\n    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported\n    _LT_AC_TAGVAR(always_export_symbols, $1)=no\n    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes\n\n    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then\n      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'\n      # If the export-symbols file already is a .def file (1st line\n      # is EXPORTS), use it as is; otherwise, prepend...\n      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test \"x`$SED 1q $export_symbols`\" = xEXPORTS; then\n\tcp $export_symbols $output_objdir/$soname.def;\n      else\n\techo EXPORTS > $output_objdir/$soname.def;\n\tcat $export_symbols >> $output_objdir/$soname.def;\n      fi~\n      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'\n    else\n      _LT_AC_TAGVAR(ld_shlibs, $1)=no\n    fi\n  ;;\n      darwin* | rhapsody*)\n        case $host_os in\n        rhapsody* | darwin1.[[012]])\n         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'\n         ;;\n       *) # Darwin 1.3 on\n         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then\n           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'\n         else\n           case ${MACOSX_DEPLOYMENT_TARGET} in\n             10.[[012]])\n               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'\n               ;;\n             10.*)\n               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'\n               ;;\n           esac\n         fi\n         ;;\n        esac\n      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no\n      _LT_AC_TAGVAR(hardcode_direct, $1)=no\n      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes\n      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported\n      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''\n      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes\n\n    if test \"$GXX\" = yes ; then\n      lt_int_apple_cc_single_mod=no\n      output_verbose_link_cmd='echo'\n      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then\n       lt_int_apple_cc_single_mod=yes\n      fi\n      if test \"X$lt_int_apple_cc_single_mod\" = Xyes ; then\n       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'\n      else\n          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'\n        fi\n        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'\n        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds\n          if test \"X$lt_int_apple_cc_single_mod\" = Xyes ; then\n            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e \"s,#.*,,\" -e \"s,^[    ]*,,\" -e \"s,^\\(..*\\),_&,\" < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'\n          else\n            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e \"s,#.*,,\" -e \"s,^[    ]*,,\" -e \"s,^\\(..*\\),_&,\" < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'\n          fi\n            _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e \"s,#.*,,\" -e \"s,^[    ]*,,\" -e \"s,^\\(..*\\),_&,\" < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'\n      else\n      case $cc_basename in\n        xlc*)\n         output_verbose_link_cmd='echo'\n          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'\n          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'\n          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds\n          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e \"s,#.*,,\" -e \"s,^[    ]*,,\" -e \"s,^\\(..*\\),_&,\" < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'\n          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e \"s,#.*,,\" -e \"s,^[    ]*,,\" -e \"s,^\\(..*\\),_&,\" < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'\n          ;;\n       *)\n         _LT_AC_TAGVAR(ld_shlibs, $1)=no\n          ;;\n      esac\n      fi\n        ;;\n\n  dgux*)\n    case $cc_basename in\n      ec++*)\n\t# FIXME: insert proper C++ library support\n\t_LT_AC_TAGVAR(ld_shlibs, $1)=no\n\t;;\n      ghcx*)\n\t# Green Hills C++ Compiler\n\t# FIXME: insert proper C++ library support\n\t_LT_AC_TAGVAR(ld_shlibs, $1)=no\n\t;;\n      *)\n\t# FIXME: insert proper C++ library support\n\t_LT_AC_TAGVAR(ld_shlibs, $1)=no\n\t;;\n    esac\n    ;;\n  freebsd[[12]]*)\n    # C++ shared libraries reported to be fairly broken before switch to ELF\n    _LT_AC_TAGVAR(ld_shlibs, $1)=no\n    ;;\n  freebsd-elf*)\n    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no\n    ;;\n  freebsd* | kfreebsd*-gnu | dragonfly*)\n    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF\n    # conventions\n    _LT_AC_TAGVAR(ld_shlibs, $1)=yes\n    ;;\n  gnu*)\n    ;;\n  hpux9*)\n    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'\n    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:\n    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'\n    _LT_AC_TAGVAR(hardcode_direct, $1)=yes\n    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,\n\t\t\t\t# but as the default\n\t\t\t\t# location of the library.\n\n    case $cc_basename in\n    CC*)\n      # FIXME: insert proper C++ library support\n      _LT_AC_TAGVAR(ld_shlibs, $1)=no\n      ;;\n    aCC*)\n      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'\n      # Commands to make compiler produce verbose output that lists\n      # what \"hidden\" libraries, object files and flags are used when\n      # linking a shared library.\n      #\n      # There doesn't appear to be a way to prevent this compiler from\n      # explicitly linking system object files so we need to strip them\n      # from the output so that they don't get included in the library\n      # dependencies.\n      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep \"[[-]]L\"`; list=\"\"; for z in $templist; do case $z in conftest.$objext) list=\"$list $z\";; *.$objext);; *) list=\"$list $z\";;esac; done; echo $list'\n      ;;\n    *)\n      if test \"$GXX\" = yes; then\n        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'\n      else\n        # FIXME: insert proper C++ library support\n        _LT_AC_TAGVAR(ld_shlibs, $1)=no\n      fi\n      ;;\n    esac\n    ;;\n  hpux10*|hpux11*)\n    if test $with_gnu_ld = no; then\n      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'\n      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:\n\n      case $host_cpu in\n      hppa*64*|ia64*)\n\t_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'\n        ;;\n      *)\n\t_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'\n        ;;\n      esac\n    fi\n    case $host_cpu in\n    hppa*64*|ia64*)\n      _LT_AC_TAGVAR(hardcode_direct, $1)=no\n      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no\n      ;;\n    *)\n      _LT_AC_TAGVAR(hardcode_direct, $1)=yes\n      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,\n\t\t\t\t\t      # but as the default\n\t\t\t\t\t      # location of the library.\n      ;;\n    esac\n\n    case $cc_basename in\n      CC*)\n\t# FIXME: insert proper C++ library support\n\t_LT_AC_TAGVAR(ld_shlibs, $1)=no\n\t;;\n      aCC*)\n\tcase $host_cpu in\n\thppa*64*)\n\t  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t  ;;\n\tia64*)\n\t  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t  ;;\n\t*)\n\t  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t  ;;\n\tesac\n\t# Commands to make compiler produce verbose output that lists\n\t# what \"hidden\" libraries, object files and flags are used when\n\t# linking a shared library.\n\t#\n\t# There doesn't appear to be a way to prevent this compiler from\n\t# explicitly linking system object files so we need to strip them\n\t# from the output so that they don't get included in the library\n\t# dependencies.\n\toutput_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep \"\\-L\"`; list=\"\"; for z in $templist; do case $z in conftest.$objext) list=\"$list $z\";; *.$objext);; *) list=\"$list $z\";;esac; done; echo $list'\n\t;;\n      *)\n\tif test \"$GXX\" = yes; then\n\t  if test $with_gnu_ld = no; then\n\t    case $host_cpu in\n\t    hppa*64*)\n\t      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t      ;;\n\t    ia64*)\n\t      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t      ;;\n\t    *)\n\t      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t      ;;\n\t    esac\n\t  fi\n\telse\n\t  # FIXME: insert proper C++ library support\n\t  _LT_AC_TAGVAR(ld_shlibs, $1)=no\n\tfi\n\t;;\n    esac\n    ;;\n  interix3*)\n    _LT_AC_TAGVAR(hardcode_direct, $1)=no\n    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no\n    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'\n    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'\n    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.\n    # Instead, shared libraries are loaded at an image base (0x10000000 by\n    # default) and relocated if they conflict, which is a slow very memory\n    # consuming and fragmenting process.  To avoid this, we pick a random,\n    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link\n    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.\n    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \\* 262144 + 1342177280` -o $lib'\n    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed \"s,^,_,\" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \\* 262144 + 1342177280` -o $lib'\n    ;;\n  irix5* | irix6*)\n    case $cc_basename in\n      CC*)\n\t# SGI C++\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n \"$verstring\" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'\n\n\t# Archives containing C++ object files must be created using\n\t# \"CC -ar\", where \"CC\" is the IRIX C++ compiler.  This is\n\t# necessary to make sure instantiated templates are included\n\t# in the archive.\n\t_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'\n\t;;\n      *)\n\tif test \"$GXX\" = yes; then\n\t  if test \"$with_gnu_ld\" = no; then\n\t    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $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'\n\t  else\n\t    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n \"$verstring\" && echo ${wl}-set_version ${wl}$verstring` -o $lib'\n\t  fi\n\tfi\n\t_LT_AC_TAGVAR(link_all_deplibs, $1)=yes\n\t;;\n    esac\n    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'\n    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:\n    ;;\n  linux*)\n    case $cc_basename in\n      KCC*)\n\t# Kuck and Associates, Inc. (KAI) C++ Compiler\n\n\t# KCC will only create a shared library if the output file\n\t# ends with \".so\" (or \".sl\" for HP-UX), so rename the library\n\t# to its proper name (with version) after linking.\n\t_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\\''s/\\([[^()0-9A-Za-z{}]]\\)/\\\\\\\\\\1/g'\\''`; templib=`echo $lib | $SED -e \"s/\\${tempext}\\..*/.so/\"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \\$templib; mv \\$templib $lib'\n\t_LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\\''s/\\([[^()0-9A-Za-z{}]]\\)/\\\\\\\\\\1/g'\\''`; templib=`echo $lib | $SED -e \"s/\\${tempext}\\..*/.so/\"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \\$templib ${wl}-retain-symbols-file,$export_symbols; mv \\$templib $lib'\n\t# Commands to make compiler produce verbose output that lists\n\t# what \"hidden\" libraries, object files and flags are used when\n\t# linking a shared library.\n\t#\n\t# There doesn't appear to be a way to prevent this compiler from\n\t# explicitly linking system object files so we need to strip them\n\t# from the output so that they don't get included in the library\n\t# dependencies.\n\toutput_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep \"ld\"`; rm -f libconftest$shared_ext; list=\"\"; for z in $templist; do case $z in conftest.$objext) list=\"$list $z\";; *.$objext);; *) list=\"$list $z\";;esac; done; echo $list'\n\n\t_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'\n\t_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'\n\n\t# Archives containing C++ object files must be created using\n\t# \"CC -Bstatic\", where \"CC\" is the KAI C++ compiler.\n\t_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'\n\t;;\n      icpc*)\n\t# Intel C++\n\twith_gnu_ld=yes\n\t# version 8.0 and above of icpc choke on multiply defined symbols\n\t# if we add $predep_objects and $postdep_objects, however 7.1 and\n\t# earlier do not add the objects themselves.\n\tcase `$CC -V 2>&1` in\n\t*\"Version 7.\"*)\n  \t  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'\n  \t  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n\t  ;;\n\t*)  # Version 8.0 or newer\n\t  tmp_idyn=\n\t  case $host_cpu in\n\t    ia64*) tmp_idyn=' -i_dynamic';;\n\t  esac\n  \t  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'\"$tmp_idyn\"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\t  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'\"$tmp_idyn\"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n\t  ;;\n\tesac\n\t_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no\n\t_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'\n\t_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'\n\t_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'\n\t;;\n      pgCC*)\n        # Portland Group C++ compiler\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'\n  \t_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'\n\n\t_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'\n\t_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'\n\t_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\\\"\\\"; do test  -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience,$conv\\\"; done; $echo \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n        ;;\n      cxx*)\n\t# Compaq C++\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\t_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'\n\n\trunpath_var=LD_RUN_PATH\n\t_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'\n\t_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:\n\n\t# Commands to make compiler produce verbose output that lists\n\t# what \"hidden\" libraries, object files and flags are used when\n\t# linking a shared library.\n\t#\n\t# There doesn't appear to be a way to prevent this compiler from\n\t# explicitly linking system object files so we need to strip them\n\t# from the output so that they don't get included in the library\n\t# dependencies.\n\toutput_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"ld\"`; templist=`echo $templist | $SED \"s/\\(^.*ld.*\\)\\( .*ld .*$\\)/\\1/\"`; list=\"\"; for z in $templist; do case $z in conftest.$objext) list=\"$list $z\";; *.$objext);; *) list=\"$list $z\";;esac; done; echo $list'\n\t;;\n    esac\n    ;;\n  lynxos*)\n    # FIXME: insert proper C++ library support\n    _LT_AC_TAGVAR(ld_shlibs, $1)=no\n    ;;\n  m88k*)\n    # FIXME: insert proper C++ library support\n    _LT_AC_TAGVAR(ld_shlibs, $1)=no\n    ;;\n  mvs*)\n    case $cc_basename in\n      cxx*)\n\t# FIXME: insert proper C++ library support\n\t_LT_AC_TAGVAR(ld_shlibs, $1)=no\n\t;;\n      *)\n\t# FIXME: insert proper C++ library support\n\t_LT_AC_TAGVAR(ld_shlibs, $1)=no\n\t;;\n    esac\n    ;;\n  netbsd*)\n    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then\n      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'\n      wlarc=\n      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'\n      _LT_AC_TAGVAR(hardcode_direct, $1)=yes\n      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no\n    fi\n    # Workaround some broken pre-1.5 toolchains\n    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e \"s:-lgcc -lc -lgcc::\"'\n    ;;\n  openbsd2*)\n    # C++ shared libraries are fairly broken\n    _LT_AC_TAGVAR(ld_shlibs, $1)=no\n    ;;\n  openbsd*)\n    _LT_AC_TAGVAR(hardcode_direct, $1)=yes\n    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no\n    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'\n    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'\n    if test -z \"`echo __ELF__ | $CC -E - | grep __ELF__`\" || test \"$host_os-$host_cpu\" = \"openbsd2.8-powerpc\"; then\n      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'\n      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'\n      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=\"$wlarc\"'--whole-archive$convenience '\"$wlarc\"'--no-whole-archive'\n    fi\n    output_verbose_link_cmd='echo'\n    ;;\n  osf3*)\n    case $cc_basename in\n      KCC*)\n\t# Kuck and Associates, Inc. (KAI) C++ Compiler\n\n\t# KCC will only create a shared library if the output file\n\t# ends with \".so\" (or \".sl\" for HP-UX), so rename the library\n\t# to its proper name (with version) after linking.\n\t_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\\''s/\\([[^()0-9A-Za-z{}]]\\)/\\\\\\\\\\1/g'\\''`; templib=`echo $lib | $SED -e \"s/\\${tempext}\\..*/.so/\"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \\$templib; mv \\$templib $lib'\n\n\t_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'\n\t_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:\n\n\t# Archives containing C++ object files must be created using\n\t# \"CC -Bstatic\", where \"CC\" is the KAI C++ compiler.\n\t_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'\n\n\t;;\n      RCC*)\n\t# Rational C++ 2.4.1\n\t# FIXME: insert proper C++ library support\n\t_LT_AC_TAGVAR(ld_shlibs, $1)=no\n\t;;\n      cxx*)\n\t_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\\*'\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n \"$verstring\" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'\n\n\t_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'\n\t_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:\n\n\t# Commands to make compiler produce verbose output that lists\n\t# what \"hidden\" libraries, object files and flags are used when\n\t# linking a shared library.\n\t#\n\t# There doesn't appear to be a way to prevent this compiler from\n\t# explicitly linking system object files so we need to strip them\n\t# from the output so that they don't get included in the library\n\t# dependencies.\n\toutput_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"ld\" | grep -v \"ld:\"`; templist=`echo $templist | $SED \"s/\\(^.*ld.*\\)\\( .*ld.*$\\)/\\1/\"`; list=\"\"; for z in $templist; do case $z in conftest.$objext) list=\"$list $z\";; *.$objext);; *) list=\"$list $z\";;esac; done; echo $list'\n\t;;\n      *)\n\tif test \"$GXX\" = yes && test \"$with_gnu_ld\" = no; then\n\t  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\\*'\n\t  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $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'\n\n\t  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'\n\t  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:\n\n\t  # Commands to make compiler produce verbose output that lists\n\t  # what \"hidden\" libraries, object files and flags are used when\n\t  # linking a shared library.\n\t  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\\-L\"'\n\n\telse\n\t  # FIXME: insert proper C++ library support\n\t  _LT_AC_TAGVAR(ld_shlibs, $1)=no\n\tfi\n\t;;\n    esac\n    ;;\n  osf4* | osf5*)\n    case $cc_basename in\n      KCC*)\n\t# Kuck and Associates, Inc. (KAI) C++ Compiler\n\n\t# KCC will only create a shared library if the output file\n\t# ends with \".so\" (or \".sl\" for HP-UX), so rename the library\n\t# to its proper name (with version) after linking.\n\t_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\\''s/\\([[^()0-9A-Za-z{}]]\\)/\\\\\\\\\\1/g'\\''`; templib=`echo $lib | $SED -e \"s/\\${tempext}\\..*/.so/\"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \\$templib; mv \\$templib $lib'\n\n\t_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'\n\t_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:\n\n\t# Archives containing C++ object files must be created using\n\t# the KAI C++ compiler.\n\t_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'\n\t;;\n      RCC*)\n\t# Rational C++ 2.4.1\n\t# FIXME: insert proper C++ library support\n\t_LT_AC_TAGVAR(ld_shlibs, $1)=no\n\t;;\n      cxx*)\n\t_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \\*'\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n \"$verstring\" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'\n\t_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf \"%s %s\\\\n\" -exported_symbol \"\\$i\" >> $lib.exp; done~\n\t  echo \"-hidden\">> $lib.exp~\n\t  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n \"$verstring\" && echo -set_version\t$verstring` -update_registry ${output_objdir}/so_locations -o $lib~\n\t  $rm $lib.exp'\n\n\t_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'\n\t_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:\n\n\t# Commands to make compiler produce verbose output that lists\n\t# what \"hidden\" libraries, object files and flags are used when\n\t# linking a shared library.\n\t#\n\t# There doesn't appear to be a way to prevent this compiler from\n\t# explicitly linking system object files so we need to strip them\n\t# from the output so that they don't get included in the library\n\t# dependencies.\n\toutput_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"ld\" | grep -v \"ld:\"`; templist=`echo $templist | $SED \"s/\\(^.*ld.*\\)\\( .*ld.*$\\)/\\1/\"`; list=\"\"; for z in $templist; do case $z in conftest.$objext) list=\"$list $z\";; *.$objext);; *) list=\"$list $z\";;esac; done; echo $list'\n\t;;\n      *)\n\tif test \"$GXX\" = yes && test \"$with_gnu_ld\" = no; then\n\t  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\\*'\n\t _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n \"$verstring\" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'\n\n\t  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'\n\t  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:\n\n\t  # Commands to make compiler produce verbose output that lists\n\t  # what \"hidden\" libraries, object files and flags are used when\n\t  # linking a shared library.\n\t  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\\-L\"'\n\n\telse\n\t  # FIXME: insert proper C++ library support\n\t  _LT_AC_TAGVAR(ld_shlibs, $1)=no\n\tfi\n\t;;\n    esac\n    ;;\n  psos*)\n    # FIXME: insert proper C++ library support\n    _LT_AC_TAGVAR(ld_shlibs, $1)=no\n    ;;\n  sunos4*)\n    case $cc_basename in\n      CC*)\n\t# Sun C++ 4.x\n\t# FIXME: insert proper C++ library support\n\t_LT_AC_TAGVAR(ld_shlibs, $1)=no\n\t;;\n      lcc*)\n\t# Lucid\n\t# FIXME: insert proper C++ library support\n\t_LT_AC_TAGVAR(ld_shlibs, $1)=no\n\t;;\n      *)\n\t# FIXME: insert proper C++ library support\n\t_LT_AC_TAGVAR(ld_shlibs, $1)=no\n\t;;\n    esac\n    ;;\n  solaris*)\n    case $cc_basename in\n      CC*)\n\t# Sun C++ 4.2, 5.x and Centerline C++\n        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes\n\t_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~$echo \"local: *; };\" >> $lib.exp~\n\t$CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'\n\n\t_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'\n\t_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no\n\tcase $host_os in\n\t  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;\n\t  *)\n\t    # The C++ compiler is used as linker so we must use $wl\n\t    # flag to pass the commands to the underlying system\n\t    # linker. We must also pass each convience library through\n\t    # to the system linker between allextract/defaultextract.\n\t    # The C++ compiler will combine linker options so we\n\t    # cannot just pass the convience library names through\n\t    # without $wl.\n\t    # Supported since Solaris 2.6 (maybe 2.5.1?)\n\t    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\\\"\\\"; do test -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience,$conv\\\"; done; $echo \\\"$new_convenience\\\"` ${wl}-z ${wl}defaultextract'\n\t    ;;\n\tesac\n\t_LT_AC_TAGVAR(link_all_deplibs, $1)=yes\n\n\toutput_verbose_link_cmd='echo'\n\n\t# Archives containing C++ object files must be created using\n\t# \"CC -xar\", where \"CC\" is the Sun C++ compiler.  This is\n\t# necessary to make sure instantiated templates are included\n\t# in the archive.\n\t_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'\n\t;;\n      gcx*)\n\t# Green Hills C++ Compiler\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'\n\n\t# The C++ compiler must be used to create the archive.\n\t_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'\n\t;;\n      *)\n\t# GNU C++ compiler with Solaris linker\n\tif test \"$GXX\" = yes && test \"$with_gnu_ld\" = no; then\n\t  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'\n\t  if $CC --version | grep -v '^2\\.7' > /dev/null; then\n\t    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'\n\t    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~$echo \"local: *; };\" >> $lib.exp~\n\t\t$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'\n\n\t    # Commands to make compiler produce verbose output that lists\n\t    # what \"hidden\" libraries, object files and flags are used when\n\t    # linking a shared library.\n\t    output_verbose_link_cmd=\"$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \\\"\\-L\\\"\"\n\t  else\n\t    # g++ 2.7 appears to require `-G' NOT `-shared' on this\n\t    # platform.\n\t    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'\n\t    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~$echo \"local: *; };\" >> $lib.exp~\n\t\t$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'\n\n\t    # Commands to make compiler produce verbose output that lists\n\t    # what \"hidden\" libraries, object files and flags are used when\n\t    # linking a shared library.\n\t    output_verbose_link_cmd=\"$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \\\"\\-L\\\"\"\n\t  fi\n\n\t  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'\n\tfi\n\t;;\n    esac\n    ;;\n  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)\n    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'\n    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no\n    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no\n    runpath_var='LD_RUN_PATH'\n\n    case $cc_basename in\n      CC*)\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t;;\n      *)\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t;;\n    esac\n    ;;\n  sysv5* | sco3.2v5* | sco5v6*)\n    # Note: We can NOT use -z defs as we might desire, because we do not\n    # link with -lc, and that would cause any symbols used from libc to\n    # always be unresolved, which means just about no library would\n    # ever link correctly.  If we're not using GNU ld we use -z text\n    # though, which does catch some bad symbols but isn't as heavy-handed\n    # as -z defs.\n    # For security reasons, it is highly recommended that you always\n    # use absolute paths for naming shared libraries, and exclude the\n    # DT_RUNPATH tag from executables and libraries.  But doing so\n    # requires that you compile everything twice, which is a pain.\n    # So that behaviour is only enabled if SCOABSPATH is set to a\n    # non-empty value in the environment.  Most likely only useful for\n    # creating official distributions of packages.\n    # This is a hack until libtool officially supports absolute path\n    # names for shared libraries.\n    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'\n    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'\n    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no\n    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no\n    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z \"$SCOABSPATH\" && echo ${wl}-R,$libdir`'\n    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'\n    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes\n    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'\n    runpath_var='LD_RUN_PATH'\n\n    case $cc_basename in\n      CC*)\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t;;\n      *)\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t;;\n    esac\n    ;;\n  tandem*)\n    case $cc_basename in\n      NCC*)\n\t# NonStop-UX NCC 3.20\n\t# FIXME: insert proper C++ library support\n\t_LT_AC_TAGVAR(ld_shlibs, $1)=no\n\t;;\n      *)\n\t# FIXME: insert proper C++ library support\n\t_LT_AC_TAGVAR(ld_shlibs, $1)=no\n\t;;\n    esac\n    ;;\n  vxworks*)\n    # FIXME: insert proper C++ library support\n    _LT_AC_TAGVAR(ld_shlibs, $1)=no\n    ;;\n  *)\n    # FIXME: insert proper C++ library support\n    _LT_AC_TAGVAR(ld_shlibs, $1)=no\n    ;;\nesac\nAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])\ntest \"$_LT_AC_TAGVAR(ld_shlibs, $1)\" = no && can_build_shared=no\n\n_LT_AC_TAGVAR(GCC, $1)=\"$GXX\"\n_LT_AC_TAGVAR(LD, $1)=\"$LD\"\n\nAC_LIBTOOL_POSTDEP_PREDEP($1)\nAC_LIBTOOL_PROG_COMPILER_PIC($1)\nAC_LIBTOOL_PROG_CC_C_O($1)\nAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)\nAC_LIBTOOL_PROG_LD_SHLIBS($1)\nAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)\nAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)\n\nAC_LIBTOOL_CONFIG($1)\n\nAC_LANG_POP\nCC=$lt_save_CC\nLDCXX=$LD\nLD=$lt_save_LD\nGCC=$lt_save_GCC\nwith_gnu_ldcxx=$with_gnu_ld\nwith_gnu_ld=$lt_save_with_gnu_ld\nlt_cv_path_LDCXX=$lt_cv_path_LD\nlt_cv_path_LD=$lt_save_path_LD\nlt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld\nlt_cv_prog_gnu_ld=$lt_save_with_gnu_ld\n])# AC_LIBTOOL_LANG_CXX_CONFIG\n\n# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])\n# ------------------------------------\n# Figure out \"hidden\" library dependencies from verbose\n# compiler output when linking a shared library.\n# Parse the compiler output and extract the necessary\n# objects, libraries and library flags.\nAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[\ndnl we can't use the lt_simple_compile_test_code here,\ndnl because it contains code intended for an executable,\ndnl not a library.  It's possible we should let each\ndnl tag define a new lt_????_link_test_code variable,\ndnl but it's only used here...\nifelse([$1],[],[cat > conftest.$ac_ext <<EOF\nint a;\nvoid foo (void) { a = 0; }\nEOF\n],[$1],[CXX],[cat > conftest.$ac_ext <<EOF\nclass Foo\n{\npublic:\n  Foo (void) { a = 0; }\nprivate:\n  int a;\n};\nEOF\n],[$1],[F77],[cat > conftest.$ac_ext <<EOF\n      subroutine foo\n      implicit none\n      integer*4 a\n      a=0\n      return\n      end\nEOF\n],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF\npublic class foo {\n  private int a;\n  public void bar (void) {\n    a = 0;\n  }\n};\nEOF\n])\ndnl Parse the compiler output and extract the necessary\ndnl objects, libraries and library flags.\nif AC_TRY_EVAL(ac_compile); then\n  # Parse the compiler output and extract the necessary\n  # objects, libraries and library flags.\n\n  # Sentinel used to keep track of whether or not we are before\n  # the conftest object file.\n  pre_test_object_deps_done=no\n\n  # The `*' in the case matches for architectures that use `case' in\n  # $output_verbose_cmd can trigger glob expansion during the loop\n  # eval without this substitution.\n  output_verbose_link_cmd=`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`\n\n  for p in `eval $output_verbose_link_cmd`; do\n    case $p in\n\n    -L* | -R* | -l*)\n       # Some compilers place space between \"-{L,R}\" and the path.\n       # Remove the space.\n       if test $p = \"-L\" \\\n\t  || test $p = \"-R\"; then\n\t prev=$p\n\t continue\n       else\n\t prev=\n       fi\n\n       if test \"$pre_test_object_deps_done\" = no; then\n\t case $p in\n\t -L* | -R*)\n\t   # Internal compiler library paths should come after those\n\t   # provided the user.  The postdeps already come after the\n\t   # user supplied libs so there is no need to process them.\n\t   if test -z \"$_LT_AC_TAGVAR(compiler_lib_search_path, $1)\"; then\n\t     _LT_AC_TAGVAR(compiler_lib_search_path, $1)=\"${prev}${p}\"\n\t   else\n\t     _LT_AC_TAGVAR(compiler_lib_search_path, $1)=\"${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}\"\n\t   fi\n\t   ;;\n\t # The \"-l\" case would never come before the object being\n\t # linked, so don't bother handling this case.\n\t esac\n       else\n\t if test -z \"$_LT_AC_TAGVAR(postdeps, $1)\"; then\n\t   _LT_AC_TAGVAR(postdeps, $1)=\"${prev}${p}\"\n\t else\n\t   _LT_AC_TAGVAR(postdeps, $1)=\"${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}\"\n\t fi\n       fi\n       ;;\n\n    *.$objext)\n       # This assumes that the test object file only shows up\n       # once in the compiler output.\n       if test \"$p\" = \"conftest.$objext\"; then\n\t pre_test_object_deps_done=yes\n\t continue\n       fi\n\n       if test \"$pre_test_object_deps_done\" = no; then\n\t if test -z \"$_LT_AC_TAGVAR(predep_objects, $1)\"; then\n\t   _LT_AC_TAGVAR(predep_objects, $1)=\"$p\"\n\t else\n\t   _LT_AC_TAGVAR(predep_objects, $1)=\"$_LT_AC_TAGVAR(predep_objects, $1) $p\"\n\t fi\n       else\n\t if test -z \"$_LT_AC_TAGVAR(postdep_objects, $1)\"; then\n\t   _LT_AC_TAGVAR(postdep_objects, $1)=\"$p\"\n\t else\n\t   _LT_AC_TAGVAR(postdep_objects, $1)=\"$_LT_AC_TAGVAR(postdep_objects, $1) $p\"\n\t fi\n       fi\n       ;;\n\n    *) ;; # Ignore the rest.\n\n    esac\n  done\n\n  # Clean up.\n  rm -f a.out a.exe\nelse\n  echo \"libtool.m4: error: problem compiling $1 test program\"\nfi\n\n$rm -f confest.$objext\n\n# PORTME: override above test on systems where it is broken\nifelse([$1],[CXX],\n[case $host_os in\ninterix3*)\n  # Interix 3.5 installs completely hosed .la files for C++, so rather than\n  # hack all around it, let's just trust \"g++\" to DTRT.\n  _LT_AC_TAGVAR(predep_objects,$1)=\n  _LT_AC_TAGVAR(postdep_objects,$1)=\n  _LT_AC_TAGVAR(postdeps,$1)=\n  ;;\n\nsolaris*)\n  case $cc_basename in\n  CC*)\n    # Adding this requires a known-good setup of shared libraries for\n    # Sun compiler versions before 5.6, else PIC objects from an old\n    # archive will be linked into the output, leading to subtle bugs.\n    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'\n    ;;\n  esac\n  ;;\nesac\n])\n\ncase \" $_LT_AC_TAGVAR(postdeps, $1) \" in\n*\" -lc \"*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;\nesac\n])# AC_LIBTOOL_POSTDEP_PREDEP\n\n# AC_LIBTOOL_LANG_F77_CONFIG\n# --------------------------\n# Ensure that the configuration vars for the C compiler are\n# suitably defined.  Those variables are subsequently used by\n# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.\nAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])\nAC_DEFUN([_LT_AC_LANG_F77_CONFIG],\n[AC_REQUIRE([AC_PROG_F77])\nAC_LANG_PUSH(Fortran 77)\n\n_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no\n_LT_AC_TAGVAR(allow_undefined_flag, $1)=\n_LT_AC_TAGVAR(always_export_symbols, $1)=no\n_LT_AC_TAGVAR(archive_expsym_cmds, $1)=\n_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=\n_LT_AC_TAGVAR(hardcode_direct, $1)=no\n_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=\n_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=\n_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=\n_LT_AC_TAGVAR(hardcode_minus_L, $1)=no\n_LT_AC_TAGVAR(hardcode_automatic, $1)=no\n_LT_AC_TAGVAR(module_cmds, $1)=\n_LT_AC_TAGVAR(module_expsym_cmds, $1)=\n_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown\n_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds\n_LT_AC_TAGVAR(no_undefined_flag, $1)=\n_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=\n_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no\n\n# Source file extension for f77 test sources.\nac_ext=f\n\n# Object file extension for compiled f77 test sources.\nobjext=o\n_LT_AC_TAGVAR(objext, $1)=$objext\n\n# Code to be used in simple compile tests\nlt_simple_compile_test_code=\"      subroutine t\\n      return\\n      end\\n\"\n\n# Code to be used in simple link tests\nlt_simple_link_test_code=\"      program t\\n      end\\n\"\n\n# ltmain only uses $CC for tagged configurations so make sure $CC is set.\n_LT_AC_SYS_COMPILER\n\n# save warnings/boilerplate of simple test code\n_LT_COMPILER_BOILERPLATE\n_LT_LINKER_BOILERPLATE\n\n# Allow CC to be a program name with arguments.\nlt_save_CC=\"$CC\"\nCC=${F77-\"f77\"}\ncompiler=$CC\n_LT_AC_TAGVAR(compiler, $1)=$CC\n_LT_CC_BASENAME([$compiler])\n\nAC_MSG_CHECKING([if libtool supports shared libraries])\nAC_MSG_RESULT([$can_build_shared])\n\nAC_MSG_CHECKING([whether to build shared libraries])\ntest \"$can_build_shared\" = \"no\" && enable_shared=no\n\n# On AIX, shared libraries and static libraries use the same namespace, and\n# are all built from PIC.\ncase $host_os in\naix3*)\n  test \"$enable_shared\" = yes && enable_static=no\n  if test -n \"$RANLIB\"; then\n    archive_cmds=\"$archive_cmds~\\$RANLIB \\$lib\"\n    postinstall_cmds='$RANLIB $lib'\n  fi\n  ;;\naix4* | aix5*)\n  if test \"$host_cpu\" != ia64 && test \"$aix_use_runtimelinking\" = no ; then\n    test \"$enable_shared\" = yes && enable_static=no\n  fi\n  ;;\nesac\nAC_MSG_RESULT([$enable_shared])\n\nAC_MSG_CHECKING([whether to build static libraries])\n# Make sure either enable_shared or enable_static is yes.\ntest \"$enable_shared\" = yes || enable_static=yes\nAC_MSG_RESULT([$enable_static])\n\n_LT_AC_TAGVAR(GCC, $1)=\"$G77\"\n_LT_AC_TAGVAR(LD, $1)=\"$LD\"\n\nAC_LIBTOOL_PROG_COMPILER_PIC($1)\nAC_LIBTOOL_PROG_CC_C_O($1)\nAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)\nAC_LIBTOOL_PROG_LD_SHLIBS($1)\nAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)\nAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)\n\nAC_LIBTOOL_CONFIG($1)\n\nAC_LANG_POP\nCC=\"$lt_save_CC\"\n])# AC_LIBTOOL_LANG_F77_CONFIG\n\n\n# AC_LIBTOOL_LANG_GCJ_CONFIG\n# --------------------------\n# Ensure that the configuration vars for the C compiler are\n# suitably defined.  Those variables are subsequently used by\n# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.\nAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])\nAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],\n[AC_LANG_SAVE\n\n# Source file extension for Java test sources.\nac_ext=java\n\n# Object file extension for compiled Java test sources.\nobjext=o\n_LT_AC_TAGVAR(objext, $1)=$objext\n\n# Code to be used in simple compile tests\nlt_simple_compile_test_code=\"class foo {}\\n\"\n\n# Code to be used in simple link tests\nlt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\\n'\n\n# ltmain only uses $CC for tagged configurations so make sure $CC is set.\n_LT_AC_SYS_COMPILER\n\n# save warnings/boilerplate of simple test code\n_LT_COMPILER_BOILERPLATE\n_LT_LINKER_BOILERPLATE\n\n# Allow CC to be a program name with arguments.\nlt_save_CC=\"$CC\"\nCC=${GCJ-\"gcj\"}\ncompiler=$CC\n_LT_AC_TAGVAR(compiler, $1)=$CC\n_LT_CC_BASENAME([$compiler])\n\n# GCJ did not exist at the time GCC didn't implicitly link libc in.\n_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no\n\n_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds\n\nAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)\nAC_LIBTOOL_PROG_COMPILER_PIC($1)\nAC_LIBTOOL_PROG_CC_C_O($1)\nAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)\nAC_LIBTOOL_PROG_LD_SHLIBS($1)\nAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)\nAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)\n\nAC_LIBTOOL_CONFIG($1)\n\nAC_LANG_RESTORE\nCC=\"$lt_save_CC\"\n])# AC_LIBTOOL_LANG_GCJ_CONFIG\n\n\n# AC_LIBTOOL_LANG_RC_CONFIG\n# -------------------------\n# Ensure that the configuration vars for the Windows resource compiler are\n# suitably defined.  Those variables are subsequently used by\n# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.\nAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])\nAC_DEFUN([_LT_AC_LANG_RC_CONFIG],\n[AC_LANG_SAVE\n\n# Source file extension for RC test sources.\nac_ext=rc\n\n# Object file extension for compiled RC test sources.\nobjext=o\n_LT_AC_TAGVAR(objext, $1)=$objext\n\n# Code to be used in simple compile tests\nlt_simple_compile_test_code='sample MENU { MENUITEM \"&Soup\", 100, CHECKED }\\n'\n\n# Code to be used in simple link tests\nlt_simple_link_test_code=\"$lt_simple_compile_test_code\"\n\n# ltmain only uses $CC for tagged configurations so make sure $CC is set.\n_LT_AC_SYS_COMPILER\n\n# save warnings/boilerplate of simple test code\n_LT_COMPILER_BOILERPLATE\n_LT_LINKER_BOILERPLATE\n\n# Allow CC to be a program name with arguments.\nlt_save_CC=\"$CC\"\nCC=${RC-\"windres\"}\ncompiler=$CC\n_LT_AC_TAGVAR(compiler, $1)=$CC\n_LT_CC_BASENAME([$compiler])\n_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes\n\nAC_LIBTOOL_CONFIG($1)\n\nAC_LANG_RESTORE\nCC=\"$lt_save_CC\"\n])# AC_LIBTOOL_LANG_RC_CONFIG\n\n\n# AC_LIBTOOL_CONFIG([TAGNAME])\n# ----------------------------\n# If TAGNAME is not passed, then create an initial libtool script\n# with a default configuration from the untagged config vars.  Otherwise\n# add code to config.status for appending the configuration named by\n# TAGNAME from the matching tagged config vars.\nAC_DEFUN([AC_LIBTOOL_CONFIG],\n[# The else clause should only fire when bootstrapping the\n# libtool distribution, otherwise you forgot to ship ltmain.sh\n# with your package, and you will get complaints that there are\n# no rules to generate ltmain.sh.\nif test -f \"$ltmain\"; then\n  # See if we are running on zsh, and set the options which allow our commands through\n  # without removal of \\ escapes.\n  if test -n \"${ZSH_VERSION+set}\" ; then\n    setopt NO_GLOB_SUBST\n  fi\n  # Now quote all the things that may contain metacharacters while being\n  # careful not to overquote the AC_SUBSTed values.  We take copies of the\n  # variables and quote the copies for generation of the libtool script.\n  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \\\n    SED SHELL STRIP \\\n    libname_spec library_names_spec soname_spec extract_expsyms_cmds \\\n    old_striplib striplib file_magic_cmd finish_cmds finish_eval \\\n    deplibs_check_method reload_flag reload_cmds need_locks \\\n    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \\\n    lt_cv_sys_global_symbol_to_c_name_address \\\n    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \\\n    old_postinstall_cmds old_postuninstall_cmds \\\n    _LT_AC_TAGVAR(compiler, $1) \\\n    _LT_AC_TAGVAR(CC, $1) \\\n    _LT_AC_TAGVAR(LD, $1) \\\n    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \\\n    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \\\n    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \\\n    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \\\n    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \\\n    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \\\n    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \\\n    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \\\n    _LT_AC_TAGVAR(old_archive_cmds, $1) \\\n    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \\\n    _LT_AC_TAGVAR(predep_objects, $1) \\\n    _LT_AC_TAGVAR(postdep_objects, $1) \\\n    _LT_AC_TAGVAR(predeps, $1) \\\n    _LT_AC_TAGVAR(postdeps, $1) \\\n    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \\\n    _LT_AC_TAGVAR(archive_cmds, $1) \\\n    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \\\n    _LT_AC_TAGVAR(postinstall_cmds, $1) \\\n    _LT_AC_TAGVAR(postuninstall_cmds, $1) \\\n    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \\\n    _LT_AC_TAGVAR(allow_undefined_flag, $1) \\\n    _LT_AC_TAGVAR(no_undefined_flag, $1) \\\n    _LT_AC_TAGVAR(export_symbols_cmds, $1) \\\n    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \\\n    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \\\n    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \\\n    _LT_AC_TAGVAR(hardcode_automatic, $1) \\\n    _LT_AC_TAGVAR(module_cmds, $1) \\\n    _LT_AC_TAGVAR(module_expsym_cmds, $1) \\\n    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \\\n    _LT_AC_TAGVAR(exclude_expsyms, $1) \\\n    _LT_AC_TAGVAR(include_expsyms, $1); do\n\n    case $var in\n    _LT_AC_TAGVAR(old_archive_cmds, $1) | \\\n    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \\\n    _LT_AC_TAGVAR(archive_cmds, $1) | \\\n    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \\\n    _LT_AC_TAGVAR(module_cmds, $1) | \\\n    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \\\n    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \\\n    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \\\n    extract_expsyms_cmds | reload_cmds | finish_cmds | \\\n    postinstall_cmds | postuninstall_cmds | \\\n    old_postinstall_cmds | old_postuninstall_cmds | \\\n    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)\n      # Double-quote double-evaled strings.\n      eval \"lt_$var=\\\\\\\"\\`\\$echo \\\"X\\$$var\\\" | \\$Xsed -e \\\"\\$double_quote_subst\\\" -e \\\"\\$sed_quote_subst\\\" -e \\\"\\$delay_variable_subst\\\"\\`\\\\\\\"\"\n      ;;\n    *)\n      eval \"lt_$var=\\\\\\\"\\`\\$echo \\\"X\\$$var\\\" | \\$Xsed -e \\\"\\$sed_quote_subst\\\"\\`\\\\\\\"\"\n      ;;\n    esac\n  done\n\n  case $lt_echo in\n  *'\\[$]0 --fallback-echo\"')\n    lt_echo=`$echo \"X$lt_echo\" | $Xsed -e 's/\\\\\\\\\\\\\\[$]0 --fallback-echo\"[$]/[$]0 --fallback-echo\"/'`\n    ;;\n  esac\n\nifelse([$1], [],\n  [cfgfile=\"${ofile}T\"\n  trap \"$rm \\\"$cfgfile\\\"; exit 1\" 1 2 15\n  $rm -f \"$cfgfile\"\n  AC_MSG_NOTICE([creating $ofile])],\n  [cfgfile=\"$ofile\"])\n\n  cat <<__EOF__ >> \"$cfgfile\"\nifelse([$1], [],\n[#! $SHELL\n\n# `$echo \"$cfgfile\" | sed 's%^.*/%%'` - Provide generalized library-building support services.\n# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)\n# NOTE: Changes made to this file will be lost: look at ltmain.sh.\n#\n# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001\n# Free Software Foundation, Inc.\n#\n# This file is part of GNU Libtool:\n# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful, but\n# WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n# General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n#\n# As a special exception to the GNU General Public License, if you\n# distribute this file as part of a program that contains a\n# configuration script generated by Autoconf, you may include it under\n# the same distribution terms that you use for the rest of that program.\n\n# A sed program that does not truncate output.\nSED=$lt_SED\n\n# Sed that helps us avoid accidentally triggering echo(1) options like -n.\nXsed=\"$SED -e 1s/^X//\"\n\n# The HP-UX ksh and POSIX shell print the target directory to stdout\n# if CDPATH is set.\n(unset CDPATH) >/dev/null 2>&1 && unset CDPATH\n\n# The names of the tagged configurations supported by this script.\navailable_tags=\n\n# ### BEGIN LIBTOOL CONFIG],\n[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])\n\n# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:\n\n# Shell to use when invoking shell scripts.\nSHELL=$lt_SHELL\n\n# Whether or not to build shared libraries.\nbuild_libtool_libs=$enable_shared\n\n# Whether or not to build static libraries.\nbuild_old_libs=$enable_static\n\n# Whether or not to add -lc for building shared libraries.\nbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)\n\n# Whether or not to disallow shared libs when runtime libs are static\nallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)\n\n# Whether or not to optimize for fast installation.\nfast_install=$enable_fast_install\n\n# The host system.\nhost_alias=$host_alias\nhost=$host\nhost_os=$host_os\n\n# The build system.\nbuild_alias=$build_alias\nbuild=$build\nbuild_os=$build_os\n\n# An echo program that does not interpret backslashes.\necho=$lt_echo\n\n# The archiver.\nAR=$lt_AR\nAR_FLAGS=$lt_AR_FLAGS\n\n# A C compiler.\nLTCC=$lt_LTCC\n\n# LTCC compiler flags.\nLTCFLAGS=$lt_LTCFLAGS\n\n# A language-specific compiler.\nCC=$lt_[]_LT_AC_TAGVAR(compiler, $1)\n\n# Is the compiler the GNU C compiler?\nwith_gcc=$_LT_AC_TAGVAR(GCC, $1)\n\ngcc_dir=\\`gcc -print-file-name=. | $SED 's,/\\.$,,'\\`\ngcc_ver=\\`gcc -dumpversion\\`\n\n# An ERE matcher.\nEGREP=$lt_EGREP\n\n# The linker used to build libraries.\nLD=$lt_[]_LT_AC_TAGVAR(LD, $1)\n\n# Whether we need hard or soft links.\nLN_S=$lt_LN_S\n\n# A BSD-compatible nm program.\nNM=$lt_NM\n\n# A symbol stripping program\nSTRIP=$lt_STRIP\n\n# Used to examine libraries when file_magic_cmd begins \"file\"\nMAGIC_CMD=$MAGIC_CMD\n\n# Used on cygwin: DLL creation program.\nDLLTOOL=\"$DLLTOOL\"\n\n# Used on cygwin: object dumper.\nOBJDUMP=\"$OBJDUMP\"\n\n# Used on cygwin: assembler.\nAS=\"$AS\"\n\n# The name of the directory that contains temporary libtool files.\nobjdir=$objdir\n\n# How to create reloadable object files.\nreload_flag=$lt_reload_flag\nreload_cmds=$lt_reload_cmds\n\n# How to pass a linker flag through the compiler.\nwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)\n\n# Object file suffix (normally \"o\").\nobjext=\"$ac_objext\"\n\n# Old archive suffix (normally \"a\").\nlibext=\"$libext\"\n\n# Shared library suffix (normally \".so\").\nshrext_cmds='$shrext_cmds'\n\n# Executable file suffix (normally \"\").\nexeext=\"$exeext\"\n\n# Additional compiler flags for building library objects.\npic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)\npic_mode=$pic_mode\n\n# What is the maximum length of a command?\nmax_cmd_len=$lt_cv_sys_max_cmd_len\n\n# Does compiler simultaneously support -c and -o options?\ncompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)\n\n# Must we lock files when doing compilation?\nneed_locks=$lt_need_locks\n\n# Do we need the lib prefix for modules?\nneed_lib_prefix=$need_lib_prefix\n\n# Do we need a version for libraries?\nneed_version=$need_version\n\n# Whether dlopen is supported.\ndlopen_support=$enable_dlopen\n\n# Whether dlopen of programs is supported.\ndlopen_self=$enable_dlopen_self\n\n# Whether dlopen of statically linked programs is supported.\ndlopen_self_static=$enable_dlopen_self_static\n\n# Compiler flag to prevent dynamic linking.\nlink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\n\n# Compiler flag to turn off builtin functions.\nno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)\n\n# Compiler flag to allow reflexive dlopens.\nexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)\n\n# Compiler flag to generate shared objects directly from archives.\nwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)\n\n# Compiler flag to generate thread-safe objects.\nthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)\n\n# Library versioning type.\nversion_type=$version_type\n\n# Format of library name prefix.\nlibname_spec=$lt_libname_spec\n\n# List of archive names.  First name is the real one, the rest are links.\n# The last name is the one that the linker finds with -lNAME.\nlibrary_names_spec=$lt_library_names_spec\n\n# The coded name of the library, if different from the real name.\nsoname_spec=$lt_soname_spec\n\n# Commands used to build and install an old-style archive.\nRANLIB=$lt_RANLIB\nold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)\nold_postinstall_cmds=$lt_old_postinstall_cmds\nold_postuninstall_cmds=$lt_old_postuninstall_cmds\n\n# Create an old-style archive from a shared archive.\nold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)\n\n# Create a temporary old-style archive to link instead of a shared archive.\nold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)\n\n# Commands used to build and install a shared archive.\narchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)\narchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)\npostinstall_cmds=$lt_postinstall_cmds\npostuninstall_cmds=$lt_postuninstall_cmds\n\n# Commands used to build a loadable module (assumed same as above if empty)\nmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)\nmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)\n\n# Commands to strip libraries.\nold_striplib=$lt_old_striplib\nstriplib=$lt_striplib\n\n# Dependencies to place before the objects being linked to create a\n# shared library.\npredep_objects=\\`echo $lt_[]_LT_AC_TAGVAR(predep_objects, $1) | \\$SED -e \"s@\\${gcc_dir}@\\\\\\${gcc_dir}@g;s@\\${gcc_ver}@\\\\\\${gcc_ver}@g\"\\`\n\n# Dependencies to place after the objects being linked to create a\n# shared library.\npostdep_objects=\\`echo $lt_[]_LT_AC_TAGVAR(postdep_objects, $1) | \\$SED -e \"s@\\${gcc_dir}@\\\\\\${gcc_dir}@g;s@\\${gcc_ver}@\\\\\\${gcc_ver}@g\"\\`\n\n# Dependencies to place before the objects being linked to create a\n# shared library.\npredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)\n\n# Dependencies to place after the objects being linked to create a\n# shared library.\npostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)\n\n# The library search path used internally by the compiler when linking\n# a shared library.\ncompiler_lib_search_path=\\`echo $lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) | \\$SED -e \"s@\\${gcc_dir}@\\\\\\${gcc_dir}@g;s@\\${gcc_ver}@\\\\\\${gcc_ver}@g\"\\`\n\n# Method to check whether dependent libraries are shared objects.\ndeplibs_check_method=$lt_deplibs_check_method\n\n# Command to use when deplibs_check_method == file_magic.\nfile_magic_cmd=$lt_file_magic_cmd\n\n# Flag that allows shared libraries with undefined symbols to be built.\nallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)\n\n# Flag that forces no undefined symbols.\nno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)\n\n# Commands used to finish a libtool library installation in a directory.\nfinish_cmds=$lt_finish_cmds\n\n# Same as above, but a single script fragment to be evaled but not shown.\nfinish_eval=$lt_finish_eval\n\n# Take the output of nm and produce a listing of raw symbols and C names.\nglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe\n\n# Transform the output of nm in a proper C declaration\nglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl\n\n# Transform the output of nm in a C name address pair\nglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address\n\n# This is the shared library runtime path variable.\nrunpath_var=$runpath_var\n\n# This is the shared library path variable.\nshlibpath_var=$shlibpath_var\n\n# Is shlibpath searched before the hard-coded library search path?\nshlibpath_overrides_runpath=$shlibpath_overrides_runpath\n\n# How to hardcode a shared library path into an executable.\nhardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)\n\n# Whether we should hardcode library paths into libraries.\nhardcode_into_libs=$hardcode_into_libs\n\n# Flag to hardcode \\$libdir into a binary during linking.\n# This must work even if \\$libdir does not exist.\nhardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)\n\n# If ld is used when linking, flag to hardcode \\$libdir into\n# a binary during linking. This must work even if \\$libdir does\n# not exist.\nhardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)\n\n# Whether we need a single -rpath flag with a separated argument.\nhardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)\n\n# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the\n# resulting binary.\nhardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)\n\n# Set to yes if using the -LDIR flag during linking hardcodes DIR into the\n# resulting binary.\nhardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)\n\n# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into\n# the resulting binary.\nhardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)\n\n# Set to yes if building a shared library automatically hardcodes DIR into the library\n# and all subsequent libraries and executables linked against it.\nhardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)\n\n# Variables whose values should be saved in libtool wrapper scripts and\n# restored at relink time.\nvariables_saved_for_relink=\"$variables_saved_for_relink\"\n\n# Whether libtool must link a program against all its dependency libraries.\nlink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)\n\n# Compile-time system search path for libraries\nsys_lib_search_path_spec=\\`echo $lt_sys_lib_search_path_spec | \\$SED -e \"s@\\${gcc_dir}@\\\\\\${gcc_dir}@g;s@\\${gcc_ver}@\\\\\\${gcc_ver}@g\"\\`\n\n# Run-time system search path for libraries\nsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec\n\n# Fix the shell variable \\$srcfile for the compiler.\nfix_srcfile_path=\"$_LT_AC_TAGVAR(fix_srcfile_path, $1)\"\n\n# Set to yes if exported symbols are required.\nalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)\n\n# The commands to list exported symbols.\nexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)\n\n# The commands to extract the exported symbol list from a shared archive.\nextract_expsyms_cmds=$lt_extract_expsyms_cmds\n\n# Symbols that should not be listed in the preloaded symbols.\nexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)\n\n# Symbols that must always be exported.\ninclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)\n\nifelse([$1],[],\n[# ### END LIBTOOL CONFIG],\n[# ### END LIBTOOL TAG CONFIG: $tagname])\n\n__EOF__\n\nifelse([$1],[], [\n  case $host_os in\n  aix3*)\n    cat <<\\EOF >> \"$cfgfile\"\n\n# AIX sometimes has problems with the GCC collect2 program.  For some\n# reason, if we set the COLLECT_NAMES environment variable, the problems\n# vanish in a puff of smoke.\nif test \"X${COLLECT_NAMES+set}\" != Xset; then\n  COLLECT_NAMES=\n  export COLLECT_NAMES\nfi\nEOF\n    ;;\n  esac\n\n  # We use sed instead of cat because bash on DJGPP gets confused if\n  # if finds mixed CR/LF and LF-only lines.  Since sed operates in\n  # text mode, it properly converts lines to CR/LF.  This bash problem\n  # is reportedly fixed, but why not run on old versions too?\n  sed '$q' \"$ltmain\" >> \"$cfgfile\" || (rm -f \"$cfgfile\"; exit 1)\n\n  mv -f \"$cfgfile\" \"$ofile\" || \\\n    (rm -f \"$ofile\" && cp \"$cfgfile\" \"$ofile\" && rm -f \"$cfgfile\")\n  chmod +x \"$ofile\"\n])\nelse\n  # If there is no Makefile yet, we rely on a make rule to execute\n  # `config.status --recheck' to rerun these tests and create the\n  # libtool script then.\n  ltmain_in=`echo $ltmain | sed -e 's/\\.sh$/.in/'`\n  if test -f \"$ltmain_in\"; then\n    test -f Makefile && make \"$ltmain\"\n  fi\nfi\n])# AC_LIBTOOL_CONFIG\n\n\n# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])\n# -------------------------------------------\nAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],\n[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl\n\n_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=\n\nif test \"$GCC\" = yes; then\n  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'\n\n  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],\n    lt_cv_prog_compiler_rtti_exceptions,\n    [-fno-rtti -fno-exceptions], [],\n    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=\"$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions\"])\nfi\n])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI\n\n\n# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE\n# ---------------------------------\nAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],\n[AC_REQUIRE([AC_CANONICAL_HOST])\nAC_REQUIRE([AC_PROG_NM])\nAC_REQUIRE([AC_OBJEXT])\n# Check for command to grab the raw symbol name followed by C symbol from nm.\nAC_MSG_CHECKING([command to parse $NM output from $compiler object])\nAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],\n[\n# These are sane defaults that work on at least a few old systems.\n# [They come from Ultrix.  What could be older than Ultrix?!! ;)]\n\n# Character class describing NM global symbol codes.\nsymcode='[[BCDEGRST]]'\n\n# Regexp to match symbols that can be accessed directly from C.\nsympat='\\([[_A-Za-z]][[_A-Za-z0-9]]*\\)'\n\n# Transform an extracted symbol line into a proper C declaration\nlt_cv_sys_global_symbol_to_cdecl=\"sed -n -e 's/^. .* \\(.*\\)$/extern int \\1;/p'\"\n\n# Transform an extracted symbol line into symbol name and symbol address\nlt_cv_sys_global_symbol_to_c_name_address=\"sed -n -e 's/^: \\([[^ ]]*\\) $/  {\\\\\\\"\\1\\\\\\\", (lt_ptr) 0},/p' -e 's/^$symcode \\([[^ ]]*\\) \\([[^ ]]*\\)$/  {\\\"\\2\\\", (lt_ptr) \\&\\2},/p'\"\n\n# Define system-specific variables.\ncase $host_os in\naix*)\n  symcode='[[BCDT]]'\n  ;;\ncygwin* | mingw* | pw32*)\n  symcode='[[ABCDGISTW]]'\n  ;;\nhpux*) # Its linker distinguishes data from code symbols\n  if test \"$host_cpu\" = ia64; then\n    symcode='[[ABCDEGRST]]'\n  fi\n  lt_cv_sys_global_symbol_to_cdecl=\"sed -n -e 's/^T .* \\(.*\\)$/extern int \\1();/p' -e 's/^$symcode* .* \\(.*\\)$/extern char \\1;/p'\"\n  lt_cv_sys_global_symbol_to_c_name_address=\"sed -n -e 's/^: \\([[^ ]]*\\) $/  {\\\\\\\"\\1\\\\\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \\([[^ ]]*\\) \\([[^ ]]*\\)$/  {\\\"\\2\\\", (lt_ptr) \\&\\2},/p'\"\n  ;;\nlinux*)\n  if test \"$host_cpu\" = ia64; then\n    symcode='[[ABCDGIRSTW]]'\n    lt_cv_sys_global_symbol_to_cdecl=\"sed -n -e 's/^T .* \\(.*\\)$/extern int \\1();/p' -e 's/^$symcode* .* \\(.*\\)$/extern char \\1;/p'\"\n    lt_cv_sys_global_symbol_to_c_name_address=\"sed -n -e 's/^: \\([[^ ]]*\\) $/  {\\\\\\\"\\1\\\\\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \\([[^ ]]*\\) \\([[^ ]]*\\)$/  {\\\"\\2\\\", (lt_ptr) \\&\\2},/p'\"\n  fi\n  ;;\nirix* | nonstopux*)\n  symcode='[[BCDEGRST]]'\n  ;;\nosf*)\n  symcode='[[BCDEGQRST]]'\n  ;;\nsolaris*)\n  symcode='[[BDRT]]'\n  ;;\nsco3.2v5*)\n  symcode='[[DT]]'\n  ;;\nsysv4.2uw2*)\n  symcode='[[DT]]'\n  ;;\nsysv5* | sco5v6* | unixware* | OpenUNIX*)\n  symcode='[[ABDT]]'\n  ;;\nsysv4)\n  symcode='[[DFNSTU]]'\n  ;;\nesac\n\n# Handle CRLF in mingw tool chain\nopt_cr=\ncase $build_os in\nmingw*)\n  opt_cr=`echo 'x\\{0,1\\}' | tr x '\\015'` # option cr in regexp\n  ;;\nesac\n\n# If we're using GNU nm, then use its standard symbol codes.\ncase `$NM -V 2>&1` in\n*GNU* | *'with BFD'*)\n  symcode='[[ABCDGIRSTW]]' ;;\nesac\n\n# Try without a prefix undercore, then with it.\nfor ac_symprfx in \"\" \"_\"; do\n\n  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.\n  symxfrm=\"\\\\1 $ac_symprfx\\\\2 \\\\2\"\n\n  # Write the raw and C identifiers.\n  lt_cv_sys_global_symbol_pipe=\"sed -n -e 's/^.*[[ \t]]\\($symcode$symcode*\\)[[ \t]][[ \t]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'\"\n\n  # Check to see that the pipe works correctly.\n  pipe_works=no\n\n  rm -f conftest*\n  cat > conftest.$ac_ext <<EOF\n#ifdef __cplusplus\nextern \"C\" {\n#endif\nchar nm_test_var;\nvoid nm_test_func(){}\n#ifdef __cplusplus\n}\n#endif\nint main(){nm_test_var='a';nm_test_func();return(0);}\nEOF\n\n  if AC_TRY_EVAL(ac_compile); then\n    # Now try to grab the symbols.\n    nlist=conftest.nm\n    if AC_TRY_EVAL(NM conftest.$ac_objext \\| $lt_cv_sys_global_symbol_pipe \\> $nlist) && test -s \"$nlist\"; then\n      # Try sorting and uniquifying the output.\n      if sort \"$nlist\" | uniq > \"$nlist\"T; then\n\tmv -f \"$nlist\"T \"$nlist\"\n      else\n\trm -f \"$nlist\"T\n      fi\n\n      # Make sure that we snagged all the symbols we need.\n      if grep ' nm_test_var$' \"$nlist\" >/dev/null; then\n\tif grep ' nm_test_func$' \"$nlist\" >/dev/null; then\n\t  cat <<EOF > conftest.$ac_ext\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nEOF\n\t  # Now generate the symbol file.\n\t  eval \"$lt_cv_sys_global_symbol_to_cdecl\"' < \"$nlist\" | grep -v main >> conftest.$ac_ext'\n\n\t  cat <<EOF >> conftest.$ac_ext\n#if defined (__STDC__) && __STDC__\n# define lt_ptr_t void *\n#else\n# define lt_ptr_t char *\n# define const\n#endif\n\n/* The mapping between symbol names and symbols. */\nconst struct {\n  const char *name;\n  lt_ptr_t address;\n}\nlt_preloaded_symbols[[]] =\n{\nEOF\n\t  $SED \"s/^$symcode$symcode* \\(.*\\) \\(.*\\)$/  {\\\"\\2\\\", (lt_ptr_t) \\&\\2},/\" < \"$nlist\" | grep -v main >> conftest.$ac_ext\n\t  cat <<\\EOF >> conftest.$ac_ext\n  {0, (lt_ptr_t) 0}\n};\n\n#ifdef __cplusplus\n}\n#endif\nEOF\n\t  # Now try linking the two files.\n\t  mv conftest.$ac_objext conftstm.$ac_objext\n\t  lt_save_LIBS=\"$LIBS\"\n\t  lt_save_CFLAGS=\"$CFLAGS\"\n\t  LIBS=\"conftstm.$ac_objext\"\n\t  CFLAGS=\"$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)\"\n\t  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then\n\t    pipe_works=yes\n\t  fi\n\t  LIBS=\"$lt_save_LIBS\"\n\t  CFLAGS=\"$lt_save_CFLAGS\"\n\telse\n\t  echo \"cannot find nm_test_func in $nlist\" >&AS_MESSAGE_LOG_FD\n\tfi\n      else\n\techo \"cannot find nm_test_var in $nlist\" >&AS_MESSAGE_LOG_FD\n      fi\n    else\n      echo \"cannot run $lt_cv_sys_global_symbol_pipe\" >&AS_MESSAGE_LOG_FD\n    fi\n  else\n    echo \"$progname: failed program was:\" >&AS_MESSAGE_LOG_FD\n    cat conftest.$ac_ext >&5\n  fi\n  rm -f conftest* conftst*\n\n  # Do not use the global_symbol_pipe unless it works.\n  if test \"$pipe_works\" = yes; then\n    break\n  else\n    lt_cv_sys_global_symbol_pipe=\n  fi\ndone\n])\nif test -z \"$lt_cv_sys_global_symbol_pipe\"; then\n  lt_cv_sys_global_symbol_to_cdecl=\nfi\nif test -z \"$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl\"; then\n  AC_MSG_RESULT(failed)\nelse\n  AC_MSG_RESULT(ok)\nfi\n]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE\n\n\n# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])\n# ---------------------------------------\nAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],\n[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=\n_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=\n_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=\n\nAC_MSG_CHECKING([for $compiler option to produce PIC])\n ifelse([$1],[CXX],[\n  # C++ specific cases for pic, static, wl, etc.\n  if test \"$GXX\" = yes; then\n    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'\n\n    case $host_os in\n    aix*)\n      # All AIX code is PIC.\n      if test \"$host_cpu\" = ia64; then\n\t# AIX 5 now supports IA64 processor\n\t_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n      fi\n      ;;\n    amigaos*)\n      # FIXME: we need at least 68020 code to build shared libraries, but\n      # adding the `-m68020' flag to GCC prevents building anything better,\n      # like `-m68040'.\n      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'\n      ;;\n    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)\n      # PIC is the default for these OSes.\n      ;;\n    mingw* | os2* | pw32*)\n      # This hack is so that the source file can tell whether it is being\n      # built for inclusion in a dll (and should export symbols for example).\n      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'\n      ;;\n    darwin* | rhapsody*)\n      # PIC is the default on this platform\n      # Common symbols not allowed in MH_DYLIB files\n      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'\n      ;;\n    *djgpp*)\n      # DJGPP does not support shared libraries at all\n      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=\n      ;;\n    interix3*)\n      # Interix 3.x gcc -fpic/-fPIC options generate broken code.\n      # Instead, we relocate shared libraries at runtime.\n      ;;\n    sysv4*MP*)\n      if test -d /usr/nec; then\n\t_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic\n      fi\n      ;;\n    hpux*)\n      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but\n      # not for PA HP-UX.\n      case $host_cpu in\n      hppa*64*|ia64*)\n\t;;\n      *)\n\t_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'\n\t;;\n      esac\n      ;;\n    *)\n      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'\n      ;;\n    esac\n  else\n    case $host_os in\n      aix4* | aix5*)\n\t# All AIX code is PIC.\n\tif test \"$host_cpu\" = ia64; then\n\t  # AIX 5 now supports IA64 processor\n\t  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n\telse\n\t  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'\n\tfi\n\t;;\n      chorus*)\n\tcase $cc_basename in\n\tcxch68*)\n\t  # Green Hills C++ Compiler\n\t  # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=\"--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a\"\n\t  ;;\n\tesac\n\t;;\n       darwin*)\n         # PIC is the default on this platform\n         # Common symbols not allowed in MH_DYLIB files\n         case $cc_basename in\n           xlc*)\n           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'\n           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n           ;;\n         esac\n       ;;\n      dgux*)\n\tcase $cc_basename in\n\t  ec++*)\n\t    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n\t    ;;\n\t  ghcx*)\n\t    # Green Hills C++ Compiler\n\t    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      freebsd* | kfreebsd*-gnu | dragonfly*)\n\t# FreeBSD uses GNU C++\n\t;;\n      hpux9* | hpux10* | hpux11*)\n\tcase $cc_basename in\n\t  CC*)\n\t    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'\n\t    if test \"$host_cpu\" != ia64; then\n\t      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'\n\t    fi\n\t    ;;\n\t  aCC*)\n\t    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'\n\t    case $host_cpu in\n\t    hppa*64*|ia64*)\n\t      # +Z the default\n\t      ;;\n\t    *)\n\t      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'\n\t      ;;\n\t    esac\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      interix*)\n\t# This is c89, which is MS Visual C++ (no shared libs)\n\t# Anyone wants to do a port?\n\t;;\n      irix5* | irix6* | nonstopux*)\n\tcase $cc_basename in\n\t  CC*)\n\t    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'\n\t    # CC pic flag -KPIC is the default.\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      linux*)\n\tcase $cc_basename in\n\t  KCC*)\n\t    # KAI C++ Compiler\n\t    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'\n\t    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'\n\t    ;;\n\t  icpc* | ecpc*)\n\t    # Intel C++\n\t    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n\t    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'\n\t    ;;\n\t  pgCC*)\n\t    # Portland Group C++ compiler.\n\t    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'\n\t    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n\t    ;;\n\t  cxx*)\n\t    # Compaq C++\n\t    # Make sure the PIC flag is empty.  It appears that all Alpha\n\t    # Linux and Compaq Tru64 Unix objects are PIC.\n\t    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=\n\t    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      lynxos*)\n\t;;\n      m88k*)\n\t;;\n      mvs*)\n\tcase $cc_basename in\n\t  cxx*)\n\t    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      netbsd*)\n\t;;\n      osf3* | osf4* | osf5*)\n\tcase $cc_basename in\n\t  KCC*)\n\t    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'\n\t    ;;\n\t  RCC*)\n\t    # Rational C++ 2.4.1\n\t    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'\n\t    ;;\n\t  cxx*)\n\t    # Digital/Compaq C++\n\t    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t    # Make sure the PIC flag is empty.  It appears that all Alpha\n\t    # Linux and Compaq Tru64 Unix objects are PIC.\n\t    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=\n\t    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      psos*)\n\t;;\n      solaris*)\n\tcase $cc_basename in\n\t  CC*)\n\t    # Sun C++ 4.2, 5.x and Centerline C++\n\t    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n\t    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n\t    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '\n\t    ;;\n\t  gcx*)\n\t    # Green Hills C++ Compiler\n\t    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      sunos4*)\n\tcase $cc_basename in\n\t  CC*)\n\t    # Sun C++ 4.x\n\t    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'\n\t    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n\t    ;;\n\t  lcc*)\n\t    # Lucid\n\t    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      tandem*)\n\tcase $cc_basename in\n\t  NCC*)\n\t    # NonStop-UX NCC 3.20\n\t    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)\n\tcase $cc_basename in\n\t  CC*)\n\t    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n\t    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n\t    ;;\n\tesac\n\t;;\n      vxworks*)\n\t;;\n      *)\n\t_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no\n\t;;\n    esac\n  fi\n],\n[\n  if test \"$GCC\" = yes; then\n    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'\n\n    case $host_os in\n      aix*)\n      # All AIX code is PIC.\n      if test \"$host_cpu\" = ia64; then\n\t# AIX 5 now supports IA64 processor\n\t_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n      fi\n      ;;\n\n    amigaos*)\n      # FIXME: we need at least 68020 code to build shared libraries, but\n      # adding the `-m68020' flag to GCC prevents building anything better,\n      # like `-m68040'.\n      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'\n      ;;\n\n    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)\n      # PIC is the default for these OSes.\n      ;;\n\n    mingw* | pw32* | os2*)\n      # This hack is so that the source file can tell whether it is being\n      # built for inclusion in a dll (and should export symbols for example).\n      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'\n      ;;\n\n    darwin* | rhapsody*)\n      # PIC is the default on this platform\n      # Common symbols not allowed in MH_DYLIB files\n      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'\n      ;;\n\n    interix3*)\n      # Interix 3.x gcc -fpic/-fPIC options generate broken code.\n      # Instead, we relocate shared libraries at runtime.\n      ;;\n\n    msdosdjgpp*)\n      # Just because we use GCC doesn't mean we suddenly get shared libraries\n      # on systems that don't support them.\n      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no\n      enable_shared=no\n      ;;\n\n    sysv4*MP*)\n      if test -d /usr/nec; then\n\t_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic\n      fi\n      ;;\n\n    hpux*)\n      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but\n      # not for PA HP-UX.\n      case $host_cpu in\n      hppa*64*|ia64*)\n\t# +Z the default\n\t;;\n      *)\n\t_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'\n\t;;\n      esac\n      ;;\n\n    *)\n      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'\n      ;;\n    esac\n  else\n    # PORTME Check for flag to pass linker flags through the system compiler.\n    case $host_os in\n    aix*)\n      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n      if test \"$host_cpu\" = ia64; then\n\t# AIX 5 now supports IA64 processor\n\t_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n      else\n\t_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'\n      fi\n      ;;\n      darwin*)\n        # PIC is the default on this platform\n        # Common symbols not allowed in MH_DYLIB files\n       case $cc_basename in\n         xlc*)\n         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'\n         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n         ;;\n       esac\n       ;;\n\n    mingw* | pw32* | os2*)\n      # This hack is so that the source file can tell whether it is being\n      # built for inclusion in a dll (and should export symbols for example).\n      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'\n      ;;\n\n    hpux9* | hpux10* | hpux11*)\n      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but\n      # not for PA HP-UX.\n      case $host_cpu in\n      hppa*64*|ia64*)\n\t# +Z the default\n\t;;\n      *)\n\t_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'\n\t;;\n      esac\n      # Is there a better lt_prog_compiler_static that works with the bundled CC?\n      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'\n      ;;\n\n    irix5* | irix6* | nonstopux*)\n      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n      # PIC (with -KPIC) is the default.\n      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'\n      ;;\n\n    newsos6)\n      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n      ;;\n\n    linux*)\n      case $cc_basename in\n      icc* | ecc*)\n\t_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n\t_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'\n        ;;\n      pgcc* | pgf77* | pgf90* | pgf95*)\n        # Portland Group compilers (*not* the Pentium gcc compiler,\n\t# which looks to be a dead project)\n\t_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n\t_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'\n\t_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n        ;;\n      ccc*)\n        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n        # All Alpha code is PIC.\n        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'\n        ;;\n      esac\n      ;;\n\n    osf3* | osf4* | osf5*)\n      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n      # All OSF/1 code is PIC.\n      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'\n      ;;\n\n    solaris*)\n      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n      case $cc_basename in\n      f77* | f90* | f95*)\n\t_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;\n      *)\n\t_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;\n      esac\n      ;;\n\n    sunos4*)\n      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '\n      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'\n      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n      ;;\n\n    sysv4 | sysv4.2uw2* | sysv4.3*)\n      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n      ;;\n\n    sysv4*MP*)\n      if test -d /usr/nec ;then\n\t_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'\n\t_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n      fi\n      ;;\n\n    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)\n      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'\n      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n      ;;\n\n    unicos*)\n      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'\n      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no\n      ;;\n\n    uts4*)\n      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'\n      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'\n      ;;\n\n    *)\n      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no\n      ;;\n    esac\n  fi\n])\nAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])\n\n#\n# Check to make sure the PIC flag actually works.\n#\nif test -n \"$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)\"; then\n  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],\n    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),\n    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],\n    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in\n     \"\" | \" \"*) ;;\n     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=\" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)\" ;;\n     esac],\n    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=\n     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])\nfi\ncase $host_os in\n  # For platforms which do not support PIC, -DPIC is meaningless:\n  *djgpp*)\n    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=\n    ;;\n  *)\n    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=\"$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])\"\n    ;;\nesac\n\n#\n# Check to make sure the static flag actually works.\n#\nwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\\\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\\\"\nAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],\n  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),\n  $lt_tmp_static_flag,\n  [],\n  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])\n])\n\n\n# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])\n# ------------------------------------\n# See if the linker supports building shared libraries.\nAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],\n[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])\nifelse([$1],[CXX],[\n  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\\''s/.* //'\\'' | sort | uniq > $export_symbols'\n  case $host_os in\n  aix4* | aix5*)\n    # If we're using GNU nm, then we don't want the \"-C\" option.\n    # -C means demangle to AIX nm, but means don't demangle with GNU nm\n    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then\n      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\\''{ if (((\\[$]2 == \"T\") || (\\[$]2 == \"D\") || (\\[$]2 == \"B\")) && ([substr](\\[$]3,1,1) != \".\")) { print \\[$]3 } }'\\'' | sort -u > $export_symbols'\n    else\n      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\\''{ if (((\\[$]2 == \"T\") || (\\[$]2 == \"D\") || (\\[$]2 == \"B\")) && ([substr](\\[$]3,1,1) != \".\")) { print \\[$]3 } }'\\'' | sort -u > $export_symbols'\n    fi\n    ;;\n  pw32*)\n    _LT_AC_TAGVAR(export_symbols_cmds, $1)=\"$ltdll_cmds\"\n  ;;\n  cygwin* | mingw*)\n    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\\''/^[[BCDGRS]] /s/.* \\([[^ ]]*\\)/\\1 DATA/;/^.* __nm__/s/^.* __nm__\\([[^ ]]*\\) [[^ ]]*/\\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\\'' | sort | uniq > $export_symbols'\n  ;;\n  *)\n    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\\''s/.* //'\\'' | sort | uniq > $export_symbols'\n  ;;\n  esac\n],[\n  runpath_var=\n  _LT_AC_TAGVAR(allow_undefined_flag, $1)=\n  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no\n  _LT_AC_TAGVAR(archive_cmds, $1)=\n  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=\n  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=\n  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=\n  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=\n  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=\n  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=\n  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=\n  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=\n  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=\n  _LT_AC_TAGVAR(hardcode_direct, $1)=no\n  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no\n  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported\n  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown\n  _LT_AC_TAGVAR(hardcode_automatic, $1)=no\n  _LT_AC_TAGVAR(module_cmds, $1)=\n  _LT_AC_TAGVAR(module_expsym_cmds, $1)=\n  _LT_AC_TAGVAR(always_export_symbols, $1)=no\n  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\\''s/.* //'\\'' | sort | uniq > $export_symbols'\n  # include_expsyms should be a list of space-separated symbols to be *always*\n  # included in the symbol list\n  _LT_AC_TAGVAR(include_expsyms, $1)=\n  # exclude_expsyms can be an extended regexp of symbols to exclude\n  # it will be wrapped by ` (' and `)$', so one must not match beginning or\n  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',\n  # as well as any symbol that contains `d'.\n  _LT_AC_TAGVAR(exclude_expsyms, $1)=\"_GLOBAL_OFFSET_TABLE_\"\n  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out\n  # platforms (ab)use it in PIC code, but their linkers get confused if\n  # the symbol is explicitly referenced.  Since portable code cannot\n  # rely on this symbol name, it's probably fine to never include it in\n  # preloaded symbol tables.\n  extract_expsyms_cmds=\n  # Just being paranoid about ensuring that cc_basename is set.\n  _LT_CC_BASENAME([$compiler])\n  case $host_os in\n  cygwin* | mingw* | pw32*)\n    # FIXME: the MSVC++ port hasn't been tested in a loooong time\n    # When not using gcc, we currently assume that we are using\n    # Microsoft Visual C++.\n    if test \"$GCC\" != yes; then\n      with_gnu_ld=no\n    fi\n    ;;\n  interix*)\n    # we just hope/assume this is gcc and not c89 (= MSVC++)\n    with_gnu_ld=yes\n    ;;\n  openbsd*)\n    with_gnu_ld=no\n    ;;\n  esac\n\n  _LT_AC_TAGVAR(ld_shlibs, $1)=yes\n  if test \"$with_gnu_ld\" = yes; then\n    # If archive_cmds runs LD, not CC, wlarc should be empty\n    wlarc='${wl}'\n\n    # Set some defaults for GNU ld with shared library support. These\n    # are reset later if shared libraries are not supported. Putting them\n    # here allows them to be overridden if necessary.\n    runpath_var=LD_RUN_PATH\n    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'\n    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'\n    # ancient GNU ld didn't support --whole-archive et. al.\n    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then\n\t_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=\"$wlarc\"'--whole-archive$convenience '\"$wlarc\"'--no-whole-archive'\n      else\n  \t_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=\n    fi\n    supports_anon_versioning=no\n    case `$LD -v 2>/dev/null` in\n      *\\ [[01]].* | *\\ 2.[[0-9]].* | *\\ 2.10.*) ;; # catch versions < 2.11\n      *\\ 2.11.93.0.2\\ *) supports_anon_versioning=yes ;; # RH7.3 ...\n      *\\ 2.11.92.0.12\\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...\n      *\\ 2.11.*) ;; # other 2.11 versions\n      *) supports_anon_versioning=yes ;;\n    esac\n\n    # See if GNU ld supports shared libraries.\n    case $host_os in\n    aix3* | aix4* | aix5*)\n      # On AIX/PPC, the GNU linker is very broken\n      if test \"$host_cpu\" != ia64; then\n\t_LT_AC_TAGVAR(ld_shlibs, $1)=no\n\tcat <<EOF 1>&2\n\n*** Warning: the GNU linker, at least up to release 2.9.1, is reported\n*** to be unable to reliably create shared libraries on AIX.\n*** Therefore, libtool is disabling shared libraries support.  If you\n*** really care for shared libraries, you may want to modify your PATH\n*** so that a non-GNU linker is found, and then restart.\n\nEOF\n      fi\n      ;;\n\n    amigaos*)\n      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo \"#define NAME $libname\" > $output_objdir/a2ixlibrary.data~$echo \"#define LIBRARY_ID 1\" >> $output_objdir/a2ixlibrary.data~$echo \"#define VERSION $major\" >> $output_objdir/a2ixlibrary.data~$echo \"#define REVISION $revision\" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'\n      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'\n      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes\n\n      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports\n      # that the semantics of dynamic libraries on AmigaOS, at least up\n      # to version 4, is to share data among multiple programs linked\n      # with the same dynamic library.  Since this doesn't match the\n      # behavior of shared libraries on other platforms, we can't use\n      # them.\n      _LT_AC_TAGVAR(ld_shlibs, $1)=no\n      ;;\n\n    beos*)\n      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then\n\t_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported\n\t# Joseph Beckenbach <jrb3@best.com> says some releases of gcc\n\t# support --undefined.  This deserves some investigation.  FIXME\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n      else\n\t_LT_AC_TAGVAR(ld_shlibs, $1)=no\n      fi\n      ;;\n\n    cygwin* | mingw* | pw32*)\n      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,\n      # as there is no search path for DLLs.\n      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'\n      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported\n      _LT_AC_TAGVAR(always_export_symbols, $1)=no\n      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes\n      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\\''/^[[BCDGRS]] /s/.* \\([[^ ]]*\\)/\\1 DATA/'\\'' | $SED -e '\\''/^[[AITW]] /s/.* //'\\'' | sort | uniq > $export_symbols'\n\n      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then\n        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'\n\t# If the export-symbols file already is a .def file (1st line\n\t# is EXPORTS), use it as is; otherwise, prepend...\n\t_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test \"x`$SED 1q $export_symbols`\" = xEXPORTS; then\n\t  cp $export_symbols $output_objdir/$soname.def;\n\telse\n\t  echo EXPORTS > $output_objdir/$soname.def;\n\t  cat $export_symbols >> $output_objdir/$soname.def;\n\tfi~\n\t$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'\n      else\n\t_LT_AC_TAGVAR(ld_shlibs, $1)=no\n      fi\n      ;;\n\n    interix3*)\n      _LT_AC_TAGVAR(hardcode_direct, $1)=no\n      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no\n      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'\n      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'\n      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.\n      # Instead, shared libraries are loaded at an image base (0x10000000 by\n      # default) and relocated if they conflict, which is a slow very memory\n      # consuming and fragmenting process.  To avoid this, we pick a random,\n      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link\n      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.\n      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \\* 262144 + 1342177280` -o $lib'\n      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed \"s,^,_,\" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \\* 262144 + 1342177280` -o $lib'\n      ;;\n\n    linux*)\n      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then\n\ttmp_addflag=\n\tcase $cc_basename,$host_cpu in\n\tpgcc*)\t\t\t\t# Portland Group C compiler\n\t  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\\\"\\\"; do test  -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience,$conv\\\"; done; $echo \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n\t  tmp_addflag=' $pic_flag'\n\t  ;;\n\tpgf77* | pgf90* | pgf95*)\t# Portland Group f77 and f90 compilers\n\t  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\\\"\\\"; do test  -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience,$conv\\\"; done; $echo \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n\t  tmp_addflag=' $pic_flag -Mnomain' ;;\n\tecc*,ia64* | icc*,ia64*)\t\t# Intel C compiler on ia64\n\t  tmp_addflag=' -i_dynamic' ;;\n\tefc*,ia64* | ifort*,ia64*)\t# Intel Fortran compiler on ia64\n\t  tmp_addflag=' -i_dynamic -nofor_main' ;;\n\tifc* | ifort*)\t\t\t# Intel Fortran compiler\n\t  tmp_addflag=' -nofor_main' ;;\n\tesac\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'\"$tmp_addflag\"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\n\tif test $supports_anon_versioning = yes; then\n\t  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo \"{ global:\" > $output_objdir/$libname.ver~\n  cat $export_symbols | sed -e \"s/\\(.*\\)/\\1;/\" >> $output_objdir/$libname.ver~\n  $echo \"local: *; };\" >> $output_objdir/$libname.ver~\n\t  $CC -shared'\"$tmp_addflag\"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'\n\tfi\n      else\n\t_LT_AC_TAGVAR(ld_shlibs, $1)=no\n      fi\n      ;;\n\n    netbsd*)\n      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'\n\twlarc=\n      else\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\t_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n      fi\n      ;;\n\n    solaris*)\n      if $LD -v 2>&1 | grep 'BFD 2\\.8' > /dev/null; then\n\t_LT_AC_TAGVAR(ld_shlibs, $1)=no\n\tcat <<EOF 1>&2\n\n*** Warning: The releases 2.8.* of the GNU linker cannot reliably\n*** create shared libraries on Solaris systems.  Therefore, libtool\n*** is disabling shared libraries support.  We urge you to upgrade GNU\n*** binutils to release 2.9.1 or newer.  Another option is to modify\n*** your PATH or compiler configuration so that the native linker is\n*** used, and then restart.\n\nEOF\n      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\t_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n      else\n\t_LT_AC_TAGVAR(ld_shlibs, $1)=no\n      fi\n      ;;\n\n    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)\n      case `$LD -v 2>&1` in\n        *\\ [[01]].* | *\\ 2.[[0-9]].* | *\\ 2.1[[0-5]].*) \n\t_LT_AC_TAGVAR(ld_shlibs, $1)=no\n\tcat <<_LT_EOF 1>&2\n\n*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not\n*** reliably create shared libraries on SCO systems.  Therefore, libtool\n*** is disabling shared libraries support.  We urge you to upgrade GNU\n*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify\n*** your PATH or compiler configuration so that the native linker is\n*** used, and then restart.\n\n_LT_EOF\n\t;;\n\t*)\n\t  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then\n\t    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z \"$SCOABSPATH\" && echo ${wl}-rpath,$libdir`'\n\t    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'\n\t    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'\n\t  else\n\t    _LT_AC_TAGVAR(ld_shlibs, $1)=no\n\t  fi\n\t;;\n      esac\n      ;;\n\n    sunos4*)\n      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'\n      wlarc=\n      _LT_AC_TAGVAR(hardcode_direct, $1)=yes\n      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no\n      ;;\n\n    *)\n      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\t_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n      else\n\t_LT_AC_TAGVAR(ld_shlibs, $1)=no\n      fi\n      ;;\n    esac\n\n    if test \"$_LT_AC_TAGVAR(ld_shlibs, $1)\" = no; then\n      runpath_var=\n      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=\n      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=\n      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=\n    fi\n  else\n    # PORTME fill in a description of your system's linker (not GNU ld)\n    case $host_os in\n    aix3*)\n      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported\n      _LT_AC_TAGVAR(always_export_symbols, $1)=yes\n      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'\n      # Note: this linker hardcodes the directories in LIBPATH if there\n      # are no directories specified by -L.\n      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes\n      if test \"$GCC\" = yes && test -z \"$lt_prog_compiler_static\"; then\n\t# Neither direct hardcoding nor static linking is supported with a\n\t# broken collect2.\n\t_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported\n      fi\n      ;;\n\n    aix4* | aix5*)\n      if test \"$host_cpu\" = ia64; then\n\t# On IA64, the linker does run time linking by default, so we don't\n\t# have to do anything special.\n\taix_use_runtimelinking=no\n\texp_sym_flag='-Bexport'\n\tno_entry_flag=\"\"\n      else\n\t# If we're using GNU nm, then we don't want the \"-C\" option.\n\t# -C means demangle to AIX nm, but means don't demangle with GNU nm\n\tif $NM -V 2>&1 | grep 'GNU' > /dev/null; then\n\t  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\\''{ if (((\\[$]2 == \"T\") || (\\[$]2 == \"D\") || (\\[$]2 == \"B\")) && ([substr](\\[$]3,1,1) != \".\")) { print \\[$]3 } }'\\'' | sort -u > $export_symbols'\n\telse\n\t  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\\''{ if (((\\[$]2 == \"T\") || (\\[$]2 == \"D\") || (\\[$]2 == \"B\")) && ([substr](\\[$]3,1,1) != \".\")) { print \\[$]3 } }'\\'' | sort -u > $export_symbols'\n\tfi\n\taix_use_runtimelinking=no\n\n\t# Test if we are trying to use run time linking or normal\n\t# AIX style linking. If -brtl is somewhere in LDFLAGS, we\n\t# need to do runtime linking.\n\tcase $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)\n\t  for ld_flag in $LDFLAGS; do\n  \t  if (test $ld_flag = \"-brtl\" || test $ld_flag = \"-Wl,-brtl\"); then\n  \t    aix_use_runtimelinking=yes\n  \t    break\n  \t  fi\n\t  done\n\t  ;;\n\tesac\n\n\texp_sym_flag='-bexport'\n\tno_entry_flag='-bnoentry'\n      fi\n\n      # When large executables or shared objects are built, AIX ld can\n      # have problems creating the table of contents.  If linking a library\n      # or program results in \"error TOC overflow\" add -mminimal-toc to\n      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not\n      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.\n\n      _LT_AC_TAGVAR(archive_cmds, $1)=''\n      _LT_AC_TAGVAR(hardcode_direct, $1)=yes\n      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'\n      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes\n\n      if test \"$GCC\" = yes; then\n\tcase $host_os in aix4.[[012]]|aix4.[[012]].*)\n\t# We only want to do this on AIX 4.2 and lower, the check\n\t# below for broken collect2 doesn't work under 4.3+\n\t  collect2name=`${CC} -print-prog-name=collect2`\n\t  if test -f \"$collect2name\" && \\\n  \t   strings \"$collect2name\" | grep resolve_lib_name >/dev/null\n\t  then\n  \t  # We have reworked collect2\n  \t  _LT_AC_TAGVAR(hardcode_direct, $1)=yes\n\t  else\n  \t  # We have old collect2\n  \t  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported\n  \t  # It fails to find uninstalled libraries when the uninstalled\n  \t  # path is not listed in the libpath.  Setting hardcode_minus_L\n  \t  # to unsupported forces relinking\n  \t  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes\n  \t  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'\n  \t  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=\n\t  fi\n\t  ;;\n\tesac\n\tshared_flag='-shared'\n\tif test \"$aix_use_runtimelinking\" = yes; then\n\t  shared_flag=\"$shared_flag \"'${wl}-G'\n\tfi\n      else\n\t# not using gcc\n\tif test \"$host_cpu\" = ia64; then\n  \t# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release\n  \t# chokes on -Wl,-G. The following line is correct:\n\t  shared_flag='-G'\n\telse\n\t  if test \"$aix_use_runtimelinking\" = yes; then\n\t    shared_flag='${wl}-G'\n\t  else\n\t    shared_flag='${wl}-bM:SRE'\n\t  fi\n\tfi\n      fi\n\n      # It seems that -bexpall does not export symbols beginning with\n      # underscore (_), so it is better to generate a list of symbols to export.\n      _LT_AC_TAGVAR(always_export_symbols, $1)=yes\n      if test \"$aix_use_runtimelinking\" = yes; then\n\t# Warning - without using the other runtime loading flags (-brtl),\n\t# -berok will link without error, but may produce a broken library.\n\t_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'\n       # Determine the default libpath from the value encoded in an empty executable.\n       _LT_AC_SYS_LIBPATH_AIX\n       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'\"$aix_libpath\"\n\t_LT_AC_TAGVAR(archive_expsym_cmds, $1)=\"\\$CC\"' -o $output_objdir/$soname $libobjs $deplibs '\"\\${wl}$no_entry_flag\"' $compiler_flags `if test \"x${allow_undefined_flag}\" != \"x\"; then echo \"${wl}${allow_undefined_flag}\"; else :; fi` '\"\\${wl}$exp_sym_flag:\\$export_symbols $shared_flag\"\n       else\n\tif test \"$host_cpu\" = ia64; then\n\t  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'\n\t  _LT_AC_TAGVAR(allow_undefined_flag, $1)=\"-z nodefs\"\n\t  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=\"\\$CC $shared_flag\"' -o $output_objdir/$soname $libobjs $deplibs '\"\\${wl}$no_entry_flag\"' $compiler_flags ${wl}${allow_undefined_flag} '\"\\${wl}$exp_sym_flag:\\$export_symbols\"\n\telse\n\t # Determine the default libpath from the value encoded in an empty executable.\n\t _LT_AC_SYS_LIBPATH_AIX\n\t _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'\"$aix_libpath\"\n\t  # Warning - without using the other run time loading flags,\n\t  # -berok will link without error, but may produce a broken library.\n\t  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'\n\t  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'\n\t  # Exported symbols can be pulled into shared objects from archives\n\t  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'\n\t  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes\n\t  # This is similar to how AIX traditionally builds its shared libraries.\n\t  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=\"\\$CC $shared_flag\"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'\n\tfi\n      fi\n      ;;\n\n    amigaos*)\n      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo \"#define NAME $libname\" > $output_objdir/a2ixlibrary.data~$echo \"#define LIBRARY_ID 1\" >> $output_objdir/a2ixlibrary.data~$echo \"#define VERSION $major\" >> $output_objdir/a2ixlibrary.data~$echo \"#define REVISION $revision\" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'\n      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'\n      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes\n      # see comment about different semantics on the GNU ld section\n      _LT_AC_TAGVAR(ld_shlibs, $1)=no\n      ;;\n\n    bsdi[[45]]*)\n      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic\n      ;;\n\n    cygwin* | mingw* | pw32*)\n      # When not using gcc, we currently assume that we are using\n      # Microsoft Visual C++.\n      # hardcode_libdir_flag_spec is actually meaningless, as there is\n      # no search path for DLLs.\n      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '\n      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported\n      # Tell ltmain to make .lib files, not .a files.\n      libext=lib\n      # Tell ltmain to make .dll files, not .so files.\n      shrext_cmds=\".dll\"\n      # FIXME: Setting linknames here is a bad hack.\n      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo \"$deplibs\" | $SED -e '\\''s/ -lc$//'\\''` -link -dll~linknames='\n      # The linker will automatically build a .lib file if we build a DLL.\n      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'\n      # FIXME: Should let the user specify the lib program.\n      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'\n      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w \"$srcfile\"`'\n      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes\n      ;;\n\n    darwin* | rhapsody*)\n      case $host_os in\n        rhapsody* | darwin1.[[012]])\n         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'\n         ;;\n       *) # Darwin 1.3 on\n         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then\n           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'\n         else\n           case ${MACOSX_DEPLOYMENT_TARGET} in\n             10.[[012]])\n               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'\n               ;;\n             10.*)\n               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'\n               ;;\n           esac\n         fi\n         ;;\n      esac\n      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no\n      _LT_AC_TAGVAR(hardcode_direct, $1)=no\n      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes\n      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported\n      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''\n      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes\n    if test \"$GCC\" = yes ; then\n    \toutput_verbose_link_cmd='echo'\n        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'\n      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'\n      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds\n      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e \"s,#.*,,\" -e \"s,^[    ]*,,\" -e \"s,^\\(..*\\),_&,\" < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'\n      _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e \"s,#.*,,\" -e \"s,^[    ]*,,\" -e \"s,^\\(..*\\),_&,\" < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'\n    else\n      case $cc_basename in\n        xlc*)\n         output_verbose_link_cmd='echo'\n         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'\n         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'\n          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds\n         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e \"s,#.*,,\" -e \"s,^[    ]*,,\" -e \"s,^\\(..*\\),_&,\" < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'\n          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e \"s,#.*,,\" -e \"s,^[    ]*,,\" -e \"s,^\\(..*\\),_&,\" < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'\n          ;;\n       *)\n         _LT_AC_TAGVAR(ld_shlibs, $1)=no\n          ;;\n      esac\n    fi\n      ;;\n\n    dgux*)\n      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'\n      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no\n      ;;\n\n    freebsd1*)\n      _LT_AC_TAGVAR(ld_shlibs, $1)=no\n      ;;\n\n    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor\n    # support.  Future versions do this automatically, but an explicit c++rt0.o\n    # does not break anything, and helps significantly (at the cost of a little\n    # extra space).\n    freebsd2.2*)\n      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'\n      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'\n      _LT_AC_TAGVAR(hardcode_direct, $1)=yes\n      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no\n      ;;\n\n    # Unfortunately, older versions of FreeBSD 2 do not have this feature.\n    freebsd2*)\n      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'\n      _LT_AC_TAGVAR(hardcode_direct, $1)=yes\n      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes\n      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no\n      ;;\n\n    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.\n    freebsd* | kfreebsd*-gnu | dragonfly*)\n      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'\n      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'\n      _LT_AC_TAGVAR(hardcode_direct, $1)=yes\n      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no\n      ;;\n\n    hpux9*)\n      if test \"$GCC\" = yes; then\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'\n      else\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'\n      fi\n      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'\n      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:\n      _LT_AC_TAGVAR(hardcode_direct, $1)=yes\n\n      # hardcode_minus_L: Not really in the search PATH,\n      # but as the default location of the library.\n      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes\n      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'\n      ;;\n\n    hpux10*)\n      if test \"$GCC\" = yes -a \"$with_gnu_ld\" = no; then\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'\n      else\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'\n      fi\n      if test \"$with_gnu_ld\" = no; then\n\t_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'\n\t_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:\n\n\t_LT_AC_TAGVAR(hardcode_direct, $1)=yes\n\t_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'\n\n\t# hardcode_minus_L: Not really in the search PATH,\n\t# but as the default location of the library.\n\t_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes\n      fi\n      ;;\n\n    hpux11*)\n      if test \"$GCC\" = yes -a \"$with_gnu_ld\" = no; then\n\tcase $host_cpu in\n\thppa*64*)\n\t  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\tia64*)\n\t  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\t*)\n\t  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\tesac\n      else\n\tcase $host_cpu in\n\thppa*64*)\n\t  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\tia64*)\n\t  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\t*)\n\t  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\tesac\n      fi\n      if test \"$with_gnu_ld\" = no; then\n\t_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'\n\t_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:\n\n\tcase $host_cpu in\n\thppa*64*|ia64*)\n\t  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'\n\t  _LT_AC_TAGVAR(hardcode_direct, $1)=no\n\t  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no\n\t  ;;\n\t*)\n\t  _LT_AC_TAGVAR(hardcode_direct, $1)=yes\n\t  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'\n\n\t  # hardcode_minus_L: Not really in the search PATH,\n\t  # but as the default location of the library.\n\t  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes\n\t  ;;\n\tesac\n      fi\n      ;;\n\n    irix5* | irix6* | nonstopux*)\n      if test \"$GCC\" = yes; then\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$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'\n      else\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n \"$verstring\" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'\n\t_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'\n      fi\n      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'\n      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:\n      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes\n      ;;\n\n    netbsd*)\n      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out\n      else\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF\n      fi\n      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'\n      _LT_AC_TAGVAR(hardcode_direct, $1)=yes\n      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no\n      ;;\n\n    newsos6)\n      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      _LT_AC_TAGVAR(hardcode_direct, $1)=yes\n      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'\n      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:\n      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no\n      ;;\n\n    openbsd*)\n      _LT_AC_TAGVAR(hardcode_direct, $1)=yes\n      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no\n      if test -z \"`echo __ELF__ | $CC -E - | grep __ELF__`\" || test \"$host_os-$host_cpu\" = \"openbsd2.8-powerpc\"; then\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'\n\t_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'\n\t_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'\n\t_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'\n      else\n       case $host_os in\n\t openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)\n\t   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'\n\t   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'\n\t   ;;\n\t *)\n\t   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'\n\t   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'\n\t   ;;\n       esac\n      fi\n      ;;\n\n    os2*)\n      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'\n      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes\n      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported\n      _LT_AC_TAGVAR(archive_cmds, $1)='$echo \"LIBRARY $libname INITINSTANCE\" > $output_objdir/$libname.def~$echo \"DESCRIPTION \\\"$libname\\\"\" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo \" SINGLE NONSHARED\" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'\n      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'\n      ;;\n\n    osf3*)\n      if test \"$GCC\" = yes; then\n\t_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\\*'\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $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'\n      else\n\t_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \\*'\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n \"$verstring\" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'\n      fi\n      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'\n      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:\n      ;;\n\n    osf4* | osf5*)\t# as osf3* with the addition of -msym flag\n      if test \"$GCC\" = yes; then\n\t_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\\*'\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n \"$verstring\" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'\n\t_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'\n      else\n\t_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \\*'\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n \"$verstring\" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'\n\t_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf \"%s %s\\\\n\" -exported_symbol \"\\$i\" >> $lib.exp; done; echo \"-hidden\">> $lib.exp~\n\t$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n \"$verstring\" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'\n\n\t# Both c and cxx compiler support -rpath directly\n\t_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'\n      fi\n      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:\n      ;;\n\n    solaris*)\n      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'\n      if test \"$GCC\" = yes; then\n\twlarc='${wl}'\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~$echo \"local: *; };\" >> $lib.exp~\n\t  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'\n      else\n\twlarc=''\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'\n\t_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~$echo \"local: *; };\" >> $lib.exp~\n  \t$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'\n      fi\n      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'\n      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no\n      case $host_os in\n      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;\n      *)\n \t# The compiler driver will combine linker options so we\n \t# cannot just pass the convience library names through\n \t# without $wl, iff we do not link with $LD.\n \t# Luckily, gcc supports the same syntax we need for Sun Studio.\n \t# Supported since Solaris 2.6 (maybe 2.5.1?)\n \tcase $wlarc in\n \t'')\n \t  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;\n \t*)\n \t  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\\\"\\\"; do test -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience,$conv\\\"; done; $echo \\\"$new_convenience\\\"` ${wl}-z ${wl}defaultextract' ;;\n \tesac ;;\n      esac\n      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes\n      ;;\n\n    sunos4*)\n      if test \"x$host_vendor\" = xsequent; then\n\t# Use $CC to link under sequent, because it throws in some extra .o\n\t# files that make .init and .fini sections work.\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'\n      else\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'\n      fi\n      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'\n      _LT_AC_TAGVAR(hardcode_direct, $1)=yes\n      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes\n      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no\n      ;;\n\n    sysv4)\n      case $host_vendor in\n\tsni)\n\t  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n\t  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???\n\t;;\n\tsiemens)\n\t  ## LD is ld it makes a PLAMLIB\n\t  ## CC just makes a GrossModule.\n\t  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'\n\t  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'\n\t  _LT_AC_TAGVAR(hardcode_direct, $1)=no\n        ;;\n\tmotorola)\n\t  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n\t  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie\n\t;;\n      esac\n      runpath_var='LD_RUN_PATH'\n      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no\n      ;;\n\n    sysv4.3*)\n      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no\n      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'\n      ;;\n\n    sysv4*MP*)\n      if test -d /usr/nec; then\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n\t_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no\n\trunpath_var=LD_RUN_PATH\n\thardcode_runpath_var=yes\n\t_LT_AC_TAGVAR(ld_shlibs, $1)=yes\n      fi\n      ;;\n\n    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)\n      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'\n      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no\n      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no\n      runpath_var='LD_RUN_PATH'\n\n      if test \"$GCC\" = yes; then\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n      else\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n      fi\n      ;;\n\n    sysv5* | sco3.2v5* | sco5v6*)\n      # Note: We can NOT use -z defs as we might desire, because we do not\n      # link with -lc, and that would cause any symbols used from libc to\n      # always be unresolved, which means just about no library would\n      # ever link correctly.  If we're not using GNU ld we use -z text\n      # though, which does catch some bad symbols but isn't as heavy-handed\n      # as -z defs.\n      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'\n      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'\n      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no\n      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no\n      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z \"$SCOABSPATH\" && echo ${wl}-R,$libdir`'\n      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'\n      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes\n      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'\n      runpath_var='LD_RUN_PATH'\n\n      if test \"$GCC\" = yes; then\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'\n      else\n\t_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'\n      fi\n      ;;\n\n    uts4*)\n      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'\n      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no\n      ;;\n\n    *)\n      _LT_AC_TAGVAR(ld_shlibs, $1)=no\n      ;;\n    esac\n  fi\n])\nAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])\ntest \"$_LT_AC_TAGVAR(ld_shlibs, $1)\" = no && can_build_shared=no\n\n#\n# Do we need to explicitly link libc?\n#\ncase \"x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)\" in\nx|xyes)\n  # Assume -lc should be added\n  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes\n\n  if test \"$enable_shared\" = yes && test \"$GCC\" = yes; then\n    case $_LT_AC_TAGVAR(archive_cmds, $1) in\n    *'~'*)\n      # FIXME: we may have to deal with multi-command sequences.\n      ;;\n    '$CC '*)\n      # Test whether the compiler implicitly links with -lc since on some\n      # systems, -lgcc has to come before -lc. If gcc already passes -lc\n      # to ld, don't add -lc before -lgcc.\n      AC_MSG_CHECKING([whether -lc should be explicitly linked in])\n      $rm conftest*\n      printf \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n\n      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then\n        soname=conftest\n        lib=conftest\n        libobjs=conftest.$ac_objext\n        deplibs=\n        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)\n\tpic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)\n        compiler_flags=-v\n        linker_flags=-v\n        verstring=\n        output_objdir=.\n        libname=conftest\n        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)\n        _LT_AC_TAGVAR(allow_undefined_flag, $1)=\n        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\\>\\&1 \\| grep \\\" -lc \\\" \\>/dev/null 2\\>\\&1)\n        then\n\t  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no\n        else\n\t  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes\n        fi\n        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag\n      else\n        cat conftest.err 1>&5\n      fi\n      $rm conftest*\n      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])\n      ;;\n    esac\n  fi\n  ;;\nesac\n])# AC_LIBTOOL_PROG_LD_SHLIBS\n\n\n# _LT_AC_FILE_LTDLL_C\n# -------------------\n# Be careful that the start marker always follows a newline.\nAC_DEFUN([_LT_AC_FILE_LTDLL_C], [\n# /* ltdll.c starts here */\n# #define WIN32_LEAN_AND_MEAN\n# #include <windows.h>\n# #undef WIN32_LEAN_AND_MEAN\n# #include <stdio.h>\n#\n# #ifndef __CYGWIN__\n# #  ifdef __CYGWIN32__\n# #    define __CYGWIN__ __CYGWIN32__\n# #  endif\n# #endif\n#\n# #ifdef __cplusplus\n# extern \"C\" {\n# #endif\n# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);\n# #ifdef __cplusplus\n# }\n# #endif\n#\n# #ifdef __CYGWIN__\n# #include <cygwin/cygwin_dll.h>\n# DECLARE_CYGWIN_DLL( DllMain );\n# #endif\n# HINSTANCE __hDllInstance_base;\n#\n# BOOL APIENTRY\n# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)\n# {\n#   __hDllInstance_base = hInst;\n#   return TRUE;\n# }\n# /* ltdll.c ends here */\n])# _LT_AC_FILE_LTDLL_C\n\n\n# _LT_AC_TAGVAR(VARNAME, [TAGNAME])\n# ---------------------------------\nAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])\n\n\n# old names\nAC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])\nAC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])\nAC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])\nAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])\nAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])\nAC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])\nAC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])\n\n# This is just to silence aclocal about the macro not being used\nifelse([AC_DISABLE_FAST_INSTALL])\n\nAC_DEFUN([LT_AC_PROG_GCJ],\n[AC_CHECK_TOOL(GCJ, gcj, no)\n  test \"x${GCJFLAGS+set}\" = xset || GCJFLAGS=\"-g -O2\"\n  AC_SUBST(GCJFLAGS)\n])\n\nAC_DEFUN([LT_AC_PROG_RC],\n[AC_CHECK_TOOL(RC, windres, no)\n])\n\n# NOTE: This macro has been submitted for inclusion into   #\n#  GNU Autoconf as AC_PROG_SED.  When it is available in   #\n#  a released version of Autoconf we should remove this    #\n#  macro and use it instead.                               #\n# LT_AC_PROG_SED\n# --------------\n# Check for a fully-functional sed program, that truncates\n# as few characters as possible.  Prefer GNU sed if found.\nAC_DEFUN([LT_AC_PROG_SED],\n[AC_MSG_CHECKING([for a sed that does not truncate output])\nAC_CACHE_VAL(lt_cv_path_SED,\n[# Loop through the user's path and test for sed and gsed.\n# Then use that list of sed's as ones to test for truncation.\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for lt_ac_prog in sed gsed; do\n    for ac_exec_ext in '' $ac_executable_extensions; do\n      if $as_executable_p \"$as_dir/$lt_ac_prog$ac_exec_ext\"; then\n        lt_ac_sed_list=\"$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext\"\n      fi\n    done\n  done\ndone\nIFS=$as_save_IFS\nlt_ac_max=0\nlt_ac_count=0\n# Add /usr/xpg4/bin/sed as it is typically found on Solaris\n# along with /bin/sed that truncates output.\nfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do\n  test ! -f $lt_ac_sed && continue\n  cat /dev/null > conftest.in\n  lt_ac_count=0\n  echo $ECHO_N \"0123456789$ECHO_C\" >conftest.in\n  # Check for GNU sed and select it if it is found.\n  if \"$lt_ac_sed\" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then\n    lt_cv_path_SED=$lt_ac_sed\n    break\n  fi\n  while true; do\n    cat conftest.in conftest.in >conftest.tmp\n    mv conftest.tmp conftest.in\n    cp conftest.in conftest.nl\n    echo >>conftest.nl\n    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break\n    cmp -s conftest.out conftest.nl || break\n    # 10000 chars as input seems more than enough\n    test $lt_ac_count -gt 10 && break\n    lt_ac_count=`expr $lt_ac_count + 1`\n    if test $lt_ac_count -gt $lt_ac_max; then\n      lt_ac_max=$lt_ac_count\n      lt_cv_path_SED=$lt_ac_sed\n    fi\n  done\ndone\n])\nSED=$lt_cv_path_SED\nAC_SUBST([SED])\nAC_MSG_RESULT([$SED])\n])\n\nm4_include([acinclude.m4])\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/bin.squeak.sh.in",
    "content": "#!/bin/sh\nBIN=`/usr/bin/dirname $0`/../@expanded_relative_imgdir@\n# At least on linux LD_LIBRARY_PATH's components must be absolute path names\ncase \"$BIN\" in\n/*) PLUGINS=\"$BIN\";;\n*) PLUGINS=\"`pwd`/$BIN\"\nesac\n# prepending is less flexible but safer because it ensures we find the plugins\n# in the same directory as the VM.\nLD_LIBRARY_PATH=$PLUGINS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} exec \"$BIN/squeak\" \"$@\"\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/build",
    "content": "#!/bin/bash\n\n# This script is really intended for \"batch-mode\" nightly builds of\n# Squeak binary distributions.  It is therefore intended mainly for\n# the VM maintainer (who runs it from cron) rather than VM hackers in\n# general (who would probably prefer to run it from the command line).\n# Nevertheless it does attempt to be interactive (and even makes some\n# concessions towards user-friendliness ;) for those who cannot be\n# bothered to type `mkdir bld; cd bld; ../.../configure; make') -- but\n# your kilometrage may vary (enormously).\n# \n# Run `build -h' for a list of options (without much explanation).\n\n# Last edited: 2002-06-07 06:12:13 by piumarta on emilia.inria.fr\n\nUTS_SYS=`(uname -s) 2>/dev/null`\n\nif [ -x /usr/5bin/echo ]; then                          # SunOS SysV echo\n  echo=/usr/5bin/echo\nelif [ -z \"`(echo -e a) 2>/dev/null | fgrep e`\" ]; then # GNU bash, etc.\n  echo=\"echo -e\"\nelse                                                    # generic SysV\n  echo=echo\nfi\n\nif [ \"${UTS_SYS}\" = QNX ]; then\n  echo=echo\nfi\n\nouch () {\n  $echo\n  $echo 'Ouch!  That hurts!!'\n  exit 1\n}\n\ntrap ouch 2\n\nsrcdir=\"\"\nblddir=\"\"\nbatch=\"\"\ndoConfig=yes\ndoMake=tes\n\ngetYN() {\n  if [ \"${batch}\" ]; then\n    YN=\"y\"\n  else\n    YN=\"\"\n    while [ ! \"${YN}\" ]; do\n      read YN\n      case ${YN} in\n\ty|Y|n|N) ;;\n\t*)       $echo \"Did you mean Y or N ? \\c\" >&2; YN=\"\" ;;\n      esac\n    done\n  fi\n  $echo ${YN}\n}\n\ngetN () {\n  N=0\n  while [ ${N} -eq 0 ]; do\n    read n\n    let n=\"${n}\"\n    if [ \"${n}\" -a \\( ${n} -gt 0 \\) -a \\( ${n} -le ${1} \\) ]; then\n      N=${n}\n    else\n      $echo \"Please answer a number in the range [1-${1}]: \\c\"\n    fi\n  done\n  $echo ${N}\n}\n\nusage () {\n  $echo \"usage: ${0} [-c] [-h] [-m] [-y] [-s srcdir] [-b blddir]\" >&2\n}\n\nhelp () {\n  usage\n  cat >&2 <<\\EOF\n  -b dir     build in `dir'\n  -c         run `configure' only (don't make)\n  -h         show this help message\n  -m         run `make' only (don't configure)\n  -s dir     VMMaker sources are in `dir'\n  -y         assume `y' to all questions and work silently (`batch' mode)\nEOF\n  exit 0\n}\n\nnotFound () {\n  $echo \"VMMaker src directory not found\" >&2\n  exit 1\n}\n\nwhile [ $# -gt 0 ]; do\n  case $1 in\n    -b) shift; blddir=\"${1}\"; shift;;\n    -c) shift; doMake=\"\";;\n    -h) help;;\n    -m) shift; doConfig=\"\";;\n    -s) shift; srcdir=\"${1}\"; shift;;\n    -y) shift; batch=yes;;\n    *)  usage; exit 1;;\n  esac\ndone\n\n[ $# -gt 0 ] && usage && exit 1\n\nif [ \"${srcdir}\" ]; then\n  srcdirs=\"${srcdir}\"\nelse\n  srcdirs=`$echo src*`\nfi\n\n[ ! \"${srcdirs}\" ] && notFound\n\ncount=0;\n\nfor d in ${srcdirs}; do\n  [ -d ${d} ] && let count=\"${count}+1\"\ndone\n\nchooseDir () {\n  $echo \"We found the following source directories:\"\n  i=0\n  for d in ${srcdirs}; do\n    let i=\"${i}+1\"\n    list=\"${list}  [${i}] ${d}\n\"\n  done\n  $echo\n  $echo \"${list}\"\n  if [ \"${batch}\" ]; then\n    $echo \"batch mode failed!\" >&2\n    exit 1\n  fi\n  $echo \"Which would you like to use [1-${i}]? \\c\"\n  n=`getN ${count}`\n  srcdir=`$echo \"${list}\" | fgrep \"[$n]\" | sed \"s,^\\[.*\\] ,,\"`\n  [ \"${srcdir}\" ] || notFound\n}\n\ncase ${count} in\n  0) notFound ;;\n  1) srcdir=${srcdirs} ;;\n  *) chooseDir ;;\nesac\n\n$echo \"Using source directory: ${srcdir}\"\n\nif [ ! \"${blddir}\" ]; then\n  vers=`$echo ${srcdir} | sed 's,^src,,'`\n  mach=`uname -m | sed 's,i.86,i386,;s,sun4.,sparc,'`\n  blddir=\"bld${vers}-${mach}\"\nfi\n\n$echo \"Using build directory: ${blddir}\"\n\nif [ ! \"${batch}\" ]; then\n  $echo \"Is this okay [y/n]? \\c\"\n  case `getYN` in\n    y|Y) ;;\n    n|N) $echo \"Goodybye\" >&2; exit 1 ;;\n    *)   $echo \"Huh?\" >&2; exit 1 ;;\n  esac\nfi\n\n[ -d ${blddir} ] || mkdir ${blddir}\n\ncd ${blddir}\n\nif [ \"${doConfig}\" ]; then\n  $echo\n  $echo '-------------------------------------------------------------------------------'\n  $echo \"Configuring in ${PWD}\"\n  $echo '-------------------------------------------------------------------------------'\n  $echo\n  ../platforms/unix/config/configure --with-src=${srcdir} || exit 1\nfi\n\nif [ \"${doMake}\" ]; then\n  $echo \n  $echo '-------------------------------------------------------------------------------'\n  $echo \"Building in ${PWD}\"\n  $echo '-------------------------------------------------------------------------------'\n  $echo\n  make || exit 1\nfi\n\n$echo\n$echo '-------------------------------------------------------------------------------'\n\nif [ ! -x squeak ]; then\n  $echo \"The build appears to have failed.  We can't really continue.\" >&2\n  $echo \"Goodbye.\" >&2\n  exit 1\nfi\n\n$echo \"The build appears to have succeeded.\"\n\n[ \"${batch}\" ] && exit 0\n\nif [ \"`whoami`\" != \"root\" ]; then\n  $echo \"We cannot install Squeak because you are not root\" >&2\n  exit 0\nfi\n\n$echo \"Would you like me to install Squeak in the default location [y/n]? \\c\"\ncase `getYN` in\n  y|Y) ;;\n  n|N) $echo \"Less work for us that way.\"; exit 0 ;;\n  *)   $echo \"Huh?\"; exit 1 ;;\nesac\n\n$echo\nmake install\n$echo\n\n$echo \"We're done.  Happy Squeaking!\"\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/config.guess",
    "content": "#! /bin/sh\n# Attempt to guess a canonical system name.\n#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,\n#   2000, 2001, 2002 Free Software Foundation, Inc.\n\ntimestamp='2002-10-21'\n\n# This file is free software; you can redistribute it and/or modify it\n# under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful, but\n# WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n# General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n#\n# As a special exception to the GNU General Public License, if you\n# distribute this file as part of a program that contains a\n# configuration script generated by Autoconf, you may include it under\n# the same distribution terms that you use for the rest of that program.\n\n# Originally written by Per Bothner <per@bothner.com>.\n# Please send patches to <config-patches@gnu.org>.  Submit a context\n# diff and a properly formatted ChangeLog entry.\n#\n# This script attempts to guess a canonical system name similar to\n# config.sub.  If it succeeds, it prints the system name on stdout, and\n# exits with 0.  Otherwise, it exits with 1.\n#\n# The plan is that this can be called by configure scripts if you\n# don't specify an explicit build system type.\n\nme=`echo \"$0\" | sed -e 's,.*/,,'`\n\nusage=\"\\\nUsage: $0 [OPTION]\n\nOutput the configuration name of the system \\`$me' is run on.\n\nOperation modes:\n  -h, --help         print this help, then exit\n  -t, --time-stamp   print date of last modification, then exit\n  -v, --version      print version number, then exit\n\nReport bugs and patches to <config-patches@gnu.org>.\"\n\nversion=\"\\\nGNU config.guess ($timestamp)\n\nOriginally written by Per Bothner.\nCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001\nFree Software Foundation, Inc.\n\nThis is free software; see the source for copying conditions.  There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\"\n\nhelp=\"\nTry \\`$me --help' for more information.\"\n\n# Parse command line\nwhile test $# -gt 0 ; do\n  case $1 in\n    --time-stamp | --time* | -t )\n       echo \"$timestamp\" ; exit 0 ;;\n    --version | -v )\n       echo \"$version\" ; exit 0 ;;\n    --help | --h* | -h )\n       echo \"$usage\"; exit 0 ;;\n    -- )     # Stop option processing\n       shift; break ;;\n    - )\t# Use stdin as input.\n       break ;;\n    -* )\n       echo \"$me: invalid option $1$help\" >&2\n       exit 1 ;;\n    * )\n       break ;;\n  esac\ndone\n\nif test $# != 0; then\n  echo \"$me: too many arguments$help\" >&2\n  exit 1\nfi\n\ntrap 'exit 1' 1 2 15\n\n# CC_FOR_BUILD -- compiler used by this script. Note that the use of a\n# compiler to aid in system detection is discouraged as it requires\n# temporary files to be created and, as you can see below, it is a\n# headache to deal with in a portable fashion.\n\n# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still\n# use `HOST_CC' if defined, but it is deprecated.\n\n# This shell variable is my proudest work .. or something. --bje\n\nset_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ;\n(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old)\n   || (echo \"$me: cannot create $tmpdir\" >&2 && exit 1) ;\ndummy=$tmpdir/dummy ;\nfiles=\"$dummy.c $dummy.o $dummy.rel $dummy\" ;\ntrap '\"'\"'rm -f $files; rmdir $tmpdir; exit 1'\"'\"' 1 2 15 ;\ncase $CC_FOR_BUILD,$HOST_CC,$CC in\n ,,)    echo \"int x;\" > $dummy.c ;\n\tfor c in cc gcc c89 c99 ; do\n\t  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then\n\t     CC_FOR_BUILD=\"$c\"; break ;\n\t  fi ;\n\tdone ;\n\trm -f $files ;\n\tif test x\"$CC_FOR_BUILD\" = x ; then\n\t  CC_FOR_BUILD=no_compiler_found ;\n\tfi\n\t;;\n ,,*)   CC_FOR_BUILD=$CC ;;\n ,*,*)  CC_FOR_BUILD=$HOST_CC ;;\nesac ;\nunset files'\n\n# This is needed to find uname on a Pyramid OSx when run in the BSD universe.\n# (ghazi@noc.rutgers.edu 1994-08-24)\nif (test -f /.attbin/uname) >/dev/null 2>&1 ; then\n\tPATH=$PATH:/.attbin ; export PATH\nfi\n\nUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown\nUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown\nUNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown\nUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown\n\n# Note: order is significant - the case branches are not exclusive.\n\ncase \"${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}\" in\n    *:NetBSD:*:*)\n\t# NetBSD (nbsd) targets should (where applicable) match one or\n\t# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,\n\t# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently\n\t# switched to ELF, *-*-netbsd* would select the old\n\t# object file format.  This provides both forward\n\t# compatibility and a consistent mechanism for selecting the\n\t# object file format.\n\t#\n\t# Note: NetBSD doesn't particularly care about the vendor\n\t# portion of the name.  We always set it to \"unknown\".\n\tsysctl=\"sysctl -n hw.machine_arch\"\n\tUNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \\\n\t    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`\n\tcase \"${UNAME_MACHINE_ARCH}\" in\n\t    armeb) machine=armeb-unknown ;;\n\t    arm*) machine=arm-unknown ;;\n\t    sh3el) machine=shl-unknown ;;\n\t    sh3eb) machine=sh-unknown ;;\n\t    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;\n\tesac\n\t# The Operating System including object format, if it has switched\n\t# to ELF recently, or will in the future.\n\tcase \"${UNAME_MACHINE_ARCH}\" in\n\t    arm*|i386|m68k|ns32k|sh3*|sparc|vax)\n\t\teval $set_cc_for_build\n\t\tif echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \\\n\t\t\t| grep __ELF__ >/dev/null\n\t\tthen\n\t\t    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).\n\t\t    # Return netbsd for either.  FIX?\n\t\t    os=netbsd\n\t\telse\n\t\t    os=netbsdelf\n\t\tfi\n\t\t;;\n\t    *)\n\t        os=netbsd\n\t\t;;\n\tesac\n\t# The OS release\n\trelease=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\\./'`\n\t# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:\n\t# contains redundant information, the shorter form:\n\t# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.\n\techo \"${machine}-${os}${release}\"\n\texit 0 ;;\n    amiga:OpenBSD:*:*)\n\techo m68k-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    arc:OpenBSD:*:*)\n\techo mipsel-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    hp300:OpenBSD:*:*)\n\techo m68k-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    mac68k:OpenBSD:*:*)\n\techo m68k-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    macppc:OpenBSD:*:*)\n\techo powerpc-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    mvme68k:OpenBSD:*:*)\n\techo m68k-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    mvme88k:OpenBSD:*:*)\n\techo m88k-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    mvmeppc:OpenBSD:*:*)\n\techo powerpc-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    pmax:OpenBSD:*:*)\n\techo mipsel-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    sgi:OpenBSD:*:*)\n\techo mipseb-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    sun3:OpenBSD:*:*)\n\techo m68k-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    wgrisc:OpenBSD:*:*)\n\techo mipsel-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    *:OpenBSD:*:*)\n\techo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}\n\texit 0 ;;\n    alpha:OSF1:*:*)\n\tif test $UNAME_RELEASE = \"V4.0\"; then\n\t\tUNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`\n\tfi\n\t# A Vn.n version is a released version.\n\t# A Tn.n version is a released field test version.\n\t# A Xn.n version is an unreleased experimental baselevel.\n\t# 1.2 uses \"1.2\" for uname -r.\n\teval $set_cc_for_build\n\tcat <<EOF >$dummy.s\n\t.data\n\\$Lformat:\n\t.byte 37,100,45,37,120,10,0\t# \"%d-%x\\n\"\n\n\t.text\n\t.globl main\n\t.align 4\n\t.ent main\nmain:\n\t.frame \\$30,16,\\$26,0\n\tldgp \\$29,0(\\$27)\n\t.prologue 1\n\t.long 0x47e03d80 # implver \\$0\n\tlda \\$2,-1\n\t.long 0x47e20c21 # amask \\$2,\\$1\n\tlda \\$16,\\$Lformat\n\tmov \\$0,\\$17\n\tnot \\$1,\\$18\n\tjsr \\$26,printf\n\tldgp \\$29,0(\\$26)\n\tmov 0,\\$16\n\tjsr \\$26,exit\n\t.end main\nEOF\n\t$CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null\n\tif test \"$?\" = 0 ; then\n\t\tcase `$dummy` in\n\t\t\t0-0)\n\t\t\t\tUNAME_MACHINE=\"alpha\"\n\t\t\t\t;;\n\t\t\t1-0)\n\t\t\t\tUNAME_MACHINE=\"alphaev5\"\n\t\t\t\t;;\n\t\t\t1-1)\n\t\t\t\tUNAME_MACHINE=\"alphaev56\"\n\t\t\t\t;;\n\t\t\t1-101)\n\t\t\t\tUNAME_MACHINE=\"alphapca56\"\n\t\t\t\t;;\n\t\t\t2-303)\n\t\t\t\tUNAME_MACHINE=\"alphaev6\"\n\t\t\t\t;;\n\t\t\t2-307)\n\t\t\t\tUNAME_MACHINE=\"alphaev67\"\n\t\t\t\t;;\n\t\t\t2-1307)\n\t\t\t\tUNAME_MACHINE=\"alphaev68\"\n\t\t\t\t;;\n\t\t\t3-1307)\n\t\t\t\tUNAME_MACHINE=\"alphaev7\"\n\t\t\t\t;;\n\t\tesac\n\tfi\n\trm -f $dummy.s $dummy && rmdir $tmpdir\n\techo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`\n\texit 0 ;;\n    Alpha\\ *:Windows_NT*:*)\n\t# How do we know it's Interix rather than the generic POSIX subsystem?\n\t# Should we change UNAME_MACHINE based on the output of uname instead\n\t# of the specific Alpha model?\n\techo alpha-pc-interix\n\texit 0 ;;\n    21064:Windows_NT:50:3)\n\techo alpha-dec-winnt3.5\n\texit 0 ;;\n    Amiga*:UNIX_System_V:4.0:*)\n\techo m68k-unknown-sysv4\n\texit 0;;\n    *:[Aa]miga[Oo][Ss]:*:*)\n\techo ${UNAME_MACHINE}-unknown-amigaos\n\texit 0 ;;\n    *:[Mm]orph[Oo][Ss]:*:*)\n\techo ${UNAME_MACHINE}-unknown-morphos\n\texit 0 ;;\n    *:OS/390:*:*)\n\techo i370-ibm-openedition\n\texit 0 ;;\n    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)\n\techo arm-acorn-riscix${UNAME_RELEASE}\n\texit 0;;\n    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)\n\techo hppa1.1-hitachi-hiuxmpp\n\texit 0;;\n    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)\n\t# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.\n\tif test \"`(/bin/universe) 2>/dev/null`\" = att ; then\n\t\techo pyramid-pyramid-sysv3\n\telse\n\t\techo pyramid-pyramid-bsd\n\tfi\n\texit 0 ;;\n    NILE*:*:*:dcosx)\n\techo pyramid-pyramid-svr4\n\texit 0 ;;\n    DRS?6000:UNIX_SV:4.2*:7*)\n\tcase `/usr/bin/uname -p` in\n\t    sparc) echo sparc-icl-nx7 && exit 0 ;;\n\tesac ;;\n    sun4H:SunOS:5.*:*)\n\techo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`\n\texit 0 ;;\n    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)\n\techo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`\n\texit 0 ;;\n    i86pc:SunOS:5.*:*)\n\techo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`\n\texit 0 ;;\n    sun4*:SunOS:6*:*)\n\t# According to config.sub, this is the proper way to canonicalize\n\t# SunOS6.  Hard to guess exactly what SunOS6 will be like, but\n\t# it's likely to be more like Solaris than SunOS4.\n\techo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`\n\texit 0 ;;\n    sun4*:SunOS:*:*)\n\tcase \"`/usr/bin/arch -k`\" in\n\t    Series*|S4*)\n\t\tUNAME_RELEASE=`uname -v`\n\t\t;;\n\tesac\n\t# Japanese Language versions have a version number like `4.1.3-JL'.\n\techo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`\n\texit 0 ;;\n    sun3*:SunOS:*:*)\n\techo m68k-sun-sunos${UNAME_RELEASE}\n\texit 0 ;;\n    sun*:*:4.2BSD:*)\n\tUNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`\n\ttest \"x${UNAME_RELEASE}\" = \"x\" && UNAME_RELEASE=3\n\tcase \"`/bin/arch`\" in\n\t    sun3)\n\t\techo m68k-sun-sunos${UNAME_RELEASE}\n\t\t;;\n\t    sun4)\n\t\techo sparc-sun-sunos${UNAME_RELEASE}\n\t\t;;\n\tesac\n\texit 0 ;;\n    aushp:SunOS:*:*)\n\techo sparc-auspex-sunos${UNAME_RELEASE}\n\texit 0 ;;\n    # The situation for MiNT is a little confusing.  The machine name\n    # can be virtually everything (everything which is not\n    # \"atarist\" or \"atariste\" at least should have a processor\n    # > m68000).  The system name ranges from \"MiNT\" over \"FreeMiNT\"\n    # to the lowercase version \"mint\" (or \"freemint\").  Finally\n    # the system name \"TOS\" denotes a system which is actually not\n    # MiNT.  But MiNT is downward compatible to TOS, so this should\n    # be no problem.\n    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)\n        echo m68k-atari-mint${UNAME_RELEASE}\n\texit 0 ;;\n    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)\n\techo m68k-atari-mint${UNAME_RELEASE}\n        exit 0 ;;\n    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)\n        echo m68k-atari-mint${UNAME_RELEASE}\n\texit 0 ;;\n    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)\n        echo m68k-milan-mint${UNAME_RELEASE}\n        exit 0 ;;\n    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)\n        echo m68k-hades-mint${UNAME_RELEASE}\n        exit 0 ;;\n    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)\n        echo m68k-unknown-mint${UNAME_RELEASE}\n        exit 0 ;;\n    powerpc:machten:*:*)\n\techo powerpc-apple-machten${UNAME_RELEASE}\n\texit 0 ;;\n    RISC*:Mach:*:*)\n\techo mips-dec-mach_bsd4.3\n\texit 0 ;;\n    RISC*:ULTRIX:*:*)\n\techo mips-dec-ultrix${UNAME_RELEASE}\n\texit 0 ;;\n    VAX*:ULTRIX*:*:*)\n\techo vax-dec-ultrix${UNAME_RELEASE}\n\texit 0 ;;\n    2020:CLIX:*:* | 2430:CLIX:*:*)\n\techo clipper-intergraph-clix${UNAME_RELEASE}\n\texit 0 ;;\n    mips:*:*:UMIPS | mips:*:*:RISCos)\n\teval $set_cc_for_build\n\tsed 's/^\t//' << EOF >$dummy.c\n#ifdef __cplusplus\n#include <stdio.h>  /* for printf() prototype */\n\tint main (int argc, char *argv[]) {\n#else\n\tint main (argc, argv) int argc; char *argv[]; {\n#endif\n\t#if defined (host_mips) && defined (MIPSEB)\n\t#if defined (SYSTYPE_SYSV)\n\t  printf (\"mips-mips-riscos%ssysv\\n\", argv[1]); exit (0);\n\t#endif\n\t#if defined (SYSTYPE_SVR4)\n\t  printf (\"mips-mips-riscos%ssvr4\\n\", argv[1]); exit (0);\n\t#endif\n\t#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)\n\t  printf (\"mips-mips-riscos%sbsd\\n\", argv[1]); exit (0);\n\t#endif\n\t#endif\n\t  exit (-1);\n\t}\nEOF\n\t$CC_FOR_BUILD -o $dummy $dummy.c \\\n\t  && $dummy `echo \"${UNAME_RELEASE}\" | sed -n 's/\\([0-9]*\\).*/\\1/p'` \\\n\t  && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0\n\trm -f $dummy.c $dummy && rmdir $tmpdir\n\techo mips-mips-riscos${UNAME_RELEASE}\n\texit 0 ;;\n    Motorola:PowerMAX_OS:*:*)\n\techo powerpc-motorola-powermax\n\texit 0 ;;\n    Motorola:*:4.3:PL8-*)\n\techo powerpc-harris-powermax\n\texit 0 ;;\n    Night_Hawk:*:*:PowerMAX_OS)\n\techo powerpc-harris-powermax\n\texit 0 ;;\n    Night_Hawk:Power_UNIX:*:*)\n\techo powerpc-harris-powerunix\n\texit 0 ;;\n    m88k:CX/UX:7*:*)\n\techo m88k-harris-cxux7\n\texit 0 ;;\n    m88k:*:4*:R4*)\n\techo m88k-motorola-sysv4\n\texit 0 ;;\n    m88k:*:3*:R3*)\n\techo m88k-motorola-sysv3\n\texit 0 ;;\n    AViiON:dgux:*:*)\n        # DG/UX returns AViiON for all architectures\n        UNAME_PROCESSOR=`/usr/bin/uname -p`\n\tif [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]\n\tthen\n\t    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \\\n\t       [ ${TARGET_BINARY_INTERFACE}x = x ]\n\t    then\n\t\techo m88k-dg-dgux${UNAME_RELEASE}\n\t    else\n\t\techo m88k-dg-dguxbcs${UNAME_RELEASE}\n\t    fi\n\telse\n\t    echo i586-dg-dgux${UNAME_RELEASE}\n\tfi\n \texit 0 ;;\n    M88*:DolphinOS:*:*)\t# DolphinOS (SVR3)\n\techo m88k-dolphin-sysv3\n\texit 0 ;;\n    M88*:*:R3*:*)\n\t# Delta 88k system running SVR3\n\techo m88k-motorola-sysv3\n\texit 0 ;;\n    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)\n\techo m88k-tektronix-sysv3\n\texit 0 ;;\n    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)\n\techo m68k-tektronix-bsd\n\texit 0 ;;\n    *:IRIX*:*:*)\n\techo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`\n\texit 0 ;;\n    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.\n\techo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id\n\texit 0 ;;              # Note that: echo \"'`uname -s`'\" gives 'AIX '\n    i*86:AIX:*:*)\n\techo i386-ibm-aix\n\texit 0 ;;\n    ia64:AIX:*:*)\n\tif [ -x /usr/bin/oslevel ] ; then\n\t\tIBM_REV=`/usr/bin/oslevel`\n\telse\n\t\tIBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}\n\tfi\n\techo ${UNAME_MACHINE}-ibm-aix${IBM_REV}\n\texit 0 ;;\n    *:AIX:2:3)\n\tif grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then\n\t\teval $set_cc_for_build\n\t\tsed 's/^\t\t//' << EOF >$dummy.c\n\t\t#include <sys/systemcfg.h>\n\n\t\tmain()\n\t\t\t{\n\t\t\tif (!__power_pc())\n\t\t\t\texit(1);\n\t\t\tputs(\"powerpc-ibm-aix3.2.5\");\n\t\t\texit(0);\n\t\t\t}\nEOF\n\t\t$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0\n\t\trm -f $dummy.c $dummy && rmdir $tmpdir\n\t\techo rs6000-ibm-aix3.2.5\n\telif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then\n\t\techo rs6000-ibm-aix3.2.4\n\telse\n\t\techo rs6000-ibm-aix3.2\n\tfi\n\texit 0 ;;\n    *:AIX:*:[45])\n\tIBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`\n\tif /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then\n\t\tIBM_ARCH=rs6000\n\telse\n\t\tIBM_ARCH=powerpc\n\tfi\n\tif [ -x /usr/bin/oslevel ] ; then\n\t\tIBM_REV=`/usr/bin/oslevel`\n\telse\n\t\tIBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}\n\tfi\n\techo ${IBM_ARCH}-ibm-aix${IBM_REV}\n\texit 0 ;;\n    *:AIX:*:*)\n\techo rs6000-ibm-aix\n\texit 0 ;;\n    ibmrt:4.4BSD:*|romp-ibm:BSD:*)\n\techo romp-ibm-bsd4.4\n\texit 0 ;;\n    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and\n\techo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to\n\texit 0 ;;                           # report: romp-ibm BSD 4.3\n    *:BOSX:*:*)\n\techo rs6000-bull-bosx\n\texit 0 ;;\n    DPX/2?00:B.O.S.:*:*)\n\techo m68k-bull-sysv3\n\texit 0 ;;\n    9000/[34]??:4.3bsd:1.*:*)\n\techo m68k-hp-bsd\n\texit 0 ;;\n    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)\n\techo m68k-hp-bsd4.4\n\texit 0 ;;\n    9000/[34678]??:HP-UX:*:*)\n\tHPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`\n\tcase \"${UNAME_MACHINE}\" in\n\t    9000/31? )            HP_ARCH=m68000 ;;\n\t    9000/[34]?? )         HP_ARCH=m68k ;;\n\t    9000/[678][0-9][0-9])\n\t\tif [ -x /usr/bin/getconf ]; then\n\t\t    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`\n                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`\n                    case \"${sc_cpu_version}\" in\n                      523) HP_ARCH=\"hppa1.0\" ;; # CPU_PA_RISC1_0\n                      528) HP_ARCH=\"hppa1.1\" ;; # CPU_PA_RISC1_1\n                      532)                      # CPU_PA_RISC2_0\n                        case \"${sc_kernel_bits}\" in\n                          32) HP_ARCH=\"hppa2.0n\" ;;\n                          64) HP_ARCH=\"hppa2.0w\" ;;\n\t\t\t  '') HP_ARCH=\"hppa2.0\" ;;   # HP-UX 10.20\n                        esac ;;\n                    esac\n\t\tfi\n\t\tif [ \"${HP_ARCH}\" = \"\" ]; then\n\t\t    eval $set_cc_for_build\n\t\t    sed 's/^              //' << EOF >$dummy.c\n\n              #define _HPUX_SOURCE\n              #include <stdlib.h>\n              #include <unistd.h>\n\n              int main ()\n              {\n              #if defined(_SC_KERNEL_BITS)\n                  long bits = sysconf(_SC_KERNEL_BITS);\n              #endif\n                  long cpu  = sysconf (_SC_CPU_VERSION);\n\n                  switch (cpu)\n              \t{\n              \tcase CPU_PA_RISC1_0: puts (\"hppa1.0\"); break;\n              \tcase CPU_PA_RISC1_1: puts (\"hppa1.1\"); break;\n              \tcase CPU_PA_RISC2_0:\n              #if defined(_SC_KERNEL_BITS)\n              \t    switch (bits)\n              \t\t{\n              \t\tcase 64: puts (\"hppa2.0w\"); break;\n              \t\tcase 32: puts (\"hppa2.0n\"); break;\n              \t\tdefault: puts (\"hppa2.0\"); break;\n              \t\t} break;\n              #else  /* !defined(_SC_KERNEL_BITS) */\n              \t    puts (\"hppa2.0\"); break;\n              #endif\n              \tdefault: puts (\"hppa1.0\"); break;\n              \t}\n                  exit (0);\n              }\nEOF\n\t\t    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`\n\t\t    if test -z \"$HP_ARCH\"; then HP_ARCH=hppa; fi\n\t\t    rm -f $dummy.c $dummy && rmdir $tmpdir\n\t\tfi ;;\n\tesac\n\techo ${HP_ARCH}-hp-hpux${HPUX_REV}\n\texit 0 ;;\n    ia64:HP-UX:*:*)\n\tHPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`\n\techo ia64-hp-hpux${HPUX_REV}\n\texit 0 ;;\n    3050*:HI-UX:*:*)\n\teval $set_cc_for_build\n\tsed 's/^\t//' << EOF >$dummy.c\n\t#include <unistd.h>\n\tint\n\tmain ()\n\t{\n\t  long cpu = sysconf (_SC_CPU_VERSION);\n\t  /* The order matters, because CPU_IS_HP_MC68K erroneously returns\n\t     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct\n\t     results, however.  */\n\t  if (CPU_IS_PA_RISC (cpu))\n\t    {\n\t      switch (cpu)\n\t\t{\n\t\t  case CPU_PA_RISC1_0: puts (\"hppa1.0-hitachi-hiuxwe2\"); break;\n\t\t  case CPU_PA_RISC1_1: puts (\"hppa1.1-hitachi-hiuxwe2\"); break;\n\t\t  case CPU_PA_RISC2_0: puts (\"hppa2.0-hitachi-hiuxwe2\"); break;\n\t\t  default: puts (\"hppa-hitachi-hiuxwe2\"); break;\n\t\t}\n\t    }\n\t  else if (CPU_IS_HP_MC68K (cpu))\n\t    puts (\"m68k-hitachi-hiuxwe2\");\n\t  else puts (\"unknown-hitachi-hiuxwe2\");\n\t  exit (0);\n\t}\nEOF\n\t$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0\n\trm -f $dummy.c $dummy && rmdir $tmpdir\n\techo unknown-hitachi-hiuxwe2\n\texit 0 ;;\n    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )\n\techo hppa1.1-hp-bsd\n\texit 0 ;;\n    9000/8??:4.3bsd:*:*)\n\techo hppa1.0-hp-bsd\n\texit 0 ;;\n    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)\n\techo hppa1.0-hp-mpeix\n\texit 0 ;;\n    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )\n\techo hppa1.1-hp-osf\n\texit 0 ;;\n    hp8??:OSF1:*:*)\n\techo hppa1.0-hp-osf\n\texit 0 ;;\n    i*86:OSF1:*:*)\n\tif [ -x /usr/sbin/sysversion ] ; then\n\t    echo ${UNAME_MACHINE}-unknown-osf1mk\n\telse\n\t    echo ${UNAME_MACHINE}-unknown-osf1\n\tfi\n\texit 0 ;;\n    parisc*:Lites*:*:*)\n\techo hppa1.1-hp-lites\n\texit 0 ;;\n    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)\n\techo c1-convex-bsd\n        exit 0 ;;\n    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)\n\tif getsysinfo -f scalar_acc\n\tthen echo c32-convex-bsd\n\telse echo c2-convex-bsd\n\tfi\n        exit 0 ;;\n    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)\n\techo c34-convex-bsd\n        exit 0 ;;\n    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)\n\techo c38-convex-bsd\n        exit 0 ;;\n    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)\n\techo c4-convex-bsd\n        exit 0 ;;\n    CRAY*Y-MP:*:*:*)\n\techo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\\.[^.]*$/.X/'\n\texit 0 ;;\n    CRAY*[A-Z]90:*:*:*)\n\techo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \\\n\t| sed -e 's/CRAY.*\\([A-Z]90\\)/\\1/' \\\n\t      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \\\n\t      -e 's/\\.[^.]*$/.X/'\n\texit 0 ;;\n    CRAY*TS:*:*:*)\n\techo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\\.[^.]*$/.X/'\n\texit 0 ;;\n    CRAY*T3D:*:*:*)\n\techo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\\.[^.]*$/.X/'\n\texit 0 ;;\n    CRAY*T3E:*:*:*)\n\techo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\\.[^.]*$/.X/'\n\texit 0 ;;\n    CRAY*SV1:*:*:*)\n\techo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\\.[^.]*$/.X/'\n\texit 0 ;;\n    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)\n\tFUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`\n        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\\///'`\n        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`\n        echo \"${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}\"\n        exit 0 ;;\n    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\\ Embedded/OS:*:*)\n\techo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}\n\texit 0 ;;\n    sparc*:BSD/OS:*:*)\n\techo sparc-unknown-bsdi${UNAME_RELEASE}\n\texit 0 ;;\n    *:BSD/OS:*:*)\n\techo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}\n\texit 0 ;;\n    *:FreeBSD:*:*)\n\t# Determine whether the default compiler uses glibc.\n\teval $set_cc_for_build\n\tsed 's/^\t//' << EOF >$dummy.c\n\t#include <features.h>\n\t#if __GLIBC__ >= 2\n\tLIBC=gnu\n\t#else\n\tLIBC=\n\t#endif\nEOF\n\teval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`\n\trm -f $dummy.c && rmdir $tmpdir\n\techo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}\n\texit 0 ;;\n    i*:CYGWIN*:*)\n\techo ${UNAME_MACHINE}-pc-cygwin\n\texit 0 ;;\n    i*:MINGW*:*)\n\techo ${UNAME_MACHINE}-pc-mingw32\n\texit 0 ;;\n    i*:PW*:*)\n\techo ${UNAME_MACHINE}-pc-pw32\n\texit 0 ;;\n    x86:Interix*:3*)\n\techo i386-pc-interix3\n\texit 0 ;;\n    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)\n\t# How do we know it's Interix rather than the generic POSIX subsystem?\n\t# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we\n\t# UNAME_MACHINE based on the output of uname instead of i386?\n\techo i386-pc-interix\n\texit 0 ;;\n    i*:UWIN*:*)\n\techo ${UNAME_MACHINE}-pc-uwin\n\texit 0 ;;\n    p*:CYGWIN*:*)\n\techo powerpcle-unknown-cygwin\n\texit 0 ;;\n    prep*:SunOS:5.*:*)\n\techo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`\n\texit 0 ;;\n    *:GNU:*:*)\n\techo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`\n\texit 0 ;;\n    i*86:Minix:*:*)\n\techo ${UNAME_MACHINE}-pc-minix\n\texit 0 ;;\n    arm*:Linux:*:*)\n\techo ${UNAME_MACHINE}-unknown-linux-gnu\n\texit 0 ;;\n    ia64:Linux:*:*)\n\techo ${UNAME_MACHINE}-unknown-linux-gnu\n\texit 0 ;;\n    m68*:Linux:*:*)\n\techo ${UNAME_MACHINE}-unknown-linux-gnu\n\texit 0 ;;\n    mips:Linux:*:*)\n\teval $set_cc_for_build\n\tsed 's/^\t//' << EOF >$dummy.c\n\t#undef CPU\n\t#undef mips\n\t#undef mipsel\n\t#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)\n\tCPU=mipsel\n\t#else\n\t#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)\n\tCPU=mips\n\t#else\n\tCPU=\n\t#endif\n\t#endif\nEOF\n\teval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`\n\trm -f $dummy.c && rmdir $tmpdir\n\ttest x\"${CPU}\" != x && echo \"${CPU}-pc-linux-gnu\" && exit 0\n\t;;\n    ppc:Linux:*:*)\n\techo powerpc-unknown-linux-gnu\n\texit 0 ;;\n    ppc64:Linux:*:*)\n\techo powerpc64-unknown-linux-gnu\n\texit 0 ;;\n    alpha:Linux:*:*)\n\tcase `sed -n '/^cpu model/s/^.*: \\(.*\\)/\\1/p' < /proc/cpuinfo` in\n\t  EV5)   UNAME_MACHINE=alphaev5 ;;\n\t  EV56)  UNAME_MACHINE=alphaev56 ;;\n\t  PCA56) UNAME_MACHINE=alphapca56 ;;\n\t  PCA57) UNAME_MACHINE=alphapca56 ;;\n\t  EV6)   UNAME_MACHINE=alphaev6 ;;\n\t  EV67)  UNAME_MACHINE=alphaev67 ;;\n\t  EV68*) UNAME_MACHINE=alphaev68 ;;\n        esac\n\tobjdump --private-headers /bin/sh | grep ld.so.1 >/dev/null\n\tif test \"$?\" = 0 ; then LIBC=\"libc1\" ; else LIBC=\"\" ; fi\n\techo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}\n\texit 0 ;;\n    parisc:Linux:*:* | hppa:Linux:*:*)\n\t# Look for CPU level\n\tcase `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in\n\t  PA7*) echo hppa1.1-unknown-linux-gnu ;;\n\t  PA8*) echo hppa2.0-unknown-linux-gnu ;;\n\t  *)    echo hppa-unknown-linux-gnu ;;\n\tesac\n\texit 0 ;;\n    parisc64:Linux:*:* | hppa64:Linux:*:*)\n\techo hppa64-unknown-linux-gnu\n\texit 0 ;;\n    s390:Linux:*:* | s390x:Linux:*:*)\n\techo ${UNAME_MACHINE}-ibm-linux\n\texit 0 ;;\n    sh*:Linux:*:*)\n\techo ${UNAME_MACHINE}-unknown-linux-gnu\n\texit 0 ;;\n    sparc:Linux:*:* | sparc64:Linux:*:*)\n\techo ${UNAME_MACHINE}-unknown-linux-gnu\n\texit 0 ;;\n    x86_64:Linux:*:*)\n\techo x86_64-unknown-linux-gnu\n\texit 0 ;;\n    i*86:Linux:*:*)\n\t# The BFD linker knows what the default object file format is, so\n\t# first see if it will tell us. cd to the root directory to prevent\n\t# problems with other programs or directories called `ld' in the path.\n\t# Set LC_ALL=C to ensure ld outputs messages in English.\n\tld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \\\n\t\t\t | sed -ne '/supported targets:/!d\n\t\t\t\t    s/[ \t][ \t]*/ /g\n\t\t\t\t    s/.*supported targets: *//\n\t\t\t\t    s/ .*//\n\t\t\t\t    p'`\n        case \"$ld_supported_targets\" in\n\t  elf32-i386)\n\t\tTENTATIVE=\"${UNAME_MACHINE}-pc-linux-gnu\"\n\t\t;;\n\t  a.out-i386-linux)\n\t\techo \"${UNAME_MACHINE}-pc-linux-gnuaout\"\n\t\texit 0 ;;\n\t  coff-i386)\n\t\techo \"${UNAME_MACHINE}-pc-linux-gnucoff\"\n\t\texit 0 ;;\n\t  \"\")\n\t\t# Either a pre-BFD a.out linker (linux-gnuoldld) or\n\t\t# one that does not give us useful --help.\n\t\techo \"${UNAME_MACHINE}-pc-linux-gnuoldld\"\n\t\texit 0 ;;\n\tesac\n\t# Determine whether the default compiler is a.out or elf\n\teval $set_cc_for_build\n\tsed 's/^\t//' << EOF >$dummy.c\n\t#include <features.h>\n\t#ifdef __ELF__\n\t# ifdef __GLIBC__\n\t#  if __GLIBC__ >= 2\n\tLIBC=gnu\n\t#  else\n\tLIBC=gnulibc1\n\t#  endif\n\t# else\n\tLIBC=gnulibc1\n\t# endif\n\t#else\n\t#ifdef __INTEL_COMPILER\n\tLIBC=gnu\n\t#else\n\tLIBC=gnuaout\n\t#endif\n\t#endif\nEOF\n\teval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`\n\trm -f $dummy.c && rmdir $tmpdir\n\ttest x\"${LIBC}\" != x && echo \"${UNAME_MACHINE}-pc-linux-${LIBC}\" && exit 0\n\ttest x\"${TENTATIVE}\" != x && echo \"${TENTATIVE}\" && exit 0\n\t;;\n    i*86:DYNIX/ptx:4*:*)\n\t# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.\n\t# earlier versions are messed up and put the nodename in both\n\t# sysname and nodename.\n\techo i386-sequent-sysv4\n\texit 0 ;;\n    i*86:UNIX_SV:4.2MP:2.*)\n        # Unixware is an offshoot of SVR4, but it has its own version\n        # number series starting with 2...\n        # I am not positive that other SVR4 systems won't match this,\n\t# I just have to hope.  -- rms.\n        # Use sysv4.2uw... so that sysv4* matches it.\n\techo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}\n\texit 0 ;;\n    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)\n\tUNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\\/MP$//'`\n\tif grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then\n\t\techo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}\n\telse\n\t\techo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}\n\tfi\n\texit 0 ;;\n    i*86:*:5:[78]*)\n\tcase `/bin/uname -X | grep \"^Machine\"` in\n\t    *486*)\t     UNAME_MACHINE=i486 ;;\n\t    *Pentium)\t     UNAME_MACHINE=i586 ;;\n\t    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;\n\tesac\n\techo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}\n\texit 0 ;;\n    i*86:*:3.2:*)\n\tif test -f /usr/options/cb.name; then\n\t\tUNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`\n\t\techo ${UNAME_MACHINE}-pc-isc$UNAME_REL\n\telif /bin/uname -X 2>/dev/null >/dev/null ; then\n\t\tUNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`\n\t\t(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486\n\t\t(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \\\n\t\t\t&& UNAME_MACHINE=i586\n\t\t(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \\\n\t\t\t&& UNAME_MACHINE=i686\n\t\t(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \\\n\t\t\t&& UNAME_MACHINE=i686\n\t\techo ${UNAME_MACHINE}-pc-sco$UNAME_REL\n\telse\n\t\techo ${UNAME_MACHINE}-pc-sysv32\n\tfi\n\texit 0 ;;\n    i*86:*DOS:*:*)\n\techo ${UNAME_MACHINE}-pc-msdosdjgpp\n\texit 0 ;;\n    pc:*:*:*)\n\t# Left here for compatibility:\n        # uname -m prints for DJGPP always 'pc', but it prints nothing about\n        # the processor, so we play safe by assuming i386.\n\techo i386-pc-msdosdjgpp\n        exit 0 ;;\n    Intel:Mach:3*:*)\n\techo i386-pc-mach3\n\texit 0 ;;\n    paragon:*:*:*)\n\techo i860-intel-osf1\n\texit 0 ;;\n    i860:*:4.*:*) # i860-SVR4\n\tif grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then\n\t  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4\n\telse # Add other i860-SVR4 vendors below as they are discovered.\n\t  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4\n\tfi\n\texit 0 ;;\n    mini*:CTIX:SYS*5:*)\n\t# \"miniframe\"\n\techo m68010-convergent-sysv\n\texit 0 ;;\n    mc68k:UNIX:SYSTEM5:3.51m)\n\techo m68k-convergent-sysv\n\texit 0 ;;\n    M68*:*:R3V[567]*:*)\n\ttest -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;\n    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)\n\tOS_REL=''\n\ttest -r /etc/.relid \\\n\t&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \\([0-9][0-9]\\).*/\\1/p' < /etc/.relid`\n\t/bin/uname -p 2>/dev/null | grep 86 >/dev/null \\\n\t  && echo i486-ncr-sysv4.3${OS_REL} && exit 0\n\t/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \\\n\t  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;\n    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)\n        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \\\n          && echo i486-ncr-sysv4 && exit 0 ;;\n    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)\n\techo m68k-unknown-lynxos${UNAME_RELEASE}\n\texit 0 ;;\n    mc68030:UNIX_System_V:4.*:*)\n\techo m68k-atari-sysv4\n\texit 0 ;;\n    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)\n\techo i386-unknown-lynxos${UNAME_RELEASE}\n\texit 0 ;;\n    TSUNAMI:LynxOS:2.*:*)\n\techo sparc-unknown-lynxos${UNAME_RELEASE}\n\texit 0 ;;\n    rs6000:LynxOS:2.*:*)\n\techo rs6000-unknown-lynxos${UNAME_RELEASE}\n\texit 0 ;;\n    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)\n\techo powerpc-unknown-lynxos${UNAME_RELEASE}\n\texit 0 ;;\n    SM[BE]S:UNIX_SV:*:*)\n\techo mips-dde-sysv${UNAME_RELEASE}\n\texit 0 ;;\n    RM*:ReliantUNIX-*:*:*)\n\techo mips-sni-sysv4\n\texit 0 ;;\n    RM*:SINIX-*:*:*)\n\techo mips-sni-sysv4\n\texit 0 ;;\n    *:SINIX-*:*:*)\n\tif uname -p 2>/dev/null >/dev/null ; then\n\t\tUNAME_MACHINE=`(uname -p) 2>/dev/null`\n\t\techo ${UNAME_MACHINE}-sni-sysv4\n\telse\n\t\techo ns32k-sni-sysv\n\tfi\n\texit 0 ;;\n    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort\n                      # says <Richard.M.Bartel@ccMail.Census.GOV>\n        echo i586-unisys-sysv4\n        exit 0 ;;\n    *:UNIX_System_V:4*:FTX*)\n\t# From Gerald Hewes <hewes@openmarket.com>.\n\t# How about differentiating between stratus architectures? -djm\n\techo hppa1.1-stratus-sysv4\n\texit 0 ;;\n    *:*:*:FTX*)\n\t# From seanf@swdc.stratus.com.\n\techo i860-stratus-sysv4\n\texit 0 ;;\n    *:VOS:*:*)\n\t# From Paul.Green@stratus.com.\n\techo hppa1.1-stratus-vos\n\texit 0 ;;\n    mc68*:A/UX:*:*)\n\techo m68k-apple-aux${UNAME_RELEASE}\n\texit 0 ;;\n    news*:NEWS-OS:6*:*)\n\techo mips-sony-newsos6\n\texit 0 ;;\n    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)\n\tif [ -d /usr/nec ]; then\n\t        echo mips-nec-sysv${UNAME_RELEASE}\n\telse\n\t        echo mips-unknown-sysv${UNAME_RELEASE}\n\tfi\n        exit 0 ;;\n    BeBox:BeOS:*:*)\t# BeOS running on hardware made by Be, PPC only.\n\techo powerpc-be-beos\n\texit 0 ;;\n    BeMac:BeOS:*:*)\t# BeOS running on Mac or Mac clone, PPC only.\n\techo powerpc-apple-beos\n\texit 0 ;;\n    BePC:BeOS:*:*)\t# BeOS running on Intel PC compatible.\n\techo i586-pc-beos\n\texit 0 ;;\n    SX-4:SUPER-UX:*:*)\n\techo sx4-nec-superux${UNAME_RELEASE}\n\texit 0 ;;\n    SX-5:SUPER-UX:*:*)\n\techo sx5-nec-superux${UNAME_RELEASE}\n\texit 0 ;;\n    SX-6:SUPER-UX:*:*)\n\techo sx6-nec-superux${UNAME_RELEASE}\n\texit 0 ;;\n    Power*:Rhapsody:*:*)\n\techo powerpc-apple-rhapsody${UNAME_RELEASE}\n\texit 0 ;;\n    *:Rhapsody:*:*)\n\techo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}\n\texit 0 ;;\n    *:Darwin:*:*)\n\techo `uname -p`-apple-darwin${UNAME_RELEASE}\n\texit 0 ;;\n    *:procnto*:*:* | *:QNX:[0123456789]*:*)\n\tUNAME_PROCESSOR=`uname -p`\n\tif test \"$UNAME_PROCESSOR\" = \"x86\"; then\n\t\tUNAME_PROCESSOR=i386\n\t\tUNAME_MACHINE=pc\n\tfi\n\techo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}\n\texit 0 ;;\n    *:QNX:*:4*)\n\techo i386-pc-qnx\n\texit 0 ;;\n    NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)\n\techo nsr-tandem-nsk${UNAME_RELEASE}\n\texit 0 ;;\n    *:NonStop-UX:*:*)\n\techo mips-compaq-nonstopux\n\texit 0 ;;\n    BS2000:POSIX*:*:*)\n\techo bs2000-siemens-sysv\n\texit 0 ;;\n    DS/*:UNIX_System_V:*:*)\n\techo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}\n\texit 0 ;;\n    *:Plan9:*:*)\n\t# \"uname -m\" is not consistent, so use $cputype instead. 386\n\t# is converted to i386 for consistency with other x86\n\t# operating systems.\n\tif test \"$cputype\" = \"386\"; then\n\t    UNAME_MACHINE=i386\n\telse\n\t    UNAME_MACHINE=\"$cputype\"\n\tfi\n\techo ${UNAME_MACHINE}-unknown-plan9\n\texit 0 ;;\n    i*86:OS/2:*:*)\n\t# If we were able to find `uname', then EMX Unix compatibility\n\t# is probably installed.\n\techo ${UNAME_MACHINE}-pc-os2-emx\n\texit 0 ;;\n    *:TOPS-10:*:*)\n\techo pdp10-unknown-tops10\n\texit 0 ;;\n    *:TENEX:*:*)\n\techo pdp10-unknown-tenex\n\texit 0 ;;\n    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)\n\techo pdp10-dec-tops20\n\texit 0 ;;\n    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)\n\techo pdp10-xkl-tops20\n\texit 0 ;;\n    *:TOPS-20:*:*)\n\techo pdp10-unknown-tops20\n\texit 0 ;;\n    *:ITS:*:*)\n\techo pdp10-unknown-its\n\texit 0 ;;\n    i*86:XTS-300:*:STOP)\n\techo ${UNAME_MACHINE}-unknown-stop\n\texit 0 ;;\n    i*86:atheos:*:*)\n\techo ${UNAME_MACHINE}-unknown-atheos\n\texit 0 ;;\nesac\n\n#echo '(No uname command or uname output not recognized.)' 1>&2\n#echo \"${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}\" 1>&2\n\neval $set_cc_for_build\ncat >$dummy.c <<EOF\n#ifdef _SEQUENT_\n# include <sys/types.h>\n# include <sys/utsname.h>\n#endif\nmain ()\n{\n#if defined (sony)\n#if defined (MIPSEB)\n  /* BFD wants \"bsd\" instead of \"newsos\".  Perhaps BFD should be changed,\n     I don't know....  */\n  printf (\"mips-sony-bsd\\n\"); exit (0);\n#else\n#include <sys/param.h>\n  printf (\"m68k-sony-newsos%s\\n\",\n#ifdef NEWSOS4\n          \"4\"\n#else\n\t  \"\"\n#endif\n         ); exit (0);\n#endif\n#endif\n\n#if defined (__arm) && defined (__acorn) && defined (__unix)\n  printf (\"arm-acorn-riscix\"); exit (0);\n#endif\n\n#if defined (hp300) && !defined (hpux)\n  printf (\"m68k-hp-bsd\\n\"); exit (0);\n#endif\n\n#if defined (NeXT)\n#if !defined (__ARCHITECTURE__)\n#define __ARCHITECTURE__ \"m68k\"\n#endif\n  int version;\n  version=`(hostinfo | sed -n 's/.*NeXT Mach \\([0-9]*\\).*/\\1/p') 2>/dev/null`;\n  if (version < 4)\n    printf (\"%s-next-nextstep%d\\n\", __ARCHITECTURE__, version);\n  else\n    printf (\"%s-next-openstep%d\\n\", __ARCHITECTURE__, version);\n  exit (0);\n#endif\n\n#if defined (MULTIMAX) || defined (n16)\n#if defined (UMAXV)\n  printf (\"ns32k-encore-sysv\\n\"); exit (0);\n#else\n#if defined (CMU)\n  printf (\"ns32k-encore-mach\\n\"); exit (0);\n#else\n  printf (\"ns32k-encore-bsd\\n\"); exit (0);\n#endif\n#endif\n#endif\n\n#if defined (__386BSD__)\n  printf (\"i386-pc-bsd\\n\"); exit (0);\n#endif\n\n#if defined (sequent)\n#if defined (i386)\n  printf (\"i386-sequent-dynix\\n\"); exit (0);\n#endif\n#if defined (ns32000)\n  printf (\"ns32k-sequent-dynix\\n\"); exit (0);\n#endif\n#endif\n\n#if defined (_SEQUENT_)\n    struct utsname un;\n\n    uname(&un);\n\n    if (strncmp(un.version, \"V2\", 2) == 0) {\n\tprintf (\"i386-sequent-ptx2\\n\"); exit (0);\n    }\n    if (strncmp(un.version, \"V1\", 2) == 0) { /* XXX is V1 correct? */\n\tprintf (\"i386-sequent-ptx1\\n\"); exit (0);\n    }\n    printf (\"i386-sequent-ptx\\n\"); exit (0);\n\n#endif\n\n#if defined (vax)\n# if !defined (ultrix)\n#  include <sys/param.h>\n#  if defined (BSD)\n#   if BSD == 43\n      printf (\"vax-dec-bsd4.3\\n\"); exit (0);\n#   else\n#    if BSD == 199006\n      printf (\"vax-dec-bsd4.3reno\\n\"); exit (0);\n#    else\n      printf (\"vax-dec-bsd\\n\"); exit (0);\n#    endif\n#   endif\n#  else\n    printf (\"vax-dec-bsd\\n\"); exit (0);\n#  endif\n# else\n    printf (\"vax-dec-ultrix\\n\"); exit (0);\n# endif\n#endif\n\n#if defined (alliant) && defined (i860)\n  printf (\"i860-alliant-bsd\\n\"); exit (0);\n#endif\n\n  exit (1);\n}\nEOF\n\n$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0\nrm -f $dummy.c $dummy && rmdir $tmpdir\n\n# Apollos put the system type in the environment.\n\ntest -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }\n\n# Convex versions that predate uname can use getsysinfo(1)\n\nif [ -x /usr/convex/getsysinfo ]\nthen\n    case `getsysinfo -f cpu_type` in\n    c1*)\n\techo c1-convex-bsd\n\texit 0 ;;\n    c2*)\n\tif getsysinfo -f scalar_acc\n\tthen echo c32-convex-bsd\n\telse echo c2-convex-bsd\n\tfi\n\texit 0 ;;\n    c34*)\n\techo c34-convex-bsd\n\texit 0 ;;\n    c38*)\n\techo c38-convex-bsd\n\texit 0 ;;\n    c4*)\n\techo c4-convex-bsd\n\texit 0 ;;\n    esac\nfi\n\ncat >&2 <<EOF\n$0: unable to guess system type\n\nThis script, last modified $timestamp, has failed to recognize\nthe operating system you are using. It is advised that you\ndownload the most up to date version of the config scripts from\n\n    ftp://ftp.gnu.org/pub/gnu/config/\n\nIf the version you run ($0) is already up to date, please\nsend the following data and any information you think might be\npertinent to <config-patches@gnu.org> in order to provide the needed\ninformation to handle your system.\n\nconfig.guess timestamp = $timestamp\n\nuname -m = `(uname -m) 2>/dev/null || echo unknown`\nuname -r = `(uname -r) 2>/dev/null || echo unknown`\nuname -s = `(uname -s) 2>/dev/null || echo unknown`\nuname -v = `(uname -v) 2>/dev/null || echo unknown`\n\n/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`\n/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`\n\nhostinfo               = `(hostinfo) 2>/dev/null`\n/bin/universe          = `(/bin/universe) 2>/dev/null`\n/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`\n/bin/arch              = `(/bin/arch) 2>/dev/null`\n/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`\n/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`\n\nUNAME_MACHINE = ${UNAME_MACHINE}\nUNAME_RELEASE = ${UNAME_RELEASE}\nUNAME_SYSTEM  = ${UNAME_SYSTEM}\nUNAME_VERSION = ${UNAME_VERSION}\nEOF\n\nexit 1\n\n# Local variables:\n# eval: (add-hook 'write-file-hooks 'time-stamp)\n# time-stamp-start: \"timestamp='\"\n# time-stamp-format: \"%:y-%02m-%02d\"\n# time-stamp-end: \"'\"\n# End:\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/config.h.in",
    "content": "/* config.h.in -- template for config.h\t\t\t-*- C -*-\n *\n *   Copyright (C) 1996-2007 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a copy\n *   of this software and associated documentation files (the \"Software\"), to deal\n *   in the Software without restriction, including without limitation the rights\n *   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n *   copies of the Software, and to permit persons to whom the Software is\n *   furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n *   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n *   SOFTWARE.\n */\n\n/* Author: Ian.Piumarta@squeakland.org\n *\n * Last edited: 2006-04-23 12:34:41 by piumarta on emilia.local\n */\n\n#ifndef __sq_config_h\n#define __sq_config_h\n\n/* explicit image width */\n\n#undef\tHAVE_INTERP_H\n\n/* package options */\n\n#undef\tUSE_X11\n#undef\tUSE_X11_GLX\n#undef\tUSE_QUARTZ\n#undef\tUSE_QUARTZ_CGL\n#undef\tUSE_RFB\n\n/* libraries */\n\n#undef\tHAVE_LIBX11\n#undef\tHAVE_LIBXEXT\n#undef\tHAVE_LIBDL\n#undef\tHAVE_DYLD\n#undef\tHAVE_LIBFFI\n#undef\tHAVE_ICONV\n\n#undef\tUSE_AUDIO_NONE\n#undef\tUSE_AUDIO_SUN\n#undef\tUSE_AUDIO_NAS\n#undef\tUSE_AUDIO_OSS\n#undef\tUSE_AUDIO_MACOSX\n#undef\tOSS_DEVICE\n\n/* header files */\n\n#undef\tHAVE_UNISTD_H\n#undef\tNEED_GETHOSTNAME_P\n\n#undef\tHAVE_DIRENT_H\n#undef\tHAVE_SYS_NDIR_H\n#undef\tHAVE_SYS_DIR_H\n#undef\tHAVE_NDIR_H\n#undef\tHAVE_DLFCN_H\n#undef\tHAVE_ICONV_H\n\n#undef\tHAVE_SYS_TIME_H\n#undef\tTIME_WITH_SYS_TIME\n\n#undef\tHAVE_SYS_FILIO_H\n\n#undef\tHAVE_SYS_AUDIOIO_H\n#undef\tHAVE_SUN_AUDIOIO_H\n\n#undef\tHAVE_PTY_H\n#undef\tHAVE_UTIL_H\n#undef\tHAVE_LIBUTIL_H\n#undef\tHAVE_STROPTS_H\n\n#undef\tHAVE_GL_GL_H\n#undef\tHAVE_OPENGL_GL_H\n\n#undef\tNEED_SUNOS_H\n\n/* system calls/library functions */\n\n#undef\tAT_EXIT\n\n#undef\tHAVE_TZSET\n\n#undef\tHAVE_OPENPTY\n#undef\tHAVE_UNIX98_PTYS\n\n#undef\tHAVE_SNPRINTF\n#undef\tHAVE___SNPRINTF\n\n#undef\tHAVE_MMAP\n\n#undef\tHAVE_DYLD\n\n#undef\tHAVE_LANGINFO_CODESET\n\n#undef\tHAVE_ALLOCA\n#undef\tHAVE_ALLOCA_H\n\n#undef\tHAVE_UNSETENV\n\n#undef\tHAVE_NANOSLEEP\n\n/* widths of primitive types */\n\n#undef\tSIZEOF_INT\n#undef\tSIZEOF_LONG\n#undef\tSIZEOF_LONG_LONG\n#undef\tSIZEOF_VOID_P\n\n/* structures */\n\n#undef\tHAVE_TM_GMTOFF\n#undef\tHAVE_TIMEZONE\n\n/* typedefs */\n\n#undef\tsize_t\n#undef\tsocklen_t\n\n#undef\tsqueakInt64\n\n/* architecture */\n\n#undef\tOS_TYPE\n\n#undef\tVM_HOST\n#undef\tVM_HOST_CPU\n#undef\tVM_HOST_VENDOR\n#undef\tVM_HOST_OS\n#undef\tVM_BUILD_STRING\n\n#undef\tWORDS_BIGENDIAN\n#undef\tDOUBLE_WORD_ALIGNMENT\n\n/* damage containment */\n\n#undef\tDARWIN\n\n#ifdef NEED_SUNOS_H\n# include \"sunos.h\"\n#endif\n\n/* other configured variables */\n\n#undef SQ_VERSION\n#undef VM_VERSION\n#undef VM_MODULE_PREFIX\n#undef VM_DLSYM_PREFIX\n#undef VM_X11DIR\n\n/* avoid dependencies on glibc2.3 */\n\n#undef HAVE_FEATURES_H\n\n#if defined(HAVE_FEATURES_H)\n# include \"glibc.h\"\n#endif\n\n#endif /* __sq_config_h */\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/config.sub",
    "content": "#! /bin/sh\n# Configuration validation subroutine script.\n#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,\n#   2000, 2001, 2002 Free Software Foundation, Inc.\n\ntimestamp='2002-09-05'\n\n# This file is (in principle) common to ALL GNU software.\n# The presence of a machine in this file suggests that SOME GNU software\n# can handle that machine.  It does not imply ALL GNU software can.\n#\n# This file is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 59 Temple Place - Suite 330,\n# Boston, MA 02111-1307, USA.\n\n# As a special exception to the GNU General Public License, if you\n# distribute this file as part of a program that contains a\n# configuration script generated by Autoconf, you may include it under\n# the same distribution terms that you use for the rest of that program.\n\n# Please send patches to <config-patches@gnu.org>.  Submit a context\n# diff and a properly formatted ChangeLog entry.\n#\n# Configuration subroutine to validate and canonicalize a configuration type.\n# Supply the specified configuration type as an argument.\n# If it is invalid, we print an error message on stderr and exit with code 1.\n# Otherwise, we print the canonical config type on stdout and succeed.\n\n# This file is supposed to be the same for all GNU packages\n# and recognize all the CPU types, system types and aliases\n# that are meaningful with *any* GNU software.\n# Each package is responsible for reporting which valid configurations\n# it does not support.  The user should be able to distinguish\n# a failure to support a valid configuration from a meaningless\n# configuration.\n\n# The goal of this file is to map all the various variations of a given\n# machine specification into a single specification in the form:\n#\tCPU_TYPE-MANUFACTURER-OPERATING_SYSTEM\n# or in some cases, the newer four-part form:\n#\tCPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM\n# It is wrong to echo any other type of specification.\n\nme=`echo \"$0\" | sed -e 's,.*/,,'`\n\nusage=\"\\\nUsage: $0 [OPTION] CPU-MFR-OPSYS\n       $0 [OPTION] ALIAS\n\nCanonicalize a configuration name.\n\nOperation modes:\n  -h, --help         print this help, then exit\n  -t, --time-stamp   print date of last modification, then exit\n  -v, --version      print version number, then exit\n\nReport bugs and patches to <config-patches@gnu.org>.\"\n\nversion=\"\\\nGNU config.sub ($timestamp)\n\nCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001\nFree Software Foundation, Inc.\n\nThis is free software; see the source for copying conditions.  There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\"\n\nhelp=\"\nTry \\`$me --help' for more information.\"\n\n# Parse command line\nwhile test $# -gt 0 ; do\n  case $1 in\n    --time-stamp | --time* | -t )\n       echo \"$timestamp\" ; exit 0 ;;\n    --version | -v )\n       echo \"$version\" ; exit 0 ;;\n    --help | --h* | -h )\n       echo \"$usage\"; exit 0 ;;\n    -- )     # Stop option processing\n       shift; break ;;\n    - )\t# Use stdin as input.\n       break ;;\n    -* )\n       echo \"$me: invalid option $1$help\"\n       exit 1 ;;\n\n    *local*)\n       # First pass through any local machine types.\n       echo $1\n       exit 0;;\n\n    * )\n       break ;;\n  esac\ndone\n\ncase $# in\n 0) echo \"$me: missing argument$help\" >&2\n    exit 1;;\n 1) ;;\n *) echo \"$me: too many arguments$help\" >&2\n    exit 1;;\nesac\n\n# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).\n# Here we must recognize all the valid KERNEL-OS combinations.\nmaybe_os=`echo $1 | sed 's/^\\(.*\\)-\\([^-]*-[^-]*\\)$/\\2/'`\ncase $maybe_os in\n  nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)\n    os=-$maybe_os\n    basic_machine=`echo $1 | sed 's/^\\(.*\\)-\\([^-]*-[^-]*\\)$/\\1/'`\n    ;;\n  *)\n    basic_machine=`echo $1 | sed 's/-[^-]*$//'`\n    if [ $basic_machine != $1 ]\n    then os=`echo $1 | sed 's/.*-/-/'`\n    else os=; fi\n    ;;\nesac\n\n### Let's recognize common machines as not being operating systems so\n### that things like config.sub decstation-3100 work.  We also\n### recognize some manufacturers as not being operating systems, so we\n### can provide default operating systems below.\ncase $os in\n\t-sun*os*)\n\t\t# Prevent following clause from handling this invalid input.\n\t\t;;\n\t-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \\\n\t-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \\\n\t-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \\\n\t-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\\\n\t-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \\\n\t-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \\\n\t-apple | -axis)\n\t\tos=\n\t\tbasic_machine=$1\n\t\t;;\n\t-sim | -cisco | -oki | -wec | -winbond)\n\t\tos=\n\t\tbasic_machine=$1\n\t\t;;\n\t-scout)\n\t\t;;\n\t-wrs)\n\t\tos=-vxworks\n\t\tbasic_machine=$1\n\t\t;;\n\t-chorusos*)\n\t\tos=-chorusos\n\t\tbasic_machine=$1\n\t\t;;\n \t-chorusrdb)\n \t\tos=-chorusrdb\n\t\tbasic_machine=$1\n \t\t;;\n\t-hiux*)\n\t\tos=-hiuxwe2\n\t\t;;\n\t-sco5)\n\t\tos=-sco3.2v5\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-sco4)\n\t\tos=-sco3.2v4\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-sco3.2.[4-9]*)\n\t\tos=`echo $os | sed -e 's/sco3.2./sco3.2v/'`\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-sco3.2v[4-9]*)\n\t\t# Don't forget version if it is 3.2v4 or newer.\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-sco*)\n\t\tos=-sco3.2v2\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-udk*)\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-isc)\n\t\tos=-isc2.2\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-clix*)\n\t\tbasic_machine=clipper-intergraph\n\t\t;;\n\t-isc*)\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`\n\t\t;;\n\t-lynx*)\n\t\tos=-lynxos\n\t\t;;\n\t-ptx*)\n\t\tbasic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`\n\t\t;;\n\t-windowsnt*)\n\t\tos=`echo $os | sed -e 's/windowsnt/winnt/'`\n\t\t;;\n\t-psos*)\n\t\tos=-psos\n\t\t;;\n\t-mint | -mint[0-9]*)\n\t\tbasic_machine=m68k-atari\n\t\tos=-mint\n\t\t;;\nesac\n\n# Decode aliases for certain CPU-COMPANY combinations.\ncase $basic_machine in\n\t# Recognize the basic CPU types without company name.\n\t# Some are omitted here because they have special meanings below.\n\t1750a | 580 \\\n\t| a29k \\\n\t| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \\\n\t| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \\\n\t| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \\\n\t| clipper \\\n\t| d10v | d30v | dlx | dsp16xx \\\n\t| fr30 | frv \\\n\t| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \\\n\t| i370 | i860 | i960 | ia64 \\\n\t| ip2k \\\n\t| m32r | m68000 | m68k | m88k | mcore \\\n\t| mips | mipsbe | mipseb | mipsel | mipsle \\\n\t| mips16 \\\n\t| mips64 | mips64el \\\n\t| mips64vr | mips64vrel \\\n\t| mips64orion | mips64orionel \\\n\t| mips64vr4100 | mips64vr4100el \\\n\t| mips64vr4300 | mips64vr4300el \\\n\t| mips64vr5000 | mips64vr5000el \\\n\t| mipsisa32 | mipsisa32el \\\n\t| mipsisa64 | mipsisa64el \\\n\t| mipsisa64sb1 | mipsisa64sb1el \\\n\t| mipsisa64sr71k | mipsisa64sr71kel \\\n\t| mipstx39 | mipstx39el \\\n\t| mn10200 | mn10300 \\\n\t| ns16k | ns32k \\\n\t| openrisc | or32 \\\n\t| pdp10 | pdp11 | pj | pjl \\\n\t| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \\\n\t| pyramid \\\n\t| sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \\\n\t| sh64 | sh64le \\\n\t| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \\\n\t| strongarm \\\n\t| tahoe | thumb | tic80 | tron \\\n\t| v850 | v850e \\\n\t| we32k \\\n\t| x86 | xscale | xstormy16 | xtensa \\\n\t| z8k)\n\t\tbasic_machine=$basic_machine-unknown\n\t\t;;\n\tm6811 | m68hc11 | m6812 | m68hc12)\n\t\t# Motorola 68HC11/12.\n\t\tbasic_machine=$basic_machine-unknown\n\t\tos=-none\n\t\t;;\n\tm88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)\n\t\t;;\n\n\t# We use `pc' rather than `unknown'\n\t# because (1) that's what they normally are, and\n\t# (2) the word \"unknown\" tends to confuse beginning users.\n\ti*86 | x86_64)\n\t  basic_machine=$basic_machine-pc\n\t  ;;\n\t# Object if more than one company name word.\n\t*-*-*)\n\t\techo Invalid configuration \\`$1\\': machine \\`$basic_machine\\' not recognized 1>&2\n\t\texit 1\n\t\t;;\n\t# Recognize the basic CPU types with company name.\n\t580-* \\\n\t| a29k-* \\\n\t| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \\\n\t| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \\\n\t| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \\\n\t| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \\\n\t| avr-* \\\n\t| bs2000-* \\\n\t| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \\\n\t| clipper-* | cydra-* \\\n\t| d10v-* | d30v-* | dlx-* \\\n\t| elxsi-* \\\n\t| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \\\n\t| h8300-* | h8500-* \\\n\t| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \\\n\t| i*86-* | i860-* | i960-* | ia64-* \\\n\t| ip2k-* \\\n\t| m32r-* \\\n\t| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \\\n\t| m88110-* | m88k-* | mcore-* \\\n\t| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \\\n\t| mips16-* \\\n\t| mips64-* | mips64el-* \\\n\t| mips64vr-* | mips64vrel-* \\\n\t| mips64orion-* | mips64orionel-* \\\n\t| mips64vr4100-* | mips64vr4100el-* \\\n\t| mips64vr4300-* | mips64vr4300el-* \\\n\t| mips64vr5000-* | mips64vr5000el-* \\\n\t| mipsisa32-* | mipsisa32el-* \\\n\t| mipsisa64-* | mipsisa64el-* \\\n\t| mipsisa64sb1-* | mipsisa64sb1el-* \\\n\t| mipsisa64sr71k-* | mipsisa64sr71kel-* \\\n\t| mipstx39 | mipstx39el \\\n\t| none-* | np1-* | ns16k-* | ns32k-* \\\n\t| orion-* \\\n\t| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \\\n\t| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \\\n\t| pyramid-* \\\n\t| romp-* | rs6000-* \\\n\t| sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \\\n\t| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \\\n\t| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \\\n\t| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \\\n\t| tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \\\n\t| v850-* | v850e-* | vax-* \\\n\t| we32k-* \\\n\t| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \\\n\t| xtensa-* \\\n\t| ymp-* \\\n\t| z8k-*)\n\t\t;;\n\t# Recognize the various machine names and aliases which stand\n\t# for a CPU type and a company and sometimes even an OS.\n\t386bsd)\n\t\tbasic_machine=i386-unknown\n\t\tos=-bsd\n\t\t;;\n\t3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)\n\t\tbasic_machine=m68000-att\n\t\t;;\n\t3b*)\n\t\tbasic_machine=we32k-att\n\t\t;;\n\ta29khif)\n\t\tbasic_machine=a29k-amd\n\t\tos=-udi\n\t\t;;\n\tadobe68k)\n\t\tbasic_machine=m68010-adobe\n\t\tos=-scout\n\t\t;;\n\talliant | fx80)\n\t\tbasic_machine=fx80-alliant\n\t\t;;\n\taltos | altos3068)\n\t\tbasic_machine=m68k-altos\n\t\t;;\n\tam29k)\n\t\tbasic_machine=a29k-none\n\t\tos=-bsd\n\t\t;;\n\tamdahl)\n\t\tbasic_machine=580-amdahl\n\t\tos=-sysv\n\t\t;;\n\tamiga | amiga-*)\n\t\tbasic_machine=m68k-unknown\n\t\t;;\n\tamigaos | amigados)\n\t\tbasic_machine=m68k-unknown\n\t\tos=-amigaos\n\t\t;;\n\tamigaunix | amix)\n\t\tbasic_machine=m68k-unknown\n\t\tos=-sysv4\n\t\t;;\n\tapollo68)\n\t\tbasic_machine=m68k-apollo\n\t\tos=-sysv\n\t\t;;\n\tapollo68bsd)\n\t\tbasic_machine=m68k-apollo\n\t\tos=-bsd\n\t\t;;\n\taux)\n\t\tbasic_machine=m68k-apple\n\t\tos=-aux\n\t\t;;\n\tbalance)\n\t\tbasic_machine=ns32k-sequent\n\t\tos=-dynix\n\t\t;;\n\tc90)\n\t\tbasic_machine=c90-cray\n\t\tos=-unicos\n\t\t;;\n\tconvex-c1)\n\t\tbasic_machine=c1-convex\n\t\tos=-bsd\n\t\t;;\n\tconvex-c2)\n\t\tbasic_machine=c2-convex\n\t\tos=-bsd\n\t\t;;\n\tconvex-c32)\n\t\tbasic_machine=c32-convex\n\t\tos=-bsd\n\t\t;;\n\tconvex-c34)\n\t\tbasic_machine=c34-convex\n\t\tos=-bsd\n\t\t;;\n\tconvex-c38)\n\t\tbasic_machine=c38-convex\n\t\tos=-bsd\n\t\t;;\n\tcray | j90)\n\t\tbasic_machine=j90-cray\n\t\tos=-unicos\n\t\t;;\n\tcrds | unos)\n\t\tbasic_machine=m68k-crds\n\t\t;;\n\tcris | cris-* | etrax*)\n\t\tbasic_machine=cris-axis\n\t\t;;\n\tda30 | da30-*)\n\t\tbasic_machine=m68k-da30\n\t\t;;\n\tdecstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)\n\t\tbasic_machine=mips-dec\n\t\t;;\n\tdecsystem10* | dec10*)\n\t\tbasic_machine=pdp10-dec\n\t\tos=-tops10\n\t\t;;\n\tdecsystem20* | dec20*)\n\t\tbasic_machine=pdp10-dec\n\t\tos=-tops20\n\t\t;;\n\tdelta | 3300 | motorola-3300 | motorola-delta \\\n\t      | 3300-motorola | delta-motorola)\n\t\tbasic_machine=m68k-motorola\n\t\t;;\n\tdelta88)\n\t\tbasic_machine=m88k-motorola\n\t\tos=-sysv3\n\t\t;;\n\tdpx20 | dpx20-*)\n\t\tbasic_machine=rs6000-bull\n\t\tos=-bosx\n\t\t;;\n\tdpx2* | dpx2*-bull)\n\t\tbasic_machine=m68k-bull\n\t\tos=-sysv3\n\t\t;;\n\tebmon29k)\n\t\tbasic_machine=a29k-amd\n\t\tos=-ebmon\n\t\t;;\n\telxsi)\n\t\tbasic_machine=elxsi-elxsi\n\t\tos=-bsd\n\t\t;;\n\tencore | umax | mmax)\n\t\tbasic_machine=ns32k-encore\n\t\t;;\n\tes1800 | OSE68k | ose68k | ose | OSE)\n\t\tbasic_machine=m68k-ericsson\n\t\tos=-ose\n\t\t;;\n\tfx2800)\n\t\tbasic_machine=i860-alliant\n\t\t;;\n\tgenix)\n\t\tbasic_machine=ns32k-ns\n\t\t;;\n\tgmicro)\n\t\tbasic_machine=tron-gmicro\n\t\tos=-sysv\n\t\t;;\n\tgo32)\n\t\tbasic_machine=i386-pc\n\t\tos=-go32\n\t\t;;\n\th3050r* | hiux*)\n\t\tbasic_machine=hppa1.1-hitachi\n\t\tos=-hiuxwe2\n\t\t;;\n\th8300hms)\n\t\tbasic_machine=h8300-hitachi\n\t\tos=-hms\n\t\t;;\n\th8300xray)\n\t\tbasic_machine=h8300-hitachi\n\t\tos=-xray\n\t\t;;\n\th8500hms)\n\t\tbasic_machine=h8500-hitachi\n\t\tos=-hms\n\t\t;;\n\tharris)\n\t\tbasic_machine=m88k-harris\n\t\tos=-sysv3\n\t\t;;\n\thp300-*)\n\t\tbasic_machine=m68k-hp\n\t\t;;\n\thp300bsd)\n\t\tbasic_machine=m68k-hp\n\t\tos=-bsd\n\t\t;;\n\thp300hpux)\n\t\tbasic_machine=m68k-hp\n\t\tos=-hpux\n\t\t;;\n\thp3k9[0-9][0-9] | hp9[0-9][0-9])\n\t\tbasic_machine=hppa1.0-hp\n\t\t;;\n\thp9k2[0-9][0-9] | hp9k31[0-9])\n\t\tbasic_machine=m68000-hp\n\t\t;;\n\thp9k3[2-9][0-9])\n\t\tbasic_machine=m68k-hp\n\t\t;;\n\thp9k6[0-9][0-9] | hp6[0-9][0-9])\n\t\tbasic_machine=hppa1.0-hp\n\t\t;;\n\thp9k7[0-79][0-9] | hp7[0-79][0-9])\n\t\tbasic_machine=hppa1.1-hp\n\t\t;;\n\thp9k78[0-9] | hp78[0-9])\n\t\t# FIXME: really hppa2.0-hp\n\t\tbasic_machine=hppa1.1-hp\n\t\t;;\n\thp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)\n\t\t# FIXME: really hppa2.0-hp\n\t\tbasic_machine=hppa1.1-hp\n\t\t;;\n\thp9k8[0-9][13679] | hp8[0-9][13679])\n\t\tbasic_machine=hppa1.1-hp\n\t\t;;\n\thp9k8[0-9][0-9] | hp8[0-9][0-9])\n\t\tbasic_machine=hppa1.0-hp\n\t\t;;\n\thppa-next)\n\t\tos=-nextstep3\n\t\t;;\n\thppaosf)\n\t\tbasic_machine=hppa1.1-hp\n\t\tos=-osf\n\t\t;;\n\thppro)\n\t\tbasic_machine=hppa1.1-hp\n\t\tos=-proelf\n\t\t;;\n\ti370-ibm* | ibm*)\n\t\tbasic_machine=i370-ibm\n\t\t;;\n# I'm not sure what \"Sysv32\" means.  Should this be sysv3.2?\n\ti*86v32)\n\t\tbasic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`\n\t\tos=-sysv32\n\t\t;;\n\ti*86v4*)\n\t\tbasic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`\n\t\tos=-sysv4\n\t\t;;\n\ti*86v)\n\t\tbasic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`\n\t\tos=-sysv\n\t\t;;\n\ti*86sol2)\n\t\tbasic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`\n\t\tos=-solaris2\n\t\t;;\n\ti386mach)\n\t\tbasic_machine=i386-mach\n\t\tos=-mach\n\t\t;;\n\ti386-vsta | vsta)\n\t\tbasic_machine=i386-unknown\n\t\tos=-vsta\n\t\t;;\n\tiris | iris4d)\n\t\tbasic_machine=mips-sgi\n\t\tcase $os in\n\t\t    -irix*)\n\t\t\t;;\n\t\t    *)\n\t\t\tos=-irix4\n\t\t\t;;\n\t\tesac\n\t\t;;\n\tisi68 | isi)\n\t\tbasic_machine=m68k-isi\n\t\tos=-sysv\n\t\t;;\n\tm88k-omron*)\n\t\tbasic_machine=m88k-omron\n\t\t;;\n\tmagnum | m3230)\n\t\tbasic_machine=mips-mips\n\t\tos=-sysv\n\t\t;;\n\tmerlin)\n\t\tbasic_machine=ns32k-utek\n\t\tos=-sysv\n\t\t;;\n\tmingw32)\n\t\tbasic_machine=i386-pc\n\t\tos=-mingw32\n\t\t;;\n\tminiframe)\n\t\tbasic_machine=m68000-convergent\n\t\t;;\n\t*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)\n\t\tbasic_machine=m68k-atari\n\t\tos=-mint\n\t\t;;\n\tmips3*-*)\n\t\tbasic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`\n\t\t;;\n\tmips3*)\n\t\tbasic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown\n\t\t;;\n\tmmix*)\n\t\tbasic_machine=mmix-knuth\n\t\tos=-mmixware\n\t\t;;\n\tmonitor)\n\t\tbasic_machine=m68k-rom68k\n\t\tos=-coff\n\t\t;;\n\tmorphos)\n\t\tbasic_machine=powerpc-unknown\n\t\tos=-morphos\n\t\t;;\n\tmsdos)\n\t\tbasic_machine=i386-pc\n\t\tos=-msdos\n\t\t;;\n\tmvs)\n\t\tbasic_machine=i370-ibm\n\t\tos=-mvs\n\t\t;;\n\tncr3000)\n\t\tbasic_machine=i486-ncr\n\t\tos=-sysv4\n\t\t;;\n\tnetbsd386)\n\t\tbasic_machine=i386-unknown\n\t\tos=-netbsd\n\t\t;;\n\tnetwinder)\n\t\tbasic_machine=armv4l-rebel\n\t\tos=-linux\n\t\t;;\n\tnews | news700 | news800 | news900)\n\t\tbasic_machine=m68k-sony\n\t\tos=-newsos\n\t\t;;\n\tnews1000)\n\t\tbasic_machine=m68030-sony\n\t\tos=-newsos\n\t\t;;\n\tnews-3600 | risc-news)\n\t\tbasic_machine=mips-sony\n\t\tos=-newsos\n\t\t;;\n\tnecv70)\n\t\tbasic_machine=v70-nec\n\t\tos=-sysv\n\t\t;;\n\tnext | m*-next )\n\t\tbasic_machine=m68k-next\n\t\tcase $os in\n\t\t    -nextstep* )\n\t\t\t;;\n\t\t    -ns2*)\n\t\t      os=-nextstep2\n\t\t\t;;\n\t\t    *)\n\t\t      os=-nextstep3\n\t\t\t;;\n\t\tesac\n\t\t;;\n\tnh3000)\n\t\tbasic_machine=m68k-harris\n\t\tos=-cxux\n\t\t;;\n\tnh[45]000)\n\t\tbasic_machine=m88k-harris\n\t\tos=-cxux\n\t\t;;\n\tnindy960)\n\t\tbasic_machine=i960-intel\n\t\tos=-nindy\n\t\t;;\n\tmon960)\n\t\tbasic_machine=i960-intel\n\t\tos=-mon960\n\t\t;;\n\tnonstopux)\n\t\tbasic_machine=mips-compaq\n\t\tos=-nonstopux\n\t\t;;\n\tnp1)\n\t\tbasic_machine=np1-gould\n\t\t;;\n\tnsr-tandem)\n\t\tbasic_machine=nsr-tandem\n\t\t;;\n\top50n-* | op60c-*)\n\t\tbasic_machine=hppa1.1-oki\n\t\tos=-proelf\n\t\t;;\n\tor32 | or32-*)\n\t\tbasic_machine=or32-unknown\n\t\tos=-coff\n\t\t;;\n\tOSE68000 | ose68000)\n\t\tbasic_machine=m68000-ericsson\n\t\tos=-ose\n\t\t;;\n\tos68k)\n\t\tbasic_machine=m68k-none\n\t\tos=-os68k\n\t\t;;\n\tpa-hitachi)\n\t\tbasic_machine=hppa1.1-hitachi\n\t\tos=-hiuxwe2\n\t\t;;\n\tparagon)\n\t\tbasic_machine=i860-intel\n\t\tos=-osf\n\t\t;;\n\tpbd)\n\t\tbasic_machine=sparc-tti\n\t\t;;\n\tpbb)\n\t\tbasic_machine=m68k-tti\n\t\t;;\n\tpc532 | pc532-*)\n\t\tbasic_machine=ns32k-pc532\n\t\t;;\n\tpentium | p5 | k5 | k6 | nexgen | viac3)\n\t\tbasic_machine=i586-pc\n\t\t;;\n\tpentiumpro | p6 | 6x86 | athlon | athlon_*)\n\t\tbasic_machine=i686-pc\n\t\t;;\n\tpentiumii | pentium2)\n\t\tbasic_machine=i686-pc\n\t\t;;\n\tpentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)\n\t\tbasic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tpentiumpro-* | p6-* | 6x86-* | athlon-*)\n\t\tbasic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tpentiumii-* | pentium2-*)\n\t\tbasic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tpn)\n\t\tbasic_machine=pn-gould\n\t\t;;\n\tpower)\tbasic_machine=power-ibm\n\t\t;;\n\tppc)\tbasic_machine=powerpc-unknown\n\t\t;;\n\tppc-*)\tbasic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tppcle | powerpclittle | ppc-le | powerpc-little)\n\t\tbasic_machine=powerpcle-unknown\n\t\t;;\n\tppcle-* | powerpclittle-*)\n\t\tbasic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tppc64)\tbasic_machine=powerpc64-unknown\n\t\t;;\n\tppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tppc64le | powerpc64little | ppc64-le | powerpc64-little)\n\t\tbasic_machine=powerpc64le-unknown\n\t\t;;\n\tppc64le-* | powerpc64little-*)\n\t\tbasic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`\n\t\t;;\n\tps2)\n\t\tbasic_machine=i386-ibm\n\t\t;;\n\tpw32)\n\t\tbasic_machine=i586-unknown\n\t\tos=-pw32\n\t\t;;\n\trom68k)\n\t\tbasic_machine=m68k-rom68k\n\t\tos=-coff\n\t\t;;\n\trm[46]00)\n\t\tbasic_machine=mips-siemens\n\t\t;;\n\trtpc | rtpc-*)\n\t\tbasic_machine=romp-ibm\n\t\t;;\n\ts390 | s390-*)\n\t\tbasic_machine=s390-ibm\n\t\t;;\n\ts390x | s390x-*)\n\t\tbasic_machine=s390x-ibm\n\t\t;;\n\tsa29200)\n\t\tbasic_machine=a29k-amd\n\t\tos=-udi\n\t\t;;\n\tsb1)\n\t\tbasic_machine=mipsisa64sb1-unknown\n\t\t;;\n\tsb1el)\n\t\tbasic_machine=mipsisa64sb1el-unknown\n\t\t;;\n\tsequent)\n\t\tbasic_machine=i386-sequent\n\t\t;;\n\tsh)\n\t\tbasic_machine=sh-hitachi\n\t\tos=-hms\n\t\t;;\n\tsparclite-wrs | simso-wrs)\n\t\tbasic_machine=sparclite-wrs\n\t\tos=-vxworks\n\t\t;;\n\tsps7)\n\t\tbasic_machine=m68k-bull\n\t\tos=-sysv2\n\t\t;;\n\tspur)\n\t\tbasic_machine=spur-unknown\n\t\t;;\n\tst2000)\n\t\tbasic_machine=m68k-tandem\n\t\t;;\n\tstratus)\n\t\tbasic_machine=i860-stratus\n\t\tos=-sysv4\n\t\t;;\n\tsun2)\n\t\tbasic_machine=m68000-sun\n\t\t;;\n\tsun2os3)\n\t\tbasic_machine=m68000-sun\n\t\tos=-sunos3\n\t\t;;\n\tsun2os4)\n\t\tbasic_machine=m68000-sun\n\t\tos=-sunos4\n\t\t;;\n\tsun3os3)\n\t\tbasic_machine=m68k-sun\n\t\tos=-sunos3\n\t\t;;\n\tsun3os4)\n\t\tbasic_machine=m68k-sun\n\t\tos=-sunos4\n\t\t;;\n\tsun4os3)\n\t\tbasic_machine=sparc-sun\n\t\tos=-sunos3\n\t\t;;\n\tsun4os4)\n\t\tbasic_machine=sparc-sun\n\t\tos=-sunos4\n\t\t;;\n\tsun4sol2)\n\t\tbasic_machine=sparc-sun\n\t\tos=-solaris2\n\t\t;;\n\tsun3 | sun3-*)\n\t\tbasic_machine=m68k-sun\n\t\t;;\n\tsun4)\n\t\tbasic_machine=sparc-sun\n\t\t;;\n\tsun386 | sun386i | roadrunner)\n\t\tbasic_machine=i386-sun\n\t\t;;\n\tsv1)\n\t\tbasic_machine=sv1-cray\n\t\tos=-unicos\n\t\t;;\n\tsymmetry)\n\t\tbasic_machine=i386-sequent\n\t\tos=-dynix\n\t\t;;\n\tt3d)\n\t\tbasic_machine=alpha-cray\n\t\tos=-unicos\n\t\t;;\n\tt3e)\n\t\tbasic_machine=alphaev5-cray\n\t\tos=-unicos\n\t\t;;\n\tt90)\n\t\tbasic_machine=t90-cray\n\t\tos=-unicos\n\t\t;;\n        tic4x | c4x*)\n\t\tbasic_machine=tic4x-unknown\n\t\tos=-coff\n\t\t;;\n\ttic54x | c54x*)\n\t\tbasic_machine=tic54x-unknown\n\t\tos=-coff\n\t\t;;\n\ttx39)\n\t\tbasic_machine=mipstx39-unknown\n\t\t;;\n\ttx39el)\n\t\tbasic_machine=mipstx39el-unknown\n\t\t;;\n\ttoad1)\n\t\tbasic_machine=pdp10-xkl\n\t\tos=-tops20\n\t\t;;\n\ttower | tower-32)\n\t\tbasic_machine=m68k-ncr\n\t\t;;\n\tudi29k)\n\t\tbasic_machine=a29k-amd\n\t\tos=-udi\n\t\t;;\n\tultra3)\n\t\tbasic_machine=a29k-nyu\n\t\tos=-sym1\n\t\t;;\n\tv810 | necv810)\n\t\tbasic_machine=v810-nec\n\t\tos=-none\n\t\t;;\n\tvaxv)\n\t\tbasic_machine=vax-dec\n\t\tos=-sysv\n\t\t;;\n\tvms)\n\t\tbasic_machine=vax-dec\n\t\tos=-vms\n\t\t;;\n\tvpp*|vx|vx-*)\n\t\tbasic_machine=f301-fujitsu\n\t\t;;\n\tvxworks960)\n\t\tbasic_machine=i960-wrs\n\t\tos=-vxworks\n\t\t;;\n\tvxworks68)\n\t\tbasic_machine=m68k-wrs\n\t\tos=-vxworks\n\t\t;;\n\tvxworks29k)\n\t\tbasic_machine=a29k-wrs\n\t\tos=-vxworks\n\t\t;;\n\tw65*)\n\t\tbasic_machine=w65-wdc\n\t\tos=-none\n\t\t;;\n\tw89k-*)\n\t\tbasic_machine=hppa1.1-winbond\n\t\tos=-proelf\n\t\t;;\n\twindows32)\n\t\tbasic_machine=i386-pc\n\t\tos=-windows32-msvcrt\n\t\t;;\n\txps | xps100)\n\t\tbasic_machine=xps100-honeywell\n\t\t;;\n\tymp)\n\t\tbasic_machine=ymp-cray\n\t\tos=-unicos\n\t\t;;\n\tz8k-*-coff)\n\t\tbasic_machine=z8k-unknown\n\t\tos=-sim\n\t\t;;\n\tnone)\n\t\tbasic_machine=none-none\n\t\tos=-none\n\t\t;;\n\n# Here we handle the default manufacturer of certain CPU types.  It is in\n# some cases the only manufacturer, in others, it is the most popular.\n\tw89k)\n\t\tbasic_machine=hppa1.1-winbond\n\t\t;;\n\top50n)\n\t\tbasic_machine=hppa1.1-oki\n\t\t;;\n\top60c)\n\t\tbasic_machine=hppa1.1-oki\n\t\t;;\n\tromp)\n\t\tbasic_machine=romp-ibm\n\t\t;;\n\trs6000)\n\t\tbasic_machine=rs6000-ibm\n\t\t;;\n\tvax)\n\t\tbasic_machine=vax-dec\n\t\t;;\n\tpdp10)\n\t\t# there are many clones, so DEC is not a safe bet\n\t\tbasic_machine=pdp10-unknown\n\t\t;;\n\tpdp11)\n\t\tbasic_machine=pdp11-dec\n\t\t;;\n\twe32k)\n\t\tbasic_machine=we32k-att\n\t\t;;\n\tsh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele)\n\t\tbasic_machine=sh-unknown\n\t\t;;\n\tsh64)\n\t\tbasic_machine=sh64-unknown\n\t\t;;\n\tsparc | sparcv9 | sparcv9b)\n\t\tbasic_machine=sparc-sun\n\t\t;;\n\tcydra)\n\t\tbasic_machine=cydra-cydrome\n\t\t;;\n\torion)\n\t\tbasic_machine=orion-highlevel\n\t\t;;\n\torion105)\n\t\tbasic_machine=clipper-highlevel\n\t\t;;\n\tmac | mpw | mac-mpw)\n\t\tbasic_machine=m68k-apple\n\t\t;;\n\tpmac | pmac-mpw)\n\t\tbasic_machine=powerpc-apple\n\t\t;;\n\t*-unknown)\n\t\t# Make sure to match an already-canonicalized machine name.\n\t\t;;\n\t*)\n\t\techo Invalid configuration \\`$1\\': machine \\`$basic_machine\\' not recognized 1>&2\n\t\texit 1\n\t\t;;\nesac\n\n# Here we canonicalize certain aliases for manufacturers.\ncase $basic_machine in\n\t*-digital*)\n\t\tbasic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`\n\t\t;;\n\t*-commodore*)\n\t\tbasic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`\n\t\t;;\n\t*)\n\t\t;;\nesac\n\n# Decode manufacturer-specific aliases for certain operating systems.\n\nif [ x\"$os\" != x\"\" ]\nthen\ncase $os in\n        # First match some system type aliases\n        # that might get confused with valid system types.\n\t# -solaris* is a basic system type, with this one exception.\n\t-solaris1 | -solaris1.*)\n\t\tos=`echo $os | sed -e 's|solaris1|sunos4|'`\n\t\t;;\n\t-solaris)\n\t\tos=-solaris2\n\t\t;;\n\t-svr4*)\n\t\tos=-sysv4\n\t\t;;\n\t-unixware*)\n\t\tos=-sysv4.2uw\n\t\t;;\n\t-gnu/linux*)\n\t\tos=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`\n\t\t;;\n\t# First accept the basic system types.\n\t# The portable systems comes first.\n\t# Each alternative MUST END IN A *, to match a version number.\n\t# -sysv* is not here because it comes later, after sysvr4.\n\t-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \\\n\t      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\\\n\t      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \\\n\t      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \\\n\t      | -aos* \\\n\t      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \\\n\t      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \\\n\t      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \\\n\t      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \\\n\t      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \\\n\t      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \\\n\t      | -chorusos* | -chorusrdb* \\\n\t      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \\\n\t      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \\\n\t      | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \\\n\t      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \\\n\t      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \\\n\t      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \\\n\t      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*)\n\t# Remember, each alternative MUST END IN *, to match a version number.\n\t\t;;\n\t-qnx*)\n\t\tcase $basic_machine in\n\t\t    x86-* | i*86-*)\n\t\t\t;;\n\t\t    *)\n\t\t\tos=-nto$os\n\t\t\t;;\n\t\tesac\n\t\t;;\n\t-nto*)\n\t\tos=-nto-qnx\n\t\t;;\n\t-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \\\n\t      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \\\n\t      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)\n\t\t;;\n\t-mac*)\n\t\tos=`echo $os | sed -e 's|mac|macos|'`\n\t\t;;\n\t-linux*)\n\t\tos=`echo $os | sed -e 's|linux|linux-gnu|'`\n\t\t;;\n\t-sunos5*)\n\t\tos=`echo $os | sed -e 's|sunos5|solaris2|'`\n\t\t;;\n\t-sunos6*)\n\t\tos=`echo $os | sed -e 's|sunos6|solaris3|'`\n\t\t;;\n\t-opened*)\n\t\tos=-openedition\n\t\t;;\n\t-wince*)\n\t\tos=-wince\n\t\t;;\n\t-osfrose*)\n\t\tos=-osfrose\n\t\t;;\n\t-osf*)\n\t\tos=-osf\n\t\t;;\n\t-utek*)\n\t\tos=-bsd\n\t\t;;\n\t-dynix*)\n\t\tos=-bsd\n\t\t;;\n\t-acis*)\n\t\tos=-aos\n\t\t;;\n\t-atheos*)\n\t\tos=-atheos\n\t\t;;\n\t-386bsd)\n\t\tos=-bsd\n\t\t;;\n\t-ctix* | -uts*)\n\t\tos=-sysv\n\t\t;;\n\t-nova*)\n\t\tos=-rtmk-nova\n\t\t;;\n\t-ns2 )\n\t\tos=-nextstep2\n\t\t;;\n\t-nsk*)\n\t\tos=-nsk\n\t\t;;\n\t# Preserve the version number of sinix5.\n\t-sinix5.*)\n\t\tos=`echo $os | sed -e 's|sinix|sysv|'`\n\t\t;;\n\t-sinix*)\n\t\tos=-sysv4\n\t\t;;\n\t-triton*)\n\t\tos=-sysv3\n\t\t;;\n\t-oss*)\n\t\tos=-sysv3\n\t\t;;\n\t-svr4)\n\t\tos=-sysv4\n\t\t;;\n\t-svr3)\n\t\tos=-sysv3\n\t\t;;\n\t-sysvr4)\n\t\tos=-sysv4\n\t\t;;\n\t# This must come after -sysvr4.\n\t-sysv*)\n\t\t;;\n\t-ose*)\n\t\tos=-ose\n\t\t;;\n\t-es1800*)\n\t\tos=-ose\n\t\t;;\n\t-xenix)\n\t\tos=-xenix\n\t\t;;\n\t-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)\n\t\tos=-mint\n\t\t;;\n\t-none)\n\t\t;;\n\t*)\n\t\t# Get rid of the `-' at the beginning of $os.\n\t\tos=`echo $os | sed 's/[^-]*-//'`\n\t\techo Invalid configuration \\`$1\\': system \\`$os\\' not recognized 1>&2\n\t\texit 1\n\t\t;;\nesac\nelse\n\n# Here we handle the default operating systems that come with various machines.\n# The value should be what the vendor currently ships out the door with their\n# machine or put another way, the most popular os provided with the machine.\n\n# Note that if you're going to try to match \"-MANUFACTURER\" here (say,\n# \"-sun\"), then you have to tell the case statement up towards the top\n# that MANUFACTURER isn't an operating system.  Otherwise, code above\n# will signal an error saying that MANUFACTURER isn't an operating\n# system, and we'll never get to this point.\n\ncase $basic_machine in\n\t*-acorn)\n\t\tos=-riscix1.2\n\t\t;;\n\tarm*-rebel)\n\t\tos=-linux\n\t\t;;\n\tarm*-semi)\n\t\tos=-aout\n\t\t;;\n\t# This must come before the *-dec entry.\n\tpdp10-*)\n\t\tos=-tops20\n\t\t;;\n\tpdp11-*)\n\t\tos=-none\n\t\t;;\n\t*-dec | vax-*)\n\t\tos=-ultrix4.2\n\t\t;;\n\tm68*-apollo)\n\t\tos=-domain\n\t\t;;\n\ti386-sun)\n\t\tos=-sunos4.0.2\n\t\t;;\n\tm68000-sun)\n\t\tos=-sunos3\n\t\t# This also exists in the configure program, but was not the\n\t\t# default.\n\t\t# os=-sunos4\n\t\t;;\n\tm68*-cisco)\n\t\tos=-aout\n\t\t;;\n\tmips*-cisco)\n\t\tos=-elf\n\t\t;;\n\tmips*-*)\n\t\tos=-elf\n\t\t;;\n\tor32-*)\n\t\tos=-coff\n\t\t;;\n\t*-tti)\t# must be before sparc entry or we get the wrong os.\n\t\tos=-sysv3\n\t\t;;\n\tsparc-* | *-sun)\n\t\tos=-sunos4.1.1\n\t\t;;\n\t*-be)\n\t\tos=-beos\n\t\t;;\n\t*-ibm)\n\t\tos=-aix\n\t\t;;\n\t*-wec)\n\t\tos=-proelf\n\t\t;;\n\t*-winbond)\n\t\tos=-proelf\n\t\t;;\n\t*-oki)\n\t\tos=-proelf\n\t\t;;\n\t*-hp)\n\t\tos=-hpux\n\t\t;;\n\t*-hitachi)\n\t\tos=-hiux\n\t\t;;\n\ti860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)\n\t\tos=-sysv\n\t\t;;\n\t*-cbm)\n\t\tos=-amigaos\n\t\t;;\n\t*-dg)\n\t\tos=-dgux\n\t\t;;\n\t*-dolphin)\n\t\tos=-sysv3\n\t\t;;\n\tm68k-ccur)\n\t\tos=-rtu\n\t\t;;\n\tm88k-omron*)\n\t\tos=-luna\n\t\t;;\n\t*-next )\n\t\tos=-nextstep\n\t\t;;\n\t*-sequent)\n\t\tos=-ptx\n\t\t;;\n\t*-crds)\n\t\tos=-unos\n\t\t;;\n\t*-ns)\n\t\tos=-genix\n\t\t;;\n\ti370-*)\n\t\tos=-mvs\n\t\t;;\n\t*-next)\n\t\tos=-nextstep3\n\t\t;;\n\t*-gould)\n\t\tos=-sysv\n\t\t;;\n\t*-highlevel)\n\t\tos=-bsd\n\t\t;;\n\t*-encore)\n\t\tos=-bsd\n\t\t;;\n\t*-sgi)\n\t\tos=-irix\n\t\t;;\n\t*-siemens)\n\t\tos=-sysv4\n\t\t;;\n\t*-masscomp)\n\t\tos=-rtu\n\t\t;;\n\tf30[01]-fujitsu | f700-fujitsu)\n\t\tos=-uxpv\n\t\t;;\n\t*-rom68k)\n\t\tos=-coff\n\t\t;;\n\t*-*bug)\n\t\tos=-coff\n\t\t;;\n\t*-apple)\n\t\tos=-macos\n\t\t;;\n\t*-atari*)\n\t\tos=-mint\n\t\t;;\n\t*)\n\t\tos=-none\n\t\t;;\nesac\nfi\n\n# Here we handle the case where we know the os, and the CPU type, but not the\n# manufacturer.  We pick the logical manufacturer.\nvendor=unknown\ncase $basic_machine in\n\t*-unknown)\n\t\tcase $os in\n\t\t\t-riscix*)\n\t\t\t\tvendor=acorn\n\t\t\t\t;;\n\t\t\t-sunos*)\n\t\t\t\tvendor=sun\n\t\t\t\t;;\n\t\t\t-aix*)\n\t\t\t\tvendor=ibm\n\t\t\t\t;;\n\t\t\t-beos*)\n\t\t\t\tvendor=be\n\t\t\t\t;;\n\t\t\t-hpux*)\n\t\t\t\tvendor=hp\n\t\t\t\t;;\n\t\t\t-mpeix*)\n\t\t\t\tvendor=hp\n\t\t\t\t;;\n\t\t\t-hiux*)\n\t\t\t\tvendor=hitachi\n\t\t\t\t;;\n\t\t\t-unos*)\n\t\t\t\tvendor=crds\n\t\t\t\t;;\n\t\t\t-dgux*)\n\t\t\t\tvendor=dg\n\t\t\t\t;;\n\t\t\t-luna*)\n\t\t\t\tvendor=omron\n\t\t\t\t;;\n\t\t\t-genix*)\n\t\t\t\tvendor=ns\n\t\t\t\t;;\n\t\t\t-mvs* | -opened*)\n\t\t\t\tvendor=ibm\n\t\t\t\t;;\n\t\t\t-ptx*)\n\t\t\t\tvendor=sequent\n\t\t\t\t;;\n\t\t\t-vxsim* | -vxworks* | -windiss*)\n\t\t\t\tvendor=wrs\n\t\t\t\t;;\n\t\t\t-aux*)\n\t\t\t\tvendor=apple\n\t\t\t\t;;\n\t\t\t-hms*)\n\t\t\t\tvendor=hitachi\n\t\t\t\t;;\n\t\t\t-mpw* | -macos*)\n\t\t\t\tvendor=apple\n\t\t\t\t;;\n\t\t\t-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)\n\t\t\t\tvendor=atari\n\t\t\t\t;;\n\t\t\t-vos*)\n\t\t\t\tvendor=stratus\n\t\t\t\t;;\n\t\tesac\n\t\tbasic_machine=`echo $basic_machine | sed \"s/unknown/$vendor/\"`\n\t\t;;\nesac\n\necho $basic_machine$os\nexit 0\n\n# Local variables:\n# eval: (add-hook 'write-file-hooks 'time-stamp)\n# time-stamp-start: \"timestamp='\"\n# time-stamp-format: \"%:y-%02m-%02d\"\n# time-stamp-end: \"'\"\n# End:\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/configure",
    "content": "#! /bin/sh\n# Guess values for system-dependent variables and create Makefiles.\n# Generated by GNU Autoconf 2.59.\n#\n# Copyright (C) 2003 Free Software Foundation, Inc.\n# This configure script is free software; the Free Software Foundation\n# gives unlimited permission to copy, distribute and modify it.\n## --------------------- ##\n## M4sh Initialization.  ##\n## --------------------- ##\n\n# Be Bourne compatible\nif test -n \"${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then\n  emulate sh\n  NULLCMD=:\n  # Zsh 3.x and 4.x performs word splitting on ${1+\"$@\"}, which\n  # is contrary to our usage.  Disable this feature.\n  alias -g '${1+\"$@\"}'='\"$@\"'\nelif test -n \"${BASH_VERSION+set}\" && (set -o posix) >/dev/null 2>&1; then\n  set -o posix\nfi\nDUALCASE=1; export DUALCASE # for MKS sh\n\n# Support unset when possible.\nif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then\n  as_unset=unset\nelse\n  as_unset=false\nfi\n\n\n# Work around bugs in pre-3.0 UWIN ksh.\n$as_unset ENV MAIL MAILPATH\nPS1='$ '\nPS2='> '\nPS4='+ '\n\n# NLS nuisances.\nfor as_var in \\\n  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \\\n  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \\\n  LC_TELEPHONE LC_TIME\ndo\n  if (set +x; test -z \"`(eval $as_var=C; export $as_var) 2>&1`\"); then\n    eval $as_var=C; export $as_var\n  else\n    $as_unset $as_var\n  fi\ndone\n\n# Required to use basename.\nif expr a : '\\(a\\)' >/dev/null 2>&1; then\n  as_expr=expr\nelse\n  as_expr=false\nfi\n\nif (basename /) >/dev/null 2>&1 && test \"X`basename / 2>&1`\" = \"X/\"; then\n  as_basename=basename\nelse\n  as_basename=false\nfi\n\n\n# Name of the executable.\nas_me=`$as_basename \"$0\" ||\n$as_expr X/\"$0\" : '.*/\\([^/][^/]*\\)/*$' \\| \\\n\t X\"$0\" : 'X\\(//\\)$' \\| \\\n\t X\"$0\" : 'X\\(/\\)$' \\| \\\n\t .     : '\\(.\\)' 2>/dev/null ||\necho X/\"$0\" |\n    sed '/^.*\\/\\([^/][^/]*\\)\\/*$/{ s//\\1/; q; }\n  \t  /^X\\/\\(\\/\\/\\)$/{ s//\\1/; q; }\n  \t  /^X\\/\\(\\/\\).*/{ s//\\1/; q; }\n  \t  s/.*/./; q'`\n\n\n# PATH needs CR, and LINENO needs CR and PATH.\n# Avoid depending upon Character Ranges.\nas_cr_letters='abcdefghijklmnopqrstuvwxyz'\nas_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'\nas_cr_Letters=$as_cr_letters$as_cr_LETTERS\nas_cr_digits='0123456789'\nas_cr_alnum=$as_cr_Letters$as_cr_digits\n\n# The user is always right.\nif test \"${PATH_SEPARATOR+set}\" != set; then\n  echo \"#! /bin/sh\" >conf$$.sh\n  echo  \"exit 0\"   >>conf$$.sh\n  chmod +x conf$$.sh\n  if (PATH=\"/nonexistent;.\"; conf$$.sh) >/dev/null 2>&1; then\n    PATH_SEPARATOR=';'\n  else\n    PATH_SEPARATOR=:\n  fi\n  rm -f conf$$.sh\nfi\n\n\n  as_lineno_1=$LINENO\n  as_lineno_2=$LINENO\n  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`\n  test \"x$as_lineno_1\" != \"x$as_lineno_2\" &&\n  test \"x$as_lineno_3\"  = \"x$as_lineno_2\"  || {\n  # Find who we are.  Look in the path if we contain no path at all\n  # relative or not.\n  case $0 in\n    *[\\\\/]* ) as_myself=$0 ;;\n    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  test -r \"$as_dir/$0\" && as_myself=$as_dir/$0 && break\ndone\n\n       ;;\n  esac\n  # We did not find ourselves, most probably we were run as `sh COMMAND'\n  # in which case we are not to be found in the path.\n  if test \"x$as_myself\" = x; then\n    as_myself=$0\n  fi\n  if test ! -f \"$as_myself\"; then\n    { echo \"$as_me: error: cannot find myself; rerun with an absolute path\" >&2\n   { (exit 1); exit 1; }; }\n  fi\n  case $CONFIG_SHELL in\n  '')\n    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for as_base in sh bash ksh sh5; do\n\t case $as_dir in\n\t /*)\n\t   if (\"$as_dir/$as_base\" -c '\n  as_lineno_1=$LINENO\n  as_lineno_2=$LINENO\n  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`\n  test \"x$as_lineno_1\" != \"x$as_lineno_2\" &&\n  test \"x$as_lineno_3\"  = \"x$as_lineno_2\" ') 2>/dev/null; then\n\t     $as_unset BASH_ENV || test \"${BASH_ENV+set}\" != set || { BASH_ENV=; export BASH_ENV; }\n\t     $as_unset ENV || test \"${ENV+set}\" != set || { ENV=; export ENV; }\n\t     CONFIG_SHELL=$as_dir/$as_base\n\t     export CONFIG_SHELL\n\t     exec \"$CONFIG_SHELL\" \"$0\" ${1+\"$@\"}\n\t   fi;;\n\t esac\n       done\ndone\n;;\n  esac\n\n  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO\n  # uniformly replaced by the line number.  The first 'sed' inserts a\n  # line-number line before each line; the second 'sed' does the real\n  # work.  The second script uses 'N' to pair each line-number line\n  # with the numbered line, and appends trailing '-' during\n  # substitution so that $LINENO is not a special case at line end.\n  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the\n  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)\n  sed '=' <$as_myself |\n    sed '\n      N\n      s,$,-,\n      : loop\n      s,^\\(['$as_cr_digits']*\\)\\(.*\\)[$]LINENO\\([^'$as_cr_alnum'_]\\),\\1\\2\\1\\3,\n      t loop\n      s,-$,,\n      s,^['$as_cr_digits']*\\n,,\n    ' >$as_me.lineno &&\n  chmod +x $as_me.lineno ||\n    { echo \"$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell\" >&2\n   { (exit 1); exit 1; }; }\n\n  # Don't try to exec as it changes $[0], causing all sort of problems\n  # (the dirname of $[0] is not the place where we might find the\n  # original and so on.  Autoconf is especially sensible to this).\n  . ./$as_me.lineno\n  # Exit status is that of the last command.\n  exit\n}\n\n\ncase `echo \"testing\\c\"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in\n  *c*,-n*) ECHO_N= ECHO_C='\n' ECHO_T='\t' ;;\n  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;\n  *)       ECHO_N= ECHO_C='\\c' ECHO_T= ;;\nesac\n\nif expr a : '\\(a\\)' >/dev/null 2>&1; then\n  as_expr=expr\nelse\n  as_expr=false\nfi\n\nrm -f conf$$ conf$$.exe conf$$.file\necho >conf$$.file\nif ln -s conf$$.file conf$$ 2>/dev/null; then\n  # We could just check for DJGPP; but this test a) works b) is more generic\n  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).\n  if test -f conf$$.exe; then\n    # Don't use ln at all; we don't have any links\n    as_ln_s='cp -p'\n  else\n    as_ln_s='ln -s'\n  fi\nelif ln conf$$.file conf$$ 2>/dev/null; then\n  as_ln_s=ln\nelse\n  as_ln_s='cp -p'\nfi\nrm -f conf$$ conf$$.exe conf$$.file\n\nif mkdir -p . 2>/dev/null; then\n  as_mkdir_p=:\nelse\n  test -d ./-p && rmdir ./-p\n  as_mkdir_p=false\nfi\n\nas_executable_p=\"test -f\"\n\n# Sed expression to map a string onto a valid CPP name.\nas_tr_cpp=\"eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'\"\n\n# Sed expression to map a string onto a valid variable name.\nas_tr_sh=\"eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'\"\n\n\n# IFS\n# We need space, tab and new line, in precisely that order.\nas_nl='\n'\nIFS=\" \t$as_nl\"\n\n# CDPATH.\n$as_unset CDPATH\n\n\n\n# Check that we are running under the correct shell.\nSHELL=${CONFIG_SHELL-/bin/sh}\n\ncase X$ECHO in\nX*--fallback-echo)\n  # Remove one level of quotation (which was required for Make).\n  ECHO=`echo \"$ECHO\" | sed 's,\\\\\\\\\\$\\\\$0,'$0','`\n  ;;\nesac\n\necho=${ECHO-echo}\nif test \"X$1\" = X--no-reexec; then\n  # Discard the --no-reexec flag, and continue.\n  shift\nelif test \"X$1\" = X--fallback-echo; then\n  # Avoid inline document here, it may be left over\n  :\nelif test \"X`($echo '\\t') 2>/dev/null`\" = 'X\\t' ; then\n  # Yippee, $echo works!\n  :\nelse\n  # Restart under the correct shell.\n  exec $SHELL \"$0\" --no-reexec ${1+\"$@\"}\nfi\n\nif test \"X$1\" = X--fallback-echo; then\n  # used as fallback echo\n  shift\n  cat <<EOF\n$*\nEOF\n  exit 0\nfi\n\n# The HP-UX ksh and POSIX shell print the target directory to stdout\n# if CDPATH is set.\n(unset CDPATH) >/dev/null 2>&1 && unset CDPATH\n\nif test -z \"$ECHO\"; then\nif test \"X${echo_test_string+set}\" != Xset; then\n# find a string as large as possible, as long as the shell can cope with it\n  for cmd in 'sed 50q \"$0\"' 'sed 20q \"$0\"' 'sed 10q \"$0\"' 'sed 2q \"$0\"' 'echo test'; do\n    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...\n    if (echo_test_string=`eval $cmd`) 2>/dev/null &&\n       echo_test_string=`eval $cmd` &&\n       (test \"X$echo_test_string\" = \"X$echo_test_string\") 2>/dev/null\n    then\n      break\n    fi\n  done\nfi\n\nif test \"X`($echo '\\t') 2>/dev/null`\" = 'X\\t' &&\n   echo_testing_string=`($echo \"$echo_test_string\") 2>/dev/null` &&\n   test \"X$echo_testing_string\" = \"X$echo_test_string\"; then\n  :\nelse\n  # The Solaris, AIX, and Digital Unix default echo programs unquote\n  # backslashes.  This makes it impossible to quote backslashes using\n  #   echo \"$something\" | sed 's/\\\\/\\\\\\\\/g'\n  #\n  # So, first we look for a working echo in the user's PATH.\n\n  lt_save_ifs=\"$IFS\"; IFS=$PATH_SEPARATOR\n  for dir in $PATH /usr/ucb; do\n    IFS=\"$lt_save_ifs\"\n    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&\n       test \"X`($dir/echo '\\t') 2>/dev/null`\" = 'X\\t' &&\n       echo_testing_string=`($dir/echo \"$echo_test_string\") 2>/dev/null` &&\n       test \"X$echo_testing_string\" = \"X$echo_test_string\"; then\n      echo=\"$dir/echo\"\n      break\n    fi\n  done\n  IFS=\"$lt_save_ifs\"\n\n  if test \"X$echo\" = Xecho; then\n    # We didn't find a better echo, so look for alternatives.\n    if test \"X`(print -r '\\t') 2>/dev/null`\" = 'X\\t' &&\n       echo_testing_string=`(print -r \"$echo_test_string\") 2>/dev/null` &&\n       test \"X$echo_testing_string\" = \"X$echo_test_string\"; then\n      # This shell has a builtin print -r that does the trick.\n      echo='print -r'\n    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&\n\t test \"X$CONFIG_SHELL\" != X/bin/ksh; then\n      # If we have ksh, try running configure again with it.\n      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}\n      export ORIGINAL_CONFIG_SHELL\n      CONFIG_SHELL=/bin/ksh\n      export CONFIG_SHELL\n      exec $CONFIG_SHELL \"$0\" --no-reexec ${1+\"$@\"}\n    else\n      # Try using printf.\n      echo='printf %s\\n'\n      if test \"X`($echo '\\t') 2>/dev/null`\" = 'X\\t' &&\n\t echo_testing_string=`($echo \"$echo_test_string\") 2>/dev/null` &&\n\t test \"X$echo_testing_string\" = \"X$echo_test_string\"; then\n\t# Cool, printf works\n\t:\n      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL \"$0\" --fallback-echo '\\t') 2>/dev/null` &&\n\t   test \"X$echo_testing_string\" = 'X\\t' &&\n\t   echo_testing_string=`($ORIGINAL_CONFIG_SHELL \"$0\" --fallback-echo \"$echo_test_string\") 2>/dev/null` &&\n\t   test \"X$echo_testing_string\" = \"X$echo_test_string\"; then\n\tCONFIG_SHELL=$ORIGINAL_CONFIG_SHELL\n\texport CONFIG_SHELL\n\tSHELL=\"$CONFIG_SHELL\"\n\texport SHELL\n\techo=\"$CONFIG_SHELL $0 --fallback-echo\"\n      elif echo_testing_string=`($CONFIG_SHELL \"$0\" --fallback-echo '\\t') 2>/dev/null` &&\n\t   test \"X$echo_testing_string\" = 'X\\t' &&\n\t   echo_testing_string=`($CONFIG_SHELL \"$0\" --fallback-echo \"$echo_test_string\") 2>/dev/null` &&\n\t   test \"X$echo_testing_string\" = \"X$echo_test_string\"; then\n\techo=\"$CONFIG_SHELL $0 --fallback-echo\"\n      else\n\t# maybe with a smaller string...\n\tprev=:\n\n\tfor cmd in 'echo test' 'sed 2q \"$0\"' 'sed 10q \"$0\"' 'sed 20q \"$0\"' 'sed 50q \"$0\"'; do\n\t  if (test \"X$echo_test_string\" = \"X`eval $cmd`\") 2>/dev/null\n\t  then\n\t    break\n\t  fi\n\t  prev=\"$cmd\"\n\tdone\n\n\tif test \"$prev\" != 'sed 50q \"$0\"'; then\n\t  echo_test_string=`eval $prev`\n\t  export echo_test_string\n\t  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} \"$0\" ${1+\"$@\"}\n\telse\n\t  # Oops.  We lost completely, so just stick with echo.\n\t  echo=echo\n\tfi\n      fi\n    fi\n  fi\nfi\nfi\n\n# Copy echo and quote the copy suitably for passing to libtool from\n# the Makefile, instead of quoting the original, which is used later.\nECHO=$echo\nif test \"X$ECHO\" = \"X$CONFIG_SHELL $0 --fallback-echo\"; then\n   ECHO=\"$CONFIG_SHELL \\\\\\$\\$0 --fallback-echo\"\nfi\n\n\n\n\ntagnames=${tagnames+${tagnames},}CXX\n\ntagnames=${tagnames+${tagnames},}F77\n\n# Name of the host.\n# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,\n# so uname gets run too.\nac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`\n\nexec 6>&1\n\n#\n# Initializations.\n#\nac_default_prefix=/usr/local\nac_config_libobj_dir=.\ncross_compiling=no\nsubdirs=\nMFLAGS=\nMAKEFLAGS=\nSHELL=${CONFIG_SHELL-/bin/sh}\n\n# Maximum number of lines to put in a shell here document.\n# This variable seems obsolete.  It should probably be removed, and\n# only ac_max_sed_lines should be used.\n: ${ac_max_here_lines=38}\n\n# Identity of this package.\nPACKAGE_NAME=\nPACKAGE_TARNAME=\nPACKAGE_VERSION=\nPACKAGE_STRING=\nPACKAGE_BUGREPORT=\n\nac_unique_file=\"config.h.in\"\n# Factoring default headers for most tests.\nac_includes_default=\"\\\n#include <stdio.h>\n#if HAVE_SYS_TYPES_H\n# include <sys/types.h>\n#endif\n#if HAVE_SYS_STAT_H\n# include <sys/stat.h>\n#endif\n#if STDC_HEADERS\n# include <stdlib.h>\n# include <stddef.h>\n#else\n# if HAVE_STDLIB_H\n#  include <stdlib.h>\n# endif\n#endif\n#if HAVE_STRING_H\n# if !STDC_HEADERS && HAVE_MEMORY_H\n#  include <memory.h>\n# endif\n# include <string.h>\n#endif\n#if HAVE_STRINGS_H\n# include <strings.h>\n#endif\n#if HAVE_INTTYPES_H\n# include <inttypes.h>\n#else\n# if HAVE_STDINT_H\n#  include <stdint.h>\n# endif\n#endif\n#if HAVE_UNISTD_H\n# include <unistd.h>\n#endif\"\n\nac_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 vmmcfg blddir SQ_MAJOR SQ_MINOR SQ_UPDATE SQ_VERSION VM_MAJOR VM_MINOR VM_RELEASE VM_VERSION imgdir expanded_relative_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 CPP EGREP SED LN_S ECHO AR ac_ct_AR STRIP ac_ct_STRIP CXX CXXFLAGS ac_ct_CXX CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL INCLUDES HAVE_INTERP_H ALLOCA INTERP AWK VM_APP_ICONS npsqueak install_nps uninstall_nps SQ_LIBDIR int_modules ext_modules HAVE_LANGINFO_CODESET HAVE_NANOSLEEP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS X_CPPFLAGS X_INCLUDES LIBM_CFLAGS LIB_UUID int_plugins ext_plugins LIBOBJS LTLIBOBJS'\nac_subst_files='make_cfg make_int make_ext make_prg Makefile_install Makefile_dist Makefile_rpm Makefile_deb'\n\n# Initialize some variables set by options.\nac_init_help=\nac_init_version=false\n# The variables have the same names as the options, with\n# dashes changed to underlines.\ncache_file=/dev/null\nexec_prefix=NONE\nno_create=\nno_recursion=\nprefix=NONE\nprogram_prefix=NONE\nprogram_suffix=NONE\nprogram_transform_name=s,x,x,\nsilent=\nsite=\nsrcdir=\nverbose=\nx_includes=NONE\nx_libraries=NONE\n\n# Installation directory options.\n# These are left unexpanded so users can \"make install exec_prefix=/foo\"\n# and all the variables that are supposed to be based on exec_prefix\n# by default will actually change.\n# Use braces instead of parens because sh, perl, etc. also accept them.\nbindir='${exec_prefix}/bin'\nsbindir='${exec_prefix}/sbin'\nlibexecdir='${exec_prefix}/libexec'\ndatadir='${prefix}/share'\nsysconfdir='${prefix}/etc'\nsharedstatedir='${prefix}/com'\nlocalstatedir='${prefix}/var'\nlibdir='${exec_prefix}/lib'\nincludedir='${prefix}/include'\noldincludedir='/usr/include'\ninfodir='${prefix}/info'\nmandir='${prefix}/man'\n\nac_prev=\nfor ac_option\ndo\n  # If the previous option needs an argument, assign it.\n  if test -n \"$ac_prev\"; then\n    eval \"$ac_prev=\\$ac_option\"\n    ac_prev=\n    continue\n  fi\n\n  ac_optarg=`expr \"x$ac_option\" : 'x[^=]*=\\(.*\\)'`\n\n  # Accept the important Cygnus configure options, so we can diagnose typos.\n\n  case $ac_option in\n\n  -bindir | --bindir | --bindi | --bind | --bin | --bi)\n    ac_prev=bindir ;;\n  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)\n    bindir=$ac_optarg ;;\n\n  -build | --build | --buil | --bui | --bu)\n    ac_prev=build_alias ;;\n  -build=* | --build=* | --buil=* | --bui=* | --bu=*)\n    build_alias=$ac_optarg ;;\n\n  -cache-file | --cache-file | --cache-fil | --cache-fi \\\n  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)\n    ac_prev=cache_file ;;\n  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \\\n  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)\n    cache_file=$ac_optarg ;;\n\n  --config-cache | -C)\n    cache_file=config.cache ;;\n\n  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)\n    ac_prev=datadir ;;\n  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \\\n  | --da=*)\n    datadir=$ac_optarg ;;\n\n  -disable-* | --disable-*)\n    ac_feature=`expr \"x$ac_option\" : 'x-*disable-\\(.*\\)'`\n    # Reject names that are not valid shell variable names.\n    expr \"x$ac_feature\" : \".*[^-_$as_cr_alnum]\" >/dev/null &&\n      { echo \"$as_me: error: invalid feature name: $ac_feature\" >&2\n   { (exit 1); exit 1; }; }\n    ac_feature=`echo $ac_feature | sed 's/-/_/g'`\n    eval \"enable_$ac_feature=no\" ;;\n\n  -enable-* | --enable-*)\n    ac_feature=`expr \"x$ac_option\" : 'x-*enable-\\([^=]*\\)'`\n    # Reject names that are not valid shell variable names.\n    expr \"x$ac_feature\" : \".*[^-_$as_cr_alnum]\" >/dev/null &&\n      { echo \"$as_me: error: invalid feature name: $ac_feature\" >&2\n   { (exit 1); exit 1; }; }\n    ac_feature=`echo $ac_feature | sed 's/-/_/g'`\n    case $ac_option in\n      *=*) ac_optarg=`echo \"$ac_optarg\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"`;;\n      *) ac_optarg=yes ;;\n    esac\n    eval \"enable_$ac_feature='$ac_optarg'\" ;;\n\n  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \\\n  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \\\n  | --exec | --exe | --ex)\n    ac_prev=exec_prefix ;;\n  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \\\n  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \\\n  | --exec=* | --exe=* | --ex=*)\n    exec_prefix=$ac_optarg ;;\n\n  -gas | --gas | --ga | --g)\n    # Obsolete; use --with-gas.\n    with_gas=yes ;;\n\n  -help | --help | --hel | --he | -h)\n    ac_init_help=long ;;\n  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)\n    ac_init_help=recursive ;;\n  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)\n    ac_init_help=short ;;\n\n  -host | --host | --hos | --ho)\n    ac_prev=host_alias ;;\n  -host=* | --host=* | --hos=* | --ho=*)\n    host_alias=$ac_optarg ;;\n\n  -includedir | --includedir | --includedi | --included | --include \\\n  | --includ | --inclu | --incl | --inc)\n    ac_prev=includedir ;;\n  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \\\n  | --includ=* | --inclu=* | --incl=* | --inc=*)\n    includedir=$ac_optarg ;;\n\n  -infodir | --infodir | --infodi | --infod | --info | --inf)\n    ac_prev=infodir ;;\n  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)\n    infodir=$ac_optarg ;;\n\n  -libdir | --libdir | --libdi | --libd)\n    ac_prev=libdir ;;\n  -libdir=* | --libdir=* | --libdi=* | --libd=*)\n    libdir=$ac_optarg ;;\n\n  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \\\n  | --libexe | --libex | --libe)\n    ac_prev=libexecdir ;;\n  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \\\n  | --libexe=* | --libex=* | --libe=*)\n    libexecdir=$ac_optarg ;;\n\n  -localstatedir | --localstatedir | --localstatedi | --localstated \\\n  | --localstate | --localstat | --localsta | --localst \\\n  | --locals | --local | --loca | --loc | --lo)\n    ac_prev=localstatedir ;;\n  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \\\n  | --localstate=* | --localstat=* | --localsta=* | --localst=* \\\n  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)\n    localstatedir=$ac_optarg ;;\n\n  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)\n    ac_prev=mandir ;;\n  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)\n    mandir=$ac_optarg ;;\n\n  -nfp | --nfp | --nf)\n    # Obsolete; use --without-fp.\n    with_fp=no ;;\n\n  -no-create | --no-create | --no-creat | --no-crea | --no-cre \\\n  | --no-cr | --no-c | -n)\n    no_create=yes ;;\n\n  -no-recursion | --no-recursion | --no-recursio | --no-recursi \\\n  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)\n    no_recursion=yes ;;\n\n  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \\\n  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \\\n  | --oldin | --oldi | --old | --ol | --o)\n    ac_prev=oldincludedir ;;\n  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \\\n  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \\\n  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)\n    oldincludedir=$ac_optarg ;;\n\n  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)\n    ac_prev=prefix ;;\n  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)\n    prefix=$ac_optarg ;;\n\n  -program-prefix | --program-prefix | --program-prefi | --program-pref \\\n  | --program-pre | --program-pr | --program-p)\n    ac_prev=program_prefix ;;\n  -program-prefix=* | --program-prefix=* | --program-prefi=* \\\n  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)\n    program_prefix=$ac_optarg ;;\n\n  -program-suffix | --program-suffix | --program-suffi | --program-suff \\\n  | --program-suf | --program-su | --program-s)\n    ac_prev=program_suffix ;;\n  -program-suffix=* | --program-suffix=* | --program-suffi=* \\\n  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)\n    program_suffix=$ac_optarg ;;\n\n  -program-transform-name | --program-transform-name \\\n  | --program-transform-nam | --program-transform-na \\\n  | --program-transform-n | --program-transform- \\\n  | --program-transform | --program-transfor \\\n  | --program-transfo | --program-transf \\\n  | --program-trans | --program-tran \\\n  | --progr-tra | --program-tr | --program-t)\n    ac_prev=program_transform_name ;;\n  -program-transform-name=* | --program-transform-name=* \\\n  | --program-transform-nam=* | --program-transform-na=* \\\n  | --program-transform-n=* | --program-transform-=* \\\n  | --program-transform=* | --program-transfor=* \\\n  | --program-transfo=* | --program-transf=* \\\n  | --program-trans=* | --program-tran=* \\\n  | --progr-tra=* | --program-tr=* | --program-t=*)\n    program_transform_name=$ac_optarg ;;\n\n  -q | -quiet | --quiet | --quie | --qui | --qu | --q \\\n  | -silent | --silent | --silen | --sile | --sil)\n    silent=yes ;;\n\n  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)\n    ac_prev=sbindir ;;\n  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \\\n  | --sbi=* | --sb=*)\n    sbindir=$ac_optarg ;;\n\n  -sharedstatedir | --sharedstatedir | --sharedstatedi \\\n  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \\\n  | --sharedst | --shareds | --shared | --share | --shar \\\n  | --sha | --sh)\n    ac_prev=sharedstatedir ;;\n  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \\\n  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \\\n  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \\\n  | --sha=* | --sh=*)\n    sharedstatedir=$ac_optarg ;;\n\n  -site | --site | --sit)\n    ac_prev=site ;;\n  -site=* | --site=* | --sit=*)\n    site=$ac_optarg ;;\n\n  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)\n    ac_prev=srcdir ;;\n  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)\n    srcdir=$ac_optarg ;;\n\n  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \\\n  | --syscon | --sysco | --sysc | --sys | --sy)\n    ac_prev=sysconfdir ;;\n  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \\\n  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)\n    sysconfdir=$ac_optarg ;;\n\n  -target | --target | --targe | --targ | --tar | --ta | --t)\n    ac_prev=target_alias ;;\n  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)\n    target_alias=$ac_optarg ;;\n\n  -v | -verbose | --verbose | --verbos | --verbo | --verb)\n    verbose=yes ;;\n\n  -version | --version | --versio | --versi | --vers | -V)\n    ac_init_version=: ;;\n\n  -with-* | --with-*)\n    ac_package=`expr \"x$ac_option\" : 'x-*with-\\([^=]*\\)'`\n    # Reject names that are not valid shell variable names.\n    expr \"x$ac_package\" : \".*[^-_$as_cr_alnum]\" >/dev/null &&\n      { echo \"$as_me: error: invalid package name: $ac_package\" >&2\n   { (exit 1); exit 1; }; }\n    ac_package=`echo $ac_package| sed 's/-/_/g'`\n    case $ac_option in\n      *=*) ac_optarg=`echo \"$ac_optarg\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"`;;\n      *) ac_optarg=yes ;;\n    esac\n    eval \"with_$ac_package='$ac_optarg'\" ;;\n\n  -without-* | --without-*)\n    ac_package=`expr \"x$ac_option\" : 'x-*without-\\(.*\\)'`\n    # Reject names that are not valid shell variable names.\n    expr \"x$ac_package\" : \".*[^-_$as_cr_alnum]\" >/dev/null &&\n      { echo \"$as_me: error: invalid package name: $ac_package\" >&2\n   { (exit 1); exit 1; }; }\n    ac_package=`echo $ac_package | sed 's/-/_/g'`\n    eval \"with_$ac_package=no\" ;;\n\n  --x)\n    # Obsolete; use --with-x.\n    with_x=yes ;;\n\n  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \\\n  | --x-incl | --x-inc | --x-in | --x-i)\n    ac_prev=x_includes ;;\n  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \\\n  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)\n    x_includes=$ac_optarg ;;\n\n  -x-libraries | --x-libraries | --x-librarie | --x-librari \\\n  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)\n    ac_prev=x_libraries ;;\n  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \\\n  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)\n    x_libraries=$ac_optarg ;;\n\n  -*) { echo \"$as_me: error: unrecognized option: $ac_option\nTry \\`$0 --help' for more information.\" >&2\n   { (exit 1); exit 1; }; }\n    ;;\n\n  *=*)\n    ac_envvar=`expr \"x$ac_option\" : 'x\\([^=]*\\)='`\n    # Reject names that are not valid shell variable names.\n    expr \"x$ac_envvar\" : \".*[^_$as_cr_alnum]\" >/dev/null &&\n      { echo \"$as_me: error: invalid variable name: $ac_envvar\" >&2\n   { (exit 1); exit 1; }; }\n    ac_optarg=`echo \"$ac_optarg\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"`\n    eval \"$ac_envvar='$ac_optarg'\"\n    export $ac_envvar ;;\n\n  *)\n    # FIXME: should be removed in autoconf 3.0.\n    echo \"$as_me: WARNING: you should use --build, --host, --target\" >&2\n    expr \"x$ac_option\" : \".*[^-._$as_cr_alnum]\" >/dev/null &&\n      echo \"$as_me: WARNING: invalid host type: $ac_option\" >&2\n    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}\n    ;;\n\n  esac\ndone\n\nif test -n \"$ac_prev\"; then\n  ac_option=--`echo $ac_prev | sed 's/_/-/g'`\n  { echo \"$as_me: error: missing argument to $ac_option\" >&2\n   { (exit 1); exit 1; }; }\nfi\n\n# Be sure to have absolute paths.\nfor ac_var in exec_prefix prefix\ndo\n  eval ac_val=$`echo $ac_var`\n  case $ac_val in\n    [\\\\/$]* | ?:[\\\\/]* | NONE | '' ) ;;\n    *)  { echo \"$as_me: error: expected an absolute directory name for --$ac_var: $ac_val\" >&2\n   { (exit 1); exit 1; }; };;\n  esac\ndone\n\n# Be sure to have absolute paths.\nfor ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \\\n\t      localstatedir libdir includedir oldincludedir infodir mandir\ndo\n  eval ac_val=$`echo $ac_var`\n  case $ac_val in\n    [\\\\/$]* | ?:[\\\\/]* ) ;;\n    *)  { echo \"$as_me: error: expected an absolute directory name for --$ac_var: $ac_val\" >&2\n   { (exit 1); exit 1; }; };;\n  esac\ndone\n\n# There might be people who depend on the old broken behavior: `$host'\n# used to hold the argument of --host etc.\n# FIXME: To remove some day.\nbuild=$build_alias\nhost=$host_alias\ntarget=$target_alias\n\n# FIXME: To remove some day.\nif test \"x$host_alias\" != x; then\n  if test \"x$build_alias\" = x; then\n    cross_compiling=maybe\n    echo \"$as_me: WARNING: If you wanted to set the --build type, don't use --host.\n    If a cross compiler is detected then cross compile mode will be used.\" >&2\n  elif test \"x$build_alias\" != \"x$host_alias\"; then\n    cross_compiling=yes\n  fi\nfi\n\nac_tool_prefix=\ntest -n \"$host_alias\" && ac_tool_prefix=$host_alias-\n\ntest \"$silent\" = yes && exec 6>/dev/null\n\n\n# Find the source files, if location was not specified.\nif test -z \"$srcdir\"; then\n  ac_srcdir_defaulted=yes\n  # Try the directory containing this script, then its parent.\n  ac_confdir=`(dirname \"$0\") 2>/dev/null ||\n$as_expr X\"$0\" : 'X\\(.*[^/]\\)//*[^/][^/]*/*$' \\| \\\n\t X\"$0\" : 'X\\(//\\)[^/]' \\| \\\n\t X\"$0\" : 'X\\(//\\)$' \\| \\\n\t X\"$0\" : 'X\\(/\\)' \\| \\\n\t .     : '\\(.\\)' 2>/dev/null ||\necho X\"$0\" |\n    sed '/^X\\(.*[^/]\\)\\/\\/*[^/][^/]*\\/*$/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\/\\)[^/].*/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\/\\)$/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\).*/{ s//\\1/; q; }\n  \t  s/.*/./; q'`\n  srcdir=$ac_confdir\n  if test ! -r $srcdir/$ac_unique_file; then\n    srcdir=..\n  fi\nelse\n  ac_srcdir_defaulted=no\nfi\nif test ! -r $srcdir/$ac_unique_file; then\n  if test \"$ac_srcdir_defaulted\" = yes; then\n    { echo \"$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or ..\" >&2\n   { (exit 1); exit 1; }; }\n  else\n    { echo \"$as_me: error: cannot find sources ($ac_unique_file) in $srcdir\" >&2\n   { (exit 1); exit 1; }; }\n  fi\nfi\n(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||\n  { echo \"$as_me: error: sources are in $srcdir, but \\`cd $srcdir' does not work\" >&2\n   { (exit 1); exit 1; }; }\nsrcdir=`echo \"$srcdir\" | sed 's%\\([^\\\\/]\\)[\\\\/]*$%\\1%'`\nac_env_build_alias_set=${build_alias+set}\nac_env_build_alias_value=$build_alias\nac_cv_env_build_alias_set=${build_alias+set}\nac_cv_env_build_alias_value=$build_alias\nac_env_host_alias_set=${host_alias+set}\nac_env_host_alias_value=$host_alias\nac_cv_env_host_alias_set=${host_alias+set}\nac_cv_env_host_alias_value=$host_alias\nac_env_target_alias_set=${target_alias+set}\nac_env_target_alias_value=$target_alias\nac_cv_env_target_alias_set=${target_alias+set}\nac_cv_env_target_alias_value=$target_alias\nac_env_CC_set=${CC+set}\nac_env_CC_value=$CC\nac_cv_env_CC_set=${CC+set}\nac_cv_env_CC_value=$CC\nac_env_CFLAGS_set=${CFLAGS+set}\nac_env_CFLAGS_value=$CFLAGS\nac_cv_env_CFLAGS_set=${CFLAGS+set}\nac_cv_env_CFLAGS_value=$CFLAGS\nac_env_LDFLAGS_set=${LDFLAGS+set}\nac_env_LDFLAGS_value=$LDFLAGS\nac_cv_env_LDFLAGS_set=${LDFLAGS+set}\nac_cv_env_LDFLAGS_value=$LDFLAGS\nac_env_CPPFLAGS_set=${CPPFLAGS+set}\nac_env_CPPFLAGS_value=$CPPFLAGS\nac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}\nac_cv_env_CPPFLAGS_value=$CPPFLAGS\nac_env_CPP_set=${CPP+set}\nac_env_CPP_value=$CPP\nac_cv_env_CPP_set=${CPP+set}\nac_cv_env_CPP_value=$CPP\nac_env_CXX_set=${CXX+set}\nac_env_CXX_value=$CXX\nac_cv_env_CXX_set=${CXX+set}\nac_cv_env_CXX_value=$CXX\nac_env_CXXFLAGS_set=${CXXFLAGS+set}\nac_env_CXXFLAGS_value=$CXXFLAGS\nac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}\nac_cv_env_CXXFLAGS_value=$CXXFLAGS\nac_env_CXXCPP_set=${CXXCPP+set}\nac_env_CXXCPP_value=$CXXCPP\nac_cv_env_CXXCPP_set=${CXXCPP+set}\nac_cv_env_CXXCPP_value=$CXXCPP\nac_env_F77_set=${F77+set}\nac_env_F77_value=$F77\nac_cv_env_F77_set=${F77+set}\nac_cv_env_F77_value=$F77\nac_env_FFLAGS_set=${FFLAGS+set}\nac_env_FFLAGS_value=$FFLAGS\nac_cv_env_FFLAGS_set=${FFLAGS+set}\nac_cv_env_FFLAGS_value=$FFLAGS\n\n#\n# Report the --help message.\n#\nif test \"$ac_init_help\" = \"long\"; then\n  # Omit some internal or obsolete options to make the list less imposing.\n  # This message is too long to be a string in the A/UX 3.1 sh.\n  cat <<_ACEOF\n\\`configure' configures this package to adapt to many kinds of systems.\n\nUsage: $0 [OPTION]... [VAR=VALUE]...\n\nTo assign environment variables (e.g., CC, CFLAGS...), specify them as\nVAR=VALUE.  See below for descriptions of some of the useful variables.\n\nDefaults for the options are specified in brackets.\n\nConfiguration:\n  -h, --help              display this help and exit\n      --help=short        display options specific to this package\n      --help=recursive    display the short help of all the included packages\n  -V, --version           display version information and exit\n  -q, --quiet, --silent   do not print \\`checking...' messages\n      --cache-file=FILE   cache test results in FILE [disabled]\n  -C, --config-cache      alias for \\`--cache-file=config.cache'\n  -n, --no-create         do not create output files\n      --srcdir=DIR        find the sources in DIR [configure dir or \\`..']\n\n_ACEOF\n\n  cat <<_ACEOF\nInstallation directories:\n  --prefix=PREFIX         install architecture-independent files in PREFIX\n\t\t\t  [$ac_default_prefix]\n  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX\n\t\t\t  [PREFIX]\n\nBy default, \\`make install' will install all the files in\n\\`$ac_default_prefix/bin', \\`$ac_default_prefix/lib' etc.  You can specify\nan installation prefix other than \\`$ac_default_prefix' using \\`--prefix',\nfor instance \\`--prefix=\\$HOME'.\n\nFor better control, use the options below.\n\nFine tuning of the installation directories:\n  --bindir=DIR           user executables [EPREFIX/bin]\n  --sbindir=DIR          system admin executables [EPREFIX/sbin]\n  --libexecdir=DIR       program executables [EPREFIX/libexec]\n  --datadir=DIR          read-only architecture-independent data [PREFIX/share]\n  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]\n  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]\n  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]\n  --libdir=DIR           object code libraries [EPREFIX/lib]\n  --includedir=DIR       C header files [PREFIX/include]\n  --oldincludedir=DIR    C header files for non-gcc [/usr/include]\n  --infodir=DIR          info documentation [PREFIX/info]\n  --mandir=DIR           man documentation [PREFIX/man]\n_ACEOF\n\n  cat <<\\_ACEOF\n\nX features:\n  --x-includes=DIR    X include files are in DIR\n  --x-libraries=DIR   X library files are in DIR\n\nSystem types:\n  --build=BUILD     configure for building on BUILD [guessed]\n  --host=HOST       cross-compile to build programs to run on HOST [BUILD]\n_ACEOF\nfi\n\nif test -n \"$ac_init_help\"; then\n\n  cat <<\\_ACEOF\n\nOptional Features:\n  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)\n  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]\n  --enable-static[=PKGS]\n                          build static libraries [default=no]\n  --enable-shared[=PKGS]\n                          build shared libraries [default=yes]\n  --enable-fast-install[=PKGS]\n                          optimize for fast installation [default=yes]\n  --disable-libtool-lock  avoid locking (might break parallel builds)\n  --disable-iconv         disable iconv support default=enabled\n  --enable-mpg-mmx        enable MMX support in Mpeg3Plugin default=no\n  --enable-mpg-pthreads   enable pthread support in Mpeg3Plugin default=no\n\nOptional Packages:\n  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]\n  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)\n  --with-src=dir          generated src directory default=src\n  --with-vmmcfg=dir        vm configuration directory containing plugins.int and plugins.ext default=.\n  --with-gnu-awk          assume that awk is GNU gawk default=no\n  --with-gnu-as           assume that as is the GNU assembler default=no\n  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]\n  --with-pic              try to use only PIC/non-PIC objects [default=use\n                          both]\n  --with-tags[=TAGS]\n                          include additional configurations [automatic]\n  --without-rfb           disable Remote FrameBuffer support default=enabled\n  --without-npsqueak      disable browser plugin support default=enabled\n  --with-custom-display   enable custom window support default=disabled\n  --without-quartz        disable MacOSX Window System support default=enabled\n  --without-x             disable X Window System support default=enabled\n  --without-gl            disable OpenGL support default=enabled\n  --with-x                use the X Window System\n  --with-custom-sound     enable custom sound support default=disabled\n  --without-vm-sound-OSS      disable OSS vm sound support default=enabled\n  --without-vm-display-fbdev      disable frame buffer vm display support default=enabled\n\nSome influential environment variables:\n  CC          C compiler command\n  CFLAGS      C compiler flags\n  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a\n              nonstandard directory <lib dir>\n  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have\n              headers in a nonstandard directory <include dir>\n  CPP         C preprocessor\n  CXX         C++ compiler command\n  CXXFLAGS    C++ compiler flags\n  CXXCPP      C++ preprocessor\n  F77         Fortran 77 compiler command\n  FFLAGS      Fortran 77 compiler flags\n\nUse these variables to override the choices made by `configure' or to help\nit to find libraries and programs with nonstandard names/locations.\n\n_ACEOF\nfi\n\nif test \"$ac_init_help\" = \"recursive\"; then\n  # If there are subdirs, report their specific --help.\n  ac_popdir=`pwd`\n  for ac_dir in : $ac_subdirs_all; do test \"x$ac_dir\" = x: && continue\n    test -d $ac_dir || continue\n    ac_builddir=.\n\nif test \"$ac_dir\" != .; then\n  ac_dir_suffix=/`echo \"$ac_dir\" | sed 's,^\\.[\\\\/],,'`\n  # A \"../\" for each directory in $ac_dir_suffix.\n  ac_top_builddir=`echo \"$ac_dir_suffix\" | sed 's,/[^\\\\/]*,../,g'`\nelse\n  ac_dir_suffix= ac_top_builddir=\nfi\n\ncase $srcdir in\n  .)  # No --srcdir option.  We are building in place.\n    ac_srcdir=.\n    if test -z \"$ac_top_builddir\"; then\n       ac_top_srcdir=.\n    else\n       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`\n    fi ;;\n  [\\\\/]* | ?:[\\\\/]* )  # Absolute path.\n    ac_srcdir=$srcdir$ac_dir_suffix;\n    ac_top_srcdir=$srcdir ;;\n  *) # Relative path.\n    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix\n    ac_top_srcdir=$ac_top_builddir$srcdir ;;\nesac\n\n# Do not use `cd foo && pwd` to compute absolute paths, because\n# the directories may not exist.\ncase `pwd` in\n.) ac_abs_builddir=\"$ac_dir\";;\n*)\n  case \"$ac_dir\" in\n  .) ac_abs_builddir=`pwd`;;\n  [\\\\/]* | ?:[\\\\/]* ) ac_abs_builddir=\"$ac_dir\";;\n  *) ac_abs_builddir=`pwd`/\"$ac_dir\";;\n  esac;;\nesac\ncase $ac_abs_builddir in\n.) ac_abs_top_builddir=${ac_top_builddir}.;;\n*)\n  case ${ac_top_builddir}. in\n  .) ac_abs_top_builddir=$ac_abs_builddir;;\n  [\\\\/]* | ?:[\\\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;\n  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;\n  esac;;\nesac\ncase $ac_abs_builddir in\n.) ac_abs_srcdir=$ac_srcdir;;\n*)\n  case $ac_srcdir in\n  .) ac_abs_srcdir=$ac_abs_builddir;;\n  [\\\\/]* | ?:[\\\\/]* ) ac_abs_srcdir=$ac_srcdir;;\n  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;\n  esac;;\nesac\ncase $ac_abs_builddir in\n.) ac_abs_top_srcdir=$ac_top_srcdir;;\n*)\n  case $ac_top_srcdir in\n  .) ac_abs_top_srcdir=$ac_abs_builddir;;\n  [\\\\/]* | ?:[\\\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;\n  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;\n  esac;;\nesac\n\n    cd $ac_dir\n    # Check for guested configure; otherwise get Cygnus style configure.\n    if test -f $ac_srcdir/configure.gnu; then\n      echo\n      $SHELL $ac_srcdir/configure.gnu  --help=recursive\n    elif test -f $ac_srcdir/configure; then\n      echo\n      $SHELL $ac_srcdir/configure  --help=recursive\n    elif test -f $ac_srcdir/configure.ac ||\n\t   test -f $ac_srcdir/configure.in; then\n      echo\n      $ac_configure --help\n    else\n      echo \"$as_me: WARNING: no configuration information is in $ac_dir\" >&2\n    fi\n    cd $ac_popdir\n  done\nfi\n\ntest -n \"$ac_init_help\" && exit 0\nif $ac_init_version; then\n  cat <<\\_ACEOF\n\nCopyright (C) 2003 Free Software Foundation, Inc.\nThis configure script is free software; the Free Software Foundation\ngives unlimited permission to copy, distribute and modify it.\n_ACEOF\n  exit 0\nfi\nexec 5>config.log\ncat >&5 <<_ACEOF\nThis file contains any messages produced by compilers while\nrunning configure, to aid debugging if configure makes a mistake.\n\nIt was created by $as_me, which was\ngenerated by GNU Autoconf 2.59.  Invocation command line was\n\n  $ $0 $@\n\n_ACEOF\n{\ncat <<_ASUNAME\n## --------- ##\n## Platform. ##\n## --------- ##\n\nhostname = `(hostname || uname -n) 2>/dev/null | sed 1q`\nuname -m = `(uname -m) 2>/dev/null || echo unknown`\nuname -r = `(uname -r) 2>/dev/null || echo unknown`\nuname -s = `(uname -s) 2>/dev/null || echo unknown`\nuname -v = `(uname -v) 2>/dev/null || echo unknown`\n\n/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`\n/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`\n\n/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`\n/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`\n/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`\nhostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`\n/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`\n/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`\n/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`\n\n_ASUNAME\n\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  echo \"PATH: $as_dir\"\ndone\n\n} >&5\n\ncat >&5 <<_ACEOF\n\n\n## ----------- ##\n## Core tests. ##\n## ----------- ##\n\n_ACEOF\n\n\n# Keep a trace of the command line.\n# Strip out --no-create and --no-recursion so they do not pile up.\n# Strip out --silent because we don't want to record it for future runs.\n# Also quote any args containing shell meta-characters.\n# Make two passes to allow for proper duplicate-argument suppression.\nac_configure_args=\nac_configure_args0=\nac_configure_args1=\nac_sep=\nac_must_keep_next=false\nfor ac_pass in 1 2\ndo\n  for ac_arg\n  do\n    case $ac_arg in\n    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;\n    -q | -quiet | --quiet | --quie | --qui | --qu | --q \\\n    | -silent | --silent | --silen | --sile | --sil)\n      continue ;;\n    *\" \"*|*\"\t\"*|*[\\[\\]\\~\\#\\$\\^\\&\\*\\(\\)\\{\\}\\\\\\|\\;\\<\\>\\?\\\"\\']*)\n      ac_arg=`echo \"$ac_arg\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"` ;;\n    esac\n    case $ac_pass in\n    1) ac_configure_args0=\"$ac_configure_args0 '$ac_arg'\" ;;\n    2)\n      ac_configure_args1=\"$ac_configure_args1 '$ac_arg'\"\n      if test $ac_must_keep_next = true; then\n\tac_must_keep_next=false # Got value, back to normal.\n      else\n\tcase $ac_arg in\n\t  *=* | --config-cache | -C | -disable-* | --disable-* \\\n\t  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \\\n\t  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \\\n\t  | -with-* | --with-* | -without-* | --without-* | --x)\n\t    case \"$ac_configure_args0 \" in\n\t      \"$ac_configure_args1\"*\" '$ac_arg' \"* ) continue ;;\n\t    esac\n\t    ;;\n\t  -* ) ac_must_keep_next=true ;;\n\tesac\n      fi\n      ac_configure_args=\"$ac_configure_args$ac_sep'$ac_arg'\"\n      # Get rid of the leading space.\n      ac_sep=\" \"\n      ;;\n    esac\n  done\ndone\n$as_unset ac_configure_args0 || test \"${ac_configure_args0+set}\" != set || { ac_configure_args0=; export ac_configure_args0; }\n$as_unset ac_configure_args1 || test \"${ac_configure_args1+set}\" != set || { ac_configure_args1=; export ac_configure_args1; }\n\n# When interrupted or exit'd, cleanup temporary files, and complete\n# config.log.  We remove comments because anyway the quotes in there\n# would cause problems or look ugly.\n# WARNING: Be sure not to use single quotes in there, as some shells,\n# such as our DU 5.0 friend, will then `close' the trap.\ntrap 'exit_status=$?\n  # Save into config.log some information that might help in debugging.\n  {\n    echo\n\n    cat <<\\_ASBOX\n## ---------------- ##\n## Cache variables. ##\n## ---------------- ##\n_ASBOX\n    echo\n    # The following way of writing the cache mishandles newlines in values,\n{\n  (set) 2>&1 |\n    case `(ac_space='\"'\"' '\"'\"'; set | grep ac_space) 2>&1` in\n    *ac_space=\\ *)\n      sed -n \\\n\t\"s/'\"'\"'/'\"'\"'\\\\\\\\'\"'\"''\"'\"'/g;\n\t  s/^\\\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\\\)=\\\\(.*\\\\)/\\\\1='\"'\"'\\\\2'\"'\"'/p\"\n      ;;\n    *)\n      sed -n \\\n\t\"s/^\\\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\\\)=\\\\(.*\\\\)/\\\\1=\\\\2/p\"\n      ;;\n    esac;\n}\n    echo\n\n    cat <<\\_ASBOX\n## ----------------- ##\n## Output variables. ##\n## ----------------- ##\n_ASBOX\n    echo\n    for ac_var in $ac_subst_vars\n    do\n      eval ac_val=$`echo $ac_var`\n      echo \"$ac_var='\"'\"'$ac_val'\"'\"'\"\n    done | sort\n    echo\n\n    if test -n \"$ac_subst_files\"; then\n      cat <<\\_ASBOX\n## ------------- ##\n## Output files. ##\n## ------------- ##\n_ASBOX\n      echo\n      for ac_var in $ac_subst_files\n      do\n\teval ac_val=$`echo $ac_var`\n\techo \"$ac_var='\"'\"'$ac_val'\"'\"'\"\n      done | sort\n      echo\n    fi\n\n    if test -s confdefs.h; then\n      cat <<\\_ASBOX\n## ----------- ##\n## confdefs.h. ##\n## ----------- ##\n_ASBOX\n      echo\n      sed \"/^$/d\" confdefs.h | sort\n      echo\n    fi\n    test \"$ac_signal\" != 0 &&\n      echo \"$as_me: caught signal $ac_signal\"\n    echo \"$as_me: exit $exit_status\"\n  } >&5\n  rm -f core *.core &&\n  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&\n    exit $exit_status\n     ' 0\nfor ac_signal in 1 2 13 15; do\n  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal\ndone\nac_signal=0\n\n# confdefs.h avoids OS command line length limits that DEFS can exceed.\nrm -rf conftest* confdefs.h\n# AIX cpp loses on an empty file, so make sure it contains at least a newline.\necho >confdefs.h\n\n# Predefined preprocessor variables.\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_NAME \"$PACKAGE_NAME\"\n_ACEOF\n\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"\n_ACEOF\n\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_VERSION \"$PACKAGE_VERSION\"\n_ACEOF\n\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_STRING \"$PACKAGE_STRING\"\n_ACEOF\n\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"\n_ACEOF\n\n\n# Let the site file select an alternate cache file if it wants to.\n# Prefer explicitly selected file to automatically selected ones.\nif test -z \"$CONFIG_SITE\"; then\n  if test \"x$prefix\" != xNONE; then\n    CONFIG_SITE=\"$prefix/share/config.site $prefix/etc/config.site\"\n  else\n    CONFIG_SITE=\"$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site\"\n  fi\nfi\nfor ac_site_file in $CONFIG_SITE; do\n  if test -r \"$ac_site_file\"; then\n    { echo \"$as_me:$LINENO: loading site script $ac_site_file\" >&5\necho \"$as_me: loading site script $ac_site_file\" >&6;}\n    sed 's/^/| /' \"$ac_site_file\" >&5\n    . \"$ac_site_file\"\n  fi\ndone\n\nif test -r \"$cache_file\"; then\n  # Some versions of bash will fail to source /dev/null (special\n  # files actually), so we avoid doing that.\n  if test -f \"$cache_file\"; then\n    { echo \"$as_me:$LINENO: loading cache $cache_file\" >&5\necho \"$as_me: loading cache $cache_file\" >&6;}\n    case $cache_file in\n      [\\\\/]* | ?:[\\\\/]* ) . $cache_file;;\n      *)                      . ./$cache_file;;\n    esac\n  fi\nelse\n  { echo \"$as_me:$LINENO: creating cache $cache_file\" >&5\necho \"$as_me: creating cache $cache_file\" >&6;}\n  >$cache_file\nfi\n\n# Check that the precious variables saved in the cache have kept the same\n# value.\nac_cache_corrupted=false\nfor ac_var in `(set) 2>&1 |\n\t       sed -n 's/^ac_env_\\([a-zA-Z_0-9]*\\)_set=.*/\\1/p'`; do\n  eval ac_old_set=\\$ac_cv_env_${ac_var}_set\n  eval ac_new_set=\\$ac_env_${ac_var}_set\n  eval ac_old_val=\"\\$ac_cv_env_${ac_var}_value\"\n  eval ac_new_val=\"\\$ac_env_${ac_var}_value\"\n  case $ac_old_set,$ac_new_set in\n    set,)\n      { echo \"$as_me:$LINENO: error: \\`$ac_var' was set to \\`$ac_old_val' in the previous run\" >&5\necho \"$as_me: error: \\`$ac_var' was set to \\`$ac_old_val' in the previous run\" >&2;}\n      ac_cache_corrupted=: ;;\n    ,set)\n      { echo \"$as_me:$LINENO: error: \\`$ac_var' was not set in the previous run\" >&5\necho \"$as_me: error: \\`$ac_var' was not set in the previous run\" >&2;}\n      ac_cache_corrupted=: ;;\n    ,);;\n    *)\n      if test \"x$ac_old_val\" != \"x$ac_new_val\"; then\n\t{ echo \"$as_me:$LINENO: error: \\`$ac_var' has changed since the previous run:\" >&5\necho \"$as_me: error: \\`$ac_var' has changed since the previous run:\" >&2;}\n\t{ echo \"$as_me:$LINENO:   former value:  $ac_old_val\" >&5\necho \"$as_me:   former value:  $ac_old_val\" >&2;}\n\t{ echo \"$as_me:$LINENO:   current value: $ac_new_val\" >&5\necho \"$as_me:   current value: $ac_new_val\" >&2;}\n\tac_cache_corrupted=:\n      fi;;\n  esac\n  # Pass precious variables to config.status.\n  if test \"$ac_new_set\" = set; then\n    case $ac_new_val in\n    *\" \"*|*\"\t\"*|*[\\[\\]\\~\\#\\$\\^\\&\\*\\(\\)\\{\\}\\\\\\|\\;\\<\\>\\?\\\"\\']*)\n      ac_arg=$ac_var=`echo \"$ac_new_val\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"` ;;\n    *) ac_arg=$ac_var=$ac_new_val ;;\n    esac\n    case \" $ac_configure_args \" in\n      *\" '$ac_arg' \"*) ;; # Avoid dups.  Use of quotes ensures accuracy.\n      *) ac_configure_args=\"$ac_configure_args '$ac_arg'\" ;;\n    esac\n  fi\ndone\nif $ac_cache_corrupted; then\n  { echo \"$as_me:$LINENO: error: changes in the environment can compromise the build\" >&5\necho \"$as_me: error: changes in the environment can compromise the build\" >&2;}\n  { { echo \"$as_me:$LINENO: error: run \\`make distclean' and/or \\`rm $cache_file' and start over\" >&5\necho \"$as_me: error: run \\`make distclean' and/or \\`rm $cache_file' and start over\" >&2;}\n   { (exit 1); exit 1; }; }\nfi\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n  VM_MAJOR=3\n  VM_MINOR=9\n  VM_RELEASE=7\n  SQ_MAJOR=3\n  SQ_MINOR=9a\n  SQ_UPDATE=7024\n\n\ntopdir=`cd ${srcdir}/../../..; pwd`\ncfgdir=`cd ${srcdir}; pwd`\n\n\n# Check whether --with-src or --without-src was given.\nif test \"${with_src+set}\" = set; then\n  withval=\"$with_src\"\n   vmmsrc=\"${with_src}\"\nelse\n   vmmsrc=\"src\"\nfi;\n\nvmmdir=\"${topdir}/${vmmsrc}\"\n\nif test ! -d \"${topdir}/${vmmsrc}\"; then\n  if test -d \"${topdir}/platforms/unix/${vmmsrc}\"; then\n    vmmdir=\"${topdir}/platforms/unix/${vmmsrc}\"\n    echo \"$as_me:$LINENO: result: using built-in src directory\" >&5\necho \"${ECHO_T}using built-in src directory\" >&6\n  fi\nfi\n\necho \"$as_me:$LINENO: result: ${vmmdir}\" >&5\necho \"${ECHO_T}${vmmdir}\" >&6\n\nblddir=`pwd`\n\n\n# Check whether --with-vmmcfg or --without-vmmcfg was given.\nif test \"${with_vmmcfg+set}\" = set; then\n  withval=\"$with_vmmcfg\"\n   vmmcfg=\"${with-vmmcfg}\"\nelse\n   vmmcfg=\"${blddir}\"\nfi;\n\n# Check the generated src dir looks sane\n\n\n  echo \"$as_me:$LINENO: checking sanity of generated src directory\" >&5\necho $ECHO_N \"checking sanity of generated src directory... $ECHO_C\" >&6\n  vmmcheck () {\n    if test ! ${2} ${3}; then\n      echo \"$as_me:$LINENO: result: bad\" >&5\necho \"${ECHO_T}bad\" >&6\n      echo \"missing ${1}: ${3}\"\n      exit 1\n    fi\n  }\n  vmmcheck dir  -d ${vmmcfg}\n  vmmcheck file -f ${vmmcfg}/plugins.int\n  vmmcheck file -f ${vmmcfg}/plugins.ext\n  vmmcheck dir  -d ${vmmdir}\n  vmmcheck dir  -d ${vmmdir}/plugins\n  vmmcheck dir  -d ${vmmdir}/vm\n  vmmcheck file -f ${vmmdir}/vm/cogit.c\n  vmmcheck file -f ${vmmdir}/vm/cogit.h\n  vmmcheck file -f ${vmmdir}/vm/cogmethod.h\n  vmmcheck file -f ${vmmdir}/vm/cointerp.c\n  vmmcheck file -f ${vmmdir}/vm/cointerp.h\n  vmmcheck file -f ${vmmdir}/vm/gcc3x-cointerp.c\n  echo \"$as_me:$LINENO: result: okay\" >&5\necho \"${ECHO_T}okay\" >&6\n\n\n\n\n\n\n\nSQ_VERSION=${SQ_MAJOR}.${SQ_MINOR}-${SQ_UPDATE}\n\ncat >>confdefs.h <<_ACEOF\n#define SQ_VERSION \"${SQ_VERSION}\"\n_ACEOF\n\n\n\n\n\n\n\nVM_VERSION=${VM_MAJOR}.${VM_MINOR}-${VM_RELEASE}\n\ncat >>confdefs.h <<_ACEOF\n#define VM_VERSION \"${VM_VERSION}\"\n_ACEOF\n\n\n\n\n\n\n\n# libdir contains ${exec_prefix}, so we have to default and expand early\ntest \"x$prefix\" = xNONE && prefix=$ac_default_prefix\ntest \"x$exec_prefix\" = xNONE && exec_prefix='${prefix}'\nimgdir=`eval echo ${libdir}/squeak`\nexpanded_relative_imgdir=`eval echo lib/squeak/${VM_VERSION}`\nplgdir='${imgdir}/'`eval echo ${VM_VERSION}`\n\n\n\n\n\ncat >>confdefs.h <<\\_ACEOF\n#define OS_TYPE \"unix\"\n_ACEOF\n\n\nac_aux_dir=\nfor ac_dir in $srcdir $srcdir/.. $srcdir/../..; do\n  if test -f $ac_dir/install-sh; then\n    ac_aux_dir=$ac_dir\n    ac_install_sh=\"$ac_aux_dir/install-sh -c\"\n    break\n  elif test -f $ac_dir/install.sh; then\n    ac_aux_dir=$ac_dir\n    ac_install_sh=\"$ac_aux_dir/install.sh -c\"\n    break\n  elif test -f $ac_dir/shtool; then\n    ac_aux_dir=$ac_dir\n    ac_install_sh=\"$ac_aux_dir/shtool install -c\"\n    break\n  fi\ndone\nif test -z \"$ac_aux_dir\"; then\n  { { echo \"$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../..\" >&5\necho \"$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../..\" >&2;}\n   { (exit 1); exit 1; }; }\nfi\nac_config_guess=\"$SHELL $ac_aux_dir/config.guess\"\nac_config_sub=\"$SHELL $ac_aux_dir/config.sub\"\nac_configure=\"$SHELL $ac_aux_dir/configure\" # This should be Cygnus configure.\n\n# Make sure we can run config.sub.\n$ac_config_sub sun4 >/dev/null 2>&1 ||\n  { { echo \"$as_me:$LINENO: error: cannot run $ac_config_sub\" >&5\necho \"$as_me: error: cannot run $ac_config_sub\" >&2;}\n   { (exit 1); exit 1; }; }\n\necho \"$as_me:$LINENO: checking build system type\" >&5\necho $ECHO_N \"checking build system type... $ECHO_C\" >&6\nif test \"${ac_cv_build+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_cv_build_alias=$build_alias\ntest -z \"$ac_cv_build_alias\" &&\n  ac_cv_build_alias=`$ac_config_guess`\ntest -z \"$ac_cv_build_alias\" &&\n  { { echo \"$as_me:$LINENO: error: cannot guess build type; you must specify one\" >&5\necho \"$as_me: error: cannot guess build type; you must specify one\" >&2;}\n   { (exit 1); exit 1; }; }\nac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||\n  { { echo \"$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed\" >&5\necho \"$as_me: error: $ac_config_sub $ac_cv_build_alias failed\" >&2;}\n   { (exit 1); exit 1; }; }\n\nfi\necho \"$as_me:$LINENO: result: $ac_cv_build\" >&5\necho \"${ECHO_T}$ac_cv_build\" >&6\nbuild=$ac_cv_build\nbuild_cpu=`echo $ac_cv_build | sed 's/^\\([^-]*\\)-\\([^-]*\\)-\\(.*\\)$/\\1/'`\nbuild_vendor=`echo $ac_cv_build | sed 's/^\\([^-]*\\)-\\([^-]*\\)-\\(.*\\)$/\\2/'`\nbuild_os=`echo $ac_cv_build | sed 's/^\\([^-]*\\)-\\([^-]*\\)-\\(.*\\)$/\\3/'`\n\n\necho \"$as_me:$LINENO: checking host system type\" >&5\necho $ECHO_N \"checking host system type... $ECHO_C\" >&6\nif test \"${ac_cv_host+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_cv_host_alias=$host_alias\ntest -z \"$ac_cv_host_alias\" &&\n  ac_cv_host_alias=$ac_cv_build_alias\nac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||\n  { { echo \"$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed\" >&5\necho \"$as_me: error: $ac_config_sub $ac_cv_host_alias failed\" >&2;}\n   { (exit 1); exit 1; }; }\n\nfi\necho \"$as_me:$LINENO: result: $ac_cv_host\" >&5\necho \"${ECHO_T}$ac_cv_host\" >&6\nhost=$ac_cv_host\nhost_cpu=`echo $ac_cv_host | sed 's/^\\([^-]*\\)-\\([^-]*\\)-\\(.*\\)$/\\1/'`\nhost_vendor=`echo $ac_cv_host | sed 's/^\\([^-]*\\)-\\([^-]*\\)-\\(.*\\)$/\\2/'`\nhost_os=`echo $ac_cv_host | sed 's/^\\([^-]*\\)-\\([^-]*\\)-\\(.*\\)$/\\3/'`\n\n\n\nhost_cpu=`echo $host | sed 's,-.*,,'`\nhost=`echo $host | sed 's,-unknown,,'`\n\n\n\n\n\n\ncat >>confdefs.h <<_ACEOF\n#define VM_HOST \"$host\"\n_ACEOF\n\ncat >>confdefs.h <<_ACEOF\n#define VM_HOST_OS \"$host_os\"\n_ACEOF\n\ncat >>confdefs.h <<_ACEOF\n#define VM_HOST_CPU \"$host_cpu\"\n_ACEOF\n\n\necho\necho \"Configuring Squeak ${VM_VERSION} (${SQ_VERSION}) for ${host}\"\necho\n\n# Checks for programs.\n\n\n# Check whether --with-gnu-awk or --without-gnu-awk was given.\nif test \"${with_gnu_awk+set}\" = set; then\n  withval=\"$with_gnu_awk\"\n  GAWK=\"$withval\"\nelse\n  case $host_os in\n  darwin*)\tGAWK=\"yes\";;\n  *)\t\tGAWK=\"unknown\";;\nesac\nfi;\n\n\n# Check whether --with-gnu-as or --without-gnu-as was given.\nif test \"${with_gnu_as+set}\" = set; then\n  withval=\"$with_gnu_as\"\n  GAS=\"$withval\"\nelse\n  GAS=\"unknown\"\nfi;\n\necho \"$as_me:$LINENO: checking whether ${MAKE-make} sets \\$(MAKE)\" >&5\necho $ECHO_N \"checking whether ${MAKE-make} sets \\$(MAKE)... $ECHO_C\" >&6\nset dummy ${MAKE-make}; ac_make=`echo \"$2\" | sed 'y,:./+-,___p_,'`\nif eval \"test \\\"\\${ac_cv_prog_make_${ac_make}_set+set}\\\" = set\"; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.make <<\\_ACEOF\nall:\n\t@echo 'ac_maketemp=\"$(MAKE)\"'\n_ACEOF\n# GNU make sometimes prints \"make[1]: Entering...\", which would confuse us.\neval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`\nif test -n \"$ac_maketemp\"; then\n  eval ac_cv_prog_make_${ac_make}_set=yes\nelse\n  eval ac_cv_prog_make_${ac_make}_set=no\nfi\nrm -f conftest.make\nfi\nif eval \"test \\\"`echo '$ac_cv_prog_make_'${ac_make}_set`\\\" = yes\"; then\n  echo \"$as_me:$LINENO: result: yes\" >&5\necho \"${ECHO_T}yes\" >&6\n  SET_MAKE=\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\n  SET_MAKE=\"MAKE=${MAKE-make}\"\nfi\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\nif test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}gcc\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}gcc; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_CC+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$CC\"; then\n  ac_cv_prog_CC=\"$CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_CC=\"${ac_tool_prefix}gcc\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nCC=$ac_cv_prog_CC\nif test -n \"$CC\"; then\n  echo \"$as_me:$LINENO: result: $CC\" >&5\necho \"${ECHO_T}$CC\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\nfi\nif test -z \"$ac_cv_prog_CC\"; then\n  ac_ct_CC=$CC\n  # Extract the first word of \"gcc\", so it can be a program name with args.\nset dummy gcc; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_ac_ct_CC+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$ac_ct_CC\"; then\n  ac_cv_prog_ac_ct_CC=\"$ac_ct_CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_CC=\"gcc\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nac_ct_CC=$ac_cv_prog_ac_ct_CC\nif test -n \"$ac_ct_CC\"; then\n  echo \"$as_me:$LINENO: result: $ac_ct_CC\" >&5\necho \"${ECHO_T}$ac_ct_CC\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\n  CC=$ac_ct_CC\nelse\n  CC=\"$ac_cv_prog_CC\"\nfi\n\nif test -z \"$CC\"; then\n  if test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}cc\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}cc; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_CC+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$CC\"; then\n  ac_cv_prog_CC=\"$CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_CC=\"${ac_tool_prefix}cc\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nCC=$ac_cv_prog_CC\nif test -n \"$CC\"; then\n  echo \"$as_me:$LINENO: result: $CC\" >&5\necho \"${ECHO_T}$CC\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\nfi\nif test -z \"$ac_cv_prog_CC\"; then\n  ac_ct_CC=$CC\n  # Extract the first word of \"cc\", so it can be a program name with args.\nset dummy cc; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_ac_ct_CC+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$ac_ct_CC\"; then\n  ac_cv_prog_ac_ct_CC=\"$ac_ct_CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_CC=\"cc\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nac_ct_CC=$ac_cv_prog_ac_ct_CC\nif test -n \"$ac_ct_CC\"; then\n  echo \"$as_me:$LINENO: result: $ac_ct_CC\" >&5\necho \"${ECHO_T}$ac_ct_CC\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\n  CC=$ac_ct_CC\nelse\n  CC=\"$ac_cv_prog_CC\"\nfi\n\nfi\nif test -z \"$CC\"; then\n  # Extract the first word of \"cc\", so it can be a program name with args.\nset dummy cc; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_CC+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$CC\"; then\n  ac_cv_prog_CC=\"$CC\" # Let the user override the test.\nelse\n  ac_prog_rejected=no\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    if test \"$as_dir/$ac_word$ac_exec_ext\" = \"/usr/ucb/cc\"; then\n       ac_prog_rejected=yes\n       continue\n     fi\n    ac_cv_prog_CC=\"cc\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nif test $ac_prog_rejected = yes; then\n  # We found a bogon in the path, so make sure we never use it.\n  set dummy $ac_cv_prog_CC\n  shift\n  if test $# != 0; then\n    # We chose a different compiler from the bogus one.\n    # However, it has the same basename, so the bogon will be chosen\n    # first if we set CC to just the basename; use the full file name.\n    shift\n    ac_cv_prog_CC=\"$as_dir/$ac_word${1+' '}$@\"\n  fi\nfi\nfi\nfi\nCC=$ac_cv_prog_CC\nif test -n \"$CC\"; then\n  echo \"$as_me:$LINENO: result: $CC\" >&5\necho \"${ECHO_T}$CC\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\nfi\nif test -z \"$CC\"; then\n  if test -n \"$ac_tool_prefix\"; then\n  for ac_prog in cl\n  do\n    # Extract the first word of \"$ac_tool_prefix$ac_prog\", so it can be a program name with args.\nset dummy $ac_tool_prefix$ac_prog; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_CC+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$CC\"; then\n  ac_cv_prog_CC=\"$CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_CC=\"$ac_tool_prefix$ac_prog\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nCC=$ac_cv_prog_CC\nif test -n \"$CC\"; then\n  echo \"$as_me:$LINENO: result: $CC\" >&5\necho \"${ECHO_T}$CC\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\n    test -n \"$CC\" && break\n  done\nfi\nif test -z \"$CC\"; then\n  ac_ct_CC=$CC\n  for ac_prog in cl\ndo\n  # Extract the first word of \"$ac_prog\", so it can be a program name with args.\nset dummy $ac_prog; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_ac_ct_CC+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$ac_ct_CC\"; then\n  ac_cv_prog_ac_ct_CC=\"$ac_ct_CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_CC=\"$ac_prog\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nac_ct_CC=$ac_cv_prog_ac_ct_CC\nif test -n \"$ac_ct_CC\"; then\n  echo \"$as_me:$LINENO: result: $ac_ct_CC\" >&5\necho \"${ECHO_T}$ac_ct_CC\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\n  test -n \"$ac_ct_CC\" && break\ndone\n\n  CC=$ac_ct_CC\nfi\n\nfi\n\n\ntest -z \"$CC\" && { { echo \"$as_me:$LINENO: error: no acceptable C compiler found in \\$PATH\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: no acceptable C compiler found in \\$PATH\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 1); exit 1; }; }\n\n# Provide some information about the compiler.\necho \"$as_me:$LINENO:\" \\\n     \"checking for C compiler version\" >&5\nac_compiler=`set X $ac_compile; echo $2`\n{ (eval echo \"$as_me:$LINENO: \\\"$ac_compiler --version </dev/null >&5\\\"\") >&5\n  (eval $ac_compiler --version </dev/null >&5) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }\n{ (eval echo \"$as_me:$LINENO: \\\"$ac_compiler -v </dev/null >&5\\\"\") >&5\n  (eval $ac_compiler -v </dev/null >&5) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }\n{ (eval echo \"$as_me:$LINENO: \\\"$ac_compiler -V </dev/null >&5\\\"\") >&5\n  (eval $ac_compiler -V </dev/null >&5) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }\n\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nac_clean_files_save=$ac_clean_files\nac_clean_files=\"$ac_clean_files a.out a.exe b.out\"\n# Try to create an executable without -o first, disregard a.out.\n# It will help us diagnose broken compilers, and finding out an intuition\n# of exeext.\necho \"$as_me:$LINENO: checking for C compiler default output file name\" >&5\necho $ECHO_N \"checking for C compiler default output file name... $ECHO_C\" >&6\nac_link_default=`echo \"$ac_link\" | sed 's/ -o *conftest[^ ]*//'`\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link_default\\\"\") >&5\n  (eval $ac_link_default) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; then\n  # Find the output, starting from the most likely.  This scheme is\n# not robust to junk in `.', hence go to wildcards (a.*) only as a last\n# resort.\n\n# Be careful to initialize this variable, since it used to be cached.\n# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.\nac_cv_exeext=\n# b.out is created by i960 compilers.\nfor ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out\ndo\n  test -f \"$ac_file\" || continue\n  case $ac_file in\n    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )\n\t;;\n    conftest.$ac_ext )\n\t# This is the source file.\n\t;;\n    [ab].out )\n\t# We found the default executable, but exeext='' is most\n\t# certainly right.\n\tbreak;;\n    *.* )\n\tac_cv_exeext=`expr \"$ac_file\" : '[^.]*\\(\\..*\\)'`\n\t# FIXME: I believe we export ac_cv_exeext for Libtool,\n\t# but it would be cool to find out if it's true.  Does anybody\n\t# maintain Libtool? --akim.\n\texport ac_cv_exeext\n\tbreak;;\n    * )\n\tbreak;;\n  esac\ndone\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n{ { echo \"$as_me:$LINENO: error: C compiler cannot create executables\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: C compiler cannot create executables\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 77); exit 77; }; }\nfi\n\nac_exeext=$ac_cv_exeext\necho \"$as_me:$LINENO: result: $ac_file\" >&5\necho \"${ECHO_T}$ac_file\" >&6\n\n# Check the compiler produces executables we can run.  If not, either\n# the compiler is broken, or we cross compile.\necho \"$as_me:$LINENO: checking whether the C compiler works\" >&5\necho $ECHO_N \"checking whether the C compiler works... $ECHO_C\" >&6\n# FIXME: These cross compiler hacks should be removed for Autoconf 3.0\n# If not cross compiling, check that we can run a simple program.\nif test \"$cross_compiling\" != yes; then\n  if { ac_try='./$ac_file'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n    cross_compiling=no\n  else\n    if test \"$cross_compiling\" = maybe; then\n\tcross_compiling=yes\n    else\n\t{ { echo \"$as_me:$LINENO: error: cannot run C compiled programs.\nIf you meant to cross compile, use \\`--host'.\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: cannot run C compiled programs.\nIf you meant to cross compile, use \\`--host'.\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 1); exit 1; }; }\n    fi\n  fi\nfi\necho \"$as_me:$LINENO: result: yes\" >&5\necho \"${ECHO_T}yes\" >&6\n\nrm -f a.out a.exe conftest$ac_cv_exeext b.out\nac_clean_files=$ac_clean_files_save\n# Check the compiler produces executables we can run.  If not, either\n# the compiler is broken, or we cross compile.\necho \"$as_me:$LINENO: checking whether we are cross compiling\" >&5\necho $ECHO_N \"checking whether we are cross compiling... $ECHO_C\" >&6\necho \"$as_me:$LINENO: result: $cross_compiling\" >&5\necho \"${ECHO_T}$cross_compiling\" >&6\n\necho \"$as_me:$LINENO: checking for suffix of executables\" >&5\necho $ECHO_N \"checking for suffix of executables... $ECHO_C\" >&6\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; then\n  # If both `conftest.exe' and `conftest' are `present' (well, observable)\n# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will\n# work properly (i.e., refer to `conftest.exe'), while it won't with\n# `rm'.\nfor ac_file in conftest.exe conftest conftest.*; do\n  test -f \"$ac_file\" || continue\n  case $ac_file in\n    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;\n    *.* ) ac_cv_exeext=`expr \"$ac_file\" : '[^.]*\\(\\..*\\)'`\n\t  export ac_cv_exeext\n\t  break;;\n    * ) break;;\n  esac\ndone\nelse\n  { { echo \"$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: cannot compute suffix of executables: cannot compile and link\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 1); exit 1; }; }\nfi\n\nrm -f conftest$ac_cv_exeext\necho \"$as_me:$LINENO: result: $ac_cv_exeext\" >&5\necho \"${ECHO_T}$ac_cv_exeext\" >&6\n\nrm -f conftest.$ac_ext\nEXEEXT=$ac_cv_exeext\nac_exeext=$EXEEXT\necho \"$as_me:$LINENO: checking for suffix of object files\" >&5\necho $ECHO_N \"checking for suffix of object files... $ECHO_C\" >&6\nif test \"${ac_cv_objext+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.o conftest.obj\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; then\n  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do\n  case $ac_file in\n    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;\n    *) ac_cv_objext=`expr \"$ac_file\" : '.*\\.\\(.*\\)'`\n       break;;\n  esac\ndone\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n{ { echo \"$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: cannot compute suffix of object files: cannot compile\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 1); exit 1; }; }\nfi\n\nrm -f conftest.$ac_cv_objext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_objext\" >&5\necho \"${ECHO_T}$ac_cv_objext\" >&6\nOBJEXT=$ac_cv_objext\nac_objext=$OBJEXT\necho \"$as_me:$LINENO: checking whether we are using the GNU C compiler\" >&5\necho $ECHO_N \"checking whether we are using the GNU C compiler... $ECHO_C\" >&6\nif test \"${ac_cv_c_compiler_gnu+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n#ifndef __GNUC__\n       choke me\n#endif\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_compiler_gnu=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_compiler_gnu=no\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nac_cv_c_compiler_gnu=$ac_compiler_gnu\n\nfi\necho \"$as_me:$LINENO: result: $ac_cv_c_compiler_gnu\" >&5\necho \"${ECHO_T}$ac_cv_c_compiler_gnu\" >&6\nGCC=`test $ac_compiler_gnu = yes && echo yes`\nac_test_CFLAGS=${CFLAGS+set}\nac_save_CFLAGS=$CFLAGS\nCFLAGS=\"-g\"\necho \"$as_me:$LINENO: checking whether $CC accepts -g\" >&5\necho $ECHO_N \"checking whether $CC accepts -g... $ECHO_C\" >&6\nif test \"${ac_cv_prog_cc_g+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_prog_cc_g=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_prog_cc_g=no\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_prog_cc_g\" >&5\necho \"${ECHO_T}$ac_cv_prog_cc_g\" >&6\nif test \"$ac_test_CFLAGS\" = set; then\n  CFLAGS=$ac_save_CFLAGS\nelif test $ac_cv_prog_cc_g = yes; then\n  if test \"$GCC\" = yes; then\n    CFLAGS=\"-g -O2\"\n  else\n    CFLAGS=\"-g\"\n  fi\nelse\n  if test \"$GCC\" = yes; then\n    CFLAGS=\"-O2\"\n  else\n    CFLAGS=\n  fi\nfi\necho \"$as_me:$LINENO: checking for $CC option to accept ANSI C\" >&5\necho $ECHO_N \"checking for $CC option to accept ANSI C... $ECHO_C\" >&6\nif test \"${ac_cv_prog_cc_stdc+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_cv_prog_cc_stdc=no\nac_save_CC=$CC\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <stdarg.h>\n#include <stdio.h>\n#include <sys/types.h>\n#include <sys/stat.h>\n/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */\nstruct buf { int x; };\nFILE * (*rcsopen) (struct buf *, struct stat *, int);\nstatic char *e (p, i)\n     char **p;\n     int i;\n{\n  return p[i];\n}\nstatic char *f (char * (*g) (char **, int), char **p, ...)\n{\n  char *s;\n  va_list v;\n  va_start (v,p);\n  s = g (p, va_arg (v,int));\n  va_end (v);\n  return s;\n}\n\n/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has\n   function prototypes and stuff, but not '\\xHH' hex character constants.\n   These don't provoke an error unfortunately, instead are silently treated\n   as 'x'.  The following induces an error, until -std1 is added to get\n   proper ANSI mode.  Curiously '\\x00'!='x' always comes out true, for an\n   array size at least.  It's necessary to write '\\x00'==0 to get something\n   that's true only with -std1.  */\nint osf4_cc_array ['\\x00' == 0 ? 1 : -1];\n\nint test (int i, double x);\nstruct s1 {int (*f) (int a);};\nstruct s2 {int (*f) (double a);};\nint pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);\nint argc;\nchar **argv;\nint\nmain ()\n{\nreturn f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];\n  ;\n  return 0;\n}\n_ACEOF\n# Don't try gcc -ansi; that turns off useful extensions and\n# breaks some systems' header files.\n# AIX\t\t\t-qlanglvl=ansi\n# Ultrix and OSF/1\t-std1\n# HP-UX 10.20 and later\t-Ae\n# HP-UX older versions\t-Aa -D_HPUX_SOURCE\n# SVR4\t\t\t-Xc -D__EXTENSIONS__\nfor ac_arg in \"\" -qlanglvl=ansi -std1 -Ae \"-Aa -D_HPUX_SOURCE\" \"-Xc -D__EXTENSIONS__\"\ndo\n  CC=\"$ac_save_CC $ac_arg\"\n  rm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_prog_cc_stdc=$ac_arg\nbreak\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nfi\nrm -f conftest.err conftest.$ac_objext\ndone\nrm -f conftest.$ac_ext conftest.$ac_objext\nCC=$ac_save_CC\n\nfi\n\ncase \"x$ac_cv_prog_cc_stdc\" in\n  x|xno)\n    echo \"$as_me:$LINENO: result: none needed\" >&5\necho \"${ECHO_T}none needed\" >&6 ;;\n  *)\n    echo \"$as_me:$LINENO: result: $ac_cv_prog_cc_stdc\" >&5\necho \"${ECHO_T}$ac_cv_prog_cc_stdc\" >&6\n    CC=\"$CC $ac_cv_prog_cc_stdc\" ;;\nesac\n\n# Some people use a C++ compiler to compile C.  Since we use `exit',\n# in C++ we need to declare it.  In case someone uses the same compiler\n# for both compiling C and C++ we need to have the C++ compiler decide\n# the declaration of exit, since it's the most demanding environment.\ncat >conftest.$ac_ext <<_ACEOF\n#ifndef __cplusplus\n  choke me\n#endif\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  for ac_declaration in \\\n   '' \\\n   'extern \"C\" void std::exit (int) throw (); using std::exit;' \\\n   'extern \"C\" void std::exit (int); using std::exit;' \\\n   'extern \"C\" void exit (int) throw ();' \\\n   'extern \"C\" void exit (int);' \\\n   'void exit (int);'\ndo\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_declaration\n#include <stdlib.h>\nint\nmain ()\n{\nexit (42);\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  :\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\ncontinue\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_declaration\nint\nmain ()\n{\nexit (42);\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  break\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\ndone\nrm -f conftest*\nif test -n \"$ac_declaration\"; then\n  echo '#ifdef __cplusplus' >>confdefs.h\n  echo $ac_declaration      >>confdefs.h\n  echo '#endif'             >>confdefs.h\nfi\n\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\ntest \"$GCC\" = yes && WFLAGS=\"-Wall -Wno-unknown-pragmas\"\n\n# Extract the first word of \"as\", so it can be a program name with args.\nset dummy as; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_AS+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$AS\"; then\n  ac_cv_prog_AS=\"$AS\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_AS=\"as\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nAS=$ac_cv_prog_AS\nif test -n \"$AS\"; then\n  echo \"$as_me:$LINENO: result: $AS\" >&5\necho \"${ECHO_T}$AS\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\necho \"$as_me:$LINENO: checking for GNU as\" >&5\necho $ECHO_N \"checking for GNU as... $ECHO_C\" >&6\ncase \"$GAS\" in\nyes|no) ;;\n*) if test \"$AS\" = \"as\" && as -v /dev/null </dev/null 2>&1 | fgrep -i gnu >/dev/null\n   then GAS=yes\n   else GAS=no\n   fi ;;\nesac\necho \"$as_me:$LINENO: result: $GAS\" >&5\necho \"${ECHO_T}$GAS\" >&6\nif test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}ranlib\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}ranlib; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_RANLIB+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$RANLIB\"; then\n  ac_cv_prog_RANLIB=\"$RANLIB\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_RANLIB=\"${ac_tool_prefix}ranlib\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nRANLIB=$ac_cv_prog_RANLIB\nif test -n \"$RANLIB\"; then\n  echo \"$as_me:$LINENO: result: $RANLIB\" >&5\necho \"${ECHO_T}$RANLIB\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\nfi\nif test -z \"$ac_cv_prog_RANLIB\"; then\n  ac_ct_RANLIB=$RANLIB\n  # Extract the first word of \"ranlib\", so it can be a program name with args.\nset dummy ranlib; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_ac_ct_RANLIB+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$ac_ct_RANLIB\"; then\n  ac_cv_prog_ac_ct_RANLIB=\"$ac_ct_RANLIB\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_RANLIB=\"ranlib\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\n  test -z \"$ac_cv_prog_ac_ct_RANLIB\" && ac_cv_prog_ac_ct_RANLIB=\":\"\nfi\nfi\nac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB\nif test -n \"$ac_ct_RANLIB\"; then\n  echo \"$as_me:$LINENO: result: $ac_ct_RANLIB\" >&5\necho \"${ECHO_T}$ac_ct_RANLIB\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\n  RANLIB=$ac_ct_RANLIB\nelse\n  RANLIB=\"$ac_cv_prog_RANLIB\"\nfi\n\n# Find a good install program.  We prefer a C program (faster),\n# so one script is as good as another.  But avoid the broken or\n# incompatible versions:\n# SysV /etc/install, /usr/sbin/install\n# SunOS /usr/etc/install\n# IRIX /sbin/install\n# AIX /bin/install\n# AmigaOS /C/install, which installs bootblocks on floppy discs\n# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag\n# AFS /usr/afsws/bin/install, which mishandles nonexistent args\n# SVR4 /usr/ucb/install, which tries to use the nonexistent group \"staff\"\n# OS/2's system install, which has a completely different semantic\n# ./install, which can be erroneously created by make from ./install.sh.\necho \"$as_me:$LINENO: checking for a BSD-compatible install\" >&5\necho $ECHO_N \"checking for a BSD-compatible install... $ECHO_C\" >&6\nif test -z \"$INSTALL\"; then\nif test \"${ac_cv_path_install+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  # Account for people who put trailing slashes in PATH elements.\ncase $as_dir/ in\n  ./ | .// | /cC/* | \\\n  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \\\n  ?:\\\\/os2\\\\/install\\\\/* | ?:\\\\/OS2\\\\/INSTALL\\\\/* | \\\n  /usr/ucb/* ) ;;\n  *)\n    # OSF1 and SCO ODT 3.0 have their own names for install.\n    # Don't use installbsd from OSF since it installs stuff as root\n    # by default.\n    for ac_prog in ginstall scoinst install; do\n      for ac_exec_ext in '' $ac_executable_extensions; do\n\tif $as_executable_p \"$as_dir/$ac_prog$ac_exec_ext\"; then\n\t  if test $ac_prog = install &&\n\t    grep dspmsg \"$as_dir/$ac_prog$ac_exec_ext\" >/dev/null 2>&1; then\n\t    # AIX install.  It has an incompatible calling convention.\n\t    :\n\t  elif test $ac_prog = install &&\n\t    grep pwplus \"$as_dir/$ac_prog$ac_exec_ext\" >/dev/null 2>&1; then\n\t    # program-specific install script used by HP pwplus--don't use.\n\t    :\n\t  else\n\t    ac_cv_path_install=\"$as_dir/$ac_prog$ac_exec_ext -c\"\n\t    break 3\n\t  fi\n\tfi\n      done\n    done\n    ;;\nesac\ndone\n\n\nfi\n  if test \"${ac_cv_path_install+set}\" = set; then\n    INSTALL=$ac_cv_path_install\n  else\n    # As a last resort, use the slow shell script.  We don't cache a\n    # path for INSTALL within a source directory, because that will\n    # break other packages using the cache if that directory is\n    # removed, or if the path is relative.\n    INSTALL=$ac_install_sh\n  fi\nfi\necho \"$as_me:$LINENO: result: $INSTALL\" >&5\necho \"${ECHO_T}$INSTALL\" >&6\n\n# Use test -z because SunOS4 sh mishandles braces in ${var-val}.\n# It thinks the first close brace ends the variable substitution.\ntest -z \"$INSTALL_PROGRAM\" && INSTALL_PROGRAM='${INSTALL}'\n\ntest -z \"$INSTALL_SCRIPT\" && INSTALL_SCRIPT='${INSTALL}'\n\ntest -z \"$INSTALL_DATA\" && INSTALL_DATA='${INSTALL} -m 644'\n\necho \"$as_me:$LINENO: checking for BSD-compatible nm\" >&5\necho $ECHO_N \"checking for BSD-compatible nm... $ECHO_C\" >&6\nif test \"${lt_cv_path_NM+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$NM\"; then\n  # Let the user override the test.\n  lt_cv_path_NM=\"$NM\"\nelse\n  lt_nm_to_check=\"${ac_tool_prefix}nm\"\n  if test -n \"$ac_tool_prefix\" && test \"$build\" = \"$host\"; then\n    lt_nm_to_check=\"$lt_nm_to_check nm\"\n  fi\n  for lt_tmp_nm in $lt_nm_to_check; do\n    lt_save_ifs=\"$IFS\"; IFS=$PATH_SEPARATOR\n    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do\n      IFS=\"$lt_save_ifs\"\n      test -z \"$ac_dir\" && ac_dir=.\n      tmp_nm=\"$ac_dir/$lt_tmp_nm\"\n      if test -f \"$tmp_nm\" || test -f \"$tmp_nm$ac_exeext\" ; then\n\t# Check to see if the nm accepts a BSD-compat flag.\n\t# Adding the `sed 1q' prevents false positives on HP-UX, which says:\n\t#   nm: unknown option \"B\" ignored\n\t# Tru64's nm complains that /dev/null is an invalid object file\n\tcase `\"$tmp_nm\" -B /dev/null 2>&1 | sed '1q'` in\n\t*/dev/null* | *'Invalid file or object type'*)\n\t  lt_cv_path_NM=\"$tmp_nm -B\"\n\t  break\n\t  ;;\n\t*)\n\t  case `\"$tmp_nm\" -p /dev/null 2>&1 | sed '1q'` in\n\t  */dev/null*)\n\t    lt_cv_path_NM=\"$tmp_nm -p\"\n\t    break\n\t    ;;\n\t  *)\n\t    lt_cv_path_NM=${lt_cv_path_NM=\"$tmp_nm\"} # keep the first match, but\n\t    continue # so that we can try to find one that supports BSD flags\n\t    ;;\n\t  esac\n\t  ;;\n\tesac\n      fi\n    done\n    IFS=\"$lt_save_ifs\"\n  done\n  test -z \"$lt_cv_path_NM\" && lt_cv_path_NM=nm\nfi\nfi\necho \"$as_me:$LINENO: result: $lt_cv_path_NM\" >&5\necho \"${ECHO_T}$lt_cv_path_NM\" >&6\nNM=\"$lt_cv_path_NM\"\n\n\n# Extract the first word of \"ln\", so it can be a program name with args.\nset dummy ln; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_LN+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$LN\"; then\n  ac_cv_prog_LN=\"$LN\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_LN=\"ln\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nLN=$ac_cv_prog_LN\nif test -n \"$LN\"; then\n  echo \"$as_me:$LINENO: result: $LN\" >&5\necho \"${ECHO_T}$LN\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\n\n# Check size assumptions of basic data types\n\n\n\n  echo \"$as_me:$LINENO: checking \\\"size of int\\\"\" >&5\necho $ECHO_N \"checking \\\"size of int\\\"... $ECHO_C\" >&6\n  if test \"$cross_compiling\" = yes; then\n  { { echo \"$as_me:$LINENO: error: cannot run test program while cross compiling\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: cannot run test program while cross compiling\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 1); exit 1; }; }\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <sys/types.h>\n\t      int main(){return(sizeof(int) == 4)?0:1;}\n_ACEOF\nrm -f conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  echo \"$as_me:$LINENO: result: \\\"okay\\\"\" >&5\necho \"${ECHO_T}\\\"okay\\\"\" >&6\nelse\n  echo \"$as_me: program exited with status $ac_status\" >&5\necho \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n( exit $ac_status )\necho \"$as_me:$LINENO: result: \\\"bad\\\"\" >&5\necho \"${ECHO_T}\\\"bad\\\"\" >&6\n    { { echo \"$as_me:$LINENO: error: \\\"one or more basic data types has an incompatible size: giving up\\\"\" >&5\necho \"$as_me: error: \\\"one or more basic data types has an incompatible size: giving up\\\"\" >&2;}\n   { (exit 1); exit 1; }; }\nfi\nrm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext\nfi\n\n  echo \"$as_me:$LINENO: checking \\\"size of double\\\"\" >&5\necho $ECHO_N \"checking \\\"size of double\\\"... $ECHO_C\" >&6\n  if test \"$cross_compiling\" = yes; then\n  { { echo \"$as_me:$LINENO: error: cannot run test program while cross compiling\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: cannot run test program while cross compiling\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 1); exit 1; }; }\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <sys/types.h>\n\t      int main(){return(sizeof(double) == 8)?0:1;}\n_ACEOF\nrm -f conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  echo \"$as_me:$LINENO: result: \\\"okay\\\"\" >&5\necho \"${ECHO_T}\\\"okay\\\"\" >&6\nelse\n  echo \"$as_me: program exited with status $ac_status\" >&5\necho \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n( exit $ac_status )\necho \"$as_me:$LINENO: result: \\\"bad\\\"\" >&5\necho \"${ECHO_T}\\\"bad\\\"\" >&6\n    { { echo \"$as_me:$LINENO: error: \\\"one or more basic data types has an incompatible size: giving up\\\"\" >&5\necho \"$as_me: error: \\\"one or more basic data types has an incompatible size: giving up\\\"\" >&2;}\n   { (exit 1); exit 1; }; }\nfi\nrm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext\nfi\n\n\n  echo \"$as_me:$LINENO: checking for 64-bit integer type\" >&5\necho $ECHO_N \"checking for 64-bit integer type... $ECHO_C\" >&6\nif test \"${ac_cv_int64_t+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test \"$cross_compiling\" = yes; then\n  { { echo \"$as_me:$LINENO: error: cannot run test program while cross compiling\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: cannot run test program while cross compiling\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 1); exit 1; }; }\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\nint main(){return(sizeof(long) == 8)?0:1;}\n_ACEOF\nrm -f conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_int64_t=\"long\"\nelse\n  echo \"$as_me: program exited with status $ac_status\" >&5\necho \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n( exit $ac_status )\nif test \"$cross_compiling\" = yes; then\n  { { echo \"$as_me:$LINENO: error: cannot run test program while cross compiling\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: cannot run test program while cross compiling\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 1); exit 1; }; }\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\nint main(){return(sizeof(long long) == 8)?0:1;}\n_ACEOF\nrm -f conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_int64_t=\"long long\"\nelse\n  echo \"$as_me: program exited with status $ac_status\" >&5\necho \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n( exit $ac_status )\nac_cv_int64_t=\"no\"\nfi\nrm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext\nfi\nfi\nrm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext\nfi\nfi\necho \"$as_me:$LINENO: result: $ac_cv_int64_t\" >&5\necho \"${ECHO_T}$ac_cv_int64_t\" >&6\n  if test \"$ac_cv_int64_t\" = \"\"; then\n    { { echo \"$as_me:$LINENO: error: could not find a 64-bit integer type\" >&5\necho \"$as_me: error: could not find a 64-bit integer type\" >&2;}\n   { (exit 1); exit 1; }; }\n  fi\n  SQUEAK_INT64_T=\"$ac_cv_int64_t\"\n  cat >>confdefs.h <<_ACEOF\n#define squeakInt64 $ac_cv_int64_t\n_ACEOF\n\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\necho \"$as_me:$LINENO: checking how to run the C preprocessor\" >&5\necho $ECHO_N \"checking how to run the C preprocessor... $ECHO_C\" >&6\n# On Suns, sometimes $CPP names a directory.\nif test -n \"$CPP\" && test -d \"$CPP\"; then\n  CPP=\nfi\nif test -z \"$CPP\"; then\n  if test \"${ac_cv_prog_CPP+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n      # Double quotes because CPP needs to be expanded\n    for CPP in \"$CC -E\" \"$CC -E -traditional-cpp\" \"/lib/cpp\"\n    do\n      ac_preproc_ok=false\nfor ac_c_preproc_warn_flag in '' yes\ndo\n  # Use a header file that comes with gcc, so configuring glibc\n  # with a fresh cross-compiler works.\n  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n  # <limits.h> exists even on freestanding compilers.\n  # On the NeXT, cc -E runs the code through the compiler's parser,\n  # not just through cpp. \"Syntax error\" is here to catch this case.\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\t\t     Syntax error\n_ACEOF\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_cpp conftest.$ac_ext\\\"\") >&5\n  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } >/dev/null; then\n  if test -s conftest.err; then\n    ac_cpp_err=$ac_c_preproc_warn_flag\n    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag\n  else\n    ac_cpp_err=\n  fi\nelse\n  ac_cpp_err=yes\nfi\nif test -z \"$ac_cpp_err\"; then\n  :\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n  # Broken: fails on valid input.\ncontinue\nfi\nrm -f conftest.err conftest.$ac_ext\n\n  # OK, works on sane cases.  Now check whether non-existent headers\n  # can be detected and how.\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <ac_nonexistent.h>\n_ACEOF\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_cpp conftest.$ac_ext\\\"\") >&5\n  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } >/dev/null; then\n  if test -s conftest.err; then\n    ac_cpp_err=$ac_c_preproc_warn_flag\n    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag\n  else\n    ac_cpp_err=\n  fi\nelse\n  ac_cpp_err=yes\nfi\nif test -z \"$ac_cpp_err\"; then\n  # Broken: success on invalid input.\ncontinue\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n  # Passes both tests.\nac_preproc_ok=:\nbreak\nfi\nrm -f conftest.err conftest.$ac_ext\n\ndone\n# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.\nrm -f conftest.err conftest.$ac_ext\nif $ac_preproc_ok; then\n  break\nfi\n\n    done\n    ac_cv_prog_CPP=$CPP\n\nfi\n  CPP=$ac_cv_prog_CPP\nelse\n  ac_cv_prog_CPP=$CPP\nfi\necho \"$as_me:$LINENO: result: $CPP\" >&5\necho \"${ECHO_T}$CPP\" >&6\nac_preproc_ok=false\nfor ac_c_preproc_warn_flag in '' yes\ndo\n  # Use a header file that comes with gcc, so configuring glibc\n  # with a fresh cross-compiler works.\n  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n  # <limits.h> exists even on freestanding compilers.\n  # On the NeXT, cc -E runs the code through the compiler's parser,\n  # not just through cpp. \"Syntax error\" is here to catch this case.\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\t\t     Syntax error\n_ACEOF\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_cpp conftest.$ac_ext\\\"\") >&5\n  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } >/dev/null; then\n  if test -s conftest.err; then\n    ac_cpp_err=$ac_c_preproc_warn_flag\n    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag\n  else\n    ac_cpp_err=\n  fi\nelse\n  ac_cpp_err=yes\nfi\nif test -z \"$ac_cpp_err\"; then\n  :\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n  # Broken: fails on valid input.\ncontinue\nfi\nrm -f conftest.err conftest.$ac_ext\n\n  # OK, works on sane cases.  Now check whether non-existent headers\n  # can be detected and how.\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <ac_nonexistent.h>\n_ACEOF\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_cpp conftest.$ac_ext\\\"\") >&5\n  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } >/dev/null; then\n  if test -s conftest.err; then\n    ac_cpp_err=$ac_c_preproc_warn_flag\n    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag\n  else\n    ac_cpp_err=\n  fi\nelse\n  ac_cpp_err=yes\nfi\nif test -z \"$ac_cpp_err\"; then\n  # Broken: success on invalid input.\ncontinue\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n  # Passes both tests.\nac_preproc_ok=:\nbreak\nfi\nrm -f conftest.err conftest.$ac_ext\n\ndone\n# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.\nrm -f conftest.err conftest.$ac_ext\nif $ac_preproc_ok; then\n  :\nelse\n  { { echo \"$as_me:$LINENO: error: C preprocessor \\\"$CPP\\\" fails sanity check\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: C preprocessor \\\"$CPP\\\" fails sanity check\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 1); exit 1; }; }\nfi\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\n\necho \"$as_me:$LINENO: checking for egrep\" >&5\necho $ECHO_N \"checking for egrep... $ECHO_C\" >&6\nif test \"${ac_cv_prog_egrep+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if echo a | (grep -E '(a|b)') >/dev/null 2>&1\n    then ac_cv_prog_egrep='grep -E'\n    else ac_cv_prog_egrep='egrep'\n    fi\nfi\necho \"$as_me:$LINENO: result: $ac_cv_prog_egrep\" >&5\necho \"${ECHO_T}$ac_cv_prog_egrep\" >&6\n EGREP=$ac_cv_prog_egrep\n\n\necho \"$as_me:$LINENO: checking for ANSI C header files\" >&5\necho $ECHO_N \"checking for ANSI C header files... $ECHO_C\" >&6\nif test \"${ac_cv_header_stdc+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <stdlib.h>\n#include <stdarg.h>\n#include <string.h>\n#include <float.h>\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_header_stdc=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_header_stdc=no\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\n\nif test $ac_cv_header_stdc = yes; then\n  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <string.h>\n\n_ACEOF\nif (eval \"$ac_cpp conftest.$ac_ext\") 2>&5 |\n  $EGREP \"memchr\" >/dev/null 2>&1; then\n  :\nelse\n  ac_cv_header_stdc=no\nfi\nrm -f conftest*\n\nfi\n\nif test $ac_cv_header_stdc = yes; then\n  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <stdlib.h>\n\n_ACEOF\nif (eval \"$ac_cpp conftest.$ac_ext\") 2>&5 |\n  $EGREP \"free\" >/dev/null 2>&1; then\n  :\nelse\n  ac_cv_header_stdc=no\nfi\nrm -f conftest*\n\nfi\n\nif test $ac_cv_header_stdc = yes; then\n  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.\n  if test \"$cross_compiling\" = yes; then\n  :\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <ctype.h>\n#if ((' ' & 0x0FF) == 0x020)\n# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')\n# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))\n#else\n# define ISLOWER(c) \\\n\t\t   (('a' <= (c) && (c) <= 'i') \\\n\t\t     || ('j' <= (c) && (c) <= 'r') \\\n\t\t     || ('s' <= (c) && (c) <= 'z'))\n# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))\n#endif\n\n#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))\nint\nmain ()\n{\n  int i;\n  for (i = 0; i < 256; i++)\n    if (XOR (islower (i), ISLOWER (i))\n\t|| toupper (i) != TOUPPER (i))\n      exit(2);\n  exit (0);\n}\n_ACEOF\nrm -f conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  :\nelse\n  echo \"$as_me: program exited with status $ac_status\" >&5\necho \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n( exit $ac_status )\nac_cv_header_stdc=no\nfi\nrm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext\nfi\nfi\nfi\necho \"$as_me:$LINENO: result: $ac_cv_header_stdc\" >&5\necho \"${ECHO_T}$ac_cv_header_stdc\" >&6\nif test $ac_cv_header_stdc = yes; then\n\ncat >>confdefs.h <<\\_ACEOF\n#define STDC_HEADERS 1\n_ACEOF\n\nfi\n\n# On IRIX 5.3, sys/types and inttypes.h are conflicting.\n\n\n\n\n\n\n\n\n\nfor ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \\\n\t\t  inttypes.h stdint.h unistd.h\ndo\nas_ac_Header=`echo \"ac_cv_header_$ac_header\" | $as_tr_sh`\necho \"$as_me:$LINENO: checking for $ac_header\" >&5\necho $ECHO_N \"checking for $ac_header... $ECHO_C\" >&6\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\n\n#include <$ac_header>\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  eval \"$as_ac_Header=yes\"\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\neval \"$as_ac_Header=no\"\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`\" >&5\necho \"${ECHO_T}`eval echo '${'$as_ac_Header'}'`\" >&6\nif test `eval echo '${'$as_ac_Header'}'` = yes; then\n  cat >>confdefs.h <<_ACEOF\n#define `echo \"HAVE_$ac_header\" | $as_tr_cpp` 1\n_ACEOF\n\nfi\n\ndone\n\n\necho \"$as_me:$LINENO: checking for int\" >&5\necho $ECHO_N \"checking for int... $ECHO_C\" >&6\nif test \"${ac_cv_type_int+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\nint\nmain ()\n{\nif ((int *) 0)\n  return 0;\nif (sizeof (int))\n  return 0;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_type_int=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_type_int=no\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_type_int\" >&5\necho \"${ECHO_T}$ac_cv_type_int\" >&6\n\necho \"$as_me:$LINENO: checking size of int\" >&5\necho $ECHO_N \"checking size of int... $ECHO_C\" >&6\nif test \"${ac_cv_sizeof_int+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test \"$ac_cv_type_int\" = yes; then\n  # The cast to unsigned long works around a bug in the HP C Compiler\n  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects\n  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.\n  # This bug is HP SR number 8606223364.\n  if test \"$cross_compiling\" = yes; then\n  # Depending upon the size, compute the lo and hi bounds.\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\nint\nmain ()\n{\nstatic int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];\ntest_array [0] = 0\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_lo=0 ac_mid=0\n  while :; do\n    cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\nint\nmain ()\n{\nstatic int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];\ntest_array [0] = 0\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_hi=$ac_mid; break\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_lo=`expr $ac_mid + 1`\n\t\t    if test $ac_lo -le $ac_mid; then\n\t\t      ac_lo= ac_hi=\n\t\t      break\n\t\t    fi\n\t\t    ac_mid=`expr 2 '*' $ac_mid + 1`\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\n  done\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\nint\nmain ()\n{\nstatic int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];\ntest_array [0] = 0\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_hi=-1 ac_mid=-1\n  while :; do\n    cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\nint\nmain ()\n{\nstatic int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];\ntest_array [0] = 0\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_lo=$ac_mid; break\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_hi=`expr '(' $ac_mid ')' - 1`\n\t\t       if test $ac_mid -le $ac_hi; then\n\t\t\t ac_lo= ac_hi=\n\t\t\t break\n\t\t       fi\n\t\t       ac_mid=`expr 2 '*' $ac_mid`\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\n  done\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_lo= ac_hi=\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\n# Binary search between lo and hi bounds.\nwhile test \"x$ac_lo\" != \"x$ac_hi\"; do\n  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\nint\nmain ()\n{\nstatic int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];\ntest_array [0] = 0\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_hi=$ac_mid\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_lo=`expr '(' $ac_mid ')' + 1`\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\ndone\ncase $ac_lo in\n?*) ac_cv_sizeof_int=$ac_lo;;\n'') { { echo \"$as_me:$LINENO: error: cannot compute sizeof (int), 77\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: cannot compute sizeof (int), 77\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 1); exit 1; }; } ;;\nesac\nelse\n  if test \"$cross_compiling\" = yes; then\n  { { echo \"$as_me:$LINENO: error: cannot run test program while cross compiling\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: cannot run test program while cross compiling\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 1); exit 1; }; }\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\nlong longval () { return (long) (sizeof (int)); }\nunsigned long ulongval () { return (long) (sizeof (int)); }\n#include <stdio.h>\n#include <stdlib.h>\nint\nmain ()\n{\n\n  FILE *f = fopen (\"conftest.val\", \"w\");\n  if (! f)\n    exit (1);\n  if (((long) (sizeof (int))) < 0)\n    {\n      long i = longval ();\n      if (i != ((long) (sizeof (int))))\n\texit (1);\n      fprintf (f, \"%ld\\n\", i);\n    }\n  else\n    {\n      unsigned long i = ulongval ();\n      if (i != ((long) (sizeof (int))))\n\texit (1);\n      fprintf (f, \"%lu\\n\", i);\n    }\n  exit (ferror (f) || fclose (f) != 0);\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_sizeof_int=`cat conftest.val`\nelse\n  echo \"$as_me: program exited with status $ac_status\" >&5\necho \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n( exit $ac_status )\n{ { echo \"$as_me:$LINENO: error: cannot compute sizeof (int), 77\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: cannot compute sizeof (int), 77\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 1); exit 1; }; }\nfi\nrm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext\nfi\nfi\nrm -f conftest.val\nelse\n  ac_cv_sizeof_int=0\nfi\nfi\necho \"$as_me:$LINENO: result: $ac_cv_sizeof_int\" >&5\necho \"${ECHO_T}$ac_cv_sizeof_int\" >&6\ncat >>confdefs.h <<_ACEOF\n#define SIZEOF_INT $ac_cv_sizeof_int\n_ACEOF\n\n\necho \"$as_me:$LINENO: checking for long\" >&5\necho $ECHO_N \"checking for long... $ECHO_C\" >&6\nif test \"${ac_cv_type_long+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\nint\nmain ()\n{\nif ((long *) 0)\n  return 0;\nif (sizeof (long))\n  return 0;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_type_long=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_type_long=no\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_type_long\" >&5\necho \"${ECHO_T}$ac_cv_type_long\" >&6\n\necho \"$as_me:$LINENO: checking size of long\" >&5\necho $ECHO_N \"checking size of long... $ECHO_C\" >&6\nif test \"${ac_cv_sizeof_long+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test \"$ac_cv_type_long\" = yes; then\n  # The cast to unsigned long works around a bug in the HP C Compiler\n  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects\n  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.\n  # This bug is HP SR number 8606223364.\n  if test \"$cross_compiling\" = yes; then\n  # Depending upon the size, compute the lo and hi bounds.\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\nint\nmain ()\n{\nstatic int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];\ntest_array [0] = 0\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_lo=0 ac_mid=0\n  while :; do\n    cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\nint\nmain ()\n{\nstatic int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];\ntest_array [0] = 0\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_hi=$ac_mid; break\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_lo=`expr $ac_mid + 1`\n\t\t    if test $ac_lo -le $ac_mid; then\n\t\t      ac_lo= ac_hi=\n\t\t      break\n\t\t    fi\n\t\t    ac_mid=`expr 2 '*' $ac_mid + 1`\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\n  done\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\nint\nmain ()\n{\nstatic int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];\ntest_array [0] = 0\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_hi=-1 ac_mid=-1\n  while :; do\n    cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\nint\nmain ()\n{\nstatic int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];\ntest_array [0] = 0\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_lo=$ac_mid; break\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_hi=`expr '(' $ac_mid ')' - 1`\n\t\t       if test $ac_mid -le $ac_hi; then\n\t\t\t ac_lo= ac_hi=\n\t\t\t break\n\t\t       fi\n\t\t       ac_mid=`expr 2 '*' $ac_mid`\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\n  done\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_lo= ac_hi=\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\n# Binary search between lo and hi bounds.\nwhile test \"x$ac_lo\" != \"x$ac_hi\"; do\n  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\nint\nmain ()\n{\nstatic int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];\ntest_array [0] = 0\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_hi=$ac_mid\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_lo=`expr '(' $ac_mid ')' + 1`\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\ndone\ncase $ac_lo in\n?*) ac_cv_sizeof_long=$ac_lo;;\n'') { { echo \"$as_me:$LINENO: error: cannot compute sizeof (long), 77\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: cannot compute sizeof (long), 77\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 1); exit 1; }; } ;;\nesac\nelse\n  if test \"$cross_compiling\" = yes; then\n  { { echo \"$as_me:$LINENO: error: cannot run test program while cross compiling\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: cannot run test program while cross compiling\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 1); exit 1; }; }\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\nlong longval () { return (long) (sizeof (long)); }\nunsigned long ulongval () { return (long) (sizeof (long)); }\n#include <stdio.h>\n#include <stdlib.h>\nint\nmain ()\n{\n\n  FILE *f = fopen (\"conftest.val\", \"w\");\n  if (! f)\n    exit (1);\n  if (((long) (sizeof (long))) < 0)\n    {\n      long i = longval ();\n      if (i != ((long) (sizeof (long))))\n\texit (1);\n      fprintf (f, \"%ld\\n\", i);\n    }\n  else\n    {\n      unsigned long i = ulongval ();\n      if (i != ((long) (sizeof (long))))\n\texit (1);\n      fprintf (f, \"%lu\\n\", i);\n    }\n  exit (ferror (f) || fclose (f) != 0);\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_sizeof_long=`cat conftest.val`\nelse\n  echo \"$as_me: program exited with status $ac_status\" >&5\necho \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n( exit $ac_status )\n{ { echo \"$as_me:$LINENO: error: cannot compute sizeof (long), 77\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: cannot compute sizeof (long), 77\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 1); exit 1; }; }\nfi\nrm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext\nfi\nfi\nrm -f conftest.val\nelse\n  ac_cv_sizeof_long=0\nfi\nfi\necho \"$as_me:$LINENO: result: $ac_cv_sizeof_long\" >&5\necho \"${ECHO_T}$ac_cv_sizeof_long\" >&6\ncat >>confdefs.h <<_ACEOF\n#define SIZEOF_LONG $ac_cv_sizeof_long\n_ACEOF\n\n\necho \"$as_me:$LINENO: checking for long long\" >&5\necho $ECHO_N \"checking for long long... $ECHO_C\" >&6\nif test \"${ac_cv_type_long_long+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\nint\nmain ()\n{\nif ((long long *) 0)\n  return 0;\nif (sizeof (long long))\n  return 0;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_type_long_long=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_type_long_long=no\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_type_long_long\" >&5\necho \"${ECHO_T}$ac_cv_type_long_long\" >&6\n\necho \"$as_me:$LINENO: checking size of long long\" >&5\necho $ECHO_N \"checking size of long long... $ECHO_C\" >&6\nif test \"${ac_cv_sizeof_long_long+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test \"$ac_cv_type_long_long\" = yes; then\n  # The cast to unsigned long works around a bug in the HP C Compiler\n  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects\n  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.\n  # This bug is HP SR number 8606223364.\n  if test \"$cross_compiling\" = yes; then\n  # Depending upon the size, compute the lo and hi bounds.\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\nint\nmain ()\n{\nstatic int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];\ntest_array [0] = 0\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_lo=0 ac_mid=0\n  while :; do\n    cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\nint\nmain ()\n{\nstatic int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];\ntest_array [0] = 0\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_hi=$ac_mid; break\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_lo=`expr $ac_mid + 1`\n\t\t    if test $ac_lo -le $ac_mid; then\n\t\t      ac_lo= ac_hi=\n\t\t      break\n\t\t    fi\n\t\t    ac_mid=`expr 2 '*' $ac_mid + 1`\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\n  done\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\nint\nmain ()\n{\nstatic int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];\ntest_array [0] = 0\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_hi=-1 ac_mid=-1\n  while :; do\n    cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\nint\nmain ()\n{\nstatic int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];\ntest_array [0] = 0\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_lo=$ac_mid; break\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_hi=`expr '(' $ac_mid ')' - 1`\n\t\t       if test $ac_mid -le $ac_hi; then\n\t\t\t ac_lo= ac_hi=\n\t\t\t break\n\t\t       fi\n\t\t       ac_mid=`expr 2 '*' $ac_mid`\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\n  done\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_lo= ac_hi=\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\n# Binary search between lo and hi bounds.\nwhile test \"x$ac_lo\" != \"x$ac_hi\"; do\n  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\nint\nmain ()\n{\nstatic int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];\ntest_array [0] = 0\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_hi=$ac_mid\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_lo=`expr '(' $ac_mid ')' + 1`\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\ndone\ncase $ac_lo in\n?*) ac_cv_sizeof_long_long=$ac_lo;;\n'') { { echo \"$as_me:$LINENO: error: cannot compute sizeof (long long), 77\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: cannot compute sizeof (long long), 77\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 1); exit 1; }; } ;;\nesac\nelse\n  if test \"$cross_compiling\" = yes; then\n  { { echo \"$as_me:$LINENO: error: cannot run test program while cross compiling\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: cannot run test program while cross compiling\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 1); exit 1; }; }\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\nlong longval () { return (long) (sizeof (long long)); }\nunsigned long ulongval () { return (long) (sizeof (long long)); }\n#include <stdio.h>\n#include <stdlib.h>\nint\nmain ()\n{\n\n  FILE *f = fopen (\"conftest.val\", \"w\");\n  if (! f)\n    exit (1);\n  if (((long) (sizeof (long long))) < 0)\n    {\n      long i = longval ();\n      if (i != ((long) (sizeof (long long))))\n\texit (1);\n      fprintf (f, \"%ld\\n\", i);\n    }\n  else\n    {\n      unsigned long i = ulongval ();\n      if (i != ((long) (sizeof (long long))))\n\texit (1);\n      fprintf (f, \"%lu\\n\", i);\n    }\n  exit (ferror (f) || fclose (f) != 0);\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_sizeof_long_long=`cat conftest.val`\nelse\n  echo \"$as_me: program exited with status $ac_status\" >&5\necho \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n( exit $ac_status )\n{ { echo \"$as_me:$LINENO: error: cannot compute sizeof (long long), 77\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: cannot compute sizeof (long long), 77\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 1); exit 1; }; }\nfi\nrm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext\nfi\nfi\nrm -f conftest.val\nelse\n  ac_cv_sizeof_long_long=0\nfi\nfi\necho \"$as_me:$LINENO: result: $ac_cv_sizeof_long_long\" >&5\necho \"${ECHO_T}$ac_cv_sizeof_long_long\" >&6\ncat >>confdefs.h <<_ACEOF\n#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long\n_ACEOF\n\n\necho \"$as_me:$LINENO: checking for void *\" >&5\necho $ECHO_N \"checking for void *... $ECHO_C\" >&6\nif test \"${ac_cv_type_void_p+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\nint\nmain ()\n{\nif ((void * *) 0)\n  return 0;\nif (sizeof (void *))\n  return 0;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_type_void_p=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_type_void_p=no\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_type_void_p\" >&5\necho \"${ECHO_T}$ac_cv_type_void_p\" >&6\n\necho \"$as_me:$LINENO: checking size of void *\" >&5\necho $ECHO_N \"checking size of void *... $ECHO_C\" >&6\nif test \"${ac_cv_sizeof_void_p+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test \"$ac_cv_type_void_p\" = yes; then\n  # The cast to unsigned long works around a bug in the HP C Compiler\n  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects\n  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.\n  # This bug is HP SR number 8606223364.\n  if test \"$cross_compiling\" = yes; then\n  # Depending upon the size, compute the lo and hi bounds.\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\nint\nmain ()\n{\nstatic int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];\ntest_array [0] = 0\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_lo=0 ac_mid=0\n  while :; do\n    cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\nint\nmain ()\n{\nstatic int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];\ntest_array [0] = 0\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_hi=$ac_mid; break\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_lo=`expr $ac_mid + 1`\n\t\t    if test $ac_lo -le $ac_mid; then\n\t\t      ac_lo= ac_hi=\n\t\t      break\n\t\t    fi\n\t\t    ac_mid=`expr 2 '*' $ac_mid + 1`\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\n  done\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\nint\nmain ()\n{\nstatic int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];\ntest_array [0] = 0\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_hi=-1 ac_mid=-1\n  while :; do\n    cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\nint\nmain ()\n{\nstatic int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];\ntest_array [0] = 0\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_lo=$ac_mid; break\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_hi=`expr '(' $ac_mid ')' - 1`\n\t\t       if test $ac_mid -le $ac_hi; then\n\t\t\t ac_lo= ac_hi=\n\t\t\t break\n\t\t       fi\n\t\t       ac_mid=`expr 2 '*' $ac_mid`\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\n  done\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_lo= ac_hi=\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\n# Binary search between lo and hi bounds.\nwhile test \"x$ac_lo\" != \"x$ac_hi\"; do\n  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\nint\nmain ()\n{\nstatic int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];\ntest_array [0] = 0\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_hi=$ac_mid\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_lo=`expr '(' $ac_mid ')' + 1`\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\ndone\ncase $ac_lo in\n?*) ac_cv_sizeof_void_p=$ac_lo;;\n'') { { echo \"$as_me:$LINENO: error: cannot compute sizeof (void *), 77\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: cannot compute sizeof (void *), 77\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 1); exit 1; }; } ;;\nesac\nelse\n  if test \"$cross_compiling\" = yes; then\n  { { echo \"$as_me:$LINENO: error: cannot run test program while cross compiling\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: cannot run test program while cross compiling\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 1); exit 1; }; }\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\nlong longval () { return (long) (sizeof (void *)); }\nunsigned long ulongval () { return (long) (sizeof (void *)); }\n#include <stdio.h>\n#include <stdlib.h>\nint\nmain ()\n{\n\n  FILE *f = fopen (\"conftest.val\", \"w\");\n  if (! f)\n    exit (1);\n  if (((long) (sizeof (void *))) < 0)\n    {\n      long i = longval ();\n      if (i != ((long) (sizeof (void *))))\n\texit (1);\n      fprintf (f, \"%ld\\n\", i);\n    }\n  else\n    {\n      unsigned long i = ulongval ();\n      if (i != ((long) (sizeof (void *))))\n\texit (1);\n      fprintf (f, \"%lu\\n\", i);\n    }\n  exit (ferror (f) || fclose (f) != 0);\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_sizeof_void_p=`cat conftest.val`\nelse\n  echo \"$as_me: program exited with status $ac_status\" >&5\necho \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n( exit $ac_status )\n{ { echo \"$as_me:$LINENO: error: cannot compute sizeof (void *), 77\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: cannot compute sizeof (void *), 77\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 1); exit 1; }; }\nfi\nrm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext\nfi\nfi\nrm -f conftest.val\nelse\n  ac_cv_sizeof_void_p=0\nfi\nfi\necho \"$as_me:$LINENO: result: $ac_cv_sizeof_void_p\" >&5\necho \"${ECHO_T}$ac_cv_sizeof_void_p\" >&6\ncat >>confdefs.h <<_ACEOF\n#define SIZEOF_VOID_P $ac_cv_sizeof_void_p\n_ACEOF\n\n\n\n# libtool configuration\n\n# Check whether --enable-static or --disable-static was given.\nif test \"${enable_static+set}\" = set; then\n  enableval=\"$enable_static\"\n  p=${PACKAGE-default}\n    case $enableval in\n    yes) enable_static=yes ;;\n    no) enable_static=no ;;\n    *)\n     enable_static=no\n      # Look at the argument we got.  We use all the common list separators.\n      lt_save_ifs=\"$IFS\"; IFS=\"${IFS}$PATH_SEPARATOR,\"\n      for pkg in $enableval; do\n\tIFS=\"$lt_save_ifs\"\n\tif test \"X$pkg\" = \"X$p\"; then\n\t  enable_static=yes\n\tfi\n      done\n      IFS=\"$lt_save_ifs\"\n      ;;\n    esac\nelse\n  enable_static=no\nfi;\n\n\n# Check whether --enable-shared or --disable-shared was given.\nif test \"${enable_shared+set}\" = set; then\n  enableval=\"$enable_shared\"\n  p=${PACKAGE-default}\n    case $enableval in\n    yes) enable_shared=yes ;;\n    no) enable_shared=no ;;\n    *)\n      enable_shared=no\n      # Look at the argument we got.  We use all the common list separators.\n      lt_save_ifs=\"$IFS\"; IFS=\"${IFS}$PATH_SEPARATOR,\"\n      for pkg in $enableval; do\n\tIFS=\"$lt_save_ifs\"\n\tif test \"X$pkg\" = \"X$p\"; then\n\t  enable_shared=yes\n\tfi\n      done\n      IFS=\"$lt_save_ifs\"\n      ;;\n    esac\nelse\n  enable_shared=yes\nfi;\n\n# Check whether --enable-fast-install or --disable-fast-install was given.\nif test \"${enable_fast_install+set}\" = set; then\n  enableval=\"$enable_fast_install\"\n  p=${PACKAGE-default}\n    case $enableval in\n    yes) enable_fast_install=yes ;;\n    no) enable_fast_install=no ;;\n    *)\n      enable_fast_install=no\n      # Look at the argument we got.  We use all the common list separators.\n      lt_save_ifs=\"$IFS\"; IFS=\"${IFS}$PATH_SEPARATOR,\"\n      for pkg in $enableval; do\n\tIFS=\"$lt_save_ifs\"\n\tif test \"X$pkg\" = \"X$p\"; then\n\t  enable_fast_install=yes\n\tfi\n      done\n      IFS=\"$lt_save_ifs\"\n      ;;\n    esac\nelse\n  enable_fast_install=yes\nfi;\n\necho \"$as_me:$LINENO: checking for a sed that does not truncate output\" >&5\necho $ECHO_N \"checking for a sed that does not truncate output... $ECHO_C\" >&6\nif test \"${lt_cv_path_SED+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  # Loop through the user's path and test for sed and gsed.\n# Then use that list of sed's as ones to test for truncation.\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for lt_ac_prog in sed gsed; do\n    for ac_exec_ext in '' $ac_executable_extensions; do\n      if $as_executable_p \"$as_dir/$lt_ac_prog$ac_exec_ext\"; then\n        lt_ac_sed_list=\"$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext\"\n      fi\n    done\n  done\ndone\nIFS=$as_save_IFS\nlt_ac_max=0\nlt_ac_count=0\n# Add /usr/xpg4/bin/sed as it is typically found on Solaris\n# along with /bin/sed that truncates output.\nfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do\n  test ! -f $lt_ac_sed && continue\n  cat /dev/null > conftest.in\n  lt_ac_count=0\n  echo $ECHO_N \"0123456789$ECHO_C\" >conftest.in\n  # Check for GNU sed and select it if it is found.\n  if \"$lt_ac_sed\" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then\n    lt_cv_path_SED=$lt_ac_sed\n    break\n  fi\n  while true; do\n    cat conftest.in conftest.in >conftest.tmp\n    mv conftest.tmp conftest.in\n    cp conftest.in conftest.nl\n    echo >>conftest.nl\n    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break\n    cmp -s conftest.out conftest.nl || break\n    # 10000 chars as input seems more than enough\n    test $lt_ac_count -gt 10 && break\n    lt_ac_count=`expr $lt_ac_count + 1`\n    if test $lt_ac_count -gt $lt_ac_max; then\n      lt_ac_max=$lt_ac_count\n      lt_cv_path_SED=$lt_ac_sed\n    fi\n  done\ndone\n\nfi\n\nSED=$lt_cv_path_SED\n\necho \"$as_me:$LINENO: result: $SED\" >&5\necho \"${ECHO_T}$SED\" >&6\n\n\n# Check whether --with-gnu-ld or --without-gnu-ld was given.\nif test \"${with_gnu_ld+set}\" = set; then\n  withval=\"$with_gnu_ld\"\n  test \"$withval\" = no || with_gnu_ld=yes\nelse\n  with_gnu_ld=no\nfi;\nac_prog=ld\nif test \"$GCC\" = yes; then\n  # Check if gcc -print-prog-name=ld gives a path.\n  echo \"$as_me:$LINENO: checking for ld used by $CC\" >&5\necho $ECHO_N \"checking for ld used by $CC... $ECHO_C\" >&6\n  case $host in\n  *-*-mingw*)\n    # gcc leaves a trailing carriage return which upsets mingw\n    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\\015'` ;;\n  *)\n    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;\n  esac\n  case $ac_prog in\n    # Accept absolute paths.\n    [\\\\/]* | ?:[\\\\/]*)\n      re_direlt='/[^/][^/]*/\\.\\./'\n      # Canonicalize the pathname of ld\n      ac_prog=`echo $ac_prog| $SED 's%\\\\\\\\%/%g'`\n      while echo $ac_prog | grep \"$re_direlt\" > /dev/null 2>&1; do\n\tac_prog=`echo $ac_prog| $SED \"s%$re_direlt%/%\"`\n      done\n      test -z \"$LD\" && LD=\"$ac_prog\"\n      ;;\n  \"\")\n    # If it fails, then pretend we aren't using GCC.\n    ac_prog=ld\n    ;;\n  *)\n    # If it is relative, then search for the first ld in PATH.\n    with_gnu_ld=unknown\n    ;;\n  esac\nelif test \"$with_gnu_ld\" = yes; then\n  echo \"$as_me:$LINENO: checking for GNU ld\" >&5\necho $ECHO_N \"checking for GNU ld... $ECHO_C\" >&6\nelse\n  echo \"$as_me:$LINENO: checking for non-GNU ld\" >&5\necho $ECHO_N \"checking for non-GNU ld... $ECHO_C\" >&6\nfi\nif test \"${lt_cv_path_LD+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -z \"$LD\"; then\n  lt_save_ifs=\"$IFS\"; IFS=$PATH_SEPARATOR\n  for ac_dir in $PATH; do\n    IFS=\"$lt_save_ifs\"\n    test -z \"$ac_dir\" && ac_dir=.\n    if test -f \"$ac_dir/$ac_prog\" || test -f \"$ac_dir/$ac_prog$ac_exeext\"; then\n      lt_cv_path_LD=\"$ac_dir/$ac_prog\"\n      # Check to see if the program is GNU ld.  I'd rather use --version,\n      # but apparently some variants of GNU ld only accept -v.\n      # Break only if it was the GNU/non-GNU ld that we prefer.\n      case `\"$lt_cv_path_LD\" -v 2>&1 </dev/null` in\n      *GNU* | *'with BFD'*)\n\ttest \"$with_gnu_ld\" != no && break\n\t;;\n      *)\n\ttest \"$with_gnu_ld\" != yes && break\n\t;;\n      esac\n    fi\n  done\n  IFS=\"$lt_save_ifs\"\nelse\n  lt_cv_path_LD=\"$LD\" # Let the user override the test with a path.\nfi\nfi\n\nLD=\"$lt_cv_path_LD\"\nif test -n \"$LD\"; then\n  echo \"$as_me:$LINENO: result: $LD\" >&5\necho \"${ECHO_T}$LD\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\ntest -z \"$LD\" && { { echo \"$as_me:$LINENO: error: no acceptable ld found in \\$PATH\" >&5\necho \"$as_me: error: no acceptable ld found in \\$PATH\" >&2;}\n   { (exit 1); exit 1; }; }\necho \"$as_me:$LINENO: checking if the linker ($LD) is GNU ld\" >&5\necho $ECHO_N \"checking if the linker ($LD) is GNU ld... $ECHO_C\" >&6\nif test \"${lt_cv_prog_gnu_ld+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  # I'd rather use --version here, but apparently some GNU lds only accept -v.\ncase `$LD -v 2>&1 </dev/null` in\n*GNU* | *'with BFD'*)\n  lt_cv_prog_gnu_ld=yes\n  ;;\n*)\n  lt_cv_prog_gnu_ld=no\n  ;;\nesac\nfi\necho \"$as_me:$LINENO: result: $lt_cv_prog_gnu_ld\" >&5\necho \"${ECHO_T}$lt_cv_prog_gnu_ld\" >&6\nwith_gnu_ld=$lt_cv_prog_gnu_ld\n\n\necho \"$as_me:$LINENO: checking for $LD option to reload object files\" >&5\necho $ECHO_N \"checking for $LD option to reload object files... $ECHO_C\" >&6\nif test \"${lt_cv_ld_reload_flag+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  lt_cv_ld_reload_flag='-r'\nfi\necho \"$as_me:$LINENO: result: $lt_cv_ld_reload_flag\" >&5\necho \"${ECHO_T}$lt_cv_ld_reload_flag\" >&6\nreload_flag=$lt_cv_ld_reload_flag\ncase $reload_flag in\n\"\" | \" \"*) ;;\n*) reload_flag=\" $reload_flag\" ;;\nesac\nreload_cmds='$LD$reload_flag -o $output$reload_objs'\ncase $host_os in\n  darwin*)\n    if test \"$GCC\" = yes; then\n      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'\n    else\n      reload_cmds='$LD$reload_flag -o $output$reload_objs'\n    fi\n    ;;\nesac\n\necho \"$as_me:$LINENO: checking whether ln -s works\" >&5\necho $ECHO_N \"checking whether ln -s works... $ECHO_C\" >&6\nLN_S=$as_ln_s\nif test \"$LN_S\" = \"ln -s\"; then\n  echo \"$as_me:$LINENO: result: yes\" >&5\necho \"${ECHO_T}yes\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no, using $LN_S\" >&5\necho \"${ECHO_T}no, using $LN_S\" >&6\nfi\n\necho \"$as_me:$LINENO: checking how to recognise dependent libraries\" >&5\necho $ECHO_N \"checking how to recognise dependent libraries... $ECHO_C\" >&6\nif test \"${lt_cv_deplibs_check_method+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  lt_cv_file_magic_cmd='$MAGIC_CMD'\nlt_cv_file_magic_test_file=\nlt_cv_deplibs_check_method='unknown'\n# Need to set the preceding variable on all platforms that support\n# interlibrary dependencies.\n# 'none' -- dependencies not supported.\n# `unknown' -- same as none, but documents that we really don't know.\n# 'pass_all' -- all dependencies passed with no checks.\n# 'test_compile' -- check by making test program.\n# 'file_magic [[regex]]' -- check by looking for files in library path\n# which responds to the $file_magic_cmd with a given extended regex.\n# If you have `file' or equivalent on your system and you're not sure\n# whether `pass_all' will *always* work, you probably want this one.\n\ncase $host_os in\naix4* | aix5*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nbeos*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nbsdi[45]*)\n  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'\n  lt_cv_file_magic_cmd='/usr/bin/file -L'\n  lt_cv_file_magic_test_file=/shlib/libc.so\n  ;;\n\ncygwin*)\n  # func_win32_libid is a shell function defined in ltmain.sh\n  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'\n  lt_cv_file_magic_cmd='func_win32_libid'\n  ;;\n\nmingw* | pw32*)\n  # Base MSYS/MinGW do not provide the 'file' command needed by\n  # func_win32_libid shell function, so use a weaker test based on 'objdump'.\n  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'\n  lt_cv_file_magic_cmd='$OBJDUMP -f'\n  ;;\n\ndarwin* | rhapsody*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nfreebsd* | kfreebsd*-gnu | dragonfly*)\n  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then\n    case $host_cpu in\n    i*86 )\n      # Not sure whether the presence of OpenBSD here was a mistake.\n      # Let's accept both of them until this is cleared up.\n      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'\n      lt_cv_file_magic_cmd=/usr/bin/file\n      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`\n      ;;\n    esac\n  else\n    lt_cv_deplibs_check_method=pass_all\n  fi\n  ;;\n\ngnu*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nhpux10.20* | hpux11*)\n  lt_cv_file_magic_cmd=/usr/bin/file\n  case $host_cpu in\n  ia64*)\n    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'\n    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so\n    ;;\n  hppa*64*)\n    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'\n    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl\n    ;;\n  *)\n    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'\n    lt_cv_file_magic_test_file=/usr/lib/libc.sl\n    ;;\n  esac\n  ;;\n\ninterix3*)\n  # PIC code is broken on Interix 3.x, that's why |\\.a not |_pic\\.a here\n  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\\.so|\\.a)$'\n  ;;\n\nirix5* | irix6* | nonstopux*)\n  case $LD in\n  *-32|*\"-32 \") libmagic=32-bit;;\n  *-n32|*\"-n32 \") libmagic=N32;;\n  *-64|*\"-64 \") libmagic=64-bit;;\n  *) libmagic=never-match;;\n  esac\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\n# This must be Linux ELF.\nlinux*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nnetbsd*)\n  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then\n    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\\.so\\.[0-9]+\\.[0-9]+|_pic\\.a)$'\n  else\n    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\\.so|_pic\\.a)$'\n  fi\n  ;;\n\nnewos6*)\n  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'\n  lt_cv_file_magic_cmd=/usr/bin/file\n  lt_cv_file_magic_test_file=/usr/lib/libnls.so\n  ;;\n\nnto-qnx*)\n  lt_cv_deplibs_check_method=unknown\n  ;;\n\nopenbsd*)\n  if test -z \"`echo __ELF__ | $CC -E - | grep __ELF__`\" || test \"$host_os-$host_cpu\" = \"openbsd2.8-powerpc\"; then\n    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\\.so\\.[0-9]+\\.[0-9]+|\\.so|_pic\\.a)$'\n  else\n    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\\.so\\.[0-9]+\\.[0-9]+|_pic\\.a)$'\n  fi\n  ;;\n\nosf3* | osf4* | osf5*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nsolaris*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\n\nsysv4 | sysv4.3*)\n  case $host_vendor in\n  motorola)\n    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'\n    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`\n    ;;\n  ncr)\n    lt_cv_deplibs_check_method=pass_all\n    ;;\n  sequent)\n    lt_cv_file_magic_cmd='/bin/file'\n    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'\n    ;;\n  sni)\n    lt_cv_file_magic_cmd='/bin/file'\n    lt_cv_deplibs_check_method=\"file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib\"\n    lt_cv_file_magic_test_file=/lib/libc.so\n    ;;\n  siemens)\n    lt_cv_deplibs_check_method=pass_all\n    ;;\n  pc)\n    lt_cv_deplibs_check_method=pass_all\n    ;;\n  esac\n  ;;\n\nsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)\n  lt_cv_deplibs_check_method=pass_all\n  ;;\nesac\n\nfi\necho \"$as_me:$LINENO: result: $lt_cv_deplibs_check_method\" >&5\necho \"${ECHO_T}$lt_cv_deplibs_check_method\" >&6\nfile_magic_cmd=$lt_cv_file_magic_cmd\ndeplibs_check_method=$lt_cv_deplibs_check_method\ntest -z \"$deplibs_check_method\" && deplibs_check_method=unknown\n\n\n\n\n# If no C compiler was specified, use CC.\nLTCC=${LTCC-\"$CC\"}\n\n# If no C compiler flags were specified, use CFLAGS.\nLTCFLAGS=${LTCFLAGS-\"$CFLAGS\"}\n\n# Allow CC to be a program name with arguments.\ncompiler=$CC\n\n# Check whether --enable-libtool-lock or --disable-libtool-lock was given.\nif test \"${enable_libtool_lock+set}\" = set; then\n  enableval=\"$enable_libtool_lock\"\n\nfi;\ntest \"x$enable_libtool_lock\" != xno && enable_libtool_lock=yes\n\n# Some flags need to be propagated to the compiler or linker for good\n# libtool support.\ncase $host in\nia64-*-hpux*)\n  # Find out which ABI we are using.\n  echo 'int i;' > conftest.$ac_ext\n  if { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; then\n    case `/usr/bin/file conftest.$ac_objext` in\n    *ELF-32*)\n      HPUX_IA64_MODE=\"32\"\n      ;;\n    *ELF-64*)\n      HPUX_IA64_MODE=\"64\"\n      ;;\n    esac\n  fi\n  rm -rf conftest*\n  ;;\n*-*-irix6*)\n  # Find out which ABI we are using.\n  echo '#line 5851 \"configure\"' > conftest.$ac_ext\n  if { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; then\n   if test \"$lt_cv_prog_gnu_ld\" = yes; then\n    case `/usr/bin/file conftest.$ac_objext` in\n    *32-bit*)\n      LD=\"${LD-ld} -melf32bsmip\"\n      ;;\n    *N32*)\n      LD=\"${LD-ld} -melf32bmipn32\"\n      ;;\n    *64-bit*)\n      LD=\"${LD-ld} -melf64bmip\"\n      ;;\n    esac\n   else\n    case `/usr/bin/file conftest.$ac_objext` in\n    *32-bit*)\n      LD=\"${LD-ld} -32\"\n      ;;\n    *N32*)\n      LD=\"${LD-ld} -n32\"\n      ;;\n    *64-bit*)\n      LD=\"${LD-ld} -64\"\n      ;;\n    esac\n   fi\n  fi\n  rm -rf conftest*\n  ;;\n\nx86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)\n  # Find out which ABI we are using.\n  echo 'int i;' > conftest.$ac_ext\n  if { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; then\n    case `/usr/bin/file conftest.o` in\n    *32-bit*)\n      case $host in\n        x86_64-*linux*)\n          LD=\"${LD-ld} -m elf_i386\"\n          ;;\n        ppc64-*linux*|powerpc64-*linux*)\n          LD=\"${LD-ld} -m elf32ppclinux\"\n          ;;\n        s390x-*linux*)\n          LD=\"${LD-ld} -m elf_s390\"\n          ;;\n        sparc64-*linux*)\n          LD=\"${LD-ld} -m elf32_sparc\"\n          ;;\n      esac\n      ;;\n    *64-bit*)\n      case $host in\n        x86_64-*linux*)\n          LD=\"${LD-ld} -m elf_x86_64\"\n          ;;\n        ppc*-*linux*|powerpc*-*linux*)\n          LD=\"${LD-ld} -m elf64ppc\"\n          ;;\n        s390*-*linux*)\n          LD=\"${LD-ld} -m elf64_s390\"\n          ;;\n        sparc*-*linux*)\n          LD=\"${LD-ld} -m elf64_sparc\"\n          ;;\n      esac\n      ;;\n    esac\n  fi\n  rm -rf conftest*\n  ;;\n\n*-*-sco3.2v5*)\n  # On SCO OpenServer 5, we need -belf to get full-featured binaries.\n  SAVE_CFLAGS=\"$CFLAGS\"\n  CFLAGS=\"$CFLAGS -belf\"\n  echo \"$as_me:$LINENO: checking whether the C compiler needs -belf\" >&5\necho $ECHO_N \"checking whether the C compiler needs -belf... $ECHO_C\" >&6\nif test \"${lt_cv_cc_needs_belf+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\n     cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  lt_cv_cc_needs_belf=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nlt_cv_cc_needs_belf=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\n     ac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\nfi\necho \"$as_me:$LINENO: result: $lt_cv_cc_needs_belf\" >&5\necho \"${ECHO_T}$lt_cv_cc_needs_belf\" >&6\n  if test x\"$lt_cv_cc_needs_belf\" != x\"yes\"; then\n    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf\n    CFLAGS=\"$SAVE_CFLAGS\"\n  fi\n  ;;\nsparc*-*solaris*)\n  # Find out which ABI we are using.\n  echo 'int i;' > conftest.$ac_ext\n  if { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; then\n    case `/usr/bin/file conftest.o` in\n    *64-bit*)\n      case $lt_cv_prog_gnu_ld in\n      yes*) LD=\"${LD-ld} -m elf64_sparc\" ;;\n      *)    LD=\"${LD-ld} -64\" ;;\n      esac\n      ;;\n    esac\n  fi\n  rm -rf conftest*\n  ;;\n\n\nesac\n\nneed_locks=\"$enable_libtool_lock\"\n\n\n\nfor ac_header in dlfcn.h\ndo\nas_ac_Header=`echo \"ac_cv_header_$ac_header\" | $as_tr_sh`\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo \"$as_me:$LINENO: checking for $ac_header\" >&5\necho $ECHO_N \"checking for $ac_header... $ECHO_C\" >&6\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nfi\necho \"$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`\" >&5\necho \"${ECHO_T}`eval echo '${'$as_ac_Header'}'`\" >&6\nelse\n  # Is the header compilable?\necho \"$as_me:$LINENO: checking $ac_header usability\" >&5\necho $ECHO_N \"checking $ac_header usability... $ECHO_C\" >&6\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\n#include <$ac_header>\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_header_compiler=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_header_compiler=no\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\necho \"$as_me:$LINENO: result: $ac_header_compiler\" >&5\necho \"${ECHO_T}$ac_header_compiler\" >&6\n\n# Is the header present?\necho \"$as_me:$LINENO: checking $ac_header presence\" >&5\necho $ECHO_N \"checking $ac_header presence... $ECHO_C\" >&6\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <$ac_header>\n_ACEOF\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_cpp conftest.$ac_ext\\\"\") >&5\n  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } >/dev/null; then\n  if test -s conftest.err; then\n    ac_cpp_err=$ac_c_preproc_warn_flag\n    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag\n  else\n    ac_cpp_err=\n  fi\nelse\n  ac_cpp_err=yes\nfi\nif test -z \"$ac_cpp_err\"; then\n  ac_header_preproc=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n  ac_header_preproc=no\nfi\nrm -f conftest.err conftest.$ac_ext\necho \"$as_me:$LINENO: result: $ac_header_preproc\" >&5\necho \"${ECHO_T}$ac_header_preproc\" >&6\n\n# So?  What about this header?\ncase $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in\n  yes:no: )\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!\" >&5\necho \"$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result\" >&5\necho \"$as_me: WARNING: $ac_header: proceeding with the compiler's result\" >&2;}\n    ac_header_preproc=yes\n    ;;\n  no:yes:* )\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled\" >&5\necho \"$as_me: WARNING: $ac_header: present but cannot be compiled\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?\" >&5\necho \"$as_me: WARNING: $ac_header:     check for missing prerequisite headers?\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation\" >&5\necho \"$as_me: WARNING: $ac_header: see the Autoconf documentation\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header:     section \\\"Present But Cannot Be Compiled\\\"\" >&5\necho \"$as_me: WARNING: $ac_header:     section \\\"Present But Cannot Be Compiled\\\"\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result\" >&5\necho \"$as_me: WARNING: $ac_header: proceeding with the preprocessor's result\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence\" >&5\necho \"$as_me: WARNING: $ac_header: in the future, the compiler will take precedence\" >&2;}\n    (\n      cat <<\\_ASBOX\n## ------------------------------------------ ##\n## Report this to the AC_PACKAGE_NAME lists.  ##\n## ------------------------------------------ ##\n_ASBOX\n    ) |\n      sed \"s/^/$as_me: WARNING:     /\" >&2\n    ;;\nesac\necho \"$as_me:$LINENO: checking for $ac_header\" >&5\necho $ECHO_N \"checking for $ac_header... $ECHO_C\" >&6\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  eval \"$as_ac_Header=\\$ac_header_preproc\"\nfi\necho \"$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`\" >&5\necho \"${ECHO_T}`eval echo '${'$as_ac_Header'}'`\" >&6\n\nfi\nif test `eval echo '${'$as_ac_Header'}'` = yes; then\n  cat >>confdefs.h <<_ACEOF\n#define `echo \"HAVE_$ac_header\" | $as_tr_cpp` 1\n_ACEOF\n\nfi\n\ndone\n\nac_ext=cc\nac_cpp='$CXXCPP $CPPFLAGS'\nac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_cxx_compiler_gnu\nif test -n \"$ac_tool_prefix\"; then\n  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC\n  do\n    # Extract the first word of \"$ac_tool_prefix$ac_prog\", so it can be a program name with args.\nset dummy $ac_tool_prefix$ac_prog; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_CXX+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$CXX\"; then\n  ac_cv_prog_CXX=\"$CXX\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_CXX=\"$ac_tool_prefix$ac_prog\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nCXX=$ac_cv_prog_CXX\nif test -n \"$CXX\"; then\n  echo \"$as_me:$LINENO: result: $CXX\" >&5\necho \"${ECHO_T}$CXX\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\n    test -n \"$CXX\" && break\n  done\nfi\nif test -z \"$CXX\"; then\n  ac_ct_CXX=$CXX\n  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC\ndo\n  # Extract the first word of \"$ac_prog\", so it can be a program name with args.\nset dummy $ac_prog; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_ac_ct_CXX+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$ac_ct_CXX\"; then\n  ac_cv_prog_ac_ct_CXX=\"$ac_ct_CXX\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_CXX=\"$ac_prog\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nac_ct_CXX=$ac_cv_prog_ac_ct_CXX\nif test -n \"$ac_ct_CXX\"; then\n  echo \"$as_me:$LINENO: result: $ac_ct_CXX\" >&5\necho \"${ECHO_T}$ac_ct_CXX\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\n  test -n \"$ac_ct_CXX\" && break\ndone\ntest -n \"$ac_ct_CXX\" || ac_ct_CXX=\"g++\"\n\n  CXX=$ac_ct_CXX\nfi\n\n\n# Provide some information about the compiler.\necho \"$as_me:$LINENO:\" \\\n     \"checking for C++ compiler version\" >&5\nac_compiler=`set X $ac_compile; echo $2`\n{ (eval echo \"$as_me:$LINENO: \\\"$ac_compiler --version </dev/null >&5\\\"\") >&5\n  (eval $ac_compiler --version </dev/null >&5) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }\n{ (eval echo \"$as_me:$LINENO: \\\"$ac_compiler -v </dev/null >&5\\\"\") >&5\n  (eval $ac_compiler -v </dev/null >&5) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }\n{ (eval echo \"$as_me:$LINENO: \\\"$ac_compiler -V </dev/null >&5\\\"\") >&5\n  (eval $ac_compiler -V </dev/null >&5) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }\n\necho \"$as_me:$LINENO: checking whether we are using the GNU C++ compiler\" >&5\necho $ECHO_N \"checking whether we are using the GNU C++ compiler... $ECHO_C\" >&6\nif test \"${ac_cv_cxx_compiler_gnu+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n#ifndef __GNUC__\n       choke me\n#endif\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_cxx_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_compiler_gnu=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_compiler_gnu=no\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nac_cv_cxx_compiler_gnu=$ac_compiler_gnu\n\nfi\necho \"$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu\" >&5\necho \"${ECHO_T}$ac_cv_cxx_compiler_gnu\" >&6\nGXX=`test $ac_compiler_gnu = yes && echo yes`\nac_test_CXXFLAGS=${CXXFLAGS+set}\nac_save_CXXFLAGS=$CXXFLAGS\nCXXFLAGS=\"-g\"\necho \"$as_me:$LINENO: checking whether $CXX accepts -g\" >&5\necho $ECHO_N \"checking whether $CXX accepts -g... $ECHO_C\" >&6\nif test \"${ac_cv_prog_cxx_g+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_cxx_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_prog_cxx_g=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_prog_cxx_g=no\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_prog_cxx_g\" >&5\necho \"${ECHO_T}$ac_cv_prog_cxx_g\" >&6\nif test \"$ac_test_CXXFLAGS\" = set; then\n  CXXFLAGS=$ac_save_CXXFLAGS\nelif test $ac_cv_prog_cxx_g = yes; then\n  if test \"$GXX\" = yes; then\n    CXXFLAGS=\"-g -O2\"\n  else\n    CXXFLAGS=\"-g\"\n  fi\nelse\n  if test \"$GXX\" = yes; then\n    CXXFLAGS=\"-O2\"\n  else\n    CXXFLAGS=\n  fi\nfi\nfor ac_declaration in \\\n   '' \\\n   'extern \"C\" void std::exit (int) throw (); using std::exit;' \\\n   'extern \"C\" void std::exit (int); using std::exit;' \\\n   'extern \"C\" void exit (int) throw ();' \\\n   'extern \"C\" void exit (int);' \\\n   'void exit (int);'\ndo\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_declaration\n#include <stdlib.h>\nint\nmain ()\n{\nexit (42);\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_cxx_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  :\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\ncontinue\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_declaration\nint\nmain ()\n{\nexit (42);\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_cxx_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  break\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\ndone\nrm -f conftest*\nif test -n \"$ac_declaration\"; then\n  echo '#ifdef __cplusplus' >>confdefs.h\n  echo $ac_declaration      >>confdefs.h\n  echo '#endif'             >>confdefs.h\nfi\n\nac_ext=cc\nac_cpp='$CXXCPP $CPPFLAGS'\nac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_cxx_compiler_gnu\n\n\n\nif test -n \"$CXX\" && ( test \"X$CXX\" != \"Xno\" &&\n    ( (test \"X$CXX\" = \"Xg++\" && `g++ -v >/dev/null 2>&1` ) ||\n    (test \"X$CXX\" != \"Xg++\"))) ; then\n  ac_ext=cc\nac_cpp='$CXXCPP $CPPFLAGS'\nac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_cxx_compiler_gnu\necho \"$as_me:$LINENO: checking how to run the C++ preprocessor\" >&5\necho $ECHO_N \"checking how to run the C++ preprocessor... $ECHO_C\" >&6\nif test -z \"$CXXCPP\"; then\n  if test \"${ac_cv_prog_CXXCPP+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n      # Double quotes because CXXCPP needs to be expanded\n    for CXXCPP in \"$CXX -E\" \"/lib/cpp\"\n    do\n      ac_preproc_ok=false\nfor ac_cxx_preproc_warn_flag in '' yes\ndo\n  # Use a header file that comes with gcc, so configuring glibc\n  # with a fresh cross-compiler works.\n  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n  # <limits.h> exists even on freestanding compilers.\n  # On the NeXT, cc -E runs the code through the compiler's parser,\n  # not just through cpp. \"Syntax error\" is here to catch this case.\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\t\t     Syntax error\n_ACEOF\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_cpp conftest.$ac_ext\\\"\") >&5\n  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } >/dev/null; then\n  if test -s conftest.err; then\n    ac_cpp_err=$ac_cxx_preproc_warn_flag\n    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag\n  else\n    ac_cpp_err=\n  fi\nelse\n  ac_cpp_err=yes\nfi\nif test -z \"$ac_cpp_err\"; then\n  :\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n  # Broken: fails on valid input.\ncontinue\nfi\nrm -f conftest.err conftest.$ac_ext\n\n  # OK, works on sane cases.  Now check whether non-existent headers\n  # can be detected and how.\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <ac_nonexistent.h>\n_ACEOF\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_cpp conftest.$ac_ext\\\"\") >&5\n  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } >/dev/null; then\n  if test -s conftest.err; then\n    ac_cpp_err=$ac_cxx_preproc_warn_flag\n    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag\n  else\n    ac_cpp_err=\n  fi\nelse\n  ac_cpp_err=yes\nfi\nif test -z \"$ac_cpp_err\"; then\n  # Broken: success on invalid input.\ncontinue\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n  # Passes both tests.\nac_preproc_ok=:\nbreak\nfi\nrm -f conftest.err conftest.$ac_ext\n\ndone\n# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.\nrm -f conftest.err conftest.$ac_ext\nif $ac_preproc_ok; then\n  break\nfi\n\n    done\n    ac_cv_prog_CXXCPP=$CXXCPP\n\nfi\n  CXXCPP=$ac_cv_prog_CXXCPP\nelse\n  ac_cv_prog_CXXCPP=$CXXCPP\nfi\necho \"$as_me:$LINENO: result: $CXXCPP\" >&5\necho \"${ECHO_T}$CXXCPP\" >&6\nac_preproc_ok=false\nfor ac_cxx_preproc_warn_flag in '' yes\ndo\n  # Use a header file that comes with gcc, so configuring glibc\n  # with a fresh cross-compiler works.\n  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n  # <limits.h> exists even on freestanding compilers.\n  # On the NeXT, cc -E runs the code through the compiler's parser,\n  # not just through cpp. \"Syntax error\" is here to catch this case.\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\t\t     Syntax error\n_ACEOF\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_cpp conftest.$ac_ext\\\"\") >&5\n  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } >/dev/null; then\n  if test -s conftest.err; then\n    ac_cpp_err=$ac_cxx_preproc_warn_flag\n    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag\n  else\n    ac_cpp_err=\n  fi\nelse\n  ac_cpp_err=yes\nfi\nif test -z \"$ac_cpp_err\"; then\n  :\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n  # Broken: fails on valid input.\ncontinue\nfi\nrm -f conftest.err conftest.$ac_ext\n\n  # OK, works on sane cases.  Now check whether non-existent headers\n  # can be detected and how.\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <ac_nonexistent.h>\n_ACEOF\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_cpp conftest.$ac_ext\\\"\") >&5\n  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } >/dev/null; then\n  if test -s conftest.err; then\n    ac_cpp_err=$ac_cxx_preproc_warn_flag\n    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag\n  else\n    ac_cpp_err=\n  fi\nelse\n  ac_cpp_err=yes\nfi\nif test -z \"$ac_cpp_err\"; then\n  # Broken: success on invalid input.\ncontinue\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n  # Passes both tests.\nac_preproc_ok=:\nbreak\nfi\nrm -f conftest.err conftest.$ac_ext\n\ndone\n# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.\nrm -f conftest.err conftest.$ac_ext\nif $ac_preproc_ok; then\n  :\nelse\n  { { echo \"$as_me:$LINENO: error: C++ preprocessor \\\"$CXXCPP\\\" fails sanity check\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: C++ preprocessor \\\"$CXXCPP\\\" fails sanity check\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 1); exit 1; }; }\nfi\n\nac_ext=cc\nac_cpp='$CXXCPP $CPPFLAGS'\nac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_cxx_compiler_gnu\n\nfi\n\n\nac_ext=f\nac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'\nac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_f77_compiler_gnu\nif test -n \"$ac_tool_prefix\"; then\n  for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran\n  do\n    # Extract the first word of \"$ac_tool_prefix$ac_prog\", so it can be a program name with args.\nset dummy $ac_tool_prefix$ac_prog; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_F77+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$F77\"; then\n  ac_cv_prog_F77=\"$F77\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_F77=\"$ac_tool_prefix$ac_prog\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nF77=$ac_cv_prog_F77\nif test -n \"$F77\"; then\n  echo \"$as_me:$LINENO: result: $F77\" >&5\necho \"${ECHO_T}$F77\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\n    test -n \"$F77\" && break\n  done\nfi\nif test -z \"$F77\"; then\n  ac_ct_F77=$F77\n  for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran\ndo\n  # Extract the first word of \"$ac_prog\", so it can be a program name with args.\nset dummy $ac_prog; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_ac_ct_F77+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$ac_ct_F77\"; then\n  ac_cv_prog_ac_ct_F77=\"$ac_ct_F77\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_F77=\"$ac_prog\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nac_ct_F77=$ac_cv_prog_ac_ct_F77\nif test -n \"$ac_ct_F77\"; then\n  echo \"$as_me:$LINENO: result: $ac_ct_F77\" >&5\necho \"${ECHO_T}$ac_ct_F77\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\n  test -n \"$ac_ct_F77\" && break\ndone\n\n  F77=$ac_ct_F77\nfi\n\n\n# Provide some information about the compiler.\necho \"$as_me:6868:\" \\\n     \"checking for Fortran 77 compiler version\" >&5\nac_compiler=`set X $ac_compile; echo $2`\n{ (eval echo \"$as_me:$LINENO: \\\"$ac_compiler --version </dev/null >&5\\\"\") >&5\n  (eval $ac_compiler --version </dev/null >&5) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }\n{ (eval echo \"$as_me:$LINENO: \\\"$ac_compiler -v </dev/null >&5\\\"\") >&5\n  (eval $ac_compiler -v </dev/null >&5) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }\n{ (eval echo \"$as_me:$LINENO: \\\"$ac_compiler -V </dev/null >&5\\\"\") >&5\n  (eval $ac_compiler -V </dev/null >&5) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }\nrm -f a.out\n\n# If we don't use `.F' as extension, the preprocessor is not run on the\n# input file.  (Note that this only needs to work for GNU compilers.)\nac_save_ext=$ac_ext\nac_ext=F\necho \"$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler\" >&5\necho $ECHO_N \"checking whether we are using the GNU Fortran 77 compiler... $ECHO_C\" >&6\nif test \"${ac_cv_f77_compiler_gnu+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n      program main\n#ifndef __GNUC__\n       choke me\n#endif\n\n      end\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_f77_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_compiler_gnu=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_compiler_gnu=no\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nac_cv_f77_compiler_gnu=$ac_compiler_gnu\n\nfi\necho \"$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu\" >&5\necho \"${ECHO_T}$ac_cv_f77_compiler_gnu\" >&6\nac_ext=$ac_save_ext\nac_test_FFLAGS=${FFLAGS+set}\nac_save_FFLAGS=$FFLAGS\nFFLAGS=\necho \"$as_me:$LINENO: checking whether $F77 accepts -g\" >&5\necho $ECHO_N \"checking whether $F77 accepts -g... $ECHO_C\" >&6\nif test \"${ac_cv_prog_f77_g+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  FFLAGS=-g\ncat >conftest.$ac_ext <<_ACEOF\n      program main\n\n      end\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_f77_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_prog_f77_g=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_prog_f77_g=no\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\n\nfi\necho \"$as_me:$LINENO: result: $ac_cv_prog_f77_g\" >&5\necho \"${ECHO_T}$ac_cv_prog_f77_g\" >&6\nif test \"$ac_test_FFLAGS\" = set; then\n  FFLAGS=$ac_save_FFLAGS\nelif test $ac_cv_prog_f77_g = yes; then\n  if test \"x$ac_cv_f77_compiler_gnu\" = xyes; then\n    FFLAGS=\"-g -O2\"\n  else\n    FFLAGS=\"-g\"\n  fi\nelse\n  if test \"x$ac_cv_f77_compiler_gnu\" = xyes; then\n    FFLAGS=\"-O2\"\n  else\n    FFLAGS=\n  fi\nfi\n\nG77=`test $ac_compiler_gnu = yes && echo yes`\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\n\n\n# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!\n\n# find the maximum length of command line arguments\necho \"$as_me:$LINENO: checking the maximum length of command line arguments\" >&5\necho $ECHO_N \"checking the maximum length of command line arguments... $ECHO_C\" >&6\nif test \"${lt_cv_sys_max_cmd_len+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n    i=0\n  teststring=\"ABCD\"\n\n  case $build_os in\n  msdosdjgpp*)\n    # On DJGPP, this test can blow up pretty badly due to problems in libc\n    # (any single argument exceeding 2000 bytes causes a buffer overrun\n    # during glob expansion).  Even if it were fixed, the result of this\n    # check would be larger than it should be.\n    lt_cv_sys_max_cmd_len=12288;    # 12K is about right\n    ;;\n\n  gnu*)\n    # Under GNU Hurd, this test is not required because there is\n    # no limit to the length of command line arguments.\n    # Libtool will interpret -1 as no limit whatsoever\n    lt_cv_sys_max_cmd_len=-1;\n    ;;\n\n  cygwin* | mingw*)\n    # On Win9x/ME, this test blows up -- it succeeds, but takes\n    # about 5 minutes as the teststring grows exponentially.\n    # Worse, since 9x/ME are not pre-emptively multitasking,\n    # you end up with a \"frozen\" computer, even though with patience\n    # the test eventually succeeds (with a max line length of 256k).\n    # Instead, let's just punt: use the minimum linelength reported by\n    # all of the supported platforms: 8192 (on NT/2K/XP).\n    lt_cv_sys_max_cmd_len=8192;\n    ;;\n\n  amigaos*)\n    # On AmigaOS with pdksh, this test takes hours, literally.\n    # So we just punt and use a minimum line length of 8192.\n    lt_cv_sys_max_cmd_len=8192;\n    ;;\n\n  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)\n    # This has been around since 386BSD, at least.  Likely further.\n    if test -x /sbin/sysctl; then\n      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`\n    elif test -x /usr/sbin/sysctl; then\n      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`\n    else\n      lt_cv_sys_max_cmd_len=65536\t# usable default for all BSDs\n    fi\n    # And add a safety zone\n    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \\/ 4`\n    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \\* 3`\n    ;;\n\n  interix*)\n    # We know the value 262144 and hardcode it with a safety zone (like BSD)\n    lt_cv_sys_max_cmd_len=196608\n    ;;\n\n  osf*)\n    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure\n    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not\n    # nice to cause kernel panics so lets avoid the loop below.\n    # First set a reasonable default.\n    lt_cv_sys_max_cmd_len=16384\n    #\n    if test -x /sbin/sysconfig; then\n      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in\n        *1*) lt_cv_sys_max_cmd_len=-1 ;;\n      esac\n    fi\n    ;;\n  sco3.2v5*)\n    lt_cv_sys_max_cmd_len=102400\n    ;;\n  sysv5* | sco5v6* | sysv4.2uw2*)\n    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`\n    if test -n \"$kargmax\"; then\n      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ \t]//'`\n    else\n      lt_cv_sys_max_cmd_len=32768\n    fi\n    ;;\n  *)\n    # If test is not a shell built-in, we'll probably end up computing a\n    # maximum length that is only half of the actual maximum length, but\n    # we can't tell.\n    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}\n    while (test \"X\"`$SHELL $0 --fallback-echo \"X$teststring\" 2>/dev/null` \\\n\t       = \"XX$teststring\") >/dev/null 2>&1 &&\n\t    new_result=`expr \"X$teststring\" : \".*\" 2>&1` &&\n\t    lt_cv_sys_max_cmd_len=$new_result &&\n\t    test $i != 17 # 1/2 MB should be enough\n    do\n      i=`expr $i + 1`\n      teststring=$teststring$teststring\n    done\n    teststring=\n    # Add a significant safety factor because C++ compilers can tack on massive\n    # amounts of additional arguments before passing them to the linker.\n    # It appears as though 1/2 is a usable value.\n    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \\/ 2`\n    ;;\n  esac\n\nfi\n\nif test -n $lt_cv_sys_max_cmd_len ; then\n  echo \"$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len\" >&5\necho \"${ECHO_T}$lt_cv_sys_max_cmd_len\" >&6\nelse\n  echo \"$as_me:$LINENO: result: none\" >&5\necho \"${ECHO_T}none\" >&6\nfi\n\n\n\n\n# Check for command to grab the raw symbol name followed by C symbol from nm.\necho \"$as_me:$LINENO: checking command to parse $NM output from $compiler object\" >&5\necho $ECHO_N \"checking command to parse $NM output from $compiler object... $ECHO_C\" >&6\nif test \"${lt_cv_sys_global_symbol_pipe+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n\n# These are sane defaults that work on at least a few old systems.\n# [They come from Ultrix.  What could be older than Ultrix?!! ;)]\n\n# Character class describing NM global symbol codes.\nsymcode='[BCDEGRST]'\n\n# Regexp to match symbols that can be accessed directly from C.\nsympat='\\([_A-Za-z][_A-Za-z0-9]*\\)'\n\n# Transform an extracted symbol line into a proper C declaration\nlt_cv_sys_global_symbol_to_cdecl=\"sed -n -e 's/^. .* \\(.*\\)$/extern int \\1;/p'\"\n\n# Transform an extracted symbol line into symbol name and symbol address\nlt_cv_sys_global_symbol_to_c_name_address=\"sed -n -e 's/^: \\([^ ]*\\) $/  {\\\\\\\"\\1\\\\\\\", (lt_ptr) 0},/p' -e 's/^$symcode \\([^ ]*\\) \\([^ ]*\\)$/  {\\\"\\2\\\", (lt_ptr) \\&\\2},/p'\"\n\n# Define system-specific variables.\ncase $host_os in\naix*)\n  symcode='[BCDT]'\n  ;;\ncygwin* | mingw* | pw32*)\n  symcode='[ABCDGISTW]'\n  ;;\nhpux*) # Its linker distinguishes data from code symbols\n  if test \"$host_cpu\" = ia64; then\n    symcode='[ABCDEGRST]'\n  fi\n  lt_cv_sys_global_symbol_to_cdecl=\"sed -n -e 's/^T .* \\(.*\\)$/extern int \\1();/p' -e 's/^$symcode* .* \\(.*\\)$/extern char \\1;/p'\"\n  lt_cv_sys_global_symbol_to_c_name_address=\"sed -n -e 's/^: \\([^ ]*\\) $/  {\\\\\\\"\\1\\\\\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \\([^ ]*\\) \\([^ ]*\\)$/  {\\\"\\2\\\", (lt_ptr) \\&\\2},/p'\"\n  ;;\nlinux*)\n  if test \"$host_cpu\" = ia64; then\n    symcode='[ABCDGIRSTW]'\n    lt_cv_sys_global_symbol_to_cdecl=\"sed -n -e 's/^T .* \\(.*\\)$/extern int \\1();/p' -e 's/^$symcode* .* \\(.*\\)$/extern char \\1;/p'\"\n    lt_cv_sys_global_symbol_to_c_name_address=\"sed -n -e 's/^: \\([^ ]*\\) $/  {\\\\\\\"\\1\\\\\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \\([^ ]*\\) \\([^ ]*\\)$/  {\\\"\\2\\\", (lt_ptr) \\&\\2},/p'\"\n  fi\n  ;;\nirix* | nonstopux*)\n  symcode='[BCDEGRST]'\n  ;;\nosf*)\n  symcode='[BCDEGQRST]'\n  ;;\nsolaris*)\n  symcode='[BDRT]'\n  ;;\nsco3.2v5*)\n  symcode='[DT]'\n  ;;\nsysv4.2uw2*)\n  symcode='[DT]'\n  ;;\nsysv5* | sco5v6* | unixware* | OpenUNIX*)\n  symcode='[ABDT]'\n  ;;\nsysv4)\n  symcode='[DFNSTU]'\n  ;;\nesac\n\n# Handle CRLF in mingw tool chain\nopt_cr=\ncase $build_os in\nmingw*)\n  opt_cr=`echo 'x\\{0,1\\}' | tr x '\\015'` # option cr in regexp\n  ;;\nesac\n\n# If we're using GNU nm, then use its standard symbol codes.\ncase `$NM -V 2>&1` in\n*GNU* | *'with BFD'*)\n  symcode='[ABCDGIRSTW]' ;;\nesac\n\n# Try without a prefix undercore, then with it.\nfor ac_symprfx in \"\" \"_\"; do\n\n  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.\n  symxfrm=\"\\\\1 $ac_symprfx\\\\2 \\\\2\"\n\n  # Write the raw and C identifiers.\n  lt_cv_sys_global_symbol_pipe=\"sed -n -e 's/^.*[ \t]\\($symcode$symcode*\\)[ \t][ \t]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'\"\n\n  # Check to see that the pipe works correctly.\n  pipe_works=no\n\n  rm -f conftest*\n  cat > conftest.$ac_ext <<EOF\n#ifdef __cplusplus\nextern \"C\" {\n#endif\nchar nm_test_var;\nvoid nm_test_func(){}\n#ifdef __cplusplus\n}\n#endif\nint main(){nm_test_var='a';nm_test_func();return(0);}\nEOF\n\n  if { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; then\n    # Now try to grab the symbols.\n    nlist=conftest.nm\n    if { (eval echo \"$as_me:$LINENO: \\\"$NM conftest.$ac_objext \\| $lt_cv_sys_global_symbol_pipe \\> $nlist\\\"\") >&5\n  (eval $NM conftest.$ac_objext \\| $lt_cv_sys_global_symbol_pipe \\> $nlist) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } && test -s \"$nlist\"; then\n      # Try sorting and uniquifying the output.\n      if sort \"$nlist\" | uniq > \"$nlist\"T; then\n\tmv -f \"$nlist\"T \"$nlist\"\n      else\n\trm -f \"$nlist\"T\n      fi\n\n      # Make sure that we snagged all the symbols we need.\n      if grep ' nm_test_var$' \"$nlist\" >/dev/null; then\n\tif grep ' nm_test_func$' \"$nlist\" >/dev/null; then\n\t  cat <<EOF > conftest.$ac_ext\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nEOF\n\t  # Now generate the symbol file.\n\t  eval \"$lt_cv_sys_global_symbol_to_cdecl\"' < \"$nlist\" | grep -v main >> conftest.$ac_ext'\n\n\t  cat <<EOF >> conftest.$ac_ext\n#if defined (__STDC__) && __STDC__\n# define lt_ptr_t void *\n#else\n# define lt_ptr_t char *\n# define const\n#endif\n\n/* The mapping between symbol names and symbols. */\nconst struct {\n  const char *name;\n  lt_ptr_t address;\n}\nlt_preloaded_symbols[] =\n{\nEOF\n\t  $SED \"s/^$symcode$symcode* \\(.*\\) \\(.*\\)$/  {\\\"\\2\\\", (lt_ptr_t) \\&\\2},/\" < \"$nlist\" | grep -v main >> conftest.$ac_ext\n\t  cat <<\\EOF >> conftest.$ac_ext\n  {0, (lt_ptr_t) 0}\n};\n\n#ifdef __cplusplus\n}\n#endif\nEOF\n\t  # Now try linking the two files.\n\t  mv conftest.$ac_objext conftstm.$ac_objext\n\t  lt_save_LIBS=\"$LIBS\"\n\t  lt_save_CFLAGS=\"$CFLAGS\"\n\t  LIBS=\"conftstm.$ac_objext\"\n\t  CFLAGS=\"$CFLAGS$lt_prog_compiler_no_builtin_flag\"\n\t  if { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } && test -s conftest${ac_exeext}; then\n\t    pipe_works=yes\n\t  fi\n\t  LIBS=\"$lt_save_LIBS\"\n\t  CFLAGS=\"$lt_save_CFLAGS\"\n\telse\n\t  echo \"cannot find nm_test_func in $nlist\" >&5\n\tfi\n      else\n\techo \"cannot find nm_test_var in $nlist\" >&5\n      fi\n    else\n      echo \"cannot run $lt_cv_sys_global_symbol_pipe\" >&5\n    fi\n  else\n    echo \"$progname: failed program was:\" >&5\n    cat conftest.$ac_ext >&5\n  fi\n  rm -f conftest* conftst*\n\n  # Do not use the global_symbol_pipe unless it works.\n  if test \"$pipe_works\" = yes; then\n    break\n  else\n    lt_cv_sys_global_symbol_pipe=\n  fi\ndone\n\nfi\n\nif test -z \"$lt_cv_sys_global_symbol_pipe\"; then\n  lt_cv_sys_global_symbol_to_cdecl=\nfi\nif test -z \"$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl\"; then\n  echo \"$as_me:$LINENO: result: failed\" >&5\necho \"${ECHO_T}failed\" >&6\nelse\n  echo \"$as_me:$LINENO: result: ok\" >&5\necho \"${ECHO_T}ok\" >&6\nfi\n\necho \"$as_me:$LINENO: checking for objdir\" >&5\necho $ECHO_N \"checking for objdir... $ECHO_C\" >&6\nif test \"${lt_cv_objdir+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  rm -f .libs 2>/dev/null\nmkdir .libs 2>/dev/null\nif test -d .libs; then\n  lt_cv_objdir=.libs\nelse\n  # MS-DOS does not allow filenames that begin with a dot.\n  lt_cv_objdir=_libs\nfi\nrmdir .libs 2>/dev/null\nfi\necho \"$as_me:$LINENO: result: $lt_cv_objdir\" >&5\necho \"${ECHO_T}$lt_cv_objdir\" >&6\nobjdir=$lt_cv_objdir\n\n\n\n\n\ncase $host_os in\naix3*)\n  # AIX sometimes has problems with the GCC collect2 program.  For some\n  # reason, if we set the COLLECT_NAMES environment variable, the problems\n  # vanish in a puff of smoke.\n  if test \"X${COLLECT_NAMES+set}\" != Xset; then\n    COLLECT_NAMES=\n    export COLLECT_NAMES\n  fi\n  ;;\nesac\n\n# Sed substitution that helps us do robust quoting.  It backslashifies\n# metacharacters that are still active within double-quoted strings.\nXsed='sed -e 1s/^X//'\nsed_quote_subst='s/\\([\\\\\"\\\\`$\\\\\\\\]\\)/\\\\\\1/g'\n\n# Same as above, but do not quote variable references.\ndouble_quote_subst='s/\\([\\\\\"\\\\`\\\\\\\\]\\)/\\\\\\1/g'\n\n# Sed substitution to delay expansion of an escaped shell variable in a\n# double_quote_subst'ed string.\ndelay_variable_subst='s/\\\\\\\\\\\\\\\\\\\\\\$/\\\\\\\\\\\\$/g'\n\n# Sed substitution to avoid accidental globbing in evaled expressions\nno_glob_subst='s/\\*/\\\\\\*/g'\n\n# Constants:\nrm=\"rm -f\"\n\n# Global variables:\ndefault_ofile=libtool\ncan_build_shared=yes\n\n# All known linkers require a `.a' archive for static linking (except MSVC,\n# which needs '.lib').\nlibext=a\nltmain=\"$ac_aux_dir/ltmain.sh\"\nofile=\"$default_ofile\"\nwith_gnu_ld=\"$lt_cv_prog_gnu_ld\"\n\nif test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}ar\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}ar; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_AR+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$AR\"; then\n  ac_cv_prog_AR=\"$AR\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_AR=\"${ac_tool_prefix}ar\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nAR=$ac_cv_prog_AR\nif test -n \"$AR\"; then\n  echo \"$as_me:$LINENO: result: $AR\" >&5\necho \"${ECHO_T}$AR\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\nfi\nif test -z \"$ac_cv_prog_AR\"; then\n  ac_ct_AR=$AR\n  # Extract the first word of \"ar\", so it can be a program name with args.\nset dummy ar; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_ac_ct_AR+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$ac_ct_AR\"; then\n  ac_cv_prog_ac_ct_AR=\"$ac_ct_AR\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_AR=\"ar\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\n  test -z \"$ac_cv_prog_ac_ct_AR\" && ac_cv_prog_ac_ct_AR=\"false\"\nfi\nfi\nac_ct_AR=$ac_cv_prog_ac_ct_AR\nif test -n \"$ac_ct_AR\"; then\n  echo \"$as_me:$LINENO: result: $ac_ct_AR\" >&5\necho \"${ECHO_T}$ac_ct_AR\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\n  AR=$ac_ct_AR\nelse\n  AR=\"$ac_cv_prog_AR\"\nfi\n\nif test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}ranlib\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}ranlib; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_RANLIB+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$RANLIB\"; then\n  ac_cv_prog_RANLIB=\"$RANLIB\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_RANLIB=\"${ac_tool_prefix}ranlib\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nRANLIB=$ac_cv_prog_RANLIB\nif test -n \"$RANLIB\"; then\n  echo \"$as_me:$LINENO: result: $RANLIB\" >&5\necho \"${ECHO_T}$RANLIB\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\nfi\nif test -z \"$ac_cv_prog_RANLIB\"; then\n  ac_ct_RANLIB=$RANLIB\n  # Extract the first word of \"ranlib\", so it can be a program name with args.\nset dummy ranlib; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_ac_ct_RANLIB+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$ac_ct_RANLIB\"; then\n  ac_cv_prog_ac_ct_RANLIB=\"$ac_ct_RANLIB\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_RANLIB=\"ranlib\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\n  test -z \"$ac_cv_prog_ac_ct_RANLIB\" && ac_cv_prog_ac_ct_RANLIB=\":\"\nfi\nfi\nac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB\nif test -n \"$ac_ct_RANLIB\"; then\n  echo \"$as_me:$LINENO: result: $ac_ct_RANLIB\" >&5\necho \"${ECHO_T}$ac_ct_RANLIB\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\n  RANLIB=$ac_ct_RANLIB\nelse\n  RANLIB=\"$ac_cv_prog_RANLIB\"\nfi\n\nif test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}strip\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}strip; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_STRIP+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$STRIP\"; then\n  ac_cv_prog_STRIP=\"$STRIP\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_STRIP=\"${ac_tool_prefix}strip\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nSTRIP=$ac_cv_prog_STRIP\nif test -n \"$STRIP\"; then\n  echo \"$as_me:$LINENO: result: $STRIP\" >&5\necho \"${ECHO_T}$STRIP\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\nfi\nif test -z \"$ac_cv_prog_STRIP\"; then\n  ac_ct_STRIP=$STRIP\n  # Extract the first word of \"strip\", so it can be a program name with args.\nset dummy strip; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_ac_ct_STRIP+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$ac_ct_STRIP\"; then\n  ac_cv_prog_ac_ct_STRIP=\"$ac_ct_STRIP\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_STRIP=\"strip\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\n  test -z \"$ac_cv_prog_ac_ct_STRIP\" && ac_cv_prog_ac_ct_STRIP=\":\"\nfi\nfi\nac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP\nif test -n \"$ac_ct_STRIP\"; then\n  echo \"$as_me:$LINENO: result: $ac_ct_STRIP\" >&5\necho \"${ECHO_T}$ac_ct_STRIP\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\n  STRIP=$ac_ct_STRIP\nelse\n  STRIP=\"$ac_cv_prog_STRIP\"\nfi\n\n\nold_CC=\"$CC\"\nold_CFLAGS=\"$CFLAGS\"\n\n# Set sane defaults for various variables\ntest -z \"$AR\" && AR=ar\ntest -z \"$AR_FLAGS\" && AR_FLAGS=cru\ntest -z \"$AS\" && AS=as\ntest -z \"$CC\" && CC=cc\ntest -z \"$LTCC\" && LTCC=$CC\ntest -z \"$LTCFLAGS\" && LTCFLAGS=$CFLAGS\ntest -z \"$DLLTOOL\" && DLLTOOL=dlltool\ntest -z \"$LD\" && LD=ld\ntest -z \"$LN_S\" && LN_S=\"ln -s\"\ntest -z \"$MAGIC_CMD\" && MAGIC_CMD=file\ntest -z \"$NM\" && NM=nm\ntest -z \"$SED\" && SED=sed\ntest -z \"$OBJDUMP\" && OBJDUMP=objdump\ntest -z \"$RANLIB\" && RANLIB=:\ntest -z \"$STRIP\" && STRIP=:\ntest -z \"$ac_objext\" && ac_objext=o\n\n# Determine commands to create old-style static archives.\nold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'\nold_postinstall_cmds='chmod 644 $oldlib'\nold_postuninstall_cmds=\n\nif test -n \"$RANLIB\"; then\n  case $host_os in\n  openbsd*)\n    old_postinstall_cmds=\"$old_postinstall_cmds~\\$RANLIB -t \\$oldlib\"\n    ;;\n  *)\n    old_postinstall_cmds=\"$old_postinstall_cmds~\\$RANLIB \\$oldlib\"\n    ;;\n  esac\n  old_archive_cmds=\"$old_archive_cmds~\\$RANLIB \\$oldlib\"\nfi\n\nfor cc_temp in $compiler\"\"; do\n  case $cc_temp in\n    compile | *[\\\\/]compile | ccache | *[\\\\/]ccache ) ;;\n    distcc | *[\\\\/]distcc | purify | *[\\\\/]purify ) ;;\n    \\-*) ;;\n    *) break;;\n  esac\ndone\ncc_basename=`$echo \"X$cc_temp\" | $Xsed -e 's%.*/%%' -e \"s%^$host_alias-%%\"`\n\n\n# Only perform the check for file, if the check method requires it\ncase $deplibs_check_method in\nfile_magic*)\n  if test \"$file_magic_cmd\" = '$MAGIC_CMD'; then\n    echo \"$as_me:$LINENO: checking for ${ac_tool_prefix}file\" >&5\necho $ECHO_N \"checking for ${ac_tool_prefix}file... $ECHO_C\" >&6\nif test \"${lt_cv_path_MAGIC_CMD+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  case $MAGIC_CMD in\n[\\\\/*] |  ?:[\\\\/]*)\n  lt_cv_path_MAGIC_CMD=\"$MAGIC_CMD\" # Let the user override the test with a path.\n  ;;\n*)\n  lt_save_MAGIC_CMD=\"$MAGIC_CMD\"\n  lt_save_ifs=\"$IFS\"; IFS=$PATH_SEPARATOR\n  ac_dummy=\"/usr/bin$PATH_SEPARATOR$PATH\"\n  for ac_dir in $ac_dummy; do\n    IFS=\"$lt_save_ifs\"\n    test -z \"$ac_dir\" && ac_dir=.\n    if test -f $ac_dir/${ac_tool_prefix}file; then\n      lt_cv_path_MAGIC_CMD=\"$ac_dir/${ac_tool_prefix}file\"\n      if test -n \"$file_magic_test_file\"; then\n\tcase $deplibs_check_method in\n\t\"file_magic \"*)\n\t  file_magic_regex=`expr \"$deplibs_check_method\" : \"file_magic \\(.*\\)\"`\n\t  MAGIC_CMD=\"$lt_cv_path_MAGIC_CMD\"\n\t  if eval $file_magic_cmd \\$file_magic_test_file 2> /dev/null |\n\t    $EGREP \"$file_magic_regex\" > /dev/null; then\n\t    :\n\t  else\n\t    cat <<EOF 1>&2\n\n*** Warning: the command libtool uses to detect shared libraries,\n*** $file_magic_cmd, produces output that libtool cannot recognize.\n*** The result is that libtool may fail to recognize shared libraries\n*** as such.  This will affect the creation of libtool libraries that\n*** depend on shared libraries, but programs linked with such libtool\n*** libraries will work regardless of this problem.  Nevertheless, you\n*** may want to report the problem to your system manager and/or to\n*** bug-libtool@gnu.org\n\nEOF\n\t  fi ;;\n\tesac\n      fi\n      break\n    fi\n  done\n  IFS=\"$lt_save_ifs\"\n  MAGIC_CMD=\"$lt_save_MAGIC_CMD\"\n  ;;\nesac\nfi\n\nMAGIC_CMD=\"$lt_cv_path_MAGIC_CMD\"\nif test -n \"$MAGIC_CMD\"; then\n  echo \"$as_me:$LINENO: result: $MAGIC_CMD\" >&5\necho \"${ECHO_T}$MAGIC_CMD\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\nif test -z \"$lt_cv_path_MAGIC_CMD\"; then\n  if test -n \"$ac_tool_prefix\"; then\n    echo \"$as_me:$LINENO: checking for file\" >&5\necho $ECHO_N \"checking for file... $ECHO_C\" >&6\nif test \"${lt_cv_path_MAGIC_CMD+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  case $MAGIC_CMD in\n[\\\\/*] |  ?:[\\\\/]*)\n  lt_cv_path_MAGIC_CMD=\"$MAGIC_CMD\" # Let the user override the test with a path.\n  ;;\n*)\n  lt_save_MAGIC_CMD=\"$MAGIC_CMD\"\n  lt_save_ifs=\"$IFS\"; IFS=$PATH_SEPARATOR\n  ac_dummy=\"/usr/bin$PATH_SEPARATOR$PATH\"\n  for ac_dir in $ac_dummy; do\n    IFS=\"$lt_save_ifs\"\n    test -z \"$ac_dir\" && ac_dir=.\n    if test -f $ac_dir/file; then\n      lt_cv_path_MAGIC_CMD=\"$ac_dir/file\"\n      if test -n \"$file_magic_test_file\"; then\n\tcase $deplibs_check_method in\n\t\"file_magic \"*)\n\t  file_magic_regex=`expr \"$deplibs_check_method\" : \"file_magic \\(.*\\)\"`\n\t  MAGIC_CMD=\"$lt_cv_path_MAGIC_CMD\"\n\t  if eval $file_magic_cmd \\$file_magic_test_file 2> /dev/null |\n\t    $EGREP \"$file_magic_regex\" > /dev/null; then\n\t    :\n\t  else\n\t    cat <<EOF 1>&2\n\n*** Warning: the command libtool uses to detect shared libraries,\n*** $file_magic_cmd, produces output that libtool cannot recognize.\n*** The result is that libtool may fail to recognize shared libraries\n*** as such.  This will affect the creation of libtool libraries that\n*** depend on shared libraries, but programs linked with such libtool\n*** libraries will work regardless of this problem.  Nevertheless, you\n*** may want to report the problem to your system manager and/or to\n*** bug-libtool@gnu.org\n\nEOF\n\t  fi ;;\n\tesac\n      fi\n      break\n    fi\n  done\n  IFS=\"$lt_save_ifs\"\n  MAGIC_CMD=\"$lt_save_MAGIC_CMD\"\n  ;;\nesac\nfi\n\nMAGIC_CMD=\"$lt_cv_path_MAGIC_CMD\"\nif test -n \"$MAGIC_CMD\"; then\n  echo \"$as_me:$LINENO: result: $MAGIC_CMD\" >&5\necho \"${ECHO_T}$MAGIC_CMD\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\n  else\n    MAGIC_CMD=:\n  fi\nfi\n\n  fi\n  ;;\nesac\n\nenable_dlopen=no\nenable_win32_dll=no\n\n# Check whether --enable-libtool-lock or --disable-libtool-lock was given.\nif test \"${enable_libtool_lock+set}\" = set; then\n  enableval=\"$enable_libtool_lock\"\n\nfi;\ntest \"x$enable_libtool_lock\" != xno && enable_libtool_lock=yes\n\n\n# Check whether --with-pic or --without-pic was given.\nif test \"${with_pic+set}\" = set; then\n  withval=\"$with_pic\"\n  pic_mode=\"$withval\"\nelse\n  pic_mode=default\nfi;\ntest -z \"$pic_mode\" && pic_mode=default\n\n# Use C for the default configuration in the libtool script\ntagname=\nlt_save_CC=\"$CC\"\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\n\n# Source file extension for C test sources.\nac_ext=c\n\n# Object file extension for compiled C test sources.\nobjext=o\nobjext=$objext\n\n# Code to be used in simple compile tests\nlt_simple_compile_test_code=\"int some_variable = 0;\\n\"\n\n# Code to be used in simple link tests\nlt_simple_link_test_code='int main(){return(0);}\\n'\n\n\n# If no C compiler was specified, use CC.\nLTCC=${LTCC-\"$CC\"}\n\n# If no C compiler flags were specified, use CFLAGS.\nLTCFLAGS=${LTCFLAGS-\"$CFLAGS\"}\n\n# Allow CC to be a program name with arguments.\ncompiler=$CC\n\n\n# save warnings/boilerplate of simple test code\nac_outfile=conftest.$ac_objext\nprintf \"$lt_simple_compile_test_code\" >conftest.$ac_ext\neval \"$ac_compile\" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err\n_lt_compiler_boilerplate=`cat conftest.err`\n$rm conftest*\n\nac_outfile=conftest.$ac_objext\nprintf \"$lt_simple_link_test_code\" >conftest.$ac_ext\neval \"$ac_link\" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err\n_lt_linker_boilerplate=`cat conftest.err`\n$rm conftest*\n\n\n\nlt_prog_compiler_no_builtin_flag=\n\nif test \"$GCC\" = yes; then\n  lt_prog_compiler_no_builtin_flag=' -fno-builtin'\n\n\necho \"$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions\" >&5\necho $ECHO_N \"checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C\" >&6\nif test \"${lt_cv_prog_compiler_rtti_exceptions+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  lt_cv_prog_compiler_rtti_exceptions=no\n  ac_outfile=conftest.$ac_objext\n   printf \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n   lt_compiler_flag=\"-fno-rtti -fno-exceptions\"\n   # Insert the option either (1) after the last *FLAGS variable, or\n   # (2) before a word containing \"conftest.\", or (3) at the end.\n   # Note that $ac_compile itself does not contain backslashes and begins\n   # with a dollar sign (not a hyphen), so the echo should work correctly.\n   # The option is referenced via a variable to avoid confusing sed.\n   lt_compile=`echo \"$ac_compile\" | $SED \\\n   -e 's:.*FLAGS}\\{0,1\\} :&$lt_compiler_flag :; t' \\\n   -e 's: [^ ]*conftest\\.: $lt_compiler_flag&:; t' \\\n   -e 's:$: $lt_compiler_flag:'`\n   (eval echo \"\\\"\\$as_me:7931: $lt_compile\\\"\" >&5)\n   (eval \"$lt_compile\" 2>conftest.err)\n   ac_status=$?\n   cat conftest.err >&5\n   echo \"$as_me:7935: \\$? = $ac_status\" >&5\n   if (exit $ac_status) && test -s \"$ac_outfile\"; then\n     # The compiler can only warn and ignore the option if not recognized\n     # So say no if there are warnings other than the usual output.\n     $echo \"X$_lt_compiler_boilerplate\" | $Xsed -e '/^$/d' >conftest.exp\n     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2\n     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then\n       lt_cv_prog_compiler_rtti_exceptions=yes\n     fi\n   fi\n   $rm conftest*\n\nfi\necho \"$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions\" >&5\necho \"${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions\" >&6\n\nif test x\"$lt_cv_prog_compiler_rtti_exceptions\" = xyes; then\n    lt_prog_compiler_no_builtin_flag=\"$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions\"\nelse\n    :\nfi\n\nfi\n\nlt_prog_compiler_wl=\nlt_prog_compiler_pic=\nlt_prog_compiler_static=\n\necho \"$as_me:$LINENO: checking for $compiler option to produce PIC\" >&5\necho $ECHO_N \"checking for $compiler option to produce PIC... $ECHO_C\" >&6\n\n  if test \"$GCC\" = yes; then\n    lt_prog_compiler_wl='-Wl,'\n    lt_prog_compiler_static='-static'\n\n    case $host_os in\n      aix*)\n      # All AIX code is PIC.\n      if test \"$host_cpu\" = ia64; then\n\t# AIX 5 now supports IA64 processor\n\tlt_prog_compiler_static='-Bstatic'\n      fi\n      ;;\n\n    amigaos*)\n      # FIXME: we need at least 68020 code to build shared libraries, but\n      # adding the `-m68020' flag to GCC prevents building anything better,\n      # like `-m68040'.\n      lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'\n      ;;\n\n    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)\n      # PIC is the default for these OSes.\n      ;;\n\n    mingw* | pw32* | os2*)\n      # This hack is so that the source file can tell whether it is being\n      # built for inclusion in a dll (and should export symbols for example).\n      lt_prog_compiler_pic='-DDLL_EXPORT'\n      ;;\n\n    darwin* | rhapsody*)\n      # PIC is the default on this platform\n      # Common symbols not allowed in MH_DYLIB files\n      lt_prog_compiler_pic='-fno-common'\n      ;;\n\n    interix3*)\n      # Interix 3.x gcc -fpic/-fPIC options generate broken code.\n      # Instead, we relocate shared libraries at runtime.\n      ;;\n\n    msdosdjgpp*)\n      # Just because we use GCC doesn't mean we suddenly get shared libraries\n      # on systems that don't support them.\n      lt_prog_compiler_can_build_shared=no\n      enable_shared=no\n      ;;\n\n    sysv4*MP*)\n      if test -d /usr/nec; then\n\tlt_prog_compiler_pic=-Kconform_pic\n      fi\n      ;;\n\n    hpux*)\n      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but\n      # not for PA HP-UX.\n      case $host_cpu in\n      hppa*64*|ia64*)\n\t# +Z the default\n\t;;\n      *)\n\tlt_prog_compiler_pic='-fPIC'\n\t;;\n      esac\n      ;;\n\n    *)\n      lt_prog_compiler_pic='-fPIC'\n      ;;\n    esac\n  else\n    # PORTME Check for flag to pass linker flags through the system compiler.\n    case $host_os in\n    aix*)\n      lt_prog_compiler_wl='-Wl,'\n      if test \"$host_cpu\" = ia64; then\n\t# AIX 5 now supports IA64 processor\n\tlt_prog_compiler_static='-Bstatic'\n      else\n\tlt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'\n      fi\n      ;;\n      darwin*)\n        # PIC is the default on this platform\n        # Common symbols not allowed in MH_DYLIB files\n       case $cc_basename in\n         xlc*)\n         lt_prog_compiler_pic='-qnocommon'\n         lt_prog_compiler_wl='-Wl,'\n         ;;\n       esac\n       ;;\n\n    mingw* | pw32* | os2*)\n      # This hack is so that the source file can tell whether it is being\n      # built for inclusion in a dll (and should export symbols for example).\n      lt_prog_compiler_pic='-DDLL_EXPORT'\n      ;;\n\n    hpux9* | hpux10* | hpux11*)\n      lt_prog_compiler_wl='-Wl,'\n      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but\n      # not for PA HP-UX.\n      case $host_cpu in\n      hppa*64*|ia64*)\n\t# +Z the default\n\t;;\n      *)\n\tlt_prog_compiler_pic='+Z'\n\t;;\n      esac\n      # Is there a better lt_prog_compiler_static that works with the bundled CC?\n      lt_prog_compiler_static='${wl}-a ${wl}archive'\n      ;;\n\n    irix5* | irix6* | nonstopux*)\n      lt_prog_compiler_wl='-Wl,'\n      # PIC (with -KPIC) is the default.\n      lt_prog_compiler_static='-non_shared'\n      ;;\n\n    newsos6)\n      lt_prog_compiler_pic='-KPIC'\n      lt_prog_compiler_static='-Bstatic'\n      ;;\n\n    linux*)\n      case $cc_basename in\n      icc* | ecc*)\n\tlt_prog_compiler_wl='-Wl,'\n\tlt_prog_compiler_pic='-KPIC'\n\tlt_prog_compiler_static='-static'\n        ;;\n      pgcc* | pgf77* | pgf90* | pgf95*)\n        # Portland Group compilers (*not* the Pentium gcc compiler,\n\t# which looks to be a dead project)\n\tlt_prog_compiler_wl='-Wl,'\n\tlt_prog_compiler_pic='-fpic'\n\tlt_prog_compiler_static='-Bstatic'\n        ;;\n      ccc*)\n        lt_prog_compiler_wl='-Wl,'\n        # All Alpha code is PIC.\n        lt_prog_compiler_static='-non_shared'\n        ;;\n      esac\n      ;;\n\n    osf3* | osf4* | osf5*)\n      lt_prog_compiler_wl='-Wl,'\n      # All OSF/1 code is PIC.\n      lt_prog_compiler_static='-non_shared'\n      ;;\n\n    solaris*)\n      lt_prog_compiler_pic='-KPIC'\n      lt_prog_compiler_static='-Bstatic'\n      case $cc_basename in\n      f77* | f90* | f95*)\n\tlt_prog_compiler_wl='-Qoption ld ';;\n      *)\n\tlt_prog_compiler_wl='-Wl,';;\n      esac\n      ;;\n\n    sunos4*)\n      lt_prog_compiler_wl='-Qoption ld '\n      lt_prog_compiler_pic='-PIC'\n      lt_prog_compiler_static='-Bstatic'\n      ;;\n\n    sysv4 | sysv4.2uw2* | sysv4.3*)\n      lt_prog_compiler_wl='-Wl,'\n      lt_prog_compiler_pic='-KPIC'\n      lt_prog_compiler_static='-Bstatic'\n      ;;\n\n    sysv4*MP*)\n      if test -d /usr/nec ;then\n\tlt_prog_compiler_pic='-Kconform_pic'\n\tlt_prog_compiler_static='-Bstatic'\n      fi\n      ;;\n\n    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)\n      lt_prog_compiler_wl='-Wl,'\n      lt_prog_compiler_pic='-KPIC'\n      lt_prog_compiler_static='-Bstatic'\n      ;;\n\n    unicos*)\n      lt_prog_compiler_wl='-Wl,'\n      lt_prog_compiler_can_build_shared=no\n      ;;\n\n    uts4*)\n      lt_prog_compiler_pic='-pic'\n      lt_prog_compiler_static='-Bstatic'\n      ;;\n\n    *)\n      lt_prog_compiler_can_build_shared=no\n      ;;\n    esac\n  fi\n\necho \"$as_me:$LINENO: result: $lt_prog_compiler_pic\" >&5\necho \"${ECHO_T}$lt_prog_compiler_pic\" >&6\n\n#\n# Check to make sure the PIC flag actually works.\n#\nif test -n \"$lt_prog_compiler_pic\"; then\n\necho \"$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works\" >&5\necho $ECHO_N \"checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C\" >&6\nif test \"${lt_prog_compiler_pic_works+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  lt_prog_compiler_pic_works=no\n  ac_outfile=conftest.$ac_objext\n   printf \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n   lt_compiler_flag=\"$lt_prog_compiler_pic -DPIC\"\n   # Insert the option either (1) after the last *FLAGS variable, or\n   # (2) before a word containing \"conftest.\", or (3) at the end.\n   # Note that $ac_compile itself does not contain backslashes and begins\n   # with a dollar sign (not a hyphen), so the echo should work correctly.\n   # The option is referenced via a variable to avoid confusing sed.\n   lt_compile=`echo \"$ac_compile\" | $SED \\\n   -e 's:.*FLAGS}\\{0,1\\} :&$lt_compiler_flag :; t' \\\n   -e 's: [^ ]*conftest\\.: $lt_compiler_flag&:; t' \\\n   -e 's:$: $lt_compiler_flag:'`\n   (eval echo \"\\\"\\$as_me:8199: $lt_compile\\\"\" >&5)\n   (eval \"$lt_compile\" 2>conftest.err)\n   ac_status=$?\n   cat conftest.err >&5\n   echo \"$as_me:8203: \\$? = $ac_status\" >&5\n   if (exit $ac_status) && test -s \"$ac_outfile\"; then\n     # The compiler can only warn and ignore the option if not recognized\n     # So say no if there are warnings other than the usual output.\n     $echo \"X$_lt_compiler_boilerplate\" | $Xsed -e '/^$/d' >conftest.exp\n     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2\n     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then\n       lt_prog_compiler_pic_works=yes\n     fi\n   fi\n   $rm conftest*\n\nfi\necho \"$as_me:$LINENO: result: $lt_prog_compiler_pic_works\" >&5\necho \"${ECHO_T}$lt_prog_compiler_pic_works\" >&6\n\nif test x\"$lt_prog_compiler_pic_works\" = xyes; then\n    case $lt_prog_compiler_pic in\n     \"\" | \" \"*) ;;\n     *) lt_prog_compiler_pic=\" $lt_prog_compiler_pic\" ;;\n     esac\nelse\n    lt_prog_compiler_pic=\n     lt_prog_compiler_can_build_shared=no\nfi\n\nfi\ncase $host_os in\n  # For platforms which do not support PIC, -DPIC is meaningless:\n  *djgpp*)\n    lt_prog_compiler_pic=\n    ;;\n  *)\n    lt_prog_compiler_pic=\"$lt_prog_compiler_pic -DPIC\"\n    ;;\nesac\n\n#\n# Check to make sure the static flag actually works.\n#\nwl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\\\"$lt_prog_compiler_static\\\"\necho \"$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works\" >&5\necho $ECHO_N \"checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C\" >&6\nif test \"${lt_prog_compiler_static_works+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  lt_prog_compiler_static_works=no\n   save_LDFLAGS=\"$LDFLAGS\"\n   LDFLAGS=\"$LDFLAGS $lt_tmp_static_flag\"\n   printf \"$lt_simple_link_test_code\" > conftest.$ac_ext\n   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then\n     # The linker can only warn and ignore the option if not recognized\n     # So say no if there are warnings\n     if test -s conftest.err; then\n       # Append any errors to the config.log.\n       cat conftest.err 1>&5\n       $echo \"X$_lt_linker_boilerplate\" | $Xsed -e '/^$/d' > conftest.exp\n       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2\n       if diff conftest.exp conftest.er2 >/dev/null; then\n         lt_prog_compiler_static_works=yes\n       fi\n     else\n       lt_prog_compiler_static_works=yes\n     fi\n   fi\n   $rm conftest*\n   LDFLAGS=\"$save_LDFLAGS\"\n\nfi\necho \"$as_me:$LINENO: result: $lt_prog_compiler_static_works\" >&5\necho \"${ECHO_T}$lt_prog_compiler_static_works\" >&6\n\nif test x\"$lt_prog_compiler_static_works\" = xyes; then\n    :\nelse\n    lt_prog_compiler_static=\nfi\n\n\necho \"$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext\" >&5\necho $ECHO_N \"checking if $compiler supports -c -o file.$ac_objext... $ECHO_C\" >&6\nif test \"${lt_cv_prog_compiler_c_o+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  lt_cv_prog_compiler_c_o=no\n   $rm -r conftest 2>/dev/null\n   mkdir conftest\n   cd conftest\n   mkdir out\n   printf \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n\n   lt_compiler_flag=\"-o out/conftest2.$ac_objext\"\n   # Insert the option either (1) after the last *FLAGS variable, or\n   # (2) before a word containing \"conftest.\", or (3) at the end.\n   # Note that $ac_compile itself does not contain backslashes and begins\n   # with a dollar sign (not a hyphen), so the echo should work correctly.\n   lt_compile=`echo \"$ac_compile\" | $SED \\\n   -e 's:.*FLAGS}\\{0,1\\} :&$lt_compiler_flag :; t' \\\n   -e 's: [^ ]*conftest\\.: $lt_compiler_flag&:; t' \\\n   -e 's:$: $lt_compiler_flag:'`\n   (eval echo \"\\\"\\$as_me:8303: $lt_compile\\\"\" >&5)\n   (eval \"$lt_compile\" 2>out/conftest.err)\n   ac_status=$?\n   cat out/conftest.err >&5\n   echo \"$as_me:8307: \\$? = $ac_status\" >&5\n   if (exit $ac_status) && test -s out/conftest2.$ac_objext\n   then\n     # The compiler can only warn and ignore the option if not recognized\n     # So say no if there are warnings\n     $echo \"X$_lt_compiler_boilerplate\" | $Xsed -e '/^$/d' > out/conftest.exp\n     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2\n     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then\n       lt_cv_prog_compiler_c_o=yes\n     fi\n   fi\n   chmod u+w . 2>&5\n   $rm conftest*\n   # SGI C++ compiler will create directory out/ii_files/ for\n   # template instantiation\n   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files\n   $rm out/* && rmdir out\n   cd ..\n   rmdir conftest\n   $rm conftest*\n\nfi\necho \"$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o\" >&5\necho \"${ECHO_T}$lt_cv_prog_compiler_c_o\" >&6\n\n\nhard_links=\"nottested\"\nif test \"$lt_cv_prog_compiler_c_o\" = no && test \"$need_locks\" != no; then\n  # do not overwrite the value of need_locks provided by the user\n  echo \"$as_me:$LINENO: checking if we can lock with hard links\" >&5\necho $ECHO_N \"checking if we can lock with hard links... $ECHO_C\" >&6\n  hard_links=yes\n  $rm conftest*\n  ln conftest.a conftest.b 2>/dev/null && hard_links=no\n  touch conftest.a\n  ln conftest.a conftest.b 2>&5 || hard_links=no\n  ln conftest.a conftest.b 2>/dev/null && hard_links=no\n  echo \"$as_me:$LINENO: result: $hard_links\" >&5\necho \"${ECHO_T}$hard_links\" >&6\n  if test \"$hard_links\" = no; then\n    { echo \"$as_me:$LINENO: WARNING: \\`$CC' does not support \\`-c -o', so \\`make -j' may be unsafe\" >&5\necho \"$as_me: WARNING: \\`$CC' does not support \\`-c -o', so \\`make -j' may be unsafe\" >&2;}\n    need_locks=warn\n  fi\nelse\n  need_locks=no\nfi\n\necho \"$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries\" >&5\necho $ECHO_N \"checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C\" >&6\n\n  runpath_var=\n  allow_undefined_flag=\n  enable_shared_with_static_runtimes=no\n  archive_cmds=\n  archive_expsym_cmds=\n  old_archive_From_new_cmds=\n  old_archive_from_expsyms_cmds=\n  export_dynamic_flag_spec=\n  whole_archive_flag_spec=\n  thread_safe_flag_spec=\n  hardcode_libdir_flag_spec=\n  hardcode_libdir_flag_spec_ld=\n  hardcode_libdir_separator=\n  hardcode_direct=no\n  hardcode_minus_L=no\n  hardcode_shlibpath_var=unsupported\n  link_all_deplibs=unknown\n  hardcode_automatic=no\n  module_cmds=\n  module_expsym_cmds=\n  always_export_symbols=no\n  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\\''s/.* //'\\'' | sort | uniq > $export_symbols'\n  # include_expsyms should be a list of space-separated symbols to be *always*\n  # included in the symbol list\n  include_expsyms=\n  # exclude_expsyms can be an extended regexp of symbols to exclude\n  # it will be wrapped by ` (' and `)$', so one must not match beginning or\n  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',\n  # as well as any symbol that contains `d'.\n  exclude_expsyms=\"_GLOBAL_OFFSET_TABLE_\"\n  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out\n  # platforms (ab)use it in PIC code, but their linkers get confused if\n  # the symbol is explicitly referenced.  Since portable code cannot\n  # rely on this symbol name, it's probably fine to never include it in\n  # preloaded symbol tables.\n  extract_expsyms_cmds=\n  # Just being paranoid about ensuring that cc_basename is set.\n  for cc_temp in $compiler\"\"; do\n  case $cc_temp in\n    compile | *[\\\\/]compile | ccache | *[\\\\/]ccache ) ;;\n    distcc | *[\\\\/]distcc | purify | *[\\\\/]purify ) ;;\n    \\-*) ;;\n    *) break;;\n  esac\ndone\ncc_basename=`$echo \"X$cc_temp\" | $Xsed -e 's%.*/%%' -e \"s%^$host_alias-%%\"`\n\n  case $host_os in\n  cygwin* | mingw* | pw32*)\n    # FIXME: the MSVC++ port hasn't been tested in a loooong time\n    # When not using gcc, we currently assume that we are using\n    # Microsoft Visual C++.\n    if test \"$GCC\" != yes; then\n      with_gnu_ld=no\n    fi\n    ;;\n  interix*)\n    # we just hope/assume this is gcc and not c89 (= MSVC++)\n    with_gnu_ld=yes\n    ;;\n  openbsd*)\n    with_gnu_ld=no\n    ;;\n  esac\n\n  ld_shlibs=yes\n  if test \"$with_gnu_ld\" = yes; then\n    # If archive_cmds runs LD, not CC, wlarc should be empty\n    wlarc='${wl}'\n\n    # Set some defaults for GNU ld with shared library support. These\n    # are reset later if shared libraries are not supported. Putting them\n    # here allows them to be overridden if necessary.\n    runpath_var=LD_RUN_PATH\n    hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'\n    export_dynamic_flag_spec='${wl}--export-dynamic'\n    # ancient GNU ld didn't support --whole-archive et. al.\n    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then\n\twhole_archive_flag_spec=\"$wlarc\"'--whole-archive$convenience '\"$wlarc\"'--no-whole-archive'\n      else\n  \twhole_archive_flag_spec=\n    fi\n    supports_anon_versioning=no\n    case `$LD -v 2>/dev/null` in\n      *\\ [01].* | *\\ 2.[0-9].* | *\\ 2.10.*) ;; # catch versions < 2.11\n      *\\ 2.11.93.0.2\\ *) supports_anon_versioning=yes ;; # RH7.3 ...\n      *\\ 2.11.92.0.12\\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...\n      *\\ 2.11.*) ;; # other 2.11 versions\n      *) supports_anon_versioning=yes ;;\n    esac\n\n    # See if GNU ld supports shared libraries.\n    case $host_os in\n    aix3* | aix4* | aix5*)\n      # On AIX/PPC, the GNU linker is very broken\n      if test \"$host_cpu\" != ia64; then\n\tld_shlibs=no\n\tcat <<EOF 1>&2\n\n*** Warning: the GNU linker, at least up to release 2.9.1, is reported\n*** to be unable to reliably create shared libraries on AIX.\n*** Therefore, libtool is disabling shared libraries support.  If you\n*** really care for shared libraries, you may want to modify your PATH\n*** so that a non-GNU linker is found, and then restart.\n\nEOF\n      fi\n      ;;\n\n    amigaos*)\n      archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo \"#define NAME $libname\" > $output_objdir/a2ixlibrary.data~$echo \"#define LIBRARY_ID 1\" >> $output_objdir/a2ixlibrary.data~$echo \"#define VERSION $major\" >> $output_objdir/a2ixlibrary.data~$echo \"#define REVISION $revision\" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'\n      hardcode_libdir_flag_spec='-L$libdir'\n      hardcode_minus_L=yes\n\n      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports\n      # that the semantics of dynamic libraries on AmigaOS, at least up\n      # to version 4, is to share data among multiple programs linked\n      # with the same dynamic library.  Since this doesn't match the\n      # behavior of shared libraries on other platforms, we can't use\n      # them.\n      ld_shlibs=no\n      ;;\n\n    beos*)\n      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then\n\tallow_undefined_flag=unsupported\n\t# Joseph Beckenbach <jrb3@best.com> says some releases of gcc\n\t# support --undefined.  This deserves some investigation.  FIXME\n\tarchive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n      else\n\tld_shlibs=no\n      fi\n      ;;\n\n    cygwin* | mingw* | pw32*)\n      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,\n      # as there is no search path for DLLs.\n      hardcode_libdir_flag_spec='-L$libdir'\n      allow_undefined_flag=unsupported\n      always_export_symbols=no\n      enable_shared_with_static_runtimes=yes\n      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\\''/^[BCDGRS] /s/.* \\([^ ]*\\)/\\1 DATA/'\\'' | $SED -e '\\''/^[AITW] /s/.* //'\\'' | sort | uniq > $export_symbols'\n\n      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then\n        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'\n\t# If the export-symbols file already is a .def file (1st line\n\t# is EXPORTS), use it as is; otherwise, prepend...\n\tarchive_expsym_cmds='if test \"x`$SED 1q $export_symbols`\" = xEXPORTS; then\n\t  cp $export_symbols $output_objdir/$soname.def;\n\telse\n\t  echo EXPORTS > $output_objdir/$soname.def;\n\t  cat $export_symbols >> $output_objdir/$soname.def;\n\tfi~\n\t$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'\n      else\n\tld_shlibs=no\n      fi\n      ;;\n\n    interix3*)\n      hardcode_direct=no\n      hardcode_shlibpath_var=no\n      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'\n      export_dynamic_flag_spec='${wl}-E'\n      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.\n      # Instead, shared libraries are loaded at an image base (0x10000000 by\n      # default) and relocated if they conflict, which is a slow very memory\n      # consuming and fragmenting process.  To avoid this, we pick a random,\n      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link\n      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.\n      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \\* 262144 + 1342177280` -o $lib'\n      archive_expsym_cmds='sed \"s,^,_,\" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \\* 262144 + 1342177280` -o $lib'\n      ;;\n\n    linux*)\n      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then\n\ttmp_addflag=\n\tcase $cc_basename,$host_cpu in\n\tpgcc*)\t\t\t\t# Portland Group C compiler\n\t  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\\\"\\\"; do test  -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience,$conv\\\"; done; $echo \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n\t  tmp_addflag=' $pic_flag'\n\t  ;;\n\tpgf77* | pgf90* | pgf95*)\t# Portland Group f77 and f90 compilers\n\t  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\\\"\\\"; do test  -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience,$conv\\\"; done; $echo \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n\t  tmp_addflag=' $pic_flag -Mnomain' ;;\n\tecc*,ia64* | icc*,ia64*)\t\t# Intel C compiler on ia64\n\t  tmp_addflag=' -i_dynamic' ;;\n\tefc*,ia64* | ifort*,ia64*)\t# Intel Fortran compiler on ia64\n\t  tmp_addflag=' -i_dynamic -nofor_main' ;;\n\tifc* | ifort*)\t\t\t# Intel Fortran compiler\n\t  tmp_addflag=' -nofor_main' ;;\n\tesac\n\tarchive_cmds='$CC -shared'\"$tmp_addflag\"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\n\tif test $supports_anon_versioning = yes; then\n\t  archive_expsym_cmds='$echo \"{ global:\" > $output_objdir/$libname.ver~\n  cat $export_symbols | sed -e \"s/\\(.*\\)/\\1;/\" >> $output_objdir/$libname.ver~\n  $echo \"local: *; };\" >> $output_objdir/$libname.ver~\n\t  $CC -shared'\"$tmp_addflag\"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'\n\tfi\n      else\n\tld_shlibs=no\n      fi\n      ;;\n\n    netbsd*)\n      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then\n\tarchive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'\n\twlarc=\n      else\n\tarchive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\tarchive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n      fi\n      ;;\n\n    solaris*)\n      if $LD -v 2>&1 | grep 'BFD 2\\.8' > /dev/null; then\n\tld_shlibs=no\n\tcat <<EOF 1>&2\n\n*** Warning: The releases 2.8.* of the GNU linker cannot reliably\n*** create shared libraries on Solaris systems.  Therefore, libtool\n*** is disabling shared libraries support.  We urge you to upgrade GNU\n*** binutils to release 2.9.1 or newer.  Another option is to modify\n*** your PATH or compiler configuration so that the native linker is\n*** used, and then restart.\n\nEOF\n      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then\n\tarchive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\tarchive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n      else\n\tld_shlibs=no\n      fi\n      ;;\n\n    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)\n      case `$LD -v 2>&1` in\n        *\\ [01].* | *\\ 2.[0-9].* | *\\ 2.1[0-5].*)\n\tld_shlibs=no\n\tcat <<_LT_EOF 1>&2\n\n*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not\n*** reliably create shared libraries on SCO systems.  Therefore, libtool\n*** is disabling shared libraries support.  We urge you to upgrade GNU\n*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify\n*** your PATH or compiler configuration so that the native linker is\n*** used, and then restart.\n\n_LT_EOF\n\t;;\n\t*)\n\t  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then\n\t    hardcode_libdir_flag_spec='`test -z \"$SCOABSPATH\" && echo ${wl}-rpath,$libdir`'\n\t    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'\n\t    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'\n\t  else\n\t    ld_shlibs=no\n\t  fi\n\t;;\n      esac\n      ;;\n\n    sunos4*)\n      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'\n      wlarc=\n      hardcode_direct=yes\n      hardcode_shlibpath_var=no\n      ;;\n\n    *)\n      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then\n\tarchive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\tarchive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n      else\n\tld_shlibs=no\n      fi\n      ;;\n    esac\n\n    if test \"$ld_shlibs\" = no; then\n      runpath_var=\n      hardcode_libdir_flag_spec=\n      export_dynamic_flag_spec=\n      whole_archive_flag_spec=\n    fi\n  else\n    # PORTME fill in a description of your system's linker (not GNU ld)\n    case $host_os in\n    aix3*)\n      allow_undefined_flag=unsupported\n      always_export_symbols=yes\n      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'\n      # Note: this linker hardcodes the directories in LIBPATH if there\n      # are no directories specified by -L.\n      hardcode_minus_L=yes\n      if test \"$GCC\" = yes && test -z \"$lt_prog_compiler_static\"; then\n\t# Neither direct hardcoding nor static linking is supported with a\n\t# broken collect2.\n\thardcode_direct=unsupported\n      fi\n      ;;\n\n    aix4* | aix5*)\n      if test \"$host_cpu\" = ia64; then\n\t# On IA64, the linker does run time linking by default, so we don't\n\t# have to do anything special.\n\taix_use_runtimelinking=no\n\texp_sym_flag='-Bexport'\n\tno_entry_flag=\"\"\n      else\n\t# If we're using GNU nm, then we don't want the \"-C\" option.\n\t# -C means demangle to AIX nm, but means don't demangle with GNU nm\n\tif $NM -V 2>&1 | grep 'GNU' > /dev/null; then\n\t  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\\''{ if (((\\$2 == \"T\") || (\\$2 == \"D\") || (\\$2 == \"B\")) && (substr(\\$3,1,1) != \".\")) { print \\$3 } }'\\'' | sort -u > $export_symbols'\n\telse\n\t  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\\''{ if (((\\$2 == \"T\") || (\\$2 == \"D\") || (\\$2 == \"B\")) && (substr(\\$3,1,1) != \".\")) { print \\$3 } }'\\'' | sort -u > $export_symbols'\n\tfi\n\taix_use_runtimelinking=no\n\n\t# Test if we are trying to use run time linking or normal\n\t# AIX style linking. If -brtl is somewhere in LDFLAGS, we\n\t# need to do runtime linking.\n\tcase $host_os in aix4.[23]|aix4.[23].*|aix5*)\n\t  for ld_flag in $LDFLAGS; do\n  \t  if (test $ld_flag = \"-brtl\" || test $ld_flag = \"-Wl,-brtl\"); then\n  \t    aix_use_runtimelinking=yes\n  \t    break\n  \t  fi\n\t  done\n\t  ;;\n\tesac\n\n\texp_sym_flag='-bexport'\n\tno_entry_flag='-bnoentry'\n      fi\n\n      # When large executables or shared objects are built, AIX ld can\n      # have problems creating the table of contents.  If linking a library\n      # or program results in \"error TOC overflow\" add -mminimal-toc to\n      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not\n      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.\n\n      archive_cmds=''\n      hardcode_direct=yes\n      hardcode_libdir_separator=':'\n      link_all_deplibs=yes\n\n      if test \"$GCC\" = yes; then\n\tcase $host_os in aix4.[012]|aix4.[012].*)\n\t# We only want to do this on AIX 4.2 and lower, the check\n\t# below for broken collect2 doesn't work under 4.3+\n\t  collect2name=`${CC} -print-prog-name=collect2`\n\t  if test -f \"$collect2name\" && \\\n  \t   strings \"$collect2name\" | grep resolve_lib_name >/dev/null\n\t  then\n  \t  # We have reworked collect2\n  \t  hardcode_direct=yes\n\t  else\n  \t  # We have old collect2\n  \t  hardcode_direct=unsupported\n  \t  # It fails to find uninstalled libraries when the uninstalled\n  \t  # path is not listed in the libpath.  Setting hardcode_minus_L\n  \t  # to unsupported forces relinking\n  \t  hardcode_minus_L=yes\n  \t  hardcode_libdir_flag_spec='-L$libdir'\n  \t  hardcode_libdir_separator=\n\t  fi\n\t  ;;\n\tesac\n\tshared_flag='-shared'\n\tif test \"$aix_use_runtimelinking\" = yes; then\n\t  shared_flag=\"$shared_flag \"'${wl}-G'\n\tfi\n      else\n\t# not using gcc\n\tif test \"$host_cpu\" = ia64; then\n  \t# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release\n  \t# chokes on -Wl,-G. The following line is correct:\n\t  shared_flag='-G'\n\telse\n\t  if test \"$aix_use_runtimelinking\" = yes; then\n\t    shared_flag='${wl}-G'\n\t  else\n\t    shared_flag='${wl}-bM:SRE'\n\t  fi\n\tfi\n      fi\n\n      # It seems that -bexpall does not export symbols beginning with\n      # underscore (_), so it is better to generate a list of symbols to export.\n      always_export_symbols=yes\n      if test \"$aix_use_runtimelinking\" = yes; then\n\t# Warning - without using the other runtime loading flags (-brtl),\n\t# -berok will link without error, but may produce a broken library.\n\tallow_undefined_flag='-berok'\n       # Determine the default libpath from the value encoded in an empty executable.\n       cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n\naix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\\(.*\\)$/\\1/; p; }\n}'`\n# Check for a 64-bit object if we didn't find anything.\nif test -z \"$aix_libpath\"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\\(.*\\)$/\\1/; p; }\n}'`; fi\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nif test -z \"$aix_libpath\"; then aix_libpath=\"/usr/lib:/lib\"; fi\n\n       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'\"$aix_libpath\"\n\tarchive_expsym_cmds=\"\\$CC\"' -o $output_objdir/$soname $libobjs $deplibs '\"\\${wl}$no_entry_flag\"' $compiler_flags `if test \"x${allow_undefined_flag}\" != \"x\"; then echo \"${wl}${allow_undefined_flag}\"; else :; fi` '\"\\${wl}$exp_sym_flag:\\$export_symbols $shared_flag\"\n       else\n\tif test \"$host_cpu\" = ia64; then\n\t  hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'\n\t  allow_undefined_flag=\"-z nodefs\"\n\t  archive_expsym_cmds=\"\\$CC $shared_flag\"' -o $output_objdir/$soname $libobjs $deplibs '\"\\${wl}$no_entry_flag\"' $compiler_flags ${wl}${allow_undefined_flag} '\"\\${wl}$exp_sym_flag:\\$export_symbols\"\n\telse\n\t # Determine the default libpath from the value encoded in an empty executable.\n\t cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n\naix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\\(.*\\)$/\\1/; p; }\n}'`\n# Check for a 64-bit object if we didn't find anything.\nif test -z \"$aix_libpath\"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\\(.*\\)$/\\1/; p; }\n}'`; fi\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nif test -z \"$aix_libpath\"; then aix_libpath=\"/usr/lib:/lib\"; fi\n\n\t hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'\"$aix_libpath\"\n\t  # Warning - without using the other run time loading flags,\n\t  # -berok will link without error, but may produce a broken library.\n\t  no_undefined_flag=' ${wl}-bernotok'\n\t  allow_undefined_flag=' ${wl}-berok'\n\t  # Exported symbols can be pulled into shared objects from archives\n\t  whole_archive_flag_spec='$convenience'\n\t  archive_cmds_need_lc=yes\n\t  # This is similar to how AIX traditionally builds its shared libraries.\n\t  archive_expsym_cmds=\"\\$CC $shared_flag\"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'\n\tfi\n      fi\n      ;;\n\n    amigaos*)\n      archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo \"#define NAME $libname\" > $output_objdir/a2ixlibrary.data~$echo \"#define LIBRARY_ID 1\" >> $output_objdir/a2ixlibrary.data~$echo \"#define VERSION $major\" >> $output_objdir/a2ixlibrary.data~$echo \"#define REVISION $revision\" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'\n      hardcode_libdir_flag_spec='-L$libdir'\n      hardcode_minus_L=yes\n      # see comment about different semantics on the GNU ld section\n      ld_shlibs=no\n      ;;\n\n    bsdi[45]*)\n      export_dynamic_flag_spec=-rdynamic\n      ;;\n\n    cygwin* | mingw* | pw32*)\n      # When not using gcc, we currently assume that we are using\n      # Microsoft Visual C++.\n      # hardcode_libdir_flag_spec is actually meaningless, as there is\n      # no search path for DLLs.\n      hardcode_libdir_flag_spec=' '\n      allow_undefined_flag=unsupported\n      # Tell ltmain to make .lib files, not .a files.\n      libext=lib\n      # Tell ltmain to make .dll files, not .so files.\n      shrext_cmds=\".dll\"\n      # FIXME: Setting linknames here is a bad hack.\n      archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo \"$deplibs\" | $SED -e '\\''s/ -lc$//'\\''` -link -dll~linknames='\n      # The linker will automatically build a .lib file if we build a DLL.\n      old_archive_From_new_cmds='true'\n      # FIXME: Should let the user specify the lib program.\n      old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'\n      fix_srcfile_path='`cygpath -w \"$srcfile\"`'\n      enable_shared_with_static_runtimes=yes\n      ;;\n\n    darwin* | rhapsody*)\n      case $host_os in\n        rhapsody* | darwin1.[012])\n         allow_undefined_flag='${wl}-undefined ${wl}suppress'\n         ;;\n       *) # Darwin 1.3 on\n         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then\n           allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'\n         else\n           case ${MACOSX_DEPLOYMENT_TARGET} in\n             10.[012])\n               allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'\n               ;;\n             10.*)\n               allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'\n               ;;\n           esac\n         fi\n         ;;\n      esac\n      archive_cmds_need_lc=no\n      hardcode_direct=no\n      hardcode_automatic=yes\n      hardcode_shlibpath_var=unsupported\n      whole_archive_flag_spec=''\n      link_all_deplibs=yes\n    if test \"$GCC\" = yes ; then\n    \toutput_verbose_link_cmd='echo'\n        archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'\n      module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'\n      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds\n      archive_expsym_cmds='sed -e \"s,#.*,,\" -e \"s,^[    ]*,,\" -e \"s,^\\(..*\\),_&,\" < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'\n      module_expsym_cmds='sed -e \"s,#.*,,\" -e \"s,^[    ]*,,\" -e \"s,^\\(..*\\),_&,\" < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'\n    else\n      case $cc_basename in\n        xlc*)\n         output_verbose_link_cmd='echo'\n         archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'\n         module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'\n          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds\n         archive_expsym_cmds='sed -e \"s,#.*,,\" -e \"s,^[    ]*,,\" -e \"s,^\\(..*\\),_&,\" < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'\n          module_expsym_cmds='sed -e \"s,#.*,,\" -e \"s,^[    ]*,,\" -e \"s,^\\(..*\\),_&,\" < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'\n          ;;\n       *)\n         ld_shlibs=no\n          ;;\n      esac\n    fi\n      ;;\n\n    dgux*)\n      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      hardcode_libdir_flag_spec='-L$libdir'\n      hardcode_shlibpath_var=no\n      ;;\n\n    freebsd1*)\n      ld_shlibs=no\n      ;;\n\n    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor\n    # support.  Future versions do this automatically, but an explicit c++rt0.o\n    # does not break anything, and helps significantly (at the cost of a little\n    # extra space).\n    freebsd2.2*)\n      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'\n      hardcode_libdir_flag_spec='-R$libdir'\n      hardcode_direct=yes\n      hardcode_shlibpath_var=no\n      ;;\n\n    # Unfortunately, older versions of FreeBSD 2 do not have this feature.\n    freebsd2*)\n      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'\n      hardcode_direct=yes\n      hardcode_minus_L=yes\n      hardcode_shlibpath_var=no\n      ;;\n\n    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.\n    freebsd* | kfreebsd*-gnu | dragonfly*)\n      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'\n      hardcode_libdir_flag_spec='-R$libdir'\n      hardcode_direct=yes\n      hardcode_shlibpath_var=no\n      ;;\n\n    hpux9*)\n      if test \"$GCC\" = yes; then\n\tarchive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'\n      else\n\tarchive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'\n      fi\n      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'\n      hardcode_libdir_separator=:\n      hardcode_direct=yes\n\n      # hardcode_minus_L: Not really in the search PATH,\n      # but as the default location of the library.\n      hardcode_minus_L=yes\n      export_dynamic_flag_spec='${wl}-E'\n      ;;\n\n    hpux10*)\n      if test \"$GCC\" = yes -a \"$with_gnu_ld\" = no; then\n\tarchive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'\n      else\n\tarchive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'\n      fi\n      if test \"$with_gnu_ld\" = no; then\n\thardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'\n\thardcode_libdir_separator=:\n\n\thardcode_direct=yes\n\texport_dynamic_flag_spec='${wl}-E'\n\n\t# hardcode_minus_L: Not really in the search PATH,\n\t# but as the default location of the library.\n\thardcode_minus_L=yes\n      fi\n      ;;\n\n    hpux11*)\n      if test \"$GCC\" = yes -a \"$with_gnu_ld\" = no; then\n\tcase $host_cpu in\n\thppa*64*)\n\t  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\tia64*)\n\t  archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\t*)\n\t  archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\tesac\n      else\n\tcase $host_cpu in\n\thppa*64*)\n\t  archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\tia64*)\n\t  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\t*)\n\t  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\tesac\n      fi\n      if test \"$with_gnu_ld\" = no; then\n\thardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'\n\thardcode_libdir_separator=:\n\n\tcase $host_cpu in\n\thppa*64*|ia64*)\n\t  hardcode_libdir_flag_spec_ld='+b $libdir'\n\t  hardcode_direct=no\n\t  hardcode_shlibpath_var=no\n\t  ;;\n\t*)\n\t  hardcode_direct=yes\n\t  export_dynamic_flag_spec='${wl}-E'\n\n\t  # hardcode_minus_L: Not really in the search PATH,\n\t  # but as the default location of the library.\n\t  hardcode_minus_L=yes\n\t  ;;\n\tesac\n      fi\n      ;;\n\n    irix5* | irix6* | nonstopux*)\n      if test \"$GCC\" = yes; then\n\tarchive_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'\n      else\n\tarchive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n \"$verstring\" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'\n\thardcode_libdir_flag_spec_ld='-rpath $libdir'\n      fi\n      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'\n      hardcode_libdir_separator=:\n      link_all_deplibs=yes\n      ;;\n\n    netbsd*)\n      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then\n\tarchive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out\n      else\n\tarchive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF\n      fi\n      hardcode_libdir_flag_spec='-R$libdir'\n      hardcode_direct=yes\n      hardcode_shlibpath_var=no\n      ;;\n\n    newsos6)\n      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      hardcode_direct=yes\n      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'\n      hardcode_libdir_separator=:\n      hardcode_shlibpath_var=no\n      ;;\n\n    openbsd*)\n      hardcode_direct=yes\n      hardcode_shlibpath_var=no\n      if test -z \"`echo __ELF__ | $CC -E - | grep __ELF__`\" || test \"$host_os-$host_cpu\" = \"openbsd2.8-powerpc\"; then\n\tarchive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'\n\tarchive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'\n\thardcode_libdir_flag_spec='${wl}-rpath,$libdir'\n\texport_dynamic_flag_spec='${wl}-E'\n      else\n       case $host_os in\n\t openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)\n\t   archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'\n\t   hardcode_libdir_flag_spec='-R$libdir'\n\t   ;;\n\t *)\n\t   archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'\n\t   hardcode_libdir_flag_spec='${wl}-rpath,$libdir'\n\t   ;;\n       esac\n      fi\n      ;;\n\n    os2*)\n      hardcode_libdir_flag_spec='-L$libdir'\n      hardcode_minus_L=yes\n      allow_undefined_flag=unsupported\n      archive_cmds='$echo \"LIBRARY $libname INITINSTANCE\" > $output_objdir/$libname.def~$echo \"DESCRIPTION \\\"$libname\\\"\" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo \" SINGLE NONSHARED\" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'\n      old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'\n      ;;\n\n    osf3*)\n      if test \"$GCC\" = yes; then\n\tallow_undefined_flag=' ${wl}-expect_unresolved ${wl}\\*'\n\tarchive_cmds='$CC -shared${allow_undefined_flag} $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'\n      else\n\tallow_undefined_flag=' -expect_unresolved \\*'\n\tarchive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n \"$verstring\" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'\n      fi\n      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'\n      hardcode_libdir_separator=:\n      ;;\n\n    osf4* | osf5*)\t# as osf3* with the addition of -msym flag\n      if test \"$GCC\" = yes; then\n\tallow_undefined_flag=' ${wl}-expect_unresolved ${wl}\\*'\n\tarchive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n \"$verstring\" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'\n\thardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'\n      else\n\tallow_undefined_flag=' -expect_unresolved \\*'\n\tarchive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n \"$verstring\" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'\n\tarchive_expsym_cmds='for i in `cat $export_symbols`; do printf \"%s %s\\\\n\" -exported_symbol \"\\$i\" >> $lib.exp; done; echo \"-hidden\">> $lib.exp~\n\t$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n \"$verstring\" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'\n\n\t# Both c and cxx compiler support -rpath directly\n\thardcode_libdir_flag_spec='-rpath $libdir'\n      fi\n      hardcode_libdir_separator=:\n      ;;\n\n    solaris*)\n      no_undefined_flag=' -z text'\n      if test \"$GCC\" = yes; then\n\twlarc='${wl}'\n\tarchive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\tarchive_expsym_cmds='$echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~$echo \"local: *; };\" >> $lib.exp~\n\t  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'\n      else\n\twlarc=''\n\tarchive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'\n\tarchive_expsym_cmds='$echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~$echo \"local: *; };\" >> $lib.exp~\n  \t$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'\n      fi\n      hardcode_libdir_flag_spec='-R$libdir'\n      hardcode_shlibpath_var=no\n      case $host_os in\n      solaris2.[0-5] | solaris2.[0-5].*) ;;\n      *)\n \t# The compiler driver will combine linker options so we\n \t# cannot just pass the convience library names through\n \t# without $wl, iff we do not link with $LD.\n \t# Luckily, gcc supports the same syntax we need for Sun Studio.\n \t# Supported since Solaris 2.6 (maybe 2.5.1?)\n \tcase $wlarc in\n \t'')\n \t  whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;\n \t*)\n \t  whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\\\"\\\"; do test -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience,$conv\\\"; done; $echo \\\"$new_convenience\\\"` ${wl}-z ${wl}defaultextract' ;;\n \tesac ;;\n      esac\n      link_all_deplibs=yes\n      ;;\n\n    sunos4*)\n      if test \"x$host_vendor\" = xsequent; then\n\t# Use $CC to link under sequent, because it throws in some extra .o\n\t# files that make .init and .fini sections work.\n\tarchive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'\n      else\n\tarchive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'\n      fi\n      hardcode_libdir_flag_spec='-L$libdir'\n      hardcode_direct=yes\n      hardcode_minus_L=yes\n      hardcode_shlibpath_var=no\n      ;;\n\n    sysv4)\n      case $host_vendor in\n\tsni)\n\t  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n\t  hardcode_direct=yes # is this really true???\n\t;;\n\tsiemens)\n\t  ## LD is ld it makes a PLAMLIB\n\t  ## CC just makes a GrossModule.\n\t  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'\n\t  reload_cmds='$CC -r -o $output$reload_objs'\n\t  hardcode_direct=no\n        ;;\n\tmotorola)\n\t  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n\t  hardcode_direct=no #Motorola manual says yes, but my tests say they lie\n\t;;\n      esac\n      runpath_var='LD_RUN_PATH'\n      hardcode_shlibpath_var=no\n      ;;\n\n    sysv4.3*)\n      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      hardcode_shlibpath_var=no\n      export_dynamic_flag_spec='-Bexport'\n      ;;\n\n    sysv4*MP*)\n      if test -d /usr/nec; then\n\tarchive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n\thardcode_shlibpath_var=no\n\trunpath_var=LD_RUN_PATH\n\thardcode_runpath_var=yes\n\tld_shlibs=yes\n      fi\n      ;;\n\n    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)\n      no_undefined_flag='${wl}-z,text'\n      archive_cmds_need_lc=no\n      hardcode_shlibpath_var=no\n      runpath_var='LD_RUN_PATH'\n\n      if test \"$GCC\" = yes; then\n\tarchive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\tarchive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n      else\n\tarchive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\tarchive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n      fi\n      ;;\n\n    sysv5* | sco3.2v5* | sco5v6*)\n      # Note: We can NOT use -z defs as we might desire, because we do not\n      # link with -lc, and that would cause any symbols used from libc to\n      # always be unresolved, which means just about no library would\n      # ever link correctly.  If we're not using GNU ld we use -z text\n      # though, which does catch some bad symbols but isn't as heavy-handed\n      # as -z defs.\n      no_undefined_flag='${wl}-z,text'\n      allow_undefined_flag='${wl}-z,nodefs'\n      archive_cmds_need_lc=no\n      hardcode_shlibpath_var=no\n      hardcode_libdir_flag_spec='`test -z \"$SCOABSPATH\" && echo ${wl}-R,$libdir`'\n      hardcode_libdir_separator=':'\n      link_all_deplibs=yes\n      export_dynamic_flag_spec='${wl}-Bexport'\n      runpath_var='LD_RUN_PATH'\n\n      if test \"$GCC\" = yes; then\n\tarchive_cmds='$CC -shared ${wl}-h,\\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\tarchive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'\n      else\n\tarchive_cmds='$CC -G ${wl}-h,\\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\tarchive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'\n      fi\n      ;;\n\n    uts4*)\n      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      hardcode_libdir_flag_spec='-L$libdir'\n      hardcode_shlibpath_var=no\n      ;;\n\n    *)\n      ld_shlibs=no\n      ;;\n    esac\n  fi\n\necho \"$as_me:$LINENO: result: $ld_shlibs\" >&5\necho \"${ECHO_T}$ld_shlibs\" >&6\ntest \"$ld_shlibs\" = no && can_build_shared=no\n\n#\n# Do we need to explicitly link libc?\n#\ncase \"x$archive_cmds_need_lc\" in\nx|xyes)\n  # Assume -lc should be added\n  archive_cmds_need_lc=yes\n\n  if test \"$enable_shared\" = yes && test \"$GCC\" = yes; then\n    case $archive_cmds in\n    *'~'*)\n      # FIXME: we may have to deal with multi-command sequences.\n      ;;\n    '$CC '*)\n      # Test whether the compiler implicitly links with -lc since on some\n      # systems, -lgcc has to come before -lc. If gcc already passes -lc\n      # to ld, don't add -lc before -lgcc.\n      echo \"$as_me:$LINENO: checking whether -lc should be explicitly linked in\" >&5\necho $ECHO_N \"checking whether -lc should be explicitly linked in... $ECHO_C\" >&6\n      $rm conftest*\n      printf \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n\n      if { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } 2>conftest.err; then\n        soname=conftest\n        lib=conftest\n        libobjs=conftest.$ac_objext\n        deplibs=\n        wl=$lt_prog_compiler_wl\n\tpic_flag=$lt_prog_compiler_pic\n        compiler_flags=-v\n        linker_flags=-v\n        verstring=\n        output_objdir=.\n        libname=conftest\n        lt_save_allow_undefined_flag=$allow_undefined_flag\n        allow_undefined_flag=\n        if { (eval echo \"$as_me:$LINENO: \\\"$archive_cmds 2\\>\\&1 \\| grep \\\" -lc \\\" \\>/dev/null 2\\>\\&1\\\"\") >&5\n  (eval $archive_cmds 2\\>\\&1 \\| grep \\\" -lc \\\" \\>/dev/null 2\\>\\&1) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }\n        then\n\t  archive_cmds_need_lc=no\n        else\n\t  archive_cmds_need_lc=yes\n        fi\n        allow_undefined_flag=$lt_save_allow_undefined_flag\n      else\n        cat conftest.err 1>&5\n      fi\n      $rm conftest*\n      echo \"$as_me:$LINENO: result: $archive_cmds_need_lc\" >&5\necho \"${ECHO_T}$archive_cmds_need_lc\" >&6\n      ;;\n    esac\n  fi\n  ;;\nesac\n\necho \"$as_me:$LINENO: checking dynamic linker characteristics\" >&5\necho $ECHO_N \"checking dynamic linker characteristics... $ECHO_C\" >&6\nlibrary_names_spec=\nlibname_spec='lib$name'\nsoname_spec=\nshrext_cmds=\".so\"\npostinstall_cmds=\npostuninstall_cmds=\nfinish_cmds=\nfinish_eval=\nshlibpath_var=\nshlibpath_overrides_runpath=unknown\nversion_type=none\ndynamic_linker=\"$host_os ld.so\"\nsys_lib_dlsearch_path_spec=\"/lib /usr/lib\"\nif test \"$GCC\" = yes; then\n  sys_lib_search_path_spec=`$CC -print-search-dirs | grep \"^libraries:\" | $SED -e \"s/^libraries://\" -e \"s,=/,/,g\"`\n  if echo \"$sys_lib_search_path_spec\" | grep ';' >/dev/null ; then\n    # if the path contains \";\" then we assume it to be the separator\n    # otherwise default to the standard path separator (i.e. \":\") - it is\n    # assumed that no part of a normal pathname contains \";\" but that should\n    # okay in the real world where \";\" in dirpaths is itself problematic.\n    sys_lib_search_path_spec=`echo \"$sys_lib_search_path_spec\" | $SED -e 's/;/ /g'`\n  else\n    sys_lib_search_path_spec=`echo \"$sys_lib_search_path_spec\" | $SED  -e \"s/$PATH_SEPARATOR/ /g\"`\n  fi\nelse\n  sys_lib_search_path_spec=\"/lib /usr/lib /usr/local/lib\"\nfi\nneed_lib_prefix=unknown\nhardcode_into_libs=no\n\n# when you set need_version to no, make sure it does not cause -set_version\n# flags to be left without arguments\nneed_version=unknown\n\ncase $host_os in\naix3*)\n  version_type=linux\n  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'\n  shlibpath_var=LIBPATH\n\n  # AIX 3 has no versioning support, so we append a major version to the name.\n  soname_spec='${libname}${release}${shared_ext}$major'\n  ;;\n\naix4* | aix5*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  hardcode_into_libs=yes\n  if test \"$host_cpu\" = ia64; then\n    # AIX 5 supports IA64\n    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'\n    shlibpath_var=LD_LIBRARY_PATH\n  else\n    # With GCC up to 2.95.x, collect2 would create an import file\n    # for dependence libraries.  The import file would start with\n    # the line `#! .'.  This would cause the generated library to\n    # depend on `.', always an invalid library.  This was fixed in\n    # development snapshots of GCC prior to 3.0.\n    case $host_os in\n      aix4 | aix4.[01] | aix4.[01].*)\n      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'\n\t   echo ' yes '\n\t   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then\n\t:\n      else\n\tcan_build_shared=no\n      fi\n      ;;\n    esac\n    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct\n    # soname into executable. Probably we can add versioning support to\n    # collect2, so additional links can be useful in future.\n    if test \"$aix_use_runtimelinking\" = yes; then\n      # If using run time linking (on AIX 4.2 or later) use lib<name>.so\n      # instead of lib<name>.a to let people know that these are not\n      # typical AIX shared libraries.\n      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    else\n      # We preserve .a as extension for shared libraries through AIX4.2\n      # and later when we are not doing run time linking.\n      library_names_spec='${libname}${release}.a $libname.a'\n      soname_spec='${libname}${release}${shared_ext}$major'\n    fi\n    shlibpath_var=LIBPATH\n  fi\n  ;;\n\namigaos*)\n  library_names_spec='$libname.ixlibrary $libname.a'\n  # Create ${libname}_ixlibrary.a entries in /sys/libs.\n  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo \"X$lib\" | $Xsed -e '\\''s%^.*/\\([^/]*\\)\\.ixlibrary$%\\1%'\\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show \"cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a\"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'\n  ;;\n\nbeos*)\n  library_names_spec='${libname}${shared_ext}'\n  dynamic_linker=\"$host_os ld.so\"\n  shlibpath_var=LIBRARY_PATH\n  ;;\n\nbsdi[45]*)\n  version_type=linux\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  sys_lib_search_path_spec=\"/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib\"\n  sys_lib_dlsearch_path_spec=\"/shlib /usr/lib /usr/local/lib\"\n  # the default ld.so.conf also contains /usr/contrib/lib and\n  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow\n  # libtool to hard-code these into programs\n  ;;\n\ncygwin* | mingw* | pw32*)\n  version_type=windows\n  shrext_cmds=\".dll\"\n  need_version=no\n  need_lib_prefix=no\n\n  case $GCC,$host_os in\n  yes,cygwin* | yes,mingw* | yes,pw32*)\n    library_names_spec='$libname.dll.a'\n    # DLL is installed to $(libdir)/../bin by postinstall_cmds\n    postinstall_cmds='base_file=`basename \\${file}`~\n      dlpath=`$SHELL 2>&1 -c '\\''. $dir/'\\''\\${base_file}'\\''i;echo \\$dlname'\\''`~\n      dldir=$destdir/`dirname \\$dlpath`~\n      test -d \\$dldir || mkdir -p \\$dldir~\n      $install_prog $dir/$dlname \\$dldir/$dlname~\n      chmod a+x \\$dldir/$dlname'\n    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\\''. $file; echo \\$dlname'\\''`~\n      dlpath=$dir/\\$dldll~\n       $rm \\$dlpath'\n    shlibpath_overrides_runpath=yes\n\n    case $host_os in\n    cygwin*)\n      # Cygwin DLLs use 'cyg' prefix rather than 'lib'\n      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'\n      sys_lib_search_path_spec=\"/usr/lib /lib/w32api /lib /usr/local/lib\"\n      ;;\n    mingw*)\n      # MinGW DLLs use traditional 'lib' prefix\n      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'\n      sys_lib_search_path_spec=`$CC -print-search-dirs | grep \"^libraries:\" | $SED -e \"s/^libraries://\" -e \"s,=/,/,g\"`\n      if echo \"$sys_lib_search_path_spec\" | grep ';[c-zC-Z]:/' >/dev/null; then\n        # It is most probably a Windows format PATH printed by\n        # mingw gcc, but we are running on Cygwin. Gcc prints its search\n        # path with ; separators, and with drive letters. We can handle the\n        # drive letters (cygwin fileutils understands them), so leave them,\n        # especially as we might pass files found there to a mingw objdump,\n        # which wouldn't understand a cygwinified path. Ahh.\n        sys_lib_search_path_spec=`echo \"$sys_lib_search_path_spec\" | $SED -e 's/;/ /g'`\n      else\n        sys_lib_search_path_spec=`echo \"$sys_lib_search_path_spec\" | $SED  -e \"s/$PATH_SEPARATOR/ /g\"`\n      fi\n      ;;\n    pw32*)\n      # pw32 DLLs use 'pw' prefix rather than 'lib'\n      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'\n      ;;\n    esac\n    ;;\n\n  *)\n    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'\n    ;;\n  esac\n  dynamic_linker='Win32 ld.exe'\n  # FIXME: first we should search . and the directory the executable is in\n  shlibpath_var=PATH\n  ;;\n\ndarwin* | rhapsody*)\n  dynamic_linker=\"$host_os dyld\"\n  version_type=darwin\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'\n  soname_spec='${libname}${release}${major}$shared_ext'\n  shlibpath_overrides_runpath=yes\n  shlibpath_var=DYLD_LIBRARY_PATH\n  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'\n  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.\n  if test \"$GCC\" = yes; then\n    sys_lib_search_path_spec=`$CC -print-search-dirs | tr \"\\n\" \"$PATH_SEPARATOR\" | sed -e 's/libraries:/@libraries:/' | tr \"@\" \"\\n\" | grep \"^libraries:\" | sed -e \"s/^libraries://\" -e \"s,=/,/,g\" -e \"s,$PATH_SEPARATOR, ,g\" -e \"s,.*,& /lib /usr/lib /usr/local/lib,g\"`\n  else\n    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'\n  fi\n  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'\n  ;;\n\ndgux*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  ;;\n\nfreebsd1*)\n  dynamic_linker=no\n  ;;\n\nkfreebsd*-gnu)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  dynamic_linker='GNU ld.so'\n  ;;\n\nfreebsd* | dragonfly*)\n  # DragonFly does not have aout.  When/if they implement a new\n  # versioning mechanism, adjust this.\n  if test -x /usr/bin/objformat; then\n    objformat=`/usr/bin/objformat`\n  else\n    case $host_os in\n    freebsd[123]*) objformat=aout ;;\n    *) objformat=elf ;;\n    esac\n  fi\n  version_type=freebsd-$objformat\n  case $version_type in\n    freebsd-elf*)\n      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'\n      need_version=no\n      need_lib_prefix=no\n      ;;\n    freebsd-*)\n      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'\n      need_version=yes\n      ;;\n  esac\n  shlibpath_var=LD_LIBRARY_PATH\n  case $host_os in\n  freebsd2*)\n    shlibpath_overrides_runpath=yes\n    ;;\n  freebsd3.[01]* | freebsdelf3.[01]*)\n    shlibpath_overrides_runpath=yes\n    hardcode_into_libs=yes\n    ;;\n  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \\\n  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)\n    shlibpath_overrides_runpath=no\n    hardcode_into_libs=yes\n    ;;\n  freebsd*) # from 4.6 on\n    shlibpath_overrides_runpath=yes\n    hardcode_into_libs=yes\n    ;;\n  esac\n  ;;\n\ngnu*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  hardcode_into_libs=yes\n  ;;\n\nhpux9* | hpux10* | hpux11*)\n  # Give a soname corresponding to the major version so that dld.sl refuses to\n  # link against other versions.\n  version_type=sunos\n  need_lib_prefix=no\n  need_version=no\n  case $host_cpu in\n  ia64*)\n    shrext_cmds='.so'\n    hardcode_into_libs=yes\n    dynamic_linker=\"$host_os dld.so\"\n    shlibpath_var=LD_LIBRARY_PATH\n    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    if test \"X$HPUX_IA64_MODE\" = X32; then\n      sys_lib_search_path_spec=\"/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib\"\n    else\n      sys_lib_search_path_spec=\"/usr/lib/hpux64 /usr/local/lib/hpux64\"\n    fi\n    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec\n    ;;\n   hppa*64*)\n     shrext_cmds='.sl'\n     hardcode_into_libs=yes\n     dynamic_linker=\"$host_os dld.sl\"\n     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH\n     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.\n     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n     soname_spec='${libname}${release}${shared_ext}$major'\n     sys_lib_search_path_spec=\"/usr/lib/pa20_64 /usr/ccs/lib/pa20_64\"\n     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec\n     ;;\n   *)\n    shrext_cmds='.sl'\n    dynamic_linker=\"$host_os dld.sl\"\n    shlibpath_var=SHLIB_PATH\n    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    ;;\n  esac\n  # HP-UX runs *really* slowly unless shared libraries are mode 555.\n  postinstall_cmds='chmod 555 $lib'\n  ;;\n\ninterix3*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  ;;\n\nirix5* | irix6* | nonstopux*)\n  case $host_os in\n    nonstopux*) version_type=nonstopux ;;\n    *)\n\tif test \"$lt_cv_prog_gnu_ld\" = yes; then\n\t\tversion_type=linux\n\telse\n\t\tversion_type=irix\n\tfi ;;\n  esac\n  need_lib_prefix=no\n  need_version=no\n  soname_spec='${libname}${release}${shared_ext}$major'\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'\n  case $host_os in\n  irix5* | nonstopux*)\n    libsuff= shlibsuff=\n    ;;\n  *)\n    case $LD in # libtool.m4 will add one of these switches to LD\n    *-32|*\"-32 \"|*-melf32bsmip|*\"-melf32bsmip \")\n      libsuff= shlibsuff= libmagic=32-bit;;\n    *-n32|*\"-n32 \"|*-melf32bmipn32|*\"-melf32bmipn32 \")\n      libsuff=32 shlibsuff=N32 libmagic=N32;;\n    *-64|*\"-64 \"|*-melf64bmip|*\"-melf64bmip \")\n      libsuff=64 shlibsuff=64 libmagic=64-bit;;\n    *) libsuff= shlibsuff= libmagic=never-match;;\n    esac\n    ;;\n  esac\n  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH\n  shlibpath_overrides_runpath=no\n  sys_lib_search_path_spec=\"/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}\"\n  sys_lib_dlsearch_path_spec=\"/usr/lib${libsuff} /lib${libsuff}\"\n  hardcode_into_libs=yes\n  ;;\n\n# No shared lib support for Linux oldld, aout, or coff.\nlinux*oldld* | linux*aout* | linux*coff*)\n  dynamic_linker=no\n  ;;\n\n# This must be Linux ELF.\nlinux*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -n $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  # This implies no fast_install, which is unacceptable.\n  # Some rework will be needed to allow for fast_install\n  # before this can be enabled.\n  hardcode_into_libs=yes\n\n  # find out which ABI we are using\n  libsuff=\n  case \"$host_cpu\" in\n  x86_64*|s390x*|powerpc64*)\n    echo '#line 9772 \"configure\"' > conftest.$ac_ext\n    if { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; then\n      case `/usr/bin/file conftest.$ac_objext` in\n      *64-bit*)\n        libsuff=64\n        sys_lib_search_path_spec=\"/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}\"\n        ;;\n      esac\n    fi\n    rm -rf conftest*\n    ;;\n  esac\n\n  # Append ld.so.conf contents to the search path\n  if test -f /etc/ld.so.conf; then\n    lt_ld_extra=`awk '/^include / { system(sprintf(\"cd /etc; cat %s 2>/dev/null\", \\$2)); skip = 1; } { if (!skip) print \\$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\\n' ' '`\n    sys_lib_dlsearch_path_spec=\"/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra\"\n  fi\n\n  # We used to test for /lib/ld.so.1 and disable shared libraries on\n  # powerpc, because MkLinux only supported shared libraries with the\n  # GNU dynamic linker.  Since this was broken with cross compilers,\n  # most powerpc-linux boxes support dynamic linking these days and\n  # people can always --disable-shared, the test was removed, and we\n  # assume the GNU/Linux dynamic linker is in use.\n  dynamic_linker='GNU/Linux ld.so'\n  ;;\n\nknetbsd*-gnu)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  dynamic_linker='GNU ld.so'\n  ;;\n\nnetbsd*)\n  version_type=sunos\n  need_lib_prefix=no\n  need_version=no\n  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n    finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -m $libdir'\n    dynamic_linker='NetBSD (a.out) ld.so'\n  else\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    dynamic_linker='NetBSD ld.elf_so'\n  fi\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  hardcode_into_libs=yes\n  ;;\n\nnewsos6)\n  version_type=linux\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  ;;\n\nnto-qnx*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  ;;\n\nopenbsd*)\n  version_type=sunos\n  sys_lib_dlsearch_path_spec=\"/usr/lib\"\n  need_lib_prefix=no\n  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.\n  case $host_os in\n    openbsd3.3 | openbsd3.3.*) need_version=yes ;;\n    *)                         need_version=no  ;;\n  esac\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -m $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  if test -z \"`echo __ELF__ | $CC -E - | grep __ELF__`\" || test \"$host_os-$host_cpu\" = \"openbsd2.8-powerpc\"; then\n    case $host_os in\n      openbsd2.[89] | openbsd2.[89].*)\n\tshlibpath_overrides_runpath=no\n\t;;\n      *)\n\tshlibpath_overrides_runpath=yes\n\t;;\n      esac\n  else\n    shlibpath_overrides_runpath=yes\n  fi\n  ;;\n\nos2*)\n  libname_spec='$name'\n  shrext_cmds=\".dll\"\n  need_lib_prefix=no\n  library_names_spec='$libname${shared_ext} $libname.a'\n  dynamic_linker='OS/2 ld.exe'\n  shlibpath_var=LIBPATH\n  ;;\n\nosf3* | osf4* | osf5*)\n  version_type=osf\n  need_lib_prefix=no\n  need_version=no\n  soname_spec='${libname}${release}${shared_ext}$major'\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  shlibpath_var=LD_LIBRARY_PATH\n  sys_lib_search_path_spec=\"/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib\"\n  sys_lib_dlsearch_path_spec=\"$sys_lib_search_path_spec\"\n  ;;\n\nsolaris*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  hardcode_into_libs=yes\n  # ldd complains unless libraries are executable\n  postinstall_cmds='chmod +x $lib'\n  ;;\n\nsunos4*)\n  version_type=sunos\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n  finish_cmds='PATH=\"\\$PATH:/usr/etc\" ldconfig $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  if test \"$with_gnu_ld\" = yes; then\n    need_lib_prefix=no\n  fi\n  need_version=yes\n  ;;\n\nsysv4 | sysv4.3*)\n  version_type=linux\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  case $host_vendor in\n    sni)\n      shlibpath_overrides_runpath=no\n      need_lib_prefix=no\n      export_dynamic_flag_spec='${wl}-Blargedynsym'\n      runpath_var=LD_RUN_PATH\n      ;;\n    siemens)\n      need_lib_prefix=no\n      ;;\n    motorola)\n      need_lib_prefix=no\n      need_version=no\n      shlibpath_overrides_runpath=no\n      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'\n      ;;\n  esac\n  ;;\n\nsysv4*MP*)\n  if test -d /usr/nec ;then\n    version_type=linux\n    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'\n    soname_spec='$libname${shared_ext}.$major'\n    shlibpath_var=LD_LIBRARY_PATH\n  fi\n  ;;\n\nsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)\n  version_type=freebsd-elf\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  hardcode_into_libs=yes\n  if test \"$with_gnu_ld\" = yes; then\n    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'\n    shlibpath_overrides_runpath=no\n  else\n    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'\n    shlibpath_overrides_runpath=yes\n    case $host_os in\n      sco3.2v5*)\n        sys_lib_search_path_spec=\"$sys_lib_search_path_spec /lib\"\n\t;;\n    esac\n  fi\n  sys_lib_dlsearch_path_spec='/usr/lib'\n  ;;\n\nuts4*)\n  version_type=linux\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  ;;\n\n*)\n  dynamic_linker=no\n  ;;\nesac\necho \"$as_me:$LINENO: result: $dynamic_linker\" >&5\necho \"${ECHO_T}$dynamic_linker\" >&6\ntest \"$dynamic_linker\" = no && can_build_shared=no\n\nvariables_saved_for_relink=\"PATH $shlibpath_var $runpath_var\"\nif test \"$GCC\" = yes; then\n  variables_saved_for_relink=\"$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH\"\nfi\n\necho \"$as_me:$LINENO: checking how to hardcode library paths into programs\" >&5\necho $ECHO_N \"checking how to hardcode library paths into programs... $ECHO_C\" >&6\nhardcode_action=\nif test -n \"$hardcode_libdir_flag_spec\" || \\\n   test -n \"$runpath_var\" || \\\n   test \"X$hardcode_automatic\" = \"Xyes\" ; then\n\n  # We can hardcode non-existant directories.\n  if test \"$hardcode_direct\" != no &&\n     # If the only mechanism to avoid hardcoding is shlibpath_var, we\n     # have to relink, otherwise we might link with an installed library\n     # when we should be linking with a yet-to-be-installed one\n     ## test \"$_LT_AC_TAGVAR(hardcode_shlibpath_var, )\" != no &&\n     test \"$hardcode_minus_L\" != no; then\n    # Linking always hardcodes the temporary library directory.\n    hardcode_action=relink\n  else\n    # We can link without hardcoding, and we can hardcode nonexisting dirs.\n    hardcode_action=immediate\n  fi\nelse\n  # We cannot hardcode anything, or else we can only hardcode existing\n  # directories.\n  hardcode_action=unsupported\nfi\necho \"$as_me:$LINENO: result: $hardcode_action\" >&5\necho \"${ECHO_T}$hardcode_action\" >&6\n\nif test \"$hardcode_action\" = relink; then\n  # Fast installation is not supported\n  enable_fast_install=no\nelif test \"$shlibpath_overrides_runpath\" = yes ||\n     test \"$enable_shared\" = no; then\n  # Fast installation is not necessary\n  enable_fast_install=needless\nfi\n\nstriplib=\nold_striplib=\necho \"$as_me:$LINENO: checking whether stripping libraries is possible\" >&5\necho $ECHO_N \"checking whether stripping libraries is possible... $ECHO_C\" >&6\nif test -n \"$STRIP\" && $STRIP -V 2>&1 | grep \"GNU strip\" >/dev/null; then\n  test -z \"$old_striplib\" && old_striplib=\"$STRIP --strip-debug\"\n  test -z \"$striplib\" && striplib=\"$STRIP --strip-unneeded\"\n  echo \"$as_me:$LINENO: result: yes\" >&5\necho \"${ECHO_T}yes\" >&6\nelse\n# FIXME - insert some real tests, host_os isn't really good enough\n  case $host_os in\n   darwin*)\n       if test -n \"$STRIP\" ; then\n         striplib=\"$STRIP -x\"\n         echo \"$as_me:$LINENO: result: yes\" >&5\necho \"${ECHO_T}yes\" >&6\n       else\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n       ;;\n   *)\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\n    ;;\n  esac\nfi\n\nif test \"x$enable_dlopen\" != xyes; then\n  enable_dlopen=unknown\n  enable_dlopen_self=unknown\n  enable_dlopen_self_static=unknown\nelse\n  lt_cv_dlopen=no\n  lt_cv_dlopen_libs=\n\n  case $host_os in\n  beos*)\n    lt_cv_dlopen=\"load_add_on\"\n    lt_cv_dlopen_libs=\n    lt_cv_dlopen_self=yes\n    ;;\n\n  mingw* | pw32*)\n    lt_cv_dlopen=\"LoadLibrary\"\n    lt_cv_dlopen_libs=\n   ;;\n\n  cygwin*)\n    lt_cv_dlopen=\"dlopen\"\n    lt_cv_dlopen_libs=\n   ;;\n\n  darwin*)\n  # if libdl is installed we need to link against it\n    echo \"$as_me:$LINENO: checking for dlopen in -ldl\" >&5\necho $ECHO_N \"checking for dlopen in -ldl... $ECHO_C\" >&6\nif test \"${ac_cv_lib_dl_dlopen+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-ldl  $LIBS\"\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar dlopen ();\nint\nmain ()\n{\ndlopen ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_lib_dl_dlopen=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_lib_dl_dlopen=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\necho \"$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen\" >&5\necho \"${ECHO_T}$ac_cv_lib_dl_dlopen\" >&6\nif test $ac_cv_lib_dl_dlopen = yes; then\n  lt_cv_dlopen=\"dlopen\" lt_cv_dlopen_libs=\"-ldl\"\nelse\n\n    lt_cv_dlopen=\"dyld\"\n    lt_cv_dlopen_libs=\n    lt_cv_dlopen_self=yes\n\nfi\n\n   ;;\n\n  *)\n    echo \"$as_me:$LINENO: checking for shl_load\" >&5\necho $ECHO_N \"checking for shl_load... $ECHO_C\" >&6\nif test \"${ac_cv_func_shl_load+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.\n   For example, HP-UX 11i <limits.h> declares gettimeofday.  */\n#define shl_load innocuous_shl_load\n\n/* System header to define __stub macros and hopefully few prototypes,\n    which can conflict with char shl_load (); below.\n    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n    <limits.h> exists even on freestanding compilers.  */\n\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\n#undef shl_load\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar shl_load ();\n/* The GNU C library defines this for functions which it implements\n    to always fail with ENOSYS.  Some functions are actually named\n    something starting with __ and the normal name is an alias.  */\n#if defined (__stub_shl_load) || defined (__stub___shl_load)\nchoke me\n#else\nchar (*f) () = shl_load;\n#endif\n#ifdef __cplusplus\n}\n#endif\n\nint\nmain ()\n{\nreturn f != shl_load;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_func_shl_load=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_func_shl_load=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_func_shl_load\" >&5\necho \"${ECHO_T}$ac_cv_func_shl_load\" >&6\nif test $ac_cv_func_shl_load = yes; then\n  lt_cv_dlopen=\"shl_load\"\nelse\n  echo \"$as_me:$LINENO: checking for shl_load in -ldld\" >&5\necho $ECHO_N \"checking for shl_load in -ldld... $ECHO_C\" >&6\nif test \"${ac_cv_lib_dld_shl_load+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-ldld  $LIBS\"\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar shl_load ();\nint\nmain ()\n{\nshl_load ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_lib_dld_shl_load=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_lib_dld_shl_load=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\necho \"$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load\" >&5\necho \"${ECHO_T}$ac_cv_lib_dld_shl_load\" >&6\nif test $ac_cv_lib_dld_shl_load = yes; then\n  lt_cv_dlopen=\"shl_load\" lt_cv_dlopen_libs=\"-dld\"\nelse\n  echo \"$as_me:$LINENO: checking for dlopen\" >&5\necho $ECHO_N \"checking for dlopen... $ECHO_C\" >&6\nif test \"${ac_cv_func_dlopen+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.\n   For example, HP-UX 11i <limits.h> declares gettimeofday.  */\n#define dlopen innocuous_dlopen\n\n/* System header to define __stub macros and hopefully few prototypes,\n    which can conflict with char dlopen (); below.\n    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n    <limits.h> exists even on freestanding compilers.  */\n\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\n#undef dlopen\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar dlopen ();\n/* The GNU C library defines this for functions which it implements\n    to always fail with ENOSYS.  Some functions are actually named\n    something starting with __ and the normal name is an alias.  */\n#if defined (__stub_dlopen) || defined (__stub___dlopen)\nchoke me\n#else\nchar (*f) () = dlopen;\n#endif\n#ifdef __cplusplus\n}\n#endif\n\nint\nmain ()\n{\nreturn f != dlopen;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_func_dlopen=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_func_dlopen=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_func_dlopen\" >&5\necho \"${ECHO_T}$ac_cv_func_dlopen\" >&6\nif test $ac_cv_func_dlopen = yes; then\n  lt_cv_dlopen=\"dlopen\"\nelse\n  echo \"$as_me:$LINENO: checking for dlopen in -ldl\" >&5\necho $ECHO_N \"checking for dlopen in -ldl... $ECHO_C\" >&6\nif test \"${ac_cv_lib_dl_dlopen+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-ldl  $LIBS\"\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar dlopen ();\nint\nmain ()\n{\ndlopen ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_lib_dl_dlopen=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_lib_dl_dlopen=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\necho \"$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen\" >&5\necho \"${ECHO_T}$ac_cv_lib_dl_dlopen\" >&6\nif test $ac_cv_lib_dl_dlopen = yes; then\n  lt_cv_dlopen=\"dlopen\" lt_cv_dlopen_libs=\"-ldl\"\nelse\n  echo \"$as_me:$LINENO: checking for dlopen in -lsvld\" >&5\necho $ECHO_N \"checking for dlopen in -lsvld... $ECHO_C\" >&6\nif test \"${ac_cv_lib_svld_dlopen+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-lsvld  $LIBS\"\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar dlopen ();\nint\nmain ()\n{\ndlopen ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_lib_svld_dlopen=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_lib_svld_dlopen=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\necho \"$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen\" >&5\necho \"${ECHO_T}$ac_cv_lib_svld_dlopen\" >&6\nif test $ac_cv_lib_svld_dlopen = yes; then\n  lt_cv_dlopen=\"dlopen\" lt_cv_dlopen_libs=\"-lsvld\"\nelse\n  echo \"$as_me:$LINENO: checking for dld_link in -ldld\" >&5\necho $ECHO_N \"checking for dld_link in -ldld... $ECHO_C\" >&6\nif test \"${ac_cv_lib_dld_dld_link+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-ldld  $LIBS\"\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar dld_link ();\nint\nmain ()\n{\ndld_link ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_lib_dld_dld_link=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_lib_dld_dld_link=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\necho \"$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link\" >&5\necho \"${ECHO_T}$ac_cv_lib_dld_dld_link\" >&6\nif test $ac_cv_lib_dld_dld_link = yes; then\n  lt_cv_dlopen=\"dld_link\" lt_cv_dlopen_libs=\"-dld\"\nfi\n\n\nfi\n\n\nfi\n\n\nfi\n\n\nfi\n\n\nfi\n\n    ;;\n  esac\n\n  if test \"x$lt_cv_dlopen\" != xno; then\n    enable_dlopen=yes\n  else\n    enable_dlopen=no\n  fi\n\n  case $lt_cv_dlopen in\n  dlopen)\n    save_CPPFLAGS=\"$CPPFLAGS\"\n    test \"x$ac_cv_header_dlfcn_h\" = xyes && CPPFLAGS=\"$CPPFLAGS -DHAVE_DLFCN_H\"\n\n    save_LDFLAGS=\"$LDFLAGS\"\n    wl=$lt_prog_compiler_wl eval LDFLAGS=\\\"\\$LDFLAGS $export_dynamic_flag_spec\\\"\n\n    save_LIBS=\"$LIBS\"\n    LIBS=\"$lt_cv_dlopen_libs $LIBS\"\n\n    echo \"$as_me:$LINENO: checking whether a program can dlopen itself\" >&5\necho $ECHO_N \"checking whether a program can dlopen itself... $ECHO_C\" >&6\nif test \"${lt_cv_dlopen_self+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  \t  if test \"$cross_compiling\" = yes; then :\n  lt_cv_dlopen_self=cross\nelse\n  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2\n  lt_status=$lt_dlunknown\n  cat > conftest.$ac_ext <<EOF\n#line 10669 \"configure\"\n#include \"confdefs.h\"\n\n#if HAVE_DLFCN_H\n#include <dlfcn.h>\n#endif\n\n#include <stdio.h>\n\n#ifdef RTLD_GLOBAL\n#  define LT_DLGLOBAL\t\tRTLD_GLOBAL\n#else\n#  ifdef DL_GLOBAL\n#    define LT_DLGLOBAL\t\tDL_GLOBAL\n#  else\n#    define LT_DLGLOBAL\t\t0\n#  endif\n#endif\n\n/* We may have to define LT_DLLAZY_OR_NOW in the command line if we\n   find out it does not work in some platform. */\n#ifndef LT_DLLAZY_OR_NOW\n#  ifdef RTLD_LAZY\n#    define LT_DLLAZY_OR_NOW\t\tRTLD_LAZY\n#  else\n#    ifdef DL_LAZY\n#      define LT_DLLAZY_OR_NOW\t\tDL_LAZY\n#    else\n#      ifdef RTLD_NOW\n#        define LT_DLLAZY_OR_NOW\tRTLD_NOW\n#      else\n#        ifdef DL_NOW\n#          define LT_DLLAZY_OR_NOW\tDL_NOW\n#        else\n#          define LT_DLLAZY_OR_NOW\t0\n#        endif\n#      endif\n#    endif\n#  endif\n#endif\n\n#ifdef __cplusplus\nextern \"C\" void exit (int);\n#endif\n\nvoid fnord() { int i=42;}\nint main ()\n{\n  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);\n  int status = $lt_dlunknown;\n\n  if (self)\n    {\n      if (dlsym (self,\"fnord\"))       status = $lt_dlno_uscore;\n      else if (dlsym( self,\"_fnord\")) status = $lt_dlneed_uscore;\n      /* dlclose (self); */\n    }\n  else\n    puts (dlerror ());\n\n    exit (status);\n}\nEOF\n  if { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then\n    (./conftest; exit; ) >&5 2>/dev/null\n    lt_status=$?\n    case x$lt_status in\n      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;\n      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;\n      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;\n    esac\n  else :\n    # compilation failed\n    lt_cv_dlopen_self=no\n  fi\nfi\nrm -fr conftest*\n\n\nfi\necho \"$as_me:$LINENO: result: $lt_cv_dlopen_self\" >&5\necho \"${ECHO_T}$lt_cv_dlopen_self\" >&6\n\n    if test \"x$lt_cv_dlopen_self\" = xyes; then\n      wl=$lt_prog_compiler_wl eval LDFLAGS=\\\"\\$LDFLAGS $lt_prog_compiler_static\\\"\n      echo \"$as_me:$LINENO: checking whether a statically linked program can dlopen itself\" >&5\necho $ECHO_N \"checking whether a statically linked program can dlopen itself... $ECHO_C\" >&6\nif test \"${lt_cv_dlopen_self_static+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  \t  if test \"$cross_compiling\" = yes; then :\n  lt_cv_dlopen_self_static=cross\nelse\n  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2\n  lt_status=$lt_dlunknown\n  cat > conftest.$ac_ext <<EOF\n#line 10769 \"configure\"\n#include \"confdefs.h\"\n\n#if HAVE_DLFCN_H\n#include <dlfcn.h>\n#endif\n\n#include <stdio.h>\n\n#ifdef RTLD_GLOBAL\n#  define LT_DLGLOBAL\t\tRTLD_GLOBAL\n#else\n#  ifdef DL_GLOBAL\n#    define LT_DLGLOBAL\t\tDL_GLOBAL\n#  else\n#    define LT_DLGLOBAL\t\t0\n#  endif\n#endif\n\n/* We may have to define LT_DLLAZY_OR_NOW in the command line if we\n   find out it does not work in some platform. */\n#ifndef LT_DLLAZY_OR_NOW\n#  ifdef RTLD_LAZY\n#    define LT_DLLAZY_OR_NOW\t\tRTLD_LAZY\n#  else\n#    ifdef DL_LAZY\n#      define LT_DLLAZY_OR_NOW\t\tDL_LAZY\n#    else\n#      ifdef RTLD_NOW\n#        define LT_DLLAZY_OR_NOW\tRTLD_NOW\n#      else\n#        ifdef DL_NOW\n#          define LT_DLLAZY_OR_NOW\tDL_NOW\n#        else\n#          define LT_DLLAZY_OR_NOW\t0\n#        endif\n#      endif\n#    endif\n#  endif\n#endif\n\n#ifdef __cplusplus\nextern \"C\" void exit (int);\n#endif\n\nvoid fnord() { int i=42;}\nint main ()\n{\n  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);\n  int status = $lt_dlunknown;\n\n  if (self)\n    {\n      if (dlsym (self,\"fnord\"))       status = $lt_dlno_uscore;\n      else if (dlsym( self,\"_fnord\")) status = $lt_dlneed_uscore;\n      /* dlclose (self); */\n    }\n  else\n    puts (dlerror ());\n\n    exit (status);\n}\nEOF\n  if { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then\n    (./conftest; exit; ) >&5 2>/dev/null\n    lt_status=$?\n    case x$lt_status in\n      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;\n      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;\n      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;\n    esac\n  else :\n    # compilation failed\n    lt_cv_dlopen_self_static=no\n  fi\nfi\nrm -fr conftest*\n\n\nfi\necho \"$as_me:$LINENO: result: $lt_cv_dlopen_self_static\" >&5\necho \"${ECHO_T}$lt_cv_dlopen_self_static\" >&6\n    fi\n\n    CPPFLAGS=\"$save_CPPFLAGS\"\n    LDFLAGS=\"$save_LDFLAGS\"\n    LIBS=\"$save_LIBS\"\n    ;;\n  esac\n\n  case $lt_cv_dlopen_self in\n  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;\n  *) enable_dlopen_self=unknown ;;\n  esac\n\n  case $lt_cv_dlopen_self_static in\n  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;\n  *) enable_dlopen_self_static=unknown ;;\n  esac\nfi\n\n\n# Report which library types will actually be built\necho \"$as_me:$LINENO: checking if libtool supports shared libraries\" >&5\necho $ECHO_N \"checking if libtool supports shared libraries... $ECHO_C\" >&6\necho \"$as_me:$LINENO: result: $can_build_shared\" >&5\necho \"${ECHO_T}$can_build_shared\" >&6\n\necho \"$as_me:$LINENO: checking whether to build shared libraries\" >&5\necho $ECHO_N \"checking whether to build shared libraries... $ECHO_C\" >&6\ntest \"$can_build_shared\" = \"no\" && enable_shared=no\n\n# On AIX, shared libraries and static libraries use the same namespace, and\n# are all built from PIC.\ncase $host_os in\naix3*)\n  test \"$enable_shared\" = yes && enable_static=no\n  if test -n \"$RANLIB\"; then\n    archive_cmds=\"$archive_cmds~\\$RANLIB \\$lib\"\n    postinstall_cmds='$RANLIB $lib'\n  fi\n  ;;\n\naix4* | aix5*)\n  if test \"$host_cpu\" != ia64 && test \"$aix_use_runtimelinking\" = no ; then\n    test \"$enable_shared\" = yes && enable_static=no\n  fi\n    ;;\nesac\necho \"$as_me:$LINENO: result: $enable_shared\" >&5\necho \"${ECHO_T}$enable_shared\" >&6\n\necho \"$as_me:$LINENO: checking whether to build static libraries\" >&5\necho $ECHO_N \"checking whether to build static libraries... $ECHO_C\" >&6\n# Make sure either enable_shared or enable_static is yes.\ntest \"$enable_shared\" = yes || enable_static=yes\necho \"$as_me:$LINENO: result: $enable_static\" >&5\necho \"${ECHO_T}$enable_static\" >&6\n\n# The else clause should only fire when bootstrapping the\n# libtool distribution, otherwise you forgot to ship ltmain.sh\n# with your package, and you will get complaints that there are\n# no rules to generate ltmain.sh.\nif test -f \"$ltmain\"; then\n  # See if we are running on zsh, and set the options which allow our commands through\n  # without removal of \\ escapes.\n  if test -n \"${ZSH_VERSION+set}\" ; then\n    setopt NO_GLOB_SUBST\n  fi\n  # Now quote all the things that may contain metacharacters while being\n  # careful not to overquote the AC_SUBSTed values.  We take copies of the\n  # variables and quote the copies for generation of the libtool script.\n  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \\\n    SED SHELL STRIP \\\n    libname_spec library_names_spec soname_spec extract_expsyms_cmds \\\n    old_striplib striplib file_magic_cmd finish_cmds finish_eval \\\n    deplibs_check_method reload_flag reload_cmds need_locks \\\n    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \\\n    lt_cv_sys_global_symbol_to_c_name_address \\\n    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \\\n    old_postinstall_cmds old_postuninstall_cmds \\\n    compiler \\\n    CC \\\n    LD \\\n    lt_prog_compiler_wl \\\n    lt_prog_compiler_pic \\\n    lt_prog_compiler_static \\\n    lt_prog_compiler_no_builtin_flag \\\n    export_dynamic_flag_spec \\\n    thread_safe_flag_spec \\\n    whole_archive_flag_spec \\\n    enable_shared_with_static_runtimes \\\n    old_archive_cmds \\\n    old_archive_from_new_cmds \\\n    predep_objects \\\n    postdep_objects \\\n    predeps \\\n    postdeps \\\n    compiler_lib_search_path \\\n    archive_cmds \\\n    archive_expsym_cmds \\\n    postinstall_cmds \\\n    postuninstall_cmds \\\n    old_archive_from_expsyms_cmds \\\n    allow_undefined_flag \\\n    no_undefined_flag \\\n    export_symbols_cmds \\\n    hardcode_libdir_flag_spec \\\n    hardcode_libdir_flag_spec_ld \\\n    hardcode_libdir_separator \\\n    hardcode_automatic \\\n    module_cmds \\\n    module_expsym_cmds \\\n    lt_cv_prog_compiler_c_o \\\n    exclude_expsyms \\\n    include_expsyms; do\n\n    case $var in\n    old_archive_cmds | \\\n    old_archive_from_new_cmds | \\\n    archive_cmds | \\\n    archive_expsym_cmds | \\\n    module_cmds | \\\n    module_expsym_cmds | \\\n    old_archive_from_expsyms_cmds | \\\n    export_symbols_cmds | \\\n    extract_expsyms_cmds | reload_cmds | finish_cmds | \\\n    postinstall_cmds | postuninstall_cmds | \\\n    old_postinstall_cmds | old_postuninstall_cmds | \\\n    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)\n      # Double-quote double-evaled strings.\n      eval \"lt_$var=\\\\\\\"\\`\\$echo \\\"X\\$$var\\\" | \\$Xsed -e \\\"\\$double_quote_subst\\\" -e \\\"\\$sed_quote_subst\\\" -e \\\"\\$delay_variable_subst\\\"\\`\\\\\\\"\"\n      ;;\n    *)\n      eval \"lt_$var=\\\\\\\"\\`\\$echo \\\"X\\$$var\\\" | \\$Xsed -e \\\"\\$sed_quote_subst\\\"\\`\\\\\\\"\"\n      ;;\n    esac\n  done\n\n  case $lt_echo in\n  *'\\$0 --fallback-echo\"')\n    lt_echo=`$echo \"X$lt_echo\" | $Xsed -e 's/\\\\\\\\\\\\\\$0 --fallback-echo\"$/$0 --fallback-echo\"/'`\n    ;;\n  esac\n\ncfgfile=\"${ofile}T\"\n  trap \"$rm \\\"$cfgfile\\\"; exit 1\" 1 2 15\n  $rm -f \"$cfgfile\"\n  { echo \"$as_me:$LINENO: creating $ofile\" >&5\necho \"$as_me: creating $ofile\" >&6;}\n\n  cat <<__EOF__ >> \"$cfgfile\"\n#! $SHELL\n\n# `$echo \"$cfgfile\" | sed 's%^.*/%%'` - Provide generalized library-building support services.\n# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)\n# NOTE: Changes made to this file will be lost: look at ltmain.sh.\n#\n# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001\n# Free Software Foundation, Inc.\n#\n# This file is part of GNU Libtool:\n# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful, but\n# WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n# General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n#\n# As a special exception to the GNU General Public License, if you\n# distribute this file as part of a program that contains a\n# configuration script generated by Autoconf, you may include it under\n# the same distribution terms that you use for the rest of that program.\n\n# A sed program that does not truncate output.\nSED=$lt_SED\n\n# Sed that helps us avoid accidentally triggering echo(1) options like -n.\nXsed=\"$SED -e 1s/^X//\"\n\n# The HP-UX ksh and POSIX shell print the target directory to stdout\n# if CDPATH is set.\n(unset CDPATH) >/dev/null 2>&1 && unset CDPATH\n\n# The names of the tagged configurations supported by this script.\navailable_tags=\n\n# ### BEGIN LIBTOOL CONFIG\n\n# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:\n\n# Shell to use when invoking shell scripts.\nSHELL=$lt_SHELL\n\n# Whether or not to build shared libraries.\nbuild_libtool_libs=$enable_shared\n\n# Whether or not to build static libraries.\nbuild_old_libs=$enable_static\n\n# Whether or not to add -lc for building shared libraries.\nbuild_libtool_need_lc=$archive_cmds_need_lc\n\n# Whether or not to disallow shared libs when runtime libs are static\nallow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes\n\n# Whether or not to optimize for fast installation.\nfast_install=$enable_fast_install\n\n# The host system.\nhost_alias=$host_alias\nhost=$host\nhost_os=$host_os\n\n# The build system.\nbuild_alias=$build_alias\nbuild=$build\nbuild_os=$build_os\n\n# An echo program that does not interpret backslashes.\necho=$lt_echo\n\n# The archiver.\nAR=$lt_AR\nAR_FLAGS=$lt_AR_FLAGS\n\n# A C compiler.\nLTCC=$lt_LTCC\n\n# LTCC compiler flags.\nLTCFLAGS=$lt_LTCFLAGS\n\n# A language-specific compiler.\nCC=$lt_compiler\n\n# Is the compiler the GNU C compiler?\nwith_gcc=$GCC\n\ngcc_dir=\\`gcc -print-file-name=. | $SED 's,/\\.$,,'\\`\ngcc_ver=\\`gcc -dumpversion\\`\n\n# An ERE matcher.\nEGREP=$lt_EGREP\n\n# The linker used to build libraries.\nLD=$lt_LD\n\n# Whether we need hard or soft links.\nLN_S=$lt_LN_S\n\n# A BSD-compatible nm program.\nNM=$lt_NM\n\n# A symbol stripping program\nSTRIP=$lt_STRIP\n\n# Used to examine libraries when file_magic_cmd begins \"file\"\nMAGIC_CMD=$MAGIC_CMD\n\n# Used on cygwin: DLL creation program.\nDLLTOOL=\"$DLLTOOL\"\n\n# Used on cygwin: object dumper.\nOBJDUMP=\"$OBJDUMP\"\n\n# Used on cygwin: assembler.\nAS=\"$AS\"\n\n# The name of the directory that contains temporary libtool files.\nobjdir=$objdir\n\n# How to create reloadable object files.\nreload_flag=$lt_reload_flag\nreload_cmds=$lt_reload_cmds\n\n# How to pass a linker flag through the compiler.\nwl=$lt_lt_prog_compiler_wl\n\n# Object file suffix (normally \"o\").\nobjext=\"$ac_objext\"\n\n# Old archive suffix (normally \"a\").\nlibext=\"$libext\"\n\n# Shared library suffix (normally \".so\").\nshrext_cmds='$shrext_cmds'\n\n# Executable file suffix (normally \"\").\nexeext=\"$exeext\"\n\n# Additional compiler flags for building library objects.\npic_flag=$lt_lt_prog_compiler_pic\npic_mode=$pic_mode\n\n# What is the maximum length of a command?\nmax_cmd_len=$lt_cv_sys_max_cmd_len\n\n# Does compiler simultaneously support -c and -o options?\ncompiler_c_o=$lt_lt_cv_prog_compiler_c_o\n\n# Must we lock files when doing compilation?\nneed_locks=$lt_need_locks\n\n# Do we need the lib prefix for modules?\nneed_lib_prefix=$need_lib_prefix\n\n# Do we need a version for libraries?\nneed_version=$need_version\n\n# Whether dlopen is supported.\ndlopen_support=$enable_dlopen\n\n# Whether dlopen of programs is supported.\ndlopen_self=$enable_dlopen_self\n\n# Whether dlopen of statically linked programs is supported.\ndlopen_self_static=$enable_dlopen_self_static\n\n# Compiler flag to prevent dynamic linking.\nlink_static_flag=$lt_lt_prog_compiler_static\n\n# Compiler flag to turn off builtin functions.\nno_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag\n\n# Compiler flag to allow reflexive dlopens.\nexport_dynamic_flag_spec=$lt_export_dynamic_flag_spec\n\n# Compiler flag to generate shared objects directly from archives.\nwhole_archive_flag_spec=$lt_whole_archive_flag_spec\n\n# Compiler flag to generate thread-safe objects.\nthread_safe_flag_spec=$lt_thread_safe_flag_spec\n\n# Library versioning type.\nversion_type=$version_type\n\n# Format of library name prefix.\nlibname_spec=$lt_libname_spec\n\n# List of archive names.  First name is the real one, the rest are links.\n# The last name is the one that the linker finds with -lNAME.\nlibrary_names_spec=$lt_library_names_spec\n\n# The coded name of the library, if different from the real name.\nsoname_spec=$lt_soname_spec\n\n# Commands used to build and install an old-style archive.\nRANLIB=$lt_RANLIB\nold_archive_cmds=$lt_old_archive_cmds\nold_postinstall_cmds=$lt_old_postinstall_cmds\nold_postuninstall_cmds=$lt_old_postuninstall_cmds\n\n# Create an old-style archive from a shared archive.\nold_archive_from_new_cmds=$lt_old_archive_from_new_cmds\n\n# Create a temporary old-style archive to link instead of a shared archive.\nold_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds\n\n# Commands used to build and install a shared archive.\narchive_cmds=$lt_archive_cmds\narchive_expsym_cmds=$lt_archive_expsym_cmds\npostinstall_cmds=$lt_postinstall_cmds\npostuninstall_cmds=$lt_postuninstall_cmds\n\n# Commands used to build a loadable module (assumed same as above if empty)\nmodule_cmds=$lt_module_cmds\nmodule_expsym_cmds=$lt_module_expsym_cmds\n\n# Commands to strip libraries.\nold_striplib=$lt_old_striplib\nstriplib=$lt_striplib\n\n# Dependencies to place before the objects being linked to create a\n# shared library.\npredep_objects=\\`echo $lt_predep_objects | \\$SED -e \"s@\\${gcc_dir}@\\\\\\${gcc_dir}@g;s@\\${gcc_ver}@\\\\\\${gcc_ver}@g\"\\`\n\n# Dependencies to place after the objects being linked to create a\n# shared library.\npostdep_objects=\\`echo $lt_postdep_objects | \\$SED -e \"s@\\${gcc_dir}@\\\\\\${gcc_dir}@g;s@\\${gcc_ver}@\\\\\\${gcc_ver}@g\"\\`\n\n# Dependencies to place before the objects being linked to create a\n# shared library.\npredeps=$lt_predeps\n\n# Dependencies to place after the objects being linked to create a\n# shared library.\npostdeps=$lt_postdeps\n\n# The library search path used internally by the compiler when linking\n# a shared library.\ncompiler_lib_search_path=\\`echo $lt_compiler_lib_search_path | \\$SED -e \"s@\\${gcc_dir}@\\\\\\${gcc_dir}@g;s@\\${gcc_ver}@\\\\\\${gcc_ver}@g\"\\`\n\n# Method to check whether dependent libraries are shared objects.\ndeplibs_check_method=$lt_deplibs_check_method\n\n# Command to use when deplibs_check_method == file_magic.\nfile_magic_cmd=$lt_file_magic_cmd\n\n# Flag that allows shared libraries with undefined symbols to be built.\nallow_undefined_flag=$lt_allow_undefined_flag\n\n# Flag that forces no undefined symbols.\nno_undefined_flag=$lt_no_undefined_flag\n\n# Commands used to finish a libtool library installation in a directory.\nfinish_cmds=$lt_finish_cmds\n\n# Same as above, but a single script fragment to be evaled but not shown.\nfinish_eval=$lt_finish_eval\n\n# Take the output of nm and produce a listing of raw symbols and C names.\nglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe\n\n# Transform the output of nm in a proper C declaration\nglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl\n\n# Transform the output of nm in a C name address pair\nglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address\n\n# This is the shared library runtime path variable.\nrunpath_var=$runpath_var\n\n# This is the shared library path variable.\nshlibpath_var=$shlibpath_var\n\n# Is shlibpath searched before the hard-coded library search path?\nshlibpath_overrides_runpath=$shlibpath_overrides_runpath\n\n# How to hardcode a shared library path into an executable.\nhardcode_action=$hardcode_action\n\n# Whether we should hardcode library paths into libraries.\nhardcode_into_libs=$hardcode_into_libs\n\n# Flag to hardcode \\$libdir into a binary during linking.\n# This must work even if \\$libdir does not exist.\nhardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec\n\n# If ld is used when linking, flag to hardcode \\$libdir into\n# a binary during linking. This must work even if \\$libdir does\n# not exist.\nhardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld\n\n# Whether we need a single -rpath flag with a separated argument.\nhardcode_libdir_separator=$lt_hardcode_libdir_separator\n\n# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the\n# resulting binary.\nhardcode_direct=$hardcode_direct\n\n# Set to yes if using the -LDIR flag during linking hardcodes DIR into the\n# resulting binary.\nhardcode_minus_L=$hardcode_minus_L\n\n# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into\n# the resulting binary.\nhardcode_shlibpath_var=$hardcode_shlibpath_var\n\n# Set to yes if building a shared library automatically hardcodes DIR into the library\n# and all subsequent libraries and executables linked against it.\nhardcode_automatic=$hardcode_automatic\n\n# Variables whose values should be saved in libtool wrapper scripts and\n# restored at relink time.\nvariables_saved_for_relink=\"$variables_saved_for_relink\"\n\n# Whether libtool must link a program against all its dependency libraries.\nlink_all_deplibs=$link_all_deplibs\n\n# Compile-time system search path for libraries\nsys_lib_search_path_spec=\\`echo $lt_sys_lib_search_path_spec | \\$SED -e \"s@\\${gcc_dir}@\\\\\\${gcc_dir}@g;s@\\${gcc_ver}@\\\\\\${gcc_ver}@g\"\\`\n\n# Run-time system search path for libraries\nsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec\n\n# Fix the shell variable \\$srcfile for the compiler.\nfix_srcfile_path=\"$fix_srcfile_path\"\n\n# Set to yes if exported symbols are required.\nalways_export_symbols=$always_export_symbols\n\n# The commands to list exported symbols.\nexport_symbols_cmds=$lt_export_symbols_cmds\n\n# The commands to extract the exported symbol list from a shared archive.\nextract_expsyms_cmds=$lt_extract_expsyms_cmds\n\n# Symbols that should not be listed in the preloaded symbols.\nexclude_expsyms=$lt_exclude_expsyms\n\n# Symbols that must always be exported.\ninclude_expsyms=$lt_include_expsyms\n\n# ### END LIBTOOL CONFIG\n\n__EOF__\n\n\n  case $host_os in\n  aix3*)\n    cat <<\\EOF >> \"$cfgfile\"\n\n# AIX sometimes has problems with the GCC collect2 program.  For some\n# reason, if we set the COLLECT_NAMES environment variable, the problems\n# vanish in a puff of smoke.\nif test \"X${COLLECT_NAMES+set}\" != Xset; then\n  COLLECT_NAMES=\n  export COLLECT_NAMES\nfi\nEOF\n    ;;\n  esac\n\n  # We use sed instead of cat because bash on DJGPP gets confused if\n  # if finds mixed CR/LF and LF-only lines.  Since sed operates in\n  # text mode, it properly converts lines to CR/LF.  This bash problem\n  # is reportedly fixed, but why not run on old versions too?\n  sed '$q' \"$ltmain\" >> \"$cfgfile\" || (rm -f \"$cfgfile\"; exit 1)\n\n  mv -f \"$cfgfile\" \"$ofile\" || \\\n    (rm -f \"$ofile\" && cp \"$cfgfile\" \"$ofile\" && rm -f \"$cfgfile\")\n  chmod +x \"$ofile\"\n\nelse\n  # If there is no Makefile yet, we rely on a make rule to execute\n  # `config.status --recheck' to rerun these tests and create the\n  # libtool script then.\n  ltmain_in=`echo $ltmain | sed -e 's/\\.sh$/.in/'`\n  if test -f \"$ltmain_in\"; then\n    test -f Makefile && make \"$ltmain\"\n  fi\nfi\n\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\nCC=\"$lt_save_CC\"\n\n\n# Check whether --with-tags or --without-tags was given.\nif test \"${with_tags+set}\" = set; then\n  withval=\"$with_tags\"\n  tagnames=\"$withval\"\nfi;\n\nif test -f \"$ltmain\" && test -n \"$tagnames\"; then\n  if test ! -f \"${ofile}\"; then\n    { echo \"$as_me:$LINENO: WARNING: output file \\`$ofile' does not exist\" >&5\necho \"$as_me: WARNING: output file \\`$ofile' does not exist\" >&2;}\n  fi\n\n  if test -z \"$LTCC\"; then\n    eval \"`$SHELL ${ofile} --config | grep '^LTCC='`\"\n    if test -z \"$LTCC\"; then\n      { echo \"$as_me:$LINENO: WARNING: output file \\`$ofile' does not look like a libtool script\" >&5\necho \"$as_me: WARNING: output file \\`$ofile' does not look like a libtool script\" >&2;}\n    else\n      { echo \"$as_me:$LINENO: WARNING: using \\`LTCC=$LTCC', extracted from \\`$ofile'\" >&5\necho \"$as_me: WARNING: using \\`LTCC=$LTCC', extracted from \\`$ofile'\" >&2;}\n    fi\n  fi\n  if test -z \"$LTCFLAGS\"; then\n    eval \"`$SHELL ${ofile} --config | grep '^LTCFLAGS='`\"\n  fi\n\n  # Extract list of available tagged configurations in $ofile.\n  # Note that this assumes the entire list is on one line.\n  available_tags=`grep \"^available_tags=\" \"${ofile}\" | $SED -e 's/available_tags=\\(.*$\\)/\\1/' -e 's/\\\"//g'`\n\n  lt_save_ifs=\"$IFS\"; IFS=\"${IFS}$PATH_SEPARATOR,\"\n  for tagname in $tagnames; do\n    IFS=\"$lt_save_ifs\"\n    # Check whether tagname contains only valid characters\n    case `$echo \"X$tagname\" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in\n    \"\") ;;\n    *)  { { echo \"$as_me:$LINENO: error: invalid tag name: $tagname\" >&5\necho \"$as_me: error: invalid tag name: $tagname\" >&2;}\n   { (exit 1); exit 1; }; }\n\t;;\n    esac\n\n    if grep \"^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$\" < \"${ofile}\" > /dev/null\n    then\n      { { echo \"$as_me:$LINENO: error: tag name \\\"$tagname\\\" already exists\" >&5\necho \"$as_me: error: tag name \\\"$tagname\\\" already exists\" >&2;}\n   { (exit 1); exit 1; }; }\n    fi\n\n    # Update the list of available tags.\n    if test -n \"$tagname\"; then\n      echo appending configuration tag \\\"$tagname\\\" to $ofile\n\n      case $tagname in\n      CXX)\n\tif test -n \"$CXX\" && ( test \"X$CXX\" != \"Xno\" &&\n\t    ( (test \"X$CXX\" = \"Xg++\" && `g++ -v >/dev/null 2>&1` ) ||\n\t    (test \"X$CXX\" != \"Xg++\"))) ; then\n\t  ac_ext=cc\nac_cpp='$CXXCPP $CPPFLAGS'\nac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_cxx_compiler_gnu\n\n\n\n\narchive_cmds_need_lc_CXX=no\nallow_undefined_flag_CXX=\nalways_export_symbols_CXX=no\narchive_expsym_cmds_CXX=\nexport_dynamic_flag_spec_CXX=\nhardcode_direct_CXX=no\nhardcode_libdir_flag_spec_CXX=\nhardcode_libdir_flag_spec_ld_CXX=\nhardcode_libdir_separator_CXX=\nhardcode_minus_L_CXX=no\nhardcode_shlibpath_var_CXX=unsupported\nhardcode_automatic_CXX=no\nmodule_cmds_CXX=\nmodule_expsym_cmds_CXX=\nlink_all_deplibs_CXX=unknown\nold_archive_cmds_CXX=$old_archive_cmds\nno_undefined_flag_CXX=\nwhole_archive_flag_spec_CXX=\nenable_shared_with_static_runtimes_CXX=no\n\n# Dependencies to place before and after the object being linked:\npredep_objects_CXX=\npostdep_objects_CXX=\npredeps_CXX=\npostdeps_CXX=\ncompiler_lib_search_path_CXX=\n\n# Source file extension for C++ test sources.\nac_ext=cpp\n\n# Object file extension for compiled C++ test sources.\nobjext=o\nobjext_CXX=$objext\n\n# Code to be used in simple compile tests\nlt_simple_compile_test_code=\"int some_variable = 0;\\n\"\n\n# Code to be used in simple link tests\nlt_simple_link_test_code='int main(int, char *[]) { return(0); }\\n'\n\n# ltmain only uses $CC for tagged configurations so make sure $CC is set.\n\n# If no C compiler was specified, use CC.\nLTCC=${LTCC-\"$CC\"}\n\n# If no C compiler flags were specified, use CFLAGS.\nLTCFLAGS=${LTCFLAGS-\"$CFLAGS\"}\n\n# Allow CC to be a program name with arguments.\ncompiler=$CC\n\n\n# save warnings/boilerplate of simple test code\nac_outfile=conftest.$ac_objext\nprintf \"$lt_simple_compile_test_code\" >conftest.$ac_ext\neval \"$ac_compile\" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err\n_lt_compiler_boilerplate=`cat conftest.err`\n$rm conftest*\n\nac_outfile=conftest.$ac_objext\nprintf \"$lt_simple_link_test_code\" >conftest.$ac_ext\neval \"$ac_link\" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err\n_lt_linker_boilerplate=`cat conftest.err`\n$rm conftest*\n\n\n# Allow CC to be a program name with arguments.\nlt_save_CC=$CC\nlt_save_LD=$LD\nlt_save_GCC=$GCC\nGCC=$GXX\nlt_save_with_gnu_ld=$with_gnu_ld\nlt_save_path_LD=$lt_cv_path_LD\nif test -n \"${lt_cv_prog_gnu_ldcxx+set}\"; then\n  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx\nelse\n  $as_unset lt_cv_prog_gnu_ld\nfi\nif test -n \"${lt_cv_path_LDCXX+set}\"; then\n  lt_cv_path_LD=$lt_cv_path_LDCXX\nelse\n  $as_unset lt_cv_path_LD\nfi\ntest -z \"${LDCXX+set}\" || LD=$LDCXX\nCC=${CXX-\"c++\"}\ncompiler=$CC\ncompiler_CXX=$CC\nfor cc_temp in $compiler\"\"; do\n  case $cc_temp in\n    compile | *[\\\\/]compile | ccache | *[\\\\/]ccache ) ;;\n    distcc | *[\\\\/]distcc | purify | *[\\\\/]purify ) ;;\n    \\-*) ;;\n    *) break;;\n  esac\ndone\ncc_basename=`$echo \"X$cc_temp\" | $Xsed -e 's%.*/%%' -e \"s%^$host_alias-%%\"`\n\n\n# We don't want -fno-exception wen compiling C++ code, so set the\n# no_builtin_flag separately\nif test \"$GXX\" = yes; then\n  lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'\nelse\n  lt_prog_compiler_no_builtin_flag_CXX=\nfi\n\nif test \"$GXX\" = yes; then\n  # Set up default GNU C++ configuration\n\n\n# Check whether --with-gnu-ld or --without-gnu-ld was given.\nif test \"${with_gnu_ld+set}\" = set; then\n  withval=\"$with_gnu_ld\"\n  test \"$withval\" = no || with_gnu_ld=yes\nelse\n  with_gnu_ld=no\nfi;\nac_prog=ld\nif test \"$GCC\" = yes; then\n  # Check if gcc -print-prog-name=ld gives a path.\n  echo \"$as_me:$LINENO: checking for ld used by $CC\" >&5\necho $ECHO_N \"checking for ld used by $CC... $ECHO_C\" >&6\n  case $host in\n  *-*-mingw*)\n    # gcc leaves a trailing carriage return which upsets mingw\n    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\\015'` ;;\n  *)\n    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;\n  esac\n  case $ac_prog in\n    # Accept absolute paths.\n    [\\\\/]* | ?:[\\\\/]*)\n      re_direlt='/[^/][^/]*/\\.\\./'\n      # Canonicalize the pathname of ld\n      ac_prog=`echo $ac_prog| $SED 's%\\\\\\\\%/%g'`\n      while echo $ac_prog | grep \"$re_direlt\" > /dev/null 2>&1; do\n\tac_prog=`echo $ac_prog| $SED \"s%$re_direlt%/%\"`\n      done\n      test -z \"$LD\" && LD=\"$ac_prog\"\n      ;;\n  \"\")\n    # If it fails, then pretend we aren't using GCC.\n    ac_prog=ld\n    ;;\n  *)\n    # If it is relative, then search for the first ld in PATH.\n    with_gnu_ld=unknown\n    ;;\n  esac\nelif test \"$with_gnu_ld\" = yes; then\n  echo \"$as_me:$LINENO: checking for GNU ld\" >&5\necho $ECHO_N \"checking for GNU ld... $ECHO_C\" >&6\nelse\n  echo \"$as_me:$LINENO: checking for non-GNU ld\" >&5\necho $ECHO_N \"checking for non-GNU ld... $ECHO_C\" >&6\nfi\nif test \"${lt_cv_path_LD+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -z \"$LD\"; then\n  lt_save_ifs=\"$IFS\"; IFS=$PATH_SEPARATOR\n  for ac_dir in $PATH; do\n    IFS=\"$lt_save_ifs\"\n    test -z \"$ac_dir\" && ac_dir=.\n    if test -f \"$ac_dir/$ac_prog\" || test -f \"$ac_dir/$ac_prog$ac_exeext\"; then\n      lt_cv_path_LD=\"$ac_dir/$ac_prog\"\n      # Check to see if the program is GNU ld.  I'd rather use --version,\n      # but apparently some variants of GNU ld only accept -v.\n      # Break only if it was the GNU/non-GNU ld that we prefer.\n      case `\"$lt_cv_path_LD\" -v 2>&1 </dev/null` in\n      *GNU* | *'with BFD'*)\n\ttest \"$with_gnu_ld\" != no && break\n\t;;\n      *)\n\ttest \"$with_gnu_ld\" != yes && break\n\t;;\n      esac\n    fi\n  done\n  IFS=\"$lt_save_ifs\"\nelse\n  lt_cv_path_LD=\"$LD\" # Let the user override the test with a path.\nfi\nfi\n\nLD=\"$lt_cv_path_LD\"\nif test -n \"$LD\"; then\n  echo \"$as_me:$LINENO: result: $LD\" >&5\necho \"${ECHO_T}$LD\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\ntest -z \"$LD\" && { { echo \"$as_me:$LINENO: error: no acceptable ld found in \\$PATH\" >&5\necho \"$as_me: error: no acceptable ld found in \\$PATH\" >&2;}\n   { (exit 1); exit 1; }; }\necho \"$as_me:$LINENO: checking if the linker ($LD) is GNU ld\" >&5\necho $ECHO_N \"checking if the linker ($LD) is GNU ld... $ECHO_C\" >&6\nif test \"${lt_cv_prog_gnu_ld+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  # I'd rather use --version here, but apparently some GNU lds only accept -v.\ncase `$LD -v 2>&1 </dev/null` in\n*GNU* | *'with BFD'*)\n  lt_cv_prog_gnu_ld=yes\n  ;;\n*)\n  lt_cv_prog_gnu_ld=no\n  ;;\nesac\nfi\necho \"$as_me:$LINENO: result: $lt_cv_prog_gnu_ld\" >&5\necho \"${ECHO_T}$lt_cv_prog_gnu_ld\" >&6\nwith_gnu_ld=$lt_cv_prog_gnu_ld\n\n\n\n  # Check if GNU C++ uses GNU ld as the underlying linker, since the\n  # archiving commands below assume that GNU ld is being used.\n  if test \"$with_gnu_ld\" = yes; then\n    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'\n    archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n\n    hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'\n    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'\n\n    # If archive_cmds runs LD, not CC, wlarc should be empty\n    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to\n    #     investigate it a little bit more. (MM)\n    wlarc='${wl}'\n\n    # ancient GNU ld didn't support --whole-archive et. al.\n    if eval \"`$CC -print-prog-name=ld` --help 2>&1\" | \\\n\tgrep 'no-whole-archive' > /dev/null; then\n      whole_archive_flag_spec_CXX=\"$wlarc\"'--whole-archive$convenience '\"$wlarc\"'--no-whole-archive'\n    else\n      whole_archive_flag_spec_CXX=\n    fi\n  else\n    with_gnu_ld=no\n    wlarc=\n\n    # A generic and very simple default shared library creation\n    # command for GNU C++ for the case where it uses the native\n    # linker, instead of GNU ld.  If possible, this setting should\n    # overridden to take advantage of the native linker features on\n    # the platform it is being used on.\n    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'\n  fi\n\n  # Commands to make compiler produce verbose output that lists\n  # what \"hidden\" libraries, object files and flags are used when\n  # linking a shared library.\n  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\\-L\"'\n\nelse\n  GXX=no\n  with_gnu_ld=no\n  wlarc=\nfi\n\n# PORTME: fill in a description of your system's C++ link characteristics\necho \"$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries\" >&5\necho $ECHO_N \"checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C\" >&6\nld_shlibs_CXX=yes\ncase $host_os in\n  aix3*)\n    # FIXME: insert proper C++ library support\n    ld_shlibs_CXX=no\n    ;;\n  aix4* | aix5*)\n    if test \"$host_cpu\" = ia64; then\n      # On IA64, the linker does run time linking by default, so we don't\n      # have to do anything special.\n      aix_use_runtimelinking=no\n      exp_sym_flag='-Bexport'\n      no_entry_flag=\"\"\n    else\n      aix_use_runtimelinking=no\n\n      # Test if we are trying to use run time linking or normal\n      # AIX style linking. If -brtl is somewhere in LDFLAGS, we\n      # need to do runtime linking.\n      case $host_os in aix4.[23]|aix4.[23].*|aix5*)\n\tfor ld_flag in $LDFLAGS; do\n\t  case $ld_flag in\n\t  *-brtl*)\n\t    aix_use_runtimelinking=yes\n\t    break\n\t    ;;\n\t  esac\n\tdone\n\t;;\n      esac\n\n      exp_sym_flag='-bexport'\n      no_entry_flag='-bnoentry'\n    fi\n\n    # When large executables or shared objects are built, AIX ld can\n    # have problems creating the table of contents.  If linking a library\n    # or program results in \"error TOC overflow\" add -mminimal-toc to\n    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not\n    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.\n\n    archive_cmds_CXX=''\n    hardcode_direct_CXX=yes\n    hardcode_libdir_separator_CXX=':'\n    link_all_deplibs_CXX=yes\n\n    if test \"$GXX\" = yes; then\n      case $host_os in aix4.[012]|aix4.[012].*)\n      # We only want to do this on AIX 4.2 and lower, the check\n      # below for broken collect2 doesn't work under 4.3+\n\tcollect2name=`${CC} -print-prog-name=collect2`\n\tif test -f \"$collect2name\" && \\\n\t   strings \"$collect2name\" | grep resolve_lib_name >/dev/null\n\tthen\n\t  # We have reworked collect2\n\t  hardcode_direct_CXX=yes\n\telse\n\t  # We have old collect2\n\t  hardcode_direct_CXX=unsupported\n\t  # It fails to find uninstalled libraries when the uninstalled\n\t  # path is not listed in the libpath.  Setting hardcode_minus_L\n\t  # to unsupported forces relinking\n\t  hardcode_minus_L_CXX=yes\n\t  hardcode_libdir_flag_spec_CXX='-L$libdir'\n\t  hardcode_libdir_separator_CXX=\n\tfi\n\t;;\n      esac\n      shared_flag='-shared'\n      if test \"$aix_use_runtimelinking\" = yes; then\n\tshared_flag=\"$shared_flag \"'${wl}-G'\n      fi\n    else\n      # not using gcc\n      if test \"$host_cpu\" = ia64; then\n\t# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release\n\t# chokes on -Wl,-G. The following line is correct:\n\tshared_flag='-G'\n      else\n\tif test \"$aix_use_runtimelinking\" = yes; then\n\t  shared_flag='${wl}-G'\n\telse\n\t  shared_flag='${wl}-bM:SRE'\n\tfi\n      fi\n    fi\n\n    # It seems that -bexpall does not export symbols beginning with\n    # underscore (_), so it is better to generate a list of symbols to export.\n    always_export_symbols_CXX=yes\n    if test \"$aix_use_runtimelinking\" = yes; then\n      # Warning - without using the other runtime loading flags (-brtl),\n      # -berok will link without error, but may produce a broken library.\n      allow_undefined_flag_CXX='-berok'\n      # Determine the default libpath from the value encoded in an empty executable.\n      cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_cxx_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n\naix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\\(.*\\)$/\\1/; p; }\n}'`\n# Check for a 64-bit object if we didn't find anything.\nif test -z \"$aix_libpath\"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\\(.*\\)$/\\1/; p; }\n}'`; fi\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nif test -z \"$aix_libpath\"; then aix_libpath=\"/usr/lib:/lib\"; fi\n\n      hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'\"$aix_libpath\"\n\n      archive_expsym_cmds_CXX=\"\\$CC\"' -o $output_objdir/$soname $libobjs $deplibs '\"\\${wl}$no_entry_flag\"' $compiler_flags `if test \"x${allow_undefined_flag}\" != \"x\"; then echo \"${wl}${allow_undefined_flag}\"; else :; fi` '\"\\${wl}$exp_sym_flag:\\$export_symbols $shared_flag\"\n     else\n      if test \"$host_cpu\" = ia64; then\n\thardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'\n\tallow_undefined_flag_CXX=\"-z nodefs\"\n\tarchive_expsym_cmds_CXX=\"\\$CC $shared_flag\"' -o $output_objdir/$soname $libobjs $deplibs '\"\\${wl}$no_entry_flag\"' $compiler_flags ${wl}${allow_undefined_flag} '\"\\${wl}$exp_sym_flag:\\$export_symbols\"\n      else\n\t# Determine the default libpath from the value encoded in an empty executable.\n\tcat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_cxx_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n\naix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\\(.*\\)$/\\1/; p; }\n}'`\n# Check for a 64-bit object if we didn't find anything.\nif test -z \"$aix_libpath\"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\\(.*\\)$/\\1/; p; }\n}'`; fi\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nif test -z \"$aix_libpath\"; then aix_libpath=\"/usr/lib:/lib\"; fi\n\n\thardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'\"$aix_libpath\"\n\t# Warning - without using the other run time loading flags,\n\t# -berok will link without error, but may produce a broken library.\n\tno_undefined_flag_CXX=' ${wl}-bernotok'\n\tallow_undefined_flag_CXX=' ${wl}-berok'\n\t# Exported symbols can be pulled into shared objects from archives\n\twhole_archive_flag_spec_CXX='$convenience'\n\tarchive_cmds_need_lc_CXX=yes\n\t# This is similar to how AIX traditionally builds its shared libraries.\n\tarchive_expsym_cmds_CXX=\"\\$CC $shared_flag\"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'\n      fi\n    fi\n    ;;\n\n  beos*)\n    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then\n      allow_undefined_flag_CXX=unsupported\n      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc\n      # support --undefined.  This deserves some investigation.  FIXME\n      archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n    else\n      ld_shlibs_CXX=no\n    fi\n    ;;\n\n  chorus*)\n    case $cc_basename in\n      *)\n\t# FIXME: insert proper C++ library support\n\tld_shlibs_CXX=no\n\t;;\n    esac\n    ;;\n\n  cygwin* | mingw* | pw32*)\n    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,\n    # as there is no search path for DLLs.\n    hardcode_libdir_flag_spec_CXX='-L$libdir'\n    allow_undefined_flag_CXX=unsupported\n    always_export_symbols_CXX=no\n    enable_shared_with_static_runtimes_CXX=yes\n\n    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then\n      archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'\n      # If the export-symbols file already is a .def file (1st line\n      # is EXPORTS), use it as is; otherwise, prepend...\n      archive_expsym_cmds_CXX='if test \"x`$SED 1q $export_symbols`\" = xEXPORTS; then\n\tcp $export_symbols $output_objdir/$soname.def;\n      else\n\techo EXPORTS > $output_objdir/$soname.def;\n\tcat $export_symbols >> $output_objdir/$soname.def;\n      fi~\n      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'\n    else\n      ld_shlibs_CXX=no\n    fi\n  ;;\n      darwin* | rhapsody*)\n        case $host_os in\n        rhapsody* | darwin1.[012])\n         allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress'\n         ;;\n       *) # Darwin 1.3 on\n         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then\n           allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'\n         else\n           case ${MACOSX_DEPLOYMENT_TARGET} in\n             10.[012])\n               allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'\n               ;;\n             10.*)\n               allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup'\n               ;;\n           esac\n         fi\n         ;;\n        esac\n      archive_cmds_need_lc_CXX=no\n      hardcode_direct_CXX=no\n      hardcode_automatic_CXX=yes\n      hardcode_shlibpath_var_CXX=unsupported\n      whole_archive_flag_spec_CXX=''\n      link_all_deplibs_CXX=yes\n\n    if test \"$GXX\" = yes ; then\n      lt_int_apple_cc_single_mod=no\n      output_verbose_link_cmd='echo'\n      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then\n       lt_int_apple_cc_single_mod=yes\n      fi\n      if test \"X$lt_int_apple_cc_single_mod\" = Xyes ; then\n       archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'\n      else\n          archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'\n        fi\n        module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'\n        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds\n          if test \"X$lt_int_apple_cc_single_mod\" = Xyes ; then\n            archive_expsym_cmds_CXX='sed -e \"s,#.*,,\" -e \"s,^[    ]*,,\" -e \"s,^\\(..*\\),_&,\" < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'\n          else\n            archive_expsym_cmds_CXX='sed -e \"s,#.*,,\" -e \"s,^[    ]*,,\" -e \"s,^\\(..*\\),_&,\" < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'\n          fi\n            module_expsym_cmds_CXX='sed -e \"s,#.*,,\" -e \"s,^[    ]*,,\" -e \"s,^\\(..*\\),_&,\" < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'\n      else\n      case $cc_basename in\n        xlc*)\n         output_verbose_link_cmd='echo'\n          archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'\n          module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'\n          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds\n          archive_expsym_cmds_CXX='sed -e \"s,#.*,,\" -e \"s,^[    ]*,,\" -e \"s,^\\(..*\\),_&,\" < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'\n          module_expsym_cmds_CXX='sed -e \"s,#.*,,\" -e \"s,^[    ]*,,\" -e \"s,^\\(..*\\),_&,\" < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'\n          ;;\n       *)\n         ld_shlibs_CXX=no\n          ;;\n      esac\n      fi\n        ;;\n\n  dgux*)\n    case $cc_basename in\n      ec++*)\n\t# FIXME: insert proper C++ library support\n\tld_shlibs_CXX=no\n\t;;\n      ghcx*)\n\t# Green Hills C++ Compiler\n\t# FIXME: insert proper C++ library support\n\tld_shlibs_CXX=no\n\t;;\n      *)\n\t# FIXME: insert proper C++ library support\n\tld_shlibs_CXX=no\n\t;;\n    esac\n    ;;\n  freebsd[12]*)\n    # C++ shared libraries reported to be fairly broken before switch to ELF\n    ld_shlibs_CXX=no\n    ;;\n  freebsd-elf*)\n    archive_cmds_need_lc_CXX=no\n    ;;\n  freebsd* | kfreebsd*-gnu | dragonfly*)\n    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF\n    # conventions\n    ld_shlibs_CXX=yes\n    ;;\n  gnu*)\n    ;;\n  hpux9*)\n    hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'\n    hardcode_libdir_separator_CXX=:\n    export_dynamic_flag_spec_CXX='${wl}-E'\n    hardcode_direct_CXX=yes\n    hardcode_minus_L_CXX=yes # Not in the search PATH,\n\t\t\t\t# but as the default\n\t\t\t\t# location of the library.\n\n    case $cc_basename in\n    CC*)\n      # FIXME: insert proper C++ library support\n      ld_shlibs_CXX=no\n      ;;\n    aCC*)\n      archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'\n      # Commands to make compiler produce verbose output that lists\n      # what \"hidden\" libraries, object files and flags are used when\n      # linking a shared library.\n      #\n      # There doesn't appear to be a way to prevent this compiler from\n      # explicitly linking system object files so we need to strip them\n      # from the output so that they don't get included in the library\n      # dependencies.\n      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep \"[-]L\"`; list=\"\"; for z in $templist; do case $z in conftest.$objext) list=\"$list $z\";; *.$objext);; *) list=\"$list $z\";;esac; done; echo $list'\n      ;;\n    *)\n      if test \"$GXX\" = yes; then\n        archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'\n      else\n        # FIXME: insert proper C++ library support\n        ld_shlibs_CXX=no\n      fi\n      ;;\n    esac\n    ;;\n  hpux10*|hpux11*)\n    if test $with_gnu_ld = no; then\n      hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'\n      hardcode_libdir_separator_CXX=:\n\n      case $host_cpu in\n      hppa*64*|ia64*)\n\thardcode_libdir_flag_spec_ld_CXX='+b $libdir'\n        ;;\n      *)\n\texport_dynamic_flag_spec_CXX='${wl}-E'\n        ;;\n      esac\n    fi\n    case $host_cpu in\n    hppa*64*|ia64*)\n      hardcode_direct_CXX=no\n      hardcode_shlibpath_var_CXX=no\n      ;;\n    *)\n      hardcode_direct_CXX=yes\n      hardcode_minus_L_CXX=yes # Not in the search PATH,\n\t\t\t\t\t      # but as the default\n\t\t\t\t\t      # location of the library.\n      ;;\n    esac\n\n    case $cc_basename in\n      CC*)\n\t# FIXME: insert proper C++ library support\n\tld_shlibs_CXX=no\n\t;;\n      aCC*)\n\tcase $host_cpu in\n\thppa*64*)\n\t  archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t  ;;\n\tia64*)\n\t  archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t  ;;\n\t*)\n\t  archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t  ;;\n\tesac\n\t# Commands to make compiler produce verbose output that lists\n\t# what \"hidden\" libraries, object files and flags are used when\n\t# linking a shared library.\n\t#\n\t# There doesn't appear to be a way to prevent this compiler from\n\t# explicitly linking system object files so we need to strip them\n\t# from the output so that they don't get included in the library\n\t# dependencies.\n\toutput_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep \"\\-L\"`; list=\"\"; for z in $templist; do case $z in conftest.$objext) list=\"$list $z\";; *.$objext);; *) list=\"$list $z\";;esac; done; echo $list'\n\t;;\n      *)\n\tif test \"$GXX\" = yes; then\n\t  if test $with_gnu_ld = no; then\n\t    case $host_cpu in\n\t    hppa*64*)\n\t      archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t      ;;\n\t    ia64*)\n\t      archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t      ;;\n\t    *)\n\t      archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\t      ;;\n\t    esac\n\t  fi\n\telse\n\t  # FIXME: insert proper C++ library support\n\t  ld_shlibs_CXX=no\n\tfi\n\t;;\n    esac\n    ;;\n  interix3*)\n    hardcode_direct_CXX=no\n    hardcode_shlibpath_var_CXX=no\n    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'\n    export_dynamic_flag_spec_CXX='${wl}-E'\n    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.\n    # Instead, shared libraries are loaded at an image base (0x10000000 by\n    # default) and relocated if they conflict, which is a slow very memory\n    # consuming and fragmenting process.  To avoid this, we pick a random,\n    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link\n    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.\n    archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \\* 262144 + 1342177280` -o $lib'\n    archive_expsym_cmds_CXX='sed \"s,^,_,\" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \\* 262144 + 1342177280` -o $lib'\n    ;;\n  irix5* | irix6*)\n    case $cc_basename in\n      CC*)\n\t# SGI C++\n\tarchive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n \"$verstring\" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'\n\n\t# Archives containing C++ object files must be created using\n\t# \"CC -ar\", where \"CC\" is the IRIX C++ compiler.  This is\n\t# necessary to make sure instantiated templates are included\n\t# in the archive.\n\told_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'\n\t;;\n      *)\n\tif test \"$GXX\" = yes; then\n\t  if test \"$with_gnu_ld\" = no; then\n\t    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $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'\n\t  else\n\t    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n \"$verstring\" && echo ${wl}-set_version ${wl}$verstring` -o $lib'\n\t  fi\n\tfi\n\tlink_all_deplibs_CXX=yes\n\t;;\n    esac\n    hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'\n    hardcode_libdir_separator_CXX=:\n    ;;\n  linux*)\n    case $cc_basename in\n      KCC*)\n\t# Kuck and Associates, Inc. (KAI) C++ Compiler\n\n\t# KCC will only create a shared library if the output file\n\t# ends with \".so\" (or \".sl\" for HP-UX), so rename the library\n\t# to its proper name (with version) after linking.\n\tarchive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\\''s/\\([^()0-9A-Za-z{}]\\)/\\\\\\\\\\1/g'\\''`; templib=`echo $lib | $SED -e \"s/\\${tempext}\\..*/.so/\"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \\$templib; mv \\$templib $lib'\n\tarchive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\\''s/\\([^()0-9A-Za-z{}]\\)/\\\\\\\\\\1/g'\\''`; templib=`echo $lib | $SED -e \"s/\\${tempext}\\..*/.so/\"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \\$templib ${wl}-retain-symbols-file,$export_symbols; mv \\$templib $lib'\n\t# Commands to make compiler produce verbose output that lists\n\t# what \"hidden\" libraries, object files and flags are used when\n\t# linking a shared library.\n\t#\n\t# There doesn't appear to be a way to prevent this compiler from\n\t# explicitly linking system object files so we need to strip them\n\t# from the output so that they don't get included in the library\n\t# dependencies.\n\toutput_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep \"ld\"`; rm -f libconftest$shared_ext; list=\"\"; for z in $templist; do case $z in conftest.$objext) list=\"$list $z\";; *.$objext);; *) list=\"$list $z\";;esac; done; echo $list'\n\n\thardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir'\n\texport_dynamic_flag_spec_CXX='${wl}--export-dynamic'\n\n\t# Archives containing C++ object files must be created using\n\t# \"CC -Bstatic\", where \"CC\" is the KAI C++ compiler.\n\told_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'\n\t;;\n      icpc*)\n\t# Intel C++\n\twith_gnu_ld=yes\n\t# version 8.0 and above of icpc choke on multiply defined symbols\n\t# if we add $predep_objects and $postdep_objects, however 7.1 and\n\t# earlier do not add the objects themselves.\n\tcase `$CC -V 2>&1` in\n\t*\"Version 7.\"*)\n  \t  archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'\n  \t  archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n\t  ;;\n\t*)  # Version 8.0 or newer\n\t  tmp_idyn=\n\t  case $host_cpu in\n\t    ia64*) tmp_idyn=' -i_dynamic';;\n\t  esac\n  \t  archive_cmds_CXX='$CC -shared'\"$tmp_idyn\"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\t  archive_expsym_cmds_CXX='$CC -shared'\"$tmp_idyn\"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n\t  ;;\n\tesac\n\tarchive_cmds_need_lc_CXX=no\n\thardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'\n\texport_dynamic_flag_spec_CXX='${wl}--export-dynamic'\n\twhole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'\n\t;;\n      pgCC*)\n        # Portland Group C++ compiler\n\tarchive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'\n  \tarchive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'\n\n\thardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'\n\texport_dynamic_flag_spec_CXX='${wl}--export-dynamic'\n\twhole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\\\"\\\"; do test  -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience,$conv\\\"; done; $echo \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n        ;;\n      cxx*)\n\t# Compaq C++\n\tarchive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\tarchive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'\n\n\trunpath_var=LD_RUN_PATH\n\thardcode_libdir_flag_spec_CXX='-rpath $libdir'\n\thardcode_libdir_separator_CXX=:\n\n\t# Commands to make compiler produce verbose output that lists\n\t# what \"hidden\" libraries, object files and flags are used when\n\t# linking a shared library.\n\t#\n\t# There doesn't appear to be a way to prevent this compiler from\n\t# explicitly linking system object files so we need to strip them\n\t# from the output so that they don't get included in the library\n\t# dependencies.\n\toutput_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"ld\"`; templist=`echo $templist | $SED \"s/\\(^.*ld.*\\)\\( .*ld .*$\\)/\\1/\"`; list=\"\"; for z in $templist; do case $z in conftest.$objext) list=\"$list $z\";; *.$objext);; *) list=\"$list $z\";;esac; done; echo $list'\n\t;;\n    esac\n    ;;\n  lynxos*)\n    # FIXME: insert proper C++ library support\n    ld_shlibs_CXX=no\n    ;;\n  m88k*)\n    # FIXME: insert proper C++ library support\n    ld_shlibs_CXX=no\n    ;;\n  mvs*)\n    case $cc_basename in\n      cxx*)\n\t# FIXME: insert proper C++ library support\n\tld_shlibs_CXX=no\n\t;;\n      *)\n\t# FIXME: insert proper C++ library support\n\tld_shlibs_CXX=no\n\t;;\n    esac\n    ;;\n  netbsd*)\n    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then\n      archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'\n      wlarc=\n      hardcode_libdir_flag_spec_CXX='-R$libdir'\n      hardcode_direct_CXX=yes\n      hardcode_shlibpath_var_CXX=no\n    fi\n    # Workaround some broken pre-1.5 toolchains\n    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e \"s:-lgcc -lc -lgcc::\"'\n    ;;\n  openbsd2*)\n    # C++ shared libraries are fairly broken\n    ld_shlibs_CXX=no\n    ;;\n  openbsd*)\n    hardcode_direct_CXX=yes\n    hardcode_shlibpath_var_CXX=no\n    archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'\n    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'\n    if test -z \"`echo __ELF__ | $CC -E - | grep __ELF__`\" || test \"$host_os-$host_cpu\" = \"openbsd2.8-powerpc\"; then\n      archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'\n      export_dynamic_flag_spec_CXX='${wl}-E'\n      whole_archive_flag_spec_CXX=\"$wlarc\"'--whole-archive$convenience '\"$wlarc\"'--no-whole-archive'\n    fi\n    output_verbose_link_cmd='echo'\n    ;;\n  osf3*)\n    case $cc_basename in\n      KCC*)\n\t# Kuck and Associates, Inc. (KAI) C++ Compiler\n\n\t# KCC will only create a shared library if the output file\n\t# ends with \".so\" (or \".sl\" for HP-UX), so rename the library\n\t# to its proper name (with version) after linking.\n\tarchive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\\''s/\\([^()0-9A-Za-z{}]\\)/\\\\\\\\\\1/g'\\''`; templib=`echo $lib | $SED -e \"s/\\${tempext}\\..*/.so/\"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \\$templib; mv \\$templib $lib'\n\n\thardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'\n\thardcode_libdir_separator_CXX=:\n\n\t# Archives containing C++ object files must be created using\n\t# \"CC -Bstatic\", where \"CC\" is the KAI C++ compiler.\n\told_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'\n\n\t;;\n      RCC*)\n\t# Rational C++ 2.4.1\n\t# FIXME: insert proper C++ library support\n\tld_shlibs_CXX=no\n\t;;\n      cxx*)\n\tallow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\\*'\n\tarchive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n \"$verstring\" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'\n\n\thardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'\n\thardcode_libdir_separator_CXX=:\n\n\t# Commands to make compiler produce verbose output that lists\n\t# what \"hidden\" libraries, object files and flags are used when\n\t# linking a shared library.\n\t#\n\t# There doesn't appear to be a way to prevent this compiler from\n\t# explicitly linking system object files so we need to strip them\n\t# from the output so that they don't get included in the library\n\t# dependencies.\n\toutput_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"ld\" | grep -v \"ld:\"`; templist=`echo $templist | $SED \"s/\\(^.*ld.*\\)\\( .*ld.*$\\)/\\1/\"`; list=\"\"; for z in $templist; do case $z in conftest.$objext) list=\"$list $z\";; *.$objext);; *) list=\"$list $z\";;esac; done; echo $list'\n\t;;\n      *)\n\tif test \"$GXX\" = yes && test \"$with_gnu_ld\" = no; then\n\t  allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\\*'\n\t  archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $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'\n\n\t  hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'\n\t  hardcode_libdir_separator_CXX=:\n\n\t  # Commands to make compiler produce verbose output that lists\n\t  # what \"hidden\" libraries, object files and flags are used when\n\t  # linking a shared library.\n\t  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\\-L\"'\n\n\telse\n\t  # FIXME: insert proper C++ library support\n\t  ld_shlibs_CXX=no\n\tfi\n\t;;\n    esac\n    ;;\n  osf4* | osf5*)\n    case $cc_basename in\n      KCC*)\n\t# Kuck and Associates, Inc. (KAI) C++ Compiler\n\n\t# KCC will only create a shared library if the output file\n\t# ends with \".so\" (or \".sl\" for HP-UX), so rename the library\n\t# to its proper name (with version) after linking.\n\tarchive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\\''s/\\([^()0-9A-Za-z{}]\\)/\\\\\\\\\\1/g'\\''`; templib=`echo $lib | $SED -e \"s/\\${tempext}\\..*/.so/\"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \\$templib; mv \\$templib $lib'\n\n\thardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'\n\thardcode_libdir_separator_CXX=:\n\n\t# Archives containing C++ object files must be created using\n\t# the KAI C++ compiler.\n\told_archive_cmds_CXX='$CC -o $oldlib $oldobjs'\n\t;;\n      RCC*)\n\t# Rational C++ 2.4.1\n\t# FIXME: insert proper C++ library support\n\tld_shlibs_CXX=no\n\t;;\n      cxx*)\n\tallow_undefined_flag_CXX=' -expect_unresolved \\*'\n\tarchive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n \"$verstring\" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'\n\tarchive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf \"%s %s\\\\n\" -exported_symbol \"\\$i\" >> $lib.exp; done~\n\t  echo \"-hidden\">> $lib.exp~\n\t  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n \"$verstring\" && echo -set_version\t$verstring` -update_registry ${output_objdir}/so_locations -o $lib~\n\t  $rm $lib.exp'\n\n\thardcode_libdir_flag_spec_CXX='-rpath $libdir'\n\thardcode_libdir_separator_CXX=:\n\n\t# Commands to make compiler produce verbose output that lists\n\t# what \"hidden\" libraries, object files and flags are used when\n\t# linking a shared library.\n\t#\n\t# There doesn't appear to be a way to prevent this compiler from\n\t# explicitly linking system object files so we need to strip them\n\t# from the output so that they don't get included in the library\n\t# dependencies.\n\toutput_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"ld\" | grep -v \"ld:\"`; templist=`echo $templist | $SED \"s/\\(^.*ld.*\\)\\( .*ld.*$\\)/\\1/\"`; list=\"\"; for z in $templist; do case $z in conftest.$objext) list=\"$list $z\";; *.$objext);; *) list=\"$list $z\";;esac; done; echo $list'\n\t;;\n      *)\n\tif test \"$GXX\" = yes && test \"$with_gnu_ld\" = no; then\n\t  allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\\*'\n\t archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n \"$verstring\" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'\n\n\t  hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'\n\t  hardcode_libdir_separator_CXX=:\n\n\t  # Commands to make compiler produce verbose output that lists\n\t  # what \"hidden\" libraries, object files and flags are used when\n\t  # linking a shared library.\n\t  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\\-L\"'\n\n\telse\n\t  # FIXME: insert proper C++ library support\n\t  ld_shlibs_CXX=no\n\tfi\n\t;;\n    esac\n    ;;\n  psos*)\n    # FIXME: insert proper C++ library support\n    ld_shlibs_CXX=no\n    ;;\n  sunos4*)\n    case $cc_basename in\n      CC*)\n\t# Sun C++ 4.x\n\t# FIXME: insert proper C++ library support\n\tld_shlibs_CXX=no\n\t;;\n      lcc*)\n\t# Lucid\n\t# FIXME: insert proper C++ library support\n\tld_shlibs_CXX=no\n\t;;\n      *)\n\t# FIXME: insert proper C++ library support\n\tld_shlibs_CXX=no\n\t;;\n    esac\n    ;;\n  solaris*)\n    case $cc_basename in\n      CC*)\n\t# Sun C++ 4.2, 5.x and Centerline C++\n        archive_cmds_need_lc_CXX=yes\n\tno_undefined_flag_CXX=' -zdefs'\n\tarchive_cmds_CXX='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'\n\tarchive_expsym_cmds_CXX='$echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~$echo \"local: *; };\" >> $lib.exp~\n\t$CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'\n\n\thardcode_libdir_flag_spec_CXX='-R$libdir'\n\thardcode_shlibpath_var_CXX=no\n\tcase $host_os in\n\t  solaris2.[0-5] | solaris2.[0-5].*) ;;\n\t  *)\n\t    # The C++ compiler is used as linker so we must use $wl\n\t    # flag to pass the commands to the underlying system\n\t    # linker. We must also pass each convience library through\n\t    # to the system linker between allextract/defaultextract.\n\t    # The C++ compiler will combine linker options so we\n\t    # cannot just pass the convience library names through\n\t    # without $wl.\n\t    # Supported since Solaris 2.6 (maybe 2.5.1?)\n\t    whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\\\"\\\"; do test -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience,$conv\\\"; done; $echo \\\"$new_convenience\\\"` ${wl}-z ${wl}defaultextract'\n\t    ;;\n\tesac\n\tlink_all_deplibs_CXX=yes\n\n\toutput_verbose_link_cmd='echo'\n\n\t# Archives containing C++ object files must be created using\n\t# \"CC -xar\", where \"CC\" is the Sun C++ compiler.  This is\n\t# necessary to make sure instantiated templates are included\n\t# in the archive.\n\told_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'\n\t;;\n      gcx*)\n\t# Green Hills C++ Compiler\n\tarchive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'\n\n\t# The C++ compiler must be used to create the archive.\n\told_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'\n\t;;\n      *)\n\t# GNU C++ compiler with Solaris linker\n\tif test \"$GXX\" = yes && test \"$with_gnu_ld\" = no; then\n\t  no_undefined_flag_CXX=' ${wl}-z ${wl}defs'\n\t  if $CC --version | grep -v '^2\\.7' > /dev/null; then\n\t    archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'\n\t    archive_expsym_cmds_CXX='$echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~$echo \"local: *; };\" >> $lib.exp~\n\t\t$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'\n\n\t    # Commands to make compiler produce verbose output that lists\n\t    # what \"hidden\" libraries, object files and flags are used when\n\t    # linking a shared library.\n\t    output_verbose_link_cmd=\"$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \\\"\\-L\\\"\"\n\t  else\n\t    # g++ 2.7 appears to require `-G' NOT `-shared' on this\n\t    # platform.\n\t    archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'\n\t    archive_expsym_cmds_CXX='$echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~$echo \"local: *; };\" >> $lib.exp~\n\t\t$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'\n\n\t    # Commands to make compiler produce verbose output that lists\n\t    # what \"hidden\" libraries, object files and flags are used when\n\t    # linking a shared library.\n\t    output_verbose_link_cmd=\"$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \\\"\\-L\\\"\"\n\t  fi\n\n\t  hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'\n\tfi\n\t;;\n    esac\n    ;;\n  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)\n    no_undefined_flag_CXX='${wl}-z,text'\n    archive_cmds_need_lc_CXX=no\n    hardcode_shlibpath_var_CXX=no\n    runpath_var='LD_RUN_PATH'\n\n    case $cc_basename in\n      CC*)\n\tarchive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\tarchive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t;;\n      *)\n\tarchive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\tarchive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t;;\n    esac\n    ;;\n  sysv5* | sco3.2v5* | sco5v6*)\n    # Note: We can NOT use -z defs as we might desire, because we do not\n    # link with -lc, and that would cause any symbols used from libc to\n    # always be unresolved, which means just about no library would\n    # ever link correctly.  If we're not using GNU ld we use -z text\n    # though, which does catch some bad symbols but isn't as heavy-handed\n    # as -z defs.\n    # For security reasons, it is highly recommended that you always\n    # use absolute paths for naming shared libraries, and exclude the\n    # DT_RUNPATH tag from executables and libraries.  But doing so\n    # requires that you compile everything twice, which is a pain.\n    # So that behaviour is only enabled if SCOABSPATH is set to a\n    # non-empty value in the environment.  Most likely only useful for\n    # creating official distributions of packages.\n    # This is a hack until libtool officially supports absolute path\n    # names for shared libraries.\n    no_undefined_flag_CXX='${wl}-z,text'\n    allow_undefined_flag_CXX='${wl}-z,nodefs'\n    archive_cmds_need_lc_CXX=no\n    hardcode_shlibpath_var_CXX=no\n    hardcode_libdir_flag_spec_CXX='`test -z \"$SCOABSPATH\" && echo ${wl}-R,$libdir`'\n    hardcode_libdir_separator_CXX=':'\n    link_all_deplibs_CXX=yes\n    export_dynamic_flag_spec_CXX='${wl}-Bexport'\n    runpath_var='LD_RUN_PATH'\n\n    case $cc_basename in\n      CC*)\n\tarchive_cmds_CXX='$CC -G ${wl}-h,\\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\tarchive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t;;\n      *)\n\tarchive_cmds_CXX='$CC -shared ${wl}-h,\\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\tarchive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t;;\n    esac\n    ;;\n  tandem*)\n    case $cc_basename in\n      NCC*)\n\t# NonStop-UX NCC 3.20\n\t# FIXME: insert proper C++ library support\n\tld_shlibs_CXX=no\n\t;;\n      *)\n\t# FIXME: insert proper C++ library support\n\tld_shlibs_CXX=no\n\t;;\n    esac\n    ;;\n  vxworks*)\n    # FIXME: insert proper C++ library support\n    ld_shlibs_CXX=no\n    ;;\n  *)\n    # FIXME: insert proper C++ library support\n    ld_shlibs_CXX=no\n    ;;\nesac\necho \"$as_me:$LINENO: result: $ld_shlibs_CXX\" >&5\necho \"${ECHO_T}$ld_shlibs_CXX\" >&6\ntest \"$ld_shlibs_CXX\" = no && can_build_shared=no\n\nGCC_CXX=\"$GXX\"\nLD_CXX=\"$LD\"\n\n\ncat > conftest.$ac_ext <<EOF\nclass Foo\n{\npublic:\n  Foo (void) { a = 0; }\nprivate:\n  int a;\n};\nEOF\n\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; then\n  # Parse the compiler output and extract the necessary\n  # objects, libraries and library flags.\n\n  # Sentinel used to keep track of whether or not we are before\n  # the conftest object file.\n  pre_test_object_deps_done=no\n\n  # The `*' in the case matches for architectures that use `case' in\n  # $output_verbose_cmd can trigger glob expansion during the loop\n  # eval without this substitution.\n  output_verbose_link_cmd=`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`\n\n  for p in `eval $output_verbose_link_cmd`; do\n    case $p in\n\n    -L* | -R* | -l*)\n       # Some compilers place space between \"-{L,R}\" and the path.\n       # Remove the space.\n       if test $p = \"-L\" \\\n\t  || test $p = \"-R\"; then\n\t prev=$p\n\t continue\n       else\n\t prev=\n       fi\n\n       if test \"$pre_test_object_deps_done\" = no; then\n\t case $p in\n\t -L* | -R*)\n\t   # Internal compiler library paths should come after those\n\t   # provided the user.  The postdeps already come after the\n\t   # user supplied libs so there is no need to process them.\n\t   if test -z \"$compiler_lib_search_path_CXX\"; then\n\t     compiler_lib_search_path_CXX=\"${prev}${p}\"\n\t   else\n\t     compiler_lib_search_path_CXX=\"${compiler_lib_search_path_CXX} ${prev}${p}\"\n\t   fi\n\t   ;;\n\t # The \"-l\" case would never come before the object being\n\t # linked, so don't bother handling this case.\n\t esac\n       else\n\t if test -z \"$postdeps_CXX\"; then\n\t   postdeps_CXX=\"${prev}${p}\"\n\t else\n\t   postdeps_CXX=\"${postdeps_CXX} ${prev}${p}\"\n\t fi\n       fi\n       ;;\n\n    *.$objext)\n       # This assumes that the test object file only shows up\n       # once in the compiler output.\n       if test \"$p\" = \"conftest.$objext\"; then\n\t pre_test_object_deps_done=yes\n\t continue\n       fi\n\n       if test \"$pre_test_object_deps_done\" = no; then\n\t if test -z \"$predep_objects_CXX\"; then\n\t   predep_objects_CXX=\"$p\"\n\t else\n\t   predep_objects_CXX=\"$predep_objects_CXX $p\"\n\t fi\n       else\n\t if test -z \"$postdep_objects_CXX\"; then\n\t   postdep_objects_CXX=\"$p\"\n\t else\n\t   postdep_objects_CXX=\"$postdep_objects_CXX $p\"\n\t fi\n       fi\n       ;;\n\n    *) ;; # Ignore the rest.\n\n    esac\n  done\n\n  # Clean up.\n  rm -f a.out a.exe\nelse\n  echo \"libtool.m4: error: problem compiling CXX test program\"\nfi\n\n$rm -f confest.$objext\n\n# PORTME: override above test on systems where it is broken\ncase $host_os in\ninterix3*)\n  # Interix 3.5 installs completely hosed .la files for C++, so rather than\n  # hack all around it, let's just trust \"g++\" to DTRT.\n  predep_objects_CXX=\n  postdep_objects_CXX=\n  postdeps_CXX=\n  ;;\n\nsolaris*)\n  case $cc_basename in\n  CC*)\n    # Adding this requires a known-good setup of shared libraries for\n    # Sun compiler versions before 5.6, else PIC objects from an old\n    # archive will be linked into the output, leading to subtle bugs.\n    postdeps_CXX='-lCstd -lCrun'\n    ;;\n  esac\n  ;;\nesac\n\n\ncase \" $postdeps_CXX \" in\n*\" -lc \"*) archive_cmds_need_lc_CXX=no ;;\nesac\n\nlt_prog_compiler_wl_CXX=\nlt_prog_compiler_pic_CXX=\nlt_prog_compiler_static_CXX=\n\necho \"$as_me:$LINENO: checking for $compiler option to produce PIC\" >&5\necho $ECHO_N \"checking for $compiler option to produce PIC... $ECHO_C\" >&6\n\n  # C++ specific cases for pic, static, wl, etc.\n  if test \"$GXX\" = yes; then\n    lt_prog_compiler_wl_CXX='-Wl,'\n    lt_prog_compiler_static_CXX='-static'\n\n    case $host_os in\n    aix*)\n      # All AIX code is PIC.\n      if test \"$host_cpu\" = ia64; then\n\t# AIX 5 now supports IA64 processor\n\tlt_prog_compiler_static_CXX='-Bstatic'\n      fi\n      ;;\n    amigaos*)\n      # FIXME: we need at least 68020 code to build shared libraries, but\n      # adding the `-m68020' flag to GCC prevents building anything better,\n      # like `-m68040'.\n      lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'\n      ;;\n    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)\n      # PIC is the default for these OSes.\n      ;;\n    mingw* | os2* | pw32*)\n      # This hack is so that the source file can tell whether it is being\n      # built for inclusion in a dll (and should export symbols for example).\n      lt_prog_compiler_pic_CXX='-DDLL_EXPORT'\n      ;;\n    darwin* | rhapsody*)\n      # PIC is the default on this platform\n      # Common symbols not allowed in MH_DYLIB files\n      lt_prog_compiler_pic_CXX='-fno-common'\n      ;;\n    *djgpp*)\n      # DJGPP does not support shared libraries at all\n      lt_prog_compiler_pic_CXX=\n      ;;\n    interix3*)\n      # Interix 3.x gcc -fpic/-fPIC options generate broken code.\n      # Instead, we relocate shared libraries at runtime.\n      ;;\n    sysv4*MP*)\n      if test -d /usr/nec; then\n\tlt_prog_compiler_pic_CXX=-Kconform_pic\n      fi\n      ;;\n    hpux*)\n      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but\n      # not for PA HP-UX.\n      case $host_cpu in\n      hppa*64*|ia64*)\n\t;;\n      *)\n\tlt_prog_compiler_pic_CXX='-fPIC'\n\t;;\n      esac\n      ;;\n    *)\n      lt_prog_compiler_pic_CXX='-fPIC'\n      ;;\n    esac\n  else\n    case $host_os in\n      aix4* | aix5*)\n\t# All AIX code is PIC.\n\tif test \"$host_cpu\" = ia64; then\n\t  # AIX 5 now supports IA64 processor\n\t  lt_prog_compiler_static_CXX='-Bstatic'\n\telse\n\t  lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'\n\tfi\n\t;;\n      chorus*)\n\tcase $cc_basename in\n\tcxch68*)\n\t  # Green Hills C++ Compiler\n\t  # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)=\"--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a\"\n\t  ;;\n\tesac\n\t;;\n       darwin*)\n         # PIC is the default on this platform\n         # Common symbols not allowed in MH_DYLIB files\n         case $cc_basename in\n           xlc*)\n           lt_prog_compiler_pic_CXX='-qnocommon'\n           lt_prog_compiler_wl_CXX='-Wl,'\n           ;;\n         esac\n       ;;\n      dgux*)\n\tcase $cc_basename in\n\t  ec++*)\n\t    lt_prog_compiler_pic_CXX='-KPIC'\n\t    ;;\n\t  ghcx*)\n\t    # Green Hills C++ Compiler\n\t    lt_prog_compiler_pic_CXX='-pic'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      freebsd* | kfreebsd*-gnu | dragonfly*)\n\t# FreeBSD uses GNU C++\n\t;;\n      hpux9* | hpux10* | hpux11*)\n\tcase $cc_basename in\n\t  CC*)\n\t    lt_prog_compiler_wl_CXX='-Wl,'\n\t    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'\n\t    if test \"$host_cpu\" != ia64; then\n\t      lt_prog_compiler_pic_CXX='+Z'\n\t    fi\n\t    ;;\n\t  aCC*)\n\t    lt_prog_compiler_wl_CXX='-Wl,'\n\t    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'\n\t    case $host_cpu in\n\t    hppa*64*|ia64*)\n\t      # +Z the default\n\t      ;;\n\t    *)\n\t      lt_prog_compiler_pic_CXX='+Z'\n\t      ;;\n\t    esac\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      interix*)\n\t# This is c89, which is MS Visual C++ (no shared libs)\n\t# Anyone wants to do a port?\n\t;;\n      irix5* | irix6* | nonstopux*)\n\tcase $cc_basename in\n\t  CC*)\n\t    lt_prog_compiler_wl_CXX='-Wl,'\n\t    lt_prog_compiler_static_CXX='-non_shared'\n\t    # CC pic flag -KPIC is the default.\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      linux*)\n\tcase $cc_basename in\n\t  KCC*)\n\t    # KAI C++ Compiler\n\t    lt_prog_compiler_wl_CXX='--backend -Wl,'\n\t    lt_prog_compiler_pic_CXX='-fPIC'\n\t    ;;\n\t  icpc* | ecpc*)\n\t    # Intel C++\n\t    lt_prog_compiler_wl_CXX='-Wl,'\n\t    lt_prog_compiler_pic_CXX='-KPIC'\n\t    lt_prog_compiler_static_CXX='-static'\n\t    ;;\n\t  pgCC*)\n\t    # Portland Group C++ compiler.\n\t    lt_prog_compiler_wl_CXX='-Wl,'\n\t    lt_prog_compiler_pic_CXX='-fpic'\n\t    lt_prog_compiler_static_CXX='-Bstatic'\n\t    ;;\n\t  cxx*)\n\t    # Compaq C++\n\t    # Make sure the PIC flag is empty.  It appears that all Alpha\n\t    # Linux and Compaq Tru64 Unix objects are PIC.\n\t    lt_prog_compiler_pic_CXX=\n\t    lt_prog_compiler_static_CXX='-non_shared'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      lynxos*)\n\t;;\n      m88k*)\n\t;;\n      mvs*)\n\tcase $cc_basename in\n\t  cxx*)\n\t    lt_prog_compiler_pic_CXX='-W c,exportall'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      netbsd*)\n\t;;\n      osf3* | osf4* | osf5*)\n\tcase $cc_basename in\n\t  KCC*)\n\t    lt_prog_compiler_wl_CXX='--backend -Wl,'\n\t    ;;\n\t  RCC*)\n\t    # Rational C++ 2.4.1\n\t    lt_prog_compiler_pic_CXX='-pic'\n\t    ;;\n\t  cxx*)\n\t    # Digital/Compaq C++\n\t    lt_prog_compiler_wl_CXX='-Wl,'\n\t    # Make sure the PIC flag is empty.  It appears that all Alpha\n\t    # Linux and Compaq Tru64 Unix objects are PIC.\n\t    lt_prog_compiler_pic_CXX=\n\t    lt_prog_compiler_static_CXX='-non_shared'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      psos*)\n\t;;\n      solaris*)\n\tcase $cc_basename in\n\t  CC*)\n\t    # Sun C++ 4.2, 5.x and Centerline C++\n\t    lt_prog_compiler_pic_CXX='-KPIC'\n\t    lt_prog_compiler_static_CXX='-Bstatic'\n\t    lt_prog_compiler_wl_CXX='-Qoption ld '\n\t    ;;\n\t  gcx*)\n\t    # Green Hills C++ Compiler\n\t    lt_prog_compiler_pic_CXX='-PIC'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      sunos4*)\n\tcase $cc_basename in\n\t  CC*)\n\t    # Sun C++ 4.x\n\t    lt_prog_compiler_pic_CXX='-pic'\n\t    lt_prog_compiler_static_CXX='-Bstatic'\n\t    ;;\n\t  lcc*)\n\t    # Lucid\n\t    lt_prog_compiler_pic_CXX='-pic'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      tandem*)\n\tcase $cc_basename in\n\t  NCC*)\n\t    # NonStop-UX NCC 3.20\n\t    lt_prog_compiler_pic_CXX='-KPIC'\n\t    ;;\n\t  *)\n\t    ;;\n\tesac\n\t;;\n      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)\n\tcase $cc_basename in\n\t  CC*)\n\t    lt_prog_compiler_wl_CXX='-Wl,'\n\t    lt_prog_compiler_pic_CXX='-KPIC'\n\t    lt_prog_compiler_static_CXX='-Bstatic'\n\t    ;;\n\tesac\n\t;;\n      vxworks*)\n\t;;\n      *)\n\tlt_prog_compiler_can_build_shared_CXX=no\n\t;;\n    esac\n  fi\n\necho \"$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX\" >&5\necho \"${ECHO_T}$lt_prog_compiler_pic_CXX\" >&6\n\n#\n# Check to make sure the PIC flag actually works.\n#\nif test -n \"$lt_prog_compiler_pic_CXX\"; then\n\necho \"$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works\" >&5\necho $ECHO_N \"checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C\" >&6\nif test \"${lt_prog_compiler_pic_works_CXX+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  lt_prog_compiler_pic_works_CXX=no\n  ac_outfile=conftest.$ac_objext\n   printf \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n   lt_compiler_flag=\"$lt_prog_compiler_pic_CXX -DPIC\"\n   # Insert the option either (1) after the last *FLAGS variable, or\n   # (2) before a word containing \"conftest.\", or (3) at the end.\n   # Note that $ac_compile itself does not contain backslashes and begins\n   # with a dollar sign (not a hyphen), so the echo should work correctly.\n   # The option is referenced via a variable to avoid confusing sed.\n   lt_compile=`echo \"$ac_compile\" | $SED \\\n   -e 's:.*FLAGS}\\{0,1\\} :&$lt_compiler_flag :; t' \\\n   -e 's: [^ ]*conftest\\.: $lt_compiler_flag&:; t' \\\n   -e 's:$: $lt_compiler_flag:'`\n   (eval echo \"\\\"\\$as_me:13112: $lt_compile\\\"\" >&5)\n   (eval \"$lt_compile\" 2>conftest.err)\n   ac_status=$?\n   cat conftest.err >&5\n   echo \"$as_me:13116: \\$? = $ac_status\" >&5\n   if (exit $ac_status) && test -s \"$ac_outfile\"; then\n     # The compiler can only warn and ignore the option if not recognized\n     # So say no if there are warnings other than the usual output.\n     $echo \"X$_lt_compiler_boilerplate\" | $Xsed -e '/^$/d' >conftest.exp\n     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2\n     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then\n       lt_prog_compiler_pic_works_CXX=yes\n     fi\n   fi\n   $rm conftest*\n\nfi\necho \"$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX\" >&5\necho \"${ECHO_T}$lt_prog_compiler_pic_works_CXX\" >&6\n\nif test x\"$lt_prog_compiler_pic_works_CXX\" = xyes; then\n    case $lt_prog_compiler_pic_CXX in\n     \"\" | \" \"*) ;;\n     *) lt_prog_compiler_pic_CXX=\" $lt_prog_compiler_pic_CXX\" ;;\n     esac\nelse\n    lt_prog_compiler_pic_CXX=\n     lt_prog_compiler_can_build_shared_CXX=no\nfi\n\nfi\ncase $host_os in\n  # For platforms which do not support PIC, -DPIC is meaningless:\n  *djgpp*)\n    lt_prog_compiler_pic_CXX=\n    ;;\n  *)\n    lt_prog_compiler_pic_CXX=\"$lt_prog_compiler_pic_CXX -DPIC\"\n    ;;\nesac\n\n#\n# Check to make sure the static flag actually works.\n#\nwl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\\\"$lt_prog_compiler_static_CXX\\\"\necho \"$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works\" >&5\necho $ECHO_N \"checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C\" >&6\nif test \"${lt_prog_compiler_static_works_CXX+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  lt_prog_compiler_static_works_CXX=no\n   save_LDFLAGS=\"$LDFLAGS\"\n   LDFLAGS=\"$LDFLAGS $lt_tmp_static_flag\"\n   printf \"$lt_simple_link_test_code\" > conftest.$ac_ext\n   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then\n     # The linker can only warn and ignore the option if not recognized\n     # So say no if there are warnings\n     if test -s conftest.err; then\n       # Append any errors to the config.log.\n       cat conftest.err 1>&5\n       $echo \"X$_lt_linker_boilerplate\" | $Xsed -e '/^$/d' > conftest.exp\n       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2\n       if diff conftest.exp conftest.er2 >/dev/null; then\n         lt_prog_compiler_static_works_CXX=yes\n       fi\n     else\n       lt_prog_compiler_static_works_CXX=yes\n     fi\n   fi\n   $rm conftest*\n   LDFLAGS=\"$save_LDFLAGS\"\n\nfi\necho \"$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX\" >&5\necho \"${ECHO_T}$lt_prog_compiler_static_works_CXX\" >&6\n\nif test x\"$lt_prog_compiler_static_works_CXX\" = xyes; then\n    :\nelse\n    lt_prog_compiler_static_CXX=\nfi\n\n\necho \"$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext\" >&5\necho $ECHO_N \"checking if $compiler supports -c -o file.$ac_objext... $ECHO_C\" >&6\nif test \"${lt_cv_prog_compiler_c_o_CXX+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  lt_cv_prog_compiler_c_o_CXX=no\n   $rm -r conftest 2>/dev/null\n   mkdir conftest\n   cd conftest\n   mkdir out\n   printf \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n\n   lt_compiler_flag=\"-o out/conftest2.$ac_objext\"\n   # Insert the option either (1) after the last *FLAGS variable, or\n   # (2) before a word containing \"conftest.\", or (3) at the end.\n   # Note that $ac_compile itself does not contain backslashes and begins\n   # with a dollar sign (not a hyphen), so the echo should work correctly.\n   lt_compile=`echo \"$ac_compile\" | $SED \\\n   -e 's:.*FLAGS}\\{0,1\\} :&$lt_compiler_flag :; t' \\\n   -e 's: [^ ]*conftest\\.: $lt_compiler_flag&:; t' \\\n   -e 's:$: $lt_compiler_flag:'`\n   (eval echo \"\\\"\\$as_me:13216: $lt_compile\\\"\" >&5)\n   (eval \"$lt_compile\" 2>out/conftest.err)\n   ac_status=$?\n   cat out/conftest.err >&5\n   echo \"$as_me:13220: \\$? = $ac_status\" >&5\n   if (exit $ac_status) && test -s out/conftest2.$ac_objext\n   then\n     # The compiler can only warn and ignore the option if not recognized\n     # So say no if there are warnings\n     $echo \"X$_lt_compiler_boilerplate\" | $Xsed -e '/^$/d' > out/conftest.exp\n     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2\n     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then\n       lt_cv_prog_compiler_c_o_CXX=yes\n     fi\n   fi\n   chmod u+w . 2>&5\n   $rm conftest*\n   # SGI C++ compiler will create directory out/ii_files/ for\n   # template instantiation\n   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files\n   $rm out/* && rmdir out\n   cd ..\n   rmdir conftest\n   $rm conftest*\n\nfi\necho \"$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX\" >&5\necho \"${ECHO_T}$lt_cv_prog_compiler_c_o_CXX\" >&6\n\n\nhard_links=\"nottested\"\nif test \"$lt_cv_prog_compiler_c_o_CXX\" = no && test \"$need_locks\" != no; then\n  # do not overwrite the value of need_locks provided by the user\n  echo \"$as_me:$LINENO: checking if we can lock with hard links\" >&5\necho $ECHO_N \"checking if we can lock with hard links... $ECHO_C\" >&6\n  hard_links=yes\n  $rm conftest*\n  ln conftest.a conftest.b 2>/dev/null && hard_links=no\n  touch conftest.a\n  ln conftest.a conftest.b 2>&5 || hard_links=no\n  ln conftest.a conftest.b 2>/dev/null && hard_links=no\n  echo \"$as_me:$LINENO: result: $hard_links\" >&5\necho \"${ECHO_T}$hard_links\" >&6\n  if test \"$hard_links\" = no; then\n    { echo \"$as_me:$LINENO: WARNING: \\`$CC' does not support \\`-c -o', so \\`make -j' may be unsafe\" >&5\necho \"$as_me: WARNING: \\`$CC' does not support \\`-c -o', so \\`make -j' may be unsafe\" >&2;}\n    need_locks=warn\n  fi\nelse\n  need_locks=no\nfi\n\necho \"$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries\" >&5\necho $ECHO_N \"checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C\" >&6\n\n  export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\\''s/.* //'\\'' | sort | uniq > $export_symbols'\n  case $host_os in\n  aix4* | aix5*)\n    # If we're using GNU nm, then we don't want the \"-C\" option.\n    # -C means demangle to AIX nm, but means don't demangle with GNU nm\n    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then\n      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\\''{ if (((\\$2 == \"T\") || (\\$2 == \"D\") || (\\$2 == \"B\")) && (substr(\\$3,1,1) != \".\")) { print \\$3 } }'\\'' | sort -u > $export_symbols'\n    else\n      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\\''{ if (((\\$2 == \"T\") || (\\$2 == \"D\") || (\\$2 == \"B\")) && (substr(\\$3,1,1) != \".\")) { print \\$3 } }'\\'' | sort -u > $export_symbols'\n    fi\n    ;;\n  pw32*)\n    export_symbols_cmds_CXX=\"$ltdll_cmds\"\n  ;;\n  cygwin* | mingw*)\n    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\\''/^[BCDGRS] /s/.* \\([^ ]*\\)/\\1 DATA/;/^.* __nm__/s/^.* __nm__\\([^ ]*\\) [^ ]*/\\1 DATA/;/^I /d;/^[AITW] /s/.* //'\\'' | sort | uniq > $export_symbols'\n  ;;\n  *)\n    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\\''s/.* //'\\'' | sort | uniq > $export_symbols'\n  ;;\n  esac\n\necho \"$as_me:$LINENO: result: $ld_shlibs_CXX\" >&5\necho \"${ECHO_T}$ld_shlibs_CXX\" >&6\ntest \"$ld_shlibs_CXX\" = no && can_build_shared=no\n\n#\n# Do we need to explicitly link libc?\n#\ncase \"x$archive_cmds_need_lc_CXX\" in\nx|xyes)\n  # Assume -lc should be added\n  archive_cmds_need_lc_CXX=yes\n\n  if test \"$enable_shared\" = yes && test \"$GCC\" = yes; then\n    case $archive_cmds_CXX in\n    *'~'*)\n      # FIXME: we may have to deal with multi-command sequences.\n      ;;\n    '$CC '*)\n      # Test whether the compiler implicitly links with -lc since on some\n      # systems, -lgcc has to come before -lc. If gcc already passes -lc\n      # to ld, don't add -lc before -lgcc.\n      echo \"$as_me:$LINENO: checking whether -lc should be explicitly linked in\" >&5\necho $ECHO_N \"checking whether -lc should be explicitly linked in... $ECHO_C\" >&6\n      $rm conftest*\n      printf \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n\n      if { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } 2>conftest.err; then\n        soname=conftest\n        lib=conftest\n        libobjs=conftest.$ac_objext\n        deplibs=\n        wl=$lt_prog_compiler_wl_CXX\n\tpic_flag=$lt_prog_compiler_pic_CXX\n        compiler_flags=-v\n        linker_flags=-v\n        verstring=\n        output_objdir=.\n        libname=conftest\n        lt_save_allow_undefined_flag=$allow_undefined_flag_CXX\n        allow_undefined_flag_CXX=\n        if { (eval echo \"$as_me:$LINENO: \\\"$archive_cmds_CXX 2\\>\\&1 \\| grep \\\" -lc \\\" \\>/dev/null 2\\>\\&1\\\"\") >&5\n  (eval $archive_cmds_CXX 2\\>\\&1 \\| grep \\\" -lc \\\" \\>/dev/null 2\\>\\&1) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }\n        then\n\t  archive_cmds_need_lc_CXX=no\n        else\n\t  archive_cmds_need_lc_CXX=yes\n        fi\n        allow_undefined_flag_CXX=$lt_save_allow_undefined_flag\n      else\n        cat conftest.err 1>&5\n      fi\n      $rm conftest*\n      echo \"$as_me:$LINENO: result: $archive_cmds_need_lc_CXX\" >&5\necho \"${ECHO_T}$archive_cmds_need_lc_CXX\" >&6\n      ;;\n    esac\n  fi\n  ;;\nesac\n\necho \"$as_me:$LINENO: checking dynamic linker characteristics\" >&5\necho $ECHO_N \"checking dynamic linker characteristics... $ECHO_C\" >&6\nlibrary_names_spec=\nlibname_spec='lib$name'\nsoname_spec=\nshrext_cmds=\".so\"\npostinstall_cmds=\npostuninstall_cmds=\nfinish_cmds=\nfinish_eval=\nshlibpath_var=\nshlibpath_overrides_runpath=unknown\nversion_type=none\ndynamic_linker=\"$host_os ld.so\"\nsys_lib_dlsearch_path_spec=\"/lib /usr/lib\"\nif test \"$GCC\" = yes; then\n  sys_lib_search_path_spec=`$CC -print-search-dirs | grep \"^libraries:\" | $SED -e \"s/^libraries://\" -e \"s,=/,/,g\"`\n  if echo \"$sys_lib_search_path_spec\" | grep ';' >/dev/null ; then\n    # if the path contains \";\" then we assume it to be the separator\n    # otherwise default to the standard path separator (i.e. \":\") - it is\n    # assumed that no part of a normal pathname contains \";\" but that should\n    # okay in the real world where \";\" in dirpaths is itself problematic.\n    sys_lib_search_path_spec=`echo \"$sys_lib_search_path_spec\" | $SED -e 's/;/ /g'`\n  else\n    sys_lib_search_path_spec=`echo \"$sys_lib_search_path_spec\" | $SED  -e \"s/$PATH_SEPARATOR/ /g\"`\n  fi\nelse\n  sys_lib_search_path_spec=\"/lib /usr/lib /usr/local/lib\"\nfi\nneed_lib_prefix=unknown\nhardcode_into_libs=no\n\n# when you set need_version to no, make sure it does not cause -set_version\n# flags to be left without arguments\nneed_version=unknown\n\ncase $host_os in\naix3*)\n  version_type=linux\n  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'\n  shlibpath_var=LIBPATH\n\n  # AIX 3 has no versioning support, so we append a major version to the name.\n  soname_spec='${libname}${release}${shared_ext}$major'\n  ;;\n\naix4* | aix5*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  hardcode_into_libs=yes\n  if test \"$host_cpu\" = ia64; then\n    # AIX 5 supports IA64\n    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'\n    shlibpath_var=LD_LIBRARY_PATH\n  else\n    # With GCC up to 2.95.x, collect2 would create an import file\n    # for dependence libraries.  The import file would start with\n    # the line `#! .'.  This would cause the generated library to\n    # depend on `.', always an invalid library.  This was fixed in\n    # development snapshots of GCC prior to 3.0.\n    case $host_os in\n      aix4 | aix4.[01] | aix4.[01].*)\n      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'\n\t   echo ' yes '\n\t   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then\n\t:\n      else\n\tcan_build_shared=no\n      fi\n      ;;\n    esac\n    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct\n    # soname into executable. Probably we can add versioning support to\n    # collect2, so additional links can be useful in future.\n    if test \"$aix_use_runtimelinking\" = yes; then\n      # If using run time linking (on AIX 4.2 or later) use lib<name>.so\n      # instead of lib<name>.a to let people know that these are not\n      # typical AIX shared libraries.\n      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    else\n      # We preserve .a as extension for shared libraries through AIX4.2\n      # and later when we are not doing run time linking.\n      library_names_spec='${libname}${release}.a $libname.a'\n      soname_spec='${libname}${release}${shared_ext}$major'\n    fi\n    shlibpath_var=LIBPATH\n  fi\n  ;;\n\namigaos*)\n  library_names_spec='$libname.ixlibrary $libname.a'\n  # Create ${libname}_ixlibrary.a entries in /sys/libs.\n  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo \"X$lib\" | $Xsed -e '\\''s%^.*/\\([^/]*\\)\\.ixlibrary$%\\1%'\\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show \"cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a\"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'\n  ;;\n\nbeos*)\n  library_names_spec='${libname}${shared_ext}'\n  dynamic_linker=\"$host_os ld.so\"\n  shlibpath_var=LIBRARY_PATH\n  ;;\n\nbsdi[45]*)\n  version_type=linux\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  sys_lib_search_path_spec=\"/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib\"\n  sys_lib_dlsearch_path_spec=\"/shlib /usr/lib /usr/local/lib\"\n  # the default ld.so.conf also contains /usr/contrib/lib and\n  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow\n  # libtool to hard-code these into programs\n  ;;\n\ncygwin* | mingw* | pw32*)\n  version_type=windows\n  shrext_cmds=\".dll\"\n  need_version=no\n  need_lib_prefix=no\n\n  case $GCC,$host_os in\n  yes,cygwin* | yes,mingw* | yes,pw32*)\n    library_names_spec='$libname.dll.a'\n    # DLL is installed to $(libdir)/../bin by postinstall_cmds\n    postinstall_cmds='base_file=`basename \\${file}`~\n      dlpath=`$SHELL 2>&1 -c '\\''. $dir/'\\''\\${base_file}'\\''i;echo \\$dlname'\\''`~\n      dldir=$destdir/`dirname \\$dlpath`~\n      test -d \\$dldir || mkdir -p \\$dldir~\n      $install_prog $dir/$dlname \\$dldir/$dlname~\n      chmod a+x \\$dldir/$dlname'\n    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\\''. $file; echo \\$dlname'\\''`~\n      dlpath=$dir/\\$dldll~\n       $rm \\$dlpath'\n    shlibpath_overrides_runpath=yes\n\n    case $host_os in\n    cygwin*)\n      # Cygwin DLLs use 'cyg' prefix rather than 'lib'\n      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'\n      sys_lib_search_path_spec=\"/usr/lib /lib/w32api /lib /usr/local/lib\"\n      ;;\n    mingw*)\n      # MinGW DLLs use traditional 'lib' prefix\n      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'\n      sys_lib_search_path_spec=`$CC -print-search-dirs | grep \"^libraries:\" | $SED -e \"s/^libraries://\" -e \"s,=/,/,g\"`\n      if echo \"$sys_lib_search_path_spec\" | grep ';[c-zC-Z]:/' >/dev/null; then\n        # It is most probably a Windows format PATH printed by\n        # mingw gcc, but we are running on Cygwin. Gcc prints its search\n        # path with ; separators, and with drive letters. We can handle the\n        # drive letters (cygwin fileutils understands them), so leave them,\n        # especially as we might pass files found there to a mingw objdump,\n        # which wouldn't understand a cygwinified path. Ahh.\n        sys_lib_search_path_spec=`echo \"$sys_lib_search_path_spec\" | $SED -e 's/;/ /g'`\n      else\n        sys_lib_search_path_spec=`echo \"$sys_lib_search_path_spec\" | $SED  -e \"s/$PATH_SEPARATOR/ /g\"`\n      fi\n      ;;\n    pw32*)\n      # pw32 DLLs use 'pw' prefix rather than 'lib'\n      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'\n      ;;\n    esac\n    ;;\n\n  *)\n    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'\n    ;;\n  esac\n  dynamic_linker='Win32 ld.exe'\n  # FIXME: first we should search . and the directory the executable is in\n  shlibpath_var=PATH\n  ;;\n\ndarwin* | rhapsody*)\n  dynamic_linker=\"$host_os dyld\"\n  version_type=darwin\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'\n  soname_spec='${libname}${release}${major}$shared_ext'\n  shlibpath_overrides_runpath=yes\n  shlibpath_var=DYLD_LIBRARY_PATH\n  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'\n  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.\n  if test \"$GCC\" = yes; then\n    sys_lib_search_path_spec=`$CC -print-search-dirs | tr \"\\n\" \"$PATH_SEPARATOR\" | sed -e 's/libraries:/@libraries:/' | tr \"@\" \"\\n\" | grep \"^libraries:\" | sed -e \"s/^libraries://\" -e \"s,=/,/,g\" -e \"s,$PATH_SEPARATOR, ,g\" -e \"s,.*,& /lib /usr/lib /usr/local/lib,g\"`\n  else\n    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'\n  fi\n  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'\n  ;;\n\ndgux*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  ;;\n\nfreebsd1*)\n  dynamic_linker=no\n  ;;\n\nkfreebsd*-gnu)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  dynamic_linker='GNU ld.so'\n  ;;\n\nfreebsd* | dragonfly*)\n  # DragonFly does not have aout.  When/if they implement a new\n  # versioning mechanism, adjust this.\n  if test -x /usr/bin/objformat; then\n    objformat=`/usr/bin/objformat`\n  else\n    case $host_os in\n    freebsd[123]*) objformat=aout ;;\n    *) objformat=elf ;;\n    esac\n  fi\n  version_type=freebsd-$objformat\n  case $version_type in\n    freebsd-elf*)\n      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'\n      need_version=no\n      need_lib_prefix=no\n      ;;\n    freebsd-*)\n      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'\n      need_version=yes\n      ;;\n  esac\n  shlibpath_var=LD_LIBRARY_PATH\n  case $host_os in\n  freebsd2*)\n    shlibpath_overrides_runpath=yes\n    ;;\n  freebsd3.[01]* | freebsdelf3.[01]*)\n    shlibpath_overrides_runpath=yes\n    hardcode_into_libs=yes\n    ;;\n  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \\\n  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)\n    shlibpath_overrides_runpath=no\n    hardcode_into_libs=yes\n    ;;\n  freebsd*) # from 4.6 on\n    shlibpath_overrides_runpath=yes\n    hardcode_into_libs=yes\n    ;;\n  esac\n  ;;\n\ngnu*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  hardcode_into_libs=yes\n  ;;\n\nhpux9* | hpux10* | hpux11*)\n  # Give a soname corresponding to the major version so that dld.sl refuses to\n  # link against other versions.\n  version_type=sunos\n  need_lib_prefix=no\n  need_version=no\n  case $host_cpu in\n  ia64*)\n    shrext_cmds='.so'\n    hardcode_into_libs=yes\n    dynamic_linker=\"$host_os dld.so\"\n    shlibpath_var=LD_LIBRARY_PATH\n    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    if test \"X$HPUX_IA64_MODE\" = X32; then\n      sys_lib_search_path_spec=\"/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib\"\n    else\n      sys_lib_search_path_spec=\"/usr/lib/hpux64 /usr/local/lib/hpux64\"\n    fi\n    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec\n    ;;\n   hppa*64*)\n     shrext_cmds='.sl'\n     hardcode_into_libs=yes\n     dynamic_linker=\"$host_os dld.sl\"\n     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH\n     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.\n     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n     soname_spec='${libname}${release}${shared_ext}$major'\n     sys_lib_search_path_spec=\"/usr/lib/pa20_64 /usr/ccs/lib/pa20_64\"\n     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec\n     ;;\n   *)\n    shrext_cmds='.sl'\n    dynamic_linker=\"$host_os dld.sl\"\n    shlibpath_var=SHLIB_PATH\n    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    ;;\n  esac\n  # HP-UX runs *really* slowly unless shared libraries are mode 555.\n  postinstall_cmds='chmod 555 $lib'\n  ;;\n\ninterix3*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  ;;\n\nirix5* | irix6* | nonstopux*)\n  case $host_os in\n    nonstopux*) version_type=nonstopux ;;\n    *)\n\tif test \"$lt_cv_prog_gnu_ld\" = yes; then\n\t\tversion_type=linux\n\telse\n\t\tversion_type=irix\n\tfi ;;\n  esac\n  need_lib_prefix=no\n  need_version=no\n  soname_spec='${libname}${release}${shared_ext}$major'\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'\n  case $host_os in\n  irix5* | nonstopux*)\n    libsuff= shlibsuff=\n    ;;\n  *)\n    case $LD in # libtool.m4 will add one of these switches to LD\n    *-32|*\"-32 \"|*-melf32bsmip|*\"-melf32bsmip \")\n      libsuff= shlibsuff= libmagic=32-bit;;\n    *-n32|*\"-n32 \"|*-melf32bmipn32|*\"-melf32bmipn32 \")\n      libsuff=32 shlibsuff=N32 libmagic=N32;;\n    *-64|*\"-64 \"|*-melf64bmip|*\"-melf64bmip \")\n      libsuff=64 shlibsuff=64 libmagic=64-bit;;\n    *) libsuff= shlibsuff= libmagic=never-match;;\n    esac\n    ;;\n  esac\n  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH\n  shlibpath_overrides_runpath=no\n  sys_lib_search_path_spec=\"/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}\"\n  sys_lib_dlsearch_path_spec=\"/usr/lib${libsuff} /lib${libsuff}\"\n  hardcode_into_libs=yes\n  ;;\n\n# No shared lib support for Linux oldld, aout, or coff.\nlinux*oldld* | linux*aout* | linux*coff*)\n  dynamic_linker=no\n  ;;\n\n# This must be Linux ELF.\nlinux*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -n $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  # This implies no fast_install, which is unacceptable.\n  # Some rework will be needed to allow for fast_install\n  # before this can be enabled.\n  hardcode_into_libs=yes\n\n  # find out which ABI we are using\n  libsuff=\n  case \"$host_cpu\" in\n  x86_64*|s390x*|powerpc64*)\n    echo '#line 13752 \"configure\"' > conftest.$ac_ext\n    if { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; then\n      case `/usr/bin/file conftest.$ac_objext` in\n      *64-bit*)\n        libsuff=64\n        sys_lib_search_path_spec=\"/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}\"\n        ;;\n      esac\n    fi\n    rm -rf conftest*\n    ;;\n  esac\n\n  # Append ld.so.conf contents to the search path\n  if test -f /etc/ld.so.conf; then\n    lt_ld_extra=`awk '/^include / { system(sprintf(\"cd /etc; cat %s 2>/dev/null\", \\$2)); skip = 1; } { if (!skip) print \\$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\\n' ' '`\n    sys_lib_dlsearch_path_spec=\"/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra\"\n  fi\n\n  # We used to test for /lib/ld.so.1 and disable shared libraries on\n  # powerpc, because MkLinux only supported shared libraries with the\n  # GNU dynamic linker.  Since this was broken with cross compilers,\n  # most powerpc-linux boxes support dynamic linking these days and\n  # people can always --disable-shared, the test was removed, and we\n  # assume the GNU/Linux dynamic linker is in use.\n  dynamic_linker='GNU/Linux ld.so'\n  ;;\n\nknetbsd*-gnu)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  dynamic_linker='GNU ld.so'\n  ;;\n\nnetbsd*)\n  version_type=sunos\n  need_lib_prefix=no\n  need_version=no\n  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n    finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -m $libdir'\n    dynamic_linker='NetBSD (a.out) ld.so'\n  else\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    dynamic_linker='NetBSD ld.elf_so'\n  fi\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  hardcode_into_libs=yes\n  ;;\n\nnewsos6)\n  version_type=linux\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  ;;\n\nnto-qnx*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  ;;\n\nopenbsd*)\n  version_type=sunos\n  sys_lib_dlsearch_path_spec=\"/usr/lib\"\n  need_lib_prefix=no\n  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.\n  case $host_os in\n    openbsd3.3 | openbsd3.3.*) need_version=yes ;;\n    *)                         need_version=no  ;;\n  esac\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -m $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  if test -z \"`echo __ELF__ | $CC -E - | grep __ELF__`\" || test \"$host_os-$host_cpu\" = \"openbsd2.8-powerpc\"; then\n    case $host_os in\n      openbsd2.[89] | openbsd2.[89].*)\n\tshlibpath_overrides_runpath=no\n\t;;\n      *)\n\tshlibpath_overrides_runpath=yes\n\t;;\n      esac\n  else\n    shlibpath_overrides_runpath=yes\n  fi\n  ;;\n\nos2*)\n  libname_spec='$name'\n  shrext_cmds=\".dll\"\n  need_lib_prefix=no\n  library_names_spec='$libname${shared_ext} $libname.a'\n  dynamic_linker='OS/2 ld.exe'\n  shlibpath_var=LIBPATH\n  ;;\n\nosf3* | osf4* | osf5*)\n  version_type=osf\n  need_lib_prefix=no\n  need_version=no\n  soname_spec='${libname}${release}${shared_ext}$major'\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  shlibpath_var=LD_LIBRARY_PATH\n  sys_lib_search_path_spec=\"/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib\"\n  sys_lib_dlsearch_path_spec=\"$sys_lib_search_path_spec\"\n  ;;\n\nsolaris*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  hardcode_into_libs=yes\n  # ldd complains unless libraries are executable\n  postinstall_cmds='chmod +x $lib'\n  ;;\n\nsunos4*)\n  version_type=sunos\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n  finish_cmds='PATH=\"\\$PATH:/usr/etc\" ldconfig $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  if test \"$with_gnu_ld\" = yes; then\n    need_lib_prefix=no\n  fi\n  need_version=yes\n  ;;\n\nsysv4 | sysv4.3*)\n  version_type=linux\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  case $host_vendor in\n    sni)\n      shlibpath_overrides_runpath=no\n      need_lib_prefix=no\n      export_dynamic_flag_spec='${wl}-Blargedynsym'\n      runpath_var=LD_RUN_PATH\n      ;;\n    siemens)\n      need_lib_prefix=no\n      ;;\n    motorola)\n      need_lib_prefix=no\n      need_version=no\n      shlibpath_overrides_runpath=no\n      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'\n      ;;\n  esac\n  ;;\n\nsysv4*MP*)\n  if test -d /usr/nec ;then\n    version_type=linux\n    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'\n    soname_spec='$libname${shared_ext}.$major'\n    shlibpath_var=LD_LIBRARY_PATH\n  fi\n  ;;\n\nsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)\n  version_type=freebsd-elf\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  hardcode_into_libs=yes\n  if test \"$with_gnu_ld\" = yes; then\n    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'\n    shlibpath_overrides_runpath=no\n  else\n    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'\n    shlibpath_overrides_runpath=yes\n    case $host_os in\n      sco3.2v5*)\n        sys_lib_search_path_spec=\"$sys_lib_search_path_spec /lib\"\n\t;;\n    esac\n  fi\n  sys_lib_dlsearch_path_spec='/usr/lib'\n  ;;\n\nuts4*)\n  version_type=linux\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  ;;\n\n*)\n  dynamic_linker=no\n  ;;\nesac\necho \"$as_me:$LINENO: result: $dynamic_linker\" >&5\necho \"${ECHO_T}$dynamic_linker\" >&6\ntest \"$dynamic_linker\" = no && can_build_shared=no\n\nvariables_saved_for_relink=\"PATH $shlibpath_var $runpath_var\"\nif test \"$GCC\" = yes; then\n  variables_saved_for_relink=\"$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH\"\nfi\n\necho \"$as_me:$LINENO: checking how to hardcode library paths into programs\" >&5\necho $ECHO_N \"checking how to hardcode library paths into programs... $ECHO_C\" >&6\nhardcode_action_CXX=\nif test -n \"$hardcode_libdir_flag_spec_CXX\" || \\\n   test -n \"$runpath_var_CXX\" || \\\n   test \"X$hardcode_automatic_CXX\" = \"Xyes\" ; then\n\n  # We can hardcode non-existant directories.\n  if test \"$hardcode_direct_CXX\" != no &&\n     # If the only mechanism to avoid hardcoding is shlibpath_var, we\n     # have to relink, otherwise we might link with an installed library\n     # when we should be linking with a yet-to-be-installed one\n     ## test \"$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)\" != no &&\n     test \"$hardcode_minus_L_CXX\" != no; then\n    # Linking always hardcodes the temporary library directory.\n    hardcode_action_CXX=relink\n  else\n    # We can link without hardcoding, and we can hardcode nonexisting dirs.\n    hardcode_action_CXX=immediate\n  fi\nelse\n  # We cannot hardcode anything, or else we can only hardcode existing\n  # directories.\n  hardcode_action_CXX=unsupported\nfi\necho \"$as_me:$LINENO: result: $hardcode_action_CXX\" >&5\necho \"${ECHO_T}$hardcode_action_CXX\" >&6\n\nif test \"$hardcode_action_CXX\" = relink; then\n  # Fast installation is not supported\n  enable_fast_install=no\nelif test \"$shlibpath_overrides_runpath\" = yes ||\n     test \"$enable_shared\" = no; then\n  # Fast installation is not necessary\n  enable_fast_install=needless\nfi\n\n\n# The else clause should only fire when bootstrapping the\n# libtool distribution, otherwise you forgot to ship ltmain.sh\n# with your package, and you will get complaints that there are\n# no rules to generate ltmain.sh.\nif test -f \"$ltmain\"; then\n  # See if we are running on zsh, and set the options which allow our commands through\n  # without removal of \\ escapes.\n  if test -n \"${ZSH_VERSION+set}\" ; then\n    setopt NO_GLOB_SUBST\n  fi\n  # Now quote all the things that may contain metacharacters while being\n  # careful not to overquote the AC_SUBSTed values.  We take copies of the\n  # variables and quote the copies for generation of the libtool script.\n  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \\\n    SED SHELL STRIP \\\n    libname_spec library_names_spec soname_spec extract_expsyms_cmds \\\n    old_striplib striplib file_magic_cmd finish_cmds finish_eval \\\n    deplibs_check_method reload_flag reload_cmds need_locks \\\n    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \\\n    lt_cv_sys_global_symbol_to_c_name_address \\\n    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \\\n    old_postinstall_cmds old_postuninstall_cmds \\\n    compiler_CXX \\\n    CC_CXX \\\n    LD_CXX \\\n    lt_prog_compiler_wl_CXX \\\n    lt_prog_compiler_pic_CXX \\\n    lt_prog_compiler_static_CXX \\\n    lt_prog_compiler_no_builtin_flag_CXX \\\n    export_dynamic_flag_spec_CXX \\\n    thread_safe_flag_spec_CXX \\\n    whole_archive_flag_spec_CXX \\\n    enable_shared_with_static_runtimes_CXX \\\n    old_archive_cmds_CXX \\\n    old_archive_from_new_cmds_CXX \\\n    predep_objects_CXX \\\n    postdep_objects_CXX \\\n    predeps_CXX \\\n    postdeps_CXX \\\n    compiler_lib_search_path_CXX \\\n    archive_cmds_CXX \\\n    archive_expsym_cmds_CXX \\\n    postinstall_cmds_CXX \\\n    postuninstall_cmds_CXX \\\n    old_archive_from_expsyms_cmds_CXX \\\n    allow_undefined_flag_CXX \\\n    no_undefined_flag_CXX \\\n    export_symbols_cmds_CXX \\\n    hardcode_libdir_flag_spec_CXX \\\n    hardcode_libdir_flag_spec_ld_CXX \\\n    hardcode_libdir_separator_CXX \\\n    hardcode_automatic_CXX \\\n    module_cmds_CXX \\\n    module_expsym_cmds_CXX \\\n    lt_cv_prog_compiler_c_o_CXX \\\n    exclude_expsyms_CXX \\\n    include_expsyms_CXX; do\n\n    case $var in\n    old_archive_cmds_CXX | \\\n    old_archive_from_new_cmds_CXX | \\\n    archive_cmds_CXX | \\\n    archive_expsym_cmds_CXX | \\\n    module_cmds_CXX | \\\n    module_expsym_cmds_CXX | \\\n    old_archive_from_expsyms_cmds_CXX | \\\n    export_symbols_cmds_CXX | \\\n    extract_expsyms_cmds | reload_cmds | finish_cmds | \\\n    postinstall_cmds | postuninstall_cmds | \\\n    old_postinstall_cmds | old_postuninstall_cmds | \\\n    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)\n      # Double-quote double-evaled strings.\n      eval \"lt_$var=\\\\\\\"\\`\\$echo \\\"X\\$$var\\\" | \\$Xsed -e \\\"\\$double_quote_subst\\\" -e \\\"\\$sed_quote_subst\\\" -e \\\"\\$delay_variable_subst\\\"\\`\\\\\\\"\"\n      ;;\n    *)\n      eval \"lt_$var=\\\\\\\"\\`\\$echo \\\"X\\$$var\\\" | \\$Xsed -e \\\"\\$sed_quote_subst\\\"\\`\\\\\\\"\"\n      ;;\n    esac\n  done\n\n  case $lt_echo in\n  *'\\$0 --fallback-echo\"')\n    lt_echo=`$echo \"X$lt_echo\" | $Xsed -e 's/\\\\\\\\\\\\\\$0 --fallback-echo\"$/$0 --fallback-echo\"/'`\n    ;;\n  esac\n\ncfgfile=\"$ofile\"\n\n  cat <<__EOF__ >> \"$cfgfile\"\n# ### BEGIN LIBTOOL TAG CONFIG: $tagname\n\n# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:\n\n# Shell to use when invoking shell scripts.\nSHELL=$lt_SHELL\n\n# Whether or not to build shared libraries.\nbuild_libtool_libs=$enable_shared\n\n# Whether or not to build static libraries.\nbuild_old_libs=$enable_static\n\n# Whether or not to add -lc for building shared libraries.\nbuild_libtool_need_lc=$archive_cmds_need_lc_CXX\n\n# Whether or not to disallow shared libs when runtime libs are static\nallow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX\n\n# Whether or not to optimize for fast installation.\nfast_install=$enable_fast_install\n\n# The host system.\nhost_alias=$host_alias\nhost=$host\nhost_os=$host_os\n\n# The build system.\nbuild_alias=$build_alias\nbuild=$build\nbuild_os=$build_os\n\n# An echo program that does not interpret backslashes.\necho=$lt_echo\n\n# The archiver.\nAR=$lt_AR\nAR_FLAGS=$lt_AR_FLAGS\n\n# A C compiler.\nLTCC=$lt_LTCC\n\n# LTCC compiler flags.\nLTCFLAGS=$lt_LTCFLAGS\n\n# A language-specific compiler.\nCC=$lt_compiler_CXX\n\n# Is the compiler the GNU C compiler?\nwith_gcc=$GCC_CXX\n\ngcc_dir=\\`gcc -print-file-name=. | $SED 's,/\\.$,,'\\`\ngcc_ver=\\`gcc -dumpversion\\`\n\n# An ERE matcher.\nEGREP=$lt_EGREP\n\n# The linker used to build libraries.\nLD=$lt_LD_CXX\n\n# Whether we need hard or soft links.\nLN_S=$lt_LN_S\n\n# A BSD-compatible nm program.\nNM=$lt_NM\n\n# A symbol stripping program\nSTRIP=$lt_STRIP\n\n# Used to examine libraries when file_magic_cmd begins \"file\"\nMAGIC_CMD=$MAGIC_CMD\n\n# Used on cygwin: DLL creation program.\nDLLTOOL=\"$DLLTOOL\"\n\n# Used on cygwin: object dumper.\nOBJDUMP=\"$OBJDUMP\"\n\n# Used on cygwin: assembler.\nAS=\"$AS\"\n\n# The name of the directory that contains temporary libtool files.\nobjdir=$objdir\n\n# How to create reloadable object files.\nreload_flag=$lt_reload_flag\nreload_cmds=$lt_reload_cmds\n\n# How to pass a linker flag through the compiler.\nwl=$lt_lt_prog_compiler_wl_CXX\n\n# Object file suffix (normally \"o\").\nobjext=\"$ac_objext\"\n\n# Old archive suffix (normally \"a\").\nlibext=\"$libext\"\n\n# Shared library suffix (normally \".so\").\nshrext_cmds='$shrext_cmds'\n\n# Executable file suffix (normally \"\").\nexeext=\"$exeext\"\n\n# Additional compiler flags for building library objects.\npic_flag=$lt_lt_prog_compiler_pic_CXX\npic_mode=$pic_mode\n\n# What is the maximum length of a command?\nmax_cmd_len=$lt_cv_sys_max_cmd_len\n\n# Does compiler simultaneously support -c and -o options?\ncompiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX\n\n# Must we lock files when doing compilation?\nneed_locks=$lt_need_locks\n\n# Do we need the lib prefix for modules?\nneed_lib_prefix=$need_lib_prefix\n\n# Do we need a version for libraries?\nneed_version=$need_version\n\n# Whether dlopen is supported.\ndlopen_support=$enable_dlopen\n\n# Whether dlopen of programs is supported.\ndlopen_self=$enable_dlopen_self\n\n# Whether dlopen of statically linked programs is supported.\ndlopen_self_static=$enable_dlopen_self_static\n\n# Compiler flag to prevent dynamic linking.\nlink_static_flag=$lt_lt_prog_compiler_static_CXX\n\n# Compiler flag to turn off builtin functions.\nno_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX\n\n# Compiler flag to allow reflexive dlopens.\nexport_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX\n\n# Compiler flag to generate shared objects directly from archives.\nwhole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX\n\n# Compiler flag to generate thread-safe objects.\nthread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX\n\n# Library versioning type.\nversion_type=$version_type\n\n# Format of library name prefix.\nlibname_spec=$lt_libname_spec\n\n# List of archive names.  First name is the real one, the rest are links.\n# The last name is the one that the linker finds with -lNAME.\nlibrary_names_spec=$lt_library_names_spec\n\n# The coded name of the library, if different from the real name.\nsoname_spec=$lt_soname_spec\n\n# Commands used to build and install an old-style archive.\nRANLIB=$lt_RANLIB\nold_archive_cmds=$lt_old_archive_cmds_CXX\nold_postinstall_cmds=$lt_old_postinstall_cmds\nold_postuninstall_cmds=$lt_old_postuninstall_cmds\n\n# Create an old-style archive from a shared archive.\nold_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX\n\n# Create a temporary old-style archive to link instead of a shared archive.\nold_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX\n\n# Commands used to build and install a shared archive.\narchive_cmds=$lt_archive_cmds_CXX\narchive_expsym_cmds=$lt_archive_expsym_cmds_CXX\npostinstall_cmds=$lt_postinstall_cmds\npostuninstall_cmds=$lt_postuninstall_cmds\n\n# Commands used to build a loadable module (assumed same as above if empty)\nmodule_cmds=$lt_module_cmds_CXX\nmodule_expsym_cmds=$lt_module_expsym_cmds_CXX\n\n# Commands to strip libraries.\nold_striplib=$lt_old_striplib\nstriplib=$lt_striplib\n\n# Dependencies to place before the objects being linked to create a\n# shared library.\npredep_objects=\\`echo $lt_predep_objects_CXX | \\$SED -e \"s@\\${gcc_dir}@\\\\\\${gcc_dir}@g;s@\\${gcc_ver}@\\\\\\${gcc_ver}@g\"\\`\n\n# Dependencies to place after the objects being linked to create a\n# shared library.\npostdep_objects=\\`echo $lt_postdep_objects_CXX | \\$SED -e \"s@\\${gcc_dir}@\\\\\\${gcc_dir}@g;s@\\${gcc_ver}@\\\\\\${gcc_ver}@g\"\\`\n\n# Dependencies to place before the objects being linked to create a\n# shared library.\npredeps=$lt_predeps_CXX\n\n# Dependencies to place after the objects being linked to create a\n# shared library.\npostdeps=$lt_postdeps_CXX\n\n# The library search path used internally by the compiler when linking\n# a shared library.\ncompiler_lib_search_path=\\`echo $lt_compiler_lib_search_path_CXX | \\$SED -e \"s@\\${gcc_dir}@\\\\\\${gcc_dir}@g;s@\\${gcc_ver}@\\\\\\${gcc_ver}@g\"\\`\n\n# Method to check whether dependent libraries are shared objects.\ndeplibs_check_method=$lt_deplibs_check_method\n\n# Command to use when deplibs_check_method == file_magic.\nfile_magic_cmd=$lt_file_magic_cmd\n\n# Flag that allows shared libraries with undefined symbols to be built.\nallow_undefined_flag=$lt_allow_undefined_flag_CXX\n\n# Flag that forces no undefined symbols.\nno_undefined_flag=$lt_no_undefined_flag_CXX\n\n# Commands used to finish a libtool library installation in a directory.\nfinish_cmds=$lt_finish_cmds\n\n# Same as above, but a single script fragment to be evaled but not shown.\nfinish_eval=$lt_finish_eval\n\n# Take the output of nm and produce a listing of raw symbols and C names.\nglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe\n\n# Transform the output of nm in a proper C declaration\nglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl\n\n# Transform the output of nm in a C name address pair\nglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address\n\n# This is the shared library runtime path variable.\nrunpath_var=$runpath_var\n\n# This is the shared library path variable.\nshlibpath_var=$shlibpath_var\n\n# Is shlibpath searched before the hard-coded library search path?\nshlibpath_overrides_runpath=$shlibpath_overrides_runpath\n\n# How to hardcode a shared library path into an executable.\nhardcode_action=$hardcode_action_CXX\n\n# Whether we should hardcode library paths into libraries.\nhardcode_into_libs=$hardcode_into_libs\n\n# Flag to hardcode \\$libdir into a binary during linking.\n# This must work even if \\$libdir does not exist.\nhardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX\n\n# If ld is used when linking, flag to hardcode \\$libdir into\n# a binary during linking. This must work even if \\$libdir does\n# not exist.\nhardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX\n\n# Whether we need a single -rpath flag with a separated argument.\nhardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX\n\n# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the\n# resulting binary.\nhardcode_direct=$hardcode_direct_CXX\n\n# Set to yes if using the -LDIR flag during linking hardcodes DIR into the\n# resulting binary.\nhardcode_minus_L=$hardcode_minus_L_CXX\n\n# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into\n# the resulting binary.\nhardcode_shlibpath_var=$hardcode_shlibpath_var_CXX\n\n# Set to yes if building a shared library automatically hardcodes DIR into the library\n# and all subsequent libraries and executables linked against it.\nhardcode_automatic=$hardcode_automatic_CXX\n\n# Variables whose values should be saved in libtool wrapper scripts and\n# restored at relink time.\nvariables_saved_for_relink=\"$variables_saved_for_relink\"\n\n# Whether libtool must link a program against all its dependency libraries.\nlink_all_deplibs=$link_all_deplibs_CXX\n\n# Compile-time system search path for libraries\nsys_lib_search_path_spec=\\`echo $lt_sys_lib_search_path_spec | \\$SED -e \"s@\\${gcc_dir}@\\\\\\${gcc_dir}@g;s@\\${gcc_ver}@\\\\\\${gcc_ver}@g\"\\`\n\n# Run-time system search path for libraries\nsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec\n\n# Fix the shell variable \\$srcfile for the compiler.\nfix_srcfile_path=\"$fix_srcfile_path_CXX\"\n\n# Set to yes if exported symbols are required.\nalways_export_symbols=$always_export_symbols_CXX\n\n# The commands to list exported symbols.\nexport_symbols_cmds=$lt_export_symbols_cmds_CXX\n\n# The commands to extract the exported symbol list from a shared archive.\nextract_expsyms_cmds=$lt_extract_expsyms_cmds\n\n# Symbols that should not be listed in the preloaded symbols.\nexclude_expsyms=$lt_exclude_expsyms_CXX\n\n# Symbols that must always be exported.\ninclude_expsyms=$lt_include_expsyms_CXX\n\n# ### END LIBTOOL TAG CONFIG: $tagname\n\n__EOF__\n\n\nelse\n  # If there is no Makefile yet, we rely on a make rule to execute\n  # `config.status --recheck' to rerun these tests and create the\n  # libtool script then.\n  ltmain_in=`echo $ltmain | sed -e 's/\\.sh$/.in/'`\n  if test -f \"$ltmain_in\"; then\n    test -f Makefile && make \"$ltmain\"\n  fi\nfi\n\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\nCC=$lt_save_CC\nLDCXX=$LD\nLD=$lt_save_LD\nGCC=$lt_save_GCC\nwith_gnu_ldcxx=$with_gnu_ld\nwith_gnu_ld=$lt_save_with_gnu_ld\nlt_cv_path_LDCXX=$lt_cv_path_LD\nlt_cv_path_LD=$lt_save_path_LD\nlt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld\nlt_cv_prog_gnu_ld=$lt_save_with_gnu_ld\n\n\telse\n\t  tagname=\"\"\n\tfi\n\t;;\n\n      F77)\n\tif test -n \"$F77\" && test \"X$F77\" != \"Xno\"; then\n\nac_ext=f\nac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'\nac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_f77_compiler_gnu\n\n\narchive_cmds_need_lc_F77=no\nallow_undefined_flag_F77=\nalways_export_symbols_F77=no\narchive_expsym_cmds_F77=\nexport_dynamic_flag_spec_F77=\nhardcode_direct_F77=no\nhardcode_libdir_flag_spec_F77=\nhardcode_libdir_flag_spec_ld_F77=\nhardcode_libdir_separator_F77=\nhardcode_minus_L_F77=no\nhardcode_automatic_F77=no\nmodule_cmds_F77=\nmodule_expsym_cmds_F77=\nlink_all_deplibs_F77=unknown\nold_archive_cmds_F77=$old_archive_cmds\nno_undefined_flag_F77=\nwhole_archive_flag_spec_F77=\nenable_shared_with_static_runtimes_F77=no\n\n# Source file extension for f77 test sources.\nac_ext=f\n\n# Object file extension for compiled f77 test sources.\nobjext=o\nobjext_F77=$objext\n\n# Code to be used in simple compile tests\nlt_simple_compile_test_code=\"      subroutine t\\n      return\\n      end\\n\"\n\n# Code to be used in simple link tests\nlt_simple_link_test_code=\"      program t\\n      end\\n\"\n\n# ltmain only uses $CC for tagged configurations so make sure $CC is set.\n\n# If no C compiler was specified, use CC.\nLTCC=${LTCC-\"$CC\"}\n\n# If no C compiler flags were specified, use CFLAGS.\nLTCFLAGS=${LTCFLAGS-\"$CFLAGS\"}\n\n# Allow CC to be a program name with arguments.\ncompiler=$CC\n\n\n# save warnings/boilerplate of simple test code\nac_outfile=conftest.$ac_objext\nprintf \"$lt_simple_compile_test_code\" >conftest.$ac_ext\neval \"$ac_compile\" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err\n_lt_compiler_boilerplate=`cat conftest.err`\n$rm conftest*\n\nac_outfile=conftest.$ac_objext\nprintf \"$lt_simple_link_test_code\" >conftest.$ac_ext\neval \"$ac_link\" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err\n_lt_linker_boilerplate=`cat conftest.err`\n$rm conftest*\n\n\n# Allow CC to be a program name with arguments.\nlt_save_CC=\"$CC\"\nCC=${F77-\"f77\"}\ncompiler=$CC\ncompiler_F77=$CC\nfor cc_temp in $compiler\"\"; do\n  case $cc_temp in\n    compile | *[\\\\/]compile | ccache | *[\\\\/]ccache ) ;;\n    distcc | *[\\\\/]distcc | purify | *[\\\\/]purify ) ;;\n    \\-*) ;;\n    *) break;;\n  esac\ndone\ncc_basename=`$echo \"X$cc_temp\" | $Xsed -e 's%.*/%%' -e \"s%^$host_alias-%%\"`\n\n\necho \"$as_me:$LINENO: checking if libtool supports shared libraries\" >&5\necho $ECHO_N \"checking if libtool supports shared libraries... $ECHO_C\" >&6\necho \"$as_me:$LINENO: result: $can_build_shared\" >&5\necho \"${ECHO_T}$can_build_shared\" >&6\n\necho \"$as_me:$LINENO: checking whether to build shared libraries\" >&5\necho $ECHO_N \"checking whether to build shared libraries... $ECHO_C\" >&6\ntest \"$can_build_shared\" = \"no\" && enable_shared=no\n\n# On AIX, shared libraries and static libraries use the same namespace, and\n# are all built from PIC.\ncase $host_os in\naix3*)\n  test \"$enable_shared\" = yes && enable_static=no\n  if test -n \"$RANLIB\"; then\n    archive_cmds=\"$archive_cmds~\\$RANLIB \\$lib\"\n    postinstall_cmds='$RANLIB $lib'\n  fi\n  ;;\naix4* | aix5*)\n  if test \"$host_cpu\" != ia64 && test \"$aix_use_runtimelinking\" = no ; then\n    test \"$enable_shared\" = yes && enable_static=no\n  fi\n  ;;\nesac\necho \"$as_me:$LINENO: result: $enable_shared\" >&5\necho \"${ECHO_T}$enable_shared\" >&6\n\necho \"$as_me:$LINENO: checking whether to build static libraries\" >&5\necho $ECHO_N \"checking whether to build static libraries... $ECHO_C\" >&6\n# Make sure either enable_shared or enable_static is yes.\ntest \"$enable_shared\" = yes || enable_static=yes\necho \"$as_me:$LINENO: result: $enable_static\" >&5\necho \"${ECHO_T}$enable_static\" >&6\n\nGCC_F77=\"$G77\"\nLD_F77=\"$LD\"\n\nlt_prog_compiler_wl_F77=\nlt_prog_compiler_pic_F77=\nlt_prog_compiler_static_F77=\n\necho \"$as_me:$LINENO: checking for $compiler option to produce PIC\" >&5\necho $ECHO_N \"checking for $compiler option to produce PIC... $ECHO_C\" >&6\n\n  if test \"$GCC\" = yes; then\n    lt_prog_compiler_wl_F77='-Wl,'\n    lt_prog_compiler_static_F77='-static'\n\n    case $host_os in\n      aix*)\n      # All AIX code is PIC.\n      if test \"$host_cpu\" = ia64; then\n\t# AIX 5 now supports IA64 processor\n\tlt_prog_compiler_static_F77='-Bstatic'\n      fi\n      ;;\n\n    amigaos*)\n      # FIXME: we need at least 68020 code to build shared libraries, but\n      # adding the `-m68020' flag to GCC prevents building anything better,\n      # like `-m68040'.\n      lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4'\n      ;;\n\n    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)\n      # PIC is the default for these OSes.\n      ;;\n\n    mingw* | pw32* | os2*)\n      # This hack is so that the source file can tell whether it is being\n      # built for inclusion in a dll (and should export symbols for example).\n      lt_prog_compiler_pic_F77='-DDLL_EXPORT'\n      ;;\n\n    darwin* | rhapsody*)\n      # PIC is the default on this platform\n      # Common symbols not allowed in MH_DYLIB files\n      lt_prog_compiler_pic_F77='-fno-common'\n      ;;\n\n    interix3*)\n      # Interix 3.x gcc -fpic/-fPIC options generate broken code.\n      # Instead, we relocate shared libraries at runtime.\n      ;;\n\n    msdosdjgpp*)\n      # Just because we use GCC doesn't mean we suddenly get shared libraries\n      # on systems that don't support them.\n      lt_prog_compiler_can_build_shared_F77=no\n      enable_shared=no\n      ;;\n\n    sysv4*MP*)\n      if test -d /usr/nec; then\n\tlt_prog_compiler_pic_F77=-Kconform_pic\n      fi\n      ;;\n\n    hpux*)\n      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but\n      # not for PA HP-UX.\n      case $host_cpu in\n      hppa*64*|ia64*)\n\t# +Z the default\n\t;;\n      *)\n\tlt_prog_compiler_pic_F77='-fPIC'\n\t;;\n      esac\n      ;;\n\n    *)\n      lt_prog_compiler_pic_F77='-fPIC'\n      ;;\n    esac\n  else\n    # PORTME Check for flag to pass linker flags through the system compiler.\n    case $host_os in\n    aix*)\n      lt_prog_compiler_wl_F77='-Wl,'\n      if test \"$host_cpu\" = ia64; then\n\t# AIX 5 now supports IA64 processor\n\tlt_prog_compiler_static_F77='-Bstatic'\n      else\n\tlt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp'\n      fi\n      ;;\n      darwin*)\n        # PIC is the default on this platform\n        # Common symbols not allowed in MH_DYLIB files\n       case $cc_basename in\n         xlc*)\n         lt_prog_compiler_pic_F77='-qnocommon'\n         lt_prog_compiler_wl_F77='-Wl,'\n         ;;\n       esac\n       ;;\n\n    mingw* | pw32* | os2*)\n      # This hack is so that the source file can tell whether it is being\n      # built for inclusion in a dll (and should export symbols for example).\n      lt_prog_compiler_pic_F77='-DDLL_EXPORT'\n      ;;\n\n    hpux9* | hpux10* | hpux11*)\n      lt_prog_compiler_wl_F77='-Wl,'\n      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but\n      # not for PA HP-UX.\n      case $host_cpu in\n      hppa*64*|ia64*)\n\t# +Z the default\n\t;;\n      *)\n\tlt_prog_compiler_pic_F77='+Z'\n\t;;\n      esac\n      # Is there a better lt_prog_compiler_static that works with the bundled CC?\n      lt_prog_compiler_static_F77='${wl}-a ${wl}archive'\n      ;;\n\n    irix5* | irix6* | nonstopux*)\n      lt_prog_compiler_wl_F77='-Wl,'\n      # PIC (with -KPIC) is the default.\n      lt_prog_compiler_static_F77='-non_shared'\n      ;;\n\n    newsos6)\n      lt_prog_compiler_pic_F77='-KPIC'\n      lt_prog_compiler_static_F77='-Bstatic'\n      ;;\n\n    linux*)\n      case $cc_basename in\n      icc* | ecc*)\n\tlt_prog_compiler_wl_F77='-Wl,'\n\tlt_prog_compiler_pic_F77='-KPIC'\n\tlt_prog_compiler_static_F77='-static'\n        ;;\n      pgcc* | pgf77* | pgf90* | pgf95*)\n        # Portland Group compilers (*not* the Pentium gcc compiler,\n\t# which looks to be a dead project)\n\tlt_prog_compiler_wl_F77='-Wl,'\n\tlt_prog_compiler_pic_F77='-fpic'\n\tlt_prog_compiler_static_F77='-Bstatic'\n        ;;\n      ccc*)\n        lt_prog_compiler_wl_F77='-Wl,'\n        # All Alpha code is PIC.\n        lt_prog_compiler_static_F77='-non_shared'\n        ;;\n      esac\n      ;;\n\n    osf3* | osf4* | osf5*)\n      lt_prog_compiler_wl_F77='-Wl,'\n      # All OSF/1 code is PIC.\n      lt_prog_compiler_static_F77='-non_shared'\n      ;;\n\n    solaris*)\n      lt_prog_compiler_pic_F77='-KPIC'\n      lt_prog_compiler_static_F77='-Bstatic'\n      case $cc_basename in\n      f77* | f90* | f95*)\n\tlt_prog_compiler_wl_F77='-Qoption ld ';;\n      *)\n\tlt_prog_compiler_wl_F77='-Wl,';;\n      esac\n      ;;\n\n    sunos4*)\n      lt_prog_compiler_wl_F77='-Qoption ld '\n      lt_prog_compiler_pic_F77='-PIC'\n      lt_prog_compiler_static_F77='-Bstatic'\n      ;;\n\n    sysv4 | sysv4.2uw2* | sysv4.3*)\n      lt_prog_compiler_wl_F77='-Wl,'\n      lt_prog_compiler_pic_F77='-KPIC'\n      lt_prog_compiler_static_F77='-Bstatic'\n      ;;\n\n    sysv4*MP*)\n      if test -d /usr/nec ;then\n\tlt_prog_compiler_pic_F77='-Kconform_pic'\n\tlt_prog_compiler_static_F77='-Bstatic'\n      fi\n      ;;\n\n    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)\n      lt_prog_compiler_wl_F77='-Wl,'\n      lt_prog_compiler_pic_F77='-KPIC'\n      lt_prog_compiler_static_F77='-Bstatic'\n      ;;\n\n    unicos*)\n      lt_prog_compiler_wl_F77='-Wl,'\n      lt_prog_compiler_can_build_shared_F77=no\n      ;;\n\n    uts4*)\n      lt_prog_compiler_pic_F77='-pic'\n      lt_prog_compiler_static_F77='-Bstatic'\n      ;;\n\n    *)\n      lt_prog_compiler_can_build_shared_F77=no\n      ;;\n    esac\n  fi\n\necho \"$as_me:$LINENO: result: $lt_prog_compiler_pic_F77\" >&5\necho \"${ECHO_T}$lt_prog_compiler_pic_F77\" >&6\n\n#\n# Check to make sure the PIC flag actually works.\n#\nif test -n \"$lt_prog_compiler_pic_F77\"; then\n\necho \"$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works\" >&5\necho $ECHO_N \"checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C\" >&6\nif test \"${lt_prog_compiler_pic_works_F77+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  lt_prog_compiler_pic_works_F77=no\n  ac_outfile=conftest.$ac_objext\n   printf \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n   lt_compiler_flag=\"$lt_prog_compiler_pic_F77\"\n   # Insert the option either (1) after the last *FLAGS variable, or\n   # (2) before a word containing \"conftest.\", or (3) at the end.\n   # Note that $ac_compile itself does not contain backslashes and begins\n   # with a dollar sign (not a hyphen), so the echo should work correctly.\n   # The option is referenced via a variable to avoid confusing sed.\n   lt_compile=`echo \"$ac_compile\" | $SED \\\n   -e 's:.*FLAGS}\\{0,1\\} :&$lt_compiler_flag :; t' \\\n   -e 's: [^ ]*conftest\\.: $lt_compiler_flag&:; t' \\\n   -e 's:$: $lt_compiler_flag:'`\n   (eval echo \"\\\"\\$as_me:14810: $lt_compile\\\"\" >&5)\n   (eval \"$lt_compile\" 2>conftest.err)\n   ac_status=$?\n   cat conftest.err >&5\n   echo \"$as_me:14814: \\$? = $ac_status\" >&5\n   if (exit $ac_status) && test -s \"$ac_outfile\"; then\n     # The compiler can only warn and ignore the option if not recognized\n     # So say no if there are warnings other than the usual output.\n     $echo \"X$_lt_compiler_boilerplate\" | $Xsed -e '/^$/d' >conftest.exp\n     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2\n     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then\n       lt_prog_compiler_pic_works_F77=yes\n     fi\n   fi\n   $rm conftest*\n\nfi\necho \"$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77\" >&5\necho \"${ECHO_T}$lt_prog_compiler_pic_works_F77\" >&6\n\nif test x\"$lt_prog_compiler_pic_works_F77\" = xyes; then\n    case $lt_prog_compiler_pic_F77 in\n     \"\" | \" \"*) ;;\n     *) lt_prog_compiler_pic_F77=\" $lt_prog_compiler_pic_F77\" ;;\n     esac\nelse\n    lt_prog_compiler_pic_F77=\n     lt_prog_compiler_can_build_shared_F77=no\nfi\n\nfi\ncase $host_os in\n  # For platforms which do not support PIC, -DPIC is meaningless:\n  *djgpp*)\n    lt_prog_compiler_pic_F77=\n    ;;\n  *)\n    lt_prog_compiler_pic_F77=\"$lt_prog_compiler_pic_F77\"\n    ;;\nesac\n\n#\n# Check to make sure the static flag actually works.\n#\nwl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\\\"$lt_prog_compiler_static_F77\\\"\necho \"$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works\" >&5\necho $ECHO_N \"checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C\" >&6\nif test \"${lt_prog_compiler_static_works_F77+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  lt_prog_compiler_static_works_F77=no\n   save_LDFLAGS=\"$LDFLAGS\"\n   LDFLAGS=\"$LDFLAGS $lt_tmp_static_flag\"\n   printf \"$lt_simple_link_test_code\" > conftest.$ac_ext\n   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then\n     # The linker can only warn and ignore the option if not recognized\n     # So say no if there are warnings\n     if test -s conftest.err; then\n       # Append any errors to the config.log.\n       cat conftest.err 1>&5\n       $echo \"X$_lt_linker_boilerplate\" | $Xsed -e '/^$/d' > conftest.exp\n       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2\n       if diff conftest.exp conftest.er2 >/dev/null; then\n         lt_prog_compiler_static_works_F77=yes\n       fi\n     else\n       lt_prog_compiler_static_works_F77=yes\n     fi\n   fi\n   $rm conftest*\n   LDFLAGS=\"$save_LDFLAGS\"\n\nfi\necho \"$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77\" >&5\necho \"${ECHO_T}$lt_prog_compiler_static_works_F77\" >&6\n\nif test x\"$lt_prog_compiler_static_works_F77\" = xyes; then\n    :\nelse\n    lt_prog_compiler_static_F77=\nfi\n\n\necho \"$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext\" >&5\necho $ECHO_N \"checking if $compiler supports -c -o file.$ac_objext... $ECHO_C\" >&6\nif test \"${lt_cv_prog_compiler_c_o_F77+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  lt_cv_prog_compiler_c_o_F77=no\n   $rm -r conftest 2>/dev/null\n   mkdir conftest\n   cd conftest\n   mkdir out\n   printf \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n\n   lt_compiler_flag=\"-o out/conftest2.$ac_objext\"\n   # Insert the option either (1) after the last *FLAGS variable, or\n   # (2) before a word containing \"conftest.\", or (3) at the end.\n   # Note that $ac_compile itself does not contain backslashes and begins\n   # with a dollar sign (not a hyphen), so the echo should work correctly.\n   lt_compile=`echo \"$ac_compile\" | $SED \\\n   -e 's:.*FLAGS}\\{0,1\\} :&$lt_compiler_flag :; t' \\\n   -e 's: [^ ]*conftest\\.: $lt_compiler_flag&:; t' \\\n   -e 's:$: $lt_compiler_flag:'`\n   (eval echo \"\\\"\\$as_me:14914: $lt_compile\\\"\" >&5)\n   (eval \"$lt_compile\" 2>out/conftest.err)\n   ac_status=$?\n   cat out/conftest.err >&5\n   echo \"$as_me:14918: \\$? = $ac_status\" >&5\n   if (exit $ac_status) && test -s out/conftest2.$ac_objext\n   then\n     # The compiler can only warn and ignore the option if not recognized\n     # So say no if there are warnings\n     $echo \"X$_lt_compiler_boilerplate\" | $Xsed -e '/^$/d' > out/conftest.exp\n     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2\n     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then\n       lt_cv_prog_compiler_c_o_F77=yes\n     fi\n   fi\n   chmod u+w . 2>&5\n   $rm conftest*\n   # SGI C++ compiler will create directory out/ii_files/ for\n   # template instantiation\n   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files\n   $rm out/* && rmdir out\n   cd ..\n   rmdir conftest\n   $rm conftest*\n\nfi\necho \"$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77\" >&5\necho \"${ECHO_T}$lt_cv_prog_compiler_c_o_F77\" >&6\n\n\nhard_links=\"nottested\"\nif test \"$lt_cv_prog_compiler_c_o_F77\" = no && test \"$need_locks\" != no; then\n  # do not overwrite the value of need_locks provided by the user\n  echo \"$as_me:$LINENO: checking if we can lock with hard links\" >&5\necho $ECHO_N \"checking if we can lock with hard links... $ECHO_C\" >&6\n  hard_links=yes\n  $rm conftest*\n  ln conftest.a conftest.b 2>/dev/null && hard_links=no\n  touch conftest.a\n  ln conftest.a conftest.b 2>&5 || hard_links=no\n  ln conftest.a conftest.b 2>/dev/null && hard_links=no\n  echo \"$as_me:$LINENO: result: $hard_links\" >&5\necho \"${ECHO_T}$hard_links\" >&6\n  if test \"$hard_links\" = no; then\n    { echo \"$as_me:$LINENO: WARNING: \\`$CC' does not support \\`-c -o', so \\`make -j' may be unsafe\" >&5\necho \"$as_me: WARNING: \\`$CC' does not support \\`-c -o', so \\`make -j' may be unsafe\" >&2;}\n    need_locks=warn\n  fi\nelse\n  need_locks=no\nfi\n\necho \"$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries\" >&5\necho $ECHO_N \"checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C\" >&6\n\n  runpath_var=\n  allow_undefined_flag_F77=\n  enable_shared_with_static_runtimes_F77=no\n  archive_cmds_F77=\n  archive_expsym_cmds_F77=\n  old_archive_From_new_cmds_F77=\n  old_archive_from_expsyms_cmds_F77=\n  export_dynamic_flag_spec_F77=\n  whole_archive_flag_spec_F77=\n  thread_safe_flag_spec_F77=\n  hardcode_libdir_flag_spec_F77=\n  hardcode_libdir_flag_spec_ld_F77=\n  hardcode_libdir_separator_F77=\n  hardcode_direct_F77=no\n  hardcode_minus_L_F77=no\n  hardcode_shlibpath_var_F77=unsupported\n  link_all_deplibs_F77=unknown\n  hardcode_automatic_F77=no\n  module_cmds_F77=\n  module_expsym_cmds_F77=\n  always_export_symbols_F77=no\n  export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\\''s/.* //'\\'' | sort | uniq > $export_symbols'\n  # include_expsyms should be a list of space-separated symbols to be *always*\n  # included in the symbol list\n  include_expsyms_F77=\n  # exclude_expsyms can be an extended regexp of symbols to exclude\n  # it will be wrapped by ` (' and `)$', so one must not match beginning or\n  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',\n  # as well as any symbol that contains `d'.\n  exclude_expsyms_F77=\"_GLOBAL_OFFSET_TABLE_\"\n  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out\n  # platforms (ab)use it in PIC code, but their linkers get confused if\n  # the symbol is explicitly referenced.  Since portable code cannot\n  # rely on this symbol name, it's probably fine to never include it in\n  # preloaded symbol tables.\n  extract_expsyms_cmds=\n  # Just being paranoid about ensuring that cc_basename is set.\n  for cc_temp in $compiler\"\"; do\n  case $cc_temp in\n    compile | *[\\\\/]compile | ccache | *[\\\\/]ccache ) ;;\n    distcc | *[\\\\/]distcc | purify | *[\\\\/]purify ) ;;\n    \\-*) ;;\n    *) break;;\n  esac\ndone\ncc_basename=`$echo \"X$cc_temp\" | $Xsed -e 's%.*/%%' -e \"s%^$host_alias-%%\"`\n\n  case $host_os in\n  cygwin* | mingw* | pw32*)\n    # FIXME: the MSVC++ port hasn't been tested in a loooong time\n    # When not using gcc, we currently assume that we are using\n    # Microsoft Visual C++.\n    if test \"$GCC\" != yes; then\n      with_gnu_ld=no\n    fi\n    ;;\n  interix*)\n    # we just hope/assume this is gcc and not c89 (= MSVC++)\n    with_gnu_ld=yes\n    ;;\n  openbsd*)\n    with_gnu_ld=no\n    ;;\n  esac\n\n  ld_shlibs_F77=yes\n  if test \"$with_gnu_ld\" = yes; then\n    # If archive_cmds runs LD, not CC, wlarc should be empty\n    wlarc='${wl}'\n\n    # Set some defaults for GNU ld with shared library support. These\n    # are reset later if shared libraries are not supported. Putting them\n    # here allows them to be overridden if necessary.\n    runpath_var=LD_RUN_PATH\n    hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir'\n    export_dynamic_flag_spec_F77='${wl}--export-dynamic'\n    # ancient GNU ld didn't support --whole-archive et. al.\n    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then\n\twhole_archive_flag_spec_F77=\"$wlarc\"'--whole-archive$convenience '\"$wlarc\"'--no-whole-archive'\n      else\n  \twhole_archive_flag_spec_F77=\n    fi\n    supports_anon_versioning=no\n    case `$LD -v 2>/dev/null` in\n      *\\ [01].* | *\\ 2.[0-9].* | *\\ 2.10.*) ;; # catch versions < 2.11\n      *\\ 2.11.93.0.2\\ *) supports_anon_versioning=yes ;; # RH7.3 ...\n      *\\ 2.11.92.0.12\\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...\n      *\\ 2.11.*) ;; # other 2.11 versions\n      *) supports_anon_versioning=yes ;;\n    esac\n\n    # See if GNU ld supports shared libraries.\n    case $host_os in\n    aix3* | aix4* | aix5*)\n      # On AIX/PPC, the GNU linker is very broken\n      if test \"$host_cpu\" != ia64; then\n\tld_shlibs_F77=no\n\tcat <<EOF 1>&2\n\n*** Warning: the GNU linker, at least up to release 2.9.1, is reported\n*** to be unable to reliably create shared libraries on AIX.\n*** Therefore, libtool is disabling shared libraries support.  If you\n*** really care for shared libraries, you may want to modify your PATH\n*** so that a non-GNU linker is found, and then restart.\n\nEOF\n      fi\n      ;;\n\n    amigaos*)\n      archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo \"#define NAME $libname\" > $output_objdir/a2ixlibrary.data~$echo \"#define LIBRARY_ID 1\" >> $output_objdir/a2ixlibrary.data~$echo \"#define VERSION $major\" >> $output_objdir/a2ixlibrary.data~$echo \"#define REVISION $revision\" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'\n      hardcode_libdir_flag_spec_F77='-L$libdir'\n      hardcode_minus_L_F77=yes\n\n      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports\n      # that the semantics of dynamic libraries on AmigaOS, at least up\n      # to version 4, is to share data among multiple programs linked\n      # with the same dynamic library.  Since this doesn't match the\n      # behavior of shared libraries on other platforms, we can't use\n      # them.\n      ld_shlibs_F77=no\n      ;;\n\n    beos*)\n      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then\n\tallow_undefined_flag_F77=unsupported\n\t# Joseph Beckenbach <jrb3@best.com> says some releases of gcc\n\t# support --undefined.  This deserves some investigation.  FIXME\n\tarchive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n      else\n\tld_shlibs_F77=no\n      fi\n      ;;\n\n    cygwin* | mingw* | pw32*)\n      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless,\n      # as there is no search path for DLLs.\n      hardcode_libdir_flag_spec_F77='-L$libdir'\n      allow_undefined_flag_F77=unsupported\n      always_export_symbols_F77=no\n      enable_shared_with_static_runtimes_F77=yes\n      export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\\''/^[BCDGRS] /s/.* \\([^ ]*\\)/\\1 DATA/'\\'' | $SED -e '\\''/^[AITW] /s/.* //'\\'' | sort | uniq > $export_symbols'\n\n      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then\n        archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'\n\t# If the export-symbols file already is a .def file (1st line\n\t# is EXPORTS), use it as is; otherwise, prepend...\n\tarchive_expsym_cmds_F77='if test \"x`$SED 1q $export_symbols`\" = xEXPORTS; then\n\t  cp $export_symbols $output_objdir/$soname.def;\n\telse\n\t  echo EXPORTS > $output_objdir/$soname.def;\n\t  cat $export_symbols >> $output_objdir/$soname.def;\n\tfi~\n\t$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'\n      else\n\tld_shlibs_F77=no\n      fi\n      ;;\n\n    interix3*)\n      hardcode_direct_F77=no\n      hardcode_shlibpath_var_F77=no\n      hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'\n      export_dynamic_flag_spec_F77='${wl}-E'\n      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.\n      # Instead, shared libraries are loaded at an image base (0x10000000 by\n      # default) and relocated if they conflict, which is a slow very memory\n      # consuming and fragmenting process.  To avoid this, we pick a random,\n      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link\n      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.\n      archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \\* 262144 + 1342177280` -o $lib'\n      archive_expsym_cmds_F77='sed \"s,^,_,\" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \\* 262144 + 1342177280` -o $lib'\n      ;;\n\n    linux*)\n      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then\n\ttmp_addflag=\n\tcase $cc_basename,$host_cpu in\n\tpgcc*)\t\t\t\t# Portland Group C compiler\n\t  whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\\\"\\\"; do test  -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience,$conv\\\"; done; $echo \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n\t  tmp_addflag=' $pic_flag'\n\t  ;;\n\tpgf77* | pgf90* | pgf95*)\t# Portland Group f77 and f90 compilers\n\t  whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\\\"\\\"; do test  -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience,$conv\\\"; done; $echo \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n\t  tmp_addflag=' $pic_flag -Mnomain' ;;\n\tecc*,ia64* | icc*,ia64*)\t\t# Intel C compiler on ia64\n\t  tmp_addflag=' -i_dynamic' ;;\n\tefc*,ia64* | ifort*,ia64*)\t# Intel Fortran compiler on ia64\n\t  tmp_addflag=' -i_dynamic -nofor_main' ;;\n\tifc* | ifort*)\t\t\t# Intel Fortran compiler\n\t  tmp_addflag=' -nofor_main' ;;\n\tesac\n\tarchive_cmds_F77='$CC -shared'\"$tmp_addflag\"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\n\tif test $supports_anon_versioning = yes; then\n\t  archive_expsym_cmds_F77='$echo \"{ global:\" > $output_objdir/$libname.ver~\n  cat $export_symbols | sed -e \"s/\\(.*\\)/\\1;/\" >> $output_objdir/$libname.ver~\n  $echo \"local: *; };\" >> $output_objdir/$libname.ver~\n\t  $CC -shared'\"$tmp_addflag\"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'\n\tfi\n      else\n\tld_shlibs_F77=no\n      fi\n      ;;\n\n    netbsd*)\n      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then\n\tarchive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'\n\twlarc=\n      else\n\tarchive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\tarchive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n      fi\n      ;;\n\n    solaris*)\n      if $LD -v 2>&1 | grep 'BFD 2\\.8' > /dev/null; then\n\tld_shlibs_F77=no\n\tcat <<EOF 1>&2\n\n*** Warning: The releases 2.8.* of the GNU linker cannot reliably\n*** create shared libraries on Solaris systems.  Therefore, libtool\n*** is disabling shared libraries support.  We urge you to upgrade GNU\n*** binutils to release 2.9.1 or newer.  Another option is to modify\n*** your PATH or compiler configuration so that the native linker is\n*** used, and then restart.\n\nEOF\n      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then\n\tarchive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\tarchive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n      else\n\tld_shlibs_F77=no\n      fi\n      ;;\n\n    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)\n      case `$LD -v 2>&1` in\n        *\\ [01].* | *\\ 2.[0-9].* | *\\ 2.1[0-5].*)\n\tld_shlibs_F77=no\n\tcat <<_LT_EOF 1>&2\n\n*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not\n*** reliably create shared libraries on SCO systems.  Therefore, libtool\n*** is disabling shared libraries support.  We urge you to upgrade GNU\n*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify\n*** your PATH or compiler configuration so that the native linker is\n*** used, and then restart.\n\n_LT_EOF\n\t;;\n\t*)\n\t  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then\n\t    hardcode_libdir_flag_spec_F77='`test -z \"$SCOABSPATH\" && echo ${wl}-rpath,$libdir`'\n\t    archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'\n\t    archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'\n\t  else\n\t    ld_shlibs_F77=no\n\t  fi\n\t;;\n      esac\n      ;;\n\n    sunos4*)\n      archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'\n      wlarc=\n      hardcode_direct_F77=yes\n      hardcode_shlibpath_var_F77=no\n      ;;\n\n    *)\n      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then\n\tarchive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\tarchive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n      else\n\tld_shlibs_F77=no\n      fi\n      ;;\n    esac\n\n    if test \"$ld_shlibs_F77\" = no; then\n      runpath_var=\n      hardcode_libdir_flag_spec_F77=\n      export_dynamic_flag_spec_F77=\n      whole_archive_flag_spec_F77=\n    fi\n  else\n    # PORTME fill in a description of your system's linker (not GNU ld)\n    case $host_os in\n    aix3*)\n      allow_undefined_flag_F77=unsupported\n      always_export_symbols_F77=yes\n      archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'\n      # Note: this linker hardcodes the directories in LIBPATH if there\n      # are no directories specified by -L.\n      hardcode_minus_L_F77=yes\n      if test \"$GCC\" = yes && test -z \"$lt_prog_compiler_static\"; then\n\t# Neither direct hardcoding nor static linking is supported with a\n\t# broken collect2.\n\thardcode_direct_F77=unsupported\n      fi\n      ;;\n\n    aix4* | aix5*)\n      if test \"$host_cpu\" = ia64; then\n\t# On IA64, the linker does run time linking by default, so we don't\n\t# have to do anything special.\n\taix_use_runtimelinking=no\n\texp_sym_flag='-Bexport'\n\tno_entry_flag=\"\"\n      else\n\t# If we're using GNU nm, then we don't want the \"-C\" option.\n\t# -C means demangle to AIX nm, but means don't demangle with GNU nm\n\tif $NM -V 2>&1 | grep 'GNU' > /dev/null; then\n\t  export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\\''{ if (((\\$2 == \"T\") || (\\$2 == \"D\") || (\\$2 == \"B\")) && (substr(\\$3,1,1) != \".\")) { print \\$3 } }'\\'' | sort -u > $export_symbols'\n\telse\n\t  export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\\''{ if (((\\$2 == \"T\") || (\\$2 == \"D\") || (\\$2 == \"B\")) && (substr(\\$3,1,1) != \".\")) { print \\$3 } }'\\'' | sort -u > $export_symbols'\n\tfi\n\taix_use_runtimelinking=no\n\n\t# Test if we are trying to use run time linking or normal\n\t# AIX style linking. If -brtl is somewhere in LDFLAGS, we\n\t# need to do runtime linking.\n\tcase $host_os in aix4.[23]|aix4.[23].*|aix5*)\n\t  for ld_flag in $LDFLAGS; do\n  \t  if (test $ld_flag = \"-brtl\" || test $ld_flag = \"-Wl,-brtl\"); then\n  \t    aix_use_runtimelinking=yes\n  \t    break\n  \t  fi\n\t  done\n\t  ;;\n\tesac\n\n\texp_sym_flag='-bexport'\n\tno_entry_flag='-bnoentry'\n      fi\n\n      # When large executables or shared objects are built, AIX ld can\n      # have problems creating the table of contents.  If linking a library\n      # or program results in \"error TOC overflow\" add -mminimal-toc to\n      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not\n      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.\n\n      archive_cmds_F77=''\n      hardcode_direct_F77=yes\n      hardcode_libdir_separator_F77=':'\n      link_all_deplibs_F77=yes\n\n      if test \"$GCC\" = yes; then\n\tcase $host_os in aix4.[012]|aix4.[012].*)\n\t# We only want to do this on AIX 4.2 and lower, the check\n\t# below for broken collect2 doesn't work under 4.3+\n\t  collect2name=`${CC} -print-prog-name=collect2`\n\t  if test -f \"$collect2name\" && \\\n  \t   strings \"$collect2name\" | grep resolve_lib_name >/dev/null\n\t  then\n  \t  # We have reworked collect2\n  \t  hardcode_direct_F77=yes\n\t  else\n  \t  # We have old collect2\n  \t  hardcode_direct_F77=unsupported\n  \t  # It fails to find uninstalled libraries when the uninstalled\n  \t  # path is not listed in the libpath.  Setting hardcode_minus_L\n  \t  # to unsupported forces relinking\n  \t  hardcode_minus_L_F77=yes\n  \t  hardcode_libdir_flag_spec_F77='-L$libdir'\n  \t  hardcode_libdir_separator_F77=\n\t  fi\n\t  ;;\n\tesac\n\tshared_flag='-shared'\n\tif test \"$aix_use_runtimelinking\" = yes; then\n\t  shared_flag=\"$shared_flag \"'${wl}-G'\n\tfi\n      else\n\t# not using gcc\n\tif test \"$host_cpu\" = ia64; then\n  \t# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release\n  \t# chokes on -Wl,-G. The following line is correct:\n\t  shared_flag='-G'\n\telse\n\t  if test \"$aix_use_runtimelinking\" = yes; then\n\t    shared_flag='${wl}-G'\n\t  else\n\t    shared_flag='${wl}-bM:SRE'\n\t  fi\n\tfi\n      fi\n\n      # It seems that -bexpall does not export symbols beginning with\n      # underscore (_), so it is better to generate a list of symbols to export.\n      always_export_symbols_F77=yes\n      if test \"$aix_use_runtimelinking\" = yes; then\n\t# Warning - without using the other runtime loading flags (-brtl),\n\t# -berok will link without error, but may produce a broken library.\n\tallow_undefined_flag_F77='-berok'\n       # Determine the default libpath from the value encoded in an empty executable.\n       cat >conftest.$ac_ext <<_ACEOF\n      program main\n\n      end\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_f77_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n\naix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\\(.*\\)$/\\1/; p; }\n}'`\n# Check for a 64-bit object if we didn't find anything.\nif test -z \"$aix_libpath\"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\\(.*\\)$/\\1/; p; }\n}'`; fi\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nif test -z \"$aix_libpath\"; then aix_libpath=\"/usr/lib:/lib\"; fi\n\n       hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'\"$aix_libpath\"\n\tarchive_expsym_cmds_F77=\"\\$CC\"' -o $output_objdir/$soname $libobjs $deplibs '\"\\${wl}$no_entry_flag\"' $compiler_flags `if test \"x${allow_undefined_flag}\" != \"x\"; then echo \"${wl}${allow_undefined_flag}\"; else :; fi` '\"\\${wl}$exp_sym_flag:\\$export_symbols $shared_flag\"\n       else\n\tif test \"$host_cpu\" = ia64; then\n\t  hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib'\n\t  allow_undefined_flag_F77=\"-z nodefs\"\n\t  archive_expsym_cmds_F77=\"\\$CC $shared_flag\"' -o $output_objdir/$soname $libobjs $deplibs '\"\\${wl}$no_entry_flag\"' $compiler_flags ${wl}${allow_undefined_flag} '\"\\${wl}$exp_sym_flag:\\$export_symbols\"\n\telse\n\t # Determine the default libpath from the value encoded in an empty executable.\n\t cat >conftest.$ac_ext <<_ACEOF\n      program main\n\n      end\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_f77_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n\naix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\\(.*\\)$/\\1/; p; }\n}'`\n# Check for a 64-bit object if we didn't find anything.\nif test -z \"$aix_libpath\"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\\(.*\\)$/\\1/; p; }\n}'`; fi\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nif test -z \"$aix_libpath\"; then aix_libpath=\"/usr/lib:/lib\"; fi\n\n\t hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'\"$aix_libpath\"\n\t  # Warning - without using the other run time loading flags,\n\t  # -berok will link without error, but may produce a broken library.\n\t  no_undefined_flag_F77=' ${wl}-bernotok'\n\t  allow_undefined_flag_F77=' ${wl}-berok'\n\t  # Exported symbols can be pulled into shared objects from archives\n\t  whole_archive_flag_spec_F77='$convenience'\n\t  archive_cmds_need_lc_F77=yes\n\t  # This is similar to how AIX traditionally builds its shared libraries.\n\t  archive_expsym_cmds_F77=\"\\$CC $shared_flag\"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'\n\tfi\n      fi\n      ;;\n\n    amigaos*)\n      archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo \"#define NAME $libname\" > $output_objdir/a2ixlibrary.data~$echo \"#define LIBRARY_ID 1\" >> $output_objdir/a2ixlibrary.data~$echo \"#define VERSION $major\" >> $output_objdir/a2ixlibrary.data~$echo \"#define REVISION $revision\" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'\n      hardcode_libdir_flag_spec_F77='-L$libdir'\n      hardcode_minus_L_F77=yes\n      # see comment about different semantics on the GNU ld section\n      ld_shlibs_F77=no\n      ;;\n\n    bsdi[45]*)\n      export_dynamic_flag_spec_F77=-rdynamic\n      ;;\n\n    cygwin* | mingw* | pw32*)\n      # When not using gcc, we currently assume that we are using\n      # Microsoft Visual C++.\n      # hardcode_libdir_flag_spec is actually meaningless, as there is\n      # no search path for DLLs.\n      hardcode_libdir_flag_spec_F77=' '\n      allow_undefined_flag_F77=unsupported\n      # Tell ltmain to make .lib files, not .a files.\n      libext=lib\n      # Tell ltmain to make .dll files, not .so files.\n      shrext_cmds=\".dll\"\n      # FIXME: Setting linknames here is a bad hack.\n      archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo \"$deplibs\" | $SED -e '\\''s/ -lc$//'\\''` -link -dll~linknames='\n      # The linker will automatically build a .lib file if we build a DLL.\n      old_archive_From_new_cmds_F77='true'\n      # FIXME: Should let the user specify the lib program.\n      old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs'\n      fix_srcfile_path_F77='`cygpath -w \"$srcfile\"`'\n      enable_shared_with_static_runtimes_F77=yes\n      ;;\n\n    darwin* | rhapsody*)\n      case $host_os in\n        rhapsody* | darwin1.[012])\n         allow_undefined_flag_F77='${wl}-undefined ${wl}suppress'\n         ;;\n       *) # Darwin 1.3 on\n         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then\n           allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'\n         else\n           case ${MACOSX_DEPLOYMENT_TARGET} in\n             10.[012])\n               allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'\n               ;;\n             10.*)\n               allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup'\n               ;;\n           esac\n         fi\n         ;;\n      esac\n      archive_cmds_need_lc_F77=no\n      hardcode_direct_F77=no\n      hardcode_automatic_F77=yes\n      hardcode_shlibpath_var_F77=unsupported\n      whole_archive_flag_spec_F77=''\n      link_all_deplibs_F77=yes\n    if test \"$GCC\" = yes ; then\n    \toutput_verbose_link_cmd='echo'\n        archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'\n      module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'\n      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds\n      archive_expsym_cmds_F77='sed -e \"s,#.*,,\" -e \"s,^[    ]*,,\" -e \"s,^\\(..*\\),_&,\" < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'\n      module_expsym_cmds_F77='sed -e \"s,#.*,,\" -e \"s,^[    ]*,,\" -e \"s,^\\(..*\\),_&,\" < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'\n    else\n      case $cc_basename in\n        xlc*)\n         output_verbose_link_cmd='echo'\n         archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'\n         module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'\n          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds\n         archive_expsym_cmds_F77='sed -e \"s,#.*,,\" -e \"s,^[    ]*,,\" -e \"s,^\\(..*\\),_&,\" < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'\n          module_expsym_cmds_F77='sed -e \"s,#.*,,\" -e \"s,^[    ]*,,\" -e \"s,^\\(..*\\),_&,\" < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'\n          ;;\n       *)\n         ld_shlibs_F77=no\n          ;;\n      esac\n    fi\n      ;;\n\n    dgux*)\n      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      hardcode_libdir_flag_spec_F77='-L$libdir'\n      hardcode_shlibpath_var_F77=no\n      ;;\n\n    freebsd1*)\n      ld_shlibs_F77=no\n      ;;\n\n    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor\n    # support.  Future versions do this automatically, but an explicit c++rt0.o\n    # does not break anything, and helps significantly (at the cost of a little\n    # extra space).\n    freebsd2.2*)\n      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'\n      hardcode_libdir_flag_spec_F77='-R$libdir'\n      hardcode_direct_F77=yes\n      hardcode_shlibpath_var_F77=no\n      ;;\n\n    # Unfortunately, older versions of FreeBSD 2 do not have this feature.\n    freebsd2*)\n      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'\n      hardcode_direct_F77=yes\n      hardcode_minus_L_F77=yes\n      hardcode_shlibpath_var_F77=no\n      ;;\n\n    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.\n    freebsd* | kfreebsd*-gnu | dragonfly*)\n      archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'\n      hardcode_libdir_flag_spec_F77='-R$libdir'\n      hardcode_direct_F77=yes\n      hardcode_shlibpath_var_F77=no\n      ;;\n\n    hpux9*)\n      if test \"$GCC\" = yes; then\n\tarchive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'\n      else\n\tarchive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'\n      fi\n      hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'\n      hardcode_libdir_separator_F77=:\n      hardcode_direct_F77=yes\n\n      # hardcode_minus_L: Not really in the search PATH,\n      # but as the default location of the library.\n      hardcode_minus_L_F77=yes\n      export_dynamic_flag_spec_F77='${wl}-E'\n      ;;\n\n    hpux10*)\n      if test \"$GCC\" = yes -a \"$with_gnu_ld\" = no; then\n\tarchive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'\n      else\n\tarchive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'\n      fi\n      if test \"$with_gnu_ld\" = no; then\n\thardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'\n\thardcode_libdir_separator_F77=:\n\n\thardcode_direct_F77=yes\n\texport_dynamic_flag_spec_F77='${wl}-E'\n\n\t# hardcode_minus_L: Not really in the search PATH,\n\t# but as the default location of the library.\n\thardcode_minus_L_F77=yes\n      fi\n      ;;\n\n    hpux11*)\n      if test \"$GCC\" = yes -a \"$with_gnu_ld\" = no; then\n\tcase $host_cpu in\n\thppa*64*)\n\t  archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\tia64*)\n\t  archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\t*)\n\t  archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\tesac\n      else\n\tcase $host_cpu in\n\thppa*64*)\n\t  archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\tia64*)\n\t  archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\t*)\n\t  archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\tesac\n      fi\n      if test \"$with_gnu_ld\" = no; then\n\thardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'\n\thardcode_libdir_separator_F77=:\n\n\tcase $host_cpu in\n\thppa*64*|ia64*)\n\t  hardcode_libdir_flag_spec_ld_F77='+b $libdir'\n\t  hardcode_direct_F77=no\n\t  hardcode_shlibpath_var_F77=no\n\t  ;;\n\t*)\n\t  hardcode_direct_F77=yes\n\t  export_dynamic_flag_spec_F77='${wl}-E'\n\n\t  # hardcode_minus_L: Not really in the search PATH,\n\t  # but as the default location of the library.\n\t  hardcode_minus_L_F77=yes\n\t  ;;\n\tesac\n      fi\n      ;;\n\n    irix5* | irix6* | nonstopux*)\n      if test \"$GCC\" = yes; then\n\tarchive_cmds_F77='$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'\n      else\n\tarchive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n \"$verstring\" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'\n\thardcode_libdir_flag_spec_ld_F77='-rpath $libdir'\n      fi\n      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'\n      hardcode_libdir_separator_F77=:\n      link_all_deplibs_F77=yes\n      ;;\n\n    netbsd*)\n      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then\n\tarchive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out\n      else\n\tarchive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF\n      fi\n      hardcode_libdir_flag_spec_F77='-R$libdir'\n      hardcode_direct_F77=yes\n      hardcode_shlibpath_var_F77=no\n      ;;\n\n    newsos6)\n      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      hardcode_direct_F77=yes\n      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'\n      hardcode_libdir_separator_F77=:\n      hardcode_shlibpath_var_F77=no\n      ;;\n\n    openbsd*)\n      hardcode_direct_F77=yes\n      hardcode_shlibpath_var_F77=no\n      if test -z \"`echo __ELF__ | $CC -E - | grep __ELF__`\" || test \"$host_os-$host_cpu\" = \"openbsd2.8-powerpc\"; then\n\tarchive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'\n\tarchive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'\n\thardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'\n\texport_dynamic_flag_spec_F77='${wl}-E'\n      else\n       case $host_os in\n\t openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)\n\t   archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'\n\t   hardcode_libdir_flag_spec_F77='-R$libdir'\n\t   ;;\n\t *)\n\t   archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'\n\t   hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'\n\t   ;;\n       esac\n      fi\n      ;;\n\n    os2*)\n      hardcode_libdir_flag_spec_F77='-L$libdir'\n      hardcode_minus_L_F77=yes\n      allow_undefined_flag_F77=unsupported\n      archive_cmds_F77='$echo \"LIBRARY $libname INITINSTANCE\" > $output_objdir/$libname.def~$echo \"DESCRIPTION \\\"$libname\\\"\" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo \" SINGLE NONSHARED\" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'\n      old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'\n      ;;\n\n    osf3*)\n      if test \"$GCC\" = yes; then\n\tallow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\\*'\n\tarchive_cmds_F77='$CC -shared${allow_undefined_flag} $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'\n      else\n\tallow_undefined_flag_F77=' -expect_unresolved \\*'\n\tarchive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n \"$verstring\" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'\n      fi\n      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'\n      hardcode_libdir_separator_F77=:\n      ;;\n\n    osf4* | osf5*)\t# as osf3* with the addition of -msym flag\n      if test \"$GCC\" = yes; then\n\tallow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\\*'\n\tarchive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n \"$verstring\" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'\n\thardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'\n      else\n\tallow_undefined_flag_F77=' -expect_unresolved \\*'\n\tarchive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n \"$verstring\" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'\n\tarchive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf \"%s %s\\\\n\" -exported_symbol \"\\$i\" >> $lib.exp; done; echo \"-hidden\">> $lib.exp~\n\t$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n \"$verstring\" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'\n\n\t# Both c and cxx compiler support -rpath directly\n\thardcode_libdir_flag_spec_F77='-rpath $libdir'\n      fi\n      hardcode_libdir_separator_F77=:\n      ;;\n\n    solaris*)\n      no_undefined_flag_F77=' -z text'\n      if test \"$GCC\" = yes; then\n\twlarc='${wl}'\n\tarchive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\tarchive_expsym_cmds_F77='$echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~$echo \"local: *; };\" >> $lib.exp~\n\t  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'\n      else\n\twlarc=''\n\tarchive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'\n\tarchive_expsym_cmds_F77='$echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~$echo \"local: *; };\" >> $lib.exp~\n  \t$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'\n      fi\n      hardcode_libdir_flag_spec_F77='-R$libdir'\n      hardcode_shlibpath_var_F77=no\n      case $host_os in\n      solaris2.[0-5] | solaris2.[0-5].*) ;;\n      *)\n \t# The compiler driver will combine linker options so we\n \t# cannot just pass the convience library names through\n \t# without $wl, iff we do not link with $LD.\n \t# Luckily, gcc supports the same syntax we need for Sun Studio.\n \t# Supported since Solaris 2.6 (maybe 2.5.1?)\n \tcase $wlarc in\n \t'')\n \t  whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;;\n \t*)\n \t  whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\\\"\\\"; do test -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience,$conv\\\"; done; $echo \\\"$new_convenience\\\"` ${wl}-z ${wl}defaultextract' ;;\n \tesac ;;\n      esac\n      link_all_deplibs_F77=yes\n      ;;\n\n    sunos4*)\n      if test \"x$host_vendor\" = xsequent; then\n\t# Use $CC to link under sequent, because it throws in some extra .o\n\t# files that make .init and .fini sections work.\n\tarchive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'\n      else\n\tarchive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'\n      fi\n      hardcode_libdir_flag_spec_F77='-L$libdir'\n      hardcode_direct_F77=yes\n      hardcode_minus_L_F77=yes\n      hardcode_shlibpath_var_F77=no\n      ;;\n\n    sysv4)\n      case $host_vendor in\n\tsni)\n\t  archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n\t  hardcode_direct_F77=yes # is this really true???\n\t;;\n\tsiemens)\n\t  ## LD is ld it makes a PLAMLIB\n\t  ## CC just makes a GrossModule.\n\t  archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'\n\t  reload_cmds_F77='$CC -r -o $output$reload_objs'\n\t  hardcode_direct_F77=no\n        ;;\n\tmotorola)\n\t  archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n\t  hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie\n\t;;\n      esac\n      runpath_var='LD_RUN_PATH'\n      hardcode_shlibpath_var_F77=no\n      ;;\n\n    sysv4.3*)\n      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      hardcode_shlibpath_var_F77=no\n      export_dynamic_flag_spec_F77='-Bexport'\n      ;;\n\n    sysv4*MP*)\n      if test -d /usr/nec; then\n\tarchive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n\thardcode_shlibpath_var_F77=no\n\trunpath_var=LD_RUN_PATH\n\thardcode_runpath_var=yes\n\tld_shlibs_F77=yes\n      fi\n      ;;\n\n    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)\n      no_undefined_flag_F77='${wl}-z,text'\n      archive_cmds_need_lc_F77=no\n      hardcode_shlibpath_var_F77=no\n      runpath_var='LD_RUN_PATH'\n\n      if test \"$GCC\" = yes; then\n\tarchive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\tarchive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n      else\n\tarchive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\tarchive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n      fi\n      ;;\n\n    sysv5* | sco3.2v5* | sco5v6*)\n      # Note: We can NOT use -z defs as we might desire, because we do not\n      # link with -lc, and that would cause any symbols used from libc to\n      # always be unresolved, which means just about no library would\n      # ever link correctly.  If we're not using GNU ld we use -z text\n      # though, which does catch some bad symbols but isn't as heavy-handed\n      # as -z defs.\n      no_undefined_flag_F77='${wl}-z,text'\n      allow_undefined_flag_F77='${wl}-z,nodefs'\n      archive_cmds_need_lc_F77=no\n      hardcode_shlibpath_var_F77=no\n      hardcode_libdir_flag_spec_F77='`test -z \"$SCOABSPATH\" && echo ${wl}-R,$libdir`'\n      hardcode_libdir_separator_F77=':'\n      link_all_deplibs_F77=yes\n      export_dynamic_flag_spec_F77='${wl}-Bexport'\n      runpath_var='LD_RUN_PATH'\n\n      if test \"$GCC\" = yes; then\n\tarchive_cmds_F77='$CC -shared ${wl}-h,\\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\tarchive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'\n      else\n\tarchive_cmds_F77='$CC -G ${wl}-h,\\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\tarchive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'\n      fi\n      ;;\n\n    uts4*)\n      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      hardcode_libdir_flag_spec_F77='-L$libdir'\n      hardcode_shlibpath_var_F77=no\n      ;;\n\n    *)\n      ld_shlibs_F77=no\n      ;;\n    esac\n  fi\n\necho \"$as_me:$LINENO: result: $ld_shlibs_F77\" >&5\necho \"${ECHO_T}$ld_shlibs_F77\" >&6\ntest \"$ld_shlibs_F77\" = no && can_build_shared=no\n\n#\n# Do we need to explicitly link libc?\n#\ncase \"x$archive_cmds_need_lc_F77\" in\nx|xyes)\n  # Assume -lc should be added\n  archive_cmds_need_lc_F77=yes\n\n  if test \"$enable_shared\" = yes && test \"$GCC\" = yes; then\n    case $archive_cmds_F77 in\n    *'~'*)\n      # FIXME: we may have to deal with multi-command sequences.\n      ;;\n    '$CC '*)\n      # Test whether the compiler implicitly links with -lc since on some\n      # systems, -lgcc has to come before -lc. If gcc already passes -lc\n      # to ld, don't add -lc before -lgcc.\n      echo \"$as_me:$LINENO: checking whether -lc should be explicitly linked in\" >&5\necho $ECHO_N \"checking whether -lc should be explicitly linked in... $ECHO_C\" >&6\n      $rm conftest*\n      printf \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n\n      if { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } 2>conftest.err; then\n        soname=conftest\n        lib=conftest\n        libobjs=conftest.$ac_objext\n        deplibs=\n        wl=$lt_prog_compiler_wl_F77\n\tpic_flag=$lt_prog_compiler_pic_F77\n        compiler_flags=-v\n        linker_flags=-v\n        verstring=\n        output_objdir=.\n        libname=conftest\n        lt_save_allow_undefined_flag=$allow_undefined_flag_F77\n        allow_undefined_flag_F77=\n        if { (eval echo \"$as_me:$LINENO: \\\"$archive_cmds_F77 2\\>\\&1 \\| grep \\\" -lc \\\" \\>/dev/null 2\\>\\&1\\\"\") >&5\n  (eval $archive_cmds_F77 2\\>\\&1 \\| grep \\\" -lc \\\" \\>/dev/null 2\\>\\&1) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }\n        then\n\t  archive_cmds_need_lc_F77=no\n        else\n\t  archive_cmds_need_lc_F77=yes\n        fi\n        allow_undefined_flag_F77=$lt_save_allow_undefined_flag\n      else\n        cat conftest.err 1>&5\n      fi\n      $rm conftest*\n      echo \"$as_me:$LINENO: result: $archive_cmds_need_lc_F77\" >&5\necho \"${ECHO_T}$archive_cmds_need_lc_F77\" >&6\n      ;;\n    esac\n  fi\n  ;;\nesac\n\necho \"$as_me:$LINENO: checking dynamic linker characteristics\" >&5\necho $ECHO_N \"checking dynamic linker characteristics... $ECHO_C\" >&6\nlibrary_names_spec=\nlibname_spec='lib$name'\nsoname_spec=\nshrext_cmds=\".so\"\npostinstall_cmds=\npostuninstall_cmds=\nfinish_cmds=\nfinish_eval=\nshlibpath_var=\nshlibpath_overrides_runpath=unknown\nversion_type=none\ndynamic_linker=\"$host_os ld.so\"\nsys_lib_dlsearch_path_spec=\"/lib /usr/lib\"\nif test \"$GCC\" = yes; then\n  sys_lib_search_path_spec=`$CC -print-search-dirs | grep \"^libraries:\" | $SED -e \"s/^libraries://\" -e \"s,=/,/,g\"`\n  if echo \"$sys_lib_search_path_spec\" | grep ';' >/dev/null ; then\n    # if the path contains \";\" then we assume it to be the separator\n    # otherwise default to the standard path separator (i.e. \":\") - it is\n    # assumed that no part of a normal pathname contains \";\" but that should\n    # okay in the real world where \";\" in dirpaths is itself problematic.\n    sys_lib_search_path_spec=`echo \"$sys_lib_search_path_spec\" | $SED -e 's/;/ /g'`\n  else\n    sys_lib_search_path_spec=`echo \"$sys_lib_search_path_spec\" | $SED  -e \"s/$PATH_SEPARATOR/ /g\"`\n  fi\nelse\n  sys_lib_search_path_spec=\"/lib /usr/lib /usr/local/lib\"\nfi\nneed_lib_prefix=unknown\nhardcode_into_libs=no\n\n# when you set need_version to no, make sure it does not cause -set_version\n# flags to be left without arguments\nneed_version=unknown\n\ncase $host_os in\naix3*)\n  version_type=linux\n  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'\n  shlibpath_var=LIBPATH\n\n  # AIX 3 has no versioning support, so we append a major version to the name.\n  soname_spec='${libname}${release}${shared_ext}$major'\n  ;;\n\naix4* | aix5*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  hardcode_into_libs=yes\n  if test \"$host_cpu\" = ia64; then\n    # AIX 5 supports IA64\n    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'\n    shlibpath_var=LD_LIBRARY_PATH\n  else\n    # With GCC up to 2.95.x, collect2 would create an import file\n    # for dependence libraries.  The import file would start with\n    # the line `#! .'.  This would cause the generated library to\n    # depend on `.', always an invalid library.  This was fixed in\n    # development snapshots of GCC prior to 3.0.\n    case $host_os in\n      aix4 | aix4.[01] | aix4.[01].*)\n      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'\n\t   echo ' yes '\n\t   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then\n\t:\n      else\n\tcan_build_shared=no\n      fi\n      ;;\n    esac\n    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct\n    # soname into executable. Probably we can add versioning support to\n    # collect2, so additional links can be useful in future.\n    if test \"$aix_use_runtimelinking\" = yes; then\n      # If using run time linking (on AIX 4.2 or later) use lib<name>.so\n      # instead of lib<name>.a to let people know that these are not\n      # typical AIX shared libraries.\n      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    else\n      # We preserve .a as extension for shared libraries through AIX4.2\n      # and later when we are not doing run time linking.\n      library_names_spec='${libname}${release}.a $libname.a'\n      soname_spec='${libname}${release}${shared_ext}$major'\n    fi\n    shlibpath_var=LIBPATH\n  fi\n  ;;\n\namigaos*)\n  library_names_spec='$libname.ixlibrary $libname.a'\n  # Create ${libname}_ixlibrary.a entries in /sys/libs.\n  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo \"X$lib\" | $Xsed -e '\\''s%^.*/\\([^/]*\\)\\.ixlibrary$%\\1%'\\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show \"cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a\"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'\n  ;;\n\nbeos*)\n  library_names_spec='${libname}${shared_ext}'\n  dynamic_linker=\"$host_os ld.so\"\n  shlibpath_var=LIBRARY_PATH\n  ;;\n\nbsdi[45]*)\n  version_type=linux\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  sys_lib_search_path_spec=\"/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib\"\n  sys_lib_dlsearch_path_spec=\"/shlib /usr/lib /usr/local/lib\"\n  # the default ld.so.conf also contains /usr/contrib/lib and\n  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow\n  # libtool to hard-code these into programs\n  ;;\n\ncygwin* | mingw* | pw32*)\n  version_type=windows\n  shrext_cmds=\".dll\"\n  need_version=no\n  need_lib_prefix=no\n\n  case $GCC,$host_os in\n  yes,cygwin* | yes,mingw* | yes,pw32*)\n    library_names_spec='$libname.dll.a'\n    # DLL is installed to $(libdir)/../bin by postinstall_cmds\n    postinstall_cmds='base_file=`basename \\${file}`~\n      dlpath=`$SHELL 2>&1 -c '\\''. $dir/'\\''\\${base_file}'\\''i;echo \\$dlname'\\''`~\n      dldir=$destdir/`dirname \\$dlpath`~\n      test -d \\$dldir || mkdir -p \\$dldir~\n      $install_prog $dir/$dlname \\$dldir/$dlname~\n      chmod a+x \\$dldir/$dlname'\n    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\\''. $file; echo \\$dlname'\\''`~\n      dlpath=$dir/\\$dldll~\n       $rm \\$dlpath'\n    shlibpath_overrides_runpath=yes\n\n    case $host_os in\n    cygwin*)\n      # Cygwin DLLs use 'cyg' prefix rather than 'lib'\n      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'\n      sys_lib_search_path_spec=\"/usr/lib /lib/w32api /lib /usr/local/lib\"\n      ;;\n    mingw*)\n      # MinGW DLLs use traditional 'lib' prefix\n      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'\n      sys_lib_search_path_spec=`$CC -print-search-dirs | grep \"^libraries:\" | $SED -e \"s/^libraries://\" -e \"s,=/,/,g\"`\n      if echo \"$sys_lib_search_path_spec\" | grep ';[c-zC-Z]:/' >/dev/null; then\n        # It is most probably a Windows format PATH printed by\n        # mingw gcc, but we are running on Cygwin. Gcc prints its search\n        # path with ; separators, and with drive letters. We can handle the\n        # drive letters (cygwin fileutils understands them), so leave them,\n        # especially as we might pass files found there to a mingw objdump,\n        # which wouldn't understand a cygwinified path. Ahh.\n        sys_lib_search_path_spec=`echo \"$sys_lib_search_path_spec\" | $SED -e 's/;/ /g'`\n      else\n        sys_lib_search_path_spec=`echo \"$sys_lib_search_path_spec\" | $SED  -e \"s/$PATH_SEPARATOR/ /g\"`\n      fi\n      ;;\n    pw32*)\n      # pw32 DLLs use 'pw' prefix rather than 'lib'\n      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'\n      ;;\n    esac\n    ;;\n\n  *)\n    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'\n    ;;\n  esac\n  dynamic_linker='Win32 ld.exe'\n  # FIXME: first we should search . and the directory the executable is in\n  shlibpath_var=PATH\n  ;;\n\ndarwin* | rhapsody*)\n  dynamic_linker=\"$host_os dyld\"\n  version_type=darwin\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'\n  soname_spec='${libname}${release}${major}$shared_ext'\n  shlibpath_overrides_runpath=yes\n  shlibpath_var=DYLD_LIBRARY_PATH\n  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'\n  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.\n  if test \"$GCC\" = yes; then\n    sys_lib_search_path_spec=`$CC -print-search-dirs | tr \"\\n\" \"$PATH_SEPARATOR\" | sed -e 's/libraries:/@libraries:/' | tr \"@\" \"\\n\" | grep \"^libraries:\" | sed -e \"s/^libraries://\" -e \"s,=/,/,g\" -e \"s,$PATH_SEPARATOR, ,g\" -e \"s,.*,& /lib /usr/lib /usr/local/lib,g\"`\n  else\n    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'\n  fi\n  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'\n  ;;\n\ndgux*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  ;;\n\nfreebsd1*)\n  dynamic_linker=no\n  ;;\n\nkfreebsd*-gnu)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  dynamic_linker='GNU ld.so'\n  ;;\n\nfreebsd* | dragonfly*)\n  # DragonFly does not have aout.  When/if they implement a new\n  # versioning mechanism, adjust this.\n  if test -x /usr/bin/objformat; then\n    objformat=`/usr/bin/objformat`\n  else\n    case $host_os in\n    freebsd[123]*) objformat=aout ;;\n    *) objformat=elf ;;\n    esac\n  fi\n  version_type=freebsd-$objformat\n  case $version_type in\n    freebsd-elf*)\n      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'\n      need_version=no\n      need_lib_prefix=no\n      ;;\n    freebsd-*)\n      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'\n      need_version=yes\n      ;;\n  esac\n  shlibpath_var=LD_LIBRARY_PATH\n  case $host_os in\n  freebsd2*)\n    shlibpath_overrides_runpath=yes\n    ;;\n  freebsd3.[01]* | freebsdelf3.[01]*)\n    shlibpath_overrides_runpath=yes\n    hardcode_into_libs=yes\n    ;;\n  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \\\n  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)\n    shlibpath_overrides_runpath=no\n    hardcode_into_libs=yes\n    ;;\n  freebsd*) # from 4.6 on\n    shlibpath_overrides_runpath=yes\n    hardcode_into_libs=yes\n    ;;\n  esac\n  ;;\n\ngnu*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  hardcode_into_libs=yes\n  ;;\n\nhpux9* | hpux10* | hpux11*)\n  # Give a soname corresponding to the major version so that dld.sl refuses to\n  # link against other versions.\n  version_type=sunos\n  need_lib_prefix=no\n  need_version=no\n  case $host_cpu in\n  ia64*)\n    shrext_cmds='.so'\n    hardcode_into_libs=yes\n    dynamic_linker=\"$host_os dld.so\"\n    shlibpath_var=LD_LIBRARY_PATH\n    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    if test \"X$HPUX_IA64_MODE\" = X32; then\n      sys_lib_search_path_spec=\"/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib\"\n    else\n      sys_lib_search_path_spec=\"/usr/lib/hpux64 /usr/local/lib/hpux64\"\n    fi\n    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec\n    ;;\n   hppa*64*)\n     shrext_cmds='.sl'\n     hardcode_into_libs=yes\n     dynamic_linker=\"$host_os dld.sl\"\n     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH\n     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.\n     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n     soname_spec='${libname}${release}${shared_ext}$major'\n     sys_lib_search_path_spec=\"/usr/lib/pa20_64 /usr/ccs/lib/pa20_64\"\n     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec\n     ;;\n   *)\n    shrext_cmds='.sl'\n    dynamic_linker=\"$host_os dld.sl\"\n    shlibpath_var=SHLIB_PATH\n    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    ;;\n  esac\n  # HP-UX runs *really* slowly unless shared libraries are mode 555.\n  postinstall_cmds='chmod 555 $lib'\n  ;;\n\ninterix3*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  ;;\n\nirix5* | irix6* | nonstopux*)\n  case $host_os in\n    nonstopux*) version_type=nonstopux ;;\n    *)\n\tif test \"$lt_cv_prog_gnu_ld\" = yes; then\n\t\tversion_type=linux\n\telse\n\t\tversion_type=irix\n\tfi ;;\n  esac\n  need_lib_prefix=no\n  need_version=no\n  soname_spec='${libname}${release}${shared_ext}$major'\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'\n  case $host_os in\n  irix5* | nonstopux*)\n    libsuff= shlibsuff=\n    ;;\n  *)\n    case $LD in # libtool.m4 will add one of these switches to LD\n    *-32|*\"-32 \"|*-melf32bsmip|*\"-melf32bsmip \")\n      libsuff= shlibsuff= libmagic=32-bit;;\n    *-n32|*\"-n32 \"|*-melf32bmipn32|*\"-melf32bmipn32 \")\n      libsuff=32 shlibsuff=N32 libmagic=N32;;\n    *-64|*\"-64 \"|*-melf64bmip|*\"-melf64bmip \")\n      libsuff=64 shlibsuff=64 libmagic=64-bit;;\n    *) libsuff= shlibsuff= libmagic=never-match;;\n    esac\n    ;;\n  esac\n  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH\n  shlibpath_overrides_runpath=no\n  sys_lib_search_path_spec=\"/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}\"\n  sys_lib_dlsearch_path_spec=\"/usr/lib${libsuff} /lib${libsuff}\"\n  hardcode_into_libs=yes\n  ;;\n\n# No shared lib support for Linux oldld, aout, or coff.\nlinux*oldld* | linux*aout* | linux*coff*)\n  dynamic_linker=no\n  ;;\n\n# This must be Linux ELF.\nlinux*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -n $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  # This implies no fast_install, which is unacceptable.\n  # Some rework will be needed to allow for fast_install\n  # before this can be enabled.\n  hardcode_into_libs=yes\n\n  # find out which ABI we are using\n  libsuff=\n  case \"$host_cpu\" in\n  x86_64*|s390x*|powerpc64*)\n    echo '#line 16363 \"configure\"' > conftest.$ac_ext\n    if { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; then\n      case `/usr/bin/file conftest.$ac_objext` in\n      *64-bit*)\n        libsuff=64\n        sys_lib_search_path_spec=\"/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}\"\n        ;;\n      esac\n    fi\n    rm -rf conftest*\n    ;;\n  esac\n\n  # Append ld.so.conf contents to the search path\n  if test -f /etc/ld.so.conf; then\n    lt_ld_extra=`awk '/^include / { system(sprintf(\"cd /etc; cat %s 2>/dev/null\", \\$2)); skip = 1; } { if (!skip) print \\$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\\n' ' '`\n    sys_lib_dlsearch_path_spec=\"/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra\"\n  fi\n\n  # We used to test for /lib/ld.so.1 and disable shared libraries on\n  # powerpc, because MkLinux only supported shared libraries with the\n  # GNU dynamic linker.  Since this was broken with cross compilers,\n  # most powerpc-linux boxes support dynamic linking these days and\n  # people can always --disable-shared, the test was removed, and we\n  # assume the GNU/Linux dynamic linker is in use.\n  dynamic_linker='GNU/Linux ld.so'\n  ;;\n\nknetbsd*-gnu)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  dynamic_linker='GNU ld.so'\n  ;;\n\nnetbsd*)\n  version_type=sunos\n  need_lib_prefix=no\n  need_version=no\n  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n    finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -m $libdir'\n    dynamic_linker='NetBSD (a.out) ld.so'\n  else\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    dynamic_linker='NetBSD ld.elf_so'\n  fi\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  hardcode_into_libs=yes\n  ;;\n\nnewsos6)\n  version_type=linux\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  ;;\n\nnto-qnx*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  ;;\n\nopenbsd*)\n  version_type=sunos\n  sys_lib_dlsearch_path_spec=\"/usr/lib\"\n  need_lib_prefix=no\n  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.\n  case $host_os in\n    openbsd3.3 | openbsd3.3.*) need_version=yes ;;\n    *)                         need_version=no  ;;\n  esac\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -m $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  if test -z \"`echo __ELF__ | $CC -E - | grep __ELF__`\" || test \"$host_os-$host_cpu\" = \"openbsd2.8-powerpc\"; then\n    case $host_os in\n      openbsd2.[89] | openbsd2.[89].*)\n\tshlibpath_overrides_runpath=no\n\t;;\n      *)\n\tshlibpath_overrides_runpath=yes\n\t;;\n      esac\n  else\n    shlibpath_overrides_runpath=yes\n  fi\n  ;;\n\nos2*)\n  libname_spec='$name'\n  shrext_cmds=\".dll\"\n  need_lib_prefix=no\n  library_names_spec='$libname${shared_ext} $libname.a'\n  dynamic_linker='OS/2 ld.exe'\n  shlibpath_var=LIBPATH\n  ;;\n\nosf3* | osf4* | osf5*)\n  version_type=osf\n  need_lib_prefix=no\n  need_version=no\n  soname_spec='${libname}${release}${shared_ext}$major'\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  shlibpath_var=LD_LIBRARY_PATH\n  sys_lib_search_path_spec=\"/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib\"\n  sys_lib_dlsearch_path_spec=\"$sys_lib_search_path_spec\"\n  ;;\n\nsolaris*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  hardcode_into_libs=yes\n  # ldd complains unless libraries are executable\n  postinstall_cmds='chmod +x $lib'\n  ;;\n\nsunos4*)\n  version_type=sunos\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n  finish_cmds='PATH=\"\\$PATH:/usr/etc\" ldconfig $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  if test \"$with_gnu_ld\" = yes; then\n    need_lib_prefix=no\n  fi\n  need_version=yes\n  ;;\n\nsysv4 | sysv4.3*)\n  version_type=linux\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  case $host_vendor in\n    sni)\n      shlibpath_overrides_runpath=no\n      need_lib_prefix=no\n      export_dynamic_flag_spec='${wl}-Blargedynsym'\n      runpath_var=LD_RUN_PATH\n      ;;\n    siemens)\n      need_lib_prefix=no\n      ;;\n    motorola)\n      need_lib_prefix=no\n      need_version=no\n      shlibpath_overrides_runpath=no\n      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'\n      ;;\n  esac\n  ;;\n\nsysv4*MP*)\n  if test -d /usr/nec ;then\n    version_type=linux\n    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'\n    soname_spec='$libname${shared_ext}.$major'\n    shlibpath_var=LD_LIBRARY_PATH\n  fi\n  ;;\n\nsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)\n  version_type=freebsd-elf\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  hardcode_into_libs=yes\n  if test \"$with_gnu_ld\" = yes; then\n    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'\n    shlibpath_overrides_runpath=no\n  else\n    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'\n    shlibpath_overrides_runpath=yes\n    case $host_os in\n      sco3.2v5*)\n        sys_lib_search_path_spec=\"$sys_lib_search_path_spec /lib\"\n\t;;\n    esac\n  fi\n  sys_lib_dlsearch_path_spec='/usr/lib'\n  ;;\n\nuts4*)\n  version_type=linux\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  ;;\n\n*)\n  dynamic_linker=no\n  ;;\nesac\necho \"$as_me:$LINENO: result: $dynamic_linker\" >&5\necho \"${ECHO_T}$dynamic_linker\" >&6\ntest \"$dynamic_linker\" = no && can_build_shared=no\n\nvariables_saved_for_relink=\"PATH $shlibpath_var $runpath_var\"\nif test \"$GCC\" = yes; then\n  variables_saved_for_relink=\"$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH\"\nfi\n\necho \"$as_me:$LINENO: checking how to hardcode library paths into programs\" >&5\necho $ECHO_N \"checking how to hardcode library paths into programs... $ECHO_C\" >&6\nhardcode_action_F77=\nif test -n \"$hardcode_libdir_flag_spec_F77\" || \\\n   test -n \"$runpath_var_F77\" || \\\n   test \"X$hardcode_automatic_F77\" = \"Xyes\" ; then\n\n  # We can hardcode non-existant directories.\n  if test \"$hardcode_direct_F77\" != no &&\n     # If the only mechanism to avoid hardcoding is shlibpath_var, we\n     # have to relink, otherwise we might link with an installed library\n     # when we should be linking with a yet-to-be-installed one\n     ## test \"$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)\" != no &&\n     test \"$hardcode_minus_L_F77\" != no; then\n    # Linking always hardcodes the temporary library directory.\n    hardcode_action_F77=relink\n  else\n    # We can link without hardcoding, and we can hardcode nonexisting dirs.\n    hardcode_action_F77=immediate\n  fi\nelse\n  # We cannot hardcode anything, or else we can only hardcode existing\n  # directories.\n  hardcode_action_F77=unsupported\nfi\necho \"$as_me:$LINENO: result: $hardcode_action_F77\" >&5\necho \"${ECHO_T}$hardcode_action_F77\" >&6\n\nif test \"$hardcode_action_F77\" = relink; then\n  # Fast installation is not supported\n  enable_fast_install=no\nelif test \"$shlibpath_overrides_runpath\" = yes ||\n     test \"$enable_shared\" = no; then\n  # Fast installation is not necessary\n  enable_fast_install=needless\nfi\n\n\n# The else clause should only fire when bootstrapping the\n# libtool distribution, otherwise you forgot to ship ltmain.sh\n# with your package, and you will get complaints that there are\n# no rules to generate ltmain.sh.\nif test -f \"$ltmain\"; then\n  # See if we are running on zsh, and set the options which allow our commands through\n  # without removal of \\ escapes.\n  if test -n \"${ZSH_VERSION+set}\" ; then\n    setopt NO_GLOB_SUBST\n  fi\n  # Now quote all the things that may contain metacharacters while being\n  # careful not to overquote the AC_SUBSTed values.  We take copies of the\n  # variables and quote the copies for generation of the libtool script.\n  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \\\n    SED SHELL STRIP \\\n    libname_spec library_names_spec soname_spec extract_expsyms_cmds \\\n    old_striplib striplib file_magic_cmd finish_cmds finish_eval \\\n    deplibs_check_method reload_flag reload_cmds need_locks \\\n    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \\\n    lt_cv_sys_global_symbol_to_c_name_address \\\n    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \\\n    old_postinstall_cmds old_postuninstall_cmds \\\n    compiler_F77 \\\n    CC_F77 \\\n    LD_F77 \\\n    lt_prog_compiler_wl_F77 \\\n    lt_prog_compiler_pic_F77 \\\n    lt_prog_compiler_static_F77 \\\n    lt_prog_compiler_no_builtin_flag_F77 \\\n    export_dynamic_flag_spec_F77 \\\n    thread_safe_flag_spec_F77 \\\n    whole_archive_flag_spec_F77 \\\n    enable_shared_with_static_runtimes_F77 \\\n    old_archive_cmds_F77 \\\n    old_archive_from_new_cmds_F77 \\\n    predep_objects_F77 \\\n    postdep_objects_F77 \\\n    predeps_F77 \\\n    postdeps_F77 \\\n    compiler_lib_search_path_F77 \\\n    archive_cmds_F77 \\\n    archive_expsym_cmds_F77 \\\n    postinstall_cmds_F77 \\\n    postuninstall_cmds_F77 \\\n    old_archive_from_expsyms_cmds_F77 \\\n    allow_undefined_flag_F77 \\\n    no_undefined_flag_F77 \\\n    export_symbols_cmds_F77 \\\n    hardcode_libdir_flag_spec_F77 \\\n    hardcode_libdir_flag_spec_ld_F77 \\\n    hardcode_libdir_separator_F77 \\\n    hardcode_automatic_F77 \\\n    module_cmds_F77 \\\n    module_expsym_cmds_F77 \\\n    lt_cv_prog_compiler_c_o_F77 \\\n    exclude_expsyms_F77 \\\n    include_expsyms_F77; do\n\n    case $var in\n    old_archive_cmds_F77 | \\\n    old_archive_from_new_cmds_F77 | \\\n    archive_cmds_F77 | \\\n    archive_expsym_cmds_F77 | \\\n    module_cmds_F77 | \\\n    module_expsym_cmds_F77 | \\\n    old_archive_from_expsyms_cmds_F77 | \\\n    export_symbols_cmds_F77 | \\\n    extract_expsyms_cmds | reload_cmds | finish_cmds | \\\n    postinstall_cmds | postuninstall_cmds | \\\n    old_postinstall_cmds | old_postuninstall_cmds | \\\n    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)\n      # Double-quote double-evaled strings.\n      eval \"lt_$var=\\\\\\\"\\`\\$echo \\\"X\\$$var\\\" | \\$Xsed -e \\\"\\$double_quote_subst\\\" -e \\\"\\$sed_quote_subst\\\" -e \\\"\\$delay_variable_subst\\\"\\`\\\\\\\"\"\n      ;;\n    *)\n      eval \"lt_$var=\\\\\\\"\\`\\$echo \\\"X\\$$var\\\" | \\$Xsed -e \\\"\\$sed_quote_subst\\\"\\`\\\\\\\"\"\n      ;;\n    esac\n  done\n\n  case $lt_echo in\n  *'\\$0 --fallback-echo\"')\n    lt_echo=`$echo \"X$lt_echo\" | $Xsed -e 's/\\\\\\\\\\\\\\$0 --fallback-echo\"$/$0 --fallback-echo\"/'`\n    ;;\n  esac\n\ncfgfile=\"$ofile\"\n\n  cat <<__EOF__ >> \"$cfgfile\"\n# ### BEGIN LIBTOOL TAG CONFIG: $tagname\n\n# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:\n\n# Shell to use when invoking shell scripts.\nSHELL=$lt_SHELL\n\n# Whether or not to build shared libraries.\nbuild_libtool_libs=$enable_shared\n\n# Whether or not to build static libraries.\nbuild_old_libs=$enable_static\n\n# Whether or not to add -lc for building shared libraries.\nbuild_libtool_need_lc=$archive_cmds_need_lc_F77\n\n# Whether or not to disallow shared libs when runtime libs are static\nallow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77\n\n# Whether or not to optimize for fast installation.\nfast_install=$enable_fast_install\n\n# The host system.\nhost_alias=$host_alias\nhost=$host\nhost_os=$host_os\n\n# The build system.\nbuild_alias=$build_alias\nbuild=$build\nbuild_os=$build_os\n\n# An echo program that does not interpret backslashes.\necho=$lt_echo\n\n# The archiver.\nAR=$lt_AR\nAR_FLAGS=$lt_AR_FLAGS\n\n# A C compiler.\nLTCC=$lt_LTCC\n\n# LTCC compiler flags.\nLTCFLAGS=$lt_LTCFLAGS\n\n# A language-specific compiler.\nCC=$lt_compiler_F77\n\n# Is the compiler the GNU C compiler?\nwith_gcc=$GCC_F77\n\ngcc_dir=\\`gcc -print-file-name=. | $SED 's,/\\.$,,'\\`\ngcc_ver=\\`gcc -dumpversion\\`\n\n# An ERE matcher.\nEGREP=$lt_EGREP\n\n# The linker used to build libraries.\nLD=$lt_LD_F77\n\n# Whether we need hard or soft links.\nLN_S=$lt_LN_S\n\n# A BSD-compatible nm program.\nNM=$lt_NM\n\n# A symbol stripping program\nSTRIP=$lt_STRIP\n\n# Used to examine libraries when file_magic_cmd begins \"file\"\nMAGIC_CMD=$MAGIC_CMD\n\n# Used on cygwin: DLL creation program.\nDLLTOOL=\"$DLLTOOL\"\n\n# Used on cygwin: object dumper.\nOBJDUMP=\"$OBJDUMP\"\n\n# Used on cygwin: assembler.\nAS=\"$AS\"\n\n# The name of the directory that contains temporary libtool files.\nobjdir=$objdir\n\n# How to create reloadable object files.\nreload_flag=$lt_reload_flag\nreload_cmds=$lt_reload_cmds\n\n# How to pass a linker flag through the compiler.\nwl=$lt_lt_prog_compiler_wl_F77\n\n# Object file suffix (normally \"o\").\nobjext=\"$ac_objext\"\n\n# Old archive suffix (normally \"a\").\nlibext=\"$libext\"\n\n# Shared library suffix (normally \".so\").\nshrext_cmds='$shrext_cmds'\n\n# Executable file suffix (normally \"\").\nexeext=\"$exeext\"\n\n# Additional compiler flags for building library objects.\npic_flag=$lt_lt_prog_compiler_pic_F77\npic_mode=$pic_mode\n\n# What is the maximum length of a command?\nmax_cmd_len=$lt_cv_sys_max_cmd_len\n\n# Does compiler simultaneously support -c and -o options?\ncompiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77\n\n# Must we lock files when doing compilation?\nneed_locks=$lt_need_locks\n\n# Do we need the lib prefix for modules?\nneed_lib_prefix=$need_lib_prefix\n\n# Do we need a version for libraries?\nneed_version=$need_version\n\n# Whether dlopen is supported.\ndlopen_support=$enable_dlopen\n\n# Whether dlopen of programs is supported.\ndlopen_self=$enable_dlopen_self\n\n# Whether dlopen of statically linked programs is supported.\ndlopen_self_static=$enable_dlopen_self_static\n\n# Compiler flag to prevent dynamic linking.\nlink_static_flag=$lt_lt_prog_compiler_static_F77\n\n# Compiler flag to turn off builtin functions.\nno_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77\n\n# Compiler flag to allow reflexive dlopens.\nexport_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77\n\n# Compiler flag to generate shared objects directly from archives.\nwhole_archive_flag_spec=$lt_whole_archive_flag_spec_F77\n\n# Compiler flag to generate thread-safe objects.\nthread_safe_flag_spec=$lt_thread_safe_flag_spec_F77\n\n# Library versioning type.\nversion_type=$version_type\n\n# Format of library name prefix.\nlibname_spec=$lt_libname_spec\n\n# List of archive names.  First name is the real one, the rest are links.\n# The last name is the one that the linker finds with -lNAME.\nlibrary_names_spec=$lt_library_names_spec\n\n# The coded name of the library, if different from the real name.\nsoname_spec=$lt_soname_spec\n\n# Commands used to build and install an old-style archive.\nRANLIB=$lt_RANLIB\nold_archive_cmds=$lt_old_archive_cmds_F77\nold_postinstall_cmds=$lt_old_postinstall_cmds\nold_postuninstall_cmds=$lt_old_postuninstall_cmds\n\n# Create an old-style archive from a shared archive.\nold_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77\n\n# Create a temporary old-style archive to link instead of a shared archive.\nold_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77\n\n# Commands used to build and install a shared archive.\narchive_cmds=$lt_archive_cmds_F77\narchive_expsym_cmds=$lt_archive_expsym_cmds_F77\npostinstall_cmds=$lt_postinstall_cmds\npostuninstall_cmds=$lt_postuninstall_cmds\n\n# Commands used to build a loadable module (assumed same as above if empty)\nmodule_cmds=$lt_module_cmds_F77\nmodule_expsym_cmds=$lt_module_expsym_cmds_F77\n\n# Commands to strip libraries.\nold_striplib=$lt_old_striplib\nstriplib=$lt_striplib\n\n# Dependencies to place before the objects being linked to create a\n# shared library.\npredep_objects=\\`echo $lt_predep_objects_F77 | \\$SED -e \"s@\\${gcc_dir}@\\\\\\${gcc_dir}@g;s@\\${gcc_ver}@\\\\\\${gcc_ver}@g\"\\`\n\n# Dependencies to place after the objects being linked to create a\n# shared library.\npostdep_objects=\\`echo $lt_postdep_objects_F77 | \\$SED -e \"s@\\${gcc_dir}@\\\\\\${gcc_dir}@g;s@\\${gcc_ver}@\\\\\\${gcc_ver}@g\"\\`\n\n# Dependencies to place before the objects being linked to create a\n# shared library.\npredeps=$lt_predeps_F77\n\n# Dependencies to place after the objects being linked to create a\n# shared library.\npostdeps=$lt_postdeps_F77\n\n# The library search path used internally by the compiler when linking\n# a shared library.\ncompiler_lib_search_path=\\`echo $lt_compiler_lib_search_path_F77 | \\$SED -e \"s@\\${gcc_dir}@\\\\\\${gcc_dir}@g;s@\\${gcc_ver}@\\\\\\${gcc_ver}@g\"\\`\n\n# Method to check whether dependent libraries are shared objects.\ndeplibs_check_method=$lt_deplibs_check_method\n\n# Command to use when deplibs_check_method == file_magic.\nfile_magic_cmd=$lt_file_magic_cmd\n\n# Flag that allows shared libraries with undefined symbols to be built.\nallow_undefined_flag=$lt_allow_undefined_flag_F77\n\n# Flag that forces no undefined symbols.\nno_undefined_flag=$lt_no_undefined_flag_F77\n\n# Commands used to finish a libtool library installation in a directory.\nfinish_cmds=$lt_finish_cmds\n\n# Same as above, but a single script fragment to be evaled but not shown.\nfinish_eval=$lt_finish_eval\n\n# Take the output of nm and produce a listing of raw symbols and C names.\nglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe\n\n# Transform the output of nm in a proper C declaration\nglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl\n\n# Transform the output of nm in a C name address pair\nglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address\n\n# This is the shared library runtime path variable.\nrunpath_var=$runpath_var\n\n# This is the shared library path variable.\nshlibpath_var=$shlibpath_var\n\n# Is shlibpath searched before the hard-coded library search path?\nshlibpath_overrides_runpath=$shlibpath_overrides_runpath\n\n# How to hardcode a shared library path into an executable.\nhardcode_action=$hardcode_action_F77\n\n# Whether we should hardcode library paths into libraries.\nhardcode_into_libs=$hardcode_into_libs\n\n# Flag to hardcode \\$libdir into a binary during linking.\n# This must work even if \\$libdir does not exist.\nhardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77\n\n# If ld is used when linking, flag to hardcode \\$libdir into\n# a binary during linking. This must work even if \\$libdir does\n# not exist.\nhardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77\n\n# Whether we need a single -rpath flag with a separated argument.\nhardcode_libdir_separator=$lt_hardcode_libdir_separator_F77\n\n# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the\n# resulting binary.\nhardcode_direct=$hardcode_direct_F77\n\n# Set to yes if using the -LDIR flag during linking hardcodes DIR into the\n# resulting binary.\nhardcode_minus_L=$hardcode_minus_L_F77\n\n# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into\n# the resulting binary.\nhardcode_shlibpath_var=$hardcode_shlibpath_var_F77\n\n# Set to yes if building a shared library automatically hardcodes DIR into the library\n# and all subsequent libraries and executables linked against it.\nhardcode_automatic=$hardcode_automatic_F77\n\n# Variables whose values should be saved in libtool wrapper scripts and\n# restored at relink time.\nvariables_saved_for_relink=\"$variables_saved_for_relink\"\n\n# Whether libtool must link a program against all its dependency libraries.\nlink_all_deplibs=$link_all_deplibs_F77\n\n# Compile-time system search path for libraries\nsys_lib_search_path_spec=\\`echo $lt_sys_lib_search_path_spec | \\$SED -e \"s@\\${gcc_dir}@\\\\\\${gcc_dir}@g;s@\\${gcc_ver}@\\\\\\${gcc_ver}@g\"\\`\n\n# Run-time system search path for libraries\nsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec\n\n# Fix the shell variable \\$srcfile for the compiler.\nfix_srcfile_path=\"$fix_srcfile_path_F77\"\n\n# Set to yes if exported symbols are required.\nalways_export_symbols=$always_export_symbols_F77\n\n# The commands to list exported symbols.\nexport_symbols_cmds=$lt_export_symbols_cmds_F77\n\n# The commands to extract the exported symbol list from a shared archive.\nextract_expsyms_cmds=$lt_extract_expsyms_cmds\n\n# Symbols that should not be listed in the preloaded symbols.\nexclude_expsyms=$lt_exclude_expsyms_F77\n\n# Symbols that must always be exported.\ninclude_expsyms=$lt_include_expsyms_F77\n\n# ### END LIBTOOL TAG CONFIG: $tagname\n\n__EOF__\n\n\nelse\n  # If there is no Makefile yet, we rely on a make rule to execute\n  # `config.status --recheck' to rerun these tests and create the\n  # libtool script then.\n  ltmain_in=`echo $ltmain | sed -e 's/\\.sh$/.in/'`\n  if test -f \"$ltmain_in\"; then\n    test -f Makefile && make \"$ltmain\"\n  fi\nfi\n\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\nCC=\"$lt_save_CC\"\n\n\telse\n\t  tagname=\"\"\n\tfi\n\t;;\n\n      GCJ)\n\tif test -n \"$GCJ\" && test \"X$GCJ\" != \"Xno\"; then\n\n\n\n# Source file extension for Java test sources.\nac_ext=java\n\n# Object file extension for compiled Java test sources.\nobjext=o\nobjext_GCJ=$objext\n\n# Code to be used in simple compile tests\nlt_simple_compile_test_code=\"class foo {}\\n\"\n\n# Code to be used in simple link tests\nlt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\\n'\n\n# ltmain only uses $CC for tagged configurations so make sure $CC is set.\n\n# If no C compiler was specified, use CC.\nLTCC=${LTCC-\"$CC\"}\n\n# If no C compiler flags were specified, use CFLAGS.\nLTCFLAGS=${LTCFLAGS-\"$CFLAGS\"}\n\n# Allow CC to be a program name with arguments.\ncompiler=$CC\n\n\n# save warnings/boilerplate of simple test code\nac_outfile=conftest.$ac_objext\nprintf \"$lt_simple_compile_test_code\" >conftest.$ac_ext\neval \"$ac_compile\" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err\n_lt_compiler_boilerplate=`cat conftest.err`\n$rm conftest*\n\nac_outfile=conftest.$ac_objext\nprintf \"$lt_simple_link_test_code\" >conftest.$ac_ext\neval \"$ac_link\" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err\n_lt_linker_boilerplate=`cat conftest.err`\n$rm conftest*\n\n\n# Allow CC to be a program name with arguments.\nlt_save_CC=\"$CC\"\nCC=${GCJ-\"gcj\"}\ncompiler=$CC\ncompiler_GCJ=$CC\nfor cc_temp in $compiler\"\"; do\n  case $cc_temp in\n    compile | *[\\\\/]compile | ccache | *[\\\\/]ccache ) ;;\n    distcc | *[\\\\/]distcc | purify | *[\\\\/]purify ) ;;\n    \\-*) ;;\n    *) break;;\n  esac\ndone\ncc_basename=`$echo \"X$cc_temp\" | $Xsed -e 's%.*/%%' -e \"s%^$host_alias-%%\"`\n\n\n# GCJ did not exist at the time GCC didn't implicitly link libc in.\narchive_cmds_need_lc_GCJ=no\n\nold_archive_cmds_GCJ=$old_archive_cmds\n\n\nlt_prog_compiler_no_builtin_flag_GCJ=\n\nif test \"$GCC\" = yes; then\n  lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin'\n\n\necho \"$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions\" >&5\necho $ECHO_N \"checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C\" >&6\nif test \"${lt_cv_prog_compiler_rtti_exceptions+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  lt_cv_prog_compiler_rtti_exceptions=no\n  ac_outfile=conftest.$ac_objext\n   printf \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n   lt_compiler_flag=\"-fno-rtti -fno-exceptions\"\n   # Insert the option either (1) after the last *FLAGS variable, or\n   # (2) before a word containing \"conftest.\", or (3) at the end.\n   # Note that $ac_compile itself does not contain backslashes and begins\n   # with a dollar sign (not a hyphen), so the echo should work correctly.\n   # The option is referenced via a variable to avoid confusing sed.\n   lt_compile=`echo \"$ac_compile\" | $SED \\\n   -e 's:.*FLAGS}\\{0,1\\} :&$lt_compiler_flag :; t' \\\n   -e 's: [^ ]*conftest\\.: $lt_compiler_flag&:; t' \\\n   -e 's:$: $lt_compiler_flag:'`\n   (eval echo \"\\\"\\$as_me:17141: $lt_compile\\\"\" >&5)\n   (eval \"$lt_compile\" 2>conftest.err)\n   ac_status=$?\n   cat conftest.err >&5\n   echo \"$as_me:17145: \\$? = $ac_status\" >&5\n   if (exit $ac_status) && test -s \"$ac_outfile\"; then\n     # The compiler can only warn and ignore the option if not recognized\n     # So say no if there are warnings other than the usual output.\n     $echo \"X$_lt_compiler_boilerplate\" | $Xsed -e '/^$/d' >conftest.exp\n     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2\n     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then\n       lt_cv_prog_compiler_rtti_exceptions=yes\n     fi\n   fi\n   $rm conftest*\n\nfi\necho \"$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions\" >&5\necho \"${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions\" >&6\n\nif test x\"$lt_cv_prog_compiler_rtti_exceptions\" = xyes; then\n    lt_prog_compiler_no_builtin_flag_GCJ=\"$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions\"\nelse\n    :\nfi\n\nfi\n\nlt_prog_compiler_wl_GCJ=\nlt_prog_compiler_pic_GCJ=\nlt_prog_compiler_static_GCJ=\n\necho \"$as_me:$LINENO: checking for $compiler option to produce PIC\" >&5\necho $ECHO_N \"checking for $compiler option to produce PIC... $ECHO_C\" >&6\n\n  if test \"$GCC\" = yes; then\n    lt_prog_compiler_wl_GCJ='-Wl,'\n    lt_prog_compiler_static_GCJ='-static'\n\n    case $host_os in\n      aix*)\n      # All AIX code is PIC.\n      if test \"$host_cpu\" = ia64; then\n\t# AIX 5 now supports IA64 processor\n\tlt_prog_compiler_static_GCJ='-Bstatic'\n      fi\n      ;;\n\n    amigaos*)\n      # FIXME: we need at least 68020 code to build shared libraries, but\n      # adding the `-m68020' flag to GCC prevents building anything better,\n      # like `-m68040'.\n      lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4'\n      ;;\n\n    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)\n      # PIC is the default for these OSes.\n      ;;\n\n    mingw* | pw32* | os2*)\n      # This hack is so that the source file can tell whether it is being\n      # built for inclusion in a dll (and should export symbols for example).\n      lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'\n      ;;\n\n    darwin* | rhapsody*)\n      # PIC is the default on this platform\n      # Common symbols not allowed in MH_DYLIB files\n      lt_prog_compiler_pic_GCJ='-fno-common'\n      ;;\n\n    interix3*)\n      # Interix 3.x gcc -fpic/-fPIC options generate broken code.\n      # Instead, we relocate shared libraries at runtime.\n      ;;\n\n    msdosdjgpp*)\n      # Just because we use GCC doesn't mean we suddenly get shared libraries\n      # on systems that don't support them.\n      lt_prog_compiler_can_build_shared_GCJ=no\n      enable_shared=no\n      ;;\n\n    sysv4*MP*)\n      if test -d /usr/nec; then\n\tlt_prog_compiler_pic_GCJ=-Kconform_pic\n      fi\n      ;;\n\n    hpux*)\n      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but\n      # not for PA HP-UX.\n      case $host_cpu in\n      hppa*64*|ia64*)\n\t# +Z the default\n\t;;\n      *)\n\tlt_prog_compiler_pic_GCJ='-fPIC'\n\t;;\n      esac\n      ;;\n\n    *)\n      lt_prog_compiler_pic_GCJ='-fPIC'\n      ;;\n    esac\n  else\n    # PORTME Check for flag to pass linker flags through the system compiler.\n    case $host_os in\n    aix*)\n      lt_prog_compiler_wl_GCJ='-Wl,'\n      if test \"$host_cpu\" = ia64; then\n\t# AIX 5 now supports IA64 processor\n\tlt_prog_compiler_static_GCJ='-Bstatic'\n      else\n\tlt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp'\n      fi\n      ;;\n      darwin*)\n        # PIC is the default on this platform\n        # Common symbols not allowed in MH_DYLIB files\n       case $cc_basename in\n         xlc*)\n         lt_prog_compiler_pic_GCJ='-qnocommon'\n         lt_prog_compiler_wl_GCJ='-Wl,'\n         ;;\n       esac\n       ;;\n\n    mingw* | pw32* | os2*)\n      # This hack is so that the source file can tell whether it is being\n      # built for inclusion in a dll (and should export symbols for example).\n      lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'\n      ;;\n\n    hpux9* | hpux10* | hpux11*)\n      lt_prog_compiler_wl_GCJ='-Wl,'\n      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but\n      # not for PA HP-UX.\n      case $host_cpu in\n      hppa*64*|ia64*)\n\t# +Z the default\n\t;;\n      *)\n\tlt_prog_compiler_pic_GCJ='+Z'\n\t;;\n      esac\n      # Is there a better lt_prog_compiler_static that works with the bundled CC?\n      lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive'\n      ;;\n\n    irix5* | irix6* | nonstopux*)\n      lt_prog_compiler_wl_GCJ='-Wl,'\n      # PIC (with -KPIC) is the default.\n      lt_prog_compiler_static_GCJ='-non_shared'\n      ;;\n\n    newsos6)\n      lt_prog_compiler_pic_GCJ='-KPIC'\n      lt_prog_compiler_static_GCJ='-Bstatic'\n      ;;\n\n    linux*)\n      case $cc_basename in\n      icc* | ecc*)\n\tlt_prog_compiler_wl_GCJ='-Wl,'\n\tlt_prog_compiler_pic_GCJ='-KPIC'\n\tlt_prog_compiler_static_GCJ='-static'\n        ;;\n      pgcc* | pgf77* | pgf90* | pgf95*)\n        # Portland Group compilers (*not* the Pentium gcc compiler,\n\t# which looks to be a dead project)\n\tlt_prog_compiler_wl_GCJ='-Wl,'\n\tlt_prog_compiler_pic_GCJ='-fpic'\n\tlt_prog_compiler_static_GCJ='-Bstatic'\n        ;;\n      ccc*)\n        lt_prog_compiler_wl_GCJ='-Wl,'\n        # All Alpha code is PIC.\n        lt_prog_compiler_static_GCJ='-non_shared'\n        ;;\n      esac\n      ;;\n\n    osf3* | osf4* | osf5*)\n      lt_prog_compiler_wl_GCJ='-Wl,'\n      # All OSF/1 code is PIC.\n      lt_prog_compiler_static_GCJ='-non_shared'\n      ;;\n\n    solaris*)\n      lt_prog_compiler_pic_GCJ='-KPIC'\n      lt_prog_compiler_static_GCJ='-Bstatic'\n      case $cc_basename in\n      f77* | f90* | f95*)\n\tlt_prog_compiler_wl_GCJ='-Qoption ld ';;\n      *)\n\tlt_prog_compiler_wl_GCJ='-Wl,';;\n      esac\n      ;;\n\n    sunos4*)\n      lt_prog_compiler_wl_GCJ='-Qoption ld '\n      lt_prog_compiler_pic_GCJ='-PIC'\n      lt_prog_compiler_static_GCJ='-Bstatic'\n      ;;\n\n    sysv4 | sysv4.2uw2* | sysv4.3*)\n      lt_prog_compiler_wl_GCJ='-Wl,'\n      lt_prog_compiler_pic_GCJ='-KPIC'\n      lt_prog_compiler_static_GCJ='-Bstatic'\n      ;;\n\n    sysv4*MP*)\n      if test -d /usr/nec ;then\n\tlt_prog_compiler_pic_GCJ='-Kconform_pic'\n\tlt_prog_compiler_static_GCJ='-Bstatic'\n      fi\n      ;;\n\n    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)\n      lt_prog_compiler_wl_GCJ='-Wl,'\n      lt_prog_compiler_pic_GCJ='-KPIC'\n      lt_prog_compiler_static_GCJ='-Bstatic'\n      ;;\n\n    unicos*)\n      lt_prog_compiler_wl_GCJ='-Wl,'\n      lt_prog_compiler_can_build_shared_GCJ=no\n      ;;\n\n    uts4*)\n      lt_prog_compiler_pic_GCJ='-pic'\n      lt_prog_compiler_static_GCJ='-Bstatic'\n      ;;\n\n    *)\n      lt_prog_compiler_can_build_shared_GCJ=no\n      ;;\n    esac\n  fi\n\necho \"$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ\" >&5\necho \"${ECHO_T}$lt_prog_compiler_pic_GCJ\" >&6\n\n#\n# Check to make sure the PIC flag actually works.\n#\nif test -n \"$lt_prog_compiler_pic_GCJ\"; then\n\necho \"$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works\" >&5\necho $ECHO_N \"checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C\" >&6\nif test \"${lt_prog_compiler_pic_works_GCJ+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  lt_prog_compiler_pic_works_GCJ=no\n  ac_outfile=conftest.$ac_objext\n   printf \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n   lt_compiler_flag=\"$lt_prog_compiler_pic_GCJ\"\n   # Insert the option either (1) after the last *FLAGS variable, or\n   # (2) before a word containing \"conftest.\", or (3) at the end.\n   # Note that $ac_compile itself does not contain backslashes and begins\n   # with a dollar sign (not a hyphen), so the echo should work correctly.\n   # The option is referenced via a variable to avoid confusing sed.\n   lt_compile=`echo \"$ac_compile\" | $SED \\\n   -e 's:.*FLAGS}\\{0,1\\} :&$lt_compiler_flag :; t' \\\n   -e 's: [^ ]*conftest\\.: $lt_compiler_flag&:; t' \\\n   -e 's:$: $lt_compiler_flag:'`\n   (eval echo \"\\\"\\$as_me:17409: $lt_compile\\\"\" >&5)\n   (eval \"$lt_compile\" 2>conftest.err)\n   ac_status=$?\n   cat conftest.err >&5\n   echo \"$as_me:17413: \\$? = $ac_status\" >&5\n   if (exit $ac_status) && test -s \"$ac_outfile\"; then\n     # The compiler can only warn and ignore the option if not recognized\n     # So say no if there are warnings other than the usual output.\n     $echo \"X$_lt_compiler_boilerplate\" | $Xsed -e '/^$/d' >conftest.exp\n     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2\n     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then\n       lt_prog_compiler_pic_works_GCJ=yes\n     fi\n   fi\n   $rm conftest*\n\nfi\necho \"$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ\" >&5\necho \"${ECHO_T}$lt_prog_compiler_pic_works_GCJ\" >&6\n\nif test x\"$lt_prog_compiler_pic_works_GCJ\" = xyes; then\n    case $lt_prog_compiler_pic_GCJ in\n     \"\" | \" \"*) ;;\n     *) lt_prog_compiler_pic_GCJ=\" $lt_prog_compiler_pic_GCJ\" ;;\n     esac\nelse\n    lt_prog_compiler_pic_GCJ=\n     lt_prog_compiler_can_build_shared_GCJ=no\nfi\n\nfi\ncase $host_os in\n  # For platforms which do not support PIC, -DPIC is meaningless:\n  *djgpp*)\n    lt_prog_compiler_pic_GCJ=\n    ;;\n  *)\n    lt_prog_compiler_pic_GCJ=\"$lt_prog_compiler_pic_GCJ\"\n    ;;\nesac\n\n#\n# Check to make sure the static flag actually works.\n#\nwl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\\\"$lt_prog_compiler_static_GCJ\\\"\necho \"$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works\" >&5\necho $ECHO_N \"checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C\" >&6\nif test \"${lt_prog_compiler_static_works_GCJ+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  lt_prog_compiler_static_works_GCJ=no\n   save_LDFLAGS=\"$LDFLAGS\"\n   LDFLAGS=\"$LDFLAGS $lt_tmp_static_flag\"\n   printf \"$lt_simple_link_test_code\" > conftest.$ac_ext\n   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then\n     # The linker can only warn and ignore the option if not recognized\n     # So say no if there are warnings\n     if test -s conftest.err; then\n       # Append any errors to the config.log.\n       cat conftest.err 1>&5\n       $echo \"X$_lt_linker_boilerplate\" | $Xsed -e '/^$/d' > conftest.exp\n       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2\n       if diff conftest.exp conftest.er2 >/dev/null; then\n         lt_prog_compiler_static_works_GCJ=yes\n       fi\n     else\n       lt_prog_compiler_static_works_GCJ=yes\n     fi\n   fi\n   $rm conftest*\n   LDFLAGS=\"$save_LDFLAGS\"\n\nfi\necho \"$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ\" >&5\necho \"${ECHO_T}$lt_prog_compiler_static_works_GCJ\" >&6\n\nif test x\"$lt_prog_compiler_static_works_GCJ\" = xyes; then\n    :\nelse\n    lt_prog_compiler_static_GCJ=\nfi\n\n\necho \"$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext\" >&5\necho $ECHO_N \"checking if $compiler supports -c -o file.$ac_objext... $ECHO_C\" >&6\nif test \"${lt_cv_prog_compiler_c_o_GCJ+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  lt_cv_prog_compiler_c_o_GCJ=no\n   $rm -r conftest 2>/dev/null\n   mkdir conftest\n   cd conftest\n   mkdir out\n   printf \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n\n   lt_compiler_flag=\"-o out/conftest2.$ac_objext\"\n   # Insert the option either (1) after the last *FLAGS variable, or\n   # (2) before a word containing \"conftest.\", or (3) at the end.\n   # Note that $ac_compile itself does not contain backslashes and begins\n   # with a dollar sign (not a hyphen), so the echo should work correctly.\n   lt_compile=`echo \"$ac_compile\" | $SED \\\n   -e 's:.*FLAGS}\\{0,1\\} :&$lt_compiler_flag :; t' \\\n   -e 's: [^ ]*conftest\\.: $lt_compiler_flag&:; t' \\\n   -e 's:$: $lt_compiler_flag:'`\n   (eval echo \"\\\"\\$as_me:17513: $lt_compile\\\"\" >&5)\n   (eval \"$lt_compile\" 2>out/conftest.err)\n   ac_status=$?\n   cat out/conftest.err >&5\n   echo \"$as_me:17517: \\$? = $ac_status\" >&5\n   if (exit $ac_status) && test -s out/conftest2.$ac_objext\n   then\n     # The compiler can only warn and ignore the option if not recognized\n     # So say no if there are warnings\n     $echo \"X$_lt_compiler_boilerplate\" | $Xsed -e '/^$/d' > out/conftest.exp\n     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2\n     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then\n       lt_cv_prog_compiler_c_o_GCJ=yes\n     fi\n   fi\n   chmod u+w . 2>&5\n   $rm conftest*\n   # SGI C++ compiler will create directory out/ii_files/ for\n   # template instantiation\n   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files\n   $rm out/* && rmdir out\n   cd ..\n   rmdir conftest\n   $rm conftest*\n\nfi\necho \"$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ\" >&5\necho \"${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ\" >&6\n\n\nhard_links=\"nottested\"\nif test \"$lt_cv_prog_compiler_c_o_GCJ\" = no && test \"$need_locks\" != no; then\n  # do not overwrite the value of need_locks provided by the user\n  echo \"$as_me:$LINENO: checking if we can lock with hard links\" >&5\necho $ECHO_N \"checking if we can lock with hard links... $ECHO_C\" >&6\n  hard_links=yes\n  $rm conftest*\n  ln conftest.a conftest.b 2>/dev/null && hard_links=no\n  touch conftest.a\n  ln conftest.a conftest.b 2>&5 || hard_links=no\n  ln conftest.a conftest.b 2>/dev/null && hard_links=no\n  echo \"$as_me:$LINENO: result: $hard_links\" >&5\necho \"${ECHO_T}$hard_links\" >&6\n  if test \"$hard_links\" = no; then\n    { echo \"$as_me:$LINENO: WARNING: \\`$CC' does not support \\`-c -o', so \\`make -j' may be unsafe\" >&5\necho \"$as_me: WARNING: \\`$CC' does not support \\`-c -o', so \\`make -j' may be unsafe\" >&2;}\n    need_locks=warn\n  fi\nelse\n  need_locks=no\nfi\n\necho \"$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries\" >&5\necho $ECHO_N \"checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C\" >&6\n\n  runpath_var=\n  allow_undefined_flag_GCJ=\n  enable_shared_with_static_runtimes_GCJ=no\n  archive_cmds_GCJ=\n  archive_expsym_cmds_GCJ=\n  old_archive_From_new_cmds_GCJ=\n  old_archive_from_expsyms_cmds_GCJ=\n  export_dynamic_flag_spec_GCJ=\n  whole_archive_flag_spec_GCJ=\n  thread_safe_flag_spec_GCJ=\n  hardcode_libdir_flag_spec_GCJ=\n  hardcode_libdir_flag_spec_ld_GCJ=\n  hardcode_libdir_separator_GCJ=\n  hardcode_direct_GCJ=no\n  hardcode_minus_L_GCJ=no\n  hardcode_shlibpath_var_GCJ=unsupported\n  link_all_deplibs_GCJ=unknown\n  hardcode_automatic_GCJ=no\n  module_cmds_GCJ=\n  module_expsym_cmds_GCJ=\n  always_export_symbols_GCJ=no\n  export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\\''s/.* //'\\'' | sort | uniq > $export_symbols'\n  # include_expsyms should be a list of space-separated symbols to be *always*\n  # included in the symbol list\n  include_expsyms_GCJ=\n  # exclude_expsyms can be an extended regexp of symbols to exclude\n  # it will be wrapped by ` (' and `)$', so one must not match beginning or\n  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',\n  # as well as any symbol that contains `d'.\n  exclude_expsyms_GCJ=\"_GLOBAL_OFFSET_TABLE_\"\n  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out\n  # platforms (ab)use it in PIC code, but their linkers get confused if\n  # the symbol is explicitly referenced.  Since portable code cannot\n  # rely on this symbol name, it's probably fine to never include it in\n  # preloaded symbol tables.\n  extract_expsyms_cmds=\n  # Just being paranoid about ensuring that cc_basename is set.\n  for cc_temp in $compiler\"\"; do\n  case $cc_temp in\n    compile | *[\\\\/]compile | ccache | *[\\\\/]ccache ) ;;\n    distcc | *[\\\\/]distcc | purify | *[\\\\/]purify ) ;;\n    \\-*) ;;\n    *) break;;\n  esac\ndone\ncc_basename=`$echo \"X$cc_temp\" | $Xsed -e 's%.*/%%' -e \"s%^$host_alias-%%\"`\n\n  case $host_os in\n  cygwin* | mingw* | pw32*)\n    # FIXME: the MSVC++ port hasn't been tested in a loooong time\n    # When not using gcc, we currently assume that we are using\n    # Microsoft Visual C++.\n    if test \"$GCC\" != yes; then\n      with_gnu_ld=no\n    fi\n    ;;\n  interix*)\n    # we just hope/assume this is gcc and not c89 (= MSVC++)\n    with_gnu_ld=yes\n    ;;\n  openbsd*)\n    with_gnu_ld=no\n    ;;\n  esac\n\n  ld_shlibs_GCJ=yes\n  if test \"$with_gnu_ld\" = yes; then\n    # If archive_cmds runs LD, not CC, wlarc should be empty\n    wlarc='${wl}'\n\n    # Set some defaults for GNU ld with shared library support. These\n    # are reset later if shared libraries are not supported. Putting them\n    # here allows them to be overridden if necessary.\n    runpath_var=LD_RUN_PATH\n    hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir'\n    export_dynamic_flag_spec_GCJ='${wl}--export-dynamic'\n    # ancient GNU ld didn't support --whole-archive et. al.\n    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then\n\twhole_archive_flag_spec_GCJ=\"$wlarc\"'--whole-archive$convenience '\"$wlarc\"'--no-whole-archive'\n      else\n  \twhole_archive_flag_spec_GCJ=\n    fi\n    supports_anon_versioning=no\n    case `$LD -v 2>/dev/null` in\n      *\\ [01].* | *\\ 2.[0-9].* | *\\ 2.10.*) ;; # catch versions < 2.11\n      *\\ 2.11.93.0.2\\ *) supports_anon_versioning=yes ;; # RH7.3 ...\n      *\\ 2.11.92.0.12\\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...\n      *\\ 2.11.*) ;; # other 2.11 versions\n      *) supports_anon_versioning=yes ;;\n    esac\n\n    # See if GNU ld supports shared libraries.\n    case $host_os in\n    aix3* | aix4* | aix5*)\n      # On AIX/PPC, the GNU linker is very broken\n      if test \"$host_cpu\" != ia64; then\n\tld_shlibs_GCJ=no\n\tcat <<EOF 1>&2\n\n*** Warning: the GNU linker, at least up to release 2.9.1, is reported\n*** to be unable to reliably create shared libraries on AIX.\n*** Therefore, libtool is disabling shared libraries support.  If you\n*** really care for shared libraries, you may want to modify your PATH\n*** so that a non-GNU linker is found, and then restart.\n\nEOF\n      fi\n      ;;\n\n    amigaos*)\n      archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo \"#define NAME $libname\" > $output_objdir/a2ixlibrary.data~$echo \"#define LIBRARY_ID 1\" >> $output_objdir/a2ixlibrary.data~$echo \"#define VERSION $major\" >> $output_objdir/a2ixlibrary.data~$echo \"#define REVISION $revision\" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'\n      hardcode_libdir_flag_spec_GCJ='-L$libdir'\n      hardcode_minus_L_GCJ=yes\n\n      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports\n      # that the semantics of dynamic libraries on AmigaOS, at least up\n      # to version 4, is to share data among multiple programs linked\n      # with the same dynamic library.  Since this doesn't match the\n      # behavior of shared libraries on other platforms, we can't use\n      # them.\n      ld_shlibs_GCJ=no\n      ;;\n\n    beos*)\n      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then\n\tallow_undefined_flag_GCJ=unsupported\n\t# Joseph Beckenbach <jrb3@best.com> says some releases of gcc\n\t# support --undefined.  This deserves some investigation.  FIXME\n\tarchive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n      else\n\tld_shlibs_GCJ=no\n      fi\n      ;;\n\n    cygwin* | mingw* | pw32*)\n      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless,\n      # as there is no search path for DLLs.\n      hardcode_libdir_flag_spec_GCJ='-L$libdir'\n      allow_undefined_flag_GCJ=unsupported\n      always_export_symbols_GCJ=no\n      enable_shared_with_static_runtimes_GCJ=yes\n      export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\\''/^[BCDGRS] /s/.* \\([^ ]*\\)/\\1 DATA/'\\'' | $SED -e '\\''/^[AITW] /s/.* //'\\'' | sort | uniq > $export_symbols'\n\n      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then\n        archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'\n\t# If the export-symbols file already is a .def file (1st line\n\t# is EXPORTS), use it as is; otherwise, prepend...\n\tarchive_expsym_cmds_GCJ='if test \"x`$SED 1q $export_symbols`\" = xEXPORTS; then\n\t  cp $export_symbols $output_objdir/$soname.def;\n\telse\n\t  echo EXPORTS > $output_objdir/$soname.def;\n\t  cat $export_symbols >> $output_objdir/$soname.def;\n\tfi~\n\t$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'\n      else\n\tld_shlibs_GCJ=no\n      fi\n      ;;\n\n    interix3*)\n      hardcode_direct_GCJ=no\n      hardcode_shlibpath_var_GCJ=no\n      hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'\n      export_dynamic_flag_spec_GCJ='${wl}-E'\n      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.\n      # Instead, shared libraries are loaded at an image base (0x10000000 by\n      # default) and relocated if they conflict, which is a slow very memory\n      # consuming and fragmenting process.  To avoid this, we pick a random,\n      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link\n      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.\n      archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \\* 262144 + 1342177280` -o $lib'\n      archive_expsym_cmds_GCJ='sed \"s,^,_,\" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \\* 262144 + 1342177280` -o $lib'\n      ;;\n\n    linux*)\n      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then\n\ttmp_addflag=\n\tcase $cc_basename,$host_cpu in\n\tpgcc*)\t\t\t\t# Portland Group C compiler\n\t  whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\\\"\\\"; do test  -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience,$conv\\\"; done; $echo \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n\t  tmp_addflag=' $pic_flag'\n\t  ;;\n\tpgf77* | pgf90* | pgf95*)\t# Portland Group f77 and f90 compilers\n\t  whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\\\"\\\"; do test  -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience,$conv\\\"; done; $echo \\\"$new_convenience\\\"` ${wl}--no-whole-archive'\n\t  tmp_addflag=' $pic_flag -Mnomain' ;;\n\tecc*,ia64* | icc*,ia64*)\t\t# Intel C compiler on ia64\n\t  tmp_addflag=' -i_dynamic' ;;\n\tefc*,ia64* | ifort*,ia64*)\t# Intel Fortran compiler on ia64\n\t  tmp_addflag=' -i_dynamic -nofor_main' ;;\n\tifc* | ifort*)\t\t\t# Intel Fortran compiler\n\t  tmp_addflag=' -nofor_main' ;;\n\tesac\n\tarchive_cmds_GCJ='$CC -shared'\"$tmp_addflag\"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\n\tif test $supports_anon_versioning = yes; then\n\t  archive_expsym_cmds_GCJ='$echo \"{ global:\" > $output_objdir/$libname.ver~\n  cat $export_symbols | sed -e \"s/\\(.*\\)/\\1;/\" >> $output_objdir/$libname.ver~\n  $echo \"local: *; };\" >> $output_objdir/$libname.ver~\n\t  $CC -shared'\"$tmp_addflag\"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'\n\tfi\n      else\n\tld_shlibs_GCJ=no\n      fi\n      ;;\n\n    netbsd*)\n      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then\n\tarchive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'\n\twlarc=\n      else\n\tarchive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\tarchive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n      fi\n      ;;\n\n    solaris*)\n      if $LD -v 2>&1 | grep 'BFD 2\\.8' > /dev/null; then\n\tld_shlibs_GCJ=no\n\tcat <<EOF 1>&2\n\n*** Warning: The releases 2.8.* of the GNU linker cannot reliably\n*** create shared libraries on Solaris systems.  Therefore, libtool\n*** is disabling shared libraries support.  We urge you to upgrade GNU\n*** binutils to release 2.9.1 or newer.  Another option is to modify\n*** your PATH or compiler configuration so that the native linker is\n*** used, and then restart.\n\nEOF\n      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then\n\tarchive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\tarchive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n      else\n\tld_shlibs_GCJ=no\n      fi\n      ;;\n\n    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)\n      case `$LD -v 2>&1` in\n        *\\ [01].* | *\\ 2.[0-9].* | *\\ 2.1[0-5].*)\n\tld_shlibs_GCJ=no\n\tcat <<_LT_EOF 1>&2\n\n*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not\n*** reliably create shared libraries on SCO systems.  Therefore, libtool\n*** is disabling shared libraries support.  We urge you to upgrade GNU\n*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify\n*** your PATH or compiler configuration so that the native linker is\n*** used, and then restart.\n\n_LT_EOF\n\t;;\n\t*)\n\t  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then\n\t    hardcode_libdir_flag_spec_GCJ='`test -z \"$SCOABSPATH\" && echo ${wl}-rpath,$libdir`'\n\t    archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'\n\t    archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'\n\t  else\n\t    ld_shlibs_GCJ=no\n\t  fi\n\t;;\n      esac\n      ;;\n\n    sunos4*)\n      archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'\n      wlarc=\n      hardcode_direct_GCJ=yes\n      hardcode_shlibpath_var_GCJ=no\n      ;;\n\n    *)\n      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then\n\tarchive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n\tarchive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n      else\n\tld_shlibs_GCJ=no\n      fi\n      ;;\n    esac\n\n    if test \"$ld_shlibs_GCJ\" = no; then\n      runpath_var=\n      hardcode_libdir_flag_spec_GCJ=\n      export_dynamic_flag_spec_GCJ=\n      whole_archive_flag_spec_GCJ=\n    fi\n  else\n    # PORTME fill in a description of your system's linker (not GNU ld)\n    case $host_os in\n    aix3*)\n      allow_undefined_flag_GCJ=unsupported\n      always_export_symbols_GCJ=yes\n      archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'\n      # Note: this linker hardcodes the directories in LIBPATH if there\n      # are no directories specified by -L.\n      hardcode_minus_L_GCJ=yes\n      if test \"$GCC\" = yes && test -z \"$lt_prog_compiler_static\"; then\n\t# Neither direct hardcoding nor static linking is supported with a\n\t# broken collect2.\n\thardcode_direct_GCJ=unsupported\n      fi\n      ;;\n\n    aix4* | aix5*)\n      if test \"$host_cpu\" = ia64; then\n\t# On IA64, the linker does run time linking by default, so we don't\n\t# have to do anything special.\n\taix_use_runtimelinking=no\n\texp_sym_flag='-Bexport'\n\tno_entry_flag=\"\"\n      else\n\t# If we're using GNU nm, then we don't want the \"-C\" option.\n\t# -C means demangle to AIX nm, but means don't demangle with GNU nm\n\tif $NM -V 2>&1 | grep 'GNU' > /dev/null; then\n\t  export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\\''{ if (((\\$2 == \"T\") || (\\$2 == \"D\") || (\\$2 == \"B\")) && (substr(\\$3,1,1) != \".\")) { print \\$3 } }'\\'' | sort -u > $export_symbols'\n\telse\n\t  export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\\''{ if (((\\$2 == \"T\") || (\\$2 == \"D\") || (\\$2 == \"B\")) && (substr(\\$3,1,1) != \".\")) { print \\$3 } }'\\'' | sort -u > $export_symbols'\n\tfi\n\taix_use_runtimelinking=no\n\n\t# Test if we are trying to use run time linking or normal\n\t# AIX style linking. If -brtl is somewhere in LDFLAGS, we\n\t# need to do runtime linking.\n\tcase $host_os in aix4.[23]|aix4.[23].*|aix5*)\n\t  for ld_flag in $LDFLAGS; do\n  \t  if (test $ld_flag = \"-brtl\" || test $ld_flag = \"-Wl,-brtl\"); then\n  \t    aix_use_runtimelinking=yes\n  \t    break\n  \t  fi\n\t  done\n\t  ;;\n\tesac\n\n\texp_sym_flag='-bexport'\n\tno_entry_flag='-bnoentry'\n      fi\n\n      # When large executables or shared objects are built, AIX ld can\n      # have problems creating the table of contents.  If linking a library\n      # or program results in \"error TOC overflow\" add -mminimal-toc to\n      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not\n      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.\n\n      archive_cmds_GCJ=''\n      hardcode_direct_GCJ=yes\n      hardcode_libdir_separator_GCJ=':'\n      link_all_deplibs_GCJ=yes\n\n      if test \"$GCC\" = yes; then\n\tcase $host_os in aix4.[012]|aix4.[012].*)\n\t# We only want to do this on AIX 4.2 and lower, the check\n\t# below for broken collect2 doesn't work under 4.3+\n\t  collect2name=`${CC} -print-prog-name=collect2`\n\t  if test -f \"$collect2name\" && \\\n  \t   strings \"$collect2name\" | grep resolve_lib_name >/dev/null\n\t  then\n  \t  # We have reworked collect2\n  \t  hardcode_direct_GCJ=yes\n\t  else\n  \t  # We have old collect2\n  \t  hardcode_direct_GCJ=unsupported\n  \t  # It fails to find uninstalled libraries when the uninstalled\n  \t  # path is not listed in the libpath.  Setting hardcode_minus_L\n  \t  # to unsupported forces relinking\n  \t  hardcode_minus_L_GCJ=yes\n  \t  hardcode_libdir_flag_spec_GCJ='-L$libdir'\n  \t  hardcode_libdir_separator_GCJ=\n\t  fi\n\t  ;;\n\tesac\n\tshared_flag='-shared'\n\tif test \"$aix_use_runtimelinking\" = yes; then\n\t  shared_flag=\"$shared_flag \"'${wl}-G'\n\tfi\n      else\n\t# not using gcc\n\tif test \"$host_cpu\" = ia64; then\n  \t# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release\n  \t# chokes on -Wl,-G. The following line is correct:\n\t  shared_flag='-G'\n\telse\n\t  if test \"$aix_use_runtimelinking\" = yes; then\n\t    shared_flag='${wl}-G'\n\t  else\n\t    shared_flag='${wl}-bM:SRE'\n\t  fi\n\tfi\n      fi\n\n      # It seems that -bexpall does not export symbols beginning with\n      # underscore (_), so it is better to generate a list of symbols to export.\n      always_export_symbols_GCJ=yes\n      if test \"$aix_use_runtimelinking\" = yes; then\n\t# Warning - without using the other runtime loading flags (-brtl),\n\t# -berok will link without error, but may produce a broken library.\n\tallow_undefined_flag_GCJ='-berok'\n       # Determine the default libpath from the value encoded in an empty executable.\n       cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n\naix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\\(.*\\)$/\\1/; p; }\n}'`\n# Check for a 64-bit object if we didn't find anything.\nif test -z \"$aix_libpath\"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\\(.*\\)$/\\1/; p; }\n}'`; fi\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nif test -z \"$aix_libpath\"; then aix_libpath=\"/usr/lib:/lib\"; fi\n\n       hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'\"$aix_libpath\"\n\tarchive_expsym_cmds_GCJ=\"\\$CC\"' -o $output_objdir/$soname $libobjs $deplibs '\"\\${wl}$no_entry_flag\"' $compiler_flags `if test \"x${allow_undefined_flag}\" != \"x\"; then echo \"${wl}${allow_undefined_flag}\"; else :; fi` '\"\\${wl}$exp_sym_flag:\\$export_symbols $shared_flag\"\n       else\n\tif test \"$host_cpu\" = ia64; then\n\t  hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib'\n\t  allow_undefined_flag_GCJ=\"-z nodefs\"\n\t  archive_expsym_cmds_GCJ=\"\\$CC $shared_flag\"' -o $output_objdir/$soname $libobjs $deplibs '\"\\${wl}$no_entry_flag\"' $compiler_flags ${wl}${allow_undefined_flag} '\"\\${wl}$exp_sym_flag:\\$export_symbols\"\n\telse\n\t # Determine the default libpath from the value encoded in an empty executable.\n\t cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n\naix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\\(.*\\)$/\\1/; p; }\n}'`\n# Check for a 64-bit object if we didn't find anything.\nif test -z \"$aix_libpath\"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\\(.*\\)$/\\1/; p; }\n}'`; fi\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nif test -z \"$aix_libpath\"; then aix_libpath=\"/usr/lib:/lib\"; fi\n\n\t hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'\"$aix_libpath\"\n\t  # Warning - without using the other run time loading flags,\n\t  # -berok will link without error, but may produce a broken library.\n\t  no_undefined_flag_GCJ=' ${wl}-bernotok'\n\t  allow_undefined_flag_GCJ=' ${wl}-berok'\n\t  # Exported symbols can be pulled into shared objects from archives\n\t  whole_archive_flag_spec_GCJ='$convenience'\n\t  archive_cmds_need_lc_GCJ=yes\n\t  # This is similar to how AIX traditionally builds its shared libraries.\n\t  archive_expsym_cmds_GCJ=\"\\$CC $shared_flag\"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'\n\tfi\n      fi\n      ;;\n\n    amigaos*)\n      archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo \"#define NAME $libname\" > $output_objdir/a2ixlibrary.data~$echo \"#define LIBRARY_ID 1\" >> $output_objdir/a2ixlibrary.data~$echo \"#define VERSION $major\" >> $output_objdir/a2ixlibrary.data~$echo \"#define REVISION $revision\" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'\n      hardcode_libdir_flag_spec_GCJ='-L$libdir'\n      hardcode_minus_L_GCJ=yes\n      # see comment about different semantics on the GNU ld section\n      ld_shlibs_GCJ=no\n      ;;\n\n    bsdi[45]*)\n      export_dynamic_flag_spec_GCJ=-rdynamic\n      ;;\n\n    cygwin* | mingw* | pw32*)\n      # When not using gcc, we currently assume that we are using\n      # Microsoft Visual C++.\n      # hardcode_libdir_flag_spec is actually meaningless, as there is\n      # no search path for DLLs.\n      hardcode_libdir_flag_spec_GCJ=' '\n      allow_undefined_flag_GCJ=unsupported\n      # Tell ltmain to make .lib files, not .a files.\n      libext=lib\n      # Tell ltmain to make .dll files, not .so files.\n      shrext_cmds=\".dll\"\n      # FIXME: Setting linknames here is a bad hack.\n      archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo \"$deplibs\" | $SED -e '\\''s/ -lc$//'\\''` -link -dll~linknames='\n      # The linker will automatically build a .lib file if we build a DLL.\n      old_archive_From_new_cmds_GCJ='true'\n      # FIXME: Should let the user specify the lib program.\n      old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs'\n      fix_srcfile_path_GCJ='`cygpath -w \"$srcfile\"`'\n      enable_shared_with_static_runtimes_GCJ=yes\n      ;;\n\n    darwin* | rhapsody*)\n      case $host_os in\n        rhapsody* | darwin1.[012])\n         allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress'\n         ;;\n       *) # Darwin 1.3 on\n         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then\n           allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'\n         else\n           case ${MACOSX_DEPLOYMENT_TARGET} in\n             10.[012])\n               allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'\n               ;;\n             10.*)\n               allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup'\n               ;;\n           esac\n         fi\n         ;;\n      esac\n      archive_cmds_need_lc_GCJ=no\n      hardcode_direct_GCJ=no\n      hardcode_automatic_GCJ=yes\n      hardcode_shlibpath_var_GCJ=unsupported\n      whole_archive_flag_spec_GCJ=''\n      link_all_deplibs_GCJ=yes\n    if test \"$GCC\" = yes ; then\n    \toutput_verbose_link_cmd='echo'\n        archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'\n      module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'\n      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds\n      archive_expsym_cmds_GCJ='sed -e \"s,#.*,,\" -e \"s,^[    ]*,,\" -e \"s,^\\(..*\\),_&,\" < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'\n      module_expsym_cmds_GCJ='sed -e \"s,#.*,,\" -e \"s,^[    ]*,,\" -e \"s,^\\(..*\\),_&,\" < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'\n    else\n      case $cc_basename in\n        xlc*)\n         output_verbose_link_cmd='echo'\n         archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'\n         module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'\n          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds\n         archive_expsym_cmds_GCJ='sed -e \"s,#.*,,\" -e \"s,^[    ]*,,\" -e \"s,^\\(..*\\),_&,\" < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'\n          module_expsym_cmds_GCJ='sed -e \"s,#.*,,\" -e \"s,^[    ]*,,\" -e \"s,^\\(..*\\),_&,\" < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'\n          ;;\n       *)\n         ld_shlibs_GCJ=no\n          ;;\n      esac\n    fi\n      ;;\n\n    dgux*)\n      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      hardcode_libdir_flag_spec_GCJ='-L$libdir'\n      hardcode_shlibpath_var_GCJ=no\n      ;;\n\n    freebsd1*)\n      ld_shlibs_GCJ=no\n      ;;\n\n    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor\n    # support.  Future versions do this automatically, but an explicit c++rt0.o\n    # does not break anything, and helps significantly (at the cost of a little\n    # extra space).\n    freebsd2.2*)\n      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'\n      hardcode_libdir_flag_spec_GCJ='-R$libdir'\n      hardcode_direct_GCJ=yes\n      hardcode_shlibpath_var_GCJ=no\n      ;;\n\n    # Unfortunately, older versions of FreeBSD 2 do not have this feature.\n    freebsd2*)\n      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'\n      hardcode_direct_GCJ=yes\n      hardcode_minus_L_GCJ=yes\n      hardcode_shlibpath_var_GCJ=no\n      ;;\n\n    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.\n    freebsd* | kfreebsd*-gnu | dragonfly*)\n      archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'\n      hardcode_libdir_flag_spec_GCJ='-R$libdir'\n      hardcode_direct_GCJ=yes\n      hardcode_shlibpath_var_GCJ=no\n      ;;\n\n    hpux9*)\n      if test \"$GCC\" = yes; then\n\tarchive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'\n      else\n\tarchive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'\n      fi\n      hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'\n      hardcode_libdir_separator_GCJ=:\n      hardcode_direct_GCJ=yes\n\n      # hardcode_minus_L: Not really in the search PATH,\n      # but as the default location of the library.\n      hardcode_minus_L_GCJ=yes\n      export_dynamic_flag_spec_GCJ='${wl}-E'\n      ;;\n\n    hpux10*)\n      if test \"$GCC\" = yes -a \"$with_gnu_ld\" = no; then\n\tarchive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'\n      else\n\tarchive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'\n      fi\n      if test \"$with_gnu_ld\" = no; then\n\thardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'\n\thardcode_libdir_separator_GCJ=:\n\n\thardcode_direct_GCJ=yes\n\texport_dynamic_flag_spec_GCJ='${wl}-E'\n\n\t# hardcode_minus_L: Not really in the search PATH,\n\t# but as the default location of the library.\n\thardcode_minus_L_GCJ=yes\n      fi\n      ;;\n\n    hpux11*)\n      if test \"$GCC\" = yes -a \"$with_gnu_ld\" = no; then\n\tcase $host_cpu in\n\thppa*64*)\n\t  archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\tia64*)\n\t  archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\t*)\n\t  archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\tesac\n      else\n\tcase $host_cpu in\n\thppa*64*)\n\t  archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\tia64*)\n\t  archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\t*)\n\t  archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'\n\t  ;;\n\tesac\n      fi\n      if test \"$with_gnu_ld\" = no; then\n\thardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'\n\thardcode_libdir_separator_GCJ=:\n\n\tcase $host_cpu in\n\thppa*64*|ia64*)\n\t  hardcode_libdir_flag_spec_ld_GCJ='+b $libdir'\n\t  hardcode_direct_GCJ=no\n\t  hardcode_shlibpath_var_GCJ=no\n\t  ;;\n\t*)\n\t  hardcode_direct_GCJ=yes\n\t  export_dynamic_flag_spec_GCJ='${wl}-E'\n\n\t  # hardcode_minus_L: Not really in the search PATH,\n\t  # but as the default location of the library.\n\t  hardcode_minus_L_GCJ=yes\n\t  ;;\n\tesac\n      fi\n      ;;\n\n    irix5* | irix6* | nonstopux*)\n      if test \"$GCC\" = yes; then\n\tarchive_cmds_GCJ='$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'\n      else\n\tarchive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n \"$verstring\" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'\n\thardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir'\n      fi\n      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'\n      hardcode_libdir_separator_GCJ=:\n      link_all_deplibs_GCJ=yes\n      ;;\n\n    netbsd*)\n      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then\n\tarchive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out\n      else\n\tarchive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF\n      fi\n      hardcode_libdir_flag_spec_GCJ='-R$libdir'\n      hardcode_direct_GCJ=yes\n      hardcode_shlibpath_var_GCJ=no\n      ;;\n\n    newsos6)\n      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      hardcode_direct_GCJ=yes\n      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'\n      hardcode_libdir_separator_GCJ=:\n      hardcode_shlibpath_var_GCJ=no\n      ;;\n\n    openbsd*)\n      hardcode_direct_GCJ=yes\n      hardcode_shlibpath_var_GCJ=no\n      if test -z \"`echo __ELF__ | $CC -E - | grep __ELF__`\" || test \"$host_os-$host_cpu\" = \"openbsd2.8-powerpc\"; then\n\tarchive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'\n\tarchive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'\n\thardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'\n\texport_dynamic_flag_spec_GCJ='${wl}-E'\n      else\n       case $host_os in\n\t openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)\n\t   archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'\n\t   hardcode_libdir_flag_spec_GCJ='-R$libdir'\n\t   ;;\n\t *)\n\t   archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'\n\t   hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'\n\t   ;;\n       esac\n      fi\n      ;;\n\n    os2*)\n      hardcode_libdir_flag_spec_GCJ='-L$libdir'\n      hardcode_minus_L_GCJ=yes\n      allow_undefined_flag_GCJ=unsupported\n      archive_cmds_GCJ='$echo \"LIBRARY $libname INITINSTANCE\" > $output_objdir/$libname.def~$echo \"DESCRIPTION \\\"$libname\\\"\" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo \" SINGLE NONSHARED\" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'\n      old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'\n      ;;\n\n    osf3*)\n      if test \"$GCC\" = yes; then\n\tallow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\\*'\n\tarchive_cmds_GCJ='$CC -shared${allow_undefined_flag} $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'\n      else\n\tallow_undefined_flag_GCJ=' -expect_unresolved \\*'\n\tarchive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n \"$verstring\" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'\n      fi\n      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'\n      hardcode_libdir_separator_GCJ=:\n      ;;\n\n    osf4* | osf5*)\t# as osf3* with the addition of -msym flag\n      if test \"$GCC\" = yes; then\n\tallow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\\*'\n\tarchive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n \"$verstring\" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'\n\thardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'\n      else\n\tallow_undefined_flag_GCJ=' -expect_unresolved \\*'\n\tarchive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n \"$verstring\" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'\n\tarchive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf \"%s %s\\\\n\" -exported_symbol \"\\$i\" >> $lib.exp; done; echo \"-hidden\">> $lib.exp~\n\t$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n \"$verstring\" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'\n\n\t# Both c and cxx compiler support -rpath directly\n\thardcode_libdir_flag_spec_GCJ='-rpath $libdir'\n      fi\n      hardcode_libdir_separator_GCJ=:\n      ;;\n\n    solaris*)\n      no_undefined_flag_GCJ=' -z text'\n      if test \"$GCC\" = yes; then\n\twlarc='${wl}'\n\tarchive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\tarchive_expsym_cmds_GCJ='$echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~$echo \"local: *; };\" >> $lib.exp~\n\t  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'\n      else\n\twlarc=''\n\tarchive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'\n\tarchive_expsym_cmds_GCJ='$echo \"{ global:\" > $lib.exp~cat $export_symbols | $SED -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~$echo \"local: *; };\" >> $lib.exp~\n  \t$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'\n      fi\n      hardcode_libdir_flag_spec_GCJ='-R$libdir'\n      hardcode_shlibpath_var_GCJ=no\n      case $host_os in\n      solaris2.[0-5] | solaris2.[0-5].*) ;;\n      *)\n \t# The compiler driver will combine linker options so we\n \t# cannot just pass the convience library names through\n \t# without $wl, iff we do not link with $LD.\n \t# Luckily, gcc supports the same syntax we need for Sun Studio.\n \t# Supported since Solaris 2.6 (maybe 2.5.1?)\n \tcase $wlarc in\n \t'')\n \t  whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;;\n \t*)\n \t  whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\\\"\\\"; do test -n \\\"$conv\\\" && new_convenience=\\\"$new_convenience,$conv\\\"; done; $echo \\\"$new_convenience\\\"` ${wl}-z ${wl}defaultextract' ;;\n \tesac ;;\n      esac\n      link_all_deplibs_GCJ=yes\n      ;;\n\n    sunos4*)\n      if test \"x$host_vendor\" = xsequent; then\n\t# Use $CC to link under sequent, because it throws in some extra .o\n\t# files that make .init and .fini sections work.\n\tarchive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'\n      else\n\tarchive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'\n      fi\n      hardcode_libdir_flag_spec_GCJ='-L$libdir'\n      hardcode_direct_GCJ=yes\n      hardcode_minus_L_GCJ=yes\n      hardcode_shlibpath_var_GCJ=no\n      ;;\n\n    sysv4)\n      case $host_vendor in\n\tsni)\n\t  archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n\t  hardcode_direct_GCJ=yes # is this really true???\n\t;;\n\tsiemens)\n\t  ## LD is ld it makes a PLAMLIB\n\t  ## CC just makes a GrossModule.\n\t  archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'\n\t  reload_cmds_GCJ='$CC -r -o $output$reload_objs'\n\t  hardcode_direct_GCJ=no\n        ;;\n\tmotorola)\n\t  archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n\t  hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie\n\t;;\n      esac\n      runpath_var='LD_RUN_PATH'\n      hardcode_shlibpath_var_GCJ=no\n      ;;\n\n    sysv4.3*)\n      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      hardcode_shlibpath_var_GCJ=no\n      export_dynamic_flag_spec_GCJ='-Bexport'\n      ;;\n\n    sysv4*MP*)\n      if test -d /usr/nec; then\n\tarchive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n\thardcode_shlibpath_var_GCJ=no\n\trunpath_var=LD_RUN_PATH\n\thardcode_runpath_var=yes\n\tld_shlibs_GCJ=yes\n      fi\n      ;;\n\n    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)\n      no_undefined_flag_GCJ='${wl}-z,text'\n      archive_cmds_need_lc_GCJ=no\n      hardcode_shlibpath_var_GCJ=no\n      runpath_var='LD_RUN_PATH'\n\n      if test \"$GCC\" = yes; then\n\tarchive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\tarchive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n      else\n\tarchive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n\tarchive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'\n      fi\n      ;;\n\n    sysv5* | sco3.2v5* | sco5v6*)\n      # Note: We can NOT use -z defs as we might desire, because we do not\n      # link with -lc, and that would cause any symbols used from libc to\n      # always be unresolved, which means just about no library would\n      # ever link correctly.  If we're not using GNU ld we use -z text\n      # though, which does catch some bad symbols but isn't as heavy-handed\n      # as -z defs.\n      no_undefined_flag_GCJ='${wl}-z,text'\n      allow_undefined_flag_GCJ='${wl}-z,nodefs'\n      archive_cmds_need_lc_GCJ=no\n      hardcode_shlibpath_var_GCJ=no\n      hardcode_libdir_flag_spec_GCJ='`test -z \"$SCOABSPATH\" && echo ${wl}-R,$libdir`'\n      hardcode_libdir_separator_GCJ=':'\n      link_all_deplibs_GCJ=yes\n      export_dynamic_flag_spec_GCJ='${wl}-Bexport'\n      runpath_var='LD_RUN_PATH'\n\n      if test \"$GCC\" = yes; then\n\tarchive_cmds_GCJ='$CC -shared ${wl}-h,\\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\tarchive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'\n      else\n\tarchive_cmds_GCJ='$CC -G ${wl}-h,\\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'\n\tarchive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'\n      fi\n      ;;\n\n    uts4*)\n      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      hardcode_libdir_flag_spec_GCJ='-L$libdir'\n      hardcode_shlibpath_var_GCJ=no\n      ;;\n\n    *)\n      ld_shlibs_GCJ=no\n      ;;\n    esac\n  fi\n\necho \"$as_me:$LINENO: result: $ld_shlibs_GCJ\" >&5\necho \"${ECHO_T}$ld_shlibs_GCJ\" >&6\ntest \"$ld_shlibs_GCJ\" = no && can_build_shared=no\n\n#\n# Do we need to explicitly link libc?\n#\ncase \"x$archive_cmds_need_lc_GCJ\" in\nx|xyes)\n  # Assume -lc should be added\n  archive_cmds_need_lc_GCJ=yes\n\n  if test \"$enable_shared\" = yes && test \"$GCC\" = yes; then\n    case $archive_cmds_GCJ in\n    *'~'*)\n      # FIXME: we may have to deal with multi-command sequences.\n      ;;\n    '$CC '*)\n      # Test whether the compiler implicitly links with -lc since on some\n      # systems, -lgcc has to come before -lc. If gcc already passes -lc\n      # to ld, don't add -lc before -lgcc.\n      echo \"$as_me:$LINENO: checking whether -lc should be explicitly linked in\" >&5\necho $ECHO_N \"checking whether -lc should be explicitly linked in... $ECHO_C\" >&6\n      $rm conftest*\n      printf \"$lt_simple_compile_test_code\" > conftest.$ac_ext\n\n      if { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } 2>conftest.err; then\n        soname=conftest\n        lib=conftest\n        libobjs=conftest.$ac_objext\n        deplibs=\n        wl=$lt_prog_compiler_wl_GCJ\n\tpic_flag=$lt_prog_compiler_pic_GCJ\n        compiler_flags=-v\n        linker_flags=-v\n        verstring=\n        output_objdir=.\n        libname=conftest\n        lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ\n        allow_undefined_flag_GCJ=\n        if { (eval echo \"$as_me:$LINENO: \\\"$archive_cmds_GCJ 2\\>\\&1 \\| grep \\\" -lc \\\" \\>/dev/null 2\\>\\&1\\\"\") >&5\n  (eval $archive_cmds_GCJ 2\\>\\&1 \\| grep \\\" -lc \\\" \\>/dev/null 2\\>\\&1) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }\n        then\n\t  archive_cmds_need_lc_GCJ=no\n        else\n\t  archive_cmds_need_lc_GCJ=yes\n        fi\n        allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag\n      else\n        cat conftest.err 1>&5\n      fi\n      $rm conftest*\n      echo \"$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ\" >&5\necho \"${ECHO_T}$archive_cmds_need_lc_GCJ\" >&6\n      ;;\n    esac\n  fi\n  ;;\nesac\n\necho \"$as_me:$LINENO: checking dynamic linker characteristics\" >&5\necho $ECHO_N \"checking dynamic linker characteristics... $ECHO_C\" >&6\nlibrary_names_spec=\nlibname_spec='lib$name'\nsoname_spec=\nshrext_cmds=\".so\"\npostinstall_cmds=\npostuninstall_cmds=\nfinish_cmds=\nfinish_eval=\nshlibpath_var=\nshlibpath_overrides_runpath=unknown\nversion_type=none\ndynamic_linker=\"$host_os ld.so\"\nsys_lib_dlsearch_path_spec=\"/lib /usr/lib\"\nif test \"$GCC\" = yes; then\n  sys_lib_search_path_spec=`$CC -print-search-dirs | grep \"^libraries:\" | $SED -e \"s/^libraries://\" -e \"s,=/,/,g\"`\n  if echo \"$sys_lib_search_path_spec\" | grep ';' >/dev/null ; then\n    # if the path contains \";\" then we assume it to be the separator\n    # otherwise default to the standard path separator (i.e. \":\") - it is\n    # assumed that no part of a normal pathname contains \";\" but that should\n    # okay in the real world where \";\" in dirpaths is itself problematic.\n    sys_lib_search_path_spec=`echo \"$sys_lib_search_path_spec\" | $SED -e 's/;/ /g'`\n  else\n    sys_lib_search_path_spec=`echo \"$sys_lib_search_path_spec\" | $SED  -e \"s/$PATH_SEPARATOR/ /g\"`\n  fi\nelse\n  sys_lib_search_path_spec=\"/lib /usr/lib /usr/local/lib\"\nfi\nneed_lib_prefix=unknown\nhardcode_into_libs=no\n\n# when you set need_version to no, make sure it does not cause -set_version\n# flags to be left without arguments\nneed_version=unknown\n\ncase $host_os in\naix3*)\n  version_type=linux\n  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'\n  shlibpath_var=LIBPATH\n\n  # AIX 3 has no versioning support, so we append a major version to the name.\n  soname_spec='${libname}${release}${shared_ext}$major'\n  ;;\n\naix4* | aix5*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  hardcode_into_libs=yes\n  if test \"$host_cpu\" = ia64; then\n    # AIX 5 supports IA64\n    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'\n    shlibpath_var=LD_LIBRARY_PATH\n  else\n    # With GCC up to 2.95.x, collect2 would create an import file\n    # for dependence libraries.  The import file would start with\n    # the line `#! .'.  This would cause the generated library to\n    # depend on `.', always an invalid library.  This was fixed in\n    # development snapshots of GCC prior to 3.0.\n    case $host_os in\n      aix4 | aix4.[01] | aix4.[01].*)\n      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'\n\t   echo ' yes '\n\t   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then\n\t:\n      else\n\tcan_build_shared=no\n      fi\n      ;;\n    esac\n    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct\n    # soname into executable. Probably we can add versioning support to\n    # collect2, so additional links can be useful in future.\n    if test \"$aix_use_runtimelinking\" = yes; then\n      # If using run time linking (on AIX 4.2 or later) use lib<name>.so\n      # instead of lib<name>.a to let people know that these are not\n      # typical AIX shared libraries.\n      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    else\n      # We preserve .a as extension for shared libraries through AIX4.2\n      # and later when we are not doing run time linking.\n      library_names_spec='${libname}${release}.a $libname.a'\n      soname_spec='${libname}${release}${shared_ext}$major'\n    fi\n    shlibpath_var=LIBPATH\n  fi\n  ;;\n\namigaos*)\n  library_names_spec='$libname.ixlibrary $libname.a'\n  # Create ${libname}_ixlibrary.a entries in /sys/libs.\n  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo \"X$lib\" | $Xsed -e '\\''s%^.*/\\([^/]*\\)\\.ixlibrary$%\\1%'\\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show \"cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a\"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'\n  ;;\n\nbeos*)\n  library_names_spec='${libname}${shared_ext}'\n  dynamic_linker=\"$host_os ld.so\"\n  shlibpath_var=LIBRARY_PATH\n  ;;\n\nbsdi[45]*)\n  version_type=linux\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  sys_lib_search_path_spec=\"/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib\"\n  sys_lib_dlsearch_path_spec=\"/shlib /usr/lib /usr/local/lib\"\n  # the default ld.so.conf also contains /usr/contrib/lib and\n  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow\n  # libtool to hard-code these into programs\n  ;;\n\ncygwin* | mingw* | pw32*)\n  version_type=windows\n  shrext_cmds=\".dll\"\n  need_version=no\n  need_lib_prefix=no\n\n  case $GCC,$host_os in\n  yes,cygwin* | yes,mingw* | yes,pw32*)\n    library_names_spec='$libname.dll.a'\n    # DLL is installed to $(libdir)/../bin by postinstall_cmds\n    postinstall_cmds='base_file=`basename \\${file}`~\n      dlpath=`$SHELL 2>&1 -c '\\''. $dir/'\\''\\${base_file}'\\''i;echo \\$dlname'\\''`~\n      dldir=$destdir/`dirname \\$dlpath`~\n      test -d \\$dldir || mkdir -p \\$dldir~\n      $install_prog $dir/$dlname \\$dldir/$dlname~\n      chmod a+x \\$dldir/$dlname'\n    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\\''. $file; echo \\$dlname'\\''`~\n      dlpath=$dir/\\$dldll~\n       $rm \\$dlpath'\n    shlibpath_overrides_runpath=yes\n\n    case $host_os in\n    cygwin*)\n      # Cygwin DLLs use 'cyg' prefix rather than 'lib'\n      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'\n      sys_lib_search_path_spec=\"/usr/lib /lib/w32api /lib /usr/local/lib\"\n      ;;\n    mingw*)\n      # MinGW DLLs use traditional 'lib' prefix\n      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'\n      sys_lib_search_path_spec=`$CC -print-search-dirs | grep \"^libraries:\" | $SED -e \"s/^libraries://\" -e \"s,=/,/,g\"`\n      if echo \"$sys_lib_search_path_spec\" | grep ';[c-zC-Z]:/' >/dev/null; then\n        # It is most probably a Windows format PATH printed by\n        # mingw gcc, but we are running on Cygwin. Gcc prints its search\n        # path with ; separators, and with drive letters. We can handle the\n        # drive letters (cygwin fileutils understands them), so leave them,\n        # especially as we might pass files found there to a mingw objdump,\n        # which wouldn't understand a cygwinified path. Ahh.\n        sys_lib_search_path_spec=`echo \"$sys_lib_search_path_spec\" | $SED -e 's/;/ /g'`\n      else\n        sys_lib_search_path_spec=`echo \"$sys_lib_search_path_spec\" | $SED  -e \"s/$PATH_SEPARATOR/ /g\"`\n      fi\n      ;;\n    pw32*)\n      # pw32 DLLs use 'pw' prefix rather than 'lib'\n      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'\n      ;;\n    esac\n    ;;\n\n  *)\n    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'\n    ;;\n  esac\n  dynamic_linker='Win32 ld.exe'\n  # FIXME: first we should search . and the directory the executable is in\n  shlibpath_var=PATH\n  ;;\n\ndarwin* | rhapsody*)\n  dynamic_linker=\"$host_os dyld\"\n  version_type=darwin\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'\n  soname_spec='${libname}${release}${major}$shared_ext'\n  shlibpath_overrides_runpath=yes\n  shlibpath_var=DYLD_LIBRARY_PATH\n  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'\n  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.\n  if test \"$GCC\" = yes; then\n    sys_lib_search_path_spec=`$CC -print-search-dirs | tr \"\\n\" \"$PATH_SEPARATOR\" | sed -e 's/libraries:/@libraries:/' | tr \"@\" \"\\n\" | grep \"^libraries:\" | sed -e \"s/^libraries://\" -e \"s,=/,/,g\" -e \"s,$PATH_SEPARATOR, ,g\" -e \"s,.*,& /lib /usr/lib /usr/local/lib,g\"`\n  else\n    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'\n  fi\n  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'\n  ;;\n\ndgux*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  ;;\n\nfreebsd1*)\n  dynamic_linker=no\n  ;;\n\nkfreebsd*-gnu)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  dynamic_linker='GNU ld.so'\n  ;;\n\nfreebsd* | dragonfly*)\n  # DragonFly does not have aout.  When/if they implement a new\n  # versioning mechanism, adjust this.\n  if test -x /usr/bin/objformat; then\n    objformat=`/usr/bin/objformat`\n  else\n    case $host_os in\n    freebsd[123]*) objformat=aout ;;\n    *) objformat=elf ;;\n    esac\n  fi\n  version_type=freebsd-$objformat\n  case $version_type in\n    freebsd-elf*)\n      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'\n      need_version=no\n      need_lib_prefix=no\n      ;;\n    freebsd-*)\n      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'\n      need_version=yes\n      ;;\n  esac\n  shlibpath_var=LD_LIBRARY_PATH\n  case $host_os in\n  freebsd2*)\n    shlibpath_overrides_runpath=yes\n    ;;\n  freebsd3.[01]* | freebsdelf3.[01]*)\n    shlibpath_overrides_runpath=yes\n    hardcode_into_libs=yes\n    ;;\n  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \\\n  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)\n    shlibpath_overrides_runpath=no\n    hardcode_into_libs=yes\n    ;;\n  freebsd*) # from 4.6 on\n    shlibpath_overrides_runpath=yes\n    hardcode_into_libs=yes\n    ;;\n  esac\n  ;;\n\ngnu*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  hardcode_into_libs=yes\n  ;;\n\nhpux9* | hpux10* | hpux11*)\n  # Give a soname corresponding to the major version so that dld.sl refuses to\n  # link against other versions.\n  version_type=sunos\n  need_lib_prefix=no\n  need_version=no\n  case $host_cpu in\n  ia64*)\n    shrext_cmds='.so'\n    hardcode_into_libs=yes\n    dynamic_linker=\"$host_os dld.so\"\n    shlibpath_var=LD_LIBRARY_PATH\n    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    if test \"X$HPUX_IA64_MODE\" = X32; then\n      sys_lib_search_path_spec=\"/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib\"\n    else\n      sys_lib_search_path_spec=\"/usr/lib/hpux64 /usr/local/lib/hpux64\"\n    fi\n    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec\n    ;;\n   hppa*64*)\n     shrext_cmds='.sl'\n     hardcode_into_libs=yes\n     dynamic_linker=\"$host_os dld.sl\"\n     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH\n     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.\n     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n     soname_spec='${libname}${release}${shared_ext}$major'\n     sys_lib_search_path_spec=\"/usr/lib/pa20_64 /usr/ccs/lib/pa20_64\"\n     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec\n     ;;\n   *)\n    shrext_cmds='.sl'\n    dynamic_linker=\"$host_os dld.sl\"\n    shlibpath_var=SHLIB_PATH\n    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    ;;\n  esac\n  # HP-UX runs *really* slowly unless shared libraries are mode 555.\n  postinstall_cmds='chmod 555 $lib'\n  ;;\n\ninterix3*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  ;;\n\nirix5* | irix6* | nonstopux*)\n  case $host_os in\n    nonstopux*) version_type=nonstopux ;;\n    *)\n\tif test \"$lt_cv_prog_gnu_ld\" = yes; then\n\t\tversion_type=linux\n\telse\n\t\tversion_type=irix\n\tfi ;;\n  esac\n  need_lib_prefix=no\n  need_version=no\n  soname_spec='${libname}${release}${shared_ext}$major'\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'\n  case $host_os in\n  irix5* | nonstopux*)\n    libsuff= shlibsuff=\n    ;;\n  *)\n    case $LD in # libtool.m4 will add one of these switches to LD\n    *-32|*\"-32 \"|*-melf32bsmip|*\"-melf32bsmip \")\n      libsuff= shlibsuff= libmagic=32-bit;;\n    *-n32|*\"-n32 \"|*-melf32bmipn32|*\"-melf32bmipn32 \")\n      libsuff=32 shlibsuff=N32 libmagic=N32;;\n    *-64|*\"-64 \"|*-melf64bmip|*\"-melf64bmip \")\n      libsuff=64 shlibsuff=64 libmagic=64-bit;;\n    *) libsuff= shlibsuff= libmagic=never-match;;\n    esac\n    ;;\n  esac\n  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH\n  shlibpath_overrides_runpath=no\n  sys_lib_search_path_spec=\"/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}\"\n  sys_lib_dlsearch_path_spec=\"/usr/lib${libsuff} /lib${libsuff}\"\n  hardcode_into_libs=yes\n  ;;\n\n# No shared lib support for Linux oldld, aout, or coff.\nlinux*oldld* | linux*aout* | linux*coff*)\n  dynamic_linker=no\n  ;;\n\n# This must be Linux ELF.\nlinux*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -n $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  # This implies no fast_install, which is unacceptable.\n  # Some rework will be needed to allow for fast_install\n  # before this can be enabled.\n  hardcode_into_libs=yes\n\n  # find out which ABI we are using\n  libsuff=\n  case \"$host_cpu\" in\n  x86_64*|s390x*|powerpc64*)\n    echo '#line 18982 \"configure\"' > conftest.$ac_ext\n    if { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; then\n      case `/usr/bin/file conftest.$ac_objext` in\n      *64-bit*)\n        libsuff=64\n        sys_lib_search_path_spec=\"/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}\"\n        ;;\n      esac\n    fi\n    rm -rf conftest*\n    ;;\n  esac\n\n  # Append ld.so.conf contents to the search path\n  if test -f /etc/ld.so.conf; then\n    lt_ld_extra=`awk '/^include / { system(sprintf(\"cd /etc; cat %s 2>/dev/null\", \\$2)); skip = 1; } { if (!skip) print \\$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\\n' ' '`\n    sys_lib_dlsearch_path_spec=\"/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra\"\n  fi\n\n  # We used to test for /lib/ld.so.1 and disable shared libraries on\n  # powerpc, because MkLinux only supported shared libraries with the\n  # GNU dynamic linker.  Since this was broken with cross compilers,\n  # most powerpc-linux boxes support dynamic linking these days and\n  # people can always --disable-shared, the test was removed, and we\n  # assume the GNU/Linux dynamic linker is in use.\n  dynamic_linker='GNU/Linux ld.so'\n  ;;\n\nknetbsd*-gnu)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  hardcode_into_libs=yes\n  dynamic_linker='GNU ld.so'\n  ;;\n\nnetbsd*)\n  version_type=sunos\n  need_lib_prefix=no\n  need_version=no\n  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n    finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -m $libdir'\n    dynamic_linker='NetBSD (a.out) ld.so'\n  else\n    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'\n    soname_spec='${libname}${release}${shared_ext}$major'\n    dynamic_linker='NetBSD ld.elf_so'\n  fi\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  hardcode_into_libs=yes\n  ;;\n\nnewsos6)\n  version_type=linux\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  ;;\n\nnto-qnx*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  ;;\n\nopenbsd*)\n  version_type=sunos\n  sys_lib_dlsearch_path_spec=\"/usr/lib\"\n  need_lib_prefix=no\n  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.\n  case $host_os in\n    openbsd3.3 | openbsd3.3.*) need_version=yes ;;\n    *)                         need_version=no  ;;\n  esac\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -m $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  if test -z \"`echo __ELF__ | $CC -E - | grep __ELF__`\" || test \"$host_os-$host_cpu\" = \"openbsd2.8-powerpc\"; then\n    case $host_os in\n      openbsd2.[89] | openbsd2.[89].*)\n\tshlibpath_overrides_runpath=no\n\t;;\n      *)\n\tshlibpath_overrides_runpath=yes\n\t;;\n      esac\n  else\n    shlibpath_overrides_runpath=yes\n  fi\n  ;;\n\nos2*)\n  libname_spec='$name'\n  shrext_cmds=\".dll\"\n  need_lib_prefix=no\n  library_names_spec='$libname${shared_ext} $libname.a'\n  dynamic_linker='OS/2 ld.exe'\n  shlibpath_var=LIBPATH\n  ;;\n\nosf3* | osf4* | osf5*)\n  version_type=osf\n  need_lib_prefix=no\n  need_version=no\n  soname_spec='${libname}${release}${shared_ext}$major'\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  shlibpath_var=LD_LIBRARY_PATH\n  sys_lib_search_path_spec=\"/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib\"\n  sys_lib_dlsearch_path_spec=\"$sys_lib_search_path_spec\"\n  ;;\n\nsolaris*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  hardcode_into_libs=yes\n  # ldd complains unless libraries are executable\n  postinstall_cmds='chmod +x $lib'\n  ;;\n\nsunos4*)\n  version_type=sunos\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'\n  finish_cmds='PATH=\"\\$PATH:/usr/etc\" ldconfig $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  if test \"$with_gnu_ld\" = yes; then\n    need_lib_prefix=no\n  fi\n  need_version=yes\n  ;;\n\nsysv4 | sysv4.3*)\n  version_type=linux\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  case $host_vendor in\n    sni)\n      shlibpath_overrides_runpath=no\n      need_lib_prefix=no\n      export_dynamic_flag_spec='${wl}-Blargedynsym'\n      runpath_var=LD_RUN_PATH\n      ;;\n    siemens)\n      need_lib_prefix=no\n      ;;\n    motorola)\n      need_lib_prefix=no\n      need_version=no\n      shlibpath_overrides_runpath=no\n      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'\n      ;;\n  esac\n  ;;\n\nsysv4*MP*)\n  if test -d /usr/nec ;then\n    version_type=linux\n    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'\n    soname_spec='$libname${shared_ext}.$major'\n    shlibpath_var=LD_LIBRARY_PATH\n  fi\n  ;;\n\nsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)\n  version_type=freebsd-elf\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  hardcode_into_libs=yes\n  if test \"$with_gnu_ld\" = yes; then\n    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'\n    shlibpath_overrides_runpath=no\n  else\n    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'\n    shlibpath_overrides_runpath=yes\n    case $host_os in\n      sco3.2v5*)\n        sys_lib_search_path_spec=\"$sys_lib_search_path_spec /lib\"\n\t;;\n    esac\n  fi\n  sys_lib_dlsearch_path_spec='/usr/lib'\n  ;;\n\nuts4*)\n  version_type=linux\n  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'\n  soname_spec='${libname}${release}${shared_ext}$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  ;;\n\n*)\n  dynamic_linker=no\n  ;;\nesac\necho \"$as_me:$LINENO: result: $dynamic_linker\" >&5\necho \"${ECHO_T}$dynamic_linker\" >&6\ntest \"$dynamic_linker\" = no && can_build_shared=no\n\nvariables_saved_for_relink=\"PATH $shlibpath_var $runpath_var\"\nif test \"$GCC\" = yes; then\n  variables_saved_for_relink=\"$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH\"\nfi\n\necho \"$as_me:$LINENO: checking how to hardcode library paths into programs\" >&5\necho $ECHO_N \"checking how to hardcode library paths into programs... $ECHO_C\" >&6\nhardcode_action_GCJ=\nif test -n \"$hardcode_libdir_flag_spec_GCJ\" || \\\n   test -n \"$runpath_var_GCJ\" || \\\n   test \"X$hardcode_automatic_GCJ\" = \"Xyes\" ; then\n\n  # We can hardcode non-existant directories.\n  if test \"$hardcode_direct_GCJ\" != no &&\n     # If the only mechanism to avoid hardcoding is shlibpath_var, we\n     # have to relink, otherwise we might link with an installed library\n     # when we should be linking with a yet-to-be-installed one\n     ## test \"$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)\" != no &&\n     test \"$hardcode_minus_L_GCJ\" != no; then\n    # Linking always hardcodes the temporary library directory.\n    hardcode_action_GCJ=relink\n  else\n    # We can link without hardcoding, and we can hardcode nonexisting dirs.\n    hardcode_action_GCJ=immediate\n  fi\nelse\n  # We cannot hardcode anything, or else we can only hardcode existing\n  # directories.\n  hardcode_action_GCJ=unsupported\nfi\necho \"$as_me:$LINENO: result: $hardcode_action_GCJ\" >&5\necho \"${ECHO_T}$hardcode_action_GCJ\" >&6\n\nif test \"$hardcode_action_GCJ\" = relink; then\n  # Fast installation is not supported\n  enable_fast_install=no\nelif test \"$shlibpath_overrides_runpath\" = yes ||\n     test \"$enable_shared\" = no; then\n  # Fast installation is not necessary\n  enable_fast_install=needless\nfi\n\n\n# The else clause should only fire when bootstrapping the\n# libtool distribution, otherwise you forgot to ship ltmain.sh\n# with your package, and you will get complaints that there are\n# no rules to generate ltmain.sh.\nif test -f \"$ltmain\"; then\n  # See if we are running on zsh, and set the options which allow our commands through\n  # without removal of \\ escapes.\n  if test -n \"${ZSH_VERSION+set}\" ; then\n    setopt NO_GLOB_SUBST\n  fi\n  # Now quote all the things that may contain metacharacters while being\n  # careful not to overquote the AC_SUBSTed values.  We take copies of the\n  # variables and quote the copies for generation of the libtool script.\n  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \\\n    SED SHELL STRIP \\\n    libname_spec library_names_spec soname_spec extract_expsyms_cmds \\\n    old_striplib striplib file_magic_cmd finish_cmds finish_eval \\\n    deplibs_check_method reload_flag reload_cmds need_locks \\\n    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \\\n    lt_cv_sys_global_symbol_to_c_name_address \\\n    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \\\n    old_postinstall_cmds old_postuninstall_cmds \\\n    compiler_GCJ \\\n    CC_GCJ \\\n    LD_GCJ \\\n    lt_prog_compiler_wl_GCJ \\\n    lt_prog_compiler_pic_GCJ \\\n    lt_prog_compiler_static_GCJ \\\n    lt_prog_compiler_no_builtin_flag_GCJ \\\n    export_dynamic_flag_spec_GCJ \\\n    thread_safe_flag_spec_GCJ \\\n    whole_archive_flag_spec_GCJ \\\n    enable_shared_with_static_runtimes_GCJ \\\n    old_archive_cmds_GCJ \\\n    old_archive_from_new_cmds_GCJ \\\n    predep_objects_GCJ \\\n    postdep_objects_GCJ \\\n    predeps_GCJ \\\n    postdeps_GCJ \\\n    compiler_lib_search_path_GCJ \\\n    archive_cmds_GCJ \\\n    archive_expsym_cmds_GCJ \\\n    postinstall_cmds_GCJ \\\n    postuninstall_cmds_GCJ \\\n    old_archive_from_expsyms_cmds_GCJ \\\n    allow_undefined_flag_GCJ \\\n    no_undefined_flag_GCJ \\\n    export_symbols_cmds_GCJ \\\n    hardcode_libdir_flag_spec_GCJ \\\n    hardcode_libdir_flag_spec_ld_GCJ \\\n    hardcode_libdir_separator_GCJ \\\n    hardcode_automatic_GCJ \\\n    module_cmds_GCJ \\\n    module_expsym_cmds_GCJ \\\n    lt_cv_prog_compiler_c_o_GCJ \\\n    exclude_expsyms_GCJ \\\n    include_expsyms_GCJ; do\n\n    case $var in\n    old_archive_cmds_GCJ | \\\n    old_archive_from_new_cmds_GCJ | \\\n    archive_cmds_GCJ | \\\n    archive_expsym_cmds_GCJ | \\\n    module_cmds_GCJ | \\\n    module_expsym_cmds_GCJ | \\\n    old_archive_from_expsyms_cmds_GCJ | \\\n    export_symbols_cmds_GCJ | \\\n    extract_expsyms_cmds | reload_cmds | finish_cmds | \\\n    postinstall_cmds | postuninstall_cmds | \\\n    old_postinstall_cmds | old_postuninstall_cmds | \\\n    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)\n      # Double-quote double-evaled strings.\n      eval \"lt_$var=\\\\\\\"\\`\\$echo \\\"X\\$$var\\\" | \\$Xsed -e \\\"\\$double_quote_subst\\\" -e \\\"\\$sed_quote_subst\\\" -e \\\"\\$delay_variable_subst\\\"\\`\\\\\\\"\"\n      ;;\n    *)\n      eval \"lt_$var=\\\\\\\"\\`\\$echo \\\"X\\$$var\\\" | \\$Xsed -e \\\"\\$sed_quote_subst\\\"\\`\\\\\\\"\"\n      ;;\n    esac\n  done\n\n  case $lt_echo in\n  *'\\$0 --fallback-echo\"')\n    lt_echo=`$echo \"X$lt_echo\" | $Xsed -e 's/\\\\\\\\\\\\\\$0 --fallback-echo\"$/$0 --fallback-echo\"/'`\n    ;;\n  esac\n\ncfgfile=\"$ofile\"\n\n  cat <<__EOF__ >> \"$cfgfile\"\n# ### BEGIN LIBTOOL TAG CONFIG: $tagname\n\n# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:\n\n# Shell to use when invoking shell scripts.\nSHELL=$lt_SHELL\n\n# Whether or not to build shared libraries.\nbuild_libtool_libs=$enable_shared\n\n# Whether or not to build static libraries.\nbuild_old_libs=$enable_static\n\n# Whether or not to add -lc for building shared libraries.\nbuild_libtool_need_lc=$archive_cmds_need_lc_GCJ\n\n# Whether or not to disallow shared libs when runtime libs are static\nallow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ\n\n# Whether or not to optimize for fast installation.\nfast_install=$enable_fast_install\n\n# The host system.\nhost_alias=$host_alias\nhost=$host\nhost_os=$host_os\n\n# The build system.\nbuild_alias=$build_alias\nbuild=$build\nbuild_os=$build_os\n\n# An echo program that does not interpret backslashes.\necho=$lt_echo\n\n# The archiver.\nAR=$lt_AR\nAR_FLAGS=$lt_AR_FLAGS\n\n# A C compiler.\nLTCC=$lt_LTCC\n\n# LTCC compiler flags.\nLTCFLAGS=$lt_LTCFLAGS\n\n# A language-specific compiler.\nCC=$lt_compiler_GCJ\n\n# Is the compiler the GNU C compiler?\nwith_gcc=$GCC_GCJ\n\ngcc_dir=\\`gcc -print-file-name=. | $SED 's,/\\.$,,'\\`\ngcc_ver=\\`gcc -dumpversion\\`\n\n# An ERE matcher.\nEGREP=$lt_EGREP\n\n# The linker used to build libraries.\nLD=$lt_LD_GCJ\n\n# Whether we need hard or soft links.\nLN_S=$lt_LN_S\n\n# A BSD-compatible nm program.\nNM=$lt_NM\n\n# A symbol stripping program\nSTRIP=$lt_STRIP\n\n# Used to examine libraries when file_magic_cmd begins \"file\"\nMAGIC_CMD=$MAGIC_CMD\n\n# Used on cygwin: DLL creation program.\nDLLTOOL=\"$DLLTOOL\"\n\n# Used on cygwin: object dumper.\nOBJDUMP=\"$OBJDUMP\"\n\n# Used on cygwin: assembler.\nAS=\"$AS\"\n\n# The name of the directory that contains temporary libtool files.\nobjdir=$objdir\n\n# How to create reloadable object files.\nreload_flag=$lt_reload_flag\nreload_cmds=$lt_reload_cmds\n\n# How to pass a linker flag through the compiler.\nwl=$lt_lt_prog_compiler_wl_GCJ\n\n# Object file suffix (normally \"o\").\nobjext=\"$ac_objext\"\n\n# Old archive suffix (normally \"a\").\nlibext=\"$libext\"\n\n# Shared library suffix (normally \".so\").\nshrext_cmds='$shrext_cmds'\n\n# Executable file suffix (normally \"\").\nexeext=\"$exeext\"\n\n# Additional compiler flags for building library objects.\npic_flag=$lt_lt_prog_compiler_pic_GCJ\npic_mode=$pic_mode\n\n# What is the maximum length of a command?\nmax_cmd_len=$lt_cv_sys_max_cmd_len\n\n# Does compiler simultaneously support -c and -o options?\ncompiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ\n\n# Must we lock files when doing compilation?\nneed_locks=$lt_need_locks\n\n# Do we need the lib prefix for modules?\nneed_lib_prefix=$need_lib_prefix\n\n# Do we need a version for libraries?\nneed_version=$need_version\n\n# Whether dlopen is supported.\ndlopen_support=$enable_dlopen\n\n# Whether dlopen of programs is supported.\ndlopen_self=$enable_dlopen_self\n\n# Whether dlopen of statically linked programs is supported.\ndlopen_self_static=$enable_dlopen_self_static\n\n# Compiler flag to prevent dynamic linking.\nlink_static_flag=$lt_lt_prog_compiler_static_GCJ\n\n# Compiler flag to turn off builtin functions.\nno_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ\n\n# Compiler flag to allow reflexive dlopens.\nexport_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ\n\n# Compiler flag to generate shared objects directly from archives.\nwhole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ\n\n# Compiler flag to generate thread-safe objects.\nthread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ\n\n# Library versioning type.\nversion_type=$version_type\n\n# Format of library name prefix.\nlibname_spec=$lt_libname_spec\n\n# List of archive names.  First name is the real one, the rest are links.\n# The last name is the one that the linker finds with -lNAME.\nlibrary_names_spec=$lt_library_names_spec\n\n# The coded name of the library, if different from the real name.\nsoname_spec=$lt_soname_spec\n\n# Commands used to build and install an old-style archive.\nRANLIB=$lt_RANLIB\nold_archive_cmds=$lt_old_archive_cmds_GCJ\nold_postinstall_cmds=$lt_old_postinstall_cmds\nold_postuninstall_cmds=$lt_old_postuninstall_cmds\n\n# Create an old-style archive from a shared archive.\nold_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ\n\n# Create a temporary old-style archive to link instead of a shared archive.\nold_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ\n\n# Commands used to build and install a shared archive.\narchive_cmds=$lt_archive_cmds_GCJ\narchive_expsym_cmds=$lt_archive_expsym_cmds_GCJ\npostinstall_cmds=$lt_postinstall_cmds\npostuninstall_cmds=$lt_postuninstall_cmds\n\n# Commands used to build a loadable module (assumed same as above if empty)\nmodule_cmds=$lt_module_cmds_GCJ\nmodule_expsym_cmds=$lt_module_expsym_cmds_GCJ\n\n# Commands to strip libraries.\nold_striplib=$lt_old_striplib\nstriplib=$lt_striplib\n\n# Dependencies to place before the objects being linked to create a\n# shared library.\npredep_objects=\\`echo $lt_predep_objects_GCJ | \\$SED -e \"s@\\${gcc_dir}@\\\\\\${gcc_dir}@g;s@\\${gcc_ver}@\\\\\\${gcc_ver}@g\"\\`\n\n# Dependencies to place after the objects being linked to create a\n# shared library.\npostdep_objects=\\`echo $lt_postdep_objects_GCJ | \\$SED -e \"s@\\${gcc_dir}@\\\\\\${gcc_dir}@g;s@\\${gcc_ver}@\\\\\\${gcc_ver}@g\"\\`\n\n# Dependencies to place before the objects being linked to create a\n# shared library.\npredeps=$lt_predeps_GCJ\n\n# Dependencies to place after the objects being linked to create a\n# shared library.\npostdeps=$lt_postdeps_GCJ\n\n# The library search path used internally by the compiler when linking\n# a shared library.\ncompiler_lib_search_path=\\`echo $lt_compiler_lib_search_path_GCJ | \\$SED -e \"s@\\${gcc_dir}@\\\\\\${gcc_dir}@g;s@\\${gcc_ver}@\\\\\\${gcc_ver}@g\"\\`\n\n# Method to check whether dependent libraries are shared objects.\ndeplibs_check_method=$lt_deplibs_check_method\n\n# Command to use when deplibs_check_method == file_magic.\nfile_magic_cmd=$lt_file_magic_cmd\n\n# Flag that allows shared libraries with undefined symbols to be built.\nallow_undefined_flag=$lt_allow_undefined_flag_GCJ\n\n# Flag that forces no undefined symbols.\nno_undefined_flag=$lt_no_undefined_flag_GCJ\n\n# Commands used to finish a libtool library installation in a directory.\nfinish_cmds=$lt_finish_cmds\n\n# Same as above, but a single script fragment to be evaled but not shown.\nfinish_eval=$lt_finish_eval\n\n# Take the output of nm and produce a listing of raw symbols and C names.\nglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe\n\n# Transform the output of nm in a proper C declaration\nglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl\n\n# Transform the output of nm in a C name address pair\nglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address\n\n# This is the shared library runtime path variable.\nrunpath_var=$runpath_var\n\n# This is the shared library path variable.\nshlibpath_var=$shlibpath_var\n\n# Is shlibpath searched before the hard-coded library search path?\nshlibpath_overrides_runpath=$shlibpath_overrides_runpath\n\n# How to hardcode a shared library path into an executable.\nhardcode_action=$hardcode_action_GCJ\n\n# Whether we should hardcode library paths into libraries.\nhardcode_into_libs=$hardcode_into_libs\n\n# Flag to hardcode \\$libdir into a binary during linking.\n# This must work even if \\$libdir does not exist.\nhardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ\n\n# If ld is used when linking, flag to hardcode \\$libdir into\n# a binary during linking. This must work even if \\$libdir does\n# not exist.\nhardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ\n\n# Whether we need a single -rpath flag with a separated argument.\nhardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ\n\n# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the\n# resulting binary.\nhardcode_direct=$hardcode_direct_GCJ\n\n# Set to yes if using the -LDIR flag during linking hardcodes DIR into the\n# resulting binary.\nhardcode_minus_L=$hardcode_minus_L_GCJ\n\n# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into\n# the resulting binary.\nhardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ\n\n# Set to yes if building a shared library automatically hardcodes DIR into the library\n# and all subsequent libraries and executables linked against it.\nhardcode_automatic=$hardcode_automatic_GCJ\n\n# Variables whose values should be saved in libtool wrapper scripts and\n# restored at relink time.\nvariables_saved_for_relink=\"$variables_saved_for_relink\"\n\n# Whether libtool must link a program against all its dependency libraries.\nlink_all_deplibs=$link_all_deplibs_GCJ\n\n# Compile-time system search path for libraries\nsys_lib_search_path_spec=\\`echo $lt_sys_lib_search_path_spec | \\$SED -e \"s@\\${gcc_dir}@\\\\\\${gcc_dir}@g;s@\\${gcc_ver}@\\\\\\${gcc_ver}@g\"\\`\n\n# Run-time system search path for libraries\nsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec\n\n# Fix the shell variable \\$srcfile for the compiler.\nfix_srcfile_path=\"$fix_srcfile_path_GCJ\"\n\n# Set to yes if exported symbols are required.\nalways_export_symbols=$always_export_symbols_GCJ\n\n# The commands to list exported symbols.\nexport_symbols_cmds=$lt_export_symbols_cmds_GCJ\n\n# The commands to extract the exported symbol list from a shared archive.\nextract_expsyms_cmds=$lt_extract_expsyms_cmds\n\n# Symbols that should not be listed in the preloaded symbols.\nexclude_expsyms=$lt_exclude_expsyms_GCJ\n\n# Symbols that must always be exported.\ninclude_expsyms=$lt_include_expsyms_GCJ\n\n# ### END LIBTOOL TAG CONFIG: $tagname\n\n__EOF__\n\n\nelse\n  # If there is no Makefile yet, we rely on a make rule to execute\n  # `config.status --recheck' to rerun these tests and create the\n  # libtool script then.\n  ltmain_in=`echo $ltmain | sed -e 's/\\.sh$/.in/'`\n  if test -f \"$ltmain_in\"; then\n    test -f Makefile && make \"$ltmain\"\n  fi\nfi\n\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\nCC=\"$lt_save_CC\"\n\n\telse\n\t  tagname=\"\"\n\tfi\n\t;;\n\n      RC)\n\n\n\n# Source file extension for RC test sources.\nac_ext=rc\n\n# Object file extension for compiled RC test sources.\nobjext=o\nobjext_RC=$objext\n\n# Code to be used in simple compile tests\nlt_simple_compile_test_code='sample MENU { MENUITEM \"&Soup\", 100, CHECKED }\\n'\n\n# Code to be used in simple link tests\nlt_simple_link_test_code=\"$lt_simple_compile_test_code\"\n\n# ltmain only uses $CC for tagged configurations so make sure $CC is set.\n\n# If no C compiler was specified, use CC.\nLTCC=${LTCC-\"$CC\"}\n\n# If no C compiler flags were specified, use CFLAGS.\nLTCFLAGS=${LTCFLAGS-\"$CFLAGS\"}\n\n# Allow CC to be a program name with arguments.\ncompiler=$CC\n\n\n# save warnings/boilerplate of simple test code\nac_outfile=conftest.$ac_objext\nprintf \"$lt_simple_compile_test_code\" >conftest.$ac_ext\neval \"$ac_compile\" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err\n_lt_compiler_boilerplate=`cat conftest.err`\n$rm conftest*\n\nac_outfile=conftest.$ac_objext\nprintf \"$lt_simple_link_test_code\" >conftest.$ac_ext\neval \"$ac_link\" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err\n_lt_linker_boilerplate=`cat conftest.err`\n$rm conftest*\n\n\n# Allow CC to be a program name with arguments.\nlt_save_CC=\"$CC\"\nCC=${RC-\"windres\"}\ncompiler=$CC\ncompiler_RC=$CC\nfor cc_temp in $compiler\"\"; do\n  case $cc_temp in\n    compile | *[\\\\/]compile | ccache | *[\\\\/]ccache ) ;;\n    distcc | *[\\\\/]distcc | purify | *[\\\\/]purify ) ;;\n    \\-*) ;;\n    *) break;;\n  esac\ndone\ncc_basename=`$echo \"X$cc_temp\" | $Xsed -e 's%.*/%%' -e \"s%^$host_alias-%%\"`\n\nlt_cv_prog_compiler_c_o_RC=yes\n\n# The else clause should only fire when bootstrapping the\n# libtool distribution, otherwise you forgot to ship ltmain.sh\n# with your package, and you will get complaints that there are\n# no rules to generate ltmain.sh.\nif test -f \"$ltmain\"; then\n  # See if we are running on zsh, and set the options which allow our commands through\n  # without removal of \\ escapes.\n  if test -n \"${ZSH_VERSION+set}\" ; then\n    setopt NO_GLOB_SUBST\n  fi\n  # Now quote all the things that may contain metacharacters while being\n  # careful not to overquote the AC_SUBSTed values.  We take copies of the\n  # variables and quote the copies for generation of the libtool script.\n  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \\\n    SED SHELL STRIP \\\n    libname_spec library_names_spec soname_spec extract_expsyms_cmds \\\n    old_striplib striplib file_magic_cmd finish_cmds finish_eval \\\n    deplibs_check_method reload_flag reload_cmds need_locks \\\n    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \\\n    lt_cv_sys_global_symbol_to_c_name_address \\\n    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \\\n    old_postinstall_cmds old_postuninstall_cmds \\\n    compiler_RC \\\n    CC_RC \\\n    LD_RC \\\n    lt_prog_compiler_wl_RC \\\n    lt_prog_compiler_pic_RC \\\n    lt_prog_compiler_static_RC \\\n    lt_prog_compiler_no_builtin_flag_RC \\\n    export_dynamic_flag_spec_RC \\\n    thread_safe_flag_spec_RC \\\n    whole_archive_flag_spec_RC \\\n    enable_shared_with_static_runtimes_RC \\\n    old_archive_cmds_RC \\\n    old_archive_from_new_cmds_RC \\\n    predep_objects_RC \\\n    postdep_objects_RC \\\n    predeps_RC \\\n    postdeps_RC \\\n    compiler_lib_search_path_RC \\\n    archive_cmds_RC \\\n    archive_expsym_cmds_RC \\\n    postinstall_cmds_RC \\\n    postuninstall_cmds_RC \\\n    old_archive_from_expsyms_cmds_RC \\\n    allow_undefined_flag_RC \\\n    no_undefined_flag_RC \\\n    export_symbols_cmds_RC \\\n    hardcode_libdir_flag_spec_RC \\\n    hardcode_libdir_flag_spec_ld_RC \\\n    hardcode_libdir_separator_RC \\\n    hardcode_automatic_RC \\\n    module_cmds_RC \\\n    module_expsym_cmds_RC \\\n    lt_cv_prog_compiler_c_o_RC \\\n    exclude_expsyms_RC \\\n    include_expsyms_RC; do\n\n    case $var in\n    old_archive_cmds_RC | \\\n    old_archive_from_new_cmds_RC | \\\n    archive_cmds_RC | \\\n    archive_expsym_cmds_RC | \\\n    module_cmds_RC | \\\n    module_expsym_cmds_RC | \\\n    old_archive_from_expsyms_cmds_RC | \\\n    export_symbols_cmds_RC | \\\n    extract_expsyms_cmds | reload_cmds | finish_cmds | \\\n    postinstall_cmds | postuninstall_cmds | \\\n    old_postinstall_cmds | old_postuninstall_cmds | \\\n    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)\n      # Double-quote double-evaled strings.\n      eval \"lt_$var=\\\\\\\"\\`\\$echo \\\"X\\$$var\\\" | \\$Xsed -e \\\"\\$double_quote_subst\\\" -e \\\"\\$sed_quote_subst\\\" -e \\\"\\$delay_variable_subst\\\"\\`\\\\\\\"\"\n      ;;\n    *)\n      eval \"lt_$var=\\\\\\\"\\`\\$echo \\\"X\\$$var\\\" | \\$Xsed -e \\\"\\$sed_quote_subst\\\"\\`\\\\\\\"\"\n      ;;\n    esac\n  done\n\n  case $lt_echo in\n  *'\\$0 --fallback-echo\"')\n    lt_echo=`$echo \"X$lt_echo\" | $Xsed -e 's/\\\\\\\\\\\\\\$0 --fallback-echo\"$/$0 --fallback-echo\"/'`\n    ;;\n  esac\n\ncfgfile=\"$ofile\"\n\n  cat <<__EOF__ >> \"$cfgfile\"\n# ### BEGIN LIBTOOL TAG CONFIG: $tagname\n\n# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:\n\n# Shell to use when invoking shell scripts.\nSHELL=$lt_SHELL\n\n# Whether or not to build shared libraries.\nbuild_libtool_libs=$enable_shared\n\n# Whether or not to build static libraries.\nbuild_old_libs=$enable_static\n\n# Whether or not to add -lc for building shared libraries.\nbuild_libtool_need_lc=$archive_cmds_need_lc_RC\n\n# Whether or not to disallow shared libs when runtime libs are static\nallow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC\n\n# Whether or not to optimize for fast installation.\nfast_install=$enable_fast_install\n\n# The host system.\nhost_alias=$host_alias\nhost=$host\nhost_os=$host_os\n\n# The build system.\nbuild_alias=$build_alias\nbuild=$build\nbuild_os=$build_os\n\n# An echo program that does not interpret backslashes.\necho=$lt_echo\n\n# The archiver.\nAR=$lt_AR\nAR_FLAGS=$lt_AR_FLAGS\n\n# A C compiler.\nLTCC=$lt_LTCC\n\n# LTCC compiler flags.\nLTCFLAGS=$lt_LTCFLAGS\n\n# A language-specific compiler.\nCC=$lt_compiler_RC\n\n# Is the compiler the GNU C compiler?\nwith_gcc=$GCC_RC\n\ngcc_dir=\\`gcc -print-file-name=. | $SED 's,/\\.$,,'\\`\ngcc_ver=\\`gcc -dumpversion\\`\n\n# An ERE matcher.\nEGREP=$lt_EGREP\n\n# The linker used to build libraries.\nLD=$lt_LD_RC\n\n# Whether we need hard or soft links.\nLN_S=$lt_LN_S\n\n# A BSD-compatible nm program.\nNM=$lt_NM\n\n# A symbol stripping program\nSTRIP=$lt_STRIP\n\n# Used to examine libraries when file_magic_cmd begins \"file\"\nMAGIC_CMD=$MAGIC_CMD\n\n# Used on cygwin: DLL creation program.\nDLLTOOL=\"$DLLTOOL\"\n\n# Used on cygwin: object dumper.\nOBJDUMP=\"$OBJDUMP\"\n\n# Used on cygwin: assembler.\nAS=\"$AS\"\n\n# The name of the directory that contains temporary libtool files.\nobjdir=$objdir\n\n# How to create reloadable object files.\nreload_flag=$lt_reload_flag\nreload_cmds=$lt_reload_cmds\n\n# How to pass a linker flag through the compiler.\nwl=$lt_lt_prog_compiler_wl_RC\n\n# Object file suffix (normally \"o\").\nobjext=\"$ac_objext\"\n\n# Old archive suffix (normally \"a\").\nlibext=\"$libext\"\n\n# Shared library suffix (normally \".so\").\nshrext_cmds='$shrext_cmds'\n\n# Executable file suffix (normally \"\").\nexeext=\"$exeext\"\n\n# Additional compiler flags for building library objects.\npic_flag=$lt_lt_prog_compiler_pic_RC\npic_mode=$pic_mode\n\n# What is the maximum length of a command?\nmax_cmd_len=$lt_cv_sys_max_cmd_len\n\n# Does compiler simultaneously support -c and -o options?\ncompiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC\n\n# Must we lock files when doing compilation?\nneed_locks=$lt_need_locks\n\n# Do we need the lib prefix for modules?\nneed_lib_prefix=$need_lib_prefix\n\n# Do we need a version for libraries?\nneed_version=$need_version\n\n# Whether dlopen is supported.\ndlopen_support=$enable_dlopen\n\n# Whether dlopen of programs is supported.\ndlopen_self=$enable_dlopen_self\n\n# Whether dlopen of statically linked programs is supported.\ndlopen_self_static=$enable_dlopen_self_static\n\n# Compiler flag to prevent dynamic linking.\nlink_static_flag=$lt_lt_prog_compiler_static_RC\n\n# Compiler flag to turn off builtin functions.\nno_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC\n\n# Compiler flag to allow reflexive dlopens.\nexport_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC\n\n# Compiler flag to generate shared objects directly from archives.\nwhole_archive_flag_spec=$lt_whole_archive_flag_spec_RC\n\n# Compiler flag to generate thread-safe objects.\nthread_safe_flag_spec=$lt_thread_safe_flag_spec_RC\n\n# Library versioning type.\nversion_type=$version_type\n\n# Format of library name prefix.\nlibname_spec=$lt_libname_spec\n\n# List of archive names.  First name is the real one, the rest are links.\n# The last name is the one that the linker finds with -lNAME.\nlibrary_names_spec=$lt_library_names_spec\n\n# The coded name of the library, if different from the real name.\nsoname_spec=$lt_soname_spec\n\n# Commands used to build and install an old-style archive.\nRANLIB=$lt_RANLIB\nold_archive_cmds=$lt_old_archive_cmds_RC\nold_postinstall_cmds=$lt_old_postinstall_cmds\nold_postuninstall_cmds=$lt_old_postuninstall_cmds\n\n# Create an old-style archive from a shared archive.\nold_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC\n\n# Create a temporary old-style archive to link instead of a shared archive.\nold_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC\n\n# Commands used to build and install a shared archive.\narchive_cmds=$lt_archive_cmds_RC\narchive_expsym_cmds=$lt_archive_expsym_cmds_RC\npostinstall_cmds=$lt_postinstall_cmds\npostuninstall_cmds=$lt_postuninstall_cmds\n\n# Commands used to build a loadable module (assumed same as above if empty)\nmodule_cmds=$lt_module_cmds_RC\nmodule_expsym_cmds=$lt_module_expsym_cmds_RC\n\n# Commands to strip libraries.\nold_striplib=$lt_old_striplib\nstriplib=$lt_striplib\n\n# Dependencies to place before the objects being linked to create a\n# shared library.\npredep_objects=\\`echo $lt_predep_objects_RC | \\$SED -e \"s@\\${gcc_dir}@\\\\\\${gcc_dir}@g;s@\\${gcc_ver}@\\\\\\${gcc_ver}@g\"\\`\n\n# Dependencies to place after the objects being linked to create a\n# shared library.\npostdep_objects=\\`echo $lt_postdep_objects_RC | \\$SED -e \"s@\\${gcc_dir}@\\\\\\${gcc_dir}@g;s@\\${gcc_ver}@\\\\\\${gcc_ver}@g\"\\`\n\n# Dependencies to place before the objects being linked to create a\n# shared library.\npredeps=$lt_predeps_RC\n\n# Dependencies to place after the objects being linked to create a\n# shared library.\npostdeps=$lt_postdeps_RC\n\n# The library search path used internally by the compiler when linking\n# a shared library.\ncompiler_lib_search_path=\\`echo $lt_compiler_lib_search_path_RC | \\$SED -e \"s@\\${gcc_dir}@\\\\\\${gcc_dir}@g;s@\\${gcc_ver}@\\\\\\${gcc_ver}@g\"\\`\n\n# Method to check whether dependent libraries are shared objects.\ndeplibs_check_method=$lt_deplibs_check_method\n\n# Command to use when deplibs_check_method == file_magic.\nfile_magic_cmd=$lt_file_magic_cmd\n\n# Flag that allows shared libraries with undefined symbols to be built.\nallow_undefined_flag=$lt_allow_undefined_flag_RC\n\n# Flag that forces no undefined symbols.\nno_undefined_flag=$lt_no_undefined_flag_RC\n\n# Commands used to finish a libtool library installation in a directory.\nfinish_cmds=$lt_finish_cmds\n\n# Same as above, but a single script fragment to be evaled but not shown.\nfinish_eval=$lt_finish_eval\n\n# Take the output of nm and produce a listing of raw symbols and C names.\nglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe\n\n# Transform the output of nm in a proper C declaration\nglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl\n\n# Transform the output of nm in a C name address pair\nglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address\n\n# This is the shared library runtime path variable.\nrunpath_var=$runpath_var\n\n# This is the shared library path variable.\nshlibpath_var=$shlibpath_var\n\n# Is shlibpath searched before the hard-coded library search path?\nshlibpath_overrides_runpath=$shlibpath_overrides_runpath\n\n# How to hardcode a shared library path into an executable.\nhardcode_action=$hardcode_action_RC\n\n# Whether we should hardcode library paths into libraries.\nhardcode_into_libs=$hardcode_into_libs\n\n# Flag to hardcode \\$libdir into a binary during linking.\n# This must work even if \\$libdir does not exist.\nhardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC\n\n# If ld is used when linking, flag to hardcode \\$libdir into\n# a binary during linking. This must work even if \\$libdir does\n# not exist.\nhardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC\n\n# Whether we need a single -rpath flag with a separated argument.\nhardcode_libdir_separator=$lt_hardcode_libdir_separator_RC\n\n# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the\n# resulting binary.\nhardcode_direct=$hardcode_direct_RC\n\n# Set to yes if using the -LDIR flag during linking hardcodes DIR into the\n# resulting binary.\nhardcode_minus_L=$hardcode_minus_L_RC\n\n# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into\n# the resulting binary.\nhardcode_shlibpath_var=$hardcode_shlibpath_var_RC\n\n# Set to yes if building a shared library automatically hardcodes DIR into the library\n# and all subsequent libraries and executables linked against it.\nhardcode_automatic=$hardcode_automatic_RC\n\n# Variables whose values should be saved in libtool wrapper scripts and\n# restored at relink time.\nvariables_saved_for_relink=\"$variables_saved_for_relink\"\n\n# Whether libtool must link a program against all its dependency libraries.\nlink_all_deplibs=$link_all_deplibs_RC\n\n# Compile-time system search path for libraries\nsys_lib_search_path_spec=\\`echo $lt_sys_lib_search_path_spec | \\$SED -e \"s@\\${gcc_dir}@\\\\\\${gcc_dir}@g;s@\\${gcc_ver}@\\\\\\${gcc_ver}@g\"\\`\n\n# Run-time system search path for libraries\nsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec\n\n# Fix the shell variable \\$srcfile for the compiler.\nfix_srcfile_path=\"$fix_srcfile_path_RC\"\n\n# Set to yes if exported symbols are required.\nalways_export_symbols=$always_export_symbols_RC\n\n# The commands to list exported symbols.\nexport_symbols_cmds=$lt_export_symbols_cmds_RC\n\n# The commands to extract the exported symbol list from a shared archive.\nextract_expsyms_cmds=$lt_extract_expsyms_cmds\n\n# Symbols that should not be listed in the preloaded symbols.\nexclude_expsyms=$lt_exclude_expsyms_RC\n\n# Symbols that must always be exported.\ninclude_expsyms=$lt_include_expsyms_RC\n\n# ### END LIBTOOL TAG CONFIG: $tagname\n\n__EOF__\n\n\nelse\n  # If there is no Makefile yet, we rely on a make rule to execute\n  # `config.status --recheck' to rerun these tests and create the\n  # libtool script then.\n  ltmain_in=`echo $ltmain | sed -e 's/\\.sh$/.in/'`\n  if test -f \"$ltmain_in\"; then\n    test -f Makefile && make \"$ltmain\"\n  fi\nfi\n\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\nCC=\"$lt_save_CC\"\n\n\t;;\n\n      *)\n\t{ { echo \"$as_me:$LINENO: error: Unsupported tag name: $tagname\" >&5\necho \"$as_me: error: Unsupported tag name: $tagname\" >&2;}\n   { (exit 1); exit 1; }; }\n\t;;\n      esac\n\n      # Append the new tag name to the list of available tags.\n      if test -n \"$tagname\" ; then\n      available_tags=\"$available_tags $tagname\"\n    fi\n    fi\n  done\n  IFS=\"$lt_save_ifs\"\n\n  # Now substitute the updated list of available tags.\n  if eval \"sed -e 's/^available_tags=.*\\$/available_tags=\\\"$available_tags\\\"/' \\\"$ofile\\\" > \\\"${ofile}T\\\"\"; then\n    mv \"${ofile}T\" \"$ofile\"\n    chmod +x \"$ofile\"\n  else\n    rm -f \"${ofile}T\"\n    { { echo \"$as_me:$LINENO: error: unable to update list of available tagged configurations.\" >&5\necho \"$as_me: error: unable to update list of available tagged configurations.\" >&2;}\n   { (exit 1); exit 1; }; }\n  fi\nfi\n\n\n\n# This can be used to rebuild libtool when needed\nLIBTOOL_DEPS=\"$ac_aux_dir/ltmain.sh\"\n\n# Always use our own libtool.\nLIBTOOL='$(SHELL) $(top_builddir)/libtool'\n\n# Prevent multiple expansion\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n# Configured headers (pretty much everybody needs blddir and vm)\n\nINCLUDES=\"-I${blddir} -I${vmmcfg} -I${topdir}/platforms/unix/vm -I${topdir}/platforms/Cross/vm -I${vmmdir}/vm\"\n\n\n\n# Checks for header files.\n\ncase \"$host\" in\n  *-sunos*)\tcat >>confdefs.h <<\\_ACEOF\n#define NEED_SUNOS_H 1\n_ACEOF\n\nesac\n\necho \"$as_me:$LINENO: checking for ANSI C header files\" >&5\necho $ECHO_N \"checking for ANSI C header files... $ECHO_C\" >&6\nif test \"${ac_cv_header_stdc+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <stdlib.h>\n#include <stdarg.h>\n#include <string.h>\n#include <float.h>\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_header_stdc=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_header_stdc=no\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\n\nif test $ac_cv_header_stdc = yes; then\n  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <string.h>\n\n_ACEOF\nif (eval \"$ac_cpp conftest.$ac_ext\") 2>&5 |\n  $EGREP \"memchr\" >/dev/null 2>&1; then\n  :\nelse\n  ac_cv_header_stdc=no\nfi\nrm -f conftest*\n\nfi\n\nif test $ac_cv_header_stdc = yes; then\n  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <stdlib.h>\n\n_ACEOF\nif (eval \"$ac_cpp conftest.$ac_ext\") 2>&5 |\n  $EGREP \"free\" >/dev/null 2>&1; then\n  :\nelse\n  ac_cv_header_stdc=no\nfi\nrm -f conftest*\n\nfi\n\nif test $ac_cv_header_stdc = yes; then\n  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.\n  if test \"$cross_compiling\" = yes; then\n  :\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <ctype.h>\n#if ((' ' & 0x0FF) == 0x020)\n# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')\n# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))\n#else\n# define ISLOWER(c) \\\n\t\t   (('a' <= (c) && (c) <= 'i') \\\n\t\t     || ('j' <= (c) && (c) <= 'r') \\\n\t\t     || ('s' <= (c) && (c) <= 'z'))\n# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))\n#endif\n\n#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))\nint\nmain ()\n{\n  int i;\n  for (i = 0; i < 256; i++)\n    if (XOR (islower (i), ISLOWER (i))\n\t|| toupper (i) != TOUPPER (i))\n      exit(2);\n  exit (0);\n}\n_ACEOF\nrm -f conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  :\nelse\n  echo \"$as_me: program exited with status $ac_status\" >&5\necho \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n( exit $ac_status )\nac_cv_header_stdc=no\nfi\nrm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext\nfi\nfi\nfi\necho \"$as_me:$LINENO: result: $ac_cv_header_stdc\" >&5\necho \"${ECHO_T}$ac_cv_header_stdc\" >&6\nif test $ac_cv_header_stdc = yes; then\n\ncat >>confdefs.h <<\\_ACEOF\n#define STDC_HEADERS 1\n_ACEOF\n\nfi\n\n\n\n\n\n\nfor ac_header in unistd.h string.h fcntl.h sys/file.h sys/param.h\ndo\nas_ac_Header=`echo \"ac_cv_header_$ac_header\" | $as_tr_sh`\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo \"$as_me:$LINENO: checking for $ac_header\" >&5\necho $ECHO_N \"checking for $ac_header... $ECHO_C\" >&6\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nfi\necho \"$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`\" >&5\necho \"${ECHO_T}`eval echo '${'$as_ac_Header'}'`\" >&6\nelse\n  # Is the header compilable?\necho \"$as_me:$LINENO: checking $ac_header usability\" >&5\necho $ECHO_N \"checking $ac_header usability... $ECHO_C\" >&6\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\n#include <$ac_header>\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_header_compiler=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_header_compiler=no\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\necho \"$as_me:$LINENO: result: $ac_header_compiler\" >&5\necho \"${ECHO_T}$ac_header_compiler\" >&6\n\n# Is the header present?\necho \"$as_me:$LINENO: checking $ac_header presence\" >&5\necho $ECHO_N \"checking $ac_header presence... $ECHO_C\" >&6\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <$ac_header>\n_ACEOF\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_cpp conftest.$ac_ext\\\"\") >&5\n  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } >/dev/null; then\n  if test -s conftest.err; then\n    ac_cpp_err=$ac_c_preproc_warn_flag\n    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag\n  else\n    ac_cpp_err=\n  fi\nelse\n  ac_cpp_err=yes\nfi\nif test -z \"$ac_cpp_err\"; then\n  ac_header_preproc=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n  ac_header_preproc=no\nfi\nrm -f conftest.err conftest.$ac_ext\necho \"$as_me:$LINENO: result: $ac_header_preproc\" >&5\necho \"${ECHO_T}$ac_header_preproc\" >&6\n\n# So?  What about this header?\ncase $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in\n  yes:no: )\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!\" >&5\necho \"$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result\" >&5\necho \"$as_me: WARNING: $ac_header: proceeding with the compiler's result\" >&2;}\n    ac_header_preproc=yes\n    ;;\n  no:yes:* )\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled\" >&5\necho \"$as_me: WARNING: $ac_header: present but cannot be compiled\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?\" >&5\necho \"$as_me: WARNING: $ac_header:     check for missing prerequisite headers?\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation\" >&5\necho \"$as_me: WARNING: $ac_header: see the Autoconf documentation\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header:     section \\\"Present But Cannot Be Compiled\\\"\" >&5\necho \"$as_me: WARNING: $ac_header:     section \\\"Present But Cannot Be Compiled\\\"\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result\" >&5\necho \"$as_me: WARNING: $ac_header: proceeding with the preprocessor's result\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence\" >&5\necho \"$as_me: WARNING: $ac_header: in the future, the compiler will take precedence\" >&2;}\n    (\n      cat <<\\_ASBOX\n## ------------------------------------------ ##\n## Report this to the AC_PACKAGE_NAME lists.  ##\n## ------------------------------------------ ##\n_ASBOX\n    ) |\n      sed \"s/^/$as_me: WARNING:     /\" >&2\n    ;;\nesac\necho \"$as_me:$LINENO: checking for $ac_header\" >&5\necho $ECHO_N \"checking for $ac_header... $ECHO_C\" >&6\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  eval \"$as_ac_Header=\\$ac_header_preproc\"\nfi\necho \"$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`\" >&5\necho \"${ECHO_T}`eval echo '${'$as_ac_Header'}'`\" >&6\n\nfi\nif test `eval echo '${'$as_ac_Header'}'` = yes; then\n  cat >>confdefs.h <<_ACEOF\n#define `echo \"HAVE_$ac_header\" | $as_tr_cpp` 1\n_ACEOF\n\nfi\n\ndone\n\n\n\n\nfor ac_header in sys/time.h sys/filio.h sys/select.h\ndo\nas_ac_Header=`echo \"ac_cv_header_$ac_header\" | $as_tr_sh`\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo \"$as_me:$LINENO: checking for $ac_header\" >&5\necho $ECHO_N \"checking for $ac_header... $ECHO_C\" >&6\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nfi\necho \"$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`\" >&5\necho \"${ECHO_T}`eval echo '${'$as_ac_Header'}'`\" >&6\nelse\n  # Is the header compilable?\necho \"$as_me:$LINENO: checking $ac_header usability\" >&5\necho $ECHO_N \"checking $ac_header usability... $ECHO_C\" >&6\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\n#include <$ac_header>\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_header_compiler=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_header_compiler=no\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\necho \"$as_me:$LINENO: result: $ac_header_compiler\" >&5\necho \"${ECHO_T}$ac_header_compiler\" >&6\n\n# Is the header present?\necho \"$as_me:$LINENO: checking $ac_header presence\" >&5\necho $ECHO_N \"checking $ac_header presence... $ECHO_C\" >&6\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <$ac_header>\n_ACEOF\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_cpp conftest.$ac_ext\\\"\") >&5\n  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } >/dev/null; then\n  if test -s conftest.err; then\n    ac_cpp_err=$ac_c_preproc_warn_flag\n    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag\n  else\n    ac_cpp_err=\n  fi\nelse\n  ac_cpp_err=yes\nfi\nif test -z \"$ac_cpp_err\"; then\n  ac_header_preproc=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n  ac_header_preproc=no\nfi\nrm -f conftest.err conftest.$ac_ext\necho \"$as_me:$LINENO: result: $ac_header_preproc\" >&5\necho \"${ECHO_T}$ac_header_preproc\" >&6\n\n# So?  What about this header?\ncase $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in\n  yes:no: )\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!\" >&5\necho \"$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result\" >&5\necho \"$as_me: WARNING: $ac_header: proceeding with the compiler's result\" >&2;}\n    ac_header_preproc=yes\n    ;;\n  no:yes:* )\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled\" >&5\necho \"$as_me: WARNING: $ac_header: present but cannot be compiled\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?\" >&5\necho \"$as_me: WARNING: $ac_header:     check for missing prerequisite headers?\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation\" >&5\necho \"$as_me: WARNING: $ac_header: see the Autoconf documentation\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header:     section \\\"Present But Cannot Be Compiled\\\"\" >&5\necho \"$as_me: WARNING: $ac_header:     section \\\"Present But Cannot Be Compiled\\\"\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result\" >&5\necho \"$as_me: WARNING: $ac_header: proceeding with the preprocessor's result\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence\" >&5\necho \"$as_me: WARNING: $ac_header: in the future, the compiler will take precedence\" >&2;}\n    (\n      cat <<\\_ASBOX\n## ------------------------------------------ ##\n## Report this to the AC_PACKAGE_NAME lists.  ##\n## ------------------------------------------ ##\n_ASBOX\n    ) |\n      sed \"s/^/$as_me: WARNING:     /\" >&2\n    ;;\nesac\necho \"$as_me:$LINENO: checking for $ac_header\" >&5\necho $ECHO_N \"checking for $ac_header... $ECHO_C\" >&6\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  eval \"$as_ac_Header=\\$ac_header_preproc\"\nfi\necho \"$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`\" >&5\necho \"${ECHO_T}`eval echo '${'$as_ac_Header'}'`\" >&6\n\nfi\nif test `eval echo '${'$as_ac_Header'}'` = yes; then\n  cat >>confdefs.h <<_ACEOF\n#define `echo \"HAVE_$ac_header\" | $as_tr_cpp` 1\n_ACEOF\n\nfi\n\ndone\n\n\nfor ac_header in features.h\ndo\nas_ac_Header=`echo \"ac_cv_header_$ac_header\" | $as_tr_sh`\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo \"$as_me:$LINENO: checking for $ac_header\" >&5\necho $ECHO_N \"checking for $ac_header... $ECHO_C\" >&6\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nfi\necho \"$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`\" >&5\necho \"${ECHO_T}`eval echo '${'$as_ac_Header'}'`\" >&6\nelse\n  # Is the header compilable?\necho \"$as_me:$LINENO: checking $ac_header usability\" >&5\necho $ECHO_N \"checking $ac_header usability... $ECHO_C\" >&6\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\n#include <$ac_header>\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_header_compiler=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_header_compiler=no\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\necho \"$as_me:$LINENO: result: $ac_header_compiler\" >&5\necho \"${ECHO_T}$ac_header_compiler\" >&6\n\n# Is the header present?\necho \"$as_me:$LINENO: checking $ac_header presence\" >&5\necho $ECHO_N \"checking $ac_header presence... $ECHO_C\" >&6\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <$ac_header>\n_ACEOF\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_cpp conftest.$ac_ext\\\"\") >&5\n  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } >/dev/null; then\n  if test -s conftest.err; then\n    ac_cpp_err=$ac_c_preproc_warn_flag\n    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag\n  else\n    ac_cpp_err=\n  fi\nelse\n  ac_cpp_err=yes\nfi\nif test -z \"$ac_cpp_err\"; then\n  ac_header_preproc=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n  ac_header_preproc=no\nfi\nrm -f conftest.err conftest.$ac_ext\necho \"$as_me:$LINENO: result: $ac_header_preproc\" >&5\necho \"${ECHO_T}$ac_header_preproc\" >&6\n\n# So?  What about this header?\ncase $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in\n  yes:no: )\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!\" >&5\necho \"$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result\" >&5\necho \"$as_me: WARNING: $ac_header: proceeding with the compiler's result\" >&2;}\n    ac_header_preproc=yes\n    ;;\n  no:yes:* )\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled\" >&5\necho \"$as_me: WARNING: $ac_header: present but cannot be compiled\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?\" >&5\necho \"$as_me: WARNING: $ac_header:     check for missing prerequisite headers?\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation\" >&5\necho \"$as_me: WARNING: $ac_header: see the Autoconf documentation\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header:     section \\\"Present But Cannot Be Compiled\\\"\" >&5\necho \"$as_me: WARNING: $ac_header:     section \\\"Present But Cannot Be Compiled\\\"\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result\" >&5\necho \"$as_me: WARNING: $ac_header: proceeding with the preprocessor's result\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence\" >&5\necho \"$as_me: WARNING: $ac_header: in the future, the compiler will take precedence\" >&2;}\n    (\n      cat <<\\_ASBOX\n## ------------------------------------------ ##\n## Report this to the AC_PACKAGE_NAME lists.  ##\n## ------------------------------------------ ##\n_ASBOX\n    ) |\n      sed \"s/^/$as_me: WARNING:     /\" >&2\n    ;;\nesac\necho \"$as_me:$LINENO: checking for $ac_header\" >&5\necho $ECHO_N \"checking for $ac_header... $ECHO_C\" >&6\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  eval \"$as_ac_Header=\\$ac_header_preproc\"\nfi\necho \"$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`\" >&5\necho \"${ECHO_T}`eval echo '${'$as_ac_Header'}'`\" >&6\n\nfi\nif test `eval echo '${'$as_ac_Header'}'` = yes; then\n  cat >>confdefs.h <<_ACEOF\n#define `echo \"HAVE_$ac_header\" | $as_tr_cpp` 1\n_ACEOF\n\nfi\n\ndone\n\n\nfor ac_header in alloca.h\ndo\nas_ac_Header=`echo \"ac_cv_header_$ac_header\" | $as_tr_sh`\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo \"$as_me:$LINENO: checking for $ac_header\" >&5\necho $ECHO_N \"checking for $ac_header... $ECHO_C\" >&6\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nfi\necho \"$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`\" >&5\necho \"${ECHO_T}`eval echo '${'$as_ac_Header'}'`\" >&6\nelse\n  # Is the header compilable?\necho \"$as_me:$LINENO: checking $ac_header usability\" >&5\necho $ECHO_N \"checking $ac_header usability... $ECHO_C\" >&6\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\n#include <$ac_header>\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_header_compiler=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_header_compiler=no\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\necho \"$as_me:$LINENO: result: $ac_header_compiler\" >&5\necho \"${ECHO_T}$ac_header_compiler\" >&6\n\n# Is the header present?\necho \"$as_me:$LINENO: checking $ac_header presence\" >&5\necho $ECHO_N \"checking $ac_header presence... $ECHO_C\" >&6\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <$ac_header>\n_ACEOF\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_cpp conftest.$ac_ext\\\"\") >&5\n  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } >/dev/null; then\n  if test -s conftest.err; then\n    ac_cpp_err=$ac_c_preproc_warn_flag\n    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag\n  else\n    ac_cpp_err=\n  fi\nelse\n  ac_cpp_err=yes\nfi\nif test -z \"$ac_cpp_err\"; then\n  ac_header_preproc=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n  ac_header_preproc=no\nfi\nrm -f conftest.err conftest.$ac_ext\necho \"$as_me:$LINENO: result: $ac_header_preproc\" >&5\necho \"${ECHO_T}$ac_header_preproc\" >&6\n\n# So?  What about this header?\ncase $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in\n  yes:no: )\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!\" >&5\necho \"$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result\" >&5\necho \"$as_me: WARNING: $ac_header: proceeding with the compiler's result\" >&2;}\n    ac_header_preproc=yes\n    ;;\n  no:yes:* )\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled\" >&5\necho \"$as_me: WARNING: $ac_header: present but cannot be compiled\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?\" >&5\necho \"$as_me: WARNING: $ac_header:     check for missing prerequisite headers?\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation\" >&5\necho \"$as_me: WARNING: $ac_header: see the Autoconf documentation\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header:     section \\\"Present But Cannot Be Compiled\\\"\" >&5\necho \"$as_me: WARNING: $ac_header:     section \\\"Present But Cannot Be Compiled\\\"\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result\" >&5\necho \"$as_me: WARNING: $ac_header: proceeding with the preprocessor's result\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence\" >&5\necho \"$as_me: WARNING: $ac_header: in the future, the compiler will take precedence\" >&2;}\n    (\n      cat <<\\_ASBOX\n## ------------------------------------------ ##\n## Report this to the AC_PACKAGE_NAME lists.  ##\n## ------------------------------------------ ##\n_ASBOX\n    ) |\n      sed \"s/^/$as_me: WARNING:     /\" >&2\n    ;;\nesac\necho \"$as_me:$LINENO: checking for $ac_header\" >&5\necho $ECHO_N \"checking for $ac_header... $ECHO_C\" >&6\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  eval \"$as_ac_Header=\\$ac_header_preproc\"\nfi\necho \"$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`\" >&5\necho \"${ECHO_T}`eval echo '${'$as_ac_Header'}'`\" >&6\n\nfi\nif test `eval echo '${'$as_ac_Header'}'` = yes; then\n  cat >>confdefs.h <<_ACEOF\n#define `echo \"HAVE_$ac_header\" | $as_tr_cpp` 1\n_ACEOF\n\nfi\n\ndone\n # SunOS5\necho \"$as_me:$LINENO: checking whether time.h and sys/time.h may both be included\" >&5\necho $ECHO_N \"checking whether time.h and sys/time.h may both be included... $ECHO_C\" >&6\nif test \"${ac_cv_header_time+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <sys/types.h>\n#include <sys/time.h>\n#include <time.h>\n\nint\nmain ()\n{\nif ((struct tm *) 0)\nreturn 0;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_header_time=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_header_time=no\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_header_time\" >&5\necho \"${ECHO_T}$ac_cv_header_time\" >&6\nif test $ac_cv_header_time = yes; then\n\ncat >>confdefs.h <<\\_ACEOF\n#define TIME_WITH_SYS_TIME 1\n_ACEOF\n\nfi\n\n\n\n\n\n\nac_header_dirent=no\nfor ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do\n  as_ac_Header=`echo \"ac_cv_header_dirent_$ac_hdr\" | $as_tr_sh`\necho \"$as_me:$LINENO: checking for $ac_hdr that defines DIR\" >&5\necho $ECHO_N \"checking for $ac_hdr that defines DIR... $ECHO_C\" >&6\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <sys/types.h>\n#include <$ac_hdr>\n\nint\nmain ()\n{\nif ((DIR *) 0)\nreturn 0;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  eval \"$as_ac_Header=yes\"\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\neval \"$as_ac_Header=no\"\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`\" >&5\necho \"${ECHO_T}`eval echo '${'$as_ac_Header'}'`\" >&6\nif test `eval echo '${'$as_ac_Header'}'` = yes; then\n  cat >>confdefs.h <<_ACEOF\n#define `echo \"HAVE_$ac_hdr\" | $as_tr_cpp` 1\n_ACEOF\n\nac_header_dirent=$ac_hdr; break\nfi\n\ndone\n# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.\nif test $ac_header_dirent = dirent.h; then\n  echo \"$as_me:$LINENO: checking for library containing opendir\" >&5\necho $ECHO_N \"checking for library containing opendir... $ECHO_C\" >&6\nif test \"${ac_cv_search_opendir+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_func_search_save_LIBS=$LIBS\nac_cv_search_opendir=no\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar opendir ();\nint\nmain ()\n{\nopendir ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_search_opendir=\"none required\"\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nif test \"$ac_cv_search_opendir\" = no; then\n  for ac_lib in dir; do\n    LIBS=\"-l$ac_lib  $ac_func_search_save_LIBS\"\n    cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar opendir ();\nint\nmain ()\n{\nopendir ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_search_opendir=\"-l$ac_lib\"\nbreak\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\n  done\nfi\nLIBS=$ac_func_search_save_LIBS\nfi\necho \"$as_me:$LINENO: result: $ac_cv_search_opendir\" >&5\necho \"${ECHO_T}$ac_cv_search_opendir\" >&6\nif test \"$ac_cv_search_opendir\" != no; then\n  test \"$ac_cv_search_opendir\" = \"none required\" || LIBS=\"$ac_cv_search_opendir $LIBS\"\n\nfi\n\nelse\n  echo \"$as_me:$LINENO: checking for library containing opendir\" >&5\necho $ECHO_N \"checking for library containing opendir... $ECHO_C\" >&6\nif test \"${ac_cv_search_opendir+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_func_search_save_LIBS=$LIBS\nac_cv_search_opendir=no\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar opendir ();\nint\nmain ()\n{\nopendir ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_search_opendir=\"none required\"\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nif test \"$ac_cv_search_opendir\" = no; then\n  for ac_lib in x; do\n    LIBS=\"-l$ac_lib  $ac_func_search_save_LIBS\"\n    cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar opendir ();\nint\nmain ()\n{\nopendir ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_search_opendir=\"-l$ac_lib\"\nbreak\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\n  done\nfi\nLIBS=$ac_func_search_save_LIBS\nfi\necho \"$as_me:$LINENO: result: $ac_cv_search_opendir\" >&5\necho \"${ECHO_T}$ac_cv_search_opendir\" >&6\nif test \"$ac_cv_search_opendir\" != no; then\n  test \"$ac_cv_search_opendir\" = \"none required\" || LIBS=\"$ac_cv_search_opendir $LIBS\"\n\nfi\n\nfi\n\n\nif test -f \"${vmmdir}/vm/interp.h\"; then\n  cat >>confdefs.h <<\\_ACEOF\n#define HAVE_INTERP_H 1\n_ACEOF\n\nfi\n\n\necho \"$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h\" >&5\necho $ECHO_N \"checking whether struct tm is in sys/time.h or time.h... $ECHO_C\" >&6\nif test \"${ac_cv_struct_tm+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <sys/types.h>\n#include <time.h>\n\nint\nmain ()\n{\nstruct tm *tp; tp->tm_sec;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_struct_tm=time.h\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_struct_tm=sys/time.h\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_struct_tm\" >&5\necho \"${ECHO_T}$ac_cv_struct_tm\" >&6\nif test $ac_cv_struct_tm = sys/time.h; then\n\ncat >>confdefs.h <<\\_ACEOF\n#define TM_IN_SYS_TIME 1\n_ACEOF\n\nfi\n\necho \"$as_me:$LINENO: checking for struct tm.tm_zone\" >&5\necho $ECHO_N \"checking for struct tm.tm_zone... $ECHO_C\" >&6\nif test \"${ac_cv_member_struct_tm_tm_zone+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <sys/types.h>\n#include <$ac_cv_struct_tm>\n\n\nint\nmain ()\n{\nstatic struct tm ac_aggr;\nif (ac_aggr.tm_zone)\nreturn 0;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_member_struct_tm_tm_zone=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <sys/types.h>\n#include <$ac_cv_struct_tm>\n\n\nint\nmain ()\n{\nstatic struct tm ac_aggr;\nif (sizeof ac_aggr.tm_zone)\nreturn 0;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_member_struct_tm_tm_zone=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_member_struct_tm_tm_zone=no\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone\" >&5\necho \"${ECHO_T}$ac_cv_member_struct_tm_tm_zone\" >&6\nif test $ac_cv_member_struct_tm_tm_zone = yes; then\n\ncat >>confdefs.h <<_ACEOF\n#define HAVE_STRUCT_TM_TM_ZONE 1\n_ACEOF\n\n\nfi\n\nif test \"$ac_cv_member_struct_tm_tm_zone\" = yes; then\n\ncat >>confdefs.h <<\\_ACEOF\n#define HAVE_TM_ZONE 1\n_ACEOF\n\nelse\n  echo \"$as_me:$LINENO: checking for tzname\" >&5\necho $ECHO_N \"checking for tzname... $ECHO_C\" >&6\nif test \"${ac_cv_var_tzname+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <time.h>\n#ifndef tzname /* For SGI.  */\nextern char *tzname[]; /* RS6000 and others reject char **tzname.  */\n#endif\n\nint\nmain ()\n{\natoi(*tzname);\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_var_tzname=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_var_tzname=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_var_tzname\" >&5\necho \"${ECHO_T}$ac_cv_var_tzname\" >&6\n  if test $ac_cv_var_tzname = yes; then\n\ncat >>confdefs.h <<\\_ACEOF\n#define HAVE_TZNAME 1\n_ACEOF\n\n  fi\nfi\n\n\necho \"$as_me:$LINENO: checking for socklen_t in sys/socket.h\" >&5\necho $ECHO_N \"checking for socklen_t in sys/socket.h... $ECHO_C\" >&6\nif test \"${ac_cv_socklen_t+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <sys/socket.h>\nint\nmain ()\n{\nsizeof(socklen_t);\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_socklen_t=\"yes\"\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_socklen_t=\"no\"\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_socklen_t\" >&5\necho \"${ECHO_T}$ac_cv_socklen_t\" >&6\ntest \"$ac_cv_socklen_t\" != \"yes\" && cat >>confdefs.h <<\\_ACEOF\n#define socklen_t int\n_ACEOF\n\necho \"$as_me:$LINENO: checking for atexit or on_exit\" >&5\necho $ECHO_N \"checking for atexit or on_exit... $ECHO_C\" >&6\nif test \"${ac_cv_atexit+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <stdlib.h>\nint\nmain ()\n{\natexit(0);\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_atexit=\"atexit\"\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <stdlib.h>\nint\nmain ()\n{\non_exit(0);\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_atexit=\"on_exit\"\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_atexit=\"no\"\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_atexit\" >&5\necho \"${ECHO_T}$ac_cv_atexit\" >&6\nif test \"$ac_cv_atexit\" != \"no\"; then\n  cat >>confdefs.h <<_ACEOF\n#define AT_EXIT $ac_cv_atexit\n_ACEOF\n\nfi\necho \"$as_me:$LINENO: checking for tzset\" >&5\necho $ECHO_N \"checking for tzset... $ECHO_C\" >&6\nif test \"${ac_cv_tzset+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <time.h>\nint\nmain ()\n{\ntzet();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_tzset=\"yes\"\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_tzset=\"no\"\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_tzset\" >&5\necho \"${ECHO_T}$ac_cv_tzset\" >&6\ntest \"$ac_cv_tzset\" != \"no\" && cat >>confdefs.h <<\\_ACEOF\n#define HAVE_TZSET 1\n_ACEOF\n\necho \"$as_me:$LINENO: checking for gmtoff in struct tm\" >&5\necho $ECHO_N \"checking for gmtoff in struct tm... $ECHO_C\" >&6\nif test \"${ac_cv_tm_gmtoff+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <time.h>\nint\nmain ()\n{\nstruct tm tm; tm.tm_gmtoff;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_tm_gmtoff=\"yes\"\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_tm_gmtoff=\"no\"\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_tm_gmtoff\" >&5\necho \"${ECHO_T}$ac_cv_tm_gmtoff\" >&6\ntest \"$ac_cv_tm_gmtoff\" != \"no\" && cat >>confdefs.h <<\\_ACEOF\n#define HAVE_TM_GMTOFF 1\n_ACEOF\n\necho \"$as_me:$LINENO: checking for timezone and daylight variables\" >&5\necho $ECHO_N \"checking for timezone and daylight variables... $ECHO_C\" >&6\nif test \"${ac_cv_timezone+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\nextern long timezone; extern int daylight;\nint\nmain ()\n{\ntimezone;daylight;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_timezone=\"yes\"\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_timezone=\"no\"\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_timezone\" >&5\necho \"${ECHO_T}$ac_cv_timezone\" >&6\ntest \"$ac_cv_timezone\" != \"no\" && cat >>confdefs.h <<\\_ACEOF\n#define HAVE_TIMEZONE 1\n_ACEOF\n\necho \"$as_me:$LINENO: checking for gethostname in unistd.h\" >&5\necho $ECHO_N \"checking for gethostname in unistd.h... $ECHO_C\" >&6\nif test \"${ac_cv_gethostname_p+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <unistd.h>\nint\nmain ()\n{\nreturn (int)gethostname;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_gethostname_p=\"yes\"\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_gethostname_p=\"no\"\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_gethostname_p\" >&5\necho \"${ECHO_T}$ac_cv_gethostname_p\" >&6\ntest \"$ac_cv_gethostname_p\" = \"no\" && cat >>confdefs.h <<\\_ACEOF\n#define NEED_GETHOSTNAME_P 1\n_ACEOF\n\n\n# Display options.\n\n\n# Check whether --with-rfb or --without-rfb was given.\nif test \"${with_rfb+set}\" = set; then\n  withval=\"$with_rfb\"\n  have_rfb=\"$withval\"\nelse\n  have_rfb=\"no\"\nfi;\n\ntest $have_rfb = \"yes\" && cat >>confdefs.h <<\\_ACEOF\n#define USE_RFB 1\n_ACEOF\n\n\n# Checks for libraries.\n\n\necho \"$as_me:$LINENO: checking for yp_bind in -lnsl\" >&5\necho $ECHO_N \"checking for yp_bind in -lnsl... $ECHO_C\" >&6\nif test \"${ac_cv_lib_nsl_yp_bind+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-lnsl  $LIBS\"\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar yp_bind ();\nint\nmain ()\n{\nyp_bind ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_lib_nsl_yp_bind=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_lib_nsl_yp_bind=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\necho \"$as_me:$LINENO: result: $ac_cv_lib_nsl_yp_bind\" >&5\necho \"${ECHO_T}$ac_cv_lib_nsl_yp_bind\" >&6\nif test $ac_cv_lib_nsl_yp_bind = yes; then\n  cat >>confdefs.h <<_ACEOF\n#define HAVE_LIBNSL 1\n_ACEOF\n\n  LIBS=\"-lnsl $LIBS\"\n\nfi\n\n\necho \"$as_me:$LINENO: checking for socket in -lsocket\" >&5\necho $ECHO_N \"checking for socket in -lsocket... $ECHO_C\" >&6\nif test \"${ac_cv_lib_socket_socket+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-lsocket  $LIBS\"\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar socket ();\nint\nmain ()\n{\nsocket ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_lib_socket_socket=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_lib_socket_socket=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\necho \"$as_me:$LINENO: result: $ac_cv_lib_socket_socket\" >&5\necho \"${ECHO_T}$ac_cv_lib_socket_socket\" >&6\nif test $ac_cv_lib_socket_socket = yes; then\n  cat >>confdefs.h <<_ACEOF\n#define HAVE_LIBSOCKET 1\n_ACEOF\n\n  LIBS=\"-lsocket $LIBS\"\n\nfi\n\n\necho \"$as_me:$LINENO: checking for sin in -lm\" >&5\necho $ECHO_N \"checking for sin in -lm... $ECHO_C\" >&6\nif test \"${ac_cv_lib_m_sin+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-lm  $LIBS\"\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar sin ();\nint\nmain ()\n{\nsin ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_lib_m_sin=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_lib_m_sin=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\necho \"$as_me:$LINENO: result: $ac_cv_lib_m_sin\" >&5\necho \"${ECHO_T}$ac_cv_lib_m_sin\" >&6\nif test $ac_cv_lib_m_sin = yes; then\n  cat >>confdefs.h <<_ACEOF\n#define HAVE_LIBM 1\n_ACEOF\n\n  LIBS=\"-lm $LIBS\"\n\nfi\n\n\necho \"$as_me:$LINENO: checking for pthread_create in -lpthread\" >&5\necho $ECHO_N \"checking for pthread_create in -lpthread... $ECHO_C\" >&6\nif test \"${ac_cv_lib_pthread_pthread_create+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-lpthread  $LIBS\"\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar pthread_create ();\nint\nmain ()\n{\npthread_create ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_lib_pthread_pthread_create=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_lib_pthread_pthread_create=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\necho \"$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create\" >&5\necho \"${ECHO_T}$ac_cv_lib_pthread_pthread_create\" >&6\nif test $ac_cv_lib_pthread_pthread_create = yes; then\n  cat >>confdefs.h <<_ACEOF\n#define HAVE_LIBPTHREAD 1\n_ACEOF\n\n  LIBS=\"-lpthread $LIBS\"\n\nfi\n\n# this seems to add no benefit\n#AC_CHECK_LIB(rt, clock_nanosleep)\n\n#AC_CHECK_FUNC(dlopen, [\n#  AC_DEFINE(HAVE_LIBDL,[1])\n#],[\n#  AC_CHECK_LIB(dl, dlopen, [\n#    LIBS=\"-ldl $LIBS\"\n#    AC_DEFINE(HAVE_LIBDL,[1])\n#  ],[\n#    AC_CHECK_FUNC(_dyld_present, [\n#      AC_DEFINE(HAVE_DYLD,[1])\n#    ])\n#  ])\n#])\n\necho \"$as_me:$LINENO: checking for _dyld_present\" >&5\necho $ECHO_N \"checking for _dyld_present... $ECHO_C\" >&6\nif test \"${ac_cv_func__dyld_present+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n/* Define _dyld_present to an innocuous variant, in case <limits.h> declares _dyld_present.\n   For example, HP-UX 11i <limits.h> declares gettimeofday.  */\n#define _dyld_present innocuous__dyld_present\n\n/* System header to define __stub macros and hopefully few prototypes,\n    which can conflict with char _dyld_present (); below.\n    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n    <limits.h> exists even on freestanding compilers.  */\n\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\n#undef _dyld_present\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar _dyld_present ();\n/* The GNU C library defines this for functions which it implements\n    to always fail with ENOSYS.  Some functions are actually named\n    something starting with __ and the normal name is an alias.  */\n#if defined (__stub__dyld_present) || defined (__stub____dyld_present)\nchoke me\n#else\nchar (*f) () = _dyld_present;\n#endif\n#ifdef __cplusplus\n}\n#endif\n\nint\nmain ()\n{\nreturn f != _dyld_present;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_func__dyld_present=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_func__dyld_present=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_func__dyld_present\" >&5\necho \"${ECHO_T}$ac_cv_func__dyld_present\" >&6\nif test $ac_cv_func__dyld_present = yes; then\n\n  cat >>confdefs.h <<\\_ACEOF\n#define HAVE_DYLD 1\n_ACEOF\n\n\nelse\n\n\nfor ac_header in dlfcn.h\ndo\nas_ac_Header=`echo \"ac_cv_header_$ac_header\" | $as_tr_sh`\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo \"$as_me:$LINENO: checking for $ac_header\" >&5\necho $ECHO_N \"checking for $ac_header... $ECHO_C\" >&6\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nfi\necho \"$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`\" >&5\necho \"${ECHO_T}`eval echo '${'$as_ac_Header'}'`\" >&6\nelse\n  # Is the header compilable?\necho \"$as_me:$LINENO: checking $ac_header usability\" >&5\necho $ECHO_N \"checking $ac_header usability... $ECHO_C\" >&6\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\n#include <$ac_header>\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_header_compiler=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_header_compiler=no\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\necho \"$as_me:$LINENO: result: $ac_header_compiler\" >&5\necho \"${ECHO_T}$ac_header_compiler\" >&6\n\n# Is the header present?\necho \"$as_me:$LINENO: checking $ac_header presence\" >&5\necho $ECHO_N \"checking $ac_header presence... $ECHO_C\" >&6\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <$ac_header>\n_ACEOF\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_cpp conftest.$ac_ext\\\"\") >&5\n  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } >/dev/null; then\n  if test -s conftest.err; then\n    ac_cpp_err=$ac_c_preproc_warn_flag\n    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag\n  else\n    ac_cpp_err=\n  fi\nelse\n  ac_cpp_err=yes\nfi\nif test -z \"$ac_cpp_err\"; then\n  ac_header_preproc=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n  ac_header_preproc=no\nfi\nrm -f conftest.err conftest.$ac_ext\necho \"$as_me:$LINENO: result: $ac_header_preproc\" >&5\necho \"${ECHO_T}$ac_header_preproc\" >&6\n\n# So?  What about this header?\ncase $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in\n  yes:no: )\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!\" >&5\necho \"$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result\" >&5\necho \"$as_me: WARNING: $ac_header: proceeding with the compiler's result\" >&2;}\n    ac_header_preproc=yes\n    ;;\n  no:yes:* )\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled\" >&5\necho \"$as_me: WARNING: $ac_header: present but cannot be compiled\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?\" >&5\necho \"$as_me: WARNING: $ac_header:     check for missing prerequisite headers?\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation\" >&5\necho \"$as_me: WARNING: $ac_header: see the Autoconf documentation\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header:     section \\\"Present But Cannot Be Compiled\\\"\" >&5\necho \"$as_me: WARNING: $ac_header:     section \\\"Present But Cannot Be Compiled\\\"\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result\" >&5\necho \"$as_me: WARNING: $ac_header: proceeding with the preprocessor's result\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence\" >&5\necho \"$as_me: WARNING: $ac_header: in the future, the compiler will take precedence\" >&2;}\n    (\n      cat <<\\_ASBOX\n## ------------------------------------------ ##\n## Report this to the AC_PACKAGE_NAME lists.  ##\n## ------------------------------------------ ##\n_ASBOX\n    ) |\n      sed \"s/^/$as_me: WARNING:     /\" >&2\n    ;;\nesac\necho \"$as_me:$LINENO: checking for $ac_header\" >&5\necho $ECHO_N \"checking for $ac_header... $ECHO_C\" >&6\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  eval \"$as_ac_Header=\\$ac_header_preproc\"\nfi\necho \"$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`\" >&5\necho \"${ECHO_T}`eval echo '${'$as_ac_Header'}'`\" >&6\n\nfi\nif test `eval echo '${'$as_ac_Header'}'` = yes; then\n  cat >>confdefs.h <<_ACEOF\n#define `echo \"HAVE_$ac_header\" | $as_tr_cpp` 1\n_ACEOF\n\nfi\n\ndone\n\n  echo \"$as_me:$LINENO: checking for dlopen\" >&5\necho $ECHO_N \"checking for dlopen... $ECHO_C\" >&6\nif test \"${ac_cv_func_dlopen+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.\n   For example, HP-UX 11i <limits.h> declares gettimeofday.  */\n#define dlopen innocuous_dlopen\n\n/* System header to define __stub macros and hopefully few prototypes,\n    which can conflict with char dlopen (); below.\n    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n    <limits.h> exists even on freestanding compilers.  */\n\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\n#undef dlopen\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar dlopen ();\n/* The GNU C library defines this for functions which it implements\n    to always fail with ENOSYS.  Some functions are actually named\n    something starting with __ and the normal name is an alias.  */\n#if defined (__stub_dlopen) || defined (__stub___dlopen)\nchoke me\n#else\nchar (*f) () = dlopen;\n#endif\n#ifdef __cplusplus\n}\n#endif\n\nint\nmain ()\n{\nreturn f != dlopen;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_func_dlopen=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_func_dlopen=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_func_dlopen\" >&5\necho \"${ECHO_T}$ac_cv_func_dlopen\" >&6\nif test $ac_cv_func_dlopen = yes; then\n\n    cat >>confdefs.h <<\\_ACEOF\n#define HAVE_LIBDL 1\n_ACEOF\n\n\nelse\n\n    echo \"$as_me:$LINENO: checking for dlopen in -ldl\" >&5\necho $ECHO_N \"checking for dlopen in -ldl... $ECHO_C\" >&6\nif test \"${ac_cv_lib_dl_dlopen+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-ldl  $LIBS\"\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar dlopen ();\nint\nmain ()\n{\ndlopen ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_lib_dl_dlopen=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_lib_dl_dlopen=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\necho \"$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen\" >&5\necho \"${ECHO_T}$ac_cv_lib_dl_dlopen\" >&6\nif test $ac_cv_lib_dl_dlopen = yes; then\n\n      LIBS=\"-ldl $LIBS\"\n      cat >>confdefs.h <<\\_ACEOF\n#define HAVE_LIBDL 1\n_ACEOF\n\n\nfi\n\n\nfi\n\n\nfi\n\n\n\n\nfor ac_func in snprintf __snprintf\ndo\nas_ac_var=`echo \"ac_cv_func_$ac_func\" | $as_tr_sh`\necho \"$as_me:$LINENO: checking for $ac_func\" >&5\necho $ECHO_N \"checking for $ac_func... $ECHO_C\" >&6\nif eval \"test \\\"\\${$as_ac_var+set}\\\" = set\"; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.\n   For example, HP-UX 11i <limits.h> declares gettimeofday.  */\n#define $ac_func innocuous_$ac_func\n\n/* System header to define __stub macros and hopefully few prototypes,\n    which can conflict with char $ac_func (); below.\n    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n    <limits.h> exists even on freestanding compilers.  */\n\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\n#undef $ac_func\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar $ac_func ();\n/* The GNU C library defines this for functions which it implements\n    to always fail with ENOSYS.  Some functions are actually named\n    something starting with __ and the normal name is an alias.  */\n#if defined (__stub_$ac_func) || defined (__stub___$ac_func)\nchoke me\n#else\nchar (*f) () = $ac_func;\n#endif\n#ifdef __cplusplus\n}\n#endif\n\nint\nmain ()\n{\nreturn f != $ac_func;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  eval \"$as_ac_var=yes\"\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\neval \"$as_ac_var=no\"\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`\" >&5\necho \"${ECHO_T}`eval echo '${'$as_ac_var'}'`\" >&6\nif test `eval echo '${'$as_ac_var'}'` = yes; then\n  cat >>confdefs.h <<_ACEOF\n#define `echo \"HAVE_$ac_func\" | $as_tr_cpp` 1\n_ACEOF\n break\nfi\ndone\n\n\n\n\nfor ac_header in stdlib.h unistd.h\ndo\nas_ac_Header=`echo \"ac_cv_header_$ac_header\" | $as_tr_sh`\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo \"$as_me:$LINENO: checking for $ac_header\" >&5\necho $ECHO_N \"checking for $ac_header... $ECHO_C\" >&6\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nfi\necho \"$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`\" >&5\necho \"${ECHO_T}`eval echo '${'$as_ac_Header'}'`\" >&6\nelse\n  # Is the header compilable?\necho \"$as_me:$LINENO: checking $ac_header usability\" >&5\necho $ECHO_N \"checking $ac_header usability... $ECHO_C\" >&6\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\n#include <$ac_header>\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_header_compiler=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_header_compiler=no\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\necho \"$as_me:$LINENO: result: $ac_header_compiler\" >&5\necho \"${ECHO_T}$ac_header_compiler\" >&6\n\n# Is the header present?\necho \"$as_me:$LINENO: checking $ac_header presence\" >&5\necho $ECHO_N \"checking $ac_header presence... $ECHO_C\" >&6\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <$ac_header>\n_ACEOF\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_cpp conftest.$ac_ext\\\"\") >&5\n  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } >/dev/null; then\n  if test -s conftest.err; then\n    ac_cpp_err=$ac_c_preproc_warn_flag\n    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag\n  else\n    ac_cpp_err=\n  fi\nelse\n  ac_cpp_err=yes\nfi\nif test -z \"$ac_cpp_err\"; then\n  ac_header_preproc=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n  ac_header_preproc=no\nfi\nrm -f conftest.err conftest.$ac_ext\necho \"$as_me:$LINENO: result: $ac_header_preproc\" >&5\necho \"${ECHO_T}$ac_header_preproc\" >&6\n\n# So?  What about this header?\ncase $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in\n  yes:no: )\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!\" >&5\necho \"$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result\" >&5\necho \"$as_me: WARNING: $ac_header: proceeding with the compiler's result\" >&2;}\n    ac_header_preproc=yes\n    ;;\n  no:yes:* )\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled\" >&5\necho \"$as_me: WARNING: $ac_header: present but cannot be compiled\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?\" >&5\necho \"$as_me: WARNING: $ac_header:     check for missing prerequisite headers?\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation\" >&5\necho \"$as_me: WARNING: $ac_header: see the Autoconf documentation\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header:     section \\\"Present But Cannot Be Compiled\\\"\" >&5\necho \"$as_me: WARNING: $ac_header:     section \\\"Present But Cannot Be Compiled\\\"\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result\" >&5\necho \"$as_me: WARNING: $ac_header: proceeding with the preprocessor's result\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence\" >&5\necho \"$as_me: WARNING: $ac_header: in the future, the compiler will take precedence\" >&2;}\n    (\n      cat <<\\_ASBOX\n## ------------------------------------------ ##\n## Report this to the AC_PACKAGE_NAME lists.  ##\n## ------------------------------------------ ##\n_ASBOX\n    ) |\n      sed \"s/^/$as_me: WARNING:     /\" >&2\n    ;;\nesac\necho \"$as_me:$LINENO: checking for $ac_header\" >&5\necho $ECHO_N \"checking for $ac_header... $ECHO_C\" >&6\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  eval \"$as_ac_Header=\\$ac_header_preproc\"\nfi\necho \"$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`\" >&5\necho \"${ECHO_T}`eval echo '${'$as_ac_Header'}'`\" >&6\n\nfi\nif test `eval echo '${'$as_ac_Header'}'` = yes; then\n  cat >>confdefs.h <<_ACEOF\n#define `echo \"HAVE_$ac_header\" | $as_tr_cpp` 1\n_ACEOF\n\nfi\n\ndone\n\n\nfor ac_func in getpagesize\ndo\nas_ac_var=`echo \"ac_cv_func_$ac_func\" | $as_tr_sh`\necho \"$as_me:$LINENO: checking for $ac_func\" >&5\necho $ECHO_N \"checking for $ac_func... $ECHO_C\" >&6\nif eval \"test \\\"\\${$as_ac_var+set}\\\" = set\"; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.\n   For example, HP-UX 11i <limits.h> declares gettimeofday.  */\n#define $ac_func innocuous_$ac_func\n\n/* System header to define __stub macros and hopefully few prototypes,\n    which can conflict with char $ac_func (); below.\n    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n    <limits.h> exists even on freestanding compilers.  */\n\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\n#undef $ac_func\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar $ac_func ();\n/* The GNU C library defines this for functions which it implements\n    to always fail with ENOSYS.  Some functions are actually named\n    something starting with __ and the normal name is an alias.  */\n#if defined (__stub_$ac_func) || defined (__stub___$ac_func)\nchoke me\n#else\nchar (*f) () = $ac_func;\n#endif\n#ifdef __cplusplus\n}\n#endif\n\nint\nmain ()\n{\nreturn f != $ac_func;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  eval \"$as_ac_var=yes\"\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\neval \"$as_ac_var=no\"\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`\" >&5\necho \"${ECHO_T}`eval echo '${'$as_ac_var'}'`\" >&6\nif test `eval echo '${'$as_ac_var'}'` = yes; then\n  cat >>confdefs.h <<_ACEOF\n#define `echo \"HAVE_$ac_func\" | $as_tr_cpp` 1\n_ACEOF\n\nfi\ndone\n\necho \"$as_me:$LINENO: checking for working mmap\" >&5\necho $ECHO_N \"checking for working mmap... $ECHO_C\" >&6\nif test \"${ac_cv_func_mmap_fixed_mapped+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test \"$cross_compiling\" = yes; then\n  ac_cv_func_mmap_fixed_mapped=no\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\n/* malloc might have been renamed as rpl_malloc. */\n#undef malloc\n\n/* Thanks to Mike Haertel and Jim Avera for this test.\n   Here is a matrix of mmap possibilities:\n\tmmap private not fixed\n\tmmap private fixed at somewhere currently unmapped\n\tmmap private fixed at somewhere already mapped\n\tmmap shared not fixed\n\tmmap shared fixed at somewhere currently unmapped\n\tmmap shared fixed at somewhere already mapped\n   For private mappings, we should verify that changes cannot be read()\n   back from the file, nor mmap's back from the file at a different\n   address.  (There have been systems where private was not correctly\n   implemented like the infamous i386 svr4.0, and systems where the\n   VM page cache was not coherent with the file system buffer cache\n   like early versions of FreeBSD and possibly contemporary NetBSD.)\n   For shared mappings, we should conversely verify that changes get\n   propagated back to all the places they're supposed to be.\n\n   Grep wants private fixed already mapped.\n   The main things grep needs to know about mmap are:\n   * does it exist and is it safe to write into the mmap'd area\n   * how to use it (BSD variants)  */\n\n#include <fcntl.h>\n#include <sys/mman.h>\n\n#if !STDC_HEADERS && !HAVE_STDLIB_H\nchar *malloc ();\n#endif\n\n/* This mess was copied from the GNU getpagesize.h.  */\n#if !HAVE_GETPAGESIZE\n/* Assume that all systems that can run configure have sys/param.h.  */\n# if !HAVE_SYS_PARAM_H\n#  define HAVE_SYS_PARAM_H 1\n# endif\n\n# ifdef _SC_PAGESIZE\n#  define getpagesize() sysconf(_SC_PAGESIZE)\n# else /* no _SC_PAGESIZE */\n#  if HAVE_SYS_PARAM_H\n#   include <sys/param.h>\n#   ifdef EXEC_PAGESIZE\n#    define getpagesize() EXEC_PAGESIZE\n#   else /* no EXEC_PAGESIZE */\n#    ifdef NBPG\n#     define getpagesize() NBPG * CLSIZE\n#     ifndef CLSIZE\n#      define CLSIZE 1\n#     endif /* no CLSIZE */\n#    else /* no NBPG */\n#     ifdef NBPC\n#      define getpagesize() NBPC\n#     else /* no NBPC */\n#      ifdef PAGESIZE\n#       define getpagesize() PAGESIZE\n#      endif /* PAGESIZE */\n#     endif /* no NBPC */\n#    endif /* no NBPG */\n#   endif /* no EXEC_PAGESIZE */\n#  else /* no HAVE_SYS_PARAM_H */\n#   define getpagesize() 8192\t/* punt totally */\n#  endif /* no HAVE_SYS_PARAM_H */\n# endif /* no _SC_PAGESIZE */\n\n#endif /* no HAVE_GETPAGESIZE */\n\nint\nmain ()\n{\n  char *data, *data2, *data3;\n  int i, pagesize;\n  int fd;\n\n  pagesize = getpagesize ();\n\n  /* First, make a file with some known garbage in it. */\n  data = (char *) malloc (pagesize);\n  if (!data)\n    exit (1);\n  for (i = 0; i < pagesize; ++i)\n    *(data + i) = rand ();\n  umask (0);\n  fd = creat (\"conftest.mmap\", 0600);\n  if (fd < 0)\n    exit (1);\n  if (write (fd, data, pagesize) != pagesize)\n    exit (1);\n  close (fd);\n\n  /* Next, try to mmap the file at a fixed address which already has\n     something else allocated at it.  If we can, also make sure that\n     we see the same garbage.  */\n  fd = open (\"conftest.mmap\", O_RDWR);\n  if (fd < 0)\n    exit (1);\n  data2 = (char *) malloc (2 * pagesize);\n  if (!data2)\n    exit (1);\n  data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);\n  if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,\n\t\t     MAP_PRIVATE | MAP_FIXED, fd, 0L))\n    exit (1);\n  for (i = 0; i < pagesize; ++i)\n    if (*(data + i) != *(data2 + i))\n      exit (1);\n\n  /* Finally, make sure that changes to the mapped area do not\n     percolate back to the file as seen by read().  (This is a bug on\n     some variants of i386 svr4.0.)  */\n  for (i = 0; i < pagesize; ++i)\n    *(data2 + i) = *(data2 + i) + 1;\n  data3 = (char *) malloc (pagesize);\n  if (!data3)\n    exit (1);\n  if (read (fd, data3, pagesize) != pagesize)\n    exit (1);\n  for (i = 0; i < pagesize; ++i)\n    if (*(data + i) != *(data3 + i))\n      exit (1);\n  close (fd);\n  exit (0);\n}\n_ACEOF\nrm -f conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_func_mmap_fixed_mapped=yes\nelse\n  echo \"$as_me: program exited with status $ac_status\" >&5\necho \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n( exit $ac_status )\nac_cv_func_mmap_fixed_mapped=no\nfi\nrm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext\nfi\nfi\necho \"$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped\" >&5\necho \"${ECHO_T}$ac_cv_func_mmap_fixed_mapped\" >&6\nif test $ac_cv_func_mmap_fixed_mapped = yes; then\n\ncat >>confdefs.h <<\\_ACEOF\n#define HAVE_MMAP 1\n_ACEOF\n\nfi\nrm -f conftest.mmap\n\n# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works\n# for constant arguments.  Useless!\necho \"$as_me:$LINENO: checking for working alloca.h\" >&5\necho $ECHO_N \"checking for working alloca.h... $ECHO_C\" >&6\nif test \"${ac_cv_working_alloca_h+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <alloca.h>\nint\nmain ()\n{\nchar *p = (char *) alloca (2 * sizeof (int));\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_working_alloca_h=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_working_alloca_h=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_working_alloca_h\" >&5\necho \"${ECHO_T}$ac_cv_working_alloca_h\" >&6\nif test $ac_cv_working_alloca_h = yes; then\n\ncat >>confdefs.h <<\\_ACEOF\n#define HAVE_ALLOCA_H 1\n_ACEOF\n\nfi\n\necho \"$as_me:$LINENO: checking for alloca\" >&5\necho $ECHO_N \"checking for alloca... $ECHO_C\" >&6\nif test \"${ac_cv_func_alloca_works+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#ifdef __GNUC__\n# define alloca __builtin_alloca\n#else\n# ifdef _MSC_VER\n#  include <malloc.h>\n#  define alloca _alloca\n# else\n#  if HAVE_ALLOCA_H\n#   include <alloca.h>\n#  else\n#   ifdef _AIX\n #pragma alloca\n#   else\n#    ifndef alloca /* predefined by HP cc +Olibcalls */\nchar *alloca ();\n#    endif\n#   endif\n#  endif\n# endif\n#endif\n\nint\nmain ()\n{\nchar *p = (char *) alloca (1);\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_func_alloca_works=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_func_alloca_works=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_func_alloca_works\" >&5\necho \"${ECHO_T}$ac_cv_func_alloca_works\" >&6\n\nif test $ac_cv_func_alloca_works = yes; then\n\ncat >>confdefs.h <<\\_ACEOF\n#define HAVE_ALLOCA 1\n_ACEOF\n\nelse\n  # The SVR3 libPW and SVR4 libucb both contain incompatible functions\n# that cause trouble.  Some versions do not even contain alloca or\n# contain a buggy version.  If you still want to use their alloca,\n# use ar to extract alloca.o from them instead of compiling alloca.c.\n\nALLOCA=alloca.$ac_objext\n\ncat >>confdefs.h <<\\_ACEOF\n#define C_ALLOCA 1\n_ACEOF\n\n\necho \"$as_me:$LINENO: checking whether \\`alloca.c' needs Cray hooks\" >&5\necho $ECHO_N \"checking whether \\`alloca.c' needs Cray hooks... $ECHO_C\" >&6\nif test \"${ac_cv_os_cray+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#if defined(CRAY) && ! defined(CRAY2)\nwebecray\n#else\nwenotbecray\n#endif\n\n_ACEOF\nif (eval \"$ac_cpp conftest.$ac_ext\") 2>&5 |\n  $EGREP \"webecray\" >/dev/null 2>&1; then\n  ac_cv_os_cray=yes\nelse\n  ac_cv_os_cray=no\nfi\nrm -f conftest*\n\nfi\necho \"$as_me:$LINENO: result: $ac_cv_os_cray\" >&5\necho \"${ECHO_T}$ac_cv_os_cray\" >&6\nif test $ac_cv_os_cray = yes; then\n  for ac_func in _getb67 GETB67 getb67; do\n    as_ac_var=`echo \"ac_cv_func_$ac_func\" | $as_tr_sh`\necho \"$as_me:$LINENO: checking for $ac_func\" >&5\necho $ECHO_N \"checking for $ac_func... $ECHO_C\" >&6\nif eval \"test \\\"\\${$as_ac_var+set}\\\" = set\"; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.\n   For example, HP-UX 11i <limits.h> declares gettimeofday.  */\n#define $ac_func innocuous_$ac_func\n\n/* System header to define __stub macros and hopefully few prototypes,\n    which can conflict with char $ac_func (); below.\n    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n    <limits.h> exists even on freestanding compilers.  */\n\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\n#undef $ac_func\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar $ac_func ();\n/* The GNU C library defines this for functions which it implements\n    to always fail with ENOSYS.  Some functions are actually named\n    something starting with __ and the normal name is an alias.  */\n#if defined (__stub_$ac_func) || defined (__stub___$ac_func)\nchoke me\n#else\nchar (*f) () = $ac_func;\n#endif\n#ifdef __cplusplus\n}\n#endif\n\nint\nmain ()\n{\nreturn f != $ac_func;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  eval \"$as_ac_var=yes\"\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\neval \"$as_ac_var=no\"\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`\" >&5\necho \"${ECHO_T}`eval echo '${'$as_ac_var'}'`\" >&6\nif test `eval echo '${'$as_ac_var'}'` = yes; then\n\ncat >>confdefs.h <<_ACEOF\n#define CRAY_STACKSEG_END $ac_func\n_ACEOF\n\n    break\nfi\n\n  done\nfi\n\necho \"$as_me:$LINENO: checking stack direction for C alloca\" >&5\necho $ECHO_N \"checking stack direction for C alloca... $ECHO_C\" >&6\nif test \"${ac_cv_c_stack_direction+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test \"$cross_compiling\" = yes; then\n  ac_cv_c_stack_direction=0\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\nint\nfind_stack_direction ()\n{\n  static char *addr = 0;\n  auto char dummy;\n  if (addr == 0)\n    {\n      addr = &dummy;\n      return find_stack_direction ();\n    }\n  else\n    return (&dummy > addr) ? 1 : -1;\n}\n\nint\nmain ()\n{\n  exit (find_stack_direction () < 0);\n}\n_ACEOF\nrm -f conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_c_stack_direction=1\nelse\n  echo \"$as_me: program exited with status $ac_status\" >&5\necho \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n( exit $ac_status )\nac_cv_c_stack_direction=-1\nfi\nrm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext\nfi\nfi\necho \"$as_me:$LINENO: result: $ac_cv_c_stack_direction\" >&5\necho \"${ECHO_T}$ac_cv_c_stack_direction\" >&6\n\ncat >>confdefs.h <<_ACEOF\n#define STACK_DIRECTION $ac_cv_c_stack_direction\n_ACEOF\n\n\nfi\n\n\n#AC_ARG_ENABLE(jit,\n#[  --enable-jit            enable J4 support [default=no]],\n#JIT=\"yes\", JIT=\"no\")\n#\n#test $JIT = \"yes\" && J_CFLAGS=\"-DJ_ENABLED\"\n#AC_SUBST(J_CFLAGS)\n\n# Checks for platform characteristics.\n\necho \"$as_me:$LINENO: checking for $host_cpu optimisation flags\" >&5\necho $ECHO_N \"checking for $host_cpu optimisation flags... $ECHO_C\" >&6\nac_optflags=\"no\"\nif test \"$GCC\" = yes; then\n  case $host_cpu in\n# Leave this to the configure command\n# i?86)\n#   ac_optflags=\"-fomit-frame-pointer\"\n#   ;;\n  powerpc|ppc)\n    ac_optflags=\"-O3 -funroll-loops -mcpu=750 -mno-fused-madd\"\n    ;;\n  esac\n  cat >>confdefs.h <<\\_ACEOF\n#define VM_BUILD_STRING \"Unix built on \"__DATE__ \" \"__TIME__\" Compiler: \"__VERSION__\n_ACEOF\n\nelse\n  ac_optflags=\"-O\"\n  ac_vm_build_date=\"`date`\"\n  cat >>confdefs.h <<\\_ACEOF\n#define VM_BUILD_STRING \"Unix built on ${ac_vm_build_date}\"\n_ACEOF\n\nfi\nif test \"$ac_optflags\" = \"no\"; then\n  echo \"$as_me:$LINENO: result: (none)\" >&5\necho \"${ECHO_T}(none)\" >&6\nelse\n  CFLAGS=\"$CFLAGS $ac_optflags\"\n  echo \"$as_me:$LINENO: result: \\\"$ac_optflags\\\"\" >&5\necho \"${ECHO_T}\\\"$ac_optflags\\\"\" >&6\nfi\nINTERP=\"cointerp\"\n\nfor ac_prog in gawk mawk nawk awk\ndo\n  # Extract the first word of \"$ac_prog\", so it can be a program name with args.\nset dummy $ac_prog; ac_word=$2\necho \"$as_me:$LINENO: checking for $ac_word\" >&5\necho $ECHO_N \"checking for $ac_word... $ECHO_C\" >&6\nif test \"${ac_cv_prog_AWK+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -n \"$AWK\"; then\n  ac_cv_prog_AWK=\"$AWK\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for ac_exec_ext in '' $ac_executable_extensions; do\n  if $as_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_AWK=\"$ac_prog\"\n    echo \"$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\ndone\n\nfi\nfi\nAWK=$ac_cv_prog_AWK\nif test -n \"$AWK\"; then\n  echo \"$as_me:$LINENO: result: $AWK\" >&5\necho \"${ECHO_T}$AWK\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\n\n  test -n \"$AWK\" && break\ndone\n\necho \"$as_me:$LINENO: checking whether we can compile gcc3x-cointerp.c\" >&5\necho $ECHO_N \"checking whether we can compile gcc3x-cointerp.c... $ECHO_C\" >&6\nif test \"$GCC\" = \"yes\"; then\n  INTERP=\"gcc3x-$INTERP\"; echo \"$as_me:$LINENO: result: yes\" >&5\necho \"${ECHO_T}yes\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\nfi\necho \"$as_me:$LINENO: checking for prefix to use for loadable modules\" >&5\necho $ECHO_N \"checking for prefix to use for loadable modules... $ECHO_C\" >&6\nif test \"${ac_cv_module_prefix+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test -x ./libtool &&\n   test \"`./libtool --config | fgrep need_lib_prefix`\" = \"need_lib_prefix=no\"\nthen ac_cv_module_prefix=\"(none)\";\nelse ac_cv_module_prefix=\"lib\"\nfi\nfi\necho \"$as_me:$LINENO: result: $ac_cv_module_prefix\" >&5\necho \"${ECHO_T}$ac_cv_module_prefix\" >&6\ncat >>confdefs.h <<_ACEOF\n#define VM_MODULE_PREFIX \"$mkfrags_lib_prefix\"\n_ACEOF\n\ntest \"$ac_cv_module_prefix\" = lib && mkfrags_lib_prefix=lib\necho \"$as_me:$LINENO: checking for compiler flags to force 32-bit addresses\" >&5\necho $ECHO_N \"checking for compiler flags to force 32-bit addresses... $ECHO_C\" >&6\ncase $host in\n  alpha*)\n    CFLAGS_32=\"-taso\"\n    test \"$GCC\" = \"yes\" && CC=\"\\$(utldir)/decgcc\"\n    ;;\nesac\necho \"$as_me:$LINENO: result: $CFLAGS_32\" >&5\necho \"${ECHO_T}$CFLAGS_32\" >&6\n\nCFLAGS=\"$CFLAGS_32 $CFLAGS -msse\"\n\necho \"$as_me:$LINENO: checking whether byte ordering is bigendian\" >&5\necho $ECHO_N \"checking whether byte ordering is bigendian... $ECHO_C\" >&6\nif test \"${ac_cv_c_bigendian+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  # See if sys/param.h defines the BYTE_ORDER macro.\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <sys/types.h>\n#include <sys/param.h>\n\nint\nmain ()\n{\n#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN\n bogus endian macros\n#endif\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  # It does; now see whether it defined to BIG_ENDIAN or not.\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <sys/types.h>\n#include <sys/param.h>\n\nint\nmain ()\n{\n#if BYTE_ORDER != BIG_ENDIAN\n not big endian\n#endif\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_c_bigendian=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_c_bigendian=no\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n# It does not; compile a test program.\nif test \"$cross_compiling\" = yes; then\n  # try to guess the endianness by grepping values into an object file\n  ac_cv_c_bigendian=unknown\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\nshort ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };\nshort ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };\nvoid _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }\nshort ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };\nshort ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };\nvoid _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }\nint\nmain ()\n{\n _ascii (); _ebcdic ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then\n  ac_cv_c_bigendian=yes\nfi\nif grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then\n  if test \"$ac_cv_c_bigendian\" = unknown; then\n    ac_cv_c_bigendian=no\n  else\n    # finding both strings is unlikely to happen, but who knows?\n    ac_cv_c_bigendian=unknown\n  fi\nfi\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\nint\nmain ()\n{\n  /* Are we little or big endian?  From Harbison&Steele.  */\n  union\n  {\n    long l;\n    char c[sizeof (long)];\n  } u;\n  u.l = 1;\n  exit (u.c[sizeof (long) - 1] == 1);\n}\n_ACEOF\nrm -f conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_c_bigendian=no\nelse\n  echo \"$as_me: program exited with status $ac_status\" >&5\necho \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n( exit $ac_status )\nac_cv_c_bigendian=yes\nfi\nrm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext\nfi\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_c_bigendian\" >&5\necho \"${ECHO_T}$ac_cv_c_bigendian\" >&6\ncase $ac_cv_c_bigendian in\n  yes)\n\ncat >>confdefs.h <<\\_ACEOF\n#define WORDS_BIGENDIAN 1\n_ACEOF\n ;;\n  no)\n     ;;\n  *)\n    { { echo \"$as_me:$LINENO: error: unknown endianness\npresetting ac_cv_c_bigendian=no (or yes) will help\" >&5\necho \"$as_me: error: unknown endianness\npresetting ac_cv_c_bigendian=no (or yes) will help\" >&2;}\n   { (exit 1); exit 1; }; } ;;\nesac\n\nif test $ac_cv_c_bigendian != yes\nthen CFLAGS=\"$CFLAGS -DLSB_FIRST=1\"\nfi\necho \"$as_me:$LINENO: checking whether unaligned access to doubles is ok\" >&5\necho $ECHO_N \"checking whether unaligned access to doubles is ok... $ECHO_C\" >&6\nif test \"${ac_cv_double_align+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  if test \"$cross_compiling\" = yes; then\n  { { echo \"$as_me:$LINENO: error: cannot run test program while cross compiling\nSee \\`config.log' for more details.\" >&5\necho \"$as_me: error: cannot run test program while cross compiling\nSee \\`config.log' for more details.\" >&2;}\n   { (exit 1); exit 1; }; }\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\nf(int i){*(double *)i=*(double *)(i+4);}\n              int main(){char b[12];f(b);return 0;}\n_ACEOF\nrm -f conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_double_align=\"yes\"\nelse\n  echo \"$as_me: program exited with status $ac_status\" >&5\necho \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n( exit $ac_status )\nac_cv_double_align=\"no\"\nfi\nrm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext\nfi\nfi\necho \"$as_me:$LINENO: result: $ac_cv_double_align\" >&5\necho \"${ECHO_T}$ac_cv_double_align\" >&6\ntest \"$ac_cv_double_align\" = \"no\" && cat >>confdefs.h <<\\_ACEOF\n#define DOUBLE_WORD_ALIGNMENT 1\n_ACEOF\n\n\ncase $host_os in\n  darwin*)\n    cat >>confdefs.h <<\\_ACEOF\n#define DARWIN 1\n_ACEOF\n\n#    CFLAGS=\"-no-cpp-precomp $CFLAGS\"\n    with_npsqueak=no\n    VM_APP_ICONS=\"${imgdir}/SqueakVM.icns\"\n    ;;\n  *)\n    VM_APP_ICONS=\"\"\n    ;;\nesac\n\n\n\n# Checks for browser support\n\n\n\n\n\n\n# Check whether --with-npsqueak or --without-npsqueak was given.\nif test \"${with_npsqueak+set}\" = set; then\n  withval=\"$with_npsqueak\"\n  with_npsqueak=\"$withval\"\nelse\n  with_npsqueak=\"yes\"\nfi;\n\nif test \"$with_npsqueak\" = \"no\"; then\n  npsqueak=\"\"\n  install_nps=\"\"\n  uninstall_nps=\"\"\nelse\n  npsqueak=npsqueak\n  install_nps=install-npsqueak\n  uninstall_nps=uninstall-npsqueak\nfi\n\n# Install locations\n\nif test \"x${prefix}\" = xNONE; then\n  SQ_LIBDIR=${ac_default_prefix}/lib/squeak/${SQ_VERSION}\nelse\n  SQ_LIBDIR=${prefix}/lib/squeak/${SQ_VERSION}\nfi\n\n\ncat >>confdefs.h <<_ACEOF\n#define SQ_LIBDIR \"${SQ_LIBDIR}\"\n_ACEOF\n\n\n# Configure files\n\nmake_cfg=${blddir}/make.cfg\nmake_int=${blddir}/make.int\nmake_ext=${blddir}/make.ext\nmake_prg=${blddir}/make.prg\n\n\n\n\n\n\nMakefile_install=${cfgdir}/Makefile.install\nMakefile_dist=${topdir}/util/Makefile.dist\nMakefile_rpm=${topdir}/util/Makefile.rpm\nMakefile_deb=${topdir}/util/Makefile.deb\n\n\n\n\n\n\n# Configure VM modules xxx MAKE INTERNAL WORK\n\nint_modules=\"vm\"\next_modules=\"`cd ${topdir}/platforms/unix; echo vm-*`\"\n\n\n\n\n# Configure plugins\n\ndisabled_plugins=\"\"\nrm -f plugins.exc\nplugin=\"vm\"\nplibs=\"\"\nrm -f vm.sub vm.lib\n\n\n\n\n# Check whether --enable-iconv or --disable-iconv was given.\nif test \"${enable_iconv+set}\" = set; then\n  enableval=\"$enable_iconv\"\n  with_iconv=\"$withval\"\nelse\n  with_iconv=\"yes\"\nfi;\n\n\ncase $host_os in\n  darwin*) LIBS=\"$LIBS -framework CoreFoundation -framework CoreServices\";;\n  *)       ;;\nesac\n\nif test \"$with_iconv\" = \"yes\"; then\n\nfor ac_header in iconv.h\ndo\nas_ac_Header=`echo \"ac_cv_header_$ac_header\" | $as_tr_sh`\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo \"$as_me:$LINENO: checking for $ac_header\" >&5\necho $ECHO_N \"checking for $ac_header... $ECHO_C\" >&6\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nfi\necho \"$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`\" >&5\necho \"${ECHO_T}`eval echo '${'$as_ac_Header'}'`\" >&6\nelse\n  # Is the header compilable?\necho \"$as_me:$LINENO: checking $ac_header usability\" >&5\necho $ECHO_N \"checking $ac_header usability... $ECHO_C\" >&6\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\n#include <$ac_header>\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_header_compiler=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_header_compiler=no\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\necho \"$as_me:$LINENO: result: $ac_header_compiler\" >&5\necho \"${ECHO_T}$ac_header_compiler\" >&6\n\n# Is the header present?\necho \"$as_me:$LINENO: checking $ac_header presence\" >&5\necho $ECHO_N \"checking $ac_header presence... $ECHO_C\" >&6\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <$ac_header>\n_ACEOF\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_cpp conftest.$ac_ext\\\"\") >&5\n  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } >/dev/null; then\n  if test -s conftest.err; then\n    ac_cpp_err=$ac_c_preproc_warn_flag\n    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag\n  else\n    ac_cpp_err=\n  fi\nelse\n  ac_cpp_err=yes\nfi\nif test -z \"$ac_cpp_err\"; then\n  ac_header_preproc=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n  ac_header_preproc=no\nfi\nrm -f conftest.err conftest.$ac_ext\necho \"$as_me:$LINENO: result: $ac_header_preproc\" >&5\necho \"${ECHO_T}$ac_header_preproc\" >&6\n\n# So?  What about this header?\ncase $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in\n  yes:no: )\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!\" >&5\necho \"$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result\" >&5\necho \"$as_me: WARNING: $ac_header: proceeding with the compiler's result\" >&2;}\n    ac_header_preproc=yes\n    ;;\n  no:yes:* )\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled\" >&5\necho \"$as_me: WARNING: $ac_header: present but cannot be compiled\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?\" >&5\necho \"$as_me: WARNING: $ac_header:     check for missing prerequisite headers?\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation\" >&5\necho \"$as_me: WARNING: $ac_header: see the Autoconf documentation\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header:     section \\\"Present But Cannot Be Compiled\\\"\" >&5\necho \"$as_me: WARNING: $ac_header:     section \\\"Present But Cannot Be Compiled\\\"\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result\" >&5\necho \"$as_me: WARNING: $ac_header: proceeding with the preprocessor's result\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence\" >&5\necho \"$as_me: WARNING: $ac_header: in the future, the compiler will take precedence\" >&2;}\n    (\n      cat <<\\_ASBOX\n## ------------------------------------------ ##\n## Report this to the AC_PACKAGE_NAME lists.  ##\n## ------------------------------------------ ##\n_ASBOX\n    ) |\n      sed \"s/^/$as_me: WARNING:     /\" >&2\n    ;;\nesac\necho \"$as_me:$LINENO: checking for $ac_header\" >&5\necho $ECHO_N \"checking for $ac_header... $ECHO_C\" >&6\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  eval \"$as_ac_Header=\\$ac_header_preproc\"\nfi\necho \"$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`\" >&5\necho \"${ECHO_T}`eval echo '${'$as_ac_Header'}'`\" >&6\n\nfi\nif test `eval echo '${'$as_ac_Header'}'` = yes; then\n  cat >>confdefs.h <<_ACEOF\n#define `echo \"HAVE_$ac_header\" | $as_tr_cpp` 1\n_ACEOF\n\nfi\n\ndone\n\n\n  echo \"$as_me:$LINENO: checking for _dyld_present\" >&5\necho $ECHO_N \"checking for _dyld_present... $ECHO_C\" >&6\nif test \"${ac_cv_func__dyld_present+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n/* Define _dyld_present to an innocuous variant, in case <limits.h> declares _dyld_present.\n   For example, HP-UX 11i <limits.h> declares gettimeofday.  */\n#define _dyld_present innocuous__dyld_present\n\n/* System header to define __stub macros and hopefully few prototypes,\n    which can conflict with char _dyld_present (); below.\n    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n    <limits.h> exists even on freestanding compilers.  */\n\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\n#undef _dyld_present\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar _dyld_present ();\n/* The GNU C library defines this for functions which it implements\n    to always fail with ENOSYS.  Some functions are actually named\n    something starting with __ and the normal name is an alias.  */\n#if defined (__stub__dyld_present) || defined (__stub____dyld_present)\nchoke me\n#else\nchar (*f) () = _dyld_present;\n#endif\n#ifdef __cplusplus\n}\n#endif\n\nint\nmain ()\n{\nreturn f != _dyld_present;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_func__dyld_present=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_func__dyld_present=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_func__dyld_present\" >&5\necho \"${ECHO_T}$ac_cv_func__dyld_present\" >&6\nif test $ac_cv_func__dyld_present = yes; then\n  :\nelse\n\n    echo \"$as_me:$LINENO: checking for iconv_open in -liconv\" >&5\necho $ECHO_N \"checking for iconv_open in -liconv... $ECHO_C\" >&6\nif test \"${ac_cv_lib_iconv_iconv_open+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-liconv  $LIBS\"\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar iconv_open ();\nint\nmain ()\n{\niconv_open ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_lib_iconv_iconv_open=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_lib_iconv_iconv_open=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\necho \"$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv_open\" >&5\necho \"${ECHO_T}$ac_cv_lib_iconv_iconv_open\" >&6\nif test $ac_cv_lib_iconv_iconv_open = yes; then\n  ac_cv_iconv=yes\nelse\n\n      echo \"$as_me:$LINENO: checking for libiconv_open in -liconv\" >&5\necho $ECHO_N \"checking for libiconv_open in -liconv... $ECHO_C\" >&6\nif test \"${ac_cv_lib_iconv_libiconv_open+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-liconv  $LIBS\"\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar libiconv_open ();\nint\nmain ()\n{\nlibiconv_open ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_lib_iconv_libiconv_open=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_lib_iconv_libiconv_open=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\necho \"$as_me:$LINENO: result: $ac_cv_lib_iconv_libiconv_open\" >&5\necho \"${ECHO_T}$ac_cv_lib_iconv_libiconv_open\" >&6\nif test $ac_cv_lib_iconv_libiconv_open = yes; then\n  ac_cv_iconv=yes\nelse\n  ac_cv_iconv=no\nfi\n\n\nfi\n\n    if test $ac_cv_iconv = yes; then\n      LIBS=\"$LIBS -liconv\"\n    fi\n\nfi\n\n\n\n  echo \"$as_me:$LINENO: checking for nl_langinfo and CODESET\" >&5\necho $ECHO_N \"checking for nl_langinfo and CODESET... $ECHO_C\" >&6\nif test \"${ac_cv_langinfo_codeset+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <langinfo.h>\nint\nmain ()\n{\nchar *cs= nl_langinfo(CODESET);\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_langinfo_codeset=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_langinfo_codeset=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\n\nfi\necho \"$as_me:$LINENO: result: $ac_cv_langinfo_codeset\" >&5\necho \"${ECHO_T}$ac_cv_langinfo_codeset\" >&6\n  if test $ac_cv_langinfo_codeset = yes; then\n\ncat >>confdefs.h <<\\_ACEOF\n#define HAVE_LANGINFO_CODESET 1\n_ACEOF\n\n  fi\n\n\nelse\n  echo \"$as_me:$LINENO: result: ******** disabling iconv\" >&5\necho \"${ECHO_T}******** disabling iconv\" >&6\nfi\n\necho \"$as_me:$LINENO: checking for nanosleep\" >&5\necho $ECHO_N \"checking for nanosleep... $ECHO_C\" >&6\nif test \"${ac_cv_func_nanosleep+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n/* Define nanosleep to an innocuous variant, in case <limits.h> declares nanosleep.\n   For example, HP-UX 11i <limits.h> declares gettimeofday.  */\n#define nanosleep innocuous_nanosleep\n\n/* System header to define __stub macros and hopefully few prototypes,\n    which can conflict with char nanosleep (); below.\n    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n    <limits.h> exists even on freestanding compilers.  */\n\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\n#undef nanosleep\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar nanosleep ();\n/* The GNU C library defines this for functions which it implements\n    to always fail with ENOSYS.  Some functions are actually named\n    something starting with __ and the normal name is an alias.  */\n#if defined (__stub_nanosleep) || defined (__stub___nanosleep)\nchoke me\n#else\nchar (*f) () = nanosleep;\n#endif\n#ifdef __cplusplus\n}\n#endif\n\nint\nmain ()\n{\nreturn f != nanosleep;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_func_nanosleep=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_func_nanosleep=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_func_nanosleep\" >&5\necho \"${ECHO_T}$ac_cv_func_nanosleep\" >&6\nif test $ac_cv_func_nanosleep = yes; then\n\n  cat >>confdefs.h <<\\_ACEOF\n#define HAVE_NANOSLEEP 1\n_ACEOF\n\n\n\nfi\n\nif test \"${plibs}\"; then\n  llibs=\"${LIBS}\"\n  for l in ${plibs}; do\n  llibs=\"${llibs} -l${l}\"\n  done\n  echo ${llibs} > ${plugin}.lib\nfi\nplugin=\"vm-display-custom\"\nplibs=\"\"\nrm -f vm-display-custom.sub vm-display-custom.lib\n# -*- sh -*-\n\necho \"$as_me:$LINENO: checking for custom display support\" >&5\necho $ECHO_N \"checking for custom display support... $ECHO_C\" >&6\n\n\n# Check whether --with-custom-display or --without-custom-display was given.\nif test \"${with_custom_display+set}\" = set; then\n  withval=\"$with_custom_display\"\n  have_dpy_custom=\"$withval\"\nelse\n  have_dpy_custom=\"no\"\nfi;\n\nif test \"$have_dpy_custom\" = \"yes\"; then\n  # check for libraries, headers, etc., here...\n  echo \"$as_me:$LINENO: result: yes\" >&5\necho \"${ECHO_T}yes\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\n\n\n  echo \"$as_me:$LINENO: result: ******** disabling ${plugin}\" >&5\necho \"${ECHO_T}******** disabling ${plugin}\" >&6\n  disabled_plugins=\"${disabled_plugins} ${plugin}\"\nfi\nif test \"${plibs}\"; then\n  llibs=\"${LIBS}\"\n  for l in ${plibs}; do\n  llibs=\"${llibs} -l${l}\"\n  done\n  echo ${llibs} > ${plugin}.lib\nfi\nplugin=\"vm-display-fbdev\"\nplibs=\"\"\nrm -f vm-display-fbdev.sub vm-display-fbdev.lib\n# -*- sh -*-\n\n\nfor ac_header in linux/fb.h\ndo\nas_ac_Header=`echo \"ac_cv_header_$ac_header\" | $as_tr_sh`\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo \"$as_me:$LINENO: checking for $ac_header\" >&5\necho $ECHO_N \"checking for $ac_header... $ECHO_C\" >&6\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nfi\necho \"$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`\" >&5\necho \"${ECHO_T}`eval echo '${'$as_ac_Header'}'`\" >&6\nelse\n  # Is the header compilable?\necho \"$as_me:$LINENO: checking $ac_header usability\" >&5\necho $ECHO_N \"checking $ac_header usability... $ECHO_C\" >&6\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\n#include <$ac_header>\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_header_compiler=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_header_compiler=no\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\necho \"$as_me:$LINENO: result: $ac_header_compiler\" >&5\necho \"${ECHO_T}$ac_header_compiler\" >&6\n\n# Is the header present?\necho \"$as_me:$LINENO: checking $ac_header presence\" >&5\necho $ECHO_N \"checking $ac_header presence... $ECHO_C\" >&6\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <$ac_header>\n_ACEOF\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_cpp conftest.$ac_ext\\\"\") >&5\n  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } >/dev/null; then\n  if test -s conftest.err; then\n    ac_cpp_err=$ac_c_preproc_warn_flag\n    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag\n  else\n    ac_cpp_err=\n  fi\nelse\n  ac_cpp_err=yes\nfi\nif test -z \"$ac_cpp_err\"; then\n  ac_header_preproc=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n  ac_header_preproc=no\nfi\nrm -f conftest.err conftest.$ac_ext\necho \"$as_me:$LINENO: result: $ac_header_preproc\" >&5\necho \"${ECHO_T}$ac_header_preproc\" >&6\n\n# So?  What about this header?\ncase $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in\n  yes:no: )\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!\" >&5\necho \"$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result\" >&5\necho \"$as_me: WARNING: $ac_header: proceeding with the compiler's result\" >&2;}\n    ac_header_preproc=yes\n    ;;\n  no:yes:* )\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled\" >&5\necho \"$as_me: WARNING: $ac_header: present but cannot be compiled\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?\" >&5\necho \"$as_me: WARNING: $ac_header:     check for missing prerequisite headers?\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation\" >&5\necho \"$as_me: WARNING: $ac_header: see the Autoconf documentation\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header:     section \\\"Present But Cannot Be Compiled\\\"\" >&5\necho \"$as_me: WARNING: $ac_header:     section \\\"Present But Cannot Be Compiled\\\"\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result\" >&5\necho \"$as_me: WARNING: $ac_header: proceeding with the preprocessor's result\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence\" >&5\necho \"$as_me: WARNING: $ac_header: in the future, the compiler will take precedence\" >&2;}\n    (\n      cat <<\\_ASBOX\n## ------------------------------------------ ##\n## Report this to the AC_PACKAGE_NAME lists.  ##\n## ------------------------------------------ ##\n_ASBOX\n    ) |\n      sed \"s/^/$as_me: WARNING:     /\" >&2\n    ;;\nesac\necho \"$as_me:$LINENO: checking for $ac_header\" >&5\necho $ECHO_N \"checking for $ac_header... $ECHO_C\" >&6\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  eval \"$as_ac_Header=\\$ac_header_preproc\"\nfi\necho \"$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`\" >&5\necho \"${ECHO_T}`eval echo '${'$as_ac_Header'}'`\" >&6\n\nfi\nif test `eval echo '${'$as_ac_Header'}'` = yes; then\n  cat >>confdefs.h <<_ACEOF\n#define `echo \"HAVE_$ac_header\" | $as_tr_cpp` 1\n_ACEOF\n\nelse\n\n\n  echo \"$as_me:$LINENO: result: ******** disabling ${plugin}\" >&5\necho \"${ECHO_T}******** disabling ${plugin}\" >&6\n  disabled_plugins=\"${disabled_plugins} ${plugin}\"\nfi\n\ndone\n\nif test \"${plibs}\"; then\n  llibs=\"${LIBS}\"\n  for l in ${plibs}; do\n  llibs=\"${llibs} -l${l}\"\n  done\n  echo ${llibs} > ${plugin}.lib\nfi\nplugin=\"vm-display-Quartz\"\nplibs=\"\"\nrm -f vm-display-Quartz.sub vm-display-Quartz.lib\n# -*- sh -*-\n\n\n# Check whether --with-quartz or --without-quartz was given.\nif test \"${with_quartz+set}\" = set; then\n  withval=\"$with_quartz\"\n  have_quartz=\"$withval\"\nelse\n  have_quartz=\"yes\"\nfi;\n\ncase $host_os in\n  darwin*) ;;\n  *)       have_quartz=\"no\";;\nesac\n\nif test \"$have_quartz\" = \"yes\"; then\n  cat >>confdefs.h <<\\_ACEOF\n#define USE_QUARTZ 1\n_ACEOF\n\n  if test \"$have_gl\" = \"\"; then have_gl=\"no\"; fi\n\nfor ac_header in OpenGL/gl.h\ndo\nas_ac_Header=`echo \"ac_cv_header_$ac_header\" | $as_tr_sh`\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo \"$as_me:$LINENO: checking for $ac_header\" >&5\necho $ECHO_N \"checking for $ac_header... $ECHO_C\" >&6\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nfi\necho \"$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`\" >&5\necho \"${ECHO_T}`eval echo '${'$as_ac_Header'}'`\" >&6\nelse\n  # Is the header compilable?\necho \"$as_me:$LINENO: checking $ac_header usability\" >&5\necho $ECHO_N \"checking $ac_header usability... $ECHO_C\" >&6\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\n#include <$ac_header>\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_header_compiler=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_header_compiler=no\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\necho \"$as_me:$LINENO: result: $ac_header_compiler\" >&5\necho \"${ECHO_T}$ac_header_compiler\" >&6\n\n# Is the header present?\necho \"$as_me:$LINENO: checking $ac_header presence\" >&5\necho $ECHO_N \"checking $ac_header presence... $ECHO_C\" >&6\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <$ac_header>\n_ACEOF\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_cpp conftest.$ac_ext\\\"\") >&5\n  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } >/dev/null; then\n  if test -s conftest.err; then\n    ac_cpp_err=$ac_c_preproc_warn_flag\n    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag\n  else\n    ac_cpp_err=\n  fi\nelse\n  ac_cpp_err=yes\nfi\nif test -z \"$ac_cpp_err\"; then\n  ac_header_preproc=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n  ac_header_preproc=no\nfi\nrm -f conftest.err conftest.$ac_ext\necho \"$as_me:$LINENO: result: $ac_header_preproc\" >&5\necho \"${ECHO_T}$ac_header_preproc\" >&6\n\n# So?  What about this header?\ncase $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in\n  yes:no: )\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!\" >&5\necho \"$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result\" >&5\necho \"$as_me: WARNING: $ac_header: proceeding with the compiler's result\" >&2;}\n    ac_header_preproc=yes\n    ;;\n  no:yes:* )\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled\" >&5\necho \"$as_me: WARNING: $ac_header: present but cannot be compiled\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?\" >&5\necho \"$as_me: WARNING: $ac_header:     check for missing prerequisite headers?\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation\" >&5\necho \"$as_me: WARNING: $ac_header: see the Autoconf documentation\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header:     section \\\"Present But Cannot Be Compiled\\\"\" >&5\necho \"$as_me: WARNING: $ac_header:     section \\\"Present But Cannot Be Compiled\\\"\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result\" >&5\necho \"$as_me: WARNING: $ac_header: proceeding with the preprocessor's result\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence\" >&5\necho \"$as_me: WARNING: $ac_header: in the future, the compiler will take precedence\" >&2;}\n    (\n      cat <<\\_ASBOX\n## ------------------------------------------ ##\n## Report this to the AC_PACKAGE_NAME lists.  ##\n## ------------------------------------------ ##\n_ASBOX\n    ) |\n      sed \"s/^/$as_me: WARNING:     /\" >&2\n    ;;\nesac\necho \"$as_me:$LINENO: checking for $ac_header\" >&5\necho $ECHO_N \"checking for $ac_header... $ECHO_C\" >&6\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  eval \"$as_ac_Header=\\$ac_header_preproc\"\nfi\necho \"$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`\" >&5\necho \"${ECHO_T}`eval echo '${'$as_ac_Header'}'`\" >&6\n\nfi\nif test `eval echo '${'$as_ac_Header'}'` = yes; then\n  cat >>confdefs.h <<_ACEOF\n#define `echo \"HAVE_$ac_header\" | $as_tr_cpp` 1\n_ACEOF\n\n    have_gl=yes\n    cat >>confdefs.h <<\\_ACEOF\n#define USE_QUARTZ_CGL 1\n_ACEOF\n\n\nfi\n\ndone\n\nelse\n\n\n  echo \"$as_me:$LINENO: result: ******** disabling ${plugin}\" >&5\necho \"${ECHO_T}******** disabling ${plugin}\" >&6\n  disabled_plugins=\"${disabled_plugins} ${plugin}\"\nfi\nif test \"${plibs}\"; then\n  llibs=\"${LIBS}\"\n  for l in ${plibs}; do\n  llibs=\"${llibs} -l${l}\"\n  done\n  echo ${llibs} > ${plugin}.lib\nfi\nplugin=\"vm-display-X11\"\nplibs=\"\"\nrm -f vm-display-X11.sub vm-display-X11.lib\n# -*- sh -*-\n\n\n# Check whether --with-x or --without-x was given.\nif test \"${with_x+set}\" = set; then\n  withval=\"$with_x\"\n  have_x=\"$withval\"\nelse\n  have_x=\"yes\"\nfi;\n\n\n# Check whether --with-gl or --without-gl was given.\nif test \"${with_gl+set}\" = set; then\n  withval=\"$with_gl\"\n  have_gl=\"$withval\"\nelse\n  have_gl=\"yes\"\nfi;\n\n###xxx FIXME (AGAIN): mandrake needs explicit -lpthread\n\nVMLIBS=${LIBS}\nVMCFLAGS=${CFLAGS}\nVMCPPFLAGS=${CPPFLAGS}\nVMINCLUDES=${INCLUDES}\n\nif test \"$have_x\" = \"yes\"; then\n  echo \"$as_me:$LINENO: checking for X\" >&5\necho $ECHO_N \"checking for X... $ECHO_C\" >&6\n\n\n# Check whether --with-x or --without-x was given.\nif test \"${with_x+set}\" = set; then\n  withval=\"$with_x\"\n\nfi;\n# $have_x is `yes', `no', `disabled', or empty when we do not yet know.\nif test \"x$with_x\" = xno; then\n  # The user explicitly disabled X.\n  have_x=disabled\nelse\n  if test \"x$x_includes\" != xNONE && test \"x$x_libraries\" != xNONE; then\n    # Both variables are already set.\n    have_x=yes\n  else\n    if test \"${ac_cv_have_x+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  # One or both of the vars are not set, and there is no cached value.\nac_x_includes=no ac_x_libraries=no\nrm -fr conftest.dir\nif mkdir conftest.dir; then\n  cd conftest.dir\n  # Make sure to not put \"make\" in the Imakefile rules, since we grep it out.\n  cat >Imakefile <<'_ACEOF'\nacfindx:\n\t@echo 'ac_im_incroot=\"${INCROOT}\"; ac_im_usrlibdir=\"${USRLIBDIR}\"; ac_im_libdir=\"${LIBDIR}\"'\n_ACEOF\n  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then\n    # GNU make sometimes prints \"make[1]: Entering...\", which would confuse us.\n    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`\n    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.\n    for ac_extension in a so sl; do\n      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&\n\t test -f $ac_im_libdir/libX11.$ac_extension; then\n\tac_im_usrlibdir=$ac_im_libdir; break\n      fi\n    done\n    # Screen out bogus values from the imake configuration.  They are\n    # bogus both because they are the default anyway, and because\n    # using them would break gcc on systems where it needs fixed includes.\n    case $ac_im_incroot in\n\t/usr/include) ;;\n\t*) test -f \"$ac_im_incroot/X11/Xos.h\" && ac_x_includes=$ac_im_incroot;;\n    esac\n    case $ac_im_usrlibdir in\n\t/usr/lib | /lib) ;;\n\t*) test -d \"$ac_im_usrlibdir\" && ac_x_libraries=$ac_im_usrlibdir ;;\n    esac\n  fi\n  cd ..\n  rm -fr conftest.dir\nfi\n\n# Standard set of common directories for X headers.\n# Check X11 before X11Rn because it is often a symlink to the current release.\nac_x_header_dirs='\n/usr/X11/include\n/usr/X11R6/include\n/usr/X11R5/include\n/usr/X11R4/include\n\n/usr/include/X11\n/usr/include/X11R6\n/usr/include/X11R5\n/usr/include/X11R4\n\n/usr/local/X11/include\n/usr/local/X11R6/include\n/usr/local/X11R5/include\n/usr/local/X11R4/include\n\n/usr/local/include/X11\n/usr/local/include/X11R6\n/usr/local/include/X11R5\n/usr/local/include/X11R4\n\n/usr/X386/include\n/usr/x386/include\n/usr/XFree86/include/X11\n\n/usr/include\n/usr/local/include\n/usr/unsupported/include\n/usr/athena/include\n/usr/local/x11r5/include\n/usr/lpp/Xamples/include\n\n/usr/openwin/include\n/usr/openwin/share/include'\n\nif test \"$ac_x_includes\" = no; then\n  # Guess where to find include files, by looking for Xlib.h.\n  # First, try using that file with no special directory specified.\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <X11/Xlib.h>\n_ACEOF\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_cpp conftest.$ac_ext\\\"\") >&5\n  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } >/dev/null; then\n  if test -s conftest.err; then\n    ac_cpp_err=$ac_c_preproc_warn_flag\n    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag\n  else\n    ac_cpp_err=\n  fi\nelse\n  ac_cpp_err=yes\nfi\nif test -z \"$ac_cpp_err\"; then\n  # We can compile using X headers with no special include directory.\nac_x_includes=\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n  for ac_dir in $ac_x_header_dirs; do\n  if test -r \"$ac_dir/X11/Xlib.h\"; then\n    ac_x_includes=$ac_dir\n    break\n  fi\ndone\nfi\nrm -f conftest.err conftest.$ac_ext\nfi # $ac_x_includes = no\n\nif test \"$ac_x_libraries\" = no; then\n  # Check for the libraries.\n  # See if we find them without any special options.\n  # Don't add to $LIBS permanently.\n  ac_save_LIBS=$LIBS\n  LIBS=\"-lX11 $LIBS\"\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <X11/Xlib.h>\nint\nmain ()\n{\nXrmInitialize ()\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  LIBS=$ac_save_LIBS\n# We can link X programs with no special library path.\nac_x_libraries=\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nLIBS=$ac_save_LIBS\nfor ac_dir in `echo \"$ac_x_includes $ac_x_header_dirs\" | sed s/include/lib/g`\ndo\n  # Don't even attempt the hair of trying to link an X program!\n  for ac_extension in a so sl; do\n    if test -r $ac_dir/libXt.$ac_extension; then\n      ac_x_libraries=$ac_dir\n      break 2\n    fi\n  done\ndone\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nfi # $ac_x_libraries = no\n\nif test \"$ac_x_includes\" = no || test \"$ac_x_libraries\" = no; then\n  # Didn't find X anywhere.  Cache the known absence of X.\n  ac_cv_have_x=\"have_x=no\"\nelse\n  # Record where we found X for the cache.\n  ac_cv_have_x=\"have_x=yes \\\n\t\tac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries\"\nfi\nfi\n\n  fi\n  eval \"$ac_cv_have_x\"\nfi # $with_x != no\n\nif test \"$have_x\" != yes; then\n  echo \"$as_me:$LINENO: result: $have_x\" >&5\necho \"${ECHO_T}$have_x\" >&6\n  no_x=yes\nelse\n  # If each of the values was on the command line, it overrides each guess.\n  test \"x$x_includes\" = xNONE && x_includes=$ac_x_includes\n  test \"x$x_libraries\" = xNONE && x_libraries=$ac_x_libraries\n  # Update the cache value to reflect the command line values.\n  ac_cv_have_x=\"have_x=yes \\\n\t\tac_x_includes=$x_includes ac_x_libraries=$x_libraries\"\n  echo \"$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes\" >&5\necho \"${ECHO_T}libraries $x_libraries, headers $x_includes\" >&6\nfi\n\nif test \"$no_x\" = yes; then\n  # Not all programs may use this symbol, but it does not hurt to define it.\n\ncat >>confdefs.h <<\\_ACEOF\n#define X_DISPLAY_MISSING 1\n_ACEOF\n\n  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=\nelse\n  if test -n \"$x_includes\"; then\n    X_CFLAGS=\"$X_CFLAGS -I$x_includes\"\n  fi\n\n  # It would also be nice to do this for all -L options, not just this one.\n  if test -n \"$x_libraries\"; then\n    X_LIBS=\"$X_LIBS -L$x_libraries\"\n    # For Solaris; some versions of Sun CC require a space after -R and\n    # others require no space.  Words are not sufficient . . . .\n    case `(uname -sr) 2>/dev/null` in\n    \"SunOS 5\"*)\n      echo \"$as_me:$LINENO: checking whether -R must be followed by a space\" >&5\necho $ECHO_N \"checking whether -R must be followed by a space... $ECHO_C\" >&6\n      ac_xsave_LIBS=$LIBS; LIBS=\"$LIBS -R$x_libraries\"\n      cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_R_nospace=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_R_nospace=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\n      if test $ac_R_nospace = yes; then\n\techo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\n\tX_LIBS=\"$X_LIBS -R$x_libraries\"\n      else\n\tLIBS=\"$ac_xsave_LIBS -R $x_libraries\"\n\tcat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_R_space=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_R_space=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\n\tif test $ac_R_space = yes; then\n\t  echo \"$as_me:$LINENO: result: yes\" >&5\necho \"${ECHO_T}yes\" >&6\n\t  X_LIBS=\"$X_LIBS -R $x_libraries\"\n\telse\n\t  echo \"$as_me:$LINENO: result: neither works\" >&5\necho \"${ECHO_T}neither works\" >&6\n\tfi\n      fi\n      LIBS=$ac_xsave_LIBS\n    esac\n  fi\n\n  # Check for system-dependent libraries X programs must link with.\n  # Do this before checking for the system-independent R6 libraries\n  # (-lICE), since we may need -lsocket or whatever for X linking.\n\n  if test \"$ISC\" = yes; then\n    X_EXTRA_LIBS=\"$X_EXTRA_LIBS -lnsl_s -linet\"\n  else\n    # Martyn Johnson says this is needed for Ultrix, if the X\n    # libraries were built with DECnet support.  And Karl Berry says\n    # the Alpha needs dnet_stub (dnet does not exist).\n    ac_xsave_LIBS=\"$LIBS\"; LIBS=\"$LIBS $X_LIBS -lX11\"\n    cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar XOpenDisplay ();\nint\nmain ()\n{\nXOpenDisplay ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  :\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\necho \"$as_me:$LINENO: checking for dnet_ntoa in -ldnet\" >&5\necho $ECHO_N \"checking for dnet_ntoa in -ldnet... $ECHO_C\" >&6\nif test \"${ac_cv_lib_dnet_dnet_ntoa+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-ldnet  $LIBS\"\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar dnet_ntoa ();\nint\nmain ()\n{\ndnet_ntoa ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_lib_dnet_dnet_ntoa=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_lib_dnet_dnet_ntoa=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\necho \"$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa\" >&5\necho \"${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa\" >&6\nif test $ac_cv_lib_dnet_dnet_ntoa = yes; then\n  X_EXTRA_LIBS=\"$X_EXTRA_LIBS -ldnet\"\nfi\n\n    if test $ac_cv_lib_dnet_dnet_ntoa = no; then\n      echo \"$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub\" >&5\necho $ECHO_N \"checking for dnet_ntoa in -ldnet_stub... $ECHO_C\" >&6\nif test \"${ac_cv_lib_dnet_stub_dnet_ntoa+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-ldnet_stub  $LIBS\"\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar dnet_ntoa ();\nint\nmain ()\n{\ndnet_ntoa ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_lib_dnet_stub_dnet_ntoa=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_lib_dnet_stub_dnet_ntoa=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\necho \"$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa\" >&5\necho \"${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa\" >&6\nif test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then\n  X_EXTRA_LIBS=\"$X_EXTRA_LIBS -ldnet_stub\"\nfi\n\n    fi\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\n    LIBS=\"$ac_xsave_LIBS\"\n\n    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,\n    # to get the SysV transport functions.\n    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)\n    # needs -lnsl.\n    # The nsl library prevents programs from opening the X display\n    # on Irix 5.2, according to T.E. Dickey.\n    # The functions gethostbyname, getservbyname, and inet_addr are\n    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.\n    echo \"$as_me:$LINENO: checking for gethostbyname\" >&5\necho $ECHO_N \"checking for gethostbyname... $ECHO_C\" >&6\nif test \"${ac_cv_func_gethostbyname+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.\n   For example, HP-UX 11i <limits.h> declares gettimeofday.  */\n#define gethostbyname innocuous_gethostbyname\n\n/* System header to define __stub macros and hopefully few prototypes,\n    which can conflict with char gethostbyname (); below.\n    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n    <limits.h> exists even on freestanding compilers.  */\n\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\n#undef gethostbyname\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar gethostbyname ();\n/* The GNU C library defines this for functions which it implements\n    to always fail with ENOSYS.  Some functions are actually named\n    something starting with __ and the normal name is an alias.  */\n#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)\nchoke me\n#else\nchar (*f) () = gethostbyname;\n#endif\n#ifdef __cplusplus\n}\n#endif\n\nint\nmain ()\n{\nreturn f != gethostbyname;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_func_gethostbyname=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_func_gethostbyname=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_func_gethostbyname\" >&5\necho \"${ECHO_T}$ac_cv_func_gethostbyname\" >&6\n\n    if test $ac_cv_func_gethostbyname = no; then\n      echo \"$as_me:$LINENO: checking for gethostbyname in -lnsl\" >&5\necho $ECHO_N \"checking for gethostbyname in -lnsl... $ECHO_C\" >&6\nif test \"${ac_cv_lib_nsl_gethostbyname+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-lnsl  $LIBS\"\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar gethostbyname ();\nint\nmain ()\n{\ngethostbyname ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_lib_nsl_gethostbyname=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_lib_nsl_gethostbyname=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\necho \"$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname\" >&5\necho \"${ECHO_T}$ac_cv_lib_nsl_gethostbyname\" >&6\nif test $ac_cv_lib_nsl_gethostbyname = yes; then\n  X_EXTRA_LIBS=\"$X_EXTRA_LIBS -lnsl\"\nfi\n\n      if test $ac_cv_lib_nsl_gethostbyname = no; then\n\techo \"$as_me:$LINENO: checking for gethostbyname in -lbsd\" >&5\necho $ECHO_N \"checking for gethostbyname in -lbsd... $ECHO_C\" >&6\nif test \"${ac_cv_lib_bsd_gethostbyname+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-lbsd  $LIBS\"\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar gethostbyname ();\nint\nmain ()\n{\ngethostbyname ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_lib_bsd_gethostbyname=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_lib_bsd_gethostbyname=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\necho \"$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname\" >&5\necho \"${ECHO_T}$ac_cv_lib_bsd_gethostbyname\" >&6\nif test $ac_cv_lib_bsd_gethostbyname = yes; then\n  X_EXTRA_LIBS=\"$X_EXTRA_LIBS -lbsd\"\nfi\n\n      fi\n    fi\n\n    # lieder@skyler.mavd.honeywell.com says without -lsocket,\n    # socket/setsockopt and other routines are undefined under SCO ODT\n    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary\n    # on later versions), says Simon Leinen: it contains gethostby*\n    # variants that don't use the name server (or something).  -lsocket\n    # must be given before -lnsl if both are needed.  We assume that\n    # if connect needs -lnsl, so does gethostbyname.\n    echo \"$as_me:$LINENO: checking for connect\" >&5\necho $ECHO_N \"checking for connect... $ECHO_C\" >&6\nif test \"${ac_cv_func_connect+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n/* Define connect to an innocuous variant, in case <limits.h> declares connect.\n   For example, HP-UX 11i <limits.h> declares gettimeofday.  */\n#define connect innocuous_connect\n\n/* System header to define __stub macros and hopefully few prototypes,\n    which can conflict with char connect (); below.\n    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n    <limits.h> exists even on freestanding compilers.  */\n\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\n#undef connect\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar connect ();\n/* The GNU C library defines this for functions which it implements\n    to always fail with ENOSYS.  Some functions are actually named\n    something starting with __ and the normal name is an alias.  */\n#if defined (__stub_connect) || defined (__stub___connect)\nchoke me\n#else\nchar (*f) () = connect;\n#endif\n#ifdef __cplusplus\n}\n#endif\n\nint\nmain ()\n{\nreturn f != connect;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_func_connect=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_func_connect=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_func_connect\" >&5\necho \"${ECHO_T}$ac_cv_func_connect\" >&6\n\n    if test $ac_cv_func_connect = no; then\n      echo \"$as_me:$LINENO: checking for connect in -lsocket\" >&5\necho $ECHO_N \"checking for connect in -lsocket... $ECHO_C\" >&6\nif test \"${ac_cv_lib_socket_connect+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-lsocket $X_EXTRA_LIBS $LIBS\"\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar connect ();\nint\nmain ()\n{\nconnect ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_lib_socket_connect=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_lib_socket_connect=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\necho \"$as_me:$LINENO: result: $ac_cv_lib_socket_connect\" >&5\necho \"${ECHO_T}$ac_cv_lib_socket_connect\" >&6\nif test $ac_cv_lib_socket_connect = yes; then\n  X_EXTRA_LIBS=\"-lsocket $X_EXTRA_LIBS\"\nfi\n\n    fi\n\n    # Guillermo Gomez says -lposix is necessary on A/UX.\n    echo \"$as_me:$LINENO: checking for remove\" >&5\necho $ECHO_N \"checking for remove... $ECHO_C\" >&6\nif test \"${ac_cv_func_remove+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n/* Define remove to an innocuous variant, in case <limits.h> declares remove.\n   For example, HP-UX 11i <limits.h> declares gettimeofday.  */\n#define remove innocuous_remove\n\n/* System header to define __stub macros and hopefully few prototypes,\n    which can conflict with char remove (); below.\n    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n    <limits.h> exists even on freestanding compilers.  */\n\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\n#undef remove\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar remove ();\n/* The GNU C library defines this for functions which it implements\n    to always fail with ENOSYS.  Some functions are actually named\n    something starting with __ and the normal name is an alias.  */\n#if defined (__stub_remove) || defined (__stub___remove)\nchoke me\n#else\nchar (*f) () = remove;\n#endif\n#ifdef __cplusplus\n}\n#endif\n\nint\nmain ()\n{\nreturn f != remove;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_func_remove=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_func_remove=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_func_remove\" >&5\necho \"${ECHO_T}$ac_cv_func_remove\" >&6\n\n    if test $ac_cv_func_remove = no; then\n      echo \"$as_me:$LINENO: checking for remove in -lposix\" >&5\necho $ECHO_N \"checking for remove in -lposix... $ECHO_C\" >&6\nif test \"${ac_cv_lib_posix_remove+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-lposix  $LIBS\"\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar remove ();\nint\nmain ()\n{\nremove ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_lib_posix_remove=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_lib_posix_remove=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\necho \"$as_me:$LINENO: result: $ac_cv_lib_posix_remove\" >&5\necho \"${ECHO_T}$ac_cv_lib_posix_remove\" >&6\nif test $ac_cv_lib_posix_remove = yes; then\n  X_EXTRA_LIBS=\"$X_EXTRA_LIBS -lposix\"\nfi\n\n    fi\n\n    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.\n    echo \"$as_me:$LINENO: checking for shmat\" >&5\necho $ECHO_N \"checking for shmat... $ECHO_C\" >&6\nif test \"${ac_cv_func_shmat+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n/* Define shmat to an innocuous variant, in case <limits.h> declares shmat.\n   For example, HP-UX 11i <limits.h> declares gettimeofday.  */\n#define shmat innocuous_shmat\n\n/* System header to define __stub macros and hopefully few prototypes,\n    which can conflict with char shmat (); below.\n    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n    <limits.h> exists even on freestanding compilers.  */\n\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\n#undef shmat\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar shmat ();\n/* The GNU C library defines this for functions which it implements\n    to always fail with ENOSYS.  Some functions are actually named\n    something starting with __ and the normal name is an alias.  */\n#if defined (__stub_shmat) || defined (__stub___shmat)\nchoke me\n#else\nchar (*f) () = shmat;\n#endif\n#ifdef __cplusplus\n}\n#endif\n\nint\nmain ()\n{\nreturn f != shmat;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_func_shmat=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_func_shmat=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_func_shmat\" >&5\necho \"${ECHO_T}$ac_cv_func_shmat\" >&6\n\n    if test $ac_cv_func_shmat = no; then\n      echo \"$as_me:$LINENO: checking for shmat in -lipc\" >&5\necho $ECHO_N \"checking for shmat in -lipc... $ECHO_C\" >&6\nif test \"${ac_cv_lib_ipc_shmat+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-lipc  $LIBS\"\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar shmat ();\nint\nmain ()\n{\nshmat ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_lib_ipc_shmat=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_lib_ipc_shmat=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\necho \"$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat\" >&5\necho \"${ECHO_T}$ac_cv_lib_ipc_shmat\" >&6\nif test $ac_cv_lib_ipc_shmat = yes; then\n  X_EXTRA_LIBS=\"$X_EXTRA_LIBS -lipc\"\nfi\n\n    fi\n  fi\n\n  # Check for libraries that X11R6 Xt/Xaw programs need.\n  ac_save_LDFLAGS=$LDFLAGS\n  test -n \"$x_libraries\" && LDFLAGS=\"$LDFLAGS -L$x_libraries\"\n  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to\n  # check for ICE first), but we must link in the order -lSM -lICE or\n  # we get undefined symbols.  So assume we have SM if we have ICE.\n  # These have to be linked with before -lX11, unlike the other\n  # libraries we check for below, so use a different variable.\n  # John Interrante, Karl Berry\n  echo \"$as_me:$LINENO: checking for IceConnectionNumber in -lICE\" >&5\necho $ECHO_N \"checking for IceConnectionNumber in -lICE... $ECHO_C\" >&6\nif test \"${ac_cv_lib_ICE_IceConnectionNumber+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-lICE $X_EXTRA_LIBS $LIBS\"\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar IceConnectionNumber ();\nint\nmain ()\n{\nIceConnectionNumber ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_lib_ICE_IceConnectionNumber=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_lib_ICE_IceConnectionNumber=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\necho \"$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber\" >&5\necho \"${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber\" >&6\nif test $ac_cv_lib_ICE_IceConnectionNumber = yes; then\n  X_PRE_LIBS=\"$X_PRE_LIBS -lSM -lICE\"\nfi\n\n  LDFLAGS=$ac_save_LDFLAGS\n\nfi\n\n  LIBS=\"${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS} ${LIBS}\"\n#  if test \"${x_libraries}\" != \"\"; then\n#    CFLAGS=\"${X_CFLAGS} ${CFLAGS} -L${x_libraries}\"\n#  fi\n  if test \"${x_includes}\" != \"\"; then\n    CPPFLAGS=\"${CPPFLAGS} -I${x_includes}\"\n    INCLUDES=\"${INCLUDES} -I${x_includes}\"\n    X_INCLUDES=\"-I${x_includes}\"\n  fi\n  echo \"$as_me:$LINENO: checking for XOpenDisplay in -lX11\" >&5\necho $ECHO_N \"checking for XOpenDisplay in -lX11... $ECHO_C\" >&6\nif test \"${ac_cv_lib_X11_XOpenDisplay+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-lX11  $LIBS\"\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar XOpenDisplay ();\nint\nmain ()\n{\nXOpenDisplay ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_lib_X11_XOpenDisplay=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_lib_X11_XOpenDisplay=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\necho \"$as_me:$LINENO: result: $ac_cv_lib_X11_XOpenDisplay\" >&5\necho \"${ECHO_T}$ac_cv_lib_X11_XOpenDisplay\" >&6\nif test $ac_cv_lib_X11_XOpenDisplay = yes; then\n\n    cat >>confdefs.h <<\\_ACEOF\n#define USE_X11 1\n_ACEOF\n\n    cat >>confdefs.h <<_ACEOF\n#define VM_X11DIR \"${x_libraries}\"\n_ACEOF\n\n    LIBS=\"${LIBS} -lX11\"\n\necho \"$as_me:$LINENO: checking for XShmAttach in -lXext\" >&5\necho $ECHO_N \"checking for XShmAttach in -lXext... $ECHO_C\" >&6\nif test \"${ac_cv_lib_Xext_XShmAttach+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-lXext  $LIBS\"\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar XShmAttach ();\nint\nmain ()\n{\nXShmAttach ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_lib_Xext_XShmAttach=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_lib_Xext_XShmAttach=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\necho \"$as_me:$LINENO: result: $ac_cv_lib_Xext_XShmAttach\" >&5\necho \"${ECHO_T}$ac_cv_lib_Xext_XShmAttach\" >&6\nif test $ac_cv_lib_Xext_XShmAttach = yes; then\n  cat >>confdefs.h <<_ACEOF\n#define HAVE_LIBXEXT 1\n_ACEOF\n\n  LIBS=\"-lXext $LIBS\"\n\nfi\n\n    if test \"$have_gl\" = \"\"; then have_gl=\"no\"; fi\n\nfor ac_header in GL/gl.h\ndo\nas_ac_Header=`echo \"ac_cv_header_$ac_header\" | $as_tr_sh`\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo \"$as_me:$LINENO: checking for $ac_header\" >&5\necho $ECHO_N \"checking for $ac_header... $ECHO_C\" >&6\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nfi\necho \"$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`\" >&5\necho \"${ECHO_T}`eval echo '${'$as_ac_Header'}'`\" >&6\nelse\n  # Is the header compilable?\necho \"$as_me:$LINENO: checking $ac_header usability\" >&5\necho $ECHO_N \"checking $ac_header usability... $ECHO_C\" >&6\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\n#include <$ac_header>\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_header_compiler=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_header_compiler=no\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\necho \"$as_me:$LINENO: result: $ac_header_compiler\" >&5\necho \"${ECHO_T}$ac_header_compiler\" >&6\n\n# Is the header present?\necho \"$as_me:$LINENO: checking $ac_header presence\" >&5\necho $ECHO_N \"checking $ac_header presence... $ECHO_C\" >&6\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <$ac_header>\n_ACEOF\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_cpp conftest.$ac_ext\\\"\") >&5\n  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } >/dev/null; then\n  if test -s conftest.err; then\n    ac_cpp_err=$ac_c_preproc_warn_flag\n    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag\n  else\n    ac_cpp_err=\n  fi\nelse\n  ac_cpp_err=yes\nfi\nif test -z \"$ac_cpp_err\"; then\n  ac_header_preproc=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n  ac_header_preproc=no\nfi\nrm -f conftest.err conftest.$ac_ext\necho \"$as_me:$LINENO: result: $ac_header_preproc\" >&5\necho \"${ECHO_T}$ac_header_preproc\" >&6\n\n# So?  What about this header?\ncase $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in\n  yes:no: )\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!\" >&5\necho \"$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result\" >&5\necho \"$as_me: WARNING: $ac_header: proceeding with the compiler's result\" >&2;}\n    ac_header_preproc=yes\n    ;;\n  no:yes:* )\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled\" >&5\necho \"$as_me: WARNING: $ac_header: present but cannot be compiled\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?\" >&5\necho \"$as_me: WARNING: $ac_header:     check for missing prerequisite headers?\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation\" >&5\necho \"$as_me: WARNING: $ac_header: see the Autoconf documentation\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header:     section \\\"Present But Cannot Be Compiled\\\"\" >&5\necho \"$as_me: WARNING: $ac_header:     section \\\"Present But Cannot Be Compiled\\\"\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result\" >&5\necho \"$as_me: WARNING: $ac_header: proceeding with the preprocessor's result\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence\" >&5\necho \"$as_me: WARNING: $ac_header: in the future, the compiler will take precedence\" >&2;}\n    (\n      cat <<\\_ASBOX\n## ------------------------------------------ ##\n## Report this to the AC_PACKAGE_NAME lists.  ##\n## ------------------------------------------ ##\n_ASBOX\n    ) |\n      sed \"s/^/$as_me: WARNING:     /\" >&2\n    ;;\nesac\necho \"$as_me:$LINENO: checking for $ac_header\" >&5\necho $ECHO_N \"checking for $ac_header... $ECHO_C\" >&6\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  eval \"$as_ac_Header=\\$ac_header_preproc\"\nfi\necho \"$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`\" >&5\necho \"${ECHO_T}`eval echo '${'$as_ac_Header'}'`\" >&6\n\nfi\nif test `eval echo '${'$as_ac_Header'}'` = yes; then\n  cat >>confdefs.h <<_ACEOF\n#define `echo \"HAVE_$ac_header\" | $as_tr_cpp` 1\n_ACEOF\n\n      have_gl=yes\n      cat >>confdefs.h <<\\_ACEOF\n#define USE_X11_GLX 1\n_ACEOF\n\n\necho \"$as_me:$LINENO: checking for glIsEnabled in -lGL\" >&5\necho $ECHO_N \"checking for glIsEnabled in -lGL... $ECHO_C\" >&6\nif test \"${ac_cv_lib_GL_glIsEnabled+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-lGL  $LIBS\"\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar glIsEnabled ();\nint\nmain ()\n{\nglIsEnabled ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_lib_GL_glIsEnabled=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_lib_GL_glIsEnabled=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\necho \"$as_me:$LINENO: result: $ac_cv_lib_GL_glIsEnabled\" >&5\necho \"${ECHO_T}$ac_cv_lib_GL_glIsEnabled\" >&6\nif test $ac_cv_lib_GL_glIsEnabled = yes; then\n  cat >>confdefs.h <<_ACEOF\n#define HAVE_LIBGL 1\n_ACEOF\n\n  LIBS=\"-lGL $LIBS\"\n\nfi\n\n\nfi\n\ndone\n\n\nelse\n\n\n\n  echo \"$as_me:$LINENO: result: ******** disabling ${plugin}\" >&5\necho \"${ECHO_T}******** disabling ${plugin}\" >&6\n  disabled_plugins=\"${disabled_plugins} ${plugin}\"\n\nfi\n\nelse\n\n\n  echo \"$as_me:$LINENO: result: ******** disabling ${plugin}\" >&5\necho \"${ECHO_T}******** disabling ${plugin}\" >&6\n  disabled_plugins=\"${disabled_plugins} ${plugin}\"\nfi\n\nX_LIBS=${LIBS}\n\nX_CFLAGS=${CFLAGS}\n\nX_CPPFLAGS=${CPPFLAGS}\n\nX_INCLUDES=${INCLUDES}\n\n\nLIBS=${VMLIBS}\nCFLAGS=${VMCFLAGS}\nCPPFLAGS=${VMCPPFLAGS}\nINCLUDES=${VMINCLUDES}\nif test \"${plibs}\"; then\n  llibs=\"${LIBS}\"\n  for l in ${plibs}; do\n  llibs=\"${llibs} -l${l}\"\n  done\n  echo ${llibs} > ${plugin}.lib\nfi\nplugin=\"vm-sound-ALSA\"\nplibs=\"\"\nrm -f vm-sound-ALSA.sub vm-sound-ALSA.lib\n# -*- sh -*-\n\necho \"$as_me:$LINENO: checking for Advanced Linux Sound Architecture\" >&5\necho $ECHO_N \"checking for Advanced Linux Sound Architecture... $ECHO_C\" >&6\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <alsa/asoundlib.h>\nint\nmain ()\n{\n(void)snd_pcm_open;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n\n  echo \"$as_me:$LINENO: result: yes\" >&5\necho \"${ECHO_T}yes\" >&6\n\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\n\n\n  echo \"$as_me:$LINENO: result: ******** disabling ${plugin}\" >&5\necho \"${ECHO_T}******** disabling ${plugin}\" >&6\n  disabled_plugins=\"${disabled_plugins} ${plugin}\"\n\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nif test \"${plibs}\"; then\n  llibs=\"${LIBS}\"\n  for l in ${plibs}; do\n  llibs=\"${llibs} -l${l}\"\n  done\n  echo ${llibs} > ${plugin}.lib\nfi\nplugin=\"vm-sound-custom\"\nplibs=\"\"\nrm -f vm-sound-custom.sub vm-sound-custom.lib\n# -*- sh -*-\n\necho \"$as_me:$LINENO: checking for custom sound support\" >&5\necho $ECHO_N \"checking for custom sound support... $ECHO_C\" >&6\n\n\n# Check whether --with-custom-sound or --without-custom-sound was given.\nif test \"${with_custom_sound+set}\" = set; then\n  withval=\"$with_custom_sound\"\n  have_snd_custom=\"$withval\"\nelse\n  have_snd_custom=\"no\"\nfi;\n\nif test \"$have_snd_custom\" = \"yes\"; then\n  # check for libraries, headers, etc., here...\n  echo \"$as_me:$LINENO: result: yes\" >&5\necho \"${ECHO_T}yes\" >&6\nelse\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\n\n\n  echo \"$as_me:$LINENO: result: ******** disabling ${plugin}\" >&5\necho \"${ECHO_T}******** disabling ${plugin}\" >&6\n  disabled_plugins=\"${disabled_plugins} ${plugin}\"\nfi\nif test \"${plibs}\"; then\n  llibs=\"${LIBS}\"\n  for l in ${plibs}; do\n  llibs=\"${llibs} -l${l}\"\n  done\n  echo ${llibs} > ${plugin}.lib\nfi\nplugin=\"vm-sound-MacOSX\"\nplibs=\"\"\nrm -f vm-sound-MacOSX.sub vm-sound-MacOSX.lib\n# -*- sh -*-\n\necho \"$as_me:$LINENO: checking for Mac OS X CoreAudio\" >&5\necho $ECHO_N \"checking for Mac OS X CoreAudio... $ECHO_C\" >&6\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <CoreAudio/CoreAudio.h>\nint\nmain ()\n{\nkAudioHardwareNoError;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n\n  echo \"$as_me:$LINENO: result: yes\" >&5\necho \"${ECHO_T}yes\" >&6\n\n\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\n\n\n  echo \"$as_me:$LINENO: result: ******** disabling ${plugin}\" >&5\necho \"${ECHO_T}******** disabling ${plugin}\" >&6\n  disabled_plugins=\"${disabled_plugins} ${plugin}\"\n\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nif test \"${plibs}\"; then\n  llibs=\"${LIBS}\"\n  for l in ${plibs}; do\n  llibs=\"${llibs} -l${l}\"\n  done\n  echo ${llibs} > ${plugin}.lib\nfi\nplugin=\"vm-sound-NAS\"\nplibs=\"\"\nrm -f vm-sound-NAS.sub vm-sound-NAS.lib\n# -*- sh -*-\n\necho \"$as_me:$LINENO: checking for Network Audio System\" >&5\necho $ECHO_N \"checking for Network Audio System... $ECHO_C\" >&6\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <audio/audio.h>\nint\nmain ()\n{\nAuElementNotifyKindLowWater;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n\n  echo \"$as_me:$LINENO: result: yes\" >&5\necho \"${ECHO_T}yes\" >&6\n\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\n\n\n  echo \"$as_me:$LINENO: result: ******** disabling ${plugin}\" >&5\necho \"${ECHO_T}******** disabling ${plugin}\" >&6\n  disabled_plugins=\"${disabled_plugins} ${plugin}\"\n\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nif test \"${plibs}\"; then\n  llibs=\"${LIBS}\"\n  for l in ${plibs}; do\n  llibs=\"${llibs} -l${l}\"\n  done\n  echo ${llibs} > ${plugin}.lib\nfi\nplugin=\"vm-sound-null\"\nplibs=\"\"\nrm -f vm-sound-null.sub vm-sound-null.lib\n# -*- sh -*-\n# empty to provoke config/mkacinc into including vm-sound-null for consideration\nif test \"${plibs}\"; then\n  llibs=\"${LIBS}\"\n  for l in ${plibs}; do\n  llibs=\"${llibs} -l${l}\"\n  done\n  echo ${llibs} > ${plugin}.lib\nfi\nplugin=\"vm-sound-OSS\"\nplibs=\"\"\nrm -f vm-sound-OSS.sub vm-sound-OSS.lib\n# -*- sh -*-\n\nif test \"$with_vm_sound_OSS\"=\"yes\"; then\n\techo \"$as_me:$LINENO: checking for Open Sound System\" >&5\necho $ECHO_N \"checking for Open Sound System... $ECHO_C\" >&6\n\tcat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <sys/soundcard.h>\nint\nmain ()\n{\nOPEN_SOUND_SYSTEM;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n\n\t  echo \"$as_me:$LINENO: result: yes\" >&5\necho \"${ECHO_T}yes\" >&6\n\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n\n\t  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\n\n\n  echo \"$as_me:$LINENO: result: ******** disabling ${plugin}\" >&5\necho \"${ECHO_T}******** disabling ${plugin}\" >&6\n  disabled_plugins=\"${disabled_plugins} ${plugin}\"\n\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\nif test \"${plibs}\"; then\n  llibs=\"${LIBS}\"\n  for l in ${plibs}; do\n  llibs=\"${llibs} -l${l}\"\n  done\n  echo ${llibs} > ${plugin}.lib\nfi\nplugin=\"vm-sound-Sun\"\nplibs=\"\"\nrm -f vm-sound-Sun.sub vm-sound-Sun.lib\n# -*- sh -*-\n\necho \"$as_me:$LINENO: checking for SunOS/Solaris audio\" >&5\necho $ECHO_N \"checking for SunOS/Solaris audio... $ECHO_C\" >&6\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <sys/audioio.h>\nint\nmain ()\n{\nAUDIO_SUNVTS;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n\n  echo \"$as_me:$LINENO: result: yes\" >&5\necho \"${ECHO_T}yes\" >&6\n  cat >>confdefs.h <<_ACEOF\n#define HAVE_SYS_AUDIOIO_H 1\n_ACEOF\n\n\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <sun/audioio.h>\nint\nmain ()\n{\nAUDIO_SUNVTS;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n\n    echo \"$as_me:$LINENO: result: yes\" >&5\necho \"${ECHO_T}yes\" >&6\n    cat >>confdefs.h <<_ACEOF\n#define HAVE_SUN_AUDIOIO_H 1\n_ACEOF\n\n\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n\n    echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\n\n\n  echo \"$as_me:$LINENO: result: ******** disabling ${plugin}\" >&5\necho \"${ECHO_T}******** disabling ${plugin}\" >&6\n  disabled_plugins=\"${disabled_plugins} ${plugin}\"\n\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\n\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nif test \"${plibs}\"; then\n  llibs=\"${LIBS}\"\n  for l in ${plibs}; do\n  llibs=\"${llibs} -l${l}\"\n  done\n  echo ${llibs} > ${plugin}.lib\nfi\nplugin=\"B3DAcceleratorPlugin\"\nplibs=\"\"\nrm -f B3DAcceleratorPlugin.sub B3DAcceleratorPlugin.lib\nif test \"${have_gl}\" != \"yes\"; then\n\n\n  echo \"$as_me:$LINENO: result: ******** disabling ${plugin}\" >&5\necho \"${ECHO_T}******** disabling ${plugin}\" >&6\n  disabled_plugins=\"${disabled_plugins} ${plugin}\"\nfi\nif test \"${plibs}\"; then\n  llibs=\"${LIBS}\"\n  for l in ${plibs}; do\n  llibs=\"${llibs} -l${l}\"\n  done\n  echo ${llibs} > ${plugin}.lib\nfi\nplugin=\"FloatMathPlugin\"\nplibs=\"\"\nrm -f FloatMathPlugin.sub FloatMathPlugin.lib\nlibm_cflags=\"-O\"\necho 'FloatMathPlugin/acinclude.m4:$host_cpu='$host_cpu\n\nif test \"$GCC\" = yes; then\n  case $host_cpu in\n  i?86)\n    libm_cflags=\"-O -fomit-frame-pointer -DLSB_FIRST=1\"\n    ;;\n  powerpc|ppc)\n    libm_cflags=\"-O3 -funroll-loops -mcpu=750 -mno-fused-madd -DLSB_FIRST=0\"\n    ;;\n  esac\nfi\n\nLIBM_CFLAGS=$libm_cflags\n\nif test \"${plibs}\"; then\n  llibs=\"${LIBS}\"\n  for l in ${plibs}; do\n  llibs=\"${llibs} -l${l}\"\n  done\n  echo ${llibs} > ${plugin}.lib\nfi\nplugin=\"MIDIPlugin\"\nplibs=\"\"\nrm -f MIDIPlugin.sub MIDIPlugin.lib\necho \"$as_me:$LINENO: checking for MIDI support via ALSA\" >&5\necho $ECHO_N \"checking for MIDI support via ALSA... $ECHO_C\" >&6\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n  #include <alsa/asoundlib.h>\n\nint\nmain ()\n{\n;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n\n  echo \"$as_me:$LINENO: result: yes\" >&5\necho \"${ECHO_T}yes\" >&6\n  cat >>confdefs.h <<\\_ACEOF\n#define USE_MIDI_ALSA 1\n_ACEOF\n\n\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\n\n\n  echo \"$as_me:$LINENO: result: ******** disabling ${plugin}\" >&5\necho \"${ECHO_T}******** disabling ${plugin}\" >&6\n  disabled_plugins=\"${disabled_plugins} ${plugin}\"\n\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\nif test \"${plibs}\"; then\n  llibs=\"${LIBS}\"\n  for l in ${plibs}; do\n  llibs=\"${llibs} -l${l}\"\n  done\n  echo ${llibs} > ${plugin}.lib\nfi\nplugin=\"Mpeg3Plugin\"\nplibs=\"\"\nrm -f Mpeg3Plugin.sub Mpeg3Plugin.lib\n# Add `--enable-mpg-[mmx,pthreads]' switches\n\n# Check whether --enable-mpg-mmx or --disable-mpg-mmx was given.\nif test \"${enable_mpg_mmx+set}\" = set; then\n  enableval=\"$enable_mpg_mmx\"\n  XDEFS=\"-DUSE_MMX\"\nelse\n  XDEFS=\"\"\nfi;\n\n# Check whether --enable-mpg-pthreads or --disable-mpg-pthreads was given.\nif test \"${enable_mpg_pthreads+set}\" = set; then\n  enableval=\"$enable_mpg_pthreads\"\n\nelse\n  XDEFS=\"$XDEFS -DNOPTHREADS\"\nfi;\n\n# Define `[xdefs]' in Makefile.in\n\n\n  echo 's%\\['xdefs'\\]%'$XDEFS'%g' >> ${plugin}.sub\nif test \"${plibs}\"; then\n  llibs=\"${LIBS}\"\n  for l in ${plibs}; do\n  llibs=\"${llibs} -l${l}\"\n  done\n  echo ${llibs} > ${plugin}.lib\nfi\nplugin=\"PseudoTTYPlugin\"\nplibs=\"\"\nrm -f PseudoTTYPlugin.sub PseudoTTYPlugin.lib\n\n\n\n\nfor ac_header in util.h libutil.h pty.h stropts.h\ndo\nas_ac_Header=`echo \"ac_cv_header_$ac_header\" | $as_tr_sh`\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo \"$as_me:$LINENO: checking for $ac_header\" >&5\necho $ECHO_N \"checking for $ac_header... $ECHO_C\" >&6\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nfi\necho \"$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`\" >&5\necho \"${ECHO_T}`eval echo '${'$as_ac_Header'}'`\" >&6\nelse\n  # Is the header compilable?\necho \"$as_me:$LINENO: checking $ac_header usability\" >&5\necho $ECHO_N \"checking $ac_header usability... $ECHO_C\" >&6\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n$ac_includes_default\n#include <$ac_header>\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_header_compiler=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_header_compiler=no\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\necho \"$as_me:$LINENO: result: $ac_header_compiler\" >&5\necho \"${ECHO_T}$ac_header_compiler\" >&6\n\n# Is the header present?\necho \"$as_me:$LINENO: checking $ac_header presence\" >&5\necho $ECHO_N \"checking $ac_header presence... $ECHO_C\" >&6\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <$ac_header>\n_ACEOF\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_cpp conftest.$ac_ext\\\"\") >&5\n  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } >/dev/null; then\n  if test -s conftest.err; then\n    ac_cpp_err=$ac_c_preproc_warn_flag\n    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag\n  else\n    ac_cpp_err=\n  fi\nelse\n  ac_cpp_err=yes\nfi\nif test -z \"$ac_cpp_err\"; then\n  ac_header_preproc=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n  ac_header_preproc=no\nfi\nrm -f conftest.err conftest.$ac_ext\necho \"$as_me:$LINENO: result: $ac_header_preproc\" >&5\necho \"${ECHO_T}$ac_header_preproc\" >&6\n\n# So?  What about this header?\ncase $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in\n  yes:no: )\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!\" >&5\necho \"$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result\" >&5\necho \"$as_me: WARNING: $ac_header: proceeding with the compiler's result\" >&2;}\n    ac_header_preproc=yes\n    ;;\n  no:yes:* )\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled\" >&5\necho \"$as_me: WARNING: $ac_header: present but cannot be compiled\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?\" >&5\necho \"$as_me: WARNING: $ac_header:     check for missing prerequisite headers?\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation\" >&5\necho \"$as_me: WARNING: $ac_header: see the Autoconf documentation\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header:     section \\\"Present But Cannot Be Compiled\\\"\" >&5\necho \"$as_me: WARNING: $ac_header:     section \\\"Present But Cannot Be Compiled\\\"\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result\" >&5\necho \"$as_me: WARNING: $ac_header: proceeding with the preprocessor's result\" >&2;}\n    { echo \"$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence\" >&5\necho \"$as_me: WARNING: $ac_header: in the future, the compiler will take precedence\" >&2;}\n    (\n      cat <<\\_ASBOX\n## ------------------------------------------ ##\n## Report this to the AC_PACKAGE_NAME lists.  ##\n## ------------------------------------------ ##\n_ASBOX\n    ) |\n      sed \"s/^/$as_me: WARNING:     /\" >&2\n    ;;\nesac\necho \"$as_me:$LINENO: checking for $ac_header\" >&5\necho $ECHO_N \"checking for $ac_header... $ECHO_C\" >&6\nif eval \"test \\\"\\${$as_ac_Header+set}\\\" = set\"; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  eval \"$as_ac_Header=\\$ac_header_preproc\"\nfi\necho \"$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`\" >&5\necho \"${ECHO_T}`eval echo '${'$as_ac_Header'}'`\" >&6\n\nfi\nif test `eval echo '${'$as_ac_Header'}'` = yes; then\n  cat >>confdefs.h <<_ACEOF\n#define `echo \"HAVE_$ac_header\" | $as_tr_cpp` 1\n_ACEOF\n\nfi\n\ndone\n\n\necho \"$as_me:$LINENO: checking for library containing openpty\" >&5\necho $ECHO_N \"checking for library containing openpty... $ECHO_C\" >&6\nif test \"${ac_cv_search_openpty+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_func_search_save_LIBS=$LIBS\nac_cv_search_openpty=no\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar openpty ();\nint\nmain ()\n{\nopenpty ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_search_openpty=\"none required\"\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nif test \"$ac_cv_search_openpty\" = no; then\n  for ac_lib in util; do\n    LIBS=\"-l$ac_lib  $ac_func_search_save_LIBS\"\n    cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar openpty ();\nint\nmain ()\n{\nopenpty ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_search_openpty=\"-l$ac_lib\"\nbreak\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\n  done\nfi\nLIBS=$ac_func_search_save_LIBS\nfi\necho \"$as_me:$LINENO: result: $ac_cv_search_openpty\" >&5\necho \"${ECHO_T}$ac_cv_search_openpty\" >&6\nif test \"$ac_cv_search_openpty\" != no; then\n  test \"$ac_cv_search_openpty\" = \"none required\" || LIBS=\"$ac_cv_search_openpty $LIBS\"\n  cat >>confdefs.h <<\\_ACEOF\n#define HAVE_OPENPTY 1\n_ACEOF\n\nelse\n\n  if test -r /dev/ptmx; then\n    echo \"$as_me:$LINENO: checking for grantpt\" >&5\necho $ECHO_N \"checking for grantpt... $ECHO_C\" >&6\nif test \"${ac_cv_func_grantpt+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n/* Define grantpt to an innocuous variant, in case <limits.h> declares grantpt.\n   For example, HP-UX 11i <limits.h> declares gettimeofday.  */\n#define grantpt innocuous_grantpt\n\n/* System header to define __stub macros and hopefully few prototypes,\n    which can conflict with char grantpt (); below.\n    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n    <limits.h> exists even on freestanding compilers.  */\n\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\n#undef grantpt\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar grantpt ();\n/* The GNU C library defines this for functions which it implements\n    to always fail with ENOSYS.  Some functions are actually named\n    something starting with __ and the normal name is an alias.  */\n#if defined (__stub_grantpt) || defined (__stub___grantpt)\nchoke me\n#else\nchar (*f) () = grantpt;\n#endif\n#ifdef __cplusplus\n}\n#endif\n\nint\nmain ()\n{\nreturn f != grantpt;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_func_grantpt=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_func_grantpt=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_func_grantpt\" >&5\necho \"${ECHO_T}$ac_cv_func_grantpt\" >&6\nif test $ac_cv_func_grantpt = yes; then\n  cat >>confdefs.h <<\\_ACEOF\n#define HAVE_UNIX98_PTYS 1\n_ACEOF\n\nfi\n\n  fi\nfi\n\nif test \"${plibs}\"; then\n  llibs=\"${LIBS}\"\n  for l in ${plibs}; do\n  llibs=\"${llibs} -l${l}\"\n  done\n  echo ${llibs} > ${plugin}.lib\nfi\nplugin=\"UnixOSProcessPlugin\"\nplibs=\"\"\nrm -f UnixOSProcessPlugin.sub UnixOSProcessPlugin.lib\necho \"$as_me:$LINENO: checking for unsetenv\" >&5\necho $ECHO_N \"checking for unsetenv... $ECHO_C\" >&6\nif test \"${ac_cv_func_unsetenv+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  cat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n/* Define unsetenv to an innocuous variant, in case <limits.h> declares unsetenv.\n   For example, HP-UX 11i <limits.h> declares gettimeofday.  */\n#define unsetenv innocuous_unsetenv\n\n/* System header to define __stub macros and hopefully few prototypes,\n    which can conflict with char unsetenv (); below.\n    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n    <limits.h> exists even on freestanding compilers.  */\n\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\n#undef unsetenv\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar unsetenv ();\n/* The GNU C library defines this for functions which it implements\n    to always fail with ENOSYS.  Some functions are actually named\n    something starting with __ and the normal name is an alias.  */\n#if defined (__stub_unsetenv) || defined (__stub___unsetenv)\nchoke me\n#else\nchar (*f) () = unsetenv;\n#endif\n#ifdef __cplusplus\n}\n#endif\n\nint\nmain ()\n{\nreturn f != unsetenv;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_func_unsetenv=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_func_unsetenv=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nfi\necho \"$as_me:$LINENO: result: $ac_cv_func_unsetenv\" >&5\necho \"${ECHO_T}$ac_cv_func_unsetenv\" >&6\nif test $ac_cv_func_unsetenv = yes; then\n  cat >>confdefs.h <<\\_ACEOF\n#define HAVE_UNSETENV 1\n_ACEOF\n\nfi\n\nif test \"${plibs}\"; then\n  llibs=\"${LIBS}\"\n  for l in ${plibs}; do\n  llibs=\"${llibs} -l${l}\"\n  done\n  echo ${llibs} > ${plugin}.lib\nfi\nplugin=\"UUIDPlugin\"\nplibs=\"\"\nrm -f UUIDPlugin.sub UUIDPlugin.lib\n# -*- sh -*-\n\necho \"$as_me:$LINENO: checking for UUID support\" >&5\necho $ECHO_N \"checking for UUID support... $ECHO_C\" >&6\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n#include <uuid/uuid.h>\nint\nmain ()\n{\nuuid_generate;\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_compile\\\"\") >&5\n  (eval $ac_compile) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest.$ac_objext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n\n  echo \"$as_me:$LINENO: result: yes\" >&5\necho \"${ECHO_T}yes\" >&6\n  echo \"$as_me:$LINENO: checking for uuid_generate in -luuid\" >&5\necho $ECHO_N \"checking for uuid_generate in -luuid... $ECHO_C\" >&6\nif test \"${ac_cv_lib_uuid_uuid_generate+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-luuid  $LIBS\"\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar uuid_generate ();\nint\nmain ()\n{\nuuid_generate ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_lib_uuid_uuid_generate=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_lib_uuid_uuid_generate=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\necho \"$as_me:$LINENO: result: $ac_cv_lib_uuid_uuid_generate\" >&5\necho \"${ECHO_T}$ac_cv_lib_uuid_uuid_generate\" >&6\nif test $ac_cv_lib_uuid_uuid_generate = yes; then\n  LIB_UUID=\"-luuid\"\n\nfi\n\n\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n\n  echo \"$as_me:$LINENO: result: no\" >&5\necho \"${ECHO_T}no\" >&6\n\n\n  echo \"$as_me:$LINENO: result: ******** disabling ${plugin}\" >&5\necho \"${ECHO_T}******** disabling ${plugin}\" >&6\n  disabled_plugins=\"${disabled_plugins} ${plugin}\"\n\nfi\nrm -f conftest.err conftest.$ac_objext conftest.$ac_ext\n\n\nif test \"${plibs}\"; then\n  llibs=\"${LIBS}\"\n  for l in ${plibs}; do\n  llibs=\"${llibs} -l${l}\"\n  done\n  echo ${llibs} > ${plugin}.lib\nfi\nplugin=\"XDisplayControlPlugin\"\nplibs=\"\"\nrm -f XDisplayControlPlugin.sub XDisplayControlPlugin.lib\n# Require X11\n\necho \"$as_me:$LINENO: checking for XOpenDisplay in -lX11\" >&5\necho $ECHO_N \"checking for XOpenDisplay in -lX11... $ECHO_C\" >&6\nif test \"${ac_cv_lib_X11_XOpenDisplay+set}\" = set; then\n  echo $ECHO_N \"(cached) $ECHO_C\" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-lX11  $LIBS\"\ncat >conftest.$ac_ext <<_ACEOF\n/* confdefs.h.  */\n_ACEOF\ncat confdefs.h >>conftest.$ac_ext\ncat >>conftest.$ac_ext <<_ACEOF\n/* end confdefs.h.  */\n\n/* Override any gcc2 internal prototype to avoid an error.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\n/* We use char because int might match the return type of a gcc2\n   builtin and then its argument prototype would still apply.  */\nchar XOpenDisplay ();\nint\nmain ()\n{\nXOpenDisplay ();\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.$ac_objext conftest$ac_exeext\nif { (eval echo \"$as_me:$LINENO: \\\"$ac_link\\\"\") >&5\n  (eval $ac_link) 2>conftest.er1\n  ac_status=$?\n  grep -v '^ *+' conftest.er1 >conftest.err\n  rm -f conftest.er1\n  cat conftest.err >&5\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); } &&\n\t { ac_try='test -z \"$ac_c_werror_flag\"\n\t\t\t || test ! -s conftest.err'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; } &&\n\t { ac_try='test -s conftest$ac_exeext'\n  { (eval echo \"$as_me:$LINENO: \\\"$ac_try\\\"\") >&5\n  (eval $ac_try) 2>&5\n  ac_status=$?\n  echo \"$as_me:$LINENO: \\$? = $ac_status\" >&5\n  (exit $ac_status); }; }; then\n  ac_cv_lib_X11_XOpenDisplay=yes\nelse\n  echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\nac_cv_lib_X11_XOpenDisplay=no\nfi\nrm -f conftest.err conftest.$ac_objext \\\n      conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\necho \"$as_me:$LINENO: result: $ac_cv_lib_X11_XOpenDisplay\" >&5\necho \"${ECHO_T}$ac_cv_lib_X11_XOpenDisplay\" >&6\nif test $ac_cv_lib_X11_XOpenDisplay = yes; then\n\n  plibs=\"${plibs} X11\"\nelse\n\n\n  echo \"$as_me:$LINENO: result: ******** disabling ${plugin}\" >&5\necho \"${ECHO_T}******** disabling ${plugin}\" >&6\n  disabled_plugins=\"${disabled_plugins} ${plugin}\"\nfi\n\nif test \"${plibs}\"; then\n  llibs=\"${LIBS}\"\n  for l in ${plibs}; do\n  llibs=\"${llibs} -l${l}\"\n  done\n  echo ${llibs} > ${plugin}.lib\nfi\n\n\n#AC_ARG_WITH(vm-sound-null,\n#[  --without-vm-sound-null      disable null vm sound support [default=enabled]],\n#  [with_vm_sound_null=\"$withval\"],\n#  [with_vm_sound_null=\"yes\"])\n#if test \"$with_vm_sound_null\"=\"no\"; then\n#\tAC_PLUGIN_DISABLE_PLUGIN(vm-sound-null);\n#fi\n\n\n# Check whether --with-vm-sound-OSS or --without-vm-sound-OSS was given.\nif test \"${with_vm_sound_OSS+set}\" = set; then\n  withval=\"$with_vm_sound_OSS\"\n  with_vm_sound_OSS=\"$withval\"\nelse\n  with_vm_sound_OSS=\"yes\"\nfi;\nif test \"$with_vm_sound_OSS\"=\"no\"; then\n\n  echo \"$as_me:$LINENO: result: ******** disabling vm-sound-OSS\" >&5\necho \"${ECHO_T}******** disabling vm-sound-OSS\" >&6\n  disabled_plugins=\"${disabled_plugins} vm-sound-OSS\";\nfi\n\n\n# Check whether --with-vm-display-fbdev or --without-vm-display-fbdev was given.\nif test \"${with_vm_display_fbdev+set}\" = set; then\n  withval=\"$with_vm_display_fbdev\"\n  with_vm_display_fbdev=\"$withval\"\nelse\n  with_display_fbdev=\"yes\"\nfi;\nif test \"$with_display_fbdev\"=\"no\"; then\n\n  echo \"$as_me:$LINENO: result: ******** disabling vm-display-fbdev\" >&5\necho \"${ECHO_T}******** disabling vm-display-fbdev\" >&6\n  disabled_plugins=\"${disabled_plugins} vm-display-fbdev\";\nfi\n\n# Plugins not generated by VMM must be listed here...\nint_plugins=\"\"\next_plugins=\"\"\n\n\n\n#if test \"$have_x\" = \"no\"; then\n#  AC_PLUGIN_DISABLE_PLUGIN(UnixOSProcessPlugin)\n#fi\n\nif test \"${disabled_plugins}\" != \"\"; then\n  echo ${disabled_plugins} | tr ' ' '\\012' | sort -u > plugins.exc\nfi\n\n# for some reason configure leaves an empty a.out lying around\ntest -f a.out && rm a.out\n\n# Create the build environment\n\n          ac_config_headers=\"$ac_config_headers config.h\"\n\n                                                                                          ac_config_files=\"$ac_config_files mkconfig make.cfg make.int make.ext make.prg inisqueak squeak.sh bin.squeak.sh Makefile\"\n\n          ac_config_commands=\"$ac_config_commands default\"\n\n\ncat >confcache <<\\_ACEOF\n# This file is a shell script that caches the results of configure\n# tests run on this system so they can be shared between configure\n# scripts and configure runs, see configure's option --config-cache.\n# It is not useful on other systems.  If it contains results you don't\n# want to keep, you may remove or edit it.\n#\n# config.status only pays attention to the cache file if you give it\n# the --recheck option to rerun configure.\n#\n# `ac_cv_env_foo' variables (set or unset) will be overridden when\n# loading this file, other *unset* `ac_cv_foo' will be assigned the\n# following values.\n\n_ACEOF\n\n# The following way of writing the cache mishandles newlines in values,\n# but we know of no workaround that is simple, portable, and efficient.\n# So, don't put newlines in cache variables' values.\n# Ultrix sh set writes to stderr and can't be redirected directly,\n# and sets the high bit in the cache file unless we assign to the vars.\n{\n  (set) 2>&1 |\n    case `(ac_space=' '; set | grep ac_space) 2>&1` in\n    *ac_space=\\ *)\n      # `set' does not quote correctly, so add quotes (double-quote\n      # substitution turns \\\\\\\\ into \\\\, and sed turns \\\\ into \\).\n      sed -n \\\n\t\"s/'/'\\\\\\\\''/g;\n\t  s/^\\\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\\\)=\\\\(.*\\\\)/\\\\1='\\\\2'/p\"\n      ;;\n    *)\n      # `set' quotes correctly as required by POSIX, so do not add quotes.\n      sed -n \\\n\t\"s/^\\\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\\\)=\\\\(.*\\\\)/\\\\1=\\\\2/p\"\n      ;;\n    esac;\n} |\n  sed '\n     t clear\n     : clear\n     s/^\\([^=]*\\)=\\(.*[{}].*\\)$/test \"${\\1+set}\" = set || &/\n     t end\n     /^ac_cv_env/!s/^\\([^=]*\\)=\\(.*\\)$/\\1=${\\1=\\2}/\n     : end' >>confcache\nif diff $cache_file confcache >/dev/null 2>&1; then :; else\n  if test -w $cache_file; then\n    test \"x$cache_file\" != \"x/dev/null\" && echo \"updating cache $cache_file\"\n    cat confcache >$cache_file\n  else\n    echo \"not updating unwritable cache $cache_file\"\n  fi\nfi\nrm -f confcache\n\ntest \"x$prefix\" = xNONE && prefix=$ac_default_prefix\n# Let make expand exec_prefix.\ntest \"x$exec_prefix\" = xNONE && exec_prefix='${prefix}'\n\n# VPATH may cause trouble with some makes, so we remove $(srcdir),\n# ${srcdir} and @srcdir@ from VPATH if srcdir is \".\", strip leading and\n# trailing colons and then remove the whole line if VPATH becomes empty\n# (actually we leave an empty line to preserve line numbers).\nif test \"x$srcdir\" = x.; then\n  ac_vpsub='/^[\t ]*VPATH[\t ]*=/{\ns/:*\\$(srcdir):*/:/;\ns/:*\\${srcdir}:*/:/;\ns/:*@srcdir@:*/:/;\ns/^\\([^=]*=[\t ]*\\):*/\\1/;\ns/:*$//;\ns/^[^=]*=[\t ]*$//;\n}'\nfi\n\nDEFS=-DHAVE_CONFIG_H\n\nac_libobjs=\nac_ltlibobjs=\nfor ac_i in : $LIBOBJS; do test \"x$ac_i\" = x: && continue\n  # 1. Remove the extension, and $U if already installed.\n  ac_i=`echo \"$ac_i\" |\n\t sed 's/\\$U\\././;s/\\.o$//;s/\\.obj$//'`\n  # 2. Add them.\n  ac_libobjs=\"$ac_libobjs $ac_i\\$U.$ac_objext\"\n  ac_ltlibobjs=\"$ac_ltlibobjs $ac_i\"'$U.lo'\ndone\nLIBOBJS=$ac_libobjs\n\nLTLIBOBJS=$ac_ltlibobjs\n\n\n\n: ${CONFIG_STATUS=./config.status}\nac_clean_files_save=$ac_clean_files\nac_clean_files=\"$ac_clean_files $CONFIG_STATUS\"\n{ echo \"$as_me:$LINENO: creating $CONFIG_STATUS\" >&5\necho \"$as_me: creating $CONFIG_STATUS\" >&6;}\ncat >$CONFIG_STATUS <<_ACEOF\n#! $SHELL\n# Generated by $as_me.\n# Run this file to recreate the current configuration.\n# Compiler output produced by configure, useful for debugging\n# configure, is in config.log if it exists.\n\ndebug=false\nac_cs_recheck=false\nac_cs_silent=false\nSHELL=\\${CONFIG_SHELL-$SHELL}\n_ACEOF\n\ncat >>$CONFIG_STATUS <<\\_ACEOF\n## --------------------- ##\n## M4sh Initialization.  ##\n## --------------------- ##\n\n# Be Bourne compatible\nif test -n \"${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then\n  emulate sh\n  NULLCMD=:\n  # Zsh 3.x and 4.x performs word splitting on ${1+\"$@\"}, which\n  # is contrary to our usage.  Disable this feature.\n  alias -g '${1+\"$@\"}'='\"$@\"'\nelif test -n \"${BASH_VERSION+set}\" && (set -o posix) >/dev/null 2>&1; then\n  set -o posix\nfi\nDUALCASE=1; export DUALCASE # for MKS sh\n\n# Support unset when possible.\nif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then\n  as_unset=unset\nelse\n  as_unset=false\nfi\n\n\n# Work around bugs in pre-3.0 UWIN ksh.\n$as_unset ENV MAIL MAILPATH\nPS1='$ '\nPS2='> '\nPS4='+ '\n\n# NLS nuisances.\nfor as_var in \\\n  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \\\n  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \\\n  LC_TELEPHONE LC_TIME\ndo\n  if (set +x; test -z \"`(eval $as_var=C; export $as_var) 2>&1`\"); then\n    eval $as_var=C; export $as_var\n  else\n    $as_unset $as_var\n  fi\ndone\n\n# Required to use basename.\nif expr a : '\\(a\\)' >/dev/null 2>&1; then\n  as_expr=expr\nelse\n  as_expr=false\nfi\n\nif (basename /) >/dev/null 2>&1 && test \"X`basename / 2>&1`\" = \"X/\"; then\n  as_basename=basename\nelse\n  as_basename=false\nfi\n\n\n# Name of the executable.\nas_me=`$as_basename \"$0\" ||\n$as_expr X/\"$0\" : '.*/\\([^/][^/]*\\)/*$' \\| \\\n\t X\"$0\" : 'X\\(//\\)$' \\| \\\n\t X\"$0\" : 'X\\(/\\)$' \\| \\\n\t .     : '\\(.\\)' 2>/dev/null ||\necho X/\"$0\" |\n    sed '/^.*\\/\\([^/][^/]*\\)\\/*$/{ s//\\1/; q; }\n  \t  /^X\\/\\(\\/\\/\\)$/{ s//\\1/; q; }\n  \t  /^X\\/\\(\\/\\).*/{ s//\\1/; q; }\n  \t  s/.*/./; q'`\n\n\n# PATH needs CR, and LINENO needs CR and PATH.\n# Avoid depending upon Character Ranges.\nas_cr_letters='abcdefghijklmnopqrstuvwxyz'\nas_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'\nas_cr_Letters=$as_cr_letters$as_cr_LETTERS\nas_cr_digits='0123456789'\nas_cr_alnum=$as_cr_Letters$as_cr_digits\n\n# The user is always right.\nif test \"${PATH_SEPARATOR+set}\" != set; then\n  echo \"#! /bin/sh\" >conf$$.sh\n  echo  \"exit 0\"   >>conf$$.sh\n  chmod +x conf$$.sh\n  if (PATH=\"/nonexistent;.\"; conf$$.sh) >/dev/null 2>&1; then\n    PATH_SEPARATOR=';'\n  else\n    PATH_SEPARATOR=:\n  fi\n  rm -f conf$$.sh\nfi\n\n\n  as_lineno_1=$LINENO\n  as_lineno_2=$LINENO\n  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`\n  test \"x$as_lineno_1\" != \"x$as_lineno_2\" &&\n  test \"x$as_lineno_3\"  = \"x$as_lineno_2\"  || {\n  # Find who we are.  Look in the path if we contain no path at all\n  # relative or not.\n  case $0 in\n    *[\\\\/]* ) as_myself=$0 ;;\n    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  test -r \"$as_dir/$0\" && as_myself=$as_dir/$0 && break\ndone\n\n       ;;\n  esac\n  # We did not find ourselves, most probably we were run as `sh COMMAND'\n  # in which case we are not to be found in the path.\n  if test \"x$as_myself\" = x; then\n    as_myself=$0\n  fi\n  if test ! -f \"$as_myself\"; then\n    { { echo \"$as_me:$LINENO: error: cannot find myself; rerun with an absolute path\" >&5\necho \"$as_me: error: cannot find myself; rerun with an absolute path\" >&2;}\n   { (exit 1); exit 1; }; }\n  fi\n  case $CONFIG_SHELL in\n  '')\n    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  for as_base in sh bash ksh sh5; do\n\t case $as_dir in\n\t /*)\n\t   if (\"$as_dir/$as_base\" -c '\n  as_lineno_1=$LINENO\n  as_lineno_2=$LINENO\n  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`\n  test \"x$as_lineno_1\" != \"x$as_lineno_2\" &&\n  test \"x$as_lineno_3\"  = \"x$as_lineno_2\" ') 2>/dev/null; then\n\t     $as_unset BASH_ENV || test \"${BASH_ENV+set}\" != set || { BASH_ENV=; export BASH_ENV; }\n\t     $as_unset ENV || test \"${ENV+set}\" != set || { ENV=; export ENV; }\n\t     CONFIG_SHELL=$as_dir/$as_base\n\t     export CONFIG_SHELL\n\t     exec \"$CONFIG_SHELL\" \"$0\" ${1+\"$@\"}\n\t   fi;;\n\t esac\n       done\ndone\n;;\n  esac\n\n  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO\n  # uniformly replaced by the line number.  The first 'sed' inserts a\n  # line-number line before each line; the second 'sed' does the real\n  # work.  The second script uses 'N' to pair each line-number line\n  # with the numbered line, and appends trailing '-' during\n  # substitution so that $LINENO is not a special case at line end.\n  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the\n  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)\n  sed '=' <$as_myself |\n    sed '\n      N\n      s,$,-,\n      : loop\n      s,^\\(['$as_cr_digits']*\\)\\(.*\\)[$]LINENO\\([^'$as_cr_alnum'_]\\),\\1\\2\\1\\3,\n      t loop\n      s,-$,,\n      s,^['$as_cr_digits']*\\n,,\n    ' >$as_me.lineno &&\n  chmod +x $as_me.lineno ||\n    { { echo \"$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell\" >&5\necho \"$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell\" >&2;}\n   { (exit 1); exit 1; }; }\n\n  # Don't try to exec as it changes $[0], causing all sort of problems\n  # (the dirname of $[0] is not the place where we might find the\n  # original and so on.  Autoconf is especially sensible to this).\n  . ./$as_me.lineno\n  # Exit status is that of the last command.\n  exit\n}\n\n\ncase `echo \"testing\\c\"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in\n  *c*,-n*) ECHO_N= ECHO_C='\n' ECHO_T='\t' ;;\n  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;\n  *)       ECHO_N= ECHO_C='\\c' ECHO_T= ;;\nesac\n\nif expr a : '\\(a\\)' >/dev/null 2>&1; then\n  as_expr=expr\nelse\n  as_expr=false\nfi\n\nrm -f conf$$ conf$$.exe conf$$.file\necho >conf$$.file\nif ln -s conf$$.file conf$$ 2>/dev/null; then\n  # We could just check for DJGPP; but this test a) works b) is more generic\n  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).\n  if test -f conf$$.exe; then\n    # Don't use ln at all; we don't have any links\n    as_ln_s='cp -p'\n  else\n    as_ln_s='ln -s'\n  fi\nelif ln conf$$.file conf$$ 2>/dev/null; then\n  as_ln_s=ln\nelse\n  as_ln_s='cp -p'\nfi\nrm -f conf$$ conf$$.exe conf$$.file\n\nif mkdir -p . 2>/dev/null; then\n  as_mkdir_p=:\nelse\n  test -d ./-p && rmdir ./-p\n  as_mkdir_p=false\nfi\n\nas_executable_p=\"test -f\"\n\n# Sed expression to map a string onto a valid CPP name.\nas_tr_cpp=\"eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'\"\n\n# Sed expression to map a string onto a valid variable name.\nas_tr_sh=\"eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'\"\n\n\n# IFS\n# We need space, tab and new line, in precisely that order.\nas_nl='\n'\nIFS=\" \t$as_nl\"\n\n# CDPATH.\n$as_unset CDPATH\n\nexec 6>&1\n\n# Open the log real soon, to keep \\$[0] and so on meaningful, and to\n# report actual input values of CONFIG_FILES etc. instead of their\n# values after options handling.  Logging --version etc. is OK.\nexec 5>>config.log\n{\n  echo\n  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX\n## Running $as_me. ##\n_ASBOX\n} >&5\ncat >&5 <<_CSEOF\n\nThis file was extended by $as_me, which was\ngenerated by GNU Autoconf 2.59.  Invocation command line was\n\n  CONFIG_FILES    = $CONFIG_FILES\n  CONFIG_HEADERS  = $CONFIG_HEADERS\n  CONFIG_LINKS    = $CONFIG_LINKS\n  CONFIG_COMMANDS = $CONFIG_COMMANDS\n  $ $0 $@\n\n_CSEOF\necho \"on `(hostname || uname -n) 2>/dev/null | sed 1q`\" >&5\necho >&5\n_ACEOF\n\n# Files that config.status was made for.\nif test -n \"$ac_config_files\"; then\n  echo \"config_files=\\\"$ac_config_files\\\"\" >>$CONFIG_STATUS\nfi\n\nif test -n \"$ac_config_headers\"; then\n  echo \"config_headers=\\\"$ac_config_headers\\\"\" >>$CONFIG_STATUS\nfi\n\nif test -n \"$ac_config_links\"; then\n  echo \"config_links=\\\"$ac_config_links\\\"\" >>$CONFIG_STATUS\nfi\n\nif test -n \"$ac_config_commands\"; then\n  echo \"config_commands=\\\"$ac_config_commands\\\"\" >>$CONFIG_STATUS\nfi\n\ncat >>$CONFIG_STATUS <<\\_ACEOF\n\nac_cs_usage=\"\\\n\\`$as_me' instantiates files from templates according to the\ncurrent configuration.\n\nUsage: $0 [OPTIONS] [FILE]...\n\n  -h, --help       print this help, then exit\n  -V, --version    print version number, then exit\n  -q, --quiet      do not print progress messages\n  -d, --debug      don't remove temporary files\n      --recheck    update $as_me by reconfiguring in the same conditions\n  --file=FILE[:TEMPLATE]\n\t\t   instantiate the configuration file FILE\n  --header=FILE[:TEMPLATE]\n\t\t   instantiate the configuration header FILE\n\nConfiguration files:\n$config_files\n\nConfiguration headers:\n$config_headers\n\nConfiguration commands:\n$config_commands\n\nReport bugs to <bug-autoconf@gnu.org>.\"\n_ACEOF\n\ncat >>$CONFIG_STATUS <<_ACEOF\nac_cs_version=\"\\\\\nconfig.status\nconfigured by $0, generated by GNU Autoconf 2.59,\n  with options \\\\\"`echo \"$ac_configure_args\" | sed 's/[\\\\\"\"\\`\\$]/\\\\\\\\&/g'`\\\\\"\n\nCopyright (C) 2003 Free Software Foundation, Inc.\nThis config.status script is free software; the Free Software Foundation\ngives unlimited permission to copy, distribute and modify it.\"\nsrcdir=$srcdir\nINSTALL=\"$INSTALL\"\n_ACEOF\n\ncat >>$CONFIG_STATUS <<\\_ACEOF\n# If no file are specified by the user, then we need to provide default\n# value.  By we need to know if files were specified by the user.\nac_need_defaults=:\nwhile test $# != 0\ndo\n  case $1 in\n  --*=*)\n    ac_option=`expr \"x$1\" : 'x\\([^=]*\\)='`\n    ac_optarg=`expr \"x$1\" : 'x[^=]*=\\(.*\\)'`\n    ac_shift=:\n    ;;\n  -*)\n    ac_option=$1\n    ac_optarg=$2\n    ac_shift=shift\n    ;;\n  *) # This is not an option, so the user has probably given explicit\n     # arguments.\n     ac_option=$1\n     ac_need_defaults=false;;\n  esac\n\n  case $ac_option in\n  # Handling of the options.\n_ACEOF\ncat >>$CONFIG_STATUS <<\\_ACEOF\n  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)\n    ac_cs_recheck=: ;;\n  --version | --vers* | -V )\n    echo \"$ac_cs_version\"; exit 0 ;;\n  --he | --h)\n    # Conflict between --help and --header\n    { { echo \"$as_me:$LINENO: error: ambiguous option: $1\nTry \\`$0 --help' for more information.\" >&5\necho \"$as_me: error: ambiguous option: $1\nTry \\`$0 --help' for more information.\" >&2;}\n   { (exit 1); exit 1; }; };;\n  --help | --hel | -h )\n    echo \"$ac_cs_usage\"; exit 0 ;;\n  --debug | --d* | -d )\n    debug=: ;;\n  --file | --fil | --fi | --f )\n    $ac_shift\n    CONFIG_FILES=\"$CONFIG_FILES $ac_optarg\"\n    ac_need_defaults=false;;\n  --header | --heade | --head | --hea )\n    $ac_shift\n    CONFIG_HEADERS=\"$CONFIG_HEADERS $ac_optarg\"\n    ac_need_defaults=false;;\n  -q | -quiet | --quiet | --quie | --qui | --qu | --q \\\n  | -silent | --silent | --silen | --sile | --sil | --si | --s)\n    ac_cs_silent=: ;;\n\n  # This is an error.\n  -*) { { echo \"$as_me:$LINENO: error: unrecognized option: $1\nTry \\`$0 --help' for more information.\" >&5\necho \"$as_me: error: unrecognized option: $1\nTry \\`$0 --help' for more information.\" >&2;}\n   { (exit 1); exit 1; }; } ;;\n\n  *) ac_config_targets=\"$ac_config_targets $1\" ;;\n\n  esac\n  shift\ndone\n\nac_configure_extra_args=\n\nif $ac_cs_silent; then\n  exec 6>/dev/null\n  ac_configure_extra_args=\"$ac_configure_extra_args --silent\"\nfi\n\n_ACEOF\ncat >>$CONFIG_STATUS <<_ACEOF\nif \\$ac_cs_recheck; then\n  echo \"running $SHELL $0 \" $ac_configure_args \\$ac_configure_extra_args \" --no-create --no-recursion\" >&6\n  exec $SHELL $0 $ac_configure_args \\$ac_configure_extra_args --no-create --no-recursion\nfi\n\n_ACEOF\n\ncat >>$CONFIG_STATUS <<_ACEOF\n#\n# INIT-COMMANDS section.\n#\n\n\n  cfgdir=${cfgdir}\n\n\n_ACEOF\n\n\n\ncat >>$CONFIG_STATUS <<\\_ACEOF\nfor ac_config_target in $ac_config_targets\ndo\n  case \"$ac_config_target\" in\n  # Handling of arguments.\n  \"mkconfig\" ) CONFIG_FILES=\"$CONFIG_FILES mkconfig\" ;;\n  \"make.cfg\" ) CONFIG_FILES=\"$CONFIG_FILES make.cfg\" ;;\n  \"make.int\" ) CONFIG_FILES=\"$CONFIG_FILES make.int\" ;;\n  \"make.ext\" ) CONFIG_FILES=\"$CONFIG_FILES make.ext\" ;;\n  \"make.prg\" ) CONFIG_FILES=\"$CONFIG_FILES make.prg\" ;;\n  \"inisqueak\" ) CONFIG_FILES=\"$CONFIG_FILES inisqueak\" ;;\n  \"squeak.sh\" ) CONFIG_FILES=\"$CONFIG_FILES squeak.sh\" ;;\n  \"bin.squeak.sh\" ) CONFIG_FILES=\"$CONFIG_FILES bin.squeak.sh\" ;;\n  \"Makefile\" ) CONFIG_FILES=\"$CONFIG_FILES Makefile\" ;;\n  \"default\" ) CONFIG_COMMANDS=\"$CONFIG_COMMANDS default\" ;;\n  \"config.h\" ) CONFIG_HEADERS=\"$CONFIG_HEADERS config.h\" ;;\n  *) { { echo \"$as_me:$LINENO: error: invalid argument: $ac_config_target\" >&5\necho \"$as_me: error: invalid argument: $ac_config_target\" >&2;}\n   { (exit 1); exit 1; }; };;\n  esac\ndone\n\n# If the user did not use the arguments to specify the items to instantiate,\n# then the envvar interface is used.  Set only those that are not.\n# We use the long form for the default assignment because of an extremely\n# bizarre bug on SunOS 4.1.3.\nif $ac_need_defaults; then\n  test \"${CONFIG_FILES+set}\" = set || CONFIG_FILES=$config_files\n  test \"${CONFIG_HEADERS+set}\" = set || CONFIG_HEADERS=$config_headers\n  test \"${CONFIG_COMMANDS+set}\" = set || CONFIG_COMMANDS=$config_commands\nfi\n\n# Have a temporary directory for convenience.  Make it in the build tree\n# simply because there is no reason to put it here, and in addition,\n# creating and moving files from /tmp can sometimes cause problems.\n# Create a temporary directory, and hook for its removal unless debugging.\n$debug ||\n{\n  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0\n  trap '{ (exit 1); exit 1; }' 1 2 13 15\n}\n\n# Create a (secure) tmp directory for tmp files.\n\n{\n  tmp=`(umask 077 && mktemp -d -q \"./confstatXXXXXX\") 2>/dev/null` &&\n  test -n \"$tmp\" && test -d \"$tmp\"\n}  ||\n{\n  tmp=./confstat$$-$RANDOM\n  (umask 077 && mkdir $tmp)\n} ||\n{\n   echo \"$me: cannot create a temporary directory in .\" >&2\n   { (exit 1); exit 1; }\n}\n\n_ACEOF\n\ncat >>$CONFIG_STATUS <<_ACEOF\n\n#\n# CONFIG_FILES section.\n#\n\n# No need to generate the scripts if there are no CONFIG_FILES.\n# This happens for instance when ./config.status config.h\nif test -n \"\\$CONFIG_FILES\"; then\n  # Protect against being on the right side of a sed subst in config.status.\n  sed 's/,@/@@/; s/@,/@@/; s/,;t t\\$/@;t t/; /@;t t\\$/s/[\\\\\\\\&,]/\\\\\\\\&/g;\n   s/@@/,@/; s/@@/@,/; s/@;t t\\$/,;t t/' >\\$tmp/subs.sed <<\\\\CEOF\ns,@NM@,$NM,;t t\ns,@LD@,$LD,;t t\ns,@SHELL@,$SHELL,;t t\ns,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t\ns,@PACKAGE_NAME@,$PACKAGE_NAME,;t t\ns,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t\ns,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t\ns,@PACKAGE_STRING@,$PACKAGE_STRING,;t t\ns,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t\ns,@exec_prefix@,$exec_prefix,;t t\ns,@prefix@,$prefix,;t t\ns,@program_transform_name@,$program_transform_name,;t t\ns,@bindir@,$bindir,;t t\ns,@sbindir@,$sbindir,;t t\ns,@libexecdir@,$libexecdir,;t t\ns,@datadir@,$datadir,;t t\ns,@sysconfdir@,$sysconfdir,;t t\ns,@sharedstatedir@,$sharedstatedir,;t t\ns,@localstatedir@,$localstatedir,;t t\ns,@libdir@,$libdir,;t t\ns,@includedir@,$includedir,;t t\ns,@oldincludedir@,$oldincludedir,;t t\ns,@infodir@,$infodir,;t t\ns,@mandir@,$mandir,;t t\ns,@build_alias@,$build_alias,;t t\ns,@host_alias@,$host_alias,;t t\ns,@target_alias@,$target_alias,;t t\ns,@DEFS@,$DEFS,;t t\ns,@ECHO_C@,$ECHO_C,;t t\ns,@ECHO_N@,$ECHO_N,;t t\ns,@ECHO_T@,$ECHO_T,;t t\ns,@LIBS@,$LIBS,;t t\ns,@topdir@,$topdir,;t t\ns,@cfgdir@,$cfgdir,;t t\ns,@vmmdir@,$vmmdir,;t t\ns,@vmmcfg@,$vmmcfg,;t t\ns,@blddir@,$blddir,;t t\ns,@SQ_MAJOR@,$SQ_MAJOR,;t t\ns,@SQ_MINOR@,$SQ_MINOR,;t t\ns,@SQ_UPDATE@,$SQ_UPDATE,;t t\ns,@SQ_VERSION@,$SQ_VERSION,;t t\ns,@VM_MAJOR@,$VM_MAJOR,;t t\ns,@VM_MINOR@,$VM_MINOR,;t t\ns,@VM_RELEASE@,$VM_RELEASE,;t t\ns,@VM_VERSION@,$VM_VERSION,;t t\ns,@imgdir@,$imgdir,;t t\ns,@expanded_relative_imgdir@,$expanded_relative_imgdir,;t t\ns,@plgdir@,$plgdir,;t t\ns,@build@,$build,;t t\ns,@build_cpu@,$build_cpu,;t t\ns,@build_vendor@,$build_vendor,;t t\ns,@build_os@,$build_os,;t t\ns,@host@,$host,;t t\ns,@host_cpu@,$host_cpu,;t t\ns,@host_vendor@,$host_vendor,;t t\ns,@host_os@,$host_os,;t t\ns,@SET_MAKE@,$SET_MAKE,;t t\ns,@CC@,$CC,;t t\ns,@CFLAGS@,$CFLAGS,;t t\ns,@LDFLAGS@,$LDFLAGS,;t t\ns,@CPPFLAGS@,$CPPFLAGS,;t t\ns,@ac_ct_CC@,$ac_ct_CC,;t t\ns,@EXEEXT@,$EXEEXT,;t t\ns,@OBJEXT@,$OBJEXT,;t t\ns,@WFLAGS@,$WFLAGS,;t t\ns,@AS@,$AS,;t t\ns,@RANLIB@,$RANLIB,;t t\ns,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t\ns,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t\ns,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t\ns,@INSTALL_DATA@,$INSTALL_DATA,;t t\ns,@LN@,$LN,;t t\ns,@CPP@,$CPP,;t t\ns,@EGREP@,$EGREP,;t t\ns,@SED@,$SED,;t t\ns,@LN_S@,$LN_S,;t t\ns,@ECHO@,$ECHO,;t t\ns,@AR@,$AR,;t t\ns,@ac_ct_AR@,$ac_ct_AR,;t t\ns,@STRIP@,$STRIP,;t t\ns,@ac_ct_STRIP@,$ac_ct_STRIP,;t t\ns,@CXX@,$CXX,;t t\ns,@CXXFLAGS@,$CXXFLAGS,;t t\ns,@ac_ct_CXX@,$ac_ct_CXX,;t t\ns,@CXXCPP@,$CXXCPP,;t t\ns,@F77@,$F77,;t t\ns,@FFLAGS@,$FFLAGS,;t t\ns,@ac_ct_F77@,$ac_ct_F77,;t t\ns,@LIBTOOL@,$LIBTOOL,;t t\ns,@INCLUDES@,$INCLUDES,;t t\ns,@HAVE_INTERP_H@,$HAVE_INTERP_H,;t t\ns,@ALLOCA@,$ALLOCA,;t t\ns,@INTERP@,$INTERP,;t t\ns,@AWK@,$AWK,;t t\ns,@VM_APP_ICONS@,$VM_APP_ICONS,;t t\ns,@npsqueak@,$npsqueak,;t t\ns,@install_nps@,$install_nps,;t t\ns,@uninstall_nps@,$uninstall_nps,;t t\ns,@SQ_LIBDIR@,$SQ_LIBDIR,;t t\ns,@int_modules@,$int_modules,;t t\ns,@ext_modules@,$ext_modules,;t t\ns,@HAVE_LANGINFO_CODESET@,$HAVE_LANGINFO_CODESET,;t t\ns,@HAVE_NANOSLEEP@,$HAVE_NANOSLEEP,;t t\ns,@X_CFLAGS@,$X_CFLAGS,;t t\ns,@X_PRE_LIBS@,$X_PRE_LIBS,;t t\ns,@X_LIBS@,$X_LIBS,;t t\ns,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t\ns,@X_CPPFLAGS@,$X_CPPFLAGS,;t t\ns,@X_INCLUDES@,$X_INCLUDES,;t t\ns,@LIBM_CFLAGS@,$LIBM_CFLAGS,;t t\ns,@LIB_UUID@,$LIB_UUID,;t t\ns,@int_plugins@,$int_plugins,;t t\ns,@ext_plugins@,$ext_plugins,;t t\ns,@LIBOBJS@,$LIBOBJS,;t t\ns,@LTLIBOBJS@,$LTLIBOBJS,;t t\n/@make_cfg@/r $make_cfg\ns,@make_cfg@,,;t t\n/@make_int@/r $make_int\ns,@make_int@,,;t t\n/@make_ext@/r $make_ext\ns,@make_ext@,,;t t\n/@make_prg@/r $make_prg\ns,@make_prg@,,;t t\n/@Makefile_install@/r $Makefile_install\ns,@Makefile_install@,,;t t\n/@Makefile_dist@/r $Makefile_dist\ns,@Makefile_dist@,,;t t\n/@Makefile_rpm@/r $Makefile_rpm\ns,@Makefile_rpm@,,;t t\n/@Makefile_deb@/r $Makefile_deb\ns,@Makefile_deb@,,;t t\nCEOF\n\n_ACEOF\n\n  cat >>$CONFIG_STATUS <<\\_ACEOF\n  # Split the substitutions into bite-sized pieces for seds with\n  # small command number limits, like on Digital OSF/1 and HP-UX.\n  ac_max_sed_lines=48\n  ac_sed_frag=1 # Number of current file.\n  ac_beg=1 # First line for current file.\n  ac_end=$ac_max_sed_lines # Line after last line for current file.\n  ac_more_lines=:\n  ac_sed_cmds=\n  while $ac_more_lines; do\n    if test $ac_beg -gt 1; then\n      sed \"1,${ac_beg}d; ${ac_end}q\" $tmp/subs.sed >$tmp/subs.frag\n    else\n      sed \"${ac_end}q\" $tmp/subs.sed >$tmp/subs.frag\n    fi\n    if test ! -s $tmp/subs.frag; then\n      ac_more_lines=false\n    else\n      # The purpose of the label and of the branching condition is to\n      # speed up the sed processing (if there are no `@' at all, there\n      # is no need to browse any of the substitutions).\n      # These are the two extra sed commands mentioned above.\n      (echo ':t\n  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed\n      if test -z \"$ac_sed_cmds\"; then\n\tac_sed_cmds=\"sed -f $tmp/subs-$ac_sed_frag.sed\"\n      else\n\tac_sed_cmds=\"$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed\"\n      fi\n      ac_sed_frag=`expr $ac_sed_frag + 1`\n      ac_beg=$ac_end\n      ac_end=`expr $ac_end + $ac_max_sed_lines`\n    fi\n  done\n  if test -z \"$ac_sed_cmds\"; then\n    ac_sed_cmds=cat\n  fi\nfi # test -n \"$CONFIG_FILES\"\n\n_ACEOF\ncat >>$CONFIG_STATUS <<\\_ACEOF\nfor ac_file in : $CONFIG_FILES; do test \"x$ac_file\" = x: && continue\n  # Support \"outfile[:infile[:infile...]]\", defaulting infile=\"outfile.in\".\n  case $ac_file in\n  - | *:- | *:-:* ) # input from stdin\n\tcat >$tmp/stdin\n\tac_file_in=`echo \"$ac_file\" | sed 's,[^:]*:,,'`\n\tac_file=`echo \"$ac_file\" | sed 's,:.*,,'` ;;\n  *:* ) ac_file_in=`echo \"$ac_file\" | sed 's,[^:]*:,,'`\n\tac_file=`echo \"$ac_file\" | sed 's,:.*,,'` ;;\n  * )   ac_file_in=$ac_file.in ;;\n  esac\n\n  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.\n  ac_dir=`(dirname \"$ac_file\") 2>/dev/null ||\n$as_expr X\"$ac_file\" : 'X\\(.*[^/]\\)//*[^/][^/]*/*$' \\| \\\n\t X\"$ac_file\" : 'X\\(//\\)[^/]' \\| \\\n\t X\"$ac_file\" : 'X\\(//\\)$' \\| \\\n\t X\"$ac_file\" : 'X\\(/\\)' \\| \\\n\t .     : '\\(.\\)' 2>/dev/null ||\necho X\"$ac_file\" |\n    sed '/^X\\(.*[^/]\\)\\/\\/*[^/][^/]*\\/*$/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\/\\)[^/].*/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\/\\)$/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\).*/{ s//\\1/; q; }\n  \t  s/.*/./; q'`\n  { if $as_mkdir_p; then\n    mkdir -p \"$ac_dir\"\n  else\n    as_dir=\"$ac_dir\"\n    as_dirs=\n    while test ! -d \"$as_dir\"; do\n      as_dirs=\"$as_dir $as_dirs\"\n      as_dir=`(dirname \"$as_dir\") 2>/dev/null ||\n$as_expr X\"$as_dir\" : 'X\\(.*[^/]\\)//*[^/][^/]*/*$' \\| \\\n\t X\"$as_dir\" : 'X\\(//\\)[^/]' \\| \\\n\t X\"$as_dir\" : 'X\\(//\\)$' \\| \\\n\t X\"$as_dir\" : 'X\\(/\\)' \\| \\\n\t .     : '\\(.\\)' 2>/dev/null ||\necho X\"$as_dir\" |\n    sed '/^X\\(.*[^/]\\)\\/\\/*[^/][^/]*\\/*$/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\/\\)[^/].*/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\/\\)$/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\).*/{ s//\\1/; q; }\n  \t  s/.*/./; q'`\n    done\n    test ! -n \"$as_dirs\" || mkdir $as_dirs\n  fi || { { echo \"$as_me:$LINENO: error: cannot create directory \\\"$ac_dir\\\"\" >&5\necho \"$as_me: error: cannot create directory \\\"$ac_dir\\\"\" >&2;}\n   { (exit 1); exit 1; }; }; }\n\n  ac_builddir=.\n\nif test \"$ac_dir\" != .; then\n  ac_dir_suffix=/`echo \"$ac_dir\" | sed 's,^\\.[\\\\/],,'`\n  # A \"../\" for each directory in $ac_dir_suffix.\n  ac_top_builddir=`echo \"$ac_dir_suffix\" | sed 's,/[^\\\\/]*,../,g'`\nelse\n  ac_dir_suffix= ac_top_builddir=\nfi\n\ncase $srcdir in\n  .)  # No --srcdir option.  We are building in place.\n    ac_srcdir=.\n    if test -z \"$ac_top_builddir\"; then\n       ac_top_srcdir=.\n    else\n       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`\n    fi ;;\n  [\\\\/]* | ?:[\\\\/]* )  # Absolute path.\n    ac_srcdir=$srcdir$ac_dir_suffix;\n    ac_top_srcdir=$srcdir ;;\n  *) # Relative path.\n    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix\n    ac_top_srcdir=$ac_top_builddir$srcdir ;;\nesac\n\n# Do not use `cd foo && pwd` to compute absolute paths, because\n# the directories may not exist.\ncase `pwd` in\n.) ac_abs_builddir=\"$ac_dir\";;\n*)\n  case \"$ac_dir\" in\n  .) ac_abs_builddir=`pwd`;;\n  [\\\\/]* | ?:[\\\\/]* ) ac_abs_builddir=\"$ac_dir\";;\n  *) ac_abs_builddir=`pwd`/\"$ac_dir\";;\n  esac;;\nesac\ncase $ac_abs_builddir in\n.) ac_abs_top_builddir=${ac_top_builddir}.;;\n*)\n  case ${ac_top_builddir}. in\n  .) ac_abs_top_builddir=$ac_abs_builddir;;\n  [\\\\/]* | ?:[\\\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;\n  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;\n  esac;;\nesac\ncase $ac_abs_builddir in\n.) ac_abs_srcdir=$ac_srcdir;;\n*)\n  case $ac_srcdir in\n  .) ac_abs_srcdir=$ac_abs_builddir;;\n  [\\\\/]* | ?:[\\\\/]* ) ac_abs_srcdir=$ac_srcdir;;\n  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;\n  esac;;\nesac\ncase $ac_abs_builddir in\n.) ac_abs_top_srcdir=$ac_top_srcdir;;\n*)\n  case $ac_top_srcdir in\n  .) ac_abs_top_srcdir=$ac_abs_builddir;;\n  [\\\\/]* | ?:[\\\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;\n  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;\n  esac;;\nesac\n\n\n  case $INSTALL in\n  [\\\\/$]* | ?:[\\\\/]* ) ac_INSTALL=$INSTALL ;;\n  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;\n  esac\n\n  if test x\"$ac_file\" != x-; then\n    { echo \"$as_me:$LINENO: creating $ac_file\" >&5\necho \"$as_me: creating $ac_file\" >&6;}\n    rm -f \"$ac_file\"\n  fi\n  # Let's still pretend it is `configure' which instantiates (i.e., don't\n  # use $as_me), people would be surprised to read:\n  #    /* config.h.  Generated by config.status.  */\n  if test x\"$ac_file\" = x-; then\n    configure_input=\n  else\n    configure_input=\"$ac_file.  \"\n  fi\n  configure_input=$configure_input\"Generated from `echo $ac_file_in |\n\t\t\t\t     sed 's,.*/,,'` by configure.\"\n\n  # First look for the input files in the build tree, otherwise in the\n  # src tree.\n  ac_file_inputs=`IFS=:\n    for f in $ac_file_in; do\n      case $f in\n      -) echo $tmp/stdin ;;\n      [\\\\/$]*)\n\t # Absolute (can't be DOS-style, as IFS=:)\n\t test -f \"$f\" || { { echo \"$as_me:$LINENO: error: cannot find input file: $f\" >&5\necho \"$as_me: error: cannot find input file: $f\" >&2;}\n   { (exit 1); exit 1; }; }\n\t echo \"$f\";;\n      *) # Relative\n\t if test -f \"$f\"; then\n\t   # Build tree\n\t   echo \"$f\"\n\t elif test -f \"$srcdir/$f\"; then\n\t   # Source tree\n\t   echo \"$srcdir/$f\"\n\t else\n\t   # /dev/null tree\n\t   { { echo \"$as_me:$LINENO: error: cannot find input file: $f\" >&5\necho \"$as_me: error: cannot find input file: $f\" >&2;}\n   { (exit 1); exit 1; }; }\n\t fi;;\n      esac\n    done` || { (exit 1); exit 1; }\n_ACEOF\ncat >>$CONFIG_STATUS <<_ACEOF\n  sed \"$ac_vpsub\n$extrasub\n_ACEOF\ncat >>$CONFIG_STATUS <<\\_ACEOF\n:t\n/@[a-zA-Z_][a-zA-Z_0-9]*@/!b\ns,@configure_input@,$configure_input,;t t\ns,@srcdir@,$ac_srcdir,;t t\ns,@abs_srcdir@,$ac_abs_srcdir,;t t\ns,@top_srcdir@,$ac_top_srcdir,;t t\ns,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t\ns,@builddir@,$ac_builddir,;t t\ns,@abs_builddir@,$ac_abs_builddir,;t t\ns,@top_builddir@,$ac_top_builddir,;t t\ns,@abs_top_builddir@,$ac_abs_top_builddir,;t t\ns,@INSTALL@,$ac_INSTALL,;t t\n\" $ac_file_inputs | (eval \"$ac_sed_cmds\") >$tmp/out\n  rm -f $tmp/stdin\n  if test x\"$ac_file\" != x-; then\n    mv $tmp/out $ac_file\n  else\n    cat $tmp/out\n    rm -f $tmp/out\n  fi\n\ndone\n_ACEOF\ncat >>$CONFIG_STATUS <<\\_ACEOF\n\n#\n# CONFIG_HEADER section.\n#\n\n# These sed commands are passed to sed as \"A NAME B NAME C VALUE D\", where\n# NAME is the cpp macro being defined and VALUE is the value it is being given.\n#\n# ac_d sets the value in \"#define NAME VALUE\" lines.\nac_dA='s,^\\([\t ]*\\)#\\([\t ]*define[\t ][\t ]*\\)'\nac_dB='[\t ].*$,\\1#\\2'\nac_dC=' '\nac_dD=',;t'\n# ac_u turns \"#undef NAME\" without trailing blanks into \"#define NAME VALUE\".\nac_uA='s,^\\([\t ]*\\)#\\([\t ]*\\)undef\\([\t ][\t ]*\\)'\nac_uB='$,\\1#\\2define\\3'\nac_uC=' '\nac_uD=',;t'\n\nfor ac_file in : $CONFIG_HEADERS; do test \"x$ac_file\" = x: && continue\n  # Support \"outfile[:infile[:infile...]]\", defaulting infile=\"outfile.in\".\n  case $ac_file in\n  - | *:- | *:-:* ) # input from stdin\n\tcat >$tmp/stdin\n\tac_file_in=`echo \"$ac_file\" | sed 's,[^:]*:,,'`\n\tac_file=`echo \"$ac_file\" | sed 's,:.*,,'` ;;\n  *:* ) ac_file_in=`echo \"$ac_file\" | sed 's,[^:]*:,,'`\n\tac_file=`echo \"$ac_file\" | sed 's,:.*,,'` ;;\n  * )   ac_file_in=$ac_file.in ;;\n  esac\n\n  test x\"$ac_file\" != x- && { echo \"$as_me:$LINENO: creating $ac_file\" >&5\necho \"$as_me: creating $ac_file\" >&6;}\n\n  # First look for the input files in the build tree, otherwise in the\n  # src tree.\n  ac_file_inputs=`IFS=:\n    for f in $ac_file_in; do\n      case $f in\n      -) echo $tmp/stdin ;;\n      [\\\\/$]*)\n\t # Absolute (can't be DOS-style, as IFS=:)\n\t test -f \"$f\" || { { echo \"$as_me:$LINENO: error: cannot find input file: $f\" >&5\necho \"$as_me: error: cannot find input file: $f\" >&2;}\n   { (exit 1); exit 1; }; }\n\t # Do quote $f, to prevent DOS paths from being IFS'd.\n\t echo \"$f\";;\n      *) # Relative\n\t if test -f \"$f\"; then\n\t   # Build tree\n\t   echo \"$f\"\n\t elif test -f \"$srcdir/$f\"; then\n\t   # Source tree\n\t   echo \"$srcdir/$f\"\n\t else\n\t   # /dev/null tree\n\t   { { echo \"$as_me:$LINENO: error: cannot find input file: $f\" >&5\necho \"$as_me: error: cannot find input file: $f\" >&2;}\n   { (exit 1); exit 1; }; }\n\t fi;;\n      esac\n    done` || { (exit 1); exit 1; }\n  # Remove the trailing spaces.\n  sed 's/[\t ]*$//' $ac_file_inputs >$tmp/in\n\n_ACEOF\n\n# Transform confdefs.h into two sed scripts, `conftest.defines' and\n# `conftest.undefs', that substitutes the proper values into\n# config.h.in to produce config.h.  The first handles `#define'\n# templates, and the second `#undef' templates.\n# And first: Protect against being on the right side of a sed subst in\n# config.status.  Protect against being in an unquoted here document\n# in config.status.\nrm -f conftest.defines conftest.undefs\n# Using a here document instead of a string reduces the quoting nightmare.\n# Putting comments in sed scripts is not portable.\n#\n# `end' is used to avoid that the second main sed command (meant for\n# 0-ary CPP macros) applies to n-ary macro definitions.\n# See the Autoconf documentation for `clear'.\ncat >confdef2sed.sed <<\\_ACEOF\ns/[\\\\&,]/\\\\&/g\ns,[\\\\$`],\\\\&,g\nt clear\n: clear\ns,^[\t ]*#[\t ]*define[\t ][\t ]*\\([^\t (][^\t (]*\\)\\(([^)]*)\\)[\t ]*\\(.*\\)$,${ac_dA}\\1${ac_dB}\\1\\2${ac_dC}\\3${ac_dD},gp\nt end\ns,^[\t ]*#[\t ]*define[\t ][\t ]*\\([^\t ][^\t ]*\\)[\t ]*\\(.*\\)$,${ac_dA}\\1${ac_dB}\\1${ac_dC}\\2${ac_dD},gp\n: end\n_ACEOF\n# If some macros were called several times there might be several times\n# the same #defines, which is useless.  Nevertheless, we may not want to\n# sort them, since we want the *last* AC-DEFINE to be honored.\nuniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines\nsed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs\nrm -f confdef2sed.sed\n\n# This sed command replaces #undef with comments.  This is necessary, for\n# example, in the case of _POSIX_SOURCE, which is predefined and required\n# on some systems where configure will not decide to define it.\ncat >>conftest.undefs <<\\_ACEOF\ns,^[\t ]*#[\t ]*undef[\t ][\t ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,\n_ACEOF\n\n# Break up conftest.defines because some shells have a limit on the size\n# of here documents, and old seds have small limits too (100 cmds).\necho '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS\necho '  if grep \"^[\t ]*#[\t ]*define\" $tmp/in >/dev/null; then' >>$CONFIG_STATUS\necho '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS\necho '  :' >>$CONFIG_STATUS\nrm -f conftest.tail\nwhile grep . conftest.defines >/dev/null\ndo\n  # Write a limited-size here document to $tmp/defines.sed.\n  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS\n  # Speed up: don't consider the non `#define' lines.\n  echo '/^[\t ]*#[\t ]*define/!b' >>$CONFIG_STATUS\n  # Work around the forget-to-reset-the-flag bug.\n  echo 't clr' >>$CONFIG_STATUS\n  echo ': clr' >>$CONFIG_STATUS\n  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS\n  echo 'CEOF\n  sed -f $tmp/defines.sed $tmp/in >$tmp/out\n  rm -f $tmp/in\n  mv $tmp/out $tmp/in\n' >>$CONFIG_STATUS\n  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail\n  rm -f conftest.defines\n  mv conftest.tail conftest.defines\ndone\nrm -f conftest.defines\necho '  fi # grep' >>$CONFIG_STATUS\necho >>$CONFIG_STATUS\n\n# Break up conftest.undefs because some shells have a limit on the size\n# of here documents, and old seds have small limits too (100 cmds).\necho '  # Handle all the #undef templates' >>$CONFIG_STATUS\nrm -f conftest.tail\nwhile grep . conftest.undefs >/dev/null\ndo\n  # Write a limited-size here document to $tmp/undefs.sed.\n  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS\n  # Speed up: don't consider the non `#undef'\n  echo '/^[\t ]*#[\t ]*undef/!b' >>$CONFIG_STATUS\n  # Work around the forget-to-reset-the-flag bug.\n  echo 't clr' >>$CONFIG_STATUS\n  echo ': clr' >>$CONFIG_STATUS\n  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS\n  echo 'CEOF\n  sed -f $tmp/undefs.sed $tmp/in >$tmp/out\n  rm -f $tmp/in\n  mv $tmp/out $tmp/in\n' >>$CONFIG_STATUS\n  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail\n  rm -f conftest.undefs\n  mv conftest.tail conftest.undefs\ndone\nrm -f conftest.undefs\n\ncat >>$CONFIG_STATUS <<\\_ACEOF\n  # Let's still pretend it is `configure' which instantiates (i.e., don't\n  # use $as_me), people would be surprised to read:\n  #    /* config.h.  Generated by config.status.  */\n  if test x\"$ac_file\" = x-; then\n    echo \"/* Generated by configure.  */\" >$tmp/config.h\n  else\n    echo \"/* $ac_file.  Generated by configure.  */\" >$tmp/config.h\n  fi\n  cat $tmp/in >>$tmp/config.h\n  rm -f $tmp/in\n  if test x\"$ac_file\" != x-; then\n    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then\n      { echo \"$as_me:$LINENO: $ac_file is unchanged\" >&5\necho \"$as_me: $ac_file is unchanged\" >&6;}\n    else\n      ac_dir=`(dirname \"$ac_file\") 2>/dev/null ||\n$as_expr X\"$ac_file\" : 'X\\(.*[^/]\\)//*[^/][^/]*/*$' \\| \\\n\t X\"$ac_file\" : 'X\\(//\\)[^/]' \\| \\\n\t X\"$ac_file\" : 'X\\(//\\)$' \\| \\\n\t X\"$ac_file\" : 'X\\(/\\)' \\| \\\n\t .     : '\\(.\\)' 2>/dev/null ||\necho X\"$ac_file\" |\n    sed '/^X\\(.*[^/]\\)\\/\\/*[^/][^/]*\\/*$/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\/\\)[^/].*/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\/\\)$/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\).*/{ s//\\1/; q; }\n  \t  s/.*/./; q'`\n      { if $as_mkdir_p; then\n    mkdir -p \"$ac_dir\"\n  else\n    as_dir=\"$ac_dir\"\n    as_dirs=\n    while test ! -d \"$as_dir\"; do\n      as_dirs=\"$as_dir $as_dirs\"\n      as_dir=`(dirname \"$as_dir\") 2>/dev/null ||\n$as_expr X\"$as_dir\" : 'X\\(.*[^/]\\)//*[^/][^/]*/*$' \\| \\\n\t X\"$as_dir\" : 'X\\(//\\)[^/]' \\| \\\n\t X\"$as_dir\" : 'X\\(//\\)$' \\| \\\n\t X\"$as_dir\" : 'X\\(/\\)' \\| \\\n\t .     : '\\(.\\)' 2>/dev/null ||\necho X\"$as_dir\" |\n    sed '/^X\\(.*[^/]\\)\\/\\/*[^/][^/]*\\/*$/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\/\\)[^/].*/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\/\\)$/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\).*/{ s//\\1/; q; }\n  \t  s/.*/./; q'`\n    done\n    test ! -n \"$as_dirs\" || mkdir $as_dirs\n  fi || { { echo \"$as_me:$LINENO: error: cannot create directory \\\"$ac_dir\\\"\" >&5\necho \"$as_me: error: cannot create directory \\\"$ac_dir\\\"\" >&2;}\n   { (exit 1); exit 1; }; }; }\n\n      rm -f $ac_file\n      mv $tmp/config.h $ac_file\n    fi\n  else\n    cat $tmp/config.h\n    rm -f $tmp/config.h\n  fi\ndone\n_ACEOF\ncat >>$CONFIG_STATUS <<\\_ACEOF\n\n#\n# CONFIG_COMMANDS section.\n#\nfor ac_file in : $CONFIG_COMMANDS; do test \"x$ac_file\" = x: && continue\n  ac_dest=`echo \"$ac_file\" | sed 's,:.*,,'`\n  ac_source=`echo \"$ac_file\" | sed 's,[^:]*:,,'`\n  ac_dir=`(dirname \"$ac_dest\") 2>/dev/null ||\n$as_expr X\"$ac_dest\" : 'X\\(.*[^/]\\)//*[^/][^/]*/*$' \\| \\\n\t X\"$ac_dest\" : 'X\\(//\\)[^/]' \\| \\\n\t X\"$ac_dest\" : 'X\\(//\\)$' \\| \\\n\t X\"$ac_dest\" : 'X\\(/\\)' \\| \\\n\t .     : '\\(.\\)' 2>/dev/null ||\necho X\"$ac_dest\" |\n    sed '/^X\\(.*[^/]\\)\\/\\/*[^/][^/]*\\/*$/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\/\\)[^/].*/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\/\\)$/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\).*/{ s//\\1/; q; }\n  \t  s/.*/./; q'`\n  { if $as_mkdir_p; then\n    mkdir -p \"$ac_dir\"\n  else\n    as_dir=\"$ac_dir\"\n    as_dirs=\n    while test ! -d \"$as_dir\"; do\n      as_dirs=\"$as_dir $as_dirs\"\n      as_dir=`(dirname \"$as_dir\") 2>/dev/null ||\n$as_expr X\"$as_dir\" : 'X\\(.*[^/]\\)//*[^/][^/]*/*$' \\| \\\n\t X\"$as_dir\" : 'X\\(//\\)[^/]' \\| \\\n\t X\"$as_dir\" : 'X\\(//\\)$' \\| \\\n\t X\"$as_dir\" : 'X\\(/\\)' \\| \\\n\t .     : '\\(.\\)' 2>/dev/null ||\necho X\"$as_dir\" |\n    sed '/^X\\(.*[^/]\\)\\/\\/*[^/][^/]*\\/*$/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\/\\)[^/].*/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\/\\)$/{ s//\\1/; q; }\n  \t  /^X\\(\\/\\).*/{ s//\\1/; q; }\n  \t  s/.*/./; q'`\n    done\n    test ! -n \"$as_dirs\" || mkdir $as_dirs\n  fi || { { echo \"$as_me:$LINENO: error: cannot create directory \\\"$ac_dir\\\"\" >&5\necho \"$as_me: error: cannot create directory \\\"$ac_dir\\\"\" >&2;}\n   { (exit 1); exit 1; }; }; }\n\n  ac_builddir=.\n\nif test \"$ac_dir\" != .; then\n  ac_dir_suffix=/`echo \"$ac_dir\" | sed 's,^\\.[\\\\/],,'`\n  # A \"../\" for each directory in $ac_dir_suffix.\n  ac_top_builddir=`echo \"$ac_dir_suffix\" | sed 's,/[^\\\\/]*,../,g'`\nelse\n  ac_dir_suffix= ac_top_builddir=\nfi\n\ncase $srcdir in\n  .)  # No --srcdir option.  We are building in place.\n    ac_srcdir=.\n    if test -z \"$ac_top_builddir\"; then\n       ac_top_srcdir=.\n    else\n       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`\n    fi ;;\n  [\\\\/]* | ?:[\\\\/]* )  # Absolute path.\n    ac_srcdir=$srcdir$ac_dir_suffix;\n    ac_top_srcdir=$srcdir ;;\n  *) # Relative path.\n    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix\n    ac_top_srcdir=$ac_top_builddir$srcdir ;;\nesac\n\n# Do not use `cd foo && pwd` to compute absolute paths, because\n# the directories may not exist.\ncase `pwd` in\n.) ac_abs_builddir=\"$ac_dir\";;\n*)\n  case \"$ac_dir\" in\n  .) ac_abs_builddir=`pwd`;;\n  [\\\\/]* | ?:[\\\\/]* ) ac_abs_builddir=\"$ac_dir\";;\n  *) ac_abs_builddir=`pwd`/\"$ac_dir\";;\n  esac;;\nesac\ncase $ac_abs_builddir in\n.) ac_abs_top_builddir=${ac_top_builddir}.;;\n*)\n  case ${ac_top_builddir}. in\n  .) ac_abs_top_builddir=$ac_abs_builddir;;\n  [\\\\/]* | ?:[\\\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;\n  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;\n  esac;;\nesac\ncase $ac_abs_builddir in\n.) ac_abs_srcdir=$ac_srcdir;;\n*)\n  case $ac_srcdir in\n  .) ac_abs_srcdir=$ac_abs_builddir;;\n  [\\\\/]* | ?:[\\\\/]* ) ac_abs_srcdir=$ac_srcdir;;\n  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;\n  esac;;\nesac\ncase $ac_abs_builddir in\n.) ac_abs_top_srcdir=$ac_top_srcdir;;\n*)\n  case $ac_top_srcdir in\n  .) ac_abs_top_srcdir=$ac_abs_builddir;;\n  [\\\\/]* | ?:[\\\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;\n  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;\n  esac;;\nesac\n\n\n  { echo \"$as_me:$LINENO: executing $ac_dest commands\" >&5\necho \"$as_me: executing $ac_dest commands\" >&6;}\n  case $ac_dest in\n    default )\n  chmod +x mkconfig inisqueak\n  ${SHELL} -ec \"./mkconfig; ${cfgdir}/mktargets; ${cfgdir}/mkmf\" ;;\n  esac\ndone\n_ACEOF\n\ncat >>$CONFIG_STATUS <<\\_ACEOF\n\n{ (exit 0); exit 0; }\n_ACEOF\nchmod +x $CONFIG_STATUS\nac_clean_files=$ac_clean_files_save\n\n\n# configure is writing to config.log, and then calls config.status.\n# config.status does its own redirection, appending to config.log.\n# Unfortunately, on DOS this fails, as config.log is still kept open\n# by configure, so config.status won't be able to write to it; its\n# output is simply discarded.  So we exec the FD to /dev/null,\n# effectively closing config.log, so it can be properly (re)opened and\n# appended to by config.status.  When coming back to configure, we\n# need to make the FD available again.\nif test \"$no_create\" != yes; then\n  ac_cs_success=:\n  ac_config_status_args=\n  test \"$silent\" = yes &&\n    ac_config_status_args=\"$ac_config_status_args --quiet\"\n  exec 5>/dev/null\n  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false\n  exec 5>>config.log\n  # Use ||, not &&, to avoid exiting from the if with $? = 1, which\n  # would make configure fail if this is the last instruction.\n  $ac_cs_success || { (exit 1); exit 1; }\nfi\n\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/configure.ac",
    "content": "# configure.in (version 4) for Unix Squeak\t\t\t-*- sh -*-\n# \n# Process this file with autoconf to produce a configure script\n\n#   Copyright (C) 1996-2007 by Ian Piumarta and other authors/contributors\n#                              listed elsewhere in this file.\n#   All rights reserved.\n#   \n#   This file is part of Unix Squeak.\n# \n#   Permission is hereby granted, free of charge, to any person obtaining a copy\n#   of this software and associated documentation files (the \"Software\"), to deal\n#   in the Software without restriction, including without limitation the rights\n#   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n#   copies of the Software, and to permit persons to whom the Software is\n#   furnished to do so, subject to the following conditions:\n# \n#   The above copyright notice and this permission notice shall be included in\n#   all copies or substantial portions of the Software.\n# \n#   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n#   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n#   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n#   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n#   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n#   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n#   SOFTWARE.\n# \n# Author: Ian.Piumarta@SqueakLand.org\n# \n# Last edited: Tue Jan 26 11:51:29 PST 2010 by eliot\n\nAC_INIT([config.h.in])\n\nAC_VM_VERSION(3,9,7, 3,9a,7024)\n\ntopdir=`cd ${srcdir}/../../..; pwd`\ncfgdir=`cd ${srcdir}; pwd`\n\nAC_ARG_WITH(src,\n[  --with-src=dir          generated src directory [default=src]],\n[ vmmsrc=\"${with_src}\"],\n[ vmmsrc=\"src\"])\n\nvmmdir=\"${topdir}/${vmmsrc}\"\n\nif test ! -d \"${topdir}/${vmmsrc}\"; then\n  if test -d \"${topdir}/platforms/unix/${vmmsrc}\"; then\n    vmmdir=\"${topdir}/platforms/unix/${vmmsrc}\"\n    AC_MSG_RESULT([using built-in src directory])\n  fi\nfi\n\nAC_MSG_RESULT(${vmmdir})\n\nblddir=`pwd`\n\nAC_ARG_WITH(vmmcfg,\n[  --with-vmmcfg=dir        vm configuration directory containing plugins.int and plugins.ext [default=.]],\n[ vmmcfg=\"${with-vmmcfg}\"],\n[ vmmcfg=\"${blddir}\"])\n\n# Check the generated src dir looks sane\n\nAC_CHECK_VMM_DIR\n\nAC_SUBST(topdir)\nAC_SUBST(cfgdir)\nAC_SUBST(vmmdir)\nAC_SUBST(vmmcfg)\nAC_SUBST(blddir)\n\nSQ_VERSION=${SQ_MAJOR}.${SQ_MINOR}-${SQ_UPDATE}\n\nAC_DEFINE_UNQUOTED(SQ_VERSION, \"${SQ_VERSION}\")\n\nAC_SUBST(SQ_MAJOR)\nAC_SUBST(SQ_MINOR)\nAC_SUBST(SQ_UPDATE)\nAC_SUBST(SQ_VERSION)\n\nVM_VERSION=${VM_MAJOR}.${VM_MINOR}-${VM_RELEASE}\n\nAC_DEFINE_UNQUOTED(VM_VERSION, \"${VM_VERSION}\")\n\nAC_SUBST(VM_MAJOR)\nAC_SUBST(VM_MINOR)\nAC_SUBST(VM_RELEASE)\nAC_SUBST(VM_VERSION)\n\n# libdir contains ${exec_prefix}, so we have to default and expand early\ntest \"x$prefix\" = xNONE && prefix=$ac_default_prefix\ntest \"x$exec_prefix\" = xNONE && exec_prefix='${prefix}'\nimgdir=`eval echo ${libdir}/squeak`\nexpanded_relative_imgdir=`eval echo lib/squeak/${VM_VERSION}`\nplgdir='${imgdir}/'`eval echo ${VM_VERSION}`\n\nAC_SUBST(imgdir)\nAC_SUBST(expanded_relative_imgdir)\nAC_SUBST(plgdir)\n\nAC_DEFINE(OS_TYPE, \"unix\")\n\nAC_CANONICAL_HOST\n\nhost_cpu=`echo $host | sed 's,-.*,,'`\nhost=`echo $host | sed 's,-unknown,,'`\n\nAC_SUBST(host)\nAC_SUBST(host_cpu)\nAC_SUBST(host_vendor)\nAC_SUBST(host_os)\n\nAC_DEFINE_UNQUOTED(VM_HOST, \"$host\")\nAC_DEFINE_UNQUOTED(VM_HOST_OS, \"$host_os\")\nAC_DEFINE_UNQUOTED(VM_HOST_CPU, \"$host_cpu\")\n\necho\necho \"Configuring Squeak ${VM_VERSION} (${SQ_VERSION}) for ${host}\"\necho\n\n# Checks for programs.\n\nAC_ARG_WITH(gnu-awk,\n[  --with-gnu-awk          assume that awk is GNU gawk [default=no]],\n[GAWK=\"$withval\"],\n[case $host_os in\n  darwin*)\tGAWK=\"yes\";;\n  *)\t\tGAWK=\"unknown\";;\nesac])\n\nAC_ARG_WITH(gnu-as,\n[  --with-gnu-as           assume that as is the GNU assembler [default=no]],\n  [GAS=\"$withval\"],\n  [GAS=\"unknown\"])\n\nAC_PROG_MAKE_SET\nAC_PROG_CC_WALL\nAC_PROG_AS_GNU\nAC_PROG_RANLIB\nAC_PROG_INSTALL\nAC_PROG_NM\n\nAC_CHECK_PROG(LN, ln, ln)\n\n# Check size assumptions of basic data types\n\nAC_REQUIRE_SIZEOF(int,    4)\nAC_REQUIRE_SIZEOF(double, 8)\n\nAC_CHECK_INT64_T\n\nAC_CHECK_SIZEOF(int)\nAC_CHECK_SIZEOF(long)\nAC_CHECK_SIZEOF(long long)\nAC_CHECK_SIZEOF(void *)\n\n# libtool configuration\n\nAC_DISABLE_STATIC\nAC_PROG_LIBTOOL\n\n# Configured headers (pretty much everybody needs blddir and vm)\n\nINCLUDES=\"-I${blddir} -I${vmmcfg} -I${topdir}/platforms/unix/vm -I${topdir}/platforms/Cross/vm -I${vmmdir}/vm\"\n\nAC_SUBST(INCLUDES)\n\n# Checks for header files.\n\nAC_NEED_SUNOS_H\n\nAC_STDC_HEADERS\nAC_HAVE_HEADERS(unistd.h string.h fcntl.h sys/file.h sys/param.h)\nAC_HAVE_HEADERS(sys/time.h sys/filio.h sys/select.h)\nAC_HAVE_HEADERS(features.h)\nAC_HAVE_HEADERS(alloca.h) # SunOS5\nAC_HEADER_TIME\nAC_HEADER_DIRENT\n\nif test -f \"${vmmdir}/vm/interp.h\"; then\n  AC_DEFINE(HAVE_INTERP_H, 1)\nfi\nAC_SUBST(HAVE_INTERP_H)\n\nAC_STRUCT_TIMEZONE\n\nAC_CHECK_SOCKLEN_T\nAC_CHECK_ATEXIT\nAC_CHECK_TZSET\nAC_CHECK_GMTOFF\nAC_CHECK_TIMEZONE\nAC_CHECK_GETHOSTNAME\n\n# Display options.\n\nAC_ARG_WITH(rfb,\n[  --without-rfb           disable Remote FrameBuffer support [default=enabled]],\n  [have_rfb=\"$withval\"],\n  [have_rfb=\"no\"])\n\ntest $have_rfb = \"yes\" && AC_DEFINE(USE_RFB,[1])\n\n# Checks for libraries.\n\nAC_CHECK_LIB(nsl, yp_bind)\nAC_CHECK_LIB(socket, socket)\nAC_CHECK_LIB(m, sin)\nAC_CHECK_LIB(pthread, pthread_create)\n# this seems to add no benefit\n#AC_CHECK_LIB(rt, clock_nanosleep)\n\n#AC_CHECK_FUNC(dlopen, [\n#  AC_DEFINE(HAVE_LIBDL,[1])\n#],[\n#  AC_CHECK_LIB(dl, dlopen, [\n#    LIBS=\"-ldl $LIBS\"\n#    AC_DEFINE(HAVE_LIBDL,[1])\n#  ],[\n#    AC_CHECK_FUNC(_dyld_present, [\n#      AC_DEFINE(HAVE_DYLD,[1])\n#    ])\n#  ])\n#])\n\nAC_CHECK_FUNC(_dyld_present, [\n  AC_DEFINE(HAVE_DYLD,[1])\n],[\n  AC_HAVE_HEADERS(dlfcn.h)\n  AC_CHECK_FUNC(dlopen, [\n    AC_DEFINE(HAVE_LIBDL,[1])\n  ],[\n    AC_CHECK_LIB(dl, dlopen, [\n      LIBS=\"-ldl $LIBS\"\n      AC_DEFINE(HAVE_LIBDL,[1])\n    ])\n  ])\n])\n\nAC_CHECK_FUNCS(snprintf __snprintf,[break])\n\nAC_FUNC_MMAP\nAC_FUNC_ALLOCA\n\n#AC_ARG_ENABLE(jit,\n#[  --enable-jit            enable J4 support [default=no]],\n#JIT=\"yes\", JIT=\"no\")\n#\n#test $JIT = \"yes\" && J_CFLAGS=\"-DJ_ENABLED\"\n#AC_SUBST(J_CFLAGS)\n\n# Checks for platform characteristics.\n\nAC_GNU_OPT\nAC_GNU_INTERP\nAC_MODULE_LIB_PREFIX\nAC_64BIT_ARCH\n\nCFLAGS=\"$CFLAGS_32 $CFLAGS -msse\"\n\nAC_C_BYTEORDER\nAC_C_DOUBLE_ALIGNMENT\n\ncase $host_os in\n  darwin*)\n    AC_DEFINE(DARWIN,[1])\n#    CFLAGS=\"-no-cpp-precomp $CFLAGS\"\n    with_npsqueak=no\n    VM_APP_ICONS=\"${imgdir}/SqueakVM.icns\"\n    ;;\n  *)\n    VM_APP_ICONS=\"\"\n    ;;\nesac\n\nAC_SUBST(VM_APP_ICONS)\n\n# Checks for browser support\n\nAC_SUBST(npsqueak)\nAC_SUBST(install_nps)\nAC_SUBST(uninstall_nps)\n\nAC_ARG_WITH(npsqueak,\n[  --without-npsqueak      disable browser plugin support [default=enabled]],\n  [with_npsqueak=\"$withval\"],\n  [with_npsqueak=\"yes\"])\n\nif test \"$with_npsqueak\" = \"no\"; then\n  npsqueak=\"\"\n  install_nps=\"\"\n  uninstall_nps=\"\"\nelse\n  npsqueak=npsqueak\n  install_nps=install-npsqueak\n  uninstall_nps=uninstall-npsqueak\nfi\n\n# Install locations\n\nif test \"x${prefix}\" = xNONE; then\n  SQ_LIBDIR=${ac_default_prefix}/lib/squeak/${SQ_VERSION}\nelse\n  SQ_LIBDIR=${prefix}/lib/squeak/${SQ_VERSION}\nfi\n\nAC_SUBST(SQ_LIBDIR)\nAC_DEFINE_UNQUOTED(SQ_LIBDIR,[\"${SQ_LIBDIR}\"])\n\n# Configure files\n\nmake_cfg=${blddir}/make.cfg\nmake_int=${blddir}/make.int\nmake_ext=${blddir}/make.ext\nmake_prg=${blddir}/make.prg\n\nAC_SUBST_FILE(make_cfg)\nAC_SUBST_FILE(make_int)\nAC_SUBST_FILE(make_ext)\nAC_SUBST_FILE(make_prg)\n\nMakefile_install=${cfgdir}/Makefile.install\nMakefile_dist=${topdir}/util/Makefile.dist\nMakefile_rpm=${topdir}/util/Makefile.rpm\nMakefile_deb=${topdir}/util/Makefile.deb\n\nAC_SUBST_FILE(Makefile_install)\nAC_SUBST_FILE(Makefile_dist)\nAC_SUBST_FILE(Makefile_rpm)\nAC_SUBST_FILE(Makefile_deb)\n\n# Configure VM modules xxx MAKE INTERNAL WORK\n\nint_modules=\"vm\"\next_modules=\"`cd ${topdir}/platforms/unix; echo vm-*`\"\n\nAC_SUBST(int_modules)\nAC_SUBST(ext_modules)\n\n# Configure plugins\n\ndisabled_plugins=\"\"\nrm -f plugins.exc\nsinclude(acplugins.m4)\n\n#AC_ARG_WITH(vm-sound-null,\n#[  --without-vm-sound-null      disable null vm sound support [default=enabled]],\n#  [with_vm_sound_null=\"$withval\"],\n#  [with_vm_sound_null=\"yes\"])\n#if test \"$with_vm_sound_null\"=\"no\"; then\n#\tAC_PLUGIN_DISABLE_PLUGIN(vm-sound-null);\n#fi\n\nAC_ARG_WITH(vm-sound-OSS,\n[  --without-vm-sound-OSS      disable OSS vm sound support [default=enabled]],\n  [with_vm_sound_OSS=\"$withval\"],\n  [with_vm_sound_OSS=\"yes\"])\nif test \"$with_vm_sound_OSS\"=\"no\"; then\n\tAC_PLUGIN_DISABLE_PLUGIN(vm-sound-OSS);\nfi\n\nAC_ARG_WITH(vm-display-fbdev,\n[  --without-vm-display-fbdev      disable frame buffer vm display support [default=enabled]],\n  [with_vm_display_fbdev=\"$withval\"],\n  [with_display_fbdev=\"yes\"])\nif test \"$with_display_fbdev\"=\"no\"; then\n\tAC_PLUGIN_DISABLE_PLUGIN(vm-display-fbdev);\nfi\n\n# Plugins not generated by VMM must be listed here...\nint_plugins=\"\"\next_plugins=\"\"\nAC_SUBST(int_plugins)\nAC_SUBST(ext_plugins)\n\n#if test \"$have_x\" = \"no\"; then\n#  AC_PLUGIN_DISABLE_PLUGIN(UnixOSProcessPlugin)\n#fi\n\nif test \"${disabled_plugins}\" != \"\"; then\n  echo ${disabled_plugins} | tr ' ' '\\012' | sort -u > plugins.exc\nfi\n\n# for some reason configure leaves an empty a.out lying around\ntest -f a.out && rm a.out\n\n# Create the build environment\n\nAC_CONFIG_HEADER(config.h)\nAC_CONFIG_FILES(mkconfig make.cfg make.int make.ext make.prg inisqueak squeak.sh bin.squeak.sh Makefile)\nAC_CONFIG_COMMANDS([default],[\n  chmod +x mkconfig inisqueak\n  ${SHELL} -ec \"./mkconfig; ${cfgdir}/mktargets; ${cfgdir}/mkmf\"],[\n  cfgdir=${cfgdir}\n])\n\nAC_OUTPUT\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/gnuify",
    "content": "#!/usr/bin/gawk -f\n# \n# Rewrite the interpreter source in $1 to use GNU C extensions, writing the\n# modified file to stdout.\n# \n# Author: Ian.Piumarta@INRIA.Fr\n#\n# Last edited: 2006-10-18 10:14:33 by piumarta on emilia.local\n\n#   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n#                              listed elsewhere in this file.\n#   All rights reserved.\n#   \n#   This file is part of Unix Squeak.\n# \n#   Permission is hereby granted, free of charge, to any person obtaining a copy\n#   of this software and associated documentation files (the \"Software\"), to deal\n#   in the Software without restriction, including without limitation the rights\n#   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n#   copies of the Software, and to permit persons to whom the Software is\n#   furnished to do so, subject to the following conditions:\n# \n#   The above copyright notice and this permission notice shall be included in\n#   all copies or substantial portions of the Software.\n# \n#   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n#   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n#   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n#   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n#   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n#   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n#   SOFTWARE.\n\nBEGIN {\n  print \"/* This file has been post-processed for GNU C */\\n\\n\";\n# print \"copying first section of file\" > \"/dev/stderr\";\n  stage= 0;\n}\n\n/#include \"sq.h\"/ {\n  print \"#include \\\"sqGnu.h\\\"\\n\";\n  next;\n}\n\n# An inlining comment means the interpreter was not inlined\n\n/inline\\: true/ {\n# print NR, $0 > \"/dev/stderr\";\n# print \"\" > \"/dev/stderr\";\n# print \"*** interpreter was not inlined: bailing out! ***\" > \"/dev/stderr\";\n# print \"\" > \"/dev/stderr\";\n  stage= -1;\n}\n\n\n(stage == 0) && /^int interpret\\(void\\) \\{/ {\n# print \"interpret: adding static register assignments\" > \"/dev/stderr\";\n  stage= 1;\n  print;\n  next;\n}\n\n(stage == 0) && /^sqInt interpret\\(void\\) \\{/ {\n# print \"interpret: adding static register assignments\" > \"/dev/stderr\";\n  stage= 1;\n  print;\n  next;\n}\n\n(stage == 1) && /^    char\\* localIP;/ {\n  print \"    register char* localIP IP_REG;\";\n  next;\n}\n\n(stage == 1) && /^register struct foo \\* foo = &fum;/ {\n  print \"    register struct foo * foo GP_REG= &fum;\";\n  next;\n}\n\n(stage == 1) && /^    char\\* localSP;/ {\n  print \"    register char* localSP SP_REG;\";\n  next;\n}\n\n(stage == 1) && /^    int currentBytecode;/ {\n  print \"    register int currentBytecode CB_REG;\";\n  next;\n}\n\n(stage == 1) && /^    sqInt currentBytecode;/ {\n  print \"    register int currentBytecode CB_REG;\";\n  next;\n}\n\n(stage == 1) && /^$/ {\n# print \"interpret: adding bytecode dispatch table\" > \"/dev/stderr\";\n  print \"    JUMP_TABLE;\\n\";\n# print \"interpret: rewriting case labels and outer breaks\" > \"/dev/stderr\";\n  stage= 2;\n  FS=\" \";\n# FS=\"[ \t:]+\";\n  next;\n}\n\n(stage == 2) && /^\t\tcase / {\n  print \"\t\tCASE(\" (($NF) + 0) \")\";\n# print \"\t\tCASE(\" $3 \")\";\n  next;\n}\n\n(stage == 2) && /^\t\t\tbreak;/ {\n  print \"\t\t\tBREAK;\";\n  next;\n}\n\n(stage == 2) && /^\\}/ {\n  stage= -1;\n  print;\n  next;\n}\n\n(stage == 3) && /^int primitiveResponse\\(/ {\n  print;\n# print \"primitiveResponse: adding primitive dispatch table\" > \"/dev/stderr\";\n  print \"    PRIM_TABLE;\\n\";\n# print \"primitiveResponse: rewriting case labels\" > \"/dev/stderr\";\n  stage= 4;\n  FS=\" \";\n# FS=\"[ \t:]+\";\n  next;\n}\n\n(stage == 3) && /^sqInt primitiveResponse\\(/ {\n  print;\n# print \"primitiveResponse: adding primitive dispatch table\" > \"/dev/stderr\";\n  print \"    PRIM_TABLE;\\n\";\n# print \"primitiveResponse: rewriting case labels\" > \"/dev/stderr\";\n  stage= 4;\n  FS=\" \";\n# FS=\"[ \t:]+\";\n  next;\n}\n\n\n(stage == 4) && /^\tswitch \\(primitiveIndex\\) \\{/ {\n# print \"primitiveResponse: adding primitive dispatch\" > \"/dev/stderr\";\n  print \"\tPRIM_DISPATCH;\";\n  print;\n  next;\n}\n\n(stage == 4) && /^\tswitch \\(foo->primitiveIndex\\) \\{/ {\n# print \"primitiveResponse: adding primitive dispatch\" > \"/dev/stderr\";\n  print \"\tPRIM_DISPATCH;\";\n  print;\n  next;\n}\n\n(stage == 4) && /^\tcase / {\n  print \"\tCASE(\" (($NF) + 0) \")\";\n# print \"\tCASE(\" $3 \")\";\n  next;\n}\n\n(stage == 4) && /^\\}/ {\n# print \"copying last section of file\" > \"/dev/stderr\";\n  stage= -1;\n  FS=\" \";\n  print;\n  next;\n}\n\n# default\n{\n  print;\n  next;\n}\n\nEND {\n  if (stage != -1) {\n    print \"#error GNUIFICATION FAILED (\", stage, \")\"\n  }\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/inisqueak.in",
    "content": "#!/bin/sh\n# \n# inisqueak -- setup a directory for use with Squeak\n# \n#   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n#                              listed elsewhere in this file.\n#   All rights reserved.\n#   \n#   This file is part of Unix Squeak.\n# \n#   Permission is hereby granted, free of charge, to any person obtaining a copy\n#   of this software and associated documentation files (the \"Software\"), to deal\n#   in the Software without restriction, including without limitation the rights\n#   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n#   copies of the Software, and to permit persons to whom the Software is\n#   furnished to do so, subject to the following conditions:\n# \n#   The above copyright notice and this permission notice shall be included in\n#   all copies or substantial portions of the Software.\n# \n#   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n#   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n#   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n#   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n#   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n#   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n#   SOFTWARE.\n# \n# Author: Ian.Piumarta@INRIA.Fr\n# \n# Last edited: 2006-10-18 10:14:20 by piumarta on emilia.local\n\nMAJOR=@SQ_MAJOR@\nVERSION=@SQ_VERSION@\n\nprefix=@prefix@\nexec_prefix=@exec_prefix@\nbindir=@bindir@\nimgdir=@imgdir@\nplgdir=@plgdir@\n\nif test ! -w .; then\n  echo \"You don't have write permission in this directory.\" >&2\n  exit 1\nfi\n\n# Sun's /bin/sh does not understand \"test -e\", but [/usr]/bin/test does\ntest=\"`which test`\"\n\nlist=false\nstartup=true\nbatch=false\ninteractive=true\n\nwhile true; do\n  case \"$1\" in\n    -l) list=true; shift;;\n    -n) startup=false; shift;;\n    -b) batch=true; interactive=false; shift;;\n    -h|-help|--help)\n        echo \"`basename $0` [-option...] [rootdir]\"\n        echo '    -b      batch (avoid interaction, exit status reflects success)'\n        echo '    -h      you already know about'\n        echo '    -help   same as -h'\n        echo '    -l      always present a list of alternative images (overrides -b)'\n        echo '    -n      do not run Squeak after installing the files'\n        echo '    --help  same as -help'\n        exit 0;;\n    *)  break;;\n  esac\ndone\n\nif test \"$1\" != \"\"; then\n  bindir=${1}/${bindir}\n  imgdir=${1}/${imgdir}\n  plgdir=${1}/${plgdir}\nfi\n\nSQUEAK=${bindir}/squeak\nSOURCES=SqueakV${MAJOR}.sources\nIMAGE=squeak.image.gz\nCHANGES=squeak.changes.gz\n\n# local install function\n\nmissing()\n{\n  echo \"The file ${1} is missing.\" >&2\n  echo \"Please check your Squeak installation.\" >&2\n  exit 1\n}\n\nif ${test} \\( -f squeak.image \\) -a \\( -f squeak.changes \\) -a \\( -e ${SOURCES} \\)\nthen\n  if ${startup}; then\n    if test ! -x ${SQUEAK}; then\n      missing \"${SQUEAK}\"\n    fi\n    if ${interactive}; then\n      echo \"Running ${SQUEAK}\";\n    fi\n    exec ${SQUEAK}\n  else\n    if ${interactive}; then\n      echo \"Squeak is already installed in this directory\" >&2\n    fi\n    exit 1\n  fi\nfi\n\ninstall()\n{\n  cpy=\"${1}\"\n  src=\"${2}\"\n  red=\"${3}\"\n  dst=\"${4}\"\n  if ${test} ! -e ${dst}; then\n    if ${test} -e ${src}; then\n      if ${interactive}; then\n\techo \"+ ${cpy} ${src} ${red} ${dst}\";\n      fi\n      eval      ${cpy} ${src} ${red} ${dst}\n    else\n      missing \"${src}\"\n    fi\n  else\n    echo \"${dst} is already present -- leaving it alone\"\n#   startup=false\n  fi\n}\n\n# choose an image to install\n\nif ${list}; then :; else\n  if ${test} \\( ! -e ${imgdir}/${IMAGE} \\) \\\n          -o \\( ! -e ${imgdir}/${CHANGES} \\) ; then\n    if ${batch}; then\n      echo \"Could not find default image to install -- giving up.\" >&2\n      exit 1;\n    fi\n    list=true\n    echo \"No default image, looking for alternatives...\"\n    echo\n  fi\nfi\n\nif ${list}; then\n  images=`ls -1 ${imgdir}/*.image.gz 2>/dev/null | \\\n          sed \"s.${imgdir}/..;s/.image.gz//\"`\n  if test \"$images\" = \"\"; then\n    echo \"I could not find an image to install.\" >&2\n    echo \"Please check your Squeak installation.\" >&2\n    exit 1\n  fi\n  nimg=`echo ${images} | tr ' ' '\\012' | wc -l`\n  nimg=`echo ${nimg}`\n  more=true\n  while ${more}; do\n    echo \"I found the following images:\"\n    echo ${images} | tr ' ' '\\012' | cat -n\n    if echo ${images} | fgrep \"Squeak${VERSION}\" >/dev/null; then\n      echo \"(of which I might recommend Squeak${VERSION}, unless you know better).\"\n    fi\n    echo -n \"Which one should I install [1-${nimg}]? \"\n    read reply\n    case ${reply} in\n      [1-9]) ;;\n      [1-9][0-9]) ;;\n      *) echo\n         echo \"Let's try that again, with a NUMBER between 1 and ${nimg}.\"\n         echo\n         continue;;\n    esac\n    if test \\( ${reply} -ge 1 \\) -a \\( ${reply} -le ${nimg} \\); then\n      more=false\n    fi\n    if ${more}; then\n      echo\n      echo \"Ha ha, very clever.  Now give me a number between 1 and ${nimg}\"\n      echo \"(or hit your interrupt key [^C or whatever] if you don't like\"\n      echo \"the look of any of them).\"\n      echo\n    fi\n  done\n  IMAGE=`echo ${images} | tr ' ' '\\012' | tail +${reply} | head -1`\n  CHANGES=${IMAGE}.changes.gz\n  IMAGE=${IMAGE}.image.gz\nfi\n\nif ${interactive}; then echo \"Installing ${IMAGE} in `pwd`\"; fi\n\ninstall \"ln -s\"      \"${imgdir}/${SOURCES}\" \" \" \"${SOURCES}\"\ninstall \"gunzip -dc\" \"${imgdir}/${IMAGE}\"   \">\" \"squeak.image\"\ninstall \"gunzip -dc\" \"${imgdir}/${CHANGES}\" \">\" \"squeak.changes\"\n\nif ${startup}; then\n  if test ! -x ${SQUEAK}; then\n    missing \"${SQUEAK}\"\n  fi\n  if ${interactive}; then\n    echo \"Running ${SQUEAK}\";\n  fi\n  exec ${SQUEAK}\nfi\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/install-sh",
    "content": "#!/bin/sh\n#\n# install - install a program, script, or datafile\n# This comes from X11R5 (mit/util/scripts/install.sh).\n#\n# Copyright 1991 by the Massachusetts Institute of Technology\n#\n# Permission to use, copy, modify, distribute, and sell this software and its\n# documentation for any purpose is hereby granted without fee, provided that\n# the above copyright notice appear in all copies and that both that\n# copyright notice and this permission notice appear in supporting\n# documentation, and that the name of M.I.T. not be used in advertising or\n# publicity pertaining to distribution of the software without specific,\n# written prior permission.  M.I.T. makes no representations about the\n# suitability of this software for any purpose.  It is provided \"as is\"\n# without express or implied warranty.\n#\n# Calling this script install-sh is preferred over install.sh, to prevent\n# `make' implicit rules from creating a file called install from it\n# when there is no Makefile.\n#\n# This script is compatible with the BSD install script, but was written\n# from scratch.  It can only install one file at a time, a restriction\n# shared with many OS's install programs.\n\n\n# set DOITPROG to echo to test this script\n\n# Don't use :- since 4.3BSD and earlier shells don't like it.\ndoit=\"${DOITPROG-}\"\n\n\n# put in absolute paths if you don't have them in your path; or use env. vars.\n\nmvprog=\"${MVPROG-mv}\"\ncpprog=\"${CPPROG-cp}\"\nchmodprog=\"${CHMODPROG-chmod}\"\nchownprog=\"${CHOWNPROG-chown}\"\nchgrpprog=\"${CHGRPPROG-chgrp}\"\nstripprog=\"${STRIPPROG-strip}\"\nrmprog=\"${RMPROG-rm}\"\nmkdirprog=\"${MKDIRPROG-mkdir}\"\n\ntransformbasename=\"\"\ntransform_arg=\"\"\ninstcmd=\"$mvprog\"\nchmodcmd=\"$chmodprog 0755\"\nchowncmd=\"\"\nchgrpcmd=\"\"\nstripcmd=\"\"\nrmcmd=\"$rmprog -f\"\nmvcmd=\"$mvprog\"\nsrc=\"\"\ndst=\"\"\ndir_arg=\"\"\n# CYGNUS LOCAL: exeext variable\nexeext=\"\"\n# END CYGNUS LOCAL\n\nwhile [ x\"$1\" != x ]; do\n    case $1 in\n\t-c) instcmd=\"$cpprog\"\n\t    shift\n\t    continue;;\n\n\t-d) dir_arg=true\n\t    shift\n\t    continue;;\n\n\t-m) chmodcmd=\"$chmodprog $2\"\n\t    shift\n\t    shift\n\t    continue;;\n\n\t-o) chowncmd=\"$chownprog $2\"\n\t    shift\n\t    shift\n\t    continue;;\n\n\t-g) chgrpcmd=\"$chgrpprog $2\"\n\t    shift\n\t    shift\n\t    continue;;\n\n\t-s) stripcmd=\"$stripprog\"\n\t    shift\n\t    continue;;\n\n\t-t=*) transformarg=`echo $1 | sed 's/-t=//'`\n\t    shift\n\t    continue;;\n\n\t-b=*) transformbasename=`echo $1 | sed 's/-b=//'`\n\t    shift\n\t    continue;;\n\n\t# CYGNUS LOCAL: -x option\n        -x=*) exeext=`echo $1 | sed 's/-x=//'`\n\t    shift\n\t    continue;;\n\n\t-x) exeext=\".exe\"\n\t    shift\n\t    continue;;\n\t# END CYGNUS LOCAL\n\n\t*)  if [ x\"$src\" = x ]\n\t    then\n\t\tsrc=$1\n\t    else\n\t\t# this colon is to work around a 386BSD /bin/sh bug\n\t\t:\n\t\tdst=$1\n\t    fi\n\t    shift\n\t    continue;;\n    esac\ndone\n\nif [ x\"$src\" = x ]\nthen\n\techo \"install:\tno input file specified\"\n\texit 1\nelse\n\ttrue\nfi\n\nif [ x\"$dir_arg\" != x ]; then\n\tdst=$src\n\tsrc=\"\"\n\t\n\tif [ -d $dst ]; then\n\t\tinstcmd=:\n\t\tchmodcmd=\"\"\n\telse\n\t\tinstcmd=mkdir\n\tfi\nelse\n\n# CYGNUS LOCAL noer\n# Win32-based gcc automatically appends .exe to produced executables,\n# whether asked for or not.  This breaks installs.  The following\n# changes the value of $src to $src.exe if $src is missing\n\n\tif [ -f $src ]\n\tthen\n\t\ttrue\n\telif [ -f $src.exe ]\n\tthen\n\t\techo \"install:  $src does not exist, trying with .exe appended\"\n\t\tsrc=\"$src\".exe\n\tfi\n\n# end CYGNUS LOCAL noer\n\n# Waiting for this to be detected by the \"$instcmd $src $dsttmp\" command\n# might cause directories to be created, which would be especially bad \n# if $src (and thus $dsttmp) contains '*'.\n\n\tif [ -f $src -o -d $src ]\n\tthen\n\t\ttrue\n\telse\n\t\techo \"install:  $src does not exist\"\n\t\texit 1\n\tfi\n\t\n\tif [ x\"$dst\" = x ]\n\tthen\n\t\techo \"install:\tno destination specified\"\n\t\texit 1\n\telse\n\t\ttrue\n\tfi\n\n# If destination is a directory, append the input filename; if your system\n# does not like double slashes in filenames, you may need to add some logic\n\n\tif [ -d $dst ]\n\tthen\n\t\tdst=\"$dst\"/`basename $src`\n\telse\n\t\ttrue\n\tfi\n\n\t# CYGNUS LOCAL: Use exeext\n\tcase \"`basename $dst`\" in\n\t    *.*) ;;\n\t    *) dst=\"$dst$exeext\" ;;\n\tesac\n\t# END CYGNUS LOCAL\nfi\n\n## this sed command emulates the dirname command\ndstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`\n\n# Make sure that the destination directory exists.\n#  this part is taken from Noah Friedman's mkinstalldirs script\n\n# Skip lots of stat calls in the usual case.\nif [ ! -d \"$dstdir\" ]; then\ndefaultIFS='\t\n'\nIFS=\"${IFS-${defaultIFS}}\"\n\noIFS=\"${IFS}\"\n# Some sh's can't handle IFS=/ for some reason.\nIFS='%'\nset - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`\nIFS=\"${oIFS}\"\n\npathcomp=''\n\nwhile [ $# -ne 0 ] ; do\n\tpathcomp=\"${pathcomp}${1}\"\n\tshift\n\n\tif [ ! -d \"${pathcomp}\" ] ;\n        then\n\t\t$mkdirprog \"${pathcomp}\"\n\telse\n\t\ttrue\n\tfi\n\n\tpathcomp=\"${pathcomp}/\"\ndone\nfi\n\nif [ x\"$dir_arg\" != x ]\nthen\n\t$doit $instcmd $dst &&\n\n\tif [ x\"$chowncmd\" != x ]; then $doit $chowncmd $dst; else true ; fi &&\n\tif [ x\"$chgrpcmd\" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&\n\tif [ x\"$stripcmd\" != x ]; then $doit $stripcmd $dst; else true ; fi &&\n\tif [ x\"$chmodcmd\" != x ]; then $doit $chmodcmd $dst; else true ; fi\nelse\n\n# If we're going to rename the final executable, determine the name now.\n\n\tif [ x\"$transformarg\" = x ] \n\tthen\n\t\tdstfile=`basename $dst`\n\telse\n\t\tdstfile=`basename $dst $transformbasename | \n\t\t\tsed $transformarg`$transformbasename\n\tfi\n\n# don't allow the sed command to completely eliminate the filename\n\n\tif [ x\"$dstfile\" = x ] \n\tthen\n\t\tdstfile=`basename $dst`\n\telse\n\t\ttrue\n\tfi\n\n# Make a temp file name in the proper directory.\n\n\tdsttmp=$dstdir/#inst.$$#\n\n# Move or copy the file name to the temp name\n\n\t$doit $instcmd $src $dsttmp &&\n\n\ttrap \"rm -f ${dsttmp}\" 0 &&\n\n# and set any options; do chmod last to preserve setuid bits\n\n# If any of these fail, we abort the whole thing.  If we want to\n# ignore errors from any of these, just make sure not to ignore\n# errors from the above \"$doit $instcmd $src $dsttmp\" command.\n\n\tif [ x\"$chowncmd\" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&\n\tif [ x\"$chgrpcmd\" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&\n\tif [ x\"$stripcmd\" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&\n\tif [ x\"$chmodcmd\" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&\n\n# Now rename the file to the real destination.\n\n\t$doit $rmcmd -f $dstdir/$dstfile &&\n\t$doit $mvcmd $dsttmp $dstdir/$dstfile \n\nfi &&\n\n\nexit 0\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/ltcf-c.sh",
    "content": "#### This script is meant to be sourced by ltconfig.\n\n# ltcf-c.sh - Create a C compiler specific configuration\n#\n# Copyright (C) 1996-2000, 2001 Free Software Foundation, Inc.\n# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996\n#\n# This file is free software; you can redistribute it and/or modify it\n# under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful, but\n# WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n# General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n#\n# As a special exception to the GNU General Public License, if you\n# distribute this file as part of a program that contains a\n# configuration script generated by Autoconf, you may include it under\n# the same distribution terms that you use for the rest of that program.\n\n\n# Source file extension for C test sources.\nac_ext=c\n\n# Object file extension for compiled C test sources.\nobjext=o\n\n# Code to be used in simple compile tests\nlt_simple_compile_test_code=\"int some_variable = 0;\"\n\n# Code to be used in simple link tests\nlt_simple_link_test_code='main(){return(0);}'\n\n## Linker Characteristics\ncase $host_os in\ncygwin* | mingw*)\n  # FIXME: the MSVC++ port hasn't been tested in a loooong time\n  # When not using gcc, we currently assume that we are using\n  # Microsoft Visual C++.\n  if test \"$with_gcc\" != yes; then\n    with_gnu_ld=no\n  fi\n  ;;\n\nesac\n\nld_shlibs=yes\nif test \"$with_gnu_ld\" = yes; then\n  # If archive_cmds runs LD, not CC, wlarc should be empty\n  wlarc='${wl}'\n\n  # See if GNU ld supports shared libraries.\n  case $host_os in\n  aix3* | aix4* | aix5*)\n    # On AIX, the GNU linker is very broken\n    ld_shlibs=no\n    cat <<EOF 1>&2\n\n*** Warning: the GNU linker, at least up to release 2.9.1, is reported\n*** to be unable to reliably create shared libraries on AIX.\n*** Therefore, libtool is disabling shared libraries support.  If you\n*** really care for shared libraries, you may want to modify your PATH\n*** so that a non-GNU linker is found, and then restart.\n\nEOF\n    ;;\n\n  amigaos*)\n    archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo \"#define NAME $libname\" > $output_objdir/a2ixlibrary.data~$echo \"#define LIBRARY_ID 1\" >> $output_objdir/a2ixlibrary.data~$echo \"#define VERSION $major\" >> $output_objdir/a2ixlibrary.data~$echo \"#define REVISION $revision\" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'\n    hardcode_libdir_flag_spec='-L$libdir'\n    hardcode_minus_L=yes\n\n    # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports\n    # that the semantics of dynamic libraries on AmigaOS, at least up\n    # to version 4, is to share data among multiple programs linked\n    # with the same dynamic library.  Since this doesn't match the\n    # behavior of shared libraries on other platforms, we can use\n    # them.\n    ld_shlibs=no\n    ;;\n\n  beos*)\n    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then\n      allow_undefined_flag=unsupported\n      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc\n      # support --undefined.  This deserves some investigation.  FIXME\n      archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n    else\n      ld_shlibs=no\n    fi\n    ;;\n\n  cygwin* | mingw*)\n    # hardcode_libdir_flag_spec is actually meaningless, as there is\n    # no search path for DLLs.\n    hardcode_libdir_flag_spec='-L$libdir'\n    allow_undefined_flag=unsupported\n    always_export_symbols=yes\n\n    extract_expsyms_cmds='test -f $output_objdir/impgen.c || \\\n      sed -e \"/^# \\/\\* impgen\\.c starts here \\*\\//,/^# \\/\\* impgen.c ends here \\*\\// { s/^# //; p; }\" -e d < $0 > $output_objdir/impgen.c~\n      test -f $output_objdir/impgen.exe || (cd $output_objdir && \\\n      if test \"x$HOST_CC\" != \"x\" ; then $HOST_CC -o impgen impgen.c ; \\\n      else $CC -o impgen impgen.c ; fi)~\n      $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'\n\n    old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'\n\n    # cygwin and mingw dlls have different entry points and sets of symbols\n    # to exclude.\n    # FIXME: what about values for MSVC?\n    dll_entry=__cygwin_dll_entry@12\n    dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~\n    case $host_os in\n    mingw*)\n      # mingw values\n      dll_entry=_DllMainCRTStartup@12\n      dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~\n      ;;\n    esac\n\n    # mingw and cygwin differ, and it's simplest to just exclude the union\n    # of the two symbol sets.\n    dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12\n\n    # recent cygwin and mingw systems supply a stub DllMain which the user\n    # can override, but on older systems we have to supply one (in ltdll.c)\n    if test \"x$lt_cv_need_dllmain\" = \"xyes\"; then\n      ltdll_obj='$output_objdir/$soname-ltdll.'\"$objext \"\n      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~\n\ttest -f $output_objdir/$soname-ltdll.$objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'\n    else\n      ltdll_obj=\n      ltdll_cmds=\n    fi\n\n    # Extract the symbol export list from an `--export-all' def file,\n    # then regenerate the def file from the symbol export list, so that\n    # the compiled dll only exports the symbol export list.\n    # Be careful not to strip the DATA tag left be newer dlltools.\n    export_symbols_cmds=\"$ltdll_cmds\"'\n      $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~\n      sed -e \"1,/EXPORTS/d\" -e \"s/ @ [0-9]*//\" -e \"s/ *;.*$//\" < $output_objdir/$soname-def > $export_symbols'\n\n    # If the export-symbols file already is a .def file (1st line\n    # is EXPORTS), use it as is.\n    # If DATA tags from a recent dlltool are present, honour them!\n    archive_expsym_cmds='if test \"x`head -1 $export_symbols`\" = xEXPORTS; then\n        cp $export_symbols $output_objdir/$soname-def;\n      else\n        echo EXPORTS > $output_objdir/$soname-def;\n        _lt_hint=1;\n        cat $export_symbols | while read symbol; do\n         set dummy \\$symbol;\n         case \\[$]# in\n           2) echo \"   \\[$]2 @ \\$_lt_hint ; \" >> $output_objdir/$soname-def;;\n           *) echo \"     \\[$]2 @ \\$_lt_hint \\[$]3 ; \" >> $output_objdir/$soname-def;;\n         esac;\n         _lt_hint=`expr 1 + \\$_lt_hint`;\n        done;\n      fi~\n      '\"$ltdll_cmds\"'\n      $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~\n      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~\n      $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~\n      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~\n      $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'\n    ;;\n\n  darwin* | rhapsody*)\n    allow_undefined_flag='-undefined suppress'\n    if test .$module = .yes; then\n      archive_cmds='$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs $linkopts'\n    else\n      archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $linkopts -install_name $rpath/$soname `test -n \"$verstring\" -a x$verstring != x0.0 && echo $verstring`'\n    fi\n    # We need to add '_' to the symbols in $export_symbols first\n    #archive_expsym_cmds=\"$archive_cmds\"' && strip -s $export_symbols'\n    hardcode_direct=yes\n    hardcode_shlibpath_var=no\n    whole_archive_flag_spec='-all_load $convenience'\n    ;;\n\n  netbsd*)\n    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then\n      archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'\n      wlarc=\n    else\n      archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n      archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n    fi\n    ;;\n\n  solaris* | sysv5*)\n    if $LD -v 2>&1 | egrep 'BFD 2\\.8' > /dev/null; then\n      ld_shlibs=no\n      cat <<EOF 1>&2\n\n*** Warning: The releases 2.8.* of the GNU linker cannot reliably\n*** create shared libraries on Solaris systems.  Therefore, libtool\n*** is disabling shared libraries support.  We urge you to upgrade GNU\n*** binutils to release 2.9.1 or newer.  Another option is to modify\n*** your PATH or compiler configuration so that the native linker is\n*** used, and then restart.\n\nEOF\n    elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then\n      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n    else\n      ld_shlibs=no\n    fi\n    ;;\n\n  sunos4*)\n    archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'\n    wlarc=\n    hardcode_direct=yes\n    hardcode_shlibpath_var=no\n    ;;\n\n  *)\n    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then\n      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'\n      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'\n    else\n      ld_shlibs=no\n    fi\n    ;;\n  esac\n\n  if test \"$ld_shlibs\" = yes; then\n    runpath_var=LD_RUN_PATH\n    hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'\n    export_dynamic_flag_spec='${wl}--export-dynamic'\n    case $host_os in\n    cygwin* | mingw*)\n      # dlltool doesn't understand --whole-archive et. al.\n      whole_archive_flag_spec=\n      ;;\n    *)\n      # ancient GNU ld didn't support --whole-archive et. al.\n      if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then\n\twhole_archive_flag_spec=\"$wlarc\"'--whole-archive$convenience '\"$wlarc\"'--no-whole-archive'\n      else\n\twhole_archive_flag_spec=\n      fi\n      ;;\n    esac\n  fi\nelse\n  # PORTME fill in a description of your system's linker (not GNU ld)\n  case $host_os in\n  aix3*)\n    allow_undefined_flag=unsupported\n    always_export_symbols=yes\n    archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'\n    # Note: this linker hardcodes the directories in LIBPATH if there\n    # are no directories specified by -L.\n    hardcode_minus_L=yes\n    if test \"$with_gcc\" = yes && test -z \"$link_static_flag\"; then\n      # Neither direct hardcoding nor static linking is supported with a\n      # broken collect2.\n      hardcode_direct=unsupported\n    fi\n    ;;\n\n  aix4* | aix5*)\n    hardcode_direct=yes\n    hardcode_libdir_separator=':'\n    link_all_deplibs=yes\n    # When large executables or shared objects are built, AIX ld can\n    # have problems creating the table of contents.  If linking a library\n    # or program results in \"error TOC overflow\" add -mminimal-toc to\n    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not\n    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.\n    if test \"$with_gcc\" = yes; then\n      case $host_os in aix4.[012]|aix4.[012].*)\n      # We only want to do this on AIX 4.2 and lower, the check\n      # below for broken collect2 doesn't work under 4.3+\n        collect2name=`${CC} -print-prog-name=collect2`\n        if test -f \"$collect2name\" && \\\n\t   strings \"$collect2name\" | grep resolve_lib_name >/dev/null\n        then\n\t  # We have reworked collect2\n\t  hardcode_direct=yes\n        else\n\t  # We have old collect2\n\t  hardcode_direct=unsupported\n\t  # It fails to find uninstalled libraries when the uninstalled\n\t  # path is not listed in the libpath.  Setting hardcode_minus_L\n\t  # to unsupported forces relinking\n\t  hardcode_minus_L=yes\n\t  hardcode_libdir_flag_spec='-L$libdir'\n\t  hardcode_libdir_separator=\n        fi\n      esac\n      shared_flag='-shared'\n    else\n      # not using gcc\n      if test \"$host_cpu\" = ia64; then\n        shared_flag='${wl}-G'\n      else\n        shared_flag='${wl}-bM:SRE'\n      fi\n    fi\n\n    if test \"$host_cpu\" = ia64; then\n      # On IA64, the linker does run time linking by default, so we don't\n      # have to do anything special.\n      aix_use_runtimelinking=no\n      exp_sym_flag='-Bexport'\n      no_entry_flag=\"\"\n    else\n      # Test if we are trying to use run time linking, or normal AIX style linking.\n      # If -brtl is somewhere in LDFLAGS, we need to do run time linking.\n      aix_use_runtimelinking=no\n      for ld_flag in $LDFLAGS; do\n        if (test $ld_flag = \"-brtl\" || test $ld_flag = \"-Wl,-brtl\" ); then\n          aix_use_runtimelinking=yes\n          break\n        fi\n      done\n      exp_sym_flag='-bexport'\n      no_entry_flag='-bnoentry'\n    fi\n    # -bexpall does not export symbols beginning with underscore (_)\n    always_export_symbols=yes\n    if test \"$aix_use_runtimelinking\" = yes; then\n      # Warning - without using the other run time loading flags (-brtl), -berok will\n      #           link without error, but may produce a broken library.\n      allow_undefined_flag=' ${wl}-berok'\n      hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'\n      archive_expsym_cmds=\"\\$CC $shared_flag\"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '\"\\${wl}$no_entry_flag \\${wl}$exp_sym_flag:\\$export_symbols\"\n    else\n      if test \"$host_cpu\" = ia64; then\n        hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'\n        allow_undefined_flag=\"-z nodefs\"\n        archive_expsym_cmds=\"\\$CC $shared_flag\"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '\"\\${wl}$no_entry_flag \\${wl}$exp_sym_flag:\\$export_symbols\"\n      else\n        allow_undefined_flag=' ${wl}-berok'\n        # -bexpall does not export symbols beginning with underscore (_)\n        always_export_symbols=yes\n        # Exported symbols can be pulled into shared objects from archives\n        whole_archive_flag_spec=' '\n        build_libtool_need_lc=yes\n        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'\n        # This is similar to how AIX traditionally builds it's shared libraries.\n        archive_expsym_cmds=\"\\$CC $shared_flag\"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'\n      fi\n    fi\n    ;;\n\n  amigaos*)\n    archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo \"#define NAME $libname\" > $output_objdir/a2ixlibrary.data~$echo \"#define LIBRARY_ID 1\" >> $output_objdir/a2ixlibrary.data~$echo \"#define VERSION $major\" >> $output_objdir/a2ixlibrary.data~$echo \"#define REVISION $revision\" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'\n    hardcode_libdir_flag_spec='-L$libdir'\n    hardcode_minus_L=yes\n    # see comment about different semantics on the GNU ld section\n    ld_shlibs=no\n    ;;\n\n  cygwin* | mingw*)\n    # When not using gcc, we currently assume that we are using\n    # Microsoft Visual C++.\n    # hardcode_libdir_flag_spec is actually meaningless, as there is\n    # no search path for DLLs.\n    hardcode_libdir_flag_spec=' '\n    allow_undefined_flag=unsupported\n    # Tell ltmain to make .lib files, not .a files.\n    libext=lib\n    # FIXME: Setting linknames here is a bad hack.\n    archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo \"$deplibs\" | sed -e '\\''s/ -lc$//'\\''` -link -dll~linknames='\n    # The linker will automatically build a .lib file if we build a DLL.\n    old_archive_from_new_cmds='true'\n    # FIXME: Should let the user specify the lib program.\n    old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'\n    fix_srcfile_path='`cygpath -w \"$srcfile\"`'\n    ;;\n\n  freebsd1*)\n    ld_shlibs=no\n    ;;\n\n  # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor\n  # support.  Future versions do this automatically, but an explicit c++rt0.o\n  # does not break anything, and helps significantly (at the cost of a little\n  # extra space).\n  freebsd2.2*)\n    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'\n    hardcode_libdir_flag_spec='-R$libdir'\n    hardcode_direct=yes\n    hardcode_shlibpath_var=no\n    ;;\n\n  # Unfortunately, older versions of FreeBSD 2 do not have this feature.\n  freebsd2*)\n    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'\n    hardcode_direct=yes\n    hardcode_minus_L=yes\n    hardcode_shlibpath_var=no\n    ;;\n\n  # FreeBSD 3 and greater uses gcc -shared to do shared libraries.\n  freebsd*)\n    archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'\n    hardcode_libdir_flag_spec='-R$libdir'\n    hardcode_direct=yes\n    hardcode_shlibpath_var=no\n    ;;\n\n  hpux9* | hpux10* | hpux11*)\n    case $host_os in\n    hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;\n    *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;\n    esac\n    hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'\n    hardcode_libdir_separator=:\n    hardcode_direct=yes\n    hardcode_minus_L=yes # Not in the search PATH, but as the default\n\t\t\t # location of the library.\n    export_dynamic_flag_spec='${wl}-E'\n    ;;\n\n  irix5* | irix6*)\n    if test \"$with_gcc\" = yes; then\n      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}${objdir}/so_locations -o $lib'\n    else\n      archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n \"$verstring\" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'\n    fi\n    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'\n    hardcode_libdir_separator=:\n    link_all_deplibs=yes\n    ;;\n\n  netbsd*)\n    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then\n      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out\n    else\n      archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF\n    fi\n    hardcode_libdir_flag_spec='-R$libdir'\n    hardcode_direct=yes\n    hardcode_shlibpath_var=no\n    ;;\n\n  newsos6)\n    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'\n    hardcode_direct=yes\n    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'\n    hardcode_libdir_separator=:\n    hardcode_shlibpath_var=no\n    ;;\n\n  openbsd*)\n    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'\n    hardcode_libdir_flag_spec='-R$libdir'\n    hardcode_direct=yes\n    hardcode_shlibpath_var=no\n    ;;\n\n  os2*)\n    hardcode_libdir_flag_spec='-L$libdir'\n    hardcode_minus_L=yes\n    allow_undefined_flag=unsupported\n    archive_cmds='$echo \"LIBRARY $libname INITINSTANCE\" > $output_objdir/$libname.def~$echo \"DESCRIPTION \\\"$libname\\\"\" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo \" SINGLE NONSHARED\" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'\n    old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'\n    ;;\n\n  osf3*)\n    if test \"$with_gcc\" = yes; then\n      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\\*'\n      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n \"$verstring\" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'\n    else\n      allow_undefined_flag=' -expect_unresolved \\*'\n      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n \"$verstring\" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'\n    fi\n    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'\n    hardcode_libdir_separator=:\n    ;;\n\n  osf4* | osf5*)\t# as osf3* with the addition of -msym flag\n    if test \"$with_gcc\" = yes; then\n      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\\*'\n      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n \"$verstring\" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'\n      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'\n    else\n      allow_undefined_flag=' -expect_unresolved \\*'\n      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n \"$verstring\" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'\n      archive_expsym_cmds='for i in `cat $export_symbols`; do printf \"-exported_symbol \" >> $lib.exp; echo \"\\$i\" >> $lib.exp; done; echo \"-hidden\">> $lib.exp~\n      $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n \"$verstring\" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'\n\n      # cc supports -rpath directly\n      hardcode_libdir_flag_spec='-rpath $libdir'\n    fi\n    hardcode_libdir_separator=:\n    ;;\n\n  sco3.2v5*)\n    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n    hardcode_shlibpath_var=no\n    runpath_var=LD_RUN_PATH\n    hardcode_runpath_var=yes\n    ;;\n\n  solaris*)\n    no_undefined_flag=' -z defs'\n    # $CC -shared without GNU ld will not create a library from C++\n    # object files and a static libstdc++, better avoid it by now\n    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'\n    archive_expsym_cmds='$echo \"{ global:\" > $lib.exp~cat $export_symbols | sed -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~$echo \"local: *; };\" >> $lib.exp~\n\t\t$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'\n    hardcode_libdir_flag_spec='-R$libdir'\n    hardcode_shlibpath_var=no\n    case $host_os in\n    solaris2.[0-5] | solaris2.[0-5].*) ;;\n    *) # Supported since Solaris 2.6 (maybe 2.5.1?)\n      whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;\n    esac\n    link_all_deplibs=yes\n    ;;\n\n  sunos4*)\n    archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'\n    hardcode_libdir_flag_spec='-L$libdir'\n    hardcode_direct=yes\n    hardcode_minus_L=yes\n    hardcode_shlibpath_var=no\n    ;;\n\n  sysv4)\n    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n    runpath_var='LD_RUN_PATH'\n    hardcode_shlibpath_var=no\n    hardcode_direct=no #Motorola manual says yes, but my tests say they lie\n    ;;\n\n  sysv4.3*)\n    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n    hardcode_shlibpath_var=no\n    export_dynamic_flag_spec='-Bexport'\n    ;;\n\n  sysv5*)\n    no_undefined_flag=' -z text'\n    # $CC -shared without GNU ld will not create a library from C++\n    # object files and a static libstdc++, better avoid it by now\n    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'\n    archive_expsym_cmds='$echo \"{ global:\" > $lib.exp~cat $export_symbols | sed -e \"s/\\(.*\\)/\\1;/\" >> $lib.exp~$echo \"local: *; };\" >> $lib.exp~\n\t\t$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'\n    hardcode_libdir_flag_spec=\n    hardcode_shlibpath_var=no\n    runpath_var='LD_RUN_PATH'\n    ;;\n\n  uts4*)\n    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n    hardcode_libdir_flag_spec='-L$libdir'\n    hardcode_shlibpath_var=no\n    ;;\n\n  dgux*)\n    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n    hardcode_libdir_flag_spec='-L$libdir'\n    hardcode_shlibpath_var=no\n    ;;\n\n  sysv4*MP*)\n    if test -d /usr/nec; then\n      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'\n      hardcode_shlibpath_var=no\n      runpath_var=LD_RUN_PATH\n      hardcode_runpath_var=yes\n      ld_shlibs=yes\n    fi\n    ;;\n\n  sysv4.2uw2*)\n    archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'\n    hardcode_direct=yes\n    hardcode_minus_L=no\n    hardcode_shlibpath_var=no\n    hardcode_runpath_var=yes\n    runpath_var=LD_RUN_PATH\n    ;;\n\n  sysv5uw7* | unixware7*)\n    no_undefined_flag='${wl}-z ${wl}text'\n    if test \"$GCC\" = yes; then\n      archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'\n    else\n      archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'\n    fi\n    runpath_var='LD_RUN_PATH'\n    hardcode_shlibpath_var=no\n    ;;\n\n  *)\n    ld_shlibs=no\n    ;;\n  esac\nfi\n\n## Compiler Characteristics: PIC flags, static flags, etc\nif test \"X${ac_cv_prog_cc_pic+set}\" = Xset; then\n  :\nelse\n  ac_cv_prog_cc_pic=\n  ac_cv_prog_cc_shlib=\n  ac_cv_prog_cc_wl=\n  ac_cv_prog_cc_static=\n  ac_cv_prog_cc_no_builtin=\n  ac_cv_prog_cc_can_build_shared=$can_build_shared\n\n  if test \"$with_gcc\" = yes; then\n    ac_cv_prog_cc_wl='-Wl,'\n    ac_cv_prog_cc_static='-static'\n\n    case $host_os in\n    aix*)\n      # All AIX code is PIC.\n      if test \"$host_cpu\" = ia64; then\n        # AIX 5 now supports IA64 processor\n        lt_cv_prog_cc_static='-Bstatic'\n      else\n        lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'\n      fi\n      ;;\n    amigaos*)\n      # FIXME: we need at least 68020 code to build shared libraries, but\n      # adding the `-m68020' flag to GCC prevents building anything better,\n      # like `-m68040'.\n      ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'\n      ;;\n    beos* | irix5* | irix6* | osf3* | osf4* | osf5*)\n      # PIC is the default for these OSes.\n      ;;\n    cygwin* | mingw* | os2*)\n      # This hack is so that the source file can tell whether it is being\n      # built for inclusion in a dll (and should export symbols for example).\n      ac_cv_prog_cc_pic='-DDLL_EXPORT'\n      ;;\n    darwin* | rhapsody*)\n      # PIC is the default on this platform\n      # Common symbols not allowed in MH_DYLIB files\n      lt_cv_prog_cc_pic='-fno-common'\n      ;;\n    *djgpp*)\n      # DJGPP does not support shared libraries at all\n      ac_cv_prog_cc_pic=\n      ;;\n    sysv4*MP*)\n      if test -d /usr/nec; then\n\t ac_cv_prog_cc_pic=-Kconform_pic\n      fi\n      ;;\n    *)\n      ac_cv_prog_cc_pic='-fPIC'\n      ;;\n    esac\n  else\n    # PORTME Check for PIC flags for the system compiler.\n    case $host_os in\n    aix*)\n     # All AIX code is PIC.\n      ac_cv_prog_cc_static=\"$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC\"\n      ;;\n\n    hpux9* | hpux10* | hpux11*)\n      # Is there a better ac_cv_prog_cc_static that works with the bundled CC?\n      ac_cv_prog_cc_wl='-Wl,'\n      ac_cv_prog_cc_static=\"${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive\"\n      ac_cv_prog_cc_pic='+Z'\n      ;;\n\n    irix5* | irix6*)\n      ac_cv_prog_cc_wl='-Wl,'\n      ac_cv_prog_cc_static='-non_shared'\n      # PIC (with -KPIC) is the default.\n      ;;\n\n    cygwin* | mingw* | os2*)\n      # This hack is so that the source file can tell whether it is being\n      # built for inclusion in a dll (and should export symbols for example).\n      ac_cv_prog_cc_pic='-DDLL_EXPORT'\n      ;;\n\n    newsos6)\n      ac_cv_prog_cc_pic='-KPIC'\n      ac_cv_prog_cc_static='-Bstatic'\n      ;;\n\n    osf3* | osf4* | osf5*)\n      # All OSF/1 code is PIC.\n      ac_cv_prog_cc_wl='-Wl,'\n      ac_cv_prog_cc_static='-non_shared'\n      ;;\n\n    sco3.2v5*)\n      ac_cv_prog_cc_pic='-Kpic'\n      ac_cv_prog_cc_static='-dn'\n      ac_cv_prog_cc_shlib='-belf'\n      ;;\n\n    solaris*)\n      ac_cv_prog_cc_pic='-KPIC'\n      ac_cv_prog_cc_static='-Bstatic'\n      ac_cv_prog_cc_wl='-Wl,'\n      ;;\n\n    sunos4*)\n      ac_cv_prog_cc_pic='-PIC'\n      ac_cv_prog_cc_static='-Bstatic'\n      ac_cv_prog_cc_wl='-Qoption ld '\n      ;;\n\n    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)\n      ac_cv_prog_cc_pic='-KPIC'\n      ac_cv_prog_cc_static='-Bstatic'\n      ac_cv_prog_cc_wl='-Wl,'\n      ;;\n\n    uts4*)\n      ac_cv_prog_cc_pic='-pic'\n      ac_cv_prog_cc_static='-Bstatic'\n      ;;\n\n    sysv4*MP*)\n      if test -d /usr/nec ;then\n\tac_cv_prog_cc_pic='-Kconform_pic'\n\tac_cv_prog_cc_static='-Bstatic'\n      fi\n      ;;\n\n    *)\n      ac_cv_prog_cc_can_build_shared=no\n      ;;\n    esac\n  fi\n  case \"$host_os\" in\n      # Platforms which do not suport PIC and -DPIC is meaningless\n      # on them:\n      *djgpp*)\n        ac_cv_prog_cc_pic=\n        ;;\n      *)\n        ac_cv_prog_cc_pic=\"$ac_cv_prog_cc_pic -DPIC\"\n        ;;\n  esac\nfi\n\nneed_lc=yes\nif test \"$enable_shared\" = yes && test \"$with_gcc\" = yes; then\n  case $archive_cmds in\n  *'~'*)\n    # FIXME: we may have to deal with multi-command sequences.\n    ;;\n  '$CC '*)\n    # Test whether the compiler implicitly links with -lc since on some\n    # systems, -lgcc has to come before -lc. If gcc already passes -lc\n    # to ld, don't add -lc before -lgcc.\n    echo $ac_n \"checking whether -lc should be explicitly linked in... $ac_c\" 1>&6\n    if eval \"test \\\"`echo '$''{'ac_cv_archive_cmds_needs_lc'+set}'`\\\" = set\"; then\n      echo $ac_n \"(cached) $ac_c\" 1>&6\n      need_lc=$ac_cv_archive_cmds_needs_lc\n    else\n      $rm conftest*\n      echo \"static int dummy;\" > conftest.$ac_ext\n      if { (eval echo ltcf-c.sh:need_lc: \\\"$ac_compile\\\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then\n\t# Append any warnings to the config.log.\n\tcat conftest.err 1>&5\n\tsoname=conftest\n\tlib=conftest\n\tlibobjs=conftest.$ac_objext\n\tdeplibs=\n\twl=$ac_cv_prog_cc_wl\n\tcompiler_flags=-v\n\tlinker_flags=-v\n\tverstring=\n\toutput_objdir=.\n\tlibname=conftest\n\tsave_allow_undefined_flag=$allow_undefined_flag\n\tallow_undefined_flag=\n\tif { (eval echo ltcf-c.sh:need_lc: \\\"$archive_cmds\\\") 1>&5; (eval $archive_cmds) 2>&1 | grep \" -lc \" 1>&5 ; }; then\n\t  need_lc=no\n\tfi\n\tallow_undefined_flag=$save_allow_undefined_flag\n      else\n\tcat conftest.err 1>&5\n      fi\n    fi\n    $rm conftest*\n    echo \"$ac_t$need_lc\" 1>&6\n    ;;\n  esac\nfi\nac_cv_archive_cmds_needs_lc=$need_lc\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/ltconfig",
    "content": "#! /bin/sh\n\n# ltconfig - Create a system-specific libtool.\n# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001\n# Free Software Foundation, Inc.\n# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996\n#\n# This file is free software; you can redistribute it and/or modify it\n# under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful, but\n# WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n# General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n#\n# As a special exception to the GNU General Public License, if you\n# distribute this file as part of a program that contains a\n# configuration script generated by Autoconf, you may include it under\n# the same distribution terms that you use for the rest of that program.\n\n# A lot of this script is taken from autoconf-2.10.\n\n# Check that we are running under the correct shell.\nSHELL=${CONFIG_SHELL-/bin/sh}\necho=echo\nif test \"X$1\" = X--no-reexec; then\n  # Discard the --no-reexec flag, and continue.\n  shift\nelif test \"X$1\" = X--fallback-echo; then\n  # Avoid inline document here, it may be left over\n  :\nelif test \"X`($echo '\\t') 2>/dev/null`\" = 'X\\t'; then\n  # Yippee, $echo works!\n  :\nelse\n  # Restart under the correct shell.\n  exec \"$SHELL\" \"$0\" --no-reexec ${1+\"$@\"}\nfi\n\nif test \"X$1\" = X--fallback-echo; then\n  # used as fallback echo\n  shift\n  cat <<EOF\n$*\nEOF\n  exit 0\nfi\n\n# Find the correct PATH separator.  Usually this is `:', but\n# DJGPP uses `;' like DOS.\nif test \"X${PATH_SEPARATOR+set}\" != Xset; then\n  UNAME=${UNAME-`uname 2>/dev/null`}\n  case X$UNAME in\n    *-DOS) PATH_SEPARATOR=';' ;;\n    *)     PATH_SEPARATOR=':' ;;\n  esac\nfi\n\n# The HP-UX ksh and POSIX shell print the target directory to stdout\n# if CDPATH is set.\nif test \"X${CDPATH+set}\" = Xset; then CDPATH=:; export CDPATH; fi\n\nif test \"X${echo_test_string+set}\" != Xset; then\n  # find a string as large as possible, as long as the shell can cope with it\n  for cmd in 'sed 50q \"$0\"' 'sed 20q \"$0\"' 'sed 10q \"$0\"' 'sed 2q \"$0\"' 'echo test'; do\n    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...\n    if (echo_test_string=\"`eval $cmd`\") 2>/dev/null &&\n       echo_test_string=\"`eval $cmd`\" &&\n       (test \"X$echo_test_string\" = \"X$echo_test_string\") 2>/dev/null; then\n      break\n    fi\n  done\nfi\n\nif test \"X`($echo '\\t') 2>/dev/null`\" = 'X\\t' &&\n   echo_testing_string=`($echo \"$echo_test_string\") 2>/dev/null` &&\n   test \"X$echo_testing_string\" = \"X$echo_test_string\"; then\n  :\nelse\n  # The Solaris, AIX, and Digital Unix default echo programs unquote\n  # backslashes.  This makes it impossible to quote backslashes using\n  #   echo \"$something\" | sed 's/\\\\/\\\\\\\\/g'\n  #\n  # So, first we look for a working echo in the user's PATH.\n\n  IFS=\"${IFS= \t}\"; save_ifs=\"$IFS\"; IFS=\"${IFS}${PATH_SEPARATOR}\"\n  for dir in $PATH /usr/ucb; do\n    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&\n       test \"X`($dir/echo '\\t') 2>/dev/null`\" = 'X\\t' &&\n       echo_testing_string=`($dir/echo \"$echo_test_string\") 2>/dev/null` &&\n       test \"X$echo_testing_string\" = \"X$echo_test_string\"; then\n      echo=\"$dir/echo\"\n      break\n    fi\n  done\n  IFS=\"$save_ifs\"\n\n  if test \"X$echo\" = Xecho; then\n    # We didn't find a better echo, so look for alternatives.\n    if test \"X`(print -r '\\t') 2>/dev/null`\" = 'X\\t' &&\n       echo_testing_string=`(print -r \"$echo_test_string\") 2>/dev/null` &&\n       test \"X$echo_testing_string\" = \"X$echo_test_string\"; then\n      # This shell has a builtin print -r that does the trick.\n      echo='print -r'\n    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&\n\t test \"X$CONFIG_SHELL\" != X/bin/ksh; then\n      # If we have ksh, try running ltconfig again with it.\n      ORIGINAL_CONFIG_SHELL=\"${CONFIG_SHELL-/bin/sh}\"\n      export ORIGINAL_CONFIG_SHELL\n      CONFIG_SHELL=/bin/ksh\n      export CONFIG_SHELL\n      exec \"$CONFIG_SHELL\" \"$0\" --no-reexec ${1+\"$@\"}\n    else\n      # Try using printf.\n      echo='printf %s\\n'\n      if test \"X`($echo '\\t') 2>/dev/null`\" = 'X\\t' &&\n\t echo_testing_string=`($echo \"$echo_test_string\") 2>/dev/null` &&\n\t test \"X$echo_testing_string\" = \"X$echo_test_string\"; then\n\t# Cool, printf works\n\t:\n      elif echo_testing_string=`(\"$ORIGINAL_CONFIG_SHELL\" \"$0\" --fallback-echo '\\t') 2>/dev/null` &&\n\t   test \"X$echo_testing_string\" = 'X\\t' &&\n\t   echo_testing_string=`(\"$ORIGINAL_CONFIG_SHELL\" \"$0\" --fallback-echo \"$echo_test_string\") 2>/dev/null` &&\n\t   test \"X$echo_testing_string\" = \"X$echo_test_string\"; then\n\tCONFIG_SHELL=\"$ORIGINAL_CONFIG_SHELL\"\n\texport CONFIG_SHELL\n\tSHELL=\"$CONFIG_SHELL\"\n\texport SHELL\n\techo=\"$CONFIG_SHELL $0 --fallback-echo\"\n      elif echo_testing_string=`(\"$CONFIG_SHELL\" \"$0\" --fallback-echo '\\t') 2>/dev/null` &&\n\t   test \"X$echo_testing_string\" = 'X\\t' &&\n\t   echo_testing_string=`(\"$CONFIG_SHELL\" \"$0\" --fallback-echo \"$echo_test_string\") 2>/dev/null` &&\n\t   test \"X$echo_testing_string\" = \"X$echo_test_string\"; then\n\techo=\"$CONFIG_SHELL $0 --fallback-echo\"\n      else\n\t# maybe with a smaller string...\n\tprev=:\n\n\tfor cmd in 'echo test' 'sed 2q \"$0\"' 'sed 10q \"$0\"' 'sed 20q \"$0\"' 'sed 50q \"$0\"'; do\n\t  if (test \"X$echo_test_string\" = \"X`eval $cmd`\") 2>/dev/null; then\n\t    break\n\t  fi\n\t  prev=\"$cmd\"\n\tdone\n\n\tif test \"$prev\" != 'sed 50q \"$0\"'; then\n\t  echo_test_string=`eval $prev`\n\t  \n\t  export echo_test_string\n\t  exec \"${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}}\" \"$0\" ${1+\"$@\"}\n\telse\n\t  # Oops.  We lost completely, so just stick with echo.\n\t  echo=echo\n\tfi\n      fi\n    fi\n  fi\nfi\n\n# Sed substitution that helps us do robust quoting.  It backslashifies\n# metacharacters that are still active within double-quoted strings.\nXsed='sed -e s/^X//'\nsed_quote_subst='s/\\([\\\\\"\\\\`$\\\\\\\\]\\)/\\\\\\1/g'\n\n# Same as above, but do not quote variable references.\ndouble_quote_subst='s/\\([\\\\\"\\\\`\\\\\\\\]\\)/\\\\\\1/g'\n\n# Sed substitution to delay expansion of an escaped shell variable in a\n# double_quote_subst'ed string.\ndelay_variable_subst='s/\\\\\\\\\\\\\\\\\\\\\\$/\\\\\\\\\\\\$/g'\n\n# The name of this program.\nprogname=`$echo \"X$0\" | $Xsed -e 's%^.*/%%'`\n\n# Constants:\nPROGRAM=ltconfig\nPACKAGE=libtool\nVERSION=1.4a\nTIMESTAMP=\" (1.641.2.255 2001/05/22 10:39:30)\"\nac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'\nac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'\nrm=\"rm -f\"\n\nhelp=\"Try \\`$progname --help' for more information.\"\n\n# Global variables:\ndefault_ofile=libtool\ncan_build_shared=yes\nenable_shared=yes\n# All known linkers require a `.a' archive for static linking (except M$VC,\n# which needs '.lib').\nenable_static=yes\nenable_fast_install=yes\nenable_dlopen=unknown\nenable_win32_dll=no\npic_mode=default\nltmain=\nsilent=\nsrcdir=\nac_config_guess=\nac_config_sub=\nhost=\nbuild=NONE\nnonopt=NONE\nofile=\"$default_ofile\"\nverify_host=yes\ntagname=\nwith_gcc=no\nwith_gnu_ld=no\nneed_locks=yes\nac_ext=c\nlibext=a\ncache_file=\nmax_cmd_len=\n\n## Dependencies to place before and after the object being linked:\npredep_objects=\npostdep_objects=\npredeps=\npostdeps=\ncompiler_lib_search_path=\n\n## Link characteristics:\nallow_undefined_flag=\nno_undefined_flag=\nneed_lib_prefix=unknown\nneed_version=unknown\n# when you set need_version to no, make sure it does not cause -set_version\n# flags to be left without arguments\narchive_cmds=\narchive_expsym_cmds=\nold_archive_from_new_cmds=\nold_archive_from_expsyms_cmds=\nstriplib=\nold_striplib=\nexport_dynamic_flag_spec=\nwhole_archive_flag_spec=\nthread_safe_flag_spec=\nhardcode_into_libs=no\nhardcode_libdir_flag_spec=\nhardcode_libdir_separator=\nhardcode_direct=no\nhardcode_minus_L=no\nhardcode_shlibpath_var=unsupported\nrunpath_var=\nlink_all_deplibs=unknown\nalways_export_symbols=no\nexport_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\\''s/.* //'\\'' | sort | uniq > $export_symbols'\n# include_expsyms should be a list of space-separated symbols to be *always*\n# included in the symbol list\ninclude_expsyms=\n# exclude_expsyms can be an egrep regular expression of symbols to exclude\n# it will be wrapped by ` (' and `)$', so one must not match beginning or\n# end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',\n# as well as any symbol that contains `d'.\nexclude_expsyms=\"_GLOBAL_OFFSET_TABLE_\"\n# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out\n# platforms (ab)use it in PIC code, but their linkers get confused if\n# the symbol is explicitly referenced.  Since portable code cannot\n# rely on this symbol name, it's probably fine to never include it in\n# preloaded symbol tables.\nextract_expsyms_cmds=\n\n## Tools:\nold_AR=\"$AR\"\nold_AR_FLAGS=\"$AR_FLAGS\"\nold_CC=\"$CC\"\nold_CFLAGS=\"$CFLAGS\"\nold_CPPFLAGS=\"$CPPFLAGS\"\nold_LDFLAGS=\"$LDFLAGS\"\nold_LIBS=\"$LIBS\"\nold_MAGIC_CMD=\"$MAGIC_CMD\"\nold_LD=\"$LD\"\nold_LN_S=\"$LN_S\"\nold_LTCC=\"$LTCC\"\nold_NM=\"$NM\"\nold_RANLIB=\"$RANLIB\"\nold_STRIP=\"$STRIP\"\nold_AS=\"$AS\"\nold_DLLTOOL=\"$DLLTOOL\"\nold_OBJDUMP=\"$OBJDUMP\"\nold_OBJEXT=\"$OBJEXT\"\nold_EXEEXT=\"$EXEEXT\"\nold_reload_flag=\"$reload_flag\"\nold_deplibs_check_method=\"$deplibs_check_method\"\nold_file_magic_cmd=\"$file_magic_cmd\"\n\n# Parse the command line options.\nargs=\nprev=\nfor option\ndo\n  case $option in\n  -*=*) optarg=`echo \"$option\" | sed 's/[-_a-zA-Z0-9]*=//'` ;;\n  *) optarg= ;;\n  esac\n\n  # If the previous option needs an argument, assign it.\n  if test -n \"$prev\"; then\n    eval \"$prev=\\$option\"\n    prev=\n    continue\n  fi\n\n  case $option in\n  --help) cat <<EOM\nUsage: $progname [OPTION]... LTMAIN [HOST]\n\nGenerate a system-specific libtool script.\n\n    --build                configure for building on BUILD [BUILD=HOST]\n    --debug                enable verbose shell tracing\n    --disable-shared       do not build shared libraries\n    --disable-static       do not build static libraries\n    --disable-fast-install do not optimize for fast installation\n    --enable-dlopen        enable dlopen support\n    --enable-win32-dll     enable building dlls on win32 hosts\n    --help                 display this help and exit\n    --no-verify            do not verify that HOST is a valid host type\n-o, --output=FILE          specify the output file [default=$default_ofile]\n    --quiet                same as \\`--silent'\n    --silent               do not print informational messages\n    --srcdir=DIR           find \\`config.guess' in DIR\n    --version              output version information and exit\n    --add-tag=TAG          append an alternate configuration\n    --with-gcc             assume that the GNU C compiler will be used\n    --with-gnu-ld          assume that the C compiler uses the GNU linker\n    --prefer-pic           try to use only PIC objects\n    --prefer-non-pic       try to use only non-PIC objects\n    --disable-lock         disable file locking\n    --cache-file=FILE      configure cache file\n\nLTMAIN is the \\`ltmain.sh' shell script fragment or \\`ltmain.c' program\nthat provides basic libtool functionality.\n\nHOST is the canonical host system name [default=guessed].\nEOM\n  exit 0\n  ;;\n\n  --build) prev=build ;;\n  --build=*) build=\"$optarg\" ;;\n\n  --debug)\n    echo \"$progname: enabling shell trace mode\"\n    set -x\n    ;;\n\n  --disable-shared) enable_shared=no ;;\n\n  --disable-static) enable_static=no ;;\n\n  --disable-fast-install) enable_fast_install=no ;;\n\n  --enable-dlopen) enable_dlopen=yes ;;\n\n  --enable-win32-dll) enable_win32_dll=yes ;;\n\n  --quiet | --silent) silent=yes ;;\n\n  --srcdir) prev=srcdir ;;\n  --srcdir=*) srcdir=\"$optarg\" ;;\n\n  --no-verify) verify_host=no ;;\n\n  --output | -o) prev=ofile ;;\n  --output=*) ofile=\"$optarg\" ;;\n\n  --version) echo \"$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP\"; exit 0 ;;\n\n  --add-tag) prev=tagname ;;\n  --add-tag=*) tagname=\"$optarg\" ;;\n\n  --with-gcc) with_gcc=yes ;;\n  --with-gnu-ld) with_gnu_ld=yes ;;\n\n  --prefer-pic) pic_mode=yes ;;\n  --prefer-non-pic) pic_mode=no ;;\n\n  --disable-lock) need_locks=no ;;\n\n  --cache-file=*) cache_file=\"$optarg\" ;;\n\n  -*)\n    echo \"$progname: unrecognized option \\`$option'\" 1>&2\n    echo \"$help\" 1>&2\n    exit 1\n    ;;\n\n  *)\n    if test -z \"$ltmain\"; then\n      ltmain=\"$option\"\n    elif test -z \"$host\"; then\n# This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1\n#      if test -n \"`echo $option| sed 's/[-a-z0-9.]//g'`\"; then\n#        echo \"$progname: warning \\`$option' is not a valid host type\" 1>&2\n#      fi\n      host=\"$option\"\n    else\n      echo \"$progname: too many arguments\" 1>&2\n      echo \"$help\" 1>&2\n      exit 1\n    fi ;;\n  esac\ndone\n\nif test -z \"$ltmain\"; then\n  echo \"$progname: you must specify a LTMAIN file\" 1>&2\n  echo \"$help\" 1>&2\n  exit 1\nfi\n\nif test ! -f \"$ltmain\"; then\n  echo \"$progname: \\`$ltmain' does not exist\" 1>&2\n  echo \"$help\" 1>&2\n  exit 1\nfi\n\nif test -n \"$tagname\"; then\n  # Check whether tagname contains only valid characters\n  case `$echo \"X$tagname\" | $Xsed -e 's/[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]//g'` in\n  \"\") ;;\n  *)\n    echo \"$progname: invalid tag name: $tagname\" 1>&2\n    exit 1\n    ;;\n  esac\n\n  if grep \"^### BEGIN LIBTOOL TAG CONFIG: $tagname$\" < \"$ofile\" > /dev/null; then\n    echo \"$progname: tag name $tagname already exists\" 1>&2\n    exit 1\n  fi\n\n  if test ! -f \"$ofile\"; then\n    echo \"$progname: warning: output file \\`$ofile' does not exist\" 1>&2\n  fi\n\n  if test -z \"$LTCC\"; then\n    eval \"`$SHELL $ofile --config | grep '^LTCC='`\"\n    if test -z \"$LTCC\"; then\n      echo \"$progname: warning: output file \\`$ofile' does not look like a libtool script\" 1>&2\n    else\n      echo \"$progname: warning: using \\`LTCC=$LTCC', extracted from \\`$ofile'\" 1>&2\n    fi\n  fi\nfi\n\n# Quote any args containing shell metacharacters.\nltconfig_args=\nfor arg\ndo\n  case $arg in\n  *\" \"*|*\"\t\"*|*[\\[\\]\\~\\#\\$\\^\\&\\*\\(\\)\\{\\}\\\\\\|\\;\\<\\>\\?]*)\n  ltconfig_args=\"$ltconfig_args '$arg'\" ;;\n  *) ltconfig_args=\"$ltconfig_args $arg\" ;;\n  esac\ndone\n\n# A relevant subset of AC_INIT.\n\n# File descriptor usage:\n# 0 standard input\n# 1 file creation\n# 2 errors and warnings\n# 3 some systems may open it to /dev/tty\n# 4 used on the Kubota Titan\n# 5 compiler messages saved in config.log\n# 6 checking for... messages and results\nif test \"$silent\" = yes; then\n  exec 6>/dev/null\nelse\n  exec 6>&1\nfi\nexec 5>>./config.log\n\n# NLS nuisances.\n# Only set LANG and LC_ALL to C if already set.\n# These must not be set unconditionally because not all systems understand\n# e.g. LANG=C (notably SCO).\nif test \"X${LC_ALL+set}\" = Xset; then LC_ALL=C; export LC_ALL; fi\nif test \"X${LANG+set}\"   = Xset; then LANG=C;   export LANG;   fi\n\nif test -n \"$cache_file\" && test -r \"$cache_file\" && test -f \"$cache_file\"; then\n  echo \"loading cache $cache_file within ltconfig\"\n  . $cache_file\nfi\n\nif (echo \"testing\\c\"; echo 1,2,3) | grep c >/dev/null; then\n  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.\n  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then\n    ac_n= ac_c='\n' ac_t='\t'\n  else\n    ac_n=-n ac_c= ac_t=\n  fi\nelse\n  ac_n= ac_c='\\c' ac_t=\nfi\n\nif test -z \"$srcdir\"; then\n  # Assume the source directory is the same one as the path to LTMAIN.\n  srcdir=`$echo \"X$ltmain\" | $Xsed -e 's%/[^/]*$%%'`\n  test \"$srcdir\" = \"$ltmain\" && srcdir=.\nfi\n\ntrap \"$rm conftest*; exit 1\" 1 2 15\nif test \"$verify_host\" = yes; then\n  # Check for config.guess and config.sub.\n  ac_aux_dir=\n  for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do\n    if test -f $ac_dir/config.guess; then\n      ac_aux_dir=$ac_dir\n      break\n    fi\n  done\n  if test -z \"$ac_aux_dir\"; then\n    echo \"$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../..\" 1>&2\n    echo \"$help\" 1>&2\n    exit 1\n  fi\n  ac_config_guess=$ac_aux_dir/config.guess\n  ac_config_sub=$ac_aux_dir/config.sub\n\n  # Make sure we can run config.sub.\n  if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then :\n  else\n    echo \"$progname: cannot run $ac_config_sub\" 1>&2\n    echo \"$help\" 1>&2\n    exit 1\n  fi\n\n  echo $ac_n \"checking host system type\"\"... $ac_c\" 1>&6\n\n  host_alias=$host\n  case $host_alias in\n  \"\")\n    # Force config.guess to use the C compiler.\n    # CC_FOR_BUILD overrides the CC variable in config.guess but I had\n    # problems with it so do it this way for now.\n    CC=\"$LTCC\"\n\n    if host_alias=`$SHELL $ac_config_guess`; then :\n    else\n      echo \"$progname: cannot guess host type; you must specify one\" 1>&2\n      echo \"$help\" 1>&2\n      exit 1\n    fi\n\n    # Restore the C compiler.\n    CC=\"$old_CC\"\n    ;;\n  esac\n  host=`$SHELL $ac_config_sub $host_alias`\n  echo \"$ac_t$host\" 1>&6\n\n  # Make sure the host verified.\n  test -z \"$host\" && exit 1\n\n  # Check for the build system type\n  echo $ac_n \"checking build system type... $ac_c\" 1>&6\n\n  build_alias=$build\n  case $build_alias in\n  NONE)\n    case $nonopt in\n    NONE) build_alias=$host_alias ;;\n    *) build_alias=$nonopt ;;\n    esac ;;\n  esac\n\n  build=`$SHELL $ac_config_sub $build_alias`\n  build_cpu=`echo $build | sed 's/^\\([^-]*\\)-\\([^-]*\\)-\\(.*\\)$/\\1/'`\n  build_vendor=`echo $build | sed 's/^\\([^-]*\\)-\\([^-]*\\)-\\(.*\\)$/\\2/'`\n  build_os=`echo $build | sed 's/^\\([^-]*\\)-\\([^-]*\\)-\\(.*\\)$/\\3/'`\n  echo \"$ac_t\"\"$build\" 1>&6\n\nelif test -z \"$host\"; then\n  echo \"$progname: you must specify a host type if you use \\`--no-verify'\" 1>&2\n  echo \"$help\" 1>&2\n  exit 1\nelse\n  host_alias=$host\n  build_alias=$host_alias\n  build=$host\nfi\n\nif test x\"$host\" != x\"$build\"; then\n  ac_tool_prefix=${host_alias}-\nelse\n  ac_tool_prefix=\nfi\n\nhost_cpu=`echo $host | sed 's/^\\([^-]*\\)-\\([^-]*\\)-\\(.*\\)$/\\1/'`\nhost_vendor=`echo $host | sed 's/^\\([^-]*\\)-\\([^-]*\\)-\\(.*\\)$/\\2/'`\nhost_os=`echo $host | sed 's/^\\([^-]*\\)-\\([^-]*\\)-\\(.*\\)$/\\3/'`\n\n# Transform linux* to *-*-linux-gnu*, to support old configure scripts.\ncase $host_os in\nlinux-gnu*) ;;\nlinux*) host=`echo $host | sed 's/^\\(.*-.*-linux\\)\\(.*\\)$/\\1-gnu\\2/'`\nesac\n\ncase $host_os in\naix3*)\n  # AIX sometimes has problems with the GCC collect2 program.  For some\n  # reason, if we set the COLLECT_NAMES environment variable, the problems\n  # vanish in a puff of smoke.\n  if test \"X${COLLECT_NAMES+set}\" != Xset; then\n    COLLECT_NAMES=\n    export COLLECT_NAMES\n  fi\n  ;;\nesac\n\n# Determine commands to create old-style static archives.\nold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'\nold_postinstall_cmds='chmod 644 $oldlib'\nold_postuninstall_cmds=\n\nif test -n \"$RANLIB\"; then\n  old_archive_cmds=\"$old_archive_cmds~\\$RANLIB \\$oldlib\"\n  old_postinstall_cmds=\"\\$RANLIB \\$oldlib~$old_postinstall_cmds\"\nfi\n\n# Source the script associated with the $tagname tag configuration.\nif test -n \"$tagname\"; then\n  . $ltmain\nelse\n  # FIXME:  We should use a variable here\n  # Configure for a C compiler\n  . $srcdir/ltcf-c.sh\nfi\n\n# Set sane defaults for various variables\ntest -z \"$AR\" && AR=ar\ntest -z \"$AR_FLAGS\" && AR_FLAGS=cru\ntest -z \"$AS\" && AS=as\ntest -z \"$CC\" && CC=cc\ntest -z \"$DLLTOOL\" && DLLTOOL=dlltool\ntest -z \"$MAGIC_CMD\" && MAGIC_CMD=file\ntest -z \"$LD\" && LD=ld\ntest -z \"$LN_S\" && LN_S=\"ln -s\"\ntest -z \"$NM\" && NM=nm\ntest -z \"$OBJDUMP\" && OBJDUMP=objdump\ntest -z \"$RANLIB\" && RANLIB=:\ntest -z \"$STRIP\" && STRIP=:\ntest -z \"$objext\" && objext=o\n\necho $ac_n \"checking for objdir... $ac_c\" 1>&6\nrm -f .libs 2>/dev/null\nmkdir .libs 2>/dev/null\nif test -d .libs; then\n  objdir=.libs\nelse\n  # MS-DOS does not allow filenames that begin with a dot.\n  objdir=_libs\nfi\nrmdir .libs 2>/dev/null\necho \"$ac_t$objdir\" 1>&6\n\n# If no C compiler was specified, use CC.\nLTCC=${LTCC-\"$CC\"}\n\n# Allow CC to be a program name with arguments.\nset dummy $CC\ncompiler=\"$2\"\n\n# We assume here that the value for ac_cv_prog_cc_pic will not be cached\n# in isolation, and that seeing it set (from the cache) indicates that\n# the associated values are set (in the cache) correctly too.\necho $ac_n \"checking for $compiler option to produce PIC... $ac_c\" 1>&6\necho \"$progname:678:checking for $compiler option to produce PIC\" 1>&5\n\nif test -z \"$ac_cv_prog_cc_pic\"; then\n  echo \"$ac_t\"none 1>&6\nelse\n  echo \"$ac_t\"\"$ac_cv_prog_cc_pic\" 1>&6\n\n  # Check to make sure the pic_flag actually works.\n  echo $ac_n \"checking if $compiler PIC flag $ac_cv_prog_cc_pic works... $ac_c\" 1>&6\n  echo \"$progname:687:checking that $compiler PIC flag $ac_cv_prog_cc_pic works.\" 1>&5\n  if test \"X${ac_cv_prog_cc_pic_works+set}\" = Xset && \\\n     test \"X${ac_cv_prog_cc_pic_works}\" != X; then\n    echo $ac_n \"(cached) $ac_c\" 1>&6\n  else\n    ac_cv_prog_cc_pic_works=yes\n    $rm conftest*\n    echo $lt_simple_compile_test_code > conftest.$ac_ext\n    save_CFLAGS=\"$CFLAGS\"\n    CFLAGS=\"$CFLAGS $ac_cv_prog_cc_pic -DPIC\"\n    if { (eval echo $progname:697: \\\"$ac_compile\\\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then\n      # Append any warnings to the config.log.\n      cat conftest.err 1>&5\n\n      case $host_os in\n      hpux9* | hpux10* | hpux11*)\n\t# On HP-UX, both CC and GCC only warn that PIC is supported... then\n\t# they create non-PIC objects.  So, if there were any warnings, we\n\t# assume that PIC is not supported.\n\tif test -s conftest.err; then\n\t  ac_cv_prog_cc_pic_works=no\n\t  ac_cv_prog_cc_can_build_shared=no\n\t  ac_cv_prog_cc_pic=\n\telse\n\t  ac_cv_prog_cc_pic_works=yes\n\t  ac_cv_prog_cc_pic=\" $ac_cv_prog_cc_pic\"\n\tfi\n\t;;\n      *)\n\tac_cv_prog_cc_pic_works=yes\n\tac_cv_prog_cc_pic=\" $ac_cv_prog_cc_pic\"\n\t;;\n      esac\n    else\n      # Append any errors to the config.log.\n      cat conftest.err 1>&5\n      ac_cv_prog_cc_pic_works=no\n      ac_cv_prog_cc_can_build_shared=no\n      ac_cv_prog_cc_pic=\n    fi\n    CFLAGS=\"$save_CFLAGS\"\n    $rm conftest*\n  fi\n  # Belt *and* braces to stop my trousers falling down:\n  if test \"X$ac_cv_prog_cc_pic_works\" = Xno; then\n    ac_cv_prog_cc_pic=\n    ac_cv_prog_cc_can_build_shared=no\n  fi\n  echo \"$ac_t\"\"$ac_cv_prog_cc_pic_works\" 1>&6\nfi\n\n# Check for any special shared library compilation flags.\nif test -n \"$ac_cv_prog_cc_shlib\"; then\n  echo \"$progname: warning: \\`$CC' requires \\`$ac_cv_prog_cc_shlib' to build shared libraries\" 1>&2\n  if echo \"$old_CC $old_CFLAGS \" | egrep -e \"[ \t]$ac_cv_prog_cc_shlib[ \t]\" >/dev/null; then :\n  else\n    echo \"$progname: add \\`$ac_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure\" 1>&2\n    ac_cv_prog_cc_can_build_shared=no\n  fi\nfi\n\necho $ac_n \"checking if $compiler static flag $ac_cv_prog_cc_static works... $ac_c\" 1>&6\necho \"$progname:749: checking if $compiler static flag $ac_cv_prog_cc_static works\" >&5\nif test \"X${ac_cv_prog_cc_static_works+set}\" = Xset && \\\n   test \"X${ac_cv_prog_cc_static_works}\" != X; then\n  echo $ac_n \"(cached) $ac_c\" 1>&6\nelse\n  $rm conftest*\n  echo $lt_simple_link_test_code > conftest.$ac_ext\n  save_LDFLAGS=\"$LDFLAGS\"\n  LDFLAGS=\"$LDFLAGS $ac_cv_prog_cc_static\"\n  if { (eval echo $progname:758: \\\"$ac_link\\\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then\n    ac_cv_prog_cc_static_works=yes\n  else\n    ac_cv_prog_cc_static_works=no\n    ac_cv_prog_cc_static=\n  fi\n  LDFLAGS=\"$save_LDFLAGS\"\n  $rm conftest*\nfi\n# Belt *and* braces to stop my trousers falling down:\nif test \"X$ac_cv_prog_cc_static_works\" = Xno; then\n  ac_cv_prog_cc_static=\nfi\necho \"$ac_t\"\"$ac_cv_prog_cc_static_works\" 1>&6\npic_flag=\"$ac_cv_prog_cc_pic\"\nspecial_shlib_compile_flags=\"$ac_cv_prog_cc_shlib\"\nwl=\"$ac_cv_prog_cc_wl\"\nlink_static_flag=\"$ac_cv_prog_cc_static\"\nno_builtin_flag=\"$ac_cv_prog_cc_no_builtin\"\ncan_build_shared=\"$ac_cv_prog_cc_can_build_shared\"\n\n# find the maximum length of command line arguments\necho \"$progname:780: finding the maximum length of command line arguments\" 1>&5\necho $ac_n \"finding the maximum length of command line arguments... $ac_c\" 1>&6\nif test \"${lt_cv_sys_max_cmd_len+set}\" = set; then\n  echo $ac_n \"(cached) $ac_c\" 1>&6\nelse\n  i=0\n  testring=\"ABCD\"\n  # If test is not a shell built-in, we'll probably end up computing a\n  # maximum length that is only half of the actual maximum length, but\n  # we can't tell.\n  while test \"X\"`$CONFIG_SHELL $0 --fallback-echo \"X$testring\" 2>/dev/null` \\\n             = \"XX$testring\" &&\n          new_result=`expr \"X$testring\" : \".*\" 2>&1` &&\n          lt_cv_sys_max_cmd_len=$new_result &&\n          test $i != 18 # 1 MB should be enough\n  do\n    i=`expr $i + 1`\n    testring=$testring$testring\n  done\n  testring=\n  # add a significant safety factor because C++ compilers can tack on massive amounts\n  # of additional arguments before passing them to the linker.  1/4 should be good.\n  len=`expr $lt_cv_sys_max_cmd_len \\/ 4`\n  lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len - $len`\nfi\necho \"$progname:@lineno@: result: $lt_cv_sys_max_cmd_len\" 1>&5\necho \"${ac_t}$lt_cv_sys_max_cmd_len\" 1>&6\n\nif test -n $lt_cv_sys_max_cmd_len ; then\n  max_cmd_len=$lt_cv_sys_max_cmd_len\nelse\n  max_cmd_len=none\nfi\n\n# Check to see if options -o and -c are simultaneously supported by compiler\necho $ac_n \"checking if $compiler supports -c -o file.$objext... $ac_c\" 1>&6\nif test \"${lt_cv_compiler_c_o+set}\" = set; then\n  echo $ac_n \"(cached) $ac_c\" 1>&6\nelse\n  $rm -r conftest 2>/dev/null\n  mkdir conftest\n  cd conftest\n  $rm conftest*\n  echo $lt_simple_compile_test_code > conftest.$ac_ext\n  mkdir out\n  # According to Tom Tromey, Ian Lance Taylor reported there are C compilers\n  # that will create temporary files in the current directory regardless of\n  # the output directory.  Thus, making CWD read-only will cause this test\n  # to fail, enabling locking or at least warning the user not to do parallel\n  # builds.\n  chmod -w .\n  save_CFLAGS=\"$CFLAGS\"\n  CFLAGS=\"$CFLAGS -o out/conftest2.$objext\"\n  echo \"$progname:833: checking if $compiler supports -c -o file.$objext\" >&5\n  if { (eval echo $progname:834: \\\"$ac_compile\\\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$objext; then\n\n    # The compiler can only warn and ignore the option if not recognized\n    # So say no if there are warnings\n      if test -s out/conftest.err; then\n        lt_cv_compiler_c_o=no\n      else\n        lt_cv_compiler_c_o=yes\n      fi\n  else\n    # Append any errors to the config.log.\n    cat out/conftest.err 1>&5\n    lt_cv_compiler_c_o=no\n  fi\n  CFLAGS=\"$save_CFLAGS\"\n  chmod u+w .\n  $rm conftest* out/*\n  rmdir out\n  cd ..\n  rmdir conftest\n  $rm -r conftest 2>/dev/null\nfi\ncompiler_c_o=$lt_cv_compiler_c_o\necho \"${ac_t}$compiler_c_o\" 1>&6\n\n# Check to see if we can do hard links to lock some files if needed\nhard_links=\"nottested\"\nif test \"$compiler_c_o\" = no && test \"$need_locks\" != no; then\n  # do not overwrite the value of need_locks provided by the user\n  echo $ac_n \"checking if we can lock with hard links... $ac_c\" 1>&6\n  hard_links=yes\n  $rm conftest*\n  ln conftest.a conftest.b 2>/dev/null && hard_links=no\n  touch conftest.a\n  ln conftest.a conftest.b 2>&5 || hard_links=no\n  ln conftest.a conftest.b 2>/dev/null && hard_links=no\n  echo \"$ac_t$hard_links\" 1>&6\n  $rm conftest*\n  if test \"$hard_links\" = no; then\n    echo \"*** WARNING: \\`$CC' does not support \\`-c -o', so \\`make -j' may be unsafe\" >&2\n    need_locks=warn\n  fi\nelse\n  need_locks=no\nfi\n\nif test \"$with_gcc\" = yes; then\n  # Check to see if options -fno-rtti -fno-exceptions are supported by compiler\n  echo $ac_n \"checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c\" 1>&6\n  $rm conftest*\n  echo $lt_simple_compile_test_code > conftest.$ac_ext\n  save_CFLAGS=\"$CFLAGS\"\n  CFLAGS=\"$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext\"\n  echo \"$progname:887: checking if $compiler supports -fno-rtti -fno-exceptions\" >&5\n  if { (eval echo $progname:888: \\\"$ac_compile\\\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then\n\n    # The compiler can only warn and ignore the option if not recognized\n    # So say no if there are warnings\n      if test -s conftest.err; then\n\techo \"$ac_t\"no 1>&6\n\tcompiler_rtti_exceptions=no\n      else\n\techo \"$ac_t\"yes 1>&6\n\tcompiler_rtti_exceptions=yes\n      fi\n  else\n    # Append any errors to the config.log.\n    cat conftest.err 1>&5\n    compiler_rtti_exceptions=no\n    echo \"$ac_t\"no 1>&6\n  fi\n  CFLAGS=\"$save_CFLAGS\"\n  $rm conftest*\n\n  if test \"$compiler_rtti_exceptions\" = \"yes\"; then\n    no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'\n  else\n    no_builtin_flag=' -fno-builtin'\n  fi\n  \nfi\n\n# See if the linker supports building shared libraries.\necho $ac_n \"checking whether the linker ($LD) supports shared libraries... $ac_c\" 1>&6\n\necho \"$ac_t$ld_shlibs\" 1>&6\ntest \"$ld_shlibs\" = no && can_build_shared=no\n\n# Check hardcoding attributes.\necho $ac_n \"checking how to hardcode library paths into programs... $ac_c\" 1>&6\nhardcode_action=\nif test -n \"$hardcode_libdir_flag_spec\" || \\\n   test -n \"$runpath_var\"; then\n\n  # We can hardcode non-existant directories.\n  if test \"$hardcode_direct\" != no &&\n     # If the only mechanism to avoid hardcoding is shlibpath_var, we\n     # have to relink, otherwise we might link with an installed library\n     # when we should be linking with a yet-to-be-installed one\n     ## test \"$hardcode_shlibpath_var\" != no &&\n     test \"$hardcode_minus_L\" != no; then\n    # Linking always hardcodes the temporary library directory.\n    hardcode_action=relink\n  else\n    # We can link without hardcoding, and we can hardcode nonexisting dirs.\n    hardcode_action=immediate\n  fi\nelse\n  # We cannot hardcode anything, or else we can only hardcode existing\n  # directories.\n  hardcode_action=unsupported\nfi\necho \"$ac_t$hardcode_action\" 1>&6\n\necho $ac_n \"checking whether stripping libraries is possible... $ac_c\" 1>&6\nif test -n \"$STRIP\" && $STRIP -V 2>&1 | grep \"GNU strip\" >/dev/null; then\n  test -z \"$old_striplib\" && old_striplib=\"$STRIP --strip-debug\"\n  test -z \"$striplib\" && striplib=\"$STRIP --strip-unneeded\"\n  echo \"${ac_t}yes\" 1>&6\nelse\n  echo \"${ac_t}no\" 1>&6\nfi\n\ncase $reload_flag in\n\"\" | \" \"*) ;;\n*) reload_flag=\" $reload_flag\" ;;\nesac\nreload_cmds='$LD$reload_flag -o $output$reload_objs'\ntest -z \"$deplibs_check_method\" && deplibs_check_method=unknown\n\n# PORTME Fill in your ld.so characteristics\nlibrary_names_spec=\nlibname_spec='lib$name'\nsoname_spec=\npostinstall_cmds=\npostuninstall_cmds=\nfinish_cmds=\nfinish_eval=\nshlibpath_var=\nshlibpath_overrides_runpath=unknown\nversion_type=none\ndynamic_linker=\"$host_os ld.so\"\nsys_lib_dlsearch_path_spec=\"/lib /usr/lib\"\nsys_lib_search_path_spec=\"/lib /usr/lib /usr/local/lib\"\n\necho $ac_n \"checking dynamic linker characteristics... $ac_c\" 1>&6\ncase $host_os in\naix3*)\n  version_type=linux\n  library_names_spec='${libname}${release}.so$versuffix $libname.a'\n  shlibpath_var=LIBPATH\n\n  # AIX 3 has no versioning support, so we append a major version to the name.\n  soname_spec='${libname}${release}.so$major'\n  ;;\n\naix4* | aix5*)\n  if test \"$host_cpu\" = ia64; then\n    # AIX 5 supports IA64\n    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'\n    shlibpath_var=LD_LIBRARY_PATH\n  else\n    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct\n    # soname into executable. Probably we can add versioning support to\n    # collect2, so additional links can be useful in future.\n    # We preserve .a as extension for shared libraries though AIX4.2\n    # and later linker supports .so\n    if test \"$aix_use_runtimelinking\" = yes; then\n      # If using run time linking (on AIX 4.2 or later) use lib<name>.so instead of\n      # lib<name>.a to let people know that these are not typical AIX shared libraries.\n      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'\n    else\n      # We preserve .a as extension for shared libraries though AIX4.2\n      # and later when we are not doing run time linking.\n      library_names_spec='${libname}${release}.a $libname.a'\n      soname_spec='${libname}${release}.so$major.o'\n    fi\n    # If we're using GNU nm, then we don't want the \"-C\" option.\n    # -C means demangle to AIX nm, but means don't demangle with GNU nm\n    if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then\n      export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\\''{ if (((\\$2 == \"T\") || (\\$2 == \"D\") || (\\$2 == \"B\")) && (substr(\\$3,1,1) != \".\")) { print \\$3 } }'\\'' | sort -u > $export_symbols'\n    else\n      export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\\''{ if (((\\$2 == \"T\") || (\\$2 == \"D\") || (\\$2 == \"B\")) && (substr(\\$3,1,1) != \".\")) { print \\$3 } }'\\'' | sort -u > $export_symbols'\n    fi\n    shlibpath_var=LIBPATH\n    deplibs_check_method=pass_all\n    case $host_os in\n    aix4 | aix4.[01] | aix4.[01].*)\n      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'\n\t   echo ' yes '\n\t   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then\n\t:\n      else\n\t# With GCC up to 2.95.x, collect2 would create an import file\n\t# for dependence libraries.  The import file would start with\n\t# the line `#! .'.  This would cause the generated library to\n\t# depend on `.', always an invalid library.  This was fixed in\n\t# development snapshots of GCC prior to 3.0.\n        can_build_shared=no\n      fi\n      ;;\n    esac\n  fi\n  ;;\n\namigaos*)\n  library_names_spec='$libname.ixlibrary $libname.a'\n  # Create ${libname}_ixlibrary.a entries in /sys/libs.\n  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo \"X$lib\" | $Xsed -e '\\''s%^.*/\\([^/]*\\)\\.ixlibrary$%\\1%'\\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show \"(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)\"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'\n  ;;\n\nbeos*)\n  library_names_spec='${libname}.so'\n  dynamic_linker=\"$host_os ld.so\"\n  shlibpath_var=LIBRARY_PATH\n  lt_cv_dlopen=\"load_add_on\"\n  lt_cv_dlopen_libs=\n  lt_cv_dlopen_self=yes\n  ;;\n\nbsdi4*)\n  version_type=linux\n  need_version=no\n  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'\n  soname_spec='${libname}${release}.so$major'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  sys_lib_search_path_spec=\"/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib\"\n  sys_lib_dlsearch_path_spec=\"/shlib /usr/lib /usr/local/lib\"\n  export_dynamic_flag_spec=-rdynamic\n  # the default ld.so.conf also contains /usr/contrib/lib and\n  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow\n  # libtool to hard-code these into programs\n  ;;\n\ncygwin* | mingw* | pw32*)\n  version_type=windows\n  need_version=no\n  need_lib_prefix=no\n  case $with_gcc,$host_os in\n  yes,cygwin*)\n    library_names_spec='$libname.dll.a'\n    soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll'\n    postinstall_cmds='dlpath=`bash 2>&1 -c '\\''. $dir/${file}i; echo \\$dlname'\\''`~\n      dldir=$destdir/`dirname \\$dlpath`~\n      test -d \\$dldir || mkdir -p \\$dldir~\n      $install_prog .libs/$dlname \\$dldir/$dlname'\n    postuninstall_cmds='dldll=`bash 2>&1 -c '\\''. $file; echo \\$dlname'\\''`~\n      dlpath=$dir/\\$dldll; $rm \\$dlpath'\n    ;;\n  yes,mingw*)\n    library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'\n    sys_lib_search_path_spec=`$CC -print-search-dirs | grep \"^libraries:\" | sed -e \"s/^libraries://\" -e \"s/;/ /g\"`\n    ;;\n  yes,pw32*)\n    library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'\n;;\n  *)\n    library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'\n    ;;\n  esac\n  dynamic_linker='Win32 ld.exe'\n  # FIXME: first we should search . and the directory the executable is in\n  shlibpath_var=PATH\n  lt_cv_dlopen=\"LoadLibrary\"\n  lt_cv_dlopen_libs=\n  ;;\n\ndarwin* | rhapsody*)\n  dynamic_linker=\"$host_os dyld\"\n  version_type=darwin\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}${versuffix}.`test .$module = .yes && echo so || echo dylib` ${libname}${release}${major}.$`test .$module = .yes && echo so || echo dylib` ${libname}.`test .$module = .yes && echo so || echo dylib`'\n  soname_spec='${libname}${release}${major}.`test .$module = .yes && echo so || echo dylib`'\n  shlibpath_overrides_runpath=yes\n  shlibpath_var=DYLD_LIBRARY_PATH\n  ;;\n\nfreebsd1*)\n  dynamic_linker=no\n  ;;\n\nfreebsd*)\n  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`\n  version_type=freebsd-$objformat\n  case $version_type in\n    freebsd-elf*)\n      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'\n      need_version=no\n      need_lc=no\n      need_lib_prefix=no\n      ;;\n    freebsd-*)\n      library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'\n      need_version=yes\n      ;;\n  esac\n  shlibpath_var=LD_LIBRARY_PATH\n  case $host_os in\n  freebsd2*)\n    shlibpath_overrides_runpath=yes\n    ;;\n  *)\n    shlibpath_overrides_runpath=no\n    hardcode_into_libs=yes\n    ;;\n  esac\n  ;;\n\ngnu*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'\n  soname_spec='${libname}${release}.so$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  hardcode_into_libs=yes\n  ;;\n\nhpux9* | hpux10* | hpux11*)\n  # Give a soname corresponding to the major version so that dld.sl refuses to\n  # link against other versions.\n  dynamic_linker=\"$host_os dld.sl\"\n  version_type=sunos\n  need_lib_prefix=no\n  need_version=no\n  shlibpath_var=SHLIB_PATH\n  shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH\n  library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'\n  soname_spec='${libname}${release}.sl$major'\n  # HP-UX runs *really* slowly unless shared libraries are mode 555.\n  postinstall_cmds='chmod 555 $lib'\n  ;;\n\nirix5* | irix6*)\n  version_type=irix\n  need_lib_prefix=no\n  need_version=no\n  soname_spec='${libname}${release}.so$major'\n  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'\n  case $host_os in\n  irix5*)\n    libsuff= shlibsuff=\n    ;;\n  *)\n    case $LD in # libtool.m4 will add one of these switches to LD\n    *-32|*\"-32 \") libsuff= shlibsuff= libmagic=32-bit;;\n    *-n32|*\"-n32 \") libsuff=32 shlibsuff=N32 libmagic=N32;;\n    *-64|*\"-64 \") libsuff=64 shlibsuff=64 libmagic=64-bit;;\n    *) libsuff= shlibsuff= libmagic=never-match;;\n    esac\n    ;;\n  esac\n  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH\n  shlibpath_overrides_runpath=no\n  sys_lib_search_path_spec=\"/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}\"\n  sys_lib_dlsearch_path_spec=\"/usr/lib${libsuff} /lib${libsuff}\"\n  ;;\n\n# No shared lib support for Linux oldld, aout, or coff.\nlinux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)\n  dynamic_linker=no\n  ;;\n\n# This must be Linux ELF.\nlinux-gnu*)\n  version_type=sunos\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'\n  soname_spec='${libname}${release}.so$major'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -n $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=no\n  # This implies no fast_install, which is unacceptable.\n  # Some rework will be needed to allow for fast_install\n  # before this can be enabled.\n  hardcode_into_libs=yes\n\n  # We used to test for /lib/ld.so.1 and disable shared libraries on\n  # powerpc, because MkLinux only supported shared libraries with the\n  # GNU dynamic linker.  Since this was broken with cross compilers,\n  # most powerpc-linux boxes support dynamic linking these days and\n  # people can always --disable-shared, the test was removed, and we\n  # assume the GNU/Linux dynamic linker is in use.\n  dynamic_linker='GNU/Linux ld.so'\n  ;;\n\nnetbsd*)\n  need_lib_prefix=no\n  need_version=no\n  version_type=sunos\n  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then\n    library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'\n    finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -m $libdir'\n    dynamic_linker='NetBSD (a.out) ld.so'\n  else\n    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'\n    soname_spec='${libname}${release}.so$major'\n    dynamic_linker='NetBSD ld.elf_so'\n  fi\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  hardcode_into_libs=yes\n  sys_lib_dlsearch_path_spec=\"/usr/lib\"\n  sys_lib_search_path_spec=\"/usr/lib\"\n  ;;\n\nnewsos6)\n  version_type=linux\n  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  ;;\n\nopenbsd*)\n  version_type=sunos\n  if test \"$with_gnu_ld\" = yes; then\n    need_lib_prefix=no\n    need_version=no\n  fi\n  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'\n  finish_cmds='PATH=\"\\$PATH:/sbin\" ldconfig -m $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  ;;\n\nos2*)\n  libname_spec='$name'\n  need_lib_prefix=no\n  library_names_spec='$libname.dll $libname.a'\n  dynamic_linker='OS/2 ld.exe'\n  shlibpath_var=LIBPATH\n  ;;\n\nosf3* | osf4* | osf5*)\n  version_type=osf\n  need_version=no\n  soname_spec='${libname}${release}.so'\n  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'\n  shlibpath_var=LD_LIBRARY_PATH\n  sys_lib_search_path_spec=\"/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib\"\n  sys_lib_dlsearch_path_spec=\"$sys_lib_search_path_spec\"\n  ;;\n\nsco3.2v5*)\n  version_type=osf\n  soname_spec='${libname}${release}.so$major'\n  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'\n  shlibpath_var=LD_LIBRARY_PATH\n  ;;\n\nsolaris*)\n  version_type=sunos\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'\n  soname_spec='${libname}${release}.so$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  hardcode_into_libs=yes\n  # ldd complains unless libraries are executable\n  postinstall_cmds='chmod +x $lib'\n  ;;\n\nsunos4*)\n  version_type=sunos\n  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'\n  finish_cmds='PATH=\"\\$PATH:/usr/etc\" ldconfig $libdir'\n  shlibpath_var=LD_LIBRARY_PATH\n  shlibpath_overrides_runpath=yes\n  if test \"$with_gnu_ld\" = yes; then\n    need_lib_prefix=no\n  fi\n  need_version=yes\n  ;;\n\nsysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)\n  version_type=linux\n  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'\n  soname_spec='${libname}${release}.so$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  case $host_vendor in\n    motorola)\n      need_lib_prefix=no\n      need_version=no\n      shlibpath_overrides_runpath=no\n      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'\n      ;;\n  esac\n  ;;\n\nuts4*)\n  version_type=linux\n  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'\n  soname_spec='${libname}${release}.so$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  ;;\n\ndgux*)\n  version_type=linux\n  need_lib_prefix=no\n  need_version=no\n  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'\n  soname_spec='${libname}${release}.so$major'\n  shlibpath_var=LD_LIBRARY_PATH\n  ;;\n\nsysv4*MP*)\n  if test -d /usr/nec ;then\n    version_type=linux\n    library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'\n    soname_spec='$libname.so.$major'\n    shlibpath_var=LD_LIBRARY_PATH\n  fi\n  ;;\n\n*)\n  dynamic_linker=no\n  ;;\nesac\necho \"$ac_t$dynamic_linker\" 1>&6\ntest \"$dynamic_linker\" = no && can_build_shared=no\n\n# Check for command to grab the raw symbol name followed by C symbol from nm.\necho $ac_n \"checking command to parse $NM output... $ac_c\" 1>&6\n\n# These are sane defaults that work on at least a few old systems.\n# [They come from Ultrix.  What could be older than Ultrix?!! ;)]\n\n# Character class describing NM global symbol codes.\nsymcode='[BCDEGRST]'\n\n# Regexp to match symbols that can be accessed directly from C.\nsympat='\\([_A-Za-z][_A-Za-z0-9]*\\)'\n\n# Transform the above into a raw symbol and a C symbol.\nsymxfrm='\\1 \\2\\3 \\3'\n\n# Transform an extracted symbol line into a proper C declaration\nglobal_symbol_to_cdecl=\"sed -n -e 's/^. .* \\(.*\\)$/extern char \\1;/p'\"\n\n# Define system-specific variables.\ncase $host_os in\naix*)\n  symcode='[BCDT]'\n  ;;\ncygwin* | mingw* | pw32*)\n  symcode='[ABCDGISTW]'\n  ;;\nhpux*) # Its linker distinguishes data from code symbols\n  global_symbol_to_cdecl=\"sed -n -e 's/^T .* \\(.*\\)$/extern char \\1();/p' -e 's/^$symcode* .* \\(.*\\)$/extern char \\1;/p'\"\n  ;;\nirix*)\n  symcode='[BCDEGRST]'\n  ;;\nsolaris* | sysv5*)\n  symcode='[BDT]'\n  ;;\nsysv4)\n  symcode='[DFNSTU]'\n  ;;\nesac\n\n# Handle CRLF in mingw tool chain\nopt_cr=\ncase $host_os in\nmingw*)\n  opt_cr=`echo 'x\\{0,1\\}' | tr x '\\015'` # option cr in regexp\n  ;;\nesac\n\n# If we're using GNU nm, then use its standard symbol codes.\nif $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then\n  symcode='[ABCDGISTW]'\nfi\n\n# Try without a prefix undercore, then with it.\nfor ac_symprfx in \"\" \"_\"; do\n\n  # Write the raw and C identifiers.\n  global_symbol_pipe=\"sed -n -e 's/^.*[ \t]\\($symcode$symcode*\\)[ \t][ \t]*\\($ac_symprfx\\)$sympat$opt_cr$/$symxfrm/p'\"\n\n  # Check to see that the pipe works correctly.\n  pipe_works=no\n  $rm conftest*\n  cat > conftest.$ac_ext <<EOF\n#ifdef __cplusplus\nextern \"C\" {\n#endif\nchar nm_test_var;\nvoid nm_test_func(){}\n#ifdef __cplusplus\n}\n#endif\nint main(){nm_test_var='a';nm_test_func();return(0);}\nEOF\n\n  echo \"$progname:1432: checking if global_symbol_pipe works\" >&5\n  if { (eval echo $progname:1433: \\\"$ac_compile\\\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then\n    # Now try to grab the symbols.\n    nlist=conftest.nm\n    if { echo \"$progname:1436: eval \\\"$NM conftest.$objext | $global_symbol_pipe > $nlist\\\"\" >&5; eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5\"; } && test -s \"$nlist\"; then\n\n      # Try sorting and uniquifying the output.\n      if sort \"$nlist\" | uniq > \"$nlist\"T; then\n\tmv -f \"$nlist\"T \"$nlist\"\n      else\n\trm -f \"$nlist\"T\n      fi\n\n      # Make sure that we snagged all the symbols we need.\n      if egrep ' nm_test_var$' \"$nlist\" >/dev/null; then\n\tif egrep ' nm_test_func$' \"$nlist\" >/dev/null; then\n\t  cat <<EOF > conftest.$ac_ext\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nEOF\n\t  # Now generate the symbol file.\n\t  eval \"$global_symbol_to_cdecl\"' < \"$nlist\" >> conftest.$ac_ext'\n\n\t  cat <<EOF >> conftest.$ac_ext\n#if defined (__STDC__) && __STDC__\n# define lt_ptr_t void *\n#else\n# define lt_ptr_t char *\n# define const\n#endif\n\n/* The mapping between symbol names and symbols. */\nconst struct {\n  const char *name;\n  lt_ptr_t address;\n}\nlt_preloaded_symbols[] =\n{\nEOF\n \t  sed \"s/^$symcode$symcode* \\(.*\\) \\(.*\\)$/  {\\\"\\2\\\", (lt_ptr_t) \\&\\2},/\" < \"$nlist\" >> conftest.$ac_ext\n\t  cat <<\\EOF >> conftest.$ac_ext\n  {0, (lt_ptr_t) 0}\n};\n\n#ifdef __cplusplus\n}\n#endif\nEOF\n\t  # Now try linking the two files.\n\t  mv conftest.$objext conftstm.$objext\n\t  save_LIBS=\"$LIBS\"\n\t  save_CFLAGS=\"$CFLAGS\"\n\t  LIBS=\"conftstm.$objext\"\n\t  CFLAGS=\"$CFLAGS$no_builtin_flag\"\n\t  if { (eval echo $progname:1488: \\\"$ac_link\\\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then\n\t    pipe_works=yes\n\t  else\n\t    echo \"$progname: failed program was:\" >&5\n\t    cat conftest.$ac_ext >&5\n\t  fi\n\t  LIBS=\"$save_LIBS\"\n\telse\n\t  echo \"cannot find nm_test_func in $nlist\" >&5\n\tfi\n      else\n\techo \"cannot find nm_test_var in $nlist\" >&5\n      fi\n    else\n      echo \"cannot run $global_symbol_pipe\" >&5\n    fi\n  else\n    echo \"$progname: failed program was:\" >&5\n    cat conftest.$ac_ext >&5\n  fi\n  $rm conftest* conftst*\n\n  # Do not use the global_symbol_pipe unless it works.\n  if test \"$pipe_works\" = yes; then\n    break\n  else\n    global_symbol_pipe=\n  fi\ndone\nif test \"$pipe_works\" = yes; then\n  echo \"${ac_t}ok\" 1>&6\nelse\n  echo \"${ac_t}failed\" 1>&6\nfi\n\nif test -z \"$global_symbol_pipe\"; then\n  global_symbol_to_cdecl=\nfi\n\n# Report the final consequences.\necho \"checking if libtool supports shared libraries... $can_build_shared\" 1>&6\n\n# Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in\n# configure.in, otherwise build static only libraries.\ncase $host_os in\ncygwin* | mingw* | pw32* | os2*)\n  if test x$can_build_shared = xyes; then\n    test x$enable_win32_dll = xno && can_build_shared=no\n    echo \"checking if package supports dlls... $can_build_shared\" 1>&6\n  fi\n;;\nesac\n\necho $ac_n \"checking whether to build shared libraries... $ac_c\" 1>&6\ntest \"$can_build_shared\" = \"no\" && enable_shared=no\n\n# On AIX, shared libraries and static libraries use the same namespace, and\n# are all built from PIC.\ncase $host_os in\naix3*)\n  test \"$enable_shared\" = yes && enable_static=no\n  if test -n \"$RANLIB\"; then\n    archive_cmds=\"$archive_cmds~\\$RANLIB \\$lib\"\n    postinstall_cmds='$RANLIB $lib'\n  fi\n  ;;\n\naix4*)\n  test \"$enable_shared\" = yes && enable_static=no\n  ;;\nesac\n\necho \"$ac_t$enable_shared\" 1>&6\n\n# Make sure either enable_shared or enable_static is yes.\ntest \"$enable_shared\" = yes || enable_static=yes\n\necho \"checking whether to build static libraries... $enable_static\" 1>&6\n\nif test \"$hardcode_action\" = relink; then\n  # Fast installation is not supported\n  enable_fast_install=no\nelif test \"$shlibpath_overrides_runpath\" = yes ||\n     test \"$enable_shared\" = no; then\n  # Fast installation is not necessary\n  enable_fast_install=needless\nfi\n\nvariables_saved_for_relink=\"PATH $shlibpath_var $runpath_var\"\nif test \"$with_gcc\" = yes; then\n  variables_saved_for_relink=\"$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH\"\nfi\n\n# Check whether we must set pic_mode to default\ntest -z \"$pic_flag\" && pic_mode=default\n\nif test \"x$enable_dlopen\" != xyes; then\n  enable_dlopen=unknown\n  enable_dlopen_self=unknown\n  enable_dlopen_self_static=unknown\nelse\nif test \"X${lt_cv_dlopen+set}\" != Xset; then\n  lt_cv_dlopen=no lt_cv_dlopen_libs=\necho $ac_n \"checking for dlopen in -ldl\"\"... $ac_c\" 1>&6\necho \"$progname:1592: checking for dlopen in -ldl\" >&5\nif test \"X${ac_cv_lib_dl_dlopen+set}\" = Xset; then\n  echo $ac_n \"(cached) $ac_c\" 1>&6\nelse\n  ac_save_LIBS=\"$LIBS\"\nLIBS=\"-ldl  $LIBS\"\ncat > conftest.$ac_ext <<EOF\n#line 1599 \"ltconfig\"\n/* Override any gcc2 internal prototype to avoid an error.  */\n/* We use char because int might match the return type of a gcc2\n    builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar dlopen();\n\nint main() {\ndlopen()\n; return 0; }\nEOF\nif { (eval echo $progname:1612: \\\"$ac_link\\\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then\n  rm -rf conftest*\n  ac_cv_lib_dl_dlopen=yes\nelse\n  echo \"$progname: failed program was:\" >&5\n  cat conftest.$ac_ext >&5\n  rm -rf conftest*\n  ac_cv_lib_dl_dlopen=no\nfi\nrm -f conftest*\nLIBS=\"$ac_save_LIBS\"\n\nfi\nif test \"X$ac_cv_lib_dl_dlopen\" = Xyes; then\n  echo \"$ac_t\"\"yes\" 1>&6\n  lt_cv_dlopen=\"dlopen\" lt_cv_dlopen_libs=\"-ldl\"\nelse\n  echo \"$ac_t\"\"no\" 1>&6\necho $ac_n \"checking for dlopen\"\"... $ac_c\" 1>&6\necho \"$progname:1631: checking for dlopen\" >&5\nif test \"X${ac_cv_func_dlopen+set}\" = Xset; then\n  echo $ac_n \"(cached) $ac_c\" 1>&6\nelse\n  cat > conftest.$ac_ext <<EOF\n#line 1636 \"ltconfig\"\n/* System header to define __stub macros and hopefully few prototypes,\n    which can conflict with char dlopen(); below.  */\n#include <assert.h>\n/* Override any gcc2 internal prototype to avoid an error.  */\n/* We use char because int might match the return type of a gcc2\n    builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar dlopen();\n\nint main() {\n\n/* The GNU C library defines this for functions which it implements\n    to always fail with ENOSYS.  Some functions are actually named\n    something starting with __ and the normal name is an alias.  */\n#if defined (__stub_dlopen) || defined (__stub___dlopen)\nchoke me\n#else\ndlopen();\n#endif\n\n; return 0; }\nEOF\nif { (eval echo $progname:1661: \\\"$ac_link\\\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then\n  rm -rf conftest*\n  ac_cv_func_dlopen=yes\nelse\n  echo \"$progname: failed program was:\" >&5\n  cat conftest.$ac_ext >&5\n  rm -rf conftest*\n  ac_cv_func_dlopen=no\nfi\nrm -f conftest*\nfi\nif test \"X$ac_cv_func_dlopen\" = Xyes; then\n  echo \"$ac_t\"\"yes\" 1>&6\n  lt_cv_dlopen=\"dlopen\"\nelse\n  echo \"$ac_t\"\"no\" 1>&6\necho $ac_n \"checking for dlopen in -lsvld\"\"... $ac_c\" 1>&6\necho \"$progname:1678: checking for dlopen in -lsvld\" >&5\nif test \"X${ac_cv_lib_svld_dlopen+set}\" = Xset; then\n  echo $ac_n \"(cached) $ac_c\" 1>&6\nelse\n  ac_save_LIBS=\"$LIBS\"\nLIBS=\"-lsvld  $LIBS\"\ncat > conftest.$ac_ext <<EOF\n#line 1685 \"ltconfig\"\n/* Override any gcc2 internal prototype to avoid an error.  */\n/* We use char because int might match the return type of a gcc2\n    builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar dlopen();\n\nint main() {\ndlopen()\n; return 0; }\nEOF\nif { (eval echo $progname:1698: \\\"$ac_link\\\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then\n  rm -rf conftest*\n  ac_cv_lib_svld_dlopen=yes\nelse\n  echo \"$progname: failed program was:\" >&5\n  cat conftest.$ac_ext >&5\n  rm -rf conftest*\n  ac_cv_lib_svld_dlopen=no\nfi\nrm -f conftest*\nLIBS=\"$ac_save_LIBS\"\n\nfi\nif test \"X$ac_cv_lib_svld_dlopen\" = Xyes; then\n  echo \"$ac_t\"\"yes\" 1>&6\n  lt_cv_dlopen=\"dlopen\" lt_cv_dlopen_libs=\"-lsvld\"\nelse\n  echo \"$ac_t\"\"no\" 1>&6\necho $ac_n \"checking for dld_link in -ldld\"\"... $ac_c\" 1>&6\necho \"$progname:1717: checking for dld_link in -ldld\" >&5\nif test \"X${ac_cv_lib_dld_dld_link+set}\" = Xset; then\n  echo $ac_n \"(cached) $ac_c\" 1>&6\nelse\n  ac_save_LIBS=\"$LIBS\"\nLIBS=\"-ldld  $LIBS\"\ncat > conftest.$ac_ext <<EOF\n#line 1724 \"ltconfig\"\n/* Override any gcc2 internal prototype to avoid an error.  */\n/* We use char because int might match the return type of a gcc2\n    builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar dld_link();\n\nint main() {\ndld_link()\n; return 0; }\nEOF\nif { (eval echo $progname:1737: \\\"$ac_link\\\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then\n  rm -rf conftest*\n  ac_cv_lib_dld_dld_link=yes\nelse\n  echo \"$progname: failed program was:\" >&5\n  cat conftest.$ac_ext >&5\n  rm -rf conftest*\n  ac_cv_lib_dld_dld_link=no\nfi\nrm -f conftest*\nLIBS=\"$ac_save_LIBS\"\n\nfi\nif test \"X$ac_cv_lib_dld_dld_link\" = Xyes; then\n  echo \"$ac_t\"\"yes\" 1>&6\n  lt_cv_dlopen=\"dld_link\" lt_cv_dlopen_libs=\"-ldld\"\nelse\n  echo \"$ac_t\"\"no\" 1>&6\necho $ac_n \"checking for shl_load\"\"... $ac_c\" 1>&6\necho \"$progname:1756: checking for shl_load\" >&5\nif test \"X${ac_cv_func_shl_load+set}\" = Xset; then\n  echo $ac_n \"(cached) $ac_c\" 1>&6\nelse\n  cat > conftest.$ac_ext <<EOF\n#line 1761 \"ltconfig\"\n/* System header to define __stub macros and hopefully few prototypes,\n    which can conflict with char shl_load(); below.  */\n#include <assert.h>\n/* Override any gcc2 internal prototype to avoid an error.  */\n/* We use char because int might match the return type of a gcc2\n    builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar shl_load();\n\nint main() {\n\n/* The GNU C library defines this for functions which it implements\n    to always fail with ENOSYS.  Some functions are actually named\n    something starting with __ and the normal name is an alias.  */\n#if defined (__stub_shl_load) || defined (__stub___shl_load)\nchoke me\n#else\nshl_load();\n#endif\n\n; return 0; }\nEOF\nif { (eval echo $progname:1786: \\\"$ac_link\\\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then\n  rm -rf conftest*\n  ac_cv_func_shl_load=yes\nelse\n  echo \"$progname: failed program was:\" >&5\n  cat conftest.$ac_ext >&5\n  rm -rf conftest*\n  ac_cv_func_shl_load=no\nfi\nrm -f conftest*\nfi\n\nif test \"X$ac_cv_func_shl_load\" = Xyes; then\n  echo \"$ac_t\"\"yes\" 1>&6\n  lt_cv_dlopen=\"shl_load\"\nelse\n  echo \"$ac_t\"\"no\" 1>&6\necho $ac_n \"checking for shl_load in -ldld\"\"... $ac_c\" 1>&6\necho \"$progname:1804: checking for shl_load in -ldld\" >&5\nif test \"X${ac_cv_lib_dld_shl_load+set}\" = Xset; then\n  echo $ac_n \"(cached) $ac_c\" 1>&6\nelse\n  ac_save_LIBS=\"$LIBS\"\nLIBS=\"-ldld  $LIBS\"\ncat > conftest.$ac_ext <<EOF\n#line 1811 \"ltconfig\"\n#include \"confdefs.h\"\n/* Override any gcc2 internal prototype to avoid an error.  */\n/* We use char because int might match the return type of a gcc2\n    builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar shl_load();\n\nint main() {\nshl_load()\n; return 0; }\nEOF\nif { (eval echo $progname:1825: \\\"$ac_link\\\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then\n  rm -rf conftest*\n  ac_cv_lib_dld_shl_load=yes\nelse\n  echo \"$progname: failed program was:\" >&5\n  cat conftest.$ac_ext >&5\n  rm -rf conftest*\n  ac_cv_lib_dld_shl_load=no\nfi\nrm -f conftest*\nLIBS=\"$ac_save_LIBS\"\n\nfi\nif test \"X$ac_cv_lib_dld_shl_load\" = Xyes; then\n  echo \"$ac_t\"\"yes\" 1>&6\n  lt_cv_dlopen=\"shl_load\" lt_cv_dlopen_libs=\"-ldld\"\nelse\n  echo \"$ac_t\"\"no\" 1>&6\nfi\n\n\nfi\n\n\nfi\n\n\nfi\n\n\nfi\n\nfi\n\nfi\n\n  if test \"x$lt_cv_dlopen\" != xno; then\n    enable_dlopen=yes\n  else\n    enable_dlopen=no\n  fi\n\n  case $lt_cv_dlopen in\n  dlopen)\nfor ac_hdr in dlfcn.h; do\nac_safe=`echo \"$ac_hdr\" | sed 'y%./+-%__p_%'`\necho $ac_n \"checking for $ac_hdr\"\"... $ac_c\" 1>&6\necho \"$progname:1872: checking for $ac_hdr\" >&5\nif eval \"test \\\"`echo 'X$''{'ac_cv_header_$ac_safe'+set}'`\\\" = Xset\"; then\n  echo $ac_n \"(cached) $ac_c\" 1>&6\nelse\n  cat > conftest.$ac_ext <<EOF\n#line 1877 \"ltconfig\"\n#include <$ac_hdr>\nint fnord = 0;\nint main () { return(0); }\nEOF\nac_try=\"$ac_compile >/dev/null 2>conftest.out\"\n{ (eval echo $progname:1883: \\\"$ac_try\\\") 1>&5; (eval $ac_try) 2>&5; }\nac_err=`grep -v '^ *+' conftest.out | grep -v \"^conftest.${ac_ext}\\$\"`\nif test -z \"$ac_err\"; then\n  rm -rf conftest*\n  eval \"ac_cv_header_$ac_safe=yes\"\nelse\n  echo \"$ac_err\" >&5\n  echo \"$progname: failed program was:\" >&5\n  cat conftest.$ac_ext >&5\n  rm -rf conftest*\n  eval \"ac_cv_header_$ac_safe=no\"\nfi\nrm -f conftest*\nfi\nif eval \"test \\\"`echo '$ac_cv_header_'$ac_safe`\\\" = yes\"; then\n  echo \"$ac_t\"\"yes\" 1>&6\nelse\n  echo \"$ac_t\"\"no\" 1>&6\nfi\ndone\n\n    if test \"x$ac_cv_header_dlfcn_h\" = xyes; then\n      CPPFLAGS=\"$CPPFLAGS -DHAVE_DLFCN_H\"\n    fi\n    eval LDFLAGS=\\\"\\$LDFLAGS $export_dynamic_flag_spec\\\"\n    LIBS=\"$lt_cv_dlopen_libs $LIBS\"\n\n  echo $ac_n \"checking whether a program can dlopen itself\"\"... $ac_c\" 1>&6\necho \"$progname:1911: checking whether a program can dlopen itself\" >&5\nif test \"X${lt_cv_dlopen_self+set}\" = Xset; then\n  echo $ac_n \"(cached) $ac_c\" 1>&6\nelse\n  if test \"$cross_compiling\" = yes; then\n    lt_cv_dlopen_self=cross\n  else\n    cat > conftest.$ac_ext <<EOF\n#line 1919 \"ltconfig\"\n\n#if HAVE_DLFCN_H\n#include <dlfcn.h>\n#endif\n\n#include <stdio.h>\n\n#ifdef RTLD_GLOBAL\n# define LTDL_GLOBAL\tRTLD_GLOBAL\n#else\n# ifdef DL_GLOBAL\n#  define LTDL_GLOBAL\tDL_GLOBAL\n# else\n#  define LTDL_GLOBAL\t0\n# endif\n#endif\n\n/* We may have to define LTDL_LAZY_OR_NOW in the command line if we\n   find out it does not work in some platform. */\n#ifndef LTDL_LAZY_OR_NOW\n# ifdef RTLD_LAZY\n#  define LTDL_LAZY_OR_NOW\tRTLD_LAZY\n# else\n#  ifdef DL_LAZY\n#   define LTDL_LAZY_OR_NOW\tDL_LAZY\n#  else\n#   ifdef RTLD_NOW\n#    define LTDL_LAZY_OR_NOW\tRTLD_NOW\n#   else\n#    ifdef DL_NOW\n#     define LTDL_LAZY_OR_NOW\tDL_NOW\n#    else\n#     define LTDL_LAZY_OR_NOW\t0\n#    endif\n#   endif\n#  endif\n# endif\n#endif\n\nvoid fnord() { int i=42; }\nint main() {\n    void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);\n    if(self) { ptr1=dlsym(self,\"fnord\"); ptr2=dlsym(self,\"_fnord\");\n               if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }\n\nEOF\nif { (eval echo $progname:1966: \\\"$ac_link\\\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null\nthen\n  lt_cv_dlopen_self=yes\nelse\n  echo \"$progname: failed program was:\" >&5\n  cat conftest.$ac_ext >&5\n  rm -fr conftest*\n  lt_cv_dlopen_self=no\nfi\nrm -fr conftest*\nfi\n\nfi\n\necho \"$ac_t\"\"$lt_cv_dlopen_self\" 1>&6\n\n  if test \"$lt_cv_dlopen_self\" = yes; then\n    LDFLAGS=\"$LDFLAGS $link_static_flag\"\n  echo $ac_n \"checking whether a statically linked program can dlopen itself\"\"... $ac_c\" 1>&6\necho \"$progname:1985: checking whether a statically linked program can dlopen itself\" >&5\nif test \"X${lt_cv_dlopen_self_static+set}\" = Xset; then\n  echo $ac_n \"(cached) $ac_c\" 1>&6\nelse\n  if test \"$cross_compiling\" = yes; then\n    lt_cv_dlopen_self_static=cross\n  else\n    cat > conftest.$ac_ext <<EOF\n#line 1993 \"ltconfig\"\n\n#if HAVE_DLFCN_H\n#include <dlfcn.h>\n#endif\n\n#include <stdio.h>\n\n#ifdef RTLD_GLOBAL\n# define LTDL_GLOBAL\tRTLD_GLOBAL\n#else\n# ifdef DL_GLOBAL\n#  define LTDL_GLOBAL\tDL_GLOBAL\n# else\n#  define LTDL_GLOBAL\t0\n# endif\n#endif\n\n/* We may have to define LTDL_LAZY_OR_NOW in the command line if we\n   find out it does not work in some platform. */\n#ifndef LTDL_LAZY_OR_NOW\n# ifdef RTLD_LAZY\n#  define LTDL_LAZY_OR_NOW\tRTLD_LAZY\n# else\n#  ifdef DL_LAZY\n#   define LTDL_LAZY_OR_NOW\tDL_LAZY\n#  else\n#   ifdef RTLD_NOW\n#    define LTDL_LAZY_OR_NOW\tRTLD_NOW\n#   else\n#    ifdef DL_NOW\n#     define LTDL_LAZY_OR_NOW\tDL_NOW\n#    else\n#     define LTDL_LAZY_OR_NOW\t0\n#    endif\n#   endif\n#  endif\n# endif\n#endif\n\nvoid fnord() { int i=42; }\nint main() {\n    void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);\n    if(self) { ptr1=dlsym(self,\"fnord\"); ptr2=dlsym(self,\"_fnord\");\n    if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }\n\nEOF\nif { (eval echo $progname:2040: \\\"$ac_link\\\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null\nthen\n  lt_cv_dlopen_self_static=yes\nelse\n  echo \"$progname: failed program was:\" >&5\n  cat conftest.$ac_ext >&5\n  rm -fr conftest*\n  lt_cv_dlopen_self_static=no\nfi\nrm -fr conftest*\nfi\n\nfi\n\necho \"$ac_t\"\"$lt_cv_dlopen_self_static\" 1>&6\nfi\n    ;;\n  esac\n\n  case $lt_cv_dlopen_self in\n  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;\n  *) enable_dlopen_self=unknown ;;\n  esac\n\n  case $lt_cv_dlopen_self_static in\n  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;\n  *) enable_dlopen_self_static=unknown ;;\n  esac\nfi\n\n# Copy echo and quote the copy, instead of the original, because it is\n# used later.\nltecho=\"$echo\"\nif test \"X$ltecho\" = \"X$CONFIG_SHELL $0 --fallback-echo\"; then\n   ltecho=\"$CONFIG_SHELL \\$0 --fallback-echo\"\nfi\nLTSHELL=\"$SHELL\"\n\nLTCONFIG_VERSION=\"$VERSION\"\n\n# Only quote variables if we're using ltmain.sh.\ncase $ltmain in\n*.sh)\n  # Now quote all the things that may contain metacharacters.\n  for var in ltecho old_AR old_AR_FLAGS old_CC old_LTCC old_CFLAGS old_CPPFLAGS \\\n    old_MAGIC_CMD old_LD old_LDFLAGS old_LIBS \\\n    old_LN_S old_NM old_RANLIB old_STRIP \\\n    old_AS old_DLLTOOL old_OBJDUMP \\\n    old_OBJEXT old_EXEEXT old_reload_flag \\\n    old_deplibs_check_method old_file_magic_cmd \\\n    AR AR_FLAGS CC LTCC LD LN_S NM LTSHELL LTCONFIG_VERSION \\\n    reload_flag reload_cmds wl \\\n    pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \\\n    thread_safe_flag_spec whole_archive_flag_spec libname_spec \\\n    library_names_spec soname_spec \\\n    RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \\\n    old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \\\n    postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \\\n    predep_objects postdep_objects predeps postdeps compiler_lib_search_path \\\n    old_striplib striplib file_magic_cmd export_symbols_cmds \\\n    deplibs_check_method allow_undefined_flag no_undefined_flag \\\n    finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \\\n    hardcode_libdir_flag_spec hardcode_libdir_separator  \\\n    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \\\n    compiler_c_o need_locks exclude_expsyms include_expsyms; do\n\n    case $var in\n    reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \\\n    old_postinstall_cmds | old_postuninstall_cmds | \\\n    export_symbols_cmds | archive_cmds | archive_expsym_cmds | \\\n    extract_expsyms_cmds | old_archive_from_expsyms_cmds | \\\n    postinstall_cmds | postuninstall_cmds | \\\n    finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)\n      # Double-quote double-evaled strings.\n      eval \"$var=\\\\\\\"\\`\\$echo \\\"X\\$$var\\\" | \\$Xsed -e \\\"\\$double_quote_subst\\\" -e \\\"\\$sed_quote_subst\\\" -e \\\"\\$delay_variable_subst\\\"\\`\\\\\\\"\" ### testsuite: skip nested quoting test\n      ;;\n    *)\n      eval \"$var=\\\\\\\"\\`\\$echo \\\"X\\$$var\\\" | \\$Xsed -e \\\"\\$sed_quote_subst\\\"\\`\\\\\\\"\" ### testsuite: skip nested quoting test\n      ;;\n    esac\n  done\n\n  case $ltecho in\n  *'\\$0 --fallback-echo\"')\n    ltecho=`$echo \"X$ltecho\" | $Xsed -e 's/\\\\\\\\\\\\\\$0 --fallback-echo\"$/$0 --fallback-echo\"/'`\n    ;;\n  esac\n\n  if test -z \"$tagname\"; then\n    trap \"$rm \\\"$ofile\\\"; exit 1\" 1 2 15\n    echo \"creating $ofile\"\n    $rm \"$ofile\"\n    cat <<EOF > \"$ofile\"\n#! $SHELL\n\n# `$echo \"$ofile\" | sed 's%^.*/%%'` - Provide generalized library-building support services.\n# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)\n# NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.\n#\n# Copyright (C) 1996-2000 Free Software Foundation, Inc.\n# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful, but\n# WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n# General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n#\n# As a special exception to the GNU General Public License, if you\n# distribute this file as part of a program that contains a\n# configuration script generated by Autoconf, you may include it under\n# the same distribution terms that you use for the rest of that program.\n\n# Sed that helps us avoid accidentally triggering echo(1) options like -n.\nXsed=\"sed -e s/^X//\"\n\n# The HP-UX ksh and POSIX shell print the target directory to stdout\n# if CDPATH is set.\nif test \"X\\${CDPATH+set}\" = Xset; then CDPATH=:; export CDPATH; fi\n\n# The names of the tagged configurations supported by this script.\navailable_tags=\n\n### BEGIN LIBTOOL CONFIG\nEOF\n  else\n    echo \"appending configuration tag \\\"$tagname\\\" to $ofile\"\n    echo \"### BEGIN LIBTOOL TAG CONFIG: $tagname\" >> \"$ofile\"\n  fi\n  cfgfile=\"$ofile\"\n  ;;\n\n*)\n  # Double-quote the variables that need it (for aesthetics).\n  for var in old_AR old_AR_FLAGS old_CC old_LTCC old_CFLAGS old_CPPFLAGS \\\n    old_MAGIC_CMD old_LD old_LDFLAGS old_LIBS \\\n    old_LN_S old_NM old_RANLIB old_STRIP \\\n    old_AS old_DLLTOOL old_OBJDUMP \\\n    old_OBJEXT old_EXEEXT old_reload_flag \\\n    old_deplibs_check_method old_file_magic_cmd; do\n    eval \"$var=\\\\\\\"\\$var\\\\\\\"\"\n  done\n\n  # Just create a config file.\n  cfgfile=\"$ofile.cfg\"\n  if test -z \"$tagname\"; then\n    trap \"$rm \\\"$cfgfile\\\"; exit 1\" 1 2 15\n    echo \"creating $cfgfile\"\n    $rm \"$cfgfile\"\n    cat <<EOF > \"$cfgfile\"\n# `$echo \"$cfgfile\" | sed 's%^.*/%%'` - Libtool configuration file.\n# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)\n\n### BEGIN LIBTOOL CONFIG\nEOF\n  else\n    echo \"appending to $cfgfile\"\n    echo \"### BEGIN LIBTOOL TAG CONFIG: $tagname\" >> \"$ofile\"\n  fi\n  ;;\nesac\n\ncat <<EOF >> \"$cfgfile\"\n# Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:\n#\n# AR=$old_AR AR_FLAGS=$old_AR_FLAGS LTCC=$old_LTCC CC=$old_CC \\\\\n# CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\\\\n# MAGIC_CMD=$old_MAGIC_CMD LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\\\\n# LN_S=$old_LN_S NM=$old_NM RANLIB=$old_RANLIB STRIP=$old_STRIP \\\\\n# AS=$old_AS DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP \\\\\n# objext=$old_OBJEXT exeext=$old_EXEEXT reload_flag=$old_reload_flag \\\\\n# deplibs_check_method=$old_deplibs_check_method \\\\\n# file_magic_cmd=$old_file_magic_cmd \\\\\n#   $0$ltconfig_args\n#\n# Compiler and other test output produced by $progname, useful for\n# debugging $progname, is in ./config.log if it exists.\n\n# The version of $progname that generated this script.\nLTCONFIG_VERSION=$LTCONFIG_VERSION\n\n# Shell to use when invoking shell scripts.\nSHELL=$LTSHELL\n\n# Whether or not to build shared libraries.\nbuild_libtool_libs=$enable_shared\n\n# Whether or not to add -lc for building shared libraries.\nbuild_libtool_need_lc=$need_lc\n\n# Whether or not to build static libraries.\nbuild_old_libs=$enable_static\n\n# Whether or not to optimize for fast installation.\nfast_install=$enable_fast_install\n\n# The host system.\nhost_alias=$host_alias\nhost=$host\n\n# An echo program that does not interpret backslashes.\necho=$ltecho\n\n# The archiver.\nAR=$AR\nAR_FLAGS=$AR_FLAGS\n\n# A C compiler.\nLTCC=$LTCC\n\n# A language-specific compiler.\nCC=$CC\n\n# Is the compiler the GNU C compiler?\nwith_gcc=$with_gcc\n\n# The linker used to build libraries.\nLD=$LD\n\n# Whether we need hard or soft links.\nLN_S=$LN_S\n\n# A BSD-compatible nm program.\nNM=$NM\n\n# A symbol stripping program\nSTRIP=$STRIP\n\n# Used to examine libraries when file_magic_cmd begins \"file\"\nMAGIC_CMD=$MAGIC_CMD\n\n# Used on cygwin: DLL creation program.\nDLLTOOL=\"$DLLTOOL\"\n\n# Used on cygwin: object dumper.\nOBJDUMP=\"$OBJDUMP\"\n\n# Used on cygwin: assembler.\nAS=\"$AS\"\n\n# The name of the directory that contains temporary libtool files.\nobjdir=$objdir\n\n# How to create reloadable object files.\nreload_flag=$reload_flag\nreload_cmds=$reload_cmds\n\n# How to pass a linker flag through the compiler.\nwl=$wl\n\n# Object file suffix (normally \"o\").\nobjext=\"$objext\"\n\n# Old archive suffix (normally \"a\").\nlibext=\"$libext\"\n\n# Executable file suffix (normally \"\").\nexeext=\"$exeext\"\n\n# Additional compiler flags for building library objects.\npic_flag=$pic_flag\npic_mode=$pic_mode\n\n# What is the maximum length of a command?\nmax_cmd_len=$max_cmd_len\n\n# Does compiler simultaneously support -c and -o options?\ncompiler_c_o=$compiler_c_o\n\n# Must we lock files when doing compilation ?\nneed_locks=$need_locks\n\n# Do we need the lib prefix for modules?\nneed_lib_prefix=$need_lib_prefix\n\n# Do we need a version for libraries?\nneed_version=$need_version\n\n# Whether dlopen is supported.\ndlopen_support=$enable_dlopen\n\n# Whether dlopen of programs is supported.\ndlopen_self=$enable_dlopen_self\n\n# Whether dlopen of statically linked programs is supported.\ndlopen_self_static=$enable_dlopen_self_static\n\n# Compiler flag to prevent dynamic linking.\nlink_static_flag=$link_static_flag\n\n# Compiler flag to turn off builtin functions.\nno_builtin_flag=$no_builtin_flag\n\n# Compiler flag to allow reflexive dlopens.\nexport_dynamic_flag_spec=$export_dynamic_flag_spec\n\n# Compiler flag to generate shared objects directly from archives.\nwhole_archive_flag_spec=$whole_archive_flag_spec\n\n# Compiler flag to generate thread-safe objects.\nthread_safe_flag_spec=$thread_safe_flag_spec\n\n# Library versioning type.\nversion_type=$version_type\n\n# Format of library name prefix.\nlibname_spec=$libname_spec\n\n# List of archive names.  First name is the real one, the rest are links.\n# The last name is the one that the linker finds with -lNAME.\nlibrary_names_spec=$library_names_spec\n\n# The coded name of the library, if different from the real name.\nsoname_spec=$soname_spec\n\n# Commands used to build and install an old-style archive.\nRANLIB=$RANLIB\nold_archive_cmds=$old_archive_cmds\nold_postinstall_cmds=$old_postinstall_cmds\nold_postuninstall_cmds=$old_postuninstall_cmds\n\n# Create an old-style archive from a shared archive.\nold_archive_from_new_cmds=$old_archive_from_new_cmds\n\n# Create a temporary old-style archive to link instead of a shared archive.\nold_archive_from_expsyms_cmds=$old_archive_from_expsyms_cmds\n\n# Commands used to build and install a shared archive.\narchive_cmds=$archive_cmds\narchive_expsym_cmds=$archive_expsym_cmds\npostinstall_cmds=$postinstall_cmds\npostuninstall_cmds=$postuninstall_cmds\n\n# Commands to strip libraries.\nold_striplib=$old_striplib\nstriplib=$striplib\n\n# Dependencies to place before the objects being linked to create a\n# shared library.\npredep_objects=$predep_objects\n\n# Dependencies to place after the objects being linked to create a\n# shared library.\npostdep_objects=$postdep_objects\n\n# Dependencies to place before the objects being linked to create a\n# shared library.\npredeps=$predeps\n\n# Dependencies to place after the objects being linked to create a\n# shared library.\npostdeps=$postdeps\n\n# The library search path used internally by the compiler when linking\n# a shared library.\ncompiler_lib_search_path=$compiler_lib_search_path\n\n# Method to check whether dependent libraries are shared objects.\ndeplibs_check_method=$deplibs_check_method\n\n# Command to use when deplibs_check_method == file_magic.\nfile_magic_cmd=$file_magic_cmd\n\n# Flag that allows shared libraries with undefined symbols to be built.\nallow_undefined_flag=$allow_undefined_flag\n\n# Flag that forces no undefined symbols.\nno_undefined_flag=$no_undefined_flag\n\n# Commands used to finish a libtool library installation in a directory.\nfinish_cmds=$finish_cmds\n\n# Same as above, but a single script fragment to be evaled but not shown.\nfinish_eval=$finish_eval\n\n# Take the output of nm and produce a listing of raw symbols and C names.\nglobal_symbol_pipe=$global_symbol_pipe\n\n# Transform the output of nm in a proper C declaration\nglobal_symbol_to_cdecl=$global_symbol_to_cdecl\n\n# This is the shared library runtime path variable.\nrunpath_var=$runpath_var\n\n# This is the shared library path variable.\nshlibpath_var=$shlibpath_var\n\n# Is shlibpath searched before the hard-coded library search path?\nshlibpath_overrides_runpath=$shlibpath_overrides_runpath\n\n# How to hardcode a shared library path into an executable.\nhardcode_action=$hardcode_action\n\n# Whether we should hardcode library paths into libraries.\nhardcode_into_libs=$hardcode_into_libs\n\n# Flag to hardcode \\$libdir into a binary during linking.\n# This must work even if \\$libdir does not exist.\nhardcode_libdir_flag_spec=$hardcode_libdir_flag_spec\n\n# Whether we need a single -rpath flag with a separated argument.\nhardcode_libdir_separator=$hardcode_libdir_separator\n\n# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the\n# resulting binary.\nhardcode_direct=$hardcode_direct\n\n# Set to yes if using the -LDIR flag during linking hardcodes DIR into the\n# resulting binary.\nhardcode_minus_L=$hardcode_minus_L\n\n# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into\n# the resulting binary.\nhardcode_shlibpath_var=$hardcode_shlibpath_var\n\n# Variables whose values should be saved in libtool wrapper scripts and\n# restored at relink time.\nvariables_saved_for_relink=\"$variables_saved_for_relink\"\n\n# Whether libtool must link a program against all its dependency libraries.\nlink_all_deplibs=$link_all_deplibs\n\n# Compile-time system search path for libraries\nsys_lib_search_path_spec=$sys_lib_search_path_spec\n\n# Run-time system search path for libraries\nsys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec\n\n# Fix the shell variable \\$srcfile for the compiler.\nfix_srcfile_path=\"$fix_srcfile_path\"\n\n# Set to yes if exported symbols are required.\nalways_export_symbols=$always_export_symbols\n\n# The commands to list exported symbols.\nexport_symbols_cmds=$export_symbols_cmds\n\n# The commands to extract the exported symbol list from a shared archive.\nextract_expsyms_cmds=$extract_expsyms_cmds\n\n# Symbols that should not be listed in the preloaded symbols.\nexclude_expsyms=$exclude_expsyms\n\n# Symbols that must always be exported.\ninclude_expsyms=$include_expsyms\n\nEOF\n\nif test -z \"$tagname\"; then\n  echo '### END LIBTOOL CONFIG' >> \"$ofile\"\nelse\n  echo \"### END LIBTOOL TAG CONFIG: $tagname\" >> \"$ofile\"\nfi\n\ncase $ltmain in\n*.sh)\n  echo >> \"$ofile\"\n  if test -z \"$tagname\"; then\n    case $host_os in\n    aix3*)\n      cat <<\\EOF >> \"$ofile\"\n\n# AIX sometimes has problems with the GCC collect2 program.  For some\n# reason, if we set the COLLECT_NAMES environment variable, the problems\n# vanish in a puff of smoke.\nif test \"X${COLLECT_NAMES+set}\" != Xset; then\n  COLLECT_NAMES=\n  export COLLECT_NAMES\nfi\nEOF\n      ;;\n    esac\n    case $host in\n    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)\n      cat <<'EOF' >> \"$ofile\"\n      # This is a source program that is used to create dlls on Windows\n      # Don't remove nor modify the starting and closing comments\n# /* ltdll.c starts here */\n# #define WIN32_LEAN_AND_MEAN\n# #include <windows.h>\n# #undef WIN32_LEAN_AND_MEAN\n# #include <stdio.h>\n#\n# #ifndef __CYGWIN__\n# #  ifdef __CYGWIN32__\n# #    define __CYGWIN__ __CYGWIN32__\n# #  endif\n# #endif\n#\n# #ifdef __cplusplus\n# extern \"C\" {\n# #endif\n# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);\n# #ifdef __cplusplus\n# }\n# #endif\n#\n# #ifdef __CYGWIN__\n# #include <cygwin/cygwin_dll.h>\n# DECLARE_CYGWIN_DLL( DllMain );\n# #endif\n# HINSTANCE __hDllInstance_base;\n#\n# BOOL APIENTRY\n# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)\n# {\n#   __hDllInstance_base = hInst;\n#   return TRUE;\n# }\n# /* ltdll.c ends here */\n      # This is a source program that is used to create import libraries\n      # on Windows for dlls which lack them. Don't remove nor modify the\n      # starting and closing comments\n# /* impgen.c starts here */\n# /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.\n#\n#  This file is part of GNU libtool.\n#\n#  This program is free software; you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation; either version 2 of the License, or\n#  (at your option) any later version.\n#\n#  This program is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with this program; if not, write to the Free Software\n#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n#  */\n#\n#  #include <stdio.h>\t\t/* for printf() */\n#  #include <unistd.h>\t\t/* for open(), lseek(), read() */\n#  #include <fcntl.h>\t\t/* for O_RDONLY, O_BINARY */\n#  #include <string.h>\t\t/* for strdup() */\n#\n#  /* O_BINARY isn't required (or even defined sometimes) under Unix */\n#  #ifndef O_BINARY\n#  #define O_BINARY 0\n#  #endif\n#\n#  static unsigned int\n#  pe_get16 (fd, offset)\n#       int fd;\n#       int offset;\n#  {\n#    unsigned char b[2];\n#    lseek (fd, offset, SEEK_SET);\n#    read (fd, b, 2);\n#    return b[0] + (b[1]<<8);\n#  }\n#\n#  static unsigned int\n#  pe_get32 (fd, offset)\n#      int fd;\n#      int offset;\n#  {\n#    unsigned char b[4];\n#    lseek (fd, offset, SEEK_SET);\n#    read (fd, b, 4);\n#    return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);\n#  }\n#\n#  static unsigned int\n#  pe_as32 (ptr)\n#       void *ptr;\n#  {\n#    unsigned char *b = ptr;\n#    return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);\n#  }\n#\n#  int\n#  main (argc, argv)\n#      int argc;\n#      char *argv[];\n#  {\n#      int dll;\n#      unsigned long pe_header_offset, opthdr_ofs, num_entries, i;\n#      unsigned long export_rva, export_size, nsections, secptr, expptr;\n#      unsigned long name_rvas, nexp;\n#      unsigned char *expdata, *erva;\n#      char *filename, *dll_name;\n#\n#      filename = argv[1];\n#\n#      dll = open(filename, O_RDONLY|O_BINARY);\n#      if (dll < 1)\n#  \treturn 1;\n#\n#      dll_name = filename;\n#\n#      for (i=0; filename[i]; i++)\n#  \tif (filename[i] == '/' || filename[i] == '\\\\'  || filename[i] == ':')\n#  \t    dll_name = filename + i +1;\n#\n#      pe_header_offset = pe_get32 (dll, 0x3c);\n#      opthdr_ofs = pe_header_offset + 4 + 20;\n#      num_entries = pe_get32 (dll, opthdr_ofs + 92);\n#\n#      if (num_entries < 1) /* no exports */\n#  \treturn 1;\n#\n#      export_rva = pe_get32 (dll, opthdr_ofs + 96);\n#      export_size = pe_get32 (dll, opthdr_ofs + 100);\n#      nsections = pe_get16 (dll, pe_header_offset + 4 +2);\n#      secptr = (pe_header_offset + 4 + 20 +\n#  \t      pe_get16 (dll, pe_header_offset + 4 + 16));\n#\n#      expptr = 0;\n#      for (i = 0; i < nsections; i++)\n#      {\n#  \tchar sname[8];\n#  \tunsigned long secptr1 = secptr + 40 * i;\n#  \tunsigned long vaddr = pe_get32 (dll, secptr1 + 12);\n#  \tunsigned long vsize = pe_get32 (dll, secptr1 + 16);\n#  \tunsigned long fptr = pe_get32 (dll, secptr1 + 20);\n#  \tlseek(dll, secptr1, SEEK_SET);\n#  \tread(dll, sname, 8);\n#  \tif (vaddr <= export_rva && vaddr+vsize > export_rva)\n#  \t{\n#  \t    expptr = fptr + (export_rva - vaddr);\n#  \t    if (export_rva + export_size > vaddr + vsize)\n#  \t\texport_size = vsize - (export_rva - vaddr);\n#  \t    break;\n#  \t}\n#      }\n#\n#      expdata = (unsigned char*)malloc(export_size);\n#      lseek (dll, expptr, SEEK_SET);\n#      read (dll, expdata, export_size);\n#      erva = expdata - export_rva;\n#\n#      nexp = pe_as32 (expdata+24);\n#      name_rvas = pe_as32 (expdata+32);\n#\n#      printf (\"EXPORTS\\n\");\n#      for (i = 0; i<nexp; i++)\n#      {\n#  \tunsigned long name_rva = pe_as32 (erva+name_rvas+i*4);\n#  \tprintf (\"\\t%s @ %ld ;\\n\", erva+name_rva, 1+ i);\n#      }\n#\n#      return 0;\n#  }\n# /* impgen.c ends here */\n\nEOF\n    ;;\n  esac\n\n\n    # Append the ltmain.sh script.\n    sed '$q' \"$ltmain\" >> \"$ofile\" || (rm -f \"$ofile\"; exit 1)\n    # We use sed instead of cat because bash on DJGPP gets confused if\n    # if finds mixed CR/LF and LF-only lines.  Since sed operates in\n    # text mode, it properly converts lines to CR/LF.  This bash problem\n    # is reportedly fixed, but why not run on old versions too?\n\n    chmod +x \"$ofile\"\n  fi\n  ;;\n\n*)\n  # Compile the libtool program.\n  echo \"FIXME: would compile $ltmain\"\n  ;;\nesac\n\n# Update the list of available tags.\nif test -n \"$tagname\"; then\n\n  # Extract list of available tagged configurations in $ofile.\n  # Note that this assumes the entire list is on one line.\n  available_tags=`grep \"^available_tags=\" $ofile | sed -e 's/available_tags=\\(.*$\\)/\\1/' -e 's/\\\"//g'`\n\n  # Append the new tag name to the list of available tags.\n  available_tags=\"$available_tags $tagname\"\n\n  # Now substitute the updated of available tags.\n  if eval \"sed -e 's/^available_tags=.*\\$/available_tags=\\\"$available_tags\\\"/' ${ofile} > ${ofile}.new\"; then\n    mv ${ofile}.new ${ofile}\n    chmod +x \"$ofile\"\n  else\n    rm -f ${ofile}.new\n    echo \"$progname: unable to update list of available tagged configurations.\"\n    exit 1\n  fi\nfi\n\n# Don't cache tagged configuration!\ntest -n \"$cache_file\" && test -z \"$tagname\" || exit 0\n\n# AC_CACHE_SAVE\ntrap '' 1 2 15\ncat > confcache <<\\EOF\n# This file is a shell script that caches the results of configure\n# tests run on this system so they can be shared between configure\n# scripts and configure runs.  It is not useful on other systems.\n# If it contains results you don't want to keep, you may remove or edit it.\n#\n# By default, configure uses ./config.cache as the cache file,\n# creating it if it does not exist already.  You can give configure\n# the --cache-file=FILE option to use a different cache file; that is\n# what configure does when it calls configure scripts in\n# subdirectories, so they share the cache.\n# Giving --cache-file=/dev/null disables caching, for debugging configure.\n# config.status only pays attention to the cache file if you give it the\n# --recheck option to rerun configure.\n#\nEOF\n# The following way of writing the cache mishandles newlines in values,\n# but we know of no workaround that is simple, portable, and efficient.\n# So, don't put newlines in cache variables' values.\n# Ultrix sh set writes to stderr and can't be redirected directly,\n# and sets the high bit in the cache file unless we assign to the vars.\n(set) 2>&1 |\n  case `(ac_space=' '; set | grep ac_space) 2>&1` in\n  *ac_space=\\ *)\n    # `set' does not quote correctly, so add quotes (double-quote substitution\n    # turns \\\\\\\\ into \\\\, and sed turns \\\\ into \\).\n    sed -n \\\n      -e \"s/'/'\\\\\\\\''/g\" \\\n      -e \"s/^\\\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\\\)=\\\\(.*\\\\)/\\\\1=\\${\\\\1='\\\\2'}/p\"\n    ;;\n  *)\n    # `set' quotes correctly as required by POSIX, so do not add quotes.\n    sed -n -e 's/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=${\\1=\\2}/p'\n    ;;\n  esac >> confcache\nif cmp -s $cache_file confcache; then\n  :\nelse\n  if test -w $cache_file; then\n    echo \"updating cache $cache_file\"\n    cat confcache > $cache_file\n  else\n    echo \"not updating unwritable cache $cache_file\"\n  fi\nfi\nrm -f confcache\n\nexit 0\n\n# Local Variables:\n# mode:shell-script\n# sh-indentation:2\n# End:\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/ltmain.sh",
    "content": "# ltmain.sh - Provide generalized library-building support services.\n# NOTE: Changing this file will not affect anything until you rerun configure.\n#\n# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001\n# Free Software Foundation, Inc.\n# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful, but\n# WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n# General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n#\n# As a special exception to the GNU General Public License, if you\n# distribute this file as part of a program that contains a\n# configuration script generated by Autoconf, you may include it under\n# the same distribution terms that you use for the rest of that program.\n\n# Check that we have a working $echo.\nif test \"X$1\" = X--no-reexec; then\n  # Discard the --no-reexec flag, and continue.\n  shift\nelif test \"X$1\" = X--fallback-echo; then\n  # Avoid inline document here, it may be left over\n  :\nelif test \"X`($echo '\\t') 2>/dev/null`\" = 'X\\t'; then\n  # Yippee, $echo works!\n  :\nelse\n  # Restart under the correct shell, and then maybe $echo will work.\n  exec $SHELL \"$0\" --no-reexec ${1+\"$@\"}\nfi\n\nif test \"X$1\" = X--fallback-echo; then\n  # used as fallback echo\n  shift\n  cat <<EOF\n$*\nEOF\n  exit 0\nfi\n\n# The name of this program.\nprogname=`$echo \"$0\" | sed 's%^.*/%%'`\nmodename=\"$progname\"\n\n# Constants.\nPROGRAM=ltmain.sh\nPACKAGE=libtool\nVERSION=1.4.2\nTIMESTAMP=\" (1.922.2.53 2001/09/11 03:18:52)\"\n\ndefault_mode=\nhelp=\"Try \\`$progname --help' for more information.\"\nmagic=\"%%%MAGIC variable%%%\"\nmkdir=\"mkdir\"\nmv=\"mv -f\"\nrm=\"rm -f\"\n\n# Sed substitution that helps us do robust quoting.  It backslashifies\n# metacharacters that are still active within double-quoted strings.\nXsed='sed -e 1s/^X//'\nsed_quote_subst='s/\\([\\\\`\\\\\"$\\\\\\\\]\\)/\\\\\\1/g'\nSP2NL='tr \\040 \\012'\nNL2SP='tr \\015\\012 \\040\\040'\n\n# NLS nuisances.\n# Only set LANG and LC_ALL to C if already set.\n# These must not be set unconditionally because not all systems understand\n# e.g. LANG=C (notably SCO).\n# We save the old values to restore during execute mode.\nif test \"${LC_ALL+set}\" = set; then\n  save_LC_ALL=\"$LC_ALL\"; LC_ALL=C; export LC_ALL\nfi\nif test \"${LANG+set}\" = set; then\n  save_LANG=\"$LANG\"; LANG=C; export LANG\nfi\n\n# Make sure IFS has a sensible default\n: ${IFS=\" \t\"}\n\nif test \"$build_libtool_libs\" != yes && test \"$build_old_libs\" != yes; then\n  echo \"$modename: not configured to build any kind of library\" 1>&2\n  echo \"Fatal configuration error.  See the $PACKAGE docs for more information.\" 1>&2\n  exit 1\nfi\n\n# Global variables.\nmode=$default_mode\nnonopt=\nprev=\nprevopt=\nrun=\nshow=\"$echo\"\nshow_help=\nexecute_dlfiles=\nlo2o=\"s/\\\\.lo\\$/.${objext}/\"\no2lo=\"s/\\\\.${objext}\\$/.lo/\"\n\n# Parse our command line options once, thoroughly.\nwhile test $# -gt 0\ndo\n  arg=\"$1\"\n  shift\n\n  case $arg in\n  -*=*) optarg=`$echo \"X$arg\" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;\n  *) optarg= ;;\n  esac\n\n  # If the previous option needs an argument, assign it.\n  if test -n \"$prev\"; then\n    case $prev in\n    execute_dlfiles)\n      execute_dlfiles=\"$execute_dlfiles $arg\"\n      ;;\n    *)\n      eval \"$prev=\\$arg\"\n      ;;\n    esac\n\n    prev=\n    prevopt=\n    continue\n  fi\n\n  # Have we seen a non-optional argument yet?\n  case $arg in\n  --help)\n    show_help=yes\n    ;;\n\n  --version)\n    echo \"$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP\"\n    exit 0\n    ;;\n\n  --config)\n    sed -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0\n    exit 0\n    ;;\n\n  --debug)\n    echo \"$progname: enabling shell trace mode\"\n    set -x\n    ;;\n\n  --dry-run | -n)\n    run=:\n    ;;\n\n  --features)\n    echo \"host: $host\"\n    if test \"$build_libtool_libs\" = yes; then\n      echo \"enable shared libraries\"\n    else\n      echo \"disable shared libraries\"\n    fi\n    if test \"$build_old_libs\" = yes; then\n      echo \"enable static libraries\"\n    else\n      echo \"disable static libraries\"\n    fi\n    exit 0\n    ;;\n\n  --finish) mode=\"finish\" ;;\n\n  --mode) prevopt=\"--mode\" prev=mode ;;\n  --mode=*) mode=\"$optarg\" ;;\n\n  --quiet | --silent)\n    show=:\n    ;;\n\n  -dlopen)\n    prevopt=\"-dlopen\"\n    prev=execute_dlfiles\n    ;;\n\n  -*)\n    $echo \"$modename: unrecognized option \\`$arg'\" 1>&2\n    $echo \"$help\" 1>&2\n    exit 1\n    ;;\n\n  *)\n    nonopt=\"$arg\"\n    break\n    ;;\n  esac\ndone\n\nif test -n \"$prevopt\"; then\n  $echo \"$modename: option \\`$prevopt' requires an argument\" 1>&2\n  $echo \"$help\" 1>&2\n  exit 1\nfi\n\n# If this variable is set in any of the actions, the command in it\n# will be execed at the end.  This prevents here-documents from being\n# left over by shells.\nexec_cmd=\n\nif test -z \"$show_help\"; then\n\n  # Infer the operation mode.\n  if test -z \"$mode\"; then\n    case $nonopt in\n    *cc | *++ | gcc* | *-gcc*)\n      mode=link\n      for arg\n      do\n\tcase $arg in\n\t-c)\n\t   mode=compile\n\t   break\n\t   ;;\n\tesac\n      done\n      ;;\n    *db | *dbx | *strace | *truss)\n      mode=execute\n      ;;\n    *install*|cp|mv)\n      mode=install\n      ;;\n    *rm)\n      mode=uninstall\n      ;;\n    *)\n      # If we have no mode, but dlfiles were specified, then do execute mode.\n      test -n \"$execute_dlfiles\" && mode=execute\n\n      # Just use the default operation mode.\n      if test -z \"$mode\"; then\n\tif test -n \"$nonopt\"; then\n\t  $echo \"$modename: warning: cannot infer operation mode from \\`$nonopt'\" 1>&2\n\telse\n\t  $echo \"$modename: warning: cannot infer operation mode without MODE-ARGS\" 1>&2\n\tfi\n      fi\n      ;;\n    esac\n  fi\n\n  # Only execute mode is allowed to have -dlopen flags.\n  if test -n \"$execute_dlfiles\" && test \"$mode\" != execute; then\n    $echo \"$modename: unrecognized option \\`-dlopen'\" 1>&2\n    $echo \"$help\" 1>&2\n    exit 1\n  fi\n\n  # Change the help message to a mode-specific one.\n  generic_help=\"$help\"\n  help=\"Try \\`$modename --help --mode=$mode' for more information.\"\n\n  # These modes are in order of execution frequency so that they run quickly.\n  case $mode in\n  # libtool compile mode\n  compile)\n    modename=\"$modename: compile\"\n    # Get the compilation command and the source file.\n    base_compile=\n    prev=\n    lastarg=\n    srcfile=\"$nonopt\"\n    suppress_output=\n\n    user_target=no\n    for arg\n    do\n      case $prev in\n      \"\") ;;\n      xcompiler)\n\t# Aesthetically quote the previous argument.\n\tprev=\n\tlastarg=`$echo \"X$arg\" | $Xsed -e \"$sed_quote_subst\"`\n\n\tcase $arg in\n\t# Double-quote args containing other shell metacharacters.\n\t# Many Bourne shells cannot handle close brackets correctly\n\t# in scan sets, so we specify it separately.\n\t*[\\[\\~\\#\\^\\&\\*\\(\\)\\{\\}\\|\\;\\<\\>\\?\\'\\ \\\t]*|*]*|\"\")\n\t  arg=\"\\\"$arg\\\"\"\n\t  ;;\n\tesac\n\n\t# Add the previous argument to base_compile.\n\tif test -z \"$base_compile\"; then\n\t  base_compile=\"$lastarg\"\n\telse\n\t  base_compile=\"$base_compile $lastarg\"\n\tfi\n\tcontinue\n\t;;\n      esac\n\n      # Accept any command-line options.\n      case $arg in\n      -o)\n\tif test \"$user_target\" != \"no\"; then\n\t  $echo \"$modename: you cannot specify \\`-o' more than once\" 1>&2\n\t  exit 1\n\tfi\n\tuser_target=next\n\t;;\n\n      -static)\n\tbuild_old_libs=yes\n\tcontinue\n\t;;\n\n      -prefer-pic)\n\tpic_mode=yes\n\tcontinue\n\t;;\n\n      -prefer-non-pic)\n\tpic_mode=no\n\tcontinue\n\t;;\n\n      -Xcompiler)\n\tprev=xcompiler\n\tcontinue\n\t;;\n\n      -Wc,*)\n\targs=`$echo \"X$arg\" | $Xsed -e \"s/^-Wc,//\"`\n\tlastarg=\n\tsave_ifs=\"$IFS\"; IFS=','\n\tfor arg in $args; do\n\t  IFS=\"$save_ifs\"\n\n\t  # Double-quote args containing other shell metacharacters.\n\t  # Many Bourne shells cannot handle close brackets correctly\n\t  # in scan sets, so we specify it separately.\n\t  case $arg in\n\t    *[\\[\\~\\#\\^\\&\\*\\(\\)\\{\\}\\|\\;\\<\\>\\?\\'\\ \\\t]*|*]*|\"\")\n\t    arg=\"\\\"$arg\\\"\"\n\t    ;;\n\t  esac\n\t  lastarg=\"$lastarg $arg\"\n\tdone\n\tIFS=\"$save_ifs\"\n\tlastarg=`$echo \"X$lastarg\" | $Xsed -e \"s/^ //\"`\n\n\t# Add the arguments to base_compile.\n\tif test -z \"$base_compile\"; then\n\t  base_compile=\"$lastarg\"\n\telse\n\t  base_compile=\"$base_compile $lastarg\"\n\tfi\n\tcontinue\n\t;;\n      esac\n\n      case $user_target in\n      next)\n\t# The next one is the -o target name\n\tuser_target=yes\n\tcontinue\n\t;;\n      yes)\n\t# We got the output file\n\tuser_target=set\n\tlibobj=\"$arg\"\n\tcontinue\n\t;;\n      esac\n\n      # Accept the current argument as the source file.\n      lastarg=\"$srcfile\"\n      srcfile=\"$arg\"\n\n      # Aesthetically quote the previous argument.\n\n      # Backslashify any backslashes, double quotes, and dollar signs.\n      # These are the only characters that are still specially\n      # interpreted inside of double-quoted scrings.\n      lastarg=`$echo \"X$lastarg\" | $Xsed -e \"$sed_quote_subst\"`\n\n      # Double-quote args containing other shell metacharacters.\n      # Many Bourne shells cannot handle close brackets correctly\n      # in scan sets, so we specify it separately.\n      case $lastarg in\n      *[\\[\\~\\#\\^\\&\\*\\(\\)\\{\\}\\|\\;\\<\\>\\?\\'\\ \\\t]*|*]*|\"\")\n\tlastarg=\"\\\"$lastarg\\\"\"\n\t;;\n      esac\n\n      # Add the previous argument to base_compile.\n      if test -z \"$base_compile\"; then\n\tbase_compile=\"$lastarg\"\n      else\n\tbase_compile=\"$base_compile $lastarg\"\n      fi\n    done\n\n    case $user_target in\n    set)\n      ;;\n    no)\n      # Get the name of the library object.\n      libobj=`$echo \"X$srcfile\" | $Xsed -e 's%^.*/%%'`\n      ;;\n    *)\n      $echo \"$modename: you must specify a target with \\`-o'\" 1>&2\n      exit 1\n      ;;\n    esac\n\n    # Recognize several different file suffixes.\n    # If the user specifies -o file.o, it is replaced with file.lo\n    xform='[cCFSfmso]'\n    case $libobj in\n    *.ada) xform=ada ;;\n    *.adb) xform=adb ;;\n    *.ads) xform=ads ;;\n    *.asm) xform=asm ;;\n    *.c++) xform=c++ ;;\n    *.cc) xform=cc ;;\n    *.cpp) xform=cpp ;;\n    *.cxx) xform=cxx ;;\n    *.f90) xform=f90 ;;\n    *.for) xform=for ;;\n    esac\n\n    libobj=`$echo \"X$libobj\" | $Xsed -e \"s/\\.$xform$/.lo/\"`\n\n    case $libobj in\n    *.lo) obj=`$echo \"X$libobj\" | $Xsed -e \"$lo2o\"` ;;\n    *)\n      $echo \"$modename: cannot determine name of library object from \\`$libobj'\" 1>&2\n      exit 1\n      ;;\n    esac\n\n    if test -z \"$base_compile\"; then\n      $echo \"$modename: you must specify a compilation command\" 1>&2\n      $echo \"$help\" 1>&2\n      exit 1\n    fi\n\n    # Delete any leftover library objects.\n    if test \"$build_old_libs\" = yes; then\n      removelist=\"$obj $libobj\"\n    else\n      removelist=\"$libobj\"\n    fi\n\n    $run $rm $removelist\n    trap \"$run $rm $removelist; exit 1\" 1 2 15\n\n    # On Cygwin there's no \"real\" PIC flag so we must build both object types\n    case $host_os in\n    cygwin* | mingw* | pw32* | os2*)\n      pic_mode=default\n      ;;\n    esac\n    if test $pic_mode = no && test \"$deplibs_check_method\" != pass_all; then\n      # non-PIC code in shared libraries is not supported\n      pic_mode=default\n    fi\n\n    # Calculate the filename of the output object if compiler does\n    # not support -o with -c\n    if test \"$compiler_c_o\" = no; then\n      output_obj=`$echo \"X$srcfile\" | $Xsed -e 's%^.*/%%' -e 's%\\.[^.]*$%%'`.${objext}\n      lockfile=\"$output_obj.lock\"\n      removelist=\"$removelist $output_obj $lockfile\"\n      trap \"$run $rm $removelist; exit 1\" 1 2 15\n    else\n      need_locks=no\n      lockfile=\n    fi\n\n    # Lock this critical section if it is needed\n    # We use this script file to make the link, it avoids creating a new file\n    if test \"$need_locks\" = yes; then\n      until $run ln \"$0\" \"$lockfile\" 2>/dev/null; do\n\t$show \"Waiting for $lockfile to be removed\"\n\tsleep 2\n      done\n    elif test \"$need_locks\" = warn; then\n      if test -f \"$lockfile\"; then\n\techo \"\\\n*** ERROR, $lockfile exists and contains:\n`cat $lockfile 2>/dev/null`\n\nThis indicates that another process is trying to use the same\ntemporary object file, and libtool could not work around it because\nyour compiler does not support \\`-c' and \\`-o' together.  If you\nrepeat this compilation, it may succeed, by chance, but you had better\navoid parallel builds (make -j) in this platform, or get a better\ncompiler.\"\n\n\t$run $rm $removelist\n\texit 1\n      fi\n      echo $srcfile > \"$lockfile\"\n    fi\n\n    if test -n \"$fix_srcfile_path\"; then\n      eval srcfile=\\\"$fix_srcfile_path\\\"\n    fi\n\n    # Only build a PIC object if we are building libtool libraries.\n    if test \"$build_libtool_libs\" = yes; then\n      # Without this assignment, base_compile gets emptied.\n      fbsd_hideous_sh_bug=$base_compile\n\n      if test \"$pic_mode\" != no; then\n\t# All platforms use -DPIC, to notify preprocessed assembler code.\n\tcommand=\"$base_compile $srcfile $pic_flag -DPIC\"\n      else\n\t# Don't build PIC code\n\tcommand=\"$base_compile $srcfile\"\n      fi\n      if test \"$build_old_libs\" = yes; then\n\tlo_libobj=\"$libobj\"\n\tdir=`$echo \"X$libobj\" | $Xsed -e 's%/[^/]*$%%'`\n\tif test \"X$dir\" = \"X$libobj\"; then\n\t  dir=\"$objdir\"\n\telse\n\t  dir=\"$dir/$objdir\"\n\tfi\n\tlibobj=\"$dir/\"`$echo \"X$libobj\" | $Xsed -e 's%^.*/%%'`\n\n\tif test -d \"$dir\"; then\n\t  $show \"$rm $libobj\"\n\t  $run $rm $libobj\n\telse\n\t  $show \"$mkdir $dir\"\n\t  $run $mkdir $dir\n\t  status=$?\n\t  if test $status -ne 0 && test ! -d $dir; then\n\t    exit $status\n\t  fi\n\tfi\n      fi\n      if test \"$compiler_o_lo\" = yes; then\n\toutput_obj=\"$libobj\"\n\tcommand=\"$command -o $output_obj\"\n      elif test \"$compiler_c_o\" = yes; then\n\toutput_obj=\"$obj\"\n\tcommand=\"$command -o $output_obj\"\n      fi\n\n      $run $rm \"$output_obj\"\n      $show \"$command\"\n      if $run eval \"$command\"; then :\n      else\n\ttest -n \"$output_obj\" && $run $rm $removelist\n\texit 1\n      fi\n\n      if test \"$need_locks\" = warn &&\n\t test x\"`cat $lockfile 2>/dev/null`\" != x\"$srcfile\"; then\n\techo \"\\\n*** ERROR, $lockfile contains:\n`cat $lockfile 2>/dev/null`\n\nbut it should contain:\n$srcfile\n\nThis indicates that another process is trying to use the same\ntemporary object file, and libtool could not work around it because\nyour compiler does not support \\`-c' and \\`-o' together.  If you\nrepeat this compilation, it may succeed, by chance, but you had better\navoid parallel builds (make -j) in this platform, or get a better\ncompiler.\"\n\n\t$run $rm $removelist\n\texit 1\n      fi\n\n      # Just move the object if needed, then go on to compile the next one\n      if test x\"$output_obj\" != x\"$libobj\"; then\n\t$show \"$mv $output_obj $libobj\"\n\tif $run $mv $output_obj $libobj; then :\n\telse\n\t  error=$?\n\t  $run $rm $removelist\n\t  exit $error\n\tfi\n      fi\n\n      # If we have no pic_flag, then copy the object into place and finish.\n      if (test -z \"$pic_flag\" || test \"$pic_mode\" != default) &&\n\t test \"$build_old_libs\" = yes; then\n\t# Rename the .lo from within objdir to obj\n\tif test -f $obj; then\n\t  $show $rm $obj\n\t  $run $rm $obj\n\tfi\n\n\t$show \"$mv $libobj $obj\"\n\tif $run $mv $libobj $obj; then :\n\telse\n\t  error=$?\n\t  $run $rm $removelist\n\t  exit $error\n\tfi\n\n\txdir=`$echo \"X$obj\" | $Xsed -e 's%/[^/]*$%%'`\n\tif test \"X$xdir\" = \"X$obj\"; then\n\t  xdir=\".\"\n\telse\n\t  xdir=\"$xdir\"\n\tfi\n\tbaseobj=`$echo \"X$obj\" | $Xsed -e \"s%.*/%%\"`\n\tlibobj=`$echo \"X$baseobj\" | $Xsed -e \"$o2lo\"`\n\t# Now arrange that obj and lo_libobj become the same file\n\t$show \"(cd $xdir && $LN_S $baseobj $libobj)\"\n\tif $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then\n\t  # Unlock the critical section if it was locked\n\t  if test \"$need_locks\" != no; then\n\t    $run $rm \"$lockfile\"\n\t  fi\n\t  exit 0\n\telse\n\t  error=$?\n\t  $run $rm $removelist\n\t  exit $error\n\tfi\n      fi\n\n      # Allow error messages only from the first compilation.\n      suppress_output=' >/dev/null 2>&1'\n    fi\n\n    # Only build a position-dependent object if we build old libraries.\n    if test \"$build_old_libs\" = yes; then\n      if test \"$pic_mode\" != yes; then\n\t# Don't build PIC code\n\tcommand=\"$base_compile $srcfile\"\n      else\n\t# All platforms use -DPIC, to notify preprocessed assembler code.\n\tcommand=\"$base_compile $srcfile $pic_flag -DPIC\"\n      fi\n      if test \"$compiler_c_o\" = yes; then\n\tcommand=\"$command -o $obj\"\n\toutput_obj=\"$obj\"\n      fi\n\n      # Suppress compiler output if we already did a PIC compilation.\n      command=\"$command$suppress_output\"\n      $run $rm \"$output_obj\"\n      $show \"$command\"\n      if $run eval \"$command\"; then :\n      else\n\t$run $rm $removelist\n\texit 1\n      fi\n\n      if test \"$need_locks\" = warn &&\n\t test x\"`cat $lockfile 2>/dev/null`\" != x\"$srcfile\"; then\n\techo \"\\\n*** ERROR, $lockfile contains:\n`cat $lockfile 2>/dev/null`\n\nbut it should contain:\n$srcfile\n\nThis indicates that another process is trying to use the same\ntemporary object file, and libtool could not work around it because\nyour compiler does not support \\`-c' and \\`-o' together.  If you\nrepeat this compilation, it may succeed, by chance, but you had better\navoid parallel builds (make -j) in this platform, or get a better\ncompiler.\"\n\n\t$run $rm $removelist\n\texit 1\n      fi\n\n      # Just move the object if needed\n      if test x\"$output_obj\" != x\"$obj\"; then\n\t$show \"$mv $output_obj $obj\"\n\tif $run $mv $output_obj $obj; then :\n\telse\n\t  error=$?\n\t  $run $rm $removelist\n\t  exit $error\n\tfi\n      fi\n\n      # Create an invalid libtool object if no PIC, so that we do not\n      # accidentally link it into a program.\n      if test \"$build_libtool_libs\" != yes; then\n\t$show \"echo timestamp > $libobj\"\n\t$run eval \"echo timestamp > \\$libobj\" || exit $?\n      else\n\t# Move the .lo from within objdir\n\t$show \"$mv $libobj $lo_libobj\"\n\tif $run $mv $libobj $lo_libobj; then :\n\telse\n\t  error=$?\n\t  $run $rm $removelist\n\t  exit $error\n\tfi\n      fi\n    fi\n\n    # Unlock the critical section if it was locked\n    if test \"$need_locks\" != no; then\n      $run $rm \"$lockfile\"\n    fi\n\n    exit 0\n    ;;\n\n  # libtool link mode\n  link | relink)\n    modename=\"$modename: link\"\n    case $host in\n    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)\n      # It is impossible to link a dll without this setting, and\n      # we shouldn't force the makefile maintainer to figure out\n      # which system we are compiling for in order to pass an extra\n      # flag for every libtool invokation.\n      # allow_undefined=no\n\n      # FIXME: Unfortunately, there are problems with the above when trying\n      # to make a dll which has undefined symbols, in which case not\n      # even a static library is built.  For now, we need to specify\n      # -no-undefined on the libtool link line when we can be certain\n      # that all symbols are satisfied, otherwise we get a static library.\n      allow_undefined=yes\n      ;;\n    *)\n      allow_undefined=yes\n      ;;\n    esac\n    libtool_args=\"$nonopt\"\n    compile_command=\"$nonopt\"\n    finalize_command=\"$nonopt\"\n\n    compile_rpath=\n    finalize_rpath=\n    compile_shlibpath=\n    finalize_shlibpath=\n    convenience=\n    old_convenience=\n    deplibs=\n    old_deplibs=\n    compiler_flags=\n    linker_flags=\n    dllsearchpath=\n    lib_search_path=`pwd`\n\n    avoid_version=no\n    dlfiles=\n    dlprefiles=\n    dlself=no\n    export_dynamic=no\n    export_symbols=\n    export_symbols_regex=\n    generated=\n    libobjs=\n    ltlibs=\n    module=no\n    no_install=no\n    objs=\n    prefer_static_libs=no\n    preload=no\n    prev=\n    prevarg=\n    release=\n    rpath=\n    xrpath=\n    perm_rpath=\n    temp_rpath=\n    thread_safe=no\n    vinfo=\n\n    # We need to know -static, to get the right output filenames.\n    for arg\n    do\n      case $arg in\n      -all-static | -static)\n\tif test \"X$arg\" = \"X-all-static\"; then\n\t  if test \"$build_libtool_libs\" = yes && test -z \"$link_static_flag\"; then\n\t    $echo \"$modename: warning: complete static linking is impossible in this configuration\" 1>&2\n\t  fi\n\t  if test -n \"$link_static_flag\"; then\n\t    dlopen_self=$dlopen_self_static\n\t  fi\n\telse\n\t  if test -z \"$pic_flag\" && test -n \"$link_static_flag\"; then\n\t    dlopen_self=$dlopen_self_static\n\t  fi\n\tfi\n\tbuild_libtool_libs=no\n\tbuild_old_libs=yes\n\tprefer_static_libs=yes\n\tbreak\n\t;;\n      esac\n    done\n\n    # See if our shared archives depend on static archives.\n    test -n \"$old_archive_from_new_cmds\" && build_old_libs=yes\n\n    # Go through the arguments, transforming them on the way.\n    while test $# -gt 0; do\n      arg=\"$1\"\n      shift\n      case $arg in\n      *[\\[\\~\\#\\^\\&\\*\\(\\)\\{\\}\\|\\;\\<\\>\\?\\'\\ \\\t]*|*]*|\"\")\n\tqarg=\\\"`$echo \"X$arg\" | $Xsed -e \"$sed_quote_subst\"`\\\" ### testsuite: skip nested quoting test\n\t;;\n      *) qarg=$arg ;;\n      esac\n      libtool_args=\"$libtool_args $qarg\"\n\n      # If the previous option needs an argument, assign it.\n      if test -n \"$prev\"; then\n\tcase $prev in\n\toutput)\n\t  compile_command=\"$compile_command @OUTPUT@\"\n\t  finalize_command=\"$finalize_command @OUTPUT@\"\n\t  ;;\n\tesac\n\n\tcase $prev in\n\tdlfiles|dlprefiles)\n\t  if test \"$preload\" = no; then\n\t    # Add the symbol object into the linking commands.\n\t    compile_command=\"$compile_command @SYMFILE@\"\n\t    finalize_command=\"$finalize_command @SYMFILE@\"\n\t    preload=yes\n\t  fi\n\t  case $arg in\n\t  *.la | *.lo) ;;  # We handle these cases below.\n\t  force)\n\t    if test \"$dlself\" = no; then\n\t      dlself=needless\n\t      export_dynamic=yes\n\t    fi\n\t    prev=\n\t    continue\n\t    ;;\n\t  self)\n\t    if test \"$prev\" = dlprefiles; then\n\t      dlself=yes\n\t    elif test \"$prev\" = dlfiles && test \"$dlopen_self\" != yes; then\n\t      dlself=yes\n\t    else\n\t      dlself=needless\n\t      export_dynamic=yes\n\t    fi\n\t    prev=\n\t    continue\n\t    ;;\n\t  *)\n\t    if test \"$prev\" = dlfiles; then\n\t      dlfiles=\"$dlfiles $arg\"\n\t    else\n\t      dlprefiles=\"$dlprefiles $arg\"\n\t    fi\n\t    prev=\n\t    continue\n\t    ;;\n\t  esac\n\t  ;;\n\texpsyms)\n\t  export_symbols=\"$arg\"\n\t  if test ! -f \"$arg\"; then\n\t    $echo \"$modename: symbol file \\`$arg' does not exist\"\n\t    exit 1\n\t  fi\n\t  prev=\n\t  continue\n\t  ;;\n\texpsyms_regex)\n\t  export_symbols_regex=\"$arg\"\n\t  prev=\n\t  continue\n\t  ;;\n\trelease)\n\t  release=\"-$arg\"\n\t  prev=\n\t  continue\n\t  ;;\n\trpath | xrpath)\n\t  # We need an absolute path.\n\t  case $arg in\n\t  [\\\\/]* | [A-Za-z]:[\\\\/]*) ;;\n\t  *)\n\t    $echo \"$modename: only absolute run-paths are allowed\" 1>&2\n\t    exit 1\n\t    ;;\n\t  esac\n\t  if test \"$prev\" = rpath; then\n\t    case \"$rpath \" in\n\t    *\" $arg \"*) ;;\n\t    *) rpath=\"$rpath $arg\" ;;\n\t    esac\n\t  else\n\t    case \"$xrpath \" in\n\t    *\" $arg \"*) ;;\n\t    *) xrpath=\"$xrpath $arg\" ;;\n\t    esac\n\t  fi\n\t  prev=\n\t  continue\n\t  ;;\n\txcompiler)\n\t  compiler_flags=\"$compiler_flags $qarg\"\n\t  prev=\n\t  compile_command=\"$compile_command $qarg\"\n\t  finalize_command=\"$finalize_command $qarg\"\n\t  continue\n\t  ;;\n\txlinker)\n\t  linker_flags=\"$linker_flags $qarg\"\n\t  compiler_flags=\"$compiler_flags $wl$qarg\"\n\t  prev=\n\t  compile_command=\"$compile_command $wl$qarg\"\n\t  finalize_command=\"$finalize_command $wl$qarg\"\n\t  continue\n\t  ;;\n\t*)\n\t  eval \"$prev=\\\"\\$arg\\\"\"\n\t  prev=\n\t  continue\n\t  ;;\n\tesac\n      fi # test -n $prev\n\n      prevarg=\"$arg\"\n\n      case $arg in\n      -all-static)\n\tif test -n \"$link_static_flag\"; then\n\t  compile_command=\"$compile_command $link_static_flag\"\n\t  finalize_command=\"$finalize_command $link_static_flag\"\n\tfi\n\tcontinue\n\t;;\n\n      -allow-undefined)\n\t# FIXME: remove this flag sometime in the future.\n\t$echo \"$modename: \\`-allow-undefined' is deprecated because it is the default\" 1>&2\n\tcontinue\n\t;;\n\n      -avoid-version)\n\tavoid_version=yes\n\tcontinue\n\t;;\n\n      -dlopen)\n\tprev=dlfiles\n\tcontinue\n\t;;\n\n      -dlpreopen)\n\tprev=dlprefiles\n\tcontinue\n\t;;\n\n      -export-dynamic)\n\texport_dynamic=yes\n\tcontinue\n\t;;\n\n      -export-symbols | -export-symbols-regex)\n\tif test -n \"$export_symbols\" || test -n \"$export_symbols_regex\"; then\n\t  $echo \"$modename: more than one -exported-symbols argument is not allowed\"\n\t  exit 1\n\tfi\n\tif test \"X$arg\" = \"X-export-symbols\"; then\n\t  prev=expsyms\n\telse\n\t  prev=expsyms_regex\n\tfi\n\tcontinue\n\t;;\n\n      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*\n      # so, if we see these flags be careful not to treat them like -L\n      -L[A-Z][A-Z]*:*)\n\tcase $with_gcc/$host in\n\tno/*-*-irix*)\n\t  compile_command=\"$compile_command $arg\"\n\t  finalize_command=\"$finalize_command $arg\"\n\t  ;;\n\tesac\n\tcontinue\n\t;;\n\n      -L*)\n\tdir=`$echo \"X$arg\" | $Xsed -e 's/^-L//'`\n\t# We need an absolute path.\n\tcase $dir in\n\t[\\\\/]* | [A-Za-z]:[\\\\/]*) ;;\n\t*)\n\t  absdir=`cd \"$dir\" && pwd`\n\t  if test -z \"$absdir\"; then\n\t    $echo \"$modename: cannot determine absolute directory name of \\`$dir'\" 1>&2\n\t    exit 1\n\t  fi\n\t  dir=\"$absdir\"\n\t  ;;\n\tesac\n\tcase \"$deplibs \" in\n\t*\" -L$dir \"*) ;;\n\t*)\n\t  deplibs=\"$deplibs -L$dir\"\n\t  lib_search_path=\"$lib_search_path $dir\"\n\t  ;;\n\tesac\n\tcase $host in\n\t*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)\n\t  case :$dllsearchpath: in\n\t  *\":$dir:\"*) ;;\n\t  *) dllsearchpath=\"$dllsearchpath:$dir\";;\n\t  esac\n\t  ;;\n\tesac\n\tcontinue\n\t;;\n\n      -l*)\n\tif test \"X$arg\" = \"X-lc\" || test \"X$arg\" = \"X-lm\"; then\n\t  case $host in\n\t  *-*-cygwin* | *-*-pw32* | *-*-beos*)\n\t    # These systems don't actually have a C or math library (as such)\n\t    continue\n\t    ;;\n\t  *-*-mingw* | *-*-os2*)\n\t    # These systems don't actually have a C library (as such)\n\t    test \"X$arg\" = \"X-lc\" && continue\n\t    ;;\n\t  *-*-openbsd*)\n\t    # Do not include libc due to us having libc/libc_r.\n\t    test \"X$arg\" = \"X-lc\" && continue\n\t    ;;\n\t  esac\n\t elif test \"X$arg\" = \"X-lc_r\"; then\n\t  case $host in\n\t  *-*-openbsd*)\n\t    # Do not include libc_r directly, use -pthread flag.\n\t    continue\n\t    ;;\n\t  esac\n\tfi\n\tdeplibs=\"$deplibs $arg\"\n\tcontinue\n\t;;\n\n      -module)\n\tmodule=yes\n\tcontinue\n\t;;\n\n      -no-fast-install)\n\tfast_install=no\n\tcontinue\n\t;;\n\n      -no-install)\n\tcase $host in\n\t*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)\n\t  # The PATH hackery in wrapper scripts is required on Windows\n\t  # in order for the loader to find any dlls it needs.\n\t  $echo \"$modename: warning: \\`-no-install' is ignored for $host\" 1>&2\n\t  $echo \"$modename: warning: assuming \\`-no-fast-install' instead\" 1>&2\n\t  fast_install=no\n\t  ;;\n\t*) no_install=yes ;;\n\tesac\n\tcontinue\n\t;;\n\n      -no-undefined)\n\tallow_undefined=no\n\tcontinue\n\t;;\n\n      -o) prev=output ;;\n\n      -release)\n\tprev=release\n\tcontinue\n\t;;\n\n      -rpath)\n\tprev=rpath\n\tcontinue\n\t;;\n\n      -R)\n\tprev=xrpath\n\tcontinue\n\t;;\n\n      -R*)\n\tdir=`$echo \"X$arg\" | $Xsed -e 's/^-R//'`\n\t# We need an absolute path.\n\tcase $dir in\n\t[\\\\/]* | [A-Za-z]:[\\\\/]*) ;;\n\t*)\n\t  $echo \"$modename: only absolute run-paths are allowed\" 1>&2\n\t  exit 1\n\t  ;;\n\tesac\n\tcase \"$xrpath \" in\n\t*\" $dir \"*) ;;\n\t*) xrpath=\"$xrpath $dir\" ;;\n\tesac\n\tcontinue\n\t;;\n\n      -static)\n\t# The effects of -static are defined in a previous loop.\n\t# We used to do the same as -all-static on platforms that\n\t# didn't have a PIC flag, but the assumption that the effects\n\t# would be equivalent was wrong.  It would break on at least\n\t# Digital Unix and AIX.\n\tcontinue\n\t;;\n\n      -thread-safe)\n\tthread_safe=yes\n\tcontinue\n\t;;\n\n      -version-info)\n\tprev=vinfo\n\tcontinue\n\t;;\n\n      -Wc,*)\n\targs=`$echo \"X$arg\" | $Xsed -e \"$sed_quote_subst\" -e 's/^-Wc,//'`\n\targ=\n\tsave_ifs=\"$IFS\"; IFS=','\n\tfor flag in $args; do\n\t  IFS=\"$save_ifs\"\n\t  case $flag in\n\t    *[\\[\\~\\#\\^\\&\\*\\(\\)\\{\\}\\|\\;\\<\\>\\?\\'\\ \\\t]*|*]*|\"\")\n\t    flag=\"\\\"$flag\\\"\"\n\t    ;;\n\t  esac\n\t  arg=\"$arg $wl$flag\"\n\t  compiler_flags=\"$compiler_flags $flag\"\n\tdone\n\tIFS=\"$save_ifs\"\n\targ=`$echo \"X$arg\" | $Xsed -e \"s/^ //\"`\n\t;;\n\n      -Wl,*)\n\targs=`$echo \"X$arg\" | $Xsed -e \"$sed_quote_subst\" -e 's/^-Wl,//'`\n\targ=\n\tsave_ifs=\"$IFS\"; IFS=','\n\tfor flag in $args; do\n\t  IFS=\"$save_ifs\"\n\t  case $flag in\n\t    *[\\[\\~\\#\\^\\&\\*\\(\\)\\{\\}\\|\\;\\<\\>\\?\\'\\ \\\t]*|*]*|\"\")\n\t    flag=\"\\\"$flag\\\"\"\n\t    ;;\n\t  esac\n\t  arg=\"$arg $wl$flag\"\n\t  compiler_flags=\"$compiler_flags $wl$flag\"\n\t  linker_flags=\"$linker_flags $flag\"\n\tdone\n\tIFS=\"$save_ifs\"\n\targ=`$echo \"X$arg\" | $Xsed -e \"s/^ //\"`\n\t;;\n\n      -Xcompiler)\n\tprev=xcompiler\n\tcontinue\n\t;;\n\n      -Xlinker)\n\tprev=xlinker\n\tcontinue\n\t;;\n\n      # Some other compiler flag.\n      -* | +*)\n\t# Unknown arguments in both finalize_command and compile_command need\n\t# to be aesthetically quoted because they are evaled later.\n\targ=`$echo \"X$arg\" | $Xsed -e \"$sed_quote_subst\"`\n\tcase $arg in\n\t*[\\[\\~\\#\\^\\&\\*\\(\\)\\{\\}\\|\\;\\<\\>\\?\\'\\ \\\t]*|*]*|\"\")\n\t  arg=\"\\\"$arg\\\"\"\n\t  ;;\n\tesac\n\t;;\n\n      *.lo | *.$objext)\n\t# A library or standard object.\n\tif test \"$prev\" = dlfiles; then\n\t  # This file was specified with -dlopen.\n\t  if test \"$build_libtool_libs\" = yes && test \"$dlopen_support\" = yes; then\n\t    dlfiles=\"$dlfiles $arg\"\n\t    prev=\n\t    continue\n\t  else\n\t    # If libtool objects are unsupported, then we need to preload.\n\t    prev=dlprefiles\n\t  fi\n\tfi\n\n\tif test \"$prev\" = dlprefiles; then\n\t  # Preload the old-style object.\n\t  dlprefiles=\"$dlprefiles \"`$echo \"X$arg\" | $Xsed -e \"$lo2o\"`\n\t  prev=\n\telse\n\t  case $arg in\n\t  *.lo) libobjs=\"$libobjs $arg\" ;;\n\t  *) objs=\"$objs $arg\" ;;\n\t  esac\n\tfi\n\t;;\n\n      *.$libext)\n\t# An archive.\n\tdeplibs=\"$deplibs $arg\"\n\told_deplibs=\"$old_deplibs $arg\"\n\tcontinue\n\t;;\n\n      *.la)\n\t# A libtool-controlled library.\n\n\tif test \"$prev\" = dlfiles; then\n\t  # This library was specified with -dlopen.\n\t  dlfiles=\"$dlfiles $arg\"\n\t  prev=\n\telif test \"$prev\" = dlprefiles; then\n\t  # The library was specified with -dlpreopen.\n\t  dlprefiles=\"$dlprefiles $arg\"\n\t  prev=\n\telse\n\t  deplibs=\"$deplibs $arg\"\n\tfi\n\tcontinue\n\t;;\n\n      # Some other compiler argument.\n      *)\n\t# Unknown arguments in both finalize_command and compile_command need\n\t# to be aesthetically quoted because they are evaled later.\n\targ=`$echo \"X$arg\" | $Xsed -e \"$sed_quote_subst\"`\n\tcase $arg in\n\t*[\\[\\~\\#\\^\\&\\*\\(\\)\\{\\}\\|\\;\\<\\>\\?\\'\\ \\\t]*|*]*|\"\")\n\t  arg=\"\\\"$arg\\\"\"\n\t  ;;\n\tesac\n\t;;\n      esac # arg\n\n      # Now actually substitute the argument into the commands.\n      if test -n \"$arg\"; then\n\tcompile_command=\"$compile_command $arg\"\n\tfinalize_command=\"$finalize_command $arg\"\n      fi\n    done # argument parsing loop\n\n    if test -n \"$prev\"; then\n      $echo \"$modename: the \\`$prevarg' option requires an argument\" 1>&2\n      $echo \"$help\" 1>&2\n      exit 1\n    fi\n\n    if test \"$export_dynamic\" = yes && test -n \"$export_dynamic_flag_spec\"; then\n      eval arg=\\\"$export_dynamic_flag_spec\\\"\n      compile_command=\"$compile_command $arg\"\n      finalize_command=\"$finalize_command $arg\"\n    fi\n\n    # calculate the name of the file, without its directory\n    outputname=`$echo \"X$output\" | $Xsed -e 's%^.*/%%'`\n    libobjs_save=\"$libobjs\"\n\n    if test -n \"$shlibpath_var\"; then\n      # get the directories listed in $shlibpath_var\n      eval shlib_search_path=\\`\\$echo \\\"X\\${$shlibpath_var}\\\" \\| \\$Xsed -e \\'s/:/ /g\\'\\`\n    else\n      shlib_search_path=\n    fi\n    eval sys_lib_search_path=\\\"$sys_lib_search_path_spec\\\"\n    eval sys_lib_dlsearch_path=\\\"$sys_lib_dlsearch_path_spec\\\"\n\n    output_objdir=`$echo \"X$output\" | $Xsed -e 's%/[^/]*$%%'`\n    if test \"X$output_objdir\" = \"X$output\"; then\n      output_objdir=\"$objdir\"\n    else\n      output_objdir=\"$output_objdir/$objdir\"\n    fi\n    # Create the object directory.\n    if test ! -d $output_objdir; then\n      $show \"$mkdir $output_objdir\"\n      $run $mkdir $output_objdir\n      status=$?\n      if test $status -ne 0 && test ! -d $output_objdir; then\n\texit $status\n      fi\n    fi\n\n    # Determine the type of output\n    case $output in\n    \"\")\n      $echo \"$modename: you must specify an output file\" 1>&2\n      $echo \"$help\" 1>&2\n      exit 1\n      ;;\n    *.$libext) linkmode=oldlib ;;\n    *.lo | *.$objext) linkmode=obj ;;\n    *.la) linkmode=lib ;;\n    *) linkmode=prog ;; # Anything else should be a program.\n    esac\n\n    specialdeplibs=\n    libs=\n    # Find all interdependent deplibs by searching for libraries\n    # that are linked more than once (e.g. -la -lb -la)\n    for deplib in $deplibs; do\n      case \"$libs \" in\n      *\" $deplib \"*) specialdeplibs=\"$specialdeplibs $deplib\" ;;\n      esac\n      libs=\"$libs $deplib\"\n    done\n    deplibs=\n    newdependency_libs=\n    newlib_search_path=\n    need_relink=no # whether we're linking any uninstalled libtool libraries\n    notinst_deplibs= # not-installed libtool libraries\n    notinst_path= # paths that contain not-installed libtool libraries\n    case $linkmode in\n    lib)\n\tpasses=\"conv link\"\n\tfor file in $dlfiles $dlprefiles; do\n\t  case $file in\n\t  *.la) ;;\n\t  *)\n\t    $echo \"$modename: libraries can \\`-dlopen' only libtool libraries: $file\" 1>&2\n\t    exit 1\n\t    ;;\n\t  esac\n\tdone\n\t;;\n    prog)\n\tcompile_deplibs=\n\tfinalize_deplibs=\n\talldeplibs=no\n\tnewdlfiles=\n\tnewdlprefiles=\n\tpasses=\"conv scan dlopen dlpreopen link\"\n\t;;\n    *)  passes=\"conv\"\n\t;;\n    esac\n    for pass in $passes; do\n      if test $linkmode = prog; then\n\t# Determine which files to process\n\tcase $pass in\n\tdlopen)\n\t  libs=\"$dlfiles\"\n\t  save_deplibs=\"$deplibs\" # Collect dlpreopened libraries\n\t  deplibs=\n\t  ;;\n\tdlpreopen) libs=\"$dlprefiles\" ;;\n\tlink) libs=\"$deplibs %DEPLIBS% $dependency_libs\" ;;\n\tesac\n      fi\n      for deplib in $libs; do\n\tlib=\n\tfound=no\n\tcase $deplib in\n\t-l*)\n\t  if test $linkmode = oldlib && test $linkmode = obj; then\n\t    $echo \"$modename: warning: \\`-l' is ignored for archives/objects: $deplib\" 1>&2\n\t    continue\n\t  fi\n\t  if test $pass = conv; then\n\t    deplibs=\"$deplib $deplibs\"\n\t    continue\n\t  fi\n\t  name=`$echo \"X$deplib\" | $Xsed -e 's/^-l//'`\n\t  for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do\n\t    # Search the libtool library\n\t    lib=\"$searchdir/lib${name}.la\"\n\t    if test -f \"$lib\"; then\n\t      found=yes\n\t      break\n\t    fi\n\t  done\n\t  if test \"$found\" != yes; then\n\t    # deplib doesn't seem to be a libtool library\n\t    if test \"$linkmode,$pass\" = \"prog,link\"; then\n\t      compile_deplibs=\"$deplib $compile_deplibs\"\n\t      finalize_deplibs=\"$deplib $finalize_deplibs\"\n\t    else\n\t      deplibs=\"$deplib $deplibs\"\n\t      test $linkmode = lib && newdependency_libs=\"$deplib $newdependency_libs\"\n\t    fi\n\t    continue\n\t  fi\n\t  ;; # -l\n\t-L*)\n\t  case $linkmode in\n\t  lib)\n\t    deplibs=\"$deplib $deplibs\"\n\t    test $pass = conv && continue\n\t    newdependency_libs=\"$deplib $newdependency_libs\"\n\t    newlib_search_path=\"$newlib_search_path \"`$echo \"X$deplib\" | $Xsed -e 's/^-L//'`\n\t    ;;\n\t  prog)\n\t    if test $pass = conv; then\n\t      deplibs=\"$deplib $deplibs\"\n\t      continue\n\t    fi\n\t    if test $pass = scan; then\n\t      deplibs=\"$deplib $deplibs\"\n\t      newlib_search_path=\"$newlib_search_path \"`$echo \"X$deplib\" | $Xsed -e 's/^-L//'`\n\t    else\n\t      compile_deplibs=\"$deplib $compile_deplibs\"\n\t      finalize_deplibs=\"$deplib $finalize_deplibs\"\n\t    fi\n\t    ;;\n\t  *)\n\t    $echo \"$modename: warning: \\`-L' is ignored for archives/objects: $deplib\" 1>&2\n\t    ;;\n\t  esac # linkmode\n\t  continue\n\t  ;; # -L\n\t-R*)\n\t  if test $pass = link; then\n\t    dir=`$echo \"X$deplib\" | $Xsed -e 's/^-R//'`\n\t    # Make sure the xrpath contains only unique directories.\n\t    case \"$xrpath \" in\n\t    *\" $dir \"*) ;;\n\t    *) xrpath=\"$xrpath $dir\" ;;\n\t    esac\n\t  fi\n\t  deplibs=\"$deplib $deplibs\"\n\t  continue\n\t  ;;\n\t*.la) lib=\"$deplib\" ;;\n\t*.$libext)\n\t  if test $pass = conv; then\n\t    deplibs=\"$deplib $deplibs\"\n\t    continue\n\t  fi\n\t  case $linkmode in\n\t  lib)\n\t    if test \"$deplibs_check_method\" != pass_all; then\n\t      echo\n\t      echo \"*** Warning: This library needs some functionality provided by $deplib.\"\n\t      echo \"*** I have the capability to make that library automatically link in when\"\n\t      echo \"*** you link to this library.  But I can only do this if you have a\"\n\t      echo \"*** shared version of the library, which you do not appear to have.\"\n\t    else\n\t      echo\n\t      echo \"*** Warning: Linking the shared library $output against the\"\n\t      echo \"*** static library $deplib is not portable!\"\n\t      deplibs=\"$deplib $deplibs\"\n\t    fi\n\t    continue\n\t    ;;\n\t  prog)\n\t    if test $pass != link; then\n\t      deplibs=\"$deplib $deplibs\"\n\t    else\n\t      compile_deplibs=\"$deplib $compile_deplibs\"\n\t      finalize_deplibs=\"$deplib $finalize_deplibs\"\n\t    fi\n\t    continue\n\t    ;;\n\t  esac # linkmode\n\t  ;; # *.$libext\n\t*.lo | *.$objext)\n\t  if test $pass = dlpreopen || test \"$dlopen_support\" != yes || test \"$build_libtool_libs\" = no; then\n\t    # If there is no dlopen support or we're linking statically,\n\t    # we need to preload.\n\t    newdlprefiles=\"$newdlprefiles $deplib\"\n\t    compile_deplibs=\"$deplib $compile_deplibs\"\n\t    finalize_deplibs=\"$deplib $finalize_deplibs\"\n\t  else\n\t    newdlfiles=\"$newdlfiles $deplib\"\n\t  fi\n\t  continue\n\t  ;;\n\t%DEPLIBS%)\n\t  alldeplibs=yes\n\t  continue\n\t  ;;\n\tesac # case $deplib\n\tif test $found = yes || test -f \"$lib\"; then :\n\telse\n\t  $echo \"$modename: cannot find the library \\`$lib'\" 1>&2\n\t  exit 1\n\tfi\n\n\t# Check to see that this really is a libtool archive.\n\tif (sed -e '2q' $lib | egrep \"^# Generated by .*$PACKAGE\") >/dev/null 2>&1; then :\n\telse\n\t  $echo \"$modename: \\`$lib' is not a valid libtool archive\" 1>&2\n\t  exit 1\n\tfi\n\n\tladir=`$echo \"X$lib\" | $Xsed -e 's%/[^/]*$%%'`\n\ttest \"X$ladir\" = \"X$lib\" && ladir=\".\"\n\n\tdlname=\n\tdlopen=\n\tdlpreopen=\n\tlibdir=\n\tlibrary_names=\n\told_library=\n\t# If the library was installed with an old release of libtool,\n\t# it will not redefine variable installed.\n\tinstalled=yes\n\n\t# Read the .la file\n\tcase $lib in\n\t*/* | *\\\\*) . $lib ;;\n\t*) . ./$lib ;;\n\tesac\n\n\tif test \"$linkmode,$pass\" = \"lib,link\" ||\n\t   test \"$linkmode,$pass\" = \"prog,scan\" ||\n\t   { test $linkmode = oldlib && test $linkmode = obj; }; then\n\t   # Add dl[pre]opened files of deplib\n\t  test -n \"$dlopen\" && dlfiles=\"$dlfiles $dlopen\"\n\t  test -n \"$dlpreopen\" && dlprefiles=\"$dlprefiles $dlpreopen\"\n\tfi\n\n\tif test $pass = conv; then\n\t  # Only check for convenience libraries\n\t  deplibs=\"$lib $deplibs\"\n\t  if test -z \"$libdir\"; then\n\t    if test -z \"$old_library\"; then\n\t      $echo \"$modename: cannot find name of link library for \\`$lib'\" 1>&2\n\t      exit 1\n\t    fi\n\t    # It is a libtool convenience library, so add in its objects.\n\t    convenience=\"$convenience $ladir/$objdir/$old_library\"\n\t    old_convenience=\"$old_convenience $ladir/$objdir/$old_library\"\n\t    tmp_libs=\n\t    for deplib in $dependency_libs; do\n\t      deplibs=\"$deplib $deplibs\"\n\t      case \"$tmp_libs \" in\n\t      *\" $deplib \"*) specialdeplibs=\"$specialdeplibs $deplib\" ;;\n\t      esac\n\t      tmp_libs=\"$tmp_libs $deplib\"\n\t    done\n\t  elif test $linkmode != prog && test $linkmode != lib; then\n\t    $echo \"$modename: \\`$lib' is not a convenience library\" 1>&2\n\t    exit 1\n\t  fi\n\t  continue\n\tfi # $pass = conv\n\n\t# Get the name of the library we link against.\n\tlinklib=\n\tfor l in $old_library $library_names; do\n\t  linklib=\"$l\"\n\tdone\n\tif test -z \"$linklib\"; then\n\t  $echo \"$modename: cannot find name of link library for \\`$lib'\" 1>&2\n\t  exit 1\n\tfi\n\n\t# This library was specified with -dlopen.\n\tif test $pass = dlopen; then\n\t  if test -z \"$libdir\"; then\n\t    $echo \"$modename: cannot -dlopen a convenience library: \\`$lib'\" 1>&2\n\t    exit 1\n\t  fi\n\t  if test -z \"$dlname\" || test \"$dlopen_support\" != yes || test \"$build_libtool_libs\" = no; then\n\t    # If there is no dlname, no dlopen support or we're linking\n\t    # statically, we need to preload.\n\t    dlprefiles=\"$dlprefiles $lib\"\n\t  else\n\t    newdlfiles=\"$newdlfiles $lib\"\n\t  fi\n\t  continue\n\tfi # $pass = dlopen\n\n\t# We need an absolute path.\n\tcase $ladir in\n\t[\\\\/]* | [A-Za-z]:[\\\\/]*) abs_ladir=\"$ladir\" ;;\n\t*)\n\t  abs_ladir=`cd \"$ladir\" && pwd`\n\t  if test -z \"$abs_ladir\"; then\n\t    $echo \"$modename: warning: cannot determine absolute directory name of \\`$ladir'\" 1>&2\n\t    $echo \"$modename: passing it literally to the linker, although it might fail\" 1>&2\n\t    abs_ladir=\"$ladir\"\n\t  fi\n\t  ;;\n\tesac\n\tlaname=`$echo \"X$lib\" | $Xsed -e 's%^.*/%%'`\n\n\t# Find the relevant object directory and library name.\n\tif test \"X$installed\" = Xyes; then\n\t  if test ! -f \"$libdir/$linklib\" && test -f \"$abs_ladir/$linklib\"; then\n\t    $echo \"$modename: warning: library \\`$lib' was moved.\" 1>&2\n\t    dir=\"$ladir\"\n\t    absdir=\"$abs_ladir\"\n\t    libdir=\"$abs_ladir\"\n\t  else\n\t    dir=\"$libdir\"\n\t    absdir=\"$libdir\"\n\t  fi\n\telse\n\t  dir=\"$ladir/$objdir\"\n\t  absdir=\"$abs_ladir/$objdir\"\n\t  # Remove this search path later\n\t  notinst_path=\"$notinst_path $abs_ladir\"\n\tfi # $installed = yes\n\tname=`$echo \"X$laname\" | $Xsed -e 's/\\.la$//' -e 's/^lib//'`\n\n\t# This library was specified with -dlpreopen.\n\tif test $pass = dlpreopen; then\n\t  if test -z \"$libdir\"; then\n\t    $echo \"$modename: cannot -dlpreopen a convenience library: \\`$lib'\" 1>&2\n\t    exit 1\n\t  fi\n\t  # Prefer using a static library (so that no silly _DYNAMIC symbols\n\t  # are required to link).\n\t  if test -n \"$old_library\"; then\n\t    newdlprefiles=\"$newdlprefiles $dir/$old_library\"\n\t  # Otherwise, use the dlname, so that lt_dlopen finds it.\n\t  elif test -n \"$dlname\"; then\n\t    newdlprefiles=\"$newdlprefiles $dir/$dlname\"\n\t  else\n\t    newdlprefiles=\"$newdlprefiles $dir/$linklib\"\n\t  fi\n\tfi # $pass = dlpreopen\n\n\tif test -z \"$libdir\"; then\n\t  # Link the convenience library\n\t  if test $linkmode = lib; then\n\t    deplibs=\"$dir/$old_library $deplibs\"\n\t  elif test \"$linkmode,$pass\" = \"prog,link\"; then\n\t    compile_deplibs=\"$dir/$old_library $compile_deplibs\"\n\t    finalize_deplibs=\"$dir/$old_library $finalize_deplibs\"\n\t  else\n\t    deplibs=\"$lib $deplibs\"\n\t  fi\n\t  continue\n\tfi\n\n\tif test $linkmode = prog && test $pass != link; then\n\t  newlib_search_path=\"$newlib_search_path $ladir\"\n\t  deplibs=\"$lib $deplibs\"\n\n\t  linkalldeplibs=no\n\t  if test \"$link_all_deplibs\" != no || test -z \"$library_names\" ||\n\t     test \"$build_libtool_libs\" = no; then\n\t    linkalldeplibs=yes\n\t  fi\n\n\t  tmp_libs=\n\t  for deplib in $dependency_libs; do\n\t    case $deplib in\n\t    -L*) newlib_search_path=\"$newlib_search_path \"`$echo \"X$deplib\" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test\n\t    esac\n\t    # Need to link against all dependency_libs?\n\t    if test $linkalldeplibs = yes; then\n\t      deplibs=\"$deplib $deplibs\"\n\t    else\n\t      # Need to hardcode shared library paths\n\t      # or/and link against static libraries\n\t      newdependency_libs=\"$deplib $newdependency_libs\"\n\t    fi\n\t    case \"$tmp_libs \" in\n\t    *\" $deplib \"*) specialdeplibs=\"$specialdeplibs $deplib\" ;;\n\t    esac\n\t    tmp_libs=\"$tmp_libs $deplib\"\n\t  done # for deplib\n\t  continue\n\tfi # $linkmode = prog...\n\n\tlink_static=no # Whether the deplib will be linked statically\n\tif test -n \"$library_names\" &&\n\t   { test \"$prefer_static_libs\" = no || test -z \"$old_library\"; }; then\n\t  # Link against this shared library\n\n\t  if test \"$linkmode,$pass\" = \"prog,link\" ||\n\t   { test $linkmode = lib && test $hardcode_into_libs = yes; }; then\n\t    # Hardcode the library path.\n\t    # Skip directories that are in the system default run-time\n\t    # search path.\n\t    case \" $sys_lib_dlsearch_path \" in\n\t    *\" $absdir \"*) ;;\n\t    *)\n\t      case \"$compile_rpath \" in\n\t      *\" $absdir \"*) ;;\n\t      *) compile_rpath=\"$compile_rpath $absdir\"\n\t      esac\n\t      ;;\n\t    esac\n\t    case \" $sys_lib_dlsearch_path \" in\n\t    *\" $libdir \"*) ;;\n\t    *)\n\t      case \"$finalize_rpath \" in\n\t      *\" $libdir \"*) ;;\n\t      *) finalize_rpath=\"$finalize_rpath $libdir\"\n\t      esac\n\t      ;;\n\t    esac\n\t    if test $linkmode = prog; then\n\t      # We need to hardcode the library path\n\t      if test -n \"$shlibpath_var\"; then\n\t\t# Make sure the rpath contains only unique directories.\n\t\tcase \"$temp_rpath \" in\n\t\t*\" $dir \"*) ;;\n\t\t*\" $absdir \"*) ;;\n\t\t*) temp_rpath=\"$temp_rpath $dir\" ;;\n\t\tesac\n\t      fi\n\t    fi\n\t  fi # $linkmode,$pass = prog,link...\n\n\t  if test \"$alldeplibs\" = yes &&\n\t     { test \"$deplibs_check_method\" = pass_all ||\n\t       { test \"$build_libtool_libs\" = yes &&\n\t\t test -n \"$library_names\"; }; }; then\n\t    # We only need to search for static libraries\n\t    continue\n\t  fi\n\n\t  if test \"$installed\" = no; then\n\t    notinst_deplibs=\"$notinst_deplibs $lib\"\n\t    need_relink=yes\n\t  fi\n\n\t  if test -n \"$old_archive_from_expsyms_cmds\"; then\n\t    # figure out the soname\n\t    set dummy $library_names\n\t    realname=\"$2\"\n\t    shift; shift\n\t    libname=`eval \\\\$echo \\\"$libname_spec\\\"`\n\t    # use dlname if we got it. it's perfectly good, no?\n\t    if test -n \"$dlname\"; then\n\t      soname=\"$dlname\"\n\t    elif test -n \"$soname_spec\"; then\n\t      # bleh windows\n\t      case $host in\n\t      *cygwin*)\n\t\tmajor=`expr $current - $age`\n\t\tversuffix=\"-$major\"\n\t\t;;\n\t      esac\n\t      eval soname=\\\"$soname_spec\\\"\n\t    else\n\t      soname=\"$realname\"\n\t    fi\n\n\t    # Make a new name for the extract_expsyms_cmds to use\n\t    soroot=\"$soname\"\n\t    soname=`echo $soroot | sed -e 's/^.*\\///'`\n\t    newlib=\"libimp-`echo $soname | sed 's/^lib//;s/\\.dll$//'`.a\"\n\n\t    # If the library has no export list, then create one now\n\t    if test -f \"$output_objdir/$soname-def\"; then :\n\t    else\n\t      $show \"extracting exported symbol list from \\`$soname'\"\n\t      save_ifs=\"$IFS\"; IFS='~'\n\t      eval cmds=\\\"$extract_expsyms_cmds\\\"\n\t      for cmd in $cmds; do\n\t\tIFS=\"$save_ifs\"\n\t\t$show \"$cmd\"\n\t\t$run eval \"$cmd\" || exit $?\n\t      done\n\t      IFS=\"$save_ifs\"\n\t    fi\n\n\t    # Create $newlib\n\t    if test -f \"$output_objdir/$newlib\"; then :; else\n\t      $show \"generating import library for \\`$soname'\"\n\t      save_ifs=\"$IFS\"; IFS='~'\n\t      eval cmds=\\\"$old_archive_from_expsyms_cmds\\\"\n\t      for cmd in $cmds; do\n\t\tIFS=\"$save_ifs\"\n\t\t$show \"$cmd\"\n\t\t$run eval \"$cmd\" || exit $?\n\t      done\n\t      IFS=\"$save_ifs\"\n\t    fi\n\t    # make sure the library variables are pointing to the new library\n\t    dir=$output_objdir\n\t    linklib=$newlib\n\t  fi # test -n $old_archive_from_expsyms_cmds\n\n\t  if test $linkmode = prog || test \"$mode\" != relink; then\n\t    add_shlibpath=\n\t    add_dir=\n\t    add=\n\t    lib_linked=yes\n\t    case $hardcode_action in\n\t    immediate | unsupported)\n\t      if test \"$hardcode_direct\" = no; then\n\t\tadd=\"$dir/$linklib\"\n\t      elif test \"$hardcode_minus_L\" = no; then\n\t\tcase $host in\n\t\t*-*-sunos*) add_shlibpath=\"$dir\" ;;\n\t\tesac\n\t\tadd_dir=\"-L$dir\"\n\t\tadd=\"-l$name\"\n\t      elif test \"$hardcode_shlibpath_var\" = no; then\n\t\tadd_shlibpath=\"$dir\"\n\t\tadd=\"-l$name\"\n\t      else\n\t\tlib_linked=no\n\t      fi\n\t      ;;\n\t    relink)\n\t      if test \"$hardcode_direct\" = yes; then\n\t\tadd=\"$dir/$linklib\"\n\t      elif test \"$hardcode_minus_L\" = yes; then\n\t\tadd_dir=\"-L$dir\"\n\t\tadd=\"-l$name\"\n\t      elif test \"$hardcode_shlibpath_var\" = yes; then\n\t\tadd_shlibpath=\"$dir\"\n\t\tadd=\"-l$name\"\n\t      else\n\t\tlib_linked=no\n\t      fi\n\t      ;;\n\t    *) lib_linked=no ;;\n\t    esac\n\n\t    if test \"$lib_linked\" != yes; then\n\t      $echo \"$modename: configuration error: unsupported hardcode properties\"\n\t      exit 1\n\t    fi\n\n\t    if test -n \"$add_shlibpath\"; then\n\t      case :$compile_shlibpath: in\n\t      *\":$add_shlibpath:\"*) ;;\n\t      *) compile_shlibpath=\"$compile_shlibpath$add_shlibpath:\" ;;\n\t      esac\n\t    fi\n\t    if test $linkmode = prog; then\n\t      test -n \"$add_dir\" && compile_deplibs=\"$add_dir $compile_deplibs\"\n\t      test -n \"$add\" && compile_deplibs=\"$add $compile_deplibs\"\n\t    else\n\t      test -n \"$add_dir\" && deplibs=\"$add_dir $deplibs\"\n\t      test -n \"$add\" && deplibs=\"$add $deplibs\"\n\t      if test \"$hardcode_direct\" != yes && \\\n\t\t test \"$hardcode_minus_L\" != yes && \\\n\t\t test \"$hardcode_shlibpath_var\" = yes; then\n\t\tcase :$finalize_shlibpath: in\n\t\t*\":$libdir:\"*) ;;\n\t\t*) finalize_shlibpath=\"$finalize_shlibpath$libdir:\" ;;\n\t\tesac\n\t      fi\n\t    fi\n\t  fi\n\n\t  if test $linkmode = prog || test \"$mode\" = relink; then\n\t    add_shlibpath=\n\t    add_dir=\n\t    add=\n\t    # Finalize command for both is simple: just hardcode it.\n\t    if test \"$hardcode_direct\" = yes; then\n\t      add=\"$libdir/$linklib\"\n\t    elif test \"$hardcode_minus_L\" = yes; then\n\t      add_dir=\"-L$libdir\"\n\t      add=\"-l$name\"\n\t    elif test \"$hardcode_shlibpath_var\" = yes; then\n\t      case :$finalize_shlibpath: in\n\t      *\":$libdir:\"*) ;;\n\t      *) finalize_shlibpath=\"$finalize_shlibpath$libdir:\" ;;\n\t      esac\n\t      add=\"-l$name\"\n\t    else\n\t      # We cannot seem to hardcode it, guess we'll fake it.\n\t      add_dir=\"-L$libdir\"\n\t      add=\"-l$name\"\n\t    fi\n\n\t    if test $linkmode = prog; then\n\t      test -n \"$add_dir\" && finalize_deplibs=\"$add_dir $finalize_deplibs\"\n\t      test -n \"$add\" && finalize_deplibs=\"$add $finalize_deplibs\"\n\t    else\n\t      test -n \"$add_dir\" && deplibs=\"$add_dir $deplibs\"\n\t      test -n \"$add\" && deplibs=\"$add $deplibs\"\n\t    fi\n\t  fi\n\telif test $linkmode = prog; then\n\t  if test \"$alldeplibs\" = yes &&\n\t     { test \"$deplibs_check_method\" = pass_all ||\n\t       { test \"$build_libtool_libs\" = yes &&\n\t\t test -n \"$library_names\"; }; }; then\n\t    # We only need to search for static libraries\n\t    continue\n\t  fi\n\n\t  # Try to link the static library\n\t  # Here we assume that one of hardcode_direct or hardcode_minus_L\n\t  # is not unsupported.  This is valid on all known static and\n\t  # shared platforms.\n\t  if test \"$hardcode_direct\" != unsupported; then\n\t    test -n \"$old_library\" && linklib=\"$old_library\"\n\t    compile_deplibs=\"$dir/$linklib $compile_deplibs\"\n\t    finalize_deplibs=\"$dir/$linklib $finalize_deplibs\"\n\t  else\n\t    compile_deplibs=\"-l$name -L$dir $compile_deplibs\"\n\t    finalize_deplibs=\"-l$name -L$dir $finalize_deplibs\"\n\t  fi\n\telif test \"$build_libtool_libs\" = yes; then\n\t  # Not a shared library\n\t  if test \"$deplibs_check_method\" != pass_all; then\n\t    # We're trying link a shared library against a static one\n\t    # but the system doesn't support it.\n\n\t    # Just print a warning and add the library to dependency_libs so\n\t    # that the program can be linked against the static library.\n\t    echo\n\t    echo \"*** Warning: This library needs some functionality provided by $lib.\"\n\t    echo \"*** I have the capability to make that library automatically link in when\"\n\t    echo \"*** you link to this library.  But I can only do this if you have a\"\n\t    echo \"*** shared version of the library, which you do not appear to have.\"\n\t    if test \"$module\" = yes; then\n\t      echo \"*** Therefore, libtool will create a static module, that should work \"\n\t      echo \"*** as long as the dlopening application is linked with the -dlopen flag.\"\n\t      if test -z \"$global_symbol_pipe\"; then\n\t\techo\n\t\techo \"*** However, this would only work if libtool was able to extract symbol\"\n\t\techo \"*** lists from a program, using \\`nm' or equivalent, but libtool could\"\n\t\techo \"*** not find such a program.  So, this module is probably useless.\"\n\t\techo \"*** \\`nm' from GNU binutils and a full rebuild may help.\"\n\t      fi\n\t      if test \"$build_old_libs\" = no; then\n\t\tbuild_libtool_libs=module\n\t\tbuild_old_libs=yes\n\t      else\n\t\tbuild_libtool_libs=no\n\t      fi\n\t    fi\n\t  else\n\t    convenience=\"$convenience $dir/$old_library\"\n\t    old_convenience=\"$old_convenience $dir/$old_library\"\n\t    deplibs=\"$dir/$old_library $deplibs\"\n\t    link_static=yes\n\t  fi\n\tfi # link shared/static library?\n\n\tif test $linkmode = lib; then\n\t  if test -n \"$dependency_libs\" &&\n\t     { test $hardcode_into_libs != yes || test $build_old_libs = yes ||\n\t       test $link_static = yes; }; then\n\t    # Extract -R from dependency_libs\n\t    temp_deplibs=\n\t    for libdir in $dependency_libs; do\n\t      case $libdir in\n\t      -R*) temp_xrpath=`$echo \"X$libdir\" | $Xsed -e 's/^-R//'`\n\t\t   case \" $xrpath \" in\n\t\t   *\" $temp_xrpath \"*) ;;\n\t\t   *) xrpath=\"$xrpath $temp_xrpath\";;\n\t\t   esac;;\n\t      *) temp_deplibs=\"$temp_deplibs $libdir\";;\n\t      esac\n\t    done\n\t    dependency_libs=\"$temp_deplibs\"\n\t  fi\n\n\t  newlib_search_path=\"$newlib_search_path $absdir\"\n\t  # Link against this library\n\t  test \"$link_static\" = no && newdependency_libs=\"$abs_ladir/$laname $newdependency_libs\"\n\t  # ... and its dependency_libs\n\t  tmp_libs=\n\t  for deplib in $dependency_libs; do\n\t    newdependency_libs=\"$deplib $newdependency_libs\"\n\t    case \"$tmp_libs \" in\n\t    *\" $deplib \"*) specialdeplibs=\"$specialdeplibs $deplib\" ;;\n\t    esac\n\t    tmp_libs=\"$tmp_libs $deplib\"\n\t  done\n\n\t  if test $link_all_deplibs != no; then\n\t    # Add the search paths of all dependency libraries\n\t    for deplib in $dependency_libs; do\n\t      case $deplib in\n\t      -L*) path=\"$deplib\" ;;\n\t      *.la)\n\t\tdir=`$echo \"X$deplib\" | $Xsed -e 's%/[^/]*$%%'`\n\t\ttest \"X$dir\" = \"X$deplib\" && dir=\".\"\n\t\t# We need an absolute path.\n\t\tcase $dir in\n\t\t[\\\\/]* | [A-Za-z]:[\\\\/]*) absdir=\"$dir\" ;;\n\t\t*)\n\t\t  absdir=`cd \"$dir\" && pwd`\n\t\t  if test -z \"$absdir\"; then\n\t\t    $echo \"$modename: warning: cannot determine absolute directory name of \\`$dir'\" 1>&2\n\t\t    absdir=\"$dir\"\n\t\t  fi\n\t\t  ;;\n\t\tesac\n\t\tif grep \"^installed=no\" $deplib > /dev/null; then\n\t\t  path=\"-L$absdir/$objdir\"\n\t\telse\n\t\t  eval libdir=`sed -n -e 's/^libdir=\\(.*\\)$/\\1/p' $deplib`\n\t\t  if test -z \"$libdir\"; then\n\t\t    $echo \"$modename: \\`$deplib' is not a valid libtool archive\" 1>&2\n\t\t    exit 1\n\t\t  fi\n\t\t  if test \"$absdir\" != \"$libdir\"; then\n\t\t    $echo \"$modename: warning: \\`$deplib' seems to be moved\" 1>&2\n\t\t  fi\n\t\t  path=\"-L$absdir\"\n\t\tfi\n\t\t;;\n\t      *) continue ;;\n\t      esac\n\t      case \" $deplibs \" in\n\t      *\" $path \"*) ;;\n\t      *) deplibs=\"$deplibs $path\" ;;\n\t      esac\n\t    done\n\t  fi # link_all_deplibs != no\n\tfi # linkmode = lib\n      done # for deplib in $libs\n      if test $pass = dlpreopen; then\n\t# Link the dlpreopened libraries before other libraries\n\tfor deplib in $save_deplibs; do\n\t  deplibs=\"$deplib $deplibs\"\n\tdone\n      fi\n      if test $pass != dlopen; then\n\ttest $pass != scan && dependency_libs=\"$newdependency_libs\"\n\tif test $pass != conv; then\n\t  # Make sure lib_search_path contains only unique directories.\n\t  lib_search_path=\n\t  for dir in $newlib_search_path; do\n\t    case \"$lib_search_path \" in\n\t    *\" $dir \"*) ;;\n\t    *) lib_search_path=\"$lib_search_path $dir\" ;;\n\t    esac\n\t  done\n\t  newlib_search_path=\n\tfi\n\n\tif test \"$linkmode,$pass\" != \"prog,link\"; then\n\t  vars=\"deplibs\"\n\telse\n\t  vars=\"compile_deplibs finalize_deplibs\"\n\tfi\n\tfor var in $vars dependency_libs; do\n\t  # Add libraries to $var in reverse order\n\t  eval tmp_libs=\\\"\\$$var\\\"\n\t  new_libs=\n\t  for deplib in $tmp_libs; do\n\t    case $deplib in\n\t    -L*) new_libs=\"$deplib $new_libs\" ;;\n\t    *)\n\t      case \" $specialdeplibs \" in\n\t      *\" $deplib \"*) new_libs=\"$deplib $new_libs\" ;;\n\t      *)\n\t\tcase \" $new_libs \" in\n\t\t*\" $deplib \"*) ;;\n\t\t*) new_libs=\"$deplib $new_libs\" ;;\n\t\tesac\n\t\t;;\n\t      esac\n\t      ;;\n\t    esac\n\t  done\n\t  tmp_libs=\n\t  for deplib in $new_libs; do\n\t    case $deplib in\n\t    -L*)\n\t      case \" $tmp_libs \" in\n\t      *\" $deplib \"*) ;;\n\t      *) tmp_libs=\"$tmp_libs $deplib\" ;;\n\t      esac\n\t      ;;\n\t    *) tmp_libs=\"$tmp_libs $deplib\" ;;\n\t    esac\n\t  done\n\t  eval $var=\\\"$tmp_libs\\\"\n\tdone # for var\n      fi\n      if test \"$pass\" = \"conv\" &&\n       { test \"$linkmode\" = \"lib\" || test \"$linkmode\" = \"prog\"; }; then\n\tlibs=\"$deplibs\" # reset libs\n\tdeplibs=\n      fi\n    done # for pass\n    if test $linkmode = prog; then\n      dlfiles=\"$newdlfiles\"\n      dlprefiles=\"$newdlprefiles\"\n    fi\n\n    case $linkmode in\n    oldlib)\n      if test -n \"$dlfiles$dlprefiles\" || test \"$dlself\" != no; then\n\t$echo \"$modename: warning: \\`-dlopen' is ignored for archives\" 1>&2\n      fi\n\n      if test -n \"$rpath\"; then\n\t$echo \"$modename: warning: \\`-rpath' is ignored for archives\" 1>&2\n      fi\n\n      if test -n \"$xrpath\"; then\n\t$echo \"$modename: warning: \\`-R' is ignored for archives\" 1>&2\n      fi\n\n      if test -n \"$vinfo\"; then\n\t$echo \"$modename: warning: \\`-version-info' is ignored for archives\" 1>&2\n      fi\n\n      if test -n \"$release\"; then\n\t$echo \"$modename: warning: \\`-release' is ignored for archives\" 1>&2\n      fi\n\n      if test -n \"$export_symbols\" || test -n \"$export_symbols_regex\"; then\n\t$echo \"$modename: warning: \\`-export-symbols' is ignored for archives\" 1>&2\n      fi\n\n      # Now set the variables for building old libraries.\n      build_libtool_libs=no\n      oldlibs=\"$output\"\n      objs=\"$objs$old_deplibs\"\n      ;;\n\n    lib)\n      # Make sure we only generate libraries of the form `libNAME.la'.\n      case $outputname in\n      lib*)\n\tname=`$echo \"X$outputname\" | $Xsed -e 's/\\.la$//' -e 's/^lib//'`\n\teval libname=\\\"$libname_spec\\\"\n\t;;\n      *)\n\tif test \"$module\" = no; then\n\t  $echo \"$modename: libtool library \\`$output' must begin with \\`lib'\" 1>&2\n\t  $echo \"$help\" 1>&2\n\t  exit 1\n\tfi\n\tif test \"$need_lib_prefix\" != no; then\n\t  # Add the \"lib\" prefix for modules if required\n\t  name=`$echo \"X$outputname\" | $Xsed -e 's/\\.la$//'`\n\t  eval libname=\\\"$libname_spec\\\"\n\telse\n\t  libname=`$echo \"X$outputname\" | $Xsed -e 's/\\.la$//'`\n\tfi\n\t;;\n      esac\n\n      if test -n \"$objs\"; then\n\tif test \"$deplibs_check_method\" != pass_all; then\n\t  $echo \"$modename: cannot build libtool library \\`$output' from non-libtool objects on this host:$objs\" 2>&1\n\t  exit 1\n\telse\n\t  echo\n\t  echo \"*** Warning: Linking the shared library $output against the non-libtool\"\n\t  echo \"*** objects $objs is not portable!\"\n\t  libobjs=\"$libobjs $objs\"\n\tfi\n      fi\n\n      if test \"$dlself\" != no; then\n\t$echo \"$modename: warning: \\`-dlopen self' is ignored for libtool libraries\" 1>&2\n      fi\n\n      set dummy $rpath\n      if test $# -gt 2; then\n\t$echo \"$modename: warning: ignoring multiple \\`-rpath's for a libtool library\" 1>&2\n      fi\n      install_libdir=\"$2\"\n\n      oldlibs=\n      if test -z \"$rpath\"; then\n\tif test \"$build_libtool_libs\" = yes; then\n\t  # Building a libtool convenience library.\n\t  libext=al\n\t  oldlibs=\"$output_objdir/$libname.$libext $oldlibs\"\n\t  build_libtool_libs=convenience\n\t  build_old_libs=yes\n\tfi\n\n\tif test -n \"$vinfo\"; then\n\t  $echo \"$modename: warning: \\`-version-info' is ignored for convenience libraries\" 1>&2\n\tfi\n\n\tif test -n \"$release\"; then\n\t  $echo \"$modename: warning: \\`-release' is ignored for convenience libraries\" 1>&2\n\tfi\n      else\n\n\t# Parse the version information argument.\n\tsave_ifs=\"$IFS\"; IFS=':'\n\tset dummy $vinfo 0 0 0\n\tIFS=\"$save_ifs\"\n\n\tif test -n \"$8\"; then\n\t  $echo \"$modename: too many parameters to \\`-version-info'\" 1>&2\n\t  $echo \"$help\" 1>&2\n\t  exit 1\n\tfi\n\n\tcurrent=\"$2\"\n\trevision=\"$3\"\n\tage=\"$4\"\n\n\t# Check that each of the things are valid numbers.\n\tcase $current in\n\t0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;\n\t*)\n\t  $echo \"$modename: CURRENT \\`$current' is not a nonnegative integer\" 1>&2\n\t  $echo \"$modename: \\`$vinfo' is not valid version information\" 1>&2\n\t  exit 1\n\t  ;;\n\tesac\n\n\tcase $revision in\n\t0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;\n\t*)\n\t  $echo \"$modename: REVISION \\`$revision' is not a nonnegative integer\" 1>&2\n\t  $echo \"$modename: \\`$vinfo' is not valid version information\" 1>&2\n\t  exit 1\n\t  ;;\n\tesac\n\n\tcase $age in\n\t0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;\n\t*)\n\t  $echo \"$modename: AGE \\`$age' is not a nonnegative integer\" 1>&2\n\t  $echo \"$modename: \\`$vinfo' is not valid version information\" 1>&2\n\t  exit 1\n\t  ;;\n\tesac\n\n\tif test $age -gt $current; then\n\t  $echo \"$modename: AGE \\`$age' is greater than the current interface number \\`$current'\" 1>&2\n\t  $echo \"$modename: \\`$vinfo' is not valid version information\" 1>&2\n\t  exit 1\n\tfi\n\n\t# Calculate the version variables.\n\tmajor=\n\tversuffix=\n\tverstring=\n\tcase $version_type in\n\tnone) ;;\n\n\tdarwin)\n\t  # Like Linux, but with the current version available in\n\t  # verstring for coding it into the library header\n\t  major=.`expr $current - $age`\n\t  versuffix=\"$major.$age.$revision\"\n\t  # Darwin ld doesn't like 0 for these options...\n\t  minor_current=`expr $current + 1`\n\t  verstring=\"-compatibility_version $minor_current -current_version $minor_current.$revision\"\n\t  ;;\n\n\tfreebsd-aout)\n\t  major=\".$current\"\n\t  versuffix=\".$current.$revision\";\n\t  ;;\n\n\tfreebsd-elf)\n\t  major=\".$current\"\n\t  versuffix=\".$current\";\n\t  ;;\n\n\tirix)\n\t  major=`expr $current - $age + 1`\n\t  verstring=\"sgi$major.$revision\"\n\n\t  # Add in all the interfaces that we are compatible with.\n\t  loop=$revision\n\t  while test $loop != 0; do\n\t    iface=`expr $revision - $loop`\n\t    loop=`expr $loop - 1`\n\t    verstring=\"sgi$major.$iface:$verstring\"\n\t  done\n\n\t  # Before this point, $major must not contain `.'.\n\t  major=.$major\n\t  versuffix=\"$major.$revision\"\n\t  ;;\n\n\tlinux)\n\t  major=.`expr $current - $age`\n\t  versuffix=\"$major.$age.$revision\"\n\t  ;;\n\n\tosf)\n\t  major=`expr $current - $age`\n\t  versuffix=\".$current.$age.$revision\"\n\t  verstring=\"$current.$age.$revision\"\n\n\t  # Add in all the interfaces that we are compatible with.\n\t  loop=$age\n\t  while test $loop != 0; do\n\t    iface=`expr $current - $loop`\n\t    loop=`expr $loop - 1`\n\t    verstring=\"$verstring:${iface}.0\"\n\t  done\n\n\t  # Make executables depend on our current version.\n\t  verstring=\"$verstring:${current}.0\"\n\t  ;;\n\n\tsunos)\n\t  major=\".$current\"\n\t  versuffix=\".$current.$revision\"\n\t  ;;\n\n\twindows)\n\t  # Use '-' rather than '.', since we only want one\n\t  # extension on DOS 8.3 filesystems.\n\t  major=`expr $current - $age`\n\t  versuffix=\"-$major\"\n\t  ;;\n\n\t*)\n\t  $echo \"$modename: unknown library version type \\`$version_type'\" 1>&2\n\t  echo \"Fatal configuration error.  See the $PACKAGE docs for more information.\" 1>&2\n\t  exit 1\n\t  ;;\n\tesac\n\n\t# Clear the version info if we defaulted, and they specified a release.\n\tif test -z \"$vinfo\" && test -n \"$release\"; then\n\t  major=\n\t  verstring=\"0.0\"\n\t  case $version_type in\n\t  darwin)\n\t    # we can't check for \"0.0\" in archive_cmds due to quoting\n\t    # problems, so we reset it completely\n\t    verstring=\"\"\n\t    ;;\n\t  *)\n\t    verstring=\"0.0\"\n\t    ;;\n\t  esac\n\t  if test \"$need_version\" = no; then\n\t    versuffix=\n\t  else\n\t    versuffix=\".0.0\"\n\t  fi\n\tfi\n\n\t# Remove version info from name if versioning should be avoided\n\tif test \"$avoid_version\" = yes && test \"$need_version\" = no; then\n\t  major=\n\t  versuffix=\n\t  verstring=\"\"\n\tfi\n\n\t# Check to see if the archive will have undefined symbols.\n\tif test \"$allow_undefined\" = yes; then\n\t  if test \"$allow_undefined_flag\" = unsupported; then\n\t    $echo \"$modename: warning: undefined symbols not allowed in $host shared libraries\" 1>&2\n\t    build_libtool_libs=no\n\t    build_old_libs=yes\n\t  fi\n\telse\n\t  # Don't allow undefined symbols.\n\t  allow_undefined_flag=\"$no_undefined_flag\"\n\tfi\n      fi\n\n      if test \"$mode\" != relink; then\n\t# Remove our outputs.\n\t$show \"${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*\"\n\t$run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*\n      fi\n\n      # Now set the variables for building old libraries.\n      if test \"$build_old_libs\" = yes && test \"$build_libtool_libs\" != convenience ; then\n\toldlibs=\"$oldlibs $output_objdir/$libname.$libext\"\n\n\t# Transform .lo files to .o files.\n\toldobjs=\"$objs \"`$echo \"X$libobjs\" | $SP2NL | $Xsed -e '/\\.'${libext}'$/d' -e \"$lo2o\" | $NL2SP`\n      fi\n\n      # Eliminate all temporary directories.\n      for path in $notinst_path; do\n\tlib_search_path=`echo \"$lib_search_path \" | sed -e 's% $path % %g'`\n\tdeplibs=`echo \"$deplibs \" | sed -e 's% -L$path % %g'`\n\tdependency_libs=`echo \"$dependency_libs \" | sed -e 's% -L$path % %g'`\n      done\n\n      if test -n \"$xrpath\"; then\n\t# If the user specified any rpath flags, then add them.\n\ttemp_xrpath=\n\tfor libdir in $xrpath; do\n\t  temp_xrpath=\"$temp_xrpath -R$libdir\"\n\t  case \"$finalize_rpath \" in\n\t  *\" $libdir \"*) ;;\n\t  *) finalize_rpath=\"$finalize_rpath $libdir\" ;;\n\t  esac\n\tdone\n\tif test $hardcode_into_libs != yes || test $build_old_libs = yes; then\n\t  dependency_libs=\"$temp_xrpath $dependency_libs\"\n\tfi\n      fi\n\n      # Make sure dlfiles contains only unique files that won't be dlpreopened\n      old_dlfiles=\"$dlfiles\"\n      dlfiles=\n      for lib in $old_dlfiles; do\n\tcase \" $dlprefiles $dlfiles \" in\n\t*\" $lib \"*) ;;\n\t*) dlfiles=\"$dlfiles $lib\" ;;\n\tesac\n      done\n\n      # Make sure dlprefiles contains only unique files\n      old_dlprefiles=\"$dlprefiles\"\n      dlprefiles=\n      for lib in $old_dlprefiles; do\n\tcase \"$dlprefiles \" in\n\t*\" $lib \"*) ;;\n\t*) dlprefiles=\"$dlprefiles $lib\" ;;\n\tesac\n      done\n\n      if test \"$build_libtool_libs\" = yes; then\n\tif test -n \"$rpath\"; then\n\t  case $host in\n\t  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)\n\t    # these systems don't actually have a c library (as such)!\n\t    ;;\n\t  *-*-rhapsody* | *-*-darwin1.[012])\n\t    # Rhapsody C library is in the System framework\n\t    deplibs=\"$deplibs -framework System\"\n\t    ;;\n\t  *-*-netbsd*)\n\t    # Don't link with libc until the a.out ld.so is fixed.\n\t    ;;\n\t  *-*-openbsd*)\n\t    # Do not include libc due to us having libc/libc_r.\n\t    ;;\n\t  *)\n\t    # Add libc to deplibs on all other systems if necessary.\n\t    if test $build_libtool_need_lc = \"yes\"; then\n\t      deplibs=\"$deplibs -lc\"\n\t    fi\n\t    ;;\n\t  esac\n\tfi\n\n\t# Transform deplibs into only deplibs that can be linked in shared.\n\tname_save=$name\n\tlibname_save=$libname\n\trelease_save=$release\n\tversuffix_save=$versuffix\n\tmajor_save=$major\n\t# I'm not sure if I'm treating the release correctly.  I think\n\t# release should show up in the -l (ie -lgmp5) so we don't want to\n\t# add it in twice.  Is that correct?\n\trelease=\"\"\n\tversuffix=\"\"\n\tmajor=\"\"\n\tnewdeplibs=\n\tdroppeddeps=no\n\tcase $deplibs_check_method in\n\tpass_all)\n\t  # Don't check for shared/static.  Everything works.\n\t  # This might be a little naive.  We might want to check\n\t  # whether the library exists or not.  But this is on\n\t  # osf3 & osf4 and I'm not really sure... Just\n\t  # implementing what was already the behaviour.\n\t  newdeplibs=$deplibs\n\t  ;;\n\ttest_compile)\n\t  # This code stresses the \"libraries are programs\" paradigm to its\n\t  # limits. Maybe even breaks it.  We compile a program, linking it\n\t  # against the deplibs as a proxy for the library.  Then we can check\n\t  # whether they linked in statically or dynamically with ldd.\n\t  $rm conftest.c\n\t  cat > conftest.c <<EOF\n\t  int main() { return 0; }\nEOF\n\t  $rm conftest\n\t  $CC -o conftest conftest.c $deplibs\n\t  if test $? -eq 0 ; then\n\t    ldd_output=`ldd conftest`\n\t    for i in $deplibs; do\n\t      name=\"`expr $i : '-l\\(.*\\)'`\"\n\t      # If $name is empty we are operating on a -L argument.\n\t      if test -n \"$name\" && test \"$name\" != \"0\"; then\n\t\tlibname=`eval \\\\$echo \\\"$libname_spec\\\"`\n\t\tdeplib_matches=`eval \\\\$echo \\\"$library_names_spec\\\"`\n\t\tset dummy $deplib_matches\n\t\tdeplib_match=$2\n\t\tif test `expr \"$ldd_output\" : \".*$deplib_match\"` -ne 0 ; then\n\t\t  newdeplibs=\"$newdeplibs $i\"\n\t\telse\n\t\t  droppeddeps=yes\n\t\t  echo\n\t\t  echo \"*** Warning: This library needs some functionality provided by $i.\"\n\t\t  echo \"*** I have the capability to make that library automatically link in when\"\n\t\t  echo \"*** you link to this library.  But I can only do this if you have a\"\n\t\t  echo \"*** shared version of the library, which you do not appear to have.\"\n\t\tfi\n\t      else\n\t\tnewdeplibs=\"$newdeplibs $i\"\n\t      fi\n\t    done\n\t  else\n\t    # Error occured in the first compile.  Let's try to salvage the situation:\n\t    # Compile a seperate program for each library.\n\t    for i in $deplibs; do\n\t      name=\"`expr $i : '-l\\(.*\\)'`\"\n\t     # If $name is empty we are operating on a -L argument.\n\t      if test -n \"$name\" && test \"$name\" != \"0\"; then\n\t\t$rm conftest\n\t\t$CC -o conftest conftest.c $i\n\t\t# Did it work?\n\t\tif test $? -eq 0 ; then\n\t\t  ldd_output=`ldd conftest`\n\t\t  libname=`eval \\\\$echo \\\"$libname_spec\\\"`\n\t\t  deplib_matches=`eval \\\\$echo \\\"$library_names_spec\\\"`\n\t\t  set dummy $deplib_matches\n\t\t  deplib_match=$2\n\t\t  if test `expr \"$ldd_output\" : \".*$deplib_match\"` -ne 0 ; then\n\t\t    newdeplibs=\"$newdeplibs $i\"\n\t\t  else\n\t\t    droppeddeps=yes\n\t\t    echo\n\t\t    echo \"*** Warning: This library needs some functionality provided by $i.\"\n\t\t    echo \"*** I have the capability to make that library automatically link in when\"\n\t\t    echo \"*** you link to this library.  But I can only do this if you have a\"\n\t\t    echo \"*** shared version of the library, which you do not appear to have.\"\n\t\t  fi\n\t\telse\n\t\t  droppeddeps=yes\n\t\t  echo\n\t\t  echo \"*** Warning!  Library $i is needed by this library but I was not able to\"\n\t\t  echo \"***  make it link in!  You will probably need to install it or some\"\n\t\t  echo \"*** library that it depends on before this library will be fully\"\n\t\t  echo \"*** functional.  Installing it before continuing would be even better.\"\n\t\tfi\n\t      else\n\t\tnewdeplibs=\"$newdeplibs $i\"\n\t      fi\n\t    done\n\t  fi\n\t  ;;\n\tfile_magic*)\n\t  set dummy $deplibs_check_method\n\t  file_magic_regex=`expr \"$deplibs_check_method\" : \"$2 \\(.*\\)\"`\n\t  for a_deplib in $deplibs; do\n\t    name=\"`expr $a_deplib : '-l\\(.*\\)'`\"\n\t    # If $name is empty we are operating on a -L argument.\n\t    if test -n \"$name\" && test \"$name\" != \"0\"; then\n\t      libname=`eval \\\\$echo \\\"$libname_spec\\\"`\n\t      for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do\n\t\t    potential_libs=`ls $i/$libname[.-]* 2>/dev/null`\n\t\t    for potent_lib in $potential_libs; do\n\t\t      # Follow soft links.\n\t\t      if ls -lLd \"$potent_lib\" 2>/dev/null \\\n\t\t\t | grep \" -> \" >/dev/null; then\n\t\t\tcontinue\n\t\t      fi\n\t\t      # The statement above tries to avoid entering an\n\t\t      # endless loop below, in case of cyclic links.\n\t\t      # We might still enter an endless loop, since a link\n\t\t      # loop can be closed while we follow links,\n\t\t      # but so what?\n\t\t      potlib=\"$potent_lib\"\n\t\t      while test -h \"$potlib\" 2>/dev/null; do\n\t\t\tpotliblink=`ls -ld $potlib | sed 's/.* -> //'`\n\t\t\tcase $potliblink in\n\t\t\t[\\\\/]* | [A-Za-z]:[\\\\/]*) potlib=\"$potliblink\";;\n\t\t\t*) potlib=`$echo \"X$potlib\" | $Xsed -e 's,[^/]*$,,'`\"$potliblink\";;\n\t\t\tesac\n\t\t      done\n\t\t      if eval $file_magic_cmd \\\"\\$potlib\\\" 2>/dev/null \\\n\t\t\t | sed 10q \\\n\t\t\t | egrep \"$file_magic_regex\" > /dev/null; then\n\t\t\tnewdeplibs=\"$newdeplibs $a_deplib\"\n\t\t\ta_deplib=\"\"\n\t\t\tbreak 2\n\t\t      fi\n\t\t    done\n\t      done\n\t      if test -n \"$a_deplib\" ; then\n\t\tdroppeddeps=yes\n\t\techo\n\t\techo \"*** Warning: This library needs some functionality provided by $a_deplib.\"\n\t\techo \"*** I have the capability to make that library automatically link in when\"\n\t\techo \"*** you link to this library.  But I can only do this if you have a\"\n\t\techo \"*** shared version of the library, which you do not appear to have.\"\n\t      fi\n\t    else\n\t      # Add a -L argument.\n\t      newdeplibs=\"$newdeplibs $a_deplib\"\n\t    fi\n\t  done # Gone through all deplibs.\n\t  ;;\n\tmatch_pattern*)\n\t  set dummy $deplibs_check_method\n\t  match_pattern_regex=`expr \"$deplibs_check_method\" : \"$2 \\(.*\\)\"`\n\t  for a_deplib in $deplibs; do\n\t    name=\"`expr $a_deplib : '-l\\(.*\\)'`\"\n\t    # If $name is empty we are operating on a -L argument.\n\t    if test -n \"$name\" && test \"$name\" != \"0\"; then\n\t      libname=`eval \\\\$echo \\\"$libname_spec\\\"`\n\t      for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do\n\t\tpotential_libs=`ls $i/$libname[.-]* 2>/dev/null`\n\t\tfor potent_lib in $potential_libs; do\n\t\t  if eval echo \\\"$potent_lib\\\" 2>/dev/null \\\n\t\t      | sed 10q \\\n\t\t      | egrep \"$match_pattern_regex\" > /dev/null; then\n\t\t    newdeplibs=\"$newdeplibs $a_deplib\"\n\t\t    a_deplib=\"\"\n\t\t    break 2\n\t\t  fi\n\t\tdone\n\t      done\n\t      if test -n \"$a_deplib\" ; then\n\t\tdroppeddeps=yes\n\t\techo\n\t\techo \"*** Warning: This library needs some functionality provided by $a_deplib.\"\n\t\techo \"*** I have the capability to make that library automatically link in when\"\n\t\techo \"*** you link to this library.  But I can only do this if you have a\"\n\t\techo \"*** shared version of the library, which you do not appear to have.\"\n\t      fi\n\t    else\n\t      # Add a -L argument.\n\t      newdeplibs=\"$newdeplibs $a_deplib\"\n\t    fi\n\t  done # Gone through all deplibs.\n\t  ;;\n\tnone | unknown | *)\n\t  newdeplibs=\"\"\n\t  if $echo \"X $deplibs\" | $Xsed -e 's/ -lc$//' \\\n\t       -e 's/ -[LR][^ ]*//g' -e 's/[ \t]//g' |\n\t     grep . >/dev/null; then\n\t    echo\n\t    if test \"X$deplibs_check_method\" = \"Xnone\"; then\n\t      echo \"*** Warning: inter-library dependencies are not supported in this platform.\"\n\t    else\n\t      echo \"*** Warning: inter-library dependencies are not known to be supported.\"\n\t    fi\n\t    echo \"*** All declared inter-library dependencies are being dropped.\"\n\t    droppeddeps=yes\n\t  fi\n\t  ;;\n\tesac\n\tversuffix=$versuffix_save\n\tmajor=$major_save\n\trelease=$release_save\n\tlibname=$libname_save\n\tname=$name_save\n\n\tcase $host in\n\t*-*-rhapsody* | *-*-darwin1.[012])\n\t  # On Rhapsody replace the C library is the System framework\n\t  newdeplibs=`$echo \"X $newdeplibs\" | $Xsed -e 's/ -lc / -framework System /'`\n\t  ;;\n\tesac\n\n\tif test \"$droppeddeps\" = yes; then\n\t  if test \"$module\" = yes; then\n\t    echo\n\t    echo \"*** Warning: libtool could not satisfy all declared inter-library\"\n\t    echo \"*** dependencies of module $libname.  Therefore, libtool will create\"\n\t    echo \"*** a static module, that should work as long as the dlopening\"\n\t    echo \"*** application is linked with the -dlopen flag.\"\n\t    if test -z \"$global_symbol_pipe\"; then\n\t      echo\n\t      echo \"*** However, this would only work if libtool was able to extract symbol\"\n\t      echo \"*** lists from a program, using \\`nm' or equivalent, but libtool could\"\n\t      echo \"*** not find such a program.  So, this module is probably useless.\"\n\t      echo \"*** \\`nm' from GNU binutils and a full rebuild may help.\"\n\t    fi\n\t    if test \"$build_old_libs\" = no; then\n\t      oldlibs=\"$output_objdir/$libname.$libext\"\n\t      build_libtool_libs=module\n\t      build_old_libs=yes\n\t    else\n\t      build_libtool_libs=no\n\t    fi\n\t  else\n\t    echo \"*** The inter-library dependencies that have been dropped here will be\"\n\t    echo \"*** automatically added whenever a program is linked with this library\"\n\t    echo \"*** or is declared to -dlopen it.\"\n\n\t    if test $allow_undefined = no; then\n\t      echo\n\t      echo \"*** Since this library must not contain undefined symbols,\"\n\t      echo \"*** because either the platform does not support them or\"\n\t      echo \"*** it was explicitly requested with -no-undefined,\"\n\t      echo \"*** libtool will only create a static version of it.\"\n\t      if test \"$build_old_libs\" = no; then\n\t\toldlibs=\"$output_objdir/$libname.$libext\"\n\t\tbuild_libtool_libs=module\n\t\tbuild_old_libs=yes\n\t      else\n\t\tbuild_libtool_libs=no\n\t      fi\n\t    fi\n\t  fi\n\tfi\n\t# Done checking deplibs!\n\tdeplibs=$newdeplibs\n      fi\n\n      # All the library-specific variables (install_libdir is set above).\n      library_names=\n      old_library=\n      dlname=\n\n      # Test again, we may have decided not to build it any more\n      if test \"$build_libtool_libs\" = yes; then\n\tif test $hardcode_into_libs = yes; then\n\t  # Hardcode the library paths\n\t  hardcode_libdirs=\n\t  dep_rpath=\n\t  rpath=\"$finalize_rpath\"\n\t  test \"$mode\" != relink && rpath=\"$compile_rpath$rpath\"\n\t  for libdir in $rpath; do\n\t    if test -n \"$hardcode_libdir_flag_spec\"; then\n\t      if test -n \"$hardcode_libdir_separator\"; then\n\t\tif test -z \"$hardcode_libdirs\"; then\n\t\t  hardcode_libdirs=\"$libdir\"\n\t\telse\n\t\t  # Just accumulate the unique libdirs.\n\t\t  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in\n\t\t  *\"$hardcode_libdir_separator$libdir$hardcode_libdir_separator\"*)\n\t\t    ;;\n\t\t  *)\n\t\t    hardcode_libdirs=\"$hardcode_libdirs$hardcode_libdir_separator$libdir\"\n\t\t    ;;\n\t\t  esac\n\t\tfi\n\t      else\n\t\teval flag=\\\"$hardcode_libdir_flag_spec\\\"\n\t\tdep_rpath=\"$dep_rpath $flag\"\n\t      fi\n\t    elif test -n \"$runpath_var\"; then\n\t      case \"$perm_rpath \" in\n\t      *\" $libdir \"*) ;;\n\t      *) perm_rpath=\"$perm_rpath $libdir\" ;;\n\t      esac\n\t    fi\n\t  done\n\t  # Substitute the hardcoded libdirs into the rpath.\n\t  if test -n \"$hardcode_libdir_separator\" &&\n\t     test -n \"$hardcode_libdirs\"; then\n\t    libdir=\"$hardcode_libdirs\"\n\t    eval dep_rpath=\\\"$hardcode_libdir_flag_spec\\\"\n\t  fi\n\t  if test -n \"$runpath_var\" && test -n \"$perm_rpath\"; then\n\t    # We should set the runpath_var.\n\t    rpath=\n\t    for dir in $perm_rpath; do\n\t      rpath=\"$rpath$dir:\"\n\t    done\n\t    eval \"$runpath_var='$rpath\\$$runpath_var'; export $runpath_var\"\n\t  fi\n\t  test -n \"$dep_rpath\" && deplibs=\"$dep_rpath $deplibs\"\n\tfi\n\n\tshlibpath=\"$finalize_shlibpath\"\n\ttest \"$mode\" != relink && shlibpath=\"$compile_shlibpath$shlibpath\"\n\tif test -n \"$shlibpath\"; then\n\t  eval \"$shlibpath_var='$shlibpath\\$$shlibpath_var'; export $shlibpath_var\"\n\tfi\n\n\t# Get the real and link names of the library.\n\teval library_names=\\\"$library_names_spec\\\"\n\tset dummy $library_names\n\trealname=\"$2\"\n\tshift; shift\n\n\tif test -n \"$soname_spec\"; then\n\t  eval soname=\\\"$soname_spec\\\"\n\telse\n\t  soname=\"$realname\"\n\tfi\n\ttest -z \"$dlname\" && dlname=$soname\n\n\tlib=\"$output_objdir/$realname\"\n\tfor link\n\tdo\n\t  linknames=\"$linknames $link\"\n\tdone\n\n\t# Ensure that we have .o objects for linkers which dislike .lo\n\t# (e.g. aix) in case we are running --disable-static\n\tfor obj in $libobjs; do\n\t  xdir=`$echo \"X$obj\" | $Xsed -e 's%/[^/]*$%%'`\n\t  if test \"X$xdir\" = \"X$obj\"; then\n\t    xdir=\".\"\n\t  else\n\t    xdir=\"$xdir\"\n\t  fi\n\t  baseobj=`$echo \"X$obj\" | $Xsed -e 's%^.*/%%'`\n\t  oldobj=`$echo \"X$baseobj\" | $Xsed -e \"$lo2o\"`\n\t  if test ! -f $xdir/$oldobj; then\n\t    $show \"(cd $xdir && ${LN_S} $baseobj $oldobj)\"\n\t    $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?\n\t  fi\n\tdone\n\n\t# Use standard objects if they are pic\n\ttest -z \"$pic_flag\" && libobjs=`$echo \"X$libobjs\" | $SP2NL | $Xsed -e \"$lo2o\" | $NL2SP`\n\n\t# Prepare the list of exported symbols\n\tif test -z \"$export_symbols\"; then\n\t  if test \"$always_export_symbols\" = yes || test -n \"$export_symbols_regex\"; then\n\t    $show \"generating symbol list for \\`$libname.la'\"\n\t    export_symbols=\"$output_objdir/$libname.exp\"\n\t    $run $rm $export_symbols\n\t    eval cmds=\\\"$export_symbols_cmds\\\"\n\t    save_ifs=\"$IFS\"; IFS='~'\n\t    for cmd in $cmds; do\n\t      IFS=\"$save_ifs\"\n\t      $show \"$cmd\"\n\t      $run eval \"$cmd\" || exit $?\n\t    done\n\t    IFS=\"$save_ifs\"\n\t    if test -n \"$export_symbols_regex\"; then\n\t      $show \"egrep -e \\\"$export_symbols_regex\\\" \\\"$export_symbols\\\" > \\\"${export_symbols}T\\\"\"\n\t      $run eval 'egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"'\n\t      $show \"$mv \\\"${export_symbols}T\\\" \\\"$export_symbols\\\"\"\n\t      $run eval '$mv \"${export_symbols}T\" \"$export_symbols\"'\n\t    fi\n\t  fi\n\tfi\n\n\tif test -n \"$export_symbols\" && test -n \"$include_expsyms\"; then\n\t  $run eval '$echo \"X$include_expsyms\" | $SP2NL >> \"$export_symbols\"'\n\tfi\n\n\tif test -n \"$convenience\"; then\n\t  if test -n \"$whole_archive_flag_spec\"; then\n\t    eval libobjs=\\\"\\$libobjs $whole_archive_flag_spec\\\"\n\t  else\n\t    gentop=\"$output_objdir/${outputname}x\"\n\t    $show \"${rm}r $gentop\"\n\t    $run ${rm}r \"$gentop\"\n\t    $show \"mkdir $gentop\"\n\t    $run mkdir \"$gentop\"\n\t    status=$?\n\t    if test $status -ne 0 && test ! -d \"$gentop\"; then\n\t      exit $status\n\t    fi\n\t    generated=\"$generated $gentop\"\n\n\t    for xlib in $convenience; do\n\t      # Extract the objects.\n\t      case $xlib in\n\t      [\\\\/]* | [A-Za-z]:[\\\\/]*) xabs=\"$xlib\" ;;\n\t      *) xabs=`pwd`\"/$xlib\" ;;\n\t      esac\n\t      xlib=`$echo \"X$xlib\" | $Xsed -e 's%^.*/%%'`\n\t      xdir=\"$gentop/$xlib\"\n\n\t      $show \"${rm}r $xdir\"\n\t      $run ${rm}r \"$xdir\"\n\t      $show \"mkdir $xdir\"\n\t      $run mkdir \"$xdir\"\n\t      status=$?\n\t      if test $status -ne 0 && test ! -d \"$xdir\"; then\n\t\texit $status\n\t      fi\n\t      $show \"(cd $xdir && $AR x $xabs)\"\n\t      $run eval \"(cd \\$xdir && $AR x \\$xabs)\" || exit $?\n\n\t      libobjs=\"$libobjs \"`find $xdir -name \\*.o -print -o -name \\*.lo -print | $NL2SP`\n\t    done\n\t  fi\n\tfi\n\n\tif test \"$thread_safe\" = yes && test -n \"$thread_safe_flag_spec\"; then\n\t  eval flag=\\\"$thread_safe_flag_spec\\\"\n\t  linker_flags=\"$linker_flags $flag\"\n\tfi\n\n\t# Make a backup of the uninstalled library when relinking\n\tif test \"$mode\" = relink; then\n\t  $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?\n\tfi\n\n\t# Do each of the archive commands.\n\tif test -n \"$export_symbols\" && test -n \"$archive_expsym_cmds\"; then\n\t  eval cmds=\\\"$archive_expsym_cmds\\\"\n\telse\n\t  eval cmds=\\\"$archive_cmds\\\"\n\tfi\n\tsave_ifs=\"$IFS\"; IFS='~'\n\tfor cmd in $cmds; do\n\t  IFS=\"$save_ifs\"\n\t  $show \"$cmd\"\n\t  $run eval \"$cmd\" || exit $?\n\tdone\n\tIFS=\"$save_ifs\"\n\n\t# Restore the uninstalled library and exit\n\tif test \"$mode\" = relink; then\n\t  $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv \"$realname\"U $realname)' || exit $?\n\t  exit 0\n\tfi\n\n\t# Create links to the real library.\n\tfor linkname in $linknames; do\n\t  if test \"$realname\" != \"$linkname\"; then\n\t    $show \"(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)\"\n\t    $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?\n\t  fi\n\tdone\n\n\t# If -module or -export-dynamic was specified, set the dlname.\n\tif test \"$module\" = yes || test \"$export_dynamic\" = yes; then\n\t  # On all known operating systems, these are identical.\n\t  dlname=\"$soname\"\n\tfi\n      fi\n      ;;\n\n    obj)\n      if test -n \"$deplibs\"; then\n\t$echo \"$modename: warning: \\`-l' and \\`-L' are ignored for objects\" 1>&2\n      fi\n\n      if test -n \"$dlfiles$dlprefiles\" || test \"$dlself\" != no; then\n\t$echo \"$modename: warning: \\`-dlopen' is ignored for objects\" 1>&2\n      fi\n\n      if test -n \"$rpath\"; then\n\t$echo \"$modename: warning: \\`-rpath' is ignored for objects\" 1>&2\n      fi\n\n      if test -n \"$xrpath\"; then\n\t$echo \"$modename: warning: \\`-R' is ignored for objects\" 1>&2\n      fi\n\n      if test -n \"$vinfo\"; then\n\t$echo \"$modename: warning: \\`-version-info' is ignored for objects\" 1>&2\n      fi\n\n      if test -n \"$release\"; then\n\t$echo \"$modename: warning: \\`-release' is ignored for objects\" 1>&2\n      fi\n\n      case $output in\n      *.lo)\n\tif test -n \"$objs$old_deplibs\"; then\n\t  $echo \"$modename: cannot build library object \\`$output' from non-libtool objects\" 1>&2\n\t  exit 1\n\tfi\n\tlibobj=\"$output\"\n\tobj=`$echo \"X$output\" | $Xsed -e \"$lo2o\"`\n\t;;\n      *)\n\tlibobj=\n\tobj=\"$output\"\n\t;;\n      esac\n\n      # Delete the old objects.\n      $run $rm $obj $libobj\n\n      # Objects from convenience libraries.  This assumes\n      # single-version convenience libraries.  Whenever we create\n      # different ones for PIC/non-PIC, this we'll have to duplicate\n      # the extraction.\n      reload_conv_objs=\n      gentop=\n      # reload_cmds runs $LD directly, so let us get rid of\n      # -Wl from whole_archive_flag_spec\n      wl=\n\n      if test -n \"$convenience\"; then\n\tif test -n \"$whole_archive_flag_spec\"; then\n\t  eval reload_conv_objs=\\\"\\$reload_objs $whole_archive_flag_spec\\\"\n\telse\n\t  gentop=\"$output_objdir/${obj}x\"\n\t  $show \"${rm}r $gentop\"\n\t  $run ${rm}r \"$gentop\"\n\t  $show \"mkdir $gentop\"\n\t  $run mkdir \"$gentop\"\n\t  status=$?\n\t  if test $status -ne 0 && test ! -d \"$gentop\"; then\n\t    exit $status\n\t  fi\n\t  generated=\"$generated $gentop\"\n\n\t  for xlib in $convenience; do\n\t    # Extract the objects.\n\t    case $xlib in\n\t    [\\\\/]* | [A-Za-z]:[\\\\/]*) xabs=\"$xlib\" ;;\n\t    *) xabs=`pwd`\"/$xlib\" ;;\n\t    esac\n\t    xlib=`$echo \"X$xlib\" | $Xsed -e 's%^.*/%%'`\n\t    xdir=\"$gentop/$xlib\"\n\n\t    $show \"${rm}r $xdir\"\n\t    $run ${rm}r \"$xdir\"\n\t    $show \"mkdir $xdir\"\n\t    $run mkdir \"$xdir\"\n\t    status=$?\n\t    if test $status -ne 0 && test ! -d \"$xdir\"; then\n\t      exit $status\n\t    fi\n\t    $show \"(cd $xdir && $AR x $xabs)\"\n\t    $run eval \"(cd \\$xdir && $AR x \\$xabs)\" || exit $?\n\n\t    reload_conv_objs=\"$reload_objs \"`find $xdir -name \\*.o -print -o -name \\*.lo -print | $NL2SP`\n\t  done\n\tfi\n      fi\n\n      # Create the old-style object.\n      reload_objs=\"$objs$old_deplibs \"`$echo \"X$libobjs\" | $SP2NL | $Xsed -e '/\\.'${libext}$'/d' -e '/\\.lib$/d' -e \"$lo2o\" | $NL2SP`\" $reload_conv_objs\" ### testsuite: skip nested quoting test\n\n      output=\"$obj\"\n      eval cmds=\\\"$reload_cmds\\\"\n      save_ifs=\"$IFS\"; IFS='~'\n      for cmd in $cmds; do\n\tIFS=\"$save_ifs\"\n\t$show \"$cmd\"\n\t$run eval \"$cmd\" || exit $?\n      done\n      IFS=\"$save_ifs\"\n\n      # Exit if we aren't doing a library object file.\n      if test -z \"$libobj\"; then\n\tif test -n \"$gentop\"; then\n\t  $show \"${rm}r $gentop\"\n\t  $run ${rm}r $gentop\n\tfi\n\n\texit 0\n      fi\n\n      if test \"$build_libtool_libs\" != yes; then\n\tif test -n \"$gentop\"; then\n\t  $show \"${rm}r $gentop\"\n\t  $run ${rm}r $gentop\n\tfi\n\n\t# Create an invalid libtool object if no PIC, so that we don't\n\t# accidentally link it into a program.\n\t$show \"echo timestamp > $libobj\"\n\t$run eval \"echo timestamp > $libobj\" || exit $?\n\texit 0\n      fi\n\n      if test -n \"$pic_flag\" || test \"$pic_mode\" != default; then\n\t# Only do commands if we really have different PIC objects.\n\treload_objs=\"$libobjs $reload_conv_objs\"\n\toutput=\"$libobj\"\n\teval cmds=\\\"$reload_cmds\\\"\n\tsave_ifs=\"$IFS\"; IFS='~'\n\tfor cmd in $cmds; do\n\t  IFS=\"$save_ifs\"\n\t  $show \"$cmd\"\n\t  $run eval \"$cmd\" || exit $?\n\tdone\n\tIFS=\"$save_ifs\"\n      else\n\t# Just create a symlink.\n\t$show $rm $libobj\n\t$run $rm $libobj\n\txdir=`$echo \"X$libobj\" | $Xsed -e 's%/[^/]*$%%'`\n\tif test \"X$xdir\" = \"X$libobj\"; then\n\t  xdir=\".\"\n\telse\n\t  xdir=\"$xdir\"\n\tfi\n\tbaseobj=`$echo \"X$libobj\" | $Xsed -e 's%^.*/%%'`\n\toldobj=`$echo \"X$baseobj\" | $Xsed -e \"$lo2o\"`\n\t$show \"(cd $xdir && $LN_S $oldobj $baseobj)\"\n\t$run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?\n      fi\n\n      if test -n \"$gentop\"; then\n\t$show \"${rm}r $gentop\"\n\t$run ${rm}r $gentop\n      fi\n\n      exit 0\n      ;;\n\n    prog)\n      case $host in\n\t*cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;;\n      esac\n      if test -n \"$vinfo\"; then\n\t$echo \"$modename: warning: \\`-version-info' is ignored for programs\" 1>&2\n      fi\n\n      if test -n \"$release\"; then\n\t$echo \"$modename: warning: \\`-release' is ignored for programs\" 1>&2\n      fi\n\n      if test \"$preload\" = yes; then\n\tif test \"$dlopen_support\" = unknown && test \"$dlopen_self\" = unknown &&\n\t   test \"$dlopen_self_static\" = unknown; then\n\t  $echo \"$modename: warning: \\`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support.\"\n\tfi\n      fi\n\n      case $host in\n      *-*-rhapsody* | *-*-darwin1.[012])\n\t# On Rhapsody replace the C library is the System framework\n\tcompile_deplibs=`$echo \"X $compile_deplibs\" | $Xsed -e 's/ -lc / -framework System /'`\n\tfinalize_deplibs=`$echo \"X $finalize_deplibs\" | $Xsed -e 's/ -lc / -framework System /'`\n\t;;\n      esac\n\n      compile_command=\"$compile_command $compile_deplibs\"\n      finalize_command=\"$finalize_command $finalize_deplibs\"\n\n      if test -n \"$rpath$xrpath\"; then\n\t# If the user specified any rpath flags, then add them.\n\tfor libdir in $rpath $xrpath; do\n\t  # This is the magic to use -rpath.\n\t  case \"$finalize_rpath \" in\n\t  *\" $libdir \"*) ;;\n\t  *) finalize_rpath=\"$finalize_rpath $libdir\" ;;\n\t  esac\n\tdone\n      fi\n\n      # Now hardcode the library paths\n      rpath=\n      hardcode_libdirs=\n      for libdir in $compile_rpath $finalize_rpath; do\n\tif test -n \"$hardcode_libdir_flag_spec\"; then\n\t  if test -n \"$hardcode_libdir_separator\"; then\n\t    if test -z \"$hardcode_libdirs\"; then\n\t      hardcode_libdirs=\"$libdir\"\n\t    else\n\t      # Just accumulate the unique libdirs.\n\t      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in\n\t      *\"$hardcode_libdir_separator$libdir$hardcode_libdir_separator\"*)\n\t\t;;\n\t      *)\n\t\thardcode_libdirs=\"$hardcode_libdirs$hardcode_libdir_separator$libdir\"\n\t\t;;\n\t      esac\n\t    fi\n\t  else\n\t    eval flag=\\\"$hardcode_libdir_flag_spec\\\"\n\t    rpath=\"$rpath $flag\"\n\t  fi\n\telif test -n \"$runpath_var\"; then\n\t  case \"$perm_rpath \" in\n\t  *\" $libdir \"*) ;;\n\t  *) perm_rpath=\"$perm_rpath $libdir\" ;;\n\t  esac\n\tfi\n\tcase $host in\n\t*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)\n\t  case :$dllsearchpath: in\n\t  *\":$libdir:\"*) ;;\n\t  *) dllsearchpath=\"$dllsearchpath:$libdir\";;\n\t  esac\n\t  ;;\n\tesac\n      done\n      # Substitute the hardcoded libdirs into the rpath.\n      if test -n \"$hardcode_libdir_separator\" &&\n\t test -n \"$hardcode_libdirs\"; then\n\tlibdir=\"$hardcode_libdirs\"\n\teval rpath=\\\" $hardcode_libdir_flag_spec\\\"\n      fi\n      compile_rpath=\"$rpath\"\n\n      rpath=\n      hardcode_libdirs=\n      for libdir in $finalize_rpath; do\n\tif test -n \"$hardcode_libdir_flag_spec\"; then\n\t  if test -n \"$hardcode_libdir_separator\"; then\n\t    if test -z \"$hardcode_libdirs\"; then\n\t      hardcode_libdirs=\"$libdir\"\n\t    else\n\t      # Just accumulate the unique libdirs.\n\t      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in\n\t      *\"$hardcode_libdir_separator$libdir$hardcode_libdir_separator\"*)\n\t\t;;\n\t      *)\n\t\thardcode_libdirs=\"$hardcode_libdirs$hardcode_libdir_separator$libdir\"\n\t\t;;\n\t      esac\n\t    fi\n\t  else\n\t    eval flag=\\\"$hardcode_libdir_flag_spec\\\"\n\t    rpath=\"$rpath $flag\"\n\t  fi\n\telif test -n \"$runpath_var\"; then\n\t  case \"$finalize_perm_rpath \" in\n\t  *\" $libdir \"*) ;;\n\t  *) finalize_perm_rpath=\"$finalize_perm_rpath $libdir\" ;;\n\t  esac\n\tfi\n      done\n      # Substitute the hardcoded libdirs into the rpath.\n      if test -n \"$hardcode_libdir_separator\" &&\n\t test -n \"$hardcode_libdirs\"; then\n\tlibdir=\"$hardcode_libdirs\"\n\teval rpath=\\\" $hardcode_libdir_flag_spec\\\"\n      fi\n      finalize_rpath=\"$rpath\"\n\n      if test -n \"$libobjs\" && test \"$build_old_libs\" = yes; then\n\t# Transform all the library objects into standard objects.\n\tcompile_command=`$echo \"X$compile_command\" | $SP2NL | $Xsed -e \"$lo2o\" | $NL2SP`\n\tfinalize_command=`$echo \"X$finalize_command\" | $SP2NL | $Xsed -e \"$lo2o\" | $NL2SP`\n      fi\n\n      dlsyms=\n      if test -n \"$dlfiles$dlprefiles\" || test \"$dlself\" != no; then\n\tif test -n \"$NM\" && test -n \"$global_symbol_pipe\"; then\n\t  dlsyms=\"${outputname}S.c\"\n\telse\n\t  $echo \"$modename: not configured to extract global symbols from dlpreopened files\" 1>&2\n\tfi\n      fi\n\n      if test -n \"$dlsyms\"; then\n\tcase $dlsyms in\n\t\"\") ;;\n\t*.c)\n\t  # Discover the nlist of each of the dlfiles.\n\t  nlist=\"$output_objdir/${outputname}.nm\"\n\n\t  $show \"$rm $nlist ${nlist}S ${nlist}T\"\n\t  $run $rm \"$nlist\" \"${nlist}S\" \"${nlist}T\"\n\n\t  # Parse the name list into a source file.\n\t  $show \"creating $output_objdir/$dlsyms\"\n\n\t  test -z \"$run\" && $echo > \"$output_objdir/$dlsyms\" \"\\\n/* $dlsyms - symbol resolution table for \\`$outputname' dlsym emulation. */\n/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */\n\n#ifdef __cplusplus\nextern \\\"C\\\" {\n#endif\n\n/* Prevent the only kind of declaration conflicts we can make. */\n#define lt_preloaded_symbols some_other_symbol\n\n/* External symbol declarations for the compiler. */\\\n\"\n\n\t  if test \"$dlself\" = yes; then\n\t    $show \"generating symbol list for \\`$output'\"\n\n\t    test -z \"$run\" && $echo ': @PROGRAM@ ' > \"$nlist\"\n\n\t    # Add our own program objects to the symbol list.\n\t    progfiles=`$echo \"X$objs$old_deplibs\" | $SP2NL | $Xsed -e \"$lo2o\" | $NL2SP`\n\t    for arg in $progfiles; do\n\t      $show \"extracting global C symbols from \\`$arg'\"\n\t      $run eval \"$NM $arg | $global_symbol_pipe >> '$nlist'\"\n\t    done\n\n\t    if test -n \"$exclude_expsyms\"; then\n\t      $run eval 'egrep -v \" ($exclude_expsyms)$\" \"$nlist\" > \"$nlist\"T'\n\t      $run eval '$mv \"$nlist\"T \"$nlist\"'\n\t    fi\n\n\t    if test -n \"$export_symbols_regex\"; then\n\t      $run eval 'egrep -e \"$export_symbols_regex\" \"$nlist\" > \"$nlist\"T'\n\t      $run eval '$mv \"$nlist\"T \"$nlist\"'\n\t    fi\n\n\t    # Prepare the list of exported symbols\n\t    if test -z \"$export_symbols\"; then\n\t      export_symbols=\"$output_objdir/$output.exp\"\n\t      $run $rm $export_symbols\n\t      $run eval \"sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \\(.*\\)$/\\1/p' \"'< \"$nlist\" > \"$export_symbols\"'\n\t    else\n\t      $run eval \"sed -e 's/\\([][.*^$]\\)/\\\\\\1/g' -e 's/^/ /' -e 's/$/$/'\"' < \"$export_symbols\" > \"$output_objdir/$output.exp\"'\n\t      $run eval 'grep -f \"$output_objdir/$output.exp\" < \"$nlist\" > \"$nlist\"T'\n\t      $run eval 'mv \"$nlist\"T \"$nlist\"'\n\t    fi\n\t  fi\n\n\t  for arg in $dlprefiles; do\n\t    $show \"extracting global C symbols from \\`$arg'\"\n\t    name=`echo \"$arg\" | sed -e 's%^.*/%%'`\n\t    $run eval 'echo \": $name \" >> \"$nlist\"'\n\t    $run eval \"$NM $arg | $global_symbol_pipe >> '$nlist'\"\n\t  done\n\n\t  if test -z \"$run\"; then\n\t    # Make sure we have at least an empty file.\n\t    test -f \"$nlist\" || : > \"$nlist\"\n\n\t    if test -n \"$exclude_expsyms\"; then\n\t      egrep -v \" ($exclude_expsyms)$\" \"$nlist\" > \"$nlist\"T\n\t      $mv \"$nlist\"T \"$nlist\"\n\t    fi\n\n\t    # Try sorting and uniquifying the output.\n\t    if grep -v \"^: \" < \"$nlist\" | sort +2 | uniq > \"$nlist\"S; then\n\t      :\n\t    else\n\t      grep -v \"^: \" < \"$nlist\" > \"$nlist\"S\n\t    fi\n\n\t    if test -f \"$nlist\"S; then\n\t      eval \"$global_symbol_to_cdecl\"' < \"$nlist\"S >> \"$output_objdir/$dlsyms\"'\n\t    else\n\t      echo '/* NONE */' >> \"$output_objdir/$dlsyms\"\n\t    fi\n\n\t    $echo >> \"$output_objdir/$dlsyms\" \"\\\n\n#undef lt_preloaded_symbols\n\n#if defined (__STDC__) && __STDC__\n# define lt_ptr void *\n#else\n# define lt_ptr char *\n# define const\n#endif\n\n/* The mapping between symbol names and symbols. */\nconst struct {\n  const char *name;\n  lt_ptr address;\n}\nlt_preloaded_symbols[] =\n{\\\n\"\n\n\t    eval \"$global_symbol_to_c_name_address\" < \"$nlist\" >> \"$output_objdir/$dlsyms\"\n\n\t    $echo >> \"$output_objdir/$dlsyms\" \"\\\n  {0, (lt_ptr) 0}\n};\n\n/* This works around a problem in FreeBSD linker */\n#ifdef FREEBSD_WORKAROUND\nstatic const void *lt_preloaded_setup() {\n  return lt_preloaded_symbols;\n}\n#endif\n\n#ifdef __cplusplus\n}\n#endif\\\n\"\n\t  fi\n\n\t  pic_flag_for_symtable=\n\t  case $host in\n\t  # compiling the symbol table file with pic_flag works around\n\t  # a FreeBSD bug that causes programs to crash when -lm is\n\t  # linked before any other PIC object.  But we must not use\n\t  # pic_flag when linking with -static.  The problem exists in\n\t  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.\n\t  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)\n\t    case \"$compile_command \" in\n\t    *\" -static \"*) ;;\n\t    *) pic_flag_for_symtable=\" $pic_flag -DPIC -DFREEBSD_WORKAROUND\";;\n\t    esac;;\n\t  *-*-hpux*)\n\t    case \"$compile_command \" in\n\t    *\" -static \"*) ;;\n\t    *) pic_flag_for_symtable=\" $pic_flag -DPIC\";;\n\t    esac\n\t  esac\n\n\t  # Now compile the dynamic symbol file.\n\t  $show \"(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \\\"$dlsyms\\\")\"\n\t  $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")' || exit $?\n\n\t  # Clean up the generated files.\n\t  $show \"$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T\"\n\t  $run $rm \"$output_objdir/$dlsyms\" \"$nlist\" \"${nlist}S\" \"${nlist}T\"\n\n\t  # Transform the symbol file into the correct name.\n\t  compile_command=`$echo \"X$compile_command\" | $Xsed -e \"s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%\"`\n\t  finalize_command=`$echo \"X$finalize_command\" | $Xsed -e \"s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%\"`\n\t  ;;\n\t*)\n\t  $echo \"$modename: unknown suffix for \\`$dlsyms'\" 1>&2\n\t  exit 1\n\t  ;;\n\tesac\n      else\n\t# We keep going just in case the user didn't refer to\n\t# lt_preloaded_symbols.  The linker will fail if global_symbol_pipe\n\t# really was required.\n\n\t# Nullify the symbol file.\n\tcompile_command=`$echo \"X$compile_command\" | $Xsed -e \"s% @SYMFILE@%%\"`\n\tfinalize_command=`$echo \"X$finalize_command\" | $Xsed -e \"s% @SYMFILE@%%\"`\n      fi\n\n      if test $need_relink = no || test \"$build_libtool_libs\" != yes; then\n\t# Replace the output file specification.\n\tcompile_command=`$echo \"X$compile_command\" | $Xsed -e 's%@OUTPUT@%'\"$output\"'%g'`\n\tlink_command=\"$compile_command$compile_rpath\"\n\n\t# We have no uninstalled library dependencies, so finalize right now.\n\t$show \"$link_command\"\n\t$run eval \"$link_command\"\n\tstatus=$?\n\n\t# Delete the generated files.\n\tif test -n \"$dlsyms\"; then\n\t  $show \"$rm $output_objdir/${outputname}S.${objext}\"\n\t  $run $rm \"$output_objdir/${outputname}S.${objext}\"\n\tfi\n\n\texit $status\n      fi\n\n      if test -n \"$shlibpath_var\"; then\n\t# We should set the shlibpath_var\n\trpath=\n\tfor dir in $temp_rpath; do\n\t  case $dir in\n\t  [\\\\/]* | [A-Za-z]:[\\\\/]*)\n\t    # Absolute path.\n\t    rpath=\"$rpath$dir:\"\n\t    ;;\n\t  *)\n\t    # Relative path: add a thisdir entry.\n\t    rpath=\"$rpath\\$thisdir/$dir:\"\n\t    ;;\n\t  esac\n\tdone\n\ttemp_rpath=\"$rpath\"\n      fi\n\n      if test -n \"$compile_shlibpath$finalize_shlibpath\"; then\n\tcompile_command=\"$shlibpath_var=\\\"$compile_shlibpath$finalize_shlibpath\\$$shlibpath_var\\\" $compile_command\"\n      fi\n      if test -n \"$finalize_shlibpath\"; then\n\tfinalize_command=\"$shlibpath_var=\\\"$finalize_shlibpath\\$$shlibpath_var\\\" $finalize_command\"\n      fi\n\n      compile_var=\n      finalize_var=\n      if test -n \"$runpath_var\"; then\n\tif test -n \"$perm_rpath\"; then\n\t  # We should set the runpath_var.\n\t  rpath=\n\t  for dir in $perm_rpath; do\n\t    rpath=\"$rpath$dir:\"\n\t  done\n\t  compile_var=\"$runpath_var=\\\"$rpath\\$$runpath_var\\\" \"\n\tfi\n\tif test -n \"$finalize_perm_rpath\"; then\n\t  # We should set the runpath_var.\n\t  rpath=\n\t  for dir in $finalize_perm_rpath; do\n\t    rpath=\"$rpath$dir:\"\n\t  done\n\t  finalize_var=\"$runpath_var=\\\"$rpath\\$$runpath_var\\\" \"\n\tfi\n      fi\n\n      if test \"$no_install\" = yes; then\n\t# We don't need to create a wrapper script.\n\tlink_command=\"$compile_var$compile_command$compile_rpath\"\n\t# Replace the output file specification.\n\tlink_command=`$echo \"X$link_command\" | $Xsed -e 's%@OUTPUT@%'\"$output\"'%g'`\n\t# Delete the old output file.\n\t$run $rm $output\n\t# Link the executable and exit\n\t$show \"$link_command\"\n\t$run eval \"$link_command\" || exit $?\n\texit 0\n      fi\n\n      if test \"$hardcode_action\" = relink; then\n\t# Fast installation is not supported\n\tlink_command=\"$compile_var$compile_command$compile_rpath\"\n\trelink_command=\"$finalize_var$finalize_command$finalize_rpath\"\n\n\t$echo \"$modename: warning: this platform does not like uninstalled shared libraries\" 1>&2\n\t$echo \"$modename: \\`$output' will be relinked during installation\" 1>&2\n      else\n\tif test \"$fast_install\" != no; then\n\t  link_command=\"$finalize_var$compile_command$finalize_rpath\"\n\t  if test \"$fast_install\" = yes; then\n\t    relink_command=`$echo \"X$compile_var$compile_command$compile_rpath\" | $Xsed -e 's%@OUTPUT@%\\$progdir/\\$file%g'`\n\t  else\n\t    # fast_install is set to needless\n\t    relink_command=\n\t  fi\n\telse\n\t  link_command=\"$compile_var$compile_command$compile_rpath\"\n\t  relink_command=\"$finalize_var$finalize_command$finalize_rpath\"\n\tfi\n      fi\n\n      # Replace the output file specification.\n      link_command=`$echo \"X$link_command\" | $Xsed -e 's%@OUTPUT@%'\"$output_objdir/$outputname\"'%g'`\n\n      # Delete the old output files.\n      $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname\n\n      $show \"$link_command\"\n      $run eval \"$link_command\" || exit $?\n\n      # Now create the wrapper script.\n      $show \"creating $output\"\n\n      # Quote the relink command for shipping.\n      if test -n \"$relink_command\"; then\n\t# Preserve any variables that may affect compiler behavior\n\tfor var in $variables_saved_for_relink; do\n\t  if eval test -z \\\"\\${$var+set}\\\"; then\n\t    relink_command=\"{ test -z \\\"\\${$var+set}\\\" || unset $var || { $var=; export $var; }; }; $relink_command\"\n\t  elif eval var_value=\\$$var; test -z \"$var_value\"; then\n\t    relink_command=\"$var=; export $var; $relink_command\"\n\t  else\n\t    var_value=`$echo \"X$var_value\" | $Xsed -e \"$sed_quote_subst\"`\n\t    relink_command=\"$var=\\\"$var_value\\\"; export $var; $relink_command\"\n\t  fi\n\tdone\n\trelink_command=\"cd `pwd`; $relink_command\"\n\trelink_command=`$echo \"X$relink_command\" | $Xsed -e \"$sed_quote_subst\"`\n      fi\n\n      # Quote $echo for shipping.\n      if test \"X$echo\" = \"X$SHELL $0 --fallback-echo\"; then\n\tcase $0 in\n\t[\\\\/]* | [A-Za-z]:[\\\\/]*) qecho=\"$SHELL $0 --fallback-echo\";;\n\t*) qecho=\"$SHELL `pwd`/$0 --fallback-echo\";;\n\tesac\n\tqecho=`$echo \"X$qecho\" | $Xsed -e \"$sed_quote_subst\"`\n      else\n\tqecho=`$echo \"X$echo\" | $Xsed -e \"$sed_quote_subst\"`\n      fi\n\n      # Only actually do things if our run command is non-null.\n      if test -z \"$run\"; then\n\t# win32 will think the script is a binary if it has\n\t# a .exe suffix, so we strip it off here.\n\tcase $output in\n\t  *.exe) output=`echo $output|sed 's,.exe$,,'` ;;\n\tesac\n\t# test for cygwin because mv fails w/o .exe extensions\n\tcase $host in\n\t  *cygwin*) exeext=.exe ;;\n\t  *) exeext= ;;\n\tesac\n\t$rm $output\n\ttrap \"$rm $output; exit 1\" 1 2 15\n\n\t$echo > $output \"\\\n#! $SHELL\n\n# $output - temporary wrapper script for $objdir/$outputname\n# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP\n#\n# The $output program cannot be directly executed until all the libtool\n# libraries that it depends on are installed.\n#\n# This wrapper script should never be moved out of the build directory.\n# If it is, it will not operate correctly.\n\n# Sed substitution that helps us do robust quoting.  It backslashifies\n# metacharacters that are still active within double-quoted strings.\nXsed='sed -e 1s/^X//'\nsed_quote_subst='$sed_quote_subst'\n\n# The HP-UX ksh and POSIX shell print the target directory to stdout\n# if CDPATH is set.\nif test \\\"\\${CDPATH+set}\\\" = set; then CDPATH=:; export CDPATH; fi\n\nrelink_command=\\\"$relink_command\\\"\n\n# This environment variable determines our operation mode.\nif test \\\"\\$libtool_install_magic\\\" = \\\"$magic\\\"; then\n  # install mode needs the following variable:\n  notinst_deplibs='$notinst_deplibs'\nelse\n  # When we are sourced in execute mode, \\$file and \\$echo are already set.\n  if test \\\"\\$libtool_execute_magic\\\" != \\\"$magic\\\"; then\n    echo=\\\"$qecho\\\"\n    file=\\\"\\$0\\\"\n    # Make sure echo works.\n    if test \\\"X\\$1\\\" = X--no-reexec; then\n      # Discard the --no-reexec flag, and continue.\n      shift\n    elif test \\\"X\\`(\\$echo '\\t') 2>/dev/null\\`\\\" = 'X\\t'; then\n      # Yippee, \\$echo works!\n      :\n    else\n      # Restart under the correct shell, and then maybe \\$echo will work.\n      exec $SHELL \\\"\\$0\\\" --no-reexec \\${1+\\\"\\$@\\\"}\n    fi\n  fi\\\n\"\n\t$echo >> $output \"\\\n\n  # Find the directory that this script lives in.\n  thisdir=\\`\\$echo \\\"X\\$file\\\" | \\$Xsed -e 's%/[^/]*$%%'\\`\n  test \\\"x\\$thisdir\\\" = \\\"x\\$file\\\" && thisdir=.\n\n  # Follow symbolic links until we get to the real thisdir.\n  file=\\`ls -ld \\\"\\$file\\\" | sed -n 's/.*-> //p'\\`\n  while test -n \\\"\\$file\\\"; do\n    destdir=\\`\\$echo \\\"X\\$file\\\" | \\$Xsed -e 's%/[^/]*\\$%%'\\`\n\n    # If there was a directory component, then change thisdir.\n    if test \\\"x\\$destdir\\\" != \\\"x\\$file\\\"; then\n      case \\\"\\$destdir\\\" in\n      [\\\\\\\\/]* | [A-Za-z]:[\\\\\\\\/]*) thisdir=\\\"\\$destdir\\\" ;;\n      *) thisdir=\\\"\\$thisdir/\\$destdir\\\" ;;\n      esac\n    fi\n\n    file=\\`\\$echo \\\"X\\$file\\\" | \\$Xsed -e 's%^.*/%%'\\`\n    file=\\`ls -ld \\\"\\$thisdir/\\$file\\\" | sed -n 's/.*-> //p'\\`\n  done\n\n  # Try to get the absolute directory name.\n  absdir=\\`cd \\\"\\$thisdir\\\" && pwd\\`\n  test -n \\\"\\$absdir\\\" && thisdir=\\\"\\$absdir\\\"\n\"\n\n\tif test \"$fast_install\" = yes; then\n\t  echo >> $output \"\\\n  program=lt-'$outputname'$exeext\n  progdir=\\\"\\$thisdir/$objdir\\\"\n\n  if test ! -f \\\"\\$progdir/\\$program\\\" || \\\\\n     { file=\\`ls -1dt \\\"\\$progdir/\\$program\\\" \\\"\\$progdir/../\\$program\\\" 2>/dev/null | sed 1q\\`; \\\\\n       test \\\"X\\$file\\\" != \\\"X\\$progdir/\\$program\\\"; }; then\n\n    file=\\\"\\$\\$-\\$program\\\"\n\n    if test ! -d \\\"\\$progdir\\\"; then\n      $mkdir \\\"\\$progdir\\\"\n    else\n      $rm \\\"\\$progdir/\\$file\\\"\n    fi\"\n\n\t  echo >> $output \"\\\n\n    # relink executable if necessary\n    if test -n \\\"\\$relink_command\\\"; then\n      if relink_command_output=\\`eval \\$relink_command 2>&1\\`; then :\n      else\n\t$echo \\\"\\$relink_command_output\\\" >&2\n\t$rm \\\"\\$progdir/\\$file\\\"\n\texit 1\n      fi\n    fi\n\n    $mv \\\"\\$progdir/\\$file\\\" \\\"\\$progdir/\\$program\\\" 2>/dev/null ||\n    { $rm \\\"\\$progdir/\\$program\\\";\n      $mv \\\"\\$progdir/\\$file\\\" \\\"\\$progdir/\\$program\\\"; }\n    $rm \\\"\\$progdir/\\$file\\\"\n  fi\"\n\telse\n\t  echo >> $output \"\\\n  program='$outputname'\n  progdir=\\\"\\$thisdir/$objdir\\\"\n\"\n\tfi\n\n\techo >> $output \"\\\n\n  if test -f \\\"\\$progdir/\\$program\\\"; then\"\n\n\t# Export our shlibpath_var if we have one.\n\tif test \"$shlibpath_overrides_runpath\" = yes && test -n \"$shlibpath_var\" && test -n \"$temp_rpath\"; then\n\t  $echo >> $output \"\\\n    # Add our own library path to $shlibpath_var\n    $shlibpath_var=\\\"$temp_rpath\\$$shlibpath_var\\\"\n\n    # Some systems cannot cope with colon-terminated $shlibpath_var\n    # The second colon is a workaround for a bug in BeOS R4 sed\n    $shlibpath_var=\\`\\$echo \\\"X\\$$shlibpath_var\\\" | \\$Xsed -e 's/::*\\$//'\\`\n\n    export $shlibpath_var\n\"\n\tfi\n\n\t# fixup the dll searchpath if we need to.\n\tif test -n \"$dllsearchpath\"; then\n\t  $echo >> $output \"\\\n    # Add the dll search path components to the executable PATH\n    PATH=$dllsearchpath:\\$PATH\n\"\n\tfi\n\n\t$echo >> $output \"\\\n    if test \\\"\\$libtool_execute_magic\\\" != \\\"$magic\\\"; then\n      # Run the actual program with our arguments.\n\"\n\tcase $host in\n\t# win32 systems need to use the prog path for dll\n\t# lookup to work\n\t*-*-cygwin* | *-*-pw32*)\n\t  $echo >> $output \"\\\n      exec \\$progdir/\\$program \\${1+\\\"\\$@\\\"}\n\"\n\t  ;;\n\n\t# Backslashes separate directories on plain windows\n\t*-*-mingw | *-*-os2*)\n\t  $echo >> $output \"\\\n      exec \\$progdir\\\\\\\\\\$program \\${1+\\\"\\$@\\\"}\n\"\n\t  ;;\n\n\t*)\n\t  $echo >> $output \"\\\n      # Export the path to the program.\n      PATH=\\\"\\$progdir:\\$PATH\\\"\n      export PATH\n\n      exec \\$program \\${1+\\\"\\$@\\\"}\n\"\n\t  ;;\n\tesac\n\t$echo >> $output \"\\\n      \\$echo \\\"\\$0: cannot exec \\$program \\${1+\\\"\\$@\\\"}\\\"\n      exit 1\n    fi\n  else\n    # The program doesn't exist.\n    \\$echo \\\"\\$0: error: \\$progdir/\\$program does not exist\\\" 1>&2\n    \\$echo \\\"This script is just a wrapper for \\$program.\\\" 1>&2\n    echo \\\"See the $PACKAGE documentation for more information.\\\" 1>&2\n    exit 1\n  fi\nfi\\\n\"\n\tchmod +x $output\n      fi\n      exit 0\n      ;;\n    esac\n\n    # See if we need to build an old-fashioned archive.\n    for oldlib in $oldlibs; do\n\n      if test \"$build_libtool_libs\" = convenience; then\n\toldobjs=\"$libobjs_save\"\n\taddlibs=\"$convenience\"\n\tbuild_libtool_libs=no\n      else\n\tif test \"$build_libtool_libs\" = module; then\n\t  oldobjs=\"$libobjs_save\"\n\t  build_libtool_libs=no\n\telse\n\t  oldobjs=\"$objs$old_deplibs \"`$echo \"X$libobjs_save\" | $SP2NL | $Xsed -e '/\\.'${libext}'$/d' -e '/\\.lib$/d' -e \"$lo2o\" | $NL2SP`\n\tfi\n\taddlibs=\"$old_convenience\"\n      fi\n\n      if test -n \"$addlibs\"; then\n\tgentop=\"$output_objdir/${outputname}x\"\n\t$show \"${rm}r $gentop\"\n\t$run ${rm}r \"$gentop\"\n\t$show \"mkdir $gentop\"\n\t$run mkdir \"$gentop\"\n\tstatus=$?\n\tif test $status -ne 0 && test ! -d \"$gentop\"; then\n\t  exit $status\n\tfi\n\tgenerated=\"$generated $gentop\"\n\n\t# Add in members from convenience archives.\n\tfor xlib in $addlibs; do\n\t  # Extract the objects.\n\t  case $xlib in\n\t  [\\\\/]* | [A-Za-z]:[\\\\/]*) xabs=\"$xlib\" ;;\n\t  *) xabs=`pwd`\"/$xlib\" ;;\n\t  esac\n\t  xlib=`$echo \"X$xlib\" | $Xsed -e 's%^.*/%%'`\n\t  xdir=\"$gentop/$xlib\"\n\n\t  $show \"${rm}r $xdir\"\n\t  $run ${rm}r \"$xdir\"\n\t  $show \"mkdir $xdir\"\n\t  $run mkdir \"$xdir\"\n\t  status=$?\n\t  if test $status -ne 0 && test ! -d \"$xdir\"; then\n\t    exit $status\n\t  fi\n\t  $show \"(cd $xdir && $AR x $xabs)\"\n\t  $run eval \"(cd \\$xdir && $AR x \\$xabs)\" || exit $?\n\n\t  oldobjs=\"$oldobjs \"`find $xdir -name \\*.${objext} -print -o -name \\*.lo -print | $NL2SP`\n\tdone\n      fi\n\n      # Do each command in the archive commands.\n      if test -n \"$old_archive_from_new_cmds\" && test \"$build_libtool_libs\" = yes; then\n\teval cmds=\\\"$old_archive_from_new_cmds\\\"\n      else\n\t# Ensure that we have .o objects in place in case we decided\n\t# not to build a shared library, and have fallen back to building\n\t# static libs even though --disable-static was passed!\n\tfor oldobj in $oldobjs; do\n\t  if test ! -f $oldobj; then\n\t    xdir=`$echo \"X$oldobj\" | $Xsed -e 's%/[^/]*$%%'`\n\t    if test \"X$xdir\" = \"X$oldobj\"; then\n\t      xdir=\".\"\n\t    else\n\t      xdir=\"$xdir\"\n\t    fi\n\t    baseobj=`$echo \"X$oldobj\" | $Xsed -e 's%^.*/%%'`\n\t    obj=`$echo \"X$baseobj\" | $Xsed -e \"$o2lo\"`\n\t    $show \"(cd $xdir && ${LN_S} $obj $baseobj)\"\n\t    $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?\n\t  fi\n\tdone\n\n\teval cmds=\\\"$old_archive_cmds\\\"\n      fi\n      save_ifs=\"$IFS\"; IFS='~'\n      for cmd in $cmds; do\n\tIFS=\"$save_ifs\"\n\t$show \"$cmd\"\n\t$run eval \"$cmd\" || exit $?\n      done\n      IFS=\"$save_ifs\"\n    done\n\n    if test -n \"$generated\"; then\n      $show \"${rm}r$generated\"\n      $run ${rm}r$generated\n    fi\n\n    # Now create the libtool archive.\n    case $output in\n    *.la)\n      old_library=\n      test \"$build_old_libs\" = yes && old_library=\"$libname.$libext\"\n      $show \"creating $output\"\n\n      # Preserve any variables that may affect compiler behavior\n      for var in $variables_saved_for_relink; do\n\tif eval test -z \\\"\\${$var+set}\\\"; then\n\t  relink_command=\"{ test -z \\\"\\${$var+set}\\\" || unset $var || { $var=; export $var; }; }; $relink_command\"\n\telif eval var_value=\\$$var; test -z \"$var_value\"; then\n\t  relink_command=\"$var=; export $var; $relink_command\"\n\telse\n\t  var_value=`$echo \"X$var_value\" | $Xsed -e \"$sed_quote_subst\"`\n\t  relink_command=\"$var=\\\"$var_value\\\"; export $var; $relink_command\"\n\tfi\n      done\n      # Quote the link command for shipping.\n      relink_command=\"cd `pwd`; $SHELL $0 --mode=relink $libtool_args\"\n      relink_command=`$echo \"X$relink_command\" | $Xsed -e \"$sed_quote_subst\"`\n\n      # Only create the output if not a dry run.\n      if test -z \"$run\"; then\n\tfor installed in no yes; do\n\t  if test \"$installed\" = yes; then\n\t    if test -z \"$install_libdir\"; then\n\t      break\n\t    fi\n\t    output=\"$output_objdir/$outputname\"i\n\t    # Replace all uninstalled libtool libraries with the installed ones\n\t    newdependency_libs=\n\t    for deplib in $dependency_libs; do\n\t      case $deplib in\n\t      *.la)\n\t\tname=`$echo \"X$deplib\" | $Xsed -e 's%^.*/%%'`\n\t\teval libdir=`sed -n -e 's/^libdir=\\(.*\\)$/\\1/p' $deplib`\n\t\tif test -z \"$libdir\"; then\n\t\t  $echo \"$modename: \\`$deplib' is not a valid libtool archive\" 1>&2\n\t\t  exit 1\n\t\tfi\n\t\tnewdependency_libs=\"$newdependency_libs $libdir/$name\"\n\t\t;;\n\t      *) newdependency_libs=\"$newdependency_libs $deplib\" ;;\n\t      esac\n\t    done\n\t    dependency_libs=\"$newdependency_libs\"\n\t    newdlfiles=\n\t    for lib in $dlfiles; do\n\t      name=`$echo \"X$lib\" | $Xsed -e 's%^.*/%%'`\n\t      eval libdir=`sed -n -e 's/^libdir=\\(.*\\)$/\\1/p' $lib`\n\t      if test -z \"$libdir\"; then\n\t\t$echo \"$modename: \\`$lib' is not a valid libtool archive\" 1>&2\n\t\texit 1\n\t      fi\n\t      newdlfiles=\"$newdlfiles $libdir/$name\"\n\t    done\n\t    dlfiles=\"$newdlfiles\"\n\t    newdlprefiles=\n\t    for lib in $dlprefiles; do\n\t      name=`$echo \"X$lib\" | $Xsed -e 's%^.*/%%'`\n\t      eval libdir=`sed -n -e 's/^libdir=\\(.*\\)$/\\1/p' $lib`\n\t      if test -z \"$libdir\"; then\n\t\t$echo \"$modename: \\`$lib' is not a valid libtool archive\" 1>&2\n\t\texit 1\n\t      fi\n\t      newdlprefiles=\"$newdlprefiles $libdir/$name\"\n\t    done\n\t    dlprefiles=\"$newdlprefiles\"\n\t  fi\n\t  $rm $output\n\t  # place dlname in correct position for cygwin\n\t  tdlname=$dlname\n\t  case $host,$output,$installed,$module,$dlname in\n\t    *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;\n\t  esac\n\t  $echo > $output \"\\\n# $outputname - a libtool library file\n# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP\n#\n# Please DO NOT delete this file!\n# It is necessary for linking the library.\n\n# The name that we can dlopen(3).\ndlname='$tdlname'\n\n# Names of this library.\nlibrary_names='$library_names'\n\n# The name of the static archive.\nold_library='$old_library'\n\n# Libraries that this one depends upon.\ndependency_libs='$dependency_libs'\n\n# Version information for $libname.\ncurrent=$current\nage=$age\nrevision=$revision\n\n# Is this an already installed library?\ninstalled=$installed\n\n# Files to dlopen/dlpreopen\ndlopen='$dlfiles'\ndlpreopen='$dlprefiles'\n\n# Directory that this library needs to be installed in:\nlibdir='$install_libdir'\"\n\t  if test \"$installed\" = no && test $need_relink = yes; then\n\t    $echo >> $output \"\\\nrelink_command=\\\"$relink_command\\\"\"\n\t  fi\n\tdone\n      fi\n\n      # Do a symbolic link so that the libtool archive can be found in\n      # LD_LIBRARY_PATH before the program is installed.\n      $show \"(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)\"\n      $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?\n      ;;\n    esac\n    exit 0\n    ;;\n\n  # libtool install mode\n  install)\n    modename=\"$modename: install\"\n\n    # There may be an optional sh(1) argument at the beginning of\n    # install_prog (especially on Windows NT).\n    if test \"$nonopt\" = \"$SHELL\" || test \"$nonopt\" = /bin/sh ||\n       # Allow the use of GNU shtool's install command.\n       $echo \"X$nonopt\" | $Xsed | grep shtool > /dev/null; then\n      # Aesthetically quote it.\n      arg=`$echo \"X$nonopt\" | $Xsed -e \"$sed_quote_subst\"`\n      case $arg in\n      *[\\[\\~\\#\\^\\&\\*\\(\\)\\{\\}\\|\\;\\<\\>\\?\\'\\ \\\t]*|*]*)\n\targ=\"\\\"$arg\\\"\"\n\t;;\n      esac\n      install_prog=\"$arg \"\n      arg=\"$1\"\n      shift\n    else\n      install_prog=\n      arg=\"$nonopt\"\n    fi\n\n    # The real first argument should be the name of the installation program.\n    # Aesthetically quote it.\n    arg=`$echo \"X$arg\" | $Xsed -e \"$sed_quote_subst\"`\n    case $arg in\n    *[\\[\\~\\#\\^\\&\\*\\(\\)\\{\\}\\|\\;\\<\\>\\?\\'\\ \\\t]*|*]*)\n      arg=\"\\\"$arg\\\"\"\n      ;;\n    esac\n    install_prog=\"$install_prog$arg\"\n\n    # We need to accept at least all the BSD install flags.\n    dest=\n    files=\n    opts=\n    prev=\n    install_type=\n    isdir=no\n    stripme=\n    for arg\n    do\n      if test -n \"$dest\"; then\n\tfiles=\"$files $dest\"\n\tdest=\"$arg\"\n\tcontinue\n      fi\n\n      case $arg in\n      -d) isdir=yes ;;\n      -f) prev=\"-f\" ;;\n      -g) prev=\"-g\" ;;\n      -m) prev=\"-m\" ;;\n      -o) prev=\"-o\" ;;\n      -s)\n\tstripme=\" -s\"\n\tcontinue\n\t;;\n      -*) ;;\n\n      *)\n\t# If the previous option needed an argument, then skip it.\n\tif test -n \"$prev\"; then\n\t  prev=\n\telse\n\t  dest=\"$arg\"\n\t  continue\n\tfi\n\t;;\n      esac\n\n      # Aesthetically quote the argument.\n      arg=`$echo \"X$arg\" | $Xsed -e \"$sed_quote_subst\"`\n      case $arg in\n      *[\\[\\~\\#\\^\\&\\*\\(\\)\\{\\}\\|\\;\\<\\>\\?\\'\\ \\\t]*|*]*)\n\targ=\"\\\"$arg\\\"\"\n\t;;\n      esac\n      install_prog=\"$install_prog $arg\"\n    done\n\n    if test -z \"$install_prog\"; then\n      $echo \"$modename: you must specify an install program\" 1>&2\n      $echo \"$help\" 1>&2\n      exit 1\n    fi\n\n    if test -n \"$prev\"; then\n      $echo \"$modename: the \\`$prev' option requires an argument\" 1>&2\n      $echo \"$help\" 1>&2\n      exit 1\n    fi\n\n    if test -z \"$files\"; then\n      if test -z \"$dest\"; then\n\t$echo \"$modename: no file or destination specified\" 1>&2\n      else\n\t$echo \"$modename: you must specify a destination\" 1>&2\n      fi\n      $echo \"$help\" 1>&2\n      exit 1\n    fi\n\n    # Strip any trailing slash from the destination.\n    dest=`$echo \"X$dest\" | $Xsed -e 's%/$%%'`\n\n    # Check to see that the destination is a directory.\n    test -d \"$dest\" && isdir=yes\n    if test \"$isdir\" = yes; then\n      destdir=\"$dest\"\n      destname=\n    else\n      destdir=`$echo \"X$dest\" | $Xsed -e 's%/[^/]*$%%'`\n      test \"X$destdir\" = \"X$dest\" && destdir=.\n      destname=`$echo \"X$dest\" | $Xsed -e 's%^.*/%%'`\n\n      # Not a directory, so check to see that there is only one file specified.\n      set dummy $files\n      if test $# -gt 2; then\n\t$echo \"$modename: \\`$dest' is not a directory\" 1>&2\n\t$echo \"$help\" 1>&2\n\texit 1\n      fi\n    fi\n    case $destdir in\n    [\\\\/]* | [A-Za-z]:[\\\\/]*) ;;\n    *)\n      for file in $files; do\n\tcase $file in\n\t*.lo) ;;\n\t*)\n\t  $echo \"$modename: \\`$destdir' must be an absolute directory name\" 1>&2\n\t  $echo \"$help\" 1>&2\n\t  exit 1\n\t  ;;\n\tesac\n      done\n      ;;\n    esac\n\n    # This variable tells wrapper scripts just to set variables rather\n    # than running their programs.\n    libtool_install_magic=\"$magic\"\n\n    staticlibs=\n    future_libdirs=\n    current_libdirs=\n    for file in $files; do\n\n      # Do each installation.\n      case $file in\n      *.$libext)\n\t# Do the static libraries later.\n\tstaticlibs=\"$staticlibs $file\"\n\t;;\n\n      *.la)\n\t# Check to see that this really is a libtool archive.\n\tif (sed -e '2q' $file | egrep \"^# Generated by .*$PACKAGE\") >/dev/null 2>&1; then :\n\telse\n\t  $echo \"$modename: \\`$file' is not a valid libtool archive\" 1>&2\n\t  $echo \"$help\" 1>&2\n\t  exit 1\n\tfi\n\n\tlibrary_names=\n\told_library=\n\trelink_command=\n\t# If there is no directory component, then add one.\n\tcase $file in\n\t*/* | *\\\\*) . $file ;;\n\t*) . ./$file ;;\n\tesac\n\n\t# Add the libdir to current_libdirs if it is the destination.\n\tif test \"X$destdir\" = \"X$libdir\"; then\n\t  case \"$current_libdirs \" in\n\t  *\" $libdir \"*) ;;\n\t  *) current_libdirs=\"$current_libdirs $libdir\" ;;\n\t  esac\n\telse\n\t  # Note the libdir as a future libdir.\n\t  case \"$future_libdirs \" in\n\t  *\" $libdir \"*) ;;\n\t  *) future_libdirs=\"$future_libdirs $libdir\" ;;\n\t  esac\n\tfi\n\n\tdir=`$echo \"X$file\" | $Xsed -e 's%/[^/]*$%%'`/\n\ttest \"X$dir\" = \"X$file/\" && dir=\n\tdir=\"$dir$objdir\"\n\n\tif test -n \"$relink_command\"; then\n\t  $echo \"$modename: warning: relinking \\`$file'\" 1>&2\n\t  $show \"$relink_command\"\n\t  if $run eval \"$relink_command\"; then :\n\t  else\n\t    $echo \"$modename: error: relink \\`$file' with the above command before installing it\" 1>&2\n\t    continue\n\t  fi\n\tfi\n\n\t# See the names of the shared library.\n\tset dummy $library_names\n\tif test -n \"$2\"; then\n\t  realname=\"$2\"\n\t  shift\n\t  shift\n\n\t  srcname=\"$realname\"\n\t  test -n \"$relink_command\" && srcname=\"$realname\"T\n\n\t  # Install the shared library and build the symlinks.\n\t  $show \"$install_prog $dir/$srcname $destdir/$realname\"\n\t  $run eval \"$install_prog $dir/$srcname $destdir/$realname\" || exit $?\n\t  if test -n \"$stripme\" && test -n \"$striplib\"; then\n\t    $show \"$striplib $destdir/$realname\"\n\t    $run eval \"$striplib $destdir/$realname\" || exit $?\n\t  fi\n\n\t  if test $# -gt 0; then\n\t    # Delete the old symlinks, and create new ones.\n\t    for linkname\n\t    do\n\t      if test \"$linkname\" != \"$realname\"; then\n\t\t$show \"(cd $destdir && $rm $linkname && $LN_S $realname $linkname)\"\n\t\t$run eval \"(cd $destdir && $rm $linkname && $LN_S $realname $linkname)\"\n\t      fi\n\t    done\n\t  fi\n\n\t  # Do each command in the postinstall commands.\n\t  lib=\"$destdir/$realname\"\n\t  eval cmds=\\\"$postinstall_cmds\\\"\n\t  save_ifs=\"$IFS\"; IFS='~'\n\t  for cmd in $cmds; do\n\t    IFS=\"$save_ifs\"\n\t    $show \"$cmd\"\n\t    $run eval \"$cmd\" || exit $?\n\t  done\n\t  IFS=\"$save_ifs\"\n\tfi\n\n\t# Install the pseudo-library for information purposes.\n\tname=`$echo \"X$file\" | $Xsed -e 's%^.*/%%'`\n\tinstname=\"$dir/$name\"i\n\t$show \"$install_prog $instname $destdir/$name\"\n\t$run eval \"$install_prog $instname $destdir/$name\" || exit $?\n\n\t# Maybe install the static library, too.\n\ttest -n \"$old_library\" && staticlibs=\"$staticlibs $dir/$old_library\"\n\t;;\n\n      *.lo)\n\t# Install (i.e. copy) a libtool object.\n\n\t# Figure out destination file name, if it wasn't already specified.\n\tif test -n \"$destname\"; then\n\t  destfile=\"$destdir/$destname\"\n\telse\n\t  destfile=`$echo \"X$file\" | $Xsed -e 's%^.*/%%'`\n\t  destfile=\"$destdir/$destfile\"\n\tfi\n\n\t# Deduce the name of the destination old-style object file.\n\tcase $destfile in\n\t*.lo)\n\t  staticdest=`$echo \"X$destfile\" | $Xsed -e \"$lo2o\"`\n\t  ;;\n\t*.$objext)\n\t  staticdest=\"$destfile\"\n\t  destfile=\n\t  ;;\n\t*)\n\t  $echo \"$modename: cannot copy a libtool object to \\`$destfile'\" 1>&2\n\t  $echo \"$help\" 1>&2\n\t  exit 1\n\t  ;;\n\tesac\n\n\t# Install the libtool object if requested.\n\tif test -n \"$destfile\"; then\n\t  $show \"$install_prog $file $destfile\"\n\t  $run eval \"$install_prog $file $destfile\" || exit $?\n\tfi\n\n\t# Install the old object if enabled.\n\tif test \"$build_old_libs\" = yes; then\n\t  # Deduce the name of the old-style object file.\n\t  staticobj=`$echo \"X$file\" | $Xsed -e \"$lo2o\"`\n\n\t  $show \"$install_prog $staticobj $staticdest\"\n\t  $run eval \"$install_prog \\$staticobj \\$staticdest\" || exit $?\n\tfi\n\texit 0\n\t;;\n\n      *)\n\t# Figure out destination file name, if it wasn't already specified.\n\tif test -n \"$destname\"; then\n\t  destfile=\"$destdir/$destname\"\n\telse\n\t  destfile=`$echo \"X$file\" | $Xsed -e 's%^.*/%%'`\n\t  destfile=\"$destdir/$destfile\"\n\tfi\n\n\t# Do a test to see if this is really a libtool program.\n\tif (sed -e '4q' $file | egrep \"^# Generated by .*$PACKAGE\") >/dev/null 2>&1; then\n\t  notinst_deplibs=\n\t  relink_command=\n\n\t  # If there is no directory component, then add one.\n\t  case $file in\n\t  */* | *\\\\*) . $file ;;\n\t  *) . ./$file ;;\n\t  esac\n\n\t  # Check the variables that should have been set.\n\t  if test -z \"$notinst_deplibs\"; then\n\t    $echo \"$modename: invalid libtool wrapper script \\`$file'\" 1>&2\n\t    exit 1\n\t  fi\n\n\t  finalize=yes\n\t  for lib in $notinst_deplibs; do\n\t    # Check to see that each library is installed.\n\t    libdir=\n\t    if test -f \"$lib\"; then\n\t      # If there is no directory component, then add one.\n\t      case $lib in\n\t      */* | *\\\\*) . $lib ;;\n\t      *) . ./$lib ;;\n\t      esac\n\t    fi\n\t    libfile=\"$libdir/\"`$echo \"X$lib\" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test\n\t    if test -n \"$libdir\" && test ! -f \"$libfile\"; then\n\t      $echo \"$modename: warning: \\`$lib' has not been installed in \\`$libdir'\" 1>&2\n\t      finalize=no\n\t    fi\n\t  done\n\n\t  relink_command=\n\t  # If there is no directory component, then add one.\n\t  case $file in\n\t  */* | *\\\\*) . $file ;;\n\t  *) . ./$file ;;\n\t  esac\n\n\t  outputname=\n\t  if test \"$fast_install\" = no && test -n \"$relink_command\"; then\n\t    if test \"$finalize\" = yes && test -z \"$run\"; then\n\t      tmpdir=\"/tmp\"\n\t      test -n \"$TMPDIR\" && tmpdir=\"$TMPDIR\"\n\t      tmpdir=\"$tmpdir/libtool-$$\"\n\t      if $mkdir -p \"$tmpdir\" && chmod 700 \"$tmpdir\"; then :\n\t      else\n\t\t$echo \"$modename: error: cannot create temporary directory \\`$tmpdir'\" 1>&2\n\t\tcontinue\n\t      fi\n\t      file=`$echo \"X$file\" | $Xsed -e 's%^.*/%%'`\n\t      outputname=\"$tmpdir/$file\"\n\t      # Replace the output file specification.\n\t      relink_command=`$echo \"X$relink_command\" | $Xsed -e 's%@OUTPUT@%'\"$outputname\"'%g'`\n\n\t      $show \"$relink_command\"\n\t      if $run eval \"$relink_command\"; then :\n\t      else\n\t\t$echo \"$modename: error: relink \\`$file' with the above command before installing it\" 1>&2\n\t\t${rm}r \"$tmpdir\"\n\t\tcontinue\n\t      fi\n\t      file=\"$outputname\"\n\t    else\n\t      $echo \"$modename: warning: cannot relink \\`$file'\" 1>&2\n\t    fi\n\t  else\n\t    # Install the binary that we compiled earlier.\n\t    file=`$echo \"X$file\" | $Xsed -e \"s%\\([^/]*\\)$%$objdir/\\1%\"`\n\t  fi\n\tfi\n\n\t# remove .exe since cygwin /usr/bin/install will append another\n\t# one anyways\n\tcase $install_prog,$host in\n\t/usr/bin/install*,*cygwin*)\n\t  case $file:$destfile in\n\t  *.exe:*.exe)\n\t    # this is ok\n\t    ;;\n\t  *.exe:*)\n\t    destfile=$destfile.exe\n\t    ;;\n\t  *:*.exe)\n\t    destfile=`echo $destfile | sed -e 's,.exe$,,'`\n\t    ;;\n\t  esac\n\t  ;;\n\tesac\n\t$show \"$install_prog$stripme $file $destfile\"\n\t$run eval \"$install_prog\\$stripme \\$file \\$destfile\" || exit $?\n\ttest -n \"$outputname\" && ${rm}r \"$tmpdir\"\n\t;;\n      esac\n    done\n\n    for file in $staticlibs; do\n      name=`$echo \"X$file\" | $Xsed -e 's%^.*/%%'`\n\n      # Set up the ranlib parameters.\n      oldlib=\"$destdir/$name\"\n\n      $show \"$install_prog $file $oldlib\"\n      $run eval \"$install_prog \\$file \\$oldlib\" || exit $?\n\n      if test -n \"$stripme\" && test -n \"$striplib\"; then\n\t$show \"$old_striplib $oldlib\"\n\t$run eval \"$old_striplib $oldlib\" || exit $?\n      fi\n\n      # Do each command in the postinstall commands.\n      eval cmds=\\\"$old_postinstall_cmds\\\"\n      save_ifs=\"$IFS\"; IFS='~'\n      for cmd in $cmds; do\n\tIFS=\"$save_ifs\"\n\t$show \"$cmd\"\n\t$run eval \"$cmd\" || exit $?\n      done\n      IFS=\"$save_ifs\"\n    done\n\n    if test -n \"$future_libdirs\"; then\n      $echo \"$modename: warning: remember to run \\`$progname --finish$future_libdirs'\" 1>&2\n    fi\n\n    if test -n \"$current_libdirs\"; then\n      # Maybe just do a dry run.\n      test -n \"$run\" && current_libdirs=\" -n$current_libdirs\"\n      exec_cmd='$SHELL $0 --finish$current_libdirs'\n    else\n      exit 0\n    fi\n    ;;\n\n  # libtool finish mode\n  finish)\n    modename=\"$modename: finish\"\n    libdirs=\"$nonopt\"\n    admincmds=\n\n    if test -n \"$finish_cmds$finish_eval\" && test -n \"$libdirs\"; then\n      for dir\n      do\n\tlibdirs=\"$libdirs $dir\"\n      done\n\n      for libdir in $libdirs; do\n\tif test -n \"$finish_cmds\"; then\n\t  # Do each command in the finish commands.\n\t  eval cmds=\\\"$finish_cmds\\\"\n\t  save_ifs=\"$IFS\"; IFS='~'\n\t  for cmd in $cmds; do\n\t    IFS=\"$save_ifs\"\n\t    $show \"$cmd\"\n\t    $run eval \"$cmd\" || admincmds=\"$admincmds\n       $cmd\"\n\t  done\n\t  IFS=\"$save_ifs\"\n\tfi\n\tif test -n \"$finish_eval\"; then\n\t  # Do the single finish_eval.\n\t  eval cmds=\\\"$finish_eval\\\"\n\t  $run eval \"$cmds\" || admincmds=\"$admincmds\n       $cmds\"\n\tfi\n      done\n    fi\n\n    # Exit here if they wanted silent mode.\n    test \"$show\" = \":\" && exit 0\n\n    echo \"----------------------------------------------------------------------\"\n    echo \"Libraries have been installed in:\"\n    for libdir in $libdirs; do\n      echo \"   $libdir\"\n    done\n    echo\n    echo \"If you ever happen to want to link against installed libraries\"\n    echo \"in a given directory, LIBDIR, you must either use libtool, and\"\n    echo \"specify the full pathname of the library, or use the \\`-LLIBDIR'\"\n    echo \"flag during linking and do at least one of the following:\"\n    if test -n \"$shlibpath_var\"; then\n      echo \"   - add LIBDIR to the \\`$shlibpath_var' environment variable\"\n      echo \"     during execution\"\n    fi\n    if test -n \"$runpath_var\"; then\n      echo \"   - add LIBDIR to the \\`$runpath_var' environment variable\"\n      echo \"     during linking\"\n    fi\n    if test -n \"$hardcode_libdir_flag_spec\"; then\n      libdir=LIBDIR\n      eval flag=\\\"$hardcode_libdir_flag_spec\\\"\n\n      echo \"   - use the \\`$flag' linker flag\"\n    fi\n    if test -n \"$admincmds\"; then\n      echo \"   - have your system administrator run these commands:$admincmds\"\n    fi\n    if test -f /etc/ld.so.conf; then\n      echo \"   - have your system administrator add LIBDIR to \\`/etc/ld.so.conf'\"\n    fi\n    echo\n    echo \"See any operating system documentation about shared libraries for\"\n    echo \"more information, such as the ld(1) and ld.so(8) manual pages.\"\n    echo \"----------------------------------------------------------------------\"\n    exit 0\n    ;;\n\n  # libtool execute mode\n  execute)\n    modename=\"$modename: execute\"\n\n    # The first argument is the command name.\n    cmd=\"$nonopt\"\n    if test -z \"$cmd\"; then\n      $echo \"$modename: you must specify a COMMAND\" 1>&2\n      $echo \"$help\"\n      exit 1\n    fi\n\n    # Handle -dlopen flags immediately.\n    for file in $execute_dlfiles; do\n      if test ! -f \"$file\"; then\n\t$echo \"$modename: \\`$file' is not a file\" 1>&2\n\t$echo \"$help\" 1>&2\n\texit 1\n      fi\n\n      dir=\n      case $file in\n      *.la)\n\t# Check to see that this really is a libtool archive.\n\tif (sed -e '2q' $file | egrep \"^# Generated by .*$PACKAGE\") >/dev/null 2>&1; then :\n\telse\n\t  $echo \"$modename: \\`$lib' is not a valid libtool archive\" 1>&2\n\t  $echo \"$help\" 1>&2\n\t  exit 1\n\tfi\n\n\t# Read the libtool library.\n\tdlname=\n\tlibrary_names=\n\n\t# If there is no directory component, then add one.\n\tcase $file in\n\t*/* | *\\\\*) . $file ;;\n\t*) . ./$file ;;\n\tesac\n\n\t# Skip this library if it cannot be dlopened.\n\tif test -z \"$dlname\"; then\n\t  # Warn if it was a shared library.\n\t  test -n \"$library_names\" && $echo \"$modename: warning: \\`$file' was not linked with \\`-export-dynamic'\"\n\t  continue\n\tfi\n\n\tdir=`$echo \"X$file\" | $Xsed -e 's%/[^/]*$%%'`\n\ttest \"X$dir\" = \"X$file\" && dir=.\n\n\tif test -f \"$dir/$objdir/$dlname\"; then\n\t  dir=\"$dir/$objdir\"\n\telse\n\t  $echo \"$modename: cannot find \\`$dlname' in \\`$dir' or \\`$dir/$objdir'\" 1>&2\n\t  exit 1\n\tfi\n\t;;\n\n      *.lo)\n\t# Just add the directory containing the .lo file.\n\tdir=`$echo \"X$file\" | $Xsed -e 's%/[^/]*$%%'`\n\ttest \"X$dir\" = \"X$file\" && dir=.\n\t;;\n\n      *)\n\t$echo \"$modename: warning \\`-dlopen' is ignored for non-libtool libraries and objects\" 1>&2\n\tcontinue\n\t;;\n      esac\n\n      # Get the absolute pathname.\n      absdir=`cd \"$dir\" && pwd`\n      test -n \"$absdir\" && dir=\"$absdir\"\n\n      # Now add the directory to shlibpath_var.\n      if eval \"test -z \\\"\\$$shlibpath_var\\\"\"; then\n\teval \"$shlibpath_var=\\\"\\$dir\\\"\"\n      else\n\teval \"$shlibpath_var=\\\"\\$dir:\\$$shlibpath_var\\\"\"\n      fi\n    done\n\n    # This variable tells wrapper scripts just to set shlibpath_var\n    # rather than running their programs.\n    libtool_execute_magic=\"$magic\"\n\n    # Check if any of the arguments is a wrapper script.\n    args=\n    for file\n    do\n      case $file in\n      -*) ;;\n      *)\n\t# Do a test to see if this is really a libtool program.\n\tif (sed -e '4q' $file | egrep \"^# Generated by .*$PACKAGE\") >/dev/null 2>&1; then\n\t  # If there is no directory component, then add one.\n\t  case $file in\n\t  */* | *\\\\*) . $file ;;\n\t  *) . ./$file ;;\n\t  esac\n\n\t  # Transform arg to wrapped name.\n\t  file=\"$progdir/$program\"\n\tfi\n\t;;\n      esac\n      # Quote arguments (to preserve shell metacharacters).\n      file=`$echo \"X$file\" | $Xsed -e \"$sed_quote_subst\"`\n      args=\"$args \\\"$file\\\"\"\n    done\n\n    if test -z \"$run\"; then\n      if test -n \"$shlibpath_var\"; then\n\t# Export the shlibpath_var.\n\teval \"export $shlibpath_var\"\n      fi\n\n      # Restore saved enviroment variables\n      if test \"${save_LC_ALL+set}\" = set; then\n\tLC_ALL=\"$save_LC_ALL\"; export LC_ALL\n      fi\n      if test \"${save_LANG+set}\" = set; then\n\tLANG=\"$save_LANG\"; export LANG\n      fi\n\n      # Now prepare to actually exec the command.\n      exec_cmd='\"$cmd\"$args'\n    else\n      # Display what would be done.\n      if test -n \"$shlibpath_var\"; then\n\teval \"\\$echo \\\"\\$shlibpath_var=\\$$shlibpath_var\\\"\"\n\t$echo \"export $shlibpath_var\"\n      fi\n      $echo \"$cmd$args\"\n      exit 0\n    fi\n    ;;\n\n  # libtool clean and uninstall mode\n  clean | uninstall)\n    modename=\"$modename: $mode\"\n    rm=\"$nonopt\"\n    files=\n    rmforce=\n    exit_status=0\n\n    # This variable tells wrapper scripts just to set variables rather\n    # than running their programs.\n    libtool_install_magic=\"$magic\"\n\n    for arg\n    do\n      case $arg in\n      -f) rm=\"$rm $arg\"; rmforce=yes ;;\n      -*) rm=\"$rm $arg\" ;;\n      *) files=\"$files $arg\" ;;\n      esac\n    done\n\n    if test -z \"$rm\"; then\n      $echo \"$modename: you must specify an RM program\" 1>&2\n      $echo \"$help\" 1>&2\n      exit 1\n    fi\n\n    rmdirs=\n\n    for file in $files; do\n      dir=`$echo \"X$file\" | $Xsed -e 's%/[^/]*$%%'`\n      if test \"X$dir\" = \"X$file\"; then\n\tdir=.\n\tobjdir=\"$objdir\"\n      else\n\tobjdir=\"$dir/$objdir\"\n      fi\n      name=`$echo \"X$file\" | $Xsed -e 's%^.*/%%'`\n      test $mode = uninstall && objdir=\"$dir\"\n\n      # Remember objdir for removal later, being careful to avoid duplicates\n      if test $mode = clean; then\n\tcase \" $rmdirs \" in\n\t  *\" $objdir \"*) ;;\n\t  *) rmdirs=\"$rmdirs $objdir\" ;;\n\tesac\n      fi\n\n      # Don't error if the file doesn't exist and rm -f was used.\n      if (test -L \"$file\") >/dev/null 2>&1 \\\n\t|| (test -h \"$file\") >/dev/null 2>&1 \\\n\t|| test -f \"$file\"; then\n\t:\n      elif test -d \"$file\"; then\n\texit_status=1\n\tcontinue\n      elif test \"$rmforce\" = yes; then\n\tcontinue\n      fi\n\n      rmfiles=\"$file\"\n\n      case $name in\n      *.la)\n\t# Possibly a libtool archive, so verify it.\n\tif (sed -e '2q' $file | egrep \"^# Generated by .*$PACKAGE\") >/dev/null 2>&1; then\n\t  . $dir/$name\n\n\t  # Delete the libtool libraries and symlinks.\n\t  for n in $library_names; do\n\t    rmfiles=\"$rmfiles $objdir/$n\"\n\t  done\n\t  test -n \"$old_library\" && rmfiles=\"$rmfiles $objdir/$old_library\"\n\t  test $mode = clean && rmfiles=\"$rmfiles $objdir/$name $objdir/${name}i\"\n\n\t  if test $mode = uninstall; then\n\t    if test -n \"$library_names\"; then\n\t      # Do each command in the postuninstall commands.\n\t      eval cmds=\\\"$postuninstall_cmds\\\"\n\t      save_ifs=\"$IFS\"; IFS='~'\n\t      for cmd in $cmds; do\n\t\tIFS=\"$save_ifs\"\n\t\t$show \"$cmd\"\n\t\t$run eval \"$cmd\"\n\t\tif test $? != 0 && test \"$rmforce\" != yes; then\n\t\t  exit_status=1\n\t\tfi\n\t      done\n\t      IFS=\"$save_ifs\"\n\t    fi\n\n\t    if test -n \"$old_library\"; then\n\t      # Do each command in the old_postuninstall commands.\n\t      eval cmds=\\\"$old_postuninstall_cmds\\\"\n\t      save_ifs=\"$IFS\"; IFS='~'\n\t      for cmd in $cmds; do\n\t\tIFS=\"$save_ifs\"\n\t\t$show \"$cmd\"\n\t\t$run eval \"$cmd\"\n\t\tif test $? != 0 && test \"$rmforce\" != yes; then\n\t\t  exit_status=1\n\t\tfi\n\t      done\n\t      IFS=\"$save_ifs\"\n\t    fi\n\t    # FIXME: should reinstall the best remaining shared library.\n\t  fi\n\tfi\n\t;;\n\n      *.lo)\n\tif test \"$build_old_libs\" = yes; then\n\t  oldobj=`$echo \"X$name\" | $Xsed -e \"$lo2o\"`\n\t  rmfiles=\"$rmfiles $dir/$oldobj\"\n\tfi\n\t;;\n\n      *)\n\t# Do a test to see if this is a libtool program.\n\tif test $mode = clean &&\n\t   (sed -e '4q' $file | egrep \"^# Generated by .*$PACKAGE\") >/dev/null 2>&1; then\n\t  relink_command=\n\t  . $dir/$file\n\n\t  rmfiles=\"$rmfiles $objdir/$name $objdir/${name}S.${objext}\"\n\t  if test \"$fast_install\" = yes && test -n \"$relink_command\"; then\n\t    rmfiles=\"$rmfiles $objdir/lt-$name\"\n\t  fi\n\tfi\n\t;;\n      esac\n      $show \"$rm $rmfiles\"\n      $run $rm $rmfiles || exit_status=1\n    done\n\n    # Try to remove the ${objdir}s in the directories where we deleted files\n    for dir in $rmdirs; do\n      if test -d \"$dir\"; then\n\t$show \"rmdir $dir\"\n\t$run rmdir $dir >/dev/null 2>&1\n      fi\n    done\n\n    exit $exit_status\n    ;;\n\n  \"\")\n    $echo \"$modename: you must specify a MODE\" 1>&2\n    $echo \"$generic_help\" 1>&2\n    exit 1\n    ;;\n  esac\n\n  if test -z \"$exec_cmd\"; then\n    $echo \"$modename: invalid operation mode \\`$mode'\" 1>&2\n    $echo \"$generic_help\" 1>&2\n    exit 1\n  fi\nfi # test -z \"$show_help\"\n\nif test -n \"$exec_cmd\"; then\n  eval exec $exec_cmd\n  exit 1\nfi\n\n# We need to display help for each of the modes.\ncase $mode in\n\"\") $echo \\\n\"Usage: $modename [OPTION]... [MODE-ARG]...\n\nProvide generalized library-building support services.\n\n    --config          show all configuration variables\n    --debug           enable verbose shell tracing\n-n, --dry-run         display commands without modifying any files\n    --features        display basic configuration information and exit\n    --finish          same as \\`--mode=finish'\n    --help            display this help message and exit\n    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]\n    --quiet           same as \\`--silent'\n    --silent          don't print informational messages\n    --version         print version information\n\nMODE must be one of the following:\n\n      clean           remove files from the build directory\n      compile         compile a source file into a libtool object\n      execute         automatically set library path, then run a program\n      finish          complete the installation of libtool libraries\n      install         install libraries or executables\n      link            create a library or an executable\n      uninstall       remove libraries from an installed directory\n\nMODE-ARGS vary depending on the MODE.  Try \\`$modename --help --mode=MODE' for\na more detailed description of MODE.\"\n  exit 0\n  ;;\n\nclean)\n  $echo \\\n\"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...\n\nRemove files from the build directory.\n\nRM is the name of the program to use to delete files associated with each FILE\n(typically \\`/bin/rm').  RM-OPTIONS are options (such as \\`-f') to be passed\nto RM.\n\nIf FILE is a libtool library, object or program, all the files associated\nwith it are deleted. Otherwise, only FILE itself is deleted using RM.\"\n  ;;\n\ncompile)\n  $echo \\\n\"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE\n\nCompile a source file into a libtool library object.\n\nThis mode accepts the following additional options:\n\n  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE\n  -prefer-pic       try to building PIC objects only\n  -prefer-non-pic   try to building non-PIC objects only\n  -static           always build a \\`.o' file suitable for static linking\n\nCOMPILE-COMMAND is a command to be used in creating a \\`standard' object file\nfrom the given SOURCEFILE.\n\nThe output file name is determined by removing the directory component from\nSOURCEFILE, then substituting the C source code suffix \\`.c' with the\nlibrary object suffix, \\`.lo'.\"\n  ;;\n\nexecute)\n  $echo \\\n\"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...\n\nAutomatically set library path, then run a program.\n\nThis mode accepts the following additional options:\n\n  -dlopen FILE      add the directory containing FILE to the library path\n\nThis mode sets the library path environment variable according to \\`-dlopen'\nflags.\n\nIf any of the ARGS are libtool executable wrappers, then they are translated\ninto their corresponding uninstalled binary, and any of their required library\ndirectories are added to the library path.\n\nThen, COMMAND is executed, with ARGS as arguments.\"\n  ;;\n\nfinish)\n  $echo \\\n\"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...\n\nComplete the installation of libtool libraries.\n\nEach LIBDIR is a directory that contains libtool libraries.\n\nThe commands that this mode executes may require superuser privileges.  Use\nthe \\`--dry-run' option if you just want to see what would be executed.\"\n  ;;\n\ninstall)\n  $echo \\\n\"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...\n\nInstall executables or libraries.\n\nINSTALL-COMMAND is the installation command.  The first component should be\neither the \\`install' or \\`cp' program.\n\nThe rest of the components are interpreted as arguments to that command (only\nBSD-compatible install options are recognized).\"\n  ;;\n\nlink)\n  $echo \\\n\"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...\n\nLink object files or libraries together to form another library, or to\ncreate an executable program.\n\nLINK-COMMAND is a command using the C compiler that you would use to create\na program from several object files.\n\nThe following components of LINK-COMMAND are treated specially:\n\n  -all-static       do not do any dynamic linking at all\n  -avoid-version    do not add a version suffix if possible\n  -dlopen FILE      \\`-dlpreopen' FILE if it cannot be dlopened at runtime\n  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols\n  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)\n  -export-symbols SYMFILE\n\t\t    try to export only the symbols listed in SYMFILE\n  -export-symbols-regex REGEX\n\t\t    try to export only the symbols matching REGEX\n  -LLIBDIR          search LIBDIR for required installed libraries\n  -lNAME            OUTPUT-FILE requires the installed library libNAME\n  -module           build a library that can dlopened\n  -no-fast-install  disable the fast-install mode\n  -no-install       link a not-installable executable\n  -no-undefined     declare that a library does not refer to external symbols\n  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects\n  -release RELEASE  specify package release information\n  -rpath LIBDIR     the created library will eventually be installed in LIBDIR\n  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries\n  -static           do not do any dynamic linking of libtool libraries\n  -version-info CURRENT[:REVISION[:AGE]]\n\t\t    specify library version info [each variable defaults to 0]\n\nAll other options (arguments beginning with \\`-') are ignored.\n\nEvery other argument is treated as a filename.  Files ending in \\`.la' are\ntreated as uninstalled libtool libraries, other files are standard or library\nobject files.\n\nIf the OUTPUT-FILE ends in \\`.la', then a libtool library is created,\nonly library objects (\\`.lo' files) may be specified, and \\`-rpath' is\nrequired, except when creating a convenience library.\n\nIf OUTPUT-FILE ends in \\`.a' or \\`.lib', then a standard library is created\nusing \\`ar' and \\`ranlib', or on Windows using \\`lib'.\n\nIf OUTPUT-FILE ends in \\`.lo' or \\`.${objext}', then a reloadable object file\nis created, otherwise an executable program is created.\"\n  ;;\n\nuninstall)\n  $echo \\\n\"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...\n\nRemove libraries from an installation directory.\n\nRM is the name of the program to use to delete files associated with each FILE\n(typically \\`/bin/rm').  RM-OPTIONS are options (such as \\`-f') to be passed\nto RM.\n\nIf FILE is a libtool library, all the files associated with it are deleted.\nOtherwise, only FILE itself is deleted using RM.\"\n  ;;\n\n*)\n  $echo \"$modename: invalid operation mode \\`$mode'\" 1>&2\n  $echo \"$help\" 1>&2\n  exit 1\n  ;;\nesac\n\necho\n$echo \"Try \\`$modename --help' for more information about other modes.\"\n\nexit 0\n\n# Local Variables:\n# mode:shell-script\n# sh-indentation:2\n# End:\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/make.cfg.in",
    "content": "# make.cfg.in -- mf fragment for configured variables\t\t-*- makefile -*-\n# \n#   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n#                              listed elsewhere in this file.\n#   All rights reserved.\n#   \n#   This file is part of Unix Squeak.\n# \n#   Permission is hereby granted, free of charge, to any person obtaining a copy\n#   of this software and associated documentation files (the \"Software\"), to deal\n#   in the Software without restriction, including without limitation the rights\n#   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n#   copies of the Software, and to permit persons to whom the Software is\n#   furnished to do so, subject to the following conditions:\n# \n#   The above copyright notice and this permission notice shall be included in\n#   all copies or substantial portions of the Software.\n# \n#   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n#   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n#   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n#   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n#   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n#   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n#   SOFTWARE.\n\n# Author: Ian.Piumarta@inria.fr\n# \n# Last edited: Tue Jan 26 11:48:03 PST 2010 by eliot\n\nMAKEFLAGS=\t--no-print-directory\n\n@SET_MAKE@\n\nVM_MAJOR=\t@VM_MAJOR@\nVM_MINOR=\t@VM_MINOR@\nVM_RELEASE=\t@VM_RELEASE@\nVM_VERSION=\t@VM_VERSION@\n\nSQ_MAJOR=\t@SQ_MAJOR@\nSQ_MINOR=\t@SQ_MINOR@\nSQ_UPDATE=\t@SQ_UPDATE@\nSQ_VERSION=\t@SQ_VERSION@\n\nDEVEL=\t\t@DEVEL@\n\nhost=\t\t@host@\nhost_cpu=\t@host_cpu@\nhost_vendor=\t@host_vendor@\nhost_os=\t@host_os@\n\ntopdir=\t\t@topdir@\ncfgdir=\t\t@cfgdir@\nsrcdir=\t\t@vmmdir@\nvmmcfg=\t\t@vmmcfg@\nblddir=\t\t@blddir@\n\ntop_builddir=\t@blddir@\n\nprefix=\t\t@prefix@\nexec_prefix=\t@exec_prefix@\n\nbindir=\t\t@bindir@\nlibdir=\t\t@libdir@\ndatadir=\t@datadir@\nmandir=\t\t@mandir@\nimgdir=\t\t@imgdir@\nplgdir=\t\t@plgdir@\ndocdir=\t\t$(prefix)/doc/squeak\n\nSHELL=\t\t@SHELL@\nMKINSTALLDIRS=\tmkdir -p\nINSTALL=\t@INSTALL@\nINSTALL_PROG=\t@INSTALL_PROGRAM@ $(INSTALL_ARGS)\nINSTALL_SCRIPT=\t@INSTALL_SCRIPT@ $(INSTALL_ARGS)\nINSTALL_DATA=\t@INSTALL_DATA@ $(INSTALL_ARGS)\nUNINSTALL=\t$(SHELL) $(cfgdir)/uninstall\nAS=\t\t@AS@\nAWK=\t\t@AWK@\nRANLIB=\t\t@RANLIB@\nLIBTOOL=\t@LIBTOOL@\nNM=\t\t@NM@\nLN=\t\t@LN@\nLN_S=\t\t@LN_S@\n\nCC=\t\t@CC@\nDEFS=\t\t@DEFS@\nINCLUDES=\t@INCLUDES@\nCPPFLAGS=\t@CPPFLAGS@\nCFLAGS=\t\t@CFLAGS@\nWFLAGS=\t\t@WFLAGS@\nLDFLAGS=\t@LDFLAGS@\nSOFLAGS=\t@SOFLAGS@\nLIBM_CFLAGS=\t@LIBM_CFLAGS@\n\nLIBS=\t\t@LIBS@\n\nX_CFLAGS=\t@X_CFLAGS@\nX_INCLUDES=\t@X_INCLUDES@\nX_LIBS=\t\t@X_LIBS@\n\nLIB_UUID=\t@LIB_UUID@\n\nFFI_DIR=\t@FFI_DIR@\nFFI_C=\t\t@FFI_C@\nFFI_S=\t\t@FFI_S@\nFFI_O=\t\t@FFI_O@\n\nPYLIBPATH=\t@PYLIBPATH@\nPYINCLUDES=\t@PYINCLUDES@\n\nINTERP=\t\t@INTERP@\n\nVM_APP_ICONS=\t@VM_APP_ICONS@\n\nnpsqueak=\t@npsqueak@\ninstall_nps=\t@install_nps@\nuninstall_nps=\t@uninstall_nps@\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/make.ext.in",
    "content": "# make.ext.in -- mf fragment for external plugins\t\t-*- makefile -*-\n# \n# Author: Ian.Piumarta@inria.fr\n# \n# Last edited: Sep  1 18:56:15 PDT 2010 by eliot; LINKXX for plugins using C++\n\no\t\t= .lo\na\t\t= .la\nCOMPILE\t\t= $(LIBTOOL) --mode=compile \\\n\t\t  $(CC) $(CFLAGS) $(XCFLAGS) $(DEFS) $(XDEFS) \\\n\t\t  $(INCLUDES) $(XINCLUDES) $(CPPFLAGS) $(XCPPFLAGS) -c -o\nCXXFLAGS\t= $(CFLAGS) # Hack; can't be bothered to add CXXFLAGS to the configure mess\nCOMPILE.cpp\t= $(LIBTOOL) --mode=compile \\\n\t\t  $(CXX) $(CXXFLAGS) $(XCFLAGS) $(DEFS) $(XDEFS) \\\n\t\t  $(INCLUDES) $(XINCLUDES) $(CPPFLAGS) $(XCPPFLAGS) -c -o\nLINK\t\t= $(LIBTOOL) --mode=link \\\n\t\t  $(CC) $(CFLAGS) $(XCFLAGS) \\\n\t\t  $(LDFLAGS) $(XLDFLAGS) -avoid-version -module -rpath $(plgdir) -o\nLINKXX\t\t= $(LIBTOOL) --mode=link \\\n\t\t  $(CXX) $(CFLAGS) $(XCFLAGS) \\\n\t\t  $(LDFLAGS) $(XLDFLAGS) -avoid-version -module -rpath $(plgdir) -o\nRANLIB\t\t= :\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/make.int.in",
    "content": "# make.int.in -- mf fragment for internal plugins\t\t-*- makefile -*-\n# \n# Author: Ian.Piumarta@inria.fr\n# \n# Last edited: 2002-07-08 20:31:51 by piumarta on emilia.inria.fr\n\no\t\t= .o\na\t\t= .a\nCOMPILE\t\t= $(CC) $(CFLAGS) $(XCFLAGS) $(DEFS) $(XDEFS) -DSQUEAK_BUILTIN_PLUGIN \\\n\t\t  $(INCLUDES) $(XINCLUDES) $(CPPFLAGS) $(XCPPFLAGS) -c -o\nLINK\t\t= $(AR) -rc\nRANLIB\t\t= @RANLIB@\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/make.prg.in",
    "content": "# make.prg.in -- mf fragment for programs\t\t-*- makefile -*-\n# \n# Author: Ian.Piumarta@inria.fr\n# \n# Last edited: Thu Jan 21 14:59:38 PST 2010 by eliot (support for .cpp)\n\no\t\t= .o\na\t\t= .a\nx\t\t=\nCOMPILE\t\t= $(CC) $(CFLAGS) $(XCFLAGS) \\\n\t\t  $(LDFLAGS) $(XLDFLAGS) -export-dynamic -c -o\nCOMPILEIFP\t= $(CC) $(CFLAGS) $(XCFLAGS) \\\n\t\t  $(LDFLAGS) $(XLDFLAGS) -export-dynamic -fno-omit-frame-pointer -c -o\nCXXFLAGS\t= $(CFLAGS) # Hack; can't be bothered to add CXXFLAGS to the configure mess\nCOMPILE.cpp\t= $(CXX) $(CXXFLAGS) $(XCFLAGS) \\\n\t\t  $(LDFLAGS) $(XLDFLAGS) -export-dynamic -c -o\nLINK\t\t= $(LIBTOOL) --mode=link \\\n\t\t  $(CC) $(CFLAGS) $(XCFLAGS) \\\n\t\t  $(LDFLAGS) $(XLDFLAGS) -export-dynamic -R$(libdir) -o\nRANLIB\t\t= :\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/mkacinc",
    "content": "#!/bin/sh\n\nincludes=\"`echo ../vm*/acinclude.m4 ../plugins/*/acinclude.m4`\";\n\nif test \"${includes}\" != \"\"; then\n  for i in ${includes}; do\n    echo \"\t+ $i\" >&2\n    p=`echo $i | sed 's,../,,;s,plugins/,,;s,/acinclude.m4,,'`\n    cat <<EOF\nplugin=\"${p}\"\nplibs=\"\"\nrm -f ${p}.sub ${p}.lib\nEOF\n    cat $i\n    cat <<\\EOF\nif test \"${plibs}\"; then\n  llibs=\"${LIBS}\"\n  for l in ${plibs}; do\n  llibs=\"${llibs} -l${l}\"\n  done\n  echo ${llibs} > ${plugin}.lib\nfi\nEOF\n  done\nfi\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/mkconfig.in",
    "content": "#!/bin/sh\n\nint_modules=\"@int_modules@\"\next_modules=\"@ext_modules@\"\nint_plugins=\"@int_plugins@ `grep -v '^#'  @vmmcfg@/plugins.int | sed 's/INTERNAL_PLUGINS = //' | tr -d '\\\\\\\\\\\\012';echo`\"\next_plugins=\"@ext_plugins@ `grep -v '^#'  @vmmcfg@/plugins.ext | sed 's/EXTERNAL_PLUGINS = //' | tr -d '\\\\\\\\\\\\012';echo`\"\n\nif test -f plugins.exc; then\n  nlsp='tr \\012\\015 \\040\\040'\n  spnl='tr \\040\\040 \\012\\012'\n  int_modules=\"`echo ${int_modules} | $spnl | fgrep -v -f plugins.exc | $nlsp`\"\n  ext_modules=\"`echo ${ext_modules} | $spnl | fgrep -v -f plugins.exc | $nlsp`\"\n  int_plugins=\"`echo ${int_plugins} | $spnl | fgrep -v -f plugins.exc | $nlsp`\"\n  ext_plugins=\"`echo ${ext_plugins} | $spnl | fgrep -v -f plugins.exc | $nlsp`\"\n  exc_plugins=\"`cat plugins.exc | $nlsp`\"\nelse\n  exc_plugins=\"\"\nfi\n\nplatforms=\"@topdir@/platforms\"\n\nvmi_conf=\"${platforms}/unix\"\nplg_conf=\"${vmi_conf}/plugins\"\n\nvmi_dirs=\"@vmmdir@         ${platforms}/Cross         ${vmi_conf}\"\nint_dirs=\"@vmmdir@/plugins ${platforms}/Cross/plugins ${plg_conf}\"\next_dirs=\"@vmmdir@/plugins ${platforms}/Cross/plugins ${plg_conf}\"\n\ncat > config.sh <<EOF\nsrcdir=\"@vmmdir@\"\nblddir=\"@blddir@\"\ntopdir=\"@topdir@\"\ncfgdir=\"@cfgdir@\"\n\nint_modules=\"${int_modules}\"\next_modules=\"${ext_modules}\"\nint_plugins=\"${int_plugins}\"\next_plugins=\"${ext_plugins}\"\nexc_plugins=\"${exc_plugins}\"\n\nvmi_dirs=\"${vmi_dirs}\"\nint_dirs=\"${int_dirs}\"\next_dirs=\"${ext_dirs}\"\nEOF\n\nchmod +x config.sh\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/mkinstalldirs",
    "content": "#! /bin/sh\n# mkinstalldirs --- make directory hierarchy\n# Author: Noah Friedman <friedman@prep.ai.mit.edu>\n# Created: 1993-05-16\n# Public domain\n\n# $Id: mkinstalldirs 990 2005-03-09 09:04:06Z piumarta $\n\nerrstatus=0\n\nfor file\ndo\n   set fnord `echo \":$file\" | sed -ne 's/^:\\//#/;s/^://;s/\\// /g;s/^#/\\//;p'`\n   shift\n\n   pathcomp=\n   for d\n   do\n     pathcomp=\"$pathcomp$d\"\n     case \"$pathcomp\" in\n       -* ) pathcomp=./$pathcomp ;;\n     esac\n\n     if test ! -d \"$pathcomp\"; then\n        echo \"mkdir $pathcomp\"\n\n        mkdir \"$pathcomp\" || lasterr=$?\n\n        if test ! -d \"$pathcomp\"; then\n  \t  errstatus=$lasterr\n        fi\n     fi\n\n     pathcomp=\"$pathcomp/\"\n   done\ndone\n\nexit $errstatus\n\n# mkinstalldirs ends here\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/mkman",
    "content": "#!/bin/sh\n\nsed \"s%\\[major\\]%$1%g\ns%\\[version\\]%$2%g\ns%\\[bindir\\]%$3%g\ns%\\[imgdir\\]%$4%g\ns%\\[plgdir\\]%$5%g\ns%\\[mandir\\]%$6%g\ns%\\[docdir\\]%$7%g\"\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/mkmf",
    "content": "#!/bin/sh\n\n# mkmf -- configure subdirectory Makefiles\t\t\t-*- sh -*-\n# \n#   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n#                              listed elsewhere in this file.\n#   All rights reserved.\n#   \n#   This file is part of Unix Squeak.\n# \n#   Permission is hereby granted, free of charge, to any person obtaining a copy\n#   of this software and associated documentation files (the \"Software\"), to deal\n#   in the Software without restriction, including without limitation the rights\n#   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n#   copies of the Software, and to permit persons to whom the Software is\n#   furnished to do so, subject to the following conditions:\n# \n#   The above copyright notice and this permission notice shall be included in\n#   all copies or substantial portions of the Software.\n# \n#   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n#   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n#   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n#   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n#   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n#   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n#   SOFTWARE.\n# \n# Author: ian.piumarta@inria.fr\n# \n# Last edited: Thu Jan 21 14:10:49 PST 2010 by eliot (add support for .cpp)\n\n. ./config.sh\n\nfindFiles() {\n  suffix=$1\n  shift\n  while test $# -gt 0; do\n    echo $1/*${suffix}\n    shift\n  done\n}\n\nfindDirs() {\n  prefix=$1\n  shift\n  dirs=\"\"\n  while test $# -gt 0; do\n    dirs=\"${dirs} ${prefix}`dirname $1`\"\n    shift\n  done\n  echo ${dirs} | tr ' ' '\\012' | sort | uniq | tr '\\012' ' '\n}\n\nplibs=\"\"\n\nmkmf() {\n  default=$1\n  name=$2\n  shift 2\n  dirs=\"$*\"\n  makefile_in=\"\"\n  makefile_inc=\"\"\n  makefile_plg=Makefile.plg.in\n  make_targets=\"${name}/make.targets\"\n  objs=\"${name}/.objs\"\n  excluded=\"${name}/.excluded\"\n  targets=\"\"\n  includes=\"\"\n  srcs=\"\"\n  hdrs=\"\"\n  echo \"creating ${name}/Makefile\"\n  test -d ${name} || mkdir ${name}\n  echo \"\" > ${make_targets}\n  echo \"\" > ${excluded}\n  # collect source and header files\n  for x in ${dirs}; do\n    d=${x}/${name}\n    if test -d ${d}; then\n      dd=${d}\n      if test -f ${d}/mkmf.subdirs; then\n        subdirs=\"`cat ${d}/mkmf.subdirs | tr '\\012' ' '`\"\n        for sd in ${subdirs}; do dd=\"${dd} ${topdir}/${sd}\"; done\n      fi\n      srcs=\"${srcs} `findFiles .c ${dd}`\"\n      srcs=\"${srcs} `findFiles .cc ${dd}`\"\n      srcs=\"${srcs} `findFiles .cpp ${dd}`\"\n      srcs=\"${srcs} `findFiles .S ${dd}`\"\n      srcs=\"${srcs} `findFiles .m ${dd}`\"\n      hdrs=\"${hdrs} `findFiles .h ${dd}`\"\n      # override Makefile.in\n      if test -f \"${d}/Makefile.in\"; then\n        makefile_in=\"${d}/Makefile.in\"\n      fi\n      # include Makefile.inc\n      if test -f \"${d}/Makefile.inc\"; then\n        makefile_inc=\"${makefile_inc} ${d}/Makefile.inc\"\n      fi\n      test -f \"${d}/Targets.exclude\" && cat \"${d}/Targets.exclude\" >>${excluded}\n    fi\n  done\n  srcs=\"`echo ${srcs} | tr ' ' '\\012' | fgrep -v '*'`\"\n  hdrs=\"`echo ${hdrs} | tr ' ' '\\012' | fgrep -v '*'`\"\n  # create targets and rules\n  if test \"${srcs}\" != \"\"; then\n    # objs is used to make the list of targets unique so that a platform can\n    # override a file in Cross/plugins/Foo.\n    # e.g qWebcam.cpp in both platforms/{Cross,unix}/plugins/QWebcamPlugin\n    # excluded is used to exclude unneeded targets (specify a targets.exclude\n    # in the platform plugin dir)\n    echo \"\" > ${objs}\n    for c in ${srcs}; do\n      o=`basename ${c} | sed 's,\\.cp*,$o,;s,\\.m,$o,;s,\\.S,$o,'`\n      grep -qs \"^$o$\" ${excluded} || grep -qs \"^$o$\" ${objs} || targets=\"${targets} ${o}\"\n      echo \"$o\" >>${objs}\n      echo\t\t\t\t\t\t\t\t\t\t\t\t>> ${make_targets}\n      echo \"${o} : ${c}\"\t\t\t\t\t\t\t\t>> ${make_targets}\n      case ${c} in\n        *.cpp|*.cc)\techo '\t$(COMPILE.cpp) '\"${o} ${c}\"\t>> ${make_targets}\n\t\t\t\t\tmakefile_plg=Makefile.cpp-plg.in;;\n        *)\t\techo '\t$(COMPILE) '\"${o} ${c}\"\t\t\t>> ${make_targets}\n      esac\n    done\n    rm -f ${objs} ${excluded}\n  fi\n  # create includes\n  if test \"${hdrs}\" != \"\"; then\n    includes=\"${includes} `findDirs -I ${hdrs}`\"\n  fi\n  # default Makefile.in if no override\n  if test ! -f \"${makefile_in}\"; then\n    makefile_in=${cfgdir}/${makefile_plg}\n  fi\n  # include Makefile.inc(s)\n  if test \"${makefile_inc}\" != \"\"; then\n    cp ${makefile_in} makefile.in\n    makefile_in=\"makefile.in\"\n    for inc in ${makefile_inc}; do\n      sed \"/\\[make_inc\\]/r ${inc}\" < ${makefile_in} > makefile.out\n      mv makefile.out makefile.in\n    done\n  fi\n  # substitutions\n  if test -f \"${name}.sub\"; then\n    sed -f ${name}.sub < ${makefile_in} > makefile.sub\n    makefile_in=\"makefile.sub\"\n  fi\n  sed \"s%\\[make_inc\\]%%g\ns%\\[target\\]%${name}\"'$a'\"%g\ns%\\[targets\\]%${targets}%g\ns%\\[includes\\]%${includes}%g\n/\\[make_cfg\\]/r ${blddir}/make.cfg\ns%\\[make_cfg\\]%%g\n/\\[make_prg\\]/r ${bldir}/make.prg\ns%\\[make_prg\\]%%g\n/\\[make_plg\\]/r ${blddir}/make.${default}\ns%\\[make_plg\\]%%g\ns%\\[plibs\\]%${plibs}%g\n/\\[make_targets\\]/r ${make_targets}\ns%\\[make_targets\\]%%g\" < ${makefile_in} > ${name}/Makefile\n  /bin/rm -f ${make_targets} makefile.in makefile.sub\n}\n\nif test \"${int_modules}\" != \"\"; then\n  for p in ${int_modules}; do\n    mkmf int ${p} ${vmi_dirs}\n  done\nfi\n\nif test \"${ext_modules}\" != \"\"; then\n  for p in ${ext_modules}; do\n    if test -f ${p}.lib; then\n      plibs=\"`cat ${p}.lib`\"\n    else\n      plibs=\"\"\n    fi\n    mkmf ext ${p} ${vmi_dirs}\n  done\nfi\n\nif test \"${int_plugins}\" != \"\"; then\n  for p in ${int_plugins}; do\n    mkmf int ${p} ${int_dirs}\n  done\nfi\n\nif test \"${ext_plugins}\" != \"\"; then\n  for p in ${ext_plugins}; do\n    if test -f ${p}.lib; then\n      plibs=\"`cat ${p}.lib`\"\n    else\n      plibs=\"\"\n    fi\n    mkmf ext ${p} ${ext_dirs}\n  done\nfi\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/mktargets",
    "content": "#!/bin/sh\n\n# mktargets -- configure top-level library targets\t\t-*- sh -*-\n# \n#   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n#                              listed elsewhere in this file.\n#   All rights reserved.\n#   \n#   This file is part of Unix Squeak.\n# \n#    Permission is hereby granted, free of charge, to any person obtaining a copy\n#    of this software and associated documentation files (the \"Software\"), to deal\n#    in the Software without restriction, including without limitation the rights\n#    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n#    copies of the Software, and to permit persons to whom the Software is\n#    furnished to do so, subject to the following conditions:\n#  \n#    The above copyright notice and this permission notice shall be included in\n#    all copies or substantial portions of the Software.\n#  \n#    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n#    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n#    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n#    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n#    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n#    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n#    SOFTWARE.\n# \n# Author: ian.piumarta@inria.fr\n# \n# Last edited: 2006-10-18 10:12:29 by piumarta on emilia.local\n\n\n. ./config.sh\n\nno_exports=\"disabledPlugins\"\nmake_targets=\"make.targets\"\n\nla='${la}'\na='$a'\no='$o'\n\nplugins=\"\"\nif test \"${ext_modules}${ext_plugins}\" != \"\"; then\n  for p in ${ext_modules} ${ext_plugins}; do\n    plugins=\"${plugins} ${p}${la}\"\n  done\nfi\n\necho \"\" > ${make_targets}\n\ntargets=\"\"\nplibs=\"\"\n\nif test \"${int_modules}${int_plugins}\" != \"\"; then\n  for p in ${int_modules} ${int_plugins}; do\n    targets=\"${targets} ${p}/${p}$a\"\n    echo\t\t\t\t\t\t\t  >> ${make_targets}\n    echo \"${p}/${p}$a : .force\"\t\t\t\t\t  >> ${make_targets}\n    echo '\t@$(SHELL) -ec '\"'cd ${p}; \"'$(MAKE) '\"${p}$a'\"\t  >> ${make_targets}\n    test -f ${p}.lib && plibs=\"${plibs} `cat ${p}.lib`\"\n  done\nfi\n\nif test \"${ext_modules}${ext_plugins}\" != \"\"; then\n  for p in ${ext_modules} ${ext_plugins}; do\n    echo\t\t\t\t\t\t\t  >> ${make_targets}\n    echo \"${p}${la} :\"\t\t\t\t\t\t  >> ${make_targets}\n    echo '\t@$(SHELL) -ec '\"'cd ${p}; \"'$(MAKE) '\"${p}${la}'\" >> ${make_targets}\n  done\nfi\n\nif test \"${exc_plugins}\" != \"\"; then\n  targets=\"${targets} ${no_exports}$o\"\n  cat > ${no_exports}.c <<EOF\n/* this should be in a header file, but it isn't.  ho hum. */\ntypedef struct {\n  char *pluginName;\n  char *primitiveName;\n  void *primitiveAddress;\n} sqExport;\n`for p in ${exc_plugins}; do echo \"sqExport ${p}_exports[] = { 0, 0, 0 };\"; done | sed 's/-/_/g'`\nEOF\n  cat >> ${make_targets} <<EOF\n\n${no_exports}$o : ${no_exports}.c\n\t\\$(COMPILE) ${no_exports}$o ${no_exports}.c\nEOF\nfi\n\nmv Makefile Makefile.tmp\n\nsed \"s%\\[targets\\]%${targets}%g\ns%\\[plugins\\]%${plugins}%g\ns%\\[plibs\\]%${plibs}%g\n/\\[make_targets\\]/r ${make_targets}\ns%\\[make_targets\\]%%g\" < Makefile.tmp > Makefile\n\nrm Makefile.tmp\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/relpath",
    "content": "#!/bin/sh\n# \n# relpath -- construct path relative to cwd\n# \n#   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n#                              listed elsewhere in this file.\n#   All rights reserved.\n#   \n#   This file is part of Unix Squeak.\n# \n#    Permission is hereby granted, free of charge, to any person obtaining a copy\n#    of this software and associated documentation files (the \"Software\"), to deal\n#    in the Software without restriction, including without limitation the rights\n#    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n#    copies of the Software, and to permit persons to whom the Software is\n#    furnished to do so, subject to the following conditions:\n#  \n#    The above copyright notice and this permission notice shall be included in\n#    all copies or substantial portions of the Software.\n#  \n#    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n#    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n#    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n#    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n#    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n#    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n#    SOFTWARE.\n# \n# Author: Ian.Piumarta@INRIA.Fr\n# \n# Last edited: 2006-10-18 10:12:08 by piumarta on emilia.local\n\nif test $# -ne 2; then\n  echo \"usage: $0 srcdir path\"\nfi\n\ncwd=$1\npath=$2\n\nfor dir in `echo $cwd | tr '/' ' '`; do\n  if expr $path : \"/$dir\" >/dev/null; then\n    path=`echo $path | sed \"s,^/$dir,,\"`\n    cwd=`echo $cwd | sed \"s,^/$dir,,\"`\n  fi\ndone\n\npath=`echo $path | sed 's,^/,,'`\n\nfor dir in `echo $cwd | tr '/' ' '`; do\n  path=\"../$path\"\ndone\n\necho $path\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/squeak.sh.in",
    "content": "#!/bin/sh\nBIN=`/usr/bin/dirname $0`/@expanded_relative_imgdir@\n# At least on linux LD_LIBRARY_PATH's components must be absolute path names\ncase \"$BIN\" in\n/*) PLUGINS=\"$BIN\";;\n*) PLUGINS=\"`pwd`/$BIN\"\nesac\n# prepending is less flexible but safer because it ensures we find the plugins\n# in the same directory as the VM.\nLD_LIBRARY_PATH=$PLUGINS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} exec \"$BIN/squeak\" \"$@\"\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/uninstall",
    "content": "#!/bin/sh\n# \n# uninstall -- uninstall files/directories\n# \n# Author: Ian.Piumarta@INRIA.Fr\n# \n# Last edited: 2002-06-06 05:12:25 by piumarta on emilia.inria.fr\n\ntest=`which test`\n\nif test $# -lt 1; then\n  echo \"usage: $0 dir files...\"\nfi\n\ndir=$1\nshift\n\nif test -d ${dir}; then\n  for file in $*; do\n    if $test -f \"${dir}/${file}\" -o -L \"${dir}/${file}\"; then\n      echo \"rm -f ${dir}/${file}\"\n      rm -f ${dir}/${file}\n    fi\n  done\nfi\n\nwhile test \"${dir}\" != \"/\" -a \"${dir}\" != \".\"; do\n  if test -d ${dir}; then\n    test \"`echo ${dir}/*`\" != \"${dir}/*\" && break;\n    echo \"rmdir ${dir}\"\n    rmdir ${dir}\n  fi\n  dir=`dirname ${dir}`\ndone\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/version",
    "content": "#!/bin/sh\n\nfgrep 'const char *interpreterVersion = ' $1 |\nsed 's,.*\"Squeak,,;s, .*#,\\.,;s,].*,,;s,\\., ,g;s,$,,'\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/version.stamp",
    "content": "20020601\n"
  },
  {
    "path": "vm/src/from_squeak/unix/config/verstamp",
    "content": "#!/bin/sh\n# \n# Write a version stamp into $1.  $2 is the compiler name.\n# \n# Last edited: 2002-06-08 18:32:53 by piumarta on emilia.inria.fr\n\nif test -f $1; then\n  SERIAL=`head -1 $1 | cut -d ' ' -f 3 | sed 's/;//'`\n  SERIAL=`expr $SERIAL + 1`\nelse\n  SERIAL=1\nfi\n\nif expr \"$2\" : \".*gcc\" >/dev/null ; then\n  CC=`$2 -v 2>&1 | tail -1 | sed 's/.*based on//g' | awk '{print $1 , $3} '`\nelse\n  CC=$2\nfi\n\ncat <<_EOF >$1\nint vm_serial= $SERIAL;\nchar *vm_date= \"`date`\";\nchar *cc_version= \"$CC\";\nchar *ux_version= \"`uname -a | sed 's, unknown,,g'`\";\n_EOF\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/3.10-1.RELEASE_NOTES",
    "content": "Changes since 3.9-12:\n\nVM generated from 3.10-7159 with latest plugins from package universe\nwhere available; OSProcess and XDisplay from Dave Lewis's download\npage.\n\nNetwork support for IPv6 added.\n\nQuartz display driver tries to keep the fullscreen window on the\ncorrect screen on multi-head machines.\n\nThe image should now receive key events for all input has valid UCS4\ncode.  Keyboard and mouse wheel events record UCS4 code in the input\nbuffer for older images that still poll for input.\n\nWindow event generated for window close to give the image chance to\ncancel or save before the implied quit.\n\nVarious small changes for OLPC compatibility.\n\nXdnd supports dragging items out of the image.\n\nSupport for locale plugin added.\n\nPlatform support added for locales, dead keys, compose key and\nmultikey characters.  VM tries to do 'the right thing' according to\nlocale environment variables.\n\nManual page updated to reflect new options and environment variables:\n\n  SQUEAK_COMPOSITIONINPUT\n  -compositioninput\n    enables the overlay window for composed character input.  Needs\n    the XImm plugin (not yet bundled) to work.\n  \n  SQUEAK_XICFONT\n  -xicfont <fontName>\n    specifies the font name to use in the overlay window.\n\n  SQUEAK_PLAYBACK, SQUEAK_CAPTURE\n  -playback <name>\n  -capture <name>\n    specify the devices to use for sound playback and capture in ALSA.\n\nBuild environment:\n\n  Latest VMM running in 3.10 emits CR instead of LF on Unix.\n  vm/Makefile.in now deals with this by converting CR to LF before\n  gnuification.\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/3.10-2.RELEASE_NOTES",
    "content": "Changes since 3.10-1:\n\nSoundPlugin and sound driver support for device selection and mixer control.\n\nDragDropPlugin and display driver support for dragging items out of squeak.\n\nNew plugins and platform support (not all are pre-built in binary distributions):\n  AioPlugin\n  ClipboardExtendedPlugin\n  DBusPlugin\n  GStreamerPlugin\n  OggPlugin\n  RomePlugin\n\nOLPC 'Sugar' UI support added.\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/3.10-3.RELEASE_NOTES",
    "content": "Changes since 3.10-2:\n\nInterpreter and vmm patches from Dave Lewis applied to make 32- and\n64-bit clean VM.  Entire generated sources tree (platforms/unix/src)\nrebuilt.\n\nFileCopy and FFI plugins are now external.\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/3.2-1.RELEASE_NOTES",
    "content": "This VM should work with any 3.3 or earlier image.\n\nThe major changes since 3.1-pre2 are as follows:\n\n- Lots of changes based on patches applied to the SF tree.\n  (See the ChangeLog file in the source distribution for a\n  comprehensive list of these changes and the authors of\n  the SF patches, where relevant.)\n\n- The VM version number (3.2-1) is now decoupled from the image\n  version (3.3alpha-4857) used produced the generated files, as\n  seems to be the case with Mac and Win32 VMs.  For bug reporting\n  purposes, `squeak -version' reports both these version numbers.\n\n- Build process completely rewritten to accommodate VMMaker.  (Lots\n  of documentation in the source distrib under platforms/unix/doc.\n  Plugin developers who want their code to run on Unix absolutely\n  must read this stuff.)\n\n- New option: `-plugins <path>' (env: SQUEAK_PLUGINS='<path>') appends\n  <path> to the list of places the VM seaches for plugins.  Each\n  occurrence of `%n' in <path> is replaced by the name of the plugin\n  being loaded.\n\n  To run a newly-compiled VM without first installing it, use:\n\t.../blddir/squeak -plugins .../blddir/%n/.libs\n\n- Modifier keys are handled more intelligently.  The default is the\n  \"traditional\" Unix behaviour: mod1 is mapped to Command, Ctrl+mod1\n  is mapped to Option, and other modifiers are ignored.  (This is\n  usually what GNU/Linux systems with PC hardware [mod1=Alt] want.)\n\n- For the rest of us, two new options: `-cmdmod <n>' and `-optmod <n>'\n  (env: SQUEAK_CMDMOD=n and SQUEAK_OPTMOD=n).  If one or both of these\n  are set then the X11 modifier `mod<n>' is mapped to Squeak's Command\n  and/or Option, respectively.\n\n  For example, to map a Sun keyboard so that the physical locations of\n  the modifier keys (\"Alt\" = mod1 and \"<>\" [meta] = mod4) correspond\n  precisely to their homologues on an Apple keyboard (\"Option\" and\n  \"Command\") use:\n\n\t-cmdmod 4 -optmod 1\n\n  (or set `export SQUEAK_CMDMOD=4; export SQUEAK_OPTMOD=1' in your\n  .profile to make the change permanent).  (Note that setting a modifier\n  for just one of these keys will entirely disable the other.)\n\n- New option: `-swapbtn' (env: SQUEAK_SWAPBTN=1) reverses the \"yellow\" and\n  \"blue\" buttons which might be useful for people having two-button mice\n  (or who have 3-button mice and no respect for historical precedents).\n\n- Various manual page updates (mainly for new/missing options).\n\n- New Netscape plugin code from Bert Freudenberg.  (Not tested because\n  my Netscape's dynamic loading is broken.)\n\n- OSS sound rewritten from scratch.  (Full-duplex is supported but the\n  image contains bugs which might prevent it from ever being attempted.)\n\n  Both input and output have been tested extensively on Linux 2.4.18 with\n  ALSA 0.9rc1 drivers (www.alsa-project.org) and the the OSS compatibility\n  modules (snd-pcm-oss/mixer) that come with them.  (This is the only\n  [non-commercial] OSS implementation I've found that respects the\n  published OSS API sufficiently to permit any kind of serious development\n  work.)\n\n  With the new implementation, playing and recording should only comsume\n  a fraction of 1% of the CPU.  Your kilometrage may vary depending on\n  the (quite possibly lamentable) state of your OSS drivers.\n\n- New option: `-nomixer' (env: SQUEAK_NOMIXER=1).  For people who prefer\n  that Squeak not arbitrarily set the input gain to 50% every time\n  recording is started, this turns off the mixer primitives.  With this\n  option your external mixer program retains control of the settings\n  (as it should).\n\n- Changes to gnuification should make this thing 5-10% faster on Intel.\n\n- Major overhaul of socket code should prevent lockups.  (There are\n  still outstanding issues but they concern very obscure situations.)\n\n- Lots and lots of smallish changes to the X11 code.  Plus some biggish\n  ones: responsiveness should be better and occasional crashes (or\n  freezes) observed when resizing the window should no longer occur.\n  (`-xshm -xasync' not yet extensively tested with the new code.)\n\n- Copy/Paste problems encountered between Squeak and some applications\n  (probably mainly KDE and anything that uses Qt or gtk) are fixed.\n\n- The default image name is now `squeak.image' (for compatibility with\n  other platforms).\n\n- Default heap size increased to 48MB to cope with recent images.\n\nStill to do:\n\n- mmap()-based memory allocator (when I have time to think about\n  portability).\n\n- Revisit the socket code to make a few minor tweaks for the obscure\n  cases and to pull connection reset detection forward into the\n  getSockState primitive (cf the Mac implementation).\n\n- Add sources and support for building the VM as a Netscape plugin.\n\n- Arrange for -USE_MMX in MpegPlugin on 386.\n\nDon't Panic!\n\n- Just send me mail if something is broken: ian.piumarta@inria.fr\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/3.2-2.RELEASE_NOTES",
    "content": "Since 3.2-1:\n\n- RPMs for ppc and i386 binaries, and noarch .image/.changes and\n  .sources, are available (with prefix /usr)\n\n- fixes serious problem in selection handling (many thanks to Ned \n  Konz for spotting the missing \"break\" :o)\n\n- sysAttr #0 is now full pathname to VM (as per method comment in the\n  image)\n\n- control key behaviour is inverted as per Ned's insistence: mouse\n  wheel to scroll pane, ctrl+wheel to scroll selection\n\n- images are now in version-independent libdir and are installed\n  compressed to save space.  inisqueak uncompresses them to\n  squeak.{image,changes} in the cwd\n\n- lots of subtle changes to cope with automated builds of tarballs and\n  RPMs from cron jobs\n\n- slight version numbering shuffle to allow tarballs and RPMs to have\n  exactly the same version numbers for corresponding files\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/3.2-3.RELEASE_NOTES",
    "content": "Since 3.2-2:\n\nBuild\n\n* Make problems fixed.  OpenBSD should now work: $< no longer used\n  anywhere and ranlib run on all static libs.  (Craig, you should\n  submit a PR to OpenBSD about the $< thing: it's a bug in make.)\n\nVM\n\n* Socket options processing improved.\n\n* Everything compiles cleanly (and has been tested and is known to\n  work) with -DHEADLESS.  (Many thanks to Colin Putney who submitted\n  some of the necessary changes.  I added a bunch more to make it\n  work with OSProcess too.)\n\n* Small change to browser support code to bring it into line with what\n  the image expects (fail primBrowserReady if not running in a\n  browser).  FWIW: this cures (and was hunted down because of) an\n  infuriating three-second pause on return from snapshot.\n\nPlugins\n\n* B3DAccelerator fixes (many thanks to Joshua Gargus).  However it\n  doesn't want to work for me (either internal or external):\n     X Error of failed request:  GLXBadDrawable\n       Major opcode of failed request:  143 (GLX)\n       Minor opcode of failed request:  11 (X_GLXSwapBuffers)\n  but that doesn't necessarily mean it won't work for other people.\n  I'll look into this sometime (but I don't consider it urgent, and it\n  might just be my Xserver is broken or maybe libGL hasn't been tested\n  very much on bigendian processors...).\n\n* AsynchFilePlugin support has been implemented (and tested).\n\n* UnixOSProcessPlugin now bundled with the sources (and built as\n  external plugin in the precompiled VMs).\n\n* New plugin: PseudoTTYPlugin (extends AsynchFilePlugin) adding\n  support for pseudo ttys (necessary if processes spawned from Squeak\n  are to believe themselves connected to a real terminal).  The\n  changesets for PseudoTTY and PseudoTTYPlugin are in the platform\n  plugin dir (unix/plugins/PseudoTTYPlugin/*.cs).  Maybe Dave will\n  take a look at this and pull the functionality into OSProcess (which\n  is probably where it belongs).\n\nEnjoy!\n\nIan\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/3.2-4.RELEASE_NOTES",
    "content": "This release is mainly for the BSD folks.  It fixes some portability\nissues in the PTY plugin (I've now built and tested it on GNU/Linux,\nNetBSD and Solaris and I'm hopeful that it will compile out of the box\nand work on almost any Unix now) and ties up the last of the loose\nends in BSD build.\n\nSince 3.2-3:\n\n* PtyPlugin rewritten to use either /dev/ptmx or openpty(), as\n  availablility permits.\n\n* Minor tweaks to build process (thanks to Steve Elkins for spotting\n  the problems).\n\n* A couple of buglets fixed in AsynchFilePlugin (the *class*, not the\n  support code) to prevent core dumps when AsyncFiles are left open\n  across snapshot.  (The changes have been sent to John Mc who was, I\n  believe, the original author.  Apologies if this isn't so.  In any\n  case the changes file is in the unix/plugins/AsynchFilePlugin\n  directory and they're in the Unix VM source/binaries [since I've\n  had core dumps from these bugs recently].)\n\nThat's it.\n\nIan\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/3.2-5.RELEASE_NOTES",
    "content": "3.2-5 released on 2002-10-16.\n\nMajor changes since 3.2-4:\n\nVM:\n\n  Option `-fullscreen' should work better.\n\n  New option: `-iconic' which does the obvious thing.\n\n  New option: `-notimer' disables use of itimers and reverts to\n  gettimeofday() for low-res clock.\n\n  Selection handling support for compatibility with latest Qt (based\n  on code from Ned Konz -- thanks!).\n\n  Delicious new browser support code from Bert Freudenberg.  (Tested\n  under Mozilla on GNU/Linux PPC, but YKMV.)\n\n  Minor tweaks to closing the X connection via OSProcPlug.  (Thanks to\n  Dave Lewis for spotting the problem.)\n\n  Minor tweak in sound output to cope with incomplete writes (which\n  shouldn't happen, but some ALSA drivers just don't want to respect\n  the rules).  (Thanks to Lex for this one.)\n\n  Broken versions of Solaris that lack snprintf() should no longer\n  cause compile/link errors.\n\n  As a failsafe, sqGnu.h now defines (empty) all xx_REG symbols on\n  platforms it doesn't recognise.  (Thanks to Tommy Thorn for spotting\n  the problem.)\n\n  aio can now manage fd 0 (stdin).\n\nPlugins:\n\n  RePlugin is now bundled with the VM.\n\n  Minor tweaks to PseudoTTYPlugin to avoid potential SEGV from stale\n  AsyncFile handles.\n\n  PTYPlugin is now external by default, to ease the task of compiling\n  on systems that have broken (or no) pty support.  (There might still\n  be problems on old [pre-2.8] Solaris, Irix and HP/UX.  Not having\n  accounts on such machines I cannot really test it all.)\n\n  SqueakFFIPrims is now enabled and bundled with the VM as an external\n  plugin (and various patches for PPC have been submitted to the\n  libffi folks as a result ;).  Hopefully this will allow Unix\n  Squeakers to drink tea on the croquet lawn along with everyone else.\n\nBuild:\n\n  Build process now uses a configure script generated from the VERY\n  LATEST autoconf (2.53) and libtool (1.4.2) that I downloaded\n  _direct_ from gnu.org and lovingly installed by hand (rather than\n  using the broken ones that were in pkgsrc and which created\n  practically unusable configure scripts in 3.2-4).  Many associated\n  diverse changes in the *.{ac,in} files due to incompatibilities in\n  the new autoconf.  (Obviously this only applies to `configure' as\n  shipped from our factory.  If you regenerate `configure' for\n  yourself then everything depends on your autoconf [not mine] and\n  your [fictitious] warranty is immediately void. ;)\n\t\n  configure now recognises `--with-gnu-awk[=gawk]' to force gawk even\n  on systems where mawk is the default.  PLEASE use this flag if you\n  have problems rather than complaining to me about gnuify not\n  working.\n\n  configure now recognises `--without-npsqueak' to exclude browser\n  support (npsqueak) in the build.  (Browser support is experimental\n  and not [yet] quite the final thing that Bert and I are aiming for.\n  Use at your own risk.)\n\n  SqueakFFIPrims is enabled conditionally on ffi.h and libffi.so (the\n  latter becomes a library dependency of the plugin).  The header and\n  library must be in your compiler's default search paths.\n\nSupport:\n\n  inisqueak now looks first for `squeak.{image,changes}' in the libdir,\n  to let sysadmins link to the preferred VM.  If more than one VM is in\n  libdir then inisqueak presents a list and lets you choose.  It also\n  has some options:\n\t-b\tavoid all interaction (exit status => success)\n\t-l\tlist available VM versions\n\t-n\tinstall but don't start up\n\n  Manual page updated to include the new options, etc.\n\nPrebuilt distributions:\n\n  I can't be bothered rebooting my powerbook to make a NetBSD/macppc\n  distribution.  (In the whole time that I have been making BSD\n  binaries available, only two people ever downloaded them.)  If I'm\n  wrong (maybe hundreds of BSD fans are secretly downloading them from\n  uiuc?) then tell me and I'll get off my rear end and build one.\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/3.2-6.RELEASE_NOTES",
    "content": "3.2-6 released on 2002-11-27.\n\nThis release consolidates the VM support required by Croquet (which is\nmissing in 3.2) and that required by several 3.2 plugins (that are\nmissing in Croquet).  It should work just fine with 3.2, 3.4 and\nCroquet images.\n\nMajor changes since 3.2-5:\n\nVM:\n\n  New VM sources generated (for Croquet compatibility).  The core is\n  now generated out of a 3.4a-5125 image and runs Croquet fine on the\n  build machine.\n\n  Various small changes in several places for Darwin compatibility.\n\n  The `-secure' option has been removed.\n\nPlugins:\n\n  Updated OpenGL code for B3DAcceleratorPlugin.  _Many_ thanks to Bert\n  Freudenberg for this.\n\n  OSProcessPlugin updated to 3.0.2.\n\nBuild:\n\n  Updated to autoconf-2.54.\n\n  Builds out of the box on Darwin, either headless or with X11 support\n  (tested with XDarwin 4.2.1.1 on darwin6.2).  NOTE: there are still\n  bugs in autoconf (more precisely, in aclocal and libtool) concerning\n  darwin.  If you rebuild the configure script (by running `autoconf'\n  or `make' in the config dir) then the resulting configure script may\n  not work (the build will fail when trying to create shared libs for\n  external plugins).  If you are affected by this then I can send you\n  my patched versions of ltcf-c.sh and aclocal.m4.  You have been\n  warned!\n\n  Problems with libGLs that depend on libpthread should be fixed.\n\n  Link errors in sqUnixMozilla on BSD should no longer occur.\n\n  Removed the majority of the ridiculous dependencies in the RPM.\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/3.5-1devel.RELEASE_NOTES",
    "content": "Major departures from 3.4:\n\n- MacOSX is now fully supported (Quartz window, audio input/output,\n  drag&drop, etc.).  X11 is also supported (if installed on the host\n  machine).\n\n- Display and sound support code has been moved out of the main\n  executable into runtime modules.  The choice of display method\n  (Quartz, X11, no display at all) and sound (MacOSX CoreAudio, OSS,\n  NAS, Sun, no sound at all) can be changed via command-line options\n  when staring the VM.\n\n- A new option `-nodisplay' has been added.  It differs from\n  `-headless' in that the former disables display entirely (making the\n  memory footprint of the VM smaller) while the latter loads the\n  display code but does not open the Window (but allowing the\n  possibility of retroactively opening the window at a some later\n  time).\n\n- A new option `-nosound' has been added and does for sound what\n  `-nodisplay' does for the display.\n\n- Memory allocation for the heap is now dynamic, based on mmap().  The\n  heap will grow and shrink as the image's memory requirements change\n  over time.  This can be disabled by giving the option `-memory\n  <N>[nk]' which tells the VM to use a fixed-size heap.  A new option\n  `-mmap <N>[mk]' is provided to limit the size to which mmap() will\n  dynamically grow the heap (the default is 1Gbyte or 75% of your\n  available virtual memory, whichever is smaller).  If both options\n  are given then `-memory' has precedence (disabling the mmap()-based\n  memory allocator).\n\n- The configure option `--with-audio=...' has been removed.  configure\n  will arrange to build as many sound modules for which it can find\n  the required headers/libraries.\n\n- configure will also build as many window system support modules for\n  which it can find headers/libraries.  The options `--without-x' and\n  `--without-quartz' are available to explicitly disable one or both.\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/3.6-3.RELEASE_NOTES",
    "content": "3.6-3 released on 2004-04-03.\n\nThis release finalises the long series of 3.6 beta and gamma releases\nand includes significant changes in the VM since 3.4.  It should be\ncompatible with all image versions.\n\nChanges since 3.4-2:\n\nVM:\n\n  Substantial rewrite of Mac OS X sound code for OS 10.3 (Panther).\n  Better scroll wheel and 3-button mouse behaviour on OS X.\n  Improved dock icon behaviour on OSX.\n  New icons for OSX (thanks to Bert Freudenberg).\n  Improvements to character set conversion on Solaris.\n  Date/time reported on files now consistent with output from \"ls\".\n  New dead key support for X11 (activated if LC_CTYPE/LC_ALL set)\n  New option \"-nointl\" turns off dead key support in X11.\n  Various OpenGL fixes.\n  Improved timing for Delays.\n  Copy/paste compatibility problems with Qt fixed (thanks to Ned Konz).\n  Display/sound drivers are now dynamically loaded (and can be selected) at startup.\n  New display driver \"fbdev\" for running on the Linux console.\n\nPlugins:\n\n  New OSProcessPlugin from Dave Lewis.\n  Support for new Socket primitive listenOn:backlogSize:interface:.\n  Problems with plugin and shared library searching fixed.\n\nBuild:\n\n  Mac OS X dependency on libiconv removed.\n  Dependencies on glibc2.3 in the 386 GNU/Linux version removed.\n  RPMs have \"root.bin\" ownership on everything.\n\nPlease report bugs to: ian.piumarta@inria.fr\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/3.7-7.RELEASE_NOTES",
    "content": "Changes since 3.6 \"final\":\n\nVM:\n\n  Netscape plugin understands \"imageName\" and \"failureURL\" attributes\n  in <embed ...> tags.\n\n  sqGnu.h asm() statemtnts fixed for gcc-3.1 compatibility.\n\n  Less noise from dlopen() and friends when probing for plugins.\n\n  Problems preventing more than one external plugin from loading in\n  Mac OS X fixed.\n\n  Use of alloca() made more portable.\n\n  Obscure bug fixed that prevented socket options being set on some\n  platforms.\n\n  NPSqueak improvements and bug fixes from Bert Freudenberg and Jens\n  Lincke.  New environment variable SQUEAK_USERDIR used to find plugin\n  image; defaults to 'My Squeak'.  (May break for users of shells\n  other than bash.  Contact Bert if you have problems.)\n\n  Interpreter changes from Ned to avoid image segment loading errors\n  caused by oops >= 2GB.\n\nVM drivers:\n\n  Preliminary drag-and-drop support added to the X11 display driver.\n\n  vm-sound-NAS driver explicitly depends on libaudio.\n\n  New option '-glxdebug <n>' sets OpenGL debug message level for X11 display.\n\nPlugins:\n\n  Additional checks for external data in SocketPlugin.\n\n  New OSProcessPlugin (including XDpyPlg and AioPlg).\n\nBuild:\n\n  Optimisation flags default to '-O' if compiler not recognised.\n\n  SVN repository now includes contents of 'src' directory used to\n  build Unix binaries.  No more endless searching for the right\n  combination of obscure VMM version and image updates.\n\n  Build instructions updated for SVN and recent organisational\n  changes.\n\n  'gnuify' inserts a #error into gnu-interp.c if it detects a problem\n  (causing cpp to barf cleanly with a comprehensible error message,\n  rather than leaving the compiler to spew hundreds of obscure error\n  messages).\n\nDocumentation:\n\n  URIs updated to reflect recent organisational changes.\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/3.7b-2.RELEASE_NOTES",
    "content": "Changes since 3.6 \"final\":\n\nVM:\n\n  sqGnu.h asm() statemtnts fixed for gcc-3.1 compatibility.\n\n  Less noise from dlopen() and friends when probing for plugins.\n\n  Problems preventing more than one external plugin from loading in\n  Mac OS X fixed.\n\nVM drivers:\n\n  vm-sound-NAS driver explicitly depends on libaudio.\n\n  New option '-glxdebug <n>' sets OpenGL debug message level for X11 display.\n\nPlugins:\n\n  Additional checks for external data in SocketPlugin.\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/3.7b-3.RELEASE_NOTES",
    "content": "Changes since 3.6 \"final\":\n\nVM:\n\n  sqGnu.h asm() statemtnts fixed for gcc-3.1 compatibility.\n\n  Less noise from dlopen() and friends when probing for plugins.\n\n  Problems preventing more than one external plugin from loading in\n  Mac OS X fixed.\n\nVM drivers:\n\n  Preliminary drag-and-drop support added to the X11 display driver.\n\n  vm-sound-NAS driver explicitly depends on libaudio.\n\n  New option '-glxdebug <n>' sets OpenGL debug message level for X11 display.\n\nPlugins:\n\n  Additional checks for external data in SocketPlugin.\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/3.7b-4.RELEASE_NOTES",
    "content": "Changes since 3.6 \"final\":\n\nVM:\n\n  sqGnu.h asm() statemtnts fixed for gcc-3.1 compatibility.\n\n  Less noise from dlopen() and friends when probing for plugins.\n\n  Problems preventing more than one external plugin from loading in\n  Mac OS X fixed.\n\nVM drivers:\n\n  Preliminary drag-and-drop support added to the X11 display driver.\n\n  vm-sound-NAS driver explicitly depends on libaudio.\n\n  New option '-glxdebug <n>' sets OpenGL debug message level for X11 display.\n\nPlugins:\n\n  Additional checks for external data in SocketPlugin.\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/3.7b-5.RELEASE_NOTES",
    "content": "Changes since 3.6 \"final\":\n\nVM:\n\n  Netscape plugin understands \"imageName\" and \"failureURL\" attributes\n  in <embed ...> tags.\n\n  sqGnu.h asm() statemtnts fixed for gcc-3.1 compatibility.\n\n  Less noise from dlopen() and friends when probing for plugins.\n\n  Problems preventing more than one external plugin from loading in\n  Mac OS X fixed.\n\nVM drivers:\n\n  Preliminary drag-and-drop support added to the X11 display driver.\n\n  vm-sound-NAS driver explicitly depends on libaudio.\n\n  New option '-glxdebug <n>' sets OpenGL debug message level for X11 display.\n\nPlugins:\n\n  Additional checks for external data in SocketPlugin.\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/3.9-4.RELEASE_NOTES",
    "content": "Changes since 3.7-7:\n\nVM:\n\n  The VM is now fully compatible with Croquet and will run both Squeak\n  and Croquet images.\n\n  Attribute 1006 answers a string describing the VM build environment.\n\nVM drivers:\n\n  vm-display-X11 no longer generates Squeak KeyUp events for X\n  KeyRelease events that came from autorepeat.\n\nPlugins:\n\n  Parts of aio and sqUnixSocket modified to support asynchronous\n  notification of i/o, and a new entry point (aioSleep) added for the\n  benefit of the Mac VM.  (In some cases it's trivial to demonstrate a\n  factor of 2000 improvement in socket throughput.)  See Additional\n  Notes below if rebuilding from source.\n\n  SO_REUSEPORT has been enabled for any architectures that support it.\n  At the time of writing Darwin does but Linux does not.\n\n  UUID plugin now supported and bundled.\n\n  OSProcess and XDisplayControl plugins updated from Dave Lewis's\n  distributions and bundled.\n\n  CroquetPlugin and FloatMathPlugin from Andreas are now bundled for\n  full Croquet compatibility.\n\n  Securiry plugin now obeys SQUEAK_USERDIR if set.\n\nAdditional Notes:\n\n  The socket improvements depend on a tiny (and otherwise\n  insignificant) change in the Interpreter.  If you are regenerating\n  source code from VMMaker, first open a browser and navigate to\n  Interpreter>>forceInterruptCheck.  If this method is defined as\n\n  \tforceInterruptCheck\n\t    \"force an interrupt check ASAP\"\n\t    interruptCheckCounter := -1000\n\n  then you *must* append one line to it:\n\n\tforceInterruptCheck\n\t    \"force an interrupt check ASAP\"\n\t    interruptCheckCounter := -1000.\n\t    nextPollTick := 0\n\n  before generating the core VM source.  Without this modification the\n  socket support code changes will have no effect whatsoever on the\n  latency and throughput achievable from Squeak code.\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/3.9-7.RELEASE_NOTES",
    "content": "Changes since 3.9-4:\n\nVM:\n\n  Add code to resolve links (and aliases on OS X) in path names.\n\n  Check for and use nanosleep() on all platforms.  This prevents the\n  VM comsuming 100% CPU on some platforms due to small (1ms) timeouts\n  in ioRelinquishProcessor() coming from the idle process.\n\n  Reset interruptCheckCounter at the end of ioRelinquishProcessor to\n  ensure input semaphore signalled promptly after events.\n\nPlugins:\n\n  Added Balloon3DEngine (aka Squeak3D) plugin and bundled it.\n\n  Added AioPlugin plugin and bundled it.\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/COPYING",
    "content": "Source files below 'platforms/Cross' in this distribution that do not\ncontain individual copyright and license notices, and\n\nSource files below 'platforms/unix/src' in this distribution that do\nnot contain individual copyright and license notices are:\n\n  Copyright (C) 1996-2006 by Viewpoints Research Institute and other\n                             authors/contributors as listed.\n\n  All rights reserved.\n\nAll other source files below platforms/unix in this distribution that do not\ncontain individual copyright and license notices are:\n\n  Copyright (C) 1996-2006 by Ian Piumarta and other authors/contributors\n                             listed in individual source files.\n\n  All rights reserved.\n\nFor all of the above files:\n\n  Permission is hereby granted, free of charge, to any person obtaining a copy\n  of this software and associated documentation files (the \"Software\"), to deal\n  in the Software without restriction, including without limitation the rights\n  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n  copies of the Software, and to permit persons to whom the Software is\n  furnished to do so, subject to the following conditions:\n\n  The above copyright notice and this permission notice shall be included in\n  all copies or substantial portions of the Software.\n\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n  SOFTWARE.\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/COPYRIGHT",
    "content": "Source files below 'platforms/Cross' in this distribution that do not\ncontain individual copyright and license notices, and\n\nSource files below 'platforms/unix/src' in this distribution that do\nnot contain individual copyright and license notices are:\n\n  Copyright (C) 1996-2006 by Viewpoints Research Institute and other\n                             authors/contributors as listed.\n\n  All rights reserved.\n\nAll other source files below platforms/unix in this distribution that do not\ncontain individual copyright and license notices are:\n\n  Copyright (C) 1996-2006 by Ian Piumarta and other authors/contributors\n                             listed in individual source files.\n\n  All rights reserved.\n\nFor all of the above files:\n\n  Permission is hereby granted, free of charge, to any person obtaining a copy\n  of this software and associated documentation files (the \"Software\"), to deal\n  in the Software without restriction, including without limitation the rights\n  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n  copies of the Software, and to permit persons to whom the Software is\n  furnished to do so, subject to the following conditions:\n\n  The above copyright notice and this permission notice shall be included in\n  all copies or substantial portions of the Software.\n\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n  SOFTWARE.\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/HowToBuildFromSource.html/HowToBuildFromSource-node1.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n\n<!--Converted with LaTeX2HTML 2002-2-1 (1.70)\noriginal version by:  Nikos Drakos, CBLU, University of Leeds\n* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan\n* with significant contributions from:\n  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->\n<HTML>\n<HEAD>\n<TITLE>Contents</TITLE>\n<META NAME=\"description\" CONTENT=\"Contents\">\n<META NAME=\"keywords\" CONTENT=\"HowToBuildFromSource\">\n<META NAME=\"resource-type\" CONTENT=\"document\">\n<META NAME=\"distribution\" CONTENT=\"global\">\n\n<META NAME=\"Generator\" CONTENT=\"LaTeX2HTML v2002-2-1\">\n<META HTTP-EQUIV=\"Content-Style-Type\" CONTENT=\"text/css\">\n\n<LINK REL=\"STYLESHEET\" HREF=\"HowToBuildFromSource.css\">\n\n<LINK REL=\"next\" HREF=\"HowToBuildFromSource-node2.html\">\n<LINK REL=\"previous\" HREF=\"HowToBuildFromSource.html\">\n<LINK REL=\"up\" HREF=\"HowToBuildFromSource.html\">\n<LINK REL=\"next\" HREF=\"HowToBuildFromSource-node2.html\">\n</HEAD>\n\n<BODY >\n\n<DIV CLASS=\"navigation\"><!--Navigation Panel-->\n<A NAME=\"tex2html43\"\n  HREF=\"HowToBuildFromSource-node2.html\">\n<IMG WIDTH=\"37\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"next\" SRC=\"next.png\"></A> \n<A NAME=\"tex2html39\"\n  HREF=\"HowToBuildFromSource.html\">\n<IMG WIDTH=\"26\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"up\" SRC=\"up.png\"></A> \n<A NAME=\"tex2html33\"\n  HREF=\"HowToBuildFromSource.html\">\n<IMG WIDTH=\"63\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"previous\" SRC=\"prev.png\"></A>  \n<A NAME=\"tex2html41\"\n  HREF=\"HowToBuildFromSource-node6.html\">\n<IMG WIDTH=\"43\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"index\" SRC=\"index.png\"></A> \n<BR>\n<B> Next:</B> <A NAME=\"tex2html44\"\n  HREF=\"HowToBuildFromSource-node2.html\">0 The easy way</A>\n<B> Up:</B> <A NAME=\"tex2html40\"\n  HREF=\"HowToBuildFromSource.html\">Building Unix Squeak (</A>\n<B> Previous:</B> <A NAME=\"tex2html34\"\n  HREF=\"HowToBuildFromSource.html\">Building Unix Squeak (</A>\n &nbsp; <B>  <A NAME=\"tex2html42\"\n  HREF=\"HowToBuildFromSource-node6.html\">Index</A></B> \n<BR>\n<BR></DIV>\n<!--End of Navigation Panel-->\n<BR>\n\n<H2><A NAME=\"SECTION00010000000000000000\">\nContents</A>\n</H2>\n<!--Table of Contents-->\n\n<UL CLASS=\"TofC\">\n<LI><A NAME=\"tex2html45\"\n  HREF=\"HowToBuildFromSource-node2.html\">0 The easy way</A>\n<LI><A NAME=\"tex2html46\"\n  HREF=\"HowToBuildFromSource-node3.html\">1 The hard way: configure, build, install</A>\n<LI><A NAME=\"tex2html47\"\n  HREF=\"HowToBuildFromSource-node4.html\">2 Generating your own VM and plugin sources</A>\n<UL>\n<LI><A NAME=\"tex2html48\"\n  HREF=\"HowToBuildFromSource-node4.html#SECTION00041000000000000000\">2.1 How configure finds the src directory</A>\n</UL>\n<BR>\n<LI><A NAME=\"tex2html49\"\n  HREF=\"HowToBuildFromSource-node5.html\">3 Adding your own plugins</A>\n<UL>\n<LI><A NAME=\"tex2html50\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00051000000000000000\">3.1 Plugin-specific configuration</A>\n<LI><A NAME=\"tex2html51\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00052000000000000000\">3.2 Plugin-specific Makefile declarations and rules</A>\n<LI><A NAME=\"tex2html52\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00053000000000000000\">3.3 Examples taken from existing plugins</A>\n<LI><A NAME=\"tex2html53\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00054000000000000000\">3.4 Coping with VMMaker quirks</A>\n<LI><A NAME=\"tex2html54\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00055000000000000000\">3.5 If all else fails</A>\n</UL>\n<BR>\n<LI><A NAME=\"tex2html55\"\n  HREF=\"HowToBuildFromSource-node6.html\">Index</A>\n</UL>\n<!--End of Table of Contents-->\n<P>\n\n<P>\n<BR><HR>\n<ADDRESS>\n\n2005-03-17\n</ADDRESS>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/HowToBuildFromSource.html/HowToBuildFromSource-node2.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n\n<!--Converted with LaTeX2HTML 2002-2-1 (1.70)\noriginal version by:  Nikos Drakos, CBLU, University of Leeds\n* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan\n* with significant contributions from:\n  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->\n<HTML>\n<HEAD>\n<TITLE>0 The easy way</TITLE>\n<META NAME=\"description\" CONTENT=\"0 The easy way\">\n<META NAME=\"keywords\" CONTENT=\"HowToBuildFromSource\">\n<META NAME=\"resource-type\" CONTENT=\"document\">\n<META NAME=\"distribution\" CONTENT=\"global\">\n\n<META NAME=\"Generator\" CONTENT=\"LaTeX2HTML v2002-2-1\">\n<META HTTP-EQUIV=\"Content-Style-Type\" CONTENT=\"text/css\">\n\n<LINK REL=\"STYLESHEET\" HREF=\"HowToBuildFromSource.css\">\n\n<LINK REL=\"next\" HREF=\"HowToBuildFromSource-node3.html\">\n<LINK REL=\"previous\" HREF=\"HowToBuildFromSource-node1.html\">\n<LINK REL=\"up\" HREF=\"HowToBuildFromSource.html\">\n<LINK REL=\"next\" HREF=\"HowToBuildFromSource-node3.html\">\n</HEAD>\n\n<BODY >\n\n<DIV CLASS=\"navigation\"><!--Navigation Panel-->\n<A NAME=\"tex2html68\"\n  HREF=\"HowToBuildFromSource-node3.html\">\n<IMG WIDTH=\"37\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"next\" SRC=\"next.png\"></A> \n<A NAME=\"tex2html62\"\n  HREF=\"HowToBuildFromSource.html\">\n<IMG WIDTH=\"26\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"up\" SRC=\"up.png\"></A> \n<A NAME=\"tex2html56\"\n  HREF=\"HowToBuildFromSource-node1.html\">\n<IMG WIDTH=\"63\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"previous\" SRC=\"prev.png\"></A> \n<A NAME=\"tex2html64\"\n  HREF=\"HowToBuildFromSource-node1.html\">\n<IMG WIDTH=\"65\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"contents\" SRC=\"contents.png\"></A> \n<A NAME=\"tex2html66\"\n  HREF=\"HowToBuildFromSource-node6.html\">\n<IMG WIDTH=\"43\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"index\" SRC=\"index.png\"></A> \n<BR>\n<B> Next:</B> <A NAME=\"tex2html69\"\n  HREF=\"HowToBuildFromSource-node3.html\">1 The hard way:</A>\n<B> Up:</B> <A NAME=\"tex2html63\"\n  HREF=\"HowToBuildFromSource.html\">Building Unix Squeak (</A>\n<B> Previous:</B> <A NAME=\"tex2html57\"\n  HREF=\"HowToBuildFromSource-node1.html\">Contents</A>\n &nbsp; <B>  <A NAME=\"tex2html65\"\n  HREF=\"HowToBuildFromSource-node1.html\">Contents</A></B> \n &nbsp; <B>  <A NAME=\"tex2html67\"\n  HREF=\"HowToBuildFromSource-node6.html\">Index</A></B> \n<BR>\n<BR></DIV>\n<!--End of Navigation Panel-->\n\n<H1><A NAME=\"SECTION00020000000000000000\">\n<SPAN CLASS=\"arabic\">0</SPAN> The easy way</A>\n</H1>\n\n<P>\nBeginning with version 3.7-7, everything you need is included with the\nUnix sources regardless of how you obtained them&nbsp;- either as a\ntarball or by repository checkout.  (This was done to eliminate\nfrequent problems encountered by people combining the repository Unix\nand Cross sources with a set of incompatible generated sources.)\n\n<P>\nIf you extract a tarball then you will have a top-level directory\nnamed <TT>Squeak-X.Y-Z</TT> (for some values of X, Y, and Z).  If you\nare checking out from a repository, you can call the direcory anything\nyou like; for example:\n<SPAN ID=\"hue544\">\n\n<DIV CLASS=\"alltt\" ALIGN=\"LEFT\">\n<TT>\n \n<FONT COLOR=\"#0000ff\">\n<BR>&nbsp;&nbsp;$ svn co http://squeak.hpl.hp.com/svn/squeak/trunk squeak\n<BR></FONT></TT>\n</DIV>\n</SPAN>\n<P>\nwill leave you with a directory called <TT>squeak</TT>.  (We'll\nassume from now on that the directory is called <TT>squeak</TT>.)\n\n<P>\nNext change to the 'unix' directory within the sources that you just\nchecked out (or extracted from the tarball):\n<SPAN ID=\"hue546\">\n\n<DIV CLASS=\"alltt\" ALIGN=\"LEFT\">\n<TT>\n \n<FONT COLOR=\"#0000ff\">\n<BR>&nbsp;&nbsp;$ cd squeak/platforms/unix\n<BR></FONT></TT>\n</DIV>\n</SPAN>\n<P>\nBuild the VM and plugins by running <TT>make</TT>:\n<SPAN ID=\"hue548\">\n\n<DIV CLASS=\"alltt\" ALIGN=\"LEFT\">\n<TT>\n \n<FONT COLOR=\"#0000ff\">\n<BR>&nbsp;&nbsp;$ make\n<BR></FONT></TT>\n</DIV>\n</SPAN>\n<P>\nThen install the VM, plugins and manual pages by running\n<TT>make</TT> again (with superuser privileges):\n<SPAN ID=\"hue550\">\n\n<DIV CLASS=\"alltt\" ALIGN=\"LEFT\">\n<TT>\n \n<FONT COLOR=\"#0000ff\">\n<BR>&nbsp;&nbsp;$ sudo make install\n<BR></FONT></TT>\n</DIV>\n</SPAN>\n<P>\nTo delete the temporary files created during the build\nprocess, run <TT>make</TT> one last time:\n<SPAN ID=\"hue552\">\n\n<DIV CLASS=\"alltt\" ALIGN=\"LEFT\">\n<TT>\n \n<FONT COLOR=\"#0000ff\">\n<BR>&nbsp;&nbsp;$ make clean\n<BR></FONT></TT>\n</DIV>\n</SPAN>\n<P>\nThat's all there is to it.\n\n<P>\n\n<DIV CLASS=\"navigation\"><HR>\n<!--Navigation Panel-->\n<A NAME=\"tex2html68\"\n  HREF=\"HowToBuildFromSource-node3.html\">\n<IMG WIDTH=\"37\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"next\" SRC=\"next.png\"></A> \n<A NAME=\"tex2html62\"\n  HREF=\"HowToBuildFromSource.html\">\n<IMG WIDTH=\"26\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"up\" SRC=\"up.png\"></A> \n<A NAME=\"tex2html56\"\n  HREF=\"HowToBuildFromSource-node1.html\">\n<IMG WIDTH=\"63\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"previous\" SRC=\"prev.png\"></A> \n<A NAME=\"tex2html64\"\n  HREF=\"HowToBuildFromSource-node1.html\">\n<IMG WIDTH=\"65\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"contents\" SRC=\"contents.png\"></A> \n<A NAME=\"tex2html66\"\n  HREF=\"HowToBuildFromSource-node6.html\">\n<IMG WIDTH=\"43\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"index\" SRC=\"index.png\"></A> \n<BR>\n<B> Next:</B> <A NAME=\"tex2html69\"\n  HREF=\"HowToBuildFromSource-node3.html\">1 The hard way:</A>\n<B> Up:</B> <A NAME=\"tex2html63\"\n  HREF=\"HowToBuildFromSource.html\">Building Unix Squeak (</A>\n<B> Previous:</B> <A NAME=\"tex2html57\"\n  HREF=\"HowToBuildFromSource-node1.html\">Contents</A>\n &nbsp; <B>  <A NAME=\"tex2html65\"\n  HREF=\"HowToBuildFromSource-node1.html\">Contents</A></B> \n &nbsp; <B>  <A NAME=\"tex2html67\"\n  HREF=\"HowToBuildFromSource-node6.html\">Index</A></B> </DIV>\n<!--End of Navigation Panel-->\n<ADDRESS>\n\n2005-03-17\n</ADDRESS>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/HowToBuildFromSource.html/HowToBuildFromSource-node3.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n\n<!--Converted with LaTeX2HTML 2002-2-1 (1.70)\noriginal version by:  Nikos Drakos, CBLU, University of Leeds\n* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan\n* with significant contributions from:\n  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->\n<HTML>\n<HEAD>\n<TITLE>1 The hard way: configure, build, install</TITLE>\n<META NAME=\"description\" CONTENT=\"1 The hard way: configure, build, install\">\n<META NAME=\"keywords\" CONTENT=\"HowToBuildFromSource\">\n<META NAME=\"resource-type\" CONTENT=\"document\">\n<META NAME=\"distribution\" CONTENT=\"global\">\n\n<META NAME=\"Generator\" CONTENT=\"LaTeX2HTML v2002-2-1\">\n<META HTTP-EQUIV=\"Content-Style-Type\" CONTENT=\"text/css\">\n\n<LINK REL=\"STYLESHEET\" HREF=\"HowToBuildFromSource.css\">\n\n<LINK REL=\"next\" HREF=\"HowToBuildFromSource-node4.html\">\n<LINK REL=\"previous\" HREF=\"HowToBuildFromSource-node2.html\">\n<LINK REL=\"up\" HREF=\"HowToBuildFromSource.html\">\n<LINK REL=\"next\" HREF=\"HowToBuildFromSource-node4.html\">\n</HEAD>\n\n<BODY >\n\n<DIV CLASS=\"navigation\"><!--Navigation Panel-->\n<A NAME=\"tex2html82\"\n  HREF=\"HowToBuildFromSource-node4.html\">\n<IMG WIDTH=\"37\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"next\" SRC=\"next.png\"></A> \n<A NAME=\"tex2html76\"\n  HREF=\"HowToBuildFromSource.html\">\n<IMG WIDTH=\"26\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"up\" SRC=\"up.png\"></A> \n<A NAME=\"tex2html70\"\n  HREF=\"HowToBuildFromSource-node2.html\">\n<IMG WIDTH=\"63\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"previous\" SRC=\"prev.png\"></A> \n<A NAME=\"tex2html78\"\n  HREF=\"HowToBuildFromSource-node1.html\">\n<IMG WIDTH=\"65\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"contents\" SRC=\"contents.png\"></A> \n<A NAME=\"tex2html80\"\n  HREF=\"HowToBuildFromSource-node6.html\">\n<IMG WIDTH=\"43\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"index\" SRC=\"index.png\"></A> \n<BR>\n<B> Next:</B> <A NAME=\"tex2html83\"\n  HREF=\"HowToBuildFromSource-node4.html\">2 Generating your own</A>\n<B> Up:</B> <A NAME=\"tex2html77\"\n  HREF=\"HowToBuildFromSource.html\">Building Unix Squeak (</A>\n<B> Previous:</B> <A NAME=\"tex2html71\"\n  HREF=\"HowToBuildFromSource-node2.html\">0 The easy way</A>\n &nbsp; <B>  <A NAME=\"tex2html79\"\n  HREF=\"HowToBuildFromSource-node1.html\">Contents</A></B> \n &nbsp; <B>  <A NAME=\"tex2html81\"\n  HREF=\"HowToBuildFromSource-node6.html\">Index</A></B> \n<BR>\n<BR></DIV>\n<!--End of Navigation Panel-->\n\n<H1><A NAME=\"SECTION00030000000000000000\">\n<SPAN CLASS=\"arabic\">1</SPAN> The hard way: configure, build, install</A>\n</H1>\n\n<P>\nUnix Squeak is built using the (almost) universal ``<TT>configure;\nmake; make install</TT>''.  If you haven't come across this before, read on...\n\n<P>\nCreate a build<A NAME=\"75\"></A>\ndirectory (which we will call `<TT>blddir</TT>' from now on)\nand then `<TT>cd</TT>' to it:\n<SPAN ID=\"hue554\">\n\n<DIV CLASS=\"alltt\" ALIGN=\"LEFT\">\n<TT>\n \n<FONT COLOR=\"#0000ff\">\n<BR>&nbsp;&nbsp;$ mkdir blddir\n<BR>&nbsp;&nbsp;$ cd blddir\n<BR></FONT></TT>\n</DIV>\n</SPAN>\n<P>\nA convenient place is just next to the <TT>platforms</TT> directory,\nlike this:\n<SPAN ID=\"hue556\">\n\n<DIV CLASS=\"alltt\" ALIGN=\"LEFT\">\n<TT>\n \n<FONT COLOR=\"#0000ff\">\n<BR>&nbsp;&nbsp;$ cd squeak\n<BR>&nbsp;&nbsp;$ ls\n<BR>&nbsp;&nbsp;platforms src ...\n<BR>&nbsp;&nbsp;$ mkdir bld\n<BR>&nbsp;&nbsp;$ cd bld\n<BR></FONT></TT>\n</DIV>\n</SPAN>\n<P>\nCreate the build<A NAME=\"87\"></A>\nenvironment by running the script <TT>configure</TT> which\nlives in the <TT>platforms/unix/config</TT> directory.\n\n<P>\n<BLOCKQUOTE>\n<FONT COLOR=\"#ff0000\"> Note: The <TT>configure</TT> script accepts lots of options.  To see a list of\nthem, run: `<code>configure --help</code>'\n</FONT></BLOCKQUOTE>\n<P>\nAssuming you've created the <TT>blddir</TT> next to <TT>platforms</TT>,\nthis would be:\n<SPAN ID=\"hue558\">\n\n<DIV CLASS=\"alltt\" ALIGN=\"LEFT\">\n<TT>\n \n<FONT COLOR=\"#0000ff\">\n<BR>&nbsp;&nbsp;$ ../platforms/unix/config/configure\n<BR></FONT></TT>\n</DIV>\n</SPAN>\n<P>\n<BLOCKQUOTE>\n<FONT COLOR=\"#ff0000\"> Note: This assumes that the VMMaker sources are in `<TT>../src</TT>'.  However,\nsince the Unix Squeak support code is independent of the image version\nfrom which VMMaker generated the interpreter/plugin sources, it is\npossible that your source distribution comes with more than one\n<TT>src</TT> directory (corresponding to more than one image version used\nto generate the sources).  In such cases you will have to tell\n<TT>configure</TT> which source version to use, via the `-<TT>-with-src</TT>'\noption.  For example, if there\nare two source directories called <TT>src-3.2gamma-4857</TT> and\n<TT>src-3.3.alpha-4881</TT> then you would use <SPAN  CLASS=\"textit\">one</SPAN> of the\nfollowing commands:\n<SPAN ID=\"hue560\">\n\n<DIV CLASS=\"alltt\" ALIGN=\"LEFT\">\n<TT>\n \n<FONT COLOR=\"#ff0000\">\n<BR>&nbsp;&nbsp;$ .../configure --with-src=src-3.2gamma-4857\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN &nbsp;CLASS=\"textit\">or</SPAN>\n<BR>&nbsp;&nbsp;$ .../configure --with-src=src-3.3alpha-4881\n<BR></FONT></TT>\n</DIV>\n</SPAN>\n</FONT></BLOCKQUOTE>\n<P>\nBuild the VM and plugins by running <TT>make</TT>:\n<SPAN ID=\"hue562\">\n\n<DIV CLASS=\"alltt\" ALIGN=\"LEFT\">\n<TT>\n \n<FONT COLOR=\"#0000ff\">\n<BR>&nbsp;&nbsp;$ make\n<BR></FONT></TT>\n</DIV>\n</SPAN>\n<P>\n<BLOCKQUOTE>\n<FONT COLOR=\"#ff0000\"> Note: If you want to build just the VM (without external plugins) or just\nthe external plugins (without the VM) then you can use:\n`<code>make squeak</code>' or `<code>make plugins</code>' respectively.\n</FONT></BLOCKQUOTE>\n<P>\nFinally install the VM, plugins and manual pages:\n<SPAN ID=\"hue564\">\n\n<DIV CLASS=\"alltt\" ALIGN=\"LEFT\">\n<TT>\n \n<FONT COLOR=\"#0000ff\">\n<BR>&nbsp;&nbsp;$ su root\n<BR>&nbsp;&nbsp;$ make install\n<BR></FONT></TT>\n</DIV>\n</SPAN>\n<P>\n\n<DIV CLASS=\"navigation\"><HR>\n<!--Navigation Panel-->\n<A NAME=\"tex2html82\"\n  HREF=\"HowToBuildFromSource-node4.html\">\n<IMG WIDTH=\"37\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"next\" SRC=\"next.png\"></A> \n<A NAME=\"tex2html76\"\n  HREF=\"HowToBuildFromSource.html\">\n<IMG WIDTH=\"26\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"up\" SRC=\"up.png\"></A> \n<A NAME=\"tex2html70\"\n  HREF=\"HowToBuildFromSource-node2.html\">\n<IMG WIDTH=\"63\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"previous\" SRC=\"prev.png\"></A> \n<A NAME=\"tex2html78\"\n  HREF=\"HowToBuildFromSource-node1.html\">\n<IMG WIDTH=\"65\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"contents\" SRC=\"contents.png\"></A> \n<A NAME=\"tex2html80\"\n  HREF=\"HowToBuildFromSource-node6.html\">\n<IMG WIDTH=\"43\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"index\" SRC=\"index.png\"></A> \n<BR>\n<B> Next:</B> <A NAME=\"tex2html83\"\n  HREF=\"HowToBuildFromSource-node4.html\">2 Generating your own</A>\n<B> Up:</B> <A NAME=\"tex2html77\"\n  HREF=\"HowToBuildFromSource.html\">Building Unix Squeak (</A>\n<B> Previous:</B> <A NAME=\"tex2html71\"\n  HREF=\"HowToBuildFromSource-node2.html\">0 The easy way</A>\n &nbsp; <B>  <A NAME=\"tex2html79\"\n  HREF=\"HowToBuildFromSource-node1.html\">Contents</A></B> \n &nbsp; <B>  <A NAME=\"tex2html81\"\n  HREF=\"HowToBuildFromSource-node6.html\">Index</A></B> </DIV>\n<!--End of Navigation Panel-->\n<ADDRESS>\n\n2005-03-17\n</ADDRESS>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/HowToBuildFromSource.html/HowToBuildFromSource-node4.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n\n<!--Converted with LaTeX2HTML 2002-2-1 (1.70)\noriginal version by:  Nikos Drakos, CBLU, University of Leeds\n* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan\n* with significant contributions from:\n  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->\n<HTML>\n<HEAD>\n<TITLE>2 Generating your own VM and plugin sources</TITLE>\n<META NAME=\"description\" CONTENT=\"2 Generating your own VM and plugin sources\">\n<META NAME=\"keywords\" CONTENT=\"HowToBuildFromSource\">\n<META NAME=\"resource-type\" CONTENT=\"document\">\n<META NAME=\"distribution\" CONTENT=\"global\">\n\n<META NAME=\"Generator\" CONTENT=\"LaTeX2HTML v2002-2-1\">\n<META HTTP-EQUIV=\"Content-Style-Type\" CONTENT=\"text/css\">\n\n<LINK REL=\"STYLESHEET\" HREF=\"HowToBuildFromSource.css\">\n\n<LINK REL=\"next\" HREF=\"HowToBuildFromSource-node5.html\">\n<LINK REL=\"previous\" HREF=\"HowToBuildFromSource-node3.html\">\n<LINK REL=\"up\" HREF=\"HowToBuildFromSource.html\">\n<LINK REL=\"next\" HREF=\"HowToBuildFromSource-node5.html\">\n</HEAD>\n\n<BODY >\n\n<DIV CLASS=\"navigation\"><!--Navigation Panel-->\n<A NAME=\"tex2html96\"\n  HREF=\"HowToBuildFromSource-node5.html\">\n<IMG WIDTH=\"37\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"next\" SRC=\"next.png\"></A> \n<A NAME=\"tex2html90\"\n  HREF=\"HowToBuildFromSource.html\">\n<IMG WIDTH=\"26\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"up\" SRC=\"up.png\"></A> \n<A NAME=\"tex2html84\"\n  HREF=\"HowToBuildFromSource-node3.html\">\n<IMG WIDTH=\"63\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"previous\" SRC=\"prev.png\"></A> \n<A NAME=\"tex2html92\"\n  HREF=\"HowToBuildFromSource-node1.html\">\n<IMG WIDTH=\"65\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"contents\" SRC=\"contents.png\"></A> \n<A NAME=\"tex2html94\"\n  HREF=\"HowToBuildFromSource-node6.html\">\n<IMG WIDTH=\"43\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"index\" SRC=\"index.png\"></A> \n<BR>\n<B> Next:</B> <A NAME=\"tex2html97\"\n  HREF=\"HowToBuildFromSource-node5.html\">3 Adding your own</A>\n<B> Up:</B> <A NAME=\"tex2html91\"\n  HREF=\"HowToBuildFromSource.html\">Building Unix Squeak (</A>\n<B> Previous:</B> <A NAME=\"tex2html85\"\n  HREF=\"HowToBuildFromSource-node3.html\">1 The hard way:</A>\n &nbsp; <B>  <A NAME=\"tex2html93\"\n  HREF=\"HowToBuildFromSource-node1.html\">Contents</A></B> \n &nbsp; <B>  <A NAME=\"tex2html95\"\n  HREF=\"HowToBuildFromSource-node6.html\">Index</A></B> \n<BR>\n<BR></DIV>\n<!--End of Navigation Panel-->\n<!--Table of Child-Links-->\n<A NAME=\"CHILD_LINKS\"><STRONG>Subsections</STRONG></A>\n\n<UL CLASS=\"ChildLinks\">\n<LI><A NAME=\"tex2html98\"\n  HREF=\"HowToBuildFromSource-node4.html#SECTION00041000000000000000\"><SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN> How <TT>configure</TT> finds the <TT>src</TT> directory</A>\n</UL>\n<!--End of Table of Child-Links-->\n<HR>\n\n<H1><A NAME=\"SECTION00040000000000000000\">\n<SPAN CLASS=\"arabic\">2</SPAN> Generating your own VM and plugin sources</A>\n</H1>\n\n<P>\nGenerating your own VM/plugin sources might be necessary for various reasons:\n\n<UL>\n<LI>you want to change the mix of internal vs. external plugins\n</LI>\n<LI>you want to remove some plugins from the VM that you will never use\n</LI>\n<LI>you've pulled in some updates that modify the Interpreter or plugins\n</LI>\n<LI>you've filed-in (or written) a whole new plugin\n</LI>\n<LI>etc...\n</LI>\n</UL>\n\n<P>\nVersion 3.2 (and later) of Unix Squeak use\n<A NAME=\"tex2html2\"\n  HREF=\"http://minnow.cc.gatech.edu/squeak/2105\">VMMaker</A><A NAME=\"132\"></A>\nto generate the core interpreter and plugin sources.\n\n<P>\nStart Squeak in the top-level directory (the one containing the\n<TT>platforms</TT> directory); for example:\n<SPAN ID=\"hue566\">\n\n<DIV CLASS=\"alltt\" ALIGN=\"LEFT\">\n<TT>\n \n<FONT COLOR=\"#0000ff\">\n<BR>&nbsp;&nbsp;$ ls\n<BR>&nbsp;&nbsp;src platforms ...\n<BR>&nbsp;&nbsp;$ squeak MyCoolPlugin.image\n<BR></FONT></TT>\n</DIV>\n</SPAN>\n<P>\nOpen a VMMakerTool and modify the setup to your liking.\n\n<P>\n<BLOCKQUOTE>\n<FONT COLOR=\"#ff0000\"> Note: The VMMaker configuration used to build the distributions of Unix\nSqueak is available in\n<TT>platforms/unix/config/VMMaker.config</TT>.<A NAME=\"140\"></A>\n</FONT></BLOCKQUOTE>\n<P>\nThen click on the relevant ``<SPAN  CLASS=\"textsf\">generate ...</SPAN>'' button.  You can now\n`<TT>configure; make; make install</TT>' in your <TT>blddir</TT> (as\ndescribed above).\n\n<P>\n<BLOCKQUOTE>\n<FONT COLOR=\"#ff0000\"> Note: You only need to run\n<TT>configure</TT><A NAME=\"567\"></A>\n<SPAN  CLASS=\"textbf\"><SPAN ID=\"txt149\">once</SPAN></SPAN> for a given\n<TT>blddir</TT> (on the same host).\nIf you modify the choice of plugins\n(or change whether they're internal/external)\nthen you can update the build environment by running the\n<TT>config.status</TT><A NAME=\"569\"></A>\nscript in the <TT>bldddir</TT>, like this:\n<SPAN ID=\"hue570\">\n\n<DIV CLASS=\"alltt\" ALIGN=\"LEFT\">\n<TT>\n &nbsp;&nbsp;$ squeak MyCoolPlugin.image\n<BR>&nbsp;&nbsp;... generate new sources ...\n<BR>&nbsp;&nbsp;$ cd blddir\n<BR>&nbsp;&nbsp;$ ./config.status\n<BR>&nbsp;&nbsp;$ make\n<BR></TT>\n</DIV>\n</SPAN>This is <SPAN  CLASS=\"textit\">much</SPAN> faster than running <TT>configure</TT> all over again.\n(In fact, <TT>make</TT> should detect any changes to the plugin configuration\nand re-run <TT>config.status</TT> for you automatically.)\n</FONT></BLOCKQUOTE>\n<P>\n<BLOCKQUOTE>\n<FONT COLOR=\"#ff0000\"> Note: `<TT>configure</TT>' doesn't actually create any files.  The last thing it\ndoes is run `<TT>config.status</TT>' to create the configured <SPAN  CLASS=\"textit\">file</SPAN>s\nin <TT>blddir</TT> from the corresponding <SPAN  CLASS=\"textit\">file.in</SPAN>s in the\n<TT>unix/config</TT> directory.  So in the remainder of this document the\nphrase `during configuration' means <SPAN  CLASS=\"textit\">either</SPAN> when running\n`<TT>configure</TT>' for the first time <SPAN  CLASS=\"textit\">or</SPAN> running\n`<TT>config.status</TT>' to update an already <TT>configure</TT>d build\nenvironment.\n</FONT></BLOCKQUOTE>\n<P>\n\n<H2><A NAME=\"SECTION00041000000000000000\">\n<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN> How <TT>configure</TT> finds the <TT>src</TT> directory</A>\n</H2>\n\n<P>\nStarting with version 3.7 <TT>configure</TT> looks in two places for the\n<TT>src</TT> directory, in the following order, and uses the first one\nthat it finds:\n\n<P>\n\n<UL>\n<LI>the top-level directory (the one containing the <TT>platforms</TT>\ndirectory);\n</LI>\n<LI>the <TT>platforms/unix</TT> directory.\n</LI>\n</UL>\n\n<P>\nIn other words, if you want to use your own generated\nsources without deleting the built-in generated sources, generating\nthem into a <TT>src</TT> directory next to <TT>platforms</TT> (and then\nre-running <TT>configure</TT>) will do what you want.\n\n<P>\n\n<DIV CLASS=\"navigation\"><HR>\n<!--Navigation Panel-->\n<A NAME=\"tex2html96\"\n  HREF=\"HowToBuildFromSource-node5.html\">\n<IMG WIDTH=\"37\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"next\" SRC=\"next.png\"></A> \n<A NAME=\"tex2html90\"\n  HREF=\"HowToBuildFromSource.html\">\n<IMG WIDTH=\"26\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"up\" SRC=\"up.png\"></A> \n<A NAME=\"tex2html84\"\n  HREF=\"HowToBuildFromSource-node3.html\">\n<IMG WIDTH=\"63\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"previous\" SRC=\"prev.png\"></A> \n<A NAME=\"tex2html92\"\n  HREF=\"HowToBuildFromSource-node1.html\">\n<IMG WIDTH=\"65\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"contents\" SRC=\"contents.png\"></A> \n<A NAME=\"tex2html94\"\n  HREF=\"HowToBuildFromSource-node6.html\">\n<IMG WIDTH=\"43\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"index\" SRC=\"index.png\"></A> \n<BR>\n<B> Next:</B> <A NAME=\"tex2html97\"\n  HREF=\"HowToBuildFromSource-node5.html\">3 Adding your own</A>\n<B> Up:</B> <A NAME=\"tex2html91\"\n  HREF=\"HowToBuildFromSource.html\">Building Unix Squeak (</A>\n<B> Previous:</B> <A NAME=\"tex2html85\"\n  HREF=\"HowToBuildFromSource-node3.html\">1 The hard way:</A>\n &nbsp; <B>  <A NAME=\"tex2html93\"\n  HREF=\"HowToBuildFromSource-node1.html\">Contents</A></B> \n &nbsp; <B>  <A NAME=\"tex2html95\"\n  HREF=\"HowToBuildFromSource-node6.html\">Index</A></B> </DIV>\n<!--End of Navigation Panel-->\n<ADDRESS>\n\n2005-03-17\n</ADDRESS>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/HowToBuildFromSource.html/HowToBuildFromSource-node5.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n\n<!--Converted with LaTeX2HTML 2002-2-1 (1.70)\noriginal version by:  Nikos Drakos, CBLU, University of Leeds\n* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan\n* with significant contributions from:\n  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->\n<HTML>\n<HEAD>\n<TITLE>3 Adding your own plugins</TITLE>\n<META NAME=\"description\" CONTENT=\"3 Adding your own plugins\">\n<META NAME=\"keywords\" CONTENT=\"HowToBuildFromSource\">\n<META NAME=\"resource-type\" CONTENT=\"document\">\n<META NAME=\"distribution\" CONTENT=\"global\">\n\n<META NAME=\"Generator\" CONTENT=\"LaTeX2HTML v2002-2-1\">\n<META HTTP-EQUIV=\"Content-Style-Type\" CONTENT=\"text/css\">\n\n<LINK REL=\"STYLESHEET\" HREF=\"HowToBuildFromSource.css\">\n\n<LINK REL=\"next\" HREF=\"HowToBuildFromSource-node6.html\">\n<LINK REL=\"previous\" HREF=\"HowToBuildFromSource-node4.html\">\n<LINK REL=\"up\" HREF=\"HowToBuildFromSource.html\">\n<LINK REL=\"next\" HREF=\"HowToBuildFromSource-node6.html\">\n</HEAD>\n\n<BODY >\n\n<DIV CLASS=\"navigation\"><!--Navigation Panel-->\n<A NAME=\"tex2html111\"\n  HREF=\"HowToBuildFromSource-node6.html\">\n<IMG WIDTH=\"37\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"next\" SRC=\"next.png\"></A> \n<A NAME=\"tex2html105\"\n  HREF=\"HowToBuildFromSource.html\">\n<IMG WIDTH=\"26\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"up\" SRC=\"up.png\"></A> \n<A NAME=\"tex2html99\"\n  HREF=\"HowToBuildFromSource-node4.html\">\n<IMG WIDTH=\"63\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"previous\" SRC=\"prev.png\"></A> \n<A NAME=\"tex2html107\"\n  HREF=\"HowToBuildFromSource-node1.html\">\n<IMG WIDTH=\"65\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"contents\" SRC=\"contents.png\"></A> \n<A NAME=\"tex2html109\"\n  HREF=\"HowToBuildFromSource-node6.html\">\n<IMG WIDTH=\"43\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"index\" SRC=\"index.png\"></A> \n<BR>\n<B> Next:</B> <A NAME=\"tex2html112\"\n  HREF=\"HowToBuildFromSource-node6.html\">Index</A>\n<B> Up:</B> <A NAME=\"tex2html106\"\n  HREF=\"HowToBuildFromSource.html\">Building Unix Squeak (</A>\n<B> Previous:</B> <A NAME=\"tex2html100\"\n  HREF=\"HowToBuildFromSource-node4.html\">2 Generating your own</A>\n &nbsp; <B>  <A NAME=\"tex2html108\"\n  HREF=\"HowToBuildFromSource-node1.html\">Contents</A></B> \n &nbsp; <B>  <A NAME=\"tex2html110\"\n  HREF=\"HowToBuildFromSource-node6.html\">Index</A></B> \n<BR>\n<BR></DIV>\n<!--End of Navigation Panel-->\n<!--Table of Child-Links-->\n<A NAME=\"CHILD_LINKS\"><STRONG>Subsections</STRONG></A>\n\n<UL CLASS=\"ChildLinks\">\n<LI><A NAME=\"tex2html113\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00051000000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN> Plugin-specific configuration</A>\n<UL>\n<LI><A NAME=\"tex2html114\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00051100000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN> <TT>AC_PLUGIN_CHECK_LIB(<SPAN  CLASS=\"textit\">lib</SPAN>,<SPAN  CLASS=\"textit\">func</SPAN>)</TT></A>\n<LI><A NAME=\"tex2html115\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00051200000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN> <TT>AC_PLUGIN_DEFINE_UNQUOTED(<SPAN  CLASS=\"textit\">keyword</SPAN>,<SPAN  CLASS=\"textit\">text</SPAN>)</TT></A>\n<LI><A NAME=\"tex2html116\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00051300000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN>.<SPAN CLASS=\"arabic\">3</SPAN> Plugin-specific variables</A>\n</UL>\n<BR>\n<LI><A NAME=\"tex2html117\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00052000000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN> Plugin-specific <TT>Makefile</TT> declarations and rules</A>\n<UL>\n<LI><A NAME=\"tex2html118\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00052100000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN> The anatomy of a plugin's <TT>Makefile</TT></A>\n<LI><A NAME=\"tex2html119\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00052200000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN> A note about <TT>$(COMPILE)</TT> and <TT>$(LINK)</TT> commands</A>\n<LI><A NAME=\"tex2html120\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00052300000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">3</SPAN> Specifying additional source directories</A>\n<LI><A NAME=\"tex2html121\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00052400000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">4</SPAN> Including additional material in the default <TT>Makefile</TT></A>\n<LI><A NAME=\"tex2html122\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00052500000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">5</SPAN> Replacing the default <TT>Makefile</TT> entirely</A>\n</UL>\n<BR>\n<LI><A NAME=\"tex2html123\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00053000000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">3</SPAN> Examples taken from existing plugins</A>\n<UL>\n<LI><A NAME=\"tex2html124\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00053100000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN> Configuration</A>\n<LI><A NAME=\"tex2html125\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00053200000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN> Customising the <TT>Makefile</TT></A>\n</UL>\n<BR>\n<LI><A NAME=\"tex2html126\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00054000000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">4</SPAN> Coping with VMMaker quirks</A>\n<LI><A NAME=\"tex2html127\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00055000000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">5</SPAN> If all else fails</A>\n</UL>\n<!--End of Table of Child-Links-->\n<HR>\n\n<H1><A NAME=\"SECTION00050000000000000000\">\n<SPAN CLASS=\"arabic\">3</SPAN> Adding your own plugins</A>\n</H1>\n\n<P>\n<BLOCKQUOTE>\n<FONT COLOR=\"#ff0000\"> Note: This section is intended primarily for plugin developers.\n</FONT></BLOCKQUOTE>\n<P>\nIf your plugin<A NAME=\"189\"></A>\n requires no platform-specific tweaks then there's\nnothing for you to do.  <TT>configure</TT> (and <TT>config.status</TT>)\nwill provide a default <TT>Makefile</TT> for it that should work.  If your\nplugin requires only platform-independent tweaks (and/or additional\nhand-written code) then these go in <TT>platforms/Cross/plugins</TT>, and\nthere's nothing for you to do (in Unixland).\n\n<P>\nOn the other hand, if you require special <TT>configure</TT> tests or\nadditional declarations/rules in your plugin's <TT>Makefile</TT> then you\nneed to specify them explicitly.\n\n<P>\n<BLOCKQUOTE>\n<FONT COLOR=\"#ff0000\"> Note: Unix Squeak subscribes to the following philopsophy:\n</FONT></BLOCKQUOTE>\n<P>\n<BLOCKQUOTE><FONT COLOR=\"#ff0000\"><SPAN  CLASS=\"textit\">Absolutely everything that is specific<A NAME=\"197\"></A>\n to Unix (sources,\nheaders, <TT>configure</TT> and <TT>Makefile</TT> extensions, etc.) lives\nunder <TT>platforms/unix</TT>.</SPAN>\n</FONT></BLOCKQUOTE>\n<P>\n<BLOCKQUOTE><FONT COLOR=\"#ff0000\">In other words: there is not (nor aught there be) <SPAN  CLASS=\"textit\">any</SPAN>\nUnix-related information under the <TT>platforms/Cross</TT>\ndirectory.  (Unix Squeak is entirely encapsulated\nunder <TT>platforms/unix</TT> and is utterly immune to\n``random junk'' elsewhere in the <TT>platforms</TT> tree.)\n</FONT></BLOCKQUOTE>\n<P>\nFirst you must create a new directory<A NAME=\"206\"></A>\nunder <TT>platforms/unix/plugins</TT> named after your plugin.  This directory\nwill hold the files describing the additional configuration checks\nand/or <TT>Makefile</TT> contents.  For example, if your plugin is\ncalled ``MyCoolPlugin'' then\n<SPAN ID=\"hue574\">\n\n<DIV CLASS=\"alltt\" ALIGN=\"LEFT\">\n<TT>\n \n<FONT COLOR=\"#0000ff\">\n<BR>&nbsp;&nbsp;$ mkdir platforms/unix/plugins/MyCoolPlugin\n<BR></FONT></TT>\n</DIV>\n</SPAN>\n<P>\nwould be the thing to do.  (The following sections will refer to this\ndirectory as <TT>platdep</TT> since the full path is quite a mouthful of\ntyping for my lazy fingers.)\n\n<P>\n\n<H2><A NAME=\"SECTION00051000000000000000\">\n<SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN> Plugin-specific configuration</A>\n</H2>\n\n<P>\nYour plugin can ask <TT>configure</TT><A NAME=\"216\"></A>\nto run additional tests (and to\nset additional variables in its output files) simply by including a\nfile called <TT>acinclude.m4</TT><A NAME=\"575\"></A>\nin it's <TT>platdep</TT> directory.\n\n<P>\n<BLOCKQUOTE>\n<FONT COLOR=\"#ff0000\"> Note: The <TT>configure</TT><A NAME=\"576\"></A>\nscript is `compiled' from several other files.  If\nyou create a `<TT>platdep./acinclude.m4</TT>' file then you <SPAN  CLASS=\"textit\">must</SPAN>\n`recompile'<A NAME=\"577\"></A>\n<TT>configure</TT>.  You can do this by `<TT>cd</TT>'ing to\n<TT>unix/config</TT> and running `<TT>make</TT>', or (if you have GNU\n<TT>make</TT>) from the <TT>blddir</TT> like this:\n<SPAN ID=\"hue579\">\n\n<DIV CLASS=\"alltt\" ALIGN=\"LEFT\">\n<TT>\n \n<FONT COLOR=\"#ff0000\">\n<BR>&nbsp;&nbsp;$ make -C ../platforms/unix/config\n<BR></FONT></TT>\n</DIV>\n</SPAN>\n</FONT></BLOCKQUOTE>\n<P>\nIn addition to the usual <TT>autoconf</TT> macros, the following\nmacros<A NAME=\"580\"></A>\nare available specifically for Squeak plugins to use:\n\n<P>\n\n<H3><A NAME=\"SECTION00051100000000000000\">\n<SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN> <TT>AC_PLUGIN_CHECK_LIB(<SPAN  CLASS=\"textit\">lib</SPAN>,<SPAN  CLASS=\"textit\">func</SPAN>)</TT></A>\n</H3>\n<A NAME=\"582\"></A>\n\n<P>\nThis is similar to the <TT>autoconf</TT> `<TT>AC_CHECK_LIB</TT>' macro.\n\n<P>\n<SPAN  CLASS=\"textit\">func</SPAN> is the name of a function required by the plugin, defined\nin the external (system) library <SPAN  CLASS=\"textit\">lib</SPAN>.  The macro checks that\nthe library is available (via `<TT>-l<SPAN  CLASS=\"textit\">lib</SPAN></TT>') and then adds it\nto the list of libraries required by the plugin (see the explanation\nof <TT>[plibs]</TT> in Section&nbsp;<A HREF=\"#sec:plibs\">3.2.1</A> for a description of\nhow library dependencies for plugins are handled).\n\n<P>\nIf <SPAN  CLASS=\"textit\">func</SPAN> cannot be found in <SPAN  CLASS=\"textit\">lib</SPAN> then the plugin will be\ndisabled and a message to that effect printed during configuration.\n(The VM can still be built, <SPAN  CLASS=\"textit\">without</SPAN> rerunning VMMaker or\nreconfiguring, and the plugin will simply be ommitted from it.)\n\n<P>\n\n<H3><A NAME=\"SECTION00051200000000000000\">\n<SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN> <TT>AC_PLUGIN_DEFINE_UNQUOTED(<SPAN  CLASS=\"textit\">keyword</SPAN>,<SPAN  CLASS=\"textit\">text</SPAN>)</TT></A>\n</H3>\n\n<P>\nThis<A NAME=\"585\"></A>\nis similar to the <TT>autoconf</TT> `<TT>AC_DEFINE_UNQUOTED</TT>' macro.\n\n<P>\n<SPAN  CLASS=\"textit\">keyword</SPAN> is a <TT>Makefile</TT> keyword (usually of the form\n`[<SPAN  CLASS=\"textit\">name</SPAN>]') and <SPAN  CLASS=\"textit\">text</SPAN> is arbitrary text to be\nassociated with it.  Calling this macro causes <TT>mkmf</TT> to\nsubstitute <SPAN  CLASS=\"textit\">text</SPAN> for all occurrences of <SPAN  CLASS=\"textit\">keyword</SPAN> in the\n<TT>Makefile</TT> generated for the plugin.\n\n<P>\n\n<H3><A NAME=\"SECTION00051300000000000000\">\n<SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN>.<SPAN CLASS=\"arabic\">3</SPAN> Plugin-specific variables</A>\n</H3>\n\n<P>\nThe following variables are also set during the execution of a\nplugin-specific <TT>acinclude.m4</TT>:\n\n<P>\n<DL COMPACT>\n<DT></DT>\n<DD><TT>${plugin}</TT> is the name of the plugin;\n</DD>\n<DT></DT>\n<DD><TT>${topdir}</TT> is the path to the top-level directory (containing\n  <TT>platforms</TT>);\n</DD>\n<DT></DT>\n<DD><TT>${vmmdir}</TT> is the path to the VMMaker `<TT>src</TT>' directory.\n</DD>\n</DL>\n\n<P>\n\n<H2><A NAME=\"SECTION00052000000000000000\">\n<SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN> Plugin-specific <TT>Makefile</TT> declarations and rules</A>\n</H2>\n\n<P>\nThree<A NAME=\"587\"></A>\nmechanisms are avilable for this:\n\n<OL>\n<LI>scanning additional dirrectories for sources and headers;\n</LI>\n<LI>including a few additional lines into the default <TT>Makefile</TT>;\n  and \n</LI>\n<LI>replacing entirely the default <TT>Makefile</TT> with a\n  hand-written one.\n</LI>\n</OL>\n(The last option isn't as scary as it might sound: read on...)\n\n<P>\n\n<H3><A NAME=\"SECTION00052100000000000000\">\n<SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN> The anatomy of a plugin's <TT>Makefile</TT></A>\n</H3>\n\n<P>\nBefore proceeding, let's take a minute to understand how Unix Squeak\ncompiles and links files in its default <TT>Makefile</TT> for plugins.\nThe default\n<TT>Makefile</TT><A NAME=\"589\"></A><A NAME=\"590\"></A>\nlooks like this:\n\n<P>\n<BLOCKQUOTE>\n<BLOCKQUOTE>\n<SPAN ID=\"hue593\">\n\n<DIV CLASS=\"alltt\" ALIGN=\"LEFT\">\n<TT>\n # default Makefile for Unix Squeak plugins\n<BR>\n<BR>[make_cfg]\n<BR>[make_plg]\n<BR>\n<BR>\nXINCLUDES &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= [includes]\n<BR>\nOBJS &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= [targets]\n<BR>\nTARGET &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= [target]\n<BR>\nPLIBS &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= [plibs]\n<BR>\n<BR>[make_inc]\n<BR>\n<BR>$(TARGET) : $(OBJS) Makefile\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$(LINK) $(TARGET) $(OBJS) $(PLIBS)\n<BR>\n<BR>[make_targets]\n<BR>\n<BR>.force :\n<BR></TT>\n</DIV>\n</SPAN>\n</BLOCKQUOTE>\n</BLOCKQUOTE>\n\n<P>\n<BLOCKQUOTE>\n<FONT COLOR=\"#ff0000\"> Note: The keywords<A NAME=\"594\"></A>\nappearing between `<TT>[</TT> square brackets <TT>]</TT>'\nare substituted during configuration by a preprocessor called\n`<TT>mkmf</TT>'<A NAME=\"595\"></A>\naccording to the kind of plugin (internal/external) being built.\n</FONT></BLOCKQUOTE>\n<P>\n<TT><SPAN  CLASS=\"textbf\">[make_cfg]</SPAN></TT><A NAME=\"597\"></A>\n<A NAME=\"598\"></A>\nis the configured variable section.  It\ncontains the platform-specific information gleaned by <TT>configure</TT>\nwhile it was figuring out which compiler you have, what flags your\nlinker needs, where to install stuff, and so on.\n\n<P>\n<TT><SPAN  CLASS=\"textbf\">[make_plg]</SPAN></TT><A NAME=\"600\"></A>\n<A NAME=\"601\"></A>\ncontains a handful of definitions which\ndepend on whether the plugin is being compiled as internal or\nexternal:\n<BLOCKQUOTE>\n<TABLE CELLPADDING=3>\n<TR><TD ALIGN=\"LEFT\"><TT></TD><TD ALIGN=\"LEFT\">o       </TT></TD>\n<TD ALIGN=\"LEFT\">&nbsp;&nbsp;&nbsp;</TD><TD ALIGN=\"LEFT\">the extension for object files</TD>\n</TR>\n<TR><TD ALIGN=\"LEFT\"><TT></TD><TD ALIGN=\"LEFT\">a       </TT></TD>\n<TD ALIGN=\"LEFT\">&nbsp;&nbsp;&nbsp;</TD><TD ALIGN=\"LEFT\">the extension for plugins</TD>\n</TR>\n<TR><TD ALIGN=\"LEFT\"><TT></TD><TD ALIGN=\"LEFT\">COMPILE </TT></TD>\n<TD ALIGN=\"LEFT\">&nbsp;&nbsp;&nbsp;</TD><TD ALIGN=\"LEFT\">the command to compile a source file into an object file</TD>\n</TR>\n<TR><TD ALIGN=\"LEFT\"><TT></TD><TD ALIGN=\"LEFT\">LINK    </TT></TD>\n<TD ALIGN=\"LEFT\">&nbsp;&nbsp;&nbsp;</TD><TD ALIGN=\"LEFT\">the command to link one or more object files into a plugin</TD>\n</TR>\n</TABLE>\n</BLOCKQUOTE>\n\n<P>\nFor internal plugins: <TT>$o</TT> is `<TT>.o</TT>' and <TT>$a</TT> is\n`<TT>.a</TT>'.  <TT>$(COMPILE)</TT> is the C compiler\n(`<TT>$(CC)&nbsp;...&nbsp;-o</TT>', so the first thing after the command\n<SPAN  CLASS=\"textit\">must</SPAN> be the output filename) and <TT>$(LINK)</TT> is archiver\n(`<TT>ar -rc</TT>', again requiring the output file to follow\nimmediately).  Note that internal plugins are built as `<TT>ar</TT>'\narchives before being linked into the final binary.\n\n<P>\nFor external plugins: <TT>$o</TT> is `<TT>.lo</TT>', <TT>$a</TT> is\n`<TT>.la</TT>', and <TT>$(COMPILE)</TT> and <TT>$(LINK)</TT> are\ninvocations of `<TT>libtool</TT>' to create position-independent objects and\nshared libraries (with a `<TT>-o</TT>' appearing right at the end, so the\nfirst thing after the command <SPAN  CLASS=\"textit\">must</SPAN> be the output filename).\n\n<P>\n<TT><SPAN  CLASS=\"textbf\">[includes]</SPAN></TT><A NAME=\"604\"></A>\n<A NAME=\"605\"></A>\nis a list of&nbsp;`<TT>-I<SPAN  CLASS=\"textit\">dir</SPAN></TT>'\ncompiler flags, one for each of the\ndirectories<A NAME=\"607\"></A>\n<SPAN ID=\"hue608\">\n\n<DIV CLASS=\"alltt\" ALIGN=\"LEFT\">\n<TT>\n &nbsp;&nbsp;src/plugins/<SPAN &nbsp;CLASS=\"textit\">name</SPAN>\n<BR>&nbsp;&nbsp;src/vm/intplugins/<SPAN &nbsp;CLASS=\"textit\">name</SPAN>\n<BR>&nbsp;&nbsp;platforms/Cross/plugins/<SPAN &nbsp;CLASS=\"textit\">name</SPAN>\n<BR>&nbsp;&nbsp;platforms/unix/plugins/<SPAN &nbsp;CLASS=\"textit\">name</SPAN>\n<BR></TT>\n</DIV>\n</SPAN>in which at least one header file is present.\n\n<P>\n<TT><SPAN  CLASS=\"textbf\">[targets]</SPAN></TT><A NAME=\"610\"></A>\n<A NAME=\"611\"></A>\nis a list of object files\ncorresponding to the source (<TT>.c</TT>) files found in\nthe directories:<A NAME=\"612\"></A>\n<SPAN ID=\"hue613\">\n\n<DIV CLASS=\"alltt\" ALIGN=\"LEFT\">\n<TT>\n &nbsp;&nbsp;src/plugins/<SPAN &nbsp;CLASS=\"textit\">name</SPAN>/*.c\n<BR>&nbsp;&nbsp;src/vm/intplugins/<SPAN &nbsp;CLASS=\"textit\">name</SPAN>/*.c\n<BR>&nbsp;&nbsp;platforms/Cross/plugins/<SPAN &nbsp;CLASS=\"textit\">name</SPAN>/*.c\n<BR>&nbsp;&nbsp;platforms/unix/plugins/<SPAN &nbsp;CLASS=\"textit\">name</SPAN>/*.c\n<BR></TT>\n</DIV>\n</SPAN>where each source file has been stripped of the directory name and had the\n`<TT>.c</TT>' converted into `<TT>$o</TT>'.\n\n<P>\n<TT><SPAN  CLASS=\"textbf\">[target]</SPAN></TT><A NAME=\"615\"></A>\n<A NAME=\"616\"></A>\nis the name of the plugin, including the\n<TT>$a</TT> extension.\n\n<P>\n<TT><SPAN  CLASS=\"textbf\">[plibs]</SPAN></TT><A NAME=\"618\"></A>\n<A NAME=\"619\"></A>\n<A NAME=\"sec:plibs\"></A>is a list of zero or more libraries on which the plugin depends (as\ndetected using the macro <TT>AC_PLUGIN_CHECK_LIB</TT> in the\nplugin-specific <TT>acinclude.m4</TT>).  If the plugin\nis being built internally then this list is empty and the required libraries\nare included in the final link command.  If the plugin is being built\nexternally then the plugin itself (a shared object) is linked against\nthese libraries (via <TT>[plist]</TT>) rather than with the main VM binary.\n\n<P>\n(This is to ensure that a missing shared object needed by an external plugin\nwill only affect the operation of that plugin and not prevent the rest\nof the VM from running, which would be the case if the entire VM were\nlinked against it.)\n\n<P>\n<TT><SPAN  CLASS=\"textbf\">[make_inc]</SPAN></TT><A NAME=\"621\"></A>\n<A NAME=\"622\"></A>\nis the contents of the\n<TT>Makefile.inc</TT> file in your plugin's <TT>platdep</TT> directory (or\nempty if this file doesn't exist).\n\n<P>\n<TT><SPAN  CLASS=\"textbf\">[make_targets]</SPAN></TT><A NAME=\"624\"></A>\n<A NAME=\"625\"></A>\nis a list of rules<A NAME=\"626\"></A>\nfor building the files listed in <TT>[targets]</TT>.\nEach rule<A NAME=\"388\"></A>\nlooks like this:\n\n<P>\n\n<DIV CLASS=\"alltt\" ALIGN=\"LEFT\">\n<TT>\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name$o : <SPAN &nbsp;CLASS=\"textit\">original/source/dir/</SPAN>name.c\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$(COMPILE) name$o <SPAN &nbsp;CLASS=\"textit\">original/source/dir/</SPAN>name.c\n<BR></TT>\n</DIV>\n\n<P>\n\n<H3><A NAME=\"SECTION00052200000000000000\">\n<SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN> A note about <TT>$(COMPILE)</TT> and <TT>$(LINK)</TT> commands</A>\n</H3>\n\n<P>\nYou should <SPAN  CLASS=\"textit\">never</SPAN> pass additional flags to these\ncommands<A NAME=\"628\"></A><A NAME=\"629\"></A><A NAME=\"630\"></A>\nexplicitly.  This is because you cannot know how they are defined.\n(Their definitions depend on whether the plugin is being built\ninternally or externally&nbsp;-- and might even change radically in future\nreleases of Unix Squeak.)\n\n<P>\nInstead you should pass additional compiler/linker\nflags<A NAME=\"631\"></A>\nto these commands by setting the following variables in `<TT>Makefile.inc</TT>' or\n`<TT>Makefile.in</TT>':\n<BLOCKQUOTE>\n<A NAME=\"632\"></A>\n<A NAME=\"633\"></A>\n<A NAME=\"634\"></A>\n<A NAME=\"635\"></A>\n<TABLE CELLPADDING=3>\n<TR><TD ALIGN=\"LEFT\"><TT></TD><TD ALIGN=\"LEFT\">XCPPFLAGS\t</TT></TD>\n<TD ALIGN=\"LEFT\">&nbsp;&nbsp;&nbsp;</TD><TD ALIGN=\"LEFT\">`<TT>-I</TT>' flags for <TT>cpp</TT></TD>\n</TR>\n<TR><TD ALIGN=\"LEFT\"><TT></TD><TD ALIGN=\"LEFT\">XDEFS\t\t</TT></TD>\n<TD ALIGN=\"LEFT\">&nbsp;&nbsp;&nbsp;</TD><TD ALIGN=\"LEFT\">`<TT>-D</TT>' flags for <TT>cpp</TT></TD>\n</TR>\n<TR><TD ALIGN=\"LEFT\"><TT></TD><TD ALIGN=\"LEFT\">XCFLAGS\t\t</TT></TD>\n<TD ALIGN=\"LEFT\">&nbsp;&nbsp;&nbsp;</TD><TD ALIGN=\"LEFT\">anything to be passed to the compiler</TD>\n</TR>\n<TR><TD ALIGN=\"LEFT\"><TT></TD><TD ALIGN=\"LEFT\">XLDFLAGS\t</TT></TD>\n<TD ALIGN=\"LEFT\">&nbsp;&nbsp;&nbsp;</TD><TD ALIGN=\"LEFT\">anything to be passed to the linker</TD>\n</TR>\n</TABLE>\n</BLOCKQUOTE>\n<BLOCKQUOTE>\n<FONT COLOR=\"#ff0000\"> Note: `<TT>mkmf</TT>' already uses `<TT>XINCLUDES</TT>'<A NAME=\"637\"></A>\n<A NAME=\"638\"></A>\nto pass the list of\ndirectories containing plugin header files to <TT>cpp</TT>.  You can\nredefine it if you like, but make sure that `<TT>[includes]</TT>'\nappears in its definition (or in the definition of `<TT>XCPPFLAGS</TT>').\n</FONT></BLOCKQUOTE>\n<P>\n\n<H3><A NAME=\"SECTION00052300000000000000\">\n<SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">3</SPAN> Specifying additional source directories</A>\n</H3>\n\n<P>\n<TT>mkmf</TT><A NAME=\"639\"></A>\nlooks for a file in your plugin's\n<TT>platdep</TT> directory called\n`<TT>mkmf.subdirs</TT>'.<A NAME=\"640\"></A>\nIf this file exists then it should contain a list of directory names relative to\nthe top-level directory (the one containing the <TT>src</TT> and\n<TT>platform</TT> directories).  These\ndirectories<A NAME=\"434\"></A>\nwill be added to the list of locations searched for\n`<TT>.c</TT>' and `<TT>.h</TT>' files while\nconstructing the substitutions for `<TT>[includes]</TT>',\n`<TT>[targets]</TT>' and `<TT>[make_targets]</TT>'.\n\n<P>\n\n<H3><A NAME=\"SECTION00052400000000000000\">\n<SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">4</SPAN> Including additional material in the default <TT>Makefile</TT></A>\n</H3>\n\n<P>\nIf the file <TT>platdep/Makefile.inc</TT><A NAME=\"642\"></A>\nexists then <TT>mkmf</TT> will\nsubstitute its contents into the <TT>Makefile</TT> in place of the\n<TT>[make_inc]</TT> keyword.\n\n<P>\n<BLOCKQUOTE>\n<FONT COLOR=\"#ff0000\"> Note: <TT>Makefile.inc</TT><A NAME=\"643\"></A>\nis read into the <TT>Makefile</TT> under\nconstruction <SPAN  CLASS=\"textit\">before</SPAN> <TT>mkmf</TT> performs substitutions on the\n`<TT>[keyword]</TT>'s.  In other words, your <TT>Makefile.inc</TT> can\nuse the above keywords to include relevant declarations and rules\nwithout worrying about whether the plugin is internal or external.\n</FONT></BLOCKQUOTE>\n<P>\n\n<H3><A NAME=\"SECTION00052500000000000000\">\n<SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">5</SPAN> Replacing the default <TT>Makefile</TT> entirely</A>\n</H3>\n\n<P>\nIf neither of the above are sufficient then you can create a complete\n<TT>Makefile</TT><A NAME=\"645\"></A>\ntemplate called <TT>platdep/Makefile.in</TT>.<A NAME=\"646\"></A>\n<TT>mkmf</TT> will use this template instead of the default <TT>Makefile</TT> template\nshown earlier, and will perform keyword substitutions on it as\ndescribed above to create the final <TT>Makefile</TT>.  (In other words,\nsimply copying the default template shown earlier will result in a\n<TT>Makefile</TT> identical to the one that <TT>mkmf</TT> would have\nproduced by default.\n\n<P>\n\n<H2><A NAME=\"SECTION00053000000000000000\">\n<SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">3</SPAN> Examples taken from existing plugins</A>\n</H2>\n\n<P>\nBy way of example we'll look at how two existing plugins specialise\ntheir configuration and <TT>Makefile</TT>s.\n\n<P>\n\n<H3><A NAME=\"SECTION00053100000000000000\">\n<SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN> Configuration</A>\n</H3>\n\n<P>\nThe <TT>B3DAcceleratorPlugin</TT> requires OpenGL in order to compile.\nThe file <TT>unix/plugins/B3DAcceleratorPlugin/acinclude.m4</TT><A NAME=\"647\"></A>\ncontains a single call to an <TT>autoconf</TT>-style macro:\n\n<P>\n\n<DIV CLASS=\"alltt\" ALIGN=\"LEFT\">\n<TT>\n &nbsp;&nbsp;&nbsp;&nbsp;AC_PLUGIN_SEARCH_LIBS(glIsEnabled, GL)\n<BR></TT>\n</DIV>\n\n<P>\nThis works similarly to the <TT>autoconf</TT> `<TT>AC_SEARCH_LIBS</TT>'\nmacro: If a library <TT>libGL.{a,so}</TT> (OpenGL) exists and exports\nthe function <TT>glIsEnabled()</TT> then `<TT>-lGL</TT>' is added to the\nfinal VM link command.  Otherwise the plugin is disabled (and a\nmessage warning of the fact is printed).\n\n<P>\n<BLOCKQUOTE>\n<FONT COLOR=\"#ff0000\"> Note: There's a bug here.  This should also check for `<TT>GL_VERSION_1_1</TT>' in headers.\n</FONT></BLOCKQUOTE>\n<P>\n\n<H3><A NAME=\"SECTION00053200000000000000\">\n<SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN> Customising the <TT>Makefile</TT></A>\n</H3>\n\n<P>\nThe <TT>Mpeg3Plugin</TT> requires a (modified) <TT>libmpeg</TT> to be\ncompiled along with it.  The sources for this library are in (several)\nsubdirectories of <TT>Cross/Meg3Plugin</TT> and they require additional\n<TT>cpp</TT> definitions in order to compile correctly.\n\n<P>\nTo cope with the additional directories,\n<TT>unix/plugins/Mpeg3Plugin/mkmf.subdirs</TT><A NAME=\"649\"></A>\nsimply lists them:\n\n<P>\n\n<DIV CLASS=\"alltt\" ALIGN=\"LEFT\">\n<TT>\n &nbsp;&nbsp;platforms/Cross/plugins/Mpeg3Plugin/libmpeg\n<BR>&nbsp;&nbsp;platforms/Cross/plugins/Mpeg3Plugin/libmpeg/audio\n<BR>&nbsp;&nbsp;platforms/Cross/plugins/Mpeg3Plugin/libmpeg/video\n<BR></TT>\n</DIV>\n\n<P>\nTo cope with the additional <TT>cpp</TT> definitions, we could have\nwritten a tiny <TT>Makefile.inc</TT><A NAME=\"650\"></A>\ncontaining:\n\n<P>\n\n<DIV CLASS=\"alltt\" ALIGN=\"LEFT\">\n<TT>\n &nbsp;&nbsp;&nbsp;&nbsp;XDEFS &nbsp;&nbsp;= -DNOPTHREADS\n<BR></TT>\n</DIV>\n\n<P>\nUnfortunately the additional source directories contain various\nutility and test programs (which <SPAN  CLASS=\"textit\">must not</SPAN> be built) so we\ncannot rely on <TT>mkmf</TT> generating the correct <TT>[targets]</TT> list.\n\n<P>\nInstead we just copy the default <TT>Makefile</TT> ``template'' (shown\nabove) as <TT>Mpeg3Plugin/Makefile.in</TT>\nand insert the required list of targets (and <TT>cpp</TT>\ndefinition) manually.  The end result<A NAME=\"651\"></A>\nlooks like this:\n<BLOCKQUOTE>\n<BLOCKQUOTE>\n<SPAN ID=\"hue655\">\n\n<DIV CLASS=\"alltt\" ALIGN=\"LEFT\">\n<TT>\n # Makefile.in for Mpeg3Plugin in Unix Squeak\n<BR>\n<BR>[make_cfg]\n<BR>[make_plg]\n<BR>\n<BR>\nTARGET &nbsp;= Mpeg3Plugin$a\n<BR>\n<BR>\nPLUGIN &nbsp;= Mpeg3Plugin$o\n<BR>\nVIDEO &nbsp;&nbsp;= getpicture$o headers$o idct$o macroblocks$o <SPAN &nbsp;CLASS=\"textit\">etc...</SPAN>\n<BR>\nAUDIO &nbsp;&nbsp;= dct$o header$o layer1$o layer2$o layer3$o <SPAN &nbsp;CLASS=\"textit\">etc...</SPAN>\n<BR>\nLIBMPEG = bitstream$o changesForSqueak$o libmpeg3$o <SPAN &nbsp;CLASS=\"textit\">etc...</SPAN>\n<BR>\n<BR>\nOBJS &nbsp;&nbsp;&nbsp;= $(PLUGIN) $(VIDEO) $(AUDIO) $(LIBMPEG)\n<BR>\n<BR>\nXINCLUDES &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= [includes]\n<BR>\nXDEFS &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= -DNOPTHREADS\n<BR>\n<BR>$(TARGET) : $(OBJS) Makefile\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$(LINK) $(TARGET) $(OBJS)\n<BR>\n<BR>[make_targets]\n<BR>\n<BR>.force :\n<BR></TT>\n</DIV>\n</SPAN>\n</BLOCKQUOTE>\n</BLOCKQUOTE>\n\n<P>\n<BLOCKQUOTE>\n<FONT COLOR=\"#ff0000\"> Note: The default `<TT>[make_targets]</TT>' will contain additional rules for the\nobjects that we're trying to avoid building (because it's built from\nan exhaustive list of `<TT>.c</TT>' files in the source directories).  This\ndoes no harm since the offending rules can never be triggered (their\ntargets are not listed in `<TT>OBJS</TT>').\n</FONT></BLOCKQUOTE>\n<P>\n\n<H2><A NAME=\"SECTION00054000000000000000\">\n<SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">4</SPAN> Coping with VMMaker quirks</A>\n</H2>\n\n<P>\nVMMaker<A NAME=\"521\"></A>\nwill refuse to compile a plugin if it thinks the plugin\nrequires platform support.  This is ``all-or-nothing'': if platform\nsupport is required on <SPAN  CLASS=\"textit\">one</SPAN> platform then it is required on\n<SPAN  CLASS=\"textit\">all</SPAN> platforms (even if the plugin compiles quite happily\nwithout platform support in Unix).\n\n<P>\nThe easiest way to add ``null'' platform support is to place an empty\n`<TT>Makefile.inc</TT>' in the plugin's <TT>platdep</TT> directory.  (To see\nthis in action, look in <TT>unix/plugins/JPEGReadWriter2Plugin</TT>.)\n\n<P>\n\n<H2><A NAME=\"SECTION00055000000000000000\">\n<SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">5</SPAN> If all else fails</A>\n</H2>\n\n<P>\n(Where<A NAME=\"528\"></A>\n``all else failing'' is defined as: ``after trying for 20\nminutes and still getting nowhere''.)\n\n<P>\nIf you're writing a plugin that needs platform support (beyond dumb\ninclusion of a few additional `<TT>.c</TT>' files) and this document has\nbeen of no help at all (or if you understood it but you're still\nsuffering from ``all else failing'') then send me\n<A NAME=\"tex2html3\"\n  HREF=\"mailto:ian.piumarta@squeakland.org\">mail</A>\nand I'll be\nhappy to help you with the various platdep files.\n\n<P>\n\n<P>\n\n<DIV CLASS=\"navigation\"><HR>\n<!--Navigation Panel-->\n<A NAME=\"tex2html111\"\n  HREF=\"HowToBuildFromSource-node6.html\">\n<IMG WIDTH=\"37\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"next\" SRC=\"next.png\"></A> \n<A NAME=\"tex2html105\"\n  HREF=\"HowToBuildFromSource.html\">\n<IMG WIDTH=\"26\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"up\" SRC=\"up.png\"></A> \n<A NAME=\"tex2html99\"\n  HREF=\"HowToBuildFromSource-node4.html\">\n<IMG WIDTH=\"63\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"previous\" SRC=\"prev.png\"></A> \n<A NAME=\"tex2html107\"\n  HREF=\"HowToBuildFromSource-node1.html\">\n<IMG WIDTH=\"65\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"contents\" SRC=\"contents.png\"></A> \n<A NAME=\"tex2html109\"\n  HREF=\"HowToBuildFromSource-node6.html\">\n<IMG WIDTH=\"43\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"index\" SRC=\"index.png\"></A> \n<BR>\n<B> Next:</B> <A NAME=\"tex2html112\"\n  HREF=\"HowToBuildFromSource-node6.html\">Index</A>\n<B> Up:</B> <A NAME=\"tex2html106\"\n  HREF=\"HowToBuildFromSource.html\">Building Unix Squeak (</A>\n<B> Previous:</B> <A NAME=\"tex2html100\"\n  HREF=\"HowToBuildFromSource-node4.html\">2 Generating your own</A>\n &nbsp; <B>  <A NAME=\"tex2html108\"\n  HREF=\"HowToBuildFromSource-node1.html\">Contents</A></B> \n &nbsp; <B>  <A NAME=\"tex2html110\"\n  HREF=\"HowToBuildFromSource-node6.html\">Index</A></B> </DIV>\n<!--End of Navigation Panel-->\n<ADDRESS>\n\n2005-03-17\n</ADDRESS>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/HowToBuildFromSource.html/HowToBuildFromSource-node6.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n\n<!--Converted with LaTeX2HTML 2002-2-1 (1.70)\noriginal version by:  Nikos Drakos, CBLU, University of Leeds\n* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan\n* with significant contributions from:\n  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->\n<HTML>\n<HEAD>\n<TITLE>Index</TITLE>\n<META NAME=\"description\" CONTENT=\"Index\">\n<META NAME=\"keywords\" CONTENT=\"HowToBuildFromSource\">\n<META NAME=\"resource-type\" CONTENT=\"document\">\n<META NAME=\"distribution\" CONTENT=\"global\">\n\n<META NAME=\"Generator\" CONTENT=\"LaTeX2HTML v2002-2-1\">\n<META HTTP-EQUIV=\"Content-Style-Type\" CONTENT=\"text/css\">\n\n<LINK REL=\"STYLESHEET\" HREF=\"HowToBuildFromSource.css\">\n\n<LINK REL=\"next\" HREF=\"HowToBuildFromSource-node7.html\">\n<LINK REL=\"previous\" HREF=\"HowToBuildFromSource-node5.html\">\n<LINK REL=\"up\" HREF=\"HowToBuildFromSource.html\">\n<LINK REL=\"next\" HREF=\"HowToBuildFromSource-node7.html\">\n</HEAD>\n\n<BODY >\n\n<DIV CLASS=\"navigation\"><!--Navigation Panel-->\n<A NAME=\"tex2html138\"\n  HREF=\"HowToBuildFromSource-node7.html\">\n<IMG WIDTH=\"37\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"next\" SRC=\"next.png\"></A> \n<A NAME=\"tex2html134\"\n  HREF=\"HowToBuildFromSource.html\">\n<IMG WIDTH=\"26\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"up\" SRC=\"up.png\"></A> \n<A NAME=\"tex2html128\"\n  HREF=\"HowToBuildFromSource-node5.html\">\n<IMG WIDTH=\"63\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"previous\" SRC=\"prev.png\"></A> \n<A NAME=\"tex2html136\"\n  HREF=\"HowToBuildFromSource-node1.html\">\n<IMG WIDTH=\"65\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"contents\" SRC=\"contents.png\"></A>  \n<BR>\n<B> Next:</B> <A NAME=\"tex2html139\"\n  HREF=\"HowToBuildFromSource-node7.html\">About this document ...</A>\n<B> Up:</B> <A NAME=\"tex2html135\"\n  HREF=\"HowToBuildFromSource.html\">Building Unix Squeak (</A>\n<B> Previous:</B> <A NAME=\"tex2html129\"\n  HREF=\"HowToBuildFromSource-node5.html\">3 Adding your own</A>\n &nbsp; <B>  <A NAME=\"tex2html137\"\n  HREF=\"HowToBuildFromSource-node1.html\">Contents</A></B> \n<BR>\n<BR></DIV>\n<!--End of Navigation Panel-->\n<BR>\n\n<H2><A NAME=\"SECTION00060000000000000000\">\nIndex</A>\n</H2><DL COMPACT>\n<DT><STRONG><TT>$(COMPILE)</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#628\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN></A>\n<DT><STRONG><TT>$(LINK)</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#629\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN></A>\n<DT><STRONG><TT>$(XCFLAGS)</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#634\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN></A>\n<DT><STRONG><TT>$(XCPPFLAGS)</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#632\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN></A>\n<DT><STRONG><TT>$(XDEFS)</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#633\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN></A>\n<DT><STRONG><TT>$(XINCLUDES)</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#637\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN></A>\n<DT><STRONG><TT>$(XLDFLAGS)</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#635\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN></A>\n<DT><STRONG><TT>[includes]</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#604\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN></A>\n<DT><STRONG><TT>[make_cfg]</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#597\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN></A>\n<DT><STRONG><TT>[make_inc]</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#621\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN></A>\n<DT><STRONG><TT>[make_plg]</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#600\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN></A>\n<DT><STRONG><TT>[make_targets]</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#624\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN></A>\n<DT><STRONG><TT>[plibs]</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#618\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN></A>\n<DT><STRONG><TT>[target]</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#615\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN></A>\n<DT><STRONG><TT>[targets]</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#610\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN></A>\n<DT><STRONG><TT>AC_PLUGIN_CHECK_LIB</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#582\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN></A>\n<DT><STRONG><TT>AC_PLUGIN_DEFINE_UNQUOTED</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#585\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN></A>\n<DT><STRONG><TT>acinclude.m4</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#575\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN></A>\n<DL COMPACT>\n<DT><STRONG>example</STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#647\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN></A>\n</DL>\n<DT><STRONG>additional plugin source directories</STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#434\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">3</SPAN></A>\n<DT><STRONG>build directory</STRONG>\n<DD><DL COMPACT>\n<DT><STRONG>configuring</STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node3.html#87\"><SPAN CLASS=\"arabic\">1</SPAN></A>\n<DT><STRONG>creating</STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node3.html#75\"><SPAN CLASS=\"arabic\">1</SPAN></A>\n</DL>\n<DT><STRONG><TT>config.status</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node4.html#569\"><SPAN CLASS=\"arabic\">2</SPAN></A>\n<DL COMPACT>\n<DT><STRONG>versus <TT>configure</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node4.html#567\"><SPAN CLASS=\"arabic\">2</SPAN></A>\n</DL>\n<DT><STRONG><TT>configure</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#576\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN></A>\n<DL COMPACT>\n<DT><STRONG>macros for plugins</STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#580\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN></A>\n<DT><STRONG>recreating</STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#577\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN></A>\n</DL>\n<DT><STRONG>emergency services</STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#528\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">5</SPAN></A>\n<DT><STRONG><TT>Makefile</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#589\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN></A>\n<DL COMPACT>\n<DT><STRONG>avoiding <TT>$(XINCLUDES)</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#638\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN></A>\n<DT><STRONG>compile/link commands</STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#630\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN></A>\n<DT><STRONG>keyword substitution</STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#594\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN></A>\n<DT><STRONG>passing extra flags</STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#631\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN></A>\n<DT><STRONG>replacing</STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#645\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">5</SPAN></A>\n<DT><STRONG>target rules</STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#626\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN></A>\n</DL>\n<DT><STRONG><TT>Makefile</TT> keywords</STRONG>\n<DD><DL COMPACT>\n<DT><STRONG><TT>[includes]</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#605\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN></A>\n<DT><STRONG><TT>[make_cfg]</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#598\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN></A>\n<DT><STRONG><TT>[make_inc]</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#622\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN></A>\n<DT><STRONG><TT>[make_plg]</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#601\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN></A>\n<DT><STRONG><TT>[make_targets]</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#625\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN></A>\n<DT><STRONG><TT>[plibs]</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#619\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN></A>\n<DT><STRONG><TT>[target]</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#616\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN></A>\n<DT><STRONG><TT>[targets]</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#611\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN></A>\n</DL>\n<DT><STRONG><TT>Makefile.in</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#646\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">5</SPAN></A>\n<DL COMPACT>\n<DT><STRONG>example</STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#651\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN></A>\n</DL>\n<DT><STRONG><TT>Makefile.inc</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#642\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">4</SPAN></A>\n<DL COMPACT>\n<DT><STRONG>example</STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#650\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN></A>\n<DT><STRONG>keyword substitution</STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#643\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">4</SPAN></A>\n</DL>\n<DT><STRONG><TT>mkmf</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#595\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN></A>\n<DL COMPACT>\n<DT><STRONG>additional source directories</STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#639\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">3</SPAN></A>\n<DT><STRONG>default header directories</STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#607\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN></A>\n<DT><STRONG>default source directories</STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#612\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN></A>\n</DL>\n<DT><STRONG><TT>mkmf.subdirs</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#640\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">3</SPAN></A>\n<DL COMPACT>\n<DT><STRONG>example</STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#649\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN></A>\n</DL>\n<DT><STRONG>plugin</STRONG>\n<DD><DL COMPACT>\n<DT><STRONG><TT>Makefile</TT></STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#587\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN></A>\n<DT><STRONG><TT>Makefile</TT> anatomy</STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#590\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN></A>\n<DT><STRONG>adding your own</STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#189\"><SPAN CLASS=\"arabic\">3</SPAN></A>\n<DT><STRONG>configuring</STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#216\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN></A>\n<DT><STRONG>target rules</STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#388\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN></A>\n<DT><STRONG>Unix-specific directory</STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#206\"><SPAN CLASS=\"arabic\">3</SPAN></A>\n</DL>\n<DT><STRONG>Unix-specific files</STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#197\"><SPAN CLASS=\"arabic\">3</SPAN></A>\n<DT><STRONG>VMMaker</STRONG>\n<DD><DL COMPACT>\n<DT><STRONG>configuration file</STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node4.html#140\"><SPAN CLASS=\"arabic\">2</SPAN></A>\n<DT><STRONG>missing platform support</STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node5.html#521\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">4</SPAN></A>\n<DT><STRONG>reference</STRONG>\n<DD><A HREF=\"HowToBuildFromSource-node4.html#132\"><SPAN CLASS=\"arabic\">2</SPAN></A>\n</DL>\n\n</DL>\n\n<P>\n<BR><HR>\n<ADDRESS>\n\n2005-03-17\n</ADDRESS>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/HowToBuildFromSource.html/HowToBuildFromSource-node7.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n\n<!--Converted with LaTeX2HTML 2002-2-1 (1.70)\noriginal version by:  Nikos Drakos, CBLU, University of Leeds\n* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan\n* with significant contributions from:\n  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->\n<HTML>\n<HEAD>\n<TITLE>About this document ...</TITLE>\n<META NAME=\"description\" CONTENT=\"About this document ...\">\n<META NAME=\"keywords\" CONTENT=\"HowToBuildFromSource\">\n<META NAME=\"resource-type\" CONTENT=\"document\">\n<META NAME=\"distribution\" CONTENT=\"global\">\n\n<META NAME=\"Generator\" CONTENT=\"LaTeX2HTML v2002-2-1\">\n<META HTTP-EQUIV=\"Content-Style-Type\" CONTENT=\"text/css\">\n\n<LINK REL=\"STYLESHEET\" HREF=\"HowToBuildFromSource.css\">\n\n<LINK REL=\"previous\" HREF=\"HowToBuildFromSource-node6.html\">\n<LINK REL=\"up\" HREF=\"HowToBuildFromSource.html\">\n</HEAD>\n\n<BODY >\n\n<DIV CLASS=\"navigation\"><!--Navigation Panel-->\n<IMG WIDTH=\"37\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"next\" SRC=\"next_g.png\"> \n<A NAME=\"tex2html144\"\n  HREF=\"HowToBuildFromSource.html\">\n<IMG WIDTH=\"26\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"up\" SRC=\"up.png\"></A> \n<A NAME=\"tex2html140\"\n  HREF=\"HowToBuildFromSource-node6.html\">\n<IMG WIDTH=\"63\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"previous\" SRC=\"prev.png\"></A> \n<A NAME=\"tex2html146\"\n  HREF=\"HowToBuildFromSource-node1.html\">\n<IMG WIDTH=\"65\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"contents\" SRC=\"contents.png\"></A> \n<A NAME=\"tex2html148\"\n  HREF=\"HowToBuildFromSource-node6.html\">\n<IMG WIDTH=\"43\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"index\" SRC=\"index.png\"></A> \n<BR>\n<B> Up:</B> <A NAME=\"tex2html145\"\n  HREF=\"HowToBuildFromSource.html\">Building Unix Squeak (</A>\n<B> Previous:</B> <A NAME=\"tex2html141\"\n  HREF=\"HowToBuildFromSource-node6.html\">Index</A>\n &nbsp; <B>  <A NAME=\"tex2html147\"\n  HREF=\"HowToBuildFromSource-node1.html\">Contents</A></B> \n &nbsp; <B>  <A NAME=\"tex2html149\"\n  HREF=\"HowToBuildFromSource-node6.html\">Index</A></B> \n<BR>\n<BR></DIV>\n<!--End of Navigation Panel-->\n\n<H1><A NAME=\"SECTION00070000000000000000\">\nAbout this document ...</A>\n</H1>\n <STRONG>Building Unix Squeak (&gt;= 3.2) from source</STRONG><P>\nThis document was generated using the\n<A HREF=\"http://www.latex2html.org/\"><STRONG>LaTeX</STRONG>2<tt>HTML</tt></A> translator Version 2002-2-1 (1.70)\n<P>\nCopyright &#169; 1993, 1994, 1995, 1996,\n<A HREF=\"http://cbl.leeds.ac.uk/nikos/personal.html\">Nikos Drakos</A>, \nComputer Based Learning Unit, University of Leeds.\n<BR>\nCopyright &#169; 1997, 1998, 1999,\n<A HREF=\"http://www.maths.mq.edu.au/~ross/\">Ross Moore</A>, \nMathematics Department, Macquarie University, Sydney.\n<P>\nThe command line arguments were: <BR>\n <STRONG>latex2html</STRONG> <TT>-dir tmp -local_icons -auto_prefix -show_section_numbers -split 4 HowToBuildFromSource.tex</TT>\n<P>\nThe translation was initiated by  on 2005-03-17\n<BR><HR>\n<ADDRESS>\n\n2005-03-17\n</ADDRESS>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/HowToBuildFromSource.html/HowToBuildFromSource.css",
    "content": "/* Century Schoolbook font is very similar to Computer Modern Math: cmmi */\n.MATH    { font-family: \"Century Schoolbook\", serif; }\n.MATH I  { font-family: \"Century Schoolbook\", serif; font-style: italic }\n.BOLDMATH { font-family: \"Century Schoolbook\", serif; font-weight: bold }\n\n/* implement both fixed-size and relative sizes */\nSMALL.XTINY\t\t{ font-size : xx-small }\nSMALL.TINY\t\t{ font-size : x-small  }\nSMALL.SCRIPTSIZE\t{ font-size : smaller  }\nSMALL.FOOTNOTESIZE\t{ font-size : small    }\nSMALL.SMALL\t\t{  }\nBIG.LARGE\t\t{  }\nBIG.XLARGE\t\t{ font-size : large    }\nBIG.XXLARGE\t\t{ font-size : x-large  }\nBIG.HUGE\t\t{ font-size : larger   }\nBIG.XHUGE\t\t{ font-size : xx-large }\n\n/* heading styles */\nH1\t\t{  }\nH2\t\t{  }\nH3\t\t{  }\nH4\t\t{  }\nH5\t\t{  }\n\n/* mathematics styles */\nDIV.displaymath\t\t{ }\t/* math displays */\nTD.eqno\t\t\t{ }\t/* equation-number cells */\n\n\n/* document-specific styles come next */\nDIV.navigation\t\t{   }\nDIV.alltt\t\t{   }\nDIV.quote\t\t{   }\nSPAN.tt\t\t{   }\nSPAN.textit\t\t{ font-style: italic  }\nSPAN.arabic\t\t{   }\nSPAN.textbf\t\t{ font-weight: bold  }\nSPAN.textsf\t\t{ font-style: italic  }\n#hue544\t\t{ color: #0000ff;  }\n#hue546\t\t{ color: #0000ff;  }\n#hue548\t\t{ color: #0000ff;  }\n#hue550\t\t{ color: #0000ff;  }\n#hue552\t\t{ color: #0000ff;  }\n#hue554\t\t{ color: #0000ff;  }\n#hue556\t\t{ color: #0000ff;  }\n#hue558\t\t{ color: #0000ff;  }\n#hue560\t\t{ color: #ff0000;  }\n#hue562\t\t{ color: #0000ff;  }\n#hue564\t\t{ color: #0000ff;  }\n#hue566\t\t{ color: #0000ff;  }\n#hue570\t\t{ color: #ff0000;  }\n#hue574\t\t{ color: #0000ff;  }\n#hue579\t\t{ color: #ff0000;  }\n#hue593\t\t{ color: #000000;  }\n#hue608\t\t{ color: #000000;  }\n#hue613\t\t{ color: #000000;  }\n#hue655\t\t{ color: #000000;  }\n#txt149\t\t{ text-decoration: underline;  }\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/HowToBuildFromSource.html/HowToBuildFromSource.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n\n<!--Converted with LaTeX2HTML 2002-2-1 (1.70)\noriginal version by:  Nikos Drakos, CBLU, University of Leeds\n* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan\n* with significant contributions from:\n  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->\n<HTML>\n<HEAD>\n<TITLE>Building Unix Squeak ( 3.2) from source</TITLE>\n<META NAME=\"description\" CONTENT=\"Building Unix Squeak ( 3.2) from source\">\n<META NAME=\"keywords\" CONTENT=\"HowToBuildFromSource\">\n<META NAME=\"resource-type\" CONTENT=\"document\">\n<META NAME=\"distribution\" CONTENT=\"global\">\n\n<META NAME=\"Generator\" CONTENT=\"LaTeX2HTML v2002-2-1\">\n<META HTTP-EQUIV=\"Content-Style-Type\" CONTENT=\"text/css\">\n\n<LINK REL=\"STYLESHEET\" HREF=\"HowToBuildFromSource.css\">\n\n<LINK REL=\"next\" HREF=\"HowToBuildFromSource-node1.html\">\n</HEAD>\n\n<BODY >\n\n<DIV CLASS=\"navigation\"><!--Navigation Panel-->\n<A NAME=\"tex2html8\"\n  HREF=\"HowToBuildFromSource-node1.html\">\n<IMG WIDTH=\"37\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"next\" SRC=\"next.png\"></A> \n<IMG WIDTH=\"26\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"up\" SRC=\"up_g.png\"> \n<IMG WIDTH=\"63\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"previous\" SRC=\"prev_g.png\"> \n<A NAME=\"tex2html4\"\n  HREF=\"HowToBuildFromSource-node1.html\">\n<IMG WIDTH=\"65\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"contents\" SRC=\"contents.png\"></A> \n<A NAME=\"tex2html6\"\n  HREF=\"HowToBuildFromSource-node6.html\">\n<IMG WIDTH=\"43\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"index\" SRC=\"index.png\"></A> \n<BR>\n<B> Next:</B> <A NAME=\"tex2html9\"\n  HREF=\"HowToBuildFromSource-node1.html\">Contents</A>\n &nbsp; <B>  <A NAME=\"tex2html5\"\n  HREF=\"HowToBuildFromSource-node1.html\">Contents</A></B> \n &nbsp; <B>  <A NAME=\"tex2html7\"\n  HREF=\"HowToBuildFromSource-node6.html\">Index</A></B> \n<BR>\n<BR></DIV>\n<!--End of Navigation Panel-->\n\n\n<H1 ALIGN=\"CENTER\">Building Unix Squeak (&gt;= 3.2) from source</H1>\n<DIV CLASS=\"author_info\">\n\n<P ALIGN=\"CENTER\"><STRONG>Ian Piumarta</STRONG></P>\n<P ALIGN=\"CENTER\"><I><A NAME=\"tex2html1\"\n  HREF=\"mailto:ian.piumarta@squeakland.org\"><TT>&lt;ian.piumarta@squeakland.org&gt;</TT></A></I></P>\n<P ALIGN=\"CENTER\"><STRONG><SMALL CLASS=\"SMALL\">Last edited: 2005-03-17 12:43:23 by piumarta on squeak.hpl.hp.com\n\n<BR>\nTranslated to .ps/.pdf/.html/.txt: March 17, 2005</SMALL></STRONG></P>\n</DIV>\n<BR><HR>\n<!--Table of Child-Links-->\n<A NAME=\"CHILD_LINKS\"></A>\n\n<UL CLASS=\"ChildLinks\">\n<LI><A NAME=\"tex2html10\"\n  HREF=\"HowToBuildFromSource-node1.html\">Contents</A>\n<LI><A NAME=\"tex2html11\"\n  HREF=\"HowToBuildFromSource-node2.html\"><SPAN CLASS=\"arabic\">0</SPAN> The easy way</A>\n<LI><A NAME=\"tex2html12\"\n  HREF=\"HowToBuildFromSource-node3.html\"><SPAN CLASS=\"arabic\">1</SPAN> The hard way: configure, build, install</A>\n<LI><A NAME=\"tex2html13\"\n  HREF=\"HowToBuildFromSource-node4.html\"><SPAN CLASS=\"arabic\">2</SPAN> Generating your own VM and plugin sources</A>\n<UL>\n<LI><A NAME=\"tex2html14\"\n  HREF=\"HowToBuildFromSource-node4.html#SECTION00041000000000000000\"><SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN> How <TT>configure</TT> finds the <TT>src</TT> directory</A>\n</UL>\n<BR>\n<LI><A NAME=\"tex2html15\"\n  HREF=\"HowToBuildFromSource-node5.html\"><SPAN CLASS=\"arabic\">3</SPAN> Adding your own plugins</A>\n<UL>\n<LI><A NAME=\"tex2html16\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00051000000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN> Plugin-specific configuration</A>\n<UL>\n<LI><A NAME=\"tex2html17\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00051100000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN> <TT>AC_PLUGIN_CHECK_LIB(<SPAN  CLASS=\"textit\">lib</SPAN>,<SPAN  CLASS=\"textit\">func</SPAN>)</TT></A>\n<LI><A NAME=\"tex2html18\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00051200000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN> <TT>AC_PLUGIN_DEFINE_UNQUOTED(<SPAN  CLASS=\"textit\">keyword</SPAN>,<SPAN  CLASS=\"textit\">text</SPAN>)</TT></A>\n<LI><A NAME=\"tex2html19\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00051300000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN>.<SPAN CLASS=\"arabic\">3</SPAN> Plugin-specific variables</A>\n</UL>\n<LI><A NAME=\"tex2html20\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00052000000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN> Plugin-specific <TT>Makefile</TT> declarations and rules</A>\n<UL>\n<LI><A NAME=\"tex2html21\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00052100000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN> The anatomy of a plugin's <TT>Makefile</TT></A>\n<LI><A NAME=\"tex2html22\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00052200000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN> A note about <TT>$(COMPILE)</TT> and <TT>$(LINK)</TT> commands</A>\n<LI><A NAME=\"tex2html23\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00052300000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">3</SPAN> Specifying additional source directories</A>\n<LI><A NAME=\"tex2html24\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00052400000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">4</SPAN> Including additional material in the default <TT>Makefile</TT></A>\n<LI><A NAME=\"tex2html25\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00052500000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">5</SPAN> Replacing the default <TT>Makefile</TT> entirely</A>\n</UL>\n<LI><A NAME=\"tex2html26\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00053000000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">3</SPAN> Examples taken from existing plugins</A>\n<UL>\n<LI><A NAME=\"tex2html27\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00053100000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN> Configuration</A>\n<LI><A NAME=\"tex2html28\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00053200000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN> Customising the <TT>Makefile</TT></A>\n</UL>\n<LI><A NAME=\"tex2html29\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00054000000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">4</SPAN> Coping with VMMaker quirks</A>\n<LI><A NAME=\"tex2html30\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00055000000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">5</SPAN> If all else fails</A>\n</UL>\n<BR>\n<LI><A NAME=\"tex2html31\"\n  HREF=\"HowToBuildFromSource-node6.html\">Index</A>\n<LI><A NAME=\"tex2html32\"\n  HREF=\"HowToBuildFromSource-node7.html\">About this document ...</A>\n</UL>\n<!--End of Table of Child-Links-->\n<BR><HR>\n<ADDRESS>\n\n2005-03-17\n</ADDRESS>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/HowToBuildFromSource.html/index.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n\n<!--Converted with LaTeX2HTML 2002-2-1 (1.70)\noriginal version by:  Nikos Drakos, CBLU, University of Leeds\n* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan\n* with significant contributions from:\n  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->\n<HTML>\n<HEAD>\n<TITLE>Building Unix Squeak ( 3.2) from source</TITLE>\n<META NAME=\"description\" CONTENT=\"Building Unix Squeak ( 3.2) from source\">\n<META NAME=\"keywords\" CONTENT=\"HowToBuildFromSource\">\n<META NAME=\"resource-type\" CONTENT=\"document\">\n<META NAME=\"distribution\" CONTENT=\"global\">\n\n<META NAME=\"Generator\" CONTENT=\"LaTeX2HTML v2002-2-1\">\n<META HTTP-EQUIV=\"Content-Style-Type\" CONTENT=\"text/css\">\n\n<LINK REL=\"STYLESHEET\" HREF=\"HowToBuildFromSource.css\">\n\n<LINK REL=\"next\" HREF=\"HowToBuildFromSource-node1.html\">\n</HEAD>\n\n<BODY >\n\n<DIV CLASS=\"navigation\"><!--Navigation Panel-->\n<A NAME=\"tex2html8\"\n  HREF=\"HowToBuildFromSource-node1.html\">\n<IMG WIDTH=\"37\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"next\" SRC=\"next.png\"></A> \n<IMG WIDTH=\"26\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"up\" SRC=\"up_g.png\"> \n<IMG WIDTH=\"63\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"previous\" SRC=\"prev_g.png\"> \n<A NAME=\"tex2html4\"\n  HREF=\"HowToBuildFromSource-node1.html\">\n<IMG WIDTH=\"65\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"contents\" SRC=\"contents.png\"></A> \n<A NAME=\"tex2html6\"\n  HREF=\"HowToBuildFromSource-node6.html\">\n<IMG WIDTH=\"43\" HEIGHT=\"24\" ALIGN=\"BOTTOM\" BORDER=\"0\" ALT=\"index\" SRC=\"index.png\"></A> \n<BR>\n<B> Next:</B> <A NAME=\"tex2html9\"\n  HREF=\"HowToBuildFromSource-node1.html\">Contents</A>\n &nbsp; <B>  <A NAME=\"tex2html5\"\n  HREF=\"HowToBuildFromSource-node1.html\">Contents</A></B> \n &nbsp; <B>  <A NAME=\"tex2html7\"\n  HREF=\"HowToBuildFromSource-node6.html\">Index</A></B> \n<BR>\n<BR></DIV>\n<!--End of Navigation Panel-->\n\n\n<H1 ALIGN=\"CENTER\">Building Unix Squeak (&gt;= 3.2) from source</H1>\n<DIV CLASS=\"author_info\">\n\n<P ALIGN=\"CENTER\"><STRONG>Ian Piumarta</STRONG></P>\n<P ALIGN=\"CENTER\"><I><A NAME=\"tex2html1\"\n  HREF=\"mailto:ian.piumarta@squeakland.org\"><TT>&lt;ian.piumarta@squeakland.org&gt;</TT></A></I></P>\n<P ALIGN=\"CENTER\"><STRONG><SMALL CLASS=\"SMALL\">Last edited: 2005-03-17 12:43:23 by piumarta on squeak.hpl.hp.com\n\n<BR>\nTranslated to .ps/.pdf/.html/.txt: March 17, 2005</SMALL></STRONG></P>\n</DIV>\n<BR><HR>\n<!--Table of Child-Links-->\n<A NAME=\"CHILD_LINKS\"></A>\n\n<UL CLASS=\"ChildLinks\">\n<LI><A NAME=\"tex2html10\"\n  HREF=\"HowToBuildFromSource-node1.html\">Contents</A>\n<LI><A NAME=\"tex2html11\"\n  HREF=\"HowToBuildFromSource-node2.html\"><SPAN CLASS=\"arabic\">0</SPAN> The easy way</A>\n<LI><A NAME=\"tex2html12\"\n  HREF=\"HowToBuildFromSource-node3.html\"><SPAN CLASS=\"arabic\">1</SPAN> The hard way: configure, build, install</A>\n<LI><A NAME=\"tex2html13\"\n  HREF=\"HowToBuildFromSource-node4.html\"><SPAN CLASS=\"arabic\">2</SPAN> Generating your own VM and plugin sources</A>\n<UL>\n<LI><A NAME=\"tex2html14\"\n  HREF=\"HowToBuildFromSource-node4.html#SECTION00041000000000000000\"><SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN> How <TT>configure</TT> finds the <TT>src</TT> directory</A>\n</UL>\n<BR>\n<LI><A NAME=\"tex2html15\"\n  HREF=\"HowToBuildFromSource-node5.html\"><SPAN CLASS=\"arabic\">3</SPAN> Adding your own plugins</A>\n<UL>\n<LI><A NAME=\"tex2html16\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00051000000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN> Plugin-specific configuration</A>\n<UL>\n<LI><A NAME=\"tex2html17\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00051100000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN> <TT>AC_PLUGIN_CHECK_LIB(<SPAN  CLASS=\"textit\">lib</SPAN>,<SPAN  CLASS=\"textit\">func</SPAN>)</TT></A>\n<LI><A NAME=\"tex2html18\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00051200000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN> <TT>AC_PLUGIN_DEFINE_UNQUOTED(<SPAN  CLASS=\"textit\">keyword</SPAN>,<SPAN  CLASS=\"textit\">text</SPAN>)</TT></A>\n<LI><A NAME=\"tex2html19\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00051300000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN>.<SPAN CLASS=\"arabic\">3</SPAN> Plugin-specific variables</A>\n</UL>\n<LI><A NAME=\"tex2html20\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00052000000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN> Plugin-specific <TT>Makefile</TT> declarations and rules</A>\n<UL>\n<LI><A NAME=\"tex2html21\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00052100000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN> The anatomy of a plugin's <TT>Makefile</TT></A>\n<LI><A NAME=\"tex2html22\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00052200000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN> A note about <TT>$(COMPILE)</TT> and <TT>$(LINK)</TT> commands</A>\n<LI><A NAME=\"tex2html23\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00052300000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">3</SPAN> Specifying additional source directories</A>\n<LI><A NAME=\"tex2html24\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00052400000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">4</SPAN> Including additional material in the default <TT>Makefile</TT></A>\n<LI><A NAME=\"tex2html25\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00052500000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN>.<SPAN CLASS=\"arabic\">5</SPAN> Replacing the default <TT>Makefile</TT> entirely</A>\n</UL>\n<LI><A NAME=\"tex2html26\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00053000000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">3</SPAN> Examples taken from existing plugins</A>\n<UL>\n<LI><A NAME=\"tex2html27\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00053100000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">1</SPAN> Configuration</A>\n<LI><A NAME=\"tex2html28\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00053200000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">2</SPAN> Customising the <TT>Makefile</TT></A>\n</UL>\n<LI><A NAME=\"tex2html29\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00054000000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">4</SPAN> Coping with VMMaker quirks</A>\n<LI><A NAME=\"tex2html30\"\n  HREF=\"HowToBuildFromSource-node5.html#SECTION00055000000000000000\"><SPAN CLASS=\"arabic\">3</SPAN>.<SPAN CLASS=\"arabic\">5</SPAN> If all else fails</A>\n</UL>\n<BR>\n<LI><A NAME=\"tex2html31\"\n  HREF=\"HowToBuildFromSource-node6.html\">Index</A>\n<LI><A NAME=\"tex2html32\"\n  HREF=\"HowToBuildFromSource-node7.html\">About this document ...</A>\n</UL>\n<!--End of Table of Child-Links-->\n<BR><HR>\n<ADDRESS>\n\n2005-03-17\n</ADDRESS>\n</BODY>\n</HTML>\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/HowToBuildFromSource.ps",
    "content": "%!PS-Adobe-2.0\n%%Creator: dvips(k) 5.92b Copyright 2002 Radical Eye Software\n%%Title: HowToBuildFromSource.dvi\n%%Pages: 13\n%%PageOrder: Ascend\n%%BoundingBox: 0 0 596 842\n%%EndComments\n%DVIPSWebPage: (www.radicaleye.com)\n%DVIPSCommandLine: dvips -o HowToBuildFromSource.ps\n%+ HowToBuildFromSource.dvi\n%DVIPSParameters: dpi=600, compressed\n%DVIPSSource:  TeX output 2005.03.17:1243\n%%BeginProcSet: texc.pro\n%!\n/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S\nN}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72\nmul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0\n0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{\nlandplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize\nmul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[\nmatrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round\nexch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{\nstatusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0]\nN/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin\n/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array\n/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2\narray copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N\ndf-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A\ndefinefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get\n}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub}\nB/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr\n1 add N}if}B/id 0 N/rw 0 N/rc 0 N/gp 0 N/cp 0 N/G 0 N/CharBuilder{save 3\n1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx\n0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx\nsub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{\nrc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp\ngp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B\n/chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{\n/cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{\nA A add 255 and S 1 and or}ifelse}ifelse put 1 adv}B/rsh{rw cp 2 copy\nget A 0 eq{pop 128}{A 255 eq{pop 127}{A 2 idiv S 128 and or}ifelse}\nifelse put 1 adv}B/clr{rw cp 2 index string putinterval adv}B/set{rw cp\nfillstr 0 4 index getinterval putinterval adv}B/fillstr 18 string 0 1 17\n{2 copy 255 put pop}for N/pl[{adv 1 chg}{adv 1 chg nd}{1 add chg}{1 add\nchg nd}{adv lsh}{adv lsh nd}{adv rsh}{adv rsh nd}{1 add adv}{/rc X nd}{\n1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]A{bind pop}\nforall N/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn\n/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put\n}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{\nbop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A\nmul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{\nSI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{\nuserdict/start-hook known{start-hook}if pop/VResolution X/Resolution X\n1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4\nindex cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N\n/p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{\n/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT)\n(LaserWriter 16/600)]{A length product length le{A length product exch 0\nexch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse\nend{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask\ngrestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot}\nimagemask grestore}}ifelse B/QV{gsave newpath transform round exch round\nexch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto\nfill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p\ndelta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M}\nB/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{\np -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S\nrmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end\n\n%%EndProcSet\n%%BeginProcSet: special.pro\n%!\nTeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N\n/vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N\n/rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N\n/@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{\n/hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho\nX}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B\n/@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{\n/urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known\n{userdict/md get type/dicttype eq{userdict begin md length 10 add md\nmaxlength ge{/md md dup length 20 add dict copy def}if end md begin\n/letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S\natan/pa X newpath clippath mark{transform{itransform moveto}}{transform{\nitransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll\ntransform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll\ncurveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf\npop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack}\nif}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1\n-1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3\nget ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip\nyflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub\nneg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{\nnoflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop\n90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get\nneg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr\n1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr\n2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4\n-1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S\nTR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{\nResolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale\n}if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState\nsave N userdict maxlength dict begin/magscale true def normalscale\ncurrentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts\n/psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x\npsf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx\npsf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub\nTR/showpage{}N/erasepage{}N/setpagedevice{pop}N/copypage{}N/p 3 def\n@MacSetUp}N/doclip{psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll\nnewpath 4 copy 4 2 roll moveto 6 -1 roll S lineto S lineto S lineto\nclosepath clip newpath moveto}N/endTexFig{end psf$SavedState restore}N\n/@beginspecial{SDict begin/SpecialSave save N gsave normalscale\ncurrentpoint TR @SpecialDefaults count/ocount X/dcount countdictstack N}\nN/@setspecial{CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs\nneg 0 rlineto closepath clip}if ho vo TR hsc vsc scale ang rotate\nrwiSeen{rwi urx llx sub div rhiSeen{rhi ury lly sub div}{dup}ifelse\nscale llx neg lly neg TR}{rhiSeen{rhi ury lly sub div dup scale llx neg\nlly neg TR}if}ifelse CLIP 2 eq{newpath llx lly moveto urx lly lineto urx\nury lineto llx ury lineto closepath clip}if/showpage{}N/erasepage{}N\n/setpagedevice{pop}N/copypage{}N newpath}N/@endspecial{count ocount sub{\npop}repeat countdictstack dcount sub{end}repeat grestore SpecialSave\nrestore end}N/@defspecial{SDict begin}N/@fedspecial{end}B/li{lineto}B\n/rl{rlineto}B/rc{rcurveto}B/np{/SaveX currentpoint/SaveY X N 1\nsetlinecap newpath}N/st{stroke SaveX SaveY moveto}N/fil{fill SaveX SaveY\nmoveto}N/ellipse{/endangle X/startangle X/yrad X/xrad X/savematrix\nmatrix currentmatrix N TR xrad yrad scale 0 0 1 startangle endangle arc\nsavematrix setmatrix}N end\n\n%%EndProcSet\n%%BeginProcSet: color.pro\n%!\nTeXDict begin/setcmykcolor where{pop}{/setcmykcolor{dup 10 eq{pop\nsetrgbcolor}{1 sub 4 1 roll 3{3 index add neg dup 0 lt{pop 0}if 3 1 roll\n}repeat setrgbcolor pop}ifelse}B}ifelse/TeXcolorcmyk{setcmykcolor}def\n/TeXcolorrgb{setrgbcolor}def/TeXcolorgrey{setgray}def/TeXcolorgray{\nsetgray}def/TeXcolorhsb{sethsbcolor}def/currentcmykcolor where{pop}{\n/currentcmykcolor{currentrgbcolor 10}B}ifelse/DC{exch dup userdict exch\nknown{pop pop}{X}ifelse}B/GreenYellow{0.15 0 0.69 0 setcmykcolor}DC\n/Yellow{0 0 1 0 setcmykcolor}DC/Goldenrod{0 0.10 0.84 0 setcmykcolor}DC\n/Dandelion{0 0.29 0.84 0 setcmykcolor}DC/Apricot{0 0.32 0.52 0\nsetcmykcolor}DC/Peach{0 0.50 0.70 0 setcmykcolor}DC/Melon{0 0.46 0.50 0\nsetcmykcolor}DC/YellowOrange{0 0.42 1 0 setcmykcolor}DC/Orange{0 0.61\n0.87 0 setcmykcolor}DC/BurntOrange{0 0.51 1 0 setcmykcolor}DC\n/Bittersweet{0 0.75 1 0.24 setcmykcolor}DC/RedOrange{0 0.77 0.87 0\nsetcmykcolor}DC/Mahogany{0 0.85 0.87 0.35 setcmykcolor}DC/Maroon{0 0.87\n0.68 0.32 setcmykcolor}DC/BrickRed{0 0.89 0.94 0.28 setcmykcolor}DC/Red{\n0 1 1 0 setcmykcolor}DC/OrangeRed{0 1 0.50 0 setcmykcolor}DC/RubineRed{\n0 1 0.13 0 setcmykcolor}DC/WildStrawberry{0 0.96 0.39 0 setcmykcolor}DC\n/Salmon{0 0.53 0.38 0 setcmykcolor}DC/CarnationPink{0 0.63 0 0\nsetcmykcolor}DC/Magenta{0 1 0 0 setcmykcolor}DC/VioletRed{0 0.81 0 0\nsetcmykcolor}DC/Rhodamine{0 0.82 0 0 setcmykcolor}DC/Mulberry{0.34 0.90\n0 0.02 setcmykcolor}DC/RedViolet{0.07 0.90 0 0.34 setcmykcolor}DC\n/Fuchsia{0.47 0.91 0 0.08 setcmykcolor}DC/Lavender{0 0.48 0 0\nsetcmykcolor}DC/Thistle{0.12 0.59 0 0 setcmykcolor}DC/Orchid{0.32 0.64 0\n0 setcmykcolor}DC/DarkOrchid{0.40 0.80 0.20 0 setcmykcolor}DC/Purple{\n0.45 0.86 0 0 setcmykcolor}DC/Plum{0.50 1 0 0 setcmykcolor}DC/Violet{\n0.79 0.88 0 0 setcmykcolor}DC/RoyalPurple{0.75 0.90 0 0 setcmykcolor}DC\n/BlueViolet{0.86 0.91 0 0.04 setcmykcolor}DC/Periwinkle{0.57 0.55 0 0\nsetcmykcolor}DC/CadetBlue{0.62 0.57 0.23 0 setcmykcolor}DC\n/CornflowerBlue{0.65 0.13 0 0 setcmykcolor}DC/MidnightBlue{0.98 0.13 0\n0.43 setcmykcolor}DC/NavyBlue{0.94 0.54 0 0 setcmykcolor}DC/RoyalBlue{1\n0.50 0 0 setcmykcolor}DC/Blue{1 1 0 0 setcmykcolor}DC/Cerulean{0.94 0.11\n0 0 setcmykcolor}DC/Cyan{1 0 0 0 setcmykcolor}DC/ProcessBlue{0.96 0 0 0\nsetcmykcolor}DC/SkyBlue{0.62 0 0.12 0 setcmykcolor}DC/Turquoise{0.85 0\n0.20 0 setcmykcolor}DC/TealBlue{0.86 0 0.34 0.02 setcmykcolor}DC\n/Aquamarine{0.82 0 0.30 0 setcmykcolor}DC/BlueGreen{0.85 0 0.33 0\nsetcmykcolor}DC/Emerald{1 0 0.50 0 setcmykcolor}DC/JungleGreen{0.99 0\n0.52 0 setcmykcolor}DC/SeaGreen{0.69 0 0.50 0 setcmykcolor}DC/Green{1 0\n1 0 setcmykcolor}DC/ForestGreen{0.91 0 0.88 0.12 setcmykcolor}DC\n/PineGreen{0.92 0 0.59 0.25 setcmykcolor}DC/LimeGreen{0.50 0 1 0\nsetcmykcolor}DC/YellowGreen{0.44 0 0.74 0 setcmykcolor}DC/SpringGreen{\n0.26 0 0.76 0 setcmykcolor}DC/OliveGreen{0.64 0 0.95 0.40 setcmykcolor}\nDC/RawSienna{0 0.72 1 0.45 setcmykcolor}DC/Sepia{0 0.83 1 0.70\nsetcmykcolor}DC/Brown{0 0.81 1 0.60 setcmykcolor}DC/Tan{0.14 0.42 0.56 0\nsetcmykcolor}DC/Gray{0 0 0 0.50 setcmykcolor}DC/Black{0 0 0 1\nsetcmykcolor}DC/White{0 0 0 0 setcmykcolor}DC end\n\n%%EndProcSet\nTeXDict begin 39158280 55380996 1000 600 600 (HowToBuildFromSource.dvi)\n@start\n%DVIPSBitmapFont: Fa cmbx12 12 37\n/Fa 37 122 df<ED0FFF4AB512C0020F14F0027F80903A01FFF803FC499038C000FE010F\nEB00034948497E49485B5C495A4C138001FF6E13005CA3705AEE01F893C8FCA74BB51280\nB9FCA5C69038E00003B3B0007FD9FFC1B6FCA538467EC53E>12 D<B612F8A91D097F9A25\n>45 D<EA07C0EA1FF0EA3FF8EA7FFCEAFFFEA7EA7FFCEA3FF8EA1FF0EA07C00F0F788E1F\n>I<EC03C01407141F147FEB03FF133FB6FCA413C3EA0003B3B3ADB712FCA5264177C038>\n49 D<ECFFE0010F13FE013F6D7E90B612E0000315F82607FC0313FE3A0FE0007FFFD81F\n806D138048C7000F13C0488001C015E001F07F00FF6E13F07F17F881A46C5A6C5A6C5AC9\nFC17F05DA217E05D17C04B13804B1300A2ED1FFC4B5A5E4B5A4B5A4A90C7FC4A5A4A5AEC\n0FF04A5AEC3F804AC7127814FE495A494814F8D907E014F0495A495A49C8FC017C140149\n140348B7FC4816E05A5A5A5A5AB8FC17C0A42D417BC038>I<ECFFF0010713FF011F14C0\n017F14F049C66C7ED803F8EB3FFED807E06D7E81D80FF86D138013FE001F16C07FA66C5A\n6C4815806C485BC814005D5E4B5A4B5A4B5A4A5B020F1380902607FFFEC7FC15F815FF16\nC090C713F0ED3FFCED0FFEEEFF80816F13C017E0A26F13F0A217F8A3EA0FC0EA3FF0487E\nA2487EA217F0A25D17E06C5A494913C05BD83F80491380D81FF0491300D80FFEEBFFFE6C\nB612F800015D6C6C14C0011F49C7FC010113E02D427BC038>I<163FA25E5E5D5DA25D5D\n5D5DA25D92B5FCEC01F7EC03E7140715C7EC0F87EC1F07143E147E147C14F8EB01F0EB03\nE0130714C0EB0F80EB1F00133E5BA25B485A485A485A120F5B48C7FC123E5A12FCB91280\nA5C8000F90C7FCAC027FB61280A531417DC038>I<0007150301E0143F01FFEB07FF91B6\nFC5E5E5E5E5E16804BC7FC5D15E092C8FC01C0C9FCAAEC3FF001C1B5FC01C714C001DF14\nF09039FFE03FFC9138000FFE01FC6D7E01F06D13804915C0497F6C4815E0C8FC6F13F0A3\n17F8A4EA0F80EA3FE0487E12FF7FA317F05B5D6C4815E05B007EC74813C0123E003F4A13\n80D81FC0491300D80FF0495AD807FEEBFFFC6CB612F0C65D013F1480010F01FCC7FC0101\n13C02D427BC038>I<DCFFF01470031F01FF14F04AB6EAE0010207EDF803023FEDFE0791\nB539E001FF0F4949C7EA3F9F010701F0EC0FFF4901C0804990C87E494881494881494816\n7F4849163F4849161F5A4A160F485B19074890CAFC19035A5BA2007F1801A34994C7FC12\nFFAE127F7F1AF0A2123FA27F6C18011AE06C7F19036C6D17C06E16077E6C6DEE0F806C6D\nEE1F006D6C5E6D6C167E6D6C6C5D6D6D4A5A6D01F0EC07F0010101FEEC1FE06D903AFFF0\n01FF80023F90B6C7FC020715FC020115F0DA001F1480030001F8C8FC44467AC451>67\nD<BA12F8A485D8001F90C71201EF003F180F180318011800A2197E193EA3191EA21778A2\n85A405F890C7FCA316011603161F92B5FCA5ED001F160316011600A2F101E01778A2F103\nC0A494C7FC1907A21A80A2190FA2191FA2193FF17F0061601807181F4DB5FCBBFC61A443\n447DC34A>69 D<B7D88003B612FEA526003FFEC9EBF800B3A791B9FCA54AC9FCB3AAB7D8\n8003B612FEA54F447CC358>72 D<B712E0A5D8001F90C7FCB3B3B3A4B712E0A523447DC3\n2A>I<B500FE067FB512806E95B6FCA26F5EA2D8003F50C7FC013D6DEE03DFA2013C6DEE\n079FA26E6CEE0F1FA26E6C161EA26E6C163CA36E6C1678A26E6C16F0A26E6DEC01E0A26E\n6DEC03C0A36E6DEC0780A26F6CEC0F00A26F6C141EA26F6C5CA36F6C5CA26F6C5CA26F6D\n485AA26F6D485AA26F6D485AA3706C48C7FCA293383FF81EA2706C5AA2706C5AA3706C5A\nA2705BA2705BA2705BA2B6057FB6128071C7FCA2173E171C61447CC36A>77\nD<B9FC18F018FE727E19E0D8001F90C7000F7F05017F716C7E727E727E721380A21AC084\nA21AE0A91AC0A24E1380A21A00604E5A4E5A4D485A050F5B92B712C096C7FC18FC18C092\nCBFCB3A7B712E0A543447DC34D>80 D<B792B6FCA526003FFECAEAFC00806D606F15016D\n608119036D606F15076D606F150F6D6081191F6D6D93C7FC61027F163E6F157E023F167C\n8119FC6E6D5C18016E5E7013036E5E8218076E6D5C180F6E5E70131F6E93C8FC705B037F\n143E82187E033F147C7013FC6F5C17816F5C17C117C36F5C17E76F5C17FF6F5CA36F91C9\nFCA2705AA2705AA3705AA2705AA2705AA250457EC355>86 D<903801FFE0011F13FE017F\n6D7E48B612E03A03FE007FF84848EB1FFC6D6D7E486C6D7EA26F7FA36F7F6C5A6C5AEA00\nF090C7FCA40203B5FC91B6FC1307013F13F19038FFFC01000313E0000F1380381FFE0048\n5A5B127F5B12FF5BA35DA26D5B6C6C5B4B13F0D83FFE013EEBFFC03A1FFF80FC7F0007EB\nFFF86CECE01FC66CEB8007D90FFCC9FC322F7DAD36>97 D<EC3FFC49B512C0010F14F001\n3F14FC90397FF003FE9039FFC001FF0003495A48494813805B120F485AA2485A6F130000\n7F6E5AED00784991C7FCA212FFAC6C7EA3123F6DEC03C0A26C6C1407000F16806D140F6C\n6DEB1F006C6D133E6C01F05B3A007FFC03F86DB55A010F14C0010391C7FC9038003FF82A\n2F7CAD32>99 D<EE03FEED07FFA5ED001F160FB1EC3FE0903803FFFC010FEBFF8F013F14\nCF9039FFF807FF48EBC00148903880007F4890C7123F4848141F49140F121F485AA3127F\n5BA212FFAC127FA37F123FA26C6C141FA26C6C143F0007157F6C6C91B5FC6CD9C00314FC\n6C9038F01FEF6DB5128F011FEBFE0F010713F89026007FC0EBF80036467CC43E>I<EC3F\nF80103B57E010F14E0013F8090397FF83FF89039FFC007FC48496C7E48496C7E48486D13\n80485A001FED7FC05B003FED3FE0A2127F5B17F0161F12FFA290B7FCA401F0C9FCA5127F\nA27FA2123F17F06C7E16016C6C15E06C6C14036C6DEB07C06C6DEB0F806C01F0EB3F0090\n397FFE01FE011FB55A010714F0010114C09026001FFEC7FC2C2F7DAD33>I<EDFF80020F\n13E0027F13F049B512F849EB8FFC90390FFE0FFE90381FFC1F14F8133FEB7FF0A2ED0FFC\nEBFFE0ED03F0ED00C01600ABB612F8A5C601E0C7FCB3B0007FEBFFE0A527467DC522>I<\nDAFFE0137E010F9039FE03FF80013FEBFF8F90B812C048D9C07F133F489038001FF84848\nEB0FFC4848903907FE1F80001F9238FF0F00496D90C7FCA2003F82A8001F93C7FCA26D5B\n000F5D6C6C495A6C6C495A6C9038C07FF04890B55A1680D8078F49C8FC018013E0000F90\nCAFCA47F7F7F90B612C016FC6CEDFF8017E06C826C16FC7E000382000F82D81FF0C77ED8\n3FC014074848020113808248C9FC177FA46D15FF007F17006D5C6C6C4A5A6C6C4A5AD80F\nFEEC3FF83B07FFC001FFF0000190B612C06C6C92C7FC010F14F8D9007F90C8FC32427DAC\n38>I<EB7FC0B5FCA512037EB1ED07FE92383FFF8092B512E002C114F89139C7F03FFC91\n38CF801F9139DF000FFE14DE14FC4A6D7E5CA25CA35CB3A7B60083B512FEA537457CC43E\n>I<137C48B4FC4813804813C0A24813E0A56C13C0A26C13806C1300EA007C90C7FCAAEB\n7FC0EA7FFFA512037EB3AFB6FCA518467CC520>I<EB7FC0B5FCA512037EB293387FFFE0\nA593380FE0004C5A4CC7FC167E5EED03F8ED07E04B5A4B5A037FC8FC15FEECC1FCECC3FE\n14C7ECDFFF91B57E82A202F97F02E17F02C07FEC807F6F7E826F7E816F7F836F7F816F7F\n83707E163FB60003B512F8A535457DC43B>107 D<EB7FC0B5FCA512037EB3B3B3A3B612\n80A519457CC420>I<90277F8007FEEC0FFCB590263FFFC090387FFF8092B5D8F001B512\nE002816E4880913D87F01FFC0FE03FF8913D8FC00FFE1F801FFC0003D99F009026FF3E00\n7F6C019E6D013C130F02BC5D02F86D496D7EA24A5D4A5DA34A5DB3A7B60081B60003B512\nFEA5572D7CAC5E>I<90397F8007FEB590383FFF8092B512E0028114F8913987F03FFC91\n388F801F000390399F000FFE6C139E14BC02F86D7E5CA25CA35CB3A7B60083B512FEA537\n2D7CAC3E>I<EC1FFC49B512C0010714F0011F14FC90397FF80FFF9026FFC0017F48496C\n7F4848C7EA3FE000078248486E7E49140F001F82A2003F82491407007F82A400FF1780AA\n007F1700A46C6C4A5AA2001F5E6D141F000F5E6C6C4A5AA26C6C6CEBFFE06C6D485B2700\n7FF80F90C7FC6DB55A010F14F8010114C09026001FFCC8FC312F7DAD38>I<90397FC00F\nF8B590B57E02C314E002CF14F89139DFC03FFC9139FF001FFE000301FCEB07FF6C496D13\n804A15C04A6D13E05C7013F0A2EF7FF8A4EF3FFCACEF7FF8A318F017FFA24C13E06E15C0\n6E5B6E4913806E4913006E495A9139DFC07FFC02CFB512F002C314C002C091C7FCED1FF0\n92C9FCADB67EA536407DAC3E>I<DA3FE0131E902603FFFC133E010F01FF137E013F1480\n903AFFF80FE0FE489038E003F148EBC0014890388000FB4890C7127F49143F001F151F48\n5A160F5B127FA3485AAC6C7EA46C7EA26C6C141F163F6C6C147F6C15FF6C6D5A6C9038E0\n03EF6C9038F01FCF6DB5128F011FEBFE0F010313F89038007FC091C7FCAD0307B512FCA5\n36407CAC3B>I<90387F807FB53881FFE0028313F0028F13F8ED8FFC91389F1FFE000313\nBE6C13BC14F8A214F0ED0FFC9138E007F8ED01E092C7FCA35CB3A5B612E0A5272D7DAC2E\n>I<90391FFC038090B51287000314FF120F381FF003383FC00049133F48C7121F127E00\nFE140FA215077EA27F01E090C7FC13FE387FFFF014FF6C14C015F06C14FC6C800003806C\n15806C7E010F14C0EB003F020313E0140000F0143FA26C141F150FA27EA26C15C06C141F\nA26DEB3F8001E0EB7F009038F803FE90B55A00FC5CD8F03F13E026E007FEC7FC232F7CAD\n2C>I<EB01E0A51303A41307A2130FA2131FA2133F137F13FF1203000F90B51280B7FCA4\nC601E0C7FCB3A3ED01E0A9150302F013C0137F150790393FF80F8090391FFC1F006DB5FC\n6D13FC01015B9038003FE023407EBE2C>I<D97FC049B4FCB50103B5FCA50003EC000F6C\n81B3A85EA25EA25E7E6E491380017FD901F713FE9138F807E76DB512C7010F1407010313\nFE9026007FF0EBFC00372E7CAC3E>I<B5D8FE1FB539801FFFF0A500019027C0003FE0C7\nEA7C007114786E17F86C6F6C5C6E1601017F6E6C5CA26E011F1403013F6F5C6E013F1407\n011F6F5CA26E0179140F010F048090C7FC6E01F95C6D02F0EBC01E15806D902681E07F5B\n18E003C3157C6D9139C03FF07815E76DDA801F5B18F803FF14F96E9039000FFDE018FF6E\n486D5BA36E486D5BA26E486D90C8FCA24B7F02075DA26E48147C4B143C4C2C7EAB51>\n119 D<B500FE90383FFFF0A5C601F0903803E0006D6C495A013F4A5A6D6C49C7FC6E5B6D\n6C137E6DEB807C6D6D5A6DEBC1F0EDE3E06DEBF7C06EB45A806E90C8FC5D6E7E6E7F6E7F\nA24A7F4A7F8291381F3FFCEC3E1F027C7F4A6C7E49486C7F01036D7F49487E02C0804948\n6C7F49C76C7E013E6E7E017E141FB500E090B512FCA5362C7EAB3B>I<B6903803FFFCA5\n000101E09038003E006C163C80017F5D8017F8013F5D6E1301011F5D6E1303010F5D6E13\n076D5DED800F6D92C7FC15C05E6DEBE01E163E6D143CEDF07C027F1378EDF8F8023F5B15\nFD021F5B15FF6E5BA36E5BA26E90C8FCA26E5AA26E5AA21578A215F85D14015D001F1303\nD83F805B387FC007D8FFE05B140F92C9FC5C143E495A387FC1F8EB07F06CB45A6C5B0007\n90CAFCEA01FC36407EAB3B>I E\n%EndDVIPSBitmapFont\n%DVIPSBitmapFont: Fb cmss10 10 7\n/Fb 7 117 df<12FEA70707788617>46 D<EB1FF0EBFFFC000313FF000F14804814C090\n38E01FE09038000FF0001C13070018EB03F81210C7FCEC01FCA7143FEB0FFF90B5FC1203\n120F381FFE01EA3FE0EA7F80130012FEA414037E387F800FEBE03F6CB5FC7E6C13F96C13\nE1D801FEC7FC1E287DA628>97 D<EB07F8EB1FFE90387FFF8048B512C04814E03907FC0F\nF0390FF003F8EBE001391FC000FC49137C003F147E90C7123E5A127E151F12FEB7FCA500\nFCC8FCA27EA2127EA2127F7E7F6C7E6D13026C6C130E6C6C133E3903FE01FE6CB5FC6C14\nFC6D13F0011F13C0903803FE0020287EA625>101 D<903907E001F890383FFC1F90397F\nFE7FFC90B6FC5A3A03F81FF8003907F00FE0EBE00748486C7EA248486C7EA86C6C485AA2\n6C6C485AEBF00F6C6C485A48B55A92C7FC485BEB3FFCEB07E090C9FCA37F7F6CB512C015\nFC15FF4815804815C03A3F80007FE048C7EA0FF0007E140700FEEC03F8481401A46C1403\n007E15F0D87F80130F6C6CEB1FE03A1FFC01FFC06CB612806C1500000114FC6C6C13F001\n0790C7FC26387EA52A>103 D<EB01FC39FE0FFF804913C0017F13E090B512F039FFF81F\nF8EBE007EBC003018013FC14011300A35AB3A71E267AA52B>110\nD<14F0EAFC07130F133F137F13FF00FD130013FCEAFFF05B5BA25B90C7FCA35AB3A41426\n7AA51C>114 D<EA01FCAAB6FCA5D801FCC7FCB3A76D138014013900FF07C014FFA26D13\n00EB3FFCEB1FE01A307FAE1E>116 D E\n%EndDVIPSBitmapFont\n%DVIPSBitmapFont: Fc cmsy10 10 3\n/Fc 3 104 df<EB1FF0EBFFFE487F000714C04814E04814F04814F8A24814FCA3B612FE\nA96C14FCA36C14F8A26C14F06C14E06C14C0000114006C5BEB1FF01F1F7BA42A>15\nD<EC01F8140FEC3F80ECFC00495A495A495AA2130F5CB3A7131F5C133F49C7FC13FEEA03\nF8EA7FE048C8FCEA7FE0EA03F8EA00FE137F6D7E131F80130FB3A7801307A26D7E6D7E6D\n7EEC3F80EC0FF814011D537ABD2A>102 D<12FCEAFFC0EA07F0EA01FCEA007E7F80131F\n80130FB3A7801307806D7E6D7EEB007EEC1FF0EC07F8EC1FF0EC7E00495A495A495A5C13\n0F5CB3A7131F5C133F91C7FC137E485AEA07F0EAFFC000FCC8FC1D537ABD2A>I\nE\n%EndDVIPSBitmapFont\n%DVIPSBitmapFont: Fd cmti10 10 30\n/Fd 30 122 df<EE3FFC4BB51280923907E007C092391F8001E0DB3F0013F0037E13034B\n1307A24A5A18E04A48EB038094C7FCA314075DA4140F5DA3010FB7FCA25F903A001F8000\n7EA217FE023F5C92C7FCA216015F5C147E16035FA214FE4A13075FA30101140F5F4AECC1\nC0A2161F1783010316805CA2EF870013074A5CEE0F8EEE079EEE03FC010FEC00F04A91C7\nFCA35C131FA2001C90CAFC127E5BEAFE3E133C137CEAF878EA78F0EA3FE0EA0F80344C82\nBA2F>12 D<150C151C153815F0EC01E0EC03C0EC0780EC0F00141E5C147C5C5C495A1303\n495A5C130F49C7FCA2133EA25BA25BA2485AA212035B12075BA2120F5BA2121FA290C8FC\nA25AA2123EA2127EA2127CA412FC5AAD1278A57EA3121C121EA2120E7EA26C7E6C7EA212\n001E5274BD22>40 D<140C140E80EC0380A2EC01C015E0A2140015F0A21578A4157C153C\nAB157CA715FCA215F8A21401A215F0A21403A215E0A21407A215C0140F1580A2141F1500\nA2143EA25CA25CA2495AA2495A5C1307495A91C7FC5B133E133C5B5B485A12035B48C8FC\n120E5A12785A12C01E527FBD22>I<EA03C0EA07F0120F121F13F8A313F0EA07B0EA0030\n13701360A213E013C01201EA038013005A120E5A5A5A5A5A0D197A8819>44\nD<120EEA3F80127F12FFA31300127E123C0909778819>46 D<EE01C01603A21607160FA2\n161F83163FA2167F16FF16EF150116CFED038FA2ED070FA2150E151E151C1538A203707F\nA2EDE007A2EC01C014031580EC0700A2140EA25CA25C027FB5FCA291B6FC9139E00007F8\n49481303A2495A130791C7FC5B130E5BA25B1378137013F0EA03F8486C4A7EB56C48B512\nF0A3343C7BBB3E>65 D<003FB539800FFFFEA326007F80C7EA7F8091C8EA3F00173E4915\n3CA2491538A20001167817705BA2000316F05F5BA2000715015F5BA2000F15035F5BA200\n1F150794C7FC5BA2003F5D160E5BA2007F151E161C90C8FCA2163C4815385A16781670A2\n16F04B5A5E1503007E4A5A4BC8FC150E6C143E6C6C5B15F0390FC003E03907F01FC00001\nB5C9FC38007FFCEB1FE0373B70B83E>85 D<14F8EB07FE90381F871C90383E03FE137CEB\nF801120148486C5A485A120FEBC001001F5CA2EA3F801403007F5C1300A21407485C5AA2\n140F5D48ECC1C0A2141F15831680143F1587007C017F1300ECFF076C485B9038038F8E39\n1F0F079E3907FE03FC3901F000F0222677A42A>97 D<133FEA1FFFA3C67E137EA313FE5B\nA312015BA312035BA31207EBE0F8EBE7FE9038EF0F80390FFC07C013F89038F003E013E0\nD81FC013F0A21380A2123F1300A214075A127EA2140F12FE4814E0A2141F15C05AEC3F80\nA215005C147E5C387801F8007C5B383C03E0383E07C0381E1F80D80FFEC7FCEA01F01C3B\n77B926>I<147F903803FFC090380FC1E090381F0070017E13784913383901F801F83803\nF003120713E0120FD81FC013F091C7FC485AA2127F90C8FCA35A5AA45AA3153015381578\n007C14F0007EEB01E0003EEB03C0EC0F806CEB3E00380F81F83803FFE0C690C7FC1D2677\nA426>I<ED01F815FFA3150316F0A21507A216E0A2150FA216C0A2151FA21680A2153FA2\n02F81300EB07FE90381F877F90383E03FF017C5BEBF80112013803F00048485B120FEBC0\n01121F5DEA3F801403127F01005BA214075A485CA2140FA248ECC1C0A2141F15C3ED8380\n143F1587007C017F1300ECFF076C485B9038038F8E391F0F079E3907FE03FC3901F000F0\n253B77B92A>I<147F903803FFC090380FC1E090383F00F0017E13785B485A485A485A12\n0F4913F8001F14F0383F8001EC07E0EC1F80397F81FF00EBFFF891C7FC90C8FC5A5AA55A\nA21530007C14381578007E14F0003EEB01E0EC03C06CEB0F806CEB3E00380781F83803FF\nE0C690C7FC1D2677A426>I<ED07C0ED1FF0ED3E38ED7C3CEDF8FC15F9140115F1020313\nF8EDF0F0160014075DA4140F5DA4141F5D010FB512C05B16809039003F800092C7FCA45C\n147EA414FE5CA413015CA413035CA413075CA4130F5CA3131F5CA391C8FC5B121CEA7E3E\nA2EAFE3C137C1378EAF8F01278EA3FC0EA0F80264C82BA19>I<EC07C0EC3FF09138FC38\nE0903901F01FF0EB03E0903807C00FEB0F80011F1307D93F0013E05B017E130F13FE4914\nC01201151F1203491480A2153F1207491400A25DA249137EA215FEA25D00031301140314\n076C6C485A0000131FEB787BEB3FF390380FC3F0EB00031407A25DA2140F5D121C007E13\n1F5D00FE49C7FC147E5C387801F8387C07E0381FFF80D803FEC8FC24367CA426>I<EB03\nF0EA01FFA3EA00075CA3130F5CA3131F5CA3133F91C8FCA35B90387E07F0EC1FFCEC783E\n9038FFE01F02C01380EC800F1400485A16C05B49EB1F8012035BA2153F000715005BA25D\n000F147E5B15FE5D121FD98001131C15F8163C003F01031338010013F0A216704814E000\n7E15F016E0EDE1C000FE903801E38048903800FF000038143C263B7BB92A>I<EB01C0EB\n07E014F0130F14E01307EB038090C7FCAB13F0EA03FCEA071EEA0E1F121CA212385B1270\nA25BEAF07E12E013FEC65AA212015B1203A25B12075BA2000F13E013C013C1001F13C013\n81A2EB83801303EB0700A2130E6C5AEA07F8EA01E0143879B619>I<EB03F0EA01FFA3EA\n00075CA3130F5CA3131F5CA3133F91C8FCA35B017EEB0F80ED3FE015F09039FE01C1F090\n38FC0387EC0707140E0001011C13E0EBF83891383003800270C7FC00035BEBF1C0EBF380\n01FFC8FCEA07FC7FEBFFC0EBE7F8380FE1FCEBC07E147F80001F809039801F81C0A21583\n003F013F138001001303A21507481500007E133EEC1E0E151E00FE6D5A48EB07F80038EB\n01E0243B7BB926>107 D<EB0FC0EA07FFA3EA001F1480A2133FA21400A25BA2137EA213\nFEA25BA21201A25BA21203A25BA21207A25BA2120FA25BA2121FA25BA2123FA290C7FCA2\n5AA2EA7E0EA212FE131EEAFC1CA2133C133812F81378EA7870EA7CE0121FEA0F80123B79\nB915>I<D801E001FEEB07F03C07F803FF801FFC3C0E3C0F07C0783E3C1E3E3C03E1E01F\n261C1F78D9F3C013803C383FF001F7800F02E01400007801C013FE007018C002805B4A48\n48EB1F80EAF07FD8E07E5CA200000207143F01FE1700495CA2030F5C0001177E495C18FE\n031F5C120349DA8001131C18F8033F153C00070403133849020013F0A24B1570000F17E0\n49017E15F019E003FEECE1C0001FEE01E34949903800FF000007C70038143C3E2679A444\n>I<D801E013FE3A07F803FF803A0E3C0F07C03A1E3E3C03E0261C1F787F39383FF00114\nE0007813C000708114804A485AEAF07FEAE07EA20000140701FE5C5BA2150F00015D5B15\n1F5E12034990383F8380160316070007027F130049137EA2160E000F147C49141E161C5E\n001FEC3C7849EB1FE00007C7EA0780292679A42F>I<147F903803FFC090380FC1F09038\n1F00F8017E137C5B4848137E4848133E0007143F5B120F485AA2485A157F127F90C7FCA2\n15FF5A4814FEA2140115FC5AEC03F8A2EC07F015E0140F007C14C0007EEB1F80003EEB3F\n00147E6C13F8380F83F03803FFC0C648C7FC202677A42A>I<9039078007C090391FE03F\nF090393CF0787C903938F8E03E9038787FC00170497EECFF00D9F0FE148013E05CEA01E1\n13C15CA2D80003143FA25CA20107147FA24A1400A2010F5C5E5C4B5A131F5EEC80035E01\n3F495A6E485A5E6E48C7FC017F133EEC70FC90387E3FF0EC0F8001FEC9FCA25BA21201A2\n5BA21203A25B1207B512C0A3293580A42A>I<3903C003F0390FF01FFC391E783C0F381C\n7C703A3C3EE03F8038383FC0EB7F800078150000701300151CD8F07E90C7FCEAE0FE5BA2\n120012015BA312035BA312075BA3120F5BA3121F5BA3123F90C9FC120E212679A423>\n114 D<14FE903807FF8090380F83C090383E00E04913F00178137001F813F00001130313\nF0A215E00003EB01C06DC7FC7FEBFFC06C13F814FE6C7F6D13807F010F13C01300143F14\n1F140F123E127E00FE1480A348EB1F0012E06C133E00705B6C5B381E03E06CB45AD801FE\nC7FC1C267AA422>I<EB0380EB07C0130FA4131F1480A3133F1400A35B137E007FB5FCA2\nB6FC3800FC00A312015BA312035BA312075BA3120F5BA3121FEB801CA2143C003F1338EB\n0078147014F014E0EB01C0EA3E03381F0780380F0F00EA07FCEA01F0183579B31C>I<13\nF8D803FEEB01C0D8078FEB03E0390E0F8007121E121C0038140F131F007815C01270013F\n131F00F0130000E015805BD8007E133FA201FE14005B5D120149137EA215FE120349EBFC\n0EA20201131E161C15F813E0163CD9F003133814070001ECF07091381EF8F03A00F83C78\nE090393FF03FC090390FC00F00272679A42D>I<01F0130ED803FC133FD8071EEB7F80EA\n0E1F121C123C0038143F49131F0070140FA25BD8F07E140000E08013FEC6485B150E1201\n5B151E0003141C5BA2153C000714385B5DA35DA24A5A140300035C6D48C7FC0001130E38\n00F83CEB7FF8EB0FC0212679A426>I<01F01507D803FC903903801F80D8071E903907C0\n3FC0D80E1F130F121C123C0038021F131F49EC800F00701607A249133FD8F07E168000E0\nED000313FEC64849130718000001147E5B03FE5B0003160E495BA2171E00070101141C01\nE05B173C1738A217781770020314F05F0003010713016D486C485A000190391E7C078028\n00FC3C3E0FC7FC90393FF81FFE90390FE003F0322679A437>I<903907E007C090391FF8\n1FF89039787C383C9038F03E703A01E01EE0FE3803C01F018013C0D8070014FC48148000\n0E1570023F1300001E91C7FC121CA2C75AA2147EA214FEA25CA21301A24A1370A2010314\nF016E0001C5B007E1401010714C000FEEC0380010F1307010EEB0F0039781CF81E903838\n7C3C393FF03FF03907C00FC027267CA427>I<13F0D803FCEB01C0D8071EEB03E0D80E1F\n1307121C123C0038140F4914C01270A249131FD8F07E148012E013FEC648133F16001201\n5B5D0003147E5BA215FE00075C5BA214015DA314035D14070003130FEBF01F3901F87FE0\n38007FF7EB1FC7EB000F5DA2141F003F5C48133F92C7FC147E147C007E13FC387001F8EB\n03E06C485A383C1F80D80FFEC8FCEA03F0233679A428>I E\n%EndDVIPSBitmapFont\n%DVIPSBitmapFont: Fe cmitt10 10 24\n/Fe 24 122 df<EA0F80EA1FC0EA3FE0127FA212FFA3EA7FC0EA3F80EA1E000B0B6F8A2C\n>46 D<1738177C177E17FEEE01FC160317F8EE07F0EE0FE0A2EE1FC0EE3F80A2EE7F0016\nFEA24B5A4B5AA24B5A4B5A151F5E4B5A4BC7FCA215FE4A5AA24A5A4A5AA24A5A4A5A143F\n5D4AC8FC14FEA2495A495AA2495A495AA2495A495A137F91C9FC13FE485AA2485A485AA2\n485A485AA2485A48CAFC5A5A5A5A12702F417CB92C>I<D907FEEC3FE0496CEC7FF017FF\n6F5A6D16E00101913803FE0002F714BE16070103EC0F7E177C02E7131F161E0107EC3EFC\nEE3CF802C7137C16F8010F14F9923881F1F0028713E11583011FEBC3C303C75B02071383\n15CF013F140703DF5B013E139E15BC017EEBFC0F03F85B137CEC03F001FCEBE01FDA01C0\n90C7FC49C7FCA200015D163E5BA20003157E167C5BA2000715FC5ED87FF8EB0FFF6D8100\nFF5C007F804992C7FC34337FB22C>77 D<EB03F090380FFC7890383FFFFC5B90B5FC3801\nFE1F48486C5AEA07F8380FF00713E0D81FC05B1380123F1300485C127EA2140F12FE485C\nA291381FC180ED87E0143FA2EC7F8F9138FF0FC05B6C5AD87E07EB1F80D87F0F133F6CB6\n12006C13DFEC8FFE3907FE07FC3901F801F0232476A32C>97 D<EA7FF8487EA3127F1201\n5BA21203A25BA21207A25BEBE1FC380FE7FF90B5128015C015E048130F9038FC07F0EBF8\n039038F001F8EA3FE013C01380A2EA7F00A2127EA2140312FE4814F0A2140715E0140F15\nC0141FEC3F80EC7F00007E5B387F01FE383F87FCEBFFF86C5B6C13C06C90C7FCEA01FC1D\n3375B22C>I<EC7F80903803FFE0010F13F8013F13FC5B9038FFC1FE3801FE003803FC01\nEA07F8EA0FF001E013FCEA1FC0393F80007090C8FCA2127EA312FE5AA77E007E141C007F\n143E6C6C13FEEBC00F6CB5FC6C14FC6C14F0000114C039007FFE001F2475A32C>I<9138\n03FF804A13C0A380EC001F1680A2153FA21600A25DA2157EEB03F090380FFCFEEB3FFF49\n5B90B5FC3801FE1F3803FC0FD807F85B380FF00713E0EA1FC001805B123F13005A007E5C\nA2140F12FE485CA291381FC180EDC7E0EC3F87A2EC7F8F02FF13C049130F6C5AD87E07EB\n1F80D87F0F133F6CB612006C13DFEC8FFE3907FE07FC3901F801F0233376B22C>I<147F\n903803FFC0010F13F0013F13F84913FCEBFFC13801FE004848137E485AD80FE013FE15FC\n485A383F800190380007F848133F90B512F015E01580B5EAFE0014F000FCC8FCA6127E15\n1C007F143E6C6C13FEEBC00F6CB5FC6C14FC6C14F0000114C039007FFE001F2475A32C>\nI<ED03FCED1FFF4B13C05D17E0EDFE1F15FCA30201EB0FC09238F8078093C7FCA40103B5\n12F8825B7F5E90260007F0C7FC5DA5140F5DA5141F5DA5143F92C8FCA45C147EA514FE5C\nA313015CA31303001C5B127F130700FF5B130F495AEBFF807E6C90C9FCEA1FFCEA07F02B\n457DB22C>I<EC07F091381FFC7891387FFEFC49B5FC5B903807FC3F90380FF01F90391F\nE00FF8ECC007EB3F80EB7F00017E14F013FE5B12014914E0A2150F12034914C0A2151FA2\nED3F80A2157F15FF4A13006C6C5A6D5A3800FE1F90B55A7F7FEB1FFC903807F0FC90C7FC\n1401A25DA21403A25D003C1307007E495AB4131F4A5A49B45A90B5C7FC5C6C13F86C13E0\n000F90C8FC26367BA32C>I<140FEC1F80EC3FC0A4EC1F80EC0F0091C7FCA8133FEBFFC0\n000313F05A487FEA1FE1EA3FC11381EA7F01127EEAFE0300FC5B13075C1200130F5C131F\nA25C133FEC0060EC01F8137F137EEBFE0301FC13F01407EC0FE0141FEC3FC090B512806D\n13005CEB1FF8EB07E01D3475B32C>105 D<EA0FFF487FA37EEA003F91C8FCA25BA2137E\nA213FEA25BED1F800001EC7FC0913801FFE0495A4A13F00003EB0FF3EC1FC39038F03F87\nEC7F0F0007EBFE1FEBF1FC9039E3F80FE0D9E7F013C03A0FFFE007804AC7FC5CA24813E0\n14F880EBBFFE263F81FF13609039807F01F8EB003F1581481483ED03F0127E150700FE15\nE0ED8FC048EB1FFF16806E1300486D5A0070EB01F8253378B22C>107\nD<EA7FFFB51280A37EEA003F1400A25BA2137EA213FEA25BA21201A25BA21203A25BA212\n07A25BA2120FA25BA2121FA25BA2003F1318147E1300A24813FE14FC127EEB01F8130338\n7F87F0EA3FFF6C13E06C13C06C1300EA01FE173370B22C>I<D9707E137E903A79FF81FF\n8090B500C713C015CF92B512E002C313C348018313830203EB03F001FE13FE01FC01FC13\nE0120301F813F8A29039F007F007000716C0A201E013E0000F010F130F01C001C01380A2\n001F011F131F018001801300A25E003F013F133E01001300167E167C485B007E137EA216\n7F00FE13FE4849EB3F80170000780178130F2C247DA32C>I<3901F007F03907F81FFC39\n0FFC7FFE486CB5FC48B6128090383FFE1F14F8007E13F014E0EB7FC012FE00FC13801400\n49133FC6481400A348485B157EA24913FE0003ECFC18167EEBF00115F8000715FE020313\nFC01E013F015F1000F15F8EDF3F001C013FF6E13E016C0496C13806CC7EA3E0027247AA3\n2C>I<14FE903807FF80011F13E04913F090B5FC48EB83F83903FE01FCEBF800485A4848\n137E485AA2485A90C7FC5A127EA215FE12FE4814FCA2140115F81403EC07F0A2EC0FE000\n7EEB1FC0EC3F80007F13FFD83F8313006CB45A14F86C5B000313C0C648C7FC1F2476A32C\n>I<903907C00FC090391FF03FF090393FF8FFFCEB7FFD91B57E9039FE7FF87F01FC497E\nD801F801E01380EDC01FECFF8000031400495AA2EBF1FCEA00015CA20103143FA24A1400\nA201075C167E16FE5E010F13014B5A15076E485A011F495A6E485A91B55A93C7FC495BEC\n9FF8EC07E091C9FC5BA2137EA213FEA25BA21201A25BA2387FFFE0A2B57E6C5BA2293680\nA32C>I<D801F8EBFF802607FE0313E0260FFF0F13F848019F13FC91B512FED83F9F1381\n90390FFE007E007E49137F4A13FF49485A12FC9138E000FE16FC49481378000015005CA2\n49C8FCA3137E13FEA25BA21201A25BA21203A25BA35B6C5A282479A32C>114\nD<ECFFE0010713FC011F7F497F4914809038FF807FEBFC00485A5BA20003EC3F00151C6C\n6C90C7FC13FEEBFFF86C13FF6D13C0011F13F001077F9038003FFC1401EC007EA2001C14\n3E127F157E48147C15FC140148495A39FF803FF06CB55A6C5C6C5C000749C7FCC613E021\n2478A32C>I<EB01E0497EA31307A25CA2130FA25CA2131FA25C007FB5128015C0B6FC7E\n1580C66CC7FCA2137EA213FEA25BA21201A25BA21203A25BA2000714C0EC03F013E0A200\n0F1307EC0FE0EBC01FEC3FC0EC7F809038E1FF006CB45A5C6C5B6C13E06C6CC7FC1C3374\nB22C>I<01F8EB01C0D803FEEB03E0486C13075A481380D83F9F130F131F007F15C0127E\n013F131F00FE130000FC15805B017E133F120001FE14005B5D120149137EA2EDFE180003\n157E9038F001FCA2140316FE913807F8FC140F9038F81FF92601FC3F13F890B6FC6C15F0\n90397FFE7FE090393FF83FC090390FE00F8027247AA32C>I<003C903803800E003FECC0\n1F267F8007EB3F80123F01C0141F0007130F1580A3141F000F020013001380A2001F495B\nD9003E133E5A123E027E137E007E157C007C137CA202FC13FC00FC5D485B010113015EA2\n0103130300FC01FC5BD87C0713073A7E0FFE0FC0007FB6FC6C01BF5B6C011F90C7FC6C48\n6C5A3903F803F8292479A32C>119 D<90391FC01F809039FFF07FE0489038F9FFF80007\n90B5FC4815FCD81FF013F03A3FC07FE07E9039803FC0FED87F001381007E148300FE1403\n48EC01FC16F891387F00F0C71400147EA214FEA25CA201011418001E157E003F5B127F01\n8314FE00FF15FC01031301D8FE07EB03F839FC0FFC073A7E1FFE1FF0007FB612E06C15C0\n023F1300390FFC1FFE3903F007F027247AA32C>I<017E143848B46C137C486D13FC5A48\n7FD81FC71301D83F8714F81307127FD87E0F130300FE01C013F012FC131FEC8007000015\nE0133F1400150F4914C0137E151FA201FE148049133FA2157F16005D5CEB7E0390387F0F\nFE14FF7F7F6D5BEB01FC90C7FC14015DA21403D807805B380FC007486C485A4A5AA29038\nC07F804AC7FCEB83FEEBFFFC6C5B6C13E06C5BC648C8FC26367AA32C>I\nE\n%EndDVIPSBitmapFont\n%DVIPSBitmapFont: Ff cmtt10 10 75\n/Ff 75 126 df<010F133C90381F807EA8013F13FE4A5AA4007FB612F0B712F8A4003F15\nF03A007E01F800A5EBFE0301FC5BA6003FB612F0B712F8A46C15F03A01F807E000A30003\n130F01F05BA86C486C5A25337DB22C>35 D<EB01C0497EA6EB0FFC90387FFF8048B512E0\n0007804880391FFBEFFC393FC3E1FE903803E07F007E80127C00FC158012F8157FA300FC\nEC3F00A2007E91C7FC127FEA3FC313FBEA1FFF6C13FC6C13FF000114C06C6C7F011F13F8\n01037F14E7ECE1FEECE07F81001880007E1580150F12FFA312FE151F1600007E5C007F14\n3ED83F8313FE9038C3E1FC391FFBEFF86CB55A6C5C6C5CC691C7FCEB1FF8EB03E0A66D5A\n21417BB92C>I<143814FC13011303EB07F8EB0FF0EB1FC0EB3F80EB7F0013FE485A485A\n5B12075B120F5B485AA2123F90C7FCA25A127EA312FE5AAC7E127EA3127F7EA27F121FA2\n6C7E7F12077F12037F6C7E6C7E137FEB3F80EB1FC0EB0FF0EB07F8EB03FC130113001438\n164272B92C>40 D<127012FC7E7E6C7E6C7EEA0FE06C7E6C7E6C7E6C7E137F7F1480131F\n14C0130FEB07E0A214F01303A214F81301A314FC1300AC130114F8A3130314F0A2130714\nE0A2EB0FC0131F1480133F14005B13FE485A485A485A485AEA3FC0485A48C7FC5A5A1270\n164279B92C>I<EB0380497EA60020140800F8143E00FE14FE00FF13C1EBC7C7EBE7CF00\n3FB512F8000F14E0000314806C140038007FFCA248B5FC481480000F14E0003F14F839FF\nE7CFFEEBC7C7EB07C100FE13C000F8143E0020140800001400A66D5A1F247AAA2C>I<EA\n0F80EA1FE0EA3FF0EA7FF8A213FCA3123F121F120F120013F8A21201EA03F01207EA1FE0\nEA7FC0EAFF80130012FC12700E17718A2C>44 D<007FB6FCB71280A46C150021067B9B2C\n>I<121FEA3F80EA7FC0EAFFE0A5EA7FC0EA3F80EA1F000B0B708A2C>I<1507ED0F80151F\nA2153F16005D157E15FE5D14015D14035DA214075D140F5D141F5D143F92C7FC5C147E14\nFE5CA213015C13035C13075C130F5C131F5CA2133F91C8FC5B137E13FE5B12015B12035B\n12075BA2120F5B121F5B123F90C9FC5A127E12FE5AA25A127821417BB92C>I<1307497E\nA2131FA2133F137F13FF5A1207127FB5FC13DF139FEA7C1F1200B3AE007FB512E0B612F0\nA36C14E01C3477B32C>49 D<EB0FF890387FFF8048B512E00007804814FC391FF80FFE39\n3FE001FF903880007F48C7EA3F80007E141F00FE15C0150F6C15E01507A3127E123CC8FC\nA2150F16C0151F1680153F16005D15FE4A5A14034A5A4A5A4A5A4A5AECFF804948C7FC49\n5A495A495AEB3FE0EB7F8049C8FC485A4848EB03C04848EB07E0EA1FE0485A48B6FCB7FC\nA36C15C023347CB32C>I<EB0FFC90387FFF8048B512E0000714F84880391FF807FEEBC0\n004848137F6D7F1680151FA26C5A6CC7FCC8FC153F16005D15FE14014A5AEC1FF890381F\nFFF0495BA215F86D7F90380007FEEC00FF81ED3F80ED1FC0150FA216E01507A2123C127E\nB4FC150F16C0A248141F007FEC3F806DEB7F006C6C5B391FF807FE6CB55A6C5C6C14E0C6\n6C1380D90FFCC7FC23357CB32C>I<EC07F04A7E141F143FA2147EA214FCEB01F8A2EB03\nF0EB07E0A2EB0FC0EB1F80A2EB3F00137EA25B485AA2485A5B1207485AA2485A48C7FCA2\n127E5AB712FC16FEA36C15FCC8EAF800AA91387FFFF091B512F8A36E13F027347EB32C>\nI<000FB512FE4880A35D0180C8FCADEB83FE90389FFF8090B512E015F8819038FE03FE90\n38F000FF01C07F49EB3F8090C7121F6C15C0C8120FA2ED07E0A4123C127EB4FC150F16C0\nA248141F007EEC3F80007FEC7F006C6C5B6D485A391FF80FFC6CB55A6C5C000114C06C6C\n90C7FCEB0FF823347CB22C>I<1278B712C016E0A316C000FCC7EA3F80ED7F0015FE0078\n5CC712014A5A4A5A5D140F5D4A5A143F92C7FC5C147E14FE5C13015CA2495AA213075CA3\n495AA4495AA5133F91C8FCAA131E23357CB32C>55 D<EB07FC90383FFF8090B512E00003\n14F84880390FFC07FE391FF001FF9038C0007F4848EB3F8090C7121F4815C0007E140FA5\n6CEC1F80A26C6CEB3F006D5B390FF001FE3903FC07F86CB55A6C6C13C0D907FCC7FC9038\n7FFFC048B512F03903FC07F8390FF001FE391FC0007F497F48C7EA1F80007EEC0FC0A248\nEC07E0A7007EEC0FC0A2007F141F6C6CEB3F806C6CEB7F009038F001FF390FFC07FE6CB5\n5A6C5CC614E0013F1380D907FCC7FC23357CB32C>I<121FEA3F80EA7FC0EAFFE0A5EA7F\nC0EA3F80EA1F00C7FCAE121FEA3F80EA7FC0EAFFE0A5EA7FC0EA3F80EA1F000B2470A32C\n>58 D<EA0F80EA1FC0EA3FE0EA7FF0A5EA3FE0EA1FC0EA0F80C7FCAEEA0F80EA1FC0EA3F\nE0127F13F0A4123F121F120F1201120313E01207EA0FC0A2EA3F80EA7F005A5A12F81270\n0C3071A32C>I<007FB612F0B712F8A4003F15F0CAFCA8003FB612F0B712F8A46C15F025\n147DA22C>61 D<14FE497EA4497FA214EFA2130781A214C7A2010F7FA314C390381F83F0\nA590383F01F8A490387E00FCA549137E90B512FEA34880A29038F8003FA34848EB1F80A4\n000715C049130FD87FFEEBFFFC6D5AB514FE6C15FC497E27347EB32C>65\nD<007FB512E015F8B612FE6C8016C03903F0003FED0FE0ED07F01503A2ED01F8A6ED03F0\nA21507ED0FE0ED1FC0EDFF8090B612005D5D15FF16C09039F0001FE0ED07F0ED03F81501\nED00FCA216FE167EA616FE16FC1501ED03F8150FED3FF0007FB612E016C0B712806CECFE\n0015F027337FB22C>I<02FF13700107EBE0F84913F9013F13FD4913FFEBFF813901FE00\n7F4848131FD807F0130F1507485A491303485A150148C7FCA25A007EEC00F01600A212FE\n5AAB7E127EA3007F15F06CEC01F8A26C7EA26C6C13036D14F06C6C130716E0D803FC131F\n6C6CEB3FC03A00FF81FF806DB512006D5B010F5B6D13F00100138025357DB32C>I<007F\nB5FCB612C015F0816C803907E003FEEC00FFED7F80153FED1FC0ED0FE0A2150716F01503\n16F81501A4ED00FCACED01F8A3150316F0A2150716E0150FED1FC0153FED7F80EDFF00EC\n03FE007FB55AB65A5D15C06C91C7FC26337EB22C>I<007FB612F0B712F8A37E3903F000\n01A7ED00F01600A4EC01E04A7EA490B5FCA5EBF003A46E5A91C8FCA5163C167EA8007FB6\n12FEB7FCA36C15FC27337EB22C>I<007FB612F8B712FCA37ED803F0C7FCA716781600A5\n15F04A7EA490B5FCA5EBF001A46E5A92C7FCAD387FFFE0B5FC805C7E26337EB22C>I<90\n3901FC038090390FFF87C04913EF017F13FF90B6FC4813073803FC01497E4848137F4848\n133F49131F121F5B003F140F90C7FCA2127EED078092C7FCA212FE5AA8913803FFF84A13\nFCA27E007E6D13F89138000FC0A36C141FA27F121F6D133F120F6D137F6C7E6C6C13FF6D\n5A3801FF076C90B5FC6D13EF011F13CF6DEB0780D901FCC7FC26357DB32C>I<D87FFEEB\nFFFCB54813FEA36C486C13FCD807E0EB0FC0B190B6FCA59038E0000FB3D87FFEEBFFFCB5\n4813FEA36C486C13FC27337EB22C>I<007FB512F8B612FCA36C14F839000FC000B3B3A5\n007FB512F8B612FCA36C14F81E3379B22C>I<0107B512804914C0A36D148090390003F0\n00B3AF1218127EA2B4FCA24A5A48130F007F131F9038C07FC06CB55A6C91C7FC6C5B0003\n13F838007FC022347BB22C>I<D87FFCEB7FF8486CEBFFFCA36C48EB7FF8D807C0EB1F80\n153FED7F00157E5D4A5A14034A5A5D4A5A4A5A143F4AC7FC147E5CEBC1F813C3EBC7FCA2\nEBCFFEEBDFBEEBFFBF141F01FE7F496C7E13F86E7EEBF00301E07FEBC001816E7EA2157E\n153E153F811680ED0FC0A2ED07E0D87FFCEB1FFC486CEB3FFEA36C48EB1FFC27337EB22C\n>I<387FFFE0B57EA36C5BD803F0C8FCB3AE16F0ED01F8A8007FB6FCB7FCA36C15F02533\n7DB22C>I<D87FE0EB0FFC486CEB1FFEA26D133F007F15FC000F15E001BC137BA4019E13\nF3A3EB9F01A2018F13E3A21483A2018713C314C7A201831383A214EFA201811303A214FF\nEB80FEA3147C14381400ACD87FF0EB1FFC486CEB3FFEA36C48EB1FFC27337EB22C>I<D8\n7FF0EB7FFC486CEBFFFEA27F007FEC7FFCD807FEEB07C013DEA213DF13CFA2148013C714\nC0A213C314E0A213C114F0A213C014F8A2147CA3143EA2141E141FA2140F1587A2140715\nC7A2140315E71401A215F71400A215FFD87FFC137F487E153FA26C48EB1F8027337EB22C\n>I<EB7FFF0003B512E0000F14F848804880EBE003EB800048C7127FA2007E80A300FE15\n8048141FB3A86C143FA2007E1500A3007F5CA26C6C13FEEBF00790B5FC6C5C6C5C000314\nE0C66C90C7FC21357BB32C>I<007FB512C0B612F88115FF6C15802603F00013C0153FED\n0FE0ED07F0A2150316F81501A6150316F01507A2ED0FE0ED3FC015FF90B61280160015FC\n5D15C001F0C8FCB0387FFF80B57EA36C5B25337EB22C>I<EB7FFF0003B512E0000F14F8\n48804880EBF007EB800048C7127FA2007E80A300FE158048141FB3A7EB01F0EB03F800FE\n143F267E01FC1300A2EB00FE007F5C147FD83F8013FEEBF03F90B5FC6C5C6C5C000314E0\nC67E90380007F0A26E7EA26E7EA26E7EA2157FA2153E21407BB32C>I<387FFFFCB67E15\nE015F86C803907E007FE1401EC007F6F7E151FA26F7EA64B5AA2153F4BC7FCEC01FE1407\n90B55A5D15E081819038E007FCEC01FE1400157F81A8160FEE1F80A5D87FFEEB1FBFB5EC\nFF00815E6C486D5AC8EA01F029347EB22C>I<90381FF80790B5EA0F804814CF000714FF\n5A381FF01F383FC003497E48C7FC007E147F00FE143F5A151FA46CEC0F00007E91C7FC12\n7F7FEA3FE0EA1FFCEBFFC06C13FC0003EBFFC06C14F06C6C7F01077F9038007FFEEC07FF\n02001380153FED1FC0A2ED0FE0A20078140712FCA56CEC0FC0A26CEC1F806D133F01E0EB\n7F009038FE01FF90B55A5D00F914F0D8F83F13C0D8700790C7FC23357CB32C>I<007FB6\n12FCB712FEA43AFC007E007EA70078153CC71400B3AF90383FFFFCA2497F6D5BA227337E\nB22C>I<3B7FFF803FFFC0B56C4813E0A36C496C13C03B03F00001F800B3AF6D13030001\n5DA26D130700005D6D130F017F495A6D6C485AECE0FF6DB5C7FC6D5B010313F86D5B9038\n003F802B3480B22C>I<D87FFCEB7FFC486CEBFFFEA36C48EB7FFCD80FC0EB07E06D130F\n000715C0A36D131F00031580A36D133F00011500A36D5B0000147EA4017E5BA46D485AA4\n90381F83F0A4010F5B14C7A301075BA214EFA201035BA214FFA26D90C7FCA46D5A27347E\nB22C>I<D87FF0EB07FF486C491380A36C486D1300001FC8127CA46C6C5CA76C6C495AA4\n143E147FA33A03E0FF83E0A214F7A201E113C3A3000101E35BA201F113C701F313E7A314\nC1A200005DA201F713F71480A301FF13FF017F91C7FC4A7EA4013E133E29347FB22C>I<\n3A3FFF03FFE0484913F0148714076C6D13E03A01F800FE007F0000495A13FE017E5BEB7F\n03013F5B1487011F5B14CF010F5B14FF6D5BA26D90C7FCA26D5AA26D5AA2497EA2497EA2\n497F81EB0FCF81EB1FC7EC87F0EB3F83EC03F8EB7F01017E7FEBFE00497F0001147E4913\n7F000380491480151FD87FFEEBFFFC6D5AB514FE6C15FC497E27337EB22C>I<D87FFCEB\n7FFC486CEBFFFEA36C48EB7FFCD807F0EB0FC0151F000315806D133F12016DEB7F001200\n6D137E017E13FE017F5BEB3F01EC81F8131FEC83F0EB0FC314C7903807E7E0A201035B14\nEF6DB45AA292C7FC7F5C147EB0903807FFE0497FA36D5B27337EB22C>I<003FB612C048\n15E0A4007EC7EA1FC0ED3F80A2ED7F00157E15FE4A5A003C5CC712034A5AA24A5A4A5AA2\n4A5A4AC7FCA214FE495AA2495A495AA2495A495AA2495A49C8FCA213FE485AA24848EB03\nC049EB07E01207485A5B121F485AA248C7FCB7FCA46C15C023337CB22C>I<387FFFFCB5\n12FEA314FC00FCC7FCB3B3B3B512FC14FEA36C13FC17416FB92C>I<127812F87EA27E12\n7E127F7E7F121F7F120F7F1207A27F12037F12017F12007F137E137F7F80131FA280130F\n801307801303801301801300A280147E147F8081141F81140F811407811403A281140181\n140081157E157F811680151FA2150FED070021417BB92C>I<387FFFFCB512FEA37EC712\n7EB3B3B3387FFFFEB5FCA36C13FC17417DB92C>I<007FB6FCB71280A46C150021067B7D\n2C>95 D<3801FFF0000713FE001F6D7E15E048809038C01FF81407EC01FC381F80000006\nC77EC8127EA3ECFFFE131F90B5FC1203120F48EB807E383FF800EA7FC090C7FC12FE5AA4\n7E007F14FEEB8003383FE01F6CB612FC6C15FE6C14BF0001EBFE1F3A003FF007FC27247C\nA32C>97 D<EA7FF0487EA3127F1201AAEC1FE0ECFFF801FB13FE90B6FC16809138F07FC0\n9138801FE091380007F049EB03F85BED01FC491300A216FE167EA816FE6D14FCA2ED01F8\n6D13036DEB07F0150F9138801FE09138E07FC091B51280160001FB5B01F813F83900F03F\nC027337FB22C>I<903803FFE0011F13F8017F13FE48B5FC48804848C6FCEA0FF0485A49\n137E4848131890C9FC5A127EA25AA8127EA2127F6C140F6DEB1F806C7E6D133F6C6CEB7F\n003907FE03FF6CB55A6C5C6C6C5B011F13E0010390C7FC21247AA32C>I<EC0FFE4A7EA3\n80EC003FAAEB07F8EB3FFE90B512BF4814FF5A3807FC0F380FF00348487E497E48487F90\nC7FC007E80A212FE5AA87E007E5CA2007F5C6C7E5C6C6C5A380FF0073807FC1F6CB612FC\n6CECBFFE6C143FEB3FFC90390FF01FFC27337DB22C>I<EB03FE90381FFFC0017F13F048\nB57E48803907FE03FE390FF800FFD81FE0EB3F805B4848EB1FC090C7120F5A007E15E015\n075AB7FCA416C000FCC9FC7E127EA2127F6CEC03C06DEB07E06C7ED80FF0130F6C6CEB3F\nC001FF13FF000190B512806C1500013F13FC010F13F00101138023247CA32C>I<EC0FF8\nEC3FFE91B5FC4914805B903807FC7F14F090390FE03F0014C092C7FCA6007FB512FEB7FC\nA36C5C26000FC0C7FCB3A8003FB512F04880A36C5C21337DB22C>I<ED03F8903907F80F\nFC90391FFE3FFE017FB6FC48B7FC48ECFE7F9038FC0FF82607F003133E3A0FE001FC1CD9\nC0001300001F8049137EA66D13FE000F5CEBE0016C6C485A3903FC0FF048B5FC5D481480\nD99FFEC7FCEB87F80180C8FCA37F6C7E90B512F06C14FE48ECFF804815E04815F03A3FC0\n001FF848C7EA03FC007E1400007C157C00FC157E48153EA46C157E007E15FCD87F801303\nD83FE0EB0FF8D81FFCEB7FF06CB612E0000315806C1500D8003F13F8010713C028387EA4\n2C>I<EA7FF0487EA3127F1201AAEC1FE0EC7FFC9038F9FFFE01FB7F90B6FC9138F03F80\nECC01F02807FEC000F5B5BA25BB3267FFFE0B5FCB500F11480A36C01E0140029337FB22C\n>I<1307EB1FC0A2497EA36D5AA20107C7FC90C8FCA7387FFFC080B5FC7EA2EA0007B3A8\n007FB512FCB612FEA36C14FC1F3479B32C>I<EA7FE0487EA3127F1201AA91381FFFF04A\n13F8A36E13F0913800FE004A5A4A5A4A5A4A5A4A5A4A5A4AC7FC14FEEBF1FC13F3EBF7FE\n90B5FCA2EC9F80EC0FC001FE7FEBFC07496C7E496C7E811400157E811680151F3A7FFFC0\nFFFCB500E113FEA36C01C013FC27337EB22C>107 D<387FFFE0B57EA37EEA0003B3B3A5\n007FB61280B712C0A36C158022337BB22C>I<3A7F83F007E09039CFFC1FF83AFFDFFE3F\nFCD87FFF13FF91B57E3A07FE1FFC3E01FCEBF83F496C487E01F013E001E013C0A301C013\n80B33B7FFC3FF87FF0027F13FFD8FFFE6D13F8D87FFC4913F0023F137F2D2481A32C>I<\n397FF01FE039FFF87FFC9038F9FFFE01FB7F6CB6FC00019038F03F80ECC01F02807FEC00\n0F5B5BA25BB3267FFFE0B5FCB500F11480A36C01E0140029247FA32C>I<EB07FCEB1FFF\n017F13C048B512F048803907FC07FC390FF001FE48486C7E0180133F003F158090C7121F\n007EEC0FC0A348EC07E0A76C140F007E15C0A2007F141F6C15806D133F6C6CEB7F006D5B\n6C6C485A3907FC07FC6CB55A6C5C6C6C13C0011F90C7FCEB07FC23247CA32C>I<397FF0\n1FE039FFF8FFF801FB13FE90B6FC6C158000019038F07FC09138801FE091380007F049EB\n03F85BED01FC491300A216FE167EA816FE6D14FCA2ED01F86D13036DEB07F0150F913880\n1FE09138E07FC091B51280160001FB5B01F813F8EC3FC091C8FCAD387FFFE0B57EA36C5B\n27367FA32C>I<903903FC078090391FFF0FC0017F13CF48B512EF4814FF3807FE07380F\nF00148487E49137F4848133F90C7FC48141F127E150F5AA87E007E141FA26C143F7F6C6C\n137F6D13FF380FF0033807FC0F6CB6FC6C14EF6C6C138F6D130FEB07F890C7FCAD0203B5\nFC4A1480A36E140029367DA32C>I<D87FFEEB3FC0B53801FFF0020713F8021F13FC6C5B\n39003F7FE1ECFF019138FC00F84A13704A13005CA25C5CA391C8FCAF007FB512E0B67EA3\n6C5C26247EA32C>I<90387FF8700003B512F8120F5A5A387FC00F387E00034813015AA3\n6CEB00F0007F140013F0383FFFC06C13FE6CEBFF80000314E0C66C13F8010113FCEB0007\nEC00FE0078147F00FC143F151F7EA26C143F6D133E6D13FE9038F007FC90B5FC15F815E0\n00F8148039701FFC0020247AA32C>I<131E133FA9007FB6FCB71280A36C1500D8003FC8\nFCB1ED03C0ED07E0A5EC800F011FEB1FC0ECE07F6DB51280160001035B6D13F89038003F\nE0232E7EAD2C>I<3A7FF003FF80486C487FA3007F7F0001EB000FB3A3151FA2153F6D13\n7F3900FE03FF90B7FC6D15807F6D13CF902603FE07130029247FA32C>I<3A7FFF01FFFC\nB514FE148314016C15FC3A03E0000F80A26D131F00011500A26D5B0000143EA26D137E01\n7C137CA2017E13FC013E5BA2EB3F01011F5BA21483010F5BA214C701075BA214EF01035B\nA214FF6D90C7FCA26D5A147C27247EA32C>I<D87FFFEB7FFF6EB5FCB515806C16004A7E\nD807C0EB01F0A66C6C495AA3143E147FA2D801F0495AECFF87A214F7A201F113C700005D\n9038F9E3CFA201FB13EFA3D97BC190C7FC017F13FFA21480A2013F5B90381F007C29247F\nA32C>I<3A3FFF03FFF048018713F8A36C010313F03A00FC007E005D90387E01F8013F5B\nEB1F83EC87E090380FCFC0903807EF80EB03FF6D90C7FC5C6D5A147C14FE130180903803\nEF80903807CFC0EB0FC7EC83E090381F01F0013F7FEB7E00017C137C49137E0001803A7F\nFF01FFFC1483B514FE6C15FC140127247EA32C>I<3A7FFF01FFFCB5008113FE14831481\n6C010113FC3A03E0000F806C7E151F6D140012005D6D133E137C017E137E013E137CA201\n3F13FC6D5BA2EB0F815DA2EB07C1ECC3E0A2EB03E3ECE7C0130114F75DEB00FFA292C7FC\n80A2143EA2147E147CA214FC5CA2EA0C01003F5BEA7F83EB87E0EA7E0F495A387FFF806C\n90C8FC6C5A6C5AEA07E027367EA32C>I<15FF02071380141F147F91B512004913C04AC7\nFCEB03F85CB31307EB1FE013FF007F5BB55A49C8FC6D7E6C7FC67F131FEB07F01303B380\nEB01FEECFFC06D13FF6E1380141F14070200130021417BB92C>123\nD<EA7FC0EAFFF813FE6D7E6C7FC67F131FEB07F01303B380EB01FEECFFC06D13FF6E1380\n141F147F91B512004913C04AC7FCEB03F85CB31307EB1FE013FF007F5BB55A49C8FC13F8\nEA7FC021417BB92C>125 D E\n%EndDVIPSBitmapFont\n%DVIPSBitmapFont: Fg cmr10 10 79\n/Fg 79 125 df<DA0FF813FC91397FFF07FF903B01F807DF83C0903A07E001FF0F903B1F\n8007FE1FE090393F000FFC137E16F85B9338F007804848010790C7FC1503ACB812F8A328\n01F80003F0C7FCB3AB486C497E267FFFE0B512F0A3333B7FBA30>11\nD<EC0FF8EC7FFE903901F80780903907E001C090391F8000E090383F0007017E497EA25B\nA2485A6F5AED018092C8FCA9ED03F0B7FCA33901F8000F1503B3AA486C497E267FFFE0B5\n12C0A32A3B7FBA2E>I<EC0FFC91387FFF70903901F803F0903807E00790381F800FEB3F\n00137EA25B150748481303ADB7FCA33901F80003B3AB486C497E267FFFE0B512C0A32A3B\n7FBA2E>I<DA0FF0EB1FF0DA7FFEEBFFFC903B01F80F83F00F903C07E001CFC00380903C\n1F8000FF0001C090273F0007FE130F017E4948497EA2495CA248485C03076E5A03030203\nC7FC95C8FCA9F007E0BAFCA33C01F80003F0001F1807B3AA486C496C497E267FFFE0B500\nC1B51280A3413B7FBA45>I<001C131C007F137F39FF80FF80A26D13C0A3007F137F001C\n131C00001300A40001130101801380A20003130301001300485B00061306000E130E485B\n485B485B006013601A197DB92A>34 D<121C127FEAFF80A213C0A3127F121C1200A41201\n1380A2120313005A1206120E5A5A5A12600A1979B917>39 D<146014E0EB01C0EB0380EB\n0700130E131E5B5BA25B485AA2485AA212075B120F90C7FCA25A121EA2123EA35AA65AB2\n127CA67EA3121EA2121F7EA27F12077F1203A26C7EA26C7E1378A27F7F130E7FEB0380EB\n01C0EB00E01460135278BD20>I<12C07E12707E7E7E120F6C7E6C7EA26C7E6C7EA21378\nA2137C133C133E131EA2131F7FA21480A3EB07C0A6EB03E0B2EB07C0A6EB0F80A31400A2\n5B131EA2133E133C137C1378A25BA2485A485AA2485A48C7FC120E5A5A5A5A5A13527CBD\n20>I<121C127FEAFF80A213C0A3127F121C1200A412011380A2120313005A1206120E5A\n5A5A12600A19798817>44 D<B512FCA516057F941C>I<121C127FEAFF80A5EA7F00121C\n0909798817>I<150C151E153EA2153C157CA2157815F8A215F01401A215E01403A215C0\n1407A21580140FA215005CA2141E143EA2143C147CA2147814F8A25C1301A25C1303A249\n5AA25C130FA291C7FC5BA2131E133EA2133C137CA2137813F8A25B1201A25B1203A25B12\n07A25B120FA290C8FC5AA2121E123EA2123C127CA2127812F8A25A12601F537BBD2A>I<\nEB03F8EB1FFF90387E0FC09038F803E03901E000F0484813780007147C48487FA248C77E\nA2481580A3007EEC0FC0A600FE15E0B3007E15C0A4007F141F6C1580A36C15006D5B000F\n143EA26C6C5B6C6C5B6C6C485A6C6C485A90387E0FC0D91FFFC7FCEB03F8233A7DB72A>\nI<EB01C013031307131F13FFB5FCA2131F1200B3B3A8497E007FB512F0A31C3879B72A>\nI<EB0FF0EB7FFE48B57E3903E03FE0390F000FF0000E6D7E486D7E486D7E123000706D7E\n126012FCB4EC7F807FA56CC7FC121CC8FCEDFF00A34A5A5D14035D4A5A5D140F4A5A4A5A\n92C7FC147C5C495A495A495A495A91C8FC011EEB01805B5B49130348481400485A485A00\n0EC75A000FB6FC5A5A485CB6FCA321387CB72A>I<EB07F8EB3FFF4913C03901F80FF039\n03C007F848486C7E380E0001000F80381FE0006D7FA56C5A6C5AC85A1401A25D4A5AA24A\n5A5DEC0F80027EC7FCEB1FFCECFF809038000FE06E7EEC01FC816E7EED7F80A216C0A215\n3F16E0A2121EEA7F80487EA416C049137F007F1580007EC7FC0070ECFF006C495A121E39\n0F8003F83907F00FF00001B512C06C6C90C7FCEB0FF8233A7DB72A>I<1538A2157815F8\nA2140114031407A2140F141F141B14331473146314C313011483EB030313071306130C13\n1C131813301370136013C01201EA038013005A120E120C5A123812305A12E0B712F8A3C7\n3803F800AB4A7E0103B512F8A325397EB82A>I<0006140CD80780133C9038F003F890B5\nFC5D5D158092C7FC14FC38067FE090C9FCABEB07F8EB3FFE9038780F803907E007E09038\n8003F0496C7E12066E7EC87EA28181A21680A4123E127F487EA490C71300485C12E00060\n5C12700030495A00385C6C1303001E495A6C6C485A3907E03F800001B5C7FC38007FFCEB\n1FE0213A7CB72A>I<EC3FC0903801FFF0010713FC90380FE03E90383F800790387E001F\n49EB3F804848137F485AA2485A000FEC3F0049131E001F91C7FCA2485AA3127F90C9FCEB\n01FC903807FF8039FF1E07E090383801F0496C7E01607F01E0137E497FA249148016C015\n1FA290C713E0A57EA56C7E16C0A2121FED3F807F000F15006C6C5B15FE6C6C5B6C6C485A\n3900FE07F090383FFFC06D90C7FCEB03FC233A7DB72A>I<12301238123E003FB612E0A3\n16C05A168016000070C712060060140E5D151800E01438485C5D5DC712014A5A92C7FC5C\n140E140C141C5CA25CA214F0495AA21303A25C1307A2130FA3495AA3133FA5137FA96DC8\nFC131E233B7BB82A>I<EB03F8EB1FFF017F13C09038FC07F03901E001F848486C7E4848\n137C90C77E48141E000E141F001E80A3121FA27F5D01E0131E6C6C133E01FC133C6D5B6C\n6C6C5AECC1E06CEBF3C06C01FFC7FC6C5BEB3FFF6D13C081017F13F801F07F3903E07FFE\n3907801FFF48486C1380481303003E6D13C0003CEB007F007C143F0078EC0FE000F81407\n5A1503A21501A36C15C012781503007C15806CEC07006C5C6C6C131ED807E0137C3903F8\n03F0C6B55A013F1380D907FCC7FC233A7DB72A>I<EB03F8EB1FFF017F13C09038FC07E0\n3903F803F048486C7E48486C7E49137E121F48487FA2007F158090C7FCA248EC1FC0A616\nE0A56C143FA27F123F001F147FA26C6C13FF3907E001DF0003149F3801F0033900FC0F1F\nD93FFC13C0EB07F090C7FC153F1680A316005D000F147E487E486C5BA24A5A4A5A49485A\n6C48485A001C495A260F807FC7FC3807FFFC000113F038003FC0233A7DB72A>I<121C12\n7FEAFF80A5EA7F00121CC7FCB2121C127FEAFF80A5EA7F00121C092479A317>I<121C12\n7FEAFF80A5EA7F00121CC7FCB2121C127F5A1380A4127F121D1201A412031300A25A1206\nA2120E5A121812385A1260093479A317>I<1538A3157CA315FEA34A7EA34A6C7EA20207\n7FEC063FA2020E7FEC0C1FA2021C7FEC180FA202387FEC3007A202707FEC6003A202C07F\n1501A2D901807F81A249C77F167FA20106810107B6FCA24981010CC7121FA2496E7EA349\n6E7EA3496E7EA213E0707E1201486C81D80FFC02071380B56C90B512FEA3373C7DBB3E>\n65 D<B712E016FC16FF0001903980007FC06C90C7EA1FE0707E707E707EA2707EA283A7\n5F16035F4C5A4C5A4C5A4C5AEEFF8091B500FCC7FCA291C7EA7F80EE1FE0EE07F0707E70\n7E83707EA21880177F18C0A7188017FFA24C13005F16034C5AEE1FF8486DEB7FF0B812C0\n94C7FC16F832397DB83B>I<913A01FF800180020FEBE003027F13F8903A01FF807E0790\n3A03FC000F0FD90FF0EB039F4948EB01DFD93F80EB00FF49C8127F01FE153F1201484815\n1F4848150FA248481507A2485A1703123F5B007F1601A35B00FF93C7FCAD127F6DED0180\nA3123F7F001F160318006C7E5F6C7E17066C6C150E6C6C5D00001618017F15386D6C5CD9\n1FE05C6D6CEB03C0D903FCEB0F80902701FF803FC7FC9039007FFFFC020F13F002011380\n313D7BBA3C>I<B712C016F816FE000190398001FF806C90C7EA3FE0EE0FF0EE03F8707E\n707E177FA2EF3F8018C0171F18E0170F18F0A3EF07F8A418FCAC18F8A4EF0FF0A218E0A2\n171F18C0EF3F80A2EF7F0017FE4C5A4C5AEE0FF0EE3FE0486DEBFF80B8C7FC16F816C036\n397DB83F>I<B812FCA30001903880000F6C90C71201EE007E173E171E170EA31706A317\n078316C0A394C7FCA31501A21503150F91B5FCA3EC000F15031501A21500A21860A318E0\n93C712C0A41701A3EF0380A21707A2170F173F177F486D903807FF00B9FCA333397DB839\n>I<B812F8A30001903880001F6C90C71201EE00FC177C173C171CA2170CA4170E1706A2\nED0180A21700A41503A21507151F91B5FCA3EC001F15071503A21501A692C8FCAD4813C0\nB612C0A32F397DB836>I<DBFF8013C0020FEBF001023F13FC9139FF803F03903A03FC00\n0787D90FF0EB03CF4948EB00EF4948147F4948143F49C8121F485A4848150F48481507A2\n48481503A2485A1701123F5B007F1600A448481600AB93B6FCA26C7E9338007FE0EF3FC0\nA2123F7F121FA26C7EA26C7EA26C7E6C7E6C6C157F6D7E6D6C14FF6D6C14EFD90FF8EB03\nC7D903FEEB0783903A00FFC03F0191393FFFFC00020F01F0130002001380383D7CBA41>\nI<B648B512FEA30001902680000313006C90C76C5AB3A491B6FCA391C71201B3A6486D49\n7EB648B512FEA337397DB83E>I<B612C0A3C6EBC0006D5AB3B3AD497EB612C0A31A397E\nB81E>I<B612E0A3000101C0C8FC6C90C9FCB3AD1718A517381730A31770A317F0A21601\n1603160FEE1FE0486D13FFB8FCA32D397DB834>76 D<B5933807FFF86E5DA20001F0FC00\n2600DFC0ED1BF8A2D9CFE01533A3D9C7F01563A3D9C3F815C3A2D9C1FCEC0183A3D9C0FE\nEC0303A2027F1406A36E6C130CA36E6C1318A26E6C1330A36E6C1360A26E6C13C0A39139\n01FC0180A3913900FE0300A2ED7F06A3ED3F8CA2ED1FD8A3ED0FF0A3486C6D5A487ED80F\nFC6D48497EB500C00203B512F8A2ED018045397DB84C>I<B5913807FFFE8080C6923800\n7FE06EEC1F80D9DFF0EC0F001706EBCFF8EBC7FCA2EBC3FEEBC1FFA201C07F6E7EA26E7E\n6E7E81140F6E7E8114036E7E168080ED7FC016E0153FED1FF0ED0FF8A2ED07FCED03FEA2\nED01FF6F1386A2EE7FC6EE3FE6A2EE1FF6EE0FFEA216071603A216011600A2177E486C15\n3E487ED80FFC151EB500C0140EA2170637397DB83E>I<EC03FF021F13E09138FE01FC90\n3901F8007ED907E0EB1F8049486D7ED93F80EB07F049C76C7E01FE6E7E48486E7E49157E\n0003167F4848ED3F80A24848ED1FC0A2001F17E049150F003F17F0A3007F17F8491507A3\n00FF17FCAC007F17F86D150FA3003F17F0A26C6CED1FE0A36C6CED3FC0000717806D157F\n000317006C6C15FEA26C6C4A5A017F4A5A6D6C495A6D6C495AD907E0EB1F80D903F8017F\nC7FC903900FE01FC91381FFFE0020390C8FC363D7BBA41>I<B712C016F816FE00019039\n8001FF806C90C7EA3FC0EE0FE0EE07F0EE03F817FC17FE1601A217FFA717FEA2EE03FCA2\nEE07F817F0EE0FE0EE3FC0923801FF0091B512FC16F091C9FCB3A5487FB6FCA330397DB8\n39>I<B612FEEDFFE016F8000190388007FE6C90C76C7EEE3FC0707E707E707EA2707EA2\n83A65FA24C5AA24C5A4C5AEE3F8004FFC8FCED07FC91B512E05E9138000FF0ED03F8ED00\nFE82707E707EA2161F83A583A6F00180A217F8160F1803486D01071400B66D6C5A040113\n06933800FE0ECAEA3FFCEF07F0393B7DB83D>82 D<D90FF813C090383FFE0190B5128139\n03F807E33907E000F74848137F4848133F48C7121F003E140F007E1407A2007C140312FC\n1501A36C1400A37E6D14006C7E7F13F86CB47E6C13F8ECFF806C14E06C14F86C14FEC680\n013F1480010714C0EB007F020713E0EC007FED3FF0151F150FED07F8A200C01403A21501\nA37EA216F07E15036C15E06C14076C15C06C140F6DEB1F80D8FBF0EB3F00D8F0FE13FE39\nE03FFFF8010F13E0D8C00190C7FC253D7CBA2E>I<003FB812E0A3D9C003EB001F273E00\n01FE130348EE01F00078160000701770A300601730A400E01738481718A4C71600B3B091\n3807FF80011FB612E0A335397DB83C>I<B6903807FFFEA3000101809038007FE06C90C8\nEA1F80EF0F001706B3B2170E6D150C80171C133F17186D6C14385F6D6C14F06D6C5C6D6C\n495A6D6CEB07806D6C49C7FC91387F807E91381FFFF8020713E09138007F80373B7DB83E\n>I<B500FC91387FFF80A30003018091380FFC006C90C8EA07E0715A6C705A6E1403017F\n93C7FCA280013F1506A26E140E011F150C80010F5DA28001075DA26E147001031560A26D\n6C5CA2806D4A5AA2ED8003027F91C8FCA291383FC006A215E0021F5BA2EDF01C020F1318\nA26E6C5AA215FC02035BA2EDFEE002015BA26E6C5AA36FC9FCA3153EA2151CA3393B7EB8\n3E>I<B5D8FC07B5D8F001B5FCA30007902780001FFEC7EA1FF86C48C7D80FF8EC07E000\n010307ED03C01B807F6C6F6C1500A26E5F017F6E6C1406A280013F4A6C5CA280011F4A6D\n5BEE067FA26D6C010E6D5BEE0C3FA26D6C011C6D5BEE181FA26D6C6F5BEE300FA26D6C6F\n485AEE6007A26D6C4CC7FC9338C003FCA203805D913B7F818001FE06A203C1150EDA3FC3\nC7EAFF0CA203E3151CDA1FE6EC7F98A215F6DA0FFCEC3FF0A302075E4B141FA202035E4B\n140FA202015E4B1407A2020093C8FC4B80503B7EB855>I<007FB590383FFFFCA3C601F8\n01071380D97FE0D903FCC7FC013FEC01F06D6C5C5F6D6C5C6D6C13034CC8FC6D6C130616\n0E6D6C5B6DEB8018163891387FC0306E6C5A16E06E6C5A91380FF18015FB6EB4C9FC5D14\n036E7EA26E7F6F7EA24B7E15DF9138019FF09138038FF8150F91380607FC91380E03FE14\n0C4A6C7EEC38000230804A6D7E14E04A6D7E49486D7E130391C76C7E01066E7E130E010C\n6E7E011C1401013C8101FE822607FF80010713E0B500E0013FEBFF80A339397EB83E>I<\nB500FE91383FFFE0A3000301E0913807FE00C649EC03F0017F6F5A606D6C5D6D6C140395\nC7FC6D6C1406A26D6C5C6D6C141C17186D6C143817306D6D5B6E6C13E05F91383FE0015F\n91381FF003DA0FF890C8FC1606913807FC0E160C913803FE1C913801FF185E6E13B016E0\n157F6F5AB3A24B7E023FB512C0A33B397FB83E>I<003FB7FCA39039FC0001FE01C01303\n49495A003EC7FC003C4A5A5E0038141F00784A5A12704B5A5E006014FF4A90C7FCA24A5A\n5DC712074A5AA24A5A5D143F4A5AA24A5A92C8FC5B495AA2495A5C130F4948EB0180A249\n5A5C137F495A16034890C7FC5B1203485AEE0700485A495C001F5D48485C5E4848495A49\n130FB8FCA329397BB833>I<EAFFF8A4EAF000B3B3B3B3A3EAFFF8A40D5378BD17>I<3901\n800180000313033907000700000E130E485B001813180038133800301330007013700060\n1360A200E013E0485BA400CE13CE39FF80FF806D13C0A3007F137FA2393F803F80390E00\n0E001A1974B92A>I<EAFFF8A4EA0078B3B3B3B3A3EAFFF8A40D537FBD17>I<EA01801203\nEA0700120E5A12181238123012701260A212E05AA412CEEAFF8013C0A3127FA2EA3F80EA\n0E000A197AB917>96 D<EB1FE0EBFFFC3803E03F3907000F80390F8007E0486C6C7E13E0\n6E7EA26E7E6C5A6C5AC8FCA4147FEB07FFEB3FE0EBFE00EA03F8EA0FF0EA1FC0123F485A\n90C7FC160C12FEA31401A26C13036CEB077C903980063E18383FC01E3A0FE0781FF03A03\nFFF00FE03A007F8007C026277DA52A>I<EA03F012FFA3120F1203B0EC1FE0EC7FF89038\nF1E03E9039F3801F809039F7000FC001FEEB07E049EB03F049EB01F85BED00FCA216FEA2\n167E167FAA167E16FEA216FC15016D14F8ED03F07F01EEEB07E001C6EB0FC09039C7801F\n00903881E07E903800FFF8C7EA1FC0283B7EB92E>I<EB03FC90381FFF8090387E03E039\n01F80070484813F83907E001FC380FC003A2EA1F80123F90380001F848EB00F01500A212\n7E12FEAA127E127FA26C14067F001F140E6D130C000F141C6C6C13386C6C13706C6C13E0\n39007C07C090381FFF00EB07F81F277DA525>I<ED0FC0EC03FFA3EC003F150FB0EB03F8\nEB1FFF90387E078F9038F801EF3903F0007F4848133F4848131FA24848130F123F90C7FC\n5AA2127E12FEAA127E127FA27EA26C6C131FA26C6C133F6C6C137F6C6CEBEFF03A01F801\nCFFF39007C078F90381FFE0FD907F813C0283B7DB92E>I<EB07F8EB1FFF90387C0FC039\n01F803E03903F001F0D807E013F8380FC0004848137CA248C7127E153E5A153F127E12FE\nA3B7FCA248C8FCA5127EA2127FA26C14037F001F14076C6C13060007140E6D131CD801F0\n13386C6C137090387E03E090381FFF80903803FC0020277EA525>I<147E903803FF8090\n380FC1E0EB1F8790383F0FF0137EA213FCA23901F803C091C7FCADB512FCA3D801F8C7FC\nB3AB487E387FFFF8A31C3B7FBA19>I<ED03F090390FF00FF890393FFC3C3C9039F81F70\n7C3901F00FE03903E007C03A07C003E010000FECF000A248486C7EA86C6C485AA200075C\n6C6C485A6D485A6D48C7FC38073FFC38060FF0000EC9FCA4120FA213C06CB512C015F86C\n14FE6CECFF804815C03A0F80007FE048C7EA0FF0003E140348140116F8481400A56C1401\n007C15F06CEC03E0003F1407D80F80EB0F80D807E0EB3F003901FC01FC39007FFFF00107\n90C7FC26387EA52A>I<EA03F012FFA3120F1203B0EC0FF0EC3FFCECF03F9039F1C01F80\n9039F3800FC0EBF70013FE496D7EA25BA35BB3A3486C497EB500C1B51280A3293A7EB92E\n>I<EA0380EA0FE0487EA56C5AEA0380C8FCAAEA03F012FFA312071203B3AA487EB512C0\nA312387EB717>I<EB01C0EB07F0EB0FF8A5EB07F0EB01C090C7FCAAEB01F813FFA31307\n1301B3B3A2123C127E00FF13F01303A214E038FE07C0127C383C0F00EA0FFEEA03F81549\n84B719>I<EA03F012FFA3120F1203B1913801FFFCA39138007FC01600157C15705D4A5A\n4A5A4AC7FC141E1438147814FC13F1EBF3FEEBF73F01FE7FEBF81F496C7E8114076E7E6E\n7E811400157E157F811680ED1FC0486CEB3FF0B500C0B5FCA3283A7EB92C>I<EA03F012\nFFA3120F1203B3B3AD487EB512C0A3123A7EB917>I<2703F00FF0EB1FE000FFD93FFCEB\n7FF8913AF03F01E07E903BF1C01F83803F3D0FF3800FC7001F802603F70013CE01FE14DC\n49D907F8EB0FC0A2495CA3495CB3A3486C496CEB1FE0B500C1B50083B5FCA340257EA445\n>I<3903F00FF000FFEB3FFCECF03F9039F1C01F803A0FF3800FC03803F70013FE496D7E\nA25BA35BB3A3486C497EB500C1B51280A329257EA42E>I<EB03FE90380FFF8090383E03\nE09038F800F84848137C48487F48487F4848EB0F80001F15C090C712074815E0A2007EEC\n03F0A400FE15F8A9007E15F0A2007F14076C15E0A26C6CEB0FC0000F15806D131F6C6CEB\n3F006C6C137EC66C13F890387E03F090381FFFC0D903FEC7FC25277EA52A>I<3903F01F\nE000FFEB7FF89038F1E07E9039F3801F803A0FF7000FC0D803FEEB07E049EB03F04914F8\n49130116FC150016FEA3167FAA16FEA3ED01FCA26DEB03F816F06D13076DEB0FE001F614\nC09039F7803F009038F1E07E9038F0FFF8EC1FC091C8FCAB487EB512C0A328357EA42E>\nI<D903F813C090381FFE0190387E07819038FC01C33903F000E300071477484813374913\n3F001F141F485A150F48C7FCA312FEAA127FA37E6D131F121F6D133F120F6C6C137F6C6C\n13EF3901F801CF39007E078F90381FFE0FEB07F890C7FCABED1FE00203B5FCA328357DA4\n2C>I<3807E01F00FFEB7FC09038E1E3E09038E387F0380FE707EA03E613EE9038EC03E0\n9038FC0080491300A45BB3A2487EB512F0A31C257EA421>I<EBFF03000313E7380F80FF\n381E003F487F487F00707F12F0A2807EA27EB490C7FCEA7FE013FF6C13E06C13F86C7F00\n037FC67F01071380EB007F141F00C0EB0FC01407A26C1303A37E15806C13077EEC0F00B4\n131E38F3C07C38E1FFF038C03F801A277DA521>I<1318A51338A31378A313F812011203\n1207001FB5FCB6FCA2D801F8C7FCB215C0A93800FC011580EB7C03017E13006D5AEB0FFE\nEB01F81A347FB220>I<D803F0EB07E000FFEB01FFA3000FEB001F00031407B3A4150FA3\n151F12016D133F0000EC77F86D9038E7FF8090383F03C790381FFF87903A03FC07E00029\n267EA42E>I<B538803FFEA33A0FF8000FF06C48EB07E00003EC03C06D148000011500A2\n6C6C1306A26D130E017E130CA26D5BA2EC8038011F1330A26D6C5AA214E001075BA29038\n03F180A3D901FBC7FCA214FF6D5AA2147CA31438A227257EA32C>I<B53A1FFFE03FFEA3\n260FF8009038000FF86C48017EEB03E018C00003023EEB0180A26C6C013FEB0300A36C6C\nEC8006156FA2017E9038EFC00C15C7A2D93F016D5A15830281EBF038D91F831430150102\nC3EBF87090260FC6001360A2D907E66D5A02EC137CA2D903FCEB7F804A133FA2010192C7\nFC4A7FA20100141E4A130E0260130C37257EA33C>I<B538807FFFA33A03FE003FF00001\nEC1F80000092C7FC017E131C6D13186D6C5AECC070010F5B6D6C5AECF180EB03FB6DB4C8\nFC6D5AA2147F804A7E8114CF903801C7E090380383F090380703F8EB0601496C7E011C13\n7E49137F01787F496D7E486C80000FEC3FF0D8FFFE90B51280A329247FA32C>I<B53880\n3FFEA33A0FF8000FF06C48EB07C00003EC03806C7E16007F00001406A2017E5BA2137F6D\n5BA26D6C5AA2ECC070010F1360A26D6C5AA214F101035BA2D901FBC7FCA214FF6D5AA214\n7CA31438A21430A214701460A25CA2EA7C0100FE5B130391C8FC1306EAFC0EEA701C6C5A\nEA1FF0EA0FC027357EA32C>I<003FB512FCA2EB8003D83E0013F8003CEB07F00038EB0F\nE012300070EB1FC0EC3F800060137F150014FE495AA2C6485A495AA2495A495A495AA290\n387F000613FEA2485A485A0007140E5B4848130C4848131CA24848133C48C7127C48EB03\nFC90B5FCA21F247EA325>I<B81280A2290280962A>I<BD12C0A25202809653>I\nE\n%EndDVIPSBitmapFont\n%DVIPSBitmapFont: Fh cmbx10 10 44\n/Fh 44 122 df<913803FFC0027F13F00103B512FC010FEB00FED93FF8133FD97FE0EBFF\n8049485A5A1480484A13C04A6C1380A36F1300167E93C7FCA592383FFFC0B8FCA4000390\nC7FCB3ABB5D8FC3F13FFA4303A7EB935>12 D<EA0F80EA3FE0EA7FF0A2EAFFF8A213FCA3\n127FA2123FEA0F9CEA001C133C1338A31378137013F0EA01E0A2EA03C0EA0780EA0F005A\n121C12180E1D79B91B>39 D<EA0F80EA3FE0EA7FF0A2EAFFF8A213FCA3127FA2123FEA0F\n9CEA001C133C1338A31378137013F0EA01E0A2EA03C0EA0780EA0F005A121C12180E1D79\n8C1B>44 D<B61280A819087F9620>I<EA0F80EA3FE0EA7FF0A2EAFFF8A5EA7FF0A2EA3F\nE0EA0F800D0D798C1B>I<49B4FC010F13E0017F13FC9038FF83FE4848C67E4848EB7F80\n4848EB3FC04848EB1FE0A2001F15F0A24848EB0FF8A3007F15FCA500FF15FEB3007F15FC\nA4003F15F8A26D131F001F15F0A2000F15E06D133F000715C06C6CEB7F806C6CEBFF0039\n00FF83FE6DB45A011F13F0010190C7FC27387CB630>48 D<141E143E14FE1307133FB5FC\nA313CFEA000FB3B3A6007FB61280A4213779B630>I<EB0FFC90387FFFC048B512F00007\n14FC390FF03FFF261F800F1380263F000313C05AD9C00113E0486C6C13F07FA2ED7FF8A4\n6C5A6C5A000FC7FCC8FCEDFFF0A216E05C16C04A138016004A5A5D4A5A4A5A4A5AEC7F80\n92C7FC14FEEB01F849481378495A495A495A013EC712F84914F05B4848130148B6FCA25A\n5A5A5A4815E0B7FCA425377BB630>I<EB03FF011F13F0017F13FC3901FC07FF2603F003\n138048486C13C0496C13E0EA0FF001FC14F0121F7FA56C4814E0A23803F001C714C04A13\n8016004A5A4A5AEC3FF090380FFFC092C7FC15F090380007FE913801FF806E13C016E0ED\n7FF016F816FC153FA216FEEA1FC0487E487E487EA416FCA249EB7FF8127F01C0EBFFF06C\n4814E06C6C4813C0260FFC0713806CB61200000114FC6C6C13F0010790C7FC27387CB630\n>I<ED07C0150FA2151F153F157F15FFA25C5C5C5CA2141E5C147C5C5C495A495A130749\n5A5C131E5B137C5B5B485A485A1207485A90C7FC121E5A127C5AB81280A4C70001EBC000\nAA0103B61280A429377DB630>I<001C15C0D81F80130701F8137F90B61280A216005D5D\n15F05D15804AC7FC14F090C9FCA8EB07FE90383FFFE090B512F89038FC07FC9038E003FF\nD98001138090C713C0120EC813E0157F16F0A216F8A21206EA3F80EA7FE012FF7FA44914\nF0A26C4813FF90C713E0007C15C06C5B6C491380D9C0071300390FF01FFE6CB512F80001\n14E06C6C1380D90FF8C7FC25387BB630>I<EA0F80EA3FE0EA7FF0A2EAFFF8A5EA7FF0A2\nEA3FE0EA0F80C7FCABEA0F80EA3FE0EA7FF0A2EAFFF8A5EA7FF0A2EA3FE0EA0F800D2579\nA41B>58 D<ED03E04B7EA24B7EA34B7EA24B7EA34B7EA292B57EA34A8015F302038015E1\nA202078015C0020F80ED807FA2021F80ED003F4A80023E131FA2027E80027C7F02FC814A\n7FA20101824A7F49B77EA3498202C0C7FC010F824A147FA2011F8291C8123F4982013E15\n1FA2017E82017C8101FE83B500F80107B61280A4413A7DB948>65\nD<DB3FFCEB01C00203B5EAC003021FECF00791B6EAFC0F01039039FC00FF3F4901C0EB1F\nFFD91FFEC77E49481403D97FF080494880485B48177F4849153F4890C9FC181F485A180F\n123F5B1807127FA24993C7FC12FFAD127F7FF003C0123FA27F001F1707A26C6C1780180F\n6C6D16006C6D5D6C173E6C6D157ED97FF85D6D6C4A5A6DB44A5A010701C0EB0FE06D01FC\nEBFF80010090B548C7FC021F14F8020314E09126003FFEC8FC3A3B7BB945>67\nD<DB3FFCEB01C00203B5EAC003021FECF00791B6EAFC0F01039039FC00FF3F4901C0EB1F\nFFD91FFEC77E49481403D97FF080494880485B48177F4849153F4890C9FC181F485A180F\n123F5B1807127FA24993C8FC12FFAB043FB61280A2127F7FDC0003EBC000123FA27F121F\nA26C7EA26C7F6C7F6C7F7ED97FF85C6D7E6DB45C010701C05B6D01FCEBFF3F010090B5EA\nFE0F021FECF8030203ECE0009126003FFEC9FC413B7BB94B>71 D<B612FCA439007FF800\nB3B3ADB612FCA41E397DB824>73 D<B500F80403B512F06E5EA26E5ED8007FF1E000A2D9\n7BFF161EA201796D5DA201786D5DA26E6C5DA36E6C4A5AA26E6C4A5AA26E6C4A5AA26E6C\n4A5AA26E6C141EA36E6D5BA26E6D5BA26F6C5BA26F6C485AA36F6C485AA26F6C485AA26F\n6C48C7FCA2923803FF1EA36F13BCA26F13F8A2705AA2705AA213FCB500FC6D4848B612F0\nA2EE0F80EE070054397DB85B>77 D<B8FC17F017FEEFFF8028007FF8000F13C0040113E0\n7013F0EF7FF8EF3FFCA2EF1FFEA218FFA818FEA2EF3FFCA2EF7FF8EFFFF04C13E0040F13\nC091B7120017FC17E002F8C9FCB3A4B612FCA438397DB841>80 D<B712FCEEFFE017FC17\nFF28007FF8000F13C004017F707F717E717EA2717EA284A760A24D5A604D5A4D5A04035B\n041F90C8FC91B612FC17E0839139F8003FFCEE0FFF707F707F8284A2707FA584A51A601A\nF084177F1901DD3FFE13E0B600FC011F130394390FFF87C071EBFF8005011400CBEA1FFC\n443A7DB848>82 D<D907FF130E013FEBE01E90B5EAF83E0003ECFE7E3A07FC01FFFE390F\nF0001F4848130F48481303491301007F140090C8FC167E5A163EA27F161E7F7F6D91C7FC\n13FC387FFFE014FEECFFF06C14FE6F7E6C816C15F06C816C81C681133F010F801301D900\n0F1480EC007F030F13C01503818100F0157FA3163FA27E17807E167F6C16007E6D14FE01\nE0495A01F813039039FF801FF800FC90B512E0D8F83F5CD8F00749C7FC39E0007FF02A3B\n7BB935>I<003FB91280A4D9F800EBF003D87FC09238007FC049161F007EC7150FA2007C\n1707A200781703A400F818E0481701A4C892C7FCB3AE010FB7FCA43B387DB742>I<B600\nF00103B512E0A4C601F0C83807F0006E5E017F5F6E150FA2013F5F6E151F011F94C7FC6E\n5D6D163E6F147E6D167CA26F14FC6D5E6F13016D5E6F13036D5E811707027F5D6F130F02\n3F5D6F131F021F92C8FC815F6E143EEE807E6E147CEEC0FC6E5C16E016E16E5C16F36E5C\n16FF6F5BA36F5BA26F90C9FCA26F5AA36F5AA26F5AA26F5A433A7EB848>86\nD<EB3FFE0003B512E0000F14F8391FF00FFE003FEB03FF6D6C7F6E7FA26F7EA26C5A6C5A\nEA0380C8FCA2EC3FFF010FB5FC137F3901FFF87F00071380380FFE00EA3FF85B485A12FF\n5BA415FF6D5A127F263FF00713F83B1FFC1FBFFFC0390FFFFE1F0003EBF80F39003FE003\n2A257DA42E>97 D<13FFB5FCA412077EAF4AB47E020F13F0023F13FC9138FE03FFDAF000\n13804AEB7FC00280EB3FE091C713F0EE1FF8A217FC160FA217FEAA17FCA3EE1FF8A217F0\n6E133F6EEB7FE06E14C0903AFDF001FF80903AF8FC07FE009039F03FFFF8D9E00F13E0D9\nC00390C7FC2F3A7EB935>I<903801FFC0010F13FC017F13FFD9FF8013802603FE0013C0\n48485AEA0FF8121F13F0123F6E13804848EB7F00151C92C7FC12FFA9127FA27F123FED01\nE06C7E15036C6CEB07C06C6C14806C6C131FC69038C07E006DB45A010F13F00101138023\n257DA42A>I<EE7F80ED7FFFA4150381AF903801FF81010F13F1013F13FD9038FFC07F00\n03EB001FD807FC1307000F8048487F5B123FA2485AA312FFAA127FA27F123FA26C6C5B00\n0F5C6C6C5B6C6C4913C02701FF80FD13FE39007FFFF9011F13E1010313012F3A7DB935>\nI<903803FF80011F13F0017F13FC3901FF83FE3A03FE007F804848133F484814C0001FEC\n1FE05B003FEC0FF0A2485A16F8150712FFA290B6FCA301E0C8FCA4127FA36C7E1678121F\n6C6C14F86D14F000071403D801FFEB0FE06C9038C07FC06DB51200010F13FC010113E025\n257DA42C>I<EC1FF0903801FFFC010713FF90391FF87F8090383FE0FFD9FFC113C0A248\n1381A24813016E1380A2ED3E0092C7FCA8B6FCA4000390C8FCB3ABB512FEA4223A7DB91D\n>I<161FD907FEEBFFC090387FFFE348B6EAEFE02607FE07138F260FF801131F48486C13\n8F003F15CF4990387FC7C0EEC000007F81A6003F5DA26D13FF001F5D6C6C4890C7FC3907\nFE07FE48B512F86D13E0261E07FEC8FC90CAFCA2123E123F7F6C7E90B512F8EDFF8016E0\n6C15F86C816C815A001F81393FC0000F48C8138048157F5A163FA36C157F6C16006D5C6C\n6C495AD81FF0EB07FCD807FEEB3FF00001B612C06C6C91C7FC010713F02B377DA530>I<\n13FFB5FCA412077EAFED7FC0913803FFF8020F13FE91381F03FFDA3C01138014784A7E4A\n14C05CA25CA291C7FCB3A3B5D8FC3F13FFA4303A7DB935>I<EA01F0EA07FC487EA2487E\nA56C5AA26C5AEA01F0C8FCA913FF127FA412077EB3A9B512F8A4153B7DBA1B>I<13FFB5\nFCA412077EB3B3ACB512FCA4163A7DB91B>108 D<01FED97FE0EB0FFC00FF902601FFFC\n90383FFF80020701FF90B512E0DA1F81903983F03FF0DA3C00903887801F000749DACF00\n7F00034914DE6D48D97FFC6D7E4A5CA24A5CA291C75BB3A3B5D8FC1FB50083B512F0A44C\n257DA451>I<01FEEB7FC000FF903803FFF8020F13FE91381F03FFDA3C01138000071378\n0003497E6D4814C05CA25CA291C7FCB3A3B5D8FC3F13FFA430257DA435>I<903801FFC0\n010F13F8017F13FFD9FF807F3A03FE003FE048486D7E48486D7E48486D7EA2003F814913\n03007F81A300FF1680A9007F1600A3003F5D6D1307001F5DA26C6C495A6C6C495A6C6C49\n5A6C6C6CB45A6C6CB5C7FC011F13FC010113C029257DA430>I<9039FF01FF80B5000F13\nF0023F13FC9138FE07FFDAF00113800007496C13C06C0180EB7FE091C713F0EE3FF8A2EE\n1FFCA3EE0FFEAA17FC161FA217F8163F17F06E137F6E14E06EEBFFC0DAF00313809139FC\n07FE0091383FFFF8020F13E0020390C7FC91C9FCACB512FCA42F357EA435>I<9038FE03\nF000FFEB0FFEEC3FFF91387C7F809138F8FFC000075B6C6C5A5CA29138807F80ED3F0015\n0C92C7FC91C8FCB3A2B512FEA422257EA427>114 D<90383FF0383903FFFEF8000F13FF\n381FC00F383F0003007E1301007C130012FC15787E7E6D130013FCEBFFE06C13FCECFF80\n6C14C06C14F06C14F81203C614FC131F9038007FFE140700F0130114007E157E7E157C6C\n14FC6C14F8EB80019038F007F090B512C000F8140038E01FF81F257DA426>I<130FA55B\nA45BA25B5BA25A1207001FEBFFE0B6FCA3000390C7FCB21578A815F86CEB80F014816CEB\nC3E090383FFFC06D1380903803FE001D357EB425>I<01FFEC3FC0B5EB3FFFA400071401\n6C80B3A35DA25DA26C5C6E4813E06CD9C03E13FF90387FFFFC011F13F00103138030257D\nA435>I<B539F001FFF8A4000390C7EA3F00161E6E133E6C153C6E137C6C15786E13F801\n7F5CECF001013F5C14F8011F495AA2ECFC07010F5CECFE0F010791C7FC6E5A6D131E15BE\n6D13BC15FC6D5BA36E5AA26E5AA26E5AA26E5AA22D257EA432>I<B500F1B538803FFFA4\n3D07FE000FF80003E06C6C010715C082028015076C6E6C148015076C01C0ED0F00826E48\n5C017FED801E5D90273FF01E7F5B17C0DAF83E147C011F90393C3FE078037C14F8903B0F\nFC781FF0F0A29139FEF00FF10107EDF9E002FF14FB6D496CB45AA24B7E6D5EA26D496C90\nC7FCA292C7FC6E5CA2023E147C023C143C40257EA445>I<B539F01FFFF0A40003903980\n03F8006C01C013E06C1407D97FE05B6D6C485A6E48C7FC90381FFC3E010F5B903807FEFC\n6D6C5A5D6D5B6D5B6E7E6E7E814A7EA24A7E903801F3FFD903E37FD907C17FEB0FC04948\n6C7E4A6C7E013E80496D7E49130F00016E7EB590383FFFF8A42D257EA432>I<B539F001\nFFF8A4000390C7EA3F00161E6E133E6C153C6E137C6C15786E13F8017F5CECF001013F5C\n14F8011F495AA2ECFC07010F5CECFE0F010791C7FC6E5A6D131E15BE6D13BC15FC6D5BA3\n6E5AA26E5AA26E5AA26E5AA292C8FCA25C141E003F133E387F803C38FFC07C147814F8EB\nC1F0EBC3E06C485A387D1F80D83FFFC9FCEA1FFCEA07F02D357EA432>I\nE\n%EndDVIPSBitmapFont\n%DVIPSBitmapFont: Fi cmbx12 14.4 33\n/Fi 33 122 df<EEFFFC031FEBFF804AB612E0020781021F9038C00FF8913A7FFE0003FC\nDAFFF0EB00FE4949EB03FF4901805B4990C7487F49485CA2495A4D7F013F6F5B5CA37190\nC7FC715AEF01F894C9FCA90403B512C0BAFCA526003FFCC7120783B3B3A6003FB5D8FC03\nB612C0A542547DD34B>12 D<EA07F0EA1FF8487E487E7FB5FC1480A314C0A37EA27E7EEA\n07F3EA0003A213071480A3130F1400A25B131E133E133C137C5BA2485A485A485A485A48\nC7FC121E120C1228769025>44 D<913803FFC0023F13FC91B6FC010315C0010F018113F0\n903A1FFC003FF849486D7E49486D7E49486D7E48496D138048496D13C0A24817E04890C8\n13F0A34817F8A24817FC49157FA3007F17FEA600FF17FFB3A5007F17FEA6003F17FCA26D\n15FFA26C17F8A36C17F0A26C6D4913E0A26C6D4913C06C17806E5B6C6D4913006D6C495A\nD91FFCEB3FF8903A0FFF81FFF06D90B55A01011580D9003F01FCC7FC020313C0384F7BCD\n43>48 D<157815FC14031407141F14FF130F0007B5FCB6FCA2147F13F0EAF800C7FCB3B3\nB3A6007FB712FEA52F4E76CD43>I<EC3FFE0103B512E0010F14FC013F14FF90B712C048\nD9C07F7F2703FE000F13F8D807F801037FD80FE06D7F48486D7F48488001F01680486C6E\n13C07F486C6E13E07FA27013F0A56C5AA26C5AEA0FF0EA03C0C914E05EA218C05E1880A2\n4C13005F4C5A4B5B5F4B5B5F4B5B4B90C7FC4B5A5E4B5AED7FE04B5A4A5B4A48C8FC4A5A\n5D4A48EB01F04A5AEC3F804AC7FC02FEEC03E0495A495A495A495AD91F80140749C8FC01\n3E150F017FB7FC90B812C05A5A5A5A5A5A5AB9FC1880A4344E79CD43>I<91380FFFC091\nB512FC0107ECFF80011F15E090263FF8077F9026FF800113FC4848C76C7ED803F86E7E49\n1680D807FC8048B416C080486D15E0A4805CA36C17C06C5B6C90C75AD801FC1680C9FC4C\n13005FA24C5A4B5B4B5B4B13C04B5BDBFFFEC7FC91B512F816E016FCEEFF80DA000713E0\n030113F89238007FFE707E7013807013C018E07013F0A218F8A27013FCA218FEA2EA03E0\nEA0FF8487E487E487EB57EA318FCA25E18F891C7FC6C17F0495C6C4816E001F04A13C06C\n484A1380D80FF84A13006CB44A5A6CD9F0075BC690B612F06D5D011F1580010302FCC7FC\nD9001F1380374F7ACD43>I<EA07F0487E487E487E487EB51280A76C13006C5A6C5A6C5A\n6C5AC8FCB3EA07F0487E487E487E487EB51280A76C13006C5A6C5A6C5A6C5A113576B425\n>58 D<171F4D7E4D7EA24D7EA34C7FA24C7FA34C7FA34C7FA24C7FA34C8083047F80167E\n8304FE804C7E03018116F8830303814C7E03078116E083030F814C7E031F81168083033F\n8293C77E4B82157E8403FE824B800201835D840203834B800207835D844AB87EA24A83A3\nDA3F80C88092C97E4A84A2027E8202FE844A82010185A24A820103854A82010785A24A82\n010F855C011F717FEBFFFCB600F8020FB712E0A55B547BD366>65\nD<932601FFFCEC01C0047FD9FFC013030307B600F81307033F03FE131F92B8EA803F0203\nDAE003EBC07F020F01FCC7383FF0FF023F01E0EC0FF94A01800203B5FC494848C9FC4901\nF8824949824949824949824949824990CA7E494883A2484983485B1B7F485B481A3FA248\n49181FA3485B1B0FA25AA298C7FC5CA2B5FCAE7EA280A2F307C07EA36C7FA21B0F6C6D19\n80A26C1A1F6C7F1C006C6D606C6D187EA26D6C606D6D4C5A6D6D16036D6D4C5A6D6D4C5A\n6D01FC4C5A6D6DEE7F806D6C6C6C4BC7FC6E01E0EC07FE020F01FEEC1FF80203903AFFE0\n01FFF0020091B612C0033F93C8FC030715FCDB007F14E0040101FCC9FC525479D261>67\nD<932601FFFCEC01C0047FD9FFC013030307B600F81307033F03FE131F92B8EA803F0203\nDAE003EBC07F020F01FCC7383FF0FF023F01E0EC0FF94A01800203B5FC494848C9FC4901\nF8824949824949824949824949824990CA7E494883A2484983485B1B7F485B481A3FA248\n49181FA3485B1B0FA25AA298C8FC5CA2B5FCAE6C057FB712E0A280A36C94C7003FEBC000\nA36C7FA36C7FA27E6C7FA26C7F6C7FA26D7E6D7F6D7F6D6D5E6D7F6D01FC93B5FC6D13FF\n6D6C6D5C6E01F0EC07FB020F01FEEC1FF10203903AFFF001FFE0020091B6EAC07F033FEE\n001F030703FC1307DB007F02E01301040149CAFC5B5479D26A>71\nD<B812C0A5D8000701F8C7FCB3B3B3B2B812C0A52A527CD132>73\nD<B600FC073FB512FE6F61A26F96B6FCA2D80007F5C00070EF01EFA202EF6DEF03CFA202\nE76DEF078FA202E36DEF0F0FA202E16D171EA302E06D173CA26F6C1778A26F6C17F0A26F\n6DED01E0A26F6DED03C0A36F6DED0780A26F6DED0F00A26F6D151EA26F6D5DA3706C5DA2\n706C5DA2706D495AA2706D495AA2706D495AA3706D49C7FCA2706D131EA2706D5BA2716C\n5BA3716C5BA271EB81E0A271EBC3C0A271EBE780A27101FFC8FCA3715BA2715BA2725AA2\n725AA2D93FFC6F5AB74DB712FEA2725AA2725A77527CD180>77 D<003FBC1280A59126C0\n003F9038C0007F49C71607D87FF8060113C001E08449197F49193F90C8171FA2007E1A0F\nA3007C1A07A500FC1BE0481A03A6C994C7FCB3B3AC91B912F0A553517BD05E>84\nD<B700FE031FB512FEA5D8001F01F0CA383FFE00F307F06D626F170F6D62811B1F6D6D60\n1B3F6D97C7FC6F5F6D197E821BFE6E6D5E1A016E6D5E1A036E60701507A26E6D5E1A0F6E\n6D5E1A1F6E6070153FA26E6D93C8FC626E6E147E1AFE6F5E711301A26F6D5C19036F6D5C\n19076F5E71130FA26F6D5C191F6F6D5C193F6F93C9FC715BA26FEC807E19FE706D5A18C1\n705C18E3705C18F318F770EBFFE0A2705CA2705CA37091CAFCA2705BA2715AA3715AA271\n5AA2715A715A5F537DD166>86 D<EC7FFF0107B512F0013F14FE90B77E48D9E00F7F2703\nFE000113F0486C6D7F6EEB3FFC48826E131F83707FA36C496D7FA26C90C7FC6C5AC9FCA6\n037FB5FC020FB6FC91B7FC01071487013FEBF0074913803901FFFC004813F0485B485B48\n5B4890C7FC5A5BA2485AA45EA26D5C007F151D163D6C6C02797F6C6D01F113F86C9026C0\n03E1EBFFE06C9026F81FC014F06C90B5487EC6ED001F011F01FC010713E0010101E090C8\nFC3C387CB641>97 D<EB3FF0B5FCA51203C6FCB3A4923801FFE0030F13FE033FEBFFC092\nB612F002F301017F913AF7F8003FFEDAFFE0EB0FFF03806D7F92C76C7F4A6E7F4A824A6E\n7FA2727EA285A28584A31A80AC1A00A44E5AA36118FF616E4A5BA26E4A5B6E4A5B6F495B\nDACFC04990C7FCDA87F0EB7FFC913A03FE03FFF849C6B612E0496D148049011F01FCC8FC\n90C7000313C041547BD24B>I<913801FFF8021FEBFF8091B612F0010315FC010F9038C0\n0FFE903A1FFE0001FFD97FFC491380D9FFF05B4817C048495B5C5A485BA2486F138091C7\nFC486F1300705A4892C8FC5BA312FFAD127F7FA27EA2EF03E06C7F17076C6D15C07E6E14\n0F6CEE1F806C6DEC3F006C6D147ED97FFE5C6D6CEB03F8010F9038E01FF0010390B55A01\n001580023F49C7FC020113E033387CB63C>I<4DB47E0407B5FCA5EE001F1707B3A49138\n01FFE0021F13FC91B6FC010315C7010F9038E03FE74990380007F7D97FFC0101B5FC4948\n7F4849143F484980485B83485B5A91C8FC5AA3485AA412FFAC127FA36C7EA37EA26C7F5F\n6C6D5C7E6C6D5C6C6D49B5FC6D6C4914E0D93FFED90FEFEBFF80903A0FFFC07FCF6D90B5\n128F0101ECFE0FD9003F13F8020301C049C7FC41547CD24B>I<913803FFC0023F13FC49\nB6FC010715C04901817F903A3FFC007FF849486D7E49486D7E4849130F48496D7E481780\n48497F18C0488191C7FC4817E0A248815B18F0A212FFA490B8FCA318E049CAFCA6127FA2\n7F7EA218E06CEE01F06E14037E6C6DEC07E0A26C6DEC0FC06C6D141F6C6DEC3F806D6CEC\nFF00D91FFEEB03FE903A0FFFC03FF8010390B55A010015C0021F49C7FC020113F034387C\nB63D>I<DA3FFF14FF0103B5D8F00713C0010FDAFC1F13E0013FECFF7F90267FFC0F9038\nFF9FF09026FFE001EBF83F48496C13E0484990387FF01F4890C7D83FF813E0489338FC0F\nC0F0078048486E6CC7FCA2003F82A9001F5EA26C6C4A5AA26C5E6C6D495A6C6D495A6C6D\n485BDAFC0F5B4890B6C8FCD803EF14FC01C314F02607C03F90C9FC91CBFCA2120FA37FA2\n13F813FE90B7FC6C16F817FF18C06C836C836C836D828448B9FC12074848C700031480D8\n1FF8EC003F4848150748486F13C083485A83A56D5D007F18806D5D003F18006C6C4B5AD8\n0FFEED1FFC6C6C6CEC7FF86C01E049485A6C01FE011F5B6C6CB71280010F03FCC7FC0101\n15E0D9000F01FCC8FC3C4F7CB543>103 D<EB3FF0B5FCA51203C6FCB3A4EE1FFC93B512\nC0030314F0030F8092391FE07FFC92393F001FFE037C8003F07FDAF1E081ECF3C0DAF780\n7F8502FFC7FC5CA25CA45CB3ACB6D8F807B612C0A542537BD24B>I<137F497E000313E0\n487FA2487FA76C5BA26C5BC613806DC7FC90C8FCADEB3FF0B5FCA512017EB3B3A6B612E0\nA51B547BD325>I<EB3FF0B5FCA512017EB3B3B3B1B612F0A51C537BD225>108\nD<D93FF0EB1FFCB591B512C0030314F0030F8092391FE07FFC92393F001FFE0003027C80\nC602F07FDAF1E081ECF3C0DAF7807F8502FFC7FC5CA25CA45CB3ACB6D8F807B612C0A542\n367BB54B>110 D<913801FFE0021F13FE91B612C0010315F0010F9038807FFC903A1FFC\n000FFED97FF86D6C7E49486D7F48496D7F48496D7F4A147F48834890C86C7EA24883A248\n486F7EA3007F1880A400FF18C0AC007F1880A3003F18006D5DA26C5FA26C5F6E147F6C5F\n6C6D4A5A6C6D495B6C6D495B6D6C495BD93FFE011F90C7FC903A0FFF807FFC6D90B55A01\n0015C0023F91C8FC020113E03A387CB643>I<903A3FF001FFE0B5010F13FE033FEBFFC0\n92B612F002F301017F913AF7F8007FFE0003D9FFE0EB1FFFC602806D7F92C76C7F4A824A\n6E7F4A6E7FA2717FA285187F85A4721380AC1A0060A36118FFA2615F616E4A5BA26E4A5B\n6E4A5B6F495B6F4990C7FC03F0EBFFFC9126FBFE075B02F8B612E06F1480031F01FCC8FC\n030313C092CBFCB1B612F8A5414D7BB54B>I<90397FE003FEB590380FFF80033F13E04B\n13F09238FE1FF89139E1F83FFC0003D9E3E013FEC6ECC07FECE78014EF150014EE02FEEB\n3FFC5CEE1FF8EE0FF04A90C7FCA55CB3AAB612FCA52F367CB537>114\nD<903903FFF00F013FEBFE1F90B7FC120348EB003FD80FF81307D81FE0130148487F4980\n127F90C87EA24881A27FA27F01F091C7FC13FCEBFFC06C13FF15F86C14FF16C06C15F06C\n816C816C81C681013F1580010F15C01300020714E0EC003F030713F015010078EC007F00\nF8153F161F7E160FA27E17E07E6D141F17C07F6DEC3F8001F8EC7F0001FEEB01FE9039FF\nC00FFC6DB55AD8FC1F14E0D8F807148048C601F8C7FC2C387CB635>I<143EA6147EA414\nFEA21301A313031307A2130F131F133F13FF5A000F90B6FCB8FCA426003FFEC8FCB3A9EE\n07C0AB011FEC0F8080A26DEC1F0015806DEBC03E6DEBF0FC6DEBFFF86D6C5B021F5B0203\n13802A4D7ECB34>I<D93FF8913801FFC0B50207B5FCA50003ED001FC61607B3AE5FA35F\nA2017F5D173B177B6D6C14F3DC01E313F06D6CD907C3EBFFC0903A0FFFC03F836D90B512\n03010114FE6D6C13F8020701E091C7FC42377BB54B>I<B6D8E07FB5D8C003B512C0A500\n0101F0C701F0C7381FF8006E027FED07E06C715DA26E023F150F017F705DA26E181F013F\n4B6C92C7FC6E606D70143E94B5FC6F177E6D4A6E137C03C001F315FC6D715B160303E001\nE114016D020702E05B03F013C06D71485A160F03F8D9807F13076D05F85B93381F003F03\nFC160F027F4902FC5BDBFE3E011F131F023F04FE90C8FC167EDBFF7C010F5B6E01FCECFF\n3E4C6D137E6E5FA24C7F6E5F4C7F6E5FA24C7F6E5F4C147FA26E5F93C8123F6F5EA2033E\n6FC9FC5A367DB461>119 D<007FB500F090387FFFFEA5C66C48C7000F90C7FC6D6CEC07\nF86D6D5C6D6D495A6D4B5A6F495A6D6D91C8FC6D6D137E6D6D5B91387FFE014C5A6E6C48\n5A6EEB8FE06EEBCFC06EEBFF806E91C9FCA26E5B6E5B6F7E6F7EA26F7F834B7F4B7F92B5\nFCDA01FD7F03F87F4A486C7E4A486C7E020F7FDA1FC0804A486C7F4A486C7F02FE6D7F4A\n6D7F495A49486D7F01076F7E49486E7E49486E7FEBFFF0B500FE49B612C0A542357EB447\n>I<B600F00107B5FCA5C601F8C8EA7FE06EED3F00A26D6C153E187E013F167C6E15FC6D\n5E6F13016D5E6F13036D5E8117076D6D5C170F6D6D5C171F6D93C7FC6F5B027F143E6F13\n7E023F147C6F13FCA26E6D5A16816EEBC1F016C36E5C16E76E5C16FF6E5CA26E91C8FCA3\n6F5AA26F5AA26F5AA26F5AA26F5AA35E150F5E151F93C9FC5DD81FC0133E486C137E486C\n137C486C13FC5D14015D14034A5A6C48485A49485A263FC07FCAFCEB81FE6CB45A6C13F0\n00035BC690CBFC404D7DB447>I E\n%EndDVIPSBitmapFont\n%DVIPSBitmapFont: Fj cmr9 9 36\n/Fj 36 122 df<123C127EB4FCA21380A2127F123D1201A412031300A25A1206120E120C\n121C5A5A126009177A8715>44 D<B512F0A514057F921A>I<123C127E12FFA4127E123C\n08087A8715>I<1530157815F8A215F01401A215E01403A215C01407A21580140FA21500\n5CA2143EA2143C147CA2147814F8A25C1301A25C1303A25C1307A2495AA291C7FC5BA213\n1E133EA2133C137CA2137813F8A25B1201A25B1203A2485AA25B120FA290C8FC5AA2121E\n123EA2123C127CA2127812F8A25A12601D4B7CB726>I<EB0FE0EB7FFCEBF83E3903E00F\n803907C007C0EB8003000F14E0391F0001F0A24814F8A2003E1300007E14FCA500FE14FE\nB2007E14FCA56CEB01F8A36C14F0A2390F8003E03907C007C0A23903E00F803900F83E00\nEB7FFCEB0FE01F347DB126>I<13075B5B137FEA07FFB5FC13BFEAF83F1200B3B3A2497E\n007FB51280A319327AB126>I<EB3FC0EBFFF0000313FC380F80FF391E007F80001CEB3F\nC048EB1FE048130F15F00060130712FC6C14F87E1403A3007E1307123CC7FC15F0A2140F\n15E0EC1FC0A2EC3F801500147E5C495A5C495A495A495A49C7FC133E133C4913185B485A\n48481330485A48C7FC001C1470001FB512F05A5AB612E0A31D327CB126>I<EB1FE0EBFF\nFC4813FF3907E03F80390F001FC0001EEB0FE0001CEB07F0123F018013F8140313C01380\nA2381F0007C7FC15F0A2EC0FE015C0141FEC3F80EC7E00EB01F8EB7FE014FCEB003FEC1F\nC0EC0FE0EC07F015F8140315FC140115FEA3127EB4FCA415FC48130312780070EB07F86C\n14F0003C130F001FEB1FE0390FE03F800003B51200C613FCEB1FE01F347DB126>I<EC01\nC0A214031407A2140F141FA2143F147F146F14CF1301EB038F140F1307130E130C131C13\n381330137013E013C0EA0180120313001206120E120C5A123812305A12E0B71280A3C738\n0FC000A94A7E0107B51280A321337EB226>I<000C14C0380FC00F90B5128015005C5C14\nF014C0D80C18C7FC90C8FCA9EB0FC0EB7FF8EBF07C380FC03F9038001F80EC0FC0120E00\n0CEB07E0A2C713F01403A215F8A41218127E12FEA315F0140712F8006014E01270EC0FC0\n6C131F003C14806CEB7F00380F80FE3807FFF8000113E038003F801D347CB126>I<1230\n123C003FB6FCA34814FEA215FC0070C7123800601430157015E04814C01401EC0380C7EA\n07001406140E5C141814385CA25CA2495A1303A3495AA2130FA3131F91C7FCA25BA55BA9\n131C20347CB126>55 D<123C127E12FFA4127E123C1200B0123C127E12FFA4127E123C08\n207A9F15>58 D<B512FEA3D803FEC9FC6C5AB3A9EE0180A416031700A45EA25E5E5E5E16\nFE00031407B7FCA329337DB230>76 D<D8FFFC923801FFF86D5DA20003EFFE00D801BFED\n06FCA3D99F80140CA2D98FC01418A3D987E01430A2D983F01460A3D981F814C0A3D980FC\nEB0180A2027EEB0300A36E1306A26E6C5AA36E6C5AA36E6C5AA26E6C5AA36E6C5AA39138\n00FD80A2037FC7FCA3486C133ED80FF04B7EB5011C90387FFFF8A33D337CB246>I<007F\nB712FEA390398007F001D87C00EC003E0078161E0070160EA20060160600E01607A34816\n03A6C71500B3AB4A7E011FB512FCA330337DB237>84 D<EB7F803803FFF0380F80FC381C\n003E003F133F6D6C7E6E7EA26E7EEA1F00C7FCA4EB01FF131FEBFF873803FC07EA0FF0EA\n1FC0EA3F80127F13004815C05AA3140FA26C131F6C133B3A3F8071F180391FC1E1FF2607\nFFC013003900FE003C22237DA126>97 D<EA03F012FFA312071203AEEC3F80ECFFE09038\nF3C0F89038F7007E01FE7F49EB1F8049EB0FC05BED07E016F0A2150316F8AA16F0150716\nE0A2ED0FC07F6DEB1F8001ECEB3F0001CF137C90388381F8903801FFE0C76CC7FC25357E\nB32B>I<EB07F8EB3FFF9038FC07C03901F000E03903E003F03807C007120FEA1F80123F\n90380003E04890C7FCA2127E12FEAA127FA26C14187F001F14386D1330000F14706C6C13\nE03903F001C03900FC0F8090383FFE00EB07F01D237EA122>I<153FEC0FFFA3EC007F81\nAEEB07F0EB3FFCEBFC0F3901F003BF3907E001FF48487E48487F8148C7FCA25A127E12FE\nAA127E127FA27E6C6C5BA26C6C5B6C6C4813803A03F007BFFC3900F81E3FEB3FFCD90FE0\n130026357DB32B>I<EB0FE0EB7FFCEBF83F3903F00F80D807E013C0390FC007E0381F80\n0315F0EA3F0014014814F8127EA212FEA2B6FCA248C8FCA5127E127FA26C1418A26C6C13\n38000F14306D13706C6C13E03901F003C03900FC0F00EB3FFEEB07F01D237EA122>I<EB\n01FCEB07FF90381F078090383E0FC0EB7C1F13FCEA01F8A20003EB070049C7FCACB512F0\nA3D803F0C7FCB3A7487E387FFFE0A31A357FB417>I<EA03F012FFA312071203AEEC1FC0\nEC7FF09038F1E0FC9038F3807C9038F7007E13FE497FA25BA25BB3486CEB7F80B538C7FF\nFCA326347EB32B>104 D<EA0780EA0FC0EA1FE0A4EA0FC0EA0780C7FCAAEA07E012FFA3\n120F1207B3A6EA0FF0B5FCA310337EB215>I<EA03F012FFA312071203AF913803FFE0A3\n6E1300EC00F8EC01E05D4A5A020FC7FC141C5C5C14F0EBF3F8EBF7FC13FEEBFC7EEBF87F\n496C7E141F6E7E8114076E7E8114016E7E81486CEBFF80B500C313F0A324347EB329>\n107 D<EA07E012FFA3120F1207B3B3A7EA0FF0B5FCA310347EB315>I<2703F01FE013FF\n00FF90267FF80313C0903BF1E07C0F03E0903BF3803E1C01F02807F7003F387FD803FE14\n70496D486C7EA2495CA2495CB3486C496C487EB53BC7FFFE3FFFF0A33C217EA041>I<39\n03F01FC000FFEB7FF09038F1E0FC9038F3807C3907F7007EEA03FE497FA25BA25BB3486C\nEB7F80B538C7FFFCA326217EA02B>I<EB07F0EB3FFE9038FC1F803901F007C03903C001\nE000078048486C7E48C7127CA248147E003E143E007E143FA300FE1580A8007E1500A36C\n147EA26C147C6D13FC6C6C485A00075C3903F007E03900FC1F80D93FFEC7FCEB07F02123\n7EA126>I<3903F03F8000FFEBFFE09038F3C0F89038F7007ED807FE7F6C48EB1F804914\nC049130F16E0ED07F0A3ED03F8A9150716F0A216E0150F16C06D131F6DEB3F80160001FF\n13FC9038F381F89038F1FFE0D9F07FC7FC91C8FCAA487EB512C0A325307EA02B>I<9038\n07F00390383FFC07EBFC0F3901F8038F3807E001000F14DF48486CB4FC497F123F90C77E\n5AA25A5AA9127FA36C6C5B121F6D5B000F5B3907E003BF3903F0073F3800F81EEB3FF8EB\n0FE090C7FCAAED7F8091380FFFFCA326307DA029>I<3803E07C38FFE1FF9038E38F8090\n38E71FC0EA07EEEA03ECA29038FC0F8049C7FCA35BB2487EB512E0A31A217FA01E>I<EB\nFF06000713CE381F00FE003C133E48131E140E5A1406A27EA200FE90C7FC6C7EEA7FFC38\n3FFFC014F0000F7F6C7FC67FEB0FFF1300EC3F8000C0131F140F6C1307A37E15006C5B6C\n130E6C5B38F7807838E1FFE038C07F8019237EA11E>I<1330A51370A313F0A21201A212\n031207381FFFFEB5FCA23803F000AF1403A814073801F806A23800FC0EEB7E1CEB1FF8EB\n07E0182F7FAD1E>I<D803F0133F00FFEB0FFFA30007EB007F000380B35DA35D12016D48\n13800000903803BFFC90387E073FEB1FFED907F8130026227EA02B>I<B53801FFF8A326\n03FE0013806C48EB7C0000001478017E1370017F5B90383F81C090381F8380D90FC3C7FC\nEB07E614FE6D5A6D5A6D7E80805B9038039F809038071FC09038060FE0EB0C0790381C03\nF0496C7E01707FEBF000000180000FECFF8026FFFC0313FCA326207F9F29>120\nD<3A7FFF807FF8A33A07F8001FC00003EC0F800001EC070015066C6C5BA26D131C017E13\n18A26D5BA2EC8070011F1360ECC0E0010F5BA2903807E180A214F3010390C7FC14FBEB01\nFEA26D5AA31478A21430A25CA214E05CA2495A1278D8FC03C8FCA21306130EEA701CEA78\n38EA1FF0EA0FC025307F9F29>I E\n%EndDVIPSBitmapFont\n%DVIPSBitmapFont: Fk cmtt12 12 23\n/Fk 23 118 df<121FEA3F80EA7FC0EAFFE0A5EA7FC0EA3F80EA1F000B0B6C8A33>46\nD<161E167E16FF15035DED1FFE157FEDFFF8020313F04A13C0021F138091383FFE00ECFF\nF8495B010713C0495BD93FFEC7FC495A3801FFF0485B000F13804890C8FCEA7FFC5BEAFF\nE05B7FEA7FF87FEA1FFF6C7F000313E06C7F38007FFC6D7E90380FFF806D7F010113F06D\n7FEC3FFE91381FFF80020713C06E13F0020013F8ED7FFE151FED07FF811500167E161E28\n337BB733>60 D<1278127EB4FC13C07FEA7FF813FEEA1FFF6C13C000037F6C13F86C6C7E\nEB1FFF6D7F010313E06D7F9038007FFC6E7E91380FFF806E13C0020113F06E13F8ED3FFE\n151FED07FF815DED1FFE153FEDFFF84A13F0020713C04A138091383FFE004A5A903801FF\nF0495B010F13804990C7FCEB7FFC48485A4813E0000F5B4890C8FCEA7FFE13F8EAFFE05B\n90C9FC127E127828337BB733>62 D<EC07F8EC3FFF91B57E010314E0010F80498090383F\nFC0F90397FE003FC9038FF80014890C77ED803FC147E49EB7E7F0007903801FFBFD9F007\n13FF4848481480495A001F5B018013C3003FEB7F810100010013C002FE137F4849133FEA\n7E014A131FA212FEEAFC034A130FA96E131FD8FE011580127EA26E133FD87F0015006C6D\n5B027F13FE01801381001F90383FC3FC01C013FF000F6D5B6D6C5B6C6C6C5BD9F8011380\n0003D9007EC7FC6D9038000F806CB4EC1FC06C6D133FD97FE013FF90263FFC0713806DB6\n12006D5C010314F801005C023F1380DA07FCC7FC2A3F7CBD33>64\nD<D83FF8EC1FFC486CEC3FFE486CEC7FFFA2007F16FE6C6CECFFFC000716E001EF14F7EC\n8001A39039E7C003E7A3ECE007A201E314C7A2ECF00FA201E11487ECF81FA201E01407A2\nECFC3FA2EC7C3E157E147EEC3E7CA3EC1E78EC1FF8A2EC0FF0A3EC07E0EC03C091C7FCAE\nD83FFCEC3FFC486CEC7FFEB591B5FCA26C48EC7FFE6C48EC3FFC303D7FBC33>77\nD<EB1FFC90B57E000314E048804814FC48809038F007FFEBE0016E7F153F6C48806C4813\n1FC87F150FA5EC0FFF49B5FC131F137F48B6FC0007140F4813C0381FFC00EA3FF0EA7FC0\n5B48C7FC5AA56C141F7E6D137FD83FE0497ED9F807EBFFF06CB712F87E6C14F36C14C1C6\n9138003FF0D91FF090C7FC2D2E7BAC33>97 D<ECFFF0010713FE011FEBFF804914C04914\nE048B612F048EBC01F9038FE000F485A485A4848EB07E049EB03C0484890C7FC5BA2127F\n90C9FCA25A5AA97E7EA27F003FEC01F06DEB03F86C7E6D13076C6C14F06C6C130F01FFEB\n1FE06CEBE07F6C90B512C06C1580013F14006D13FC01075B010013C0252E79AC33>99\nD<ED7FF84B7E5CA280157F1501ABEB01FF010713C1011F13F1017F13F990B6FC5A481381\n3907FE003FD80FF8131F49130F48481307491303123F491301127F90C7FCA25A5AA97E7E\n15037F123F6D1307A26C6C130F6D131F6C6C133F6C6C137F2603FF81B512F091B612F8C6\n02FD13FC6D13F96D01E113F8010F018013F0D901FEC8FC2E3E7DBC33>I<ECFF80010713\nF0011F13FC497F90B6FC48158048018013C03A07FE003FE001F8EB0FF048481307484814\nF8491303003F15FC491301127F90C7FC16FE15005A5AB7FCA516FC48C9FC7E7EA36C7E16\n7C6C6C14FE7F6C7E6D13016C6CEB03FC6CB4130F6C9038C03FF86C90B512F06D14E06D14\nC0010F1400010313FC9038007FE0272E7BAC33>I<ED3FE0913801FFFC020713FE141F4A\n13FF5CECFFC015004948137E4A133C010314005CA8003FB612F84815FCB7FCA36C15F826\n0003F8C7FCB3AD003FB612804815C0A46C1580283E7DBD33>I<D901FEEB1FE0903A0FFF\nC0FFF0013F01F313F84990B512FC90B7FC5A48010313E12607FC00EB80F849017F136048\n4890383FC00049131FA2001F8149130FA66D131F000F5DA26D133F6C6C495A6D13FF2603\nFF0390C7FCECFFFE485C5D5DD80FCF13C0D981FEC8FC0180C9FCA27FA26C7E7F90B512FC\n6CECFFC06C15F0000715FC4815FF4816809038E0000748489038007FC090C8EA1FE04815\n0F007E150700FE16F0481503A56C1507007E16E0007F150F6C6CEC1FC001E0147FD81FF8\n903801FF80270FFF801F13006C90B55A6C5DC615F0013F14C0010F91C7FC010013F02E44\n7DAB33>I<14E0EB03F8A2497EA36D5AA2EB00E091C8FCAA383FFFF8487FA47EEA0001B3\nAD007FB612C0B712E016F0A216E06C15C0243E78BD33>105 D<EA7FF8487EA4127F1200\nAC4AB512C04A14E04A14F0A26E14E06E14C09139000FF0004B5A4B5A4B5A4BC7FC4A5A4A\n5A4A5A4A5A4A5A4A5A4A5A4A7E01FD7F90B5FC81ECF3F8ECE3FC14C1EC80FEEC007F5B49\n6D7E6F7E82150F6F7E6F7E8215016F7E3B7FFFF80FFFF0B56C4813F817FCA217F86C496C\n13F02E3D7EBC33>107 D<383FFFFC487FB5FCA27E7EC7FCB3B3AD003FB612F84815FCB7\n12FEA26C15FC6C15F8273D7ABC33>I<02FC137E3B7FC3FF01FF80D8FFEF01877F90B500\nCF7F15DF92B57E6C010F13872607FE07130301FC01FE7F9039F803FC01A201F013F8A401\nE013F0B3A53C7FFE0FFF07FF80B548018F13C0A46C486C01071380322C80AB33>I<4AB4\nFC263FFC0713C0267FFE1F13F000FF017F7F91B5FC6CB67E6CEC07FEC6EBF801ECF0004A\n7F4A7F5CA291C7FCA35BB3A43B3FFFF80FFFFC486D4813FEB56C4813FFA26C496C13FE6C\n496C13FC302C7FAB33>I<EB01FE90380FFFC0013F13F0497F90B57E488048EB03FF2607\nFC0013804848EB7FC049133F4848EB1FE049130F4848EB07F0A2007F15F890C71203A300\nFEEC01FCAA6C14036C15F8A26D1307003F15F06D130FA26C6CEB1FE06D133F6C6CEB7FC0\n6C6CEBFF802603FF0313006CEBFFFE6C5C6D5B6D5B010F13C0D901FEC7FC262E7AAC33>\nI<EC01FE3A3FFC0FFFC0486C4813F000FF017F7F91B512FE6CB7FC6CEBFE07C6D9F80013\n8002E0EB7FC04AEB3FE04A131FEE0FF091C7FC16074915F81603A217FC1601A9160317F8\nA26D140717F06E130F17E06E131FEE3FC06E137F9139F801FF80DAFE07130091B55A495C\n6E5B6E13E0020F1380DA03FEC7FC91C9FCAF383FFFF8487FB57EA26C5B6C5B2E427FAB33\n>I<02FF137C0107EBE0FE011F13F0017F13FC90B512FE4814FF4813C03907FE003F4848\n131F01F0130F484813071503485A491301127F90C7FC15005A5AA97E7E15017F123F6D13\n0315076C7E6C6C130F6D131FD807FE137F3903FF81FF6CEBFFFE6C14FC6D13F86D13F001\n0F13C0903801FE0090C8FCAF92387FFFFC92B512FEA46F13FC2F427CAB33>I<ED03FE3B\n7FFF801FFF80B5D8C07F13E002C1B5FC02C314F014C76C9038CFFE0F39001FDFF09139FF\nC007E092388003C092C8FC5C5C5CA25CA25CA35CB2007FB512FEB7FCA46C5C2C2C7DAB33\n>I<90381FFE0F90B5EA8F80000314FF120F5A5AEBF007387F800190C7FC00FE147F5A15\n3FA37E007FEC1F0001C090C7FCEA3FF8EBFFC06C13FF6C14E0000314F8C680011F13FF01\n001480020713C0EC007FED1FE0007C140F00FEEC07F01503A27EA27F15076D14E06D130F\n6DEB3FC09038FE01FF90B61280160000FD5C00FC14F8D8F83F13E0D8780790C7FC242E79\nAC33>I<EB03C0497E130FAA003FB612FC4881B7FCA36C5D26000FE0C8FCB3A3161FEE3F\n80A5167F6E140001075C6E5A9138FE07FE6DB55A6D5C6D5C6E5B021F1380DA07FCC7FC29\n387EB633>I<D83FFCEB1FFE486C497E00FF5CA2007F80003F800000EC007FB3A75EA25D\nA26D5B90387F800FDAE03F13FC6DB612FE17FF6D806D01FE13FE01039038F83FFC010001\nC0C7FC302C7FAA33>I E\n%EndDVIPSBitmapFont\n%DVIPSBitmapFont: Fl cmr12 12 9\n/Fl 9 118 df<B612F0A3C6EBF0006D5A6D5AB3B3B3A4497E497EB612F0A31C447DC323>\n73 D<B712FCEEFFC017F800019039C0000FFC6C6C48EB01FF9338007F80EF1FE0170FEF\n07F018F8EF03FCA218FE1701A218FFA718FEA2170318FCA2EF07F818F0EF0FE0EF1FC0EF\n7F80933801FE00EE0FFC91B612F017800280C9FCB3AA3801FFE0B612C0A338447CC342>\n80 D<EB07FC90383FFF809038F80FE03903C003F048C66C7E000E6D7ED80FC0137E486C\n137F6D6D7EA36F7EA26C5AEA0380C8FCA4EC0FFF49B5FC90380FFE1FEB3FC0EBFF00EA03\nFC485A485A485A485A127F5B176048C7FCA3153FA36D137F007F14EF6D9038C7E0C0003F\n13013A1FE00783F13B07F81E03FF802701FFFC0113003A001FE0007C2B2E7CAC31>97\nD<EA01E0EA07F8A2487EA46C5AA2EA01E0C8FCADEA01FC12FFA3120712031201B3B0487E\nB512F8A315437DC21C>105 D<D801FC01FFEC1FE000FF010701E0EBFFFC913B0F03F801\nE07F913C3C01FC07803F800007903C7000FE0E001FC0000349D97E1C130F2601FDC0D97F\n38804A143001FFDA3FF06D7E91C75BA2495DA3495DB3A8486C4A6C497EB5D8F81FB50003\nB512E0A34B2C7DAB52>109 D<3901FC01FE00FF903807FFC091381E07F091383801F800\n0701707F0003EBE0002601FDC07F5C01FF147F91C7FCA25BA35BB3A8486CECFF80B5D8F8\n3F13FEA32F2C7DAB36>I<3903F803F000FFEB1FFCEC3C3EEC707F0007EBE0FF3803F9C0\n00015B13FBEC007E153C01FF13005BA45BB3A748B4FCB512FEA3202C7DAB26>114\nD<1306A5130EA4131EA3133E137EA213FE12011207001FB512F0B6FCA2C648C7FCB3A415\n0CAA017E131C017F1318A26D133890381F8030ECC070903807E0E0903801FFC09038007F\n001E3E7EBC26>116 D<D801FC147F00FFEC3FFFA300071401000380000181B3A85EA35D\nA212006D5B017E9038077F80017F010E13C06D011C13FE90380FC078903803FFF0902600\n7F8013002F2D7DAB36>I E\n%EndDVIPSBitmapFont\n%DVIPSBitmapFont: Fm cmmi12 17.28 1\n/Fm 1 63 df<127812FE6C7E13E013F8EA3FFE380FFF80000313E0C613F8EB3FFE90380F\nFF80010313E0010013F8EC3FFE91380FFF80020313E0020013F8ED3FFE92380FFF800303\n13F0030013FCEE3FFF040F13C0040313F0040013FCEF1FFF050713C0050113F09438007F\nFCF01FFF060713C0060113F09538007FFCF11FFF070713C0070113F09638007FFCF21FFF\n080713E0080113F0F2007FA2F201FF080713E0081F1300F27FFC963801FFF0070713C007\n1F90C7FCF17FFC953801FFF0060713C0061F90C8FCF07FFC943801FFF0050713C0051F90\nC9FCEFFFFC040313F0040F13C0043F90CAFCEEFFFC030313F0030F1380DB3FFECBFCEDFF\nF8020313E0020F1380DA3FFECCFCECFFF8010313E0010F1380D93FFECDFCEBFFF8000313\nE0000F1380D83FFECEFCEAFFF813E0138048CFFC1278545274CC6D>62\nD E\n%EndDVIPSBitmapFont\n%DVIPSBitmapFont: Fn cmr17 17.28 26\n/Fn 26 121 df<150E151E153C157815F0EC01E0EC03C01407EC0F80EC1F00143EA25C5C\n13015C495A13075C130F5C131F91C7FC5B133E137E137C13FCA2485AA3485AA3485AA312\n0F5BA3121F5BA3123FA390C8FCA25AA5127EA312FEB3A7127EA3127FA57EA27FA3121FA3\n7F120FA37F1207A36C7EA36C7EA36C7EA2137C137E133E133F7F80130F8013078013036D\n7E801300147C80A280EC0F80EC07C01403EC01E0EC00F01578153C151E150E1F8F73EA33\n>40 D<12E07E12787E7E7E6C7E7F6C7E6C7E6C7EA2137C7F133F7F6D7E80130780130380\n130180130080147C147EA280A3EC1F80A3EC0FC0A315E01407A315F01403A315F8A31401\nA215FCA51400A315FEB3A715FCA31401A515F8A21403A315F0A3140715E0A3140F15C0A3\nEC1F80A3EC3F00A3147EA2147C14FC5C13015C13035C13075C130F5C49C7FC5B133E5B5B\nA2485A485A485A5B48C8FC121E5A5A5A5A1F8F7AEA33>I<120FEA3FC0EA7FE0EAFFF0A6\nEA7FE0EA3FC0EA0F000C0C748B24>46 D<EC0FFE91387FFFE00103B512F8010F14FE903A\n1FE00FFF8090263E000113E001FC6D6C7ED801F06E7E4848EC0FFC496E7E48486E7E48C8\n1480000E81001E6F13C0121C003CEE7FE012380078EE3FF01270A3B46CED1FF813E0A27F\nA66C5A6C5A0006C913F0CA123FA318E0177FA2EFFFC0A218805E18004C5A16075F4C5A5F\n161F4C5A4C5A5F4CC7FC4B5A4B5A5E4B5A4B5A4B5A4B5A4BC8FC157E5D4A5A4A5A4A5A4A\n5A4A5A4AC9FC143E4A15385C495A495A49481570495A49C9FC131E5B4916F05B484816E0\n484815014848150348B8FCA25A5A5AB912C0A4355E7ADD42>50 D<913803FF80023F13F8\n49B512FE01076E7E90261FFC0013E0D93FC0EB3FF8017EC7EA0FFC01F86E7E48486E7E48\n486E13804848804916C048C9EA7FE013E013F8486CED3FF07FA66C5A6C5AEA01E0CAEA7F\nE0A318C017FF18805E18005E5F4C5A4C5A4C5A4C5AEE7F804CC7FCED03FC913801FFF091\nB512C05E16F891380001FE9238003F80EE1FE0EE07F8707E707E83701380EF7FC018E017\n3F18F018F8171FA218FCA2170F18FEA21207EA1FC0EA7FF0A2487EA5EF1FFC5B5B6C4816\nF80078C9123F18F07EEF7FE07E001FEEFFC06C6C4A13806C7E6C6C4A1300D801F84A5AD8\n00FEEC1FF8D93FC0495A903A1FFC01FFE00107B6128001014AC7FCD9003F13F002031380\n37607BDD42>I<007FBD1280BE12C0A36C1C80D1FCB3A3007FBD1280BE12C0A36C1C805A\n1F7AB267>61 D<B912F018FF19E019FCC601FCC8EA3FFED93FF8923807FF80011F04017F\n9538007FF0737E737E737E1907737E1B80857313C0A21BE01A7FA21BF0A91BE01AFFA21B\nC0611B804F1300614F5A62F13FF84F5AF1FFC006035BDE0FFEC7FCF07FF894380FFFE091\nB8C8FC19E019FC02F8C83803FF8006007FF13FF0F10FFC737E737E7313807313C0F27FE0\n1BF01A3FF21FF8A21BFC1A0F1BFEA21A071BFFA91BFE1A0FA3F21FFCA2F23FF8A2F27FF0\nF2FFE0614F13C04F13804F1300F13FFE4F5A013F933803FFF0D9FFFC031F5BBB12804FC7\nFC19F096C8FC506279E15E>66 D<DA07FF1403023F01F05B49B512FC010702FF5B90260F\nFC0013C0D93FE090380FF01FD97F80EB03F801FEC86C5A4848157E4848ED1F7F48486F5A\n4848815B001F824981003F8290CAFC4883A2007E83A212FE84A384A27EA36D82A26C7EA2\n6D93C7FC6C7E7F7F6C7E6D7E6C13E06C13FCECFFC06C14F86CECFF806C15F86DECFF8001\n1F15E06D15F8010315FE01006F7E021F81020181DA003F80030380DB003F7F04037FEE00\n7FEF1FFF71138017037113C083A2F07FE0183FA2181F00E018F0180FA41807A27EA47E19\nE0180F7E19C07E6C171F19806D163F6D17006D5E6D16FE486C5E6D4B5AD8FC7F1503D91F\n80EC0FF026F80FE04A5AD907FCEC7F8029F001FFE003FFC7FC6D6CB512FC48011F14F002\n0314C0489026001FFEC8FC3C667AE349>83 D<B7031FB512F0A4C691CAEBFE00D93FFCEF\n3FF86D48EF0FE0A2745AA2745AB3B3B3A71A07010F96C7FC80A30107601A0E6E171E1303\n1A1C6D6C173C1A386D6D1678626E7E023F4C5A6F4B5A6E6C15076E6C4B5A6E6C4BC8FC6E\n6C153E6E6C15FC9126007FC0495ADB3FF0EB0FF0DB0FFEEB7FC00303B6C9FC030014FC04\n3F13F004031380546479E163>85 D<EC3FF0903803FFFE010F6D7E90393FC03FE090397E\n0007F801F86D7ED801E06D7E48486D7E48486E7E48C86C7E7F01F06E7E487E6D6E7EA370\n7EA36C5AEA03E0C9FCA6167FED7FFF020FB5FC91387FF807903801FF80903807FC00EB1F\nF0EB7FC0495AD803FEC7FC485A120F5B485A485AA2484817E0A312FF5BA2160FA3161F6D\n141B007F153B16736D913971FC01C06C6C14E1001FEC01C1D80FFC903A0780FE03806C6C\n903A0F00FF07002701FF807E6DB4FC27007FFFF86D5A011F01E0EB1FF8010190C7EA07E0\n3B417ABF42>97 D<4AB47E020F13F8023F13FE9139FF007F80D903FCEB07E0D907F0EB01\nF0D91FE0EB007849488049488049C87E48485D4915FF00034B138048485CA2485AA2485A\nA2003F6F130049EC007C94C7FC127FA35B12FFAD127F7FA4123F7FA2001FEE01C07F000F\n16036D168012076C6C15076D160000015E6C6C151E6D6C5C6D6C5C6D6C5CD90FF8495AD9\n03FCEB07C0903A00FF803F8091263FFFFEC7FC020F13F80201138032417CBF3A>99\nD<181EEF3FFEEE07FFA4EE000F1703A21701B3AAEDFF80020F13F8023F13FE9139FF803F\n81903A03FC0007C14948EB01E1D91FE0EB00F94948147D4948143D49C8121F4848150F49\n1507120348481503491501120F121F5BA2123F5B127FA45B12FFAD127F7FA3123FA27F12\n1FA26C6C1503A26C6C150712036D150F6C6C151F0000163D137F6D6CECF9FF6D6CEB01F1\nD90FF0D903C113C06D6CD90F81EBFF80D901FFEB7F019039007FFFFC021F13E002010100\n91C7FC41657CE349>I<EC03FE91381FFFE091B512F8903901FE03FE903A07F0007F8049\n486D7ED93FC06D7E49C76C7E496E7E49140348488148481401000782491400000F828348\n5A1880123F49153FA2007F17C0A35BA212FF90B8FCA30180CAFCA9127F7FA3123FA27F12\n1FEF01C06C7E17036C6C1680A26C6C15070001EE0F006D150E6C6C151E6D6C5C6D6C5C6D\n6C5CD907F0EB03E0D903FC495A902700FF803FC7FC91383FFFFC020F13F0020113803241\n7CBF3A>I<ED0FF0ED7FFC4AB5FC913907F81F8091390FE00FC091381FC03F91393F807F\nE0EC7F005C495A5C0103EC3FC0A24948EB0F0093C7FCA2495AB3A5B712F0A426000FF0C8\nFCB3B3B0497EEB3FFE003FB6FCA42B657EE428>I<F03F80DA03FC903801FFE091273FFF\nC00713F091B539F01FC1F8903B03FC03FC3E03903A07F000FE784948EB7FE04948EB3FC0\n4948011FEB01F049C76C6CC7FC01FE6E7EA248486E7EA2000382A2491401000782AA0003\n5E6D1403A200015EA26C6C4A5AA2017F4A5A6D6C495A6D6C495A496C49C8FCD937F013FE\n903973FC03FC0160B512F0D9E03F13C0DA03FCC9FC4848CBFCA57FA27FA27F6C7E13FF91\nB512FE6DECFFF06D15FE6D6F7E6D16E084013F16FC01FEC700017FD803F8EC001FD807E0\nED03FF4848030013804848167F003FEF3FC090CA121F127EF00FE012FE481707A66C170F\n007E18C0A2007F171F6C6CEE3F806C6CEE7F00000F177ED807F04B5A6C6C4B5A6C6C4B5A\nD8007FED1FC0D93FE0ECFF80D90FFED90FFEC7FC0101B612F0D9003F1480020101F0C8FC\n3D5E7DBF42>I<133C13FF487F487FA66C5B6C90C7FC133C90C8FCB3A2EB03C0EA07FF12\n7FA41201EA007FA2133FB3B3AC497E497EB612E0A41B5F7DDE23>105\nD<EB03C0EA07FFB5FCA41201EA007FA2133FB3AB0403B512F8A40400148094387FFC0018\nE06095C7FC177E5F17F04C5A4C5A4C5A4CC8FC163E5E5E4B5A4B5A4B5A4B5A151F4B7E4B\n7E15FF02C17F9138C3CFF8ECC7879138CF07FC9138FE03FEECFC0102F87F4A6C7F4A137F\n4A80707E161F83707E160783707E160183707F177F84717E171F84717E84A284496CEDFF\n80496C4A13E0B600F090B6FCA440647CE346>107 D<EB03C0EA07FFB5FCA41201EA007F\nA2133FB3B3B3B3AD497E497EB612F0A41C647DE323>I<D903C0D9FFC0EC07FED807FF01\n0301F891381FFFC0B5010F01FE027F13F0923D3F00FF8001F807FC0378903B3FC003C001\nFEDAC1E090261FE00FC77E0001D9C3C090260FF01E6E7ED8007F49902607F81C6E7E02C7\nC75CD93FCE6E6C486E7E02CC166002DC16E002D85E02F8DA01FF6F7E4A5EA24A93C8FCA4\n4A5DB3B3496C4A6C4B7E496C4A6D4A7EB6D8F007B6D8803FB512FCA4663F7CBE6F>I<D9\n03C0EB7FE0D807FF903803FFFCB5010F13FFDB3F0013C00378EB1FE04B6D7E0001D9C1C0\n6D7E27007FC3808002C7C71203D93FCE81170114DC14D802F86E7E5CA35CA35CB3B3496C\n4A7F496C4A7FB6D8F003B612C0A4423F7DBE49>I<EDFF80020F13F8023F13FE9139FF00\n7F80D903FCEB1FE0D907F0EB07F0D90FC0EB01F8D93F80EB00FE49C8127F017E81496F7E\n48486F7E00038349150700078348486F7EA2001F83491501A2003F83A348486F7EA400FF\n1880AC007F1800A26D5DA2003F5FA36C6C4B5AA36C6C4B5A00075FA26C6C4B5A6C6C4B5A\nA26C6C4B5A017F4BC7FC6D6C14FE6D6C495AD90FF0EB07F8D903FCEB1FE0D900FFEB7F80\n6EB5C8FC020F13F8020113C039417CBF42>I<DBFF80131C020F13F0023F01FC133C9138\nFF807E903A03FE000F80D907F8903807C07CD91FF0EB01E0494813004948EC70FC494814\n784890C8123C4848151D49151F0007160F485A1707485AA2491503123FA2485AA5485AAC\n7F127FA46C7EA36C7E1707120F6D150F12076D151F6C7E0001163B6C6C157B6D6C14F36D\n6CEB01E36D6CEB03C36D6CEB0783D907FCEB1F03D901FF13FC9039007FFFF8021F13E091\n3803FE0091C8FCB3A34D7E4D7E040FB6FCA4405B7BBE46>113 D<9039078003F8D807FF\nEB0FFFB5013F13C092387C0FE0913881F01F9238E03FF00001EB838039007F8700148FEB\n3F8E029CEB1FE0EE0FC00298EB030002B890C7FCA214B014F0A25CA55CB3B0497EEBFFF8\nB612FCA42C3F7CBE33>I<9139FFE00180010FEBFC03017FEBFF073A01FF001FCFD803F8\nEB03EFD807E0EB01FF48487F4848147F48C8123F003E151F007E150F127CA200FC1507A3\n16037EA27E7F6C7E6D91C7FC13F8EA3FFE381FFFF06CEBFF806C14F86C14FF6C15C06C6C\n14F0011F80010714FED9007F7F02031480DA003F13C01503030013E0167F00E0ED1FF016\n0F17F86C15071603A36C1501A37EA26C16F016037E17E06D14076DEC0FC06D1580D8FDF0\n141FD8F8F8EC7F00013E14FC3AF01FC00FF80107B512E0D8E001148027C0003FF8C7FC2D\n417DBF34>I<D903C0150FD807FFED1FFFB50203B5FCA40001ED0007D8007F1501A2013F\n81B3B25FA35FA35F011F15066E140E5F130F6E4A7F01075D6D6C494813E0D901FE4948EB\nFFC0903A00FFC01F8091393FFFFE00020F13F8020001C0EC800042407DBE49>117\nD<007FB500C0010FB512E0A4C691C70003EBFC00D93FFE6E13E0D90FFC16807148C7FC01\n075E6D6C4A5A6D6C5D6D6D495A606E6C495A6E6C49C8FC6E6C130E171E6E6C5B6E6C5B6E\n6C5B5F913801FF016EEB83C092387FC780033F90C9FC16EFED1FFE6F5A6F5A826F7E6F7E\n5D834B7F92380F3FE0ED1E1F033C7F9238380FF892387807FCEDF003DA01E07F4A486C7E\n707F4A486D7E4AC7FC021E6E7E021C6E7E023C6E7E5C4A6E7E01016F7E49486E7E130701\n0F6F7F013F83D9FFF04A7F00076D4A13FCB56C020FEBFFF8A4453E80BD46>120\nD E\n%EndDVIPSBitmapFont\nend\n%%EndProlog\n%%BeginSetup\n%%Feature: *Resolution 600dpi\nTeXDict begin\n%%PaperSize: A4\n end\n%%EndSetup\n%%Page: 1 1\nTeXDict begin 1 0 bop Black Black Black Black 676 872\na Fn(Building)47 b(Unix)d(Squeak)f(\\()p Fm(>)p Fn(=)h(3.2\\))e(from)g\n(source)1660 1196 y Fl(Ian)33 b(Piumarta)1204 1313 y\nFk(<ian.piumarta@squeakland.or)q(g>)807 1525 y Fj(Last)26\nb(edited:)34 b(2005-03-17)28 b(12:43:23)h(b)n(y)24 b(piumarta)h(on)h\n(squeak.hpl.hp.com)1103 1625 y(T)-6 b(ranslated)26 b(to)g(.ps/.p)r\n(df/.h)n(tml/.txt:)35 b(Marc)n(h)26 b(17,)h(2005)515\n1995 y Fi(Con)l(ten)l(ts)515 2212 y Fh(0)76 b(The)32\nb(easy)g(w)m(a)m(y)2128 b(2)515 2429 y(1)76 b(The)32\nb(hard)h(w)m(a)m(y:con\\014gure,)f(build,)f(install)1122\nb(3)515 2646 y(2)76 b(Generating)32 b(y)m(our)h(o)m(wn)e(VM)h(and)g\n(plugin)f(sources)803 b(4)639 2780 y Fg(2.1)84 b(Ho)n(w)28\nb Ff(configure)c Fg(\\014nds)k(the)g Ff(src)f Fg(directory)75\nb(.)42 b(.)g(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)p\nBlack 131 w(5)p Black 515 2997 a Fh(3)76 b(Adding)32\nb(y)m(our)g(o)m(wn)g(plugins)1637 b(5)639 3131 y Fg(3.1)84\nb(Plugin-sp)r(eci\\014c)27 b(con\\014guration)k(.)42 b(.)g(.)f(.)h(.)f(.)\nh(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)p\nBlack 131 w(6)p Black 830 3265 a(3.1.1)94 b Ff(AC)p 1189\n3265 27 4 v 30 w(PLUGIN)p 1483 3265 V 29 w(CHECK)p 1732\n3265 V 30 w(LIB\\()p Fe(lib)p Ff(,)p Fe(func)9 b Ff(\\))70\nb Fg(.)42 b(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)p\nBlack 131 w(6)p Black 830 3399 a(3.1.2)94 b Ff(AC)p 1189\n3399 V 30 w(PLUGIN)p 1483 3399 V 29 w(DEFINE)p 1776 3399\nV 29 w(UNQUOTED\\()p Fe(keyword)p Ff(,)o Fe(te)o(xt)8\nb Ff(\\))22 b Fg(.)41 b(.)h(.)f(.)h(.)f(.)h(.)p Black\n131 w(7)p Black 830 3533 a(3.1.3)94 b(Plugin-sp)r(eci\\014c)27\nb(v)-5 b(ariables)54 b(.)41 b(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h\n(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)p Black 131 w(7)p Black\n639 3667 a(3.2)84 b(Plugin-sp)r(eci\\014c)27 b Ff(Makefile)d\nFg(declarations)i(and)i(rules)47 b(.)41 b(.)h(.)g(.)f(.)h(.)f(.)h(.)f\n(.)h(.)p Black 131 w(7)p Black 830 3801 a(3.2.1)94 b(The)28\nb(anatom)n(y)e(of)h(a)h(plugin's)f Ff(Makefile)40 b Fg(.)h(.)h(.)f(.)h\n(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)p Black 131 w(7)p Black\n830 3935 a(3.2.2)94 b(A)28 b(note)f(ab)r(out)h Ff($\\(COMPILE\\))23\nb Fg(and)28 b Ff($\\(LINK\\))d Fg(commands)39 b(.)j(.)f(.)h(.)p\nBlack 131 w(9)p Black 830 4069 a(3.2.3)94 b(Sp)r(ecifying)28\nb(additional)f(source)f(directories)20 b(.)42 b(.)f(.)h(.)g(.)f(.)h(.)f\n(.)h(.)f(.)h(.)p Black 90 w(10)p Black 830 4203 a(3.2.4)94\nb(Including)28 b(additional)f(material)f(in)i(the)g(default)g\nFf(Makefile)65 b Fg(.)42 b(.)p Black 90 w(10)p Black\n830 4337 a(3.2.5)94 b(Replacing)27 b(the)h(default)g\nFf(Makefile)c Fg(en)n(tirely)51 b(.)41 b(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)\nh(.)p Black 90 w(10)p Black 639 4470 a(3.3)84 b(Examples)27\nb(tak)n(en)g(from)g(existing)g(plugins)83 b(.)41 b(.)h(.)g(.)f(.)h(.)f\n(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)p Black 90 w(10)p\nBlack 830 4604 a(3.3.1)94 b(Con\\014guration)37 b(.)42\nb(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)g\n(.)f(.)h(.)f(.)h(.)f(.)h(.)p Black 90 w(11)p Black 830\n4738 a(3.3.2)94 b(Customising)27 b(the)h Ff(Makefile)18\nb Fg(.)42 b(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f\n(.)h(.)p Black 90 w(11)p Black 639 4872 a(3.4)84 b(Coping)27\nb(with)h(VMMak)n(er)f(quirks)33 b(.)42 b(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)\nf(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)p Black 90\nw(12)p Black 639 5006 a(3.5)84 b(If)28 b(all)g(else)f(fails)43\nb(.)e(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g\n(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)p Black\n90 w(12)p Black Black 1926 5255 a(1)p Black eop end\n%%Page: 2 2\nTeXDict begin 2 1 bop Black Black 515 523 a Fh(Index)2533\nb(12)515 839 y Fi(0)134 b(The)45 b(easy)h(w)l(a)l(y)515\n1062 y Fg(Beginning)35 b(with)i(v)n(ersion)d(3.7-7,)i(ev)n(erything)f\n(y)n(ou)g(need)i(is)e(included)i(with)f(the)h(Unix)515\n1162 y(sources)18 b(regardless)f(of)j(ho)n(w)f(y)n(ou)g(obtained)g\n(them)i({)e(either)g(as)g(a)h(tarball)f(or)f(b)n(y)i(rep)r(ository)515\n1262 y(c)n(hec)n(k)n(out.)34 b(\\(This)23 b(w)n(as)f(done)h(to)f\n(eliminate)h(frequen)n(t)g(problems)f(encoun)n(tered)g(b)n(y)h(p)r\n(eople)515 1361 y(com)n(bining)36 b(the)h(rep)r(ository)f(Unix)h(and)g\n(Cross)e(sources)g(with)j(a)e(set)h(of)g(incompatible)515\n1461 y(generated)26 b(sources.\\))515 1602 y(If)19 b(y)n(ou)f(extract)g\n(a)h(tarball)f(then)h(y)n(ou)f(will)h(ha)n(v)n(e)f(a)g(top-lev)n(el)g\n(directory)g(named)h Ff(Squeak-)t(X.)515 1702 y(Y-)t(Z)24\nb Fg(\\(for)h(some)g(v)-5 b(alues)25 b(of)g(X,)h(Y,)g(and)f(Z\\).)g(If)h\n(y)n(ou)f(are)f(c)n(hec)n(king)g(out)i(from)f(a)g(rep)r(ository)-7\nb(,)515 1801 y(y)n(ou)27 b(can)g(call)g(the)h(direcory)e(an)n(ything)h\n(y)n(ou)g(lik)n(e;)g(for)g(example:)p 0 0 1 TeXcolorrgb\nBlack 0 0 1 TeXcolorrgb 602 2009 a Ff($)43 b(svn)f(co)h\n(http://squeak.hpl)o(.h)o(p.)o(com)o(/s)o(vn/)o(sq)o(uea)o(k/)o(tr)o\n(unk)37 b(squeak)p Black 515 2216 a Fg(will)28 b(lea)n(v)n(e)f(y)n(ou)g\n(with)i(a)f(directory)f(called)h Ff(squeak)p Fg(.)36\nb(\\(W)-7 b(e'll)29 b(assume)e(from)h(no)n(w)g(on)g(that)515\n2316 y(the)g(directory)e(is)i(called)f Ff(squeak)p Fg(.\\))515\n2457 y(Next)c(c)n(hange)f(to)h(the)h('unix')f(directory)f(within)i(the)\ng(sources)d(that)j(y)n(ou)e(just)i(c)n(hec)n(k)n(ed)e(out)515\n2557 y(\\(or)27 b(extracted)g(from)g(the)h(tarball\\):)p\n0 0 1 TeXcolorrgb Black 0 0 1 TeXcolorrgb 602 2764 a\nFf($)43 b(cd)g(squeak/platforms)o(/u)o(nix)p Black 515\n2972 a Fg(Build)28 b(the)g(VM)g(and)f(plugins)g(b)n(y)h(running)f\nFf(make)p Fg(:)p 0 0 1 TeXcolorrgb Black 0 0 1 TeXcolorrgb\n602 3180 a Ff($)43 b(make)p Black 515 3387 a Fg(Then)32\nb(install)h(the)f(VM,)h(plugins)f(and)g(man)n(ual)g(pages)f(b)n(y)h\n(running)g Ff(make)f Fg(again)g(\\(with)515 3487 y(sup)r(eruser)26\nb(privileges\\):)p 0 0 1 TeXcolorrgb Black 0 0 1 TeXcolorrgb\n602 3694 a Ff($)43 b(sudo)f(make)g(install)p Black 515\n3902 a Fg(T)-7 b(o)34 b(delete)h(the)g(temp)r(orary)e(\\014les)i\n(created)e(during)i(the)g(build)g(pro)r(cess,)g(run)f\nFf(make)f Fg(one)515 4001 y(last)27 b(time:)p 0 0 1 TeXcolorrgb\nBlack 0 0 1 TeXcolorrgb 602 4209 a Ff($)43 b(make)f(clean)p\nBlack 515 4417 a Fg(That's)27 b(all)g(there)h(is)f(to)h(it.)p\nBlack 1926 5255 a(2)p Black eop end\n%%Page: 3 3\nTeXDict begin 3 2 bop Black Black 515 523 a Fi(1)134\nb(The)45 b(hard)g(w)l(a)l(y:)h(con\\014gure,)f(build,)g(install)515\n746 y Fg(Unix)18 b(Squeak)g(is)g(built)i(using)e(the)g(\\(almost\\))h\n(univ)n(ersal)e(\\\\)p Ff(configure;make)o(;ma)o(ke)o(in)o(sta)o(ll)o\nFg(\".)515 846 y(If)28 b(y)n(ou)f(ha)n(v)n(en't)f(come)i(across)d(this)j\n(b)r(efore,)f(read)g(on.)14 b(.)g(.)515 987 y(Create)33\nb(a)h(build)h(directory)e(\\(whic)n(h)h(w)n(e)g(will)g(call)g(`)p\nFf(blddir)p Fg(')e(from)i(no)n(w)f(on\\))i(and)f(then)515\n1087 y(`)p Ff(cd)p Fg(')27 b(to)g(it:)p 0 0 1 TeXcolorrgb\nBlack 0 0 1 TeXcolorrgb 602 1294 a Ff($)43 b(mkdir)f(blddir)602\n1394 y($)h(cd)g(blddir)p Black 515 1602 a Fg(A)28 b(con)n(v)n(enien)n\n(t)e(place)h(is)h(just)g(next)g(to)f(the)h Ff(platforms)c\nFg(directory)-7 b(,)27 b(lik)n(e)g(this:)p 0 0 1 TeXcolorrgb\nBlack 0 0 1 TeXcolorrgb 602 1809 a Ff($)43 b(cd)g(squeak)602\n1909 y($)g(ls)602 2008 y(platforms)d(src)i(...)602 2108\ny($)h(mkdir)f(bld)602 2208 y($)h(cd)g(bld)p Black 515\n2415 a Fg(Create)31 b(the)i(build)g(en)n(vironmen)n(t)f(b)n(y)g\n(running)g(the)h(script)f Ff(configure)d Fg(whic)n(h)j(liv)n(es)g(in)\n515 2515 y(the)c Ff(platforms/unix/c)o(on)o(fi)o(g)22\nb Fg(directory)-7 b(.)p 1 0 0 TeXcolorrgb Black 1 0 0\nTeXcolorrgb 722 2739 a(Note:)88 b(The)31 b Ff(configure)c\nFg(script)k(accepts)f(lots)h(of)g(options.)46 b(T)-7\nb(o)31 b(see)g(a)f(list)722 2839 y(of)e(them,)g(run:)37\nb(`)p Ff(configure)j(--help)p Fg(')p Black 515 3063 a(Assuming)27\nb(y)n(ou'v)n(e)f(created)h(the)h Ff(blddir)d Fg(next)j(to)g\nFf(platforms)p Fg(,)c(this)k(w)n(ould)f(b)r(e:)p 0 0 1\nTeXcolorrgb Black 0 0 1 TeXcolorrgb 602 3270 a Ff($)43\nb(../platforms/uni)o(x/c)o(on)o(fig)o(/c)o(on)o(fig)o(ur)o(e)p\nBlack 1 0 0 TeXcolorrgb Black 1 0 0 TeXcolorrgb 722 3561\na Fg(Note:)107 b(This)36 b(assumes)f(that)h(the)g(VMMak)n(er)f(sources)\ng(are)g(in)h(`)p Ff(../src)p Fg('.)722 3660 y(Ho)n(w)n(ev)n(er,)25\nb(since)i(the)h(Unix)f(Squeak)f(supp)r(ort)h(co)r(de)g(is)f(indep)r\n(enden)n(t)i(of)f(the)722 3760 y(image)18 b(v)n(ersion)f(from)h(whic)n\n(h)g(VMMak)n(er)f(generated)h(the)g(in)n(terpreter/plugin)722\n3860 y(sources,)24 b(it)h(is)f(p)r(ossible)h(that)f(y)n(our)g(source)f\n(distribution)h(comes)g(with)h(more)722 3959 y(than)i(one)g\nFf(src)e Fg(directory)h(\\(corresp)r(onding)f(to)i(more)e(than)i(one)g\n(image)f(v)n(er-)722 4059 y(sion)33 b(used)h(to)f(generate)f(the)i\n(sources\\).)53 b(In)34 b(suc)n(h)f(cases)f(y)n(ou)h(will)g(ha)n(v)n(e)g\n(to)722 4159 y(tell)21 b Ff(configure)16 b Fg(whic)n(h)21\nb(source)e(v)n(ersion)f(to)i(use,)i(via)e(the)g(`)p Ff(-)t(-)t(with-)t\n(src)p Fg(')d(op-)722 4258 y(tion.)39 b(F)-7 b(or)28\nb(example,)g(if)g(there)g(are)g(t)n(w)n(o)f(source)g(directories)g\n(called)h Ff(src-)t(3.)722 4358 y(2gamma-)t(4857)23 b\nFg(and)k Ff(src-)t(3.3.alpha-)t(488)o(1)21 b Fg(then)28\nb(y)n(ou)e(w)n(ould)h(use)g Fd(one)34 b Fg(of)722 4457\ny(the)28 b(follo)n(wing)f(commands:)p 1 0 0 TeXcolorrgb\n1 0 0 TeXcolorrgb 1 0 0 TeXcolorrgb 809 4657 a Ff($)44\nb(.../configure)38 b(--with-src=src-3)o(.2)o(gam)o(ma)o(-4)o(857)1071\n4756 y Fe(or)809 4856 y Ff($)44 b(.../configure)38 b(--with-src=src-3)o\n(.3)o(alp)o(ha)o(-4)o(881)p 1 0 0 TeXcolorrgb Black 1926\n5255 a Fg(3)p 1 0 0 TeXcolorrgb eop end\n%%Page: 4 4\nTeXDict begin 4 3 bop 1 0 0 TeXcolorrgb Black 1 0 0 TeXcolorrgb\nBlack 515 523 a Fg(Build)28 b(the)g(VM)g(and)f(plugins)g(b)n(y)h\n(running)f Ff(make)p Fg(:)p 0 0 1 TeXcolorrgb Black 0 0 1\nTeXcolorrgb 602 721 a Ff($)43 b(make)p Black 1 0 0 TeXcolorrgb\nBlack 1 0 0 TeXcolorrgb 722 995 a Fg(Note:)74 b(If)28\nb(y)n(ou)e(w)n(an)n(t)h(to)g(build)h(just)g(the)f(VM)h(\\(without)g\n(external)e(plugins\\))722 1095 y(or)37 b(just)i(the)f(external)f\n(plugins)h(\\(without)h(the)f(VM\\))h(then)f(y)n(ou)f(can)h(use:)722\n1194 y(`)p Ff(make)k(squeak)p Fg(')26 b(or)g(`)p Ff(make)42\nb(plugins)p Fg(')25 b(resp)r(ectiv)n(ely)-7 b(.)p Black\n515 1408 a(Finally)27 b(install)h(the)g(VM,)g(plugins)f(and)h(man)n\n(ual)f(pages:)p 0 0 1 TeXcolorrgb Black 0 0 1 TeXcolorrgb\n602 1606 a Ff($)43 b(su)g(root)602 1706 y($)g(make)f(install)p\nBlack 515 2078 a Fi(2)134 b(Generating)46 b(y)l(our)f(o)l(wn)h(VM)e\n(and)g(plugin)h(sources)515 2298 y Fg(Generating)20 b(y)n(our)g(o)n(wn)\ng(VM/plugin)h(sources)f(migh)n(t)h(b)r(e)g(necessary)f(for)g(v)-5\nb(arious)20 b(reasons:)p Black 639 2497 a Fc(\\017)p Black\n41 w Fg(y)n(ou)27 b(w)n(an)n(t)g(to)h(c)n(hange)e(the)i(mix)g(of)f(in)n\n(ternal)g(vs.)37 b(external)26 b(plugins)p Black 639\n2660 a Fc(\\017)p Black 41 w Fg(y)n(ou)h(w)n(an)n(t)g(to)h(remo)n(v)n(e)\nd(some)i(plugins)h(from)f(the)h(VM)g(that)g(y)n(ou)f(will)h(nev)n(er)e\n(use)p Black 639 2823 a Fc(\\017)p Black 41 w Fg(y)n(ou'v)n(e)h(pulled)h\n(in)g(some)f(up)r(dates)g(that)h(mo)r(dify)g(the)g(In)n(terpreter)f(or)\nf(plugins)p Black 639 2986 a Fc(\\017)p Black 41 w Fg(y)n(ou'v)n(e)h\n(\\014led-in)g(\\(or)g(written\\))h(a)g(whole)f(new)g(plugin)p\nBlack 639 3149 a Fc(\\017)p Black 41 w Fg(etc.)14 b(.)g(.)515\n3347 y(V)-7 b(ersion)30 b(3.2)g(\\(and)h(later\\))g(of)g(Unix)g(Squeak)g\n(use)f(VMMak)n(er)g(to)h(generate)f(the)h(core)f(in-)515\n3447 y(terpreter)c(and)i(plugin)f(sources.)515 3585 y(Start)k(Squeak)g\n(in)h(the)g(top-lev)n(el)f(directory)g(\\(the)h(one)f(con)n(taining)g\n(the)h Ff(platforms)c Fg(di-)515 3684 y(rectory\\);)e(for)h(example:)p\n0 0 1 TeXcolorrgb Black 0 0 1 TeXcolorrgb 602 3883 a\nFf($)43 b(ls)602 3982 y(src)f(platforms)e(...)602 4082\ny($)j(squeak)e(MyCoolPlugin.imag)o(e)p Black 515 4280\na Fg(Op)r(en)27 b(a)h(VMMak)n(erT)-7 b(o)r(ol)26 b(and)h(mo)r(dify)h\n(the)g(setup)g(to)f(y)n(our)g(liking.)p 1 0 0 TeXcolorrgb\nBlack 1 0 0 TeXcolorrgb 722 4494 a(Note:)77 b(The)28\nb(VMMak)n(er)f(con\\014guration)g(used)h(to)g(build)h(the)g\n(distributions)722 4594 y(of)34 b(Unix)g(Squeak)f(is)h(a)n(v)-5\nb(ailable)32 b(in)i Ff(platforms/unix/c)o(on)o(fig)o(/V)o(MMa)o(ke)o\n(r.)722 4693 y(config)p Fg(.)p Black 515 4907 a(Then)h(clic)n(k)g(on)g\n(the)h(relev)-5 b(an)n(t)35 b(\\\\)p Fb(generate)f(...)p\nFg(\")60 b(button.)h(Y)-7 b(ou)35 b(can)g(no)n(w)g(`)p\nFf(configure;)515 5006 y(make;makeinstall)o Fg(')22 b(in)28\nb(y)n(our)e Ff(blddir)f Fg(\\(as)i(describ)r(ed)h(ab)r(o)n(v)n(e\\).)p\nBlack 1926 5255 a(4)p Black eop end\n%%Page: 5 5\nTeXDict begin 5 4 bop Black Black 1 0 0 TeXcolorrgb Black\n1 0 0 TeXcolorrgb 722 523 a Fg(Note:)94 b(Y)-7 b(ou)33\nb(only)f(need)h(to)f(run)g Ff(configure)d Fh(once)p 2262\n536 187 4 v 33 w Fg(for)j(a)g(giv)n(en)g Ff(blddir)722\n623 y Fg(\\(on)e(the)h(same)e(host\\).)45 b(If)30 b(y)n(ou)g(mo)r(dify)g\n(the)h(c)n(hoice)e(of)h(plugins)g(\\(or)g(c)n(hange)722\n722 y(whether)37 b(they're)f(in)n(ternal/external\\))f(then)i(y)n(ou)f\n(can)h(up)r(date)g(the)g(build)722 822 y(en)n(vironmen)n(t)28\nb(b)n(y)h(running)f(the)i Ff(config.status)23 b Fg(script)29\nb(in)g(the)g Ff(bldddir)p Fg(,)722 922 y(lik)n(e)e(this:)p\n1 0 0 TeXcolorrgb 1 0 0 TeXcolorrgb 1 0 0 TeXcolorrgb\n722 1090 a Ff($)43 b(squeak)f(MyCoolPlugin.im)o(age)37\nb(...)42 b(generate)e(new)j(sources)d(...)j($)g(cd)722\n1189 y(blddir)e($)j(./config.status)37 b($)43 b(make)p\n1 0 0 TeXcolorrgb 722 1358 a Fg(This)24 b(is)f Fd(much)29\nb Fg(faster)23 b(than)g(running)g Ff(configure)d Fg(all)j(o)n(v)n(er)e\n(again.)35 b(\\(In)23 b(fact,)722 1457 y Ff(make)k Fg(should)i(detect)g\n(an)n(y)f(c)n(hanges)f(to)i(the)g(plugin)g(con\\014guration)e(and)h(re-)\n722 1557 y(run)g Ff(config.status)22 b Fg(for)27 b(y)n(ou)g\n(automatically)-7 b(.\\))p Black 1 0 0 TeXcolorrgb Black\n1 0 0 TeXcolorrgb 722 1789 a(Note:)138 b(`)p Ff(configure)p\nFg(')40 b(do)r(esn't)k(actually)f(create)g(an)n(y)f(\\014les.)85\nb(The)44 b(last)722 1889 y(thing)33 b(it)g(do)r(es)f(is)h(run)f(`)p\nFf(config.status)p Fg(')c(to)k(create)g(the)h(con\\014gured)e\nFd(\\014le)6 b Fg(s)722 1989 y(in)37 b Ff(blddir)c Fg(from)j(the)g\n(corresp)r(onding)e Fd(\\014le.in)6 b Fg(s)37 b(in)g(the)f\nFf(unix/config)c Fg(di-)722 2088 y(rectory)-7 b(.)58\nb(So)34 b(in)h(the)h(remainder)e(of)g(this)i(do)r(cumen)n(t)f(the)g\n(phrase)f(`during)722 2188 y(con\\014guration')29 b(means)g\nFd(either)40 b Fg(when)31 b(running)e(`)p Ff(configure)p\nFg(')e(for)i(the)i(\\014rst)722 2288 y(time)25 b Fd(or)33\nb Fg(running)23 b(`)p Ff(config.status)p Fg(')c(to)k(up)r(date)h(an)g\n(already)e Ff(configure)p Fg(d)722 2387 y(build)28 b(en)n(vironmen)n\n(t.)p Black 515 2695 a Fa(2.1)112 b(Ho)m(w)38 b Fk(configure)i\nFa(\\014nds)f(the)e Fk(src)h Fa(directory)515 2878 y Fg(Starting)30\nb(with)h(v)n(ersion)e(3.7)g Ff(configure)e Fg(lo)r(oks)j(in)g(t)n(w)n\n(o)g(places)g(for)g(the)h Ff(src)e Fg(directory)-7 b(,)515\n2977 y(in)28 b(the)g(follo)n(wing)e(order,)g(and)i(uses)f(the)h\n(\\014rst)f(one)h(that)f(it)h(\\014nds:)p Black 639 3158\na Fc(\\017)p Black 41 w Fg(the)g(top-lev)n(el)f(directory)f(\\(the)j(one)\ne(con)n(taining)f(the)i Ff(platforms)c Fg(directory\\);)p\nBlack 639 3312 a Fc(\\017)p Black 41 w Fg(the)k Ff(platforms/unix)22\nb Fg(directory)-7 b(.)515 3492 y(In)26 b(other)f(w)n(ords,)g(if)i(y)n\n(ou)e(w)n(an)n(t)g(to)h(use)g(y)n(our)e(o)n(wn)h(generated)g(sources)g\n(without)h(deleting)515 3592 y(the)37 b(built-in)h(generated)f\n(sources,)h(generating)e(them)i(in)n(to)f(a)g Ff(src)f\nFg(directory)g(next)h(to)515 3692 y Ff(platforms)24 b\nFg(\\(and)j(then)i(re-running)d Ff(configure)p Fg(\\))e(will)k(do)f(what)\nh(y)n(ou)f(w)n(an)n(t.)515 3990 y Fi(3)134 b(Adding)45\nb(y)l(our)g(o)l(wn)g(plugins)p 1 0 0 TeXcolorrgb Black\n1 0 0 TeXcolorrgb 722 4199 a Fg(Note:)74 b(This)28 b(section)f(is)g(in)\nn(tended)h(primarily)f(for)g(plugin)h(dev)n(elop)r(ers.)p\nBlack 515 4379 a(If)19 b(y)n(our)e(plugin)i(requires)e(no)i\n(platform-sp)r(eci\\014c)f(t)n(w)n(eaks)f(then)i(there's)g(nothing)f\n(for)g(y)n(ou)g(to)515 4479 y(do.)34 b Ff(configure)18\nb Fg(\\(and)k Ff(config.status)p Fg(\\))16 b(will)22 b(pro)n(vide)e(a)i\n(default)g Ff(Makefile)c Fg(for)j(it)h(that)515 4579\ny(should)j(w)n(ork.)35 b(If)26 b(y)n(our)e(plugin)i(requires)e(only)h\n(platform-indep)r(enden)n(t)h(t)n(w)n(eaks)e(\\(and/or)515\n4678 y(additional)d(hand-written)g(co)r(de\\))h(then)g(these)g(go)f(in)h\nFf(platforms/Cross/)o(pl)o(ug)o(ins)o Fg(,)17 b(and)515\n4778 y(there's)27 b(nothing)g(for)g(y)n(ou)g(to)h(do)f(\\(in)h\n(Unixland\\).)515 4907 y(On)c(the)g(other)f(hand,)i(if)g(y)n(ou)e\n(require)g(sp)r(ecial)h Ff(configure)c Fg(tests)k(or)f(additional)h\n(declara-)515 5006 y(tions/rules)i(in)i(y)n(our)e(plugin's)i\nFf(Makefile)c Fg(then)k(y)n(ou)f(need)g(to)h(sp)r(ecify)g(them)g\n(explicitly)-7 b(.)p Black 1926 5255 a(5)p Black eop\nend\n%%Page: 6 6\nTeXDict begin 6 5 bop Black Black 1 0 0 TeXcolorrgb Black\n1 0 0 TeXcolorrgb 722 523 a Fg(Note:)74 b(Unix)28 b(Squeak)f(subscrib)r\n(es)g(to)g(the)h(follo)n(wing)f(philopsoph)n(y:)722 654\ny Fd(A)n(bsolutely)22 b(everything)g(that)f(is)h(sp)l(e)l(ci\\014c)g(to)\nf(Unix)g(\\(sour)l(c)l(es,)i(he)l(aders,)i Fe(configure)722\n754 y Fd(and)31 b Fe(Makefile)40 b Fd(extensions,)30\nb(etc.\\))39 b(lives)30 b(under)g Fe(platforms/)10 b(unix)j\nFd(.)722 885 y Fg(In)30 b(other)g(w)n(ords:)40 b(there)29\nb(is)h(not)g(\\(nor)f(augh)n(t)g(there)h(b)r(e\\))h Fd(any)37\nb Fg(Unix-related)722 985 y(information)25 b(under)g(the)g\nFf(platforms/Cross)19 b Fg(directory)-7 b(.)35 b(\\(Unix)25\nb(Squeak)g(is)722 1084 y(en)n(tirely)f(encapsulated)f(under)h\nFf(platforms/unix)18 b Fg(and)23 b(is)h(utterly)g(imm)n(une)722\n1184 y(to)k(\\\\random)e(junk\")i(elsewhere)e(in)i(the)g\nFf(platforms)c Fg(tree.\\))p Black 515 1397 a(First)j(y)n(ou)g(m)n(ust)h\n(create)e(a)h(new)h(directory)e(under)i Ff(platforms/unix/)o(plu)o(gi)o\n(ns)21 b Fg(named)515 1496 y(after)35 b(y)n(our)f(plugin.)59\nb(This)36 b(directory)d(will)j(hold)f(the)h(\\014les)f(describing)f(the)\ni(additional)515 1596 y(con\\014guration)27 b(c)n(hec)n(ks)h(and/or)g\nFf(Makefile)e Fg(con)n(ten)n(ts.)41 b(F)-7 b(or)28 b(example,)h(if)h(y)\nn(our)e(plugin)h(is)515 1696 y(called)e(\\\\MyCo)r(olPlugin\")e(then)p\n0 0 1 TeXcolorrgb Black 0 0 1 TeXcolorrgb 602 1893 a\nFf($)43 b(mkdir)f(platforms/unix/)o(plu)o(gi)o(ns)o(/My)o(Co)o(olP)o\n(lu)o(gin)p Black 515 2091 a Fg(w)n(ould)27 b(b)r(e)g(the)h(thing)g(to)\nf(do.)37 b(\\(The)27 b(follo)n(wing)g(sections)f(will)i(refer)f(to)g\n(this)h(directory)e(as)515 2191 y Ff(platdep)f Fg(since)i(the)h(full)g\n(path)g(is)f(quite)h(a)f(mouthful)i(of)e(t)n(yping)h(for)f(m)n(y)g\n(lazy)g(\\014ngers.\\))515 2460 y Fa(3.1)112 b(Plugin-sp)s(eci\\014c)36\nb(con\\014guration)515 2652 y Fg(Y)-7 b(our)32 b(plugin)h(can)f(ask)f\nFf(configure)e Fg(to)k(run)f(additional)g(tests)h(\\(and)g(to)f(set)h\n(additional)515 2751 y(v)-5 b(ariables)29 b(in)i(its)g(output)g\n(\\014les\\))g(simply)g(b)n(y)g(including)f(a)h(\\014le)g(called)f\nFf(acinclude.m4)c Fg(in)515 2851 y(it's)i Ff(platdep)c\nFg(directory)-7 b(.)p 1 0 0 TeXcolorrgb Black 1 0 0 TeXcolorrgb\n722 3064 a(Note:)67 b(The)21 b Ff(configure)c Fg(script)k(is)g\n(`compiled')g(from)f(sev)n(eral)f(other)i(\\014les.)34\nb(If)722 3163 y(y)n(ou)d(create)g(a)g(`)p Ff(platdep./acinclud)o(e.)o\n(m4)p Fg(')25 b(\\014le)32 b(then)g(y)n(ou)f Fd(must)39\nb Fg(`recom-)722 3263 y(pile')c Ff(configure)p Fg(.)56\nb(Y)-7 b(ou)35 b(can)f(do)h(this)g(b)n(y)g(`)p Ff(cd)p\nFg('ing)e(to)i Ff(unix/config)c Fg(and)722 3363 y(running)37\nb(`)p Ff(make)p Fg(',)h(or)e(\\(if)i(y)n(ou)e(ha)n(v)n(e)g(GNU)i\nFf(make)p Fg(\\))d(from)i(the)g Ff(blddir)e Fg(lik)n(e)722\n3462 y(this:)p 1 0 0 TeXcolorrgb 1 0 0 TeXcolorrgb 1 0 0\nTeXcolorrgb 809 3653 a Ff($)44 b(make)e(-C)g(../platforms/unix)o(/c)o\n(onf)o(ig)p 1 0 0 TeXcolorrgb Black 515 3926 a Fg(In)33\nb(addition)g(to)g(the)h(usual)e Ff(autoconf)e Fg(macros,)j(the)h(follo)\nn(wing)e(macros)f(are)h(a)n(v)-5 b(ailable)515 4026 y(sp)r\n(eci\\014cally)27 b(for)g(Squeak)g(plugins)g(to)h(use:)515\n4278 y Fh(3.1.1)93 b Ff(AC)p 899 4278 27 4 v 31 w(PLUGIN)p\n1194 4278 V 29 w(CHECK)p 1443 4278 V 29 w(LIB\\()p Fe(lib)p\nFf(,)p Fe(func)10 b Ff(\\))515 4470 y Fg(This)27 b(is)h(similar)f(to)g\n(the)h Ff(autoconf)c Fg(`)p Ff(AC_CHECK_LIB)p Fg(')f(macro.)515\n4608 y Fd(func)36 b Fg(is)c(the)g(name)g(of)g(a)f(function)i(required)d\n(b)n(y)i(the)g(plugin,)h(de\\014ned)g(in)f(the)g(external)515\n4707 y(\\(system\\))22 b(library)f Fd(lib)p Fg(.)36 b(The)22\nb(macro)e(c)n(hec)n(ks)h(that)h(the)g(library)f(is)h(a)n(v)-5\nb(ailable)21 b(\\(via)g(`)p Ff(-l)p Fe(lib)13 b Fg('\\))515\n4807 y(and)19 b(then)g(adds)g(it)g(to)g(the)g(list)g(of)g(libraries)f\n(required)g(b)n(y)g(the)i(plugin)f(\\(see)g(the)g(explanation)515\n4907 y(of)41 b Ff([plibs])32 b Fg(in)j(Section)f(3.2.1)g(for)g(a)g\n(description)g(of)h(ho)n(w)f(library)g(dep)r(endencies)h(for)515\n5006 y(plugins)27 b(are)g(handled\\).)p Black 1926 5255\na(6)p Black eop end\n%%Page: 7 7\nTeXDict begin 7 6 bop Black Black 515 523 a Fg(If)32\nb Fd(func)k Fg(cannot)31 b(b)r(e)h(found)g(in)g Fd(lib)38\nb Fg(then)32 b(the)g(plugin)g(will)f(b)r(e)i(disabled)e(and)g(a)g\n(message)515 623 y(to)c(that)g(e\\013ect)h(prin)n(ted)f(during)f\n(con\\014guration.)35 b(\\(The)28 b(VM)f(can)g(still)g(b)r(e)h(built,)g\nFd(without)515 722 y Fg(rerunning)h(VMMak)n(er)g(or)g(recon\\014guring,)\nf(and)i(the)g(plugin)g(will)g(simply)g(b)r(e)g(ommitted)515\n822 y(from)d(it.\\))515 1079 y Fh(3.1.2)93 b Ff(AC)p 899\n1079 27 4 v 31 w(PLUGIN)p 1194 1079 V 29 w(DEFINE)p 1487\n1079 V 29 w(UNQUOTED\\()p Fe(keyword)o Ff(,)p Fe(t)o(ext)8\nb Ff(\\))515 1273 y Fg(This)27 b(is)h(similar)f(to)g(the)h\nFf(autoconf)c Fg(`)p Ff(AC_DEFINE_UNQUOTE)o(D)p Fg(')e(macro.)515\n1414 y Fd(keywor)l(d)37 b Fg(is)27 b(a)g Ff(Makefile)d\nFg(k)n(eyw)n(ord)i(\\(usually)h(of)g(the)h(form)f(`[)p\nFd(name)6 b Fg(]'\\))29 b(and)e Fd(text)34 b Fg(is)27\nb(arbi-)515 1514 y(trary)22 b(text)i(to)g(b)r(e)g(asso)r(ciated)e(with)\ni(it.)36 b(Calling)23 b(this)h(macro)e(causes)h Ff(mkmf)f\nFg(to)h(substitute)515 1614 y Fd(text)34 b Fg(for)27\nb(all)h(o)r(ccurrences)e(of)h Fd(keywor)l(d)38 b Fg(in)28\nb(the)g Ff(Makefile)c Fg(generated)i(for)i(the)g(plugin.)515\n1871 y Fh(3.1.3)93 b(Plugin-sp)s(eci\\014c)31 b(v)-5 b(ariables)515\n2065 y Fg(The)37 b(follo)n(wing)g(v)-5 b(ariables)36\nb(are)g(also)h(set)g(during)g(the)h(execution)f(of)g(a)g(plugin-sp)r\n(eci\\014c)515 2165 y Ff(acinclude.m4)p Fg(:)p Black Black\n722 2388 a Ff($)p Fc(f)p Ff(plugin)p Fc(g)24 b Fg(is)k(the)g(name)f(of)\nh(the)f(plugin;)p Black Black 722 2554 a Ff($)p Fc(f)p\nFf(topdir)p Fc(g)d Fg(is)k(the)g(path)f(to)h(the)g(top-lev)n(el)e\n(directory)h(\\(con)n(taining)g Ff(platforms)p Fg(\\);)p\nBlack Black 722 2720 a Ff($)p Fc(f)p Ff(vmmdir)p Fc(g)d\nFg(is)k(the)g(path)f(to)h(the)g(VMMak)n(er)e(`)p Ff(src)p\nFg(')h(directory)-7 b(.)515 2993 y Fa(3.2)112 b(Plugin-sp)s(eci\\014c)36\nb Fk(Makefile)j Fa(declarations)e(and)h(rules)515 3188\ny Fg(Three)27 b(mec)n(hanisms)g(are)f(a)n(vilable)h(for)g(this:)p\nBlack 616 3394 a(1.)p Black 41 w(scanning)g(additional)g(dirrectories)f\n(for)h(sources)f(and)h(headers;)p Black 616 3560 a(2.)p\nBlack 41 w(including)h(a)f(few)h(additional)f(lines)h(in)n(to)f(the)h\n(default)g Ff(Makefile)p Fg(;)d(and)p Black 616 3726\na(3.)p Black 41 w(replacing)i(en)n(tirely)g(the)h(default)g\nFf(Makefile)c Fg(with)k(a)f(hand-written)h(one.)515 3933\ny(\\(The)g(last)f(option)g(isn't)h(as)f(scary)f(as)h(it)h(migh)n(t)g\n(sound:)f(read)g(on.)13 b(.)h(.)g(\\))515 4190 y Fh(3.2.1)93\nb(The)33 b(anatom)m(y)e(of)h(a)g(plugin's)e Ff(Makefile)515\n4384 y Fg(Before)22 b(pro)r(ceeding,)h(let's)h(tak)n(e)e(a)h(min)n(ute)\nh(to)f(understand)g(ho)n(w)f(Unix)i(Squeak)f(compiles)515\n4484 y(and)37 b(links)h(\\014les)g(in)g(its)g(default)h\nFf(Makefile)34 b Fg(for)k(plugins.)67 b(The)38 b(default)h\nFf(Makefile)34 b Fg(is)515 4584 y(sho)n(wn)27 b(in)g(Figure)g(1.)p\n1 0 0 TeXcolorrgb Black 1 0 0 TeXcolorrgb 722 4807 a(Note:)93\nb(The)32 b(k)n(eyw)n(ords)e(app)r(earing)h(b)r(et)n(w)n(een)h(`)p\nFf([)g Fg(square)f(brac)n(k)n(ets)g Ff(])p Fg(')h(are)722\n4907 y(substituted)c(during)f(con\\014guration)e(b)n(y)i(a)g(prepro)r\n(cessor)d(called)j(`)p Ff(mkmf)p Fg(')e(ac-)722 5006\ny(cording)i(to)g(the)h(kind)g(of)g(plugin)f(\\(in)n(ternal/external\\))f\n(b)r(eing)i(built.)p Black 1926 5255 a(7)p 1 0 0 TeXcolorrgb\neop end\n%%Page: 8 8\nTeXDict begin 8 7 bop 1 0 0 TeXcolorrgb Black 1 0 0 TeXcolorrgb\nBlack Black Black Black Black Black Black 905 491 a Ff(#)43\nb(default)e(Makefile)f(for)i(Unix)g(Squeak)f(plugins)905\n690 y([make_cfg])905 790 y([make_plg])905 989 y(XINCLUDES)301\nb(=)43 b([includes])905 1089 y(OBJS)521 b(=)43 b([targets])905\n1188 y(TARGET)433 b(=)43 b([target])905 1288 y(PLIBS)477\nb(=)43 b([plibs])905 1487 y([make_inc])905 1686 y($\\(TARGET\\))d(:)j\n($\\(OBJS\\))e(Makefile)1254 1786 y($\\(LINK\\))f($\\(TARGET\\))g($\\(OBJS\\))h\n($\\(PLIBS\\))905 1985 y([make_targets])905 2184 y(.force)g(:)p\nBlack 1010 2450 a Fg(Figure)27 b(1:)36 b(Default)29 b\nFf(Makefile)24 b Fg(\\\\template\")j(for)g(plugins.)p Black\n1 0 0 TeXcolorrgb Black 515 2715 a Ff([make)p 740 2715\n27 4 v 29 w(cfg])g Fg(is)g(the)i(con\\014gured)e(v)-5\nb(ariable)27 b(section.)38 b(It)28 b(con)n(tains)f(the)i(platform-sp)r\n(eci\\014c)515 2815 y(information)23 b(gleaned)h(b)n(y)g\nFf(configure)d Fg(while)j(it)h(w)n(as)e(\\014guring)h(out)g(whic)n(h)g\n(compiler)g(y)n(ou)515 2915 y(ha)n(v)n(e,)i(what)i(\\015ags)e(y)n(our)h\n(link)n(er)g(needs,)g(where)g(to)h(install)f(stu\\013,)h(and)g(so)f(on.)\n515 3056 y Ff([make)p 740 3056 V 29 w(plg])d Fg(con)n(tains)g(a)h\n(handful)h(of)f(de\\014nitions)g(whic)n(h)g(dep)r(end)h(on)f(whether)g\n(the)h(plu-)515 3155 y(gin)h(is)h(b)r(eing)f(compiled)h(as)f(in)n\n(ternal)g(or)f(external:)p Black Black 722 3357 a Ff(o)392\nb Fg(the)28 b(extension)f(for)g(ob)5 b(ject)28 b(\\014les)722\n3457 y Ff(a)392 b Fg(the)28 b(extension)f(for)g(plugins)722\n3557 y Ff(COMPILE)128 b Fg(the)28 b(command)f(to)h(compile)f(a)g\n(source)g(\\014le)h(in)n(to)f(an)g(ob)5 b(ject)28 b(\\014le)722\n3656 y Ff(LINK)260 b Fg(the)28 b(command)f(to)h(link)g(one)f(or)f(more)\nh(ob)5 b(ject)28 b(\\014les)f(in)n(to)g(a)h(plugin)515\n3860 y(F)-7 b(or)32 b(in)n(ternal)g(plugins:)48 b Ff($o)32\nb Fg(is)h(`)p Ff(.o)p Fg(')f(and)h Ff($a)f Fg(is)h(`)p\nFf(.a)p Fg('.)52 b Ff($\\(COMPILE\\))29 b Fg(is)j(the)i(C)f(compiler)515\n3960 y(\\(`)p Ff($\\(CC\\))42 b(...)g(-o)p Fg(',)i(so)c(the)i(\\014rst)e\n(thing)i(after)e(the)i(command)f Fd(must)48 b Fg(b)r(e)41\nb(the)h(output)515 4059 y(\\014lename\\))29 b(and)h Ff($\\(LINK\\))d\nFg(is)i(arc)n(hiv)n(er)f(\\(`)p Ff(ar)43 b(-rc)p Fg(',)29\nb(again)f(requiring)g(the)i(output)g(\\014le)g(to)515\n4159 y(follo)n(w)24 b(immediately\\).)37 b(Note)25 b(that)g(in)n(ternal)\ng(plugins)g(are)f(built)i(as)f(`)p Ff(ar)p Fg(')f(arc)n(hiv)n(es)f(b)r\n(efore)515 4259 y(b)r(eing)k(link)n(ed)h(in)n(to)f(the)h(\\014nal)g\n(binary)-7 b(.)515 4400 y(F)g(or)37 b(external)f(plugins:)56\nb Ff($o)37 b Fg(is)g(`)p Ff(.lo)p Fg(',)i Ff($a)e Fg(is)g(`)p\nFf(.la)p Fg(',)i(and)e Ff($\\(COMPILE\\))d Fg(and)j Ff($\\(LINK\\))515\n4499 y Fg(are)27 b(in)n(v)n(o)r(cations)f(of)i(`)p Ff(libtool)p\nFg(')d(to)j(create)f(p)r(osition-indep)r(enden)n(t)i(ob)5\nb(jects)27 b(and)h(shared)515 4599 y(libraries)35 b(\\(with)j(a)f(`)p\nFf(-)t(o)p Fg(')f(app)r(earing)g(righ)n(t)g(at)h(the)h(end,)h(so)e(the)\ng(\\014rst)g(thing)g(after)g(the)515 4699 y(command)27\nb Fd(must)34 b Fg(b)r(e)28 b(the)g(output)h(\\014lename\\).)515\n4840 y Ff([includes])f Fg(is)k(a)g(list)h(of)f(`)p Ff(-)t(I\\\\emph{dir})\np Fg(')c(compiler)k(\\015ags,)h(one)f(for)f(eac)n(h)h(of)g(the)h(di-)515\n4939 y(rectories)p 0 TeXcolorgray Black 1926 5255 a(8)p\n0 TeXcolorgray eop end\n%%Page: 9 9\nTeXDict begin 9 8 bop 0 TeXcolorgray Black 0 TeXcolorgray\n0 TeXcolorgray 0 TeXcolorgray 515 523 a Ff(src/plugins/)p\nFe(name)51 b Ff(src/vm/intplugin)o(s/)p Fe(n)o(am)o(e)h\nFf(platforms/Cross/)o(plu)o(gi)o(ns)o(/)p Fe(na)o(me)515\n623 y Ff(platforms/unix/p)o(lu)o(gi)o(ns/)o Fe(na)o(me)p\nBlack 515 820 a Fg(in)28 b(whic)n(h)f(at)h(least)f(one)g(header)g\n(\\014le)g(is)h(presen)n(t.)515 958 y Ff([targets])21\nb Fg(is)j(a)h(list)g(of)f(ob)5 b(ject)25 b(\\014les)g(corresp)r(onding)d\n(to)j(the)g(source)f(\\()p Ff(.c)p Fg(\\))g(\\014les)h(found)g(in)515\n1057 y(the)j(directories:)p 0 TeXcolorgray 0 TeXcolorgray\n0 TeXcolorgray 515 1254 a Ff(src/plugins/)p Fe(name)8\nb Ff(/*.c)41 b(src/vm/intplugins)o(/)p Fe(na)o(me)8 b\nFf(/*.c)42 b(platforms/Cross)o(/pl)o(ug)o(ins)o(/)p Fe(n)o(ame)8\nb Ff(/*.c)515 1354 y(platforms/unix/p)o(lu)o(gi)o(ns/)o\nFe(na)o(me)g Ff(/*.c)p Black 515 1551 a Fg(where)25 b(eac)n(h)f(source)\ng(\\014le)i(has)e(b)r(een)i(stripp)r(ed)g(of)f(the)h(directory)e(name)h\n(and)g(had)g(the)h(`)p Ff(.c)p Fg(')515 1651 y(con)n(v)n(erted)g(in)n\n(to)h(`)p Ff($o)p Fg('.)515 1788 y Ff([target])d Fg(is)k(the)g(name)f\n(of)h(the)f(plugin,)h(including)g(the)g Ff($a)f Fg(extension.)515\n1926 y Ff([plibs])52 b Fg(is)27 b(a)g(list)h(of)g(zero)e(or)h(more)f\n(libraries)g(on)h(whic)n(h)h(the)g(plugin)f(dep)r(ends)h(\\(as)f(de-)515\n2026 y(tected)d(using)f(the)h(macro)f Ff(AC)p 1451 2026\n27 4 v 30 w(PLUGIN)p 1745 2026 V 29 w(CHECK)p 1994 2026\nV 29 w(LIB)g Fg(in)h(the)g(plugin-sp)r(eci\\014c)f Ff(acinclude.)515\n2125 y(m4)p Fg(\\).)53 b(If)34 b(the)g(plugin)f(is)g(b)r(eing)h(built)g\n(in)n(ternally)e(then)i(this)g(list)f(is)h(empt)n(y)f(and)g(the)h(re-)\n515 2225 y(quired)d(libraries)f(are)h(included)h(in)g(the)g(\\014nal)f\n(link)h(command.)49 b(If)32 b(the)g(plugin)f(is)h(b)r(eing)515\n2325 y(built)g(externally)e(then)i(the)f(plugin)h(itself)f(\\(a)g\n(shared)g(ob)5 b(ject\\))31 b(is)g(link)n(ed)g(against)f(these)515\n2424 y(libraries)c(\\(via)h Ff([plist])p Fg(\\))e(rather)i(than)h(with)g\n(the)g(main)f(VM)h(binary)-7 b(.)515 2562 y(\\(This)34\nb(is)g(to)g(ensure)f(that)i(a)e(missing)h(shared)f(ob)5\nb(ject)34 b(needed)g(b)n(y)g(an)g(external)f(plugin)515\n2662 y(will)26 b(only)f(a\\013ect)h(the)g(op)r(eration)e(of)i(that)g\n(plugin)g(and)f(not)h(prev)n(en)n(t)f(the)h(rest)f(of)h(the)g(VM)515\n2761 y(from)f(running,)h(whic)n(h)f(w)n(ould)h(b)r(e)g(the)g(case)e(if)\ni(the)g(en)n(tire)g(VM)g(w)n(ere)e(link)n(ed)i(against)e(it.\\))515\n2899 y Ff([make)p 740 2899 V 29 w(inc])29 b Fg(is)i(the)g(con)n(ten)n\n(ts)f(of)h(the)g Ff(Makefile.inc)26 b Fg(\\014le)31 b(in)h(y)n(our)d\n(plugin's)i Ff(platdep)515 2998 y Fg(directory)26 b(\\(or)h(empt)n(y)h\n(if)g(this)g(\\014le)f(do)r(esn't)h(exist\\).)515 3136\ny Ff([make)p 740 3136 V 29 w(targets])20 b Fg(is)j(a)g(list)g(of)g\n(rules)f(for)h(building)g(the)h(\\014les)f(listed)g(in)h\nFf([targets])p Fg(.)31 b(Eac)n(h)515 3236 y(rule)c(lo)r(oks)g(lik)n(e)g\n(this:)p Black Black 863 3448 a Ff(name$o)42 b(:)h Fe(original/source)o\n(/di)o(r/)8 b Ff(name.c)1212 3547 y($\\(COMPILE\\))40 b(name$o)h\nFe(original/source)o(/di)o(r/)8 b Ff(name.c)515 3800\ny Fh(3.2.2)93 b(A)32 b(note)g(ab)s(out)g Ff($\\(COMPILE\\))27\nb Fh(and)33 b Ff($\\(LINK\\))c Fh(commands)515 3991 y Fg(Y)-7\nb(ou)33 b(should)h Fd(never)43 b Fg(pass)33 b(additional)g(\\015ags)g\n(to)g(these)h(commands)f(explicitly)-7 b(.)56 b(This)33\nb(is)515 4091 y(b)r(ecause)e(y)n(ou)h(cannot)f(kno)n(w)h(ho)n(w)f(they)\nh(are)g(de\\014ned.)50 b(\\(Their)32 b(de\\014nitions)h(dep)r(end)f(on)515\n4190 y(whether)k(the)h(plugin)g(is)g(b)r(eing)g(built)g(in)n(ternally)f\n(or)g(externally)g(|)g(and)h(migh)n(t)g(ev)n(en)515 4290\ny(c)n(hange)26 b(radically)g(in)i(future)g(releases)e(of)i(Unix)g\n(Squeak.\\))515 4428 y(Instead)e(y)n(ou)h(should)f(pass)h(additional)f\n(compiler/link)n(er)f(\\015ags)h(to)h(these)g(commands)f(b)n(y)515\n4527 y(setting)h(the)h(follo)n(wing)f(v)-5 b(ariables)26\nb(in)i(`)p Ff(Makefile.inc)p Fg(')23 b(or)k(`)p Ff(Makefile.in)p\nFg(':)p Black Black 722 4719 a Ff(XCPPFLAGS)127 b Fg(`)p\nFf(-)t(I)p Fg(')27 b(\\015ags)g(for)g Ff(cpp)722 4819\ny(XDEFS)303 b Fg(`)p Ff(-)t(D)p Fg(')27 b(\\015ags)g(for)g\nFf(cpp)722 4918 y(XCFLAGS)215 b Fg(an)n(ything)27 b(to)h(b)r(e)g\n(passed)f(to)g(the)h(compiler)722 5018 y Ff(XLDFLAGS)171\nb Fg(an)n(ything)27 b(to)h(b)r(e)g(passed)f(to)g(the)h(link)n(er)p\nBlack 1926 5255 a(9)p Black eop end\n%%Page: 10 10\nTeXDict begin 10 9 bop Black Black 1 0 0 TeXcolorrgb\nBlack 1 0 0 TeXcolorrgb 722 523 a Fg(Note:)70 b(`)p Ff(mkmf)p\nFg(')23 b(already)f(uses)i(`)p Ff(XINCLUDES)p Fg(')c(to)k(pass)f(the)h\n(list)g(of)g(directories)722 623 y(con)n(taining)g(plugin)h(header)f\n(\\014les)h(to)g Ff(cpp)p Fg(.)35 b(Y)-7 b(ou)25 b(can)f(rede\\014ne)h\n(it)g(if)h(y)n(ou)e(lik)n(e,)722 722 y(but)j(mak)n(e)e(sure)g(that)h(`)\np Ff([includes])p Fg(')21 b(app)r(ears)k(in)h(its)g(de\\014nition)g\n(\\(or)f(in)h(the)722 822 y(de\\014nition)i(of)g(`)p Ff(XCPPFLAGS)p\nFg('\\).)p Black 515 1162 a Fh(3.2.3)93 b(Sp)s(ecifying)32\nb(additional)f(source)h(directories)515 1357 y Ff(mkmf)27\nb Fg(lo)r(oks)g(for)h(a)g(\\014le)h(in)g(y)n(our)e(plugin's)i\nFf(platdep)c Fg(directory)j(called)g(`)p Ff(mkmf.subdirs)p\nFg('.)515 1457 y(If)38 b(this)h(\\014le)f(exists)g(then)h(it)g(should)f\n(con)n(tain)f(a)h(list)g(of)g(directory)f(names)h(relativ)n(e)f(to)515\n1556 y(the)31 b(top-lev)n(el)f(directory)f(\\(the)i(one)g(con)n(taining)\ne(the)j Ff(src)d Fg(and)i Ff(platform)c Fg(directories\\).)515\n1656 y(These)d(directories)g(will)h(b)r(e)h(added)e(to)h(the)h(list)f\n(of)g(lo)r(cations)f(searc)n(hed)f(for)i(`)p Ff(.c)p\nFg(')f(and)h(`)p Ff(.h)p Fg(')515 1756 y(\\014les)40 b(while)h\n(constructing)f(the)h(substitutions)g(for)f(`)p Ff([includes])p\nFg(',)g(`)p Ff([targets])p Fg(')d(and)515 1855 y(`)p\nFf([make)p 763 1855 27 4 v 29 w(targets])p Fg('.)515\n2112 y Fh(3.2.4)93 b(Including)32 b(additional)f(material)g(in)g(the)h\n(default)g Ff(Makefile)515 2307 y Fg(If)e(the)g(\\014le)h\nFf(platdep/Makefil)o(e.i)o(nc)23 b Fg(exists)30 b(then)g\nFf(mkmf)f Fg(will)h(substitute)h(its)f(con)n(ten)n(ts)515\n2407 y(in)n(to)d(the)h Ff(Makefile)c Fg(in)k(place)f(of)h(the)g\nFf([make)p 1974 2407 V 29 w(inc])e Fg(k)n(eyw)n(ord.)p\n1 0 0 TeXcolorrgb Black 1 0 0 TeXcolorrgb 722 2631 a(Note:)73\nb Ff(Makefile.inc)21 b Fg(is)26 b(read)g(in)n(to)g(the)g\nFf(Makefile)d Fg(under)j(construction)722 2731 y Fd(b)l(efor)l(e)43\nb Ff(mkmf)34 b Fg(p)r(erforms)h(substitutions)h(on)f(the)h(`)p\nFf([keyword])p Fg('s.)57 b(In)36 b(other)722 2830 y(w)n(ords,)e(y)n\n(our)e Ff(Makefile.inc)d Fg(can)k(use)g(the)h(ab)r(o)n(v)n(e)e(k)n(eyw)\nn(ords)f(to)i(include)722 2930 y(relev)-5 b(an)n(t)25\nb(declarations)g(and)g(rules)h(without)g(w)n(orrying)e(ab)r(out)h\n(whether)h(the)722 3029 y(plugin)i(is)f(in)n(ternal)g(or)g(external.)p\nBlack 515 3370 a Fh(3.2.5)93 b(Replacing)31 b(the)h(default)g\nFf(Makefile)d Fh(en)m(tirely)515 3565 y Fg(If)h(neither)g(of)f(the)i\n(ab)r(o)n(v)n(e)d(are)h(su\\016cien)n(t)h(then)g(y)n(ou)f(can)g(create)g\n(a)h(complete)f Ff(Makefile)515 3664 y Fg(template)i(called)f\nFf(platdep/Makefil)o(e.i)o(n)p Fg(.)39 b Ff(mkmf)29 b\nFg(will)i(use)f(this)h(template)g(instead)f(of)515 3764\ny(the)d(default)g Ff(Makefile)c Fg(template)k(sho)n(wn)f(earlier,)f\n(and)i(will)f(p)r(erform)h(k)n(eyw)n(ord)d(substi-)515\n3863 y(tutions)k(on)g(it)h(as)f(describ)r(ed)g(ab)r(o)n(v)n(e)f(to)h\n(create)f(the)i(\\014nal)f Ff(Makefile)p Fg(.)36 b(\\(In)29\nb(other)e(w)n(ords,)515 3963 y(simply)38 b(cop)n(ying)f(the)i(default)g\n(template)f(sho)n(wn)g(earlier)e(will)j(result)f(in)g(a)g\nFf(Makefile)515 4063 y Fg(iden)n(tical)27 b(to)h(the)g(one)f(that)h\nFf(mkmf)e Fg(w)n(ould)h(ha)n(v)n(e)f(pro)r(duced)i(b)n(y)f(default.)515\n4337 y Fa(3.3)112 b(Examples)37 b(tak)m(en)h(from)e(existing)g(plugins)\n515 4531 y Fg(By)30 b(w)n(a)n(y)f(of)h(example)g(w)n(e'll)g(lo)r(ok)g\n(at)g(ho)n(w)g(t)n(w)n(o)g(existing)g(plugins)g(sp)r(ecialise)f(their)i\n(con-)515 4631 y(\\014guration)26 b(and)i Ff(Makefile)p\nFg(s.)p Black 1905 5255 a(10)p Black eop end\n%%Page: 11 11\nTeXDict begin 11 10 bop Black Black 515 523 a Fh(3.3.1)93\nb(Con\\014guration)515 707 y Fg(The)38 b Ff(B3DAcceleratorP)o(lug)o(in)\n31 b Fg(requires)37 b(Op)r(enGL)h(in)g(order)e(to)i(compile.)67\nb(The)38 b(\\014le)515 807 y Ff(unix/plugins/B3D)o(Ac)o(ce)o(ler)o(at)o\n(orP)o(lu)o(gi)o(n/a)o(ci)o(ncl)o(ud)o(e.m)o(4)17 b Fg(con)n(tains)23\nb(a)g(single)g(call)g(to)515 906 y(an)k Ff(autoconf)p\nFg(-st)n(yle)d(macro:)p Black Black 689 1092 a Ff(AC)p\n782 1092 27 4 v 31 w(PLUGIN)p 1077 1092 V 29 w(SEARCH)p\n1370 1092 V 28 w(LIBS\\(glIsEnabled,)37 b(GL\\))515 1278\ny Fg(This)d(w)n(orks)f(similarly)g(to)h(the)h Ff(autoconf)c\nFg(`)p Ff(AC\\\\_SEARCH_LIBS)p Fg(')e(macro:)49 b(If)34\nb(a)g(library)515 1378 y Ff(libGL.\\\\{a,)t(so\\\\})h Fg(\\(Op)r(enGL\\))42\nb(exists)f(and)g(exp)r(orts)g(the)h(function)f Ff(glIsEnabled\\(\\))515\n1477 y Fg(then)33 b(`)p Ff(-)t(lGL)p Fg(')f(is)h(added)g(to)f(the)i\n(\\014nal)f(VM)g(link)g(command.)53 b(Otherwise)32 b(the)h(plugin)g(is)\n515 1577 y(disabled)27 b(\\(and)h(a)f(message)f(w)n(arning)g(of)i(the)g\n(fact)g(is)f(prin)n(ted\\).)p 1 0 0 TeXcolorrgb Black\n1 0 0 TeXcolorrgb 722 1763 a(Note:)66 b(There's)19 b(a)g(bug)g(here.)34\nb(This)19 b(should)g(also)g(c)n(hec)n(k)f(for)h(`)p Ff(GL\\\\_VERSION\\\\)\n722 1863 y(_1\\\\_1)p Fg(')26 b(in)i(headers.)p Black 515\n2160 a Fh(3.3.2)93 b(Customising)29 b(the)j Ff(Makefile)515\n2344 y Fg(The)d Ff(Mpeg3Plugin)24 b Fg(requires)k(a)g(\\(mo)r\n(di\\014ed\\))i Ff(libmpeg)c Fg(to)j(b)r(e)h(compiled)e(along)g(with)i\n(it.)515 2444 y(The)23 b(sources)e(for)h(this)i(library)d(are)h(in)h\n(\\(sev)n(eral\\))f(sub)r(directories)g(of)h Ff(Cross/Meg3Plugi)o(n)515\n2543 y Fg(and)k(they)h(require)e(additional)i Ff(cpp)e\nFg(de\\014nitions)i(in)g(order)e(to)h(compile)h(correctly)-7\nb(.)515 2674 y(T)g(o)42 b(cop)r(e)g(with)h(the)g(additional)f\n(directories,)j Ff(unix/plugins/Mpeg)o(3Pl)o(ug)o(in)o(/mk)o(mf)o(.)515\n2773 y(subdirs)25 b Fg(simply)i(lists)h(them:)p Black\nBlack 602 2959 a Ff(platforms/Cross/)o(pl)o(ugi)o(ns)o(/Mp)o(eg)o(3P)o\n(lug)o(in)o(/li)o(bm)o(peg)602 3059 y(platforms/Cross/)o(pl)o(ugi)o(ns)\no(/Mp)o(eg)o(3P)o(lug)o(in)o(/li)o(bm)o(peg)o(/a)o(ud)o(io)602\n3159 y(platforms/Cross/)o(pl)o(ugi)o(ns)o(/Mp)o(eg)o(3P)o(lug)o(in)o\n(/li)o(bm)o(peg)o(/v)o(id)o(eo)515 3345 y Fg(T)-7 b(o)44\nb(cop)r(e)g(with)h(the)f(additional)g Ff(cpp)f Fg(de\\014nitions,)49\nb(w)n(e)44 b(could)g(ha)n(v)n(e)g(written)g(a)g(tin)n(y)515\n3444 y Ff(Makefile.inc)22 b Fg(con)n(taining:)p Black\nBlack 689 3630 a Ff(XDEFS)129 b(=)43 b(-DNOPTHREADS)515\n3816 y Fg(Unfortunately)29 b(the)g(additional)g(source)f(directories)f\n(con)n(tain)i(v)-5 b(arious)27 b(utilit)n(y)j(and)f(test)515\n3916 y(programs)e(\\(whic)n(h)k Fd(must)f(not)38 b Fg(b)r(e)30\nb(built\\))h(so)f(w)n(e)f(cannot)h(rely)f(on)h Ff(mkmf)e\nFg(generating)h(the)515 4016 y(correct)d Ff([targets])e\nFg(list.)515 4146 y(Instead)18 b(w)n(e)g(just)h(cop)n(y)e(the)i\n(default)g Ff(Makefile)c Fg(\\\\template\")j(\\(sho)n(wn)g(ab)r(o)n(v)n\n(e\\))f(as)h Ff(Mpeg3Plugin/)515 4245 y(Makefile.in)23\nb Fg(and)28 b(insert)f(the)i(required)e(list)h(of)g(targets)e(\\(and)i\nFf(cpp)f Fg(de\\014nition\\))i(man)n(u-)515 4345 y(ally)-7\nb(.)36 b(The)28 b(end)g(result)f(is)g(sho)n(wn)g(in)h(Figure)f(2.)p\n1 0 0 TeXcolorrgb Black 1 0 0 TeXcolorrgb 722 4531 a(Note:)73\nb(The)26 b(default)g(`)p Ff([make\\\\_targets])p Fg(')20\nb(will)26 b(con)n(tain)g(additional)f(rules)722 4631\ny(for)f(the)g(ob)5 b(jects)24 b(that)g(w)n(e're)f(trying)h(to)g(a)n(v)n\n(oid)e(building)j(\\(b)r(ecause)e(it's)i(built)722 4730\ny(from)31 b(an)g(exhaustiv)n(e)f(list)h(of)g(`)p Ff(.c)p\nFg(')g(\\014les)g(in)g(the)h(source)d(directories\\).)47\nb(This)722 4830 y(do)r(es)26 b(no)g(harm)g(since)g(the)h(o\\013ending)f\n(rules)g(can)g(nev)n(er)f(b)r(e)i(triggered)d(\\(their)722\n4930 y(targets)j(are)f(not)i(listed)g(in)g(`)p Ff(OBJS)p\nFg('\\).)p Black Black 1905 5255 a(11)p Black eop end\n%%Page: 12 12\nTeXDict begin 12 11 bop Black Black Black Black Black\nBlack Black 722 491 a Ff(#)43 b(Makefile.in)c(for)k(Mpeg3Plugin)c(in)k\n(Unix)f(Squeak)722 690 y([make_cfg])722 790 y([make_plg])722\n989 y(TARGET)85 b(=)43 b(Mpeg3Plugin$a)722 1188 y(PLUGIN)85\nb(=)43 b(Mpeg3Plugin$o)722 1288 y(VIDEO)129 b(=)43 b(getpicture$o)c\n(headers$o)h(idct$o)h(macroblocks$o)d Fe(etc...)722 1387\ny Ff(AUDIO)129 b(=)43 b(dct$o)f(header$o)e(layer1$o)g(layer2$o)g\n(layer3$o)h Fe(etc...)722 1487 y Ff(LIBMPEG)g(=)i(bitstream$o)c\n(changesForSqueak$)o(o)e(libmpeg3$o)j Fe(etc...)722 1686\ny Ff(OBJS)173 b(=)43 b($\\(PLUGIN\\))d($\\(VIDEO\\))g($\\(AUDIO\\))h\n($\\(LIBMPEG\\))722 1886 y(XINCLUDES)302 b(=)43 b([includes])722\n1985 y(XDEFS)478 b(=)43 b(-DNOPTHREADS)722 2184 y($\\(TARGET\\))d(:)j\n($\\(OBJS\\))e(Makefile)1071 2284 y($\\(LINK\\))g($\\(TARGET\\))f($\\(OBJS\\))\n722 2483 y([make_targets])722 2683 y(.force)h(:)p Black\n981 2948 a Fg(Figure)27 b(2:)36 b Ff(unix/plugins/Mpe)o(g3P)o(lu)o(gin)\no(/M)o(ak)o(efi)o(le)o(.in)p Black Black 515 3197 a Fa(3.4)112\nb(Coping)37 b(with)f(VMMak)m(er)i(quirks)515 3383 y Fg(VMMak)n(er)31\nb(will)h(refuse)f(to)h(compile)g(a)f(plugin)h(if)g(it)h(thinks)f(the)g\n(plugin)g(requires)e(plat-)515 3483 y(form)h(supp)r(ort.)49\nb(This)32 b(is)f(\\\\all-or-nothing\":)e(if)j(platform)f(supp)r(ort)h(is)g\n(required)e(on)i Fd(one)515 3582 y Fg(platform)c(then)i(it)f(is)g\n(required)f(on)h Fd(al)t(l)38 b Fg(platforms)29 b(\\(ev)n(en)f(if)i(the)\nf(plugin)g(compiles)g(quite)515 3682 y(happily)e(without)h(platform)f\n(supp)r(ort)h(in)g(Unix\\).)515 3814 y(The)22 b(easiest)e(w)n(a)n(y)h\n(to)h(add)f(\\\\n)n(ull\")g(platform)g(supp)r(ort)h(is)g(to)f(place)g(an)h\n(empt)n(y)g(`)p Ff(Makefile.)515 3914 y(inc)p Fg(')33\nb(in)i(the)g(plugin's)g Ff(platdep)d Fg(directory)-7\nb(.)57 b(\\(T)-7 b(o)34 b(see)g(this)h(in)g(action,)h(lo)r(ok)e(in)h\nFf(unix/)515 4013 y(plugins/JPEGRead)o(Wr)o(it)o(er2)o(Pl)o(ugi)o(n)p\nFg(.\\))515 4274 y Fa(3.5)112 b(If)37 b(all)f(else)h(fails)515\n4460 y Fg(\\(Where)h(\\\\all)f(else)h(failing\")f(is)h(de\\014ned)g(as:)g\n(\\\\after)f(trying)g(for)h(20)f(min)n(utes)h(and)g(still)515\n4559 y(getting)27 b(no)n(where\".\\))515 4691 y(If)h(y)n(ou're)e(writing)\nh(a)g(plugin)g(that)h(needs)f(platform)g(supp)r(ort)g(\\(b)r(ey)n(ond)h\n(dum)n(b)f(inclusion)515 4791 y(of)j(a)f(few)h(additional)f(`)p\nFf(.c)p Fg(')h(\\014les\\))g(and)f(this)h(do)r(cumen)n(t)g(has)g(b)r(een)\ng(of)g(no)f(help)h(at)g(all)g(\\(or)515 4890 y(if)g(y)n(ou)f(understo)r\n(o)r(d)h(it)g(but)g(y)n(ou're)f(still)h(su\\013ering)f(from)h(\\\\all)f\n(else)g(failing\"\\))h(then)g(send)515 4990 y(me)d(mail)h(and)f(I'll)h(b)\nr(e)g(happ)n(y)f(to)h(help)g(y)n(ou)f(with)h(the)g(v)-5\nb(arious)26 b(platdep)i(\\014les.)p Black 1905 5255 a(12)p\nBlack eop end\n%%Page: 13 13\nTeXDict begin 13 12 bop Black Black Black 515 648 a Fi(Index)p\nBlack 515 813 a Ff([includes])p Fg(,)23 b(8)515 913 y\nFf([make)p 740 913 27 4 v 29 w(cfg])p Fg(,)j(8)515 1013\ny Ff([make)p 740 1013 V 29 w(inc])p Fg(,)g(9)515 1112\ny Ff([make)p 740 1112 V 29 w(plg])p Fg(,)g(8)515 1212\ny Ff([make)p 740 1212 V 29 w(targets])p Fg(,)e(9)515\n1312 y Ff([plibs])p Fg(,)h(9)515 1411 y Ff([target])p\nFg(,)f(9)515 1511 y Ff([targets])p Fg(,)g(9)515 1610\ny Ff($\\(COMPILE\\))p Fg(,)f(9)515 1710 y Ff($\\(LINK\\))p\nFg(,)i(9)515 1810 y Ff($\\(XCFLAGS\\))p Fg(,)e(9)515 1909\ny Ff($\\(XCPPFLAGS\\))p Fg(,)g(9)515 2009 y Ff($\\(XDEFS\\))p\nFg(,)h(9)515 2109 y Ff($\\(XINCLUDES\\))p Fg(,)f(10)515\n2208 y Ff($\\(XLDFLAGS\\))p Fg(,)g(9)515 2389 y Ff(AC)p\n608 2389 V 30 w(PLUGIN)p 902 2389 V 29 w(CHECK)p 1151\n2389 V 30 w(LIB)p Fg(,)j(6)515 2489 y Ff(AC)p 608 2489\nV 30 w(PLUGIN)p 902 2489 V 29 w(DEFINE)p 1195 2489 V\n29 w(UNQUOTED)p Fg(,)f(7)515 2588 y Ff(acinclude.m4)p\nFg(,)e(6)681 2688 y(example,)k(11)515 2788 y(additional)c(plugin)h\n(source)f(directories,)847 2887 y(10)515 3068 y(build)28\nb(directory)681 3168 y(con\\014guring,)e(3)681 3268 y(creating,)g(3)515\n3449 y Ff(config.status)p Fg(,)c(5)681 3548 y(v)n(ersus)k\nFf(configure)p Fg(,)e(5)515 3648 y Ff(configure)p Fg(,)g(6)681\n3748 y(macros)i(for)h(plugins,)g(6)681 3847 y(recreating,)f(6)515\n4028 y(emergency)g(services,)g(12)515 4209 y Ff(Makefile)p\nFg(,)e(7)681 4309 y(a)n(v)n(oiding)j Ff($\\(XINCLUDES\\))p\nFg(,)22 b(10)681 4408 y(compile/link)27 b(commands,)g(9)681\n4508 y(k)n(eyw)n(ord)e(substitution,)k(7)681 4608 y(passing)d(extra)h\n(\\015ags,)g(9)681 4707 y(replacing,)f(10)681 4807 y(target)g(rules,)i\n(9)515 4907 y Ff(Makefile)c Fg(k)n(eyw)n(ords)681 5006\ny Ff([includes])p Fg(,)f(8)p Black Black 2258 813 a Ff([make)p\n2483 813 V 30 w(cfg])p Fg(,)j(8)2258 913 y Ff([make)p\n2483 913 V 30 w(inc])p Fg(,)g(9)2258 1013 y Ff([make)p\n2483 1013 V 30 w(plg])p Fg(,)g(8)2258 1112 y Ff([make)p\n2483 1112 V 30 w(targets])p Fg(,)e(9)2258 1212 y Ff([plibs])p\nFg(,)h(9)2258 1312 y Ff([target])p Fg(,)g(9)2258 1411\ny Ff([targets])p Fg(,)f(9)2092 1511 y Ff(Makefile.in)p\nFg(,)f(10)2258 1610 y(example,)k(11)2092 1710 y Ff(Makefile.inc)p\nFg(,)c(10)2258 1810 y(example,)k(11)2258 1909 y(k)n(eyw)n(ord)f\n(substitution,)i(10)2092 2009 y Ff(mkmf)p Fg(,)e(7)2258\n2109 y(additional)18 b(source)f(directories,)i(10)2258\n2208 y(default)28 b(header)f(directories,)f(8)2258 2308\ny(default)i(source)f(directories,)f(9)2092 2407 y Ff(mkmf.subdirs)p\nFg(,)d(10)2258 2507 y(example,)k(11)2092 2690 y(plugin)2258\n2789 y Ff(Makefile)p Fg(,)e(7)2258 2889 y Ff(Makefile)g\nFg(anatom)n(y)-7 b(,)26 b(7)2258 2989 y(adding)h(y)n(our)g(o)n(wn,)g(5)\n2258 3088 y(con\\014guring,)f(6)2258 3188 y(target)h(rules,)g(9)2258\n3287 y(Unix-sp)r(eci\\014c)h(directory)-7 b(,)26 b(6)2092\n3470 y(Unix-sp)r(eci\\014c)i(\\014les,)f(6)2092 3653 y(VMMak)n(er)2258\n3752 y(con\\014guration)f(\\014le,)i(4)2258 3852 y(missing)f(platform)h\n(supp)r(ort,)f(12)2258 3952 y(reference,)g(4)p Black\n1905 5255 a(13)p Black eop end\n%%Trailer\n\nuserdict /end-hook known{end-hook}if\n%%EOF\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/HowToBuildFromSource.txt",
    "content": "\n            ****** Building Unix Squeak (>= 3.2) from source ******\n\n                                 Ian Piumarta\n\n                         <ian.piumarta@squeakland.org>\n\n      Last edited: 2005-03-17 12:43:23 by piumarta on squeak.hpl.hp.com\n               Translated to .ps/.pdf/.html/.txt: March 17, 2005\n\n***** Contents *****\n\n    * 0_The_easy_way\n    * 1_The_hard_way:_configure,_build,_install\n    * 2_Generating_your_own_VM_and_plugin_sources\n\n          o 2.1_How_configure_finds_the_src_directory\n\n    * 3_Adding_your_own_plugins\n\n          o 3.1_Plugin-specific_configuration\n          o 3.2_Plugin-specific_Makefile_declarations_and_rules\n          o 3.3_Examples_taken_from_existing_plugins\n          o 3.4_Coping_with_VMMaker_quirks\n          o 3.5_If_all_else_fails\n\n    * Index\n\n****** 0 The easy way ******\n\nBeginning with version 3.7-7, everything you need is included with the Unix\nsources regardless of how you obtained them - either as a tarball or by\nrepository checkout. (This was done to eliminate frequent problems encountered\nby people combining the repository Unix and Cross sources with a set of\nincompatible generated sources.)\n\nIf you extract a tarball then you will have a top-level directory named Squeak-\nX.Y-Z (for some values of X, Y, and Z). If you are checking out from a\nrepository, you can call the direcory anything you like; for example:\n\n  $ svn co http://squeak.hpl.hp.com/svn/squeak/trunk squeak\n\nwill leave you with a directory called squeak. (We'll assume from now on that\nthe directory is called squeak.)\n\nNext change to the 'unix' directory within the sources that you just checked\nout (or extracted from the tarball):\n\n  $ cd squeak/platforms/unix\n\nBuild the VM and plugins by running make:\n\n  $ make\n\nThen install the VM, plugins and manual pages by running make again (with\nsuperuser privileges):\n\n  $ sudo make install\n\nTo delete the temporary files created during the build process, run make one\nlast time:\n\n  $ make clean\n\nThat's all there is to it.\n\n****** 1 The hard way: configure, build, install ******\n\nUnix Squeak is built using the (almost) universal ``configure; make; make\ninstall''. If you haven't come across this before, read on...\n\nCreate a build directory (which we will call `blddir' from now on) and then\n`cd' to it:\n\n  $ mkdir blddir\n  $ cd blddir\n\nA convenient place is just next to the platforms directory, like this:\n\n  $ cd squeak\n  $ ls\n  platforms src ...\n  $ mkdir bld\n  $ cd bld\n\nCreate the build environment by running the script configure which lives in the\nplatforms/unix/config directory.\n\n     Note: The configure script accepts lots of options. To see a list of\n     them, run: `configure --help'\n\nAssuming you've created the blddir next to platforms, this would be:\n\n  $ ../platforms/unix/config/configure\n\n     Note: This assumes that the VMMaker sources are in `../src'. However,\n     since the Unix Squeak support code is independent of the image\n     version from which VMMaker generated the interpreter/plugin sources,\n     it is possible that your source distribution comes with more than one\n     src directory (corresponding to more than one image version used to\n     generate the sources). In such cases you will have to tell configure\n     which source version to use, via the `--with-src' option. For\n     example, if there are two source directories called src-3.2gamma-4857\n     and src-3.3.alpha-4881 then you would use one of the following\n     commands:\n\n       $ .../configure --with-src=src-3.2gamma-4857\n             nbsp;CLASS=\"textit\">or\n       $ .../configure --with-src=src-3.3alpha-4881\n\nBuild the VM and plugins by running make:\n\n  $ make\n\n     Note: If you want to build just the VM (without external plugins) or\n     just the external plugins (without the VM) then you can use: `make\n     squeak' or `make plugins' respectively.\n\nFinally install the VM, plugins and manual pages:\n\n  $ su root\n  $ make install\n\n****** 2 Generating your own VM and plugin sources ******\n\nGenerating your own VM/plugin sources might be necessary for various reasons:\n\n    * you want to change the mix of internal vs. external plugins\n    * you want to remove some plugins from the VM that you will never use\n    * you've pulled in some updates that modify the Interpreter or plugins\n    * you've filed-in (or written) a whole new plugin\n    * etc...\n\nVersion 3.2 (and later) of Unix Squeak use VMMaker to generate the core\ninterpreter and plugin sources.\n\nStart Squeak in the top-level directory (the one containing the platforms\ndirectory); for example:\n\n  $ ls\n  src platforms ...\n  $ squeak MyCoolPlugin.image\n\nOpen a VMMakerTool and modify the setup to your liking.\n\n     Note: The VMMaker configuration used to build the distributions of\n     Unix Squeak is available in platforms/unix/config/VMMaker.config.\n\nThen click on the relevant ``generate ...'' button. You can now `configure;\nmake; make install' in your blddir (as described above).\n\n     Note: You only need to run configure once for a given blddir (on the\n     same host). If you modify the choice of plugins (or change whether\n     they're internal/external) then you can update the build environment\n     by running the config.status script in the bldddir, like this:\n\n       $ squeak MyCoolPlugin.image\n       ... generate new sources ...\n       $ cd blddir\n       $ ./config.status\n       $ make\n     This is much faster than running configure all over again. (In fact,\n     make should detect any changes to the plugin configuration and re-run\n     config.status for you automatically.)\n\n     Note: `configure' doesn't actually create any files. The last thing\n     it does is run `config.status' to create the configured files in\n     blddir from the corresponding file.ins in the unix/config directory.\n     So in the remainder of this document the phrase `during\n     configuration' means either when running `configure' for the first\n     time or running `config.status' to update an already configured build\n     environment.\n\n***** 2.1 How configure finds the src directory *****\n\nStarting with version 3.7 configure looks in two places for the src directory,\nin the following order, and uses the first one that it finds:\n\n    * the top-level directory (the one containing the platforms directory);\n    * the platforms/unix directory.\n\nIn other words, if you want to use your own generated sources without deleting\nthe built-in generated sources, generating them into a src directory next to\nplatforms (and then re-running configure) will do what you want.\n\n****** 3 Adding your own plugins ******\n\n     Note: This section is intended primarily for plugin developers.\n\nIf your plugin requires no platform-specific tweaks then there's nothing for\nyou to do. configure (and config.status) will provide a default Makefile for it\nthat should work. If your plugin requires only platform-independent tweaks\n(and/or additional hand-written code) then these go in platforms/Cross/plugins,\nand there's nothing for you to do (in Unixland).\n\nOn the other hand, if you require special configure tests or additional\ndeclarations/rules in your plugin's Makefile then you need to specify them\nexplicitly.\n\n     Note: Unix Squeak subscribes to the following philopsophy:\n\n     Absolutely everything that is specific to Unix (sources, headers,\n     configure and Makefile extensions, etc.) lives under platforms/unix.\n\n     In other words: there is not (nor aught there be) any Unix-related\n     information under the platforms/Cross directory. (Unix Squeak is\n     entirely encapsulated under platforms/unix and is utterly immune to\n     ``random junk'' elsewhere in the platforms tree.)\n\nFirst you must create a new directory under platforms/unix/plugins named after\nyour plugin. This directory will hold the files describing the additional\nconfiguration checks and/or Makefile contents. For example, if your plugin is\ncalled ``MyCoolPlugin'' then\n\n  $ mkdir platforms/unix/plugins/MyCoolPlugin\n\nwould be the thing to do. (The following sections will refer to this directory\nas platdep since the full path is quite a mouthful of typing for my lazy\nfingers.)\n\n***** 3.1 Plugin-specific configuration *****\n\nYour plugin can ask configure to run additional tests (and to set additional\nvariables in its output files) simply by including a file called acinclude.m4\nin it's platdep directory.\n\n     Note: The configure script is `compiled' from several other files. If\n     you create a `platdep./acinclude.m4' file then you must `recompile'\n     configure. You can do this by `cd'ing to unix/config and running\n     `make', or (if you have GNU make) from the blddir like this:\n\n       $ make -C ../platforms/unix/config\n\nIn addition to the usual autoconf macros, the following macros are available\nspecifically for Squeak plugins to use:\n\n**** 3.1.1 AC_PLUGIN_CHECK_LIB(lib,func) ****\n\nThis is similar to the autoconf `AC_CHECK_LIB' macro.\n\nfunc is the name of a function required by the plugin, defined in the external\n(system) library lib. The macro checks that the library is available (via `-\nllib') and then adds it to the list of libraries required by the plugin (see\nthe explanation of [plibs] in Section 3.2.1 for a description of how library\ndependencies for plugins are handled).\n\nIf func cannot be found in lib then the plugin will be disabled and a message\nto that effect printed during configuration. (The VM can still be built,\nwithout rerunning VMMaker or reconfiguring, and the plugin will simply be\nommitted from it.)\n\n**** 3.1.2 AC_PLUGIN_DEFINE_UNQUOTED(keyword,text) ****\n\nThis is similar to the autoconf `AC_DEFINE_UNQUOTED' macro.\n\nkeyword is a Makefile keyword (usually of the form `[name]') and text is\narbitrary text to be associated with it. Calling this macro causes mkmf to\nsubstitute text for all occurrences of keyword in the Makefile generated for\nthe plugin.\n\n**** 3.1.3 Plugin-specific variables ****\n\nThe following variables are also set during the execution of a plugin-specific\nacinclude.m4:\n\n      ${plugin} is the name of the plugin;\n      ${topdir} is the path to the top-level directory (containing platforms);\n      ${vmmdir} is the path to the VMMaker `src' directory.\n\n***** 3.2 Plugin-specific Makefile declarations and rules *****\n\nThree mechanisms are avilable for this:\n   1. scanning additional dirrectories for sources and headers;\n   2. including a few additional lines into the default Makefile; and\n   3. replacing entirely the default Makefile with a hand-written one.\n(The last option isn't as scary as it might sound: read on...)\n\n**** 3.2.1 The anatomy of a plugin's Makefile ****\n\nBefore proceeding, let's take a minute to understand how Unix Squeak compiles\nand links files in its default Makefile for plugins. The default Makefile looks\nlike this:\n\n          # default Makefile for Unix Squeak plugins\n\n          [make_cfg]\n          [make_plg]\n\n          XINCLUDES       = [includes]\n          OBJS            = [targets]\n          TARGET          = [target]\n          PLIBS           = [plibs]\n\n          [make_inc]\n\n          $(TARGET) : $(OBJS) Makefile\n                  $(LINK) $(TARGET) $(OBJS) $(PLIBS)\n\n          [make_targets]\n\n          .force :\n\n     Note: The keywords appearing between `[ square brackets ]' are\n     substituted during configuration by a preprocessor called `mkmf'\n     according to the kind of plugin (internal/external) being built.\n\n[make_cfg]  is the configured variable section. It contains the platform-\nspecific information gleaned by configure while it was figuring out which\ncompiler you have, what flags your linker needs, where to install stuff, and so\non.\n\n[make_plg]  contains a handful of definitions which depend on whether the\nplugin is being compiled as internal or external:\n\n      o           the extension for object files\n\n      a           the extension for plugins\n\n      COMPILE     the command to compile a source file into an object file\n\n      LINK        the command to link one or more object files into a\n                  plugin\n\nFor internal plugins: $o is `.o' and $a is `.a'. $(COMPILE) is the C compiler\n(`$(CC) ... -o', so the first thing after the command must be the output\nfilename) and $(LINK) is archiver (`ar -rc', again requiring the output file to\nfollow immediately). Note that internal plugins are built as `ar' archives\nbefore being linked into the final binary.\n\nFor external plugins: $o is `.lo', $a is `.la', and $(COMPILE) and $(LINK) are\ninvocations of `libtool' to create position-independent objects and shared\nlibraries (with a `-o' appearing right at the end, so the first thing after the\ncommand must be the output filename).\n\n[includes]  is a list of `-Idir' compiler flags, one for each of the\ndirectories\n\n  src/plugins/nbsp;CLASS=\"textit\">name\n  src/vm/intplugins/\n\nnbsp;CLASS=\"textit\">name\n  platforms/Cross/plugins/\n\nnbsp;CLASS=\"textit\">name\n  platforms/unix/plugins/\n\nnbsp;CLASS=\"textit\">name\n\nin which at least one header file is present.\n\n[targets]  is a list of object files corresponding to the source (.c) files\nfound in the directories:\n\n  src/plugins/nbsp;CLASS=\"textit\">name/*.c\n  src/vm/intplugins/\n\nnbsp;CLASS=\"textit\">name/*.c\n  platforms/Cross/plugins/\n\nnbsp;CLASS=\"textit\">name/*.c\n  platforms/unix/plugins/\n\nnbsp;CLASS=\"textit\">name/*.c\n\nwhere each source file has been stripped of the directory name and had the `.c'\nconverted into `$o'.\n\n[target]  is the name of the plugin, including the $a extension.\n\n[plibs]  is a list of zero or more libraries on which the plugin depends (as\ndetected using the macro AC_PLUGIN_CHECK_LIB in the plugin-specific\nacinclude.m4). If the plugin is being built internally then this list is empty\nand the required libraries are included in the final link command. If the\nplugin is being built externally then the plugin itself (a shared object) is\nlinked against these libraries (via [plist]) rather than with the main VM\nbinary.\n\n(This is to ensure that a missing shared object needed by an external plugin\nwill only affect the operation of that plugin and not prevent the rest of the\nVM from running, which would be the case if the entire VM were linked against\nit.)\n\n[make_inc]  is the contents of the Makefile.inc file in your plugin's platdep\ndirectory (or empty if this file doesn't exist).\n\n[make_targets]  is a list of rules for building the files listed in [targets].\nEach rule looks like this:\n\n        name$o : nbsp;CLASS=\"textit\">original/source/dir/name.c\n                $(COMPILE) name$o\n\nnbsp;CLASS=\"textit\">original/source/dir/name.c\n\n**** 3.2.2 A note about $(COMPILE) and $(LINK) commands ****\n\nYou should never pass additional flags to these commands explicitly. This is\nbecause you cannot know how they are defined. (Their definitions depend on\nwhether the plugin is being built internally or externally -- and might even\nchange radically in future releases of Unix Squeak.)\n\nInstead you should pass additional compiler/linker flags to these commands by\nsetting the following variables in `Makefile.inc' or `Makefile.in':\n\n      XCPPFLAGS     `-I' flags for cpp\n\n      XDEFS         `-D' flags for cpp\n\n      XCFLAGS       anything to be passed to the compiler\n\n      XLDFLAGS      anything to be passed to the linker\n\n     Note: `mkmf' already uses `XINCLUDES'  to pass the list of\n     directories containing plugin header files to cpp. You can redefine\n     it if you like, but make sure that `[includes]' appears in its\n     definition (or in the definition of `XCPPFLAGS').\n\n**** 3.2.3 Specifying additional source directories ****\n\nmkmf looks for a file in your plugin's platdep directory called `mkmf.subdirs'.\nIf this file exists then it should contain a list of directory names relative\nto the top-level directory (the one containing the src and platform\ndirectories). These directories will be added to the list of locations searched\nfor `.c' and `.h' files while constructing the substitutions for `[includes]',\n`[targets]' and `[make_targets]'.\n\n**** 3.2.4 Including additional material in the default Makefile ****\n\nIf the file platdep/Makefile.inc exists then mkmf will substitute its contents\ninto the Makefile in place of the [make_inc] keyword.\n\n     Note: Makefile.inc is read into the Makefile under construction\n     before mkmf performs substitutions on the `[keyword]'s. In other\n     words, your Makefile.inc can use the above keywords to include\n     relevant declarations and rules without worrying about whether the\n     plugin is internal or external.\n\n**** 3.2.5 Replacing the default Makefile entirely ****\n\nIf neither of the above are sufficient then you can create a complete Makefile\ntemplate called platdep/Makefile.in. mkmf will use this template instead of the\ndefault Makefile template shown earlier, and will perform keyword substitutions\non it as described above to create the final Makefile. (In other words, simply\ncopying the default template shown earlier will result in a Makefile identical\nto the one that mkmf would have produced by default.\n\n***** 3.3 Examples taken from existing plugins *****\n\nBy way of example we'll look at how two existing plugins specialise their\nconfiguration and Makefiles.\n\n**** 3.3.1 Configuration ****\n\nThe B3DAcceleratorPlugin requires OpenGL in order to compile. The file unix/\nplugins/B3DAcceleratorPlugin/acinclude.m4 contains a single call to an\nautoconf-style macro:\n\n    AC_PLUGIN_SEARCH_LIBS(glIsEnabled, GL)\n\nThis works similarly to the autoconf `AC_SEARCH_LIBS' macro: If a library\nlibGL.{a,so} (OpenGL) exists and exports the function glIsEnabled() then `-lGL'\nis added to the final VM link command. Otherwise the plugin is disabled (and a\nmessage warning of the fact is printed).\n\n     Note: There's a bug here. This should also check for `GL_VERSION_1_1'\n     in headers.\n\n**** 3.3.2 Customising the Makefile ****\n\nThe Mpeg3Plugin requires a (modified) libmpeg to be compiled along with it. The\nsources for this library are in (several) subdirectories of Cross/Meg3Plugin\nand they require additional cpp definitions in order to compile correctly.\n\nTo cope with the additional directories, unix/plugins/Mpeg3Plugin/mkmf.subdirs\nsimply lists them:\n\n  platforms/Cross/plugins/Mpeg3Plugin/libmpeg\n  platforms/Cross/plugins/Mpeg3Plugin/libmpeg/audio\n  platforms/Cross/plugins/Mpeg3Plugin/libmpeg/video\n\nTo cope with the additional cpp definitions, we could have written a tiny\nMakefile.inc containing:\n\n    XDEFS   = -DNOPTHREADS\n\nUnfortunately the additional source directories contain various utility and\ntest programs (which must not be built) so we cannot rely on mkmf generating\nthe correct [targets] list.\n\nInstead we just copy the default Makefile ``template'' (shown above) as\nMpeg3Plugin/Makefile.in and insert the required list of targets (and cpp\ndefinition) manually. The end result looks like this:\n\n          # Makefile.in for Mpeg3Plugin in Unix Squeak\n\n          [make_cfg]\n          [make_plg]\n\n          TARGET  = Mpeg3Plugin$a\n\n          PLUGIN  = Mpeg3Plugin$o\n          VIDEO   = getpicture$o headers$o idct$o macroblocks$o\n          nbsp;CLASS=\"textit\">etc...\n          AUDIO   = dct$o header$o layer1$o layer2$o layer3$o\n\n          nbsp;CLASS=\"textit\">etc...\n          LIBMPEG = bitstream$o changesForSqueak$o libmpeg3$o\n\n          nbsp;CLASS=\"textit\">etc...\n\n          OBJS    = $(PLUGIN) $(VIDEO) $(AUDIO) $(LIBMPEG)\n\n          XINCLUDES       = [includes]\n          XDEFS           = -DNOPTHREADS\n\n          $(TARGET) : $(OBJS) Makefile\n                  $(LINK) $(TARGET) $(OBJS)\n\n          [make_targets]\n\n          .force :\n\n     Note: The default `[make_targets]' will contain additional rules for\n     the objects that we're trying to avoid building (because it's built\n     from an exhaustive list of `.c' files in the source directories).\n     This does no harm since the offending rules can never be triggered\n     (their targets are not listed in `OBJS').\n\n***** 3.4 Coping with VMMaker quirks *****\n\nVMMaker will refuse to compile a plugin if it thinks the plugin requires\nplatform support. This is ``all-or-nothing'': if platform support is required\non one platform then it is required on all platforms (even if the plugin\ncompiles quite happily without platform support in Unix).\n\nThe easiest way to add ``null'' platform support is to place an empty\n`Makefile.inc' in the plugin's platdep directory. (To see this in action, look\nin unix/plugins/JPEGReadWriter2Plugin.)\n\n***** 3.5 If all else fails *****\n\n(Where ``all else failing'' is defined as: ``after trying for 20 minutes and\nstill getting nowhere''.)\n\nIf you're writing a plugin that needs platform support (beyond dumb inclusion\nof a few additional `.c' files) and this document has been of no help at all\n(or if you understood it but you're still suffering from ``all else failing'')\nthen send me mail and I'll be happy to help you with the various platdep files.\n\n***** Index *****\n  $(COMPILE)\n      3.2.2\n  $(LINK)\n      3.2.2\n  $(XCFLAGS)\n      3.2.2\n  $(XCPPFLAGS)\n      3.2.2\n  $(XDEFS)\n      3.2.2\n  $(XINCLUDES)\n      3.2.2\n  $(XLDFLAGS)\n      3.2.2\n  [includes]\n      3.2.1\n  [make_cfg]\n      3.2.1\n  [make_inc]\n      3.2.1\n  [make_plg]\n      3.2.1\n  [make_targets]\n      3.2.1\n  [plibs]\n      3.2.1\n  [target]\n      3.2.1\n  [targets]\n      3.2.1\n  AC_PLUGIN_CHECK_LIB\n      3.1.1\n  AC_PLUGIN_DEFINE_UNQUOTED\n      3.1.2\n  acinclude.m4\n      3.1\n        example\n            3.3.1\n  additional plugin source directories\n      3.2.3\n  build directory\n        configuring\n            1\n        creating\n            1\n  config.status\n      2\n        versus configure\n            2\n  configure\n      3.1\n        macros for plugins\n            3.1\n        recreating\n            3.1\n  emergency services\n      3.5\n  Makefile\n      3.2.1\n        avoiding $(XINCLUDES)\n            3.2.2\n        compile/link commands\n            3.2.2\n        keyword substitution\n            3.2.1\n        passing extra flags\n            3.2.2\n        replacing\n            3.2.5\n        target rules\n            3.2.1\n  Makefile keywords\n        [includes]\n            3.2.1\n        [make_cfg]\n            3.2.1\n        [make_inc]\n            3.2.1\n        [make_plg]\n            3.2.1\n        [make_targets]\n            3.2.1\n        [plibs]\n            3.2.1\n        [target]\n            3.2.1\n        [targets]\n            3.2.1\n  Makefile.in\n      3.2.5\n        example\n            3.3.2\n  Makefile.inc\n      3.2.4\n        example\n            3.3.2\n        keyword substitution\n            3.2.4\n  mkmf\n      3.2.1\n        additional source directories\n            3.2.3\n        default header directories\n            3.2.1\n        default source directories\n            3.2.1\n  mkmf.subdirs\n      3.2.3\n        example\n            3.3.2\n  plugin\n        Makefile\n            3.2\n        Makefile anatomy\n            3.2.1\n        adding your own\n            3\n        configuring\n            3.1\n        target rules\n            3.2.1\n        Unix-specific directory\n            3\n  Unix-specific files\n      3\n  VMMaker\n        configuration file\n            2\n        missing platform support\n            3.4\n        reference\n            2\n\n===============================================================================\n     2005-03-17\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/LICENSE",
    "content": "Source files below 'platforms/Cross' in this distribution that do not\ncontain individual copyright and license notices, and\n\nSource files below 'platforms/unix/src' in this distribution that do\nnot contain individual copyright and license notices are:\n\n  Copyright (C) 1996-2006 by Viewpoints Research Institute and other\n                             authors/contributors as listed.\n\n  All rights reserved.\n\nAll other source files below platforms/unix in this distribution that do not\ncontain individual copyright and license notices are:\n\n  Copyright (C) 1996-2006 by Ian Piumarta and other authors/contributors\n                             listed in individual source files.\n\n  All rights reserved.\n\nFor all of the above files:\n\n  Permission is hereby granted, free of charge, to any person obtaining a copy\n  of this software and associated documentation files (the \"Software\"), to deal\n  in the Software without restriction, including without limitation the rights\n  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n  copies of the Software, and to permit persons to whom the Software is\n  furnished to do so, subject to the following conditions:\n\n  The above copyright notice and this permission notice shall be included in\n  all copies or substantial portions of the Software.\n\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n  SOFTWARE.\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/Makefile",
    "content": "MAIN = HowToBuildFromSource\n\nall : $(MAIN).ps $(MAIN).html/$(MAIN).html $(MAIN).pdf $(MAIN).txt\n\ndvi : $(MAIN).dvi\n\n.SUFFIXES : .tex .dvi .ps .pdf .html .txt\n\n.ps.pdf :\n\tps2pdf $< $@\n\n.dvi.ps :\n#\tdvips -P cmz -o $@ $<\n\tdvips -o $@ $<\n\n.tex.dvi : .force\n\tlatex $(MAIN).tex\n\tlatex $(MAIN).tex\n\tmakeindex $(MAIN).idx\n\tlatex $(MAIN).tex\n\n$(MAIN).html/%.html : %.tex Makefile\n\ttest -d tmp || mkdir tmp\n\tlatex2html -dir tmp -local_icons -auto_prefix -show_section_numbers -split 4 $(MAIN).tex\n\ttest -d $(MAIN).html || mkdir $(MAIN).html\n\tcp -p tmp/*.html tmp/*.css tmp/*.png $(MAIN).html/.\n\t/bin/rm -rf tmp\n\n$(MAIN).txt : $(MAIN).tex html2text.rc Makefile\n\ttest -d tmp || mkdir tmp\n\tlatex2html -dir tmp -nonavigation -noinfo -show_section_numbers -split 0 $(MAIN).tex\n\thtml2text -rcfile html2text.rc -nobs tmp/$(MAIN).html | uniq > $@\n\t/bin/rm -rf tmp\n\nclean : .force\n\t/bin/rm -f *~ *.{aux,idx,ilg,ind,log,out,toc}\n\ndistclean : clean\n\t/bin/rm -rf $(MAIN).html\n\t/bin/rm -f *.{dvi,ps,pdf,txt}\n\n.force :\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/README.Contributing",
    "content": "If you plan on contributing code or submitting patches to fix bugs\nthen PLEASE adhere to the following coding conventions.  Doing so\nmakes my life easier (since I *will* reformat myself any code that\ndoesn't conform) and makes your code much more likely to be accepted\n(since any code that is difficult to read because of formatting\nproblems simply won't get read, and if I haven't read it then it isn't\ngoing into my sources -- period).\n\nOf course, if you're submitting an entire file full of stuff (and you\nare therefore the original author of the file) then you can format it\nany way you like (and tell the rest of us how we have to format our\ncode to get it included in your file. ;-)\n\nThe following guidelines are sufficiently close to the GNU Coding\nStandards that you shouldn't need to change any of Emacs's C-mode\nvariables from their default settings.\n\n\n\nFORMATTING CODE\n---------------\n\n\nTabs stops are every TWO characters.  Regardless of what Torvalds\nmight say, if tab stops were meant to be 8 characters apart then\nhumans would have evolved wide-angle vision shortly after the\ninvention of the Newbury terminal.  (If your editor doesn't remind you\nabout the matching delimiter when a block is more than a page long\nthen it's time you evolved to Emacs. ;-)\n\nAlways use C-style comment delimiters.  Unix Squeak runs on lots of\nplatforms where GNU gcc is not the standard compiler.  Many of these\ncompilers choke (quite rightly) on C++ style comments.  Similarly,\nalways comment-out any additional explanatory text appearing after\n`#else' and `#endif'.\n\nUse `#if defined(...)' in preference to `#ifdef ...'.\n\nIndent preprocessor commands to reflect the nesting of conditional\nsections, and place a comment after any `#else' or `#endif' that isn't\nutterly obvious:\n\n\t#if defined(LAZY)\n\t# include <sleep.h>\n\t# ...\n\t# if defined(VERY_LAZY)\n\t#   include <vacation.h>\n\t#   ...\n\t# endif\n\t# ...\n\t#else /* !LAZY */\n\t# include <schedule.h>\n\t#endif\n\nDeclarations and external definitions should start in column zero.\nThe only exception is for small conditional sections where indentation\nhelps to show the \"scope\" of the conditional code.  Hence:\n\n\t#if defined(EAT_DONUTS)\n\t# include <donut/supplies.h>\n\t  int donutCounter= 0;\t/* number of donuts consumed since startup */\n\t#endif /* EAT_DONUTS */\n\nBut don't overdo this -- the start/end of the conditional section\nshould remain clearly visible while looking at indented declarations.\n\nAlways use ANSI prototypes, and put the return types of functions and\ntheir identifiers on the same line (unless you rely on tools that\nprefer function names to start in column zero, in which case you're\nforgiven in advance).  Hence:\n\n\tstatic char *concat(char *s1, char *s2)\n\t{\n\t  ...\n\t}\n\nIf the arguments don't fit nicely on one line, and the function\nidentifier is short, split the declaration like this:\n\n\tint lotsOfArgs(int anInteger, long aLong, short aShort,\n\t\t       double aDouble, float aFloat)\n        ...\n\nIf the identifier is enormous (which sometimes happens because of the\nfrequent association between C functions and Squeak selectors) then\nput the opening parenthesis on the next line, indented by four\ncharacters.  (That way Emacs knows how to indent the rest of the\narguments nicely.)  Like this:\n\n\tint ioDoSomethingObscureWithFarTooMuchBabbleInTheIdentifier\n\t    (int anInteger, long aLong, short aShort,\n\t     double aDouble, float aFloat)\n        ...\n\nPut spaces on either side of an arithmetic or relational operator.\n\nOne of the most common (and most difficult to debug) problems in C is\ncaused by writing `=' when you meant `=='.  To avoid such mistakes, it\nis a great help to omit the space before an operator that side-effects\nits l-value.  For example:\n\n\tif (x == 42)\n\t  x= 666;\n\n\twhile (ptr >= base)\n\t  processWord(ptr-= 4);\n\n(In my three years of writing C before adopting this convention I\nspent many tens of hours tracking down `=' vs. `==' bugs.  In the\nfifteen years since the instant that I adopted the above convention I\nhave suffered from that bug precisely ONCE.)\n\nFor similar reasons it's also a good idea to place constant values on\nthe left side of a comparison.  Most compilers will happily let this\nthis pass:\n\n\tint c= getchar();\n\tif (c= EOF)\n\t  ...\n\nbut will detect the problem if the comparison is written the other way\nround:\n\n\tint c= getchar();\n\tif (EOF= c)\n\t  ...\n\nCharacter constants are characters:\n\n\tvoid terminate(char *string, size_t len)\n\t{\n\t  string[len]= '\\0';\t/* NOT `string[len]= 0;' !!! */\n\t}\n\nAlways initialise a variable, even if you're just about to give it a\nvalue:\n\n\tint min= 0;\n\n\tif (x < y)\n\t  min= x;\n\telse\n\t  min= y;\n\t...\n\nJust about every compiler in existence can optimise away the\nassignment.  On the hand, always assigning an initial value avoids\nwarning messages about possibly uninitialised variables from several\ncompilers when their optimisation dials are `cranked up to 11'.\n\n\nVertically align related elements in dense program sections, such as a\nlong series of assignments or declarations:\n\n\tint a=        42;\t/* current data value */\n\tint counter=   0;\t/* how many we've counted */\n\tint moreToDo=  1;\t/* 1 if we've got more to count */\n\nThis applies to the _identifiers_ when indirection is present:\n\n\tint   a=         42;\t/* current data value */\n\tint  *current=    0;\t/* current data location */\n\tint **dataLists=  0;\t/* current data list */\n\nDon't be tempted to write `C++ style' types.  Respect also the proper\nplacement of whitespace in casts, which should have spaces in exactly\nthe same places as would the equivalent declaration.  Hence:\n\n\t/* ptr to (ptr to int) fn of ptr to ptr to int */\n\ttypedef int *(*ppifpi)(int **);\n\n\tppifpi myPpifpi= 0;\n\n\tint ioSetPpifpi(int sqFunctionIndex)\n\t{\n\t  myPpifpi= (int *(*)(int **))sqFunctionIndex;\n\t}\n\n(Outside Squeak code too, I guarantee that you'll come up against many\nmore brick walls trying to use the `C++ style' \"int* foo\" [ugh -- it\n_isn't_ the `int' that's the pointer in there!!] and suchlike than you\nwill if you stick to the old-fashioned, and _rational_, C syntax.)\n\n\nPut a space between a keyword and a parenthesised argument.  Put\nspaces after commas.  Don't put a space between a function name and\nthe argument list, and never put a space after an opening parenthesis\nor before a closing parenthesis:\n\n\tif (x < foo(y, z))\n          haha= bar[4] + 5;\n\telse\n\t  {\n\t    while (z)\n\t      {\n\t\thaha+= foo(z, z);\n\t\t--z;\n\t      }\n\t    return ++x + bar();\n\t  }\n\nWhen you split an expression into multiple lines, split it BEFORE an\noperator, not after one.  Here is the right way:\n\n     if (fooThisIsLong && bar > win(x, y, z)\n\t && remaining_condition)\n       ...\n\nAvoid having two operators of different precedence at the same level\nof indentation.  For example, don't write this:\n\n\tmode= (inmode[j] == VOIDmode\n\t       || GET_MODE_SIZE(outmode[j]) > GET_MODE_SIZE(inmode[j])\n\t       ? outmode[j] : inmode[j]);\n\nInstead, use extra parentheses so that the indentation shows the\nlogical nesting:\n\n\tmode= ((inmode[j] == VOIDmode\n\t\t|| (GET_MODE_SIZE(outmode[j]) > GET_MODE_SIZE(inmode[j])))\n\t       ? outmode[j] : inmode[j]);\n\nInsert extra parentheses so that Emacs will indent the code properly.\nFor example, the following indentation looks nice if you do it by\nhand, but Emacs would mess it up:\n\n\tv = rup->ru_utime.tv_sec*1000 + rup->ru_utime.tv_usec/1000\n\t    + rup->ru_stime.tv_sec*1000 + rup->ru_stime.tv_usec/1000;\n\nBut adding a set of parentheses solves the problem:\n\n\tv = (rup->ru_utime.tv_sec*1000 + rup->ru_utime.tv_usec/1000\n\t     + rup->ru_stime.tv_sec*1000 + rup->ru_stime.tv_usec/1000);\n\nWith very few exceptions, braces should always go on a line by\nthemselves.  Instead of this:\n\n\tif (x < y) {\n\t  z= x;\n\t} else {\n\t  z= y;\n\t}\n\nwrite this:\n\n\tif (x < y)\n\t  {\n\t    z= x;\n\t  }\n\telse\n\t  {\n\t    z= y;\n\t  }\n\nNever, ever, put an `else' and a brace on the same line.\n\nFormat do-while statements like this:\n\n\tdo\n\t  {\n\t    a= foo(a);\n\t  }\n\twhile (a > 0);\n\nEmpty `while' and `for' loops should have their trailing semicolon on\na line by itself, to make the absence of the body utterly obvious:\n\n\tfor (i= 1; i < argc; processArg(i++))\n\t  ;\n\n\twhile ('\\0' != (*dst++= *src++))\n\t  ;\n\nIntroduce redundant braces to restrict the scope of temporaries to the\nsmallest possible region.  This is WRONG:\n\n\tvoid foo(void)\n\t{\n\t  int i;\n\t  /* ... lots of code ... */\n\t  for (i= 0; i < LIMIT; ++i)\n\t    {\n\t      ...\n\t    }\n\t  /* ... lots of code ... */\n\t  for (i= 0; i < LIMIT; ++i)\n\t    {\n\t      ...\n\t    }\n\t}\n\nwhile this is right:\n\n\tvoid foo(void)\n\t{\n\t  /* ... lots of code ... */\n\t  {\n\t    int i= 0;\n\t    for (i= 0; i < LIMIT; ++i)\n\t      {\n\t        ...\n\t      }\n\t  }\n\t  /* ... lots of code ... */\n\t  {\n\t    int i= 0;\n\t    for (i= 0; i < LIMIT; ++i)\n\t      {\n\t        ...\n\t      }\n\t  }\n\t}\n\nThe above is not just to help small-brained coders (like me) remember\nto delete variables when the code that uses them is removed.  It's\npreferable because some compilers are hopelessly bad at live-range\nsplitting.  Reducing the scope of variables to the absolute minimum\nencourages them to produce _much_ better code.  (You'll also be far\nless tempted to use the value of an iteration variable after the end\nof the loop, which is unforgivably bad programming style.)\n\n\nJust like a good composer, a good programmer knows that rarefied zones\nare the most effective media in which to produce contrast.  Leave lots\nof vertical whitespace between logically independent program sections,\nwith a minimum of comment `decoration' to make them stand out.  For example:\n\n  1 line of whitespace within function bodies to separate variable\n  declarations from statements\n\n  1 line of whitespace between groups of external declarations.\n\n  2 lines of whitespace between function definitions.\n\n  Begin a new \"logical section\" of the code with three blank lines, a\n  comment explaining what the section is all about, and then three\n  more blank lines before the section itself.\n\nand so on.  Just use common sense.  In particular, when there are many\nlines of declarations/definitions in a given section, the following is\nmuch kinder on the reader:\n\n\t...\n\n\n\t/*** variable declarations ***/\n\n\n\t/* counters */\n\n\tint a= 0;\n\tint b= 0;\n\n\t/* pointers */\n\n\tvoid *start=    0;\t/* initial address */\n\tvoid *position= 0;\t/* current address, post-incremented */\n\tvoid *end=      0;\t/* last address + 1 */\n\n\n\t/*** function definitions ***/\n\n\n\t/* accessors */\n\n\tint getA(void)\n\t{\n\t  return a;\n\t}\n\n\t/* predicates */\n\n\tbool atEnd(void)\n\t{\n\t  return position == end;\n\t}\n\n\t...\n\n(and more effective) than the `noisy' equivalent:\n\n\t...\n\n\t/*****************************/\n\t/*****************************/\n\t/***                       ***/\n\t/*** variable declarations ***/\n\t/***                       ***/\n\t/*****************************/\n\t/*****************************/\n\n\t/****************/\n\t/*** counters ***/\n\t/****************/\n\n\tint a= 0;\n\tint b= 0;\n\n\t/****************************/\n\t/****************************/\n\t/***                      ***/\n\t/*** function definitions ***/\n\t/***                      ***/\n\t/****************************/\n\t/****************************/\n\n\t/*****************/\n\t/*** accessors ***/\n\t/*****************/\n\n\tint getA(void)\n\t{\n\t  return a;\n\t}\n\n\t/******************/\n\t/*** predicates ***/\n\t/******************/\n\n\tbool atEnd(void)\n\t{\n\t  return position == end;\n\t}\n\n\t...\n\nwhere the details are hopelessly lost in the noisy comments, which\nserve only to make the program HARDER to read.\n\n(Besides, it looks just plain ugly.  Typographers have known for\ncenturies about the importance of maintaining a consistent `density'\nin the characters that make up an aesthetically-pleasing and easy to\nread font.  The same applies to programs.  Avoid large horizontal\nblobs of asterisks and other `dense' material intended to make things\nstand out -- they simply distract the reader's attention away from the\nessential.  Use whitespace instead!)\n\n\n\nOne final comment: remember that a crystal clear program is a MUCH\nmore impressive achievement in the eyes of the vast majority of\nreaders compared to a program designed to show off the author's\ncleverness in using obscure and obfuscating `C-isms' and cramming the\nmaximum possible amount of functionality in the minimum number of\nsource lines.  Also, the time you spend making your program visually\npleasing (and consistent) will be paid back many times over when you\neventually have to go bug hunting.\n\n\n\nPORTABILITY\n-----------\n\n\nStick to ANSI Standard C in source code.  Resist the temptation to\nintroduce GNU-specific extensions, even if you think your code is only\never going to run in a GNU environment.  If you use gcc then be sure\nyour code compiles without warnings when `-Wall' is in effect (which\nis the case for all source files in the \"unix\" source directory).\nIdeally, your code should compile without warnings when \"-pedantic\" is\nturned on too, but I'm not insisting on this -- yet.\n\nABSOLUTELY avoid GNU make-specific stuff in Makefiles.  If your\nwizz-bang Squeak feature requires a GNU make-specific rule or\nconditional section in a Makefile someplace then go away and rethink\nyour feature.  (If the entire GNU compiler suite can be built using\nthe tiniest imaginable subset of Makefile features, then so can\nSqueak.)\n\nAnother way to avoid GNU make features in Makefiles is to run a script\nfrom `configure' to make a `fragment' and then AC_SUBST_FILE() it into\nthe Makefile.in.  If you do this then please, please make sure that\nthe script is *strict* Bourne shell.  (If you're on a system that has\nbash as its standard shell then you must ABSOLUTELY install ash [or\nsomething similar] and exercise every path through the script with the\nfirst line set to \"#!/bin/ash\", before changing it to \"#!/bin/sh\".)\n\nIf you normally develop on a GNU-based Linux system (or any similarly\nwell-documented system) then check the \"CONFORMING TO\" or \"STANDARDS\"\nsection of the manual page for every library function and system call\nthat you use.  Avoid functions that don't conform to ANSI or POSIX,\nand pay particular attention to functions that are missing in either\nBSD or SysV.  (These should be used with extreme caution, and only if\nthe necessary conditional stuff [with a suitable fallback] is\npresent.)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/README.Keyboard",
    "content": "By default the newer VMs implement the \"traditional\" Unix VM\nbehaviour:\n\n    Squeak\t\tX11\n    ------\t\t---\n    shift\t\tShift ^ Lock\n    ctrl\t\tControl\n    command\t\tMod1\n    option\t\tMod1 & Control\n\nFor keyboards that have more than one modifier key (Apple, Sun, etc.)\na more Macintosh Squeak-like behaviour is possible by specifying which\nmodifier keys should map to Option and Command, either on the command\nline or by setting the corresponding environment variables:\n\n    Key\t\tX11 modifier\tVM option\tEnvironment\n    ---\t\t-----------\t---------\t-----------\n    Option\tmod<n>\t\t-optmod n\texport SQUEAK_OPTMOD=n\n    Command\tmod<n>\t\t-cmdmod n\texport SQUEAK_CMDMOD=n\n\nExamples:\n\n    Apple keyboard, GNU/Linux, XFree86 4.0:\t-cmdmod 1 -optmod 2\n    Apple keyboard, NetBSD, XFree86 4.2:\t-cmdmod 2 -optmod 1\n\t(these map \"Option\" to Option [duh] and \"Apple\" to Command)\n\n    Sun keyboard, Solaris:\t\t\t-cmdmod 4 -optmod 1\n\t(this maps \"Alt\" to Option and \"<>\" [Meta] to Command)\n\nIf you don't know which modifiers are bound to which keys, then:\n\n    executing `xmodmap -pm' will print the keycodes and keysyms\n    associated with each modifier;\n\n    running`xev' and hitting modifier keys will generate KeyRelease\n    events in which the \"state\" field has bit N+2 set to 1 for mod<N>\n    (bit 0 is the least significant); i.e: state=0x8 corresponds to\n    mod1 (N = 1, N+2 = 3, 1<<3 = 8), state=0x40 is mod4, and\n    state=0x48 means both mod1 and mod4 are active simultaneously.\n\nWith a properly mapped Command key the pointer buttons and keyboard\nshortcuts should work as follows (Option is generally ignored by the\nimage and is not considered below):\n\nPointer mappings:\n\n  Button1 (red)     -> select (world menu on background)\n  Button2 (yellow)  -> window menu (personal menu on background)\n  Button3 (blue)    -> morph halos\n\n  Button1 + Shift   -> extend selection (find window menu on background)\n  Button2 + Shift   -> window \"more\" menu (find window on background)\n  Button3 + Shift   -> morph halos\n\n  Button1 + Ctrl    -> window menu (personal menu on b/g) = acts like Button2\n  Button2 + Ctrl    -> morph menu\n  Button3 + Ctrl    -> morph menu\n\n  Button1 + Command -> morph halos = acts like Button3\n  Button2 + Command -> window menu (personal menu on b/g)\n  Button3 + Command -> morph halos\n\n  Button1 + Shift + Ctrl -> (topmost) morph menu\n  Button2 + Shift + Ctrl -> (topmost) morph menu\n  Button3 + Shift + Ctrl -> (bottommost) morph menu\n\n  Button1 + Shift + Command -> extend selection (find window on b/g)\n  Button2 + Shift + Command -> window \"more\" menu (find window on b/g)\n  Button3 + Shift + Command -> morph halos\n\n  Button1 + Ctrl + Command -> morph menu\n  Button2 + Ctrl + Command -> morph menu\n  Button3 + Ctrl + Command -> morph menu\n\n  Button1 + Shift + Ctrl + Command -> (topmost) morph menu\n  Button2 + Shift + Ctrl + Command -> (topmost) morph menu\n  Button3 + Shift + Ctrl + Command -> (topmost) morph menu\n\nKeyboard mappings (with reference to \"World Menu -> help... ->\ncommand-key help\"):\n\n  key                          -> lowercase key\n  key + Shift                  -> uppercase key\n  key         + Ctrl           -> uppercase command key\n  key                + Command -> lowercase command key\n  key + Shift + Ctrl           -> uppercase command key\n  key + Shift        + Command -> uppercase command key\n  key         + Ctrl + Command -> uppercase command key\n  key + Shift + Ctrl + Command -> uppercase command key\n\n  (kilometrage with the others [delimiters, styles, kerning, etc.]\n  will vary according to whether particular symbols are shifted or\n  unshifted on a given keyboard.)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/README.Sound",
    "content": "0.\tContents\n\t--------\n\n  1.\tVM options relating to sound\n  2.\tConfiguring sound support in Squeak\n  3.\tSound system-specific notes\n  3.1.\t\tOpen Sound System\n  3.1.1\t\t\tPossible Problems with OSS\n  3.2.\t\tNetwork Audio System\n  3.3.\t\tSunOS/Solaris\n  4.\tThe future of Squeak sound on Unix\n\n\n1.\tVM options relating to sound\n\t----------------------------\n\nSqueak includes primitives to modify the recording and playback\nlevels.  These primitives are sometimes invoked automatically on your\nbehalf by \"helpful\" code in the image.  (E.g., the recording level is\nset to 50% whenever the SoundRecorder is started.)  Many people\n(including myself) find this to be totally unnacceptable behaviour;\nmixer settings are the responsibility of an (external) mixer program\nand Squeak has no business whatsoever fiddling with them.\n\nIf the VM is started with the option `-nomixer' (or if the variable\nSQUEAK_NOMIXER is set in the environment) then the primitives which\nwrite mixer levels are disabled.  (The image will think they succeed\nbut in fact they do nothing at all.)\n\n\n2.\tConfiguring sound support in Squeak\n\t-----------------------------------\n\nThe `configure' script should figure out which sound support to use\n(if any) all by itself.  It looks for sound support in this order:\n\n\tOpen Sound System (or Linux native sound)\n\tSunOS/Solaris\n\tNetwork Audio System\n\nand chooses the first one it finds.  If it doesn't find any of the\nabove then the VM will still compile but sound support will be\ndisabled.\n\nIf you have more than one kind of sound support on your system (Sparc\nsystems might have all three installed) then you can specify which one\nto use explicitly, like this:\n\n\t.../configure --with-audio=oss\nor\t.../configure --with-audio=sun\nor\t.../configure --with-audio=nas\nor\t.../configure --with-audio=none\n\nThe default (not shown in the above list) is `auto' which means: \"use\nthe first of the above sound systems that appears to be available\".\nSpecifying `none' turns off sound support in the VM even if it is\navailable.\n\nIf you explicitly choose the desired sound support this way but\n`configure' cannot find the necessary header files then sound support\nwill be disabled totally (i.e., `configure' isn't about to hassle\nitself with hunting for alternatives when the particular support you\nasked for is unavailable).\n\n\n3.\tSound system-specific notes\n\t---------------------------\n\nBelow are some notes on the different sound systems supported in\nUnix Squeak.\n\n3.1. Open Sound System\n\nFull support for playback and recording is implemented and should work\nperfectly.  Full-duplex (simultaneous recording and playback) should\nwork on devices that support it.  (You'll need to change\n`canRecordWhilePlaying' in the image preferences, and then fix all the\nbugs in the SoundPlayer and SoundRecorder which effectively prevent\nthe latter from ever starting up when the former is active.)\n\nNote that OSS is available in three flavours:\n\n  1. Linux native sound drivers (bundled with the kernel).  Many of\n     these are hopelessly broken.  I've had bad experiences on both\n     PowerMac (awacs chip) and stock PC hardware (using the NM256 codec\n     and AC97 mixer chips).  Whether the OSS support works for you\n     largely depends on how well your particular sound drivers are\n     implemented.\n\n  2. Commercial version (http://www.opensound.com).  I've no idea how\n     well these work.  (I refuse to pay for software of any kind.)\n     Experience reports (either good or bad) would be appreciated.\n\n  3. The snd-pcm-oss compatibility module in the ALSA (Advanced Linux\n     Sound Architecture) drivers (http://www.alsa-project.org).  Squeak\n     sound works flawlessly with this driver.  (This isn't surprising:\n     after 10 days of total failure to make the Linux native OSS support\n     work I installed ALSA and finished the work using snd-pcm-oss.)  If\n     you experience any problems at all with either the Linux native\n     sound or commercial OSS then you are strongly encouraged to switch\n     to ALSA instead.\n\nYou might also consider turning on `soundStopWhenDone' in the image\npreferences since this will make Squeak much friendlier towards any\nother sound applications or daemons that might want to make noises\nfrom time to time and which would otherwise find /dev/dsp to be\nunavailable after Squeak has played its first sound.\n\n3.1.1 Possible Problems with OSS\n\nNed Konz discovered that it's sometimes necessary to tell Linux (using\nALSA and OSS compatibility modules) that Squeak wants to open the\nsound device in non-blocking mode.  If sound output in Squeak seems to\nbe playing things ``on top of themselves'' then you might want to try\nthe following (or something similar) as root to see if it cures the\nproblem:\n\n\t# echo \"squeak 0 0 block\" > /proc/asound/card0/pcm0p/oss\n\n3.2. Network Audio System\n\nSupport for playback and recording is implemented.  Playback should\nwork perfectly but I've had some problems making recording work.\n(I've had trouvle with the NAS utility `aurecord' too, so the fault is\nnot necessarily with Squeak.)\n\nThe latest source for the NAS daemon and utilites can be found at:\nhttp://www.radscan.com/nas.html.  (You'll have to compile it for\nyourself.)\n\nNote that NAS is broken on big-endian Linux machines.  I've patched\nthe daemon to fix this.  If you want the patches, send me email\n(mailto:ian.piumarta@squeakland.org).\n\n3.3. SunOS/Solaris\n\nThe support hasn't been tested in ages.  I haven't a clue if it still\nworks.\n\n\n4.\tThe future of Squeak sound on Unix\n\t----------------------------------\n\nDirect support for the ALSA drivers is on the TO-DO list.\n\nPlans are afoot to add \"modules\" to the Unix VM.  This will make many\nconfigure-time options (such as sound support, window support, etc.)\nirrelevant.  Instead `configure' will figure out what's available,\ncompile support for everything into separate modules, and then leave\nyou to pick which one(s) you want to use at run time.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nThe remainder of this file isn't for reading.  It's here in case you\nhave problems with OSS support.  Turn on `#define DEBUG' near the top\nof `sqUnixSoundOSS.c' and recompile.  In the \"more about music\"\nproject you can record and then playback a sound and the OSS code will\ntell you what it's doing, which should be something like the\nfollowing.\n\n[piumarta@emilia current]$ date\nMon May 27 20:34:52 CEST 2002\n[piumarta@emilia current]$ bld/squeak Squeak3.1c-4478\nsound: stop\nsound: start recording\nsound: /dev/dsp: opened with mode 0\nsound: /dev/dsp: driver formats (1f9): MU_LAW U8 S16_LE S16_BE S8 U16_LE U16_BE\nsound: /dev/dsp: driver capabilities (3201): REALTIME TRIGGER MMAP\nsound: /dev/dsp: trying format 20: S16_BE\nsound: /dev/dsp: selected driver format 20: S16_BE\nsound: /dev/dsp: requesting 1 channels\nsound: /dev/dsp: using 1 channels\nsound: /dev/dsp: driver: 2 bytes/frame\nsound: /dev/dsp: squeak: 2 bytes/frame\nsound: /dev/dsp: 11025 samples/sec\nsound: /dev/dsp: fragment size set to 2048 (1102 frames requested in 1 channels)\nsound: input conversion: none (0x10016af4)\nsound: output conversion: none (0x10015cb0)\nsound: /dev/dsp: aio enabled, semaphore 2\nsound: /dev/mixer: opened with mode 2\nsound: /dev/mixer: available devices: vol speaker line mic cd igain\nsound: /dev/mixer: rec: device not available\nsound: /dev/mixer: igain: level set to 50% + 50%\nsound: stop recording\nsound: /dev/dsp: aio disabled\nsound: /dev/dsp: device closed\nsound: stop recording\nsound: stop recording\nsound: stop\nsound: start\nsound: /dev/dsp1: No such file or directory\nsound: /dev/dsp: opened with mode 1\nsound: /dev/dsp: driver formats (1f9): MU_LAW U8 S16_LE S16_BE S8 U16_LE U16_BE\nsound: /dev/dsp: driver capabilities (3201): REALTIME TRIGGER MMAP\nsound: /dev/dsp: trying format 20: S16_BE\nsound: /dev/dsp: selected driver format 20: S16_BE\nsound: /dev/dsp: requesting 2 channels\nsound: /dev/dsp: using 2 channels\nsound: /dev/dsp: driver: 4 bytes/frame\nsound: /dev/dsp: squeak: 4 bytes/frame\nsound: /dev/dsp: 22050 samples/sec\nsound: /dev/dsp: fragment size set to 8192 (2644 frames requested in 2 channels)\nsound: input conversion: none (0x10016af4)\nsound: output conversion: none (0x10015cb0)\nsound: /dev/dsp: aio enabled, semaphore 2\nsound: stop\nsound: /dev/dsp: aio disabled\nsound: /dev/dsp: device closed\nsound: stop\n[piumarta@emilia current]$ \n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/RELEASE_NOTES_3.11.3.2135",
    "content": "Changes since 3.10-6:\n\nNumbering scheme changed to X.Y.Z.R where X.Y.Z = VMMaker version used\nto generate the Interpreter and R is the subversion revision of the\nplatform support code.\n\nVMMaker and plugins updated to most recent versions; generated source\nregenerated:\n\n  Balloon3D-Plugins-ar.4.mcz\n  DBus-Plugin-bf.32.mcz\n  GStreamer-Plugins-JMM.16.mcz\n  Kedama-Plugins-yo.1.mcz\n  Rome-Plugin-yo.39.mcz\n  OSProcessPlugin-dtl.16.mcz\n  VMConstruction-Plugins-AioPlugin-dtl.9.mcz\n  VMConstruction-Plugins-XDisplayControlPlugin-dtl.7.mcz\n  VMMaker-dtl.138.mcz\n\nBuild system rewritten using CMake instead of autotools.  Big\nTHANK-YOU to Bert, Subbu and Dave Lewis for providing invaluable\nfeedback.\n\nAny plugin can now be turned off in configure with the option\n'--without-<pluginName>'.\n\nExperimental PulseAudio driver (vm-sound-pulse) added, thanks to Derek\nO'Connell.  Default is still OSS on Linux; if you want pulse you have\nto ask for it in one of the usual ways.\n\nFFI tweaked on Linux to avoid a potential FPU stack overflow.\n\nClipboardExtendedPlugin will no longer try to build if you don't have\nX11 development headers and libs.\n\nFileCopyPlugin made resilient to EINTR.\n\nVM renamed to 'squeakvm'.  'squeak' is now a script that looks for\n'squeakvm', figures out if you need any obscure command-line options,\nand then launches 'squeakvm' for you.  This in turn allows...\n\nPlugin search stretegy rationalised and simplified.  Default location\nis now the executable directory (where 'squeakvm' is installed).  The\n-plugins argument can be a colon-separated list of locations to\nsearch, just like PATH.  Plugins are named 'so.plugin' to make\ninterference with FFI libraries less likely.\n\n  NOTE: FFI libraries are no longer searched for in every single nook\n  and cranny, which means you might have to set LD_LIBRARY_PATH (or\n  your local equivalent) for FFI-based programs to work properly.\n\nFailure to load a plugin because of unresolved symbols is now always\nreported on the terminal.\n\nAnother script 'squeak.sh' is provided for launching squeak from a\nmenu.  This isn't finished and suggestions are welcome.\n\nDefault path and text encoding is now UTF-8.\n\nX11 driver no longer reports SHIFT pressed when CAPS LOCK engaged.\n\nSerialPlugin now supports named ports.\n\nAll occurences of dprintf() renamed to avoid a name conflict with a\nless-than-stellar decision by POSIX to introduce a standard function\nof the same name.\n\nRomePlugin is no longer built if cairo was built without Pango\nsupport.\n\niconv_open() no longer spams you with thousands of error messages if\nyou are missing conversion tables.\n\nValid unicode characters that have no corresponding keycode are\nreported with keycode zero to avoid an invalid index error in the\nimage.\n\nXImmPlugin should now work on MacOS X/Darwin too.\n\nSound driver on MacOS X now works on Intel as well as PowerPC.\n\nVarious changes to make the VM compile and run on GNU/Linux running on\nDEC Alpha.\n\nvm-sound-Sun now uses asynchronous i/o.\n\nVarious changes to fix compilation on Solaris.\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/RELEASE_NOTES_4.0.3.2196",
    "content": "Changes since 3.11.3.2135:\n\nGenerated sources rebuilt from VMMaker-dtl.169.\n\nRe-enabled MIDI support via ALSA on Linux.\n\nBroken locales should no longer cause line ends to go missing during\ncopy and paste.\n\nAdd support for \"platform source version\" primitive.\n\nRemove debugging beep on first clipboard copy under X11.\n\nAllow fully-qualified pathnames when loading modules.\n\nBundle FreetypePlugin with source and binary releases.\n\nVarious fixes for 64-bit cleanliness (many thanks to Dave Lewis).\n\nAdd microsecond clock support.\n\nFix launching from a menu under KDE.\n\nFix --CFLAGS option in configure script.\n\nSerial plugin invalidates cached port names on close.\n\nBetter handling of symlinks when looking for absolute path to VM\nbinary.\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/RELEASE_NOTES_4.0.3.2202",
    "content": "Changes since 4.0.3.2196:\n\nChanges to pulseaudio driver from Derek O'Connell, as used in Scratch.\n(Fixes bad behaviour on Karmic.)\n\nUUIDPlugin is now internal.\n\nTop-level Makefile in source archive uses cmake/configure and no\nlonger fails because of bogus dependency bld/squeakvm.\n"
  },
  {
    "path": "vm/src/from_squeak/unix/doc/squeak.1",
    "content": ".\\\" squeak.1 -- manual page for Unix Squeak\t\t\t-*- nroff -*-\n.\\\" \n.\\\"   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n.\\\"                              listed elsewhere in this file.\n.\\\"   All rights reserved.\n.\\\"   \n.\\\"   This file is part of Unix Squeak.\n.\\\" \n.\\\"      You are NOT ALLOWED to distribute modified versions of this file\n.\\\"      under its original name.  If you modify this file then you MUST\n.\\\"      rename it before making your modifications available publicly.\n.\\\" \n.\\\"   This file is distributed in the hope that it will be useful, but WITHOUT\n.\\\"   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n.\\\"   FITNESS FOR A PARTICULAR PURPOSE.\n.\\\"   \n.\\\"   You may use and/or distribute this file ONLY as part of Squeak, under\n.\\\"   the terms of the Squeak License as described in `LICENSE' in the base of\n.\\\"   this distribution, subject to the following additional restrictions:\n.\\\" \n.\\\"   1. The origin of this software must not be misrepresented; you must not\n.\\\"      claim that you wrote the original software.  If you use this software\n.\\\"      in a product, an acknowledgment to the original author(s) (and any\n.\\\"      other contributors mentioned herein) in the product documentation\n.\\\"      would be appreciated but is not required.\n.\\\" \n.\\\"   2. You must not distribute (or make publicly available by any\n.\\\"      means) a modified copy of this file unless you first rename it.\n.\\\" \n.\\\"   3. This notice must not be removed or altered in any source distribution.\n.\\\" \n.\\\"   Using (or modifying this file for use) in any context other than Squeak\n.\\\"   changes these copyright conditions.  Read the file `COPYING' in the\n.\\\"   directory `platforms/unix/doc' before proceeding with any such use.\n.\\\" \n.\\\" Last edited: 2005-03-16 21:52:26 by piumarta on squeak.hpl.hp.com\n.\\\" \n.if @@\\*(lq@ \\{\\\n.\tds lq \"\n.\tif t .ds lq ``\n.\tif !@@\\(lq@ .ds lq \"\\(lq\n.\\}\n.if @@\\*(rq@ \\{\\\n.\tds rq \"\n.\tif t .ds rq ''\n.\tif !@@\\(rq@ .ds rq \"\\(rq\n.\\}\n.de Id\n.ds Rv \\\\$3\n.ds Dt \\\\$4\n..\n.de Sp\n.if n .sp\n.if t .sp 0.4\n..\n.TH SQUEAK 1 \"\\*(Dt\" \"Squeak Smalltalk System\" \"Squeak Smalltalk System\"\n.SH NAME\nsqueak, inisqueak \\- Unix Squeak virtual machine and installer\n.SH SYNOPSIS\n.B inisqueak\n.br\n.B squeak\n.RI \"[ \" option \".\\|.\\|. ] [ \" image \" ] [ \" script \" [ \" argument \".\\|.\\|. ] ]\"\n.SH DESCRIPTION\n.B squeak\nis the virtual machine for the Squeak Smalltalk system.  It requires three files\nto operate correctly: an\n.B image\nfile containing a `snapshot' of a live Squeak session, a\n.B changes\nfile containing the source code for modified methods in the image, and\na copy of (or a link to) a shared system\n.B sources\nfile containing the source code for methods that have not been modified\nsince the last major version increment.\n.PP\nThe image and changes files contain the state of a user's Squeak\nsession, which is persistent between consecutive sessions.  Private\ncopies of these files are therefore normally required.  The\n.B inisqueak\nscript checks that the local Squeak installation appears sane, and then\ncopies the required files to the current\nworking directory.\nIf\n.B inisqueak\nencounters no problems, it will finish by running\n.B squeak\nto start a Squeak session using the newly copied image and changes files.\n.PP\n.B inisqueak\nshould be run\n.I once\\c\n\\&, when using Squeak for the first time, to create a new 'personal'\nSqueak session.  Afterwards,\n.B squeak\nshould be run each time that session is to be resumed.\n.PP\n.SH INVOCATION\n.B inisqueak\nhas no options or arguments.\nSimply 'cd' to the directory that is to contain the working\ncopies of the image and changes files, then run it.\n.PP\n.B squeak\naccepts various\n.I options\n(described below), and then an optional\n.I image\nname (which must not begin with a minus sign '\\-').  If an\n.I image\nname is given on the command line then\n.B squeak\ntries to run that image.  Otherwise\n.B squeak\nchecks the environment variable\n.B SQUEAK_IMAGE\nand, if it is set, uses its value as the name of the image to run.\nOtherwise \n.B squeak\nlooks for an image called 'squeak.image' in the current directory.\nIf the image file does not exist then\n.B squeak\nprints a message indicating which image file it failed to find and then\nexits.\nIf the extension '.image' is missing in the\n.I image\nargument or in the value of the\n.B SQUEAK_IMAGE\nvariable, it will be appended automatically.\n.PP\nThe\n.I image\nargument can be followed by a\n.I script\nname.  This is the name of a 'document' that should contain\nSmalltalk code to be executed on startup.  The document can be either\nthe name of a file or a URL starting with 'http:'.\nAny\n.I argument\\c\ns that appear after the\n.I script\nname are ignored, but are made available to the\n.I script\nfrom within Squeak via the method\n.B getSystemAttribute:\\c\n\\&.  (See the section\n.B SCRIPTS\nbelow.)\n.PP\nIf\n.I image\nis given as '--' then\n.B squeak\nimmediately stops argument processing (and behaves as if\n.I image\nwas not specified).  This is useful to specify a\n.I script\n(possibly with script arguments) without specifying an explicit\n.I image\\c\n\\&.\n.SH OPTIONS\nCommand line options fall into two categories: 'common' options\nthat are recognised by the base VM and 'specific' options that are\ntied to a particular display or sound driver.  Common options will\nalways be recognised by\n.B squeak\\c\n, whereas a given specific option will be recognised only after\n.B squeak\nhas loaded the driver to which it relates.  Refer to the '-vm'\noption below for more details.\n.PP\nThe common options recognised by\n.B squeak\nare as follows:\n.TP\n.BI \"\\-encoding \" \"enc\"\nspecifies the internal character encoding to be used by Squeak.  This\naffects the translation that the VM performs when importing text (from\nthe keyboard or via 'paste' from an external selection) or exporting\ntext (pasting text from Squeak to another application, or when\ngenerating filenames containing special characters).  In other words,\nit affects the correspondence between what Squeak displays on the\nscreen and what it sends to (or receives from) external applications.\nThe correct value depends on the way Squeak's internal fonts are\nencoded.  Current images are delivered with traditional Macintosh\n\\&'New York' fonts that use\n.B Mac Roman\nencoding, and so this is the default internal encoding.  If other\nfonts (from X11 or elsewhere) are imported into the image and used as\nsystem fonts then the this default translation will give incorrect\nresults for diacritical marks and special characters.  In such cases\nthe\n.B \\-encoding\noption can be used to change the internal encoding, for example\n.sp\n.nf\n\\ \\ \\ \\ \\-encoding ISO-8859-15\n.fi\n.sp\n(aka\n.B Latin9\\c\n) which would be appropriate for many of the fonts designed for\nEuropean languages.\n.TP\n.B \\-help\nprints a short summary of the command-line syntax, options and\navailable drivers, then exits.\n.TP\n.BI \"-memory \" \"size\"[mk]\nrequests that a fixed heap of\n.I size\nbytes be allocated for the Squeak image.  If the suffix `\\c\n.B k\\c\n\\&' is given then the argument is expressed in kilobytes.  If\nthe suffux `\\c\n.B m\\c\n\\&' is given then the argument is expressed in megabytes.  This option\nSHOULD NOT be used, unless there is a good reason to do so, since it\nplaces an arbitrary limit on Squeak's object memory size.\n.TP\n.BI \"-mmap \" \"size\"[mk]\nrequests that a variable heap of at most\n.I size\nbytes be allocated.  (The suffixes are as described for the\n\\&'\\-memory' option.)\n.B squeak\nwill initially allocate a heap that is large enough to hold the image,\nwith a small amount of headroom.  If at any time Squeak requires more\nmemory for its image then additional space will be allocated\ndynamically.  Likewise, when memory is no longer needed it will\ndeallocated and returned to the system.  The\n.I size\nargument places an upper limit on how big the heap can grow in this\nfashion.  \n.B squeak\nuses a dynamic heap by default with the maximum size set to 75% of the\navailable virtual memory or 1 gigabyte, whichever is smaller.\n.TP\n.B \\-noevents\ndisables the new (image 2.8 and later) event-driven input mechanism.\nThis option is only useful for testing backwards compatibility with\nolder images and should not be used.\n.TP\n.B \\-notimer\ndisables the use of the interval timer for keeping track of low-resolution\ntime.  (If you are having problems with file, sound or socket i/o reporting\n`interrupted system call' then setting this flag might help.)\n.TP\n.BI \"\\-pathenc \" \"enc\"\nspecifies the external character encoding to be used by Squeak when accessing the filesystem\n(file and directory pathnames).  The correct value depends on the local platform's characteristics.\nIf no encoding conversion should be performed then this should be set to the same encoding\nas Squeak uses internally (see the\n.I \\-encoding\noption).  Otherwise\n.B ISO-8859-15\n(aka\n.B Latin9\\c\n) might make sense on a filesystem supporting 8\\-bit characters, and\n.B UTF-8\nfor filesystems that use Unicode-based pathnames.  The default is\n.B UTF-8\nwhich is correct for Mac OS X and very recent GNU/Linux distributions,\nand which (in an ideal world) will eventually be adopted by all Unix\nvariants.\n.TP\n.BI \"-plugins \" \"path\"\nspecifies an alternative location for external plugins (collections of\nnamed primitives) and drivers (for display and sound).  The\n.I path\nargument contains a pattern in which any occurrences of `\\c\n.B %n\\c\n\\&' will be replaced by the name of the plugin or driver being loaded.\nThe\n.I path\ncan name either a directory or the plugin itself and can be absolute or\nrelative (to the directory in which\n.B squeak\nwas run).  If a plugin or driver cannot be found in the location\nspecified by\n.I path\nthen the search continues in the default locations.\n.TP\n.BI \"\\-textenc \" \"enc\"\nspecifies the external character encoding to be used by Squeak when\nexchanging clipboard text with other applications.  The default is\n.B UTF-8\non Mac OS X and\n.B ISO-8859-15\n(aka\n.B Latin9\\c\n) on other Unix systems.  Note that X11 applications requesting the\nselection converted to\n.B UTF8_STRING\ndata will (correctly) receive the clipboard text encoded as\n.B UTF-8\\c\n, regardless of this setting.\n.sp\nSqueak recognises a subset of the encoding names defined by the IANA.\n(If you prefer to use the international currency symbol rather than\nthe Euro symbol in external text then you might want to set this to\n.B ISO-8859-1\\c\n, aka\n.B Latin1\\c\n\\&.)\n.TP\n.B \\-version\nprints three or more lines of version information, as follows:\n.RS\n.TP\n\\ \\ \\ \\(bu\nthe architecture configured for the virtual machine at compile time,\nthe compilation `sequence number', the time and date of compilation,\nand the name (and version, if known) of the compiler that was used to\ncompile\n.B squeak\\c\n;\n.TP\n\\ \\ \\ \\(bu\nthe complete\n.BR uname (1)\ninformation for the host on which the virtual machine was compiled;\n.TP\n\\ \\ \\ \\(bu\nthe default installed location for plugins and drivers;\n.PP\nAfter printing the above, the virtual machine exits.\n.RE\n.TP\n.BI \"\\-vm \" \"driver\"\nasks\n.B squeak\nto load a sound/display driver.  For each supported device there is a\ncorresponding driver that\n.B squeak\nloads during initialisation.  Unless told otherwise,\n.B squeak\nwill figure out sensible default drivers to load.  This choice can be\noverridden using this option.  The\n.I driver\nargument is a list of one or more 'assignments' of the form\n.sp\n\\ \\ \\ \\ \n.I class\\c\n=\\c\n.I device\n.sp\nseparated by spaces or commas.  The supported combinations are currently:\n.RS\n.TP\n.B \\ \\ \\ display=X11\nto display the Squeak window on a local or remote X Window System\nserver.\n.TP\n.B \\ \\ \\ display=Quartz\nto display on the local Mac OS X desktop.\n.TP\n.B \\ \\ \\ display=none\nto disable the display (and keyboard/mouse) entirely.  (This driver is\nuseful primarily for running 'server' applications in Squeak.)\n.TP\n.B \\ \\ \\ sound=OSS\nprovides sound input and output via the Open Sound System.  (If you\nhave a device called '/dev/dsp' then this is likely the one you\nwant.)\n.TP\n.B \\ \\ \\ sound=MacOSX\nprovides sound input/output via Core Audio on Mac OS X.\n.TP\n.B \\ \\ \\ sound=NAS\nprovides sound i/o via the Network Audio System.\n.TP\n.B \\ \\ \\ sound=Sun\nprovides sound on Sun Microsystems hardware.\n.TP\n.B \\ \\ \\ sound=none\ndisables sound entirely.\n.B squeak\nwill not attempt to play or record sounds when this driver is loaded.\n.RE\n.PP\n.RS\nNote that only those drivers relevant to the local platform will be\navailable.  Attempting to load an unsupported driver will cause\n.B squeak\nto exit with an error message.  A list of available drivers is printed\nby the '-help' option.  If a particular driver cannot load system\nlibraries on which it depends then it will neither be listed nor\nbe available to load at runtime.\n.RE\n.PP\n.RS\nNote also that on Mac OS X both the X11 and Quartz display drivers are\nsupported, although the former will refuse to load if the X11 client\nlibraries are not installed on the local machine.  The Quartz driver\nwill happily load (and Squeak will run as a fully-fledged application)\neven when\n.B squeak\nis invoked from the command line.  Exercise caution when logged into\nMac OS X from another machine: forgetting to set DISPLAY before trying\nto run\n.B squeak\non the remote display could cause embarrassement.\n.RE\n.PP\nOptions specific to the X11 display driver are as follows:\n.TP\n.BI \"\\-browserWindow \" \"id\"\nspecifies the\n.I id\nof the window that\n.B squeak\nshould use for its display.  This option is intended for use when Squeak is\nrunning as a web browser plugin.\n.TP\n.BI \"\\-display \" \"server\"\nspecifies that Squeak should connect to the given display\n.I server \ninstead of looking in the environment variable\n.B\nDISPLAY\n(the default behaviour) to find the name of the server to use.\n.TP\n.B \\-fullscreen\ncauses the Squeak window to occupy as much of the screen area as possible.\nImplies '\\c\n.B \\-notitle\\c\n\\&'.\n.TP\n.B \\-headless\ndisables the graphical display and mouse/keyboard input.  This mode of\noperation is useful primarily for servers.\n.TP\n.B \\-iconic\nasks the window manager to iconify the Squeak window at startup.\n.TP\n.B \\-lazy\ncauses Squeak to `snooze' whenever the main winodw is unmapped.  This can\nbe used if Squeak appears to be using consuming CPU time while idling (which should\nnot normally be the case).  Note that if this option is in effect, when the\nSqueak window is unmapped\n.B squeak\nwill not respond to any external stimuli (other than to provide the X\nselection to requestors, when Squeak is the owner).\n.TP\n.B \\-mapdelbs\nmaps the Delete key onto Backspace.  Backspace deletes the character to the left\nof the cursor and Delete normally deletes the character\nto the right of the cursor.  With this option, Deletes will behave like\nBackspace.  The behaviour of Backspace is not changed.\n.TP\n.B \\-nointl\ndisables the handling of dead keys on international keyboards.\nWithout this option, dead key handling is enabled if either\n.B LC_ALL\nor\n.B LC_CTYPE\nis set in the environment.\n.TP\n.B \\-notitle\ndisables the title bar on the Squeak window (if the window manager supports it).\nThis option is implied by '\\c\n.B \\-fullscreen\\c\n\\&'.\n.TP\n.B \\-swapbtn\nswaps the yellow and blue buttons.   (Traditionally, the red button is on\nthe left, yellow in the middle and blue on the right.  The colourful names\ncome from the Xerox Alto on which Smalltalk was first implemented.)\nSqueak normally maps X buttons 1, 2 and 3 to the\n.B red\\c\n, \n.B yellow\nand \n.B blue\nbuttons, in that order.  With this option, it maps X buttons\n1, 2 and 3 to the\n.B red\\c\n, \n.B blue\nand\n.B yellow\nbuttons.)\n.TP\n.B \\-xasync\ncauses Squeak to use asynchronous display updates.  The virtual machine normally\nflushes and synchronises the display connection at regular intervals.  Using this\noption disables synchronisation, which will be performed only when the image\nexplicitly requests it.\n.TP\n.B \\-xshm\nenables the use of the X Shared Memory extension on servers that support it.\nThis can dramatically improve display performance, but works only when\nSqueak is running on the server.\n.PP\nOptions specific to the FBDev display driver are as follows:\n.TP\n.BI \"\\-fbdev \" \"device\"\nUse the given framebuffer\n.I device\ninstead of the default '/dev/fb0'.\n.TP\n.BI \"\\-kbmap \" \"mapfile\"\nLoad the keyboard map from the given\n.I mapfile\ninstead of reading it from the running kernel.\nNote that\n.B squeak\ncannot (currently) read compressed or 'shorthand'\nmap files (as found in /usr/share/keymaps or /lib/kbd/keymaps).\nTo generate a keymap file usable by\n.B squeak\\c\n\\&, execute the following program from the console:\n.sp\n\\ \\ \\ \\ dumpkeys -f -n --keys-only > key.map\n.sp\nIf\n.B squeak\nencounters a problem while trying to load\n.I mapfile\\c\n\\&, it will print an error message and exit.\nSee\n.BR keymaps (5)\nfor more information about the keymap file format.  The programs\n.BR dumpkeys (1)\\c\n,\n.BR loadkeys (1)\\c\n, and\n.BR showkey (1)\ncan be used to modify the keyboard map before creating a keymap file\nfor\n.B squeak\\c\n\\&.\n.TP\n.BI \"\\-msdev \" \"device\"\nUse the given mouse\n.I device\ninstead of the default.  The default is to try\n\\&'/dev/psaux', '/dev/input/mice' and '/dev/adbmouse',\nin that order, and to use the first one that has a physical device attached.\n.TP\n.BI \"\\-msproto \" \"protocol\"\nUse the given mouse\n.I protocol\ninstead of the default.  The supported protocols are 'ps2' and 'adb'.\nThe default is 'ps2' for mice attached to '/dev/psaux' or '/dev/input/mice',\nand 'adb' for mice attached to '/dev/adbmouse'.\n.TP\n.B \\-vtlock\nDisallows VT switching, regardless of whether the request comes from\nthe keyboard or from another program such as\n.BR chvt (1)\\c\n\\&.\n.TP\n.B \\-vtswitch\nEnables keyboard VT switching.  Note that this option is effectively\ndisabled if the '\\c\n.B \\-vtlock\\c\n\\&' option is also enabled.\n.PP\nOptions specific to the OSS and MacOSX sound drivers are as follows:\n.TP\n.B \\-nomixer\ndisables the primitives that change mixer (sound) settings.  If you\nprefer that Squeak leave these alone (they are, after all, really the\nreponsibility of whichever mixer program or sound control panel you\nuse) then this option is for you.\n.PP\nSeveral common options are deprecated and are provided only for\nbackward compatibility.  These options should not be used and will be\nremoved in a future release:\n.TP\n.BI \"\\-display \" \"dpy\"\nis equivalent to '\\-vm display=X11 \\-display\n.I dpy\\c\n\\&'.\n.TP\n.B \\-headless\nis equivalent to '\\-vm display=X11 \\-headless'.\n.TP\n.B \\-nodisplay\nis equivalent to '\\-vm display=none'.\n.TP\n.B \\-nosound\nis equivalent to '\\-vm sound=none'.\n.TP\n.B \\-quartz\nis equivalent to '-vm display=Quartz'.\n.SH ENVIRONMENT\nMany of the options that can be set on the command line can\nalso be set from environment variables.\n.TP\n.B SQUEAK_ASYNC\nif set in the environment then equivalent to the '\\c\n.B \\-xasync\\c\n\\&' flag.  (The value is ignored.)\n.TP\n.B SQUEAK_ENCODING\nthe name of the internal character encoding used by Squeak.  Equivalent to giving the '\\c\n.B \\-encoding\\c\n\\&' command-line option if set.\n.TP\n.B SQUEAK_FBDEV\nthe name of the framebuffer device to use when running on the console.  See the '\\c\n.B \\-fbdev\\c\n\\&' option.\n.TP\n.B SQUEAK_FULLSCREEN\nequivalent to '\\c\n.B \\-fullscreen\\c\n\\&' if set.\n.TP\n.B SQUEAK_ICONIC\nequivalent to the '\\c\n.B \\-iconic\\c\n\\&' flag.\n.TP\n.B SQUEAK_IMAGE\nthe name of the image file to execute if no\n.I image\nargument is given on the command line.\n.TP\n.B SQUEAK_KBMAP\nthe name of the keymap file to use when running on the console.  See the '\\c\n.B \\-kbmap\\c\n\\&' option.\n.TP\n.B SQUEAK_LAZY\nequivalent to the '\\c\n.B \\-lazy\\c\n\\&' flag.\n.TP\n.B SQUEAK_MAPDELBS\nequivalent to the '\\c\n.B \\-mapdelbs\\c\n\\&' flag.\n.TP\n.B SQUEAK_MEMORY\nthe initial size of the heap, with optional 'k' or 'm' suffix.  Equivalent\nto the '\\c\n.BI \"-memory \" size [km]\\c\n\\&' flag.\n.TP\n.B SQUEAK_MSDEV\nthe name of the mouse device to use when running on the console.  See the '\\c\n.B \\-msdev\\c\n\\&' option.\n.TP\n.B SQUEAK_MSPROTO\nthe name of the mouse protocl to use when running on the console.  See the '\\c\n.B \\-msproto\\c\n\\&' option.\n.TP\n.B SQUEAK_VTLOCK\nif set then equivalent to specifying the '\\c\n.B \\-vtlock\\c\n\\&' option on the command line.\n.TP\n.B SQUEAK_VTSWITCH\nif set then equivalent to specifying the '\\c\n.B \\-vtswitch\\c\n\\&' option on the command line.\n.TP\n.B SQUEAK_NOEVENTS\nif set, equivalent to '\\c\n.B \\-noevents\\c\n\\&'.\n.TP\n.B SQUEAK_NOINTL\nequivalent to '\\c\n.B \\-nointl\\c\n\\&' if set.\n.TP\n.B SQUEAK_NOMIXER\nequivalent to '\\c\n.B \\-nomixer\\c\n\\&' if set.\n.TP\n.B SQUEAK_NOTIMER\nequivalent to '\\c\n.B \\-notimer\\c\n\\&' if set.\n.TP\n.B SQUEAK_NOTITLE\nif set, equivalent to '\\c\n.B \\-notitle\\c\n\\&'.\n.TP\n.B SQUEAK_PATHENC\nthe name of the character encoding used to construct file and directory names.\nEquivalent to giving the '\\c\n.B \\-pathenc\\c\n\\&' command-line option if set.\n.TP\n.B SQUEAK_PLUGINS\nsee '\\c\n.B \\-plugins\\c\n\\&'.\n.TP\n.B SQUEAK_SWAPBTN\nequivalent to '\\c\n.B \\-swapbtn\\c\n\\&' if set.\n.TP\n.B SQUEAK_TEXTENC\nthe name of the character encoding used to copy/paste text from/to external applications.\nEquivalent to giving the '\\c\n.B \\-textenc\\c\n\\&' command-line option if set.\n.TP\n.B SQUEAK_VM\ncontains the names of one or more drivers to be loaded during initialisation.\nSee the '\\c\n.B \\-vm\\c\n\\&' option for details.\n.TP\n.B SQUEAK_XSHM\nequivalent to '\\c\n.B \\-xshm\\c\n\\&'.\n.PP\nIf an environment variable and a command-line option conflict over a\nparticular value then normally the value in the command line takes\nprecedence.  The exception to this rule is the '\\-vm' option.\nEnvironment variables are processed before command-line arguments and\n\\&'\\-vm' cannnot be used to unload a driver that was loaded while\nprocessing the contents of 'SQUEAK_VM'.\n.PP\n.B squeak\nalso checks the environment for\n.B LC_ALL\nand\n.B LC_CTYPE\\c\n\\&.  If either of these variables is set then support for\ninternational keyboards (including dead keys for diacritical marks) is\nenabled.  To prevent this support being enabled even when one or both\nof these variables is set, use the '\\-nointl' option (or set\n.B SQUEAK_NOINTL\nin the environment).  For example, to start\n.B squeak\nwith support for dead keys on Spanish keyboards, with Latin-1 encoding\nof external characters and the default MacRoman internal font\nencoding, run\n.B squeak\nlike this:\n.sp\n.RS\n.nf\nexport LC_CTYPE=es_ES\nexport SQUEAK_TEXTENC=latin1\nsqueak\n.fi\n.RE\n.SH SCRIPTS\nSqueak can load and execute a 'script' file containing Smalltalk code at\nstartup.  The name of the file should be given as the\n.I script\nargument to\n.B squeak\\c\n\\&.\nFor example, assuming that the image 'foo.image'\ncontains an open Transcript window, then the following represents\nthe 'hello world' program for Squeak:\n.sp\n.RS\n.nf\nTranscript cr; show: 'Hello, world'.\n.fi\n.RE\n.sp\nIf this script is in a file called 'hello.sq', then it could be run like this:\n.sp\n.RS\n.nf\nsqueak foo.image hello.sq\n.fi\n.RE\n.PP\nIt is also possible to make 'self interpreting' scripts by adding an 'interpreter\nline' to the start of the script.  The 'hello.sq' file could be changed to\n.sp\n.RS\n.nf\n#![bindir]/squeak --\nTranscript cr; show: 'Hello, world'.\n.fi\n.RE\n.sp\nand then made executable with\n.sp\n.RS\n.nf\nchmod +x hello.sq\n.fi\n.RE\n.sp\nand then invoked by running the script file directly:\n.sp\n.RS\n.nf\nSQUEAK_IMAGE=\"foo.image\"\nexport SQUEAK_IMAGE\n\\&./hello.sq\n.fi\n.RE\n.PP\nIf any\n.I argument\\c\ns are present after the\n.I script\nname then they can be retrieved from within the script using the method\n.sp\n.RS\n.nf\nSmalltalk getSystemAttribute: \\c\n.I n\n.fi\n.RE\n.sp\nwhere\n.I n\nis the index of the argument, starting at 3 for the first argument.  (See the\nmethod comment for\n.sp\n.RS\n.nf\nSystemDictionary>>getSystemAttribute:\n.fi\n.RE\n.sp\nin the image for an explanation of the meanings of the indices.)\n.PP\nAs an example of this, here is the 'echo' program written as a Squeak script:\n.sp\n.RS\n.nf\n#![bindir]/squeak --\n\"Echo arguments to the Transcript.\"\n| i a |\ni := 2.\n[(a := Smalltalk getSystemAttribute: (i := i + 1))\n    notNil]\n  whileTrue: [Transcript space; show: a].\n.fi\n.RE\n.sp\nWhen run as\n.sp\n.RS\n.nf\n\\&./echo.sq one two three\n.fi\n.RE\n.sp\nthis would print 'one two three' in the Transcript window.\n.SH DIAGNOSTICS\n.TP\n.B inisqueak\nprints several informational messages while doing its stuff.  If it encounters\na problem it prints an appropriate message before bailing out.  The messages\nshould be self-explanatory.\n.TP\n.B squeak\nnormally does not print anything at all.  If it prints something then there\nis a problem.  The messages should be self-explanatory.\n.\\\" .PP\n.\\\" Sending\n.\\\" .B squeak\n.\\\" a SIGHUP or SIGQUIT signal will cause it dump the executing image into\n.\\\" the working directy and then exit.  Both of these should be\n.\\\" considered 'last resort' measures to save an image that contains\n.\\\" valuable recent changes.  SIGHUP is synchronous (it works when the VM\n.\\\" is in a known state) and the chances of obtaining a working image are\n.\\\" fairly good, but it relies on the event polling loop being called.\n.\\\" SIGQUIT is asynchronous, and the chances of recovering a working image\n.\\\" after using it are fairly poor.  In either case, when restaring the\n.\\\" \"dumped\" image, the first think that should be done is to execute\n.\\\" .sp\n.\\\" .RS\n.\\\" .nf\n.\\\" Smalltalk processStartUpList: true\n.\\\" .fi\n.\\\" .RE\n.\\\" .sp\n.\\\" in a workspace.  Recover what is needed from the image, then destroy\n.\\\" the image (whose integrity should certainly not be trusted).\n.SH FILES\n.I [imgdir]/SqueakV[major].sources\n.RS\nShared system sources file for the Squeak image.  There must be a\ncopy of (or link to) this file in the working directory when running\n.B squeak\\c\n\\&.\n.RE\n.sp\n.I [imgdir]/Squeak*.image\n.I [imgdir]/Squeak*.changes\n.RS\nDistributed image and changes files holding a `shapshot' of a\nlive Squeak session.  (The contents of these files change during a\nsession, and so private copies should always be made before running\n.B squeak\nfor the first time.  See\n.BR inisqueak (1)\\c\n).\n.RE\n.sp\n.I ./SqueakV[major].sources\n.RS\nA link to the system sources file.\n.RE\n.sp\n.IR ./ name .image\n.br\n.IR ./ name .changes\n.RS\nPrivate copies of image and changes files.\n.RE\n.sp\n.I [plgdir]/*.so\n.br\n.I [plgdir]/*.la\n.RS\nVirtual machine 'plugins' (containing primitives that are loaded on\ndemand) and drivers (for different types of display and sound\nhardware).\n.RE\n.sp\n.I [bindir]/squeak\n.br\n.I [bindir]/inisqueak\n.RS\nThe Squeak virtual machine and personal image installer script.\n.RE\n.sp\n.I [mandir]/squeak.1\n.RS\nThis manual page.\n.RE\n.sp\n.I [docdir]/*\n.RS\nMiscellaneous documentation.\n.RE\n.SH NOTES\nThis manual page documents version [version] of Unix Squeak.  It may\nnot be appropriate for any other version.\n.PP\nThe image and changes files containing a saved Squeak session are\nintimately related.  They should always be used together, never be\nseparated, and under no circumstances should an image be run with a\nchanges file that has been used with a different image.  Failure to\nadhere to the above could cause the source code for the methods in the\nimage to become garbled and impossible to retrieve.\n.PP\nThe Unix Squeak virtual machine fully supports OpenGL in both the X11\nand Quartz display drivers.  Open Croquet will run just fine with\neither of these drivers (and many Mac OS X users will even have the\nchoice of which driver to use :).\n.SH BUGS\nIf a 'binary' option is enabled by an environment variable, there is no\nway to disable it on the command line.\n.PP\nSimilarly, drivers specified in the\n.I SQUEAK_VM\nenvironment variable cannot be overridden by passing options on the\ncommand line.\n.PP\n.B squeak\nshould never crash.  In the unlikely event that it does crash, or\nprints any kind of message that\n.I does not\nappear to be caused by incorrect arguments or illegal operations from\nwithin a Squeak program, please send a bug report to:\n<ian.piumarta@squeakland.org>.  (Do not send bug reports to the\ngeneral-purpose 'squeak-dev' mailing list.  They will not be read.  If\nyou feel you must post a bug report to a mailing list, send it to the\nSqueak 'vm-dev' mailing list in addition to the above email address.)\n.SH AUTHOR\nThis manual page was written by Ian Piumarta.\n.SH SEE ALSO\nDan Ingalls, Ted Kaehler, John Maloney, Scott Wallace and Alan Kay, \\c\n.I Back to the Future: The Story of Squeak, A Practical Smalltalk Written in Itself\\c\n\\&.  Proc. OOPSLA'97.\n.PP\nThe official Squeak home page:\n.RS\n.B http://squeak.org\n.RE\n.PP\nThe general-purpose 'squeak-dev' mailing list (not for VM-related bug reports):\n.RS\n.B http://lists.squeakfoundation.org/listinfo/squeak-dev\n.RE\n.PP\nThe Squeak 'vm-dev' mailing list (amongst others):\n.RS\n.B http://discuss.squeakfoundation.org/\n.RE\n.PP\nThe latest source and binary distributions of Unix Squeak:\n.RS\n.B http://squeak.hpl.hp.com/~piumarta/squeak\n.RE\n.\\\".PP\n.\\\"The list of IANA-registered character encoding names, of which a proper subset is recognised by Squeak:\n.\\\".RS\n.\\\".B http://www.iana.org/assignments/character-sets\n.\\\".RE\n"
  },
  {
    "path": "vm/src/from_squeak/unix/misc/00_README",
    "content": "VMM38b4-64bit-image1-ikp.1.cs\nVMM38b4-64bit-image2-ikp.1.cs\n\n    Contain image-side support for 64-bit images.  File-in image1\n    before image2.\n\nSystem-Tracing.2.cs\n\n    Contains the SystemTracer64 which writes a copy of the running\n    image in 64-bit format.  File-in image1 and image2 before\n    System-Tracing.\n\nVMMaker-tpr.14.mcz\n\n    Contains the version of VMMaker to which 64-bit support has been\n    added.  (This file does not itself contain any 64-bit support.)\n\nVMM38b4-64bit-vm1-ikp.1.cs\n\n    Contains 64-bit support for the CCodeGenerator, ObjectMemory, core\n    Interpreter, and the three essential plugins: BitBlt, Balloon and\n    FilePlugin.  You must file this in on top of VMMaker-tpr.14.\n\nVMM38b4-64bit-vm2-ikp.2.cs\n\n    Contains 64-bit support for the SocketPlugin, and for the\n    SmartSyntaxInterperterPlugin (and its variant of the\n    CCodeGenerator) required to translate it.\n\n----------------------------------------------------------------\n\nOSProcessPluginV3-3.sar\nXDisplayControlPluginV1-0.sar\nAioPluginV1-1.sar\n\n    The latest OSProcessPlugin from Dave Lewis.  Not part of the\n    standard VM distributions, but bundled with the Unix distribution\n    for your convenience.\n\n----------------------------------------------------------------\n\nGLXUnix-ikp.2.cs\n\n    Contains GLX support (as required by Croquet) that takes into\n    account the differences between big- and little-endian machines.\n    File this into a Croquet0.01 image before trying to run it on\n    Unix.  (If you don't know what Croquet is then you don't need this\n    file.)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/misc/GLXUnix-ikp.2.cs",
    "content": "'From TeaSqueak3.2 of 19 September 2002 [latest update: #362] on 5 February 2003 at 10:43:22 am'!\rGLX subclass: #GLXUnixQuartz\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tea-GLX'!\rGLX subclass: #GLXUnixX11BE\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tea-GLX'!\rGLXUnixX11BE subclass: #GLXUnixX11LE\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tea-GLX'!\r\r!GLX class methodsFor: 'instance creation' stamp: 'ikp 2/3/2003 17:06'!\rnew\r\tSmalltalk platformName = 'Win32' ifTrue:[^GLXWin32 basicNew initialize].\r\tSmalltalk platformName = 'unix'\r\t\tifTrue:\r\t\t\t[(Smalltalk windowSystemName = 'X11')\r\t\t\t\tifTrue: [Smalltalk isLittleEndian\r\t\t\t\t\tifTrue: [^GLXUnixX11LE basicNew initialize]\r\t\t\t\t\tifFalse: [^GLXUnixX11BE basicNew initialize]].\r\t\t\t (Smalltalk windowSystemName = 'Quartz')\r\t\t\t\t\"implicitly big endian\"\r\t\t\t\tifTrue: [^GLXUnixQuartz basicNew initialize].\r\t\t\t self error: 'I cannot create a GLX for this window system'].\r\tSmalltalk platformName = 'Mac OS' ifTrue:[\r\t\tSmalltalk osVersion asNumber < 1000 \r\t\t\tifTrue: [^GLXMacOS9 basicNew initialize]\r\t\t\tifFalse:[^GLXMacOSX basicNew initialize].\r\t].\r\t^self error:'Cannot identify platform'! !\r\r\r!GLXUnixQuartz methodsFor: 'accessing' stamp: 'ikp 1/7/2003 21:14'!\rimagePixelFormat32\r\t^GLBgra! !\r\r!GLXUnixQuartz methodsFor: 'accessing' stamp: 'ikp 1/7/2003 21:14'!\rimagePixelType32\r\t^GLUnsignedInt8888Rev! !\r\r!GLXUnixQuartz methodsFor: 'accessing' stamp: 'ikp 1/7/2003 21:14'!\rtextureInternalFormat\r\t^GLRgba! !\r\r!GLXUnixQuartz methodsFor: 'accessing' stamp: 'ikp 1/7/2003 21:14'!\rtexturePixelFormat\r\t^GLBgra! !\r\r!GLXUnixQuartz methodsFor: 'accessing' stamp: 'ikp 1/7/2003 21:14'!\rtexturePixelType\r\t^GLUnsignedInt8888Rev! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglAccum: op with: value\r\t\"This method was automatically generated.\"\r\t\"void glAccum(GLenum op, GLfloat value);\"\r\t<cdecl: void 'glAccum' (ulong float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglActiveTextureARB: texture\r\t\"This method was automatically generated.\"\r\t\"void glActiveTextureARB(GLenum texture);\"\r\t<cdecl: void 'glActiveTextureARB' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglAlphaFunc: func with: ref\r\t\"This method was automatically generated.\"\r\t\"void glAlphaFunc(GLenum func, GLclampf ref);\"\r\t<cdecl: void 'glAlphaFunc' (ulong float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglAreTexturesResident: n with: texturez with: residences\r\t\"This method was automatically generated.\"\r\t\"GLboolean glAreTexturesResident(GLsizei n, GLuint* textures, GLboolean* residences);\"\r\t<cdecl: bool 'glAreTexturesResident' (long ulong* ulong*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglAreTexturesResidentEXT: n with: texturez with: residences\r\t\"This method was automatically generated.\"\r\t\"GLboolean glAreTexturesResidentEXT(GLsizei n, GLuint* textures, GLboolean* residences);\"\r\t<cdecl: bool 'glAreTexturesResidentEXT' (long ulong* ulong*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglArrayElement: i\r\t\"This method was automatically generated.\"\r\t\"void glArrayElement(GLint i);\"\r\t<cdecl: void 'glArrayElement' (long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglArrayElementEXT: i\r\t\"This method was automatically generated.\"\r\t\"void glArrayElementEXT(GLint i);\"\r\t<cdecl: void 'glArrayElementEXT' (long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglBegin: mode\r\t\"This method was automatically generated.\"\r\t\"void glBegin(GLenum mode);\"\r\t<cdecl: void 'glBegin' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglBindTexture: targt with: texture\r\t\"This method was automatically generated.\"\r\t\"void glBindTexture(GLenum target, GLuint texture);\"\r\t<cdecl: void 'glBindTexture' (ulong ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglBitmap: width with: height with: xorig with: yorig with: xmove with: ymove with: bitmap\r\t\"This method was automatically generated.\"\r\t\"void glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, GLubyte* bitmap);\"\r\t<cdecl: void 'glBitmap' (long long float float float float void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglBlendColor: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);\"\r\t<cdecl: void 'glBlendColor' (float float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglBlendEquation: mode\r\t\"This method was automatically generated.\"\r\t\"void glBlendEquation(GLenum mode);\"\r\t<cdecl: void 'glBlendEquation' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglBlendFunc: sfactor with: dfactor\r\t\"This method was automatically generated.\"\r\t\"void glBlendFunc(GLenum sfactor, GLenum dfactor);\"\r\t<cdecl: void 'glBlendFunc' (ulong ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglCallList: list\r\t\"This method was automatically generated.\"\r\t\"void glCallList(GLuint list);\"\r\t<cdecl: void 'glCallList' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglCallLists: n with: type with: lists\r\t\"This method was automatically generated.\"\r\t\"void glCallLists(GLsizei n, GLenum type, GLvoid* lists);\"\r\t<cdecl: void 'glCallLists' (long ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglClear: mask\r\t\"This method was automatically generated.\"\r\t\"void glClear(GLbitfield mask);\"\r\t<cdecl: void 'glClear' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglClearAccum: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);\"\r\t<cdecl: void 'glClearAccum' (float float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglClearColor: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);\"\r\t<cdecl: void 'glClearColor' (float float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglClearDepth: depth\r\t\"This method was automatically generated.\"\r\t\"void glClearDepth(GLclampd depth);\"\r\t<cdecl: void 'glClearDepth' (double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglClearIndex: c\r\t\"This method was automatically generated.\"\r\t\"void glClearIndex(GLfloat c);\"\r\t<cdecl: void 'glClearIndex' (float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglClearStencil: s\r\t\"This method was automatically generated.\"\r\t\"void glClearStencil(GLint s);\"\r\t<cdecl: void 'glClearStencil' (long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglClientActiveTextureARB: texture\r\t\"This method was automatically generated.\"\r\t\"void glClientActiveTextureARB(GLenum texture);\"\r\t<cdecl: void 'glClientActiveTextureARB' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglClipPlane: plane with: equation\r\t\"This method was automatically generated.\"\r\t\"void glClipPlane(GLenum plane, GLdouble* equation);\"\r\t<cdecl: void 'glClipPlane' (ulong double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor3b: red with: green with: blue\r\t\"This method was automatically generated.\"\r\t\"void glColor3b(GLbyte red, GLbyte green, GLbyte blue);\"\r\t<cdecl: void 'glColor3b' (byte byte byte) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor3bv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor3bv(GLbyte* v);\"\r\t<cdecl: void 'glColor3bv' (byte*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor3d: red with: green with: blue\r\t\"This method was automatically generated.\"\r\t\"void glColor3d(GLdouble red, GLdouble green, GLdouble blue);\"\r\t<cdecl: void 'glColor3d' (double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor3dv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor3dv(GLdouble* v);\"\r\t<cdecl: void 'glColor3dv' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor3f: red with: green with: blue\r\t\"This method was automatically generated.\"\r\t\"void glColor3f(GLfloat red, GLfloat green, GLfloat blue);\"\r\t<cdecl: void 'glColor3f' (float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor3fv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor3fv(GLfloat* v);\"\r\t<cdecl: void 'glColor3fv' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor3i: red with: green with: blue\r\t\"This method was automatically generated.\"\r\t\"void glColor3i(GLint red, GLint green, GLint blue);\"\r\t<cdecl: void 'glColor3i' (long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor3iv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor3iv(GLint* v);\"\r\t<cdecl: void 'glColor3iv' (long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor3s: red with: green with: blue\r\t\"This method was automatically generated.\"\r\t\"void glColor3s(GLshort red, GLshort green, GLshort blue);\"\r\t<cdecl: void 'glColor3s' (short short short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor3sv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor3sv(GLshort* v);\"\r\t<cdecl: void 'glColor3sv' (short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor3ub: red with: green with: blue\r\t\"This method was automatically generated.\"\r\t\"void glColor3ub(GLubyte red, GLubyte green, GLubyte blue);\"\r\t<cdecl: void 'glColor3ub' (byte byte byte) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor3ubv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor3ubv(GLubyte* v);\"\r\t<cdecl: void 'glColor3ubv' (byte*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor3ui: red with: green with: blue\r\t\"This method was automatically generated.\"\r\t\"void glColor3ui(GLuint red, GLuint green, GLuint blue);\"\r\t<cdecl: void 'glColor3ui' (ulong ulong ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor3uiv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor3uiv(GLuint* v);\"\r\t<cdecl: void 'glColor3uiv' (ulong*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor3us: red with: green with: blue\r\t\"This method was automatically generated.\"\r\t\"void glColor3us(GLushort red, GLushort green, GLushort blue);\"\r\t<cdecl: void 'glColor3us' (ushort ushort ushort) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor3usv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor3usv(GLushort* v);\"\r\t<cdecl: void 'glColor3usv' (ushort*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor4b: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);\"\r\t<cdecl: void 'glColor4b' (byte byte byte byte) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor4bv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor4bv(GLbyte* v);\"\r\t<cdecl: void 'glColor4bv' (byte*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor4d: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);\"\r\t<cdecl: void 'glColor4d' (double double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor4dv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor4dv(GLdouble* v);\"\r\t<cdecl: void 'glColor4dv' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor4f: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);\"\r\t<cdecl: void 'glColor4f' (float float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor4fv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor4fv(GLfloat* v);\"\r\t<cdecl: void 'glColor4fv' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor4i: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColor4i(GLint red, GLint green, GLint blue, GLint alpha);\"\r\t<cdecl: void 'glColor4i' (long long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor4iv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor4iv(GLint* v);\"\r\t<cdecl: void 'glColor4iv' (long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor4s: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha);\"\r\t<cdecl: void 'glColor4s' (short short short short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor4sv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor4sv(GLshort* v);\"\r\t<cdecl: void 'glColor4sv' (short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor4ub: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);\"\r\t<cdecl: void 'glColor4ub' (byte byte byte byte) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor4ubv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor4ubv(GLubyte* v);\"\r\t<cdecl: void 'glColor4ubv' (byte*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor4ui: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha);\"\r\t<cdecl: void 'glColor4ui' (ulong ulong ulong ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor4uiv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor4uiv(GLuint* v);\"\r\t<cdecl: void 'glColor4uiv' (ulong*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor4us: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha);\"\r\t<cdecl: void 'glColor4us' (ushort ushort ushort ushort) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor4usv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor4usv(GLushort* v);\"\r\t<cdecl: void 'glColor4usv' (ushort*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColorMask: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);\"\r\t<cdecl: void 'glColorMask' (bool bool bool bool) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColorMaterial: face with: mode\r\t\"This method was automatically generated.\"\r\t\"void glColorMaterial(GLenum face, GLenum mode);\"\r\t<cdecl: void 'glColorMaterial' (ulong ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColorPointer: size with: type with: stride with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glColorPointer(GLint size, GLenum type, GLsizei stride, GLvoid* pointer);\"\r\t<cdecl: void 'glColorPointer' (long ulong long void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColorPointerEXT: size with: type with: stride with: count with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glColorPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid* pointer);\"\r\t<cdecl: void 'glColorPointerEXT' (long ulong long long void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColorSubTable: targt with: start with: count with: format with: type with: data\r\t\"This method was automatically generated.\"\r\t\"void glColorSubTable(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, GLvoid* data);\"\r\t<cdecl: void 'glColorSubTable' (ulong long long ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColorTable: targt with: internalformat with: width with: format with: type with: table\r\t\"This method was automatically generated.\"\r\t\"void glColorTable(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, GLvoid* table);\"\r\t<cdecl: void 'glColorTable' (ulong ulong long ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColorTableParameterfv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glColorTableParameterfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glColorTableParameterfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColorTableParameteriv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glColorTableParameteriv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glColorTableParameteriv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglConvolutionFilter1D: targt with: internalformat with: width with: format with: type with: image\r\t\"This method was automatically generated.\"\r\t\"void glConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, GLvoid* image);\"\r\t<cdecl: void 'glConvolutionFilter1D' (ulong ulong long ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglConvolutionFilter2D: targt with: internalformat with: width with: height with: format with: type with: image\r\t\"This method was automatically generated.\"\r\t\"void glConvolutionFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* image);\"\r\t<cdecl: void 'glConvolutionFilter2D' (ulong ulong long long ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglConvolutionParameterf: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glConvolutionParameterf(GLenum target, GLenum pname, GLfloat params);\"\r\t<cdecl: void 'glConvolutionParameterf' (ulong ulong float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglConvolutionParameterfv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glConvolutionParameterfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glConvolutionParameterfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglConvolutionParameteri: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glConvolutionParameteri(GLenum target, GLenum pname, GLint params);\"\r\t<cdecl: void 'glConvolutionParameteri' (ulong ulong long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglConvolutionParameteriv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glConvolutionParameteriv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glConvolutionParameteriv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglCopyColorSubTable: targt with: start with: x with: y with: width\r\t\"This method was automatically generated.\"\r\t\"void glCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);\"\r\t<cdecl: void 'glCopyColorSubTable' (ulong long long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglCopyColorTable: targt with: internalformat with: x with: y with: width\r\t\"This method was automatically generated.\"\r\t\"void glCopyColorTable(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);\"\r\t<cdecl: void 'glCopyColorTable' (ulong ulong long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglCopyConvolutionFilter1D: targt with: internalformat with: x with: y with: width\r\t\"This method was automatically generated.\"\r\t\"void glCopyConvolutionFilter1D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);\"\r\t<cdecl: void 'glCopyConvolutionFilter1D' (ulong ulong long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglCopyConvolutionFilter2D: targt with: internalformat with: x with: y with: width with: height\r\t\"This method was automatically generated.\"\r\t\"void glCopyConvolutionFilter2D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);\"\r\t<cdecl: void 'glCopyConvolutionFilter2D' (ulong ulong long long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglCopyPixels: x with: y with: width with: height with: type\r\t\"This method was automatically generated.\"\r\t\"void glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);\"\r\t<cdecl: void 'glCopyPixels' (long long long long ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglCopyTexImage1D: targt with: level with: internalformat with: x with: y with: width with: border\r\t\"This method was automatically generated.\"\r\t\"void glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);\"\r\t<cdecl: void 'glCopyTexImage1D' (ulong long ulong long long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglCopyTexImage2D: targt with: level with: internalformat with: x with: y with: width with: height with: border\r\t\"This method was automatically generated.\"\r\t\"void glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);\"\r\t<cdecl: void 'glCopyTexImage2D' (ulong long ulong long long long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglCopyTexSubImage1D: targt with: level with: xoffset with: x with: y with: width\r\t\"This method was automatically generated.\"\r\t\"void glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);\"\r\t<cdecl: void 'glCopyTexSubImage1D' (ulong long long long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglCopyTexSubImage2D: targt with: level with: xoffset with: yoffset with: x with: y with: width with: height\r\t\"This method was automatically generated.\"\r\t\"void glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);\"\r\t<cdecl: void 'glCopyTexSubImage2D' (ulong long long long long long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglCopyTexSubImage3D: targt with: level with: xoffset with: yoffset with: zoffset with: x with: y with: width with: height\r\t\"This method was automatically generated.\"\r\t\"void glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\"\r\t<cdecl: void 'glCopyTexSubImage3D' (ulong long long long long long long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglCullFace: mode\r\t\"This method was automatically generated.\"\r\t\"void glCullFace(GLenum mode);\"\r\t<cdecl: void 'glCullFace' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglDeleteLists: list with: range\r\t\"This method was automatically generated.\"\r\t\"void glDeleteLists(GLuint list, GLsizei range);\"\r\t<cdecl: void 'glDeleteLists' (ulong long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglDeleteTextures: n with: textures\r\t\"This method was automatically generated.\"\r\t\"void glDeleteTextures(GLsizei n, GLuint* textures);\"\r\t<cdecl: void 'glDeleteTextures' (long ulong*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglDeleteTexturesEXT: n with: textures\r\t\"This method was automatically generated.\"\r\t\"void glDeleteTexturesEXT(GLsizei n, GLuint* textures);\"\r\t<cdecl: void 'glDeleteTexturesEXT' (long ulong*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglDepthFunc: func\r\t\"This method was automatically generated.\"\r\t\"void glDepthFunc(GLenum func);\"\r\t<cdecl: void 'glDepthFunc' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglDepthMask: flag\r\t\"This method was automatically generated.\"\r\t\"void glDepthMask(GLboolean flag);\"\r\t<cdecl: void 'glDepthMask' (bool) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglDepthRange: zNear with: zFar\r\t\"This method was automatically generated.\"\r\t\"void glDepthRange(GLclampd zNear, GLclampd zFar);\"\r\t<cdecl: void 'glDepthRange' (double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglDisable: cap\r\t\"This method was automatically generated.\"\r\t\"void glDisable(GLenum cap);\"\r\t<cdecl: void 'glDisable' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglDisableClientState: array\r\t\"This method was automatically generated.\"\r\t\"void glDisableClientState(GLenum array);\"\r\t<cdecl: void 'glDisableClientState' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglDrawArrays: mode with: first with: count\r\t\"This method was automatically generated.\"\r\t\"void glDrawArrays(GLenum mode, GLint first, GLsizei count);\"\r\t<cdecl: void 'glDrawArrays' (ulong long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglDrawArraysEXT: mode with: first with: count\r\t\"This method was automatically generated.\"\r\t\"void glDrawArraysEXT(GLenum mode, GLint first, GLsizei count);\"\r\t<cdecl: void 'glDrawArraysEXT' (ulong long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglDrawBuffer: mode\r\t\"This method was automatically generated.\"\r\t\"void glDrawBuffer(GLenum mode);\"\r\t<cdecl: void 'glDrawBuffer' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglDrawElements: mode with: count with: type with: indices\r\t\"This method was automatically generated.\"\r\t\"void glDrawElements(GLenum mode, GLsizei count, GLenum type, GLvoid* indices);\"\r\t<cdecl: void 'glDrawElements' (ulong long ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglDrawPixels: width with: height with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glDrawPixels' (long long ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglDrawRangeElements: mode with: start with: end with: count with: type with: indices\r\t\"This method was automatically generated.\"\r\t\"void glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLvoid* indices);\"\r\t<cdecl: void 'glDrawRangeElements' (ulong ulong ulong long ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEdgeFlag: flag\r\t\"This method was automatically generated.\"\r\t\"void glEdgeFlag(GLboolean flag);\"\r\t<cdecl: void 'glEdgeFlag' (bool) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEdgeFlagPointer: stride with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glEdgeFlagPointer(GLsizei stride, GLboolean* pointer);\"\r\t<cdecl: void 'glEdgeFlagPointer' (long ulong*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEdgeFlagPointerEXT: stride with: count with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glEdgeFlagPointerEXT(GLsizei stride, GLsizei count, GLboolean* pointer);\"\r\t<cdecl: void 'glEdgeFlagPointerEXT' (long long ulong*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEdgeFlagv: flag\r\t\"This method was automatically generated.\"\r\t\"void glEdgeFlagv(GLboolean* flag);\"\r\t<cdecl: void 'glEdgeFlagv' (ulong*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEnable: cap\r\t\"This method was automatically generated.\"\r\t\"void glEnable(GLenum cap);\"\r\t<cdecl: void 'glEnable' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEnableClientState: array\r\t\"This method was automatically generated.\"\r\t\"void glEnableClientState(GLenum array);\"\r\t<cdecl: void 'glEnableClientState' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEnd\r\t\"This method was automatically generated.\"\r\t\"void glEnd();\"\r\t<cdecl: void 'glEnd' (void) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEndList\r\t\"This method was automatically generated.\"\r\t\"void glEndList();\"\r\t<cdecl: void 'glEndList' (void) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEvalCoord1d: u\r\t\"This method was automatically generated.\"\r\t\"void glEvalCoord1d(GLdouble u);\"\r\t<cdecl: void 'glEvalCoord1d' (double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEvalCoord1dv: u\r\t\"This method was automatically generated.\"\r\t\"void glEvalCoord1dv(GLdouble* u);\"\r\t<cdecl: void 'glEvalCoord1dv' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEvalCoord1f: u\r\t\"This method was automatically generated.\"\r\t\"void glEvalCoord1f(GLfloat u);\"\r\t<cdecl: void 'glEvalCoord1f' (float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEvalCoord1fv: u\r\t\"This method was automatically generated.\"\r\t\"void glEvalCoord1fv(GLfloat* u);\"\r\t<cdecl: void 'glEvalCoord1fv' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEvalCoord2d: u with: v\r\t\"This method was automatically generated.\"\r\t\"void glEvalCoord2d(GLdouble u, GLdouble v);\"\r\t<cdecl: void 'glEvalCoord2d' (double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEvalCoord2dv: u\r\t\"This method was automatically generated.\"\r\t\"void glEvalCoord2dv(GLdouble* u);\"\r\t<cdecl: void 'glEvalCoord2dv' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEvalCoord2f: u with: v\r\t\"This method was automatically generated.\"\r\t\"void glEvalCoord2f(GLfloat u, GLfloat v);\"\r\t<cdecl: void 'glEvalCoord2f' (float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEvalCoord2fv: u\r\t\"This method was automatically generated.\"\r\t\"void glEvalCoord2fv(GLfloat* u);\"\r\t<cdecl: void 'glEvalCoord2fv' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEvalMesh1: mode with: i1 with: i2\r\t\"This method was automatically generated.\"\r\t\"void glEvalMesh1(GLenum mode, GLint i1, GLint i2);\"\r\t<cdecl: void 'glEvalMesh1' (ulong long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEvalMesh2: mode with: i1 with: i2 with: j1 with: j2\r\t\"This method was automatically generated.\"\r\t\"void glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);\"\r\t<cdecl: void 'glEvalMesh2' (ulong long long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEvalPoint1: i\r\t\"This method was automatically generated.\"\r\t\"void glEvalPoint1(GLint i);\"\r\t<cdecl: void 'glEvalPoint1' (long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEvalPoint2: i with: j\r\t\"This method was automatically generated.\"\r\t\"void glEvalPoint2(GLint i, GLint j);\"\r\t<cdecl: void 'glEvalPoint2' (long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglFeedbackBuffer: size with: type with: buffer\r\t\"This method was automatically generated.\"\r\t\"void glFeedbackBuffer(GLsizei size, GLenum type, GLfloat* buffer);\"\r\t<cdecl: void 'glFeedbackBuffer' (long ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglFinish\r\t\"This method was automatically generated.\"\r\t\"void glFinish();\"\r\t<cdecl: void 'glFinish' (void) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglFlush\r\t\"This method was automatically generated.\"\r\t\"void glFlush();\"\r\t<cdecl: void 'glFlush' (void) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglFogf: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glFogf(GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glFogf' (ulong float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglFogfv: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glFogfv(GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glFogfv' (ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglFogi: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glFogi(GLenum pname, GLint param);\"\r\t<cdecl: void 'glFogi' (ulong long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglFogiv: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glFogiv(GLenum pname, GLint* params);\"\r\t<cdecl: void 'glFogiv' (ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglFrontFace: mode\r\t\"This method was automatically generated.\"\r\t\"void glFrontFace(GLenum mode);\"\r\t<cdecl: void 'glFrontFace' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglFrustum: left with: right with: bottom with: top with: zNear with: zFar\r\t\"This method was automatically generated.\"\r\t\"void glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);\"\r\t<cdecl: void 'glFrustum' (double double double double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/8/2003 00:18'!\rglGenLists: range\r\t\"This method was automatically generated.\"\r\t\"GLuint glGenLists(GLsizei range);\"\r\t<cdecl: ulong 'glGenLists' (long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGenTextures: n with: textures\r\t\"This method was automatically generated.\"\r\t\"void glGenTextures(GLsizei n, GLuint* textures);\"\r\t<cdecl: void 'glGenTextures' (long ulong*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGenTexturesEXT: n with: textures\r\t\"This method was automatically generated.\"\r\t\"void glGenTexturesEXT(GLsizei n, GLuint* textures);\"\r\t<cdecl: void 'glGenTexturesEXT' (long ulong*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetBooleanv: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetBooleanv(GLenum pname, GLboolean* params);\"\r\t<cdecl: void 'glGetBooleanv' (ulong ulong*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetClipPlane: plane with: equation\r\t\"This method was automatically generated.\"\r\t\"void glGetClipPlane(GLenum plane, GLdouble* equation);\"\r\t<cdecl: void 'glGetClipPlane' (ulong double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetColorTable: targt with: format with: type with: table\r\t\"This method was automatically generated.\"\r\t\"void glGetColorTable(GLenum target, GLenum format, GLenum type, GLvoid* table);\"\r\t<cdecl: void 'glGetColorTable' (ulong ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetColorTableParameterfv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetColorTableParameterfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetColorTableParameterfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetColorTableParameteriv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetColorTableParameteriv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetColorTableParameteriv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetConvolutionFilter: targt with: format with: type with: image\r\t\"This method was automatically generated.\"\r\t\"void glGetConvolutionFilter(GLenum target, GLenum format, GLenum type, GLvoid* image);\"\r\t<cdecl: void 'glGetConvolutionFilter' (ulong ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetConvolutionParameterfv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetConvolutionParameterfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetConvolutionParameteriv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetConvolutionParameteriv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetConvolutionParameteriv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetDoublev: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetDoublev(GLenum pname, GLdouble* params);\"\r\t<cdecl: void 'glGetDoublev' (ulong double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetError\r\t\"This method was automatically generated.\"\r\t\"GLenum glGetError();\"\r\t<cdecl: ulong 'glGetError' (void) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetFloatv: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetFloatv(GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetFloatv' (ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetHistogram: targt with: reset with: format with: type with: values\r\t\"This method was automatically generated.\"\r\t\"void glGetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid* values);\"\r\t<cdecl: void 'glGetHistogram' (ulong bool ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetHistogramParameterfv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetHistogramParameterfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetHistogramParameterfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetHistogramParameteriv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetHistogramParameteriv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetHistogramParameteriv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetIntegerv: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetIntegerv(GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetIntegerv' (ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetLightfv: light with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetLightfv(GLenum light, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetLightfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetLightiv: light with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetLightiv(GLenum light, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetLightiv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetMapdv: targt with: query with: v\r\t\"This method was automatically generated.\"\r\t\"void glGetMapdv(GLenum target, GLenum query, GLdouble* v);\"\r\t<cdecl: void 'glGetMapdv' (ulong ulong double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetMapfv: targt with: query with: v\r\t\"This method was automatically generated.\"\r\t\"void glGetMapfv(GLenum target, GLenum query, GLfloat* v);\"\r\t<cdecl: void 'glGetMapfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetMapiv: targt with: query with: v\r\t\"This method was automatically generated.\"\r\t\"void glGetMapiv(GLenum target, GLenum query, GLint* v);\"\r\t<cdecl: void 'glGetMapiv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetMaterialfv: face with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetMaterialfv(GLenum face, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetMaterialfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetMaterialiv: face with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetMaterialiv(GLenum face, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetMaterialiv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetMinmax: targt with: reset with: format with: type with: values\r\t\"This method was automatically generated.\"\r\t\"void glGetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid* values);\"\r\t<cdecl: void 'glGetMinmax' (ulong bool ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetMinmaxParameterfv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetMinmaxParameterfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetMinmaxParameteriv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetMinmaxParameteriv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetMinmaxParameteriv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetPixelMapfv: map with: values\r\t\"This method was automatically generated.\"\r\t\"void glGetPixelMapfv(GLenum map, GLfloat* values);\"\r\t<cdecl: void 'glGetPixelMapfv' (ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetPixelMapuiv: map with: values\r\t\"This method was automatically generated.\"\r\t\"void glGetPixelMapuiv(GLenum map, GLuint* values);\"\r\t<cdecl: void 'glGetPixelMapuiv' (ulong ulong*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetPixelMapusv: map with: values\r\t\"This method was automatically generated.\"\r\t\"void glGetPixelMapusv(GLenum map, GLushort* values);\"\r\t<cdecl: void 'glGetPixelMapusv' (ulong ushort*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetPointerv: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetPointerv(GLenum pname, GLvoid** params);\"\r\t<cdecl: void 'glGetPointerv' (ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetPointervEXT: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetPointervEXT(GLenum pname, GLvoid** params);\"\r\t<cdecl: void 'glGetPointervEXT' (ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetPolygonStipple: mask\r\t\"This method was automatically generated.\"\r\t\"void glGetPolygonStipple(GLubyte* mask);\"\r\t<cdecl: void 'glGetPolygonStipple' (byte*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetSeparableFilter: targt with: format with: type with: row with: column with: span\r\t\"This method was automatically generated.\"\r\t\"void glGetSeparableFilter(GLenum target, GLenum format, GLenum type, GLvoid* row, GLvoid* column, GLvoid* span);\"\r\t<cdecl: void 'glGetSeparableFilter' (ulong ulong ulong void* void* void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetString: name\r\t\"This method was automatically generated.\"\r\t\"GLubyte* glGetString(GLenum name);\"\r\t<cdecl: byte* 'glGetString' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetTexEnvfv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexEnvfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetTexEnvfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetTexEnviv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexEnviv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetTexEnviv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetTexGendv: coord with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexGendv(GLenum coord, GLenum pname, GLdouble* params);\"\r\t<cdecl: void 'glGetTexGendv' (ulong ulong double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetTexGenfv: coord with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexGenfv(GLenum coord, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetTexGenfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetTexGeniv: coord with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexGeniv(GLenum coord, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetTexGeniv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetTexImage: targt with: level with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glGetTexImage' (ulong long ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetTexLevelParameterfv: targt with: level with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetTexLevelParameterfv' (ulong long ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetTexLevelParameteriv: targt with: level with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetTexLevelParameteriv' (ulong long ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetTexParameterfv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetTexParameterfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetTexParameteriv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexParameteriv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetTexParameteriv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglHint: targt with: mode\r\t\"This method was automatically generated.\"\r\t\"void glHint(GLenum target, GLenum mode);\"\r\t<cdecl: void 'glHint' (ulong ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglHistogram: targt with: width with: internalformat with: sink\r\t\"This method was automatically generated.\"\r\t\"void glHistogram(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);\"\r\t<cdecl: void 'glHistogram' (ulong long ulong bool) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIndexMask: mask\r\t\"This method was automatically generated.\"\r\t\"void glIndexMask(GLuint mask);\"\r\t<cdecl: void 'glIndexMask' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIndexPointer: type with: stride with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glIndexPointer(GLenum type, GLsizei stride, GLvoid* pointer);\"\r\t<cdecl: void 'glIndexPointer' (ulong long void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIndexPointerEXT: type with: stride with: count with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glIndexPointerEXT(GLenum type, GLsizei stride, GLsizei count, GLvoid* pointer);\"\r\t<cdecl: void 'glIndexPointerEXT' (ulong long long void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIndexd: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexd(GLdouble c);\"\r\t<cdecl: void 'glIndexd' (double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIndexdv: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexdv(GLdouble* c);\"\r\t<cdecl: void 'glIndexdv' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIndexf: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexf(GLfloat c);\"\r\t<cdecl: void 'glIndexf' (float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIndexfv: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexfv(GLfloat* c);\"\r\t<cdecl: void 'glIndexfv' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIndexi: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexi(GLint c);\"\r\t<cdecl: void 'glIndexi' (long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIndexiv: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexiv(GLint* c);\"\r\t<cdecl: void 'glIndexiv' (long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIndexs: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexs(GLshort c);\"\r\t<cdecl: void 'glIndexs' (short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIndexsv: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexsv(GLshort* c);\"\r\t<cdecl: void 'glIndexsv' (short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIndexub: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexub(GLubyte c);\"\r\t<cdecl: void 'glIndexub' (byte) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIndexubv: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexubv(GLubyte* c);\"\r\t<cdecl: void 'glIndexubv' (byte*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglInitNames\r\t\"This method was automatically generated.\"\r\t\"void glInitNames();\"\r\t<cdecl: void 'glInitNames' (void) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglInterleavedArrays: format with: stride with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glInterleavedArrays(GLenum format, GLsizei stride, GLvoid* pointer);\"\r\t<cdecl: void 'glInterleavedArrays' (ulong long void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIsEnabled: cap\r\t\"This method was automatically generated.\"\r\t\"GLboolean glIsEnabled(GLenum cap);\"\r\t<cdecl: bool 'glIsEnabled' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIsList: list\r\t\"This method was automatically generated.\"\r\t\"GLboolean glIsList(GLuint list);\"\r\t<cdecl: bool 'glIsList' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIsTexture: texture\r\t\"This method was automatically generated.\"\r\t\"GLboolean glIsTexture(GLuint texture);\"\r\t<cdecl: bool 'glIsTexture' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIsTextureEXT: texture\r\t\"This method was automatically generated.\"\r\t\"GLboolean glIsTextureEXT(GLuint texture);\"\r\t<cdecl: bool 'glIsTextureEXT' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglLightModelf: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glLightModelf(GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glLightModelf' (ulong float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglLightModelfv: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glLightModelfv(GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glLightModelfv' (ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglLightModeli: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glLightModeli(GLenum pname, GLint param);\"\r\t<cdecl: void 'glLightModeli' (ulong long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglLightModeliv: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glLightModeliv(GLenum pname, GLint* params);\"\r\t<cdecl: void 'glLightModeliv' (ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglLightf: light with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glLightf(GLenum light, GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glLightf' (ulong ulong float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglLightfv: light with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glLightfv(GLenum light, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glLightfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglLighti: light with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glLighti(GLenum light, GLenum pname, GLint param);\"\r\t<cdecl: void 'glLighti' (ulong ulong long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglLightiv: light with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glLightiv(GLenum light, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glLightiv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglLineStipple: factor with: pattern\r\t\"This method was automatically generated.\"\r\t\"void glLineStipple(GLint factor, GLushort pattern);\"\r\t<cdecl: void 'glLineStipple' (long ushort) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglLineWidth: width\r\t\"This method was automatically generated.\"\r\t\"void glLineWidth(GLfloat width);\"\r\t<cdecl: void 'glLineWidth' (float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglListBase: base\r\t\"This method was automatically generated.\"\r\t\"void glListBase(GLuint base);\"\r\t<cdecl: void 'glListBase' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglLoadIdentity\r\t\"This method was automatically generated.\"\r\t\"void glLoadIdentity();\"\r\t<cdecl: void 'glLoadIdentity' (void) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglLoadMatrixd: m\r\t\"This method was automatically generated.\"\r\t\"void glLoadMatrixd(GLdouble* m);\"\r\t<cdecl: void 'glLoadMatrixd' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglLoadMatrixf: m\r\t\"This method was automatically generated.\"\r\t\"void glLoadMatrixf(GLfloat* m);\"\r\t<cdecl: void 'glLoadMatrixf' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglLoadName: name\r\t\"This method was automatically generated.\"\r\t\"void glLoadName(GLuint name);\"\r\t<cdecl: void 'glLoadName' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglLockArraysEXT: first with: count\r\t\"This method was automatically generated.\"\r\t\"void glLockArraysEXT(GLint first, GLsizei count);\"\r\t<cdecl: void 'glLockArraysEXT' (long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglLogicOp: opcode\r\t\"This method was automatically generated.\"\r\t\"void glLogicOp(GLenum opcode);\"\r\t<cdecl: void 'glLogicOp' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMap1d: targt with: u1 with: u2 with: stride with: order with: points\r\t\"This method was automatically generated.\"\r\t\"void glMap1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, GLdouble* points);\"\r\t<cdecl: void 'glMap1d' (ulong double double long long double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMap1f: targt with: u1 with: u2 with: stride with: order with: points\r\t\"This method was automatically generated.\"\r\t\"void glMap1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, GLfloat* points);\"\r\t<cdecl: void 'glMap1f' (ulong float float long long float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMap2d: targt with: u1 with: u2 with: ustride with: uorder with: v1 with: v2 with: vstride with: vorder with: points\r\t\"This method was automatically generated.\"\r\t\"void glMap2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble* points);\"\r\t<cdecl: void 'glMap2d' (ulong double double long long double double long long double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMap2f: targt with: u1 with: u2 with: ustride with: uorder with: v1 with: v2 with: vstride with: vorder with: points\r\t\"This method was automatically generated.\"\r\t\"void glMap2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat* points);\"\r\t<cdecl: void 'glMap2f' (ulong float float long long float float long long float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMapGrid1d: un with: u1 with: u2\r\t\"This method was automatically generated.\"\r\t\"void glMapGrid1d(GLint un, GLdouble u1, GLdouble u2);\"\r\t<cdecl: void 'glMapGrid1d' (long double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMapGrid1f: un with: u1 with: u2\r\t\"This method was automatically generated.\"\r\t\"void glMapGrid1f(GLint un, GLfloat u1, GLfloat u2);\"\r\t<cdecl: void 'glMapGrid1f' (long float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMapGrid2d: un with: u1 with: u2 with: vn with: v1 with: v2\r\t\"This method was automatically generated.\"\r\t\"void glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);\"\r\t<cdecl: void 'glMapGrid2d' (long double double long double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMapGrid2f: un with: u1 with: u2 with: vn with: v1 with: v2\r\t\"This method was automatically generated.\"\r\t\"void glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);\"\r\t<cdecl: void 'glMapGrid2f' (long float float long float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMaterialf: face with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glMaterialf(GLenum face, GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glMaterialf' (ulong ulong float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMaterialfv: face with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glMaterialfv(GLenum face, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glMaterialfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMateriali: face with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glMateriali(GLenum face, GLenum pname, GLint param);\"\r\t<cdecl: void 'glMateriali' (ulong ulong long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMaterialiv: face with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glMaterialiv(GLenum face, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glMaterialiv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMatrixMode: mode\r\t\"This method was automatically generated.\"\r\t\"void glMatrixMode(GLenum mode);\"\r\t<cdecl: void 'glMatrixMode' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMinmax: targt with: internalformat with: sink\r\t\"This method was automatically generated.\"\r\t\"void glMinmax(GLenum target, GLenum internalformat, GLboolean sink);\"\r\t<cdecl: void 'glMinmax' (ulong ulong bool) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultMatrixd: m\r\t\"This method was automatically generated.\"\r\t\"void glMultMatrixd(GLdouble* m);\"\r\t<cdecl: void 'glMultMatrixd' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultMatrixf: m\r\t\"This method was automatically generated.\"\r\t\"void glMultMatrixf(GLfloat* m);\"\r\t<cdecl: void 'glMultMatrixf' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord1dARB: targt with: s\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord1dARB(GLenum target, GLdouble s);\"\r\t<cdecl: void 'glMultiTexCoord1dARB' (ulong double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord1dvARB: targt with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord1dvARB(GLenum target, GLdouble* v);\"\r\t<cdecl: void 'glMultiTexCoord1dvARB' (ulong double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord1fARB: targt with: s\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord1fARB(GLenum target, GLfloat s);\"\r\t<cdecl: void 'glMultiTexCoord1fARB' (ulong float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord1fvARB: targt with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord1fvARB(GLenum target, GLfloat* v);\"\r\t<cdecl: void 'glMultiTexCoord1fvARB' (ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord1iARB: targt with: s\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord1iARB(GLenum target, GLint s);\"\r\t<cdecl: void 'glMultiTexCoord1iARB' (ulong long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord1ivARB: targt with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord1ivARB(GLenum target, GLint* v);\"\r\t<cdecl: void 'glMultiTexCoord1ivARB' (ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord1sARB: targt with: s\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord1sARB(GLenum target, GLshort s);\"\r\t<cdecl: void 'glMultiTexCoord1sARB' (ulong short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord1svARB: targt with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord1svARB(GLenum target, GLshort* v);\"\r\t<cdecl: void 'glMultiTexCoord1svARB' (ulong short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord2dARB: targt with: s with: t\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t);\"\r\t<cdecl: void 'glMultiTexCoord2dARB' (ulong double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord2dvARB: targt with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord2dvARB(GLenum target, GLdouble* v);\"\r\t<cdecl: void 'glMultiTexCoord2dvARB' (ulong double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord2fARB: targt with: s with: t\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t);\"\r\t<cdecl: void 'glMultiTexCoord2fARB' (ulong float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord2fvARB: targt with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord2fvARB(GLenum target, GLfloat* v);\"\r\t<cdecl: void 'glMultiTexCoord2fvARB' (ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord2iARB: targt with: s with: t\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord2iARB(GLenum target, GLint s, GLint t);\"\r\t<cdecl: void 'glMultiTexCoord2iARB' (ulong long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord2ivARB: targt with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord2ivARB(GLenum target, GLint* v);\"\r\t<cdecl: void 'glMultiTexCoord2ivARB' (ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord2sARB: targt with: s with: t\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t);\"\r\t<cdecl: void 'glMultiTexCoord2sARB' (ulong short short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord2svARB: targt with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord2svARB(GLenum target, GLshort* v);\"\r\t<cdecl: void 'glMultiTexCoord2svARB' (ulong short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord3dARB: targt with: s with: t with: r\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r);\"\r\t<cdecl: void 'glMultiTexCoord3dARB' (ulong double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord3dvARB: targt with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord3dvARB(GLenum target, GLdouble* v);\"\r\t<cdecl: void 'glMultiTexCoord3dvARB' (ulong double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord3fARB: targt with: s with: t with: r\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r);\"\r\t<cdecl: void 'glMultiTexCoord3fARB' (ulong float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord3fvARB: targt with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord3fvARB(GLenum target, GLfloat* v);\"\r\t<cdecl: void 'glMultiTexCoord3fvARB' (ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord3iARB: targt with: s with: t with: r\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r);\"\r\t<cdecl: void 'glMultiTexCoord3iARB' (ulong long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord3ivARB: targt with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord3ivARB(GLenum target, GLint* v);\"\r\t<cdecl: void 'glMultiTexCoord3ivARB' (ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord3sARB: targt with: s with: t with: r\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r);\"\r\t<cdecl: void 'glMultiTexCoord3sARB' (ulong short short short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord3svARB: targt with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord3svARB(GLenum target, GLshort* v);\"\r\t<cdecl: void 'glMultiTexCoord3svARB' (ulong short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord4dARB: targt with: s with: t with: r with: q\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);\"\r\t<cdecl: void 'glMultiTexCoord4dARB' (ulong double double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord4dvARB: targt with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord4dvARB(GLenum target, GLdouble* v);\"\r\t<cdecl: void 'glMultiTexCoord4dvARB' (ulong double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord4fARB: targt with: s with: t with: r with: q\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);\"\r\t<cdecl: void 'glMultiTexCoord4fARB' (ulong float float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord4fvARB: targt with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord4fvARB(GLenum target, GLfloat* v);\"\r\t<cdecl: void 'glMultiTexCoord4fvARB' (ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord4iARB: targt with: s with: t with: r with: q\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q);\"\r\t<cdecl: void 'glMultiTexCoord4iARB' (ulong long long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord4ivARB: targt with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord4ivARB(GLenum target, GLint* v);\"\r\t<cdecl: void 'glMultiTexCoord4ivARB' (ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord4sARB: targt with: s with: t with: r with: q\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);\"\r\t<cdecl: void 'glMultiTexCoord4sARB' (ulong short short short short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord4svARB: targt with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord4svARB(GLenum target, GLshort* v);\"\r\t<cdecl: void 'glMultiTexCoord4svARB' (ulong short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglNewList: list with: mode\r\t\"This method was automatically generated.\"\r\t\"void glNewList(GLuint list, GLenum mode);\"\r\t<cdecl: void 'glNewList' (ulong ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglNormal3b: nx with: ny with: nz\r\t\"This method was automatically generated.\"\r\t\"void glNormal3b(GLbyte nx, GLbyte ny, GLbyte nz);\"\r\t<cdecl: void 'glNormal3b' (byte byte byte) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglNormal3bv: v\r\t\"This method was automatically generated.\"\r\t\"void glNormal3bv(GLbyte* v);\"\r\t<cdecl: void 'glNormal3bv' (byte*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglNormal3d: nx with: ny with: nz\r\t\"This method was automatically generated.\"\r\t\"void glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz);\"\r\t<cdecl: void 'glNormal3d' (double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglNormal3dv: v\r\t\"This method was automatically generated.\"\r\t\"void glNormal3dv(GLdouble* v);\"\r\t<cdecl: void 'glNormal3dv' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglNormal3f: nx with: ny with: nz\r\t\"This method was automatically generated.\"\r\t\"void glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz);\"\r\t<cdecl: void 'glNormal3f' (float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglNormal3fv: v\r\t\"This method was automatically generated.\"\r\t\"void glNormal3fv(GLfloat* v);\"\r\t<cdecl: void 'glNormal3fv' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglNormal3i: nx with: ny with: nz\r\t\"This method was automatically generated.\"\r\t\"void glNormal3i(GLint nx, GLint ny, GLint nz);\"\r\t<cdecl: void 'glNormal3i' (long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglNormal3iv: v\r\t\"This method was automatically generated.\"\r\t\"void glNormal3iv(GLint* v);\"\r\t<cdecl: void 'glNormal3iv' (long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglNormal3s: nx with: ny with: nz\r\t\"This method was automatically generated.\"\r\t\"void glNormal3s(GLshort nx, GLshort ny, GLshort nz);\"\r\t<cdecl: void 'glNormal3s' (short short short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglNormal3sv: v\r\t\"This method was automatically generated.\"\r\t\"void glNormal3sv(GLshort* v);\"\r\t<cdecl: void 'glNormal3sv' (short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglNormalPointer: type with: stride with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glNormalPointer(GLenum type, GLsizei stride, GLvoid* pointer);\"\r\t<cdecl: void 'glNormalPointer' (ulong long void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglNormalPointerEXT: type with: stride with: count with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glNormalPointerEXT(GLenum type, GLsizei stride, GLsizei count, GLvoid* pointer);\"\r\t<cdecl: void 'glNormalPointerEXT' (ulong long long void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglOrtho: left with: right with: bottom with: top with: zNear with: zFar\r\t\"This method was automatically generated.\"\r\t\"void glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);\"\r\t<cdecl: void 'glOrtho' (double double double double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPassThrough: token\r\t\"This method was automatically generated.\"\r\t\"void glPassThrough(GLfloat token);\"\r\t<cdecl: void 'glPassThrough' (float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPixelMapfv: map with: mapsize with: values\r\t\"This method was automatically generated.\"\r\t\"void glPixelMapfv(GLenum map, GLint mapsize, GLfloat* values);\"\r\t<cdecl: void 'glPixelMapfv' (ulong long float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPixelMapuiv: map with: mapsize with: values\r\t\"This method was automatically generated.\"\r\t\"void glPixelMapuiv(GLenum map, GLint mapsize, GLuint* values);\"\r\t<cdecl: void 'glPixelMapuiv' (ulong long ulong*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPixelMapusv: map with: mapsize with: values\r\t\"This method was automatically generated.\"\r\t\"void glPixelMapusv(GLenum map, GLint mapsize, GLushort* values);\"\r\t<cdecl: void 'glPixelMapusv' (ulong long ushort*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPixelStoref: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glPixelStoref(GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glPixelStoref' (ulong float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPixelStorei: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glPixelStorei(GLenum pname, GLint param);\"\r\t<cdecl: void 'glPixelStorei' (ulong long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPixelTransferf: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glPixelTransferf(GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glPixelTransferf' (ulong float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPixelTransferi: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glPixelTransferi(GLenum pname, GLint param);\"\r\t<cdecl: void 'glPixelTransferi' (ulong long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPixelZoom: xfactor with: yfactor\r\t\"This method was automatically generated.\"\r\t\"void glPixelZoom(GLfloat xfactor, GLfloat yfactor);\"\r\t<cdecl: void 'glPixelZoom' (float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPointSize: size\r\t\"This method was automatically generated.\"\r\t\"void glPointSize(GLfloat size);\"\r\t<cdecl: void 'glPointSize' (float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPolygonMode: face with: mode\r\t\"This method was automatically generated.\"\r\t\"void glPolygonMode(GLenum face, GLenum mode);\"\r\t<cdecl: void 'glPolygonMode' (ulong ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPolygonOffset: factor with: units\r\t\"This method was automatically generated.\"\r\t\"void glPolygonOffset(GLfloat factor, GLfloat units);\"\r\t<cdecl: void 'glPolygonOffset' (float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPolygonStipple: mask\r\t\"This method was automatically generated.\"\r\t\"void glPolygonStipple(GLubyte* mask);\"\r\t<cdecl: void 'glPolygonStipple' (byte*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPopAttrib\r\t\"This method was automatically generated.\"\r\t\"void glPopAttrib();\"\r\t<cdecl: void 'glPopAttrib' (void) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPopClientAttrib\r\t\"This method was automatically generated.\"\r\t\"void glPopClientAttrib();\"\r\t<cdecl: void 'glPopClientAttrib' (void) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPopMatrix\r\t\"This method was automatically generated.\"\r\t\"void glPopMatrix();\"\r\t<cdecl: void 'glPopMatrix' (void) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPopName\r\t\"This method was automatically generated.\"\r\t\"void glPopName();\"\r\t<cdecl: void 'glPopName' (void) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPrioritizeTextures: n with: texturez with: priorities\r\t\"This method was automatically generated.\"\r\t\"void glPrioritizeTextures(GLsizei n, GLuint* textures, GLclampf* priorities);\"\r\t<cdecl: void 'glPrioritizeTextures' (long ulong* float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPushAttrib: mask\r\t\"This method was automatically generated.\"\r\t\"void glPushAttrib(GLbitfield mask);\"\r\t<cdecl: void 'glPushAttrib' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPushClientAttrib: mask\r\t\"This method was automatically generated.\"\r\t\"void glPushClientAttrib(GLbitfield mask);\"\r\t<cdecl: void 'glPushClientAttrib' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPushMatrix\r\t\"This method was automatically generated.\"\r\t\"void glPushMatrix();\"\r\t<cdecl: void 'glPushMatrix' (void) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPushName: name\r\t\"This method was automatically generated.\"\r\t\"void glPushName(GLuint name);\"\r\t<cdecl: void 'glPushName' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos2d: x with: y\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos2d(GLdouble x, GLdouble y);\"\r\t<cdecl: void 'glRasterPos2d' (double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos2dv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos2dv(GLdouble* v);\"\r\t<cdecl: void 'glRasterPos2dv' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos2f: x with: y\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos2f(GLfloat x, GLfloat y);\"\r\t<cdecl: void 'glRasterPos2f' (float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos2fv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos2fv(GLfloat* v);\"\r\t<cdecl: void 'glRasterPos2fv' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos2i: x with: y\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos2i(GLint x, GLint y);\"\r\t<cdecl: void 'glRasterPos2i' (long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos2iv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos2iv(GLint* v);\"\r\t<cdecl: void 'glRasterPos2iv' (long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos2s: x with: y\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos2s(GLshort x, GLshort y);\"\r\t<cdecl: void 'glRasterPos2s' (short short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos2sv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos2sv(GLshort* v);\"\r\t<cdecl: void 'glRasterPos2sv' (short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos3d: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos3d(GLdouble x, GLdouble y, GLdouble z);\"\r\t<cdecl: void 'glRasterPos3d' (double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos3dv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos3dv(GLdouble* v);\"\r\t<cdecl: void 'glRasterPos3dv' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos3f: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos3f(GLfloat x, GLfloat y, GLfloat z);\"\r\t<cdecl: void 'glRasterPos3f' (float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos3fv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos3fv(GLfloat* v);\"\r\t<cdecl: void 'glRasterPos3fv' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos3i: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos3i(GLint x, GLint y, GLint z);\"\r\t<cdecl: void 'glRasterPos3i' (long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos3iv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos3iv(GLint* v);\"\r\t<cdecl: void 'glRasterPos3iv' (long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos3s: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos3s(GLshort x, GLshort y, GLshort z);\"\r\t<cdecl: void 'glRasterPos3s' (short short short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos3sv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos3sv(GLshort* v);\"\r\t<cdecl: void 'glRasterPos3sv' (short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos4d: x with: y with: z with: w\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w);\"\r\t<cdecl: void 'glRasterPos4d' (double double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos4dv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos4dv(GLdouble* v);\"\r\t<cdecl: void 'glRasterPos4dv' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos4f: x with: y with: z with: w\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w);\"\r\t<cdecl: void 'glRasterPos4f' (float float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos4fv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos4fv(GLfloat* v);\"\r\t<cdecl: void 'glRasterPos4fv' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos4i: x with: y with: z with: w\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos4i(GLint x, GLint y, GLint z, GLint w);\"\r\t<cdecl: void 'glRasterPos4i' (long long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos4iv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos4iv(GLint* v);\"\r\t<cdecl: void 'glRasterPos4iv' (long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos4s: x with: y with: z with: w\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w);\"\r\t<cdecl: void 'glRasterPos4s' (short short short short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos4sv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos4sv(GLshort* v);\"\r\t<cdecl: void 'glRasterPos4sv' (short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglReadBuffer: mode\r\t\"This method was automatically generated.\"\r\t\"void glReadBuffer(GLenum mode);\"\r\t<cdecl: void 'glReadBuffer' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglReadPixels: x with: y with: width with: height with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glReadPixels' (long long long long ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRectd: x1 with: y1 with: x2 with: y2\r\t\"This method was automatically generated.\"\r\t\"void glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);\"\r\t<cdecl: void 'glRectd' (double double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRectdv: v1 with: v2\r\t\"This method was automatically generated.\"\r\t\"void glRectdv(GLdouble* v1, GLdouble* v2);\"\r\t<cdecl: void 'glRectdv' (double* double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRectf: x1 with: y1 with: x2 with: y2\r\t\"This method was automatically generated.\"\r\t\"void glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);\"\r\t<cdecl: void 'glRectf' (float float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRectfv: v1 with: v2\r\t\"This method was automatically generated.\"\r\t\"void glRectfv(GLfloat* v1, GLfloat* v2);\"\r\t<cdecl: void 'glRectfv' (float* float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRecti: x1 with: y1 with: x2 with: y2\r\t\"This method was automatically generated.\"\r\t\"void glRecti(GLint x1, GLint y1, GLint x2, GLint y2);\"\r\t<cdecl: void 'glRecti' (long long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRectiv: v1 with: v2\r\t\"This method was automatically generated.\"\r\t\"void glRectiv(GLint* v1, GLint* v2);\"\r\t<cdecl: void 'glRectiv' (long* long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRects: x1 with: y1 with: x2 with: y2\r\t\"This method was automatically generated.\"\r\t\"void glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2);\"\r\t<cdecl: void 'glRects' (short short short short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRectsv: v1 with: v2\r\t\"This method was automatically generated.\"\r\t\"void glRectsv(GLshort* v1, GLshort* v2);\"\r\t<cdecl: void 'glRectsv' (short* short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRenderMode: mode\r\t\"This method was automatically generated.\"\r\t\"GLint glRenderMode(GLenum mode);\"\r\t<cdecl: long 'glRenderMode' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglResetHistogram: target\r\t\"This method was automatically generated.\"\r\t\"void glResetHistogram(GLenum target);\"\r\t<cdecl: void 'glResetHistogram' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglResetMinmax: target\r\t\"This method was automatically generated.\"\r\t\"void glResetMinmax(GLenum target);\"\r\t<cdecl: void 'glResetMinmax' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRotated: angle with: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);\"\r\t<cdecl: void 'glRotated' (double double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRotatef: angle with: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);\"\r\t<cdecl: void 'glRotatef' (float float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglScaled: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glScaled(GLdouble x, GLdouble y, GLdouble z);\"\r\t<cdecl: void 'glScaled' (double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglScalef: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glScalef(GLfloat x, GLfloat y, GLfloat z);\"\r\t<cdecl: void 'glScalef' (float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglScissor: x with: y with: width with: height\r\t\"This method was automatically generated.\"\r\t\"void glScissor(GLint x, GLint y, GLsizei width, GLsizei height);\"\r\t<cdecl: void 'glScissor' (long long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglSelectBuffer: size with: buffer\r\t\"This method was automatically generated.\"\r\t\"void glSelectBuffer(GLsizei size, GLuint* buffer);\"\r\t<cdecl: void 'glSelectBuffer' (long ulong*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglSeparableFilter2D: targt with: internalformat with: width with: height with: format with: type with: row with: column\r\t\"This method was automatically generated.\"\r\t\"void glSeparableFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* row, GLvoid* column);\"\r\t<cdecl: void 'glSeparableFilter2D' (ulong ulong long long ulong ulong void* void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglShadeModel: mode\r\t\"This method was automatically generated.\"\r\t\"void glShadeModel(GLenum mode);\"\r\t<cdecl: void 'glShadeModel' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglStencilFunc: func with: ref with: mask\r\t\"This method was automatically generated.\"\r\t\"void glStencilFunc(GLenum func, GLint ref, GLuint mask);\"\r\t<cdecl: void 'glStencilFunc' (ulong long ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglStencilMask: mask\r\t\"This method was automatically generated.\"\r\t\"void glStencilMask(GLuint mask);\"\r\t<cdecl: void 'glStencilMask' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglStencilOp: fail with: zfail with: zpass\r\t\"This method was automatically generated.\"\r\t\"void glStencilOp(GLenum fail, GLenum zfail, GLenum zpass);\"\r\t<cdecl: void 'glStencilOp' (ulong ulong ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord1d: s\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord1d(GLdouble s);\"\r\t<cdecl: void 'glTexCoord1d' (double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord1dv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord1dv(GLdouble* v);\"\r\t<cdecl: void 'glTexCoord1dv' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord1f: s\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord1f(GLfloat s);\"\r\t<cdecl: void 'glTexCoord1f' (float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord1fv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord1fv(GLfloat* v);\"\r\t<cdecl: void 'glTexCoord1fv' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord1i: s\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord1i(GLint s);\"\r\t<cdecl: void 'glTexCoord1i' (long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord1iv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord1iv(GLint* v);\"\r\t<cdecl: void 'glTexCoord1iv' (long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord1s: s\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord1s(GLshort s);\"\r\t<cdecl: void 'glTexCoord1s' (short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord1sv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord1sv(GLshort* v);\"\r\t<cdecl: void 'glTexCoord1sv' (short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord2d: s with: t\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord2d(GLdouble s, GLdouble t);\"\r\t<cdecl: void 'glTexCoord2d' (double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord2dv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord2dv(GLdouble* v);\"\r\t<cdecl: void 'glTexCoord2dv' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord2f: s with: t\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord2f(GLfloat s, GLfloat t);\"\r\t<cdecl: void 'glTexCoord2f' (float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord2fv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord2fv(GLfloat* v);\"\r\t<cdecl: void 'glTexCoord2fv' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord2i: s with: t\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord2i(GLint s, GLint t);\"\r\t<cdecl: void 'glTexCoord2i' (long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord2iv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord2iv(GLint* v);\"\r\t<cdecl: void 'glTexCoord2iv' (long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord2s: s with: t\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord2s(GLshort s, GLshort t);\"\r\t<cdecl: void 'glTexCoord2s' (short short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord2sv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord2sv(GLshort* v);\"\r\t<cdecl: void 'glTexCoord2sv' (short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord3d: s with: t with: r\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord3d(GLdouble s, GLdouble t, GLdouble r);\"\r\t<cdecl: void 'glTexCoord3d' (double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord3dv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord3dv(GLdouble* v);\"\r\t<cdecl: void 'glTexCoord3dv' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord3f: s with: t with: r\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord3f(GLfloat s, GLfloat t, GLfloat r);\"\r\t<cdecl: void 'glTexCoord3f' (float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord3fv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord3fv(GLfloat* v);\"\r\t<cdecl: void 'glTexCoord3fv' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord3i: s with: t with: r\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord3i(GLint s, GLint t, GLint r);\"\r\t<cdecl: void 'glTexCoord3i' (long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord3iv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord3iv(GLint* v);\"\r\t<cdecl: void 'glTexCoord3iv' (long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord3s: s with: t with: r\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord3s(GLshort s, GLshort t, GLshort r);\"\r\t<cdecl: void 'glTexCoord3s' (short short short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord3sv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord3sv(GLshort* v);\"\r\t<cdecl: void 'glTexCoord3sv' (short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord4d: s with: t with: r with: q\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q);\"\r\t<cdecl: void 'glTexCoord4d' (double double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord4dv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord4dv(GLdouble* v);\"\r\t<cdecl: void 'glTexCoord4dv' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord4f: s with: t with: r with: q\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q);\"\r\t<cdecl: void 'glTexCoord4f' (float float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord4fv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord4fv(GLfloat* v);\"\r\t<cdecl: void 'glTexCoord4fv' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord4i: s with: t with: r with: q\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord4i(GLint s, GLint t, GLint r, GLint q);\"\r\t<cdecl: void 'glTexCoord4i' (long long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord4iv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord4iv(GLint* v);\"\r\t<cdecl: void 'glTexCoord4iv' (long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord4s: s with: t with: r with: q\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q);\"\r\t<cdecl: void 'glTexCoord4s' (short short short short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord4sv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord4sv(GLshort* v);\"\r\t<cdecl: void 'glTexCoord4sv' (short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoordPointer: size with: type with: stride with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glTexCoordPointer(GLint size, GLenum type, GLsizei stride, GLvoid* pointer);\"\r\t<cdecl: void 'glTexCoordPointer' (long ulong long void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoordPointerEXT: size with: type with: stride with: count with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glTexCoordPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid* pointer);\"\r\t<cdecl: void 'glTexCoordPointerEXT' (long ulong long long void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexEnvf: targt with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glTexEnvf(GLenum target, GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glTexEnvf' (ulong ulong float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexEnvfv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glTexEnvfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glTexEnvfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexEnvi: targt with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glTexEnvi(GLenum target, GLenum pname, GLint param);\"\r\t<cdecl: void 'glTexEnvi' (ulong ulong long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexEnviv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glTexEnviv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glTexEnviv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexGend: coord with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glTexGend(GLenum coord, GLenum pname, GLdouble param);\"\r\t<cdecl: void 'glTexGend' (ulong ulong double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexGendv: coord with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glTexGendv(GLenum coord, GLenum pname, GLdouble* params);\"\r\t<cdecl: void 'glTexGendv' (ulong ulong double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexGenf: coord with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glTexGenf(GLenum coord, GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glTexGenf' (ulong ulong float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexGenfv: coord with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glTexGenfv(GLenum coord, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glTexGenfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexGeni: coord with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glTexGeni(GLenum coord, GLenum pname, GLint param);\"\r\t<cdecl: void 'glTexGeni' (ulong ulong long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexGeniv: coord with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glTexGeniv(GLenum coord, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glTexGeniv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexImage1D: targt with: level with: internalformat with: width with: border with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glTexImage1D' (ulong long long long long ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexImage2D: targt with: level with: internalformat with: width with: height with: border with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glTexImage2D' (ulong long long long long long ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexImage3D: targt with: level with: internalformat with: width with: height with: depth with: border with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glTexImage3D' (ulong long ulong long long long long ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexParameterf: targt with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glTexParameterf(GLenum target, GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glTexParameterf' (ulong ulong float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexParameterfv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glTexParameterfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glTexParameterfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexParameteri: targt with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glTexParameteri(GLenum target, GLenum pname, GLint param);\"\r\t<cdecl: void 'glTexParameteri' (ulong ulong long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexParameteriv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glTexParameteriv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glTexParameteriv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexSubImage1D: targt with: level with: xoffset with: width with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glTexSubImage1D' (ulong long long long ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexSubImage2D: targt with: level with: xoffset with: yoffset with: width with: height with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glTexSubImage2D' (ulong long long long long long ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexSubImage3D: targt with: level with: xoffset with: yoffset with: zoffset with: width with: height with: depth with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glTexSubImage3D' (ulong long long long long long long long ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTranslated: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glTranslated(GLdouble x, GLdouble y, GLdouble z);\"\r\t<cdecl: void 'glTranslated' (double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTranslatef: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glTranslatef(GLfloat x, GLfloat y, GLfloat z);\"\r\t<cdecl: void 'glTranslatef' (float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglUnlockArraysEXT\r\t\"This method was automatically generated.\"\r\t\"void glUnlockArraysEXT();\"\r\t<cdecl: void 'glUnlockArraysEXT' (void) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex2d: x with: y\r\t\"This method was automatically generated.\"\r\t\"void glVertex2d(GLdouble x, GLdouble y);\"\r\t<cdecl: void 'glVertex2d' (double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex2dv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex2dv(GLdouble* v);\"\r\t<cdecl: void 'glVertex2dv' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex2f: x with: y\r\t\"This method was automatically generated.\"\r\t\"void glVertex2f(GLfloat x, GLfloat y);\"\r\t<cdecl: void 'glVertex2f' (float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex2fv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex2fv(GLfloat* v);\"\r\t<cdecl: void 'glVertex2fv' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex2i: x with: y\r\t\"This method was automatically generated.\"\r\t\"void glVertex2i(GLint x, GLint y);\"\r\t<cdecl: void 'glVertex2i' (long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex2iv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex2iv(GLint* v);\"\r\t<cdecl: void 'glVertex2iv' (long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex2s: x with: y\r\t\"This method was automatically generated.\"\r\t\"void glVertex2s(GLshort x, GLshort y);\"\r\t<cdecl: void 'glVertex2s' (short short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex2sv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex2sv(GLshort* v);\"\r\t<cdecl: void 'glVertex2sv' (short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex3d: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glVertex3d(GLdouble x, GLdouble y, GLdouble z);\"\r\t<cdecl: void 'glVertex3d' (double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex3dv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex3dv(GLdouble* v);\"\r\t<cdecl: void 'glVertex3dv' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex3f: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glVertex3f(GLfloat x, GLfloat y, GLfloat z);\"\r\t<cdecl: void 'glVertex3f' (float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex3fv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex3fv(GLfloat* v);\"\r\t<cdecl: void 'glVertex3fv' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex3i: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glVertex3i(GLint x, GLint y, GLint z);\"\r\t<cdecl: void 'glVertex3i' (long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex3iv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex3iv(GLint* v);\"\r\t<cdecl: void 'glVertex3iv' (long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex3s: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glVertex3s(GLshort x, GLshort y, GLshort z);\"\r\t<cdecl: void 'glVertex3s' (short short short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex3sv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex3sv(GLshort* v);\"\r\t<cdecl: void 'glVertex3sv' (short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex4d: x with: y with: z with: w\r\t\"This method was automatically generated.\"\r\t\"void glVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w);\"\r\t<cdecl: void 'glVertex4d' (double double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex4dv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex4dv(GLdouble* v);\"\r\t<cdecl: void 'glVertex4dv' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex4f: x with: y with: z with: w\r\t\"This method was automatically generated.\"\r\t\"void glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w);\"\r\t<cdecl: void 'glVertex4f' (float float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex4fv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex4fv(GLfloat* v);\"\r\t<cdecl: void 'glVertex4fv' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex4i: x with: y with: z with: w\r\t\"This method was automatically generated.\"\r\t\"void glVertex4i(GLint x, GLint y, GLint z, GLint w);\"\r\t<cdecl: void 'glVertex4i' (long long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex4iv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex4iv(GLint* v);\"\r\t<cdecl: void 'glVertex4iv' (long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex4s: x with: y with: z with: w\r\t\"This method was automatically generated.\"\r\t\"void glVertex4s(GLshort x, GLshort y, GLshort z, GLshort w);\"\r\t<cdecl: void 'glVertex4s' (short short short short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex4sv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex4sv(GLshort* v);\"\r\t<cdecl: void 'glVertex4sv' (short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertexPointer: size with: type with: stride with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glVertexPointer(GLint size, GLenum type, GLsizei stride, GLvoid* pointer);\"\r\t<cdecl: void 'glVertexPointer' (long ulong long void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertexPointerEXT: size with: type with: stride with: count with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glVertexPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid* pointer);\"\r\t<cdecl: void 'glVertexPointerEXT' (long ulong long long void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglViewport: x with: y with: width with: height\r\t\"This method was automatically generated.\"\r\t\"void glViewport(GLint x, GLint y, GLsizei width, GLsizei height);\"\r\t<cdecl: void 'glViewport' (long long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r\r!GLXUnixQuartz class methodsFor: 'as yet unclassified' stamp: 'ikp 1/16/2003 05:38'!\rtest\r\t\"GLXUnixOSX test\"\r\r\t<cdecl: void 'ffiTest2' (long long) module: 'B3DAcceleratorPlugin'>\r\t^self error: 'test failed'! !\r\r!GLXUnixQuartz class methodsFor: 'as yet unclassified' stamp: 'ikp 1/16/2003 05:39'!\rtest: x with: y\r\t\"GLXUnixOSX test: 6 with: 7\"\r\r\t<cdecl: void 'ffiTest2' (long long) module: 'B3DAcceleratorPlugin'>\r\t^self error: 'test failed'! !\r\r\r!GLXUnixX11BE methodsFor: 'accessing' stamp: 'bf 10/21/2002 19:10'!\rimagePixelFormat32\r\t^GLBgra! !\r\r!GLXUnixX11BE methodsFor: 'accessing' stamp: 'ikp 2/3/2003 17:01'!\rimagePixelType32\r\t^GLUnsignedInt8888Rev! !\r\r!GLXUnixX11BE methodsFor: 'accessing' stamp: 'bf 10/21/2002 19:15'!\rtextureInternalFormat\r\t^GLRgba! !\r\r!GLXUnixX11BE methodsFor: 'accessing' stamp: 'bf 10/21/2002 19:09'!\rtexturePixelFormat\r\t^GLBgra! !\r\r!GLXUnixX11BE methodsFor: 'accessing' stamp: 'ikp 2/3/2003 17:02'!\rtexturePixelType\r\t^GLUnsignedInt8888Rev! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglAccum: op with: value\r\t\"This method was automatically generated.\"\r\t\"void glAccum(GLenum op, GLfloat value);\"\r\t<cdecl: void 'glAccum' (ulong float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglActiveTextureARB: texture\r\t\"This method was automatically generated.\"\r\t\"void glActiveTextureARB(GLenum texture);\"\r\t<cdecl: void 'glActiveTextureARB' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglAlphaFunc: func with: ref\r\t\"This method was automatically generated.\"\r\t\"void glAlphaFunc(GLenum func, GLclampf ref);\"\r\t<cdecl: void 'glAlphaFunc' (ulong float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglAreTexturesResident: n with: textures with: residences\r\t\"This method was automatically generated.\"\r\t\"GLboolean glAreTexturesResident(GLsizei n, GLuint* textures, GLboolean* residences);\"\r\t<cdecl: bool 'glAreTexturesResident' (long ulong* ulong*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglAreTexturesResidentEXT: n with: textures with: residences\r\t\"This method was automatically generated.\"\r\t\"GLboolean glAreTexturesResidentEXT(GLsizei n, GLuint* textures, GLboolean* residences);\"\r\t<cdecl: bool 'glAreTexturesResidentEXT' (long ulong* ulong*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglArrayElement: i\r\t\"This method was automatically generated.\"\r\t\"void glArrayElement(GLint i);\"\r\t<cdecl: void 'glArrayElement' (long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglArrayElementEXT: i\r\t\"This method was automatically generated.\"\r\t\"void glArrayElementEXT(GLint i);\"\r\t<cdecl: void 'glArrayElementEXT' (long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglBegin: mode\r\t\"This method was automatically generated.\"\r\t\"void glBegin(GLenum mode);\"\r\t<cdecl: void 'glBegin' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglBindTexture: target with: texture\r\t\"This method was automatically generated.\"\r\t\"void glBindTexture(GLenum target, GLuint texture);\"\r\t<cdecl: void 'glBindTexture' (ulong ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglBitmap: width with: height with: xorig with: yorig with: xmove with: ymove with: bitmap\r\t\"This method was automatically generated.\"\r\t\"void glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, GLubyte* bitmap);\"\r\t<cdecl: void 'glBitmap' (long long float float float float void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglBlendColor: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);\"\r\t<cdecl: void 'glBlendColor' (float float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglBlendEquation: mode\r\t\"This method was automatically generated.\"\r\t\"void glBlendEquation(GLenum mode);\"\r\t<cdecl: void 'glBlendEquation' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglBlendFunc: sfactor with: dfactor\r\t\"This method was automatically generated.\"\r\t\"void glBlendFunc(GLenum sfactor, GLenum dfactor);\"\r\t<cdecl: void 'glBlendFunc' (ulong ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglCallList: list\r\t\"This method was automatically generated.\"\r\t\"void glCallList(GLuint list);\"\r\t<cdecl: void 'glCallList' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglCallLists: n with: type with: lists\r\t\"This method was automatically generated.\"\r\t\"void glCallLists(GLsizei n, GLenum type, GLvoid* lists);\"\r\t<cdecl: void 'glCallLists' (long ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglClear: mask\r\t\"This method was automatically generated.\"\r\t\"void glClear(GLbitfield mask);\"\r\t<cdecl: void 'glClear' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglClearAccum: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);\"\r\t<cdecl: void 'glClearAccum' (float float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglClearColor: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);\"\r\t<cdecl: void 'glClearColor' (float float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglClearDepth: depth\r\t\"This method was automatically generated.\"\r\t\"void glClearDepth(GLclampd depth);\"\r\t<cdecl: void 'glClearDepth' (double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglClearIndex: c\r\t\"This method was automatically generated.\"\r\t\"void glClearIndex(GLfloat c);\"\r\t<cdecl: void 'glClearIndex' (float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglClearStencil: s\r\t\"This method was automatically generated.\"\r\t\"void glClearStencil(GLint s);\"\r\t<cdecl: void 'glClearStencil' (long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglClientActiveTextureARB: texture\r\t\"This method was automatically generated.\"\r\t\"void glClientActiveTextureARB(GLenum texture);\"\r\t<cdecl: void 'glClientActiveTextureARB' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglClipPlane: plane with: equation\r\t\"This method was automatically generated.\"\r\t\"void glClipPlane(GLenum plane, GLdouble* equation);\"\r\t<cdecl: void 'glClipPlane' (ulong double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor3b: red with: green with: blue\r\t\"This method was automatically generated.\"\r\t\"void glColor3b(GLbyte red, GLbyte green, GLbyte blue);\"\r\t<cdecl: void 'glColor3b' (byte byte byte) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor3bv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor3bv(GLbyte* v);\"\r\t<cdecl: void 'glColor3bv' (byte*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor3d: red with: green with: blue\r\t\"This method was automatically generated.\"\r\t\"void glColor3d(GLdouble red, GLdouble green, GLdouble blue);\"\r\t<cdecl: void 'glColor3d' (double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor3dv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor3dv(GLdouble* v);\"\r\t<cdecl: void 'glColor3dv' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor3f: red with: green with: blue\r\t\"This method was automatically generated.\"\r\t\"void glColor3f(GLfloat red, GLfloat green, GLfloat blue);\"\r\t<cdecl: void 'glColor3f' (float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor3fv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor3fv(GLfloat* v);\"\r\t<cdecl: void 'glColor3fv' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor3i: red with: green with: blue\r\t\"This method was automatically generated.\"\r\t\"void glColor3i(GLint red, GLint green, GLint blue);\"\r\t<cdecl: void 'glColor3i' (long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor3iv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor3iv(GLint* v);\"\r\t<cdecl: void 'glColor3iv' (long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor3s: red with: green with: blue\r\t\"This method was automatically generated.\"\r\t\"void glColor3s(GLshort red, GLshort green, GLshort blue);\"\r\t<cdecl: void 'glColor3s' (short short short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor3sv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor3sv(GLshort* v);\"\r\t<cdecl: void 'glColor3sv' (short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor3ub: red with: green with: blue\r\t\"This method was automatically generated.\"\r\t\"void glColor3ub(GLubyte red, GLubyte green, GLubyte blue);\"\r\t<cdecl: void 'glColor3ub' (byte byte byte) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor3ubv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor3ubv(GLubyte* v);\"\r\t<cdecl: void 'glColor3ubv' (byte*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor3ui: red with: green with: blue\r\t\"This method was automatically generated.\"\r\t\"void glColor3ui(GLuint red, GLuint green, GLuint blue);\"\r\t<cdecl: void 'glColor3ui' (ulong ulong ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor3uiv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor3uiv(GLuint* v);\"\r\t<cdecl: void 'glColor3uiv' (ulong*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor3us: red with: green with: blue\r\t\"This method was automatically generated.\"\r\t\"void glColor3us(GLushort red, GLushort green, GLushort blue);\"\r\t<cdecl: void 'glColor3us' (ushort ushort ushort) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor3usv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor3usv(GLushort* v);\"\r\t<cdecl: void 'glColor3usv' (ushort*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor4b: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);\"\r\t<cdecl: void 'glColor4b' (byte byte byte byte) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor4bv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor4bv(GLbyte* v);\"\r\t<cdecl: void 'glColor4bv' (byte*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor4d: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);\"\r\t<cdecl: void 'glColor4d' (double double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor4dv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor4dv(GLdouble* v);\"\r\t<cdecl: void 'glColor4dv' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor4f: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);\"\r\t<cdecl: void 'glColor4f' (float float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor4fv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor4fv(GLfloat* v);\"\r\t<cdecl: void 'glColor4fv' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor4i: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColor4i(GLint red, GLint green, GLint blue, GLint alpha);\"\r\t<cdecl: void 'glColor4i' (long long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor4iv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor4iv(GLint* v);\"\r\t<cdecl: void 'glColor4iv' (long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor4s: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha);\"\r\t<cdecl: void 'glColor4s' (short short short short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor4sv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor4sv(GLshort* v);\"\r\t<cdecl: void 'glColor4sv' (short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor4ub: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);\"\r\t<cdecl: void 'glColor4ub' (byte byte byte byte) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor4ubv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor4ubv(GLubyte* v);\"\r\t<cdecl: void 'glColor4ubv' (byte*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor4ui: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha);\"\r\t<cdecl: void 'glColor4ui' (ulong ulong ulong ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor4uiv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor4uiv(GLuint* v);\"\r\t<cdecl: void 'glColor4uiv' (ulong*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor4us: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha);\"\r\t<cdecl: void 'glColor4us' (ushort ushort ushort ushort) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor4usv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor4usv(GLushort* v);\"\r\t<cdecl: void 'glColor4usv' (ushort*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColorMask: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);\"\r\t<cdecl: void 'glColorMask' (bool bool bool bool) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColorMaterial: face with: mode\r\t\"This method was automatically generated.\"\r\t\"void glColorMaterial(GLenum face, GLenum mode);\"\r\t<cdecl: void 'glColorMaterial' (ulong ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColorPointer: size with: type with: stride with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glColorPointer(GLint size, GLenum type, GLsizei stride, GLvoid* pointer);\"\r\t<cdecl: void 'glColorPointer' (long ulong long void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColorPointerEXT: size with: type with: stride with: count with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glColorPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid* pointer);\"\r\t<cdecl: void 'glColorPointerEXT' (long ulong long long void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColorSubTable: target with: start with: count with: format with: type with: data\r\t\"This method was automatically generated.\"\r\t\"void glColorSubTable(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, GLvoid* data);\"\r\t<cdecl: void 'glColorSubTable' (ulong long long ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColorTable: target with: internalformat with: width with: format with: type with: table\r\t\"This method was automatically generated.\"\r\t\"void glColorTable(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, GLvoid* table);\"\r\t<cdecl: void 'glColorTable' (ulong ulong long ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColorTableParameterfv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glColorTableParameterfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glColorTableParameterfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColorTableParameteriv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glColorTableParameteriv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glColorTableParameteriv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglConvolutionFilter1D: target with: internalformat with: width with: format with: type with: image\r\t\"This method was automatically generated.\"\r\t\"void glConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, GLvoid* image);\"\r\t<cdecl: void 'glConvolutionFilter1D' (ulong ulong long ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglConvolutionFilter2D: target with: internalformat with: width with: height with: format with: type with: image\r\t\"This method was automatically generated.\"\r\t\"void glConvolutionFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* image);\"\r\t<cdecl: void 'glConvolutionFilter2D' (ulong ulong long long ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglConvolutionParameterf: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glConvolutionParameterf(GLenum target, GLenum pname, GLfloat params);\"\r\t<cdecl: void 'glConvolutionParameterf' (ulong ulong float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglConvolutionParameterfv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glConvolutionParameterfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glConvolutionParameterfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglConvolutionParameteri: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glConvolutionParameteri(GLenum target, GLenum pname, GLint params);\"\r\t<cdecl: void 'glConvolutionParameteri' (ulong ulong long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglConvolutionParameteriv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glConvolutionParameteriv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glConvolutionParameteriv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglCopyColorSubTable: target with: start with: x with: y with: width\r\t\"This method was automatically generated.\"\r\t\"void glCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);\"\r\t<cdecl: void 'glCopyColorSubTable' (ulong long long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglCopyColorTable: target with: internalformat with: x with: y with: width\r\t\"This method was automatically generated.\"\r\t\"void glCopyColorTable(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);\"\r\t<cdecl: void 'glCopyColorTable' (ulong ulong long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglCopyConvolutionFilter1D: target with: internalformat with: x with: y with: width\r\t\"This method was automatically generated.\"\r\t\"void glCopyConvolutionFilter1D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);\"\r\t<cdecl: void 'glCopyConvolutionFilter1D' (ulong ulong long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglCopyConvolutionFilter2D: target with: internalformat with: x with: y with: width with: height\r\t\"This method was automatically generated.\"\r\t\"void glCopyConvolutionFilter2D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);\"\r\t<cdecl: void 'glCopyConvolutionFilter2D' (ulong ulong long long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglCopyPixels: x with: y with: width with: height with: type\r\t\"This method was automatically generated.\"\r\t\"void glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);\"\r\t<cdecl: void 'glCopyPixels' (long long long long ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglCopyTexImage1D: target with: level with: internalformat with: x with: y with: width with: border\r\t\"This method was automatically generated.\"\r\t\"void glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);\"\r\t<cdecl: void 'glCopyTexImage1D' (ulong long ulong long long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglCopyTexImage2D: target with: level with: internalformat with: x with: y with: width with: height with: border\r\t\"This method was automatically generated.\"\r\t\"void glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);\"\r\t<cdecl: void 'glCopyTexImage2D' (ulong long ulong long long long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglCopyTexSubImage1D: target with: level with: xoffset with: x with: y with: width\r\t\"This method was automatically generated.\"\r\t\"void glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);\"\r\t<cdecl: void 'glCopyTexSubImage1D' (ulong long long long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglCopyTexSubImage2D: target with: level with: xoffset with: yoffset with: x with: y with: width with: height\r\t\"This method was automatically generated.\"\r\t\"void glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);\"\r\t<cdecl: void 'glCopyTexSubImage2D' (ulong long long long long long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglCopyTexSubImage3D: target with: level with: xoffset with: yoffset with: zoffset with: x with: y with: width with: height\r\t\"This method was automatically generated.\"\r\t\"void glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\"\r\t<cdecl: void 'glCopyTexSubImage3D' (ulong long long long long long long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglCullFace: mode\r\t\"This method was automatically generated.\"\r\t\"void glCullFace(GLenum mode);\"\r\t<cdecl: void 'glCullFace' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglDeleteLists: list with: range\r\t\"This method was automatically generated.\"\r\t\"void glDeleteLists(GLuint list, GLsizei range);\"\r\t<cdecl: void 'glDeleteLists' (ulong long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglDeleteTextures: n with: textures\r\t\"This method was automatically generated.\"\r\t\"void glDeleteTextures(GLsizei n, GLuint* textures);\"\r\t<cdecl: void 'glDeleteTextures' (long ulong*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglDeleteTexturesEXT: n with: textures\r\t\"This method was automatically generated.\"\r\t\"void glDeleteTexturesEXT(GLsizei n, GLuint* textures);\"\r\t<cdecl: void 'glDeleteTexturesEXT' (long ulong*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglDepthFunc: func\r\t\"This method was automatically generated.\"\r\t\"void glDepthFunc(GLenum func);\"\r\t<cdecl: void 'glDepthFunc' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglDepthMask: flag\r\t\"This method was automatically generated.\"\r\t\"void glDepthMask(GLboolean flag);\"\r\t<cdecl: void 'glDepthMask' (bool) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglDepthRange: zNear with: zFar\r\t\"This method was automatically generated.\"\r\t\"void glDepthRange(GLclampd zNear, GLclampd zFar);\"\r\t<cdecl: void 'glDepthRange' (double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglDisable: cap\r\t\"This method was automatically generated.\"\r\t\"void glDisable(GLenum cap);\"\r\t<cdecl: void 'glDisable' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglDisableClientState: array\r\t\"This method was automatically generated.\"\r\t\"void glDisableClientState(GLenum array);\"\r\t<cdecl: void 'glDisableClientState' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglDrawArrays: mode with: first with: count\r\t\"This method was automatically generated.\"\r\t\"void glDrawArrays(GLenum mode, GLint first, GLsizei count);\"\r\t<cdecl: void 'glDrawArrays' (ulong long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglDrawArraysEXT: mode with: first with: count\r\t\"This method was automatically generated.\"\r\t\"void glDrawArraysEXT(GLenum mode, GLint first, GLsizei count);\"\r\t<cdecl: void 'glDrawArraysEXT' (ulong long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglDrawBuffer: mode\r\t\"This method was automatically generated.\"\r\t\"void glDrawBuffer(GLenum mode);\"\r\t<cdecl: void 'glDrawBuffer' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglDrawElements: mode with: count with: type with: indices\r\t\"This method was automatically generated.\"\r\t\"void glDrawElements(GLenum mode, GLsizei count, GLenum type, GLvoid* indices);\"\r\t<cdecl: void 'glDrawElements' (ulong long ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglDrawPixels: width with: height with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glDrawPixels' (long long ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglDrawRangeElements: mode with: start with: end with: count with: type with: indices\r\t\"This method was automatically generated.\"\r\t\"void glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLvoid* indices);\"\r\t<cdecl: void 'glDrawRangeElements' (ulong ulong ulong long ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEdgeFlag: flag\r\t\"This method was automatically generated.\"\r\t\"void glEdgeFlag(GLboolean flag);\"\r\t<cdecl: void 'glEdgeFlag' (bool) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEdgeFlagPointer: stride with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glEdgeFlagPointer(GLsizei stride, GLboolean* pointer);\"\r\t<cdecl: void 'glEdgeFlagPointer' (long ulong*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEdgeFlagPointerEXT: stride with: count with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glEdgeFlagPointerEXT(GLsizei stride, GLsizei count, GLboolean* pointer);\"\r\t<cdecl: void 'glEdgeFlagPointerEXT' (long long ulong*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEdgeFlagv: flag\r\t\"This method was automatically generated.\"\r\t\"void glEdgeFlagv(GLboolean* flag);\"\r\t<cdecl: void 'glEdgeFlagv' (ulong*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEnable: cap\r\t\"This method was automatically generated.\"\r\t\"void glEnable(GLenum cap);\"\r\t<cdecl: void 'glEnable' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEnableClientState: array\r\t\"This method was automatically generated.\"\r\t\"void glEnableClientState(GLenum array);\"\r\t<cdecl: void 'glEnableClientState' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEnd\r\t\"This method was automatically generated.\"\r\t\"void glEnd();\"\r\t<cdecl: void 'glEnd' (void) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEndList\r\t\"This method was automatically generated.\"\r\t\"void glEndList();\"\r\t<cdecl: void 'glEndList' (void) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEvalCoord1d: u\r\t\"This method was automatically generated.\"\r\t\"void glEvalCoord1d(GLdouble u);\"\r\t<cdecl: void 'glEvalCoord1d' (double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEvalCoord1dv: u\r\t\"This method was automatically generated.\"\r\t\"void glEvalCoord1dv(GLdouble* u);\"\r\t<cdecl: void 'glEvalCoord1dv' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEvalCoord1f: u\r\t\"This method was automatically generated.\"\r\t\"void glEvalCoord1f(GLfloat u);\"\r\t<cdecl: void 'glEvalCoord1f' (float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEvalCoord1fv: u\r\t\"This method was automatically generated.\"\r\t\"void glEvalCoord1fv(GLfloat* u);\"\r\t<cdecl: void 'glEvalCoord1fv' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEvalCoord2d: u with: v\r\t\"This method was automatically generated.\"\r\t\"void glEvalCoord2d(GLdouble u, GLdouble v);\"\r\t<cdecl: void 'glEvalCoord2d' (double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEvalCoord2dv: u\r\t\"This method was automatically generated.\"\r\t\"void glEvalCoord2dv(GLdouble* u);\"\r\t<cdecl: void 'glEvalCoord2dv' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEvalCoord2f: u with: v\r\t\"This method was automatically generated.\"\r\t\"void glEvalCoord2f(GLfloat u, GLfloat v);\"\r\t<cdecl: void 'glEvalCoord2f' (float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEvalCoord2fv: u\r\t\"This method was automatically generated.\"\r\t\"void glEvalCoord2fv(GLfloat* u);\"\r\t<cdecl: void 'glEvalCoord2fv' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEvalMesh1: mode with: i1 with: i2\r\t\"This method was automatically generated.\"\r\t\"void glEvalMesh1(GLenum mode, GLint i1, GLint i2);\"\r\t<cdecl: void 'glEvalMesh1' (ulong long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEvalMesh2: mode with: i1 with: i2 with: j1 with: j2\r\t\"This method was automatically generated.\"\r\t\"void glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);\"\r\t<cdecl: void 'glEvalMesh2' (ulong long long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEvalPoint1: i\r\t\"This method was automatically generated.\"\r\t\"void glEvalPoint1(GLint i);\"\r\t<cdecl: void 'glEvalPoint1' (long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEvalPoint2: i with: j\r\t\"This method was automatically generated.\"\r\t\"void glEvalPoint2(GLint i, GLint j);\"\r\t<cdecl: void 'glEvalPoint2' (long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglFeedbackBuffer: size with: type with: buffer\r\t\"This method was automatically generated.\"\r\t\"void glFeedbackBuffer(GLsizei size, GLenum type, GLfloat* buffer);\"\r\t<cdecl: void 'glFeedbackBuffer' (long ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglFinish\r\t\"This method was automatically generated.\"\r\t\"void glFinish();\"\r\t<cdecl: void 'glFinish' (void) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglFlush\r\t\"This method was automatically generated.\"\r\t\"void glFlush();\"\r\t<cdecl: void 'glFlush' (void) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglFogf: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glFogf(GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glFogf' (ulong float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglFogfv: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glFogfv(GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glFogfv' (ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglFogi: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glFogi(GLenum pname, GLint param);\"\r\t<cdecl: void 'glFogi' (ulong long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglFogiv: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glFogiv(GLenum pname, GLint* params);\"\r\t<cdecl: void 'glFogiv' (ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglFrontFace: mode\r\t\"This method was automatically generated.\"\r\t\"void glFrontFace(GLenum mode);\"\r\t<cdecl: void 'glFrontFace' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglFrustum: left with: right with: bottom with: top with: zNear with: zFar\r\t\"This method was automatically generated.\"\r\t\"void glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);\"\r\t<cdecl: void 'glFrustum' (double double double double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGenLists: range\r\t\"This method was automatically generated.\"\r\t\"GLuint glGenLists(GLsizei range);\"\r\t<cdecl: ulong 'glGenLists' (long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGenTextures: n with: textures\r\t\"This method was automatically generated.\"\r\t\"void glGenTextures(GLsizei n, GLuint* textures);\"\r\t<cdecl: void 'glGenTextures' (long ulong*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGenTexturesEXT: n with: textures\r\t\"This method was automatically generated.\"\r\t\"void glGenTexturesEXT(GLsizei n, GLuint* textures);\"\r\t<cdecl: void 'glGenTexturesEXT' (long ulong*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetBooleanv: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetBooleanv(GLenum pname, GLboolean* params);\"\r\t<cdecl: void 'glGetBooleanv' (ulong ulong*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetClipPlane: plane with: equation\r\t\"This method was automatically generated.\"\r\t\"void glGetClipPlane(GLenum plane, GLdouble* equation);\"\r\t<cdecl: void 'glGetClipPlane' (ulong double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetColorTable: target with: format with: type with: table\r\t\"This method was automatically generated.\"\r\t\"void glGetColorTable(GLenum target, GLenum format, GLenum type, GLvoid* table);\"\r\t<cdecl: void 'glGetColorTable' (ulong ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetColorTableParameterfv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetColorTableParameterfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetColorTableParameterfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetColorTableParameteriv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetColorTableParameteriv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetColorTableParameteriv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetConvolutionFilter: target with: format with: type with: image\r\t\"This method was automatically generated.\"\r\t\"void glGetConvolutionFilter(GLenum target, GLenum format, GLenum type, GLvoid* image);\"\r\t<cdecl: void 'glGetConvolutionFilter' (ulong ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetConvolutionParameterfv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetConvolutionParameterfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetConvolutionParameteriv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetConvolutionParameteriv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetConvolutionParameteriv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetDoublev: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetDoublev(GLenum pname, GLdouble* params);\"\r\t<cdecl: void 'glGetDoublev' (ulong double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetError\r\t\"This method was automatically generated.\"\r\t\"GLenum glGetError();\"\r\t<cdecl: ulong 'glGetError' (void) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetFloatv: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetFloatv(GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetFloatv' (ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetHistogram: target with: reset with: format with: type with: values\r\t\"This method was automatically generated.\"\r\t\"void glGetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid* values);\"\r\t<cdecl: void 'glGetHistogram' (ulong bool ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetHistogramParameterfv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetHistogramParameterfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetHistogramParameterfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetHistogramParameteriv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetHistogramParameteriv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetHistogramParameteriv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetIntegerv: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetIntegerv(GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetIntegerv' (ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetLightfv: light with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetLightfv(GLenum light, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetLightfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetLightiv: light with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetLightiv(GLenum light, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetLightiv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetMapdv: target with: query with: v\r\t\"This method was automatically generated.\"\r\t\"void glGetMapdv(GLenum target, GLenum query, GLdouble* v);\"\r\t<cdecl: void 'glGetMapdv' (ulong ulong double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetMapfv: target with: query with: v\r\t\"This method was automatically generated.\"\r\t\"void glGetMapfv(GLenum target, GLenum query, GLfloat* v);\"\r\t<cdecl: void 'glGetMapfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetMapiv: target with: query with: v\r\t\"This method was automatically generated.\"\r\t\"void glGetMapiv(GLenum target, GLenum query, GLint* v);\"\r\t<cdecl: void 'glGetMapiv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetMaterialfv: face with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetMaterialfv(GLenum face, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetMaterialfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetMaterialiv: face with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetMaterialiv(GLenum face, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetMaterialiv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetMinmax: target with: reset with: format with: type with: values\r\t\"This method was automatically generated.\"\r\t\"void glGetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid* values);\"\r\t<cdecl: void 'glGetMinmax' (ulong bool ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetMinmaxParameterfv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetMinmaxParameterfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetMinmaxParameteriv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetMinmaxParameteriv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetMinmaxParameteriv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetPixelMapfv: map with: values\r\t\"This method was automatically generated.\"\r\t\"void glGetPixelMapfv(GLenum map, GLfloat* values);\"\r\t<cdecl: void 'glGetPixelMapfv' (ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetPixelMapuiv: map with: values\r\t\"This method was automatically generated.\"\r\t\"void glGetPixelMapuiv(GLenum map, GLuint* values);\"\r\t<cdecl: void 'glGetPixelMapuiv' (ulong ulong*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetPixelMapusv: map with: values\r\t\"This method was automatically generated.\"\r\t\"void glGetPixelMapusv(GLenum map, GLushort* values);\"\r\t<cdecl: void 'glGetPixelMapusv' (ulong ushort*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetPointerv: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetPointerv(GLenum pname, GLvoid** params);\"\r\t<cdecl: void 'glGetPointerv' (ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetPointervEXT: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetPointervEXT(GLenum pname, GLvoid** params);\"\r\t<cdecl: void 'glGetPointervEXT' (ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetPolygonStipple: mask\r\t\"This method was automatically generated.\"\r\t\"void glGetPolygonStipple(GLubyte* mask);\"\r\t<cdecl: void 'glGetPolygonStipple' (byte*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetSeparableFilter: target with: format with: type with: row with: column with: span\r\t\"This method was automatically generated.\"\r\t\"void glGetSeparableFilter(GLenum target, GLenum format, GLenum type, GLvoid* row, GLvoid* column, GLvoid* span);\"\r\t<cdecl: void 'glGetSeparableFilter' (ulong ulong ulong void* void* void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetString: name\r\t\"This method was automatically generated.\"\r\t\"GLubyte* glGetString(GLenum name);\"\r\t<cdecl: byte* 'glGetString' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetTexEnvfv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexEnvfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetTexEnvfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetTexEnviv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexEnviv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetTexEnviv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetTexGendv: coord with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexGendv(GLenum coord, GLenum pname, GLdouble* params);\"\r\t<cdecl: void 'glGetTexGendv' (ulong ulong double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetTexGenfv: coord with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexGenfv(GLenum coord, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetTexGenfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetTexGeniv: coord with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexGeniv(GLenum coord, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetTexGeniv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetTexImage: target with: level with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glGetTexImage' (ulong long ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetTexLevelParameterfv: target with: level with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetTexLevelParameterfv' (ulong long ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetTexLevelParameteriv: target with: level with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetTexLevelParameteriv' (ulong long ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetTexParameterfv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetTexParameterfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetTexParameteriv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexParameteriv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetTexParameteriv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglHint: target with: mode\r\t\"This method was automatically generated.\"\r\t\"void glHint(GLenum target, GLenum mode);\"\r\t<cdecl: void 'glHint' (ulong ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglHistogram: target with: width with: internalformat with: sink\r\t\"This method was automatically generated.\"\r\t\"void glHistogram(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);\"\r\t<cdecl: void 'glHistogram' (ulong long ulong bool) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIndexMask: mask\r\t\"This method was automatically generated.\"\r\t\"void glIndexMask(GLuint mask);\"\r\t<cdecl: void 'glIndexMask' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIndexPointer: type with: stride with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glIndexPointer(GLenum type, GLsizei stride, GLvoid* pointer);\"\r\t<cdecl: void 'glIndexPointer' (ulong long void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIndexPointerEXT: type with: stride with: count with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glIndexPointerEXT(GLenum type, GLsizei stride, GLsizei count, GLvoid* pointer);\"\r\t<cdecl: void 'glIndexPointerEXT' (ulong long long void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIndexd: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexd(GLdouble c);\"\r\t<cdecl: void 'glIndexd' (double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIndexdv: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexdv(GLdouble* c);\"\r\t<cdecl: void 'glIndexdv' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIndexf: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexf(GLfloat c);\"\r\t<cdecl: void 'glIndexf' (float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIndexfv: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexfv(GLfloat* c);\"\r\t<cdecl: void 'glIndexfv' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIndexi: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexi(GLint c);\"\r\t<cdecl: void 'glIndexi' (long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIndexiv: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexiv(GLint* c);\"\r\t<cdecl: void 'glIndexiv' (long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIndexs: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexs(GLshort c);\"\r\t<cdecl: void 'glIndexs' (short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIndexsv: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexsv(GLshort* c);\"\r\t<cdecl: void 'glIndexsv' (short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIndexub: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexub(GLubyte c);\"\r\t<cdecl: void 'glIndexub' (byte) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIndexubv: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexubv(GLubyte* c);\"\r\t<cdecl: void 'glIndexubv' (byte*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglInitNames\r\t\"This method was automatically generated.\"\r\t\"void glInitNames();\"\r\t<cdecl: void 'glInitNames' (void) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglInterleavedArrays: format with: stride with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glInterleavedArrays(GLenum format, GLsizei stride, GLvoid* pointer);\"\r\t<cdecl: void 'glInterleavedArrays' (ulong long void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIsEnabled: cap\r\t\"This method was automatically generated.\"\r\t\"GLboolean glIsEnabled(GLenum cap);\"\r\t<cdecl: bool 'glIsEnabled' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIsList: list\r\t\"This method was automatically generated.\"\r\t\"GLboolean glIsList(GLuint list);\"\r\t<cdecl: bool 'glIsList' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIsTexture: texture\r\t\"This method was automatically generated.\"\r\t\"GLboolean glIsTexture(GLuint texture);\"\r\t<cdecl: bool 'glIsTexture' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIsTextureEXT: texture\r\t\"This method was automatically generated.\"\r\t\"GLboolean glIsTextureEXT(GLuint texture);\"\r\t<cdecl: bool 'glIsTextureEXT' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglLightModelf: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glLightModelf(GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glLightModelf' (ulong float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglLightModelfv: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glLightModelfv(GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glLightModelfv' (ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglLightModeli: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glLightModeli(GLenum pname, GLint param);\"\r\t<cdecl: void 'glLightModeli' (ulong long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglLightModeliv: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glLightModeliv(GLenum pname, GLint* params);\"\r\t<cdecl: void 'glLightModeliv' (ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglLightf: light with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glLightf(GLenum light, GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glLightf' (ulong ulong float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglLightfv: light with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glLightfv(GLenum light, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glLightfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglLighti: light with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glLighti(GLenum light, GLenum pname, GLint param);\"\r\t<cdecl: void 'glLighti' (ulong ulong long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglLightiv: light with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glLightiv(GLenum light, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glLightiv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglLineStipple: factor with: pattern\r\t\"This method was automatically generated.\"\r\t\"void glLineStipple(GLint factor, GLushort pattern);\"\r\t<cdecl: void 'glLineStipple' (long ushort) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglLineWidth: width\r\t\"This method was automatically generated.\"\r\t\"void glLineWidth(GLfloat width);\"\r\t<cdecl: void 'glLineWidth' (float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglListBase: base\r\t\"This method was automatically generated.\"\r\t\"void glListBase(GLuint base);\"\r\t<cdecl: void 'glListBase' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglLoadIdentity\r\t\"This method was automatically generated.\"\r\t\"void glLoadIdentity();\"\r\t<cdecl: void 'glLoadIdentity' (void) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglLoadMatrixd: m\r\t\"This method was automatically generated.\"\r\t\"void glLoadMatrixd(GLdouble* m);\"\r\t<cdecl: void 'glLoadMatrixd' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglLoadMatrixf: m\r\t\"This method was automatically generated.\"\r\t\"void glLoadMatrixf(GLfloat* m);\"\r\t<cdecl: void 'glLoadMatrixf' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglLoadName: name\r\t\"This method was automatically generated.\"\r\t\"void glLoadName(GLuint name);\"\r\t<cdecl: void 'glLoadName' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglLockArraysEXT: first with: count\r\t\"This method was automatically generated.\"\r\t\"void glLockArraysEXT(GLint first, GLsizei count);\"\r\t<cdecl: void 'glLockArraysEXT' (long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglLogicOp: opcode\r\t\"This method was automatically generated.\"\r\t\"void glLogicOp(GLenum opcode);\"\r\t<cdecl: void 'glLogicOp' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMap1d: target with: u1 with: u2 with: stride with: order with: points\r\t\"This method was automatically generated.\"\r\t\"void glMap1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, GLdouble* points);\"\r\t<cdecl: void 'glMap1d' (ulong double double long long double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMap1f: target with: u1 with: u2 with: stride with: order with: points\r\t\"This method was automatically generated.\"\r\t\"void glMap1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, GLfloat* points);\"\r\t<cdecl: void 'glMap1f' (ulong float float long long float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMap2d: target with: u1 with: u2 with: ustride with: uorder with: v1 with: v2 with: vstride with: vorder with: points\r\t\"This method was automatically generated.\"\r\t\"void glMap2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble* points);\"\r\t<cdecl: void 'glMap2d' (ulong double double long long double double long long double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMap2f: target with: u1 with: u2 with: ustride with: uorder with: v1 with: v2 with: vstride with: vorder with: points\r\t\"This method was automatically generated.\"\r\t\"void glMap2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat* points);\"\r\t<cdecl: void 'glMap2f' (ulong float float long long float float long long float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMapGrid1d: un with: u1 with: u2\r\t\"This method was automatically generated.\"\r\t\"void glMapGrid1d(GLint un, GLdouble u1, GLdouble u2);\"\r\t<cdecl: void 'glMapGrid1d' (long double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMapGrid1f: un with: u1 with: u2\r\t\"This method was automatically generated.\"\r\t\"void glMapGrid1f(GLint un, GLfloat u1, GLfloat u2);\"\r\t<cdecl: void 'glMapGrid1f' (long float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMapGrid2d: un with: u1 with: u2 with: vn with: v1 with: v2\r\t\"This method was automatically generated.\"\r\t\"void glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);\"\r\t<cdecl: void 'glMapGrid2d' (long double double long double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMapGrid2f: un with: u1 with: u2 with: vn with: v1 with: v2\r\t\"This method was automatically generated.\"\r\t\"void glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);\"\r\t<cdecl: void 'glMapGrid2f' (long float float long float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMaterialf: face with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glMaterialf(GLenum face, GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glMaterialf' (ulong ulong float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMaterialfv: face with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glMaterialfv(GLenum face, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glMaterialfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMateriali: face with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glMateriali(GLenum face, GLenum pname, GLint param);\"\r\t<cdecl: void 'glMateriali' (ulong ulong long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMaterialiv: face with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glMaterialiv(GLenum face, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glMaterialiv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMatrixMode: mode\r\t\"This method was automatically generated.\"\r\t\"void glMatrixMode(GLenum mode);\"\r\t<cdecl: void 'glMatrixMode' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMinmax: target with: internalformat with: sink\r\t\"This method was automatically generated.\"\r\t\"void glMinmax(GLenum target, GLenum internalformat, GLboolean sink);\"\r\t<cdecl: void 'glMinmax' (ulong ulong bool) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultMatrixd: m\r\t\"This method was automatically generated.\"\r\t\"void glMultMatrixd(GLdouble* m);\"\r\t<cdecl: void 'glMultMatrixd' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultMatrixf: m\r\t\"This method was automatically generated.\"\r\t\"void glMultMatrixf(GLfloat* m);\"\r\t<cdecl: void 'glMultMatrixf' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord1dARB: target with: s\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord1dARB(GLenum target, GLdouble s);\"\r\t<cdecl: void 'glMultiTexCoord1dARB' (ulong double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord1dvARB: target with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord1dvARB(GLenum target, GLdouble* v);\"\r\t<cdecl: void 'glMultiTexCoord1dvARB' (ulong double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord1fARB: target with: s\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord1fARB(GLenum target, GLfloat s);\"\r\t<cdecl: void 'glMultiTexCoord1fARB' (ulong float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord1fvARB: target with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord1fvARB(GLenum target, GLfloat* v);\"\r\t<cdecl: void 'glMultiTexCoord1fvARB' (ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord1iARB: target with: s\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord1iARB(GLenum target, GLint s);\"\r\t<cdecl: void 'glMultiTexCoord1iARB' (ulong long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord1ivARB: target with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord1ivARB(GLenum target, GLint* v);\"\r\t<cdecl: void 'glMultiTexCoord1ivARB' (ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord1sARB: target with: s\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord1sARB(GLenum target, GLshort s);\"\r\t<cdecl: void 'glMultiTexCoord1sARB' (ulong short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord1svARB: target with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord1svARB(GLenum target, GLshort* v);\"\r\t<cdecl: void 'glMultiTexCoord1svARB' (ulong short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord2dARB: target with: s with: t\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t);\"\r\t<cdecl: void 'glMultiTexCoord2dARB' (ulong double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord2dvARB: target with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord2dvARB(GLenum target, GLdouble* v);\"\r\t<cdecl: void 'glMultiTexCoord2dvARB' (ulong double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord2fARB: target with: s with: t\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t);\"\r\t<cdecl: void 'glMultiTexCoord2fARB' (ulong float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord2fvARB: target with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord2fvARB(GLenum target, GLfloat* v);\"\r\t<cdecl: void 'glMultiTexCoord2fvARB' (ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord2iARB: target with: s with: t\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord2iARB(GLenum target, GLint s, GLint t);\"\r\t<cdecl: void 'glMultiTexCoord2iARB' (ulong long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord2ivARB: target with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord2ivARB(GLenum target, GLint* v);\"\r\t<cdecl: void 'glMultiTexCoord2ivARB' (ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord2sARB: target with: s with: t\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t);\"\r\t<cdecl: void 'glMultiTexCoord2sARB' (ulong short short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord2svARB: target with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord2svARB(GLenum target, GLshort* v);\"\r\t<cdecl: void 'glMultiTexCoord2svARB' (ulong short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord3dARB: target with: s with: t with: r\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r);\"\r\t<cdecl: void 'glMultiTexCoord3dARB' (ulong double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord3dvARB: target with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord3dvARB(GLenum target, GLdouble* v);\"\r\t<cdecl: void 'glMultiTexCoord3dvARB' (ulong double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord3fARB: target with: s with: t with: r\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r);\"\r\t<cdecl: void 'glMultiTexCoord3fARB' (ulong float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord3fvARB: target with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord3fvARB(GLenum target, GLfloat* v);\"\r\t<cdecl: void 'glMultiTexCoord3fvARB' (ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord3iARB: target with: s with: t with: r\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r);\"\r\t<cdecl: void 'glMultiTexCoord3iARB' (ulong long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord3ivARB: target with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord3ivARB(GLenum target, GLint* v);\"\r\t<cdecl: void 'glMultiTexCoord3ivARB' (ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord3sARB: target with: s with: t with: r\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r);\"\r\t<cdecl: void 'glMultiTexCoord3sARB' (ulong short short short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord3svARB: target with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord3svARB(GLenum target, GLshort* v);\"\r\t<cdecl: void 'glMultiTexCoord3svARB' (ulong short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord4dARB: target with: s with: t with: r with: q\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);\"\r\t<cdecl: void 'glMultiTexCoord4dARB' (ulong double double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord4dvARB: target with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord4dvARB(GLenum target, GLdouble* v);\"\r\t<cdecl: void 'glMultiTexCoord4dvARB' (ulong double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord4fARB: target with: s with: t with: r with: q\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);\"\r\t<cdecl: void 'glMultiTexCoord4fARB' (ulong float float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord4fvARB: target with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord4fvARB(GLenum target, GLfloat* v);\"\r\t<cdecl: void 'glMultiTexCoord4fvARB' (ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord4iARB: target with: s with: t with: r with: q\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q);\"\r\t<cdecl: void 'glMultiTexCoord4iARB' (ulong long long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord4ivARB: target with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord4ivARB(GLenum target, GLint* v);\"\r\t<cdecl: void 'glMultiTexCoord4ivARB' (ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord4sARB: target with: s with: t with: r with: q\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);\"\r\t<cdecl: void 'glMultiTexCoord4sARB' (ulong short short short short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord4svARB: target with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord4svARB(GLenum target, GLshort* v);\"\r\t<cdecl: void 'glMultiTexCoord4svARB' (ulong short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglNewList: list with: mode\r\t\"This method was automatically generated.\"\r\t\"void glNewList(GLuint list, GLenum mode);\"\r\t<cdecl: void 'glNewList' (ulong ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglNormal3b: nx with: ny with: nz\r\t\"This method was automatically generated.\"\r\t\"void glNormal3b(GLbyte nx, GLbyte ny, GLbyte nz);\"\r\t<cdecl: void 'glNormal3b' (byte byte byte) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglNormal3bv: v\r\t\"This method was automatically generated.\"\r\t\"void glNormal3bv(GLbyte* v);\"\r\t<cdecl: void 'glNormal3bv' (byte*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglNormal3d: nx with: ny with: nz\r\t\"This method was automatically generated.\"\r\t\"void glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz);\"\r\t<cdecl: void 'glNormal3d' (double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglNormal3dv: v\r\t\"This method was automatically generated.\"\r\t\"void glNormal3dv(GLdouble* v);\"\r\t<cdecl: void 'glNormal3dv' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglNormal3f: nx with: ny with: nz\r\t\"This method was automatically generated.\"\r\t\"void glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz);\"\r\t<cdecl: void 'glNormal3f' (float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglNormal3fv: v\r\t\"This method was automatically generated.\"\r\t\"void glNormal3fv(GLfloat* v);\"\r\t<cdecl: void 'glNormal3fv' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglNormal3i: nx with: ny with: nz\r\t\"This method was automatically generated.\"\r\t\"void glNormal3i(GLint nx, GLint ny, GLint nz);\"\r\t<cdecl: void 'glNormal3i' (long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglNormal3iv: v\r\t\"This method was automatically generated.\"\r\t\"void glNormal3iv(GLint* v);\"\r\t<cdecl: void 'glNormal3iv' (long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglNormal3s: nx with: ny with: nz\r\t\"This method was automatically generated.\"\r\t\"void glNormal3s(GLshort nx, GLshort ny, GLshort nz);\"\r\t<cdecl: void 'glNormal3s' (short short short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglNormal3sv: v\r\t\"This method was automatically generated.\"\r\t\"void glNormal3sv(GLshort* v);\"\r\t<cdecl: void 'glNormal3sv' (short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglNormalPointer: type with: stride with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glNormalPointer(GLenum type, GLsizei stride, GLvoid* pointer);\"\r\t<cdecl: void 'glNormalPointer' (ulong long void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglNormalPointerEXT: type with: stride with: count with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glNormalPointerEXT(GLenum type, GLsizei stride, GLsizei count, GLvoid* pointer);\"\r\t<cdecl: void 'glNormalPointerEXT' (ulong long long void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglOrtho: left with: right with: bottom with: top with: zNear with: zFar\r\t\"This method was automatically generated.\"\r\t\"void glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);\"\r\t<cdecl: void 'glOrtho' (double double double double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPassThrough: token\r\t\"This method was automatically generated.\"\r\t\"void glPassThrough(GLfloat token);\"\r\t<cdecl: void 'glPassThrough' (float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPixelMapfv: map with: mapsize with: values\r\t\"This method was automatically generated.\"\r\t\"void glPixelMapfv(GLenum map, GLint mapsize, GLfloat* values);\"\r\t<cdecl: void 'glPixelMapfv' (ulong long float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPixelMapuiv: map with: mapsize with: values\r\t\"This method was automatically generated.\"\r\t\"void glPixelMapuiv(GLenum map, GLint mapsize, GLuint* values);\"\r\t<cdecl: void 'glPixelMapuiv' (ulong long ulong*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPixelMapusv: map with: mapsize with: values\r\t\"This method was automatically generated.\"\r\t\"void glPixelMapusv(GLenum map, GLint mapsize, GLushort* values);\"\r\t<cdecl: void 'glPixelMapusv' (ulong long ushort*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPixelStoref: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glPixelStoref(GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glPixelStoref' (ulong float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPixelStorei: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glPixelStorei(GLenum pname, GLint param);\"\r\t<cdecl: void 'glPixelStorei' (ulong long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPixelTransferf: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glPixelTransferf(GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glPixelTransferf' (ulong float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPixelTransferi: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glPixelTransferi(GLenum pname, GLint param);\"\r\t<cdecl: void 'glPixelTransferi' (ulong long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPixelZoom: xfactor with: yfactor\r\t\"This method was automatically generated.\"\r\t\"void glPixelZoom(GLfloat xfactor, GLfloat yfactor);\"\r\t<cdecl: void 'glPixelZoom' (float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPointSize: size\r\t\"This method was automatically generated.\"\r\t\"void glPointSize(GLfloat size);\"\r\t<cdecl: void 'glPointSize' (float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPolygonMode: face with: mode\r\t\"This method was automatically generated.\"\r\t\"void glPolygonMode(GLenum face, GLenum mode);\"\r\t<cdecl: void 'glPolygonMode' (ulong ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPolygonOffset: factor with: units\r\t\"This method was automatically generated.\"\r\t\"void glPolygonOffset(GLfloat factor, GLfloat units);\"\r\t<cdecl: void 'glPolygonOffset' (float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPolygonStipple: mask\r\t\"This method was automatically generated.\"\r\t\"void glPolygonStipple(GLubyte* mask);\"\r\t<cdecl: void 'glPolygonStipple' (byte*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPopAttrib\r\t\"This method was automatically generated.\"\r\t\"void glPopAttrib();\"\r\t<cdecl: void 'glPopAttrib' (void) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPopClientAttrib\r\t\"This method was automatically generated.\"\r\t\"void glPopClientAttrib();\"\r\t<cdecl: void 'glPopClientAttrib' (void) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPopMatrix\r\t\"This method was automatically generated.\"\r\t\"void glPopMatrix();\"\r\t<cdecl: void 'glPopMatrix' (void) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPopName\r\t\"This method was automatically generated.\"\r\t\"void glPopName();\"\r\t<cdecl: void 'glPopName' (void) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPrioritizeTextures: n with: textures with: priorities\r\t\"This method was automatically generated.\"\r\t\"void glPrioritizeTextures(GLsizei n, GLuint* textures, GLclampf* priorities);\"\r\t<cdecl: void 'glPrioritizeTextures' (long ulong* float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPushAttrib: mask\r\t\"This method was automatically generated.\"\r\t\"void glPushAttrib(GLbitfield mask);\"\r\t<cdecl: void 'glPushAttrib' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPushClientAttrib: mask\r\t\"This method was automatically generated.\"\r\t\"void glPushClientAttrib(GLbitfield mask);\"\r\t<cdecl: void 'glPushClientAttrib' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPushMatrix\r\t\"This method was automatically generated.\"\r\t\"void glPushMatrix();\"\r\t<cdecl: void 'glPushMatrix' (void) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPushName: name\r\t\"This method was automatically generated.\"\r\t\"void glPushName(GLuint name);\"\r\t<cdecl: void 'glPushName' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos2d: x with: y\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos2d(GLdouble x, GLdouble y);\"\r\t<cdecl: void 'glRasterPos2d' (double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos2dv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos2dv(GLdouble* v);\"\r\t<cdecl: void 'glRasterPos2dv' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos2f: x with: y\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos2f(GLfloat x, GLfloat y);\"\r\t<cdecl: void 'glRasterPos2f' (float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos2fv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos2fv(GLfloat* v);\"\r\t<cdecl: void 'glRasterPos2fv' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos2i: x with: y\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos2i(GLint x, GLint y);\"\r\t<cdecl: void 'glRasterPos2i' (long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos2iv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos2iv(GLint* v);\"\r\t<cdecl: void 'glRasterPos2iv' (long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos2s: x with: y\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos2s(GLshort x, GLshort y);\"\r\t<cdecl: void 'glRasterPos2s' (short short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos2sv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos2sv(GLshort* v);\"\r\t<cdecl: void 'glRasterPos2sv' (short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos3d: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos3d(GLdouble x, GLdouble y, GLdouble z);\"\r\t<cdecl: void 'glRasterPos3d' (double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos3dv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos3dv(GLdouble* v);\"\r\t<cdecl: void 'glRasterPos3dv' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos3f: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos3f(GLfloat x, GLfloat y, GLfloat z);\"\r\t<cdecl: void 'glRasterPos3f' (float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos3fv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos3fv(GLfloat* v);\"\r\t<cdecl: void 'glRasterPos3fv' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos3i: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos3i(GLint x, GLint y, GLint z);\"\r\t<cdecl: void 'glRasterPos3i' (long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos3iv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos3iv(GLint* v);\"\r\t<cdecl: void 'glRasterPos3iv' (long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos3s: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos3s(GLshort x, GLshort y, GLshort z);\"\r\t<cdecl: void 'glRasterPos3s' (short short short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos3sv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos3sv(GLshort* v);\"\r\t<cdecl: void 'glRasterPos3sv' (short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos4d: x with: y with: z with: w\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w);\"\r\t<cdecl: void 'glRasterPos4d' (double double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos4dv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos4dv(GLdouble* v);\"\r\t<cdecl: void 'glRasterPos4dv' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos4f: x with: y with: z with: w\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w);\"\r\t<cdecl: void 'glRasterPos4f' (float float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos4fv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos4fv(GLfloat* v);\"\r\t<cdecl: void 'glRasterPos4fv' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos4i: x with: y with: z with: w\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos4i(GLint x, GLint y, GLint z, GLint w);\"\r\t<cdecl: void 'glRasterPos4i' (long long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos4iv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos4iv(GLint* v);\"\r\t<cdecl: void 'glRasterPos4iv' (long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos4s: x with: y with: z with: w\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w);\"\r\t<cdecl: void 'glRasterPos4s' (short short short short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos4sv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos4sv(GLshort* v);\"\r\t<cdecl: void 'glRasterPos4sv' (short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglReadBuffer: mode\r\t\"This method was automatically generated.\"\r\t\"void glReadBuffer(GLenum mode);\"\r\t<cdecl: void 'glReadBuffer' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglReadPixels: x with: y with: width with: height with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glReadPixels' (long long long long ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRectd: x1 with: y1 with: x2 with: y2\r\t\"This method was automatically generated.\"\r\t\"void glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);\"\r\t<cdecl: void 'glRectd' (double double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRectdv: v1 with: v2\r\t\"This method was automatically generated.\"\r\t\"void glRectdv(GLdouble* v1, GLdouble* v2);\"\r\t<cdecl: void 'glRectdv' (double* double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRectf: x1 with: y1 with: x2 with: y2\r\t\"This method was automatically generated.\"\r\t\"void glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);\"\r\t<cdecl: void 'glRectf' (float float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRectfv: v1 with: v2\r\t\"This method was automatically generated.\"\r\t\"void glRectfv(GLfloat* v1, GLfloat* v2);\"\r\t<cdecl: void 'glRectfv' (float* float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRecti: x1 with: y1 with: x2 with: y2\r\t\"This method was automatically generated.\"\r\t\"void glRecti(GLint x1, GLint y1, GLint x2, GLint y2);\"\r\t<cdecl: void 'glRecti' (long long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRectiv: v1 with: v2\r\t\"This method was automatically generated.\"\r\t\"void glRectiv(GLint* v1, GLint* v2);\"\r\t<cdecl: void 'glRectiv' (long* long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRects: x1 with: y1 with: x2 with: y2\r\t\"This method was automatically generated.\"\r\t\"void glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2);\"\r\t<cdecl: void 'glRects' (short short short short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRectsv: v1 with: v2\r\t\"This method was automatically generated.\"\r\t\"void glRectsv(GLshort* v1, GLshort* v2);\"\r\t<cdecl: void 'glRectsv' (short* short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRenderMode: mode\r\t\"This method was automatically generated.\"\r\t\"GLint glRenderMode(GLenum mode);\"\r\t<cdecl: long 'glRenderMode' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglResetHistogram: target\r\t\"This method was automatically generated.\"\r\t\"void glResetHistogram(GLenum target);\"\r\t<cdecl: void 'glResetHistogram' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglResetMinmax: target\r\t\"This method was automatically generated.\"\r\t\"void glResetMinmax(GLenum target);\"\r\t<cdecl: void 'glResetMinmax' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRotated: angle with: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);\"\r\t<cdecl: void 'glRotated' (double double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRotatef: angle with: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);\"\r\t<cdecl: void 'glRotatef' (float float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglScaled: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glScaled(GLdouble x, GLdouble y, GLdouble z);\"\r\t<cdecl: void 'glScaled' (double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglScalef: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glScalef(GLfloat x, GLfloat y, GLfloat z);\"\r\t<cdecl: void 'glScalef' (float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglScissor: x with: y with: width with: height\r\t\"This method was automatically generated.\"\r\t\"void glScissor(GLint x, GLint y, GLsizei width, GLsizei height);\"\r\t<cdecl: void 'glScissor' (long long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglSelectBuffer: size with: buffer\r\t\"This method was automatically generated.\"\r\t\"void glSelectBuffer(GLsizei size, GLuint* buffer);\"\r\t<cdecl: void 'glSelectBuffer' (long ulong*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglSeparableFilter2D: target with: internalformat with: width with: height with: format with: type with: row with: column\r\t\"This method was automatically generated.\"\r\t\"void glSeparableFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* row, GLvoid* column);\"\r\t<cdecl: void 'glSeparableFilter2D' (ulong ulong long long ulong ulong void* void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglShadeModel: mode\r\t\"This method was automatically generated.\"\r\t\"void glShadeModel(GLenum mode);\"\r\t<cdecl: void 'glShadeModel' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglStencilFunc: func with: ref with: mask\r\t\"This method was automatically generated.\"\r\t\"void glStencilFunc(GLenum func, GLint ref, GLuint mask);\"\r\t<cdecl: void 'glStencilFunc' (ulong long ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglStencilMask: mask\r\t\"This method was automatically generated.\"\r\t\"void glStencilMask(GLuint mask);\"\r\t<cdecl: void 'glStencilMask' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglStencilOp: fail with: zfail with: zpass\r\t\"This method was automatically generated.\"\r\t\"void glStencilOp(GLenum fail, GLenum zfail, GLenum zpass);\"\r\t<cdecl: void 'glStencilOp' (ulong ulong ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord1d: s\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord1d(GLdouble s);\"\r\t<cdecl: void 'glTexCoord1d' (double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord1dv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord1dv(GLdouble* v);\"\r\t<cdecl: void 'glTexCoord1dv' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord1f: s\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord1f(GLfloat s);\"\r\t<cdecl: void 'glTexCoord1f' (float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord1fv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord1fv(GLfloat* v);\"\r\t<cdecl: void 'glTexCoord1fv' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord1i: s\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord1i(GLint s);\"\r\t<cdecl: void 'glTexCoord1i' (long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord1iv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord1iv(GLint* v);\"\r\t<cdecl: void 'glTexCoord1iv' (long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord1s: s\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord1s(GLshort s);\"\r\t<cdecl: void 'glTexCoord1s' (short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord1sv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord1sv(GLshort* v);\"\r\t<cdecl: void 'glTexCoord1sv' (short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord2d: s with: t\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord2d(GLdouble s, GLdouble t);\"\r\t<cdecl: void 'glTexCoord2d' (double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord2dv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord2dv(GLdouble* v);\"\r\t<cdecl: void 'glTexCoord2dv' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord2f: s with: t\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord2f(GLfloat s, GLfloat t);\"\r\t<cdecl: void 'glTexCoord2f' (float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord2fv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord2fv(GLfloat* v);\"\r\t<cdecl: void 'glTexCoord2fv' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord2i: s with: t\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord2i(GLint s, GLint t);\"\r\t<cdecl: void 'glTexCoord2i' (long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord2iv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord2iv(GLint* v);\"\r\t<cdecl: void 'glTexCoord2iv' (long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord2s: s with: t\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord2s(GLshort s, GLshort t);\"\r\t<cdecl: void 'glTexCoord2s' (short short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord2sv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord2sv(GLshort* v);\"\r\t<cdecl: void 'glTexCoord2sv' (short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord3d: s with: t with: r\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord3d(GLdouble s, GLdouble t, GLdouble r);\"\r\t<cdecl: void 'glTexCoord3d' (double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord3dv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord3dv(GLdouble* v);\"\r\t<cdecl: void 'glTexCoord3dv' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord3f: s with: t with: r\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord3f(GLfloat s, GLfloat t, GLfloat r);\"\r\t<cdecl: void 'glTexCoord3f' (float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord3fv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord3fv(GLfloat* v);\"\r\t<cdecl: void 'glTexCoord3fv' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord3i: s with: t with: r\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord3i(GLint s, GLint t, GLint r);\"\r\t<cdecl: void 'glTexCoord3i' (long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord3iv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord3iv(GLint* v);\"\r\t<cdecl: void 'glTexCoord3iv' (long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord3s: s with: t with: r\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord3s(GLshort s, GLshort t, GLshort r);\"\r\t<cdecl: void 'glTexCoord3s' (short short short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord3sv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord3sv(GLshort* v);\"\r\t<cdecl: void 'glTexCoord3sv' (short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord4d: s with: t with: r with: q\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q);\"\r\t<cdecl: void 'glTexCoord4d' (double double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord4dv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord4dv(GLdouble* v);\"\r\t<cdecl: void 'glTexCoord4dv' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord4f: s with: t with: r with: q\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q);\"\r\t<cdecl: void 'glTexCoord4f' (float float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord4fv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord4fv(GLfloat* v);\"\r\t<cdecl: void 'glTexCoord4fv' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord4i: s with: t with: r with: q\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord4i(GLint s, GLint t, GLint r, GLint q);\"\r\t<cdecl: void 'glTexCoord4i' (long long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord4iv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord4iv(GLint* v);\"\r\t<cdecl: void 'glTexCoord4iv' (long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord4s: s with: t with: r with: q\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q);\"\r\t<cdecl: void 'glTexCoord4s' (short short short short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord4sv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord4sv(GLshort* v);\"\r\t<cdecl: void 'glTexCoord4sv' (short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoordPointer: size with: type with: stride with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glTexCoordPointer(GLint size, GLenum type, GLsizei stride, GLvoid* pointer);\"\r\t<cdecl: void 'glTexCoordPointer' (long ulong long void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoordPointerEXT: size with: type with: stride with: count with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glTexCoordPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid* pointer);\"\r\t<cdecl: void 'glTexCoordPointerEXT' (long ulong long long void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexEnvf: target with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glTexEnvf(GLenum target, GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glTexEnvf' (ulong ulong float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexEnvfv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glTexEnvfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glTexEnvfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexEnvi: target with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glTexEnvi(GLenum target, GLenum pname, GLint param);\"\r\t<cdecl: void 'glTexEnvi' (ulong ulong long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexEnviv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glTexEnviv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glTexEnviv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexGend: coord with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glTexGend(GLenum coord, GLenum pname, GLdouble param);\"\r\t<cdecl: void 'glTexGend' (ulong ulong double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexGendv: coord with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glTexGendv(GLenum coord, GLenum pname, GLdouble* params);\"\r\t<cdecl: void 'glTexGendv' (ulong ulong double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexGenf: coord with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glTexGenf(GLenum coord, GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glTexGenf' (ulong ulong float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexGenfv: coord with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glTexGenfv(GLenum coord, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glTexGenfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexGeni: coord with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glTexGeni(GLenum coord, GLenum pname, GLint param);\"\r\t<cdecl: void 'glTexGeni' (ulong ulong long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexGeniv: coord with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glTexGeniv(GLenum coord, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glTexGeniv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexImage1D: target with: level with: internalformat with: width with: border with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glTexImage1D' (ulong long long long long ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexImage2D: target with: level with: internalformat with: width with: height with: border with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glTexImage2D' (ulong long long long long long ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexImage3D: target with: level with: internalformat with: width with: height with: depth with: border with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glTexImage3D' (ulong long ulong long long long long ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexParameterf: target with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glTexParameterf(GLenum target, GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glTexParameterf' (ulong ulong float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexParameterfv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glTexParameterfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glTexParameterfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexParameteri: target with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glTexParameteri(GLenum target, GLenum pname, GLint param);\"\r\t<cdecl: void 'glTexParameteri' (ulong ulong long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexParameteriv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glTexParameteriv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glTexParameteriv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexSubImage1D: target with: level with: xoffset with: width with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glTexSubImage1D' (ulong long long long ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexSubImage2D: target with: level with: xoffset with: yoffset with: width with: height with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glTexSubImage2D' (ulong long long long long long ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexSubImage3D: target with: level with: xoffset with: yoffset with: zoffset with: width with: height with: depth with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glTexSubImage3D' (ulong long long long long long long long ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTranslated: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glTranslated(GLdouble x, GLdouble y, GLdouble z);\"\r\t<cdecl: void 'glTranslated' (double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTranslatef: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glTranslatef(GLfloat x, GLfloat y, GLfloat z);\"\r\t<cdecl: void 'glTranslatef' (float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglUnlockArraysEXT\r\t\"This method was automatically generated.\"\r\t\"void glUnlockArraysEXT();\"\r\t<cdecl: void 'glUnlockArraysEXT' (void) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex2d: x with: y\r\t\"This method was automatically generated.\"\r\t\"void glVertex2d(GLdouble x, GLdouble y);\"\r\t<cdecl: void 'glVertex2d' (double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex2dv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex2dv(GLdouble* v);\"\r\t<cdecl: void 'glVertex2dv' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex2f: x with: y\r\t\"This method was automatically generated.\"\r\t\"void glVertex2f(GLfloat x, GLfloat y);\"\r\t<cdecl: void 'glVertex2f' (float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex2fv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex2fv(GLfloat* v);\"\r\t<cdecl: void 'glVertex2fv' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex2i: x with: y\r\t\"This method was automatically generated.\"\r\t\"void glVertex2i(GLint x, GLint y);\"\r\t<cdecl: void 'glVertex2i' (long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex2iv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex2iv(GLint* v);\"\r\t<cdecl: void 'glVertex2iv' (long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex2s: x with: y\r\t\"This method was automatically generated.\"\r\t\"void glVertex2s(GLshort x, GLshort y);\"\r\t<cdecl: void 'glVertex2s' (short short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex2sv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex2sv(GLshort* v);\"\r\t<cdecl: void 'glVertex2sv' (short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex3d: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glVertex3d(GLdouble x, GLdouble y, GLdouble z);\"\r\t<cdecl: void 'glVertex3d' (double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex3dv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex3dv(GLdouble* v);\"\r\t<cdecl: void 'glVertex3dv' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex3f: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glVertex3f(GLfloat x, GLfloat y, GLfloat z);\"\r\t<cdecl: void 'glVertex3f' (float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex3fv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex3fv(GLfloat* v);\"\r\t<cdecl: void 'glVertex3fv' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex3i: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glVertex3i(GLint x, GLint y, GLint z);\"\r\t<cdecl: void 'glVertex3i' (long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex3iv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex3iv(GLint* v);\"\r\t<cdecl: void 'glVertex3iv' (long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex3s: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glVertex3s(GLshort x, GLshort y, GLshort z);\"\r\t<cdecl: void 'glVertex3s' (short short short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex3sv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex3sv(GLshort* v);\"\r\t<cdecl: void 'glVertex3sv' (short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex4d: x with: y with: z with: w\r\t\"This method was automatically generated.\"\r\t\"void glVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w);\"\r\t<cdecl: void 'glVertex4d' (double double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex4dv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex4dv(GLdouble* v);\"\r\t<cdecl: void 'glVertex4dv' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex4f: x with: y with: z with: w\r\t\"This method was automatically generated.\"\r\t\"void glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w);\"\r\t<cdecl: void 'glVertex4f' (float float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex4fv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex4fv(GLfloat* v);\"\r\t<cdecl: void 'glVertex4fv' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex4i: x with: y with: z with: w\r\t\"This method was automatically generated.\"\r\t\"void glVertex4i(GLint x, GLint y, GLint z, GLint w);\"\r\t<cdecl: void 'glVertex4i' (long long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex4iv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex4iv(GLint* v);\"\r\t<cdecl: void 'glVertex4iv' (long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex4s: x with: y with: z with: w\r\t\"This method was automatically generated.\"\r\t\"void glVertex4s(GLshort x, GLshort y, GLshort z, GLshort w);\"\r\t<cdecl: void 'glVertex4s' (short short short short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex4sv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex4sv(GLshort* v);\"\r\t<cdecl: void 'glVertex4sv' (short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertexPointer: size with: type with: stride with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glVertexPointer(GLint size, GLenum type, GLsizei stride, GLvoid* pointer);\"\r\t<cdecl: void 'glVertexPointer' (long ulong long void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertexPointerEXT: size with: type with: stride with: count with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glVertexPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid* pointer);\"\r\t<cdecl: void 'glVertexPointerEXT' (long ulong long long void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglViewport: x with: y with: width with: height\r\t\"This method was automatically generated.\"\r\t\"void glViewport(GLint x, GLint y, GLsizei width, GLsizei height);\"\r\t<cdecl: void 'glViewport' (long long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r\r!GLXUnixX11LE methodsFor: 'intitialize' stamp: 'ikp 2/3/2003 17:00'!\rbeginFrame\r\tsuper beginFrame.\r\tself glPixelStorei: GLUnpackLsbFirst with: 0.\r! !\r\r!GLXUnixX11LE methodsFor: 'accessing' stamp: 'ikp 2/3/2003 17:01'!\rimagePixelType32\r\t^GLUnsignedByte! !\r\r!GLXUnixX11LE methodsFor: 'accessing' stamp: 'ikp 2/3/2003 17:02'!\rtexturePixelType\r\t^GLUnsignedByte! !\r\r\r!SystemDictionary methodsFor: 'miscellaneous' stamp: 'ikp 2/3/2003 16:56'!\rwindowSystemName\t\t\t\"Smalltalk windowSystemName\"\r\r\t\"Answer the name of the window system currently being used for display.\"\r\t^self getSystemAttribute: 1005! !\r\r"
  },
  {
    "path": "vm/src/from_squeak/unix/misc/System-Tracing.2.cs",
    "content": "'From Squeak3.8gamma of ''24 November 2004'' [latest update: #6548] on 31 March 2005 at 11:00:30 am'!\r\"Change Set:\t\tSystem-Tracing\rDate:\t\t\t19 October 2004\rAuthor:\t\t\tAnthony Hannan, Stephen Pair, Dan Ingalls\r\rThis changeSet defines SystemTracer2 (ajh), a more flexible and reliable SystemTracer.  It also includes RehashingSystemTracer (svp) which allows changing identityHashes and SystemTracer64 (di) which will write 64-bit images.  If you find tracing to be unduly slow, locate and fileIn NoAssocDict-ajh for faster dictionary management.\"!\r\rStream subclass: #PositionableStream\r\tinstanceVariableNames: 'collection position readLimit '\r\tclassVariableNames: 'IntBuffer '\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Streams'!\rObject subclass: #SystemTracer2\r\tinstanceVariableNames: 'swapMap oopMap traceQueue byteStream nextChunk displayBox nilOop wordSize'\r\tclassVariableNames: 'LargeIdentityDict'\r\tpoolDictionaries: ''\r\tcategory: 'System-Tracing'!\r\r!SystemTracer2 commentStamp: '<historical>' prior: 0!\rThis is a rewrite of SystemTracer.  It makes it easier to convert images, although it requires more space.\r\rUse it by subclassing it and overriding desired methods in:\r\t'object relacement' to create replacement objects for desired objects (swapMap);\r\t'object encoding' to specify bit representation of objects;\r\t'clone startup' to initialize the new image on first startup.\r\rThe default is to trace and write the system in V3 image format.\r\rTo run the tracer do \"YourTracerSubclass writeImage: 'newImageFile.image'\".  The .changes file will be copied as well.  The tracer requires a lot of space to run since it is keeps an oopMap for every object in the system, and a swapMap for every object replacement.  And because these maps are very large and Squeak has a poor identityHash function, the tracer runs slowly.\r\r\rStructure:\r\r swapMap\tIdentityDictionary (oldObject -> newObject)\r\t\t\tWhen an object is visited, swapMap is checked to see if it has a replacement, and if so the new object is traced and written instead of the original.  You can add to the swapMap in initSwapMapPreShutdown or initSwapMapPostShutdown before tracing starts, or you can add to it during tracing in convert:pointer:field:.  The tracer automatically adds itself and the active process to swapMap so it own execution won't be traced (pvtWriteImageConverted).\r\r oopMap\tIdentityDictionary (object -> oop)\r\t\t\tMaps objects to their new oops.  The tracer checks this in case a visited object has already been reached.\r\r traceQueue  OrderedCollection (object)\r\t\t\tQueue of objects that have been reached by the tracer and assigned a new oop, but have not yet been written and traced themselves.  The image is traced by adding specialObjectArray to the queue, then repeatedly removing the first object and tracing it until the queue is empty.  An object is traced by adding all its field values (including the class field) that haven't already been reached (oopMap) to the queue.\r\r byteStream  FileStream\r\t\t\tThe target image file that gets written to during tracing.  Oops equal stream positions.\r\r nextChunk  Integer\r\t\t\tOop (minus header size) assigned to the next object reached by the tracer.\r\r displayBox  Rectangle\r\t\t\tBounds of Squeak window; written in image header.\r\r nilOop \t\tInteger\r\t\t\tOop of new nil object.  Need here since nil can't be added as a key to oopMap dictionary.\r\rClass Vars:\r\rLargeIdentityDict\tIdentityDictionary class\r\t\t\t\t\tThe tracer uses this class for its large maps, so link your favorite large dictionary class to this.\r!\r\rSystemTracer2 subclass: #RehashingSystemTracer\r\tinstanceVariableNames: 'lastHash hashMap'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Tracing'!\r\r!RehashingSystemTracer commentStamp: 'svp 8/23/2002 20:28' prior: 0!\rI am just like SystemTracer2, except that I write new identity hashes for objects.  I rehash some special sets (like MethodDictionaries) prior to writing the clone image, and the clone image will rehash all objects when it starts up.\r\n\r\nMy instance variables:\r\n\r\nlastHash - the lastHash that was assigned...I use the same algorithm to generate hashes as the VM\r\nhashMap - A dictionary of all assigned identity hashes \r\n\r\nSubclasses can extend me if they need to write new images with modified hash values.!\r\rSystemTracer2 subclass: #SystemTracer64\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'System-Tracing'!\r\r!SystemTracer64 commentStamp: '<historical>' prior: 0!\rThis variant of SystemTracer will write an image designed to be loaded and run on 64-bit machines.\r\rNote that this version does not do rehashing, in order that it can avoid the huge rehash at startup that takes forever in simulation.  It is intended that you do one write with SystemTracer2, and then an *identical* write with SystemTracer64.  Then you can write execution logs from the 32-bit version and use them to verify the 64-bit version.\r\rThis first pass attempts to make minimal changes to the Tracer framework, by simply padding most fields with 0 in the high 32 bits, and sign-extending the small integers.\r\rThe object header written is as follows...\r\tSqueak 3.8\t\t\t\t\t\t\t\t\t64-bit header\r\t3 bits\treserved for gc (mark, old, dirty)\tsame\r\t12 bits\tobject hash (for HashSets)\t\t\tsame\r\t5 bits\tcompact class index\t\t\t\t\tsame\r\t4 bits\tobject format\t\t\t\t\t\tsame\r\t6 bits\tobject size in 32-bit words\t\t\t5 bits\tobject size in 64-bit words\r\t\t\t\t\t\t\t\t\t\t\t\t1 bit\thigh bit of the 3-bit size residue; the\r\t\t\t\t\t\t\t\t\t\t\t\t\t\tlow 2 bits are in format as before\r\t2 bits\theader type (0: 3-word, 1: 2-word,\tsame\r\t\t\t\t\t\t2: forbidden, 3: 1-word)\r\rNote that as of this writing, the change for 64-bit modulus of bitmaps has not yet been made.\rWhile we would never want to live with this header format, it makes only one very local change:\r!\r\r\r!ProtoObject methodsFor: 'system primitives' stamp: 'ajh 7/12/2001 19:58'!\rbasicSize\r\t\"Primitive. Answer the number of indexable variables in the receiver. \r\tThis value is the same as the largest legal subscript. Essential. Do not \r\toverride in any subclass. See Object documentation whatIsAPrimitive.\"\r\r\t<primitive: 62>\r\t\"The number of indexable fields of fixed-length objects is 0\"\r\t^ 0! !\r\r!ProtoObject methodsFor: 'system tracing' stamp: 'ajh 4/3/2004 07:07'!\rforSystemTracer: swapMap\r\t\"May want to create a new object and add it to swapMap under self.  Be sure to check that self has not already been added to swapMap, since self may receive this message multiple times if it is referenced by multiple objects.  Return the new object that is to substitute for self, or self is there is no substitute.  It is ok for the substitute to have pointers to objects that still need to be converted.  They will be converted when the substitute is traced by the system tracer.  Alternatively, you can convert them right away by sending forSystemTracer: to them.\r\tIf you know only certain classes will be converted then it may be faster to override this method in subclasses that get converted and make this method just return self, but be sure you don't neglect objects that are added to the swapMap by the tracer itself (see references to swapMap in SystemTracer2)\"\r\r\t^ swapMap at: self ifAbsent: [self]! !\r\r!ProtoObject methodsFor: 'system tracing' stamp: 'ajh 8/20/2002 23:27'!\rforSystemTracer: swapMap pointer: pointer field: index\r\t\"May want to create a new object and add it to swapMap under self.\r\t pointer is the object pointing to obj via its field at index.  You may want to convert obj to different objects depending on who is pointing to it.  If this is the case you will want to remember the multiple mappings in swapMap.  You can do this by keeping another map inside the swapMap keyed at a special symbol\"\r\r\t^ self forSystemTracer: swapMap! !\r\r!ProtoObject methodsFor: '*systemtracer2' stamp: 'svp 8/22/2002 21:45'!\rrehashWithoutBecome\r\n\t\"Do nothing.  Here so sending this to a Set does not have to do a time consuming respondsTo:\"\r\n\r\n\t^self rehash! !\r\r\r!Object methodsFor: 'testing' stamp: 'di 5/4/2004 18:07'!\risContextPart\r\r\t^ false! !\r\r\r!Behavior methodsFor: 'system tracing' stamp: 'ajh 1/18/2002 20:12'!\rindexIfCompactForConversion\r\t\"subclasses may override this to change cc index during conversion.  You must update the compact classes array yourself\"\r\r\t^ self indexIfCompact! !\r\r\r!CompiledMethod class methodsFor: 'class initialization' stamp: 'ajh 7/7/2001 16:37'!\rfullFrameSize\r\r\t^ LargeFrame! !\r\r\r!ContextPart methodsFor: 'query' stamp: 'di 5/4/2004 17:44'!\risContextPart\r\r\t^ true! !\r\r\r!BlockContext methodsFor: 'private' stamp: 'ajh 7/7/2001 16:44'!\rframeSize\r\r\t^ home ifNil: [CompiledMethod fullFrameSize] ifNotNil: [self method frameSize]! !\r\r\r!MethodContext methodsFor: 'private' stamp: 'ajh 7/7/2001 16:44'!\rframeSize\r\r\t^ method ifNil: [CompiledMethod fullFrameSize] ifNotNil: [self method frameSize]! !\r\r\r!PositionableStream methodsFor: 'nonhomogeneous accessing' stamp: 'ajh 10/13/2001 15:11'!\rnextLongPut: positiveInt\r\t\"Write positiveInt in the next four bytes preserving the current endianess\"\r\r\tself nextPutAll: (IntBuffer at: 1 put: positiveInt; yourself)\r! !\r\r\r!PositionableStream class methodsFor: 'instance creation' stamp: 'ajh 10/13/2001 15:12'!\rinitialize\r\r\tIntBuffer _ WordArray new: 1.! !\r\r\r!Set methodsFor: 'private' stamp: 'svp 8/23/2002 09:24'!\rcompare: element with: object\r\r\t^element = object! !\r\r!Set methodsFor: 'private' stamp: 'svp 8/23/2002 09:48'!\rfindElementOrNil: anObject hash: hash\r\t\"Answer the index of a first slot containing either a nil (indicating an empty slot) or an element that matches the given object. Answer the index of that slot or zero. Fail if neither a match nor an empty slot is found.\"\r\r\t| index |\r\r\tindex _ self scanFor: anObject hash: hash.\r\tindex > 0 ifTrue: [^index].\r\r\t\"Bad scene.  Neither have we found a matching element\r\tnor even an empty slot.  No hashed set is ever supposed to get\r\tcompletely full.\"\r\tself error: 'There is no free space in this set!!'.! !\r\r!Set methodsFor: 'private' stamp: 'svp 8/23/2002 09:47'!\rscanFor: anObject hash: hash\r\t\"Scan the key array for the first slot containing either a nil (indicating an empty slot) or an element that matches anObject. Answer the index of that slot or zero if no slot is found. This method will be overridden in various subclasses that have different interpretations for matching elements.\"\r\r\t^self \r\t\tscanFor: anObject \r\t\tstartingAt: (hash \\\\ array size) + 1\r! !\r\r!Set methodsFor: 'private' stamp: 'svp 8/23/2002 10:09'!\rscanFor: anObject startingAt: start\r\t\"Scan the key array for the first slot containing either a nil (indicating an empty slot) or an element that matches anObject. Answer the index of that slot or zero if no slot is found. This method will be overridden in various subclasses that have different interpretations for matching elements.\"\r\t| element |\r\r\t\"Search from (hash mod size) to the end.\"\r\tstart to: array size do:\r\t\t[:index | ((element _ array at: index) == nil or: \r\t\t\t[self compare: element with: anObject])\r\t\t\t\tifTrue: [^ index ]].\r\r\t\"Search from 1 to where we started.\"\r\t1 to: start-1 do:\r\t\t[:index | ((element _ array at: index) == nil or: \r\t\t\t[self compare: element with: anObject])\r\t\t\t\tifTrue: [^ index ]].\r\r\t^ 0  \"No match AND no empty slot\"! !\r\r\r!IdentityDictionary methodsFor: '*systemtracer2' stamp: 'ajh 4/3/2004 18:33'!\rcloneUsingHashesFrom: tracer\r\n\r\n\t| object newDict |\r\n\tnewDict := self shallowCopy.\r\n\tnewDict withArray: (Array new: array size).\r\n\t1 to: array size do:\r\n\t\t[ :i |\r\n\t\tobject := array at: i.\r\n\t\tobject ifNotNil:\r\n\t\t\t[newDict\r\n\t\t\t\tnoCheckAdd: object\r\n\t\t\t\thash: (tracer newHashFor: object key)]].\r\n\t^newDict! !\r\r!IdentityDictionary methodsFor: '*systemtracer2' stamp: 'svp 8/23/2002 18:36'!\rnoCheckAdd: anObject hash: hash\r\n\t\"Variant to allow the hash to be specified\r\n\tby the caller.  8/23/02 svp\"\r\n\r\n\tarray at: (self findElementOrNil: anObject key hash: hash) put: anObject.\r\n\ttally _ tally + 1! !\r\r\r!MethodDictionary methodsFor: 'private' stamp: 'svp 8/23/2002 17:32'!\rscanFor: anObject startingAt: start\r\t\"Scan the key array for the first slot containing either a nil (indicating an empty slot) or an element that matches anObject. Answer the index of that slot or zero if no slot is found. This method will be overridden in various subclasses that have different interpretations for matching elements.\"\r\t| element |\r\r\t\"Search from (hash mod size) to the end.\"\r\tstart to: array size do:\r\t\t[:index | ((element _ self basicAt: index) == nil or: \r\t\t\t[element == anObject])\r\t\t\t\tifTrue: [^ index ]].\r\r\t\"Search from 1 to where we started.\"\r\t1 to: start-1 do:\r\t\t[:index | ((element _ self basicAt: index) == nil or: \r\t\t\t[element == anObject])\r\t\t\t\tifTrue: [^ index ]].\r\r\t^ 0  \"No match AND no empty slot\"! !\r\r!MethodDictionary methodsFor: '*systemtracer2' stamp: 'ajh 4/3/2004 18:33'!\rcloneUsingHashesFrom: tracer\r\n\r\n\t| newDict key |\r\n\tnewDict := self class basicNew: self basicSize.\r\n\tnewDict init: array size.\r\n\t1 to: self basicSize do: \r\n\t\t[ :i |\r\n\t\tkey := self basicAt: i.\r\n\t\tkey ifNotNil: \r\n\t\t\t[newDict \r\n\t\t\t\tnoCheckAt: key \r\n\t\t\t\tput: (array at: i) \r\n\t\t\t\thash: (tracer newHashFor: key)]].\r\n\t^newDict! !\r\r!MethodDictionary methodsFor: '*systemtracer2' stamp: 'svp 8/23/2002 16:26'!\rnoCheckAt: key put: value hash: identityHash\r\n\t\"Set the value at key to be value.\"\r\n\t| index |\r\n\tindex _ self findElementOrNil: key hash: identityHash.\r\n\t(self basicAt: index) == nil\r\n\t\tifTrue: \r\n\t\t\t[tally _ tally + 1.\r\n\t\t\tself basicAt: index put: key].\r\n\tarray at: index put: value.\r\n\t^ value! !\r\r\r!String methodsFor: '*systemtracer2' stamp: 'svp 8/22/2002 22:45'!\rhashMappedBy: map\r\n\t\"My hash is independent of my oop.\"\r\n\r\n\t\"While this statement is technically correct, it is misleading.  My hash does\r\n\tdepend on the identity hash of my species, therefore it does need special care\r\n\twhen cloning an image with new identity hashes - svp\"\r\n\r\n\t^String stringHash: self initialHash: (self species hashMappedBy: map)! !\r\r\r!Symbol methodsFor: '*systemtracer2' stamp: 'svp 11/15/2002 16:14'!\rhashMappedBy: map\r\n\t\"** DELETEME ** Overridden here to work with DVS packaging mechanism.\"\r\n\r\n\t^super hashMappedBy: map! !\r\r\r!SystemDictionary methodsFor: 'sources, change log' stamp: 'ikp 3/26/2005 21:59'!\rwordSize\r\t\"Answer the size (in bytes) of an object pointer.\"\r\t\"Smalltalk wordSize\"\r\r\t^[SmalltalkImage current vmParameterAt: 27] on: Error do: [4]! !\r\r!SystemDictionary methodsFor: '*systemtracer2' stamp: 'di 5/5/2004 13:59'!\rrehashEntireImage\r\n\t\"Note, we cannot use allObjectsDo: because some objects like to swap identities\r\n\tduring a rehash...this means that allObjectsDo: will not find all objects.  Also, this\r\n\talgorithm delays become operations to the very end where we can do them all at once. -svp\"\r\t\"Smalltalk rehashEntireImage\"\r\r\n\t| objectCount allObjects numMdicts oldObjs newObjs newObject |\r\n\r\n\tnumMdicts := MethodDictionary allInstances size.\r\n\toldObjs := OrderedCollection new: numMdicts.\r\n\tnewObjs := OrderedCollection new: numMdicts.\r\n\r\n\t\"Create an array big enough to hold all objects in memory\"\r\n\tobjectCount := 0.\r\n\tself systemNavigation allObjectsDo: [ :ea | objectCount := objectCount + 1].\r\n\tallObjects := Array new: objectCount + 500.\r\n\r\n\t\"Now fill the array\"\r\n\tobjectCount := 0.\r\n\tself systemNavigation allObjectsDo: [ :ea | allObjects at: (objectCount := objectCount + 1) put: ea ].\r\n\r\n\"Progress bar disabled until proven innocent here...\"\r\t\"'Rehashing the image: ', objectCount printString, ' objects' \r\n\t\tdisplayProgressAt: Display center\r\n\t\tfrom: 1 to: objectCount\r\n\t\tduring: [:bar | \"\r\n\t\t\tobjectCount := 0.\r\n\t\t\tallObjects do: [ :ea |\r\n\t\t\t\t\"bar value:\" (objectCount := objectCount + 1).\r\n\t\t\t\tnewObject := ea rehashWithoutBecome.\r\n\t\t\t\t(newObject ~~ ea) ifTrue: \r\n\t\t\t\t\t[oldObjs add: ea.\r\n\t\t\t\t\tnewObjs add: newObject].\r\n\t\t\t].\r\n\t\t\toldObjs asArray elementsExchangeIdentityWith: newObjs asArray.\r\n\t\t\"].\"! !\r\r\r!SystemTracer2 methodsFor: 'run' stamp: 'di 5/5/2004 14:32'!\rwriteImage: imageFileName\r\t\"Trace all object in the image and write them out to imageFileName.  See class comment for details.\"\r\t\"SystemTracer2 writeImage: 'clone.image'\"\r\r\t| doProcessStartup |\r\r\t\"Build some of swapMap if desired\"\r\tself initialize: self class numObjects.\r\tself initSwapMapPreShutdown.\r\tSmalltalk garbageCollect.\r\r\t\"Open image file\"\r\tbyteStream _ FileStream newFileNamed: imageFileName.\r\tbyteStream binary.\r\r\t\"Copy changes file\"\r\t(SourceFiles at: 2) ifNotNil:[\r\t\tSmalltalk saveChangesInFileNamed: (Smalltalk fullNameForChangesNamed: imageFileName)].\r\r\t\"DisplayBox needed for image header\"\r\tdisplayBox _ Display boundingBox.\r\r\t\"Shutdown extraneous processes (like snapshot) then trace image.\r\t If error happen restart extraneous processes so we can debug.\r\t In either case, close image file when done.\r\t If we proceed from debugger we won't need to startup processes afterwards.\"\r\tdoProcessStartup _ true.\r\t[\t[\tself processShutdown.\r\t\t\tself isolateAndTrace.\r\t\t\t\"** New clone image will start up from here **\"\r\t\t] on: Error do: [:ex |\r\t\t\tself processStartup.\r\t\t\tdoProcessStartup _ false.\r\t\t\tex pass.\r\t\t]\r\t] ensure: [self isStartingClone ifFalse: [byteStream close]].\r\t\"isStartingClone will be true in clone image but false in tracing image\"\r\r\t\"Startup image processes.  If in clone do special startup if desired\"\r\tself isStartingClone ifTrue: [self clonePreStartup].\r\tdoProcessStartup ifTrue: [self processStartup].\r\tself isStartingClone ifTrue: [self clonePostStartup].\r\tself isStartingClone ifFalse: [self inform: 'Done tracing!!'].\r! !\r\r!SystemTracer2 methodsFor: 'object replacement' stamp: 'ajh 4/3/2004 06:38'!\rconvert: obj pointer: pointer field: index\r\t\"May want to substitute a new object for obj.  And you may want to substitute diferent objects depending on the pointer.  pointer is the object pointing to obj via its field at index.\r\tDelegate to obj so it can decide if it wants to convert and how.  Make sure they check the swapMap in case a substitute has already been created for them in initSwapMapPreShutdown or initSwapMapPostShutdown or pvtWriteImageConverted.  Each SystemTracer subclass should probably use a different convert message that looks like 'forSubclassName:...' so each subclass can have its own set of conversion methods.  You can model them after the forSystemTracer:... methods.\"\r\r\t^ obj forSystemTracer: swapMap pointer: pointer field: index! !\r\r!SystemTracer2 methodsFor: 'object replacement' stamp: 'ajh 4/3/2004 04:29'!\rinitSwapMapPostShutdown\r\t\"Subclasses may want to add converted objects to swap map before starting trace but after shuting down extra processes\"\r! !\r\r!SystemTracer2 methodsFor: 'object replacement' stamp: 'ajh 4/3/2004 04:32'!\rinitSwapMapPreShutdown\r\t\"Subclasses may want to add converted objects to swapMap before starting trace and before shuting down extra processes\"\r! !\r\r!SystemTracer2 methodsFor: 'object encoding' stamp: 'di 5/4/2004 14:21'!\rcompactHeaderSizeMax\r\t\"This is the max number of words (plus 1 for header) for a compact object\"\r\r\t^ 16r3F! !\r\r!SystemTracer2 methodsFor: 'object encoding' stamp: 'ajh 4/3/2004 09:52'!\rhashMask\r\r\t^ 16rFFF! !\r\r!SystemTracer2 methodsFor: 'object encoding' stamp: 'di 5/4/2004 13:07'!\rheadersFor: class classOop: classOop hash: hash numFields: length\r\t\"Return header words for new object.\r\t Three possibilities:\r\t\t{length, class, baseHeader}\r\t\t{class, baseHeader}\r\t\t{baseHeader}\"\r\r\t| header3 header2 header1 cix sizeFld lowBits |\r\t\"3 gc bits\"\r\theader1 _ 0.  \"Mark, old, dirty\"\r\r\t\"Add hash\"\r\theader1 _ header1 bitShift: 12.\t\"next fld is 12 bits\"\r\theader1 _ header1 + (hash bitAnd: self hashMask).\r\r\t\"Add compact class index or class header\"\r\theader1 _ header1 bitShift: 5.\r\tcix _ class indexIfCompactForConversion.\t\"0 means need full word\"\r\theader2 _ classOop.\r\theader1 _ header1 + (cix bitAnd: 16r1F).\r\r\t\"Add object format (with low bits of size)\"\r\theader1 _ header1 bitShift: 4.\r\theader1 _ header1 + class instSpec.\r\tclass isWords ifFalse:\r\t\t[lowBits _ (wordSize-1) - (length + (wordSize-1) bitAnd: (wordSize-1)).\r\t\t\t\t\t\t\"For byte objects: size = wordSize - spec.lowBits\"\r\t\theader1 _ header1 + lowBits].\r\t\"Note code above will generate low bits up to 7 for wordSize = 8,\r\tbut format codes are not prepared to accept this\"\r\r\t\"Add size in long words (includes base header)\"\r\theader1 _ header1 bitShift: 6.\r\tsizeFld _ (class isBytes ifTrue: [length + (wordSize-1) // wordSize]\r\t\t\t\t\t\tifFalse: [length]) + 1.\r\tsizeFld > 16r3F\r\t\tifTrue: [header3 _ sizeFld bitShift: 2.  sizeFld _ 0]\r\t\tifFalse: [header3 _ 0].\r\theader1 _ header1 + sizeFld.\r\r\theader1 _ header1 bitShift: 2.\r\r\theader3 > 0 ifTrue: [\"3-word: type=0\"\r\t\t^ WordArray with: header3 + 0 with: header2 + 0 with: header1 + 0].\r\tcix = 0 ifTrue: [ \"2-word: type=1\"\r\t\t^ WordArray with: header2 + 1 with: header1 + 1].\r\t\"1-word: type=3\"\r\t^ WordArray with: header1 + 3! !\r\r!SystemTracer2 methodsFor: 'object encoding' stamp: 'ajh 8/20/2002 19:53'!\ridentityHashFor: object\r\t\"object is the new object if the original was converted.  If you change the identity hash, you will want to rehash all objects in cloneStartUp.  However, if you change the identity hash of selectors (Symbols), then you should convert MethodDictionaries and selectors up front, before/during tracing\"\r\r\t^ object identityHash! !\r\r!SystemTracer2 methodsFor: 'object encoding' stamp: 'di 6/3/2004 19:34'!\rimageHeaderSize\r\r\t^ 64  \"bytes\"\r! !\r\r!SystemTracer2 methodsFor: 'object encoding' stamp: 'ajh 8/20/2002 16:50'!\rintegerOopOf: value\r\r\tvalue < 0\r\t\tifTrue: [^ ((16r80000000 + value) << 1) + 1]\r\t\tifFalse: [^ (value << 1) + 1]! !\r\r!SystemTracer2 methodsFor: 'object encoding' stamp: 'ajh 4/3/2004 04:26'!\rlastHash\r\r\t^ Object new identityHash! !\r\r!SystemTracer2 methodsFor: 'object encoding' stamp: 'di 5/4/2004 19:30'!\rlengthAndHeaderSizeFor: object numFields: n\r\t\"Return instance word length (including base header), and instance header size (including base header).  This method should be consistent with headersFor:classOop:hash:numFields:\"\r\r\t| cix size class |\r\tclass _ object class.\r\tclass isBits\r\t\tifTrue: [class isBytes \"Note literal bloat of CMs has been dealt with by caller\"\r\t\t\t\tifTrue: [size _ n + (wordSize-1) // wordSize + 1]\r\t\t\t\tifFalse: [size _ n + (wordSize//4-1) // (wordSize//4) + 1]]\r\t\tifFalse: [size _ n + 1].\t\"size in long words, incl hdr0\"\r\t\t\r\tcix _ class indexIfCompactForConversion.\t\"0 means need full word\"\r\tsize > self compactHeaderSizeMax ifTrue: [^ {size. 3}].\r\tcix = 0 ifTrue: [^ {size. 2}].\r\t^ {size. 1}! !\r\r!SystemTracer2 methodsFor: 'object encoding' stamp: 'ikp 9/2/2004 15:34'!\rversionNumber\r\t\"Image format version number\"\r\r\t^6502! !\r\r!SystemTracer2 methodsFor: 'object encoding' stamp: 'di 4/7/2004 22:49'!\rwordSize\r\t\"# bytes per word -- override for 64-bit images\"\r\r\t^ 4! !\r\r!SystemTracer2 methodsFor: 'object encoding' stamp: 'di 5/4/2004 15:29'!\rwordSizeNowRunning\r\t\"# bytes per word *of this image* -- change if you're running in 64 bits\"\r\r\t^ 4! !\r\r!SystemTracer2 methodsFor: 'object field enumeration' stamp: 'di 6/14/2004 13:44'!\rfixedPlusIndexableSizeFor: object\r\t\"Return my total number of fields\"\r\r\t(object isContextPart)\r\t\tifTrue: [^ object class instSize + object frameSize].\r\tobject isCompiledMethod\r\t\tifTrue: [^ object basicSize + (self pcDeltaForMethod: object)].\r\t^ object class instSize + object basicSize! !\r\r!SystemTracer2 methodsFor: 'object field enumeration' stamp: 'di 7/22/2004 10:57'!\robject: object allFieldsWithIndex: block collect: sequenceableCollectionClass\r\t\"Evaluate block against each of the pointer fields with index, and collect the results in an instance of sequenceableCollectionClass\"\r\r\t| fixedSize results varSize nilResults |\r\tobject isCompiledMethod ifTrue:\r\t\t[results _ sequenceableCollectionClass new: 1 + object numLiterals.\r\t\t1 to: 1 + object numLiterals do:\r\t\t\t[:j | results at: j put: (block value: (object objectAt: j) value: j)].\r\t\t^ results].\r\t\r\tfixedSize _ object class instSize.\r\tvarSize _ object basicSize.\r\tresults _ sequenceableCollectionClass new: fixedSize + varSize.\r\t1 to: fixedSize do:\r\t\t[:j | results at: j put: (block value: (object instVarAt: j) value: j)].\r\t1 to: varSize do:\r\t\t[:j | results at: fixedSize + j put: (block value: (object basicAt: j) value: fixedSize + j)].\r\r\tobject isContextPart ifTrue:\r\t\t[(object instVarAt: 2) ifNotNil:\r\t\t\t[\"May need to adjust PC and startPC if changing wordSize...\"\r\t\t\tresults at: 2 put: (block value: (object instVarAt: 2)+(self pcDeltaForMethod: object method) value: 2)].\r\t\t((object isMemberOf: BlockContext) and: [object home notNil]) ifTrue:\r\t\t\t\t[results at: 5 put: (block value: (object instVarAt: 5)+(self pcDeltaForMethod: object method) value: 5)].\r\t\t\"Need to fill out the nils beyond the knowable end of stack\"\r\t\tnilResults _ sequenceableCollectionClass new: object frameSize - object basicSize.\r\t\t1 to: nilResults size do:\r\t\t\t[:j | nilResults at: j put: (block value: nil value: j)].\r\t\t^ results , nilResults].\r\t^ results! !\r\r!SystemTracer2 methodsFor: 'object field enumeration' stamp: 'di 6/14/2004 13:43'!\rpcDeltaForMethod: method\r\r\t^ (wordSize - self wordSizeNowRunning) * (method numLiterals + 1)! !\r\r!SystemTracer2 methodsFor: 'clone startup' stamp: 'ajh 8/22/2002 11:14'!\rclonePostStartup\r\t\"This will be executed when the new clone starts up, but after processStartup.  Subclasses may want to open a greeting window or something\"! !\r\r!SystemTracer2 methodsFor: 'clone startup' stamp: 'ajh 8/22/2002 11:15'!\rclonePreStartup\r\t\"This will be executed right away when the new clone starts up, before processStartup.  Subclasses may want to rehash all objects or something\"! !\r\r!SystemTracer2 methodsFor: 'private' stamp: 'di 4/8/2004 00:02'!\rinitialize: numObjects\r\r\tself class initialize.  \"To pick up latest large Dictionary class\"\r\twordSize _ self wordSize.\r\tswapMap _ LargeIdentityDict new: 4000.\r\toopMap _ LargeIdentityDict new: numObjects.\r\ttraceQueue _ OrderedCollection new: numObjects // 4.\r! !\r\r!SystemTracer2 methodsFor: 'private' stamp: 'ajh 8/20/2002 16:38'!\risStartingClone\r\t\"byteStream will be nil in new image\"\r\r\t^ byteStream == nil! !\r\r!SystemTracer2 methodsFor: 'private' stamp: 'di 6/3/2004 19:33'!\risolateAndTrace\r\t\"Make own execution invisible from tracer by putting dummies in swapMap\"\r\r\t\"Map self to empty and thisContext to nil so they don't get traced\"\r\tswapMap at: self put: self class basicNew.\r\tswapMap at: thisContext put: nil.\r\r\t\"Make new image start up in sender (writeImageFile:) right after this call.  Push nil since the first instr after the call will be pop\"\r\tthisContext sender push: nil.\r\tswapMap at: Processor activeProcess put: (Process forContext: thisContext sender priority: Processor activePriority).\r\r\t\"Trace and write image\"\r\tnextChunk _ self imageHeaderSize.\r\t'Tracing and writing ', (oopMap capacity * 3//4) printString, ' objects' \r\t\tdisplayProgressAt: Display center\r\t\tfrom: self imageHeaderSize to: self class imageSize\r\t\tduring: [:bar |\r\t\t\t\tself initSwapMapPostShutdown.\r\t\t\t\tSmalltalk garbageCollect.\r\t\t\t\tself traceImage: bar].\r\r\t\"Write header\"\r\tself writeFileHeader.\r\r\t\"Pop nil that was pushed above for clone image\"\r\tthisContext sender pop.\r\t^ nil! !\r\r!SystemTracer2 methodsFor: 'private' stamp: 'di 5/4/2004 15:26'!\rlengthAndHeaderSizeFor: object\r\t\"Return two sizes in an array:\r\t 1. object's size in words including my base header,\r\t 2. my header size in words including base header\"\r\r\t^ self lengthAndHeaderSizeFor: object numFields: (self fixedPlusIndexableSizeFor: object)! !\r\r!SystemTracer2 methodsFor: 'private' stamp: 'di 6/15/2004 11:41'!\rprocessShutdown\r\r\t(Object respondsTo: #flushDependents) ifTrue: [Object flushDependents].\r\t(Object respondsTo: #flushEvents) ifTrue: [Object flushEvents].\r\tSmalltalk processShutDownList: false.  \"false means not quiting\"\r\r\t\"Note: the next two lines can be omitted when not writing, eg, a 64-bit image,\r\tbut I leave them in so I can debug the 64-bit system against a similar 32.\r\tThey are needed for the 64, lest Forms decompress into old bitmaps.\"\r\tForm allInstancesDo: [:f | f unhibernate].\r\tColorForm allInstancesDo: [:f | f unhibernate].\r\r\tCursor write show.\r! !\r\r!SystemTracer2 methodsFor: 'private' stamp: 'ajh 8/22/2002 11:17'!\rprocessStartup\r\r\tCursor normal show.\r\tSmalltalk setGCParameters.\r\tself isStartingClone ifTrue: [Smalltalk clearExternalObjects].\r\tSmalltalk processStartUpList: self isStartingClone.\r\tself isStartingClone ifTrue: [\r\t\tSmalltalk setPlatformPreferences.\r\t\tSmalltalk readDocumentFile].\r\tSmalltalk isMorphic ifTrue: [SystemWindow wakeUpTopWindowUponStartup].\r! !\r\r!SystemTracer2 methodsFor: 'private' stamp: 'di 4/7/2004 23:11'!\rreserve: object\r\t\"Add object to write queue and return its oop\"\r\r\t| lengthAndHeaderSize objectSize hdrSize oop |\r\t\"Calculate oop and reserve space (advance nextChunk)\"\r\tlengthAndHeaderSize _ self lengthAndHeaderSizeFor: object.\r\tobjectSize _ lengthAndHeaderSize at: 1.\r\thdrSize _ lengthAndHeaderSize at: 2.\r\toop _ nextChunk + ((hdrSize - 1) * wordSize).\r\tnextChunk _ oop + (objectSize * wordSize).\r\r\t\"Add object to fill queue and remember its oop\"\r\toopMap at: object put: oop.\r\ttraceQueue addLast: object.\r\r\t^ oop! !\r\r!SystemTracer2 methodsFor: 'private' stamp: 'ajh 8/20/2002 19:24'!\rreserve: obj from: pointer field: index\r\t\"Add obj to write queue and return its oop\"\r\r\t| object |\r\tobj class = SmallInteger ifTrue: [^ self integerOopOf: obj].\r\r\t\"Return oop if already visited obj\"\r\tobject _ self convert: obj pointer: pointer field: index.\r\tobject ifNil: [^ nilOop].\r\toopMap at: object ifPresent: [:itsOop | ^ itsOop].\r\r\t^ self reserve: object! !\r\r!SystemTracer2 methodsFor: 'private' stamp: 'di 4/7/2004 23:12'!\rtraceImage: progressBar\r\t\"Trace image starting with true, false, nil, and specialObjectsArray\"\r\r\t| lengthAndHeaderSize object oop |\r\r\t\"Add true and false in front so the VM can assume it will never move (see Interpreter>>interpret)\"\r\tself reserve: true.\r\tself reserve: false.\r\r\t\"Need to add nil separately because it can't be added as a key to oopMap\"\r\tlengthAndHeaderSize _ self lengthAndHeaderSizeFor: nil.\r\tnilOop _ nextChunk + ((lengthAndHeaderSize second - 1) * wordSize).\r\tnextChunk _ nilOop + (lengthAndHeaderSize first * wordSize).\r\tself writeAndTrace: nil.\r\r\t\"Add specialObjectArray next.  Use new array in swap map if present.  This is done explicitly here so swap map does not have to be tested on every Array write\"\r\tobject _ swapMap at: Smalltalk specialObjectsArray ifAbsent: [Smalltalk specialObjectsArray].\r\tlengthAndHeaderSize _ self lengthAndHeaderSizeFor: object.\r\toop _ nextChunk + ((lengthAndHeaderSize second - 1) * wordSize).\r\tnextChunk _ oop + (lengthAndHeaderSize first * wordSize).\r\toopMap at: Smalltalk specialObjectsArray put: oop.\r\toopMap at: object put: oop.\r\tself writeAndTrace: object.\r\r\t\"Write and trace rest of image\"\r\t[traceQueue isEmpty] whileFalse: [\r\t\toop _ self writeAndTrace: traceQueue removeFirst.\r\t\tprogressBar value: oop\r\t].\r! !\r\r!SystemTracer2 methodsFor: 'private' stamp: 'di 5/4/2004 20:21'!\rwriteAndTrace: object\r\t\"Write the image representation of me on byteStream at my oop, and add my not-yet-seen fields to traceQueue.\"\r\r\t| lengthAndHeaderSize oop byteSize byteBuffer |\r\tlengthAndHeaderSize _ self lengthAndHeaderSizeFor: object.\r\toop _ oopMap at: object ifAbsent: [object isNil ifTrue: [nilOop] ifFalse: [self halt: 'oop should have been added to oopMap when object was add to traceQueue']].\r\r\t\"Write header\"\r\tbyteStream position: oop - ((lengthAndHeaderSize second - 1) * wordSize).\r\tbyteStream nextPutAll: (self\r\t\theadersFor: object class\r\t\tclassOop: (self reserve: object class from: object field: -1 \"class field\")\r\t\thash: (self identityHashFor: object)\r\t\tnumFields: (self fixedPlusIndexableSizeFor: object)\r\t).\r\r\t\"Write fields\"\r\t(object class isPointers or: [object class == CompiledMethod]) ifTrue: [\r\t\tbyteStream nextPutAll: (self object: object\r\t\t\tallFieldsWithIndex: [:val :i | self reserve: val from: object field: i]\r\t\t\tcollect: WordArray).\r\t] ifFalse: [  \"isBits\"\r\t\tbyteStream nextPutAll: object.\r\t\tobject class isBytes\r\t\t\tifTrue: [  \"fill bytes unused in last word\"\r\t\t\t\t\t1 to: (wordSize-1) - (object basicSize + (wordSize-1)  \\\\ wordSize)\r\t\t\t\t\t\tdo: [:i | byteStream nextPut: 0]]\r\t\t\tifFalse: [(wordSize = 8 and: [object basicSize odd]) ifTrue:\r\t\t\t\t\t\t[  \"fill word unused in last long8\"\r\t\t\t\t\t\tbyteStream nextPutAll: (WordArray with: 0)]].\r\t].\r\tobject class == CompiledMethod ifTrue: [\r\t\tbyteSize _ object basicSize - object initialPC + 1.\r\t\tbyteBuffer _ ByteArray new: byteSize.\r\t\tbyteBuffer replaceFrom: 1 to: byteSize with: object startingAt: object initialPC.\r\t\t\"intermediate ByteArray needed since byteStream (a file) cannot putAll from a subclass of ByteArray (CompiledMethod)\"\r\t\tbyteStream nextPutAll: byteBuffer.\r\t\t\"fill bytes unused in last word\"\r\t\t1 to: (wordSize-1) - (byteBuffer size + (wordSize-1)  \\\\ wordSize)\r\t\t\tdo: [:i | byteStream nextPut: 0].\r\t].\r\r\t\"Double check that fields take up expected size\"\r\tbyteStream position = (oop + (lengthAndHeaderSize first * wordSize)) ifFalse: [\r\t\tself error: 'object size discrepency'].\r\r\t^ oop! !\r\r!SystemTracer2 methodsFor: 'private' stamp: 'ikp 9/2/2004 15:33'!\rwriteFileHeader\r\r\t| specialObjectsOop |\r\tspecialObjectsOop _ oopMap at: Smalltalk specialObjectsArray.\r\tbyteStream position: 0.\r\tbyteStream nextLongPut: self versionNumber.\r\tbyteStream nextLongPut: self imageHeaderSize.\r\tbyteStream nextLongPut: nextChunk - self imageHeaderSize.\r\tbyteStream nextLongPut: self imageHeaderSize.  \"start of memory\"\r\tbyteStream nextLongPut: specialObjectsOop.\r\tbyteStream nextLongPut: self lastHash.\r\tbyteStream nextLongPut: displayBox width * 16r10000 + displayBox height.\r\tbyteStream nextLongPut: 0.  \"fullScreenFlag\"\r\tbyteStream nextLongPut: Smalltalk extraVMMemory.\r\tbyteStream padTo: self imageHeaderSize put: 0.\r! !\r\r\r!RehashingSystemTracer methodsFor: 'rehashing' stamp: 'di 5/5/2004 13:59'!\rinitSwapMapPostShutdown\r\n\t\"Subclasses may want to add converted objects to swap map before starting trace but after shuting down extra processes\"\r\t\"Note if we pre-hash, eg, IdentityDicts, then this should be called inside the progress bar\r\tof isolateAndTrace, since it adds morphs to the world\"\r\n\r\n\t| sets elementCount clone |\r\tsets _ self specialSets.\r\telementCount _ sets inject: 0 into: [:c :set | c _ c + set size].\r\n\thashMap := LargeIdentityDict new: elementCount.\r\tlastHash := 999.\r\tsets do: [ :ea |\r\n\t\tclone := ea cloneUsingHashesFrom: self.\r\n\t\tswapMap at: ea put: clone].\r! !\r\r!RehashingSystemTracer methodsFor: 'rehashing' stamp: 'ajh 4/3/2004 18:36'!\rnewHashFor: object\r\t\"This is called by cloneUsingHashesFrom: (and compatibility with #hashMappedBy methods?)\"\r\r\t^ hashMap at: object ifAbsentPut: [self newObjectHash]! !\r\r!RehashingSystemTracer methodsFor: 'rehashing' stamp: 'ajh 4/3/2004 18:39'!\rnewObjectHash\r\n\t\"Answer a new pseudo-random number for use as an identity hash.\"\r\n\r\n\tlastHash := 13849 + (27181 * lastHash) bitAnd: 65535.\r\n\t^ lastHash bitAnd: self hashMask\r\n! !\r\r!RehashingSystemTracer methodsFor: 'rehashing' stamp: 'ajh 4/3/2004 22:07'!\rspecialSets\r\n\t\"The sets listed here get rehashed using the newly assigned identity hash values before the clone is written.  On startup, the clone image will rehash all objects to ensure that all hashed structures are properly arranged.  Rehashing is done in this two step process to retain maximum flexibility (if we tried to do everything up front, we would need to update the tracer every time a new type of Set is added with a different hashing and scanning algorithm, plus it would make the hashMap very large and slow).\"\r\n\r\t^ MethodDictionary allInstances\r\n! !\r\r!RehashingSystemTracer methodsFor: 'clone startup' stamp: 'svp 8/22/2002 22:01'!\rclonePreStartup\r\n\r\n\tSmalltalk rehashEntireImage! !\r\r!RehashingSystemTracer methodsFor: 'object encoding' stamp: 'ajh 4/3/2004 18:32'!\ridentityHashFor: object\r\t\"Don not add to hashMap since this is only called once per object\"\r\n\r\n\t^ hashMap at: object ifAbsent: [self newObjectHash]\r\n! !\r\r!RehashingSystemTracer methodsFor: 'object encoding' stamp: 'svp 8/21/2002 12:46'!\rlastHash\r\n\r\n\t^lastHash! !\r\r\r!SystemTracer2 class methodsFor: 'image' stamp: 'ajh 7/9/2001 19:08'!\rimageSize\r\r\t^ Smalltalk vmParameterAt: 2! !\r\r!SystemTracer2 class methodsFor: 'image' stamp: 'ajh 7/3/2001 00:53'!\rnumObjects\r\t\"SystemTracer2 numObjects\"\r\r\t| count object |\r\tcount _ 0.\r\tobject _ 0 someObject.\r\t[object == 0] whileFalse: [\r\t\tcount _ count + 1.\r\t\tobject _ object nextObject].\r\t^ count! !\r\r!SystemTracer2 class methodsFor: 'initialize' stamp: 'di 6/3/2004 19:34'!\rinitialize\r\r\tLargeIdentityDict _ Smalltalk at: #LargeIdentityDictionary\r\t\tifAbsent: [Smalltalk at: #NoAssocIdentityDictionary\r\t\t\tifAbsent: [IdentityDictionary]].\r! !\r\r!SystemTracer2 class methodsFor: 'initialize' stamp: 'ajh 4/3/2004 22:01'!\rlargeDictClass: aIdentityDictionaryClass\r\t\"The tracer will use this class for its large maps\"\r\r\tLargeIdentityDict _ aIdentityDictionaryClass! !\r\r!SystemTracer2 class methodsFor: 'run' stamp: 'ajh 4/3/2004 08:48'!\rwriteImage: imageFileName\r\t\"Trace all object in the image and write them out to imageFileName.  See class comment for details.\"\r\t\"SystemTracer2 writeImage: 'clone.image'\"\r\r\t^ self new writeImage: imageFileName! !\r\r\r!SystemTracer64 methodsFor: 'as yet unclassified' stamp: 'di 5/5/2004 00:30'!\ralignBitmap: bits forForm: form\r\t\"Check to see that the raster is a multiple of 64 bits.  If so, return bits.\r\tIf not, return a copy extended so that it is.\"\r\r\t| raster padded pStart bStart |\r\t(raster _ form bitsSize // form height) even ifTrue: [^ bits].\r\tpadded _ Bitmap new: bits size + form height.  \"One word of padding per line\"\r\tpStart _ bStart _ 1.\r\t1 to: form height do:\r\t\t[:y |\r\t\tpadded replaceFrom: pStart to: pStart+raster-1 with: bits startingAt: bStart.\r\t\tpStart _ pStart + raster + 1.\r\t\tbStart _ bStart + raster].\r\t^ padded! !\r\r!SystemTracer64 methodsFor: 'as yet unclassified' stamp: 'di 5/4/2004 14:21'!\rcompactHeaderSizeMax\r\t\"This is the max number of words (plus 1 for header) for a compact object\"\r\r\t^ 16r1F! !\r\r!SystemTracer64 methodsFor: 'as yet unclassified' stamp: 'di 7/20/2004 14:11'!\rheadersFor: class classOop: classOop hash: hash numFields: length\r\t\"Return header words for new object.\"\r\t \"Three possibilities:\r\t\t{length, class, baseHeader}\r\t\t{class, baseHeader}\r\t\t{baseHeader}\"\r\r\t| header3 header2 header1 cix sizeFld header32 header64 lowBits lowBits4 lengthInBytes |\r\t\"3 gc bits\"\r\theader1 _ 0.  \"Mark, old, dirty\"\r\r\t\"Add hash\"\r\theader1 _ header1 bitShift: 12.\t\"next fld is 12 bits\"\r\theader1 _ header1 + (hash bitAnd: self hashMask).\r\r\t\"Add compact class index or class header\"\r\theader1 _ header1 bitShift: 5.\r\tcix _ class indexIfCompactForConversion.\t\"0 means need full word\"\r\theader2 _ classOop.\r\theader1 _ header1 + (cix bitAnd: 16r1F).\r\r\t\"Add object format (with low bits of size)\"\r\theader1 _ header1 bitShift: 4.\r\theader1 _ header1 + class instSpec.\r\tclass isPointers\r\t\tifTrue: [lowBits4 _ 0]\r\t\tifFalse:\r\t\t[lengthInBytes _ (class isBytes ifTrue: [1] ifFalse: [4]) * length.\r\t\tlowBits _ (wordSize-1) - (lengthInBytes + (wordSize-1) bitAnd: (wordSize-1)).\r\t\t\t\t\t\t\"For byte objects: size = wordSize - spec.lowBits\"\r\t\t\"Note: lowBits may have the 4 bit on in a 64-bit image.  This bit must\r\t\tfor now be put in the now-unused bit of the word-size field (see below).\"\r\t\tlowBits4 _ lowBits bitShift: -2.\r\t\theader1 _ header1 + (lowBits bitAnd: 3)].\r\r\t\"Add size in long words (includes base header)\"\r\theader1 _ header1 bitShift: 6.\r\tsizeFld _ (class isPointers ifTrue: [length]\r\t\t\t\t\t\tifFalse: [lengthInBytes + (wordSize-1) // wordSize]) + 1.\r\r\tsizeFld _ sizeFld * 2.\r\t\r\tsizeFld > 16r3F\r\t\tifTrue: [header3 _ sizeFld bitShift: 2.  sizeFld _ 0]\r\t\tifFalse: [header3 _ 0].\r\r\t\"Here we stick in the 4's bit of lowBits...\"\r\theader1 _ header1 + sizeFld + lowBits4.\r\r\theader1 _ header1 bitShift: 2.\r\r\theader3 > 0\r\t\tifTrue: [\"3-word: type=0\"\r\t\t\t\theader32 _  WordArray with: header3 + 0 with: header2 + 0 with: header1 + 0]\r\t\tifFalse: [cix = 0\r\t\t\t\t\tifTrue: [ \"2-word: type=1\"\r\t\t\t\t\t\t\theader32 _  WordArray with: header2 + 1 with: header1 + 1]\r\t\t\t\t\tifFalse: [\"1-word: type=3\"\r\t\t\t\t\t\t\theader32 _  WordArray with: header1 + 3]].\r\r\theader64 _ WordArray new: header32 size * 2.\r\theader32 withIndexDo:\r\t\t[:hdrWord :i |\r\t\theader64 at: i*2-1 put: 0.  \"Zero-fill above 32-bit headers\"\r\t\theader64 at: i*2 put: hdrWord].\r\t^ header64! !\r\r!SystemTracer64 methodsFor: 'as yet unclassified' stamp: 'di 6/3/2004 19:32'!\rimageHeaderSize\r\t\"64-bit images have twice as big a header\"\r\t\r\t^ super imageHeaderSize * 2! !\r\r!SystemTracer64 methodsFor: 'as yet unclassified' stamp: 'di 5/5/2004 15:00'!\rinitSwapMapPostShutdown\r\n\r\n\t| aligned |\r\tsuper initSwapMapPostShutdown.\r\"\r\tForms must be uncompressed first...\r\tForm allSubInstancesDo:\r\t\t[:f | aligned _ self alignBitmap: f bits forForm: f.\r\t\taligned == f bits ifFalse: [swapMap at: f bits put: aligned]]\r\"! !\r\r!SystemTracer64 methodsFor: 'as yet unclassified' stamp: 'di 4/13/2004 11:59'!\robject: object allFieldsWithIndex: fieldAndIndexBlock collect: collectionClass\r\r\t| fields32 fields64 fill |\r\tfields32 _ super object: object allFieldsWithIndex: fieldAndIndexBlock collect: collectionClass.\r\tfields64 _ collectionClass new: fields32 size * 2.\r\tfields32 withIndexDo:\r\t\t[:field :i |\r\t\tfield odd\r\t\t\tifTrue: [(field bitAnd: 16r80000000) = 0\r\t\t\t\t\t\tifTrue: [fill _ 0]\r\t\t\t\t\t\tifFalse: [fill _ 16rFFFFFFFF]]  \"Sign-extend SmallIntegers\"\r\t\t\tifFalse: [fill _ 0].  \"Zero-fill above oops\"\r\t\tfields64 at: i*2-1 put: fill.\r\t\tfields64 at: i*2 put: field].\r\t^ fields64! !\r\r!SystemTracer64 methodsFor: 'as yet unclassified' stamp: 'ikp 9/2/2004 15:34'!\rversionNumber\r\t\"Image format version number\"\r\r\t^68000! !\r\r!SystemTracer64 methodsFor: 'as yet unclassified' stamp: 'di 4/7/2004 22:58'!\rwordSize\r\t\"# bytes per word in target image\"\r\r\t^ 8! !\r\r!SystemTracer64 methodsFor: 'as yet unclassified' stamp: 'ikp 9/2/2004 15:33'!\rwriteFileHeader\r\t\"Note here it is assumed that this image is less than 4GB in size.\r\tOtherwise a few items should be full 8-byte quantities\"\r\r\t| specialObjectsOop |\r\tspecialObjectsOop _ oopMap at: Smalltalk specialObjectsArray.\r\tbyteStream position: 0.\r\tbyteStream nextLongPut: 0.\r\tbyteStream nextLongPut: self versionNumber.\r\tbyteStream nextLongPut: 0.\r\tbyteStream nextLongPut: self imageHeaderSize.\r\tbyteStream nextLongPut: 0.\r\tbyteStream nextLongPut: nextChunk - self imageHeaderSize.\r\tbyteStream nextLongPut: 0.\r\tbyteStream nextLongPut: self imageHeaderSize.  \"start of memory\"\r\tbyteStream nextLongPut: 0.\r\tbyteStream nextLongPut: specialObjectsOop.\r\tbyteStream nextLongPut: 0.\r\tbyteStream nextLongPut: self lastHash.\r\tbyteStream nextLongPut: 0.\r\tbyteStream nextLongPut: displayBox width * 16r10000 + displayBox height.\r\tbyteStream nextLongPut: 0.\r\tbyteStream nextLongPut: 0.  \"fullScreenFlag\"\r\tbyteStream nextLongPut: 0.\r\tbyteStream nextLongPut: Smalltalk extraVMMemory.\r\tbyteStream padTo: self imageHeaderSize put: 0.\r! !\r\r\r!WeakSet methodsFor: 'private' stamp: 'svp 8/23/2002 17:32'!\rscanFor: anObject startingAt: start\r\t\"Scan the key array for the first slot containing either a nil (indicating an empty slot) or an element that matches anObject. Answer the index of that slot or zero if no slot is found. This method will be overridden in various subclasses that have different interpretations for matching elements\"\r\r\t| element |\r\r\t\"Search from (hash mod size) to the end.\"\r\tstart to: array size do:\r\t\t[:index | ((element _ array at: index) == flag or: \r\t\t\t[self compare: element with: anObject])\r\t\t\t\tifTrue: [^ index ]].\r\r\t\"Search from 1 to where we started.\"\r\t1 to: start-1 do:\r\t\t[:index | ((element _ array at: index) == flag or: \r\t\t\t[self compare: element with: anObject])\r\t\t\t\tifTrue: [^ index ]].\r\r\t^ 0  \"No match AND no empty slot\"! !\r\r!WeakSet methodsFor: '*systemtracer2' stamp: 'svp 8/23/2002 16:26'!\rcloneUsingHashesFrom: tracer\r\n\r\n\t| newSet object |\r\n\tnewSet := self class basicNew init: array size.\r\n\t1 to: array size do:\r\n\t\t[ :i |\r\n\t\tobject := array at: i.\r\n\t\t(object == flag or: [object == nil]) ifFalse:\r\n\t\t\t[newSet \r\n\t\t\t\tnoCheckAdd: object\r\n\t\t\t\thash: (object hashMappedBy: tracer)]].\r\n\t^newSet! !\r\r!WeakSet methodsFor: '*systemtracer2' stamp: 'svp 8/23/2002 16:27'!\rnoCheckAdd: anObject hash: hash\r\n\tarray at: (self findElementOrNil: anObject hash: hash) put: anObject.\r\n\ttally _ tally + 1! !\r\rSystemTracer2 initialize!\rPositionableStream initialize!\rStream subclass: #PositionableStream\r\tinstanceVariableNames: 'collection position readLimit'\r\tclassVariableNames: 'IntBuffer'\r\tpoolDictionaries: ''\r\tcategory: 'Collections-Streams'!\r"
  },
  {
    "path": "vm/src/from_squeak/unix/misc/VMM38b4-64bit-image1-ikp.1.cs",
    "content": "'From Squeak3.8gamma of ''24 November 2004'' [latest update: #6548] on 31 March 2005 at 11:13:48 am'!\r\"Change Set:\t\tVMM38b4-64bit-image1-ikp\rDate:\t\t\t2005-03-31\rAuthor:\t\t\tian.piumarta@squeakland.org\r\rChanges relative to 3.8g-6548 that add 64-bit support to the image.  File this in BEFORE filing in VMM38b4-64bit-image2.\"!\r\r\r!SystemDictionary methodsFor: 'sources, change log' stamp: 'ikp 3/26/2005 21:59'!\rwordSize\r\t\"Answer the size (in bytes) of an object pointer.\"\r\t\"Smalltalk wordSize\"\r\r\t^[SmalltalkImage current vmParameterAt: 27] on: Error do: [4]! !\r\r"
  },
  {
    "path": "vm/src/from_squeak/unix/misc/VMM38b4-64bit-image2-ikp.1.cs",
    "content": "'From Squeak3.8gamma of ''24 November 2004'' [latest update: #6548] on 31 March 2005 at 11:13:52 am'!\r\"Change Set:\t\tVMM38b4-64bit-image2-ikp\rDate:\t\t\t2005-03-31\rAuthor:\t\t\tian.piumarta@squeakland.org\r\rChanges relative to 3.8g-6548 that add 64-bit support to the image.  File in VMM38b4-64bit-image1 BEFORE this file.\"!\r\r\r!Class methodsFor: 'subclass creation' stamp: 'di 10/6/2004 10:54'!\rvariableLongSubclass: t instanceVariableNames: f \r\tclassVariableNames: d poolDictionaries: s category: cat\r\t\"This is the standard initialization message for creating a new class as a \r\tsubclass of an existing class (the receiver) in which the subclass is to \r\thave indexable word-sized nonpointer variables.\"\r\t^(ClassBuilder new)\r\t\tsuperclass: self\r\t\tvariableLongSubclass: t\r\t\tinstanceVariableNames: f\r\t\tclassVariableNames: d\r\t\tpoolDictionaries: s\r\t\tcategory: cat\r! !\r\r\r!ClassBuilder methodsFor: 'class format' stamp: 'di 10/6/2004 10:51'!\rcomputeFormat: type instSize: newInstSize forSuper: newSuper ccIndex: ccIndex\r\t\"Compute the new format for making oldClass a subclass of newSuper.\r\tReturn the format or nil if there is any problem.\"\r\t| instSize isVar isPointers isWeak |\r\tinstSize _ newInstSize + (newSuper ifNil:[0] ifNotNil:[newSuper instSize]).\r\tinstSize > 254 ifTrue:[\r\t\tself error: 'Class has too many instance variables (', instSize printString,')'.\r\t\t^nil].\r\ttype == #compiledMethod\r\t\tifTrue:[^CompiledMethod instSpec].\r\ttype == #normal ifTrue:[isVar _ isWeak _ false. isPointers _ true].\r\ttype == #weak ifTrue:[isVar _ isWeak _ isPointers _ true].\r\ttype == #variable ifTrue:[isVar _ isPointers _ true. isWeak _ false].\r\ttype == #bytes ifTrue:[isVar _ true. isPointers _ isWeak _ false].\r\ttype == #words ifTrue:[isVar _ true. isPointers _ isWeak _ false].\r\ttype == #longs ifTrue:[isVar _ true. isPointers _ isWeak _ false].\r\t(isPointers not and:[instSize > 0]) ifTrue:[\r\t\tself error:'A non-pointer class cannot have instance variables'.\r\t\t^nil].\r\t^(self format: instSize \r\t\tvariable: isVar \r\t\twords: type \r\t\tpointers: isPointers \r\t\tweak: isWeak) + (ccIndex bitShift: 11).! !\r\r!ClassBuilder methodsFor: 'class format' stamp: 'di 10/6/2004 10:49'!\rformat: nInstVars variable: isVar words: fieldType pointers: isPointers weak: isWeak\r\t\"Compute the format for the given instance specfication.\"\r\t| cClass instSpec sizeHiBits fmt |\r\tself flag: #instSizeChange.\r\"\rSmalltalk browseAllCallsOn: #instSizeChange.\rSmalltalk browseAllImplementorsOf: #fixedFieldsOf:.\rSmalltalk browseAllImplementorsOf: #instantiateClass:indexableSize:.\r\"\r\"\r\tNOTE: This code supports the backward-compatible extension to 8 bits of instSize.\r\tFor now the format word is...\r\t\t<2 bits=instSize//64><5 bits=cClass><4 bits=instSpec><6 bits=instSize\\\\64><1 bit=0>\r\tBut when we revise the image format, it should become...\r\t\t<5 bits=cClass><4 bits=instSpec><8 bits=instSize><1 bit=0>\r\"\r\tsizeHiBits _ (nInstVars+1) // 64.\r\tcClass _ 0.  \"for now\"\r\tinstSpec _ isWeak\r\t\tifTrue:[4]\r\t\tifFalse:[isPointers\r\t\t\t\tifTrue: [isVar\r\t\t\t\t\t\tifTrue: [nInstVars>0 ifTrue: [3] ifFalse: [2]]\r\t\t\t\t\t\tifFalse: [nInstVars>0 ifTrue: [1] ifFalse: [0]]]\r\t\t\t\tifFalse: [fieldType == #longs ifTrue: [7] ifFalse:\r\t\t\t\t\t\t\t[fieldType == #words ifTrue: [6] ifFalse:\r\t\t\t\t\t\t\t[fieldType == #bytes ifTrue: [8]\r\t\t\t\t\t\t\tifFalse: [self error: 'bad fieldType']]]]].\r\tfmt _ sizeHiBits.\r\tfmt _ (fmt bitShift: 5) + cClass.\r\tfmt _ (fmt bitShift: 4) + instSpec.\r\tfmt _ (fmt bitShift: 6) + ((nInstVars+1)\\\\64).  \"+1 since prim size field includes header\"\r\tfmt _ (fmt bitShift: 1). \"This shift plus integer bit lets wordSize work like byteSize\"\r\t^fmt! !\r\r!ClassBuilder methodsFor: 'public' stamp: 'di 10/6/2004 10:53'!\rsuperclass: aClass\r\tvariableLongSubclass: t instanceVariableNames: f \r\tclassVariableNames: d poolDictionaries: s category: cat\r\t\"This is the standard initialization message for creating a new class as a \r\tsubclass of an existing class in which the subclass is to \r\thave indexable word-sized nonpointer variables.\"\r\t(aClass instSize > 0)\r\t\tifTrue: [^self error: 'cannot make a word subclass of a class with named fields'].\r\t(aClass isVariable and: [aClass isBytes])\r\t\tifTrue: [^self error: 'cannot make a word subclass of a class with byte fields'].\r\t(aClass isVariable and: [aClass isPointers])\r\t\tifTrue: [^self error: 'cannot make a word subclass of a class with pointer fields'].\r\r\t^self \r\t\tname: t\r\t\tinEnvironment: aClass environment\r\t\tsubclassOf: aClass\r\t\ttype: #longs\r\t\tinstanceVariableNames: f\r\t\tclassVariableNames: d\r\t\tpoolDictionaries: s\r\t\tcategory: cat! !\r\r\r!CompiledMethod methodsFor: 'accessing' stamp: 'di 6/29/2004 12:28'!\rinitialPC\r\t\"Answer the program counter for the receiver's first bytecode.\"\r\r\t^ (self numLiterals + 1) * Smalltalk wordSize + 1\r! !\r\r\r!FileList methodsFor: 'private' stamp: 'di 7/2/2004 11:35'!\rreadContentsHex: brevity\r\t\"retrieve the contents from the external file unless it is too long.\r\t  Don't create a file here.  Check if exists.\"\r\t| f size data hexData s |\r\r\tf := directory oldFileOrNoneNamed: self fullName. \r\tf == nil ifTrue: [^ 'For some reason, this file cannot be read' translated].\r\t((size := f size)) > 5000 & brevity\r\t\tifTrue: [data := f next: 10000. f close. brevityState := #briefHex]\r\t\tifFalse: [data := f contentsOfEntireFile. brevityState := #fullHex].\r\r\ts := WriteStream on: (String new: data size*4).\r\t0 to: data size-1 by: 16 do:\r\t\t[:loc | s nextPutAll: loc hex; space;\r\t\t\tnextPut: $(; print: loc; nextPut: $); space; tab.\r\t\tloc+1 to: (loc+16 min: data size) do: [:i | s nextPutAll: (data at: i) hex; space].\r\t\ts tab; nextPutAll: '|' , ((data copyFrom: loc+1 to: (loc+16 min: data size)) copyReplaceAll: Character cr asString with: '/') asString , '|'.\r\t\ts cr].\r\thexData := s contents.\r\r\t^ contents := ((size > 5000) & brevity\r\t\tifTrue: ['File ''{1}'' is {2} bytes long.\rYou may use the ''get'' command to read the entire file.\r\rHere are the first 5000 characters...\r------------------------------------------\r{3}\r------------------------------------------\r... end of the first 5000 characters.' translated format: {fileName. size. hexData}]\r\t\tifFalse: [hexData]).\r! !\r\r\r!Form methodsFor: 'other' stamp: 'di 6/19/2004 12:25'!\rbitsSize64\r\t| pixPerWord |\r\tdepth == nil ifTrue: [depth _ 1].\r\tpixPerWord _ 64 // self depth.\r\t^ width + pixPerWord - 1 // pixPerWord * height\r\"\r | nBytes nBytes64 | nBytes _ nBytes64 _ 0.\rForm allInstances , ColorForm allinstances do:\r\t[:f | f unhibernate.\r\tnBytes _ nBytes + (f bitsSize*4).\r\tnBytes64 _ nBytes64 + (f bitsSize64*8).\r\tf hibernate].\r{nBytes. nBytes64}\r\"! !\r\r\r!Text methodsFor: 'accessing' stamp: 'ikp 3/31/2005 07:52'!\rstamp\r\t^'unknown'! !\r\r"
  },
  {
    "path": "vm/src/from_squeak/unix/misc/VMM38b4-64bit-vm1-ikp.1.cs",
    "content": "'From Squeak3.8gamma of ''24 November 2004'' [latest update: #6548] on 31 March 2005 at 2:51:49 pm'!\r\"Change Set:\t\tVMM38b4-64bit-vm\rDate:\t\t\t2005-03-31\rAuthor:\t\t\tian.piumarta@squeakland.org\r\rChanges relative to VMMaker-tpr.14 that add 64-bit support to the VM.\"!\r\rCArray subclass: #BalloonArray\r\tinstanceVariableNames: 'simArray'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'VMMaker-InterpreterSimulation'!\r\r!BalloonArray commentStamp: '<historical>' prior: 0!\rBalloonArray keeps a shadow copy of its raw memory data in a Smalltalk array.  This allows support for C's inhomogeneous access, returning floats where Floats were stored, and negative ints where they were stored.  This ruse only works, of course where we have control over all the access.!\r\rBalloonEnginePlugin subclass: #BalloonEngineSimulation\r\tinstanceVariableNames: 'bbObj workBufferArray '\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'VMMaker-InterpreterSimulation'!\rObject subclass: #InterpreterSimulationObject\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'VMMaker-Plugins'!\rObject subclass: #ObjectMemory\r\tinstanceVariableNames: 'memory youngStart endOfMemory memoryLimit nilObj falseObj trueObj specialObjectsOop rootTable rootTableCount child field parentField freeBlock lastHash allocationCount lowSpaceThreshold signalLowSpace compStart compEnd fwdTableNext fwdTableLast remapBuffer remapBufferCount allocationsBetweenGCs tenuringThreshold statFullGCs statFullGCMSecs statIncrGCs statIncrGCMSecs statTenures statRootTableOverflows freeContexts freeLargeContexts interruptCheckCounter totalObjectCount shrinkThreshold growHeadroom headerTypeBytes youngStartLocal '\r\tclassVariableNames: 'AllButHashBits AllButMarkBit AllButMarkBitAndTypeMask AllButRootBit AllButTypeMask BaseHeaderSize BlockContextProto CharacterTable ClassArray ClassBitmap ClassBlockContext ClassByteArray ClassCharacter ClassCompiledMethod ClassExternalAddress ClassExternalData ClassExternalFunction ClassExternalLibrary ClassExternalStructure ClassFloat ClassInteger ClassLargeNegativeInteger ClassLargePositiveInteger ClassMessage ClassMethodContext ClassPoint ClassProcess ClassPseudoContext ClassSemaphore ClassString ClassTranslatedMethod CompactClassMask CompactClasses ConstMinusOne ConstOne ConstTwo ConstZero CtxtTempFrameStart DoAssertionChecks DoBalanceChecks Done ExternalObjectsArray FalseObject FloatProto GCTopMarker HashBits HashBitsOffset HeaderTypeClass HeaderTypeFree HeaderTypeGC HeaderTypeShort HeaderTypeSizeAndClass LargeContextBit LargeContextSize MarkBit MethodContextProto NilContext NilObject RemapBufferSize RootBit RootTableRedZone RootTableSize SchedulerAssociation SelectorAboutToReturn SelectorCannotInterpret SelectorCannotReturn SelectorDoesNotUnderstand SelectorMustBeBoolean SelectorRunWithIn SizeMask SmallContextSize SpecialSelectors StackStart StartField StartObj TheDisplay TheFinalizationSemaphore TheInputSemaphore TheInterruptSemaphore TheLowSpaceSemaphore TheTimerSemaphore TrueObject TypeMask Upward Bytes3to0Mask Size4Bit Byte1Shift Byte4Shift Byte7Shift Bytes7to4Mask ContextFixedSizePlusHeader Byte7ShiftNegated Byte2Mask Byte4ShiftNegated Byte1ShiftNegated Byte0Shift Byte5Mask Byte1Mask Byte3Shift Byte6Shift BytesPerWord Byte4Mask Byte0Mask Byte7Mask Byte3Mask LongSizeMask Byte2Shift Byte5ShiftNegated Byte6Mask Byte5Shift WordMask Byte3ShiftNegated ShiftForWord '\r\tpoolDictionaries: ''\r\tcategory: 'VMMaker-Interpreter'!\r\r!ObjectMemory commentStamp: '<historical>' prior: 0!\rThis class describes a 32-bit direct-pointer object memory for Smalltalk.  The model is very simple in principle:  a pointer is either a SmallInteger or a 32-bit direct object pointer.\r\rSmallIntegers are tagged with a low-order bit equal to 1, and an immediate 31-bit 2s-complement signed value in the rest of the word.\r\rAll object pointers point to a header, which may be followed by a number of data fields.  This object memory achieves considerable compactness by using a variable header size (the one complexity of the design).  The format of the 0th header word is as follows:\r\r\t3 bits\treserved for gc (mark, root, unused)\r\t12 bits\tobject hash (for HashSets)\r\t5 bits\tcompact class index\r\t4 bits\tobject format\r\t6 bits\tobject size in 32-bit words\r\t2 bits\theader type (0: 3-word, 1: 2-word, 2: forbidden, 3: 1-word)\r\rIf a class is in the compact class table, then this is the only header information needed.  If it is not, then it will have another header word at offset -4 bytes with its class in the high 30 bits, and the header type repeated in its low 2 bits.  It the objects size is greater than 255 bytes, then it will have yet another header word at offset -8 bytes with its full word size in the high 30 bits and its header type repeated in the low two bits.\r\rThe object format field provides the remaining information as given in the formatOf: method (including isPointers, isVariable, isBytes, and the low 2 size bits of byte-sized objects).\r\rThis implementation includes incremental (2-generation) and full garbage collection, each with compaction and rectification of direct pointers.  It also supports a bulk-become (exchange object identity) feature that allows many objects to be becomed at once, as when all instances of a class must be grown or shrunk.\r\rThere is now a simple 64-bit version of the object memory.  It is the simplest possible change that could work.  It merely sign-extends all integer oops, and extends all object headers and oops by adding 32 zeroes in the high bits.  The format of the base header word is changed in one minor, not especially elegant, way.  Consider the old 32-bit header:\r\tggghhhhhhhhhhhhcccccffffsssssstt\rThe 64-bit header is almost identical, except that the size field (now being in units of 8 bytes, has a zero in its low-order bit.  At the same time, the byte-size residue bits for byte objects, which are in the low order bits of formats 8-11 and 12-15, are now in need of another bit of residue.  So, the change is as follows:\r\tggghhhhhhhhhhhhcccccffffsssssrtt\rwhere bit r supplies the 4's bit of the byte size residue for byte objects.  Oh, yes, this is also needed now for 'variableWord' objects, since their size in 32-bit words requires a low-order bit.\r\rSee the comment in formatOf: for the change allowing for 64-bit wide bitmaps, now dubbed 'variableLong'.!\r\rInterpreter subclass: #InterpreterSimulator\r\tinstanceVariableNames: 'byteCount sendCount traceOn myBitBlt displayForm filesOpen imageName pluginList mappedPluginEntries inputSem quitBlock transcript logging displayView '\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'VMMaker-InterpreterSimulation'!\rInterpreterSimulatorLSB subclass: #InterpreterSimulatorLSB64\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'VMMaker-InterpreterSimulation'!\rInterpreterSimulatorMSB subclass: #InterpreterSimulatorMSB64\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'VMMaker-InterpreterSimulation'!\r\r!Object methodsFor: '*VMMaker-translation support' stamp: 'di 7/14/2004 12:15'!\risCObjectAccessor\r\r\t^ false! !\r\r\r!Array methodsFor: 'converting' stamp: 'di 5/9/2004 09:55'!\rcoerceTo: cTypeString sim: interpreterSimulator\r\r\t^ self! !\r\r\r!CArray methodsFor: 'converting' stamp: 'di 7/15/2004 16:55'!\rasCArrayAccessor\r\r\t^ (CArrayAccessor on: self)\r\t\t\t+= -1   \"Defeat the +1 offset in the accessor\"! !\r\r!CArray methodsFor: 'converting' stamp: 'tpr 3/23/2005 12:36'!\rcoerceTo: cTypeString sim: interpreterSimulator\r\r\tcTypeString = 'int' ifTrue: [^ self ptrAddress].\r\tcTypeString = 'float *' ifTrue: [^ self asCArrayAccessor asFloatAccessor].\r\tcTypeString = 'int *' ifTrue: [^ self asCArrayAccessor asIntAccessor].\r\tcTypeString = 'unsigned' ifTrue: [^ self ptrAddress].\r\t^ self! !\r\r!CArray methodsFor: 'accessing' stamp: 'di 7/6/2004 09:32'!\rat: offset\r\r\tptrOffset = 0 ifFalse: [self error: 'only expect base address to receive at: message'].\r\tunitSize = 1 ifTrue: [^ interpreter byteAt: arrayBaseAddress + offset].\r\tunitSize = 4 ifTrue: [^ interpreter long32At: arrayBaseAddress + (offset * 4)].\r\tself halt: 'Can''t handle unitSize ', unitSize printString\r! !\r\r!CArray methodsFor: 'accessing' stamp: 'di 7/19/2004 12:01'!\rat: offset put: val\r\r\tptrOffset = 0 ifFalse: [self error: 'only expect base address to receive at:put: message'].\r\tunitSize = 1 ifTrue: [^ interpreter byteAt: arrayBaseAddress + offset put: val].\r\tunitSize = 4 ifTrue: [^ interpreter long32At: arrayBaseAddress + (offset * 4) put: val].\r\tself halt: 'Can''t handle unitSize ', unitSize printString\r! !\r\r!CArray methodsFor: 'accessing' stamp: 'di 7/16/2004 12:45'!\rfloatAt: index\r\t^ Float fromIEEE32Bit: (self at: index)! !\r\r!CArray methodsFor: 'accessing' stamp: 'di 7/16/2004 12:45'!\rfloatAt: index put: value\r\t^ self at: index put: value asIEEE32BitWord! !\r\r!CArray methodsFor: 'accessing' stamp: 'di 7/16/2004 12:45'!\rintAt: index\r\t^ (self at: index) signedIntFromLong! !\r\r!CArray methodsFor: 'accessing' stamp: 'di 7/16/2004 12:45'!\rintAt: index put: signedInt\r\t^ self at: index put: signedInt signedIntToLong! !\r\r\r!BalloonArray methodsFor: 'memory access' stamp: 'di 7/16/2004 12:14'!\rat: index\r\t| value |\r\tvalue _ simArray at: index+1.\r\t\"Debug only...\"\r\tvalue ifNil:\r\t\t[self error: 'attempt to read an uninitialized field'.\r\t\t^ super at: index  \"Maybe it was set in Squeak.  Return the raw value\"].\r\t(self bitsOf: value) ~= (super at: index) ifTrue:\r\t\t[self error: 'inconsistent values'].\r\t^ value! !\r\r!BalloonArray methodsFor: 'memory access' stamp: 'di 7/16/2004 11:28'!\rat: index put: value\r\r\tsuper at: index put: (self bitsOf: value).\r\t^ simArray at: index + 1 put: value.\r\t! !\r\r!BalloonArray methodsFor: 'memory access' stamp: 'di 7/15/2004 13:34'!\rbitsOf: value\r\t\"Convert pos and neg ints and floats to 32-bit representations expected by C\"\r\r\tvalue isInteger ifTrue:\r\t\t[value >= 0 ifTrue: [^ value].\r\t\t^ value + 16r80000000 + 16r80000000].\r\tvalue isFloat ifTrue:\r\t\t[^ value asIEEE32BitWord].\r\tself error: 'unexpected value for 32 bits'.\r\t^ 0! !\r\r!BalloonArray methodsFor: 'memory access' stamp: 'di 7/15/2004 16:04'!\rfloatAt: index\r\t| value |\r\tvalue _ self at: index.\r\tvalue isFloat ifFalse:\r\t\t[value = 0 ifTrue: [^ 0.0].\r\t\tself error: 'non-float was stored'.\r\t\t^ Float fromIEEE32Bit: value].\r\t^ value! !\r\r!BalloonArray methodsFor: 'memory access' stamp: 'di 7/15/2004 13:00'!\rfloatAt: index put: value\r\r\tvalue isFloat\r\t\tifFalse: [self error: 'inconsistent values'].\r\t^ self at: index put: value! !\r\r!BalloonArray methodsFor: 'memory access' stamp: 'di 7/15/2004 13:02'!\rintAt: index\r\t| value |\r\tvalue _ self at: index.\r\tvalue isInteger\r\t\tifFalse: [self error: 'inconsistent values'].\r\t^ value! !\r\r!BalloonArray methodsFor: 'memory access' stamp: 'di 7/15/2004 13:01'!\rintAt: index put: value\r\r\tvalue isInteger\r\t\tifFalse: [self error: 'inconsistent values'].\r\t^ self at: index put: value! !\r\r!BalloonArray methodsFor: 'memory access' stamp: 'di 7/15/2004 13:17'!\rsetSimArray: anArray\r\r\tsimArray _ anArray! !\r\r\r!CCodeGenerator methodsFor: 'public' stamp: 'ikp 9/2/2004 14:19'!\rstoreHeaderOnFile: fileName bytesPerWord: bytesPerWord\r\t\"Store C header code for this interpreter on the given file.\"\r\r\t| aStream |\r\taStream _ CrLfFileStream forceNewFileNamed: fileName.\r\taStream ifNil: [Error signal: 'Could not open C header file: ', fileName].\r\taStream\r\t\tnextPutAll: '/* Automatically generated from Squeak on ';\r\t\tprint: Time dateAndTimeNow;\r\t\tnextPutAll: ' */'; cr; cr;\r\t\tnextPutAll: '#define SQ_VI_BYTES_PER_WORD ';\r\t\tprint: bytesPerWord;\r\t\tcr;\r\t\tclose! !\r\r!CCodeGenerator methodsFor: 'utilities' stamp: 'ikp 6/13/2004 22:22'!\rbuiltin: sel\r\t\"Answer true if the given selector is one of the builtin selectors.\"\r\r\t((sel = #byteAt:) or: [sel = #byteAt:put:]) ifTrue: [ ^true ].\r\t((sel = #shortAt:) or: [sel = #shortAt:put:]) ifTrue: [ ^true ].\r\t((sel = #intAt:) or: [sel = #intAt:put:]) ifTrue: [ ^true ].\r\t((sel = #longAt:) or: [(sel = #longAt:put:) or: [sel = #error:]]) ifTrue: [ ^true ].\r\t((sel = #byteAtPointer:) or: [sel = #byteAtPointer:put:]) ifTrue: [ ^true ].\r\t((sel = #shortAtPointer:) or: [sel = #shortAtPointer:put:]) ifTrue: [ ^true ].\r\t((sel = #longAtPointer:) or: [(sel = #longAtPointer:put:) or: [sel = #error:]]) ifTrue: [ ^true ].\r\t^translationDict includesKey: sel! !\r\r!CCodeGenerator methodsFor: 'C code generator' stamp: 'ikp 8/3/2004 20:16'!\rcLiteralFor: anObject\r\t\"Return a string representing the C literal value for the given object.\"\r\t(anObject isKindOf: Integer) ifTrue: [\r\t\t(anObject < 16r7FFFFFFF)\r\t\t\tifTrue: [^ anObject printString]\r\t\t\tifFalse: [^ anObject printString , ObjectMemory unsignedIntegerSuffix \"ikp\"]].\r\t(anObject isKindOf: String) ifTrue: [^ '\"', anObject, '\"' ].\r\t(anObject isKindOf: Float) ifTrue: [^ anObject printString ].\r\tanObject == nil ifTrue: [^ 'null' ].\r\tanObject == true ifTrue: [^ '1' ].\t\t\t\"ikp\"\r\tanObject == false ifTrue: [^ '0' ].\t\t\t\"ikp\"\r\t(anObject isKindOf: Character) ifTrue:[^anObject asString printString]. \"ar\"\r\tself error:\t\t\t\t\t\t\t\t\"ikp\"\r\t\t'Warning: A Smalltalk literal could not be translated into a C constant: ', anObject printString.\r\t^'\"XXX UNTRANSLATABLE CONSTANT XXX\"'! !\r\r!CCodeGenerator methodsFor: 'C code generator' stamp: 'ikp 6/9/2004 16:04'!\remitCHeaderForPrimitivesOn: aStream\r\t\"Write a C file header for compiled primitives onto the given stream.\"\r\r\taStream nextPutAll: '/* Automatically generated from Squeak on '.\r\taStream nextPutAll: Time dateAndTimeNow printString.\r\taStream nextPutAll: ' */'; cr; cr.\r\r\taStream nextPutAll: '#include \"sq.h\"'; cr; cr.\r\r\t\"Additional header files\"\r\theaderFiles do:[:hdr|\r\t\taStream nextPutAll:'#include '; nextPutAll: hdr; cr].\r\r\taStream nextPutAll: '\r#include \"sqMemoryAccess.h\"\r\r/*** Imported Functions/Variables ***/\rextern sqInt stackValue(sqInt);\rextern sqInt stackIntegerValue(sqInt);\rextern sqInt successFlag;\r\r/* allows accessing Strings in both C and Smalltalk */\r#define asciiValue(c) c\r'.\r\taStream cr.! !\r\r!CCodeGenerator methodsFor: 'C code generator' stamp: 'ikp 6/9/2004 16:06'!\remitCHeaderOn: aStream\r\t\"Write a C file header onto the given stream.\"\r\r\taStream nextPutAll: '/* Automatically generated from Squeak on '.\r\taStream nextPutAll: Time dateAndTimeNow printString.\r\taStream nextPutAll: ' */'; cr; cr.\r\tself emitGlobalStructFlagOn: aStream.\r\taStream nextPutAll: '#include \"sq.h\"'; cr.\r\r\t\"Additional header files\"\r\theaderFiles do:[:hdr|\r\t\taStream nextPutAll:'#include '; nextPutAll: hdr; cr].\r\r\taStream nextPutAll: '\r#include \"sqMemoryAccess.h\"\r\rsqInt printCallStack(void);\rvoid error(char *s);\rvoid error(char *s) {\r\t/* Print an error message and exit. */\r\tstatic sqInt printingStack = false;\r\r\tprintf(\"\\n%s\\n\\n\", s);\r\tif (!!printingStack) {\r\t\t/* flag prevents recursive error when trying to print a broken stack */\r\t\tprintingStack = true;\r\t\tprintCallStack();\r\t}\r\texit(-1);\r}\r'.\r\taStream cr.! !\r\r!CCodeGenerator methodsFor: 'C code generator' stamp: 'ikp 6/9/2004 16:04'!\remitCVariablesOn: aStream \r\t\"Store the global variable declarations on the given stream.\"\r\t| varString |\r\taStream nextPutAll: '/*** Variables ***/';\r\t\t cr.\r\tvariables asSortedCollection\r\t\tdo: [:var | \r\t\t\tvarString _ var asString.\r\t\t\tself isGeneratingPluginCode\r\t\t\t\tifTrue: [varString = 'interpreterProxy'\r\t\t\t\t\t\tifTrue: [\"quite special...\"\r\t\t\t\t\t\t\taStream cr; nextPutAll: '#ifdef SQUEAK_BUILTIN_PLUGIN'.\r\t\t\t\t\t\t\taStream cr; nextPutAll: 'extern'.\r\t\t\t\t\t\t\taStream cr; nextPutAll: '#endif'; cr]\r\t\t\t\t\t\tifFalse: [aStream nextPutAll: 'static ']].\r\t\t\t(variableDeclarations includesKey: varString)\r\t\t\t\tifTrue: [aStream nextPutAll: (variableDeclarations at: varString) , ';'; cr]\r\t\t\t\tifFalse: [\"default variable declaration\"\r\t\t\t\t\taStream nextPutAll: 'sqInt ' , varString , ';'; cr]].\r\taStream cr! !\r\r!CCodeGenerator methodsFor: 'C translation' stamp: 'ikp 6/9/2004 16:13'!\rgenerateAsInteger: msgNode on: aStream indent: level\r\t\"Generate the C code for this message onto the given stream.\"\r\r\taStream nextPutAll:'((sqInt) '.\r\tself emitCExpression: msgNode receiver on: aStream.\r\taStream nextPutAll: ' )'.! !\r\r!CCodeGenerator methodsFor: 'C translation' stamp: 'ikp 8/4/2004 16:29'!\rgenerateBitShift: msgNode on: aStream indent: level\r\t\"Generate the C code for this message onto the given stream.\"\r\r\t| arg rcvr |\r\targ _ msgNode args first.\r\trcvr _ msgNode receiver.\r\targ isConstant ifTrue: [\r\t\t\"bit shift amount is a constant\"\r\t\taStream nextPutAll: '((usqInt) '.\r\t\tself emitCExpression: rcvr on: aStream.\r\t\targ value < 0 ifTrue: [\r\t\t\taStream nextPutAll: ' >> ', arg value negated printString.\r\t\t] ifFalse: [\r\t\t\taStream nextPutAll: ' << ', arg value printString.\r\t\t].\r\t\taStream nextPutAll: ')'.\r\t] ifFalse: [\r\t\t\"bit shift amount is an expression\"\r\t\taStream nextPutAll: '(('.\r\t\tself emitCExpression: arg on: aStream.\r\t\taStream nextPutAll: ' < 0) ? ((usqInt) '.\r\t\tself emitCExpression: rcvr on: aStream.\r\t\taStream nextPutAll: ' >> -'.\r\t\tself emitCExpression: arg on: aStream.\r\t\taStream nextPutAll: ') : ((usqInt) '.\r\t\tself emitCExpression: rcvr on: aStream.\r\t\taStream nextPutAll: ' << '.\r\t\tself emitCExpression: arg on: aStream.\r\t\taStream nextPutAll: '))'.\r\t].! !\r\r!CCodeGenerator methodsFor: 'C translation' stamp: 'ikp 6/9/2004 16:14'!\rgenerateDivide: msgNode on: aStream indent: level\r\t\"Generate the C code for this message onto the given stream.\"\r\r\t| rcvr arg divisor |\r\trcvr _ msgNode receiver.\r\targ _ msgNode args first.\r\t(arg isConstant and:\r\t [UseRightShiftForDivide and:\r\t [(divisor _ arg value) isInteger and:\r\t [divisor isPowerOfTwo and:\r\t [divisor > 0 and:\r\t [divisor <= (1 bitShift: 31)]]]]])\r\tifTrue: [\r\t\t\"use signed (arithmetic) right shift instead of divide\"\r\t\taStream nextPutAll: '((sqInt) '.\r\t\tself emitCExpression: rcvr on: aStream.\r\t\taStream nextPutAll: ' >> ', (divisor log: 2) asInteger printString.\r\t\taStream nextPutAll: ')'.\r\t] ifFalse: [\r\t\tself emitCExpression: rcvr on: aStream.\r\t\taStream nextPutAll: ' / '.\r\t\tself emitCExpression: arg on: aStream].\r! !\r\r!CCodeGenerator methodsFor: 'C translation' stamp: 'ikp 8/4/2004 18:25'!\rgenerateShiftRight: msgNode on: aStream indent: level\r\t\"Generate the C code for this message onto the given stream.\"\r\r\taStream nextPutAll: '((usqInt) '.\r\tself emitCExpression: msgNode receiver on: aStream.\r\taStream nextPutAll: ')'.\r\taStream nextPutAll: ' >> '.\r\tself emitCExpression: msgNode args first on: aStream.! !\r\r\r!CCodeGeneratorGlobalStructure methodsFor: 'C code generator' stamp: 'ikp 6/9/2004 16:05'!\remitCVariablesOn: aStream\r\t\"Store the global variable declarations on the given stream.\r\tbreak logic into vars for structure and vars for non-structure\"\r\t| varString structure nonstruct target |\r\r\tstructure _ WriteStream on: (String new: 32768).\r\tnonstruct _ WriteStream on: (String new: 32768).\r\taStream nextPutAll: '/*** Variables ***/'; cr.\r\tstructure nextPutAll: 'struct foo {'; cr.\r\tself buildSortedVariablesCollection do: [ :var |\r\t\tvarString _ var asString.\r\t\ttarget _ (self placeInStructure: var) \r\t\t\tifTrue: [structure]\r\t\t\tifFalse: [nonstruct].\r\t\t(self isGeneratingPluginCode) ifTrue:[\r\t\t\tvarString = 'interpreterProxy' ifTrue:[\r\t\t\t\t\"quite special...\"\r\t\t\t\taStream cr; nextPutAll: '#ifdef SQUEAK_BUILTIN_PLUGIN'.\r\t\t\t\taStream cr; nextPutAll: 'extern'.\r\t\t\t\taStream cr; nextPutAll: '#endif'; cr.\r\t\t\t] ifFalse:[aStream nextPutAll:'static '].\r\t\t].\r\t\t(variableDeclarations includesKey: varString) ifTrue: [\r\t\t\ttarget nextPutAll: (variableDeclarations at: varString), ';'; cr.\r\t\t] ifFalse: [\r\t\t\t\"default variable declaration\"\r\t\t\ttarget nextPutAll: 'sqInt ', varString, ';'; cr.\r\t\t].\r\t].\r\tstructure nextPutAll: ' } fum;';cr.\r\r\t\"if the machine needs the fum structure defining locally, do it now\"\r\tlocalStructDef ifTrue:[structure nextPutAll: 'struct foo * foo = &fum;';cr;cr].\r\r\taStream nextPutAll: structure contents.\r\taStream nextPutAll: nonstruct contents.\r\taStream cr.! !\r\r\r!CObjectAccessor methodsFor: 'converting' stamp: 'di 7/14/2004 17:36'!\rasFloatAccessor\r\r\t^ self asPluggableAccessor\r\t\tatBlock: [:obj :index | obj floatAt: index]\r\t\tatPutBlock: [:obj :index :value | obj floatAt: index put: value]! !\r\r!CObjectAccessor methodsFor: 'converting' stamp: 'di 7/14/2004 17:36'!\rasIntAccessor\r\r\t^ self asPluggableAccessor\r\t\tatBlock: [:obj :index | obj intAt: index]\r\t\tatPutBlock: [:obj :index :value | obj intAt: index put: value]! !\r\r!CObjectAccessor methodsFor: 'converting' stamp: 'di 7/14/2004 11:55'!\rasPluggableAccessor\r\t^ (CPluggableAccessor on: object) += offset! !\r\r!CObjectAccessor methodsFor: 'converting' stamp: 'di 7/14/2004 17:38'!\rcoerceTo: cTypeString sim: interpreterSimulator\r\r\tcTypeString = 'float *' ifTrue: [^ self asFloatAccessor].\r\tcTypeString = 'int *' ifTrue: [^ self asIntAccessor].\r\t^ self! !\r\r!CObjectAccessor methodsFor: 'accessing' stamp: 'di 7/14/2004 12:13'!\risCObjectAccessor\r\r\t^ true! !\r\r\r!CPluggableAccessor methodsFor: 'initialize' stamp: 'di 7/14/2004 11:55'!\ratBlock: rBlock atPutBlock: wBlock\r\treadBlock _ rBlock.\r\twriteBlock _ wBlock! !\r\r\r!CompiledMethod methodsFor: 'accessing' stamp: 'di 6/29/2004 12:28'!\rinitialPC\r\t\"Answer the program counter for the receiver's first bytecode.\"\r\r\t^ (self numLiterals + 1) * Smalltalk wordSize + 1\r! !\r\r\r!Integer methodsFor: '*VMMaker-interpreter simulator' stamp: 'di 7/16/2004 15:06'!\rsignedIntFromLong\r\t\"Self is an unsigned 32-bit integer\"\r\r\t| sign |\r\tself < 0 ifTrue: [self error: 'only valid for unsigned ints'].\r\tsign _ self bitAnd: 16r80000000.\r\tsign = 0 ifTrue: [^ self].\r\t^ self - sign - sign! !\r\r!Integer methodsFor: '*VMMaker-interpreter simulator' stamp: 'di 7/16/2004 15:06'!\rsignedIntFromShort\r\t\"Self is an unsigned 16-bit integer in twos-comp form\"\r\r\t| sign |\r\tself < 0 ifTrue: [self error: 'only valid for unsigned ints'].\r\tsign _ self bitAnd: 16r8000.\r\tsign = 0 ifTrue: [^ self].\r\t^ self - sign - sign! !\r\r!Integer methodsFor: '*VMMaker-interpreter simulator' stamp: 'di 7/14/2004 12:27'!\rsignedIntToLong\r\t\"Produces a 32-bit value in twos-comp form.  Sorry no error checking\"\r\r\tself >= 0\r\t\tifTrue: [^ self]\r\t\tifFalse: [^ self + 16r80000000 + 16r80000000]\r! !\r\r!Integer methodsFor: '*VMMaker-interpreter simulator' stamp: 'di 7/14/2004 12:26'!\rsignedIntToShort\r\t\"Produces a 16-bit value (0-65k) in twos-comp form.  Sorry no error checking\"\r\r\tself >= 0\r\t\tifTrue: [^ self]\r\t\tifFalse: [^ self + 16r8000 + 16r8000]\r! !\r\r\r!InterpreterPlugin methodsFor: 'initialize' stamp: 'ikp 8/3/2004 19:18'!\rgetInterpreter\r\t\"Note: This is coded so that plugins can be run from Squeak.\"\r\r\tself returnTypeC: 'VirtualMachine *'.\r\t^interpreterProxy! !\r\r\r!BalloonEngineBase methodsFor: 'accessing state' stamp: 'ar 7/11/2004 13:43'!\rworkBufferPut: wbOop\r\tworkBuffer := interpreterProxy firstIndexableField: wbOop.! !\r\r!BalloonEngineBase methodsFor: 'displaying' stamp: 'ikp 8/9/2004 18:22'!\rfillSpan: fill from: leftX to: rightX\r\t\"Fill the span buffer from leftX to rightX with the given fill.\r\tClip before performing any operations. Return true if the fill must\r\tbe handled by some Smalltalk code.\"\r\t| x0 x1 type |\r\tself var: #fill type: 'unsigned int'.\r\tself inline: false.\r\tfill = 0 ifTrue:[^false]. \"Nothing to do\"\r\t\"Start from spEnd - we must not paint pixels twice at a scan line\"\r\tleftX < self spanEndAAGet \r\t\tifTrue:[x0 _ self spanEndAAGet]\r\t\tifFalse:[x0 _ leftX].\r\trightX > (self spanSizeGet << self aaShiftGet) \r\t\tifTrue:[x1 _ (self spanSizeGet << self aaShiftGet)]\r\t\tifFalse:[x1 _ rightX].\r\r\t\"Clip left and right values\"\r\tx0 < self fillMinXGet ifTrue:[x0 _ self fillMinXGet].\r\tx1 > self fillMaxXGet ifTrue:[x1 _ self fillMaxXGet].\r\r\t\"Adjust start and end values of span\"\r\tx0 < self spanStartGet ifTrue:[self spanStartPut: x0].\r\tx1 > self spanEndGet ifTrue:[self spanEndPut: x1].\r\tx1 > self spanEndAAGet ifTrue:[self spanEndAAPut: x1].\r\r\tx0 >= x1 ifTrue:[^false]. \"Nothing to do\"\r\r\t(self isFillColor: fill) ifTrue:[\r\t\tself fillColorSpan: fill from: x0 to: x1.\r\t] ifFalse:[\r\t\t\"Store the values for the dispatch\"\r\t\tself lastExportedFillPut: fill.\r\t\tself lastExportedLeftXPut: x0.\r\t\tself lastExportedRightXPut: x1.\r\t\ttype _ self fillTypeOf: fill.\r\t\ttype <= 1 ifTrue:[^true].\r\t\tself dispatchOn: type in: FillTable.\r\t].\r\t^false! !\r\r!BalloonEngineBase methodsFor: 'GET processing' stamp: 'di 7/14/2004 13:09'!\rinitializeGETProcessing\r\t\"Initialization stuff that needs to be done before any processing can take place.\"\r\tself inline: false.\r\r\t\"Make sure aaLevel is initialized\"\r\tself setAALevel: self aaLevelGet.\r\r\tself clipMinXGet < 0 ifTrue:[self clipMinXPut: 0].\r\tself clipMaxXGet > self spanSizeGet ifTrue:[self clipMaxXPut: self spanSizeGet].\r\t\"Convert clipRect to aaLevel\"\r\tself fillMinXPut: self clipMinXGet << self aaShiftGet.\r\tself fillMinYPut: self clipMinYGet << self aaShiftGet.\r\tself fillMaxXPut: self clipMaxXGet << self aaShiftGet.\r\tself fillMaxYPut: self clipMaxYGet << self aaShiftGet.\r\r\t\"Reset GET and AET\"\r\tself getUsedPut: 0.\r\tself aetUsedPut: 0.\r\tgetBuffer _ objBuffer + objUsed.\r\taetBuffer _ objBuffer + objUsed.\r\r\t\"Create the global edge table\"\r\tself createGlobalEdgeTable.\r\tengineStopped ifTrue:[^nil].\r\r\tself getUsedGet = 0 ifTrue:[\r\t\t\"Nothing to do\"\r\t\tself currentYPut: self fillMaxYGet.\r\t\t^0].\r\r\t\"Sort entries in the GET\"\r\tself sortGlobalEdgeTable.\r\r\t\"Find the first y value to be processed\"\r\tself currentYPut: (self edgeYValueOf: (getBuffer at: 0)).\r\tself currentYGet < self fillMinYGet ifTrue:[self currentYPut: self fillMinYGet].\r\r\t\"Load and clear the span buffer\"\r\tself spanStartPut: 0.\r\tself spanEndPut: (self spanSizeGet << self aaShiftGet) - 1.\r\tself clearSpanBuffer. \"@@: Is this really necessary?!!\"! !\r\r!BalloonEngineBase methodsFor: 'private' stamp: 'ikp 6/14/2004 15:14'!\rcopyBitsFrom: x0 to: x1 at: yValue\r\r\tcopyBitsFn = 0 ifTrue: [\r\t\t\"We need copyBits here so try to load it implicitly\"\r\t\tself initialiseModule ifFalse: [^false].\r\t].\r\t^self cCode: '((sqInt (*)(sqInt, sqInt, sqInt))copyBitsFn)(x0, x1, yValue)'! !\r\r!BalloonEngineBase methodsFor: 'private' stamp: 'ikp 6/14/2004 15:14'!\rloadBitBltFrom: bbObj\r\r\tloadBBFn = 0 ifTrue: [\r\t\t\"We need copyBits here so try to load it implicitly\"\r\t\tself initialiseModule ifFalse:[^false].\r\t].\r\t^self cCode: '((sqInt (*)(sqInt))loadBBFn)(bbObj)'! !\r\r!BalloonEngineBase methodsFor: 'loading state' stamp: 'ar 7/11/2004 13:42'!\rloadWorkBufferFrom: wbOop\r\t\"Load the working buffer from the given oop\"\r\tself inline: false.\r\t(interpreterProxy isIntegerObject: wbOop) ifTrue:[^false].\r\t(interpreterProxy isWords: wbOop) ifFalse:[^false].\r\t(interpreterProxy slotSizeOf: wbOop) < GWMinimalSize ifTrue:[^false].\r\tself workBufferPut: wbOop.\r\tself magicNumberGet = GWMagicNumber ifFalse:[^false].\r\t\"Sanity checks\"\r\t(self wbSizeGet = (interpreterProxy slotSizeOf: wbOop)) ifFalse:[^false].\r\tself objStartGet = GWHeaderSize ifFalse:[^false].\r\r\t\"Load buffers\"\r\tobjBuffer _ workBuffer + self objStartGet.\r\tgetBuffer _ objBuffer + self objUsedGet.\r\taetBuffer _ getBuffer + self getUsedGet.\r\r\t\"Make sure we don't exceed the work buffer\"\r\tGWHeaderSize + self objUsedGet + self getUsedGet + self aetUsedGet > self wbSizeGet ifTrue:[^false].\r\r\t^true! !\r\r!BalloonEngineBase methodsFor: 'primitives-other' stamp: 'ar 7/11/2004 13:42'!\rprimitiveInitializeBuffer\r\t| wbOop size |\r\tself export: true.\r\tself inline: false.\r\tinterpreterProxy methodArgumentCount = 1\r\t\tifFalse:[^interpreterProxy primitiveFail].\r\twbOop _ interpreterProxy stackObjectValue: 0.\r\tinterpreterProxy failed ifTrue:[^nil].\r\t(interpreterProxy isWords: wbOop) \r\t\tifFalse:[^interpreterProxy primitiveFail].\r\t(size _ interpreterProxy slotSizeOf: wbOop) < GWMinimalSize\r\t\tifTrue:[^interpreterProxy primitiveFail].\r\tself workBufferPut: wbOop.\r\tobjBuffer _ workBuffer + GWHeaderSize.\r\tself magicNumberPut: GWMagicNumber.\r\tself wbSizePut: size.\r\tself wbTopPut: size.\r\tself statePut: GEStateUnlocked.\r\tself objStartPut: GWHeaderSize.\r\tself objUsedPut: 4.\t\"Dummy fill object\"\r\tself objectTypeOf: 0 put: GEPrimitiveFill.\r\tself objectLengthOf: 0 put: 4.\r\tself objectIndexOf: 0 put: 0.\r\tself getStartPut: 0.\r\tself getUsedPut: 0.\r\tself aetStartPut: 0.\r\tself aetUsedPut: 0.\r\tself stopReasonPut: 0.\r\tself needsFlushPut: 0.\r\tself clipMinXPut: 0.\r\tself clipMaxXPut: 0.\r\tself clipMinYPut: 0.\r\tself clipMaxYPut: 0.\r\tself currentZPut: 0.\r\tself resetGraphicsEngineStats.\r\tself initEdgeTransform.\r\tself initColorTransform.\r\tinterpreterProxy pop: 2.\r\tinterpreterProxy push: wbOop.! !\r\r\r!BalloonEnginePlugin methodsFor: 'fills-bitmaps' stamp: 'ikp 6/14/2004 15:22'!\rbitmapValue: bmFill bits: bits atX: xp y: yp\r\r\t| bmDepth bmRaster value rShift cMask r g b a |\r\tself inline: true.\r\r\tbmDepth _ self bitmapDepthOf: bmFill.\r\tbmRaster _ self bitmapRasterOf: bmFill.\r\tbmDepth = 32 ifTrue: [\r\t\tvalue _ (self cCoerce: bits to:'int*') at: (bmRaster * yp) + xp.\r\t\t(value ~= 0 and: [(value bitAnd: 16rFF000000) = 0])\r\t\t\t\tifTrue: [value _ value bitOr: 16rFF000000].\r\t\t^self uncheckedTransformColor: value].\r\t\"rShift - shift value to convert from pixel to word index\"\r\trShift _ self rShiftTable at: bmDepth.\r\tvalue _ self makeUnsignedFrom: \r\t\t((self cCoerce: bits to:'int*') at: (bmRaster * yp) + (xp >> rShift)).\r\t\"cMask - mask out the pixel from the word\"\r\tcMask _ (1 << bmDepth) - 1.\r\t\"rShift - shift value to move the pixel in the word to the lowest bit position\"\r\trShift _ 32 - bmDepth - ((xp bitAnd: (1 << rShift - 1)) * bmDepth).\r\tvalue _ (value >> rShift) bitAnd: cMask.\r\tbmDepth = 16 ifTrue: [\r\t\t\"Must convert by expanding bits\"\r\t\tvalue = 0 ifFalse: [\r\t\t\tb _ (value bitAnd: 31) << 3.\t\tb _ b + (b >> 5).\r\t\t\tg _ (value >> 5 bitAnd: 31) << 3.\tg _ g + (g >> 5).\r\t\t\tr _ (value >> 10 bitAnd: 31) << 3.\tr _ r + (r >> 5).\r\t\t\ta _ 255.\r\t\t\tvalue _ b + (g << 8) + (r << 16) + (a << 24)].\r\t] ifFalse: [\r\t\t\"Must convert by using color map\"\r\t\t(self bitmapCmSizeOf: bmFill) = 0\r\t\t\tifTrue: [value _ 0]\r\t\t\tifFalse: [value _ self makeUnsignedFrom: ((self colormapOf: bmFill) at: value)].\r\t].\r\t^self uncheckedTransformColor: value.! !\r\r!BalloonEnginePlugin methodsFor: 'shapes-compressed' stamp: 'di 7/16/2004 15:19'!\rcheckCompressedFillIndexList: fillList max: maxIndex segments: nSegs\r\t\"Check the fill indexes in the run-length encoded fillList\"\r\t| length runLength runValue nFills fillPtr |\r\tself inline: false.\r\tself var: #fillPtr declareC:'int *fillPtr'.\r\tlength _ interpreterProxy slotSizeOf: fillList.\r\tfillPtr _ interpreterProxy firstIndexableField: fillList.\r\tnFills _ 0.\r\t0 to: length-1 do:[:i |\r\t\trunLength _ self shortRunLengthAt: i from: fillPtr.\r\t\trunValue _ self shortRunValueAt: i from: fillPtr.\r\t\t(runValue >= 0 and:[runValue <= maxIndex]) ifFalse:[^false].\r\t\tnFills _ nFills + runLength.\r\t].\r\t^nFills = nSegs! !\r\r!BalloonEnginePlugin methodsFor: 'shapes-compressed' stamp: 'di 7/16/2004 15:13'!\rcheckCompressedFills: indexList\r\t\"Check if the indexList (containing fill handles) is okay.\"\r\t| fillPtr length fillIndex |\r\tself inline: false.\r\tself var: #fillPtr declareC:'int *fillPtr'.\r\t\"First check if the oops have the right format\"\r\t(interpreterProxy isWords: indexList) ifFalse:[^false].\r\r\t\"Then check the fill entries\"\r\tlength _ interpreterProxy slotSizeOf: indexList.\r\tfillPtr _ interpreterProxy firstIndexableField: indexList.\r\t0 to: length-1 do:[:i |\r\t\tfillIndex _ fillPtr at: i.\r\t\t\"Make sure the fill is okay\"\r\t\t(self isFillOkay: fillIndex) ifFalse:[^false]].\r\r\t^ true! !\r\r\r!BalloonEngineSimulation methodsFor: 'simulation' stamp: 'di 7/13/2004 16:42'!\rcopyBitsFrom: x0 to: x1 at: y\r\t\"Simulate the copyBits primitive\"\r\r\t| bb |\r\tbbObj isInteger ifTrue:\r\t\t[\"Create a proxy object to handle BitBlt calls\"\r\t\tbb _ BitBltSimulator new.\r\t\tbb initialiseModule.\r\t\tbb setInterpreter: interpreterProxy.\r\t\t(bb loadBitBltFrom: bbObj)\r\t\t\tifTrue: [bbObj _ bb]\r\t\t\tifFalse: [^ self]].\r\tbbObj copyBitsFrom: x0 to: x1 at: y.\r\"\r\tinterpreterProxy showDisplayBits: bbObj destForm\r\t\tLeft: bb affectedLeft Top: bb affectedTop\r\t\tRight: bb affectedRight Bottom: bb affectedBottom.\r\"! !\r\r!BalloonEngineSimulation methodsFor: 'simulation' stamp: 'di 7/16/2004 15:07'!\rloadPointShortAt: index from: intArray\r\t\"Load the short value from the given index in intArray\"\r\r\t| long |\r\tlong _ intArray at: index // 2.\r\t^ ((index bitAnd: 1) = 0\r\t\tifTrue:[interpreterProxy halfWordHighInLong32: long]\r\t\tifFalse:[interpreterProxy halfWordLowInLong32: long])\r\t\tsignedIntFromShort\r! !\r\r!BalloonEngineSimulation methodsFor: 'simulation' stamp: 'di 7/16/2004 15:11'!\rshortRunLengthAt: index from: runArray\r\t\"Load the short value from the given index in intArray\"\r\r\t^ interpreterProxy halfWordHighInLong32: (runArray at: index)! !\r\r!BalloonEngineSimulation methodsFor: 'simulation' stamp: 'di 7/16/2004 15:10'!\rshortRunValueAt: index from: runArray\r\t\"Load the short value from the given index in intArray\"\r\r\t^ (interpreterProxy halfWordLowInLong32: (runArray at: index)) signedIntFromShort ! !\r\r!BalloonEngineSimulation methodsFor: 'simulation' stamp: 'di 7/16/2004 12:37'!\rworkBufferPut: wbOop\r\tinterpreterProxy isInterpreterProxy \r\t\tifTrue:[^super workBufferPut: wbOop].\r\tworkBuffer := ((interpreterProxy firstIndexableField: wbOop) as: BalloonArray) asCArrayAccessor.\r\tworkBufferArray ifNil:\r\t\t[workBufferArray _ Array new: (interpreterProxy slotSizeOf: wbOop)].\r\tworkBuffer getObject setSimArray: workBufferArray! !\r\r!BalloonEngineSimulation methodsFor: 'initialize' stamp: 'di 7/12/2004 15:54'!\rinitialiseModule\r\tsuper initialiseModule.\r\t^ true! !\r\r!BalloonEngineSimulation methodsFor: 'initialize' stamp: 'di 7/15/2004 16:19'!\rloadWordTransformFrom: transformOop into: destPtr length: n\r\t\"Load a float array transformation from the given oop\"\r\r\t| srcPtr wordDestPtr |\r\rtrue ifTrue:\r[^ super loadWordTransformFrom: transformOop into: destPtr length: n].\r\r\tsrcPtr _ interpreterProxy firstIndexableField: transformOop.\r\twordDestPtr _ destPtr as: CArrayAccessor.  \"Remove float conversion shell\"\r\t0 to: n-1 do: [:i | wordDestPtr at: i put: (srcPtr at: i)].! !\r\r!BalloonEngineSimulation methodsFor: 'initialize' stamp: 'di 7/16/2004 12:06'!\rprimitiveInitializeBuffer\r\r\t\"Fix an uninitialized variable (should probably go into the real engine too)\"\r\tsuper primitiveInitializeBuffer.\r\tself spanEndAAPut: 0.! !\r\r!BalloonEngineSimulation methodsFor: 'initialize' stamp: 'di 7/12/2004 16:15'!\rprimitiveSetBitBltPlugin\r\t\"Primitive. Set the BitBlt plugin to use.\"\r\t| pluginName |\r\tpluginName _ interpreterProxy stackValue: 0.\r\t\"Must be string to work\"\r\t(interpreterProxy isBytes: pluginName) \r\t\tifFalse:[^interpreterProxy primitiveFail].\r\t(interpreterProxy stringOf: pluginName) = bbPluginName\r\t\tifTrue: [interpreterProxy pop: 1. \"Return receiver\"]\r\t\tifFalse: [^interpreterProxy primitiveFail]! !\r\r\r!BitBltSimulation methodsFor: 'combination rules' stamp: 'ikp 6/11/2004 16:38'!\rmerge: sourceWord with: destinationWord\r\t| mergeFnwith |\r\t\"Sender warpLoop is too big to include this in-line\"\r\tself var: #mergeFnwith declareC: 'sqInt (*mergeFnwith)(sqInt, sqInt)'.\r\tmergeFnwith _ self cCoerce: (opTable at: combinationRule+1) to: 'sqInt (*)(sqInt, sqInt)'.\r\tmergeFnwith.  \"null ref for compiler\"\r\r\t^ self mergeFn: sourceWord with: destinationWord! !\r\r!BitBltSimulation methodsFor: 'inner loop' stamp: 'ikp 8/4/2004 18:03'!\ralphaSourceBlendBits32\r\t\"This version assumes \r\t\tcombinationRule = 34\r\t\tsourcePixSize = destPixSize = 32\r\t\tsourceForm ~= destForm.\r\tNote: The inner loop has been optimized for dealing\r\t\twith the special cases of srcAlpha = 0.0 and srcAlpha = 1.0 \r\t\"\r\t| srcIndex dstIndex sourceWord srcAlpha destWord deltaX deltaY srcY dstY |\r\tself inline: false. \"This particular method should be optimized in itself\"\r\r\t\"Give the compile a couple of hints\"\r\r\t\"The following should be declared as pointers so the compiler will\r\tnotice that they're used for accessing memory locations \r\t(good to know on an Intel architecture) but then the increments\r\twould be different between ST code and C code so must hope the\r\tcompiler notices what happens (MS Visual C does)\"\r\r\tdeltaY _ bbH + 1. \"So we can pre-decrement\"\r\tsrcY _ sy.\r\tdstY _ dy.\r\r\t\"This is the outer loop\"\r\t[(deltaY _ deltaY - 1) ~= 0] whileTrue:[\r\t\tsrcIndex _ sourceBits + (srcY * sourcePitch) + (sx * 4).\r\t\tdstIndex _ destBits + (dstY * destPitch) + (dx * 4).\r\t\tdeltaX _ bbW + 1. \"So we can pre-decrement\"\r\r\t\t\"This is the inner loop\"\r\t\t[(deltaX _ deltaX - 1) ~= 0] whileTrue:[\r\t\t\tsourceWord _ self srcLongAt: srcIndex.\r\t\t\tsrcAlpha _ sourceWord >> 24.\r\t\t\tsrcAlpha = 255 ifTrue:[\r\t\t\t\tself dstLongAt: dstIndex put: sourceWord.\r\t\t\t\tsrcIndex _ srcIndex + 4.\r\t\t\t\tdstIndex _ dstIndex + 4.\r\t\t\t\t\"Now copy as many words as possible with alpha = 255\"\r\t\t\t\t[(deltaX _ deltaX - 1) ~= 0 and:[\r\t\t\t\t\t(sourceWord _ self srcLongAt: srcIndex) >> 24 = 255]]\r\t\t\t\t\t\twhileTrue:[\r\t\t\t\t\t\t\tself dstLongAt: dstIndex put: sourceWord.\r\t\t\t\t\t\t\tsrcIndex _ srcIndex + 4.\r\t\t\t\t\t\t\tdstIndex _ dstIndex + 4.\r\t\t\t\t\t\t].\r\t\t\t\t\"Adjust deltaX\"\r\t\t\t\tdeltaX _ deltaX + 1.\r\t\t\t] ifFalse:[ \"srcAlpha ~= 255\"\r\t\t\t\tsrcAlpha = 0 ifTrue:[\r\t\t\t\t\tsrcIndex _ srcIndex + 4.\r\t\t\t\t\tdstIndex _ dstIndex + 4.\r\t\t\t\t\t\"Now skip as many words as possible,\"\r\t\t\t\t\t[(deltaX _ deltaX - 1) ~= 0 and:[\r\t\t\t\t\t\t(sourceWord _ self srcLongAt: srcIndex) >> 24 = 0]]\r\t\t\t\t\t\twhileTrue:[\r\t\t\t\t\t\t\tsrcIndex _ srcIndex + 4.\r\t\t\t\t\t\t\tdstIndex _ dstIndex + 4.\r\t\t\t\t\t\t].\r\t\t\t\t\t\"Adjust deltaX\"\r\t\t\t\t\tdeltaX _ deltaX + 1.\r\t\t\t\t] ifFalse:[ \"0 < srcAlpha < 255\"\r\t\t\t\t\t\"If we have to mix colors then just copy a single word\"\r\t\t\t\t\tdestWord _ self dstLongAt: dstIndex.\r\t\t\t\t\tdestWord _ self alphaBlendScaled: sourceWord with: destWord.\r\t\t\t\t\tself dstLongAt: dstIndex put: destWord.\r\t\t\t\t\tsrcIndex _ srcIndex + 4.\r\t\t\t\t\tdstIndex _ dstIndex + 4.\r\t\t\t\t].\r\t\t\t].\r\t\t].\r\t\tsrcY _ srcY + 1.\r\t\tdstY _ dstY + 1.\r\t].! !\r\r!BitBltSimulation methodsFor: 'inner loop' stamp: 'ikp 6/11/2004 16:27'!\rcopyLoop\r\t| prevWord thisWord skewWord halftoneWord mergeWord hInc y unskew skewMask notSkewMask mergeFnwith destWord |\r\t\"This version of the inner loop assumes noSource = false.\"\r\tself inline: false.\r\tself var: #mergeFnwith declareC: 'sqInt (*mergeFnwith)(sqInt, sqInt)'.\r\tmergeFnwith _ self cCoerce: (opTable at: combinationRule+1) to: 'sqInt (*)(sqInt, sqInt)'.\r\tmergeFnwith.  \"null ref for compiler\"\r\r\thInc _ hDir*4.  \"Byte delta\"\r\t\"degenerate skew fixed for Sparc. 10/20/96 ikp\"\r\tskew == -32\r\t\tifTrue: [skew _ unskew _ skewMask _ 0]\r\t\tifFalse: [skew < 0\r\t\t\tifTrue:\r\t\t\t\t[unskew _ skew+32.\r\t\t\t\tskewMask _ AllOnes << (0-skew)]\r\t\t\tifFalse:\r\t\t\t\t[skew = 0\r\t\t\t\t\tifTrue:\r\t\t\t\t\t\t[unskew _ 0.\r\t\t\t\t\t\tskewMask _ AllOnes]\r\t\t\t\t\tifFalse:\r\t\t\t\t\t\t[unskew _ skew-32.\r\t\t\t\t\t\tskewMask _ AllOnes >> skew]]].\r\tnotSkewMask _ skewMask bitInvert32.\r\tnoHalftone\r\t\tifTrue: [halftoneWord _ AllOnes.  halftoneHeight _ 0]\r\t\tifFalse: [halftoneWord _ self halftoneAt: 0].\r\r\ty _ dy.\r\t1 to: bbH do: \"here is the vertical loop\"\r\t\t[ :i |\r\t\thalftoneHeight > 1 ifTrue:  \"Otherwise, its always the same\"\r\t\t\t[halftoneWord _ self halftoneAt: y.\r\t\t\ty _ y + vDir].\r\t\tpreload ifTrue:\r\t\t\t[\"load the 64-bit shifter\"\r\t\t\tprevWord _ self srcLongAt: sourceIndex.\r\t\t\tsourceIndex _ sourceIndex + hInc]\r\t\t\tifFalse:\r\t\t\t[prevWord _ 0].\r\r\t\"Note: the horizontal loop has been expanded into three parts for speed:\"\r\r\t\t\t\"This first section requires masking of the destination store...\"\r\t\t\tdestMask _ mask1.\r\t\t\tthisWord _ self srcLongAt: sourceIndex.  \"pick up next word\"\r\t\t\tsourceIndex _ sourceIndex + hInc.\r\t\t\tskewWord _ ((prevWord bitAnd: notSkewMask) bitShift: unskew)\r\t\t\t\t\t\t\tbitOr:  \"32-bit rotate\"\r\t\t\t\t\t\t((thisWord bitAnd: skewMask) bitShift: skew).\r\t\t\tprevWord _ thisWord.\r\t\t\tdestWord _ self dstLongAt: destIndex.\r\t\t\tmergeWord _ self mergeFn: (skewWord bitAnd: halftoneWord) with: destWord.\r\t\t\tdestWord _ (destMask bitAnd: mergeWord) bitOr:\r\t\t\t\t\t\t\t(destWord bitAnd: destMask bitInvert32).\r\t\t\tself dstLongAt: destIndex put: destWord.\r\t\t\tdestIndex _ destIndex + hInc.\r\r\t\t\"This central horizontal loop requires no store masking\"\r\t\tdestMask _ AllOnes.\rcombinationRule = 3\rifTrue: [(skew = 0) & (halftoneWord = AllOnes)\r\t\tifTrue: \r\t\t[\"Very special inner loop for STORE mode with no skew -- just move words\"\r\t\thDir = -1\r\t\tifTrue: [\"Woeful patch: revert to older code for hDir = -1\"\r\t\t\t\t2 to: nWords-1 do: \r\t\t\t\t\t[ :word |\r\t\t\t\t\tthisWord _ self srcLongAt: sourceIndex.\r\t\t\t\t\tsourceIndex _ sourceIndex + hInc.\r\t\t\t\t\tself dstLongAt: destIndex put: thisWord.\r\t\t\t\t\tdestIndex _ destIndex + hInc]]\r\t\tifFalse: [2 to: nWords-1 do: \r\t\t\t\t\t[ :word |  \"Note loop starts with prevWord loaded (due to preload)\"\r\t\t\t\t\tself dstLongAt: destIndex put: prevWord.\r\t\t\t\t\tdestIndex _ destIndex + hInc.\r\t\t\t\t\tprevWord _ self srcLongAt: sourceIndex.\r\t\t\t\t\tsourceIndex _ sourceIndex + hInc]]]\r\t\tifFalse:\r\t\t[\"Special inner loop for STORE mode -- no need to call merge\"\r\t\t2 to: nWords-1 do: \r\t\t\t[ :word |\r\t\t\tthisWord _ self srcLongAt: sourceIndex.\r\t\t\tsourceIndex _ sourceIndex + hInc.\r\t\t\tskewWord _ ((prevWord bitAnd: notSkewMask) bitShift: unskew)\r\t\t\t\t\t\t\tbitOr:  \"32-bit rotate\"\r\t\t\t\t\t\t((thisWord bitAnd: skewMask) bitShift: skew).\r\t\t\tprevWord _ thisWord.\r\t\t\tself dstLongAt: destIndex put: (skewWord bitAnd: halftoneWord).\r\t\t\tdestIndex _ destIndex + hInc]]\r] ifFalse: [2 to: nWords-1 do: \"Normal inner loop does merge:\"\r\t\t\t[ :word |\r\t\t\tthisWord _ self srcLongAt: sourceIndex.  \"pick up next word\"\r\t\t\tsourceIndex _ sourceIndex + hInc.\r\t\t\tskewWord _ ((prevWord bitAnd: notSkewMask) bitShift: unskew)\r\t\t\t\t\t\t\tbitOr:  \"32-bit rotate\"\r\t\t\t\t\t\t((thisWord bitAnd: skewMask) bitShift: skew).\r\t\t\tprevWord _ thisWord.\r\t\t\tmergeWord _ self mergeFn: (skewWord bitAnd: halftoneWord)\r\t\t\t\t\t\t\twith: (self dstLongAt: destIndex).\r\t\t\tself dstLongAt: destIndex put: mergeWord.\r\t\t\tdestIndex _ destIndex + hInc]\r].\r\r\t\t\"This last section, if used, requires masking of the destination store...\"\r\t\tnWords > 1 ifTrue:\r\t\t\t[destMask _ mask2.\r\t\t\tthisWord _ self srcLongAt: sourceIndex.  \"pick up next word\"\r\t\t\tsourceIndex _ sourceIndex + hInc.\r\t\t\tskewWord _ ((prevWord bitAnd: notSkewMask) bitShift: unskew)\r\t\t\t\t\t\t\tbitOr:  \"32-bit rotate\"\r\t\t\t\t\t\t((thisWord bitAnd: skewMask) bitShift: skew).\r\t\t\tdestWord _ self dstLongAt: destIndex.\r\t\t\tmergeWord _ self mergeFn: (skewWord bitAnd: halftoneWord) with: destWord.\r\t\t\tdestWord _ (destMask bitAnd: mergeWord) bitOr:\r\t\t\t\t\t\t\t(destWord bitAnd: destMask bitInvert32).\r\t\t\tself dstLongAt: destIndex put: destWord.\r\t\t\tdestIndex _ destIndex + hInc].\r\r\tsourceIndex _ sourceIndex + sourceDelta.\r\tdestIndex _ destIndex + destDelta]! !\r\r!BitBltSimulation methodsFor: 'inner loop' stamp: 'ikp 6/11/2004 16:27'!\rcopyLoopNoSource\r\t\"Faster copyLoop when source not used.  hDir and vDir are both\r\tpositive, and perload and skew are unused\"\r\t| halftoneWord mergeWord mergeFnwith destWord |\r\tself inline: false.\r\tself var: #mergeFnwith declareC: 'sqInt (*mergeFnwith)(sqInt, sqInt)'.\r\tmergeFnwith _ self cCoerce: (opTable at: combinationRule+1) to: 'sqInt (*)(sqInt, sqInt)'.\r\tmergeFnwith.  \"null ref for compiler\"\r\r\t1 to: bbH do: \"here is the vertical loop\"\r\t\t[ :i |\r\t\tnoHalftone\r\t\t\tifTrue: [halftoneWord _ AllOnes]\r\t\t\tifFalse: [halftoneWord _ self halftoneAt: dy+i-1].\r\r\t\"Note: the horizontal loop has been expanded into three parts for speed:\"\r\r\t\t\t\"This first section requires masking of the destination store...\"\r\t\t\tdestMask _ mask1.\r\t\t\tdestWord _ self dstLongAt: destIndex.\r\t\t\tmergeWord _ self mergeFn: halftoneWord\r\t\t\t\t\t\t\twith: destWord.\r\t\t\tdestWord _ (destMask bitAnd: mergeWord) bitOr: \r\t\t\t\t\t\t\t(destWord bitAnd: destMask bitInvert32).\r\t\t\tself dstLongAt: destIndex put: destWord.\r\t\t\tdestIndex _ destIndex + 4.\r\r\t\t\"This central horizontal loop requires no store masking\"\r\t\t\tdestMask _ AllOnes.\r\t\t\tcombinationRule = 3 ifTrue: [\"Special inner loop for STORE\"\r\t\t\t\tdestWord _ halftoneWord.\r\t\t\t\t2 to: nWords-1 do:[ :word |\r\t\t\t\t\tself dstLongAt: destIndex put: destWord.\r\t\t\t\t\tdestIndex _ destIndex + 4].\r\t\t\t] ifFalse:[ \"Normal inner loop does merge\"\r\t\t\t\t2 to: nWords-1 do:[ :word | \"Normal inner loop does merge\"\r\t\t\t\t\tdestWord _ self dstLongAt: destIndex.\r\t\t\t\t\tmergeWord _ self mergeFn: halftoneWord with: destWord.\r\t\t\t\t\tself dstLongAt: destIndex put: mergeWord.\r\t\t\t\t\tdestIndex _ destIndex + 4].\r\t\t\t].\r\r\t\t\"This last section, if used, requires masking of the destination store...\"\r\t\tnWords > 1 ifTrue:\r\t\t\t[destMask _ mask2.\r\t\t\tdestWord _ self dstLongAt: destIndex.\r\t\t\tmergeWord _ self mergeFn: halftoneWord with: destWord.\r\t\t\tdestWord _ (destMask bitAnd: mergeWord) bitOr:\r\t\t\t\t\t\t\t(destWord bitAnd: destMask bitInvert32).\r\t\t\tself dstLongAt: destIndex put: destWord.\r\t\t\tdestIndex _ destIndex + 4].\r\r\tdestIndex _ destIndex + destDelta]! !\r\r!BitBltSimulation methodsFor: 'inner loop' stamp: 'ikp 6/11/2004 16:28'!\rcopyLoopPixMap\r\t\"This version of the inner loop maps source pixels\r\tto a destination form with different depth.  Because it is already\r\tunweildy, the loop is not unrolled as in the other versions.\r\tPreload, skew and skewMask are all overlooked, since pickSourcePixels\r\tdelivers its destination word already properly aligned.\r\tNote that pickSourcePixels could be copied in-line at the top of\r\tthe horizontal loop, and some of its inits moved out of the loop.\"\r\t\"ar 12/7/1999:\r\tThe loop has been rewritten to use only one pickSourcePixels call.\r\tThe idea is that the call itself could be inlined. If we decide not\r\tto inline pickSourcePixels we could optimize the loop instead.\"\r\t| skewWord halftoneWord mergeWord scrStartBits nSourceIncs startBits endBits sourcePixMask destPixMask mergeFnwith nPix srcShift dstShift destWord words srcShiftInc dstShiftInc dstShiftLeft mapperFlags |\r\tself inline: false.\r\tself var: #mergeFnwith declareC: 'sqInt (*mergeFnwith)(sqInt, sqInt)'.\r\tmergeFnwith _ self cCoerce: (opTable at: combinationRule+1) to: 'sqInt (*)(sqInt, sqInt)'.\r\tmergeFnwith.  \"null ref for compiler\"\r\r\t\"Additional inits peculiar to unequal source and dest pix size...\"\r\tsourcePPW _ 32//sourceDepth.\r\tsourcePixMask _ maskTable at: sourceDepth.\r\tdestPixMask _ maskTable at: destDepth.\r\tmapperFlags _ cmFlags bitAnd: ColorMapNewStyle bitInvert32.\r\tsourceIndex _ sourceBits +\r\t\t\t\t\t(sy * sourcePitch) + ((sx // sourcePPW) *4).\r\tscrStartBits _ sourcePPW - (sx bitAnd: sourcePPW-1).\r\tbbW < scrStartBits\r\t\tifTrue: [nSourceIncs _ 0]\r\t\tifFalse: [nSourceIncs _ (bbW - scrStartBits)//sourcePPW + 1].\r\tsourceDelta _ sourcePitch - (nSourceIncs * 4).\r\r\t\"Note following two items were already calculated in destmask setup!!\"\r\tstartBits _ destPPW - (dx bitAnd: destPPW-1).\r\tendBits _ ((dx + bbW - 1) bitAnd: destPPW-1) + 1.\r\r\tbbW < startBits ifTrue:[startBits _ bbW].\r\r\t\"Precomputed shifts for pickSourcePixels\"\r\tsrcShift _ ((sx bitAnd: sourcePPW - 1) * sourceDepth).\r\tdstShift _ ((dx bitAnd: destPPW - 1) * destDepth).\r\tsrcShiftInc _ sourceDepth.\r\tdstShiftInc _ destDepth.\r\tdstShiftLeft _ 0.\r\tsourceMSB ifTrue:[\r\t\tsrcShift _ 32 - sourceDepth - srcShift.\r\t\tsrcShiftInc _ 0 - srcShiftInc].\r\tdestMSB ifTrue:[\r\t\tdstShift _ 32 - destDepth - dstShift.\r\t\tdstShiftInc _ 0 - dstShiftInc.\r\t\tdstShiftLeft _ 32 - destDepth].\r\r\t1 to: bbH do: \"here is the vertical loop\"\r\t\t[ :i |\r\t\t\"*** is it possible at all that noHalftone == false? ***\"\r\t\tnoHalftone\r\t\t\tifTrue:[halftoneWord _ AllOnes]\r\t\t\tifFalse: [halftoneWord _ self halftoneAt: dy+i-1].\r\t\t\"setup first load\"\r\t\tsrcBitShift _ srcShift.\r\t\tdstBitShift _ dstShift.\r\t\tdestMask _ mask1.\r\t\tnPix _ startBits.\r\t\t\"Here is the horizontal loop...\"\r\t\twords _ nWords.\r\t\t\t[\"pick up the word\"\r\t\t\tskewWord _ self pickSourcePixels: nPix flags: mapperFlags \r\t\t\t\t\t\t\t\tsrcMask: sourcePixMask destMask: destPixMask\r\t\t\t\t\t\t\t\tsrcShiftInc: srcShiftInc dstShiftInc: dstShiftInc.\r\t\t\t\"align next word to leftmost pixel\"\r\t\t\tdstBitShift _ dstShiftLeft.\r\r\t\t\tdestMask = AllOnes ifTrue:[\"avoid read-modify-write\"\r\t\t\t\tmergeWord _ self mergeFn: (skewWord bitAnd: halftoneWord)\r\t\t\t\t\t\t\t\twith: (self dstLongAt: destIndex).\r\t\t\t\tself dstLongAt: destIndex put: (destMask bitAnd: mergeWord).\r\t\t\t] ifFalse:[ \"General version using dest masking\"\r\t\t\t\tdestWord _ self dstLongAt: destIndex.\r\t\t\t\tmergeWord _ self mergeFn: (skewWord bitAnd: halftoneWord)\r\t\t\t\t\t\t\t\twith: (destWord bitAnd: destMask).\r\t\t\t\tdestWord _ (destMask bitAnd: mergeWord) bitOr:\r\t\t\t\t\t\t\t\t(destWord bitAnd: destMask bitInvert32).\r\t\t\t\tself dstLongAt: destIndex put: destWord.\r\t\t\t].\r\t\t\tdestIndex _ destIndex + 4.\r\t\t\twords = 2 \"e.g., is the next word the last word?\"\r\t\t\t\tifTrue:[\"set mask for last word in this row\"\r\t\t\t\t\t\tdestMask _ mask2.\r\t\t\t\t\t\tnPix _ endBits]\r\t\t\t\tifFalse:[\"use fullword mask for inner loop\"\r\t\t\t\t\t\tdestMask _ AllOnes.\r\t\t\t\t\t\tnPix _ destPPW].\r\t\t\t(words _ words - 1) = 0] whileFalse.\r\t\t\"--- end of inner loop ---\"\r\t\tsourceIndex _ sourceIndex + sourceDelta.\r\t\tdestIndex _ destIndex + destDelta]\r! !\r\r!BitBltSimulation methodsFor: 'inner loop' stamp: 'ikp 8/2/2004 19:49'!\rwarpLoop\r\t\"This version of the inner loop traverses an arbirary quadrilateral\r\tsource, thus producing a general affine transformation.\"\r\t| skewWord halftoneWord mergeWord startBits\r\t  deltaP12x deltaP12y deltaP43x deltaP43y pAx pAy pBx pBy\r\t  xDelta yDelta smoothingCount sourceMapOop\r\t  nSteps nPix words destWord endBits mergeFnwith dstShiftInc dstShiftLeft mapperFlags |\r\tself inline: false.\r\tself var: #mergeFnwith declareC: 'sqInt (*mergeFnwith)(sqInt, sqInt)'.\r\tmergeFnwith _ self cCoerce: (opTable at: combinationRule+1) to: 'sqInt (*)(sqInt, sqInt)'.\r\tmergeFnwith.  \"null ref for compiler\"\r\r\t(interpreterProxy slotSizeOf: bitBltOop) >= (BBWarpBase+12)\r\t\tifFalse: [^ interpreterProxy primitiveFail].\r\tnSteps _ height-1.  nSteps <= 0 ifTrue: [nSteps _ 1].\r\r\tpAx _ self fetchIntOrFloat: BBWarpBase ofObject: bitBltOop.\r\twords _ self fetchIntOrFloat: BBWarpBase+3 ofObject: bitBltOop.\r\tdeltaP12x _ self deltaFrom: pAx to: words nSteps: nSteps.\r\tdeltaP12x < 0 ifTrue: [pAx _ words - (nSteps*deltaP12x)].\r\r\tpAy _ self fetchIntOrFloat: BBWarpBase+1 ofObject: bitBltOop.\r\twords _ self fetchIntOrFloat: BBWarpBase+4 ofObject: bitBltOop.\r\tdeltaP12y _ self deltaFrom: pAy to: words nSteps: nSteps.\r\tdeltaP12y < 0 ifTrue: [pAy _ words - (nSteps*deltaP12y)].\r\r\tpBx _ self fetchIntOrFloat: BBWarpBase+9 ofObject: bitBltOop.\r\twords _ self fetchIntOrFloat: BBWarpBase+6 ofObject: bitBltOop.\r\tdeltaP43x _ self deltaFrom: pBx to: words nSteps: nSteps.\r\tdeltaP43x < 0 ifTrue: [pBx _ words - (nSteps*deltaP43x)].\r\r\tpBy _ self fetchIntOrFloat: BBWarpBase+10 ofObject: bitBltOop.\r\twords _ self fetchIntOrFloat: BBWarpBase+7 ofObject: bitBltOop.\r\tdeltaP43y _ self deltaFrom: pBy to: words nSteps: nSteps.\r\tdeltaP43y < 0 ifTrue: [pBy _ words - (nSteps*deltaP43y)].\r\r\tinterpreterProxy failed ifTrue: [^ false].  \"ie if non-integers above\"\r\tinterpreterProxy methodArgumentCount = 2\r\t\tifTrue: [smoothingCount _ interpreterProxy stackIntegerValue: 1.\r\t\t\t\tsourceMapOop _ interpreterProxy stackValue: 0.\r\t\t\t\tsourceMapOop = interpreterProxy nilObject\r\t\t\t\tifTrue: [sourceDepth < 16 ifTrue:\r\t\t\t\t\t[\"color map is required to smooth non-RGB dest\"\r\t\t\t\t\t^ interpreterProxy primitiveFail]]\r\t\t\t\tifFalse: [(interpreterProxy slotSizeOf: sourceMapOop)\r\t\t\t\t\t\t\t< (1 << sourceDepth) ifTrue:\r\t\t\t\t\t[\"sourceMap must be long enough for sourceDepth\"\r\t\t\t\t\t^ interpreterProxy primitiveFail].\r\t\t\t\t\tsourceMapOop _ self oopForPointer: (interpreterProxy firstIndexableField: sourceMapOop)]]\r\t\tifFalse: [smoothingCount _ 1.\r\t\t\t\tsourceMapOop _ interpreterProxy nilObject].\r\tnSteps _ width-1.  nSteps <= 0 ifTrue: [nSteps _ 1].\r\tstartBits _ destPPW - (dx bitAnd: destPPW-1).\r\tendBits _ ((dx + bbW - 1) bitAnd: destPPW-1) + 1.\r \tbbW < startBits ifTrue:[startBits _ bbW].\r\r\tdestY < clipY ifTrue:[\r\t\t\"Advance increments if there was clipping in y\"\r\t\tpAx _ pAx + (clipY - destY * deltaP12x).\r\t\tpAy _ pAy + (clipY - destY * deltaP12y).\r\t\tpBx _ pBx + (clipY - destY * deltaP43x).\r\t\tpBy _ pBy + (clipY - destY * deltaP43y)].\r\r\t\"Setup values for faster pixel fetching.\"\r\tself warpLoopSetup.\r\t\"Setup color mapping if not provided\"\r\t(smoothingCount > 1 and:[(cmFlags bitAnd: ColorMapNewStyle) = 0]) ifTrue:[\r\t\tcmLookupTable == nil ifTrue:[\r\t\t\tdestDepth = 16 ifTrue:[self setupColorMasksFrom: 8 to: 5].\r\t\t] ifFalse:[\r\t\t\tself setupColorMasksFrom: 8 to: cmBitsPerColor.\r\t\t].\r\t].\r\tmapperFlags _ cmFlags bitAnd: ColorMapNewStyle bitInvert32.\r\r\tdestMSB\r\t\tifTrue:[\tdstShiftInc _ 0 - destDepth.\r\t\t\t\tdstShiftLeft _ 32 - destDepth]\r\t\tifFalse:[\tdstShiftInc _ destDepth.\r\t\t\t\tdstShiftLeft _ 0].\r\t1 to: bbH do:\r\t\t[ :i | \"here is the vertical loop...\"\r\t\txDelta _ self deltaFrom: pAx to: pBx nSteps: nSteps.\r \t\txDelta >= 0 ifTrue: [sx _ pAx] ifFalse: [sx _ pBx - (nSteps*xDelta)].\r\t\tyDelta _ self deltaFrom: pAy to: pBy nSteps: nSteps.\r \t\tyDelta >= 0 ifTrue: [sy _ pAy] ifFalse: [sy _ pBy - (nSteps*yDelta)].\r\r\t\tdestMSB\r\t\t\tifTrue:[dstBitShift _ 32 - ((dx bitAnd: destPPW - 1) + 1 * destDepth)]\r\t\t\tifFalse:[dstBitShift _ (dx bitAnd: destPPW - 1) * destDepth].\r\r\t\t(destX < clipX) ifTrue:[\r\t\t\t\"Advance increments if there was clipping in x\"\r\t\t\tsx _ sx + (clipX - destX * xDelta).\r\t\t\tsy _ sy + (clipX - destX * yDelta).\r\t\t].\r\r\t\tnoHalftone\r\t\t\tifTrue: [halftoneWord _ AllOnes]\r\t\t\tifFalse: [halftoneWord _ self halftoneAt: dy+i-1].\r\t\tdestMask _ mask1.\r\t\tnPix _ startBits.\r\t\t\"Here is the inner loop...\"\r\t\twords _ nWords.\r\t\t\t[\"pick up word\"\r\t\t\tsmoothingCount = 1 ifTrue:[\"Faster if not smoothing\"\r\t\t\t\tskewWord _ self warpPickSourcePixels: nPix\r\t\t\t\t\t\t\t\txDeltah: xDelta yDeltah: yDelta\r\t\t\t\t\t\t\t\txDeltav: deltaP12x yDeltav: deltaP12y\r\t\t\t\t\t\t\t\tdstShiftInc: dstShiftInc flags: mapperFlags.\r\t\t\t] ifFalse:[\"more difficult with smoothing\"\r\t\t\t\tskewWord _ self warpPickSmoothPixels: nPix\r\t\t\t\t\t\txDeltah: xDelta yDeltah: yDelta\r\t\t\t\t\t\txDeltav: deltaP12x yDeltav: deltaP12y\r\t\t\t\t\t\tsourceMap: sourceMapOop\r\t\t\t\t\t\tsmoothing: smoothingCount\r\t\t\t\t\t\tdstShiftInc: dstShiftInc.\r\t\t\t].\r\t\t\t\"align next word access to left most pixel\"\r\t\t\tdstBitShift _ dstShiftLeft.\r\t\t\tdestMask = AllOnes ifTrue:[\"avoid read-modify-write\"\r\t\t\t\tmergeWord _ self mergeFn: (skewWord bitAnd: halftoneWord)\r\t\t\t\t\t\t\t\twith: (self dstLongAt: destIndex).\r\t\t\t\tself dstLongAt: destIndex put: (destMask bitAnd: mergeWord).\r\t\t\t] ifFalse:[ \"General version using dest masking\"\r\t\t\t\tdestWord _ self dstLongAt: destIndex.\r\t\t\t\tmergeWord _ self mergeFn: (skewWord bitAnd: halftoneWord)\r\t\t\t\t\t\t\t\twith: (destWord bitAnd: destMask).\r\t\t\t\tdestWord _ (destMask bitAnd: mergeWord) bitOr:\r\t\t\t\t\t\t\t\t(destWord bitAnd: destMask bitInvert32).\r\t\t\t\tself dstLongAt: destIndex put: destWord.\r\t\t\t].\r\t\t\tdestIndex _ destIndex + 4.\r\t\t\twords = 2 \"e.g., is the next word the last word?\"\r\t\t\t\tifTrue:[\"set mask for last word in this row\"\r\t\t\t\t\t\tdestMask _ mask2.\r\t\t\t\t\t\tnPix _ endBits]\r\t\t\t\tifFalse:[\"use fullword mask for inner loop\"\r\t\t\t\t\t\tdestMask _ AllOnes.\r\t\t\t\t\t\tnPix _ destPPW].\r\t\t\t(words _ words - 1) = 0] whileFalse.\r\t\t\"--- end of inner loop ---\"\r\t\tpAx _ pAx + deltaP12x.\r\t\tpAy _ pAy + deltaP12y.\r\t\tpBx _ pBx + deltaP43x.\r\t\tpBy _ pBy + deltaP43y.\r\t\tdestIndex _ destIndex + destDelta]! !\r\r!BitBltSimulation methodsFor: 'pixel mapping' stamp: 'ikp 8/2/2004 20:25'!\rwarpPickSmoothPixels: nPixels\r\txDeltah: xDeltah yDeltah: yDeltah\r\txDeltav: xDeltav yDeltav: yDeltav\r\tsourceMap: sourceMap\r\tsmoothing: n\r\tdstShiftInc: dstShiftInc\r\t\"Pick n (sub-) pixels from the source form, mapped by sourceMap,\r\taverage the RGB values, map by colorMap and return the new word.\r\tThis version is only called from WarpBlt with smoothingCount > 1\"\r\t| rgb x y a r g b xx yy xdh ydh xdv ydv dstMask destWord i j k nPix |\r\tself inline: false. \"nope - too much stuff in here\"\r\tdstMask _ maskTable at: destDepth.\r\tdestWord _ 0.\r\tn = 2 \"Try avoiding divides for most common n (divide by 2 is generated as shift)\"\r\t\tifTrue:[xdh _ xDeltah // 2. ydh _ yDeltah // 2. \r\t\t\t\txdv _ xDeltav // 2. ydv _ yDeltav // 2]\r\t\tifFalse:[xdh _ xDeltah // n. ydh _ yDeltah // n. \r\t\t\t\txdv _ xDeltav // n. ydv _ yDeltav // n].\r\ti _ nPixels.\r\t[\r\t\tx _ sx. y _ sy.\r\t\ta _ r _ g _ b _ 0.\r\t\t\"Pick and average n*n subpixels\"\r\t\tnPix _ 0.  \"actual number of pixels (not clipped and not transparent)\"\r\t\tj _ n.\r\t\t[\r\t\t\txx _ x. yy _ y.\r\t\t\tk _ n.\r\t\t\t[\r\t\t\t\t\"get a single subpixel\"\r\t\t\t\trgb _ self pickWarpPixelAtX: xx y: yy.\r\t\t\t\t(combinationRule=25 \"PAINT\" and: [rgb = 0]) ifFalse:[\r\t\t\t\t\t\"If not clipped and not transparent, then tally rgb values\"\r\t\t\t\t\tnPix _ nPix + 1.\r\t\t\t\t\tsourceDepth < 16 ifTrue:[\r\t\t\t\t\t\t\"Get RGBA values from sourcemap table\"\r\t\t\t\t\t\trgb _ self long32At: sourceMap + (rgb << 2).\r\t\t\t\t\t] ifFalse:[\"Already in RGB format\"\r\t\t\t\t\t\tsourceDepth = 16 \r\t\t\t\t\t\t\t\tifTrue:[rgb _ self rgbMap16To32: rgb]\r\t\t\t\t\t\t\t\tifFalse:[rgb _ self rgbMap32To32: rgb]].\r\t\t\t\t\tb _ b + (rgb bitAnd: 255).\r\t\t\t\t\tg _ g + (rgb >> 8 bitAnd: 255).\r\t\t\t\t\tr _ r + (rgb >> 16 bitAnd: 255).\r\t\t\t\t\ta _ a + (rgb >> 24)].\r\t\t\t\txx _ xx + xdh.\r\t\t\t\tyy _ yy + ydh.\r\t\t\t(k _ k - 1) = 0] whileFalse.\r\t\t\tx _ x + xdv.\r\t\t\ty _ y + ydv.\r\t\t(j _ j - 1) = 0] whileFalse.\r\r\t\t(nPix = 0 or: [combinationRule=25 \"PAINT\" and: [nPix < (n * n // 2)]]) ifTrue:[\r\t\t\trgb _ 0  \"All pixels were 0, or most were transparent\"\r\t\t] ifFalse:[\r\t\t\t\"normalize rgba sums\"\r\t\t\tnPix = 4 \"Try to avoid divides for most common n\"\r\t\t\t\tifTrue:[r _ r >> 2.\tg _ g >> 2.\tb _ b >> 2.\ta _ a >> 2]\r\t\t\t\tifFalse:[\tr _ r // nPix.\tg _ g // nPix.\tb _ b // nPix.\ta _ a // nPix].\r\t\t\trgb _ (a << 24) + (r << 16) + (g << 8) + b.\r\r\t\t\t\"map the pixel\"\r\t\t\trgb = 0 ifTrue: [\r\t\t\t\t\"only generate zero if pixel is really transparent\"\r\t\t\t\t(r + g + b + a) > 0 ifTrue: [rgb _ 1]].\r\t\t\trgb _ self mapPixel: rgb flags: cmFlags.\r\t\t].\r\t\t\"Mix it in\"\r\t\tdestWord _ destWord bitOr: (rgb bitAnd: dstMask) << dstBitShift.\r\t\tdstBitShift _ dstBitShift + dstShiftInc.\r\t\tsx _ sx + xDeltah.\r\t\tsy _ sy + yDeltah.\r\t(i _ i - 1) = 0] whileFalse.\r\r\t^destWord\r! !\r\r!BitBltSimulation methodsFor: 'interpreter interface' stamp: 'ikp 8/2/2004 19:48'!\rloadBitBltDestForm\r\t\"Load the dest form for BitBlt. Return false if anything is wrong, true otherwise.\"\r\r\t| destBitsSize |\r\tself inline: true.\r\tdestBits _ interpreterProxy fetchPointer: FormBitsIndex ofObject: destForm.\r\tdestWidth _ interpreterProxy fetchInteger: FormWidthIndex ofObject: destForm.\r\tdestHeight _ interpreterProxy fetchInteger: FormHeightIndex ofObject: destForm.\r\t(destWidth >= 0 and: [destHeight >= 0])\r\t\tifFalse: [^ false].\r\tdestDepth _ interpreterProxy fetchInteger: FormDepthIndex ofObject: destForm.\r\tdestMSB _ destDepth > 0.\r\tdestDepth < 0 ifTrue:[destDepth _ 0 - destDepth].\r\t\"Ignore an integer bits handle for Display in which case \r\tthe appropriate values will be obtained by calling ioLockSurfaceBits().\"\r\t(interpreterProxy isIntegerObject: destBits) ifTrue:[\r\t\t\"Query for actual surface dimensions\"\r\t\t(self queryDestSurface: (interpreterProxy integerValueOf: destBits))\r\t\t\tifFalse:[^false].\r\t\tdestPPW _ 32 // destDepth.\r\t\tdestBits _ destPitch _ 0.\r\t] ifFalse:[\r\t\tdestPPW _ 32 // destDepth.\r\t\tdestPitch _ destWidth + (destPPW-1) // destPPW * 4.\r\t\tdestBitsSize _ interpreterProxy byteSizeOf: destBits.\r\t\t((interpreterProxy isWordsOrBytes: destBits)\r\t\t\tand: [destBitsSize = (destPitch * destHeight)])\r\t\t\tifFalse: [^ false].\r\t\t\"Skip header since external bits don't have one\"\r\t\tdestBits _ self oopForPointer: (interpreterProxy firstIndexableField: destBits).\r\t].\r\t^true! !\r\r!BitBltSimulation methodsFor: 'interpreter interface' stamp: 'ikp 8/2/2004 19:48'!\rloadBitBltSourceForm\r\t\"Load the source form for BitBlt. Return false if anything is wrong, true otherwise.\"\r\t| sourceBitsSize |\r\tself inline: true.\r\tsourceBits _ interpreterProxy fetchPointer: FormBitsIndex ofObject: sourceForm.\r\tsourceWidth _ self fetchIntOrFloat: FormWidthIndex ofObject: sourceForm.\r\tsourceHeight _ self fetchIntOrFloat: FormHeightIndex ofObject: sourceForm.\r\t(sourceWidth >= 0 and: [sourceHeight >= 0])\r\t\tifFalse: [^ false].\r\tsourceDepth _ interpreterProxy fetchInteger: FormDepthIndex ofObject: sourceForm.\r\tsourceMSB _ sourceDepth > 0.\r\tsourceDepth < 0 ifTrue:[sourceDepth _ 0 - sourceDepth].\r\t\"Ignore an integer bits handle for Display in which case \r\tthe appropriate values will be obtained by calling ioLockSurfaceBits().\"\r\t(interpreterProxy isIntegerObject: sourceBits) ifTrue:[\r\t\t\"Query for actual surface dimensions\"\r\t\t(self querySourceSurface: (interpreterProxy integerValueOf: sourceBits))\r\t\t\tifFalse:[^false].\r\t\tsourcePPW _ 32 // sourceDepth.\r\t\tsourceBits _ sourcePitch _ 0.\r\t] ifFalse:[\r\t\tsourcePPW _ 32 // sourceDepth.\r\t\tsourcePitch _ sourceWidth + (sourcePPW-1) // sourcePPW * 4.\r\t\tsourceBitsSize _ interpreterProxy byteSizeOf: sourceBits.\r\t\t((interpreterProxy isWordsOrBytes: sourceBits)\r\t\t\tand: [sourceBitsSize = (sourcePitch * sourceHeight)])\r\t\t\tifFalse: [^ false].\r\t\t\"Skip header since external bits don't have one\"\r\t\tsourceBits _ self oopForPointer: (interpreterProxy firstIndexableField: sourceBits).\r\t].\r\t^true! !\r\r!BitBltSimulation methodsFor: 'interpreter interface' stamp: 'ikp 8/2/2004 19:49'!\rloadHalftoneForm\r\t\"Load the halftone form\"\r\t| halftoneBits |\r\tself inline: true.\r\tnoHalftone ifTrue:[\r\t\thalftoneBase _ nil.\r\t\t^true].\r\t((interpreterProxy isPointers: halftoneForm) and: [(interpreterProxy slotSizeOf: halftoneForm) >= 4])\r\t\tifTrue:\r\t\t[\"Old-style 32xN monochrome halftone Forms\"\r\t\thalftoneBits _ interpreterProxy fetchPointer: FormBitsIndex ofObject: halftoneForm.\r\t\thalftoneHeight _ interpreterProxy fetchInteger: FormHeightIndex ofObject: halftoneForm.\r\t\t(interpreterProxy isWords: halftoneBits)\r\t\t\tifFalse: [noHalftone _ true]]\r\t\tifFalse:\r\t\t[\"New spec accepts, basically, a word array\"\r\t\t((interpreterProxy isPointers: halftoneForm) not\r\t\t\tand: [interpreterProxy isWords: halftoneForm])\r\t\t\tifFalse: [^ false].\r\t\thalftoneBits _ halftoneForm.\r\t\thalftoneHeight _ interpreterProxy slotSizeOf: halftoneBits].\r\thalftoneBase _ self oopForPointer: (interpreterProxy firstIndexableField: halftoneBits).\r\t^true! !\r\r!BitBltSimulation methodsFor: 'memory access' stamp: 'ikp 8/2/2004 20:25'!\rdstLongAt: idx\r\r\t^self long32At: idx! !\r\r!BitBltSimulation methodsFor: 'memory access' stamp: 'ikp 8/2/2004 20:29'!\rdstLongAt: idx put: value\r\r\t^self long32At: idx put: value! !\r\r!BitBltSimulation methodsFor: 'memory access' stamp: 'ikp 8/2/2004 20:25'!\rhalftoneAt: idx\r\t\"Return a value from the halftone pattern.\"\r\r\t^self long32At: halftoneBase + (idx \\\\ halftoneHeight * 4)! !\r\r!BitBltSimulation methodsFor: 'memory access' stamp: 'ikp 8/2/2004 20:25'!\rsrcLongAt: idx\r\r\t^self long32At: idx! !\r\r!BitBltSimulation methodsFor: 'initialize-release' stamp: 'ikp 6/10/2004 15:02'!\rinitBBOpTable\r\tself cCode: 'opTable[0+1] = (void *)clearWordwith'.\r\tself cCode: 'opTable[1+1] = (void *)bitAndwith'.\r\tself cCode: 'opTable[2+1] = (void *)bitAndInvertwith'.\r\tself cCode: 'opTable[3+1] = (void *)sourceWordwith'.\r\tself cCode: 'opTable[4+1] = (void *)bitInvertAndwith'.\r\tself cCode: 'opTable[5+1] = (void *)destinationWordwith'.\r\tself cCode: 'opTable[6+1] = (void *)bitXorwith'.\r\tself cCode: 'opTable[7+1] = (void *)bitOrwith'.\r\tself cCode: 'opTable[8+1] = (void *)bitInvertAndInvertwith'.\r\tself cCode: 'opTable[9+1] = (void *)bitInvertXorwith'.\r\tself cCode: 'opTable[10+1] = (void *)bitInvertDestinationwith'.\r\tself cCode: 'opTable[11+1] = (void *)bitOrInvertwith'.\r\tself cCode: 'opTable[12+1] = (void *)bitInvertSourcewith'.\r\tself cCode: 'opTable[13+1] = (void *)bitInvertOrwith'.\r\tself cCode: 'opTable[14+1] = (void *)bitInvertOrInvertwith'.\r\tself cCode: 'opTable[15+1] = (void *)destinationWordwith'.\r\tself cCode: 'opTable[16+1] = (void *)destinationWordwith'.\r\tself cCode: 'opTable[17+1] = (void *)destinationWordwith'.\r\tself cCode: 'opTable[18+1] = (void *)addWordwith'.\r\tself cCode: 'opTable[19+1] = (void *)subWordwith'.\r\tself cCode: 'opTable[20+1] = (void *)rgbAddwith'.\r\tself cCode: 'opTable[21+1] = (void *)rgbSubwith'.\r\tself cCode: 'opTable[22+1] = (void *)OLDrgbDiffwith'.\r\tself cCode: 'opTable[23+1] = (void *)OLDtallyIntoMapwith'.\r\tself cCode: 'opTable[24+1] = (void *)alphaBlendwith'.\r\tself cCode: 'opTable[25+1] = (void *)pixPaintwith'.\r\tself cCode: 'opTable[26+1] = (void *)pixMaskwith'.\r\tself cCode: 'opTable[27+1] = (void *)rgbMaxwith'.\r\tself cCode: 'opTable[28+1] = (void *)rgbMinwith'.\r\tself cCode: 'opTable[29+1] = (void *)rgbMinInvertwith'.\r\tself cCode: 'opTable[30+1] = (void *)alphaBlendConstwith'.\r\tself cCode: 'opTable[31+1] = (void *)alphaPaintConstwith'.\r\tself cCode: 'opTable[32+1] = (void *)rgbDiffwith'.\r\tself cCode: 'opTable[33+1] = (void *)tallyIntoMapwith'.\r\tself cCode: 'opTable[34+1] = (void *)alphaBlendScaledwith'.\r\tself cCode: 'opTable[35+1] = (void *)alphaBlendScaledwith'.\r\tself cCode: 'opTable[36+1] = (void *)alphaBlendScaledwith'.\t\r\tself cCode: 'opTable[37+1] = (void *)rgbMulwith'.\r\tself cCode: 'opTable[38+1] = (void *)pixSwapwith'.\r\tself cCode: 'opTable[39+1] = (void *)pixClearwith'.\r\tself cCode: 'opTable[40+1] = (void *)fixAlphawith'.! !\r\r!BitBltSimulation methodsFor: 'surface support' stamp: 'ikp 6/9/2004 22:51'!\rlockSurfaces\r\t\"Get a pointer to the bits of any OS surfaces.\"\r\t\"Notes: \r\t* For equal source/dest handles only one locking operation is performed.\r\tThis is to prevent locking of overlapping areas which does not work with\r\tcertain APIs (as an example, DirectDraw prevents locking of overlapping areas). \r\tA special case for non-overlapping but equal source/dest handle would \r\tbe possible but we would have to transfer this information over to \r\tunlockSurfaces somehow (currently, only one unlock operation is \r\tperformed for equal source and dest handles). Also, this would require\r\ta change in the notion of ioLockSurface() which is right now interpreted\r\tas a hint and not as a requirement to lock only the specific portion of\r\tthe surface.\r\r\t* The arguments in ioLockSurface() provide the implementation with\r\tan explicit hint what area is affected. It can be very useful to\r\tknow the max. affected area beforehand if getting the bits requires expensive\r\tcopy operations (e.g., like a roundtrip to the X server or a glReadPixel op).\r\tHowever, the returned pointer *MUST* point to the virtual origin of the surface\r\tand not to the beginning of the rectangle. The promise made by BitBlt\r\tis to never access data outside the given rectangle (aligned to 4byte boundaries!!)\r\tso it is okay to return a pointer to the virtual origin that is actually outside\r\tthe valid memory area.\r\r\t* The area provided in ioLockSurface() is already clipped (e.g., it will always\r\tbe inside the source and dest boundingBox) but it is not aligned to word boundaries\r\tyet. It is up to the support code to compute accurate alignment if necessary.\r\r\t* Warping always requires the entire source surface to be locked because\r\tthere is no beforehand knowledge about what area will actually be traversed.\r\r\t\"\r\t| sourceHandle destHandle l r t b fn |\r\tself inline: true. \"If the CCodeGen learns how to inline #cCode: methods\"\r\tself var: #fn declareC:'sqInt (*fn)(sqInt, sqInt*, sqInt, sqInt, sqInt, sqInt)'.\r\thasSurfaceLock _ false.\r\tdestBits = 0 ifTrue:[\"Blitting *to* OS surface\"\r\t\tlockSurfaceFn = 0 ifTrue:[self loadSurfacePlugin ifFalse:[^nil]].\r\t\tfn _ self cCoerce: lockSurfaceFn to: 'sqInt (*)(sqInt, sqInt*, sqInt, sqInt, sqInt, sqInt)'.\r\t\tdestHandle _ interpreterProxy fetchInteger: FormBitsIndex ofObject: destForm.\r\t\t(sourceBits = 0 and:[noSource not]) ifTrue:[\r\t\t\tsourceHandle _ interpreterProxy fetchInteger: FormBitsIndex ofObject: sourceForm.\r\t\t\t\"Handle the special case of equal source and dest handles\"\r\t\t\t(sourceHandle = destHandle) ifTrue:[\r\t\t\t\t\"If we have overlapping source/dest we lock the entire area\r\t\t\t\tso that there is only one area transmitted\"\r\t\t\t\tisWarping ifFalse:[\r\t\t\t\t\t\"When warping we always need the entire surface for the source\"\r\t\t\t\t\tsourceBits _ self cCode:'fn(sourceHandle, &sourcePitch, 0,0, sourceWidth, sourceHeight)'.\r\t\t\t\t] ifTrue:[\r\t\t\t\t\t\"Otherwise use overlapping area\"\r\t\t\t\t\tl _ sx min: dx. r _ (sx max: dx) + bbW.\r\t\t\t\t\tt _ sy min: dy. b _ (sy max: sy) + bbH.\r\t\t\t\t\tsourceBits _ self cCode:'fn(sourceHandle, &sourcePitch, l, t, r-l, b-t)'.\r\t\t\t\t].\r\t\t\t\tdestBits _ sourceBits.\r\t\t\t\tdestPitch _ sourcePitch.\r\t\t\t\thasSurfaceLock _ true.\r\t\t\t\t^destBits ~~ 0\r\t\t\t].\r\t\t\t\"Fall through - if not equal it'll be handled below\"\r\t\t].\r\t\tdestBits _ self cCode:'fn(destHandle, &destPitch, dx, dy, bbW, bbH)'.\r\t\thasSurfaceLock _ true.\r\t].\r\t(sourceBits == 0 and:[noSource not]) ifTrue:[\"Blitting *from* OS surface\"\r\t\tsourceHandle _ interpreterProxy fetchInteger: FormBitsIndex ofObject: sourceForm.\r\t\tlockSurfaceFn = 0 ifTrue:[self loadSurfacePlugin ifFalse:[^nil]].\r\t\tfn _ self cCoerce: lockSurfaceFn to: 'sqInt (*)(sqInt, sqInt*, sqInt, sqInt, sqInt, sqInt)'.\r\t\t\"Warping requiring the entire surface\"\r\t\tisWarping ifTrue:[\r\t\t\tsourceBits _ self cCode:'fn(sourceHandle, &sourcePitch, 0, 0, sourceWidth, sourceHeight)'.\r\t\t] ifFalse:[\r\t\t\tsourceBits _ self cCode:'fn(sourceHandle, &sourcePitch, sx, sy, bbW, bbH)'.\r\t\t].\r\t\thasSurfaceLock _ true.\r\t].\r\t^destBits ~~ 0 and:[sourceBits ~~ 0 or:[noSource]].! !\r\r!BitBltSimulation methodsFor: 'surface support' stamp: 'ikp 6/9/2004 22:52'!\rqueryDestSurface: handle\r\t\"Query the dimension of an OS surface.\r\tThis method is provided so that in case the inst vars of the\r\tsource form are broken, *actual* values of the OS surface\r\tcan be obtained. This might, for instance, happen if the user\r\tresizes the main window.\r\tNote: Moved to a separate function for better inlining of the caller.\"\r\tquerySurfaceFn = 0 ifTrue:[self loadSurfacePlugin ifFalse:[^false]].\r\t^(self cCode:' ((sqInt (*) (sqInt, sqInt*, sqInt*, sqInt*, sqInt*))querySurfaceFn)\r\t\t(handle, &destWidth, &destHeight, &destDepth, &destMSB)'\r\t\t\t inSmalltalk:[false])! !\r\r!BitBltSimulation methodsFor: 'surface support' stamp: 'ikp 6/9/2004 22:57'!\rquerySourceSurface: handle\r\t\"Query the dimension of an OS surface.\r\tThis method is provided so that in case the inst vars of the\r\tsource form are broken, *actual* values of the OS surface\r\tcan be obtained. This might, for instance, happen if the user\r\tresizes the main window.\r\tNote: Moved to a separate function for better inlining of the caller.\"\r\tquerySurfaceFn = 0 ifTrue:[self loadSurfacePlugin ifFalse:[^false]].\r\t^(self cCode:' ((sqInt (*) (sqInt, sqInt*, sqInt*, sqInt*, sqInt*))querySurfaceFn)\r\t\t(handle, &sourceWidth, &sourceHeight, &sourceDepth, &sourceMSB)'\r\t\t\tinSmalltalk:[false])! !\r\r!BitBltSimulation methodsFor: 'surface support' stamp: 'ikp 6/11/2004 16:54'!\runlockSurfaces\r\t\"Unlock the bits of any OS surfaces.\"\r\t\"See the comment in lockSurfaces. Similar rules apply. That is, the area provided in ioUnlockSurface can be used to determine the dirty region after drawing. If a source is unlocked, then the area will be (0,0,0,0) to indicate that no portion is dirty.\"\r\t| sourceHandle destHandle destLocked fn |\r\tself var: #fn declareC:'sqInt (*fn)(sqInt, sqInt, sqInt, sqInt, sqInt)'.\r\thasSurfaceLock ifTrue:[\r\t\tunlockSurfaceFn = 0 ifTrue:[self loadSurfacePlugin ifFalse:[^nil]].\r\t\tfn _ self cCoerce: unlockSurfaceFn to: 'sqInt (*)(sqInt, sqInt, sqInt, sqInt, sqInt)'.\r\t\tdestLocked _ false.\r\t\tdestHandle _ interpreterProxy fetchPointer: FormBitsIndex ofObject: destForm.\r\t\t(interpreterProxy isIntegerObject: destHandle) ifTrue:[\r\t\t\tdestHandle _ interpreterProxy integerValueOf: destHandle.\r\t\t\t\"The destBits are always assumed to be dirty\"\r\t\t\tself cCode:'fn(destHandle, affectedL, affectedT, affectedR-affectedL, affectedB-affectedT)'.\r\t\t\tdestBits _ destPitch _ 0.\r\t\t\tdestLocked _ true.\r\t\t].\r\t\tnoSource ifFalse:[\r\t\t\tsourceHandle _ interpreterProxy fetchPointer: FormBitsIndex ofObject: sourceForm.\r\t\t\t(interpreterProxy isIntegerObject: sourceHandle) ifTrue:[\r\t\t\t\tsourceHandle _ interpreterProxy integerValueOf: sourceHandle.\r\t\t\t\t\"Only unlock sourceHandle if different from destHandle\"\r\t\t\t\t(destLocked and:[sourceHandle = destHandle]) \r\t\t\t\t\tifFalse:[self cCode: 'fn(sourceHandle, 0, 0, 0, 0)'].\r\t\t\t\tsourceBits _ sourcePitch _ 0.\r\t\t\t].\r\t\t].\r\t\thasSurfaceLock _ false.\r\t].! !\r\r!BitBltSimulation methodsFor: 'primitives' stamp: 'ikp 6/10/2004 12:46'!\rprimitiveDisplayString\r\r\t| kernDelta xTable glyphMap stopIndex startIndex sourceString bbObj maxGlyph ascii glyphIndex sourcePtr left quickBlt |\r\tself export: true.\r\tself var: #sourcePtr type: 'unsigned char *'.\r\tinterpreterProxy methodArgumentCount = 6 \r\t\tifFalse:[^interpreterProxy primitiveFail].\r\tkernDelta _ interpreterProxy stackIntegerValue: 0.\r\txTable _ interpreterProxy stackObjectValue: 1.\r\tglyphMap _ interpreterProxy stackObjectValue: 2.\r\t((interpreterProxy fetchClassOf: xTable) = interpreterProxy classArray and:[\r\t\t(interpreterProxy fetchClassOf: glyphMap) = interpreterProxy classArray])\r\t\t\tifFalse:[^interpreterProxy primitiveFail].\r\t(interpreterProxy slotSizeOf: glyphMap) = 256 ifFalse:[^interpreterProxy primitiveFail].\r\tinterpreterProxy failed ifTrue:[^nil].\r\tmaxGlyph _ (interpreterProxy slotSizeOf: xTable) - 2.\r\r\tstopIndex _ interpreterProxy stackIntegerValue: 3.\r\tstartIndex _ interpreterProxy stackIntegerValue: 4.\r\tsourceString _ interpreterProxy stackObjectValue: 5.\r\t(interpreterProxy isBytes: sourceString) ifFalse:[^interpreterProxy primitiveFail].\r\t(startIndex > 0 and:[stopIndex > 0 and:[\r\t\tstopIndex <= (interpreterProxy byteSizeOf: sourceString)]])\r\t\t\tifFalse:[^interpreterProxy primitiveFail].\r\r\tbbObj _ interpreterProxy stackObjectValue: 6.\r\t(self loadBitBltFrom: bbObj) ifFalse:[^interpreterProxy primitiveFail].\r\t(combinationRule = 30 or:[combinationRule = 31]) \"needs extra source alpha\"\r\t\tifTrue:[^interpreterProxy primitiveFail].\r\t\"See if we can go directly into copyLoopPixMap (usually we can)\"\r\tquickBlt _ destBits ~= 0 \"no OS surfaces please\"\r\t\t\t\tand:[sourceBits ~= 0 \"and again\"\r\t\t\t\tand:[noSource = false \"needs a source\"\r\t\t\t\tand:[sourceForm ~= destForm \"no blits onto self\"\r\t\t\t\tand:[(cmFlags ~= 0 \r\t\t\t\t\t\tor:[sourceMSB ~= destMSB \r\t\t\t\t\t\tor:[sourceDepth ~= destDepth]]) \"no point using slower version\"\r\t\t\t\t]]]].\r\tleft _ destX.\r\tsourcePtr _ interpreterProxy firstIndexableField: sourceString.\r\tstartIndex to: stopIndex do:[:charIndex|\r\t\tascii _ interpreterProxy byteAtPointer: sourcePtr + charIndex - 1.\r\t\tglyphIndex _ interpreterProxy fetchInteger: ascii ofObject: glyphMap.\r\t\t(glyphIndex < 0 or:[glyphIndex > maxGlyph]) \r\t\t\tifTrue:[^interpreterProxy primitiveFail].\r\t\tsourceX _ interpreterProxy fetchInteger: glyphIndex ofObject: xTable.\r\t\twidth _ (interpreterProxy fetchInteger: glyphIndex+1 ofObject: xTable) - sourceX.\r\t\tinterpreterProxy failed ifTrue:[^nil].\r\t\tself clipRange.\t\"Must clip here\"\r\t\t(bbW > 0 and:[bbH > 0]) ifTrue: [\r\t\t\tquickBlt ifTrue:[\r\t\t\t\tself destMaskAndPointerInit.\r\t\t\t\tself copyLoopPixMap.\r\t\t\t\t\"both, hDir and vDir are known to be > 0\"\r\t\t\t\taffectedL _ dx.\r\t\t\t\taffectedR _ dx + bbW.\r\t\t\t\taffectedT _ dy.\r\t\t\t\taffectedB _ dy + bbH.\r\t\t\t] ifFalse:[self copyBits]].\r\t\tinterpreterProxy failed ifTrue:[^nil].\r\t\tdestX _ destX + width + kernDelta.\r\t ].\r\taffectedL _ left.\r\tself showDisplayBits.\r\tinterpreterProxy pop: 6. \"pop args, return rcvr\"! !\r\r\r!BitBltSimulator methodsFor: 'debug support' stamp: 'ikp 8/2/2004 20:25'!\rdstLongAt: dstIndex\r\r\tinterpreterProxy isInterpreterProxy\r\t\tifTrue:[^dstIndex long32At: 0].\r\t((dstIndex anyMask: 3) or:[dstIndex + 4 < destBits or:[\r\t\tdstIndex > (destBits + (destPitch * destHeight))]])\r\t\t\tifTrue:[self error:'Out of bounds'].\r\t^self long32At: dstIndex! !\r\r!BitBltSimulator methodsFor: 'debug support' stamp: 'ikp 8/2/2004 20:29'!\rdstLongAt: dstIndex put: value\r\r\tinterpreterProxy isInterpreterProxy\r\t\tifTrue:[^dstIndex long32At: 0 put: value].\r\t((dstIndex anyMask: 3) or:[dstIndex < destBits or:[\r\t\tdstIndex >= (destBits + (destPitch * destHeight))]])\r\t\t\tifTrue:[self error:'Out of bounds'].\r\t^self long32At: dstIndex put: value! !\r\r!BitBltSimulator methodsFor: 'debug support' stamp: 'ikp 8/2/2004 20:25'!\rsrcLongAt: srcIndex\r\r\tinterpreterProxy isInterpreterProxy\r\t\tifTrue:[^srcIndex long32At: 0].\r\t((srcIndex anyMask: 3) or:[srcIndex + 4 < sourceBits or:[\r\t\tsrcIndex > (sourceBits + (sourcePitch * sourceHeight))]])\r\t\t\tifTrue:[self error:'Out of bounds'].\r\t^self long32At: srcIndex! !\r\r!BitBltSimulator methodsFor: 'simulation' stamp: 'ikp 8/2/2004 20:25'!\rtableLookup: table at: index\r\r\t^ self long32At: (table + (index * 4))! !\r\r\r!FFIPlugin methodsFor: 'primitive support' stamp: 'di 7/4/2004 08:38'!\raddressOf: rcvr startingAt: byteOffset size: byteSize\r\t| rcvrClass rcvrSize addr |\r\t(interpreterProxy isBytes: rcvr) ifFalse:[^interpreterProxy primitiveFail].\r\t(byteOffset > 0) ifFalse:[^interpreterProxy primitiveFail].\r\trcvrClass _ interpreterProxy fetchClassOf: rcvr.\r\trcvrSize _ interpreterProxy byteSizeOf: rcvr.\r\trcvrClass == interpreterProxy classExternalAddress ifTrue:[\r\t\t(rcvrSize = 4) ifFalse:[^interpreterProxy primitiveFail].\r\t\taddr _ interpreterProxy fetchPointer: 0 ofObject: rcvr.\r\t\t\"don't you dare to read from object memory!!\"\r\t\t(addr == 0 or:[interpreterProxy isInMemory: addr])\r\t\t\tifTrue:[^interpreterProxy primitiveFail].\r\t] ifFalse:[\r\t\t(byteOffset+byteSize-1 <= rcvrSize)\r\t\t\tifFalse:[^interpreterProxy primitiveFail].\r\t\taddr _ self cCoerce: (interpreterProxy firstIndexableField: rcvr) to: 'int'.\r\t].\r\taddr _ addr + byteOffset - 1.\r\t^addr! !\r\r!FFIPlugin methodsFor: 'callout support' stamp: 'di 7/4/2004 08:39'!\rffiContentsOfHandle: oop errCode: errCode\r\t\"Make sure that the given oop is a valid external handle\"\r\tself inline: true.\r\t(interpreterProxy isIntegerObject: oop)\r\t\tifTrue:[^self ffiFail: errCode].\r\t(interpreterProxy isBytes: oop)\r\t\tifFalse:[^self ffiFail: errCode].\r\t((interpreterProxy byteSizeOf: oop) == 4)\r\t\tifFalse:[^self ffiFail: errCode].\r\t^interpreterProxy fetchPointer: 0 ofObject: oop! !\r\r!FFIPlugin methodsFor: 'callout support' stamp: 'di 7/4/2004 08:40'!\rffiPushPointerContentsOf: oop\r\t\"Push the contents of the given external structure\"\r\t| ptrValue ptrClass ptrAddress |\r\tself inline: false.\r\tptrValue _ oop.\r\tptrClass _ interpreterProxy fetchClassOf: ptrValue.\r\tptrClass == interpreterProxy classExternalAddress ifTrue:[\r\t\tptrAddress _ interpreterProxy fetchPointer: 0 ofObject: ptrValue.\r\t\t\"Don't you dare to pass pointers into object memory\"\r\t\t(interpreterProxy isInMemory: ptrAddress)\r\t\t\tifTrue:[^self ffiFail: FFIErrorInvalidPointer].\r\t\t^self ffiPushPointer: ptrAddress].\r\tptrClass == interpreterProxy classByteArray ifTrue:[\r\t\tptrAddress _ self cCoerce: (interpreterProxy firstIndexableField: ptrValue) to: 'int'.\r\t\t^self ffiPushPointer: ptrAddress].\r\t^self ffiFail: FFIErrorBadArg! !\r\r!FFIPlugin methodsFor: 'callout support' stamp: 'di 7/4/2004 08:43'!\rffiPushStructureContentsOf: oop\r\t\"Push the contents of the given external structure\"\r\t| ptrValue ptrClass ptrAddress |\r\tself inline: true.\r\tptrValue _ oop.\r\tptrClass _ interpreterProxy fetchClassOf: ptrValue.\r\tptrClass == interpreterProxy classExternalAddress ifTrue:[\r\t\tptrAddress _ interpreterProxy fetchPointer: 0 ofObject: ptrValue.\r\t\t\"There is no way we can make sure the structure is valid.\r\t\tBut we can at least check for attempts to pass pointers to ST memory.\"\r\t\t(interpreterProxy isInMemory: ptrAddress)\r\t\t\tifTrue:[^self ffiFail: FFIErrorInvalidPointer].\r\t\t^self ffiPush: ptrAddress \r\t\t\t\tStructure: (self cCoerce: ffiArgSpec to:'int*')\r\t\t\t\tOfLength: ffiArgSpecSize].\r\tptrClass == interpreterProxy classByteArray ifTrue:[\r\t\t\"The following is a somewhat pessimistic test but I like being sure...\"\r\t\t(interpreterProxy byteSizeOf: ptrValue) = (ffiArgHeader bitAnd: FFIStructSizeMask)\r\t\t\tifFalse:[^self ffiFail: FFIErrorStructSize].\r\t\tptrAddress _ self cCoerce: (interpreterProxy firstIndexableField: ptrValue) to: 'int'.\r\t\t(ffiArgHeader anyMask: FFIFlagPointer) ifFalse:[\r\t\t\t^self ffiPush: ptrAddress \r\t\t\t\t\tStructure: (self cCoerce: ffiArgSpec to: 'int*')\r\t\t\t\t\tOfLength: ffiArgSpecSize].\r\t\t\"If FFIFlagPointer + FFIFlagStructure is set use ffiPushPointer on the contents\"\r\t\t(ffiArgHeader bitAnd: FFIStructSizeMask) = 4\r\t\t\tifFalse:[^self ffiFail: FFIErrorStructSize].\r\t\tptrAddress _ interpreterProxy fetchPointer: 0 ofObject: ptrValue.\r\t\t(interpreterProxy isInMemory: ptrAddress)\r\t\t\tifTrue:[^self ffiFail: FFIErrorInvalidPointer].\r\t\t^self ffiPushPointer: ptrAddress].\r\t^self ffiFail: FFIErrorBadArg! !\r\r!FFIPlugin methodsFor: 'callout support' stamp: 'di 7/4/2004 08:40'!\rffiValidateExternalData: oop AtomicType: atomicType\r\t\"Validate if the given oop (an instance of ExternalData) can be passed as a pointer to the given atomic type.\"\r\t| ptrType specOop spec specType |\r\tself inline: true.\r\tptrType _ interpreterProxy fetchPointer: 1 ofObject: oop.\r\t(interpreterProxy isIntegerObject: ptrType)\r\t\tifTrue:[^self ffiFail: FFIErrorWrongType].\r\t(interpreterProxy isPointers: ptrType)\r\t\tifFalse:[^self ffiFail: FFIErrorWrongType].\r\t(interpreterProxy slotSizeOf: ptrType) < 2\r\t\tifTrue:[^self ffiFail: FFIErrorWrongType].\r\tspecOop _ interpreterProxy fetchPointer: 0 ofObject: ptrType.\r\t(interpreterProxy isIntegerObject: specOop)\r\t\tifTrue:[^self ffiFail: FFIErrorWrongType].\r\t(interpreterProxy isWords: specOop)\r\t\tifFalse:[^self ffiFail: FFIErrorWrongType].\r\t(interpreterProxy slotSizeOf: specOop) = 0\r\t\tifTrue:[^self ffiFail: FFIErrorWrongType].\r\tspec _ interpreterProxy fetchPointer: 0 ofObject: specOop.\r\t(self isAtomicType: spec)\r\t\tifFalse:[^self ffiFail: FFIErrorWrongType].\r\tspecType _ self atomicTypeOf: spec.\r\tspecType ~= atomicType ifTrue:[\r\t\t\"allow for signed/unsigned conversion but nothing else\"\r\t\t(atomicType > FFITypeBool and:[atomicType < FFITypeSingleFloat])\r\t\t\tifFalse:[^self ffiFail: FFIErrorCoercionFailed].\r\t\t((atomicType >> 1) = (specType >> 1))\r\t\t\tifFalse:[^self ffiFail: FFIErrorCoercionFailed]].\r\t^0! !\r\r!FFIPlugin methodsFor: 'primitives' stamp: 'di 6/23/2004 14:28'!\rprimitiveFFIIntegerAt\r\t\"Return a (signed or unsigned) n byte integer from the given byte offset.\"\r\t| isSigned byteSize byteOffset rcvr addr value mask |\r\tself export: true.\r\tself inline: false.\r\tisSigned _ interpreterProxy booleanValueOf: (interpreterProxy stackValue: 0).\r\tbyteSize _ interpreterProxy stackIntegerValue: 1.\r\tbyteOffset _ interpreterProxy stackIntegerValue: 2.\r\trcvr _ interpreterProxy stackObjectValue: 3.\r\tinterpreterProxy failed ifTrue:[^0].\r\t(byteOffset > 0 and:[byteSize = 1 or:[byteSize = 2 or:[byteSize = 4]]])\r\t\tifFalse:[^interpreterProxy primitiveFail].\r\taddr _ self addressOf: rcvr startingAt: byteOffset size: byteSize.\r\tinterpreterProxy failed ifTrue:[^0].\r\tbyteSize < 4 ifTrue:[\r\t\t\"short/byte\"\r\t\tbyteSize = 1 \r\t\t\tifTrue:[value _ interpreterProxy byteAt: addr]\r\t\t\tifFalse:[\tvalue _ self cCode: '*((short int *) addr)' \r\t\t\t\t\t\t\t\tinSmalltalk: [interpreterProxy shortAt: addr]].\r\t\tisSigned ifTrue:[\"sign extend value\"\r\t\t\tmask _ 1 << (byteSize * 8 - 1).\r\t\t\tvalue _ (value bitAnd: mask-1) - (value bitAnd: mask)].\r\t\t\"note: byte/short never exceed SmallInteger range\"\r\t\tvalue _ interpreterProxy integerObjectOf: value.\r\t] ifFalse:[\r\t\t\"general 32 bit integer\"\r\t\tvalue _ interpreterProxy longAt: addr.\r\t\tisSigned\r\t\t\tifTrue:[value _ interpreterProxy signed32BitIntegerFor: value]\r\t\t\tifFalse:[value _ interpreterProxy positive32BitIntegerFor: value].\r\t].\r\tinterpreterProxy pop: 4.\r\t^interpreterProxy push: value\r! !\r\r!FFIPlugin methodsFor: 'primitives' stamp: 'di 6/23/2004 14:33'!\rprimitiveFFIIntegerAtPut\r\t\"Store a (signed or unsigned) n byte integer at the given byte offset.\"\r\t| isSigned byteSize byteOffset rcvr addr value max valueOop |\r\tself export: true.\r\tself inline: false.\r\tisSigned _ interpreterProxy booleanValueOf: (interpreterProxy stackValue: 0).\r\tbyteSize _ interpreterProxy stackIntegerValue: 1.\r\tvalueOop _ interpreterProxy stackValue: 2.\r\tbyteOffset _ interpreterProxy stackIntegerValue: 3.\r\trcvr _ interpreterProxy stackObjectValue: 4.\r\tinterpreterProxy failed ifTrue:[^0].\r\t(byteOffset > 0 and:[byteSize = 1 or:[byteSize = 2 or:[byteSize = 4]]])\r\t\tifFalse:[^interpreterProxy primitiveFail].\r\taddr _ self addressOf: rcvr startingAt: byteOffset size: byteSize.\r\tinterpreterProxy failed ifTrue:[^0].\r\tisSigned \r\t\tifTrue:[value _ interpreterProxy signed32BitValueOf: valueOop]\r\t\tifFalse:[value _ interpreterProxy positive32BitValueOf: valueOop].\r\tinterpreterProxy failed ifTrue:[^0].\r\tbyteSize < 4 ifTrue:[\r\t\tisSigned ifTrue:[\r\t\t\tmax _ 1 << (8 * byteSize - 1).\r\t\t\tvalue >= max ifTrue:[^interpreterProxy primitiveFail].\r\t\t\tvalue < (0 - max) ifTrue:[^interpreterProxy primitiveFail].\r\t\t] ifFalse:[\r\t\t\tvalue >= (1 << (8*byteSize)) ifTrue:[^interpreterProxy primitiveFail].\r\t\t].\r\t\t\"short/byte\"\r\t\tbyteSize = 1 \r\t\t\tifTrue:[interpreterProxy byteAt: addr put: value]\r\t\t\tifFalse:[\tself cCode: '*((short int *) addr) = value' \r\t\t\t\t\t\tinSmalltalk: [interpreterProxy shortAt: addr put: value]].\r\t] ifFalse:[interpreterProxy longAt: addr put: value].\r\tinterpreterProxy pop: 5.\r\t^interpreterProxy push: valueOop.! !\r\r\r!FilePlugin methodsFor: 'directory primitives' stamp: 'ikp 6/14/2004 14:53'!\rprimitiveDirectoryCreate\r\r\t| dirName dirNameIndex dirNameSize okToCreate |\r\tself var: #dirNameIndex type: 'char *'.\r\tself export: true.\r\r\tdirName _ interpreterProxy stackValue: 0.\r\t(interpreterProxy isBytes: dirName)\r\t\tifFalse: [^interpreterProxy primitiveFail].\r\tdirNameIndex _ interpreterProxy firstIndexableField: dirName.\r\tdirNameSize _ interpreterProxy byteSizeOf: dirName.\r\t\"If the security plugin can be loaded, use it to check for permission.\r\tIf not, assume it's ok\"\r\tsCCPfn ~= 0\r\t\tifTrue: [okToCreate _ self cCode: ' ((sqInt (*)(char *, sqInt))sCCPfn)(dirNameIndex, dirNameSize)'.\r\t\t\tokToCreate\r\t\t\t\tifFalse: [^interpreterProxy primitiveFail]].\r\t(self\r\t\t\tcCode: 'dir_Create(dirNameIndex, dirNameSize)'\r\t\t\tinSmalltalk: [false])\r\t\tifFalse: [^interpreterProxy primitiveFail].\r\tinterpreterProxy pop: 1! !\r\r!FilePlugin methodsFor: 'directory primitives' stamp: 'ikp 6/14/2004 14:54'!\rprimitiveDirectoryDelete\r\r\t| dirName dirNameIndex dirNameSize okToDelete |\r\tself var: #dirNameIndex type: 'char *'.\r\tself export: true.\r\r\tdirName _ interpreterProxy stackValue: 0.\r\t(interpreterProxy isBytes: dirName)\r\t\tifFalse: [^interpreterProxy primitiveFail].\r\tdirNameIndex _ interpreterProxy firstIndexableField: dirName.\r\tdirNameSize _ interpreterProxy byteSizeOf: dirName.\r\t\"If the security plugin can be loaded, use it to check for permission.\r\tIf not, assume it's ok\"\r\tsCDPfn ~= 0\r\t\tifTrue: [okToDelete _ self cCode: ' ((sqInt (*)(char *, sqInt))sCDPfn)(dirNameIndex, dirNameSize)'.\r\t\t\tokToDelete\r\t\t\t\tifFalse: [^interpreterProxy primitiveFail]].\r\t(self\r\t\t\tcCode: 'dir_Delete(dirNameIndex, dirNameSize)'\r\t\t\tinSmalltalk: [false])\r\t\tifFalse: [^interpreterProxy primitiveFail].\r\tinterpreterProxy pop: 1! !\r\r!FilePlugin methodsFor: 'directory primitives' stamp: 'ikp 6/14/2004 14:56'!\rprimitiveDirectoryGetMacTypeAndCreator\r\r\t| creatorString typeString fileName creatorStringIndex typeStringIndex fileNameIndex fileNameSize okToGet |\r\tself var: 'creatorStringIndex' type: 'char *'.\r\tself var: 'typeStringIndex' type: 'char *'.\r\tself var: 'fileNameIndex' type: 'char *'.\r\tself export: true.\r\r\tcreatorString _ interpreterProxy stackValue: 0.\r\ttypeString _ interpreterProxy stackValue: 1.\r\tfileName _ interpreterProxy stackValue: 2.\r\t((interpreterProxy isBytes: creatorString)\r\t\t\tand: [(interpreterProxy byteSizeOf: creatorString) = 4])\r\t\tifFalse: [^interpreterProxy primitiveFail].\r\t((interpreterProxy isBytes: typeString)\r\t\t\tand: [(interpreterProxy byteSizeOf: typeString) = 4])\r\t\tifFalse: [^interpreterProxy primitiveFail].\r\t(interpreterProxy isBytes: fileName)\r\t\tifFalse: [^interpreterProxy primitiveFail].\r\tcreatorStringIndex _ interpreterProxy firstIndexableField: creatorString.\r\ttypeStringIndex _ interpreterProxy firstIndexableField: typeString.\r\tfileNameIndex _ interpreterProxy firstIndexableField: fileName.\r\tfileNameSize _ interpreterProxy byteSizeOf: fileName.\r\t\"If the security plugin can be loaded, use it to check for permission.\r\tIf not, assume it's ok\"\r\tsCGFTfn ~= 0\r\t\tifTrue: [okToGet _ self cCode: ' ((sqInt (*)(char *, sqInt))sCGFTfn)(fileNameIndex, fileNameSize)'.\r\t\t\tokToGet\r\t\t\t\tifFalse: [^interpreterProxy primitiveFail]].\r\t(self\r\t\t\tcCode: 'dir_GetMacFileTypeAndCreator(fileNameIndex, fileNameSize, typeStringIndex, creatorStringIndex)'\r\t\t\tinSmalltalk: [true])\r\t\tifFalse: [^interpreterProxy primitiveFail].\r\tinterpreterProxy pop: 3! !\r\r!FilePlugin methodsFor: 'directory primitives' stamp: 'ikp 6/14/2004 14:57'!\rprimitiveDirectoryLookup\r\r\t| index pathName pathNameIndex pathNameSize status entryName entryNameSize createDate modifiedDate dirFlag fileSize okToList |\r\tself var: 'entryName' declareC: 'char entryName[256]'.\r\tself var: 'pathNameIndex' type: 'char *'.\r\tself var: 'fileSize' type: 'squeakFileOffsetType'.\r\tself export: true.\r\r\tindex _ interpreterProxy stackIntegerValue: 0.\r\tpathName _ interpreterProxy stackValue: 1.\r\t(interpreterProxy isBytes: pathName)\r\t\tifFalse: [^interpreterProxy primitiveFail].\r\tpathNameIndex _ interpreterProxy firstIndexableField: pathName.\r\tpathNameSize _ interpreterProxy byteSizeOf: pathName.\r\t\"If the security plugin can be loaded, use it to check for permission. \r\tIf not, assume it's ok\"\r\tsCLPfn ~= 0\r\t\tifTrue: [okToList _ self cCode: '((sqInt (*)(char *, sqInt))sCLPfn)(pathNameIndex, pathNameSize)']\r\t\tifFalse: [okToList _ true].\r\tokToList\r\t\tifTrue: [status _ self cCode: 'dir_Lookup(pathNameIndex, pathNameSize, index,\r\t\t\t\t\t\t\t\t\t\t\t\tentryName, &entryNameSize, &createDate, &modifiedDate,\r\t\t\t\t\t\t\t\t\t\t\t\t&dirFlag, &fileSize)']\r\t\tifFalse: [status _ DirNoMoreEntries].\r\tinterpreterProxy failed\r\t\tifTrue: [^nil].\r\tstatus = DirNoMoreEntries\r\t\tifTrue: [\"no more entries; return nil\"\r\t\t\tinterpreterProxy pop: 3.\r\t\t\t\"pop pathName, index, rcvr\"\r\t\t\tinterpreterProxy push: interpreterProxy nilObject.\r\t\t\t^nil].\r\tstatus = DirBadPath\r\t\tifTrue: [^interpreterProxy primitiveFail].\r\t\"bad path\"\r\tinterpreterProxy pop: 3.\r\t\"pop pathName, index, rcvr\"\r\tinterpreterProxy\r\t\tpush: (self\r\t\t\t\tmakeDirEntryName: entryName\r\t\t\t\tsize: entryNameSize\r\t\t\t\tcreateDate: createDate\r\t\t\t\tmodDate: modifiedDate\r\t\t\t\tisDir: dirFlag\r\t\t\t\tfileSize: fileSize)! !\r\r!FilePlugin methodsFor: 'directory primitives' stamp: 'ikp 6/14/2004 14:58'!\rprimitiveDirectorySetMacTypeAndCreator\r\r\t| creatorString typeString fileName creatorStringIndex typeStringIndex fileNameIndex fileNameSize  okToSet |\r\tself var: 'creatorStringIndex' type: 'char *'.\r\tself var: 'typeStringIndex' type: 'char *'.\r\tself var: 'fileNameIndex' type: 'char *'.\r\tself export: true.\r\r\tcreatorString _ interpreterProxy stackValue: 0.\r\ttypeString _ interpreterProxy stackValue: 1.\r\tfileName _ interpreterProxy stackValue: 2.\r\t((interpreterProxy isBytes: creatorString)\r\t\t\tand: [(interpreterProxy byteSizeOf: creatorString)\r\t\t\t\t\t= 4])\r\t\tifFalse: [^interpreterProxy primitiveFail].\r\t((interpreterProxy isBytes: typeString)\r\t\t\tand: [(interpreterProxy byteSizeOf: typeString)\r\t\t\t\t\t= 4])\r\t\tifFalse: [^interpreterProxy primitiveFail].\r\t(interpreterProxy isBytes: fileName)\r\t\tifFalse: [^interpreterProxy primitiveFail].\r\tcreatorStringIndex _ interpreterProxy firstIndexableField: creatorString.\r\ttypeStringIndex _ interpreterProxy firstIndexableField: typeString.\r\tfileNameIndex _ interpreterProxy firstIndexableField: fileName.\r\tfileNameSize _ interpreterProxy byteSizeOf: fileName.\r\t\"If the security plugin can be loaded, use it to check for permission.\r\tIf not, assume it's ok\"\r\tsCSFTfn ~= 0\r\t\tifTrue: [okToSet _ self cCode: ' ((sqInt (*)(char *, sqInt))sCSFTfn)(fileNameIndex, fileNameSize)'.\r\t\t\tokToSet\r\t\t\t\tifFalse: [^interpreterProxy primitiveFail]].\r\t(self\r\t\t\tcCode: 'dir_SetMacFileTypeAndCreator(fileNameIndex, fileNameSize,typeStringIndex, creatorStringIndex)'\r\t\t\tinSmalltalk: [true])\r\t\tifFalse: [^interpreterProxy primitiveFail].\r\tinterpreterProxy pop: 3! !\r\r!FilePlugin methodsFor: 'file primitives' stamp: 'ikp 6/14/2004 14:01'!\rfileOpenName: nameIndex size: nameSize write: writeFlag secure: secureFlag\r\t\"Open the named file, possibly checking security. Answer the file oop.\"\r\t| file fileOop okToOpen |\r\tself var: #file type: 'SQFile *'.\r\tself var: 'nameIndex' type: 'char *'.\r\tself export: true.\r\tfileOop _ interpreterProxy instantiateClass: interpreterProxy classByteArray indexableSize: self fileRecordSize.\r\tfile _ self fileValueOf: fileOop.\r\tinterpreterProxy failed\r\t\tifFalse: [ secureFlag ifTrue: [\r\t\t\t\t\"If the security plugin can be loaded, use it to check for permission.\r\t\t\t\tIf not, assume it's ok\"\r\t\t\t\tsCOFfn ~= 0 \r\t\t\t\t\tifTrue: [okToOpen _ self cCode: '((sqInt (*) (char *, sqInt, sqInt)) sCOFfn)(nameIndex, nameSize, writeFlag)' inSmalltalk:[true].\r\t\t\t\t\t\tokToOpen\r\t\t\t\t\t\t\tifFalse: [interpreterProxy primitiveFail]]]].\r\tinterpreterProxy failed\r\t\tifFalse: [self cCode: 'sqFileOpen(file, oopForPointer(nameIndex), nameSize, writeFlag)' inSmalltalk: [file]].\r\t^ fileOop! !\r\r!FilePlugin methodsFor: 'file primitives' stamp: 'ikp 8/2/2004 19:49'!\rprimitiveFileDelete\r\r\t| namePointer nameIndex nameSize  okToDelete |\r\tself var: 'nameIndex' type: 'char *'.\r\tself export: true.\r\r\tnamePointer _ interpreterProxy stackValue: 0.\r\t(interpreterProxy isBytes: namePointer)\r\t\tifFalse: [^ interpreterProxy primitiveFail].\r\tnameIndex _ interpreterProxy firstIndexableField: namePointer.\r\tnameSize _ interpreterProxy byteSizeOf: namePointer.\r\t\"If the security plugin can be loaded, use it to check for permission.\r\tIf \r\tnot, assume it's ok\"\r\tsCDFfn ~= 0\r\t\tifTrue: [okToDelete _ self cCode: ' ((sqInt (*)(char *, sqInt))sCDFfn)(nameIndex, nameSize)'.\r\t\t\tokToDelete\r\t\t\t\tifFalse: [^ interpreterProxy primitiveFail]].\r\tself\r\t\tsqFileDeleteName: (self oopForPointer: nameIndex)\r\t\tSize: nameSize.\r\tinterpreterProxy failed\r\t\tifFalse: [interpreterProxy pop: 1]! !\r\r!FilePlugin methodsFor: 'file primitives' stamp: 'ikp 8/2/2004 19:49'!\rprimitiveFileRead\r\r\t| count startIndex array file byteSize arrayIndex bytesRead |\r\tself var: 'file' declareC: 'SQFile *file'.\r\tself var: 'arrayIndex' type: 'char *'.\r\tself var: 'count' type: 'size_t'.\r\tself var: 'startIndex' type: 'size_t'.\r\tself var: 'byteSize' type: 'size_t'.\r\tself export: true.\r\r\tcount\t\t_ interpreterProxy positive32BitValueOf: (interpreterProxy stackValue: 0).\r\tstartIndex\t_ interpreterProxy positive32BitValueOf: (interpreterProxy stackValue: 1).\r\tarray\t\t_ interpreterProxy stackValue: 2.\r\tfile\t\t\t_ self fileValueOf: (interpreterProxy stackValue: 3).\r\r\t\"buffer can be any indexable words or bytes object except CompiledMethod\"\r\t(interpreterProxy isWordsOrBytes: array) \r\t\tifFalse: [^interpreterProxy primitiveFail].\r\r\t(interpreterProxy isWords: array)\r\t\tifTrue: [byteSize _ 4]\r\t\tifFalse: [byteSize _ 1].\r\t((startIndex >= 1) and:\r\t\t[(startIndex + count - 1) <= (interpreterProxy slotSizeOf: array)])\r\t\t\tifFalse: [^interpreterProxy primitiveFail].\r\r\tarrayIndex _ interpreterProxy firstIndexableField: array.\r\t\"Note: adjust startIndex for zero-origin indexing\"\r\tbytesRead _ self\r\t\tsqFile: file Read: (count * byteSize)\r\t\tInto: (self oopForPointer: arrayIndex)\r\t\tAt: ((startIndex - 1) * byteSize).\r\tinterpreterProxy failed ifFalse: [\r\t\tinterpreterProxy pop: 5.  \"pop rcvr, file, array, startIndex, count\"\r\t\tinterpreterProxy pushInteger: bytesRead // byteSize.  \"push # of elements read\"\r\t].! !\r\r!FilePlugin methodsFor: 'file primitives' stamp: 'ikp 8/2/2004 19:50'!\rprimitiveFileRename\r\r\t| oldNamePointer newNamePointer oldNameIndex oldNameSize newNameIndex newNameSize  okToRename |\r\tself var: 'oldNameIndex' type: 'char *'.\r\tself var: 'newNameIndex' type: 'char *'.\r\tself export: true.\r\r\tnewNamePointer _ interpreterProxy stackValue: 0.\r\toldNamePointer _ interpreterProxy stackValue: 1.\r\t((interpreterProxy isBytes: newNamePointer)\r\t\t\tand: [interpreterProxy isBytes: oldNamePointer])\r\t\tifFalse: [^interpreterProxy primitiveFail].\r\tnewNameIndex _ interpreterProxy firstIndexableField: newNamePointer.\r\tnewNameSize _ interpreterProxy byteSizeOf: newNamePointer.\r\toldNameIndex _ interpreterProxy firstIndexableField: oldNamePointer.\r\toldNameSize _ interpreterProxy byteSizeOf: oldNamePointer.\r\t\"If the security plugin can be loaded, use it to check for rename permission.\r\tIf not, assume it's ok\"\r\tsCRFfn ~= 0\r\t\tifTrue: [okToRename _ self cCode: ' ((sqInt (*)(char *, sqInt))sCRFfn)(oldNameIndex, oldNameSize)'.\r\t\t\tokToRename\r\t\t\t\tifFalse: [^interpreterProxy primitiveFail]].\r\tself\r\t\tsqFileRenameOld: (self oopForPointer: oldNameIndex) Size: oldNameSize\r\t\tNew: (self oopForPointer: newNameIndex) Size: newNameSize.\r\tinterpreterProxy failed\r\t\tifFalse: [interpreterProxy pop: 2]! !\r\r!FilePlugin methodsFor: 'file primitives' stamp: 'ikp 8/2/2004 19:50'!\rprimitiveFileWrite\r\r\t| count startIndex array file byteSize arrayIndex bytesWritten |\r\tself var: 'file' declareC: 'SQFile *file'.\r\tself var: 'arrayIndex' type: 'char *'.\r\tself var: 'count' type: 'size_t'.\r\tself var: 'startIndex' type: 'size_t'.\r\tself var: 'byteSize' type: 'size_t'.\r\tself export: true.\r\r\tcount\t\t_ interpreterProxy positive32BitValueOf: (interpreterProxy stackValue: 0).\r\tstartIndex\t_ interpreterProxy positive32BitValueOf: (interpreterProxy stackValue: 1).\r\tarray\t\t_ interpreterProxy stackValue: 2.\r\tfile\t\t\t_ self fileValueOf: (interpreterProxy stackValue: 3).\r\r\t\"buffer can be any indexable words or bytes object except CompiledMethod\"\r\t(interpreterProxy isWordsOrBytes: array) \r\t\tifFalse: [^interpreterProxy primitiveFail].\r\r\t(interpreterProxy isWords: array)\r\t\tifTrue: [ byteSize _ 4 ]\r\t\tifFalse: [ byteSize _ 1 ].\r\t((startIndex >= 1) and:\r\t\t[(startIndex + count - 1) <= (interpreterProxy slotSizeOf: array)])\r\t\t\tifFalse: [^interpreterProxy primitiveFail].\r\tinterpreterProxy failed ifFalse: [\r\t\tarrayIndex _ interpreterProxy firstIndexableField: array.\r\t\t\"Note: adjust startIndex for zero-origin indexing\"\r\t\tbytesWritten _\r\t\t\tself sqFile: file\r\t\t\t\tWrite: (count * byteSize)\r\t\t\t\tFrom: (self oopForPointer: arrayIndex)\r\t\t\t\tAt: ((startIndex - 1) * byteSize).\r\t].\r\tinterpreterProxy failed ifFalse: [\r\t\tinterpreterProxy pop: 5.  \"pop rcvr, file, array, startIndex, count\"\r\t\tinterpreterProxy pushInteger: bytesWritten // byteSize.  \"push # of elements written\"\r\t].! !\r\r!FilePlugin methodsFor: 'security primitives' stamp: 'ikp 8/4/2004 11:31'!\rprimitiveDisableFileAccess\r\r\tself export: true.\r\t\"If the security plugin can be loaded, use it to turn off file access\r\tIf \r\tnot, assume it's ok\"\r\tsDFAfn ~= 0\r\t\tifTrue: [self cCode: ' ((sqInt (*)(void))sDFAfn)()'].\r\tinterpreterProxy failed\r\t\tifFalse: [interpreterProxy pop: 1]! !\r\r!FilePlugin methodsFor: 'security primitives' stamp: 'ikp 8/4/2004 11:31'!\rprimitiveHasFileAccess\r\t|  hasAccess |\r\tself export: true.\r\t\"If the security plugin can be loaded, use it to check . \r\tIf not, assume \r\tit's ok\"\r\tsHFAfn ~= 0\r\t\tifTrue: [hasAccess _ self cCode: ' ((sqInt (*)(void))sHFAfn)()' inSmalltalk: [true]]\r\t\tifFalse: [hasAccess _ true].\r\tinterpreterProxy pop: 1.\r\tinterpreterProxy pushBool: hasAccess! !\r\r\r!FilePluginSimulator methodsFor: 'simulation' stamp: 'di 6/23/2004 14:18'!\roopForPointer: pointer\r\t\"This gets implemented by Macros in C, where its types will also be checked.\r\toop is the width of a machine word, and pointer is a raw address.\"\r\r\t^ pointer! !\r\r\r!FloatArrayPlugin methodsFor: 'access primitives' stamp: 'di 6/29/2004 14:05'!\rprimitiveAtPut\r\r\t| value floatValue index rcvr floatPtr |\r\tself export: true.\r\tself var: #floatValue declareC: 'double floatValue'.\r\tself var: #floatPtr declareC:'float *floatPtr'.\r\tvalue _ interpreterProxy stackValue: 0.\r\t(interpreterProxy isIntegerObject: value)\r\t\tifTrue:[floatValue _ (interpreterProxy integerValueOf: value) asFloat]\r\t\tifFalse:[floatValue _ interpreterProxy floatValueOf: value].\r\tindex _ interpreterProxy stackIntegerValue: 1.\r\trcvr _ interpreterProxy stackObjectValue: 2.\r\tinterpreterProxy failed ifTrue:[^nil].\r\tinterpreterProxy success: (interpreterProxy isWords: rcvr).\r\tinterpreterProxy success: (index > 0 and:[index <= (interpreterProxy slotSizeOf: rcvr)]).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tfloatPtr _ interpreterProxy firstIndexableField: rcvr.\r\tfloatPtr at: index-1 put: (self cCoerce: floatValue to:'float').\r\tinterpreterProxy failed ifFalse: [interpreterProxy pop: 3 thenPush: value].! !\r\r\r!InterpreterPlugin class methodsFor: 'translation' stamp: 'ikp 8/3/2004 18:55'!\rbuildCodeGeneratorUpTo: aPluginClass\r\t\"Build a CCodeGenerator for the plugin\"\r\t | cg theClass |\r\tcg _ self codeGeneratorClass new initialize.\r\tcg pluginName: self moduleName.\r\t\"Add an extra declaration for module name\"\r\tcg declareModuleName: self moduleNameAndVersion.\r\r\ttheClass _ aPluginClass.\r\t[theClass == Object | (theClass == InterpreterSimulationObject)] whileFalse:[\r\t\tcg addClass: theClass.\r\t\ttheClass _ theClass superclass].\r\t^cg! !\r\r\r!BalloonEngineBase class methodsFor: 'translation' stamp: 'ikp 6/14/2004 15:19'!\rdeclareCVarsIn: cg\r\r\t\"Buffers\"\r\tcg var: #workBuffer type: #'int*'.\r\tcg var: #objBuffer type: #'int*'.\r\tcg var: #getBuffer type: #'int*'.\r\tcg var: #aetBuffer type: #'int*'.\r\tcg var: #spanBuffer type: #'unsigned int*'.\r\tcg var: #edgeTransform declareC: 'float edgeTransform[6]'.\r\tcg var: #doProfileStats declareC: 'int doProfileStats = 0'.\r\tcg var: 'bbPluginName' declareC:'char bbPluginName[256] = \"BitBltPlugin\"'.\r\t\"Functions\"\r\tcg var: 'copyBitsFn'\ttype: 'void *'.\r\tcg var: 'loadBBFn'\ttype: 'void *'.! !\r\r\r!BitBltSimulation class methodsFor: 'translation' stamp: 'ikp 8/4/2004 18:08'!\rdeclareCVarsIn: aCCodeGenerator\r\taCCodeGenerator var: 'opTable'\r\t\tdeclareC: 'void *opTable[' , OpTableSize printString , ']'.\r\taCCodeGenerator var: 'maskTable'\r\t\tdeclareC:'int maskTable[33] = {\r0, 1, 3, 0, 15, 31, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 65535,\r0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1\r}'.\r\taCCodeGenerator var: 'ditherMatrix4x4'\r\t\tdeclareC:'const int ditherMatrix4x4[16] = {\r0,\t8,\t2,\t10,\r12,\t4,\t14,\t6,\r3,\t11,\t1,\t9,\r15,\t7,\t13,\t5\r}'.\r\taCCodeGenerator var: 'ditherThresholds16'\r\t\tdeclareC:'const int ditherThresholds16[8] = { 0, 2, 4, 6, 8, 12, 14, 16 }'.\r\taCCodeGenerator var: 'ditherValues16'\r\t\tdeclareC:'const int ditherValues16[32] = {\r0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,\r15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30\r}'.\r\r\taCCodeGenerator var: 'warpBitShiftTable'\r\t\tdeclareC:'int warpBitShiftTable[32]'.\r\r\taCCodeGenerator var:'cmShiftTable' \r\t\tdeclareC:'int *cmShiftTable'.\r\taCCodeGenerator var:'cmMaskTable' \r\t\tdeclareC:'unsigned int *cmMaskTable'.\r\taCCodeGenerator var:'cmLookupTable' \r\t\tdeclareC:'unsigned int *cmLookupTable'.\r\r\taCCodeGenerator var: 'dither8Lookup'\r\t\tdeclareC:' unsigned char dither8Lookup[4096]'.\r\r\taCCodeGenerator var: 'querySurfaceFn' declareC: 'void *querySurfaceFn'.\r\taCCodeGenerator var: 'lockSurfaceFn' declareC: 'void *lockSurfaceFn'.\r\taCCodeGenerator var: 'unlockSurfaceFn' declareC: 'void *unlockSurfaceFn'! !\r\r\r!FilePlugin class methodsFor: 'translation' stamp: 'ikp 6/14/2004 13:52'!\rdeclareCVarsIn: aCCodeGenerator\r\r\taCCodeGenerator var: 'sCCPfn'\ttype: 'void *'.\r\taCCodeGenerator var: 'sCDPfn'\ttype: 'void *'.\r\taCCodeGenerator var: 'sCGFTfn'\ttype: 'void *'.\r\taCCodeGenerator var: 'sCLPfn'\ttype: 'void *'.\r\taCCodeGenerator var: 'sCSFTfn'\ttype: 'void *'.\r\taCCodeGenerator var: 'sDFAfn'\ttype: 'void *'.\r\taCCodeGenerator var: 'sCDFfn'\ttype: 'void *'.\r\taCCodeGenerator var: 'sCOFfn'\ttype: 'void *'.\r\taCCodeGenerator var: 'sCRFfn'\ttype: 'void *'.\r\taCCodeGenerator var: 'sHFAfn'\ttype: 'void *'.\r\taCCodeGenerator addHeaderFile: '\"FilePlugin.h\"'! !\r\r\r!InterpreterSimulationObject methodsFor: 'memory access' stamp: 'di 8/5/2004 20:56'!\rlong32At: byteAddress\r\t\"Simulation support.  Answer the 32-bit word at byteAddress which must be 0 mod 4.\"\r\r\t^self getInterpreter long32At: byteAddress! !\r\r!InterpreterSimulationObject methodsFor: 'memory access' stamp: 'di 8/5/2004 20:56'!\rlong32At: byteAddress put: a32BitValue\r\t\"Simulation support.  Store the 32-bit value at byteAddress which must be 0 mod 4.\"\r\r\t^self getInterpreter long32At: byteAddress put: a32BitValue! !\r\r!InterpreterSimulationObject methodsFor: 'memory access' stamp: 'ikp 8/3/2004 15:56'!\roopForPointer: aPointer\r\t\"Simulation support.  Pointers and oops are the same when simulating; answer aPointer.\"\r\r\t^aPointer! !\r\r!InterpreterSimulationObject methodsFor: 'memory access' stamp: 'ikp 8/3/2004 15:56'!\rpointerForOop: anOop\r\t\"Simulation support.  Pointers and oops are the same when simulating; answer anOop.\"\r\r\t^anOop! !\r\r!InterpreterSimulationObject methodsFor: 'simulation' stamp: 'di 8/5/2004 18:55'!\rcCoerce: value to: cTypeString\r\t\"Here the Simulator has a chance to create properly typed flavors of CArray access.\"\r\r\tvalue isCObjectAccessor ifTrue:\r\t\t[^ self getInterpreter cCoerce: value to: cTypeString].\r\t(value isMemberOf: CArray) ifTrue:\r\t\t[^ self getInterpreter cCoerce: value to: cTypeString].\r\t^ value! !\r\r\r!Matrix2x3Plugin methodsFor: 'primitives' stamp: 'di 6/29/2004 13:42'!\rprimitiveComposeMatrix\r\t| m1 m2 m3 result |\r\tself cCode: ''  \"Make this fail in simulation\"\r\t\tinSmalltalk: [interpreterProxy success: false. ^ nil].\r\tself export: true.\r\tself inline: false.\r\tself var: #m1 declareC:'float *m1'.\r\tself var: #m2 declareC:'float *m2'.\r\tself var: #m3 declareC:'float *m3'.\r\tm3 _ self loadArgumentMatrix: (result _ interpreterProxy stackObjectValue: 0).\r\tm2 _ self loadArgumentMatrix: (interpreterProxy stackObjectValue: 1).\r\tm1 _ self loadArgumentMatrix: (interpreterProxy stackObjectValue: 2).\r\tinterpreterProxy failed ifTrue:[^nil].\r\tself matrix2x3ComposeMatrix: m1 with: m2 into: m3.\r\tinterpreterProxy pop: 3.\r\tinterpreterProxy push: result.! !\r\r\r!ObjectMemory methodsFor: 'gc -- mark and sweep' stamp: 'di 7/1/2004 15:47'!\rstartField\r\t\"Examine and possibly trace the next field of the object being \r\ttraced. See comment in markAndTrace for explanation of \r\ttracer state variables.\"\r\t| typeBits childType |\r\tself inline: true.\r\tchild _ self longAt: field.\r\ttypeBits _ child bitAnd: TypeMask.\r\t(typeBits bitAnd: 1) = 1\r\t\tifTrue: [\"field contains a SmallInteger; skip it\"\r\t\t\tfield _ field - BytesPerWord.\r\t\t\t^ StartField].\r\ttypeBits = 0 ifTrue: [\"normal oop, go down\"\r\t\t\tself longAt: field put: parentField.\r\t\t\tparentField _ field.\r\t\t\t^ StartObj].\r\ttypeBits = 2 ifTrue: [\"reached the header; do we need to process the class word? \"\r\t\t\t(child bitAnd: CompactClassMask) ~= 0\r\t\t\t\tifTrue: [\"object's class is compact; we're done\"\r\t\t\t\t\t\"restore the header type bits\"\r\t\t\t\t\tchild _ child bitAnd: AllButTypeMask.\r\t\t\t\t\tchildType _ self rightType: child.\r\t\t\t\t\tself longAt: field put: (child bitOr: childType).\r\t\t\t\t\t^ Upward]\r\t\t\t\tifFalse: [\"object has a full class word; process that class\"\r\t\t\t\t\tchild _ self longAt: field - BytesPerWord. \"class word\"\r\t\t\t\t\tchild _ child bitAnd: AllButTypeMask. \"clear type bits\"\r\t\t\t\t\tself longAt: field - BytesPerWord put: parentField.\r\t\t\t\t\tparentField _ field - BytesPerWord bitOr: 1.\r\t\t\t\t\t\"point at class word; mark as working on the class. \"\r\t\t\t\t\t^ StartObj]]! !\r\r!ObjectMemory methodsFor: 'gc -- mark and sweep' stamp: 'di 7/1/2004 15:48'!\rstartObj\r\t\"Start tracing the object 'child' and answer the next action. \r\tThe object may be anywhere in the middle of being swept \r\titself. See comment in markAndTrace for explanation of \r\ttracer state variables.\"\r\t| oop header lastFieldOffset |\r\tself inline: true.\r\toop _ child.\r\toop < youngStartLocal\r\t\tifTrue: [\"old object; skip it\"\r\t\t\tfield _ oop.\r\t\t\t^ Upward].\r\theader _ self longAt: oop.\r\t(header bitAnd: MarkBit) = 0\r\t\tifTrue: [\"unmarked; mark and trace\"\r\t\t\t\"Do not trace the object's indexed fields if it's a weak class \"\r\t\t\t(self isWeakNonInt: oop)\r\t\t\t\tifTrue: [\"Set lastFieldOffset before the weak fields in the receiver \"\r\t\t\t\t\tlastFieldOffset _ (self nonWeakFieldsOf: oop) << ShiftForWord]\r\t\t\t\tifFalse: [\"Do it the usual way\"\r\t\t\t\t\tlastFieldOffset _ self lastPointerOf: oop].\r\t\t\theader _ header bitAnd: AllButTypeMask.\r\t\t\theader _ (header bitOr: MarkBit) bitOr: HeaderTypeGC.\r\t\t\tself longAt: oop put: header.\r\t\t\tfield _ oop + lastFieldOffset.\r\t\t\t^ StartField \"trace its fields and class\"]\r\t\tifFalse: [\"already marked; skip it\"\r\t\t\tfield _ oop.\r\t\t\t^ Upward]! !\r\r!ObjectMemory methodsFor: 'gc -- mark and sweep' stamp: 'di 7/1/2004 15:57'!\rsweepPhase\r\t\"Sweep memory from youngStart through the end of memory. Free all \r\tinaccessible objects and coalesce adjacent free chunks. Clear the mark \r\tbits of accessible objects. Compute the starting point for the first pass of \r\tincremental compaction (compStart). Return the number of surviving \r\tobjects. \"\r\t\"Details: Each time a non-free object is encountered, decrement the \r\tnumber of available forward table entries. If all entries are spoken for \r\t(i.e., entriesAvailable reaches zero), set compStart to the last free \r\tchunk before that object or, if there is no free chunk before the given \r\tobject, the first free chunk after it. Thus, at the end of the sweep \r\tphase, compStart through compEnd spans the highest collection of \r\tnon-free objects that can be accomodated by the forwarding table. This \r\tinformation is used by the first pass of incremental compaction to \r\tensure that space is initially freed at the end of memory. Note that \r\tthere should always be at least one free chunk--the one at the end of \r\tthe heap.\"\r\t| entriesAvailable survivors freeChunk firstFree oop oopHeader oopHeaderType hdrBytes oopSize freeChunkSize endOfMemoryLocal |\r\tself inline: false.\r\tentriesAvailable _ self fwdTableInit: BytesPerWord*2.\r\tsurvivors _ 0.\r\tfreeChunk _ nil.\r\tfirstFree _ nil.\r\t\"will be updated later\"\r\tendOfMemoryLocal _ endOfMemory.\r\toop _ self oopFromChunk: youngStart.\r\t[oop < endOfMemoryLocal]\r\t\twhileTrue: [\"get oop's header, header type, size, and header size\"\r\t\t\toopHeader _ self baseHeader: oop.\r\t\t\toopHeaderType _ oopHeader bitAnd: TypeMask.\r\t\t\thdrBytes _ headerTypeBytes at: oopHeaderType.\r\t\t\t(oopHeaderType bitAnd: 1) = 1\r\t\t\t\tifTrue: [oopSize _ oopHeader bitAnd: SizeMask]\r\t\t\t\tifFalse: [oopHeaderType = HeaderTypeSizeAndClass\r\t\t\t\t\t\tifTrue: [oopSize _ (self sizeHeader: oop) bitAnd: LongSizeMask]\r\t\t\t\t\t\tifFalse: [\"free chunk\" oopSize _ oopHeader bitAnd: LongSizeMask]].\r\t\t\t(oopHeader bitAnd: MarkBit) = 0\r\t\t\t\tifTrue: [\"object is not marked; free it\"\r\t\t\t\t\t\"<-- Finalization support: We need to mark each oop chunk as free -->\"\r\t\t\t\t\tself longAt: oop - hdrBytes put: HeaderTypeFree.\r\t\t\t\t\tfreeChunk ~= nil\r\t\t\t\t\t\tifTrue: [\"enlarge current free chunk to include this oop\"\r\t\t\t\t\t\t\tfreeChunkSize _ freeChunkSize + oopSize + hdrBytes]\r\t\t\t\t\t\tifFalse: [\"start a new free chunk\"\r\t\t\t\t\t\t\tfreeChunk _ oop - hdrBytes.\r\t\t\t\t\t\t\t\"chunk may start 4 or 8 bytes before oop\"\r\t\t\t\t\t\t\tfreeChunkSize _ oopSize + (oop - freeChunk).\r\t\t\t\t\t\t\t\"adjust size for possible extra header bytes\"\r\t\t\t\t\t\t\tfirstFree = nil ifTrue: [firstFree _ freeChunk]]]\r\t\t\t\tifFalse: [\"object is marked; clear its mark bit and possibly adjust \r\t\t\t\t\tthe compaction start\"\r\t\t\t\t\tself longAt: oop put: (oopHeader bitAnd: AllButMarkBit).\r\t\t\t\t\t\"<-- Finalization support: Check if we're running about a weak class -->\"\r\t\t\t\t\t(self isWeakNonInt: oop) ifTrue: [self finalizeReference: oop].\r\t\t\t\t\tentriesAvailable > 0\r\t\t\t\t\t\tifTrue: [entriesAvailable _ entriesAvailable - 1]\r\t\t\t\t\t\tifFalse: [\"start compaction at the last free chunk before this object\"\r\t\t\t\t\t\t\tfirstFree _ freeChunk].\r\t\t\t\t\tfreeChunk ~= nil\r\t\t\t\t\t\tifTrue: [\"record the size of the last free chunk\"\r\t\t\t\t\t\t\tself longAt: freeChunk put: ((freeChunkSize bitAnd: LongSizeMask) bitOr: HeaderTypeFree).\r\t\t\t\t\t\t\tfreeChunk _ nil].\r\t\t\t\t\tsurvivors _ survivors + 1].\r\t\t\toop _ self oopFromChunk: oop + oopSize].\r\tfreeChunk ~= nil\r\t\tifTrue: [\"record size of final free chunk\"\r\t\t\tself longAt: freeChunk put: ((freeChunkSize bitAnd: LongSizeMask) bitOr: HeaderTypeFree)].\r\toop = endOfMemory\r\t\tifFalse: [self error: 'sweep failed to find exact end of memory'].\r\tfirstFree = nil\r\t\tifTrue: [self error: 'expected to find at least one free object']\r\t\tifFalse: [compStart _ firstFree].\r\r\t^ survivors! !\r\r!ObjectMemory methodsFor: 'gc -- mark and sweep' stamp: 'di 7/1/2004 15:58'!\rupward\r\t\"Return from marking an object below. Incoming: \r\tfield = oop we just worked on, needs to be put away \r\tparentField = where to put it in our object \r\tNOTE: Type field of object below has already been restored!!!!!! \"\r\t| type header |\r\tself inline: true.\r\t(parentField bitAnd: 1) = 1\r\t\tifTrue: [parentField = GCTopMarker\r\t\t\t\tifTrue: [\"top of the chain\"\r\t\t\t\t\theader _ (self longAt: field) bitAnd: AllButTypeMask.\r\t\t\t\t\ttype _ self rightType: header.\r\t\t\t\t\tself longAt: field put: (header bitOr: type). \"install type on class oop\"\r\t\t\t\t\t^ Done]\r\t\t\t\tifFalse: [\"was working on the extended class word\"\r\t\t\t\t\tchild _ field. \"oop of class\"\r\t\t\t\t\tfield _ parentField - 1. \"class word, ** clear the low bit **\"\r\t\t\t\t\tparentField _ self longAt: field.\r\t\t\t\t\theader _ self longAt: field + BytesPerWord. \"base header word\"\r\t\t\t\t\ttype _ self rightType: header.\r\t\t\t\t\tself longAt: field put: (child bitOr: type). \"install type on class oop\"\r\t\t\t\t\tfield _ field + BytesPerWord. \"point at header\"\r\t\t\t\t\t\"restore type bits\"\r\t\t\t\t\theader _ header bitAnd: AllButTypeMask.\r\t\t\t\t\tself longAt: field put: (header bitOr: type).\r\t\t\t\t\t^ Upward]]\r\t\tifFalse: [\"normal\"\r\t\t\tchild _ field. \"who we worked on below\"\r\t\t\tfield _ parentField. \"where to put it\"\r\t\t\tparentField _ self longAt: field.\r\t\t\tself longAt: field put: child.\r\t\t\tfield _ field - BytesPerWord. \"point at header\"\r\t\t\t^ StartField]! !\r\r!ObjectMemory methodsFor: 'finalization' stamp: 'di 7/1/2004 15:45'!\rfinalizeReference: oop \r\t\"During sweep phase we have encountered a weak reference. \r\tCheck if  its object has gone away (or is about to) and if so, signal a \r\tsemaphore. \"\r\t\"Do *not* inline this in sweepPhase - it is quite an unlikely \r\tcase to run into a weak reference\"\r\t| weakOop oopGone chunk firstField lastField |\r\tself inline: false.\r\tfirstField _ BaseHeaderSize + ((self nonWeakFieldsOf: oop) << ShiftForWord).\r\tlastField _ self lastPointerOf: oop.\r\tfirstField to: lastField by: BytesPerWord do: [:i | \r\t\t\tweakOop _ self longAt: oop + i.\r\t\t\t(weakOop == nilObj or: [self isIntegerObject: weakOop])\r\t\t\t\tifFalse: [\"Check if the object is being collected. \r\t\t\t\t\tIf the weak reference points  \r\t\t\t\t\t* backward: check if the weakOops chunk is free\r\t\t\t\t\t* forward: check if the weakOoop has been marked by GC\"\r\t\t\t\t\tweakOop < oop\r\t\t\t\t\t\tifTrue: [chunk _ self chunkFromOop: weakOop.\r\t\t\t\t\t\t\toopGone _ ((self longAt: chunk) bitAnd: TypeMask) = HeaderTypeFree]\r\t\t\t\t\t\tifFalse: [oopGone _ ((self baseHeader: weakOop) bitAnd: MarkBit) = 0].\r\t\t\t\t\toopGone ifTrue: [\"Store nil in the pointer and signal the  interpreter \"\r\t\t\t\t\t\t\tself longAt: oop + i put: nilObj.\r\t\t\t\t\t\t\tself signalFinalization: oop]]]! !\r\r!ObjectMemory methodsFor: 'object enumeration' stamp: 'di 6/11/2004 13:20'!\rlastPointerOf: oop \r\t\"Return the byte offset of the last pointer field of the given object.  \r\tWorks with CompiledMethods, as well as ordinary objects. \r\tCan be used even when the type bits are not correct.\"\r\t| fmt sz methodHeader header contextSize |\r\tself inline: true.\r\theader _ self baseHeader: oop.\r\tfmt _ header >> 8 bitAnd: 15.\r\tfmt <= 4 ifTrue: [(fmt = 3 and: [self isContextHeader: header])\r\t\t\t\t\tifTrue: [\"contexts end at the stack pointer\"\r\t\t\t\t\t\tcontextSize _ self fetchStackPointerOf: oop.\r\t\t\t\t\t\t^ CtxtTempFrameStart + contextSize * BytesPerWord].\r\t\t\t\tsz _ self sizeBitsOfSafe: oop.\r\t\t\t\t^ sz - BaseHeaderSize  \"all pointers\"].\r\tfmt < 12 ifTrue: [^ 0]. \"no pointers\"\r\r\t\"CompiledMethod: contains both pointers and bytes:\"\r\tmethodHeader _ self longAt: oop + BaseHeaderSize.\r\t^ (methodHeader >> 10 bitAnd: 255) * BytesPerWord + BaseHeaderSize! !\r\r!ObjectMemory methodsFor: 'object enumeration' stamp: 'ikp 3/26/2005 14:04'!\rstartOfMemory\r\t\"Return the start of object memory.\"\r\r\t^memory! !\r\r!ObjectMemory methodsFor: 'initialization' stamp: 'ikp 3/27/2005 18:06'!\radjustAllOopsBy: bytesToShift \r\t\"Adjust all oop references by the given number of bytes. This \r\tis done just after reading in an image when the new base \r\taddress of the object heap is different from the base address \r\tin the image.\"\r\t\"di 11/18/2000 - return number of objects found\"\r\r\t| oop totalObjects |\r\tself inline: false.\r\tbytesToShift = 0 ifTrue: [^300000].\r\t\"this is probably an improvement over the previous answer of \r\tnil, but maybe we should do the obejct counting loop and \r\tsimply guard the adjustFieldsAndClass... with a bytesToShift \r\t= 0 ifFalse: ?\"\r\ttotalObjects _ 0.\r\toop _ self firstObject.\r\t[oop < endOfMemory]\r\t\twhileTrue:\r\t\t\t[(self isFreeObject: oop)\r\t\t\t\tifFalse:\r\t\t\t\t\t[totalObjects _ totalObjects + 1.\r\t\t\t\t\t self adjustFieldsAndClassOf: oop by: bytesToShift].\r\t\t\t oop _ self objectAfter: oop].\r\t^totalObjects! !\r\r!ObjectMemory methodsFor: 'initialization' stamp: 'ikp 3/26/2005 14:21'!\radjustFieldsAndClassOf: oop by: offsetBytes \r\t\"Adjust all pointers in this object by the given offset.\"\r\t| fieldAddr fieldOop classHeader newClassOop |\r\tself inline: true.\r\toffsetBytes = 0 ifTrue: [^nil].\r\tfieldAddr _ oop + (self lastPointerOf: oop).\r\t[fieldAddr > oop]\r\t\twhileTrue: [fieldOop _ self longAt: fieldAddr.\r\t\t\t(self isIntegerObject: fieldOop)\r\t\t\t\tifFalse: [self longAt: fieldAddr put: fieldOop + offsetBytes].\r\t\t\tfieldAddr _ fieldAddr - BytesPerWord].\r\t(self headerType: oop) ~= HeaderTypeShort\r\t\tifTrue: [\"adjust class header if not a compact class\"\r\t\t\tclassHeader _ self longAt: oop - BytesPerWord.\r\t\t\tnewClassOop _ (classHeader bitAnd: AllButTypeMask) + offsetBytes.\r\t\t\tself longAt: oop - BytesPerWord put: (newClassOop bitOr: (classHeader bitAnd: TypeMask))]! !\r\r!ObjectMemory methodsFor: 'initialization' stamp: 'ikp 9/2/2004 13:54'!\rbytesPerWord\r\t\"Answer the size of an object pointer in bytes.\"\r\r\t^BytesPerWord! !\r\r!ObjectMemory methodsFor: 'initialization' stamp: 'ikp 9/2/2004 13:00'!\rinitializeMemoryFirstFree: firstFree \r\t\"Initialize endOfMemory to the top of oop storage space, reserving some space for forwarding blocks, and create the freeBlock from which space is allocated. Also create a fake free chunk at endOfMemory to act as a sentinal for memory scans. \"\r\t\"Note: The amount of space reserved for forwarding blocks should be chosen to ensure that incremental compactions can usually be done in a single pass. However, there should be enough forwarding blocks so a full compaction can be done in a reasonable number of passes, say ten. (A full compaction requires N object-moving passes, where N = number of non-garbage objects / number of forwarding blocks). \r\tdi 11/18/2000 Re totalObjectCount: Provide a margin of one byte per object to be used for forwarding pointers at GC time. Since fwd blocks are 8 bytes, this means an absolute worst case of 8 passes to compact memory. In most cases it will be adequate to do compaction in a single pass. \"\r\t| fwdBlockBytes |\r\t\"reserve space for forwarding blocks\"\r\tfwdBlockBytes _ totalObjectCount bitAnd: WordMask - BytesPerWord + 1.\r\tmemoryLimit - fwdBlockBytes >= (firstFree + BaseHeaderSize)\r\t\tifFalse: [\"reserve enough space for a minimal free block of BaseHeaderSize bytes\"\r\t\t\tfwdBlockBytes _ memoryLimit - (firstFree + BaseHeaderSize)].\r\r\t\"set endOfMemory and initialize freeBlock\"\r\tendOfMemory _ memoryLimit - fwdBlockBytes.\r\tfreeBlock _ firstFree.\r\tself setSizeOfFree: freeBlock to: endOfMemory - firstFree. \"bytes available for oops\"\r\r\t\"make a fake free chunk at endOfMemory for use as a sentinel in memory scans\"\r\tself setSizeOfFree: endOfMemory to: BaseHeaderSize.\r\tDoAssertionChecks\r\t\tifTrue: [(freeBlock < endOfMemory and: [endOfMemory < memoryLimit])\r\t\t\t\tifFalse: [self error: 'error in free space computation'].\r\t\t\t(self oopFromChunk: endOfMemory) = endOfMemory\r\t\t\t\tifFalse: [self error: 'header format must have changed'].\r\t\t\t(self objectAfter: freeBlock) = endOfMemory\r\t\t\t\tifFalse: [self error: 'free block not properly initialized']]! !\r\r!ObjectMemory methodsFor: 'become' stamp: 'di 8/3/2004 12:23'!\rallYoung: array1 and: array2 \r\t\"Return true if all the oops in both arrays, and the arrays \r\tthemselves, are in the young object space.\"\r\t| fieldOffset |\r\tarray1 < youngStart ifTrue: [^ false].\r\tarray2 < youngStart ifTrue: [^ false].\r\tfieldOffset _ self lastPointerOf: array1.\r\t\"same size as array2\"\r\t[fieldOffset >= BaseHeaderSize]\r\t\twhileTrue: [(self longAt: array1 + fieldOffset) < youngStart ifTrue: [^ false].\r\t\t\t(self longAt: array2 + fieldOffset) < youngStart ifTrue: [^ false].\r\t\t\tfieldOffset _ fieldOffset - BytesPerWord].\r\t^ true! !\r\r!ObjectMemory methodsFor: 'become' stamp: 'di 8/3/2004 13:12'!\rcontainOnlyOops: array1 and: array2 \r\t\"Return true if neither array contains a small integer. You \r\tcan't become: integers!!\"\r\t| fieldOffset |\r\tfieldOffset _ self lastPointerOf: array1.\r\t\"same size as array2\"\r\t[fieldOffset >= BaseHeaderSize]\r\t\twhileTrue: [(self isIntegerObject: (self longAt: array1 + fieldOffset)) ifTrue: [^ false].\r\t\t\t(self isIntegerObject: (self longAt: array2 + fieldOffset)) ifTrue: [^ false].\r\t\t\tfieldOffset _ fieldOffset - BytesPerWord].\r\t^ true! !\r\r!ObjectMemory methodsFor: 'become' stamp: 'tpr 3/23/2005 12:05'!\rprepareForwardingTableForBecoming: array1 with: array2 twoWay: twoWayFlag \r\t\"Ensure that there are enough forwarding blocks to \r\taccomodate this become, then prepare forwarding blocks for \r\tthe pointer swap. Return true if successful.\"\r\t\"Details: Doing a GC might generate enough space for \r\tforwarding blocks if we're short. However, this is an \r\tuncommon enough case that it is better handled by primitive \r\tfail code at the Smalltalk level.\"\r\r\t\"Important note on multiple references to same object  - since the preparation of\r\tfwdBlocks is NOT idempotent we get VM crashes if the same object is referenced more\r\tthan once in such a way as to require multiple fwdBlocks.\r\toop1 forwardBecome: oop1 is ok since only a single fwdBlock is needed.\r\toop1 become: oop1 would fail because the second fwdBlock woudl not have the actual object\r\theader but rather the mutated ref to the first fwdBlock.\r\tFurther problems can arise with an array1 or array2 that refer multiply to the same \r\tobject. This would notbe expected input for programmer writen code but might arise from\r\tautomatic usage such as in ImageSegment loading.\r\tTo avoid the simple and rather common case of oop1 become*: oop1, we skip such pairs\r\tand simply avoid making fwdBlocks - it is redundant anyway\"\r\t| entriesNeeded entriesAvailable fieldOffset oop1 oop2 fwdBlock fwdBlkSize |\r\tentriesNeeded := (self lastPointerOf: array1) // BytesPerWord. \"need enough entries for all oops\"\r\t\"Note: Forward blocks must be quadword aligned - see fwdTableInit:.\"\r\ttwoWayFlag\r\t\tifTrue: [\"Double the number of blocks for two-way become\"\r\t\t\tentriesNeeded _ entriesNeeded * 2.\r\t\t\tfwdBlkSize _ BytesPerWord * 2]\r\t\tifFalse: [\"One-way become needs backPointers in fwd blocks.\"\r\t\t\tfwdBlkSize _ BytesPerWord * 4].\r\tentriesAvailable _ self fwdTableInit: fwdBlkSize.\r\tentriesAvailable < entriesNeeded\r\t\tifTrue: [self initializeMemoryFirstFree: freeBlock.\r\t\t\t\"re-initialize the free block\"\r\t\t\t^ false].\r\tfieldOffset _ self lastPointerOf: array1.\r\t[fieldOffset >= BaseHeaderSize]\r\t\twhileTrue: [oop1 _ self longAt: array1 + fieldOffset.\r\t\t\toop2 _ self longAt: array2 + fieldOffset.\r\t\t\t\"if oop1 == oop2, no need to do any work for this pair.\r\t\t\tMay still be other entries in the arrays though so keep looking\"\r\t\t\toop1 = oop2\r\t\t\t\tifFalse: [fwdBlock _ self fwdBlockGet: fwdBlkSize.\r\t\t\t\t\tself\r\t\t\t\t\t\tinitForwardBlock: fwdBlock\r\t\t\t\t\t\tmapping: oop1\r\t\t\t\t\t\tto: oop2\r\t\t\t\t\t\twithBackPtr: twoWayFlag not.\r\t\t\t\t\ttwoWayFlag\r\t\t\t\t\t\tifTrue: [\"Second block maps oop2 back to oop1 for two-way become\"\r\t\t\t\t\t\t\tfwdBlock _ self fwdBlockGet: fwdBlkSize.\r\t\t\t\t\t\t\tself\r\t\t\t\t\t\t\t\tinitForwardBlock: fwdBlock\r\t\t\t\t\t\t\t\tmapping: oop2\r\t\t\t\t\t\t\t\tto: oop1\r\t\t\t\t\t\t\t\twithBackPtr: twoWayFlag not]].\r\t\t\tfieldOffset _ fieldOffset - BytesPerWord].\r\t^ true! !\r\r!ObjectMemory methodsFor: 'become' stamp: 'di 7/22/2004 17:50'!\rrestoreHeaderOf: oop \r\t\"Restore the original header of the given oop from its \r\tforwarding block.\"\r\t| fwdHeader fwdBlock |\r\tfwdHeader _ self longAt: oop.\r\tfwdBlock _ (fwdHeader bitAnd: AllButMarkBitAndTypeMask) << 1.\r\tDoAssertionChecks\r\t\tifTrue: [(fwdHeader bitAnd: MarkBit) = 0\r\t\t\t\tifTrue: [self error: 'attempting to restore the header of an object that has no forwarding block'].\r\t\t\tself fwdBlockValidate: fwdBlock].\r\tself longAt: oop put: (self longAt: fwdBlock + BytesPerWord)! !\r\r!ObjectMemory methodsFor: 'become' stamp: 'tpr 3/23/2005 12:07'!\rrestoreHeadersAfterBecoming: list1 with: list2 \r\t\"Restore the headers of all oops in both lists. Exchange their hash bits so\r\tbecoming objects in identity sets and dictionaries doesn't change their\r\thash value.\"\r\t\"See also prepareForwardingTableForBecoming:with:woWay: for notes\r\tregarding the case\r\tof oop1 = oop2\"\r\t| fieldOffset oop1 oop2 hdr1 hdr2 |\r\tfieldOffset _ self lastPointerOf: list1.\r\t[fieldOffset >= BaseHeaderSize]\r\t\twhileTrue: [oop1 _ self longAt: list1 + fieldOffset.\r\t\t\toop2 _ self longAt: list2 + fieldOffset.\r\t\t\toop1 = oop2\r\t\t\t\tifFalse: [self restoreHeaderOf: oop1.\r\t\t\t\t\tself restoreHeaderOf: oop2.\r\t\t\t\t\t\"Exchange hash bits of the two objects.\"\r\t\t\t\t\thdr1 _ self longAt: oop1.\r\t\t\t\t\thdr2 _ self longAt: oop2.\r\t\t\t\t\tself\r\t\t\t\t\t\tlongAt: oop1\r\t\t\t\t\t\tput: ((hdr1 bitAnd: AllButHashBits) bitOr: (hdr2 bitAnd: HashBits)).\r\t\t\t\t\tself\r\t\t\t\t\t\tlongAt: oop2\r\t\t\t\t\t\tput: ((hdr2 bitAnd: AllButHashBits) bitOr: (hdr1 bitAnd: HashBits))].\r\t\t\tfieldOffset _ fieldOffset - BytesPerWord]! !\r\r!ObjectMemory methodsFor: 'become' stamp: 'di 7/22/2004 17:59'!\rrestoreHeadersAfterForwardBecome: copyHashFlag \r\t\"Forward become leaves us with no original oops in the \r\tmutated object list, \r\tso we must enumerate the (four-word) forwarding blocks \r\twhere we have stored backpointers.\"\r\t\"This loop start is copied from fwdTableInit:\"\r\t| oop1 fwdBlock oop2 hdr1 hdr2 |\r\tfwdBlock _ endOfMemory + BaseHeaderSize + 7 bitAnd: WordMask - 7.\r\tfwdBlock _ fwdBlock + 16.\r\t\"fwdBlockGet: did a pre-increment\"\r\t[fwdBlock <= fwdTableNext\r\t\"fwdTableNext points to the last active block\"]\r\t\twhileTrue: [oop1 _ self longAt: fwdBlock + (BytesPerWord*2).\r\t\t\t\"Backpointer to mutated object.\"\r\t\t\toop2 _ self longAt: fwdBlock.\r\t\t\tself restoreHeaderOf: oop1.\r\t\t\tcopyHashFlag\r\t\t\t\tifTrue: [\"Change the hash of the new oop (oop2) to be that of the old (oop1) \r\t\t\t\t\tso mutated objects in hash structures will be \r\t\t\t\t\thappy after the change.\"\r\t\t\t\t\thdr1 _ self longAt: oop1.\r\t\t\t\t\thdr2 _ self longAt: oop2.\r\t\t\t\t\tself longAt: oop2 put: ((hdr2 bitAnd: AllButHashBits) bitOr: (hdr1 bitAnd: HashBits))].\r\t\t\tfwdBlock _ fwdBlock + (BytesPerWord*4)]! !\r\r!ObjectMemory methodsFor: 'allocation' stamp: 'ikp 3/27/2005 18:07'!\rallocate: byteSize headerSize: hdrSize h1: baseHeader h2: classOop h3: extendedSize doFill: doFill with: fillWord \r\t\"Allocate a new object of the given size and number of header words. (Note: byteSize already includes space for the base header word.) Initialize the header fields of the new object and fill the remainder of the object with the given value.\r\tMay cause a GC\"\r\r\t| newObj remappedClassOop end i |\r\tself inline: true.\r\tself var: #i type: 'usqInt'.\r\tself var: #end type: 'usqInt'.\r\t\"remap classOop in case GC happens during allocation\"\r\thdrSize > 1 ifTrue: [self pushRemappableOop: classOop].\r\tnewObj _ self allocateChunk: byteSize + (hdrSize - 1 * BytesPerWord).\r\thdrSize > 1 ifTrue: [remappedClassOop _ self popRemappableOop].\r\r\thdrSize = 3\r\t\tifTrue: [self longAt: newObj put: (extendedSize bitOr: HeaderTypeSizeAndClass).\r\t\t\tself longAt: newObj + BytesPerWord put: (remappedClassOop bitOr: HeaderTypeSizeAndClass).\r\t\t\tself longAt: newObj + (BytesPerWord*2) put: (baseHeader bitOr: HeaderTypeSizeAndClass).\r\t\t\tnewObj _ newObj + (BytesPerWord*2)].\r\r\thdrSize = 2\r\t\tifTrue: [self longAt: newObj put: (remappedClassOop bitOr: HeaderTypeClass).\r\t\t\tself longAt: newObj + BytesPerWord put: (baseHeader bitOr: HeaderTypeClass).\r\t\t\tnewObj _ newObj + BytesPerWord].\r\r\thdrSize = 1\r\t\tifTrue: [self longAt: newObj put: (baseHeader bitOr: HeaderTypeShort)].\r\t\"clear new object\"\r\tdoFill ifTrue: [end _ newObj + byteSize.\r\t\t\ti _ newObj + BytesPerWord.\r\t\t\t[i < end] whileTrue: [self longAt: i put: fillWord.\r\t\t\t\t\ti _ i + BytesPerWord]].\r\tDoAssertionChecks\r\t\tifTrue: [self okayOop: newObj.\r\t\t\tself oopHasOkayClass: newObj.\r\t\t\t(self objectAfter: newObj) = freeBlock\r\t\t\t\tifFalse: [self error: 'allocate bug: did not set header of new oop correctly'].\r\t\t\t(self objectAfter: freeBlock) = endOfMemory\r\t\t\t\tifFalse: [self error: 'allocate bug: did not set header of freeBlock correctly']].\r\r\t^newObj! !\r\r!ObjectMemory methodsFor: 'allocation' stamp: 'ikp 8/4/2004 18:29'!\rallocateChunk: byteSize \r\t\"Allocate a chunk of the given size. Sender must be sure that  the requested size includes enough space for the header  word(s). \" \r\t\"Details: To limit the time per incremental GC, do one every so many allocations. The number is settable via primitiveVMParameter to tune your memory system\"\r\t| enoughSpace newFreeSize newChunk |\r\tself inline: true.\r\r\tallocationCount >= allocationsBetweenGCs\r\t\tifTrue: [\"do an incremental GC every so many allocations to  keep pauses short\"\r\t\t\tself incrementalGC].\r\r\tenoughSpace _ self sufficientSpaceToAllocate: byteSize.\r\tenoughSpace\r\t\tifFalse: [\"signal that space is running low, but proceed with allocation if possible\"\r\t\t\tsignalLowSpace _ true.\r\t\t\tlowSpaceThreshold _ 0. \"disable additional interrupts until lowSpaceThreshold is reset by image\"\r\t\t\tself forceInterruptCheck].\r\t(self cCoerce: (self sizeOfFree: freeBlock) to: 'usqInt ') < (self cCoerce: byteSize + BaseHeaderSize to: 'usqInt ')\r\t\tifTrue: [self error: 'out of memory'].\r\r\t\"if we get here, there is enough space for allocation to  succeed \"\r\tnewFreeSize _ (self sizeOfFree: freeBlock) - byteSize.\r\tnewChunk _ freeBlock.\r\tfreeBlock _ freeBlock + byteSize.\r\r\t\"Assume: client will initialize object header of free chunk, so following is not needed:\"\r\t\"self setSizeOfFree: newChunk to: byteSize.\"\r\tself setSizeOfFree: freeBlock to: newFreeSize.\r\tallocationCount _ allocationCount + 1.\r\t^newChunk! !\r\r!ObjectMemory methodsFor: 'allocation' stamp: 'di 8/3/2004 12:25'!\rclone: oop\r\t\"Return a shallow copy of the given object. May cause GC\"\r\t\"Assume: Oop is a real object, not a small integer.\"\r\r\t| extraHdrBytes bytes newChunk remappedOop fromIndex toIndex lastFrom newOop header hash |\r\tself inline: false.\r\textraHdrBytes _ self extraHeaderBytes: oop.\r\tbytes _ self sizeBitsOf: oop.\r\tbytes _ bytes + extraHdrBytes.\r\r\t\"allocate space for the copy, remapping oop in case of a GC\"\r\tself pushRemappableOop: oop.\r\tnewChunk _ self allocateChunk: bytes.\r\tremappedOop _ self popRemappableOop.\r\r\t\"copy old to new including all header words\"\r\ttoIndex _ newChunk - BytesPerWord.  \"loop below uses pre-increment\"\r\tfromIndex _ (remappedOop - extraHdrBytes) - BytesPerWord.\r\tlastFrom _ fromIndex + bytes.\r\t[fromIndex < lastFrom] whileTrue: [\r\t\tself longAt: (toIndex _ toIndex + BytesPerWord) put: (self longAt: (fromIndex _ fromIndex + BytesPerWord))].\r\tnewOop _ newChunk + extraHdrBytes.  \"convert from chunk to oop\"\r\r\t\"fix base header: compute new hash and clear Mark and Root bits\"\r\thash _ self newObjectHash.\r\theader _ (self longAt: newOop) bitAnd: 16r1FFFF.\r\t\"use old ccIndex, format, size, and header-type fields\"\r\theader _ header bitOr: ((hash << 17) bitAnd: 16r1FFE0000).\r\tself longAt: newOop put: header.\r\t^newOop\r! !\r\r!ObjectMemory methodsFor: 'allocation' stamp: 'ikp 8/4/2004 18:30'!\rsufficientSpaceAfterGC: minFree \r\t\"Return true if there is enough free space after doing a garbage collection. If not, signal that space is low.\"\r\t| growSize |\r\tself inline: false.\r\r\tself incrementalGC. \"try to recover some space\"\r\r\t(self cCoerce: (self sizeOfFree: freeBlock) to: 'usqInt ') < (self cCoerce: minFree to: 'usqInt ')\r\t\tifTrue: [signalLowSpace ifTrue: [^false]. \"give up; problem is already noted\"\r\t\t\tself fullGC. \"try harder\"\r\t\t\t\"for stability, require more free space after doing an expensive full GC\"\r\t\t\t(self cCoerce: (self sizeOfFree: freeBlock) to: 'usqInt ') >= ((self cCoerce: minFree to: 'usqInt ') + 15000) ifTrue: [^ true].\r\r\t\t\t\"still not enough; attempt to grow object memory\"\r\t\t\tgrowSize _ minFree - (self sizeOfFree: freeBlock) + growHeadroom.\r\t\t\tself growObjectMemory: growSize.\r\r\t\t\t(self cCoerce: (self sizeOfFree: freeBlock) to: 'usqInt ') >= ((self cCoerce: minFree to: 'usqInt ') + 15000) ifTrue: [^true].\r\r\t\t\t\"still not enough\"\r\t\t\t^false].\r\t^true! !\r\r!ObjectMemory methodsFor: 'allocation' stamp: 'ikp 8/4/2004 18:30'!\rsufficientSpaceToAllocate: bytes\r\t\"Return true if there is enough space to allocate the given number of bytes, perhaps after doing a garbage collection.\"\r\r\t| minFree |\r\tself inline: true.\r\tminFree _ lowSpaceThreshold + bytes + BaseHeaderSize.\r\r\t\"check for low-space\"\r\t(self cCoerce: (self sizeOfFree: freeBlock) to: 'usqInt ') >= (self cCoerce: minFree to: 'usqInt ')\r\t\tifTrue: [^true]\r\t\tifFalse: [^self sufficientSpaceAfterGC: minFree].! !\r\r!ObjectMemory methodsFor: 'header access' stamp: 'di 6/13/2004 06:55'!\rclassHeader: oop\r\r\t^ self longAt: oop - BaseHeaderSize! !\r\r!ObjectMemory methodsFor: 'header access' stamp: 'di 10/6/2004 10:26'!\rformatOf: oop\r\"       0      no fields\r        1      fixed fields only (all containing pointers)\r        2      indexable fields only (all containing pointers)\r        3      both fixed and indexable fields (all containing pointers)\r        4      both fixed and indexable weak fields (all containing pointers).\r\r        5      unused\r        6      indexable word fields only (no pointers)\r        7      indexable long (64-bit) fields (only in 64-bit images)\r \r    8-11      indexable byte fields only (no pointers) (low 2 bits are low 2 bits of size)\r   12-15     compiled methods:\r                   # of literal oops specified in method header,\r                   followed by indexable bytes (same interpretation of low 2 bits as above)\r\"\r\r\t^ ((self baseHeader: oop) >> 8) bitAnd: 16rF! !\r\r!ObjectMemory methodsFor: 'header access' stamp: 'di 6/11/2004 16:34'!\rsizeBitsOf: oop\r\t\"Answer the number of bytes in the given object, including its base header, rounded up to an integral number of words.\"\r\t\"Note: byte indexable objects need to have low bits subtracted from this size.\"\r\r\t| header |\r\theader _ self baseHeader: oop.\r\t(header bitAnd: TypeMask) = HeaderTypeSizeAndClass\r\t\tifTrue: [ ^ (self sizeHeader: oop) bitAnd: LongSizeMask ]\r\t\tifFalse: [ ^ header bitAnd: SizeMask ].! !\r\r!ObjectMemory methodsFor: 'header access' stamp: 'di 6/11/2004 13:15'!\rsizeHeader: oop\r\r\t^ self longAt: oop - (BytesPerWord*2)! !\r\r!ObjectMemory methodsFor: 'garbage collection' stamp: 'di 7/2/2004 12:29'!\rincrementalGC\r\t\"Do a mark/sweep garbage collection of just the young object \r\tarea of object memory (i.e., objects above youngStart), using \r\tthe root table to identify objects containing pointers to \r\tyoung objects from the old object area.\"\r\t| survivorCount startTime |\r\tself inline: false.\r\trootTableCount >= RootTableSize\r\t\tifTrue: [\"root table overflow; cannot do an incremental GC (this should be very rare)\"\r\t\t\tstatRootTableOverflows _ statRootTableOverflows + 1.\r\t\t\t^ self fullGC].\r\tDoAssertionChecks\r\t\tifTrue: [self reverseDisplayFrom: 8 to: 15.\r\t\t\tself validateRoots; validate].\r\r\tself preGCAction: false.\r\t\"incremental GC and compaction\"\r\r\tstartTime _ self ioMicroMSecs.\r\tself markPhase.\r\tsurvivorCount _ self sweepPhase.\r\tself incrementalCompaction.\r\tallocationCount _ 0.\r\tstatIncrGCs _ statIncrGCs + 1.\r\tstatIncrGCMSecs _ statIncrGCMSecs + (self ioMicroMSecs - startTime).\r\r\tself forceInterruptCheck. \"Force an an interrupt check ASAP.We could choose to be clever here and only do this under certain time conditions. Keep it simple for now\"\r\t\r\t(survivorCount > tenuringThreshold\r\t\t\tor: [rootTableCount >= RootTableRedZone])\r\t\tifTrue: [\"move up the young space boundary if \r\t\t\t* there are too many survivors: \r\t\t\tthis limits the number of objects that must be \r\t\t\tprocessed on future incremental GC's \r\t\t\t* we're about to overflow the roots table \r\t\t\tthis limits the number of full GCs that may be caused \r\t\t\tby root table overflows in the near future\"\r\t\t\tstatTenures _ statTenures + 1.\r\t\t\tself clearRootsTable.\r\t\t\tyoungStart _ freeBlock].\r\tself postGCAction.\r\tDoAssertionChecks\r\t\tifTrue: [self validateRoots; validate.\r\t\t\tself reverseDisplayFrom: 8 to: 15]! !\r\r!ObjectMemory methodsFor: 'gc -- compaction' stamp: 'di 7/1/2004 14:28'!\rbeRootWhileForwarding: oop\r\t\"Record that the given oop in the old object area points to an object in the young area when oop may be forwarded.\"\r\t\"Warning: No young objects should be recorded as roots. Callers are responsible for ensuring this constraint is not violated.\"\r\r\t| header fwdBlock |\r\theader _ self longAt: oop.\r\t(header bitAnd: MarkBit) ~= 0\r\t\tifTrue: [\"This oop is forwarded\"\r\t\t\t\tfwdBlock _ (header bitAnd: AllButMarkBitAndTypeMask) << 1.\r\t\t\t\tDoAssertionChecks ifTrue: [ self fwdBlockValidate: fwdBlock ].\r\t\t\t\tself noteAsRoot: oop headerLoc: fwdBlock + BytesPerWord]\r\t\tifFalse: [\"Normal -- no forwarding\"\r\t\t\t\tself noteAsRoot: oop headerLoc: oop]! !\r\r!ObjectMemory methodsFor: 'gc -- compaction' stamp: 'di 7/1/2004 15:29'!\rfwdTableInit: blkSize\r\t\"Set the limits for a table of two- or three-word forwarding blocks above the last used oop. The pointer fwdTableNext moves up to fwdTableLast. Used for compaction of memory and become-ing objects. Returns the number of forwarding blocks available.\"\r\r\t| |\r\tself inline: false.\r\t\"set endOfMemory to just after a minimum-sized free block\"\r\tself setSizeOfFree: freeBlock to: BaseHeaderSize.\r\tendOfMemory _ freeBlock + BaseHeaderSize.\r\r\t\"make a fake free chunk at endOfMemory for use as a sentinal in memory scans\"\r\tself setSizeOfFree: endOfMemory to: BaseHeaderSize.\r\r\t\"use all memory free between freeBlock and memoryLimit for forwarding table\"\r\t\"Note: Forward blocks must be quadword aligned.\"\r\tfwdTableNext _ (endOfMemory + BaseHeaderSize + 7) bitAnd: WordMask-7.\r\tself flag: #Dan.  \"Above line does not do what it says (quadword is 16 or 32 bytes)\"\r\r\tfwdTableLast _ memoryLimit - blkSize.  \"last forwarding table entry\"\r\r\t\"return the number of forwarding blocks available\"\r\t^ (fwdTableLast - fwdTableNext) // blkSize  \"round down\"! !\r\r!ObjectMemory methodsFor: 'gc -- compaction' stamp: 'di 7/1/2004 15:30'!\rfwdTableSize: blkSize\r\t\"Estimate the number of forwarding blocks available for compaction\"\r\t| eom fwdFirst fwdLast |\r\tself inline: false.\r\r\teom _ freeBlock + BaseHeaderSize.\r\t\"use all memory free between freeBlock and memoryLimit for forwarding table\"\r\r\t\"Note: Forward blocks must be quadword aligned.\"\r\tfwdFirst _ (eom + BaseHeaderSize + 7) bitAnd: WordMask-7.\r\tself flag: #Dan.  \"Above line does not do what it says (quadword is 16 or 32 bytes)\"\r\r\tfwdLast _ memoryLimit - blkSize.  \"last forwarding table entry\"\r\r\t\"return the number of forwarding blocks available\"\r\t^ (fwdLast - fwdFirst) // blkSize  \"round down\"! !\r\r!ObjectMemory methodsFor: 'gc -- compaction' stamp: 'di 7/1/2004 14:55'!\rincCompBody\r\t\"Move objects to consolidate free space into one big chunk. Return the newly created free chunk.\"\r\r\t| bytesFreed |\r\tself inline: false.\r\t\"reserve memory for forwarding table\"\r\tself fwdTableInit: BytesPerWord*2.  \"Two-word blocks\"\r\r\t\"assign new oop locations, reverse their headers, and initialize forwarding blocks\"\r\tbytesFreed _ self incCompMakeFwd.\r\r\t\"update pointers to point at new oops\"\r\tself mapPointersInObjectsFrom: youngStart to: endOfMemory.\r\r\t\"move the objects and restore their original headers; return the new free chunk\"\r\t^ self incCompMove: bytesFreed! !\r\r!ObjectMemory methodsFor: 'gc -- compaction' stamp: 'di 7/1/2004 14:56'!\rincCompMakeFwd\r\t\"Create and initialize forwarding blocks for all non-free objects  \r\tfollowing compStart. If the supply of forwarding blocks is exhausted,  \r\tset compEnd to the first chunk above the area to be \r\tcompacted; otherwise, set it to endOfMemory. Return the number of \r\tbytes to be freed.\"\r\t| bytesFreed oop fwdBlock newOop |\r\tself inline: false.\r\tbytesFreed _ 0.\r\toop _ self oopFromChunk: compStart.\r\t[oop < endOfMemory]\r\t\twhileTrue: [(self isFreeObject: oop)\r\t\t\t\tifTrue: [bytesFreed _ bytesFreed + (self sizeOfFree: oop)]\r\t\t\t\tifFalse: [\"create a forwarding block for oop\"\r\t\t\t\t\tfwdBlock _ self fwdBlockGet: BytesPerWord*2.\r\t\t\t\t\t\"Two-word block\"\r\t\t\t\t\tfwdBlock = nil\r\t\t\t\t\t\tifTrue: [\"stop; we have used all available forwarding blocks\"\r\t\t\t\t\t\t\tcompEnd _ self chunkFromOop: oop.\r\t\t\t\t\t\t\t^ bytesFreed].\r\t\t\t\t\tnewOop _ oop - bytesFreed.\r\t\t\t\t\tself initForwardBlock: fwdBlock mapping: oop to: newOop withBackPtr: false].\r\t\t\toop _ self objectAfterWhileForwarding: oop].\r\tcompEnd _ endOfMemory.\r\t^ bytesFreed! !\r\r!ObjectMemory methodsFor: 'gc -- compaction' stamp: 'di 7/1/2004 14:58'!\rincCompMove: bytesFreed \r\t\"Move all non-free objects between compStart and compEnd to their new  \r\tlocations, restoring their headers in the process. Create a new free  \r\tblock at the end of memory. Return the newly created free chunk. \"\r\t\"Note: The free block used by the allocator always must be the last free  \r\tblock in memory. It may take several compaction passes to make all  \r\tfree space bubble up to the end of memory.\"\r\t| oop next fwdBlock newOop header bytesToMove firstWord lastWord newFreeChunk sz target |\r\tself inline: false.\r\tnewOop _ nil.\r\toop _ self oopFromChunk: compStart.\r\t[oop < compEnd]\r\t\twhileTrue: [next _ self objectAfterWhileForwarding: oop.\r\t\t\t(self isFreeObject: oop)\r\t\t\t\tifFalse: [\"a moving object; unwind its forwarding block\"\r\t\t\t\t\tfwdBlock _ ((self longAt: oop) bitAnd: AllButMarkBitAndTypeMask) << 1.\r\t\t\t\t\tDoAssertionChecks\r\t\t\t\t\t\tifTrue: [self fwdBlockValidate: fwdBlock].\r\t\t\t\t\tnewOop _ self longAt: fwdBlock.\r\t\t\t\t\theader _ self longAt: fwdBlock + BytesPerWord.\r\t\t\t\t\tself longAt: oop put: header. \"restore the original header\"\r\t\t\t\t\tbytesToMove _ oop - newOop. \"move the oop (including any extra header words) \"\r\t\t\t\t\tsz _ self sizeBitsOf: oop.\r\t\t\t\t\tfirstWord _ oop - (self extraHeaderBytes: oop).\r\t\t\t\t\tlastWord _ oop + sz - BaseHeaderSize.\r\t\t\t\t\ttarget _ firstWord - bytesToMove.\r\t\t\t\t\tfirstWord to: lastWord by: BytesPerWord\r\t\t\t\t\t\tdo: [:w | \r\t\t\t\t\t\t\tself longAt: target put: (self longAt: w).\r\t\t\t\t\t\t\ttarget _ target + BytesPerWord]].\r\t\t\toop _ next].\r\tnewOop = nil\r\t\tifTrue: [\"no objects moved\"\r\t\t\toop _ self oopFromChunk: compStart.\r\t\t\t((self isFreeObject: oop) and: [(self objectAfter: oop) = (self oopFromChunk: compEnd)])\r\t\t\t\tifTrue: [newFreeChunk _ oop]\r\t\t\t\tifFalse: [newFreeChunk _ freeBlock]]\r\t\tifFalse: [\"initialize the newly freed memory chunk\"\r\t\t\t\"newOop is the last object moved; free chunk starts \r\t\t\tright after it\"\r\t\t\tnewFreeChunk _ newOop + (self sizeBitsOf: newOop).\r\t\t\tself setSizeOfFree: newFreeChunk to: bytesFreed].\r\tDoAssertionChecks\r\t\tifTrue: [(self objectAfter: newFreeChunk) = (self oopFromChunk: compEnd)\r\t\t\t\tifFalse: [self error: 'problem creating free chunk after compaction']].\r\t(self objectAfter: newFreeChunk) = endOfMemory\r\t\tifTrue: [self initializeMemoryFirstFree: newFreeChunk]\r\t\tifFalse: [\"newFreeChunk is not at end of memory; re-install freeBlock \"\r\t\t\tself initializeMemoryFirstFree: freeBlock].\r\t^ newFreeChunk! !\r\r!ObjectMemory methodsFor: 'gc -- compaction' stamp: 'di 7/1/2004 15:00'!\rinitForwardBlock: fwdBlock mapping: oop to: newOop withBackPtr: backFlag \r\t\"Initialize the given forwarding block to map oop to newOop, \r\tand replace oop's header with a pointer to the fowarding \r\tblock. \"\r\t\"Details: The mark bit is used to indicate that an oop is \r\tforwarded. When an oop is forwarded, its header (minus the \r\tmark bit) contains the address of its forwarding block. (The \r\tforwarding block address is actually shifted right by one bit \r\tso that its top-most bit does not conflict with the header's \r\tmark bit; since fowarding blocks are stored on word \r\tboundaries, the low two bits of the address are always zero.) \r\tThe first word of the forwarding block is the new oop; the \r\tsecond word is the oop's orginal header. In the case of a \r\tforward become, a four-word block is used, with the third \r\tfield being a backpointer to the old oop (for header fixup), \r\tand the fourth word is unused. The type bits of the \r\tforwarding header are the same as those of the original \r\theader. \"\r\t| originalHeader originalHeaderType |\r\tself inline: true.\r\toriginalHeader _ self longAt: oop.\r\tDoAssertionChecks\r\t\tifTrue: [fwdBlock = nil ifTrue: [self error: 'ran out of forwarding blocks in become'].\r\t\t\t(originalHeader bitAnd: MarkBit) ~= 0\r\t\t\t\tifTrue: [self error: 'object already has a forwarding table entry']].\r\toriginalHeaderType _ originalHeader bitAnd: TypeMask.\r\tself longAt: fwdBlock put: newOop.\r\tself longAt: fwdBlock + BytesPerWord put: originalHeader.\r\tbackFlag ifTrue: [self longAt: fwdBlock + (BytesPerWord*2) put: oop].\r\tself longAt: oop put: (fwdBlock >> 1 bitOr: (MarkBit bitOr: originalHeaderType))! !\r\r!ObjectMemory methodsFor: 'gc -- compaction' stamp: 'di 7/1/2004 15:04'!\rlastPointerWhileForwarding: oop \r\t\"The given object may have its header word in a forwarding block. Find  \r\tthe offset of the last pointer in the object in spite of this obstacle. \"\r\t| header fwdBlock fmt size methodHeader contextSize |\r\tself inline: true.\r\theader _ self longAt: oop.\r\t(header bitAnd: MarkBit) ~= 0\r\t\tifTrue: [\"oop is forwarded; get its real header from its forwarding table entry\"\r\t\t\tfwdBlock _ (header bitAnd: AllButMarkBitAndTypeMask) << 1.\r\t\t\tDoAssertionChecks\r\t\t\t\tifTrue: [self fwdBlockValidate: fwdBlock].\r\t\t\theader _ self longAt: fwdBlock + BytesPerWord].\r\tfmt _ header >> 8 bitAnd: 15.\r\tfmt <= 4\r\t\tifTrue: [(fmt = 3 and: [self isContextHeader: header])\r\t\t\t\tifTrue: [\"contexts end at the stack pointer\"\r\t\t\t\t\tcontextSize _ self fetchStackPointerOf: oop.\r\t\t\t\t\t^ CtxtTempFrameStart + contextSize * BytesPerWord].\r\t\t\t\"do sizeBitsOf: using the header we obtained\"\r\t\t\t(header bitAnd: TypeMask) = HeaderTypeSizeAndClass\r\t\t\t\tifTrue: [size _ (self sizeHeader: oop) bitAnd: AllButTypeMask]\r\t\t\t\tifFalse: [size _ header bitAnd: SizeMask].\r\t\t\t^ size - BaseHeaderSize].\r\tfmt < 12 ifTrue: [^ 0]. \"no pointers\"\r\tmethodHeader _ self longAt: oop + BaseHeaderSize.\r\t^ (methodHeader >> 10 bitAnd: 255) * BytesPerWord + BaseHeaderSize! !\r\r!ObjectMemory methodsFor: 'gc -- compaction' stamp: 'di 7/1/2004 15:35'!\robjectAfterWhileForwarding: oop\r\t\"Return the oop of the object after the given oop when the actual header of the oop may be in the forwarding table.\"\r\r\t| header fwdBlock realHeader sz |\r\tself inline: true.\r\theader _ self longAt: oop.\r\t(header bitAnd: MarkBit) = 0 ifTrue: [ ^ self objectAfter: oop ].  \"oop not forwarded\"\r\r\t\"Assume: mark bit cannot be set on a free chunk, so if we get here,\r\t oop is not free and it has a forwarding table entry\"\r\r\tfwdBlock _ (header bitAnd: AllButMarkBitAndTypeMask) << 1.\r\tDoAssertionChecks ifTrue: [ self fwdBlockValidate: fwdBlock ].\r\trealHeader _ self longAt: fwdBlock + BytesPerWord.\r\t\"following code is like sizeBitsOf:\"\r\t(realHeader bitAnd: TypeMask) = HeaderTypeSizeAndClass\r\t\tifTrue: [ sz _ (self sizeHeader: oop) bitAnd: LongSizeMask ]\r\t\tifFalse: [ sz _ realHeader bitAnd: SizeMask ].\r\r\t^ self oopFromChunk: (oop + sz)! !\r\r!ObjectMemory methodsFor: 'gc -- compaction' stamp: 'di 7/1/2004 15:37'!\rremapClassOf: oop \r\t\"Update the class of the given object, if necessary, using its forwarding table entry.\"\r\t\"Note: Compact classes need not be remapped since the compact class field is just an index into the compact class \r\ttable. The header type bits show if this object has a compact class; we needn't look up the oop's real header.\"\r\t| classHeader classOop fwdBlock newClassOop newClassHeader |\r\t(self headerType: oop) = HeaderTypeShort ifTrue: [^ nil]. \"compact classes needn't be mapped\"\r\r\tclassHeader _ self longAt: oop - BytesPerWord.\r\tclassOop _ classHeader bitAnd: AllButTypeMask.\r\t(self isObjectForwarded: classOop)\r\t\tifTrue: [fwdBlock _ ((self longAt: classOop) bitAnd: AllButMarkBitAndTypeMask) << 1.\r\t\t\tDoAssertionChecks\r\t\t\t\tifTrue: [self fwdBlockValidate: fwdBlock].\r\t\t\tnewClassOop _ self longAt: fwdBlock.\r\t\t\tnewClassHeader _ newClassOop bitOr: (classHeader bitAnd: TypeMask).\r\t\t\tself longAt: oop - BytesPerWord put: newClassHeader.\r\t\t\t\"The following ensures that become: into an old object's class makes it a root. \r\t\t\tIt does nothing during either incremental or full compaction because \r\t\t\toop will never be < youngStart.\"\r\t\t\t(oop < youngStart and: [newClassOop >= youngStart])\r\t\t\t\tifTrue: [self beRootWhileForwarding: oop]]! !\r\r!ObjectMemory methodsFor: 'gc -- compaction' stamp: 'di 7/1/2004 15:37'!\rremapFieldsAndClassOf: oop \r\t\"Replace all forwarded pointers in this object with their new oops, using the forwarding table. Remap its class as well, if \r\tnecessary. \"\r\t\"Note: The given oop may be forwarded itself, which means that its real header is in its forwarding table entry.\"\r\t| fieldOffset fieldOop fwdBlock newOop |\r\tself inline: true.\r\tfieldOffset _ self lastPointerWhileForwarding: oop.\r\t[fieldOffset >= BaseHeaderSize]\r\t\twhileTrue: [fieldOop _ self longAt: oop + fieldOffset.\r\t\t\t(self isObjectForwarded: fieldOop)\r\t\t\t\tifTrue: [\"update this oop from its forwarding block\"\r\t\t\t\t\tfwdBlock _ ((self longAt: fieldOop) bitAnd: AllButMarkBitAndTypeMask) << 1.\r\t\t\t\t\tDoAssertionChecks\r\t\t\t\t\t\tifTrue: [self fwdBlockValidate: fwdBlock].\r\t\t\t\t\tnewOop _ self longAt: fwdBlock.\r\t\t\t\t\tself longAt: oop + fieldOffset put: newOop.\r\t\t\t\t\t\"The following ensures that become: into old object makes it a root. \r\t\t\t\t\tIt does nothing during either incremental or full compaction because \r\t\t\t\t\toop will never be < youngStart.\"\r\t\t\t\t\t(oop < youngStart and: [newOop >= youngStart])\r\t\t\t\t\t\tifTrue: [self beRootWhileForwarding: oop]].\r\t\t\tfieldOffset _ fieldOffset - BytesPerWord].\r\tself remapClassOf: oop! !\r\r!ObjectMemory methodsFor: 'memory access' stamp: 'tpr 3/17/2005 18:40'!\rvalidate\r\"null method just to stop compilation of interp.c from barfing\"! !\r\r!ObjectMemory methodsFor: 'memory access' stamp: 'di 7/1/2004 17:22'!\rvalidateRoots \r\t\"Verify that every old object that points to a new object \r\t\thas its root bit set, and\r\t\tappears in the rootTable.\r\tThis method should not be called if the rootTable is full, because roots\r\tare no longer recorded, and incremental collections are not attempted.\r\tIf DoAssertionChecks is true, this routine will halt on an unmarked root.\r\tOtherwise, this routine will merely return true in that case.\"\r\t| oop fieldAddr fieldOop header badRoot |\r\tbadRoot _ false.\r\toop _ self firstObject.\r\r\t[oop < youngStart] whileTrue:\r\t\t[(self isFreeObject: oop) ifFalse:\r\t\t\t[fieldAddr _ oop + (self lastPointerOf: oop).\r\t\t\t[fieldAddr > oop] whileTrue:\r\t\t\t\t[fieldOop _ self longAt: fieldAddr.\r\t\t\t\t(fieldOop >= youngStart and: [(self isIntegerObject: fieldOop) not]) ifTrue:\r\t\t\t\t\t[\"fieldOop is a pointer to a young object\"\r\t\t\t\t\theader _ self longAt: oop.\r\t\t\t\t\t(header bitAnd: RootBit) = 0\r\t\t\t\t\tifTrue:\r\t\t\t\t\t\t[\"Forbidden: points to young obj but root bit not set.\"\r\t\t\t\t\t\tDoAssertionChecks ifTrue: [self error: 'root bit not set'].\r\t\t\t\t\t\tbadRoot _ true]\r\t\t\t\t\tifFalse:\r\t\t\t\t\t\t[\"Root bit is set\"\r\t\t\t\t\t\t\"Extreme test -- validate that oop was entered in rootTable too...\"\r\t\t\t\t\t\t\"Disabled for now...\r\t\t\t\t\t\tfound _ false.\r\t\t\t\t\t\t1 to: rootTableCount do:\r\t\t\t\t\t\t\t[:i | oop = (rootTable at: i) ifTrue: [found _ true]].\r\t\t\t\t\t\tfound ifFalse:\r\t\t\t\t\t\t\t[DoAssertionChecks ifTrue: [self error: 'root table not set'].\r\t\t\t\t\t\t\tbadRoot _ true].\r\t\t\t\t\t\t...\"\r\t\t\t\t\t\t]].\r\t\t\t\tfieldAddr _ fieldAddr - BytesPerWord]].\r\t\toop _ self objectAfter: oop].\r\t^ badRoot! !\r\r!ObjectMemory methodsFor: 'interpreter access' stamp: 'ikp 6/9/2004 23:16'!\rfetchByte: byteIndex ofObject: oop\r\r\t^ self byteAt: oop + BaseHeaderSize + byteIndex! !\r\r!ObjectMemory methodsFor: 'interpreter access' stamp: 'di 7/4/2004 08:34'!\rfetchLong32: fieldIndex ofObject: oop\r\t\"index by 32-bit units, and return a 32-bit value\"\r\r\t^ self long32At: oop + BaseHeaderSize + (fieldIndex << 2)! !\r\r!ObjectMemory methodsFor: 'interpreter access' stamp: 'di 7/4/2004 11:11'!\rfetchLong32LengthOf: objectPointer\r\t\"Gives size appropriate for, eg, fetchLong32\"\r\r\t| sz |\r\tsz _ self sizeBitsOf: objectPointer.\r\t^ (sz - BaseHeaderSize) >> 2! !\r\r!ObjectMemory methodsFor: 'interpreter access' stamp: 'di 7/4/2004 08:33'!\rfetchPointer: fieldIndex ofObject: oop\r\t\"index by word size, and return a pointer as long as the word size\"\r\r\t^ self longAt: oop + BaseHeaderSize + (fieldIndex << ShiftForWord)! !\r\r!ObjectMemory methodsFor: 'interpreter access' stamp: 'ikp 8/2/2004 17:33'!\rfetchWord: fieldIndex ofObject: oop\r\t\"This message is deprecated.  Use fetchLong32, fetchLong64 or fetchPointer\"\r\r\tself error: 'deprecated -- do not use -- and then delete me'! !\r\r!ObjectMemory methodsFor: 'interpreter access' stamp: 'di 7/4/2004 09:34'!\rfetchWordLengthOf: objectPointer\r\t\"NOTE: this gives size appropriate for fetchPointer: n, but not in general for, eg, fetchLong32, etc.\"\r\r\t| sz |\r\tsz _ self sizeBitsOf: objectPointer.\r\t^ (sz - BaseHeaderSize) >> ShiftForWord! !\r\r!ObjectMemory methodsFor: 'interpreter access' stamp: 'ikp 3/27/2005 18:07'!\rinstantiateClass: classPointer indexableSize: size \r\t\"NOTE: This method supports the backward-compatible split instSize field of the \r\tclass format word. The sizeHiBits will go away and other shifts change by 2 \r\twhen the split fields get merged in an (incompatible) image change.\"\r\r\t| hash header1 header2 cClass byteSize format binc header3 hdrSize fillWord newObj sizeHiBits bm1 classFormat |\r\tself inline: false.\r\tDoAssertionChecks ifTrue: [size < 0\r\t\t\t\tifTrue: [self error: 'cannot have a negative indexable field count']].\r\thash _ self newObjectHash.\r\tclassFormat _ self formatOfClass: classPointer.\r\t\"Low 2 bits are 0\"\r\theader1 _ (classFormat bitAnd: 16r1FF00) bitOr: (hash << HashBitsOffset bitAnd: HashBits).\r\theader2 _ classPointer.\r\theader3 _ 0.\r\tsizeHiBits _ (classFormat bitAnd: 16r60000) >> 9.\r\tcClass _ header1 bitAnd: CompactClassMask. \"compact class field from format word\"\r\tbyteSize _ (classFormat bitAnd: SizeMask + Size4Bit) + sizeHiBits.\r\t\t\"size in bytes -- low 2 bits are 0\"\r\t\"Note this byteSize comes from the format word of the class which is pre-shifted\r\t\tto 4 bytes per field.  Need another shift for 8 bytes per word...\"\r\tbyteSize _ byteSize << (ShiftForWord-2).\r\tformat _ classFormat >> 8 bitAnd: 15.\r\tself flag: #sizeLowBits.\r\tformat < 8\r\t\tifTrue:\r\t\t\t[format = 6\r\t\t\t\tifTrue: [\"long32 bitmaps\"\r\t\t\t\t\tbm1 _ BytesPerWord-1.\r\t\t\t\t\tbyteSize _ byteSize + (size * 4) + bm1 bitAnd: LongSizeMask. \"round up\"\r\t\t\t\t\tbinc _ bm1 - ((size * 4) + bm1 bitAnd: bm1). \"odd bytes\"\r\t\t\t\t\t\"extra low bit (4) for 64-bit VM goes in 4-bit (betw hdr bits and sizeBits)\"\r\t\t\t\t\theader1 _ header1 bitOr: (binc bitAnd: 4)]\r\t\t\t\tifFalse: [byteSize _ byteSize + (size * BytesPerWord) \"Arrays and 64-bit bitmaps\"]\r\t\t\t]\r\t\tifFalse:\r\t\t\t[\"Strings and Methods\"\r\t\t\tbm1 _ BytesPerWord-1.\r\t\t\tbyteSize _ byteSize + size + bm1 bitAnd: LongSizeMask. \"round up\"\r\t\t\tbinc _ bm1 - (size + bm1 bitAnd: bm1). \"odd bytes\"\r\t\t\t\"low bits of byte size go in format field\"\r\t\t\theader1 _ header1 bitOr: (binc bitAnd: 3) << 8.\r\t\t\t\"extra low bit (4) for 64-bit VM goes in 4-bit (betw hdr bits and sizeBits)\"\r\t\t\theader1 _ header1 bitOr: (binc bitAnd: 4)].\r\tbyteSize > 255\r\t\tifTrue: [\"requires size header word\"\r\t\t\theader3 _ byteSize.\r\t\t\theader1 _ header1]\r\t\tifFalse: [header1 _ header1 bitOr: byteSize].\r\theader3 > 0\r\t\tifTrue: [\"requires full header\"\r\t\t\thdrSize _ 3]\r\t\tifFalse: [cClass = 0\r\t\t\t\tifTrue: [hdrSize _ 2]\r\t\t\t\tifFalse: [hdrSize _ 1]].\r\tformat <= 4\r\t\tifTrue: [\"if pointers, fill with nil oop\"\r\t\t\tfillWord _ nilObj]\r\t\tifFalse: [fillWord _ 0].\r\tnewObj _ self allocate: byteSize headerSize: hdrSize h1: header1 h2: header2 h3: header3 doFill: true with: fillWord.\r\t^ newObj! !\r\r!ObjectMemory methodsFor: 'interpreter access' stamp: 'di 7/7/2004 16:46'!\rinstantiateContext: classPointer sizeInBytes: sizeInBytes \r\t\"This version of instantiateClass assumes that the total object \r\tsize is under 256 bytes, the limit for objects with only one or \r\ttwo header words. Note that the size is specified in bytes \r\tand should include four bytes for the base header word.\"\r\t| hash header1 header2 hdrSize |\r\thash _ self newObjectHash.\r\theader1 _ (hash << HashBitsOffset bitAnd: HashBits) bitOr: (self formatOfClass: classPointer).\r\theader2 _ classPointer.\r\t(header1 bitAnd: CompactClassMask) > 0 \"are contexts compact?\"\r\t\tifTrue: [hdrSize _ 1]\r\t\tifFalse: [hdrSize _ 2].\r\tsizeInBytes <= SizeMask\r\t\tifTrue: [\"OR size into header1.  Must not do this if size > SizeMask\"\r\t\t\t\theader1 _ header1 + (sizeInBytes - (header1 bitAnd: SizeMask))]\r\t\tifFalse: [hdrSize _ 3.\r\t\t\t\t\"Zero the size field of header1 if large\"\r\t\t\t\theader1 _ header1 - (header1 bitAnd: SizeMask)].\rself flag: #Dan.  \"Check details of context sizes\"\r\t^ self allocate: sizeInBytes headerSize: hdrSize h1: header1 h2: header2 h3: LargeContextSize doFill: false with: 0! !\r\r!ObjectMemory methodsFor: 'interpreter access' stamp: 'ikp 8/2/2004 17:04'!\rinstantiateSmallClass: classPointer sizeInBytes: sizeInBytes fill: fillValue \r\t\"This version of instantiateClass assumes that the total object \r\tsize is under 256 bytes, the limit for objects with only one or \r\ttwo header words. Note that the size is specified in bytes \r\tand should include 4 or 8 bytes for the base header word. \r\tNOTE this code will only work for sizes that are an integral number of words\r\t\t(like not a 32-bit LargeInteger in a 64-bit system). \r\tMay cause a GC\"\r\r\t| hash header1 header2 hdrSize |\r\t(sizeInBytes bitAnd: (BytesPerWord-1)) = 0 ifFalse:\r\t\t[self error: 'size must be integral number of words'].\r\thash _ self newObjectHash.\r\theader1 _ (hash << HashBitsOffset bitAnd: HashBits) bitOr: (self formatOfClass: classPointer).\r\theader2 _ classPointer.\r\t(header1 bitAnd: CompactClassMask) > 0 \"is this a compact class\"\r\t\tifTrue: [hdrSize _ 1]\r\t\tifFalse: [hdrSize _ 2].\r\theader1 _ header1 + (sizeInBytes - (header1 bitAnd: SizeMask+Size4Bit)).\r\t^ self allocate: sizeInBytes headerSize: hdrSize h1: header1 h2: header2 h3: 0 doFill: true with: fillValue! !\r\r!ObjectMemory methodsFor: 'interpreter access' stamp: 'ikp 8/4/2004 15:32'!\rintegerObjectOf: value\r\r\t^(value << 1) + 1! !\r\r!ObjectMemory methodsFor: 'interpreter access' stamp: 'ikp 8/4/2004 15:29'!\risIntegerValue: valueWord \r\t^ valueWord >= 16r-40000000 and: [valueWord <= 16r3FFFFFFF]! !\r\r!ObjectMemory methodsFor: 'interpreter access' stamp: 'ikp 6/9/2004 23:16'!\rstoreByte: byteIndex ofObject: oop withValue: valueByte\r\r\t^ self byteAt: oop + BaseHeaderSize + byteIndex\r\t\tput: valueByte! !\r\r!ObjectMemory methodsFor: 'interpreter access' stamp: 'di 7/4/2004 08:48'!\rstoreLong32: fieldIndex ofObject: oop withValue: valueWord\r\r\t^ self long32At: oop + BaseHeaderSize + (fieldIndex << 2)\r\t\tput: valueWord! !\r\r!ObjectMemory methodsFor: 'interpreter access' stamp: 'di 6/23/2004 13:49'!\rstorePointer: fieldIndex ofObject: oop withValue: valuePointer\r\t\"Note must check here for stores of young objects into old ones.\"\r\r\t(oop < youngStart) ifTrue: [\r\t\tself possibleRootStoreInto: oop value: valuePointer.\r\t].\r\r\t^ self longAt: oop + BaseHeaderSize + (fieldIndex << ShiftForWord)\r\t\tput: valuePointer! !\r\r!ObjectMemory methodsFor: 'interpreter access' stamp: 'di 6/23/2004 13:49'!\rstorePointerUnchecked: fieldIndex ofObject: oop withValue: valuePointer\r\t\"Like storePointer:ofObject:withValue:, but the caller guarantees that the object being stored into is a young object or is already marked as a root.\"\r\r\t^ self longAt: oop + BaseHeaderSize + (fieldIndex << ShiftForWord)\r\t\t\tput: valuePointer\r! !\r\r!ObjectMemory methodsFor: 'interpreter access' stamp: 'ikp 3/26/2005 14:29'!\rstoreWord: fieldIndex ofObject: oop withValue: valueWord\r\t\"This message is deprecated.  Use storeLong32, storeLong64 or storePointer\"\r\r\tself abort! !\r\r\r!Interpreter methodsFor: 'message sending' stamp: 'di 6/15/2004 23:34'!\ractivateNewMethod\r\t| newContext methodHeader initialIP tempCount nilOop where |\r\r\tmethodHeader _ self headerOf: newMethod.\r\tnewContext _ self allocateOrRecycleContext: (methodHeader bitAnd: LargeContextBit).\r\r\tinitialIP _ ((LiteralStart + (self literalCountOfHeader: methodHeader)) * BytesPerWord) + 1.\r\ttempCount _ (methodHeader >> 19) bitAnd: 16r3F.\r\r\t\"Assume: newContext will be recorded as a root if necessary by the\r\t call to newActiveContext: below, so we can use unchecked stores.\"\r\r\twhere _  newContext  + BaseHeaderSize.\r\tself longAt: where + (SenderIndex << ShiftForWord) put: activeContext.\r\tself longAt: where + (InstructionPointerIndex << ShiftForWord) put: (self integerObjectOf: initialIP).\r\tself longAt: where + (StackPointerIndex << ShiftForWord) put: (self integerObjectOf: tempCount).\r\tself longAt: where + (MethodIndex << ShiftForWord) put: newMethod.\r\r\t\"Copy the reciever and arguments...\"\r\t0 to: argumentCount do:\r\t\t[:i | self longAt: where + ((ReceiverIndex+i) << ShiftForWord) put: (self stackValue: argumentCount-i)].\r\r\t\"clear remaining temps to nil in case it has been recycled\"\r\tnilOop _ nilObj.\r\targumentCount+1+ReceiverIndex to: tempCount+ReceiverIndex do:\r\t\t[:i | self longAt: where + (i << ShiftForWord) put: nilOop].\r\r\tself pop: argumentCount + 1.\r\treclaimableContextCount _ reclaimableContextCount + 1.\r\tself newActiveContext: newContext.! !\r\r!Interpreter methodsFor: 'message sending' stamp: 'di 6/14/2004 16:50'!\rcreateActualMessageTo: aClass \r\t\"Bundle up the selector, arguments and lookupClass into a Message object. \r\tIn the process it pops the arguments off the stack, and pushes the message object. \r\tThis can then be presented as the argument of e.g. #doesNotUnderstand:. \r\tikp 11/20/1999 03:59 -- added hook for external runtime compilers.\"\r\t\"remap lookupClass in case GC happens during allocation\"\r\t| argumentArray message lookupClass |\r\tself pushRemappableOop: aClass.\r\targumentArray _ self instantiateClass: (self splObj: ClassArray) indexableSize: argumentCount.\r\t\"remap argumentArray in case GC happens during allocation\"\r\tself pushRemappableOop: argumentArray.\r\tmessage _ self instantiateClass: (self splObj: ClassMessage) indexableSize: 0.\r\targumentArray _ self popRemappableOop.\r\tlookupClass _ self popRemappableOop.\r\tself beRootIfOld: argumentArray.\r\r\tcompilerInitialized\r\t\tifTrue: [self compilerCreateActualMessage: message storingArgs: argumentArray]\r\t\tifFalse: [self transfer: argumentCount from: stackPointer - (argumentCount - 1 * BytesPerWord) to: argumentArray + BaseHeaderSize.\r\t\t\tself pop: argumentCount thenPush: message].\r\r\targumentCount _ 1.\r\tself storePointer: MessageSelectorIndex ofObject: message withValue: messageSelector.\r\tself storePointer: MessageArgumentsIndex ofObject: message withValue: argumentArray.\r\t(self lastPointerOf: message) >= (MessageLookupClassIndex * BytesPerWord + BaseHeaderSize)\r\t\tifTrue: [\"Only store lookupClass if message has 3 fields (old images don't)\"\r\t\t\tself storePointer: MessageLookupClassIndex ofObject: message withValue: lookupClass]! !\r\r!Interpreter methodsFor: 'message sending' stamp: 'di 6/14/2004 16:53'!\rinternalActivateNewMethod\r\t| methodHeader newContext tempCount argCount2 needsLarge where |\r\tself inline: true.\r\r\tmethodHeader _ self headerOf: newMethod.\r\tneedsLarge _ methodHeader bitAnd: LargeContextBit.\r\t(needsLarge = 0 and: [freeContexts ~= NilContext])\r\t\tifTrue: [newContext _ freeContexts.\r\t\t\t\tfreeContexts _ self fetchPointer: 0 ofObject: newContext]\r\t\tifFalse: [\"Slower call for large contexts or empty free list\"\r\t\t\t\tself externalizeIPandSP.\r\t\t\t\tnewContext _ self allocateOrRecycleContext: needsLarge.\r\t\t\t\tself internalizeIPandSP].\r\ttempCount _ (methodHeader >> 19) bitAnd: 16r3F.\r\r\t\"Assume: newContext will be recorded as a root if necessary by the\r\t call to newActiveContext: below, so we can use unchecked stores.\"\r\twhere _   newContext + BaseHeaderSize.\r\tself longAt: where + (SenderIndex << ShiftForWord) put: activeContext.\r\tself longAt: where + (InstructionPointerIndex << ShiftForWord) put: (self integerObjectOf:\r\t\t\t(((LiteralStart + (self literalCountOfHeader: methodHeader)) * BytesPerWord) + 1)).\r\tself longAt: where + (StackPointerIndex << ShiftForWord) put: (self integerObjectOf: tempCount).\r\tself longAt: where + (MethodIndex << ShiftForWord) put: newMethod.\r\r\t\"Copy the reciever and arguments...\"\r\targCount2 _ argumentCount.\r\t0 to: argCount2 do:\r\t\t[:i | self longAt: where + ((ReceiverIndex+i) << ShiftForWord) put: (self internalStackValue: argCount2-i)].\r\r\t\"clear remaining temps to nil in case it has been recycled\"\r\tmethodHeader _ nilObj.  \"methodHeader here used just as faster (register?) temp\"\r\targCount2+1+ReceiverIndex to: tempCount+ReceiverIndex do:\r\t\t[:i | self longAt: where + (i << ShiftForWord) put: methodHeader].\r\r\tself internalPop: argCount2 + 1.\r\treclaimableContextCount _ reclaimableContextCount + 1.\r\tself internalNewActiveContext: newContext.\r ! !\r\r!Interpreter methodsFor: 'message sending' stamp: 'ikp 6/10/2004 14:10'!\rprimitiveCalloutToFFI\r\t\"Perform a function call to a foreign function.\r\tOnly invoked from method containing explicit external call spec.\r\tDue to this we use the pluggable prim mechanism explicitly here\r\t(the first literal of any FFI spec'ed method is an ExternalFunction\r\tand not an array as used in the pluggable primitive mechanism).\"\r\r\t| function moduleName functionName |\r\tself var: #function declareC: 'static void *function = 0'.\r\tself var: #moduleName declareC: 'static char *moduleName = \"SqueakFFIPrims\"'.\r\tself var: #functionName declareC: 'static char *functionName = \"primitiveCallout\"'.\r\tfunction = 0 ifTrue: [\r\t\tfunction _ self\r\t\t\tioLoadExternalFunction: (self oopForPointer: functionName)\r\t\t\tOfLength: 16\r\t\t\tFromModule: (self oopForPointer: moduleName)\r\t\t\tOfLength: 14.\r\t\tfunction == 0 ifTrue: [^self primitiveFail]].\r\t^self cCode: '((sqInt (*)(void))function)()'.\r! !\r\r!Interpreter methodsFor: 'method lookup cache' stamp: 'ikp 3/26/2005 13:35'!\raddNewMethodToCache\r\t\"Add the given entry to the method cache.\r\tThe policy is as follows:\r\t\tLook for an empty entry anywhere in the reprobe chain.\r\t\tIf found, install the new entry there.\r\t\tIf not found, then install the new entry at the first probe position\r\t\t\tand delete the entries in the rest of the reprobe chain.\r\t\tThis has two useful purposes:\r\t\t\tIf there is active contention over the first slot, the second\r\t\t\t\tor third will likely be free for reentry after ejection.\r\t\t\tAlso, flushing is good when reprobe chains are getting full.\"\r\t| probe hash |\r\tself inline: false.\r\tself compilerTranslateMethodHook.\t\"newMethod x lkupClass -> newNativeMethod (may cause GC !!)\"\r\thash _ messageSelector bitXor: lkupClass.  \"drop low-order zeros from addresses\"\r\r\tprimitiveFunctionPointer _ self functionPointerFor: primitiveIndex inClass: lkupClass.\r\t\r\t0 to: CacheProbeMax-1 do:\r\t\t[:p | probe _ (hash >> p) bitAnd: MethodCacheMask.\r\t\t(methodCache at: probe + MethodCacheSelector) = 0 ifTrue:\r\t\t\t[\"Found an empty entry -- use it\"\r\t\t\tmethodCache at: probe + MethodCacheSelector put: messageSelector.\r\t\t\tmethodCache at: probe + MethodCacheClass put: lkupClass.\r\t\t\tmethodCache at: probe + MethodCacheMethod put: newMethod.\r\t\t\tmethodCache at: probe + MethodCachePrim put: primitiveIndex.\r\t\t\tmethodCache at: probe + MethodCacheNative put: newNativeMethod.\r\t\t\tmethodCache at: probe + MethodCachePrimFunction put: (self cCoerce: primitiveFunctionPointer to: 'long').\r\t\t\t^ nil]].\r\r\t\"OK, we failed to find an entry -- install at the first slot...\"\r\tprobe _ hash bitAnd: MethodCacheMask.  \"first probe\"\r\tmethodCache at: probe + MethodCacheSelector put: messageSelector.\r\tmethodCache at: probe + MethodCacheClass put: lkupClass.\r\tmethodCache at: probe + MethodCacheMethod put: newMethod.\r\tmethodCache at: probe + MethodCachePrim put: primitiveIndex.\r\tmethodCache at: probe + MethodCacheNative put: newNativeMethod.\r\tmethodCache at: probe + MethodCachePrimFunction put: (self cCoerce: primitiveFunctionPointer to: 'long').\r\r\t\"...and zap the following entries\"\r\t1 to: CacheProbeMax-1 do:\r\t\t[:p | probe _ (hash >> p) bitAnd: MethodCacheMask.\r\t\tmethodCache at: probe + MethodCacheSelector put: 0].\r! !\r\r!Interpreter methodsFor: 'method lookup cache' stamp: 'ikp 8/2/2004 17:54'!\rfunctionPointerFor: primIdx inClass: theClass\r\t\"Find an actual function pointer for this primitiveIndex.  This is an\r\topportunity to specialise the prim for the relevant class (format for\r\texample).  Default for now is simply the entry in the base primitiveTable.\"\r\r\tself returnTypeC: 'void *'.\r\t^primitiveTable at: primIdx! !\r\r!Interpreter methodsFor: 'method lookup cache' stamp: 'ikp 3/26/2005 13:36'!\rlookupInMethodCacheSel: selector class: class\r\t\"This method implements a simple method lookup cache. If an entry for the given selector and class is found in the cache, set the values of 'newMethod' and 'primitiveIndex' and return true. Otherwise, return false.\"\r\t\"About the re-probe scheme: The hash is the low bits of the XOR of two large addresses, minus their useless lowest two bits. If a probe doesn't get a hit, the hash is shifted right one bit to compute the next probe, introducing a new randomish bit. The cache is probed CacheProbeMax times before giving up.\"\r\t\"WARNING: Since the hash computation is based on the object addresses of the class and selector, we must rehash or flush when compacting storage. We've chosen to flush, since that also saves the trouble of updating the addresses of the objects in the cache.\"\r\r\t| hash probe |\r\tself inline: true.\r\thash _ selector bitXor: class.  \"shift drops two low-order zeros from addresses\"\r\r\tprobe _ hash bitAnd: MethodCacheMask.  \"first probe\"\r\t(((methodCache at: probe + MethodCacheSelector) = selector) and:\r\t\t [(methodCache at: probe + MethodCacheClass) = class]) ifTrue:\r\t\t\t[newMethod _ methodCache at: probe + MethodCacheMethod.\r\t\t\tprimitiveIndex _ methodCache at: probe + MethodCachePrim.\r\t\t\tnewNativeMethod _ methodCache at: probe + MethodCacheNative.\r\t\t\tprimitiveFunctionPointer _ self cCoerce: (methodCache at: probe + MethodCachePrimFunction) to: 'void *'.\r\t\t\t^ true\t\"found entry in cache; done\"].\r\r\tprobe _ (hash >> 1) bitAnd: MethodCacheMask.  \"second probe\"\r\t(((methodCache at: probe + MethodCacheSelector) = selector) and:\r\t\t [(methodCache at: probe + MethodCacheClass) = class]) ifTrue:\r\t\t\t[newMethod _ methodCache at: probe + MethodCacheMethod.\r\t\t\tprimitiveIndex _ methodCache at: probe + MethodCachePrim.\r\t\t\tnewNativeMethod _ methodCache at: probe + MethodCacheNative.\r\t\t\tprimitiveFunctionPointer _ self cCoerce: (methodCache at: probe + MethodCachePrimFunction) to: 'void *'.\r\t\t\t^ true\t\"found entry in cache; done\"].\r\r\tprobe _ (hash >> 2) bitAnd: MethodCacheMask.\r\t(((methodCache at: probe + MethodCacheSelector) = selector) and:\r\t\t [(methodCache at: probe + MethodCacheClass) = class]) ifTrue:\r\t\t\t[newMethod _ methodCache at: probe + MethodCacheMethod.\r\t\t\tprimitiveIndex _ methodCache at: probe + MethodCachePrim.\r\t\t\tnewNativeMethod _ methodCache at: probe + MethodCacheNative.\r\t\t\tprimitiveFunctionPointer _ self cCoerce: (methodCache at: probe + MethodCachePrimFunction) to: 'void *'.\r\t\t\t^ true\t\"found entry in cache; done\"].\r\r\t^ false\r! !\r\r!Interpreter methodsFor: 'method lookup cache' stamp: 'ikp 3/26/2005 14:24'!\rrewriteMethodCacheSel: selector class: class primIndex: localPrimIndex\r\r\t\"Rewrite the cache entry with the given primitive index and matching function pointer\"\r\t| primPtr |\r\tself var: #primPtr type: 'void *'.\r\tself inline: false.\r\tlocalPrimIndex = 0\r\t\tifTrue: [primPtr _ 0]\r\t\tifFalse: [primPtr _ primitiveTable at: localPrimIndex].\r\tself\r\t\trewriteMethodCacheSel: selector class: class\r\t\tprimIndex: localPrimIndex primFunction: primPtr! !\r\r!Interpreter methodsFor: 'method lookup cache' stamp: 'ikp 3/26/2005 14:24'!\rrewriteMethodCacheSel: selector class: class primIndex: localPrimIndex primFunction: localPrimAddress\r\t\"Rewrite an existing entry in the method cache with a new primitive \r\tindex & function address. Used by primExternalCall to make direct jumps to found external prims\"\r\t| probe hash |\r\tself inline: false.\r\tself var: #localPrimAddress type: 'void *'.\r\thash := selector bitXor: class.\r\t0 to: CacheProbeMax - 1 do: [:p | \r\t\t\tprobe := hash >> p bitAnd: MethodCacheMask.\r\t\t\t((methodCache at: probe + MethodCacheSelector) = selector\r\t\t\t\t\tand: [(methodCache at: probe + MethodCacheClass) = class])\r\t\t\t\tifTrue: [methodCache at: probe + MethodCachePrim put: localPrimIndex.\r\t\t\t\t\tmethodCache at: probe + MethodCachePrimFunction put: (self cCoerce: localPrimAddress to: 'long').\r\t\t\t\t\t^ nil]]! !\r\r!Interpreter methodsFor: 'plugin primitive support' stamp: 'ikp 8/2/2004 17:47'!\rcallExternalPrimitive: functionID\r\t\"Call the external plugin function identified. In the VM this is an address, see \tInterpreterSimulator for it's version. dispatch... is a macro in the VM C code.\"\r\r\tself var: #functionID type: 'void *'.\r\tself dispatchFunctionPointer: functionID! !\r\r!Interpreter methodsFor: 'plugin primitive support' stamp: 'ikp 8/3/2004 18:16'!\rclassNameOf: aClass Is: className \r\t\"Check if aClass's name is className\"\r\t| srcName name length |\r\tself var: #className declareC: 'char *className'.\r\tself var: #srcName declareC: 'char *srcName'.\r\t(self lengthOf: aClass) <= 6 ifTrue: [^ false].\r\r\t\"Not a class but might be behavior\"\r\tname _ self fetchPointer: 6 ofObject: aClass.\r\t(self isBytes: name) ifFalse: [^ false].\r\tlength _ self stSizeOf: name.\r\tsrcName _ self cCoerce: (self arrayValueOf: name) to: 'char *'.\r\t0 to: length - 1 do: [:i | (srcName at: i) = (className at: i) ifFalse: [^ false]].\r\t\"Check if className really ends at this point\"\r\t^ (className at: length) = 0! !\r\r!Interpreter methodsFor: 'plugin primitive support' stamp: 'di 7/4/2004 08:51'!\rflushExternalPrimitiveOf: methodPtr\r\t\"methodPtr is a CompiledMethod containing an external primitive. Flush the function address and session ID of the CM\"\r\t| lit |\r\t(self literalCountOf: methodPtr) > 0 ifFalse:[^nil]. \"Something's broken\"\r\tlit _ self literal: 0 ofMethod: methodPtr.\r\t((self isArray: lit) and:[(self lengthOf: lit) = 4])\r\t\tifFalse:[^nil]. \"Something's broken\"\r\tself storePointer: 2 ofObject: lit withValue: ConstZero.\r\tself storePointer: 3 ofObject: lit withValue: ConstZero.\r! !\r\r!Interpreter methodsFor: 'debug support' stamp: 'di 6/14/2004 17:52'!\rbalancedStack: delta afterPrimitive: primIdx withArgs: nArgs\r\t\"Return true if the stack is still balanced after executing primitive primIndex with nArgs args. Delta is 'stackPointer - activeContext' which is a relative measure for the stack pointer (so we don't have to relocate it during the primitive)\"\r\t(primIdx >= 81 and:[primIdx <= 88]) ifTrue:[^true].\r\t\"81-88 are control primitives after which the stack may look unbalanced\"\r\tsuccessFlag ifTrue:[\r\t\t\"Successful prim, stack must have exactly nArgs arguments popped off\"\r\t\t^(stackPointer - activeContext + (nArgs * BytesPerWord)) = delta\r\t].\r\t\"Failed prim must leave stack intact\"\r\t^(stackPointer - activeContext) = delta\r! !\r\r!Interpreter methodsFor: 'debug support' stamp: 'ikp 3/26/2005 21:05'!\rokayOop: signedOop\r\t\"Verify that the given oop is legitimate. Check address, header, and size but not class.\"\r\r\t| sz type fmt unusedBit oop |\r\tself var: #oop type: 'usqInt'.\r\toop := self cCoerce: signedOop to: 'usqInt'.\r\r\t\"address and size checks\"\r\t(self isIntegerObject: oop) ifTrue: [ ^true ].\r\t(oop < endOfMemory)\r\t\tifFalse: [ self error: 'oop is not a valid address' ].\r\t((oop \\\\ BytesPerWord) = 0)\r\t\tifFalse: [ self error: 'oop is not a word-aligned address' ].\r\tsz _ self sizeBitsOf: oop.\r\t(oop + sz) < endOfMemory\r\t\tifFalse: [ self error: 'oop size would make it extend beyond the end of memory' ].\r\r\t\"header type checks\"\r\ttype _ self headerType: oop.\r\ttype = HeaderTypeFree\r\t\tifTrue:  [ self error: 'oop is a free chunk, not an object' ].\r\ttype = HeaderTypeShort ifTrue: [\r\t\t(((self baseHeader: oop) >> 12) bitAnd: 16r1F) = 0\r\t\t\tifTrue:  [ self error: 'cannot have zero compact class field in a short header' ].\r\t].\r\ttype = HeaderTypeClass ifTrue: [\r\t\t((oop >= BytesPerWord) and: [(self headerType: oop - BytesPerWord) = type])\r\t\t\tifFalse: [ self error: 'class header word has wrong type' ].\r\t].\r\ttype = HeaderTypeSizeAndClass ifTrue: [\r\t\t((oop >= (BytesPerWord*2)) and:\r\t\t [(self headerType: oop - (BytesPerWord*2)) = type and:\r\t\t [(self headerType: oop - BytesPerWord) = type]])\r\t\t\tifFalse: [ self error: 'class header word has wrong type' ].\r\t].\r\r\t\"format check\"\r\tfmt _ self formatOf: oop.\r\t((fmt = 5) | (fmt = 7))\r\t\tifTrue:  [ self error: 'oop has an unknown format type' ].\r\r\t\"mark and root bit checks\"\r\tunusedBit _ 16r20000000.\r\tBytesPerWord = 8\r\t\tifTrue:\r\t\t\t[unusedBit _ unusedBit << 16.\r\t\t\t unusedBit _ unusedBit << 16].\r\t((self longAt: oop) bitAnd: unusedBit) = 0\r\t\tifFalse: [ self error: 'unused header bit 30 is set; should be zero' ].\r\"xxx\r\t((self longAt: oop) bitAnd: MarkBit) = 0\r\t\tifFalse: [ self error: 'mark bit should not be set except during GC' ].\rxxx\"\r\t(((self longAt: oop) bitAnd: RootBit) = 1 and:\r\t [oop >= youngStart])\r\t\tifTrue: [ self error: 'root bit is set in a young object' ].\r\t^true\r! !\r\r!Interpreter methodsFor: 'debug support' stamp: 'ikp 3/26/2005 21:06'!\roopHasOkayClass: signedOop\r\t\"Attempt to verify that the given oop has a reasonable behavior. The class must be a valid, non-integer oop and must not be nilObj. It must be a pointers object with three or more fields. Finally, the instance specification field of the behavior must match that of the instance.\"\r\r\t| oop oopClass formatMask behaviorFormatBits oopFormatBits |\r\tself var: #oop type: 'usqInt'.\r\tself var: #oopClass type: 'usqInt'.\r\r\toop := self cCoerce: signedOop to: 'usqInt'.\r\tself okayOop: oop.\r\toopClass := self cCoerce: (self fetchClassOf: oop) to: 'usqInt'.\r\r\t(self isIntegerObject: oopClass)\r\t\tifTrue: [ self error: 'a SmallInteger is not a valid class or behavior' ].\r\tself okayOop: oopClass.\r\t((self isPointers: oopClass) and: [(self lengthOf: oopClass) >= 3])\r\t\tifFalse: [ self error: 'a class (behavior) must be a pointers object of size >= 3' ].\r\t(self isBytes: oop)\r\t\tifTrue: [ formatMask _ 16rC00 ]  \"ignore extra bytes size bits\"\r\t\tifFalse: [ formatMask _ 16rF00 ].\r\r\tbehaviorFormatBits _ (self formatOfClass: oopClass) bitAnd: formatMask.\r\toopFormatBits _ (self baseHeader: oop) bitAnd: formatMask.\r\tbehaviorFormatBits = oopFormatBits\r\t\tifFalse: [ self error: 'object and its class (behavior) formats differ' ].\r\t^true! !\r\r!Interpreter methodsFor: 'utilities' stamp: 'di 6/23/2004 12:24'!\rarrayValueOf: arrayOop\r\t\"Return the address of first indexable field of resulting array object, or fail if the instance variable does not contain an indexable bytes or words object.\"\r\t\"Note: May be called by translated primitive code.\"\r\r\tself returnTypeC: 'void *'.\r\t((self isIntegerObject: arrayOop) not and:\r\t [self isWordsOrBytes: arrayOop])\r\t\tifTrue: [^ self cCode: '(void *)pointerForOop(arrayOop + BaseHeaderSize)'].\r\tself primitiveFail.\r! !\r\r!Interpreter methodsFor: 'utilities' stamp: 'ikp 6/10/2004 11:08'!\rexternalizeIPandSP\r\t\"Copy the local instruction and stack pointer to global variables for use in primitives and other functions outside the interpret loop.\"\r\r\tinstructionPointer _ self oopForPointer: localIP.\r\tstackPointer _ self oopForPointer: localSP.\r\ttheHomeContext _ localHomeContext.\r! !\r\r!Interpreter methodsFor: 'utilities' stamp: 'ikp 8/4/2004 11:42'!\rfetchIntegerOrTruncFloat: fieldIndex ofObject: objectPointer\r\t\"Return the integer value of the given field of the given object. If the field contains a Float, truncate it and return its integral part. Fail if the given field does not contain a small integer or Float, or if the truncated Float is out of the range of small integers.\"\r\t\"Note: May be called by translated primitive code.\"\r\r\t| intOrFloat floatVal frac trunc |\r\tself inline: false.\r\tself var: #floatVal declareC: 'double floatVal'.\r\tself var: #frac declareC: 'double frac'.\r\tself var: #trunc declareC: 'double trunc'.\r\r\tintOrFloat _ self fetchPointer: fieldIndex ofObject: objectPointer.\r\t(self isIntegerObject: intOrFloat) ifTrue: [^ self integerValueOf: intOrFloat].\r\tself assertClassOf: intOrFloat is: (self splObj: ClassFloat).\r\tsuccessFlag ifTrue: [\r\t\tself cCode: '' inSmalltalk: [floatVal _ Float new: 2].\r\t\tself fetchFloatAt: intOrFloat + BaseHeaderSize into: floatVal.\r\t\tself cCode: 'frac = modf(floatVal, &trunc)'.\r\t\t\"the following range check is for C ints, with range -2^31..2^31-1\"\r\t\tself flag: #Dan.\t\t\"The ranges are INCORRECT if SmallIntegers are wider than 31 bits.\"\r\t\tself cCode: 'success((-2147483648.0 <= trunc) && (trunc <= 2147483647.0))'.].\r\tsuccessFlag\r\t\tifTrue: [^ self cCode: '((sqInt) trunc)' inSmalltalk: [floatVal truncated]]\r\t\tifFalse: [^ 0].\r! !\r\r!Interpreter methodsFor: 'utilities' stamp: 'di 6/14/2004 17:48'!\rfloatValueOf: oop\r\t\"Fetch the instance variable at the given index of the given object. Return the C double precision floating point value of that instance variable, or fail if it is not a Float.\"\r\t\"Note: May be called by translated primitive code.\"\r\r\t| result |\r\tself flag: #Dan.  \"None of the float stuff has been converted for 64 bits\"\r\tself returnTypeC: 'double'.\r\tself var: #result declareC: 'double result'.\r\tself assertClassOf: oop is: (self splObj: ClassFloat).\r\tsuccessFlag\r\t\tifTrue: [self cCode: '' inSmalltalk: [result _ Float new: 2].\r\t\t\t\tself fetchFloatAt: oop + BaseHeaderSize into: result]\r\t\tifFalse: [result _ 0.0].\r\t^ result! !\r\r!Interpreter methodsFor: 'utilities' stamp: 'ikp 6/10/2004 11:08'!\rinternalizeIPandSP\r\t\"Copy the local instruction and stack pointer to local variables for rapid access within the interpret loop.\"\r\r\tlocalIP _ self pointerForOop: instructionPointer.\r\tlocalSP _ self pointerForOop: stackPointer.\r\tlocalHomeContext _ theHomeContext.\r! !\r\r!Interpreter methodsFor: 'utilities' stamp: 'di 6/14/2004 17:49'!\rmakePointwithxValue: xValue yValue: yValue\r\r\t| pointResult |\r\tpointResult _ self instantiateSmallClass: (self splObj: ClassPoint) sizeInBytes: 3*BytesPerWord fill: nilObj.\r\tself storePointer: XIndex ofObject: pointResult withValue: (self integerObjectOf: xValue).\r\tself storePointer: YIndex ofObject: pointResult withValue: (self integerObjectOf: yValue).\r\t^ pointResult! !\r\r!Interpreter methodsFor: 'utilities' stamp: 'ikp 6/10/2004 14:23'!\rsizeOfSTArrayFromCPrimitive: cPtr\r\t\"Return the number of indexable fields of the given object. This method is to be called from an automatically generated C primitive. The argument is assumed to be a pointer to the first indexable field of a words or bytes object; the object header starts 4 bytes before that.\"\r\t\"Note: Only called by translated primitive code.\"\r\r\t| oop |\r\tself var: #cPtr declareC: 'void *cPtr'.\r\toop _ (self oopForPointer: cPtr) - BaseHeaderSize.\r\t(self isWordsOrBytes: oop) ifFalse: [\r\t\tself primitiveFail.\r\t\t^0].\r\t^self lengthOf: oop\r! !\r\r!Interpreter methodsFor: 'utilities' stamp: 'di 7/4/2004 08:59'!\rstoreInteger: fieldIndex ofObject: objectPointer withValue: integerValue \r\t\"Note: May be called by translated primitive code.\"\r\t(self isIntegerValue: integerValue)\r\t\tifTrue: [self storePointer: fieldIndex ofObject: objectPointer\r\t\t\t\t\twithValue: (self integerObjectOf: integerValue)]\r\t\tifFalse: [self primitiveFail]! !\r\r!Interpreter methodsFor: 'utilities' stamp: 'di 8/3/2004 14:33'!\rtransfer: count from: src to: dst \r\t| in out lastIn |\r\tself flag: #Dan.  \"Need to check all senders before converting this for 64 bits\"\r\tself inline: true.\r\tin _ src - BytesPerWord.\r\tlastIn _ in + (count * BytesPerWord).\r\tout _ dst - BytesPerWord.\r\t[in < lastIn]\r\t\twhileTrue: [self\r\t\t\t\tlongAt: (out _ out + BytesPerWord)\r\t\t\t\tput: (self longAt: (in _ in + BytesPerWord))]! !\r\r!Interpreter methodsFor: 'utilities' stamp: 'di 6/15/2004 22:55'!\rtransfer: count fromIndex: firstFrom ofObject: fromOop toIndex: firstTo ofObject: toOop\r\t\"Transfer the specified fullword fields, as from calling context to called context\"\r\t\r\t\"Assume: beRootIfOld: will be called on toOop.\"\r\t| fromIndex toIndex lastFrom |\r\tself flag: #Dan.  \"Need to check all senders before converting this for 64 bits\"\r\tself inline: true.\r\tfromIndex _ fromOop + (firstFrom * BytesPerWord).\r\ttoIndex _ toOop + (firstTo * BytesPerWord).\r\tlastFrom _ fromIndex + (count * BytesPerWord).\r\t[fromIndex < lastFrom]\r\t\twhileTrue: [fromIndex _ fromIndex + BytesPerWord.\r\t\t\ttoIndex _ toIndex + BytesPerWord.\r\t\t\tself\r\t\t\t\tlongAt: toIndex\r\t\t\t\tput: (self longAt: fromIndex)]! !\r\r!Interpreter methodsFor: 'compiled methods' stamp: 'di 6/14/2004 17:02'!\rprimitiveNewMethod\r\t| header bytecodeCount class size theMethod literalCount |\r\theader _ self popStack.\r\tbytecodeCount _ self popInteger.\r\tself success: (self isIntegerObject: header).\r\tsuccessFlag ifFalse: [self unPop: 2].\r\tclass _ self popStack.\r\tsize _ (self literalCountOfHeader: header) + 1 * BytesPerWord + bytecodeCount.\r\ttheMethod _ self instantiateClass: class indexableSize: size.\r\tself storePointer: HeaderIndex ofObject: theMethod withValue: header.\r\tliteralCount _ self literalCountOfHeader: header.\r\t1 to: literalCount do:\r\t\t[:i | self storePointer: i ofObject: theMethod withValue: nilObj].\r\tself push: theMethod! !\r\r!Interpreter methodsFor: 'compiled methods' stamp: 'di 7/19/2004 14:59'!\rtempCountOf: methodPointer\r\t^ ((self headerOf: methodPointer) >> 19) bitAnd: 16r3F! !\r\r!Interpreter methodsFor: 'contexts' stamp: 'di 6/14/2004 14:05'!\rfetchContextRegisters: activeCntx \r\t\"Note: internalFetchContextRegisters: should track changes  to this method.\"\r\t| tmp |\r\tself inline: true.\r\ttmp _ self fetchPointer: MethodIndex ofObject: activeCntx.\r\t(self isIntegerObject: tmp)\r\t\tifTrue: [\"if the MethodIndex field is an integer, activeCntx is a block context\"\r\t\t\ttmp _ self fetchPointer: HomeIndex ofObject: activeCntx.\r\t\t\ttmp < youngStart ifTrue: [self beRootIfOld: tmp]]\r\t\tifFalse: [\"otherwise, it is a method context and is its own home context \"\r\t\t\ttmp _ activeCntx].\r\ttheHomeContext _ tmp.\r\treceiver _ self fetchPointer: ReceiverIndex ofObject: tmp.\r\tmethod _ self fetchPointer: MethodIndex ofObject: tmp.\r\r\t\"the instruction pointer is a pointer variable equal to \r\tmethod oop + ip + BaseHeaderSize \r\t-1 for 0-based addressing of fetchByte \r\t-1 because it gets incremented BEFORE fetching currentByte \"\r\ttmp _ self quickFetchInteger: InstructionPointerIndex ofObject: activeCntx.\r\tinstructionPointer _ method + tmp + BaseHeaderSize - 2.\r\r\t\"the stack pointer is a pointer variable also...\"\r\ttmp _ self quickFetchInteger: StackPointerIndex ofObject: activeCntx.\r\tstackPointer _ activeCntx + BaseHeaderSize + (TempFrameStart + tmp - 1 * BytesPerWord)! !\r\r!Interpreter methodsFor: 'contexts' stamp: 'di 6/23/2004 12:33'!\rinternalFetchContextRegisters: activeCntx\r\t\"Inlined into return bytecodes. The only difference between this method and fetchContextRegisters: is that this method sets the local IP and SP.\"\r\r\t| tmp |\r\tself inline: true.\r\ttmp _ self fetchPointer: MethodIndex ofObject: activeCntx.\r\t(self isIntegerObject: tmp) ifTrue: [\r\t\t\"if the MethodIndex field is an integer, activeCntx is a block context\"\r\t\ttmp _ self fetchPointer: HomeIndex ofObject: activeCntx.\r\t\t(tmp < youngStart) ifTrue: [ self beRootIfOld: tmp ].\r\t] ifFalse: [\r\t\t\"otherwise, it is a method context and is its own home context\"\r\t\ttmp _ activeCntx.\r\t].\r\tlocalHomeContext _ tmp.\r\treceiver _ self fetchPointer: ReceiverIndex ofObject: tmp.\r\tmethod _ self fetchPointer: MethodIndex ofObject: tmp.\r\r\t\"the instruction pointer is a pointer variable equal to\r\t\tmethod oop + ip + BaseHeaderSize\r\t\t  -1 for 0-based addressing of fetchByte\r\t\t  -1 because it gets incremented BEFORE fetching currentByte\"\r\ttmp _ self quickFetchInteger: InstructionPointerIndex ofObject: activeCntx.\r\tlocalIP _ self pointerForOop: method + tmp + BaseHeaderSize - 2.\r\r\t\"the stack pointer is a pointer variable also...\"\r\ttmp _ self quickFetchInteger: StackPointerIndex ofObject: activeCntx.\r\tlocalSP _ self pointerForOop: activeCntx + BaseHeaderSize + ((TempFrameStart + tmp - 1) * BytesPerWord)! !\r\r!Interpreter methodsFor: 'contexts' stamp: 'di 6/14/2004 16:32'!\rinternalPop: nItems\r\r\tlocalSP _ localSP - (nItems * BytesPerWord).! !\r\r!Interpreter methodsFor: 'contexts' stamp: 'di 6/23/2004 13:40'!\rinternalPop: nItems thenPush: oop\r\r\tself longAtPointer: (localSP _ localSP - ((nItems - 1) * BytesPerWord)) put: oop.\r! !\r\r!Interpreter methodsFor: 'contexts' stamp: 'di 6/23/2004 13:40'!\rinternalPush: object\r\r\tself longAtPointer: (localSP _ localSP + BytesPerWord) put: object.! !\r\r!Interpreter methodsFor: 'contexts' stamp: 'ikp 6/10/2004 11:16'!\rinternalStackTop\r\r\t^ self longAtPointer: localSP! !\r\r!Interpreter methodsFor: 'contexts' stamp: 'di 6/23/2004 13:40'!\rinternalStackValue: offset\r\r\t^ self longAtPointer: localSP - (offset * BytesPerWord)! !\r\r!Interpreter methodsFor: 'contexts' stamp: 'di 7/4/2004 08:56'!\rinternalStoreContextRegisters: activeCntx\r\t\"The only difference between this method and fetchContextRegisters: is that this method stores from the local IP and SP.\"\r\r\t\"InstructionPointer is a pointer variable equal to\r\tmethod oop + ip + BaseHeaderSize\r\t\t-1 for 0-based addressing of fetchByte\r\t\t-1 because it gets incremented BEFORE fetching currentByte\"\r\r\tself inline: true.\r\tself storePointer: InstructionPointerIndex ofObject: activeCntx\r\t\twithValue: (self integerObjectOf: \r\t\t\t((self oopForPointer: localIP) + 2 - (method + BaseHeaderSize))).\r\tself storePointer: StackPointerIndex\t\t  ofObject: activeCntx\r\t\twithValue: (self integerObjectOf:\r\t\t\t((((self oopForPointer: localSP) - (activeCntx + BaseHeaderSize)) >> ShiftForWord) - TempFrameStart + 1)).\r! !\r\r!Interpreter methodsFor: 'contexts' stamp: 'di 6/14/2004 16:33'!\rpop: nItems\r\t\"Note: May be called by translated primitive code.\"\r\r\tstackPointer _ stackPointer - (nItems*BytesPerWord).! !\r\r!Interpreter methodsFor: 'contexts' stamp: 'di 6/14/2004 16:33'!\rpop: nItems thenPush: oop\r\r\t| sp |\r\tself longAt: (sp _ stackPointer - ((nItems - 1) * BytesPerWord)) put: oop.\r\tstackPointer _ sp.\r! !\r\r!Interpreter methodsFor: 'contexts' stamp: 'di 6/14/2004 16:34'!\rpopStack\r\r\t| top |\r\ttop _ self longAt: stackPointer.\r\tstackPointer _ stackPointer - BytesPerWord.\r\t^ top! !\r\r!Interpreter methodsFor: 'contexts' stamp: 'di 6/14/2004 16:34'!\rpush: object\r\r\t| sp |\r\tself longAt: (sp _ stackPointer + BytesPerWord) put: object.\r\tstackPointer _ sp.! !\r\r!Interpreter methodsFor: 'contexts' stamp: 'di 6/14/2004 16:34'!\rstackFloatValue: offset\r\t\"Note: May be called by translated primitive code.\"\r\t| result floatPointer |\r\tself returnTypeC: 'double'.\r\tself var: #result declareC: 'double result'.\r\tfloatPointer _ self longAt: stackPointer - (offset*BytesPerWord).\r\t(self fetchClassOf: floatPointer) = (self splObj: ClassFloat) \r\t\tifFalse:[self primitiveFail. ^0.0].\r\tself cCode: '' inSmalltalk: [result _ Float new: 2].\r\tself fetchFloatAt: floatPointer + BaseHeaderSize into: result.\r\t^ result! !\r\r!Interpreter methodsFor: 'contexts' stamp: 'di 6/14/2004 16:34'!\rstackIntegerValue: offset\r\t| integerPointer |\r\tintegerPointer _ self longAt: stackPointer - (offset*BytesPerWord).\r\t^self checkedIntegerValueOf: integerPointer! !\r\r!Interpreter methodsFor: 'contexts' stamp: 'di 6/14/2004 16:34'!\rstackObjectValue: offset\r\t\"Ensures that the given object is a real object, not a SmallInteger.\"\r\r\t| oop |\r\toop _ self longAt: stackPointer - (offset * BytesPerWord).\r\t(self isIntegerObject: oop) ifTrue: [self primitiveFail. ^ nil].\r\t^ oop\r! !\r\r!Interpreter methodsFor: 'contexts' stamp: 'di 6/14/2004 14:14'!\rstackPointerIndex\r\t\"Return the 0-based index rel to the current context.\r\t(This is what stackPointer used to be before conversion to pointer\"\r\t^ (stackPointer - activeContext - BaseHeaderSize) >> ShiftForWord! !\r\r!Interpreter methodsFor: 'contexts' stamp: 'di 6/14/2004 16:35'!\rstackValue: offset\r\t^ self longAt: stackPointer - (offset*BytesPerWord)! !\r\r!Interpreter methodsFor: 'contexts' stamp: 'di 7/4/2004 08:58'!\rstoreContextRegisters: activeCntx\r\t\"Note: internalStoreContextRegisters: should track changes to this method.\"\r\r\t\"InstructionPointer is a pointer variable equal to\r\tmethod oop + ip + BaseHeaderSize\r\t\t-1 for 0-based addressing of fetchByte\r\t\t-1 because it gets incremented BEFORE fetching currentByte\"\r\r\tself inline: true.\r\tself storePointer: InstructionPointerIndex ofObject: activeCntx\r\t\twithValue: (self integerObjectOf: (instructionPointer - method - (BaseHeaderSize - 2))).\r\tself storePointer: StackPointerIndex ofObject: activeCntx\r\t\twithValue: (self integerObjectOf: (self stackPointerIndex - TempFrameStart + 1)).\r! !\r\r!Interpreter methodsFor: 'contexts' stamp: 'di 7/4/2004 08:58'!\rstoreInstructionPointerValue: value inContext: contextPointer\r\t\"Assume: value is an integerValue\"\r\r\tself storePointer: InstructionPointerIndex ofObject: contextPointer withValue: (self integerObjectOf: value).! !\r\r!Interpreter methodsFor: 'contexts' stamp: 'di 7/4/2004 08:59'!\rstoreStackPointerValue: value inContext: contextPointer\r\t\"Assume: value is an integerValue\"\r\r\tself storePointer: StackPointerIndex ofObject: contextPointer\r\t\twithValue: (self integerObjectOf: value).! !\r\r!Interpreter methodsFor: 'contexts' stamp: 'di 6/14/2004 16:35'!\runPop: nItems\r\tstackPointer _ stackPointer + (nItems*BytesPerWord)! !\r\r!Interpreter methodsFor: 'array and stream primitive support' stamp: 'ikp 8/4/2004 18:26'!\rcommonVariable: rcvr at: index cacheIndex: atIx \r\t\"This code assumes the reciever has been identified at location atIx in the atCache.\"\r\t| stSize fmt fixedFields result |\r\r\tstSize _ atCache at: atIx+AtCacheSize.\r\t((self cCoerce: index to: 'usqInt ') >= 1\r\t\tand: [(self cCoerce: index to: 'usqInt ') <= (self cCoerce: stSize to: 'usqInt ')])\r\tifTrue:\r\t\t[fmt _ atCache at: atIx+AtCacheFmt.\r\t\tfmt <= 4 ifTrue:\r\t\t\t[fixedFields _ atCache at: atIx+AtCacheFixedFields.\r\t\t\t^ self fetchPointer: index + fixedFields - 1 ofObject: rcvr].\r\t\tfmt < 8 ifTrue:  \"Bitmap\"\r\t\t\t[result _ self fetchLong32: index - 1 ofObject: rcvr.\r\t\t\tresult _ self positive32BitIntegerFor: result.\r\t\t\t^ result].\r\t\tfmt >= 16  \"Note fmt >= 16 is an artificial flag for strings\"\r\t\t\tifTrue: \"String\"\r\t\t\t[^ self characterForAscii: (self fetchByte: index - 1 ofObject: rcvr)]\r\t\t\tifFalse: \"ByteArray\"\r\t\t\t[^ self integerObjectOf: (self fetchByte: index - 1 ofObject: rcvr)]].\r\r\tself primitiveFail! !\r\r!Interpreter methodsFor: 'array and stream primitive support' stamp: 'ikp 8/4/2004 18:27'!\rcommonVariable: rcvr at: index put: value cacheIndex: atIx\r\t\"This code assumes the reciever has been identified at location atIx in the atCache.\"\r\t| stSize fmt fixedFields valToPut |\r\tself inline: true.\r\r\tstSize _ atCache at: atIx+AtCacheSize.\r\t((self cCoerce: index to: 'usqInt ') >= 1\r\t\tand: [(self cCoerce: index to: 'usqInt ') <= (self cCoerce: stSize to: 'usqInt ')])\r\tifTrue:\r\t\t[fmt _ atCache at: atIx+AtCacheFmt.\r\t\tfmt <= 4 ifTrue:\r\t\t\t[fixedFields _ atCache at: atIx+AtCacheFixedFields.\r\t\t\t^ self storePointer: index + fixedFields - 1 ofObject: rcvr withValue: value].\r\t\tfmt < 8 ifTrue:  \"Bitmap\"\r\t\t\t[valToPut _ self positive32BitValueOf: value.\r\t\t\tsuccessFlag ifTrue: [self storeLong32: index - 1 ofObject: rcvr withValue: valToPut].\r\t\t\t^ nil].\r\t\tfmt >= 16  \"Note fmt >= 16 is an artificial flag for strings\"\r\t\t\tifTrue: [valToPut _ self asciiOfCharacter: value.\r\t\t\t\t\tsuccessFlag ifFalse: [^ nil]]\r\t\t\tifFalse: [valToPut _ value].\r\t\t(self isIntegerObject: valToPut) ifTrue:\r\t\t\t[valToPut _ self integerValueOf: valToPut.\r\t\t\t((valToPut >= 0) and: [valToPut <= 255]) ifFalse: [^ self primitiveFail].\r\t\t\t^ self storeByte: index - 1 ofObject: rcvr withValue: valToPut]].\r\r\tself primitiveFail! !\r\r!Interpreter methodsFor: 'array and stream primitive support' stamp: 'ikp 8/4/2004 18:27'!\rcommonVariableInternal: rcvr at: index cacheIndex: atIx \r\t\"This code assumes the reciever has been identified at location atIx in the atCache.\"\r\t| stSize fmt fixedFields result |\r\tself inline: true.\r\r\tstSize _ atCache at: atIx+AtCacheSize.\r\t((self cCoerce: index to: 'usqInt ') >= 1\r\t\tand: [(self cCoerce: index to: 'usqInt ') <= (self cCoerce: stSize to: 'usqInt ')])\r\tifTrue:\r\t\t[fmt _ atCache at: atIx+AtCacheFmt.\r\t\tfmt <= 4 ifTrue:\r\t\t\t[fixedFields _ atCache at: atIx+AtCacheFixedFields.\r\t\t\t^ self fetchPointer: index + fixedFields - 1 ofObject: rcvr].\r\t\tfmt < 8 ifTrue:  \"Bitmap\"\r\t\t\t[result _ self fetchLong32: index - 1 ofObject: rcvr.\r\t\t\tself externalizeIPandSP.\r\t\t\tresult _ self positive32BitIntegerFor: result.\r\t\t\tself internalizeIPandSP.\r\t\t\t^ result].\r\t\tfmt >= 16  \"Note fmt >= 16 is an artificial flag for strings\"\r\t\t\tifTrue: \"String\"\r\t\t\t[^ self characterForAscii: (self fetchByte: index - 1 ofObject: rcvr)]\r\t\t\tifFalse: \"ByteArray\"\r\t\t\t[^ self integerObjectOf: (self fetchByte: index - 1 ofObject: rcvr)]].\r\r\tself primitiveFail! !\r\r!Interpreter methodsFor: 'array and stream primitive support' stamp: 'di 7/4/2004 11:28'!\rlengthOf: oop baseHeader: hdr format: fmt\r\t\"Return the number of indexable bytes or words in the given object. Assume the given oop is not an integer. For a CompiledMethod, the size of the method header (in bytes) should be subtracted from the result of this method.\"\r\r\t| sz |\r\tself inline: true.\r\t(hdr bitAnd: TypeMask) = HeaderTypeSizeAndClass\r\t\tifTrue: [ sz _ (self sizeHeader: oop) bitAnd: LongSizeMask ]\r\t\tifFalse: [ sz _ (hdr bitAnd: SizeMask)].\r\tsz _ sz - (hdr bitAnd: Size4Bit).\r\tfmt <= 4\r\t\tifTrue: [ ^ (sz - BaseHeaderSize) >> ShiftForWord \"words\"].\r\tfmt < 8\r\t\tifTrue: [ ^ (sz - BaseHeaderSize) >> 2 \"32-bit longs\"]\r\t\tifFalse: [ ^ (sz - BaseHeaderSize) - (fmt bitAnd: 3) \"bytes\"]! !\r\r!Interpreter methodsFor: 'array and stream primitive support' stamp: 'ikp 8/4/2004 18:28'!\rstObject: array at: index\r\t\"Return what ST would return for <obj> at: index.\"\r\r\t| hdr fmt totalLength fixedFields stSize |\r\tself inline: false.\r\thdr _ self baseHeader: array.\r\tfmt _ (hdr >> 8) bitAnd: 16rF.\r\ttotalLength _ self lengthOf: array baseHeader: hdr format: fmt.\r\tfixedFields _ self fixedFieldsOf: array format: fmt length: totalLength.\r\t(fmt = 3 and: [self isContextHeader: hdr])\r\t\tifTrue: [stSize _ self fetchStackPointerOf: array]\r\t\tifFalse: [stSize _ totalLength - fixedFields].\r\t((self cCoerce: index to: 'usqInt ') >= 1\r\t\tand: [(self cCoerce: index to: 'usqInt ') <= (self cCoerce: stSize to: 'usqInt ')])\r\t\tifTrue: [^ self subscript: array with: (index + fixedFields) format: fmt]\r\t\tifFalse: [successFlag _ false.  ^ 0].! !\r\r!Interpreter methodsFor: 'array and stream primitive support' stamp: 'ikp 8/4/2004 18:28'!\rstObject: array at: index put: value\r\t\"Do what ST would return for <obj> at: index put: value.\"\r\t| hdr fmt totalLength fixedFields stSize |\r\tself inline: false.\r\thdr _ self baseHeader: array.\r\tfmt _ (hdr >> 8) bitAnd: 16rF.\r\ttotalLength _ self lengthOf: array baseHeader: hdr format: fmt.\r\tfixedFields _ self fixedFieldsOf: array format: fmt length: totalLength.\r\t(fmt = 3 and: [self isContextHeader: hdr])\r\t\tifTrue: [stSize _ self fetchStackPointerOf: array]\r\t\tifFalse: [stSize _ totalLength - fixedFields].\r\t((self cCoerce: index to: 'usqInt ') >= 1\r\t\tand: [(self cCoerce: index to: 'usqInt ') <= (self cCoerce: stSize to: 'usqInt ')])\r\t\tifTrue: [self subscript: array with: (index + fixedFields) storing: value format: fmt]\r\t\tifFalse: [successFlag _ false]! !\r\r!Interpreter methodsFor: 'array and stream primitive support' stamp: 'di 7/4/2004 08:43'!\rsubscript: array with: index format: fmt\r\t\"Note: This method assumes that the index is within bounds!!\"\r\r\tself inline: true.\r\tfmt <= 4 ifTrue: [  \"pointer type objects\"\r\t\t^ self fetchPointer: index - 1 ofObject: array].\r\tfmt < 8 ifTrue: [  \"long-word type objects\"\r\t\t^ self positive32BitIntegerFor:\r\t\t\t(self fetchLong32: index - 1 ofObject: array)\r\t] ifFalse: [  \"byte-type objects\"\r\t\t^ self integerObjectOf:\r\t\t\t(self fetchByte: index - 1 ofObject: array)\r\t].! !\r\r!Interpreter methodsFor: 'array and stream primitive support' stamp: 'di 7/4/2004 09:00'!\rsubscript: array with: index storing: oopToStore format: fmt \r\t\"Note: This method assumes that the index is within bounds!!\"\r\t| valueToStore |\r\tself inline: true.\r\tfmt <= 4\r\t\tifTrue: [\"pointer type objects\"\r\t\t\tself storePointer: index - 1 ofObject: array\r\t\t\t\twithValue: oopToStore]\r\t\tifFalse: [fmt < 8\r\t\t\t\tifTrue: [\"long-word type objects\"\r\t\t\t\t\tvalueToStore _ self positive32BitValueOf: oopToStore.\r\t\t\t\t\tsuccessFlag\r\t\t\t\t\t\tifTrue: [self storeLong32: index - 1 ofObject: array\r\t\t\t\t\t\t\t\t\twithValue: valueToStore]]\r\t\t\t\tifFalse: [\"byte-type objects\"\r\t\t\t\t\t(self isIntegerObject: oopToStore)\r\t\t\t\t\t\tifFalse: [successFlag _ false].\r\t\t\t\t\tvalueToStore _ self integerValueOf: oopToStore.\r\t\t\t\t\t(valueToStore >= 0\r\t\t\t\t\t\t\tand: [valueToStore <= 255])\r\t\t\t\t\t\tifFalse: [successFlag _ false].\r\t\t\t\t\tsuccessFlag\r\t\t\t\t\t\tifTrue: [self\r\t\t\t\t\t\t\t\tstoreByte: index - 1\r\t\t\t\t\t\t\t\tofObject: array\r\t\t\t\t\t\t\t\twithValue: valueToStore]]]! !\r\r!Interpreter methodsFor: 'object format' stamp: 'di 6/14/2004 16:37'!\rbyteSizeOf: oop\r\t| slots |\rself flag: #Dan.\r\t(self isIntegerObject: oop) ifTrue:[^0].\r\tslots _ self slotSizeOf: oop.\r\t(self isBytesNonInt: oop)\r\t\tifTrue:[^slots]\r\t\tifFalse:[^slots * 4]! !\r\r!Interpreter methodsFor: 'object format' stamp: 'di 7/4/2004 13:33'!\rfloatObjectOf: aFloat\r\t| newFloatObj |\rself flag: #Dan.\r\tself var: #aFloat declareC: 'double aFloat'.\r\tnewFloatObj _ self instantiateSmallClass: (self splObj: ClassFloat) sizeInBytes: 8+BaseHeaderSize fill: 0.\r\tself storeFloatAt: newFloatObj + BaseHeaderSize from: aFloat.\r\t^ newFloatObj.\r! !\r\r!Interpreter methodsFor: 'image save/restore' stamp: 'ikp 8/4/2004 17:28'!\rbyteSwapByteObjectsFrom: startOop to: stopAddr \r\t\"Byte-swap the words of all bytes objects in a range of the \r\timage, including Strings, ByteArrays, and CompiledMethods. \r\tThis returns these objects to their original byte ordering \r\tafter blindly byte-swapping the entire image. For compiled \r\tmethods, byte-swap only their bytecodes part.\"\r\t| oop fmt wordAddr methodHeader |\r\toop _ startOop.\r\t[oop < stopAddr]\r\t\twhileTrue: [(self isFreeObject: oop)\r\t\t\t\tifFalse: [fmt _ self formatOf: oop.\r\t\t\t\t\tfmt >= 8\r\t\t\t\t\t\tifTrue: [\"oop contains bytes\"\r\t\t\t\t\t\t\twordAddr _ oop + BaseHeaderSize.\r\t\t\t\t\t\t\tfmt >= 12\r\t\t\t\t\t\t\t\tifTrue: [\"compiled method; start after methodHeader and literals\"\r\t\t\t\t\t\t\t\t\tmethodHeader _ self longAt: oop + BaseHeaderSize.\r\t\t\t\t\t\t\t\t\twordAddr _ wordAddr + BytesPerWord + ((methodHeader >> 10 bitAnd: 255) * BytesPerWord)].\r\t\t\t\t\t\t\tself reverseBytesFrom: wordAddr to: oop + (self sizeBitsOf: oop)].\r\t\t\t\t\t(fmt = 6 and: [BytesPerWord = 8])\r\t\t\t\t\t\tifTrue: [\"Object contains 32-bit half-words packed into 64-bit machine words.\"\r\t\t\t\t\t\t\twordAddr _ oop + BaseHeaderSize.\r\t\t\t\t\t\t\tself reverseWordsFrom: wordAddr to: oop + (self sizeBitsOf: oop)]].\r\t\t\toop _ self objectAfter: oop]! !\r\r!Interpreter methodsFor: 'image save/restore' stamp: 'ikp 9/22/2004 12:01'!\rbyteSwapped: w\r\t\"Answer the given integer with its bytes in the reverse order.\"\r\r\tBytesPerWord = 4\r\t\tifTrue:\r\t\t\t[^ ((w bitShift: Byte3ShiftNegated) bitAnd: Byte0Mask)\r\t\t\t + ((w bitShift: Byte1ShiftNegated) bitAnd: Byte1Mask)\r\t\t\t + ((w bitShift: Byte1Shift         ) bitAnd: Byte2Mask)\r\t\t\t + ((w bitShift: Byte3Shift         ) bitAnd: Byte3Mask)]\r\t\tifFalse:\r\t\t\t[^ ((w bitShift: Byte7ShiftNegated) bitAnd: Byte0Mask)\r\t\t\t + ((w bitShift: Byte5ShiftNegated) bitAnd: Byte1Mask)\r\t\t\t + ((w bitShift: Byte3ShiftNegated) bitAnd: Byte2Mask)\r\t\t\t + ((w bitShift: Byte1ShiftNegated) bitAnd: Byte3Mask)\r\t\t\t + ((w bitShift: Byte1Shift         ) bitAnd: Byte4Mask)\r\t\t\t + ((w bitShift: Byte3Shift         ) bitAnd: Byte5Mask)\r\t\t\t + ((w bitShift: Byte5Shift         ) bitAnd: Byte6Mask)\r\t\t\t + ((w bitShift: Byte7Shift         ) bitAnd: Byte7Mask)]! !\r\r!Interpreter methodsFor: 'image save/restore' stamp: 'ikp 8/3/2004 19:49'!\rcheckImageVersionFrom: f startingAt: imageOffset\r\t\"Read and verify the image file version number and return true if the the given image file needs to be byte-swapped. As a side effect, position the file stream just after the version number of the image header. This code prints a warning and does a hard-exit if it cannot find a valid version number.\"\r\t\"This code is based on C code by Ian Piumarta.\"\r\r\t| version firstVersion |\r\tself var: #f declareC: 'sqImageFile f'.\r\tself var: #imageOffset declareC: 'squeakFileOffsetType imageOffset'.\r\r\t\"check the version number\"\r\tself sqImageFile: f Seek: imageOffset.\r\tversion _ firstVersion _ self getLongFromFile: f swap: false.\r\t(self readableFormat: version) ifTrue: [^ false].\r\r\t\"try with bytes reversed\"\r\tself sqImageFile: f Seek: imageOffset.\r\tversion _ self getLongFromFile: f swap: true.\r\t(self readableFormat: version) ifTrue: [^ true].\r\r\t\"Note: The following is only meaningful if not reading an embedded image\"\r\timageOffset = 0 ifTrue:[\r\t\t\"try skipping the first 512 bytes (prepended by certain Mac file transfer utilities)\"\r\t\tself sqImageFile: f Seek: 512.\r\t\tversion _ self getLongFromFile: f swap: false.\r\t\t(self readableFormat: version) ifTrue: [^ false].\r\r\t\t\"try skipping the first 512 bytes with bytes reversed\"\r\t\tself sqImageFile: f Seek: 512.\r\t\tversion _ self getLongFromFile: f swap: true.\r\t\t(self readableFormat: version) ifTrue: [^ true]].\r\r\t\"hard failure; abort\"\r\tself print: 'This interpreter (vers. '.\r\tself printNum: self imageFormatVersion.\r\tself print: ') cannot read image file (vers. '.\r\tself printNum: firstVersion.\r\tself print: ').'.\r\tself cr.\r\tself print: 'Press CR to quit...'.\r\tself getchar.\r\tself ioExit.\r! !\r\r!Interpreter methodsFor: 'image save/restore' stamp: 'ikp 8/4/2004 11:38'!\rgetLongFromFile: aFile swap: swapFlag\r\t\"Answer the next word read from aFile, byte-swapped according to the swapFlag.\"\r\r\t| w |\r\tself var: #aFile declareC: 'sqImageFile aFile'.\r\tw _ 0.\r\tself cCode: 'sqImageFileRead(&w, sizeof(w), 1, aFile)'.\r\tswapFlag\r\t\tifTrue: [^ self byteSwapped: w]\r\t\tifFalse: [^ w].\r! !\r\r!Interpreter methodsFor: 'image save/restore' stamp: 'ikp 9/2/2004 15:38'!\rimageFormatVersion\r\t\"Return a magic constant that changes when the image format changes. Since the image reading code uses this to detect byte ordering, one must avoid version numbers that are invariant under byte reversal.\"\r\r\tBytesPerWord == 4\r\t\tifTrue: [^6502]\r\t\tifFalse: [^68000]! !\r\r!Interpreter methodsFor: 'image save/restore' stamp: 'ikp 8/4/2004 11:37'!\rputLong: aWord toFile: aFile\r\t\"Append aWord to aFile in this platforms 'natural' byte order.  (Bytes will be swapped, if\r\tnecessary, when the image is read on a different platform.) Set successFlag to false if\r\tthe write fails.\"\r\r\t| objectsWritten |\r\tself var: #aFile declareC: 'sqImageFile aFile'.\r\r\tobjectsWritten _ self cCode: 'sqImageFileWrite(&aWord, sizeof(aWord), 1, aFile)'.\r\tself success: objectsWritten = 1.\r! !\r\r!Interpreter methodsFor: 'image save/restore' stamp: 'ikp 3/26/2005 14:05'!\rreadImageFromFile: f HeapSize: desiredHeapSize StartingAt: imageOffset\r\t\"Read an image from the given file stream, allocating the given amount of memory to its object heap. Fail if the image has an unknown format or requires more than the given amount of memory.\"\r\t\"Details: This method detects when the image was stored on a machine with the opposite byte ordering from this machine and swaps the bytes automatically. Furthermore, it allows the header information to start 512 bytes into the file, since some file transfer programs for the Macintosh apparently prepend a Mac-specific header of this size. Note that this same 512 bytes of prefix area could also be used to store an exec command on Unix systems, allowing one to launch Smalltalk by invoking the image name as a command.\"\r\t\"This code is based on C code by Ian Piumarta and Smalltalk code by Tim Rowledge. Many thanks to both of you!!!!\"\r\r\t| swapBytes headerStart headerSize dataSize oldBaseAddr minimumMemory memStart bytesRead bytesToShift heapSize |\r\tself var: #f declareC: 'sqImageFile f'.\r\tself var: #headerStart declareC: 'squeakFileOffsetType headerStart'.\r\tself var: #dataSize declareC: 'size_t dataSize'.\r\tself var: #imageOffset declareC: 'squeakFileOffsetType imageOffset'.\r\r\tswapBytes _ self checkImageVersionFrom: f startingAt: imageOffset.\r\theaderStart _ (self sqImageFilePosition: f) - BytesPerWord.  \"record header start position\"\r\r\theaderSize\t\t\t_ self getLongFromFile: f swap: swapBytes.\r\tdataSize\t\t\t\t_ self getLongFromFile: f swap: swapBytes.\r\toldBaseAddr\t\t\t_ self getLongFromFile: f swap: swapBytes.\r\tspecialObjectsOop\t_ self getLongFromFile: f swap: swapBytes.\r\tlastHash\t\t\t_ self getLongFromFile: f swap: swapBytes.\r\tsavedWindowSize\t_ self getLongFromFile: f swap: swapBytes.\r\tfullScreenFlag\t\t_ self getLongFromFile: f swap: swapBytes.\r\textraVMMemory\t\t_ self getLongFromFile: f swap: swapBytes.\r\r\tlastHash = 0 ifTrue: [\r\t\t\"lastHash wasn't stored (e.g. by the cloner); use 999 as the seed\"\r\t\tlastHash _ 999].\r\r\t\"decrease Squeak object heap to leave extra memory for the VM\"\r\theapSize _ self cCode: 'reserveExtraCHeapBytes(desiredHeapSize, extraVMMemory)'.\r\r\t\"compare memory requirements with availability\".\r\tminimumMemory _ dataSize + 100000.  \"need at least 100K of breathing room\"\r\theapSize < minimumMemory ifTrue: [\r\t\tself insufficientMemorySpecifiedError].\r\r\t\"allocate a contiguous block of memory for the Squeak heap\"\r\tmemory _ self cCode: 'sqAllocateMemory(minimumMemory, heapSize)'.\r\tmemory = nil ifTrue: [self insufficientMemoryAvailableError].\r\r\tmemStart _ self startOfMemory.\r\tmemoryLimit _ (memStart + heapSize) - 24.  \"decrease memoryLimit a tad for safety\"\r\tendOfMemory _ memStart + dataSize.\r\r\t\"position file after the header\"\r\tself sqImageFile: f Seek: headerStart + headerSize.\r\r\t\"read in the image in bulk, then swap the bytes if necessary\"\r\tbytesRead _ self cCode: 'sqImageFileRead(pointerForOop(memory), sizeof(unsigned char), dataSize, f)'.\r\tbytesRead ~= dataSize ifTrue: [self unableToReadImageError].\r\r\theaderTypeBytes at: 0 put: BytesPerWord * 2.\t\t\"3-word header (type 0)\"\t\r\theaderTypeBytes at: 1 put: BytesPerWord.\t\t\"2-word header (type 1)\"\r\theaderTypeBytes at: 2 put: 0.\t\t\t\t\t\"free chunk (type 2)\u0010\"\t\r\theaderTypeBytes at: 3 put: 0.\t\t\t\t\t\"1-word header (type 3)\"\r\r\tswapBytes ifTrue: [self reverseBytesInImage].\r\r\t\"compute difference between old and new memory base addresses\"\r\tbytesToShift _ memStart - oldBaseAddr.\r\tself initializeInterpreter: bytesToShift.  \"adjusts all oops to new location\"\r\t^ dataSize\r! !\r\r!Interpreter methodsFor: 'image save/restore' stamp: 'di 8/3/2004 14:26'!\rreverseBytesFrom: startAddr to: stopAddr\r\t\"Byte-swap the given range of memory (not inclusive of stopAddr!!).\"\r\t| addr |\r\tself flag: #Dan.\r\taddr _ startAddr.\r\t[addr < stopAddr] whileTrue:\r\t\t[self longAt: addr put: (self byteSwapped: (self longAt: addr)).\r\t\taddr _ addr + BytesPerWord].! !\r\r!Interpreter methodsFor: 'image save/restore' stamp: 'ikp 8/4/2004 17:24'!\rreverseWordsFrom: startAddr to: stopAddr\r\t\"Word-swap the given range of memory, excluding stopAddr.\"\r\r\t| addr |\r\taddr _ startAddr.\r\t[addr < stopAddr] whileTrue:\r\t\t[self longAt: addr put: (self wordSwapped: (self longAt: addr)).\r\t\taddr _ addr + BytesPerWord].! !\r\r!Interpreter methodsFor: 'image save/restore' stamp: 'ikp 8/3/2004 18:24'!\rsnapshot: embedded \r\t\"update state of active context\"\r\t| activeProc dataSize rcvr setMacType |\r\tself var: #setMacType type: 'void *'.\r\tcompilerInitialized\r\t\tifTrue: [self compilerPreSnapshot]\r\t\tifFalse: [self storeContextRegisters: activeContext].\r\r\t\"update state of active process\"\r\tactiveProc _ self fetchPointer: ActiveProcessIndex ofObject: self schedulerPointer.\r\tself\r\t\tstorePointer: SuspendedContextIndex\r\t\tofObject: activeProc\r\t\twithValue: activeContext.\r\r\t\"compact memory and compute the size of the memory actually in use\"\r\tself incrementalGC.\r\r\t\"maximimize space for forwarding table\"\r\tself fullGC.\r\tself snapshotCleanUp.\r\r\tdataSize _ freeBlock - self startOfMemory. \"Assume all objects are below the start of the free block\"\r\tsuccessFlag\r\t\tifTrue: [rcvr _ self popStack.\r\t\t\t\"pop rcvr\"\r\t\t\tself push: trueObj.\r\t\t\tself writeImageFile: dataSize.\r\t\t\tembedded\r\t\t\t\tifFalse: [\"set Mac file type and creator; this is a noop on other platforms\"\r\t\t\t\t\tsetMacType _ self ioLoadFunction: 'setMacFileTypeAndCreator' From: 'FilePlugin'.\r\t\t\t\t\tsetMacType = 0\r\t\t\t\t\t\tifFalse: [self cCode: '((sqInt (*)(char *, char *, char *))setMacType)(imageName, \"STim\", \"FAST\")']].\r\t\t\tself pop: 1].\r\r\t\"activeContext was unmarked in #snapshotCleanUp, mark it old \"\r\tself beRootIfOld: activeContext.\r\tsuccessFlag\r\t\tifTrue: [self push: falseObj]\r\t\tifFalse: [self push: rcvr].\r\tcompilerInitialized\r\t\tifTrue: [self compilerPostSnapshot]! !\r\r!Interpreter methodsFor: 'image save/restore' stamp: 'di 6/14/2004 17:44'!\rsnapshotCleanUp\r\t\"Clean up right before saving an image, sweeping memory and:\r\t* nilling out all fields of contexts above the stack pointer. \r\t* flushing external primitives \r\t* clearing the root bit of any object in the root table \"\r\t| oop header fmt sz |\r\toop _ self firstObject.\r\t[oop < endOfMemory]\r\t\twhileTrue: [(self isFreeObject: oop)\r\t\t\t\tifFalse: [header _ self longAt: oop.\r\t\t\t\t\tfmt _ header >> 8 bitAnd: 15.\r\t\t\t\t\t\"Clean out context\"\r\t\t\t\t\t(fmt = 3 and: [self isContextHeader: header])\r\t\t\t\t\t\tifTrue: [sz _ self sizeBitsOf: oop.\r\t\t\t\t\t\t\t(self lastPointerOf: oop) + BytesPerWord\r\t\t\t\t\t\t\t\tto: sz - BaseHeaderSize by: BytesPerWord\r\t\t\t\t\t\t\t\tdo: [:i | self longAt: oop + i put: nilObj]].\r\t\t\t\t\t\"Clean out external functions\"\r\t\t\t\t\tfmt >= 12\r\t\t\t\t\t\tifTrue: [\"This is a compiled method\"\r\t\t\t\t\t\t\t(self primitiveIndexOf: oop) = PrimitiveExternalCallIndex\r\t\t\t\t\t\t\t\tifTrue: [\"It's primitiveExternalCall\"\r\t\t\t\t\t\t\t\t\tself flushExternalPrimitiveOf: oop]]].\r\t\t\toop _ self objectAfter: oop].\r\tself clearRootsTable! !\r\r!Interpreter methodsFor: 'image save/restore' stamp: 'ikp 9/22/2004 12:05'!\rwordSwapped: w\r\t\"Return the given 64-bit integer with its halves in the reverse order.\"\r\r\tBytesPerWord = 8 ifFalse: [self error: 'This cannot happen.'].\r\t^   ((w bitShift: Byte4ShiftNegated) bitAnd: Bytes3to0Mask)\r\t  + ((w bitShift: Byte4Shift         ) bitAnd: Bytes7to4Mask)\r! !\r\r!Interpreter methodsFor: 'image save/restore' stamp: 'ikp 6/10/2004 12:10'!\rwriteImageFile: imageBytes\r\r\t| fn |\r\tself var: #fn declareC: 'void *fn'.\r\tself writeImageFileIO: imageBytes.\r\t\"set Mac file type and creator; this is a noop on other platforms\"\r\tfn _ self ioLoadFunction: 'setMacFileTypeAndCreator' From: 'FilePlugin'.\r\tfn = 0 ifFalse:[\r\t\tself cCode:'((sqInt (*)(char*, char*, char*))fn)(imageName, \"STim\", \"FAST\")'.\r\t].\r! !\r\r!Interpreter methodsFor: 'image save/restore' stamp: 'ikp 3/26/2005 16:41'!\rwriteImageFileIO: imageBytes\r\r\t| headerStart headerSize f bytesWritten sCWIfn okToWrite |\r\tself var: #f declareC: 'sqImageFile f'.\r\tself var: #headerStart declareC: 'squeakFileOffsetType headerStart'.\r\tself var: #sCWIfn declareC: 'void *sCWIfn'.\r\r\t\"If the security plugin can be loaded, use it to check for write permission.\r\tIf not, assume it's ok\"\r\tsCWIfn _ self ioLoadFunction: 'secCanWriteImage' From: 'SecurityPlugin'.\r\tsCWIfn ~= 0 ifTrue:[okToWrite _ self cCode: '((sqInt (*)(void))sCWIfn)()'.\r\t\tokToWrite ifFalse:[^self primitiveFail]].\r\t\r\t\"local constants\"\r\theaderStart _ 0.  \r\theaderSize _ 64.  \"header size in bytes; do not change!!\"\r\r\tf _ self cCode: 'sqImageFileOpen(imageName, \"wb\")'.\r\tf = nil ifTrue: [\r\t\t\"could not open the image file for writing\"\r\t\tself success: false.\r\t\t^ nil].\r\r\theaderStart _ self cCode: 'sqImageFileStartLocation(f,imageName,headerSize+imageBytes)'.\r\tself cCode: '/* Note: on Unix systems one could put an exec command here, padded to 512 bytes */'.\r\t\"position file to start of header\"\r\tself sqImageFile: f Seek: headerStart.\r\r\tself putLong: (self imageFormatVersion) toFile: f.\r\tself putLong: headerSize toFile: f.\r\tself putLong: imageBytes toFile: f.\r\tself putLong: (self startOfMemory) toFile: f.\r\tself putLong: specialObjectsOop toFile: f.\r\tself putLong: lastHash toFile: f.\r\tself putLong: (self ioScreenSize) toFile: f.\r\tself putLong: fullScreenFlag toFile: f.\r\tself putLong: extraVMMemory toFile: f.\r\t1 to: 7 do: [:i | self putLong: 0 toFile: f].  \"fill remaining header words with zeros\"\r\tsuccessFlag ifFalse: [\r\t\t\"file write or seek failure\"\r\t\tself cCode: 'sqImageFileClose(f)'.\r\t\t^ nil].\r\r\t\"position file after the header\"\r\tself sqImageFile: f Seek: headerStart + headerSize.\r\r\t\"write the image data\"\r\tbytesWritten _ self cCode: 'sqImageFileWrite(pointerForOop(memory), sizeof(unsigned char), imageBytes, f)'.\r\tself success: bytesWritten = imageBytes.\r\tself cCode: 'sqImageFileClose(f)'.\r\r! !\r\r!Interpreter methodsFor: 'I/O primitive support' stamp: 'di 7/7/2004 16:34'!\rreverseDisplayFrom: startIndex to: endIndex \r\t\"Reverse the given range of Display words (at different bit \r\tdepths, this will reverse different numbers of pixels). Used to \r\tgive feedback during VM activities such as garbage \r\tcollection when debugging. It is assumed that the given \r\tword range falls entirely within the first line of the Display.\"\r\t| displayObj dispBitsPtr w reversed |\r\tdisplayObj _ self splObj: TheDisplay.\r\t((self isPointers: displayObj) and: [(self lengthOf: displayObj) >= 4]) ifFalse: [^ nil].\r\tw _ self fetchInteger: 1 ofObject: displayObj.\r\tdispBitsPtr _ self fetchPointer: 0 ofObject: displayObj.\r\t(self isIntegerObject: dispBitsPtr) ifTrue: [^ nil].\r\tdispBitsPtr _ dispBitsPtr + BaseHeaderSize.\r\tdispBitsPtr + (startIndex * 4) to: dispBitsPtr + (endIndex * 4) by: 4\r\t\tdo: [:ptr | \r\t\t\treversed _ (self long32At: ptr) bitXor: 4294967295.\r\t\t\tself longAt: ptr put: reversed].\r\tsuccessFlag _ true.\r\tself displayBitsOf: displayObj Left: 0 Top: 0 Right: w Bottom: 1.\r\tself ioForceDisplayUpdate! !\r\r!Interpreter methodsFor: 'image segment in/out' stamp: 'di 8/3/2004 13:27'!\rcopyObj: oop toSegment: segmentWordArray addr: lastSeg stopAt: stopAddr saveOopAt: oopPtr headerAt: hdrPtr\r\t\"Copy this object into the segment beginning at lastSeg.\r\tInstall a forwarding pointer, and save oop and header.\r\tFail if out of space.  Return the next segmentAddr if successful.\"\r\r\t\"Copy the object...\"\r\t| extraSize bodySize hdrAddr |\r\tself flag: #Dan.  \"None of the imageSegment stuff has been updated for 64 bits\"\r\tsuccessFlag ifFalse: [^ lastSeg].\r\textraSize _ self extraHeaderBytes: oop.\r\tbodySize _ self sizeBitsOf: oop.\r\t(lastSeg + extraSize + bodySize) >= stopAddr\r\t\tifTrue: [^ self primitiveFail].\r\tself transfer: extraSize + bodySize // BytesPerWord  \"wordCount\"\r\t\tfrom: oop - extraSize\r\t\tto: lastSeg+BytesPerWord.\r\r\t\"Clear root and mark bits of all headers copied into the segment\"\r\thdrAddr _ lastSeg+BytesPerWord + extraSize.\r\tself longAt: hdrAddr put: ((self longAt: hdrAddr) bitAnd: AllButRootBit - MarkBit).\r\r\tself forward: oop to: (lastSeg+BytesPerWord + extraSize - segmentWordArray)\r\t\tsavingOopAt: oopPtr andHeaderAt: hdrPtr.\r\r\t\"Return new end of segment\"\r\t^ lastSeg + extraSize + bodySize! !\r\r!Interpreter methodsFor: 'image segment in/out' stamp: 'ikp 3/26/2005 21:05'!\roopHasAcceptableClass: signedOop\r\t\"Similar to oopHasOkayClass:, except that it only returns true or false.\"\r\r\t| oopClass formatMask behaviorFormatBits oopFormatBits oop |\r\t(self isIntegerObject: signedOop) ifTrue: [^ true].\r\r\tself var: #oop type: 'usqInt'.\r\tself var: #oopClass type: 'usqInt'.\r\r\toop := self cCoerce: signedOop to: 'usqInt'.\r\r\toop < endOfMemory ifFalse: [^ false].\r\t((oop \\\\ BytesPerWord) = 0) ifFalse: [^ false].\r\t(oop + (self sizeBitsOf: oop)) < endOfMemory ifFalse: [^ false].\r\toopClass := self cCoerce: (self fetchClassOf: oop) to: 'usqInt'.\r\r\t(self isIntegerObject: oopClass) ifTrue: [^ false].\r\t(oopClass < endOfMemory) ifFalse: [^ false].\r\t((oopClass \\\\ BytesPerWord) = 0) ifFalse: [^ false].\r\t(oopClass + (self sizeBitsOf: oopClass)) < endOfMemory ifFalse: [^ false].\r\t((self isPointers: oopClass) and: [(self lengthOf: oopClass) >= 3]) ifFalse: [^ false].\r\t(self isBytes: oop)\r\t\tifTrue: [ formatMask _ 16rC00 ]  \"ignore extra bytes size bits\"\r\t\tifFalse: [ formatMask _ 16rF00 ].\r\r\tbehaviorFormatBits _ (self formatOfClass: oopClass) bitAnd: formatMask.\r\toopFormatBits _ (self baseHeader: oop) bitAnd: formatMask.\r\tbehaviorFormatBits = oopFormatBits ifFalse: [^ false].\r\t^ true! !\r\r!Interpreter methodsFor: 'image segment in/out' stamp: 'di 8/3/2004 13:41'!\rprimitiveFailAfterCleanup: outPointerArray\r\t\"If the storeSegment primitive fails, it must clean up first.\"\r\r\t| i lastAddr |   \"Store nils throughout the outPointer array.\"\r\tlastAddr _ outPointerArray + (self lastPointerOf: outPointerArray).\r\ti _ outPointerArray + BaseHeaderSize.\r\t[i <= lastAddr] whileTrue:\r\t\t[self longAt: i put: nilObj.\r\t\ti _ i + BytesPerWord].\r\r\tDoAssertionChecks ifTrue: [self verifyCleanHeaders].\r\tself primitiveFail! !\r\r!Interpreter methodsFor: 'image segment in/out' stamp: 'di 8/3/2004 13:49'!\rprimitiveLoadImageSegment\r\t\"This primitive is called from Squeak as...\r\t\t<imageSegment> loadSegmentFrom: aWordArray outPointers: anArray.\"\r\r\"This primitive will load a binary image segment created by primitiveStoreImageSegment.  It expects the outPointer array to be of the proper size, and the wordArray to be well formed.  It will return as its value the original array of roots, and the erstwhile segmentWordArray will have been truncated to a size of zero.  If this primitive should fail, the segmentWordArray will, sadly, have been reduced to an unrecognizable and unusable jumble.  But what more could you have done with it anyway?\"\r\r\t| outPointerArray segmentWordArray endSeg segOop fieldPtr fieldOop doingClass lastPtr extraSize mapOop lastOut outPtr hdrTypeBits header data |\r\r\tDoAssertionChecks ifTrue: [self verifyCleanHeaders].\r\toutPointerArray _ self stackTop.\r\tlastOut _ outPointerArray + (self lastPointerOf: outPointerArray).\r\tsegmentWordArray _ self stackValue: 1.\r\tendSeg _ segmentWordArray + (self sizeBitsOf: segmentWordArray) - BaseHeaderSize.\r\r\t\"Essential type checks\"\r\t((self formatOf: outPointerArray) = 2\t\t\t\t\"Must be indexable pointers\"\r\t\tand: [(self formatOf: segmentWordArray) = 6])\t\"Must be indexable words\"\r\t\tifFalse: [^ self primitiveFail].\r\r\t\"Version check.  Byte order of the WordArray now\"\r\tdata _ self longAt: segmentWordArray + BaseHeaderSize.\r\t(self readableFormat: (data bitAnd: 16rFFFF \"low 2 bytes\")) ifFalse: [\r\t\t\"Not readable -- try again with reversed bytes...\"\r\t\tself reverseBytesFrom: segmentWordArray + BaseHeaderSize to: endSeg + BytesPerWord.\r\t\tdata _ self longAt: segmentWordArray + BaseHeaderSize.\r\t\t(self readableFormat: (data bitAnd: 16rFFFF \"low 2 bytes\")) ifFalse: [\r\t\t\t\"Still NG -- put things back and fail\"\r\t\t\tself reverseBytesFrom: segmentWordArray + BaseHeaderSize to: endSeg + BytesPerWord.\r\t\t\tDoAssertionChecks ifTrue: [self verifyCleanHeaders].\r\t\t\t^ self primitiveFail]].\r\t\"Reverse the Byte type objects if the data from opposite endian machine\"\r\t\"Test top byte.  $d on the Mac or $s on the PC.  Rest of word is equal\"\r\tdata = self imageSegmentVersion ifFalse: [\r\t\t\"Reverse the byte-type objects once\"\r\t\tsegOop _ self oopFromChunk: segmentWordArray + BaseHeaderSize + BytesPerWord.\r\t\t\t \"Oop of first embedded object\"\r\t\tself byteSwapByteObjectsFrom: segOop to: endSeg + BytesPerWord].\r\r\t\"Proceed through the segment, remapping pointers...\"\r\tsegOop _ self oopFromChunk: segmentWordArray + BaseHeaderSize + BytesPerWord.\r\t[segOop <= endSeg] whileTrue:\r\t\t[(self headerType: segOop) <= 1\r\t\t\tifTrue: [\"This object has a class field (type = 0 or 1) -- start with that.\"\r\t\t\t\t\tfieldPtr _ segOop - BytesPerWord.  doingClass _ true]\r\t\t\tifFalse: [\"No class field -- start with first data field\"\r\t\t\t\t\tfieldPtr _ segOop + BaseHeaderSize.  doingClass _ false].\r\t\tlastPtr _ segOop + (self lastPointerOf: segOop).\t\"last field\"\r\t\tlastPtr > endSeg ifTrue: [\r\t\t\tDoAssertionChecks ifTrue: [self verifyCleanHeaders].\r\t\t\t^ self primitiveFail \"out of bounds\"].\r\r\t\t\"Go through all oops, remapping them...\"\r\t\t[fieldPtr > lastPtr] whileFalse:\r\t\t\t[\"Examine each pointer field\"\r\t\t\tfieldOop _ self longAt: fieldPtr.\r\t\t\tdoingClass ifTrue:\r\t\t\t\t[hdrTypeBits _ self headerType: fieldPtr.\r\t\t\t\tfieldOop _ fieldOop - hdrTypeBits].\r\t\t\t(self isIntegerObject: fieldOop)\r\t\t\t\tifTrue:\r\t\t\t\t\t[\"Integer -- nothing to do\"\r\t\t\t\t\tfieldPtr _ fieldPtr + BytesPerWord]\r\t\t\t\tifFalse:\r\t\t\t\t\t[(fieldOop bitAnd: 3) = 0 ifFalse: [^ self primitiveFail \"bad oop\"].\r\t\t\t\t\t(fieldOop bitAnd: 16r80000000) = 0\r\t\t\t\t\t\tifTrue: [\"Internal pointer -- add segment offset\"\r\t\t\t\t\t\t\t\tmapOop _ fieldOop + segmentWordArray]\r\t\t\t\t\t\tifFalse: [\"External pointer -- look it up in outPointers\"\r\t\t\t\t\t\t\t\toutPtr _ outPointerArray + (fieldOop bitAnd: 16r7FFFFFFF).\r\t\t\t\t\t\t\t\toutPtr > lastOut ifTrue: [^ self primitiveFail \"out of bounds\"].\r\t\t\t\t\t\t\t\tmapOop _ self longAt: outPtr].\r\t\t\t\t\tdoingClass\r\t\t\t\t\t\tifTrue: [self longAt: fieldPtr put: mapOop + hdrTypeBits.\r\t\t\t\t\t\t\t\tfieldPtr _ fieldPtr + 8.\r\t\t\t\t\t\t\t\tdoingClass _ false]\r\t\t\t\t\t\tifFalse: [self longAt: fieldPtr put: mapOop.\r\t\t\t\t\t\t\t\tfieldPtr _ fieldPtr + BytesPerWord].\r\t\t\t\t\tsegOop < youngStart\r\t\t\t\t\t\tifTrue: [self possibleRootStoreInto: segOop value: mapOop].\r\t\t\t\t\t]].\r\t\tsegOop _ self objectAfter: segOop].\r\r\t\"Again, proceed through the segment checking consistency...\"\r\tsegOop _ self oopFromChunk: segmentWordArray + BaseHeaderSize + BytesPerWord.\r\t[segOop <= endSeg] whileTrue:\r\t\t[(self oopHasAcceptableClass: segOop) ifFalse: [^ self primitiveFail \"inconsistency\"].\r\t\tfieldPtr _ segOop + BaseHeaderSize.\t\t\"first field\"\r\t\tlastPtr _ segOop + (self lastPointerOf: segOop).\t\"last field\"\r\t\t\"Go through all oops, remapping them...\"\r\t\t[fieldPtr > lastPtr] whileFalse:\r\t\t\t[\"Examine each pointer field\"\r\t\t\tfieldOop _ self longAt: fieldPtr.\r\t\t\t(self oopHasAcceptableClass: fieldOop) ifFalse: [^ self primitiveFail \"inconsistency\"].\r\t\t\tfieldPtr _ fieldPtr + BytesPerWord].\r\t\tsegOop _ self objectAfter: segOop].\r\r\t\"Truncate the segment word array to size = BytesPerWord (vers stamp only)\"\r\textraSize _ self extraHeaderBytes: segmentWordArray.\r\thdrTypeBits _ self headerType: segmentWordArray.\r\textraSize = 8\r\t\tifTrue: [self longAt: segmentWordArray-extraSize put: BaseHeaderSize + BytesPerWord + hdrTypeBits]\r\t\tifFalse: [header _ self longAt: segmentWordArray.\r\t\t\t\tself longAt: segmentWordArray\r\t\t\t\t\tput: header - (header bitAnd: SizeMask) + BaseHeaderSize + BytesPerWord].\t\r\t\"and return the roots array which was first in the segment\"\r\tDoAssertionChecks ifTrue: [self verifyCleanHeaders].\r\tself pop: 3 thenPush: (self oopFromChunk: segmentWordArray + BaseHeaderSize + BytesPerWord).\r! !\r\r!Interpreter methodsFor: 'image segment in/out' stamp: 'ikp 8/3/2004 20:01'!\rprimitiveStoreImageSegment\r\t\"This primitive is called from Squeak as...\r\t\t<imageSegment> storeSegmentFor: arrayOfRoots into: aWordArray outPointers: anArray.\"\r\r\"This primitive will store a binary image segment (in the same format as the Squeak image file) of the receiver and every object in its proper tree of subParts (ie, that is not refered to from anywhere else outside the tree).  All pointers from within the tree to objects outside the tree will be copied into the array of outpointers.  In their place in the image segment will be an oop equal to the offset in the outPointer array (the first would be 4). but with the high bit set.\"\r\r\"The primitive expects the array and wordArray to be more than adequately long.  In this case it returns normally, and truncates the two arrays to exactly the right size.  To simplify truncation, both incoming arrays are required to be 256 bytes or more long (ie with 3-word headers).  If either array is too small, the primitive will fail, but in no other case.\r\rDuring operation of the primitive, it is necessary to convert from both internal and external oops to their mapped values.  To make this fast, the headers of the original objects in question are replaced by the mapped values (and this is noted by adding the forbidden XX header type).  Tables are kept of both kinds of oops, as well as of the original headers for restoration.\r\rTo be specific, there are two similar two-part tables, the outpointer array, and one in the upper fifth of the segmentWordArray.  Each grows oops from the bottom up, and preserved headers from halfway up.\r\rIn case of either success or failure, the headers must be restored.  In the event of primitive failure, the table of outpointers must also be nilled out (since the garbage in the high half will not have been discarded.\"\r\r\t| outPointerArray segmentWordArray savedYoungStart lastOut lastIn firstIn lastSeg endSeg segOop fieldPtr fieldOop mapOop doingClass lastPtr extraSize hdrTypeBits arrayOfRoots hdrBaseIn hdrBaseOut header firstOut versionOffset |\r\r\toutPointerArray _ self stackTop.\r\tsegmentWordArray _ self stackValue: 1.\r\tarrayOfRoots _ self stackValue: 2.\r\r\t\"Essential type checks\"\r\t((self formatOf: arrayOfRoots) = 2\t\t\t\t\"Must be indexable pointers\"\r\t\tand: [(self formatOf: outPointerArray) = 2\t\t\t\t\"Must be indexable pointers\"\r\t\tand: [(self formatOf: segmentWordArray) = 6]])\t\"Must be indexable words\"\r\t\tifFalse: [^ self primitiveFail].\r\t((self headerType: outPointerArray) = HeaderTypeSizeAndClass\t\"Must be 3-word header\"\r\t\tand: [(self headerType: segmentWordArray) = HeaderTypeSizeAndClass])\t\"Must be 3-word header\"\r\t\tifFalse: [^ self primitiveFail].\r\r\tDoAssertionChecks ifTrue: [self verifyCleanHeaders].\r\t\"Use the top half of outPointers for saved headers.\"\r\tfirstOut _ outPointerArray + BaseHeaderSize.\r\tlastOut _ firstOut - BytesPerWord.\r\thdrBaseOut _ outPointerArray + ((self lastPointerOf: outPointerArray) // (BytesPerWord*2) * BytesPerWord). \"top half\"\r\r\tlastSeg _ segmentWordArray.\r\tendSeg _ segmentWordArray + (self sizeBitsOf: segmentWordArray) - BytesPerWord.\r\r\t\"Write a version number for byte order and version check\"\r\tversionOffset _ BytesPerWord.\r\tlastSeg _ lastSeg + versionOffset.\r\tlastSeg > endSeg ifTrue: [^ self primitiveFail].\r\tself longAt: lastSeg put: self imageSegmentVersion.\r\r\t\"Allocate top 1/8 of segment for table of internal oops and saved headers\"\r\tfirstIn _ endSeg - ((self sizeBitsOf: segmentWordArray) // (BytesPerWord*8) * BytesPerWord).  \"Take 1/8 of seg\"\r\tlastIn _ firstIn - BytesPerWord.\r\thdrBaseIn _ firstIn + ((self sizeBitsOf: segmentWordArray) // (BytesPerWord*16) * BytesPerWord). \"top half of that\"\r\r\t\"First mark the rootArray and all root objects.\"\r\tself longAt: arrayOfRoots put: ((self longAt: arrayOfRoots) bitOr: MarkBit).\r\tlastPtr _ arrayOfRoots + (self lastPointerOf: arrayOfRoots).\r\tfieldPtr _ arrayOfRoots + BaseHeaderSize.\r\t[fieldPtr <= lastPtr] whileTrue:\r\t\t[fieldOop _ self longAt: fieldPtr.\r\t\t(self isIntegerObject: fieldOop) ifFalse:\r\t\t\t[self longAt: fieldOop put: ((self longAt: fieldOop) bitOr: MarkBit)].\r\t\tfieldPtr _ fieldPtr + BytesPerWord].\r\r\t\"Then do a mark pass over all objects.  This will stop at our marked roots,\r\tthus leaving our segment unmarked in their shadow.\"\r\tsavedYoungStart _ youngStart.\r\tyoungStart _ self startOfMemory.  \"process all of memory\"\r\t\t\"clear the recycled context lists\"\r\t\tfreeContexts _ NilContext.\r\t\tfreeLargeContexts _ NilContext.\r\tself markAndTraceInterpreterOops.\t\"and special objects array\"\r\tyoungStart _ savedYoungStart.\r\t\r\t\"Finally unmark the rootArray and all root objects.\"\r\tself longAt: arrayOfRoots put: ((self longAt: arrayOfRoots) bitAnd: AllButMarkBit).\r\tfieldPtr _ arrayOfRoots + BaseHeaderSize.\r\t[fieldPtr <= lastPtr] whileTrue:\r\t\t[fieldOop _ self longAt: fieldPtr.\r\t\t(self isIntegerObject: fieldOop) ifFalse:\r\t\t\t[self longAt: fieldOop put: ((self longAt: fieldOop) bitAnd: AllButMarkBit)].\r\t\tfieldPtr _ fieldPtr + BytesPerWord].\r\r\t\"All external objects, and only they, are now marked.\r\tCopy the array of roots into the segment, and forward its oop.\"\r\tlastIn _ lastIn + BytesPerWord.\r\tlastIn >= hdrBaseIn ifTrue: [successFlag _ false].\r\tlastSeg _ self copyObj: arrayOfRoots toSegment: segmentWordArray addr: lastSeg stopAt: firstIn saveOopAt: lastIn headerAt: hdrBaseIn + (lastIn - firstIn).\r\tsuccessFlag ifFalse:\r\t\t[lastIn _ lastIn - BytesPerWord.\r\t\tself restoreHeadersFrom: firstIn to: lastIn from: hdrBaseIn and: firstOut to: lastOut from: hdrBaseOut.\r\t\t^ self primitiveFailAfterCleanup: outPointerArray].\r\r\t\"Now run through the segment fixing up all the pointers.\r\tNote that more objects will be added to the segment as we make our way along.\"\r\tsegOop _ self oopFromChunk: segmentWordArray + versionOffset + BaseHeaderSize.\r\t[segOop <= lastSeg] whileTrue:\r\t\t[(self headerType: segOop) <= 1\r\t\t\tifTrue: [\"This object has a class field (type=0 or 1) -- start with that.\"\r\t\t\t\t\tfieldPtr _ segOop - BytesPerWord.  doingClass _ true]\r\t\t\tifFalse: [\"No class field -- start with first data field\"\r\t\t\t\t\tfieldPtr _ segOop + BaseHeaderSize.  doingClass _ false].\r\t\tlastPtr _ segOop + (self lastPointerOf: segOop).\t\"last field\"\r\r\t\t\"Go through all oops, remapping them...\"\r\t\t[fieldPtr > lastPtr] whileFalse:\r\t\t\t[\"Examine each pointer field\"\r\t\t\tfieldOop _ self longAt: fieldPtr.\r\t\t\tdoingClass ifTrue:\r\t\t\t\t[hdrTypeBits _ fieldOop bitAnd: TypeMask.\r\t\t\t\tfieldOop _ fieldOop - hdrTypeBits].\r\t\t\t(self isIntegerObject: fieldOop)\r\t\t\t\tifTrue: [\"Just an integer -- nothing to do\"\r\t\t\t\t\t\tfieldPtr _ fieldPtr + BytesPerWord]\r\t\t\t\tifFalse:\r\t\t\t\t[header _ self longAt: fieldOop.\r\t\t\t\t(header bitAnd: TypeMask) = HeaderTypeFree\r\t\t\t\t\tifTrue: [\"Has already been forwarded -- this is the link\"\r\t\t\t\t\t\t\tmapOop _ header bitAnd: AllButTypeMask]\r\t\t\t\t\tifFalse:\r\t\t\t\t\t[((self longAt: fieldOop) bitAnd: MarkBit) = 0\r\t\t\t\t\t\tifTrue:\r\t\t\t\t\t\t\t[\"Points to an unmarked obj -- an internal pointer.\r\t\t\t\t\t\t\tCopy the object into the segment, and forward its oop.\"\r\t\t\t\t\t\t\tlastIn _ lastIn + BytesPerWord.\r\t\t\t\t\t\t\tlastIn >= hdrBaseIn ifTrue: [successFlag _ false].\r\t\t\t\t\t\t\tlastSeg _ self copyObj: fieldOop toSegment: segmentWordArray addr: lastSeg stopAt: firstIn saveOopAt: lastIn headerAt: hdrBaseIn + (lastIn - firstIn).\r\t\t\t\t\t\t\tsuccessFlag ifFalse:\r\t\t\t\t\t\t\t\t[\"Out of space in segment\"\r\t\t\t\t\t\t\t\tlastIn _ lastIn - BytesPerWord.\r\t\t\t\t\t\t\t\tself restoreHeadersFrom: firstIn to: lastIn from: hdrBaseIn and: firstOut to: lastOut from: hdrBaseOut.\r\t\t\t\t\t\t\t\t^ self primitiveFailAfterCleanup: outPointerArray].\r\t\t\t\t\t\t\tmapOop _ (self longAt: fieldOop) bitAnd: AllButTypeMask]\r\t\t\t\t\t\tifFalse:\r\t\t\t\t\t\t\t[\"Points to a marked obj -- an external pointer.\r\t\t\t\t\t\t\tMap it as a tagged index in outPointers, and forward its oop.\"\r\t\t\t\t\t\t\tlastOut _ lastOut + BytesPerWord.\r\t\t\t\t\t\t\tlastOut >= hdrBaseOut ifTrue:\r\t\t\t\t\t\t\t\t[\"Out of space in outPointerArray\"\r\t\t\t\t\t\t\t\tlastOut _ lastOut - BytesPerWord.\r\t\t\t\t\t\t\t\tself restoreHeadersFrom: firstIn to: lastIn from: hdrBaseIn and: firstOut to: lastOut from: hdrBaseOut.\r\t\t\t\t\t\t\t\t^ self primitiveFailAfterCleanup: outPointerArray].\r.\t\t\t\t\t\t\tmapOop _ lastOut - outPointerArray bitOr: 16r80000000.\r\t\t\t\t\t\t\tself forward: fieldOop to: mapOop\r\t\t\t\t\t\t\t\tsavingOopAt: lastOut andHeaderAt: hdrBaseOut + (lastOut - firstOut)]].\r\t\t\t\t\t\"Replace the oop by its mapped value\"\r\t\t\t\t\tdoingClass\r\t\t\t\t\t\tifTrue: [self longAt: fieldPtr put: mapOop + hdrTypeBits.\r\t\t\t\t\t\t\t\tfieldPtr _ fieldPtr + (BytesPerWord*2).\r\t\t\t\t\t\t\t\tdoingClass _ false]\r\t\t\t\t\t\tifFalse: [self longAt: fieldPtr put: mapOop.\r\t\t\t\t\t\t\t\tfieldPtr _ fieldPtr + BytesPerWord].\r]].\r\t\tsegOop _ self objectAfter: segOop].\r\r\tself restoreHeadersFrom: firstIn to: lastIn from: hdrBaseIn and: firstOut to: lastOut from: hdrBaseOut.\r\r\t\"Truncate the outPointerArray...\"\r\t((outPointerArray + (self lastPointerOf: outPointerArray) - lastOut) < 12\r\t\tor: [(endSeg - lastSeg) < 12]) ifTrue:\r\t\t\t[\"Not enough room to insert simple 3-word headers\"\r\t\t\t^ self primitiveFailAfterCleanup: outPointerArray].\r\textraSize _ self extraHeaderBytes: segmentWordArray.\r\thdrTypeBits _ self headerType: segmentWordArray.\r\t\"Copy the 3-word wordArray header to establish a free chunk.\"\r\tself transfer: 3\r\t\tfrom: segmentWordArray - extraSize\r\t\tto: lastOut+BytesPerWord.\r\t\"Adjust the size of the original as well as the free chunk.\"\r\tself longAt: lastOut+BytesPerWord\r\t\tput: outPointerArray + (self lastPointerOf: outPointerArray) - lastOut - extraSize + hdrTypeBits.\r\tself longAt: outPointerArray-extraSize\r\t\tput: lastOut - firstOut + (BytesPerWord*2) + hdrTypeBits.\r\t\"Note that pointers have been stored into roots table\"\r\tself beRootIfOld: outPointerArray.\r\r\t\"Truncate the image segment...\"\r\t\"Copy the 3-word wordArray header to establish a free chunk.\"\r\tself transfer: 3\r\t\tfrom: segmentWordArray - extraSize\r\t\tto: lastSeg+BytesPerWord.\r\t\"Adjust the size of the original as well as the free chunk.\"\r\tself longAt: segmentWordArray-extraSize\r\t\tput: lastSeg - segmentWordArray + BaseHeaderSize + hdrTypeBits.\r\tself longAt: lastSeg+BytesPerWord\r\t\tput: endSeg - lastSeg - extraSize + hdrTypeBits.\r\r\tDoAssertionChecks ifTrue: [self verifyCleanHeaders].\r\tself pop: 3.  \"...leaving the reciever on the stack as return value\"\r! !\r\r!Interpreter methodsFor: 'image segment in/out' stamp: 'di 8/3/2004 14:05'!\rrestoreHeadersFrom: firstIn to: lastIn from: hdrBaseIn and: firstOut to: lastOut from: hdrBaseOut\r\r\t\"Restore headers smashed by forwarding links\"\r\t| tablePtr oop header |\r\ttablePtr _ firstIn.\r\t[tablePtr <= lastIn] whileTrue:\r\t\t[oop _ self longAt: tablePtr.\r\t\theader _ self longAt: hdrBaseIn + (tablePtr-firstIn).\r\t\tself longAt: oop put: header.\r\t\ttablePtr _ tablePtr + BytesPerWord].\r\ttablePtr _ firstOut.\r\t[tablePtr <= lastOut] whileTrue:\r\t\t[oop _ self longAt: tablePtr.\r\t\theader _ self longAt: hdrBaseOut + (tablePtr-firstOut).\r\t\tself longAt: oop put: header.\r\t\ttablePtr _ tablePtr + BytesPerWord].\r\t\r\t\"Clear all mark bits\"\r\toop _ self firstObject.\r\t[oop < endOfMemory] whileTrue:\r\t\t[(self isFreeObject: oop) ifFalse:\r\t\t\t[self longAt: oop put: ((self longAt: oop) bitAnd: AllButMarkBit)].\r\t\toop _ self objectAfter: oop].\r! !\r\r!Interpreter methodsFor: 'debug printing' stamp: 'ikp 8/3/2004 21:39'!\rprintNameOfClass: classOop count: cnt\r\t\"Details: The count argument is used to avoid a possible infinite recursion if classOop is a corrupted object.\"\r\r\tcnt <= 0 ifTrue: [ ^ self print: 'bad class' ].\r\t(self sizeBitsOf: classOop) = (7 * BytesPerWord)\t\"(Metaclass instSize+1 * 4)\"\r\t\tifTrue: [self printNameOfClass: (self fetchPointer: 5 \"thisClass\" ofObject: classOop) \r\t\t\t\t\tcount: cnt - 1.\r\t\t\t\tself print: ' class']\r\tifFalse: [self printStringOf: (self fetchPointer: 6 \"name\" ofObject: classOop)]! !\r\r!Interpreter methodsFor: 'stack bytecodes' stamp: 'ikp 6/10/2004 11:04'!\rexperimentalBytecode\r\t\"Note: This bytecode is not currently generated by the compiler.\"\r\t\"This range of six bytecodes can replace the pushTemporaryVariable[0..5] bytecode at the beginning of a sequence of either the form:\r\t\tpushTemp\r\t\tpushTemp | pushConstantOne | pushLiteralConstant\r\t\t<=\r\t\tlongJumpIfFalse\ror the form:\r\t\tpushTemp\r\t\tpushTemp | pushConstantOne | pushLiteralConstant\r\t\t+\r\t\tpopIntoTemp (optional)\r\rIf two values pushed are not small integers, this bytecode acts like the pushTemp bytecode it replaces. However, if they are small integers, then the given arithmetic or comparison operation is performed. The result of that operation is either pushed onto the stack or, if one of the expected bytecodes follows it, then that bytecode is performed immediately. In such cases, the entire four instruction sequence is performed without doing any stack operations.\"\r\r\t| arg1 byte2 byte3 byte4 arg1Val arg2Val result offset |\r\targ1 _ self temporary: currentBytecode - 138.\r\tbyte2 _ self byteAtPointer: localIP + 1.  \"fetch ahead\"\r\tbyte3 _ self byteAtPointer: localIP + 2.  \"fetch ahead\"\r\tbyte4 _ self byteAtPointer: localIP + 3.  \"fetch ahead\"\r\r\t\"check first arg\"\r\t(self isIntegerObject: arg1) ifTrue: [\r\t\targ1Val _ self integerValueOf: arg1.\r\t] ifFalse: [\r\t\tself fetchNextBytecode.\r\t\t^ self internalPush: arg1.  \"abort; first arg is not an integer\"\r\t].\r\r\t\"get and check second arg\"\r\tbyte2 < 32 ifTrue: [\r\t\targ2Val _ self temporary: (byte2 bitAnd: 16rF).\r\t\t(self isIntegerObject: arg2Val) ifTrue: [\r\t\t\targ2Val _ self integerValueOf: arg2Val.\r\t\t] ifFalse: [\r\t\t\tself fetchNextBytecode.\r\t\t\t^ self internalPush: arg1.  \"abort; second arg is not an integer\"\r\t\t].\r\t] ifFalse: [\r\t\tbyte2 > 64 ifTrue: [\r\t\t\targ2Val _ 1.\r\t\t] ifFalse: [\r\t\t\targ2Val _ self literal: (byte2 bitAnd: 16r1F).\r\t\t\t(self isIntegerObject: arg2Val) ifTrue: [\r\t\t\t\targ2Val _ self integerValueOf: arg2Val.\r\t\t\t] ifFalse: [\r\t\t\t\tself fetchNextBytecode.\r\t\t\t\t^ self internalPush: arg1.  \"abort; second arg is not an integer\"\r\t\t\t].\r\t\t].\r\t].\r\r\tbyte3 < 178 ifTrue: [\r\t\t\"do addition, possibly followed by a storeAndPopTemp\"\r\t\tresult _ arg1Val + arg2Val.\r\t\t(self isIntegerValue: result) ifTrue: [\r\t\t\t((byte4 > 103) and: [byte4 < 112]) ifTrue: [\r\t\t\t\t\"next instruction is a storeAndPopTemp\"\r\t\t\t\tlocalIP _ localIP + 3.\r\t\t\t\tself storePointerUnchecked: (byte4 bitAnd: 7) + TempFrameStart\r\t\t\t\t\tofObject: localHomeContext\r\t\t\t\t\twithValue: (self integerObjectOf: result).\r\t\t\t] ifFalse: [\r\t\t\t\tlocalIP _ localIP + 2.\r\t\t\t\tself internalPush: (self integerObjectOf: result).\r\t\t\t].\r\t\t] ifFalse: [\r\t\t\tself fetchNextBytecode.\r\t\t\t^ self internalPush: arg1.  \"abort; result is not an integer\"\r\t\t].\r\t] ifFalse: [\r\t\t\"do comparison operation, followed by a longJumpIfFalse\"\r\t\toffset _ self byteAtPointer: localIP + 4.\r\t\targ1Val <= arg2Val\r\t\t\tifTrue: [localIP _ localIP + 3 + 1]  \"jump not taken; skip extra instruction byte\"\r\t\t\tifFalse: [localIP _ localIP + 3 + 1 + offset].\r\t\t\tself fetchNextBytecode.\r\t].\r! !\r\r!Interpreter methodsFor: 'primitive support' stamp: 'ikp 10/5/2004 15:47'!\rpositive32BitIntegerFor: integerValue\r\r\t| newLargeInteger |\r\t\"Note - integerValue is interpreted as POSITIVE, eg, as the result of\r\t\tBitmap>at:, or integer>bitAnd:.\"\r\tintegerValue >= 0\r\t\tifTrue: [(self isIntegerValue: integerValue)\r\t\t\t\t\tifTrue: [^ self integerObjectOf: integerValue]].\r\r\tBytesPerWord = 4\r\tifTrue: [\"Faster instantiateSmallClass: currently only works with integral word size.\"\r\t\t\tnewLargeInteger _ self instantiateSmallClass: (self splObj: ClassLargePositiveInteger)\r\t\t\t\t\tsizeInBytes: BaseHeaderSize + 4 fill: 0]\r\tifFalse: [\"Cant use instantiateSmallClass: due to integral word requirement.\"\r\t\t\tnewLargeInteger _ self instantiateClass: (self splObj: ClassLargePositiveInteger)\r\t\t\t\t\tindexableSize: 4].\r\tself storeByte: 3 ofObject: newLargeInteger withValue: ((integerValue >> 24) bitAnd: 16rFF).\r\tself storeByte: 2 ofObject: newLargeInteger withValue: ((integerValue >> 16) bitAnd: 16rFF).\r\tself storeByte: 1 ofObject: newLargeInteger withValue: ((integerValue >> 8) bitAnd: 16rFF).\r\tself storeByte: 0 ofObject: newLargeInteger withValue: (integerValue bitAnd: 16rFF).\r\t^ newLargeInteger! !\r\r!Interpreter methodsFor: 'primitive support' stamp: 'tpr 3/17/2005 17:47'!\rpositive64BitIntegerFor: integerValue\r\r\t| newLargeInteger value check |\r\t\"Note - integerValue is interpreted as POSITIVE, eg, as the result of\r\t\tBitmap>at:, or integer>bitAnd:.\"\r\tself var: 'integerValue' type: 'sqLong'.\r \r\t(self sizeof: integerValue) = 4 ifTrue: [^self positive32BitIntegerFor: integerValue].\r\r  \tself cCode: 'check = integerValue >> 32'.  \"Why not run this in sim?\"\r\tcheck = 0 ifTrue: [^self positive32BitIntegerFor: integerValue].\r\t\r\tnewLargeInteger _\r\t\tself instantiateSmallClass: (self splObj: ClassLargePositiveInteger) sizeInBytes: BaseHeaderSize + 8 fill: 0.\r\t0 to: 7 do: [:i |\r\t\tself cCode: 'value = ( integerValue >> (i * 8)) & 255'.\r\t\tself storeByte: i ofObject: newLargeInteger withValue: value].\r\t^ newLargeInteger! !\r\r!Interpreter methodsFor: 'primitive support' stamp: 'tpr 3/17/2005 17:47'!\rpositive64BitValueOf: oop\r\t\"Convert the given object into an integer value.\r\tThe object may be either a positive ST integer or a eight-byte LargePositiveInteger.\"\r\r\t| sz szsqLong value  |\r\tself returnTypeC: 'sqLong'.\r\tself var: 'value' type: 'sqLong'.\r\t(self isIntegerObject: oop) ifTrue: [\r\t\tvalue _ self integerValueOf: oop.\r\t\tvalue < 0 ifTrue: [^ self primitiveFail].\r\t\t^ value].\r\r\tself assertClassOf: oop is: (self splObj: ClassLargePositiveInteger).\r\tsuccessFlag ifFalse: [^ self primitiveFail].\r\tszsqLong _ self cCode: 'sizeof(sqLong)'.\r\tsz _ self lengthOf: oop.\r\tsz > szsqLong\r\t\tifTrue: [^ self primitiveFail].\r\tvalue _ 0.\r\t0 to: sz - 1 do: [:i |\r\t\tvalue _ value + ((self cCoerce: (self fetchByte: i ofObject: oop) to: 'sqLong') <<  (i*8))].\r\t^value.! !\r\r!Interpreter methodsFor: 'primitive support' stamp: 'tpr 3/17/2005 17:48'!\rsigned64BitIntegerFor: integerValue\r\t\"Return a Large Integer object for the given integer value\"\r\t| newLargeInteger value largeClass intValue check |\r\tself inline: false.\r\tself var: 'integerValue' type: 'sqLong'.\r\tself var: 'value' type: 'sqLong'.\r\tintegerValue < 0\r\t\tifTrue:[\tlargeClass _ self classLargeNegativeInteger.\r\t\t\t\tvalue _ 0 - integerValue]\r\t\tifFalse:[\tlargeClass _ self classLargePositiveInteger.\r\t\t\t\tvalue _ integerValue].\r\r\t(self sizeof: value) = 4 ifTrue: [^self signed32BitIntegerFor: integerValue].\r\r\tself cCode: 'check = value >> 32'.\r\tcheck = 0 ifTrue: [^self signed32BitIntegerFor: integerValue].\r\r\tnewLargeInteger _ self instantiateSmallClass: largeClass sizeInBytes:  12 fill: 0.\r\t0 to: 7 do: [:i |\r\t\tself cCode: 'intValue = ( value >> (i * 8)) & 255'.\r\t\tself storeByte: i ofObject: newLargeInteger withValue: intValue].\r\t^ newLargeInteger! !\r\r!Interpreter methodsFor: 'primitive support' stamp: 'tpr 3/17/2005 17:48'!\rsigned64BitValueOf: oop\r\t\"Convert the given object into an integer value.\r\tThe object may be either a positive ST integer or a eight-byte LargeInteger.\"\r\t| sz value largeClass negative szsqLong |\r\tself inline: false.\r\tself returnTypeC: 'sqLong'.\r\tself var: 'value' type: 'sqLong'.\r\t(self isIntegerObject: oop) ifTrue: [^self cCoerce: (self integerValueOf: oop) to: 'sqLong'].\r\tlargeClass _ self fetchClassOf: oop.\r\tlargeClass = self classLargePositiveInteger\r\t\tifTrue:[negative _ false]\r\t\tifFalse:[largeClass = self classLargeNegativeInteger\r\t\t\t\t\tifTrue:[negative _ true]\r\t\t\t\t\tifFalse:[^self primitiveFail]].\r\tszsqLong _ self cCode: 'sizeof(sqLong)'.\r\tsz _ self lengthOf: oop.\r\tsz > szsqLong \r\t\tifTrue: [^ self primitiveFail].\r\tvalue _ 0.\r\t0 to: sz - 1 do: [:i |\r\t\tvalue _ value + ((self cCoerce: (self fetchByte: i ofObject: oop) to: 'sqLong') <<  (i*8))].\r\tnegative\r\t\tifTrue:[^0 - value]\r\t\tifFalse:[^value]! !\r\r!Interpreter methodsFor: 'interpreter shell' stamp: 'ikp 6/10/2004 11:01'!\rfetchByte\r\t\"This method uses the preIncrement builtin function which has no Smalltalk equivalent. Thus, it must be overridden in the simulator.\"\r\r\t^ self byteAtPointer: localIP preIncrement! !\r\r!Interpreter methodsFor: 'plugin support' stamp: 'ikp 6/10/2004 12:26'!\raddToExternalPrimitiveTable: functionAddress\r\t\"Add the given function address to the external primitive table and return the index where it's stored. This function doesn't need to be fast since it is only called when an external primitive has been looked up (which takes quite a bit of time itself). So there's nothing specifically complicated here.\r\tNote: Return index will be one-based (ST convention)\"\r\r\tself var: #functionAddress declareC: 'void *functionAddress'.\r\r\t0 to: MaxExternalPrimitiveTableSize-1 do: [ :i |\r\t\t(externalPrimitiveTable at: i) = 0 ifTrue: [\r\t\t\texternalPrimitiveTable at: i put: functionAddress.\r\t\t\t^i+1]].\r\t\"if no space left, return zero so it'll looked up again\"\r\t^0! !\r\r!Interpreter methodsFor: 'plugin support' stamp: 'ikp 8/2/2004 16:52'!\rfindObsoleteNamedPrimitive: functionName length: functionLength\r\t\"Search the obsolete named primitive table for the given function.\r\tReturn the index if it's found, -1 otherwise.\"\r\t| entry index chIndex |\r\tself var: #functionName type:'char *'.\r\tself var: #entry type:'const char *'.\r\tindex _ 0.\r\t[true] whileTrue:[\r\t\tentry _ self\r\t\t\tcCode: 'obsoleteNamedPrimitiveTable[index][0]'\r\t\t\tinSmalltalk: [ (CArrayAccessor on: (obsoleteNamedPrimitiveTable at: index)) at: 0 ].\r\t\tentry == nil ifTrue:[^-1]. \"at end of table\"\r\t\tself cCode: '' inSmalltalk: [ entry _ CArrayAccessor on: entry ].\r\t\t\"Compare entry with functionName\"\r\t\tchIndex _ 0.\r\t\t[(entry at: chIndex) = (self cCode: 'functionName[chIndex]'\r\t\t\t\t\t\t\t\tinSmalltalk: [self byteAtPointer: functionName + chIndex]) \r\t\t\tand:[chIndex < functionLength]] whileTrue:[chIndex _ chIndex + 1].\r\t\t(chIndex = functionLength and:[(entry at: chIndex) = 0]) \r\t\t\tifTrue:[^index]. \"match\"\r\t\tindex _ index + 1.\r\t].! !\r\r!Interpreter methodsFor: 'plugin support' stamp: 'di 6/23/2004 12:26'!\rfirstFixedField: oop\r\r\tself returnTypeC: 'void *'.\r\t^ self pointerForOop: oop + BaseHeaderSize! !\r\r!Interpreter methodsFor: 'plugin support' stamp: 'di 7/17/2004 13:02'!\rfirstIndexableField: oop\r\t\"NOTE: copied in InterpreterSimulator, so please duplicate any changes\"\r\r\t| hdr fmt totalLength fixedFields |\r\tself returnTypeC: 'void *'.\r\thdr _ self baseHeader: oop.\r\tfmt _ (hdr >> 8) bitAnd: 16rF.\r\ttotalLength _ self lengthOf: oop baseHeader: hdr format: fmt.\r\tfixedFields _ self fixedFieldsOf: oop format: fmt length: totalLength.\r\tfmt < 8 ifTrue:\r\t\t[fmt = 6 ifTrue:\r\t\t\t[\"32 bit field objects\"\r\t\t\t^ self pointerForOop: oop + BaseHeaderSize + (fixedFields << 2)].\r\t\t\"full word objects (pointer or bits)\"\r\t\t^ self pointerForOop: oop + BaseHeaderSize + (fixedFields << ShiftForWord)]\r\tifFalse:\r\t\t[\"Byte objects\"\r\t\t^ self pointerForOop: oop + BaseHeaderSize + fixedFields]! !\r\r!Interpreter methodsFor: 'control primitives' stamp: 'di 7/4/2004 08:56'!\rprimitiveBlockCopy\r\r\t| context methodContext contextSize newContext initialIP |\r\tcontext _ self stackValue: 1.\r\t(self isIntegerObject: (self fetchPointer: MethodIndex ofObject: context))\r\t\tifTrue: [\"context is a block; get the context of its enclosing method\"\r\t\t\t\tmethodContext _ self fetchPointer: HomeIndex ofObject: context]\r\t\tifFalse: [methodContext _ context].\r\tcontextSize _ self sizeBitsOf: methodContext.  \"in bytes, including header\"\r\tcontext _ nil.  \"context is no longer needed and is not preserved across allocation\"\r\r\t\"remap methodContext in case GC happens during allocation\"\r\tself pushRemappableOop: methodContext.\r\tnewContext _ self instantiateContext: (self splObj: ClassBlockContext) sizeInBytes: contextSize.\r\tmethodContext _ self popRemappableOop.\r\r\tinitialIP _ self integerObjectOf: (instructionPointer+1+3) - (method+BaseHeaderSize).\r\t\"Was instructionPointer + 3, but now it's greater by 1 due to preIncrement\"\r\r\t\"Assume: have just allocated a new context; it must be young.\r\t Thus, can use uncheck stores. See the comment in fetchContextRegisters.\"\r\r\tself storePointer: InitialIPIndex ofObject: newContext withValue: initialIP.\r\tself storePointer: InstructionPointerIndex ofObject: newContext withValue: initialIP.\r\tself storeStackPointerValue: 0 inContext: newContext.\r\tself storePointerUnchecked: BlockArgumentCountIndex ofObject: newContext withValue: (self stackValue: 0).\r\tself storePointerUnchecked: HomeIndex ofObject: newContext withValue: methodContext.\r\tself storePointerUnchecked: SenderIndex ofObject: newContext withValue: nilObj.\r\r\tself pop: 2 thenPush: newContext.! !\r\r!Interpreter methodsFor: 'control primitives' stamp: 'tpr 3/23/2005 15:08'!\rprimitiveExecuteMethodArgsArray\r\t\"receiver, argsArray, then method are on top of stack.  Execute method against receiver and args\"\r\r\t| argCnt argumentArray |\r\tnewMethod _ self popStack.\r\tprimitiveIndex _ self primitiveIndexOf: newMethod.\r\targCnt _ self argumentCountOf: newMethod.\r\targumentArray _ self popStack.\r\t\"If the argArray isnt actually an Array we have to unPop both the above\"\r\t(self isArray: argumentArray) ifFalse:[self unPop: 2. ^self primitiveFail].\r\tsuccessFlag ifTrue: [self success: (argCnt = (self fetchWordLengthOf: argumentArray))].\r\tsuccessFlag\r\t\tifTrue: [self transfer: argCnt from: argumentArray + BaseHeaderSize to: stackPointer + BytesPerWord.\r\t\t\tself unPop: argCnt.\r\t\t\targumentCount _ argCnt.\r\t\t\tself executeNewMethod]\r\t\tifFalse: [self unPop: 2].\r! !\r\r!Interpreter methodsFor: 'control primitives' stamp: 'tpr 3/23/2005 15:23'!\rprimitiveInvokeObjectAsMethod\r\t\"Primitive. 'Invoke' an object like a function, sending the special message \r\t\trun: originalSelector with: arguments in: aReceiver.\r\t\"\r\t| runSelector runReceiver runArgs newReceiver lookupClass |\r\trunArgs _ self instantiateClass: (self splObj: ClassArray) indexableSize: argumentCount.\r\tself beRootIfOld: runArgs. \"do we really need this?\"\r\tself transfer: argumentCount from: stackPointer - ((argumentCount - 1) * BytesPerWord) to: runArgs + BaseHeaderSize.\r\r\trunSelector _ messageSelector.\r\trunReceiver _ self stackValue: argumentCount.\r\tself pop: argumentCount+1.\r\r\t\"stack is clean here\"\r\r\tnewReceiver _ newMethod.\r\tmessageSelector _ self splObj: SelectorRunWithIn.\r\targumentCount _ 3.\r\r\tself push: newReceiver.\r\tself push: runSelector.\r\tself push: runArgs.\r\tself push: runReceiver.\r\r\tlookupClass _ self fetchClassOf: newReceiver.\r\tself findNewMethodInClass: lookupClass.\r\tself executeNewMethodFromCache.  \"Recursive xeq affects successFlag\"\r\tsuccessFlag _ true.\r! !\r\r!Interpreter methodsFor: 'jump bytecodes' stamp: 'ikp 6/10/2004 11:01'!\rjump: offset\r\r\tlocalIP _ localIP + offset + 1.\r\tcurrentBytecode _ self byteAtPointer: localIP.\r! !\r\r!Interpreter methodsFor: 'float primitives' stamp: 'ikp 6/9/2004 16:23'!\rprimitiveExponent\r\t\"Exponent part of this float.\"\r\r\t| rcvr frac pwr |\r\tself var: #rcvr declareC: 'double rcvr'.\r\tself var: #frac declareC: 'double frac'.\r\tself var: #pwr declareC: 'int pwr'.\r\trcvr _ self popFloat.\r\tsuccessFlag\r\t\tifTrue: [  \"rcvr = frac * 2^pwr, where frac is in [0.5..1.0)\"\r\t\t\tself cCode: 'frac = frexp(rcvr, &pwr)'\r\t\t\t\t\tinSmalltalk: [pwr _ rcvr exponent].\r\t\t\tself pushInteger: pwr - 1]\r\t\tifFalse: [self unPop: 1].! !\r\r!Interpreter methodsFor: 'float primitives' stamp: 'ikp 8/4/2004 11:42'!\rprimitiveTruncated \r\t| rcvr frac trunc |\r\tself var: #rcvr declareC: 'double rcvr'.\r\tself var: #frac declareC: 'double frac'.\r\tself var: #trunc declareC: 'double trunc'.\r\trcvr _ self popFloat.\r\tsuccessFlag ifTrue:\r\t\t[self cCode: 'frac = modf(rcvr, &trunc)'\r\t\t\tinSmalltalk: [trunc _ rcvr truncated].\r\t\tself flag: #Dan.\t\t\"The ranges are INCORRECT if SmallIntegers are wider than 31 bits.\"\r\t\tself cCode: 'success((-1073741824.0 <= trunc) && (trunc <= 1073741823.0))'\r\t\t\tinSmalltalk: [self success: (trunc between: SmallInteger minVal and: SmallInteger maxVal)]].\r\tsuccessFlag\r\t\tifTrue: [self cCode: 'pushInteger((sqInt) trunc)' inSmalltalk: [self pushInteger: trunc]]\r\t\tifFalse: [self unPop: 1]! !\r\r!Interpreter methodsFor: 'object access primitives' stamp: 'di 8/3/2004 13:40'!\rprimitiveChangeClass\r\t\"Primitive. Change the class of the receiver into the class of the argument given that the format of the receiver matches the format of the argument's class. Fail if receiver or argument are SmallIntegers, or the receiver is an instance of a compact class and the argument isn't, or when the argument's class is compact and the receiver isn't, or when the format of the receiver is different from the format of the argument's class, or when the arguments class is fixed and the receiver's size differs from the size that an instance of the argument's class should have.\"\r\t| arg rcvr argClass classHdr sizeHiBits byteSize argFormat rcvrFormat ccIndex |\r\targ _ self stackObjectValue: 0.\r\trcvr _ self stackObjectValue: 1.\r\tsuccessFlag ifFalse:[^nil].\r\r\t\"Get the class we want to convert the receiver into\"\r\targClass _ self fetchClassOf: arg.\r\r\t\"Check what the format of the class says\"\r\tclassHdr _ self formatOfClass: argClass. \"Low 2 bits are 0\"\r\r\t\"Compute the size of instances of the class (used for fixed field classes only)\"\r\tsizeHiBits _ (classHdr bitAnd: 16r60000) >> 9.\r\tclassHdr _ classHdr bitAnd: 16r1FFFF.\r\tbyteSize _ (classHdr bitAnd: SizeMask) + sizeHiBits. \"size in bytes -- low 2 bits are 0\"\r\r\t\"Check the receiver's format against that of the class\"\r\targFormat _ (classHdr >> 8) bitAnd: 16rF.\r\trcvrFormat _ self formatOf: rcvr.\r\targFormat = rcvrFormat ifFalse:[^self primitiveFail]. \"no way\"\r\r\t\"For fixed field classes, the sizes must match.\r\tNote: base header size is included in class size.\"\r\targFormat < 2 ifTrue:[(byteSize - BaseHeaderSize) = (self byteSizeOf: rcvr) ifFalse:[^self primitiveFail]].\r\r\t(self headerType: rcvr) = HeaderTypeShort\r\t\tifTrue:[ \"Compact classes. Check if the arg's class is compact and exchange ccIndex\"\r\t\t\tccIndex _ classHdr bitAnd: CompactClassMask.\r\t\t\tccIndex = 0 ifTrue:[^self primitiveFail]. \"class is not compact\"\r\t\t\tself longAt: rcvr put:\r\t\t\t\t(((self longAt: rcvr) bitAnd: CompactClassMask bitInvert32)\r\t\t\t\t\tbitOr: ccIndex)]\r\t\tifFalse:[\"Exchange the class pointer, which could make rcvr a root for argClass\"\r\t\t\tself longAt: rcvr-BaseHeaderSize put: (argClass bitOr: (self headerType: rcvr)).\r\t\t\t(rcvr < youngStart) ifTrue: [self possibleRootStoreInto: rcvr value: argClass]].\r\r\t\"Flush cache because rcvr's class has changed\"\r\tself flushMethodCache.\r\r\tsuccessFlag ifTrue: [ self pop: 1 ]! !\r\r!Interpreter methodsFor: 'object access primitives' stamp: 'di 6/14/2004 17:26'!\rprimitiveObjectPointsTo\r\t| rcvr thang lastField |\r\tthang _ self popStack.\r\trcvr _ self popStack.\r\t(self isIntegerObject: rcvr) ifTrue: [^self pushBool: false].\r\r\tlastField _ self lastPointerOf: rcvr.\r\tBaseHeaderSize to: lastField by: BytesPerWord do:\r\t\t[:i | (self longAt: rcvr + i) = thang\r\t\t\tifTrue: [^ self pushBool: true]].\r\tself pushBool: false.! !\r\r!Interpreter methodsFor: 'object access primitives' stamp: 'di 6/14/2004 17:27'!\rprimitiveStoreStackp\r\t\"Atomic store into context stackPointer. \r\tAlso ensures that any newly accessible cells are initialized to nil \"\r\t| ctxt newStackp stackp |\r\tctxt _ self stackValue: 1.\r\tnewStackp _ self stackIntegerValue: 0.\r\tself success: newStackp >= 0.\r\tself success: newStackp <= (LargeContextSize - BaseHeaderSize // BytesPerWord - CtxtTempFrameStart).\r\tsuccessFlag ifFalse: [^ self primitiveFail].\r\tstackp _ self fetchStackPointerOf: ctxt.\r\tnewStackp > stackp ifTrue: [\"Nil any newly accessible cells\"\r\t\t\tstackp + 1 to: newStackp do: [:i | self storePointer: i + CtxtTempFrameStart - 1 ofObject: ctxt withValue: nilObj]].\r\tself storeStackPointerValue: newStackp inContext: ctxt.\r\tself pop: 1! !\r\r!Interpreter methodsFor: 'object access primitives' stamp: 'ikp 8/4/2004 18:28'!\rsufficientSpaceToInstantiate: classOop indexableSize: size \r\t\"Return the number of bytes required to allocate an instance of the given class with the given number of indexable fields.\"\r\t\"Details: For speed, over-estimate space needed for fixed fields or literals; the low space threshold is a blurry line.\"\r\t| format okay |\r\tself inline: true.\r\tformat _ (self formatOfClass: classOop) >> 8 bitAnd: 15.\r\t\"fail if attempting to call new: on non-indexable class\"\r\t((self cCoerce: size to: 'usqInt ') > 0 and: [format < 2])\r\t\tifTrue: [^ false].\r\tformat < 8\r\t\tifTrue: [\"indexable fields are words or pointers\"\r\t\t\tokay _ self sufficientSpaceToAllocate: 2500 + (size * BytesPerWord)]\r\t\tifFalse: [\"indexable fields are bytes\"\r\t\t\tokay _ self sufficientSpaceToAllocate: 2500 + size].\r\t^ okay! !\r\r!Interpreter methodsFor: 'array and stream primitives' stamp: 'ikp 6/10/2004 12:15'!\rinstall: rcvr inAtCache: cache at: atIx string: stringy\r\t\"Install the oop of this object in the given cache (at or atPut), along with\r\tits size, format and fixedSize\"\r\t| hdr fmt totalLength fixedFields |\r\tself var: #cache declareC: 'sqInt *cache'.\r\r\thdr _ self baseHeader: rcvr.\r\tfmt _ (hdr >> 8) bitAnd: 16rF.\r\t(fmt = 3 and: [self isContextHeader: hdr]) ifTrue:\r\t\t[\"Contexts must not be put in the atCache, since their size is not constant\"\r\t\t^ self primitiveFail].\r\ttotalLength _ self lengthOf: rcvr baseHeader: hdr format: fmt.\r\tfixedFields _ self fixedFieldsOf: rcvr format: fmt length: totalLength.\r\r\tcache at: atIx+AtCacheOop put: rcvr.\r\tstringy ifTrue: [cache at: atIx+AtCacheFmt put: fmt + 16]  \"special flag for strings\"\r\t\t\tifFalse: [cache at: atIx+AtCacheFmt put: fmt].\r\tcache at: atIx+AtCacheFixedFields put: fixedFields.\r\tcache at: atIx+AtCacheSize put: totalLength - fixedFields.\r! !\r\r!Interpreter methodsFor: 'array and stream primitives' stamp: 'ikp 3/29/2005 22:34'!\rprimitiveStringReplace\r\t\" \r\t<array> primReplaceFrom: start to: stop with: replacement \r\tstartingAt: repStart  \r\t<primitive: 105>\r\t\"\r\t| array start stop repl replStart hdr arrayFmt totalLength arrayInstSize replFmt replInstSize srcIndex |\r\tarray _ self stackValue: 4.\r\tstart _ self stackIntegerValue: 3.\r\tstop _ self stackIntegerValue: 2.\r\trepl _ self stackValue: 1.\r\treplStart _ self stackIntegerValue: 0.\r\r\tsuccessFlag ifFalse: [^ self primitiveFail].\r\t(self isIntegerObject: repl) ifTrue: [\"can happen in LgInt copy\"\r\t\t\t^ self primitiveFail].\r\r\thdr _ self baseHeader: array.\r\tarrayFmt _ hdr >> 8 bitAnd: 15.\r\ttotalLength _ self lengthOf: array baseHeader: hdr format: arrayFmt.\r\tarrayInstSize _ self fixedFieldsOf: array format: arrayFmt length: totalLength.\r\t(start >= 1 and: [start - 1 <= stop and: [stop + arrayInstSize <= totalLength]])\r\t\tifFalse: [^ self primitiveFail].\r\r\thdr _ self baseHeader: repl.\r\treplFmt _ hdr >> 8 bitAnd: 15.\r\ttotalLength _ self lengthOf: repl baseHeader: hdr format: replFmt.\r\treplInstSize _ self fixedFieldsOf: repl format: replFmt length: totalLength.\r\t(replStart >= 1 and: [stop - start + replStart + replInstSize <= totalLength])\r\t\tifFalse: [^ self primitiveFail].\r\r\t\"Array formats (without byteSize bits, if bytes array) must be same \"\r\tarrayFmt < 8\r\t\tifTrue: [arrayFmt = replFmt\r\t\t\t\tifFalse: [^ self primitiveFail]]\r\t\tifFalse: [(arrayFmt bitAnd: 12) = (replFmt bitAnd: 12)\r\t\t\t\tifFalse: [^ self primitiveFail]].\r\r\tsrcIndex _ replStart + replInstSize - 1.\r\t\"- 1 for 0-based access\"\r\r\tarrayFmt <= 4\r\t\tifTrue: [\"pointer type objects\"\r\t\t\tstart + arrayInstSize - 1 to: stop + arrayInstSize - 1 do: [:i |\r\t\t\t\tself storePointer: i ofObject: array withValue: (self fetchPointer: srcIndex ofObject: repl).\r\t\t\t\t\tsrcIndex _ srcIndex + 1]]\r\t\tifFalse: [arrayFmt < 8\r\t\t\t\tifTrue: [\"32-bit-word type objects\"\r\t\t\t\t\tstart + arrayInstSize - 1 to: stop + arrayInstSize - 1\r\t\t\t\t\t\tdo: [:i | self storeLong32: i ofObject: array withValue: (self fetchLong32: srcIndex ofObject: repl).\r\t\t\t\t\t\t\tsrcIndex _ srcIndex + 1]]\r\t\t\t\tifFalse: [\"byte-type objects\"\r\t\t\t\t\tstart + arrayInstSize - 1 to: stop + arrayInstSize - 1\r\t\t\t\t\t\tdo: [:i |  self storeByte: i ofObject: array withValue: (self fetchByte: srcIndex ofObject: repl).\r\t\t\t\t\t\t\tsrcIndex _ srcIndex + 1]]].\r\t\"We might consider  comparing stop - start to some value here and using forceInterruptCheck\"\r\r\tself pop: argumentCount \"leave rcvr on stack\"! !\r\r!Interpreter methodsFor: 'I/O primitives' stamp: 'ikp 6/10/2004 14:05'!\rdisplayBitsOf: aForm Left: l Top: t Right: r Bottom: b\r\t\"Repaint the portion of the Smalltalk screen bounded by the affected rectangle. Used to synchronize the screen after a Bitblt to the Smalltalk Display object.\"\r\r\t| displayObj dispBits w h dispBitsIndex d left right top bottom surfaceHandle |\r\tdisplayObj _ self splObj: TheDisplay.\r\taForm = displayObj ifFalse: [^ nil].\r\tself success: ((self isPointers: displayObj) and: [(self lengthOf: displayObj) >= 4]).\r\tsuccessFlag ifTrue: [\r\t\tdispBits _ self fetchPointer: 0 ofObject: displayObj.\r\t\tw _ self fetchInteger: 1 ofObject: displayObj.\r\t\th _ self fetchInteger: 2 ofObject: displayObj.\r\t\td _ self fetchInteger: 3 ofObject: displayObj.\r\t].\r\tl < 0 ifTrue:[left _ 0] ifFalse: [left _ l].\r\tr > w ifTrue: [right _ w] ifFalse: [right _ r].\r\tt < 0 ifTrue: [top _ 0] ifFalse: [top _ t].\r\tb > h ifTrue: [bottom _ h] ifFalse: [bottom _ b].\r\t((left <= right) and: [top <= bottom]) ifFalse: [^nil].\r\tsuccessFlag ifTrue: [\r\t\t(self isIntegerObject: dispBits) ifTrue: [\r\t\t\tsurfaceHandle _ self integerValueOf: dispBits.\r\t\t\tshowSurfaceFn = 0 ifTrue: [\r\t\t\t\tshowSurfaceFn _ self ioLoadFunction: 'ioShowSurface' From: 'SurfacePlugin'.\r\t\t\t\tshowSurfaceFn = 0 ifTrue: [^self success: false]].\r\t\t\tself cCode:'((sqInt (*)(sqInt, sqInt, sqInt, sqInt, sqInt))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top)'.\r\t\t] ifFalse: [\r\t\t\tdispBitsIndex _ dispBits + BaseHeaderSize.  \"index in memory byte array\"\r\t\t\tself cCode: 'ioShowDisplay(dispBitsIndex, w, h, d, left, right, top, bottom)'\r\t\t\t\tinSmalltalk: [self showDisplayBits: dispBitsIndex \r\t\t\t\t\t\t\t\tw: w h: h d: d\r\t\t\t\t\t\t\t\tleft: left right: right top: top bottom: bottom]\r\t\t].\r\t].! !\r\r!Interpreter methodsFor: 'I/O primitives' stamp: 'di 7/4/2004 08:41'!\rprimitiveBeCursor\r\t\"Set the cursor to the given shape. The Mac only supports 16x16 pixel cursors. Cursor offsets are handled by Smalltalk.\"\r\r\t| cursorObj maskBitsIndex maskObj bitsObj extentX extentY depth offsetObj offsetX offsetY cursorBitsIndex ourCursor |\r\rself flag: #Dan.  \"This is disabled until we convert bitmaps appropriately\"\rBytesPerWord = 8 ifTrue: [^ self pop: argumentCount].\r\r\targumentCount = 0 ifTrue: [\r\t\tcursorObj _ self stackTop.\r\t\tmaskBitsIndex _ nil].\r\targumentCount = 1 ifTrue: [\r\t\tcursorObj _ self stackValue: 1.\r\t\tmaskObj _ self stackTop].\r\tself success: (argumentCount < 2).\r\r\tself success: ((self isPointers: cursorObj) and: [(self lengthOf: cursorObj) >= 5]).\r\tsuccessFlag ifTrue: [\r\t\tbitsObj _ self fetchPointer: 0 ofObject: cursorObj.\r\t\textentX _ self fetchInteger: 1 ofObject: cursorObj.\r\t\textentY _ self fetchInteger: 2 ofObject: cursorObj.\r\t\tdepth _ self fetchInteger: 3 ofObject: cursorObj.\r\t\toffsetObj _ self fetchPointer: 4 ofObject: cursorObj].\r\t\tself success: ((self isPointers: offsetObj) and: [(self lengthOf: offsetObj) >= 2]).\r\r\tsuccessFlag ifTrue: [\r\t\toffsetX _ self fetchInteger: 0 ofObject: offsetObj.\r\t\toffsetY _ self fetchInteger: 1 ofObject: offsetObj.\r\t\tself success: ((extentX = 16) and: [extentY = 16 and: [depth = 1]]).\r\t\tself success: ((offsetX >= -16) and: [offsetX <= 0]).\r\t\tself success: ((offsetY >= -16) and: [offsetY <= 0]).\r\t\tself success: ((self isWords: bitsObj) and: [(self lengthOf: bitsObj) = 16]).\r\t\tcursorBitsIndex _ bitsObj + BaseHeaderSize.\r\t\tself cCode: '' inSmalltalk:\r\t\t\t[ourCursor _ Cursor\r\t\t\t\textent: extentX @ extentY\r\t\t\t\tfromArray: ((1 to: 16) collect: [:i |\r\t\t\t\t\t((self fetchLong32: i-1 ofObject: bitsObj) >> (BytesPerWord*8 - 16)) bitAnd: 16rFFFF])\r\t\t\t\toffset: offsetX  @ offsetY]].\r\r\targumentCount = 1 ifTrue: [\r\t\tself success: ((self isPointers: maskObj) and: [(self lengthOf: maskObj) >= 5]).\r\t\tsuccessFlag ifTrue: [\r\t\t\tbitsObj _ self fetchPointer: 0 ofObject: maskObj.\r\t\t\textentX _ self fetchInteger: 1 ofObject: maskObj.\r\t\t\textentY _ self fetchInteger: 2 ofObject: maskObj.\r\t\t\tdepth _ self fetchInteger: 3 ofObject: maskObj].\r\r\t\tsuccessFlag ifTrue: [\r\t\t\tself success: ((extentX = 16) and: [extentY = 16 and: [depth = 1]]).\r\t\t\tself success: ((self isWords: bitsObj) and: [(self lengthOf: bitsObj) = 16]).\r\t\t\tmaskBitsIndex _ bitsObj + BaseHeaderSize]].\r\r\tsuccessFlag ifTrue: [\r\t\targumentCount = 0\r\t\t\tifTrue: [self cCode: 'ioSetCursor(cursorBitsIndex, offsetX, offsetY)'\r\t\t\t\t\t\tinSmalltalk: [ourCursor show]]\r\t\t\tifFalse: [self cCode: 'ioSetCursorWithMask(cursorBitsIndex, maskBitsIndex, offsetX, offsetY)'\r\t\t\t\t\t\tinSmalltalk: [ourCursor show]].\r\t\tself pop: argumentCount].\r! !\r\r!Interpreter methodsFor: 'I/O primitives' stamp: 'ikp 8/3/2004 19:59'!\rprimitiveFormPrint\r\t\"On platforms that support it, this primitive prints the receiver, assumed to be a Form, to the default printer.\"\r\r\t| landscapeFlag vScale hScale rcvr bitsArray w h\r\t depth pixelsPerWord wordsPerLine bitsArraySize ok |\r\r\tself var: #vScale declareC: 'double vScale'.\r\tself var: #hScale declareC: 'double hScale'.\r\tlandscapeFlag _ self booleanValueOf: self stackTop.\r\tvScale _ self floatValueOf: (self stackValue: 1).\r\thScale _ self floatValueOf: (self stackValue: 2).\r\trcvr _ self stackValue: 3.\r\t(rcvr isIntegerObject: rcvr) ifTrue: [self success: false].\r\tsuccessFlag ifTrue: [\r\t\t((self  isPointers: rcvr) and: [(self lengthOf: rcvr) >= 4])\r\t\t\tifFalse: [self success: false]].\r\tsuccessFlag ifTrue: [\r\t\tbitsArray _ self fetchPointer: 0 ofObject: rcvr.\r\t\tw _ self fetchInteger: 1 ofObject: rcvr.\r\t\th _ self fetchInteger: 2 ofObject: rcvr.\r\t\tdepth _ self fetchInteger: 3 ofObject: rcvr.\r\t\t(w > 0 and: [h > 0]) ifFalse: [self success: false].\r\t\tpixelsPerWord _ 32 // depth.\r\t\twordsPerLine _ (w + (pixelsPerWord - 1)) // pixelsPerWord.\r\t\t((rcvr isIntegerObject: rcvr) not and: [self isWordsOrBytes: bitsArray])\r\t\t\tifTrue: [\r\t\t\t\tbitsArraySize _ self byteLengthOf: bitsArray.\r\t\t\t\tself success: (bitsArraySize = (wordsPerLine * h * 4))]\r\t\t\tifFalse: [self success: false]].\t\r\tsuccessFlag ifTrue: [\r\t\tBytesPerWord = 8\r\t\t\tifTrue: [ok _ self cCode: 'ioFormPrint(bitsArray + 8, w, h, depth, hScale, vScale, landscapeFlag)']\r\t\t\tifFalse: [ok _ self cCode: 'ioFormPrint(bitsArray + 4, w, h, depth, hScale, vScale, landscapeFlag)'].\r\t\tself success: ok].\r\tsuccessFlag ifTrue: [\r\t\tself pop: 3].  \"pop hScale, vScale, and landscapeFlag; leave rcvr on stack\"\r! !\r\r!Interpreter methodsFor: 'plugin primitives' stamp: 'tpr 3/23/2005 16:33'!\rprimitiveExternalCall\r\t\"Call an external primitive. The external primitive methods \r\tcontain as first literal an array consisting of: \r\t* The module name (String | Symbol) \r\t* The function name (String | Symbol) \r\t* The session ID (SmallInteger) [OBSOLETE] \r\t* The function index (Integer) in the externalPrimitiveTable \r\tFor fast failures the primitive index of any method where the \r\texternal prim is not found is rewritten in the method cache \r\twith zero. This allows for ultra fast responses as long as the \r\tmethod stays in the cache. \r\tThe fast failure response relies on lkupClass being properly \r\tset. This is done in \r\t#addToMethodCacheSel:class:method:primIndex: to \r\tcompensate for execution of methods that are looked up in a \r\tsuperclass (such as in primitivePerformAt). \r\tWith the latest modifications (e.g., actually flushing the \r\tfunction addresses from the VM), the session ID is obsolete. \r\tBut for backward compatibility it is still kept around. Also, a \r\tfailed lookup is reported specially. If a method has been \r\tlooked up and not been found, the function address is stored \r\tas -1 (e.g., the SmallInteger -1 to distinguish from \r\t16rFFFFFFFF which may be returned from the lookup). \r\tIt is absolutely okay to remove the rewrite if we run into any \r\tproblems later on. It has an approximate speed difference of \r\t30% per failed primitive call which may be noticable but if, \r\tfor any reasons, we run into problems (like with J3) we can \r\talways remove the rewrite. \r\t\"\r\t| lit addr moduleName functionName moduleLength functionLength index |\r\tself var: #addr declareC: 'void *addr'.\r\t\r\t\"Fetch the first literal of the method\"\r\tself success: (self literalCountOf: newMethod) > 0. \"@@: Could this be omitted for speed?!!\"\r\tsuccessFlag ifFalse: [^ nil].\r\r\tlit _ self literal: 0 ofMethod: newMethod. \r\t\"Check if it's an array of length 4\"\r\tself success: ((self isArray: lit) and: [(self lengthOf: lit) = 4]).\r\tsuccessFlag ifFalse: [^ nil].\r\r\t\"Look at the function index in case it has been loaded before\"\r\tindex _ self fetchPointer: 3 ofObject: lit.\r\tindex _ self checkedIntegerValueOf: index.\r\tsuccessFlag ifFalse: [^ nil].\r\t\"Check if we have already looked up the function and failed.\"\r\tindex < 0\r\t\tifTrue: [\"Function address was not found in this session, \r\t\t\tRewrite the mcache entry with a zero primitive index.\"\r\t\t\tself\r\t\t\t\trewriteMethodCacheSel: messageSelector\r\t\t\t\tclass: lkupClass\r\t\t\t\tprimIndex: 0.\r\t\t\t^ self success: false].\r\r\t\"Try to call the function directly\"\r\t(index > 0 and: [index <= MaxExternalPrimitiveTableSize])\r\t\tifTrue: [addr _ externalPrimitiveTable at: index - 1.\r\t\t\taddr ~= 0\r\t\t\t\tifTrue: [self rewriteMethodCacheSel: messageSelector class: lkupClass primIndex: (1000 + index) primFunction: addr.\r\t\t\t\t\tself callExternalPrimitive: addr.\r\t\t\t\t\t^ nil].\r\t\t\t\"if we get here, then an index to the external prim was \r\t\t\tkept on the ST side although the underlying prim \r\t\t\ttable was already flushed\"\r\t\t\t^ self primitiveFail].\r\r\t\"Clean up session id and external primitive index\"\r\tself storeInteger: 2 ofObject: lit withValue: ConstZero.\r\tself storeInteger: 3 ofObject: lit withValue: ConstZero.\r\r\t\"The function has not been loaded yet. Fetch module and function name.\"\r\tmoduleName _ self fetchPointer: 0 ofObject: lit.\r\tmoduleName = nilObj\r\t\tifTrue: [moduleLength _ 0]\r\t\tifFalse: [self success: (self isBytes: moduleName).\r\t\t\t\tmoduleLength _ self lengthOf: moduleName.\r\t\t\t\tself cCode: '' inSmalltalk:\r\t\t\t\t\t[ (#('FloatArrayPlugin' 'Matrix2x3Plugin') includes: (self stringOf: moduleName))\r\t\t\t\t\t\tifTrue: [moduleLength _ 0  \"Cause all of these to fail\"]]].\r\tfunctionName _ self fetchPointer: 1 ofObject: lit.\r\tself success: (self isBytes: functionName).\r\tfunctionLength _ self lengthOf: functionName.\r\tsuccessFlag ifFalse: [^ nil].\r\r\t\"Backward compatibility: \r\tAttempt to map any old-style named primitives into the new \r\tones. The old ones are exclusively bound into the VM so we \r\tdon't need to check if a module is given.\"\r\taddr _ 0. \"Addr ~= 0 indicates we have a compat match later\"\r\tmoduleLength = 0\r\t\tifTrue: [\"Search the obsolete named primitive table for a match \"\r\t\tindex _ self findObsoleteNamedPrimitive: ((self pointerForOop: functionName) + BaseHeaderSize) length: functionLength.\r\t\t\t\"The returned value is the index into the obsolete primitive table. \r\t\t\tIf the index is found, use the 'C-style' version of the lookup. \"\r\t\t\tindex < 0 ifFalse: [addr _ self ioLoadFunction: (self cCoerce: ((obsoleteNamedPrimitiveTable at: index) at: 2) to: 'char*')\r\t\t\t\t\t\t\t\tFrom: (self cCoerce: ((obsoleteNamedPrimitiveTable at: index) at: 1) to: 'char*')]].\r\taddr = 0 ifTrue: [\"Only if no compat version was found\"\r\t\t\taddr _ self ioLoadExternalFunction: functionName + BaseHeaderSize\r\t\t\t\t\t\tOfLength: functionLength\r\t\t\t\t\t\tFromModule: moduleName + BaseHeaderSize\r\t\t\t\t\t\tOfLength: moduleLength].\r\taddr = 0\r\t\tifTrue: [index _ -1]\r\t\tifFalse: [\"add the function to the external primitive table\"\r\t\t\tindex _ self addToExternalPrimitiveTable: addr].\r\tself success: index >= 0.\r\t\"Store the index (or -1 if failure) back in the literal\"\r\tself storePointer: 3 ofObject: lit withValue: (self integerObjectOf: index).\r\r\t\"If the function has been successfully loaded process it\"\r\t(successFlag and: [addr ~= 0])\r\t\tifTrue: [self rewriteMethodCacheSel: messageSelector class: lkupClass primIndex: (1000 + index) primFunction: addr.\r\t\t\t\tself callExternalPrimitive: addr]\r\t\tifFalse: [\"Otherwise rewrite the primitive index\"\r\t\t\tself\r\t\t\t\trewriteMethodCacheSel: messageSelector\r\t\t\t\tclass: lkupClass\r\t\t\t\tprimIndex: 0]! !\r\r!Interpreter methodsFor: 'plugin primitives' stamp: 'tpr 3/23/2005 15:28'!\rprimitiveUnloadModule\r\t\"Primitive. Unload the module with the given name.\"\r\t\"Reloading of the module will happen *later* automatically, when a \r\tfunction from it is called. This is ensured by invalidating current sessionID.\"\r\t| moduleName |\r\tself methodArgumentCount = 1 ifFalse:[^self primitiveFail].\r\tmoduleName _ self stackTop.\r\t(self isIntegerObject: moduleName) ifTrue:[^self primitiveFail].\r\t(self isBytes: moduleName) ifFalse:[^self primitiveFail].\r\t(self ioUnloadModule: (self oopForPointer: (self firstIndexableField: moduleName))\r\t\tOfLength: (self byteSizeOf: moduleName)) ifFalse:[^self primitiveFail].\r\tself flushExternalPrimitives.\r\tself forceInterruptCheck.\r\tself pop: 1 \"pop moduleName; return receiver\"! !\r\r!Interpreter methodsFor: 'sound primitives' stamp: 'di 7/7/2004 16:21'!\rprimitiveConstantFill\r\t\"Fill the receiver, which must be an indexable bytes or words \r\tobjects, with the given integer value.\"\r\t| fillValue rcvr rcvrIsBytes end i |\r\tfillValue _ self positive32BitValueOf: self stackTop.\r\trcvr _ self stackValue: 1.\r\tself success: (self isWordsOrBytes: rcvr).\r\trcvrIsBytes _ self isBytes: rcvr.\r\trcvrIsBytes ifTrue: [self success: (fillValue >= 0 and: [fillValue <= 255])].\r\tsuccessFlag\r\t\tifTrue: [end _ rcvr + (self sizeBitsOf: rcvr).\r\t\t\ti _ rcvr + BaseHeaderSize.\r\t\t\trcvrIsBytes\r\t\t\t\tifTrue: [[i < end]\r\t\t\t\t\t\twhileTrue: [self byteAt: i put: fillValue.\r\t\t\t\t\t\t\ti _ i + 1]]\r\t\t\t\tifFalse: [[i < end]\r\t\t\t\t\t\twhileTrue: [self long32At: i put: fillValue.\r\t\t\t\t\t\t\ti _ i + 4]].\r\t\t\tself pop: 1]! !\r\r!Interpreter methodsFor: 'sound primitives' stamp: 'ikp 6/13/2004 22:22'!\rprimitiveIntegerAt\r\t\"Return the 32bit signed integer contents of a words receiver\"\r\r\t| index rcvr sz addr value |\r\tindex _ self stackIntegerValue: 0.\r\trcvr _ self stackValue: 1.\r\t(self isIntegerObject: rcvr) ifTrue: [^self success: false].\r\t(self isWords: rcvr) ifFalse: [^self success: false].\r\tsz _ self lengthOf: rcvr.  \"number of fields\"\r\tself success: ((index >= 1) and: [index <= sz]).\r\tsuccessFlag ifTrue: [\r\t\taddr _ rcvr + BaseHeaderSize - 4 \"for zero indexing\" + (index * 4).\r\t\tvalue _ self intAt: addr.\r\t\tself pop: 2.  \"pop rcvr, index\"\r\t\t\"push element value\"\r\t\t(self isIntegerValue: value)\r\t\t\tifTrue: [self pushInteger: value]\r\t\t\tifFalse: [self push: (self signed32BitIntegerFor: value)].\r\t].! !\r\r!Interpreter methodsFor: 'sound primitives' stamp: 'ikp 6/13/2004 22:22'!\rprimitiveIntegerAtPut\r\t\"Return the 32bit signed integer contents of a words receiver\"\r\t| index rcvr sz addr value valueOop |\r\tvalueOop _ self stackValue: 0.\r\tindex _ self stackIntegerValue: 1.\r\trcvr _ self stackValue: 2.\r\t(self isIntegerObject: rcvr) ifTrue:[^self success: false].\r\t(self isWords: rcvr) ifFalse:[^self success: false].\r\tsz _ self lengthOf: rcvr.  \"number of fields\"\r\t((index >= 1) and: [index <= sz]) ifFalse:[^self success: false].\r\t(self isIntegerObject: valueOop)\r\t\tifTrue:[value _ self integerValueOf: valueOop]\r\t\tifFalse:[value _ self signed32BitValueOf: valueOop].\r\tsuccessFlag ifTrue:[\r\t\taddr _ rcvr + BaseHeaderSize - 4 \"for zero indexing\" + (index * 4).\r\t\tvalue _ self intAt: addr put: value.\r\t\tself pop: 3 thenPush: valueOop. \"pop all; return value\"\r\t].\r! !\r\r!Interpreter methodsFor: 'sound primitives' stamp: 'ikp 6/11/2004 16:44'!\rprimitiveShortAt\r\t\"Treat the receiver, which can be indexible by either bytes or words, as an array of signed 16-bit values. Return the contents of the given index. Note that the index specifies the i-th 16-bit entry, not the i-th byte or word.\"\r\r\t| index rcvr sz addr value |\r\tindex _ self stackIntegerValue: 0.\r\trcvr _ self stackValue: 1.\r\tself success: ((self isIntegerObject: rcvr) not and: [self isWordsOrBytes: rcvr]).\r\tsuccessFlag ifFalse: [ ^ nil ].\r\tsz _ ((self sizeBitsOf: rcvr) - BaseHeaderSize) // 2.  \"number of 16-bit fields\"\r\tself success: ((index >= 1) and: [index <= sz]).\r\tsuccessFlag ifTrue: [\r\t\taddr _ rcvr + BaseHeaderSize + (2 * (index - 1)).\r\t\tvalue _ self shortAt: addr.\r\t\tself pop: 2.  \"pop rcvr, index\"\r\t\tself pushInteger: value.  \"push element value\"\r\t]! !\r\r!Interpreter methodsFor: 'sound primitives' stamp: 'ikp 6/11/2004 16:44'!\rprimitiveShortAtPut\r\t\"Treat the receiver, which can be indexible by either bytes or words, as an array of signed 16-bit values. Set the contents of the given index to the given value. Note that the index specifies the i-th 16-bit entry, not the i-th byte or word.\"\r\r\t| index rcvr sz addr value |\r\tvalue _ self stackIntegerValue: 0.\r\tindex _ self stackIntegerValue: 1.\r\trcvr _ self stackValue: 2.\r\tself success: ((self isIntegerObject: rcvr) not and: [self isWordsOrBytes: rcvr]).\r\tsuccessFlag ifFalse: [ ^ nil ].\r\tsz _ ((self sizeBitsOf: rcvr) - BaseHeaderSize) // 2.  \"number of 16-bit fields\"\r\tself success: ((index >= 1) and: [index <= sz]).\r\tself success: ((value >= -32768) and: [value <= 32767]).\r\tsuccessFlag ifTrue: [\r\t\taddr _ rcvr + BaseHeaderSize + (2 * (index - 1)).\r\t\tself shortAt: addr put: value.\r\t\tself pop: 2.  \"pop index and value; leave rcvr on stack\"\r\t]! !\r\r!Interpreter methodsFor: 'other primitives' stamp: 'ikp 6/10/2004 12:08'!\rprimitiveImageName\r\t\"When called with a single string argument, record the string as the current image file name. When called with zero arguments, return a string containing the current image file name.\"\r\r\t| s sz sCRIfn okToRename |\r\tself var: #sCRIfn declareC: 'void *sCRIfn'.\r\targumentCount = 1 ifTrue: [\r\t\t\"If the security plugin can be loaded, use it to check for rename permission.\r\t\tIf not, assume it's ok\"\r\t\tsCRIfn _ self ioLoadFunction: 'secCanRenameImage' From: 'SecurityPlugin'.\r\t\tsCRIfn ~= 0 ifTrue:[okToRename _ self cCode:' ((sqInt (*)(void))sCRIfn)()'.\r\t\t\tokToRename ifFalse:[^self primitiveFail]].\r\t\ts _ self stackTop.\r\t\tself assertClassOf: s is: (self splObj: ClassString).\r\t\tsuccessFlag ifTrue: [\r\t\t\tsz _ self stSizeOf: s.\r\t\t\tself imageNamePut: (s + BaseHeaderSize) Length: sz.\r\t\t\tself pop: 1.  \"pop s, leave rcvr on stack\"\r\t\t].\r\t] ifFalse: [\r\t\tsz _ self imageNameSize.\r\t\ts _ self instantiateClass: (self splObj: ClassString) indexableSize: sz.\r\t\tself imageNameGet: (s + BaseHeaderSize) Length: sz.\r\t\tself pop: 1.  \"rcvr\"\r\t\tself push: s.\r\t].\r! !\r\r!Interpreter methodsFor: 'other primitives' stamp: 'ikp 6/10/2004 14:15'!\rprimitiveObsoleteIndexedPrimitive\r\t\"Primitive. Invoke an obsolete indexed primitive.\"\r\r\t| pluginName functionName functionAddress |\r\tself var: #pluginName declareC: 'char *pluginName'.\r\tself var: #functionName declareC: 'char *functionName'.\r\tself var: #functionAddress declareC: 'void *functionAddress'.\r\tfunctionAddress _ self cCoerce: ((obsoleteIndexedPrimitiveTable at: primitiveIndex) at: 2) to: 'void *'.\r\tfunctionAddress = nil \r\t\tifFalse: [^self cCode: '((sqInt (*)(void))functionAddress)()'\r\t\t\t\t\tinSmalltalk: [self callExternalPrimitive: functionAddress]].\r\tpluginName _ (obsoleteIndexedPrimitiveTable at: primitiveIndex) at: 0.\r\tfunctionName _ (obsoleteIndexedPrimitiveTable at: primitiveIndex) at: 1.\r\t(pluginName = nil and: [functionName = nil]) \r\t\tifTrue: [^self primitiveFail].\r\tfunctionAddress _ self ioLoadFunction: functionName From: pluginName.\r\tfunctionAddress = 0 ifFalse: [\"Cache for future use\"\r\t\t(obsoleteIndexedPrimitiveTable at: primitiveIndex) at: 2 put: \r\t\t\t(self cCoerce: functionAddress to: 'char*').\r\t\t^self cCode: '((sqInt (*)(void))functionAddress)()'\r\t\t\t\tinSmalltalk: [self callExternalPrimitive: functionAddress]].\r\t^self primitiveFail! !\r\r!Interpreter methodsFor: 'other primitives' stamp: 'ikp 3/31/2005 11:48'!\rprimitiveVMParameter\r\t\"Behaviour depends on argument count:\r\t\t0 args:\treturn an Array of VM parameter values;\r\t\t1 arg:\treturn the indicated VM parameter;\r\t\t2 args:\tset the VM indicated parameter.\r\tVM parameters are numbered as follows:\r\t\t1\tend of old-space (0-based, read-only)\r\t\t2\tend of young-space (read-only)\r\t\t3\tend of memory (read-only)\r\t\t4\tallocationCount (read-only)\r\t\t5\tallocations between GCs (read-write)\r\t\t6\tsurvivor count tenuring threshold (read-write)\r\t\t7\tfull GCs since startup (read-only)\r\t\t8\ttotal milliseconds in full GCs since startup (read-only)\r\t\t9\tincremental GCs since startup (read-only)\r\t\t10\ttotal milliseconds in incremental GCs since startup (read-only)\r\t\t11\ttenures of surving objects since startup (read-only)\r\t\t12-20 specific to the translating VM\r\t\t21\troot table size (read-only)\r\t\t22\troot table overflows since startup (read-only)\r\t\t23\tbytes of extra memory to reserve for VM buffers, plugins, etc.\r\r\t\t24\tmemory headroom when growing object memory (rw)\r\t\t25\tmemory threshold above which shrinking object memory (rw)\r\t\t26\tinterruptChecksEveryNms - force an ioProcessEvents every N milliseconds, in case the image is not calling getNextEvent often (rw)\r\t\t27\tBytesPerWord for this image\r\r\tNote: Thanks to Ian Piumarta for this primitive.\"\r\r\t| mem paramsArraySize result arg index |\r\tmem _ self startOfMemory.\r\tparamsArraySize _ 27.\r\targumentCount = 0 ifTrue: [\r\t\tresult _ self instantiateClass: (self splObj: ClassArray) indexableSize: paramsArraySize.\r\t\t0 to: paramsArraySize - 1 do:\r\t\t\t[:i | self storePointer: i ofObject: result withValue: (self integerObjectOf: 0)].\r\t\tself storePointer: 0\tofObject: result withValue: (self integerObjectOf: youngStart - mem).\r\t\tself storePointer: 1\t\tofObject: result withValue: (self integerObjectOf: freeBlock - mem).\r\t\tself storePointer: 2\tofObject: result withValue: (self integerObjectOf: endOfMemory - mem).\r\t\tself storePointer: 3\tofObject: result withValue: (self integerObjectOf: allocationCount).\r\t\tself storePointer: 4\tofObject: result withValue: (self integerObjectOf: allocationsBetweenGCs).\r\t\tself storePointer: 5\tofObject: result withValue: (self integerObjectOf: tenuringThreshold).\r\t\tself storePointer: 6\tofObject: result withValue: (self integerObjectOf: statFullGCs).\r\t\tself storePointer: 7\tofObject: result withValue: (self integerObjectOf: statFullGCMSecs).\r\t\tself storePointer: 8\tofObject: result withValue: (self integerObjectOf: statIncrGCs).\r\t\tself storePointer: 9\tofObject: result withValue: (self integerObjectOf: statIncrGCMSecs).\r\t\tself storePointer: 10\tofObject: result withValue: (self integerObjectOf: statTenures).\r\t\tself storePointer: 20\tofObject: result withValue: (self integerObjectOf: rootTableCount).\r\t\tself storePointer: 21\tofObject: result withValue: (self integerObjectOf: statRootTableOverflows).\r\t\tself storePointer: 22\tofObject: result withValue: (self integerObjectOf: extraVMMemory).\r\t\tself storePointer: 23\tofObject: result withValue: (self integerObjectOf: shrinkThreshold).\r\t\tself storePointer: 24\tofObject: result withValue: (self integerObjectOf: growHeadroom).\r\t\tself storePointer: 25\tofObject: result withValue: (self integerObjectOf: interruptChecksEveryNms).\r\t\tself storePointer: 26\tofObject: result withValue: (self integerObjectOf: BytesPerWord).\r\t\tself pop: 1 thenPush: result.\r\t\t^nil].\r\r\targ _ self stackTop.\r\t(self isIntegerObject: arg) ifFalse: [^self primitiveFail].\r\targ _ self integerValueOf: arg.\r\targumentCount = 1 ifTrue: [\t \"read VM parameter\"\r\t\t(arg < 1 or: [arg > paramsArraySize]) ifTrue: [^self primitiveFail].\r\t\targ = 1\t\tifTrue: [result _ youngStart - mem].\r\t\targ = 2\t\tifTrue: [result _ freeBlock - mem].\r\t\targ = 3\t\tifTrue: [result _ endOfMemory - mem].\r\t\targ = 4\t\tifTrue: [result _ allocationCount].\r\t\targ = 5\t\tifTrue: [result _ allocationsBetweenGCs].\r\t\targ = 6\t\tifTrue: [result _ tenuringThreshold].\r\t\targ = 7\t\tifTrue: [result _ statFullGCs].\r\t\targ = 8\t\tifTrue: [result _ statFullGCMSecs].\r\t\targ = 9\t\tifTrue: [result _ statIncrGCs].\r\t\targ = 10\t\tifTrue: [result _ statIncrGCMSecs].\r\t\targ = 11\t\tifTrue: [result _ statTenures].\r\t\t((arg >= 12) and: [arg <= 20]) ifTrue: [result _ 0].\r\t\targ = 21\t\tifTrue: [result _ rootTableCount].\r\t\targ = 22\t\tifTrue: [result _ statRootTableOverflows].\r\t\targ = 23\t\tifTrue: [result _ extraVMMemory].\r\t\targ = 24\t\tifTrue: [result _ shrinkThreshold].\r\t\targ = 25 \tifTrue: [result _ growHeadroom].\r\t\targ = 26\t\tifTrue: [result _ interruptChecksEveryNms]. \r\t\targ = 27 \tifTrue: [result _ BytesPerWord].\r\t\tself pop: 2 thenPush: (self integerObjectOf: result).\r\t\t^nil].\r\r\t\"write a VM parameter\"\r\targumentCount = 2 ifFalse: [^self primitiveFail].\r\tindex _ self stackValue: 1.\r\t(self isIntegerObject: index) ifFalse: [^self primitiveFail].\r\tindex _ self integerValueOf: index.\r\tindex <= 0 ifTrue: [^self primitiveFail].\r\tsuccessFlag _ false.\r\tindex = 5 ifTrue: [\r\t\tresult _ allocationsBetweenGCs.\r\t\tallocationsBetweenGCs _ arg.\r\t\tsuccessFlag _ true].\r\tindex = 6 ifTrue: [\r\t\tresult _ tenuringThreshold.\r\t\ttenuringThreshold _ arg.\r\t\tsuccessFlag _ true].\r\tindex = 23 ifTrue: [\r\t\tresult _ extraVMMemory.\r\t\textraVMMemory _ arg.\r\t\tsuccessFlag _ true].\r\tindex = 24 ifTrue: [\r\t\tresult _ shrinkThreshold.\r\t\targ > 0 ifTrue:[\r\t\t\tshrinkThreshold _ arg.\r\t\t\tsuccessFlag _ true]].\r\tindex = 25 ifTrue: [\r\t\tresult _ growHeadroom.\r\t\targ > 0 ifTrue:[\r\t\t\tgrowHeadroom _ arg.\r\t\t\tsuccessFlag _ true]].\r\tindex = 26 ifTrue: [\r\t\targ > 1 ifTrue:[\r\t\t\tresult _ interruptChecksEveryNms.\r\t\t\tinterruptChecksEveryNms _ arg.\r\t\t\tsuccessFlag _ true]]. \r\r\tsuccessFlag ifTrue: [\r\t\tself pop: 3 thenPush: (self integerObjectOf: result).  \"return old value\"\r\t\t^ nil].\r\r\tself primitiveFail.  \"attempting to write a read-only parameter\"\r! !\r\r!Interpreter methodsFor: 'Ian fixes for missing stuff' stamp: 'ikp 8/2/2004 18:08'!\rdispatchFunctionPointer: aFunctionPointer\r\r\tself var: #aFunctionPointer type: 'void *'.\r\tself cCode: '((void (*)(void))aFunctionPointer)()'\r\t\t\tinSmalltalk: [self error: 'my simulator should simulate me']! !\r\r!Interpreter methodsFor: 'Ian fixes for missing stuff' stamp: 'ikp 8/2/2004 18:18'!\rdispatchFunctionPointerOn: primIdx in: primTable\r\t\"Call the primitive at index primIdx in the primitiveTable.\"\r\r\tself var: #primTable declareC: 'void *primTable[]'.\r\t^self dispatchFunctionPointer: (primTable at: primIdx)! !\r\r!Interpreter methodsFor: 'bitblt support' stamp: 'ikp 6/10/2004 14:04'!\rcopyBits\r\t\"This entry point needs to be implemented for the interpreter proxy.\r\tSince BitBlt is now a plugin we need to look up BitBltPlugin_copyBits\r\tand call it. This entire mechanism should eventually go away and be\r\treplaced with a dynamic lookup from BitBltPlugin itself but for backward\r\tcompatibility this stub is provided\"\r\r\t| fn |\r\tself var: #fn declareC: 'void *fn'.\r\tfn _ self ioLoadFunction: 'copyBits' From: 'BitBltPlugin'.\r\tfn = 0 ifTrue: [^self primitiveFail].\r\t^self cCode: '((sqInt (*)(void))fn)()'! !\r\r!Interpreter methodsFor: 'bitblt support' stamp: 'ikp 6/10/2004 11:47'!\rcopyBitsFrom: x0 to: x1 at: y\r\t\"This entry point needs to be implemented for the interpreter proxy.\r\tSince BitBlt is now a plugin we need to look up BitBltPlugin_copyBitsFrom:to:at:\r\tand call it. This entire mechanism should eventually go away and be\r\treplaced with a dynamic lookup from BitBltPlugin itself but for backward\r\tcompatibility this stub is provided\"\r\r\t| fn |\r\tself var: #fn declareC: 'void *fn'.\r\tfn _ self ioLoadFunction: 'copyBitsFromtoat' From: 'BitBltPlugin'.\r\tfn = 0 ifTrue: [^self primitiveFail].\r\t^self cCode: '((sqInt (*)(sqInt, sqInt, sqInt))fn)(x0, x1, y)'! !\r\r!Interpreter methodsFor: 'bitblt support' stamp: 'ikp 6/10/2004 11:52'!\rloadBitBltFrom: bb\r\t\"This entry point needs to be implemented for the interpreter proxy.\r\tSince BitBlt is now a plugin we need to look up BitBltPlugin_loadBitBltFrom\r\tand call it. This entire mechanism should eventually go away and be\r\treplaced with a dynamic lookup from BitBltPlugin itself but for backward\r\tcompatibility this stub is provided\"\r\t| fn |\r\tself var: #fn declareC: 'void *fn'.\r\tfn _ self ioLoadFunction: 'loadBitBltFrom' From: 'BitBltPlugin'.\r\tfn = 0 ifTrue: [^self primitiveFail].\r\t^self cCode: '((sqInt (*)(sqInt))fn)(bb)'! !\r\r\r!InterpreterSimulator methodsFor: 'interpreter shell' stamp: 'ikp 8/2/2004 17:59'!\rfunctionPointerFor: primIndex inClass: lookupClass\r\t\"Override Interpreter to handle the external primitives caching.  See also \tinternalExecuteNewMethod.\"\r\r\t^(primIndex between: 1 and: MaxPrimitiveIndex)\r\t\tifTrue: [primitiveTable at: primIndex + 1]! !\r\r!InterpreterSimulator methodsFor: 'interpreter shell' stamp: 'tpr 6/23/2004 15:12'!\rinternalExecuteNewMethod\r\"Override the Interpreter version to trap cached external prims.\rThese have a 'prim index' of 1000 + the externalPrimitiveTableIndex normally used\"\r\tprimitiveIndex < 1000 ifTrue:[^super internalExecuteNewMethod].\r\tself externalizeIPandSP.\r\tself callExternalPrimitive: (externalPrimitiveTable at: primitiveIndex - 1001).\r\tself internalizeIPandSP! !\r\r!InterpreterSimulator methodsFor: 'memory access' stamp: 'di 6/23/2004 14:09'!\rbyteAtPointer: pointer\r\t\"This gets implemented by Macros in C, where its types will also be checked.\r\tpointer is a raw address, and byte is an 8-bit quantity.\"\r\r\t^ self byteAt: pointer! !\r\r!InterpreterSimulator methodsFor: 'memory access' stamp: 'di 6/23/2004 14:13'!\rbyteAtPointer: pointer put: byteValue\r\t\"This gets implemented by Macros in C, where its types will also be checked.\r\tpointer is a raw address, and byteValue is an 8-bit quantity.\"\r\r\t^ self byteAt: pointer  put: byteValue! !\r\r!InterpreterSimulator methodsFor: 'memory access' stamp: 'di 7/17/2004 12:59'!\rfirstIndexableField: oop\r\t\"NOTE: overridden from Interpreter to add coercion to CArray\"\r\r\t| hdr fmt totalLength fixedFields |\r\tself returnTypeC: 'void *'.\r\thdr _ self baseHeader: oop.\r\tfmt _ (hdr >> 8) bitAnd: 16rF.\r\ttotalLength _ self lengthOf: oop baseHeader: hdr format: fmt.\r\tfixedFields _ self fixedFieldsOf: oop format: fmt length: totalLength.\r\tfmt < 8 ifTrue:\r\t\t[fmt = 6 ifTrue:\r\t\t\t[\"32 bit field objects\"\r\t\t\t^ self cCoerce: (self pointerForOop: oop + BaseHeaderSize + (fixedFields << 2)) to: 'int *'].\r\t\t\"full word objects (pointer or bits)\"\r\t\t^ self cCoerce: (self pointerForOop: oop + BaseHeaderSize + (fixedFields << ShiftForWord)) to: 'oop *']\r\t\tifFalse:\r\t\t[\"Byte objects\"\r\t\t^ self cCoerce: (self pointerForOop: oop + BaseHeaderSize + fixedFields) to: 'char *']! !\r\r!InterpreterSimulator methodsFor: 'memory access' stamp: 'di 7/16/2004 14:56'!\rhalfWordHighInLong32: long32\r\t^self subclassResponsibility! !\r\r!InterpreterSimulator methodsFor: 'memory access' stamp: 'di 7/16/2004 14:57'!\rhalfWordLowInLong32: long32\r\t^self subclassResponsibility! !\r\r!InterpreterSimulator methodsFor: 'memory access' stamp: 'di 8/5/2004 22:09'!\rintegerObjectOf: value\r\t\"The simulator works with strictly positive bit patterns\"\r\tvalue < 0\r\t\tifTrue: [^ ((16r80000000 + value) << 1) + 1]\r\t\tifFalse: [^ (value << 1) + 1]! !\r\r!InterpreterSimulator methodsFor: 'memory access' stamp: 'di 7/3/2004 10:47'!\rlong32At: byteAddress\r\t\"Return the 32-bit word at byteAddress which must be 0 mod 4.\"\r\r\t^ self longAt: byteAddress! !\r\r!InterpreterSimulator methodsFor: 'memory access' stamp: 'di 7/3/2004 10:47'!\rlong32At: byteAddress put: a32BitValue\r\t\"Store the 32-bit value at byteAddress which must be 0 mod 4.\"\r\r\t^ self longAt: byteAddress put: a32BitValue! !\r\r!InterpreterSimulator methodsFor: 'memory access'!\rlongAt: byteAddress\r\t\"Note: Adjusted for Smalltalk's 1-based array indexing.\"\r\r\t^memory at: (byteAddress // 4) + 1! !\r\r!InterpreterSimulator methodsFor: 'memory access'!\rlongAt: byteAddress put: a32BitValue\r\t\"Note: Adjusted for Smalltalk's 1-based array indexing.\"\r\r\t^memory at: (byteAddress // 4) + 1 put: a32BitValue! !\r\r!InterpreterSimulator methodsFor: 'memory access' stamp: 'di 6/23/2004 14:03'!\rlongAtPointer: pointer\r\t\"This gets implemented by Macros in C, where its types will also be checked.\r\tpointer is a raw address, and the result is the width of a machine word.\"\r\r\t^ self longAt: pointer! !\r\r!InterpreterSimulator methodsFor: 'memory access' stamp: 'di 6/23/2004 14:05'!\rlongAtPointer: pointer put: longValue\r\t\"This gets implemented by Macros in C, where its types will also be checked.\r\tpointer is a raw address, and longValue is the width of a machine word.\"\r\r\t^ self longAt: pointer put: longValue! !\r\r!InterpreterSimulator methodsFor: 'memory access' stamp: 'di 6/23/2004 14:07'!\roopForPointer: pointer\r\t\"This gets implemented by Macros in C, where its types will also be checked.\r\toop is the width of a machine word, and pointer is a raw address.\"\r\r\t^ pointer! !\r\r!InterpreterSimulator methodsFor: 'memory access' stamp: 'di 6/23/2004 14:07'!\rpointerForOop: oop\r\t\"This gets implemented by Macros in C, where its types will also be checked.\r\toop is the width of a machine word, and pointer is a raw address.\"\r\r\t^ oop! !\r\r!InterpreterSimulator methodsFor: 'memory access' stamp: 'di 6/23/2004 14:29'!\rshortAt: byteAddress\r    \"Return the half-word at byteAddress which must be even.\"\r\t^self subclassResponsibility! !\r\r!InterpreterSimulator methodsFor: 'memory access' stamp: 'di 6/23/2004 14:32'!\rshortAt: byteAddress put: a16BitValue\r\t^ self subclassResponsibility! !\r\r!InterpreterSimulator methodsFor: 'memory access' stamp: 'di 5/11/2004 18:29'!\rsqGrowMemory: oldLimit By: delta\r\r\ttranscript show: 'grow memory from ', oldLimit printString, ' by ', delta printString; cr.\r\tmemory _ memory , (memory class new: delta // 4).\r\t^ memory size * 4! !\r\r!InterpreterSimulator methodsFor: 'memory access' stamp: 'di 5/11/2004 18:29'!\rsqShrinkMemory: oldLimit By: delta\r\ttranscript show: 'shrink memory from ', oldLimit printString, ' by ', delta printString, ' remember it doesn''t actually shrink in simulation'; cr.\r\r\t^ oldLimit! !\r\r!InterpreterSimulator methodsFor: 'plugin support' stamp: 'di 7/17/2004 10:23'!\rloadNewPlugin: pluginString\r\t| plugin simClass |\r\ttranscript cr; show:'Looking for module ', pluginString.\r\t(#('FloatArrayPlugin' 'Matrix2x3Plugin')\r\t\tincludes: pluginString) ifTrue:\r\t\t[transcript show: ' ... defeated'. ^ nil].\r\tplugin _ simClass _ nil.\r\tInterpreterPlugin allSubclassesDo:[:plg|\r\t\tplg moduleName asString = pluginString asString ifTrue:[\r\t\t\tsimClass _ plg simulatorClass.\r\t\t\tplugin ifNil:[plugin _ simClass]\r\t\t\t\tifNotNil:[plugin == simClass ifFalse:[^self error:'This won''t work...']].\r\t\t].\r\t].\r\tplugin ifNil:[transcript show: ' ... not found'. ^nil].\r\tplugin _ plugin new.\r\tplugin setInterpreter: self. \"Ignore return value from setInterpreter\"\r\t(plugin respondsTo: #initialiseModule) ifTrue:[\r\t\tplugin initialiseModule ifFalse:[transcript show: ' ... initialiser failed'.^nil]. \"module initialiser failed\"\r\t].\r\tpluginList _ pluginList copyWith: (pluginString asString -> plugin).\r\ttranscript show:' ... loaded'.\r\t^pluginList last! !\r\r!InterpreterSimulator methodsFor: 'debug support' stamp: 'di 7/20/2004 12:07'!\rallObjectsDo: objBlock\r\r\t| oop |\r\toop _ self firstObject.\r\t[oop < endOfMemory] whileTrue:\r\t\t\t[(self isFreeObject: oop)\r\t\t\t\tifFalse: [objBlock value: oop].\r\t\t\toop _ self objectAfter: oop].\r! !\r\r!InterpreterSimulator methodsFor: 'debug support' stamp: 'di 7/20/2004 12:11'!\rallObjectsSelect: objBlock\r\t\"self allObjectsSelect: [:oop | (self baseHeader: oop) = 1234]\"\r\r\t| oop selected |\r\toop _ self firstObject.\r\tselected _ OrderedCollection new.\r\t[oop < endOfMemory] whileTrue:\r\t\t\t[(self isFreeObject: oop)\r\t\t\t\tifFalse: [(objBlock value: oop) ifTrue: [selected addLast: oop]].\r\t\t\toop _ self objectAfter: oop].\r\t^ selected! !\r\r!InterpreterSimulator methodsFor: 'debug support' stamp: 'di 6/21/2004 15:05'!\rbyteCount\r\t\"So you can call this from temp debug statements in, eg, Interpreter, such as\r\tself byteCount = 12661 ifTrue: [self halt].\r\t\"\r\r\t^ byteCount! !\r\r!InterpreterSimulator methodsFor: 'debug support' stamp: 'di 6/28/2004 17:24'!\rcheckForInterrupts\r\t\"Prevent interrupts so that traces are consistent during detailed debugging\"\r\r\ttrue ifTrue: [^ self].\r\t^ super checkForInterrupts! !\r\r!InterpreterSimulator methodsFor: 'debug support' stamp: 'di 7/21/2004 15:58'!\rfullDisplayUpdate\r\t\"Preserve successFlag when call asynchronously from Simulator\"\r\t| s |\r\ts _ successFlag.\r\tsuccessFlag _ true.\r\tsuper fullDisplayUpdate.\r\tsuccessFlag _ s! !\r\r!InterpreterSimulator methodsFor: 'debug support' stamp: 'di 5/11/2004 18:26'!\rfullGC\r\ttranscript cr; show:'<Running full GC ...'.\r\tsuper fullGC.\r\ttranscript show: ' done>'.! !\r\r!InterpreterSimulator methodsFor: 'debug support' stamp: 'di 7/19/2004 14:39'!\rlongPrint: oop\r\t| lastPtr val lastLong hdrType prevVal |\r\t(self isIntegerObject: oop) ifTrue: [^ self shortPrint: oop].\r\t^ String streamContents:\r\t\t[:strm |\r\t\tlastPtr _ 64*BytesPerWord min: (self lastPointerOf: oop).\r\t\thdrType _ self headerType: oop.\r\t\thdrType = 2 ifTrue: [lastPtr _ 0].\r\t\tprevVal _ 0.\r\t\t(self headerStart: oop) to: lastPtr by: BytesPerWord do:\r\t\t\t[:a | val _ self longAt: oop+a.\r\t\t\t(a > 0 and: [(val = prevVal) & (a ~= lastPtr)])\r\t\t\tifTrue:\r\t\t\t[prevVal = (self longAt: oop+a-(BytesPerWord*2)) ifFalse: [strm cr; nextPutAll: '        ...etc...']]\r\t\t\tifFalse:\r\t\t\t[strm cr; nextPutAll: (a<16 ifTrue: [' ', a hex] ifFalse: [a hex]); \r\t\t\t\tspace; space; space; nextPutAll: val hex8; space; space.\r\t\t\ta = (BytesPerWord*2) negated ifTrue:\r\t\t\t\t[strm nextPutAll: 'size = ' , (val - hdrType) hex].\r\t\t\ta = BytesPerWord negated ifTrue:\r\t\t\t\t[strm nextPutAll: '<' , (self nameOfClass: (val - hdrType)) , '>'].\r\t\t\ta = 0 ifTrue: [strm cr; tab; nextPutAll: (self dumpHeader: val)].\r\t\t\ta > 0 ifTrue: [strm nextPutAll: (self shortPrint: val)].\r\t\t\ta = BytesPerWord ifTrue:\r\t\t\t\t[(self fetchClassOf: oop) = (self splObj: ClassCompiledMethod) ifTrue:\r\t\t\t\t\t\t\t[strm cr; tab; nextPutAll: (self dumpMethodHeader: val)]]].\r\t\t\tprevVal _ val].\r\t\tlastLong _ 256 min: (self sizeBitsOf: oop) - BaseHeaderSize.\r\t\thdrType = 2\r\t\t\tifTrue:\r\t\t\t[\"free\" strm cr; nextPutAll: (oop+(self longAt: oop)-2) hex;\r\t\t\tspace; space; nextPutAll: (oop+(self longAt: oop)-2) printString]\r\t\t\tifFalse:\r\t\t\t[(self formatOf: oop) = 3\r\t\t\tifTrue:\r\t\t\t\t[strm cr; tab; nextPutAll: '/ next 3 fields are above SP... /'.\r\t\t\t\tlastPtr+BytesPerWord to: lastPtr+(3*BytesPerWord) by: BytesPerWord do:\r\t\t\t\t\t[:a | val _ self longAt: oop+a.\r\t\t\t\t\tstrm cr; nextPutAll: a hex; \r\t\t\t\t\t\tspace; space; space; nextPutAll: val hex8; space; space.\r\t\t\t\t\t(self validOop: val) ifTrue: [strm nextPutAll: (self shortPrint: val)]]]\r\t\t\tifFalse:\r\t\t\t[lastPtr+BytesPerWord to: lastLong by: BytesPerWord do:\r\t\t\t\t[:a | val _ self longAt: oop+a.\r\t\t\t\tstrm cr; nextPutAll: (a<16 ifTrue: [' ', a hex] ifFalse: [a hex]); \r\t\t\t\t\tspace; space; space.\r\t\t\t\tstrm nextPutAll: val hex8; space; space;\r\t\t\t\t\t\tnextPutAll: (self charsOfLong: val)]]].\r\t]! !\r\r!InterpreterSimulator methodsFor: 'debug support' stamp: 'di 6/29/2004 14:27'!\rlookupMethodInClass: class\r\t| currentClass dictionary found rclass |\r\r\t\"This method overrides the interp, causing a halt on MNU.\"\r\t\"true ifTrue: [^ super lookupMethodInClass: class].\"    \"Defeat debug support\"\r\r\tcurrentClass _ class.\r\t[currentClass ~= nilObj]\r\t\twhileTrue:\r\t\t[dictionary _ self fetchPointer: MessageDictionaryIndex ofObject: currentClass.\r\t\tdictionary = nilObj ifTrue:\r\t\t\t[\"MethodDict pointer is nil (hopefully due a swapped out stub)\r\t\t\t\t-- raise exception #cannotInterpret:.\"\r\t\t\tself pushRemappableOop: currentClass.  \"may cause GC!!\"\r\t\t\tself createActualMessageTo: class.\r\t\t\tcurrentClass _ self popRemappableOop.\r\t\t\tmessageSelector _ self splObj: SelectorCannotInterpret.\r\t\t\t^ self lookupMethodInClass: (self superclassOf: currentClass)].\r\r\t\tfound _ self lookupMethodInDictionary: dictionary.\r\t\tfound ifTrue: [^ methodClass _ currentClass].\r\t\tcurrentClass _ self superclassOf: currentClass].\r\r\t\"Could not find #doesNotUnderstand: -- unrecoverable error.\"\r\tmessageSelector = (self splObj: SelectorDoesNotUnderstand) ifTrue:\r\t\t[self error: 'Recursive not understood error encountered'].\r\rself halt: (self stringOf: messageSelector).\r\r\t\"Cound not find a normal message -- raise exception #doesNotUnderstand:\"\r\tself pushRemappableOop: class.  \"may cause GC!!\"\r\tself createActualMessageTo: class.\r\trclass _ self popRemappableOop.\r\tmessageSelector _ self splObj: SelectorDoesNotUnderstand.\r\t^ self lookupMethodInClass: rclass! !\r\r!InterpreterSimulator methodsFor: 'debug support' stamp: 'di 6/13/2004 07:00'!\rnameOfClass: classOop\r\t(self sizeBitsOf: classOop) = (Metaclass instSize +1*BytesPerWord) ifTrue:\r\t\t[^ (self nameOfClass:\r\t\t\t\t(self fetchPointer: 5 \"thisClass\" ofObject: classOop)) , ' class'].\r\t^ self stringOf: (self fetchPointer: 6 \"name\" ofObject: classOop)! !\r\r!InterpreterSimulator methodsFor: 'debug support' stamp: 'di 7/19/2004 14:48'!\rprintStack\r\t^ self printStack: false! !\r\r!InterpreterSimulator methodsFor: 'debug support' stamp: 'di 7/19/2004 14:49'!\rprintStack: includeTemps\r\t| ctxt |\r\tctxt _ activeContext.\r\t^ String streamContents:\r\t\t[:strm |\r\t\t[self printStackFrame: ctxt onStream: strm.\r\t\tincludeTemps ifTrue: [self printStackTemps: ctxt onStream: strm].\r\t\t(ctxt _ (self fetchPointer: SenderIndex ofObject: ctxt)) = nilObj]\r\t\t\t\twhileFalse: [].\r\t\t]! !\r\r!InterpreterSimulator methodsFor: 'debug support' stamp: 'di 7/19/2004 14:49'!\rprintStackFrame: ctxt onStream: strm\r\t| classAndSel home |\r\thome _ (self fetchClassOf: ctxt) = (self splObj: ClassBlockContext)\r\t\tifTrue: [self fetchPointer: HomeIndex ofObject: ctxt]\r\t\tifFalse: [ctxt].\r\tclassAndSel _ self\r\t\tclassAndSelectorOfMethod: (self fetchPointer: MethodIndex ofObject: home)\r\t\tforReceiver: (self fetchPointer: ReceiverIndex ofObject: home).\r\tstrm cr; nextPutAll: ctxt hex8.\r\tctxt = home ifFalse: [strm nextPutAll: ' [] in'].\r\tstrm space; nextPutAll: (self nameOfClass: classAndSel first).\r\tstrm nextPutAll: '>>'; nextPutAll: (self shortPrint: classAndSel last).\r! !\r\r!InterpreterSimulator methodsFor: 'debug support' stamp: 'di 7/20/2004 22:23'!\rprintStackTemps: ctxt onStream: strm\r\t| home cMethod nArgs nTemps oop |\r\thome _ (self fetchClassOf: ctxt) = (self splObj: ClassBlockContext)\r\t\tifTrue: [self fetchPointer: HomeIndex ofObject: ctxt]\r\t\tifFalse: [ctxt].\r\tcMethod _ self fetchPointer: MethodIndex ofObject: home.\r\tnArgs _ nTemps _ 0.\r\r\thome = ctxt ifTrue:\r\t\t[strm cr; tab; nextPutAll: 'args: '.\r\t\tnArgs _ self argumentCountOf: cMethod.\r\t\t1 to: nArgs do:\r\t\t\t[:i | oop _ self fetchPointer: TempFrameStart + i-1 ofObject: ctxt.\r\t\t\tstrm nextPutAll: oop hex; space].\r\r\t\tstrm cr; tab; nextPutAll: 'temps: '.\r\t\tnTemps _ self tempCountOf: cMethod.\r\t\tnArgs+1 to: nTemps do:\r\t\t\t[:i | oop _ self fetchPointer: TempFrameStart + i-1 ofObject: ctxt.\r\t\t\tstrm nextPutAll: oop hex; space]].\r\t\r\tstrm cr; tab; nextPutAll: 'stack: '.\r\tnTemps + 1 to: (self lastPointerOf: ctxt)//BytesPerWord - TempFrameStart do:\r\t\t[:i | oop _ self fetchPointer: TempFrameStart + i-1 ofObject: ctxt.\r\t\t\tstrm nextPutAll: oop hex; space].\r\t! !\r\r!InterpreterSimulator methodsFor: 'debug support' stamp: 'di 7/19/2004 15:28'!\rprintStackWithTemps\r\t^ self printStack: true! !\r\r!InterpreterSimulator methodsFor: 'debug support' stamp: 'di 6/15/2004 09:21'!\rprintTop: n\r\t\"Print important fields of the top n contexts\"\r\t| ctxt classAndSel home top ip sp |\r\tctxt _ activeContext.\r\t^ String streamContents:\r\t\t[:strm | 1 to: n do:\r\t\t\t[:i |\r\t\t\thome _ (self fetchClassOf: ctxt) = (self splObj: ClassBlockContext)\r\t\t\t\tifTrue: [self fetchPointer: HomeIndex ofObject: ctxt]\r\t\t\t\tifFalse: [ctxt].\r\t\t\tclassAndSel _ self\r\t\t\t\tclassAndSelectorOfMethod: (self fetchPointer: MethodIndex ofObject: home)\r\t\t\t\tforReceiver: (self fetchPointer: ReceiverIndex ofObject: home).\r\t\t\tstrm cr; nextPutAll: ctxt hex8.\r\t\t\tctxt = home ifFalse: [strm nextPutAll: ' [] in'].\r\t\t\tstrm space; nextPutAll: (self nameOfClass: classAndSel first).\r\t\t\tstrm nextPutAll: '>>'; nextPutAll: (self shortPrint: classAndSel last).\r\t\t\tctxt = activeContext\r\t\t\t\tifTrue: [ip _ instructionPointer - method - (BaseHeaderSize - 2).\r\t\t\t\t\t\tsp _ self stackPointerIndex - TempFrameStart + 1.\r\t\t\t\t\t\ttop _ self stackTop]\r\t\t\t\tifFalse: [ip _ self integerValueOf:\r\t\t\t\t\t\t\t(self fetchPointer: InstructionPointerIndex ofObject: ctxt).\r\t\t\t\t\t\tsp _ self integerValueOf:\r\t\t\t\t\t\t\t(self fetchPointer: StackPointerIndex ofObject: ctxt).\r\t\t\t\t\t\ttop _ self longAt: ctxt + (self lastPointerOf: ctxt)].\r\t\t\tstrm cr; tab; nextPutAll: 'ip = '; print: ip.\r\t\t\tstrm cr; tab; nextPutAll: 'sp = '; print: sp.\r\t\t\tstrm cr; tab; nextPutAll: 'top = '; nextPutAll: (self shortPrint: top).\r\t\t\t(ctxt _ (self fetchPointer: SenderIndex ofObject: ctxt)) = nilObj\r\t\t\t\tifTrue: [^strm contents].\r\t\t\t].\r\t\t]! !\r\r!InterpreterSimulator methodsFor: 'debug support' stamp: 'di 7/19/2004 14:35'!\rshortPrint: oop\r\t| name classOop |\r\t(self isIntegerObject: oop) ifTrue: [^ '=' , (self integerValueOf: oop) printString , \r\t\t' (' , (self integerValueOf: oop) hex , ')'].\r\tclassOop _ self fetchClassOf: oop.\r\t(self sizeBitsOf: classOop) = (Metaclass instSize +1*BytesPerWord) ifTrue: [\r\t\t^ 'class ' , (self nameOfClass: oop)].\r\tname _ self nameOfClass: classOop.\r\tname size = 0 ifTrue: [name _ '??'].\r\tname = 'String' ifTrue: [^ (self stringOf: oop) printString].\r\tname = 'Symbol' ifTrue: [^ '#' , (self stringOf: oop)].\r\tname = 'Character' ifTrue: [^ '=' , (Character value: (self integerValueOf: \r\t\t\t\t(self fetchPointer: 0 ofObject: oop))) printString].\r\tname = 'UndefinedObject' ifTrue: [^ 'nil'].\r\tname = 'False' ifTrue: [^ 'false'].\r\tname = 'True' ifTrue: [^ 'true'].\r\tname = 'Float' ifTrue: [successFlag _ true. ^ '=' , (self floatValueOf: oop) printString].\r\tname = 'Association' ifTrue: [^ '(' ,\r\t\t\t\t(self shortPrint: (self longAt: oop + BaseHeaderSize)) ,\r\t\t\t\t' -> ' ,\r\t\t\t\t(self longAt: oop + BaseHeaderSize + BytesPerWord) hex8 , ')'].\r\t('AEIOU' includes: name first)\r\t\tifTrue: [^ 'an ' , name]\r\t\tifFalse: [^ 'a ' , name]! !\r\r!InterpreterSimulator methodsFor: 'debug support' stamp: 'di 6/13/2004 07:07'!\rstringOf: oop\r\t| size long nLongs chars |\r\t^ String streamContents:\r\t\t[:strm |\r\t\tsize _ 100 min: (self stSizeOf: oop).\r\t\tnLongs _ size-1//BytesPerWord+1.\r\t\t1 to: nLongs do:\r\t\t\t[:i | long _ self longAt: oop + BaseHeaderSize + (i-1*BytesPerWord).\r\t\t\tchars _ self charsOfLong: long.\r\t\t\tstrm nextPutAll: (i=nLongs\r\t\t\t\t\t\t\tifTrue: [chars copyFrom: 1 to: size-1\\\\BytesPerWord+1]\r\t\t\t\t\t\t\tifFalse: [chars])]]! !\r\r!InterpreterSimulator methodsFor: 'I/O primitives' stamp: 'di 7/9/2004 11:05'!\rfullDisplay\r\t| t |\r\tdisplayForm == nil ifTrue: [^ self].\r\tt _ successFlag.  successFlag _ true.\r\tself displayBitsOf: (self splObj: TheDisplay) Left: 0 Top: 0 Right: displayForm width Bottom: displayForm height.\r\tsuccessFlag _ t! !\r\r!InterpreterSimulator methodsFor: 'I/O primitives' stamp: 'di 4/20/2004 23:59'!\rprimitiveBeDisplay\r\t\"Extended to create a scratch Form for use by showDisplayBits.\"\r\r\t| rcvr destWidth destHeight destDepth |\r\trcvr _ self stackTop.\r\tself success: ((self isPointers: rcvr) and: [(self lengthOf: rcvr) >= 4]).\r\tsuccessFlag ifTrue: [\r\t\tdestWidth _ self fetchInteger: 1 ofObject: rcvr.\r\t\tdestHeight _ self fetchInteger: 2 ofObject: rcvr.\r\t\tdestDepth _ self fetchInteger: 3 ofObject: rcvr.\r\t].\r\tsuccessFlag ifTrue: [\r\t\t\"create a scratch form the same size as Smalltalk displayObj\"\r\t\tdisplayForm _ Form extent: destWidth @ destHeight\r\t\t\t\t\t\t\tdepth: destDepth.\r\t\tdisplayView ifNotNil: [displayView image: displayForm].\r\t].\r\tsuper primitiveBeDisplay.! !\r\r!InterpreterSimulator methodsFor: 'I/O primitives' stamp: 'di 4/21/2004 00:21'!\rprimitiveMousePoint\r\r\t| relPt |\r\tself pop: 1.\r\tdisplayForm == nil\r\t\tifTrue: [self push: (self makePointwithxValue: 99 yValue: 66)]\r\t\tifFalse: [relPt _ Sensor cursorPoint - self displayLocation.\r\t\t\t\tself push: (self makePointwithxValue: relPt x yValue: relPt y)]! !\r\r!InterpreterSimulator methodsFor: 'I/O primitives' stamp: 'di 7/6/2004 10:48'!\rshowDisplayBits: destBits w: w h: h d: d left: left right: right top: top bottom: bottom\r\t| raster pixPerWord simDisp realDisp rect |\r\tpixPerWord _ 32 // d.\r\traster _ displayForm width + (pixPerWord - 1) // pixPerWord.\r\tsimDisp _ Form new hackBits: memory.\r\tdisplayForm unhibernate.\r\trealDisp _ Form new hackBits: displayForm bits.\r\trealDisp\r\t\tcopy: (0 @ (top * raster) extent: 4 @ (bottom - top * raster))\r\t\tfrom: 0 @ (destBits // 4 + (top * raster))\r\t\tin: simDisp\r\t\trule: Form over.\r\tdisplayView ifNotNil: [^ displayView changed].\r\t\r\t\"If running without a view, just blat the bits onto the screen...\"\r\trect _ 0 @ top corner: displayForm width @ bottom.\r\tDisplay\r\t\tcopy: (rect translateBy: self displayLocation)\r\t\tfrom: rect topLeft\r\t\tin: displayForm\r\t\trule: Form over! !\r\r!InterpreterSimulator methodsFor: 'initialization' stamp: 'di 5/8/2004 16:42'!\rconvertToArray\r\t\"I dont believe it -- this *just works*\"\r\t\r\tmemory _ memory as: Array! !\r\r!InterpreterSimulator methodsFor: 'initialization' stamp: 'di 8/5/2004 22:10'!\rinitialize\r\r\t\"Initialize the InterpreterSimulator when running the interpreter inside\r\tSmalltalk. The primary responsibility of this method is to allocate\r\tSmalltalk Arrays for variables that will be declared as statically-allocated\r\tglobal arrays in the translated code.\"\r\r\t\"initialize class variables\"\r\tObjectMemory initBytesPerWord: self bytesPerWord.\r\tObjectMemory initialize.\r\tInterpreter initialize.\r\r\t\"Note: we must initialize ConstMinusOne differently for simulation,\r\t\tdue to the fact that the simulator works only with +ve 32-bit values\"\r\tConstMinusOne _ self integerObjectOf: -1.\r\r\tmethodCache _ Array new: MethodCacheSize.\r\tatCache _ Array new: AtCacheTotalSize.\r\tself flushMethodCache.\r\trootTable _ Array new: RootTableSize.\r\tremapBuffer _ Array new: RemapBufferSize.\r\tsemaphoresUseBufferA _ true.\r\tsemaphoresToSignalA _ Array new: SemaphoresToSignalSize.\r\tsemaphoresToSignalB _ Array new: SemaphoresToSignalSize.\r\texternalPrimitiveTable _ CArrayAccessor on: (Array new: MaxExternalPrimitiveTableSize).\r\tprimitiveTable _ self class primitiveTable.\r\tobsoleteNamedPrimitiveTable _ \r\t\tCArrayAccessor on: (self class obsoleteNamedPrimitiveTable copyWith: (Array new: 3)).\r\tobsoleteIndexedPrimitiveTable _ CArrayAccessor on: \r\t\t(self class obsoleteIndexedPrimitiveTable collect:[:spec| \r\t\t\tCArrayAccessor on:\r\t\t\t\t(spec ifNil:[Array new: 3] \r\t\t\t\t\t  ifNotNil:[Array with: spec first with: spec second with: nil])]).\r\tpluginList _ #().\r\tmappedPluginEntries _ #().\r\r\t\"initialize InterpreterSimulator variables used for debugging\"\r\tbyteCount _ 0.\r\tsendCount _ 0.\r\tquitBlock _ [^ self].\r\ttraceOn _ true.\r\tmyBitBlt _ BitBltSimulator new setInterpreter: self.\r\tfilesOpen _ OrderedCollection new.\r\theaderTypeBytes _ CArrayAccessor on: (Array with: BytesPerWord*2 with: BytesPerWord with: 0 with: 0).\r\ttranscript _ Transcript.\r\tdisplayForm _ 'Display has not yet been installed' asDisplayText form.\r\t! !\r\r!InterpreterSimulator methodsFor: 'initialization' stamp: 'di 7/1/2004 14:15'!\ropenOn: fileName\r\t\"(InterpreterSimulator new openOn: 'clonex.image') test\"\r\r\tself openOn: fileName extraMemory: 2500000.! !\r\r!InterpreterSimulator methodsFor: 'initialization' stamp: 'di 6/11/2004 13:17'!\ropenOn: fileName extraMemory: extraBytes\r\t\"InterpreterSimulator new openOn: 'clone.im' extraMemory: 100000\"\r\r\t| f version headerSize count oldBaseAddr bytesToShift swapBytes |\r\t\"open image file and read the header\"\r\r\t[\"begin ensure block...\"\r\tf _ FileStream readOnlyFileNamed: fileName.\r\timageName _ f fullName.\r\tf binary.\r\tversion _ self nextLongFrom: f.  \"current version: 16r1966 (=6502)\"\r\t(self readableFormat: version)\r\t\tifTrue: [swapBytes _ false]\r\t\tifFalse: [(version _ self byteSwapped: version) = self imageFormatVersion\r\t\t\t\t\tifTrue: [swapBytes _ true]\r\t\t\t\t\tifFalse: [self error: 'incomaptible image format']].\r\theaderSize _ self nextLongFrom: f swap: swapBytes.\r\tendOfMemory _ self nextLongFrom: f swap: swapBytes.  \"first unused location in heap\"\r\toldBaseAddr _ self nextLongFrom: f swap: swapBytes.  \"object memory base address of image\"\r\tspecialObjectsOop _ self nextLongFrom: f swap: swapBytes.\r\tlastHash _ self nextLongFrom: f swap: swapBytes.  \"Should be loaded from, and saved to the image header\"\r\tlastHash = 0 ifTrue: [lastHash _ 999].\r\r\tsavedWindowSize\t_ self nextLongFrom: f swap: swapBytes.\r\tfullScreenFlag\t\t_ self nextLongFrom: f swap: swapBytes.\r\textraVMMemory\t\t_ self nextLongFrom: f swap: swapBytes.\r\r\t\"allocate interpreter memory\"\r\tmemoryLimit _ endOfMemory + extraBytes.\r\r\t\"read in the image in bulk, then swap the bytes if necessary\"\r\tf position: headerSize.\r\tmemory _ Bitmap new: memoryLimit // 4.\r\tcount _ f readInto: memory startingAt: 1 count: endOfMemory // 4.\r\tcount ~= (endOfMemory // 4) ifTrue: [self halt].\r\t]\r\t\tensure: [f close].\r\r\tswapBytes ifTrue: [Utilities informUser: 'Swapping bytes of foreign image...'\r\t\t\t\t\t\t\t\tduring: [self reverseBytesInImage]].\r\r\tself initialize.\r\tbytesToShift _ 0 - oldBaseAddr.  \"adjust pointers for zero base address\"\r\tendOfMemory _ endOfMemory.\r\tUtilities informUser: 'Relocating object pointers...'\r\t\t\t\tduring: [self initializeInterpreter: bytesToShift].\r! !\r\r!InterpreterSimulator methodsFor: 'I/O primitives support' stamp: 'di 7/1/2004 13:55'!\rioMSecs\r\t\"Return the value of the millisecond clock.\"\r\t\"NOT.  Actually, we want something a lot slower and, for exact debugging,\r\tsomething more repeatable than real time.  IO have an idea: use the byteCount...\"\r\r\t^ byteCount // 100\r\t\r\"At 20k bytecodes per second, this gives us aobut 200 ticks per second, or about 1/5 of what you'd expect for the real time clock.  This should still service events at one or two per second\"! !\r\r!InterpreterSimulator methodsFor: 'I/O primitives support' stamp: 'di 8/3/2004 14:50'!\rsizeof: var\r\r\tself flag: #Dan.\r\t^ 4! !\r\r!InterpreterSimulator methodsFor: 'debug printing' stamp: 'di 5/11/2004 18:26'!\rcr\r\r\ttraceOn ifTrue: [ transcript cr; endEntry ].! !\r\r!InterpreterSimulator methodsFor: 'debug printing' stamp: 'di 5/11/2004 18:28'!\rprint: s\r\r\ttraceOn ifTrue: [ transcript show: s ]! !\r\r!InterpreterSimulator methodsFor: 'debug printing' stamp: 'di 5/11/2004 18:28'!\rprintChar: aByte\r\r\ttraceOn ifTrue: [ transcript nextPut: aByte asCharacter ].! !\r\r!InterpreterSimulator methodsFor: 'debug printing' stamp: 'di 5/11/2004 18:28'!\rprintNum: anInteger\r\r\ttraceOn ifTrue: [ transcript show: anInteger printString ].! !\r\r!InterpreterSimulator methodsFor: 'debug printing' stamp: 'di 6/15/2004 09:53'!\rsymbolic: byte at: ip inMethod: meth\r\t\"Print a bytecode in simple symbolic form\"\r\r\t| type offset |\r\ttype _ byte // 16.  \r\toffset _ byte \\\\ 16.  \r\ttype=0 ifTrue: [^ 'pushRcvr ' , offset printString].\r\ttype=1 ifTrue: [^ 'pushTemp ' , offset printString].\r\ttype=2 ifTrue: [^ 'pushLit ' , offset printString].\r\ttype=3 ifTrue: [^ 'pushLit ' , (offset+16) printString].\r\ttype=4 ifTrue: [^ 'pushLitVar ' , offset printString].\r\ttype=5 ifTrue: [^ 'pushLitVar ' , (offset+16) printString].\r\ttype=6 ifTrue: [offset<8\r\t\t\t\t\tifTrue: [^ 'storePopRcvr ' , offset printString]\r\t\t\t\t\tifFalse: [^ 'storePopTemp ' , (offset-8) printString]].\r\ttype=7 ifTrue: [offset=0 ifTrue: [^ 'pushRcvr'].\r\t\t\t\toffset<8 ifTrue: [^ 'pushConst ' , ( #(true false nil -1 0 1 2) at: offset) printString].\r\t\t\t\toffset=8 ifTrue: [^ 'returnSelf'].\r\t\t\t\toffset<12 ifTrue: [^ 'returnConst ' , ( #(true false nil -1 0 1 2) at: offset-8) printString].\r\t\t\t\toffset=12 ifTrue: [^ 'returnTop'].\r\t\t\t\toffset=13 ifTrue: [^ 'blockReturnTop'].\r\t\t\t\toffset>13 ifTrue: [^ 'unusedBytecode']].\r\ttype=8 ifTrue: [^ self symbolicExtensions: offset at: ip inMethod: meth].\r\ttype=9 ifTrue:  \"short jumps\"\r\t\t\t[offset<8 ifTrue: [^ 'jump ' , (offset+1) printString].\r\t\t\t^ 'jumpIfFalse ' , (offset-8+1) printString].\r\ttype=10 ifTrue:  \"long jumps\"\r\t\t\t[offset<8 ifTrue: [^ 'extendedJump'].\r\t\t\toffset<12 ifTrue: [^ 'extendedJumpIfTrue'].\r\t\t\ttrue ifTrue: [^ 'extendedJumpIfFalse']].\r\ttype=11 ifTrue: [^ 'sendSpl ' , (Smalltalk specialSelectorAt: offset+1)].\r\ttype=12 ifTrue: [^ 'sendSpl ' , (Smalltalk specialSelectorAt: offset+17)].\r\ttype>12 ifTrue: [^ 'send ' , (self stringOf: (self literal: offset))]! !\r\r!InterpreterSimulator methodsFor: 'debug printing' stamp: 'di 6/15/2004 10:11'!\rsymbolicExtensions: offset at: ip inMethod: meth\r\t| type offset2 byte2 byte3 |\r\toffset <=6 ifTrue: \r\t\t[\"Extended op codes 128-134\"\r\t\tbyte2 _ self byteAt: ip+1.\r\t\toffset <= 2 ifTrue:\r\t\t\t[\"128-130:  extended pushes and pops\"\r\t\t\ttype _ byte2 // 64.\r\t\t\toffset2 _ byte2 \\\\ 64.\r\t\t\toffset = 0 ifTrue: \r\t\t\t\t[type = 0 ifTrue: [^ 'pushRcvr ' , offset2 printString].\r\t\t\t\ttype = 1 ifTrue: [^ 'pushTemp ' , offset2 printString].\r\t\t\t\ttype = 2  ifTrue: [^ 'pushLit ' , (offset2 + 1) printString].\r\t\t\t\ttype = 3 ifTrue: [^ 'pushLitVar ' , (offset2 + 1) printString]].\r\t\t\toffset = 1 ifTrue: \r\t\t\t\t[type = 0 ifTrue: [^ 'storeIntoRcvr ' , offset2 printString].\r\t\t\t\ttype = 1 ifTrue: [^ 'storeIntoTemp ' , offset2 printString].\r\t\t\t\ttype = 2 ifTrue: [^ 'illegalStore'].\r\t\t\t\ttype = 3 ifTrue: [^ 'storeIntoLitVar ' , (offset2 + 1) printString]].\r\t\t\toffset = 2 ifTrue: \r\t\t\t\t[type = 0 ifTrue: [^ 'storePopRcvr ' , offset2 printString].\r\t\t\t\ttype = 1 ifTrue: [^ 'storePopTemp ' , offset2 printString].\r\t\t\t\ttype = 2 ifTrue: [^ 'illegalStore'].\r\t\t\t\ttype = 3  ifTrue: [^ 'storePopLitVar ' , (offset2 + 1) printString]]].\r\t\t\"131-134: extended sends\"\r\t\toffset = 3 ifTrue:  \"Single extended send\"\r\t\t\t[^ 'send ' , (self stringOf: (self literal: byte2 \\\\ 32))].\r\t\toffset = 4 ifTrue:    \"Double extended do-anything\"\r\t\t\t[byte3 _ self byteAt: ip+2.\r\t\t\ttype _ byte2 // 32.\r\t\t\ttype = 0 ifTrue: [^ 'send ' , (self stringOf: (self literal: byte3))].\r\t\t\ttype = 1 ifTrue: [^ 'superSend ' , (self stringOf: (self literal: byte3))].\r\t\t\ttype = 2 ifTrue: [^ 'pushRcvr ' , byte3 printString].\r\t\t\ttype = 3 ifTrue: [^ 'pushLit ' , byte3 printString].\r\t\t\ttype = 4 ifTrue: [^ 'pushLitVar ' , byte3 printString].\r\t\t\ttype = 5 ifTrue: [^ 'storeIntoRcvr ' , byte3 printString].\r\t\t\ttype = 6 ifTrue: [^ 'storePopRcvr ' , byte3 printString].\r\t\t\ttype = 7 ifTrue: [^ 'storeIntoLitVar ' , byte3 printString]].\r\t\toffset = 5 ifTrue:  \"Single extended send to super\"\r\t\t\t[^ 'superSend ' , (self stringOf: (self literal: byte2 \\\\ 32))].\r\t\toffset = 6 ifTrue:   \"Second extended send\"\r\t\t\t[^ 'send ' , (self stringOf: (self literal: byte2 \\\\ 64))]].\r\toffset = 7 ifTrue: [^ 'doPop'].\r\toffset = 8 ifTrue: [^ 'doDup'].\r\toffset = 9 ifTrue: [^ 'pushActiveContext'].\r\t^ 'unusedBytecode'! !\r\r!InterpreterSimulator methodsFor: 'float primitives' stamp: 'di 6/13/2004 10:31'!\rfetchFloatAt: floatBitsAddress into: aFloat\r\r\taFloat at: 1 put: (self long32At: floatBitsAddress).\r\taFloat at: 2 put: (self long32At: floatBitsAddress+4).\r! !\r\r!InterpreterSimulator methodsFor: 'float primitives' stamp: 'di 6/13/2004 10:45'!\rstoreFloatAt: floatBitsAddress from: aFloat.\r\r\tself long32At: floatBitsAddress put: (aFloat at: 1).\r\tself long32At: floatBitsAddress+4 put: (aFloat at: 2).\r! !\r\r!InterpreterSimulator methodsFor: 'file primitives' stamp: 'di 7/2/2004 12:35'!\rprimitiveDirectoryLookup\r\t| index pathName array result |\r\tindex _ self stackIntegerValue: 0.\r\tpathName _ (self stringOf: (self stackValue: 1)).\r\t\r\tsuccessFlag ifFalse: [\r\t\t^self primitiveFail.\r\t].\r\r\tarray _ FileDirectory default primLookupEntryIn: pathName index: index.\r\r\tarray == nil ifTrue: [\r\t\tself pop: 3.\r\t\tself push: nilObj.\r\t\t^array.\r\t].\r\tarray == #badDirectoryPath ifTrue: [self halt.\r\t\t^self primitiveFail.\r\t].\r\r\tresult _ self makeDirEntryName: (array at: 1) size: (array at: 1) size\r\t\t\t\tcreateDate: (array at: 2) modDate: (array at: 3)\r\t\t\t\tisDir: (array at: 4)  fileSize: (array at: 5).\r\tself pop: 3.\r\tself push: result.\r! !\r\r!InterpreterSimulator methodsFor: 'file primitives' stamp: 'di 7/2/2004 14:20'!\rprimitiveImageName\r\t\"Note: For now, this only implements getting, not setting, the image file name.\"\r\t| result imageNameSize |\r\tself pop: 1.\r\timageNameSize _ imageName size.\r\tresult _ self instantiateClass: (self splObj: ClassString)\r\t\t\t\t   indexableSize: imageNameSize.\r\t1 to: imageNameSize do:\r\t\t[:i | self storeByte: i-1 ofObject: result\r\t\t\twithValue: (imageName at: i) asciiValue].\r\tself push: result.! !\r\r!InterpreterSimulator methodsFor: 'testing' stamp: 'di 7/21/2004 15:40'!\rlogOfBytesVerify: nBytes fromFileNamed: fileName fromStart: loggingStart\r\t\"Verify a questionable interpreter against a successful run\"\r\t\"self logOfBytesVerify: 10000 fromFileNamed: 'clone32Bytecodes.log' \"\r\t\r\t| logFile rightByte prevCtxt |\r\tlogFile _ (FileStream readOnlyFileNamed: fileName) binary.\r\tlogging _ loggingStart.\r\ttranscript clear.\r\tbyteCount _ 0.\r\tquitBlock _ [^ self].\r\tself internalizeIPandSP.\r\tself fetchNextBytecode.\r\tprevCtxt _ 0.  prevCtxt _ prevCtxt.\r\t[byteCount < nBytes] whileTrue:\r\t\t[\r\"\rbyteCount > 14560 ifTrue:\r[self externalizeIPandSP.\rprevCtxt = activeContext ifFalse:\r [prevCtxt _ activeContext.\r transcript cr; nextPutAll: (self printTop: 2); endEntry].\rtranscript cr; print: byteCount; nextPutAll: ': ' , (activeContext hex); space;\r print: (instructionPointer - method - (BaseHeaderSize - 2));\r nextPutAll: ': <' , (self byteAt: localIP) hex , '>'; space;\r nextPutAll: (self symbolic: currentBytecode at: localIP inMethod: method); space;\r print: (self stackPointerIndex - TempFrameStart + 1); endEntry.\rbyteCount = 14590 ifTrue: [self halt]].\r\"\r\t\tlogging ifTrue: [rightByte _ logFile next.\r\t\t\t\t\t\tcurrentBytecode = rightByte ifFalse: [self halt]].\r\t\tself dispatchOn: currentBytecode in: BytecodeTable.\r\t\tbyteCount _ byteCount + 1.\r\t\tbyteCount \\\\ 10000 = 0 ifTrue: [self fullDisplayUpdate]].\r\tself externalizeIPandSP.\r\tlogFile close.\r\tself inform: nBytes printString , ' bytecodes verfied.'! !\r\r!InterpreterSimulator methodsFor: 'testing' stamp: 'di 7/21/2004 15:52'!\rlogOfBytesWrite: nBytes toFileNamed: fileName fromStart: loggingStart\r\t\"Write a log file for testing a flaky interpreter on the same image\"\r\t\"self logOfBytesWrite: 10000 toFileNamed: 'clone32Bytecodes.log' \"\r\t\r\t| logFile |\r\tlogFile _ (FileStream newFileNamed: fileName) binary.\r\tlogging _ loggingStart.\r\ttranscript clear.\r\tbyteCount _ 0.\r\tquitBlock _ [^ self].\r\tself internalizeIPandSP.\r\tself fetchNextBytecode.\r\t[logging not or: [byteCount < nBytes]] whileTrue:\r\t\t[logging ifTrue: [logFile nextPut: currentBytecode].\r\t\tself dispatchOn: currentBytecode in: BytecodeTable.\r\t\tbyteCount _ byteCount + 1.\r\t\tbyteCount \\\\ 10000 = 0 ifTrue: [self fullDisplayUpdate]].\r\tself externalizeIPandSP.\r\tlogFile close.\r! !\r\r!InterpreterSimulator methodsFor: 'testing' stamp: 'di 7/21/2004 15:39'!\rlogOfSendsVerify: nSends fromFileNamed: fileName fromStart: loggingStart\r\t\"Write a log file for testing a flaky interpreter on the same image\"\r\t\"self logOfSendsWrite: 10000 toFileNamed: 'clone32Messages.log' \"\r\t\r\t| logFile priorContext rightSelector prevCtxt |\r\tlogFile _ FileStream readOnlyFileNamed: fileName.\r\tlogging _ loggingStart.\r\ttranscript clear.\r\tbyteCount _ 0.\r\tsendCount _ 0.\r\tpriorContext _ activeContext.\r\tquitBlock _ [^ self].\r\tself internalizeIPandSP.\r\tself fetchNextBytecode.\r\tprevCtxt _ 0.  prevCtxt _ prevCtxt.\r\t[sendCount < nSends] whileTrue:\r\t\t[\r\"\rbyteCount>500 ifTrue:\r[byteCount>550 ifTrue: [self halt].\rself externalizeIPandSP.\rprevCtxt = activeContext ifFalse:\r [prevCtxt _ activeContext.\r transcript cr; nextPutAll: (self printTop: 2); endEntry].\rtranscript cr; print: byteCount; nextPutAll: ': ' , (activeContext hex); space;\r print: (instructionPointer - method - (BaseHeaderSize - 2));\r nextPutAll: ': <' , (self byteAt: localIP) hex , '>'; space;\r nextPutAll: (self symbolic: currentBytecode at: localIP inMethod: method); space;\r print: (self stackPointerIndex - TempFrameStart + 1); endEntry.\r].\r\"\r\t\tself dispatchOn: currentBytecode in: BytecodeTable.\r\t\tactiveContext == priorContext ifFalse:\r\t\t\t[sendCount _ sendCount + 1.\r\t\t\tlogging ifTrue: [rightSelector _ logFile nextLine.\r\t\t\t\t\t\t\t(self stringOf: messageSelector) = rightSelector ifFalse: [self halt]].\r\t\t\tpriorContext _ activeContext].\r\t\tbyteCount _ byteCount + 1.\r\t\tbyteCount \\\\ 10000 = 0 ifTrue: [self fullDisplayUpdate]].\r\tself externalizeIPandSP.\r\tlogFile close.\r\tself inform: nSends printString , ' sends verfied.'! !\r\r!InterpreterSimulator methodsFor: 'testing' stamp: 'di 7/21/2004 15:53'!\rlogOfSendsWrite: nSends toFileNamed: fileName fromStart: loggingStart\r\t\"Write a log file for testing a flaky interpreter on the same image\"\r\t\"self logOfSendsWrite: 10000 toFileNamed: 'clone32Messages.log' \"\r\t\r\t| logFile priorContext |\r\tlogFile _ FileStream newFileNamed: fileName.\r\tlogging _ loggingStart.\r\ttranscript clear.\r\tbyteCount _ 0.\r\tsendCount _ 0.\r\tpriorContext _ activeContext.\r\tquitBlock _ [^ self].\r\tself internalizeIPandSP.\r\tself fetchNextBytecode.\r\t[logging not or: [sendCount < nSends]] whileTrue:\r\t\t[self dispatchOn: currentBytecode in: BytecodeTable.\r\t\tactiveContext == priorContext ifFalse:\r\t\t\t[logging ifTrue: [sendCount _ sendCount + 1.\r\t\t\t\t\t\t\tlogFile nextPutAll: (self stringOf: messageSelector); cr].\r\t\t\tpriorContext _ activeContext].\r\t\tbyteCount _ byteCount + 1.\r\t\tbyteCount \\\\ 10000 = 0 ifTrue: [self fullDisplayUpdate]].\r\tself externalizeIPandSP.\r\tlogFile close.\r! !\r\r!InterpreterSimulator methodsFor: 'testing' stamp: 'di 5/11/2004 18:28'!\rprofile: nBytecodes\r\t\"(InterpreterSimulator new openOn: 'clonex.image') profile: 60000\"\r\ttranscript clear.\r\tbyteCount _ 0.\r\tMessageTally spyOn: [self runForNBytes: nBytecodes].\r\tself close! !\r\r!InterpreterSimulator methodsFor: 'testing' stamp: 'di 8/3/2004 14:52'!\rstats\r\t| oop fieldAddr fieldOop last stats v d |\r\tstats _ Bag new.\r\toop _ self firstObject.\r\r'Scanning the image...' displayProgressAt: Sensor cursorPoint\r\tfrom: oop to: endOfMemory\r\tduring: [:bar |\r\r\t[oop < endOfMemory] whileTrue:\r\t\t[(self isFreeObject: oop) ifFalse:\r\t\t\t[stats add: #objects.\r\t\t\tfieldAddr _ oop + (self lastPointerOf: oop).\r\t\t\t[fieldAddr > oop] whileTrue:\r\t\t\t\t[fieldOop _ self longAt: fieldAddr.\r\t\t\t\t(self isIntegerObject: fieldOop)\r\t\t\t\t\tifTrue: [v _ self integerValueOf: fieldOop.\r\t\t\t\t\t\t\t(v between: -16000 and: 16000)\r\t\t\t\t\t\t\t\tifTrue: [stats add: #ints32k]\r\t\t\t\t\t\t\t\tifFalse: [stats add: #intsOther]]\r\t\t\t\t\tifFalse: [fieldOop = nilObj ifTrue: [stats add: #nil]\r\t\t\t\t\t\t\tifFalse:\r\t\t\t\t\t\t\t[d _ fieldOop - oop.\r\t\t\t\t\t\t\t(d between: -16000 and: 16000)\r\t\t\t\t\t\t\t\tifTrue: [stats add: #oops32k]\r\t\t\t\t\t\t\t\tifFalse: [stats add: #oopsOther]]].\r\t\t\t\tfieldAddr _ fieldAddr - BytesPerWord]].\r\t\tbar value: oop.\r\t\tlast _ oop.\r\t\tlast _ last.\r\t\toop _ self objectAfter: oop]].\r\t^ stats sortedElements! !\r\r!InterpreterSimulator methodsFor: 'testing' stamp: 'di 7/19/2004 17:30'!\rtest\r\ttranscript clear.\r\tbyteCount _ 0.\r\tquitBlock _ [^ self].\r\tself internalizeIPandSP.\r\tself fetchNextBytecode.\r\t[true] whileTrue:\r\t\t[self dispatchOn: currentBytecode in: BytecodeTable.\r\t\tbyteCount _ byteCount + 1.\r\t\tbyteCount \\\\ 10000 = 0 ifTrue: [self fullDisplay]].\r\tself externalizeIPandSP.\r! !\r\r!InterpreterSimulator methodsFor: 'testing' stamp: 'di 5/11/2004 18:30'!\rvalidate\r\t| oop prev |\r\ttranscript show: 'Validating...'.\r\toop _ self firstObject.\r\t[oop < endOfMemory] whileTrue: [\r\t\tself validate: oop.\r\t\tprev _ oop.  \"look here if debugging prev obj overlapping this one\"\r\t\toop _ self objectAfter: oop.\r\t].\r\tprev _ prev.  \"Don't offer to delete this please\"\r\ttranscript show: 'done.'; cr! !\r\r!InterpreterSimulator methodsFor: 'testing' stamp: 'di 7/1/2004 17:29'!\rvalidate: oop\r\t| header type cc sz fmt nextChunk | \r\theader _ self longAt: oop.\r\ttype _ header bitAnd: 3.\r\ttype = 2 ifFalse: [type = (self rightType: header) ifFalse: [self halt]].\r\tsz _ (header bitAnd: SizeMask) >> 2.\r\t(self isFreeObject: oop)\r\t\tifTrue: [ nextChunk _ oop + (self sizeOfFree: oop) ]\r\t\tifFalse: [  nextChunk _ oop + (self sizeBitsOf: oop) ].\r\tnextChunk > endOfMemory\r\t\tifTrue: [oop = endOfMemory ifFalse: [self halt]].\r\t(self headerType: nextChunk) = 0 ifTrue: [\r\t\t(self headerType: (nextChunk + (BytesPerWord*2))) = 0 ifFalse: [self halt]].\r\t(self headerType: nextChunk) = 1 ifTrue: [\r\t\t(self headerType: (nextChunk + BytesPerWord)) = 1 ifFalse: [self halt]].\r\ttype = 2 ifTrue:\r\t\t[\"free block\" ^ self].\r\tfmt _ (header >> 8) bitAnd: 16rF.\r\tcc _ (header >> 12) bitAnd: 31.\r\tcc > 16 ifTrue: [self halt].\t\"up to 32 are legal, but not used\"\r\ttype = 0 ifTrue:\r\t\t[\"three-word header\"\r\t\t((self longAt: oop-BytesPerWord) bitAnd: 3) = type ifFalse: [self halt].\r\t\t((self longAt: oop-(BytesPerWord*2)) bitAnd: 3) = type ifFalse: [self halt].\r\t\t((self longAt: oop-BytesPerWord) = type) ifTrue: [self halt].\t\"Class word is 0\"\r\t\tsz = 0 ifFalse: [self halt]].\r\ttype = 1 ifTrue:\r\t\t[\"two-word header\"\r\t\t((self longAt: oop-BytesPerWord) bitAnd: 3) = type ifFalse: [self halt].\r\t\tcc > 0 ifTrue: [sz = 1 ifFalse: [self halt]].\r\t\tsz = 0 ifTrue: [self halt]].\r\ttype = 3 ifTrue:\r\t\t[\"one-word header\"\r\t\tcc = 0 ifTrue: [self halt]].\r\tfmt = 5 ifTrue: [self halt].\r\tfmt = 7 ifTrue: [self halt].\r\tfmt >= 12 ifTrue:\r\t\t[\"CompiledMethod -- check for integer header\"\r\t\t(self isIntegerObject: (self longAt: oop + BytesPerWord)) ifFalse: [self halt]].! !\r\r!InterpreterSimulator methodsFor: 'testing' stamp: 'ikp 8/3/2004 18:43'!\rvalidateOopsIn: object\r\t| fieldPtr limit former header | \r\t\"for each oop in me see if it is legal\"\r\tfieldPtr _ object + BaseHeaderSize.\t\"first field\"\r\tlimit _ object + (self lastPointerOf: object).\t\"a good field\"\r\t[fieldPtr > limit] whileFalse: [\r\t\tformer _ self longAt: fieldPtr.\r\t\t(self validOop: former) ifFalse: [self error: 'invalid oop in pointers object'].\r\t\tfieldPtr _ fieldPtr + BytesPerWord].\r\t\"class\"\r\theader _ self baseHeader: object.\r\t(header bitAnd: CompactClassMask) = 0 ifTrue: [\t\r\t\tformer _ (self classHeader: object) bitAnd: AllButTypeMask.\r\t\t(self validOop: former) ifFalse: [self halt]].! !\r\r!InterpreterSimulator methodsFor: 'other primitives' stamp: 'di 7/4/2004 09:01'!\rprimBitmapdecompressfromByteArrayat\r\t| indexInt index baOop bmOop baSize bmSize ba bm |\r\tindexInt _ self stackTop.\r\t(self isIntegerValue: indexInt) ifFalse: [^ self primitiveFail].\r\tindex _ self integerValueOf: indexInt.\r\tbaOop _ self stackValue: 1.\r\tbmOop _ self stackValue: 2.\r\tbaSize _ self stSizeOf: baOop.\r\tbmSize _ self stSizeOf: bmOop.\r\tba _ ByteArray new: baSize.\r\tbm _ Bitmap new: bmSize.\r\r\t\"Copy the byteArray into ba\"\r\t1 to: baSize do: [:i | ba at: i put: (self fetchByte: i-1 ofObject: baOop)].\r\r\t\"Decompress ba into bm\"\r\tbm decompress: bm fromByteArray: ba at: index.\r\r\t\"Then copy bm into the Bitmap\"\r\t1 to: bmSize do: [:i | self storeLong32: i-1 ofObject: bmOop withValue: (bm at: i)].\r\tself pop: 3! !\r\r!InterpreterSimulator methodsFor: 'image save/restore' stamp: 'di 8/3/2004 14:57'!\rwriteImageFileIO: numberOfBytesToWrite\r\t\"Actually emit the first numberOfBytesToWrite object memory bytes onto the snapshot.\"\r\r\t| headerSize file |\r\tBytesPerWord = 4 ifFalse: [self error: 'Not rewritten for 64 bits yet'].\r\theaderSize _ 64.\r\r\t[\r\t\tfile _ (FileStream fileNamed: imageName) binary.\r\t\tfile == nil ifTrue: [^nil].\r\t\r\t\t{\r\t\t\tself imageFormatVersion.\r\t\t\theaderSize.\r\t\t\tnumberOfBytesToWrite.\r\t\t\tself startOfMemory.\r\t\t\tspecialObjectsOop.\r\t\t\tlastHash.\r\t\t\tself ioScreenSize.\r\t\t\tfullScreenFlag.\r\t\t\textraVMMemory\r\t\t}\r\t\t\tdo: [:long | self putLong: long toFile: file].\r\t\r\t\t\"Pad the rest of the header.\"\r\t\t7 timesRepeat: [self putLong: 0 toFile: file].\r\t\r\t\t\"Position the file after the header.\"\r\t\tfile position: headerSize.\r\t\r\t\t\"Write the object memory.\"\r\t\t1\r\t\t\tto: numberOfBytesToWrite // 4\r\t\t\tdo: [:index |\r\t\t\t\tself\r\t\t\t\t\tputLong: (memory at: index)\r\t\t\t\t\ttoFile: file].\r\t\r\t\tself success: true\r\t]\r\t\tensure: [file close]! !\r\r!InterpreterSimulator methodsFor: 'debugging traps' stamp: 'di 7/20/2004 11:58'!\rallocate: byteSize headerSize: hdrSize h1: baseHeader h2: classOop h3: extendedSize doFill: doFill with: fillWord \r\r\t| newObj |\r\tnewObj _ super allocate: byteSize headerSize: hdrSize h1: baseHeader h2: classOop h3: extendedSize doFill: doFill with: fillWord.\r\t\"byteCount < 600000 ifTrue: [^ newObj].\"\r\t\"(self baseHeader: newObj) =  16r0FCC0600 ifTrue: [self halt].\"\r\t^ newObj! !\r\r!InterpreterSimulator methodsFor: 'debugging traps' stamp: 'di 7/22/2004 18:36'!\rnormalSend\r\t\"Catch errors before we start the whole morphic error process\"\r\r\t\"(byteCount > 4000000 and: [(self stringOf: messageSelector) = 'sorts:before:'])\r\t\tifTrue: [self halt].\"\r\t^ super normalSend! !\r\r!InterpreterSimulator methodsFor: 'debugging traps' stamp: 'di 7/20/2004 10:57'!\rprimitiveFail\r\r\"(primitiveIndex = 61 and: [byteCount > 210000]) ifTrue: [self halt].\"\r\tsuccessFlag _ false.! !\r\r!InterpreterSimulator methodsFor: 'debugging traps' stamp: 'di 7/22/2004 12:31'!\rprimitiveResume\r\t\"Catch errors before we start the whole morphic error process\"\r\r\tbyteCount > 1000000 ifTrue: [self halt].  \"Ignore early process activity\"\r\t^ super primitiveResume! !\r\r!InterpreterSimulator methodsFor: 'debugging traps' stamp: 'di 7/22/2004 12:31'!\rprimitiveSuspend\r\t\"Catch errors before we start the whole morphic error process\"\r\r\tbyteCount > 1000000 ifTrue: [self halt].  \"Ignore early process activity\"\r\t^ super primitiveSuspend! !\r\r!InterpreterSimulator methodsFor: 'UI' stamp: 'di 4/21/2004 00:09'!\rbyteCountText\r\t^ byteCount printString asText! !\r\r!InterpreterSimulator methodsFor: 'UI' stamp: 'di 4/21/2004 00:31'!\ropenAsMorph\r\t\"Open a morphic view on this simulation.\"\r\t| window localImageName |\r\tlocalImageName _ FileDirectory default localNameFor: imageName.\r\twindow _ (SystemWindow labelled: 'Simulation of ' , localImageName) model: self.\r\r\twindow addMorph: (displayView _ ImageMorph new image: displayForm)\r\t\tframe: (0@0 corner: 1@0.8).\r\r\ttranscript _ TranscriptStream on: (String new: 10000).\r\twindow addMorph: (PluggableTextMorph on: transcript text: nil accept: nil\r\t\t\treadSelection: nil menu: #codePaneMenu:shifted:)\r\t\tframe: (0@0.8 corner: 0.7@1).\r\r\twindow addMorph: (PluggableTextMorph on: self\r\t\t\t\t\t\ttext: #byteCountText accept: nil) hideScrollBarIndefinitely\r\t\tframe: (0.7@0.8 corner: 1@1).\r\r\twindow openInWorld! !\r\r\r!InterpreterSimulatorLSB methodsFor: 'memory access' stamp: 'di 7/16/2004 14:59'!\rhalfWordHighInLong32: long32\r\t\"Used by Balloon\"\r\r\t^ long32 bitAnd: 16rFFFF! !\r\r!InterpreterSimulatorLSB methodsFor: 'memory access' stamp: 'di 7/16/2004 14:59'!\rhalfWordLowInLong32: long32\r\t\"Used by Balloon\"\r\r\t^ long32 bitShift: -16! !\r\r!InterpreterSimulatorLSB methodsFor: 'memory access' stamp: 'di 6/23/2004 14:29'!\rshortAt: byteAddress\r    \"Return the half-word at byteAddress which must be even.\"\r\t| lowBits long |\r\tlowBits _ byteAddress bitAnd: 2.\r\tlong _ self longAt: byteAddress - lowBits.\r\t^ lowBits = 2\r\t\tifTrue: [ long bitShift: -16 ]\r\t\tifFalse: [ long bitAnd: 16rFFFF ].\r! !\r\r!InterpreterSimulatorLSB methodsFor: 'memory access' stamp: 'di 6/23/2004 14:31'!\rshortAt: byteAddress put: a16BitValue\r    \"Return the half-word at byteAddress which must be even.\"\r\t| lowBits long longAddress |\r\tlowBits _ byteAddress bitAnd: 2.\r\tlowBits = 0\r\t\tifTrue:\r\t\t[ \"storing into LS word\"\r\t\tlong _ self longAt: byteAddress.\r\t\tself longAt: byteAddress\r\t\t\t\tput: ((long bitAnd: 16rFFFF0000) bitOr: a16BitValue)\r\t\t]\r\t\tifFalse:\r\t\t[longAddress _ byteAddress - 2.\r\t\tlong _ self longAt: longAddress.\r\t\tself longAt: longAddress\r\t\t\t\tput: ((long bitAnd: 16rFFFF) bitOr: (a16BitValue bitShift: 16))\r\t\t]! !\r\r!InterpreterSimulatorLSB methodsFor: 'initialization' stamp: 'di 6/22/2004 14:53'!\rnextLongFrom: aStream\r\t\"Read a 32- or 64-bit quantity from the given (binary) stream.\"\r\r\t^ aStream nextLittleEndianNumber: BytesPerWord! !\r\r\r!InterpreterSimulatorLSB64 methodsFor: 'as yet unclassified' stamp: 'di 6/13/2004 10:55'!\rbytesPerWord\r\t\"overridden for 64-bit images...\"\r\r\t^ 8! !\r\r!InterpreterSimulatorLSB64 methodsFor: 'as yet unclassified' stamp: 'di 6/13/2004 10:56'!\rlong32At: byteAddress\r\r\t\"Return the 32-bit word at byteAddress which must be 0 mod 4.\"\r\t| lowBits long |\r\tlowBits _ byteAddress bitAnd: 4.\r\tlong _ self longAt: byteAddress - lowBits.\r\t^ lowBits = 4\r\t\tifTrue: [ long bitShift: -32 ]\r\t\tifFalse: [ long bitAnd: 16rFFFFFFFF ].\r! !\r\r!InterpreterSimulatorLSB64 methodsFor: 'as yet unclassified' stamp: 'di 6/13/2004 11:01'!\rlong32At: byteAddress put: a32BitValue\r\t\"Store the 32-bit value at byteAddress which must be 0 mod 4.\"\r\t| lowBits long64 longAddress |\r\tlowBits _ byteAddress bitAnd: 4.\r\tlowBits = 0\r\t\tifTrue:\r\t\t[ \"storing into LS word\"\r\t\tlong64 _ self longAt: byteAddress.\r\t\tself longAt: byteAddress\r\t\t\t\tput: ((long64 bitAnd: 16rFFFFFFFF00000000) bitOr: a32BitValue)\r\t\t]\r\t\tifFalse:\r\t\t[longAddress _ byteAddress - 4.\r\t\tlong64 _ self longAt: longAddress.\r\t\tself longAt: longAddress\r\t\t\t\tput: ((long64 bitAnd: 16rFFFFFFFF) bitOr: (a32BitValue bitShift: 32))\r\t\t]! !\r\r\r!InterpreterSimulatorMSB methodsFor: 'memory access' stamp: 'di 6/22/2004 14:52'!\rbyteAt: byteAddress\r\t| lowBits bpwMinus1 |\r\tbpwMinus1 _ BytesPerWord-1.\r\tlowBits _ byteAddress bitAnd: bpwMinus1.\r\t^ ((self longAt: byteAddress - lowBits)\r\t\tbitShift: (lowBits - bpwMinus1) * 8)\r\t\tbitAnd: 16rFF! !\r\r!InterpreterSimulatorMSB methodsFor: 'memory access' stamp: 'di 7/3/2004 11:00'!\rbyteAt: byteAddress put: byte\r\t| longWord shift lowBits bpwMinus1 longAddress |\r\tbpwMinus1 _ BytesPerWord-1.\r\tlowBits _ byteAddress bitAnd: bpwMinus1.\r\tlongAddress _ byteAddress - lowBits.\r\tlongWord _ self longAt: longAddress.\r\tshift _ (bpwMinus1 - lowBits) * 8.\r\tlongWord _ longWord\r\t\t\t\t- (longWord bitAnd: (16rFF bitShift: shift))\r\t\t\t\t+ (byte bitShift: shift).\r\tself longAt: longAddress put: longWord! !\r\r!InterpreterSimulatorMSB methodsFor: 'memory access' stamp: 'di 7/16/2004 14:58'!\rhalfWordHighInLong32: long32\r\t\"Used by Balloon\"\r\r\t^ long32 bitShift: -16! !\r\r!InterpreterSimulatorMSB methodsFor: 'memory access' stamp: 'di 7/16/2004 14:58'!\rhalfWordLowInLong32: long32\r\t\"Used by Balloon\"\r\r\t^ long32 bitAnd: 16rFFFF! !\r\r!InterpreterSimulatorMSB methodsFor: 'memory access' stamp: 'di 7/3/2004 11:06'!\rshortAt: byteAddress\r    \"Return the half-word at byteAddress which must be even.\"\r\t| lowBits bpwMinus2 |\r\tbpwMinus2 _ BytesPerWord-2.\r\tlowBits _ byteAddress bitAnd: bpwMinus2.\r\t^ ((self longAt: byteAddress - lowBits)\r\t\tbitShift: (lowBits - bpwMinus2) * 8)\r\t\tbitAnd: 16rFFFF\r! !\r\r!InterpreterSimulatorMSB methodsFor: 'memory access' stamp: 'di 7/3/2004 11:00'!\rshortAt: byteAddress put: a16BitValue\r    \"Return the half-word at byteAddress which must be even.\"\r\t| longWord shift lowBits bpwMinus2 longAddress |\r\tbpwMinus2 _ BytesPerWord-2.\r\tlowBits _ byteAddress bitAnd: bpwMinus2.\r\tlongAddress _ byteAddress - lowBits.\r\tlongWord _ self longAt: longAddress.\r\tshift _ (bpwMinus2 - lowBits) * 8.\r\tlongWord _ longWord\r\t\t\t\t- (longWord bitAnd: (16rFFFF bitShift: shift))\r\t\t\t\t+ (a16BitValue bitShift: shift).\r\tself longAt: longAddress put: longWord\r! !\r\r!InterpreterSimulatorMSB methodsFor: 'debug support' stamp: 'di 6/22/2004 14:52'!\rcharsOfLong: long\r\t^ (BytesPerWord to: 1 by: -1) collect:\r\t\t[:i | ((long digitAt: i) between: 14 and: 126)\r\t\t\t\t\tifTrue: [(long digitAt: i) asCharacter]\r\t\t\t\t\tifFalse: [$?]]! !\r\r!InterpreterSimulatorMSB methodsFor: 'initialization' stamp: 'di 6/22/2004 14:52'!\rnextLongFrom: aStream \r\t\"Read a 32- or 64-bit quantity from the given (binary) stream.\"\r\r\t^ aStream nextNumber: BytesPerWord! !\r\r\r!InterpreterSimulatorMSB64 methodsFor: 'as yet unclassified' stamp: 'di 6/9/2004 12:17'!\rbyteSwapped: w\r\t\"Return the given integer with its bytes in the reverse order.\"\r\r\t^ (super byteSwapped: ((w bitShift: -32) bitAnd: 16rFFFFFFFF)) +\r\t  ((super byteSwapped: (w bitAnd: 16rFFFFFFFF)) bitShift: 32)! !\r\r!InterpreterSimulatorMSB64 methodsFor: 'as yet unclassified' stamp: 'di 6/3/2004 16:16'!\rbytesPerWord\r\t\"overridden for 64-bit images...\"\r\r\t^ 8! !\r\r!InterpreterSimulatorMSB64 methodsFor: 'as yet unclassified' stamp: 'di 7/3/2004 10:40'!\rlong32At: byteAddress\r\t\"Return the 32-bit word at byteAddress which must be 0 mod 4.\"\r\r\t^ super longAt: byteAddress! !\r\r!InterpreterSimulatorMSB64 methodsFor: 'as yet unclassified' stamp: 'di 7/3/2004 10:41'!\rlong32At: byteAddress put: a32BitValue\r\t\"Store the 32-bit value at byteAddress which must be 0 mod 4.\"\r\r\tsuper longAt: byteAddress put: a32BitValue! !\r\r!InterpreterSimulatorMSB64 methodsFor: 'as yet unclassified' stamp: 'di 6/9/2004 15:43'!\rlongAt: byteAddress\r\t\"Note: Adjusted for Smalltalk's 1-based array indexing.\"\r\r\t^ ((super longAt: byteAddress) bitShift: 32) bitOr: (super longAt: byteAddress + 4)! !\r\r!InterpreterSimulatorMSB64 methodsFor: 'as yet unclassified' stamp: 'di 6/9/2004 15:48'!\rlongAt: byteAddress put: a64BitValue\r\t\"Note: Adjusted for Smalltalk's 1-based array indexing.\"\r\r\tsuper longAt: byteAddress put: (a64BitValue bitShift: -32).\r\tsuper longAt: byteAddress + 4 put: (a64BitValue bitAnd: 16rFFFFFFFF).\r\t^ a64BitValue! !\r\r\r!ObjectMemory class methodsFor: 'translation' stamp: 'ikp 3/26/2005 14:20'!\rdeclareCVarsIn: aCCodeGenerator\r\taCCodeGenerator var: #memory type:#'usqInt'.\r\taCCodeGenerator\r\t\tvar: #remapBuffer\r\t\tdeclareC: 'sqInt remapBuffer[', (RemapBufferSize + 1) printString, ']'.\r\taCCodeGenerator\r\t\tvar: #rootTable\r\t\tdeclareC: 'sqInt rootTable[', (RootTableSize + 1) printString, ']'.\r\taCCodeGenerator\r\t\tvar: #headerTypeBytes\r\t\tdeclareC: 'sqInt headerTypeBytes[4]'.\r\t\r\taCCodeGenerator var: #youngStart type: 'usqInt'.\r\taCCodeGenerator var: #endOfMemory type: 'usqInt'.\r\taCCodeGenerator var: #memoryLimit type: 'usqInt'.\r\taCCodeGenerator var: #youngStartLocal type: 'usqInt'.\r! !\r\r!ObjectMemory class methodsFor: 'translation' stamp: 'ikp 8/3/2004 20:17'!\runsignedIntegerSuffix\r\t\"Answer the suffix that should be appended to unsigned integer literals in generated code.\"\r\r\t^BytesPerWord = 4 ifTrue: ['U'] ifFalse: ['ULL']! !\r\r!ObjectMemory class methodsFor: 'initialization' stamp: 'ikp 9/22/2004 12:05'!\rinitBytesPerWord: nBytes\r\r\tBytesPerWord _ nBytes.\r\tShiftForWord _ (BytesPerWord log: 2) rounded.\r\t\"The following is necessary to avoid confusing the compiler with shifts that are larger than the width of the type on which they operate.  In gcc, such shifts cause incorrect code to be generated.\"\r\tBytesPerWord = 8\r\t\tifTrue:\t\t\t\t\t\"64-bit VM\"\r\t\t\t[Byte0Mask _ 16r00000000000000FF.\tByte0Shift _ 0.\r\t\t\t Byte1Mask _ 16r000000000000FF00.\tByte1Shift _ 8.\r\t\t\t Byte2Mask _ 16r0000000000FF0000.\tByte2Shift _ 16.\r\t\t\t Byte3Mask _ 16r00000000FF000000.\tByte3Shift _ 24.\r\t\t\t Byte4Mask _ 16r000000FF00000000.\tByte4Shift _ 32.\r\t\t\t Byte5Mask _ 16r0000FF0000000000.\tByte5Shift _ 40.\r\t\t\t Byte6Mask _ 16r00FF000000000000.\tByte6Shift _ 48.\r\t\t\t Byte7Mask _ 16rFF00000000000000.\tByte7Shift _ 56.\r\t\t\t Bytes3to0Mask _ 16r00000000FFFFFFFF.\r\t\t\t Bytes7to4Mask _ 16rFFFFFFFF00000000]\r\t\tifFalse:\t\t\t\t\t\"32-bit VM\"\r\t\t\t[Byte0Mask _ 16r00000000000000FF.\tByte0Shift _ 0.\r\t\t\t Byte1Mask _ 16r000000000000FF00.\tByte1Shift _ 8.\r\t\t\t Byte2Mask _ 16r0000000000FF0000.\tByte2Shift _ 16.\r\t\t\t Byte3Mask _ 16r00000000FF000000.\tByte3Shift _ 24.\r\t\t\t Byte4Mask _ 16r0000000000000000.\tByte4Shift _ 0.\t\t\"unused\"\r\t\t\t Byte5Mask _ 16r0000000000000000.\tByte5Shift _ 0.\t\t\"unused\"\r\t\t\t Byte6Mask _ 16r0000000000000000.\tByte6Shift _ 0.\t\t\"unused\"\r\t\t\t Byte7Mask _ 16r0000000000000000.\tByte7Shift _ 0.\t\t\"unused\"\r\t\t\t Bytes3to0Mask _ 16r0000000000000000.\t\t\t\t\t\"unused\"\r\t\t\t Bytes7to4Mask _ 16r0000000000000000\t\t\t\t\t\"unused\"].\r\tByte1ShiftNegated _ Byte1Shift negated.\r\tByte3ShiftNegated _ Byte3Shift negated.\r\tByte4ShiftNegated _ Byte4Shift negated.\r\tByte5ShiftNegated _ Byte5Shift negated.\r\tByte7ShiftNegated _ Byte7Shift negated.! !\r\r!ObjectMemory class methodsFor: 'initialization' stamp: 'di 7/20/2004 10:50'!\rinitialize\r\t\"ObjectMemory initialize\"\r\r\t\"Translation flags (booleans that control code generation via conditional translation):\"\r\tDoAssertionChecks _ false.  \"generate assertion checks\"\r\tDoBalanceChecks _ false. \"generate stack balance checks\"\r\r\tself initializeSpecialObjectIndices.\r\tself initializeObjectHeaderConstants.\r\r\tCtxtTempFrameStart _ 6.  \"Copy of TempFrameStart in Interp\"\r\tContextFixedSizePlusHeader _ CtxtTempFrameStart + 1.\r\tSmallContextSize _ ContextFixedSizePlusHeader + 16 * BytesPerWord.  \"16 indexable fields\"\r\t\"Large contexts have 56 indexable fileds.  Max with single header word.\"\r\t\"However note that in 64 bits, for now, large contexts have 3-word headers\"\r\tLargeContextSize _ ContextFixedSizePlusHeader + 56 * BytesPerWord.\r\t\r\tLargeContextBit _ 16r40000.  \"This bit set in method headers if large context is needed.\"\r\tNilContext _ 1.  \"the oop for the integer 0; used to mark the end of context lists\"\r\r\tRemapBufferSize _ 25.\r\tRootTableSize _ 2500.  \t\"number of root table entries (4 bytes/entry)\"\r\tRootTableRedZone _ RootTableSize - 100.\t\"red zone of root table - when reached we force IGC\"\r\r\t\"tracer actions\"\r\tStartField _ 1.\r\tStartObj _ 2.\r\tUpward _ 3.\r\tDone _ 4.! !\r\r!ObjectMemory class methodsFor: 'initialization' stamp: 'di 7/1/2004 14:44'!\rinitializeObjectHeaderConstants\r\r\tBytesPerWord ifNil: [BytesPerWord _ 4].  \"May get called on fileIn, so supply default\"\r\tBaseHeaderSize _ BytesPerWord.\r\tWordMask _ (1 bitShift: BytesPerWord*8) - 1.\r\t\r\t\"masks for type field\"\r\tTypeMask _ 3.\r\tAllButTypeMask _ WordMask - TypeMask.\r\r\t\"type field values\"\r\tHeaderTypeSizeAndClass _ 0.\r\tHeaderTypeClass _ 1.\r\tHeaderTypeFree _ 2.\r\tHeaderTypeShort _ 3.\r\r\t\"type field values used during the mark phase of GC\"\r\tHeaderTypeGC _ 2.\r\tGCTopMarker _ 3.  \"neither an oop, nor an oop+1, this value signals that we have crawled back up to the top of the marking phase.\"\r\r\t\"Base header word bit fields\"\r\tHashBits _ 16r1FFE0000.\r\tAllButHashBits _ WordMask - HashBits.\r\tHashBitsOffset _ 17.\r\tSizeMask _ 16rFC.\r\tSize4Bit _ 0.\rBytesPerWord = 8 ifTrue:\r\t\t[SizeMask _ 16rF8.  \"Lose the 4 bit in temp 64-bit chunk format\"\r\t\tSize4Bit _ 4].  \"But need it for ST size\"\r\t\"Note SizeMask + Size4Bit gives the mask needed for size fits of format word in classes.\r\t\tThis is used in instantiateClass:indexableSize: \"\r\tLongSizeMask _ WordMask - 16rFF + SizeMask.\r\tCompactClassMask _ 16r1F000.\r\r\t\"masks for root and mark bits\"\r\tMarkBit _ 1 bitShift: BytesPerWord*8 - 1.  \"Top bit\"\r\tRootBit _ 1 bitShift: BytesPerWord*8 - 2.  \"Next-to-Top bit\"\r\tAllButMarkBit _ WordMask - MarkBit.\r\tAllButRootBit _ WordMask - RootBit.\r\r\tAllButMarkBitAndTypeMask _ AllButTypeMask - MarkBit.! !\r\r!ObjectMemory class methodsFor: 'accessing' stamp: 'ikp 9/2/2004 14:08'!\rbytesPerWord\r\t\"Answer the width of an object pointer, in bytes.\"\r\r\t^BytesPerWord! !\r\r\r!Interpreter class methodsFor: 'translation' stamp: 'tpr 3/17/2005 11:36'!\rdeclareCVarsIn: aCCodeGenerator\r\r\taCCodeGenerator \r\t\tvar: #interpreterProxy \r\t\ttype: #'struct VirtualMachine*'.\r\taCCodeGenerator\r\t\tvar: #primitiveTable\r\t\tdeclareC: 'void *primitiveTable[', (MaxPrimitiveIndex +2) printString, '] = ',\tself primitiveTableString.\r\taCCodeGenerator\r\t\tvar: #primitiveFunctionPointer\r\t\tdeclareC: 'void *primitiveFunctionPointer'\t\t\t\t.\t\t\"xxxx FIX THIS STUPIDITY xxxx - ikp. What he means is use a better type than void *, apparently - tpr\"\r\taCCodeGenerator\r\t\tvar: #methodCache\r\t\tdeclareC: 'long methodCache[', (MethodCacheSize + 1) printString, ']'.\r\taCCodeGenerator\r\t\tvar: #atCache\r\t\tdeclareC: 'sqInt atCache[', (AtCacheTotalSize + 1) printString, ']'.\r\taCCodeGenerator var: #localIP type: #'char*'.\r\taCCodeGenerator var: #localSP type: #'char*'.\r\taCCodeGenerator var: #showSurfaceFn type: #'void*'.\r\taCCodeGenerator var: 'semaphoresToSignalA'\r\t\tdeclareC: 'sqInt semaphoresToSignalA[', (SemaphoresToSignalSize + 1) printString, ']'.\r\taCCodeGenerator var: 'semaphoresToSignalB'\r\t\tdeclareC: 'sqInt semaphoresToSignalB[', (SemaphoresToSignalSize + 1) printString, ']'.\r\taCCodeGenerator\r\t\tvar: #compilerHooks\r\t\tdeclareC: 'sqInt (*compilerHooks[', (CompilerHooksSize + 1) printString, '])()'.\r\taCCodeGenerator\r\t\tvar: #interpreterVersion\r\t\tdeclareC: 'const char *interpreterVersion = \"', Smalltalk datedVersion, ' [', Smalltalk lastUpdateString,']\"'.\r\taCCodeGenerator\r\t\tvar: #obsoleteIndexedPrimitiveTable\r\t\tdeclareC: 'char* obsoleteIndexedPrimitiveTable[][3] = ', self obsoleteIndexedPrimitiveTableString.\r\taCCodeGenerator\r\t\tvar: #obsoleteNamedPrimitiveTable\r\t\tdeclareC: 'const char* obsoleteNamedPrimitiveTable[][3] = ', self obsoleteNamedPrimitiveTableString.\r\taCCodeGenerator\r\t\tvar: #externalPrimitiveTable\r\t\tdeclareC: 'void *externalPrimitiveTable[', (MaxExternalPrimitiveTableSize + 1) printString, ']'.\r! !\r\r!Interpreter class methodsFor: 'initialization' stamp: 'tpr 3/17/2005 10:40'!\rinitializeCaches\r\r\t| atCacheEntrySize |\r\tMethodCacheEntries _ 512. \r\tMethodCacheSelector _ 1.\r\tMethodCacheClass _ 2.\r\tMethodCacheMethod _ 3.\r\tMethodCachePrim _ 4.\r\tMethodCacheNative _ 5.\r\tMethodCachePrimFunction _ 6.\r\tMethodCacheEntrySize _ 8.  \"Must be power of two for masking scheme.\"\r\tMethodCacheMask _ (MethodCacheEntries - 1) * MethodCacheEntrySize.\r\tMethodCacheSize _ MethodCacheEntries * MethodCacheEntrySize.\r\tCacheProbeMax _ 3.\r\r\tAtCacheEntries _ 8.  \"Must be a power of two\"\r\tAtCacheOop _ 1.\r\tAtCacheSize _ 2.\r\tAtCacheFmt _ 3.\r\tAtCacheFixedFields _ 4.\r\tatCacheEntrySize _ 4.  \"Must be power of two for masking scheme.\"\r\tAtCacheMask _ (AtCacheEntries-1) * atCacheEntrySize.\r\tAtPutBase _ AtCacheEntries * atCacheEntrySize.\r\tAtCacheTotalSize _ AtCacheEntries * atCacheEntrySize * 2.\r! !\r\r!Interpreter class methodsFor: 'initialization' stamp: 'di 6/14/2004 18:03'!\rinitializeContextIndices\r\t\"Class MethodContext\"\r\tSenderIndex _ 0.\r\tInstructionPointerIndex _ 1.\r\tStackPointerIndex _ 2.\r\tMethodIndex _ 3.\r\tReceiverIndex _ 5.\r\tTempFrameStart _ 6.  \"Note this is in two places!!\"\r\r\t\"Class BlockContext\"\r\tCallerIndex _ 0.\r\tBlockArgumentCountIndex _ 3.\r\tInitialIPIndex _ 4.\r\tHomeIndex _ 5.\r\r\t\"Class BlockClosure\"\r\tBlockMethodIndex _ 0.\r! !\r\r!Interpreter class methodsFor: 'initialization' stamp: 'tpr 3/17/2005 11:32'!\rprimitiveTableString\r\t\"Interpreter initializePrimitiveTable primitiveTableString\"\r\t| table |\r\ttable := self primitiveTable.\r\t^ String\r\t\tstreamContents: [:s | \r\t\t\ts nextPut: ${.\r\t\t\ttable\r\t\t\t\twithIndexDo: [:primSpec :index | s cr; tab;\r\t\t\t\t\tnextPutAll: '/* ';\r\t\t\t\t\tnextPutAll: (index - 1) printString;\r\t\t\t\t\tnextPutAll: '*/ ';\r\t\t\t\t\tnextPutAll: '(void *)';\r\t\t\t\t\tnextPutAll: primSpec;\r\t\t\t\t\tnextPut: $,].\r\t\t\ts cr; nextPutAll: ' 0 }']! !\r\r\r!SmalltalkImage methodsFor: 'vm parameters' stamp: 'tpr 3/17/2005 12:56'!\rvmParameterAt: parameterIndex\r\t\"parameterIndex is a positive integer corresponding to one of the VM's internal\r\tparameter/metric registers.  Answer with the current value of that register.\r\tFail if parameterIndex has no corresponding register.\r\tVM parameters are numbered as follows:\r\t\t1\tend of old-space (0-based, read-only)\r\t\t2\tend of young-space (read-only)\r\t\t3\tend of memory (read-only)\r\t\t4\tallocationCount (read-only)\r\t\t5\tallocations between GCs (read-write)\r\t\t6\tsurvivor count tenuring threshold (read-write)\r\t\t7\tfull GCs since startup (read-only)\r\t\t8\ttotal milliseconds in full GCs since startup (read-only)\r\t\t9\tincremental GCs since startup (read-only)\r\t\t10\ttotal milliseconds in incremental GCs since startup (read-only)\r\t\t11\ttenures of surving objects since startup (read-only)\r\t\t12-20 specific to the translating VM\r\t\t21\troot table size (read-only)\r\t\t22\troot table overflows since startup (read-only)\r\t\t23\tbytes of extra memory to reserve for VM buffers, plugins, etc.\r\r\t\t24\tmemory headroom when growing object memory (rw)\r\t\t25\tmemory threshold above which shrinking object memory (rw)\r\t\t26\tnumber of mSecs between VM forced interrupt checks (rw)\r\t\t27  VM word size - 4 or 8 (read-only)\"\r\r\t<primitive: 254>\r\tself primitiveFailed! !\r\r\r!SystemDictionary methodsFor: 'sources, change log' stamp: 'ikp 3/26/2005 21:59'!\rwordSize\r\t\"Answer the size (in bytes) of an object pointer.\"\r\t\"Smalltalk wordSize\"\r\r\t^[SmalltalkImage current vmParameterAt: 27] on: Error do: [4]! !\r\r!SystemDictionary methodsFor: 'deprecated' stamp: 'tpr 3/17/2005 12:55'!\rvmParameterAt: parameterIndex\r\t\"parameterIndex is a positive integer corresponding to one of the VM's internal\r\tparameter/metric registers.  Answer with the current value of that register.\r\tFail if parameterIndex has no corresponding register.\r\tVM parameters are numbered as follows:\r\t\t1\tend of old-space (0-based, read-only)\r\t\t2\tend of young-space (read-only)\r\t\t3\tend of memory (read-only)\r\t\t4\tallocationCount (read-only)\r\t\t5\tallocations between GCs (read-write)\r\t\t6\tsurvivor count tenuring threshold (read-write)\r\t\t7\tfull GCs since startup (read-only)\r\t\t8\ttotal milliseconds in full GCs since startup (read-only)\r\t\t9\tincremental GCs since startup (read-only)\r\t\t10\ttotal milliseconds in incremental GCs since startup (read-only)\r\t\t11\ttenures of surving objects since startup (read-only)\r\t\t12-20 specific to the translating VM\r\t\t21\troot table size (read-only)\r\t\t22\troot table overflows since startup (read-only)\r\t\t23\tbytes of extra memory to reserve for VM buffers, plugins, etc.\r\r\t\t24\tmemory headroom when growing object memory (rw)\r\t\t25\tmemory threshold above which shrinking object memory (rw)\r26\t\t26\tnumber of mSecs between VM forced interrupt checks (rw)\r\t\t27  VM word size - 4 or 8 (read-only)\"\r\r\t^ self deprecated: 'Use SmalltalkImage current vmParameterAt:'\r\t\tblock: [SmalltalkImage current vmParameterAt: parameterIndex]\r\t! !\r\r\r!TMethod methodsFor: 'inlining' stamp: 'ikp 6/9/2004 16:15'!\rinlineSend: aSendNode directReturn: directReturn exitVar: exitVar in: aCodeGen\r\t\"Answer a collection of statments to replace the given send. directReturn indicates that the send is the expression of a return statement, so returns can be left in the body of the inlined method. If exitVar is nil, the value returned by the send is not used; thus, returns need not assign to the output variable.\"\r\r\t| sel meth exitLabel labelUsed inlineStmts |\r\tsel _ aSendNode selector.\r\tmeth _ (aCodeGen methodNamed: sel) copy.\r\tmeth renameVarsForInliningInto: self in: aCodeGen.\r\tmeth renameLabelsForInliningInto: self.\r\tself addVarsDeclarationsAndLabelsOf: meth.\r\tmeth hasReturn ifTrue: [\r\t\tdirectReturn ifTrue: [\r\t\t\t\"propagate the return type, if necessary\"\r\t\t\treturnType = meth returnType ifFalse: [ self halt ].  \"caller's return type should be declared by user\"\r\t\t\treturnType _ meth returnType.\r\t\t] ifFalse: [\r\t\t\texitLabel _ self unusedLabelForInliningInto: self.\r\t\t\tlabelUsed _ meth exitVar: exitVar label: exitLabel.\r\t\t\tlabelUsed\r\t\t\t\tifTrue: [ labels add: exitLabel ]\r\t\t\t\tifFalse: [ exitLabel _ nil ].\r\t\t].\r\t\t\"propagate type info if necessary\"\r\t\t((exitVar ~= nil) and: [meth returnType ~= 'sqInt']) ifTrue: [\r\t\t\tdeclarations at: exitVar put: meth returnType, ' ', exitVar.\r\t\t].\r\t].\r\tinlineStmts _ OrderedCollection new: 100.\r\tinlineStmts add: (TLabeledCommentNode new setComment: 'begin ', sel).\r\tinlineStmts addAll:\r\t\t(self argAssignmentsFor: meth args: aSendNode args in: aCodeGen).\r\tinlineStmts addAll: meth statements.  \"method body\"\r\t(directReturn and: [meth endsWithReturn not]) ifTrue: [\r\t\tinlineStmts add: (TReturnNode new setExpression: (TVariableNode new setName: 'nil')).\r\t].\r\texitLabel ~= nil ifTrue: [\r\t\tinlineStmts add:\r\t\t\t(TLabeledCommentNode new\r\t\t\t\tsetLabel: exitLabel comment: 'end ', meth selector).\r\t].\r\t^inlineStmts! !\r\r!TMethod methodsFor: 'C code generation' stamp: 'ikp 6/9/2004 16:15'!\remitCFunctionPrototype: aStream generator: aCodeGen\r\t\"Emit a C function header for this method onto the given stream.\"\r\r\t| arg |\r\texport \r\t\tifTrue:[aStream nextPutAll:'EXPORT('; nextPutAll: returnType; nextPutAll:') ']\r\t\tifFalse:[(aCodeGen isGeneratingPluginCode and:[self isStatic]) \r\t\t\t\t\tifTrue:[aStream nextPutAll:'static '].\r\t\t\t\taStream nextPutAll: returnType; space].\r\taStream nextPutAll: (aCodeGen cFunctionNameFor: selector), '('.\r\targs isEmpty ifTrue: [ aStream nextPutAll: 'void' ].\r\t1 to: args size do: [ :i |\r\t\targ _ args at: i.\r\t\t(declarations includesKey: arg) ifTrue: [\r\t\t\taStream nextPutAll: (declarations at: arg).\r\t\t] ifFalse: [\r\t\t\taStream nextPutAll: 'sqInt ', (args at: i).\r\t\t].\r\t\ti < args size ifTrue: [ aStream nextPutAll: ', ' ].\r\t].\r\taStream nextPutAll: ')'.! !\r\r!TMethod methodsFor: 'C code generation' stamp: 'ikp 6/9/2004 16:15'!\remitCHeaderOn: aStream generator: aCodeGen\r\t\"Emit a C function header for this method onto the given stream.\"\r\r\taStream cr. \r\tself emitCFunctionPrototype: aStream generator: aCodeGen.\r\taStream nextPutAll: ' {'; cr.\r\tself emitGlobalStructReferenceOn: aStream.\r\tlocals do: [ :var |\r\t\taStream nextPutAll: '    '.\r\t\taStream nextPutAll: (declarations at: var ifAbsent: [ 'sqInt ', var]), ';'; cr.\r\t].\r\tlocals isEmpty ifFalse: [ aStream cr ].! !\r\r!TMethod methodsFor: 'C code generation' stamp: 'ikp 6/9/2004 16:15'!\remitInlineOn: aStream level: level generator: aCodeGen\r\t\"Emit C code for this method onto the given stream. All calls to inlined methods should already have been expanded.\"\r\tself removeUnusedTemps.\r\tsharedLabel ifNotNil:[\r\t\taStream crtab: level-1; nextPutAll: sharedLabel; nextPutAll:':'.\r\t\taStream crtab: level.\r\t\taStream nextPutAll: '/* '; nextPutAll: selector; nextPutAll: ' */'.\r\t\taStream crtab: level.\r\t].\r\taStream nextPutAll:'{'; cr.\r\tlocals do: [ :var |\r\t\taStream tab: level+1.\r\t\taStream nextPutAll: (declarations at: var ifAbsent: [ 'sqInt ', var]), ';'; cr.\r\t].\r\tparseTree emitCCodeOn: aStream level: level+1 generator: aCodeGen.\r\taStream tab: level; nextPutAll: '}'; cr.! !\r\r!TMethod methodsFor: 'C code generation' stamp: 'ikp 6/9/2004 16:15'!\remitProxyFunctionPrototype: aStream generator: aCodeGen\r\t\"Emit an indirect C function header for this method onto the given stream.\"\r\r\t| arg |\r\taStream nextPutAll: returnType; space.\r\taStream nextPutAll: '(*', (aCodeGen cFunctionNameFor: selector), ')('.\r\targs isEmpty ifTrue: [ aStream nextPutAll: 'void' ].\r\t1 to: args size do: [ :i |\r\t\targ _ args at: i.\r\t\t(declarations includesKey: arg) ifTrue: [\r\t\t\taStream nextPutAll: (declarations at: arg).\r\t\t] ifFalse: [\r\t\t\taStream nextPutAll: 'sqInt ', (args at: i).\r\t\t].\r\t\ti < args size ifTrue: [ aStream nextPutAll: ', ' ].\r\t].\r\taStream nextPutAll: ')'.! !\r\r!TMethod methodsFor: 'initialization' stamp: 'ikp 6/9/2004 16:16'!\rsetSelector: sel args: argList locals: localList block: aBlockNode primitive: aNumber\r\t\"Initialize this method using the given information.\"\r\r\tselector _ sel.\r\treturnType _ 'sqInt'. \t \"assume return type is long for now\"\r\targs _ argList asOrderedCollection collect: [:arg | arg key].\r\tlocals _ localList asOrderedCollection collect: [:arg | arg key].\r\tdeclarations _ Dictionary new.\r\tprimitive _ aNumber.\r\tparseTree _ aBlockNode asTranslatorNode.\r\tlabels _ OrderedCollection new.\r\tcomplete _ false.  \"set to true when all possible inlining has been done\"\r\texport _ self extractExportDirective.\r\tstatic _ self extractStaticDirective.\r\tself extractSharedCase.\r\tself removeFinalSelfReturn.\r\tself recordDeclarations.\r\tglobalStructureBuildMethodHasFoo _ 0.! !\r\r\r!VMMaker methodsFor: 'target directories' stamp: 'ikp 9/2/2004 14:11'!\rinterpreterFilename\r\t\"Answer the filename for the core interpreter.  Default is 'interp.c'.\"\r\r\t^'interp.c'! !\r\r!VMMaker methodsFor: 'target directories' stamp: 'ikp 9/2/2004 14:11'!\rinterpreterHeaderName\r\t\"Answer the filename for the core interpreter header.  Default is 'interp.h'.\"\r\r\t^'interp.h'! !\r\r!VMMaker methodsFor: 'initialize' stamp: 'svp 11/14/2002 21:01'!\rinitialize\r\tlogger := Transcript.\r\tinline _ true.\r\tforBrowser _ false.\r\tinternalPlugins _ SortedCollection new.\r\texternalPlugins _ SortedCollection new.\r\tplatformName _ self class machinesDirName.\r\tallFilesList _ Dictionary new.\r\tinterpreterClassName _ 'Interpreter'.! !\r\r!VMMaker methodsFor: 'generate sources' stamp: 'ikp 9/2/2004 14:13'!\rgenerateInterpreterFile\r\t\"Translate the Smalltalk description of the virtual machine into C.  If 'self doInlining' is true, small method bodies are inlined to reduce procedure call overhead.  On the PPC, this results in a factor of three speedup with only 30% increase in code size.  Subclasses can use specialised versions of CCodeGenerator and interpreterClass.\"\r\r\tself needsToRegenerateInterpreterFile ifFalse: [^nil].\r\tself interpreterClass initialize.\r\tObjectMemory initialize.\r\tself createCodeGenerator\r\t\taddClass: self interpreterClass;\r\t\taddClass: ObjectMemory;\r\t\tstoreHeaderOnFile: self interpreterHeaderPath bytesPerWord: ObjectMemory bytesPerWord;\r\t\tstoreCodeOnFile: self interpreterFilePath doInlining: self doInlining! !\r\r!VMMaker methodsFor: 'generate sources' stamp: 'ikp 9/2/2004 14:09'!\rinterpreterFilePath\r\t\"Answer the fully-qualified path for the generated interpreter file.\"\r\r\t^self coreVMDirectory fullNameFor: self interpreterFilename! !\r\r!VMMaker methodsFor: 'generate sources' stamp: 'ikp 9/2/2004 14:10'!\rinterpreterHeaderPath\r\t\"Answer the fully-qualified path for the generated interpreter header file.\"\r\r\t^self coreVMDirectory fullNameFor: self interpreterHeaderName! !\r\r\r!RiscOSVMMaker methodsFor: 'generate sources' stamp: 'tpr 3/17/2005 16:26'!\rinterpreterHeaderPath\r\t\"return the full path for the interpreter header file\"\r\t\"RiscOS keeps the interp file in a 'h' subdirectory of coreVMDirectory\"\r\tself coreVMDirectory assureExistenceOfPath: 'h'.\r\t^(self coreVMDirectory directoryNamed: 'h') fullNameFor: self interpreterFilename! !\r\r\r!VMPluginCodeGenerator methodsFor: 'C code generator' stamp: 'ikp 6/9/2004 17:36'!\remitCHeaderOn: aStream\r\t\"Write a C file header onto the given stream.\"\r\r\taStream nextPutAll: '/* Automatically generated from Squeak on '.\r\taStream nextPutAll: Time dateAndTimeNow printString.\r\taStream nextPutAll: ' */';cr.\r\r\taStream nextPutAll:'\r#include <math.h>\r#include <stdio.h>\r#include <stdlib.h>\r#include <string.h>\r#include <time.h>\r\r/* Default EXPORT macro that does nothing (see comment in sq.h): */\r#define EXPORT(returnType) returnType\r\r/* Do not include the entire sq.h file but just those parts needed. */\r/*  The virtual machine proxy definition */\r#include \"sqVirtualMachine.h\"\r/* Configuration options */\r#include \"sqConfig.h\"\r/* Platform specific definitions */\r#include \"sqPlatformSpecific.h\"\r\r#define true 1\r#define false 0\r#define null 0  /* using ''null'' because nil is predefined in Think C */\r#ifdef SQUEAK_BUILTIN_PLUGIN\r#undef EXPORT\r// was #undef EXPORT(returnType) but screws NorCroft cc\r#define EXPORT(returnType) static returnType\r#endif\r'.\r\r\t\"Additional header files\"\r\theaderFiles do:[:hdr|\r\t\taStream nextPutAll:'#include '; nextPutAll: hdr; cr].\r\r\r\taStream nextPutAll: '\r#include \"sqMemoryAccess.h\"\r\r'.\r\taStream cr.! !\r\rObjectMemory initialize!\rInterpreterSimulatorMSB removeSelector: #halfWordAt:!\rInterpreterSimulatorMSB removeSelector: #halfWordAt:put:!\rInterpreterSimulatorLSB removeSelector: #halfWordAt:!\rInterpreterSimulatorLSB removeSelector: #halfWordAt:put:!\rInterpreter subclass: #InterpreterSimulator\r\tinstanceVariableNames: 'byteCount sendCount traceOn myBitBlt displayForm filesOpen imageName pluginList mappedPluginEntries inputSem quitBlock transcript displayView logging'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'VMMaker-InterpreterSimulation'!\rObject subclass: #ObjectMemory\r\tinstanceVariableNames: 'memory youngStart endOfMemory memoryLimit nilObj falseObj trueObj specialObjectsOop rootTable rootTableCount child field parentField freeBlock lastHash allocationCount lowSpaceThreshold signalLowSpace compStart compEnd fwdTableNext fwdTableLast remapBuffer remapBufferCount allocationsBetweenGCs tenuringThreshold statFullGCs statFullGCMSecs statIncrGCs statIncrGCMSecs statTenures statRootTableOverflows freeContexts freeLargeContexts interruptCheckCounter totalObjectCount shrinkThreshold growHeadroom headerTypeBytes youngStartLocal'\r\tclassVariableNames: 'AllButHashBits AllButMarkBit AllButMarkBitAndTypeMask AllButRootBit AllButTypeMask BaseHeaderSize BlockContextProto Byte0Mask Byte0Shift Byte1Mask Byte1Shift Byte1ShiftNegated Byte2Mask Byte2Shift Byte3Mask Byte3Shift Byte3ShiftNegated Byte4Mask Byte4Shift Byte4ShiftNegated Byte5Mask Byte5Shift Byte5ShiftNegated Byte6Mask Byte6Shift Byte7Mask Byte7Shift Byte7ShiftNegated Bytes3to0Mask Bytes7to4Mask BytesPerWord CharacterTable ClassArray ClassBitmap ClassBlockContext ClassByteArray ClassCharacter ClassCompiledMethod ClassExternalAddress ClassExternalData ClassExternalFunction ClassExternalLibrary ClassExternalStructure ClassFloat ClassInteger ClassLargeNegativeInteger ClassLargePositiveInteger ClassMessage ClassMethodContext ClassPoint ClassProcess ClassPseudoContext ClassSemaphore ClassString ClassTranslatedMethod CompactClassMask CompactClasses ConstMinusOne ConstOne ConstTwo ConstZero ContextFixedSizePlusHeader CtxtTempFrameStart DoAssertionChecks DoBalanceChecks Done ExternalObjectsArray FalseObject FloatProto GCTopMarker HashBits HashBitsOffset HeaderTypeClass HeaderTypeFree HeaderTypeGC HeaderTypeShort HeaderTypeSizeAndClass LargeContextBit LargeContextSize LongSizeMask MarkBit MethodContextProto NilContext NilObject RemapBufferSize RootBit RootTableRedZone RootTableSize SchedulerAssociation SelectorAboutToReturn SelectorCannotInterpret SelectorCannotReturn SelectorDoesNotUnderstand SelectorMustBeBoolean SelectorRunWithIn ShiftForWord Size4Bit SizeMask SmallContextSize SpecialSelectors StackStart StartField StartObj TheDisplay TheFinalizationSemaphore TheInputSemaphore TheInterruptSemaphore TheLowSpaceSemaphore TheTimerSemaphore TrueObject TypeMask Upward WordMask'\r\tpoolDictionaries: ''\r\tcategory: 'VMMaker-Interpreter'!\rLargeIntegersPlugin removeSelector: #flag:!\r\r!FilePluginSimulator reorganize!\r('simulation' fileValueOf: makeDirEntryName:size:createDate:modDate:isDir:fileSize: oopForPointer: primitiveDirectoryLookup primitiveFileDelete primitiveFileOpen primitiveFileRename sqFile:Read:Into:At: sqFile:SetPosition: sqFile:Truncate: sqFile:Write:From:At: sqFileAtEnd: sqFileClose: sqFileFlush: sqFileGetPosition: sqFileSize:)\r('file security' ioCanCreatePath:OfSize: ioCanDeleteFile:OfSize: ioCanDeletePath:OfSize: ioCanGetFileType:OfSize: ioCanListPath:OfSize: ioCanOpenFile:OfSize:Writable: ioCanRenameFile:OfSize: ioCanSetFileType:OfSize:)\r!\r\r\r!BitBltSimulator reorganize!\r('debug support' dstLongAt: dstLongAt:put: srcLongAt:)\r('simulation' initBBOpTable initializeDitherTables mergeFn:with: tableLookup:at:)\r!\r\rBalloonEnginePlugin subclass: #BalloonEngineSimulation\r\tinstanceVariableNames: 'bbObj workBufferArray'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'VMMaker-InterpreterSimulation'!\rBalloonEngineBase removeSelector: #fillSpan:from:to:max:!\r"
  },
  {
    "path": "vm/src/from_squeak/unix/misc/VMM38b4-64bit-vm2-ikp.2.cs",
    "content": "'From Squeak3.8gamma of ''24 November 2004'' [latest update: #6548] on 31 March 2005 at 3:46:37 pm'!\r\"Change Set:\t\tVMM38b4-64bit-vm2-ikp\rDate:\t\t\t2005-03-31\rAuthor:\t\t\tian.piumarta@squeakland.org\r\rChanges relative to VMM38b4-64bit-vm1 that add 64-bit support to SmartSyntaxInterpreterPlugins.  Needed to correctly translate the SocketPlugin.\"!\r\r\r!Object class methodsFor: 'plugin generation' stamp: 'ikp 3/31/2005 14:20'!\rccgDeclareCForVar: aSymbolOrString\r\r\t^'sqInt ', aSymbolOrString! !\r\r\r!Array class methodsFor: 'plugin generation' stamp: 'ikp 3/31/2005 14:20'!\rccgDeclareCForVar: aSymbolOrString\r\r\t^'sqInt *', aSymbolOrString! !\r\r\r!Oop class methodsFor: 'plugin generation' stamp: 'ikp 3/31/2005 14:20'!\rccgDeclareCForVar: aSymbolOrString\r\r\t^'sqInt ', aSymbolOrString! !\r\r\r!SmartSyntaxPluginCodeGenerator methodsFor: 'translating builtins' stamp: 'ikp 3/31/2005 15:46'!\rgenerateCPtrAsOop: aNode on: aStream indent: anInteger\r\r\taStream nextPutAll: '((sqInt)(long)('.\r\tself emitCExpression: aNode receiver on: aStream.\r\taStream nextPutAll: ') - sizeof(sqInt))'.! !\r\r\r!SmartSyntaxPluginTMethod methodsFor: 'private' stamp: 'ikp 3/31/2005 14:23'!\roopVariable: aString\r\r\t(locals includes: aString) ifFalse:\r\t\t[locals add: aString.\r\t\t declarations\r\t\t\tat: aString \r\t\t\tput: 'sqInt ', aString].\r\t^TVariableNode new setName: aString! !\r\r!SmartSyntaxPluginTMethod methodsFor: 'generating C code' stamp: 'ikp 3/31/2005 14:23'!\remitCHeaderOn: aStream generator: aCodeGen\r\t\"Emit a C function header for this method onto the given stream.\"\r\r\taStream cr.\r\tself emitCFunctionPrototype: aStream generator: aCodeGen.\r\taStream nextPutAll: ' {'; cr.\r\tlocals do: [ :var |\r\t\taStream \r\t\t\ttab; \r\t\t\tnextPutAll: (declarations \r\t\t\t\tat: var \r\t\t\t\tifAbsent: [ 'sqInt ', var]);\r\t\t\tnextPut: $;; \r\t\t\tcr].\r\tlocals isEmpty ifFalse: [ aStream cr ].! !\r\r!SmartSyntaxPluginTMethod methodsFor: 'initializing' stamp: 'ikp 3/31/2005 14:01'!\rsetSelector: sel args: argList locals: localList block: aBlockNode primitive: aNumber\r\t\"Initialize this method using the given information.\"\r\r\tselector _ sel.\r\treturnType _ 'sqInt'. \t \"assume return type is sqInt for now\"\r\targs _ argList asOrderedCollection collect: [:arg | arg key].\r\tlocals _ localList asOrderedCollection collect: [:arg | arg key].\r\tdeclarations _ Dictionary new.\r\tprimitive _ aNumber.\r\tparseTree _ aBlockNode asTranslatorNode.\r\tlabels _ OrderedCollection new.\r\tcomplete _ false.  \"set to true when all possible inlining has been done\"\r\texport _ self extractExportDirective.\r\tstatic _ self extractStaticDirective.\r\tself extractSharedCase.\r\tisPrimitive _ false.  \"set to true only if you find a primtive direction.\"\r\tsuppressingFailureGuards _ self extractSuppressFailureGuardDirective.\r\tself recordDeclarations.\r\tself extractPrimitiveDirectives.\r! !\r\r\r!SocketPlugin methodsFor: 'primitives' stamp: 'ikp 3/31/2005 14:12'!\rintToNetAddress: addr\r\t\"Convert the given 32-bit integer into an internet network address represented as a four-byte ByteArray.\"\r\r\t| netAddressOop naPtr |\r\tself var: #naPtr declareC: 'char * naPtr'.\r\r\tnetAddressOop _\r\t\tinterpreterProxy instantiateClass: interpreterProxy classByteArray\r\t\t\tindexableSize: 4.\r\tnaPtr _ netAddressOop asCharPtr.\r\tnaPtr at: 0 put: (self cCoerce: ((addr >> 24) bitAnd: 16rFF) to: 'char').\r\tnaPtr at: 1 put: (self cCoerce: ((addr >> 16) bitAnd: 16rFF) to: 'char').\r\tnaPtr at: 2 put: (self cCoerce: ((addr >> 8) bitAnd: 16rFF) to: 'char').\r\tnaPtr at: 3 put: (self cCoerce: (addr bitAnd: 16rFF) to: 'char').\r\t^ netAddressOop! !\r\r!SocketPlugin methodsFor: 'primitives' stamp: 'ikp 3/31/2005 14:03'!\rprimitiveSocket: socket getOptions: optionName\r\r\t| s optionNameStart optionNameSize returnedValue errorCode results |\r\tself var: #s declareC: 'SocketPtr s'.\r\tself var: #optionNameStart declareC: 'char *optionNameStart'.\r\tself primitive: 'primitiveSocketGetOptions'\r\t\tparameters: #(Oop Oop).\r\r\ts _ self socketValueOf: socket.\r\tinterpreterProxy success: (interpreterProxy isBytes: optionName).\r\toptionNameStart _ self cCoerce: (interpreterProxy firstIndexableField: optionName) to: 'char *'.\r\toptionNameSize _ interpreterProxy slotSizeOf: optionName.\r\r\tinterpreterProxy failed ifTrue: [^nil].\r\treturnedValue _ 0.\r\r\terrorCode _ self sqSocketGetOptions: s \r\t\t\toptionNameStart: optionNameStart \r\t\t\toptionNameSize: optionNameSize\r\t\t\treturnedValue: (self cCode: '&returnedValue').\r\r\tinterpreterProxy pushRemappableOop: returnedValue asSmallIntegerObj.\r\tinterpreterProxy pushRemappableOop: errorCode asSmallIntegerObj.\r\tinterpreterProxy pushRemappableOop: (interpreterProxy instantiateClass: (interpreterProxy classArray) indexableSize: 2).\r\tresults _ interpreterProxy popRemappableOop.\r\tinterpreterProxy storePointer: 0 ofObject: results withValue: interpreterProxy popRemappableOop.\r\tinterpreterProxy storePointer: 1 ofObject: results withValue: interpreterProxy popRemappableOop.\r\t^ results! !\r\r!SocketPlugin methodsFor: 'primitives' stamp: 'ikp 3/31/2005 14:08'!\rprimitiveSocket: socket receiveDataBuf: array start: startIndex count: count \r\t| s byteSize arrayBase bufStart bytesReceived |\r\tself var: #s declareC: 'SocketPtr s'.\r\tself var: #arrayBase declareC: 'char *arrayBase'.\r\tself var: #bufStart declareC: 'char *bufStart'.\r\tself primitive: 'primitiveSocketReceiveDataBufCount'\r\t\tparameters: #(Oop Oop SmallInteger SmallInteger ).\r\ts _ self socketValueOf: socket.\r\r\t\"buffer can be any indexable words or bytes object\"\r\tinterpreterProxy success: (interpreterProxy isWordsOrBytes: array).\r\t(interpreterProxy isWords: array)\r\t\tifTrue: [byteSize _ 4]\r\t\tifFalse: [byteSize _ 1].\r\tinterpreterProxy success: (startIndex >= 1\r\t\t\tand: [count >= 0 and: [startIndex + count - 1 <= (interpreterProxy slotSizeOf: array)]]).\r\tinterpreterProxy failed\r\t\tifFalse: [\"Note: adjust bufStart for zero-origin indexing\"\r\t\t\tarrayBase _ self cCoerce: (interpreterProxy firstIndexableField: array) to: 'char *'.\r\t\t\tbufStart _ arrayBase + (startIndex - 1 * byteSize).\r\t\t\tbytesReceived _ self\r\t\t\t\t\t\tsqSocket: s\r\t\t\t\t\t\tReceiveDataBuf: bufStart\r\t\t\t\t\t\tCount: count * byteSize].\r\t^ (bytesReceived // byteSize) asSmallIntegerObj! !\r\r!SocketPlugin methodsFor: 'primitives' stamp: 'ikp 3/31/2005 14:09'!\rprimitiveSocket: socket receiveUDPDataBuf: array start: startIndex count: count \r\t| s byteSize arrayBase bufStart bytesReceived results address port moreFlag |\r\tself var: #s declareC: 'SocketPtr s'.\r\tself var: #arrayBase declareC: 'char *arrayBase'.\r\tself var: #bufStart declareC: 'char *bufStart'.\r\tself primitive: 'primitiveSocketReceiveUDPDataBufCount'\r\t\tparameters: #(Oop Oop SmallInteger SmallInteger ).\r\ts _ self socketValueOf: socket.\r\r\t\"buffer can be any indexable words or bytes object\"\r\tinterpreterProxy success: (interpreterProxy isWordsOrBytes: array).\r\t(interpreterProxy isWords: array)\r\t\tifTrue: [byteSize _ 4]\r\t\tifFalse: [byteSize _ 1].\r\tinterpreterProxy success: (startIndex >= 1\r\t\t\tand: [count >= 0 and: [startIndex + count - 1 <= (interpreterProxy slotSizeOf: array)]]).\r\tinterpreterProxy failed\r\t\tifFalse: [\"Note: adjust bufStart for zero-origin indexing\"\r\t\t\tarrayBase _ self cCoerce: (interpreterProxy firstIndexableField: array) to: 'char *'.\r\t\t\tbufStart _ arrayBase + (startIndex - 1 * byteSize).\r\t\t\t\"allocate storage for results, remapping newly allocated\r\t\t\t oops in case GC happens during allocation\"\r\t\t\taddress\t\t  _ 0.\r\t\t\tport\t\t\t  _ 0.\r\t\t\tmoreFlag\t  _ 0.\r\t\t\tbytesReceived _ self\r\t\t\t\t\t\tsqSocket: s\r\t\t\t\t\t\tReceiveUDPDataBuf: bufStart\r\t\t\t\t\t\tCount: count * byteSize\r\t\t\t\t\t\taddress: (self cCode: '&address')\r\t\t\t\t\t\tport: (self cCode: '&port')\r\t\t\t\t\t\tmoreFlag: (self cCode: '&moreFlag').\r\t\t\t\t\r\t\t\tinterpreterProxy pushRemappableOop: port asSmallIntegerObj.\r\t\t\tinterpreterProxy pushRemappableOop: (self intToNetAddress: address).\r\t\t\tinterpreterProxy pushRemappableOop: (bytesReceived // byteSize) asSmallIntegerObj.\r\t\t\tinterpreterProxy pushRemappableOop:\r\t\t\t\t(interpreterProxy instantiateClass: (interpreterProxy classArray) indexableSize: 4).\r\t\t\tresults         _ interpreterProxy popRemappableOop.\r\t\t\tinterpreterProxy storePointer: 0 ofObject: results withValue: interpreterProxy popRemappableOop.\r\t\t\tinterpreterProxy storePointer: 1 ofObject: results withValue: interpreterProxy popRemappableOop.\r\t\t\tinterpreterProxy storePointer: 2 ofObject: results withValue: interpreterProxy popRemappableOop.\r\t\t\tmoreFlag\r\t\t\t\tifTrue: [ interpreterProxy storePointer: 3 ofObject: results withValue: interpreterProxy trueObject ]\r\t\t\t\tifFalse: [ interpreterProxy storePointer: 3 ofObject: results withValue: interpreterProxy falseObject ].\r\t\t\t].\r\t^ results! !\r\r!SocketPlugin methodsFor: 'primitives' stamp: 'ikp 3/31/2005 14:05'!\rprimitiveSocket: socket sendData: array start: startIndex count: count \r\t| s byteSize arrayBase bufStart bytesSent |\r\tself var: #s declareC: 'SocketPtr s'.\r\tself var: #arrayBase declareC: 'char *arrayBase'.\r\tself var: #bufStart declareC: 'char *bufStart'.\r\tself primitive: 'primitiveSocketSendDataBufCount'\r\t\tparameters: #(Oop Oop SmallInteger SmallInteger ).\r\ts _ self socketValueOf: socket.\r\r\t\"buffer can be any indexable words or bytes object except CompiledMethod \"\r\tinterpreterProxy success: (interpreterProxy isWordsOrBytes: array).\r\t(interpreterProxy isWords: array)\r\t\tifTrue: [byteSize _ 4]\r\t\tifFalse: [byteSize _ 1].\r\tinterpreterProxy success: (startIndex >= 1\r\t\t\tand: [count >= 0 and: [startIndex + count - 1 <= (interpreterProxy slotSizeOf: array)]]).\r\tinterpreterProxy failed\r\t\tifFalse: [\"Note: adjust bufStart for zero-origin indexing\"\r\t\t\tarrayBase _ self cCoerce: (interpreterProxy firstIndexableField: array) to: 'char *'.\r\t\t\tbufStart _ arrayBase + (startIndex - 1 * byteSize).\r\t\t\tbytesSent _ self\r\t\t\t\t\t\tsqSocket: s\r\t\t\t\t\t\tSendDataBuf: bufStart\r\t\t\t\t\t\tCount: count * byteSize].\r\t^ (bytesSent // byteSize) asSmallIntegerObj! !\r\r!SocketPlugin methodsFor: 'primitives' stamp: 'ikp 3/31/2005 14:06'!\rprimitiveSocket: socket sendUDPData: array toHost: hostAddress  port: portNumber start: startIndex count: count \r\t| s byteSize arrayBase bufStart bytesSent address |\r\tself var: #s declareC: 'SocketPtr s'.\r\tself var: #arrayBase declareC: 'char *arrayBase'.\r\tself var: #bufStart declareC: 'char *bufStart'.\r\tself primitive: 'primitiveSocketSendUDPDataBufCount'\r\t\tparameters: #(Oop Oop ByteArray SmallInteger SmallInteger SmallInteger ).\r\ts _ self socketValueOf: socket.\r\r\t\"buffer can be any indexable words or bytes object except CompiledMethod \"\r\tinterpreterProxy success: (interpreterProxy isWordsOrBytes: array).\r\t(interpreterProxy isWords: array)\r\t\tifTrue: [byteSize _ 4]\r\t\tifFalse: [byteSize _ 1].\r\tinterpreterProxy success: (startIndex >= 1\r\t\t\tand: [count >= 0 and: [startIndex + count - 1 <= (interpreterProxy slotSizeOf: array)]]).\r\tinterpreterProxy failed\r\t\tifFalse: [\"Note: adjust bufStart for zero-origin indexing\"\r\t\t\tarrayBase _ self cCoerce: (interpreterProxy firstIndexableField: array) to: 'char *'.\r\t\t\tbufStart _ arrayBase + (startIndex - 1 * byteSize).\r\t\t\taddress _ self netAddressToInt: (self cCoerce: hostAddress to: 'unsigned char *').\r\t\t\tbytesSent _ self\r\t\t\t\t\t\tsqSocket: s\r\t\t\t\t\t\ttoHost: address\r\t\t\t\t\t\tport: portNumber\r\t\t\t\t\t\tSendDataBuf: bufStart\r\t\t\t\t\t\tCount: count * byteSize].\r\t^ (bytesSent // byteSize) asSmallIntegerObj! !\r\r!SocketPlugin methodsFor: 'primitives' stamp: 'ikp 3/31/2005 14:06'!\rprimitiveSocket: socket setOptions: optionName value: optionValue\r\r\t| s optionNameStart optionNameSize optionValueStart optionValueSize returnedValue errorCode results |\r\tself var: #s declareC: 'SocketPtr s'.\r\tself var: #optionNameStart declareC: 'char *optionNameStart'.\r\tself var: #optionValueStart declareC: 'char *optionValueStart'.\r\tself primitive: 'primitiveSocketSetOptions'\r\t\tparameters: #(Oop Oop Oop).\r\r\ts _ self socketValueOf: socket.\r\tinterpreterProxy success: (interpreterProxy isBytes: optionName).\r\toptionNameStart _ self cCoerce: (interpreterProxy firstIndexableField: optionName) to: 'char *'.\r\toptionNameSize _ interpreterProxy slotSizeOf: optionName.\r\tinterpreterProxy success: (interpreterProxy isBytes: optionValue).\r\toptionValueStart_ self cCoerce: (interpreterProxy firstIndexableField: optionValue) to: 'char *'.\r\toptionValueSize _ interpreterProxy slotSizeOf: optionValue.\r\r\tinterpreterProxy failed ifTrue: [^nil].\r\treturnedValue _ 0.\r\r\terrorCode _ self sqSocketSetOptions: s \r\t\t\toptionNameStart: optionNameStart \r\t\t\toptionNameSize: optionNameSize\r\t\t\toptionValueStart: optionValueStart\r\t\t\toptionValueSize: optionValueSize\r\t\t\treturnedValue: (self cCode: '&returnedValue').\r\r\tinterpreterProxy pushRemappableOop: returnedValue asSmallIntegerObj.\r\tinterpreterProxy pushRemappableOop: errorCode asSmallIntegerObj.\r\tinterpreterProxy pushRemappableOop: (interpreterProxy instantiateClass: (interpreterProxy classArray) indexableSize: 2).\r\tresults _ interpreterProxy popRemappableOop.\r\tinterpreterProxy storePointer: 0 ofObject: results withValue: interpreterProxy popRemappableOop.\r\tinterpreterProxy storePointer: 1 ofObject: results withValue: interpreterProxy popRemappableOop.\r\t^ results! !\r\r!SocketPlugin methodsFor: 'primitives' stamp: 'ikp 3/31/2005 14:08'!\rsocketValueOf: socketOop \r\t\"Return a pointer to the first byte of of the socket record within the  \r\tgiven Smalltalk object, or nil if socketOop is not a socket record.\"\r\t| socketIndex |\r\tself returnTypeC: 'SQSocket *'.\r\tself var: #socketIndex type: 'void *'.\r\tinterpreterProxy success: ((interpreterProxy isBytes: socketOop)\r\t\t\tand: [(interpreterProxy byteSizeOf: socketOop)\r\t\t\t\t\t= self socketRecordSize]).\r\tinterpreterProxy failed\r\t\tifTrue: [^ nil]\r\t\tifFalse: [socketIndex _ self cCoerce: (interpreterProxy firstIndexableField: socketOop) to: 'void *'.\r\t\t\t^ self cCode: '(SQSocket *) socketIndex']! !\r\r\r!SocketPlugin class methodsFor: 'translation' stamp: 'ikp 3/31/2005 13:43'!\rdeclareCVarsIn: aCCodeGenerator\r\r\taCCodeGenerator var: 'sDSAfn'\ttype: 'void *'.\r\taCCodeGenerator var: 'sHSAfn'\ttype: 'void *'.\r\taCCodeGenerator var: 'sCCTPfn'\ttype: 'void *'.\r\taCCodeGenerator var: 'sCCLOPfn'\ttype: 'void *'.\r\taCCodeGenerator var: 'sCCSOTfn'\ttype: 'void *'.\r\taCCodeGenerator addHeaderFile: '\"SocketPlugin.h\"'! !\r\r\r!Unsigned methodsFor: 'as yet unclassified' stamp: 'ikp 3/31/2005 14:19'!\rccgDeclareCForVar: aSymbolOrString\r\r\t^'unsigned int ', aSymbolOrString! !\r\r\r!WordArray class methodsFor: 'plugin generation' stamp: 'ikp 3/31/2005 14:19'!\rccgDeclareCForVar: aSymbolOrString\r\r\t^'usqInt *', aSymbolOrString! !\r\r"
  },
  {
    "path": "vm/src/from_squeak/unix/misc/threadValidate/Makefile",
    "content": "INCLUDES=-I. -I../../../Cross/vm -I../../../../src/vm -I../../vm\n# __USE_GNU declares pthread_yield\nCFLAGS=-g2 -O1 -msse2 -Wall -D_GNU_SOURCE\nLDFLAGS=-lpthread\n\nall: testi testt\n\ntesti: sqTicker.c sqUnixHeartbeat.c threadValidate.c\n\tcc -o $@ -DITIMER_HEARTBEAT=1 -DYIELD_IN_TICKER $(CFLAGS) $(INCLUDES) $^ $(LDFLAGS)\n\ntestt: sqTicker.c sqUnixHeartbeat.c threadValidate.c\n\tcc -o $@ -DONLY_ONE_THREAD_PRIORITY=1 $(CFLAGS) $(INCLUDES) $^ $(LDFLAGS)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/misc/threadValidate/config.h",
    "content": "#define HAVE_INTERP_H 1\n#define SIZEOF_VOID_P 4\n"
  },
  {
    "path": "vm/src/from_squeak/unix/misc/threadValidate/sqTicker.c",
    "content": "/* sqTicker.c\n *\tCore cross-platform tickers.  tick.er (n): one who ticks a tickee \n *\n *\tAuthors: Eliot Miranda & Josh Gargus\n *\n *\tCopyright (C) 2010 by Teleplace, Inc.\n *\n *\tAll rights reserved.\n *   \n *   This file is part of Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n */\n\n/* High-priority and synchronous tickee function support.\n *\n * Tickers provide the ability to register a tickee function that will be\n * called at a regular interval.  There are two sets of tickers.  The high-\n * priority ticker is asynchronous and if possible, runs in a high-priority\n * thread or if not, from an interrupt.  Running from an interrupt is undesir-\n * able because it is much easier to create deadlock, for example by interrupt-\n * ing the VM when it has acquired some lock, and a tickee tries to acquire\n * the same lock.   But the use of an interrupt is forced on linux because as\n * of 2006 and the 2.6.x kernel there is no way for a non-root process to\n * create threads of different priorities.\n *\n * The synchronous ticker runs in the VM thread at the earliest opportunity once\n * the tick has occurred.  The VM calls the ticker from its event check.\n *\n * This file implements the cross-platform components, registering tickers and\n * calling tickers if deadlines have been reached.  The platform-specific heart-\n * beats implement the threads or interrupts and the clocks.\n *\n * For the moment the number of asynchronous and synchronous tickees is\n * hard-wired, but they could easily be defined by a command-line argument etc.\n */\n\n#include \"sq.h\"\n#include \"sqAssert.h\"\n#include \"sqAtomicOps.h\"\n#include \"sqMemoryFence.h\"\n\n\n#define NUM_ASYNCHRONOUS_TICKEES 4\n#define NUM_SYNCHRONOUS_TICKEES 4\n#define MicrosecondsPerMillisecond 1000\n\ntypedef struct {\n\tvoid (*tickee)(void);\n\tlong\tinProgress;\t/* used only in high-priority ticker */\n\tusqLong tickeeDeadlineUsecs;\n\tusqLong tickeePeriodUsecs;\n} Tickee;\n\nstatic int numSyncTickees = 0;\nstatic Tickee synch[NUM_SYNCHRONOUS_TICKEES];\n\n#if ITIMER_HEARTBEAT\n/* See platforms/unix/vm/sqUnixHeartbeat.c */\nstatic volatile int shouldYieldToHighPriorityTickerThread;\n#endif\n\n/* Add or remove a synchronous tickee.  If periodms is non zero add the tickee\n * calling it every periodms, aligned to roundms, if non-zero.  If periodms is\n * zero, remove tickee.\n */\nvoid\naddSynchronousTickee(void (*tickee)(void), unsigned periodms, unsigned roundms)\n{\n\tint i;\n\n\tif (!periodms) {\n\t\tfor (i = 0; i < numSyncTickees; i++)\n\t\t\tif (synch[i].tickee == tickee) {\n\t\t\t\t--numSyncTickees;\n\t\t\t\tif (i < numSyncTickees)\n\t\t\t\t\tmemmove(synch + i,\n\t\t\t\t\t\t\tsynch + i + 1,\n\t\t\t\t\t\t\tsizeof(synch[i]) * (numSyncTickees - i));\n\t\t\t\treturn;\n\t\t\t}\n\t\treturn;\n\t}\n\tfor (i = 0; i < NUM_SYNCHRONOUS_TICKEES; i++)\n\t\tif (i >= numSyncTickees\n\t\t || !synch[i].tickee\n\t\t || synch[i].tickee == tickee) {\n\t\t\tsynch[i].tickee = tickee;\n\t\t\tsynch[i].tickeePeriodUsecs = periodms * MicrosecondsPerMillisecond;\n\t\t\tsynch[i].tickeeDeadlineUsecs = synch[i].tickeePeriodUsecs\n\t\t\t\t\t\t\t\t\t\t+ ioUTCMicroseconds();\n\t\t\tif (roundms) {\n\t\t\t\tsynch[i].tickeeDeadlineUsecs -= synch[i].tickeeDeadlineUsecs\n\t\t\t\t\t\t\t\t\t\t% (roundms * MicrosecondsPerMillisecond);\n\t\t\t\tif (synch[i].tickeeDeadlineUsecs < ioUTCMicroseconds())\n\t\t\t\t\tsynch[i].tickeeDeadlineUsecs += synch[i].tickeePeriodUsecs;\n\t\t\t}\n\t\t\tif (i >= numSyncTickees)\n\t\t\t\t++numSyncTickees;\n\t\t\treturn;\n\t\t}\n\terror(\"ran out of synchronous tickee slots\");\n}\n\nvoid\nioSynchronousCheckForEvents()\n{\n\tint i;\n\n#if ITIMER_HEARTBEAT\n\textern void yieldToHighPriorityTickerThread(void);\n\tsqLowLevelMFence();\n\tif (shouldYieldToHighPriorityTickerThread)\n\t\tyieldToHighPriorityTickerThread();\n#endif\n\tfor (i = 0; i < numSyncTickees; i++)\n\t\tif (synch[i].tickee\n\t\t && ioUTCMicroseconds() >= synch[i].tickeeDeadlineUsecs) {\n\t\t\tsynch[i].tickeeDeadlineUsecs += synch[i].tickeePeriodUsecs;\n\t\t\tsynch[i].tickee();\n\t\t}\n}\n\nstatic int numAsyncTickees = 0;\nstatic Tickee async[NUM_ASYNCHRONOUS_TICKEES];\n\n/* Add or remove an asynchronous tickee.  If periodms is non zero add the\n * tickee, calling it every periodms.\n *\n * N.B. addHighPriorityTickee is called from the VM thread, whereas\n * checkHighPriorityTickees is called from the high-priority heartbeat thread\n * (or an interrupt).  The above 64-bit variables must therefore be read and\n * written atomically to avoid either thread reading or writing a modified\n * half of the variable while the other half has yet to be updated.\n */\nvoid\naddHighPriorityTickee(void (*tickee)(void), unsigned periodms)\n{\n\tint i;\n\n\tif (!periodms) {\n\t\tfor (i = 0; i < numAsyncTickees; i++)\n\t\t\t/* We cannot safely copy the data to keep used tickees contiguous\n\t\t\t * because checkHighPriorityTickees could be called during the move.\n\t\t\t * This implies first checking for an existing tickee below before\n\t\t\t * using an empty slot because an empty slot can be created before\n\t\t\t * a used (and subsequently modified) tickee.\n\t\t\t */\n\t\t\tif (async[i].tickee == tickee) {\n\t\t\t\tasync[i].tickee = 0;\n\t\t\t\tsqLowLevelMFence();\n\t\t\t\treturn;\n\t\t\t}\n\t\treturn;\n\t}\n\tfor (i = 0; i < numAsyncTickees; i++)\n\t\tif (async[i].tickee == tickee)\n\t\t\tbreak;\n\tif (i >= numAsyncTickees)\n\t\tfor (i = 0; i < NUM_ASYNCHRONOUS_TICKEES; i++)\n\t\t\tif (i >= numAsyncTickees\n\t\t\t || !async[i].tickee)\n\t\t\t\tbreak;\n\tif (i >= NUM_ASYNCHRONOUS_TICKEES)\n\t\terror(\"ran out of asyncronous tickee slots\");\n\n\t/* first disable the tickee while updating the entry. */\n\tasync[i].tickee = 0;\n\tsqLowLevelMFence();\n\tasync[i].tickeePeriodUsecs = periodms * MicrosecondsPerMillisecond;\n\tasync[i].tickeeDeadlineUsecs = async[i].tickeePeriodUsecs\n\t\t\t\t\t\t\t\t+ ioUTCMicroseconds();\n\tasync[i].inProgress = 0;\n\tasync[i].tickee = tickee;\n\tif (i >= numAsyncTickees)\n\t\t++numAsyncTickees;\n\tsqLowLevelMFence();\n}\n\nvoid\ncheckHighPriorityTickees(usqLong utcMicrosecondClock)\n{\n\tint i;\n\n#if ITIMER_HEARTBEAT\n\textern void unblockVMThreadAfterYieldToHighPriorityTickerThread(void);\n\tshouldYieldToHighPriorityTickerThread = 1;\n#endif\n\t/* Since this runs either in a high-priority thread or in an interrupt only\n\t * one fence is needed.  Since the VM thread will not disturb any non-zero\n\t * entry (except for changing the period) we can read the entry without\n\t * locking.  But we need to lock the attempt to run the tickee in case for\n\t * any reason checkHighPriorityTickees is miscalled reentrantly.\n\t */\n\tsqLowLevelMFence();\n\tfor (i = 0; i < numAsyncTickees; i++)\n\t\tif (async[i].tickee\n\t\t && !async[i].inProgress\n\t\t && utcMicrosecondClock >= async[i].tickeeDeadlineUsecs) {\n\t\t\tint previousInProgress;\n\t\t\tsqCompareAndSwapRes(async[i].inProgress,0,1,previousInProgress);\n\t\t\tif (previousInProgress == 0) {\n\t\t\t\tassert(async[i].inProgress);\n\t\t\t\tasync[i].tickeeDeadlineUsecs += async[i].tickeePeriodUsecs;\n\t\t\t\tasync[i].tickee();\n\t\t\t\tasync[i].inProgress = 0;\n\t\t\t}\n\t\t}\n#if ITIMER_HEARTBEAT\n\tshouldYieldToHighPriorityTickerThread = 0;\n\tsqLowLevelMFence();\n\tunblockVMThreadAfterYieldToHighPriorityTickerThread();\n#endif\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/misc/threadValidate/sqUnixHeartbeat.c",
    "content": "/****************************************************************************\n*   PROJECT: Unix (pthread or setitimer) heartbeat logic for Stack VM\n*   FILE:    sqUnixHeartbeat.c\n*   CONTENT: \n*\n*   AUTHOR:  Eliot Miranda\n*   ADDRESS: \n*   EMAIL:   eliot@qwaq.com\n*   RCSID:   $Id$\n*\n*   NOTES: \n*  July 31st, 2008, EEM added heart-beat thread.\n*  Aug  20th, 2009, EEM added 64-bit microsecond clock support code\n*\n*****************************************************************************/\n\n#include \"sq.h\"\n#include <errno.h>\n#if ITIMER_HEARTBEAT\n# include <signal.h>\n#else\n# include <pthread.h>\n#endif\n#include <sys/types.h>\n#include <sys/time.h>\n\n#define SecondsFrom1901To1970      2177452800ULL\n#define MicrosecondsFrom1901To1970 2177452800000000ULL\n\n#define MicrosecondsPerSecond 1000000ULL\n#define MillisecondsPerSecond 1000ULL\n\n#define MicrosecondsPerMillisecond 1000ULL\n\nstatic unsigned volatile long long utcMicrosecondClock;\nstatic unsigned volatile long long localMicrosecondClock;\nstatic unsigned long long utcStartMicroseconds; /* for the ioMSecs clock. */\nstatic long long vmGMTOffset = 0;\nstatic unsigned long long frequencyMeasureStart = 0;\nstatic unsigned long heartbeats;\n\n/*\n * Update the utc and local microsecond clocks.  Since this is invoked from\n * interupt code, and since the clocks are 64-bit values that are read\n * concurrently by the VM, care must be taken to access these values atomically\n * on 32-bit systems.  If they are not access atomically there is a possibility\n * of fetching the two halves of the clock from different ticks which would\n * cause a jump in the clock of 2^32 microseconds (1 hr, 11mins, 34 secs).\n *\n * Since an interrupt could occur between any two instructions the clock must be\n * read atomically as well as written atomically.  If possible this can be\n * implemented without locks using atomic 64-bit reads and writes.\n */\n\n#include \"sqAtomicOps.h\"\n\nstatic void\nupdateMicrosecondClock()\n{\n\tstruct timeval utcNow;\n\tunsigned long long newUtcMicrosecondClock;\n\tunsigned long long newLocalMicrosecondClock;\n\n\tgettimeofday(&utcNow,0);\n\tnewUtcMicrosecondClock = ((utcNow.tv_sec * MicrosecondsPerSecond)\n\t\t\t\t\t\t\t\t+ utcNow.tv_usec)\n\t\t\t\t\t\t\t+ MicrosecondsFrom1901To1970;\n\tnewLocalMicrosecondClock = newUtcMicrosecondClock + vmGMTOffset;\n\n\tset64(utcMicrosecondClock,newUtcMicrosecondClock);\n\tset64(localMicrosecondClock,newLocalMicrosecondClock);\n}\n\nvoid\nioUpdateVMTimezone()\n{\n\ttime_t utctt;\n\tupdateMicrosecondClock();\n\tutctt = (get64(utcMicrosecondClock) - MicrosecondsFrom1901To1970)\n\t\t\t\t/ MicrosecondsPerSecond;\n\tvmGMTOffset = localtime(&utctt)->tm_gmtoff * MicrosecondsPerSecond;\n}\n\nint\nioMSecs()\n{\n\treturn ((get64(utcMicrosecondClock) - utcStartMicroseconds)\n\t\t\t/ MicrosecondsPerMillisecond)\n\t\t\t& 0x3FFFFFFF;\n}\n\nsqLong\nioHighResClock(void)\n{\n  /* return the value of the high performance counter */\n  sqLong value = 0;\n#if defined(__GNUC__) && ( defined(i386) || defined(__i386) || defined(__i386__)  \\\n\t\t\t|| defined(i486) || defined(__i486) || defined (__i486__) \\\n\t\t\t|| defined(intel) || defined(x86) || defined(i86pc) )\n    __asm__ __volatile__ (\"rdtsc\" : \"=A\"(value));\n#else\n# error \"no high res clock defined\"\n#endif\n  return value;\n}\n\n#if !macintoshSqueak\nstatic unsigned int   lowResMSecs= 0;\nstatic struct timeval startUpTime;\n\n/*\n * Answer the millisecond clock as computed on Unix prior to the 64-bit\n * microsecond clock.  This is to help verify that the new clock is correct.\n */\nsqInt\nioOldMSecs(void)\n{\n  struct timeval now;\n  unsigned int nowMSecs;\n\n#if 1 /* HAVE_HIGHRES_COUNTER */\n\n  /* if we have a cheap, high-res counter use that to limit\n     the frequency of calls to gettimeofday to something reasonable. */\n  static unsigned int baseMSecs = 0;      /* msecs when we took base tick */\n  static sqLong baseTicks = 0;/* base tick for adjustment */\n  static sqLong tickDelta = 0;/* ticks / msec */\n  static sqLong nextTick = 0; /* next tick to check gettimeofday */\n\n  sqLong thisTick = ioHighResClock();\n\n  if(thisTick < nextTick) return lowResMSecs;\n\n#endif\n\n  gettimeofday(&now, 0);\n  if ((now.tv_usec-= startUpTime.tv_usec) < 0)\n    {\n      now.tv_usec+= 1000000;\n      now.tv_sec-= 1;\n    }\n  now.tv_sec-= startUpTime.tv_sec;\n  nowMSecs = (now.tv_usec / 1000 + now.tv_sec * 1000);\n\n#if 1 /* HAVE_HIGHRES_COUNTER */\n  {\n    unsigned int msecsDelta;\n    /* Adjust our rdtsc rate every 10...100 msecs as needed.\n       This also covers msecs clock-wraparound. */\n    msecsDelta = nowMSecs - baseMSecs;\n    if(msecsDelta < 0 || msecsDelta > 100) {\n      /* Either we've hit a clock-wraparound or we are being\n\t sampled in intervals larger than 100msecs.\n\t Don't try any fancy adjustments */\n      baseMSecs = nowMSecs;\n      baseTicks = thisTick;\n      nextTick = 0;\n      tickDelta = 0;\n    } else if(msecsDelta >= 10) {\n      /* limit the rate of adjustments to 10msecs */\n      baseMSecs = nowMSecs;\n      tickDelta = (thisTick - baseTicks) / msecsDelta;\n      nextTick = baseTicks = thisTick;\n    }\n    nextTick += tickDelta;\n  }\n#endif\n  return lowResMSecs= nowMSecs;\n}\n#endif /* !macintoshSqueak */\n\n/* Note: ioMicroMSecs returns *milli*seconds */\nint ioMicroMSecs(void)\n{\n\tupdateMicrosecondClock();\n\treturn ioMSecs();\n}\n\n/* returns the local wall clock time */\nint\nioSeconds(void)\n{\n\treturn get64(localMicrosecondClock) / MicrosecondsPerSecond;\n}\n\n/* This is an expensive interface for use by profiling code that wants the time\n * now rather than as of the last heartbeat.\n */\nusqLong\nioUTCMicrosecondsNow()\n{\n\tupdateMicrosecondClock();\n\treturn get64(utcMicrosecondClock);\n}\n\nusqLong\nioUTCMicroseconds() { return get64(utcMicrosecondClock); }\n\nusqLong\nioLocalMicroseconds() { return get64(localMicrosecondClock); }\n\nint\nioUTCSeconds(void)\n{\n\treturn get64(utcMicrosecondClock) / MicrosecondsPerSecond;\n}\n\n/*\n * On Mac OS X use the following.\n * On Unix use dpy->ioRelinquishProcessorForMicroseconds\n */\n#if macintoshSqueak\nint\nioRelinquishProcessorForMicroseconds(int microSeconds)\n{\n    long\trealTimeToWait;\n\textern usqLong getNextWakeupUsecs();\n\tusqLong nextWakeupUsecs = getNextWakeupUsecs();\n\tusqLong utcNow = get64(utcMicrosecondClock);\n\n    if (nextWakeupUsecs <= utcNow) {\n\t\t/* if nextWakeupUsecs is non-zero the next wakeup time has already\n\t\t * passed and we shopuld not wait.\n\t\t */\n        if (nextWakeupUsecs != 0)\n\t\t\treturn 0;\n\t\trealTimeToWait = microSeconds;\n    }\n    else {\n        realTimeToWait = nextWakeupUsecs - utcNow;\n\t\tif (realTimeToWait > microSeconds)\n\t\t\trealTimeToWait = microSeconds;\n\t}\n\n\taioSleepForUsecs(realTimeToWait);\n\n\treturn 0;\n}\n#endif /* !macintoshSqueak */\n\nvoid\nioInitTime(void)\n{\n\tioUpdateVMTimezone(); /* does updateMicrosecondClock as a side-effect */\n\tupdateMicrosecondClock(); /* this can now compute localUTCMicroseconds */\n\tutcStartMicroseconds = utcMicrosecondClock;\n#if !macintoshSqueak\n\t/* This is only needed for ioOldMSecs */\n\tgettimeofday(&startUpTime, 0);\n#endif\n}\n\nstatic void\nheartbeat()\n{\n\tupdateMicrosecondClock();\n\tif (get64(frequencyMeasureStart) == 0) {\n\t\tset64(frequencyMeasureStart,utcMicrosecondClock);\n\t\theartbeats = 0;\n\t}\n\telse\n\t\theartbeats += 1;\n#if ITIMER_HEARTBEAT\n\t{ void prodHighPriorityThread(void); prodHighPriorityThread(); }\n#else\n\tcheckHighPriorityTickees(utcMicrosecondClock);\n#endif\n\tforceInterruptCheckFromHeartbeat();\n}\n\n#if ITIMER_HEARTBEAT\n\t/* Hack for linux server to avoid the thread priority issue, i.e. that\n\t * linux doesn't provide priorities for SCHED_OTHER and won't let a non-\n\t * superuser process set the scheduling policy to anything else).\n\t *\n\t * Solution is to drive heartbeat from an interval timer instead of a high-\n\t * priority thread blocking in a sleep.  We use ITIMER_REAL/SIGALRM (see\n\t * below).  setitimer(2) claims max itimer resolution on 2.6.13 is 4\n\t * milliseconds, but on 2.6.18-128.el5 one can see periods of 1.2ms.\n\t *\n\t * The high-priority tickees cannot be run from the interrupt-driven heart-\n\t * beat and must be run from a separate thread to avoid numerous sources\n\t * of deadlock (e.g. the lock in malloc).  But since the thread has the\n\t * same priority as the VM thread we arrange that the VM yields to the\n\t * high-priority ticker when it is running.  This is co-ordinated in\n\t * sqTicker.c by ioSynchronousCheckForEvents (the synchronous ticker)\n\t * yielding if requested by checkHighPriorityTickees.  To perform the yield,\n\t * these functions use yieldToHighPriorityTickerThread and\n\t * unblockVMThreadAfterYieldToHighPriorityTickerThread to do the dirty work.\n\t *\n\t * The itimer signal handler ensures it is running on the VM thread and\n\t * then invokes a signal handler on the high-priority thread (see\n\t * prodHighPriorityThread).  This signal breaks the high-priority thread\n\t * out of its nanosleep and it calls checkHighPriorityTickees.\n\t */\n#define TICKER_SIGNAL SIGUSR2 /* SIGURSR1 dumps the stack */\nstatic pthread_t tickerThread;\n\nvoid\nprodHighPriorityThread()\n{\n\t/* invoke the tickerThread's signal handler */\n\tpthread_kill(tickerThread, TICKER_SIGNAL);\n}\n\nstatic void\nhigh_performance_tick_handler(int sig, struct siginfo *sig_info, void *context)\n{\nstatic int tickCheckInProgress;\n\n\tif (tickCheckInProgress) return;\n\n\ttickCheckInProgress = 1;\n\tcheckHighPriorityTickees(ioUTCMicroseconds());\n\ttickCheckInProgress = 0;\n}\n\nstatic void\ntickerSleepCycle(void *ignored)\n{\n\tstruct timespec naptime;\n\n\tnaptime.tv_sec = 3600;\n\tnaptime.tv_nsec = 0;\n\n\twhile (1)\n\t\t(void)nanosleep(&naptime, 0);\n}\n\n/* N.B. This is laziness.  If needed on other than linux one would have to\n * initializea mutexattr with PTHREAD_ERRORCHECK_MUTEX type.  We require\n * the errr check because we're lazy in preventing multiple attempts at\n * locking yield_mutex in yieldToHighPriorityTickerThread.\n */\nstatic pthread_mutex_t yield_sync = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;\nstatic pthread_mutex_t yield_mutex = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;\nstatic pthread_cond_t yield_cond = PTHREAD_COND_INITIALIZER;\n\n/* Private to sqTicker.c ioSynchronousCheckForEvents */\nvoid\nyieldToHighPriorityTickerThread()\n{\n\tint err;\n\n\tif ((err = pthread_mutex_lock(&yield_mutex))) {\n\t\tif (err != EDEADLK)\n\t\t\tfprintf(stderr,\"pthread_mutex_lock yield_mutex %s\\n\", strerror(err));\n\t}\n\t/* If lock fails then unblockVMThreadAfterYieldToHighPriorityTickerThread\n\t * has locked and we should not block.\n\t */\n\tif ((err = pthread_mutex_lock(&yield_sync))) {\n\t\tif (err != EDEADLK)\n\t\t\tfprintf(stderr,\"pthread_mutex_lock yield_sync %s\\n\", strerror(err));\n\t}\n\telse if ((err = pthread_cond_wait(&yield_cond, &yield_mutex)))\n\t\tfprintf(stderr,\"pthread_cond_wait %s\\n\", strerror(err));\n}\n\n/* Private to sqTicker.c checkHighPriorityTickees */\nvoid\nunblockVMThreadAfterYieldToHighPriorityTickerThread()\n{\n\t/* If yield_sync is already locked the VM thread is very likely blocking in\n\t * yieldToHighPriorityTickerThread and so yield_cond should be signalled.\n\t */\n\tif (pthread_mutex_trylock(&yield_sync) == 0) /* success */\n\t\tpthread_mutex_unlock(&yield_sync);\n\telse\n\t\tpthread_cond_signal(&yield_cond);\n}\n\n\n#if !defined(DEFAULT_BEAT_MS)\n# define DEFAULT_BEAT_MS 2\n#endif\nstatic int beatMilliseconds = DEFAULT_BEAT_MS;\n\n/* Use ITIMER_REAL/SIGALRM because the VM can enter a sleep in the OS via\n * e.g. ioRelinquishProcessorForMicroseconds in which the OS will assume the\n * process is not running and not deliver the signals.\n */\n#if 0\n# define THE_ITIMER ITIMER_PROF\n# define ITIMER_SIGNAL SIGPROF\n#elif 0\n# define THE_ITIMER ITIMER_VIRTUAL\n# define ITIMER_SIGNAL SIGVTALRM\n#else\n# define THE_ITIMER ITIMER_REAL\n# define ITIMER_SIGNAL SIGALRM\n#endif\n\n/* With ticker support it may be that a ticker function invoked heartbeat takes\n * so long that another timer interrupt occurs before heartbeat has finished.\n * The absence of SA_NODEFER in heartbeat_handler_action.sa_flags prevents\n * reentrancy, if available.\n *\n * With lots of threads it may be that the kernel delivers the signal on some\n * other thread.\n */\n#if !defined(SA_NODEFER)\nstatic int handling_heartbeat = 0;\n#endif\n\nstatic void\nheartbeat_handler(int sig, struct siginfo *sig_info, void *context)\n{\n\tif (!ioOSThreadsEqual(ioCurrentOSThread(),getVMThread())) {\n\t\tpthread_kill(getVMThread(),sig);\n\t\treturn;\n\t}\n\n#if !defined(SA_NODEFER)\n  {\tint zeroAndPreviousHandlingHeartbeat = 0;\n    sqCompareAndSwap(handling_heartbeat,zeroAndPreviousHandlingHeartbeat,1);\n\tif (zeroAndPreviousHandlingHeartbeat)\n\t\treturn;\n  }\n\n\thandling_heartbeat = 1;\n#endif\n\n\theartbeat();\n\n#if 0\n\tif (heartbeats % 250 == 0) {\n\t\tprintf(\".\");\n\t\tfflush(stdout);\n\t}\n#endif\n#if !defined(SA_NODEFER)\n\thandling_heartbeat = 0;\n#endif\n}\n\n#define NEED_SIGALTSTACK 1 /* for safety; some time need to turn off and test */\n#if NEED_SIGALTSTACK\n/* If the ticker is run from the heartbeat signal handler one needs to use an\n * alternative stack to avoid overflowing the VM's stack pages.  Keep\n * the structure around for reference during debugging.\n */\n#define SIGNAL_STACK_SIZE (1024 * sizeof(void *) * 16)\nstatic stack_t signal_stack;\n#endif /* NEED_SIGALTSTACK */\n\nvoid\nioInitHeartbeat()\n{\n\tint er;\n\tstruct timespec halfAMo;\n\tstruct sigaction heartbeat_handler_action, ticker_handler_action;\n\tstruct itimerval pulse;\n\n#if NEED_SIGALTSTACK\n\tsignal_stack.ss_flags = 0;\n\tsignal_stack.ss_size = SIGNAL_STACK_SIZE;\n\tif (!(signal_stack.ss_sp = malloc(signal_stack.ss_size))) {\n\t\tperror(\"ioInitHeartbeat malloc\");\n\t\texit(1);\n\t}\n\tif (sigaltstack(&signal_stack, 0) < 0) {\n\t\tperror(\"ioInitHeartbeat sigaltstack\");\n\t\texit(1);\n\t}\n#endif /* NEED_SIGALTSTACK */\n\n\thalfAMo.tv_sec  = 0;\n\thalfAMo.tv_nsec = 1000 * 100;\n\tif ((er= pthread_create(&tickerThread,\n\t\t\t\t\t\t\t(const pthread_attr_t *)0,\n\t\t\t\t\t\t\ttickerSleepCycle,\n\t\t\t\t\t\t\t0))) {\n\t\terrno = er;\n\t\tperror(\"beat thread creation failed\");\n\t\texit(errno);\n\t}\n\n\tticker_handler_action.sa_sigaction = high_performance_tick_handler;\n\t/* N.B. We _do not_ include SA_NODEFER to specifically prevent reentrancy\n\t * during the heartbeat. We /must/ include SA_RESTART to avoid issues with\n     * e.g. ODBC connections.\n\t */\n\tticker_handler_action.sa_flags = SA_RESTART | SA_ONSTACK;\n\tsigemptyset(&ticker_handler_action.sa_mask);\n\tif (sigaction(TICKER_SIGNAL, &ticker_handler_action, 0)) {\n\t\tperror(\"ioInitHeartbeat sigaction\");\n\t\texit(1);\n\t}\n\n\theartbeat_handler_action.sa_sigaction = heartbeat_handler;\n\t/* N.B. We _do not_ include SA_NODEFER to specifically prevent reentrancy\n\t * during the heartbeat.\n\t */\n#if 0\n\theartbeat_handler_action.sa_flags = SA_RESTART | SA_ONSTACK;\n#else\n\t/* restarting increases the chance of deadlock? */\n\theartbeat_handler_action.sa_flags = SA_ONSTACK;\n#endif\n\tsigemptyset(&heartbeat_handler_action.sa_mask);\n\tif (sigaction(ITIMER_SIGNAL, &heartbeat_handler_action, 0)) {\n\t\tperror(\"ioInitHeartbeat sigaction\");\n\t\texit(1);\n\t}\n\n\tpulse.it_interval.tv_sec = beatMilliseconds / 1000;\n\tpulse.it_interval.tv_usec = (beatMilliseconds % 1000) * 1000;\n\tpulse.it_value = pulse.it_interval;\n\tif (setitimer(THE_ITIMER, &pulse, &pulse)) {\n\t\tperror(\"ioInitHeartbeat setitimer\");\n\t\texit(1);\n\t}\n}\n\nvoid\nioSetHeartbeatMilliseconds(int ms)\n{\n\tbeatMilliseconds = ms;\n\tioInitHeartbeat();\n}\n#else /* ITIMER_HEARTBEAT */\ntypedef enum { dead, condemned, nascent, quiescent, active } machine_state;\n\nstatic int\t\t\t\t\tstateMachinePolicy;\nstatic struct sched_param\tstateMachinePriority;\n\nstatic machine_state beatState = nascent;\n\n#if !defined(DEFAULT_BEAT_MS)\n# define DEFAULT_BEAT_MS 2\n#endif\nstatic int beatMilliseconds = DEFAULT_BEAT_MS;\nstatic struct timespec beatperiod = { 0, DEFAULT_BEAT_MS * 1000 * 1000 };\n\nstatic void *\nbeatStateMachine(void *careLess)\n{\n\tint er;\n#if !ONLY_ONE_THREAD_PRIORITY\n\tif ((er = pthread_setschedparam(pthread_self(),\n\t\t\t\t\t\t\t\t\tstateMachinePolicy,\n\t\t\t\t\t\t\t\t\t&stateMachinePriority))) {\n\t\t/* linux pthreads as of 2009 does not support setting the priority of\n\t\t * threads other than with real-time scheduling policies.  But such\n\t\t * policies are only available to processes with superuser privileges.\n\t\t */\n\t\terrno = er;\n\t\tperror(\"pthread_setschedparam failed\");\n\t\texit(errno);\n\t}\n#endif /* !ONLY_ONE_THREAD_PRIORITY */\n\tbeatState = active;\n\twhile (beatState != condemned) {\n# define MINSLEEPNS 2000 /* don't bother sleeping for short times */\n\t\tstruct timespec naptime = beatperiod;\n\n\t\twhile (nanosleep(&naptime, &naptime) == -1\n\t\t\t&& (naptime.tv_sec > 0 || naptime.tv_nsec > MINSLEEPNS)) /*repeat*/\n\t\t\tif (errno != EINTR) {\n\t\t\t\tperror(\"nanosleep\");\n\t\t\t\texit(1);\n\t\t\t}\n\t\theartbeat();\n\t}\n\tbeatState = dead;\n\treturn 0;\n}\n\nvoid\nioInitHeartbeat()\n{\n\tint er;\n\tstruct timespec halfAMo;\n\tpthread_t careLess;\n\n\tif ((er = pthread_getschedparam(pthread_self(),\n\t\t\t\t\t\t\t\t\t&stateMachinePolicy,\n\t\t\t\t\t\t\t\t\t&stateMachinePriority))) {\n\t\terrno = er;\n\t\tperror(\"pthread_getschedparam failed\");\n\t\texit(errno);\n\t}\n\t++stateMachinePriority.sched_priority;\n\thalfAMo.tv_sec  = 0;\n\thalfAMo.tv_nsec = 1000 * 100;\n\tif ((er= pthread_create(&careLess,\n\t\t\t\t\t\t\t(const pthread_attr_t *)0,\n\t\t\t\t\t\t\tbeatStateMachine,\n\t\t\t\t\t\t\t0))) {\n\t\terrno = er;\n\t\tperror(\"beat thread creation failed\");\n\t\texit(errno);\n\t}\n\twhile (beatState == nascent)\n\t\tnanosleep(&halfAMo, 0);\n}\n\nvoid\nioSetHeartbeatMilliseconds(int ms)\n{\n\tbeatMilliseconds = ms;\n\tbeatperiod.tv_sec = beatMilliseconds / 1000;\n\tbeatperiod.tv_nsec = (beatMilliseconds % 1000) * 1000 * 1000;\n}\n#endif /* ITIMER_HEARTBEAT */\n\nint\nioHeartbeatMilliseconds() { return beatMilliseconds; }\n\n\n/* Answer the average heartbeats per second since the stats were last reset.\n */\nunsigned long\nioHeartbeatFrequency(int resetStats)\n{\n\tunsigned duration = (ioUTCMicroseconds() - get64(frequencyMeasureStart))\n\t\t\t\t\t\t/ MicrosecondsPerSecond;\n\tunsigned frequency = duration ? heartbeats / duration : 0;\n\n\tif (resetStats) {\n\t\tunsigned long long zero = 0;\n\t\tset64(frequencyMeasureStart,zero);\n\t}\n\treturn frequency;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/misc/threadValidate/threadValidate.c",
    "content": "/*\n * Linux thread validation.\n *\n * Main thread simulates VM running for 10 seconds incrementing a 64-bit\n * counter, measuring time against the heartbeat's clock, and running any\n * synchronous tickers that are installed.  If the heartbeat gets locked out\n * its clock will not advance, and the system will lock up.\n *\n * High-performance thread spins blocking on some long sleep.  heartbeat uses\n * pthread_kill to deliver a signal to the high-performance thread whose handler\n * runs the ticker.  The heartbeat also install a synchronous ticker that causes\n * the VM to yield somehow, but installs it only for the duration of the high-\n * performance thread's tick.  i.e. the high-performance thread uninstalls the\n * ticker when done with each tick.\n * The yield can be implemented in different ways and we will experiment there-\n * with.  For example, block briefly in a short sleep, call shed_yield, do\n * a pthreasd_cond_timedwait with a short timeout.\n *\n * The high-performance thread's ticker loops for a few milliseconds increment-\n * ing its own 64-bit counter, simulating work, and then returns.  It also\n * measures time against the heartbeat's clock, and again if the heartbeat gets\n * locked out its clock will not advance and the system will lockup.\n *\n * Main difference this has from current Mac/Win32 codee is that on those\n * systems the ticker shuts out the clock.  Here the heartbeat will simply\n * leave the thread alone if the ticker is already running (via the inProgress\n * flag).  So this could be better.\n */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <signal.h>\n#include <errno.h>\n#include <pthread.h>\n\n#include <unistd.h>\t\t\t/* for ioNumProcesors */\n#include <sys/types.h>\t\t/* for ioNumProcesors */\n#include <sys/sysctl.h>\t\t/* for ioNumProcesors */\n\n#include \"sq.h\"\n#include \"sqAtomicOps.h\"\n#include \"sqMemoryFence.h\"\n\n#define SECS 5 /* run for 5 seconds */\n#define CHECK_COUNT (unsigned long long)(100 * 1000 * 1000)\n\npthread_t ioVMThread;\n\nstatic unsigned long long vmcount, hpcount;\nstatic volatile int checkForEvents, yield;\nstatic int hptickperiodms = 20;\nstatic int yield_count = 0, not_blocked_count = 0, unblock_count = 0;\nstatic long long hptickusecs = 5 * 1000;\n\nstatic long yieldusecs = 1; /* default */\n\nchar *method = \"none\";\n\nvoid\nprintAndQuit()\n{\n\tdouble idealRatio = (double)hptickusecs / (double)(hptickperiodms * 1000);\n\n\tprintf(\"hp/vm %1.3f ideal %1.3f cpus %d yield method %s (usecs %ld)\\n\",\n\t\t\t(double)hpcount / (double)vmcount,\n\t\t\tioNumProcessors() == 1\n\t\t\t\t? idealRatio\n\t\t\t\t: idealRatio / (1.0 + idealRatio),\n\t\t\tioNumProcessors(),\n\t\t\tmethod, yieldusecs);\n\tprintf(\"vm %10lld hp %9lld hp+vm %10lld yields %d (%d,%d,%d) clk hz %ld\\n\",\n\t\t\tvmcount, hpcount, vmcount + hpcount,\n\t\t\tyield_count, SECS * 1000 / hptickperiodms,\n\t\t\tunblock_count, not_blocked_count,\n\t\t\tioHeartbeatFrequency(0));\n\texit(0);\n}\n\nvoid\nlockedup(int arg)\n{\n\tfprintf(stderr,\"system locked %s, time not advancing (yield method %s)\\n\",\n\t\t\targ == SIGINT ? \"\" : (char *)arg, method);\n\tprintf(\"vm %10lld hp %9lld hp+vm %10lld yields %d (%d,%d,%d) clk hz %ld\\n\",\n\t\t\tvmcount, hpcount, vmcount + hpcount,\n\t\t\tyield_count, SECS * 1000 / hptickperiodms,\n\t\t\tunblock_count, not_blocked_count,\n\t\t\tioHeartbeatFrequency(0));\n\texit(4);\n}\n\nstatic pthread_mutex_t yield_mutex = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;\nstatic pthread_cond_t yield_cond = PTHREAD_COND_INITIALIZER;\nstatic pthread_mutex_t yield_sync = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;\n\nenum {\tno_yield,\n\t\tyield_via_sched_yield,\n\t\tyield_via_pthread_yield,\n\t\tyield_via_nanosleep,\n\t\tyield_via_cond_timedwait,\n\t\tyield_via_wait_signal\n\t} yieldMethod;\n\n#if !YIELD_IN_TICKER\nvoid\nmaybeYield()\n{\n\tsqLowLevelMFence();\n\tif (!yield)\n\t\treturn;\n\tyield_count += 1;\n\tswitch (yieldMethod) {\n\n\t\tcase no_yield:\tbreak;\n\n\t\tcase yield_via_sched_yield:\n\t\t\tsched_yield();\n\t\t\tbreak;\n\n\t\tcase yield_via_pthread_yield:\n\t\t\tpthread_yield();\n\t\t\tbreak;\n\n\t\tcase yield_via_nanosleep: {\n\t\t\tstruct timespec yieldtime;\n\n\t\t\tyieldtime.tv_sec = 0;\n\t\t\tyieldtime.tv_nsec = 10 * 1000;\n\n\t\t\tbreak;\n\t\t}\n\n\t\tcase yield_via_cond_timedwait: {\n\t\t\tstruct timespec yieldtime;\n\n\t\t\tyieldtime.tv_sec = 0;\n\t\t\tyieldtime.tv_nsec = 10 * 1000;\n\n\t\t\tpthread_cond_timedwait(&yield_cond, &yield_mutex, &yieldtime);\n\t\t\tbreak;\n\t\t}\n\n\t\tcase yield_via_wait_signal: { int err;\n\t\t\tif ((err = pthread_mutex_lock(&yield_mutex))) {\n\t\t\t\tif (err != EDEADLK)\n\t\t\t\t\tfprintf(stderr,\"pthread_mutex_lock yield_mutex %s\\n\", strerror(err));\n\t\t\t}\n\t\t\telse if ((err = pthread_mutex_lock(&yield_sync))) {\n\t\t\t\tif (err != EDEADLK)\n\t\t\t\t\tfprintf(stderr,\"pthread_mutex_lock yield_sync %s\\n\", strerror(err));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsqLowLevelMFence();\n\t\t\t\tif (yield\n\t\t\t\t && (err = pthread_cond_wait(&yield_cond, &yield_mutex)))\n\t\t\t\t\tfprintf(stderr,\"pthread_cond_wait %s\\n\", strerror(err));\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\tdefault:\n\t\t\tfprintf(stderr,\"unrecognized yield method\\n\");\n\t\t\texit(5);\n\t}\n}\n#endif /* !YIELD_IN_TICKER */\n\nvoid\nhptick(void)\n{\n\tunsigned long long start = ioUTCMicroseconds();\n\n\tyield = 1;\n\tsqLowLevelMFence();\n\twhile (ioUTCMicroseconds() - start < hptickusecs)\n\t\tif ((hpcount += 1ULL) % CHECK_COUNT == 0\n\t\t && ioHeartbeatFrequency(0) == 0)\n\t\t\tlockedup(\"in hptick\");\n\tyield = 0;\n\tsqLowLevelMFence();\n\tif (yieldMethod == yield_via_wait_signal) {\n\t\tif (pthread_mutex_trylock(&yield_sync) == 0) {/* success */\n\t\t\tpthread_mutex_unlock(&yield_sync);\n\t\t\tnot_blocked_count += 1;\n\t\t}\n\t\telse {\n\t\t\tpthread_cond_signal(&yield_cond);\n\t\t\tunblock_count += 1;\n\t\t}\n\t}\n}\n\nvoid\nforceInterruptCheckFromHeartbeat() { checkForEvents = 1; }\n\nvoid\nfakevm()\n{\n\twhile (1) {\n\t\t(void)ioUTCMicroseconds();\n\t\tif ((vmcount += 1ULL) % CHECK_COUNT == 0\n\t\t && ioHeartbeatFrequency(0) == 0)\n\t\t\tlockedup(\"in vm\");\n\t\tif (checkForEvents) {\n\t\t\tcheckForEvents = 0;\n\t\t\tioSynchronousCheckForEvents();\n\t\t}\n\t}\n}\n\nint\nmain(int argc, char *argv[])\n{\n\tint err;\n\n\tsignal(SIGINT, lockedup);\n\tioVMThread = pthread_self();\n\tioInitTime();\n\tioInitHeartbeat();\n\taddSynchronousTickee(printAndQuit, SECS * 1000, 0);\n\tif (argc > 1) {\n\t\tmethod = argv[1];\n\t\tif (!strcmp(argv[1],\"none\"))\n\t\t\tyieldMethod = no_yield;\n\t\telse if (!strcmp(argv[1],\"sched_yield\"))\n\t\t\tyieldMethod = yield_via_sched_yield;\n\t\telse if (!strcmp(argv[1],\"pthread_yield\"))\n\t\t\tyieldMethod = yield_via_pthread_yield;\n\t\telse if (!strcmp(argv[1],\"nanosleep\"))\n\t\t\tyieldMethod = yield_via_nanosleep;\n\t\telse if (!strcmp(argv[1],\"cond_timedwait\")) {\n\t\t\tif ((err = pthread_mutex_lock(&yield_mutex)))\n\t\t\t\treturn 2;\n\t\t\tyieldMethod = yield_via_cond_timedwait;\n\t\t}\n\t\telse if (!strcmp(argv[1],\"wait_signal\"))\n\t\t\tyieldMethod = yield_via_wait_signal;\n\t\telse {\n\t\t\tfprintf(stderr,\n\t\t\t\t\t\"usage: %s [none] [sched_yield] [nanosleep] [cond_timedwait] [wait_signal] [yield usecs]\\n\",\n\t\t\t\t\targv[0]);\n\t\t\treturn 3;\n\t\t}\n\t\tif (argc > 2)\n\t\t\tyieldusecs = atoi(argv[2]);\n\n#if !YIELD_IN_TICKER\n\t\taddSynchronousTickee(maybeYield, 2, 0);\n#endif /* !YIELD_IN_TICKER */\n\t}\n\taddHighPriorityTickee(hptick, hptickperiodms);\n\tfakevm();\n\t/* should exit through printAndQuit */\n\treturn 1;\n}\n\nint\nioNumProcessors(void)\n{\n# if defined(CTL_HW) && defined(HW_AVAILCPU)\n\tint count;\n\tsize_t size = sizeof(count);\n\tint hw_availproc[2];\n\n\thw_availproc[0] = CTL_HW;\n\thw_availproc[1] = HW_AVAILCPU;\n\n\treturn sysctl(hw_availproc, 2, &count, &size, 0, 0)\n\t\t\t? 1\n\t\t\t: count;\n# elif defined(_SC_NPROCESSORS_ONLN)\n\tint count;\n\n\treturn (count = sysconf(_SC_NPROCESSORS_ONLN)) == -1\n\t\t\t? 1\n\t\t\t: count;\n# else\n\tprintf(\"could not determine number of processors; assuming 1\\n\");\n\treturn 1;\n# endif\n}\n\nvoid\nwarning(char *msg) { fprintf(stderr,\"%s\\n\", msg); }\n"
  },
  {
    "path": "vm/src/from_squeak/unix/npsqueak/Makefile",
    "content": "# Netscape Plugin for Squeak on Unix platforms\n# Author: Bert Freudenberg\n# Last edited: 2005-02-28 16:57:51 by jens on impara.de\n\n############ Customize flags here #######################\n\nINC\t= -I./include -I/usr/X11R6/include\nCC\t= gcc\nCFLAGS\t= $(INC) -O2 -fPIC -Wall\nLD\t= gcc\nLDFLAGS = -shared\n\n# usually overridden from top level makefile\nVM_VERSION=  3.7b-5\nbindir=\t     /usr/local/bin\nimgdir=\t     /usr/local/share/squeak\nplgdir=\t     /usr/local/lib/squeak/$(VM_VERSION)\n\n# configuration\nscriptdir=\t$(imgdir)\nnpsqueakrun=\tnpsqueakrun\n\n\n############ compile and link ###########################\nall: npsqueak.so npsqueakrun\n\nnpsqueak.so : npsqueak.o npunix.o \n\t$(LD) $(LDFLAGS) npsqueak.o npunix.o -o npsqueak.so \n\nnpsqueak.o: npsqueak.c ../config.h\n\t$(CC) -c $(CFLAGS) \\\n\t\t-DSYSTEM_BIN_DIR=\\\"$(scriptdir)\\\" \\\n\t\t-DSYSTEM_IMG_DIR=\\\"$(imgdir)\\\" \\\n\t\t-DNPSQUEAKRUN=\\\"$(npsqueakrun)\\\" $<\n\nnpunix.o: npunix.c\n\t$(CC) -c $(CFLAGS) $<\n\nnpsqueakrun: npsqueakrun.in \n\tsed \"s|@imgdir@|$(imgdir)|; \\\n\t     s|@VM_VERSION@|$(VM_VERSION)|\" \\\n\t\tnpsqueakrun.in > $@\n\tchmod +x $@\n\nnpsqueakregister: npsqueakregister.in \n\tsed \"s|@NPSQUEAK_SO@|$(plgdir)/npsqueak.so|\" \\\n\t\tnpsqueakregister.in > $@\n\tchmod +x $@\n\n\nclean:\n\t-rm -f *.o *.so *~ .*~ */*~ */.*~\n\n\n############ install ####################################\n\n$(ROOT)$(scriptdir):\n\tinstall -d $@\n\n$(ROOT)$(plgdir): \n\tinstall -d $@\n\n$(ROOT)$(plgdir)/npsqueak.so: npsqueak.so $(ROOT)$(plgdir)\n\tcp npsqueak.so $@\n\tstrip $@\n\n$(ROOT)$(scriptdir)/npsqueakrun: npsqueakrun $(ROOT)$(scriptdir)\n\tcp npsqueakrun $@\n\n\n$(ROOT)$(imgdir)/npsqueakregister: npsqueakregister $(ROOT)$(scriptdir)\n\tcp npsqueakregister $@\n\n### Go! ###\n\nNPSQUEAK_TARGETS=                   \\\n\t$(ROOT)$(plgdir)/npsqueak.so    \\\n\t$(ROOT)$(scriptdir)/npsqueakrun    \\\n\t$(ROOT)$(scriptdir)/npsqueakregister\n\ninstall: $(NPSQUEAK_TARGETS)\n\nuninstall: \n\trmdir --ignore-fail-on-non-empty $(ROOT)$(imgdir)\n\trm -rf $(NPSQUEAK_TARGETS)\n\n\n\n"
  },
  {
    "path": "vm/src/from_squeak/unix/npsqueak/README.npsqueak",
    "content": "=================================================================\n\nNetscape Plugin for Squeak on Unix platforms\n\n\nAuthor:\t     Bert Freudenberg \nVersion:     @VM_VERSION@\nLast edited: 2005-02-28 15:50:31 by jens on impara.de\n\n================================================================\n\nFiles:\n\tMakefile\n\tREADME.npsqueak\n\tnpsqueak.c\n\tnpunix.c\t(modified copy from Netscape Plugin SDK)\n\tinclude/*\t(unmodified headers from Netscape Plugin SDK)\n\ttest/*\n\n=================================================================\n\n\n\tThe Squeak plugin should be automatically compiled and installed with \n\tthe normal squeak build process. This installs squeak into (probably) \n\t\n\t\timgdir=/usr/local/lib/squeak\n\n\tYou will need an image. Copy it to\n\n\t\t${imgdir}/SqueakPlugin.image\n\n\tA good place to look for an image suited as plugin is\n\n\thttp://squeakland.org/plugin/installers/files.html\t\t\n\n\tTo register the plugin run ${imgdir}/npsqueakregister. \n\tIt looks for various browsers\n\tin various directories and creates links to the plugin. If\n\tyour browser is not found, hack the npsqueakregister script or\n\tsymlink the plugin manually:\n\n\t\tln -s ${imgdir}/@VM_VERSION@/npsqueak.so \\\n\t\t\t/usr/lib/mybrowser/plugins/\n\n\n  \tExit and restart the browser. Check if the Squeak plugin \n\twas recognized by selecting the Help>>About Plugins menu item.\n\n  \tOpen the html file in the test/ directory. This should\n\tactivate the Squeak plugin. Since this is the first time the\n\tplugin is executed, a .npsqueak folder will be created in your \n\thome directory and the plugin image is installed into it.\n\n=================================================================\n\nNOTE: If you are not the super user of your machine you can install\neverything into your home directory. Put npsqueak.so somewhere your\nbrowser will find it.  Make a .npsqueak dir in your home directory\nwith subdirectories and files like shown below. Also create a\n.npsqueak/npsqueakrun file which points to a Squeak VM.\n\n=================================================================\n\nDOCUMENTATION\n\n* On the first run for each user, the npsqueakrun will create a directory\n  structure like this:\n\n    $(HOME)/\n    |\n    +--- .npsqueak/\n         |\n         +--- SqueakPlugin.image\n         |\n         |--- *.image         \n         |\n         +--- secure/\n         |\n         +--- My Squeak/\n\n   $(imgdir)/\n   |\n   +--- SqueakPlugin.image\n\n\n* Environment Variables:\n\n    SQUEAK_USERDIR\n\tIdentifies the sandbox directory, e.g., a place which can be\n\taccessed from any (potentially unsafe) Squeaklet.  \n\n        * path must be absolute  \n\n\t* Default: \"~/.npsqueak/My Squeak\"\n\t\n\n    NPSQUEAK_DEBUG\n        logs debug info to /tmp/npsqueak.log\n        Default: don't log\n\n* Mimetypes:\n\n    application/x-squeak-source:sts:Squeak source\n    application/x-squeak-object:sqo:Squeak object\n    application/x-squeak-project:pr:Squeak project\n\n* Parameters:\n\n  parameters in EMBED tag used by Squeak:\n\n    SRC=...\n    MEMORY=... (not by unix npsqueak)\n    FAILUREURL=...\n    IMAGENAME=... \n\n* Communication with VM is via Pipes\n\n=================================================================\n\nTODO\n\n* loop on read() and write() until all data is sent and received.\n* make plugin not wait for browser when the url is loaded into a target.\n* use autoconf\n\n=================================================================\n\nChange log\n\nJan 2005:\n\t* npsqueak checks for image file in system and home dir\n\t* modified npsqueakrun, runs with bash, other shells untested\n\t* renamed untrusted -> My Squeak\n\t* fixed make sure Squeak really gets killed\n\t* fixed crashing the browser when closing plugin page\n\nApr 2004: \n\t* (ikp) handle imageName and failureUrl tags\n\nOct 2002:\n\t* modified install from home directory to system-wide\n\nSep 2002:\n\t* hack to work with Mozilla >= 1.0 which deletes the delivered\n\t  file immediately. We just create a hard link before and\n\t  delete that after opening the file.\n\nMar 2002:\n\t* uses aio now for command pipe \n\t* moved stuff from ~/.netscape/squeak to ~/.npsqueak directory\n\t* implemented SecurityPlugin\n\nMay 2001:\n\t* updated for squeakland.org image.\n\t* TODO: SecurityManager\n\nFeb 2001:\n\t* updated for Squeak 3.0\n\nNov 2000:\n\t* introduced -browserPipes command line\n\t* this fixed the bug of plugins in tables\n\t* cleaned up a lot of hacks\n\t* this fixed crashing Mozilla 0.6\n\t* made widget destroy work more often than not\n\t* Problems: crashes when closing Netscape window\n\t*           pipe is polled for now - should use select in sqXWindow\n\n\nApr 2000:\n\t* url requests through browser\n\nNov 1999\n\t* report attributes to vm\n\nAug 1999\n\t* initial version\n\n\n"
  },
  {
    "path": "vm/src/from_squeak/unix/npsqueak/include/jri.h",
    "content": "/* -*- Mode: C; tab-width: 4; -*- */\n/*******************************************************************************\n * Java Runtime Interface\n * Copyright (c) 1996 Netscape Communications Corporation. All rights reserved.\n ******************************************************************************/\n\n#ifndef JRI_H\n#define JRI_H\n\n#include \"jritypes.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/*******************************************************************************\n * JRIEnv\n ******************************************************************************/\n\n/* The type of the JRIEnv interface. */\ntypedef struct JRIEnvInterface\tJRIEnvInterface;\n\n/* The type of a JRIEnv instance. */\ntypedef const JRIEnvInterface*\tJRIEnv;\n\n/*******************************************************************************\n * JRIEnv Operations\n ******************************************************************************/\n\n#define JRI_LoadClass(env, buf, bufLen)\t\\\n\t(((*(env))->LoadClass)(env, JRI_LoadClass_op, buf, bufLen))\n\n#define JRI_FindClass(env, name)\t\\\n\t(((*(env))->FindClass)(env, JRI_FindClass_op, name))\n\n#define JRI_Throw(env, obj)\t\\\n\t(((*(env))->Throw)(env, JRI_Throw_op, obj))\n\n#define JRI_ThrowNew(env, clazz, message)\t\\\n\t(((*(env))->ThrowNew)(env, JRI_ThrowNew_op, clazz, message))\n\n#define JRI_ExceptionOccurred(env)\t\\\n\t(((*(env))->ExceptionOccurred)(env, JRI_ExceptionOccurred_op))\n\n#define JRI_ExceptionDescribe(env)\t\\\n\t(((*(env))->ExceptionDescribe)(env, JRI_ExceptionDescribe_op))\n\n#define JRI_ExceptionClear(env)\t\\\n\t(((*(env))->ExceptionClear)(env, JRI_ExceptionClear_op))\n\n#define JRI_NewGlobalRef(env, ref)\t\\\n\t(((*(env))->NewGlobalRef)(env, JRI_NewGlobalRef_op, ref))\n\n#define JRI_DisposeGlobalRef(env, gref)\t\\\n\t(((*(env))->DisposeGlobalRef)(env, JRI_DisposeGlobalRef_op, gref))\n\n#define JRI_GetGlobalRef(env, gref)\t\\\n\t(((*(env))->GetGlobalRef)(env, JRI_GetGlobalRef_op, gref))\n\n#define JRI_SetGlobalRef(env, gref, ref)\t\\\n\t(((*(env))->SetGlobalRef)(env, JRI_SetGlobalRef_op, gref, ref))\n\n#define JRI_IsSameObject(env, a, b)\t\\\n\t(((*(env))->IsSameObject)(env, JRI_IsSameObject_op, a, b))\n\n#define JRI_NewObject(env)\t((*(env))->NewObject)\n#define JRI_NewObjectV(env, clazz, methodID, args)\t\\\n\t(((*(env))->NewObjectV)(env, JRI_NewObject_op_va_list, clazz, methodID, args))\n#define JRI_NewObjectA(env, clazz, method, args)\t\\\n\t(((*(env))->NewObjectA)(env, JRI_NewObject_op_array, clazz, methodID, args))\n\n#define JRI_GetObjectClass(env, obj)\t\\\n\t(((*(env))->GetObjectClass)(env, JRI_GetObjectClass_op, obj))\n\n#define JRI_IsInstanceOf(env, obj, clazz)\t\\\n\t(((*(env))->IsInstanceOf)(env, JRI_IsInstanceOf_op, obj, clazz))\n\n#define JRI_GetMethodID(env, clazz, name, sig)\t\\\n\t(((*(env))->GetMethodID)(env, JRI_GetMethodID_op, clazz, name, sig))\n\n#define JRI_CallMethod(env)\t((*(env))->CallMethod)\n#define JRI_CallMethodV(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodV)(env, JRI_CallMethod_op_va_list, obj, methodID, args))\n#define JRI_CallMethodA(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodA)(env, JRI_CallMethod_op_array, obj, methodID, args))\n\n#define JRI_CallMethodBoolean(env)\t((*(env))->CallMethodBoolean)\n#define JRI_CallMethodBooleanV(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodBooleanV)(env, JRI_CallMethodBoolean_op_va_list, obj, methodID, args))\n#define JRI_CallMethodBooleanA(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodBooleanA)(env, JRI_CallMethodBoolean_op_array, obj, methodID, args))\n\n#define JRI_CallMethodByte(env)\t((*(env))->CallMethodByte)\n#define JRI_CallMethodByteV(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodByteV)(env, JRI_CallMethodByte_op_va_list, obj, methodID, args))\n#define JRI_CallMethodByteA(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodByteA)(env, JRI_CallMethodByte_op_array, obj, methodID, args))\n\n#define JRI_CallMethodChar(env)\t((*(env))->CallMethodChar)\n#define JRI_CallMethodCharV(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodCharV)(env, JRI_CallMethodChar_op_va_list, obj, methodID, args))\n#define JRI_CallMethodCharA(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodCharA)(env, JRI_CallMethodChar_op_array, obj, methodID, args))\n\n#define JRI_CallMethodShort(env)\t((*(env))->CallMethodShort)\n#define JRI_CallMethodShortV(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodShortV)(env, JRI_CallMethodShort_op_va_list, obj, methodID, args))\n#define JRI_CallMethodShortA(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodShortA)(env, JRI_CallMethodShort_op_array, obj, methodID, args))\n\n#define JRI_CallMethodInt(env)\t((*(env))->CallMethodInt)\n#define JRI_CallMethodIntV(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodIntV)(env, JRI_CallMethodInt_op_va_list, obj, methodID, args))\n#define JRI_CallMethodIntA(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodIntA)(env, JRI_CallMethodInt_op_array, obj, methodID, args))\n\n#define JRI_CallMethodLong(env)\t((*(env))->CallMethodLong)\n#define JRI_CallMethodLongV(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodLongV)(env, JRI_CallMethodLong_op_va_list, obj, methodID, args))\n#define JRI_CallMethodLongA(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodLongA)(env, JRI_CallMethodLong_op_array, obj, methodID, args))\n\n#define JRI_CallMethodFloat(env)\t((*(env))->CallMethodFloat)\n#define JRI_CallMethodFloatV(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodFloatV)(env, JRI_CallMethodFloat_op_va_list, obj, methodID, args))\n#define JRI_CallMethodFloatA(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodFloatA)(env, JRI_CallMethodFloat_op_array, obj, methodID, args))\n\n#define JRI_CallMethodDouble(env)\t((*(env))->CallMethodDouble)\n#define JRI_CallMethodDoubleV(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodDoubleV)(env, JRI_CallMethodDouble_op_va_list, obj, methodID, args))\n#define JRI_CallMethodDoubleA(env, obj, methodID, args)\t\\\n\t(((*(env))->CallMethodDoubleA)(env, JRI_CallMethodDouble_op_array, obj, methodID, args))\n\n#define JRI_GetFieldID(env, clazz, name, sig)\t\\\n\t(((*(env))->GetFieldID)(env, JRI_GetFieldID_op, clazz, name, sig))\n\n#define JRI_GetField(env, obj, fieldID)\t\\\n\t(((*(env))->GetField)(env, JRI_GetField_op, obj, fieldID))\n\n#define JRI_GetFieldBoolean(env, obj, fieldID)\t\\\n\t(((*(env))->GetFieldBoolean)(env, JRI_GetFieldBoolean_op, obj, fieldID))\n\n#define JRI_GetFieldByte(env, obj, fieldID)\t\\\n\t(((*(env))->GetFieldByte)(env, JRI_GetFieldByte_op, obj, fieldID))\n\n#define JRI_GetFieldChar(env, obj, fieldID)\t\\\n\t(((*(env))->GetFieldChar)(env, JRI_GetFieldChar_op, obj, fieldID))\n\n#define JRI_GetFieldShort(env, obj, fieldID)\t\\\n\t(((*(env))->GetFieldShort)(env, JRI_GetFieldShort_op, obj, fieldID))\n\n#define JRI_GetFieldInt(env, obj, fieldID)\t\\\n\t(((*(env))->GetFieldInt)(env, JRI_GetFieldInt_op, obj, fieldID))\n\n#define JRI_GetFieldLong(env, obj, fieldID)\t\\\n\t(((*(env))->GetFieldLong)(env, JRI_GetFieldLong_op, obj, fieldID))\n\n#define JRI_GetFieldFloat(env, obj, fieldID)\t\\\n\t(((*(env))->GetFieldFloat)(env, JRI_GetFieldFloat_op, obj, fieldID))\n\n#define JRI_GetFieldDouble(env, obj, fieldID)\t\\\n\t(((*(env))->GetFieldDouble)(env, JRI_GetFieldDouble_op, obj, fieldID))\n\n#define JRI_SetField(env, obj, fieldID, value)\t\\\n\t(((*(env))->SetField)(env, JRI_SetField_op, obj, fieldID, value))\n\n#define JRI_SetFieldBoolean(env, obj, fieldID, value)\t\\\n\t(((*(env))->SetFieldBoolean)(env, JRI_SetFieldBoolean_op, obj, fieldID, value))\n\n#define JRI_SetFieldByte(env, obj, fieldID, value)\t\\\n\t(((*(env))->SetFieldByte)(env, JRI_SetFieldByte_op, obj, fieldID, value))\n\n#define JRI_SetFieldChar(env, obj, fieldID, value)\t\\\n\t(((*(env))->SetFieldChar)(env, JRI_SetFieldChar_op, obj, fieldID, value))\n\n#define JRI_SetFieldShort(env, obj, fieldID, value)\t\\\n\t(((*(env))->SetFieldShort)(env, JRI_SetFieldShort_op, obj, fieldID, value))\n\n#define JRI_SetFieldInt(env, obj, fieldID, value)\t\\\n\t(((*(env))->SetFieldInt)(env, JRI_SetFieldInt_op, obj, fieldID, value))\n\n#define JRI_SetFieldLong(env, obj, fieldID, value)\t\\\n\t(((*(env))->SetFieldLong)(env, JRI_SetFieldLong_op, obj, fieldID, value))\n\n#define JRI_SetFieldFloat(env, obj, fieldID, value)\t\\\n\t(((*(env))->SetFieldFloat)(env, JRI_SetFieldFloat_op, obj, fieldID, value))\n\n#define JRI_SetFieldDouble(env, obj, fieldID, value)\t\\\n\t(((*(env))->SetFieldDouble)(env, JRI_SetFieldDouble_op, obj, fieldID, value))\n\n#define JRI_IsSubclassOf(env, a, b)\t\\\n\t(((*(env))->IsSubclassOf)(env, JRI_IsSubclassOf_op, a, b))\n\n#define JRI_GetStaticMethodID(env, clazz, name, sig)\t\\\n\t(((*(env))->GetStaticMethodID)(env, JRI_GetStaticMethodID_op, clazz, name, sig))\n\n#define JRI_CallStaticMethod(env)\t((*(env))->CallStaticMethod)\n#define JRI_CallStaticMethodV(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodV)(env, JRI_CallStaticMethod_op_va_list, clazz, methodID, args))\n#define JRI_CallStaticMethodA(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodA)(env, JRI_CallStaticMethod_op_array, clazz, methodID, args))\n\n#define JRI_CallStaticMethodBoolean(env)\t((*(env))->CallStaticMethodBoolean)\n#define JRI_CallStaticMethodBooleanV(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodBooleanV)(env, JRI_CallStaticMethodBoolean_op_va_list, clazz, methodID, args))\n#define JRI_CallStaticMethodBooleanA(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodBooleanA)(env, JRI_CallStaticMethodBoolean_op_array, clazz, methodID, args))\n\n#define JRI_CallStaticMethodByte(env)\t((*(env))->CallStaticMethodByte)\n#define JRI_CallStaticMethodByteV(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodByteV)(env, JRI_CallStaticMethodByte_op_va_list, clazz, methodID, args))\n#define JRI_CallStaticMethodByteA(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodByteA)(env, JRI_CallStaticMethodByte_op_array, clazz, methodID, args))\n\n#define JRI_CallStaticMethodChar(env)\t((*(env))->CallStaticMethodChar)\n#define JRI_CallStaticMethodCharV(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodCharV)(env, JRI_CallStaticMethodChar_op_va_list, clazz, methodID, args))\n#define JRI_CallStaticMethodCharA(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodCharA)(env, JRI_CallStaticMethodChar_op_array, clazz, methodID, args))\n\n#define JRI_CallStaticMethodShort(env)\t((*(env))->CallStaticMethodShort)\n#define JRI_CallStaticMethodShortV(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodShortV)(env, JRI_CallStaticMethodShort_op_va_list, clazz, methodID, args))\n#define JRI_CallStaticMethodShortA(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodShortA)(env, JRI_CallStaticMethodShort_op_array, clazz, methodID, args))\n\n#define JRI_CallStaticMethodInt(env)\t((*(env))->CallStaticMethodInt)\n#define JRI_CallStaticMethodIntV(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodIntV)(env, JRI_CallStaticMethodInt_op_va_list, clazz, methodID, args))\n#define JRI_CallStaticMethodIntA(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodIntA)(env, JRI_CallStaticMethodInt_op_array, clazz, methodID, args))\n\n#define JRI_CallStaticMethodLong(env)\t((*(env))->CallStaticMethodLong)\n#define JRI_CallStaticMethodLongV(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodLongV)(env, JRI_CallStaticMethodLong_op_va_list, clazz, methodID, args))\n#define JRI_CallStaticMethodLongA(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodLongA)(env, JRI_CallStaticMethodLong_op_array, clazz, methodID, args))\n\n#define JRI_CallStaticMethodFloat(env)\t((*(env))->CallStaticMethodFloat)\n#define JRI_CallStaticMethodFloatV(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodFloatV)(env, JRI_CallStaticMethodFloat_op_va_list, clazz, methodID, args))\n#define JRI_CallStaticMethodFloatA(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodFloatA)(env, JRI_CallStaticMethodFloat_op_array, clazz, methodID, args))\n\n#define JRI_CallStaticMethodDouble(env)\t((*(env))->CallStaticMethodDouble)\n#define JRI_CallStaticMethodDoubleV(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodDoubleV)(env, JRI_CallStaticMethodDouble_op_va_list, clazz, methodID, args))\n#define JRI_CallStaticMethodDoubleA(env, clazz, methodID, args)\t\\\n\t(((*(env))->CallStaticMethodDoubleA)(env, JRI_CallStaticMethodDouble_op_array, clazz, methodID, args))\n\n#define JRI_GetStaticFieldID(env, clazz, name, sig)\t\\\n\t(((*(env))->GetStaticFieldID)(env, JRI_GetStaticFieldID_op, clazz, name, sig))\n\n#define JRI_GetStaticField(env, clazz, fieldID)\t\\\n\t(((*(env))->GetStaticField)(env, JRI_GetStaticField_op, clazz, fieldID))\n\n#define JRI_GetStaticFieldBoolean(env, clazz, fieldID)\t\\\n\t(((*(env))->GetStaticFieldBoolean)(env, JRI_GetStaticFieldBoolean_op, clazz, fieldID))\n\n#define JRI_GetStaticFieldByte(env, clazz, fieldID)\t\\\n\t(((*(env))->GetStaticFieldByte)(env, JRI_GetStaticFieldByte_op, clazz, fieldID))\n\n#define JRI_GetStaticFieldChar(env, clazz, fieldID)\t\\\n\t(((*(env))->GetStaticFieldChar)(env, JRI_GetStaticFieldChar_op, clazz, fieldID))\n\n#define JRI_GetStaticFieldShort(env, clazz, fieldID)\t\\\n\t(((*(env))->GetStaticFieldShort)(env, JRI_GetStaticFieldShort_op, clazz, fieldID))\n\n#define JRI_GetStaticFieldInt(env, clazz, fieldID)\t\\\n\t(((*(env))->GetStaticFieldInt)(env, JRI_GetStaticFieldInt_op, clazz, fieldID))\n\n#define JRI_GetStaticFieldLong(env, clazz, fieldID)\t\\\n\t(((*(env))->GetStaticFieldLong)(env, JRI_GetStaticFieldLong_op, clazz, fieldID))\n\n#define JRI_GetStaticFieldFloat(env, clazz, fieldID)\t\\\n\t(((*(env))->GetStaticFieldFloat)(env, JRI_GetStaticFieldFloat_op, clazz, fieldID))\n\n#define JRI_GetStaticFieldDouble(env, clazz, fieldID)\t\\\n\t(((*(env))->GetStaticFieldDouble)(env, JRI_GetStaticFieldDouble_op, clazz, fieldID))\n\n#define JRI_SetStaticField(env, clazz, fieldID, value)\t\\\n\t(((*(env))->SetStaticField)(env, JRI_SetStaticField_op, clazz, fieldID, value))\n\n#define JRI_SetStaticFieldBoolean(env, clazz, fieldID, value)\t\\\n\t(((*(env))->SetStaticFieldBoolean)(env, JRI_SetStaticFieldBoolean_op, clazz, fieldID, value))\n\n#define JRI_SetStaticFieldByte(env, clazz, fieldID, value)\t\\\n\t(((*(env))->SetStaticFieldByte)(env, JRI_SetStaticFieldByte_op, clazz, fieldID, value))\n\n#define JRI_SetStaticFieldChar(env, clazz, fieldID, value)\t\\\n\t(((*(env))->SetStaticFieldChar)(env, JRI_SetStaticFieldChar_op, clazz, fieldID, value))\n\n#define JRI_SetStaticFieldShort(env, clazz, fieldID, value)\t\\\n\t(((*(env))->SetStaticFieldShort)(env, JRI_SetStaticFieldShort_op, clazz, fieldID, value))\n\n#define JRI_SetStaticFieldInt(env, clazz, fieldID, value)\t\\\n\t(((*(env))->SetStaticFieldInt)(env, JRI_SetStaticFieldInt_op, clazz, fieldID, value))\n\n#define JRI_SetStaticFieldLong(env, clazz, fieldID, value)\t\\\n\t(((*(env))->SetStaticFieldLong)(env, JRI_SetStaticFieldLong_op, clazz, fieldID, value))\n\n#define JRI_SetStaticFieldFloat(env, clazz, fieldID, value)\t\\\n\t(((*(env))->SetStaticFieldFloat)(env, JRI_SetStaticFieldFloat_op, clazz, fieldID, value))\n\n#define JRI_SetStaticFieldDouble(env, clazz, fieldID, value)\t\\\n\t(((*(env))->SetStaticFieldDouble)(env, JRI_SetStaticFieldDouble_op, clazz, fieldID, value))\n\n#define JRI_NewString(env, unicode, len)\t\\\n\t(((*(env))->NewString)(env, JRI_NewString_op, unicode, len))\n\n#define JRI_GetStringLength(env, string)\t\\\n\t(((*(env))->GetStringLength)(env, JRI_GetStringLength_op, string))\n\n#define JRI_GetStringChars(env, string)\t\\\n\t(((*(env))->GetStringChars)(env, JRI_GetStringChars_op, string))\n\n#define JRI_NewStringUTF(env, utf, len)\t\\\n\t(((*(env))->NewStringUTF)(env, JRI_NewStringUTF_op, utf, len))\n\n#define JRI_GetStringUTFLength(env, string)\t\\\n\t(((*(env))->GetStringUTFLength)(env, JRI_GetStringUTFLength_op, string))\n\n#define JRI_GetStringUTFChars(env, string)\t\\\n\t(((*(env))->GetStringUTFChars)(env, JRI_GetStringUTFChars_op, string))\n\n#define JRI_NewScalarArray(env, length, elementSig, initialElements)\t\\\n\t(((*(env))->NewScalarArray)(env, JRI_NewScalarArray_op, length, elementSig, initialElements))\n\n#define JRI_GetScalarArrayLength(env, array)\t\\\n\t(((*(env))->GetScalarArrayLength)(env, JRI_GetScalarArrayLength_op, array))\n\n#define JRI_GetScalarArrayElements(env, array)\t\\\n\t(((*(env))->GetScalarArrayElements)(env, JRI_GetScalarArrayElements_op, array))\n\n#define JRI_NewObjectArray(env, length, elementClass, initialElement)\t\\\n\t(((*(env))->NewObjectArray)(env, JRI_NewObjectArray_op, length, elementClass, initialElement))\n\n#define JRI_GetObjectArrayLength(env, array)\t\\\n\t(((*(env))->GetObjectArrayLength)(env, JRI_GetObjectArrayLength_op, array))\n\n#define JRI_GetObjectArrayElement(env, array, index)\t\\\n\t(((*(env))->GetObjectArrayElement)(env, JRI_GetObjectArrayElement_op, array, index))\n\n#define JRI_SetObjectArrayElement(env, array, index, value)\t\\\n\t(((*(env))->SetObjectArrayElement)(env, JRI_SetObjectArrayElement_op, array, index, value))\n\n#define JRI_RegisterNatives(env, clazz, nameAndSigArray, nativeProcArray)\t\\\n\t(((*(env))->RegisterNatives)(env, JRI_RegisterNatives_op, clazz, nameAndSigArray, nativeProcArray))\n\n#define JRI_UnregisterNatives(env, clazz)\t\\\n\t(((*(env))->UnregisterNatives)(env, JRI_UnregisterNatives_op, clazz))\n\n/*******************************************************************************\n * JRIEnv Interface\n ******************************************************************************/\n\nstruct java_lang_Class;\nstruct java_lang_Throwable;\nstruct java_lang_Object;\nstruct java_lang_String;\n\nstruct JRIEnvInterface {\n\tvoid*\treserved0;\n\tvoid*\treserved1;\n\tvoid*\treserved2;\n\tstruct java_lang_Class*\t(*LoadClass)(JRIEnv* env, jint op, jbyte* a, jsize aLen);\n\tstruct java_lang_Class*\t(*FindClass)(JRIEnv* env, jint op, const char* a);\n\tvoid\t(*Throw)(JRIEnv* env, jint op, struct java_lang_Throwable* a);\n\tvoid\t(*ThrowNew)(JRIEnv* env, jint op, struct java_lang_Class* a, const char* b);\n\tstruct java_lang_Throwable*\t(*ExceptionOccurred)(JRIEnv* env, jint op);\n\tvoid\t(*ExceptionDescribe)(JRIEnv* env, jint op);\n\tvoid\t(*ExceptionClear)(JRIEnv* env, jint op);\n\tjglobal\t(*NewGlobalRef)(JRIEnv* env, jint op, void* a);\n\tvoid\t(*DisposeGlobalRef)(JRIEnv* env, jint op, jglobal a);\n\tvoid*\t(*GetGlobalRef)(JRIEnv* env, jint op, jglobal a);\n\tvoid\t(*SetGlobalRef)(JRIEnv* env, jint op, jglobal a, void* b);\n\tjbool\t(*IsSameObject)(JRIEnv* env, jint op, void* a, void* b);\n\tvoid*\t(*NewObject)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);\n\tvoid*\t(*NewObjectV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);\n\tvoid*\t(*NewObjectA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);\n\tstruct java_lang_Class*\t(*GetObjectClass)(JRIEnv* env, jint op, void* a);\n\tjbool\t(*IsInstanceOf)(JRIEnv* env, jint op, void* a, struct java_lang_Class* b);\n\tjint\t(*GetMethodID)(JRIEnv* env, jint op, struct java_lang_Class* a, const char* b, const char* c);\n\tvoid*\t(*CallMethod)(JRIEnv* env, jint op, void* a, jint b, ...);\n\tvoid*\t(*CallMethodV)(JRIEnv* env, jint op, void* a, jint b, va_list c);\n\tvoid*\t(*CallMethodA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);\n\tjbool\t(*CallMethodBoolean)(JRIEnv* env, jint op, void* a, jint b, ...);\n\tjbool\t(*CallMethodBooleanV)(JRIEnv* env, jint op, void* a, jint b, va_list c);\n\tjbool\t(*CallMethodBooleanA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);\n\tjbyte\t(*CallMethodByte)(JRIEnv* env, jint op, void* a, jint b, ...);\n\tjbyte\t(*CallMethodByteV)(JRIEnv* env, jint op, void* a, jint b, va_list c);\n\tjbyte\t(*CallMethodByteA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);\n\tjchar\t(*CallMethodChar)(JRIEnv* env, jint op, void* a, jint b, ...);\n\tjchar\t(*CallMethodCharV)(JRIEnv* env, jint op, void* a, jint b, va_list c);\n\tjchar\t(*CallMethodCharA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);\n\tjshort\t(*CallMethodShort)(JRIEnv* env, jint op, void* a, jint b, ...);\n\tjshort\t(*CallMethodShortV)(JRIEnv* env, jint op, void* a, jint b, va_list c);\n\tjshort\t(*CallMethodShortA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);\n\tjint\t(*CallMethodInt)(JRIEnv* env, jint op, void* a, jint b, ...);\n\tjint\t(*CallMethodIntV)(JRIEnv* env, jint op, void* a, jint b, va_list c);\n\tjint\t(*CallMethodIntA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);\n\tjlong\t(*CallMethodLong)(JRIEnv* env, jint op, void* a, jint b, ...);\n\tjlong\t(*CallMethodLongV)(JRIEnv* env, jint op, void* a, jint b, va_list c);\n\tjlong\t(*CallMethodLongA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);\n\tjfloat\t(*CallMethodFloat)(JRIEnv* env, jint op, void* a, jint b, ...);\n\tjfloat\t(*CallMethodFloatV)(JRIEnv* env, jint op, void* a, jint b, va_list c);\n\tjfloat\t(*CallMethodFloatA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);\n\tjdouble\t(*CallMethodDouble)(JRIEnv* env, jint op, void* a, jint b, ...);\n\tjdouble\t(*CallMethodDoubleV)(JRIEnv* env, jint op, void* a, jint b, va_list c);\n\tjdouble\t(*CallMethodDoubleA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);\n\tjint\t(*GetFieldID)(JRIEnv* env, jint op, struct java_lang_Class* a, const char* b, const char* c);\n\tvoid*\t(*GetField)(JRIEnv* env, jint op, void* a, jint b);\n\tjbool\t(*GetFieldBoolean)(JRIEnv* env, jint op, void* a, jint b);\n\tjbyte\t(*GetFieldByte)(JRIEnv* env, jint op, void* a, jint b);\n\tjchar\t(*GetFieldChar)(JRIEnv* env, jint op, void* a, jint b);\n\tjshort\t(*GetFieldShort)(JRIEnv* env, jint op, void* a, jint b);\n\tjint\t(*GetFieldInt)(JRIEnv* env, jint op, void* a, jint b);\n\tjlong\t(*GetFieldLong)(JRIEnv* env, jint op, void* a, jint b);\n\tjfloat\t(*GetFieldFloat)(JRIEnv* env, jint op, void* a, jint b);\n\tjdouble\t(*GetFieldDouble)(JRIEnv* env, jint op, void* a, jint b);\n\tvoid\t(*SetField)(JRIEnv* env, jint op, void* a, jint b, void* c);\n\tvoid\t(*SetFieldBoolean)(JRIEnv* env, jint op, void* a, jint b, jbool c);\n\tvoid\t(*SetFieldByte)(JRIEnv* env, jint op, void* a, jint b, jbyte c);\n\tvoid\t(*SetFieldChar)(JRIEnv* env, jint op, void* a, jint b, jchar c);\n\tvoid\t(*SetFieldShort)(JRIEnv* env, jint op, void* a, jint b, jshort c);\n\tvoid\t(*SetFieldInt)(JRIEnv* env, jint op, void* a, jint b, jint c);\n\tvoid\t(*SetFieldLong)(JRIEnv* env, jint op, void* a, jint b, jlong c);\n\tvoid\t(*SetFieldFloat)(JRIEnv* env, jint op, void* a, jint b, jfloat c);\n\tvoid\t(*SetFieldDouble)(JRIEnv* env, jint op, void* a, jint b, jdouble c);\n\tjbool\t(*IsSubclassOf)(JRIEnv* env, jint op, struct java_lang_Class* a, struct java_lang_Class* b);\n\tjint\t(*GetStaticMethodID)(JRIEnv* env, jint op, struct java_lang_Class* a, const char* b, const char* c);\n\tvoid*\t(*CallStaticMethod)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);\n\tvoid*\t(*CallStaticMethodV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);\n\tvoid*\t(*CallStaticMethodA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);\n\tjbool\t(*CallStaticMethodBoolean)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);\n\tjbool\t(*CallStaticMethodBooleanV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);\n\tjbool\t(*CallStaticMethodBooleanA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);\n\tjbyte\t(*CallStaticMethodByte)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);\n\tjbyte\t(*CallStaticMethodByteV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);\n\tjbyte\t(*CallStaticMethodByteA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);\n\tjchar\t(*CallStaticMethodChar)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);\n\tjchar\t(*CallStaticMethodCharV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);\n\tjchar\t(*CallStaticMethodCharA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);\n\tjshort\t(*CallStaticMethodShort)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);\n\tjshort\t(*CallStaticMethodShortV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);\n\tjshort\t(*CallStaticMethodShortA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);\n\tjint\t(*CallStaticMethodInt)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);\n\tjint\t(*CallStaticMethodIntV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);\n\tjint\t(*CallStaticMethodIntA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);\n\tjlong\t(*CallStaticMethodLong)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);\n\tjlong\t(*CallStaticMethodLongV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);\n\tjlong\t(*CallStaticMethodLongA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);\n\tjfloat\t(*CallStaticMethodFloat)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);\n\tjfloat\t(*CallStaticMethodFloatV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);\n\tjfloat\t(*CallStaticMethodFloatA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);\n\tjdouble\t(*CallStaticMethodDouble)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);\n\tjdouble\t(*CallStaticMethodDoubleV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);\n\tjdouble\t(*CallStaticMethodDoubleA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);\n\tjint\t(*GetStaticFieldID)(JRIEnv* env, jint op, struct java_lang_Class* a, const char* b, const char* c);\n\tvoid*\t(*GetStaticField)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);\n\tjbool\t(*GetStaticFieldBoolean)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);\n\tjbyte\t(*GetStaticFieldByte)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);\n\tjchar\t(*GetStaticFieldChar)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);\n\tjshort\t(*GetStaticFieldShort)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);\n\tjint\t(*GetStaticFieldInt)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);\n\tjlong\t(*GetStaticFieldLong)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);\n\tjfloat\t(*GetStaticFieldFloat)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);\n\tjdouble\t(*GetStaticFieldDouble)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);\n\tvoid\t(*SetStaticField)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, void* c);\n\tvoid\t(*SetStaticFieldBoolean)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jbool c);\n\tvoid\t(*SetStaticFieldByte)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jbyte c);\n\tvoid\t(*SetStaticFieldChar)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jchar c);\n\tvoid\t(*SetStaticFieldShort)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jshort c);\n\tvoid\t(*SetStaticFieldInt)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jint c);\n\tvoid\t(*SetStaticFieldLong)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jlong c);\n\tvoid\t(*SetStaticFieldFloat)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jfloat c);\n\tvoid\t(*SetStaticFieldDouble)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jdouble c);\n\tstruct java_lang_String*\t(*NewString)(JRIEnv* env, jint op, const jchar* a, jint b);\n\tjint\t(*GetStringLength)(JRIEnv* env, jint op, struct java_lang_String* a);\n\tconst jchar*\t(*GetStringChars)(JRIEnv* env, jint op, struct java_lang_String* a);\n\tstruct java_lang_String*\t(*NewStringUTF)(JRIEnv* env, jint op, const jbyte* a, jint b);\n\tjint\t(*GetStringUTFLength)(JRIEnv* env, jint op, struct java_lang_String* a);\n\tconst jbyte*\t(*GetStringUTFChars)(JRIEnv* env, jint op, struct java_lang_String* a);\n\tvoid*\t(*NewScalarArray)(JRIEnv* env, jint op, jint a, const char* b, const jbyte* c);\n\tjint\t(*GetScalarArrayLength)(JRIEnv* env, jint op, void* a);\n\tjbyte*\t(*GetScalarArrayElements)(JRIEnv* env, jint op, void* a);\n\tvoid*\t(*NewObjectArray)(JRIEnv* env, jint op, jint a, struct java_lang_Class* b, void* c);\n\tjint\t(*GetObjectArrayLength)(JRIEnv* env, jint op, void* a);\n\tvoid*\t(*GetObjectArrayElement)(JRIEnv* env, jint op, void* a, jint b);\n\tvoid\t(*SetObjectArrayElement)(JRIEnv* env, jint op, void* a, jint b, void* c);\n\tvoid\t(*RegisterNatives)(JRIEnv* env, jint op, struct java_lang_Class* a, char** b, void** c);\n\tvoid\t(*UnregisterNatives)(JRIEnv* env, jint op, struct java_lang_Class* a);\n};\n\n/*******************************************************************************\n * JRIEnv Operation IDs\n ******************************************************************************/\n\ntypedef enum JRIEnvOperations {\n\tJRI_Reserved0_op,\n\tJRI_Reserved1_op,\n\tJRI_Reserved2_op,\n\tJRI_LoadClass_op,\n\tJRI_FindClass_op,\n\tJRI_Throw_op,\n\tJRI_ThrowNew_op,\n\tJRI_ExceptionOccurred_op,\n\tJRI_ExceptionDescribe_op,\n\tJRI_ExceptionClear_op,\n\tJRI_NewGlobalRef_op,\n\tJRI_DisposeGlobalRef_op,\n\tJRI_GetGlobalRef_op,\n\tJRI_SetGlobalRef_op,\n\tJRI_IsSameObject_op,\n\tJRI_NewObject_op,\n\tJRI_NewObject_op_va_list,\n\tJRI_NewObject_op_array,\n\tJRI_GetObjectClass_op,\n\tJRI_IsInstanceOf_op,\n\tJRI_GetMethodID_op,\n\tJRI_CallMethod_op,\n\tJRI_CallMethod_op_va_list,\n\tJRI_CallMethod_op_array,\n\tJRI_CallMethodBoolean_op,\n\tJRI_CallMethodBoolean_op_va_list,\n\tJRI_CallMethodBoolean_op_array,\n\tJRI_CallMethodByte_op,\n\tJRI_CallMethodByte_op_va_list,\n\tJRI_CallMethodByte_op_array,\n\tJRI_CallMethodChar_op,\n\tJRI_CallMethodChar_op_va_list,\n\tJRI_CallMethodChar_op_array,\n\tJRI_CallMethodShort_op,\n\tJRI_CallMethodShort_op_va_list,\n\tJRI_CallMethodShort_op_array,\n\tJRI_CallMethodInt_op,\n\tJRI_CallMethodInt_op_va_list,\n\tJRI_CallMethodInt_op_array,\n\tJRI_CallMethodLong_op,\n\tJRI_CallMethodLong_op_va_list,\n\tJRI_CallMethodLong_op_array,\n\tJRI_CallMethodFloat_op,\n\tJRI_CallMethodFloat_op_va_list,\n\tJRI_CallMethodFloat_op_array,\n\tJRI_CallMethodDouble_op,\n\tJRI_CallMethodDouble_op_va_list,\n\tJRI_CallMethodDouble_op_array,\n\tJRI_GetFieldID_op,\n\tJRI_GetField_op,\n\tJRI_GetFieldBoolean_op,\n\tJRI_GetFieldByte_op,\n\tJRI_GetFieldChar_op,\n\tJRI_GetFieldShort_op,\n\tJRI_GetFieldInt_op,\n\tJRI_GetFieldLong_op,\n\tJRI_GetFieldFloat_op,\n\tJRI_GetFieldDouble_op,\n\tJRI_SetField_op,\n\tJRI_SetFieldBoolean_op,\n\tJRI_SetFieldByte_op,\n\tJRI_SetFieldChar_op,\n\tJRI_SetFieldShort_op,\n\tJRI_SetFieldInt_op,\n\tJRI_SetFieldLong_op,\n\tJRI_SetFieldFloat_op,\n\tJRI_SetFieldDouble_op,\n\tJRI_IsSubclassOf_op,\n\tJRI_GetStaticMethodID_op,\n\tJRI_CallStaticMethod_op,\n\tJRI_CallStaticMethod_op_va_list,\n\tJRI_CallStaticMethod_op_array,\n\tJRI_CallStaticMethodBoolean_op,\n\tJRI_CallStaticMethodBoolean_op_va_list,\n\tJRI_CallStaticMethodBoolean_op_array,\n\tJRI_CallStaticMethodByte_op,\n\tJRI_CallStaticMethodByte_op_va_list,\n\tJRI_CallStaticMethodByte_op_array,\n\tJRI_CallStaticMethodChar_op,\n\tJRI_CallStaticMethodChar_op_va_list,\n\tJRI_CallStaticMethodChar_op_array,\n\tJRI_CallStaticMethodShort_op,\n\tJRI_CallStaticMethodShort_op_va_list,\n\tJRI_CallStaticMethodShort_op_array,\n\tJRI_CallStaticMethodInt_op,\n\tJRI_CallStaticMethodInt_op_va_list,\n\tJRI_CallStaticMethodInt_op_array,\n\tJRI_CallStaticMethodLong_op,\n\tJRI_CallStaticMethodLong_op_va_list,\n\tJRI_CallStaticMethodLong_op_array,\n\tJRI_CallStaticMethodFloat_op,\n\tJRI_CallStaticMethodFloat_op_va_list,\n\tJRI_CallStaticMethodFloat_op_array,\n\tJRI_CallStaticMethodDouble_op,\n\tJRI_CallStaticMethodDouble_op_va_list,\n\tJRI_CallStaticMethodDouble_op_array,\n\tJRI_GetStaticFieldID_op,\n\tJRI_GetStaticField_op,\n\tJRI_GetStaticFieldBoolean_op,\n\tJRI_GetStaticFieldByte_op,\n\tJRI_GetStaticFieldChar_op,\n\tJRI_GetStaticFieldShort_op,\n\tJRI_GetStaticFieldInt_op,\n\tJRI_GetStaticFieldLong_op,\n\tJRI_GetStaticFieldFloat_op,\n\tJRI_GetStaticFieldDouble_op,\n\tJRI_SetStaticField_op,\n\tJRI_SetStaticFieldBoolean_op,\n\tJRI_SetStaticFieldByte_op,\n\tJRI_SetStaticFieldChar_op,\n\tJRI_SetStaticFieldShort_op,\n\tJRI_SetStaticFieldInt_op,\n\tJRI_SetStaticFieldLong_op,\n\tJRI_SetStaticFieldFloat_op,\n\tJRI_SetStaticFieldDouble_op,\n\tJRI_NewString_op,\n\tJRI_GetStringLength_op,\n\tJRI_GetStringChars_op,\n\tJRI_NewStringUTF_op,\n\tJRI_GetStringUTFLength_op,\n\tJRI_GetStringUTFChars_op,\n\tJRI_NewScalarArray_op,\n\tJRI_GetScalarArrayLength_op,\n\tJRI_GetScalarArrayElements_op,\n\tJRI_NewObjectArray_op,\n\tJRI_GetObjectArrayLength_op,\n\tJRI_GetObjectArrayElement_op,\n\tJRI_SetObjectArrayElement_op,\n\tJRI_RegisterNatives_op,\n\tJRI_UnregisterNatives_op\n} JRIEnvOperations;\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif /* __cplusplus */\n\n#endif /* JRI_H */\n/******************************************************************************/\n"
  },
  {
    "path": "vm/src/from_squeak/unix/npsqueak/include/jri_md.h",
    "content": "/* -*- Mode: C; tab-width: 4; -*- */\n/*******************************************************************************\n * Java Runtime Interface - Machine Dependent Types\n * Copyright (c) 1996 Netscape Communications Corporation. All rights reserved.\n ******************************************************************************/\n \n#ifndef JRI_MD_H\n#define JRI_MD_H\n\n#include <assert.h>\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*******************************************************************************\n * WHAT'S UP WITH THIS FILE?\n * \n * This is where we define the mystical JRI_PUBLIC_API macro that works on all\n * platforms. If you're running with Visual C++, Symantec C, or Borland's \n * development environment on the PC, you're all set. Or if you're on the Mac\n * with Metrowerks, Symantec or MPW with SC you're ok too. For UNIX it shouldn't\n * matter.\n *\n * On UNIX though you probably care about a couple of other symbols though:\n *\tIS_LITTLE_ENDIAN must be defined for little-endian systems\n *\tHAVE_LONG_LONG must be defined on systems that have 'long long' integers\n *\tHAVE_ALIGNED_LONGLONGS must be defined if long-longs must be 8 byte aligned\n *\tHAVE_ALIGNED_DOUBLES must be defined if doubles must be 8 byte aligned\n *\tIS_64 must be defined on 64-bit machines (like Dec Alpha)\n ******************************************************************************/\n\n/* DLL Entry modifiers... */\n\n/* PC */\n#if defined(XP_PC) || defined(_WINDOWS) || defined(WIN32) || defined(_WIN32)\n#\tinclude <windows.h>\n#\tif defined(_MSC_VER)\n#\t\tif defined(WIN32) || defined(_WIN32)\n#\t\t\tdefine JRI_PUBLIC_API(ResultType)\t_declspec(dllexport) ResultType\n#\t\t\tdefine JRI_CALLBACK\n#\t\telse /* !_WIN32 */\n#\t\t    if defined(_WINDLL)\n#\t\t\tdefine JRI_PUBLIC_API(ResultType)\tResultType __cdecl __export __loadds \n#\t\t\tdefine JRI_CALLBACK\t\t\t__loadds\n#\t\t    else /* !WINDLL */\n#\t\t\tdefine JRI_PUBLIC_API(ResultType)\tResultType __cdecl __export\n#\t\t\tdefine JRI_CALLBACK\t\t\t__export\n#                   endif /* !WINDLL */\n#\t\tendif /* !_WIN32 */\n#\telif defined(__BORLANDC__)\n#\t\tif defined(WIN32) || defined(_WIN32)\n#\t\t\tdefine JRI_PUBLIC_API(ResultType)\t__export ResultType\n#\t\t\tdefine JRI_CALLBACK\n#\t\telse /* !_WIN32 */\n#\t\t\tdefine JRI_PUBLIC_API(ResultType)\tResultType _cdecl _export _loadds \n#\t\t\tdefine JRI_CALLBACK\t\t\t\t\t_loadds\n#\t\tendif\n#\telse\n#\t\terror Unsupported PC development environment.\t\n#\tendif\n#\tifndef IS_LITTLE_ENDIAN\n#\t\tdefine IS_LITTLE_ENDIAN\n#\tendif\n\n/* Mac */\n#elif macintosh || Macintosh || THINK_C\n#\tif defined(__MWERKS__)\t\t\t\t/* Metrowerks */\n#\t\tif !__option(enumsalwaysint)\n#\t\t\terror You need to define 'Enums Always Int' for your project.\n#\t\tendif\n#\t\tif defined(GENERATING68K) && !GENERATINGCFM \n#\t\t\tif !__option(fourbyteints) \n#\t\t\t\terror You need to define 'Struct Alignment: 68k' for your project.\n#\t\t\tendif\n#\t\tendif /* !GENERATINGCFM */\n#\telif defined(__SC__)\t\t\t\t/* Symantec */\n#\t\terror What are the Symantec defines? (warren@netscape.com)\n#\telif macintosh && applec\t\t\t/* MPW */\n#\t\terror Please upgrade to the latest MPW compiler (SC).\n#\telse\n#\t\terror Unsupported Mac development environment.\n#\tendif\n#\tdefine JRI_PUBLIC_API(ResultType)\t\tResultType\n#\tdefine JRI_CALLBACK\n\n/* Unix or else */\n#else\n#\tdefine JRI_PUBLIC_API(ResultType)\t\tResultType\n#\tdefine JRI_CALLBACK\n#endif\n\n#ifndef FAR\t\t/* for non-Win16 */\n#define FAR\n#endif\n\n/******************************************************************************/\n\n/* Java Scalar Types */\n\ntypedef unsigned char\tjbool;\ntypedef char\t\t\tjbyte;\ntypedef short\t\t\tjchar;\ntypedef short\t\t\tjshort;\n#ifdef IS_64 /* XXX ok for alpha, but not right on all 64-bit architectures */\ntypedef unsigned int\tjuint;\ntypedef int\t\t\t\tjint;\n#else\ntypedef unsigned long\tjuint;\ntypedef long\t\t\tjint;\n#endif\ntypedef float\t\t\tjfloat;\ntypedef double\t\t\tjdouble;\n\ntypedef juint\t\t\tjsize;\n\n/*******************************************************************************\n * jlong : long long (64-bit signed integer type) support.\n ******************************************************************************/\n\n/*\n** Bit masking macros.  (n must be <= 31 to be portable)\n*/\n#define JRI_BIT(n)\t\t\t((juint)1 << (n))\n#define JRI_BITMASK(n)\t\t(JRI_BIT(n) - 1)\n\n#ifdef HAVE_LONG_LONG\n\n#if !(defined(WIN32) || defined(_WIN32))\ntypedef long long\t\t\tjlong;\ntypedef unsigned long long\tjulong;\n\n#define jlong_MAXINT\t\t0x7fffffffffffffffLL\n#define jlong_MININT\t\t0x8000000000000000LL\n#define jlong_ZERO\t\t\t0x0LL\n\n#else\ntypedef LONGLONG\t\t\tjlong;\ntypedef DWORDLONG\t\t\tjulong;\n\n#define jlong_MAXINT\t\t0x7fffffffffffffffi64\n#define jlong_MININT\t\t0x8000000000000000i64\n#define jlong_ZERO\t\t\t0x0i64\n\n#endif\n\n#define jlong_IS_ZERO(a)\t((a) == 0)\n#define jlong_EQ(a, b)\t\t((a) == (b))\n#define jlong_NE(a, b)\t\t((a) != (b))\n#define jlong_GE_ZERO(a)\t((a) >= 0)\n#define jlong_CMP(a, op, b)\t((a) op (b))\n\n#define jlong_AND(r, a, b)\t((r) = (a) & (b))\n#define jlong_OR(r, a, b)\t((r) = (a) | (b))\n#define jlong_XOR(r, a, b)\t((r) = (a) ^ (b))\n#define jlong_OR2(r, a)\t\t((r) = (r) | (a))\n#define jlong_NOT(r, a)\t\t((r) = ~(a))\n\n#define jlong_NEG(r, a)\t\t((r) = -(a))\n#define jlong_ADD(r, a, b)\t((r) = (a) + (b))\n#define jlong_SUB(r, a, b)\t((r) = (a) - (b))\n\n#define jlong_MUL(r, a, b)\t((r) = (a) * (b))\n#define jlong_DIV(r, a, b)\t((r) = (a) / (b))\n#define jlong_MOD(r, a, b)\t((r) = (a) % (b))\n\n#define jlong_SHL(r, a, b)\t((r) = (a) << (b))\n#define jlong_SHR(r, a, b)\t((r) = (a) >> (b))\n#define jlong_USHR(r, a, b)\t((r) = (julong)(a) >> (b))\n#define jlong_ISHL(r, a, b)\t((r) = ((jlong)(a)) << (b))\n\n#define jlong_L2I(i, l)\t\t((i) = (int)(l))\n#define jlong_L2UI(ui, l)\t((ui) =(unsigned int)(l))\n#define jlong_L2F(f, l)\t\t((f) = (l))\n#define jlong_L2D(d, l)\t\t((d) = (l))\n\n#define jlong_I2L(l, i)\t\t((l) = (i))\n#define jlong_UI2L(l, ui)\t((l) = (ui))\n#define jlong_F2L(l, f)\t\t((l) = (f))\n#define jlong_D2L(l, d)\t\t((l) = (d))\n\n#define jlong_UDIVMOD(qp, rp, a, b)  \\\n    (*(qp) = ((julong)(a) / (b)), \\\n     *(rp) = ((julong)(a) % (b)))\n\n#else  /* !HAVE_LONG_LONG */\n\ntypedef struct {\n#ifdef IS_LITTLE_ENDIAN\n    juint lo, hi;\n#else\n    juint hi, lo;\n#endif\n} jlong;\ntypedef jlong\t\t\t\tjulong;\n\nextern jlong jlong_MAXINT, jlong_MININT, jlong_ZERO;\n\n#define jlong_IS_ZERO(a)\t(((a).hi == 0) && ((a).lo == 0))\n#define jlong_EQ(a, b)\t\t(((a).hi == (b).hi) && ((a).lo == (b).lo))\n#define jlong_NE(a, b)\t\t(((a).hi != (b).hi) || ((a).lo != (b).lo))\n#define jlong_GE_ZERO(a)\t(((a).hi >> 31) == 0)\n\n/*\n * NB: jlong_CMP and jlong_UCMP work only for strict relationals (<, >).\n */\n#define jlong_CMP(a, op, b)\t(((int32)(a).hi op (int32)(b).hi) ||          \\\n\t\t\t\t (((a).hi == (b).hi) && ((a).lo op (b).lo)))\n#define jlong_UCMP(a, op, b)\t(((a).hi op (b).hi) ||                    \\\n\t\t\t\t (((a).hi == (b).hi) && ((a).lo op (b).lo)))\n\n#define jlong_AND(r, a, b)\t((r).lo = (a).lo & (b).lo,                    \\\n\t\t\t\t (r).hi = (a).hi & (b).hi)\n#define jlong_OR(r, a, b)\t((r).lo = (a).lo | (b).lo,                    \\\n\t\t\t\t (r).hi = (a).hi | (b).hi)\n#define jlong_XOR(r, a, b)\t((r).lo = (a).lo ^ (b).lo,                    \\\n\t\t\t\t (r).hi = (a).hi ^ (b).hi)\n#define jlong_OR2(r, a)\t\t((r).lo = (r).lo | (a).lo,                    \\\n\t\t\t\t (r).hi = (r).hi | (a).hi)\n#define jlong_NOT(r, a)\t\t((r).lo = ~(a).lo,\t                          \\\n\t\t\t\t (r).hi = ~(a).hi)\n\n#define jlong_NEG(r, a)\t\t((r).lo = -(int32)(a).lo,                     \\\n\t\t\t\t (r).hi = -(int32)(a).hi - ((r).lo != 0))\n#define jlong_ADD(r, a, b) {                                              \\\n    jlong _a, _b;                                                         \\\n    _a = a; _b = b;                                                       \\\n    (r).lo = _a.lo + _b.lo;                                               \\\n    (r).hi = _a.hi + _b.hi + ((r).lo < _b.lo);                            \\\n}\n\n#define jlong_SUB(r, a, b) {                                              \\\n    jlong _a, _b;                                                         \\\n    _a = a; _b = b;                                                       \\\n    (r).lo = _a.lo - _b.lo;                                               \\\n    (r).hi = _a.hi - _b.hi - (_a.lo < _b.lo);                             \\\n}                                                                         \\\n\n/*\n * Multiply 64-bit operands a and b to get 64-bit result r.\n * First multiply the low 32 bits of a and b to get a 64-bit result in r.\n * Then add the outer and inner products to r.hi.\n */\n#define jlong_MUL(r, a, b) {                                              \\\n    jlong _a, _b;                                                         \\\n    _a = a; _b = b;                                                       \\\n    jlong_MUL32(r, _a.lo, _b.lo);                                         \\\n    (r).hi += _a.hi * _b.lo + _a.lo * _b.hi;                              \\\n}\n\n/* XXX _jlong_lo16(a) = ((a) << 16 >> 16) is better on some archs (not on mips) */\n#define _jlong_lo16(a)\t\t((a) & JRI_BITMASK(16))\n#define _jlong_hi16(a)\t\t((a) >> 16)\n\n/*\n * Multiply 32-bit operands a and b to get 64-bit result r.\n * Use polynomial expansion based on primitive field element (1 << 16).\n */\n#define jlong_MUL32(r, a, b) {                                            \\\n     juint _a1, _a0, _b1, _b0, _y0, _y1, _y2, _y3;                        \\\n     _a1 = _jlong_hi16(a), _a0 = _jlong_lo16(a);                          \\\n     _b1 = _jlong_hi16(b), _b0 = _jlong_lo16(b);                          \\\n     _y0 = _a0 * _b0;                                                     \\\n     _y1 = _a0 * _b1;                                                     \\\n     _y2 = _a1 * _b0;                                                     \\\n     _y3 = _a1 * _b1;                                                     \\\n     _y1 += _jlong_hi16(_y0);                   /* can't carry */         \\\n     _y1 += _y2;                                /* might carry */         \\\n     if (_y1 < _y2) _y3 += 1 << 16;             /* propagate */           \\\n     (r).lo = (_jlong_lo16(_y1) << 16) + _jlong_lo16(_y0);                \\\n     (r).hi = _y3 + _jlong_hi16(_y1);                                     \\\n}\n\n/*\n * Divide 64-bit unsigned operand a by 64-bit unsigned operand b, setting *qp\n * to the 64-bit unsigned quotient, and *rp to the 64-bit unsigned remainder.\n * Minimize effort if one of qp and rp is null.\n */\n#define jlong_UDIVMOD(qp, rp, a, b)\tjlong_udivmod(qp, rp, a, b)\n\nextern JRI_PUBLIC_API(void)\njlong_udivmod(julong *qp, julong *rp, julong a, julong b);\n\n#define jlong_DIV(r, a, b) {                                              \\\n    jlong _a, _b;                                                         \\\n    juint _negative = (int32)(a).hi < 0;                                  \\\n    if (_negative) {                                                      \\\n\tjlong_NEG(_a, a);                                                     \\\n    } else {                                                              \\\n\t_a = a;                                                               \\\n    }                                                                     \\\n    if ((int32)(b).hi < 0) {                                              \\\n\t_negative ^= 1;                                                       \\\n\tjlong_NEG(_b, b);                                                     \\\n    } else {                                                              \\\n\t_b = b;                                                               \\\n    }                                                                     \\\n    jlong_UDIVMOD(&(r), 0, _a, _b);                                       \\\n    if (_negative)                                                        \\\n\tjlong_NEG(r, r);                                                      \\\n}\n\n#define jlong_MOD(r, a, b) {                                              \\\n    jlong _a, _b;                                                         \\\n    juint _negative = (int32)(a).hi < 0;                                  \\\n    if (_negative) {                                                      \\\n\tjlong_NEG(_a, a);                                                     \\\n    } else {                                                              \\\n\t_a = a;                                                               \\\n    }                                                                     \\\n    if ((int32)(b).hi < 0) {                                              \\\n\tjlong_NEG(_b, b);                                                     \\\n    } else {                                                              \\\n\t_b = b;                                                               \\\n    }                                                                     \\\n    jlong_UDIVMOD(0, &(r), _a, _b);                                       \\\n    if (_negative)                                                        \\\n\tjlong_NEG(r, r);                                                      \\\n}\n\n/*\n * NB: b is a juint, not jlong or julong, for the shift ops.\n */\n#define jlong_SHL(r, a, b) {                                              \\\n    if (b) {                                                              \\\n\tjlong _a;                                                             \\\n        _a = a;                                                           \\\n        if ((b) < 32) {                                                   \\\n\t    (r).lo = _a.lo << (b);                                            \\\n\t    (r).hi = (_a.hi << (b)) | (_a.lo >> (32 - (b)));                  \\\n\t} else {                                                              \\\n\t    (r).lo = 0;                                                       \\\n\t    (r).hi = _a.lo << ((b) & 31);                                     \\\n\t}                                                                     \\\n    } else {                                                              \\\n\t(r) = (a);                                                            \\\n    }                                                                     \\\n}\n\n/* a is an int32, b is int32, r is jlong */\n#define jlong_ISHL(r, a, b) {                                             \\\n    if (b) {                                                              \\\n\tjlong _a;                                                             \\\n\t_a.lo = (a);                                                          \\\n\t_a.hi = 0;                                                            \\\n        if ((b) < 32) {                                                   \\\n\t    (r).lo = (a) << (b);                                              \\\n\t    (r).hi = ((a) >> (32 - (b)));                                     \\\n\t} else {                                                              \\\n\t    (r).lo = 0;                                                       \\\n\t    (r).hi = (a) << ((b) & 31);                                       \\\n\t}                                                                     \\\n    } else {                                                              \\\n\t(r).lo = (a);                                                         \\\n\t(r).hi = 0;                                                           \\\n    }                                                                     \\\n}\n\n#define jlong_SHR(r, a, b) {                                              \\\n    if (b) {                                                              \\\n\tjlong _a;                                                             \\\n        _a = a;                                                           \\\n\tif ((b) < 32) {                                                       \\\n\t    (r).lo = (_a.hi << (32 - (b))) | (_a.lo >> (b));                  \\\n\t    (r).hi = (int32)_a.hi >> (b);                                     \\\n\t} else {                                                              \\\n\t    (r).lo = (int32)_a.hi >> ((b) & 31);                              \\\n\t    (r).hi = (int32)_a.hi >> 31;                                      \\\n\t}                                                                     \\\n    } else {                                                              \\\n\t(r) = (a);                                                            \\\n    }                                                                     \\\n}\n\n#define jlong_USHR(r, a, b) {                                             \\\n    if (b) {                                                              \\\n\tjlong _a;                                                             \\\n        _a = a;                                                           \\\n\tif ((b) < 32) {                                                       \\\n\t    (r).lo = (_a.hi << (32 - (b))) | (_a.lo >> (b));                  \\\n\t    (r).hi = _a.hi >> (b);                                            \\\n\t} else {                                                              \\\n\t    (r).lo = _a.hi >> ((b) & 31);                                     \\\n\t    (r).hi = 0;                                                       \\\n\t}                                                                     \\\n    } else {                                                              \\\n\t(r) = (a);                                                            \\\n    }                                                                     \\\n}\n\n#define jlong_L2I(i, l)\t\t((i) = (l).lo)\n#define jlong_L2UI(ui, l)\t((ui) = (l).lo)\n#define jlong_L2F(f, l)\t\t{ double _d; jlong_L2D(_d, l); (f) = (float) _d; }\n\n#define jlong_L2D(d, l) {                                                 \\\n    int32 _negative;                                                      \\\n    jlong _absval;                                                        \\\n                                                                          \\\n    _negative = (l).hi >> 31;                                             \\\n    if (_negative) {                                                      \\\n\tjlong_NEG(_absval, l);                                                \\\n    } else {                                                              \\\n\t_absval = l;                                                          \\\n    }                                                                     \\\n    (d) = (double)_absval.hi * 4.294967296e9 + _absval.lo;                \\\n    if (_negative)                                                        \\\n\t(d) = -(d);                                                           \\\n}\n\n#define jlong_I2L(l, i)\t\t((l).hi = (i) >> 31, (l).lo = (i))\n#define jlong_UI2L(l, ui)\t((l).hi = 0, (l).lo = (ui))\n#define jlong_F2L(l, f)\t\t{ double _d = (double) f; jlong_D2L(l, _d); }\n\n#define jlong_D2L(l, d) {                                                 \\\n    int _negative;                                                        \\\n    double _absval, _d_hi;                                                \\\n    jlong _lo_d;                                                          \\\n                                                                          \\\n    _negative = ((d) < 0);                                                \\\n    _absval = _negative ? -(d) : (d);                                     \\\n                                                                          \\\n    (l).hi = (juint)(_absval / 4.294967296e9);                            \\\n    (l).lo = 0;                                                           \\\n    jlong_L2D(_d_hi, l);                                                  \\\n    _absval -= _d_hi;                                                     \\\n    _lo_d.hi = 0;                                                         \\\n    if (_absval < 0) {                                                    \\\n\t_lo_d.lo = (juint) -_absval;                                          \\\n\tjlong_SUB(l, l, _lo_d);                                               \\\n    } else {                                                              \\\n\t_lo_d.lo = (juint) _absval;                                           \\\n\tjlong_ADD(l, l, _lo_d);                                               \\\n    }                                                                     \\\n                                                                          \\\n    if (_negative)                                                        \\\n\tjlong_NEG(l, l);                                                      \\\n}\n\n#endif /* !HAVE_LONG_LONG */\n\n/******************************************************************************/\n/*\n** JDK Stuff -- This stuff is still needed while we're using the JDK\n** dynamic linking strategy to call native methods.\n*/\n\ntypedef union JRI_JDK_stack_item {\n    /* Non pointer items */\n    jint           i;\n    jfloat         f;\n    jint           o;\n    /* Pointer items */\n    void          *h;\n    void          *p;\n    unsigned char *addr;\n#ifdef IS_64\n    double         d;\n    long           l;\t\t/* == 64bits! */\n#endif\n} JRI_JDK_stack_item;\n\ntypedef union JRI_JDK_Java8Str {\n    jint x[2];\n    jdouble d;\n    jlong l;\n    void *p;\n    float f;\n} JRI_JDK_Java8;\n\n#ifdef HAVE_ALIGNED_LONGLONGS\n#define JRI_GET_INT64(_t,_addr) ( ((_t).x[0] = ((jint*)(_addr))[0]), \\\n                              ((_t).x[1] = ((jint*)(_addr))[1]),      \\\n                              (_t).l )\n#define JRI_SET_INT64(_t, _addr, _v) ( (_t).l = (_v),                \\\n                                   ((jint*)(_addr))[0] = (_t).x[0], \\\n                                   ((jint*)(_addr))[1] = (_t).x[1] )\n#else\n#define JRI_GET_INT64(_t,_addr) (*(jlong*)(_addr))\n#define JRI_SET_INT64(_t, _addr, _v) (*(jlong*)(_addr) = (_v))\n#endif\n\n/* If double's must be aligned on doubleword boundaries then define this */\n#ifdef HAVE_ALIGNED_DOUBLES\n#define JRI_GET_DOUBLE(_t,_addr) ( ((_t).x[0] = ((jint*)(_addr))[0]), \\\n                               ((_t).x[1] = ((jint*)(_addr))[1]),      \\\n                               (_t).d )\n#define JRI_SET_DOUBLE(_t, _addr, _v) ( (_t).d = (_v),                \\\n                                    ((jint*)(_addr))[0] = (_t).x[0], \\\n                                    ((jint*)(_addr))[1] = (_t).x[1] )\n#else\n#define JRI_GET_DOUBLE(_t,_addr) (*(jdouble*)(_addr))\n#define JRI_SET_DOUBLE(_t, _addr, _v) (*(jdouble*)(_addr) = (_v))\n#endif\n\n/******************************************************************************/\n#ifdef __cplusplus\n}\n#endif\n#endif /* JRI_MD_H */\n/******************************************************************************/\n"
  },
  {
    "path": "vm/src/from_squeak/unix/npsqueak/include/jritypes.h",
    "content": "/* -*- Mode: C; tab-width: 4; -*- */\n/*******************************************************************************\n * Java Runtime Interface\n * Copyright (c) 1996 Netscape Communications Corporation. All rights reserved.\n ******************************************************************************/\n\n#ifndef JRITYPES_H\n#define JRITYPES_H\n\n#include \"jri_md.h\"\n#include <stddef.h>\n#include <stdlib.h>\n#include <stdarg.h>\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*******************************************************************************\n * Types\n ******************************************************************************/\n\nstruct JRIEnvInterface;\n\ntypedef void*\t\tJRIRef;\ntypedef void*\t\tJRIGlobalRef;\n\ntypedef jint\t\tJRIInterfaceID[4];\ntypedef jint\t\tJRIFieldID;\ntypedef jint\t\tJRIMethodID;\n\n/* synonyms: */\ntypedef JRIGlobalRef\tjglobal;\ntypedef JRIRef\t\t\tjref;\n\ntypedef union JRIValue {\n\tjbool\t\t\tz;\n\tjbyte\t\t\tb;\n\tjchar\t\t\tc;\n\tjshort\t\t\ts;\n\tjint\t\t\ti;\n\tjlong\t\t\tl;\n\tjfloat\t\t\tf;\n\tjdouble\t\t\td;\n\tjref\t\t\tr;\n} JRIValue;\n\ntypedef JRIValue\t\tjvalue;\n\ntypedef enum JRIBoolean {\n    JRIFalse\t\t= 0,\n    JRITrue\t\t\t= 1\n} JRIBoolean;\n\ntypedef enum JRIConstant {\n\tJRIUninitialized\t= -1\n} JRIConstant;\n\n/* convenience types: */\ntypedef JRIRef\t\tjbooleanArray;\ntypedef JRIRef\t\tjbyteArray;\ntypedef JRIRef\t\tjcharArray;\ntypedef JRIRef\t\tjshortArray;\ntypedef JRIRef\t\tjintArray;\ntypedef JRIRef\t\tjlongArray;\ntypedef JRIRef\t\tjfloatArray;\ntypedef JRIRef\t\tjdoubleArray;\ntypedef JRIRef\t\tjobjectArray;\ntypedef JRIRef\t\tjstringArray;\ntypedef JRIRef\t\tjarrayArray;\n\n#define JRIConstructorMethodName\t\"<init>\"\n\n/*******************************************************************************\n * Signature Construction Macros\n ******************************************************************************/\n\n/*\n** These macros can be used to construct signature strings. Hopefully their names\n** are a little easier to remember than the single character they correspond to.\n** For example, to specify the signature of the method:\n**\n**\tpublic int read(byte b[], int off, int len);\n**\n** you could write something like this in C:\n**\n**\tchar* readSig = JRISigMethod(JRISigArray(JRISigByte)\n**\t\t\t\t\t\t\t\t JRISigInt\n**\t\t\t\t\t\t\t\t JRISigInt) JRISigInt;\n**\n** Of course, don't put commas between the types.\n*/\n#define JRISigArray(T)\t\t\"[\" T\n#define JRISigByte\t\t\t\"B\"\n#define JRISigChar\t\t\t\"C\"\n#define JRISigClass(name)\t\"L\" name \";\"\n#define JRISigFloat\t\t\t\"F\"\n#define JRISigDouble\t\t\"D\"\n#define JRISigMethod(args)\t\"(\" args \")\"\n#define JRISigNoArgs\t\t\"\"\n#define JRISigInt\t\t\t\"I\"\n#define JRISigLong\t\t\t\"J\"\n#define JRISigShort\t\t\t\"S\"\n#define JRISigVoid\t\t\t\"V\"\n#define JRISigBoolean\t\t\"Z\"\n\n/*******************************************************************************\n * Environments\n ******************************************************************************/\n\nextern JRI_PUBLIC_API(const struct JRIEnvInterface**)\nJRI_GetCurrentEnv(void);\n\n/*******************************************************************************\n * Specific Scalar Array Types\n ******************************************************************************/\n\n/*\n** The JRI Native Method Interface does not support boolean arrays. This\n** is to allow Java runtime implementations to optimize boolean array\n** storage. Using the ScalarArray operations on boolean arrays is bound\n** to fail, so convert any boolean arrays to byte arrays in Java before\n** passing them to a native method.\n*/\n\n#define JRI_NewByteArray(env, length, initialValues)\t\\\n\tJRI_NewScalarArray(env, length, JRISigByte, (jbyte*)(initialValues))\n#define JRI_GetByteArrayLength(env, array)\t\\\n\tJRI_GetScalarArrayLength(env, array)\n#define JRI_GetByteArrayElements(env, array)\t\\\n\tJRI_GetScalarArrayElements(env, array)\n\n#define JRI_NewCharArray(env, length, initialValues)\t\\\n\tJRI_NewScalarArray(env, ((length) * sizeof(jchar)), JRISigChar, (jbyte*)(initialValues))\n#define JRI_GetCharArrayLength(env, array)\t\\\n\tJRI_GetScalarArrayLength(env, array)\n#define JRI_GetCharArrayElements(env, array)\t\t   \\\n\t((jchar*)JRI_GetScalarArrayElements(env, array))\n\n#define JRI_NewShortArray(env, length, initialValues)\t\\\n\tJRI_NewScalarArray(env, ((length) * sizeof(jshort)), JRISigShort, (jbyte*)(initialValues))\n#define JRI_GetShortArrayLength(env, array)\t\\\n\tJRI_GetScalarArrayLength(env, array)\n#define JRI_GetShortArrayElements(env, array)\t\t   \\\n\t((jshort*)JRI_GetScalarArrayElements(env, array))\n\n#define JRI_NewIntArray(env, length, initialValues)\t\\\n\tJRI_NewScalarArray(env, ((length) * sizeof(jint)), JRISigInt, (jbyte*)(initialValues))\n#define JRI_GetIntArrayLength(env, array)\t\\\n\tJRI_GetScalarArrayLength(env, array)\n#define JRI_GetIntArrayElements(env, array)\t\t   \\\n\t((jint*)JRI_GetScalarArrayElements(env, array))\n\n#define JRI_NewLongArray(env, length, initialValues)\t\\\n\tJRI_NewScalarArray(env, ((length) * sizeof(jlong)), JRISigLong, (jbyte*)(initialValues))\n#define JRI_GetLongArrayLength(env, array)\t\\\n\tJRI_GetScalarArrayLength(env, array)\n#define JRI_GetLongArrayElements(env, array)\t\t   \\\n\t((jlong*)JRI_GetScalarArrayElements(env, array))\n\n#define JRI_NewFloatArray(env, length, initialValues)\t\\\n\tJRI_NewScalarArray(env, ((length) * sizeof(jfloat)), JRISigFloat, (jbyte*)(initialValues))\n#define JRI_GetFloatArrayLength(env, array)\t\\\n\tJRI_GetScalarArrayLength(env, array)\n#define JRI_GetFloatArrayElements(env, array)\t\t   \\\n\t((jfloat*)JRI_GetScalarArrayElements(env, array))\n\n#define JRI_NewDoubleArray(env, length, initialValues)\t\\\n\tJRI_NewScalarArray(env, ((length) * sizeof(jdouble)), JRISigDouble, (jbyte*)(initialValues))\n#define JRI_GetDoubleArrayLength(env, array)\t\\\n\tJRI_GetScalarArrayLength(env, array)\n#define JRI_GetDoubleArrayElements(env, array)\t\t   \\\n\t((jdouble*)JRI_GetScalarArrayElements(env, array))\n\n/******************************************************************************/\n#ifdef __cplusplus\n}\n#endif\n#endif /* JRITYPES_H */\n/******************************************************************************/\n"
  },
  {
    "path": "vm/src/from_squeak/unix/npsqueak/include/npapi.h",
    "content": "/* -*- Mode: C; tab-width: 4; -*- */\n/*\n *  npapi.h $Revision: 1.3 $\n *  Netscape client plug-in API spec\n */\n\n#ifndef _NPAPI_H_\n#define _NPAPI_H_\n\n#include \"jri.h\"\t\t/* Java Runtime Interface */\n\n\n/* XXX this needs to get out of here */\n#if defined(__MWERKS__)\n#ifndef XP_MAC\n#define XP_MAC\n#endif\n#endif\n\n\n\n/*----------------------------------------------------------------------*/\n/*                   Plugin Version Constants                           */\n/*----------------------------------------------------------------------*/\n\n#define NP_VERSION_MAJOR 0\n#define NP_VERSION_MINOR 9\n\n\n\n/*----------------------------------------------------------------------*/\n/*                   Definition of Basic Types                          */\n/*----------------------------------------------------------------------*/\n \n#ifndef _UINT16\ntypedef unsigned short uint16;\n#endif\n#ifndef _UINT32\n#if defined(__alpha)\ntypedef unsigned int uint32;\n#else /* __alpha */\ntypedef unsigned long uint32;\n#endif /* __alpha */\n#endif\n#ifndef _INT16\ntypedef short int16;\n#endif\n#ifndef _INT32\n#if defined(__alpha)\ntypedef int int32;\n#else /* __alpha */\ntypedef long int32;\n#endif /* __alpha */\n#endif\n\n#ifndef FALSE\n#define FALSE (0)\n#endif\n#ifndef TRUE\n#define TRUE (1)\n#endif\n#ifndef NULL\n#define NULL (0L)\n#endif\n\ntypedef unsigned char\tNPBool;\ntypedef void*\t\t\tNPEvent;\ntypedef int16\t\t\tNPError;\ntypedef int16\t\t\tNPReason;\ntypedef char*\t\t\tNPMIMEType;\n\n\n\n/*----------------------------------------------------------------------*/\n/*                   Structures and definitions                         */\n/*----------------------------------------------------------------------*/\n\n/*\n *  NPP is a plug-in's opaque instance handle\n */\ntypedef struct _NPP\n{\n    void*\tpdata;\t\t\t/* plug-in private data */\n    void*\tndata;\t\t\t/* netscape private data */\n} NPP_t;\n\ntypedef NPP_t*  NPP;\n\n\ntypedef struct _NPStream\n{\n    void*\t\tpdata;\t\t/* plug-in private data */\n    void*\t\tndata;\t\t/* netscape private data */\n    const char*\t\turl;\n    uint32\t\tend;\n    uint32\t\tlastmodified;\n    void*\t\tnotifyData;\n} NPStream;\n\n\ntypedef struct _NPByteRange\n{\n    int32\toffset;\t\t\t/* negative offset means from the end */\n    uint32\tlength;\n    struct _NPByteRange* next;\n} NPByteRange;\n\n\ntypedef struct _NPSavedData\n{\n    int32\tlen;\n    void*\tbuf;\n} NPSavedData;\n\n\ntypedef struct _NPRect\n{\n    uint16\ttop;\n    uint16\tleft;\n    uint16\tbottom;\n    uint16\tright;\n} NPRect;\n\n\n#ifdef XP_UNIX\n/*\n * Unix specific structures and definitions\n */\n#include <X11/Xlib.h>\n\n/*\n * Callback Structures.\n *\n * These are used to pass additional platform specific information.\n */\nenum {\n\tNP_SETWINDOW = 1\n};\n\ntypedef struct\n{\n    int32\t\ttype;\n} NPAnyCallbackStruct;\n\ntypedef struct\n{\n    int32\t\t\ttype;\n    Display*\t\tdisplay;\n    Visual*\t\t\tvisual;\n    Colormap\t\tcolormap;\n    unsigned int\tdepth;\n} NPSetWindowCallbackStruct;\n\n/*\n * List of variable names for which NPP_GetValue shall be implemented\n */\ntypedef enum {\n\tNPPVpluginNameString = 1,\n\tNPPVpluginDescriptionString\n} NPPVariable;\n\n/*\n * List of variable names for which NPN_GetValue is implemented by Mozilla\n */\ntypedef enum {\n\tNPNVxDisplay = 1,\n\tNPNVxtAppContext\n} NPNVariable;\n\n#endif /* XP_UNIX */\n\n\ntypedef struct _NPWindow \n{\n    void*\twindow;\t\t/* Platform specific window handle */\n    uint32\tx;\t\t\t/* Position of top left corner relative */\n    uint32\ty; \t\t\t/*\tto a netscape page.\t\t\t\t\t*/\n    uint32\twidth;\t\t/* Maximum window size */\n    uint32\theight;\n    NPRect\tclipRect;\t/* Clipping rectangle in port coordinates */\n\t\t\t\t\t\t/* Used by MAC only.                      */\n#ifdef XP_UNIX\n    void *\tws_info;\t/* Platform-dependent additonal data */\n#endif /* XP_UNIX */\n} NPWindow;\n\n\ntypedef struct _NPFullPrint\n{\n    NPBool\tpluginPrinted;\t/* Set TRUE if plugin handled fullscreen */\n\t\t\t\t\t\t\t/*\tprinting\t\t\t\t\t\t\t */\n    NPBool\tprintOne;\t\t/* TRUE if plugin should print one copy  */\n\t\t\t\t\t\t\t/*\tto default printer\t\t\t\t\t */\n    void*\tplatformPrint;\t/* Platform-specific printing info */\n} NPFullPrint;\n\ntypedef struct _NPEmbedPrint\n{\n    NPWindow\twindow;\n    void*\tplatformPrint;\t/* Platform-specific printing info */\n} NPEmbedPrint;\n\ntypedef struct _NPPrint\n{\n    uint16\tmode;\t\t\t\t\t\t/* NP_FULL or NP_EMBED */\n    union\n    {\n\t\tNPFullPrint\t\tfullPrint;\t\t/* if mode is NP_FULL */\n\t\tNPEmbedPrint\tembedPrint;\t\t/* if mode is NP_EMBED */\n    } print;\n} NPPrint;\n\n\n#ifdef XP_MAC\n/*\n *  Mac-specific structures and definitions.\n */\n \n#include <Quickdraw.h>\n#include <Events.h>\n\ntypedef struct NP_Port\n{\n    CGrafPtr\tport;\t\t/* Grafport */\n    int32\t\tportx;\t\t/* position inside the topmost window */\n    int32\t\tporty;\n} NP_Port;\n\n/*\n *  Non-standard event types that can be passed to HandleEvent\n */\n#define getFocusEvent       (osEvt + 16)\n#define loseFocusEvent      (osEvt + 17)\n#define adjustCursorEvent   (osEvt + 18)\n\n#endif /* XP_MAC */\n\n\n/*\n * Values for mode passed to NPP_New:\n */\n#define NP_EMBED\t\t1\n#define NP_FULL\t\t\t2\n\n/*\n * Values for stream type passed to NPP_NewStream:\n */\n#define NP_NORMAL\t\t1\n#define NP_SEEK\t\t\t2\n#define NP_ASFILE\t\t3\n#define NP_ASFILEONLY\t\t4\n\n#define NP_MAXREADY\t(((unsigned)(~0)<<1)>>1)\n\n\n\n/*----------------------------------------------------------------------*/\n/*                   Error and Reason Code definitions                  */\n/*----------------------------------------------------------------------*/\n\n/*\n *\tValues of type NPError:\n */\n#define NPERR_BASE\t\t\t\t\t\t\t0\n#define NPERR_NO_ERROR\t\t\t\t\t\t(NPERR_BASE + 0)\n#define NPERR_GENERIC_ERROR\t\t\t\t\t(NPERR_BASE + 1)\n#define NPERR_INVALID_INSTANCE_ERROR\t\t(NPERR_BASE + 2)\n#define NPERR_INVALID_FUNCTABLE_ERROR\t\t(NPERR_BASE + 3)\n#define NPERR_MODULE_LOAD_FAILED_ERROR\t\t(NPERR_BASE + 4)\n#define NPERR_OUT_OF_MEMORY_ERROR\t\t\t(NPERR_BASE + 5)\n#define NPERR_INVALID_PLUGIN_ERROR\t\t\t(NPERR_BASE + 6)\n#define NPERR_INVALID_PLUGIN_DIR_ERROR\t\t(NPERR_BASE + 7)\n#define NPERR_INCOMPATIBLE_VERSION_ERROR\t(NPERR_BASE + 8)\n#define NPERR_INVALID_PARAM \t\t\t\t(NPERR_BASE + 9)\n#define NPERR_INVALID_URL \t\t\t\t\t(NPERR_BASE + 10)\n#define NPERR_FILE_NOT_FOUND \t\t\t\t(NPERR_BASE + 11)\n#define NPERR_NO_DATA\t\t \t\t\t\t(NPERR_BASE + 12)\n#define NPERR_STREAM_NOT_SEEKABLE\t\t\t(NPERR_BASE + 13)\n\n/*\n *\tValues of type NPReason:\n */\n#define NPRES_BASE                      \t0\n#define NPRES_DONE\t\t\t               \t(NPRES_BASE + 0)\n#define NPRES_NETWORK_ERR               \t(NPRES_BASE + 1)\n#define NPRES_USER_BREAK                \t(NPRES_BASE + 2)\n\n/*\n *\tDon't use these obsolete error codes any more.\n */\n#define NP_NOERR  NP_NOERR_is_obsolete_use_NPERR_NO_ERROR\n#define NP_EINVAL NP_EINVAL_is_obsolete_use_NPERR_GENERIC_ERROR\n#define NP_EABORT NP_EABORT_is_obsolete_use_NPRES_USER_BREAK\n\n/*\n * Version feature information\n */\n#define NPVERS_HAS_STREAMOUTPUT\t\t8\n#define NPVERS_HAS_NOTIFICATION\t\t9\n#define NPVERS_HAS_LIVECONNECT\t\t9\n\n\n/*----------------------------------------------------------------------*/\n/*                   Function Prototypes                                */\n/*----------------------------------------------------------------------*/\n\n#if defined(_WINDOWS) && !defined(WIN32)\n#define NP_LOADDS  _loadds\n#else\n#define NP_LOADDS\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*\n * NPP_* functions are provided by the plugin and called by the navigator.\n */\n\n#ifdef XP_UNIX\nchar*\t\t\t\t\tNPP_GetMIMEDescription(void);\nNPError\t\t\t\t\tNPP_GetValue(void *instance, NPPVariable variable,\n\t\t\t\t\t\t\t\t\t void *value);\n#endif /* XP_UNIX */\nNPError               \tNPP_Initialize(void);\nvoid                  \tNPP_Shutdown(void);\nNPError     NP_LOADDS\tNPP_New(NPMIMEType pluginType, NPP instance,\n\t\t\t\t\t\t\t\tuint16 mode, int16 argc, char* argn[],\n\t\t\t\t\t\t\t\tchar* argv[], NPSavedData* saved);\nNPError     NP_LOADDS\tNPP_Destroy(NPP instance, NPSavedData** save);\nNPError     NP_LOADDS\tNPP_SetWindow(NPP instance, NPWindow* window);\nNPError     NP_LOADDS\tNPP_NewStream(NPP instance, NPMIMEType type,\n\t\t\t\t\t\t\t\t\t  NPStream* stream, NPBool seekable,\n\t\t\t\t\t\t\t\t\t  uint16* stype);\nNPError     NP_LOADDS\tNPP_DestroyStream(NPP instance, NPStream* stream,\n\t\t\t\t\t\t\t\t\t\t  NPReason reason);\nint32       NP_LOADDS\tNPP_WriteReady(NPP instance, NPStream* stream);\nint32       NP_LOADDS\tNPP_Write(NPP instance, NPStream* stream, int32 offset,\n\t\t\t\t\t\t\t\t  int32 len, void* buffer);\nvoid        NP_LOADDS\tNPP_StreamAsFile(NPP instance, NPStream* stream,\n\t\t\t\t\t\t\t\t\t\t const char* fname);\nvoid        NP_LOADDS\tNPP_Print(NPP instance, NPPrint* platformPrint);\nint16                 \tNPP_HandleEvent(NPP instance, void* event);\nvoid                 \tNPP_URLNotify(NPP instance, const char* url,\n\t\t\t\t\t\t\t\t\t  NPReason reason, void* notifyData);\njref\t\t\t\t\tNPP_GetJavaClass(void);\n\n\n/*\n * NPN_* functions are provided by the navigator and called by the plugin.\n */\n \n#ifdef XP_UNIX\nNPError\t\t\tNPN_GetValue(NPP instance, NPNVariable variable,\n\t\t\t\t\t\t\t void *value);\n#endif /* XP_UNIX */\nvoid        \tNPN_Version(int* plugin_major, int* plugin_minor,\n\t\t\t\t\t\t\tint* netscape_major, int* netscape_minor);\nNPError     \tNPN_GetURLNotify(NPP instance, const char* url,\n\t\t\t\t\t\t\t\t const char* target, void* notifyData);\nNPError     \tNPN_GetURL(NPP instance, const char* url,\n\t\t\t\t\t\t   const char* target);\nNPError     \tNPN_PostURLNotify(NPP instance, const char* url,\n\t\t\t\t\t\t\t\t  const char* target, uint32 len,\n\t\t\t\t\t\t\t\t  const char* buf, NPBool file,\n\t\t\t\t\t\t\t\t  void* notifyData);\nNPError     \tNPN_PostURL(NPP instance, const char* url,\n\t\t\t\t\t\t\tconst char* target, uint32 len,\n\t\t\t\t\t\t\tconst char* buf, NPBool file);\nNPError     \tNPN_RequestRead(NPStream* stream, NPByteRange* rangeList);\nNPError     \tNPN_NewStream(NPP instance, NPMIMEType type,\n\t\t\t\t\t\t\t  const char* target, NPStream** stream);\nint32       \tNPN_Write(NPP instance, NPStream* stream, int32 len,\n\t\t\t\t\t\t  void* buffer);\nNPError    \t\tNPN_DestroyStream(NPP instance, NPStream* stream,\n\t\t\t\t\t\t\t\t  NPReason reason);\nvoid        \tNPN_Status(NPP instance, const char* message);\nconst char* \tNPN_UserAgent(NPP instance);\nvoid*       \tNPN_MemAlloc(uint32 size);\nvoid        \tNPN_MemFree(void* ptr);\nuint32      \tNPN_MemFlush(uint32 size);\nvoid\t\t\tNPN_ReloadPlugins(NPBool reloadPages);\nJRIEnv*\t\t\tNPN_GetJavaEnv(void);\njref\t\t\tNPN_GetJavaPeer(NPP instance);\n\n\n#ifdef __cplusplus\n}  /* end extern \"C\" */\n#endif\n\n#endif /* _NPAPI_H_ */\n"
  },
  {
    "path": "vm/src/from_squeak/unix/npsqueak/include/npupp.h",
    "content": "/* -*- Mode: C; tab-width: 4; -*- */\n/*\n *  npupp.h $Revision: 1.3 $\n *  function call mecahnics needed by platform specific glue code.\n */\n\n\n#ifndef _NPUPP_H_\n#define _NPUPP_H_\n\n#ifndef GENERATINGCFM\n#define GENERATINGCFM 0\n#endif\n\n#ifndef _NPAPI_H_\n#include \"npapi.h\"\n#endif\n\n#include \"jri.h\"\n\n/******************************************************************************************\n   plug-in function table macros\n \t        for each function in and out of the plugin API we define\n                    typedef NPP_FooUPP\n\t\t\t\t\t#define NewNPP_FooProc\n\t\t\t\t\t#define CallNPP_FooProc\n\t\t\tfor mac, define the UPP magic for PPC/68K calling\n *******************************************************************************************/\n\n\n/* NPP_Initialize */\n\n#if GENERATINGCFM\ntypedef UniversalProcPtr NPP_InitializeUPP;\n\nenum {\n\tuppNPP_InitializeProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(0))\t\t\n\t\t| RESULT_SIZE(SIZE_CODE(0))\n};\n\n#define NewNPP_InitializeProc(FUNC)\t\t\\\n\t\t(NPP_InitializeUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_InitializeProcInfo, GetCurrentArchitecture())\n#define CallNPP_InitializeProc(FUNC)\t\t\\\n\t\t(void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_InitializeProcInfo)\n\t\t\n#else\n\ntypedef void (*NPP_InitializeUPP)(void);\n#define NewNPP_InitializeProc(FUNC)\t\t\\\n\t\t((NPP_InitializeUPP) (FUNC))\n#define CallNPP_InitializeProc(FUNC)\t\t\\\n\t\t(*(FUNC))()\n\n#endif\n\n\n/* NPP_Shutdown */\n\n#if GENERATINGCFM\ntypedef UniversalProcPtr NPP_ShutdownUPP;\n\nenum {\n\tuppNPP_ShutdownProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(0))\t\t\n\t\t| RESULT_SIZE(SIZE_CODE(0))\n};\n\n#define NewNPP_ShutdownProc(FUNC)\t\t\\\n\t\t(NPP_ShutdownUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_ShutdownProcInfo, GetCurrentArchitecture())\n#define CallNPP_ShutdownProc(FUNC)\t\t\\\n\t\t(void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_ShutdownProcInfo)\n\t\t\n#else\n\ntypedef void (*NPP_ShutdownUPP)(void);\n#define NewNPP_ShutdownProc(FUNC)\t\t\\\n\t\t((NPP_ShutdownUPP) (FUNC))\n#define CallNPP_ShutdownProc(FUNC)\t\t\\\n\t\t(*(FUNC))()\n\n#endif\n\n\n/* NPP_New */\n\n#if GENERATINGCFM\ntypedef UniversalProcPtr NPP_NewUPP;\n\nenum {\n\tuppNPP_NewProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPMIMEType)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(uint16)))\n\t\t| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(int16)))\n\t\t| STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(char **)))\n\t\t| STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(char **)))\n\t\t| STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(NPSavedData *)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))\n};\n\n#define NewNPP_NewProc(FUNC)\t\t\\\n\t\t(NPP_NewUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_NewProcInfo, GetCurrentArchitecture())\n#define CallNPP_NewProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \\\n\t\t(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_NewProcInfo, \\\n\t\t\t\t\t\t\t\t   (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7))\n#else\n\ntypedef NPError\t(*NPP_NewUPP)(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved);\n#define NewNPP_NewProc(FUNC)\t\t\\\n\t\t((NPP_NewUPP) (FUNC))\n#define CallNPP_NewProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7)\t\t\\\n\t\t(*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7))\n\n#endif\n\n\n/* NPP_Destroy */\n\n#if GENERATINGCFM\n\ntypedef UniversalProcPtr NPP_DestroyUPP;\nenum {\n\tuppNPP_DestroyProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPSavedData **)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))\n};\n#define NewNPP_DestroyProc(FUNC)\t\t\\\n\t\t(NPP_DestroyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_DestroyProcInfo, GetCurrentArchitecture())\n#define CallNPP_DestroyProc(FUNC, ARG1, ARG2)\t\t\\\n\t\t(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_DestroyProcInfo, (ARG1), (ARG2))\n#else\n\ntypedef NPError\t(*NPP_DestroyUPP)(NPP instance, NPSavedData** save);\n#define NewNPP_DestroyProc(FUNC)\t\t\\\n\t\t((NPP_DestroyUPP) (FUNC))\n#define CallNPP_DestroyProc(FUNC, ARG1, ARG2)\t\t\\\n\t\t(*(FUNC))((ARG1), (ARG2))\n\n#endif\n\n\n/* NPP_SetWindow */\n\n#if GENERATINGCFM\n\ntypedef UniversalProcPtr NPP_SetWindowUPP;\nenum {\n\tuppNPP_SetWindowProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPWindow *)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))\n};\n#define NewNPP_SetWindowProc(FUNC)\t\t\\\n\t\t(NPP_SetWindowUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_SetWindowProcInfo, GetCurrentArchitecture())\n#define CallNPP_SetWindowProc(FUNC, ARG1, ARG2)\t\t\\\n\t\t(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_SetWindowProcInfo, (ARG1), (ARG2))\n\n#else\n\ntypedef NPError\t(*NPP_SetWindowUPP)(NPP instance, NPWindow* window);\n#define NewNPP_SetWindowProc(FUNC)\t\t\\\n\t\t((NPP_SetWindowUPP) (FUNC))\n#define CallNPP_SetWindowProc(FUNC, ARG1, ARG2)\t\t\\\n\t\t(*(FUNC))((ARG1), (ARG2))\n\n#endif\n\n\n/* NPP_NewStream */\n\n#if GENERATINGCFM\n\ntypedef UniversalProcPtr NPP_NewStreamUPP;\nenum {\n\tuppNPP_NewStreamProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPMIMEType)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPStream *)))\n\t\t| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(NPBool)))\n\t\t| STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(uint16 *)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))\n};\n#define NewNPP_NewStreamProc(FUNC)\t\t\\\n\t\t(NPP_NewStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_NewStreamProcInfo, GetCurrentArchitecture())\n#define CallNPP_NewStreamProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5)\t\t\\\n\t\t(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_NewStreamProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5))\n#else\n\ntypedef NPError\t(*NPP_NewStreamUPP)(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype);\n#define NewNPP_NewStreamProc(FUNC)\t\t\\\n\t\t((NPP_NewStreamUPP) (FUNC))\n#define CallNPP_NewStreamProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \\\n\t\t(*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5))\n#endif\n\n\n/* NPP_DestroyStream */\n\n#if GENERATINGCFM\n\ntypedef UniversalProcPtr NPP_DestroyStreamUPP;\nenum {\n\tuppNPP_DestroyStreamProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPReason)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))\n};\n#define NewNPP_DestroyStreamProc(FUNC)\t\t\\\n\t\t(NPP_DestroyStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_DestroyStreamProcInfo, GetCurrentArchitecture())\n#define CallNPP_DestroyStreamProc(FUNC,  NPParg, NPStreamPtr, NPReasonArg)\t\t\\\n\t\t(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_DestroyStreamProcInfo, (NPParg), (NPStreamPtr), (NPReasonArg))\n\n#else\n\ntypedef NPError\t(*NPP_DestroyStreamUPP)(NPP instance, NPStream* stream, NPReason reason);\n#define NewNPP_DestroyStreamProc(FUNC)\t\t\\\n\t\t((NPP_DestroyStreamUPP) (FUNC))\n#define CallNPP_DestroyStreamProc(FUNC,  NPParg, NPStreamPtr, NPReasonArg)\t\t\\\n\t\t(*(FUNC))((NPParg), (NPStreamPtr), (NPReasonArg))\n\n#endif\n\n\n/* NPP_WriteReady */\n\n#if GENERATINGCFM\n\ntypedef UniversalProcPtr NPP_WriteReadyUPP;\nenum {\n\tuppNPP_WriteReadyProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(int32)))\n};\n#define NewNPP_WriteReadyProc(FUNC)\t\t\\\n\t\t(NPP_WriteReadyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_WriteReadyProcInfo, GetCurrentArchitecture())\n#define CallNPP_WriteReadyProc(FUNC,  NPParg, NPStreamPtr)\t\t\\\n\t\t(int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_WriteReadyProcInfo, (NPParg), (NPStreamPtr))\n\n#else\n\ntypedef int32 (*NPP_WriteReadyUPP)(NPP instance, NPStream* stream);\n#define NewNPP_WriteReadyProc(FUNC)\t\t\\\n\t\t((NPP_WriteReadyUPP) (FUNC))\n#define CallNPP_WriteReadyProc(FUNC,  NPParg, NPStreamPtr)\t\t\\\n\t\t(*(FUNC))((NPParg), (NPStreamPtr))\n\n#endif\n\n\n/* NPP_Write */\n\n#if GENERATINGCFM\n\ntypedef UniversalProcPtr NPP_WriteUPP;\nenum {\n\tuppNPP_WriteProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(int32)))\n\t\t| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(int32)))\n\t\t| STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(void*)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(int32)))\n};\n#define NewNPP_WriteProc(FUNC)\t\t\\\n\t\t(NPP_WriteUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_WriteProcInfo, GetCurrentArchitecture())\n#define CallNPP_WriteProc(FUNC,  NPParg, NPStreamPtr, offsetArg, lenArg, bufferPtr)\t\t\\\n\t\t(int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_WriteProcInfo, (NPParg), (NPStreamPtr), (offsetArg), (lenArg), (bufferPtr))\n\n#else\n\ntypedef int32 (*NPP_WriteUPP)(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer);\n#define NewNPP_WriteProc(FUNC)\t\t\\\n\t\t((NPP_WriteUPP) (FUNC))\n#define CallNPP_WriteProc(FUNC,  NPParg, NPStreamPtr, offsetArg, lenArg, bufferPtr)\t\t\\\n\t\t(*(FUNC))((NPParg), (NPStreamPtr), (offsetArg), (lenArg), (bufferPtr))\n\n#endif\n\n\n/* NPP_StreamAsFile */\n\n#if GENERATINGCFM\n\ntypedef UniversalProcPtr NPP_StreamAsFileUPP;\nenum {\n\tuppNPP_StreamAsFileProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char *)))\n\t\t| RESULT_SIZE(SIZE_CODE(0))\n};\n#define NewNPP_StreamAsFileProc(FUNC)\t\t\\\n\t\t(NPP_StreamAsFileUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_StreamAsFileProcInfo, GetCurrentArchitecture())\n#define CallNPP_StreamAsFileProc(FUNC, ARG1, ARG2, ARG3)\t\t\\\n\t\t(void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_StreamAsFileProcInfo, (ARG1), (ARG2), (ARG3))\n\n#else\n\ntypedef void (*NPP_StreamAsFileUPP)(NPP instance, NPStream* stream, const char* fname);\n#define NewNPP_StreamAsFileProc(FUNC)\t\t\\\n\t\t((NPP_StreamAsFileUPP) (FUNC))\n#define CallNPP_StreamAsFileProc(FUNC,  ARG1, ARG2, ARG3)\t\t\\\n\t\t(*(FUNC))((ARG1), (ARG2), (ARG3))\n#endif\n\n\n/* NPP_Print */\n\n#if GENERATINGCFM\n\ntypedef UniversalProcPtr NPP_PrintUPP;\nenum {\n\tuppNPP_PrintProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPrint *)))\n\t\t| RESULT_SIZE(SIZE_CODE(0))\n};\n#define NewNPP_PrintProc(FUNC)\t\t\\\n\t\t(NPP_PrintUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_PrintProcInfo, GetCurrentArchitecture())\n#define CallNPP_PrintProc(FUNC,  NPParg, voidPtr)\t\t\\\n\t\t(void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_PrintProcInfo, (NPParg), (voidPtr))\n\n#else\n\ntypedef void (*NPP_PrintUPP)(NPP instance, NPPrint* platformPrint);\n#define NewNPP_PrintProc(FUNC)\t\t\\\n\t\t((NPP_PrintUPP) (FUNC))\n#define CallNPP_PrintProc(FUNC,  NPParg, NPPrintArg)\t\t\\\n\t\t(*(FUNC))((NPParg), (NPPrintArg))\n\n#endif\n\n\n/* NPP_HandleEvent */\n\n#if GENERATINGCFM\n\ntypedef UniversalProcPtr NPP_HandleEventUPP;\nenum {\n\tuppNPP_HandleEventProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void *)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(int16)))\n};\n#define NewNPP_HandleEventProc(FUNC)\t\t\\\n\t\t(NPP_HandleEventUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_HandleEventProcInfo, GetCurrentArchitecture())\n#define CallNPP_HandleEventProc(FUNC,  NPParg, voidPtr)\t\t\\\n\t\t(int16)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_HandleEventProcInfo, (NPParg), (voidPtr))\n\n#else\n\ntypedef int16 (*NPP_HandleEventUPP)(NPP instance, void* event);\n#define NewNPP_HandleEventProc(FUNC)\t\t\\\n\t\t((NPP_HandleEventUPP) (FUNC))\n#define CallNPP_HandleEventProc(FUNC,  NPParg, voidPtr)\t\t\\\n\t\t(*(FUNC))((NPParg), (voidPtr))\n\n#endif\n\n\n/* NPP_URLNotify */\n\n#if GENERATINGCFM\n\ntypedef UniversalProcPtr NPP_URLNotifyUPP;\nenum {\n\tuppNPP_URLNotifyProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPReason)))\n\t\t| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void*)))\n\t\t| RESULT_SIZE(SIZE_CODE(SIZE_CODE(0)))\n};\n#define NewNPP_URLNotifyProc(FUNC)\t\t\\\n\t\t(NPP_URLNotifyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_URLNotifyProcInfo, GetCurrentArchitecture())\n#define CallNPP_URLNotifyProc(FUNC,  ARG1, ARG2, ARG3, ARG4)\t\t\\\n\t\t(void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_URLNotifyProcInfo, (ARG1), (ARG2), (ARG3), (ARG4))\n\n#else\n\ntypedef void (*NPP_URLNotifyUPP)(NPP instance, const char* url, NPReason reason, void* notifyData);\n#define NewNPP_URLNotifyProc(FUNC)\t\t\\\n\t\t((NPP_URLNotifyUPP) (FUNC))\n#define CallNPP_URLNotifyProc(FUNC,  ARG1, ARG2, ARG3, ARG4)\t\t\\\n\t\t(*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4))\n\n#endif\n\n\n\n\n/*\n *  Netscape entry points\n */\n\n#ifdef XP_UNIX\n\n/* NPN_GetValue */\n\n#if GENERATINGCFM\n\ntypedef UniversalProcPtr NPN_GetValueUPP;\nenum {\n\tuppNPN_GetValueProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPNVariable)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void *)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))\n};\n#define NewNPN_GetValueProc(FUNC)\t\t\\\n\t\t(NPN_GetValueUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetValueProcInfo, GetCurrentArchitecture())\n#define CallNPN_GetURNotifyLProc(FUNC, ARG1, ARG2, ARG3) \\\n\t\t(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetValueProcInfo, (ARG1), (ARG2), (ARG3))\n#else\n\ntypedef NPError\t(*NPN_GetValueUPP)(NPP instance, NPNVariable variable, void *ret_alue);\n#define NewNPN_GetValueProc(FUNC)\t\t\\\n\t\t((NPN_GetValueUPP) (FUNC))\n#define CallNPN_GetValueProc(FUNC, ARG1, ARG2, ARG3)\t\t\\\n\t\t(*(FUNC))((ARG1), (ARG2), (ARG3))\n#endif\n\n#endif /* XP_UNIX */\n\n\n\n/* NPN_GetUrlNotify */\n\n#if GENERATINGCFM\n\ntypedef UniversalProcPtr NPN_GetURLNotifyUPP;\nenum {\n\tuppNPN_GetURLNotifyProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*)))\n\t\t| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void*)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))\n};\n#define NewNPN_GetURLNotifyProc(FUNC)\t\t\\\n\t\t(NPN_GetURLNotifyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetURLNotifyProcInfo, GetCurrentArchitecture())\n#define CallNPN_GetURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \\\n\t\t(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetURLNotifyProcInfo, (ARG1), (ARG2), (ARG3), (ARG4))\n#else\n\ntypedef NPError\t(*NPN_GetURLNotifyUPP)(NPP instance, const char* url, const char* window, void* notifyData);\n#define NewNPN_GetURLNotifyProc(FUNC)\t\t\\\n\t\t((NPN_GetURLNotifyUPP) (FUNC))\n#define CallNPN_GetURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4)\t\t\\\n\t\t(*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4))\n#endif\n\n\n/* NPN_PostUrlNotify */\n\n#if GENERATINGCFM\n\ntypedef UniversalProcPtr NPN_PostURLNotifyUPP;\nenum {\n\tuppNPN_PostURLNotifyProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*)))\n\t\t| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(uint32)))\n\t\t| STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(const char*)))\n\t\t| STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(NPBool)))\n\t\t| STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(void*)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))\n};\n#define NewNPN_PostURLNotifyProc(FUNC)\t\t\\\n\t\t(NPN_PostURLNotifyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_PostURLNotifyProcInfo, GetCurrentArchitecture())\n#define CallNPN_PostURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \\\n\t\t(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_PostURLNotifyProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7))\n#else\n\ntypedef NPError (*NPN_PostURLNotifyUPP)(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file, void* notifyData);\n#define NewNPN_PostURLNotifyProc(FUNC)\t\t\\\n\t\t((NPN_PostURLNotifyUPP) (FUNC))\n#define CallNPN_PostURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \\\n\t\t(*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7))\n#endif\n\n\n/* NPN_GetUrl */\n\n#if GENERATINGCFM\n\ntypedef UniversalProcPtr NPN_GetURLUPP;\nenum {\n\tuppNPN_GetURLProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))\n};\n#define NewNPN_GetURLProc(FUNC)\t\t\\\n\t\t(NPN_GetURLUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetURLProcInfo, GetCurrentArchitecture())\n#define CallNPN_GetURLProc(FUNC, ARG1, ARG2, ARG3) \\\n\t\t(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetURLProcInfo, (ARG1), (ARG2), (ARG3))\n#else\n\ntypedef NPError\t(*NPN_GetURLUPP)(NPP instance, const char* url, const char* window);\n#define NewNPN_GetURLProc(FUNC)\t\t\\\n\t\t((NPN_GetURLUPP) (FUNC))\n#define CallNPN_GetURLProc(FUNC, ARG1, ARG2, ARG3)\t\t\\\n\t\t(*(FUNC))((ARG1), (ARG2), (ARG3))\n#endif\n\n\n/* NPN_PostUrl */\n\n#if GENERATINGCFM\n\ntypedef UniversalProcPtr NPN_PostURLUPP;\nenum {\n\tuppNPN_PostURLProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*)))\n\t\t| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(uint32)))\n\t\t| STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(const char*)))\n\t\t| STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(NPBool)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))\n};\n#define NewNPN_PostURLProc(FUNC)\t\t\\\n\t\t(NPN_PostURLUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_PostURLProcInfo, GetCurrentArchitecture())\n#define CallNPN_PostURLProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \\\n\t\t(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_PostURLProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6))\n#else\n\ntypedef NPError (*NPN_PostURLUPP)(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file);\n#define NewNPN_PostURLProc(FUNC)\t\t\\\n\t\t((NPN_PostURLUPP) (FUNC))\n#define CallNPN_PostURLProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \\\n\t\t(*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6))\n#endif\n\n\n/* NPN_RequestRead */\n\n#if GENERATINGCFM\n\ntypedef UniversalProcPtr NPN_RequestReadUPP;\nenum {\n\tuppNPN_RequestReadProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPStream *)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPByteRange *)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))\n};\n#define NewNPN_RequestReadProc(FUNC)\t\t\\\n\t\t(NPN_RequestReadUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_RequestReadProcInfo, GetCurrentArchitecture())\n#define CallNPN_RequestReadProc(FUNC,  stream, range)\t\t\\\n\t\t(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_RequestReadProcInfo, (stream), (range))\n\n#else\n\ntypedef NPError\t(*NPN_RequestReadUPP)(NPStream* stream, NPByteRange* rangeList);\n#define NewNPN_RequestReadProc(FUNC)\t\t\\\n\t\t((NPN_RequestReadUPP) (FUNC))\n#define CallNPN_RequestReadProc(FUNC, stream, range)\t\t\\\n\t\t(*(FUNC))((stream), (range))\n\n#endif\n\n\n/* NPN_NewStream */\n\n#if GENERATINGCFM\n\ntypedef UniversalProcPtr NPN_NewStreamUPP;\nenum {\n\tuppNPN_NewStreamProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPMIMEType)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char *)))\n\t\t| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(NPStream **)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))\n};\n#define NewNPN_NewStreamProc(FUNC)\t\t\\\n\t\t(NPN_NewStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_NewStreamProcInfo, GetCurrentArchitecture())\n#define CallNPN_NewStreamProc(FUNC, npp, type, window, stream)\t\t\\\n\t\t(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_NewStreamProcInfo, (npp), (type), (window), (stream))\t\n\n#else\n\ntypedef NPError\t(*NPN_NewStreamUPP)(NPP instance, NPMIMEType type, const char* window, NPStream** stream);\n#define NewNPN_NewStreamProc(FUNC)\t\t\\\n\t\t((NPN_NewStreamUPP) (FUNC))\n#define CallNPN_NewStreamProc(FUNC, npp, type, window, stream)\t\t\\\n\t\t(*(FUNC))((npp), (type), (window), (stream))\n\n#endif\n\n\n/* NPN_Write */\n\n#if GENERATINGCFM\n\ntypedef UniversalProcPtr NPN_WriteUPP;\nenum {\n\tuppNPN_WriteProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(int32)))\n\t\t| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void*)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(int32)))\n};\n#define NewNPN_WriteProc(FUNC)\t\t\\\n\t\t(NPN_WriteUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_WriteProcInfo, GetCurrentArchitecture())\n#define CallNPN_WriteProc(FUNC, npp, stream, len, buffer)\t\t\\\n\t\t(int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_WriteProcInfo, (npp), (stream), (len), (buffer))\t\n\n#else\n\ntypedef int32 (*NPN_WriteUPP)(NPP instance, NPStream* stream, int32 len, void* buffer);\n#define NewNPN_WriteProc(FUNC)\t\t\\\n\t\t((NPN_WriteUPP) (FUNC))\n#define CallNPN_WriteProc(FUNC, npp, stream, len, buffer)\t\t\\\n\t\t(*(FUNC))((npp), (stream), (len), (buffer))\n\n#endif\n\n\n/* NPN_DestroyStream */\n\n#if GENERATINGCFM\n\ntypedef UniversalProcPtr NPN_DestroyStreamUPP;\nenum {\n\tuppNPN_DestroyStreamProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP )))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPReason)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))\n};\n#define NewNPN_DestroyStreamProc(FUNC)\t\t\\\n\t\t(NPN_DestroyStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_DestroyStreamProcInfo, GetCurrentArchitecture())\n#define CallNPN_DestroyStreamProc(FUNC, npp, stream, reason)\t\t\\\n\t\t(NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_DestroyStreamProcInfo, (npp), (stream), (reason))\t\n\n#else\n\ntypedef NPError (*NPN_DestroyStreamUPP)(NPP instance, NPStream* stream, NPReason reason);\n#define NewNPN_DestroyStreamProc(FUNC)\t\t\\\n\t\t((NPN_DestroyStreamUPP) (FUNC))\n#define CallNPN_DestroyStreamProc(FUNC, npp, stream, reason)\t\t\\\n\t\t(*(FUNC))((npp), (stream), (reason))\n\n#endif\n\n\n/* NPN_Status */\n\n#if GENERATINGCFM\n\ntypedef UniversalProcPtr NPN_StatusUPP;\nenum {\n\tuppNPN_StatusProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(char *)))\n};\n\n#define NewNPN_StatusProc(FUNC)\t\t\\\n\t\t(NPN_StatusUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_StatusProcInfo, GetCurrentArchitecture())\n#define CallNPN_StatusProc(FUNC, npp, msg)\t\t\\\n\t\t(void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_StatusProcInfo, (npp), (msg))\t\n\n#else\n\ntypedef void (*NPN_StatusUPP)(NPP instance, const char* message);\n#define NewNPN_StatusProc(FUNC)\t\t\\\n\t\t((NPN_StatusUPP) (FUNC))\n#define CallNPN_StatusProc(FUNC, npp, msg)\t\t\\\n\t\t(*(FUNC))((npp), (msg))\t\n\n#endif\n\n\n/* NPN_UserAgent */\n#if GENERATINGCFM\n\ntypedef UniversalProcPtr NPN_UserAgentUPP;\nenum {\n        uppNPN_UserAgentProcInfo = kThinkCStackBased\n                | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n                | RESULT_SIZE(SIZE_CODE(sizeof(const char *)))\n};\n\n#define NewNPN_UserAgentProc(FUNC)              \\\n                (NPN_UserAgentUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_UserAgentProcInfo, GetCurrentArchitecture())\n#define CallNPN_UserAgentProc(FUNC, ARG1)               \\\n                (const char*)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_UserAgentProcInfo, (ARG1))\n\n#else\n\ntypedef const char*\t(*NPN_UserAgentUPP)(NPP instance);\n#define NewNPN_UserAgentProc(FUNC)              \\\n                ((NPN_UserAgentUPP) (FUNC))\n#define CallNPN_UserAgentProc(FUNC, ARG1)               \\\n                (*(FUNC))((ARG1))\n\n#endif\n\n\n/* NPN_MemAlloc */\n#if GENERATINGCFM\n\ntypedef UniversalProcPtr NPN_MemAllocUPP;\nenum {\n\tuppNPN_MemAllocProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(uint32)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(void *)))\n};\n\n#define NewNPN_MemAllocProc(FUNC)\t\t\\\n\t\t(NPN_MemAllocUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemAllocProcInfo, GetCurrentArchitecture())\n#define CallNPN_MemAllocProc(FUNC, ARG1)\t\t\\\n\t\t(void*)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemAllocProcInfo, (ARG1))\t\n\n#else\n\ntypedef void* (*NPN_MemAllocUPP)(uint32 size);\n#define NewNPN_MemAllocProc(FUNC)\t\t\\\n\t\t((NPN_MemAllocUPP) (FUNC))\n#define CallNPN_MemAllocProc(FUNC, ARG1)\t\t\\\n\t\t(*(FUNC))((ARG1))\t\n\n#endif\n\n\n/* NPN__MemFree */\n\n#if GENERATINGCFM\n\ntypedef UniversalProcPtr NPN_MemFreeUPP;\nenum {\n\tuppNPN_MemFreeProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(void *)))\n};\n\n#define NewNPN_MemFreeProc(FUNC)\t\t\\\n\t\t(NPN_MemFreeUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemFreeProcInfo, GetCurrentArchitecture())\n#define CallNPN_MemFreeProc(FUNC, ARG1)\t\t\\\n\t\t(void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemFreeProcInfo, (ARG1))\n\n#else\n\ntypedef void (*NPN_MemFreeUPP)(void* ptr);\n#define NewNPN_MemFreeProc(FUNC)\t\t\\\n\t\t((NPN_MemFreeUPP) (FUNC))\n#define CallNPN_MemFreeProc(FUNC, ARG1)\t\t\\\n\t\t(*(FUNC))((ARG1))\t\n\n#endif\n\n\n/* NPN_MemFlush */\n\n#if GENERATINGCFM\n\ntypedef UniversalProcPtr NPN_MemFlushUPP;\nenum {\n\tuppNPN_MemFlushProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(uint32)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(uint32)))\n};\n\n#define NewNPN_MemFlushProc(FUNC)\t\t\\\n\t\t(NPN_MemFlushUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemFlushProcInfo, GetCurrentArchitecture())\n#define CallNPN_MemFlushProc(FUNC, ARG1)\t\t\\\n\t\t(uint32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemFlushProcInfo, (ARG1))\t\n\n#else\n\ntypedef uint32 (*NPN_MemFlushUPP)(uint32 size);\n#define NewNPN_MemFlushProc(FUNC)\t\t\\\n\t\t((NPN_MemFlushUPP) (FUNC))\n#define CallNPN_MemFlushProc(FUNC, ARG1)\t\t\\\n\t\t(*(FUNC))((ARG1))\t\n\n#endif\n\n\n\n/* NPN_ReloadPlugins */\n\n#if GENERATINGCFM\n\ntypedef UniversalProcPtr NPN_ReloadPluginsUPP;\nenum {\n\tuppNPN_ReloadPluginsProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPBool)))\n\t\t| RESULT_SIZE(SIZE_CODE(0))\n};\n\n#define NewNPN_ReloadPluginsProc(FUNC)\t\t\\\n\t\t(NPN_ReloadPluginsUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_ReloadPluginsProcInfo, GetCurrentArchitecture())\n#define CallNPN_ReloadPluginsProc(FUNC, ARG1)\t\t\\\n\t\t(void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_ReloadPluginsProcInfo, (ARG1))\t\n\n#else\n\ntypedef void (*NPN_ReloadPluginsUPP)(NPBool reloadPages);\n#define NewNPN_ReloadPluginsProc(FUNC)\t\t\\\n\t\t((NPN_ReloadPluginsUPP) (FUNC))\n#define CallNPN_ReloadPluginsProc(FUNC, ARG1)\t\t\\\n\t\t(*(FUNC))((ARG1))\t\n\n#endif\n\n\n/* NPN_GetJavaEnv */\n\n#if GENERATINGCFM\n\ntypedef UniversalProcPtr NPN_GetJavaEnvUPP;\nenum {\n\tuppNPN_GetJavaEnvProcInfo = kThinkCStackBased\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(JRIEnv*)))\n};\n\n#define NewNPN_GetJavaEnvProc(FUNC)\t\t\\\n\t\t(NPN_GetJavaEnvUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetJavaEnvProcInfo, GetCurrentArchitecture())\n#define CallNPN_GetJavaEnvProc(FUNC)\t\t\\\n\t\t(JRIEnv*)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetJavaEnvProcInfo)\t\n\n#else\n\ntypedef JRIEnv* (*NPN_GetJavaEnvUPP)(void);\n#define NewNPN_GetJavaEnvProc(FUNC)\t\t\\\n\t\t((NPN_GetJavaEnvUPP) (FUNC))\n#define CallNPN_GetJavaEnvProc(FUNC)\t\t\\\n\t\t(*(FUNC))()\t\n\n#endif\n\n\n/* NPN_GetJavaPeer */\n\n#if GENERATINGCFM\n\ntypedef UniversalProcPtr NPN_GetJavaPeerUPP;\nenum {\n\tuppNPN_GetJavaPeerProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(jref)))\n};\n\n#define NewNPN_GetJavaPeerProc(FUNC)\t\t\\\n\t\t(NPN_GetJavaPeerUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetJavaPeerProcInfo, GetCurrentArchitecture())\n#define CallNPN_GetJavaPeerProc(FUNC, ARG1)\t\t\\\n\t\t(jref)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetJavaPeerProcInfo, (ARG1))\t\n\n#else\n\ntypedef jref (*NPN_GetJavaPeerUPP)(NPP instance);\n#define NewNPN_GetJavaPeerProc(FUNC)\t\t\\\n\t\t((NPN_GetJavaPeerUPP) (FUNC))\n#define CallNPN_GetJavaPeerProc(FUNC, ARG1)\t\t\\\n\t\t(*(FUNC))((ARG1))\t\n\n#endif\n\n\n\n\n/******************************************************************************************\n * The actual plugin function table definitions\n *******************************************************************************************/\n\ntypedef struct _NPPluginFuncs {\n    uint16 size;\n    uint16 version;\n    NPP_NewUPP newp;\n    NPP_DestroyUPP destroy;\n    NPP_SetWindowUPP setwindow;\n    NPP_NewStreamUPP newstream;\n    NPP_DestroyStreamUPP destroystream;\n    NPP_StreamAsFileUPP asfile;\n    NPP_WriteReadyUPP writeready;\n    NPP_WriteUPP write;\n    NPP_PrintUPP print;\n    NPP_HandleEventUPP event;\n    NPP_URLNotifyUPP urlnotify;\n    JRIGlobalRef javaClass;\n} NPPluginFuncs;\n\ntypedef struct _NPNetscapeFuncs {\n    uint16 size;\n    uint16 version;\n    NPN_GetURLUPP geturl;\n    NPN_PostURLUPP posturl;\n    NPN_RequestReadUPP requestread;\n    NPN_NewStreamUPP newstream;\n    NPN_WriteUPP write;\n    NPN_DestroyStreamUPP destroystream;\n    NPN_StatusUPP status;\n    NPN_UserAgentUPP uagent;\n    NPN_MemAllocUPP memalloc;\n    NPN_MemFreeUPP memfree;\n    NPN_MemFlushUPP memflush;\n    NPN_ReloadPluginsUPP reloadplugins;\n    NPN_GetJavaEnvUPP getJavaEnv;\n    NPN_GetJavaPeerUPP getJavaPeer;\n    NPN_GetURLNotifyUPP geturlnotify;\n    NPN_PostURLNotifyUPP posturlnotify;\n#ifdef XP_UNIX\n    NPN_GetValueUPP getvalue;\n#endif /* XP_UNIX */\n} NPNetscapeFuncs;\n\n\n\n#ifdef XP_MAC\n/******************************************************************************************\n * Mac platform-specific plugin glue stuff\n *******************************************************************************************/\n\n/*\n * Main entry point of the plugin.\n * This routine will be called when the plugin is loaded. The function\n * tables are passed in and the plugin fills in the NPPluginFuncs table\n * and NPPShutdownUPP for Netscape's use.\n */\n\n#if GENERATINGCFM\n\ntypedef UniversalProcPtr NPP_MainEntryUPP;\nenum {\n\tuppNPP_MainEntryProcInfo = kThinkCStackBased\n\t\t| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPNetscapeFuncs*)))\n\t\t| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPluginFuncs*)))\n\t\t| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPP_ShutdownUPP*)))\n\t\t| RESULT_SIZE(SIZE_CODE(sizeof(NPError)))\n};\n#define NewNPP_MainEntryProc(FUNC)\t\t\\\n\t\t(NPP_MainEntryUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_MainEntryProcInfo, GetCurrentArchitecture())\n#define CallNPP_MainEntryProc(FUNC,  netscapeFunc, pluginFunc, shutdownUPP)\t\t\\\n\t\tCallUniversalProc((UniversalProcPtr)(FUNC), (ProcInfoType)uppNPP_MainEntryProcInfo, (netscapeFunc), (pluginFunc), (shutdownUPP))\n\n#else\n\ntypedef NPError (*NPP_MainEntryUPP)(NPNetscapeFuncs*, NPPluginFuncs*, NPP_ShutdownUPP*);\n#define NewNPP_MainEntryProc(FUNC)\t\t\\\n\t\t((NPP_MainEntryUPP) (FUNC))\n#define CallNPP_MainEntryProc(FUNC,  netscapeFunc, pluginFunc, shutdownUPP)\t\t\\\n\t\t(*(FUNC))((netscapeFunc), (pluginFunc), (shutdownUPP))\n\n#endif\n#endif /* MAC */\n\n\n#ifdef _WINDOWS\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* plugin meta member functions */\n\nNPError WINAPI NP_GetEntryPoints(NPPluginFuncs* pFuncs);\n\nNPError WINAPI NP_Initialize(NPNetscapeFuncs* pFuncs);\n\nNPError WINAPI NP_Shutdown();\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* _WINDOWS */\n\n#ifdef XP_UNIX\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* plugin meta member functions */\n\nchar*\tNP_GetMIMEDescription(void);\nNPError\tNP_Initialize(NPNetscapeFuncs*, NPPluginFuncs*);\nNPError\tNP_Shutdown(void);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* XP_UNIX */\n\n#endif /* _NPUPP_H_ */\n"
  },
  {
    "path": "vm/src/from_squeak/unix/npsqueak/npsqueak.c",
    "content": "/* -*- Mode: C; tab-width: 8; -*-\n *\n * Browser Plugin for Squeak on Unix platforms\n * \n * Author:  Bert Freudenberg\n *\n * Last edited: 2005-03-17 12:15:48 by piumarta on squeak.hpl.hp.com\n *\n * History:\n *          Jan 2005 - looking for image and npsqueakrun in system and home dir\n *                     kill squeak window when destroyed\n *          Apr 2004 - (ikp) handle imageName and failureUrl tags\n *          Oct 2002 - system-wide install\n *          Sep 2002 - create hard links for streamed files\n *          Mar 2002 - moved to ~/.npsqueak dir\n *          Nov 2000 - browserPipes interface replaces X events\n *          Apr 2000 - url requests through browser\n *          Nov 1999 - report attributes to vm\n *          Aug 99   - initial version \n */\n\n#define XP_UNIX\n#include <npapi.h>\n\n#include <stdio.h>\n#include <unistd.h>\n#include <limits.h>\n#include <signal.h>\n#include <string.h>\n#include <fcntl.h>\n#include <errno.h>\n#include <sys/stat.h>\n#include <X11/Xlib.h>\n#include <X11/Intrinsic.h>\n#include <X11/StringDefs.h>\n\n#undef DEBUG \n\n#if defined (DEBUG)\nstatic void DPRINT(char *format, ...)\n{\n  static int debug= 42;\n  \n  if (42 == debug) \n    debug= (NULL != getenv(\"NPSQUEAK_DEBUG\"));\n  \n  if (!debug) \n    {\n      return;\n    }\n  else\n    {\n      static FILE *file= 0;\n      if (!file) \n\t{\n\t  file= fopen(\"/tmp/npsqueak.log\", \"a+\");\n\t  fprintf(file, \"=== START PLUGIN ===\\n\");\n\t}\n\n      {\n\tva_list ap;\n\tva_start(ap, format);\n\tvfprintf(file, format, ap);\n\tva_end(ap);\n\tfflush(file);\n      }\n    }\n}\n#else\nstatic void DPRINT(char *format, ...) { }\n#endif\n\n/***********************************************************************\n * Plugin instance data\n ***********************************************************************/\n\n#define CMD_BROWSER_WINDOW 1\n#define CMD_GET_URL        2\n#define CMD_POST_URL       3\n#define CMD_RECEIVE_DATA   4\n\n#define MAX_STREAMS 128\n\n#define SQUEAK_READ  0\n#define PLUGIN_WRITE 1\n#define PLUGIN_READ  2\n#define SQUEAK_WRITE 3\n\n/* plugin state */\ntypedef struct SqueakPlugin {\n  NPP instance;                    /* plugin instance */\n  pid_t pid;                       /* the child process pid */\n  Display *display;\n  Window nswindow;                 /* the netscape window */\n  Window sqwindow;                 /* the Squeak window */\n  XtInputId input;                 /* handler for command pipe */\n  Bool embedded;                   /* false if we have the whole window */\n  char **argv;                     /* the commandline for Squeak vm */\n  int  argc;\n  char vmName[PATH_MAX];\n  char imageName[PATH_MAX];\n  int pipes[4];                    /* 4 ends of 2 pipes */\n  char* srcUrl;                    /* set by browser in first NewStream */\n  char* srcFilename;\n  int   srcId;                     /* if requested */\n  char *failureUrl;\n} SqueakPlugin;\n\n/* URL notify data */\ntypedef struct SqueakStream {\n  int id;                          /* request id (0 if finished)  */\n} SqueakStream;\n\n/***********************************************************************\n * Prototypes\n ***********************************************************************/\n\nstatic void DeliverFile(SqueakPlugin *, int id, const char* fname);\nstatic void SetWindow(SqueakPlugin*, Window window, int width, int height);\nstatic void SetUpWindow(SqueakPlugin*);\nstatic void SetUpSqueakWindow(SqueakPlugin*);\nstatic void Run(SqueakPlugin*);\nstatic void GetUrl(SqueakPlugin*);\nstatic void PostUrl(SqueakPlugin*);\nstatic void DestroyCallback(Widget widget, SqueakPlugin *, XtPointer calldata);\nstatic void InputCallback(SqueakPlugin *, int *source, XtInputId*);\n\nstatic char* NPN_StrDup(const char* s)\n{\n  return strcpy(NPN_MemAlloc(strlen(s) + 1), s);\n}\n\n\n/***********************************************************************\n * Plugin registration\n ***********************************************************************/\n\nchar*\nNPP_GetMIMEDescription(void)\n{\n  return(\"application/x-squeak-source:sts:Squeak source\"\n\t \";application/x-squeak-object:sqo:Squeak object\"\n\t \";application/x-squeak-project:pr:Squeak project\");\n}\n\nNPError\nNPP_GetValue(void *instance, NPPVariable variable, void *value)\n{\n  switch (variable) {\n  case NPPVpluginNameString:\n    *((char **)value)= \"Squeak\";\n    break;\n  case NPPVpluginDescriptionString:\n    *((char **)value) =\n      \"<a href=\\\"http://squeak.org/\\\">Squeak</a> is a modern open source\"\n      \" Smalltalk environment. The Squeak Plugin handles Squeaklets.<P>\"\n      \"The Squeak Plugin for Unix was developed by\"\n      \" <a href=\\\"mailto:bert@freudenbergs.de\\\">Bert Freudenberg</a>,\"\n      \" it uses the Squeak VM developed by\"\n      \" <a href=\\\"mailto:Ian.Piumarta@squeakland.org\\\">Ian Piumarta</a>\"\n      \" and others.\";\n    break;\n  default:\n    return NPERR_GENERIC_ERROR;\n  }\n  return NPERR_NO_ERROR;\n}\n\n\n\n/***********************************************************************\n * search filename in list of dirs and write path into result \n * returns 0 if filename not found  \n ***********************************************************************/ \n\nstatic char*\nfindFileInPaths(char* result, char *filename, int dirn, char *dirv[PATH_MAX]){\n  int i;\n  char path[PATH_MAX];\n\n  for(i= 0; i < dirn; i++){\n    DPRINT(\"NP: search \\\"%s\\\" in \\\"%s\\\" \\n\",filename,dirv[i]);\n\n    strcpy(path, dirv[i]);\n    strcat(path, filename); \n    if (access(path, R_OK) == 0){ \n      DPRINT(\"NP:  \\\"%s\\\" in \\\"%s\\\" found\\n\",filename,dirv[i]);\n      return strcpy(result, path);\n    }\n  }\n  DPRINT(\"NP: nothing found\\n\");\n  return 0;\n}\n\n\n/***********************************************************************\n * Plugin loading and termination\n ***********************************************************************/ \n\nstatic int\nIgnoreErrors(Display *display, XErrorEvent *evt)\n{\n  DPRINT(\"NP: X Error ignored.\\n\");\n  return 1;\n}\n\n\nNPError \nNPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc,\n\t\tchar* argn[], char* argv[], NPSavedData* saved)\n{\n  SqueakPlugin *plugin;\n\n  char imagename[PATH_MAX];\n  char *failureUrl= 0;\n\n  if (instance == NULL)\n    return NPERR_INVALID_INSTANCE_ERROR;\n  plugin= (SqueakPlugin*) NPN_MemAlloc(sizeof(SqueakPlugin));\n  if (!plugin)\n    return NPERR_OUT_OF_MEMORY_ERROR;\n  plugin->argv= (char**) NPN_MemAlloc(sizeof(char*) * (16 + 2 * argc));\n  if (!plugin->argv)\n    return NPERR_OUT_OF_MEMORY_ERROR;\n\n  /* Default settings */\n  strcpy(imagename, \"SqueakPlugin.image\"); \n\n  plugin->instance=    instance;\n  plugin->pid=         0;\n  plugin->nswindow=    0;\n  plugin->sqwindow=    0;\n  plugin->display=     NULL;\n  plugin->input=       0;\n  plugin->embedded=    (mode == NP_EMBED);\n  plugin->srcUrl=      NULL;\n  plugin->srcFilename= NULL;\n  plugin->srcId=       -1;\n  plugin->failureUrl=  0;\n  plugin->argv[0]=     NPN_StrDup(plugin->vmName);\n  plugin->argv[1]=     NPN_StrDup(\"-display\");\n  plugin->argv[2]=     NULL;             /* inserted later */\n  plugin->argv[3]=     NPN_StrDup(\"-browserPipes\");\n  plugin->argv[4]=     NULL;             /* inserted later */\n  plugin->argv[5]=     NULL;             /* inserted later */\n  plugin->argv[7]=     NPN_StrDup(\"\");   /* empty document file on cmdline! */ \n  plugin->argc=        8;\n\n  if (plugin->embedded) {\n    int i;\n    for (i= 0; i < argc; i++) {\n      if (!strcasecmp(argn[i], \"imagename\"))\n\t{\n\t  strcpy(imagename, argv[i]);\n\t}\n      else if (!strcasecmp(argn[i], \"failureurl\"))\n\tfailureUrl= argv[i];\n      plugin->argv[plugin->argc++]= NPN_StrDup(argn[i]);\n      plugin->argv[plugin->argc++]= NPN_StrDup(argv[i] ? argv[i] : \"\");\n      if (strcasecmp(\"SRC\", argn[i]) == 0)\n\tplugin->srcUrl= NPN_StrDup(argv[i]);\n    }\n    if (!plugin->srcUrl)\n      plugin->srcUrl= NPN_StrDup(\"\"); /* we were embedded without a SRC */\n\n    \n    /* find npsqueakrun and image */\n    {\n      char user_bin_dir[PATH_MAX];\n      char user_img_dir[PATH_MAX];\n      char* home= getenv(\"HOME\");\n      if (home == 0) {\n\tfprintf(stderr, \"Squeak Plugin: No home directory?!\\n\");\n\treturn NPERR_GENERIC_ERROR;\n      }\n      strcpy(user_bin_dir, home);\n      strcat(user_bin_dir, \"/.npsqueak/\");\n      \n      strcpy(user_img_dir, home);\n      strcat(user_img_dir, \"/.npsqueak/\");\n      \n      {\n\tchar* bin_dir_v[PATH_MAX]= {user_bin_dir,\n\t\t\t\t    SYSTEM_BIN_DIR\"/\"};\n\tif (findFileInPaths(plugin->vmName, NPSQUEAKRUN, 2 , bin_dir_v) == 0){\n\t  fprintf(stderr, \"Squeak Plugin: npsqueakrun not found!\\n\");\n\t  return NPERR_GENERIC_ERROR;\n\t}\n      }\n\n      {\n\tchar* img_dir_v[PATH_MAX]= {user_img_dir, SYSTEM_IMG_DIR\"/\"};\n\tif (findFileInPaths(plugin->imageName, imagename, 2, img_dir_v) == 0){\n\t  fprintf(stderr, \"Squeak Plugin: Image file not found: %s\\n\", \n\t\t  imagename);\n\t  if (failureUrl){\n\t    fprintf(stderr, \"Squeak Plugin: going to failure URL: %s\\n\", \n\t\t    failureUrl);\n\t    plugin->failureUrl= NPN_StrDup(failureUrl);\n\t  }else {\n\t    fprintf(stderr, \"Squeak Plugin: no failure URL: \\n\");\n\t    return NPERR_GENERIC_ERROR;\n\t  }\n\t}\n\tplugin->argv[6]= NPN_StrDup(plugin->imageName); \n      }\n    }\n  } else {\n    /* if not embedded srcUrl will be set in NewStream */\n    plugin->srcUrl= NULL;\n  }\n  plugin->argv[plugin->argc]= 0;\n  if (pipe(&plugin->pipes[SQUEAK_READ])\n      || pipe(&plugin->pipes[PLUGIN_READ])) {\n    perror(\"Squeak Plugin: Creating pipes failed\");\n    return NPERR_GENERIC_ERROR;\n  }\n  DPRINT(\"NP: Created pipes (VM read: %d <- %d, NP read: %d <- %d)\\n\", \n\t plugin->pipes[SQUEAK_READ],\n\t plugin->pipes[PLUGIN_WRITE],\n\t plugin->pipes[PLUGIN_READ],\n\t plugin->pipes[SQUEAK_WRITE]);\n  instance->pdata= (void*) plugin;\n  return NPERR_NO_ERROR;\n}\n\nNPError \nNPP_Destroy(NPP instance, NPSavedData** save)\n{\n  SqueakPlugin *plugin;\n  DPRINT(\"NP: NPP_Destroy\\n\");\n  if (!instance)\n    return NPERR_INVALID_INSTANCE_ERROR;\n  plugin= (SqueakPlugin*) instance->pdata;\n  if (plugin) {\n    int i;\n    if (plugin->sqwindow && plugin->display) {\n      DPRINT(\"NP: DestroyWindow %x\\n\", \n\t     plugin->sqwindow);\n      XSetErrorHandler(IgnoreErrors);\n      XSync(plugin->display,0);\n      XKillClient(plugin->display, plugin->sqwindow);\n      XSync(plugin->display,0);\n    }\n    if (plugin->pid) {\n      DPRINT(\"NP: kill 0x%i\\n\", plugin->pid);\n      kill(plugin->pid, SIGTERM);\n      plugin->pid= 0;\n    }\n    if (plugin->input) {\n      XtRemoveInput(plugin->input);\n    }\n    for (i= 0; i < 4; i++)\n      if (plugin->pipes[i]) {\n\tclose(plugin->pipes[i]);\n\tplugin->pipes[i]= 0;\n      }\n    if (plugin->srcUrl) {\n      NPN_MemFree(plugin->srcUrl);\n      plugin->srcUrl= NULL;\n    }\n    if (plugin->srcFilename) {\n      NPN_MemFree(plugin->srcFilename);\n      plugin->srcFilename= NULL;\n    }\n    if (plugin->failureUrl) {\n      NPN_MemFree(plugin->failureUrl);\n      plugin->failureUrl= NULL;\n    }\n    if (plugin->argv) {\n      for (i= 0; i < plugin->argc; i++) {\n\tif (plugin->argv[i])\n\t  NPN_MemFree(plugin->argv[i]);\n      }\n      plugin->argc= 0;\n      NPN_MemFree(plugin->argv);\n      plugin->argv= NULL;\n    }\n    NPN_MemFree(plugin);\n  }\n  instance->pdata= NULL;\n  return NPERR_NO_ERROR;\n}\n\n/***********************************************************************\n * Plugin events we need to handle\n ***********************************************************************/\n\nNPError \nNPP_SetWindow(NPP instance, NPWindow *pNPWindow)\n{\n  SqueakPlugin *plugin;\n  if (!instance)\n    return NPERR_INVALID_INSTANCE_ERROR;\n  plugin= (SqueakPlugin*) instance->pdata;\n  if (!plugin)\n    return NPERR_GENERIC_ERROR;\n  if (plugin->failureUrl) {\n    DPRINT(\"NP: opening failure URL\");\n    NPN_GetURL(plugin->instance, plugin->failureUrl, \"_self\");\n    return NPERR_NO_ERROR;\n  }\n  if (pNPWindow == NULL) \n    return NPERR_NO_ERROR;\n  \n  if (!plugin->display) {\n    /* first time only */\n    plugin->display= \n      ((NPSetWindowCallbackStruct *)pNPWindow->ws_info)->display;\n  }\n  SetWindow(plugin, (Window) pNPWindow->window, \n\t    pNPWindow->width, pNPWindow->height);\n  if (!plugin->pid)\n    Run(plugin);\n  return NPERR_NO_ERROR;\n}\n\nNPError \nNPP_NewStream(NPP instance, NPMIMEType type, \n\t      NPStream *stream, NPBool seekable, uint16 *stype)\n{\n  SqueakPlugin *plugin= (SqueakPlugin*) instance->pdata;\n  DPRINT(\"NP: NewStream(%s, id=%i)\\n\", stream->url,\n\t stream->notifyData ? ((SqueakStream*) stream->notifyData)->id : -1);\n  \n  if (!stream->notifyData && !plugin->srcUrl) {\n    /* We did not request this stream, so it is our SRC file. */\n    plugin->srcUrl= NPN_StrDup(stream->url);\n    plugin->argv[plugin->argc++]= NPN_StrDup(\"SRC\");\n    plugin->argv[plugin->argc++]= NPN_StrDup(plugin->srcUrl);\n    DPRINT(\"NP:   got srcUrl=%s\\n\", plugin->srcUrl);\n    Run(plugin);\n  }\n  *stype= NP_ASFILEONLY;          /* We want the file after download */\n  \n  return NPERR_NO_ERROR;\n}\n\n\nNPError \nNPP_DestroyStream(NPP instance, NPStream *stream, NPError reason)\n{\n  /* We'll clean up in URLNotify */\n  DPRINT(\"NP: DestroyStream(%s, id=%i)\\n\", stream->url, \n\t stream->notifyData ? ((SqueakStream*) stream->notifyData)->id : -1);\n  return NPERR_NO_ERROR;\n}\n\n\nvoid \nNPP_StreamAsFile(NPP instance, NPStream *stream, const char* fname)\n{\n  int id= stream->notifyData ? ((SqueakStream*) stream->notifyData)->id : -1;\n  char lname[PATH_MAX];\n  SqueakPlugin *plugin= (SqueakPlugin*) instance->pdata;\n  DPRINT(\"NP: StreamAsFile(%s, id=%i)\\n\", stream->url, id);\n  DPRINT(\"NP:   fname=%s\\n\", fname ? fname : \"<NULL>\");\n  if (!plugin || !fname) return;\n\n  /* need to copy file because it might be deleted after return */\n  strncpy(lname, fname, PATH_MAX);\n  strcat(lname, \"$\");\n  DPRINT(\"NP:  lname=%s\\n\", lname);\n  if (-1 == link(fname, lname))\n    DPRINT(\"NP:   Link failed: %s\\n\", strerror(errno));\n  fname= lname;\n\n  if (!stream->notifyData && !plugin->srcFilename) {\n    /* We did not request this stream, so it is our SRC file. */\n    plugin->srcFilename= NPN_StrDup(fname);\n    DPRINT(\"NP:   got srcFilename=%s\\n\", plugin->srcFilename);\n    if (plugin->srcId >= 0) {\n      /* plugin wanted it already */\n      DeliverFile(plugin, plugin->srcId, plugin->srcFilename);\n      plugin->srcId= -1;\n    }\n    return;\n  }\n\n  DeliverFile(plugin, id, fname);\n\n  /* signal URLNotify that we're done */\n  ((SqueakStream*) stream->notifyData)->id= -1;\n}\n\nvoid\nNPP_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData)\n{\n  int id= notifyData ? ((SqueakStream*) notifyData)->id : -1;\n  int ok= reason == NPRES_DONE;\n  SqueakPlugin *plugin= (SqueakPlugin*) instance->pdata;\n  DPRINT(\"NP: URLNotify(%s, id=%i, ok=%i)\\n\", url, id, ok);\n  if (notifyData) NPN_MemFree(notifyData);\n  if (!plugin || -1 == id) return;\n\n  DeliverFile(plugin, id, NULL);\n}\n\n/***********************************************************************\n * Plugin stubs\n ***********************************************************************/\n\n\nNPError\nNPP_Initialize(void)\n{\n  return NPERR_NO_ERROR;\n}\n\n\nvoid\nNPP_Shutdown(void)\n{\n}\n\n\n/* We don't have an associated java class */\n\njref\nNPP_GetJavaClass()\n{\n  return NULL;\n}\n\n/* We don't really stream */\n\nint32 \nNPP_WriteReady(NPP instance, NPStream *stream)\n{\n  return 0X0FFFFFFF;\n}\n\n\nint32 \nNPP_Write(NPP instance, NPStream *stream, \n\t  int32 offset, int32 len, void *buffer)\n{\n  return len;\n}\n\n\n/* We don't print */\n\nvoid \nNPP_Print(NPP instance, NPPrint* printInfo)\n{\n}\n\n\n/***********************************************************************\n * Our functions\n ***********************************************************************/\n\n/* Read from command pipe. */\nstatic void\nReceive(SqueakPlugin *plugin, void *buf, size_t count)\n{\n  ssize_t n;\n  do {\n    n= read(plugin->pipes[PLUGIN_READ], buf, count);\n  } while (n == -1 && errno == EINTR);\n  if (n == -1)\n    perror(\"Squeak plugin pipe read failed:\");\n  if (n < count)\n    fprintf(stderr, \"Squeak plugin read too few data from pipe\\n\");\n}\n\n\n/* Write to command pipe. */\nstatic void\nSend(SqueakPlugin *plugin, const void *buf, size_t count)\n{\n  ssize_t n;\n  do {\n    n= write(plugin->pipes[PLUGIN_WRITE], buf, count);\n  } while (n == -1 && errno == EINTR);\n  if (n == -1)\n    perror(\"Squeak plugin write failed:\");\n  if (n < count)\n    fprintf(stderr, \"Squeak plugin wrote too few data to pipe\\n\");\n}\n\nstatic void\nSendInt(SqueakPlugin *plugin, int value)\n{\n  Send(plugin, &value, 4);\n}\n\n\nstatic void \nDeliverFile(SqueakPlugin *plugin, int id, const char* fname)\n{\n  int ok= fname != NULL;\n  DPRINT(\"NP:   Send RECEIVE_DATA id=%i state=%i\\n\", id, ok);\n\n  errno= 0;\n  SendInt(plugin, CMD_RECEIVE_DATA);\n  SendInt(plugin, id);\n  SendInt(plugin, ok);\n\n  if (ok) {\n    int length= strlen(fname);\n    SendInt(plugin, length);\n    Send(plugin, fname, length);\n  }\n\n  if (errno)\n    perror(\"Squeak Plugin (StreamAsFile)\");\n}\n\n\nstatic void \nRun(SqueakPlugin *plugin)\n{\n  if (plugin->pid || !plugin->nswindow || !plugin->srcUrl ||plugin->failureUrl)\n    return;\n\n  \n  plugin->pid= fork();\n  \n  if (plugin->pid == -1) {\n    perror(\"Squeak fork() failed\");\n    plugin->pid= 0;\n    return;\n  }\n  DPRINT(\"NP: fork() -> %i\\n\", plugin->pid);\n  if (plugin->pid == 0) {\n    char tmp1[16], tmp2[16];\n    plugin->argv[2]= NPN_StrDup(DisplayString(plugin->display));\n    sprintf(tmp1, \"%i\", plugin->pipes[SQUEAK_READ]);\n    plugin->argv[4]= NPN_StrDup(tmp1);\n    sprintf(tmp2, \"%i\", plugin->pipes[SQUEAK_WRITE]);\n    plugin->argv[5]= NPN_StrDup(tmp2);\n    DPRINT(\"NP(child): Running Squeak VM with arguments\\n\");\n    {\n      int i;\n      for (i= 1; i<plugin->argc; i++)\n\tDPRINT(\"    %s\\n\", plugin->argv[i]);\n    }\n    /* this is from the XLib manual ... */\n    if ((fcntl(ConnectionNumber(plugin->display), F_SETFD, FD_CLOEXEC)) == -1)\n      DPRINT(\"NP: Cannot disinherit X connection fd\\n\");\n    DPRINT(\"NP(child): trying %s\\n\", plugin->vmName);\n    execv(plugin->vmName, plugin->argv);\n    /* ~/.npsqueak/npsqueakrun could not be executed */\n    strcpy(plugin->vmName, SYSTEM_BIN_DIR \"/\" NPSQUEAKRUN);\n    NPN_MemFree(plugin->argv[0]);\n    plugin->argv[0]= NPN_StrDup(plugin->vmName);\n    DPRINT(\"NP(child): trying %s\\n\", plugin->vmName);\n    execv(plugin->vmName, plugin->argv);\n    /* npsqueakrun could not be executed either */\n    fprintf(stderr, \"Squeak Plugin: running \\\"%s\\\"\\n\", plugin->vmName);\n    perror(\"Squeak execv() failed\");\n    _exit(1);\n  } else {\n    /* establish communication via command pipes */\n    XtAppContext app= XtDisplayToApplicationContext(plugin->display);\n    plugin->input= XtAppAddInput(app,\n\t\t\t\t plugin->pipes[PLUGIN_READ],\n\t\t\t\t (XtPointer) XtInputReadMask,\n\t\t\t\t (XtInputCallbackProc) InputCallback,\n\t\t\t\t plugin);\n  \n    /* send browser window */\n    DPRINT(\"NP: Sending browser window=0x%X\\n\", plugin->nswindow);\n    SendInt(plugin, plugin->nswindow);\n  }\n}\n\n\nstatic void\nSetWindow(SqueakPlugin *plugin, Window window, int width, int height)\n{\n  DPRINT(\"NP: SetWindow(0x%X, %i@%i)\\n\", window, width, height);\n  if (plugin->nswindow == window) {\n    XResizeWindow(plugin->display, plugin->nswindow, width, height);\n  } else {\n    /* New window */\n    plugin->nswindow= window;\n    SetUpWindow(plugin);\n    if (plugin->sqwindow) {\n      DPRINT(\"NP: Reparenting to plugin window 0x%X\\n\", plugin->nswindow);\n      XReparentWindow(plugin->display, plugin->sqwindow, plugin->nswindow, 0, 0);\n      XMapWindow(plugin->display, plugin->sqwindow);\n      /* notify Squeak */\n      SendInt(plugin, CMD_BROWSER_WINDOW);\n      SendInt(plugin, plugin->nswindow);\n    }\n  }\n  if (plugin->sqwindow)\n    XResizeWindow(plugin->display, plugin->sqwindow, width, height);\n}\n\n\nstatic void\nSetUpWindow(SqueakPlugin *plugin)\n{\n  Widget w= XtWindowToWidget(plugin->display, plugin->nswindow);\n  DPRINT(\"NP: SetUpWindow(0x%X)\\n\", plugin->nswindow);\n  XSelectInput(plugin->display, plugin->nswindow, 0); \n  if (plugin->embedded) {\n    /* need to capture destroys when page is re-layouted */\n    XtAddCallback(w, XtNdestroyCallback, \n\t\t  (XtCallbackProc) DestroyCallback, plugin);\n  }\n}\n\n\nstatic void\nSetUpSqueakWindow(SqueakPlugin *plugin)\n{\n  Receive(plugin, &plugin->sqwindow, 4);\n  DPRINT(\"NP: got squeak window=0x%X\\n\", plugin->sqwindow);\n  DPRINT(\"NP: resizing squeak window\\n\");\n  {\n    XWindowAttributes attr;\n    XGetWindowAttributes(plugin->display, plugin->nswindow, &attr);\n    XResizeWindow(plugin->display, plugin->sqwindow, attr.width, attr.height);\n  }\n  DPRINT(\"NP: mapping squeak window\\n\");\n  XMapWindow(plugin->display, plugin->sqwindow);\n}\n\n\nstatic void\nDestroyCallback(Widget widget, SqueakPlugin *plugin, XtPointer data)\n{\n  int (*previous)(Display *, XErrorEvent *);\n\n  DPRINT(\"NP: DestroyCallback()\\n\");\n\n  /* Ignore errors due to the window being closed */\n  XSync(plugin->display, False);\n  previous= XSetErrorHandler(IgnoreErrors);\n\n  /* Save Squeak window from being destroyed by page re-layout */\n  DPRINT(\"NP: Reparenting to root window\\n\");\n  XUnmapWindow(plugin->display, plugin->sqwindow);\n  XReparentWindow(plugin->display, plugin->sqwindow,\n\t\t  DefaultRootWindow(plugin->display), 0, 0);\n\n  /* Report errors */\n  XSync(plugin->display, False);\n  XSetErrorHandler(previous);\n}\n\nstatic void \nInputCallback(SqueakPlugin *plugin, int *source, XtInputId* id)\n{\n  int cmd;\n  DPRINT(\"NP: InputCallback()\\n\");\n  if (!plugin->sqwindow)\n    {\n      /* read sqwindow */\n      SetUpSqueakWindow(plugin);\n      return;\n    }\n  Receive(plugin, &cmd, 4);\n  switch (cmd) {\n  case CMD_GET_URL: \n    GetUrl(plugin);\n    break;\n  case CMD_POST_URL: \n    PostUrl(plugin);\n    break;\n  default:\n    fprintf(stderr, \"Unknown command from Squeak: %i\\n\", cmd);\n  }\n}\n\n\nstatic void\nGetUrl(SqueakPlugin *plugin)\n{\n  char *url, *target;\n  int id, urlSize, targetSize;\n\n  errno= 0;\n  Receive(plugin, &id, 4);\n  /* Read URL from pipe */\n  Receive(plugin, &urlSize, 4);\n  if (urlSize > 0) {\n    url= NPN_MemAlloc(urlSize+1);\n    Receive(plugin, url, urlSize);\n    url[urlSize]= 0;\n  } else url= NULL;\n  /* Read target from pipe */\n  Receive(plugin, &targetSize, 4);\n  if (targetSize > 0) {\n    target= NPN_MemAlloc(targetSize+1);\n    Receive(plugin, target, targetSize);\n    target[targetSize]= 0;\n  } else target= NULL;\n\n  if (errno) {\n    perror(\"Squeak Plugin (GetUrl)\");\n  } else {\n    DPRINT(\"NP: GetUrl(%s, %s)\\n\", url, target ? target : \"NULL\");\n    if (strcmp(url, plugin->srcUrl)==0) {\n      if (plugin->srcFilename)\n\tDeliverFile(plugin, id, plugin->srcFilename);\n      else\n\tplugin->srcId= id;\n    } else {\n      SqueakStream* notifyData= \n\t(SqueakStream*) NPN_MemAlloc(sizeof(SqueakStream));\n      if (!notifyData) { \n\tfprintf(stderr, \"Squeak Plugin (GetUrl): alloc failed\\n\");\n      } else {\n\tDPRINT(\"NP: GetURLNotify(%s, id=%i)\\n\", url, id);\n\tnotifyData->id= id;\n\tNPN_GetURLNotify(plugin->instance, url, target, notifyData);\n      }\n    }\n  }\n\n  if (url) NPN_MemFree(url);\n  if (target) NPN_MemFree(target);\n}\n\nstatic void\nPostUrl(SqueakPlugin *plugin)\n{\n  char *url, *target, *data;\n  int id, urlSize, targetSize, dataSize;\n\n  errno= 0;\n  Receive(plugin, &id, 4);\n  /* Read URL from pipe */\n  Receive(plugin, &urlSize, 4);\n  if (urlSize > 0) {\n    url= NPN_MemAlloc(urlSize+1);\n    Receive(plugin, url, urlSize);\n    url[urlSize]= 0;\n  } else url= NULL;\n  /* Read target from pipe */\n  Receive(plugin, &targetSize, 4);\n  if (targetSize > 0) {\n    target= NPN_MemAlloc(targetSize+1);\n    Receive(plugin, target, targetSize);\n    target[targetSize]= 0;\n  } else target= NULL;\n  /* Read post data from pipe */\n  Receive(plugin, &dataSize, 4);\n  if (dataSize > 0) {\n    data= NPN_MemAlloc(dataSize);\n    Receive(plugin, data, dataSize);\n  } else data= NULL;\n\n  if (errno) {\n    perror(\"Squeak Plugin (PostUrl)\");\n  } else {\n    SqueakStream* notifyData= \n      (SqueakStream*) NPN_MemAlloc(sizeof(SqueakStream));\n    if (!notifyData) { \n      fprintf(stderr, \"Squeak Plugin (PostUrl): alloc failed\\n\");\n    } else {\n      DPRINT(\"NP: PostURLNotify(%s, id=%i)\\n\", url, id);\n      notifyData->id= id;\n      NPN_PostURLNotify(plugin->instance, url, target, \n\t\t\tdataSize, data, FALSE, notifyData);\n    }\n  }\n\n  if (url) NPN_MemFree(url);\n  if (target) NPN_MemFree(target);\n  if (data) NPN_MemFree(data);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/npsqueak/npsqueakregister.in",
    "content": "#! /bin/sh\n\n# File:        npsqueakregister\n# Author:      Bert Freudenberg \n# Description: Script to register the npsqueak plugin with \n#              various browsers. \n#              Rerun after you installed a new browser!\n# Parameters:  -u unregister\n\nNPSQUEAK_SO=@NPSQUEAK_SO@\nBROWSERS=\"netscape mozilla mozilla-firefox opera MozillaFirefox/lib\"\nBROWSER_DIRS=\"/usr/local/lib /usr/lib /opt\"\nSYSTEM_BROWSER_DIR=\"/usr/lib/browser-plugins\"\n\nACTION=register\n\nusage() {\n    echo \"Usage: $0 [-u] [PLUGIN]\"\n    echo \"Registers the Squeak browser plugin for known browsers\"\n    echo \"  -u         unregister plugin\"\n    echo \"  PLUGIN     absolute path to npsqueak.so\"\n    echo \"             (default is @NPSQUEAK_SO@)\"\n    exit\n}\n\nregister() {\n    echo Registering ${1}\n    rm -f ${1}\n    ln -sv $NPSQUEAK_SO ${1}\n}\n\nunregister() {\n    echo Unregistering ${1}\n    rm -f ${1}\n}\n\ncase \"$1\" in\n    -u) \n         ACTION=unregister\n         ;;\n    \"\")   \n         ACTION=register\n         ;;\n    /*.so)\n\tNPSQUEAK_SO=\"$1\"\n\t;;\n    *)   usage\n         exit 1\n         ;;\nesac\n\nif [ ! -e \"$NPSQUEAK_SO\" ] ; then\n    echo File not found: $NPSQUEAK_SO\n    echo Aborting.\n    exit 1 \nfi\n\nfor browser in $BROWSERS\ndo \n    for bdir in $BROWSER_DIRS\n    do\n        dirs=`ls -d ${bdir}/${browser}* 2>/dev/null`\n        for dir in $dirs\n        do\n            pdirs=`find $dir -name plugins -print`\n            for pdir in $pdirs\n            do\n\t        $ACTION ${pdir}/npsqueak.so\n            done\n        done\n    done\ndone\n\n\nif [ -e $SYSTEM_BROWSER_DIR ]; then\n    $ACTION $SYSTEM_BROWSER_DIR/npsqueak.so\nfi\n"
  },
  {
    "path": "vm/src/from_squeak/unix/npsqueak/npsqueakrun.in",
    "content": "#! /bin/bash\n\n# File:        npsqueakrun\n# Author:      Bert Freudenberg\n# Last edited: 2005-02-28 18:42:20 by jens on impara.de\n# Description: Script to start the Squeak VM binary \n#              from the Browser Plugin (npsqueak.so)\n#              If necessary, sets up $HOME/.npsqueak/* first.\n\nVM_VERSION=@VM_VERSION@\nimgdir=@imgdir@\n\nIMAGE=${imgdir}/SqueakPlugin.image\nVM=squeak\nVMOPTIONS=\" -mmap 1024 -vm-display-x11 -swapbtn \"\nLOGFILE=/tmp/npsqueak.log\n\npdebug()\n{\n    if [ ! -z $NPSQUEAK_DEBUG ]; then \n\techo -e \"npsqueak: $@\" >> $LOGFILE \n    fi\n}\n\nperror()\n{\n    if [ ! -z $NPSQUEAK_DEBUG ]; then \n\techo -e \"npsqueak error: $@\" | tee -a $LOGFILE >&2 \n    else\n\techo -e \"npsqueak error: $@\"  >&2 \n    fi\n}\n\n# is there a clever way to determine if you are local?\nif [ $DISPLAY = \":0.0\" ]; then\n    VMOPTIONS=$VMOPTIONS\" -xshm \"\n    pdebug \"using x shared memory\"\nelse\n    pdebug \"disabling x shared memory, because we are not local\"\nfi\n\nif [ -e /usr/bin/squeakvm ]; then\n    VM=squeakvm\nfi\n\nensuredir()\n{\n    if [ ! -d \"${1}\" ] ; then\n\tif mkdir \"${1}\" ; then\n\t    pdebug \"Created ${1}\"\n\t    if [ -n \"${2}\" ] ; then\n\t\tchmod \"${2}\" \"${1}\"\n\t    fi\n\telse\n\t    perror \"Could not create ${1}!\"\n\tfi\n    fi\n}\n\nensurefile()\n{\n    if [ ! -e \"${1}\" ] ; then\n\tif cp \"${2}\" \"${1}\" ; then\n\t    pdebug \"Created ${1}\"\n\telse\n\t    perror \"Could not create ${1}\"\n\t    if [ ! -r \"${2}\" ] ; then\n\t\tperror \"because ${2} is missing\"\n\t    fi\n\tfi\n    fi\n}\n\nensureimage()\n{\n    if [ `dirname \"${1}\"` = \"${HOME}/.npsqueak\" ] ; then\n\tIMAGE=$1\n    else\n\tIMAGE=\"${HOME}/.npsqueak/\"`basename \"$1\"`\n\tensurefile \"$IMAGE\" \"$1\" \n    fi \n}\n\nensure()\n{\n    if [ `dirname \"${1}\"` = \"${HOME}/.npsqueak\" ] ; then\n\tIMAGE=$1\n    else\n\tIMAGE=\"${HOME}/.npsqueak/\"`basename \"$1\"`\n\tensurefile \"$IMAGE\" \"$1\" \n    fi \n}\n\nif [ -e  \"${HOME}/.npsqueak\" ] ; then\n    pdebug \"don't create MySqueak link on desktop,\" \n    pdebug \"because ${HOME}/.npsqueak exists\"\nelse\n    pdebug \"create MySqueak link on desktop\"\n    ln -s \"${HOME}/.npsqueak/My Squeak\" \"${HOME}/Desktop/My Squeak\"\nfi \n\nparameter_to_array(){\n    i=0\n    for p in \"$@\"; do\n\ti=$(( $i + 1 ))\n\tparameter[i]=$p\n    done\n}\n\nensuredir \"${HOME}/.npsqueak\" \nensuredir \"${HOME}/.npsqueak/secure\" 700\n\nif [ ! -z \"$SQUEAK_USERDIR\" ]; then\n    pdebug \"using SQUEAK_USERDIR\"\n    pdebug \"My Squeak -> $SQUEAK_USERDIR\"  \nelse\n    pdebug \"My Squeak -> ${HOME}/.npsqueak/My Squeak\"\n    ensuredir \"${HOME}/.npsqueak/My Squeak\"\nfi\n\nif [ -z \"$1\" ]; then\n    pdebug \"start squeak direct\"\n    ensureimage $IMAGE\n    $VM $VMOPTIONS $IMAGE\nelse\n    pdebug \"start squeak from plugin\"\n    IMAGE=\"${6}\"\n    ensureimage $IMAGE\n    parameter_to_array \"$@\"\n    parameter[6]=$IMAGE\n    $VM $VMOPTIONS \"${parameter[@]}\"\nfi\n\n"
  },
  {
    "path": "vm/src/from_squeak/unix/npsqueak/npunix.c",
    "content": "/*\n * npunix.c\n *\n * Netscape Client Plugin API\n * - Wrapper function to interface with the Netscape Navigator\n *\n * dp Suresh <dp@netscape.com>\n *\n *----------------------------------------------------------------------\n * PLUGIN DEVELOPERS:\n *\tYOU WILL NOT NEED TO EDIT THIS FILE.\n *----------------------------------------------------------------------\n *\n * At the official Netscape site there's only the PluginSDK30b5 for unix:\n * \n * !!! I had to add the missing URLNotify stuff here. If you find an official \n * !!! version of this file which has it, use it instead. \n * !!!        April 2000, Bert Freudenberg\n *\n */\n\n#define XP_UNIX 1\n\n#include <stdio.h>\n#include \"npapi.h\"\n#include \"npupp.h\"\n\n/*\n * Define PLUGIN_TRACE to have the wrapper functions print\n * messages to stderr whenever they are called.\n */\n\n#ifdef PLUGIN_TRACE\n#include <stdio.h>\n#define PLUGINDEBUGSTR(msg)\tfprintf(stderr, \"%s\\n\", msg)\n#else\n#define PLUGINDEBUGSTR(msg)\n#endif\n\n\n/***********************************************************************\n *\n * Globals\n *\n ***********************************************************************/\n\nstatic NPNetscapeFuncs   gNetscapeFuncs;\t/* Netscape Function table */\n\n\n/***********************************************************************\n *\n * Wrapper functions : plugin calling Netscape Navigator\n *\n * These functions let the plugin developer just call the APIs\n * as documented and defined in npapi.h, without needing to know\n * about the function table and call macros in npupp.h.\n *\n ***********************************************************************/\n\nvoid\nNPN_Version(int* plugin_major, int* plugin_minor,\n\t     int* netscape_major, int* netscape_minor)\n{\n\t*plugin_major = NP_VERSION_MAJOR;\n\t*plugin_minor = NP_VERSION_MINOR;\n\n\t/* Major version is in high byte */\n\t*netscape_major = gNetscapeFuncs.version >> 8;\n\t/* Minor version is in low byte */\n\t*netscape_minor = gNetscapeFuncs.version & 0xFF;\n}\n\nNPError\nNPN_GetValue(NPP instance, NPNVariable variable, void *r_value)\n{\n\treturn CallNPN_GetValueProc(gNetscapeFuncs.getvalue,\n\t\t\t\t\tinstance, variable, r_value);\n}\n\nNPError\nNPN_GetURL(NPP instance, const char* url, const char* window)\n{\n\treturn CallNPN_GetURLProc(gNetscapeFuncs.geturl, instance, url, window);\n}\n\nNPError\nNPN_GetURLNotify(NPP instance, const char* url, const char* window, void* notifyData)\n{\n\tint navMinorVers = gNetscapeFuncs.version & 0xFF;\n\tif (navMinorVers < NPVERS_HAS_NOTIFICATION)\n\t  return NPERR_INCOMPATIBLE_VERSION_ERROR;\n\treturn CallNPN_GetURLNotifyProc(gNetscapeFuncs.geturlnotify, instance, url, window, notifyData);\n}\n\nNPError\nNPN_PostURL(NPP instance, const char* url, const char* window,\n\t     uint32 len, const char* buf, NPBool file)\n{\n\treturn CallNPN_PostURLProc(gNetscapeFuncs.posturl, instance,\n\t\t\t\t\turl, window, len, buf, file);\n}\n\nNPError\nNPN_PostURLNotify(NPP instance, const char* url, const char* window,\n\t     uint32 len, const char* buf, NPBool file, void* notifyData)\n{\n\tint navMinorVers = gNetscapeFuncs.version & 0xFF;\n\tif (navMinorVers < NPVERS_HAS_NOTIFICATION)\n\t  return NPERR_INCOMPATIBLE_VERSION_ERROR;\n\treturn CallNPN_PostURLNotifyProc(gNetscapeFuncs.posturlnotify, instance,\n\t\t\t\t\t url, window, len, buf, file, notifyData);\n}\n\nNPError\nNPN_RequestRead(NPStream* stream, NPByteRange* rangeList)\n{\n\treturn CallNPN_RequestReadProc(gNetscapeFuncs.requestread,\n\t\t\t\t\tstream, rangeList);\n}\n\nNPError\nNPN_NewStream(NPP instance, NPMIMEType type, const char *window,\n\t      NPStream** stream_ptr)\n{\n\treturn CallNPN_NewStreamProc(gNetscapeFuncs.newstream, instance,\n\t\t\t\t\ttype, window, stream_ptr);\n}\n\nint32\nNPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer)\n{\n\treturn CallNPN_WriteProc(gNetscapeFuncs.write, instance,\n\t\t\t\t\tstream, len, buffer);\n}\n\nNPError\nNPN_DestroyStream(NPP instance, NPStream* stream, NPError reason)\n{\n\treturn CallNPN_DestroyStreamProc(gNetscapeFuncs.destroystream,\n\t\t\t\t\t\tinstance, stream, reason);\n}\n\nvoid\nNPN_Status(NPP instance, const char* message)\n{\n\tCallNPN_StatusProc(gNetscapeFuncs.status, instance, message);\n}\n\nconst char*\nNPN_UserAgent(NPP instance)\n{\n\treturn CallNPN_UserAgentProc(gNetscapeFuncs.uagent, instance);\n}\n\nvoid*\nNPN_MemAlloc(uint32 size)\n{\n\treturn CallNPN_MemAllocProc(gNetscapeFuncs.memalloc, size);\n}\n\nvoid NPN_MemFree(void* ptr)\n{\n\tCallNPN_MemFreeProc(gNetscapeFuncs.memfree, ptr);\n}\n\nuint32 NPN_MemFlush(uint32 size)\n{\n\treturn CallNPN_MemFlushProc(gNetscapeFuncs.memflush, size);\n}\n\nvoid NPN_ReloadPlugins(NPBool reloadPages)\n{\n\tCallNPN_ReloadPluginsProc(gNetscapeFuncs.reloadplugins, reloadPages);\n}\n\nJRIEnv* NPN_GetJavaEnv()\n{\n\treturn CallNPN_GetJavaEnvProc(gNetscapeFuncs.getJavaEnv);\n}\n\njref NPN_GetJavaPeer(NPP instance)\n{\n\treturn CallNPN_GetJavaPeerProc(gNetscapeFuncs.getJavaPeer,\n\t\t\t\t       instance);\n}\n\n\n/***********************************************************************\n *\n * Wrapper functions : Netscape Navigator -> plugin\n *\n * These functions let the plugin developer just create the APIs\n * as documented and defined in npapi.h, without needing to \n * install those functions in the function table or worry about\n * setting up globals for 68K plugins.\n *\n ***********************************************************************/\n\nNPError\nPrivate_New(NPMIMEType pluginType, NPP instance, uint16 mode,\n\t\tint16 argc, char* argn[], char* argv[], NPSavedData* saved)\n{\n\tNPError ret;\n\tPLUGINDEBUGSTR(\"New\");\n\tret = NPP_New(pluginType, instance, mode, argc, argn, argv, saved);\n\treturn ret;\t\n}\n\nNPError\nPrivate_Destroy(NPP instance, NPSavedData** save)\n{\n\tPLUGINDEBUGSTR(\"Destroy\");\n\treturn NPP_Destroy(instance, save);\n}\n\nNPError\nPrivate_SetWindow(NPP instance, NPWindow* window)\n{\n\tNPError err;\n\tPLUGINDEBUGSTR(\"SetWindow\");\n\terr = NPP_SetWindow(instance, window);\n\treturn err;\n}\n\nNPError\nPrivate_NewStream(NPP instance, NPMIMEType type, NPStream* stream,\n\t\t\tNPBool seekable, uint16* stype)\n{\n\tNPError err;\n\tPLUGINDEBUGSTR(\"NewStream\");\n\terr = NPP_NewStream(instance, type, stream, seekable, stype);\n\treturn err;\n}\n\nint32\nPrivate_WriteReady(NPP instance, NPStream* stream)\n{\n\tunsigned int result;\n\tPLUGINDEBUGSTR(\"WriteReady\");\n\tresult = NPP_WriteReady(instance, stream);\n\treturn result;\n}\n\nint32\nPrivate_Write(NPP instance, NPStream* stream, int32 offset, int32 len,\n\t\tvoid* buffer)\n{\n\tunsigned int result;\n\tPLUGINDEBUGSTR(\"Write\");\n\tresult = NPP_Write(instance, stream, offset, len, buffer);\n\treturn result;\n}\n\nvoid\nPrivate_StreamAsFile(NPP instance, NPStream* stream, const char* fname)\n{\n\tPLUGINDEBUGSTR(\"StreamAsFile\");\n\tNPP_StreamAsFile(instance, stream, fname);\n}\n\n\nvoid\nPrivate_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData)\n{\n\tPLUGINDEBUGSTR(\"URLNotify\");\n\tNPP_URLNotify(instance, url, reason, notifyData);\n}\n\nNPError\nPrivate_DestroyStream(NPP instance, NPStream* stream, NPError reason)\n{\n\tNPError err;\n\tPLUGINDEBUGSTR(\"DestroyStream\");\n\terr = NPP_DestroyStream(instance, stream, reason);\n\treturn err;\n}\n\n\nvoid\nPrivate_Print(NPP instance, NPPrint* platformPrint)\n{\n\tPLUGINDEBUGSTR(\"Print\");\n\tNPP_Print(instance, platformPrint);\n}\n\nJRIGlobalRef\nPrivate_GetJavaClass(void)\n{\n    jref clazz = NPP_GetJavaClass();\n    if (clazz) {\n\tJRIEnv* env = NPN_GetJavaEnv();\n\treturn JRI_NewGlobalRef(env, clazz);\n    }\n    return NULL;\n}\n\n/*********************************************************************** \n *\n * These functions are located automagically by netscape.\n *\n ***********************************************************************/\n\n/*\n * NP_GetMIMEDescription\n *\t- Netscape needs to know about this symbol\n *\t- Netscape uses the return value to identify when an object instance\n *\t  of this plugin should be created.\n */\nchar *\nNP_GetMIMEDescription(void)\n{\n\treturn NPP_GetMIMEDescription();\n}\n\n/*\n * NP_GetValue [optional]\n *\t- Netscape needs to know about this symbol.\n *\t- Interfaces with plugin to get values for predefined variables\n *\t  that the navigator needs.\n */\nNPError\nNP_GetValue(void *future, NPPVariable variable, void *value)\n{\n\treturn NPP_GetValue(future, variable, value);\n}\n\n/*\n * NP_Initialize\n *\t- Netscape needs to know about this symbol.\n *\t- It calls this function after looking up its symbol before it\n *\t  is about to create the first ever object of this kind.\n *\n * PARAMETERS\n *    nsTable\t- The netscape function table. If developers just use these\n *\t\t  wrappers, they dont need to worry about all these function\n *\t\t  tables.\n * RETURN\n *    pluginFuncs\n *\t\t- This functions needs to fill the plugin function table\n *\t\t  pluginFuncs and return it. Netscape Navigator plugin\n *\t\t  library will use this function table to call the plugin.\n *\n */\nNPError\nNP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs)\n{\n\tNPError err = NPERR_NO_ERROR;\n\n\tPLUGINDEBUGSTR(\"NP_Initialize\");\n\t\n\t/* validate input parameters */\n\n\tif ((nsTable == NULL) || (pluginFuncs == NULL))\n\t\terr = NPERR_INVALID_FUNCTABLE_ERROR;\n\t\n\t/*\n\t * Check the major version passed in Netscape's function table.\n\t * We won't load if the major version is newer than what we expect.\n\t * Also check that the function tables passed in are big enough for\n\t * all the functions we need (they could be bigger, if Netscape added\n\t * new APIs, but that's OK with us -- we'll just ignore them).\n\t *\n\t */\n\n\tif (err == NPERR_NO_ERROR) {\n\t\tif ((nsTable->version >> 8) > NP_VERSION_MAJOR)\n\t\t\terr = NPERR_INCOMPATIBLE_VERSION_ERROR;\n\t\tif (nsTable->size < sizeof(NPNetscapeFuncs))\n\t\t\terr = NPERR_INVALID_FUNCTABLE_ERROR;\n\t\tif (pluginFuncs->size < sizeof(NPPluginFuncs))\t\t\n\t\t\terr = NPERR_INVALID_FUNCTABLE_ERROR;\n\t}\n\t\t\n\t\n\tif (err == NPERR_NO_ERROR) {\n\t\t/*\n\t\t * Copy all the fields of Netscape function table into our\n\t\t * copy so we can call back into Netscape later.  Note that\n\t\t * we need to copy the fields one by one, rather than assigning\n\t\t * the whole structure, because the Netscape function table\n\t\t * could actually be bigger than what we expect.\n\t\t */\n\t\tgNetscapeFuncs.version       = nsTable->version;\n\t\tgNetscapeFuncs.size          = nsTable->size;\n\t\tgNetscapeFuncs.posturl       = nsTable->posturl;\n\t\tgNetscapeFuncs.geturl        = nsTable->geturl;\n\t\tgNetscapeFuncs.requestread   = nsTable->requestread;\n\t\tgNetscapeFuncs.newstream     = nsTable->newstream;\n\t\tgNetscapeFuncs.write         = nsTable->write;\n\t\tgNetscapeFuncs.destroystream = nsTable->destroystream;\n\t\tgNetscapeFuncs.status        = nsTable->status;\n\t\tgNetscapeFuncs.uagent        = nsTable->uagent;\n\t\tgNetscapeFuncs.memalloc      = nsTable->memalloc;\n\t\tgNetscapeFuncs.memfree       = nsTable->memfree;\n\t\tgNetscapeFuncs.memflush      = nsTable->memflush;\n\t\tgNetscapeFuncs.reloadplugins = nsTable->reloadplugins;\n\t\tgNetscapeFuncs.getJavaEnv    = nsTable->getJavaEnv;\n\t\tgNetscapeFuncs.getJavaPeer   = nsTable->getJavaPeer;\n\t\tgNetscapeFuncs.getvalue      = nsTable->getvalue;\n\n\t\tif ((nsTable->version & 0xFF) >= NPVERS_HAS_NOTIFICATION) {\n\t\t  gNetscapeFuncs.posturlnotify = nsTable->posturlnotify;\n\t\t  gNetscapeFuncs.geturlnotify  = nsTable->geturlnotify;\n\t\t}\n\n\t\t/*\n\t\t * Set up the plugin function table that Netscape will use to\n\t\t * call us.  Netscape needs to know about our version and size\n\t\t * and have a UniversalProcPointer for every function we\n\t\t * implement.\n\t\t */\n\t\tpluginFuncs->version    = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR;\n\t\tpluginFuncs->size       = sizeof(NPPluginFuncs);\n\t\tpluginFuncs->newp       = NewNPP_NewProc(Private_New);\n\t\tpluginFuncs->destroy    = NewNPP_DestroyProc(Private_Destroy);\n\t\tpluginFuncs->setwindow  = NewNPP_SetWindowProc(Private_SetWindow);\n\t\tpluginFuncs->newstream  = NewNPP_NewStreamProc(Private_NewStream);\n\t\tpluginFuncs->destroystream = NewNPP_DestroyStreamProc(Private_DestroyStream);\n\t\tpluginFuncs->asfile     = NewNPP_StreamAsFileProc(Private_StreamAsFile);\n\t\tpluginFuncs->urlnotify  = NewNPP_URLNotifyProc(Private_URLNotify);\n\t\tpluginFuncs->writeready = NewNPP_WriteReadyProc(Private_WriteReady);\n\t\tpluginFuncs->write      = NewNPP_WriteProc(Private_Write);\n\t\tpluginFuncs->print      = NewNPP_PrintProc(Private_Print);\n\t\tpluginFuncs->event      = NULL;\n \t\tpluginFuncs->javaClass\t= Private_GetJavaClass();\n\n\t\terr = NPP_Initialize();\n\t}\n\t\n\treturn err;\n}\n\n/*\n * NP_Shutdown [optional]\n *\t- Netscape needs to know about this symbol.\n *\t- It calls this function after looking up its symbol after\n *\t  the last object of this kind has been destroyed.\n *\n */\nNPError\nNP_Shutdown(void)\n{\n \tPLUGINDEBUGSTR(\"NP_Shutdown\");\n\tNPP_Shutdown();\n\treturn NPERR_NO_ERROR;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/npsqueak/test/plugintest.html",
    "content": "<HTML>\n<HEAD>\n<TITLE>Squeak Plugin Test</TITLE>\n</HEAD>\n<BODY>\n\n<H1>Squeak Plugin Test</H1>\n<hr>\n<b>Embedded mode:</b> \n<p>\n<CENTER>\n<EMBED \n\ttype=\"application/x-squeak-source\"\n\tsrc=\"plugintest.sts\"\n\tWIDTH=\"640\" \n\tHEIGHT=\"480\"\n\tALIGN=\"CENTER\"\n\tPLUGINSPAGE=\"http://isgwww.cs.uni-magdeburg.de/~bert/squeak/plugin/download.html\"\n\tEMPTYPARAM\n\tBLA=\"BLABLA\"\n>\n</CENTER>\n<hr>\n<b>Fullwindow mode:</b> <a href=\"plugintest.sts\">plugintest.sts</a>\n<hr>\n<P>\n\n</BODY>\n</HTML>\n\n"
  },
  {
    "path": "vm/src/from_squeak/unix/npsqueak/test/plugintest.sts",
    "content": "\"If you see this message as a text file something went wrong.\nYou may go back and try the embedded Squeak version. If this\nworks, the server isn't sending the right mime type. If not,\nthe Squeak plugin is not installed correctly.\n\"\nStringHolder new textContents: ('Hello Plugin World!!\n\nThis window was opened by some code in the file plugintest.sts, which was downloaded by your web browser and executed by the Squeak Plugin Virtual Machine (', (Smalltalk getSystemAttribute: 0), ') in an object image (', (Smalltalk getSystemAttribute: 1),'). \n\nSince you are reading this I guess all is okay then ...\n\nOn most platforms, you can also run Squeak as a stand-alone program if you start the VM with the image.\n') withSqueakLineEndings; openLabel: 'Plugin Startup'\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/AioPlugin/Makefile.inc",
    "content": "XCPPFLAGS= -I$(topdir)/platforms/Cross/plugins/FilePlugin -I$(topdir)/platforms/Cross/plugins/SocketPlugin -DSQAIO_H=\\\"sqaio.h\\\"\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/AioPlugin/build.cmake",
    "content": "EXPECT_UNDEFINED_SYMBOLS ()\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/AioPlugin/config.cmake",
    "content": "PLUGIN_DEFINITIONS (-DSQAIO_H=\\\"sqaio.h\\\")\nPLUGIN_INCLUDE_DIRECTORIES (${cross}/plugins/FilePlugin ${cross}/plugins/SocketPlugin)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/AsynchFilePlugin/sqUnixAsynchFile.c",
    "content": "/* sqUnixAsynchFile.c -- non-blocking file i/o\n * \n *   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n *\n * Author: Ian.Piumarta@INRIA.Fr\n */\n\n/*\n  Experimental support for asynchronous file reading and writing.\n\n  When a read or write operation is initiated, control is returned to Squeak\n  immediately.  A semaphore is signaled when the operation completes, at which\n  time the client can find out how many bytes were actually read or written\n  and copy the results of the read operation from the file buffer into a Squeak\n  buffer.  Only one operation may be in progress on a given file at a given time,\n  but operations on different files may be done in parallel.\n\n  The semaphore is signalled once for each transfer operation that is successfully\n  started, even if that operation later fails.  Write operations always write\n  their entire buffer if they succeed, but read operations may transfer less than\n  their buffer size if they are started less than a buffer's size from the end\n  of the file.\n  \n  The state of a file is kept in the following structure, which is stored directly\n  in a Squeak ByteArray object:\n\n    typedef struct {\n\t  int\tsessionID;\n\t  void *state;\t\t// private to the implementation\n    } AsyncFile;\n\n  The session ID is used to detect stale files--files that were open\n  when the image was saved.  The state pointer of such files is meaningless.\n  Async file handles use the same session ID as ordinary file handles.\n\n  Note: These primitives are experimental!  They need not be implemented on\n  every platform, and they may be withdrawn or replaced in a future release.\n */\n\n#include \"sq.h\"\n#include \"AsynchFilePlugin.h\"\n#include \"sqUnixAsynchFile.h\"\n\n\n/*** module initialisation ***/\n\n#include \"sqVirtualMachine.h\"\n#include \"sqaio.h\"\n\n#include <sys/types.h>\n#include <unistd.h>\n#include <time.h>\n\nint sqUnixAsyncFileSessionID= 0;\n\nstatic struct VirtualMachine *vm= 0;\n\nstatic fd_set fds;\nstatic int    nfd= 0;\n\n#define isValid(f)\t(f->sessionID == sqUnixAsyncFileSessionID)\n#define validate(f)\tif ((!isValid(f)) || (!(f->state))) return vm->primitiveFail()\n\nint asyncFileInit(void)\n{\n  vm= sqGetInterpreterProxy();\n  sqUnixAsyncFileSessionID= clock() + time(0);\n  FD_ZERO(&fds);\n  nfd= 0;\n  return 1;\n}\n\nint asyncFileShutdown(void)\n{\n  /* protect against calling stale aio handlers */\n  int i;\n  for (i= 0; i < nfd; ++i)\n    if (FD_ISSET(i, &fds))\n      aioDisable(i);\n  nfd= 0;\n  FD_ZERO(&fds);\n  sqUnixAsyncFileSessionID= 0;\n  return 1;\n}\n\n\n/*** module ***/\n\n\n#include <stdlib.h>\n#include <string.h>\n#include <fcntl.h>\n#include <errno.h>\n\n#ifdef __GNUC__\n# define\tINLINE inline\n#else\n# define\tINLINE\n#endif\n\n#define min(a,b)\t((a) < (b) ? (a) : (b))\n#define max(a,b)\t((a) > (b) ? (a) : (b))\n\nstatic void readHandler(int fd, void *data, int flags);\nstatic void writeHandler(int fd, void *data, int flags);\n\n\nINLINE static FilePtr newFileRec(int fd, int sema)\n{\n  FilePtr fp= (FilePtr)calloc(1, sizeof(FileRec));\n  if (fp)\n    {\n      fp->fd=   fd;\n      fp->sema= sema;\n      fp->rd.status= Busy;\t/* read not ready */\n      fp->wr.status= Busy;\t/* write not complete */\n    }\n  return fp;\n}\n\nINLINE static allocateBuffer(struct FileBuf *buf, int size)\n{\n  if (buf->capacity >= size)\n    return 1;\n  if (buf->capacity > 0)\n    {\n      free(buf->bytes);\n      buf->capacity= 0;\n    }\n  buf->bytes= (char *)malloc(size);\n  if (!buf->bytes)\n    {\n      fprintf(stderr, \"out of memory\\n\");\n      return 0;\n    }\n  buf->capacity= size;\n  return 1;\n}\n\n\nFilePtr asyncFileAttach(AsyncFile *f, int fd, int semaIndex)\n{\n  FilePtr fp= newFileRec(fd, semaIndex);\n  if (fp)\n    {\n      f->sessionID= sqUnixAsyncFileSessionID;\n      f->state= (void *)fp;\n      aioEnable(fd, (void *)fp, 0);\n      FD_SET(fd, &fds);\n      nfd= max(nfd, fd + 1);\n      return fp;\t/* success */\n    }\n  fprintf(stderr, \"out of memory\\n\");\n  f->sessionID= 0;\n  f->state= 0;\n  return 0;\n}\n\n\n/*** public functions ***/\n\n\nint asyncFileOpen(AsyncFile *f, int fileNamePtr, int fileNameSize,\n\t\t  int writeFlag, int semaIndex)\n{\n  int fd= 0;\n  char *name= alloca(fileNameSize + 1);\n  memcpy((void *)name, (void *)fileNamePtr, fileNameSize);\n  name[fileNameSize]= '\\0';\n  /* if opening for wr then open for rw so that we can use these primitives\n     to read bidirectional files (e.g., master ptys for interactive child\n     processes) */\n  fd= (writeFlag\n       ? open(name, O_RDWR | O_CREAT, 0644)\n       : open(name, O_RDONLY));\n  if (fd >= 0)\n    {\n      if (asyncFileAttach(f, fd, semaIndex))\n\treturn 0;\t/* success */\n      close(fd);\n    }\n  vm->primitiveFail();\n  return 0;\t\t/* failure */\n}\n\n\nint asyncFileClose(AsyncFile *f)\n{\n  FilePtr fp= 0;\n  validate(f);\n  if ((fp= (FilePtr)f->state))\n    {\n      if (fp->fd >= 0)\n\t{\n\t  aioDisable(fp->fd);\n\t  FD_CLR(fp->fd, &fds);\n\t  close(fp->fd);\n\t}\n      if (fp->buf.bytes)\n\tfree((void *)fp->buf.bytes);\n      free((void *)fp);\n      f->state= 0;\n    }\n  return 0;\t\t\t/* success */\n}\n\n\n/* this no longer appears to be used */\n\nint asyncFileRecordSize(void)\n{\n  fprintf(stderr, \"asyncFileRecordSize() called -- why?\\n\");\n  vm->primitiveFail();\n  return 0;\n}\n\n\nint asyncFileReadResult(AsyncFile *f, int bufferPtr, int bufferSize)\n{\n  FilePtr fp= 0;\n  int n= 0;\n  validate(f);\n  fp= (FilePtr)f->state;\n  n= read(fp->fd, (void *)bufferPtr, bufferSize);\n  if      ((n < 0) && (errno == EWOULDBLOCK))\n    return fp->rd.status= Busy;\n  else if (n <= 0)\n    return fp->rd.status= Error;\n  else /* (n > 0) */\n    fp->rd.pos += n;\n\n  return fp->rd.status= n;\n}\n\n\nstatic void readHandler(int fd, void *data, int flags)\n{\n  signalSemaphoreWithIndex(((FilePtr)data)->sema);\n}\n\n\nint asyncFileReadStart(AsyncFile *f, int fPosition, int count)\n{\n  FilePtr fp= 0;\n  validate(f);\n  fp= (FilePtr)f->state;\n  \n  if ((  (fPosition >= 0))\t\t/* (fPos < 0) => current position */\n      && (fp->rd.pos != fPosition))\t/* avoid EPIPE on pty */\n    {\n      if (lseek(fp->fd, fPosition, SEEK_SET) < 0)\n\t{\n\t  perror(\"lseek\");\n\t  goto fail;\n\t}\n      fp->rd.pos= fPosition;\n    }\n  fp->rd.status= Busy;\n  aioHandle(fp->fd, readHandler, AIO_R);\n  return 0;\n\n fail:\n  fp->rd.status= Error;\n  vm->primitiveFail();\n  return 0;\n}\n\n\nint asyncFileWriteResult(AsyncFile *f)\n{\n  int n= 0;\n  FilePtr fp= 0;\n  validate(f);\n  fp= (FilePtr)f->state;\n  n= fp->wr.status;\n  fp->wr.status= Busy;\n  return n;\n}\n\n\nstatic void writeBuffer(FilePtr fp)\n{\n  int n= 0;\n  while ((n= fp->buf.size - fp->buf.pos) > 0)\n    {\n      n= write(fp->fd, (void *)(fp->buf.bytes + fp->buf.pos), n);\n      if (n < 0)\n\tswitch (errno)\n\t  {\n\t  case EWOULDBLOCK:\n\t    aioHandle(fp->fd, writeHandler, AIO_W);\n\t    return;\n\t  default:\n\t    fp->wr.status= Error;\n\t    return;\n\t  }\n      fp->buf.pos += n;\n      fp->wr.pos += n;\n    }\n  /* completed */\n  fp->wr.status= fp->buf.size;\n  signalSemaphoreWithIndex(fp->sema);\n}\n\n\nstatic void writeHandler(int fd, void *data, int flags)\n{\n  writeBuffer((FilePtr)data);\n}\n\n\nint asyncFileWriteStart(AsyncFile *f, int fPosition, int bufferPtr, int count)\n{\n  FilePtr fp= 0;\n  validate(f);\n  fp= (FilePtr)f->state;\n\n  if ((  (fPosition >= 0))\t\t/* (fPos < 0) => current position */\n      && (fp->wr.pos != fPosition))\t/* avoid EPIPE on tty */\n    {\n      if (lseek(fp->fd, fPosition, SEEK_SET) < 0)\n\t{\n\t  perror(\"lseek\");\n\t  goto fail;\n\t}\n      fp->wr.pos= fPosition;\n    }\n\n  if (count < 1)\n    {\n      fp->wr.status= 0;\n      signalSemaphoreWithIndex(fp->sema);\n      return 0;\n    }\n\n  if (!allocateBuffer(&fp->buf, count))\n    {\n      fprintf(stderr, \"out of memory\\n\");\n      goto fail;\n    }\n\n  memcpy((void *)fp->buf.bytes, (void *)bufferPtr, count);\n  fp->buf.pos= 0;\t/* current output pointer */\n  fp->buf.size= count;\t/* bytes to transfer */\n  fp->wr.status= Busy;\t/* transfer in progress */\n  writeBuffer(fp);\t/* begin transfer */\n  return 0;\n\n fail:\n  fp->wr.status= Error;\n  vm->primitiveFail();\n  return 0;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/AsynchFilePlugin/sqUnixAsynchFile.h",
    "content": "/* private file data */\n\ntypedef struct\n{\n  int  fd;\t\t\t/* descriptor */\n  int  sema;\t\t\t/* completion semaphore */\n  struct {\n    int   pos;\t\t\t/* file position */\n    int   status;\t\t/* number of bytes transferred, or: */\n#   define\tBusy\t-1\t/* operation in progress */\n#   define\tError\t-2\t/* operation aborted */\n  }    rd, wr;\t\t\t/* one each for read and write */\n  struct FileBuf {\n    char *bytes;\t\t/* write buffer */\n    int   capacity;\t\t/* capacity */\n    int   size;\t\t\t/* contents size */\n    int\t  pos;\t\t\t/* position */\n  }    buf;\n} FileRec, *FilePtr;\n\n\nextern int sqUnixAsyncFileSessionID;\n\nextern FilePtr asyncFileAttach(AsyncFile *f, int fd, int semaIndex);\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/B3DAcceleratorPlugin/Makefile.inc",
    "content": "XCFLAGS=$(WFLAGS) $(X_CFLAGS) $(X_INCLUDES)\nXLDFLAGS=$(X_LIBS)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/B3DAcceleratorPlugin/NOTES",
    "content": "added in sqOpenGLRenderer.h\n\t#elif defined(UNIX)\n\t# include <GL/glx.h>\n\t# include \"sqUnixOpenGL.h\"\n\n\nadded in platform.exports\n\t#ifdef UNIX\n\t  XFN(stDisplay)\n\t  XFN(stWindow)\n\t#endif\n\nadded \"-lGL\" in Makefile to line \n\tB3DAcceleratorPlugin.la : ...\n\t   ... -lGL\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/B3DAcceleratorPlugin/acinclude.m4",
    "content": "if test \"${have_gl}\" != \"yes\"; then\n  AC_PLUGIN_DISABLE\nfi\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/B3DAcceleratorPlugin/build.cmake",
    "content": "# B3DAccel depends on the main display plugin having GL (vm-display-X11) or AGL\n# (vm-display-Quartz) as a dependency.  This lets 3D work in both X11 and Quartz\n# on MacOS.\n\nEXPECT_UNDEFINED_SYMBOLS ()\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/B3DAcceleratorPlugin/config.cmake",
    "content": "IF (OPENGL_FOUND OR AGL_FOUND)\n  SET (USE_OPENGL 1)\n  PLUGIN_INCLUDE_DIRECTORIES (${OPENGL_INCLUDE_DIR})\nELSE ()\n  PLUGIN_DISABLE ()\nENDIF ()\n\nIF (OPENGL_FOUND)\n  SET (USE_X11_GLX 1)\nENDIF ()\n\nIF (AGL_FOUND)\n  SET (USE_QUARTZ_CGL 1)\n  SET (HAVE_OPENGL_GL_H 1)\nENDIF ()\n\nIF (OPENGL_FOUND OR AGL_FOUND)\n  CHECK_INCLUDE_FILE (GL/gl.h HAVE_GL_GL_H -I${OPENGL_INCLUDE_DIR})\nENDIF (OPENGL_FOUND OR AGL_FOUND)\n\nCONFIG_DEFINE (USE_OPENGL)\nCONFIG_DEFINE (USE_X11_GLX)\nCONFIG_DEFINE (USE_QUARTZ_CGL)\nCONFIG_DEFINE (HAVE_GL_GL_H)\nCONFIG_DEFINE (HAVE_OPENGL_GL_H)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/B3DAcceleratorPlugin/sqUnixOpenGL.c",
    "content": "/* sqUnixOpenGL.c -- support for accelerated 3D rendering\n * \n * Author: Bert Freudenberg <bert@isg.cs.uni-magdeburg.de>\n *\n * Modified to work with both GLX and Quartz by: Ian.Piumarta@INRIA.Fr\n * \n *   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n * \n * Note: the os-specific parts (ioGL* functions) are defined in\n *\t sqUnixX11.c (for X11/GLX on Unix) and\n *\t sqUnixQuartz.m (for Quartz/CoreGL on MacOSX).\n */\n\n#include \"sq.h\"\n#include \"B3DAcceleratorPlugin.h\"\n#include \"sqOpenGLRenderer.h\"\n#include \"SqDisplay.h\"\n\n#include <stdio.h>\n#include <sys/types.h>\n\nextern struct VirtualMachine *interpreterProxy;\nstatic struct SqDisplay\t     *dpy= 0;\n\nstatic glRenderer *current= 0;\nstatic glRenderer  renderers[MAX_RENDERER];\n\nstatic float blackLight[4]= { 0.0f, 0.0f, 0.0f, 0.0f };\n\n\nint glInitialize(void)\n{\n  int i;\n  for (i= 0;  i < MAX_RENDERER;  ++i)\n    renderers[i].used= 0;\n  if (!(dpy= ioGetDisplayModule()))\n    return 0;\n  dpy->ioGLinitialise();\n  return 1;\n}\n\n\nint glShutdown(void)\n{\n  int i;\n  for (i= 0;  i < MAX_RENDERER;  ++i)\n    if (renderers[i].used)\n      glDestroyRenderer(i);\n  dpy= 0;\n  return 1;\n}\n\n\nint glMakeCurrentRenderer(glRenderer *renderer)\n{\n  if (current == renderer)\n    return 1;\n\n  if (renderer)\n    {\n      if (!renderer->used)\n\treturn 0;\n      if (!dpy->ioGLmakeCurrentRenderer(renderer))\n\t{\n\t  DPRINTF3D(1, (fp, \"glMakeCurrentRenderer failed\\n\"));\n\t  return 0;\n\t}\n    }\n  else\n    dpy->ioGLmakeCurrentRenderer(0);\n\n  current= renderer;\n  return 1;\n}\n\n\nint glCreateRendererFlags(int x, int y, int w, int h, int flags)\n{\n  glRenderer *renderer= 0;\n  int\t      index;\n\n  if (flags & ~(B3D_HARDWARE_RENDERER | B3D_SOFTWARE_RENDERER | B3D_STENCIL_BUFFER))\n    {\n      DPRINTF3D(1, (fp, \"ERROR: Unsupported renderer flags (%d)\\r\", flags));\n      return -1;\n    }\n\n  for (index= 0;  index < MAX_RENDERER;  ++index)\n    if (!renderers[index].used)\n      break;\n\n  if (index == MAX_RENDERER)\n    {\n      DPRINTF3D(1, (fp, \"ERROR: Maximum number of renderers (%d) exceeded\\r\", MAX_RENDERER));\n      return -1;\n    }\n\n  renderer= renderers + index;\n  renderer->drawable= 0;\n  renderer->context=  0;\n  \n  DPRINTF3D(3, (fp, \"---- Creating new renderer ----\\r\\r\"));\n\n  if ((w < 0) || (h < 0))\n    {\n      DPRINTF3D(1, (fp, \"Negative extent (%i@%i)!\\r\", w, h));\n      goto fail;\n    }\n  else\n    if (dpy->ioGLcreateRenderer(renderer, x, y, w, h, flags))\n      {\n\trenderer->used\t\t= 1;\n\trenderer->bufferRect[0] = x;\n\trenderer->bufferRect[1] = y;\n\trenderer->bufferRect[2] = w;\n\trenderer->bufferRect[3] = h;\n\tif (!glMakeCurrentRenderer(renderer))\n\t  {\n\t    DPRINTF3D(1, (fp, \"Failed to make context current\\r\"));\n\t    glDestroyRenderer(index);\n\t    return -1;\n\t  }\n\tDPRINTF3D(3, (fp, \"\\r### Renderer created! ###\\r\"));\n\tglDisable(GL_LIGHTING);\n\tglDisable(GL_COLOR_MATERIAL);\n\tglDisable(GL_BLEND);\n\tglDisable(GL_ALPHA_TEST);\n\tglEnable(GL_DITHER);\n\tglEnable(GL_DEPTH_TEST);\n\tglEnable(GL_NORMALIZE);\n\tglDepthFunc(GL_LEQUAL);\n\tglClearDepth(1.0);\n\tglHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);\n\tglShadeModel(GL_SMOOTH);\n\tglLightModelfv(GL_LIGHT_MODEL_AMBIENT, blackLight);\n\tglErrorCheck();\n\n\treturn index;\n      }\n\n fail:\n  DPRINTF3D(1, (fp, \"OpenGL initialization failed\\r\"));\n  return -1;\n}\n\n\nglRenderer *glRendererFromHandle(int handle)\n{\n  DPRINTF3D(7, (fp, \"Looking for renderer id: %i\\r\", handle));\n  if ((handle >= 0) && (handle < MAX_RENDERER) && renderers[handle].used)\n    return renderers + handle;\n  return 0;\n}\n\n\nint glDestroyRenderer(int handle)\n{\n  glRenderer *renderer= glRendererFromHandle(handle);\n  DPRINTF3D(3, (fp, \"\\r--- Destroying renderer ---\\r\"));\n  if (renderer)\n    {\n      if (!glMakeCurrentRenderer(0))\n\treturn 0;\n      dpy->ioGLdestroyRenderer(renderer);\n      renderer->drawable = 0;\n      renderer->context  = 0;\n      renderer->used     = 0;\n    }\n  return 1;\n}\n\n\nint glIsOverlayRenderer(int handle)\n{\n  return 1;\n}\n\n\nint glSwapBuffers(glRenderer *renderer)\n{\n  if (renderer && renderer->used)\n    dpy->ioGLswapBuffers(renderer);\n  return 1;\n}\n\n\nint glSetBufferRect(int handle, int x, int y, int w, int h)\n{\n  glRenderer *renderer= glRendererFromHandle(handle);\n\n  if (renderer && glMakeCurrentRenderer(renderer) && (w > 0) && (h > 0))\n    {\n      renderer->bufferRect[0]= x;\n      renderer->bufferRect[1]= y;\n      renderer->bufferRect[2]= w;\n      renderer->bufferRect[3]= h;\n      dpy->ioGLsetBufferRect(renderer, x, y, w, h);\n      return 1;\n    }\n  return 0;\n}\n\n\n/* Verbose level for debugging purposes:\n   0 - print NO information ever\n   1 - print critical debug errors\n   2 - print debug warnings\n   3 - print extra information\n   4 - print extra warnings\n   5 - print information about primitive execution\n   ...\n   10 - print information about each vertex and face\n*/\nint glSetVerboseLevel(int level)\n{\n  verboseLevel= level;\n  return 1;\n}\n\n\nint glGetIntPropertyOS(int handle, int prop)\n{\n  GLint v;\n  glRenderer *renderer= glRendererFromHandle(handle);\n\n  if (renderer && glMakeCurrentRenderer(renderer))\n    switch (prop)\n      {\n      case 1: /* backface culling */\n\tif (!glIsEnabled(GL_CULL_FACE))\n\t  return 0;\n\tglGetIntegerv(GL_FRONT_FACE, &v);\n\tswitch (v)\n\t  {\n\t  case GL_CW:\treturn  1;\n\t  case GL_CCW:\treturn -1;\n\t  }\n\tbreak;\n\n      case 2: /* polygon mode */\n\tglGetIntegerv(GL_POLYGON_MODE, &v);\n\tglErrorCheck();\n\treturn v;\n\n      case 3: /* point size */\n\tglGetIntegerv(GL_POINT_SIZE, &v);\n\tglErrorCheck();\n\treturn v;\n\n      case 4: /* line width */\n\tglGetIntegerv(GL_LINE_WIDTH, &v);\n\tglErrorCheck();\n\treturn v;\n      }\n  return 0;\n}\n\n\nint glSetIntPropertyOS(int handle, int prop, int value)\n{\n  glRenderer *renderer= glRendererFromHandle(handle);\n\n  if (renderer && glMakeCurrentRenderer(renderer))\n    switch (prop)\n      {\n      case 1: /* backface culling */\n\tif (!value)\n\t  glDisable(GL_CULL_FACE);\n\telse\n\t  {\n\t    glEnable(GL_CULL_FACE);\n\t    glFrontFace((value == 1) ? GL_CCW : GL_CW);\n\t  }\n\tglErrorCheck();\n\treturn 1;\n\n      case 2: /* polygon mode */\n\tswitch (value)\n\t  {\n\t  case 0:  glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);\tbreak;\n\t  case 1:  glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);\tbreak;\n\t  case 2:  glPolygonMode(GL_FRONT_AND_BACK, GL_POINT);\tbreak;\n\t  default: return 0;\n\t  }\n\tglErrorCheck();\n\treturn 1;\n\n      case 3: /* point size */\n\tglPointSize(value);\n\tglErrorCheck();\n\treturn 1;\n\n      case 4: /* line width */\n\tglLineWidth(value);\n\tglErrorCheck();\n\treturn 1;\n      }\n  return 0;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/B3DAcceleratorPlugin/sqUnixOpenGL.h",
    "content": "#ifndef __sqUnixOpenGL_h\n#define __sqUnixOpenGL_h\n\n#include \"config.h\"\n\ntypedef struct glRenderer\n{\n  int\t  bufferRect[4];\n  int\t  viewport[4];\n  int\t  used;\n  void\t *drawable;\n  void\t *context;\n} glRenderer;\n\n#if defined(USE_X11_GLX) || defined (USE_QUARTZ_CGL)\n\n# define GL_RENDERER_DEFINED\t 1\n# define MAX_RENDERER\t\t16\n\n# if defined(HAVE_GL_GL_H)\n#   include <GL/gl.h>\n# else\n#   if defined(HAVE_OPENGL_GL_H)\n#     include <OpenGL/gl.h>\n#   else\n#     error *** cannot find gl.h\n#   endif\n# endif\n\n#endif\n\nextern sqInt ioGLinitialise(void);\nextern sqInt ioGLcreateRenderer(glRenderer *r, sqInt x, sqInt y, sqInt w, sqInt h, sqInt flags);\nextern void  ioGLdestroyRenderer(glRenderer *r);\nextern sqInt ioGLmakeCurrentRenderer(glRenderer *r);\nextern void  ioGLswapBuffers(glRenderer *r);\nextern void  ioGLsetBufferRect(glRenderer *r, sqInt x, sqInt y, sqInt w, sqInt h);\n\n#define glErrorCheck()\tERROR_CHECK\n\n\n#endif /* __sqUnixOpenGL_h */\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/B3DAcceleratorPlugin/zzz/sqUnixOpenGL.OSX",
    "content": "/* sqUnixOpenGLOSX.c -- accelerated 3D rendering on Mac OS X using CoreGL -*- C -*-\n *\n * Author: Ian.Piumarta@inria.fr\n * \n *   Copyright (C) 1996-2002 Ian Piumarta and other authors/contributors\n *     as listed elsewhere in this file.\n *   All rights reserved.\n *   \n *     You are NOT ALLOWED to distribute modified versions of this file\n *     under its original name.  If you want to modify it and then make\n *     your modifications available publicly, rename the file first.\n * \n *   This file is part of Unix Squeak.\n * \n *   This file is distributed in the hope that it will be useful, but WITHOUT\n *   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n *   FITNESS FOR A PARTICULAR PURPOSE.\n *   \n *   You may use and/or distribute this file ONLY as part of Squeak, under\n *   the terms of the Squeak License as described in `LICENSE' in the base of\n *   this distribution, subject to the following additional restrictions:\n * \n *   1. The origin of this software must not be misrepresented; you must not\n *      claim that you wrote the original software.  If you use this software\n *      in a product, an acknowledgment to the original author(s) (and any\n *      other contributors mentioned herein) in the product documentation\n *      would be appreciated but is not required.\n * \n *   2. You must not distribute (or make publicly available by any\n *      means) a modified copy of this file unless you first rename it.\n * \n *   3. This notice must not be removed or altered in any source distribution.\n * \n *   Using (or modifying this file for use) in any context other than Squeak\n *   changes these copyright conditions.  Read the file `COPYING' in the\n *   directory `platforms/unix/doc' before proceeding with any such use.\n * \n * Last edited: 2003-01-31 21:53:21 by piumarta on emilia.local.\n */\n\n#include <sys/types.h>\n#include \"sqVirtualMachine.h\"\n#include \"sqPlatformSpecific.h\"\n#include \"B3DAcceleratorPlugin.h\"\n\n#if defined (B3DX_GL)\n\n#include \"sqUnixOpenGL.h\"\n#include \"sqOpenGLRenderer.h\"\n\n#include <stdio.h>\n\nextern void *ioGLcreateView(int x, int y, int w, int h, int flags);\nextern void *ioGLcreateContext(void *drawable);\nextern int   ioGLsetCurrentContext(void *ctx);\nextern int   ioGLdestroyContext(void *ctx);\nextern int   ioGLdestroyView(void *drawable);\nextern int   ioGLflushBuffer(void *drawable, void *ctx);\n\nint verboseLevel= 1;\n\nextern struct VirtualMachine *interpreterProxy;\n\nstatic glRenderer *current= 0;\nstatic glRenderer  renderers[MAX_RENDERER];\n\nstatic float blackLight[4]= { 0.0f, 0.0f, 0.0f, 0.0f };\n\n\n#define TRACE() fprintf(stderr, \"--- %s\\n\", __PRETTY_FUNCTION__)\n\nint glInitialize(void)\n{\n  int i;\n  TRACE();\n  for (i= 0;  i < MAX_RENDERER;  ++i)\n    renderers[i].used= 0;\n  return 1;\n}\n\n\nint glShutdown(void) { TRACE(); }\n\n\nint glMakeCurrentRenderer(glRenderer *renderer)\n{\n  GLboolean ok;\n  GLint err;\n\n  //DPRINTF(\"glMakeCurrentRenderer(%p)\\n\", renderer);\n\n  if (current == renderer)\n    return 1;\n  if (renderer && ((!renderer->used) || (!renderer->context)))\n    return 0;\n  ok= ioGLsetCurrentContext(renderer ? renderer->context : 0);\n  if ((err= glGetError()) != GL_NO_ERROR)\n    fprintf(stderr, \"glMakeCurrentRenderer: %s\\n\", CGLErrorString(err));\n  if (!ok)\n    {\n      fprintf(stderr, \"glMakeCurrentRenderer: glSetCurrentContext failed\\n\");\n      return 0;\n    }\n  current= renderer;\n  return 1;\n}\n\n\nint glCreateRendererFlags(int x, int y, int w, int h, int flags)\n{\n  void       *drawable= 0;\n  void       *context= 0;\n  glRenderer *renderer= 0;\n  int i;\n\n  //printf(\"glCreateRendererFlags(%d, %d, %d, %d, 0x%x)\\n\", x, y, w, h, flags);\n  for (i= 0;  i < MAX_RENDERER;  ++i)\n    if (!renderers[i].used)\n      break;\n  if (i == MAX_RENDERER)\n    {\n      fprintf(stderr, \"glCreateRenderer: too many renderers\\n\");\n      return -1;\n    }\n  renderer= renderers+i;\n  //printf(\"  renderer = %p handle %d\\n\", renderer, i);\n  \n  drawable= ioGLcreateView(x, y, w, h, flags);\n  //printf(\"  drawable = %p\\n\", drawable);\n  if (!drawable)\n    return -1;\n  context= ioGLcreateContext(drawable);\n  //printf(\"  context = %p\\n\", context);\n  if (!context)\n    {\n      ioGLdestroyView(drawable);\n      return -1;\n    }\n  renderer->context= context;\n  renderer->drawable= drawable;\n  renderer->used= 1;\n#if 0\n  renderer->finished = 0;\n#endif\n  renderer->bufferRect[0] = x;\n  renderer->bufferRect[1] = y;\n  renderer->bufferRect[2] = w;\n  renderer->bufferRect[3] = h;\n  glMakeCurrentRenderer(renderer);\n  //DPRINTF(\"    vendor:     %s\\n\", glGetString(GL_VENDOR));\n  //DPRINTF(\"    renderer:   %s\\n\", glGetString(GL_RENDERER));\n  //DPRINTF(\"    version:    %s\\n\", glGetString(GL_VERSION));\n  //DPRINTF(\"    extensions: %s\\n\", glGetString(GL_EXTENSIONS));\n  ERROR_CHECK;\n  //DPRINTF(\"   renderer created, handle = %d\\n\", i);\n  /* setup user context */\n  glDisable(GL_LIGHTING);\n  glDisable(GL_COLOR_MATERIAL);\n  glDisable(GL_BLEND);\n  glDisable(GL_ALPHA_TEST);\n  glEnable(GL_DITHER);\n  glEnable(GL_DEPTH_TEST);\n  glEnable(GL_NORMALIZE);\n  glDepthFunc(GL_LEQUAL);\n  glClearDepth(1.0);\n  glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);\n  glShadeModel(GL_SMOOTH);\n  glLightModelfv(GL_LIGHT_MODEL_AMBIENT, blackLight);\n  ERROR_CHECK;\n  return i;\n}\n\n\nglRenderer *glRendererFromHandle(int handle)\n{\n  if ((handle < 0) || (handle >= MAX_RENDERER))\n    {\n      fprintf(stderr, \"GL: illegal handle: %d\\n\", handle);\n      return 0;\n    }\n  return renderers+0;\n}\n\n\nint glDestroyRenderer(int handle)\n{\n  glRenderer *renderer= glRendererFromHandle(handle);\n  TRACE();\n  if (!renderer)\n    return 1; /* already destroyed */\n  if (!glMakeCurrentRenderer(0))\n    return 0;\n  ioGLdestroyContext(renderer->context);\n  ioGLdestroyView(renderer->drawable);\n  renderer->context= 0;\n  renderer->used= 0;\n  return 1;\n}\n\n\nint glIsOverlayRenderer(int handle)\n{\n  TRACE();\n  return 1;\n}\n\n\nint glSwapBuffers(glRenderer *renderer)\n{\n  ioGLflushBuffer(renderer->drawable, renderer->context);\n}\n\n\nint glSetBufferRect(int handle, int x, int y, int w, int h)\n{\n  glRenderer *renderer= 0;\n  printf(\"glSetBufferRect(%d, %d, %d, %d, %d)\\n\", handle, x, y, w, h);\n  renderer= glRendererFromHandle(handle);\n\n  if (!renderer || !glMakeCurrentRenderer(renderer))\n    return 0;\n  if (w < 1 || h < 1)\n    return 0;\n  renderer->bufferRect[0]= x;\n  renderer->bufferRect[1]= y;\n  renderer->bufferRect[2]= w;\n  renderer->bufferRect[3]= h;\n\n  ioGLsetBufferRect(renderer->context);\n\n  return 1;\n}\n\n\nint glSetVerboseLevel(int level) { TRACE(); /*exit(1);*/ }\n\nint glGetIntPropertyOS(int handle, int prop) { TRACE(); exit(1); }\n\nint glSetIntPropertyOS(int handle, int prop, int value) { TRACE(); exit(1); }\n\n\n#endif /* defined(B3DX_GL) */\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/B3DAcceleratorPlugin/zzz/sqUnixOpenGL.X11",
    "content": "/* sqUnixOpenGLX11.c -- support for accelerated 3D rendering under X11 -*- C -*-\n *\n * Author: Bert Freudenberg <bert@isg.cs.uni-magdeburg.de>\n * \n * Based on Andreas Raab's sqWin32OpenGL.c\n * \n * Last edited: 2003-01-31 22:40:39 by piumarta on emilia.local.\n *\n * History\n *    Nov 02: added TGraphicsTest conformant log support\n *    Oct 02: added Tea initialization support w/ stencil\n *    May 01: initial revision\n */\n\n#include <sys/types.h>\n#include \"sqVirtualMachine.h\"\n#include \"sqConfig.h\"\n#include \"sqPlatformSpecific.h\"\n#include \"B3DAcceleratorPlugin.h\"\n\n#if defined (B3DX_GL)\n\n#include \"sqUnixOpenGL.h\"\n#include <X11/X.h>\n#include <stdio.h>\n\n#include \"sqOpenGLRenderer.h\"\n\n/* Plugin refs */\nextern struct VirtualMachine *interpreterProxy;\n\nstatic void printVisual(XVisualInfo* visinfo);\nstatic void listVisuals();\n\nstatic Display *stDisplay= NULL; /* Squeak's display */\nstatic Window   stWindow=  0;    /* Squeak's main window */\n\nstatic glRenderer *current= NULL;\nstatic glRenderer allRenderer[MAX_RENDERER];\n\n\nstatic int visualAttributes[]= {\n  GLX_STENCIL_SIZE,     0,  /* filled in later - must be first item! */\n  GLX_ALPHA_SIZE,       1,  /* filled in later - must be second item! */\n  GLX_RGBA,                 /* no indexed colors */\n  GLX_DOUBLEBUFFER,         /* will swap */\n  GLX_LEVEL,            0,  /* frame buffer, not overlay */\n  GLX_DEPTH_SIZE,       16, /* decent depth */   \n  GLX_AUX_BUFFERS,      0,  /* no aux buffers */\n  GLX_ACCUM_RED_SIZE,   0,  /* no accumulation */\n  GLX_ACCUM_GREEN_SIZE, 0,\n  GLX_ACCUM_BLUE_SIZE,  0,\n  GLX_ACCUM_ALPHA_SIZE, 0,\n  None\n};\n\nstatic float blackLight[4]= { 0.0f, 0.0f, 0.0f, 0.0f };\n\n/* Verbose level for debugging purposes:\n   0 - print NO information ever\n   1 - print critical debug errors\n   2 - print debug warnings\n   3 - print extra information\n   4 - print extra warnings\n   5 - print information about primitive execution\n\n   10 - print information about each vertex and face\n*/\nint verboseLevel= 1;\n\n\n/*** create / destroy a renderer ***/\n\nint glCreateRendererFlags(int x, int y, int w, int h, int flags)\n{\n  glRenderer *renderer;\n  XVisualInfo* visinfo= 0;\n  int index= -1;\n\n  if (flags & ~(B3D_HARDWARE_RENDERER | B3D_SOFTWARE_RENDERER | B3D_STENCIL_BUFFER))\n    {\n      DPRINTF3D(1, (fp, \"ERROR: Unsupported renderer flags (%d)\\r\", flags));\n      return -1;\n    }\n\n  if (flags & B3D_STENCIL_BUFFER)\n    visualAttributes[1]= 1;\n  else \n    visualAttributes[1]= 0;\n\n  /* find unused renderer */\n  {\n    int i;\n    for (i= 0; i < MAX_RENDERER; i++)\n      {\n\tif (!allRenderer[i].used)\n\t  {\n\t    index= i;\n\t    break;\n\t  }\n      }\n  }\n\n  if (index == -1)\n    {\n      DPRINTF3D(1, (fp, \"ERROR: Maximum number of renderers (%d) exceeded\\r\", MAX_RENDERER));\n      return 0;\n    }\n\n\n  renderer= &allRenderer[index];\n  renderer->used= True;\n  renderer->window= 0;\n  renderer->context= NULL;\n\n  DPRINTF3D(3, (fp, \"---- Creating new renderer ----\\r\\r\"));\n\n  /* sanity checks */\n\n  if (w < 0 || h < 0)\n    {\n      DPRINTF3D(1, (fp, \"Negative extent (%i@%i)!\\r\", w, h));\n      goto FAILED;\n    }\n\n  /* choose visual and create context */\n\n  if (verboseLevel >= 3)\n    listVisuals();\n\n  {\n    visinfo= glXChooseVisual(stDisplay, \n\t\t\t     DefaultScreen(stDisplay), \n\t\t\t     visualAttributes);\n\n    if (!visinfo)\n      {\n\t/* retry without alpha */\n\tvisualAttributes[3]= 0;\n\tvisinfo= glXChooseVisual(stDisplay, \n\t\t\t\t DefaultScreen(stDisplay), \n\t\t\t\t visualAttributes);\n      }\n\n    if (!visinfo)\n      {\n\tDPRINTF3D(1, (fp, \"No OpenGL visual found!\\r\"));\n\tgoto FAILED;\n      }\n\n    DPRINTF3D(3, (fp, \"\\r#### Selected GLX visual ID 0x%lx ####\\r\", \n\t\tvisinfo->visualid));\n    if (verboseLevel >= 3)\n      printVisual(visinfo);\n\n    renderer->context= glXCreateContext(stDisplay, visinfo, 0, GL_TRUE);\n\n    if (!renderer->context)\n      {\n\tDPRINTF3D(1, (fp, \"Creating GLX context failed!\\r\"));\n\tgoto FAILED;\n      }\n\n    DPRINTF3D(3, (fp, \"\\r#### Created GLX context ####\\r\"  ));\n\n    /* create window */\n    {\n      XSetWindowAttributes attributes;\n      unsigned long valuemask= 0;\n\n      attributes.colormap= XCreateColormap(stDisplay,\n\t\t\t\t\t   DefaultRootWindow(stDisplay),\n\t\t\t\t\t   visinfo->visual,\n\t\t\t\t\t   AllocNone);\n      valuemask|= CWColormap;\n\n      attributes.background_pixel= BlackPixel(stDisplay, DefaultScreen(stDisplay));\n      valuemask|= CWBackPixel;\n\n      renderer->window= XCreateWindow(stDisplay, stWindow, x, y, w, h, 0,\n\t\t\t\t    visinfo->depth, InputOutput, visinfo->visual, \n\t\t\t\t    valuemask, &attributes);\n      if (!renderer->window) \n\t{\n\t  DPRINTF3D(1, (fp, \"Failed to create client window\\r\"));\n\t  goto FAILED;\n\t}\n\n      XMapWindow(stDisplay, renderer->window);\n\n    }\n\n    DPRINTF3D(3, (fp, \"\\r#### Created window ####\\r\"  ));\n\n    XFree(visinfo);\n    visinfo= 0;\n  }\n\n  /* Make the context current */\n  if (!glXMakeCurrent(stDisplay, renderer->window, renderer->context))\n    {\n      DPRINTF3D(1, (fp, \"Failed to make context current\\r\"));\n      goto FAILED;\n    }\n   \n  renderer->bufferRect[0]= x;\n  renderer->bufferRect[1]= y;\n  renderer->bufferRect[2]= w;\n  renderer->bufferRect[3]= h;\n\n  DPRINTF3D(3, (fp, \"\\r### Renderer created! ###\\r\"));\n\n  /* setup user context */\n  glDisable(GL_LIGHTING);\n  glDisable(GL_COLOR_MATERIAL);\n  glDisable(GL_BLEND);\n  glDisable(GL_ALPHA_TEST);\n  glEnable(GL_DITHER);\n  glEnable(GL_DEPTH_TEST);\n  glEnable(GL_NORMALIZE);\n  glDepthFunc(GL_LEQUAL);\n  glClearDepth(1.0);\n  glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);\n  glShadeModel(GL_SMOOTH);\n  glLightModelfv(GL_LIGHT_MODEL_AMBIENT, blackLight);\n  ERROR_CHECK;\n  return index;\n\nFAILED:\n  /* do necessary cleanup */\n  DPRINTF3D(1, (fp, \"OpenGL initialization failed\\r\"));\n\n  if (visinfo)\n    XFree(visinfo);\n  if (renderer->context)\n    glXDestroyContext(stDisplay, renderer->context);\n  if (renderer->window)\n    XDestroyWindow(stDisplay, renderer->window);\n\n  return -1;\n}\n\n\nint glDestroyRenderer(int handle)\n{\n  glRenderer *renderer= glRendererFromHandle(handle);\n\n  DPRINTF3D(3, (fp, \"\\r--- Destroying renderer ---\\r\"));\n\n  if (!renderer)\n    return 1; /* already destroyed */\n\n  if (!glMakeCurrentRenderer(NULL))\n    return 0;\n\n  glXDestroyContext(stDisplay, renderer->context);\n  XDestroyWindow(stDisplay, renderer->window);\n\n  renderer->window= 0;\n  renderer->context= NULL;\n  renderer->used= False;\n\n  return 1;\n}\n\n\n\n/*** helpers ***/\n\n\nglRenderer *glRendererFromHandle(int handle)\n{\n  DPRINTF3D(7, (fp, \"Looking for renderer id: %i\\r\", handle));\n\n  if (handle < 0 || handle >= MAX_RENDERER) \n    return NULL;\n\n  if (allRenderer[handle].used)\n    return allRenderer+handle;\n\n  return NULL;\n}\n\n\nint glIsOverlayRenderer(int handle)\n{\n  /* we always use overlay renderers */\n  return 1;\n}\n\n\nint glSwapBuffers(glRenderer *renderer)\n{\n  if (!renderer || !renderer->used)\n    return 0;\n\n  glXSwapBuffers(stDisplay, renderer->window);\n\n  return 1;\n}\n\n\nint glMakeCurrentRenderer(glRenderer *renderer)\n{\n  if (current == renderer)\n    return 1;\n\n  if (renderer && !renderer->used)\n    return 0;\n\n  if (renderer)\n    {\n      if (!glXMakeCurrent(stDisplay, renderer->window, renderer->context))\n\t{\n\t  DPRINTF3D(1, (fp, \"Failed to make context current\\r\"));\n\t  return 0;\n\t}\n    }\n  else\n    {\n      glXMakeCurrent(stDisplay, 0, NULL);\n    }\n  \n  current= renderer;\n  return 1;\n}\n\n\nint glSetBufferRect(int handle, int x, int y, int w, int h)\n{\n  glRenderer *renderer= glRendererFromHandle(handle);\n\n  if (!renderer || !glMakeCurrentRenderer(renderer))\n    return 0;\n\n  if (w < 1 || h < 1)\n    return 0;\n\n  XMoveResizeWindow(stDisplay, renderer->window, x, y, w, h);\n\n  renderer->bufferRect[0]= x;\n  renderer->bufferRect[1]= y;\n  renderer->bufferRect[2]= w;\n  renderer->bufferRect[3]= h;\n\n  return 1;\n}\n\n\nint glSetVerboseLevel(int level)\n{\n  verboseLevel= level;\n  return 1;\n}\n\n\nint glGetIntPropertyOS(int handle, int prop)\n{\n  GLint v;\n  glRenderer *renderer= glRendererFromHandle(handle);\n  if (!renderer || !glMakeCurrentRenderer(renderer))\n    return 0;\n\n  switch(prop) {\n  case 1: /* backface culling */\n    if (!glIsEnabled(GL_CULL_FACE)) return 0;\n    glGetIntegerv(GL_FRONT_FACE, &v);\n    if (v == GL_CW) return 1;\n    if (v == GL_CCW) return -1;\n    return 0;\n  case 2: /* polygon mode */\n    glGetIntegerv(GL_POLYGON_MODE, &v);\n    ERROR_CHECK;\n    return v;\n  case 3: /* point size */\n    glGetIntegerv(GL_POINT_SIZE, &v);\n    ERROR_CHECK;\n    return v;\n  case 4: /* line width */\n    glGetIntegerv(GL_LINE_WIDTH, &v);\n    ERROR_CHECK;\n    return v;\n  }\n  return 0;\n}\n\n\nint glSetIntPropertyOS(int handle, int prop, int value)\n{\n  glRenderer *renderer= glRendererFromHandle(handle);\n  if (!renderer || !glMakeCurrentRenderer(renderer))\n    return 0;\n\n  switch(prop) {\n  case 1: /* backface culling */\n    if (!value) {\n      glDisable(GL_CULL_FACE);\n      ERROR_CHECK;\n      return 1;\n    }\n    glEnable(GL_CULL_FACE);\n    glFrontFace(value == 1 ? GL_CCW : GL_CW);\n    ERROR_CHECK;\n    return 1;\n  case 2: /* polygon mode */\n    if (value == 0) glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);\n    else if (value == 1) glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);\n    else if (value == 2) glPolygonMode(GL_FRONT_AND_BACK, GL_POINT);\n    else return 0;\n    ERROR_CHECK;\n    return 1;\n  case 3: /* point size */\n    glPointSize(value);\n    ERROR_CHECK;\n    return 1;\n  case 4: /* line width */\n    glLineWidth(value);\n    ERROR_CHECK;\n    return 1;\n  }\n  return 0;\n}\n\n\n/* GLX_CONFIG_CAVEAT might not be supported */\n/* but the test below is worded so it does not matter */\n#ifndef GLX_CONFIG_CAVEAT\n# define GLX_CONFIG_CAVEAT  0x20\n# define GLX_SLOW_CONFIG    0x8001\n#endif\n\nstatic void printVisual(XVisualInfo* visinfo)\n{\n  int isOpenGL; \n  glXGetConfig(stDisplay, visinfo, GLX_USE_GL, &isOpenGL);\n  if (isOpenGL) \n    {\n      int slow= 0;\n      int red, green, blue, alpha, stencil, depth;\n      glXGetConfig(stDisplay, visinfo, GLX_CONFIG_CAVEAT, &slow);\n      glXGetConfig(stDisplay, visinfo, GLX_RED_SIZE,      &red);\n      glXGetConfig(stDisplay, visinfo, GLX_GREEN_SIZE,    &green);\n      glXGetConfig(stDisplay, visinfo, GLX_BLUE_SIZE,     &blue);\n      glXGetConfig(stDisplay, visinfo, GLX_ALPHA_SIZE,    &alpha);\n      glXGetConfig(stDisplay, visinfo, GLX_STENCIL_SIZE,  &stencil);\n      glXGetConfig(stDisplay, visinfo, GLX_DEPTH_SIZE,    &depth);\n\n      if (slow != GLX_SLOW_CONFIG)\n\tDPRINTF3D(3, (fp,\"===> OpenGL visual\\r\"))\n      else\n\tDPRINTF3D(3, (fp,\"---> slow OpenGL visual\\r\"));\n\n      DPRINTF3D(3, (fp,\"rgbaBits = %i+%i+%i+%i\\r\", red, green, blue, alpha));\n      DPRINTF3D(3, (fp,\"stencilBits = %i\\r\", stencil));\n      DPRINTF3D(3, (fp,\"depthBits = %i\\r\", depth));\n    }\n}\n\nstatic void listVisuals()\n{\n  XVisualInfo* visinfo;\n  int nvisuals, i;\n   \n  visinfo= XGetVisualInfo(stDisplay, VisualNoMask, NULL, &nvisuals);\n\n  for (i= 0; i < nvisuals; i++)\n    {\n      DPRINTF3D(3, (fp,\"#### Checking pixel format (visual ID 0x%lx)\\r\", visinfo[i].visualid));\n      printVisual(&visinfo[i]);\n    }\n  XFree(visinfo);\n}\n\n\n/*** Module initializers ***/\n\n\n\nint glInitialize(void)\n{\n  int i, p;\n  int fn;\n\n  fn= interpreterProxy->ioLoadFunctionFrom(\"ioGetDisplay\", NULL);\n  stDisplay= (fn ? ((Display *(*)(void))fn)() : 0);\n  if (!stDisplay)\n    {\n      DPRINTF3D(1,(fp,\"ERROR: Failed to look up stDisplay\\r\"));\n      return 0;\n    }\n\n  fn= interpreterProxy->ioLoadFunctionFrom(\"ioGetWindow\", NULL);\n  stWindow= (fn ? ((Window (*)(void))fn)() : 0);\n  if (!stWindow)\n    {\n      DPRINTF3D(1,(fp,\"ERROR: Failed to look up stWindow\\r\"));\n      return 0;\n    }\n\n  for (i= 0; i < MAX_RENDERER; i++)\n    {\n      allRenderer[i].used= False;\n    }\n\n  return 1;\n}\n\n\nint glShutdown(void)\n{\n  int i;\n\n  for (i=0; i< MAX_RENDERER; i++)\n    {\n      if (allRenderer[i].used)\n\t{\n\t  glDestroyRenderer(i);\n\t}\n    }\n\n  return 1;\n}\n\n#endif /* defined(B3DX_GL) */\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/CameraPlugin/sqCamera.c",
    "content": "/*\n *  V4L2 for Scratch (Derek O'Connell, 2009)\n *\n *  This code can be used and distributed without restrictions.\n *\n */\n\n#include \"sq.h\"\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <assert.h>\n\n#include <getopt.h>   /* getopt_long() */\n\n#include <fcntl.h>    /* low-level i/o */\n#include <unistd.h>\n#include <errno.h>\n#include <malloc.h>\n#include <sys/stat.h>\n#include <sys/types.h>\n#include <sys/time.h>\n#include <sys/mman.h>\n#include <sys/ioctl.h>\n#include <dlfcn.h>\n\n#include <asm/types.h>\t  /* for videodev2.h */\n\n#include <linux/videodev2.h>\n\n/* >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> */\n/*\n#define USE_LIBV4L2x\n#ifdef USE_LIBV4L2\n#include <libv4l2.h>\n#endif\n*/\n\nvoid *hLibv4l2 = NULL;\n\nint (*vd_open)(const char *, int, ...);\nint (*vd_close)(int);\nint (*vd_dup)(int);\nint (*vd_ioctl)(int, unsigned long int, ...);\nssize_t (*vd_read)(int, void *, size_t);\nvoid * (*vd_mmap)(void *, size_t, int, int, int, int64_t);\nint (*vd_munmap)(void *, size_t);\n\n/* <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< */\n\n\n#define CLEAR(x) memset (&(x), 0, sizeof (x))\n\ntypedef enum {\n\tIO_METHOD_READ,\n\tIO_METHOD_MMAP,\n\tIO_METHOD_USERPTR,\n} io_method;\n\nstruct buffer {\n\tvoid *  start;\n\tsize_t  length;\n};\n\n\nstruct camInfo_t {\n\tint devNum;\n\tint\tfileDesc;\n\tint bmWidth, bmHeight;\n\t\n\tio_method ioMethod;\n\tint pixelformat;\n\tstruct buffer *\tbuffers;\n\tunsigned int nBuffers;\n\n\tstruct v4l2_buffer read_buf;\n\n\tvoid *sqBuffer;\n\tlong sqBufferBytes;\n\tlong sqPixels;\n\n\tlong frameCount;\n} camInfo[10];\n\ntypedef struct camInfo_t *camPtr;\n\nstatic char * videoDevName0 = \"/dev/video0\";\n\n/* ================================== FUNCTION PROTOTYPES */\n\n/* LIBRARY CONSTRUCTOR/DESCTRUCTOR */\n\nvoid __attribute__ ((constructor)) libCon(void);\nvoid __attribute__ ((destructor)) libDes(void);\n\n\n/* UTILITY */\n\ninline int camIsOpen(  camPtr cam) { return (-1 != cam->fileDesc); }\ninline int camIsClosed(camPtr cam) { return (-1 == cam->fileDesc); }\n\n\n/* V4L ACCESS */\n\n\n/* SQUEAK INTERFACE */\n\nsqInt CameraGetParam(int camNum, int paramNum);\nsqInt CameraGetFrame(int camNum, unsigned char* buf, int pixelCount);\nsqInt CameraExtent(int camNum);\nchar* CameraName(int camNum);\nvoid CameraClose(int camNum);\nsqInt CameraOpen(int camNum, int frameWidth, int frameHeight);\n\n\n/* ================================== ??? */\n\n\n/* LIBRARY CONSTRUCTOR/DESCTRUCTOR */\n\nvoid __attribute__ ((constructor)) \nlibCon(void)\n{\n  int devNum;\n  camPtr cam;\n\n  vd_open = open;\n  vd_close = close;\n  vd_dup = dup;\n  vd_ioctl = ioctl;\n  vd_read = read;\n  vd_mmap = mmap;\n  vd_munmap = munmap;\n\n/*  printf(\"libv4l2: use if available...\");\n*/\nhLibv4l2 = dlopen(\"libv4l2.so\", RTLD_LAZY);\n  if (hLibv4l2) \n  {\n/*\t  printf(\"yay!\\n\");\n*/  \n\t  vd_open\t= dlsym(hLibv4l2, \"v4l2_open\");\n\t  vd_close \t= dlsym(hLibv4l2, \"v4l2_close\");\n\t  vd_dup \t= dlsym(hLibv4l2, \"v4l2_dup\");\n\t  vd_ioctl \t= dlsym(hLibv4l2, \"v4l2_ioctl\");\n\t  vd_read \t= dlsym(hLibv4l2, \"v4l2_read\");\n\t  vd_mmap \t= dlsym(hLibv4l2, \"v4l2_mmap\");\n\t  vd_munmap = dlsym(hLibv4l2, \"v4l2_munmap\");\n  } else {\n/*\t  printf(\"nay, %s\\n\", dlerror());\n*/\n  }\n\n  for (devNum = 0; devNum < 10; ++devNum) {\n\tcam = &camInfo[devNum];\n\n\tCLEAR(*cam);\n\n\tcam->devNum\t\t\t\t= devNum;\n\tcam->fileDesc\t\t\t= -1;\n\tcam->ioMethod\t\t\t= IO_METHOD_MMAP;\n\tcam->read_buf.type\t\t= V4L2_BUF_TYPE_VIDEO_CAPTURE;\n\tcam->read_buf.memory\t= V4L2_MEMORY_MMAP;\n\tcam->nBuffers \t\t\t= 1;\n\n/*\tPixel format now auto selected according to ease/speed of conversion\n\tcam->pixelformat\t\t= V4L2_PIX_FMT_YUYV;\n\tcam->pixelformat\t\t= V4L2_PIX_FMT_RGB24;\n*/\n\n/*\n\tcam->fileDesc = 0;\n\tcam->bmWidth = 0;\n\tcam->bmHeight = 0;\n\tcam->buffers = NULL;\n\tcam->nBuffers = 0;\n\tcam->read_buf = NULL;\n\tcam->sqBuffer = 0;\n\tcam->sqBufferBytes = 0;\n\tcam->sqPixels = 0;\n\tcam->frameCount = 0;\n*/\n  }\n}\n\nvoid __attribute__ ((destructor)) \nlibDes(void)\n{\n  int camNum;\n  for (camNum = 1; camNum < 11; ++camNum)\n\t  CameraClose(camNum);\n/*  \n  if (hLibv4l2)\n\t  dlclose(hLibv4l2);\n*/\n}\n\n\n/* V4L ACCESS */\n\nstatic int \nxioctl (camPtr cam, int request, void * arg) \n{\n\tint r;\n\n\tdo r = vd_ioctl (cam->fileDesc, request, arg);\n\t  while (-1 == r && EINTR == errno);\n\n\treturn r;\n}\n\n\n/* >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n  from: palettes.c in VideoForLinuxPlugin\n  from: http://en.wikipedia.org/wiki/YUV422\n\n  Originally (here) a quick hack for XO-1 but libv4l\n  version worked anyway.\n  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> */\n\ninline unsigned char clipPixel(const int pixel) {\n    int result;\n\n    result = ((pixel < 0) ? 0 : pixel);\n    return (unsigned char) ((result > 255) ? 255: result);\n}\n\ninline void \nconvertPixelYUV444toARGB32(\n\t\t\t   const unsigned char y,\n               const unsigned char u,\n               const unsigned char v,\n               unsigned char* dest)\n{\n    const int C = (y - 16) * 298 + 128;\n    const int D = u - 128;\n    const int E = v - 128;\n\n    /* ARGB */\n    dest[0] = clipPixel(( C + 516 * D          ) >> 8);\n    dest[1] = clipPixel(( C - 100 * D - 208 * E) >> 8);\n    dest[2] = clipPixel(( C           + 409 * E) >> 8);\n    dest[3] = 255;\n\n}\n\ninline void \nconvertImageYUYVToARGB32 (camPtr cam, int bufIdx)\n{\n\tint i;\n\n\tconst unsigned char* src = cam->buffers[bufIdx].start;\n\tunsigned char* dst = cam->sqBuffer;\n\tunsigned long int *pdst;\n\tunsigned long int pixelCount = cam->sqPixels;\n\n\tunsigned char u, y1, v, y2;\n\n\tfor (i = 0; i < pixelCount; i += 2) {\n\t\ty1 = *src++;\n\t\tu  = *src++;\n\t\ty2 = *src++;\n\t\tv  = *src++;\n\n\t\tconvertPixelYUV444toARGB32(y1, u, v, dst);\n\t\tpdst = (unsigned long *)dst;\n\t\tdst += 4;\n\n\t\tif (y2 == y1)\n\t\t  *(unsigned long *)dst = *pdst;\n\t\telse\n\t\t  convertPixelYUV444toARGB32(y2, u, v, dst);\n\t\t\n\t\tdst += 4;\n\t}\n}\n\n/* <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< */\n\nstatic void \nconvertImageRGB24toARGB32 (camPtr cam, int bufIdx) /* const void *src, const void *dst) */\n{\n\tunsigned char \t  *src = cam->buffers[bufIdx].start;\n\tunsigned long int *dst = cam->sqBuffer;\n\tunsigned long int pixelCount = cam->sqPixels;\n\tunsigned long int pixel;\n\tint i;\n\n\tif (0 == dst) return;\n\n\tfor ( i = 0; i < pixelCount; i++) {\n\t\tpixel = 0xFF000000 | (*src++ << 16);\n\t\tpixel = pixel | (*src++ << 8);\n\t\t*dst++  = pixel | *src++;\n\t}\n}\n\n\nstatic void \nconvertImageRGB444toARGB32 (camPtr cam, int bufIdx) /* const void *src, const void *dst) */\n{\n\tunsigned char \t  *src = cam->buffers[bufIdx].start;\n\tunsigned long int *dst = cam->sqBuffer;\n\tunsigned long int pixelCount = cam->sqPixels;\n\tunsigned long int r,g,b,pixel;\n\tint i;\n\n\tif (0 == dst) return;\n\n\t/* Byte0: (g)ggg(b)bbb, Byte1: xxxx(r)rrr */\n\n\tfor ( i = 0; i < pixelCount; i++) {\n\t  r = *src << 4;\n\t  g = *src++ & 0xF0;\n\t  b = (*src++ & 0x0F) << 4;\n\t  pixel = 0xFF000000;\n\t  pixel |= (r << 16);\n\t  pixel |= (g <<  8);\n\t  pixel |= b;\n\t  *dst++ = pixel;\n\t}\n}\n\n\nstatic void \nconvertImageRGB565toARGB32 (camPtr cam, int bufIdx) /* const void *src, const void *dst) */\n{\n\tunsigned char \t  *src = cam->buffers[bufIdx].start;\n\tunsigned long int *dst = cam->sqBuffer;\n\tunsigned long int pixelCount = cam->sqPixels;\n\tunsigned long int r,g,b,pixel;\n\tint i;\n\n\tif (0 == dst) return;\n\n\t/* Byte0: ggg(r)rrrr, Byte1: (b)bbbb(g)gg */\n\n\tfor ( i = 0; i < pixelCount; i++) {\n\t  r = (*src & 0x1F) << 3;\n\t  g = (*src++ & 0xE0) >> 5;\n\t  g |= (*src & 0x07) << 5;\n\t  b = *src++ & 0xF8;\n\t  pixel = 0xFF000000;\n\t  pixel |= (b << 16);\n\t  pixel |= (g <<  8);\n\t  pixel |= r;\n\t  *dst++ = pixel;\n\t}\n}\n\n\nvoid\nconvertImage (camPtr cam, int bufIdx)\n{\n\t/* func pts to be used at later date */\n  \n\tif (cam->pixelformat == V4L2_PIX_FMT_YUYV) {\n\t\tconvertImageYUYVToARGB32 (cam, bufIdx);\n\t\treturn;\n\t}\n\n\tif (cam->pixelformat == V4L2_PIX_FMT_RGB565) {\n\t\tconvertImageRGB565toARGB32 (cam, bufIdx);\n\t\treturn;\n\t}\n\t\n\tif (cam->pixelformat == V4L2_PIX_FMT_RGB444) {\n\t\tconvertImageRGB444toARGB32 (cam, bufIdx);\n\t\treturn;\n\t}\n\t\n\tif (cam->pixelformat == V4L2_PIX_FMT_RGB24) {\n\t\tconvertImageRGB24toARGB32 (cam, bufIdx);\n\t\treturn;\n\t}\n}\n\n\nstatic int \nread_frame (camPtr cam) \n{\n\tstruct v4l2_buffer buf;\n\n\tcam->frameCount += 1;\n\n\tCLEAR (buf);\n\tbuf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;\n\tbuf.memory = V4L2_MEMORY_MMAP;\n\n\tif (-1 == xioctl (cam, VIDIOC_DQBUF, &buf)) {\n\t\tswitch (errno) {\n\t\t\tcase EAGAIN:\n\t\t\tcase EIO:\n\t\t\t\treturn 0;\n\t\t\tdefault:\n\t\t\t\treturn -1;\n\t\t}\n\t}\n\n\tif (buf.index < cam->nBuffers)\n\t\tconvertImage (cam, buf.index);\n\n\tif (-1 == xioctl (cam, VIDIOC_QBUF, &buf)) return -1;\n\n\treturn 0;\n}\n\n\nstatic int \ngetFrame(camPtr cam) \n{\n\tint fd = cam->fileDesc;\n\tunsigned int retry;\n\tfd_set fds;\n\tstruct timeval tv;\n\tint r;\n\n\tretry = 1;\n\n\twhile (retry-- > 0) {\n\t\tFD_ZERO (&fds);\n\t\tFD_SET (fd, &fds);\n\n\t\t/* Timeout. */\n\t\ttv.tv_sec = 1;\n\t\ttv.tv_usec = 0;\n\n\t\tr = select (fd + 1, &fds, NULL, NULL, &tv);\n\n\t\tif (-1 == r) {\n\t\t\tif (EINTR == errno)\n\t\t\t\tcontinue;\n\n\t\t\treturn -1;\n\t\t}\n\n\t\tif (0 == r) return -1;\n\t\tif (0 == read_frame (cam)) return 0;\n\n\t\t/* EAGAIN - retry */\n\t}\n}\n\n\nstatic int \nstream_off (camPtr cam) \n{\n\tenum v4l2_buf_type type;\n\ttype = V4L2_BUF_TYPE_VIDEO_CAPTURE;\n\txioctl (cam, VIDIOC_STREAMOFF, &type);\n\treturn 0;\n}\n\n\nstatic int \nstream_on (camPtr cam) \n{\n\tenum v4l2_buf_type type;\n\ttype = V4L2_BUF_TYPE_VIDEO_CAPTURE;\n\tif (-1 == xioctl (cam, VIDIOC_STREAMON, &type)) return -1;\n\treturn 0;\n}\n\n\nstatic int \nuninit_device (camPtr cam) \n{\n\tunsigned int i;\n\n\tfor (i = 0; i < cam->nBuffers; ++i)\n\t\tif (-1 == vd_munmap (cam->buffers[i].start, cam->buffers[i].length))\n\t\t\treturn -1;\n\n\tfree (cam->buffers);\n\treturn 0;\n}\n\n\nstatic int \nqueue_buffers (camPtr cam) \n{\n\tunsigned int i;\n\n\tfor (i = 0; i < cam->nBuffers; ++i) {\n\t\tstruct v4l2_buffer buf;\n\n\t\tCLEAR (buf);\n\t\tbuf.type\t= V4L2_BUF_TYPE_VIDEO_CAPTURE;\n\t\tbuf.memory\t= V4L2_MEMORY_MMAP;\n\t\tbuf.index\t= i;\n\n\t\tif (-1 == xioctl (cam, VIDIOC_QBUF, &buf)) return -1;\n\t}\n\n\treturn 0;\n}\n\n\nstatic int \ninit_mmap (camPtr cam) \n{\n\tstruct v4l2_requestbuffers req;\n\tint bufIdx;\n\t\n\tCLEAR (req);\n\treq.count\t= cam->nBuffers;\n\treq.type\t= V4L2_BUF_TYPE_VIDEO_CAPTURE;\n\treq.memory\t= V4L2_MEMORY_MMAP;\n\n\tif (-1 == xioctl (cam, VIDIOC_REQBUFS, &req)) {\n\t\tif (EINVAL == errno) {\n\t\t\treturn -1;\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}\n\n\tif (req.count < 1) return -1;\n\n\tcam->buffers = calloc (req.count, sizeof (*(cam->buffers)));\n\tif (!cam->buffers) return -1;\n\n\tfor (bufIdx = 0; bufIdx < req.count; ++bufIdx) {\n\t\tstruct v4l2_buffer buf;\n\n\t\tCLEAR (buf);\n\t\tbuf.type\t= V4L2_BUF_TYPE_VIDEO_CAPTURE;\n\t\tbuf.memory\t= V4L2_MEMORY_MMAP;\n\t\tbuf.index\t= bufIdx;\n\n\t\tif (-1 == xioctl (cam, VIDIOC_QUERYBUF, &buf)) return -1;\n\n\t\tcam->buffers[bufIdx].length = buf.length;\n\t\tcam->buffers[bufIdx].start  = vd_mmap (NULL /* start anywhere */,\n\t\t\t\t\t\t  buf.length,\n\t\t\t\t\t\t  PROT_READ | PROT_WRITE /* required */,\n\t\t\t\t\t\t  MAP_SHARED /* recommended */,\n\t\t\t\t\t\t  cam->fileDesc,\n\t\t\t\t\t\t  buf.m.offset);\n\n\t\tif (MAP_FAILED == cam->buffers[bufIdx].start) return -1;\n\t}\n\n\treturn 0;\n}\n\nstatic int\nset_format (camPtr cam, struct v4l2_format *fmt, int pixelformat, int w, int h)\n{\n/*\n\tfmt->fmt.pix.field\t= V4L2_FIELD_INTERLACED;\n\tfmt->fmt.pix.field\t= V4L2_FIELD_TOP;\n*/\n\n\tfmt->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;\n\tfmt->fmt.pix.width\t= w;\n\tfmt->fmt.pix.height\t= h;\n\tfmt->fmt.pix.pixelformat = pixelformat;\n\tfmt->fmt.pix.field\t= V4L2_FIELD_NONE; /* V4L2_FIELD_INTERLACED; */\n\tif (-1 == xioctl (cam, VIDIOC_S_FMT, fmt)) return -1;\n\n\t/* Note VIDIOC_S_FMT may change width and height. */\n\n\tif ((w != fmt->fmt.pix.width)  | \n\t    (h != fmt->fmt.pix.height) | \n\t    (fmt->fmt.pix.pixelformat != pixelformat))\n\t{\n\t\treturn -1;\n\t}\n\n\tcam->pixelformat = pixelformat;\n\t\n\treturn 0;\n}\n\nstatic int \ninit_device (camPtr cam, int w, int h) \n{\n\tstruct v4l2_capability cap;\n\tstruct v4l2_cropcap cropcap;\n\tstruct v4l2_crop crop;\n\tstruct v4l2_format fmt;\n\tint bpp;\n\tunsigned int min;\n\n\tif (-1 == xioctl (cam, VIDIOC_QUERYCAP, &cap)) {\n\t\tif (EINVAL == errno) {\n\t\t\treturn -1;\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}\n\n\tif (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) return -1;\n\tif (!(cap.capabilities & V4L2_CAP_STREAMING)) return -1;\n\n\t/* Select video input, video standard and tune here. */\n\n\tCLEAR (cropcap);\n\tcropcap.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;\n\n\tif (0 == xioctl (cam, VIDIOC_CROPCAP, &cropcap)) {\n\t\tcrop.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;\n\t\tcrop.c = cropcap.defrect; /* reset to default */\n\n\t\tif (-1 == xioctl (cam, VIDIOC_S_CROP, &crop)) {\n\t\t\tif (EINVAL == errno) {\n\t\t\t\t/* Cropping not supported (ignored) */\n\t\t\t} else {\n\t\t\t\t/* Errors ignored. */\n\t\t\t}\n\t\t}\n\t} else {\n\t\t/* Errors ignored. */\n\t}\n\n\tCLEAR (fmt);\n\t/* The order of preference of formats... */\n\tif (-1 == set_format(cam, &fmt, V4L2_PIX_FMT_RGB24, w, h))\n\t  if (-1 == set_format(cam, &fmt, V4L2_PIX_FMT_YUYV, w, h))\n\t\tif (-1 == set_format(cam, &fmt, V4L2_PIX_FMT_RGB565, w, h))\n\t\t  if (-1 == set_format(cam, &fmt, V4L2_PIX_FMT_RGB444, w, h))\n\t\t\treturn -1;\n\t\t\n\t/* For reference:\n\t\tV4L2_PIX_FMT_RGB24 : 3 bytes == 1 dst pixel\n\t\tV4L2_PIX_FMT_RGB565: 2 bytes == 1 dst pixel\n\t\tV4L2_PIX_FMT_RGB444: 2 bytes == 1 dst pixel\n\t\tV4L2_PIX_FMT_YUYV  : 4 bytes == 2 dst pixels\n\t*/\n\t\n\tswitch (fmt.fmt.pix.pixelformat) {\n\t  case V4L2_PIX_FMT_RGB24: /* printf(\"V4L2_PIX_FMT_RGB24\\n\"); */\n\t\tbpp = 3; \n\t\tbreak;\n\t  case V4L2_PIX_FMT_RGB565: /* printf(\"V4L2_PIX_FMT_RGB565\\n\"); */\n\t\tbpp = 2; \n\t\tbreak;\n\t  case V4L2_PIX_FMT_RGB444: /* printf(\"V4L2_PIX_FMT_RGB444\\n\"); */\n\t\tbpp = 2;\n\t\tbreak;\n\t  case V4L2_PIX_FMT_YUYV: /* printf(\"V4L2_PIX_FMT_YUYV\\n\"); */\n\t\tbpp = 4; \n\t\tbreak;\n\t}\n\t\n\t/* Buggy driver paranoia >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> */\t\n\tmin = fmt.fmt.pix.width * bpp;\n\tif (fmt.fmt.pix.bytesperline < min) fmt.fmt.pix.bytesperline = min;\n\tmin = fmt.fmt.pix.bytesperline * fmt.fmt.pix.height;\n\tif (fmt.fmt.pix.sizeimage < min) fmt.fmt.pix.sizeimage = min;\n\t/* <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< */\n\t\n\tif (0 > init_mmap(cam)) return -1;\n\tif (0 > queue_buffers(cam)) return -1;\n\n\t/* cache returned dims (make fmt a global?) */\n\tcam->bmWidth = fmt.fmt.pix.width;\n\tcam->bmHeight = fmt.fmt.pix.height;\n\tcam->sqPixels = cam->bmWidth * cam->bmHeight;\n\tcam->sqBufferBytes = cam->sqPixels * 4; /* Bytes to tx to Squeak (always RGB32) */\n\n\treturn 0;\n}\n\n\nstatic int \nclose_device (camPtr cam) \n{\n\tif (-1 == vd_close (cam->fileDesc)) return -1;\n\tcam->fileDesc = -1;\n\treturn 0;\n}\n\n\nstatic int \nopen_device (camPtr cam) \n{\n\tchar deviceName[12];\n\tstruct stat st;\n\n\tstrcpy(deviceName, videoDevName0);\n\tdeviceName[10] = cam->devNum + '0';\n\n\tif (-1 == stat (deviceName, &st)) return -1;\n\tif (!S_ISCHR (st.st_mode)) return -1;\n\n\tcam->fileDesc = vd_open (deviceName, O_RDWR /* required */ | O_NONBLOCK, 0);\n\n\tif (camIsClosed(cam)) return -1;\n\n\treturn 0;\n}\n\n\nint \nInitCamera(camPtr cam, int w, int h) \n{\n    cam->read_buf.type \t= V4L2_BUF_TYPE_VIDEO_CAPTURE;\n    cam->read_buf.memory = V4L2_MEMORY_MMAP;\n\tcam->ioMethod\t\t= IO_METHOD_MMAP;\n\n    if (0 > open_device(cam)) return -1;\n\n    if (0 > init_device(cam, w, h)) {\n        close_device(cam);\n        return -1;\n    }\n\n    if (0 > stream_on(cam)) {\n        uninit_device(cam);\n        close_device(cam);\n        return -1;\n    }\n\n    return 0;\n}\n\n\n\n/* ============================================= SCRATCH I/F ==================================================== */\n\n\nsqInt \nCameraGetParam(int camNum, int paramNum) \n{\n\tcamPtr cam = &camInfo[camNum-1];\n\t\n\treturn 0;\n}\n\n/*\n\t\"Copy a camera frame into the given Bitmap. The Bitmap should be for a Form \n\tof depth 32 that is the same width and height as the current camera frame. \n\tFail if the camera is not open or if the bitmap is not the right size. If \n\tsuccessful, answer the number of frames received from the camera since the \n\tlast call. If this is zero, then there has been no change.\"\n\t\n\t???\n*/\nsqInt \nCameraGetFrame(int camNum, unsigned char* buf, int pixelCount) \n{\n\tcamPtr cam = &camInfo[camNum-1];\n\t\n\tif (camIsClosed(cam)) return false;\n\tif (pixelCount != cam->sqPixels) return false;\n\tcam->sqBuffer = (void *)buf;\n\tif (0 != getFrame(cam)) return 0;\n\treturn 1;\n}\n\n\nsqInt \nCameraExtent(int camNum) \n{\n\tcamPtr cam = &camInfo[camNum-1];\n\t\n\tif (camIsClosed(cam)) return 0;\n\treturn (cam->bmWidth << 16) + cam->bmHeight;\n}\n\n\nchar* \nCameraName(int camNum) \n{\n\tcamPtr cam = &camInfo[camNum-1];\n\t\n\tif (camIsClosed(cam)) return \"camera not open\";\n\treturn \"default camera\";\n}\n\n\nvoid \nCameraClose(int camNum) \n{\n\tcamPtr cam = &camInfo[camNum-1];\n\t\n\tif (camIsClosed(cam)) return;\n\tstream_off(cam);\n\tuninit_device(cam);\n\tclose_device(cam);\n}\n\n\nsqInt \nCameraOpen(int camNum, int frameWidth, int frameHeight) \n{\n\tcamPtr cam = &camInfo[camNum-1];\n\t\n\tif (camIsOpen(cam)) return false;\n\tif (0 != InitCamera(cam, frameWidth, frameHeight)) return false;\n\treturn true;\n}\n\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/ClipboardExtendedPlugin/Makefile.inc",
    "content": "XINCLUDES= $(X_INCLUDES)\nXLDFLAGS= $(X_LIBS)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/ClipboardExtendedPlugin/build.cmake",
    "content": "EXPECT_UNDEFINED_SYMBOLS ()\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/ClipboardExtendedPlugin/config.cmake",
    "content": "IF (NOT X11_FOUND)\n  PLUGIN_DISABLE()\nENDIF ()\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/ClipboardExtendedPlugin/sqUnixExtendedClipboard.c",
    "content": "/*  sqUnixExtendedClipboard.c  -- support for clipboard with multiple types\n *\n * Copyright (C) 2007 by Viewpoints Research Institute and other\n *                             authors/contributors as listed.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a copy\n *   of this software and associated documentation files (the \"Software\"), to deal\n *   in the Software without restriction, including without limitation the rights\n *   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n *   copies of the Software, and to permit persons to whom the Software is\n *   furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n *   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n *   SOFTWARE.\n */\n\n#include<string.h>\n#include<stdio.h>\n#include<stdlib.h>\n#include<X11/Xlib.h>\n#include<X11/Xatom.h>\n\n#ifdef CLIPBOARD_TEST\n  #include<stdio.h>\n  typedef int sqInt;\n#else\n  #include \"sqVirtualMachine.h\"\n  extern struct VirtualMachine* interpreterProxy;\n#endif /* ifdef CLIPBOARD_TEST */\n\nextern Display * stDisplay;\n\nchar ** clipboardGetTypeNames();\nsqInt clipboardSizeWithType(char * typeName, int ntypeName);\nsqInt clipboardReadIntoAt(sqInt count, sqInt byteArrayIndex, sqInt startIndex);\nvoid * firstIndexableField(sqInt oop);\nvoid clipboardWriteWithType(char * data, size_t ndata, char * typeName, size_t ntypeName, int isDnd, int isClaiming);\n\n#ifndef CLIPBOARD_TEST\n\nvoid sqPasteboardClear( sqInt inPasteboard )\n{\n  /* NOT IMPLEMENTED YET */\n}\n\n/* Return a number of types.\n * Update it only if the selection is CLIPBOARD\n */\nint sqPasteboardGetItemCount(sqInt inPasteboard)\n{\n  int i= 0;\n  char ** types;\n  types= clipboardGetTypeNames();\n  if (NULL == types) return 0;\n  for (i= 0; NULL != types[i]; i++) free(types[i]); /* XFree() is better */\n  free(types);\n  return i;\n}\n\n/* Answer a type name at index. */\nint sqPasteboardCopyItemFlavorsitemNumber (sqInt inPasteboard, int formatNumber)\n{\n  size_t length;\n  int outData;\n  char * dest;\n  char ** types;\n  char * type;\n\n  if (formatNumber < 1)\n    return interpreterProxy->nilObject();\n  \n  /* TODO: clipboardGetTypeNames() is should be cached. */\n  /* TODO: types should be free(). */\n  types= clipboardGetTypeNames();\n  if (types == NULL)\n    return interpreterProxy->nilObject();\n\n  type= types[formatNumber - 1];\n  if (type == NULL)\n    return interpreterProxy->nilObject();\n\n  length= strlen(type);\n  outData = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), length);\n\n  dest = ((char *) (interpreterProxy->firstIndexableField(outData)));\n  memcpy(dest, type, length);\n\n  return outData;\n}\n\n/* In X11 clipboard is global in a display, so it just return 1 */\nsqInt sqCreateClipboard( void )\n{\n  return 1;\n}\n\n\nvoid sqPasteboardPutItemFlavordatalengthformatTypeformatLength ( sqInt inPasteboard, char * data, int ndata, char * typeName, int ntypeName)\n{\n  clipboardWriteWithType(data, ndata, typeName, ntypeName, 0, 1);\n}\n\n\n/* Read the clipboard */\nint sqPasteboardCopyItemFlavorDataformatformatLength (sqInt inPasteboard, char* format, int formatLength)\n{\n  int bytes= 0;\n  sqInt outData;\n\n  bytes= clipboardSizeWithType(format, formatLength);\n  outData = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), bytes);\n  clipboardReadIntoAt(bytes, (sqInt) firstIndexableField(outData), 0);\n  return outData;\n}\n\n#endif /* #ifndef CLIPBOARD_TEST */\n\n#ifdef CLIPBOARD_TEST\n\nstatic Display * display;\n\nDisplay * ioGetDisplay()\n{\n  return display;\n}\n\nchar * getSelectionData(Atom selection, Atom target, size_t * bytes, XEvent * event)\n{\n  char * answer= \"Hello world!\";\n  *bytes= strlen(answer) + 1;\n  char * result= calloc(*bytes, 1);\n  memcpy(result, answer, *bytes);\n  return result;\n}\n\nvoid updateInputTargets(Atom * newTargets, int targetSize)\n{\n}\n\nint main () {\n  Window window;\n  int i;\n  size_t nitems;\n  \n  display= XOpenDisplay(NULL);\n  if(display == NULL) {\n    printf(\"Cannot open display\\n\");\n    return 1;\n  }\n  window= XCreateSimpleWindow(display, DefaultRootWindow(display),\n\t\t\t\t 10, 10, 100, 100, 1, 0, 0);\n  getItemFravors();\n  getItemFravors();\n\n  printf(\"\\n\");\n  char * text= (char *) getSelectionData(\n\t\t\t\t\t atom(\"CLIPBOARD\"),\n\t\t\t\t\t atom(\"STRING\"), &nitems);\n  printf(\"String contents: %s\\n\", text);\n  return 0;\n}\n\n#endif /* CLIPBOARD_TEST */\n\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/DBusPlugin/Makefile.inc",
    "content": "XCPPFLAGS= [DBUS_CFLAGS]\nXLDFLAGS=  [DBUS_LIBS]\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/DBusPlugin/acinclude.m4",
    "content": "PKG_CHECK_MODULES(DBUS,dbus-1,,AC_PLUGIN_DISABLE)\nAC_PLUGIN_DEFINE_UNQUOTED(DBUS_CFLAGS,$DBUS_CFLAGS)\nAC_PLUGIN_DEFINE_UNQUOTED(DBUS_LIBS,$DBUS_LIBS);\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/DBusPlugin/config.cmake",
    "content": "PLUGIN_REQUIRE_PACKAGE (DBUS1 dbus-1)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/DropPlugin/Makefile.inc",
    "content": "XCPPFLAGS=\t-I$(topdir)/platforms/Cross/plugins/FilePlugin\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/DropPlugin/sqUnixDragDrop.c",
    "content": "/* sqUnixDragDrop.c -- support for drag and drop, for those UIs that have it\n * \n * Author: Ian Piumarta <ian.piumarta@inria.fr>\n * \n *   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n */\n\n/* Why on earth does this plugin exist at all?  Brain death strikes\n * again.  And why are half the functions never called from the VM?\n * Could it be that they are only there for certain ports (we'll\n * mention no names) in which the core support needs to grub around in\n * this plugin via ioLoadFunctionFromModule (and, putting disbelief\n * aside for a moment, maybe even VICE-VERSA)?  It seems to me that\n * truth is very definitely not beauty today.  Sigh...\n */\n\n\n#include \"sq.h\"\n#include \"sqVirtualMachine.h\"\n#include \"FilePlugin.h\"\n#include \"DropPlugin.h\"\n\n#include <assert.h>\n\n\nextern struct VirtualMachine  *interpreterProxy;\nextern int\t\t       uxDropFileCount;\nextern char\t\t     **uxDropFileNames;\n\n\nint dropInit(void)\t{ return 1; }\nint dropShutdown(void)\t{ return 1; }\n\nchar *dropRequestFileName(int dropIndex)\t// in st coordinates\n{\n  if ((dropIndex > 0) && (dropIndex <= uxDropFileCount))\n    {\n      assert(uxDropFileNames);\n      dndReceived(uxDropFileNames[dropIndex - 1]);\n      return uxDropFileNames[dropIndex - 1];\n    }\n  return 0;\n}\n\nint dropRequestFileHandle(int dropIndex)\n{\n  char *path= dropRequestFileName(dropIndex);\n  if (path)\n    {\n      // you cannot be serious?\n      int handle= instantiateClassindexableSize(classByteArray(), fileRecordSize());\n      sqFileOpen((SQFile *)fileValueOf(handle), (int)path, strlen(path), 0);\n      return handle;\n    }  \n  return interpreterProxy->nilObject();\n}\n\nint  sqSecFileAccessCallback(void *callback)\t\t { return 0; }\nvoid sqSetNumberOfDropFiles(int numberOfFiles)\t\t { }\nvoid sqSetFileInformation(int dropIndex, void *dropFile) { }\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/FT2Plugin/FT2PluginHeaderFix-ikp.1.cs",
    "content": "'From Squeak3.10.2 of ''5 June 2008'' [latest update: #7179] on 2 April 2010 at 7:58:47 am'!\r\"Change Set:\t\tFT2PluginHeaderFix-ikp\rDate:\t\t\t2 April 2010\rAuthor:\t\t\tIan Piumarta\r\rfreetype-config -cflags adds /usr/include/freetype2 to include paths under which exists freetype/tttables.h so we need to use the two-level relative path when including that file.\"!\r\r\r!FT2Plugin class methodsFor: 'translation' stamp: 'ikp 4/2/2010 07:55'!\rdeclareCVarsIn: cg\r\r\r\tcg addHeaderFile: '<ft2build.h>'.\r\tcg addHeaderFile: '<freetype/tttables.h>'.\r\tcg addHeaderFile: 'FT_FREETYPE_H'.\r\tcg addHeaderFile: 'FT_OUTLINE_H'.\r\tcg var: 'library' declareC: 'FT_Library library'.\r\tcg var: 'errorCode' type: 'int'.! !\r\r"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/FT2Plugin/config.cmake",
    "content": "PLUGIN_FIND_PACKAGE (FREETYPE freetype2)\nIF (NOT FREETYPE_FOUND)\n  CHECK_INCLUDE_FILE (freetype.h HAVE_FREETYPE_H)\n  CHECK_INCLUDE_FILE (freetype2/freetype.h HAVE_FREETYPE2_FREETYPE_H)\n  IF (NOT HAVE_FREETYPE_H AND NOT HAVE_FREETYPE2_FREETYPE_H)\n    PLUGIN_DISABLE ()\n  ELSE ()\n    PLUGIN_REQUIRE_LIBRARY (FREETYPE freetype)\n    PLUGIN_REQUIRE_LIBRARY (Z z)\n  ENDIF ()\nENDIF ()\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/FileCopyPlugin/build.cmake",
    "content": "EXPECT_UNDEFINED_SYMBOLS ()\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/FileCopyPlugin/sqUnixFileCopyPlugin.c",
    "content": "/* sqUnixFileCopyPlugin.c -- fast file copy, preserving permissions\n * \n *   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n * \n * Author: ian.piumarta@inria.fr\n * \n * NOTE:\n *   This plugin is kind of ridiculous.  Nevertheless, after seeing what\n *   somebody (and I honestly have no idea who) decided would be a good\n *   implementation of this (it might still be on SourceForge if you're\n *   perverse wough to want to look at it) I was dumbfounded into writing\n *   a version that didn't open pipes to forked processes.  (Now I bet\n *   you can't possibly resist having a peek for the original. ;^p)\n *   (Besides, the original version had BUGS -- in a one page program. 8^o)\n * \n * CAVEATS:\n *   - we should use mmap() only if the file is \"large\" (define that as\n *     you will), preferring a few block-sized read()/write()s otherwise\n *   - we should fall back onto the loop if mmap fails (we might simply\n *     have a file larger than available memory)\n *\n * BUGS:\n *   - some of the system calls should handle EAGAIN and/or EINTR (this\n *     will cause problems on Solaris)\n * (the following could be fixed if we had a real \"config.h\":)\n *   - we assume <unistd.h> but not everyone has this\n *   - we assume alloca() but not everyone has this (ANSI does not define it)\n *   - use of stat.st_blksize is extremely non-portable\n *\n * COMPILE:\n *   gcc -Wall -W -pedantic -o copy copy.c\n */\n\n#include \"sq.h\"\n#include \"FileCopyPlugin.h\"\n#include \"config.h\"\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <sys/types.h>\n#include <sys/stat.h>\n#include <fcntl.h>\n#ifdef HAVE_UNISTD_H\n#  include <unistd.h>\n#endif\n#ifdef HAVE_MMAP\n# include <sys/mman.h>\n#endif\n\n\nstatic int copy(char *from, char *to)\n{\n  int status= 1;        /* exit status: assume failure */\n  int in;\n  struct stat stat;\n  if (((in= open(from, O_RDONLY)) < 0) || (fstat(in, &stat) != 0))\n    return -1;\n  {\n    int out;\n    if ((out= open(to, O_WRONLY | O_CREAT | O_TRUNC, stat.st_mode)) < 0)\n      return -1;\n    {\n#    ifdef HAVE_MMAP\n      static const char *_dev_zero= \"/dev/zero\";\n      int zero;\n      if ((zero= open(_dev_zero, O_RDWR)) >= 0)\n\t{\n\t  void *mem;\n\t  if (MAP_FAILED != (mem= mmap(0, stat.st_size, PROT_READ | PROT_WRITE,\n\t\t\t\t       MAP_PRIVATE, zero, 0)))\n\t    {\n\t      if ((  (read(in, mem, stat.st_size) != stat.st_size) >= 0)\n\t\t  && (write(out, mem, stat.st_size) != stat.st_size) >= 0)\n\t\t{\n\t\t  status= 0;      /* success */\n\t\t}\n\t      munmap(mem, stat.st_size);\n\t    }\n\t  close(zero);\n\t}\n#    else /* !HAVE_MMAP */\n      char *buf= (char *)alloca(stat.st_blksize);\n      int n;\n      while ((  ((n= read(in, buf, stat.st_blksize)) > 0))\n\t     && (n == write(out, buf, n)))\n\t;\n      if (n == 0)\n\tstatus= 0;    /* success */\n#    endif /* !HAVE_MMAP */\n      close(out);\n    }\n    close(in);\n  }\n  return status;\n}\n\n\nint sqCopyFilesizetosize(char *srcName, int srcNameSize, char *dstName, int dstNameSize)\n{\n  int status= 0;\n  char *from= (char *)alloca(srcNameSize + 1);\n  char *to= (char *)alloca(dstNameSize + 1);\n  sqFilenameFromString(from, (int)srcName, srcNameSize);\n  sqFilenameFromString(to, (int)dstName, dstNameSize);\n  return copy(from, to);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/FilePlugin/config.cmake",
    "content": "CHECK_INCLUDE_FILE (dirent.h\tHAVE_DIRENT_H)\nCHECK_INCLUDE_FILE (sys/ndir.h\tHAVE_SYS_NDIR_H)\nCHECK_INCLUDE_FILE (sys/dir.h\tHAVE_SYS_DIR_H)\nCHECK_INCLUDE_FILE (ndir.h\tHAVE_NDIR_H)\nCHECK_INCLUDE_FILE (unistd.h\tHAVE_UNISTD_H)\n\nCONFIG_DEFINE (HAVE_DIRENT_H)\nCONFIG_DEFINE (HAVE_SYS_NDIR_H)\nCONFIG_DEFINE (HAVE_SYS_DIR_H)\nCONFIG_DEFINE (HAVE_NDIR_H)\nCONFIG_DEFINE (HAVE_UNISTD_H)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/FilePlugin/sqUnixFile.c",
    "content": "/* sqUnixFile.c -- directory operations for Unix\n * \n *   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n */\n\n/* Author: Ian.Piumarta@INRIA.Fr\n */\n\n#include \"sq.h\"\n#include \"FilePlugin.h\"\n#include \"sqUnixCharConv.h\"\n\n#ifdef HAVE_DIRENT_H\n# include <dirent.h>\n# define NAMLEN(dirent) strlen((dirent)->d_name)\n#else\n# define dirent direct\n# define NAMLEN(dirent) (dirent)->d_namlen\n# ifdef HAVE_SYS_NDIR_H\n#  include <sys/ndir.h>\n# endif\n# ifdef HAVE_SYS_DIR_H\n#  include <sys/dir.h>\n# endif\n# ifdef HAVE_NDIR_H\n#  include <ndir.h>\n# endif\n#endif\n\n#ifdef HAVE_UNISTD_H\n# include <sys/types.h>\n# include <unistd.h>\n#endif\n\n#include <time.h>\n#include <errno.h>\n#include <string.h>\n#include <sys/param.h>\n#include <sys/stat.h>\n\n/***\n\tThe interface to the directory primitive is path based.\n\tThat is, the client supplies a Squeak string describing\n\tthe path to the directory on every call. To avoid traversing\n\tthis path on every call, a cache is maintained of the last\n\tpath seen, along with the Mac volume and folder reference\n\tnumbers corresponding to that path.\n***/\n\n/*** Constants ***/\n#define ENTRY_FOUND     0\n#define NO_MORE_ENTRIES 1\n#define BAD_PATH        2\n\n#define DELIMITER '/'\n\n/*** Variables ***/\nchar lastPath[MAXPATHLEN+1];\nint  lastPathValid = false;\nint  lastIndex= -1;\nDIR *openDir= 0;\n\n\n/*** Functions ***/\n\nextern time_t convertToSqueakTime(time_t unixTime);\n\n\nsqInt dir_Create(char *pathString, sqInt pathStringLength)\n{\n  /* Create a new directory with the given path. By default, this\n     directory is created relative to the cwd. */\n  char name[MAXPATHLEN+1];\n  int i;\n  if (pathStringLength >= MAXPATHLEN)\n    return false;\n  if (!sq2uxPath(pathString, pathStringLength, name, MAXPATHLEN, 1))\n    return false;\n  return mkdir(name, 0777) == 0;\t/* rwxrwxrwx & ~umask */\n}\n\n\nsqInt dir_Delete(char *pathString, sqInt pathStringLength)\n{\n  /* Delete the existing directory with the given path. */\n  char name[MAXPATHLEN+1];\n  int i;\n  if (pathStringLength >= MAXPATHLEN)\n    return false;\n  if (!sq2uxPath(pathString, pathStringLength, name, MAXPATHLEN, 1))\n    return false;\n  if (lastPathValid && !strcmp(lastPath, name))\n    {\n      closedir(openDir);\n      lastPathValid= false;\n      lastIndex= -1;\n      lastPath[0]= '\\0';\n    }\n  return rmdir(name) == 0;\n}\n\n\nsqInt dir_Delimitor(void)\n{\n  return DELIMITER;\n}\n\n\nstatic int maybeOpenDir(char *unixPath)\n{\n  /* if the last opendir was to the same directory, re-use the directory\n     pointer from last time.  Otherwise close the previous directory,\n     open the new one, and save its name.  Return true if the operation\n     was successful, false if not. */\n  if (!lastPathValid || strcmp(lastPath, unixPath))\n    {\n      /* invalidate the old, open the new */\n      if (lastPathValid)\n\tclosedir(openDir);\n      lastPathValid= false;\n      strcpy(lastPath, unixPath);\n      if ((openDir= opendir(unixPath)) == 0)\n\treturn false;\n      lastPathValid= true;\n      lastIndex= 0;\t/* first entry is index 1 */\n    }\n  return true;\n}\n\n\nsqInt dir_Lookup(char *pathString, sqInt pathStringLength, sqInt index,\n/* outputs: */  char *name, sqInt *nameLength, sqInt *creationDate, sqInt *modificationDate,\n\t\tsqInt *isDirectory, squeakFileOffsetType *sizeIfFile)\n{\n  /* Lookup the index-th entry of the directory with the given path, starting\n     at the root of the file system. Set the name, name length, creation date,\n     creation time, directory flag, and file size (if the entry is a file).\n     Return:\t0 \tif a entry is found at the given index\n     \t\t1\tif the directory has fewer than index entries\n\t\t2\tif the given path has bad syntax or does not reach a directory\n  */\n\n  int i;\n  int nameLen= 0;\n  struct dirent *dirEntry= 0;\n  char unixPath[MAXPATHLEN+1];\n  struct stat statBuf;\n\n  /* default return values */\n  *name             = 0;\n  *nameLength       = 0;\n  *creationDate     = 0;\n  *modificationDate = 0;\n  *isDirectory      = false;\n  *sizeIfFile       = 0;\n\n  if ((pathStringLength == 0))\n    strcpy(unixPath, \".\");\n  else if (!sq2uxPath(pathString, pathStringLength, unixPath, MAXPATHLEN, 1))\n    return BAD_PATH;\n\n  /* get file or directory info */\n  if (!maybeOpenDir(unixPath))\n    return BAD_PATH;\n\n  if (++lastIndex == index)\n    index= 1;\t\t/* fake that the dir is rewound and we want the first entry */\n  else\n    {\n      rewinddir(openDir);\t/* really rewind it, and read to the index */\n      lastIndex= index;\n    }\n\n  for (i= 0; i < index; i++)\n    {\n    nextEntry:\n      do\n\t{ \n\t  errno= 0; \n\t  dirEntry= readdir(openDir);\n\t}\n      while ((dirEntry == 0) && (errno == EINTR));\n\n      if (!dirEntry)\n\treturn NO_MORE_ENTRIES;\n      \n      nameLen= NAMLEN(dirEntry);\n\n      /* ignore '.' and '..' (these are not *guaranteed* to be first) */\n      if (nameLen < 3 && dirEntry->d_name[0] == '.')\n\tif (nameLen == 1 || dirEntry->d_name[1] == '.')\n\t  goto nextEntry;\n    }\n\n  *nameLength= ux2sqPath(dirEntry->d_name, nameLen, name, MAXPATHLEN, 0);\n\n  {\n    char terminatedName[MAXPATHLEN];\n    strncpy(terminatedName, dirEntry->d_name, nameLen);\n    terminatedName[nameLen]= '\\0';\n    strcat(unixPath, \"/\");\n    strcat(unixPath, terminatedName);\n    if (stat(unixPath, &statBuf) && lstat(unixPath, &statBuf))\n      {\n\t/* We can't stat the entry, but failing here would invalidate\n\t   the whole directory --bertf */\n\treturn ENTRY_FOUND;\n      }\n  }\n\n  /* last change time */\n  *creationDate= convertToSqueakTime(statBuf.st_ctime);\n  /* modification time */\n  *modificationDate= convertToSqueakTime(statBuf.st_mtime);\n\n  if (S_ISDIR(statBuf.st_mode))\n    *isDirectory= true;\n  else\n    *sizeIfFile= statBuf.st_size;\n\n  return ENTRY_FOUND;\n}\n\n\nsqInt dir_EntryLookup(char *pathString, sqInt pathStringLength, char* nameString, sqInt nameStringLength,\n/* outputs: */  char *name, sqInt *nameLength, sqInt *creationDate, sqInt *modificationDate,\n\t\tsqInt *isDirectory, squeakFileOffsetType *sizeIfFile)\n{\n  /* Lookup the given name in the given directory,\n     Set the name, name length, creation date,\n     creation time, directory flag, and file size (if the entry is a file).\n     Return:\t0 \tif a entry is found at the given index\n     \t\t1\tif there is no such entry in the directory\n\t\t2\tif the given path has bad syntax or does not reach a directory\n  */\n  \n  char unixPath[MAXPATHLEN+1];\n  struct stat statBuf;\n\n  /* default return values */\n  *name             = 0;\n  *nameLength       = 0;\n  *creationDate     = 0;\n  *modificationDate = 0;\n  *isDirectory      = false;\n  *sizeIfFile       = 0;\n\n  if ((pathStringLength == 0))\n    strcpy(unixPath, \".\");\n  else if (!sq2uxPath(pathString, pathStringLength, unixPath, MAXPATHLEN, 1))\n    return BAD_PATH;\n\n  char terminatedName[MAXPATHLEN+1];\n  strncpy(terminatedName, nameString, nameStringLength);\n  terminatedName[nameStringLength]= '\\0';\n  strcat(unixPath, \"/\");\n  strcat(unixPath, terminatedName);\n  if (stat(unixPath, &statBuf) && lstat(unixPath, &statBuf)) {\n\treturn NO_MORE_ENTRIES;\n  }\n\n  /* To match the results of dir_Lookup, copy back the file name */\n  *nameLength = ux2sqPath(nameString, nameStringLength, name, 256, 0);\n\n  /* last change time */\n  *creationDate= convertToSqueakTime(statBuf.st_ctime);\n  /* modification time */\n  *modificationDate= convertToSqueakTime(statBuf.st_mtime);\n\n  if (S_ISDIR(statBuf.st_mode))\n    *isDirectory= true;\n  else\n    *sizeIfFile= statBuf.st_size;\n\n  return ENTRY_FOUND;\n}\n\n/* unix files are untyped, and the creator is correct by default */\n\n\nsqInt dir_SetMacFileTypeAndCreator(char *filename, sqInt filenameSize, char *fType, char *fCreator)\n{\n  return true;\n}\n\nsqInt dir_GetMacFileTypeAndCreator(char *filename, sqInt filenameSize, char *fType, char *fCreator)\n{\n  return true;\n}\n\n\n/*\n * The following is useful in a debugging context when the VM's output has been\n * directed to a log file.  It binds stdout to /dev/tty, arranging that output\n * of debugging print routines such as printOop appear on stdout.\n */\nvoid\nsqStdoutToDevTTY()\n{\n\tif (!freopen(\"/dev/tty\",\"w\",stdout))\n\t\tperror(\"sqStdoutToDevTTY freopen(\\\"/dev/tty\\\",\\\"w\\\",stdout):\");\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/FloatMathPlugin/Makefile.inc",
    "content": "CFLAGS = $(LIBM_CFLAGS) -DNO_ISNAN=1\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/FloatMathPlugin/acinclude.m4",
    "content": "libm_cflags=\"-O\"\n\nif test \"$GCC\" = yes; then\n  case $host_cpu in\n  i?86)\n    libm_cflags=\"-O -fomit-frame-pointer -DLSB_FIRST=1\"\n    ;;\n  powerpc|ppc)\n    libm_cflags=\"-O3 -funroll-loops -mcpu=750 -mno-fused-madd -DLSB_FIRST=0\"\n    ;;\n  esac\nfi\n\nAC_SUBST(LIBM_CFLAGS, $libm_cflags)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/FloatMathPlugin/build.cmake",
    "content": "SET (CMAKE_C_FLAGS \"${LIBM_CFLAGS}\")\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/FloatMathPlugin/config.cmake",
    "content": "PLUGIN_DEFINITIONS (-DNO_ISNAN=1)\n\n# fdlibm.h does not recognize x86_64, so set endianness here for all platforms.\n\nTEST_BIG_ENDIAN (IS_BIG_ENDIAN)\nIF (NOT IS_BIG_ENDIAN)\n  PLUGIN_DEFINITIONS (-D__LITTLE_ENDIAN=1)\nENDIF ()\n\n# GCC optimizations break fdlibm so disable them for now.\n\nIF (CMAKE_COMPILER_IS_GNUCC)\n  SET (LIBM_CFLAGS \"${CMAKE_C_FLAGS} -O0 -mno-fused-madd\")\nELSE ()\n  SET (LIBM_CFLAGS \"${CMAKE_C_FLAGS}\")\nENDIF ()\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/GStreamerPlugin/Makefile.inc",
    "content": "XCPPFLAGS= [GSTREAMER_CFLAGS]\nXLDFLAGS=  [GSTREAMER_LIBS]\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/GStreamerPlugin/acinclude.m4",
    "content": "PKG_CHECK_MODULES(GSTREAMER,gstreamer-0.10,,AC_PLUGIN_DISABLE)\nAC_PLUGIN_DEFINE_UNQUOTED(GSTREAMER_CFLAGS,$GSTREAMER_CFLAGS)\nAC_PLUGIN_DEFINE_UNQUOTED(GSTREAMER_LIBS,$GSTREAMER_LIBS);\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/GStreamerPlugin/config.cmake",
    "content": "PLUGIN_REQUIRE_PACKAGE (GLIB2 glib-2.0)\nPLUGIN_REQUIRE_PACKAGE (XML2 libxml-2.0)\nPLUGIN_REQUIRE_PACKAGE (GSTREAMER gstreamer-0.10)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/HostWindowPlugin/build.cmake",
    "content": "EXPECT_UNDEFINED_SYMBOLS ()\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/HostWindowPlugin/config.cmake",
    "content": "IF (NOT X11_FOUND)\n    PLUGIN_DISABLE ()\nENDIF (NOT X11_FOUND)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/HostWindowPlugin/sqUnixHostWindowPlugin.c",
    "content": "/*  sqUnixHostWindowPlugin.c -- support for multiple host windows\n *\n * Copyright (C) 2009 by Bert Freudenberg and other\n *                             authors/contributors as listed.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a copy\n *   of this software and associated documentation files (the \"Software\"), to deal\n *   in the Software without restriction, including without limitation the rights\n *   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n *   copies of the Software, and to permit persons to whom the Software is\n *   furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n *   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n *   SOFTWARE.\n */\n\n#define AVOID_OPENGL_H\t1\n\n#include \"sq.h\"\n#include \"SqDisplay.h\"\n#include \"HostWindowPlugin.h\"\n\n#define FPRINTF(x) fprintf x\n\nstatic struct SqDisplay\t*dpy= 0;\n\n#define noDisplay ( (!dpy && !(dpy= ioGetDisplayModule())) || (dpy->version < 0x10002) )\n \n/* closeWindow: arg is int windowIndex. Fail (return 0) if anything goes wrong\n * - typically the windowIndex invalid or similar\n */\nint closeWindow(int index)\n{\n  if (noDisplay)\n    return 0;\n  else\n    return dpy->hostWindowClose(index); \n}\n\n\n/* createWindow: takes int width, height and origin x/y plus a char* list of\n * as yet undefined attributes. Returns an int window index or 0 for failure\n * Failure may occur because of an inability to add the window, too many\n * windows already extant (platform dependant), the specified size being\n * unreasonable etc.\n */\nint createWindowWidthheightoriginXyattrlength(\n\tint w, int h, int x, int y, char *list, int attributeListLength)\n{\n  if (noDisplay)\n    return 0;\n  else\n    return dpy->hostWindowCreate(w, h, x, y, list, attributeListLength);\n}\n\n\n/* ioShowDisplayOnWindow: similar to ioShowDisplay but adds the int windowIndex\n * Return true if ok, false if not, but not currently checked\n */\nsqInt ioShowDisplayOnWindow(\n\tunsigned char *dispBitsIndex, \n\tsqInt width, sqInt height, sqInt depth, \n\tsqInt affectedL, sqInt affectedR, sqInt affectedT, sqInt affectedB,\n\tsqInt windowIndex)\n{\n  if (noDisplay)\n    return 0;\n  else\n    return dpy->hostWindowShowDisplay(\n      dispBitsIndex, width, height, depth, affectedL, affectedR, affectedT, affectedB, windowIndex);\n}\n\n\n/* ioSizeOfWindow: arg is int windowIndex. Return the size of the specified\n * window in (width<<16 || height) format like ioScreenSize.\n * Return -1 for failure - typically invalid windowIndex\n * -1 is chosen since itwould correspond to a window size of 64k@64k which\n * I hope is unlikely for some time to come\n */\nint ioSizeOfWindow(int windowIndex)\n{\n  if (noDisplay)\n    return -1;\n  else\n    return dpy->hostWindowGetSize(windowIndex);\n}\n\n\n/* ioSizeOfWindowSetxy: args are int windowIndex, int w & h for the\n * width / height to make the window. Return the actual size the OS\n * produced in (width<<16 || height) format or -1 for failure as above.\n */\nint ioSizeOfWindowSetxy(int windowIndex, int w, int h)\n{\n  if (noDisplay)\n    return -1;\n  else\n    return dpy->hostWindowSetSize(windowIndex, w, h);\n}\n\n\n/* ioPositionOfWindow: arg is int windowIndex. Return the pos of the specified\n * window in (left<<16 || top) format like ioScreenSize.\n * Return -1 (as above) for failure - typically invalid windowIndex\n */\nint ioPositionOfWindow(int windowIndex)\n{\n  if (noDisplay)\n    return -1;\n  else\n    return dpy->hostWindowGetPosition(windowIndex);\n}\n\n\n/* ioPositionOfWindowSetxy: args are int windowIndex, int x & y for the\n * origin x/y for the window. Return the actual origin the OS\n * produced in (left<<16 || top) format or -1 for failure, as above\n */\nint ioPositionOfWindowSetxy(int windowIndex, int x, int y)\n{\n  if (noDisplay)\n    return -1;\n  else\n    return dpy->hostWindowSetPosition(windowIndex, x, y);\n}\n\n\n/* ioSetTitleOfWindow: args are int windowIndex, char* newTitle and\n * int size of new title. Fail with -1 if windowIndex is invalid, string is too\n * long for platform etc. Leave previous title in place on failure\n */\nint ioSetTitleOfWindow(int windowIndex, char *newTitle, int sizeOfTitle)\n{\n  if (noDisplay)\n    return -1;\n  else\n    return dpy->hostWindowSetTitle(windowIndex, newTitle, sizeOfTitle);\n}\n\n\n/* ioCloseAllWindows: intended for VM shutdown.\n * Close all the windows that appear to be open.\n * No useful return value since we're getting out of Dodge anyway.\n */\nint ioCloseAllWindows(void)\n{\n  if (noDisplay)\n    return 0;\n  else\n    return dpy->hostWindowCloseAll();\n}\n\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/ImmX11Plugin/acinclude.m4",
    "content": "# xicfont options.\n\nAC_ARG_ENABLE(xicfont-option,\nAC_HELP_STRING([--enable-xicfont-option],\n\t[enable -xicfont option @<:@default=no@:>@]),\nAC_DEFINE(USE_XICFONT_OPTION, 1))\n\nAC_ARG_ENABLE(xicfont-resource,\nAC_HELP_STRING([--enable-xicfont-resource],\n\t[read XResource for xicfont @<:@default=no@:>@]),\nAC_DEFINE(USE_XICFONT_RESOURCE, 1))\n\nAC_ARG_ENABLE(xicfont-default,\nAC_HELP_STRING([--enable-xicfont-default],\n\t[read XDefault for xicfont @<:@default=no@:>@]),\nAC_DEFINE(USE_XICFONT_DEFAULT, 1))\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/ImmX11Plugin/build.cmake",
    "content": "EXPECT_UNDEFINED_SYMBOLS ()\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/ImmX11Plugin/config.cmake",
    "content": "IF (NOT X11_FOUND)\n    PLUGIN_DISABLE ()\nENDIF (NOT X11_FOUND)\n\nCONFIG_DEFINE(USE_XICFONT_OPTION)\nCONFIG_DEFINE(USE_XICFONT_RESOURCE)\nCONFIG_DEFINE(USE_XICFONT_DEFAULT)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/JPEGReadWriter2Plugin/Makefile.inc",
    "content": "# this Makefile.inc intentionally left blank\n# \n# (to persuade VMMaker to generate the plugin)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/JoystickTabletPlugin/sqUnixJoystickTablet.c",
    "content": "/* sqUnixJoystickTablet.c -- support for joysticks and graphics tablets\n * \n *   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n */\n\n/* Author: Ian.Piumarta@INRIA.Fr\n */\n\n#include \"sq.h\"\n#include \"JoystickTabletPlugin.h\"\n\n/* we don't have any joysticks */\n\nvoid *joySticks= 0;\n\nint joystickRead(int index)\t{ return 0; }\nint joystickInit(void)\t\t{ return 0; }\n\n/* we don't have any tablets either */\n\nint tabletInit(void)\n{\n  return 0;\n}\n\nint tabletGetParameters(int cursorIndex, int result[])\n{\n  return 0;\n}\n\nint tabletRead(int cursorIndex, int result[])\n{\n  return 0;\n}\n\nint tabletResultSize(void)\n{\n  return 0;\n}\n\nint joystickShutdown(void)\n{\n  return 0;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/LocalePlugin/sqUnixLocale.c",
    "content": "/*\n *  sqUnixLocale.c\n *     SqueakLocale stubs for Unix, so we can have the timezone.\n */\n\n#include \"sqUnixLocale.h\"\n\nsqInt sqLocInitialize(void) {\n\treturn 1;\n}\n\n/************** Country and language ******************/\n\n/* write the country code into the string ptr. ISO 3166 is the relevant source\n * here; see http://www.unicode.org/onlinedat/countries.html for details.\n * Using the 3 character Alpha-3 codes */\nvoid\tsqLocGetCountryInto(char * str) {\n\tstr[0]=0;\n\tstr[1]=0;\n\tstr[2]=0;\n}\n\n/* write the 3 char string describing the language in use into string ptr.\n * ISO 639 is the relevant source here;\n * see http://www.w3.org/WAI/ER/IG/ert/iso639.html\n * for details */\nvoid\tsqLocGetLanguageInto(char * str) {\n\tstr[0]=0;\n\tstr[1]=0;\n\tstr[2]=0;\n}\n\n/***************** Currency ********************/\n\n/* return 1 (true) if the currency symbol is to be placed in front of the\n *currency amount */\nsqInt\tsqLocCurrencyNotation(void) {\n\treturn 1;\n}\n\n/* return the length in chars of the curency symbol string */\nsqInt\tsqLocCurrencySymbolSize(void) {\n\treturn 1;\n}\n/* write the currency symbol into the string ptr */\nvoid\tsqLocGetCurrencySymbolInto(char * str) {\n\tstrcpy(str, \"$\");\n}\n\n\n/***************** Numbers and measurements **************/\n\n/* return true if the metric measurements system is to be used, false otherwise\n * (USA is about it) */\nsqInt\tsqLocMeasurementMetric(void) {\n\treturn 1;\n}\n\n/* write the 1 char used for digit grouping into string ptr.\n * Usually this is . or ,  as in 1,000,000 */\nvoid\tsqLocGetDigitGroupingSymbolInto(char * str) {\n\tstrncpy(str, \",\", 1);\n}\n\n/* write the 1 char used for decimal separation into string ptr.\n * Usually this is . or , */\nvoid\tsqLocGetDecimalSymbolInto(char * str) {\n\tstrncpy(str, \".\", 1);\n}\n\n\n/****************** time and date *********************/\n\nsqInt\tsqLocGetVMOffsetToUTC(void) {\n\t/* return 0 for now */\n\treturn 0;\n}\n\nsqInt\tsqLocGetTimezoneOffset(void) {\n\n\tstruct tm * timeBlock;\n\ttime_t theTime;\n\ttheTime = time((time_t)NULL);\n\ttimeBlock = localtime(&theTime);\n\treturn timeBlock->tm_gmtoff / 60;\n}\n\n/* return true if DST is in use, false otherwise */\nsqInt\tsqLocDaylightSavings(void) {\n\tstruct tm * timeBlock;\n\ttime_t theTime;\n\ttheTime = time((time_t)NULL);\n\ttimeBlock = localtime(&theTime);\n\treturn timeBlock->tm_isdst;\n}\n\n/* return the size in chars of the long date format string */\nsqInt\tsqLocLongDateFormatSize(void) {\n\treturn 0;\n}\n\n/*Write the string describing the long date formatting into string ptr.\n * Format is made up of\n * \t\td day, m month, y year,\n * \t\tdouble symbol is null padded, single not padded (m=6, mm=06)\n * \t\tdddd weekday\n * \t\tmmmm month name */\nvoid\tsqLocGetLongDateFormatInto(char * str) {\n\tstrcpy(str, \"\");\n}\n\n/* return the size in chars of the short date format string */\nsqInt\tsqLocShortDateFormatSize(void) {\n\treturn 0;\n}\n\n/*Write the string describing the short date formatting into string ptr.\n * Format is made up of\n * \t\td day, m month, y year,\n * \t\tdouble symbol is null padded, single not padded (m=6, mm=06)\n * \t\tdddd weekday\n * \t\tmmmm month name */\nvoid\tsqLocGetShortDateFormatInto(char * str) {\n\tstrcpy(str, \"\");\n}\n\n/* return the size in chars of the time format string */\nsqInt\tsqLocTimeFormatSize(void) {\n\treturn 0;\n}\n/* write the string describing the time formatting into string ptr.\n * Format is made up of\n * \t\th hour (h 12, H 24), m minute, s seconds, x (am/pm String)\n * \t\tdouble symbol is null padded, single not padded (h=6, hh=06)  */\nvoid\tsqLocGetTimeFormatInto(char * str) {\n\tstrcpy(str, \"\");\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/LocalePlugin/sqUnixLocale.h",
    "content": "/*\n *  sqUnixLocale.h\n *  SqueakLocale stubs\n */\n\n#include \"sqMemoryAccess.h\"\n#include <time.h>\n#include <locale.h>\n#include \"sq.h\"\n\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/MIDIPlugin/Makefile.inc",
    "content": "XLDFLAGS= -lasound\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/MIDIPlugin/acinclude.m4",
    "content": "AC_MSG_CHECKING([for MIDI support via ALSA])\nAC_TRY_COMPILE([\n  #include <alsa/asoundlib.h>\n],[;],[\n  AC_MSG_RESULT(yes)\n  AC_DEFINE(USE_MIDI_ALSA, 1)\n],[\n  AC_MSG_RESULT(no)\n  AC_PLUGIN_DISABLE\n])\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/MIDIPlugin/build.cmake",
    "content": "EXPECT_UNDEFINED_SYMBOLS ()\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/MIDIPlugin/config.cmake",
    "content": "PLUGIN_REQUIRE_INCLUDE (ALSA_SOUNDLIB alsa/asoundlib.h)\nPLUGIN_REQUIRE_LIBRARY (ASOUND asound)\nIF (HAVE_ALSA_SOUNDLIB_H AND HAVE_LIBASOUND)\n  SET\t\t(USE_MIDI_ALSA 1)\n  CONFIG_DEFINE (USE_MIDI_ALSA)\nENDIF ()\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/MIDIPlugin/sqUnixMIDI.c",
    "content": "/* sqUnixMIDI.c -- Unix MIDI support\n * \n *   Copyright (C) 1996-2007 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a copy\n *   of this software and associated documentation files (the \"Software\"), to deal\n *   in the Software without restriction, including without limitation the rights\n *   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n *   copies of the Software, and to permit persons to whom the Software is\n *   furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n *   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n *   SOFTWARE.\n */\n\n/* Author: Ian.Piumarta@INRIA.FR\n * \n * Last edited: 2007-03-11 16:56:02 by piumarta on emilia.local\n */\n\n#include \"sq.h\"\n#include \"MIDIPlugin.h\"\n\n#include \"config.h\"\n\n#if defined(USE_MIDI_ALSA)\n# include \"sqUnixMIDIALSA.inc\"\n#else\n# include \"sqUnixMIDINone.inc\"\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/MIDIPlugin/sqUnixMIDIALSA.inc",
    "content": "/* sqUnixMIDIALSA.c -- Unix MIDI support via ALSA\n * \n *   Copyright (C) 1996-2007 by Florian Hars and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a copy\n *   of this software and associated documentation files (the \"Software\"), to deal\n *   in the Software without restriction, including without limitation the rights\n *   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n *   copies of the Software, and to permit persons to whom the Software is\n *   furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n *   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n *   SOFTWARE.\n */\n\n/* Author: Florian@Hars.de\n * \n * Reformatted for and integrated into Squeak build by: ian at\n * squeakland dot oh are gee\n * \n * Last edited: 2009-08-19 04:39:12 by piumarta on emilia-2.local\n */\n\n/*** MIDI Parameters (used with sqMIDIParameter function) ***/\n\n/* TODO: Why is this not in Cross/plugins/MIDIPlugin/MIDIPlugin.h ??? */\n\n#define sqMIDIInstalled\t\t\t\t 1\n/* Read-only.  Return 1 if a MIDI driver is installed, 0 if not.  On\n   OMS-based MIDI drivers, this returns 1 only if the OMS system is\n   properly installed and configured. */\n\n#define sqMIDIVersion\t\t\t\t 2\n/* Read-only.  Return the integer version number of this MIDI driver.\n   The version numbering sequence is relative to a particular driver.\n   That is, version 3 of the Macintosh MIDI driver is not necessarily\n   related to version 3 of the Win95 MIDI driver. */\n\n#define sqMIDIHasBuffer\t\t\t\t 3\n/* Read-only.  Return 1 if this MIDI driver has a time-stamped output\n   buffer, 0 otherwise.  Such a buffer allows the client to schedule\n   MIDI output packets to be sent later.  This can allow more precise\n   timing, since the driver uses timer interrupts to send the data at\n   the right time even if the processor is in the midst of a\n   long-running Squeak primitive or is running some other application\n   or system task. */\n\n#define sqMIDIHasDurs\t\t\t\t 4\n/* Read-only.  Return 1 if this MIDI driver supports an extended\n   primitive for note-playing that includes the note duration and\n   schedules both the note-on and the note-off messages in the driver.\n   Otherwise, return 0. */\n\n#define sqMIDICanSetClock\t\t\t 5\n/* Read-only.  Return 1 if this MIDI driver's clock can be set via an\n   extended primitive, 0 if not. */\n\n#define sqMIDICanUseSemaphore\t\t\t 6\n/* Read-only.  Return 1 if this MIDI driver can signal a semaphore\n   when MIDI input arrives.  Otherwise, return 0.  If this driver\n   supports controller caching and it is enabled, then incoming\n   controller messages will not signal the semaphore. */\n\n#define sqMIDIEchoOn\t\t\t\t 7\n/* Read-write.  If this flag is set to a non-zero value, and if the\n   driver supports echoing, then incoming MIDI events will be echoed\n   immediately.  If this driver does not support echoing, then queries\n   of this parameter will always return 0 and attempts to change its\n   value will do nothing. */\n\n#define sqMIDIUseControllerCache\t\t 8\n/* Read-write.  If this flag is set to a non-zero value, and if the\n   driver supports a controller cache, then the driver will maintain a\n   cache of the latest value seen for each MIDI controller, and\n   control update messages will be filtered out of the incoming MIDI\n   stream.  An extended MIDI primitive allows the client to poll the\n   driver for the current value of each controller.  If this driver\n   does not support a controller cache, then queries of this parameter\n   will always return 0 and attempts to change its value will do\n   nothing. */\n\n#define sqMIDIEventsAvailable\t\t\t 9\n/* Read-only.  Return the number of MIDI packets in the input queue. */\n\n#define sqMIDIFlushDriver\t\t\t10\n/* Write-only.  Setting this parameter to any value forces the driver\n   to flush its I/0 buffer, discarding all unprocessed data.  Reading\n   this parameter returns 0.  Setting this parameter will do nothing\n   if the driver does not support buffer flushing. */\n\n#define sqMIDIClockTicksPerSec\t\t\t11\n/* Read-only.  Return the MIDI clock rate in ticks per second. */\n\n#define sqMIDIHasInputClock\t\t\t12\n/* Read-only.  Return 1 if this MIDI driver timestamps incoming MIDI\n   data with the current value of the MIDI clock, 0 otherwise.  If the\n   driver does not support such timestamping, then the client must\n   read input data frequently and provide its own timestamping. */\n\n/* Put the given port into MIDI mode, which uses a clock supplied by\n   an external MIDI interface adaptor to determine the data rate.\n   Possible external clock rates: 31.25 KHz, 0.5 MHz, 1 MHz, or 2\n   MHz. */\n\n#include <alsa/asoundlib.h>\n\nstatic snd_seq_t *seq      =  0;\nstatic int\t  queue    =  0;\nstatic int\t  in_port  = -1;\nstatic int\t  out_port = -1;\n\n/* MIDI Parser */\n\nenum {idle, want1of2, want2of2, want1of1, sysExclusive};\n\nstatic int state\t= idle;\nstatic int argByte1\t= 0;\nstatic int argByte2\t= 0;\nstatic int lastCmdByte\t= 0;\n\n/* number of argument bytes for each MIDI command */\n\nchar argumentBytes[128] = {\n  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n  3, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n};\n\nstatic void performMIDICmd(snd_seq_event_t *ev, int cmdByte, int arg1, int arg2);\nstatic void processMIDIByte(snd_seq_event_t *ev, int aByte);\nstatic void startMIDICommand(snd_seq_event_t *ev, int cmdByte);\n\nextern struct VirtualMachine *interpreterProxy;\n\n\n/* Close the given MIDI port.  Do nothing if the port is not open.\n   Fail if there is no port of the given number.\n*/\nint sqMIDIClosePort(int portNum)\n{\n  int ret= 0;\n\n  if (portNum == 0)\n    {\n      if (out_port >= 0)\n\tret= snd_seq_delete_simple_port(seq, out_port);\n      out_port= -1;\n    }\n  else if (portNum == 1)\n    {\n      if (in_port >= 0)\n\tret= snd_seq_delete_simple_port(seq, in_port);\n      in_port= -1;\n    }\n  else\n    return interpreterProxy->success(false);\n\n  return ret;\n}\n\n/* Return the current value of the clock used to schedule MIDI events.\n   The MIDI clock is assumed to wrap at or before half the maximum\n   positive SmallInteger value.  This allows events to be scheduled\n   into the future without overflowing into LargePositiveIntegers.  \n   This implementation does not support event scheduling, so it\n   just returns the value of the Squeak millisecond clock.\n*/\nint sqMIDIGetClock(void)\n{\n  debugf(\"sqMIDIGetClock\\n\");\n  success(false);\n  return 0;\n}\n\n/* Return the number of available MIDI interfaces, including both\n   hardware ports and software entities that act like ports.  Ports\n   are numbered from 0 to N-1, where N is the number returned by this\n   primitive.\n*/\nint sqMIDIGetPortCount(void)\n{\n  debugf(\"sqMIDIGetPortCount\\n\");\n  success(true);\n  return 1;\n}\n\n/* Return an integer indicating the directionality of the given\n   port where: 1 = input, 2 = output, 3 = bidirectional.  Fail if\n   there is no port of the given number.\n*/\nint sqMIDIGetPortDirectionality(int portNum)\n{\n  switch (portNum)\n    {\n    case 0:\treturn 2;\n    case 1:\treturn 1;\n    }\n  return interpreterProxy->success(false);\n}\n\n/* Copy the name of the given MIDI port into the string at the given\n   address.  Copy at most length characters, and return the number of\n   characters copied.  Fail if there is no port of the given number.\n*/\nint sqMIDIGetPortName(int portNum, int namePtr, int length)\n{\n  static char *userName[] = { \"out\", \"in\" };\n\n  if (portNum == 0 || portNum == 1)\n    {\n      int count= strlen(userName[portNum]);\n      if (count > length) count= length;\n      memcpy((void *)namePtr, userName, count);\n      return count;\n    }\n  return interpreterProxy->success(false);\n}\n\n/* Open the given port, if possible.  If non-zero, readSemaphoreIndex\n   specifies the index in the external objects array of a semaphore to\n   be signalled when incoming MIDI data is available.  Note that not\n   all implementations support read semaphores (this one does not);\n   see sqMIDICanUseSemaphore.  The interfaceClockRate parameter\n   specifies the clock speed for an external MIDI interface adaptor on\n   platforms that use such adaptors (e.g., Macintosh).  Fail if there\n   is no port of the given number.\n*/\nint sqMIDIOpenPort(int portNum, int readSemaIndex, int interfaceClockRate)\n{\n  debugf(\"sqMIDIOpenPort(%d, %d, %d)\\n\", portNum, readSemaIndex, interfaceClockRate);\n  int type= SND_SEQ_PORT_TYPE_APPLICATION;\n\n  switch (portNum)\n    {\n    case 0:\n      if (out_port < 0)\n\t{\n\t  int caps_out= SND_SEQ_PORT_CAP_READ|SND_SEQ_PORT_CAP_SUBS_READ;\n\t  out_port= snd_seq_create_simple_port(seq, \"out\", caps_out, type);\n\t  if (out_port < 0)\n\t    {\n\t      success(false);\n\t      return 0;\n\t    }\n\t}\n      break;\n\n    case 1:\n      if (in_port < 0)\n\t{\n\t  int caps_in= SND_SEQ_PORT_CAP_WRITE|SND_SEQ_PORT_CAP_SUBS_WRITE;\n\t  in_port= snd_seq_create_simple_port(seq, \"in\", caps_in, type);\n\t  if (in_port < 0)\n\t    {\n\t      success(false);\n\t      return 0;\n\t    }\n\t}\n      break;\n\n    default:\n      return interpreterProxy->success(false);\n    }\n\n  snd_seq_queue_tempo_t *tempo= 0;\n  snd_seq_queue_tempo_alloca(&tempo);\n  snd_seq_queue_tempo_set_tempo(tempo, interfaceClockRate);\n  snd_seq_set_queue_tempo(seq, queue, tempo);\n\n  success(true);\n  return 0;\n}\n\n/* Read or write the given MIDI driver parameter.  If modify is 0,\n   then newValue is ignored and the current value of the specified\n   parameter is returned.  If modify is non-zero, then the specified\n   parameter is set to newValue.  Note that many MIDI driver\n   parameters are read-only; attempting to set one of these parameters\n   fails.  For boolean parameters, true = 1, false = 0.\n*/\nint sqMIDIParameter(int whichParameter, int modify, int newValue)\n{\n  if (modify == 0)\n    {\n      switch (whichParameter)\n\t{\n\tcase sqMIDIInstalled:\n\t  return 1;\n\t  break;\n\n\tcase sqMIDIVersion:\n\t  return 100;\n\t  break;\n\n\tcase sqMIDIHasBuffer:\n\t  return 1;\n\t  break;\n\n\tcase sqMIDIHasDurs:\n\tcase sqMIDICanSetClock:\n\tcase sqMIDICanUseSemaphore:\n\tcase sqMIDIEchoOn:\n\tcase sqMIDIUseControllerCache:\n\t  return 0;\n\t  break;\n\n\tcase sqMIDIEventsAvailable:\n\t  return 1;\t/* pretend that events are always available */\n\t  break;\n\n\tcase sqMIDIFlushDriver:\n\t  return 0;\n\t  break;\n\n\tcase sqMIDIClockTicksPerSec:\n\t  {\n\t    snd_seq_queue_tempo_t *tempo= 0;\n\t    snd_seq_queue_tempo_alloca(&tempo);\n\t    snd_seq_get_queue_tempo(seq, queue, &tempo);\n\t    return snd_seq_queue_tempo_get_tempo(tempo) / 1000.0;\n\t  }\n\t  break;\n\n\tcase sqMIDIHasInputClock:\n\t  return 0;\n\t  break;\n\n\tdefault:\n\t  return interpreterProxy->success(false);\n\t}\n    }\n  else\t/* modify != 0 */\n    {\n    switch (whichParameter)\n      {\n      case sqMIDIInstalled:\n      case sqMIDIVersion:\n      case sqMIDIHasBuffer:\n      case sqMIDIHasDurs:\n      case sqMIDICanSetClock:\n      case sqMIDICanUseSemaphore:\n\treturn interpreterProxy->success(false);\n\tbreak;\n\n      case sqMIDIEchoOn:\n\t/* no-op; echoing not supported */\n\tbreak;\n\n      case sqMIDIUseControllerCache:\n\t/* no-op; controller cache not supported */\n\tbreak;\n\n      case sqMIDIEventsAvailable:\n\treturn interpreterProxy->success(false);\n\tbreak;\n\n      case sqMIDIFlushDriver:\n\tsnd_seq_drain_output(seq);\n\tbreak;\n\n      case sqMIDIClockTicksPerSec:\n\t{\n\t  snd_seq_queue_tempo_t *tempo= 0;\n\t  snd_seq_queue_tempo_alloca(&tempo);\n\t  snd_seq_queue_tempo_set_tempo(tempo, 1000.0 * newValue);\n\t  snd_seq_set_queue_tempo(seq, queue, tempo);\n\t}\n\tbreak;\n\n      default:\n\treturn interpreterProxy->success(false);\n      }\n    }\n\n  return 0;\n}\n\n/* bufferPtr is the address of the first byte of a Smalltalk ByteArray\n   of the given length.  Copy up to (length - 4) bytes of incoming\n   MIDI data into that buffer, preceded by a 4-byte timestamp in the\n   units of the MIDI clock, most significant byte first.\n   Implementations that do not support timestamping of incoming data\n   as it arrives (see sqMIDIHasInputClock) simply set the timestamp to\n   the value of the MIDI clock when this function is called.  Return\n   the total number of bytes read, including the timestamp bytes.\n   Return zero if no data is available.  Fail if the buffer is shorter\n   than five bytes, since there must be enough room for the timestamp\n   plus at least one data byte.\n*/\nint sqMIDIPortReadInto(int portNum, int count, int bufferPtr)\n{\n  debugf(\"sqMIDIPortRead\\n\");\n  success(false);\n  return 0;\n}\n\n/* bufferPtr is the address of the first byte of a Smalltalk ByteArray\n   of the given length.  Send its contents to the given port when the\n   MIDI clock reaches the given time.  If time equals zero, then send\n   the data immediately.  Implementations that do not support a\n   timestamped output queue, such as this one, always send the data\n   immediately; see sqMIDIHasBuffer.\n*/\nint sqMIDIPortWriteFromAt(int portNum, int count, int bufferPtr, int time)\n{\n  if (portNum == 0)\n    {\n      int i;\n      snd_seq_event_t ev;\n      unsigned char *bytePtr= (unsigned char *)bufferPtr;\n\n      debugf(\"Port %d Write:\", portNum);\n      for (i= 0;  i < count;  ++i) debugf(\" %d\", (int)bytePtr[i]);\n      debugf(\" at %d\\n\", time);\n      \n      snd_seq_ev_clear(&ev);\n      snd_seq_ev_set_source(&ev, out_port);\n      snd_seq_ev_set_subs(&ev);\n      snd_seq_ev_schedule_tick(&ev, queue, 0, time);\n      for (i= 0;  i < count;  ++i)\n\tprocessMIDIByte(&ev, *bytePtr++);\n      snd_seq_event_output(seq, &ev);\n      snd_seq_drain_output(seq);\n\n      success(true);\n      return count;\n    }\n\n  return interpreterProxy->success(false);\n}\n\n\nint midiInit(void)\n{\n  if (snd_seq_open(&seq, \"default\", SND_SEQ_OPEN_INPUT|SND_SEQ_OPEN_OUTPUT, 0) < 0)\n    {\n      success(false);\n      return 0;\n    }\n  snd_seq_set_client_name(seq, \"Squeak\");\n  queue= snd_seq_alloc_queue(seq);\n  if (queue < 0)\n    {\n      snd_seq_close(seq);\n      seq= NULL;\n      success(false);\n      return 0;\n  }\n  snd_seq_start_queue(seq, queue, NULL);\n\n  success(true);\n  return true;\n}\n\nint sqMIDIParameterSet(int whichParameter, int newValue)\n{\n  sqMIDIParameter(whichParameter, true, newValue);\n  return 0;\n}\n\nint sqMIDIParameterGet(int whichParameter)\n{\n  sqMIDIParameter(whichParameter, false, 0);\n  return 0;\n}\n\nint midiShutdown(void)\n{\n  debugf(\"midiShutdown\\n\");\n  success(false);\n  return 0;\n}\n\nstatic void performMIDICmd(snd_seq_event_t *ev, int cmdByte, int arg1, int arg2)\n{\n  int cmd= cmdByte & 0xF0;\n  int ch=  cmdByte & 0x0F;\n\n  switch (cmd)\n    {\n    case 128:\t/* note off */\n      debugf(\"Note off %d, %d\\n\", ch, arg1);\n      snd_seq_ev_set_noteoff(ev, ch, arg1, 0);\n      break;\n\n    case 144:\t/* note on */\n      debugf(\"Note on %d, %d, %d\\n\", ch, arg1, arg2);\n      snd_seq_ev_set_noteon(ev, ch, arg1, arg2);\n      break;\n\n    case 176:\t/* control change */\n      {\n\tint val= ((arg1 >= 32) && (arg1 <= 63))\n\t  ? (arg2 << 1)\t\t/* LSB of controllers 0-31 */\n\t  : (arg2 << 8);\t/* scale MSB to QT controller range */\n\tsnd_seq_ev_set_controller(ev, ch, arg1, val);\n      }\n      break;\n\n    case 192:\t/* program change */\n      {\n\tint instrument= arg1 + 1;\n\tsnd_seq_ev_set_pgmchange(ev, ch, instrument);\n      }\n      break;\n\n    case 224:\t/* pitch bend */\n      {\n\tint bend= ((arg2 << 7) + arg1) - (64 << 7);\n\tbend /= 32;  /* default sensitivity = +/- 2 semitones */\n\tsnd_seq_ev_set_pitchbend(ev, ch, bend);\n      }\n      break;\n    }\n}\n\nstatic void processMIDIByte(snd_seq_event_t *ev, int aByte)\n{\n  if (aByte > 247) return;\t/* skip all real-time messages */\n\n  switch (state)\n    {\n    case idle:\n      if (aByte >= 128)\t\t/* start a new command using the action table */\n\tstartMIDICommand(ev, aByte);\n      else\t/* data byte arrived in idle state: use running status if possible */\n\t{\n\t  if (lastCmdByte == 0)\t/* last command byte is not defined; just skip this byte */\n\t    return;\n\t  else\n\t    {\n\t      /* process this data as if it had the last command byte in front of it */\n\t      startMIDICommand(ev, lastCmdByte);\n\t      /* the previous line put us into a new state; we now do a recursive\n\t\t call to process the data byte in this new state */\n\t      processMIDIByte(ev, aByte);\n\t      return;\n\t    }\n\t}\n      break;\n\n    case want1of2:\n      argByte1= aByte;\n      state= want2of2;\n      break;\n\n    case want2of2:\n      argByte2= aByte;\n      performMIDICmd(ev, lastCmdByte, argByte1, argByte2);\n      state= idle;\n      break;\n\n    case want1of1:\n      argByte1= aByte;\n      performMIDICmd(ev, lastCmdByte, argByte1, 0);\n      state= idle;\n      break;\n\n    case sysExclusive:\n      if (aByte < 128)\n\t{\n\t  /* skip a system exclusive data byte */\n\t}\n      else\n\t{\n\t  if (aByte < 248)\n\t    {\n\t      /* a system exclusive message can be terminated by any non-real-time command byte */\n\t      state= idle;\n\t      if (aByte != 247)\n\t\t{\n\t\t  processMIDIByte(ev, aByte);\t/* if not endSysExclusive, byte is the start the next command */\n\t\t}\n\t    }\n\t}\n      break;\n    }\n}\n\nstatic void startMIDICommand(snd_seq_event_t *ev, int cmdByte)\n{\n  int argCount= argumentBytes[cmdByte - 128];\n\n  switch (argCount)\n    {\n    case 0:\t/* start a zero argument command (e.g., a real-time message) */\n      /* Stay in the current state and don't change active status.\n\t Real-time messages may arrive between data bytes without disruption. */\n      performMIDICmd(ev, cmdByte, 0, 0);\n      break;\n\n    case 1:\t/* start a one argument command */\n      lastCmdByte= cmdByte;\n      state= want1of1;\n      break;\n\n    case 2:\t/* start a two argument command */\n      lastCmdByte= cmdByte;\n      state= want1of2;\n      break;\n\n    case 3:\t/* start a variable length 'system exclusive' command */\n      /* a system exclusive command clears running status */\n      lastCmdByte= 0;\n      state= sysExclusive;\n      break;\n    }\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/MIDIPlugin/sqUnixMIDINone.inc",
    "content": "/* sqUnixMIDINone.c -- Unix with no MIDI support\n * \n *   Copyright (C) 1996-2007 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a copy\n *   of this software and associated documentation files (the \"Software\"), to deal\n *   in the Software without restriction, including without limitation the rights\n *   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n *   copies of the Software, and to permit persons to whom the Software is\n *   furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n *   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n *   SOFTWARE.\n */\n\n/* Author: Ian.Piumarta@INRIA.FR\n * \n * Last edited: 2007-03-11 13:30:32 by piumarta on emilia.local\n */\n\n/* Put the given port into MIDI mode, which uses a clock supplied\n   by an external MIDI interface adaptor to determine the data rate.\n   Possible external clock rates: 31.25 KHz, 0.5 MHz, 1 MHz, or 2 MHz. */\nint serialPortMidiClockRate(int portNum, int interfaceClockRate)\n{\n\tsuccess(false);\n\treturn 0;\n}\n\n/* Close the given MIDI port. Do nothing if the port is not open.\n   Fail if there is no port of the given number.*/\nint sqMIDIClosePort(int portNum)\n{\n\tsuccess(false);\n\treturn 0;\n}\n\n/* Return the current value of the clock used to schedule MIDI events.\n   The MIDI clock is assumed to wrap at or before half the maximum\n   positive SmallInteger value. This allows events to be scheduled\n   into the future without overflowing into LargePositiveIntegers. \n   This implementation does not support event scheduling, so it\n   just returns the value of the Squeak millisecond clock. */\nint sqMIDIGetClock(void)\n{\n\tsuccess(false);\n\treturn 0;\n}\n\n/* Return the number of available MIDI interfaces, including both\n   hardware ports and software entities that act like ports. Ports\n   are numbered from 0 to N-1, where N is the number returned by this\n   primitive. */\nint sqMIDIGetPortCount(void)\n{\n\tsuccess(false);\n\treturn 0;\n}\n\n/* Return an integer indicating the directionality of the given\n   port where: 1 = input, 2 = output, 3 = bidirectional. Fail if\n   there is no port of the given number. */\nint sqMIDIGetPortDirectionality(int portNum)\n{\n\tsuccess(false);\n\treturn 0;\n}\n\n/* Copy the name of the given MIDI port into the string at the given\n   address. Copy at most length characters, and return the number of\n   characters copied. Fail if there is no port of the given number.*/\nint sqMIDIGetPortName(int portNum, int namePtr, int length)\n{\n\tsuccess(false);\n\treturn 0;\n}\n\n/* Open the given port, if possible. If non-zero, readSemaphoreIndex\n   specifies the index in the external objects array of a semaphore\n   to be signalled when incoming MIDI data is available. Note that\n   not all implementations support read semaphores (this one does\n   not); see sqMIDICanUseSemaphore. The interfaceClockRate parameter\n   specifies the clock speed for an external MIDI interface\n   adaptor on platforms that use such adaptors (e.g., Macintosh).\n   Fail if there is no port of the given number.*/\nint sqMIDIOpenPort(int portNum, int readSemaIndex, int interfaceClockRate)\n{\n\tsuccess(false);\n\treturn 0;\n}\n\n/* Read or write the given MIDI driver parameter. If modify is 0,\n   then newValue is ignored and the current value of the specified\n   parameter is returned. If modify is non-zero, then the specified\n   parameter is set to newValue. Note that many MIDI driver parameters\n   are read-only; attempting to set one of these parameters fails.\n   For boolean parameters, true = 1, false = 0. */\nint sqMIDIParameter(int whichParameter, int modify, int newValue)\n{\n\tsuccess(false);\n\treturn 0;\n}\n\n/* bufferPtr is the address of the first byte of a Smalltalk\n   ByteArray of the given length. Copy up to (length - 4) bytes\n   of incoming MIDI data into that buffer, preceded by a 4-byte\n   timestamp in the units of the MIDI clock, most significant byte\n   first. Implementations that do not support timestamping of\n   incoming data as it arrives (see sqMIDIHasInputClock) simply\n   set the timestamp to the value of the MIDI clock when this\n   function is called. Return the total number of bytes read,\n   including the timestamp bytes. Return zero if no data is\n   available. Fail if the buffer is shorter than five bytes,\n   since there must be enough room for the timestamp plus at\n   least one data byte. */\nint sqMIDIPortReadInto(int portNum, int count, int bufferPtr)\n{\n\tsuccess(false);\n\treturn 0;\n}\n\n/* bufferPtr is the address of the first byte of a Smalltalk\n   ByteArray of the given length. Send its contents to the given\n   port when the MIDI clock reaches the given time. If time equals\n   zero, then send the data immediately. Implementations that do\n   not support a timestamped output queue, such as this one, always\n   send the data immediately; see sqMIDIHasBuffer. */\nint sqMIDIPortWriteFromAt(int portNum, int count, int bufferPtr, int time)\n{\n\tsuccess(false);\n\treturn 0;\n}\n\n\nint midiInit(void)\n{\n\tsuccess(false);\n\treturn 0;\n}\n\nint sqMIDIParameterGet(int which)\n{\n\tsuccess(false);\n\treturn 0;\n}\n\nint sqMIDIParameterSet(int which, int value)\n{\n\tsuccess(false);\n\treturn 0;\n}\n\nint midiShutdown(void)\n{\n\tsuccess(false);\n\treturn 0;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/Mpeg3Plugin/Makefile.in",
    "content": "# Makefile.in for Mpeg3Plugin on Unix\n# \n# Author: ian.piumarta@inria.fr\n# \n# Last edited: 2002-07-10 23:52:17 by piumarta on emilia.inria.fr\n\n[make_cfg]\n[make_plg]\n\nTARGET\t= Mpeg3Plugin$a\n\nPLUGIN\t= Mpeg3Plugin$o\n\nVIDEO\t= getpicture$o headers$o idct$o macroblocks$o mmxtest$o motion$o \\\n\t  mpeg3video$o output$o reconstruct$o seek$o slice$o vlc$o\nAUDIO\t= dct$o header$o layer1$o layer2$o layer3$o mpeg3audio$o pcm$o \\\n\t  synthesizers$o tables$o\nLIBMPEG\t= bitstream$o changesForSqueak$o libmpeg3$o mpeg3atrack$o \\\n\t  mpeg3demux$o mpeg3io$o mpeg3title$o mpeg3vtrack$o\n\nOBJS\t= $(PLUGIN) $(VIDEO) $(AUDIO) $(LIBMPEG)\n\nXINCLUDES\t= [includes]\nXDEFS\t\t= [xdefs]\n\n$(TARGET) : $(OBJS) Makefile\n\t$(LINK) $(TARGET) $(OBJS)\n\t$(RANLIB) $(TARGET)\n\n[make_targets]\n\n.force :\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/Mpeg3Plugin/acinclude.m4",
    "content": "# Add `--enable-mpg-[mmx,pthreads]' switches\n\nAC_ARG_ENABLE(mpg-mmx,\n[  --enable-mpg-mmx        enable MMX support in Mpeg3Plugin [default=no]],\n  XDEFS=\"-DUSE_MMX\",\n  XDEFS=\"\")\n\nAC_ARG_ENABLE(mpg-pthreads,\n[  --enable-mpg-pthreads   enable pthread support in Mpeg3Plugin [default=no]],\n  ,\n  XDEFS=\"$XDEFS -DNOPTHREADS\")\n\n# Define `[xdefs]' in Makefile.in\n\nAC_PLUGIN_DEFINE_UNQUOTED([xdefs], $XDEFS)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/Mpeg3Plugin/config.cmake",
    "content": "IF (VM_HOST_CPU MATCHES \"i[3456789]86\")\n  PLUGIN_DEFINITIONS (-DUSE_MMX=1)\nENDIF ()\n\nPLUGIN_DEFINITIONS (-DNOPTHREADS=1)\n\nSET (lmp3 \"${cross}/plugins/Mpeg3Plugin/libmpeg\")\n\nLIST(APPEND ${plugin}_extra_sources\n  ${lmp3}/bitstream.c ${lmp3}/libmpeg3.c ${lmp3}/mpeg3atrack.c ${lmp3}/mpeg3demux.c ${lmp3}/mpeg3io.c\n  ${lmp3}/mpeg3title.c ${lmp3}/mpeg3vtrack.c ${lmp3}/changesForSqueak.c\n  ${lmp3}/audio/dct.c ${lmp3}/audio/header.c ${lmp3}/audio/layer2.c ${lmp3}/audio/layer3.c\n  ${lmp3}/audio/mpeg3audio.c ${lmp3}/audio/pcm.c ${lmp3}/audio/synthesizers.c ${lmp3}/audio/tables.c\n  ${lmp3}/video/getpicture.c ${lmp3}/video/headers.c ${lmp3}/video/idct.c ${lmp3}/video/macroblocks.c\n  ${lmp3}/video/mmxtest.c ${lmp3}/video/motion.c ${lmp3}/video/mpeg3video.c ${lmp3}/video/output.c\n  ${lmp3}/video/reconstruct.c ${lmp3}/video/seek.c ${lmp3}/video/slice.c ${lmp3}/video/vlc.c\n)\n\nPLUGIN_INCLUDE_DIRECTORIES (${lmp3} ${lmp3}/audio ${lmp3}/video)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/Mpeg3Plugin/mkmf.subdirs",
    "content": "platforms/Cross/plugins/Mpeg3Plugin/libmpeg\nplatforms/Cross/plugins/Mpeg3Plugin/libmpeg/audio\nplatforms/Cross/plugins/Mpeg3Plugin/libmpeg/video\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/OggPlugin/Makefile.inc",
    "content": "PLIBS = -logg -lvorbis -lvorbisenc -lspeex\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/OggPlugin/acinclude.m4",
    "content": "# -*- sh -*-\n\nAC_MSG_CHECKING([for Ogg Vorbis and Speex support])\n\nAC_TRY_COMPILE([\n  #include <vorbis/codec.h>\n  #include <vorbis/vorbisenc.h>\n  #include <speex/speex.h>\n],[;],[\n  AC_CHECK_LIB(ogg, ogg_sync_buffer,\n    AC_CHECK_LIB(vorbis, vorbis_synthesis_headerin,\n      AC_CHECK_LIB(speex, speex_packet_to_header,\n\tAC_MSG_RESULT(yes),\n\tAC_MSG_RESULT(no)\n\tAC_PLUGIN_DISABLE),\n      AC_MSG_RESULT(no)\n      AC_PLUGIN_DISABLE),\n    AC_MSG_RESULT(no)\n    AC_PLUGIN_DISABLE)\n],[\n  AC_MSG_RESULT(no)\n  AC_PLUGIN_DISABLE\n])\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/OggPlugin/config.cmake",
    "content": "PLUGIN_REQUIRE_INCLUDE (VORBIS_CODEC     vorbis/codec.h)\nPLUGIN_REQUIRE_INCLUDE (VORBIS_VORBISENC vorbis/vorbisenc.h)\nPLUGIN_REQUIRE_INCLUDE (SPEEX_SPEEX      speex/speex.h)\n\nPLUGIN_REQUIRE_LIBRARY (OGG    ogg)\nPLUGIN_REQUIRE_LIBRARY (VORBIS vorbis)\nPLUGIN_REQUIRE_LIBRARY (SPEEX  speex)\n\nIF (APPLE)\n  PLUGIN_DISABLE ()\t# ogg framework headers are broken on 10.5.7\nENDIF ()\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/PrintJobPlugin/sqPrinting.c",
    "content": "#include \"PrintJobPlugin.h\"\n#include <stdio.h>\n\n\n/* none of these setup, cleanup, preprocess, postprocess,\n   *etc. commands make any sense on Unix.  Well, I suppose such a\n   *thing could* be implemented, but it would all have to be done by\n   *hand */\nint ioPrintSetup(PrintingLogicPtr  *printJob) \n{\n  *printJob= (PrintingLogicPtr) 1234;  /* I would like to put NULL here, but NULL is considered an error.... */\n  return 0;\n}\n\nint ioPrintPreProcessing(PrintingLogicPtr printJob,int numberOfPages)\n{\n  return 0;\n}\n\nint ioPrintPostProcessing(PrintingLogicPtr printJob)\n{\n  return 0;\n}\n\nint ioPrintCleanup(PrintingLogicPtr *printJob)\n{\n  return 0;\n}\n\nint ioInitPrintJob(void)\n{\n  return 1;  /* it would be nice to have a standard on which functions\n                return 0 for success and which functions return\n                non-zero... */\n}\n\nint ioShutdownPrintJob(void)\n{\n  return 1;\n}\n\nint ioPagePreProcessing(PrintingLogicPtr printJob)\n{\n  return 0;\n}\n\nint ioPagePostProcessing(PrintingLogicPtr printJob)\n{\n  return 0;\n}\n\n\n\n\n/* ioGetFirstPageNumber and ioGetLastPageNumber --\n   Since the above operations aren't actually performed, there are no\n   page numbers, or any other info, to be returned from the plugin.\n   These functions just return page 1.  */\n   \nint ioPrintGetFirstPageNumber(PrintingLogicPtr printJob)\n{\n  return 1;\n}\n\n\nint ioPrintGetLastPageNumber(PrintingLogicPtr printJob)\n{\n  return 1;\n}\n\n\n/* ioPrint -- theoretically this should be where the printing happens,\n   but that means recording each portion of the print job.  It should\n   be fixed up at some point to do so; users should be able, for\n   example, to cancel a print job.  Then again, for the common\n   application of printing out the current desktop, it doesn't matter */\nint ioPrint(PrintingLogicPtr printJob)\n{\n  return 0;\n}\n\n\n\n/* ioPagePostscript -- print out a posstcript file.  This just popen's lpr */\n/* XXX the exact print command should probably be configurable */\nint ioPagePostscript(PrintingLogicPtr printJob,char *postscript,int postscriptLength)\n{\n  FILE *lprOutput;\n  size_t written;\n\n  lprOutput=popen(\"lpr\", \"w\");\n  if(lprOutput == NULL) {\n    perror(\"lpr\");\n    return 1;\n  }\n\n  written = fwrite(postscript, postscriptLength, 1, lprOutput);\n  if(written < 1) {\n    perror(\"fwrite\");\n    pclose(lprOutput);\n    return 1;\n  }\n\n  pclose(lprOutput);\n  return 0;\n}\n\n\n/* ioPageForm -- print out a form */\nint ioPageForm(PrintingLogicPtr printJob, char *aBitMap,int h,int w,int d,float sh,float sw,int oh,int ow)\n{\n  /* just call the original primitive for form-printing */\n  return ioFormPrint((int)aBitMap, w, h, d, sw, sh, 1);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/PrintJobPlugin/sqPrinting.h",
    "content": "/* sqPrinting.h for Unix */\n\ntypedef int PrintingLogic;\ntypedef PrintingLogic *PrintingLogicPtr;\n\n\nint ioPrintSetup(PrintingLogicPtr  *printJob);\nint ioPrintPreProcessing(PrintingLogicPtr printJob,int numberOfPages);\nint ioPrint(PrintingLogicPtr printJob);\nint ioPrintPostProcessing(PrintingLogicPtr printJob);\nint ioPrintCleanup(PrintingLogicPtr *printJob);\nint ioInitPrintJob(void);\nint ioShutdownPrintJob(void);\nint ioPagePreProcessing(PrintingLogicPtr printJob);\nint ioPagePostProcessing(PrintingLogicPtr printJob);\nint ioPagePostscript(PrintingLogicPtr printJob,char *postscript,int postscriptLength);\nint ioPageForm(PrintingLogicPtr printJob, char *aBitMap,int h,int w,int d,float sh,float sw,int oh,int ow);\nint ioPrintGetFirstPageNumber(PrintingLogicPtr printJob);\nint ioPrintGetLastPageNumber(PrintingLogicPtr printJob);\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/PseudoTTYPlugin/PseudoTTY.st",
    "content": "'From Squeak3.2gamma of 15 January 2002 [latest update: #4881] on 11 July 2002 at 6:06:32 am'!\nAsyncFile subclass: #PseudoTTY\n\tinstanceVariableNames: 'inputBuffer outputBuffer ioError '\n\tclassVariableNames: 'AsyncFileError '\n\tpoolDictionaries: ''\n\tcategory: 'Communications-Endpoints'!\n!PseudoTTY commentStamp: '<historical>' prior: 0!\nI am a very particular kind of AsyncFile connected to the `master' half of a pseudo TTY (pty).  My purpose in life is to provide communication with a process (in the fork+exec sense) that is connected to the `slave' half of the pty.  (Writing to a master pty causes the data to appear on the slave's stdin, and anything written to the slave's stdout/stderr is available for subsequent reading on the master pty.)\n\nYou create me by sending my class\n\n\tcommand: programNameString arguments: arrayOfArgumentStrings\n\nwhich will spawn a new process running the named program with the given arguments.  You can subsequently send me #nextPut: (or #nextPutAll:) to send stuff to the stdin of the program, and #upToEnd to retrieve data that the program writes to its stdout or stderr.  You can also send me #close which will shut down the program (by sending it SIGTERM followed shortly thereafter by SIGKILL if it's being stubborn) and both halves of the pseudo tty.\n\nThe spawned program runs in a new session, will be its own session and process group leader and will have the slave half of the pty as its controlling terminal.  (In plain English this means that the program will behave exactly as if it were being run from login, in particular: shells will enable job control, screen-oriented programs like Emacs will work properly, the user's login tmode settings will be inherited, intr/quit/etc. characters will be cooked into the corresponding signals, and window geometry changes will be propagated to the program.  Neat, huh? ;-)\n\nNote that you need both the AsynchFile and PseudoTTY plugins in order for any of this to work.\n\nNote also that I am really intended to be used by a ProcessEndpoint as part of a ProtocolStack (along with a terminal emulator and a TeletypeMorph to provide interaction with the subprocess).\n!\n\n\n!PseudoTTY methodsFor: 'initialize-release' stamp: 'ikp 7/10/2002 21:58'!\nclose\n\t\"Close the master half of the pty.  The subprocess should exit (EOF on stdin) although badly written programs might start looping.\"\n\n\tfileHandle isNil ifTrue: [^self].\n\tself primClosePts: fileHandle.\n\tfileHandle _ nil.\n\tSmalltalk unregisterExternalObject: semaphore.\n\tioError _ AsyncFileError.\n\tsemaphore signal.\t\"wake up waiters\"\n\tsemaphore _ nil! !\n\n!PseudoTTY methodsFor: 'initialize-release' stamp: 'ikp 7/11/2002 02:47'!\ncommand: programName arguments: argumentArray\n\t\"Create a pseudo tty and then spawn programName with its stdin, out and err connected to the slave end of the pty.\"\n\n\t| semaIndex |\n\t\"AsyncFile\"\n\tname _ programName.\n\twriteable _ true.\n\tsemaphore _ Semaphore new.\n\tsemaIndex _ Smalltalk registerExternalObject: semaphore.\n\t\"PseudoTTY\"\n\tinputBuffer _ ByteArray new: 8192.\n\toutputBuffer _ ByteArray new: 1.\n\tioError _ 0.\n\tfileHandle _ self\n\t\tforkAndExecWithPts: programName\n\t\targuments: (argumentArray isNil\n\t\t\tifTrue: [#()]\n\t\t\tifFalse: [argumentArray])\n\t\tsemaIndex: semaIndex.\n\tfileHandle isNil ifTrue: [\n\t\tSmalltalk unregisterExternalObject: semaphore.\n\t\tsemaphore _ nil.\n\t\tioError _ AsyncFileError.\n\t\t^nil].\n\tProcessor yield.\n\tsemaphore signal.\n\t^self! !\n\n\n!PseudoTTY methodsFor: 'accessing' stamp: 'ikp 7/11/2002 01:36'!\nname\n\t\"Answer the name of the program.\"\n\n\t^name! !\n\n\n!PseudoTTY methodsFor: 'input/output' stamp: 'ikp 7/7/2002 02:56'!\nioError\n\t\"Return the last error code received during read/write.  If this is ever non-zero it means the subprocess has probably died.\"\n\n\t^ioError! !\n\n!PseudoTTY methodsFor: 'input/output' stamp: 'ikp 7/7/2002 06:22'!\nisConnected\n\n\t^fileHandle notNil and: [ioError == 0]! !\n\n!PseudoTTY methodsFor: 'input/output' stamp: 'ikp 7/7/2002 06:16'!\nnextPut: aCharacterOrInteger\n\t\"Send a single character to the stdin of my subprocess.\"\n\n\tfileHandle isNil ifTrue: [^self].\n\toutputBuffer at: 1 put: aCharacterOrInteger asInteger.\n\tself\n\t\tprimWriteStart: fileHandle\n\t\tfPosition: -1\n\t\tfromBuffer: outputBuffer\n\t\tat: 1\n\t\tcount: 1! !\n\n!PseudoTTY methodsFor: 'input/output' stamp: 'ikp 7/7/2002 06:16'!\nnextPutAll: aStringOrByteArray\n\t\"Send an entire string to the stdin of my subprocess.\"\n\n\tfileHandle isNil ifTrue: [^self].\n\tself\n\t\tprimWriteStart: fileHandle\n\t\tfPosition: -1\n\t\tfromBuffer: aStringOrByteArray\n\t\tat: 1\n\t\tcount: aStringOrByteArray size! !\n\n!PseudoTTY methodsFor: 'input/output' stamp: 'ikp 7/7/2002 13:28'!\nnoteWindowSize: aPoint\n\n\tself primWindowSize: fileHandle cols: aPoint x rows: aPoint y! !\n\n!PseudoTTY methodsFor: 'input/output' stamp: 'ikp 7/9/2002 06:15'!\npeekUpToEnd\n\t\"Answer everything the subprocess has written to stdout or stderr since the last send of #upToEnd.  Note that stuff written to stderr might arrive earlier than stuff written to stdout if the former is unbuffered and the latter line buffered in the subprocess's stdio library.\"\n\n\t| n |\n\tself isConnected ifFalse: [^nil].\n\tn _ self\n\t\t\tprimReadResult: fileHandle\n\t\t\tintoBuffer: inputBuffer\n\t\t\tat: 1\n\t\t\tcount: inputBuffer size.\n\t^(self isConnected and: [n > 0])\n\t\tifTrue: [inputBuffer copyFrom: 1 to: n]\n\t\tifFalse: [nil]! !\n\n!PseudoTTY methodsFor: 'input/output' stamp: 'ikp 7/7/2002 21:28'!\nupToEnd\n\t\"Answer everything the subprocess has written to stdout or stderr since the last send of #upToEnd.  Note that stuff written to stderr might arrive earlier than stuff written to stdout if the former is unbuffered and the latter line buffered in the subprocess's stdio library.\"\n\n\t| n |\n\t[self isConnected and: [(n _ self startRead: inputBuffer size;\n\t\t\tprimReadResult: fileHandle\n\t\t\tintoBuffer: inputBuffer\n\t\t\tat: 1\n\t\t\tcount: inputBuffer size) == Busy]]\n\t\twhileTrue: [self waitForCompletion].\n\t(self isConnected and: [n > 0])\n\t\tifTrue: [^inputBuffer copyFrom: 1 to: n]\n\t\tifFalse: [ioError _ AsyncFileError.  ^nil]\t\t\"subprocess has died or closed stdout\"! !\n\n\n!PseudoTTY methodsFor: 'private' stamp: 'ikp 7/10/2002 22:57'!\nforkAndExecWithPts: aCommand arguments: argArray semaIndex: semaIndex\n\t\"Run aCommand as an inferior process and connect its std{in,out,err} to the receiver through a pseudo tty.\"\n\n\t^self primForkAndExec: aCommand arguments: argArray semaIndex: semaIndex! !\n\n!PseudoTTY methodsFor: 'private' stamp: 'ikp 7/7/2002 03:07'!\nstartRead: count\n\t\"Indicate interest in receiving more data from stdout/stderr of the subprocess.\"\n\n\tself\n\t\tprimReadStart: fileHandle\n\t\tfPosition: -1\n\t\tcount: count! !\n\n\n!PseudoTTY methodsFor: 'primitives' stamp: 'ikp 7/7/2002 05:11'!\nprimClosePts: fHandle\n\t\"Kill the process whose pts is associated with our pty.\"\n\n\t<primitive: 'primPtyClose' module: 'PseudoTTYPlugin'>\n\t^nil! !\n\n!PseudoTTY methodsFor: 'primitives' stamp: 'ikp 7/10/2002 21:48'!\nprimForkAndExec: command arguments: arguments semaIndex: semaIndex\n\t\"Fork and exec command with the given arguments connecting the new process to a slave tty created from the receiver (which is the master half of a pseudo tty).\"\n\n\t<primitive: 'primPtyForkAndExec' module: 'PseudoTTYPlugin'>\n\t^nil! !\n\n!PseudoTTY methodsFor: 'primitives' stamp: 'ikp 7/7/2002 06:41'!\nprimWindowSize: fHandle cols: cols rows: rows\n\t\"Set the size of the terminal connected to the pty.\"\n\n\t<primitive: 'primPtyWindowSize' module: 'PseudoTTYPlugin'>\n\t^nil! !\n\n\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\n\nPseudoTTY class\n\tinstanceVariableNames: ''!\n\n!PseudoTTY class methodsFor: 'class initialization' stamp: 'ikp 7/7/2002 02:25'!\ninitialize\n\t\"Can't rely on Error because the compiler finds the global before the class var.  Ho hum.\"\n\t\"PseudoTTY initialize\"\n\n\tAsyncFileError _ -2! !\n\n\n!PseudoTTY class methodsFor: 'instance creation' stamp: 'ikp 7/7/2002 04:33'!\ncommand: commandString arguments: argumentArray\n\n\t\"(PseudoTTY command: '/bin/bash' arguments: #('-c' 'pwd')) upToEnd asString\"\n\n\t^self new\n\t\tcommand: commandString\n\t\targuments: argumentArray! !\n\n\n!PseudoTTY class methodsFor: 'examples' stamp: 'ikp 7/10/2002 23:00'!\nexample\n\t\"Show the user's current tty mode settings.\"\n\t\"PseudoTTY example\"\n\n\t| pty output buf |\n\tpty _ self command: '/bin/stty' arguments: #('-a').\n\tpty isNil ifTrue: [^self error: 'Could not create pty or process.'].\n\toutput _ WriteStream on: String new.\n\toutput nextPutAll: 'Your tty modes are: '; cr; space; cr.\n\t[(buf _ pty upToEnd) isNil] whileFalse: [output nextPutAll: buf asString].\n\tpty close.\n\tself inform: output contents! !\n\n\nPseudoTTY initialize!\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/PseudoTTYPlugin/PseudoTTYPlugin.st",
    "content": "'From Squeak3.2gamma of 15 January 2002 [latest update: #4881] on 11 July 2002 at 12:42:23 am'!\nTestInterpreterPlugin subclass: #PseudoTTYPlugin\n\tinstanceVariableNames: 'sCOAFfn '\n\tclassVariableNames: ''\n\tpoolDictionaries: ''\n\tcategory: 'VMConstruction-Plugins'!\n!PseudoTTYPlugin commentStamp: '<historical>' prior: 0!\nAuthor:\t\tIan Piumarta <ian.piumarta@inria.fr>\nDate:\t\t2002-07-06\nVersion:\t\t1.0\n\nThis plugin extends AsynchFilePlugin with support for Unix98-style pseudo ttys.  Pseudo ttys (ptys) are a means for some program A (e.g., Squeak) to spawn a child process B and have B's std{in,out,err} connected to something that smells (to B) like a terminal (the `slave' tty) but which is in fact connected directly to A via another device (the `master' tty).\n\nOne example of this would be Squeak spawning an interactive shell.  If we were to use pipes (or sockets) to communicate with the shell's std{in,out,err} then various screen-oriented programs (such as Emacs) would refuse to run, the shell itself would refuse to implement job control and `cooked' characters (intr, quit, suspend, etc.) would be ignored -- all because pipes (and sockets) are absolutely not the same thing as a tty.  Connecting the shell to a slave tty (and talking to it indirectly through our master tty) allows such programs (and shells and interrupts, etc.) to work properly, since they believe themselves to be connected to a `real' terminal.\n\nTo use this plugin on any system that supports Unix98 pseudo ttys you would do something like this:\n\n\t- open an AsyncFile on /dev/ptmx (the Pseudo Tty master MultipleXor) which returns\n\t  a handle on the master tty (and creates the slave tty device -- usually something like\n\t  /dev/ttyN or /dev/pts/N);\n\t- prepare the slave tty for use by an inferior process by calling primGrantPt and\n\t  primUnlockPt on the master;\n\t- call primPtsName on the master to obtain the name of the allocated slave tty device;\n\t- open the slave tty for read (stdin), write (stdout) and again for write (stderr);\n\t- fork;\n\t- connect the inferior process's std{in,out,err} to the slave tty device through the three\n\t  descriptors just opened;\n\t- exec the shell (or whatever) in the inferior process.\n\nAfter all that the parent process can write (via the original AsyncFile) to the master tty (to provide data for the inferior process's stdin) and read (via the AsyncFile) from the master (to retrieve data written to std{out,err} by the inferior process).  If the inferior process tests std{in,out,err} with isatty() it will be told that it is connected to a login terminal.\n\nThis plugin provides four primitives, as implied by the above, all of which apply to AsyncFiles:\n\n\tprimitivePtGrant\t\t\t\t- prepare the slave tty for use\n\tprimitivePtUnlock\t\t\t\t- allow connections (open) to the slave tty\n\tprimitivePtsNameLength\t\t\t- return the size of the slave tty's device name\n\tprimitivePtsName\t\t\t\t- read the slave tty's device name into a String\n\n(designed to be easily useable in conjunction with OSProcess) and one more (just for my convenience) which does all of the above steps atomically (and also promotes the inferior process to a process group leader, and installs a handler to finalise the inferior process on exit and close its parent's master tty -- without the need to use OSProcess at all):\n\n\tprimitiveForkAndExecWithPts\t\t- create an inferior process connected to a slave tty\n\nNote that `Unix98' does NOT imply that this will only work on Unix systems!!  Unix98 is the name of a *standard* (describing one possible implementation of pseudo ttys) which can be adopted by any OS, be it Unix or something entirely different.  (Unix98 ptys have been adopted by both BSD and Linux, which is why we consider it the most interesting standard to implement here.  However, be warned that if [for some bizarre, masochistic reason] you have disabled Unix98 pty support in your BSD or Linux kernel then this plugin will explode in your face.  [Although you should never get that far since the initial open of /dev/ptmx will fail.])\n\nFinally note that this plugin might (should) go away in the future if (when) OSProcess implements the required support for pseudo ttys and asynchronous i/o on their master devices.  Dave: are you reading this?!\n\n\n!PseudoTTYPlugin methodsFor: 'initialize-release' stamp: 'ikp 7/10/2002 22:41'!\ninitialiseModule\n\n\tself export: true.\n\t\"We have to load AsyncFile first, to get the sessionID.\"\n\tinterpreterProxy ioLoadFunction: 'initializeModule' From: 'AsynchFilePlugin'.\n\t^self cCode: 'ptyInit()' inSmalltalk: [true]! !\n\n!PseudoTTYPlugin methodsFor: 'initialize-release' stamp: 'ikp 7/7/2002 02:29'!\nshutdownModule\n\n\tself export: true.\n\t^self cCode: 'ptyShutdown()' inSmalltalk: [true]! !\n\n\n!PseudoTTYPlugin methodsFor: 'primitives' stamp: 'ikp 7/7/2002 05:44'!\nprimitivePtyClose: fHandle\n\n\t| f |\n\tself var: #f declareC: 'AsyncFile *f'.\n\tself primitive: 'primPtyClose' parameters: #(Oop).\n\tf _ self asyncFileValueOf: fHandle.\n\tinterpreterProxy failed ifFalse: [self cCode: 'ptyClose(f)'].! !\n\n!PseudoTTYPlugin methodsFor: 'primitives' stamp: 'ikp 7/10/2002 22:31'!\nprimitivePtyForkAndExec: cmd arguments: args semaIndex: semaIndex\n\n\t| f cmdLen cmdIdx argLen argIdx fOop |\n\tself var: #f declareC: 'AsyncFile *f'.\n\tself primitive: 'primPtyForkAndExec' parameters: #(Oop Oop SmallInteger).\n\tinterpreterProxy success: (interpreterProxy isBytes: cmd).\n\tinterpreterProxy success: (interpreterProxy isPointers: args).\n\tinterpreterProxy failed ifTrue: [^nil].\n\tcmdIdx _ self cCoerce: (interpreterProxy firstIndexableField: cmd) to: 'int'.\n\tcmdLen _ interpreterProxy slotSizeOf: cmd.\t\"in bytes\"\n\targIdx _ self cCoerce: (interpreterProxy firstIndexableField: args) to: 'int'.\n\targLen _ interpreterProxy slotSizeOf: args.\t\"in fields\"\n\tfOop _ interpreterProxy\n\t\tinstantiateClass: interpreterProxy classByteArray\n\t\tindexableSize: (self cCode: 'sizeof(AsyncFile)').\n\tf _ self asyncFileValueOf: fOop.\n\tinterpreterProxy failed\n\t\tifFalse: [self cCode: 'ptyForkAndExec(f, semaIndex, cmdIdx, cmdLen, argIdx, argLen)'].\n\t^fOop! !\n\n!PseudoTTYPlugin methodsFor: 'primitives' stamp: 'ikp 7/7/2002 06:38'!\nprimitivePtyWindowSize: fHandle cols: cols rows: rows\n\n\t| f |\n\tself var: #f declareC: 'AsyncFile *f'.\n\tself primitive: 'primPtyWindowSize' parameters: #(Oop SmallInteger SmallInteger).\n\tf _ self asyncFileValueOf: fHandle.\n\tinterpreterProxy failed ifFalse: [self cCode: 'ptyWindowSize(f, cols, rows)'].! !\n\n\n!PseudoTTYPlugin methodsFor: 'private' stamp: 'ikp 7/6/2002 19:08'!\nasyncFileValueOf: oop\n\t\"Return a pointer to the first byte of the async file record within the given Smalltalk bytes object, or nil if oop is not an async file record.\"\n\n\tself returnTypeC: 'AsyncFile *'.\n\tinterpreterProxy success:\n\t\t((interpreterProxy isIntegerObject: oop) not\n\t\t\tand: [(interpreterProxy isBytes: oop)\n\t\t\tand: [(interpreterProxy slotSizeOf: oop) = (self cCode: 'sizeof(AsyncFile)')]]).\n\tinterpreterProxy failed ifTrue: [^ nil].\n\t^ self cCode: '(AsyncFile *) (oop + 4)'\n! !\n\n\"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \"!\n\nPseudoTTYPlugin class\n\tinstanceVariableNames: ''!\n\n!PseudoTTYPlugin class methodsFor: 'translation' stamp: 'ikp 7/6/2002 21:18'!\nhasHeaderFile\n\n\t^true! !\n\n!PseudoTTYPlugin class methodsFor: 'translation' stamp: 'ikp 7/6/2002 21:12'!\nrequiresPlatformFiles\n\n\t^true! !\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/PseudoTTYPlugin/README",
    "content": "/* This directory contains the PseudoTTYPlugin, a means for Squeak to\n * fork an interactive program that believes itself to be running on a\n * login terminal when, in fact, Squeak is providing it with data for\n * its stdin and recovering the output it writes to its stdout/stderr.\n * \n * The Squeak plugin source code is in `PseudoTTYPlugin.st'.\n * The Squeak class needed to use the plugin is in `PseudoTTY.st'.\n *\n * The plugin has been built and tested on the following architecures:\n * \n *\tGNU/Linux (libc2.3)\n *\tNetBSD 1.5ZC\n *\tSolaris 2.8\n * \n * The remainder of this file is a C program designed to ease the\n * process of porting this plugin to unsupported architectures.\n * \n * ----------------------------------------------------------------\n * \n * This program forks a child process to run /bin/stty and then\n * collects and prints its output.  If the child is not connected to a\n * login terminal then stty will complain (printing something like\n * \"stdin: not a tty\") and you have a problem somewhere in \"opentty.h\"\n * which you must FIND AND FIX before the plugin will work.  OTOH, if\n * it prints a bunch (about ten lines) of tty mode information then\n * all is well and the plugin should work just fine.\n * \n * (Do I really need to mention that you have to rename this file to\n * \"pty.c\" or somesuch before trying to compile it? ;)\n */\n\n/* For the plugin the HAVE_* macros are set in config.h by acinclude.m4.\n * In this test file you need to set them manually for your architecture.\n * If you invent new HAVE_* macros then you'll need to modify acinclude.m4\n * and regenerate configure (run `make' in ../../config) before building\n * the VM.\n * \n * If it is available then we use openpty() in preference to Unix98 ptys:\n * \n *   HAVE_OPENPTY\t-- defined if you have openpty() and login_tty()\n *   HAVE_UTIL_H\t-- defined if you have /usr/include/util.h\n *   HAVE_PTY_H\t\t-- defined if you have /usr/include/pty.h\n * \n * If you don't have openpty() then we fake it from /dev/ptmx:\n * \n *   HAVE_UNIX98_PTY\t-- defined if you have /dev/ptmx and grantpt() et al.\n *   HAVE_STROPTS_H\t-- defined if you have /usr/include/stropts.h\n * \n * We assume you have /usr/include/utmp.h; if you don't then you need to\n * buy a real computer before trying to compile this plugin.\n * \n * Suggested compile command is shown with each architecture.\n * If you have to add new libraries then you'll need to modify acinclude.m4\n * and regenerate configure (run `make' in ../../config) before building the\n * VM.\n */\n#if defined(__NetBSD__)\t\t/* cc -o pty pty.c -lutil */\n# define HAVE_OPENPTY\n# define HAVE_UTIL_H\n#elif defined(__OpenBSD__)\t/* cc -o pty pty.c -lutil */\n# define HAVE_OPENPTY\n# define HAVE_UTIL_H\n#elif defined(__linux__)\t/* cc -o pty pty.c -lutil */\n# define HAVE_UNIX98_PTY\n# define HAVE_OPENPTY\n# define HAVE_PTY_H\n#elif defined(__sun__)\t\t/* cc -o pty pty.c */\n# define HAVE_UNIX98_PTY\n# define HAVE_STROPTS_H\n#else\n# error: defines for your architecture go here\n#endif\n\n/* Absolutely everybody has these. */\n\n#include <sys/types.h>\n#include <sys/wait.h>\n#include <unistd.h>\n#include <fcntl.h>\n#include <signal.h>\n#include <errno.h>\n#include <stdio.h>\n\n/* This gets the obscure (interesting ;) stuff. */\n\n#include \"openpty.h\"\n\n/* Here we go! ... */\n\nstatic char  *prog=\t\"/bin/stty\";\nstatic char  *argv[]=\t{ \"stty\", \"-a\", 0 };\nextern char **environ;\n\nstatic int ptm= -1, pts= -1;\n\n\nstatic void sigchld(int signum)\n{\n  close(pts);\t/* force i/o error or EOF on ptm */\n}\n\n\nint main()\n{\n  char  tty[32];\n  pid_t pid= 0;\n  if (openpty(&ptm, &pts, tty, 0, 0) == -1)\n    {\n      perror(\"openpty\");\n      exit(1);\n    }\n  printf(\"using %s (ptm %d pts %d)\\n\", tty, ptm, pts);\n  signal(SIGCHLD, sigchld);\n  pid= fork();\n  switch (pid)\n    {\n    case -1:\n      perror(\"fork\");\n      exit(1);\n      break;\n\n    case 0:\t/* child */\n      close(ptm);\n      if (login_tty(pts) == -1)\n\t{\n\t  perror(\"login_tty\");\n\t  exit(1);\n\t}\n      execve(prog, argv, environ);\n      perror(argv[0]);\n      exit(1);\n      break;\n\n    default:\t/* parent */\n      {\n\tchar buf[128];\n\tint  n, status;\n\tprintf(\"---------------- from child:\\n\");\n\twhile (((n= read(ptm, buf, sizeof(buf) - 1)) > 0)\n\t       || ((n == -1) && (errno == EINTR)))\n\t  if (n > 0)\n\t    {\n\t      buf[n]= '\\0';\n\t      printf(\"%s\", buf);\n\t    }\n\tprintf(\"----------------\\n\");\n\tif (n < 0)\n\t  perror(\"read\");\n\telse\n\t  printf(\"EOF\\n\");\n\tclose(ptm);\n\tpid= wait(&status);\n\tprintf(\"child exited with status %d\\n\", status);\n      }\n      break;\n    }\n  return 0;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/PseudoTTYPlugin/acinclude.m4",
    "content": "AC_HAVE_HEADERS(util.h libutil.h pty.h stropts.h)\n\nAC_SEARCH_LIBS(openpty, util,\n  AC_DEFINE(HAVE_OPENPTY, 1),[\n  if test -r /dev/ptmx; then\n    AC_CHECK_FUNC(grantpt, AC_DEFINE(HAVE_UNIX98_PTYS, 1))\n  fi])\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/PseudoTTYPlugin/build.cmake",
    "content": "EXPECT_UNDEFINED_SYMBOLS ()\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/PseudoTTYPlugin/config.cmake",
    "content": "PLUGIN_FIND_INCLUDE (UTIL util.h)\nPLUGIN_FIND_INCLUDE (LIBUTIL libutil.h)\nPLUGIN_FIND_LIBRARY (UTIL util)\nPLUGIN_FIND_INCLUDE (PTY pty.h)\nPLUGIN_FIND_INCLUDE (STROPTS stropts.h)\n\nCHECK_FUNCTION_EXISTS (openpty OPENPTY)\n\nIF (OPENPTY)\n  SET (HAVE_OPENPTY 1)\nENDIF ()\n\nIF (NOT HAVE_OPENPTY AND HAVE_LIBUTIL)\n  CHECK_LIBRARY_EXISTS (util openpty \"\" UTIL_OPENPTY)\n  IF (UTIL_OPENPTY)\n    PLUGIN_LINK_LIBRARIES (util)\n    SET (HAVE_OPENPTY 1)\n  ENDIF ()\nENDIF ()\n\nIF (NOT HAVE_OPENPTY AND EXISTS /dev/ptmx)\n  CHECK_FUNCTION_EXISTS (grantpt HAVE_UNIX98_PTYS)\n  IF (NOT HAVE_UNIX98_PTYS)\n    PLUGIN_DISABLE ()\n  ENDIF (NOT HAVE_UNIX98_PTYS)\nENDIF (NOT HAVE_OPENPTY AND EXISTS /dev/ptmx)\n\nPLUGIN_INCLUDE_DIRECTORIES (${unix}/plugins/AsynchFilePlugin)\n\nCONFIG_DEFINE (HAVE_UTIL_H)\nCONFIG_DEFINE (HAVE_LIBUTIL_H)\nCONFIG_DEFINE (HAVE_PTY_H)\nCONFIG_DEFINE (HAVE_STROPTS_H)\n\nCONFIG_DEFINE (HAVE_OPENPTY)\nCONFIG_DEFINE (HAVE_UNIX98_PTYS)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/PseudoTTYPlugin/openpty.h",
    "content": "/* openpty.h -- provides openpty() and login_tty()\n * \n *   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n * \n * Author: Ian.Piumarta@inria.fr\n */\n\n#if defined(HAVE_OPENPTY)\n\n# include <utmp.h>\t\t/* login_tty() */\n# if defined(HAVE_PTY_H)\n#   include <pty.h>\t\t/* openpty() */\n# elif defined(HAVE_UTIL_H)\n#   include <util.h>\t\t/* openpty() */\n# elif defined(HAVE_LIBUTIL_H)\n#   include <libutil.h>\t\t/* openpty() on FreeBSD */\n# else\n#   error: cannot find headers for openpty()\n# endif\n\n#else /* !HAVE_OPENPTY */\n\n# if defined(HAVE_UNIX98_PTYS)\n\n    /* we'll just roll our own, it ain't hard */\n\n#   include <stdlib.h>\t/* ptsname(), grantpt(), unlockpt() */\n#   include <unistd.h>\n#   include <string.h>\n#   include <fcntl.h>\n#   if defined(HAVE_STROPTS_H)\n#     include <stropts.h>\n#     include <sys/ioctl.h>\n#   endif\n\nstatic int openpty(int *ptmp, int *ptsp, char *ttyp, void *termiosp, void *winp)\n{\n  int   ptm= -1, pts= -1;\n  char *tty= 0;\n  if ((ptm= open(\"/dev/ptmx\", O_RDWR, 0)) == -1) return -1;\n  tty= ptsname(ptm);\n  if (grantpt(ptm)  == -1) return -1;\n  if (unlockpt(ptm) == -1) return -1;\n  if ((pts= open(tty, O_RDWR, 0)) == -1) return -1;\n  *ptmp= ptm;\n  *ptsp= pts;\n  strcpy(ttyp, tty);\n  return 0;\n}\n\nstatic int login_tty(int pts)\n{\n#if defined(HAVE_STROPTS_H)\n  /* push a terminal onto stream head */\n  if (ioctl(pts, I_PUSH, \"ptem\")   == -1) return -1;\n  if (ioctl(pts, I_PUSH, \"ldterm\") == -1) return -1;\n#endif\n  setsid();\n#if defined(TIOCSCTTY)\n  ioctl(pts, TIOCSCTTY, 0);\n#endif\n  dup2(pts, 0);\n  dup2(pts, 1);\n  dup2(pts, 2);\n  if (pts > 2) close(pts);\n  return 0;\n}\n\n# else /* !HAVE_UNIX98_PTYS */\n#   error: cannot open a pty -- this plugin will not work\n# endif\n#endif /* !HAVE_OPENPTY */\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/PseudoTTYPlugin/sqUnixPseudoTTYPlugin.c",
    "content": "/* PseudoTTYPlugin.c -- support for Unix98-style pseudo ttys\t\t-*- C -*-\n * \n * Author:\tIan Piumarta <ian.piumarta@inria.fr>\n * Version:\t1.1\n * Last edited:\t2003-09-03 18:06:13 by piumarta on emilia.inria.fr\n * \n * This plugin extends AsynchFilePlugin with support for Unix98-style\n * pseudo ttys.  See the PseudoTTY and PseudoTTYPlugin class comments\n * for details.\n * \n * Note that `Unix98' does NOT imply that this will only work on Unix\n * systems!  Unix98 is the name of a *standard* describing (amonst\n * many other things) one possible implementation of pseudo ttys that\n * could be adopted by any OS, be it Unix or something entirely\n * different.  (Unix98 ptys have been adopted by both BSD and Linux,\n * which is why we consider it the most interesting standard to\n * implement here.  However, be warned that if [for some bizarre,\n * masochistic reason] you have disabled Unix98 pty support in your\n * BSD or Linux kernel then this plugin will explode in your face.\n * [Although you should never get that far since the initial open of\n * /dev/ptmx will fail.])\n * \n * Finally note that this plugin might (should) go away in the future\n * if (when) OSProcess implements the required support for pseudo ttys\n * and asynchronous i/o on their master devices.  (Dave: are you\n * reading this?)\n * \n *   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n */\n\n#include \"sq.h\"\n#include \"PseudoTTYPlugin.h\"\n\n/* Ian says: never EVER #include things in the Unix Squeak sources\n   using relative paths.  Never.  Ever.  Period.  Write a Makefile.inc\n   with the right XCPPFLAGS instead.  Having said that... */\n\n#include \"../AsynchFilePlugin/sqUnixAsynchFile.h\"\n\n#include <sys/types.h>\n#include <sys/wait.h>\n#include <signal.h>\n#include <unistd.h>\n#include <termios.h>\n#include <sys/ioctl.h>\n\n#include \"openpty.h\"\t\t/* hide the gory details ;) */\n\n#if 0\n# define DPRINTF(ARGS) printf ARGS\n#else\n# define DPRINTF(ARGS)\n#endif\n\n\ntypedef struct Slave\n{\n  pid_t\t\t pid;\t\t/* process */\n  int\t\t status;\t/* exit status */\n  int\t\t pts;\t\t/* pts (child pty) */\n  FilePtr\t pty;\t\t/* ptm (parent pty) */\n  struct Slave\t*next;\t\t/* list */\n} SlaveRec, *SlavePtr;\n\nstatic SlavePtr slaves= 0;\n\ntypedef void (*sighandler_t)(int);\n\nstatic sighandler_t prevchld= 0;\nstatic int          reaping=  0;\n\n#define isValid(f)\t(f->sessionID == sqUnixAsyncFileSessionID)\n#define validate(f)\tif ((!isValid(f)) || (!(f->state))) return vm->primitiveFail()\n\n\n/*** initialise-release ***/\n\n\n#include \"sqVirtualMachine.h\"\n\nstatic struct VirtualMachine *vm= 0;\n\n\nstatic void sigchld(int signum)\n{\n  int\t   status= 0;\n  SlavePtr zombie= 0;\n  pid_t\t   pid=    wait(&status);\n\n  if (!slaves)\n    fprintf(stderr, \"unexpected SIGCHLD for pid %d\\n\", pid);\n  else\n    for (zombie= slaves;  zombie;  zombie= zombie->next)\n      if (zombie->pid == pid)\n\tbreak;\n  if (!zombie)\n    fprintf(stderr, \"failed to clean up for pid %d\\n\", pid);\n  else\n    {\n      /* force any image server loop to exit */\n      /* close(zombie->pty->fd); */\n      zombie->pty->rd.status= -2;\n      signalSemaphoreWithIndex(zombie->pty->sema);\n      DPRINTF((\"closed pty for pid %d\\n\", pid));\n    }\n}\n\n\nint ptyInit(void)\n{\n  DPRINTF((\"ptyInit: AsyncFileSession is %d\\n\", sqUnixAsyncFileSessionID));\n  vm= sqGetInterpreterProxy();\n  slaves= 0;\n  prevchld= signal(SIGCHLD, sigchld);\n  if ((prevchld != SIG_DFL) && (prevchld != SIG_IGN))\n    {\n      fprintf(stderr, \"declining responsibility for child processes!\\n\");\n      signal(SIGCHLD, prevchld);\n      reaping= 0;\n    }\n  else\n    reaping= 1;\n  return 1;\n}\n\n\nint ptyShutdown(void)\n{\n  if (reaping)\n    {\n      SlavePtr slave= 0;\n      for (slave= slaves;  slave;  slave= slave->next)\n\tkill(slave->pid, SIGTERM);\n      usleep(200*1000);\n      for (slave= slaves;  slave;  slave= slave->next)\n\tkill(slave->pid, SIGKILL);\n      usleep(200*1000);\n      signal(SIGCHLD, prevchld);\n      while (slaves)\n\t{\n\t  slave= slaves->next;\n\t  fprintf(stderr, \"child process %d refused to die\\n\", slaves->pid);\n\t  free(slaves);\n\t  slaves= slave;\n\t}\n    }\n  slaves= 0;\n  return 1;\n}\n\n\n/*** primitives ***/\n\n\n#include <fcntl.h>\n#include <time.h>\n\n\nint ptyForkAndExec(AsyncFile *f, int semaIndex,\n\t\t   int cmdIndex, int cmdLen, int argIndex, int argLen)\n{\n  int ptm= -1, pts= -1;\n  char tty[32];\n  FilePtr fp= 0;\n\n  DPRINTF((\"ptyForkAndExec\\n\"));\n\n  /* Module init must succeed in loading the AsyncFile plugin */\n  if (sqUnixAsyncFileSessionID == 0)\n    {\n      vm->primitiveFail();\n      return 0;\n    }\n\n  DPRINTF((\"AsyncFileSession is %d\\n\", sqUnixAsyncFileSessionID));\n\n  if (openpty(&ptm, &pts, tty, 0, 0) == -1)\n    {\n      perror(\"pty: openpty\");\n      goto failDetached;\n    }\n  DPRINTF((\"pty: using %s (ptm %d pts %d)\\n\", tty, ptm, pts));\n\n  if ((fp= asyncFileAttach(f, ptm, semaIndex)) == 0)\n    goto failDetached;\n\n  /* fork the child on the new pts (from now on we must detach on fail) */\n  {\n    extern char **environ;\n    char    *cmd= (char *)alloca(cmdLen + 1);\n    char   **argv= (char **)alloca(sizeof(char *) * (argLen + 2));\n    int      i= 0;\n    SlavePtr slave= 0;\n\n    memcpy((void *)cmd, (void *)cmdIndex, cmdLen);\n    cmd[cmdLen]= '\\0';\n    DPRINTF((\"pty: command: %s\\n\", cmd));\n    argv[0]= cmd;\n    for (i= 1;  i <= argLen;  ++i)\n      {\n\tint argOop= ((int *)argIndex)[i - 1];\n\tchar *arg= 0;\n\tint   len= 0;\n\tif (!vm->isBytes(argOop)) goto fail;\n\tlen= vm->stSizeOf(argOop);\n\tDPRINTF((\"pty: arg %d len %d\\n\", i, len));\n\targ= (char *)alloca(len + 1);\n\tmemcpy((void *)arg, (void *)vm->firstIndexableField(argOop), len);\n\targ[len]= '\\0';\n\targv[i]= arg;\n\tDPRINTF((\"pty: argv[%d]: %s\\n\", i, argv[i]));\n      }\n    argv[argLen+1]= 0;\t/* argv terminator */\n\n    /* put slave on list in case of immediate exit in child */\n    slave= (SlavePtr)malloc(sizeof(SlaveRec));\n    slave->next= slaves;\n    slaves= slave;\n    slave->pts= pts;\n    slave->pty= fp;\n    slave->pid= fork();\n\n    switch (slave->pid)\n      {\n      case -1:\t\t\t/* error */\n\tslaves= slaves->next;\n\tfree(slave);\n\tperror(\"pty: fork\");\n\tgoto fail;\n\tbreak;\n\n      case 0:\t\t\t/* child */\n\tclose(ptm);\n\tlogin_tty(pts);\n\texecve(cmd, argv, environ);\n\tfprintf(stderr, \"pty: \");\n\tperror(cmd);\n\texit(1);\n\tbreak;\n\n      default:\t\t\t/* parent */\n\tclose(pts);\n\tbreak;\n      }\n    return 0;\n  }\n\n fail:\n  asyncFileClose(f);\n  ptm= -1;\n\n failDetached:\n  if (ptm >= 0) close(ptm);\n  if (pts >= 0) close(pts);\n  vm->primitiveFail();\n  return 0;\n}\n\n\nint ptyClose(AsyncFile *f)\n{\n  SlavePtr slave= 0, prev= 0;\n  FilePtr  pty= (FilePtr)f->state;\n  validate(f);\n  DPRINTF((\"pty: close %d\\n\", pty->fd));\n  if (pty->fd >= 0)\n    {\n      for (prev= 0, slave= slaves;  slave;  prev= slave, slave= slave->next)\n\tif (slave->pty == pty)\n\t  {\n\t    int pid= slave->pid;\n\t    DPRINTF((\"killing pid %d connected to pts %d\\n\", pid, slave->pts));\n\t    /* terminate with increasing degrees of violence... */\n\t    kill(pid, SIGTERM);\n\t    usleep(200*1000);\n\t    kill(pid, SIGKILL);\n\t    /* delete from list */\n\t    if (prev)\n\t      prev->next= slave->next;\n\t    else\n\t      slaves= slave->next;\n\t    break;\n\t  }\n      if (slave)\n\tfree(slave);\n      else\n\tfprintf(stderr, \"pty %d not in active process list\\n\", pty->fd);\n    }\n  asyncFileClose(f);\n  return 0;\n}\n\n\nptyWindowSize(AsyncFile *f, int cols, int rows)\n{\n#if defined(TIOCSWINSZ)\n  struct winsize sz;\n  FilePtr pty= (FilePtr)f->state;\n  validate(f);\n  DPRINTF((\"pty %d size %d %d\\n\", pty->fd, cols, rows));\n  sz.ws_col= cols;\n  sz.ws_row= rows;\n  sz.ws_xpixel= sz.ws_ypixel= 0;\n  if (ioctl(pty->fd, TIOCSWINSZ, &sz) == -1)\n    perror(\"pty: TIOCSWINSZ\");\n#endif\n  return 0;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/RomePlugin/Makefile.inc",
    "content": "SURFACE_CFLAGS=-I$(topdir)/platforms/Cross/plugins/SurfacePlugin\nXCPPFLAGS= [FREETYPE_CFLAGS] [PANGOCAIRO_CFLAGS] $(SURFACE_CFLAGS)\nXLDFLAGS=  [FREETYPE_LIBS] [PANGOCAIRO_LIBS]\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/RomePlugin/acinclude.m4",
    "content": "SAVED_CFLAGS=\"$CFLAGS\"\nPKG_CHECK_MODULES(PANGOCAIRO,pangocairo,\n  PKG_CHECK_MODULES(FREETYPE,freetype2,\n    AC_MSG_CHECKING([for FreeType support in Cairo])\n    CFLAGS=\"$CFLAGS $FREETYPE_CFLAGS $PANGOCAIRO_CFLAGS\"\n    AC_TRY_COMPILE([\n      #include <cairo-ft.h>\n    ],[;],[\n      AC_MSG_RESULT(yes)\n      AC_PLUGIN_DEFINE_UNQUOTED(FREETYPE_CFLAGS,$FREETYPE_CFLAGS)\n      AC_PLUGIN_DEFINE_UNQUOTED(FREETYPE_LIBS,$FREETYPE_LIBS)\n      AC_PLUGIN_DEFINE_UNQUOTED(PANGOCAIRO_CFLAGS,$PANGOCAIRO_CFLAGS)\n      AC_PLUGIN_DEFINE_UNQUOTED(PANGOCAIRO_LIBS,$PANGOCAIRO_LIBS)\n    ],[\n      AC_MSG_RESULT(no)\n      AC_PLUGIN_DISABLE\n    ])\n  ,AC_PLUGIN_DISABLE)\n,AC_PLUGIN_DISABLE)\nCFLAGS=\"$SAVED_CFLAGS\"\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/RomePlugin/config.cmake",
    "content": "PLUGIN_REQUIRE_PACKAGE (PANGOCAIRO pangocairo)\nPLUGIN_REQUIRE_PACKAGE (FREETYPE freetype2)\nPLUGIN_REQUIRE_INCLUDE (CAIRO_FT cairo-ft.h)\nPLUGIN_INCLUDE_DIRECTORIES (${cross}/plugins/SurfacePlugin)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/SecurityPlugin/sqUnixSecurity.c",
    "content": "/* sqUnixSecurity.c -- directory operations for Unix\n * \n * Author: Bert Freudenberg (heavily based on Andreas Raab's sqWin32Security.c)\n * \n * Last edited: 2005-03-19 20:47:40 by piumarta on squeak.hpl.hp.com\n * \n * Note: According to Ian Piumarta, the Unix VM is inherently insecure since\n *       pluggable primitives can access all of libc! It would need \n *       some linker magic to hide these from dlsym(). \n * \n *       A workaround would be to disallow lookups via dlsym() when\n *       fileaccess is disallowed - internal plugins should still work ...\n */\n\n#include \"sq.h\"\n#include \"SecurityPlugin.h\"\n\n#include <sys/param.h>\n\nstatic char secureUserDirectory[MAXPATHLEN];     /* imagepath/secure/    */\nstatic char untrustedUserDirectory[MAXPATHLEN];  /* imagepath/untrusted/ */\nstatic int  untrustedUserDirectoryLen;\n\nstatic char* fromSqueak(char* string, int len)\n{\n  static char buf[MAXPATHLEN];\n  strncpy(buf, string, len);\n  buf[len]= '\\0';\n  return buf;\n}\n\n/* file security ***********************************************************/\n\n\nstatic sqInt allowFileAccess= 1;  /* full access to files */\n\n\nstatic int isAccessiblePathName(char *pathName)\n{\n   char realPathName[MAXPATHLEN];\n   int  realPathLen;\n                                                   \n   realpath(pathName, realPathName);\n   realPathLen= strlen(realPathName);\n\n   return (realPathLen >= untrustedUserDirectoryLen\n\t   && 0 == strncmp(realPathName, untrustedUserDirectory, untrustedUserDirectoryLen));\n}\n\n\nstatic int isAccessibleFileName(char *fileName)\n{\n  char pathName[MAXPATHLEN];\n  int pathLen= strrchr(fileName, '/') - fileName;\n\n  strncpy(pathName, fileName, pathLen);\n  pathName[pathLen]= '\\0';\n\n  return isAccessiblePathName(pathName);\n}\n\n\n/* directory access */\n\n\nsqInt ioCanCreatePathOfSize(char* pathString, sqInt pathStringLength)\n{\n  if (allowFileAccess) return 1;\n  return isAccessiblePathName(fromSqueak(pathString, pathStringLength));\n}\n\n\nsqInt ioCanListPathOfSize(char* pathString, sqInt pathStringLength)\n{\n  if (allowFileAccess) return 1;\n  return isAccessiblePathName(fromSqueak(pathString, pathStringLength));\n}\n\n\nsqInt ioCanDeletePathOfSize(char* pathString, sqInt pathStringLength)\n{\n  if (allowFileAccess) return 1;\n  return isAccessiblePathName(fromSqueak(pathString, pathStringLength));\n}\n\n\n/* file access */\n\n\nsqInt ioCanOpenFileOfSizeWritable(char* pathString, sqInt pathStringLength, sqInt writeFlag)\n{\n  if (allowFileAccess) return 1;\n  return isAccessibleFileName(fromSqueak(pathString, pathStringLength));\n}\n\n\nsqInt ioCanOpenAsyncFileOfSizeWritable(char* pathString, sqInt pathStringLength, sqInt writeFlag)\n{\n  return ioCanOpenFileOfSizeWritable(pathString, pathStringLength, writeFlag);\n}\n\n\nsqInt ioCanDeleteFileOfSize(char* pathString, sqInt pathStringLength)\n{\n  if (allowFileAccess) return 1;\n  return isAccessibleFileName(fromSqueak(pathString, pathStringLength));\n}\n\nsqInt ioCanRenameFileOfSize(char* pathString, sqInt pathStringLength)\n{\n  if (allowFileAccess) return 1;\n  return isAccessibleFileName(fromSqueak(pathString, pathStringLength));\n}\n\n\nsqInt ioCanGetFileTypeOfSize(char* pathString, sqInt pathStringLength)\n{\n  return 1; /* we don't have file types */\n}\n\n\nsqInt ioCanSetFileTypeOfSize(char* pathString, sqInt pathStringLength)\n{\n  return 1; /* we don't have file types */\n}\n\n\n/* disabling/querying */\n\n\nsqInt ioDisableFileAccess(void)\n{\n  allowFileAccess= 0;\n  return 1;\n}\n\n\nsqInt ioHasFileAccess(void)\n{\n  return allowFileAccess;\n}\n\n\n/* image security **********************************************************/\n\n\nstatic sqInt allowImageWrite= 1;  /* allow writing the image */\n\n\nsqInt ioCanRenameImage(void)\n{\n  return allowImageWrite; /* only when we're allowed to save the image */\n}\n\nsqInt ioCanWriteImage(void)\n{\n  return allowImageWrite;\n}\n\nsqInt ioDisableImageWrite(void)\n{\n  allowImageWrite= 0;\n  return 1;\n}\n\n\n/* socket security - for now it's all or nothing ***************************/\n\n\nstatic sqInt allowSocketAccess= 1; /* allow access to sockets */\n\n\nsqInt ioCanCreateSocketOfType(sqInt netType, sqInt socketType)\n{\n  return allowSocketAccess;\n}\n\n\nsqInt ioCanConnectToPort(sqInt netAddr, sqInt port)\n{\n  return allowSocketAccess;\n}\n\n\nsqInt ioCanListenOnPort(sqInt s, sqInt port)\n{\n  return allowSocketAccess;\n}\n\n\nsqInt ioDisableSocketAccess()\n{\n  allowSocketAccess= 0;\n  return 1;\n}\n\n\nsqInt ioHasSocketAccess()\n{\n  return allowSocketAccess;\n}\n\n\n/* SecurityPlugin primitive support ****************************************/\n\n\nchar *ioGetSecureUserDirectory(void)\n{\n  if (secureUserDirectory[0] == '\\0')\n    return (char *)success(false);\n  return secureUserDirectory;\n}\n\n\nchar *ioGetUntrustedUserDirectory(void)\n{\n  return untrustedUserDirectory;\n}\n\n\n/* note: following is called from VM directly, not from plugin */\nsqInt ioInitSecurity(void)\n{\n  int imagePathLen= strrchr(imageName, '/') - imageName;\n  char *squeakUserDirectory= 0;\n\n  /* establish the secure user directory */\n  strncpy(secureUserDirectory, imageName, imagePathLen);\n  strcpy(secureUserDirectory + imagePathLen, \"/secure\");\n\n  /* establish untrusted user directory */\n  squeakUserDirectory= getenv(\"SQUEAK_USERDIR\");\n  if (0 == squeakUserDirectory)\n    {\n      strncpy(untrustedUserDirectory, imageName, imagePathLen);\n      strcpy(untrustedUserDirectory + imagePathLen, \"/My Squeak\");\n    }\n  else\n    {\n      int lastChar= strlen(squeakUserDirectory);\n      /*  path is not allowed to end with \"/\" */\n      if ('/' == squeakUserDirectory[lastChar - 1])\n\tsqueakUserDirectory[lastChar - 1]= '\\0';\n      strcpy(untrustedUserDirectory, squeakUserDirectory);\n    }\n  untrustedUserDirectoryLen= strlen(untrustedUserDirectory);\n\n  return 1;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/SerialPlugin/sqUnixSerial.c",
    "content": "/* sqUnixSerial.c -- Unix serial support\n * \n * Author: Ned Konz, July 14, 2000\n * \n * Last edited: 2002-10-26 14:36:11 by piumarta on emilia.inria.fr\n *\n * Separated from MIDI, plus various portability problems fixed, by:\n *\tIan Piumarta <Ian.Piumarta@INRIA.Fr>\n */\n\n#include \"sq.h\"\n#include \"SerialPlugin.h\"\n\n#include <termios.h>\n#include <unistd.h>\n#include <sys/types.h>\n#include <sys/stat.h>\n#include <fcntl.h>\n#include <errno.h>\n\n/*** Module variables ***/\n\n/* portNum\t0=/dev/ttyS0, etc. */\n/* include 1 byte for NUL at end */\n#define PORT_NAME_SIZE 11\nstatic const char serialPortBaseName[] = \"/dev/ttyS0\";\n\n/* stopBits\t0=1.5, 1=1, 2=2 */\n/* I don't know how to get 1.5 stop bits. Oh well. So you get 2 instead */\n#define MAX_STOP_BITS 2\n/* c_cflag definitions */\nstatic const unsigned int stopBitsDecode[MAX_STOP_BITS+1] = { CSTOPB, 0, CSTOPB };\n\n/* dataBits\tnumber of bits per character (5..8) */\n/* note that since CS5 is 0, you will get 5 data bits if you ask for 0..4\n * as well */\n#define MAX_DATA_BITS 8\n/* c_cflag definitions */\nstatic const unsigned int dataBitsDecode[MAX_DATA_BITS+1] = {\n\t0, 0, 0, 0, 0, CS5, CS6, CS7, CS8\n};\n\n/* parityType\t0=no, 1=odd, 2=even  */\n#define MAX_PARITY_TYPE 2\n/* c_cflag definitions */\nstatic const unsigned int parityTypeDecode[MAX_PARITY_TYPE+1] = {\n\t0,\t\t\t\t/* none */\n\tPARENB|PARODD,\t/* odd */\n\tPARENB\t\t\t/* even */\n};\n\n/* inFlowCtrl\t0=none, 1=XOn/XOff, 2=hardware handshaking\n * outFlowCtrl\t0=none, 1=XOn/XOff, 2=hardware handshaking */\n#define MAX_FLOW_CTRL 2\n\n/* must be <= 10, because of 1-digit filename generation */\n#define MAX_SERIAL_PORTS 10\nstatic int serialFileDescriptors[MAX_SERIAL_PORTS];\t/* index=squeak port# */\nstatic struct termios savedSerialTermios[MAX_SERIAL_PORTS];\t/* index=squeak port# */\n\n/* dataRate\trate in bps */\ntypedef struct drDecode { int dataRate; speed_t code; } drDecode;\nstatic drDecode dataRateDecode[] = {\n\t{ 0, B0 },\t\t/* hang up */\n\t{ 50, B50 },\n\t{ 75, B75 },\n\t{ 110, B110 },\n\t{ 134, B134 },\n\t{ 150, B150 },\n\t{ 200, B200 },\n\t{ 300, B300 },\n\t{ 600, B600 },\n\t{ 1200, B1200 },\n\t{ 1800, B1800 },\n\t{ 2400, B2400 },\n\t{ 4800, B4800 },\n\t{ 9600, B9600 },\n\t{ 19200, B19200 },\n\t{ 38400, B38400 },\n#       if defined(B57600)\t/* missing on SunOS 4 */ \n\t{ 57600, B57600 },\n\t{ 115200, B115200 },\n#       endif\n#       if defined(B230400)\t/* missing on Digital Unix (ex DEC OSF/1) */\n\t{ 230400, B230400 },\n#       endif\n#       if defined(B460800)\t/* missing on FreeBSD */\n\t{ 460800, B460800 },\n#       endif\n#       if defined(B500000)\t/* missing on GNU/Linux prior to 2.2 */\n\t{ 500000, B500000 },\n\t{ 576000, B576000 },\n\t{ 921600, B921600 },\n\t{ 1000000, B1000000 },\n\t{ 1152000, B1152000 },\n\t{ 1500000, B1500000 },\n\t{ 2000000, B2000000 },\n\t{ 2500000, B2500000 },\n\t{ 3000000, B3000000 },\n\t{ 3500000, B3500000 },\n\t{ 4000000, B4000000 },\n#       endif\n\t{ -1, B0 }\t\t\t/* end marker */\n};\n\n/* This is the default setting for a termios structure on open */\nstatic struct termios defaultTermios;\n\n/*** Private Functions ***/\n\n/* return the speed_t corresponding to the given data rate in bps,\n * or B0 if not found */\nstatic speed_t serialDecodeSpeed(int speed)\n{\n\tdrDecode* p;\n\tfor( p = dataRateDecode; p->dataRate >= 0; p++)\n\t{\n\t\tif (p->dataRate == speed)\n\t\t\treturn p->code;\n\t}\n\treturn B0;\n}\n\n/*** Public Functions ***/\n\n/* return value ignored */\nint serialPortClose(int portNum)\n{\n\tint fd;\n\tif (portNum < 0 || portNum >= MAX_SERIAL_PORTS )\n\t{\n\t\tsuccess(false);\n\t\treturn 0;\n\t}\n\t/* Squeak wants to close already-closed ports... */\n\tif ((fd = serialFileDescriptors[ portNum ]) < 0)\n\t{\n\t\tsuccess(true);\n\t\treturn 0;\n\t}\n\tserialFileDescriptors[ portNum ] = -1;\n\tif (tcsetattr(fd, TCSAFLUSH, savedSerialTermios + portNum)\n\t\t|| close(fd))\n\t{\n\t\tsuccess(false);\n\t\treturn 0;\n\t}\n\tsuccess(true);\n\treturn 0;\n}\n\n/* Open the given serial port using the given settings. The data rate can be\n * any number that is in the table above; the driver is not as flexible\n * about the speed as the Mac driver, apparently. */\n/* return value ignored */\nint serialPortOpen(\n\t\tint portNum,\n\t\tint dataRate,\n\t\tint stopBitsType,\n\t\tint parityType,\n\t\tint dataBits,\n\t\tint inFlowCtrl,\n\t\tint outFlowCtrl,\n\t\tint xOnChar,\n\t\tint xOffChar)\n{\n\tint fd;\n\tchar serialPortName[ PORT_NAME_SIZE ];\n\tspeed_t speed = serialDecodeSpeed( dataRate );\n\tstruct termios flags;\n\n\t/* validate arguments */\n\tif (portNum < 0 || portNum >= MAX_SERIAL_PORTS\n\t\t|| speed == B0\n\t\t|| stopBitsType < 0 || stopBitsType > MAX_STOP_BITS\n\t\t|| parityType < 0 || parityType > MAX_PARITY_TYPE\n\t\t|| dataBits < 0 || dataBits > MAX_DATA_BITS\n\t\t|| inFlowCtrl < 0 || inFlowCtrl > MAX_FLOW_CTRL\n\t\t|| outFlowCtrl < 0 || outFlowCtrl > MAX_FLOW_CTRL\n\t\t|| (( inFlowCtrl == 1 || outFlowCtrl == 1 )\n\t\t\t\t&& ( xOnChar < 0 || xOnChar > 255\n\t\t\t\t\t|| xOffChar < 0 || xOffChar > 255 )))\n\t{\n\t\tsuccess(false);\n\t\treturn 0;\n\t}\n\n\t/* generate a filename (with last digit set to port number) */\n\tstrcpy(serialPortName, serialPortBaseName);\n\tserialPortName[ PORT_NAME_SIZE - 2 ] = portNum + '0';\n\n\t/* open the device */\n\tif ((fd = open(serialPortName, O_RDWR|O_NONBLOCK|O_NOCTTY)) < 0)\n\t{\n\t\tsuccess(false);\n\t\treturn 0;\n\t}\n\t/* save the file descriptor */\n\tserialFileDescriptors[ portNum ] = fd;\n\n\t/* save the old state */\n\tif (tcgetattr(fd, savedSerialTermios + portNum))\n\t{\n\t\tsuccess(false);\n\t\treturn 0;\n\t}\n\n\t/* set up the new modes */\n\tflags = defaultTermios;\n\n\t/* input & output data rate */\n\tcfsetispeed(&flags, speed);\n\tcfsetospeed(&flags, speed);\n\n\t/* stop bits */\n\tflags.c_cflag &= ~CSTOPB;\n\tflags.c_cflag |= stopBitsDecode[ stopBitsType ];\n\n\t/* parity */\n\tflags.c_cflag &= ~(PARENB|PARODD);\n\tflags.c_cflag |= parityTypeDecode[ parityType ];\n\n\t/* data bits */\n\tflags.c_cflag &= ~CSIZE;\n\tflags.c_cflag |= dataBitsDecode[ dataBits ];\n\n\t/* flow control characters */\n\tif (inFlowCtrl == 1 || outFlowCtrl == 1)\n\t{\n\t\tflags.c_cc[ VSTART ] = xOnChar;\n\t\tflags.c_cc[ VSTOP ] = xOffChar;\n\t}\n\n\tflags.c_iflag &= ~(IXON|IXOFF|IXANY);\n\n\tif (inFlowCtrl == 1) flags.c_iflag |= IXOFF;\n\tif (outFlowCtrl == 1) flags.c_iflag |= IXON;\n\n#\tif defined(CRTSCTS)\n\tflags.c_cflag &= ~CRTSCTS;\n \tif (inFlowCtrl == 2 || outFlowCtrl == 2) flags.c_cflag |= CRTSCTS;\n#\telse   /* not defined in IRIX!? */\n\tif (inFlowCtrl == 2 || outFlowCtrl == 2)\n\t{\n\t\tfprintf(stderr, \"CRTSCTS not supported.\\n\");\n\t\tsuccess(false);\n\t\treturn 0;\n\t}\n#\tendif\n\n\tif (tcsetattr(fd, TCSANOW, &flags))\t/* set it NOW */\n\t{\n\t\tsuccess(false);\n\t\treturn 0;\n\t}\n\n\tsuccess(true);\n\treturn 0;\n}\n\n/* Read up to count bytes from the given serial port into the given byte array.\n   Read only up to the number of bytes in the port's input buffer; if fewer bytes\n   than count have been received, do not wait for additional data to arrive.\n   Return zero if no data is available, else number of bytes read */\nint serialPortReadInto(int portNum, int count, int startPtr)\n{\n\tint fd;\n\tssize_t bytesRead;\n\tvoid* buffer = (void*)startPtr;\t\t/* ints as pointers?? */\n\n\tif (portNum < 0\n\t\t|| portNum >= MAX_SERIAL_PORTS\n\t\t|| (fd = serialFileDescriptors[ portNum ]) < 0)\n\t{\n\t\tsuccess(false);\n\t\treturn 0;\n\t}\n\n\tbytesRead = read(fd, buffer, (size_t)count);\n\tif (bytesRead == (ssize_t)-1)\n\t{\n\t\tif (errno == EAGAIN)\n\t\t\tbytesRead = 0;\n\t\telse\n\t\t{\n\t\t\tsuccess(false);\n\t\t\treturn 0;\n\t\t}\n\t}\n\n\tsuccess(true);\n\treturn (int)bytesRead;\n}\n\n/* Write count bytes from the given byte array to the given serial port's\n   output buffer. Return the number of bytes written. This implementation is\n   synchronous: it doesn't return until the data has been sent. However, other\n   implementations may return before transmission is complete. */\nint serialPortWriteFrom(int portNum, int count, int startPtr)\n{\n\tint fd;\n\tint bytesWritten;\n\tchar* buffer = (void*)startPtr;\n\n\tif (portNum < 0\n\t\t|| portNum >= MAX_SERIAL_PORTS\n\t\t|| (fd = serialFileDescriptors[ portNum ]) < 0)\n\t{\n\t\tsuccess(false);\n\t\treturn 0;\n\t}\n\n\tbytesWritten = write(fd, buffer, (size_t)count);\n\tif (bytesWritten == (ssize_t)-1)\n\t{\n\t\tsuccess(false);\n\t\treturn 0;\n\t}\n\n\tsuccess(true);\n\treturn bytesWritten;\n}\n\n/* return true on success */\nint serialPortInit(void)\n{\n\tint i;\n\n\t/* initialize the file descriptors to invalid */\n\tfor (i = 0; i < MAX_SERIAL_PORTS; i++)\n\t\tserialFileDescriptors[ i ] = -1;\n\n\t/* initialize our default termios structure (already 0'd) */\n\tdefaultTermios.c_iflag = IGNBRK | IGNPAR;\t/* ignore break, parity/framing errs */\n\t/* tcflag_t c_oflag output modes */\n\t/* defaultTermios.c_oflag = 0; */\n\t/* tcflag_t c_cflag control modes */\n\tdefaultTermios.c_cflag = CREAD;\n\t/* tcflag_t c_lflag local modes */\n\t/* defaultTermios.c_lflag = 0; */\n\t/* cc_t c_cc[NCCS] control chars */\n\tdefaultTermios.c_cc[VTIME] = 0;\n\tdefaultTermios.c_cc[VMIN] = 0;\n\n\tsuccess(true);\n\treturn 1;\n}\n\n/* return true on success */\nint serialPortShutdown(void)\n{\n\tsuccess(true);\n\treturn 1;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/SocketPlugin/config.cmake",
    "content": "PLUGIN_FIND_LIBRARY(SOCKET socket)\nPLUGIN_FIND_LIBRARY(NSL nsl)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/SocketPlugin/sqUnixSocket.c",
    "content": "/* sqUnixSocket.c -- Unix socket support\n * \n *   Copyright (C) 1996-2006 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n */\n\n/* Author: Ian.Piumarta@inria.fr\n * \n * Support for BSD-style \"accept\" primitives contributed by:\n *\tLex Spoon <lex@cc.gatech.edu>\n * \n * Notes:\n * \tSockets are completely asynchronous, but the resolver is still\n *\tsynchronous.\n * \n * BUGS:\n *\tNow that the image has real UDP primitives, the TCP/UDP duality in\n *\tmany of the connection-oriented functions should be removed and\n * \tcremated.\n */\n\n#include \"sq.h\"\n#include \"SocketPlugin.h\"\n#include \"sqaio.h\"\n\n#undef\tAIO_DEBUG\n#undef\tDEBUG\n\n#ifdef ACORN\n# include <time.h>\n# define __time_t\n# include <signal.h>\n# include \"inetlib.h\"\n# include \"socklib.h\"\n# include \"netdb.h\"\n# include \"unixlib.h\"\n# include \"sys/ioctl.h\"\n# include \"sys/errno.h\"\n# define h_errno errno\n# define MAXHOSTNAMELEN 256\n# define socklen_t int\n# define strncpy(dst, src, len) copyNCharsFromTo(len, src, dst)\n\n#else /* !ACORN */\n\n# ifdef NEED_GETHOSTNAME_P\n    extern int gethostname();\n# endif\n# ifdef HAVE_SYS_TIME_H\n#   include <sys/time.h>\n# else\n#   include <time.h>\n# endif\n# include <sys/param.h>\n# include <sys/socket.h>\n# include <netinet/in.h>\n# include <netinet/udp.h>\n# include <netinet/tcp.h>\n# include <arpa/inet.h>\n# include <netdb.h>\n# include <errno.h>\n# include <unistd.h>\n  \n#endif /* !ACORN */\n\n/* Solaris sometimes fails to define this in netdb.h */\n#ifndef  MAXHOSTNAMELEN\n# define MAXHOSTNAMELEN\t256\n#endif\n\n\n/* debugging stuff. can probably be deleted */\n\n#ifdef DEBUG\n# ifdef ACORN\n#   define FPRINTF(s) \\\n    { \\\n      extern os_error privateErr; \\\n      extern void platReportError(os_error *e); \\\n      privateErr.errnum = (bits)0; \\\n      sprintf s; \\\n      platReportError((os_error *)&privateErr); \\\n    };\n# else /* !ACORN */\n    extern int aioLastTick, aioThisTick;\n#   define FPRINTF(X) { aioThisTick= ioMSecs();  fprintf(stderr, \"%8d %8d \", aioThisTick, aioThisTick - aioLastTick);  aioLastTick= aioThisTick;  fprintf X; }\n# endif\n#else /* !DEBUG */\n# define FPRINTF(X)\n#endif\n\n\n/*** Socket types ***/\n\n#define TCPSocketType\t \t0\n#define UDPSocketType\t \t1\n#define RAWSocketType\t\t2\n\n/*** Resolver states ***/\n\n#define ResolverUninitialised\t0\n#define ResolverSuccess\t\t1\n#define ResolverBusy\t\t2\n#define ResolverError\t\t3\n\n\n/*** TCP Socket states ***/\n\n#define Invalid\t\t\t-1\n#define Unconnected\t\t 0\n#define WaitingForConnection\t 1\n#define Connected\t\t 2\n#define OtherEndClosed\t\t 3\n#define ThisEndClosed\t\t 4\n\n#define LINGER_SECS\t\t 1\n\nstatic int thisNetSession= 0;\nstatic int one= 1;\n\nstatic char   localHostName[MAXHOSTNAMELEN];\nstatic u_long localHostAddress;\t/* GROSS IPv4 ASSUMPTION! */\n\ntypedef struct privateSocketStruct\n{\n  int s;\t\t\t/* Unix socket */\n  int connSema;\t\t\t/* connection io notification semaphore */\n  int readSema;\t\t\t/* read io notification semaphore */\n  int writeSema;\t\t/* write io notification semaphore */\n  int sockState;\t\t/* connection + data state */\n  int sockError;\t\t/* errno after socket error */\n  struct sockaddr_in peer;\t/* default send/recv address for UDP */\n  int multiListen;\t\t/* whether to listen for multiple connections */\n  int acceptedSock;\t\t/* a connection that has been accepted */\n} privateSocketStruct;\n\n#define CONN_NOTIFY\t(1<<0)\n#define READ_NOTIFY\t(1<<1)\n#define WRITE_NOTIFY\t(1<<2)\n\n#define PING(S,EVT)\t\t\t\t\t\t\\\n{\t\t\t\t\t\t\t\t\\\n  interpreterProxy->signalSemaphoreWithIndex((S)->EVT##Sema);\t\\\n  FPRINTF((stderr, \"notify %d %s\\n\", (S)->s, #EVT));\t\t\\\n}\n\n#define notify(SOCK,MASK)\t\t\t\t\t\t\\\n{\t\t\t\t\t\t\t\t\t\\\n  if ((MASK) & CONN_NOTIFY)  PING(SOCK,conn);\t\t\t\t\\\n  if ((MASK) & READ_NOTIFY)  PING(SOCK,read);\t\t\t\t\\\n  if ((MASK) & WRITE_NOTIFY) PING(SOCK,write);\t\t\t\t\\\n}\n\n\n/*** Accessors for private socket members from a Squeak socket pointer ***/\n\n#define _PSP(S)\t\t(((S)->privateSocketPtr))\n#define PSP(S)\t\t((privateSocketStruct *)((S)->privateSocketPtr))\n\n#define SOCKET(S)\t\t(PSP(S)->s)\n#define SOCKETSTATE(S)\t\t(PSP(S)->sockState)\n#define SOCKETERROR(S)\t\t(PSP(S)->sockError)\n#define SOCKETPEER(S)\t\t(PSP(S)->peer)\n\n\n/*** Resolver state ***/\n\nstatic char lastName[MAXHOSTNAMELEN+1];\nstatic int  lastAddr= 0;\nstatic int  lastError= 0;\nstatic int  resolverSema= 0;\n\n/*** Variables ***/\n\nextern struct VirtualMachine *interpreterProxy;\nint setHookFn;\n\n\nstatic void acceptHandler(int, void *, int);\nstatic void connectHandler(int, void *, int);\nstatic void dataHandler(int, void *, int);\nstatic void closeHandler(int, void *, int);\n\n\n\n/* this MUST be turned on if DEBUG is turned on in aio.c  */\n\n#ifdef AIO_DEBUG\nchar *socketHandlerName(aioHandler h)\n{\n  if (h == acceptHandler)     return \"acceptHandler\";\n  if (h == connectHandler)    return \"connectHandler\";\n  if (h == dataHandler)       return \"dataHandler\";\n  if (h == closeHandler)      return \"closeHandler\";\n  return \"***unknownHandler***\";\n}\n#endif\n\n\n/*** module initialisation/shutdown ***/\n\n\nsqInt socketInit(void)\n{\n  return 1;\n}\n\nsqInt socketShutdown(void)\n{\n  /* shutdown the network */\n  sqNetworkShutdown();\n  return 1;\n}\n\n\n/***      miscellaneous sundries           ***/\n\n/* set linger on a connected stream */\n\nstatic void setLinger(int fd, int flag)\n{\n  struct linger linger= { flag, flag * LINGER_SECS };\n  setsockopt(fd, SOL_SOCKET, SO_LINGER, (char *)&linger, sizeof(linger));\n}\n\n/* answer the hostname for the given IP address */\n\nstatic const char *addrToName(int netAddress)\n{\n  u_long nAddr;\n  struct hostent *he;\n\n  lastError= 0;\t\t\t/* for the resolver */\n  nAddr= htonl(netAddress);\n  if ((he= gethostbyaddr((char *)&nAddr, sizeof(nAddr), AF_INET)))\n    return he->h_name;\n  lastError= h_errno;\t\t/* ditto */\n  return \"\";\n}\n\n/* answer the IP address for the given hostname */\n\nstatic int nameToAddr(char *hostName)\n{\n  struct hostent *he;\n\n  lastError= 0;\t\t\t/* ditto */\n  if ((he= gethostbyname(hostName)))\n    return ntohl(*(long *)(he->h_addr_list[0]));\n  lastError= h_errno;\t\t/* and one more ditto */\n  return 0;\n}\n\n/* answer whether the given socket is valid in this net session */\n\nstatic int socketValid(SocketPtr s)\n{\n  if (s && s->privateSocketPtr && thisNetSession && (s->sessionID == thisNetSession))\n    return true;\n  interpreterProxy->success(false);\n  return false;\n}\n\n/* answer 1 if the given socket is readable,\n          0 if read would block, or\n         -1 if the socket is no longer connected */\n\nstatic int socketReadable(int s)\n{\n  char buf[1];\n  int n= recv(s, (void *)buf, 1, MSG_PEEK);\n  if (n > 0) return 1;\n  if ((n < 0) && (errno == EWOULDBLOCK)) return 0;\n  return -1;\t/* EOF */\n}\n\n\n/* answer whether the socket can be written without blocking */\n\nstatic int socketWritable(int s)\n{\n  struct timeval tv= { 0, 0 };\n  fd_set fds;\n  \n  FD_ZERO(&fds);\n  FD_SET(s, &fds);\n  return select(s+1, 0, &fds, 0, &tv) > 0;\n}\n\n/* answer the error condition on the given socket */\n\nstatic int socketError(int s)\n{\n  int error= 0;\n  socklen_t errsz= sizeof(error);\n  /* Solaris helpfuly returns -1 if there is an error on the socket, so\n     we can't check the success of the getsockopt call itself.  Ho hum. */\n  getsockopt(s, SOL_SOCKET, SO_ERROR, (void *)&error, &errsz);\n  return error;\n}\n\n\n/***     asynchronous io handlers       ***/\n\n\n/* accept() can now be performed for the socket: call accept(),\n   and replace the server socket with the new client socket\n   leaving the client socket unhandled\n*/\nstatic void acceptHandler(int fd, void *data, int flags)\n{\n  privateSocketStruct *pss= (privateSocketStruct *)data;\n  FPRINTF((stderr, \"acceptHandler(%d, %p ,%d)\\n\", fd, data, flags));\n  if (flags & AIO_X) /* -- exception */\n    {\n      /* error during listen() */\n      aioDisable(fd);\n      pss->sockError= socketError(fd);\n      pss->sockState= Invalid;\n      pss->s= -1;\n      close(fd);\n      fprintf(stderr, \"acceptHandler: aborting server %d pss=%p\\n\", fd, pss);\n    }\n  else /* (flags & AIO_R) -- accept() is ready */\n    {\n      int newSock= accept(fd, 0, 0);\n      if (newSock < 0)\n\t{\n\t  if (errno == ECONNABORTED)\n\t    {\n\t      /* let's just pretend this never happened */\n\t      aioHandle(fd, acceptHandler, AIO_RX);\n\t      return;\n\t    }\n\t  /* something really went wrong */\n\t  pss->sockError= errno;\n\t  pss->sockState= Invalid;\n\t  perror(\"acceptHandler\");\n\t  aioDisable(fd);\n\t  close(fd);\n\t  fprintf(stderr, \"acceptHandler: aborting server %d pss=%p\\n\", fd, pss);\n\t}\n      else /* newSock >= 0 -- connection accepted */\n\t{\n\t  pss->sockState= Connected;\n\t  setLinger(newSock, 1);\n\t  if (pss->multiListen)\n\t    {\n\t      pss->acceptedSock= newSock;\n\t    }\n\t  else /* traditional listen -- replace server with client in-place */\n\t    {\n\t      aioDisable(fd);\n\t      close(fd);\n\t      pss->s= newSock;\n\t      aioEnable(newSock, pss, 0);\n\t    }\n\t}\n    }\n  notify(pss, CONN_NOTIFY);\n}\n\n\n/* connect() has completed: check errors, leaving the socket unhandled */\n\nstatic void connectHandler(int fd, void *data, int flags)\n{\n  privateSocketStruct *pss= (privateSocketStruct *)data;\n  FPRINTF((stderr, \"connectHandler(%d, %p, %d)\\n\", fd, data, flags));\n  if (flags & AIO_X) /* -- exception */\n    {\n      /* error during asynchronous connect() */\n      aioDisable(fd);\n      pss->sockError= socketError(fd);\n      pss->sockState= Unconnected;\n      perror(\"connectHandler\");\n    }\n  else /* (flags & AIO_W) -- connect completed */\n    {\n      /* connect() has completed */\n      int error= socketError(fd);\n      if (error)\n\t{\n\t  FPRINTF((stderr, \"connectHandler: error %d (%s)\\n\", error, strerror(error)));\n\t  pss->sockError= error;\n\t  pss->sockState= Unconnected;\n\t}\n      else\n\t{\n\t  pss->sockState= Connected;\n\t  setLinger(pss->s, 1);\n\t}\n    }\n  notify(pss, CONN_NOTIFY);\n}\n\n\n/* read or write data transfer is now possible for the socket. */\n\nstatic void dataHandler(int fd, void *data, int flags)\n{\n  privateSocketStruct *pss= (privateSocketStruct *)data;\n  FPRINTF((stderr, \"dataHandler(%d=%d, %p, %d)\\n\", fd, pss->s, data, flags));\n\n  if (pss == NULL)\n    {\n      fprintf(stderr, \"dataHandler: pss is NULL fd=%d data=%p flags=0x%x\\n\", fd, data, flags);\n      return;\n    }\n\n  if (flags & AIO_R)\n    {\n      int n= socketReadable(fd);\n      if (n == 0)\n\t{\n\t  fprintf(stderr, \"dataHandler: selected socket fd=%d flags=0x%x would block (why?)\\n\", fd, flags);\n\t}\n      if (n != 1)\n\t{\n\t  pss->sockError= socketError(fd);\n\t  pss->sockState= OtherEndClosed;\n\t}\n    }\n  if (flags & AIO_X)\n    {\n      /* assume out-of-band data has arrived */\n      /* NOTE: Squeak's socket interface is currently incapable of reading\n       *       OOB data.  We have no choice but to discard it.  Ho hum. */\n      char buf[1];\n      int n= recv(fd, (void *)buf, 1, MSG_OOB);\n      if (n == 1) fprintf(stderr, \"socket: received OOB data: %02x\\n\", buf[0]);\n    }\n  if (flags & AIO_R) notify(pss, READ_NOTIFY);\n  if (flags & AIO_W) notify(pss, WRITE_NOTIFY);\n}\n\n\n/* a non-blocking close() has completed -- finish tidying up */\n\nstatic void closeHandler(int fd, void *data, int flags)\n{\n  privateSocketStruct *pss= (privateSocketStruct *)data;\n  aioDisable(fd);\n  FPRINTF((stderr, \"closeHandler(%d, %p, %d)\\n\", fd, data, flags));\n  pss->sockState= Unconnected;\n  pss->s= -1;\n  notify(pss, CONN_NOTIFY);\n}\n\n\n/***     Squeak network functions        ***/\n\n\n/* start a new network session */\n\nsqInt sqNetworkInit(sqInt resolverSemaIndex)\n{\n  if (0 != thisNetSession)\n    return 0;  /* already initialised */\n  gethostname(localHostName, MAXHOSTNAMELEN);\n  localHostAddress= nameToAddr(localHostName);\n  thisNetSession= clock() + time(0);\n  if (0 == thisNetSession)\n    thisNetSession= 1;  /* 0 => uninitialised */\n  resolverSema= resolverSemaIndex;\n  return 0;\n}\n\n\n/* terminate the current network session (invalidates all open sockets) */\n\nvoid sqNetworkShutdown(void)\n{\n  thisNetSession= 0;\n  resolverSema= 0;\n  aioFini();\n}\n\n\n\n/***  Squeak Generic Socket Functions   ***/\n\n\n/* create a new socket */\n\nvoid sqSocketCreateNetTypeSocketTypeRecvBytesSendBytesSemaID(SocketPtr s, sqInt netType, sqInt socketType, sqInt recvBufSize, sqInt sendBufSize, sqInt semaIndex)\n{\n  sqSocketCreateNetTypeSocketTypeRecvBytesSendBytesSemaIDReadSemaIDWriteSemaID(s, netType, socketType,recvBufSize, sendBufSize, semaIndex, semaIndex, semaIndex);\n}\n\nvoid sqSocketCreateNetTypeSocketTypeRecvBytesSendBytesSemaIDReadSemaIDWriteSemaID(SocketPtr s, sqInt netType, sqInt socketType, sqInt recvBufSize, sqInt sendBufSize, sqInt semaIndex, sqInt readSemaIndex, sqInt writeSemaIndex)\n{\n  int newSocket= -1;\n  privateSocketStruct *pss;\n\n  s->sessionID= 0;\n  if (TCPSocketType == socketType)\n    {\n      /* --- TCP --- */\n      newSocket= socket(AF_INET, SOCK_STREAM, 0);\n    }\n  else if (UDPSocketType == socketType)\n    {\n      /* --- UDP --- */\n      newSocket= socket(AF_INET, SOCK_DGRAM, 0);\n    }\n  if (-1 == newSocket)\n    {\n      /* socket() failed, or incorrect socketType */\n      interpreterProxy->success(false);\n      return;\n    }\n  setsockopt(newSocket, SOL_SOCKET, SO_REUSEADDR, (char *)&one, sizeof(one));\n  /* private socket structure */\n  pss= (privateSocketStruct *)calloc(1, sizeof(privateSocketStruct));\n  if (pss == NULL)\n    {\n      fprintf(stderr, \"acceptFrom: out of memory\\n\");\n      interpreterProxy->success(false);\n      return;\n    }\n  pss->s= newSocket;\n  pss->connSema= semaIndex;\n  pss->readSema= readSemaIndex;\n  pss->writeSema= writeSemaIndex;\n\n  /* UDP sockets are born \"connected\" */\n  if (UDPSocketType == socketType)\n    {\n      pss->sockState= Connected;\n      aioEnable(pss->s, pss, 0);\n    }\n  else\n    {\n      pss->sockState= Unconnected;\n    }\n  pss->sockError= 0;\n  /* initial UDP peer := wildcard */\n  memset(&pss->peer, 0, sizeof(pss->peer));\n  pss->peer.sin_family= AF_INET;\n  pss->peer.sin_port= 0;\n  pss->peer.sin_addr.s_addr= INADDR_ANY;\n  /* Squeak socket */\n  s->sessionID= thisNetSession;\n  s->socketType= socketType;\n  s->privateSocketPtr= pss;\n  FPRINTF((stderr, \"create(%d) -> %lx\\n\", SOCKET(s), (unsigned long)PSP(s)));\n  /* Note: socket is in BLOCKING mode until aioEnable is called for it! */\n}\n\nvoid sqSocketCreateRawProtoTypeRecvBytesSendBytesSemaIDReadSemaIDWriteSemaID(SocketPtr s, sqInt netType, sqInt protocol, sqInt recvBufSize, sqInt sendBufSize, sqInt semaIndex, sqInt readSemaIndex, sqInt writeSemaIndex)\n{\n  int newSocket= -1;\n  privateSocketStruct *pss;\n\n  s->sessionID= 0;\n  switch(protocol) {\n\tcase 1: newSocket = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP); break;\n  }\n  if (-1 == newSocket)\n    {\n      /* socket() failed, or incorrect protocol type */\n      fprintf(stderr, \"primSocketCreateRAW: socket() failed; protocol = %d, errno = %d\\n\", protocol, errno);\n      interpreterProxy->success(false);\n      return;\n    }\n\n  /* private socket structure */\n  pss= (privateSocketStruct *)calloc(1, sizeof(privateSocketStruct));\n  if (pss == NULL)\n    {\n      fprintf(stderr, \"acceptFrom: out of memory\\n\");\n      interpreterProxy->success(false);\n      return;\n    }\n  pss->s= newSocket;\n  pss->connSema= semaIndex;\n  pss->readSema= readSemaIndex;\n  pss->writeSema= writeSemaIndex;\n\n  /* RAW sockets are born \"connected\" */\n  pss->sockState= Connected;\n  aioEnable(pss->s, pss, 0);\n  pss->sockError= 0;\n  /* initial UDP peer := wildcard */\n  memset(&pss->peer, 0, sizeof(pss->peer));\n  pss->peer.sin_family= AF_INET;\n  pss->peer.sin_port= 0;\n  pss->peer.sin_addr.s_addr= INADDR_ANY;\n  /* Squeak socket */\n  s->sessionID= thisNetSession;\n  s->socketType= RAWSocketType;\n  s->privateSocketPtr= pss;\n  FPRINTF((stderr, \"create(%d) -> %lx\\n\", SOCKET(s), (unsigned long)PSP(s)));\n  /* Note: socket is in BLOCKING mode until aioEnable is called for it! */\n}\n\n\n/* return the state of a socket */\n\nsqInt sqSocketConnectionStatus(SocketPtr s)\n{\n  if (!socketValid(s))\n    return Invalid;\n  /* we now know that the net session is valid, so if state is Invalid... */\n  if (SOCKETSTATE(s) == Invalid)\t/* see acceptHandler() */\n    {\n      fprintf(stderr, \"socketStatus: freeing invalidated pss=%p\\n\", PSP(s));\n      /*free(PSP(s));*/\t/* this almost never happens -- safer not to free()?? */\n      _PSP(s)= 0;\n      interpreterProxy->success(false);\n      return Invalid;\n    }\n#if 0\n  /* check for connection closed by peer */\n  if (SOCKETSTATE(s) == Connected)\n    {\n      int fd= SOCKET(s);\n      int n=  socketReadable(fd);\n      if (n < 0)\n\t{\n\t  FPRINTF((stderr, \"socketStatus(%d): detected other end closed\\n\", fd));\n\t  SOCKETSTATE(s)= OtherEndClosed;\n\t}\n    }\n#endif\n  FPRINTF((stderr, \"socketStatus(%d) -> %d\\n\", SOCKET(s), SOCKETSTATE(s)));\n  return SOCKETSTATE(s);\n}\n\n\n\n/* TCP => start listening for incoming connections.\n * UDP => associate the local port number with the socket.\n */\nvoid sqSocketListenOnPort(SocketPtr s, sqInt port)\n{\n  sqSocketListenOnPortBacklogSize(s, port, 1);\n}\n\nvoid sqSocketListenOnPortBacklogSizeInterface(SocketPtr s, sqInt port, sqInt backlogSize, sqInt addr)\n{\n  struct sockaddr_in saddr;\n\n  if (!socketValid(s))\n    return;\n\n  /* only TCP sockets have a backlog */\n  if ((backlogSize > 1) && (s->socketType != TCPSocketType))\n    {\n      interpreterProxy->success(false);\n      return;\n    }\n\n  PSP(s)->multiListen= (backlogSize > 1);\n  FPRINTF((stderr, \"listenOnPortBacklogSize(%d, %d)\\n\", SOCKET(s), backlogSize));\n  memset(&saddr, 0, sizeof(saddr));\n  saddr.sin_family= AF_INET;\n  saddr.sin_port= htons((short)port);\n  saddr.sin_addr.s_addr= htonl(addr);\n  bind(SOCKET(s), (struct sockaddr*) &saddr, sizeof(saddr));\n  if (TCPSocketType == s->socketType)\n    {\n      /* --- TCP --- */\n      listen(SOCKET(s), backlogSize);\n      SOCKETSTATE(s)= WaitingForConnection;\n      aioEnable(SOCKET(s), PSP(s), 0);\n      aioHandle(SOCKET(s), acceptHandler, AIO_RX); /* R => accept() */\n    }\n  else\n    {\n      /* --- UDP/RAW --- */\n    }\n}\n\nvoid sqSocketListenOnPortBacklogSize(SocketPtr s, sqInt port, sqInt backlogSize)\n{\n  sqSocketListenOnPortBacklogSizeInterface(s, port, backlogSize, INADDR_ANY);\n}\n\n/* TCP => open a connection.\n * UDP => set remote address.\n */\nvoid sqSocketConnectToPort(SocketPtr s, sqInt addr, sqInt port)\n{\n  struct sockaddr_in saddr;\n\n  if (!socketValid(s))\n    return;\n  FPRINTF((stderr, \"connectTo(%d)\\n\", SOCKET(s)));\n  memset(&saddr, 0, sizeof(saddr));\n  saddr.sin_family= AF_INET;\n  saddr.sin_port= htons((short)port);\n  saddr.sin_addr.s_addr= htonl(addr);\n  if (TCPSocketType != s->socketType)\n    {\n      /* --- UDP/RAW --- */\n      if (SOCKET(s) >= 0)\n\t{\n\t  memcpy((void *)&SOCKETPEER(s), (void *)&saddr, sizeof(SOCKETPEER(s)));\n\t  SOCKETSTATE(s)= Connected;\n\t}\n    }\n  else\n    {\n      /* --- TCP --- */\n      int result;\n      aioEnable(SOCKET(s), PSP(s), 0);\n      result= connect(SOCKET(s), (struct sockaddr *)&saddr, sizeof(saddr));\n      FPRINTF((stderr, \"connect() => %d\\n\", result));\n      if (result == 0)\n\t{\n\t  /* connection completed synchronously */\n\t  SOCKETSTATE(s)= Connected;\n\t  notify(PSP(s), CONN_NOTIFY);\n\t  setLinger(SOCKET(s), 1);\n\t}\n      else\n\t{\n\t  if (errno == EINPROGRESS || errno == EWOULDBLOCK)\n\t    {\n\t      /* asynchronous connection in progress */\n\t      SOCKETSTATE(s)= WaitingForConnection;\n\t      aioHandle(SOCKET(s), connectHandler, AIO_WX);  /* W => connect() */\n\t    }\n\t  else\n\t    {\n\t      /* connection error */\n\t      perror(\"sqConnectToPort\");\n\t      SOCKETSTATE(s)= Unconnected;\n\t      SOCKETERROR(s)= errno;\n\t      notify(PSP(s), CONN_NOTIFY);\n\t    }\n\t}\n    }\n}\n\n\nvoid sqSocketAcceptFromRecvBytesSendBytesSemaID(SocketPtr s, SocketPtr serverSocket, sqInt recvBufSize, sqInt sendBufSize, sqInt semaIndex)\n{\n  sqSocketAcceptFromRecvBytesSendBytesSemaIDReadSemaIDWriteSemaID(s, serverSocket, recvBufSize, sendBufSize, semaIndex, semaIndex, semaIndex);\n}\n\n\nvoid sqSocketAcceptFromRecvBytesSendBytesSemaIDReadSemaIDWriteSemaID(SocketPtr s, SocketPtr serverSocket, sqInt recvBufSize, sqInt sendBufSize, sqInt semaIndex, sqInt readSemaIndex, sqInt writeSemaIndex)\n{\n  /* The image has already called waitForConnection, so there is no\n     need to signal the server's connection semaphore again. */\n\n  struct privateSocketStruct *pss;\n\n  FPRINTF((stderr, \"acceptFrom(%p, %d)\\n\", s, SOCKET(serverSocket)));\n\n  /* sanity checks */\n  if (!socketValid(serverSocket) || !PSP(serverSocket)->multiListen)\n    {\n      FPRINTF((stderr, \"accept failed: (multi->%d)\\n\", PSP(serverSocket)->multiListen));\n      interpreterProxy->success(false);\n      return;\n    }\n\n  /* check that a connection is there */\n  if (PSP(serverSocket)->acceptedSock < 0)\n    {\n      fprintf(stderr, \"acceptFrom: no socket available\\n\");\n      interpreterProxy->success(false);\n      return;\n    }\n\n  /* got connection -- fill in the structure */\n  s->sessionID= 0;\n  pss= (privateSocketStruct *)calloc(1, sizeof(privateSocketStruct));\n  if (pss == NULL)\n    {\n      fprintf(stderr, \"acceptFrom: out of memory\\n\");\n      interpreterProxy->success(false);\n      return;\n    }\n\n  _PSP(s)= pss;\n  pss->s= PSP(serverSocket)->acceptedSock;\n  PSP(serverSocket)->acceptedSock= -1;\n  SOCKETSTATE(serverSocket)= WaitingForConnection;\n  aioHandle(SOCKET(serverSocket), acceptHandler, AIO_RX);\n  s->sessionID= thisNetSession;\n  pss->connSema= semaIndex;\n  pss->readSema= readSemaIndex;\n  pss->writeSema= writeSemaIndex;\n  pss->sockState= Connected;\n  pss->sockError= 0;\n  aioEnable(SOCKET(s), PSP(s), 0);\n}\n\n\n/* close the socket */\n\nvoid sqSocketCloseConnection(SocketPtr s)\n{\n  int result= 0;\n\n  if (!socketValid(s))\n    return;\n\n  FPRINTF((stderr, \"closeConnection(%d)\\n\", SOCKET(s)));\n\n  if (SOCKET(s) < 0)\n    return;\t/* already closed */\n\n  aioDisable(SOCKET(s));\n  SOCKETSTATE(s)= ThisEndClosed;\n  result= close(SOCKET(s));\n  if ((result == -1) && (errno != EWOULDBLOCK))\n    {\n      /* error */\n      SOCKETSTATE(s)= Unconnected;\n      SOCKETERROR(s)= errno;\n      notify(PSP(s), CONN_NOTIFY);\n      perror(\"closeConnection\");\n    }\n  else if (0 == result)\n    {\n      /* close completed synchronously */\n      SOCKETSTATE(s)= Unconnected;\n      FPRINTF((stderr, \"closeConnection: disconnected\\n\"));\n      SOCKET(s)= -1;\n    }\n  else\n    {\n      /* asynchronous close in progress */\n      SOCKETSTATE(s)= ThisEndClosed;\n      aioHandle(SOCKET(s), closeHandler, AIO_RWX);  /* => close() done */\n      FPRINTF((stderr, \"closeConnection: deferred [aioHandle is set]\\n\"));\n    }\n}\n\n\n/* close the socket without lingering */\n\nvoid sqSocketAbortConnection(SocketPtr s)\n{\n  FPRINTF((stderr, \"abortConnection(%d)\\n\", SOCKET(s)));\n  if (!socketValid(s))\n    return;\n  setLinger(SOCKET(s), 0);\n  sqSocketCloseConnection(s);\n}\n\n\n/* Release the resources associated with this socket. \n   If a connection is open, abort it. */\n\nvoid sqSocketDestroy(SocketPtr s)\n{\n  if (!socketValid(s))\n    return;\n\n  FPRINTF((stderr, \"destroy(%d)\\n\", SOCKET(s)));\n\n  if (SOCKET(s))\n    sqSocketAbortConnection(s);\t\t/* close if necessary */\n\n  if (PSP(s))\n    free(PSP(s));\t\t\t/* release private struct */\n\n  _PSP(s)= 0;\n}\n\n\n/* answer the OS error code for the last socket operation */\n\nsqInt sqSocketError(SocketPtr s)\n{\n  if (!socketValid(s))\n    return -1;\n  return SOCKETERROR(s);\n}\n\n\n/* return the local IP address bound to a socket */\n\nsqInt sqSocketLocalAddress(SocketPtr s)\n{\n  struct sockaddr_in saddr;\n  socklen_t saddrSize= sizeof(saddr);\n\n  if (!socketValid(s))\n    return -1;\n  if (getsockname(SOCKET(s), (struct sockaddr *)&saddr, &saddrSize)\n      || (AF_INET != saddr.sin_family))\n    return 0;\n  return ntohl(saddr.sin_addr.s_addr);\n}\n\n\n/* return the peer's IP address */\n\nsqInt sqSocketRemoteAddress(SocketPtr s)\n{\n  struct sockaddr_in saddr;\n  socklen_t saddrSize= sizeof(saddr);\n\n  if (!socketValid(s))\n    return -1;\n  if (TCPSocketType == s->socketType)\n    {\n      /* --- TCP --- */\n      if (getpeername(SOCKET(s), (struct sockaddr *)&saddr, &saddrSize)\n\t  || (AF_INET != saddr.sin_family))\n\treturn 0;\n      return ntohl(saddr.sin_addr.s_addr);\n    }\n  /* --- UDP/RAW --- */\n  return ntohl(SOCKETPEER(s).sin_addr.s_addr);\n}\n\n\n/* return the local port number of a socket */\n\nsqInt sqSocketLocalPort(SocketPtr s)\n{\n  struct sockaddr_in saddr;\n  socklen_t saddrSize= sizeof(saddr);\n\n  if (!socketValid(s))\n    return -1;\n  if (getsockname(SOCKET(s), (struct sockaddr *)&saddr, &saddrSize)\n      || (AF_INET != saddr.sin_family))\n    return 0;\n  return ntohs(saddr.sin_port);\n}\n\n\n/* return the peer's port number */\n\nsqInt sqSocketRemotePort(SocketPtr s)\n{\n  struct sockaddr_in saddr;\n  socklen_t saddrSize= sizeof(saddr);\n\n  if (!socketValid(s))\n    return -1;\n  if (TCPSocketType == s->socketType)\n    {\n      /* --- TCP --- */\n      if (getpeername(SOCKET(s), (struct sockaddr *)&saddr, &saddrSize)\n\t  || (AF_INET != saddr.sin_family))\n\treturn 0;\n      return ntohs(saddr.sin_port);\n    }\n  /* --- UDP/RAW --- */\n  return ntohs(SOCKETPEER(s).sin_port);\n}\n\n\n/* answer whether the socket has data available for reading:\n   if the socket is not connected, answer \"false\";\n   if the socket is open and data can be read, answer \"true\".\n   if the socket is open and no data is currently readable, answer \"false\";\n   if the socket is closed by peer, change the state to OtherEndClosed\n\tand answer \"false\";\n*/\nsqInt sqSocketReceiveDataAvailable(SocketPtr s)\n{\n  if (!socketValid(s)) return false;\n  if (SOCKETSTATE(s) == Connected)\n    {\n      int fd= SOCKET(s);\n      int n=  socketReadable(fd);\n      if (n > 0)\n\t{\n\t  FPRINTF((stderr, \"receiveDataAvailable(%d) -> true\\n\", fd));\n\t  return true;\n\t}\n      else if (n < 0)\n\t{\n\t  FPRINTF((stderr, \"receiveDataAvailable(%d): other end closed\\n\", fd));\n\t  SOCKETSTATE(s)= OtherEndClosed;\n\t}\n    }\n  else /* (SOCKETSTATE(s) != Connected) */\n    {\n      FPRINTF((stderr, \"receiveDataAvailable(%d): socket not connected\\n\", SOCKET(s)));\n    }\n  aioHandle(SOCKET(s), dataHandler, AIO_RX);\n  FPRINTF((stderr, \"receiveDataAvailable(%d) -> false [aioHandle is set]\\n\", SOCKET(s)));\n  return false;\n}\n\n\n/* answer whether the socket has space to receive more data */\n\nsqInt sqSocketSendDone(SocketPtr s)\n{\n  if (!socketValid(s))\n    return false;\n  if (SOCKETSTATE(s) == Connected)\n    {\n      if (socketWritable(SOCKET(s))) return true;\n      aioHandle(SOCKET(s), dataHandler, AIO_WX);\n    }\n  return false;\n}\n\n\n/* read data from the socket s into buf for at most bufSize bytes.\n   answer the number actually read.  For UDP, fill in the peer's address\n   with the approriate value.\n*/\nsqInt sqSocketReceiveDataBufCount(SocketPtr s, char *buf, sqInt bufSize)\n{\n  int nread= 0;\n\n  if (!socketValid(s))\n    return -1;\n  if (TCPSocketType != s->socketType)\n    {\n      /* --- UDP/RAW --- */\n      socklen_t addrSize= sizeof(SOCKETPEER(s));\n      if ((nread= recvfrom(SOCKET(s), buf, bufSize, 0, (struct sockaddr *)&SOCKETPEER(s), &addrSize)) <= 0)\n\t{\n\t  if ((nread == -1) && (errno == EWOULDBLOCK))\n\t    {\n\t      FPRINTF((stderr, \"UDP receiveData(%d) < 1 [blocked]\\n\", SOCKET(s)));\n\t      return 0;\n\t    }\n\t  SOCKETERROR(s)= errno;\n\t  FPRINTF((stderr, \"UDP receiveData(%d) < 1 [a:%d]\\n\", SOCKET(s), errno));\n\t  return 0;\n\t}\n    }\n  else\n    {\n      /* --- TCP --- */\n      if ((nread= read(SOCKET(s), buf, bufSize)) <= 0)\n\t{\n\t  if ((nread == -1) && (errno == EWOULDBLOCK))\n\t    {\n\t      FPRINTF((stderr, \"TCP receiveData(%d) < 1 [blocked]\\n\", SOCKET(s)));\n\t      return 0;\n\t    }\n\t  /* connection reset */\n\t  SOCKETSTATE(s)= OtherEndClosed;\n\t  SOCKETERROR(s)= errno;\n\t  FPRINTF((stderr, \"TCP receiveData(%d) < 1 [b:%d]\\n\", SOCKET(s), errno));\n\t  notify(PSP(s), CONN_NOTIFY);\n\t  return 0;\n\t}\n    }\n  /* read completed synchronously */\n  FPRINTF((stderr, \"receiveData(%d) done = %d\\n\", SOCKET(s), nread));\n  return nread;\n}\n\n\n/* write data to the socket s from buf for at most bufSize bytes.\n   answer the number of bytes actually written.\n*/ \nsqInt sqSocketSendDataBufCount(SocketPtr s, char *buf, sqInt bufSize)\n{\n  int nsent= 0;\n\n  if (!socketValid(s))\n    return -1;\n\n  if (TCPSocketType != s->socketType)\n    {\n      /* --- UDP/RAW --- */\n      FPRINTF((stderr, \"UDP sendData(%d, %d)\\n\", SOCKET(s), bufSize));\n      if ((nsent= sendto(SOCKET(s), buf, bufSize, 0, (struct sockaddr *)&SOCKETPEER(s), sizeof(SOCKETPEER(s)))) <= 0)\n\t{\n\t  if (errno == EWOULDBLOCK)\t/* asynchronous write in progress */\n\t    return 0;\n\t  FPRINTF((stderr, \"UDP send failed\\n\"));\n\t  SOCKETERROR(s)= errno;\n\t  return 0;\n\t}\n    }\n  else\n    {\n      /* --- TCP --- */\n      FPRINTF((stderr, \"TCP sendData(%d, %d)\\n\", SOCKET(s), bufSize));\n      if ((nsent= write(SOCKET(s), buf, bufSize)) <= 0)\n\t{\n\t  if ((nsent == -1) && (errno == EWOULDBLOCK))\n\t    {\n\t      FPRINTF((stderr, \"TCP sendData(%d, %d) -> %d [blocked]\",\n\t\t       SOCKET(s), bufSize, nsent));\n\t      return 0;\n\t    }\n\t  else\n\t    {\n\t      /* error: most likely \"connection closed by peer\" */\n\t      SOCKETSTATE(s)= OtherEndClosed;\n\t      SOCKETERROR(s)= errno;\n\t      FPRINTF((stderr, \"TCP write failed -> %d\", errno));\n\t      return 0;\n\t    }\n\t}\n    }\n  /* write completed synchronously */\n  FPRINTF((stderr, \"sendData(%d) done = %d\\n\", SOCKET(s), nsent));\n  return nsent;\n}\n\n\n/* read data from the UDP socket s into buf for at most bufSize bytes.\n   answer the number of bytes actually read.\n*/ \nsqInt sqSocketReceiveUDPDataBufCountaddressportmoreFlag(SocketPtr s, char *buf, sqInt bufSize,  sqInt *address,  sqInt *port, sqInt *moreFlag)\n{\n  if (socketValid(s) && (TCPSocketType != s->socketType))\n    {\n      struct sockaddr_in saddr;\n      socklen_t addrSize= sizeof(saddr);\n\n      FPRINTF((stderr, \"recvFrom(%d)\\n\", SOCKET(s)));\n      memset(&saddr, 0, sizeof(saddr));\n      { \n\tint nread= recvfrom(SOCKET(s), buf, bufSize, 0, (struct sockaddr *)&saddr, &addrSize);\n\tif (nread >= 0)\n\t  {\n\t    *address= ntohl(saddr.sin_addr.s_addr);\n\t    *port= ntohs(saddr.sin_port);\n\t    return nread;\n\t  }\n\tif (errno == EWOULDBLOCK)\t/* asynchronous read in progress */\n\t  return 0;\n\tSOCKETERROR(s)= errno;\n\tFPRINTF((stderr, \"receiveData(%d)= %da\\n\", SOCKET(s), 0));\n      }\n    }\n  interpreterProxy->success(false);\n  return 0;\n}\n\n\n/* write data to the UDP socket s from buf for at most bufSize bytes.\n * answer the number of bytes actually written.\n */ \nsqInt sqSockettoHostportSendDataBufCount(SocketPtr s, sqInt address, sqInt port, char *buf, sqInt bufSize)\n{\n  if (socketValid(s) && (TCPSocketType != s->socketType))\n    {\n      struct sockaddr_in saddr;\n\n      FPRINTF((stderr, \"sendTo(%d)\\n\", SOCKET(s)));\n      memset(&saddr, 0, sizeof(saddr));\n      saddr.sin_family= AF_INET;\n      saddr.sin_port= htons((short)port);\n      saddr.sin_addr.s_addr= htonl(address);\n      {\n\tint nsent= sendto(SOCKET(s), buf, bufSize, 0, (struct sockaddr *)&saddr, sizeof(saddr));\n\tif (nsent >= 0)\n\t  return nsent;\n\t\n\tif (errno == EWOULDBLOCK)\t/* asynchronous write in progress */\n\t  return 0;\n\tFPRINTF((stderr, \"UDP send failed\\n\"));\n\tSOCKETERROR(s)= errno;\n      }\n    }\n  interpreterProxy->success(false);\n  return 0;\n}\n\n\n/*** socket options ***/\n\n\n/* NOTE: we only support the portable options here as an incentive for\n         people to write portable Squeak programs.  If you need\n         non-portable socket options then go write yourself a plugin\n         specific to your platform.  This decision is unilateral and\n         non-negotiable.  - ikp\n   NOTE: we only support the integer-valued options because the code\n\t in SocketPlugin doesn't seem able to cope with the others.\n\t (Personally I think that things like SO_SNDTIMEO et al would\n\t by far more interesting than the majority of things on this\n\t list, but there you go...)\n   NOTE: if your build fails because of a missing option in this list,\n\t simply DELETE THE OPTION (or comment it out) and then send\n\t me mail (ian.piumarta@inria.fr) to let me know about it.\n */\n\ntypedef struct\n{\n  char *name;\t\t/* name as known to Squeak */\n  int   optlevel;\t/* protocol level */\n  int   optname;\t/* name as known to Unix */\n} socketOption;\n\n#ifndef SOL_IP\n# define SOL_IP IPPROTO_IP\n#endif\n\n#ifndef SOL_UDP\n# define SOL_UDP IPPROTO_UDP\n#endif\n\n#ifndef SOL_TCP\n# define SOL_TCP IPPROTO_TCP\n#endif\n\nstatic socketOption socketOptions[]= {\n  { \"SO_DEBUG\",\t\t\t\tSOL_SOCKET,\tSO_DEBUG },\n  { \"SO_REUSEADDR\",\t\t\tSOL_SOCKET,\tSO_REUSEADDR },\n  { \"SO_DONTROUTE\",\t\t\tSOL_SOCKET,\tSO_DONTROUTE },\n  { \"SO_BROADCAST\",\t\t\tSOL_SOCKET,\tSO_BROADCAST },\n  { \"SO_SNDBUF\",\t\t\tSOL_SOCKET,\tSO_SNDBUF },\n  { \"SO_RCVBUF\",\t\t\tSOL_SOCKET,\tSO_RCVBUF },\n  { \"SO_KEEPALIVE\",\t\t\tSOL_SOCKET,\tSO_KEEPALIVE },\n  { \"SO_OOBINLINE\",\t\t\tSOL_SOCKET,\tSO_OOBINLINE },\n  { \"SO_LINGER\",\t\t\tSOL_SOCKET,\tSO_LINGER },\n  { \"IP_TTL\",\t\t\t\tSOL_IP,\t\tIP_TTL },\n  { \"IP_HDRINCL\",\t\t\tSOL_IP,\t\tIP_HDRINCL },\n  { \"IP_MULTICAST_IF\",\t\t\tSOL_IP,\t\tIP_MULTICAST_IF },\n  { \"IP_MULTICAST_TTL\",\t\t\tSOL_IP,\t\tIP_MULTICAST_TTL },\n  { \"IP_MULTICAST_LOOP\",\t\tSOL_IP,\t\tIP_MULTICAST_LOOP },\n#ifdef IP_ADD_MEMBERSHIP\n  { \"IP_ADD_MEMBERSHIP\",\t\tSOL_IP,\t\tIP_ADD_MEMBERSHIP },\n  { \"IP_DROP_MEMBERSHIP\",\t\tSOL_IP,\t\tIP_DROP_MEMBERSHIP },\n#endif\n  { \"TCP_MAXSEG\",\t\t\tSOL_TCP,\tTCP_MAXSEG },\n  { \"TCP_NODELAY\",\t\t\tSOL_TCP,\tTCP_NODELAY },\n#ifdef SO_REUSEPORT\n  { \"SO_REUSEPORT\",\t\t\tSOL_SOCKET,\tSO_REUSEPORT },\n#endif\n#if 0 /*** deliberately unsupported options -- do NOT enable these! ***/\n  { \"SO_PRIORITY\",\t\t\tSOL_SOCKET,\tSO_PRIORITY },\n  { \"SO_RCVLOWAT\",\t\t\tSOL_SOCKET,\tSO_RCVLOWAT },\n  { \"SO_SNDLOWAT\",\t\t\tSOL_SOCKET,\tSO_SNDLOWAT },\n  { \"IP_RCVOPTS\",\t\t\tSOL_IP,\t\tIP_RCVOPTS },\n  { \"IP_RCVDSTADDR\",\t\t\tSOL_IP,\t\tIP_RCVDSTADDR },\n  { \"UDP_CHECKSUM\",\t\t\tSOL_UDP,\tUDP_CHECKSUM },\n  { \"TCP_ABORT_THRESHOLD\",\t\tSOL_TCP,\tTCP_ABORT_THRESHOLD },\n  { \"TCP_CONN_NOTIFY_THRESHOLD\",\tSOL_TCP,\tTCP_CONN_NOTIFY_THRESHOLD },\n  { \"TCP_CONN_ABORT_THRESHOLD\",\t\tSOL_TCP,\tTCP_CONN_ABORT_THRESHOLD },\n  { \"TCP_NOTIFY_THRESHOLD\",\t\tSOL_TCP,\tTCP_NOTIFY_THRESHOLD },\n  { \"TCP_URGENT_PTR_TYPE\",\t\tSOL_TCP,\tTCP_URGENT_PTR_TYPE },\n#endif\n  { (char *)0,\t\t\t\t0,\t\t0 }\n};\n\n\nstatic socketOption *findOption(char *name, size_t nameSize)\n{\n  if (nameSize < 32)\n    {\n      socketOption *opt= 0;\n      char buf[32];\n      buf[nameSize]= '\\0';\n      strncpy(buf, name, nameSize);\n      for (opt= socketOptions; opt->name != 0; ++opt)\n\tif (!strcmp(buf, opt->name))\n\t  return opt;\n      fprintf(stderr, \"SocketPlugin: ignoring unknown option '%s'\\n\", buf);\n    }\n  return 0;\n}\n\n\n/* set the given option for the socket.  the option comes in as a\n * String.  (why on earth we might think this a good idea eludes me\n * ENTIRELY, so... if the string doesn't smell like an integer then we\n * copy it verbatim, assuming it's really a ByteArray pretending to be\n * a struct.  caveat hackor.)\n */\nsqInt sqSocketSetOptionsoptionNameStartoptionNameSizeoptionValueStartoptionValueSizereturnedValue(SocketPtr s, char *optionName, sqInt optionNameSize, char *optionValue, sqInt optionValueSize, sqInt *result)\n{\n  if (socketValid(s))\n    {\n      socketOption *opt= findOption(optionName, (size_t)optionNameSize);\n      if (opt != 0)\n\t{\n\t  int   val= 0;\n\t  char  buf[32];\n\t  char *endptr;\n\t  /* this is JUST PLAIN WRONG (I mean the design in the image rather\n\t     than the implementation here, which is probably correct\n\t     w.r.t. the broken design) */\n\t  if (optionValueSize > sizeof(buf) - 1)\n\t    goto barf;\n\n\t  memset((void *)buf, 0, sizeof(buf));\n\t  memcpy((void *)buf, optionValue, optionValueSize);\n\t  if (optionValueSize == 1)\t/* character `1' or `0' */\n\t    {\n\t      val= strtol(buf, &endptr, 0);\n\t      if (endptr != buf)\n\t\t{\n\t\t  memcpy((void *)buf, (void *)&val, sizeof(val));\n\t\t  optionValueSize= sizeof(val);\n\t\t}\n\t    }\n\t  if ((setsockopt(PSP(s)->s, opt->optlevel, opt->optname,\n\t\t\t  (const void *)buf, optionValueSize)) < 0)\n\t    {\n\t      perror(\"setsockopt\");\n\t      goto barf;\n\t    }\n\t  /* it isn't clear what we're supposed to return here, since\n\t     setsockopt isn't supposed to have any value-result parameters\n\t     (go grok that `const' on the buffer argument if you don't\n\t     believe me).  the image says \"the result of the negotiated\n\t     value\".  what the fuck is there to negotiate?  either\n\t     setsockopt sets the value or it barfs.  and i'm not about to go\n\t     calling getsockopt just to see if the value got changed or not\n\t     (the image should send getOption: to the Socket if it really\n\t     wants to know).  if the following is wrong then I could\n\t     probably care (a lot) less...  fix the logic in the image and\n\t     then maybe i'll care about fixing the logic in here.  (i know\n\t     that isn't very helpful, but it's 05:47 in the morning and i'm\n\t     severely grumpy after fixing several very unpleasant bugs that\n\t     somebody introduced into this file while i wasn't looking.)  */\n\t  *result= val;\n\t  return 0;\n\t}\n    }\n barf:\n  interpreterProxy->success(false);\n  return false;\n}\n\n\n/* query the socket for the given option.  */\nsqInt sqSocketGetOptionsoptionNameStartoptionNameSizereturnedValue(SocketPtr s, char *optionName, sqInt optionNameSize, sqInt *result)\n{\n  if (socketValid(s))\n    {\n      socketOption *opt= findOption(optionName, (size_t)optionNameSize);\n      if (opt != 0)\n\t{\n\t  int optval;\t/* NOT sqInt */\n\t  socklen_t optlen= sizeof(optval);\n\t  if ((getsockopt(PSP(s)->s, opt->optlevel, opt->optname, (void *)&optval, &optlen)) < 0)\n\t    goto barf;\n\t  if (optlen != sizeof(optval))\n\t    goto barf;\n\t  *result= optval;\n\t  return 0;\n\t}\n    }\n barf:\n  interpreterProxy->success(false);\n  return errno;\n}\n\nvoid sqSocketBindToPort(SocketPtr s, int addr, int port)\n{\n  int result;\n  struct sockaddr_in inaddr;\n  privateSocketStruct *pss= PSP(s);\n\n  if (!socketValid(s)) return;\n\n  /* bind the socket */\n  memset(&inaddr, 0, sizeof(inaddr));\n  inaddr.sin_family= AF_INET;\n  inaddr.sin_port= htons(port);\n  inaddr.sin_addr.s_addr= htonl(addr);\n\n  if (bind(SOCKET(s), (struct sockaddr *)&inaddr, sizeof(struct sockaddr_in)) < 0)\n    {\n      pss->sockError= errno;\n      interpreterProxy->success(false);\n      return;\n    }\n}\n\nvoid sqSocketSetReusable(SocketPtr s)\n{\n  char optionValue[256];\n  size_t bufSize;\n  unsigned char buf[4];\n  int err;\n\n  if (!socketValid(s)) return;\n\n  *(int *)buf= 1;\n  bufSize= 4;\n  if (setsockopt(SOCKET(s), SOL_SOCKET, SO_REUSEADDR, buf, bufSize) < 0)\n    {\n      PSP(s)->sockError= errno;\n      interpreterProxy->success(false);\n      return;\n    }\n}\n\n/*** Resolver functions ***/\n\n\n/* Note: the Mac and Win32 implementations implement asynchronous lookups\n * in the DNS.  I can't think of an easy way to do this in Unix without\n * going totally ott with threads or somesuch.  If anyone knows differently,\n * please tell me about it. - Ian\n */\n\n\n/*** irrelevancies ***/\n\nvoid sqResolverAbort(void) {}\n\nvoid sqResolverStartAddrLookup(sqInt address)\n{\n  const char *res;\n  res= addrToName(address);\n  strncpy(lastName, res, MAXHOSTNAMELEN);\n  FPRINTF((stderr, \"startAddrLookup %s\\n\", lastName));\n}\n\n\nsqInt sqResolverStatus(void)\n{\n  if (!thisNetSession)\n    return ResolverUninitialised;\n  if (lastError != 0)\n    return ResolverError;\n  return ResolverSuccess;\n}\n\n/*** trivialities ***/\n\nsqInt sqResolverAddrLookupResultSize(void)\t{ return strlen(lastName); }\nsqInt sqResolverError(void)\t\t\t{ return lastError; }\nsqInt sqResolverLocalAddress(void)\t\t{ return nameToAddr(localHostName); }\nsqInt sqResolverNameLookupResult(void)\t\t{ return lastAddr; }\n\nvoid sqResolverAddrLookupResult(char *nameForAddress, sqInt nameSize)\n{\n  memcpy(nameForAddress, lastName, nameSize);\n}\n\n/*** name resolution ***/\n\nvoid sqResolverStartNameLookup(char *hostName, sqInt nameSize)\n{\n  int len= (nameSize < MAXHOSTNAMELEN) ? nameSize : MAXHOSTNAMELEN;\n  memcpy(lastName, hostName, len);\n  lastName[len]= lastError= 0;\n  FPRINTF((stderr, \"name lookup %s\\n\", lastName));\n  lastAddr= nameToAddr(lastName);\n  /* we're done before we even started */\n  interpreterProxy->signalSemaphoreWithIndex(resolverSema);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/SoundPlugin/sqUnixSound.c",
    "content": "/* sqUnixSound.c -- sound support for various Unix sound systems\n *\n * Author: Ian.Piumarta@inria.fr\n * \n * Last edited: 2008-04-21 11:43:42 by piumarta on emilia\n *\n *   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a copy\n *   of this software and associated documentation files (the \"Software\"), to deal\n *   in the Software without restriction, including without limitation the rights\n *   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n *   copies of the Software, and to permit persons to whom the Software is\n *   furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n *   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n *   SOFTWARE.\n *\n * NOTE: The real sound support code is in one of the following files according\n *\t to the output driver selected by `configure':\n * \n *\t   sqUnixSoundOSS.c\t(Open Sound System [incl. Linux native & ALSA compat])\n *\t   sqUnixSoundNAS.c\t(Network Audio System)\n *\t   sqUnixSoundSun.c\t(SunOS/Solaris)\n *\t   sqUnixSoundMacOSX.c\t(Mac OS 10 CoreAudio)\n *\t   sqUnixSoundNull.c\t(sound disabled)\n */\n\n#include \"sq.h\"\n#include \"SoundPlugin.h\"\n#include \"SqModule.h\"\n#include \"SqSound.h\"\n\nextern sqInt snd_Stop(void);\n\n/*** module initialisation/shutdown ***/\n\nextern struct SqModule *soundModule;\nextern struct SqModule *loadModule(char *type, char *name);\n\nstatic struct SqSound *snd= 0;\n\nsqInt soundInit(void)\n{\n  if (!soundModule\n#    if 0\n      && !(soundModule= getenv(\"SQUEAK_SOUND_OSS\")    ? loadModule(\"sound\", \"OSS\")    : 0)\n      && !(soundModule= getenv(\"SQUEAK_SOUND_NAS\")    ? loadModule(\"sound\", \"NAS\")    : 0)\n      && !(soundModule= getenv(\"SQUEAK_SOUND_SUN\")    ? loadModule(\"sound\", \"Sun\")    : 0)\n      && !(soundModule= getenv(\"SQUEAK_SOUND_MACOSX\") ? loadModule(\"sound\", \"MacOSX\") : 0)\n      && !(soundModule= getenv(\"AUDIOSERVER\")         ? loadModule(\"sound\", \"NAS\")    : 0)\n      && !(soundModule= loadModule(\"sound\", \"OSS\"))\n      && !(soundModule= loadModule(\"sound\", \"Sun\"))\n      && !(soundModule= loadModule(\"sound\", \"MacOSX\"))\n      && !(soundModule= loadModule(\"sound\", \"null\"))\n#    endif\n      )\n    {\n      fprintf(stderr, \"could not find any sound module\\n\");\n      abort();\n    }\n  //printf(\"soundModule   %p %s\\n\", soundModule, soundModule->name);\n  snd= (struct SqSound *)soundModule->makeInterface();\n  if (SqSoundVersion != snd->version)\n    {\n      fprintf(stderr, \"module %s interface version %x does not have required version %x\\n\",\n\t      soundModule->name, snd->version, SqSoundVersion);\n      abort();\n    }\n  return 1;\n}\n\n\nsqInt soundShutdown(void)\n{\n  if (snd) snd->snd_Stop();\n  return 1;\n}\n\n\n/* output */\n\nsqInt snd_AvailableSpace(void)\n{\n  return snd->snd_AvailableSpace();\n}\n\nsqInt snd_InsertSamplesFromLeadTime(sqInt frameCount, void *srcBufPtr, sqInt samplesOfLeadTime)\n{\n  return snd->snd_InsertSamplesFromLeadTime(frameCount, srcBufPtr, samplesOfLeadTime);\n}\n\nsqInt snd_PlaySamplesFromAtLength(sqInt frameCount, void *srcBufPtr, sqInt startIndex)\n{\n  return snd->snd_PlaySamplesFromAtLength(frameCount, srcBufPtr, startIndex);\n}\n\nsqInt snd_PlaySilence(void)\n{\n  return snd->snd_PlaySilence();\n}\n\nsqInt snd_Start(sqInt frameCount, sqInt samplesPerSec, sqInt stereo, sqInt semaIndex)\n{\n  return snd->snd_Start(frameCount, samplesPerSec, stereo, semaIndex);\n}\n\nsqInt snd_Stop(void)\n{\n  return snd->snd_Stop();\n}\n\n/* input */\n\nsqInt snd_StartRecording(sqInt desiredSamplesPerSec, sqInt stereo, sqInt semaIndex)\n{\n  return snd->snd_StartRecording(desiredSamplesPerSec, stereo, semaIndex);\n}\n\nsqInt snd_StopRecording(void)\n{\n  return snd->snd_StopRecording();\n}\n\ndouble snd_GetRecordingSampleRate(void)\n{\n  return snd->snd_GetRecordingSampleRate();\n}\n\nsqInt snd_RecordSamplesIntoAtLength(void *buf, sqInt startSliceIndex, sqInt bufferSizeInBytes)\n{\n  return snd->snd_RecordSamplesIntoAtLength(buf, startSliceIndex, bufferSizeInBytes);\n}\n\n/* mixer */\n\nvoid snd_Volume(double *left, double *right)\t\t\t  { snd->snd_Volume(left, right); }\nvoid snd_SetVolume(double left, double right)\t\t\t  { snd->snd_SetVolume(left, right); }\nint snd_SetRecordLevel(sqInt level)\t\t\t\t  { return snd->snd_SetRecordLevel(level); }\nsqInt snd_GetSwitch(sqInt id, sqInt captureFlag, sqInt channel)\t  { return snd->snd_GetSwitch(id, captureFlag, channel); }\nsqInt snd_SetSwitch(sqInt id, sqInt captureFlag, sqInt parameter) { return snd->snd_SetSwitch(id, captureFlag, parameter); }\nsqInt snd_SetDevice(sqInt id, char *name)\t\t\t  { return snd->snd_SetDevice(id, name); }\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/SoundPlugin/zzz/Buffer.h",
    "content": "#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <assert.h>\n\n\nenum {\n  Block_Free;\n  Block_Busy;\n  Block_Full;\n  Block_Done;\n};\n\n\ntypedef struct\n{\n  int\t state;\n  int\t capacity;\n  int\t size;\n  char\t*data;\n} Block;\n\n\nBlock *Block_new(int size)\n{\n  size &= ~(4 * sizeof(double) - 1);\n  Block *b= (Block *)calloc(1, sizeof(Block));\n  if (b)\n    {\n      b->state= Block_Free;\n      b->capacity= size;\n      if ((b->data= (char *)calloc(1, size)))\n\treturn b;\n      free(b);\n    }\n  return 0;\n}\n\n\nvoid Block_delete(Block *b)\n{\n  free(b->data);\n  free(b);\n}\n\n\nvoid Block_reset(Block *b)\n{\n  b->state= Block_Free;\n  b->size=  0;\n}\n\n\ntypedef struct\n{\n  Block *input;\n  Block *output;\n} Buffer;\n\n\nBuffer *Buffer_new(int size)\n{\n  Buffer *b= (Buffer *)calloc(1, sizeof(Buffer));\n  if (b)\n    {\n      if ((b->input= Block_new(size)))\n\t{\n\t  if ((b->output= Block_new(size)))\n\t    return b;\n\t  Buffer_delete(b->input);\n\t}\n      free(b);\n    }\n  return 0;\n}\n\n\nvoid Buffer_delete(Buffer *b)\n{\n  Block_delete(b->input);\n  Block_delete(b->output);\n  delete(b);\n}\n\n\nint Buffer_swap(Buffer *b)\n{\n  if (input->state == Block_Full)\n    {\n      Block *b= input;\n      Block_reset(b->output);\n      b->input= b->output;\n      b->output= b->input;\n      return 1;\n    }\n  output->state= Block_done;\n  return 0;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/SoundPlugin/zzz/DoubleBuffer.h",
    "content": "#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <assert.h>\n\n\nenum {\n  Buffer_Free,\n  Buffer_Busy,\n  Buffer_Full,\n  Buffer_Done\n};\n\n\ntypedef struct\n{\n  int\t state;\n  int\t size;\n  int\t iptr;\n  int\t optr;\t// 0 <= optr <= iptr <= size\n  char\t*data;\n} Buffer;\n\n\nBuffer *Buffer_new(int size)\n{\n  Buffer *b= (Buffer *)calloc(1, sizeof(Buffer));\n  if (b)\n    {\n      b->state= Buffer_Free;\n      b->size=  size;\n      if ((b->data= (char *)calloc(1, size)))\n\treturn b;\n      free(b);\n    }\n  return 0;\n}\n\n\nvoid Buffer_delete(Buffer *b)\n{\n  assert(b && b->data);\n  free(b->data);\n  free(b);\n}\n\n\nvoid Buffer_reset(Buffer *b)\n{\n  b->state= Buffer_Free;\n  b->iptr= b->optr= 0;\n}\n\n\nint Buffer_avail(Buffer *b)\n{\n  return b->iptr - b->optr;\n}\n\nint Buffer_free(Buffer *b)\n{\n  return b->size - b->iptr;\n}\n\n\ntypedef struct\n{\n  Buffer *input;\n  Buffer *output;\n} DBuffer;\n\n\nDBuffer *DBuffer_new(int size)\n{\n  DBuffer *d= (DBuffer *)calloc(1, sizeof(DBuffer));\n  if (d)\n    {\n      if ((d->input= Buffer_new(size)))\n\t{\n\t  if ((d->output= Buffer_new(size)))\n\t    return d;\n\t  Buffer_delete(d->input);\n\t}\n      free(d);\n    }\n  return 0;\n}\n\n\nvoid DBuffer_delete(DBuffer *d)\n{\n  assert(d && d->input && d->output);\n  Buffer_delete(d->input);\n  Buffer_delete(d->output);\n  free(d);\n}\n\n\nint DBuffer_swap(DBuffer *d)\n{\n  if (d->input->state == Buffer_Full)\n    {\n      Buffer *i= d->output;\n      Buffer *o= d->input;\n      d->input=  i;\n      d->output= o;\n      Buffer_reset(i);\n      return 1;\n    }\n  d->output->state= Buffer_done;\n  return 0;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/SoundPlugin/zzz/Fifo.h",
    "content": "#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <assert.h>\n\n\n// NOTE: requires the client to define min and max on ints\n\n\ntypedef struct\n{\n  char *data;\n  int   size;\n  int   avail;\n  int   iptr;\n  int   optr;\n} Buffer;\n\n\nBuffer *Buffer_new(int size)\n{\n  Buffer *b= (Buffer *)malloc(sizeof(Buffer));\n  if (!b)\n    return 0;\n  if (!(b->data= (char *)malloc(size)))\n    {\n      free(b);\n      return 0;\n    }\n  b->size=  size;\n  b->avail= 0;\n  b->iptr=  0;\n  b->optr=  0;\n  return b;\n}\n\nvoid Buffer_delete(Buffer *b)\n{\n  assert(b && b->data);\n  free(b->data);\n  free(b);\n}\n\n\ninline int Buffer_avail(Buffer *b)\n{\n  assert(!(b->avail & 3));\n  return b->avail;\n}\n\ninline int Buffer_free(Buffer *b)\n{\n  return b->size - Buffer_avail(b);\n}\n\n\ninline void Buffer_getOutputPointers(Buffer *b, char **p1, int *n1, char **p2, int *n2)\n{\n  int optr=     b->optr;\n  int avail=    Buffer_avail(b);\n  int headroom= b->size - optr;\n  if (avail == 0)\n    {\n      *p1=\t\t\t*p2= 0;\n      *n1=\t\t\t*n2= 0;\n    }\n  else if (avail <= headroom)\n    {\n      *p1= b->data + optr;\t*p2= 0;\n      *n1= avail;\t\t*n2= 0;\n    }\n  else\n    {\n      *p1= b->data + optr;\t*p2= b->data;\n      *n1= headroom;\t\t*n2= avail - headroom;\n    }\n  assert(!(*n1 & 3));\n  assert(!(*n2 & 3));\n}\n\ninline int Buffer_getOutputPointer(Buffer *b, char **ptr)\n{\n  int optr=     b->optr;\n  int avail=    Buffer_avail(b);\n  int headroom= b->size - optr;\n  if (headroom < avail) avail= headroom;\n  assert((optr + avail) <= b->size);\n  *ptr= b->data + optr;\n  return avail;\n}\n\ninline int Buffer_getInputPointer(Buffer *b, char **ptr)\n{\n  int iptr=     b->iptr;\n  int free=     Buffer_free(b);\n  int headroom= b->size - iptr;\n  if (headroom < free) free= headroom;\n  assert((iptr + free) <= b->size);\n  *ptr= b->data + iptr;\n  return free;\n}\n\n\ninline void Buffer_advanceOutputPointer(Buffer *b, int size)\n{\n  int optr=  b->optr;\n  int avail= b->avail;\n  assert(!(size & 3));\n  optr+=  size;\n  avail-= size;\n  assert(optr <= b->size);\n  assert(avail >= 0);\n  if (optr == b->size) optr= 0;\n  b->optr=  optr;\n  b->avail= avail;\n}\n\ninline void Buffer_advanceInputPointer(Buffer *b, int size)\n{\n  int iptr= b->iptr;\n  assert(!(size & 3));\n  {\n    int free= Buffer_free(b);\n    free-= size;\n    assert(free >= 0);\n  }\n  iptr += size;\n  assert(iptr <= b->size);\n  if (iptr == b->size) iptr= 0;\n  b->iptr= iptr;\n  b->avail += size;\n}\n\n\ninline void Buffer_prefill(Buffer *b, int bytes)\n{\n  char *ptr;\n  int   size= Buffer_getInputPointer(b, &ptr);\n  assert(!(bytes & 3));\n  assert(bytes <= size);\n  memset(ptr, 0, size);\n  Buffer_advanceInputPointer(b, bytes);\n}\n\n\ninline int Buffer_write(Buffer *b, char *buf, int nbytes)\n{\n  int iptr= b->iptr;\n  int bytesToCopy= min(nbytes, Buffer_free(b));\n  int headroom= b->size - iptr;\n  int bytesCopied= 0;\n\n  assert(!(nbytes & 3));\n\n  if (bytesToCopy >= headroom)\n    {\n      memcpy(b->data + iptr, buf, headroom);\n      iptr= 0;\n      bytesToCopy -= headroom;\n      bytesCopied += headroom;\n      if (bytesToCopy)\n\t{\n\t  memcpy(b->data, buf + bytesCopied, bytesToCopy);\n\t  iptr= bytesToCopy;\n\t  bytesCopied += bytesToCopy;\n\t}\n    }\n  else\n    {\n      memcpy(b->data + iptr, buf, bytesToCopy);\n      iptr += bytesToCopy;\n      bytesCopied= bytesToCopy;\n    }\n  b->iptr= iptr;\n  b->avail += bytesCopied;\n  return bytesCopied;\n}\n\n\ninline int Buffer_read(Buffer *b, char *buf, int nbytes)\n{\n  int optr= b->optr;\n  int bytesToCopy= min(nbytes, Buffer_avail(b));\n  int headroom= b->size - optr;\n  int bytesCopied= 0;\n\n  assert(!(nbytes & 3));\n\n  if (bytesToCopy >= headroom)\n    {\n      memcpy(buf, b->data + optr, headroom);\n      optr= 0;\n      bytesToCopy -= headroom;\n      bytesCopied += headroom;\n      if (bytesToCopy)\n\t{\n\t  memcpy(buf + bytesCopied, b->data, bytesToCopy);\n\t  optr= bytesToCopy;\n\t  bytesCopied += bytesToCopy;\n\t}\n    }\n  else\n    {\n      memcpy(buf, b->data + optr, bytesToCopy);\n      optr += bytesToCopy;\n      bytesCopied= bytesToCopy;\n    }\n  b->optr= optr;\n  b->avail -= bytesCopied;\n  return bytesCopied;\n}\n\n\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/SoundPlugin/zzz/ring.h",
    "content": "// ring.h -- lightweight ring buffers for sound i/o\n// \n// Author: Ian.Piumarta@INRIA.Fr\n// \n// Last edited: \n// \n//   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n//                              listed elsewhere in this file.\n//   All rights reserved.\n//   \n//   This file is part of Unix Squeak.\n// \n//   Permission is hereby granted, free of charge, to any person obtaining a\n//   copy of this software and associated documentation files (the \"Software\"),\n//   to deal in the Software without restriction, including without limitation\n//   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n//   and/or sell copies of the Software, and to permit persons to whom the\n//   Software is furnished to do so, subject to the following conditions:\n// \n//   The above copyright notice and this permission notice shall be included in\n//   all copies or substantial portions of the Software.\n// \n//   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n//   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n//   DEALINGS IN THE SOFTWARE.\n\n\ntypedef struct _ring\n{\n  char **bufs;\n  int    bufCount;\n  int\t bufSize;\n  int\t iBuf;\n  int\t oBuf;\n  int\t nBufs;\n} ring;\n\n\nstatic ring *ring_new(int bufCount, int bufSize)\n{\n  ring *r= (ring *)malloc(sizeof(ring));\n\n  if (r)\n    {\n      if ((r->bufs= (char **)malloc(bufCount * sizeof(char *))))\n\t{\n\t  // Would there be any advantage to allocating wired memory\n\t  // via mmap() and mlock()?\n\t  int i;\n\t  for (i= 0;  i < bufCount;  ++i)\n\t    if (!(r->bufs[i]= (char *)malloc(bufSize)))\n\t      goto fail;\n\t  r->bufCount = bufCount;\n\t  r->bufSize  = bufSize;\n\t  r->iBuf     = 0;\n\t  r->oBuf     = 0;\n\t  r->nBufs    = 0;\n\t  return r;\n\n\tfail:\n\t  printf(\"sound: could not allocate ring buffer memory\\n\");\n\t  while (i--)\n\t    free(r->bufs[i]);\n\t  free(r->bufs);\n\t}\n      free(r);\n    }\n\n  return 0;\n}\n\n\nstatic void ring_delete(ring *r)\n{\n  int i;\n  assert(r);\n  assert(r->bufs);\n  for (i= 0;  i < r->bufCount;  ++i)\n    {\n      assert(r->bufs[i]);\n      free(r->bufs[i]);\n    }\n  free(r->bufs);\n  free(r);\n}\n\n\n// counting the number of filled buffers saves an awful lot of tedious\n// logic involving the front and back pointers, which in turn saves an\n// awful lot of tedious locking of mutexes.  the incr/decrs are\n// effectively atomic and races will always fail conservatively (no\n// data for input when 1 buffer has just been filled by the ioproc, no\n// space for output when 1 buffer was just emptied by the ioproc) and\n// cause an immediate retry (since the reader/writer is always the\n// image -- the ioproc chugs along happily irrespective of the\n// apparent buffer state).\n\nstatic inline int ring_isEmpty(ring *r)\t   { return r->nBufs == 0; }\nstatic inline int ring_freeBufs(ring *r)   { return r->bufCount - r->nBufs; }\nstatic inline int ring_availBufs(ring *r)  { return r->nBufs; }\nstatic inline int ring_freeBytes(ring *r)  { return ring_freeBufs(r) * r->bufSize; }\nstatic inline int ring_availBytes(ring *r) { return ring_availBufs(r) * r->bufSize; }\n\nstatic inline void ring_oAdvance(ring *r)\n{\n  assert(r->nBufs > 0);\n  r->oBuf= (r->oBuf + 1) % r->bufCount;\n  r->nBufs--;\n}\n\nstatic inline void ring_iAdvance(ring *r)\n{\n  assert(r->nBufs < r->bufCount);\n  r->iBuf= (r->iBuf + 1) % r->bufCount;\n  r->nBufs++;\n}\n\nstatic inline char *ring_inputPointer(ring *r)\n{\n  return r->bufs[r->iBuf];\n}\n\n#if 0\nstatic int ring_copyIn(ring *r, char *bytes, int size)\n{\n  int   freeBufs= ring_freeBufs(r);\n  char *in= bytes;\n\n  while (freeBufs-- && (size >= r->bufSize))\n    {\n      memcpy(r->bufs[r->iBuf], bytes, r->bufSize);\n      in   += r->bufSize;\n      size -= r->bufSize;\n      ring_iAdvance(r);\n    }\n  return in - bytes;\n}\n#endif\n\nstatic int ring_copyOut(ring *r, char *bytes, int size)\n{\n  int   availBufs= ring_availBufs(r);\n  char *out= bytes;\n\n  while (availBufs-- && (size >= r->bufSize))\n    {\n      memcpy(out, r->bufs[r->oBuf], r->bufSize);\n      out  += r->bufSize;\n      size -= r->bufSize;\n      ring_oAdvance(r);\n    }\n  return out - bytes;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/SqueakFFIPrims/00README",
    "content": "WARNING: This code is obsolete.  The new ThreadedFFIPlugin code requires little\nor no support code (see platforms/Cross/plugins/SqueakFFIPlugin).  But it is\ncomplete only on x86 and so some of these files may be useful for reference on\nPPC.\n\neem. 2009-11-30\n===============\n\n\nThis directory contains support code for the Squeak FFI (foreign\nfunction interface) primitives.  You should not even be here reading\nthis unless (i) the configure script refuses to include FFI support in\nyour build, or (ii) you want to try to make your FFI calls go lots\nfaster by avoiding the use of libffi.\n\nAbout the FFI primitives\n------------------------\n\nSqueak can dynamically construct callouts to C code at runtime via one\nof two mechanisms, `apicall' and `cdecl'.  The `cdecl' method\nconstructs a `call interface description' (a data structure\nrepresenting a function's signature) which is used by libffi [1] to\nconstruct and invoke a call to the foreign function.  This method is\nportable but horribly slow.  The `apicall' method constructs a stack\nframe on-the-fly which is used to invoke the foreign function\ndirectly.\n\nThe `apicall' method is MUCH faster than `cdecl' (more than FOUR times\nfaster) but relies on horribly platform-dependent code.\n\nSupport for the `apicall' method is now available for a few platforms\non Unix:\n\n  - PowerPC and x86 using the SVr4 ABI (found on most GNU/Linux and\n    BSD-like systems, with the notable exception of Darwin/MacOSX)\n\n  - PowerPC using the Darwin ABI (similar to Mach)\n\nTesting your FFI support\n------------------------\n\nFirst run the script `ffi-test-config' (no arguments) which will look\nto see if your platform has support for the `apicall' method.  If it\nprints `any-libffi' then you must either install libffi [1] before you\ncan use the FFI primitives or implement the missing support [2].  If\nit prints anything else then it has found what it thinks is suitable\nsupport for your platform [3].\n\nTo run the test suite, just type `make' [4].  This will build a program\ncalled `main' that tries quite hard to break the FFI support code.  If\nit fails using the built-in support code then you've found a bug in\neither the support code or the test code [5].  If you want to try\nagain with libffi, then type:\n\n\tmake clean\n\tmake CPU=any ABI=libffi LIB=-lffi\n\t./main\n\nIf it fails again you've found a bug either in libffi (send bug\nreports to the relevant mailing list, not me) or in the test code.\n\nTo tidy up afterwards, type `make clean'.\n\nNotes\n-----\n\n[1] libffi is now part of gcc.  If you need to install it, download\n    just the contents of the top-level `gcc' directory and the\n    `libffi' subdirectory.  Then `cd' to `libffi' and type:\n\n\t./configure\n\tmake\n\tsudo make install\n\n    If it breaks, you get to keep the pieces.\n\n\n[2] Figure out your canonical cpu and abi (os) name.  Write a bunch of\n    C code to create a stack frame in `${cpu}-${abi}.c' and the\n    assembler `trampoline' that pused it and jumps to the destination\n    function in the file `${cpu}-${abi}-asm.S'.  This will allow the\n    configure script to find and use your support.\n    \n[3] If it doesn't find support code for your platform and you think it\n    should (based on the cpu-abi variants available) then add your\n    canonical host/os names to the tests in ffi-test-config.  If the\n    resulting program works, make similar changes in `acinclude.m4' so\n    that the support is included in the Squeak VM.  Then mail the\n    modified files to me [5].\n\n[4] By default the Makefile will try to figure this out for itself\n    using rules similar to those in the configure script.  You must be\n    using GNU make for this to work.\n\n[5] Send bug reports and support code for new platforms to:\n\tian.piumarta@squeakland.org\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/SqueakFFIPrims/Makefile",
    "content": "# Makefile.in for FFIPlugin on Unix\n# \n# Author: ian.piumarta@inria.fr\n# \n# Last edited: 16 Jun 2010 by eliot miranda\n\n[make_cfg]\n[make_plg]\n\nTARGET= SqueakFFIPrims$a\n\nOBJS= SqueakFFIPrims$o sqFFIPlugin$o sqManualSurface$o sqFFITestFuncs$o\n\nXINCLUDES= [includes]\n\n$(TARGET) : $(OBJS) Makefile\n\t$(LINK) $(TARGET) $(OBJS)\n\t$(RANLIB) $(TARGET)\n\n[make_targets]\n\n.force :\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/SqueakFFIPrims/Makefile.in",
    "content": "# Makefile.in for FFIPlugin on Unix\n# \n# Author: ian.piumarta@inria.fr\n# \n# Last edited: Dec  1 2009 by eliot miranda\n\n[make_cfg]\n[make_plg]\n\nTARGET= SqueakFFIPrims$a\n\nOBJS= SqueakFFIPrims$o sqFFIPlugin$o sqManualSurface$o sqFFITestFuncs$o\n\nXINCLUDES= [includes]\n\n$(TARGET) : $(OBJS) Makefile\n\t$(LINK) $(TARGET) $(OBJS)\n\t$(RANLIB) $(TARGET)\n\n[make_targets]\n\n.force :\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/SqueakFFIPrims/acinclude.m4",
    "content": "AC_MSG_CHECKING([for FFI support])\n\nFFI_DIR=${topdir}/platforms/unix/plugins/SqueakFFIPrims\n\nAC_ARG_WITH(ffi,\n[  --with-ffi=ffi          use FFI support [default=auto]],\n  [with_ffi=\"$withval\"],\n  [with_ffi=\"auto\"])\n\nif test \"${with_ffi}\" != \"auto\"; then\n  ffi_cpu_abi=\"${with_ffi}\"\nelse\n  ffi_cpu_abi=`${FFI_DIR}/ffi-config ${cfgdir} ${FFI_DIR} -cpu-abi`\nfi\n\nif test \"${ffi_cpu_abi}\" != \"any-libffi\"; then\n    AC_MSG_RESULT([${ffi_cpu_abi}])\nelse\n    AC_MSG_RESULT([requires libffi])\n    ffi_cpu_abi=any-libffi\n    AC_CHECK_HEADER(ffi.h,\n\tAC_CHECK_LIB(ffi, ffi_call,\n\t    AC_PLUGIN_USE_LIB(ffi),\n\t    AC_PLUGIN_DISABLE),\n\tAC_PLUGIN_DISABLE)\nfi\n\nFFI_C=${ffi_cpu_abi}\nFFI_S=${ffi_cpu_abi}-asm\nFFI_O=\"${FFI_C}\\$o ${FFI_S}\\$o\"\n\nAC_SUBST(FFI_DIR)\nAC_SUBST(FFI_C)\nAC_SUBST(FFI_S)\nAC_SUBST(FFI_O)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/SqueakFFIPrims/any-libffi-asm.S",
    "content": ""
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/SqueakFFIPrims/any-libffi.c",
    "content": "/****************************************************************************\n*   PROJECT: Squeak foreign function interface\n*   FILE:    sqUnixFFI.c\n*   CONTENT: Unix support for the foreign function interface\n*\n*   AUTHOR:  Andreas Raab (ar)\n*   ADDRESS: Walt Disney Imagineering, Glendale, CA\n*   EMAIL:   andreasr@wdi.disney.com\n*   RCSID:   $Id: any-libffi.c 966 2005-03-09 08:50:45Z piumarta $\n*\n*   NOTES:  The Unix version of the FFI support code relies on libffi from\n*\t    http://sourceware.cygnus.com/libffi/\n*\n*****************************************************************************/\n#include \"sq.h\"\n#include \"sqFFI.h\"\n\n#ifndef NO_FFI_SUPPORT\n\n#include <ffi.h>\n\n#ifndef  FFI_TYPE_STRUCT\t/* this is private in libffi-2 */\n# define FFI_TYPE_STRUCT 13\n#endif\n\n#if defined(FFI_TEST)\n  static int primitiveFail(void) { puts(\"primitive fail\"); exit(1); return 0; }\n#else\n  extern struct VirtualMachine *interpreterProxy;\n# define primitiveFail() interpreterProxy->primitiveFail();\n#endif\n\n#if 1\n#define HAVE_LONGLONG\n#endif\n\n/* Check if HAVE_LONGLONG is defined (should be figured out by configure */\n#ifdef HAVE_LONGLONG\n#define HAS_LONGLONG 1\n#define LONGLONG long long\n#endif\n\n/* Error if LONGLONG is not defined */\n#if HAS_LONGLONG\n#ifndef LONGLONG\n#error \"You must define LONGLONG if HAS_LONGLONG is defined\"\n#endif\n#endif\n\n/* Max number of arguments in call */\n#define FFI_MAX_ARGS 32\n\nstatic ffi_type*  ffiTypes[FFI_MAX_ARGS];\nstatic void*      ffiArgs[FFI_MAX_ARGS];\n\nstatic char   ffiBytes[FFI_MAX_ARGS];\nstatic short  ffiShorts[FFI_MAX_ARGS];\nstatic int    ffiInts[FFI_MAX_ARGS];\nstatic float  ffiFloats[FFI_MAX_ARGS];\nstatic double ffiDoubles[FFI_MAX_ARGS];\nstatic int    ffiArgIndex = 0;\n\nstatic ffi_type*  ffiStructTypes[FFI_MAX_ARGS];\nstatic int ffiStructIndex = 0;\n\n/* helpers */\n#define CHECK_ARGS() if(ffiArgIndex >= FFI_MAX_ARGS) return primitiveFail();\n#define PUSH_TYPE(type) { CHECK_ARGS(); ffiTypes[ffiArgIndex] = &type; }\n#define PUSH(where, what, type) { \\\n\tPUSH_TYPE(type); where[ffiArgIndex] = what; \\\n\tffiArgs[ffiArgIndex] = (void*) (where + ffiArgIndex); \\\n\tffiArgIndex++;\\\n}\n\n\n#define BARG_PUSH(value, type) PUSH(ffiBytes, value, type)\n#define SARG_PUSH(value, type) PUSH(ffiShorts, value, type)\n#define IARG_PUSH(value, type) PUSH(ffiInts, value, type)\n#define FARG_PUSH(value) PUSH(ffiFloats, value, ffi_type_float)\n#define DARG_PUSH(value) PUSH(ffiDoubles, value, ffi_type_double)\n\n#if HAS_LONGLONG\nstatic LONGLONG ffiLongLongs[FFI_MAX_ARGS];\n#define LARG_PUSH(value, type) PUSH(ffiLongLongs, value, type)\n#endif\n\n/* The 64bit return value storage area - aligned by the C compiler */\nstatic double   returnValue;\n/* Storage area for large structure returns */\nstatic ffi_type* structReturnType = NULL;\nstatic void *structReturnValue = NULL;\n\n/* The area for temporarily allocated strings */\nstatic char *ffiTempStrings[FFI_MAX_ARGS];\n/* The number of temporarily allocated strings */\nstatic int   ffiTempStringCount = 0;\n\n/*****************************************************************************/\n/*****************************************************************************/\n\n/*  ffiInitialize:\n    Announce that the VM is about to do an external function call. */\nint ffiInitialize(void)\n{\n  ffiArgIndex = 0;\n  ffiTempStringCount = 0;\n  ffiStructIndex = 0;\n  structReturnType = NULL;\n  structReturnValue = NULL;\n  return 1;\n}\n\n/*  ffiSupportsCallingConvention:\n    Return true if the support code supports the given calling convention */\nint ffiSupportsCallingConvention(int callType)\n{\n  if(callType == FFICallTypeCDecl) return 1;\n  return 0;\n}\n\n/*  ffiAlloc:\n    Allocate space from the external heap */\nint ffiAlloc(int byteSize)\n{\n  return (int)malloc(byteSize);\n}\n/*  ffiFree:\n    Free space from the external heap */\nint ffiFree(int pointer)\n{\n  if(pointer) free((void*)pointer);\n  return 1;\n}\n\n/*****************************************************************************/\n/*****************************************************************************/\n\nint ffiPushSignedByte(int value)\n{\n  BARG_PUSH((char)value, ffi_type_sint8);\n  return 1;\n}\n\nint ffiPushUnsignedByte(int value)\n{\n  BARG_PUSH((char)value, ffi_type_uint8);\n  return 1;\n}\n\nint ffiPushSignedShort(int value)\n{\n  SARG_PUSH((short)value, ffi_type_sint16);\n  return 1;\n}\n\nint ffiPushUnsignedShort(int value)\n{\n  SARG_PUSH((short)value, ffi_type_uint16);\n  return 1;\n}\n\nint ffiPushSignedInt(int value)\n{\n  IARG_PUSH(value, ffi_type_sint32);\n  return 1;\n}\n\nint ffiPushUnsignedInt(int value)\n{\n  IARG_PUSH(value, ffi_type_uint32);\n  return 1;\n}\n\nint ffiPushSignedLongLong(int low, int high)\n{\n#if HAS_LONGLONG\n  LONGLONG value = (((LONGLONG) high) << 32)  | ((LONGLONG) (unsigned) low);\n  LARG_PUSH(value, ffi_type_sint64);\n  return 1;\n#else\n  return primitiveFail();\n#endif\n}\n\nint ffiPushUnsignedLongLong(int low, int high)\n{\n#if HAS_LONGLONG\n  LONGLONG value = (((LONGLONG) high) << 32)  | ((LONGLONG) (unsigned) low);\n  LARG_PUSH(value, ffi_type_uint64);\n  return 1;\n#else\n  return primitiveFail();\n#endif\n}\n\nint ffiPushSignedChar(int value)\n{\n  BARG_PUSH(value, ffi_type_sint8);\n  return 1;\n}\n\nint ffiPushUnsignedChar(int value)\n{\n  BARG_PUSH(value, ffi_type_uint8);\n  return 1;\n}\n\nint ffiPushBool(int value)\n{\n  IARG_PUSH(value, ffi_type_uint8);\n  return 1;\n}\n\nint ffiPushSingleFloat(double value)\n{\n  FARG_PUSH((float)value);\n  return 1;\n}\n\nint ffiPushDoubleFloat(double value)\n{\n  DARG_PUSH(value);\n  return 1;\n}\n\n\nffi_type* ffiCreateType(int *structSpec, int structSize)\n{\n  ffi_type *structType, **newTypes;\n  int nTypes, i, typeSpec;\n\n  /* count the number of atomic types we need to create */\n  nTypes = 0;\n  for(i=0; i<structSize; i++) {\n    typeSpec = structSpec[i];\n    if(typeSpec & FFIFlagPointer) nTypes++;\n    else if(typeSpec & FFIFlagAtomic) nTypes++;\n  }\n  /* note: nTypes == 0 means an invalid structure */\n  if(nTypes == 0) {\n    printf(\"Warning: nTypes == 0 in ffiCreateTypes\\n\");\n    return NULL;\n  }\n  /* allocate the structure type */\n  structType = calloc(1, sizeof(ffi_type));\n  /* allocate the atomic type refs */\n  newTypes = calloc(nTypes+1, sizeof(ffi_type*));\n  /* number of elements in type */\n  structType->size = (*structSpec) & FFIStructSizeMask;\n  structType->alignment = 4;\n  structType->type = FFI_TYPE_STRUCT;\n  structType->elements = newTypes;\n\n  /* now go over the structure and fill in the fields */\n  nTypes = 0;\n  for(i=0; i<structSize; i++) {\n    typeSpec = structSpec[i];\n    if(typeSpec & FFIFlagPointer) {\n      newTypes[nTypes++] = &ffi_type_pointer;\n      continue;\n    }\n    if((typeSpec & FFIFlagAtomic) == 0) continue;\n    switch((typeSpec & FFIAtomicTypeMask) >> FFIAtomicTypeShift) {\n    case FFITypeBool:\n      newTypes[nTypes++] = &ffi_type_uint8; break;\n    case FFITypeUnsignedByte:\n      newTypes[nTypes++] = &ffi_type_uint8; break;\n    case FFITypeSignedByte:\n      newTypes[nTypes++] = &ffi_type_sint8; break;\n    case FFITypeUnsignedShort:\n      newTypes[nTypes++] = &ffi_type_uint16; break;\n    case FFITypeSignedShort:\n      newTypes[nTypes++] = &ffi_type_sint16; break;\n    case FFITypeUnsignedInt:\n      newTypes[nTypes++] = &ffi_type_uint32; break;\n    case FFITypeSignedInt:\n      newTypes[nTypes++] = &ffi_type_sint32; break;\n    case FFITypeUnsignedLongLong:\n      newTypes[nTypes++] = &ffi_type_uint64; break;\n    case FFITypeSignedLongLong:\n      newTypes[nTypes++] = &ffi_type_sint64; break;\n    case FFITypeUnsignedChar:\n      newTypes[nTypes++] = &ffi_type_uint8; break;\n    case FFITypeSignedChar:\n      newTypes[nTypes++] = &ffi_type_sint8; break;\n    case FFITypeSingleFloat:\n      newTypes[nTypes++] = &ffi_type_float; break;\n    case FFITypeDoubleFloat:\n      newTypes[nTypes++] = &ffi_type_double; break;\n    default:\n      printf(\"Warning: unknown atomic type (%x) in ffiCreateTypes\\n\", \n\t     typeSpec);\n      free(newTypes);\n      free(structType);\n      return NULL;\n    };\n  }\n  newTypes[nTypes++] = NULL;\n  return structType;\n}\n\nint ffiPushStructureOfLength(int pointer, int* structSpec, int structSize)\n{\n  ffi_type *structType;\n\n  if(pointer == 0) return primitiveFail();\n  CHECK_ARGS(); /* fail early on */\n  structType = ffiCreateType(structSpec, structSize);\n  if(structType == NULL) return primitiveFail();\n  ffiStructTypes[ffiStructIndex++] = structType;\n  ffiTypes[ffiArgIndex] = structType;\n  ffiArgs[ffiArgIndex] = (void*) pointer;\n  ffiArgIndex++;\n  return 1;\n}\n\nint ffiPushPointer(int pointer)\n{\n  IARG_PUSH(pointer, ffi_type_pointer);\n  return 1;\n}\n\nint ffiPushStringOfLength(int srcIndex, int length)\n{\n  char *ptr;\n  ptr = (char*) malloc(length+1);\n  if(!ptr) return primitiveFail();\n  memcpy(ptr, (void*)srcIndex, length);\n  ptr[length] = 0;\n  ffiTempStrings[ffiTempStringCount++] = ptr;\n  IARG_PUSH((int)ptr, ffi_type_pointer);\n  return 1;\n}\n\n/*****************************************************************************/\n/*****************************************************************************/\n\n/*  ffiCanReturn:\n\tReturn true if the support code can return the given type. */\nint ffiCanReturn(int *structSpec, int specSize)\n{\n  int header = *structSpec;\n  if(header & FFIFlagPointer) return 1;\n  if(header & FFIFlagStructure) {\n    int structSize = header & FFIStructSizeMask;\n    structReturnType = ffiCreateType(structSpec, specSize);\n    if(!structReturnType) return 0;\n    if(structSize > 8) {\n      structReturnValue = calloc(1,structSize);\n      if(!structReturnValue) return 0;\n      return 1;\n    }\n  }\n  return 1;\n}\n\n/*  ffiReturnFloatValue:\n    Return the value from a previous ffi call with float return type. */\ndouble ffiReturnFloatValue(void)\n{\n  return returnValue;\n}\n\n/*  ffiLongLongResultLow:\n    Return the low 32bit from the 64bit result of a call to an external function */\nint ffiLongLongResultLow(void)\n{\n#if HAS_LONGLONG\n  return (int) ( (*(LONGLONG*)&returnValue) & (LONGLONG)0xFFFFFFFFU);\n#else\n  return 0;\n#endif\n}\n\n/*  ffiLongLongResultHigh:\n    Return the high 32bit from the 64bit result of a call to an external function */\nint ffiLongLongResultHigh(void)\n{\n#if HAS_LONGLONG\n  return (int) ( (*(LONGLONG*)&returnValue) >> 32);\n#else\n  return 0;\n#endif\n}\n\n/*  ffiStoreStructure:\n    Store the structure result of a previous ffi call into the given address*/\nint ffiStoreStructure(int address, int structSize)\n{\n  if(structReturnValue) {\n    memcpy((void*)address, (void*)structReturnValue, structSize);\n  } else {\n    memcpy((void*)address, (void*)&returnValue, structSize);\n  }\n  return 1;\n}\n\n/*  ffiCleanup:\n    Cleanup after a foreign function call has completed.\n    The generic support code only frees the temporarily\n    allocated strings. */\nint ffiCleanup(void)\n{\n  int i;\n  for(i=0; i<ffiTempStringCount; i++)\n    free(ffiTempStrings[i]);\n  for(i=0; i<ffiStructIndex; i++) {\n    free(ffiStructTypes[i]->elements);\n    free(ffiStructTypes[i]);\n    ffiStructTypes[i]=NULL;\n  }\n  if(structReturnType) {\n    free(structReturnType->elements);\n    free(structReturnType);\n    structReturnType = NULL;\n  }\n  if(structReturnValue) {\n    free(structReturnValue);\n    structReturnValue = NULL;\n  }\n  ffiTempStringCount = 0;\n  ffiStructIndex = 0;\n  return 1;\n}\n\n/*****************************************************************************/\n/*****************************************************************************/\nint ffiCallAddress(int fn, ffi_type *returnType, int atomicArgType)\n{\n  ffi_cif cif;\n  ffi_status result;\n  int retVal;\n\n  result = ffi_prep_cif(&cif, FFI_DEFAULT_ABI, ffiArgIndex, \n\t\t\treturnType, ffiTypes);\n  if(result != FFI_OK) return primitiveFail();\n  if(structReturnValue) {\n    ffi_call(&cif, (void *)fn, (void *)structReturnValue, (void **)ffiArgs);\n    return (int) structReturnValue;\n  }\n  ffi_call(&cif, (void *)fn, (void *)&returnValue, (void **)ffiArgs);\n  retVal = *(int*)&returnValue;\n#ifdef FFI_MIPS_N32\n  /* Note: MIPS N32 ABI returns 64bit for integer/pointer whatever.\n     This seems to be a bug in the fficall implementation. */\n  retVal = ((int*)(&returnValue))[1];\n#endif\n  /* Promote certain return types to integral size */\n  switch(atomicArgType) {\n  case FFITypeUnsignedChar:\n  case FFITypeUnsignedByte: retVal = *(unsigned char*) &retVal; break;\n  case FFITypeSignedChar:\n  case FFITypeSignedByte: retVal = *(signed char*) &retVal; break;\n  case FFITypeUnsignedShort: retVal = *(unsigned short*) &retVal; break;\n  case FFITypeSignedShort: retVal = *(signed short*) &retVal; break;\n  case FFITypeSingleFloat: returnValue = *(float*)&returnValue; break;\n  }\n  return retVal;\n}\n\nint ffiCallAddressOfWithPointerReturn(int fn, int callType)\n{\n  return ffiCallAddress(fn, &ffi_type_pointer,-1);\n}\n\nint ffiCallAddressOfWithStructReturn(int fn, int callType, \n\t\t\t\t     int *structSpec, int specSize)\n{\n  if(!structReturnType) return primitiveFail();\n  return ffiCallAddress(fn, structReturnType,-1);\n}\n\nint ffiCallAddressOfWithReturnType(int fn, int callType, int typeSpec)\n{\n  ffi_type *returnType;\n  int atomicType;\n  atomicType = (typeSpec & FFIAtomicTypeMask) >> FFIAtomicTypeShift;\n  switch(atomicType) {\n  case FFITypeVoid:\t\treturnType = &ffi_type_void; break;\n  case FFITypeBool:\t\treturnType = &ffi_type_uint8; break;\n  case FFITypeUnsignedByte:\treturnType = &ffi_type_uint8; break;\n  case FFITypeSignedByte:\treturnType = &ffi_type_sint8; break;\n  case FFITypeUnsignedShort:\treturnType = &ffi_type_uint16; break;\n  case FFITypeSignedShort:\treturnType = &ffi_type_sint16; break;\n  case FFITypeUnsignedInt:\treturnType = &ffi_type_uint32; break;\n  case FFITypeSignedInt:       \treturnType = &ffi_type_sint32; break;\n  case FFITypeUnsignedLongLong: returnType = &ffi_type_uint64; break;\n  case FFITypeSignedLongLong:\treturnType = &ffi_type_sint64; break;\n  case FFITypeUnsignedChar:\treturnType = &ffi_type_uint8; break;\n  case FFITypeSignedChar:      \treturnType = &ffi_type_sint8; break;\n  case FFITypeSingleFloat:\treturnType = &ffi_type_float; break;\n  case FFITypeDoubleFloat:\treturnType = &ffi_type_double; break;\n  default:\n    return primitiveFail();\n  }\n  return ffiCallAddress(fn, returnType, atomicType);\n}\n\n\n#if defined(FFI_TEST)\nvoid ffiDoAssertions(void) {}\n#endif\n\n\n#endif /* NO_FFI_SUPPORT */\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/SqueakFFIPrims/build.cmake",
    "content": "EXPECT_UNDEFINED_SYMBOLS ()\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/SqueakFFIPrims/config.cmake",
    "content": "SET (USE_LIBFFI)\n\nIF (OPT_without-ffi)\n  PLUGIN_DISABLE ()\nELSE ()\n  IF (vm-host-cpu STREQUAL \"powerpc\" OR vm-host-cpu STREQUAL \"ppc\")\n    SET (cpu ppc)\n  ELSEIF (vm-host-cpu MATCHES  \"i[3456789]86\")\n    SET (cpu x86)\n  ELSEIF (vm-host-cpu STREQUAL \"x86_64\" AND CMAKE_ARCH_FLAGS STREQUAL \"-m32\")\n    SET (cpu x86)\n  ELSE ()\n    SET (USE_LIBFFI 1)\n  ENDIF ()\n\n  IF (vm-host-os STREQUAL \"linux\")\n    SET (abi sysv)\n  ELSEIF (vm-host-os MATCHES \"darwin.*\")\n    SET (abi darwin)\n  ELSE ()\n    SET (USE_LIBFFI 1)\n  ENDIF ()\n\n  IF (USE_LIBFFI\n      OR NOT EXISTS \"${unix}/plugins/${plugin}/${cpu}-${abi}.c\"\n      OR NOT EXISTS \"${unix}/plugins/${plugin}/${cpu}-${abi}-asm.S\")\n    SET (cpu any)\n    SET (abi libffi)\n    PLUGIN_MESSAGE (\"${cpu}-${abi}\")\n    PLUGIN_FIND_PACKAGE (LIBFFI libffi)\n    IF (NOT LIBFFI_FOUND)\n      CHECK_INCLUDE_FILE (ffi.h HAVE_FFI_H)\n      CHECK_INCLUDE_FILE (ffi/ffi.h HAVE_FFI_FFI_H)\n      IF (NOT HAVE_FFI_H AND NOT HAVE_FFI_FFI_H)\n        PLUGIN_DISABLE ()\n      ELSE ()\n        PLUGIN_REQUIRE_LIBRARY (FFI ffi)\n      ENDIF ()\n    ENDIF ()\n  ENDIF ()\n  IF (EXISTS    \"${src}/plugins/${plugin}/${plugin}.c\")\n    SET (SQFFIC \"${src}/plugins/${plugin}/${plugin}.c\")\n  ELSEIF (EXISTS \"${src}/vm/intplugins/${plugin}/${plugin}.c\")\n    SET (SQFFIC  \"${src}/vm/intplugins/${plugin}/${plugin}.c\")\n  ELSE ()\n    PLUGIN_DISABLE ()\n  ENDIF ()\n  ENABLE_LANGUAGE (ASM)\n  PLUGIN_SOURCES (\"${cross}/plugins/${plugin}/sqManualSurface.c ${SQFFIC} ${unix}/plugins/${plugin}/${cpu}-${abi}.c ${unix}/plugins/${plugin}/${cpu}-${abi}-asm.S\")\n  IF (CMAKE_COMPILER_IS_GNUCC)\n    SET (CMAKE_ASM_COMPILER \"${CMAKE_C_COMPILER}\")\n    SET (CMAKE_ASM_FLAGS \"${CMAKE_C_FLAGS} -c\")\n  ENDIF (CMAKE_COMPILER_IS_GNUCC)\nENDIF ()\n\nCONFIG_DEFINE (HAVE_FFI_H)\nCONFIG_DEFINE (HAVE_FFI_FFI_H)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/SqueakFFIPrims/ffi-config",
    "content": "#!/bin/sh\n# \n# ffi-config [cfgdir] [options...]\n# \n#    -cpu\tprint the supported cpu name or `any'\n#    -abi\tprint the supported abu name or `libffi'\n#    -lib\tprint nothing if supported, otherwise  `-lffi'\n#    -query\texit with status 0 if supported, 1 if libffi required\n\ncfgdir=../../config\n\nif [ $# -gt 0 ]; then\n    case $1 in\n\t-*)\t;;\n\t*)\tcfgdir=$1; shift;;\n    esac\nfi\n\nffidir=.\n\nif [ $# -gt 0 ]; then\n    case $1 in\n\t-*)\t;;\n\t*)\tffidir=$1; shift;;\n    esac\nfi\n\nguess=`${cfgdir}/config.guess`\nhost=`${cfgdir}/config.sub ${guess}`\ncpu=`echo ${host} | sed 's/-.*//'`\nabi=`echo ${host} | sed 's/[^-]*-[^-]*-//;s/-.*//'`\nlib=\n\ncase ${cpu} in\n    powerpc|ppc)\tcpu=ppc;;\n    i[3456789]86)\tcpu=x86;;\n    *)\t\t\tcpu=any;;\nesac\n\ncase ${abi} in\n    linux)\t\tabi=sysv;;\n    freebsd)\t\tabi=sysv;;\n    darwin*)\t\tabi=darwin;;\n    *)\t\t\tabi=libffi; lib=\"-lffi\";;\nesac\n\nif [ ! -f ${ffidir}/${cpu}-${abi}.c ] || [ ! -f ${ffidir}/${cpu}-${abi}-asm.S ]; then\n    cpu=any\n    abi=libffi\n    lib=\"-lffi\"\nfi\n\nif [ ! -f ${ffidir}/${cpu}-${abi}.c ] || [ ! -f ${ffidir}/${cpu}-${abi}-asm.S ]; then\n    echo \"Could not find ${cpu}-${abi}.c and ${cpu}-${abi}-asm.S\" >&2\n    exit 1\nfi\n\nif [ $# -eq 0 ]; then\n    echo \"${cpu}-${abi}\" \"${lib}\"\nelse\n    while [ $# -gt 0 ]; do\n\tcase $1 in\n\t    -cpu)\techo ${cpu};;\n\t    -abi)\techo ${abi};;\n\t    -lib)\techo ${lib};;\n\t    -cpu-abi)\techo ${cpu}-${abi};;\n\t    -query)\tif [ ${abi} = \"libffi\" ]; then exit 1; else exit 0; fi;;\n\t    *)\t\techo \"$0: I don't understand \\`$1'\" >&1; exit 1;;\n\tesac\n    shift\n    done\nfi\n\nexit 0\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/SqueakFFIPrims/ffi-test-main.c",
    "content": "/* ffi-test-main.c -- try hard to break the FFI from C\n * \n * Author: Ian.Piumarta@INRIA.Fr\n * \n * Based on a similar test suite in libffi, which contains the following text...\n * \n * Copyright (c) 1996, 1997, 1998, 2002, 2003  Red Hat, Inc.\n * \n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * ``Software''), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n * \n * The above copyright notice and this permission notice shall be included\n * in all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS\n * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n * OTHER DEALINGS IN THE SOFTWARE.\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <float.h>\n\n#include \"sqFFI.h\"\n\n#if 0\n# define DPRINTF(ARGS)\tprintf ARGS\n# define puts(ARG)\tputs(ARG)\n#else\n# define DPRINTF(ARGS)\n# define puts(ARG)\n#endif\n\n#if 1\n# define long_double double\n# define Lf \"f\"\n#else\n# define long_double long double\n# define Lf \"Lf\"\n#endif\n\n#define CHECK(x) !(x) ? fail(__FILE__, __LINE__) : 0 \n\nstatic int failed= 0;\n\nstatic int fail(char *file, int line)\n{\n  fprintf(stderr, \"%s: failed at line %d\\n\", file, line);\n  ++failed;\n//exit(EXIT_FAILURE);\n  return 0;\n}\n\n#define MAX_ARGS 256\n\nstatic size_t my_strlen(char *s)\t{ return strlen(s); }\n\nstatic int promotion(signed char sc, signed short ss, unsigned char uc, unsigned short us)\n{\n  int r= (int)sc + (int)ss + (int)uc + (int)us;\n  return r;\n}\n\nstatic signed char return_sc(signed char sc)\t\t{ return sc; }\nstatic unsigned char return_uc(unsigned char uc)\t{ return uc; }\nstatic long long return_ll(long long ll)\t\t{ return ll; }\n\nstatic int floating(int a, float b, double c, long_double d, int e)\n{\n  int i;\n  DPRINTF((\"%d %f %f %\"Lf\" %d\\n\", a, (double)b, c, d, e));\n  i= (int)((float)a/b + ((float)c/(float)d));\n  return i;\n}\n\nstatic float many(float f1, float f2, float f3, float f4, float f5, float f6, float f7, float f8, float f9, float f10, float f11, float f12, float f13, float f14, float f15)\n{\n  DPRINTF((\"%f %f %f %f %f %f %f %f %f %f %f %f %f %f %f\\n\",\n\t (double)f1, (double)f2, (double)f3, (double)f4, (double)f5, \n\t (double)f6, (double)f7, (double)f8, (double)f9, (double)f10,\n\t (double)f11, (double)f12, (double)f13, (double)f14, (double)f15));\n  return ((f1/f2+f3/f4+f5/f6+f7/f8+f9/f10+f11/f12+f13/f14) * f15);\n}\n\nstatic double dblit(float f)\t\t{ return f/3.0; }\nstatic long_double ldblit(float f)\t{ return (long_double)(((long_double)f)/ (long_double)3.0); }\n\n\n#define TYPE(T,S)\t((FFIType##T << FFIAtomicTypeShift) | (S) | FFIFlagAtomic)\n\ntypedef struct { unsigned char uc;  double d;  unsigned int ui; } test_structure_1;\n\nstatic int spec_structure_1[]= {\n  FFIFlagStructure | sizeof(test_structure_1),\n  TYPE(UnsignedChar,4), TYPE(DoubleFloat,8), TYPE(UnsignedInt,4)\n};\n\nstatic test_structure_1 struct1(test_structure_1 ts)\n{\n  DPRINTF((\"%d %f %d\\n\", ts.uc, ts.d, ts.ui));\n  ts.uc++;  ts.d--;  ts.ui++;  return ts;\n}\n\ntypedef struct { double d1;  double d2;} test_structure_2;\n\nstatic int spec_structure_2[]= {\n  FFIFlagStructure | sizeof(test_structure_2),\n  TYPE(DoubleFloat,8), TYPE(DoubleFloat,8)\n};\n\nstatic test_structure_2 struct2(test_structure_2 ts)\n{\n  ts.d1--;  ts.d2--;  return ts;\n}\n\ntypedef struct { int si; } test_structure_3;\n\nstatic int spec_structure_3[]= {\n  FFIFlagStructure | sizeof(test_structure_3),\n  TYPE(SignedInt,4)\n};\n\nstatic test_structure_3 struct3(test_structure_3 ts)\n{\n  ts.si= -(ts.si*2);  return ts;\n}\n\ntypedef struct { unsigned ui1;  unsigned ui2;  unsigned ui3; } test_structure_4;\n\nstatic int spec_structure_4[]= {\n  FFIFlagStructure | sizeof(test_structure_4),\n  TYPE(UnsignedInt,4), TYPE(UnsignedInt,4), TYPE(UnsignedInt,4)\n};\n\nstatic test_structure_4 struct4(test_structure_4 ts)\n{\n  ts.ui3= ts.ui1 * ts.ui2 * ts.ui3; return ts;\n}\n\ntypedef struct { char c1;  char c2; } test_structure_5;\n\nstatic int spec_structure_5[]= {\n  FFIFlagStructure | sizeof(test_structure_5),\n  TYPE(SignedChar,1), TYPE(SignedChar,1)\n};\n\nstatic test_structure_5 struct5(test_structure_5 ts1, test_structure_5 ts2)\n{\n  DPRINTF((\"%d %d %d %d\\n\", ts1.c1, ts1.c2, ts2.c1, ts2.c2));\n  ts1.c1 += ts2.c1;  ts1.c2 -= ts2.c2; return ts1;\n}\n\ntypedef struct { float f;  double d; } test_structure_6;\n\nstatic int spec_structure_6[]= {\n  FFIFlagStructure | sizeof(test_structure_6),\n  TYPE(SingleFloat,4), TYPE(DoubleFloat,8)\n};\n\nstatic test_structure_6 struct6 (test_structure_6 ts)\n{\n  ts.f += 1;  ts.d += 1;  return ts;\n}\n\ntypedef struct { float f1;  float f2;  double d; } test_structure_7;\n\nstatic int spec_structure_7[]= {\n  FFIFlagStructure | sizeof(test_structure_7),\n  TYPE(SingleFloat,4), TYPE(SingleFloat,4), TYPE(DoubleFloat,8)\n};\n\nstatic test_structure_7 struct7 (test_structure_7 ts)\n{\n  ts.f1 += 1;  ts.f2 += 1;  ts.d += 1;  return ts;\n}\n\ntypedef struct { float f1;  float f2;  float f3;  float f4; } test_structure_8;\n\nstatic int spec_structure_8[]= {\n  FFIFlagStructure | sizeof(test_structure_8),\n  TYPE(SingleFloat,4), TYPE(SingleFloat,4), TYPE(SingleFloat,4), TYPE(SingleFloat,4)\n};\n\nstatic test_structure_8 struct8 (test_structure_8 ts)\n{\n  ts.f1 += 1; ts.f2 += 1; ts.f3 += 1; ts.f4 += 1;  return ts;\n}\n\ntypedef struct { float f;  int i; } test_structure_9;\n\nstatic int spec_structure_9[]= {\n  FFIFlagStructure | sizeof(test_structure_9),\n  TYPE(SingleFloat,4), TYPE(SignedInt,4)\n};\n\nstatic test_structure_9 struct9 (test_structure_9 ts)\n{\n  ts.f += 1;  ts.i += 1;  return ts;\n}\n\n#define SPEC(S)\tspec_##S, (sizeof(spec_##S) / sizeof(int))\n\n#define GO(T,F)\tffiCallAddressOfWithReturnType((int)(F), FFICallTypeCDecl, \\\n\t\t\t\t\t       (T) << FFIAtomicTypeShift)\n\n#define GOS(S,F) ffiCallAddressOfWithStructReturn((int)(F), FFICallTypeCDecl, SPEC(S))\n\nvoid ctests(void)\n{\n  CHECK(sizeof(char) == 1);\n  CHECK(sizeof(short) == 2);\n  CHECK(sizeof(int) == 4);\n  CHECK(sizeof(long) == 4);\n  CHECK(sizeof(long long) == 8);\n  CHECK(sizeof(float) == 4);\n  CHECK(sizeof(double) == 8);\n  CHECK(sizeof(long_double) == 8);\t//xxx BOGUS BOGUS BOGUS BOGUS BOGUS\n\n  puts(\"long long tests...\");\n  {\n    long long ll, rll;\n    for (ll= 0LL;  ll < 100LL;  ++ll)\n      {\n\tffiInitialize();\n\tffiPushSignedLongLong(ll % 0x100000000, ll / 0x100000000);\n\tGO(FFITypeSignedLongLong, return_ll);\n\trll= ffiLongLongResultHigh() * 0x100000000LL + ffiLongLongResultLow();\n\tffiCleanup();\n\tDPRINTF((\"%lld %lld\\n\", ll, rll));\n\tCHECK(rll == ll);\n      }\n\n    for (ll= 55555555555000LL; ll < 55555555555100LL; ll++)\n      {\n\tffiInitialize();\n\tffiPushSignedLongLong(ll % 0x100000000, ll / 0x100000000);\n\tGO(FFITypeSignedLongLong, return_ll);\n\trll= ffiLongLongResultHigh() * 0x100000000LL + ffiLongLongResultLow();\n\tffiCleanup();\n\tCHECK(rll == ll);\n      }\n  }\n  puts(\"char tests...\");\n  {\n    signed char sc;\n    unsigned char uc;\n    int rint;\n    for (sc= (signed char)-127;  sc < (signed char)127;  ++sc)\n      {\n\tffiInitialize();\n\tffiPushSignedChar(sc);\n\trint= GO(FFITypeSignedInt, return_sc);\n\tffiCleanup();\n\tCHECK(rint == (int)sc);\n      }\n    for (uc= (unsigned char)'\\x00';  uc < (unsigned char)'\\xff';  ++uc)\n      {\n\tffiInitialize();\n\tffiPushUnsignedChar(uc);\n\trint= GO(FFITypeSignedInt, return_uc);\n\tffiCleanup();\n\tCHECK(rint == (int)uc);\n      }\n  }\n  puts(\"long double tests...\");\n  {\n    float f= 3.14159;\n    long_double ld;\n\n    DPRINTF((\"%\"Lf\"\\n\", ldblit(f)));\n    ld= 666;\n    ffiInitialize();\n    ffiPushSingleFloat(f);\n    GO(FFITypeDoubleFloat, ldblit);\n    ld= ffiReturnFloatValue();\n    ffiCleanup();\n    DPRINTF((\"%\"Lf\", %\"Lf\", %\"Lf\", %\"Lf\"\\n\", ld, ldblit(f), ld - ldblit(f), (long_double)LDBL_EPSILON));\n    /* These are not always the same!! Check for a reasonable delta */\n    CHECK(ld - ldblit(f) < LDBL_EPSILON);\n  }\n  puts(\"float arg tests...\");\n  {\n    int si1= 6;\n    float f= 3.14159;\n    double d= (double)1.0/(double)3.0;\n    long_double ld= 2.71828182846L;\n    int si2= 10;\n    int rint;\n    floating(si1, f, d, ld, si2);\n    ffiInitialize();\n    ffiPushSignedInt(si1);\n    ffiPushSingleFloat(f);\n    ffiPushDoubleFloat(d);\n    ffiPushDoubleFloat(ld);\n    ffiPushSignedInt(si2);\n    rint= GO(FFITypeSignedInt, floating);\n    ffiCleanup();\n    DPRINTF((\"%d vs %d\\n\", (int)rint, floating(si1, f, d, ld, si2)));\n    CHECK(rint == floating(si1, f, d, ld, si2));\n  }\n  puts(\"double return tests...\");\n  {\n    float f= 3.14159;\n    double d;\n    ffiInitialize();\n    ffiPushSingleFloat(f);\n    GO(FFITypeDoubleFloat, dblit);\n    d= ffiReturnFloatValue();\n    ffiCleanup();\n    CHECK(d - dblit(f) < DBL_EPSILON);\n  }\n  puts(\"strlen tests...\");\n  {\n    char *s= \"a\";\n    int rint;\n    ffiInitialize();\n    ffiPushPointer((int)s);\n    rint= GO(FFITypeSignedInt, my_strlen);\n    ffiCleanup();\n    CHECK(rint == 1);\n    s= \"1234567\";\n    ffiInitialize();\n    ffiPushPointer((int)s);\n    rint= GO(FFITypeSignedInt, my_strlen);\n    ffiCleanup();\n    CHECK(rint == 7);\n    s= \"1234567890123456789012345\";\n    ffiInitialize();\n    ffiPushPointer((int)s);\n    rint= GO(FFITypeSignedInt, my_strlen);\n    ffiCleanup();\n    CHECK(rint == 25);\n  }\n  puts(\"many arg tests...\");\n  {\n    unsigned long ul;\n    float f, ff;\n    float fa[15];\n    \n    for (ul= 0;  ul < 15;  ++ul)\n      fa[ul]= (float)ul;\n\n    ff= many(fa[0], fa[1], fa[2], fa[3], fa[4], fa[5], fa[6], fa[7], fa[8], fa[9], fa[10], fa[11], fa[12], fa[13], fa[14]);\n\n    ffiInitialize();\n    for (ul= 0;  ul < 15;  ++ul)\n      ffiPushSingleFloat(fa[ul]);\n    GO(FFITypeSingleFloat, many);\n    f= ffiReturnFloatValue();\n    ffiCleanup();\n    CHECK(f - ff < FLT_EPSILON);\n  }\n  puts(\"promotion tests...\");\n  {\n    signed char sc;\n    unsigned char uc;\n    signed short ss;\n    unsigned short us;\n    int rint;\n    for (sc= (signed char)-127;  sc <= (signed char)120;  sc += 1)\n      for (ss= -30000;  ss <= 30000;  ss += 10000)\n\tfor (uc= (unsigned char)0;  uc <= (unsigned char)200;  uc += 20)\n\t  for (us= 0;  us <= 60000;  us += 10000)\n\t    {\n\t      ffiInitialize();\n\t      ffiPushSignedChar(sc);\n\t      ffiPushSignedShort(ss);\n\t      ffiPushUnsignedChar(uc);\n\t      ffiPushUnsignedShort(us);\n\t      rint= GO(FFITypeSignedInt, promotion);\n\t      ffiCleanup();\n\t      CHECK((int)rint == (signed char)sc + (signed short)ss\n\t\t    + (unsigned char)uc + (unsigned short)us);\n\t    }\n  }\n  puts(\"struct tests...\");\n  {\n    test_structure_1 ts1_arg, ts1_result;\n    ts1_arg.uc= '\\x01';\n    ts1_arg.d= 3.14159;\n    ts1_arg.ui= 555;\n    ffiInitialize();\n    CHECK(ffiCanReturn(SPEC(structure_1)));\n    ffiPushStructureOfLength((int)&ts1_arg, SPEC(structure_1));\n    GOS(structure_1, struct1);\n    ffiStoreStructure((int)&ts1_result, sizeof(ts1_result));\n    ffiCleanup();\n    DPRINTF((\"%d %g\\n\", ts1_result.ui, ts1_result.d));\n    CHECK(ts1_result.ui == 556);\n    CHECK(ts1_result.d == 3.14159 - 1);\n  }\n  {\n    test_structure_2 ts2_arg, ts2_result;\n    ts2_arg.d1= 5.55;\n    ts2_arg.d2= 6.66;\n    DPRINTF((\"%g\\n\", ts2_result.d1));\t/*xxx this is junk!*/\n    DPRINTF((\"%g\\n\", ts2_result.d2));\n    ffiInitialize();\n    CHECK(ffiCanReturn(SPEC(structure_2)));\n    ffiPushStructureOfLength((int)&ts2_arg, SPEC(structure_2));\n    GOS(structure_2, struct2);\n    ffiStoreStructure((int)&ts2_result, sizeof(ts2_result));\n    ffiCleanup();\n    DPRINTF((\"%g\\n\", ts2_result.d1));\n    DPRINTF((\"%g\\n\", ts2_result.d2));\n    CHECK(ts2_result.d1 == 5.55 - 1);\n    CHECK(ts2_result.d2 == 6.66 - 1);\n  }\n  {\n    int compare_value;\n    test_structure_3 ts3_arg, ts3_result;\n    ts3_arg.si= -123;\n    compare_value= ts3_arg.si;\n    ffiInitialize();\n    CHECK(ffiCanReturn(SPEC(structure_3)));\n    ffiPushStructureOfLength((int)&ts3_arg, SPEC(structure_3));\n    GOS(structure_3, struct3);\n    ffiStoreStructure((int)&ts3_result, sizeof(ts3_result));\n    ffiCleanup();\n    DPRINTF((\"%d %d\\n\", ts3_result.si, -(compare_value*2)));\n    CHECK(ts3_result.si == -(ts3_arg.si*2));\n  }\n  {\n    test_structure_4 ts4_arg, ts4_result;\n    ts4_arg.ui1= 2;\n    ts4_arg.ui2= 3;\n    ts4_arg.ui3= 4;\n    ffiInitialize();\n    CHECK(ffiCanReturn(SPEC(structure_4)));\n    ffiPushStructureOfLength((int)&ts4_arg, SPEC(structure_4));\n    GOS(structure_4, struct4);\n    ffiStoreStructure((int)&ts4_result, sizeof(ts4_result));\n    ffiCleanup();\n    CHECK(ts4_result.ui3 == 2U * 3U * 4U);\n  }\n  {\n    test_structure_5 ts5_arg1, ts5_arg2, ts5_result;\n    ts5_arg1.c1= 2;\n    ts5_arg1.c2= 6;\n    ts5_arg2.c1= 5;\n    ts5_arg2.c2= 3;\n    struct5(ts5_arg1, ts5_arg2);\n    ts5_arg1.c1= 2;\n    ts5_arg1.c2= 6;\n    ts5_arg2.c1= 5;\n    ts5_arg2.c2= 3;\n    ffiInitialize();\n    CHECK(ffiCanReturn(SPEC(structure_5)));\n    ffiPushStructureOfLength((int)&ts5_arg1, SPEC(structure_5));\n    ffiPushStructureOfLength((int)&ts5_arg2, SPEC(structure_5));\n    GOS(structure_5, struct5);\n    ffiStoreStructure((int)&ts5_result, sizeof(ts5_result));\n    ffiCleanup();\n    DPRINTF((\"%d %d\\n\", ts5_result.c1, ts5_result.c2));\n    CHECK(ts5_result.c1 == 7 && ts5_result.c2 == 3);\n  }\n  {\n    test_structure_6 ts6_arg, ts6_result;\n    ts6_arg.f= 5.55f;\n    ts6_arg.d= 6.66;\n    DPRINTF((\"%g\\n\", ts6_arg.f));\n    DPRINTF((\"%g\\n\", ts6_arg.d));\n    ffiInitialize();\n    CHECK(ffiCanReturn(SPEC(structure_6)));\n    ffiPushStructureOfLength((int)&ts6_arg, SPEC(structure_6));\n    GOS(structure_6, struct6);\n    ffiStoreStructure((int)&ts6_result, sizeof(ts6_result));\n    ffiCleanup();\n    DPRINTF((\"%g\\n\", ts6_result.f));\n    DPRINTF((\"%g\\n\", ts6_result.d));\n    CHECK(ts6_result.f == 5.55f + 1);\n    CHECK(ts6_result.d == 6.66 + 1);\n  }\n  {\n    test_structure_7 ts7_arg, ts7_result;\n    ts7_arg.f1= 5.55f;\n    ts7_arg.f2= 55.5f;\n    ts7_arg.d= 6.66;\n    DPRINTF((\"%g\\n\", ts7_arg.f1));\n    DPRINTF((\"%g\\n\", ts7_arg.f2));\n    DPRINTF((\"%g\\n\", ts7_arg.d));\n    ffiInitialize();\n    CHECK(ffiCanReturn(SPEC(structure_7)));\n    ffiPushStructureOfLength((int)&ts7_arg, SPEC(structure_7));\n    GOS(structure_7, struct7);\n    ffiStoreStructure((int)&ts7_result, sizeof(ts7_result));\n    ffiCleanup();\n    DPRINTF((\"%g\\n\", ts7_result.f1));\n    DPRINTF((\"%g\\n\", ts7_result.f2));\n    DPRINTF((\"%g\\n\", ts7_result.d));\n    CHECK(ts7_result.f1 == 5.55f + 1);\n    CHECK(ts7_result.f2 == 55.5f + 1);\n    CHECK(ts7_result.d == 6.66 + 1);\n  }\n  {\n    test_structure_8 ts8_arg, ts8_result;\n    ts8_arg.f1= 5.55f;\n    ts8_arg.f2= 55.5f;\n    ts8_arg.f3= -5.55f;\n    ts8_arg.f4= -55.5f;\n    DPRINTF((\"%g\\n\", ts8_arg.f1));\n    DPRINTF((\"%g\\n\", ts8_arg.f2));\n    DPRINTF((\"%g\\n\", ts8_arg.f3));\n    DPRINTF((\"%g\\n\", ts8_arg.f4));\n    ffiInitialize();\n    CHECK(ffiCanReturn(SPEC(structure_8)));\n    ffiPushStructureOfLength((int)&ts8_arg, SPEC(structure_8));\n    GOS(structure_8, struct8);\n    ffiStoreStructure((int)&ts8_result, sizeof(ts8_result));\n    ffiCleanup();\n    DPRINTF((\"%g\\n\", ts8_result.f1));\n    DPRINTF((\"%g\\n\", ts8_result.f2));\n    DPRINTF((\"%g\\n\", ts8_result.f3));\n    DPRINTF((\"%g\\n\", ts8_result.f4));\n    CHECK(ts8_result.f1 == 5.55f + 1);\n    CHECK(ts8_result.f2 == 55.5f + 1);\n    CHECK(ts8_result.f3 == -5.55f + 1);\n    CHECK(ts8_result.f4 == -55.5f + 1);\n  }\n  {\n    test_structure_9 ts9_arg, ts9_result;\n    ts9_arg.f= 5.55f;\n    ts9_arg.i= 5;\n    DPRINTF((\"%g\\n\", ts9_arg.f));\n    DPRINTF((\"%d\\n\", ts9_arg.i));\n\n    ffiInitialize();\n    CHECK(ffiCanReturn(SPEC(structure_9)));\n    ffiPushStructureOfLength((int)&ts9_arg, SPEC(structure_9));\n    GOS(structure_9, struct9);\n    ffiStoreStructure((int)&ts9_result, sizeof(ts9_result));\n    ffiCleanup();\n    DPRINTF((\"%g\\n\", ts9_result.f));\n    DPRINTF((\"%d\\n\", ts9_result.i));\n    CHECK(ts9_result.f == 5.55f + 1);\n    CHECK(ts9_result.i == 5 + 1);\n  }\n}\n\n\n#define C(C)\tffiPushSignedChar(C)\n#define S(S)\tffiPushSignedShort(S)\n#define I(I)\tffiPushSignedInt(I)\n#define F(F)\tffiPushSingleFloat(F)\n#define D(D)\tffiPushDoubleFloat(D)\n#define P(P)\tffiPushPointer(P)\n#define GO(T,F)\tffiCallAddressOfWithReturnType((int)(F), FFICallTypeCDecl, \\\n\t\t\t\t\t       (T) << FFIAtomicTypeShift)\n\nstatic void assert(int pred, const char *gripe)\n{\n  if (pred) return;\n  fprintf(stderr, \"%s\\n\", gripe);\n  exit(1);\n}\n\n#include \"ffi-test.h\"\n\nvoid stests(void)\n{\n  double d;\n  char *s;\n\n  ffiInitialize(); C('A'); C(65); C(65); C(1);\n  GO(FFITypeSignedInt, ffiTestChars);\n  ffiCleanup();\n\n  ffiInitialize(); S('A'); S(65); S(65); S(1);\n  GO(FFITypeSignedInt, ffiTestShorts);\n  ffiCleanup();\n\n  ffiInitialize(); I('A'); I(65); I(65); I(1);\n  GO(FFITypeSignedInt, ffiTestInts);\n  ffiCleanup();\n\n  ffiInitialize(); F(65); F(65.0);\n  GO(FFITypeSingleFloat, ffiTestFloats);\n  d= ffiReturnFloatValue();\n  ffiCleanup();\n  DPRINTF((\"%f\\n\", d));\n  assert(d == 130.0, \"single floats don't work\");\n\n  ffiInitialize(); D(41.0L); D(1);\n  GO(FFITypeDoubleFloat, ffiTestDoubles);\n  d= ffiReturnFloatValue();\n  ffiCleanup();\n  assert(d == 42.0, \"problem with doubles\");\n\n  /*xxx this does not really test strings, but the corresponding call\n    in the image's FFITester does */\n  ffiInitialize();\n  P((int)\"Hello World!\");\n  s= (char *)ffiCallAddressOfWithPointerReturn((int)ffiPrintString, FFICallTypeCDecl);\n  ffiCleanup();\n  assert(!strcmp(s, \"Hello World!\"), \"Problem with strings\");\n\n  {\n    int spec[]= { FFIFlagStructure | 8,\n\t\t  TYPE(SignedInt,4), TYPE(SignedInt,4) };\n    ffiTestPoint2 pt1= { 1, 2 }, pt2= { 3, 4 }, pt3;\n    ffiInitialize();\n    assert(ffiCanReturn((int *)&spec, 3), \"cannot return struct\");\n    ffiPushStructureOfLength((int)&pt1, (int *)&spec, 3);\n    ffiPushStructureOfLength((int)&pt2, (int *)&spec, 3);\n    ffiCallAddressOfWithStructReturn((int)ffiTestStruct64, FFICallTypeCDecl, spec, 3);\n    ffiStoreStructure((int)&pt3, sizeof(pt3));\n    ffiCleanup();\n    assert((pt3.x == 4) && (pt3.y == 6), \"Problem passing 64bit structures\");\n  }\n\n  {\n    int spec[]= { FFIFlagStructure | 16,\n\t\t  TYPE(SignedInt,4), TYPE(SignedInt,4),\n\t\t  TYPE(SignedInt,4), TYPE(SignedInt,4) };\n    ffiTestPoint4 pt1= { 1, 2, 3, 4 }, pt2= { 5, 6, 7, 8 }, pt3= { 9, 10, 11, 12 };\n    ffiInitialize();\n    assert(ffiCanReturn((int *)&spec, 3), \"cannot return struct\");\n    ffiPushStructureOfLength((int)&pt1, (int *)&spec, 5);\n    ffiPushStructureOfLength((int)&pt2, (int *)&spec, 5);\n    ffiPushStructureOfLength((int)&pt3, (int *)&spec, 5);\n    ffiCallAddressOfWithStructReturn((int)ffiTestStructBig, FFICallTypeCDecl, spec, 5);\n    ffiStoreStructure((int)&pt3, sizeof(pt3));\n    ffiCleanup();\n    assert((pt3.x == 6) && (pt3.y == 8) && (pt3.z == 10) && (pt3.w == 12),\n\t   \"Problem passing large structures\");\n  }\n\n  {\n    ffiTestPoint4 pt1= { 1, 2, 3, 4 }, pt2= { 5, 6, 7, 8 }, *pt3;\n    ffiInitialize();\n    ffiPushPointer((int)&pt1);\n    ffiPushPointer((int)&pt2);\n    pt3= (ffiTestPoint4 *)\n      ffiCallAddressOfWithPointerReturn((int)ffiTestPointers, 0);\n    ffiCleanup();\n    assert((pt3->x == 6) && (pt3->y == 8) && (pt3->z == 10) && (pt3->w == 12),\n\t   \"Problem passing pointers\");\n    free((void *)pt3);\n  }\n}\n\n\nextern void ffiDoAssertions(void);\n\n\nint main()\n{\n# define report(who)\t\t\t\t\t\t\t\t\\\n  printf(\"%s %s (%d failed)\\n\", failed ? \"FAILED\" : \"passed\", who, failed);\n\n  failed= 0;  ffiDoAssertions();  report(\"ffi assertions\");\n  failed= 0;  stests();\t\t  report(\"FFITester support check\");\n  failed= 0;  ctests();\t\t  report(\"C test suite\");\n\n  return 0;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/SqueakFFIPrims/ffi-test-sq.h",
    "content": "#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n#define EXPORT(T) T\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/SqueakFFIPrims/ffi-test.c",
    "content": "/* last edited: 2003-01-29 21:48:36 by piumarta on emilia.inria.fr\n */\n\n#if !defined(NO_FFI_TEST)\n\n#include <stdio.h>\n#include <stdlib.h>\n\n#if !defined(LONGLONG)\n# define LONGLONG long long\n#endif\n\n#if 0\n# define DPRINTF(ARGS) printf ARGS\n#else\n# define DPRINTF(ARGS)\n#endif\n\n#include \"ffi-test.h\"\n\n\nchar ffiTestChars(char c1, char c2, char c3, char c4)\n{\n  DPRINTF((\"4 characters came in as\\nc1 = %c (%x)\\nc2 = %c (%x)\\nc3 = %c (%x)\\nc4 = %c (%x)\\n\", c1, c1, c2, c2, c3, c3, c4, c4));\n  return 'C';\n}\n\n\nshort ffiTestShorts(short c1, short c2, short c3, short c4)\n{\n  DPRINTF((\"4 shorts came in as\\ns1 = %d (%x)\\ns2 = %d (%x)\\ns3 = %d (%x)\\ns4 = %d (%x)\\n\", c1, c1, c2, c2, c3, c3, c4, c4));\n  return -42;\n}\n\n\nint ffiTestInts(int c1, int c2, int c3, int c4)\n{\n  DPRINTF((\"4 ints came in as\\ni1 = %d (%x)\\ni2 = %d (%x)\\ni3 = %d (%x)\\ni4 = %d (%x)\\n\", c1, c1, c2, c2, c3, c3, c4, c4));\n  return 42;\n}\n\n\nint ffiTestInts8(int c1, int c2, int c3, int c4, int c5, int c6, int c7, int c8)\n{\n  DPRINTF((\"4 ints came in as\\ni1 = %d (%x)\\ni2 = %d (%x)\\ni3 = %d (%x)\\ni4 = %d (%x)\\ni5 = %d (%x)\\ni6 = %d (%x)\\ni7 = %d (%x)\\ni8 = %d (%x)\\n\", c1, c1, c2, c2, c3, c3, c4, c4, c5, c5, c6, c6, c7, c7, c8, c8));\n  return 42;\n}\n\n\nint ffiTestInts9(int c1, int c2, int c3, int c4, int c5, int c6, int c7, int c8, int c9)\n{\n  DPRINTF((\"4 ints came in as\\ni1 = %d (%x)\\ni2 = %d (%x)\\ni3 = %d (%x)\\ni4 = %d (%x)\\ni5 = %d (%x)\\ni6 = %d (%x)\\ni7 = %d (%x)\\ni8 = %d (%x)\\ni9 = %d (%x)\\n\", c1, c1, c2, c2, c3, c3, c4, c4, c5, c5, c6, c6, c7, c7, c8, c8, c9, c9));\n  return 42;\n}\n\n\nfloat ffiTestFloats(float f1, float f2)\n{\n  DPRINTF((\"The two floats are %f and %f\\n\", (double)f1, (double)f2));\n  return (float) (f1 + f2);\n}\n\n\nfloat ffiTestFloats7(float f1, float f2, float f3, float f4, float f5, float f6, float f7)\n{\n  DPRINTF((\"The 7 floats are %f %f %f %f %f %f %f\\n\", (double)f1, (double)f2, (double)f3, (double)f4, (double)f5, (double)f6, (double)f7));\n  return (float) (f1 + f2 + f3 + f4 + f5 + f6 + f7);\n}\n\n\nfloat ffiTestFloats13(float f1, float f2, float f3, float f4, float f5, float f6, float f7, float f8, float f9, float f10, float f11, float f12, float f13)\n{\n  DPRINTF((\"The 13 floats are %f %f %f %f %f %f %f %f %f %f %f %f %f\\n\", (double)f1, (double)f2, (double)f3, (double)f4, (double)f5, (double)f6, (double)f7, (double)f8, (double)f9, (double)f10, (double)f11, (double)f12, (double)f13));\n  return (float) (f1 + f2 + f3 + f4 + f5 + f6 + f7 + f8 + f9 + f10 + f11 + f12 + f13);\n}\n\n\nfloat ffiTestFloats15(float f1, float f2, float f3, float f4, float f5, float f6, float f7, float f8, float f9, float f10, float f11, float f12, float f13, float f14, float f15)\n{\n  DPRINTF((\"The 15 floats are %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f\\n\", (double)f1, (double)f2, (double)f3, (double)f4, (double)f5, (double)f6, (double)f7, (double)f8, (double)f9, (double)f10, (double)f11, (double)f12, (double)f13, (double)f14, (double)f15));\n  return (float) (f1 + f2 + f3 + f4 + f5 + f6 + f7 + f8 + f9 + f10 + f11 + f12 + f13 + f14 + f15);\n}\n\n\ndouble ffiTestDoubles(double d1, double d2)\n{\n  DPRINTF((\"The two doubles are %f and %f\\n\", d1, d2));\n  return d1+d2;\n}\n\n\ndouble ffiTestDoubles15(double f1, double f2, double f3, double f4, double f5, double f6, double f7, double f8, double f9, double f10, double f11, double f12, double f13, double f14, double f15)\n{\n  DPRINTF((\"The 15 doubles are %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f\\n\", f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15));\n  return (double) (f1 + f2 + f3 + f4 + f5 + f6 + f7 + f8 + f9 + f10 + f11 + f12 + f13 + f14 + f15);\n}\n\n\nchar *ffiPrintString(char *string)\n{\n  DPRINTF((\"%s\\n\", string));\n  return string;\n}\n\n\nffiTestPoint2 ffiTestStruct64(ffiTestPoint2 pt1, ffiTestPoint2 pt2)\n{\n  ffiTestPoint2 result;\n  DPRINTF((\"pt1.x = %d\\npt1.y = %d\\npt2.x = %d\\npt2.y = %d\\n\",\n\t pt1.x, pt1.y, pt2.x, pt2.y));\n  result.x = pt1.x + pt2.x;\n  result.y = pt1.y + pt2.y;\n  return result;\n}\n\n\nffiTestPoint4 ffiTestStructBig(ffiTestPoint4 pt1, ffiTestPoint4 pt2)\n{\n  ffiTestPoint4 result;\n  DPRINTF((\"pt1.x = %d\\npt1.y = %d\\npt1.z = %d\\npt1.w = %d\\n\",\n\t pt1.x, pt1.y, pt1.z, pt1.w));\n  DPRINTF((\"pt2.x = %d\\npt2.y = %d\\npt2.z = %d\\npt2.w = %d\\n\",\n\t pt2.x, pt2.y, pt2.z, pt2.w));\n  result.x = pt1.x + pt2.x;\n  result.y = pt1.y + pt2.y;\n  result.z = pt1.z + pt2.z;\n  result.w = pt1.w + pt2.w;\n  return result;\n}\n\n\nffiTestPoint4 *ffiTestPointers(ffiTestPoint4 *pt1, ffiTestPoint4 *pt2)\n{\n  ffiTestPoint4 *result;\n  DPRINTF((\"pt1.x = %d\\npt1.y = %d\\npt1.z = %d\\npt1.w = %d\\n\",\n\t pt1->x, pt1->y, pt1->z, pt1->w));\n  DPRINTF((\"pt2.x = %d\\npt2.y = %d\\npt2.z = %d\\npt2.w = %d\\n\",\n\t pt2->x, pt2->y, pt2->z, pt2->w));\n  result = (ffiTestPoint4*) malloc(sizeof(ffiTestPoint4));\n  result->x = pt1->x + pt2->x;\n  result->y = pt1->y + pt2->y;\n  result->z = pt1->z + pt2->z;\n  result->w = pt1->w + pt2->w;\n  return result;\n}\n\n\nLONGLONG ffiTestLongLong(LONGLONG i1, LONGLONG i2)\n{\n  DPRINTF((\"longlong %lld %lld\\n\", i1, i2));\n  return i1 + i2;\n}\n\n\n#endif /* !NO_FFI_TEST */\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/SqueakFFIPrims/ffi-test.h",
    "content": "typedef struct ffiTestPoint2\n{\n  int x;\n  int y;\n} ffiTestPoint2;\n\ntypedef struct ffiTestPoint4\n{\n  int x;\n  int y;\n  int z;\n  int w;\n} ffiTestPoint4;\n\nextern char ffiTestChars(char c1, char c2, char c3, char c4);\nextern short ffiTestShorts(short c1, short c2, short c3, short c4);\nextern int ffiTestInts(int c1, int c2, int c3, int c4);\nextern int ffiTestInts8(int c1, int c2, int c3, int c4, int c5, int c6, int c7, int c8);\nextern int ffiTestInts9(int c1, int c2, int c3, int c4, int c5, int c6, int c7, int c8, int c9);\nextern float ffiTestFloats(float f1, float f2);\nextern float ffiTestFloats7(float f1, float f2, float f3, float f4, float f5, float f6, float f7);\nextern float ffiTestFloats13(float f1, float f2, float f3, float f4, float f5, float f6, float f7, float f8, float f9, float f10, float f11, float f12, float f13);\nextern float ffiTestFloats15(float f1, float f2, float f3, float f4, float f5, float f6, float f7, float f8, float f9, float f10, float f11, float f12, float f13, float f14, float f15);\nextern double ffiTestDoubles(double d1, double d2);\nextern double ffiTestDoubles15(double f1, double f2, double f3, double f4, double f5, double f6, double f7, double f8, double f9, double f10, double f11, double f12, double f13, double f14, double f15);\nextern char *ffiPrintString(char *string);\nextern ffiTestPoint2 ffiTestStruct64(ffiTestPoint2 pt1, ffiTestPoint2 pt2);\nextern ffiTestPoint4 ffiTestStructBig(ffiTestPoint4 pt1, ffiTestPoint4 pt2);\nextern ffiTestPoint4 *ffiTestPointers(ffiTestPoint4 *pt1, ffiTestPoint4 *pt2);\nextern long long ffiTestLongLong(long long i1, long long i2);\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/SqueakFFIPrims/ppc-darwin-asm.S",
    "content": "/* ppc-sysv-asm.S -- PowerPC FFI trampoline for Mach-O\t\t\t-*- asm -*-\n *\n * Author: Ian.Piumarta@INRIA.Fr\n *\n * Last edited:\t2003-08-15 15:36:13 by piumarta on emilia.inria.fr\n *\n *   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *      You are NOT ALLOWED to distribute modified versions of this file\n *      under its original name.  If you modify this file then you MUST\n *      rename it before making your modifications available publicly.\n * \n *   This file is distributed in the hope that it will be useful, but WITHOUT\n *   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n *   FITNESS FOR A PARTICULAR PURPOSE.\n *   \n *   You may use and/or distribute this file ONLY as part of Squeak, under\n *   the terms of the Squeak License as described in `LICENSE' in the base of\n *   this distribution, subject to the following additional restrictions:\n * \n *   1. The origin of this software must not be misrepresented; you must not\n *      claim that you wrote the original software.  If you use this software\n *      in a product, an acknowledgment to the original author(s) (and any\n *      other contributors mentioned herein) in the product documentation\n *      would be appreciated but is not required.\n * \n *   2. You must not distribute (or make publicly available by any\n *      means) a modified copy of this file unless you first rename it.\n * \n *   3. This notice must not be removed or altered in any source distribution.\n * \n *   Using (or modifying this file for use) in any context other than Squeak\n *   changes these copyright conditions.  Read the file `COPYING' in the\n *   directory `platforms/unix/doc' before proceeding with any such use.\n */\n\n/* Mach-O PPC stack frames look like this (higher addresses first):\n *\n * \t\t| caller's lr\t\t|\n * \t\t| caller's cr\t\t|\n * caller's sp->| caller's caller's sp\t|\n *\t\t| fpr save area\t\t|\n *\t\t| gpr save area\t\t|\n *\t\t|     [alignment pad]\t|\n *\t\t| local variables\t|\n * sp + 24  ->\t| param save area\t|\n * sp + 20  ->\t| caller's toc\t\t|\n * sp + 16  ->\t| reserved\t\t|\n * sp + 12  ->\t| reserved\t\t|\n * sp +  8  ->\t| (callee-save) lr\t|\n * sp +  4  ->\t| (callee-save) cr\t|\n * sp +  0  ->\t| caller's sp\t\t|\n */\n\n#define GPR_MAX   8\n#define FPR_MAX  13\n#define ARG_MAX 512\n#define FRAMESZ\t 32\n\n#include \"ppc-global.h\"\n\n#define sp r1\n\n\t.text\n\t.globl\t_ffiCallAddressOf\n\n_ffiCallAddressOf:\n\tstwu\tsp, -FRAMESZ(sp)\t\t// push trampoline frame\n\tmflr\tr0\n\tstw\tr0, (FRAMESZ+8)(sp)\n        mfcr\tr0\n        stw\tr0, (FRAMESZ+4)(sp)\t\t// saved ccr\n\tmtlr\tr3\t\t\t\t// destination fn address\n\tstw\tr4, (FRAMESZ-4)(sp)\t\t// globals\n\tlwz\tr5, stackIndex(r4)\n\tslwi\tr10, r5, 2\t\t\t// param save area size\n\taddi\tr10, r10, 32+15\t\t\t// round to quad word\n\trlwinm\tr10, r10, 0,0,27\n\tneg\tr10, r10\n\tstwux\tsp, sp, r10\t\t\t// push ffi caller frame\n\tcmpwi\tr5, 0\t\t\t\t// have params?\n\tbeq+\t2f\n\tmtctr\tr5\t\t\t\t// words to move\n\tla\tr10, (stack-4)(r4)\t\t// ffi param stack - 4\n\taddi\tr11, sp, 24-4\t\t\t// param save area - 4\n1:\tlwzu\tr0, 4(r10)\t\t\t// copy param save area\n\tstwu\tr0, 4(r11)\n\tbdnz\t1b\n2:\tlwz\tr5, fprCount(r4)\n\tcmpwi\tr5, 0\n\tbeq+\t4f\t\t\t\t// no fp args\n\tla\tr11, fprs(r4)\n\tcmpwi\tr5, 4\n\tble+\t3f\n\tlfd\tf5,  32(r11)\n\tlfd\tf6,  40(r11)\n\tlfd\tf7,  48(r11)\n\tlfd\tf8,  56(r11)\n#\tif (FPR_MAX > 8)\n\tlfd\tf9,  64(r11)\n\tlfd\tf10, 72(r11)\n\tlfd\tf11, 80(r11)\n\tlfd\tf12, 88(r11)\n\tlfd\tf13, 96(r11)\n#\tendif\n3:\tlfd\tf1,   0(r11)\n\tlfd\tf2,   8(r11)\n\tlfd\tf3,  16(r11)\n\tlfd\tf4,  24(r11)\n4:\tlwz\tr5, gprCount(r4)\n\tcmpwi\tr5, 0\n\tbeq-\t6f\t\t\t\t// no int args\n\tla\tr11, gprs(r4)\n\tcmpwi\tr5, 4\n\tble+\t5f\n\tlwz\tr7,  16(r11)\n\tlwz\tr8,  20(r11)\n\tlwz\tr9,  24(r11)\n\tlwz\tr10, 28(r11)\n5:\tlwz\tr3,   0(r11)\n\tlwz\tr4,   4(r11)\n\tlwz\tr5,   8(r11)\n\tlwz\tr6,  12(r11)\n6:\tblrl\t\t\t\t\t// callout\n\tlwz\tsp, 0(sp)\t\t\t// pop ffi caller frame\n\tlwz\tr5, (FRAMESZ-4)(sp)\t\t// globals\n\tstw\tr3, longReturnValue+0(r5)\n\tstw\tr4, longReturnValue+4(r5)\n\tstfd\tf1, floatReturnValue(r5)\n\tlwz\tr0, (FRAMESZ+8)(sp)\n \tmtlr\tr0\n        lwz\tr0, (FRAMESZ+4)(sp)\t\t// saved ccr\n        mtcr\tr0\n\taddi\tsp, sp, FRAMESZ\t\t\t// pop trampoline frame\n\tblr\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/SqueakFFIPrims/ppc-darwin.c",
    "content": "/* ppc-darwin.c -- FFI support for PowerPC on Mach-O (Darwin)\n * \n * Author: Ian.Piumarta@INRIA.Fr\n * \n * Last edited: 2004-04-03 02:59:34 by piumarta on emilia.local\n * \n *   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n *\n * Notes:\n *\n *  This is a complete rewrite of the version for MacPPC.  (The latter\n *  is hopelessly broken when passing long longs or structs containing\n *  an element of alignment less strict than int.)\n *\n * Bugs:\n * \n *   Because of the way strings are handled, this implementation is\n *   neither reentrant nor thread safe.\n *\n * References:\n * \n *   Mach-O Runtime Architecture, Apple Computer Inc., July 2002.\n */\n\n#include \"sq.h\"\n#include \"sqFFI.h\"\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n#ifndef LONGLONG\n# define LONGLONG long long\n#endif\n\n#if 0\n# define DPRINTF(ARGS)\tprintf ARGS; fflush(stdout)\n#else\n# define DPRINTF(ARGS)\n#endif\n\nextern struct VirtualMachine *interpreterProxy;\n\n#if defined(FFI_TEST)\n  static int primitiveFail(void) { puts(\"primitive fail\"); exit(1); return 0; }\n#else\n# define primitiveFail() interpreterProxy->primitiveFail();\n#endif\n\n#define GPR_MAX\t   8\n#define FPR_MAX\t  13\n#define ARG_MAX\t 512\n\nstatic char\t*strings[ARG_MAX];\nstatic int\t stringCount= 0;\n\n#if 0\nstatic char\t structs[ARG_MAX * sizeof(int)];\nstatic int\t structCount= 0;\n#endif\n\n/* the following avoids an awful lot of _very_ inefficient junk in the asm */\n\nstatic struct\n{\n  int\t   _gprCount;\t\t//  0\n  int\t   _fprCount;\t\t//  4\n  int\t   _stackIndex;\t\t//  8\n  int\t  *_structReturnValue;\t// 12\t(everything below is 8-byte aligned)\n  LONGLONG _longReturnValue;\t// 16\n  double   _floatReturnValue;\t// 24\n  int\t   _gprs[GPR_MAX];\t// 32\n  double   _fprs[FPR_MAX];\t// 32 + 4*GPR_MAX\n  int\t   _stack[ARG_MAX];\t// 32 + 4*GPR_MAX + 8*FPR_MAX\n} global;\n\n#define gprCount\t\tglobal._gprCount\n#define fprCount\t\tglobal._fprCount\n#define stackIndex\t\tglobal._stackIndex\n#define structReturnValue\tglobal._structReturnValue\n#define longReturnValue\t\tglobal._longReturnValue\n#define floatReturnValue\tglobal._floatReturnValue\n#define gprs\t\t\tglobal._gprs\n#define fprs\t\t\tglobal._fprs\n#define stack\t\t\tglobal._stack\n\n\nextern int ffiCallAddressOf(void *addr, void *globals);\n\n\nint ffiInitialize(void)\n{\n  DPRINTF((\"ffiInitialize\\n\"));\n  stackIndex= gprCount= fprCount= 0;\n#if 0\n  structCount= 0;\n#endif\n  floatReturnValue= 0.0;\n  return 1;\n}\n\n\nint ffiSupportsCallingConvention(int callType)\n{\n  return (callType == FFICallTypeCDecl)\n    ||   (callType == FFICallTypeApi);\n}\n\n\nint ffiAlloc(int byteSize)\n{\n  int ptr= (int)malloc(byteSize);\n  DPRINTF((\"ffiAlloc(%d) => %08x\\n\", byteSize, ptr));\n  return ptr;\n}\n\n\nint ffiFree(int ptr)\n{\n  DPRINTF((\"ffiFree(%08x)\\n\", ptr));\n  if (ptr) free((void *)ptr);\n  return 1;\n}\n\n\n#define checkStack()\t\t\t\t\\\n  if (stackIndex >= ARG_MAX)\t\t\t\\\n    return primitiveFail()\n\n#define checkGPR()\t\t\t\t\t\\\n  if ((gprCount >= GPR_MAX) && (stackIndex >= ARG_MAX))\t\\\n    return primitiveFail()\n\n#define qalignStack()\tstackIndex += (stackIndex & 1)\n\n#define pushGPR(value)\t\t\t\t\\\n  checkGPR();\t\t\t\t\t\\\n  if (gprCount < GPR_MAX)\t\t\t\\\n    gprs[gprCount++]= value;\t\t\t\\\n  stack[stackIndex++]= value\n\n#define qalignGPR()\tgprCount += (gprCount & 1)\n\n\nint ffiPushSignedChar(int value)\n{ \n  DPRINTF((\"ffiPushSignedChar %d\\n\", value));\n  pushGPR(value);\n  return 1;\n}\n\n\nint ffiPushUnsignedChar(int value) \n{ \n  DPRINTF((\"ffiPushUnsignedChar %d\\n\", value));\n  pushGPR(value);\n  return 1;\n}\n\n\nint ffiPushSignedByte(int value) \n{ \n  DPRINTF((\"ffiPushSignedByte %d\\n\", value));\n  pushGPR(value);\n  return 1;\n}\n\n\nint ffiPushUnsignedByte(int value)\n{ \n  DPRINTF((\"ffiPushUnsignedByte %d\\n\", value));\n  pushGPR(value);\n  return 1;\n}\n\n\nint ffiPushSignedShort(int value)\n{ \n  DPRINTF((\"ffiPushSignedShort %d\\n\", value));\n  pushGPR(value); \n  return 1; \n}\n\n\nint ffiPushUnsignedShort(int value) \n{ \n  DPRINTF((\"ffiPushUnsignedShort %d\\n\", value));\n  pushGPR(value); \n  return 1; \n}\n\n\nint ffiPushSignedInt(int value) \n{ \n  DPRINTF((\"ffiPushSignedInt %d\\n\", value));\n  pushGPR(value); \n  return 1; \n}\n\n\nint ffiPushUnsignedInt(int value) \n{ \n  DPRINTF((\"ffiPushUnsignedInt %d\\n\", value));\n  pushGPR(value);\n  return 1;\n}\n\n\nint ffiPushSignedLongLong(int low, int high)\n{\n  DPRINTF((\"ffiPushSignedLongLong %d %d\\n\", low, high));\n  qalignGPR();\n  qalignStack();\n  pushGPR(high);\n  pushGPR(low);\n  return 1;\n}\n\n\nint ffiPushUnsignedLongLong(int low, int high)\n{ \n  DPRINTF((\"ffiPushUnsignedLongLong %d %d\\n\", low, high));\n  qalignGPR();\n  qalignStack();\n  pushGPR(high);\n  pushGPR(low);\n  return 1;\n}\n\n\nint ffiPushPointer(int pointer)\n{\n  DPRINTF((\"ffiPushPointer %08x\\n\", pointer));\n  pushGPR(pointer);\n  return 1;\n}\n\n\nint ffiPushSingleFloat(double value)\n{\n  DPRINTF((\"ffiPushSingleFloat %f\\n\", (float)value));\n  if (fprCount < FPR_MAX)\n    fprs[fprCount++]= value;\n  {\n    float floatValue= (float)value;\n    pushGPR(*(int *)&floatValue);\n  }\n  return 1;\n}\n\n\nint ffiPushDoubleFloat(double value)\n{\n  DPRINTF((\"ffiPushDoubleFloat %f\\n\", (float)value));\n  if (fprCount < FPR_MAX)\n    fprs[fprCount++]= value;\n  pushGPR(((int *)&value)[0]);\n  pushGPR(((int *)&value)[1]);\n  return 1;\n}\n\n\nint ffiPushStringOfLength(int srcIndex, int length)\n{\n  char *ptr;\n  DPRINTF((\"ffiPushStringOfLength %d\\n\", length));\n  checkGPR();\n  ptr= (char *)malloc(length + 1);\n  if (!ptr)\n    return primitiveFail();\n  memcpy(ptr, (void *)srcIndex, length);\n  ptr[length]= '\\0';\n  strings[stringCount++]= ptr;\n  pushGPR((int)ptr);\n  return 1;\n}\n\n\nstatic inline int min(int x, int y) { return (x < y) ? x : y; }\n\n\nint ffiPushStructureOfLength(int pointer, int *structSpec, int specSize)\n{\n  int i;\n  char *data\t= (char *)pointer;\n  char *argp\t= (char *)&stack[stackIndex];\n#define argl\t  (char *)&stack[ARG_MAX]\n  int   argSize\t= *structSpec & FFIStructSizeMask;\n  char *gprp\t= (char *)&gprs[gprCount];\n#define gprl\t  (char *)&gprs[GPR_MAX]\n  int   gprSize\t= min(argSize, gprl - gprp);\n\n  DPRINTF((\"ffiPush %08x Structure %p OfLength %d\\n\", pointer, structSpec, specSize));\n\n  if (gprSize < 4) gprp += (4 - gprSize);\n  if (argSize < 4) argp += (4 - gprSize);\n  if (argp + argSize > argl)\n    return primitiveFail();\n\n  memcpy((void *)gprp, (void *)data, gprSize);\n  memcpy((void *)argp, (void *)data, argSize);\n  gprCount   += (gprSize + sizeof(int) - 1) / sizeof(int);\n  stackIndex += (argSize + sizeof(int) - 1) / sizeof(int);\n\n#undef argl\n#undef gprl\n\n  for (i= 0;  i < specSize;  ++i)\n    {\n      int typeSpec= structSpec[i];\n      if (typeSpec & FFIFlagPointer)\n\tcontinue;\n      else if (typeSpec & FFIFlagStructure)\n\tcontinue;\n      else\n\t{\t\n\t  int atomicType= (typeSpec & FFIAtomicTypeMask) >> FFIAtomicTypeShift;\n\t  switch (atomicType)\n\t    {\n\t    case FFITypeSingleFloat:\n\t      if (fprCount < FPR_MAX)\n\t\tfprs[fprCount++]= *(float *)data;\n\t      break;\n\t    case FFITypeDoubleFloat:\n\t      if (fprCount < FPR_MAX)\n\t\tfprs[fprCount++]= *(double *)data;\n\t      break;\n\t    default:\n\t      break;\n\t    }\n\t  data += typeSpec & FFIStructSizeMask;\n\t}\n    }\n  return 1;\n}\n\n\nint ffiCanReturn(int *structSpec, int specSize)\n{\n  int header= *structSpec;\n  DPRINTF((\"ffiCanReturn %p %d\\n\", structSpec, specSize));\n  if (header & FFIFlagPointer)\n    return 1;\n  if (header & FFIFlagStructure)\n    {\n      /* structs are always returned as pointers to hidden structures */\n      int structSize= header & FFIStructSizeMask;\n      structReturnValue= malloc(structSize);\n      if (!structReturnValue)\n\treturn 0;\n      pushGPR((int)structReturnValue);\n    }\n  return 1;\n}\n\n\ndouble ffiReturnFloatValue(void)\t{ return floatReturnValue; }\nint    ffiLongLongResultLow(void)\t{ return ((int *)&longReturnValue)[1]; }\nint    ffiLongLongResultHigh(void)\t{ return ((int *)&longReturnValue)[0]; }\n\n\nint ffiStoreStructure(int address, int structSize)\n{\n  DPRINTF((\"ffiStoreStructure %08x %d\\n\", address, structSize));\n  memcpy((void *)address,\n\t structReturnValue ? (void *)structReturnValue : (void *)&longReturnValue,\n\t structSize);\n  return 1;\n}\n\n\nint ffiCleanup(void)\n{\n  int i;\n  DPRINTF((\"ffiCleanup\\n\"));\n  for (i= 0;  i < stringCount;  ++i)\n    free(strings[i]);\n  stringCount= 0;\n  if (structReturnValue)\n    {\n      free(structReturnValue);\n      structReturnValue= 0;\n    }\n  return 1;\n}\n\n\nint ffiCallAddressOfWithPointerReturn(int fn, int callType)\n{\n  DPRINTF((\"ffiCallAddressOfWithPointerReturn %08x %d\\n\", fn, callType));\n  return ffiCallAddressOf((void *)fn, (void *)&global);\n}\n\n\nint ffiCallAddressOfWithStructReturn(int fn, int callType, int* structSpec, int specSize)\n{\n  DPRINTF((\"ffiCallAddressOfWithStructReturn %08x %d %p %d\\n\",\n\t   fn, callType, structSpec, specSize));\n  return ffiCallAddressOf((void *)fn, (void *)&global);\n}\n\n\nint ffiCallAddressOfWithReturnType(int fn, int callType, int typeSpec)\n{\n  DPRINTF((\"ffiCallAddressOfWithReturnType %08x %d %d\\n\", fn, callType, typeSpec));\n  return ffiCallAddressOf((void *)fn, (void *)&global);\n}\n\n\n#if !defined(NO_FFI_TEST)\n\n#undef gprCount\n#undef fprCount\n#undef stackIndex\n#undef structReturnValue\n#undef longReturnValue\n#undef floatReturnValue\n#undef gprs\n#undef fprs\n#undef stack\n\n#include \"ppc-global.h\"\n\n#define offset(field)\t((char *)&global._##field - (char *)&global._gprCount)\n\n#include <assert.h>\n\nvoid ffiDoAssertions(void)\n{\n  assert(gprCount\t\t== offset(gprCount));\n  assert(fprCount\t\t== offset(fprCount));\n  assert(stackIndex\t\t== offset(stackIndex));\n  assert(structReturnValue\t== offset(structReturnValue));\n  assert(longReturnValue\t== offset(longReturnValue));\n  assert(floatReturnValue\t== offset(floatReturnValue));\n  assert(gprs\t\t\t== offset(gprs));\n  assert(fprs\t\t\t== offset(fprs));\n  assert(stack\t\t\t== offset(stack));\n\n  assert(stack + (ARG_MAX * sizeof(int)) == sizeof(global));\n}\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/SqueakFFIPrims/ppc-global.h",
    "content": "#define\tgprCount\t\t( 0)\n#define\tfprCount\t\t( 4)\n#define stackIndex\t\t( 8)\n#define structReturnValue\t(12)\n#define longReturnValue\t\t(16)\n#define floatReturnValue\t(24)\n#define gprs\t\t\t(32)\n#define fprs\t\t\t(32 + 4*GPR_MAX)\n#define stack\t\t\t(32 + 4*GPR_MAX + 8*FPR_MAX)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/SqueakFFIPrims/ppc-sysv-asm.S",
    "content": "/* ppc-sysv-asm.S -- PowerPC FFI trampoline for SVr4-like ABIs\t\t-*- asm -*-\n *\n * Author: Ian.Piumarta@INRIA.Fr\n *\n * Last edited:\t2003-01-28 11:32:14 by piumarta on emilia.inria.fr\n *\n *   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *      You are NOT ALLOWED to distribute modified versions of this file\n *      under its original name.  If you modify this file then you MUST\n *      rename it before making your modifications available publicly.\n * \n *   This file is distributed in the hope that it will be useful, but WITHOUT\n *   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n *   FITNESS FOR A PARTICULAR PURPOSE.\n *   \n *   You may use and/or distribute this file ONLY as part of Squeak, under\n *   the terms of the Squeak License as described in `LICENSE' in the base of\n *   this distribution, subject to the following additional restrictions:\n * \n *   1. The origin of this software must not be misrepresented; you must not\n *      claim that you wrote the original software.  If you use this software\n *      in a product, an acknowledgment to the original author(s) (and any\n *      other contributors mentioned herein) in the product documentation\n *      would be appreciated but is not required.\n * \n *   2. You must not distribute (or make publicly available by any\n *      means) a modified copy of this file unless you first rename it.\n * \n *   3. This notice must not be removed or altered in any source distribution.\n * \n *   Using (or modifying this file for use) in any context other than Squeak\n *   changes these copyright conditions.  Read the file `COPYING' in the\n *   directory `platforms/unix/doc' before proceeding with any such use.\n */\n\n#define r0 0\n#define sp 1\n#define r2 2\n#define r3 3\n#define r4 4\n#define r5 5\n#define r6 6\n#define r7 7\n#define r8 8\n#define r9 9\n#define r10 10\n#define r11 11\n#define r12 12\n#define f1 1\n#define f2 2\n#define f3 3\n#define f4 4\n#define f5 5\n#define f6 6\n#define f7 7\n#define f8 8\n#define f9 9\n#define f10 10\n#define f11 11\n#define f12 12\n#define f13 13\n\n/* V.4 stack frames look like this (higher addresses first):\n\n      old SP--> | back chain to caller's caller         |\n                | Save area for FP registers (F)        | 8+P+A+V+L+X+C+G\n                | Save area for GP registers (G)        | 8+P+A+V+L+X+C\n                | saved CR (C)                          | 8+P+A+V+L+X\n                | Float/int conversion temporary (X)    | 8+P+A+V+L\n                | Local variable space (L)              | 8+P+A+V\n                | Varargs save area (V)                 | 8+P+A\n                | Alloca space (A)                      | 8+P\n                | Parameter save area (P)               | 8\n                | caller's saved LR                     | 4\n          SP--> | back chain to caller                  | 0\n*/\n\t\n#define fn\tr3\n#define ngpr\tr4\n#define nfpr\tr5\n#define nparam\tr6\n\n\t.text\n\t.globl\tffiCallAddressOf\n\nffiCallAddressOf:\n\tstwu\tsp, -16(sp)\t\t\t// push trampoline frame\n\tmflr\tr0\n\tstw\tr0, 20(sp)\n        mfcr\tr0\n        stw\tr0, 12(sp)\t\t\t// saved ccr\n\tmtlr\tfn\t\t\t\t// destination fn address\n\tslwi\tr10, nparam, 2\t\t\t// param save area size\n\taddi\tr10, r10, 16+15\t\t\t// round to quad word\n\trlwinm\tr10, r10, 0,0,27\n\tneg\tr10, r10\n\tstwux\tsp, sp, r10\t\t\t// push ffi caller frame\n\tcmpwi\tnparam, 0\t\t\t// have params?\n\tbeq+\t2f\n\tmtctr\tnparam\t\t\t\t// words to move\n\tlis\tr10, (ffiStack-4)@ha\n\tla\tr10, (ffiStack-4)@l(r10)\t// ffi param stack - 4\n\taddi\tr11, sp, 4\t\t\t// param save area - 4\n1:\tlwzu\tr0, 4(r10)\t\t\t// copy param save area\n\tstwu\tr0, 4(r11)\n\tbdnz\t1b\n2:\tcmpwi\tnfpr, 0\n\tbeq+\t4f\t\t\t\t// no fp args\n\tlis\tr11, ffiFPRs@ha\n\tla\tr11, ffiFPRs@l(r11)\n\tcmpwi\tnfpr, 4\n\tble+\t3f\n\tlfd\tf5,  32(r11)\n\tlfd\tf6,  40(r11)\n\tlfd\tf7,  48(r11)\n\tlfd\tf8,  56(r11)\n3:\tlfd\tf1,   0(r11)\n\tlfd\tf2,   8(r11)\n\tlfd\tf3,  16(r11)\n\tlfd\tf4,  24(r11)\n4:\tcmpwi\tngpr, 0\n\tbeq-\t6f\t\t\t\t// no int args\n\tlis\tr11, ffiGPRs@ha\n\tla\tr11, ffiGPRs@l(r11)\n\tcmpwi\tngpr, 4\n\tble+\t5f\n\tlwz\tr7,  16(r11)\n\tlwz\tr8,  20(r11)\n\tlwz\tr9,  24(r11)\n\tlwz\tr10, 28(r11)\n5:\tlwz\tr3,   0(r11)\n\tlwz\tr4,   4(r11)\n\tlwz\tr5,   8(r11)\n\tlwz\tr6,  12(r11)\n6:\tblrl\t\t\t\t\t// callout\n\tlwz\tsp, 0(sp)\t\t\t// pop ffi caller frame\n\tlis\tr5, ffiLongReturnValue@ha\n\tla\tr5, ffiLongReturnValue@l(r5)\n\tstw\tr3, 0(r5)\n\tstw\tr4, 4(r5)\n\tlis\tr5, ffiFloatReturnValue@ha\n\tstfd\tf1, ffiFloatReturnValue@l(r5)\n\tlwz\tr0, 20(sp)\n \tmtlr\tr0\n        lwz\tr0, 12(sp)\t\t\t// saved ccr\n        mtcr\tr0\n\taddi\tsp, sp, 16\t\t\t// pop trampoline frame\n\tblr\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/SqueakFFIPrims/ppc-sysv.c",
    "content": "/* ppc-sysv.c -- FFI support for PowerPC SVr4 ABI\n * \n * Author: Ian.Piumarta@INRIA.Fr\n * \n * Last edited: 2003-01-30 00:18:07 by piumarta on emilia.inria.fr\n * \n *   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n *\n * BUGS:\n * \n *   Because of the way strings and structs are handled, this implementation\n *   is neither reentrant nor thread safe.\n *\n * References:\n * \n *   System V Application Binary Interface, Third Edition,\n *\tUnix System Laboratories, 1994, ISBN 0-13-100439-5.\n * \n *   System V Application Binary Interface, PowerPC Processor Supplement,\n *\tSun Microsystems and IBM, 1995.\n */\n\n/* Differences between the SVr4 PPC ABI and the implementation found on\n * GNU-based systems (which is implemented herein):\n * \n *   Float arguments are passed as doubles when in registers but as\n *   floats when on the stack.  (The ABI says they should always be\n *   passed as doubles, even on the stack.)\n * \n *   All structures are passed by reference (to a copy), even when\n *   small (< 8 bytes).  The ABI would have small structs passed in\n *   registers.  (GCC copies such structs to the top of the param save\n *   area, after the actual arguments, at the start of the alloca\n *   area.  The implementation in this file copies them into a\n *   temporary static array, which makes stack management simpler\n *   and seems to work just fine.)\n *   \n *   Structures are always returned via a pointer to caller-allocated\n *   memory (passed as a hidden first argument), even when small.\n *   (The ABI would have small structs, < 8 bytes, returned in r3 and\n *   r4.)\n */\n\n#include \"sq.h\"\n#include \"sqFFI.h\"\n\n#include <stdio.h>\n#include <stdlib.h>\n\n#ifndef LONGLONG\n# define LONGLONG long long\n#endif\n\n#if 0\n# define DPRINTF(ARGS)\tprintf ARGS\n#else\n# define DPRINTF(ARGS)\n#endif\n\n#if defined(FFI_TEST)\n  static int primitiveFail(void) { puts(\"primitive fail\"); exit(1); return 0; }\n#else\n  extern struct VirtualMachine *interpreterProxy;\n# define primitiveFail() interpreterProxy->primitiveFail()\n#endif\n\nenum {\n  GPR_MAX=   8,\n  FPR_MAX=   8,\n  ARG_MAX= 512\n};\n\n       int\t ffiGPRs[GPR_MAX];\nstatic int\t gprCount= 0;\n       double\t ffiFPRs[FPR_MAX];\nstatic int\t fprCount= 0;\n\n       int\t ffiStack[ARG_MAX];\nstatic int\t stackIndex= 0;\n\nstatic char\t*strings[ARG_MAX];\nstatic int\t stringCount= 0;\n\nstatic char\t structs[ARG_MAX * sizeof(int)];\nstatic int\t structCount= 0;\n\n       LONGLONG\t ffiLongReturnValue;\n       double\t ffiFloatReturnValue;\nstatic int\t*structReturnValue= 0;\n\n\nextern int ffiCallAddressOf(void *addr, int nGPR, int nFPR, int nStack);\n\n\nint ffiInitialize(void)\n{\n  stackIndex= gprCount= fprCount= structCount= 0;\n  ffiFloatReturnValue= 0.0;\n  return 1;\n}\n\n\nint ffiSupportsCallingConvention(int callType)\n{\n  return (callType == FFICallTypeCDecl)\n    ||   (callType == FFICallTypeApi);\n}\n\n\nint ffiAlloc(int byteSize)\n{\n  return (int)malloc(byteSize);\n}\n\n\nint ffiFree(int ptr)\n{\n  if (ptr) free((void *)ptr);\n  return 1;\n}\n\n\n#define checkStack()\t\t\t\t\\\n  if (stackIndex >= ARG_MAX)\t\t\\\n    return primitiveFail()\n\n#define checkGPR()\t\t\t\t\t\t\\\n  if ((gprCount >= GPR_MAX) && (stackIndex >= ARG_MAX))\t\\\n    return primitiveFail()\n\n#define qalignStack()\tstackIndex += (stackIndex & 1)\n\n#define pushGPR(value)\t\t\t\t\\\n  checkGPR();\t\t\t\t\t\\\n  if (gprCount < GPR_MAX)\t\t\t\\\n    ffiGPRs[gprCount++]= value;\t\t\t\\\n  else\t\t\t\t\t\t\\\n    ffiStack[stackIndex++]= value\n\n#define qalignGPR()\tgprCount += (gprCount & 1)\n\n\nint ffiPushSignedChar(int value)\n{ \n  DPRINTF((\"ffiPushSignedChar %d\\n\", value));\n  pushGPR(value);\n  return 1;\n}\n\n\nint ffiPushUnsignedChar(int value) \n{ \n  DPRINTF((\"ffiPushUnsignedChar %d\\n\", value));\n  pushGPR(value);\n  return 1;\n}\n\n\nint ffiPushSignedByte(int value) \n{ \n  DPRINTF((\"ffiPushSignedByte %d\\n\", value));\n  pushGPR(value);\n  return 1;\n}\n\n\nint ffiPushUnsignedByte(int value)\n{ \n  DPRINTF((\"ffiPushUnsignedByte %d\\n\", value));\n  pushGPR(value);\n  return 1;\n}\n\n\nint ffiPushSignedShort(int value)\n{ \n  DPRINTF((\"ffiPushSignedShort %d\\n\", value));\n  pushGPR(value); \n  return 1; \n}\n\n\nint ffiPushUnsignedShort(int value) \n{ \n  DPRINTF((\"ffiPushUnsignedShort %d\\n\", value));\n  pushGPR(value); \n  return 1; \n}\n\n\nint ffiPushSignedInt(int value) \n{ \n  DPRINTF((\"ffiPushSignedInt %d\\n\", value));\n  pushGPR(value); \n  return 1; \n}\n\n\nint ffiPushUnsignedInt(int value) \n{ \n  DPRINTF((\"ffiPushUnsignedInt %d\\n\", value));\n  pushGPR(value);\n  return 1;\n}\n\n\nint ffiPushSignedLongLong(int low, int high)\n{\n  DPRINTF((\"ffiPushSignedLongLong %d %d\\n\", low, high));\n  qalignGPR();\n  qalignStack();\n  pushGPR(high);\n  pushGPR(low);\n  return 1;\n}\n\n\nint ffiPushUnsignedLongLong(int low, int high)\n{ \n  DPRINTF((\"ffiPushUnsignedLongLong %d %d\\n\", low, high));\n  qalignGPR();\n  qalignStack();\n  pushGPR(high);\n  pushGPR(low);\n  return 1;\n}\n\n\nint ffiPushPointer(int pointer)\n{\n  DPRINTF((\"ffiPushPointer %d\\n\", pointer));\n  pushGPR(pointer);\n  return 1;\n}\n\n\n#define checkFPR()\t\t\t\t\t\\\n  if ((fprCount >= FPR_MAX) && (stackIndex >= ARG_MAX))\t\\\n    return primitiveFail()\n\n#define dalignStack()\tstackIndex += (stackIndex & 1)\n\n\nint ffiPushSingleFloat(double value)\n{\n  DPRINTF((\"ffiPushSingleFloat %f\\n\", (float)value));\n  if (fprCount < FPR_MAX)\n    ffiFPRs[fprCount++]= value;\n  else\n    {\n      float floatValue= (float)value;\n      checkStack();\n      ffiStack[stackIndex++]= *(int *)&floatValue;\n    }\n  return 1;\n}\n\n\nint ffiPushDoubleFloat(double value)\n{\n  DPRINTF((\"ffiPushDoubleFloat %f\\n\", (float)value));\n  if (fprCount < FPR_MAX)\n    ffiFPRs[fprCount++]= value;\n  else\n    {\n      dalignStack();\n      checkStack();\n      ffiStack[stackIndex++]= ((int *)(&value))[0];\n      checkStack();\n      ffiStack[stackIndex++]= ((int *)(&value))[1];\n    }\n  return 1;\n}\n\n\nint ffiPushStringOfLength(int srcIndex, int length)\n{\n  char *ptr;\n  DPRINTF((\"ffiPushStringOfLength %d\\n\", length));\n  checkGPR();\n  ptr= (char *)malloc(length + 1);\n  if (!ptr)\n    return primitiveFail();\n  memcpy(ptr, (void *)srcIndex, length);\n  ptr[length]= '\\0';\n  strings[stringCount++]= ptr;\n  pushGPR((int)ptr);\n  return 1;\n}\n\n\n#define salign(size)\t\t\t\t\t\\\n  structCount= (structCount + (size) - 1) & ~(size)\n\n#define pushStruct(type, value)\t\t\t\t\\\n{\t\t\t\t\t\t\t\\\n  DPRINTF((\"  ++ \"#type\"\\n\"));\t\t\t\t\\\n  if ((structCount + sizeof(type)) > sizeof(structs))\t\\\n    return primitiveFail();\t\t\t\t\\\n  *(type *)(structs + structCount)= value;\t\t\\\n  structCount += sizeof(type);\t\t\t\t\\\n}\n\n\nint ffiPushStructureOfLength(int pointer, int *structSpec, int specSize)\n{\n  int size= *structSpec & FFIStructSizeMask;\n  DPRINTF((\"ffiPushStructureOfLength %d (%db)\\n\", specSize, size));\n  salign(16);\n  if (structCount + size > sizeof(structs))\n    return primitiveFail();\n  ffiPushPointer((int)(structs + structCount));\n  memcpy((void *)(structs + structCount), (void *)pointer, size);\n  structCount += size;\n  return 1;\n}\n\n\n/* answer true if the support code can return the given type.\n */\nint ffiCanReturn(int *structSpec, int specSize)\n{\n  int header= *structSpec;\n  if (header & FFIFlagPointer)\n    return 1;\n  if (header & FFIFlagStructure)\n    {\n      /* structs are always returned as pointers to hidden structures */\n      int structSize= header & FFIStructSizeMask;\n      structReturnValue= malloc(structSize);\n      if (!structReturnValue)\n\treturn 0;\n      pushGPR((int)structReturnValue);\n    }\n  return 1;\n}\n\n\ndouble ffiReturnFloatValue(void)\t{ return ffiFloatReturnValue; }\nint    ffiLongLongResultLow(void)\t{ return ((int *)&ffiLongReturnValue)[1]; }\nint    ffiLongLongResultHigh(void)\t{ return ((int *)&ffiLongReturnValue)[0]; }\n\n\nint ffiStoreStructure(int address, int structSize)\n{\n  memcpy((void *)address, (void *)structReturnValue, structSize);\n  return 1;\n}\n\n\nint ffiCleanup(void)\n{\n  int i;\n  for (i= 0;  i < stringCount;  ++i)\n    free(strings[i]);\n  stringCount= 0;\n  if (structReturnValue)\n    {\n      free(structReturnValue);\n      structReturnValue= 0;\n    }\n  return 1;\n}\n\n\nint ffiCallAddressOfWithPointerReturn(int fn, int callType)\n{\n  return ffiCallAddressOf((void *)fn, gprCount, fprCount, stackIndex);\n}\n\n\nint ffiCallAddressOfWithStructReturn(int fn, int callType, int* structSpec, int specSize)\n{\n  return ffiCallAddressOf((void *)fn, gprCount, fprCount, stackIndex);\n}\n\n\nint ffiCallAddressOfWithReturnType(int fn, int callType, int typeSpec)\n{\n  return ffiCallAddressOf((void *)fn, gprCount, fprCount, stackIndex);\n}\n\n\n#if defined(FFI_TEST)\n\nvoid ffiDoAssertions(void)\n{\n}\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/SqueakFFIPrims/x86-sysv-asm.S",
    "content": "/* x86-sysv-asm.S -- 386 FFI trampoline for SVr4-like ABIs\t-*- asm -*-\n *\n * Author: Ian.Piumarta@INRIA.Fr\n *\n * Last edited: Tue Jan 28 16:53:52 2003 by piumarta (Ian Piumarta) on xombul\n *\n *   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *      You are NOT ALLOWED to distribute modified versions of this file\n *      under its original name.  If you modify this file then you MUST\n *      rename it before making your modifications available publicly.\n * \n *   This file is distributed in the hope that it will be useful, but WITHOUT\n *   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n *   FITNESS FOR A PARTICULAR PURPOSE.\n *   \n *   You may use and/or distribute this file ONLY as part of Squeak, under\n *   the terms of the Squeak License as described in `LICENSE' in the base of\n *   this distribution, subject to the following additional restrictions:\n * \n *   1. The origin of this software must not be misrepresented; you must not\n *      claim that you wrote the original software.  If you use this software\n *      in a product, an acknowledgment to the original author(s) (and any\n *      other contributors mentioned herein) in the product documentation\n *      would be appreciated but is not required.\n * \n *   2. You must not distribute (or make publicly available by any\n *      means) a modified copy of this file unless you first rename it.\n * \n *   3. This notice must not be removed or altered in any source distribution.\n * \n *   Using (or modifying this file for use) in any context other than Squeak\n *   changes these copyright conditions.  Read the file `COPYING' in the\n *   directory `platforms/unix/doc' before proceeding with any such use.\n */\n\n\t.text\n\t.globl\tffiCallAddressOf\n\nffiCallAddressOf:\t/* 8=addr, 12=stack, 16=stackSize */\n\tpushl\t%ebp\n\tmovl\t%esp, %ebp\n\tmovl\t16(%ebp), %ecx\n\ttestl\t%ecx, %ecx\n\tje\t2f\n\tsubl\t%ecx, %esp\n\tsubl\t$4, %ecx\n\tmovl\t12(%ebp), %edx\n1:\tmovl\t(%edx,%ecx,1), %eax\n\tmovl\t%eax, (%esp,%ecx,1)\n\tsubl\t$4, %ecx\n\tjnc\t1b\n2:\tcall\t*8(%ebp)\n\tmovl\t%eax, ffiIntReturnValue\n\tmovl\t%edx, ffiLongReturnValue\n\tfstl\tffiFloatReturnValue\n\tmovl\t%ebp, %esp\n\tpopl\t%ebp\n\tret\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/SqueakFFIPrims/x86-sysv.c",
    "content": "/* ppc-sysv.c -- FFI support for PowerPC SVr4 ABI\n * \n * Author: Ian.Piumarta@INRIA.Fr\n * \n * Last edited: 2003-02-06 20:08:58 by piumarta on felina.inria.fr\n * \n *   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n *\n * BUGS:\n * \n *   Because of the way strings and structs are handled, this implementation\n *   is neither reentrant nor thread safe.\n */\n\n#include \"sq.h\"\n#include \"sqFFI.h\"\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <sys/param.h>\n\n#ifndef LONGLONG\n# define LONGLONG long long\n#endif\n\n#if 0\n# define DPRINTF(ARGS)printf ARGS\n#else\n# define DPRINTF(ARGS)\n#endif\n\n#if defined(FFI_TEST)\n  static int primitiveFail(void) { puts(\"primitive fail\"); exit(1); return 0; }\n#else\n  extern struct VirtualMachine *interpreterProxy;\n# define primitiveFail() interpreterProxy->primitiveFail()\n#endif\n\nenum { FFI_MAX_STACK= 512 };\n\nint\t ffiStack[FFI_MAX_STACK];\nint\t ffiStackIndex= 0;\n\nstatic char\t*ffiTempStrings[FFI_MAX_STACK];\nstatic int\t ffiTempStringCount= 0;\n\n\nint\t ffiIntReturnValue;\nint\t ffiLongReturnValue;\ndouble\t ffiFloatReturnValue;\nint\t*ffiStructReturnValue;\n\n\nextern int ffiCallAddressOf(void *addr, void *stack, int size);\n\n\nstatic FILE *ffiLogFile = NULL;\n\nint ffiLogFileNameOfLength(void *nameIndex, int nameLength) {\n  char fileName[MAXPATHLEN];\n  FILE *fp;\n\n  if(nameIndex && nameLength) {\n    if(nameLength >= MAXPATHLEN) return 0;\n    strncpy(fileName, nameIndex, nameLength);\n    fileName[nameLength] = 0;\n    /* attempt to open the file and if we can't fail */\n    fp = fopen(fileName, \"at\");\n    if(fp == NULL) return 0;\n    /* close the old log file if needed and use the new one */\n    if(ffiLogFile) fclose(ffiLogFile);\n    ffiLogFile = fp;\n    fprintf(ffiLogFile, \"------- Log started -------\\n\");\n    fflush(fp);\n  } else {\n    if(ffiLogFile) fclose(ffiLogFile);\n    ffiLogFile = NULL;\n  }\n  return 1;\n}\n\nint ffiLogCallOfLength(void *nameIndex, int nameLength) {\n    if(ffiLogFile == NULL) return 0;\n    fprintf(ffiLogFile, \"%.*s\\n\", nameIndex, nameLength);\n    fflush(ffiLogFile);\n}\n\n\nint ffiInitialize(void)\n{\n  ffiStackIndex= 0;\n  ffiFloatReturnValue= 0.0;\n  return 1;\n}\n\n\nint ffiSupportsCallingConvention(int callType)\n{\n  return (callType == FFICallTypeCDecl)\n    ||   (callType == FFICallTypeApi);\n}\n\n\nint ffiAlloc(int byteSize)\n{\n  return (int)malloc(byteSize);\n}\n\n\nint ffiFree(int ptr)\n{\n  if (ptr) free((void *)ptr);\n  return 1;\n}\n\n\n#define checkStack()\t\t\t\t\\\n  if (ffiStackIndex >= FFI_MAX_STACK)\t\t\\\n     return primitiveFail();\n\n#define pushInt(value)\t\t\t\t\\\n  checkStack();\t\t\t\t\t\\\n  ffiStack[ffiStackIndex++]= (value)\n\n\nint ffiCanReturn(int *structSpec, int specSize)\n{\n  int header= *structSpec;\n  if (header & FFIFlagPointer)\n    return 1;\n  if (header & FFIFlagStructure)\n    {\n      /* structs are always returned as pointers to hidden structures */\n      int structSize= header & FFIStructSizeMask;\n      ffiStructReturnValue= malloc(structSize);\n      if (!ffiStructReturnValue)\n\treturn 0;\n      pushInt((int)ffiStructReturnValue);\n    }\n  return 1;\n}\n\n\nint ffiPushSignedChar(int value)\n{ \n  DPRINTF((\"ffiPushSignedChar %d\\n\", value));\n  pushInt(value);\n  return 1; \n}\n\nint ffiPushUnsignedChar(int value)\n{ \n  DPRINTF((\"ffiPushUnsignedChar %d\\n\", value));\n  pushInt(value);\n  return 1; \n}\n\nint ffiPushSignedByte(int value)\n{ \n  DPRINTF((\"ffiPushSignedByte %d\\n\", value));\n  pushInt(value);\n  return 1; \n}\n\nint ffiPushUnsignedByte(int value)\n{ \n  DPRINTF((\"ffiPushUnsignedByte %d\\n\", value));\n  pushInt(value);\n  return 1; \n}\n\nint ffiPushSignedShort(int value)\n{ \n  DPRINTF((\"ffiPushSignedShort %d\\n\", value));\n  pushInt(value);\n  return 1; \n}\n\nint ffiPushUnsignedShort(int value)\n{ \n  DPRINTF((\"ffiPushUnsignedShort %d\\n\", value));\n  pushInt(value);\n  return 1; \n}\n\nint ffiPushSignedInt(int value)\n{ \n  DPRINTF((\"ffiPushSignedInt %d\\n\", value));\n  pushInt(value);\n  return 1; \n}\n\nint ffiPushUnsignedInt(int value)\n{ \n  DPRINTF((\"ffiPushUnsignedInt %d\\n\", value));\n  pushInt(value);\n  return 1; \n}\n\nint ffiPushSignedLongLong(int low, int high)\n{ \n  DPRINTF((\"ffiPushSignedLongLong %d %d\\n\", low, high));\n  pushInt(low);\n  pushInt(high);\n  return 1; \n}\n\nint ffiPushUnsignedLongLong(int low, int high)\n{ \n  DPRINTF((\"ffiPushUnsignedLongLong %d %d\\n\", low, high));\n  pushInt(low);\n  pushInt(high);\n  return 1; \n}\n\nint ffiPushPointer(int pointer)\n{ \n  DPRINTF((\"ffiPushPointer %d\\n\", pointer));\n  pushInt(pointer);\n  return 1; \n}\n\nint ffiPushSingleFloat(double value)\n{ \n  float f= (float)value;\n  DPRINTF((\"ffiPushSingleFloat %f\\n\", value));\n  pushInt(*(int *)&f);\n  return 1; \n}\n\nint ffiPushDoubleFloat(double value)\n{ \n  DPRINTF((\"ffiPushDoubleFloat %f\\n\", value));\n  pushInt(((int *)&value)[0]);\n  pushInt(((int *)&value)[1]);\n  return 1; \n}\n\nint ffiPushStringOfLength(int srcIndex, int length)\n{\n  char *ptr;\n  DPRINTF((\"ffiPushStringOfLength %d\\n\", length));\n  checkStack();\n  ptr= (char *)malloc(length + 1);\n  if (!ptr)\n    return primitiveFail();\n  DPRINTF((\"  ++ alloc string\\n\"));\n  memcpy(ptr, (void *)srcIndex, length);\n  ptr[length]= '\\0';\n  ffiTempStrings[ffiTempStringCount++]= ptr;\n  pushInt((int)ptr);\n  return 1;\n}\n\nint ffiPushStructureOfLength(int pointer, int *structSpec, int specSize)\n{\n  int lbs= *structSpec & FFIStructSizeMask;\n  int size= (lbs + sizeof(int) - 1) / sizeof(int);\n  DPRINTF((\"ffiPushStructureOfLength %d (%db %dw)\\n\", specSize, lbs, size));\n  if (ffiStackIndex + size > FFI_MAX_STACK)\n    return primitiveFail();\n  memcpy((void *)(ffiStack + ffiStackIndex), (void *)pointer, lbs);\n  ffiStackIndex += size;\n  return 1;\n}\n\n\ndouble  ffiReturnFloatValue(void)\t{ return ffiFloatReturnValue; }\nint\tffiLongLongResultLow(void)\t{ return ffiIntReturnValue; }\nint\tffiLongLongResultHigh(void)\t{ return ffiLongReturnValue; }\n\n\nint ffiStoreStructure(int address, int structSize)\n{\n  DPRINTF((\"ffiStoreStructure %d %d\\n\", address, structSize));\n  memcpy((void *)address, (ffiStructReturnValue\n\t\t\t   ? (void *)ffiStructReturnValue\n\t\t\t   : (void *)&ffiIntReturnValue),\n\t structSize);\n  return 1;\n}\n\n\nint ffiCleanup(void)\n{\n  int i;\n  DPRINTF((\"ffiCleanup\\n\"));\n  for (i= 0;  i < ffiTempStringCount;  ++i)\n    {\n      DPRINTF((\"  ++ free string\\n\"));\n      free(ffiTempStrings[i]);\n    }\n  ffiTempStringCount= 0;\n  if (ffiStructReturnValue)\n    {\n      DPRINTF((\"  ++ free struct\\n\"));\n      free(ffiStructReturnValue);\n      ffiStructReturnValue= 0;\n    }\n  return 1;\n}\n\n\nint ffiCallAddressOfWithPointerReturn(int fn, int callType)\n{\n  return ffiCallAddressOf((void *)fn, (void *)ffiStack,\n\t\t\t  ffiStackIndex * sizeof(int));\n}\n\nint ffiCallAddressOfWithStructReturn(int fn, int callType, int* structSpec, int specSize)\n{\n  return ffiCallAddressOf((void *)fn, (void *)ffiStack,\n\t\t\t  ffiStackIndex * sizeof(int));\n}\n\nint ffiCallAddressOfWithReturnType(int fn, int callType, int typeSpec)\n{\n  return ffiCallAddressOf((void *)fn, (void *)ffiStack,\n\t\t\t  ffiStackIndex * sizeof(int));\n}\n\n\n#if defined(FFI_TEST)\nvoid ffiDoAssertions(void) {}\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/UUIDPlugin/Makefile.inc",
    "content": "XCFLAGS=-DHAVE_UUID_UUID_H=1\nXLDFLAGS = $(LIB_UUID)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/UUIDPlugin/acinclude.m4",
    "content": "# -*- sh -*-\n\nAC_MSG_CHECKING([for UUID support])\nAC_TRY_COMPILE([#include <uuid/uuid.h>],[uuid_generate;],[\n  AC_MSG_RESULT(yes)\n  AC_CHECK_LIB(uuid, uuid_generate,\n    LIB_UUID=\"-luuid\"\n  )\n],[\n  AC_MSG_RESULT(no)\n  AC_PLUGIN_DISABLE\n])\n\nAC_SUBST(LIB_UUID)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/UUIDPlugin/config.cmake",
    "content": "PLUGIN_FIND_INCLUDE (UUID uuid.h /usr/include/uuid)\nCONFIG_DEFINE (HAVE_UUID_H)\n\nPLUGIN_FIND_INCLUDE (SYS_UUID sys/uuid.h)\nCONFIG_DEFINE (HAVE_SYS_UUID_H)\n\nPLUGIN_FIND_LIBRARY (UUID uuid)\n\nIF (HAVE_LIBUUID)\n  SET (CMAKE_REQUIRED_LIBRARIES uuid)\nENDIF (HAVE_LIBUUID)\n\nCHECK_FUNCTION_EXISTS (uuidgen HAVE_UUIDGEN)\nCONFIG_DEFINE (HAVE_UUIDGEN)\n\nCHECK_FUNCTION_EXISTS (uuid_generate HAVE_UUID_GENERATE)\nCONFIG_DEFINE (HAVE_UUID_GENERATE)\n\n# IF (UUID_UUID_GENERATE)\n#   SET (HAVE_UUID_GENERATE 1)\n#   PLUGIN_LINK_LIBRARIES (uuid)\n# ENDIF (UUID_UUID_GENERATE)\n\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/UUIDPlugin/sqUnixUUID.c",
    "content": "#include \"squeak_adapters.h\"\n\n#include \"config.h\"\n\n#if defined(HAVE_SYS_UUID_H)\n# include <sys/types.h>\n# include <sys/uuid.h>\n#endif\n#if defined(HAVE_UUID_UUID_H)\n# include <uuid/uuid.h>\n#endif\n#if defined(HAVE_UUID_H)\n# include <uuid.h>\n#endif\n\n#include \"sq.h\"\n\n\nint MakeUUID(char *location)\n{\n  uuid_t uuid;\n\n#if defined(HAVE_UUIDGEN)\n  uuidgen(&uuid, 1);\n#elif defined(HAVE_UUID_GENERATE)\n  uuid_generate(uuid);\n#endif\n\n  memcpy((void *)location, (void *)&uuid, sizeof(uuid));\n  return 1;\n}\n\n\n#if defined(__linux__)\n\n# include <setjmp.h>\n# include <signal.h>\n\nstatic sigjmp_buf env;\n\nstatic void sigsegvHandler(int signal)\n{\n  siglongjmp(env, 1);\n}\n\nint sqUUIDInit(void)\n{\n  /* check if we get a segmentation fault when using libuuid */\n  int pluginAvailable= 0;\n  struct sigaction originalAction;\n  uuid_t uuid;\n\n  if (!sigsetjmp(env, 1))\n    {\n      struct sigaction newAction;\n      newAction.sa_handler= sigsegvHandler;\n      newAction.sa_flags= 0;\n      sigemptyset(&newAction.sa_mask);\n\t  \n      if (sigaction(SIGSEGV, &newAction, &originalAction))\n\t/* couldn't change the signal handler: give up now */\n\treturn 0;\n      else\n\tpluginAvailable= MakeUUID((char *)&uuid);\n    }\n\n  sigaction(SIGSEGV, &originalAction, NULL);\n\n  return pluginAvailable;\n}\n\n#else /* !__linux__ */\n\nint sqUUIDInit(void)\n{\n  return 1;\n}\n\n#endif /* !__linux__ */\n\n\nint sqUUIDShutdown(void)\n{\n  return 1;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/UnixOSProcessPlugin/Makefile.inc",
    "content": "XCPPFLAGS= -I$(topdir)/platforms/Cross/plugins/FilePlugin -I$(topdir)/platforms/Cross/plugins/SocketPlugin -DSQAIO_H=\\\"sqaio.h\\\"\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/UnixOSProcessPlugin/acinclude.m4",
    "content": "AC_CHECK_FUNC(unsetenv, AC_DEFINE(HAVE_UNSETENV, 1))\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/UnixOSProcessPlugin/build.cmake",
    "content": "EXPECT_UNDEFINED_SYMBOLS ()\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/UnixOSProcessPlugin/config.cmake",
    "content": "PLUGIN_REQUIRE_LIBRARY (PTHREAD pthread)\nPLUGIN_INCLUDE_DIRECTORIES (${cross}/plugins/FilePlugin ${cross}/plugins/SocketPlugin)\nPLUGIN_DEFINITIONS (-DSQAIO_H=\\\"sqaio.h\\\")\n\nCHECK_FUNCTION_EXISTS (unsetenv HAVE_UNSETENV)\n\nCONFIG_DEFINE (HAVE_UNSETENV)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/VideoForLinuxPlugin/Video4Squeak-dgd.8.cs",
    "content": "'From OLPC1.0 of 17 August 2006 [latest update: #1108] on 3 November 2006 at 3:30:07 pm'!\r\"Change Set:\t\tVideo4Squeak-dgd\rDate:\t\t\t3 November 2006\rAuthor:\t\t\tDiego Gomez Deck <DiegoGomezDeck@consultar.com>\r\r\"!\r\rSymbolListType subclass: #ImageResolutionType\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'VideoForSqueak-Morphic'!\r\r!ImageResolutionType commentStamp: 'dgd 8/1/2004 21:04' prior: 0!\rNew type for VideoDevices' eToy vocabulary!\r\rObject subclass: #ParameterDescription\r\tinstanceVariableNames: 'name type label target getSelector options help keepRatio value originalValue'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'VideoForSqueak-Core'!\rUpdatingStringMorph subclass: #UpdatingNumericStringMorph\r\tinstanceVariableNames: 'min max'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'VideoForSqueak-Morphic'!\r\r!UpdatingNumericStringMorph commentStamp: '<historical>' prior: 0!\rSimilar to UpdatingStringMorph, but adds some new features for handling numbers.!\r\rProtoObject subclass: #V4LPlugin\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'VideoForSqueak-Core'!\r\r!V4LPlugin commentStamp: 'dgd 8/1/2004 21:04' prior: 0!\rPlugin to access Video4Linux devices.\r!\r\rObject subclass: #VideoDevice\r\tinstanceVariableNames: 'isSleeping isExecutor brightness contrast implementation lastErrorTimestamp'\r\tclassVariableNames: 'Registry'\r\tpoolDictionaries: ''\r\tcategory: 'VideoForSqueak-Core'!\r\r!VideoDevice commentStamp: 'dgd 8/1/2004 21:06' prior: 0!\rVideoDevice is the access point for Video4Squeak framework.\r\rHow to use:\r\tVideoDevice default.\r\r!\r\rObject subclass: #VideoDeviceImplementor\r\tinstanceVariableNames: 'description'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'VideoForSqueak-Core'!\r\r!VideoDeviceImplementor commentStamp: 'dgd 7/28/2004 17:31' prior: 0!\rThis class is the superclass for the Implementor hierarchy for the Bridge composed with VideoDevice.\r\rVideoDevice holds an implementor and it can be changed on the fly.\r\rIt allows, for instance, to switch the implementor base on the operative system where Squeak is being started.\r!\r\rVideoDeviceImplementor subclass: #TestDeviceImplementor\r\tinstanceVariableNames: 'opened extent type isShowingTime'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'VideoForSqueak-Core'!\rVideoDeviceImplementor subclass: #V4LDeviceImplementor\r\tinstanceVariableNames: 'deviceHandle buffer deviceID desiredExtent desiredPalette'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'VideoForSqueak-Core'!\rObject subclass: #VideoDeviceImplementorDescription\r\tinstanceVariableNames: 'type id name'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'VideoForSqueak-Core'!\rRectangleMorph subclass: #VideoMorph\r\tinstanceVariableNames: 'videoSource form resolution autoExtent configurationDialog'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'VideoForSqueak-Morphic'!\rAlignmentMorph subclass: #VideoMorphConfiguration\r\tinstanceVariableNames: 'target parameters'\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'VideoForSqueak-Morphic'!\rObjectPropertiesMorph subclass: #VideoPropertiesMorph\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'VideoForSqueak-Morphic'!\r\r!ImageResolutionType methodsFor: 'initialization' stamp: 'dgd 7/1/2004 13:30'!\rinitialize\r\t\"initialize the receiver's\"\r\tsuper initialize.\r\t\"\"\r\tself vocabularyName: #ImageResolution.\r\tself symbols: VideoMorph resolutions! !\r\r!ImageResolutionType methodsFor: 'tiles' stamp: 'dgd 8/20/2006 11:30'!\rrepresentsAType\r\t^ true! !\r\r\r!ImageResolutionType class methodsFor: 'class initialization' stamp: 'dgd 8/20/2006 11:44'!\rinitialize\r\tVocabulary initialize! !\r\r\r!ParameterDescription methodsFor: 'creation' stamp: 'dgd 8/10/2004 14:17'!\rasBooleanMorph\r\t| cb lab |\r\tcb := EtoyUpdatingThreePhaseButtonMorph checkBox.\r\tcb\r\t\ttarget: self;\r\t\tactionSelector: #switchValue;\r\t\tgetSelector: #value.\r\thelp isEmpty ifFalse: [cb setBalloonText: help].\r\t\"\"\r\tlab := StringMorph contents: ' ' , label.\r\tlab setBalloonText: help.\r\thelp isEmpty ifFalse: [lab setBalloonText: help].\r\t\"\"\r\t^self inARow: { \r\t\t\t\tcb.\r\t\t\t\tlab}! !\r\r!ParameterDescription methodsFor: 'creation' stamp: 'dgd 8/10/2004 12:36'!\rasExtentMorph\r\t| lab x y kr |\r\tlab := StringMorph contents: label , ': '.\r\thelp isEmpty\r\t\tifFalse: [lab setBalloonText: help].\r\t\"\"\r\tx := UpdatingNumericStringMorph on: self selector: #getPointX.\r\tx putSelector: #setPointX:.\r\tx min: 16.\r\tx max: 640.\r\tx setBalloonText: 'width in pixels' translated.\r\t\"\"\r\ty := UpdatingNumericStringMorph on: self selector: #getPointY.\r\ty putSelector: #setPointY:.\r\ty min: 12.\r\ty max: 480.\r\ty setBalloonText: 'height in pixels' translated.\r\t\"\"\r\tkr := EtoyUpdatingThreePhaseButtonMorph checkBox.\r\tkr target: self;\r\t\t actionSelector: #switchKeepRatio;\r\t\t getSelector: #keepRatio.\r\tkr setBalloonText: 'keep ratio' translated.\r\t\"\"\r\t^ self inARow: {lab. StringMorph contents: ' width=' translated. self inABox: x. StringMorph contents: ' height=' translated. self inABox: y. StringMorph contents: '  '. kr}! !\r\r!ParameterDescription methodsFor: 'creation' stamp: 'dgd 8/10/2004 12:06'!\rasMorph\r\ttype == #boolean\r\t\tifTrue: [^ self asBooleanMorph].\r\ttype == #extent\r\t\tifTrue: [^ self asExtentMorph].\r\ttype == #option\r\t\tifTrue: [^ self asOptionMorph].\r\t\"\"\r\t^ StringMorph contents: 'unknown type: ' , type asString! !\r\r!ParameterDescription methodsFor: 'creation' stamp: 'dgd 8/10/2004 12:33'!\rasOptionMorph\r\t| lab button |\r\tlab := StringMorph contents: label , ': '.\r\thelp isEmpty\r\t\tifFalse: [lab setBalloonText: help].\r\t\"\"\r\tbutton := UpdatingSimpleButtonMorph newWithLabel: '-'.\r\tbutton target: self;\r\t\t wordingSelector: #wordingForOption;\r\t\t actionSelector: #showOptions;\r\r\t\t color: Color white;\r\t\t borderWidth: 1;\r\t\t borderColor: Color black;\r\t\t cornerStyle: #square.\rhelp isEmpty\r\t\tifFalse: [button setBalloonText: help].\r\t\"\"\r\t^ self inARow: {lab. button}! !\r\r!ParameterDescription methodsFor: 'private' stamp: 'dgd 8/10/2004 14:17'!\rgetPointX\r\t^(self value) x! !\r\r!ParameterDescription methodsFor: 'private' stamp: 'dgd 8/10/2004 14:17'!\rgetPointY\r\t^(self value) y! !\r\r!ParameterDescription methodsFor: 'private' stamp: 'dgd 8/9/2004 19:10'!\rinABox: aMorph \r\t\"private - answer a row with the given morphs\"\r\t| box |\r\tbox := AlignmentMorph newRow.\r\tbox color: Color white.\r\tbox borderWidth: 1.\r\tbox borderColor: Color black.\r\t\"\"\r\tbox addMorphBack: aMorph.\r\t\"\"\r\t^ box! !\r\r!ParameterDescription methodsFor: 'private' stamp: 'dgd 8/9/2004 17:38'!\rinARow: aCollection \r\t\"private - answer a row with the given morphs\"\r\t| row |\r\trow := AlignmentMorph newRow.\r\trow color: Color transparent.\r\t\"\"\r\taCollection\r\t\tdo: [:each | row addMorphBack: each].\r\t\"\"\r\t^ row! !\r\r!ParameterDescription methodsFor: 'private' stamp: 'dgd 8/10/2004 14:17'!\rsetPointX: aNumber \r\t| newX currentX newY |\r\tnewX := aNumber asInteger min: 640 max: 16.\r\tcurrentX := self getPointX.\r\tnewX = currentX ifTrue: [^self].\r\tnewY := keepRatio \r\t\t\t\tifTrue: [(newX / currentX * self getPointY) rounded]\r\t\t\t\tifFalse: [self getPointY].\r\t\"\"\r\tself value: newX @ newY! !\r\r!ParameterDescription methodsFor: 'private' stamp: 'dgd 8/10/2004 14:17'!\rsetPointY: aNumber \r\t| newY currentY newX |\r\tnewY := aNumber asInteger min: 480 max: 12.\r\tcurrentY := self getPointY.\r\tnewY = currentY ifTrue: [^self].\r\tnewX := keepRatio \r\t\t\t\tifTrue: [(newY / currentY * self getPointX) rounded]\r\t\t\t\tifFalse: [self getPointX].\r\t\"\"\r\tself value: newX @ newY! !\r\r!ParameterDescription methodsFor: 'private' stamp: 'dgd 8/10/2004 14:17'!\rshowOptions\r\t| menu |\r\tmenu := MenuMorph new.\r\tmenu color: Color white.\r\tmenu borderWidth: 1.\r\tmenu borderColor: Color black.\r\tmenu cornerStyle: #square.\r\toptions do: \r\t\t\t[:pair | \r\t\t\t\"\"\r\r\t\t\tmenu \r\t\t\t\tadd: pair first\r\t\t\t\ttarget: self\r\t\t\t\tselector: #value:\r\t\t\t\targumentList: { \r\t\t\t\t\t\tpair second}].\r\tmenu popUpInWorld! !\r\r!ParameterDescription methodsFor: 'private' stamp: 'dgd 8/10/2004 14:18'!\rwordingForOption\r\t| option wording |\r\toption := self value.\r\twording := options detect: [:pair | pair second = option]\r\t\t\t\tifNone: [^'<unknown option>' translated].\r\t^wording first! !\r\r!ParameterDescription methodsFor: 'accessing' stamp: 'dgd 8/10/2004 20:14'!\rhasChanged\r\t^ value ~= originalValue! !\r\r!ParameterDescription methodsFor: 'accessing' stamp: 'dgd 8/9/2004 20:23'!\rkeepRatio\r\t^keepRatio! !\r\r!ParameterDescription methodsFor: 'accessing' stamp: 'dgd 8/10/2004 20:09'!\rname\r\t\"answer the receiver's name\"\r\t^ name! !\r\r!ParameterDescription methodsFor: 'accessing' stamp: 'dgd 8/9/2004 20:24'!\rswitchKeepRatio\r\tkeepRatio := keepRatio not! !\r\r!ParameterDescription methodsFor: 'accessing' stamp: 'dgd 8/10/2004 14:18'!\rswitchValue\r\tvalue := value not ! !\r\r!ParameterDescription methodsFor: 'accessing' stamp: 'dgd 8/10/2004 14:13'!\rvalue\r^value! !\r\r!ParameterDescription methodsFor: 'accessing' stamp: 'dgd 8/10/2004 14:13'!\rvalue: anObject\r\tvalue _anObject! !\r\r!ParameterDescription methodsFor: 'initialization' stamp: 'dgd 8/9/2004 20:23'!\rinitialize\r\t\"initialize the receiver\"\r\r\r\tkeepRatio := true! !\r\r!ParameterDescription methodsFor: 'initialization' stamp: 'dgd 8/10/2004 20:09'!\rinitializeName: nameSymbol type: typeSymbol label: labelString value: anObject options: aCollection help: helpString \r\t\"initialize the receiver\"\r\tname := nameSymbol.\r\ttype := typeSymbol.\r\tlabel := labelString.\r\tvalue := originalValue := anObject.\r\toptions := aCollection.\r\thelp := helpString! !\r\r\r!ParameterDescription class methodsFor: 'instance creation' stamp: 'dgd 8/10/2004 20:10'!\rbooleanParameterNamed: nameSymbol label: labelString value: anObject help: helpString \r\t^ self new\r\t\tinitializeName: nameSymbol \r\t\ttype: #boolean\r\t\tlabel: labelString\r\t\tvalue: anObject\r\t\toptions: nil\r\t\thelp: helpString! !\r\r!ParameterDescription class methodsFor: 'instance creation' stamp: 'dgd 8/10/2004 20:11'!\rextentParameterNamed: nameSymbol label: labelString value: anObject help: helpString \r\t^ self new\r\t\tinitializeName: nameSymbol\r\t\ttype: #extent\r\t\tlabel: labelString\r\t\tvalue: anObject\r\t\toptions: nil\r\t\thelp: helpString! !\r\r!ParameterDescription class methodsFor: 'instance creation' stamp: 'dgd 8/9/2004 20:13'!\rnew\r\t\"answer a new instance of the receiver\"\r\t^ super new initialize! !\r\r!ParameterDescription class methodsFor: 'instance creation' stamp: 'dgd 8/10/2004 20:12'!\roptionParameterNamed: nameSymbol label: labelString value: anObject options: aCollection help: helpString \r\t^ self new\r\t\tinitializeName: nameSymbol\r\t\ttype: #option\r\t\tlabel: labelString\r\t\tvalue: anObject\r\t\toptions: aCollection\r\t\thelp: helpString! !\r\r\r!Player methodsFor: '*VideoForSqueak-playing commands' stamp: 'dgd 8/9/2004 20:56'!\rconfigureVideoDevice\r\tself sendMessageToCostume: #configureVideoDevice! !\r\r!Player methodsFor: '*VideoForSqueak-slot getters/setters' stamp: 'dgd 8/6/2004 19:54'!\rgetAutoExtent\r\t\"answer whateve the receiver is in auto extent mode\"\r\t^ costume renderedMorph getAutoExtent! !\r\r!Player methodsFor: '*VideoForSqueak-slot getters/setters' stamp: 'dgd 6/30/2004 23:21'!\rgetBrightness\r\t\"Answer the numeric value contained in my costume\"\r\t^ costume renderedMorph getBrightness! !\r\r!Player methodsFor: '*VideoForSqueak-slot getters/setters' stamp: 'dgd 6/30/2004 23:21'!\rgetContrast\r\t\"Answer the numeric value contained in my costume\"\r\t^ costume renderedMorph getContrast! !\r\r!Player methodsFor: '*VideoForSqueak-slot getters/setters' stamp: 'dgd 7/1/2004 18:24'!\rgetLastFrame\r\t\"Answer the lastFrame in my costume\"\r\t^ costume renderedMorph getLastFrame assuredPlayer! !\r\r!Player methodsFor: '*VideoForSqueak-slot getters/setters' stamp: 'dgd 7/1/2004 13:23'!\rgetResolution\r\t\"Answer the numeric value contained in my costume\"\r\t^ costume renderedMorph getResolution! !\r\r!Player methodsFor: '*VideoForSqueak-slot getters/setters' stamp: 'dgd 8/6/2004 19:55'!\rsetAutoExtent: aBoolean \r\t\"Set the receiver's boolean value. This is passed on to the costume\"\r\tcostume renderedMorph setAutoExtent: aBoolean! !\r\r!Player methodsFor: '*VideoForSqueak-slot getters/setters' stamp: 'dgd 6/30/2004 23:22'!\rsetBrightness: amt \r\t\"Set the receiver's numeric value to the amount. This is passed \r\ton to the costume\"\r\tcostume renderedMorph setBrightness: amt! !\r\r!Player methodsFor: '*VideoForSqueak-slot getters/setters' stamp: 'dgd 6/30/2004 23:22'!\rsetContrast: amt \r\t\"Set the receiver's numeric value to the amount. This is passed \r\ton to the costume\"\r\tcostume renderedMorph setContrast: amt! !\r\r!Player methodsFor: '*VideoForSqueak-slot getters/setters' stamp: 'dgd 7/1/2004 13:22'!\rsetResolution: aSymbol \r\t\"Set the receiver's value. This is passed on to the costume\"\r\tcostume renderedMorph setResolution: aSymbol! !\r\r\r!UpdatingNumericStringMorph methodsFor: 'target access' stamp: 'sw 9/13/2002 17:54'!\racceptValueFromTarget: v\r\t\"Accept a value from my target\"\r\r\t^ super acceptValueFromTarget: ((self format == #default and: [v isNumber])\r\t\tifTrue: \r\t\t\t[| t | \r\t\t\tt _ v.\r\t\t\tmin ifNotNil: [t _ t max: min].\r\t\t\tmax ifNotNil: [t _ t min: max]]\r\t\tifFalse:\r\t\t\t[v])! !\r\r!UpdatingNumericStringMorph methodsFor: 'accessing' stamp: 'NS 6/24/2000 16:31'!\rmax\r\t^ max! !\r\r!UpdatingNumericStringMorph methodsFor: 'accessing' stamp: 'NS 6/24/2000 16:31'!\rmax: aNumber\r\tmax _ aNumber! !\r\r!UpdatingNumericStringMorph methodsFor: 'accessing' stamp: 'NS 6/24/2000 16:32'!\rmin\r\t^ min! !\r\r!UpdatingNumericStringMorph methodsFor: 'accessing' stamp: 'NS 6/24/2000 16:31'!\rmin: aNumber\r\tmin _ aNumber! !\r\r\r!V4LPlugin methodsFor: 'primitives' stamp: 'dgd 8/1/2004 20:41'!\rprimitiveDeviceClose\r\t| device |\r\tself export: true. \r\tself var: #device type: 'Device'.\r\tdevice := self\r\t\t\t\tcCoerce: (interpreterProxy stackIntegerValue: 0)\r\t\t\t\tto: 'Device'.\r\tself closeDevice: device.\r\t\"\"\r\tinterpreterProxy pop: 1! !\r\r!V4LPlugin methodsFor: 'primitives' stamp: 'dgd 8/5/2004 22:27'!\rprimitiveDeviceCreate\r\t| palette height width devicePointer deviceID |\r\tself export: true.\r\t\"\"\r\tpalette := interpreterProxy stackIntegerValue: 0.\r\theight := interpreterProxy stackIntegerValue: 1.\r\twidth := interpreterProxy stackIntegerValue: 2.\r\tdeviceID := interpreterProxy stackIntegerValue: 3.\r\t\"\"\r\tdevicePointer := self cCode: '(int) createDevice(deviceID, width, height, palette)'.\r\tdevicePointer <= 0\r\t\tifTrue: [^ interpreterProxy primitiveFail].\r\t\"\"\r\tinterpreterProxy\r\t\tpop: 5\r\t\tthenPush: (interpreterProxy integerObjectOf: devicePointer) ! !\r\r!V4LPlugin methodsFor: 'primitives' stamp: 'dgd 7/29/2004 17:49'!\rprimitiveDeviceDescribe\r\t| deviceID deviceName deviceNamePointer deviceNameSize |\r\tself export: true.\r\tself var: #deviceNamePointer type: 'void*'.\r\t\"\"\r\tdeviceName := interpreterProxy stackValue: 0.\r\t(interpreterProxy isBytes: deviceName)\r\t\tifFalse: [^ interpreterProxy primitiveFail].\r\tdeviceNamePointer := interpreterProxy firstIndexableField: deviceName.\r\tdeviceNameSize := interpreterProxy byteSizeOf: deviceName.\r\tdeviceNameSize = 32\r\t\tifFalse: [^ interpreterProxy primitiveFail].\r\t\"\"\r\tdeviceID := interpreterProxy stackIntegerValue: 1.\r\t\"\"\r\tself cCode: 'describeDevice(deviceID, deviceNamePointer)'.\r\t\"\" \r\tinterpreterProxy pop: 2! !\r\r!V4LPlugin methodsFor: 'primitives' stamp: 'dgd 7/21/2004 17:43'!\rprimitiveDeviceGetHeight\r\t| device result |\r\tself export: true.\r\tself var: #device type: 'Device'.\r\tdevice := self\r\t\t\t\tcCoerce: (interpreterProxy stackIntegerValue: 0)\r\t\t\t\tto: 'Device'.\r\tresult := self cCode: 'device->vwindow.height'.\r\tinterpreterProxy\r\t\tpop: 2\r\t\tthenPush: (interpreterProxy integerObjectOf: result)! !\r\r!V4LPlugin methodsFor: 'primitives' stamp: 'dgd 7/21/2004 17:48'!\rprimitiveDeviceGetWidth\r\t| device result |\r\tself export: true.\r\tself var: #device type: 'Device'.\r\tdevice := self\r\t\t\t\tcCoerce: (interpreterProxy stackIntegerValue: 0)\r\t\t\t\tto: 'Device'.\r\tresult := self cCode: 'device->vwindow.width'.\r\tinterpreterProxy\r\t\tpop: 2\r\t\tthenPush: (interpreterProxy integerObjectOf: result)! !\r\r!V4LPlugin methodsFor: 'primitives' stamp: 'dgd 8/6/2004 14:32'!\rprimitiveDeviceNextFrameIntoBrightnessAndContrast\r\t\"set the capture extent and pixel format to use\"\r\t| contrast brightness bitsArrayPointer bitsArraySize device result dest src imageSize final |\r\tself export: true.\r\tself var: #device type: 'Device'.\r\tself var: #dest type: 'unsigned char*'.\r\tself var: #src type: 'unsigned char*'.\r\tself var: #final type: 'unsigned char*'.\r\tself var: #brightness type: 'double'.\r\tself var: #contrast type: 'double'.\r\t\"\"\r\tcontrast := interpreterProxy stackFloatValue: 0.\r\tbrightness := interpreterProxy stackFloatValue: 1.\r\tbrightness := brightness min: 1.0.\r\tbrightness := brightness max: -1.0.\r\tcontrast := contrast min: 1.0.\r\tcontrast := contrast max: -1.0. \r\t\"\"\r\tbitsArrayPointer := interpreterProxy stackValue: 2.\r\tinterpreterProxy success: (interpreterProxy isPointers: bitsArrayPointer) not.\r\tinterpreterProxy failed\r\t\tifTrue: [^ nil].\r\tbitsArraySize := interpreterProxy byteSizeOf: bitsArrayPointer.\r\t\"\"\r\tdevice := self\r\t\t\t\tcCoerce: (interpreterProxy stackIntegerValue: 3)\r\t\t\t\tto: 'Device'.\r\t\"\"\r\tresult := self nextFrameFromDevice: device.\r\tresult\r\t\tifFalse: [^ interpreterProxy primitiveFail].\r\t\"\"\r\tdest := self\r\t\t\t\tcCoerce: (interpreterProxy firstIndexableField: bitsArrayPointer)\r\t\t\t\tto: 'unsigned char*'.\r\tsrc := self cCode: 'device->buffer24'.\r\t\"\"\r\timageSize := device width * device height * 4.\r\tfinal := dest\r\t\t\t\t+ (imageSize min: bitsArraySize).\r\t\"\"\r\t[dest < final]\r\t\twhileTrue: [| blue green red | \r\t\t\t\"blue\"\r\t\t\tblue := self\r\t\t\t\t\t\tpixel: (src at: 2)\r\t\t\t\t\t\tbrightness: brightness\r\t\t\t\t\t\tcontrast: contrast.\r\t\t\tdest at: 0 put: blue.\r\t\t\t\"green\"\r\t\t\tgreen := self\r\t\t\t\t\t\tpixel: (src at: 1)\r\t\t\t\t\t\tbrightness: brightness\r\t\t\t\t\t\tcontrast: contrast.\r\t\t\tdest at: 1 put: green.\r\t\t\t\"red\"\r\t\t\tred := self\r\t\t\t\t\t\tpixel: (src at: 0)\r\t\t\t\t\t\tbrightness: brightness\r\t\t\t\t\t\tcontrast: contrast.\r\t\t\tdest at: 2 put: red.\r\t\t\t\"alpha\"\r\t\t\tdest at: 3 put: 255.\r\t\t\t\"\"\r\t\t\tdest := dest + 4.\r\t\t\tsrc := src + 3].\r\t\"\"\r\tinterpreterProxy pop: 4! !\r\r!V4LPlugin methodsFor: 'helper functions' stamp: 'dgd 8/5/2004 22:51'!\rheight: device \r\tself inline: true.\r\tself var: #device type: 'Device'.\r\t^ self cCode: 'device->vwindow.height'! !\r\r!V4LPlugin methodsFor: 'helper functions' stamp: 'dgd 8/20/2006 10:45'!\rpixel: pixel brightness: brightness contrast: contrast \r\t| result c |\r\tself inline: true.\r\tself var: #brightness type: 'double'.\r\tself var: #contrast type: 'double'.\r\tself var: #c type: 'double'.\r\t\"contrast\"\r\tc := 1.0 + contrast.\r\tc := c * c.\r\tresult := pixel - 0.5 * c + 0.5.\r\t\"brightness\"\r\tresult := result + (brightness * 256) asInteger.\r\t\"bound checking\"\r\tresult < 0\r\t\tifTrue: [result := 0].\r\tresult > 255\r\t\tifTrue: [result := 255].\r\t^ result asInteger! !\r\r!V4LPlugin methodsFor: 'helper functions' stamp: 'dgd 7/21/2004 21:02'!\rwidth: device \r\tself inline: true.\r\tself var: #device type: 'Device'.\r\t^ self\r\t\tcCode: 'device->vwindow.width'\r\t! !\r\r\r!V4LPlugin class methodsFor: 'translation' stamp: 'dgd 6/26/2004 18:12'!\rhasHeaderFile\r\t\"If there is a single intrinsic header file to be associated with \r\tthe plugin, here is where you want to flag\"\r\t^ true! !\r\r!V4LPlugin class methodsFor: 'translation' stamp: 'dgd 8/5/2004 22:50'!\rtranslate\r\t\" \r\tV4LPlugin translate.\r\t\"\r\t| directory |\r\tdirectory := FileDirectory forFileName: '/home/dgd/squeak-vm37/src/plugins/V4LPlugin/'.\r\tdirectory assureExistence.\r\tself translateInDirectory: directory doInlining: true! !\r\r\r!VideoDevice methodsFor: 'private' stamp: 'dgd 7/11/2004 20:50'!\rbenchmark\r\t\"capture and display 100 frames from the device\"\r\t| iterations time statistics |\r\titerations := 100.\r\ttime := Time\r\t\t\t\tmillisecondsToRun: [\"\"\r\t\t\t\t\titerations\r\t\t\t\t\t\ttimesRepeat: [self next display]].\r\t\"\"\r\tDisplay restore.\r\t\"\"\r\tstatistics := String new writeStream.\r\tstatistics nextPutAll: '------------------------------------------------------------'.\r\tstatistics cr.\r\tstatistics nextPutAll: 'Frame Extent: ' , self extent asString.\r\tstatistics cr.\r\tstatistics nextPutAll: 'Iterations: ' , iterations asString.\r\tstatistics cr.\r\tstatistics nextPutAll: 'Ellapsed time:' , time asString , 'ms (each ' , (time / iterations) asFloat rounded asString , 'ms)'.\r\tstatistics cr.\r\tstatistics nextPutAll: 'Frames per second:' , (1000.0 / (time / iterations) roundTo: 0.01) asString.\r\tstatistics cr.\r\tstatistics nextPutAll: '------------------------------------------------------------'.\r\tstatistics cr.\r\t\"\"\r\tstatistics contents openInWorkspaceWithTitle: 'benchmark'! !\r\r!VideoDevice methodsFor: 'private' stamp: 'dgd 8/9/2004 19:44'!\rchangedExtent\rself triggerEvent:#extent! !\r\r!VideoDevice methodsFor: 'private' stamp: 'dgd 8/1/2004 13:08'!\rclosedFrame\r\t\"private\"\r\t^ self frameColor: Color blue twiceDarker withMessage: 'closed' translated! !\r\r!VideoDevice methodsFor: 'private' stamp: 'dgd 8/1/2004 12:49'!\rframeColor: aColor withMessage: aString \r\t\"private - create a frame of the given color with aString as the message\"\r\t| result |\r\tresult := Form extent: self extent depth: 32.\r\tresult fillColor: aColor.\r\tresult getCanvas\r\t\tdrawString: aString\r\t\tat: 5 @ 2\r\t\tfont: Preferences windowTitleFont\r\t\tcolor: Color lightGreen.\r\t^ result! !\r\r!VideoDevice methodsFor: 'private' stamp: 'dgd 8/1/2004 20:47'!\rpoisonedFrame\r\t\"private\"\r\t^ self\r\t\tframeColor: Color red muchDarker\r\t\twithMessage: ('no connected video device id: {1}' translated format: {self deviceID})! !\r\r!VideoDevice methodsFor: 'accessing' stamp: 'dgd 7/11/2004 20:55'!\rbrightness\r\t\"answer the receiver's brightness\"\r\t^ brightness! !\r\r!VideoDevice methodsFor: 'accessing' stamp: 'dgd 7/28/2004 17:08'!\rbrightness: aNumber \r\t\"change the receiver's brightness\"\r\t\r\tbrightness := aNumber asFloat min: 1.0 max: -1.0! !\r\r!VideoDevice methodsFor: 'accessing' stamp: 'dgd 7/11/2004 20:55'!\rcontrast\r\t\"answer the receiver's contrast\"\r\t^ contrast! !\r\r!VideoDevice methodsFor: 'accessing' stamp: 'dgd 7/28/2004 17:08'!\rcontrast: aNumber \r\t\"change the receiver's contrast\"\r\t\r\tcontrast := aNumber asFloat min: 1.0 max: -1.0! !\r\r!VideoDevice methodsFor: 'accessing' stamp: 'dgd 7/28/2004 20:20'!\rdeviceID\r\t\"answer the receiver's deviceID\"\r\t^ implementation deviceID! !\r\r!VideoDevice methodsFor: 'accessing' stamp: 'dgd 7/28/2004 20:19'!\rextent\r\t\"answer the receiver's extent\"\r\t^implementation extent! !\r\r!VideoDevice methodsFor: 'dying / reviving' stamp: 'dgd 8/1/2004 20:16'!\rbePoisoned\r\t\"change the receiver to be poisoned\"\r\tlastErrorTimestamp := Time millisecondClockValue.\r\t[self closeIfCorresponds]\r\t\ton: Error\r\t\tdo: [:exception | ]! !\r\r!VideoDevice methodsFor: 'dying / reviving' stamp: 'dgd 8/1/2004 19:59'!\risPoisoned\r\t\"answer whatever the receiver is poisoned\"\r\t^ lastErrorTimestamp notNil! !\r\r!VideoDevice methodsFor: 'dying / reviving' stamp: 'dgd 8/1/2004 20:51'!\risTimeToRevive\r\t\"answer if it's time to try to revive the receiver\"\r\t| elapsed |\r\tself isPoisoned\r\t\tifFalse: [^ false].\r\telapsed := Time millisecondsSince: lastErrorTimestamp.\r\t^ elapsed > 5000! !\r\r!VideoDevice methodsFor: 'dying / reviving' stamp: 'dgd 8/1/2004 20:51'!\rtryToRevive\r\t\"private - trying to revive the receiver\"\r\tself flag: #todo.\r\t\"try to connect to another device if the current deviceID is  \r\tunavailable.\"\r\t\"\"\r\tlastErrorTimestamp := nil.\r\tself open! !\r\r!VideoDevice methodsFor: 'dying / reviving' stamp: 'dgd 8/1/2004 20:12'!\rtryToReviveIfCorresponds\r\t\"private - try to revive if it's time to\"\r\tself isTimeToRevive\r\t\tifTrue:[\r\tself tryToRevive]! !\r\r!VideoDevice methodsFor: 'opening / closing' stamp: 'dgd 8/1/2004 13:11'!\rclose\r\t\"close the receiver\"\r\tisSleeping\r\t\tifTrue: [\"\"\r\t\t\tisSleeping := false.\r\t\t\t^ self].\r\t\"\"\r\tself isOpened\r\t\tifFalse: [^ self error: 'device not opened'].\r\t\"\"\r\t[implementation close]\r\t\ton: Error\r\t\tdo: [:exception | exception].\r\tself class unregister: self! !\r\r!VideoDevice methodsFor: 'opening / closing' stamp: 'dgd 7/11/2004 20:48'!\rcloseIfCorresponds\r\t\"close the receiver if it's opened, otherwise do nothing\"\r\tself isOpened\r\t\tifTrue: [self close]! !\r\r!VideoDevice methodsFor: 'opening / closing' stamp: 'dgd 7/28/2004 20:19'!\risOpened\r\t\"answer whatever the receiver is opened\"\r\t^ implementation isOpened! !\r\r!VideoDevice methodsFor: 'opening / closing' stamp: 'dgd 8/10/2004 21:27'!\ropen\r\t\"open the device represented by the receiver\"\r\tself isOpened\r\t\tifTrue: [^ self error: 'device already opened'].\r\t\"\"\r\t[implementation open.\r\tself class register: self.\rself triggerEvent: #extent.\r\tisSleeping := false]\r\t\ton: Error\r\t\tdo: [:exception | self bePoisoned]! !\r\r!VideoDevice methodsFor: 'opening / closing' stamp: 'dgd 7/11/2004 20:48'!\ropenIfCorresponds\r\t\"open the receiver if it isn't opened, otherwise do nothing\"\r\tself isOpened\r\t\tifFalse: [self open]! !\r\r!VideoDevice methodsFor: 'configuration' stamp: 'dgd 8/10/2004 21:27'!\rapplyParameters: aCollection \r\t\"apply the (possible changed) collection of parameters\"\r\tself isPoisoned\r\t\tifFalse: [self close].\r\timplementation applyParameters: aCollection.\r\tself isPoisoned\r\t\tifFalse: [self open].\r! !\r\r!VideoDevice methodsFor: 'configuration' stamp: 'dgd 8/10/2004 14:59'!\rparameters\r\t\"answer a collection of parameters to configure the receiver\"\r\t^ implementation parameters! !\r\r!VideoDevice methodsFor: 'sleeping' stamp: 'dgd 8/1/2004 20:14'!\rawake\r\t\"if the receiver is sleeping, awake it\"\r\tisExecutor\r\t\tifTrue: [^ self].\r\t\"\"\r\tisSleeping\r\t\tifFalse: [^ self].\r\t\"\"\r\tself open.\r\tisSleeping := false! !\r\r!VideoDevice methodsFor: 'sleeping' stamp: 'dgd 8/1/2004 13:11'!\rsleep\r\t\"if the receiver is opened, put it to sleep\"\r\tisExecutor\r\t\tifTrue: [^ self].\r\t\"\"\r\tself isOpened\r\t\tifFalse: [^ self].\r\t\"\"\r\tself close.\r\tisSleeping := true! !\r\r!VideoDevice methodsFor: 'initialization' stamp: 'dgd 8/1/2004 17:58'!\rinitialize\r\t\"initialize the receiver\"\r\r\tisSleeping := false.\r\r\tisExecutor := false.\r\t\"\"\r\tbrightness := 0.0.\r\tcontrast := 0.0! !\r\r!VideoDevice methodsFor: 'initialization' stamp: 'dgd 8/9/2004 19:43'!\rinitializeImplementation: anImplementor \r\t\"initialize the receiver's description\"\r\timplementation := anImplementor.\rimplementation when: #extent\r\t\tsend: #changedExtent\r\t\tto: self! !\r\r!VideoDevice methodsFor: 'capturing' stamp: 'dgd 8/1/2004 20:47'!\rnext\r\t\"answer the next frame from the device represented by the  \r\treceiver\"\r\tself tryToReviveIfCorresponds.\r\t\"\"\tself isPoisoned\r\t\tifTrue: [^ self poisonedFrame].\r\tself isOpened\r\t\tifFalse: [^ self closedFrame].\r\r\t\"\"\r\t[^ implementation nextWithBrightness: self brightness contrast: self contrast]\r\t\ton: Error\r\t\tdo: [:exception | \r\t\t\tself bePoisoned.\r\t\t\t^ self poisonedFrame]! !\r\r!VideoDevice methodsFor: 'finalization' stamp: 'dgd 8/1/2004 21:07'!\ractAsExecutor\r\t\"prepare the receiver to act as executor for any resources associated with it\"\r\tsuper actAsExecutor.\r\t\"an executor will not to go sleep becouse the original instance \r\twill close the device for its own\"\r\tisExecutor := true! !\r\r!VideoDevice methodsFor: 'finalization' stamp: 'dgd 7/11/2004 20:49'!\rfinalize\r\t\"the receiver is going to die, let's clean up\"\r\t\r\tself closeIfCorresponds! !\r\r\r!VideoDevice class methodsFor: 'system startup' stamp: 'dgd 7/11/2004 20:46'!\rshutDown: quitting \r\tquitting ifFalse:[^self].\r\"\"\r\r\t\t\tself allSubInstances\r\t\t\t\tdo: [:each | each sleep]! !\r\r!VideoDevice class methodsFor: 'system startup' stamp: 'dgd 7/11/2004 20:46'!\rstartUp: resuming \r\tresuming ifFalse:[^self].\r\"\"\r\t\t\r\t\t\tself allSubInstances\r\t\t\t\tdo: [:each | each awake]! !\r\r!VideoDevice class methodsFor: 'initialize-release' stamp: 'dgd 7/28/2004 21:14'!\rinitialize\r\t\" \r\tVideoDevice initialize. \r\t\"\r\tSmalltalk addToStartUpList: self.\r\tSmalltalk addToShutDownList: self! !\r\r!VideoDevice class methodsFor: 'initialize-release' stamp: 'dgd 7/28/2004 21:15'!\runload\r\tSmalltalk removeFromStartUpList: self.\r\tSmalltalk removeFromShutDownList: self! !\r\r!VideoDevice class methodsFor: 'registry' stamp: 'dgd 7/11/2004 20:45'!\rregister: anObject \r\t\"register anObject to receive the finalization signal\"\r\tWeakArray isFinalizationSupported\r\t\tifFalse: [^ self].\r\tself registry add: anObject! !\r\r!VideoDevice class methodsFor: 'registry' stamp: 'dgd 7/11/2004 20:45'!\rregistry\r\t\"anwer the registry for finalization\"\r\tWeakArray isFinalizationSupported\r\t\tifFalse: [^ nil].\r\t^ Registry\r\t\tifNil: [Registry := WeakRegistry new]! !\r\r!VideoDevice class methodsFor: 'registry' stamp: 'dgd 7/11/2004 20:45'!\runregister: anObject \r\tWeakArray isFinalizationSupported\r\t\tifFalse: [^ self].\r\tself registry\r\t\tremove: anObject\r\t\tifAbsent: []! !\r\r!VideoDevice class methodsFor: 'instance creation' stamp: 'dgd 8/5/2004 19:19'!\rdefault\r\t\"answer the default video device\"\r\t\" \r\tVideoDevice default.  \r\t\"\r\t^ self implementation: self firstAvailableDeviceImplementor! !\r\r!VideoDevice class methodsFor: 'instance creation' stamp: 'dgd 11/3/2006 14:27'!\rfirstAvailableDeviceImplementor\r\t\"private - answer the first available video device implementor\"\r\r\t| descriptions |\r\r\tdescriptions := self descriptions \r\t\t\t\t\t\tasSortedCollection: [:x :y | x id <= y id].\r\r\tdescriptions isEmpty ifTrue: [^self error: 'no video devices detected'].\r\r\tdescriptions do: [:eachDescription | \r\t\t[^ eachDescription newImplementor]\r\t\t\ton: Error\r\t\t\tdo: [:exception | ]\r\t].\r! !\r\r!VideoDevice class methodsFor: 'instance creation' stamp: 'dgd 7/28/2004 20:16'!\rimplementation: anImplementor \r\t\"answer an instance of the receiver using the given  \r\timplementor\"\r\t^ self new initializeImplementation: anImplementor! !\r\r!VideoDevice class methodsFor: 'instance creation' stamp: 'dgd 7/28/2004 20:30'!\rnew\r\t\"answer a new instance of the receiver\"\r\t^ super new initialize ! !\r\r!VideoDevice class methodsFor: 'enumerating' stamp: 'dgd 8/5/2004 19:30'!\rdescriptions\r\t\"answer a collection of VideoDeviceDescription of available  \r\tvideo devices\"\r\t\" \r\tVideoDevice descriptions.  \r\t\"\r\t| result |\r\tresult := Set new.\r\tself workingImplementors\r\t\tdo: [:each | result addAll: each descriptions].\r\t\"\"\r\t^ result ! !\r\r!VideoDevice class methodsFor: 'enumerating' stamp: 'dgd 8/5/2004 19:28'!\rworkingImplementors\r\t\"private - answer a collection of implementors working on the \r\tcurrent environment\" \r\t^ VideoDeviceImplementor allSubclasses\r\t\tselect: [:each | each workOnCurrentEnvironment]! !\r\r\r!VideoDeviceImplementor methodsFor: 'configuration' stamp: 'dgd 8/10/2004 18:24'!\rapplyParameters: aCollection \r\t\"apply the (possible changed) collection of parameters\"\r\t! !\r\r!VideoDeviceImplementor methodsFor: 'configuration' stamp: 'dgd 8/10/2004 14:59'!\rparameters\r\t\"answer a collection of parameters to configure the receiver\"\r\t^ {}! !\r\r!VideoDeviceImplementor methodsFor: 'accessing' stamp: 'dgd 7/28/2004 20:38'!\rdescription\r\t\"answer the receiver's description\"\r\t^ description! !\r\r!VideoDeviceImplementor methodsFor: 'accessing' stamp: 'dgd 7/28/2004 20:37'!\rdeviceID\r\t\"answer the receiver's deviceID\"\r\t^ self subclassResponsibility! !\r\r!VideoDeviceImplementor methodsFor: 'accessing' stamp: 'dgd 7/28/2004 20:37'!\rextent\r\t\"answer the receiver's extent\"\r\t^ self subclassResponsibility! !\r\r!VideoDeviceImplementor methodsFor: 'opening / closing' stamp: 'dgd 7/28/2004 17:10'!\rclose\r\t\"private - close the receiver\"\r\tself subclassResponsibility! !\r\r!VideoDeviceImplementor methodsFor: 'opening / closing' stamp: 'dgd 7/28/2004 17:14'!\risOpened\r\t\"answer whatever the receiver is opened\"\r\t^ self subclassResponsibility! !\r\r!VideoDeviceImplementor methodsFor: 'opening / closing' stamp: 'dgd 7/28/2004 17:11'!\ropen\r\t\"open the device represented by the receiver\"\r\tself subclassResponsibility! !\r\r!VideoDeviceImplementor methodsFor: 'initialization' stamp: 'dgd 7/28/2004 17:17'!\rinitialize\r\t\"initialize the receiver\"\r! !\r\r!VideoDeviceImplementor methodsFor: 'initialization' stamp: 'dgd 7/28/2004 20:18'!\rinitializeDescription: aDescription \r\"initialiaze the receiver's description\"\r\tdescription := aDescription! !\r\r!VideoDeviceImplementor methodsFor: 'capturing' stamp: 'dgd 7/28/2004 20:26'!\rnextWithBrightness: brightnessFloat contrast: contrastFloat\r\t\"answer the next frame from the device represented by the  \r\treceiver\"\r\t^ self subclassResponsibility! !\r\r\r!TestDeviceImplementor methodsFor: 'accessing' stamp: 'dgd 7/28/2004 20:07'!\rdeviceID\r\t\"answer the receiver's deviceID\"\r\t^ 10! !\r\r!TestDeviceImplementor methodsFor: 'accessing' stamp: 'dgd 8/10/2004 18:23'!\rextent\r\t\"answer the receiver's extent\"\r\t^ extent! !\r\r!TestDeviceImplementor methodsFor: 'accessing' stamp: 'dgd 8/10/2004 19:41'!\rextent: aPoint \r\t\"change the receiver's extent\"\r\textent = aPoint\r\t\tifTrue: [^ self].\r\"\"\rextent _ aPoint.\rself triggerEvent:#extent! !\r\r!TestDeviceImplementor methodsFor: 'private' stamp: 'dgd 8/9/2004 21:04'!\rcolorBars\r\t| result canvas testColors barWidth |\r\tresult := Form extent: self extent depth: 32.\r\t\"\"\r\tresult fillColor: Color black.\r\tcanvas := result getCanvas.\r\t\"\"\r\ttestColors :=  (Color cyan wheel: 32).\r\tbarWidth := result width // testColors size.\r\t\"\"\r\ttestColors\r\t\twithIndexDo: [:color :index | \"\"\r\t\t\tcanvas\r\t\t\t\tfillRectangle: (index - 1 * barWidth @ 0 rect: index * barWidth @ result height)\r\t\t\t\tcolor: color].\r\t^ result! !\r\r!TestDeviceImplementor methodsFor: 'private' stamp: 'dgd 8/9/2004 21:04'!\rlenna\r\t^ Form\r\t\textent: 320 @ 240\r\t\tdepth: 32\r\t\tfromArray: #(4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293037952 4292775807 4293035907 4293038208 4292906107 4292906619 4292970616 4292773745 4292773491 4292842358 4292969583 4292969839 4292381298 4293165676 4292643449 4292641404 4293297515 4292708211 4292972157 4293364086 4293300605 4292973432 4293632385 4293237633 4293629301 4293236353 4292974974 4293429370 4292378479 4292902779 4291451748 4289811557 4289348176 4288103014 4288888938 4289087570 4289022553 4289677920 4289546593 4290005077 4290007900 4290072153 4289417307 4290008422 4290005600 4290006617 4290465881 4289875290 4290007644 4290073436 4289416026 4290530135 4289811036 4290335323 4290207072 4291125601 4291122522 4291125601 4290667613 4291191136 4291650658 4291453282 4291125598 4291717991 4292044643 4291717989 4291191660 4291321700 4291129456 4291520874 4292110947 4291257694 4291782250 4291323230 4291783271 4291914337 4291519846 4291717216 4291914862 4291324528 4292044642 4291586661 4291980392 4291980392 4291782504 4292044132 4291716969 4292111459 4292439653 4291783789 4291652198 4291585632 4292045929 4291456615 4292045928 4291651941 4291849325 4292045928 4291587682 4291979880 4291981674 4291391079 4292439913 4290864753 4291457392 4291980139 4291521130 4291389283 4291126632 4291717990 4291979108 4291717216 4291389291 4291128426 4291784546 4291455595 4291848040 4291586662 4292109665 4291782500 4292111459 4292111460 4292111203 4291587689 4292044643 4291586662 4291848035 4291849069 4291786865 4291520617 4291585893 4291061096 4292439398 4291126370 4291980910 4291519072 4291192164 4291783526 4291125857 4291455600 4291258472 4291454301 4291651686 4291258472 4290929256 4292045160 4290863721 4291716703 4290995823 4291322973 4291322732 4291192680 4290600802 4290994033 4290731876 4290273388 4290403422 4289419359 4289548122 4289546595 4289939787 4290732130 4291322463 4292048489 4291916390 4292116594 4292249210 4292708206 4292840817 4292644725 4292514428 4292511084 4292509553 4292772208 4292576877 4292445808 4292903790 4292641660 4292839282 4292642163 4292512893 4292838779 4292970095 4292641637 4292248688 4293165404 4292576887 4292838512 4292838514 4292576106 4293035633 4292445806 4292969840 4292970867 4292250743 4292904297 4292839284 4292774777 4292970867 4292642164 4292446322 4293169517 4293705093 4294037154 4294037668 4294037409 4294038694 4294038694 4294038696 4294167951 4293176455 4291065452 4289284963 4288956510 4289484116 4289548647 4289944159 4290535007 4290272611 4290797412 4290274669 4290271838 4290338917 4290994271 4290797154 4290277240 4290337892 4290207075 4291125343 4290731872 4291322720 4291125087 4290600805 4290994782 4291322980 4290076264 4291323753 4290928990 4291322464 4290075231 4290667113 4291323751 4290601837 4290797923 4291256671 4290996578 4290536289 4291256415 4290141024 4290861405 4290206559 4290666084 4292772984 4292712336 4293499777 4292047205 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293037952 4292776064 4293231997 4293234041 4293038209 4293101445 4292905334 4292774279 4292970609 4292383868 4292837742 4292774005 4292839285 4292772719 4292839284 4292642163 4292773748 4292773747 4293299581 4292971646 4293366643 4293302908 4293629818 4293172097 4293566332 4293564795 4293628027 4293298564 4292901977 4292117114 4291518562 4290336614 4289282640 4288691558 4288299595 4288956509 4289022558 4289677921 4289481814 4290532454 4290007900 4289414487 4290070614 4290007899 4290008156 4289415769 4289877085 4290529622 4290009439 4289417052 4289547354 4289939543 4290466908 4290337112 4290139742 4291190359 4290533727 4290599511 4291454305 4290993757 4291257439 4291651426 4291387490 4291914849 4291585121 4291717991 4291585375 4291389549 4291522406 4291914862 4291586661 4291978596 4291322727 4291848545 4291127146 4291782496 4291127657 4291519585 4291653730 4291455339 4292373094 4291782248 4292111458 4291914600 4292111714 4291454575 4292505701 4292045667 4291914856 4291455339 4291848799 4292177252 4291586405 4291849326 4291717732 4291257954 4291849326 4291586405 4291980137 4292112996 4291980135 4291849325 4291849324 4291126891 4291063661 4291390570 4291586667 4292045663 4291061098 4291520348 4292177252 4291455078 4291650661 4291063147 4291717477 4291913577 4291848798 4291848810 4291979364 4291848799 4291914858 4292111459 4292111203 4291981926 4291913315 4292111971 4291453280 4291456870 4292442485 4291455082 4291980127 4290995306 4292111203 4291126371 4291521131 4291782752 4291192163 4291783525 4291191403 4292046444 4291192162 4291257956 4291192418 4291913064 4291126889 4291979362 4291586149 4291454566 4291126888 4291518561 4291258210 4291257960 4290600029 4291125859 4290733670 4290272615 4290403422 4290009193 4290074974 4289480021 4289940821 4290730591 4291322719 4292046949 4292180079 4292706416 4292183671 4292904819 4292840313 4292839799 4292514684 4292708204 4292574052 4292314478 4292313965 4293101168 4292642676 4292706939 4292643706 4292837741 4292644991 4292839282 4292772719 4292838513 4292904049 4292575603 4293035888 4292444522 4292640350 4293035890 4292380270 4292903007 4292773482 4292577915 4293101940 4292445548 4292643194 4292840312 4292839284 4292903535 4292446322 4293235053 4293705350 4294101904 4294037904 4294037411 4294038694 4294038694 4294038696 4294167695 4293110663 4290999660 4289350756 4288956508 4289680232 4289482073 4290469216 4290535006 4289750130 4290929242 4290209886 4290206048 4291191903 4290074975 4290208355 4290538605 4290272357 4290273387 4291388255 4290797664 4290534496 4291125087 4290667874 4290732388 4291322980 4290602086 4291257187 4290732389 4290929247 4290729820 4290798179 4291126376 4291127150 4290929764 4291124831 4290929508 4291323755 4290600031 4290797408 4290141280 4290272095 4290731877 4292116086 4293630342 4293500548 4292244837 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293037953 4292578683 4292906874 4292840332 4293036659 4292709242 4293101427 4292773747 4292970867 4292970874 4292970095 4292968300 4292577388 4292838255 4292839541 4292969838 4292773749 4292969585 4292644478 4293169012 4292907891 4293235591 4293632383 4293565057 4293564283 4293565052 4293562494 4293562222 4292443237 4292638841 4290993756 4290336615 4289282640 4288955993 4288690781 4288891228 4289022815 4289415005 4289481057 4290006616 4290006618 4290072410 4289481818 4289417565 4290070614 4290006875 4290531417 4289941083 4289415770 4290072410 4289480024 4290136919 4289878111 4290335324 4290730590 4291125858 4291124061 4290534753 4291388768 4291125856 4291453283 4291650915 4291190364 4291520098 4292044900 4291847267 4291718247 4291716185 4292111721 4291454821 4291914345 4291717472 4291519072 4291519073 4291324004 4291520606 4291781226 4291651680 4292045929 4292046185 4291520095 4291849582 4291980392 4292308843 4292045923 4292111714 4291980131 4292439910 4292241766 4291588195 4291782506 4292109414 4291782505 4292046183 4291257452 4291652453 4291980392 4292111458 4292505445 4291586411 4291455594 4291585645 4292111718 4291324526 4292045942 4291784061 4291126885 4291585382 4291585381 4291914603 4291783264 4291716458 4291389020 4291453804 4291784801 4291322214 4291521389 4291651680 4291846493 4291192686 4292176994 4291914857 4291520871 4292176995 4292111459 4292307815 4291847267 4291455339 4291586927 4291717732 4291454823 4291783008 4292044644 4291980128 4291914602 4291782751 4291322471 4292112233 4291060322 4291455858 4291453536 4291323491 4291256940 4291193192 4291125858 4291323238 4292045928 4290863721 4291126889 4291257437 4291584870 4290472562 4290600547 4291125860 4290731876 4290337630 4289812832 4290008669 4289417051 4289546339 4290006612 4290795349 4291388511 4291457382 4292245104 4292312422 4292249458 4292511609 4292840055 4292842363 4292644981 4292904821 4292116589 4292772970 4292969586 4292248428 4292772208 4292707956 4292511339 4292838255 4292839284 4292773749 4292970095 4292838512 4292378984 4292837726 4292838516 4292837726 4292641139 4292838256 4293035632 4292380528 4292970097 4292969839 4292446835 4292641129 4292970867 4292840313 4292446834 4292641385 4292314995 4292777065 4293639060 4293904265 4294037157 4294037409 4294038694 4294038694 4294038696 4294102674 4293178243 4291590760 4288562526 4289022046 4289679450 4289549404 4289944160 4290337888 4290336596 4290141799 4290863724 4290864219 4290075749 4291060580 4290797930 4290144872 4290928484 4289682778 4290994271 4290600032 4291321942 4291322464 4290010716 4291388518 4290798682 4290602082 4291454820 4290732388 4291585375 4290009439 4291455337 4290535785 4291126377 4291454046 4291256670 4290471784 4291519326 4290536285 4290729821 4290730851 4290075231 4290667097 4292968052 4292776837 4293823605 4290599012 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293036920 4292970615 4293035132 4293231717 4292970887 4293037175 4293231979 4292968556 4292511350 4293100139 4292970096 4292707184 4292970096 4292838512 4292640879 4292577389 4292970096 4292444773 4293232252 4293495671 4293629565 4293628276 4293171592 4293565301 4293566333 4293564279 4293562745 4293363564 4292510324 4292175459 4290994528 4290400087 4288887902 4288624731 4288691290 4289283420 4289150797 4289806947 4290072162 4289416282 4289414743 4290005592 4289873749 4290070871 4289415001 4290070091 4289285212 4290005331 4290070866 4290005337 4289416270 4290006619 4289875034 4290335059 4290731610 4290664021 4291124319 4291257184 4291323233 4291124822 4291716446 4291189588 4291846747 4291519324 4292111460 4291651680 4291323239 4291717217 4291322983 4291126627 4291979364 4290928996 4291980138 4292046441 4292110180 4291717218 4291455079 4291846750 4291979364 4291520096 4292373095 4291783272 4291586405 4291520869 4292242022 4291977831 4292439910 4291849577 4292109153 4292308056 4291783265 4291914339 4292045411 4291782248 4292110433 4292109415 4292111714 4291324268 4292046184 4291454564 4291455596 4292177250 4291782242 4291389291 4291063401 4291322984 4291590764 4291585636 4291783527 4291257437 4292110437 4291651168 4291650919 4291194211 4291326582 4291585118 4291324261 4291715678 4291914850 4291914336 4291520871 4292307302 4292046426 4291125351 4292177764 4291583331 4291586919 4291914335 4292045928 4291324268 4292243043 4291256162 4291717473 4290994789 4291650143 4290996337 4291651168 4291585377 4291257182 4291192419 4291716193 4290929514 4291847775 4291781994 4291651942 4291783008 4291388007 4291454813 4291192419 4291912037 4291126372 4291650656 4291191390 4291125087 4290732132 4290207335 4290403679 4289877598 4290006105 4289481818 4289414225 4290338914 4291126118 4291454819 4291980899 4292182901 4292247915 4292773492 4292840568 4292840055 4292840056 4292970614 4292905077 4292640881 4292640349 4292773752 4292246885 4292905333 4292444789 4292642421 4292380014 4292970096 4293100397 4292707184 4292970096 4292970355 4292574558 4292970355 4292970096 4292380269 4292838515 4292640094 4292380526 4293231213 4292380012 4292904822 4292577658 4292971124 4292837999 4293232759 4292313709 4292117610 4293173623 4293706905 4294102416 4294037668 4294037923 4294038694 4294038696 4294038420 4294101902 4293172860 4290339931 4288759134 4289742682 4289549680 4290009951 4290338144 4290273127 4290925651 4290208093 4290140512 4291125599 4290142818 4290928477 4291061098 4290206818 4290207853 4290142314 4290929252 4290798181 4290797926 4290798684 4291519582 4290535788 4290404190 4291256671 4290667109 4291256671 4290995039 4290469480 4290928989 4291191908 4291060068 4290994533 4291454563 4291126117 4291454046 4290468959 4291256927 4291257701 4291521388 4290271328 4288496467 4286719046 4284290634 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4292969838 4292905332 4293035888 4293035645 4293232512 4293035132 4293036143 4292707184 4293100140 4293101686 4292706927 4293100397 4292970096 4292772720 4292575343 4292970353 4292707184 4293494636 4293167220 4292908411 4293235331 4293630070 4293563766 4293565560 4293563768 4293563770 4293431150 4293165164 4292507998 4292441451 4291320921 4290334811 4289085264 4289216333 4288626775 4289019213 4289348691 4289807957 4289676629 4290201429 4290136150 4290135894 4289545295 4290072667 4289480280 4289351004 4290595929 4289939789 4289546580 4290202963 4290005080 4289877086 4290531161 4289745245 4290860380 4290139999 4291188820 4291059809 4291190614 4290994791 4291323232 4291256932 4291191904 4291454815 4291125352 4291781476 4291520097 4292110437 4291914593 4291717218 4291454302 4292045921 4291454049 4291847268 4291586145 4291650907 4291914594 4291651682 4291979108 4292177508 4291585889 4291585888 4292111459 4292111459 4292176231 4292440151 4291652967 4292109158 4291914339 4291914859 4291717478 4292373095 4291520096 4292114027 4291127148 4291848799 4291717482 4292177507 4291781475 4292046185 4291585887 4291979108 4292045667 4291519840 4291125606 4292637029 4292109916 4290930544 4291782751 4291519841 4291453794 4291978078 4291193193 4291586668 4291979613 4292111980 4291715662 4291715943 4291257694 4291651425 4292045411 4291782762 4291780708 4291914858 4291846493 4291849569 4292175712 4291388775 4291783520 4292438630 4291783265 4291846750 4291912549 4291389022 4291519841 4291848544 4291387489 4290995045 4291848545 4291585634 4291255643 4291126372 4291781732 4291191644 4291061355 4292043364 4291126109 4291780709 4291651431 4291125598 4290994532 4291125598 4291192165 4291322462 4290076007 4290863463 4290205277 4290335579 4290465625 4290006617 4289480023 4289940569 4290860121 4291060324 4291980397 4291654259 4292183164 4292247914 4292511609 4292840311 4292776062 4292775791 4292772206 4292839798 4292838256 4292642421 4292839542 4292904303 4292970095 4293100139 4292971125 4292576105 4293034860 4293101680 4292904560 4293100397 4292970353 4292772720 4292970096 4292838257 4292574558 4292970355 4292838258 4292577389 4293101173 4292380012 4293100913 4292445549 4292772708 4292445806 4292577135 4292575079 4292774768 4293440896 4293970060 4294036384 4294038437 4294038180 4294037923 4294038698 4294103186 4293770869 4291658354 4289285210 4288695641 4289679194 4289418334 4290531930 4290338144 4290208350 4290337887 4290863462 4290206302 4290208354 4291059807 4289550692 4290207077 4291782237 4290731103 4290667356 4291060320 4290798940 4291388774 4291059295 4291519838 4290731615 4291454304 4291256927 4290863712 4291191136 4291454302 4291322975 4291323749 4291126373 4291322973 4291127147 4291125859 4291324265 4291126890 4291388511 4291717473 4290269787 4287705164 4284486211 4284095560 4284224322 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4292706927 4293233268 4293232236 4292246638 4293101677 4292904303 4293034605 4293036147 4293036143 4292511092 4293101682 4293034861 4292772720 4292970095 4292970356 4292771934 4292772721 4292905333 4292774250 4293694323 4293694833 4293169278 4293565815 4293564537 4293565043 4293562989 4293236339 4293230957 4292506974 4291979103 4291586150 4290333271 4289085264 4288626775 4288623956 4289348177 4289349472 4289414741 4289544786 4289415257 4290201423 4289874265 4290595410 4289546328 4290071630 4290464858 4290070352 4289940052 4290596186 4289545039 4290007132 4290529872 4289811037 4290335836 4290794844 4290076001 4290666080 4291126374 4291060326 4291256927 4290992983 4291453531 4291780954 4291519588 4291779926 4291521376 4291715935 4291651169 4291256930 4292240737 4291520097 4290929770 4291914592 4291979108 4292177508 4291781733 4291651681 4291453538 4292110434 4291979364 4291846750 4291848297 4291914857 4292242022 4291848035 4292046180 4292109159 4292111971 4292045924 4292241761 4291980132 4291322976 4291848035 4291521126 4292370786 4291915369 4292307559 4291780957 4291586145 4291980393 4292045667 4291979363 4291585386 4291651680 4291913059 4291651439 4290928995 4292111202 4291454310 4291717483 4291913310 4291519330 4290994788 4291978594 4291127146 4291651424 4291717219 4291717474 4291651682 4292044644 4291586662 4291585631 4292179041 4291389030 4291455079 4291649124 4292045924 4291649379 4291846756 4291389542 4291454823 4292243299 4291454310 4291519072 4292241767 4291453537 4291585634 4291783008 4291125869 4291848544 4291388264 4291192420 4291780708 4291652200 4291452762 4291586407 4291587181 4291520096 4291651170 4291389022 4291717479 4291322974 4291060069 4291322463 4290075230 4290732392 4290926940 4290337118 4289810779 4290006885 4289483100 4289283925 4289286759 4290797149 4290930030 4292439143 4292180591 4292116338 4292577401 4292643192 4292971901 4292905081 4293101425 4292969838 4292774006 4292772462 4292969839 4293429100 4293035887 4292905332 4293037178 4292706669 4293035647 4292904302 4292904303 4292904560 4292772719 4292970095 4292706928 4293101680 4292970097 4292707187 4293099611 4292970355 4292182107 4293166961 4292117371 4292381042 4292116589 4292642670 4292182884 4292247919 4292313195 4292973446 4293705347 4294102947 4294037666 4294037409 4294038694 4294038694 4294038955 4293971855 4293830258 4290867314 4289414481 4289612633 4289679195 4289418334 4289877085 4290862945 4291322981 4290140766 4290272869 4290864738 4290601565 4291584863 4290140767 4290207078 4290140767 4290731360 4290731103 4290994272 4290075749 4290994783 4290732389 4290863973 4290666335 4291125087 4290929248 4291519839 4290403941 4291388511 4291125599 4291322974 4291518818 4291125342 4291455075 4291586668 4291914854 4291126624 4290137433 4286458182 4284748614 4284356925 4284291908 4284291907 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293233267 4292969597 4293166443 4293101682 4292708213 4293036144 4293034859 4292839027 4293297515 4292708213 4293035887 4292970096 4292772720 4292970099 4292707184 4293100398 4292970350 4293168506 4293366133 4293302399 4292973683 4293302397 4293628799 4293236592 4293236081 4293430900 4293299575 4292838496 4292899932 4292834143 4290992719 4289808216 4289348692 4288624723 4289281870 4288496207 4289412429 4289610579 4289676886 4290071384 4289283673 4290597467 4289284954 4290072154 4289352031 4290530380 4289545553 4290004820 4290004813 4289676632 4289414738 4289941084 4290337111 4290858324 4290664792 4291451227 4290535521 4291122266 4291125344 4291059552 4291125857 4291453533 4291780190 4291519580 4291979362 4291517786 4291519580 4292109928 4291716705 4292045157 4291585121 4292243043 4292111716 4292110183 4291388519 4292045924 4291651681 4291847519 4292308568 4291388520 4291847517 4291782506 4292111715 4291913572 4291913828 4292241766 4291849824 4291847780 4292636004 4292242264 4291715941 4292177507 4291915113 4291979618 4291849060 4292109416 4292110422 4291782763 4291847266 4292046440 4291059301 4291848553 4292175205 4291980650 4292111715 4292045410 4291454823 4292111971 4291912292 4291454301 4291847781 4291650142 4291717217 4292045668 4291848800 4292438888 4291388770 4291649118 4291783521 4292044644 4291782505 4292243308 4292111459 4291914083 4292242787 4292045668 4291389286 4292045156 4291847524 4291849056 4291716449 4291191142 4291913832 4291455853 4291913059 4291586398 4291519841 4291979621 4291388263 4291323486 4291585634 4291783009 4291584864 4291257955 4291257439 4291453025 4291519328 4291584866 4290994270 4292044900 4291192937 4291191908 4291060067 4291125861 4290666597 4291322206 4289616225 4289877341 4290466651 4289943388 4290073180 4290070613 4289415009 4290336859 4291192168 4291522417 4291654256 4292772207 4292510835 4292837740 4292972414 4293102199 4293036921 4292708211 4293101422 4292971124 4292510835 4293233015 4292839539 4293036916 4293298802 4293364859 4292970349 4292840053 4293429106 4293034604 4292970101 4292708470 4292970095 4292904304 4292904561 4292969310 4292772980 4292772464 4292577135 4292248429 4292969584 4292903791 4292773750 4292248428 4292970615 4291855209 4292247662 4292839018 4293241720 4293838215 4294036899 4294037666 4294038694 4294038694 4294038694 4294038698 4293968263 4292251494 4289810261 4289611362 4288828257 4289614942 4290008927 4290270292 4290730851 4290928480 4290272095 4290141542 4290732115 4290797665 4290862944 4290076764 4291256413 4291256415 4290143078 4290142043 4290731877 4291387999 4290798437 4290534238 4291322460 4291125862 4290731871 4290666079 4291257701 4291322975 4291125599 4291127146 4290928740 4291257181 4291586668 4291849318 4291651680 4290336607 4287179081 4284819793 4283895611 4284158526 4284291907 4284489033 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293035388 4292905587 4293035891 4292904303 4293035890 4293231979 4292970112 4293232235 4292839031 4292904558 4293034605 4292707185 4292773738 4292772720 4293100396 4292840052 4293429882 4292973680 4293300863 4293302389 4292974465 4293302132 4293302384 4293301617 4293235569 4293430389 4293494892 4293494125 4292442210 4292176218 4291321442 4290400602 4289150800 4288103258 4288628315 4289215822 4289151058 4289612122 4290069586 4290005850 4290464850 4289874773 4290006874 4289940826 4290006874 4289940057 4289806419 4290072668 4289416536 4289610827 4290201682 4289874258 4290334555 4290138713 4290727758 4290535258 4291122524 4291125081 4291059552 4291191392 4291518813 4291060321 4291191127 4291586148 4291255641 4291978592 4291322979 4291715934 4291321954 4291454305 4292243044 4291191911 4291780965 4291783776 4291650913 4291781220 4291846756 4291388769 4292175722 4291783520 4291979108 4291520352 4292044637 4291520610 4292109408 4291849578 4292437603 4292111971 4292043622 4291715428 4292045667 4291322982 4292373094 4291849321 4292242016 4291519069 4292109672 4291587173 4291782505 4292046183 4291848296 4291848297 4291585123 4291782499 4291979619 4291586662 4292044642 4292109414 4291388774 4292044899 4291979364 4292044900 4291849057 4291651425 4291454055 4291586145 4291847509 4292045670 4292177509 4291389278 4291585632 4292505445 4291650920 4292374380 4290798441 4291650656 4292046442 4292044894 4291453280 4292111979 4291585888 4292044900 4291781987 4291717216 4291322727 4291126884 4291978853 4291519323 4291126110 4292044390 4291126110 4291585633 4291584879 4291191660 4291651168 4290995300 4292043620 4291717473 4291388775 4291717990 4291454310 4290928739 4291126634 4290797148 4290666597 4290600288 4290927959 4289745252 4290402652 4289944172 4289418589 4289482341 4289545554 4290006885 4290075483 4291913593 4292310636 4292116849 4292443773 4292642675 4292970615 4292644478 4293299574 4292906367 4293036658 4292906622 4293102457 4292841080 4292971129 4292971889 4293561728 4293103727 4293364590 4292970351 4292970350 4292904303 4292904303 4293493353 4292904560 4292904560 4293034861 4293035120 4292903774 4293168241 4292116332 4292772465 4292705893 4292314222 4292511340 4292969328 4292707701 4292446323 4292511086 4292114278 4293237113 4293703302 4294100090 4294038184 4294038180 4294038694 4294038694 4294038697 4293971854 4293310607 4291461223 4289218648 4289679451 4289548380 4290005848 4290401116 4290339677 4289679965 4290272352 4290863461 4290665824 4290665568 4291717472 4290862944 4290665823 4290732134 4290140510 4290731876 4290733672 4290797406 4290599774 4291323493 4291191136 4290733146 4291257445 4290994533 4291322974 4291257439 4291191646 4291586150 4291586150 4291783270 4291850858 4291715934 4289742423 4286587719 4284616514 4284359751 4284752461 4284094524 4284687182 4284423496 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4292904558 4292904303 4293297514 4292904560 4292904307 4292969325 4293232236 4292839024 4293230440 4293231484 4292970863 4293034861 4293100397 4292511350 4293231982 4293364858 4293168247 4292973442 4293302644 4293234558 4293300851 4293693306 4292907884 4293300605 4293431667 4293233268 4293167728 4292706161 4292572764 4291847516 4291584352 4290333015 4289281098 4288625740 4289280076 4288496464 4289151052 4289612116 4290071380 4289282125 4291055706 4289875029 4289873751 4290532187 4290069844 4289940056 4290071378 4289546586 4290201418 4290201683 4289479755 4290464084 4290270294 4290792788 4290665825 4291187034 4291123798 4291057493 4291454052 4290994016 4291257696 4291912032 4291453534 4291715167 4291913574 4291847013 4291453787 4291718249 4291519330 4291912286 4291979876 4291585889 4292307800 4292109416 4292110432 4292109671 4291783520 4291848294 4291520593 4292174952 4292242278 4292505702 4291454833 4292373335 4291914341 4291914848 4292307558 4291651177 4292112494 4291914856 4291915113 4291977831 4291651415 4292439911 4292374374 4291913829 4292109664 4291977062 4292373349 4291125868 4292438885 4291520352 4292177251 4292111459 4291980648 4291651439 4291980649 4291913570 4292046440 4291782762 4291781981 4291847523 4291847524 4291849056 4291848041 4292045412 4291651682 4291454561 4291387745 4292044900 4292111459 4291850603 4292243051 4292375649 4292505446 4291979107 4292044899 4291453280 4291521645 4291650655 4292044900 4291980131 4291979108 4291849313 4291715684 4291782241 4291651937 4291715684 4291781482 4291126109 4292174946 4291256418 4291979107 4291717472 4291520103 4291847016 4290930281 4291978083 4291520102 4291978851 4291323239 4291914080 4291191651 4290798700 4290600803 4291256671 4290599262 4290861917 4290203738 4290471529 4290005590 4290008154 4289547375 4289414227 4290337638 4291059551 4291918193 4292247669 4292051057 4292771947 4292382079 4293363575 4292710526 4292711795 4293233784 4293036667 4293035373 4293167219 4293561721 4292973435 4292970609 4292841589 4293168512 4293167218 4292969598 4293233267 4293037435 4292970350 4293035893 4292904558 4292903021 4293035118 4292968558 4292706928 4293102710 4292640880 4292510313 4292445037 4292315508 4292182124 4292183667 4292445037 4291919461 4292248430 4292639343 4293308023 4293839265 4294035852 4294037667 4294037923 4294038694 4294038694 4294038441 4294101900 4293172858 4290338912 4289545569 4289612633 4289482843 4289941595 4290338145 4290928736 4290861405 4290142556 4291321952 4290010973 4291125087 4290928736 4290272351 4290339420 4290732636 4291258482 4290076249 4290994536 4290799713 4290732388 4291322205 4290472564 4291585628 4291716961 4291257956 4291322471 4291913828 4291978850 4292046185 4291849319 4291127137 4289480532 4285733699 4284419651 4283831862 4284157260 4284291906 4284094783 4284877110 4284554309 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4292904561 4292969837 4292709258 4293034603 4293233519 4292969069 4292970351 4293167737 4293167727 4292970351 4293034604 4293101682 4292707183 4292772463 4292905589 4293232499 4292842107 4292973426 4293103727 4293563000 4292777596 4293235566 4293366912 4293232754 4293628793 4293430905 4293100910 4292968540 4292507503 4292244847 4291125863 4290007389 4289349216 4288691278 4288560208 4289282643 4289741903 4289544788 4289808465 4289806926 4290070102 4290070101 4290532187 4289283416 4290005592 4290005336 4289349465 4290660947 4289742416 4289350999 4290005588 4290399322 4290268241 4290730078 4290729814 4290664535 4290535267 4291323234 4290468440 4291124568 4291584605 4291125857 4290861911 4292044897 4291716700 4291650405 4292109155 4291651163 4291912543 4291586402 4292110951 4292044900 4291782756 4291388518 4292177507 4291521126 4292046441 4291780963 4292175976 4291389542 4291781219 4291979363 4291979363 4291716191 4291781988 4292373094 4291193453 4292701529 4291847779 4292111715 4292242024 4292044128 4292109672 4291651427 4292242023 4291848029 4292373601 4291518307 4291717481 4292638561 4291258988 4292175206 4291717225 4291783273 4292109925 4291388511 4292111715 4292373350 4291520367 4291847266 4291914344 4291324012 4291322469 4291520359 4291717734 4291848800 4291716705 4291649637 4292110686 4291979364 4291980649 4291980135 4291980134 4291717741 4291980134 4291716968 4291848040 4291717990 4291455595 4291848291 4291848296 4291651439 4291848806 4291519073 4291716961 4291517796 4291912548 4291718246 4291717990 4291716459 4291454562 4291650651 4291322210 4291781477 4291519328 4291914090 4291717215 4291715946 4291322726 4291321953 4291978852 4291585639 4291059811 4290538348 4291191138 4290534751 4291253336 4290665054 4290927710 4289810786 4289875812 4290531416 4289416023 4289545814 4289811301 4290733164 4290864497 4291783789 4292772204 4292313484 4292708982 4292905074 4293036406 4293038723 4293168252 4293037181 4292841839 4293232506 4292971886 4292972419 4292973434 4293429369 4292973422 4293169530 4293035628 4292838767 4293035885 4292840052 4293233271 4293231226 4292904816 4292968556 4292904560 4293363308 4292182892 4292969585 4292575591 4292118388 4293361001 4292183667 4292707948 4292576119 4292445549 4292640626 4292116060 4292707181 4293965173 4293904524 4294037925 4294038180 4294038694 4294038694 4293973160 4294036882 4294032262 4292184951 4288429906 4289481552 4289547365 4290007643 4290336605 4290272100 4290270047 4290206560 4290665824 4291651167 4290863718 4290010715 4291520101 4290863462 4290667100 4290862686 4291060325 4290078819 4291256419 4290601321 4290732387 4291257186 4291126891 4291453024 4291322470 4292111976 4291520613 4292308844 4292243043 4291125855 4289675345 4285604426 4284354363 4284029001 4284422978 4284093515 4284687180 4284487740 4284355148 4284815677 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293035389 4293101684 4292904301 4293034859 4292577142 4293427817 4292972149 4293165931 4293167474 4293233266 4292904305 4292708216 4292970097 4292970095 4292970612 4292841582 4293365893 4293366643 4293495928 4293368438 4292580210 4293823859 4292972918 4293103728 4293298803 4293233530 4293559914 4292836718 4292967008 4292373862 4291257437 4290468458 4288759121 4288232527 4289216336 4288889423 4289085516 4289349208 4290201687 4290005331 4289942872 4290464857 4290005842 4290071124 4289939027 4290072663 4289676368 4289349454 4290007390 4290135632 4290069579 4289808723 4290336350 4290859098 4290141531 4290728020 4291190096 4291188572 4291124825 4291059809 4291125857 4291256157 4291519070 4291060064 4291387740 4291715941 4291257950 4291913061 4291782245 4291781214 4292177508 4291388000 4292043367 4291652710 4291977575 4292044899 4291782761 4292044900 4291913827 4291849057 4291651169 4291583588 4292110183 4292111972 4291781220 4291913827 4292109414 4292176743 4291979107 4291781727 4291914325 4292308073 4291715683 4291848548 4291649891 4292373607 4291125607 4292044898 4292111971 4291847021 4292109664 4291716191 4292043361 4291718496 4292309353 4291848298 4291650921 4291388000 4292110435 4292044643 4291392624 4291783269 4291519846 4291980128 4291454822 4291980138 4291257185 4291978079 4291454562 4291846756 4291585887 4291848808 4291849325 4291851374 4291786867 4292373603 4291585903 4291716958 4292111977 4291847523 4291322470 4291651679 4292047206 4291322471 4291520097 4291520097 4291912548 4291322470 4291520098 4292110687 4291978837 4291191145 4291190626 4291585121 4291322984 4291715172 4291914085 4291454560 4291979108 4291519586 4291913310 4291191646 4291126629 4291124571 4290996345 4290665828 4290672504 4290729819 4290138459 4290337374 4290532697 4289874017 4290073188 4289414486 4290532698 4290139483 4291783787 4291982436 4292118392 4292837482 4292446073 4292970869 4293234044 4293038715 4293037691 4292973177 4293234047 4292839281 4293036666 4293234045 4292970615 4293039723 4292970874 4293364344 4292841088 4293231466 4292840056 4293296762 4292970349 4292643707 4293295976 4292708470 4292774005 4292839542 4292706415 4292511600 4292510838 4292969328 4292707434 4292250745 4291855209 4292510829 4292247918 4292248174 4292444266 4292311911 4293171579 4293837704 4294036898 4294037668 4294037923 4293972902 4294236583 4293973143 4293905551 4293830257 4290079594 4289414488 4289617506 4289414743 4290404706 4290333527 4290273642 4290928223 4290141024 4290796896 4290076764 4291323500 4290534239 4290667099 4290733417 4290208353 4290077284 4291322211 4290602604 4290603370 4291323496 4291125859 4291979615 4291127401 4291717732 4291783534 4291981668 4292047724 4291782501 4289084752 4286193734 4283700795 4283698239 4284622155 4284097358 4284357438 4284487750 4284160837 4284947520 4284488516 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4292904559 4292707183 4293100394 4292970110 4293429104 4292773230 4292969598 4293233261 4292839797 4293035887 4292903550 4293036139 4293034108 4293034602 4292839538 4293430918 4293366635 4292581505 4293432958 4292643182 4293103990 4292776309 4293038453 4293168506 4293101683 4293299322 4293035373 4293492586 4292116591 4292373606 4291717218 4289811297 4288627537 4288755276 4288821840 4288693587 4289741898 4289938511 4289872468 4289482069 4290007394 4289873484 4290530644 4289479755 4290596180 4289350736 4290071125 4290005583 4290004814 4290005595 4289940046 4290398291 4290334812 4290203476 4290792528 4290732901 4290531931 4291256159 4291059032 4291387487 4291519323 4291649371 4291780961 4291060063 4291388515 4291913310 4291978080 4291651937 4292045669 4292175202 4291520609 4291847524 4291849312 4291455079 4291849312 4291781219 4291518570 4291257949 4292175207 4291586401 4291846750 4292112228 4292111971 4291979364 4291781476 4291914339 4292046179 4292043622 4291783786 4291781989 4291979360 4291715679 4292175457 4291323233 4292308071 4291845467 4292044898 4291586160 4291518044 4292308071 4292112229 4292107353 4291322979 4292045924 4291978088 4291256410 4291715173 4292110949 4291389790 4291650405 4292108890 4291651937 4291913317 4291453793 4291781476 4291126884 4291780703 4291323743 4291715173 4291651936 4292176493 4291848296 4291454820 4291914861 4291256937 4291389285 4292110433 4291258477 4291454047 4292044899 4291323244 4291847267 4292373351 4291455069 4291717218 4291651938 4292110686 4291323758 4291583320 4291124835 4291388515 4291192159 4291649116 4291782499 4291585116 4291519580 4291715423 4291519586 4291518047 4291715423 4291847780 4291585122 4291518818 4291125860 4290600548 4290666596 4290665050 4290732649 4290861917 4290335578 4289286503 4290075229 4290071137 4289481303 4290008166 4289745755 4291060840 4291848554 4292117119 4292379778 4292511608 4292839024 4292710530 4292971387 4292644737 4293431932 4293166959 4293234048 4292840295 4292971128 4293234045 4292645756 4293232499 4293166956 4292907383 4292971380 4293035886 4292707183 4293297772 4292904303 4293034861 4292970095 4292968300 4292182892 4292904048 4292707434 4292706416 4292511597 4292116846 4292772207 4292837745 4292182381 4292445294 4292445551 4292442469 4292246633 4292576106 4293636232 4293970315 4294036367 4294038697 4294038694 4293972902 4294171048 4294037926 4293576337 4292711010 4289612885 4289544789 4289484640 4290532187 4289811286 4290338138 4290206561 4290271319 4290075489 4290860115 4290797664 4290996316 4290863721 4290732635 4290140511 4290797669 4290665566 4290733925 4290865258 4290472305 4291455334 4290930030 4291652202 4291849325 4291783533 4292113260 4292241761 4288823116 4285143621 4284490573 4284355660 4284163149 4284488775 4284556623 4284291908 4284159300 4284750143 4285404726 4284947780 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293166701 4292970097 4292706428 4293035644 4293102199 4293363570 4293363562 4292969598 4293233266 4293035133 4293036139 4293035389 4292904300 4293037177 4292972414 4292973682 4292973445 4293431923 4292974196 4293039228 4293103477 4293627007 4292841590 4293231209 4293101934 4293299060 4293363572 4292837213 4292573536 4292571486 4291256414 4290400347 4289348681 4288626001 4288690253 4289348685 4289085518 4289740621 4289676875 4289415002 4290530386 4289873491 4289874522 4289806163 4290007126 4290005331 4290135889 4290005839 4289610828 4289415246 4289939029 4290334295 4290334799 4290270815 4290728284 4290661961 4291191651 4291059031 4291125604 4291058255 4290993498 4291125081 4291782743 4291585891 4291714395 4291913830 4291123801 4291584867 4291520856 4291586402 4292175201 4292045156 4291650405 4291649630 4291781476 4292175719 4291322207 4291322727 4291847011 4291912548 4291584100 4292109665 4291781220 4291847013 4291584094 4292242024 4292374631 4292439654 4291911521 4291715931 4292109668 4291781470 4291782501 4291781213 4292109412 4292112760 4291653482 4292373092 4291978599 4291977057 4291715934 4292110436 4292043100 4291977572 4291779411 4291914081 4291519834 4291452506 4292108893 4291452517 4291519586 4291715173 4291519579 4291780959 4291519586 4291520098 4291780703 4291520355 4292108635 4291256162 4292242526 4291453536 4291716457 4291848807 4291848807 4291848296 4292109414 4291651679 4291454311 4292175974 4291389542 4292111203 4291388001 4291978085 4291716191 4291648860 4291715423 4291715172 4291717218 4291780959 4291782498 4291583583 4291322467 4291585122 4291321954 4291978335 4291518048 4291781983 4291322467 4291452248 4291915116 4291585121 4291321435 4291125859 4290536042 4291190619 4290996602 4290731355 4290137700 4290399832 4290007899 4289415513 4289481560 4289549415 4289353319 4290404198 4291060582 4291916397 4291655541 4292706157 4292707951 4292774023 4293103744 4292711032 4293103489 4292840315 4293037956 4292974191 4293232002 4293036913 4292906623 4292904817 4293167219 4293036923 4292905578 4293234555 4293035886 4292706927 4292970098 4292904303 4293036147 4292969842 4292774005 4292838255 4292903791 4292248429 4293101424 4292509802 4292379758 4292706672 4292577133 4292247918 4292641130 4292443751 4292116854 4291853675 4292245864 4293039473 4293311372 4294101903 4294037667 4294038694 4293972902 4294170534 4294170793 4294169234 4293702522 4291132275 4289348695 4289612371 4289417053 4290008671 4290270558 4291127645 4290272352 4291584862 4290076006 4290600031 4291585375 4290534239 4290864733 4291256160 4290667356 4290928478 4290077031 4291389289 4291125345 4290995823 4291126375 4291258727 4292374122 4292047974 4291716708 4289412428 4285800275 4285283939 4283833164 4283830079 4284158775 4284552005 4284223038 4284420914 4285140807 4284748854 4285015120 4285472844 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293362281 4292708468 4292969341 4292969066 4293363570 4292970357 4293299312 4293167726 4292970355 4292905586 4293035898 4292969852 4293035884 4292971129 4293561975 4293234555 4293759606 4292973434 4293365628 4292973937 4293364084 4293101683 4293036920 4292841344 4293364340 4293299059 4293101941 4293230957 4292444260 4292374121 4291319892 4289938769 4289477450 4289215310 4288098379 4288754766 4289151565 4289742674 4289872469 4290005843 4290464077 4290399578 4290463825 4290008927 4289348695 4290071130 4289414995 4290070356 4290136151 4290135122 4290399566 4290924883 4290268757 4290266700 4290729045 4290730072 4290535265 4291125602 4291057492 4291191130 4291780699 4291125857 4291648865 4291192677 4291519586 4291912549 4291716191 4291322984 4291322210 4292304229 4291586657 4291257192 4291454043 4292109154 4291847780 4291847779 4291256934 4292045928 4291650409 4291455334 4291979363 4291979620 4291781477 4291846997 4291649633 4292176217 4291781982 4291519587 4292109921 4292109929 4291980373 4291584102 4291584100 4292308070 4291520623 4291717478 4292701031 4291718245 4291980639 4291782244 4292043362 4291845209 4291387233 4292108887 4291650402 4291909985 4291518562 4291781466 4291452512 4291913829 4291453792 4292108647 4291519842 4291387746 4291387746 4291979104 4291191904 4291387484 4291585890 4291192678 4291321691 4291782507 4291322720 4291519846 4292111976 4291388517 4291980130 4292174950 4291652454 4291782505 4292110177 4291390317 4291584858 4291322210 4291454049 4291979109 4291257185 4291979876 4291387489 4291388513 4291585890 4291519843 4291780952 4291322979 4292044645 4291519330 4291323743 4291780959 4291715423 4292110950 4291321946 4291453282 4291126628 4291061099 4291125084 4290535528 4291125601 4290602865 4291321179 4289745244 4290399833 4289875546 4290006618 4290004564 4290532183 4289617519 4291518831 4291651191 4292309095 4292116848 4292576144 4292840818 4293297534 4293036661 4292972412 4293103484 4292448114 4293431421 4293166465 4292905074 4292905074 4293036921 4293232755 4292905332 4293035887 4292970094 4293233269 4293035890 4292708213 4293101426 4292904303 4292904302 4293101429 4292772719 4292642421 4292707956 4292444788 4292773493 4292313965 4292969328 4292380787 4292182124 4292641911 4292445550 4292312167 4291853933 4291983968 4292510062 4293504887 4294101395 4294036385 4294038180 4293972902 4294170534 4294368678 4293972648 4294101900 4292976758 4289484124 4289481301 4289940560 4289943135 4290469473 4289614173 4291192678 4290667879 4290668648 4291387998 4290535269 4291126111 4290665312 4290667613 4290598236 4290995820 4290077280 4291125603 4290666852 4291323234 4292308322 4292045671 4291915632 4292109400 4288823890 4285733444 4283633466 4284620619 4284421184 4283960648 4284615992 4284225605 4284814136 4284684864 4285337141 4285406789 4285931594 4285207093 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4292971899 4293035889 4292970349 4293429100 4292970351 4293101941 4293298028 4293100651 4293166979 4293035891 4292970349 4293232754 4292578687 4293824887 4293235575 4293303923 4292975227 4292973178 4293302126 4293168001 4292840299 4292970350 4293035890 4292905074 4292972138 4293298811 4293102702 4293165422 4292835918 4292307046 4291518027 4290334543 4289083985 4288691021 4288690510 4289150800 4289678159 4289805906 4289481037 4290071130 4289283667 4290005330 4289874265 4289939544 4290531931 4290005324 4289547869 4289414995 4290071129 4289545297 4289939795 4290335325 4290332492 4290269533 4290730584 4290664278 4291122780 4291124824 4291125602 4291058775 4290994273 4291323233 4291454291 4291191904 4291584860 4291519581 4291913568 4291780955 4291585123 4291126367 4291978847 4291912542 4291978341 4291520353 4291256935 4291848291 4292504678 4290733423 4291780450 4291454304 4292439143 4291716451 4292175463 4291980133 4291651937 4291388002 4291650148 4292177005 4292110688 4291912550 4291912546 4291977569 4291781726 4292305764 4292043359 4291586661 4292308842 4291521649 4292110955 4291978604 4291845729 4291452767 4291977316 4291517528 4291190879 4291190102 4291648851 4291125343 4291583834 4292108642 4291520616 4291454049 4291583577 4291060320 4291387997 4291583578 4291190365 4292044896 4291321954 4291453276 4291717986 4291650147 4291782240 4291585632 4291257190 4292108901 4291651695 4291849064 4291847009 4292111976 4291455595 4292111202 4291520872 4291585115 4292108392 4290994526 4291650658 4291584865 4291060836 4291454055 4291387745 4291518047 4291913063 4291453275 4290994527 4291780959 4292174946 4291124834 4291124833 4291979620 4291322984 4291388513 4291453282 4290993758 4291126118 4291123804 4291125598 4290533991 4291322720 4289611864 4290862944 4290923350 4290400344 4289876068 4290335339 4290797923 4290995047 4291914601 4292049533 4292116591 4292575608 4292642694 4292774275 4292708485 4293234043 4292972417 4293102972 4292970368 4292907628 4292709242 4293298289 4292709241 4293036921 4292708212 4293233007 4293167734 4292970354 4292971113 4293297516 4292511350 4292970093 4293101684 4292708213 4292968300 4292971637 4292642164 4292904819 4292643451 4292707177 4292248429 4292576880 4292969584 4292379756 4292247918 4292313967 4292312425 4292378219 4291917920 4292775789 4293837452 4294101903 4294037669 4294038694 4293972902 4294104742 4294170790 4294104236 4293770608 4291594105 4289214796 4289483102 4290072923 4289811806 4290928216 4290205783 4290140769 4290732892 4290798181 4290666341 4290667357 4290732893 4290665312 4291454821 4290206813 4290666341 4291454820 4291388253 4291258473 4291455084 4292245101 4290797153 4289478736 4285928253 4283699015 4284548165 4284488252 4283898183 4284421701 4283831863 4284879433 4284619070 4285013062 4285077566 4285538895 4284421178 4285148242 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4292970350 4293167731 4293166972 4292969854 4293167476 4293560689 4293101941 4293167476 4293167474 4292971378 4293364602 4293168497 4292972923 4292907891 4293300099 4293301379 4293301366 4293300861 4293693561 4293038192 4293167215 4293233011 4292707458 4292839298 4293561971 4293430644 4293233526 4293560172 4292770405 4292504408 4291125596 4290333268 4289151053 4287969870 4289279050 4288430928 4289544018 4289415000 4290003540 4289349721 4290595928 4289811550 4290532696 4289544776 4289941084 4290005587 4289676374 4290201681 4290006615 4290070349 4289874266 4290333528 4290334548 4290267474 4290728788 4290665313 4291124319 4291124825 4291059808 4291191649 4291320922 4291126113 4291256164 4291649119 4291783523 4291321177 4291519587 4291387746 4291323743 4291585634 4291322722 4291847262 4291125609 4291582811 4291913573 4291913316 4291453536 4291520614 4292045923 4291913828 4290994022 4291914346 4291584611 4291979363 4292109671 4292175463 4291389024 4291847779 4291977062 4291978860 4292109919 4292043879 4291454817 4291847011 4291192428 4291848808 4291915112 4292109156 4291914338 4292046442 4291586657 4291519586 4291518298 4291584092 4291582552 4291649885 4291255637 4291715170 4291388254 4291190879 4291124057 4292111205 4291715429 4291781221 4291780959 4291519837 4291453539 4290994528 4292240739 4290797148 4291976802 4291914345 4291324012 4291323494 4291583848 4291520869 4291586405 4291322987 4291980910 4291257444 4291389547 4291715683 4291388263 4291059806 4291586663 4291453282 4291321955 4291782496 4291388263 4291650657 4291782497 4291715424 4291715673 4291125609 4292044644 4291387746 4290928990 4291847525 4291781732 4291520353 4291715172 4291978852 4291783009 4291914337 4290994015 4291124060 4290534246 4291255388 4290075745 4290862174 4290793560 4290270555 4289877609 4289875031 4290336352 4290733180 4291060325 4291917422 4292307557 4291986305 4292838781 4292642415 4292970368 4293100666 4293036655 4293103746 4292643446 4293102454 4292774023 4292773487 4293101960 4292707952 4293430137 4292970350 4292970351 4293166187 4292970358 4293035889 4293035891 4293100138 4292903806 4292903548 4293101677 4292904816 4292968043 4292839540 4292643194 4292642666 4292969844 4292905076 4292248428 4292904047 4292574832 4292445549 4292246375 4292312425 4292312683 4291982944 4292311657 4293504633 4293838219 4294037395 4294038185 4293972906 4294368935 4294170276 4293972903 4294235305 4293308012 4290273374 4289348942 4289482841 4289941592 4290927711 4290139743 4290994263 4290729821 4290863975 4291060569 4290861150 4290667101 4290732635 4290666859 4290666340 4291322462 4291126116 4291323491 4291127145 4292113245 4290993246 4289545037 4285600060 4283893820 4284354876 4284488509 4284420414 4284685380 4284420669 4284619589 4284619069 4285208638 4285143359 4285077823 4285338679 4284948037 4285275463 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293166443 4293165690 4292970109 4293362278 4293102198 4293100394 4293167221 4292971379 4293166962 4293366143 4293101424 4293169029 4293301107 4293695614 4293302133 4292975482 4293366900 4292974202 4292907895 4293561455 4293167214 4292971643 4293035885 4293167469 4293299061 4293233262 4293300074 4293099628 4293164399 4292637008 4291453272 4290529112 4289217610 4289282129 4288625744 4289545551 4289085522 4289282894 4289742674 4289871948 4289808985 4290530135 4289810011 4290006876 4290008415 4290134864 4289611089 4289611083 4289676632 4289545297 4290465107 4290268243 4290333266 4290269784 4290729823 4290596426 4291124055 4291123286 4291125345 4290994274 4291584862 4290927704 4291518299 4291453533 4291126368 4291780960 4291783266 4291321954 4291912798 4292109160 4291717473 4290929509 4292109401 4290928992 4291781726 4291454568 4291520097 4291914083 4291977831 4291782755 4292175463 4291781213 4291782244 4292110696 4291913827 4292109670 4292175462 4291192166 4291848547 4291782754 4292177004 4291387497 4291649636 4292175712 4292042854 4292175461 4291716194 4291717225 4292373607 4291518551 4292238687 4291651693 4291911511 4291518555 4291584098 4291125335 4290994531 4290927959 4291715165 4291254859 4291584098 4291780959 4291060063 4291190370 4291454564 4291846496 4291453534 4291714906 4291060320 4291323233 4291190620 4291519328 4291716713 4291978594 4291980393 4291323237 4291387232 4291389029 4291521129 4291979106 4291520612 4291913315 4291585120 4291190887 4291651425 4291387484 4291979093 4291651179 4291650657 4290994526 4291585896 4291585122 4291518042 4291651425 4291323496 4291060063 4292240739 4291124827 4291585378 4291124577 4291979364 4291388263 4290928738 4291256691 4291387233 4291059808 4291125600 4291124318 4290073428 4290926430 4290202465 4290335332 4289873748 4290333270 4290334820 4290141019 4291126632 4291520127 4291783529 4291653998 4292444283 4292575355 4292446328 4292970864 4292972413 4292708230 4293299830 4293036661 4292970117 4292775032 4292970608 4292577401 4292906879 4293232755 4292839802 4293233269 4293231724 4292904794 4292905334 4292773748 4293166957 4292708211 4293035390 4293100139 4292316274 4292969584 4292775291 4292969583 4292971870 4292970373 4292837996 4292904830 4292576116 4292183665 4292446076 4292116340 4292444522 4292375640 4291917151 4292770672 4293571190 4294100851 4294037122 4294038145 4293972372 4294172085 4294368676 4293973161 4294365838 4292780456 4289943935 4289678968 4289877626 4289875801 4290928472 4290730592 4290139743 4290730838 4290600033 4291062108 4291060320 4290207334 4290733409 4290863458 4290666852 4291192424 4290996078 4292309097 4290796644 4289745503 4286194522 4284024658 4284552024 4283895639 4284752715 4284357954 4284619588 4284484668 4285080909 4285142589 4284882501 4285338680 4285143359 4284683320 4285340735 4285277777 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4292971897 4292970355 4292970349 4292970354 4293363311 4293168762 4292972143 4293364345 4292971127 4292971646 4293169011 4292776058 4293301627 4293235316 4293236350 4293365371 4293235573 4293365638 4293302122 4293102192 4292970354 4293233011 4293035890 4292970351 4293299060 4293299067 4293297773 4293231214 4292376399 4292702802 4291254102 4289939531 4289348683 4288099917 4288102992 4289084751 4289546066 4289415000 4289674832 4290007645 4290726230 4289808211 4290529875 4290004819 4289414733 4290071118 4290007390 4290200657 4289807691 4290332753 4290200660 4290529616 4290269275 4290205022 4290728787 4291254878 4291122781 4291123798 4291060066 4291385932 4291321951 4291387487 4291322455 4291125857 4291649370 4291780954 4291520098 4291519586 4291715429 4291584351 4292175457 4291715941 4291454042 4291979360 4291452518 4292108641 4291976796 4291716197 4291847780 4291389542 4292176230 4292175720 4291781470 4291518553 4292176232 4291389798 4291847779 4291847779 4292109158 4291452776 4291650918 4291847010 4292175713 4291782244 4291257440 4291519337 4292702057 4292242277 4291256169 4292108904 4291650912 4291845717 4291452770 4291584091 4291584091 4291190878 4291320411 4291322207 4291320916 4290863458 4291714911 4290994528 4291651427 4291849061 4290992206 4290994275 4291059031 4291124575 4291321950 4291518298 4291256157 4291781733 4291585637 4290863977 4291322206 4292046703 4291323237 4291388771 4291848824 4291455592 4291586934 4291520101 4291780707 4291651686 4291190887 4291454055 4291126885 4291978851 4291322209 4291781220 4291583588 4291192159 4291781216 4291322210 4292044639 4291322204 4291322203 4291583846 4291519586 4291979365 4291715173 4291257438 4291126371 4291715690 4290928735 4291386970 4291058526 4291122779 4291321438 4289613659 4290335835 4290272094 4289940576 4290990937 4290206044 4290732647 4290993755 4292307041 4292111738 4292180075 4292707453 4292576626 4292510321 4292904322 4292380278 4292970864 4292970113 4292711043 4292970111 4293166699 4292775291 4292970867 4293101165 4292905332 4293101425 4292969581 4292512380 4293101426 4293298547 4292577914 4292576628 4293101425 4292905586 4292642933 4293362298 4292511349 4293363048 4292771708 4292839285 4292839282 4292839541 4292509038 4292183922 4292773493 4292772206 4292246887 4292706675 4291982943 4291852140 4292114796 4293633142 4293838475 4294037672 4293972391 4294170791 4294104751 4294368419 4294170533 4294038182 4293835398 4291065708 4289281885 4289547089 4289417309 4290335581 4290925139 4290140761 4290731873 4290863199 4290798181 4291125087 4291387998 4290535513 4291062134 4291191393 4291521132 4292243305 4291783266 4289349964 4285796669 4284223029 4284288067 4284156235 4284224313 4283963979 4285409102 4284356931 4285668931 4284817484 4285469503 4285473357 4285077565 4285341259 4285078853 4285538893 4284945218 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4292969338 4293167475 4293167221 4293167475 4292972159 4292972664 4293364344 4293298807 4293169285 4293103212 4293300357 4293694070 4293171573 4293628530 4293693305 4292844147 4293759599 4292843368 4293693297 4293100396 4293166443 4292969598 4292839794 4293363314 4293299054 4293233262 4293496688 4293165677 4292900704 4292504408 4291453529 4290332757 4289151821 4288099918 4289279050 4289085520 4289478735 4289806417 4289872724 4289610833 4289940302 4289871955 4289415252 4289546324 4289546074 4289480788 4289741904 4289480787 4289676375 4290007388 4289349466 4290399315 4290269275 4290859604 4290728283 4290072407 4291256922 4290531155 4291125858 4291057750 4291058527 4291124568 4291191649 4290994015 4291321693 4291060319 4291388521 4291714395 4291716449 4292109144 4291849323 4291454817 4291911261 4292108893 4291518298 4291781990 4290797151 4291124831 4292109147 4291914084 4291386468 4291386973 4292371564 4291977561 4291912799 4291321953 4291322726 4291979620 4291191392 4291914855 4291652474 4291848551 4291584867 4292175719 4291649893 4292043104 4291453539 4292109927 4292175712 4291386981 4291322460 4292044132 4291716448 4291583835 4291321690 4292042856 4291190356 4291320160 4290929767 4292107359 4291191658 4291717203 4291387742 4291452757 4291059291 4291059288 4291125603 4291059288 4291059032 4291191649 4291125856 4291453276 4291388520 4291389029 4292045417 4291322468 4292110696 4291256938 4290799729 4292045671 4291061869 4291388261 4291584361 4291191143 4291585888 4291782250 4291913309 4291847780 4291126110 4291978340 4291519841 4291124834 4291781209 4291583840 4291124828 4292175208 4291323240 4291976796 4291519580 4291518048 4291781208 4291388514 4291847275 4291190619 4291321177 4291582564 4291060320 4291122520 4290601834 4290795867 4290205789 4290859352 4290989398 4289678936 4290267999 4291059055 4291190641 4291126638 4292111993 4292179563 4291590256 4292116337 4292577657 4292707697 4292906367 4292446072 4292773746 4293363824 4292775031 4292577657 4292837741 4292970868 4292905333 4292970868 4292905589 4292510836 4293232493 4292708212 4292905339 4293166957 4292576885 4293101684 4293035390 4293231978 4292708468 4292772460 4292970629 4292773221 4292642165 4292642164 4292839541 4292904047 4292182380 4292576374 4292576630 4292246631 4292248431 4292312939 4292377193 4292311128 4292050024 4293834115 4293904267 4294038695 4293972901 4294170543 4293908145 4294172082 4293973158 4294233491 4292909944 4289681749 4289347657 4289611353 4290007644 4289682010 4291450973 4290664541 4290863456 4290732133 4290667099 4290798698 4291126121 4291980132 4291127145 4292505700 4291125087 4288362575 4285798976 4283697981 4284157502 4284157245 4284356932 4284292164 4284619072 4284619597 4285013056 4285013830 4285536322 4285078076 4285144390 4284553277 4285142588 4285277776 4284618812 4284682813 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4292972930 4292971122 4292972142 4292970094 4292971385 4293298802 4293364345 4292971886 4293103217 4293300350 4293302642 4293236351 4293430391 4293629055 4293170288 4293496175 4293235053 4293694064 4293233007 4293299324 4293167470 4292970092 4293169023 4292971379 4293298804 4293299067 4293299567 4293033580 4292443749 4292374379 4291320654 4290334288 4288885323 4288753992 4288690767 4288492877 4289612108 4289151828 4289874263 4290135882 4290529876 4289416797 4289742155 4289480782 4290071386 4289676368 4289742167 4289480793 4289480787 4290201431 4289610825 4290399573 4290267737 4290204245 4290729566 4290730327 4290533728 4291123541 4291125602 4291124062 4291124062 4290468696 4291255389 4291192422 4291125856 4291519076 4291453276 4291782756 4290796374 4291453284 4291520353 4291780709 4291584607 4290994785 4291648599 4291322466 4291585890 4291979877 4291650404 4291454561 4292046180 4291978081 4291716964 4291848032 4291124828 4291519585 4291781738 4291453793 4291913566 4292175462 4291584615 4292043621 4291584874 4291847006 4291454043 4292043873 4292045413 4291386717 4291977825 4292043361 4291452767 4292043357 4291518042 4291322461 4291847526 4291190877 4291843928 4291388517 4291255386 4291255893 4291320674 4291256415 4291715169 4291516509 4290992470 4291582046 4291058511 4291124064 4291125601 4291059809 4291125856 4291256414 4291387739 4292043876 4291125350 4291257452 4290929255 4291455338 4291848301 4291585374 4291388774 4292176484 4291387744 4291060062 4292044645 4291322720 4291715941 4292176231 4291913572 4291452516 4291715428 4292044901 4291322210 4291388002 4291453538 4291124833 4291583583 4291715424 4291913831 4291715672 4291452518 4291519585 4291781220 4291256162 4291321955 4290994527 4291124059 4291059059 4290664537 4291125876 4290208104 4290333281 4289678680 4290791268 4290202720 4290599514 4291126113 4290798957 4292308581 4292573564 4292050046 4292706412 4292378237 4292510835 4292707442 4292511609 4292904816 4292774278 4292381564 4292972413 4292773490 4292775290 4292969581 4292708213 4293297258 4292971127 4292315002 4292969844 4293101422 4292904560 4292968556 4292772719 4292904558 4293233271 4292708211 4293364597 4292706668 4292971388 4292969844 4292838255 4292838255 4292838512 4292575089 4292508773 4292772464 4292640882 4292247146 4292311657 4291983199 4292375912 4291785565 4293629310 4293640312 4294036642 4293973159 4294368932 4294170286 4293973424 4294172082 4294038697 4294297981 4291724639 4289085015 4288824911 4289483101 4290530906 4290138195 4290207330 4290795869 4290141023 4290731359 4290667113 4290535528 4291126632 4291849581 4291126626 4288429646 4286061119 4283500871 4284685385 4283700303 4284356676 4284091196 4284423494 4284885837 4285148756 4285540182 4285474122 4285278545 4284948300 4284751177 4285210440 4285076800 4284224074 4284748348 4284751944 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293561725 4293102974 4293364339 4293101684 4293101683 4293497209 4292970871 4293168772 4293300597 4293301122 4293300867 4293235566 4293235318 4293233012 4293430639 4293431152 4293038957 4293233264 4293233520 4293494897 4292970100 4293365108 4293298305 4293101683 4293496430 4293299060 4293100653 4293231470 4292900173 4292570207 4290927955 4290591561 4289152334 4288099148 4288688971 4289414227 4288888143 4289676372 4289676374 4289941853 4290135888 4289676631 4290003534 4290201687 4289610832 4290071117 4289415252 4290201686 4289873233 4289676624 4289415004 4290070347 4290858062 4290137174 4290730584 4291188052 4291123541 4291125859 4291124567 4291060066 4291649115 4291059809 4291191648 4291059552 4291125079 4290993496 4290927704 4291846752 4291846752 4291060318 4291453026 4291192159 4291649376 4291256157 4291190877 4291583845 4291518046 4291322209 4291845735 4291452509 4292043624 4292110944 4291977575 4292043105 4291715423 4292176487 4291454048 4291715428 4291649636 4291650659 4291716969 4291584099 4292046179 4291847012 4291845736 4291714663 4292175712 4291387754 4291845990 4291977831 4291845992 4291845986 4291584357 4291976796 4291125859 4290862941 4291125343 4292108884 4291584092 4291321431 4290991438 4291056973 4291060324 4291058511 4291058785 4291191384 4291058786 4291124048 4291125083 4291123029 4291387999 4291515995 4291717219 4291060836 4291716961 4291651167 4291062127 4291912295 4291389802 4291125868 4291651423 4291322977 4291584362 4291847268 4291388512 4291256679 4290994525 4291913316 4291322726 4291716194 4291781220 4291124827 4291781732 4291781732 4291387745 4291650914 4291585116 4291519837 4291518041 4291256931 4292109409 4291716197 4291190625 4291321954 4291321954 4291582563 4291124574 4290072409 4290730846 4290664290 4290860120 4290204762 4290926683 4290204260 4290859350 4291189346 4291125105 4292372066 4291718009 4292243561 4291786596 4292510079 4292116335 4292576371 4292709242 4292577144 4292513149 4292838528 4292839280 4292970113 4293168248 4292576371 4292774005 4293297518 4292708469 4292969844 4292969838 4292837999 4292774005 4292838255 4292575600 4292838512 4292772718 4293100925 4292971123 4292708213 4292970094 4292772462 4292577141 4292838255 4292445559 4292772207 4292117358 4292640096 4292183152 4292246889 4292246618 4292309344 4292377450 4292310374 4292310119 4292378458 4293833091 4294102672 4294037413 4293972901 4294170543 4294171568 4294369714 4293972903 4294167695 4293505923 4290078050 4289544785 4289612891 4289351772 4291056218 4290335579 4290925914 4290206310 4290797151 4290600547 4291455336 4291390058 4291126626 4289347656 4285733959 4283897156 4284222780 4283962439 4284550217 4284683843 4284159300 4284947006 4284750408 4285340998 4284947264 4284750143 4284946755 4285471295 4284814391 4285272379 4284685118 4284746814 4284551493 4284748605 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4292970092 4292971385 4293364345 4293299065 4293101683 4293364338 4292840567 4292974201 4293693828 4292909169 4293301893 4293430381 4293496439 4293232492 4293232493 4293299312 4293298030 4293296747 4293232237 4293496437 4293101940 4293100395 4293364857 4293101684 4293496180 4293298805 4293102192 4292968302 4292441423 4292373862 4291189848 4289874511 4288952398 4288754764 4288754507 4288561999 4289216594 4289414743 4289546317 4290201430 4289611089 4289349460 4290596435 4289940057 4289414995 4290007133 4290135632 4290005844 4289676625 4289676625 4290007376 4290004562 4290857805 4290860124 4290072663 4290663772 4291124575 4291124825 4291124825 4291057750 4291057493 4291191649 4291125599 4291125857 4291912289 4291649370 4291321950 4291190622 4291583839 4291584363 4291783522 4291190364 4291584608 4291781216 4291976796 4291650916 4292108647 4291454048 4292436840 4291651691 4291649885 4291386981 4291911520 4291519340 4291255895 4292175719 4291845728 4291584355 4292176486 4291649635 4291649891 4291977318 4292175463 4291585117 4291584349 4292175720 4291782244 4292109152 4291191137 4292241505 4291452767 4291452511 4292374119 4291585125 4291911261 4292109149 4291911517 4291518305 4291256413 4291321692 4291387230 4291058004 4291055946 4291123541 4291122257 4291124053 4291121232 4290730577 4291188044 4290535268 4291123285 4291059289 4291125857 4291387235 4291125599 4291454050 4292110690 4290863978 4291257954 4292045417 4291649899 4291190368 4291191399 4291585120 4291191142 4291257708 4291649124 4291715938 4291389803 4291783023 4291518051 4291583588 4291323757 4291520352 4291649892 4291125607 4291387746 4291518304 4291715680 4291780959 4291848037 4291519585 4291714146 4290928479 4291059551 4291060064 4291122522 4291191905 4291254107 4290729049 4290206569 4290336358 4290269016 4290334808 4289613412 4290665307 4291190899 4291715936 4291783532 4291852139 4292244852 4292115310 4292116849 4292444031 4292574828 4292183664 4292577145 4292707954 4292446073 4292643191 4292775289 4292968299 4292970095 4292904559 4292772463 4292839540 4292839284 4292445804 4292969842 4292772719 4292970355 4292772719 4292772976 4292772719 4292772719 4293100395 4292903807 4292970351 4292968556 4292838770 4292508765 4292575346 4292902255 4292181866 4292245350 4292640113 4292704607 4291917928 4291983456 4292375131 4291916638 4292178021 4292973164 4293837964 4294038163 4293973161 4294170531 4294171827 4294104226 4294368675 4293973431 4293968775 4292382317 4289087317 4289676625 4289548893 4290006105 4289353055 4289810267 4290336861 4290403678 4290667872 4291324784 4291715678 4289478728 4286391108 4284289859 4284091709 4284419657 4284159037 4284290615 4284619588 4284947782 4285014603 4285343818 4285278032 4284686152 4285012291 4285078851 4284424268 4284488516 4284685118 4284485446 4285142066 4284553286 4284551492 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293496441 4292969836 4292972144 4293101683 4293364858 4292971127 4293167998 4293302390 4293566070 4293432704 4293496684 4293298030 4292706911 4293362540 4293297003 4293166961 4293297003 4293297003 4293299311 4293299566 4293298810 4293101678 4292774004 4293166956 4293038200 4293299566 4293233777 4293558632 4292836980 4292110418 4291385685 4289676881 4289217613 4288097352 4288689739 4289413971 4289085516 4290069589 4289546580 4289611094 4290136145 4290529875 4289481049 4290005330 4290135889 4290005587 4290071124 4289414990 4289546324 4289676631 4290070359 4290399315 4290269532 4290136407 4291319379 4290599775 4291122781 4291058768 4291058528 4291582043 4290994530 4291519068 4291520101 4291320916 4291060320 4291716452 4291190372 4291781969 4291387997 4291322977 4291649119 4291453795 4291190621 4291322204 4291519842 4291584100 4292044134 4291650664 4291652207 4291451995 4291848037 4291913822 4291125091 4291583066 4291716453 4291782761 4291779942 4292175718 4292109670 4291848546 4291649635 4292176487 4291518562 4292173675 4291780199 4291978075 4291389800 4291980131 4291911009 4291585381 4291911510 4291452768 4292370527 4292108647 4291453523 4291976289 4291583068 4291255383 4291057755 4291192951 4290996577 4291334559 4291262345 4290941591 4291065987 4290673290 4290799481 4291128679 4289943142 4290663760 4290598484 4291123798 4291124568 4291190871 4291060066 4291058269 4290994790 4291191390 4290994015 4291321698 4290862164 4292045157 4291780964 4291520353 4291847268 4291191142 4291322208 4292110188 4291388772 4291323236 4291979107 4291650659 4292109413 4292109415 4291125600 4292045412 4291717730 4291911255 4291715677 4291125602 4291715428 4291781989 4291060319 4291519842 4291388767 4290994528 4291122778 4290598759 4290138457 4290206567 4290338142 4290206302 4290333014 4290267734 4290860645 4291252566 4291058522 4291190898 4292374376 4292180591 4292179309 4292115567 4292705133 4292247140 4292444288 4292642162 4292116851 4292771950 4292708984 4292707442 4292642163 4292839284 4292773749 4292969842 4292838255 4292642164 4292643707 4292706157 4292839797 4292772719 4293100396 4292904816 4293100397 4293100653 4292772976 4292970096 4292970352 4292968814 4292641651 4292443237 4292968817 4292246889 4291918944 4292768360 4292247658 4292244324 4292246121 4292770399 4292311914 4292245604 4292702814 4292246121 4292377960 4293436788 4294168722 4293971105 4294171047 4294104739 4294302895 4294106034 4294170790 4294102930 4293768569 4290470491 4288627284 4289676118 4289483100 4290007131 4290929249 4290269017 4290208110 4290995044 4290797924 4288954193 4285865028 4284092233 4283898439 4284158781 4284159037 4284290372 4284685381 4284554052 4285077824 4284687953 4285275206 4285408330 4285537856 4284751689 4284816453 4284816713 4285341511 4284746557 4284551494 4284945977 4284750397 4284550981 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293300354 4292971384 4293168767 4293167219 4292970092 4292972671 4293366130 4293235326 4293628280 4293430125 4293101936 4292969326 4293427051 4293165677 4293034097 4292639050 4293427054 4293297002 4293299068 4292971883 4293301111 4293496436 4293167219 4293103232 4293495922 4293233268 4293692781 4293100142 4292769359 4292769905 4291125337 4289874010 4289412687 4288034382 4289345099 4288494672 4289217101 4289609039 4289479509 4290201686 4290071379 4290070358 4290005336 4290006875 4290005587 4289808214 4289415258 4290201674 4289611096 4290071380 4289939277 4290267477 4290270039 4290202969 4290731361 4290598237 4291058262 4291845211 4290993753 4291322207 4291386708 4291256421 4291189587 4291256416 4291912289 4291059543 4291387998 4291913825 4291518053 4292044901 4290928990 4291649381 4291518303 4291913830 4291649636 4292374113 4291386980 4291845477 4291453032 4292044909 4292371561 4291584356 4291518046 4291715941 4291452772 4292180835 4292176231 4291322463 4292439141 4291586159 4291650659 4291912545 4292044136 4291780187 4291585382 4291978332 4291977824 4292440941 4290994013 4292304232 4291517538 4291387227 4291584887 4290862174 4291921305 4290933359 4290871170 4291198348 4290805134 4291266440 4291407532 4291925623 4292061341 4292713365 4291539629 4291532942 4292130727 4291865249 4291865776 4291472563 4290543498 4290476659 4290007130 4291122263 4291120974 4291122767 4291058526 4291321438 4291125343 4291322728 4291780709 4291190626 4291649374 4291847526 4291518040 4291585890 4291781475 4291519341 4291388775 4291848563 4291518310 4291848040 4291125350 4291190624 4291649124 4291322209 4291322210 4291911516 4291518303 4291389544 4291583582 4291583839 4291649375 4291256162 4290994271 4291646816 4290468446 4291254106 4290665311 4290861916 4290139752 4291382613 4290203737 4290530903 4290268759 4290141289 4291123803 4291257707 4291585644 4292244075 4292113776 4292509053 4292114799 4292181106 4292310881 4292378750 4292641403 4292509292 4292578184 4292511608 4292707699 4292643450 4292969581 4292774005 4292640879 4292838511 4292706413 4292444543 4292838254 4292772720 4292904816 4292968557 4292641905 4293035117 4292968814 4292772978 4292837730 4292575079 4292902237 4292574819 4292181353 4292247146 4292180852 4291919201 4292705136 4292311138 4292311657 4291919207 4291785055 4292311914 4292311898 4291917928 4292571238 4293234550 4293507472 4294102946 4293972388 4294170533 4294368430 4294171825 4294170275 4293972648 4294102155 4292844420 4289808215 4289552226 4289613403 4289287006 4290926941 4290208093 4290406246 4291190364 4288494159 4285995840 4283897142 4283960392 4284421699 4284555338 4284288580 4284488010 4284619587 4284488002 4284621903 4285538120 4285015116 4285343567 4285079629 4285341254 4285014092 4285077820 4284552509 4284160070 4284814141 4284487237 4284289612 4284945976 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293496189 4293101425 4293299064 4293364857 4293101689 4293560697 4292907649 4293695350 4293173110 4293430389 4293296746 4293427307 4292640096 4293100133 4292769869 4292838006 4292705362 4293232240 4293103986 4293101422 4293298804 4293101428 4293167219 4292971128 4293496953 4293430905 4293428335 4293100141 4292835422 4292438629 4291650646 4290399060 4288888400 4288755789 4288034382 4289216592 4289151565 4289413715 4289740875 4289676887 4289545302 4290004818 4290005592 4290007131 4289349459 4290661204 4289479760 4290530133 4289740878 4289611089 4289808982 4291315783 4290728540 4290731617 4290596176 4291119697 4291385435 4290992214 4291059289 4291385948 4290993753 4291256414 4292045154 4291189845 4291322205 4291649378 4291781210 4291649887 4291846757 4290928734 4292175203 4291256930 4292108892 4291845466 4291584356 4292173412 4291125344 4292374887 4291584862 4291584349 4291584355 4291845735 4291848286 4291845735 4291716451 4291650148 4291386717 4291716203 4291125606 4292242022 4291584356 4292371550 4291518821 4292176730 4291845724 4291845978 4291715170 4291123289 4292375672 4291456628 4291197822 4291261575 4291331721 4290873229 4291134848 4290872203 4290674579 4291528583 4291206309 4292121991 4292055951 4292061877 4291208097 4291405471 4291599507 4292458924 4292124569 4292263089 4292257170 4292457896 4292919467 4292453542 4291409592 4291142043 4290541705 4290467672 4291189081 4290073939 4290664541 4291189596 4290469728 4291257184 4290994016 4290994015 4291519075 4291454049 4291454566 4291192430 4291127677 4291256934 4291258224 4290995815 4292045410 4291191142 4291324007 4291846495 4291519841 4291911528 4291911527 4291716961 4291322465 4291388002 4291716453 4291649637 4290994528 4291516505 4291125857 4290533725 4291252824 4290073692 4290793559 4290730076 4290335590 4290333269 4290334808 4290204268 4291125854 4291190884 4292176490 4292244075 4292179311 4292246115 4292179566 4291854185 4292117112 4292770408 4291854465 4292640622 4292379753 4292510580 4292905076 4292641907 4292643706 4292969841 4292445302 4292968556 4292642678 4292968811 4292772976 4292772976 4293100396 4292839281 4293493610 4293035119 4292509542 4293164907 4292378483 4293034863 4292444277 4292574559 4292641397 4292638813 4292313195 4291982686 4292707446 4291981660 4292310375 4292705120 4292245604 4292310117 4292312171 4292375124 4292246377 4292114279 4293567346 4293838215 4294037410 4293973158 4293973938 4293973424 4294171826 4294170276 4294104492 4293835122 4291131998 4289152858 4289481048 4290533726 4290139486 4290798943 4291189335 4289022035 4285995072 4283696967 4284355141 4284159293 4284091453 4284291141 4284682039 4284619844 4284292168 4285736780 4284290624 4285475661 4285278031 4284687182 4285146188 4285211470 4284488514 4284549182 4284419647 4284812607 4284685375 4285142591 4284945975 4284684608 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293298807 4292971385 4293364851 4292969843 4293166962 4293235067 4293238387 4293631360 4293628531 4293233519 4293363053 4292638814 4293229399 4292375904 4292834658 4292835188 4292771424 4292838770 4293301104 4293759612 4293103471 4292971891 4293364346 4293298808 4293037934 4293430650 4293232499 4293624425 4292311650 4293030499 4291779931 4289743182 4289412679 4288100687 4288754250 4289085520 4289347152 4289479244 4289675347 4289609297 4290530899 4289940057 4289545302 4290201429 4289742161 4289349197 4290596443 4289808724 4290466126 4290070354 4290267464 4291251798 4290596947 4291187025 4291122012 4291058775 4291384922 4291322468 4291256670 4291322207 4290993753 4291713625 4291584098 4291124308 4292112232 4291124051 4291322462 4291781223 4291190620 4291651684 4291649881 4291781215 4291452260 4291586673 4292111715 4291518563 4292175975 4291911526 4291912801 4292306020 4291913581 4291845728 4291650661 4291911521 4291650148 4291649892 4292176488 4292110424 4292309596 4291911777 4291780455 4291978593 4291845985 4291845979 4291518049 4291582835 4291718521 4290741140 4291133832 4291397263 4291527296 4291398796 4291200649 4291070356 4291395720 4291330444 4291203999 4292129441 4291924098 4291665047 4291467927 4291600015 4292520856 4292130476 4292126887 4291142049 4292060312 4291932319 4291995805 4291931039 4292387991 4291801760 4292917940 4292393895 4292983716 4291474110 4290944667 4289817725 4290664800 4290204503 4290726741 4291125080 4291125602 4291125344 4291059551 4290994015 4291322973 4291978855 4290931057 4291716205 4291584359 4291584360 4291518569 4291191398 4292174951 4291124827 4292042600 4291322464 4291125090 4291715672 4292042601 4291125089 4292042850 4291255130 4290992989 4291583076 4291124060 4290667366 4290532699 4291251541 4290730857 4290859095 4289809495 4289876326 4290334553 4290073690 4291909469 4291717750 4292111455 4291719024 4291787624 4292770925 4292115056 4292180341 4292770922 4291853187 4292312419 4292640878 4292444030 4292576371 4292773491 4292642164 4292707956 4292838254 4292248428 4293231725 4292577143 4293166188 4292772976 4292968813 4292511607 4293164651 4292707697 4293100912 4292836445 4292838250 4292706658 4292507486 4292509537 4292574065 4292245863 4292246377 4292310123 4292312169 4292702300 4291983719 4292310629 4292244839 4292703581 4292310631 4292374371 4291982431 4292310374 4292180071 4292969071 4293769861 4293905055 4294037666 4293972900 4294172082 4294302381 4294502322 4293906852 4294169769 4293501555 4290862680 4289219163 4290272353 4290798942 4290994266 4288497489 4285993533 4283896118 4283960389 4284157500 4284748357 4284748358 4284091453 4284225606 4284946492 4284424268 4284947264 4285209926 4285472587 4285274951 4285211469 4285080138 4284685381 4284226628 4284484927 4284419385 4284944953 4285073469 4284681529 4284748103 4284553278 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293299065 4293101683 4293297521 4293300601 4292905845 4293628792 4293629049 4293170537 4293430390 4293035374 4293425769 4292835418 4292440416 4292571229 4292899169 4292440911 4292770143 4293428075 4293298812 4292908390 4292973182 4292970874 4292906345 4293693560 4293628289 4293365100 4293495149 4292772209 4293229141 4292373337 4291649366 4290330194 4289150283 4288295755 4288166222 4289149517 4289217357 4288822608 4290267730 4290006100 4290070358 4289940057 4290005069 4290005850 4289480531 4290072664 4290070346 4290069841 4290070359 4289874522 4290333780 4290727508 4290726483 4290530901 4291122771 4291123294 4290991949 4291452004 4291844191 4291255893 4291320669 4291189581 4291648856 4291518561 4292043100 4291913058 4291714904 4291517784 4291190101 4291387996 4291715430 4291453794 4291782238 4292241249 4291386718 4292175975 4292107613 4291782500 4292110183 4291912801 4292306019 4291781733 4291914341 4291387999 4292108648 4291649886 4292043105 4291584095 4291978082 4291846754 4291845984 4291845990 4291911524 4291779694 4291654007 4291329405 4290608780 4291724159 4291068801 4292251274 4291003008 4290736255 4291134593 4291199090 4290805899 4291399569 4292189325 4291403931 4291534227 4291664023 4291861660 4291406761 4292389537 4292191908 4292454797 4292061851 4291801001 4292058005 4291533464 4291074965 4291998369 4292323231 4291472776 4292392874 4292258195 4292984235 4292787886 4292393639 4291931816 4291005584 4289749615 4290727252 4290596945 4291124318 4291125600 4291124578 4291060582 4290994531 4291060841 4290928993 4291388000 4291716195 4292307814 4291190112 4291388769 4291847525 4291191136 4291781989 4291583838 4291649638 4290797406 4291913574 4291385954 4290991707 4291124062 4291059800 4291122779 4290598759 4291255901 4290729564 4290204506 4290205800 4290465122 4289874005 4290923861 4290793560 4290404713 4291586148 4292308843 4291587695 4292835178 4291855235 4292113002 4291984255 4292114028 4292770923 4292050550 4292442747 4292116592 4292642163 4291986295 4292970611 4292445043 4293034877 4292642677 4292641136 4292705891 4292641393 4292838512 4292378986 4293034608 4292640864 4292444019 4292968283 4292641909 4292444276 4292507486 4292510582 4292966496 4292574579 4292179541 4292638045 4292243555 4292310374 4291918176 4292310629 4292703085 4292245093 4292310375 4291983456 4291985251 4292374373 4292245094 4292377449 4291785309 4293432685 4293706628 4294102434 4293973159 4294170531 4294104494 4294303919 4294369713 4294170276 4294166154 4292316791 4290007644 4290994528 4291060578 4289350491 4285929534 4283896646 4284155723 4284418875 4283962695 4284092224 4284225079 4284620101 4284287293 4285208636 4285670219 4284949323 4284947011 4285274687 4285340223 4284488258 4284357961 4284817223 4284419900 4284422461 4284554566 4284684863 4285274687 4284683322 4284551737 4284747071 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293299054 4293101685 4293496172 4293496441 4293235573 4293563768 4293563001 4293629045 4293233520 4293428334 4292377188 4292506193 4292831051 4292043100 4292637278 4292505694 4293097569 4292970610 4293430644 4293627509 4293496429 4293628018 4293496186 4293232761 4293170536 4293430401 4293429356 4293166959 4292770142 4292637280 4291189327 4290334031 4289018190 4287574347 4288821838 4289084238 4289215562 4289347408 4289675347 4289676110 4289872468 4290006100 4289806926 4290070100 4289414997 4290071123 4289415252 4290135377 4290464852 4290069322 4289939032 4290924365 4290072668 4291254877 4291059295 4291057757 4291516243 4291845476 4291384914 4291255133 4291256677 4291649884 4291125348 4291977314 4291452767 4291650144 4291715936 4291911009 4291584096 4291518310 4292042843 4292045925 4292374632 4291059039 4291715678 4291780199 4291845992 4291584349 4292107882 4291780193 4291977826 4291780444 4291585376 4292105562 4291650917 4291650654 4291650658 4291650659 4292172896 4291451995 4291847265 4291257449 4291454322 4290799484 4291001984 4290872719 4290998649 4290674825 4291594132 4291266953 4290936209 4290148976 4290736007 4291594890 4291134595 4291856262 4291267457 4292516502 4291136143 4291927189 4292189065 4291599259 4292587410 4291666332 4291868341 4291405992 4291865494 4291404198 4291141790 4292322447 4291469723 4292327853 4291535762 4292260010 4292065437 4292261294 4292587931 4292854968 4292655009 4292721829 4292524472 4290280072 4290529876 4291187800 4291122779 4291124575 4291123284 4291059808 4291191387 4291322483 4291649121 4291847522 4291583330 4291455853 4291321440 4291256935 4290863460 4291847524 4291190882 4291451233 4291256675 4291450457 4291322211 4291386202 4291060321 4291122779 4291189084 4290727767 4290140254 4290204764 4290204508 4290925144 4289875288 4289350489 4290336364 4290137175 4291125599 4291782249 4291848807 4292834409 4292180838 4292639596 4292641650 4292703593 4292116081 4292114803 4292639595 4292641135 4292116592 4292378493 4292641904 4292512121 4292903788 4292642676 4292904047 4292706672 4292509553 4292509552 4293034605 4292706930 4292509025 4292509025 4292575347 4292444534 4292900703 4292902752 4292901220 4292507998 4292507505 4292571993 4292576375 4292639339 4292244837 4292245350 4292702310 4292637805 4292179029 4292310375 4291983713 4292310117 4292704369 4292244308 4292703840 4291983713 4291980384 4292244837 4293505146 4293970315 4294038440 4293972643 4294172079 4294105785 4294107069 4294369714 4293972133 4294165636 4291392356 4290864479 4289676372 4286259013 4283897155 4284026182 4284027451 4283963725 4284224841 4284555081 4284553795 4285145164 4285013314 4285211727 4284490316 4285211470 4284750398 4284947011 4285014604 4284552260 4284092989 4284419899 4284818767 4284489804 4285339965 4284682815 4284750399 4284748863 4284550975 4284685120 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293429356 4293297776 4293234816 4292971893 4293629816 4293565043 4293564019 4293430639 4293297006 4293033823 4292505920 4292505182 4292040789 4292108388 4291912537 4292573538 4293033307 4293560942 4293431157 4293430900 4292908398 4293495680 4293233778 4293236089 4293628281 4293627768 4293365359 4293560179 4292704611 4292962905 4291388246 4290331471 4289018702 4288294729 4288229193 4289214283 4289018188 4289281616 4290004297 4289413203 4289152085 4290070094 4289872726 4289543761 4290661448 4289938516 4289480794 4289808727 4289740884 4289876055 4290464339 4289807697 4290858584 4290662490 4291320925 4291055949 4291386976 4291253834 4291714139 4291256151 4291255900 4291843928 4291584353 4291584095 4291584103 4291977046 4291518305 4291911766 4291584098 4291518303 4291979366 4291124828 4291845468 4291845980 4292175977 4292043867 4291388513 4292043873 4291979111 4291782751 4291845986 4291976034 4291911259 4291453272 4291714907 4291912541 4291519094 4291520107 4291787147 4291919487 4290931583 4290667116 4289883004 4291198582 4291856519 4291068274 4291132546 4291002751 4291066494 4291330429 4291525493 4291393930 4291333004 4291266173 4291328885 4291397268 4291397522 4291527552 4291467932 4291265411 4291859081 4291728263 4290810774 4292714889 4291273119 4292391071 4291928483 4292586896 4291994271 4291538592 4292517770 4292127144 4292326043 4291864218 4291864991 4292327063 4292588971 4292130211 4292787133 4293248172 4292721826 4292919469 4291405480 4289423216 4290726994 4291252567 4290599775 4291124576 4290929530 4291452765 4290799736 4290864240 4290995558 4291387753 4290928734 4291321696 4291913060 4291583845 4291256156 4291388514 4291844703 4291322205 4291060064 4291124318 4291124318 4291123291 4290007644 4290729564 4290731359 4290726229 4290797151 4290858069 4289878122 4290136660 4290270299 4290729564 4291060063 4291584105 4292244589 4292114290 4292637033 4292574575 4292179813 4292247657 4292309858 4292115057 4292443261 4292575597 4292444286 4292640617 4292445066 4292378233 4292707715 4292510835 4292706672 4292707688 4292509553 4292575344 4292509809 4292575604 4292573020 4292575606 4292574050 4292574031 4292575863 4292179286 4292509028 4292573538 4292573790 4292180845 4292637012 4292244838 4292246889 4292307302 4291851619 4292637806 4292635980 4292639347 4292243283 4292640628 4292638815 4292245096 4292245079 4292376168 4292309610 4292241254 4292905571 4293703558 4294102413 4294038717 4293973947 4294106030 4294303662 4294303664 4294369971 4294169509 4293239417 4289742415 4286719305 4283827266 4284026438 4283634505 4284026176 4284615747 4284158524 4284226627 4285407302 4284490574 4285603139 4284881218 4285408072 4284946754 4285144390 4285144390 4284880457 4284815419 4284224580 4284818768 4284687181 4284947273 4284682557 4284618303 4284157751 4284616519 4284489287 4285076020 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293299065 4293233272 4293627511 4293562993 4293565828 4293170542 4293627000 4293232500 4292967515 4293162594 4292505165 4291778388 4291583061 4291123269 4292437864 4292509296 4292707700 4293167216 4293038699 4293628021 4293235051 4293235824 4293430132 4293627507 4293561977 4293169782 4293429358 4293033305 4293100403 4292571469 4291581025 4290004811 4289018702 4288293702 4287771465 4288754250 4288760416 4289414478 4289871955 4289217615 4289412939 4289938262 4289676874 4289940057 4289348176 4290267474 4289872718 4289937235 4290331208 4290466653 4289742936 4290989138 4290792792 4290073429 4290662490 4291124568 4290467671 4291123799 4290993249 4291320147 4291321436 4291255899 4291190363 4291321950 4291256669 4290863202 4291256413 4291451494 4290861646 4291847010 4291322466 4291583584 4291913823 4291649894 4291387230 4291845730 4292043880 4292043873 4291387231 4291845980 4291387998 4292170085 4290996338 4291580525 4291260288 4291790745 4291594373 4291987343 4290214529 4291193721 4289485419 4290796895 4290670980 4290144881 4290996857 4290934143 4291132275 4290806138 4291131523 4291196275 4291262335 4291661195 4292051326 4291463563 4291131507 4291397247 4291594119 4291401353 4291397269 4291992205 4291532707 4292188808 4291924634 4291466648 4292392089 4291925647 4291990678 4291472023 4292191889 4291336598 4291933853 4292454288 4291735463 4292394669 4292193693 4292130229 4292787622 4292852126 4292130206 4292328113 4292723125 4292722091 4292721578 4292723379 4290086802 4290071136 4290201683 4291256418 4290601314 4291124060 4291124576 4291060578 4291649398 4290994268 4291582561 4291125620 4290994013 4291387490 4290928991 4291910245 4291451746 4290994528 4291122522 4290532443 4291123291 4291123548 4291187545 4290531417 4291253081 4290728537 4290270054 4290004307 4290070099 4289940579 4290336604 4290726229 4291059037 4291124576 4292439909 4292112492 4292180837 4292574062 4292641393 4292049777 4292705648 4292311397 4292180579 4292834682 4292049516 4292446084 4291983226 4292116848 4292574829 4292510837 4292641390 4292838017 4292901983 4292509810 4292574817 4292180824 4292575863 4292574816 4292574564 4292571997 4292576118 4292180327 4292967536 4292115544 4292573041 4292572236 4292573553 4292179302 4292638044 4292245351 4292703069 4292245351 4291916896 4292637533 4292243815 4292243299 4292179542 4292637550 4292245096 4291983712 4292178018 4291917151 4292439644 4293829739 4293906082 4294037921 4293972899 4294368430 4294303919 4294303406 4294303921 4293973160 4294233754 4289676882 4283500354 4283635271 4284484419 4284223049 4284422210 4284291399 4284292420 4284616004 4284552763 4285604940 4285076796 4284947780 4285014860 4284946754 4285341770 4285276741 4284291144 4284621389 4284226371 4284683321 4284751430 4284682044 4284620101 4284554047 4284814153 4284485939 4284812851 4284814908 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293035890 4293693303 4293171588 4293564023 4293566590 4293563258 4293363820 4293494380 4293493357 4292571231 4291845716 4291053903 4290724941 4291251023 4292044884 4292770672 4293032793 4293365105 4293233524 4293564275 4293429626 4293629049 4293365364 4293365619 4293561972 4293562996 4293561197 4293494638 4293032796 4292964451 4291979339 4290004563 4289083981 4288361804 4287903052 4288493899 4288167244 4288624717 4289151564 4289546072 4289480279 4289350739 4289610581 4289545039 4290003785 4289283667 4289479504 4290267468 4289349967 4290135638 4290071897 4289808729 4290203995 4291316818 4290595928 4291121236 4291450970 4291057502 4291385939 4291319386 4291060065 4290994529 4291975000 4290862937 4291843167 4291583570 4291846239 4291584091 4291256672 4291583057 4291583841 4291781215 4291452511 4291650911 4291911522 4291650405 4291649886 4291651173 4291910233 4292040549 4292039011 4292243811 4293178016 4291985801 4292381830 4291265935 4291132017 4290606465 4290733161 4290603375 4291321687 4290929280 4290208369 4290078331 4290670704 4290803079 4290670194 4290668140 4291259760 4290407021 4291856247 4290999922 4291129713 4291135371 4291461505 4291791764 4291592834 4291855236 4291593603 4291073685 4292842892 4291533466 4291600805 4292255630 4291595930 4291402389 4291993752 4292519065 4291867306 4292585616 4291859092 4292131763 4292784535 4292259988 4292329133 4292260501 4292588191 4292195751 4292655790 4292786330 4292522662 4292723124 4292657075 4293182381 4292985015 4291471767 4289553012 4290202460 4290338157 4290729050 4291124574 4291124317 4291124059 4291125600 4291060064 4291058267 4291125600 4290992732 4291648355 4290992989 4290994784 4291125344 4291125857 4291124574 4290532443 4291122009 4291122266 4291189340 4290139228 4290334553 4290398806 4289876059 4290135893 4289415256 4289807958 4290599260 4291974499 4291651690 4292110180 4292639340 4292574575 4292574061 4292508525 4292639854 4292244322 4292115059 4292703851 4292510320 4292641136 4292639338 4292114541 4292115055 4292576629 4292708212 4292902509 4292707688 4292511095 4292509552 4292966498 4292571998 4292573535 4292573041 4292178526 4292573554 4292572748 4292508270 4292966752 4292574578 4292573038 4292508255 4292573296 4292638043 4292638832 4292244838 4292179558 4292703069 4292244322 4292638316 4292637514 4292179560 4292638834 4292572508 4292637271 4292311915 4292245336 4292767324 4292177764 4292705636 4293703552 4293904797 4294038179 4293973936 4293908924 4294304699 4294435760 4294567339 4294234248 4288357704 4283040560 4283567933 4284091204 4284420675 4284159565 4284292163 4284617796 4284488511 4285407305 4285472586 4285078854 4285406271 4284554053 4285015630 4284879925 4284550980 4284616515 4284619587 4284487744 4285738844 4284226888 4285078850 4284027197 4284621646 4284684873 4284812594 4285736010 4285273144 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293495935 4293169268 4293628784 4293565561 4293564267 4293562223 4293298031 4293034084 4292441696 4292110159 4291120720 4289806922 4289675338 4291124308 4292635994 4292444515 4293624170 4293036143 4293628538 4293562996 4293236592 4293430388 4293432685 4293364603 4293562989 4293364859 4293560168 4293298544 4292706145 4292963933 4291517276 4290070354 4288559183 4287834950 4287311689 4288887375 4288755790 4288626257 4289085264 4288953679 4289478737 4289676117 4289676367 4289217359 4289610576 4289349203 4289742411 4289676889 4289938004 4289545553 4290465102 4289807943 4290333529 4290729560 4290663260 4291122266 4291450969 4291058519 4291056724 4291385178 4291060065 4291125601 4290929250 4291385427 4291650145 4291450715 4291190878 4292042839 4291583333 4291584091 4291583840 4291322467 4291911522 4291911516 4291453029 4292106850 4291453018 4291713382 4291385433 4291134855 4291520363 4291454565 4291059816 4290999406 4291062897 4290602084 4290733935 4290142569 4290800239 4290798690 4290535031 4290208096 4290273911 4290342755 4291129216 4291193965 4290344822 4290669696 4289489014 4291325038 4290936707 4290340477 4290935680 4291593848 4291460473 4291661451 4291332221 4291070860 4291728280 4292124059 4291594892 4291923075 4292124822 4291268231 4291471770 4291861157 4291800737 4292261025 4291664026 4291475360 4291933876 4292390287 4291736998 4292785048 4292123811 4292261793 4292852644 4292062370 4292195742 4292789176 4292787361 4292457646 4292854453 4293380016 4292985510 4292656821 4292721076 4290480774 4289023845 4290333268 4290793817 4290729307 4290599518 4291124318 4291124318 4291124061 4291125600 4291125600 4291058525 4291059800 4291646561 4291060320 4291124062 4291122779 4291124830 4291121247 4290530134 4291187801 4290203481 4289875813 4289875802 4290005079 4290005849 4289608782 4290335580 4291251797 4290927965 4292043366 4292702824 4292572009 4292572779 4292444785 4292968813 4292573806 4292182121 4292705646 4292047726 4292639597 4292116850 4292444542 4292444542 4292639596 4292575341 4292378493 4292509807 4292509296 4292706671 4292774007 4292115816 4292182124 4292640099 4292572507 4292572014 4292965728 4292508515 4292966755 4292116589 4292571745 4292508511 4292968048 4292571483 4292246378 4292180585 4292638043 4292639088 4292179559 4292638302 4292179558 4292637551 4292638046 4292246105 4292246378 4292246122 4292246375 4292701289 4291916899 4291851113 4292114022 4293956721 4293641879 4294037922 4293972656 4294303918 4294239164 4294502069 4294500509 4293100639 4283236402 4283501385 4283831114 4283831104 4284157501 4284354371 4284618052 4284684348 4284816457 4285341511 4284948299 4284750920 4284686152 4285014605 4285272380 4284553285 4284289348 4284223300 4284488259 4285278288 4284946752 4284616004 4284421182 4284223808 4284945977 4285076019 4284750915 4285276235 4285537861 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293169006 4293630590 4293501313 4293565559 4293563270 4293429099 4293166962 4292770894 4292701276 4291646547 4290198852 4288756304 4290132298 4291384920 4292044629 4292507489 4293166960 4293035887 4293629044 4293628782 4293235570 4293235825 4293430644 4293431155 4293563509 4293627506 4293563005 4293493098 4292770399 4292373352 4292042579 4290004039 4288754246 4287902538 4287378253 4288426569 4288164939 4289279050 4289085264 4289414480 4289283151 4289348687 4288822351 4289480531 4289610576 4289742411 4289742425 4289742153 4289481050 4289611094 4290660950 4290399834 4289807698 4290335325 4290397257 4290729304 4290534496 4291122263 4291123294 4291123798 4291124320 4291057228 4291452254 4290990674 4291321956 4291256412 4291321699 4291126113 4291255635 4291256158 4291651171 4291125340 4291911779 4291518297 4291518566 4291648096 4291912280 4291386976 4292371803 4294424446 4291774025 4290664800 4291192168 4290601066 4290667375 4290732648 4290730842 4290273387 4290207340 4290207337 4290865269 4290274666 4290143596 4291325557 4290410880 4291063679 4290145140 4290208362 4290931571 4290606465 4291001472 4290998891 4291129972 4291131763 4291134594 4290872205 4290803066 4291726221 4291790189 4291924871 4291594632 4291004554 4291730074 4291594119 4292389784 4292189571 4291139489 4291865244 4292784798 4292784810 4292261279 4292720033 4292124829 4292129957 4292326808 4292261273 4292589740 4292655005 4292849047 4292587169 4292131254 4292787882 4292524463 4292130483 4292328629 4292920236 4292985253 4292592307 4291207324 4289487986 4289872978 4289810779 4290992221 4290729563 4290729050 4290732902 4290663002 4291126114 4291124574 4291122523 4291059294 4291122523 4291123797 4290599519 4290665054 4290600287 4290662489 4291255389 4290792277 4289812324 4290660178 4289810267 4290071127 4289546338 4290660691 4290071651 4291124317 4291783011 4292111723 4292572009 4292443502 4293229165 4292444272 4292510065 4292573288 4292572780 4292574318 4292640109 4292114800 4292245859 4292115568 4292639852 4292443262 4292443002 4292640878 4292576886 4292706927 4292705132 4292575601 4292637544 4292179301 4292178026 4292639073 4292507230 4292506975 4292507745 4292506974 4292969587 4292506716 4292571500 4292574304 4292180328 4292639327 4292573553 4292570969 4292178020 4292638302 4292639073 4292178019 4292638045 4292247917 4292244324 4292639583 4292638574 4292639594 4292310374 4291983455 4292308328 4292115303 4293697908 4294104230 4294170789 4294500527 4294304180 4294302361 4294424436 4286453823 4282712893 4284027968 4283893571 4284484420 4284355140 4284226892 4284552259 4285012547 4285146702 4285340744 4284881218 4285669189 4285668422 4285208123 4284355646 4284289350 4284093245 4284552516 4285079107 4285273404 4285144901 4283963966 4284484671 4284419385 4284683066 4284683577 4285537862 4285471033 4284550970 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293564280 4293499766 4293763956 4293564268 4293366388 4293232495 4292967771 4292967014 4291912806 4291120709 4288561232 4288030789 4289282639 4291122762 4292636264 4292902496 4293165421 4293496181 4293170807 4293235569 4293038193 4293628788 4293629044 4293167988 4293627501 4292972664 4293429613 4293032031 4293099348 4292964192 4291517516 4290136660 4289213771 4287180874 4288097862 4287770441 4288297550 4288691537 4288759378 4289019215 4289347152 4289085516 4289676367 4289806156 4289610831 4289807960 4289217363 4289414743 4289742165 4289742166 4289547097 4290265939 4290399565 4290004310 4290463825 4290073429 4291251543 4291122773 4291122772 4290532701 4291124055 4291122264 4291056470 4291059040 4291389023 4291256420 4291321949 4291321949 4291256420 4291256413 4291649633 4291712605 4291911773 4291322718 4291583069 4291519068 4291710299 4291320150 4293704087 4291915620 4287575369 4290399073 4290142830 4290796636 4290537583 4290206821 4290864236 4290141029 4290799721 4290208356 4290274146 4290204247 4291191675 4290670445 4290603642 4291393389 4290996073 4290473842 4290147445 4291129214 4290736499 4291127919 4291001989 4290342012 4290804362 4291130742 4291066497 4291595391 4290873239 4291200393 4291596678 4291332490 4291799964 4292584600 4291337128 4291602588 4292127899 4292389530 4292391333 4291735704 4292780698 4291868063 4292721060 4292257176 4292654241 4292328876 4292652442 4292061094 4292197026 4292589731 4292589217 4292524722 4292920502 4292721055 4292525240 4292525239 4292394422 4292262573 4292984997 4292787118 4289556081 4289283671 4289150538 4290530915 4289810019 4290338150 4290204764 4290663251 4291252825 4290010723 4291254107 4290535778 4291188572 4290599774 4290598492 4291185749 4290795869 4289808214 4290925400 4289810532 4290334306 4291055447 4289086549 4290003537 4289218136 4290859608 4290993501 4292305511 4292702567 4292506473 4292902001 4292772204 4292444016 4292968557 4292510066 4292573287 4292576113 4292113261 4291590007 4292769641 4292115313 4292179821 4292113773 4292310368 4292115057 4292049008 4292575344 4292706928 4292576888 4292180310 4292638830 4292636010 4292180566 4292571757 4292900448 4292505966 4292967790 4292508514 4292573793 4292179302 4292572253 4292640371 4292572509 4292179301 4292574304 4292637548 4292179301 4292245094 4292637548 4292572520 4292180326 4292640369 4292179046 4292246118 4292247916 4292244067 4292313196 4292245862 4292179557 4292838002 4294035338 4293971876 4294369192 4294038956 4294557043 4288756307 4283170879 4283371335 4284222790 4283701577 4283832640 4284091454 4284815687 4284618812 4285800519 4285277000 4285144133 4285079365 4285604430 4285473611 4284490572 4284286788 4284223287 4284619845 4285078083 4285145676 4284161092 4284223037 4284486462 4284618822 4284684349 4285340992 4285668680 4285538115 4283566389 4283238710 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293564022 4293565571 4293500035 4293561727 4293363826 4293688935 4293032801 4292504935 4291845208 4289411659 4288163401 4288162630 4289347662 4291121997 4292109419 4292508002 4293230170 4293235828 4293628788 4293562996 4293563257 4293627252 4292842862 4293495667 4293562228 4293430644 4293625706 4293559405 4292702049 4292962905 4291517018 4290660171 4288559439 4287966790 4287375690 4288429135 4288821326 4288757834 4289348179 4289217106 4289740110 4289480534 4289480278 4289217364 4289217364 4289612115 4289217364 4289414736 4289742167 4289742160 4289741910 4289940307 4290464595 4289744732 4290859093 4290728539 4290531419 4291122772 4291121493 4290532957 4291122260 4291124055 4291124576 4291121745 4290994786 4291582042 4290993247 4291450969 4291649894 4291715169 4290796630 4291847015 4291453024 4291584090 4291518561 4291517521 4291716200 4291385944 4293230174 4290794071 4289613659 4290859352 4290731871 4290598748 4291322981 4290141021 4290207078 4290733406 4291127932 4290599791 4290207594 4290340205 4290210671 4290079861 4291257709 4290736244 4289621099 4290209911 4290670201 4290602349 4291000707 4291130738 4290736244 4291259247 4291132275 4291329656 4291134324 4290739842 4291460471 4291989378 4291464331 4292055432 4292119943 4291866027 4292126596 4291928478 4292257943 4292452750 4291799710 4292457117 4292326549 4292325277 4292718751 4291933846 4292785312 4291471521 4292656303 4292851865 4292522407 4292523434 4292523681 4292722091 4292458928 4292722877 4293051822 4292985516 4292196003 4292198590 4292919989 4293051823 4292987832 4291207075 4289351009 4289543503 4290074205 4289939287 4290464599 4290923864 4290138712 4291385171 4290531418 4291254620 4290531161 4291254876 4291121753 4291255133 4290203225 4289811291 4290335589 4289873749 4289875802 4290399827 4290071127 4289217877 4290530391 4290729316 4290990943 4292176486 4292113261 4292573291 4292444527 4292968316 4292839022 4292378481 4292903020 4292444528 4292573805 4292639854 4292311394 4291919746 4292833638 4291592052 4292179566 4292243819 4291589234 4292768616 4292574318 4292903021 4292510570 4292572525 4292509040 4292572763 4292571757 4292508016 4292900192 4292508495 4292508786 4292509538 4292508769 4292573296 4292573280 4292180840 4292570969 4292639087 4292572521 4292179300 4292640370 4292179300 4292179299 4292574577 4292574576 4292507502 4292572250 4292574578 4292571737 4292641653 4292180069 4292641137 4292509809 4292704873 4293697143 4294104747 4294169751 4294752358 4289085272 4282974778 4284026182 4284159047 4283832383 4284026183 4284352581 4284421176 4284750142 4285210184 4284357187 4285012291 4284751689 4285277000 4285538123 4285012803 4284224579 4284224835 4284749885 4284620102 4285079106 4284356169 4284160317 4284290629 4284420926 4284748092 4284490575 4285408330 4285408329 4284158780 4283238454 4283304246 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293565570 4293562992 4293564531 4293562990 4293429870 4293164646 4292899680 4291713623 4290136390 4288556874 4287770183 4288163401 4289545041 4291451992 4292242260 4292506976 4292968302 4293298800 4293628783 4293564013 4293563257 4293364595 4293429869 4293170560 4293561977 4293365876 4293428594 4293099612 4292767827 4292831833 4291648089 4289611859 4288752712 4287375175 4287442759 4288492619 4288101713 4289344330 4288561999 4288758865 4288956758 4289546336 4288891744 4289546839 4289480015 4289546330 4289873488 4289414743 4289612115 4289546323 4289350746 4289871698 4289941596 4290398807 4290203739 4290727508 4291189846 4291125345 4290528849 4291187546 4291124312 4290532444 4291124318 4291124576 4291123285 4290993247 4291058005 4291452005 4291450970 4291190362 4291649640 4291257180 4291975771 4291647581 4291912038 4291912031 4291385942 4291853172 4289874251 4290728026 4290795357 4290727769 4290601057 4291256928 4290599260 4291189096 4290076263 4290994013 4290668394 4290732650 4290797152 4290141548 4290800499 4291260017 4290605941 4290475139 4291127923 4291128953 4290079346 4291132030 4291062382 4290867586 4291452762 4290015862 4291068293 4289946734 4290734983 4291789430 4291983485 4291726992 4292054142 4291728524 4292124301 4291860369 4292193702 4292453776 4291859082 4291475363 4292518287 4291600548 4291799986 4292392341 4291797403 4292126109 4292197553 4292918178 4292588702 4291999414 4292984996 4292653982 4292458161 4292920495 4292919461 4292261284 4292722612 4292328629 4292787625 4292788145 4292459445 4292986047 4292985781 4293315496 4291276469 4289744481 4288953420 4289611338 4288825431 4289546073 4289612121 4290333528 4290794330 4290729820 4291320412 4290071897 4290795356 4290139228 4290334808 4290399329 4290335587 4290400600 4289873493 4289876326 4290203747 4289676629 4290070100 4290204517 4291123033 4291386722 4292768103 4292966254 4292444528 4292837227 4292968317 4293034087 4292902780 4292968571 4292509806 4292575600 4292640111 4292243300 4292113005 4292244075 4292242536 4291719536 4292242793 4292111722 4292114030 4292575857 4292575088 4292510064 4292967538 4292506984 4292965986 4292506956 4292507761 4292507502 4292900715 4292901216 4292902262 4292506716 4292573280 4292573295 4292572778 4292179301 4292638042 4292179302 4292573789 4292966258 4292573293 4292573790 4292506716 4292967010 4292509042 4292508783 4292967539 4292116073 4292573032 4292511351 4293034603 4292443007 4293827701 4294034043 4293958777 4288361288 4283435314 4284157774 4284029766 4284224316 4284356165 4284551998 4284422715 4285013059 4284421182 4285863997 4284291909 4285209148 4284489030 4285668418 4284227402 4284484412 4284029254 4285080395 4285539148 4285604939 4284881224 4284687181 4284092733 4284619587 4284488516 4284880962 4285934412 4286461005 4284949065 4283106874 4283304244 4283828285 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293565313 4293565054 4293563251 4293626477 4293297262 4292770654 4292636249 4290991957 4289215816 4288294730 4287180359 4288754765 4289676871 4291121484 4291913827 4292901202 4293361515 4293233520 4293235825 4293235328 4293170813 4293562494 4293564536 4293364595 4293562227 4293364846 4293232750 4293361773 4292834893 4292046954 4291714124 4290267213 4288688457 4287377994 4287375175 4287772239 4289410378 4287971408 4289413714 4289216593 4289545557 4289677655 4289283164 4289483875 4289217630 4289873493 4289150029 4289610836 4289347408 4289808734 4289544268 4290071636 4289480786 4290466395 4290269274 4290792535 4290729565 4290531161 4291255642 4290534240 4290532686 4291123293 4291124575 4291121750 4290994264 4291583078 4290992470 4291714138 4291255894 4291648089 4291584346 4292106596 4291387739 4292107102 4291255139 4291515221 4292770162 4292767841 4289678169 4290729565 4291189591 4290664791 4291252825 4290140511 4290268248 4290074460 4291386203 4290076008 4290797152 4290667363 4290669426 4291322982 4290338158 4291131506 4290665055 4290931053 4290802026 4290343032 4291128434 4291785834 4291656049 4291128175 4290273399 4291067778 4291390070 4291660424 4291457642 4291003782 4291134326 4290671997 4291989892 4292053130 4291728011 4292386955 4292053377 4291866011 4292450196 4292189077 4292327329 4292327321 4292716433 4292259232 4292130990 4292721317 4292587164 4292327342 4292591285 4292785053 4292457905 4293051316 4293047713 4292392616 4292657333 4292920239 4292918433 4292393646 4292328118 4292722609 4292330175 4292918704 4292986302 4292986048 4293708976 4291474078 4289093489 4287836226 4288756811 4289413189 4289545804 4289283409 4290530392 4289744218 4290335836 4290859353 4290205020 4290334552 4290334051 4289875544 4289808993 4290399842 4290336604 4290464853 4289610836 4289479506 4289676629 4290267477 4291124828 4291912825 4292111463 4292443758 4293228909 4292707952 4292968295 4293623414 4292969834 4292771436 4292511350 4292573804 4292574318 4292637802 4292569702 4291454317 4291915374 4291520100 4292177507 4292109925 4292177259 4292244577 4292575601 4292772721 4292443748 4292507759 4292506714 4292507762 4292901728 4292900466 4292442716 4292508786 4292507998 4292573538 4292113767 4292965728 4292507228 4292573553 4292573278 4292573294 4292572783 4292508254 4292573037 4292180584 4292572782 4292509538 4292573535 4292573278 4292510069 4292574559 4292903279 4292444016 4292968812 4292969581 4293560686 4292835944 4287703362 4283567944 4283700800 4284683075 4283964736 4283960392 4284552263 4284422717 4284748867 4284815936 4284620359 4285077053 4285537860 4285275722 4285602631 4285013060 4284616503 4283830598 4284553794 4285737294 4285536320 4284420672 4284228426 4284091963 4284224566 4285080653 4285342279 4285932872 4286330713 4284947268 4283829318 4283303986 4282843199 4287648100 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293564796 4293564535 4293562228 4293232495 4293229408 4292965473 4291582813 4290200646 4288623693 4287705161 4288490567 4288689739 4289478741 4291126372 4292307556 4292440671 4293363053 4293430896 4293628790 4293564012 4293562233 4293563255 4293365887 4293364843 4293562235 4293563509 4293230954 4293361770 4292704611 4293092190 4291255126 4289742413 4288752198 4287312202 4288622151 4287706447 4289281102 4288823123 4288693585 4289216592 4289481058 4289282898 4289480277 4289611864 4289414485 4289612121 4289414742 4289807958 4289610580 4289348943 4289742423 4289610838 4290726485 4289742680 4290400602 4290333779 4290140768 4291253337 4290531162 4291123292 4291121236 4291121754 4290533206 4291059545 4291976291 4291515986 4290992471 4291254610 4290928994 4291256670 4290863457 4291584090 4291911767 4291453274 4291713382 4291912542 4293707915 4291118673 4290073694 4290729565 4291254101 4290139992 4290794075 4290268761 4290137432 4290796906 4290666079 4290796892 4290406273 4291522167 4290663772 4290535522 4291129457 4291191143 4290076771 4290603373 4291523712 4291325290 4291196784 4291064180 4290211709 4291126645 4291265403 4291129197 4291197284 4291061614 4290544767 4291130496 4290936709 4291792525 4290739840 4291595396 4291725954 4291075491 4292252045 4291528326 4291931041 4292392341 4292319639 4292324260 4292195752 4292716174 4292258732 4292195998 4292656046 4292588968 4292522149 4292920489 4292588966 4292129449 4292657588 4293248181 4292654750 4292722091 4292722869 4292394408 4292787370 4292920237 4292788401 4292396215 4292588969 4292522158 4292788412 4292987073 4292066502 4288969878 4289296524 4288366952 4288363079 4289282129 4289547354 4290266452 4289222240 4290925145 4290334553 4290334810 4290400601 4289939543 4290530647 4290004307 4290466393 4290002788 4289283410 4290070109 4288889949 4290990433 4291054941 4291650399 4292508795 4292967279 4292510575 4293295992 4293230200 4292577907 4293428859 4292969067 4292444014 4292509807 4292575601 4292245092 4291783529 4292110434 4290863203 4291060581 4290926683 4291584356 4292110180 4292507005 4292574316 4292444528 4293229423 4292834139 4292837239 4292834399 4292900451 4292378721 4293229426 4292837999 4292444259 4292897629 4292966253 4292441691 4292572015 4292570968 4292573552 4292573037 4292575329 4292573535 4292509042 4292573532 4292967539 4292509542 4292573291 4292509538 4292902236 4292444275 4293165162 4292705900 4293166205 4293887591 4292574063 4288296013 4284290368 4284092988 4284683338 4283896131 4284422206 4284223032 4284287293 4284224837 4284618813 4285736006 4284883788 4285472067 4285667390 4284487998 4284944182 4284158278 4284417080 4284748605 4285209926 4285275718 4284621646 4284884302 4284224064 4284491087 4284555084 4285406791 4284948298 4285937500 4285734211 4284356158 4283172658 4282974271 4287053145 4292314240 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293565303 4293561977 4293363826 4293363053 4292769372 4292503384 4290858053 4289214544 4288167240 4288427084 4287770441 4288099663 4289939531 4291451222 4292176466 4292507230 4293361515 4293233777 4293169259 4293564026 4293562226 4293563256 4293169268 4293627520 4293365613 4293560941 4293429870 4292968301 4293163875 4292045653 4291581782 4289807949 4288752198 4287376967 4287966791 4288361292 4288754251 4288558925 4289480021 4289150800 4289677655 4289085264 4289478737 4289610579 4289610579 4289807958 4289414742 4289349206 4289807952 4289481050 4290069843 4289480786 4290071641 4290466388 4289809498 4289811037 4290859096 4290596697 4291124311 4291125088 4291121754 4290533718 4291122780 4291126115 4290992212 4290991708 4290995041 4291908964 4291451747 4291778903 4292104798 4291125854 4291911786 4291255140 4291319637 4292969841 4293031511 4290269013 4291253323 4290728539 4290135890 4290333272 4290267728 4290204767 4291319899 4290666335 4290797664 4290073692 4291585373 4290008666 4290671991 4291323238 4291190882 4290536285 4290669174 4290999919 4291128171 4290144888 4291125609 4291326834 4291655023 4291392897 4291260774 4290539636 4290931325 4291132804 4290599789 4291198581 4291724161 4291133055 4292248706 4290937980 4291989897 4291723378 4291403940 4292063384 4291858581 4292323227 4291999381 4292128161 4292717464 4292066233 4292720030 4292652445 4292195743 4292655525 4292786330 4292520354 4292525490 4292787619 4292524720 4292458928 4292723381 4292524721 4292787105 4292196012 4292460726 4292458665 4292127400 4291669676 4292065468 4292068803 4293053632 4293252549 4294106311 4293978063 4293713614 4291415494 4289942635 4287837003 4289085006 4289677658 4290072410 4290464598 4289875546 4290466394 4290005335 4289480533 4289283928 4290596439 4289939542 4289677909 4289612643 4289086813 4290923090 4289613668 4291124827 4291913336 4292112746 4292508781 4292969325 4292837995 4293166956 4293427318 4293100665 4292706940 4292968314 4292968315 4292510064 4292244836 4292241504 4291322978 4291058525 4291188571 4291190366 4290469728 4291781732 4292439651 4292573292 4292574318 4292444528 4292510579 4292832346 4292836189 4292443506 4292899424 4292706655 4293162351 4292835938 4292900447 4292440683 4292966513 4292508768 4292572510 4292506971 4292573037 4292574319 4292507503 4292965468 4292509298 4292508781 4292507245 4292508782 4292508527 4293163631 4292641648 4292771437 4293298035 4293036399 4292970099 4291054932 4284551486 4284418890 4283765827 4283962182 4284420679 4284156989 4283895362 4284486724 4284948298 4285013315 4285668422 4285079365 4285472845 4285077822 4285338430 4284353869 4284027709 4284488773 4285210694 4284883786 4285473363 4284423238 4283831878 4284685123 4284619074 4284816967 4285144388 4285874271 4285472839 4283634236 4283173186 4282975035 4285608264 4291458162 4293170051 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293562239 4293363824 4293560170 4293033068 4292898400 4291254870 4290134603 4288556105 4288294987 4288298577 4288360779 4288755274 4289086037 4291057490 4292437847 4292442226 4293559133 4293232238 4293629301 4293562745 4293173109 4293562745 4293564785 4293562489 4293562990 4293363564 4293429869 4293165679 4292769873 4292765542 4291254869 4289808467 4288755532 4287376455 4287378765 4288360779 4288759633 4289147722 4289217106 4288956757 4289679211 4289480277 4289610579 4289677914 4289414742 4289217106 4289480278 4289610579 4289742423 4289938002 4290071635 4289349465 4290464850 4290267736 4290925146 4290204765 4290796639 4290665311 4291122516 4291120977 4290532180 4291121498 4291124066 4291055191 4291322719 4291582043 4291058269 4290929248 4291256412 4291844961 4290863193 4291254098 4291846494 4292040538 4291845974 4293822582 4290662996 4290861662 4290727765 4290138203 4290529107 4290271069 4290268001 4290140265 4290731871 4290797665 4290138201 4290862694 4290006363 4291324529 4290599251 4291062655 4290009699 4291257969 4291128940 4291061369 4290603117 4290732133 4290734701 4291653999 4291062898 4291065459 4291062898 4290997371 4291328364 4290933631 4290738547 4291330179 4291395956 4292116341 4291396743 4291985011 4291595663 4292255122 4292120198 4291795350 4292392852 4292651177 4292191886 4292654514 4292590757 4292652442 4292059806 4292197539 4292719775 4292060826 4292196529 4292788398 4292721057 4292521377 4292723391 4292985510 4292522910 4292655281 4292262060 4292783265 4291668394 4291868346 4292133314 4293185731 4293382081 4293776579 4293580229 4293906882 4293841860 4294171848 4294108878 4294567630 4291937730 4288296255 4288753738 4288625743 4289545814 4289283937 4289547610 4289676116 4289546328 4289283414 4290528593 4289348701 4290072163 4289546851 4289546329 4289085004 4289678167 4290201959 4290597977 4291715937 4292309607 4292967537 4292706412 4293623677 4292969578 4292968827 4293560167 4293034362 4292640619 4293559662 4292575856 4292574832 4292374117 4291190627 4290991706 4290004047 4290071641 4290528852 4291124829 4291518314 4292769642 4292505959 4292969070 4292444272 4292836723 4292834141 4292509042 4292770659 4293162084 4292835937 4292443504 4292507759 4292572251 4292509553 4292506716 4292508016 4292964973 4292507499 4292509297 4292899932 4292442225 4292898137 4292445301 4292901216 4292836465 4292444530 4292837741 4292837229 4292707695 4292969584 4293625966 4291386974 4286063690 4283963980 4283764543 4284487237 4284161085 4284547901 4284490568 4284681796 4284421700 4285273659 4284751435 4285471299 4284882244 4285143101 4285076018 4284551487 4284419384 4284554302 4285406524 4285275977 4285275204 4284359756 4283964750 4284160315 4284619597 4284292167 4285080137 4285739350 4286856292 4285080651 4283565884 4283371332 4285473614 4289291386 4292051591 4293366651 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293363562 4293495674 4292640879 4292703322 4292110435 4290793300 4288758859 4288162118 4288231503 4288887117 4288165967 4288688458 4289480788 4291911770 4291980391 4292901724 4293361259 4293234545 4293561711 4293562990 4293563770 4293562225 4293563776 4293170287 4293627507 4293167739 4293495412 4293164892 4292443235 4292306785 4291713875 4289479241 4288689740 4287966791 4287375175 4288361036 4288755789 4289085520 4289217106 4289348692 4289478479 4289412943 4289676372 4288953936 4289612115 4289677658 4289217106 4289807958 4289807958 4289546585 4289478738 4290201685 4289874265 4290333528 4290205015 4290924113 4290138196 4290665568 4291056986 4290598493 4291123293 4291125593 4291058526 4291192160 4291517029 4291256925 4291126368 4291582307 4291126368 4291256932 4291254097 4291386214 4291911772 4291780194 4292112744 4291977044 4291056981 4290727765 4290135891 4290924119 4289612388 4290859351 4290728545 4291255387 4290732646 4290138201 4290205533 4290665314 4291388510 4290930034 4291191396 4290600545 4291256931 4290602851 4290733942 4290079599 4290734448 4290663514 4291196286 4290864246 4290603377 4291128436 4291262576 4290736242 4290471789 4291127656 4291000453 4291923840 4291390312 4291789698 4291659642 4291466388 4291989137 4290999432 4291732636 4292912273 4291730846 4292590243 4292981915 4292585889 4292190113 4292591535 4292652700 4292649373 4292065198 4292722350 4292587932 4292523688 4292917931 4292590765 4292851360 4292128157 4292261026 4292322715 4291670198 4291936192 4293053123 4293513410 4293446334 4293316289 4293646022 4293183165 4293644480 4293186499 4293512898 4293841604 4294040264 4294108621 4294371795 4290935674 4287243584 4287706446 4289413708 4289808723 4289414230 4289414485 4289547102 4290005077 4289480793 4289611863 4289609808 4289480020 4288759893 4289415530 4289348433 4290401379 4290664290 4291519598 4292702053 4292509294 4292835953 4293100393 4293362041 4293035377 4292969324 4292968828 4293296743 4292443774 4293232239 4292507243 4292767848 4291125084 4291316561 4288823116 4289217100 4289085522 4290268760 4290665820 4292043883 4292507256 4292508781 4292903277 4292836207 4292836976 4292441179 4293160545 4292769120 4292444257 4293228405 4292834655 4292508768 4292899183 4292900191 4292900190 4292442222 4292902515 4292506457 4292902255 4292509025 4292900972 4292899677 4292442720 4293162611 4293164888 4292770418 4292706411 4293427576 4293560684 4292699745 4287441481 4283697204 4284228167 4283830594 4283963707 4284353603 4284291389 4284161093 4284684605 4285666879 4285147217 4284682805 4285472325 4285340224 4285078340 4284424267 4284028494 4284746556 4284752459 4285210441 4285801294 4284095298 4284552775 4284161100 4284090685 4284749370 4284752970 4285869920 4286727778 4285676132 4285405765 4283698746 4285473616 4289093741 4290937978 4292970870 4293040756 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293431420 4293558375 4292705903 4292962905 4291384659 4289676106 4288032585 4288755788 4288821838 4287575630 4288753736 4288559182 4289217873 4291056468 4292701542 4292442976 4293165677 4293429357 4293563509 4293564782 4293561971 4293367417 4293564018 4293430643 4293561984 4293430893 4293232751 4293361242 4292834147 4292307042 4291647059 4290527823 4288557899 4287967562 4287311431 4288886860 4288624718 4289085264 4289151570 4289544273 4289413200 4289808739 4289153366 4289873488 4289807959 4289217363 4289480021 4289610579 4289217363 4289611864 4289480793 4290005592 4289941589 4290398801 4290336093 4290205022 4290727506 4291251287 4290599254 4290598236 4291123292 4291122003 4291058262 4291060066 4290927693 4291515746 4290928992 4291322205 4291320410 4291449953 4291650139 4291583320 4291452768 4291978345 4291715928 4290992984 4290727509 4290138204 4290793554 4290728539 4290794578 4290730591 4290666335 4291191134 4290732391 4290730078 4290731624 4290601317 4291124321 4290534501 4290928733 4290141544 4290731875 4290798698 4290136149 4290800497 4290666843 4290671993 4290732899 4291524993 4290404970 4291458684 4290992994 4291063669 4291652199 4291326847 4291588973 4290932851 4291589747 4290798182 4292512647 4291458414 4291594879 4292386963 4292382337 4291926928 4292195228 4292653980 4292059300 4292197025 4292654490 4292586137 4292126625 4292592311 4292717210 4292191381 4292787888 4292655779 4292718757 4292128411 4291861395 4291733676 4292195766 4292133571 4293512640 4293776321 4293317828 4293313467 4293316802 4293314750 4293643198 4293251781 4293642941 4293185217 4293972931 4293448130 4294235332 4293714379 4293910217 4292267982 4289418847 4287047750 4288297809 4288561231 4289874517 4289217108 4289677657 4289807701 4289414485 4289481051 4288694366 4289743192 4289545823 4289150815 4289152603 4290465121 4290598233 4291585133 4292505720 4292507754 4292444529 4293426790 4292969837 4292640365 4293232500 4293231208 4292836986 4292969853 4292838767 4292509038 4292703594 4291389288 4290795613 4289085007 4287705419 4287705419 4289018188 4290989400 4291256420 4292110441 4292704876 4292508524 4292641410 4292834132 4292441967 4292837217 4292835186 4292508786 4292834391 4292900192 4292506222 4292507740 4292509041 4292507759 4292900190 4292900713 4292507501 4292902254 4292507997 4292509041 4292509040 4292507997 4292770930 4292770674 4293098091 4292969083 4293298043 4292901482 4289020754 4284158534 4283962696 4283828551 4284221503 4284746552 4284615486 4284288332 4285535542 4285143102 4284882500 4284947523 4285342282 4285471300 4285208893 4284552773 4284091198 4284420919 4285011270 4285668668 4286127171 4284817993 4283698495 4284161097 4284291650 4284685122 4284818768 4285146711 4286197840 4286067550 4285934676 4284159552 4285603658 4288764008 4291067759 4292510072 4292841342 4292972150 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293295978 4292968284 4293358181 4291650892 4290200147 4288626251 4288162888 4288756559 4288754250 4288166993 4289281102 4288952653 4290201682 4291124055 4292043615 4292900449 4293165933 4293232492 4293562747 4293562996 4293170800 4293563768 4293562233 4293170294 4293629042 4293167733 4293492840 4293163872 4292833633 4292372819 4291382608 4289090905 4289279050 4287180873 4288032841 4288229708 4289280845 4289019728 4289217106 4289151570 4289478737 4289807958 4289610323 4289414743 4289349206 4289610321 4289614183 4289546327 4289414742 4289807958 4289872466 4290005849 4290135637 4289810011 4290334554 4290139486 4291253843 4290600289 4290663773 4291122010 4291123036 4291059296 4291646296 4290994784 4291517286 4291385946 4291713121 4291256670 4291321950 4291255892 4291190629 4291387220 4291650657 4292701281 4291253328 4290857046 4290203219 4290464594 4290858328 4290137689 4290729308 4290731872 4290731110 4290730855 4290140523 4290732388 4290666852 4291450454 4290667367 4291322995 4290076006 4290271837 4290865255 4290139230 4290210939 4290865255 4291191659 4290538870 4291128946 4291259004 4291854703 4290863215 4291594874 4291191902 4291000957 4291063659 4291131519 4291067510 4290995305 4291331974 4291850867 4291395720 4292055942 4291659655 4292385693 4292386191 4292121742 4292588213 4292654744 4292650652 4292194215 4292590245 4292788399 4292587163 4292065199 4292328612 4292782480 4291667107 4291466386 4291731633 4291147709 4293510843 4293381312 4292988610 4293643711 4293708992 4292922562 4293313980 4293315006 4292988610 4293313980 4293315006 4293251266 4293116088 4293249727 4293643969 4293055685 4294236102 4294038725 4294569682 4291936456 4287310907 4287771468 4288888401 4288494413 4289545545 4289085265 4289545815 4289283156 4289543759 4289743192 4289282890 4289741919 4289086028 4289674849 4289221212 4291252823 4291125606 4292505961 4292964971 4292378734 4293035907 4292969324 4293296745 4292837996 4292705900 4293034619 4293296744 4292444271 4292507499 4292638058 4291715940 4290924889 4288035407 4287046985 4287178823 4287310153 4289217358 4291255902 4291324524 4292044137 4292575086 4292901737 4292836466 4292902257 4292440170 4293162339 4292378720 4292902006 4292443762 4292506969 4292966515 4292509039 4292507743 4292898652 4292442221 4292509297 4292834397 4292507761 4292899932 4292836723 4292770930 4293100138 4292772204 4292771709 4293625966 4293165422 4290924622 4284946505 4283762757 4284223282 4284026176 4283960370 4284224327 4284748862 4285273404 4284883534 4285276233 4285078855 4285143612 4284685385 4285013571 4284552516 4284291133 4284092990 4284684606 4285340223 4285276234 4284816969 4284223814 4284093245 4284617795 4284750658 4284225862 4285407814 4286264413 4286136419 4285344342 4285275462 4286196814 4288501354 4291064952 4292249979 4291789944 4291789937 4292645251 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293426275 4292837479 4292044366 4291316554 4288429131 4288686920 4288756559 4289279306 4288626254 4288757329 4288623690 4289086033 4289215559 4291124579 4292374602 4292834659 4293427049 4293036406 4293431917 4293563252 4293563001 4293563000 4293563506 4293628025 4293169270 4293693556 4293298286 4292640883 4292901459 4292306007 4291583831 4289807947 4288559182 4287967049 4287247952 4288427082 4288626263 4289150799 4289019471 4289217106 4289283156 4289610579 4289414999 4289610322 4289807952 4289546329 4289482074 4290332500 4289742166 4289151827 4289807958 4289676629 4289283673 4290465364 4290268757 4290791505 4291189343 4290662995 4290597718 4291121739 4291124056 4291122259 4291057501 4290992990 4291321685 4291450973 4291189852 4291254098 4291256676 4291256414 4291913056 4291124829 4291848034 4291255131 4290662747 4290136914 4290136150 4289938773 4290205277 4290795098 4290730081 4290732385 4290727253 4290665313 4290734701 4291256157 4290732388 4290011249 4291387742 4290073683 4290929253 4290271330 4290140004 4290733406 4290668137 4291126123 4291132537 4291124835 4291588973 4291527283 4291062125 4291786087 4291455348 4290934902 4291389303 4290935924 4291986051 4291192699 4291528566 4291191674 4291792251 4292710799 4291985020 4292514434 4291990665 4292124056 4292716182 4292588951 4292187020 4292129436 4292717463 4292586395 4292522391 4292657586 4292784038 4292118394 4291464862 4291667113 4292328890 4292660677 4293577662 4293187783 4294036670 4293248444 4293576379 4292985772 4293379517 4293315519 4293381055 4292985788 4292986045 4293313980 4293774782 4292924613 4292985011 4293707452 4293252549 4293120965 4294237897 4293776581 4294042317 4291075495 4287309378 4287114311 4289607243 4287971409 4289413714 4288825172 4289281873 4288759634 4289677408 4288627810 4289282124 4288953696 4289217361 4290464855 4291120990 4291584612 4292308324 4292507755 4292968573 4292837736 4293232491 4292836988 4293230200 4292707694 4293493112 4292969067 4292640895 4292900459 4292638058 4291979619 4290204508 4288559695 4286651719 4285797702 4286060871 4288822606 4290466133 4291321954 4292374890 4292373624 4292510832 4292901488 4292837741 4292443505 4293161550 4293161331 4292770650 4292834404 4292899439 4292441433 4292900978 4292507741 4292507758 4292900720 4292835936 4293227619 4292441692 4292442223 4292769116 4293554540 4292965995 4292639600 4293754980 4293822064 4291522407 4286915399 4283895101 4283828024 4284223290 4284549177 4284681536 4284614974 4284421438 4284948036 4285076803 4285472835 4285472067 4284947526 4286062665 4284619586 4284355399 4283893572 4284292935 4285209670 4285342282 4285078079 4284159299 4284290630 4284617796 4284882245 4285742956 4285217376 4285932623 4285677155 4286132575 4285606727 4285674335 4288760686 4290541176 4291200377 4292117629 4291263608 4291919987 4292248695 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4292770404 4292506203 4291779157 4289479242 4288623691 4288755531 4288166736 4288035664 4289216592 4289213514 4288690510 4288493133 4289546326 4291123798 4292636008 4292443232 4293033838 4293299573 4293365370 4293563245 4293564018 4293563263 4293365106 4293365113 4293237366 4293037938 4293296748 4293493087 4292440929 4292372831 4291319123 4289742675 4289280846 4287179847 4288687174 4287574604 4289410122 4288496464 4289348178 4289151056 4289478737 4289871953 4289412943 4289808739 4289348943 4289546329 4290071127 4289284194 4289546322 4289873494 4289349206 4289610837 4290531413 4290269532 4290334292 4290138204 4290728787 4290598751 4291188052 4291123294 4291123293 4291123036 4290994008 4291582821 4291255131 4291255893 4291648608 4291584346 4291714404 4291321178 4291125603 4292373100 4291318607 4290664029 4290138197 4290857554 4290203995 4290924119 4290728280 4290730344 4290138970 4290794329 4290074983 4291454303 4290665822 4290731110 4290072152 4291454565 4290139484 4290929004 4290205795 4290206558 4290731357 4291127928 4291125605 4291128180 4290533725 4291129717 4291128170 4291260290 4291589228 4290862697 4291328131 4291454315 4291391850 4291918719 4290736503 4292114284 4291261557 4291725680 4292048762 4291921517 4292316815 4291590785 4292384907 4292581255 4292185479 4292585373 4292654746 4292125083 4292125588 4292262314 4292979609 4292056199 4291728515 4291269027 4292263097 4293051319 4292988868 4293774526 4293644482 4294035899 4293248445 4292986301 4292656823 4292919996 4293381313 4292985788 4292986044 4292986301 4292919737 4293053120 4292985788 4293773243 4293318597 4293313723 4293314750 4293314237 4293185729 4293844169 4293844168 4293844428 4289957778 4287636798 4287181132 4288951883 4288757072 4288692815 4288956494 4289412963 4288891230 4289412941 4288104292 4289347663 4289217364 4290070101 4291123546 4291452516 4292768104 4292507756 4292771946 4293296776 4292968825 4293165415 4293428328 4292707441 4292575855 4292378479 4292509547 4292707200 4292504935 4291258476 4291059292 4289020498 4286654535 4285272634 4285993284 4287572551 4288756303 4291451740 4290732132 4292899431 4292573035 4292510321 4292837741 4292901745 4292441967 4292835695 4292835179 4292836972 4292507758 4292508015 4292834652 4292900977 4292507500 4292507499 4292509039 4292443761 4292832092 4293228658 4292834928 4292246893 4293426024 4293361020 4293625192 4292967789 4288885066 4284420419 4283829044 4283960899 4284093258 4284289598 4284419391 4284619325 4285340991 4285473869 4285472835 4285013830 4284815683 4285800518 4284357186 4284750925 4283700799 4284355133 4286194755 4285408844 4285207867 4284356925 4284288580 4284224836 4284553791 4284622928 4285277002 4285539666 4285343825 4286072185 4285869912 4286656857 4288763752 4289952379 4291723891 4291527560 4292053878 4291527029 4290867317 4291721823 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4293291345 4292043867 4290397260 4289018190 4288165454 4288165197 4288691537 4289280589 4289085520 4288690253 4288626513 4289147722 4289284428 4291122261 4292109664 4292572767 4293033308 4293296489 4293628032 4293562738 4293170038 4293627762 4293169527 4293562738 4293561722 4293431407 4293101674 4292967773 4292899425 4292174692 4291318604 4290136397 4288623947 4287966279 4287180874 4289083982 4288037457 4289281615 4288430157 4289415009 4289478736 4289217620 4289481309 4289611864 4289414486 4289546323 4290071385 4289348943 4289807959 4289151827 4289742166 4290071129 4289808723 4290989138 4289677145 4290924371 4290073694 4291252307 4290533464 4291124055 4291122259 4290993503 4291453279 4290993751 4291256933 4291322207 4291252558 4292108905 4290927959 4290862168 4292240992 4291451984 4290923090 4289614687 4290528078 4290728795 4290270557 4289612633 4290795356 4290796894 4290136662 4290667370 4291453538 4291122521 4290140515 4290272351 4290535520 4290272608 4289877334 4290335588 4290207591 4290732132 4290599773 4291323239 4291326058 4290729823 4291129200 4290929783 4291528316 4291715939 4290867571 4292117363 4290995555 4292049008 4291328883 4291591294 4292311678 4291130223 4292315267 4292115591 4291265669 4291263349 4291987327 4292450183 4292380049 4291333253 4292325024 4292653986 4292580235 4292129187 4292719258 4292453787 4291591022 4291004051 4291668663 4292590516 4293511873 4293248446 4294102720 4293315520 4292853945 4292788666 4292853945 4292986045 4293447105 4292854195 4293445301 4292987585 4292986045 4293445565 4293051838 4292722359 4293117373 4292853945 4292985275 4292988097 4292989123 4293317571 4292858821 4293843912 4293779915 4294040006 4292859343 4288630886 4287244870 4287967819 4287773009 4288887629 4288231760 4288233294 4288366673 4288824402 4288889937 4288561231 4289413971 4289414742 4290599015 4291977060 4292111204 4292964972 4292772204 4292838524 4293165944 4293166201 4292970367 4293426790 4292968296 4293361528 4292642180 4292444526 4292639083 4292439395 4291058803 4288825164 4287244107 4285072185 4284354104 4286321475 4288952395 4289807701 4291190366 4291584611 4292506989 4292509038 4292836203 4292837999 4292442716 4292899182 4292377436 4292900979 4292506196 4292506219 4292901234 4292833644 4292901727 4292835441 4292898924 4292902252 4292835165 4292379507 4292772448 4293294972 4292771961 4293232254 4293099117 4290332236 4285205564 4284025663 4285352810 4284822872 4285014609 4284550980 4284748605 4285407818 4285408332 4285405507 4284815939 4285538124 4285079365 4284948556 4284619588 4283897151 4284224836 4285210182 4285144648 4285407304 4284292425 4284226115 4284619840 4284749885 4285340223 4285015890 4285211722 4285869661 4286071661 4286460002 4286659932 4287975025 4289949317 4291852150 4291527287 4291988352 4292709491 4290278006 4290998130 4291725953 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4292632923 4291122242 4289675343 4288033355 4288230733 4289216593 4289676874 4287904080 4289282640 4288033869 4289281102 4288560721 4289281353 4291714139 4292109664 4292573539 4293099619 4293102456 4293235574 4293627257 4293170805 4293630322 4293365106 4293561977 4293562995 4293365104 4293493867 4293166192 4292899153 4292044365 4291450463 4289741385 4288690511 4287310918 4288098377 4287773264 4288820812 4288692827 4289479764 4289348435 4289283156 4289281358 4289412945 4289873488 4289217364 4289807952 4289742423 4289412944 4289610579 4289349201 4290267223 4289941589 4289939795 4290333529 4290335061 4290139486 4290794326 4290532958 4291188828 4291123036 4291057757 4291646298 4290994009 4290993247 4291973716 4290928993 4291060066 4291254617 4291256413 4291913313 4291255893 4290662996 4289613148 4291055947 4289547612 4291253337 4290925400 4290860386 4290795098 4290136662 4290733419 4291254875 4290600799 4290600038 4290863200 4290272352 4290337116 4290465634 4289220709 4290337379 4290732131 4291323495 4291126893 4290537577 4290602863 4290800751 4290995815 4292118137 4291391600 4291460982 4291130742 4291326063 4291790465 4291260528 4291721599 4292378225 4291722618 4292245872 4290867829 4291394417 4291917940 4292049789 4291525748 4292049800 4291925897 4292782240 4292646023 4292190610 4292721311 4292450444 4292445831 4291198835 4290945459 4292789953 4292986300 4293511616 4293114791 4293840056 4292787123 4292722359 4292855485 4293446335 4292990149 4292985788 4293248443 4292985781 4292722866 4293575606 4292985787 4292919994 4292788408 4292919994 4292855227 4292989893 4292987841 4294037953 4293252035 4293645251 4293646021 4293844169 4294238667 4293383621 4294173644 4292263612 4287639621 4287376198 4287509838 4287968331 4288493133 4288428880 4288297296 4288494924 4288756560 4288692814 4289217372 4289415266 4291255900 4291256417 4292769643 4292507499 4292771950 4293428078 4293364077 4292968827 4292903274 4293165674 4293232000 4292903273 4292576109 4293227623 4292376958 4291783789 4291191646 4289545300 4286588743 4285074742 4283697991 4285274946 4287114827 4288367443 4290398294 4291518559 4292177512 4292573548 4292900462 4292770929 4293228140 4292769902 4293228661 4292834396 4292442480 4292967265 4292441436 4292507757 4292443761 4292899165 4292442973 4292443505 4292835440 4293161064 4292705394 4292967276 4293558134 4293365102 4292501853 4286323520 4283699020 4284027468 4283896383 4284487739 4284353340 4285009719 4284355910 4285142588 4285275466 4285602621 4285011516 4284685641 4285603395 4284879178 4284488509 4284224837 4284880444 4285801289 4285672009 4284681788 4284423751 4284620873 4284553795 4284751431 4284488000 4284752972 4285608292 4285280084 4286593883 4286003557 4288041063 4289685625 4290609024 4291330177 4291528574 4292118128 4291790727 4290932338 4291724657 4292448647 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4291451727 4289676366 4289016907 4288753736 4288166737 4289217354 4288496209 4289216336 4289083469 4288759377 4288753480 4288624462 4289283661 4291122776 4292109666 4292574547 4292771169 4293558120 4293035886 4293431161 4293628536 4293170813 4293628797 4293170301 4293627513 4293365869 4293495406 4293033837 4292507232 4292438106 4291056462 4290133581 4289148491 4287377482 4287509066 4287314266 4288168015 4289611092 4289348436 4289282899 4289481818 4289480278 4289676372 4289349207 4289412944 4289742423 4289544786 4289415516 4289546586 4289807696 4289217872 4290005593 4290070103 4290399316 4290202189 4290858581 4290664286 4291188307 4290532188 4290599775 4291122516 4291057743 4291123543 4291058783 4290993246 4291582819 4290994271 4291650661 4291649380 4291257193 4291124318 4290138973 4290398807 4290135377 4291384922 4291188828 4290076770 4290268247 4290141031 4290797158 4290730075 4290076000 4290729568 4291321694 4289809240 4290402653 4289873504 4289811299 4290925670 4290208364 4290730587 4291129712 4290929524 4291129198 4291125604 4291061363 4291786087 4291388268 4291461495 4291650147 4291198339 4291722110 4291851892 4292050025 4291592322 4292052855 4291850591 4290013307 4292379763 4290799472 4291461237 4292182397 4291854195 4292385935 4292776582 4292185727 4292262813 4292253324 4292184962 4291198322 4289494917 4291929004 4293380796 4293051839 4293642170 4292986045 4292920509 4292655536 4292920252 4292986046 4293512384 4292923075 4293641657 4293445823 4292722873 4292854202 4292459445 4292130222 4292262585 4292986814 4292722359 4293446848 4293317573 4293776580 4293317829 4293511611 4292988354 4293379003 4292987841 4293250754 4293120708 4294303433 4294170309 4294437842 4289759128 4287703871 4286917188 4286983751 4287509839 4287378253 4288560464 4287707216 4288757072 4288691536 4289151049 4290006116 4291123034 4291715422 4292702312 4292509295 4292771693 4293232497 4292968827 4293033573 4292838783 4293033577 4292903273 4293101443 4292640636 4292641406 4292639081 4291782242 4290862430 4288626002 4287899723 4284090419 4283959607 4284355660 4286391377 4288889437 4289349216 4291126369 4292045668 4292636519 4292509295 4292903277 4292379249 4292836460 4292375642 4292509810 4292963178 4292442480 4292965726 4292442477 4292964715 4292376940 4292900977 4292834395 4292835184 4292770399 4292967278 4293294956 4293821029 4292836206 4289017154 4284025156 4283960381 4284286789 4283962696 4284354884 4284420938 4284357700 4286192963 4285012284 4284816708 4285405763 4286129228 4284687178 4285272375 4283962687 4283696184 4284748349 4285080135 4285931331 4285603140 4283896382 4284421692 4284553795 4285143619 4284422464 4284621388 4285275221 4285539921 4286135144 4286070375 4288107377 4290080390 4290805621 4291593091 4291527815 4292050544 4291658863 4290406769 4291592306 4292120186 4292121721 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4290659661 4289152078 4288098891 4288231758 4288756301 4289085265 4289150544 4289019472 4289348685 4288689997 4288099403 4288559182 4290069321 4290727766 4292308316 4292571230 4292378209 4293298287 4293430901 4293430904 4293171061 4293627261 4293629047 4293430903 4293364856 4293628295 4293232492 4293034094 4292507999 4292243053 4291121992 4289746266 4289213515 4287376198 4287379795 4288493130 4289019981 4288561743 4288825172 4289348436 4289480015 4289480279 4289019728 4289808215 4289806417 4289742420 4289742423 4289544787 4290069836 4289481050 4289742166 4289940057 4289940045 4289808462 4290989652 4290139479 4290664029 4291122259 4291323746 4290533728 4291122260 4291124056 4291057244 4291582300 4290928471 4291517027 4290994528 4291516513 4290995557 4291190365 4290796894 4290860636 4289679195 4290274665 4290135637 4290730077 4290793561 4290202969 4290795605 4290664797 4291256419 4290664797 4290336347 4290727511 4290270041 4290337378 4289813085 4289814382 4291387996 4290536049 4290668651 4290533221 4291197298 4290928237 4290473073 4291520602 4290868344 4291590253 4290926946 4291461495 4291654249 4291852922 4292049764 4292116865 4292380789 4291323500 4290869122 4291657331 4291260788 4291787129 4292114814 4291327861 4292709254 4291985537 4291924619 4292782745 4292516234 4291459442 4290604404 4291073694 4292915381 4293250491 4292985529 4293248435 4292985786 4293248443 4292985271 4292854716 4293248444 4293840054 4292392885 4293707963 4292723386 4292457905 4292722096 4292656566 4292987073 4292985788 4293116856 4293841345 4292919995 4292854202 4293445306 4292656567 4292919738 4292853945 4292527039 4293052607 4292986558 4293381824 4292989123 4292923074 4293120450 4294366148 4293385421 4290096818 4288042371 4287444040 4287573575 4287574860 4287377996 4288426827 4289414225 4288688458 4289019728 4289873486 4290795868 4291716197 4292243044 4292899436 4293165417 4292836986 4293427830 4292969083 4293427573 4292837996 4292902522 4293297528 4292837225 4292444526 4292964716 4292440166 4291321951 4289478214 4287046728 4285400888 4283636806 4284029768 4285209924 4287379531 4288824913 4290791509 4291060576 4292503145 4292572265 4292509038 4292836208 4293098607 4293555552 4292439654 4292442719 4292964443 4292440939 4292899693 4292376941 4293294194 4292376682 4293162866 4292771184 4292705136 4293493112 4293689701 4293362542 4291515983 4285403710 4284355647 4283828281 4284026163 4284420665 4284091454 4284488771 4285144901 4285342283 4285605456 4285667643 4284815940 4284817997 4285270329 4284683583 4284680254 4284290124 4285473347 4285734729 4286127683 4284223805 4284486205 4284752975 4284882759 4284949323 4285211980 4285738062 4285606229 4284883528 4285741172 4288302703 4289096831 4290871157 4291199865 4291789700 4291987835 4290936951 4290738564 4291789945 4292119417 4292383100 4292318608 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4288954192 4288688458 4288230990 4288166736 4289215053 4289282893 4288759373 4289150544 4288625744 4288691792 4289213771 4289083981 4289218131 4291188569 4291977302 4292571482 4292969090 4293494121 4293430894 4293561977 4293432435 4293693053 4292842611 4293430904 4293364844 4293363567 4293495406 4293033306 4292505196 4292239952 4291058778 4290135627 4288624718 4287311946 4288097350 4287769414 4288166734 4289346640 4289414485 4289282899 4289676896 4289218645 4289480278 4289873495 4288954193 4289414737 4289610574 4289349201 4289939800 4289676623 4289610839 4290596434 4289874266 4290466647 4289742424 4290205277 4291253082 4291124311 4291122781 4291123021 4291123294 4291122262 4291059296 4291320922 4291517284 4291257189 4291319376 4291257449 4292570720 4291056723 4290662747 4290728281 4290731359 4291319643 4290139228 4290203225 4290859353 4290206559 4290729308 4290730846 4290074979 4291255645 4290072922 4290798693 4290533488 4290733420 4290928230 4290206557 4290139744 4290666084 4291325028 4291128945 4290536034 4291131507 4291124578 4290344058 4292116085 4290799985 4291527286 4291649659 4290802029 4291853440 4291258471 4291853178 4291916400 4291394933 4291587693 4290930796 4292048751 4291918447 4291657848 4291918977 4291654764 4292055688 4292385166 4292251781 4290932846 4289684330 4291932343 4292785316 4292658613 4293112489 4293118146 4292525495 4292392875 4293051832 4293316034 4293445566 4292459958 4292786865 4292986301 4292788665 4292522158 4292264894 4292589997 4292853945 4293513668 4293313979 4292525493 4292525237 4292393651 4292788408 4292854459 4292788408 4292722359 4293446848 4293052607 4292986814 4292988353 4292987841 4293381824 4293317571 4293710274 4293448901 4293907396 4294765264 4292336078 4289367705 4286455362 4286916938 4287573830 4287968845 4287770699 4288296782 4289151055 4289217623 4291253081 4291715679 4292440427 4292899435 4292378992 4293297531 4292969578 4292903274 4292970372 4293428326 4293034618 4292902520 4292772474 4292706172 4292575086 4292241766 4291188571 4288757839 4287114830 4285271610 4284419134 4284096074 4285011264 4285468219 4288034640 4289414731 4291321696 4291191904 4292571499 4292508012 4293164142 4292705644 4293162083 4292443745 4292900978 4292440683 4292508270 4293225822 4292833371 4292442222 4292835182 4292771184 4292705135 4293165434 4293689443 4293099377 4292176232 4286981963 4283827781 4283962167 4283894086 4284221510 4284289598 4284554565 4285537350 4285998667 4285275722 4285603396 4285210442 4285209919 4285537091 4284485444 4284223813 4283964479 4285140795 4286390345 4285867336 4284158282 4284290371 4284224837 4284687181 4285079114 4285209410 4284750680 4285080647 4285341786 4285279305 4287117150 4288964216 4291262591 4291395969 4291854207 4291463035 4292183930 4290605940 4291133559 4292186500 4292056962 4292317834 4292253055 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4288757072 4288165965 4288757328 4289281872 4288494672 4289150800 4288558413 4289150800 4288757587 4288625744 4289281102 4288493133 4289347147 4291188566 4291584090 4292638828 4292769626 4293364079 4292970355 4293627775 4293038439 4292972163 4293692801 4293561979 4293563773 4293430655 4293102197 4292838258 4292965984 4292242533 4291056727 4290202194 4289149517 4287900742 4287377738 4288425801 4288757586 4289281098 4288953935 4289348949 4289412943 4289677652 4289610580 4289151564 4289677908 4289807703 4289349201 4289807953 4289479251 4290071386 4289743699 4289545046 4289940052 4290332748 4290269532 4290792535 4290595671 4290598237 4290533207 4291189591 4290532189 4291124055 4291122002 4291059040 4291124312 4291318094 4291125086 4292637289 4291980376 4290595416 4290333006 4290858584 4290726486 4290535257 4291254365 4290139228 4290268761 4290268761 4290729564 4290860379 4290140254 4291255137 4290728288 4290732904 4290665569 4291452506 4290009707 4291451997 4290079607 4291126892 4291125350 4290736749 4291125350 4290338153 4291657085 4291191667 4292113504 4291918464 4290928486 4291918448 4292048750 4291263357 4291983987 4291918453 4290863727 4291591278 4290735228 4291128946 4290933876 4291262080 4291391599 4291329402 4292314245 4292383380 4292577145 4290142052 4290804620 4292394679 4292986550 4292457902 4292982174 4292394684 4292392355 4293643195 4292788926 4292917155 4293641907 4293182910 4293182650 4292393909 4292985270 4292788667 4292656046 4293513154 4292129708 4292657079 4292327859 4292656822 4292920252 4293051837 4293051838 4292854202 4293839549 4292986045 4293052864 4292987071 4292987071 4293380799 4293380542 4292988097 4293315006 4293314750 4292859333 4293645509 4293120964 4294171849 4294436301 4293450958 4289893531 4288890191 4286978886 4287574087 4288099405 4287837515 4288689997 4289612110 4290662746 4291583839 4292702568 4292509295 4292509808 4292903275 4293494651 4292837738 4293427575 4292837243 4292705899 4292970347 4292968585 4292448127 4292571495 4292307815 4290534239 4290004815 4287571270 4285142341 4284748855 4284157247 4283893561 4285404734 4286783304 4288295755 4289874002 4291911269 4291912294 4292636519 4292771692 4293227884 4292377181 4292836726 4293160542 4292901475 4292506219 4292442733 4292901235 4292441947 4293162867 4293098605 4293032814 4293294698 4293362282 4293229673 4289346377 4284351027 4283697464 4284287047 4283632957 4284353598 4284812606 4284551741 4285472067 4285471042 4285800264 4285081163 4285210183 4285668421 4285341514 4284357447 4284353598 4284878134 4285474125 4285210438 4284749898 4284748347 4284556109 4284682031 4285670476 4284555853 4285277516 4284621385 4285078876 4285801558 4286070131 4288631926 4291066484 4291459455 4291264897 4291460978 4291659645 4291462522 4290936181 4291923847 4292383610 4292318594 4292253056 4292711050 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4287708496 4288297805 4288756816 4288562000 4289348173 4289282637 4289085265 4289282637 4289150544 4289282128 4287968333 4289216591 4289283417 4291187274 4291783016 4292639073 4292771423 4292969070 4293692541 4293365621 4293235845 4293693556 4292843399 4293235073 4293627778 4293429365 4293100909 4293492830 4292441952 4292239960 4291188821 4290465108 4288757843 4287900742 4287376967 4288361292 4288755018 4289150800 4289282643 4289085515 4289873752 4289217364 4289610573 4289874275 4289151569 4289546586 4289610579 4289349206 4289612121 4289742167 4289283402 4290071643 4289939271 4290334552 4290859090 4290728019 4291187025 4291125089 4291123798 4290533727 4291125337 4291123286 4291124576 4291122522 4291060322 4290994017 4291455074 4292307556 4290992730 4290267479 4290469730 4289610836 4290203995 4291253082 4291122515 4290729308 4290206303 4290203225 4291385692 4289549919 4290924376 4290073179 4290796638 4290139997 4290728793 4290665571 4291322204 4290011510 4291389289 4291586927 4291063407 4291058269 4291458670 4292114802 4290930791 4292315007 4291786365 4290734447 4292380546 4292046692 4291324527 4291721325 4291128449 4292114785 4290995312 4290997619 4291653225 4290996071 4291590258 4291392881 4292115826 4291129710 4290473331 4290932844 4290077046 4291533715 4292853422 4292918703 4292984750 4292918709 4292196277 4293050779 4292657847 4292653467 4292721576 4292460218 4292392623 4293048230 4292459703 4292722608 4292854717 4293182127 4292591545 4292390829 4292394165 4293379772 4293314751 4292262835 4293707184 4293315777 4293379516 4292987328 4292985788 4293379772 4293381312 4292985788 4292985788 4293381311 4292986814 4292988353 4293774783 4293052091 4293710273 4293577149 4293251267 4293839804 4293840833 4294436044 4293387220 4290083700 4285470268 4287373896 4287048775 4287377481 4288821326 4288954188 4291318874 4291126623 4292569961 4292573292 4292444273 4293100907 4292640893 4293231994 4293165671 4292837244 4293101163 4292443774 4293494647 4292837483 4292572010 4292110432 4291188572 4289283150 4287572301 4285597756 4284489546 4284091960 4284483636 4284552770 4286056509 4287574606 4289939283 4290135630 4291651427 4292504681 4292965228 4292379763 4292901997 4292770401 4292834913 4292505691 4292506974 4292898156 4292834910 4292836725 4292770142 4292705394 4293034089 4293298028 4293493363 4290729045 4285598521 4284288583 4283960382 4284157758 4284353349 4284617029 4284619592 4285600832 4285146442 4285340739 4285340227 4286060866 4285014606 4284686921 4285270329 4284485444 4284881984 4285276234 4285866823 4285409366 4284682812 4284552259 4284884817 4284816714 4284946496 4284947527 4284686925 4284554825 4284816706 4285609576 4288962667 4289951608 4291592835 4291002741 4291393408 4291002743 4291002744 4290933875 4291791492 4292120960 4292318607 4292711808 4292318593 4291793016 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4288821325 4288755789 4288691536 4289216078 4289085008 4288496208 4289479245 4288561233 4288627280 4288625744 4289346125 4288757331 4289348687 4290665569 4292174946 4292573022 4293098354 4293429612 4293036146 4293430398 4293301366 4293431677 4293430140 4293693046 4293234808 4293233523 4293363821 4292968558 4292900449 4292438110 4291122517 4289610836 4288889426 4287900485 4287377738 4288361804 4288756046 4288627536 4288693325 4289414224 4289480529 4289085521 4289478737 4289546584 4289546328 4290528845 4289545044 4289610580 4289349201 4289807953 4289742417 4289806932 4290069842 4290333011 4290267993 4290137429 4290728283 4290597715 4291123293 4290535265 4291124063 4291125081 4291124319 4290534239 4291122002 4290664792 4293238918 4291121482 4290856788 4289479760 4289544789 4289415251 4290594127 4290072410 4291452253 4290665311 4290794844 4290137690 4290664790 4290860379 4290731359 4290795100 4290793303 4290205533 4290863974 4290074465 4290664804 4290864216 4291261048 4291059555 4290800245 4291396483 4291782264 4291656574 4292116106 4292245111 4290803317 4291587182 4291260784 4291723393 4291195774 4290800239 4291394677 4291848056 4291063665 4291128945 4291129204 4291128429 4290997106 4291854447 4291062899 4290078830 4290405991 4290476433 4292126109 4292782492 4292722340 4292850344 4292723391 4292854451 4292919989 4292849583 4292916903 4292524729 4292587681 4292786856 4292590768 4292129727 4292591024 4292722611 4292521896 4292327091 4293182649 4293052095 4293707192 4292591544 4293641656 4293447362 4292393653 4293643710 4293314237 4293379772 4292987328 4292986045 4292985780 4292987072 4293248186 4292788409 4292987327 4292986814 4292987071 4292986815 4293316545 4293710787 4292923331 4293252035 4293184447 4293514950 4294105543 4292994773 4288499035 4285401407 4286849864 4287573830 4288298322 4289085260 4290794075 4291847008 4291782243 4292572010 4292837741 4293230458 4293035375 4292836987 4292968297 4293231206 4292968330 4293099365 4292904316 4292835951 4292573803 4292242022 4291124574 4289480017 4287575378 4285274173 4284681527 4284417863 4284615738 4284550196 4284812343 4285993536 4287901258 4289807433 4291190624 4292043875 4292438889 4292900445 4292836981 4293227360 4292441704 4292506734 4292505946 4292833134 4292832603 4292836723 4292771185 4293096815 4292837757 4293950824 4291916392 4287570755 4284089925 4283896630 4284550476 4284554301 4284223814 4284946488 4284945474 4285208632 4285602108 4285801546 4285011266 4284947526 4285540685 4284816457 4284684861 4284552517 4284750399 4285540172 4285142588 4284091959 4284418872 4284488772 4285012290 4285013059 4285542734 4284160846 4284620616 4283963721 4285606493 4288173424 4290344836 4291790711 4291329921 4291068279 4291134328 4291131764 4291129460 4291134587 4292119941 4292383616 4292318606 4291924606 4292318607 4292317320 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4288165709 4288756558 4288823116 4288627299 4289348171 4289150544 4287970896 4289022282 4289348174 4288691280 4288035408 4288627535 4289546069 4290597202 4292373612 4292112726 4293163101 4292773495 4293299065 4293496184 4292709999 4293102455 4293234551 4293039477 4293232746 4293496449 4293100651 4293231468 4292506972 4292242793 4291124055 4289283152 4288099156 4287968341 4287966277 4288427340 4288165454 4289412176 4289282637 4288953679 4289151058 4289151058 4289413201 4289807957 4289808738 4289545043 4289414743 4289610574 4289610574 4289349207 4289742167 4290071379 4289874517 4290333011 4290268754 4290859610 4290664285 4290662490 4291121497 4291125592 4291123037 4291123037 4290533462 4291252825 4290858327 4292905851 4293828215 4291317335 4289348689 4290070615 4290530648 4289545045 4290399320 4290269018 4290793043 4290729565 4290730839 4290660951 4291253082 4290075231 4290859096 4290138971 4290205287 4290271068 4290074726 4291453787 4291127668 4291124319 4290993760 4291000180 4291588719 4290862177 4291329653 4291918959 4291328884 4291461238 4291647062 4290409595 4292115311 4291851115 4291724164 4292245112 4292308853 4290937207 4290929527 4291195257 4290600294 4290603890 4291260530 4290077552 4290731881 4289879414 4291993492 4293180855 4292586654 4292519312 4292913055 4292526256 4293575588 4292656821 4292522917 4292524969 4292522412 4292787623 4292000444 4292587177 4292788132 4292655269 4292585111 4292522411 4292459438 4293445566 4292854459 4293248443 4293117371 4292920251 4292393909 4293839550 4292986045 4292657080 4293247928 4292854458 4293051581 4292919737 4292987328 4293448386 4292985788 4293380800 4293379516 4293381312 4292986044 4293051581 4293051067 4292989636 4293383107 4293317058 4293252293 4293582537 4293512896 4294301639 4292002237 4285471030 4285994566 4287703623 4287835977 4289282894 4290333267 4291454043 4292242024 4292572009 4292772207 4293427045 4292969085 4293231206 4293034364 4292839283 4293295733 4292642156 4293164935 4292444780 4292768638 4292242788 4291125857 4289480016 4287508044 4285665855 4284420422 4284814653 4284488256 4284615739 4284287285 4285074748 4286782793 4288821324 4289939794 4291386958 4292109923 4292636267 4292572761 4292510836 4292507502 4292964701 4292506205 4292833885 4292898160 4292442972 4293162354 4292706925 4293100137 4293098352 4289543242 4284025922 4284224068 4284353865 4284486972 4284288838 4284420925 4284747320 4285865803 4285406789 4285144394 4285406786 4285211722 4285471810 4284948299 4284554051 4284354878 4284684348 4285407305 4284751431 4284948041 4284224573 4284358475 4285209926 4285341769 4284683835 4284357962 4284094521 4284882008 4285342800 4287053150 4289620345 4291790467 4291593350 4291462277 4291129457 4290275697 4290278787 4291659643 4292185734 4292055432 4292055937 4292318592 4292384143 4292122752 4292317064 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4288758608 4288624206 4289412171 4288628297 4288757326 4289348429 4289216336 4289083214 4289346634 4288626001 4289346381 4288556874 4289546317 4291256163 4291716430 4292964703 4292706673 4293232236 4293299059 4293037177 4293562994 4293234302 4293693309 4293430397 4293628037 4293168239 4293299321 4293623670 4292507758 4292242792 4291384144 4290333264 4288890204 4287310660 4287443016 4287838286 4288297037 4289216593 4288691785 4289217107 4289546066 4289480529 4289610580 4289610580 4289414741 4289217107 4289612114 4289349201 4290003796 4289740368 4289546579 4289610839 4290070088 4290333786 4290333009 4290139743 4291253843 4290532957 4291190624 4290597981 4290596685 4291188308 4291253338 4290073692 4290987858 4293771397 4293692788 4290658888 4289478220 4290396240 4290335579 4290136919 4289811293 4290403423 4289678170 4290270556 4290333271 4291255134 4290532182 4291318617 4290071384 4290730846 4290729568 4290666336 4291254874 4290471541 4291322199 4290206070 4291914596 4291452762 4291783548 4291717756 4291851372 4292249220 4291718231 4290404472 4290343793 4292178792 4290733675 4292379262 4291061883 4291916911 4291196546 4291061355 4291129715 4290012266 4290734444 4290994528 4290603640 4290139743 4290409086 4292259994 4292714126 4292854184 4292915110 4292522647 4292458153 4293245846 4292784556 4292523424 4292588197 4292524457 4292590256 4292521643 4292656543 4292589992 4292583578 4292064695 4292588722 4292723385 4292722616 4292525495 4293181878 4292657080 4293445566 4293445565 4292921534 4292852402 4293448901 4292722359 4292722872 4293051837 4293447104 4293051581 4293051580 4292986044 4293051837 4293051837 4293051837 4292919737 4292985530 4292985529 4292329917 4293117630 4292987584 4293317315 4293710018 4293580742 4293516489 4293582025 4293189576 4288766079 4288560201 4287046214 4287441482 4288822091 4289676880 4291779417 4292044369 4292573807 4292837742 4293035374 4292903531 4292902525 4292904814 4293034361 4292706938 4293099897 4292968311 4292510062 4292572008 4291914339 4291517793 4289217107 4288098635 4285996361 4284550205 4284420677 4285402683 4284484672 4284418363 4284811319 4285730366 4287047241 4289412939 4290790732 4291387736 4292043612 4292176746 4292703335 4292572759 4292503380 4292635479 4292963937 4292507468 4292508271 4292705393 4293032813 4293624701 4291451981 4285601344 4284026692 4284157502 4283961654 4284289350 4284420924 4284883787 4285537092 4285340995 4285207351 4285470784 4285145162 4285601850 4285276233 4284883017 4284354364 4284488516 4285015115 4285537866 4284883016 4284553804 4284160579 4284620101 4285406018 4285998153 4284488525 4284419906 4283567945 4284422214 4286725481 4289489286 4291659136 4291921798 4292051328 4291527027 4291132278 4290014581 4291397244 4291856503 4292055164 4292776842 4291990401 4292383612 4291989375 4292384144 4292122236 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4288759117 4289413709 4288562001 4289216080 4289150800 4288625488 4288625488 4289022282 4288757582 4288755533 4288166737 4288691792 4289217365 4290661717 4291847767 4292573808 4293099628 4292969325 4293299060 4293495929 4293235058 4293693816 4292973176 4293233009 4293167478 4293693571 4293103229 4292837741 4292508512 4292242010 4291386717 4289940057 4288755531 4287376453 4287378520 4288556624 4288298064 4288624461 4289478483 4288953936 4289544268 4289217366 4289873746 4289151821 4289612121 4289546327 4289742945 4289807701 4289349206 4289546585 4289676372 4289742419 4291056229 4290335571 4290205535 4290791248 4291123286 4291185751 4290532180 4290664534 4290731104 4290140768 4290201942 4290136159 4291455078 4294037153 4292311126 4290132816 4289545815 4290529361 4290268257 4289284954 4290466138 4290269017 4290858071 4290729821 4290793300 4290663251 4290664286 4290598236 4291323745 4291125600 4291124058 4291124835 4291126118 4291124569 4291063423 4291190368 4290142836 4291390845 4291262319 4291852911 4292117111 4291322976 4290667901 4291456867 4291587449 4291192953 4291722357 4291258733 4291982701 4292049008 4290930791 4291388517 4291192942 4291324527 4290925141 4289744479 4289547879 4290611101 4292389794 4292971900 4292524207 4292654230 4292855493 4292915880 4292523432 4292520851 4292522648 4292522655 4292524716 4292788400 4292394145 4292719780 4292057236 4292589743 4292526265 4292590509 4292723129 4292523698 4292459701 4293247924 4292721330 4293379772 4292854202 4292854202 4293511101 4292722873 4293115573 4293118913 4292722615 4293313979 4292854202 4292985530 4293117373 4292986043 4292788408 4292788407 4292985530 4292594371 4292592318 4292594114 4293116860 4292988610 4293447360 4292990405 4292924613 4293644481 4293909705 4293845194 4294173645 4291483848 4288564822 4285861700 4287049543 4288754251 4290070873 4290995559 4292701547 4292505699 4292901739 4292706158 4292903534 4293099368 4292904062 4293427572 4292838530 4293232491 4292902776 4292640894 4292965227 4292242278 4291122778 4289480278 4287508808 4285929542 4285339704 4285076037 4284420671 4285207360 4284352820 4284418358 4284156213 4285793851 4287113292 4288889423 4289741894 4290662483 4291129974 4291531413 4291995050 4292520622 4291464597 4292110417 4292569440 4292382347 4293358179 4293232238 4292766033 4287046216 4283764035 4284355140 4284156989 4284554059 4284418876 4284552774 4285208123 4285144383 4285606224 4285406788 4285009722 4285603652 4285408075 4285078597 4284488002 4284685895 4285471302 4285145934 4285211726 4284288828 4284553794 4285210437 4285472587 4285867850 4284552764 4284553788 4283369798 4283763774 4285934680 4288568950 4291199106 4292314496 4291986045 4290740867 4290605939 4290474868 4291593849 4292185216 4292448391 4291987584 4292188029 4291988874 4292317569 4292383883 4291793783 4292382859 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289346384 4288759123 4288755786 4288757581 4289216336 4288234317 4289413200 4287970897 4288888909 4288757329 4288165194 4288689998 4289085261 4290728270 4292373610 4292507240 4293164383 4292969326 4293299060 4293431154 4293235067 4293430136 4293431159 4293627774 4293430647 4293430652 4293496447 4293231211 4292900192 4292043606 4291387228 4289873492 4288099670 4287377737 4288097349 4287772238 4288298065 4288624202 4289480272 4289348938 4289346897 4289283401 4289150031 4289873752 4289544786 4290071385 4290071384 4289348949 4289480278 4289742682 4290071905 4290007397 4289875544 4289808216 4290923606 4290141538 4290727249 4290535009 4291252825 4291189085 4290596953 4290794074 4290465366 4289741917 4294033303 4294295162 4291781220 4289346383 4290071384 4289349988 4290005590 4289940056 4290529364 4290203738 4290792535 4291254876 4290072154 4290664542 4291252560 4290597210 4291712865 4291058523 4290928505 4291123802 4290404445 4291454318 4291125855 4291061357 4291652462 4290864238 4292379776 4292110434 4290731626 4291391867 4291719773 4291063179 4291522926 4291326561 4290802549 4291786618 4291852418 4290934385 4291912545 4289358199 4291455341 4289808734 4289219944 4289551720 4291734176 4293243543 4292587172 4292457120 4292654489 4293242527 4292655516 4292457888 4292585628 4292587678 4292520601 4292787878 4292589993 4292586645 4292254611 4291667115 4292655014 4292657595 4293182392 4292851381 4293051320 4292657080 4292525237 4292655527 4292591545 4292525493 4293511359 4293051837 4293051838 4292853944 4292198587 4293117373 4293117374 4292854458 4293576894 4292593089 4292461501 4292129202 4292919993 4292395966 4293117373 4293117886 4293055685 4293052350 4293051324 4293051324 4292988353 4292987584 4293381568 4293315776 4293251780 4293516232 4293844938 4294305488 4292133810 4286123835 4286650951 4287771979 4289350228 4291518036 4291848804 4292637802 4292444785 4293099627 4293099371 4292706158 4292773232 4292902523 4293100911 4292836985 4293100153 4292642931 4292573291 4292110182 4291321693 4289546589 4287048522 4286062409 4284551991 4284483910 4284944952 4284682047 4284550210 4284681525 4284549431 4283959348 4284549437 4286915133 4288302443 4291603632 4293315521 4293449929 4293777865 4294564037 4292987842 4291926703 4292588218 4293054148 4292713353 4292571235 4288756046 4284814404 4283895110 4284418116 4284095292 4284684876 4284620103 4284683835 4285080656 4285863238 4285538116 4285274694 4284684866 4285474902 4284950359 4285604425 4284424011 4285209670 4284750398 4285012803 4284880970 4284552246 4284489804 4285342536 4285472073 4285340479 4284618308 4284290371 4283960394 4284685639 4287582582 4290999424 4291463031 4292117893 4290869363 4291129711 4290344836 4291327870 4291725181 4292119941 4291989882 4292448892 4291989898 4292382340 4292317053 4292316032 4292186485 4292316791 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4288758608 4288301138 4289281872 4288691280 4288691280 4288756816 4288033613 4289609290 4288624206 4288755789 4288754507 4288755790 4288692041 4290793820 4291847775 4292703338 4292313460 4293232236 4293299066 4293430391 4293300606 4293037939 4293495933 4293169014 4293496183 4293233271 4293299316 4292968299 4292900972 4292178028 4291453278 4289350748 4289346379 4287376204 4287378765 4288950089 4288754507 4289282641 4288496464 4289543760 4288953935 4289544787 4289871954 4289217614 4289283156 4289217364 4289282899 4289546072 4289019465 4289677393 4289481059 4290204248 4289941083 4290465618 4290333529 4290202705 4290726226 4291253338 4290007902 4290730583 4291252056 4290858066 4289807188 4291713374 4294237096 4293830260 4291974498 4289018959 4290071127 4290007130 4289610837 4290070101 4290858584 4290859866 4289481305 4291254621 4290662746 4291252055 4290661464 4290006101 4290203480 4291387485 4290467931 4291256931 4291648614 4290863200 4291979630 4290929772 4291587938 4291520879 4290863208 4290869112 4291593323 4291983471 4291389554 4291981907 4290864244 4291195516 4291981933 4292049010 4291126886 4290398812 4289882748 4291584607 4289747556 4289088603 4290411400 4292582565 4292708978 4292522155 4292457381 4292917424 4292912012 4292522658 4292322710 4292981153 4292523945 4292588205 4292592567 4292255379 4292120977 4292579217 4292590005 4292587930 4292917428 4292852395 4293115057 4292657337 4292393132 4293050550 4292854716 4292392627 4293444533 4292788668 4292984237 4292986045 4292722616 4292985787 4292853944 4292985787 4292854200 4292919737 4292328115 4292656309 4292986814 4292987070 4292788151 4292985787 4293117373 4292463036 4293444795 4293054146 4292922303 4292985273 4293052351 4292988097 4293381825 4292989123 4292924357 4293975240 4293779402 4294305486 4293387214 4287116112 4286651204 4287968076 4289480017 4291124575 4292307559 4292637545 4292510321 4293099627 4292706413 4293099370 4292902524 4293100907 4292705899 4293100155 4292706153 4292968571 4292573547 4292109926 4291323489 4289347404 4287051599 4286125381 4284419909 4284617277 4284553798 4284549952 4285142074 4283762748 4283764019 4283369531 4283828018 4287784580 4293251273 4293516482 4293646270 4294105032 4293180837 4292459448 4292722102 4293383364 4293973444 4294300611 4293844430 4291139482 4284942132 4283565129 4283699528 4284226630 4284353603 4284491593 4284419899 4284815945 4285539914 4284750144 4285538380 4284619847 4285406280 4285013571 4285801805 4285144644 4284161096 4285865797 4284884045 4284879670 4284682814 4284554052 4284948299 4285276743 4284945218 4284550980 4283893827 4284619852 4285145925 4287842417 4290014851 4291659394 4292118392 4291788670 4291066483 4290933119 4290936949 4292119421 4291988611 4292120968 4292383889 4291989115 4292446848 4291859833 4291987575 4292383620 4291989116 4292317063 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4288295500 4288298832 4288756816 4288168016 4288756816 4288758864 4288757072 4288298061 4288758864 4288166737 4288755531 4288034126 4289348938 4290793299 4291716183 4292047472 4293230168 4293166706 4293299058 4293628542 4293235315 4293495934 4293037949 4293495932 4293037437 4293496190 4293299310 4293033837 4292441693 4292437846 4291058007 4289939280 4288298065 4287508038 4286917191 4288491850 4288229707 4288692049 4289278794 4288494672 4289282899 4288953678 4289283413 4289346895 4289348693 4289414222 4288562258 4289150794 4289546851 4289217886 4289414484 4289546072 4289610837 4290135893 4289742936 4290991195 4290138203 4290663002 4291383890 4290072917 4290793299 4289807443 4289412175 4292515208 4294171287 4293431403 4290925402 4289347409 4289809250 4290333269 4289609554 4290466651 4290138202 4290792277 4291256672 4291124054 4290662490 4290203216 4290729820 4290596971 4290730844 4290534501 4291255388 4290466136 4290996590 4291979641 4291061093 4291455597 4292113548 4291522145 4291325298 4291453797 4292312193 4291392114 4290991707 4290800756 4291979882 4291919224 4291850080 4291320926 4289025632 4289882478 4291122779 4289679970 4289353583 4291855247 4292387221 4292652444 4292580498 4292457881 4293445556 4292850338 4292588192 4292185480 4292713367 4292124300 4292588978 4292592566 4292649881 4292124323 4292192921 4292787895 4292521359 4292983736 4292456096 4292722613 4292852395 4292459959 4293248701 4292392106 4293050030 4292657338 4292458925 4293050285 4292657081 4292393652 4293183158 4292986045 4292722614 4292788150 4292131254 4292262840 4293117374 4293051838 4293248186 4293446848 4292527552 4292590773 4292985787 4293117117 4293052863 4292528065 4293185218 4292329660 4293117886 4293054146 4292986558 4292987841 4293448386 4292858564 4293909704 4293450439 4293714382 4290086794 4285073212 4287508038 4289414223 4291058524 4291848036 4292114544 4292508525 4293099626 4292902781 4293231210 4293232492 4292837741 4293034619 4292904818 4292968058 4292838524 4292638827 4291718502 4291254369 4289483354 4287640396 4285665854 4284422213 4284617278 4284681024 4284617013 4283566902 4284092209 4282977361 4283106112 4288841626 4293843405 4294104261 4294038215 4293575593 4292258465 4292392634 4292462529 4293316288 4293907909 4293383878 4293777094 4293907653 4293252292 4284749892 4283434819 4283767113 4284092997 4284161355 4284487752 4284291145 4285341511 4285408587 4285539147 4285012805 4285737294 4285014602 4285012290 4284095560 4285275205 4285079628 4284620359 4285604682 4284489805 4284749372 4284226890 4286063167 4286065495 4285209925 4284027709 4283765312 4284221501 4286723940 4289422214 4291593598 4291723918 4291921268 4291264898 4290869631 4291000177 4292119423 4292120454 4292056952 4291860094 4292315764 4292383110 4292187513 4292054662 4292447617 4291987830 4292382855 4292316278 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4288498782 4288298830 4288166224 4288757072 4288757072 4288624205 4289215053 4288625744 4289216336 4288689997 4288754251 4288690767 4289279819 4290267472 4292108894 4292636521 4292772466 4292969324 4293101181 4293628028 4293167224 4293430385 4293431409 4293430654 4293233008 4293430653 4293299317 4293361513 4292901217 4292176741 4291452253 4289217880 4288818760 4286850375 4287572807 4287901769 4288428879 4288754251 4287970126 4289413965 4289151564 4289151058 4289546066 4289283151 4289283151 4289283151 4289807445 4289085515 4289676115 4289480272 4289611859 4289547867 4290071128 4289283928 4290530648 4289808472 4290202193 4290794331 4290136145 4290794588 4290659666 4289479765 4289872990 4294364576 4293835912 4293491047 4290924881 4289545302 4290069842 4289872978 4291121497 4289808983 4291448918 4289548647 4291382613 4290532701 4290598749 4291189085 4291189590 4290532442 4291255644 4290993005 4290535275 4291124575 4290994274 4291455338 4291519850 4291060064 4291524211 4292438900 4290929515 4291130488 4291584346 4290927712 4290933111 4291982190 4292114535 4291914084 4290469479 4290076273 4290535518 4289807195 4289152092 4290080385 4291924870 4292383881 4292645265 4292523169 4292523683 4292977034 4292458660 4292646026 4292060821 4292718240 4292058523 4292456092 4292717199 4292252292 4292191906 4292590250 4292982702 4292587930 4292587432 4291995536 4292589217 4292524977 4292524977 4292523422 4292917931 4292526008 4292456104 4293051058 4292131514 4292591030 4292525493 4292788666 4292525493 4292786092 4292195765 4291934652 4292788150 4292788408 4293511358 4292986045 4292658618 4293248186 4293053120 4293117374 4292722615 4292985788 4293051581 4293052863 4293052606 4293183678 4292530117 4293051067 4293118399 4293052350 4292989636 4292989123 4293644996 4293910987 4293779145 4292267984 4286651715 4286983240 4288560208 4290793563 4292045407 4292503399 4292575855 4292771694 4292969068 4292903277 4292904822 4293033577 4293164918 4293231739 4292903528 4292640893 4292638827 4292438887 4290073941 4289676882 4286982470 4285799238 4284550968 4284354117 4284288820 4283370549 4283699001 4282712131 4284358478 4289963446 4293646266 4294105803 4293643196 4292585098 4292128438 4292988356 4292989379 4293977549 4293842629 4294107595 4294108621 4294042829 4294107082 4294635220 4287065477 4282778435 4283896887 4284093253 4284224841 4284290370 4284947784 4285737551 4285405760 4284685641 4285076795 4285211464 4285802062 4285144390 4285144386 4284227147 4285011255 4285407306 4285275461 4284292165 4285341766 4284488517 4285931337 4284227146 4284554059 4284354371 4283631940 4285929804 4288764516 4290675074 4292315783 4291920255 4291395189 4291391100 4290804609 4291395973 4292119157 4291990153 4292842377 4291990415 4292384137 4292055689 4291593854 4292448388 4291988604 4292053633 4292054397 4292382081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4288297294 4288232016 4288757072 4288691279 4288625744 4289413965 4289217102 4289217101 4289217101 4289151056 4288626257 4288622152 4289217866 4291319133 4291848030 4292638303 4292835420 4293428332 4293036140 4293627775 4293628278 4293366398 4293167223 4293430398 4293628022 4293234821 4293101678 4293428589 4292507229 4291846484 4291190360 4290070095 4288164169 4287506503 4287573831 4288098634 4287182159 4288820043 4289216593 4288953936 4289412688 4289546323 4289412940 4289676367 4289610575 4289610580 4289217620 4289283157 4289808215 4289151828 4289610579 4289676374 4290005592 4290660693 4290399577 4289677401 4291384149 4290662747 4290139743 4290792272 4290926172 4289018959 4291780698 4294435506 4293635962 4293500024 4291910241 4289479509 4289413715 4290071641 4289545557 4290400603 4290793813 4290398032 4289483102 4291189846 4291513684 4291123548 4290466908 4291453278 4290008417 4291257438 4291122005 4290799993 4291585635 4291190372 4291456370 4292175970 4291123805 4290998387 4291783770 4289482070 4289682558 4291721065 4292045419 4292113257 4291126376 4290402652 4291261556 4290861658 4289807966 4289088090 4290934911 4292648077 4292714909 4292582809 4292521630 4293309857 4292450186 4292578947 4292583574 4292128928 4292124315 4292192667 4292784032 4292252289 4291727763 4292254619 4292655003 4292587422 4292588448 4292061350 4292588699 4292590517 4292520873 4292722869 4292721584 4292524462 4292460216 4292984243 4292526008 4292850082 4292985002 4292195755 4292590263 4292588960 4292194485 4292130229 4292722871 4293379772 4292722872 4292986044 4292657079 4293445565 4293051838 4292722872 4292984757 4292985788 4293183167 4292656557 4292985788 4293117116 4292527039 4292921023 4293182652 4293117373 4292395452 4292592831 4293051067 4293052094 4292990405 4293582024 4293976523 4292797126 4289301149 4285927995 4288754763 4290859854 4292242010 4292703337 4292315014 4292968810 4292903276 4293231207 4292968572 4292839278 4292968826 4293230951 4293100155 4292903805 4292182632 4291912803 4290794844 4289348431 4287838031 4285140022 4283961909 4283567667 4283700029 4283239749 4282974263 4285613674 4292197573 4293581762 4294235853 4293378212 4291530116 4291345093 4293515205 4293579973 4293907653 4293777350 4294105030 4294104773 4294040520 4294041802 4294042572 4294437328 4291672506 4282384963 4283306835 4283832401 4283897406 4284355907 4284554051 4284291138 4285998153 4284815424 4285867337 4285535551 4284095816 4284552259 4284421188 4284683835 4284816971 4285078594 4284157767 4284226370 4284750920 4285605707 4284749890 4285734210 4284356933 4284288838 4285145936 4287581547 4290868112 4291462018 4292642674 4291330693 4290804611 4291002741 4291462007 4291791231 4292384395 4292382339 4291923579 4292448890 4291987583 4292054913 4292448133 4291989385 4292382597 4292448381 4292053368 4292053624 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4288756816 4288757069 4288625743 4288823123 4289413964 4288430672 4289217100 4289348695 4289414474 4289017933 4289085520 4289083982 4288954190 4290794062 4291715683 4292634968 4292378724 4293165163 4293496705 4292972141 4293236351 4293563255 4293694584 4292842602 4293430143 4293233265 4293101936 4293165675 4292507760 4292636263 4291646038 4289216332 4288296268 4287506247 4287048519 4287442503 4288556102 4288231758 4288757581 4289480016 4288953679 4289217615 4289806155 4289349464 4289742417 4289807960 4289545038 4289545295 4289872718 4289742418 4289479509 4290267215 4289283929 4290399578 4289937993 4290922829 4290597725 4291187025 4290728787 4290204259 4290267990 4290263903 4291724674 4294302618 4293897075 4292834920 4291185234 4289152342 4290069331 4289019985 4290726485 4289810267 4290529365 4289677144 4291320412 4291125605 4290661207 4290598748 4291776862 4290533730 4291057752 4290006634 4290537328 4291387234 4291390321 4292309353 4291189335 4289876839 4291259505 4290597717 4288825690 4291193717 4292309864 4292112740 4291063920 4290928744 4291258474 4291454301 4290728794 4290268502 4290530661 4291133583 4292973696 4292579977 4292520595 4292980388 4292584858 4292451996 4293038210 4291661714 4292710272 4292056215 4292724154 4292714890 4291662999 4292651685 4292651154 4292588955 4292581004 4292585883 4292586393 4292589471 4292590522 4292586647 4292525484 4292981921 4292524970 4292587176 4292983466 4292460216 4292525237 4292526265 4292194224 4292261786 4292585636 4292128685 4292460214 4293839034 4292459958 4293510841 4293117114 4292722872 4292985787 4292920251 4292984243 4292854201 4292264381 4292656557 4292919737 4292132537 4292722101 4292593088 4293118655 4293182652 4292330173 4293182652 4292592575 4292593857 4293054402 4293051323 4292462016 4293317572 4293911244 4293844681 4292663248 4288496469 4287967560 4290201675 4291583842 4292309864 4292572264 4292578682 4293297277 4292968073 4293362790 4293166705 4292970109 4292903275 4292771692 4292444527 4293096301 4291455079 4291059808 4289413708 4286126918 4284483892 4283371325 4283371334 4283172414 4282844217 4288179348 4292729549 4293711046 4293973167 4292389521 4291200918 4292593860 4293055428 4293973189 4293841346 4293448901 4293841090 4293842117 4293382594 4294104261 4294103491 4293976010 4294372042 4293648852 4283961675 4283372103 4283830592 4283830591 4284420682 4285144643 4284883017 4284686152 4285539147 4285472591 4284421691 4285603659 4284225596 4285603396 4285670222 4284881987 4284550724 4284226622 4284357961 4285406279 4285143879 4285407304 4284424267 4284419655 4284621907 4287379035 4289622647 4290935935 4292315782 4291593348 4291460725 4290997871 4291264385 4291595395 4292447616 4292381565 4291923594 4292382597 4291989131 4292448891 4291988358 4292382587 4292381823 4292054396 4291660158 4292448383 4292053633 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4288824658 4288625487 4289479507 4288561743 4289019472 4289478223 4289281360 4289742159 4288888144 4289412944 4289018189 4288952910 4289807176 4290137949 4291583057 4292638577 4292836959 4293362796 4293233267 4293628287 4293170036 4293628784 4293170052 4293431421 4293628534 4293364857 4293495405 4293361514 4292506972 4292176470 4291056966 4289741648 4288229448 4287444045 4287574346 4287443274 4287966022 4288232529 4288625741 4289282130 4289348949 4289806161 4289742680 4289545044 4289740619 4289283666 4289938255 4289872975 4290068307 4289873484 4289806926 4289940315 4290069584 4290333011 4290335581 4290202194 4290662227 4291122267 4290731103 4290272615 4290069586 4289346384 4294296213 4294168726 4293502093 4292832848 4290202713 4289347408 4289217362 4289547109 4290530647 4290004565 4290923346 4290138203 4291253843 4290731874 4290135115 4290137177 4291455586 4290659148 4289879148 4292109922 4291717477 4291455339 4291258216 4290467424 4290603899 4291387231 4290072670 4290011765 4291191398 4292113782 4291586923 4291453280 4290929257 4291521883 4290728538 4289679451 4289940311 4288758611 4291333012 4292908935 4292586145 4292515987 4292982179 4292517530 4292055705 4292711303 4292122773 4292120971 4292058528 4292719522 4292117883 4292055442 4292653474 4292588703 4292588193 4292650898 4292058266 4292581267 4292526261 4292915374 4292526523 4292588195 4292652455 4292129435 4292653219 4292197814 4292520102 4292786846 4292789440 4292852134 4292060570 4292585906 4292592569 4292983481 4293443757 4292262837 4293248442 4292328373 4292852137 4292985786 4293117114 4292788408 4292591287 4292986036 4292853945 4292919738 4292262583 4292592830 4292853944 4292985530 4293116860 4292528835 4293182652 4292528322 4293185474 4293118142 4293052607 4293116860 4293052350 4292989635 4293250497 4293712327 4293778119 4290490297 4287832891 4290332236 4291453270 4292767849 4292508785 4292642676 4292838269 4293166957 4293363820 4293100156 4293364080 4293231487 4292773231 4292968814 4292178017 4291848803 4290333266 4288365903 4286781504 4284026420 4283305019 4282909757 4283765566 4289501106 4293841863 4293973703 4293446838 4291793795 4290220967 4292527551 4293317316 4294366405 4293448386 4293578948 4293642941 4293120963 4293580230 4293643455 4293772213 4293382851 4294040520 4294306507 4293845708 4286069342 4282977615 4283765063 4284617544 4284817477 4284552003 4284488259 4285209148 4285013319 4285274429 4285210441 4284617020 4284488774 4285274429 4284222525 4284222784 4284223300 4284949322 4285078083 4284752715 4286195275 4284750918 4284816974 4283898175 4286454858 4288503158 4291000716 4292578695 4291987063 4291723134 4291262335 4291264641 4291659143 4292448388 4292317052 4291923590 4292777341 4292250487 4292382838 4291989126 4292384123 4291988358 4292383621 4292381824 4292120702 4291858293 4292381825 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4288627280 4289216080 4288102988 4289150288 4289217100 4289151058 4289348687 4289085517 4289742159 4289085523 4289414736 4288952397 4289086550 4290858072 4291321687 4292505690 4292837217 4293099628 4293430645 4293564280 4293628535 4293170047 4293694324 4293627262 4293169530 4293628543 4293166955 4293427048 4292442224 4292635996 4291057504 4289939799 4288230219 4287441991 4287508039 4288097863 4287115852 4289346381 4289150800 4288693587 4289282894 4289677909 4289545044 4289545038 4289742418 4290070606 4289807189 4289676882 4289677132 4289611347 4290135377 4290332496 4290004818 4290333773 4290267736 4290139999 4291186508 4291121490 4290662234 4290337886 4290202474 4290069583 4294167464 4293770886 4294159207 4292638067 4290067274 4289543503 4289151827 4289939540 4289415000 4289939799 4290269531 4290859610 4290927455 4290067530 4288888914 4290929762 4290071394 4290535017 4292305769 4290864233 4290994531 4291848805 4290469475 4290733931 4290792020 4290074721 4290536042 4292703595 4291658604 4291321444 4290925663 4291126365 4291651693 4290599004 4290204763 4290595934 4289744485 4292250517 4292776595 4292518302 4292581517 4292589474 4292121229 4292644479 4292318341 4292252038 4292121499 4292719007 4292648079 4292121215 4292456366 4292586910 4292975753 4292588183 4292585361 4292192156 4292650647 4292523442 4292912774 4292724410 4292586133 4292657333 4292063390 4292652204 4292586648 4292587171 4292591788 4292063668 4292254594 4292059296 4292589493 4292985527 4293576634 4292984757 4292525233 4292983472 4292591545 4293116856 4292130995 4292454812 4292985267 4292986045 4292854201 4292591030 4292986045 4292853944 4292658626 4292461244 4292985530 4292593089 4293118656 4293182910 4292985530 4292986813 4292787638 4292658623 4292658367 4292396735 4293118399 4292526526 4293053633 4292988866 4293450439 4293189840 4289027441 4289476682 4291059289 4292375651 4292508784 4292969069 4293428585 4293165162 4292969332 4293166956 4293099626 4293035116 4292838771 4292508527 4292770927 4291125857 4290595662 4288692813 4285009466 4283107382 4282515518 4285282137 4290686396 4293582542 4294301635 4292525209 4291461498 4290814386 4293053635 4293318854 4293973189 4293448890 4293642946 4293249470 4293315520 4293774015 4293117884 4292788409 4292919740 4293579715 4294103235 4294043086 4294370769 4286599264 4282910795 4283764292 4284158283 4284485961 4284554050 4284685638 4284947012 4285537604 4285212241 4284814646 4284683071 4285274429 4285011523 4284812861 4284221765 4284422717 4285078341 4284683062 4285997129 4284554308 4284817231 4284354374 4284947008 4287579494 4290671246 4292447362 4291921799 4291855475 4291788927 4290871156 4291528059 4292119422 4292317061 4292250496 4292710271 4292250743 4292316546 4292183930 4291989381 4292775810 4291987830 4292053633 4292382080 4292053633 4292053367 4292448128 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289282637 4289151059 4289479760 4289348943 4289151058 4289348692 4289480274 4289283151 4289412946 4289283151 4289544275 4289086285 4289740364 4290663765 4292307296 4292373589 4292770148 4293362796 4293234286 4293234806 4293629559 4293694063 4292842889 4293236333 4293694330 4293169519 4293692280 4292969583 4292901474 4291979623 4291124039 4289283160 4288165454 4287441990 4287378509 4287836233 4288885835 4289084238 4289085264 4289151052 4289937491 4288954193 4289545294 4290003797 4289479252 4290006357 4290002770 4289807183 4290002764 4290135633 4290005850 4289415770 4290595152 4290203476 4290858584 4290727000 4291252057 4290533215 4291385684 4289872981 4289740360 4290990425 4294435246 4293836680 4293564021 4293167453 4290070360 4289018957 4290071641 4290201686 4289349208 4290466651 4290529364 4290596441 4288560460 4289613412 4291449945 4291124574 4291125856 4291125086 4291060318 4291978597 4290992473 4290864757 4291256667 4290071131 4290470781 4291192422 4291322485 4291980650 4290733168 4290339170 4291586411 4291718252 4291127146 4290271073 4290266193 4289944420 4292385172 4292906617 4292513408 4292977808 4292519831 4292645255 4292646539 4292251008 4291920786 4292714133 4292719265 4292118407 4292122771 4292979625 4292456594 4292980897 4292518297 4292058264 4292581793 4292586654 4292589746 4292588956 4292522161 4292585365 4292130741 4292061599 4292721588 4292587681 4292591021 4292585377 4292649118 4292647812 4292194493 4292592051 4292917170 4292654502 4292591545 4292591543 4292985013 4292982199 4292655262 4292591803 4293116085 4292721849 4292389791 4293182388 4292788667 4292854201 4292854193 4292788403 4293183151 4293118915 4292987842 4292984496 4292854202 4292524202 4291935935 4292526781 4292658624 4292593087 4293051065 4292658623 4293051580 4293052863 4293052350 4293053632 4292990149 4293646277 4292003019 4289354358 4291056972 4292437350 4292575585 4292771953 4292640366 4292969584 4293364078 4293297003 4293362795 4292969582 4292837233 4292181335 4292505449 4291253332 4288628554 4288360010 4283565621 4283633992 4287653511 4292069580 4294302666 4293907124 4292720029 4290872983 4291212734 4293118398 4293711044 4293905600 4293513408 4293643970 4293251257 4293445310 4292262066 4292919994 4292986045 4293313980 4293710529 4293055685 4294105030 4294107338 4294307029 4286793043 4282844746 4284157252 4284553798 4284226368 4284687183 4285210180 4284947783 4285010225 4284224319 4284483904 4284681534 4285079110 4284747581 4284355659 4284618308 4284618813 4284948036 4285603397 4285144647 4283831876 4284222523 4283701832 4286851170 4289553523 4292118158 4291987590 4292117630 4291526796 4291196541 4291330180 4292578942 4291990155 4292710015 4292121203 4292645511 4292250753 4292382839 4291988096 4292448390 4291987820 4292448648 4292053623 4291988088 4292447872 4291988871 4292644735 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289151053 4289348687 4289085517 4289544275 4289480530 4289217364 4289873490 4289152079 4289808211 4289676362 4289217866 4289674833 4289413705 4290728541 4291385942 4293031795 4292769889 4293166958 4293298811 4293301357 4293235588 4293169788 4293694843 4293628537 4293170542 4293629044 4293167476 4293559916 4292706398 4292963434 4291056469 4290005845 4289213770 4287181645 4288557129 4288361033 4288166993 4289214797 4288691795 4289414479 4289545038 4290005592 4289872719 4289415252 4289874257 4290002514 4290266702 4290070610 4290070865 4289938774 4289940045 4290398547 4290858068 4290792013 4290203734 4290138192 4290072143 4291254357 4290006619 4290990167 4289608547 4292243292 4294303406 4293771146 4293825897 4291583838 4290794331 4289609296 4290071898 4289609039 4290203225 4289874264 4290267479 4288361801 4289810026 4290862173 4290534495 4291120983 4291190622 4291192679 4291321436 4291256418 4291715434 4291122004 4290536313 4290866021 4291123288 4290928230 4291913835 4291389805 4291262851 4292508024 4291390064 4291914594 4290529877 4288887116 4290340214 4291984761 4292709238 4292519332 4292580490 4292578945 4292709500 4291922329 4292118662 4292320395 4292191912 4292118396 4292249462 4292056467 4293309865 4292454296 4292977822 4292520861 4292585881 4292056730 4292588952 4292587926 4292589475 4292586404 4292587676 4292587429 4292125069 4292720821 4292060312 4292656308 4292649110 4292318348 4291270320 4292650646 4292592053 4292521112 4292523166 4292851115 4293181106 4292985014 4292591535 4292986040 4292850357 4292915876 4292459958 4292722863 4292723130 4292392371 4292853673 4292986045 4292591031 4292722867 4292457125 4292985520 4292254608 4291409336 4292788151 4292525237 4292919737 4292985530 4293182909 4293248445 4292198330 4292658624 4293117372 4293117116 4292592831 4292592574 4293119169 4292989123 4293383364 4291809741 4291135649 4292239179 4292508004 4293099100 4293231470 4293164635 4293297261 4293165419 4292772207 4293296748 4292836702 4292706166 4291913047 4290204240 4289541189 4285339196 4286858342 4290291638 4293843148 4294040009 4293180585 4291666840 4291336865 4292133826 4293578946 4293973702 4293513408 4293644225 4293183935 4293313980 4293379774 4292722616 4292788408 4293117374 4292854202 4293248188 4293579715 4293841861 4294039237 4294107595 4293846992 4286202461 4282909254 4283568465 4284357696 4284816718 4285080137 4285080910 4285342280 4284815430 4284880184 4285469237 4285008708 4284681528 4284354110 4285011519 4284553276 4285931083 4284881475 4284553534 4285272381 4283893823 4283369020 4285012291 4288169834 4291068814 4292119673 4291724168 4292247673 4291131261 4291329905 4292185216 4291989382 4292382324 4292252290 4292316033 4292251518 4292381815 4291595390 4292447615 4291989381 4292120967 4292053375 4292053890 4292446331 4291396990 4292447862 4292251008 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289151058 4289480537 4289873484 4289217353 4289807948 4290003797 4289676875 4289936464 4290004041 4289084753 4289937998 4289346122 4289611342 4290989651 4291848544 4292439896 4292378467 4293428075 4293299064 4293235076 4293628021 4293694333 4292842874 4293629303 4293564548 4293562232 4293629562 4293231210 4293164147 4292308824 4291058265 4290069830 4289082956 4287836233 4287770697 4288884553 4288756814 4288562257 4289480009 4289019731 4290070866 4289218130 4290264651 4290006100 4290136151 4289480017 4290070360 4290465872 4290070361 4289741640 4290070611 4290595415 4290136665 4290859350 4290138204 4291251800 4291189856 4291120978 4291320152 4289938773 4289411148 4292842880 4294168983 4294166917 4293032301 4292108620 4290397782 4289281874 4288954187 4289676373 4289676630 4290069842 4289018958 4290467176 4290795354 4291520095 4291119701 4291128171 4291185998 4291254106 4291259486 4291190365 4290003538 4290536549 4291320173 4291190641 4290930281 4292304993 4291325806 4291652204 4291124314 4291125084 4291455077 4290071124 4288558152 4290472831 4292908930 4292711296 4292312445 4293169782 4292584857 4292311431 4291591533 4292249476 4292322202 4292783007 4291986050 4291724923 4292649630 4292583579 4292910214 4292522403 4292518039 4292581524 4292588712 4292588454 4292583319 4292584092 4292587410 4292588975 4292586906 4292651417 4292063410 4292583316 4292656557 4292122768 4291989899 4291927458 4293045899 4292525230 4292588967 4292981424 4292586392 4292587932 4292459178 4293047726 4292460216 4292525237 4292723129 4292460215 4292788408 4292459445 4292722615 4292920251 4292392370 4292986045 4293051839 4292198833 4292448906 4291594371 4291738817 4293248437 4292854201 4292264380 4292656565 4293182910 4292198586 4292461502 4292919480 4292919479 4292395965 4292658624 4293116858 4292461501 4292394939 4293120964 4292989379 4293644995 4293516490 4291529626 4292504132 4293163362 4292640883 4293164891 4293295980 4293165677 4293624425 4292969330 4292115803 4292375125 4291714905 4289676113 4287837017 4289364622 4292200905 4294304196 4293378990 4292261026 4291733912 4291603364 4292593092 4293514948 4293249728 4293579972 4293707708 4292919998 4293839285 4292854204 4293117365 4292591029 4292985787 4292919738 4292985789 4293710529 4293120707 4293448645 4294105030 4294106313 4293912005 4286196554 4283305534 4283766856 4284357443 4284423496 4284882248 4285341255 4285344075 4284618043 4284882507 4284355910 4284880951 4285144125 4284548932 4284620623 4284949069 4285996098 4285474126 4285077815 4283762504 4283173169 4283435078 4286854761 4290737525 4292182151 4292250503 4292183421 4291131005 4291788159 4291790214 4292382852 4292317060 4292252036 4292317834 4292316287 4292316279 4292316545 4292447616 4291988096 4292447873 4292052333 4292382338 4292053623 4292054136 4292119681 4292053889 4292380290 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289480273 4289217358 4289807954 4289414745 4289610318 4289283666 4289546325 4289612117 4289151823 4290069584 4288954445 4289872462 4289217098 4291513426 4291912279 4292570973 4293165423 4293166701 4292971385 4293234301 4293629047 4293169780 4293629303 4293562226 4293563006 4293564011 4293562234 4293494379 4292771678 4291980898 4291386719 4289806409 4289082956 4287769670 4288492621 4288295500 4288165454 4289215054 4289151566 4289544268 4289283660 4289805905 4289218392 4290201169 4289871441 4290791505 4289547092 4289940052 4290070604 4290002766 4289807178 4289938513 4290861146 4290135886 4290858317 4290729559 4290594630 4291188566 4290664543 4290202196 4289541207 4293967265 4294103974 4294031226 4292703328 4291253847 4289744988 4289741389 4289544274 4289019728 4289348949 4289941596 4290858584 4291319386 4290727255 4291120471 4290664534 4290656842 4289088860 4290798952 4290661717 4290068579 4291061868 4291845986 4290929507 4291518814 4291322212 4291061866 4291715680 4290007898 4290076263 4291324268 4289810263 4288954213 4290669683 4292119160 4292249219 4292579972 4292712844 4291457644 4292444013 4292185739 4292114806 4291596424 4292057980 4291393414 4292513939 4292980377 4292518308 4292581013 4292515481 4292581515 4292586910 4292588984 4292190092 4292984243 4292190873 4292713624 4292059025 4292060077 4292653469 4292190887 4292718745 4292587681 4292579984 4291595405 4292128166 4292653219 4292521876 4292584600 4292195748 4292588461 4292195758 4292192664 4292588709 4292524728 4292785822 4292525233 4292524975 4292981669 4292459958 4293051837 4292459444 4292459444 4292854460 4292854451 4292983981 4292450970 4290940049 4291931824 4292721318 4292722608 4292854202 4292919480 4292461759 4292985786 4292656565 4292985787 4292985787 4292461759 4292985015 4292197816 4292198073 4292787893 4292658625 4292986299 4293117886 4292465093 4293449927 4292988606 4292835181 4292705888 4293230427 4293165681 4293362523 4292640097 4292771168 4292444002 4292637277 4292504676 4290859862 4289623167 4291869636 4294105545 4293974211 4292984227 4291538596 4292326818 4292391599 4292463043 4293447874 4293709505 4293250498 4293379517 4292854195 4293051830 4292919997 4292788401 4292788409 4292985787 4292919994 4293184189 4293313723 4293186756 4293906882 4294169797 4294038212 4294237897 4293189590 4284354109 4283439690 4284089922 4284290370 4284422217 4284552259 4285078082 4284819025 4285014860 4285210694 4285274429 4284879949 4284748343 4284489285 4285734468 4284617526 4285472325 4285077052 4285208640 4283828274 4283303485 4285406027 4289290875 4291392906 4292120445 4292316039 4291460746 4291264638 4291199106 4292448126 4292317061 4292250494 4292776580 4291987582 4291988096 4292316545 4292382080 4291659905 4292118138 4292053632 4292053889 4292382336 4291988353 4292248452 4292052602 4292119672 4291725697 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289611865 4289480279 4289348945 4289414481 4289743957 4290068043 4290070101 4289349195 4289610581 4289938511 4289610838 4289216589 4290462291 4290924110 4292699482 4292898656 4292705887 4292969583 4293494897 4293628536 4293169272 4293629303 4293565829 4293563499 4293563768 4293563001 4293562233 4293428586 4292968046 4292505967 4291320652 4290596183 4289082699 4287770698 4287770697 4288361036 4288756046 4289147722 4289217357 4289217622 4290333016 4289481044 4289742417 4289806932 4289807188 4290006100 4289609291 4290136153 4290135628 4289675341 4289348682 4290790735 4290924372 4290268238 4290136923 4290204504 4290727763 4290730335 4290923089 4289741396 4288819786 4294495386 4294102677 4293633916 4292239950 4290729559 4291975001 4289283929 4289019728 4289873495 4289612376 4290136148 4291384153 4290661205 4289478482 4291122265 4290068306 4289547867 4292042596 4290533467 4290666091 4291257695 4290992473 4291125362 4291649121 4291455084 4291520121 4291715165 4290466653 4290732902 4290796647 4290925912 4289086557 4290932869 4293233262 4292449174 4292577153 4292711041 4292119933 4292115066 4291457910 4291720039 4292717493 4291262831 4291061880 4292449155 4292581264 4292517786 4292583321 4292517273 4292913301 4292521633 4292583823 4292714903 4292061858 4292645764 4292127903 4292060828 4292647574 4292652700 4292582816 4292655265 4292127660 4292381053 4291331466 4292387222 4292656549 4292587429 4292587171 4292583833 4292587678 4292590507 4292589724 4292586412 4292980381 4292525489 4292523183 4292981166 4292525744 4292456112 4292918187 4292788666 4292986045 4292591031 4293052078 4292854464 4291593076 4291662489 4292262325 4292328613 4292654004 4292131512 4292524980 4293051836 4292722101 4292527295 4292723385 4292788409 4292986044 4292722101 4292329915 4292395451 4292263865 4292590772 4292853685 4291739839 4292984758 4293249471 4293052350 4293053893 4292977564 4292702806 4293428848 4292837213 4292968819 4293163103 4292443232 4292574320 4292243039 4291523712 4291737539 4293252810 4293974457 4293510049 4292194465 4292195490 4292715934 4291739071 4293118657 4293840834 4293514163 4292921024 4293445308 4292919995 4292722617 4293511350 4292722617 4292985780 4292788409 4292919995 4293051837 4293313723 4293252293 4293644224 4293513666 4293776325 4294039750 4294236874 4293511604 4282318914 4283567695 4284490827 4284686411 4284816709 4284554051 4284749895 4284488258 4285078850 4285012805 4284878643 4284549433 4284421183 4284616510 4284291908 4285668165 4284815939 4285079373 4284223299 4283565892 4284157255 4287643236 4291063411 4291987845 4292316039 4291723390 4291788669 4291330434 4292315527 4292251525 4292317569 4292382587 4291923594 4292384380 4292316280 4292316280 4292382840 4292053623 4292447872 4292055174 4292447872 4291986810 4292447863 4291988353 4292119937 4292052603 4292118395 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289480278 4289151571 4290202708 4289742162 4289742161 4289349458 4289349201 4289610581 4289808215 4289347660 4289740878 4289938250 4289612374 4291778385 4291780698 4292899424 4293099099 4292903279 4293298028 4293235318 4293628024 4293563768 4293564784 4293564799 4293563261 4293564535 4293564287 4293495150 4292705886 4292768092 4290992217 4290071110 4288558412 4287770698 4289015367 4288164172 4288757329 4288562256 4289019473 4289283144 4289740626 4289545045 4289937998 4290006866 4289676625 4289611352 4289807183 4290070862 4289676882 4289479765 4290068307 4290070098 4289414225 4290268501 4291447885 4290071130 4291384403 4290201426 4289940314 4289216080 4290133066 4294369464 4293771655 4293560433 4291979870 4292176734 4290404194 4290530135 4289415257 4289413202 4290530647 4290399834 4290329673 4289481559 4290070100 4288952654 4290993498 4291383378 4290469736 4291387487 4290267220 4290532186 4292044133 4291452532 4292111721 4291060319 4290595923 4289942875 4291060854 4291319126 4290206565 4289544785 4290410113 4292570724 4291857035 4292642936 4292711811 4291589741 4292116350 4292050297 4292317326 4291856264 4290534990 4291722370 4292119959 4292645250 4292974978 4292515994 4292582027 4292520605 4292979352 4292649363 4292124053 4291729302 4292777857 4292059548 4292252575 4292589992 4292588723 4292187537 4292653976 4292712842 4292120457 4291730087 4292785558 4292586921 4292580488 4292588703 4292589226 4292585628 4292587668 4292059547 4292713612 4292198314 4292587934 4292583062 4292585873 4292525741 4292522930 4292983480 4292457900 4292854975 4292986293 4293052866 4292258473 4291794574 4291864228 4292392874 4292720295 4292129201 4292263598 4292919737 4292395701 4292198330 4292263865 4292394169 4292523441 4293051829 4292459445 4292788408 4292395709 4292985273 4292198329 4292264122 4292195765 4292985272 4291869884 4291869627 4292724161 4293184193 4292789691 4292966227 4293361515 4293165938 4293032519 4292836466 4292505430 4292638309 4292256436 4292857796 4293909696 4293249204 4292652947 4291803821 4292786085 4291601835 4292462017 4293118399 4293841346 4292988354 4292985533 4293511101 4292919995 4292788408 4292986044 4292722617 4292985787 4292985787 4292722873 4293248442 4292985788 4293316034 4293250496 4293186243 4293579973 4293841860 4294039239 4294304705 4290749846 4282581055 4284024906 4283831100 4284227659 4284816709 4284749382 4284749884 4284488260 4284816714 4285144900 4284487231 4284880191 4284225606 4284746551 4285472587 4284750403 4285797948 4284422978 4284158537 4285730371 4286065227 4290143113 4291592820 4291987848 4292051838 4292183681 4291264369 4291264643 4292382335 4292710773 4292317830 4291987582 4292317061 4292316287 4292316544 4292316544 4291987840 4292447873 4291988096 4292119158 4291659896 4292119680 4292053890 4292446577 4291461241 4292448130 4292382585 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289217107 4289677652 4289151573 4289545032 4289545302 4289740625 4289807954 4289349201 4289807959 4289150032 4289808456 4289348427 4290857552 4291383119 4292373076 4292833630 4292968833 4292641647 4293560428 4293169527 4293563249 4293563518 4293564024 4293565558 4293564797 4293564017 4293562994 4293429357 4293099886 4292439388 4291256930 4290660172 4289082700 4287769670 4287769671 4288886860 4288100941 4289348430 4289215306 4289283159 4289414737 4289414993 4289545045 4290266449 4289611346 4290397000 4290136403 4289611090 4289677138 4289872720 4290201157 4289545554 4290135378 4290398542 4290071631 4290857037 4290202453 4290596180 4289415255 4289018188 4291058528 4294435761 4294035856 4292444262 4293425771 4291517270 4291323490 4289477713 4290530904 4289940055 4289940836 4289675089 4289873236 4289742163 4289347406 4290666348 4289345613 4290337375 4291119443 4289150032 4290599516 4291126112 4290992732 4291126111 4290859869 4290593623 4290402929 4291585384 4291122519 4290140773 4289811818 4291985022 4292116582 4292115828 4292707697 4292249465 4292181617 4291723636 4291720298 4292317068 4292186759 4290204767 4291396487 4292448898 4292647840 4292645247 4291986306 4292449938 4292193705 4292651664 4292059564 4292120208 4292712083 4292123285 4292055713 4292709264 4292653728 4292979359 4292523424 4292654252 4292313741 4291723392 4292320918 4292262561 4292583311 4292583822 4292586153 4292056473 4292587929 4292588705 4292583835 4292651665 4292061601 4292450203 4292587164 4292654514 4292188053 4292583822 4292592316 4292525747 4292590506 4292586130 4292524456 4292649377 4291596944 4292128928 4292786362 4292263337 4292194721 4292786081 4292127121 4292129455 4292656302 4292654000 4292197048 4292656308 4292198844 4292589482 4292590768 4292588972 4292195752 4292656822 4292656308 4292329914 4292327094 4291802274 4292394171 4292000173 4292720306 4292527294 4292530633 4292443517 4292966744 4293033307 4292771696 4292442713 4292579726 4291803317 4293644743 4293513149 4292916380 4292653974 4292196782 4292125086 4292131258 4292988866 4293448386 4293379516 4292986045 4293117365 4292788408 4292133052 4292853936 4292788410 4292788409 4293117365 4292854459 4293117374 4292919986 4292986302 4293379772 4293250498 4293643969 4293971904 4293448901 4293777606 4294041033 4294631888 4289754228 4282515526 4283833423 4284230221 4284883533 4284489546 4284947784 4284488259 4285079108 4285274173 4284289854 4284485190 4284221758 4284420932 4284684862 4284881475 4285734214 4285473611 4284554055 4285669958 4286719052 4288630380 4291132286 4292116616 4292119172 4292509574 4291589754 4291657341 4291987336 4292316285 4292253067 4292316804 4292317061 4292775806 4291922303 4292316544 4292316544 4292382080 4291987830 4292316544 4292383111 4291922044 4291921544 4292119680 4292053891 4292118385 4292119682 4291723638 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289612116 4289807697 4289742417 4290070352 4289740620 4289808210 4289349201 4289545045 4289742423 4289808204 4289281870 4289807440 4290987597 4291253071 4292174684 4292900195 4292771163 4293233271 4293235571 4293628024 4293563512 4293566590 4293565303 4293564284 4293565313 4293565314 4293566084 4293626224 4292838255 4292964192 4291452751 4289479504 4288755784 4287837004 4287837004 4288361291 4288168017 4289282637 4289151566 4289478731 4289612380 4289806161 4289347403 4289481045 4289545045 4289872726 4289611346 4289938511 4289871184 4289872975 4289611096 4290071381 4289874254 4290007128 4291053648 4290859099 4289677390 4290399054 4289938261 4288886090 4292248949 4294302636 4293965176 4293497718 4292375902 4292109148 4291126370 4290397781 4290595414 4290070357 4290005335 4290400859 4291056987 4289219675 4290201684 4289545049 4290399576 4291450202 4289284183 4290928480 4291124317 4291452518 4291124574 4290532186 4291122775 4290930033 4291126888 4291059807 4291255900 4289940831 4291920001 4292446079 4292050555 4292512391 4292442745 4292246125 4291457661 4292378218 4292056988 4291654241 4290205286 4291593619 4292446093 4292446855 4292643186 4292186261 4292647061 4292712596 4292517525 4292190620 4292711562 4292123291 4292317830 4292252295 4292715930 4292128685 4291919991 4292457884 4292713367 4292319108 4291590536 4292318357 4292654744 4292583320 4292648868 4292190873 4292581259 4292587165 4292582041 4292584081 4292193189 4292581782 4292588968 4292585890 4292646537 4292192918 4292588975 4292586913 4292196263 4292648844 4292319891 4291725188 4292649111 4292192151 4292129443 4292721068 4292324238 4292126876 4292780958 4291735472 4292392120 4292260774 4292263097 4292195766 4292853423 4292722874 4292656821 4292194999 4292260005 4292655279 4292261296 4291932593 4292328889 4291999931 4292393143 4291931551 4292393387 4291866287 4291868588 4292328375 4292854201 4292390573 4292440676 4292966499 4292575361 4292589493 4292724410 4294038721 4292524449 4292457633 4292657326 4292652454 4292457128 4292789180 4293514171 4293315264 4293379517 4292986301 4292788408 4292788410 4292788408 4292985787 4292985789 4292985779 4292788408 4292854459 4293511358 4292919994 4292985788 4292985787 4292854459 4293313980 4293314750 4293120963 4294235333 4294103748 4294104773 4294240211 4286859362 4283703109 4283503946 4284424010 4284357702 4284752717 4284883015 4284685637 4285078083 4284684606 4284421183 4284417848 4284814398 4284883018 4285011011 4285406794 4284815423 4284950093 4286260049 4286260813 4287901793 4290012023 4291724427 4292117888 4292116088 4291592317 4291657597 4291987591 4292382077 4292318602 4292250493 4292316287 4292382596 4291923588 4292383626 4292316287 4292316544 4291988095 4292382854 4292776065 4291988086 4292119425 4292119681 4291920751 4292119673 4291921794 4291921792 4292118396 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289414737 4289414743 4289676887 4290200402 4289283660 4289414738 4289414739 4290003784 4289676882 4289938257 4289872970 4289937236 4290266701 4291318603 4292045159 4292964702 4292771954 4293102191 4293627770 4293562488 4293565298 4293562226 4293564535 4293566076 4293564283 4293566076 4293563253 4293432187 4293231213 4292507232 4291645008 4290071376 4288558155 4287770700 4288557129 4288297039 4288757578 4289480273 4288953936 4289281360 4289610825 4289349458 4289546582 4289939531 4289675085 4289677132 4289740627 4289479760 4289937485 4289479503 4289546837 4289413198 4290596437 4290070096 4290334037 4289677389 4290990165 4290462291 4288954956 4288426569 4293830791 4294170795 4293769848 4293627764 4292838249 4291981673 4291649367 4290729558 4289609299 4290071641 4289020494 4290464856 4290202456 4291251540 4290069862 4290929505 4289542992 4290074205 4291318873 4290594900 4291256670 4291124574 4290596182 4290534760 4291256435 4291126626 4291846501 4291188826 4289348958 4291392377 4292313200 4292575096 4291788426 4292382580 4292178795 4291651178 4291852146 4291858066 4291721063 4290206314 4291788672 4292446056 4292841614 4292251004 4292182668 4292647318 4292716946 4291526271 4291855233 4292513165 4292580745 4292252297 4292127656 4292646812 4292188296 4292717717 4292126368 4292181875 4291790715 4292118156 4292260503 4292649874 4292581774 4292649873 4292062113 4292649370 4292587423 4292580247 4292584335 4292585119 4292647307 4292586918 4292581269 4292259995 4292192172 4292585127 4292982698 4292522670 4292656035 4292318350 4291729563 4292129962 4292588961 4292586924 4292655017 4292193441 4291140773 4292453780 4292262832 4292326832 4292262834 4292719017 4292264637 4292721579 4291869119 4292655783 4292198063 4292718497 4292061602 4292654243 4292589742 4292785588 4292128937 4292392368 4292064941 4291341491 4292521890 4292132288 4291932319 4291867321 4292328362 4292397766 4292970887 4292385700 4292855480 4293842121 4293182882 4291798419 4292784281 4292522397 4292981937 4293248949 4293380289 4293380030 4293313981 4293379773 4292986293 4292919995 4292788410 4292986027 4292788410 4292985787 4292788408 4293116856 4293051838 4293445565 4292854202 4292985787 4292986037 4292788402 4292919987 4293381056 4292922561 4293644224 4293842117 4293711814 4294172106 4294108871 4285671493 4282910799 4284292932 4284489286 4284947016 4285080907 4284880199 4284424010 4285080652 4284749885 4284291141 4284419647 4284748606 4285013060 4285009476 4284947008 4285277012 4285274439 4285867853 4287048789 4288962679 4291655803 4292182924 4291920494 4291526798 4291131003 4291920255 4291921543 4292317316 4292252036 4292711045 4292250750 4291923077 4292382596 4292381822 4291988096 4292382080 4292053632 4292053632 4291988087 4292184958 4291922046 4292053880 4292118141 4292054136 4291987328 4292119424 4292119416 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4290003789 4289151828 4289742417 4290135377 4290071637 4289806162 4289413196 4289349203 4289742418 4289479754 4289872971 4289610314 4291316816 4291252815 4292504148 4292439646 4292903262 4293559403 4293169012 4293563000 4293564793 4293564785 4293500286 4293565817 4293566077 4293566076 4293564549 4293430639 4292967514 4292965988 4291584086 4290332745 4289084239 4287834950 4287246666 4288358981 4288757586 4289016394 4289412945 4289283664 4290001482 4289740882 4289742417 4289546581 4289938254 4289872982 4289675341 4289938506 4289675341 4289742681 4289740619 4289938518 4289348430 4289741397 4290398542 4290400338 4290334032 4289611596 4289214283 4289212748 4294298269 4294104232 4293764978 4293631090 4292508529 4292504410 4291322720 4290595665 4289875277 4289281877 4291122779 4289744475 4290530648 4289281874 4289743448 4291381579 4290072923 4291842911 4290994014 4290533737 4291647072 4291120981 4290469482 4292041314 4291257964 4291453536 4290662232 4290070355 4291064950 4292641927 4292048771 4292117631 4292577151 4292179821 4291657331 4292374121 4291723635 4291721070 4290208103 4292113539 4292642686 4292118405 4292508279 4292252026 4292714142 4292120453 4291920502 4292843656 4291989397 4292119174 4292643982 4292588201 4292585633 4292588711 4292646284 4292188550 4292778646 4291592064 4292123297 4292651166 4292973712 4292587156 4292058785 4292186770 4292649098 4292588705 4292584091 4292582029 4292060829 4292647822 4292187283 4292647562 4292654751 4291859352 4292655014 4292592829 4292588966 4292585616 4292059804 4292127654 4292719005 4292650908 4292586908 4292587924 4292655017 4291869113 4292787118 4292127412 4292261530 4292721328 4292327858 4291934896 4292129707 4292263870 4292260006 4292716183 4292128679 4292127661 4292783783 4291867310 4292785324 4291736996 4292257961 4292065449 4292258724 4292129708 4291142049 4292130738 4291997623 4292326058 4291736236 4292786085 4292591285 4293119160 4293906091 4292654745 4292261285 4292590250 4292916658 4292395183 4292854709 4293379777 4293379757 4293182901 4293248443 4292919995 4292788408 4292985789 4292788401 4292854196 4292656823 4292854201 4292591029 4292920251 4293051837 4293182906 4293182907 4292986045 4292458926 4292459701 4292985532 4293315519 4293315006 4293578945 4293776581 4294105030 4294172619 4293712840 4283238208 4283174214 4284486726 4284288573 4284552515 4284682813 4284618310 4285082191 4285275973 4284750141 4284027972 4284812606 4284619327 4285209405 4284355395 4284949579 4285605195 4286130253 4286788451 4288369023 4290800000 4291725187 4292641916 4292509832 4291199087 4292116361 4291791486 4292055172 4292316804 4292316789 4292251268 4292645509 4292710270 4292317061 4291989381 4292382079 4291988096 4292447872 4292053631 4292053632 4292447872 4291659640 4292447864 4292053889 4292511866 4291266176 4292513408 4292053633 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289742946 4289414736 4289610580 4289742423 4289151827 4289413201 4289413203 4289612117 4289742424 4290068301 4289807185 4290070867 4290136143 4291123538 4291584853 4292964958 4293230194 4293232500 4293628269 4293564281 4293564785 4293498750 4293764473 4293499255 4293564273 4293565304 4293562994 4293627244 4293165934 4292964448 4291187282 4290335571 4289082443 4287770954 4287966279 4288362061 4288755789 4289085521 4289348938 4289281361 4289806925 4289347667 4289610831 4289414744 4289151829 4289938511 4289938506 4289283923 4289610832 4289545038 4289742675 4289609554 4290002765 4290399055 4290268501 4290069586 4290200137 4289807189 4289674849 4290067527 4294369987 4294036878 4293964402 4293503114 4293032024 4292969574 4291517526 4291914084 4290070359 4291977048 4290070616 4290004052 4289940054 4289349464 4290924376 4290924889 4290661463 4291057491 4292171868 4291055947 4291388003 4291062899 4291123545 4291257192 4291651167 4290925167 4289150798 4290540412 4292246394 4292380290 4291787623 4292704118 4292113785 4292178800 4291918193 4292120187 4290797413 4290271589 4291786622 4292313968 4292049274 4292182396 4291987087 4292117635 4292124829 4291592048 4292706941 4292052869 4292317064 4292646546 4292190885 4292644232 4292650136 4292195225 4292255900 4292314501 4291919497 4292316286 4292649870 4292587931 4292521374 4292578197 4292585105 4292582799 4292582039 4292187783 4292586911 4292584085 4292649125 4292189582 4292319127 4292253068 4292646555 4292654494 4292587163 4292650396 4292061085 4292585892 4292587419 4292652700 4292652692 4292194964 4292719263 4292125596 4292125861 4292719267 4292653995 4292263867 4292324523 4292326818 4292262074 4292720556 4292195756 4292650390 4292720028 4292062888 4292778388 4291733146 4292390059 4292391841 4291539122 4292518802 4291868088 4291931537 4291998630 4291405726 4292056723 4291139734 4291275177 4291800480 4292261291 4293052604 4293182895 4293046160 4292126865 4292920753 4292524720 4292459702 4292986036 4292986047 4293775297 4293379765 4292854720 4292984238 4292722874 4292985780 4292788410 4292788400 4293182651 4292854194 4292656823 4292985780 4292985788 4293051837 4292919995 4292854203 4293511606 4292656058 4292523421 4292524213 4292986044 4293379517 4293249727 4293511870 4294104261 4294038469 4294433215 4291667349 4282187834 4283631689 4284355140 4284486460 4284554831 4284680502 4285079621 4284618043 4284486723 4284616516 4284419402 4285076805 4285208894 4285208896 4285408329 4285014091 4284683588 4285671014 4286856290 4290011269 4291591278 4292708996 4291921783 4291524219 4291723390 4291593090 4291921543 4292317059 4292711561 4292252036 4292318602 4292250493 4292317318 4291922302 4292381823 4292382080 4292053632 4292053375 4292382854 4292382079 4291594886 4292119424 4292053632 4292119424 4292053888 4292119425 4292053623 4292119416 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289612120 4289676366 4289019729 4289480278 4289480279 4289610580 4289676361 4289217354 4289412941 4289545291 4289479754 4290068301 4290200662 4290598737 4291255639 4292770159 4292705886 4293362026 4293170299 4293565816 4293565305 4293565302 4293500802 4293565821 4293565047 4293566333 4293563512 4293628026 4292968557 4292571229 4291647569 4290333782 4288558411 4287769671 4287901255 4288294729 4288690511 4289281098 4289151566 4289283403 4289740878 4289938511 4289675342 4289938505 4289545295 4289740883 4289479759 4290004054 4289347660 4289806420 4289479753 4290201422 4289675850 4290333519 4291316308 4289809237 4290265674 4289874515 4289279562 4289936713 4294566830 4293903243 4293568639 4293962607 4292641640 4292899680 4292112230 4292110162 4291914084 4291254098 4291122773 4290796127 4290070095 4289808729 4291120213 4290070871 4290794586 4291122269 4288951885 4290729822 4291124317 4291122264 4291061351 4291715165 4290667368 4289743706 4290535797 4292312186 4292639606 4291921538 4292838525 4291128429 4290733674 4292312696 4292516504 4290991961 4290670205 4292311933 4292512373 4291460994 4291854962 4292444796 4292318098 4290933363 4291389790 4292776845 4291330176 4292777350 4292256414 4292583845 4292647817 4292060577 4292119437 4292576885 4292316286 4292117894 4292651170 4292980638 4292512898 4292582029 4292517266 4292580748 4292515480 4292975509 4292523415 4292582813 4292578173 4292519325 4292584089 4292647564 4292127913 4292252809 4292254884 4292645006 4292586404 4292059548 4292254881 4292588204 4292653992 4292194980 4292060319 4292781720 4291472554 4292386452 4292129182 4292260012 4292260261 4292721333 4291934390 4291801507 4292783776 4292195772 4292652438 4292718755 4291468709 4292845978 4292126371 4292516501 4291603617 4292194479 4292260781 4291867563 4291993750 4292059556 4291864481 4292056979 4291005847 4291074719 4291997347 4293380279 4293119664 4292519570 4292584086 4291730582 4292788654 4292852661 4292591279 4292919997 4293315777 4294102976 4293313981 4292920510 4293047716 4292197564 4292854201 4292788402 4292986037 4292854203 4292393652 4292656824 4292656822 4293116857 4292657079 4293445566 4292854194 4293511359 4292985537 4291996561 4292649370 4292523942 4292854708 4293182907 4293248445 4293840831 4294102976 4293775812 4294566611 4287585880 4282910531 4284091453 4284748343 4284619081 4284746555 4284686408 4285010495 4285080395 4284752974 4284092989 4284225604 4284681278 4284683327 4285932617 4284750920 4284552512 4284221511 4285802059 4289352823 4291131775 4291855232 4292445322 4291592061 4292180599 4291525504 4291988091 4292053631 4292710271 4292252794 4292316805 4291987581 4292318085 4291922046 4292776581 4292317061 4291988095 4292382079 4292055174 4292053375 4292316544 4292447606 4292053633 4292120198 4292053631 4292447617 4291989629 4292447361 4292053633 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289283156 4289281102 4289480529 4289282900 4289480273 4289480536 4289217615 4289741904 4289152080 4290003792 4289610832 4289347661 4289675855 4291120462 4291848533 4292963935 4292771424 4292970353 4293628276 4293562745 4293564786 4293563511 4293566077 4293564272 4293566077 4293564284 4293564529 4293430908 4293032283 4292572768 4291388258 4290399815 4288494159 4288359494 4287770954 4288819785 4289213771 4289019985 4289151054 4289283403 4289740877 4289872982 4289872969 4289872976 4289740883 4289938511 4289938518 4289479503 4289545296 4289742669 4289871185 4289937228 4290531157 4290069586 4289611090 4289939278 4290070605 4289677138 4289082964 4290596435 4294436030 4293837708 4293833076 4293172082 4292504932 4292904032 4292636009 4292441709 4290661964 4291654763 4290925901 4291318614 4289806928 4291055960 4290069074 4290927710 4290267477 4289678696 4289414495 4291321437 4290403172 4291190623 4290990679 4290796135 4289414747 4291126636 4292838783 4292175714 4291920512 4292772987 4290929516 4292310909 4291262070 4292515193 4290400085 4289616752 4292046186 4292184182 4292378249 4292181356 4292446341 4291857282 4292379766 4290734447 4292245114 4291652710 4292316552 4292120209 4292318079 4292654241 4292582313 4292711817 4292383362 4291390068 4292118408 4292654499 4292583823 4292518546 4292583570 4292119937 4292972664 4292519831 4292583323 4292516749 4292977556 4292523414 4292518313 4292973698 4292389267 4292649373 4292255897 4292646809 4292252551 4292255890 4292582549 4292581780 4292588438 4292587411 4292062881 4292651163 4292713607 4292062889 4292719268 4292651691 4292649112 4292258190 4292128688 4292197299 4292720813 4292391602 4292127909 4292716172 4292126630 4292128420 4292261041 4291798425 4291663767 4291669418 4292253582 4292128679 4292193955 4292193958 4292056468 4291012780 4291460979 4290940581 4291273635 4293051835 4293577141 4292655257 4292187542 4291667091 4292657076 4292788147 4292591288 4292920252 4293051840 4293774005 4293314240 4292986038 4292985780 4292459445 4292132797 4292722358 4292854201 4292854202 4292656823 4292854193 4293182651 4292788401 4292788409 4292920251 4293051838 4293117114 4293248444 4292986563 4292127118 4292383380 4291925132 4292651152 4292457903 4293117890 4293182910 4293642429 4293776581 4293776568 4293450692 4285209149 4283697980 4284286782 4284092222 4284419396 4284550980 4284882762 4285012547 4284886100 4284820049 4283764272 4285208135 4284749367 4285604429 4285276999 4285079626 4284352840 4284026435 4286527074 4289948550 4292118387 4292251007 4292509317 4291066239 4291854975 4292316039 4291857037 4292384379 4292250238 4292317578 4292316803 4292251524 4292711044 4292252036 4292252036 4292317828 4291987839 4292382080 4292381823 4291988861 4292579456 4291923847 4292447606 4292053633 4292053633 4292053622 4292381825 4291990397 4292381816 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289281359 4289480536 4289677652 4289478482 4289478732 4289412946 4289937490 4289152086 4289806156 4289546838 4289412947 4289347405 4289939278 4291123288 4291648848 4292573537 4292901474 4293495155 4293562734 4293564275 4293565304 4293566078 4293565045 4293564285 4293566075 4293566850 4293562743 4293626738 4292837471 4292964961 4291583315 4290203483 4289083981 4288360521 4287835977 4288298322 4288823373 4289019473 4289348937 4289281360 4289543504 4289677138 4289938260 4289676887 4289545039 4289545290 4289479504 4290071120 4289740621 4289742670 4289872970 4290068306 4289545560 4290135371 4289939535 4290465371 4290070610 4289938510 4288689491 4291123545 4294370225 4294099583 4293568637 4293760623 4293172868 4292378500 4291983200 4292704864 4291848035 4292304468 4291913307 4290069333 4290858835 4289874275 4290135888 4290069845 4289940311 4291516505 4290792020 4290601826 4292306526 4290333527 4289086036 4289216336 4291721328 4291855481 4292635506 4291526010 4292969839 4291650676 4291788655 4292244345 4292055415 4289941610 4290535017 4292113775 4292051841 4292377696 4292050559 4292579210 4292249216 4291463059 4291783270 4291716471 4292116348 4292117389 4291394174 4292973957 4291724164 4292182913 4292127900 4292182131 4291985797 4291989389 4292583060 4292974736 4292520096 4292584856 4292514204 4292974723 4291989912 4292646272 4292585107 4292583847 4292516502 4292582031 4292587414 4292583319 4292251025 4292116609 4292318088 4292653465 4292251528 4292251011 4292579976 4292650645 4292584345 4292715417 4292119689 4292320921 4292127916 4292125841 4292652189 4292195507 4292194978 4292650383 4292652697 4292654512 4292326057 4291800988 4292125852 4292715672 4292125614 4292784280 4292125859 4292326826 4292783277 4292188559 4292322723 4292384654 4291670179 4292519579 4291661195 4291332751 4291137935 4292526780 4293841325 4293114263 4291339671 4292650925 4292198055 4292981935 4292459702 4292722874 4293642429 4293445558 4293051066 4293248439 4292920237 4292854195 4292656825 4292722609 4292919721 4293182650 4292788409 4292986036 4292656823 4292656822 4292591029 4292986045 4293313979 4292919994 4292854458 4293445567 4293052090 4292326295 4292318101 4292119933 4291857553 4292647052 4292788142 4292918190 4292457365 4292589747 4294364865 4293775791 4292060572 4283170871 4283698758 4283569737 4284288579 4284815933 4284947522 4284683837 4284879927 4284749371 4284422215 4284617031 4284880951 4285075268 4284421443 4284947784 4284357960 4284227143 4285208907 4289418096 4291131518 4292184710 4292116620 4291461243 4292116616 4291593089 4292119422 4292382595 4292316548 4292318601 4292251778 4292252041 4292711044 4291856510 4292711045 4292317571 4292317061 4292382079 4291987839 4292382080 4292381824 4291988087 4292447615 4291988097 4292053622 4292448380 4291988871 4292382336 4291987841 4292316544 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289873740 4289217359 4289282895 4289480529 4289085267 4289350226 4289019725 4289480525 4289806414 4289610832 4289217610 4289742406 4289874524 4291120203 4291848036 4292571997 4293492585 4293233785 4293628020 4293564786 4293566078 4293565045 4293566852 4293566076 4293563004 4293566074 4293564805 4293626480 4293231471 4292505434 4291649115 4289676880 4289213771 4287770441 4287836490 4288360523 4288626001 4289217100 4289741910 4289020498 4289806412 4289740619 4289546586 4289807959 4289742417 4289479760 4290068557 4289872721 4289545289 4289545041 4289938506 4289677139 4289676620 4290070868 4289871944 4290070099 4290397001 4289545302 4288755026 4290793812 4294436285 4293702788 4293831029 4293697138 4293691762 4293431909 4292704097 4292704365 4292835407 4292571231 4291059038 4291057758 4291122509 4291121745 4288948037 4289613143 4290597980 4289806931 4290666598 4291583323 4291123292 4289938515 4289545809 4290995834 4292181375 4292312684 4291587706 4292439905 4290931584 4291783783 4292906632 4291132279 4290070354 4290076012 4291459700 4292248175 4292575354 4292378505 4291330678 4292184946 4291261054 4292708222 4292113269 4291725445 4292317326 4292252545 4292245880 4291062376 4292977053 4291396998 4292176750 4291331476 4292712333 4292584871 4292910482 4292514717 4292579458 4292580231 4292582298 4292122252 4292646301 4292185732 4292643212 4292582537 4292520609 4292580494 4292578427 4292185235 4292122268 4292318339 4291726225 4292711806 4292647581 4292125597 4292778130 4291793530 4292381309 4291532711 4292390804 4292320143 4292319883 4292127650 4292584088 4292653989 4292653989 4292063151 4292191139 4292128147 4292193695 4292321689 4292718237 4292124069 4292253071 4292127408 4292718752 4292126635 4292129182 4292055437 4292452760 4292119175 4292059803 4291596181 4290940308 4292521886 4293579199 4293313701 4291927954 4292062633 4292721579 4292523683 4292459703 4292788923 4293117368 4293248437 4293182892 4292788660 4292722099 4292129946 4292721329 4292525239 4292722608 4292722609 4292459445 4292854201 4292854201 4292854202 4292393651 4293183167 4292986044 4292525237 4293051838 4292986301 4293051838 4292984502 4293052596 4292253333 4292120190 4291528845 4292118907 4292324002 4292259491 4292049786 4292189081 4292786855 4293642674 4294435273 4287120451 4283238471 4284091461 4284951377 4284818253 4284685639 4284683836 4284883531 4284685895 4284619854 4283831863 4284549177 4284683328 4284944952 4284614468 4284159300 4285935458 4286460760 4287576163 4289947511 4292052609 4292708738 4291657582 4292180604 4291592058 4291987335 4292053630 4292317828 4292252036 4292316803 4292645252 4292316030 4292252293 4292710271 4292250494 4291990154 4292053374 4292382079 4292055173 4292053374 4292055947 4292053375 4292054405 4292447616 4292054405 4292054150 4292382081 4291790193 4292382328 4292316544 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289217366 4289480524 4289544268 4289480537 4289151052 4289348688 4289546061 4289282897 4289283146 4289478733 4289413203 4289938517 4289675091 4291122777 4291782742 4292573296 4292839539 4293494636 4293170033 4293238134 4293236856 4293170563 4293564528 4293565303 4293563260 4293565827 4293562219 4293430903 4292967513 4292965747 4291387478 4290071124 4287969101 4287837773 4288555846 4288230732 4289215053 4289414481 4289085516 4289544273 4289612379 4289807703 4289349200 4289151823 4290004053 4289740882 4289545297 4289545289 4289545047 4289545295 4289675341 4289872727 4289611341 4290265679 4290531164 4289741390 4289413969 4289873999 4288820564 4290337365 4294501052 4294162282 4293571972 4293628772 4292513649 4293231714 4292117117 4292899146 4292704370 4292372827 4292637022 4292109404 4291121750 4289807187 4289349977 4290002254 4289017421 4290925138 4291254877 4290596953 4290795868 4289741411 4291129973 4291914358 4292901734 4291982206 4292375401 4291128684 4291979366 4291920516 4291136377 4290728276 4289484395 4291588210 4292310634 4292379020 4292116074 4292643975 4291786605 4291327606 4291656318 4292180071 4292251531 4292382858 4291521652 4291786625 4291134338 4292049545 4292052350 4292708227 4291328127 4292775786 4292975000 4292515991 4292911779 4292515981 4292120963 4292579219 4292381835 4292582298 4292580251 4292649362 4292253839 4292052617 4293039228 4292125076 4292581024 4292579196 4292646538 4292579994 4292778125 4291663262 4292841853 4292186516 4291854961 4291528356 4292055687 4292188572 4292124570 4292255632 4292647076 4292650125 4292647073 4292058772 4292654000 4292719010 4291537054 4292254624 4291535008 4292849566 4292124303 4292190626 4291401125 4292384124 4292258479 4292130206 4292451232 4291994525 4291920247 4291464333 4291002503 4291995033 4292920498 4293314207 4292518544 4292126874 4292851874 4292588701 4292525495 4292591289 4293511607 4293247675 4293051312 4292984494 4292985788 4292524718 4292523435 4292655799 4292523436 4292590254 4292525238 4292459445 4292919994 4292656822 4292854201 4292656822 4292854201 4292788408 4292984243 4293051839 4292854202 4293379773 4292987064 4293579454 4292191386 4292053118 4291920772 4291924110 4292390561 4292720276 4290403422 4290870643 4292715674 4292851111 4293247901 4293119418 4283629614 4283898952 4283828537 4284489286 4284556875 4284882498 4284815679 4285471554 4284682808 4284617022 4284355391 4285666878 4285013317 4284287805 4284358472 4285081431 4286525514 4286987372 4289355642 4291592576 4292181880 4291396239 4292180343 4291657852 4291855248 4292185738 4292054915 4292317571 4292776324 4291922819 4292776580 4291922303 4292316286 4292645509 4292317061 4292382596 4292053375 4292054139 4292119941 4292053631 4292447615 4292382079 4292054407 4291858547 4292448134 4291859833 4292381815 4292053890 4292447617 4292053632 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289676362 4289282895 4288888144 4289348681 4289151054 4288953680 4288888144 4289414480 4289151060 4289085517 4289676362 4289740882 4289479760 4291122519 4292109669 4292508769 4293491543 4293233777 4293628794 4293564278 4293629571 4293630331 4293565303 4293172340 4293563254 4293564035 4293563251 4293430895 4293361771 4292506974 4291714645 4289479249 4289282641 4287769158 4287181901 4288360265 4288624718 4289282637 4289019472 4289283157 4289478218 4289350996 4290003797 4290004041 4289086544 4290004048 4289545289 4289938264 4289742667 4289543249 4289938507 4289807943 4290201933 4289741648 4289545554 4290069584 4290004042 4289151565 4288229707 4291324500 4294236339 4293505671 4294027360 4293497980 4293300853 4293297514 4293762396 4292310130 4292767065 4292180592 4292767835 4291189852 4290922837 4289677142 4289610573 4288953166 4290334291 4290203739 4290792792 4290333781 4289739850 4291065456 4292313218 4292377451 4291126651 4292440932 4291323752 4291915628 4291589760 4291919730 4289873752 4290076019 4291390842 4292374888 4292243305 4292116846 4292643977 4291853668 4292312702 4290668399 4292246649 4292710280 4291851117 4291396999 4291524481 4292253326 4292249478 4292576135 4291126376 4292247923 4292780187 4292050843 4292446599 4292646279 4292578937 4292708743 4292977057 4292515475 4292578942 4292580745 4292581775 4292580489 4292188569 4292710008 4291856536 4292641657 4292520847 4292581790 4292184958 4292712071 4292124051 4292514180 4291131522 4291988619 4291926951 4292122001 4292190616 4292318105 4292317592 4292651167 4292584590 4292187807 4292124055 4292122012 4292059537 4292588207 4292717723 4292125853 4292841623 4291794836 4291797422 4292452245 4292252565 4292320675 4292449176 4292192179 4291994007 4291399312 4290477982 4291990169 4292458157 4293578930 4292717717 4291993747 4292063644 4292652707 4292456619 4292591546 4292921539 4293248437 4293182902 4293051316 4292986287 4292524977 4291996826 4292196788 4292657080 4292195753 4292588973 4292525494 4293050293 4292854458 4292788409 4292854201 4292854201 4292854201 4292788408 4292985787 4292722872 4293445565 4292986045 4293314238 4293445558 4292920761 4291460983 4291792001 4291857808 4292390552 4292654484 4290469983 4290406511 4292383890 4292583331 4292588711 4293844925 4289820552 4282974261 4283763517 4283828550 4284287030 4284357701 4285476686 4284886101 4284683836 4284617279 4284221496 4284489030 4285537092 4285013060 4285010761 4284159302 4285604939 4286723692 4288564850 4290934915 4291657597 4292643717 4292706166 4291592318 4291133056 4291528569 4292842372 4291989124 4292383880 4291989123 4292055689 4291989123 4292382079 4292317318 4292316287 4292053375 4292054139 4292382596 4292121482 4292053374 4292447871 4291594112 4292447872 4292053622 4292119169 4292054405 4292054150 4292382079 4292119168 4291661180 4292119168 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289281103 4289744991 4289348431 4289151060 4289348682 4289546061 4289741904 4289151053 4289151565 4289544270 4289415245 4289347410 4290070358 4291123294 4291912282 4292900449 4292838257 4293364591 4293038447 4293627519 4293172594 4293171322 4293564796 4293564541 4293564797 4293566588 4293562744 4293430901 4293295977 4293294176 4291516753 4290333271 4288493133 4288359494 4288491593 4288163401 4289282641 4289021261 4289019215 4289546065 4289217621 4289610580 4289545294 4289545296 4289676368 4289150544 4289609040 4289742662 4289347412 4289349452 4289676877 4289872720 4289611354 4290003786 4290201933 4289675086 4289610827 4288954449 4288751180 4291655534 4294567346 4293962330 4293566336 4293763442 4293233522 4293037162 4292374894 4293691744 4292242783 4292503121 4292443504 4292502875 4290070350 4290333528 4289283669 4290530905 4290924120 4290269788 4290725202 4288888396 4291323783 4292509549 4291655792 4291915360 4291982192 4291123548 4292111996 4291984758 4291193700 4289418606 4290732130 4291124340 4292444525 4292117889 4291456124 4292312177 4291721838 4291457420 4291195247 4292706413 4291132545 4291193700 4290537337 4291921524 4292644743 4292773776 4292251786 4291128425 4292181637 4291526270 4292907130 4292648345 4292119945 4291592063 4292117631 4292382347 4292381321 4292586657 4292583059 4292250509 4292447367 4292446340 4292578681 4292581261 4292187012 4292383132 4292773249 4292583311 4292781203 4292309096 4291264886 4292119695 4291930016 4291858318 4292382608 4292318600 4292250492 4292713627 4292058275 4292646528 4292583581 4292645767 4292184699 4292715420 4292645019 4292647303 4292190362 4292188833 4291796890 4292186000 4292845459 4291797417 4291924362 4292187796 4291137677 4292120456 4291792534 4290939791 4292326306 4292855215 4293311110 4292448135 4292124300 4292981153 4292522404 4292592053 4293051573 4293445816 4293642174 4293051816 4292854187 4292655792 4292588973 4292196530 4292656305 4292590511 4292590255 4292589735 4292524719 4292722616 4292656823 4292591030 4293182649 4292985788 4292788408 4292788408 4292985787 4292919994 4292919995 4292985788 4293381056 4293314740 4293053125 4292318857 4291135117 4292120970 4292781461 4292522641 4290798696 4290344579 4291202442 4292844441 4292518807 4293048234 4294567383 4286658885 4283236424 4283895612 4284418884 4284682565 4284358217 4285143104 4284357960 4284422210 4284287045 4284225862 4284947261 4285601858 4284684604 4284289352 4285079112 4286526307 4287312230 4290142836 4291330688 4292908673 4292050298 4291525246 4291657597 4291856004 4292317069 4291987838 4292053373 4292317833 4292382595 4292316803 4292384394 4291987839 4292053631 4292053631 4292119941 4292054405 4292448389 4291595139 4292448389 4292054406 4292119424 4292053632 4292119167 4292119424 4292053631 4292447615 4291989638 4292119167 4292119942 4292382845 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289283146 4289282632 4289348682 4289151053 4289217102 4289085517 4289348688 4289151053 4289217102 4289020494 4290067789 4289282130 4290004560 4290991950 4291850079 4293161826 4293361513 4293299062 4293235062 4293565297 4293564798 4293631095 4293563779 4293564784 4293564535 4293564541 4293566072 4293430382 4292968557 4292964446 4291651421 4289217625 4289414477 4288294473 4287772236 4288886092 4288624461 4289085264 4289217106 4289282901 4289610836 4289806418 4289806418 4289740883 4289349452 4290002256 4289545558 4289938250 4289545295 4289938262 4290267481 4289611346 4289742413 4289872714 4289676884 4289414990 4289217867 4289411662 4288686661 4293042044 4294297999 4293502595 4294030185 4293432445 4293502576 4292571251 4293432171 4292246393 4292441192 4291715680 4292377447 4291255130 4291778648 4291123549 4290335067 4289543761 4290663002 4290068047 4290071634 4292113802 4291856498 4292111994 4292311147 4292111739 4291323238 4291061101 4291918694 4291390319 4289284186 4290734454 4291323763 4291920241 4291721585 4292244584 4292449153 4291716200 4291850605 4291851629 4292248172 4290670459 4290930542 4291393654 4292315010 4291526270 4292313983 4291918439 4291715427 4292117637 4292513675 4292711831 4292181640 4292643958 4292512903 4292118916 4291920791 4292773484 4292253589 4292448902 4292711295 4292117642 4292316059 4291726473 4292646801 4292513683 4292974219 4292582032 4292252553 4292314737 4290998399 4290606717 4292123021 4292322473 4292643962 4292712074 4292581525 4292647834 4292251797 4292249973 4292713369 4292385697 4292583835 4292581009 4292646559 4292119690 4292124058 4292055690 4292774794 4292317587 4292190888 4292057752 4291988347 4292515987 4291990676 4291462273 4291858577 4290739841 4292579728 4293245860 4292984226 4292518523 4292124307 4292520339 4292522655 4292787365 4293117368 4293511604 4293641902 4293050796 4292789167 4292523945 4292197309 4292589991 4292196010 4292591288 4292524719 4292524719 4292525495 4292722865 4292722616 4292656823 4292788409 4293379772 4292722872 4292788408 4292788408 4292985787 4292722615 4293051838 4293182649 4292987071 4293315263 4293315267 4293312176 4291460225 4291855993 4292059027 4292521878 4291195245 4291133330 4292450712 4292582800 4292119446 4292453023 4293185977 4292857783 4283367477 4283306569 4284093510 4284290628 4284815676 4284553796 4284751431 4284551488 4285149530 4283764020 4284812093 4284422980 4285012546 4284554060 4284290373 4285344094 4286194782 4289092204 4290935694 4292250244 4292380019 4291592319 4291721854 4292116089 4291921800 4292053629 4292382078 4292317833 4292316803 4291988613 4292381822 4291987839 4292447872 4292053632 4292447872 4292053631 4292053631 4292053365 4292448391 4291987830 4292119159 4292119416 4292119158 4292122252 4292119158 4292120199 4292053622 4292447617 4292119415 4292119169 4292053624 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289545816 4289283931 4289348436 4289151058 4288888143 4289544781 4289085523 4289611853 4289085518 4289479246 4289347660 4289611346 4290727513 4292042072 4292699224 4292768604 4292968302 4293299311 4293429882 4293565298 4293563006 4293171565 4293565308 4293564541 4293565559 4293563005 4293564536 4293562484 4293361257 4292509025 4291583324 4290465362 4288492107 4287836233 4287312716 4288361547 4288692049 4289281098 4289216589 4289480524 4290069590 4289349451 4289152086 4289806412 4289545296 4289938762 4289545296 4289545296 4289543505 4289152073 4289545033 4290068302 4289479755 4289675342 4289938512 4289611082 4289673294 4289018702 4288031043 4293305753 4293640834 4293966969 4293369735 4293900400 4293299571 4293630320 4292374875 4293759344 4292376426 4292639055 4292373614 4292638566 4291384398 4291781983 4290727762 4290465626 4289543504 4289085521 4291128177 4291125094 4292308587 4292179067 4291192427 4291982700 4291127417 4292183925 4290596696 4289550968 4290730849 4291518043 4291918969 4292115837 4292114812 4291984252 4292246892 4291786352 4291915115 4292117884 4290994537 4290731895 4291849595 4291789166 4292249478 4292315267 4291655038 4291192688 4291527301 4292511618 4292579707 4292579452 4292448396 4291984506 4291984757 4292971657 4292714132 4291853458 4292116340 4292183955 4291982984 4291131531 4291005850 4292711562 4292514966 4292976014 4292974213 4292512394 4291920497 4290674583 4292319382 4292384412 4292643962 4292646785 4292647577 4292053384 4292644991 4292188566 4292646536 4292251801 4292184459 4292648335 4292446083 4292253599 4292251269 4292124064 4291789710 4292842109 4291400086 4292118927 4292449429 4292122267 4292120466 4291596173 4291924898 4291133054 4291332747 4292850853 4292592043 4292719259 4292517006 4292518033 4292519835 4292984257 4292722853 4293378992 4292984234 4292392354 4292655776 4292587414 4292194451 4292652443 4292197030 4292588710 4292588974 4292722866 4292722866 4292721841 4292525237 4292459445 4292854203 4292788400 4292985788 4292722616 4292985787 4292985787 4292788409 4292985788 4292919994 4292986045 4293381055 4292986558 4293315263 4293447108 4291594371 4291462009 4291794841 4292454556 4290996850 4291530381 4292387477 4292578692 4291130494 4291591291 4293374891 4294373322 4289558390 4282648389 4284024386 4284027974 4284555078 4284357961 4284947007 4284749372 4284423750 4283633980 4284820306 4285209411 4285013835 4285080139 4284290374 4284426059 4285737808 4286396515 4290080890 4292117886 4291920782 4292117887 4291720827 4291068032 4292118662 4292119422 4292055173 4291988612 4292318600 4292251268 4292381822 4292055174 4292119424 4292052346 4292119424 4292053887 4292053631 4292448389 4291661189 4292053631 4292382080 4292054406 4292119424 4291725185 4292120700 4291725177 4292119158 4292119169 4292119424 4291725440 4292053632 4292382081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289085516 4289544017 4289480535 4289676116 4289676373 4289478732 4289348943 4289085268 4289480781 4289806156 4289872982 4289871434 4290923351 4290795862 4292372583 4292901213 4292837989 4293299056 4293431923 4293563250 4293565559 4293564285 4293566076 4293566077 4293564529 4293565817 4293563762 4293562491 4293361512 4292900973 4291914070 4290335588 4289478727 4287834951 4287901258 4288360265 4288755790 4289150801 4288628044 4289609811 4289215823 4289873746 4289608783 4289611082 4289347667 4290002256 4289545290 4289938256 4290069577 4289610583 4289349459 4289479754 4290068558 4289872976 4289938513 4288954958 4289739851 4289018959 4288618304 4293968012 4293972391 4293834876 4293968769 4293367167 4293768837 4293167219 4293041271 4292968806 4292970851 4292436818 4293099879 4292308831 4291980650 4291251020 4290266961 4290066769 4289150029 4291392878 4292441196 4291916656 4290795864 4291457394 4291323513 4290797672 4291657333 4291125351 4289550705 4290797666 4291321710 4291922295 4291783788 4292245100 4292181100 4292643459 4291585144 4291986033 4291325820 4289876850 4289946214 4292176486 4291724931 4292511374 4291916647 4292250759 4290861916 4292510599 4292514189 4292579707 4292379295 4292446079 4292644741 4292446103 4292248223 4291919500 4292580500 4291466171 4291141041 4290284451 4290086307 4288905623 4289292692 4288831104 4290014063 4288762472 4290403928 4291922833 4291989645 4292841614 4292646021 4292580235 4292646023 4292252807 4292446858 4292712578 4292184954 4292250254 4292645763 4292582562 4292644989 4292446855 4292123550 4292119690 4292320148 4292711064 4292384140 4291987347 4291990926 4291992726 4291393666 4291924123 4291724168 4291003270 4291133559 4292191651 4292656809 4293115041 4292579975 4292517518 4292524708 4292847781 4292984483 4293117616 4293707439 4292656557 4292129181 4292719522 4292193688 4291932841 4292325032 4292063399 4292655534 4292590512 4292524975 4292524719 4292524463 4292657073 4292854203 4292854194 4292920244 4293051840 4293313464 4292854459 4293248443 4292919995 4292985780 4292919987 4293051838 4292985532 4293316802 4293381825 4293449416 4292258457 4291066751 4291862418 4292319362 4290869875 4292386453 4292186241 4290798442 4289483358 4290865524 4292321677 4292990394 4294566868 4285405493 4282975813 4283962175 4284027719 4284291648 4284818510 4284816712 4284881480 4285213268 4284226112 4285210703 4285675358 4285340998 4284945728 4285080137 4284812879 4286391907 4288565863 4291655037 4292315011 4292249464 4291985034 4291199089 4292246907 4292054144 4292053631 4292316287 4292316286 4292251525 4292776063 4291988096 4292119167 4292053632 4292382336 4292053887 4292249736 4291988095 4292316287 4292448389 4292053631 4292382080 4292119168 4291725441 4292119415 4292119169 4292119159 4292119943 4292120709 4292119168 4292119424 4292447872 4292053623 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289478732 4289283151 4289282901 4289480529 4289283157 4289283151 4289085266 4289283145 4289871693 4289283923 4290069841 4290464600 4291119693 4292042327 4292108639 4292375407 4293427037 4293299311 4293429887 4293565053 4293566077 4293566077 4293565047 4293565046 4293564543 4293564786 4293562740 4293628020 4292968043 4292901228 4292111201 4289611081 4289147980 4287181130 4288556615 4288361289 4288166222 4289151056 4289347666 4288759637 4289281102 4289480536 4289610838 4289347661 4289479245 4289216080 4289217616 4289808211 4289282126 4289545289 4289938512 4289545297 4289479754 4289675086 4289742664 4289413199 4289413192 4288622665 4288095038 4293769379 4293904522 4294100612 4293762667 4294038680 4293625704 4293830001 4292969594 4293237606 4292569194 4292446066 4292767559 4293234814 4292241743 4291719016 4291052880 4289147722 4290992986 4291585403 4292966759 4291849323 4291258748 4291320411 4290866801 4292246401 4290665054 4289943661 4290801009 4290993246 4292182142 4292111991 4291785325 4291784299 4291524479 4292372578 4291128960 4291587944 4290731885 4291718251 4291193471 4290932865 4292447865 4291788932 4291329403 4290728538 4291719803 4292378758 4292446081 4292646278 4292843389 4292706943 4291328130 4289749110 4290275200 4289624455 4289490826 4290346129 4291786372 4291267732 4291855245 4289619835 4290873239 4291200125 4289755538 4288304774 4285338951 4292447119 4292909447 4292251778 4292446857 4292580743 4292184976 4292118406 4292053365 4292055718 4292644250 4292778640 4292120204 4292645506 4292253841 4292052611 4292841849 4292382344 4292118429 4292581241 4291990175 4292120720 4291921544 4292449678 4291331732 4291394156 4291462805 4291462543 4293048725 4293709488 4292713336 4292517777 4292058256 4292587688 4292459699 4292983987 4292917921 4293838259 4292787366 4292129957 4292719521 4291868066 4292720818 4292260508 4292261790 4292657081 4292591030 4292525237 4292722617 4292722608 4292854196 4292854195 4292854202 4292525494 4293313980 4292854459 4292722616 4293313979 4292985527 4293117374 4292722616 4293445566 4292985788 4293317058 4293313210 4292923074 4293447108 4291198598 4291730073 4292250755 4291267460 4291921534 4289809986 4288039005 4287839325 4289942369 4290869886 4293442996 4294238674 4292393643 4282777648 4283239496 4284024645 4284226109 4284293709 4284750920 4285341000 4284356680 4284358216 4284158788 4285406010 4285607504 4284751432 4285275971 4284555854 4285277777 4286459474 4290014343 4291790722 4292579207 4292114299 4291592572 4291722879 4291528829 4292447615 4291989381 4292711045 4292251525 4292382079 4291922304 4292382080 4291988096 4292447872 4292382080 4292119424 4291594111 4292447872 4292316544 4292053631 4292119424 4292053632 4292119415 4292119416 4292447864 4292053633 4292120957 4291725183 4292119168 4292119415 4292119424 4292119424 4291791233 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289480535 4289085265 4289676366 4289282901 4289151051 4289478481 4289677914 4289217358 4289545302 4289872456 4290399317 4290398551 4291120724 4291318619 4292505439 4293228113 4292968560 4293101942 4293431666 4293565816 4293564535 4293565047 4293565047 4293566078 4293564272 4293565562 4293565299 4293562228 4293362795 4292507486 4291714631 4289807190 4289149774 4287900742 4287311687 4288491594 4288165454 4289214797 4288496208 4289611346 4289873746 4289019724 4289610825 4290002257 4289413197 4289675853 4289217617 4289806157 4289806413 4289479761 4290068557 4289936464 4289611598 4290397259 4289873227 4289806414 4288954450 4288623176 4288092999 4293770393 4294168469 4293703814 4293840804 4293629036 4293703047 4293430382 4293109861 4292967004 4293040500 4293363806 4293035651 4293032776 4292970872 4292106841 4289610578 4289874262 4291520360 4291519587 4291125105 4291257192 4291716728 4291126115 4292115845 4290864996 4288956264 4290864486 4291057500 4291262324 4292707710 4292247150 4291785067 4291653756 4291849327 4291986038 4291258980 4289812338 4291719011 4290929775 4291854206 4291719033 4291849322 4291921017 4291710827 4291857027 4292312715 4291919736 4292575354 4292248190 4291259013 4287707487 4288237441 4289027726 4289355637 4288824425 4287382889 4288100966 4288762216 4291195766 4291852169 4289088868 4291593343 4291721607 4292119954 4290413715 4287252605 4289421924 4291919749 4292183153 4292778392 4292973693 4292975242 4292514432 4290147988 4289818753 4290937749 4291917947 4291855998 4292974227 4292250523 4292974482 4291394446 4290539146 4289091447 4286259266 4292386465 4292643732 4291858586 4290803064 4291135362 4290932356 4292056969 4293051821 4292916119 4292518033 4292120459 4292979879 4292459705 4292983725 4293246894 4293510313 4292720552 4292984233 4292130982 4292260513 4292260513 4292721322 4292196788 4292721842 4292197293 4292591030 4292525237 4292919986 4292656823 4292656823 4292986037 4292393653 4292985780 4293313980 4292657080 4293511349 4292919995 4292919994 4293051838 4292722615 4292920251 4293379773 4292985532 4293708734 4293187013 4293906117 4292256394 4292120711 4291792517 4292120186 4290271834 4287377222 4287507533 4288298572 4289414233 4290346130 4292191917 4293514183 4294307774 4288240472 4283039803 4283697459 4283500864 4284159027 4284683333 4284749884 4284554055 4284420675 4284813885 4284488773 4284882244 4286127682 4284356927 4284882010 4284750421 4285277516 4288698231 4291129467 4292576896 4292577413 4291657836 4292049292 4291987316 4292118150 4292054404 4292054916 4292250494 4292711045 4291987839 4292384380 4292316288 4292447872 4291594112 4292053887 4292053632 4292513408 4291594111 4292447872 4292053888 4292119424 4292119425 4292119424 4291921537 4292119425 4292119424 4292119168 4292119424 4292119424 4291922046 4291921537 4292119672 4291789947 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289217363 4289480535 4289676110 4289480279 4289085265 4289283156 4289480279 4289414737 4289545044 4290070358 4290200142 4290398290 4291119694 4291123797 4292306012 4292377188 4293426521 4293232237 4293563514 4293564024 4293563767 4293566078 4293499511 4293565046 4293566079 4293564529 4293563513 4293563001 4293298551 4292899434 4292242264 4290333518 4288559950 4287965770 4287440967 4287769414 4288823378 4289216592 4288691533 4289546066 4289610581 4289478738 4289217616 4289545295 4289349459 4289740877 4289545034 4289481040 4289479760 4290068556 4289675342 4289481553 4289872714 4289675854 4289476430 4289611339 4289152078 4289147209 4288027966 4293899658 4294103214 4294102678 4293764201 4293841830 4293694050 4292974967 4293559403 4292975743 4293362249 4292245362 4293166678 4292575607 4294017360 4291519592 4291122005 4291585380 4291056492 4291126371 4291060579 4291060841 4291386977 4291130231 4290207583 4289676891 4290928999 4290665593 4291522409 4292836474 4291585640 4291852656 4291652473 4291848551 4292511620 4290401373 4290533978 4291719287 4291323513 4290932335 4291719547 4292119944 4291060065 4291057781 4291264369 4292576906 4291985800 4292643969 4292114565 4290465134 4286922341 4289094015 4291465632 4291523718 4291587965 4290798698 4290798976 4289157484 4288433787 4286657376 4287970409 4287976062 4291464080 4292450721 4292777108 4292907657 4290939021 4288438167 4287255696 4287188628 4288044417 4289416045 4290010479 4292581523 4293695626 4292578964 4291663779 4289431962 4288367485 4290870166 4290736007 4291659157 4291273402 4287586943 4289956530 4286067843 4283501372 4290148756 4292055175 4291067547 4291456130 4292390560 4292983453 4292782745 4292185991 4292186250 4292586400 4292393378 4293512124 4293641909 4293051050 4292327338 4292917414 4292458408 4292591289 4292656303 4292262325 4292196516 4292720302 4292197291 4292656567 4292525238 4292656815 4292986046 4292656822 4292854201 4293116857 4292788410 4293116857 4292920251 4292985787 4292854459 4292920251 4292919995 4293248442 4293313979 4292854458 4293313980 4293316802 4293185474 4294235593 4292259999 4292121229 4292055433 4290932825 4287967049 4286984270 4287969874 4288756299 4288827243 4290470001 4292977044 4293578692 4294433216 4293775541 4284088362 4283500352 4283502131 4284221255 4285077049 4284554310 4284749886 4284619844 4284225093 4284355391 4285209405 4285471043 4285473612 4284489801 4284555100 4284752463 4286525785 4290799990 4291265668 4292117888 4291920493 4292050828 4291788651 4292117906 4292449411 4292054659 4292054916 4292316286 4292317061 4291987839 4292317061 4292382079 4291988096 4292447871 4292183944 4292119423 4291659903 4292315272 4292053887 4291922045 4292119425 4291922036 4291725442 4292119672 4291922046 4292119424 4291725441 4291790967 4291725441 4291987837 4292053375 4291331705 4292053631 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289807953 4289414743 4289019722 4289677658 4289480529 4289675853 4289085265 4289807953 4289742423 4289675083 4289676111 4290593871 4291054923 4291844953 4292831831 4293162592 4292967517 4293496690 4293563764 4293565560 4293566078 4293499255 4293763700 4293500286 4293564272 4293499775 4293562994 4293562997 4293690216 4292769635 4292043092 4290333519 4288624462 4287311430 4287376202 4288427853 4288162631 4288691793 4289282637 4289478738 4289676367 4289217615 4289413203 4289938254 4289676881 4290266195 4289807178 4290267475 4289609548 4290398039 4289807434 4290068557 4290003028 4289544269 4290265678 4289346635 4289411662 4289081929 4288093757 4293830537 4294171311 4293503620 4294168987 4293566839 4293837456 4294092128 4293107073 4293362013 4292310641 4293363551 4292637291 4293955939 4292374367 4293162848 4290992990 4291122778 4290733673 4290533211 4291122264 4291060066 4291064178 4291519591 4289153131 4290342261 4290533478 4291655014 4292770683 4291588460 4292439399 4291192174 4292050033 4291587174 4290009960 4290073949 4290996343 4291521131 4290864750 4291916926 4291984237 4291457644 4290731628 4291983468 4292246396 4291264647 4292509570 4292052359 4291390081 4288893809 4291000729 4291590780 4291982197 4290602106 4290273400 4290076018 4288369259 4288760171 4288959595 4287777390 4285995861 4287320711 4290746292 4292976799 4292055196 4293105569 4290734484 4288901024 4289231521 4289426848 4288967078 4288903088 4286204552 4286919011 4287054433 4290408318 4290078594 4291593364 4288767369 4288106085 4286990452 4284814390 4286003559 4285208163 4287974238 4287650674 4283170897 4285738836 4291924384 4291594122 4292390301 4293048998 4292185985 4292250493 4292250507 4292520612 4292656556 4292783520 4293246881 4292918961 4292985010 4292916136 4292525234 4292524720 4292788401 4292131772 4292655269 4292722617 4291868069 4292656824 4292525238 4292722608 4292986037 4292591030 4292854202 4292788408 4292920253 4292986036 4292722874 4292722616 4292986301 4293445566 4293051063 4292920251 4292919995 4292657080 4293051837 4293248446 4293775044 4293316545 4292914327 4292055940 4291064160 4289352782 4287375175 4287708496 4288429903 4288563032 4288758873 4290076271 4292315013 4292394675 4294038460 4294501836 4287644488 4283171896 4283501378 4284491334 4284418877 4284750399 4284750142 4284750142 4284814144 4284419385 4284747065 4285144647 4285276233 4285013312 4284487751 4284291908 4285539664 4288762728 4290934415 4292314749 4291985287 4291655291 4291657854 4291593344 4291921799 4292054658 4292384137 4291989124 4292316804 4291989381 4292381566 4292317829 4291988613 4292053631 4292053632 4292053887 4292119424 4292119424 4291659646 4292119424 4292119424 4292119424 4292119425 4292118138 4291725432 4291987582 4292119680 4291987581 4291922046 4292185216 4291593854 4291594101 4292185209 4291724924 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289347409 4289612116 4289676116 4289217363 4289019472 4289745764 4288496208 4289676116 4289807959 4289415252 4290333269 4290464081 4290990423 4292108374 4292571500 4292704358 4293558891 4293166702 4293562990 4293565561 4293565047 4293565303 4293499511 4293565046 4293500286 4293763955 4293497209 4293562222 4293233009 4293228114 4291650146 4289808212 4288756555 4287900743 4287965255 4288884809 4288756559 4288624462 4289217101 4289151571 4289085522 4289741904 4289545032 4289742424 4289742423 4289216338 4290004047 4289283672 4289740877 4289872969 4289414225 4290068557 4290003021 4290266187 4290136136 4289411915 4288823889 4289081672 4288093779 4293372033 4294167194 4294105005 4293897056 4293576863 4293831535 4293570440 4293895019 4293498483 4292836680 4291123548 4293100897 4292045149 4293699443 4292632662 4290072418 4290267990 4291188314 4291126629 4290468456 4291324265 4291584872 4288167258 4289943906 4291190105 4291456624 4291918961 4292310378 4291848555 4291130997 4292047981 4291061101 4290530658 4290208365 4291193457 4291322469 4291390074 4291586411 4290995822 4291062395 4290993761 4291194753 4292184964 4291715941 4292183420 4292511625 4291059835 4288760171 4291332760 4291987854 4291588216 4290274435 4288693347 4288171124 4289288059 4287314520 4285607502 4285800008 4285669458 4285145687 4286400382 4289892523 4291988875 4292972200 4290085797 4288770728 4289234603 4289816211 4287977349 4287981200 4286332536 4286070642 4285413492 4287786139 4285740912 4285213039 4284688728 4286592095 4285343073 4286526565 4284422489 4283568968 4284359234 4282846024 4283898693 4283041865 4282648639 4291006615 4293249731 4292586632 4291918974 4292314740 4292058009 4292524459 4293315507 4293246898 4293312166 4292984754 4292656555 4292523944 4292130476 4292523943 4292920502 4292524720 4292589734 4292656305 4292261303 4292262067 4292590254 4292788401 4292524981 4292854202 4292854202 4292854193 4292788410 4293182641 4292525497 4293117106 4293445557 4293380031 4292788658 4292986303 4292854203 4293380030 4293445558 4292986565 4294038966 4292719785 4292449894 4290278263 4289939281 4287509065 4287704908 4287773008 4288887888 4288035916 4289612640 4289547620 4291462802 4292983712 4293313971 4294106560 4291337873 4282777640 4283501642 4284156733 4283831364 4285079370 4284488516 4284748093 4284817478 4284025649 4284225856 4284615474 4285144647 4285800518 4284422472 4283371088 4284160578 4286660209 4290012551 4292118131 4292119174 4292050825 4291134082 4291919723 4291921801 4292447612 4292057231 4292316546 4292316029 4292777354 4291987325 4292318859 4292316029 4292317061 4292381822 4292053632 4292119167 4292053632 4292382079 4292449414 4292119423 4291922044 4291725439 4292119424 4292119424 4292119424 4291791232 4291397504 4291987838 4292119671 4291725441 4292119680 4291987839 4291922046 4292119673 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289807959 4289348944 4289611863 4289611859 4289677396 4289216594 4289743188 4289414737 4289283664 4290070616 4291317069 4291250264 4291187284 4292106835 4292309611 4293162818 4293297521 4293429101 4293564532 4293565561 4293565047 4293564542 4293566076 4293566595 4293565046 4293500285 4293564280 4293562997 4293296747 4292835683 4292042829 4290335065 4289147979 4287246666 4287442759 4287836233 4288164172 4289411144 4289480267 4289216589 4289348943 4289019730 4289808210 4289742421 4289938255 4289938510 4289479509 4289742424 4289479753 4289871184 4290068563 4289609805 4289546062 4290854222 4289740114 4289480266 4290461521 4289149513 4288750400 4292179558 4294304703 4293833840 4293902483 4293964145 4293771433 4293965686 4293435516 4293430113 4291456099 4293160788 4290856524 4293891178 4292569682 4289810012 4289743704 4290857557 4290665310 4291126374 4291125084 4290994794 4288036426 4290073956 4290601336 4291257975 4292510831 4291192173 4291455081 4291849324 4292504936 4291590256 4289943647 4290997373 4291716447 4290734718 4291585906 4292111465 4290935158 4291126636 4290468701 4291194745 4291917419 4292509063 4291852396 4291193209 4291125366 4289089654 4290082957 4291456116 4291787886 4290076559 4287838306 4288174195 4289945980 4288366179 4287644264 4289942908 4290140540 4287053930 4287386006 4288048282 4288767907 4290474627 4289163422 4289235879 4288902804 4288174214 4285476453 4285213015 4284490841 4284947039 4285675638 4288838584 4287386755 4283961932 4286530169 4285475929 4284355929 4284226108 4284029765 4283697216 4283831875 4283766108 4283698745 4282844227 4283634250 4288510879 4292984499 4292975486 4290868614 4292054919 4292590526 4292723892 4292591029 4293246117 4292984232 4292392874 4292723124 4292523438 4292590769 4292590513 4292722347 4292722090 4292524720 4292655528 4292129705 4292328621 4292394406 4292788403 4292328628 4292330165 4292722358 4292854203 4292788658 4292986045 4292591032 4292919467 4292786867 4292986303 4293182650 4293314495 4293510071 4293380022 4293577926 4293250747 4293047699 4291392104 4290073671 4288625233 4288166214 4288103503 4287708240 4288363344 4288231759 4288560716 4288824154 4289548903 4291725194 4292717739 4292982177 4294104513 4294564042 4285011241 4284033114 4283894838 4284093502 4285078596 4284422722 4284751431 4284619587 4284358217 4284420680 4284881480 4286127173 4285078854 4284881726 4283962181 4283763018 4285010496 4288304495 4291393393 4292117661 4291657596 4291460964 4291785079 4291788441 4292120194 4292383363 4291988098 4292384136 4291989896 4291989123 4292317829 4292381565 4291989380 4292382339 4291991178 4292447358 4292055174 4292119165 4292119167 4291659645 4291987335 4291987335 4291987335 4291791230 4291725439 4292119424 4291856768 4291659645 4291856768 4291790977 4291594109 4292185217 4291725688 4292119683 4292118387 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289217363 4289807959 4289546322 4289546074 4289613392 4289217109 4289677652 4289217364 4290003797 4289609805 4290726997 4291054671 4291644492 4291255131 4292897892 4292311908 4293360216 4293235822 4293629819 4293562738 4293371001 4293564529 4293564279 4293566077 4293564279 4293566077 4293564280 4293562228 4293298286 4292769902 4292635220 4290335819 4288491337 4287964998 4287441738 4287773007 4288885835 4288626001 4288561232 4288693330 4289544274 4289415256 4290003797 4289347660 4289347661 4289545302 4289938510 4289872975 4290068301 4289872976 4289807439 4289807188 4290136397 4290266952 4289611592 4290134094 4289348686 4289017163 4288293202 4290665285 4294500011 4293906085 4293898608 4293771692 4293967986 4293769357 4293829223 4293297760 4292962648 4290924117 4292112479 4291255369 4291913832 4290598747 4290140254 4290731879 4290138201 4290598746 4291719540 4288954448 4290009457 4290204512 4290796920 4291982186 4291520892 4292243320 4291520615 4291390572 4291654509 4289941350 4291192424 4291388781 4291389805 4292047741 4290342011 4290995048 4291455872 4291060325 4290931302 4292637831 4291722606 4292112504 4291719035 4291784563 4288365938 4289815659 4291984265 4291916422 4290143884 4286926970 4290340229 4291392650 4290204251 4289481604 4290608011 4290871459 4289032358 4287315571 4286065523 4286794111 4287188343 4286725233 4288640414 4288569991 4286394988 4285609576 4286069615 4285078095 4284684381 4288309403 4288049294 4284685386 4285148267 4285476983 4285804640 4286530424 4283306827 4283765316 4283633226 4283303732 4283572072 4283503955 4283110996 4287261605 4290876559 4293443745 4292120188 4290080895 4292120478 4292986561 4293117365 4293248440 4293510566 4293048491 4292657589 4292523423 4292524979 4292588958 4292589232 4292589992 4292524720 4292524720 4292591289 4292393902 4292327845 4292262068 4292590512 4292590255 4292591030 4292722352 4292722617 4292854441 4292984501 4292525494 4292854459 4292392357 4292722098 4293774015 4292920245 4293314230 4293579980 4293250749 4291928188 4289744972 4288363849 4287967564 4287051599 4287707726 4288432991 4288756302 4288955986 4288690508 4288824918 4290073949 4289356659 4292055191 4293309344 4293246365 4293841585 4294169764 4287645776 4283105338 4284027719 4283961661 4284683589 4284620359 4285472330 4285273148 4284358218 4284816963 4284619584 4284158263 4285668158 4285341001 4284422473 4283896900 4283632460 4285999194 4289027947 4292117632 4291854965 4291657854 4291590026 4291068032 4292382074 4291989123 4292319118 4292383107 4291988098 4292449672 4291923588 4292775549 4291923076 4292448905 4292054916 4292118653 4292055173 4292447356 4291858581 4291661186 4292184978 4291921542 4291791230 4291791230 4291987335 4291987335 4292119679 4291397248 4292185216 4291725440 4292119680 4292183930 4291331960 4291986553 4292119672 4291921794 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289414743 4289742416 4289676374 4290071378 4289741912 4289742411 4289610575 4289215568 4289676875 4290465371 4290727764 4291054672 4291577925 4292108634 4292766024 4292769903 4293558890 4293233014 4293172080 4293565560 4293563511 4293564542 4293566077 4293565047 4293565304 4293565303 4293564537 4293561457 4293494380 4293162589 4291649632 4289547093 4289279307 4287247693 4287374918 4289017420 4288098379 4289085521 4289414218 4289611603 4289413196 4289608784 4289481289 4290003793 4289742669 4289740876 4289872981 4289807189 4289677142 4289479753 4289872726 4290331721 4289741649 4290003022 4289740878 4289282638 4289870922 4289346639 4289014341 4289210175 4294500537 4293770877 4293905574 4293967472 4293573017 4293836937 4293831798 4293432936 4291254872 4291712338 4290397524 4291458928 4292112740 4290997872 4291122264 4291124834 4290074725 4291192936 4289022293 4289284962 4291384917 4291322995 4292769629 4292047486 4292374115 4291652475 4291653743 4291718250 4290008680 4290731628 4291124826 4290865266 4292113261 4290864495 4291653742 4291062129 4290861681 4290994788 4291783292 4292247915 4291588478 4291914597 4292049805 4289021546 4289686142 4291326359 4291191671 4291058539 4288304506 4290076542 4291324792 4290206067 4289355412 4289025675 4288701561 4286921837 4286855786 4284883540 4286197845 4286591853 4285670753 4286663800 4287585701 4287057795 4287455904 4286791794 4286263159 4287319443 4287785892 4285807714 4285342300 4286994317 4285869667 4284885581 4285351285 4285280105 4284819028 4284029509 4283304254 4283435327 4283369001 4282515522 4285871974 4292524201 4293571976 4290735737 4290737532 4291404198 4293112223 4292394420 4293378211 4293116847 4292720814 4292985008 4292524720 4292590770 4292589735 4292591805 4292196774 4292588960 4292526010 4292787882 4292523943 4292590769 4292195755 4292656305 4292656048 4292195752 4292591031 4292919979 4292525237 4292459445 4292788666 4293313980 4292986296 4293248170 4293314496 4293576894 4293774532 4293776061 4291727711 4288494665 4288624453 4287445070 4288297039 4288363344 4287838032 4288824143 4288889680 4287970123 4288757324 4288826206 4289614440 4291135127 4292973433 4293108891 4293575836 4293644715 4291393378 4285207860 4282975800 4284614463 4284091703 4284683846 4284684349 4285274173 4285013061 4284682813 4284226371 4284617796 4284424782 4285406016 4285668412 4285015372 4284288576 4283501646 4283501373 4287776614 4290670733 4292053638 4291591807 4291985518 4291133823 4292117379 4292053630 4292777353 4292252551 4292317305 4292384143 4291529346 4292907652 4291924361 4292447875 4291989380 4292119684 4292119684 4291726468 4292055172 4292183942 4292578940 4291267204 4292119422 4292119422 4291725440 4292119678 4291921799 4292118393 4291791232 4291725440 4292185216 4291528316 4291987337 4292053629 4291987329 4291528573 4292316285 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289544787 4289742160 4289678169 4289480537 4289546322 4289938261 4289545296 4289610826 4289479504 4290070615 4290528335 4291446344 4291186521 4292108638 4292765786 4292835423 4293165678 4293299056 4293629298 4293564542 4293565560 4293564785 4293564536 4293370226 4293564274 4293566335 4293562737 4293562235 4293232751 4293163102 4291848793 4290399054 4288493647 4287966021 4287377994 4288295756 4288754763 4289806417 4289741390 4289085517 4289478733 4289611088 4289807955 4289086288 4290004048 4289281868 4289676889 4290397773 4290068306 4289740877 4289218387 4290331728 4289807434 4289871441 4289741389 4289674833 4289216336 4288954961 4289145158 4288292421 4294296962 4293906868 4294100344 4293705118 4293967988 4293771676 4293699187 4293493358 4292506459 4291054678 4291189084 4292976778 4291717221 4293232239 4290729566 4291651169 4291453281 4289285487 4289020493 4290665853 4290470506 4291718249 4290994288 4292442986 4291586429 4291457138 4290931324 4290074456 4290471543 4291125857 4290995820 4291980151 4290930287 4291127150 4291061875 4291060583 4290993758 4291391345 4291590014 4292636273 4291652731 4291649898 4289283424 4289684602 4291389576 4290865526 4291062904 4290075526 4288827517 4290016668 4289227933 4288370588 4288109177 4285999707 4285341258 4285077842 4285472342 4285408353 4284619862 4285405763 4286263922 4287913626 4287057288 4288383147 4287054973 4288635807 4287058053 4288774307 4286327656 4288504210 4288508059 4283436337 4285476727 4284224853 4285744491 4287059075 4282910789 4283369789 4283636562 4283173180 4282384469 4287521417 4292001699 4292912004 4290137186 4290273137 4292521901 4293183404 4292457377 4292588442 4292522651 4292523168 4292590513 4292525496 4292589735 4292589231 4292590250 4292587933 4292588449 4292590763 4292587691 4292132015 4292655529 4292589230 4292721065 4292262052 4292262067 4292722359 4292196792 4292788144 4292132795 4292919987 4292854193 4292920253 4293510062 4292852917 4293446340 4294038712 4292983451 4289290851 4287314528 4287575883 4288432990 4288299608 4288366159 4288362832 4287642702 4288691788 4288891218 4289877625 4289945455 4290344068 4292317837 4292648334 4293049273 4293773214 4293710259 4290804847 4282777650 4283631944 4284746045 4284617285 4284618309 4284554051 4284883530 4284947268 4284617278 4285140802 4284424779 4284352823 4285274172 4285405507 4285211465 4284816966 4284355647 4283700811 4284819034 4289289325 4291591551 4291789176 4292249205 4291132291 4291523975 4291987834 4292055689 4292316545 4292317319 4292317576 4292710530 4292448900 4291528317 4292448899 4291990153 4292447357 4292054915 4292449161 4292118909 4292120709 4292119164 4291463825 4292184956 4292119165 4292119444 4292119421 4291725440 4291791231 4291791232 4292119680 4292183930 4291397504 4291856768 4291856767 4291134333 4292185470 4292052872 4291791232 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4290071128 4289416539 4290135636 4290071378 4289546329 4289545300 4289347660 4289545290 4289872713 4289873237 4290792271 4291121238 4290989127 4291778390 4292637519 4292442226 4292967514 4293102698 4293627776 4293172596 4293630839 4293564024 4293563768 4293566078 4293564536 4293564529 4293565305 4293563508 4293494123 4292769893 4292241245 4290070610 4289147722 4287313744 4287376966 4289014854 4288165710 4289149261 4289151566 4289151566 4289479245 4289609040 4289806413 4289610826 4289740878 4289808205 4289676619 4289481049 4289545294 4289543505 4289938505 4290068308 4289611597 4289871184 4289740878 4289086794 4290199630 4289349195 4288559686 4288226627 4292975755 4294101912 4293506708 4293969291 4293703049 4294169221 4293633148 4293560159 4292239187 4292372578 4293101424 4292045158 4292577671 4291582289 4291855749 4291125601 4289808221 4289284442 4290138980 4290597985 4291520874 4291715942 4292115051 4291586172 4292047717 4291389819 4290662749 4290077552 4291388022 4291059033 4291521659 4291389029 4291061615 4290931840 4291060853 4291254873 4291917692 4292441194 4291782757 4292507787 4291652195 4288692847 4289356180 4290472842 4291128424 4291458424 4291520901 4289877883 4287976331 4287254900 4285607506 4285540951 4286263146 4286593135 4286201204 4285800280 4284621646 4285408086 4285668937 4286328429 4287782811 4286859889 4288906679 4286593906 4287188612 4284553278 4287055224 4287053693 4287453584 4288638852 4285407330 4286794380 4286533764 4283433554 4285680759 4286337671 4283105333 4283107657 4282712136 4284555099 4288707222 4293184170 4293037691 4289284958 4289487476 4292652452 4292918180 4292984475 4292521879 4292652445 4292259996 4292259233 4292197045 4292656304 4292196269 4292588966 4292588712 4292591543 4292652433 4292193449 4292590762 4292654767 4292195746 4292655023 4291671727 4292328622 4292262829 4292262570 4292264123 4292525237 4292788152 4292656815 4292656824 4292656823 4292657339 4293249982 4292589722 4290608238 4289426314 4289621626 4288756551 4289478738 4288758865 4288952135 4288167245 4288035402 4288822616 4289219685 4290144633 4291461495 4292775806 4293038980 4293107335 4293438362 4293309319 4293906874 4292457360 4283891754 4284027723 4284488252 4284618820 4284487237 4285076547 4284816969 4284881218 4285800007 4284683064 4284551487 4284027709 4284815934 4284883022 4285867079 4285671500 4285279832 4284029526 4284095813 4287381352 4290342018 4291854974 4292380540 4291722370 4290803312 4292184197 4292121224 4292056716 4292318861 4292384396 4291989639 4292318088 4291990408 4292448904 4292316803 4292054664 4292054148 4292121224 4292053890 4292120709 4292120452 4291726468 4292578684 4291529360 4291792516 4291790972 4291792518 4292119423 4292119423 4291725439 4292119424 4291791232 4291922304 4291790976 4291790976 4292185470 4291789201 4291397503 4291659636 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4290005334 4289875043 4290728803 4289545044 4289481049 4289674832 4289872724 4289872981 4289807189 4290266709 4290463052 4290266706 4291054676 4291846748 4292240466 4292836196 4293820265 4293036404 4293629042 4293236343 4293237892 4293236861 4293564785 4293565304 4293565304 4293565561 4293562744 4293562740 4293430128 4292836191 4292043601 4290268488 4289151570 4287375432 4287507018 4287770697 4288298321 4288693328 4289282638 4289151053 4289544275 4289480787 4289217610 4289545297 4289806413 4289086544 4290266707 4289938248 4289545047 4289742668 4289740627 4289283917 4289938250 4289610318 4289807434 4290003793 4289545290 4289086030 4289213772 4287768134 4290926396 4294502337 4294098546 4293507224 4293967223 4293700744 4294031477 4292838520 4292971874 4291910206 4290995071 4292183157 4292770154 4291988613 4292043871 4290799470 4289021529 4289353072 4290138197 4291716702 4292441710 4291389800 4291256422 4291852160 4291126118 4290730856 4290076777 4291650933 4290994527 4290995302 4291650678 4292113526 4291127410 4290535010 4290991701 4291787137 4291921270 4291257451 4291064452 4292108897 4291061627 4287901524 4291198605 4291457652 4291652989 4291320946 4288629889 4287117931 4285147733 4285209933 4286920806 4287649425 4287121279 4285609052 4284948560 4284751173 4284749378 4285337429 4285275983 4287714443 4288573083 4288045465 4287388545 4286134630 4283959098 4284817250 4284554048 4287784099 4285740650 4286131814 4287059088 4286532732 4284292415 4283368511 4285484152 4284556117 4283304251 4282712132 4283044426 4290217613 4293179043 4292641384 4289088093 4290212486 4292721316 4292982176 4292917656 4292456088 4292650385 4292127648 4292127901 4292129955 4292655280 4292588967 4292653984 4292588970 4292589212 4292652444 4292194727 4292263338 4292653728 4292196524 4292653740 4292589488 4292721062 4292262069 4292656047 4292197049 4292590773 4292722609 4292459445 4292985529 4292854461 4293249205 4293247395 4289886822 4288169315 4287055977 4289757839 4289622914 4289222260 4288692038 4289544267 4288429407 4288758888 4290142579 4290604914 4291988862 4293171079 4292972414 4292778634 4293039494 4293370256 4293242263 4293645227 4292125831 4284549938 4283892292 4284289348 4284815933 4284682825 4285010224 4285145671 4285341769 4285537346 4284686922 4284550717 4284814398 4284224071 4284681273 4285733436 4284951628 4284878148 4284951141 4284098905 4285015899 4288764281 4291657342 4292249218 4291985777 4291331202 4291133058 4292513406 4291990407 4292318093 4292711031 4291924878 4292054401 4292710531 4292383106 4291989641 4292383106 4292055432 4292447100 4292055432 4292121225 4292053117 4292514436 4291334280 4292120452 4292120451 4291792258 4292052615 4291790974 4292119423 4291792773 4291987079 4292119679 4291856511 4291397248 4292119424 4292119424 4291791232 4291790200 4292184186 4291855751 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289352029 4290791507 4289875802 4290071128 4290201429 4290005849 4290071641 4289872468 4289677131 4289807183 4290135376 4290661968 4291316817 4291845712 4292506475 4292902241 4292771678 4293298028 4293562490 4293630072 4293235309 4293238651 4293630334 4293562993 4293564025 4293564786 4293564537 4293562228 4293622886 4293163356 4292109916 4290269278 4288624204 4287377481 4287443274 4288491593 4288818248 4288626257 4289215307 4289414730 4288888144 4289478733 4289610832 4289938511 4289545295 4289412946 4289479759 4289545040 4289742668 4289545040 4289610837 4289545040 4290071888 4290198608 4290397265 4289218381 4289742413 4289478734 4289020498 4288621641 4288751162 4294235562 4293840291 4294164604 4293307536 4294165891 4293765505 4294029680 4292770662 4291127930 4290927699 4293038202 4291583586 4293166194 4290934898 4289610332 4289085265 4291386968 4291126397 4291721857 4291782499 4292177787 4292048762 4291520623 4289483358 4289617516 4291256943 4290995316 4291387745 4291584377 4291060579 4291061872 4290406270 4291058026 4291913059 4292308854 4291453818 4291851628 4292373861 4291588217 4291128954 4287903854 4291130507 4291848821 4289614959 4287251830 4286327646 4284748381 4284815945 4288306082 4287718295 4284884564 4285211991 4284226371 4285343070 4284419131 4285605735 4283893833 4287380862 4289299629 4288700559 4288440711 4286526832 4284615503 4283959367 4283892275 4288050347 4287122561 4284949071 4287649925 4286995597 4284024638 4283107419 4282974264 4287327648 4286140822 4282515519 4284621653 4290152073 4293506702 4291455844 4290076011 4291593362 4293379778 4292916652 4292917655 4292523173 4292652445 4292127905 4292128413 4292784807 4292195756 4292653475 4292194723 4292130213 4292325540 4292261281 4292194203 4292719256 4292194460 4292654241 4292195764 4292655281 4292588188 4292261564 4292262306 4292590512 4292591029 4292525237 4292854187 4292919999 4292986282 4293578156 4291401341 4286458961 4286200669 4287257211 4288698248 4290281620 4289561747 4290737782 4289945467 4290277506 4291654239 4291858048 4293170556 4292974463 4293565312 4293235326 4292645770 4293429627 4293304719 4293173891 4294038200 4292124038 4284219433 4283632456 4284288839 4284616509 4284619070 4284750655 4285145159 4285146191 4285076795 4285276747 4285209404 4284488782 4284420926 4284155961 4284878643 4285406533 4285866569 4285672270 4284161607 4284357445 4286656084 4290538362 4291920768 4291855732 4291657855 4291392627 4291460729 4292447358 4292319622 4292317063 4292253326 4292579200 4291990413 4292319620 4291988616 4292186998 4292318089 4292055175 4292057231 4292383106 4292119426 4292122249 4291660674 4291986566 4292448387 4292120451 4291529360 4291856509 4291790976 4292119680 4291528060 4292185215 4291790975 4291858310 4291856511 4292119424 4291790976 4291856767 4291659145 4291658359 4291331710 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4290465882 4289743704 4290070865 4289480536 4289480792 4289742165 4289676630 4289676878 4289872725 4289413974 4290004557 4291182407 4291776598 4291385687 4292306020 4292442465 4293427306 4293036153 4293564275 4293564023 4293237373 4293236845 4293171322 4293566334 4293564023 4293564025 4293564536 4293561984 4293691755 4292769121 4292175711 4290268236 4288691537 4287376454 4287508039 4287837004 4288164939 4289213771 4289283150 4288953680 4289348950 4289676617 4289543504 4289938517 4289742418 4289742675 4290068300 4289479760 4289938256 4289545039 4289349459 4289740877 4289740621 4289217102 4289872970 4290002771 4290201939 4289742663 4289215563 4288623948 4288093515 4293367916 4294234528 4293507736 4294033017 4293700229 4293969803 4293433459 4293765000 4292906862 4291062648 4292109913 4292774784 4291189332 4291323491 4289743445 4290270818 4291123568 4292111971 4291849065 4291717996 4292044643 4290536554 4290332755 4289612638 4291126391 4291060836 4291586419 4290996849 4291126890 4290535785 4291059557 4290796888 4289548918 4291395211 4291586682 4291784569 4292242555 4292242786 4292444553 4291851400 4289021290 4291128958 4289879404 4286000735 4285603932 4284421457 4286134898 4288504472 4285741147 4284157758 4283964233 4284220484 4285343819 4284486984 4284615761 4284292180 4283958840 4288374687 4288634502 4288897411 4286395488 4283897918 4284881491 4284287815 4287718818 4288507799 4285143898 4286596745 4286860407 4284357451 4282909242 4283833168 4282974276 4286999960 4285015136 4285675621 4291796630 4293439893 4291653221 4289088871 4291661967 4292657582 4293051058 4292458659 4292587166 4292195487 4292127638 4291668119 4292259493 4291670951 4292784038 4292195220 4292783524 4292127125 4291999391 4292718494 4292717731 4291671458 4292719782 4292194730 4292653984 4292196255 4292654505 4292262565 4292262068 4292590254 4292722873 4292657083 4292986289 4293317299 4291533175 4286197573 4286263384 4287057269 4286987872 4288961912 4287778402 4289427343 4290017171 4292248971 4293170047 4293758325 4293103486 4293891458 4292972673 4292974458 4292971391 4293368452 4292973701 4292909704 4293568654 4294104498 4293441947 4283761455 4283107395 4284419128 4284812606 4284619326 4285603397 4285669446 4285473611 4284488517 4285537604 4285274687 4284747321 4285144389 4284225854 4285603138 4284881734 4285669447 4284748597 4284156221 4283635277 4284422731 4288633466 4291131520 4292117618 4291657599 4291855504 4291327855 4291986807 4291991696 4292711806 4292251527 4292318604 4292253324 4292318603 4292318347 4292318861 4292318088 4292383112 4292053881 4292053635 4292448899 4291727241 4292119426 4292122249 4292120451 4291726468 4291726468 4292578685 4291792518 4291790974 4291725183 4292185990 4291790975 4291790975 4291856511 4291857542 4291791230 4291922304 4291463040 4291725181 4291725438 4291593850 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4290465882 4289286493 4290070871 4289415000 4290071128 4289415000 4290071642 4289479246 4290136402 4289807692 4290201168 4290922574 4290399560 4291909212 4292437333 4292834908 4293164144 4293495916 4293562477 4293566592 4293629290 4293564799 4293563767 4293564529 4293564799 4293564786 4293564274 4293563258 4293231211 4293163361 4292109916 4290268240 4288560464 4287963978 4287376967 4288558412 4288757841 4288624462 4288691789 4289677389 4289085522 4289085523 4289413708 4289740883 4289479503 4289742412 4289677139 4289938255 4289546831 4289610832 4289545290 4290004048 4289545296 4290068557 4289348433 4290201426 4289741392 4290003792 4289086286 4289148235 4288226885 4291655529 4294369737 4294164598 4293504912 4294167960 4293897334 4293840017 4293301876 4292641145 4293569148 4291914604 4293107836 4291584613 4288887888 4290138991 4291127145 4291651937 4291589504 4291717494 4292901237 4291128961 4289808202 4288758636 4291847264 4291388005 4291060838 4291256692 4291321454 4291127147 4291060086 4290666853 4290598240 4290346130 4290012791 4287647092 4287641420 4289480020 4291915153 4293099641 4291587453 4288760927 4288169830 4285473627 4285741162 4284685651 4286268522 4287911290 4284685120 4285081959 4284354372 4283829815 4285606226 4285541215 4283958072 4284421461 4284682575 4286465907 4289366197 4285474641 4287052143 4284421183 4284484411 4284882266 4288112807 4289166751 4286922621 4286792308 4287589023 4283564092 4283039786 4285941651 4283170860 4283111743 4287191458 4286137449 4292451994 4293370508 4290402131 4289684337 4292189855 4292654488 4293639329 4292591535 4292653206 4292062879 4292781729 4292388768 4291669171 4292128166 4292784286 4291735190 4292192920 4291602594 4292522910 4291667865 4292194458 4292128929 4292128678 4292653483 4292588453 4292589731 4292591285 4292588967 4292588453 4292591289 4292788659 4292524721 4293248678 4293114527 4286592830 4286329424 4283433535 4286528863 4289297293 4287977854 4288174711 4288041849 4288440190 4290217616 4291857543 4292973961 4293037696 4292973694 4293300848 4293235586 4293693049 4293299845 4293237887 4293239713 4293570961 4294432416 4293048480 4285207088 4283238464 4284419134 4284222271 4284748862 4285078598 4284683063 4285274432 4285211465 4285210438 4285144902 4285080913 4284878385 4284485440 4285011256 4284160070 4285143868 4285538124 4284687694 4284223315 4284621641 4285605214 4290339959 4292053637 4291723391 4291985775 4290541181 4291722878 4292448645 4292318084 4292251528 4292319366 4292318590 4292317065 4292319363 4292253844 4292317053 4292383113 4291988098 4292383880 4292383880 4292053891 4291725699 4292119940 4292118909 4292054916 4292119684 4292119938 4291726724 4291790717 4291989136 4292120196 4291790718 4291397247 4292252294 4291396991 4291856766 4291658888 4291463038 4291922304 4291855482 4291855750 4291527557 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289808471 4290595927 4289941339 4290005335 4290530648 4290136150 4289676623 4289283672 4290396750 4290006096 4289872464 4290658890 4291119952 4291845727 4292699482 4292835163 4292968558 4293233782 4293430651 4293237101 4292844418 4293631094 4293566077 4293565304 4293565559 4293564025 4293564280 4293560432 4293691756 4292768865 4292307796 4290205018 4289150800 4287311430 4287574602 4287246153 4288756046 4289414221 4289085008 4289151565 4289610316 4289151571 4289413203 4290069577 4289938513 4289347405 4289545045 4289545039 4289413203 4289543504 4289806413 4289349459 4289152080 4289872971 4290201158 4289480276 4290463816 4289415511 4289676361 4288888914 4289015368 4289672516 4294300822 4293772707 4293972387 4293699180 4293906073 4293762413 4292969335 4293374096 4293430643 4292843642 4292504407 4291257696 4288952140 4290732392 4291321436 4291782259 4292243322 4292113247 4291256939 4290796638 4289747051 4290340209 4290536804 4291125600 4291127406 4290469743 4290075747 4291192940 4290601834 4290466647 4291917181 4291915626 4292504932 4292376170 4291127423 4288369530 4286657875 4289022057 4291060077 4288892013 4285539409 4284949842 4285213272 4286662004 4286656616 4285147993 4285407842 4285145668 4284880472 4285605207 4286593899 4283698237 4284221507 4284287298 4285540951 4287583619 4287976589 4284485950 4285734484 4285144396 4284553821 4287255172 4287784071 4285212510 4288637096 4287919532 4285210706 4282384440 4286009998 4285419406 4282581050 4284821873 4290153630 4292127390 4292116323 4290009178 4290798191 4292450453 4292789432 4292456855 4292985005 4292721066 4292194717 4292783772 4291798172 4292191903 4292325777 4292391338 4292259995 4292192929 4292457365 4291734171 4291864212 4292326050 4291924365 4291932320 4292260521 4291933616 4292654504 4292129436 4292980648 4292523423 4292525492 4292722348 4292589217 4292790712 4290875497 4283105333 4284683074 4288765053 4287253610 4285798989 4290941069 4288967830 4287647083 4289885075 4287252592 4290214268 4292251809 4292644987 4293103488 4293300863 4293237639 4293628537 4293172868 4293238660 4293634197 4293505954 4294497695 4293248413 4285336881 4283106366 4284420936 4284617285 4284748863 4284619327 4285208124 4285144648 4285079623 4285667644 4284684864 4284684607 4285668675 4284423237 4284355391 4284684864 4285274430 4285732413 4284947780 4284357956 4284553801 4285012288 4287710049 4290737270 4291330687 4291197054 4291786368 4291788926 4291922300 4292318345 4292711822 4292252294 4292319364 4292318607 4291792756 4292253071 4292777341 4291990159 4291793013 4292383625 4292318087 4292055176 4292056191 4292448649 4292055688 4291726468 4292513668 4292120450 4291725201 4292054670 4291856508 4291790717 4291791492 4292185733 4291790975 4291790718 4291858310 4291790974 4291922558 4291658631 4291858309 4292053372 4291857024 4291396989 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4290399319 4289217879 4290005335 4290005335 4289546840 4289806418 4289676631 4290003795 4289611608 4289806927 4290201932 4289611860 4290070858 4291777105 4292109132 4292834421 4293360982 4293494638 4293236336 4293237116 4293631868 4293562230 4293565571 4293564534 4293564542 4293564529 4293566590 4293563514 4293232494 4292770659 4292636264 4290793293 4289082443 4287375431 4287505738 4287967562 4288753736 4288625998 4289085264 4289085008 4288758352 4289151564 4289479245 4289347661 4289413198 4289217610 4289808211 4289612618 4289543505 4289938762 4289282126 4290004048 4289543504 4289477712 4289940566 4290134094 4291120729 4290004812 4289807955 4290069834 4288429390 4288688724 4291719762 4294437839 4293835649 4294104733 4293965174 4293173648 4292839017 4293567871 4292781714 4293366637 4290665055 4288754762 4290466137 4291651691 4291717760 4290862943 4291125853 4291324546 4290796121 4289083733 4290604161 4291126371 4291256691 4291257723 4290535012 4290797667 4290076004 4291321967 4290598251 4291455337 4291849065 4292311660 4292704648 4291653767 4288828015 4288096319 4289221747 4287576171 4285801554 4286267495 4286006136 4285606752 4287119995 4287057536 4285609060 4285936743 4285605466 4284289881 4285539909 4288505499 4284357191 4283827771 4283762758 4284748384 4287188615 4285741146 4286791276 4284287292 4284749126 4285011022 4284884041 4287916439 4286325345 4287057278 4287454602 4285805408 4282843191 4286529675 4288189629 4283698245 4282056772 4287984303 4291800494 4291985782 4288762223 4290404724 4291207587 4292984992 4293378480 4292852393 4292849319 4292589745 4292129194 4291866782 4291733656 4291867304 4292849298 4291600798 4292391323 4292259232 4291863445 4291732376 4292520348 4291928978 4291801253 4291994258 4292063911 4292327596 4292654252 4292656563 4292130990 4292587429 4292982188 4292722083 4292523429 4289747524 4285996869 4285404741 4284157497 4287909733 4289948032 4286263905 4287514207 4290288274 4288895360 4288903559 4289420920 4288638595 4290480274 4291592575 4292446848 4293761407 4293171589 4293566590 4293567378 4293566847 4293571221 4294891427 4290671189 4285140266 4283503421 4284287028 4284287801 4284747322 4284813113 4285208895 4284818254 4285142331 4285013062 4285669190 4285210184 4285408330 4284552764 4285339977 4284683314 4284944186 4284553535 4285342283 4284683579 4284160588 4284554059 4285474906 4288699000 4290868865 4291593075 4291396480 4290998639 4291657342 4292447615 4292318848 4292252797 4292319380 4291989127 4292319363 4292317839 4292776583 4291925374 4292385171 4292383367 4291991167 4292383368 4292055935 4292120713 4292055417 4292448132 4291726468 4291726467 4292121993 4292118908 4291792258 4291595669 4292185731 4291792260 4291726725 4292119167 4291792518 4291790717 4292054158 4291397245 4291922559 4291856767 4291395974 4292119165 4291265661 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4290925402 4290466138 4289875546 4290006618 4290005079 4290005593 4289482326 4289348944 4289938255 4289742669 4289218132 4290331467 4290725706 4291646039 4292044643 4292899918 4292968303 4293301362 4293629306 4293564784 4293564541 4293563260 4293565559 4293565303 4293498749 4293565560 4293564798 4293561965 4293691500 4293096541 4292438119 4290400334 4288755784 4287375946 4287506503 4287901769 4288756302 4288691793 4289085265 4288823882 4289217101 4289544788 4289413196 4289806419 4289741388 4289543504 4290002512 4289346123 4289741389 4290069585 4289545546 4289675342 4289677133 4289872713 4290594899 4290594124 4289808210 4291053385 4289874005 4289872720 4289283659 4288885066 4289477698 4294363532 4294105530 4293836163 4293907110 4293634695 4292575079 4293302409 4293565798 4293175189 4291784546 4289017421 4291783783 4291587687 4291389287 4291520871 4291191160 4291257440 4289678678 4290205806 4291584609 4291322990 4291191930 4291125613 4291190873 4290206071 4291518831 4291124336 4291650414 4292311162 4291650933 4292043885 4290401109 4289352043 4287839588 4285147225 4284945722 4285669459 4286661234 4285610877 4285996874 4286532727 4286661487 4285805926 4285279078 4285342546 4283434053 4284221491 4288177573 4287053926 4283695933 4283895110 4284155976 4285083992 4288174208 4286003046 4284617292 4284289607 4284682818 4286394481 4286786393 4286197346 4284552777 4284950624 4287783061 4283893582 4283564103 4288323767 4286803107 4282581031 4285016694 4291604659 4289550699 4288961131 4291062639 4291997608 4293376946 4293115052 4292787120 4292523681 4292588969 4292261285 4292392871 4292259744 4292130204 4292258717 4291668905 4291931813 4292456867 4291666848 4292326041 4291991964 4291732117 4291734956 4291995285 4291995292 4292391587 4292327597 4292327340 4292196268 4292654497 4292590245 4292129179 4292519329 4292448903 4289876838 4287048279 4287774559 4288171375 4286325320 4287648622 4288700275 4286793327 4288635511 4289759386 4288304750 4289231002 4288171371 4291003787 4291921552 4292905846 4293300357 4293627774 4293566076 4293499264 4293837998 4293907610 4288368195 4283629620 4284091974 4283961918 4283960378 4284421442 4284879162 4284945988 4284813874 4286190658 4284752972 4285670734 4284686404 4285935695 4285210438 4284554053 4284291389 4284550976 4284420416 4285404215 4285341001 4284883017 4284422206 4285276742 4286591575 4289817202 4291197057 4291129969 4291065728 4290274684 4292250245 4292317576 4292253069 4292646031 4292121721 4292318606 4292318349 4292318591 4291991686 4292384142 4292316288 4292383885 4291989383 4292384397 4292383623 4292055175 4292054665 4291988355 4292514432 4291660675 4292513667 4291661189 4292118909 4292120707 4291725182 4291726725 4292119166 4292119424 4291790717 4291858053 4291790716 4292120721 4291593086 4291856768 4291790717 4291265661 4292251008 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289809754 4289873751 4290531674 4289942364 4289877342 4290726228 4290071128 4289481050 4289740626 4289675085 4289938507 4289740869 4290265163 4290992978 4291911757 4292899169 4293428844 4293035893 4293563255 4293565054 4293565301 4293565315 4293564272 4293500286 4293763956 4293498738 4293565047 4293561979 4293231467 4293098338 4292438376 4290333770 4289148236 4287377738 4287573831 4287902284 4288822095 4288687687 4289281355 4289217358 4289347152 4289478732 4289676373 4289545300 4289740883 4289938512 4289480010 4289740877 4289938512 4289479759 4289543505 4290069069 4289938511 4289282646 4290661201 4289677141 4291055697 4289743183 4290072149 4290069837 4290004551 4289086543 4288685382 4291124559 4294170785 4293906865 4293903754 4293701502 4293175954 4293630069 4293176727 4293506429 4291125591 4290077551 4291651167 4291847796 4291258745 4291126913 4291126110 4290138721 4289681010 4291258213 4290995820 4291389294 4291125599 4290536297 4291059306 4290994822 4290075991 4291060851 4291916403 4291912838 4289811821 4288961403 4290139777 4290143340 4289811056 4289615739 4287514733 4288104047 4285408339 4285538128 4286397051 4287058292 4284816985 4284291658 4284092995 4283697223 4284420959 4287118456 4288904863 4285609070 4283500337 4283894604 4283960646 4285608299 4288174721 4286067303 4284287292 4284816451 4285670495 4284554047 4285931094 4284094548 4283830847 4286598255 4287059849 4283498573 4283962181 4288387268 4284883039 4287188863 4289364391 4287909486 4288958312 4288832911 4292524737 4293310870 4292985003 4292851123 4292524200 4292591028 4292260002 4292326052 4291866524 4291800746 4291733665 4292257438 4291669933 4292522393 4291866528 4291995541 4292120970 4291662997 4291799969 4292260256 4292324253 4291277224 4292392108 4292458148 4291540133 4292720304 4292194457 4292453021 4293113254 4293441189 4293174184 4292775817 4289281354 4287114317 4287510607 4288766343 4286788693 4287448930 4287517297 4287117924 4290020490 4289095558 4288701053 4289088369 4289557122 4291659163 4292969868 4293105293 4293566847 4293504412 4293973150 4294359937 4286980665 4283435332 4283896114 4284356934 4284682822 4284417850 4284880954 4284879154 4285472325 4285472583 4284552247 4285866826 4285537861 4286063437 4285012027 4284289342 4284420663 4284815945 4284748863 4284812855 4285342283 4284751688 4284358216 4285475423 4285867351 4288106344 4290342520 4290409844 4290278006 4290275441 4290540914 4291856767 4292385157 4292253573 4292646772 4292646031 4292318589 4292318606 4292186999 4291990146 4292317831 4292383880 4291989639 4292382855 4291988871 4291989639 4292383885 4292383103 4292382339 4291989128 4292449672 4292054659 4292120451 4291729039 4292120200 4292119940 4292512893 4291727498 4291725181 4291988365 4291791491 4291856510 4291462782 4291922560 4291856768 4291265916 4291592838 4291659645 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4290465882 4289875546 4289875290 4290006618 4290201172 4289349464 4289480792 4289938003 4289742674 4289742675 4289740878 4289675854 4290069323 4291381324 4292306271 4292506203 4292706417 4293299310 4293561726 4293561979 4293171324 4293566849 4293565052 4293566077 4293499254 4293499511 4293564031 4293563763 4293494381 4292769617 4292110429 4290795090 4288557387 4287441482 4286982983 4287969101 4288360776 4288166993 4289216593 4289085008 4288953936 4289546066 4289019729 4289676373 4289610825 4289545290 4289609041 4289938518 4289872975 4289740883 4289741388 4289675340 4289413974 4290595918 4290135126 4290398797 4290202715 4290267470 4290266702 4290398031 4289611091 4289871949 4288954961 4287964744 4293107047 4294237102 4293905311 4293634428 4293901959 4293438350 4294029424 4292969849 4289012543 4292842862 4291977570 4290926939 4291060838 4291127402 4290731371 4290206572 4290534765 4291060079 4291389036 4290993773 4290609561 4290932132 4290800270 4290669449 4290138519 4289881480 4290798220 4291390084 4291980158 4291190888 4291585131 4288955731 4287774300 4289151586 4288428900 4286589790 4285870449 4287381367 4287912303 4287054964 4285146449 4283635785 4283894090 4283762502 4284748873 4286792312 4289167271 4285010235 4283697222 4284093511 4284879679 4285739879 4286722657 4285806701 4284881222 4284748106 4286260813 4284419901 4284095554 4284748362 4283565118 4286795654 4286727804 4283170889 4286207373 4287590581 4288964498 4291400859 4288772258 4285735503 4290077307 4289895598 4293179296 4293180328 4292458147 4292523938 4292590250 4292720816 4292259487 4292325545 4292456859 4291799193 4291799705 4292259222 4292324245 4291800998 4292323484 4291862433 4291468693 4291209378 4291998372 4292457379 4291670187 4291997602 4292458405 4291538858 4292127133 4292521369 4292388502 4293440701 4293307568 4293244601 4293374374 4292974481 4291649645 4289216077 4286723935 4286852173 4289558941 4287976819 4288172144 4287979140 4288964223 4289366168 4289425292 4288834181 4290080135 4291266434 4292774535 4293698945 4293640351 4294300559 4292573019 4285929529 4283829309 4284093501 4284616006 4284026174 4284812863 4284813625 4285471557 4285670737 4285275202 4285602365 4285273145 4285407300 4285012285 4284946748 4285801032 4284684605 4284620358 4284684606 4284681017 4284947782 4285538114 4285012290 4284947273 4285408338 4286657625 4289289338 4290215544 4291325566 4289883765 4289096054 4291523980 4292120967 4292318603 4292646800 4292253587 4292318347 4291990926 4292383623 4291988873 4292383609 4292383625 4291988857 4292317320 4292712063 4292318849 4292318073 4292382855 4292055432 4292055688 4292119426 4292119427 4292056457 4292118653 4292118909 4292120451 4291727240 4291727241 4292120451 4292119167 4292120964 4291857795 4291858826 4291528575 4291463040 4291856768 4291922560 4291463040 4292119165 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289809754 4290400346 4290531417 4289350746 4289676373 4290071385 4289610839 4289481037 4289544783 4289808211 4289545290 4289478225 4290462794 4290857548 4291781977 4292964192 4292704096 4293496432 4293630328 4293565827 4293630837 4293565058 4293566850 4293564015 4293501060 4293764474 4293499250 4293562740 4293624429 4293099125 4292110420 4290857809 4288560721 4287376966 4287572039 4287967562 4288360009 4288756302 4288624202 4288562000 4289282636 4289480281 4289546065 4289217620 4289413203 4289478734 4289217866 4289545296 4289543504 4289545295 4289938517 4289677142 4289742417 4289282133 4290070603 4289939288 4290726995 4291251795 4291252313 4290793815 4289941330 4289415498 4289477451 4288819529 4290200400 4294368693 4293769608 4293443216 4293702786 4293700992 4293771925 4291124829 4290734188 4293295212 4290795613 4291121744 4290994799 4291123576 4290270047 4290537333 4291323003 4291584862 4291521919 4289946498 4290995327 4290928222 4289679977 4289880972 4289883529 4290079368 4288634503 4288893315 4288701337 4289814404 4288759922 4286527084 4285407826 4287971181 4285868892 4287317100 4287315815 4287778680 4287255441 4286000223 4284292163 4284422747 4284225096 4284157253 4284749393 4287520648 4287979396 4284091972 4283961669 4284879941 4287586452 4284547901 4284227400 4285340227 4285342545 4285867362 4287187570 4287778206 4287187839 4287386514 4286129250 4288048807 4285938050 4285606500 4287389854 4287322503 4289291655 4289819024 4287585686 4288766088 4291932340 4291994796 4292654241 4292914849 4292195742 4292719007 4292130220 4291539373 4292784532 4292194463 4291733408 4291734425 4292061091 4291798952 4291734683 4292322452 4291732376 4291403679 4292061342 4292321435 4291932075 4292456870 4292325789 4291734950 4291538088 4292587426 4293505179 4293307555 4293767866 4293572006 4293574575 4293574819 4293700505 4292259475 4292703852 4290530388 4288691797 4287510363 4287052106 4289627298 4288170599 4286988398 4286787652 4290412161 4289428618 4289623192 4289687432 4291395975 4292581023 4293965463 4293239155 4288757065 4284287806 4284222781 4284486725 4284356164 4284291140 4284881726 4284418104 4285535808 4285603390 4284882501 4285998668 4285537351 4285012541 4285013831 4285668423 4285471811 4284750658 4284551486 4284351294 4285274944 4284945203 4285732413 4284949580 4284424010 4285146185 4285540188 4287709276 4289687932 4291065972 4290015350 4289357676 4290408823 4291200120 4292515724 4292253585 4292712338 4291925890 4292188290 4292054904 4292318088 4292382855 4292055950 4291991180 4292383624 4292318093 4292253325 4292316547 4292383112 4292056200 4292054399 4292120199 4292121224 4291659907 4292513411 4291662472 4292119684 4292120451 4292119683 4292119683 4292120452 4291726716 4291790719 4291398533 4291922046 4291462783 4291922304 4291856769 4291594110 4291922806 4291461766 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4290333527 4290334810 4289811292 4290595927 4289349464 4290331731 4290529357 4290071387 4289742417 4289347404 4289479246 4289477450 4289346897 4291054155 4291716451 4292572512 4293099629 4293496694 4292971631 4293630332 4293172857 4293630838 4293564284 4293566077 4293564789 4293500285 4293564786 4293562484 4293232751 4293098587 4292701800 4290072400 4289147979 4287375175 4287506760 4287966278 4288363600 4288755018 4289217105 4289085264 4288953680 4289348937 4289281360 4289478739 4289610825 4289413197 4289609041 4290004298 4289545290 4289349459 4289675090 4289938505 4289413711 4290531156 4290529874 4290201940 4291120205 4290072412 4290074712 4290923603 4289743700 4290791250 4289741904 4289152076 4288554320 4293832584 4294369989 4293772192 4293638018 4293834357 4293840283 4292242804 4293363550 4291123810 4291124821 4290599004 4290862950 4289874772 4289219690 4290797665 4291258211 4290865025 4290864742 4289940072 4290335315 4289152358 4290798466 4292045163 4291979628 4291780472 4292045961 4291195767 4289092993 4287907950 4285014612 4285867090 4287248998 4285342550 4287642477 4287379304 4286725996 4287188094 4286856543 4285674332 4285080916 4285604687 4284097358 4283500616 4285801832 4287052647 4286990976 4284882772 4284948560 4285999955 4286201447 4284418878 4284554307 4284488515 4284226887 4285211471 4284747578 4285343055 4285211978 4284421189 4284618826 4286991736 4285015634 4285935465 4286595953 4286859152 4287056770 4289433014 4288501645 4291539622 4291725986 4291995306 4292258192 4292651669 4292127638 4292127398 4292326815 4292456858 4292389019 4291926427 4291731094 4292649625 4291144102 4291863959 4291990672 4291930005 4291995285 4291864483 4291798166 4292321694 4291799454 4291209126 4291667110 4292062628 4293178540 4293440944 4293243824 4293637801 4293179562 4293571753 4293574318 4293574318 4293573556 4293703093 4293300615 4292501607 4289870411 4287183955 4286392929 4284751668 4289886868 4287051857 4286003817 4286464101 4290151068 4289558920 4289492872 4290740626 4292646806 4292046180 4289943647 4286325578 4284023612 4284483653 4284355141 4284356676 4284288836 4284552773 4285078854 4285207864 4285141816 4285603655 4285472325 4285144126 4285603912 4285406787 4285406786 4285474638 4284814391 4284419392 4284226112 4284945721 4284487742 4285472325 4285012546 4284420680 4284882774 4286327886 4288697966 4290082156 4290146946 4290013045 4290015093 4289950082 4292447614 4291991699 4292386177 4291990653 4292384659 4292056978 4292055692 4292317831 4292383373 4292055934 4292448137 4291793788 4292383615 4292317832 4292383097 4291989128 4292054658 4292449407 4292056206 4292119943 4292121224 4292054402 4292122510 4292119938 4291728009 4291792003 4291792260 4291726468 4292120709 4292119166 4292185733 4291332741 4292251525 4291397248 4291791223 4292119165 4291527047 4291528831 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4290333527 4290335065 4290465123 4289808727 4290071128 4289940307 4289611095 4289676880 4289938261 4289610832 4289283146 4289086286 4289543249 4290728014 4291321951 4292439111 4292772210 4293100652 4293431923 4293564290 4293237634 4293172084 4293566076 4293565563 4293566594 4293565820 4293565304 4293564281 4293689965 4292705635 4292176484 4291319120 4288625996 4287376967 4287572039 4287312202 4288556872 4287575118 4288691792 4289016650 4289807952 4289413203 4289611087 4289413196 4289545296 4289610834 4289347666 4289609039 4289740883 4289545295 4290004048 4289609805 4289872975 4289741397 4290724941 4290859099 4290660172 4290663003 4291384410 4290073430 4290596179 4290005586 4289676876 4288953936 4288556623 4293763958 4294104227 4294104487 4293574548 4293638788 4293572754 4293372788 4291914086 4290337372 4291322489 4291128185 4289547091 4289348178 4290337636 4290537854 4291322485 4291060339 4290797922 4289811317 4290073449 4291588720 4292374904 4291717493 4291190634 4289547391 4288759377 4292375421 4291323771 4289220477 4286195541 4286065513 4285346142 4284750677 4285212237 4286127195 4286593633 4287384702 4286922352 4286066284 4285342540 4283766084 4283963475 4285145168 4285805412 4285474909 4286658411 4287515770 4286466178 4285146701 4284027196 4284618318 4284748092 4284748606 4284813628 4284488258 4284555340 4284356155 4284487740 4284157250 4283565127 4285215854 4285671516 4287583864 4285678193 4285080953 4286205059 4288175246 4288247198 4289493641 4290745240 4292125069 4292784799 4292122775 4292390299 4292127654 4292849570 4291732898 4291534994 4291403422 4292252040 4291277226 4292649355 4291533721 4291930260 4292322474 4291928476 4292061074 4291403425 4292061846 4291794824 4291602098 4292983972 4293440175 4293706158 4293241769 4293245356 4293570475 4293571765 4293573284 4293572785 4293572786 4293573031 4293574305 4293303942 4292901753 4290856525 4289018444 4286656082 4285209673 4285999955 4288174464 4287907938 4284618062 4289558915 4289753241 4290477701 4290478489 4291135367 4291193964 4290073179 4287834697 4284221501 4284549190 4283896631 4284091967 4284484925 4284683070 4284881732 4285667908 4285275460 4285735753 4285669960 4285079370 4285535802 4285211209 4285013830 4285143613 4285077056 4284354106 4284614963 4284619328 4286194254 4285471299 4284488256 4284752723 4286129483 4286987879 4289819515 4290869378 4290474612 4289292909 4289880181 4291066238 4291398532 4292843149 4292319108 4291989901 4292384899 4291990909 4292383117 4292384644 4292059527 4292054665 4292055925 4292120713 4292055950 4292384396 4291990406 4292382855 4292054664 4292055432 4292448382 4291990670 4292447875 4292055432 4292121479 4291990664 4292447618 4292121480 4292119674 4292120197 4291725182 4292120965 4291725184 4292184950 4291790719 4291856511 4292185217 4291659645 4291331453 4291725181 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4290399063 4289939543 4289875802 4290530391 4289349464 4290201429 4289415251 4289938261 4289479759 4289610832 4289479245 4289542478 4289084742 4290792789 4291779155 4292637534 4292772208 4293362024 4293431930 4293563260 4293631868 4293628273 4293564284 4293565819 4293565563 4293565820 4293565303 4293562489 4293035635 4293097064 4292636246 4290596434 4289345352 4287309639 4287441223 4288689226 4287181388 4288820042 4289414227 4289215568 4288888143 4290069845 4289806161 4289349458 4290003796 4289545044 4289808215 4289217620 4289806418 4289806419 4289086793 4290068563 4290201426 4289349710 4290399829 4289873231 4290663261 4291254356 4290072412 4290857041 4290205537 4290333774 4290200912 4289281869 4288554827 4293238151 4294171574 4294037666 4294101907 4293770631 4293705083 4293757799 4290926684 4291126374 4291124827 4291190875 4290664311 4290073975 4291518832 4290535542 4290861655 4290141548 4290073191 4291455609 4291982700 4292570230 4291585379 4291452269 4291455365 4289743964 4288239216 4290206819 4288889430 4288691031 4286722132 4286002544 4285605201 4285209685 4284946005 4283830616 4286525800 4286396511 4286461280 4285933660 4286791793 4285673060 4285278289 4284289364 4287055487 4284024397 4286070401 4287914380 4288436105 4284882517 4284024651 4284683572 4284622159 4284419899 4284424267 4284685122 4284884559 4284353859 4283898176 4283698759 4283827764 4285938535 4289616260 4289090932 4287642466 4285610099 4287789493 4288841640 4290156447 4291927451 4292514441 4292126624 4292127131 4292127901 4292128947 4292456856 4291340447 4291402652 4292648591 4291859593 4291403165 4291864481 4291732136 4291799960 4292325538 4291928467 4292189325 4291797678 4291865250 4291465875 4291863467 4293244064 4293308320 4293638578 4293508526 4293573286 4293571752 4293573298 4293574573 4293572786 4293507249 4293573029 4293572258 4293571999 4293699729 4292836983 4291446872 4290068303 4287574346 4285539667 4283302972 4286266455 4287910510 4286787161 4286987865 4289821328 4290080888 4290678683 4291921798 4292049271 4290139228 4286190915 4284619582 4283829054 4284549190 4284681021 4284355660 4285207354 4285668936 4285277772 4286062403 4284814139 4285933389 4285930816 4285868622 4285540430 4285733958 4284618813 4284486975 4284486969 4284419657 4284419891 4285077565 4285274172 4283898700 4284948039 4285737304 4288763254 4290602611 4290540660 4289228921 4290404974 4290212213 4291396986 4292186245 4291990404 4292318605 4292384914 4292252043 4292383374 4292319364 4291990668 4292055429 4292449159 4292055951 4292055176 4292055935 4292382600 4291991168 4292384399 4292055934 4292120712 4291989639 4292448904 4291593588 4292121993 4292054402 4292842631 4291990151 4292118672 4292121481 4291725182 4292120708 4292120452 4292120700 4292120710 4291792261 4291792517 4291790976 4291856768 4291922561 4291724671 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4290008156 4289348951 4290005592 4290530391 4289414743 4289941595 4290071129 4289413959 4290133838 4289545290 4289347153 4288952653 4289020499 4290269527 4291190108 4292636764 4293098345 4293102457 4293299058 4293237370 4293238393 4293172601 4293566593 4293566337 4293566593 4293565563 4293566078 4293564275 4293231210 4293492077 4292110955 4291319376 4288426828 4287377994 4287505738 4287966790 4287771727 4289411917 4288496463 4289085007 4288759893 4289217358 4289152085 4289871697 4289283671 4289546580 4290003789 4289217621 4289545295 4289740883 4289543503 4289480015 4289675090 4289741390 4290595415 4290201939 4291253074 4291120473 4290661968 4290730335 4290727499 4290857295 4289873999 4289413709 4288884559 4293041032 4294171818 4294036638 4294038184 4293905312 4294162036 4291119693 4290595409 4290599004 4291128187 4290075227 4290600561 4290666846 4291060598 4290273116 4289347418 4290399602 4291389811 4292178039 4292176754 4291914362 4291847780 4291062147 4290270046 4288757332 4288229449 4288823137 4286716747 4285537096 4287581315 4286265704 4284226371 4284028996 4283503943 4284159047 4284226367 4286727813 4285868892 4286067565 4285875062 4287252335 4284883034 4284027717 4286333033 4284682825 4284620126 4288306841 4289297052 4286266980 4283695924 4284422732 4284616000 4284687437 4284683586 4283829319 4284487235 4284094024 4283631420 4283434046 4285212256 4288304518 4290539632 4287440467 4288430949 4288176553 4290221230 4290279817 4292194465 4292784789 4292585630 4292718483 4292062629 4292719271 4292720544 4292193959 4291799201 4291859851 4291595667 4291468708 4291665307 4292517014 4292259494 4291800738 4292059281 4291267982 4291465351 4291665294 4291924628 4292913821 4293506212 4293704617 4293573032 4293574062 4293772212 4293506981 4293573043 4293572773 4293574319 4293506981 4293772456 4293506737 4293509041 4293570208 4293567883 4293298310 4292107864 4289739855 4287836233 4286062663 4284289603 4283697979 4287715699 4286723937 4286458461 4289886865 4289950356 4290475395 4291659396 4291590273 4290399827 4284552261 4284748349 4284289341 4284680516 4284160069 4284815933 4284682042 4285141814 4285801547 4284684866 4285802314 4285339200 4284882245 4285344334 4285537604 4285143356 4284488773 4285013318 4284157760 4284681523 4285404730 4285342540 4284685380 4284159039 4285011018 4286595688 4290079602 4290477689 4290936952 4290014325 4289226608 4290345591 4291265929 4292121472 4292383882 4292382585 4291728762 4292777359 4291727995 4292383352 4292384917 4292054911 4292056705 4292383610 4292382843 4292383612 4291990409 4292383355 4292317817 4292384143 4291793787 4292383625 4291988872 4292450433 4292053635 4292121736 4291662216 4292120194 4292120450 4292120452 4292118910 4292121482 4292120452 4292118910 4291726725 4292119166 4292184960 4291725431 4291594111 4291920499 4291527559 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289416805 4290661718 4289544788 4290072410 4289416282 4290661463 4289414999 4289808740 4289283659 4289676369 4289085517 4289217357 4289214286 4290266951 4291453027 4292638301 4292770670 4293166450 4293037941 4293630587 4293563778 4293566075 4293565563 4293565819 4293564027 4293566076 4293565558 4293561977 4293689963 4293033330 4292372560 4290661455 4289214281 4287900743 4287443015 4287245383 4289018702 4288232016 4289413714 4288953935 4289741908 4290004053 4290133834 4289479765 4290135635 4289479508 4289545044 4289610837 4289872975 4289872969 4290398037 4290002770 4289741646 4290464596 4290267731 4290267993 4290663003 4291124567 4291189342 4290596697 4290664799 4290726482 4290334043 4289675340 4288950086 4293170040 4294171046 4294037681 4294035320 4294237874 4293229398 4289675344 4290200659 4291387744 4290598746 4290796901 4290732388 4291453041 4290669171 4290331727 4289615214 4290996337 4291783019 4292702072 4291193452 4292175722 4290337122 4291190615 4290670204 4287045453 4284679228 4285799999 4283763523 4285347172 4286726751 4284684610 4283763014 4284751171 4284423232 4284094557 4284093256 4286857318 4287055990 4285538129 4286198882 4287189895 4284357457 4283634759 4286396530 4285604434 4283368251 4286203019 4288180897 4289428914 4285341776 4284159025 4284091460 4283962428 4284748357 4284747581 4283108412 4283697207 4282910790 4284488011 4290345086 4289226872 4288171139 4287969358 4290743457 4290221221 4289236396 4291136428 4292523418 4292127897 4292652692 4292194973 4292654254 4292195242 4292326059 4291603609 4292187799 4291859081 4291858564 4291924359 4291663767 4291534736 4291998631 4291798687 4291665060 4291200134 4291596710 4293369997 4293045156 4293765533 4293243300 4293245611 4293638567 4293180329 4293573806 4293574062 4293574320 4293572000 4293506993 4293508526 4293508013 4293706419 4293706407 4293507751 4293570229 4293628287 4292238178 4290461515 4289475145 4285340994 4284552772 4284091970 4285471555 4287513449 4286065491 4288310139 4290149531 4290612641 4292117628 4291726486 4287703364 4285274178 4284292935 4284292173 4284618820 4284815933 4284421446 4285731387 4285734732 4285468984 4285606480 4285865280 4285211723 4286393930 4285604422 4285932875 4284752459 4284748094 4284682809 4284553280 4285011520 4285143359 4285470007 4284091714 4284488279 4285014597 4288236908 4290017402 4291328885 4290474869 4289228921 4290277236 4291659385 4291988096 4291856512 4292119166 4292055689 4292450709 4292253053 4292384141 4291990159 4292187258 4292384128 4292055686 4292055176 4292055177 4291859320 4292055944 4292383625 4291989639 4292384397 4292318088 4292317818 4292056192 4292055945 4292054658 4292121225 4292118652 4292120457 4292119683 4292120452 4292120709 4292118653 4292119684 4292120709 4292119684 4292120965 4291331455 4292513409 4292119671 4291593610 4291528313 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289546070 4289416282 4290072666 4289416026 4289613146 4289480536 4289807701 4289283670 4290003791 4289610576 4289348682 4288954193 4289346122 4290859601 4291190107 4292702316 4292771421 4293166444 4293495678 4293172103 4293563764 4293564540 4293566076 4293565563 4293566076 4293564283 4293565571 4293561974 4293234301 4293032027 4292636263 4290138453 4289215306 4287246666 4288029255 4288425543 4288230476 4288756557 4288759378 4289217106 4289478737 4289413201 4289349464 4289545043 4289677143 4289872723 4289676887 4289479501 4290068562 4289282130 4289479764 4289807188 4290136407 4290004822 4290529104 4290202706 4290727256 4291121746 4290531162 4291123029 4291121490 4290596950 4290792531 4289740619 4289476703 4291849820 4294304197 4294038179 4294036624 4294100375 4290595907 4290201422 4290333012 4289808470 4291387743 4290137442 4290206308 4290731367 4290397774 4290074482 4291782750 4291452531 4291321694 4290531668 4291259521 4291649882 4290794098 4291126901 4290536321 4286007142 4283895618 4284154439 4285079628 4286860657 4285930567 4284093762 4284750147 4284616259 4283830855 4284750911 4284027720 4284752736 4287317107 4286068083 4285932112 4286595699 4286199903 4284024632 4286335106 4284819029 4283631166 4284026189 4286530173 4289301169 4287321243 4287713680 4288108936 4284818774 4283499572 4283240775 4283435327 4283107655 4284156221 4290478467 4292841354 4288494698 4287907166 4291137191 4293176223 4291135370 4287915681 4290093477 4292982439 4292255126 4292260765 4292129714 4292589745 4292656300 4292128673 4292582027 4291598229 4291465863 4292120719 4291662737 4292059555 4292127393 4291933345 4292126354 4291923586 4292775050 4293238924 4292973708 4293306013 4293241763 4293310112 4293244846 4293571754 4293572774 4293706664 4293508271 4293574050 4293508271 4293706418 4293706162 4293640369 4293640112 4293640370 4293706677 4293571478 4293302929 4292376182 4290133317 4288561746 4286979909 4283500605 4284552522 4284748104 4287710303 4285473879 4287711066 4291138458 4291134101 4291665828 4291592071 4286521154 4283961674 4284813884 4284225607 4284746550 4284487239 4284814648 4285207865 4285930052 4285932100 4284685122 4285865547 4285933386 4285145674 4285867594 4285997901 4284420918 4284553280 4284946491 4284615732 4285601344 4284947526 4284684349 4284556108 4284816452 4286852698 4289226094 4290936953 4291263093 4290081398 4290340721 4291003011 4291462781 4291528576 4291134074 4291331454 4291856511 4291726467 4292448648 4292384397 4292385155 4291991699 4292319121 4292384397 4292055940 4292120712 4292055169 4292054409 4291793270 4292448649 4291988098 4292317321 4292385159 4292054151 4292055175 4292448904 4291660674 4292448132 4292120451 4291726468 4292120708 4292120195 4292121482 4291726468 4291725182 4292120966 4291725182 4291856768 4292119424 4291725687 4292052864 4291658627 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289741909 4289547611 4289612119 4290071127 4289546072 4289742165 4289283414 4289807696 4289546581 4289414737 4289283153 4289345613 4289152329 4290529111 4291059800 4292702299 4292837745 4292970357 4293236087 4293629051 4293566332 4293564539 4293564283 4293566594 4293565563 4293565820 4293565558 4293561727 4293429610 4293101688 4292371810 4290073437 4289480278 4287310662 4287375431 4289083213 4288164940 4288755789 4288757331 4289085007 4289086034 4289610580 4289807952 4289938260 4290068305 4290002768 4290201942 4289676887 4289479501 4289545300 4289938259 4289807187 4290070614 4290070358 4290464342 4290858841 4290201940 4291119697 4291125345 4291124056 4291121490 4291120985 4291187034 4290004306 4289478224 4290332745 4294300848 4294038434 4294106031 4293304174 4290985289 4290203479 4290267730 4289744219 4290266709 4290207841 4290335321 4290928227 4290010484 4291520106 4291255647 4292111482 4291849323 4288888162 4291125360 4290466904 4290664536 4290531433 4289153379 4287642451 4283893317 4284747588 4287120229 4287712381 4284026179 4284156223 4284026179 4284882760 4284619842 4284488266 4284487751 4284094534 4284883792 4287318130 4285999455 4285671254 4285869674 4284948320 4286336104 4286064237 4284421210 4284685142 4284885329 4289961410 4285209158 4285140791 4284686923 4284617276 4283240782 4283435315 4283303730 4282975800 4290085255 4292776578 4290465108 4290006889 4291267740 4292982689 4292710016 4291794592 4288375444 4289561263 4292130231 4292520855 4292713359 4292590516 4292720024 4292259993 4292452767 4291271332 4291857534 4291925406 4291662225 4291467168 4291799455 4292459179 4292190608 4291787401 4293234319 4293433227 4292975006 4292978063 4293700255 4293243811 4293243826 4293638566 4293573030 4293506994 4293706419 4293706419 4293508014 4293706419 4293706162 4293640112 4293904826 4294102976 4293772213 4293970877 4293507499 4293633662 4293034367 4291380818 4289804877 4287637832 4284613690 4283699005 4284289610 4286064709 4287576168 4286261327 4291203494 4291069853 4292058801 4290936186 4285469509 4285141304 4284619326 4284548676 4285013573 4284748855 4285077566 4285274946 4285209152 4285340996 4285407043 4285669959 4285210442 4285933129 4285868879 4285011259 4284487239 4284812345 4284683323 4284617531 4285338937 4285470775 4284094020 4284617544 4284948324 4287711068 4289556609 4291330935 4290674553 4290340978 4290080629 4291528574 4291922303 4292052872 4291790464 4291199610 4291725181 4291331197 4291856767 4291725181 4292119684 4292054663 4292450445 4292053633 4292120968 4292055936 4292384642 4292383113 4292382340 4292054659 4292054657 4292187256 4291990143 4292383629 4292383879 4291988354 4292121224 4292054658 4292120457 4291791235 4291725182 4292120709 4292118909 4292120709 4292448381 4292054134 4292120966 4291725440 4292119680 4291987328 4291594108 4291724928 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289480787 4289546072 4290071127 4289612376 4289546071 4290071385 4290070611 4289742424 4289610317 4289480280 4289348681 4289347153 4289085523 4289742674 4291979113 4292242519 4292837733 4293429099 4293234558 4293627516 4293171580 4293172098 4293566076 4293565563 4293500028 4293565820 4293565303 4293564281 4293691248 4292705119 4292768619 4291253843 4288625231 4287377481 4287572809 4287181130 4288885321 4288624974 4288957008 4289019215 4289478737 4290070870 4289348950 4289349206 4289611088 4290071381 4289611094 4289872466 4289677143 4289938259 4289677143 4289807188 4290136400 4290070871 4290330704 4290067787 4291068546 4291122261 4290531924 4291124311 4290465884 4291450963 4291120973 4290858319 4289805904 4289803101 4293965434 4294039477 4294237612 4292509295 4290401116 4290135895 4291255639 4291254620 4290138971 4291583068 4289611101 4289480797 4292113786 4291454563 4291125596 4290991963 4290599786 4287772240 4285999949 4287380070 4287377251 4285865805 4286722114 4286921065 4285932624 4284093507 4287583364 4286592598 4284091455 4284420932 4284155712 4285998167 4284352830 4285868890 4284356166 4284685130 4284093250 4286001501 4285872748 4285473615 4285409367 4285738091 4286594687 4284818258 4284953183 4284619875 4284816468 4288908201 4285868644 4283894087 4284090671 4283172936 4283435314 4283369524 4282581054 4289027443 4292977802 4291054683 4290200928 4291794356 4293181096 4292579980 4292645765 4292775821 4289165214 4289039013 4290223783 4290942383 4291927445 4292786601 4291534236 4292193962 4291861403 4292124042 4291863719 4291270549 4291664023 4291666323 4291997850 4291987074 4291983222 4293430150 4292973435 4292976272 4293369992 4293700513 4293176227 4293637805 4293572010 4293574576 4293506982 4293772457 4293508013 4293706420 4293706407 4293508014 4293640112 4293970619 4293904826 4293838520 4294102709 4294102709 4293640875 4293570977 4293299330 4291648858 4290395469 4288426055 4285600322 4283237951 4284485175 4285209160 4286657875 4285079129 4290276991 4291334296 4292520355 4291266445 4285338686 4284882764 4285209926 4284816704 4285928263 4285341252 4285998157 4285210440 4285014087 4285602108 4285079113 4285932618 4285869132 4285409616 4285866050 4285143102 4284552510 4284357440 4284880185 4285209407 4285079624 4284818250 4284484424 4283896905 4285999184 4288765795 4291001219 4291134585 4290801010 4289619062 4291331449 4291922303 4291793282 4291790975 4291528577 4291331453 4291988096 4291397246 4291134073 4291790216 4291857022 4292052615 4291790973 4291792260 4292121481 4292120453 4292118645 4292055419 4292056457 4292054659 4292054665 4292382848 4292056718 4292055943 4292055949 4292447874 4292120967 4292121224 4292120194 4292123024 4292512893 4291661189 4292120197 4292118911 4292055165 4292119169 4291725440 4292118138 4291725696 4291789957 4292051587 4291658615 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4290331731 4289677906 4289416540 4290265934 4289482332 4289676629 4289938004 4289349200 4289414738 4289282900 4289085517 4289414474 4289019981 4290398286 4291255381 4292769648 4292377951 4292971900 4293299837 4293238387 4293629814 4293630839 4293564789 4293500802 4293764216 4293500802 4293566077 4293562995 4293036656 4293098602 4292372068 4290664029 4289282129 4287311688 4287508307 4287966277 4288230732 4289212488 4289018189 4289217106 4289282898 4289152607 4289807957 4289676629 4290201428 4290006372 4289610836 4290071641 4290068048 4289611604 4289938259 4289938516 4289413972 4290002512 4289742421 4291331195 4293302389 4290921551 4291120472 4291123550 4291122772 4291448912 4290531933 4290726220 4290334042 4289545301 4292374615 4294503881 4294171560 4292370776 4290990157 4290598494 4291124832 4291124574 4290205287 4289542990 4289482590 4291655043 4291781731 4291059829 4291784057 4290141029 4287645038 4288104558 4286918756 4286460750 4287511382 4285599035 4286063701 4287113536 4283632714 4284550204 4288244635 4285537612 4284027717 4283764287 4284292676 4286527596 4284490314 4285604679 4283962187 4284555337 4285538386 4284159043 4284948304 4285673055 4284292185 4284554054 4287714689 4286991231 4287846030 4284488258 4283959373 4287391371 4287846788 4283695669 4283239755 4283435320 4283369791 4282515512 4287780210 4293107078 4291585386 4289152103 4291988369 4292719509 4292513418 4292252808 4292316802 4292450982 4289167509 4290220205 4291736226 4290483869 4291866032 4292328373 4292589473 4292390564 4291662472 4292123555 4291992731 4292059289 4292125083 4291929248 4292117892 4292377457 4292972450 4292973702 4293432447 4292976538 4292977809 4293242021 4293240719 4293573792 4293571999 4293572774 4293572788 4293508514 4293508271 4293508269 4293508014 4293706151 4293970621 4293904826 4293508269 4294102976 4293706163 4294102723 4293838754 4293569692 4293369232 4292568684 4290854980 4289344843 4285404479 4283963971 4284221503 4284220995 4285865547 4286984281 4287119446 4290743961 4292778662 4291004803 4288035425 4284227143 4285539400 4283829562 4284816450 4285666877 4285340738 4285211464 4285406786 4285274947 4285801799 4285211466 4285801801 4285802058 4285931331 4284357445 4284159551 4284812088 4285078855 4284619328 4286127428 4284619587 4284092748 4283698752 4285805662 4289883262 4291263605 4291327850 4290342004 4290278004 4291463038 4292120713 4292120457 4292184959 4291462775 4291988097 4291528576 4291592828 4291658630 4291068805 4291199609 4291397245 4291199611 4291790717 4291724924 4291462783 4291858827 4292120709 4292119684 4292514692 4292120451 4292054665 4292056201 4291923312 4292120968 4292120199 4291728008 4291726210 4292120708 4291724924 4292121739 4292118909 4291725183 4292119424 4292119168 4292119425 4291593853 4292119681 4292447873 4292119679 4291791487 4291658629 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289874520 4290006875 4290072410 4289416796 4289741908 4289742422 4289546579 4289611866 4289677646 4289480280 4289544268 4288953937 4289411402 4290267988 4291125595 4292504665 4293164147 4293100907 4293496695 4293236354 4293632387 4293171570 4293566594 4293566337 4293500028 4293564789 4293565303 4293564012 4293298035 4293098864 4292307552 4290138715 4288824412 4287966791 4287376965 4288426066 4288232013 4289215308 4289282898 4289283155 4289808738 4289938257 4289872723 4290071384 4289349988 4290007130 4290397522 4289415257 4289677143 4289938253 4289479765 4289413972 4289872724 4289739856 4291780192 4292772962 4290136401 4291121999 4291124568 4291055961 4291057253 4291056202 4291123550 4291124063 4290725968 4290136662 4290859107 4293969295 4294435255 4292116840 4290923091 4291122773 4291121742 4291189590 4290733162 4289874778 4291258214 4291319636 4291848553 4291124830 4292113033 4292110970 4291647580 4290202717 4289615211 4288563049 4285405507 4284225855 4284554820 4283894595 4284026183 4285274707 4287585930 4285075262 4284023625 4283831098 4287183994 4285144638 4284686416 4285472851 4284158783 4284883013 4285081428 4283960393 4284552265 4285737045 4285341001 4283962450 4286330458 4288371355 4288838823 4285871218 4284616266 4284688468 4288315306 4283498549 4283304243 4283435321 4282515522 4287318121 4292846466 4292110950 4290270556 4291593354 4293047468 4292842383 4292982179 4292057755 4292122001 4292713632 4289429652 4290090160 4292583305 4292059814 4292193697 4292262578 4292262332 4291797911 4292122519 4291729558 4291992722 4291795353 4292056972 4292116077 4292968309 4292706956 4293365626 4293367950 4292973458 4293371036 4292978065 4293703591 4293176244 4293572254 4293572021 4293574576 4293574050 4293508272 4293706408 4293706163 4293706164 4293640359 4293904816 4293904570 4293904826 4293838519 4294036927 4294036915 4293574580 4293508266 4293698191 4292572024 4291119180 4289080134 4286782535 4284878134 4282976563 4284614718 4284421442 4287053672 4285668694 4291992483 4292122261 4291662223 4287445082 4284423498 4284423496 4285018718 4284224570 4285078854 4285209929 4285407050 4285538381 4285932874 4284818253 4285867593 4285738061 4285867851 4285536316 4285078598 4284550712 4284487746 4284944689 4285538118 4285472068 4284815680 4284223043 4284486723 4287841888 4290540920 4291134329 4291198071 4290078579 4291331450 4291856255 4292123271 4292120704 4291726469 4291922812 4291462784 4291528576 4291594112 4291594111 4291396988 4291659905 4291265403 4291265403 4291462525 4291464068 4291199610 4291396989 4291331197 4291594112 4291528575 4291856511 4292119423 4292513658 4292056459 4292121735 4292121735 4292119426 4292120456 4292120451 4291726724 4292118909 4291727755 4292119167 4292119424 4291725440 4291790967 4291791233 4291987838 4291922292 4291594110 4291790215 4292052591 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4290660949 4289939799 4290070871 4289676373 4289546585 4289740624 4289742417 4289544788 4289217359 4289546066 4289151053 4288953936 4289349453 4290463831 4291712847 4292310382 4292770137 4293362288 4293235326 4293237371 4293236857 4293238137 4293566081 4293370229 4293564789 4293567110 4293566849 4293563007 4293560939 4292770146 4292111460 4290861153 4288824410 4287246677 4287378250 4289017170 4288229972 4288690782 4288693583 4289348692 4289807957 4289742422 4289479507 4290069842 4290071384 4290004050 4289741651 4289807187 4290068304 4289807189 4289872717 4290397780 4290070614 4290334035 4290597975 4290400602 4291187546 4290534753 4291121497 4291386717 4291385938 4291059298 4291122259 4291056979 4291125600 4290858071 4288822108 4292705638 4294637506 4293304449 4291120726 4291124055 4290597212 4290004049 4291188825 4292174434 4291322471 4290930023 4291057258 4291916160 4291584878 4291713394 4289086812 4290005864 4286782530 4284814148 4284095301 4285213534 4285865550 4283501378 4284419139 4283893817 4287912840 4284750405 4284159298 4285144136 4284949843 4284290373 4285672543 4284223044 4284490570 4285667415 4284818513 4284292164 4285736791 4284884561 4283828035 4285934435 4286922627 4286859387 4286066777 4287648396 4287253912 4287318400 4290357952 4285871465 4283106095 4282712894 4286197329 4292187273 4292636512 4289744476 4291195526 4292787883 4292908679 4292846999 4292521867 4292651951 4292714901 4291866790 4290284451 4289499044 4292384395 4291796106 4292655023 4292723387 4292918954 4292188571 4291928474 4292123032 4291793288 4291465362 4292444281 4292968569 4292708242 4293429118 4293301115 4292975506 4292971666 4293304198 4293240222 4293569197 4293572777 4293570477 4293572021 4293572774 4293574052 4293508271 4293706151 4293706165 4293640358 4293640371 4293772469 4293904569 4293838776 4294036926 4294036669 4294036671 4293904815 4293443251 4293633933 4292902776 4290790224 4289279563 4287702601 4284354360 4283107399 4284091452 4283830600 4287379545 4285209937 4291534500 4292057762 4290743449 4288561243 4285668422 4284424011 4284750662 4284751689 4286064204 4285143101 4285012805 4285540430 4285865801 4285867850 4286128967 4286129479 4285472837 4285472836 4284617021 4284750399 4284618814 4285340740 4285272629 4285275720 4283569471 4284093248 4286260819 4288046722 4291460213 4291330156 4290212471 4291258991 4291068536 4292579977 4292187517 4292055937 4292120967 4291726214 4292186235 4291856502 4291528576 4291528576 4291594112 4291396989 4291462782 4291265401 4291134343 4291199609 4291528319 4291396980 4291462783 4291199095 4290413437 4291462525 4291462269 4291332483 4292250494 4291792004 4292187785 4291792003 4291859337 4291792002 4292054672 4291790974 4291790719 4292185216 4291725440 4292185216 4291725441 4292185216 4291594109 4292052866 4291789429 4291987065 4291789943 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289940056 4290006874 4289416283 4290071378 4289742166 4289347409 4289479502 4290005336 4289283145 4289149520 4289151821 4289345614 4289415239 4290004311 4290994267 4292568151 4292836720 4292970607 4293430140 4293630082 4293629300 4293632130 4293632387 4293172860 4293565565 4293369710 4293565822 4293630582 4292969600 4292835673 4292703080 4290139477 4289214806 4287903060 4288033363 4287773270 4288364621 4288627277 4289546337 4288888141 4289676372 4289545043 4289546329 4289481049 4289872466 4289611350 4290070614 4290136150 4289611350 4290201942 4289611351 4289741395 4289940314 4290659667 4291187281 4291126380 4291121232 4290531161 4291123293 4291388255 4291253849 4291320923 4290993503 4291581017 4291647331 4290467918 4291186263 4291054406 4294365338 4293967523 4291581773 4290994267 4291121748 4291183960 4291587689 4291518562 4291060057 4291651966 4292110202 4290927698 4291324005 4288822091 4289217874 4287573581 4284815957 4284816708 4286133604 4287516536 4283566896 4283894599 4284026693 4283893827 4286859128 4286726262 4286393934 4285409634 4283962936 4285277270 4285345629 4284288837 4284947782 4284950611 4284945733 4284489287 4286397804 4285537625 4283960388 4284156989 4288505251 4285739102 4286657128 4285606241 4283762510 4283566137 4289764279 4284884068 4282646569 4285406289 4291531132 4292377973 4289811049 4290601850 4292522394 4292974986 4292449167 4292912780 4292588981 4292195482 4292716963 4291931816 4290346907 4289233563 4291859343 4292386965 4292589228 4292985526 4291799709 4291792775 4291596685 4291926166 4291992204 4292639361 4293034115 4292511619 4293496696 4292974228 4293369227 4292973986 4293367949 4293238414 4293634977 4293570975 4293570480 4293575333 4293573030 4293572776 4293574051 4293508527 4293706165 4293640358 4293838254 4293838264 4293772469 4293904570 4293904569 4293838776 4294036669 4294036669 4294036929 4293838497 4293505967 4293755523 4291778386 4289807955 4288489799 4285730106 4283567680 4283960141 4283699516 4285144144 4286065748 4290080396 4292452504 4291529879 4289089380 4285932620 4284224826 4284095299 4285209669 4285734471 4285605455 4285013316 4285406528 4285605966 4285013062 4286194503 4286131787 4285342795 4284751689 4284291141 4284749886 4285078598 4285076795 4285343828 4284685893 4284355142 4283961924 4287843429 4290738553 4291527300 4291131765 4290343798 4290540405 4291396988 4292123285 4292055422 4292121216 4292122774 4291991148 4291728529 4291792778 4291857029 4291922046 4291528320 4291528575 4291528574 4291791502 4291396988 4292053633 4290808189 4291659649 4291330938 4290479230 4291002758 4291659645 4290676609 4290870401 4291330938 4291462524 4291594112 4291396732 4291528318 4291923846 4291856510 4291790976 4292185215 4291199869 4291922560 4291790976 4292185207 4291593853 4291463040 4291594109 4292118392 4292053117 4292116093 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289806930 4290071128 4289480536 4289939541 4289546329 4289742422 4290070100 4289742423 4289478477 4289151565 4289151566 4289346382 4288819531 4290071118 4290993754 4292768365 4292639837 4292969067 4293694851 4293236351 4293238406 4292910448 4293236867 4293435764 4293566335 4293566595 4293564528 4293561720 4293363569 4292838000 4292241766 4290204509 4289282634 4287311444 4287377480 4288557124 4288168034 4289216078 4289019213 4289217106 4289480278 4289610323 4289678425 4289938003 4289611350 4289741395 4290726485 4289940313 4289611094 4290201686 4289545558 4290201943 4289413967 4290268506 4290594897 4291717224 4291447378 4291125345 4291056723 4290927968 4291517020 4291517020 4291583077 4290994264 4290993760 4291645271 4291449439 4291254116 4292771679 4293832570 4291450705 4291057758 4290789968 4291520871 4292109921 4292177784 4291452532 4291388776 4291456618 4290998409 4290728809 4288755808 4285272377 4284028230 4284945512 4284489553 4287256727 4286398571 4283957317 4284092992 4284158539 4284089415 4284160579 4288110478 4284882762 4283828550 4284225856 4286926205 4284818256 4284943686 4284882758 4285142107 4283829574 4285281635 4285998928 4284884561 4284419414 4284488261 4285938539 4283434812 4286268021 4285011268 4283107138 4283367485 4285881460 4288504991 4283629625 4290544774 4292706929 4289810270 4291060326 4292193185 4292578687 4292907398 4292517522 4292520083 4292588968 4292652964 4292326563 4292062118 4289105825 4288963436 4291602601 4292261039 4292132285 4292390810 4291336610 4291923587 4291530644 4292317568 4292771704 4292969864 4293036436 4293103734 4292973475 4292974238 4292975519 4293763190 4293238668 4293303687 4293240481 4293240979 4293181087 4293569437 4293571756 4293574563 4293574065 4293506725 4293838766 4293640372 4293838253 4293640102 4293838263 4293904816 4293904570 4293838777 4294036669 4294036669 4294036670 4293905072 4293572538 4293168767 4292111970 4290197834 4289278793 4286389065 4284028478 4283830860 4284287308 4283962692 4288101473 4287843683 4292780443 4292518813 4289022562 4285075767 4284291657 4285207874 4284685640 4285407818 4285144390 4285606736 4285342794 4284881987 4285604941 4285211722 4285929792 4285210441 4285276230 4284684349 4284618815 4284748599 4285539662 4285012547 4284225091 4283765060 4285076805 4288697463 4290934645 4291266171 4291132022 4290212212 4291199865 4292186245 4292188289 4292450710 4292054911 4292122238 4291661707 4292513919 4291924344 4291662456 4291464843 4291663229 4291857797 4291857028 4291462782 4291528566 4291462784 4291987841 4291528576 4291462525 4291396474 4290937222 4291134074 4290805372 4291004788 4290741889 4290545549 4291132786 4291134589 4291921801 4291199609 4291593852 4292119166 4292052873 4291725180 4291724416 4291528576 4291462267 4291856768 4292119680 4291987328 4291856259 4292511094 4291527794 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289676630 4289480793 4289742160 4289742166 4289546579 4289610324 4289349201 4289412946 4289480525 4289348688 4289151566 4289803847 4288823122 4290398542 4291451732 4292701790 4292838000 4293165947 4293430644 4293173383 4293630578 4293630339 4293370484 4293566084 4293498997 4293565564 4293565559 4293562495 4293299310 4292772206 4292439144 4290203987 4289280848 4287312715 4287441988 4287771998 4288822861 4289150799 4288825428 4289216336 4289481057 4289349205 4290070099 4289609296 4290005849 4290135893 4289941852 4289806418 4289806931 4289611350 4290136406 4289609810 4291055961 4290332757 4290792792 4290534238 4290468960 4291055961 4291384152 4291974486 4291385691 4290990670 4291122772 4291124312 4291055444 4291058519 4291322459 4291914343 4290992450 4292508775 4290857555 4291124568 4291123285 4292569440 4292376968 4292307561 4291131283 4290209423 4290079371 4289287544 4287773009 4285863503 4284359235 4286855547 4283960121 4283564095 4286797442 4285078875 4284219455 4285545329 4284422212 4284684363 4284023359 4284488255 4287054720 4284024891 4286727287 4287315557 4284552512 4284353609 4284751683 4284553289 4284219461 4286793826 4284615509 4287317611 4284028241 4284420676 4283369539 4285409112 4287387271 4284489301 4283238198 4283303991 4283502922 4288373409 4289556348 4293367926 4290401117 4290531677 4291861917 4292908413 4292972932 4292315786 4292645768 4292586131 4292588962 4292259749 4292391592 4291867570 4290812835 4288896389 4291602608 4292394406 4292784285 4291859861 4291858838 4291462022 4292314221 4292968583 4292773773 4292971652 4292971138 4292644516 4293367687 4293303432 4293303177 4293304458 4293303945 4293239455 4293633162 4293568413 4293571248 4293572268 4293573286 4293572787 4293574307 4293574321 4293508258 4293508271 4293706165 4293706151 4293838264 4293772458 4293904572 4294036915 4294036670 4294036669 4294036669 4294102979 4293509285 4293695612 4292636538 4291051601 4289676878 4286719815 4283833421 4284354107 4283567171 4284418878 4286925165 4287247703 4291928487 4292715687 4288364630 4285210435 4286130775 4284090440 4285210180 4285343051 4285866567 4285277258 4285932361 4285933129 4285474895 4285475919 4285408587 4285011257 4284422981 4285078340 4285406786 4285340224 4285276234 4284880182 4284221250 4284752463 4286727788 4289818745 4291331449 4291262314 4290736746 4291000198 4291068023 4292122768 4291859837 4291858293 4292121744 4292119943 4292121733 4292056718 4292120968 4291792266 4291992194 4292121998 4292119161 4292121999 4291792511 4291859083 4291857797 4291856502 4291528576 4291595398 4291593596 4290545538 4290805379 4290607991 4290808201 4291592826 4290413685 4290676621 4290739843 4290936437 4291134086 4290805359 4291331187 4291133560 4291462782 4291659905 4291397245 4291331453 4291856768 4292185217 4291790715 4292118387 4291790464 4291855222 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4290136144 4290071379 4289676624 4289480794 4289807702 4289414737 4289612112 4289806413 4289610832 4289480537 4289151053 4288954450 4289347142 4289611096 4291519840 4292504154 4292442991 4293034601 4293236099 4293695864 4293172871 4293631096 4293566082 4293304693 4293763960 4293501313 4293566076 4293562231 4293429617 4293294195 4292834395 4290071900 4289215561 4287834958 4287967571 4288426566 4288165462 4288822093 4289150561 4288627790 4289678437 4289610320 4289742422 4289676886 4290071127 4290005848 4289939800 4289874777 4290726742 4289675859 4290266451 4290070614 4290268248 4290858585 4290071890 4291120472 4291451732 4291385435 4290402646 4291120992 4289875794 4291189342 4290005080 4290070360 4289678161 4290596442 4292835677 4291254604 4287704908 4290070624 4291123025 4290198607 4292965996 4291517291 4292701551 4290603410 4289159320 4289556620 4289619347 4288434527 4287378512 4283368516 4285542755 4285935967 4283434054 4282843192 4287784859 4285146964 4284750408 4286199665 4283697467 4285276746 4283895112 4284157506 4284682052 4287783323 4287649142 4285209411 4283960387 4284221754 4285145949 4284419142 4284287283 4287519132 4283433013 4285210460 4286331236 4284880981 4284882273 4283695153 4288906942 4285802066 4283106358 4283369779 4282713152 4286987352 4290807955 4290531166 4289415766 4291402411 4292978829 4292512637 4292578941 4292251266 4292120465 4292123035 4292654247 4292260273 4292194212 4292522913 4291405992 4290545559 4291537060 4292521123 4291794326 4291925915 4291593620 4292969589 4292971420 4292711570 4293298838 4293035147 4292645758 4293430411 4293303691 4293302923 4293301388 4292975263 4293238408 4293699214 4293238665 4293568671 4293570987 4293570206 4293573542 4293572789 4293573019 4293571499 4293573032 4293574308 4293508258 4293508015 4293838508 4293640116 4293772457 4293904572 4293838776 4294036669 4294036927 4293772200 4293508530 4293635985 4293098876 4290660175 4289479758 4288293448 4284551739 4283369285 4284092231 4284287033 4286789984 4286653512 4291926432 4293110952 4289157735 4285603418 4285734213 4284553275 4284684617 4285668675 4284751178 4285145158 4285539148 4285474124 4285803596 4286325317 4284949839 4284683837 4284552247 4284488517 4284552765 4285145671 4285405758 4284552516 4284158797 4285012044 4288433513 4290081925 4290871671 4290867060 4290867830 4291196264 4291725430 4292448649 4292383365 4292056720 4292119160 4292120200 4292120191 4292120711 4291791748 4291596664 4292120448 4292123028 4292055678 4292055687 4292449934 4291925627 4292119939 4291792261 4291856254 4291989126 4290873733 4290938754 4290939267 4291199100 4290545259 4291004548 4290805380 4290805370 4291462525 4290414218 4291002229 4291002499 4290936706 4290936697 4291199609 4291133815 4291461253 4292053888 4291988097 4291133818 4291659904 4292051571 4291396987 4292053122 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289611094 4290071385 4289611095 4290333008 4289348950 4289217365 4289807948 4289347662 4289413197 4289480531 4289348938 4289016394 4288888657 4290004556 4291124830 4292702313 4292641904 4293037433 4293365376 4292907911 4293695608 4293173385 4293566333 4293565307 4293501316 4293500545 4293565820 4293564792 4293495155 4292770145 4292306529 4291252561 4288953936 4287836744 4287376454 4288426057 4288822102 4288622930 4289348432 4289348693 4289610320 4289612901 4289546584 4289544784 4289481573 4289806417 4290136150 4290266194 4290202454 4290070614 4290070615 4290660432 4289808729 4290268754 4290728022 4291121494 4291058003 4291318865 4291582814 4291256668 4291975009 4291649114 4291972691 4291782238 4291384665 4291846489 4291921792 4287113289 4290402915 4292121211 4291862936 4290266706 4291320407 4291519632 4289488277 4289755798 4290011523 4290729820 4292110683 4290072428 4286387284 4284422980 4287523233 4285143630 4283107143 4282908731 4287589529 4286594165 4285014875 4283763513 4284358240 4284682825 4286068318 4285930337 4287915934 4286528868 4286131300 4284161349 4284548682 4284223803 4285540689 4283958857 4284749124 4286927746 4283695931 4284420420 4287848855 4285406034 4284156730 4286270858 4285542227 4283499571 4283700815 4282844222 4285606987 4291267971 4288825442 4287577179 4291922308 4292783250 4292512639 4292579719 4292580749 4292710530 4292054143 4291797919 4292653989 4292721072 4291604134 4292130216 4292455596 4291470227 4292063918 4291733153 4292254864 4292447095 4292445048 4293037725 4293103993 4293103245 4292646282 4293037964 4292971937 4293169810 4292975259 4293305758 4293304456 4293236875 4293632909 4293238921 4292908959 4293632390 4293569185 4293570204 4293570748 4293574806 4293573046 4293179297 4293571756 4293572775 4293574321 4293574062 4293442222 4293838509 4293838265 4293904815 4293838778 4294036926 4293838519 4293970621 4293839023 4293570968 4293033854 4291053906 4289674062 4288292935 4284157766 4284025911 4283896386 4283962699 4286328663 4286981970 4291200921 4293044131 4289883515 4286720077 4285211979 4285274951 4285540171 4285934424 4285605707 4285998153 4285081167 4285278540 4285867081 4285409102 4285734469 4284620103 4285144388 4284817995 4285208124 4285144133 4284816970 4284290368 4284026444 4285213005 4289357438 4290543223 4291328629 4290146935 4290077543 4291002745 4292184962 4292056192 4292383368 4292384383 4292055943 4292121998 4291725185 4291795087 4291792251 4291991423 4292119942 4292121213 4292450453 4292057219 4292055434 4292057234 4292123028 4291725954 4292186250 4291595377 4291987584 4291659648 4291330425 4290873477 4291461754 4290938756 4291133819 4291198581 4290085499 4290541940 4290871430 4291002487 4290805882 4290805110 4290805110 4290805893 4291133557 4290805369 4291396474 4291463040 4291986550 4291856000 4292119422 4291462524 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289740624 4289481050 4289742154 4289479246 4289613146 4289806160 4289742675 4289545289 4289543505 4289610831 4289544269 4288954192 4288954192 4289545046 4291320667 4292703851 4292837741 4293035132 4293365377 4293304694 4293564284 4293565562 4293566334 4293565306 4293501316 4293698424 4293500284 4293563768 4293101935 4292771424 4292768605 4291187548 4288626258 4287901522 4287443273 4287770696 4288230218 4289282639 4288496207 4289348428 4289677914 4289151569 4289544785 4289742944 4289677910 4290071641 4289808469 4289611350 4289611094 4290201686 4289545809 4290068560 4289874521 4290398038 4291187539 4290532693 4291054680 4291387230 4290924115 4291712855 4291582545 4290861398 4291322977 4291121484 4291123554 4291909976 4293110919 4292045904 4292699980 4293555017 4294883953 4292569443 4290729596 4288768140 4290343316 4291323524 4290664277 4291848546 4290929006 4285930819 4283699002 4285214332 4288113818 4284025662 4283566143 4283499075 4287326865 4287780755 4283761714 4283764291 4284551750 4283697477 4286197605 4287782267 4287054963 4286067549 4285473362 4284157760 4284091963 4284223298 4285342814 4284093770 4284886612 4286592612 4283564862 4284221756 4288048042 4284353611 4284090679 4287060099 4283630379 4284885106 4283765081 4284156731 4291070096 4292109418 4288425022 4290935179 4292853675 4292970877 4292516750 4292584597 4292713613 4291925128 4292052857 4292387738 4292653997 4292261281 4292325551 4292785829 4291013810 4292457129 4292326561 4292247405 4290333765 4291847793 4292639881 4291985276 4292838779 4292644505 4293235364 4293038717 4293433738 4293368205 4292976793 4293303945 4293238152 4293633935 4293566859 4293239711 4293698440 4293568673 4293567883 4293569186 4293570718 4293573291 4293571743 4293637549 4293573276 4293573291 4293573020 4293506984 4293706667 4293706154 4293706151 4293574324 4293904558 4294036927 4294102720 4293574320 4293706681 4293638034 4293300344 4291121495 4289080136 4286784330 4284876852 4284090696 4283830583 4284287043 4285277003 4285404486 4290479498 4293046698 4290476165 4286325832 4287313496 4284554823 4285935448 4285542992 4284751175 4284948557 4285735748 4285800264 4285737805 4285801543 4284421436 4284554052 4284620103 4285274684 4285078855 4285146959 4285011514 4283568463 4285275968 4287186548 4289687672 4291392114 4290674553 4290211958 4290935158 4291265660 4292119932 4292121472 4292056719 4292055169 4292056193 4292251009 4292123024 4292118398 4291990137 4291792268 4291990643 4291729041 4292054653 4292450437 4292057235 4292449420 4291859061 4292122496 4291726984 4292187019 4291857030 4291529595 4292054151 4290744184 4291396745 4290284924 4291133306 4290611075 4290479241 4291133302 4290805625 4290805635 4290805643 4291134339 4290870644 4290674050 4290476662 4291133560 4290348426 4291133557 4290934387 4291723386 4291396220 4291659636 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289546842 4289938002 4289743962 4289742423 4289347152 4289545300 4289545294 4289740627 4289938505 4289414995 4289085523 4289412944 4289082438 4289677144 4291779416 4292310121 4292506731 4292709226 4292972162 4292908940 4293631610 4293566336 4293566850 4293501316 4293500541 4293697906 4293500541 4293563000 4293495162 4292771422 4292570462 4290859089 4288691789 4287901512 4287375687 4289081179 4288232526 4288691542 4288757584 4289414247 4289217361 4290333014 4290071383 4290070374 4289676628 4289609294 4289742422 4289872467 4289742422 4289218134 4290134096 4290399834 4290268243 4290793814 4291121747 4291056733 4291842900 4290927447 4291646554 4290862432 4291648857 4292039519 4290662484 4292118930 4293905048 4292777579 4291652176 4283498551 4285073724 4285271874 4286976310 4290863978 4289293730 4289619083 4291062133 4291255640 4290726486 4291451737 4289216360 4284221760 4285675132 4286069600 4286667410 4282843185 4283500888 4284750938 4288444326 4286134626 4283564601 4284354373 4284490825 4286064990 4285935189 4285077568 4284356157 4285079629 4284485183 4284483145 4284421196 4284681794 4284490313 4284815939 4285737299 4284225104 4283957314 4285412965 4287193227 4284157247 4285278301 4287055991 4285279854 4283567422 4282975036 4288962407 4292581235 4288691032 4289943137 4292986811 4293236094 4292449410 4292583827 4292655261 4291925647 4292249476 4292116619 4292124816 4292654509 4292263099 4292263097 4292588725 4292984229 4292128911 4288103230 4287043898 4288428377 4290400867 4290072405 4291520626 4291784323 4292376689 4292113781 4292774292 4292842625 4293042077 4292975262 4293763447 4293240225 4293237903 4293633166 4293236875 4293237648 4293238407 4293174435 4293567098 4293568673 4293573545 4293574823 4293179298 4293572269 4293569949 4293571758 4293574566 4293508507 4293508260 4293508016 4293838241 4293904830 4293772213 4293970610 4293706669 4293639313 4293500823 4292904061 4290593608 4286848071 4285535040 4285142586 4284483897 4283828295 4284026683 4285798734 4286260063 4288768382 4293574052 4291133565 4286918224 4285340739 4285736275 4285801798 4285340999 4285608283 4285605193 4285410906 4286134618 4286265163 4285276236 4285668164 4284421180 4285341255 4284291652 4285603139 4285341512 4284226371 4284029513 4284818255 4288435575 4290410629 4290869621 4290737780 4290209907 4290540404 4291725437 4292448133 4292056199 4292120955 4292381567 4292121217 4291728011 4291922046 4292120436 4291792510 4291597695 4292119175 4292121719 4292121743 4291661192 4292121469 4292056462 4292121224 4292121486 4291790980 4291790710 4291922038 4291529863 4291528053 4291595399 4291659645 4291004806 4291790719 4290414211 4291198839 4290742670 4291265412 4291133816 4290742142 4291003014 4290674050 4291133302 4290348159 4290279809 4291133825 4290411125 4291068547 4290739830 4290998911 4291068279 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289740625 4289938259 4289479250 4289807958 4289546579 4289742423 4289740369 4289874520 4289742418 4289412946 4289544780 4288953936 4289086286 4290070091 4290928473 4292767850 4292575086 4293624942 4293629303 4293628288 4293565818 4293566336 4293501315 4293763958 4293500546 4293501317 4293564789 4293564786 4293297771 4292772467 4292372062 4290664287 4289282636 4287246672 4287510356 4287837255 4288364377 4288754759 4289149269 4289151567 4289283155 4289151571 4289546328 4290071383 4289415255 4290333794 4289217620 4289939798 4289479251 4289676630 4290006106 4290004048 4290595408 4290332759 4291186003 4291121995 4291058780 4291058263 4290927191 4291975512 4290861917 4291779423 4292039777 4294564528 4292380516 4289015872 4286455371 4283302967 4283697220 4283237962 4285144404 4290674579 4292523716 4292591282 4291974237 4289872465 4290138714 4288559435 4285007421 4284621389 4287186817 4286602386 4285473878 4283828295 4283565635 4286200942 4288646061 4285870956 4283564594 4285144400 4284680000 4284161093 4284945467 4284553803 4284686924 4285606486 4284091455 4283831110 4285474381 4284159299 4284421702 4285411423 4286264937 4285408590 4284944726 4285608560 4286859126 4285143900 4285741416 4284093263 4283106109 4282581044 4286792543 4293302917 4289479521 4289150294 4292655261 4292516997 4292910719 4292518293 4292523163 4292589735 4292249485 4291725690 4291724171 4292128679 4292196523 4292656822 4292656824 4292854962 4291140745 4288688457 4288887639 4289613936 4289744213 4289216595 4288953422 4289282130 4287771207 4288822362 4290401105 4290796383 4292966519 4292971653 4292975756 4292977052 4293700769 4293239710 4293631608 4293238409 4293698957 4293235342 4293632891 4293568420 4293567882 4293572526 4293572001 4293572001 4293568941 4293570464 4293574047 4293570984 4293573023 4293574065 4293508273 4293706143 4293838256 4293706410 4293773233 4293507993 4292973702 4292181874 4291188057 4288231239 4286128200 4285732160 4284681786 4284418363 4283960637 4284089418 4285211715 4286526316 4287318119 4293640119 4291658886 4289221493 4284947525 4285142597 4286329944 4284949832 4285342279 4284882764 4285867080 4286198091 4285211211 4285732922 4284552764 4284291404 4285078082 4285276743 4284423237 4285472073 4283766853 4284224582 4286722136 4288438902 4290934901 4291263604 4290542213 4290013044 4291200121 4292185734 4291991425 4292448386 4291595901 4292449158 4291660165 4292119669 4292120452 4292515196 4291726471 4291791997 4291792253 4292119668 4291332485 4292120442 4292120971 4291924854 4292121473 4292121225 4291990903 4291858046 4291528321 4291528319 4291925380 4291921780 4291529863 4291659390 4291595654 4291725182 4291005062 4290873215 4291398539 4290805636 4291528583 4290739833 4290541940 4290479755 4290673783 4291133826 4290476660 4290805635 4290280065 4290608502 4290345090 4290934644 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289676624 4289218658 4290137176 4289283414 4290003539 4289742423 4289481300 4290068043 4289676882 4289808211 4289085517 4289217357 4288886605 4289938510 4291386467 4292505693 4292837998 4292970109 4293234550 4293562497 4293566849 4293566337 4293566847 4293500543 4293763440 4293501315 4293567365 4293563516 4293431165 4293099097 4292766829 4290663252 4289017932 4287967056 4287441743 4287903062 4288363347 4288755541 4288891476 4289151056 4289677152 4289807957 4289480533 4289676629 4289742165 4289415256 4290071385 4290005849 4290136151 4290530382 4289675854 4290331470 4289808987 4290268242 4290727256 4290600290 4291122259 4291450970 4291254105 4291255393 4291388264 4290994012 4291518560 4294031229 4292054917 4287639624 4285732933 4284881214 4284090186 4285271358 4289354360 4291137451 4293894518 4294024031 4291581017 4287442505 4287310672 4286721105 4285143384 4285148249 4286596979 4288576431 4283105332 4283370327 4284687211 4287515784 4288512403 4285411939 4283761460 4284027714 4283630150 4285016146 4285676649 4285281375 4284093242 4285675623 4285013832 4284028986 4284948057 4284354869 4283960896 4283893572 4286526558 4287913626 4284352816 4286531719 4284492363 4285276772 4285478248 4283829053 4282976069 4285539662 4292119925 4290994018 4287969350 4292187805 4292648847 4292974988 4292452755 4292521363 4292919715 4292720546 4291659645 4292116620 4291862163 4292719781 4292654260 4292591801 4292462257 4292052343 4290661976 4292045669 4292903310 4292639868 4292510063 4291653496 4290993778 4289942883 4288692059 4286322751 4286587972 4286519875 4287509580 4289610832 4291786094 4293299342 4293500287 4293368718 4293304458 4292978087 4293304456 4293304714 4293171345 4293631860 4293569970 4293570473 4293572002 4293573273 4293568414 4293570204 4293567902 4293570208 4293572761 4293574312 4293574812 4293575084 4293903526 4293638043 4293432444 4291786351 4290466396 4290399055 4288034633 4287769159 4286453062 4285930052 4285138489 4284484916 4284353350 4283897157 4285012298 4285408334 4286529112 4293375146 4291334552 4289552998 4284290374 4284291401 4285735761 4286851655 4285738839 4285408587 4285801802 4285604423 4285078852 4284819283 4284948553 4284749365 4284227404 4285142332 4285540172 4284946752 4284619595 4284420670 4286528358 4290343034 4291329396 4290670975 4290472816 4290080630 4291725179 4292054149 4292712065 4292318339 4292447350 4291988604 4292119941 4292120701 4291725692 4291660935 4292513142 4292119933 4291791495 4292119167 4291792517 4292185477 4291397762 4291859082 4291725955 4292122752 4291792523 4291856255 4291529852 4291528576 4291921791 4291531404 4291528053 4291595399 4291593845 4291595654 4291659390 4291660930 4291397774 4291792257 4290545546 4291136388 4290610557 4291067510 4291133559 4290673784 4290151554 4290542196 4291199874 4290277746 4290016131 4290146420 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4290726742 4290071384 4289676373 4289742422 4289546328 4289676623 4290003540 4289283665 4289874258 4289939021 4289478734 4289019729 4289019728 4289347663 4291385946 4292570972 4292836459 4293034105 4293693309 4293566587 4293565563 4293564789 4293566852 4293566080 4293501831 4293566851 4293565043 4293562755 4293692523 4292704099 4292375130 4290926165 4288690256 4287312457 4287379027 4288492616 4288297814 4288691535 4289280846 4289544786 4289217363 4289741908 4290072923 4289611093 4289676886 4289938259 4289479501 4289740625 4289479764 4289806932 4290202201 4289675854 4290398797 4290859099 4290726482 4290729047 4291189342 4290401628 4292040799 4290926939 4290796641 4291786611 4292767591 4291979108 4293562219 4290273876 4286259016 4284941872 4282976315 4283106367 4288894833 4291329149 4291909976 4287704650 4288892244 4286191168 4288103524 4287048025 4285013577 4286792838 4286599558 4285274679 4284024921 4284355917 4286335609 4287119238 4286338941 4287058300 4283170864 4283894092 4284294221 4286008178 4286063457 4284357181 4285483122 4285936730 4285675371 4283961150 4285537859 4283696966 4284288322 4283369532 4283959357 4286267252 4286924934 4286799768 4283695152 4287777935 4283896127 4283172676 4282777660 4290276982 4292646283 4289345609 4290873496 4293182117 4292709250 4292450960 4292915873 4292524721 4292855225 4291992460 4291983755 4291662471 4292191649 4292196283 4292265395 4292985011 4290930281 4290662741 4292898408 4292444540 4292970107 4292443511 4292835962 4293037717 4292905086 4292834425 4291190877 4290598506 4288756568 4288425032 4286653254 4286584389 4287373126 4288757327 4292376968 4292909182 4292972935 4293367949 4293298829 4293237903 4293697910 4293173413 4293570225 4293569945 4293571997 4293570220 4293568668 4293569947 4293573286 4293572769 4293568689 4293574561 4293764753 4293436554 4291982692 4290072656 4288362832 4287309634 4286196304 4287379026 4289286760 4289283680 4290137431 4289345607 4285993794 4285206326 4284224056 4283764551 4284685119 4286195291 4285937742 4292916928 4291856014 4290867322 4285668671 4284882506 4284817225 4285675085 4286197332 4286129222 4286131018 4285867594 4284947523 4284092981 4284555341 4284947266 4284814135 4285273655 4285211465 4285209668 4284356937 4285143640 4288432992 4290346631 4291132288 4290473072 4290079875 4290804074 4291659646 4292383363 4292710533 4291988346 4292054150 4292382598 4292119942 4291725184 4292119942 4292121475 4291726461 4292120711 4291790710 4291792519 4291856256 4291792251 4291924106 4291398019 4292186249 4291791484 4291662713 4291790720 4291858054 4291922049 4291463031 4291528320 4291989374 4291529597 4291595390 4291528062 4291529860 4291791759 4291595137 4291397773 4291529357 4291331461 4290936707 4290808204 4289888659 4291133302 4290608515 4290411392 4290214272 4290083202 4289951349 4289950839 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289676881 4289544273 4289546585 4289938001 4289481316 4290072666 4289480536 4289546586 4290068050 4289545290 4289742411 4288950859 4288954449 4289610828 4291385169 4292110690 4292903792 4292707182 4293234551 4293564540 4293566591 4293564015 4293566594 4293565559 4293566080 4293500544 4293566590 4293565827 4293494640 4292969584 4292767836 4290598238 4289412940 4287834705 4287968851 4288427091 4288232271 4288756812 4288823893 4289609809 4289610322 4289483365 4290005591 4290397523 4289611094 4289872724 4289938260 4289479765 4289806412 4289413968 4289872713 4289808729 4290070616 4290068300 4290859098 4290071122 4290726225 4291122266 4290924375 4291259246 4292840053 4292969598 4292507242 4292965997 4292773758 4289088613 4284549940 4286922600 4285541203 4281794624 4287912580 4291193463 4290406264 4288753487 4287642713 4288233564 4286455380 4284816713 4285607778 4287453067 4286201459 4283566947 4284094541 4286335606 4287914659 4284025156 4284886614 4289299384 4283696695 4283830603 4283765308 4286394214 4284947268 4283699790 4283959106 4285675121 4287715206 4285342790 4283762744 4283828532 4284551481 4284548934 4284484930 4284097361 4285808208 4288310683 4283435318 4285542751 4283499574 4282712110 4286595681 4292976001 4291518554 4290208378 4293378736 4292449658 4292908679 4292454548 4292915361 4292723381 4292064933 4291921544 4291528585 4292190353 4292196797 4293183923 4292787105 4289679430 4291384406 4292109937 4291585123 4292768635 4292702569 4291852677 4290332495 4292970350 4293102729 4292969600 4291320933 4292440671 4290460751 4289347664 4289477453 4288689481 4287378250 4288360529 4289676875 4292109436 4293367425 4292972410 4293365904 4293301133 4292841112 4293696118 4293567369 4293568673 4293571996 4293572513 4293569200 4293568412 4293571996 4293173917 4293305485 4293568406 4292444800 4289809752 4288097098 4288626013 4289548901 4289024355 4290995829 4291058793 4292441971 4291252035 4290594123 4289216336 4286192712 4286258762 4284288061 4284158535 4284287040 4286132048 4286653276 4293047199 4291661198 4290078583 4286655054 4284947268 4284422724 4286921303 4285143367 4286195270 4285671245 4285869645 4285144134 4284881730 4284685892 4284618300 4285144648 4285602886 4285670222 4285145933 4284882504 4285406797 4288634745 4290411382 4291394676 4289686903 4290209905 4291134331 4292580487 4292120690 4292319106 4292383883 4291989381 4292382583 4291858549 4292119160 4292447617 4291725942 4291790722 4292119424 4292119417 4291790968 4291790967 4292184705 4291332732 4292184695 4292120453 4291793539 4291791998 4292184952 4291858047 4291464052 4291922307 4291528567 4291528577 4291594112 4291529596 4292054661 4291529348 4291529603 4291529603 4291397774 4291659385 4291529103 4291005316 4291593594 4291200653 4290676593 4290085512 4290870655 4290477441 4290015616 4290279041 4290081921 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289545042 4289547365 4289807444 4289480535 4289547610 4289677655 4289546329 4289544782 4289808210 4289478734 4289086030 4289281867 4288951115 4289742930 4291583329 4292372834 4292444000 4293034860 4293430398 4293565557 4293500802 4293566594 4293565563 4293500802 4293500289 4293764986 4293500543 4293566070 4293101431 4292706159 4292703838 4291123294 4289083977 4287836233 4287376453 4287771982 4288887117 4288626000 4289545557 4288562257 4289677914 4290003025 4289676886 4289348179 4290071642 4289872718 4289545816 4290266962 4289346640 4290267732 4289872970 4289807178 4290266447 4290399317 4290397776 4291119956 4290072152 4291186772 4290990935 4292904818 4292904579 4292642674 4292509550 4292574316 4293625958 4292982166 4289032315 4291790729 4291656841 4287974243 4289558185 4291123541 4294019187 4289478744 4285474899 4285209924 4284029762 4285605730 4286657392 4288379831 4286460263 4286132069 4286065769 4287785895 4285738853 4282843196 4284157500 4288638610 4284686937 4284093767 4284093257 4286926715 4284486723 4283697986 4283762498 4285149031 4288243080 4286196830 4284155707 4284155962 4284483386 4284816959 4284549949 4284221507 4284221247 4284619849 4286727804 4283564076 4283041593 4284223798 4292582541 4290859610 4289679971 4292655271 4292582787 4292516238 4292451219 4292916638 4292591276 4292855224 4292716688 4291793306 4292057223 4292653222 4293316280 4291210382 4289608255 4290200143 4291513935 4290070349 4291054920 4290925643 4290990402 4290925646 4286251838 4289348685 4293167966 4291843670 4289544014 4290135895 4290331994 4291127161 4290792274 4290468198 4291051087 4290464852 4290527329 4291650655 4292769651 4292969884 4292837751 4293102215 4293693306 4293170574 4293569185 4293570201 4293570994 4293571495 4293571981 4293569200 4293571760 4293699741 4293040767 4291985029 4290991449 4289747561 4290270816 4290403675 4290862688 4288756040 4289018696 4290205007 4290003784 4287837520 4288229193 4288032842 4286259271 4286263888 4284289604 4283962431 4284094532 4286132316 4285670226 4292782240 4292120458 4290078327 4286989919 4284877113 4284881218 4285806426 4284949066 4285343053 4286262345 4285932619 4284486972 4284881728 4285076292 4285210183 4285144390 4285276233 4284619845 4284683844 4285211473 4286591574 4290015099 4291196544 4290343798 4290340712 4290602868 4291857014 4292054905 4292383111 4291987327 4292317046 4292381825 4291988097 4292447617 4292053634 4292053623 4292119172 4292120180 4291725442 4291725432 4292119426 4292119425 4291726973 4292184705 4291725941 4292120702 4292120444 4292119935 4291790969 4291462776 4291856516 4291922295 4291528578 4291528576 4291594111 4291659647 4290807941 4291660676 4291529348 4291923588 4291594881 4291465108 4290939266 4291396216 4291790977 4290873216 4290807949 4291133827 4290151552 4290605681 4290149250 4290082945 4289949824 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289610580 4289611858 4289547090 4289941861 4289939284 4289939542 4289544789 4289808204 4289151831 4289283146 4289283150 4288491851 4289081417 4289741385 4291124568 4292503652 4292902254 4293166706 4293627516 4293106819 4293764215 4293500545 4293498997 4293698425 4293698424 4293500287 4293566590 4293561980 4293037689 4293231468 4293031531 4291056723 4289281619 4287835976 4287376967 4288492361 4288165711 4289213770 4289217363 4289216594 4289610580 4289283671 4289872467 4290201943 4289741647 4289544013 4290398032 4289348682 4290462795 4289807434 4289412433 4290069069 4289742160 4289936977 4290660691 4288957276 4290599790 4290146446 4291983730 4292245347 4292446843 4292839281 4292643207 4292837758 4292969580 4293762156 4293956978 4293173639 4293499012 4291912543 4287047246 4286849600 4286192200 4283696957 4284692573 4284357213 4285278562 4286333814 4288245665 4286530412 4284682059 4287118982 4285937004 4287850635 4285342555 4283040823 4283631947 4285612649 4287057020 4283826244 4284421700 4287452540 4283829571 4283698236 4283894599 4284225850 4286662519 4287914640 4283172402 4284094016 4284552511 4284419135 4285141575 4284553529 4284748607 4283566135 4283896886 4284618344 4282646581 4289357164 4292840056 4288492883 4292254358 4292982164 4292514191 4292910475 4292849553 4292787377 4293182910 4293114036 4291604382 4292319115 4292586407 4293119172 4291469179 4288814906 4289083980 4289347660 4288951878 4289875021 4287176263 4286915911 4286980936 4286653004 4285138748 4286193733 4288687689 4285795650 4285272378 4286059586 4288624976 4291455586 4289477709 4292239990 4291191385 4291842656 4291975524 4291321440 4292439925 4292639861 4292968839 4292972151 4293296007 4293235340 4293567626 4293570991 4293571482 4293573544 4293572016 4293569418 4293634736 4293309353 4293298307 4292114806 4291061104 4291126362 4288494415 4287114313 4285534524 4285927743 4285602377 4286717256 4286585160 4286653767 4287704135 4287700039 4286984780 4285468215 4284551742 4283762500 4284617027 4287249256 4285273673 4292913567 4291664800 4289483877 4289024103 4284684612 4285076290 4286527564 4285211733 4286327881 4285211466 4285406018 4285078341 4284488517 4284684350 4284618813 4284947012 4285339966 4284424006 4283829061 4284685894 4288236653 4290738037 4291134596 4290477176 4289554539 4291132025 4291857026 4292448134 4292121720 4292383366 4292316032 4292186997 4292119161 4291659650 4292119415 4292448640 4292053615 4292053635 4292119415 4291922048 4292119417 4291790968 4291790712 4291792510 4291792255 4292119159 4291725959 4291725943 4292185209 4291397251 4292250734 4291397251 4291922295 4291922295 4291529862 4291594111 4291659647 4291595397 4291529603 4291921790 4291595139 4291398029 4291396998 4291134600 4290804854 4291136645 4291396228 4290479495 4290542466 4291134082 4290673781 4290345589 4290082945 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289610574 4289612123 4289610323 4289807951 4289610324 4289414743 4289610825 4289610833 4289872970 4289546312 4289018190 4289217618 4288555848 4289872980 4291386958 4292768365 4292442461 4292837485 4293497471 4293564021 4293500028 4293501317 4293500283 4293698940 4293500031 4293764215 4293500802 4293563772 4293496694 4293033305 4292177256 4291515986 4289281356 4287247695 4288032327 4288359495 4288230732 4288688715 4289283149 4289151821 4290004047 4290201938 4290136401 4289873493 4290265930 4290331729 4290004042 4289871185 4289216589 4290068564 4290069840 4289412945 4290263881 4289609295 4289677405 4291332770 4291204501 4292188027 4292115297 4292967278 4293164904 4292969597 4292771963 4292772445 4292904303 4292707697 4289742162 4291122264 4291789181 4287709026 4283957309 4283958852 4283237431 4283173973 4285676394 4286072947 4286922116 4287650706 4288840883 4285208150 4285473635 4287059856 4285608291 4288442789 4284752730 4283435851 4284291640 4286528620 4286005358 4284552516 4283700035 4287324286 4284288067 4283894855 4283959616 4283829335 4284291149 4288772512 4288306591 4284093247 4283893561 4284159546 4285141563 4285142324 4284090176 4283632699 4283503427 4282843187 4285411148 4292715411 4291056987 4290733435 4292987056 4292448126 4292517012 4292912526 4292785829 4293182387 4292657330 4292130210 4292652966 4292979092 4293382328 4290875748 4287371579 4287837514 4288031303 4287700809 4285599550 4286257737 4285536579 4285602628 4285664574 4285338171 4285929538 4285733187 4284552764 4284879926 4284419124 4284090164 4284743741 4286847040 4291124837 4292444545 4291845218 4291976812 4291910244 4292240496 4292374901 4292900971 4292771445 4293033348 4293101192 4293627003 4293568656 4293569946 4293572516 4293506995 4293508770 4293574826 4293310614 4293435784 4292245086 4288361038 4286652479 4285076543 4285793342 4285403455 4285601856 4285794363 4285206075 4285274173 4285669186 4285995848 4286389576 4286851655 4286590541 4284745526 4284551998 4283762764 4284287032 4286659945 4285270344 4292650397 4292650402 4288765551 4288824932 4286591830 4284027965 4285935963 4285671495 4285604423 4285737035 4285472836 4284617021 4284684350 4285274942 4284816194 4284882243 4285604940 4284226370 4283696201 4284748858 4288700539 4290937209 4291130472 4290146679 4291258992 4291068785 4292120183 4291988614 4292448125 4291594621 4292448391 4292053369 4292119408 4292119417 4291922047 4292052344 4292447866 4292382845 4292053891 4292119417 4292119407 4291725443 4292119424 4292119169 4292119933 4292119170 4291989619 4292120960 4291725177 4291922297 4291397241 4291922304 4291463041 4291528576 4291594111 4291594112 4291594112 4291594108 4291398032 4291595396 4290939012 4291725181 4291265404 4290216832 4291790717 4290805124 4290479472 4290150783 4290676352 4290084989 4290082945 4290148994 4290212992 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289282895 4289677646 4289480280 4289085265 4288957010 4289282901 4289544269 4289151565 4288953937 4289282894 4289147979 4288754764 4288165196 4289346379 4291120206 4292635990 4292443508 4293493610 4292841845 4293630333 4293500028 4293697907 4293699197 4293698684 4293698423 4293500291 4293764471 4293563263 4293230440 4293034350 4293097585 4290466131 4289347149 4287313225 4287375175 4288361546 4288754764 4288624974 4289083982 4288950858 4289413715 4289740620 4289611353 4290331471 4290331723 4289609806 4289479754 4290069070 4289545547 4289741390 4289741646 4290067018 4289149269 4289347407 4290743466 4292581767 4294500247 4293097824 4292177258 4292575328 4292444275 4292378221 4292969852 4293231227 4292314241 4291127675 4288039527 4284354121 4287251300 4287443541 4283565120 4283172928 4283106126 4286927751 4288507815 4287116146 4285609830 4288969909 4285737551 4287778956 4285739877 4286990984 4286662259 4288710588 4284422978 4283501654 4283633989 4286529392 4283564089 4286725511 4283830590 4287850153 4283960375 4283830847 4283893572 4283500604 4283631933 4285080664 4288444072 4288309924 4285672545 4282908720 4284352049 4285141822 4284814399 4283174217 4283303998 4283433012 4290741630 4291655276 4289479758 4292788659 4292910973 4292841612 4292716930 4292456086 4292851379 4292986294 4292459183 4292588206 4292588954 4292527542 4290943848 4287239744 4287503431 4287178824 4286385732 4285470016 4286190405 4285339708 4285276229 4285927229 4285206076 4285272628 4284352582 4285472841 4287316062 4287313233 4285403964 4284288562 4284484922 4284549180 4286845760 4291645277 4291719292 4291913321 4292501352 4291976806 4292437883 4292505440 4292835208 4292772980 4292968339 4293628794 4293175201 4293570219 4293508770 4293706419 4293640373 4293640619 4293635982 4291190367 4286652231 4285472585 4284618304 4285277003 4285535549 4286851141 4286717504 4285403709 4285471294 4285928770 4285801805 4285539144 4285537090 4287177802 4285730110 4285207094 4285141567 4283894583 4284029254 4286786394 4284616507 4292514956 4293044134 4289617770 4288106083 4285803592 4285736273 4285541458 4285736008 4285867851 4285406019 4284748855 4284487239 4284423237 4285208638 4284487742 4285602883 4285015116 4284292160 4284024394 4285145679 4289881203 4291659397 4290803573 4290080885 4291392381 4291922816 4292448391 4292382597 4291859066 4292119160 4292053623 4292119427 4292052348 4292448120 4291922303 4291791490 4291528309 4292119426 4292118130 4292119418 4292120192 4292119414 4292249729 4292119416 4291332734 4292184951 4291790978 4291725176 4292119673 4291790969 4291856770 4291856768 4291922295 4291528577 4291594112 4291396989 4291528059 4291398289 4291527800 4291659647 4291005061 4291462792 4290084988 4291724666 4290544766 4290676349 4290804864 4291002764 4290739584 4290476928 4290542978 4290345588 4290411394 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289151058 4289085266 4289546059 4289151059 4289216588 4289546066 4288953680 4289282893 4289085264 4288625741 4288758354 4287769157 4287705162 4289148488 4290664538 4292110180 4292901724 4292837486 4293693816 4293566077 4293500799 4293697908 4293498742 4293698423 4293501318 4293763440 4293501060 4293561969 4293694321 4292706405 4292504404 4291123552 4289542986 4287310919 4287375432 4288360007 4288689228 4289347147 4289215568 4289151821 4289283152 4289413198 4289545033 4289677133 4289216590 4289740876 4289741396 4289477968 4289806926 4289609544 4289083208 4288951883 4288751178 4292119937 4293838754 4293966228 4294231416 4291580745 4292703837 4292507249 4292836700 4293100911 4293233520 4290928223 4290867329 4289817463 4286915403 4286527830 4285930048 4283958329 4283500359 4283039801 4287525024 4288705195 4285409359 4283826222 4288443568 4284357954 4283962711 4286005886 4286924151 4286132333 4287590049 4288773025 4283898706 4283499319 4284096333 4286266735 4283698760 4285278036 4285146967 4288377760 4284489031 4284487751 4284554058 4284223286 4284222285 4283435077 4285674585 4288441497 4287190407 4287187071 4285208919 4284351547 4283763000 4283763007 4282712115 4287449703 4293172108 4288622656 4292122530 4293180581 4292842633 4292909195 4292518292 4292521361 4292591283 4293181880 4292657332 4292457381 4292986287 4291862662 4287042109 4288622407 4287114056 4286518856 4284747061 4285536831 4285206073 4285863235 4285205817 4285730116 4284550973 4285141588 4286585150 4287582327 4291276720 4291079361 4289485441 4285668164 4283891766 4284090163 4284022838 4286522697 4292239962 4292308838 4291649382 4292042594 4292700520 4292438907 4293161833 4292703882 4293361277 4293561981 4293568398 4293703851 4293838520 4293772214 4294235057 4293508502 4289939287 4284287291 4284553800 4284223303 4284621899 4285539410 4286525282 4288766855 4290411660 4288104285 4285204797 4284680502 4285600572 4285799747 4286192970 4285734468 4284812085 4286126148 4284422213 4284287807 4284616506 4286659171 4285466680 4291728280 4293046441 4289421427 4287382112 4285801027 4285472849 4286067285 4286329422 4285801290 4284816450 4285011527 4285010482 4285274431 4285143102 4285404727 4284817995 4284553792 4284291151 4283963971 4287905118 4290541689 4291656049 4291132022 4290606197 4291725435 4291595913 4292054899 4292054142 4292054910 4292054141 4292119428 4292053614 4292316288 4291856002 4291789938 4291592570 4292119673 4292316287 4291724413 4291922294 4292119424 4292118151 4291921793 4291725431 4292185217 4291725697 4291987581 4292119680 4292117380 4292119673 4291593845 4291922561 4291463041 4291725182 4291331453 4291725184 4290545799 4291593594 4290480014 4291593595 4291527545 4290674298 4291462791 4290346116 4290739576 4290805377 4290083202 4290082421 4290674037 4290542978 4289819765 4290475394 4289951092 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289085259 4289743451 4289480280 4289019214 4289019216 4289348944 4289085008 4288494413 4289150800 4288757585 4288293960 4287838029 4288359239 4289148489 4290662735 4292439659 4292900700 4292969326 4293431424 4293369967 4293566853 4293565308 4293566334 4293501831 4293499513 4293501832 4293565561 4293564286 4293297772 4292772197 4292504679 4291450194 4289281608 4287245383 4287967047 4288229450 4289214284 4288952910 4289151826 4289478739 4289610832 4289740877 4289479760 4290264144 4290069577 4289938519 4289675340 4289938762 4289543761 4289804878 4289542734 4289019214 4288751179 4293633670 4293372833 4294035852 4293293148 4290796897 4292112750 4292508252 4293099628 4293166702 4292442223 4287706470 4291851376 4290996084 4285999955 4287048534 4283040325 4283569741 4283829840 4285745272 4288113546 4285144663 4283367478 4286800026 4286463846 4282843203 4282780487 4286331248 4288574640 4287188357 4287585924 4287056247 4283633993 4283698244 4284162635 4285211719 4284154695 4283636044 4284221502 4287257978 4286268525 4284158530 4284683843 4284287814 4284552507 4284358212 4284028221 4284684864 4283697208 4285081161 4286467183 4284554314 4284220995 4282778418 4283762747 4292055177 4290927196 4289089904 4292987831 4292644981 4292516484 4292522905 4292584848 4292456363 4292986303 4292591033 4292853411 4293248697 4291930767 4286979643 4288886860 4288033870 4287043651 4285140796 4284614198 4284947524 4287510607 4285536829 4286063176 4285732939 4283236923 4285079104 4286921064 4286918739 4293245876 4293378746 4292065466 4290415257 4286455108 4285731902 4289152875 4287242819 4290992219 4292107369 4291778404 4292303715 4292043880 4292963174 4292574074 4292769638 4293363076 4293363590 4293566090 4293441971 4293904571 4294103481 4294234542 4291457377 4286059331 4284094787 4284552260 4284159296 4284093529 4286392382 4290615230 4288762976 4291601329 4291129462 4286916678 4285205819 4284156211 4285996102 4285405501 4285275205 4285470271 4285076287 4284748606 4283958328 4284685122 4287247709 4284153917 4292120197 4293111453 4289288831 4288103002 4286791520 4285933381 4286791000 4285670216 4286261066 4285276233 4284943934 4284814905 4284618814 4285015374 4284817482 4284554051 4284485961 4283897411 4285667922 4288697698 4290869369 4291593077 4291134329 4290472306 4291594109 4292119932 4292448383 4291987833 4292381815 4292449159 4291594093 4292579204 4291528308 4292119681 4292119683 4292119663 4292315525 4291461232 4291988087 4291987830 4291725443 4291987828 4291725688 4292185220 4291986552 4291789947 4291791223 4291856770 4291397505 4291856760 4291857017 4291658880 4291922561 4291922551 4291594113 4291528318 4291396473 4291462782 4291856510 4290676622 4290087557 4290739320 4290411125 4291133816 4290607989 4290279811 4290411381 4290214006 4290213251 4290278784 4290016884 4289624451 4289622660 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289414738 4289480273 4289348429 4288693331 4288627788 4289609805 4289151572 4289348429 4289346891 4288753995 4288296524 4287836234 4287835207 4288560459 4291253332 4292440154 4292115050 4293297517 4293628786 4293370743 4293565822 4293305465 4293565307 4293500286 4293698939 4293697911 4293501831 4293633413 4292969838 4292968290 4292570215 4291057743 4288888145 4287769671 4287770183 4288755276 4289082955 4289739850 4289283414 4289413196 4289479760 4289872720 4289872719 4289218386 4289545040 4289283660 4289939027 4289676877 4289611087 4289214541 4289347665 4289345612 4287634755 4290271584 4293046163 4293047670 4292919204 4292247678 4292310388 4292442475 4292968573 4292968813 4291982183 4290994801 4294023794 4288755020 4284683834 4285469266 4283304006 4284488279 4287320965 4287387268 4284481594 4283566910 4286334062 4286527065 4284685406 4283501645 4284681809 4285806184 4288707738 4286591865 4286932880 4287054721 4284751942 4283896398 4283766077 4284091209 4284354874 4284881227 4283304267 4284755796 4288443022 4285079638 4284552770 4284090166 4284549196 4284418876 4285014867 4284618052 4284156977 4284293962 4284029255 4283958841 4284621908 4286328949 4288895866 4292906096 4288885323 4292917421 4292981909 4293041274 4292652182 4292588191 4292521379 4292854965 4292985790 4292986029 4292920756 4292590745 4287246912 4290004565 4289149516 4286783558 4285600581 4284748599 4285533247 4287243333 4289746545 4287574602 4286789204 4288238448 4285272386 4285998151 4288435830 4284088363 4292656837 4292985012 4293444789 4292723129 4291393679 4287240508 4290993503 4290463827 4290329674 4291320922 4291447898 4291189604 4292501351 4292111993 4293225064 4292963446 4292967811 4293630330 4293502621 4293838776 4294038200 4294301632 4292387215 4288427331 4286979921 4285209150 4286724951 4284353341 4284750914 4286261061 4288300910 4287122540 4293046197 4291659913 4289738821 4285734474 4285008950 4285406016 4285598777 4285797955 4284880448 4285207096 4284753995 4284618308 4284552773 4287184499 4284284986 4291859101 4292519846 4290345603 4288424528 4287189371 4285799485 4286530407 4285210439 4285342795 4284686410 4285470008 4284816451 4285077563 4284814134 4284685895 4284419900 4284292163 4284423754 4286261838 4289817984 4291461995 4291391360 4290738293 4291066230 4291921266 4292448647 4291987840 4292644216 4291988097 4292053375 4292514183 4291528317 4291659647 4291791481 4292248693 4292315004 4291331187 4292185467 4291988095 4291920762 4292577906 4291462275 4292183933 4291594092 4291658362 4291988095 4291987331 4291592559 4291857017 4291659648 4291659637 4291922562 4291790709 4291134076 4291528318 4290217080 4291133829 4291134590 4291002490 4291790716 4290411395 4291133816 4290739840 4290411393 4290148995 4290082933 4289949571 4290017155 4289819508 4289492611 4289490819 4289163395 4290082419 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4290003795 4289217363 4289743450 4289085265 4289807445 4289283151 4289414216 4288560209 4288689741 4288168785 4288885836 4288491079 4287180359 4289540939 4290662993 4292503640 4292965470 4292642934 4293628029 4293565313 4293501316 4293763704 4293501314 4293697907 4293700226 4293698682 4293500541 4293563777 4293495160 4293097566 4292243291 4291843929 4289413197 4288228166 4288360007 4288755020 4288559438 4289545038 4289414988 4289545041 4290135373 4290070605 4290266448 4290136402 4289611089 4290200913 4289808727 4289806414 4289545304 4290005325 4290004815 4288164170 4284809277 4288435534 4292259257 4285270077 4288498502 4294035106 4293834922 4292970091 4292771433 4292970357 4290663266 4287114821 4287506765 4284093503 4283303496 4283764043 4283502156 4286995088 4288044922 4284356698 4283564087 4286137468 4285935971 4284027472 4286534012 4284220493 4284160334 4287124364 4288440741 4285870697 4288908458 4286594164 4283700029 4283635271 4284816203 4284488007 4284227404 4284352576 4283369802 4285142343 4289167281 4285737561 4284484672 4284486728 4284026429 4284618808 4284949319 4284353592 4284155962 4284418879 4284091190 4283371334 4283367494 4284489529 4289293452 4287181389 4290210944 4292720289 4292050819 4290740859 4291464868 4292125089 4292525488 4293051839 4292264373 4292788662 4293117345 4289548133 4289676885 4291451996 4289809247 4289215053 4288689748 4286060612 4285729087 4288293712 4288891729 4290145404 4285601093 4286659676 4288170084 4287447648 4285597738 4288702635 4292924615 4293380031 4293445050 4293839547 4293174933 4288953184 4288885071 4291782245 4289802569 4291120722 4291055198 4292039266 4291452003 4292109158 4292963175 4292114553 4293693319 4293365379 4293505194 4293772725 4294102979 4293841587 4291979877 4288756053 4289815158 4285537082 4288762737 4287842913 4287903056 4287975023 4285269559 4290280354 4292978075 4292182412 4289284170 4286784072 4285402169 4285074999 4284483383 4285666622 4284748084 4285338938 4284353605 4284090435 4285341504 4287250531 4283957300 4291135887 4292523177 4291198854 4285999941 4287911275 4286196305 4287646558 4285275979 4286063170 4284618302 4284421176 4284422981 4285079108 4285144134 4285209926 4284554309 4284226627 4284879943 4286989929 4290670711 4291133306 4291265132 4290603634 4291002488 4291922562 4292120710 4292120444 4292055166 4292119169 4292119415 4292119425 4291594101 4292185476 4291789938 4291988097 4291791471 4291855743 4292052335 4291330431 4292185465 4291659898 4292512380 4292054392 4291985799 4291397497 4292185209 4292119673 4291791483 4291986554 4291857017 4291462525 4291789433 4291199859 4291528575 4291462782 4291264889 4291068282 4291462522 4291134084 4290542720 4290937477 4290673267 4290609038 4290345844 4290211700 4290016375 4289885303 4289687927 4289687414 4289360773 4289756540 4290939005 4291793288 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289546585 4289480278 4289217364 4289676360 4289480530 4289282900 4289415003 4288559951 4288693328 4288822608 4288295244 4287967047 4287375175 4288559182 4290204239 4291847527 4292509297 4293232241 4293628285 4293498747 4293699195 4293698168 4293500032 4293502089 4293699451 4293501319 4293763958 4293566332 4293298803 4292706674 4292570199 4291386199 4289086282 4288164941 4288229193 4288754764 4289148234 4289216336 4289740628 4289611340 4290530131 4290923087 4290005068 4290069585 4289874778 4290331987 4290070616 4290531663 4292044893 4288361285 4286388288 4285799751 4283893560 4283630393 4291731099 4290208893 4290685092 4293043858 4293970858 4294107604 4293837726 4290400076 4283959365 4283108423 4284091968 4283829067 4283959111 4283371842 4286860417 4287054944 4284945227 4284950111 4284620631 4286592878 4285214832 4284489022 4286198124 4285281125 4286133631 4287391119 4288638109 4286527872 4289367719 4286860676 4283435327 4284157258 4284687434 4284421704 4285409358 4284288834 4283567687 4284617535 4286665327 4285208145 4284225593 4284751943 4284419134 4284419391 4284554309 4285273150 4284157760 4283893822 4284419144 4283569744 4282977863 4289095300 4290141541 4287903832 4290753463 4291068292 4292121749 4292060050 4293047713 4292526521 4292985531 4292656817 4292854454 4292790438 4289414230 4289547350 4291256158 4291454048 4291781496 4291126109 4290401627 4289217617 4285858365 4286123070 4290072150 4290599780 4289291646 4286261842 4284617016 4285667914 4288110494 4292133055 4293576118 4293575348 4293771697 4293310895 4292972412 4291190119 4290853965 4292108643 4291119958 4291186259 4292174187 4291187035 4292171111 4292174950 4292375161 4292900967 4292575627 4293630581 4293638845 4294103488 4294103748 4293512367 4290333793 4289939550 4291001473 4290076816 4285868109 4287775836 4286990438 4286062406 4288765333 4291671737 4292842909 4292508555 4289869643 4286587720 4285730366 4285009212 4286385988 4285075766 4284681524 4284354107 4284419383 4284417603 4285870935 4286725214 4284089928 4291265694 4292979362 4291264900 4286193734 4287188084 4286788442 4286923618 4285537347 4285276234 4284618301 4285472322 4285275719 4284356931 4285737551 4285339967 4284552503 4284223044 4284355906 4288895087 4291003001 4291134328 4291129458 4290475906 4291725171 4291790711 4292119933 4292119943 4292119159 4292119426 4291659896 4292119681 4291594102 4291791216 4291921281 4291593591 4291855496 4291857016 4291593854 4292119166 4292052090 4291791481 4291920252 4292118396 4292119928 4291659638 4291462269 4291790717 4291988086 4291986554 4291659639 4291921267 4291397505 4291133817 4291002748 4291331196 4291199352 4291005317 4290542465 4291199867 4290476918 4290342770 4290871683 4290148212 4290015875 4290148214 4289425543 4289556341 4289687926 4289691008 4291004529 4292118917 4291793291 4292386195 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289610573 4289414743 4289414742 4289676117 4289019722 4289546072 4289283157 4289281098 4289414221 4288100945 4288427083 4287376967 4287375175 4288559182 4290858839 4292109658 4292903264 4292837229 4293234551 4293566332 4293698424 4293500805 4293698938 4293699451 4293501317 4293500802 4293501830 4293565314 4293430644 4293099872 4292240994 4291318092 4290070353 4288556872 4288820299 4288624974 4288954961 4289806413 4290596169 4289414227 4290529105 4290201940 4290267476 4290793306 4290923603 4289348176 4290987590 4289345864 4286392132 4284945477 4286725471 4286060876 4286595166 4289422720 4292520098 4290740627 4294021520 4293638561 4294967256 4294965695 4290869602 4284223309 4285873771 4283368518 4284157506 4282910535 4283763514 4286003566 4288042137 4286266487 4286465410 4285478247 4284221519 4285608554 4286268530 4286596492 4286463850 4287779457 4285737567 4287590565 4287584403 4285802065 4287856563 4287915677 4284421696 4284949583 4284354118 4283698744 4285275974 4284224073 4284746551 4284289603 4285736010 4284748357 4284948562 4285472072 4284487232 4284812350 4284356924 4284486726 4284091449 4283436346 4283238199 4283504206 4287054430 4292252037 4288228429 4291135879 4292653223 4292378992 4292650132 4292652700 4292525490 4292525237 4292330176 4292918948 4292655527 4289153095 4290663779 4292238714 4291319131 4292106598 4292243572 4292505973 4292374645 4290206060 4288164167 4288035148 4290069583 4291189099 4291589000 4290145938 4289879940 4290084764 4292459708 4292658617 4293181621 4294168511 4293773238 4293173651 4292634220 4293100654 4292240238 4290595922 4292309098 4291646558 4291578709 4292107874 4291715430 4292107878 4292108900 4293029238 4292969353 4293566090 4293641395 4294038725 4294104518 4293442473 4290069322 4289083208 4290142324 4291199367 4289292159 4287907454 4287909249 4289623731 4291147450 4292978098 4292058283 4292048242 4289476928 4286782023 4285536836 4285667648 4286057279 4286324554 4284489544 4284420412 4284753488 4285012288 4285804624 4286133086 4284092733 4289685104 4293112748 4291071129 4286656344 4287186289 4287251547 4287055961 4285606742 4284552249 4284554310 4284488516 4284748350 4284618814 4285669190 4284947780 4284554566 4284484416 4285343825 4288569967 4290936697 4290803317 4290804086 4291065715 4291725182 4292582033 4291660155 4292119169 4292120185 4291659896 4292577661 4291725697 4292053375 4292052858 4291266166 4292249468 4291987320 4291593844 4291860625 4291462527 4291265899 4292185476 4291790203 4291791480 4291790979 4292250745 4291200118 4292185465 4291987330 4292119424 4291133821 4292119672 4291199860 4291331197 4291396988 4291133817 4291330937 4290674041 4290542453 4290870902 4290936439 4290608759 4290344067 4289820022 4290541187 4289425270 4289753460 4290676611 4291658877 4291989112 4292581014 4292125058 4292651419 4292653192 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289742166 4289546322 4289611865 4289414736 4289480279 4289414482 4289546310 4289018190 4289149261 4288757326 4288363855 4287966279 4287244359 4289148235 4290728784 4292503911 4292835164 4293036403 4293495677 4293171580 4293566079 4293305207 4293698683 4293501318 4293502087 4293764215 4293501575 4293499765 4293627769 4292968301 4292637019 4291518812 4289740882 4289215566 4287445586 4289213770 4289542477 4289478224 4289873231 4291119697 4290792275 4290729052 4290728021 4291251539 4290596689 4291063409 4285074489 4284417090 4284418363 4285403965 4289156727 4290215056 4292251041 4292772486 4293041283 4293509315 4292780418 4294895022 4292187496 4285540151 4283302987 4283898682 4287585434 4282976575 4283305813 4285408863 4287455918 4289367741 4288111755 4286796158 4283236399 4283436106 4283564105 4286600089 4284353854 4287778439 4285874030 4285936487 4285871488 4287526816 4288509628 4284092753 4289109693 4288440477 4286531447 4285341509 4285213271 4283765317 4284486728 4284155696 4284353343 4284488523 4284554048 4284225609 4286063944 4284947267 4284881227 4284684348 4285016398 4284225086 4284156986 4283304256 4283173691 4284354120 4291989639 4290005586 4289484151 4293446844 4292580996 4292580496 4292585619 4292522913 4292657339 4292919733 4292527532 4292132268 4289280828 4291119964 4291322720 4291518305 4291519855 4291320921 4292572776 4292180616 4292441206 4293032293 4290996606 4290595163 4289281900 4289873751 4291450215 4292111455 4292380575 4292970646 4292513673 4292713371 4292915365 4293635995 4293042585 4293174953 4292250784 4292635773 4291714173 4292502641 4292240744 4291976289 4291844197 4291777891 4292108647 4292044410 4292105828 4292639609 4293624704 4293565322 4293639863 4294040263 4294169540 4292782750 4290996100 4289743719 4289940306 4291121785 4291657618 4291395988 4291659678 4292055977 4293042594 4291924889 4292442983 4290923596 4287770699 4285202485 4286326857 4286981192 4285865288 4286127432 4285471298 4284291146 4285081165 4284619079 4286397004 4286393942 4284353855 4289424782 4293175698 4291205789 4288038759 4287117645 4287189874 4285798720 4285670214 4285080145 4284550197 4284750410 4284091955 4284749113 4286061636 4284948037 4284484656 4284488262 4286593873 4290014589 4291003000 4291263606 4290144370 4291200122 4291922560 4291725700 4292184962 4291725432 4292119160 4292185219 4291331951 4291855484 4291857018 4291725174 4291067769 4291659647 4291987320 4291790978 4292185218 4291860110 4291658634 4292381296 4291790207 4292052866 4291791223 4291791233 4291659647 4291659638 4291528317 4291526510 4291463032 4291592312 4291331445 4291067767 4291067767 4291330937 4290542979 4290540145 4290608515 4290411650 4290610044 4290737011 4290016630 4290082167 4289622647 4290673528 4291728001 4292252048 4291796612 4292717469 4292128391 4292719242 4292981896 4293439119 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289482331 4290071384 4289741909 4289807701 4289612640 4289677646 4289609805 4289085264 4288626257 4288164427 4288361804 4288492106 4287897671 4288558668 4290400334 4291913831 4293294686 4292838767 4293497215 4293172338 4293566337 4293565822 4293698682 4293699197 4293699196 4293501832 4293698681 4293697913 4293561982 4293231210 4292571501 4291318609 4289348432 4288623435 4288752712 4289086290 4289479246 4290068557 4289545560 4290333780 4290074202 4291318353 4290597724 4290530898 4292109402 4289159764 4283760699 4284023612 4286458174 4289548155 4291662733 4292249999 4290936975 4292249738 4291522181 4291660173 4293638592 4289948522 4283106356 4283899488 4283766855 4283631967 4287321741 4287520666 4288041876 4287393177 4287122798 4284620106 4286534021 4284356685 4283108164 4283565125 4284291395 4287721128 4283237425 4286731655 4285937268 4285674346 4286135946 4287454087 4289236144 4286989708 4289305512 4286926983 4286923642 4285017690 4286925439 4283371328 4284420418 4283828553 4283962682 4284486717 4284420938 4284552515 4285011268 4284683070 4284682556 4285144901 4284552514 4284812089 4283566395 4283304250 4283105327 4288371034 4292444795 4288751935 4291863713 4292916640 4292514189 4292583826 4292587678 4292459442 4293445303 4293117866 4292329649 4289280570 4290004565 4291582047 4291714679 4291585636 4292111731 4291783033 4292834682 4292833909 4292376953 4292377207 4292571525 4291256156 4291914865 4291519091 4290399069 4291647839 4289539914 4290665566 4292701813 4291193697 4291849322 4290273135 4292313474 4292056988 4292648113 4292520873 4292976265 4292506995 4291844196 4292041831 4291648353 4291780964 4292237928 4292042854 4292501097 4292703609 4292638592 4293238689 4293703334 4294038725 4294106567 4293113262 4293368969 4292385449 4291596451 4291065464 4292642696 4292175212 4291320929 4292376182 4291262573 4289545046 4288754249 4287636809 4286975299 4285603650 4288298579 4287706185 4286389064 4286061125 4285406533 4284223804 4285672014 4284816455 4286067296 4285868098 4283370570 4289618811 4292714386 4291862684 4288764006 4285804636 4288695916 4285935180 4285932619 4284224827 4284554310 4285143098 4284685118 4285534010 4285409101 4284817224 4284684871 4286334557 4288760428 4290540919 4290935158 4290210419 4291195506 4291265917 4291856511 4292119943 4291725422 4292119417 4292513410 4291725432 4291723642 4291659647 4291462258 4291528060 4291397246 4291725182 4292053632 4292184951 4291792261 4291926670 4291462773 4291594112 4291725182 4291463032 4291856770 4291791232 4292185208 4291659639 4291528317 4291855473 4291133819 4291331445 4291199611 4290739576 4290805112 4290805111 4291265142 4290542980 4290476662 4289754485 4290540415 4289951618 4289885570 4290673529 4291332200 4292188551 4292320154 4292390516 4293110406 4292979589 4292980363 4293306751 4293046137 4292983964 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289872466 4289676373 4289547868 4289546329 4289480016 4289348437 4288430671 4289216592 4289213770 4288756559 4288359238 4287901511 4287310151 4288622665 4291119692 4292374362 4292443506 4293036147 4293431665 4293565315 4293566850 4293501059 4293501315 4293699198 4293831795 4293501576 4293700224 4293500027 4293629053 4292839282 4292964175 4291649367 4290201677 4287901769 4288755020 4289082443 4289283403 4290071108 4290070873 4290462539 4291384403 4290005337 4291251794 4290726232 4292107591 4290934127 4284153912 4285669437 4291786387 4291587700 4293042317 4291260025 4289950089 4290081947 4289948816 4292186240 4288368471 4284423245 4286133870 4285736540 4284290131 4284554322 4284223822 4288577188 4288442010 4285143393 4283632960 4287719586 4287059324 4283171381 4283829066 4284226138 4284291127 4287194792 4284096354 4286335338 4287191952 4283565639 4285609072 4287456158 4287848852 4287913120 4288773800 4286856567 4287454362 4288583609 4283827256 4283959098 4284552010 4284160839 4284750404 4284614461 4284421195 4284815932 4284485445 4284353341 4284753488 4284947264 4284484915 4283894076 4283304757 4283040831 4285144382 4291925653 4290396233 4289680491 4292526759 4292251005 4292582288 4292587924 4292523432 4293116602 4292527797 4292593066 4288624962 4289410382 4291775831 4291518819 4292112243 4292373364 4292441715 4292634998 4292375410 4292114567 4292573026 4292637319 4292180613 4292770440 4292508280 4292570741 4290728531 4291911531 4289676376 4291192951 4291129981 4290604174 4289941861 4290271096 4291134855 4292180620 4292381055 4292970380 4292376688 4291849336 4291842912 4291583073 4291583860 4291717244 4292237670 4292043112 4292106342 4292310900 4293098612 4293235081 4293506485 4294104261 4294106058 4292983209 4292776097 4292576621 4292508018 4292637556 4291783525 4290598009 4289484393 4289550709 4289613906 4287313001 4287374920 4286654792 4288626008 4287772494 4289543502 4287966026 4286256453 4285996103 4285466937 4284483897 4284750410 4284949324 4287315800 4285803081 4284288359 4289158000 4292977055 4291995040 4290210435 4285998931 4287780717 4286523977 4285406018 4284488516 4284619588 4284358732 4284484920 4285603911 4285734726 4284029507 4284685128 4286657871 4290275189 4290477689 4290935158 4290735731 4291066230 4291725173 4292120459 4292253305 4291790722 4291790977 4291725441 4292185208 4291594102 4292119167 4291856770 4291725182 4291594368 4291134076 4291526508 4291659638 4291528579 4291133552 4291659649 4292316536 4291134076 4291789433 4291725173 4291724674 4291659647 4291659637 4291790467 4291395964 4291199610 4291199601 4291132793 4291066732 4290870905 4290345336 4290606197 4290278004 4290343796 4290015875 4290870388 4290542456 4291529080 4291858308 4292387463 4292781703 4292849779 4292979081 4292916620 4292916629 4293243264 4292851849 4293045146 4293178760 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4290201686 4289480787 4289611858 4289938775 4288759374 4289808975 4289216080 4288101200 4288754507 4288887118 4287773008 4288032583 4287441479 4288032841 4290859603 4291781210 4292574046 4293034605 4293628280 4293564539 4293500544 4293698938 4293500804 4293699452 4293501576 4293699195 4293699453 4293500800 4293563524 4293165418 4293291097 4291386198 4289676621 4289081673 4288688713 4289148491 4288954193 4289740878 4289741648 4290267727 4290661722 4291254870 4290726487 4290857039 4290660950 4291987332 4289424762 4290935934 4291196312 4290142349 4290345627 4291730337 4289095529 4287313231 4285013834 4285869661 4286664827 4286855785 4284357956 4284483910 4283306555 4284093263 4283171924 4284822105 4289499832 4288183486 4287388572 4289496245 4287055498 4286995873 4285015122 4284556637 4283105347 4287124346 4285210475 4285674592 4287654063 4285212503 4284559735 4287585420 4287058323 4288970158 4288771762 4288247468 4288713136 4284421184 4283039806 4284556878 4284292419 4284353846 4284424011 4284620357 4284616253 4284095813 4285142339 4284750140 4284555853 4284226629 4284486203 4283566388 4283304245 4283170872 4290410615 4292377712 4289018190 4291593351 4292385932 4292187023 4292586140 4292519329 4292722612 4292527549 4292987049 4288693052 4289013318 4290660436 4291646551 4291781739 4292175476 4292045189 4292771958 4292768115 4292115851 4292770675 4292903561 4292310898 4292571490 4292507237 4292838524 4292046212 4292638841 4292571494 4291979638 4292111216 4292111476 4292047477 4291652465 4292314257 4292380817 4292380560 4292576135 4292114043 4292444049 4291856273 4291582563 4291975524 4292242039 4292372833 4292042600 4292043368 4292301670 4292634230 4292706452 4293559931 4293506997 4293905596 4294040777 4293968570 4292320922 4292579454 4292576392 4292243588 4291913590 4291518830 4291915126 4291124846 4292109439 4291059547 4288757844 4288951113 4288823122 4289938761 4288626510 4289016905 4286059589 4286651978 4284812087 4284550708 4285338936 4285405762 4286067532 4285672294 4284286009 4288764799 4292383115 4292457653 4290410110 4286326609 4287776618 4286062404 4284355911 4285078340 4284552246 4284616255 4284353842 4286461009 4285078076 4284550978 4284550201 4287775589 4290149243 4290803318 4290801267 4290078835 4291397493 4292184951 4292122252 4292118902 4291725441 4292185208 4291791223 4291593090 4292119167 4291200117 4292119167 4291659127 4291527303 4291528568 4291857283 4291725184 4291723886 4291725441 4292117871 4291265920 4291462773 4291725439 4291396991 4291396980 4291397247 4292052862 4291068015 4291396990 4290673783 4291330939 4290805112 4290411384 4290936696 4290608504 4290408821 4290346360 4290540147 4290212481 4290216579 4291989120 4292386201 4292455796 4292652683 4293110935 4292916373 4293179020 4293245829 4292850313 4293638535 4292850573 4292981372 4293178509 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289348949 4289611865 4289545815 4288759380 4288758866 4289150543 4288691536 4288296269 4288820299 4287773522 4288032841 4287507271 4287043143 4288753994 4290463052 4292242005 4292573296 4292904564 4293300605 4293237889 4293566851 4293698938 4293698683 4293699197 4293501831 4293700222 4293500546 4293567105 4293627255 4292969581 4292506992 4292043854 4290200913 4289079878 4288097094 4288624972 4289217357 4289806926 4289741643 4290923344 4290726991 4290529870 4291185742 4290792536 4290265681 4292437342 4292119678 4292377995 4292843668 4293174677 4291917680 4289418850 4287048553 4285478507 4285148242 4286332004 4287646579 4285278543 4283501894 4283763524 4284884328 4284421462 4284423250 4284027491 4285080412 4288844471 4288776372 4288377508 4288510642 4287194002 4284882004 4284554325 4283369030 4285477480 4286333550 4285078885 4287454597 4288242602 4286466942 4285279066 4285606227 4287324573 4287256966 4289564600 4286861185 4286530931 4286593127 4285409620 4284613698 4284291142 4284487997 4284813887 4284553278 4284815676 4285143884 4284554307 4284813628 4284551997 4283697976 4283698507 4282777654 4286527565 4292514950 4290793557 4290073178 4292985264 4292972673 4292976524 4292455833 4292656563 4292986033 4293449656 4289153848 4288162891 4290461004 4291123290 4291909735 4292237157 4292506741 4292834419 4292508807 4292706934 4292509830 4292640886 4292771716 4292837251 4292967559 4292642431 4292442724 4292833651 4292310902 4292311159 4292963681 4292376695 4292572798 4292575106 4292576391 4292905357 4292643497 4292841864 4292970126 4292448930 4292973710 4292507506 4291650165 4292174692 4292242803 4292503436 4292109924 4292367464 4292371048 4291779682 4293424003 4292908188 4293572787 4294102717 4294104262 4293510583 4293111213 4292387235 4293036181 4292774528 4292443254 4292113510 4292636788 4291781237 4291716448 4291386462 4290399319 4290465110 4289348951 4289941597 4289939025 4288690252 4287174983 4286457929 4284745782 4285338688 4285406277 4284816197 4286130760 4285672273 4284355923 4288239730 4292908677 4292585635 4290344847 4286328651 4286984527 4284818762 4285733180 4285537604 4284555854 4284161349 4285012027 4285999437 4284814395 4284156994 4284421433 4288367461 4290083963 4291326835 4290344310 4290144114 4291134073 4292185991 4292118900 4292120199 4292184960 4291134077 4292251010 4291791223 4291857026 4291724153 4291723896 4291659138 4291922551 4291659639 4292248182 4291462770 4291527297 4291528059 4291331446 4291856511 4291134076 4291987067 4291397247 4291659906 4291265661 4291132266 4291396992 4291133809 4291133560 4290739576 4290608497 4291134084 4290934388 4290606197 4290608504 4289425015 4290148219 4291069056 4292188029 4292715650 4292653711 4292981129 4292983711 4293574014 4293114503 4293506431 4293178766 4292720288 4292849543 4293179021 4293570693 4293309569 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289807958 4289414743 4289151051 4289348173 4288822861 4288691536 4288755789 4287642450 4288885835 4287837515 4287443786 4287764551 4285340488 4287833926 4290071119 4292110944 4292573278 4292970358 4293102461 4293237114 4293566333 4293500801 4293698682 4293699197 4293501831 4293501831 4293567879 4293566590 4293561720 4293166960 4292964688 4291583576 4289544778 4288556105 4288755277 4289082956 4289413201 4289084753 4290135879 4289938515 4290725966 4291252053 4290529358 4291185741 4290596441 4290923858 4292310392 4292383379 4292445825 4290335599 4289486705 4288435577 4284685649 4284488520 4287054703 4287649671 4286265435 4284554586 4283434824 4283831366 4286205313 4284357437 4285935714 4285936228 4287387276 4287188869 4285941637 4285873774 4286797181 4285805156 4284223294 4283828547 4283567932 4284620374 4285872260 4285082706 4283896918 4287656357 4288703665 4287255449 4287586726 4287386003 4286137720 4287061650 4284224585 4287651219 4284226633 4284553535 4284225092 4284551741 4284029246 4284486712 4284682566 4284223043 4284621642 4284225102 4284292160 4284226637 4283830595 4283369787 4283762486 4291003783 4291784293 4289016650 4292119435 4292649874 4292520340 4292456862 4292852150 4293182645 4293450686 4289552981 4287043651 4289871178 4290858582 4291448412 4291582292 4291914615 4292109684 4292375668 4292510343 4292837509 4292837251 4292773000 4293035915 4292905880 4292907143 4292970385 4293100188 4292377984 4292903813 4292839841 4292967825 4292644482 4292839331 4292843166 4293104795 4292907415 4293104773 4293039007 4292905364 4292843144 4292906633 4292177284 4292173920 4292177015 4292833656 4292374114 4292696171 4292107111 4291977575 4292630375 4292770182 4293363590 4293175223 4294102973 4294042061 4293837747 4292654766 4292849062 4292842634 4292250500 4292969354 4292575879 4292442488 4292372066 4291912290 4291913336 4291714652 4291121750 4290732393 4291384409 4289810010 4289674052 4286325576 4287046729 4285074235 4285404735 4285470269 4286194760 4286656853 4285739092 4283829822 4288369521 4292318612 4292392124 4290214522 4287116382 4286529379 4286197579 4285012288 4285143613 4284422462 4284221497 4284749113 4285734984 4284289842 4284355403 4284684870 4289356915 4291130228 4291064173 4290344055 4290606197 4291725179 4291790719 4292120967 4291725183 4291726973 4292644993 4291330174 4291857017 4291658361 4291724153 4291331711 4291725181 4291528834 4291723897 4291266175 4291725183 4291922552 4291790976 4291593852 4291331445 4291462783 4291593088 4291265394 4291528319 4291133817 4291199611 4291002232 4291199602 4291133304 4291133560 4291264889 4290148727 4290082936 4290410872 4289819255 4289884279 4291399306 4292057985 4293373588 4292523664 4293245574 4293508225 4293507968 4293048712 4293112454 4293310330 4293113988 4293177227 4293179792 4293047162 4292785546 4293178767 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289415000 4289609803 4289019729 4288756042 4288363854 4288166737 4288886603 4288359237 4288295756 4288558924 4287506759 4287111240 4286717512 4287242310 4290201168 4291649880 4292967020 4292837740 4293562230 4293237127 4293566080 4293764473 4293501319 4293700224 4293698941 4293699451 4293502088 4293565816 4293629305 4292967788 4292507730 4291846483 4289544267 4288624460 4288688713 4289278790 4289084748 4290004298 4290463312 4290333268 4290730074 4290596184 4291187033 4290726229 4291186258 4290339704 4290863222 4290602621 4288956530 4289942633 4289217894 4285668190 4286466177 4287384703 4288175761 4285607779 4284158530 4285079125 4283568456 4285012561 4286597259 4286064747 4286795412 4287982251 4288113807 4286987895 4283765060 4285544037 4287915170 4284950093 4283041859 4283895371 4285210726 4284423259 4286859889 4286597247 4284159086 4283305533 4288971954 4288780477 4288048279 4285144664 4286070642 4286068845 4289574613 4285413219 4283237440 4284225606 4284619843 4284422468 4284882759 4284223037 4284486718 4284289348 4284487752 4284752457 4284356948 4284097093 4283505234 4282583888 4287843438 4292776303 4289804365 4289679979 4292585884 4292518032 4292522399 4292916652 4292984755 4293515461 4290413407 4285468223 4290390598 4290202453 4292103517 4291842915 4292369508 4291847266 4292308084 4292374132 4292902249 4292772230 4292969089 4293035917 4293366157 4293367180 4293362826 4292775831 4293763190 4292974749 4292711583 4293103240 4292646540 4293103762 4293041818 4292713109 4293040027 4293039758 4293036937 4293041310 4293102986 4292972688 4292445322 4292439406 4292176503 4292967530 4292309109 4292439398 4291911527 4292370536 4291911783 4292630631 4292572037 4293235589 4292849337 4293970360 4294039494 4293971131 4292980654 4293174684 4292778922 4292971399 4292840061 4292509317 4292379512 4292243335 4292373876 4291716213 4292040539 4291583608 4291057496 4291187801 4289480792 4289151828 4287567430 4286389577 4285273661 4285602110 4285209668 4286130249 4286654280 4285080133 4283499347 4288301668 4292122273 4293243559 4291267216 4286590804 4286066251 4286391373 4284616511 4285669957 4283700536 4284812610 4285404472 4285211464 4283894841 4284549179 4286786129 4289751145 4290803575 4290738295 4290341234 4291263350 4291464582 4292186503 4291725173 4292119426 4292119415 4291528318 4291725182 4291857017 4291921276 4291462524 4291528058 4291988354 4291001976 4291988344 4291528577 4291725183 4291790966 4291068017 4291199869 4292052605 4291199868 4291265651 4291199354 4290611074 4291462524 4291331454 4291395438 4291133561 4291002747 4290805369 4290804076 4290082937 4290671221 4289622648 4290081654 4291137153 4292191367 4293110918 4292655265 4293575063 4293377415 4293705107 4293048453 4293507468 4293112454 4293114759 4293177229 4293309566 4293178244 4292785039 4293637511 4293113221 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289412684 4288430672 4289150287 4289216592 4288755789 4288887117 4287706190 4288426057 4288557129 4287377738 4287636551 4287176776 4287176007 4287835978 4289610313 4292372829 4292506476 4293296489 4293234558 4293236351 4293566851 4293501574 4293501055 4293697912 4293832052 4293435527 4293700479 4293500284 4293562738 4293166959 4292964704 4291583580 4290005066 4288556873 4288163914 4289148748 4289215819 4289348174 4290003027 4290070097 4290858066 4290661977 4290661203 4290664022 4290793319 4291582049 4289810560 4288824943 4290801826 4291135135 4288766894 4289433030 4289699772 4289696188 4287320700 4284818271 4284818506 4284357208 4285078357 4285083222 4288440993 4285541214 4288183215 4287716483 4287781798 4286134380 4285805177 4289037493 4286857074 4283237951 4283239499 4283567694 4284027715 4285147748 4287715483 4288969379 4286465669 4285280866 4285212262 4285809261 4288509618 4286661783 4288373165 4288785870 4288048003 4284683342 4285213011 4285144901 4284618311 4284683586 4284619596 4284685389 4284093501 4284550205 4284357699 4283964750 4284227395 4284028230 4283044435 4284418872 4292054648 4291716186 4288953937 4291598483 4292648600 4293307546 4292523681 4292458409 4293315248 4291603076 4285072958 4287965255 4289347404 4290988625 4291449430 4291714655 4291518057 4292107621 4292309895 4292767606 4292573303 4293359745 4292903059 4293034880 4292969866 4292974996 4293167231 4292972693 4293236110 4293765000 4292974237 4292972957 4293366407 4293102230 4293763699 4292973985 4292975501 4293037982 4293040797 4293039515 4292777876 4292577390 4292771703 4292113030 4292636512 4292311927 4292371321 4292896871 4291977063 4291977063 4292960619 4291910245 4293028472 4292837255 4293702054 4293772725 4294038982 4294103233 4293309608 4292323996 4292845971 4292842892 4292445857 4292509572 4292771195 4292638049 4292242552 4292174436 4291913316 4292170853 4291452258 4291057755 4290925660 4288888393 4288161096 4285863237 4285141579 4285338684 4285866052 4285665597 4286527319 4286390086 4283564100 4287710042 4292777893 4292785052 4291530148 4287117138 4285540683 4285734982 4284353342 4285538885 4284422719 4284486969 4285013574 4284423237 4284812094 4284684610 4287643733 4290668663 4291266426 4290734962 4290083449 4291265659 4292251270 4291726451 4292120965 4292119415 4292119426 4291856759 4291659646 4291723896 4291462523 4292119166 4291528577 4291593594 4291396990 4291725182 4291725182 4291725173 4291592832 4291265395 4291528567 4291593843 4291265405 4291331188 4291133817 4291330681 4290279799 4291133559 4291133560 4290411384 4290868597 4291000182 4290082936 4290409077 4289754743 4290213753 4291005302 4292844694 4292980617 4293180038 4293116032 4293575308 4293770883 4292984961 4293311387 4293245296 4293309818 4293113229 4292785044 4293374338 4293112709 4293440888 4292784008 4292983451 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289085264 4289413196 4288760660 4288756815 4288230733 4288363857 4287902798 4287904079 4287378252 4287574602 4287046986 4286784071 4286061128 4287967046 4289609808 4291845968 4292245350 4292904819 4293693303 4293237890 4293370228 4293764730 4293500803 4293698682 4293633663 4293698682 4293698682 4293500283 4293561984 4293428330 4292572769 4291515733 4289544778 4289149005 4288097094 4289148748 4288954450 4289609543 4290069069 4289674059 4290070109 4291316037 4290597497 4290470537 4290475683 4290414249 4289368257 4289958849 4291468214 4290948796 4288579485 4287916416 4286927992 4286266978 4285540180 4285013334 4285212756 4286134120 4285013594 4286594427 4286994314 4286263921 4288113564 4287389596 4286396265 4287784090 4288770723 4287515259 4284224574 4283041866 4284288066 4283697466 4284490316 4283831645 4284355651 4286532993 4287518104 4287653793 4288113051 4286599584 4285738851 4289041839 4289180349 4288241294 4284883535 4288900746 4288958062 4287116883 4287316568 4283237956 4284094523 4284882758 4284353859 4283964231 4284421186 4283832653 4284419657 4283175248 4283239744 4288042607 4293170551 4288755801 4289942117 4292982197 4292583053 4292458658 4292457127 4293183164 4292988844 4284880433 4286714181 4288884807 4289869902 4291122009 4291384415 4291843941 4292303720 4292042598 4292109941 4292964453 4292573306 4292772231 4292968562 4293035138 4292775064 4293365131 4292909476 4293760887 4293237642 4293304223 4292975257 4293305226 4293697676 4292977049 4292973473 4293367431 4293168788 4292977048 4292976536 4293436038 4292644237 4293362072 4292640887 4292771451 4292308080 4292572044 4292572770 4292177527 4292106086 4292175464 4291976033 4292826219 4292437347 4293035143 4293240743 4293836984 4294040006 4294103747 4293178794 4293108887 4292844177 4292385947 4293101442 4292445548 4292767861 4292112263 4292504674 4292308854 4292043896 4292108391 4291518818 4291450465 4291188563 4290137172 4286915139 4285931593 4284945727 4285077063 4286194248 4285409099 4287181388 4285142600 4283237440 4287313245 4292385424 4292845986 4291270040 4288105050 4285341509 4285272382 4284024883 4286195525 4283827779 4285077816 4285603397 4284682808 4284487750 4284486205 4289550188 4290346619 4291065193 4290278776 4291127150 4291923074 4292121474 4291725694 4292184705 4291397239 4291856769 4291659646 4291856768 4291659646 4291922816 4291855482 4291790974 4291134075 4292053889 4291331452 4291790209 4291594105 4291396991 4291725699 4290936956 4291331196 4291134591 4291199353 4291134599 4291199608 4290936954 4291133559 4291133816 4290673528 4291002489 4290212971 4290344581 4290148726 4290145918 4291528579 4292124031 4292849820 4292982139 4293837718 4293771928 4293770881 4293706391 4293639570 4293048198 4293508227 4293047695 4293570436 4293377135 4293176453 4292983711 4293179011 4293179276 4293311379 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4288757071 4288102222 4289218660 4288232014 4288362318 4288361547 4287771980 4288556873 4288033098 4287574087 4287767879 4286783048 4286257991 4287308617 4290466389 4291846745 4292245093 4292772979 4293299313 4293236354 4293566337 4293500285 4293501574 4293501319 4293699453 4293698425 4293501318 4293566847 4293627505 4292839284 4292637003 4291517533 4289808980 4289079622 4288752711 4289083212 4289018702 4289673550 4289740109 4290201454 4290662250 4290148009 4291730093 4291462047 4291463849 4290999693 4291195264 4292116091 4291000719 4286133070 4283895366 4284094041 4286793841 4284819560 4284357975 4285738589 4285606492 4285277024 4285473625 4287059841 4287317383 4285479268 4287655081 4285740647 4288116401 4289035689 4287189638 4284819538 4283963459 4284490318 4283633992 4283895119 4284025923 4283831114 4284093784 4284820060 4286069368 4285805415 4288311973 4289757101 4288512432 4285215068 4282844214 4282843205 4285805915 4291004295 4290212466 4288698467 4287575912 4283635790 4284620613 4284291651 4284161097 4284225862 4284029254 4283766087 4283571273 4283567695 4283765314 4292383629 4290469986 4289743964 4291527562 4292718487 4292522904 4292851381 4293379239 4293583297 4286394942 4284284979 4286782535 4288752455 4289873225 4291644504 4291712597 4291976547 4291910502 4292042343 4292701816 4292440161 4293227143 4292576119 4292967033 4292836755 4293627011 4293235834 4293303946 4293236111 4293237389 4293305499 4293302685 4293302667 4293238666 4293369479 4293371292 4292976539 4293370247 4293367945 4292977049 4292974240 4293105534 4292907148 4292640632 4292441443 4292509580 4292900966 4292638075 4292896121 4292633705 4292176744 4293220709 4292370537 4292111734 4293293440 4293238189 4293838773 4294038469 4294103746 4293377464 4292650386 4292775829 4293234834 4292383118 4292904850 4292444777 4292767351 4292175458 4292567930 4291977060 4292108389 4291649656 4291844958 4291125600 4289476943 4287046727 4286586697 4284944701 4285866051 4286131019 4285997127 4287051084 4285010752 4283764297 4286719063 4292122269 4292781728 4292515462 4289093756 4285078336 4285209151 4284027188 4286193735 4284354360 4285209663 4285144648 4284683321 4284483901 4286522957 4289683557 4290806139 4291195509 4290212202 4291195766 4292185463 4292120454 4292119932 4291792253 4291856513 4291856769 4291397238 4292250754 4291462266 4291527302 4291331709 4291331454 4291856510 4291134074 4291593094 4291594369 4291396981 4291462775 4290936182 4291396733 4291396732 4291068285 4290870896 4291462524 4291199610 4291330938 4290805111 4290411384 4291000181 4290411128 4290410873 4290211700 4289885047 4291003776 4292451204 4292718733 4293246085 4293048455 4293772183 4293376383 4292984707 4293573778 4293376642 4293507969 4293048456 4293179781 4292982686 4293177730 4292786059 4293572999 4293113987 4292916889 4293509268 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4288821589 4288296278 4288365134 4288427598 4287770955 4288492105 4288493900 4287967305 4287508295 4287112520 4286655560 4286914120 4286257735 4287441994 4289283148 4291453276 4292706417 4292772719 4293366393 4293237115 4293566336 4293501313 4293698163 4293697912 4293698426 4293502859 4293568135 4293564282 4293563001 4293165673 4292769399 4291582539 4289018696 4288033354 4288164938 4289279563 4289018702 4289150544 4290790988 4290081156 4291133055 4291190368 4290924116 4291122782 4289819014 4289357720 4289622685 4289089909 4286133336 4285208930 4285477475 4287317871 4285940854 4285210696 4285736802 4284423769 4285148755 4285080914 4286598527 4286070920 4285675378 4288047259 4287584412 4288513221 4289165459 4288509857 4284617526 4283895622 4284686944 4284683327 4284354114 4284423498 4284422734 4284027460 4283963455 4284291415 4286068827 4286401668 4284091962 4284687931 4287121240 4283828534 4283238719 4283503433 4287970653 4290344049 4290345850 4289351017 4285606469 4284291395 4284157261 4284160316 4284423237 4284224316 4284029254 4284226373 4283631691 4283371077 4287384685 4292382071 4289613920 4290073953 4292324514 4292517004 4292918702 4292589985 4293843148 4289169250 4282646578 4285401145 4286717769 4288824399 4290725716 4291517284 4291843166 4292041564 4291649895 4292240738 4292175973 4292504186 4292639351 4292966012 4292771943 4293233281 4292970382 4293365648 4293299085 4293237900 4293695865 4293238923 4293305501 4293302410 4293303177 4292977055 4293303943 4293369735 4292976283 4293305758 4293302923 4293365630 4292840844 4292903289 4292969351 4292967545 4292703862 4292638841 4292703096 4292899430 4292043367 4292109160 4291846504 4292106599 4292370530 4292902276 4293304218 4293839031 4294037697 4294038468 4293838775 4293043349 4292843157 4292383101 4293036677 4292642689 4292706681 4292703096 4292833657 4291846772 4292632424 4291846266 4291846243 4291125852 4291777377 4290005583 4286586183 4286062665 4283961661 4285931587 4285734988 4286195526 4286987352 4285208135 4284220231 4285343052 4292711819 4292188325 4291660665 4291133079 4284878132 4284813626 4284352308 4285207610 4284943930 4285339960 4284816708 4284549177 4284352828 4287248470 4290079598 4291198073 4291197290 4291127409 4291134586 4291790721 4292121474 4292119686 4291726717 4292184961 4291790966 4291923847 4291790967 4291922552 4291528577 4291725182 4291988088 4291396991 4291397237 4291790465 4291528314 4291658632 4291462773 4291331197 4291396723 4290805370 4291199344 4291265921 4290476921 4290805109 4290740093 4291068025 4290936697 4290212213 4290214264 4289688440 4289820280 4290737272 4292383873 4292850295 4293244560 4293441929 4293441674 4293574290 4293769858 4293443740 4293574791 4293638001 4293180316 4293507968 4293048458 4293376362 4292983200 4293376916 4293245330 4293247390 4293839262 4293181595 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4287771723 4288558407 4287312203 4287968588 4288034380 4287376454 4288032842 4287509581 4287573575 4287048776 4287375688 4286323271 4285669192 4287437639 4290200394 4292046170 4292571754 4293166189 4292907381 4293697404 4293566851 4293565821 4293501575 4293697912 4293700225 4293698680 4293501058 4293566849 4293562238 4293359980 4292965208 4291253590 4290006090 4289212489 4288292166 4288036434 4289082442 4289544780 4289415257 4290531938 4290396751 4290728281 4290596695 4291255404 4291128986 4290072944 4288695395 4286267257 4288042892 4286794363 4286925165 4286400646 4285933650 4286327910 4285210442 4284554583 4286065262 4286992780 4288113318 4284093257 4285805668 4288838329 4288645803 4288505483 4284685132 4285015902 4285479295 4284554819 4284686920 4284488008 4284291397 4283897924 4284159050 4284159050 4284360019 4284356171 4283502910 4286394714 4286728578 4284750408 4287840078 4283829312 4283238463 4283827769 4288367456 4290472829 4290938501 4288826473 4288568184 4284421181 4284028992 4284289859 4283634746 4284155974 4284293958 4283435331 4283107654 4284292166 4292450957 4290602343 4290139497 4291394956 4293443241 4292851116 4292456083 4293117365 4291933841 4282974254 4284746815 4285797698 4287046981 4289281355 4290988887 4291255635 4292237156 4291256926 4292498531 4291713637 4292698987 4292965223 4292179064 4293425017 4292510330 4293295237 4292967809 4292972666 4293302669 4293304714 4293238667 4293699472 4293238150 4293239709 4293240993 4293304455 4293762954 4292909471 4293369226 4293237130 4293303434 4293301390 4293167749 4293102466 4292575093 4292902024 4292247162 4293097085 4292442728 4292767863 4292241510 4292242280 4292761963 4292109927 4292501605 4293098631 4293103244 4293706931 4294039239 4294040521 4293838261 4292649636 4292448384 4292841124 4292971138 4292840320 4292835716 4292704376 4292506979 4292700281 4291911267 4292436070 4292108393 4291977056 4291121228 4289149772 4285667392 4286849097 4284420413 4286325322 4285404218 4285802315 4288167501 4284487241 4284220994 4285534783 4292120216 4292583840 4290733687 4290812575 4285665596 4284617016 4283959112 4284419897 4285670722 4285471559 4285010226 4284488000 4284614722 4288104027 4291066481 4291460707 4291261817 4290409333 4291790975 4292121468 4292120188 4291726717 4292184953 4291791223 4291922306 4291462783 4291922305 4291265662 4291330680 4291790974 4291790719 4291134331 4291855225 4291199867 4291725180 4291199866 4291528320 4291134590 4291134592 4291592573 4291331453 4291133817 4291462523 4290740102 4291462008 4290412167 4290738539 4290477177 4290082424 4290474358 4290081910 4291989380 4292324984 4293702016 4292983175 4293835655 4293638514 4293178746 4293441674 4293048455 4293442178 4293246603 4293442176 4293180810 4293507966 4292917409 4293573243 4293180549 4293575835 4293575320 4293509526 4293445023 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4287969357 4287967828 4287443787 4288164681 4287443018 4287574346 4287573575 4287049290 4287640138 4287770951 4286717511 4286457419 4286455368 4286851399 4290265166 4291189074 4292705134 4292705643 4293824638 4292907894 4293238922 4293370227 4293567111 4293370486 4293566854 4293501573 4293501315 4293566074 4293627768 4292968300 4292573535 4291518046 4289610831 4288624460 4287640140 4289346638 4289083981 4289348950 4289610322 4289350746 4290335067 4290137947 4290598748 4291647070 4291324517 4288363869 4287511671 4286067810 4285279840 4287385735 4288044703 4285932368 4288372624 4286986087 4284421456 4285540955 4287453852 4288180381 4284751707 4284029027 4287123338 4288779448 4286269579 4287454349 4284557403 4285808763 4286069599 4284487254 4284092998 4284091979 4284619594 4284884045 4284423495 4284487239 4284686409 4284290637 4284488264 4285015622 4284161609 4284422467 4287839828 4285142077 4283107122 4283632701 4287711844 4290210939 4290340213 4290416780 4288238429 4284156989 4283305275 4284027451 4284222272 4283305016 4284486988 4283238462 4282974259 4288762470 4291723885 4290136661 4290271078 4292920242 4292850318 4292852399 4292523426 4293842364 4284950589 4282779215 4284552768 4285208124 4288293448 4289086286 4291319126 4291383382 4291842404 4292502122 4291977576 4292370280 4292109671 4291713894 4293356137 4292312938 4292966014 4292312166 4293099396 4292970903 4293693306 4293235088 4293302674 4293237388 4293238687 4293631367 4293634206 4293240221 4292909466 4293368711 4293237388 4293696633 4293236882 4293168245 4293166219 4292968835 4292640648 4292638583 4292899176 4292445550 4292965225 4292504442 4292109159 4292370525 4292106600 4292109414 4292766844 4292768866 4292974492 4293705911 4294037954 4294038725 4293643198 4293042076 4292449417 4293168523 4292776335 4292837769 4292708220 4292310648 4292769146 4292370292 4292307849 4292042597 4292108392 4291779686 4291319126 4288689739 4286258248 4285668938 4284027191 4286456394 4284357962 4287047494 4288038490 4284746805 4284221251 4285666636 4291465098 4292581787 4290867580 4292845454 4285472071 4284222264 4284880445 4284617273 4286394446 4284814393 4284619328 4284877109 4284816190 4289154389 4290802797 4291262829 4291064180 4291134329 4292052860 4292120968 4292055436 4292119168 4291725423 4291658883 4291463031 4291922305 4291856759 4291922562 4291790965 4291134332 4291199611 4291659388 4291397247 4291331196 4290937212 4291331196 4291331187 4290805370 4291594104 4291133808 4291199611 4291067766 4291462781 4290870389 4290476919 4290542711 4291000438 4290540405 4289491578 4289684840 4291330941 4292516484 4292981128 4293246363 4293641355 4293376640 4292851873 4293637498 4293640086 4293245040 4293442434 4293245595 4293442174 4293639570 4293639314 4293508227 4293181856 4293641113 4293641885 4293707419 4293772966 4293379239 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4288033364 4287510094 4287639625 4286983754 4287638598 4287639882 4287048263 4287179847 4287178314 4287178567 4286915656 4285865800 4285797445 4287441480 4290198855 4292109664 4292046700 4293035893 4292775037 4293303175 4293631353 4293566082 4293371513 4293172103 4293566849 4293500288 4293764214 4293499778 4293627768 4293100396 4293095004 4291847259 4289413711 4288686662 4287771465 4288754507 4288626000 4288953420 4289677911 4290005586 4290923603 4290726476 4291120983 4291056726 4291583335 4287175505 4286266228 4288638384 4289103801 4288443033 4285474645 4287511406 4289750656 4286722664 4286133603 4288702881 4287456138 4284358238 4283635772 4284685161 4285147748 4287788449 4288113326 4286073469 4286859396 4284883774 4285278825 4284685385 4283896131 4284292160 4285078602 4284752973 4284686408 4284095813 4284554569 4284293963 4284095551 4284622167 4284159289 4283961924 4287050567 4285272893 4282778686 4286457419 4288694358 4289817971 4288429943 4292583812 4291527288 4286461014 4282778422 4283305541 4283502908 4283762746 4283436345 4283500344 4283960896 4291990134 4290667879 4290139994 4291261311 4292656554 4292785570 4292591284 4293383355 4288836969 4282713155 4284094789 4285144644 4286060870 4286915655 4289609035 4290857814 4292238180 4291058512 4292105569 4292370537 4292307816 4292043623 4293355628 4292505721 4292639098 4293095784 4292966012 4292903285 4292838518 4293296520 4293234812 4293235324 4293629306 4293698954 4293239967 4293237892 4293634465 4293302663 4293303178 4293304716 4292908687 4293431424 4292577928 4293430891 4292706186 4292833124 4292835950 4292898148 4292704893 4292243319 4292832615 4292109673 4291842910 4292175978 4292109154 4292438881 4292443272 4292840088 4293571488 4294103490 4294040264 4294234047 4292649892 4292448386 4292778131 4292643205 4292708736 4292509576 4292639846 4292309878 4292440948 4292500581 4292108136 4291780454 4291257187 4290530384 4288361292 4286456392 4284618819 4284553534 4285602111 4285074227 4286455880 4287514448 4284810810 4284352586 4284482366 4292055184 4292978334 4290607995 4292124302 4287840095 4283826747 4284090420 4284288051 4286394188 4285277002 4284881472 4284291134 4287177799 4290407023 4291394414 4291130230 4290670953 4291660429 4292125317 4292056982 4292253032 4291659650 4292120191 4292119424 4291856769 4291856769 4291463032 4291725182 4291461758 4292117372 4291791231 4291199858 4291331197 4291133817 4291133817 4291331196 4291396732 4291068541 4291199344 4291134079 4290673782 4290936954 4290739318 4290282625 4290542455 4291000437 4290080885 4290015094 4290406258 4290345852 4292318585 4292982153 4293507204 4293572465 4293574037 4293704582 4293835652 4293376900 4293376898 4293442436 4293441676 4293639534 4293443996 4293375367 4293182595 4293181342 4293773212 4293247903 4294233759 4293445539 4293511330 4293576865 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4287574345 4287048776 4287050828 4287704132 4287051862 4287115336 4287181385 4287179849 4286785095 4286851912 4286324808 4286585928 4285798725 4287571015 4289870410 4291453787 4292706416 4292575598 4293167218 4293694082 4293171066 4293566336 4293566337 4293630322 4293501316 4293698424 4293500545 4293564796 4293366650 4293361513 4292833888 4291978319 4289610320 4288752454 4287771466 4288821066 4288756820 4289547878 4289019470 4289676887 4289939030 4290793559 4291119960 4291054170 4290332290 4287319195 4290291909 4289563555 4288111492 4285343330 4286397032 4289488016 4287058829 4285275216 4288770994 4287192199 4284750426 4284752724 4285015908 4285214815 4283895646 4285085792 4288841656 4286595696 4287457175 4284224337 4285212499 4285276744 4284357723 4284292166 4285802828 4284158528 4284094534 4284423236 4283897142 4284614985 4283963717 4284358211 4287785870 4283827768 4284746038 4286196296 4283438151 4283564092 4289022823 4289225336 4287903840 4289153611 4293242529 4291594109 4285999435 4283043144 4283369533 4283568450 4283173182 4284219459 4288038485 4292314729 4290329678 4290009189 4292588208 4292849317 4293445043 4293316022 4292264619 4283301955 4283106363 4283832900 4285929790 4285864261 4287504202 4289413960 4290399064 4291448403 4291714658 4291910503 4292042850 4292109416 4292633450 4292570473 4293161064 4292965243 4292902519 4293098628 4292967047 4293427823 4292969349 4293495685 4293299602 4293236879 4292908190 4293302920 4293238691 4293631607 4293239180 4293300366 4293235585 4293761401 4292906642 4293626758 4292969096 4292771943 4292575103 4292964197 4292112778 4292962917 4292963175 4292175977 4292042589 4291715676 4292039521 4292175464 4291978615 4293032311 4293230480 4293173419 4293838774 4294040521 4294169024 4292978345 4292643725 4293103482 4292907646 4292115844 4292835958 4292117385 4292834167 4292374899 4291978104 4291912802 4292109920 4291517796 4290792529 4287438919 4285535550 4283960644 4285603652 4285336634 4285209924 4286458442 4287512145 4284483380 4284024901 4284155706 4291003528 4292978846 4291064709 4291857020 4288963444 4284488517 4283762233 4283960383 4286064461 4285078341 4284227143 4285271871 4288165962 4290605170 4291262829 4291130229 4290670698 4291725433 4292255372 4292057218 4292118658 4292119425 4292119160 4291792510 4291659390 4291856760 4291922562 4291921018 4291594370 4291134323 4291199868 4291528576 4291133816 4291331196 4291528575 4291133817 4291002748 4291199609 4291199611 4291067511 4291265402 4291265402 4291330682 4290870647 4290542712 4290540661 4290345593 4289950585 4289753977 4291856499 4292780423 4293177227 4293377153 4293837192 4293311105 4293900663 4293311364 4293442692 4293374089 4293442690 4292982663 4293639571 4293179539 4293772939 4293511336 4293839776 4293839520 4293839777 4293904024 4293511332 4293772698 4293183142 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4287574088 4287050839 4287114323 4287705429 4287113539 4287181131 4287246679 4287310673 4286197322 4286917191 4286456904 4285602115 4285996361 4286325575 4290396237 4291255643 4292704620 4292838015 4293167217 4293170812 4293632384 4293566336 4293630335 4293172615 4293566851 4293697648 4293501318 4293562737 4293626481 4292968557 4292899424 4292174159 4289020752 4288228167 4287180358 4288293968 4289417569 4290477488 4289609291 4289675087 4290660945 4290132566 4290860658 4290804914 4289700012 4289956503 4287058030 4285212242 4284485963 4287052401 4290217902 4288502921 4285342287 4288579002 4287453300 4283633465 4284157284 4287256200 4285410149 4285872498 4284289371 4287128238 4289037500 4287057026 4289104824 4284947801 4284752711 4285146965 4285212244 4285143359 4286132823 4283766341 4284489279 4283830080 4284290114 4284227400 4283761224 4284555343 4286004310 4284748858 4285211463 4286062148 4283959614 4286455115 4288694622 4289823382 4290800230 4286584908 4290727515 4292189570 4292057233 4284419389 4283239490 4283305288 4284025158 4283957301 4290411895 4290863463 4289678424 4291125861 4292988605 4292918966 4293248447 4293845191 4286658352 4282778169 4283567171 4284881727 4286722127 4285733704 4288032586 4289410636 4290264908 4291384403 4291711323 4292109157 4292172137 4291977058 4292568170 4292700008 4292964987 4292767330 4292966524 4292705418 4293099615 4292969112 4292967807 4293101458 4293038965 4293694076 4293304979 4293237390 4293239178 4293630588 4293239180 4293300366 4293302670 4293037210 4293562244 4293103223 4292706424 4292772203 4293095033 4291977062 4292504933 4292175462 4292244349 4292307040 4292172138 4292172901 4292238687 4292106595 4293029736 4292570482 4292904847 4293238677 4293838518 4294038982 4294170310 4292979108 4292381815 4293166996 4292185476 4292968851 4292246391 4292771193 4292308594 4292833914 4292108897 4292109434 4291387491 4291713883 4289874005 4286522182 4285210185 4284095554 4285538380 4285210435 4286193225 4286262092 4288169551 4283893567 4283762999 4284284991 4290869120 4292517020 4291261063 4291266693 4290077821 4284947010 4283305279 4284618302 4285668412 4285210695 4284093763 4284812095 4288633948 4291589229 4291199601 4291129972 4291132280 4292186503 4292382596 4292187776 4291858292 4292118906 4292120183 4291790712 4291922306 4291463033 4291528567 4291463042 4291527294 4291856502 4291593851 4291265404 4291002748 4291133817 4291133817 4291199353 4291396988 4291067768 4291133048 4290939767 4290739320 4290802548 4290348669 4291001975 4290279544 4290936697 4290210922 4289360750 4290936435 4292253297 4292979851 4293508737 4293574295 4293113453 4293640087 4293374090 4293377412 4293178235 4293638015 4293769863 4293836931 4293114759 4293575579 4293641630 4293839520 4293839274 4293644455 4293379745 4294233759 4293313439 4293379231 4293445022 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4287576401 4287639379 4287050570 4287116105 4287181655 4287246419 4286067017 4286852937 4286917191 4286916680 4286521929 4285274173 4285598781 4287113032 4290005069 4291321180 4292704877 4292773231 4293299064 4293693563 4293171334 4293632127 4292844157 4293236346 4293566851 4293501575 4293699452 4293497970 4293628021 4292968300 4292964959 4291386204 4289938515 4288162886 4288555080 4287636291 4289551208 4290148237 4288953423 4289083477 4290072949 4290741425 4291143094 4290805642 4290934662 4287903083 4283039798 4284095059 4286195824 4289491094 4291665081 4287052908 4287985070 4286332520 4283895626 4284290155 4283572301 4287656629 4285546348 4285081722 4284754026 4288912581 4288118441 4288241315 4286930047 4287059083 4283962426 4285012826 4285347429 4284949329 4285539686 4284091193 4283697990 4283830082 4283566912 4283833167 4284091712 4285801283 4287706954 4287771468 4287576401 4284484408 4287576159 4287509082 4288306049 4291991698 4292514441 4287836489 4285405763 4291323488 4292843637 4286260552 4283041331 4283435323 4282843953 4286330706 4292251261 4290268507 4288958557 4292453788 4293510836 4293380025 4293842107 4290613870 4282384440 4283697471 4283500606 4285078084 4287049294 4285664320 4288030023 4289017932 4290397001 4291121754 4291384159 4291386197 4292241002 4292109666 4292699243 4292110695 4292633958 4292966273 4293096041 4293098853 4292706442 4292904055 4292970365 4293166471 4293297807 4293232511 4293235345 4293697145 4293233552 4293235842 4293302159 4293301376 4293301633 4293302401 4293036421 4293364880 4293035143 4292837994 4292308840 4292240999 4292505192 4292307048 4292306790 4292438633 4291584358 4292433503 4291647062 4292238440 4291845735 4292764259 4292774048 4293305002 4293839029 4294038468 4294104260 4293575102 4292774264 4292777869 4292903049 4292642428 4293031287 4292704379 4292374387 4292439137 4291978106 4292174949 4292106849 4291256929 4288754505 4286980167 4284156233 4283830854 4285144389 4286261321 4285536576 4286917448 4287972700 4284351027 4283763014 4284416837 4289424233 4292387226 4290474096 4291988615 4290540411 4284753477 4283368248 4285013314 4285209927 4284751687 4284023875 4285934412 4289813873 4291394415 4291392865 4290670453 4291263601 4291990650 4292120958 4292054653 4292448136 4291858550 4292119161 4292119427 4291331704 4292250745 4291791235 4292119156 4291528578 4291134330 4291658632 4291462772 4291133817 4291331196 4291199352 4290742147 4291068285 4291328875 4290479730 4291001979 4291133559 4290805369 4291462266 4290279543 4291068281 4290016376 4289820026 4290277238 4292119666 4292127376 4293441913 4293376902 4293901685 4293574296 4293572723 4293375341 4293833861 4293442694 4293245042 4292984708 4293377433 4293707147 4293970075 4293773729 4293644959 4293644199 4293839776 4294233513 4293576091 4293575062 4293379487 4293575329 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4287574602 4287574859 4287640394 4287114068 4287183438 4287181653 4287378516 4286786633 4286258503 4286457672 4285932361 4285862978 4285272635 4286589260 4289869380 4291519062 4292703341 4292575068 4293363843 4293300863 4293238661 4293565056 4293630592 4293566076 4293565562 4293500546 4293697906 4293496959 4293562484 4293427049 4292507232 4291714131 4289280586 4288293959 4287770696 4287704134 4289935945 4291268772 4289350275 4290073726 4291404201 4291658639 4289548150 4289883286 4290016401 4285867597 4284618066 4286328692 4289165723 4289560491 4287052626 4288177556 4287052126 4284750663 4284951155 4284095819 4286269569 4286531707 4287394217 4285544581 4286798237 4288512684 4286533760 4288970686 4285476949 4288974254 4284815701 4285212756 4285411419 4284357702 4285277771 4284354373 4283566135 4283436351 4283238456 4284025152 4285342282 4288496709 4290146686 4289085008 4287310406 4284548670 4288364376 4288040590 4290739343 4293242779 4293309078 4289814379 4283105348 4288034884 4290150008 4284815687 4283172661 4283369782 4282974260 4291066751 4290800990 4289683046 4290601062 4292720815 4293248688 4293314742 4291870107 4283170856 4283107385 4284156736 4282976056 4285670208 4287379276 4286191173 4288030024 4289081673 4290333777 4291182669 4291779429 4291582821 4292436329 4292042601 4291845991 4292633188 4292832874 4292961385 4292572537 4292769673 4293098626 4292903815 4293426035 4293166729 4293102981 4293100676 4293365118 4292908433 4293102474 4293302144 4293300880 4293302669 4293234065 4293429382 4293561223 4292969847 4293100149 4292639871 4292570981 4292637544 4292108648 4292109160 4292373096 4291649125 4292303716 4292106083 4291911005 4291845218 4292171880 4292573028 4292576140 4293303947 4293506229 4294103746 4294040264 4294102213 4292312425 4292708999 4292445820 4292705913 4292510317 4292376694 4292636807 4292109942 4292174435 4292438888 4291779686 4290529870 4288755787 4285406021 4283568955 4284292163 4284947012 4286129995 4285998663 4286722380 4288693843 4284221235 4283763001 4284024379 4289547635 4292057752 4290938768 4291267982 4290674309 4285341003 4282909745 4285207875 4284620098 4284157245 4284288058 4287050835 4291194481 4291265393 4291194731 4291064180 4291331968 4292513671 4291858801 4292120445 4292053624 4292315251 4291921796 4292119672 4292053376 4291331706 4291922552 4291265664 4291594360 4291592831 4291397235 4291725443 4290936955 4291396732 4291200128 4290478959 4291527805 4290282875 4291330426 4290936954 4290870904 4290672748 4290673528 4290214521 4290540652 4289623161 4290472306 4291722864 4292451207 4293308807 4293441932 4293377655 4293770619 4293311363 4293769609 4293572222 4293376395 4293376897 4293441923 4293772943 4293509528 4293839779 4293773729 4294167965 4293839017 4293839262 4293840044 4293184671 4293905312 4293247903 4293772955 4293707418 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4287509078 4287575372 4287574615 4287181897 4286655314 4287246931 4286655304 4287374918 4286917707 4286455880 4286257475 4285406015 4285138744 4286650950 4289872974 4291584348 4292243815 4293165694 4293169515 4292909196 4293236869 4293565817 4293566593 4293564788 4293500028 4293698424 4293500801 4293565041 4293627765 4292968301 4292964193 4291453007 4289609041 4287508554 4288555079 4287770183 4288623433 4290269780 4291989405 4290804116 4290402941 4289152113 4289287297 4290733183 4290142828 4287639141 4285866853 4288628081 4290016907 4287451519 4285085049 4286928002 4285676391 4287393185 4284157509 4285806462 4287782809 4285674868 4288120501 4285339731 4287327651 4286932134 4287913632 4288717245 4286197618 4289039025 4284816457 4284354115 4284619077 4284752973 4285343309 4284092987 4283829312 4284157769 4283566389 4286261845 4285013069 4286194758 4289616227 4289414480 4285927232 4285937260 4287186793 4289949553 4289674057 4293441438 4293116066 4291919739 4283826744 4286191679 4287906383 4283105330 4283369781 4282975797 4286063672 4291594102 4290990166 4290074463 4291659422 4293184184 4293511348 4293842617 4284553533 4283042618 4284090688 4283566911 4283893567 4284948288 4288758367 4285996614 4287507015 4288557388 4290462285 4291448140 4291710041 4291979875 4292432733 4291977314 4292959851 4292309096 4292634218 4292963434 4292963961 4292903030 4293226617 4292903541 4292901496 4292969611 4293562247 4293099393 4293100932 4293363593 4293363831 4292972434 4293299834 4292972951 4293300090 4293693567 4292973182 4293232269 4292901499 4292901226 4292373095 4292307049 4292240744 4292042600 4292174181 4291912804 4291910754 4291515474 4292105828 4292238681 4292106599 4292569976 4292967057 4293299082 4293570727 4294103747 4294042573 4294038208 4292511120 4292514429 4292772475 4292509833 4292574054 4292180106 4292767606 4292504672 4292241786 4291714660 4291845725 4290071379 4288164434 4284550983 4284092236 4284685389 4284224053 4286785353 4285866055 4287377996 4287379792 4284613173 4283697467 4284812859 4287973471 4292253079 4291859103 4291394939 4290347143 4285538375 4282779194 4285604422 4283633211 4284685892 4284550474 4288105306 4291130985 4291197037 4291194987 4291065452 4292185465 4292384125 4292120959 4291923829 4292119936 4291725690 4292050540 4291725938 4291791227 4292185199 4291658884 4291725172 4291527804 4291922561 4291594115 4291199858 4291331197 4291133560 4291594110 4291200128 4291199609 4290936442 4291265145 4291133560 4290411127 4290477177 4290936696 4290804856 4290148729 4290082424 4290211701 4291790975 4293045639 4293244272 4293902732 4293769861 4293508758 4293374848 4293507446 4293770375 4293310601 4293639315 4292984448 4293903512 4293774242 4294167710 4293644189 4293839009 4293645216 4293839009 4293644188 4293839263 4293445550 4293839774 4293445537 4293511342 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4288033353 4287509844 4287576400 4287114054 4286657879 4287244880 4286721864 4286853197 4286326855 4285932104 4285733700 4285271868 4285272893 4286647620 4289935684 4291388001 4292311142 4292838766 4292970375 4293694078 4293565311 4293566336 4293566079 4293566852 4293500545 4293698423 4293499771 4293565560 4293561973 4293756267 4292442450 4292105816 4289149514 4288818247 4287768648 4288556615 4287510350 4289150799 4289545555 4290466915 4289421708 4289031839 4289490835 4290145697 4291129992 4287249262 4284223820 4286135918 4288243090 4286659955 4286859912 4286791277 4287257758 4283895362 4286269579 4286728583 4285737577 4287396272 4287123580 4285805954 4286800283 4286202494 4287851428 4289898167 4286063988 4285747829 4284951139 4283369778 4283700809 4284093258 4284621387 4284489544 4284484425 4283962430 4283830606 4284487740 4285547641 4287055466 4286461523 4288232796 4285998158 4291137424 4290865503 4290335837 4287637832 4286915400 4289752161 4287976021 4284286516 4283763512 4285471307 4283370547 4283173701 4283170858 4288765300 4292115302 4290073955 4290207082 4293050043 4293907125 4293841334 4286929493 4283170860 4284027202 4284091705 4283959616 4283631159 4285999954 4288235341 4286650439 4287312199 4289607756 4289674833 4291119433 4291385435 4292236643 4291650151 4292175209 4292109672 4292435041 4292634730 4293160299 4292505979 4292965241 4292900983 4292967547 4292901753 4292903030 4293228402 4292970621 4293230979 4292838259 4292970383 4293103241 4293693310 4293167747 4292969871 4293298560 4293035133 4292969849 4292836459 4292309625 4292703080 4291649114 4291517285 4292237922 4292109415 4292309370 4292367201 4292238693 4291911010 4291514457 4292042601 4292373344 4292837769 4293168767 4293173928 4293973185 4294042060 4294170053 4292710796 4292707970 4292315019 4292706165 4292706684 4292376693 4292636511 4292177289 4291256419 4292370538 4290600029 4289478234 4286979907 4283239238 4284027718 4284749883 4285146446 4286654791 4285736778 4287376198 4287444046 4285404479 4283697204 4283697466 4288755038 4292580737 4291465626 4291788413 4290871928 4287315039 4283631931 4284488511 4284025145 4284550724 4285801031 4289222496 4291198588 4291525238 4291129451 4291589223 4292119427 4292055677 4292119422 4292120703 4292119159 4292119684 4291528559 4292249462 4291397489 4292251013 4291200373 4291988099 4291332731 4291725182 4291396981 4291658621 4291397236 4291594111 4291134335 4291068284 4291001975 4291462516 4290676612 4290936688 4291002747 4290868597 4290477176 4290674296 4289949045 4290277238 4290936692 4292977529 4292851081 4293835653 4293705861 4293311365 4293900150 4293311623 4293572726 4293311363 4293835140 4293051527 4293903513 4293381019 4294167711 4293578654 4293446054 4293839264 4293839265 4293839264 4293644200 4293839274 4293839528 4293839530 4293839529 4293839517 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4287967827 4287509837 4287509065 4287575128 4287705159 4287114824 4287181900 4286788429 4286915143 4286520904 4285668163 4285601085 4284483127 4286388544 4289348169 4291384917 4292505438 4292575856 4293168764 4293170567 4293630847 4293566335 4293566336 4293500544 4293763958 4293501575 4293566851 4293564541 4293562989 4293427563 4293293397 4291517523 4290068302 4288164426 4287967047 4287770953 4288754247 4288951117 4289153633 4290275459 4290008976 4289481573 4290669442 4290671495 4289292177 4286063692 4286064999 4287450750 4286721123 4286135656 4287915164 4287386251 4285538915 4286399861 4286664319 4285738888 4285082721 4288776887 4284683880 4284817472 4286801571 4285737063 4287852963 4289241524 4286724487 4284624459 4287848865 4283367482 4283700036 4284817482 4283960888 4284421708 4285408069 4284488263 4284290372 4284154939 4285079366 4287054703 4285602882 4286916697 4289023309 4291529620 4290854725 4288622658 4285600059 4287192696 4287515494 4284553289 4283500857 4284422462 4284421449 4283040818 4283830582 4287776347 4291129439 4290268248 4291124061 4291661193 4293644978 4292121462 4290745729 4283105335 4283172922 4283238714 4284091707 4284091707 4284023864 4285738046 4289223534 4286323268 4288554570 4289016393 4290198603 4290791244 4291318872 4291059290 4292303454 4292305760 4292501094 4292242024 4292767338 4292370537 4293158249 4292703591 4293294206 4292705386 4293099912 4292968566 4292444538 4293097863 4293033857 4293232517 4293166472 4293100423 4293300860 4292970126 4293168260 4293363595 4292708220 4292575097 4292705658 4292377212 4292372833 4292171620 4291579992 4292436330 4292043367 4292896616 4292044134 4292106344 4292040806 4292105569 4291980388 4292633723 4292639858 4293169046 4293566873 4293773497 4294043856 4294169797 4292714127 4292572516 4292573828 4292901511 4292706682 4292442487 4291915129 4292241525 4292173415 4291584356 4290992738 4288823379 4284484920 4283765056 4283963975 4284815687 4284417852 4286521416 4287049289 4286787661 4286983754 4285142078 4284090421 4284680245 4286393166 4291266959 4292054674 4291197321 4291727235 4288305260 4283896121 4284419897 4283371323 4283435332 4287247175 4290141544 4292052327 4291657581 4291128681 4291265917 4292516227 4292054663 4292119928 4291790712 4291790978 4291790968 4291922555 4291659130 4291790712 4291200118 4291986296 4291725174 4291133821 4291790975 4291396981 4291397246 4291789704 4290674040 4291528565 4291330941 4291331188 4291133810 4291330169 4291133304 4291133561 4291066988 4290739578 4290474870 4290538355 4290147692 4292253820 4292977801 4293508479 4293706651 4293704325 4293507188 4293704842 4293572724 4293376899 4293573779 4293509770 4293837188 4293774244 4294167711 4294102174 4293578654 4293839265 4294167969 4293969815 4293445539 4293445281 4293839518 4293250206 4293839517 4293839273 4293839528 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4287969872 4287443273 4288099928 4287508294 4287640396 4287050060 4287771209 4286653255 4286848840 4286324552 4286651978 4285533497 4284549175 4286386752 4289607496 4291387481 4292703582 4293101169 4293298807 4293694068 4293237888 4293172358 4293566335 4293566079 4293501315 4293501058 4293567622 4293565302 4293563520 4293558632 4292441441 4291649109 4289807949 4287703878 4287307845 4288228169 4289543524 4289687943 4291654557 4290075505 4290464342 4289352826 4290401404 4290729319 4288691812 4285539677 4287050606 4287319659 4286195557 4286729095 4289099950 4286134372 4286135921 4286134637 4286197878 4284290636 4287984291 4287390356 4283239223 4285082495 4288775356 4285475168 4287062700 4288715442 4287782298 4284223800 4288708792 4283500848 4283765324 4284354900 4284620885 4286399851 4284618048 4283829821 4283106872 4284685901 4285867338 4286725484 4288764260 4287979136 4288560467 4291852120 4292057997 4290474098 4288300908 4287842384 4285605706 4284091192 4283500602 4284421702 4283107133 4283367485 4288379802 4291394954 4289816933 4288563810 4288236389 4291330673 4291002998 4290809491 4290414472 4285539917 4284220985 4283435066 4284812347 4283960371 4284159052 4286326590 4288764011 4287439431 4287900231 4288622921 4289151822 4291447889 4291383639 4292236128 4292043624 4292172131 4292106851 4292109416 4292765802 4292832616 4292964733 4292572279 4293096296 4292507771 4293098599 4292903288 4293360244 4292903285 4292706182 4292904061 4293167226 4293100937 4293363593 4293166215 4293168258 4292972145 4293033348 4292967292 4292440420 4292703849 4291515234 4291119184 4291581278 4292109416 4292965225 4292244087 4292766586 4292834412 4292108903 4292172643 4292172138 4292439909 4292637050 4292971165 4293632666 4293838520 4294044369 4294169797 4292777874 4292050540 4292377463 4292379002 4292576106 4292177288 4292569954 4291912291 4291651946 4291058524 4290139742 4287244872 4283960899 4283961668 4284553532 4284751431 4284619324 4287178312 4286264141 4286851913 4286984011 4285601854 4283631669 4283632441 4286319675 4290740603 4291797404 4291528340 4292317046 4289028987 4285600830 4283765816 4283173706 4284418867 4288498785 4290344822 4291656816 4291330426 4291393909 4292248173 4291662725 4292118902 4291725176 4291856760 4291790978 4292185209 4291265912 4291789690 4291265910 4292184962 4291134068 4291790712 4291988336 4291396991 4291462783 4291725433 4290676852 4291593855 4291462784 4291462774 4291331197 4291264634 4290089859 4291133047 4291002482 4290739578 4290673005 4289751146 4290081142 4291000186 4292319614 4293047412 4293574293 4293837429 4293704327 4293704585 4293834614 4293311364 4293574037 4293705600 4293705876 4293641888 4293839265 4293578654 4293773729 4294167710 4293839522 4293248387 4293445542 4293839519 4293839530 4293445288 4293776308 4293510571 4293250470 4293839536 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4288559951 4287314522 4288099401 4287509839 4287050572 4287705161 4287050058 4287245383 4286721096 4286913864 4286520649 4284878134 4284549175 4286714694 4289347662 4291321430 4292507243 4292967529 4293365892 4293236864 4293236870 4293632127 4293566335 4293566079 4293501315 4293764729 4293500290 4293564528 4293562745 4293099884 4292900188 4291976024 4290002510 4287506507 4287639113 4289481865 4290608278 4291261064 4290005329 4289675875 4290464592 4289811591 4290008175 4290731111 4287445101 4286459757 4285080893 4287382151 4286594945 4288705699 4287717516 4286199142 4286728051 4285082721 4286070646 4283500867 4288777416 4286004843 4283106387 4285344612 4287791022 4285935757 4286335086 4289240504 4288965291 4283171891 4287261836 4284750939 4284554056 4285872495 4285475663 4284026686 4284616511 4286065484 4282975794 4284157768 4285537599 4287575882 4289887339 4290075221 4284416830 4285210186 4287970130 4289682287 4284553532 4283698488 4283566131 4283370805 4284025139 4283632965 4282974254 4286204775 4292978838 4292908422 4292317060 4291463297 4290280591 4289624208 4291474855 4292849030 4289220433 4284088371 4283369781 4284290623 4284682810 4283960384 4283958084 4286001476 4289748327 4287835722 4287177287 4289083469 4290526534 4291121754 4291777373 4291780960 4291908445 4292175978 4292106850 4292699499 4292502378 4292568937 4293161064 4292572539 4292965245 4292965241 4292900727 4293098374 4292444793 4293294710 4293035655 4293034354 4292969351 4293231481 4292772471 4293234311 4292839290 4293034633 4293100936 4292444523 4292704124 4292639850 4291648358 4291117636 4292433761 4292766059 4292899436 4292897642 4292967023 4292505703 4292967023 4292304740 4291842902 4291911256 4292900461 4293625724 4293109665 4293838764 4294104008 4294301885 4292186764 4292442230 4292770936 4292377719 4292768123 4292636510 4292571768 4291912548 4291977057 4291649377 4289219159 4284617279 4283436358 4284289356 4284486211 4284554051 4284946756 4285998920 4286393418 4286917191 4286982987 4285536575 4284025651 4285011526 4283960636 4291131774 4292319893 4292117909 4291593346 4289949291 4284947776 4283567935 4283238455 4283761730 4288698470 4292049015 4292575081 4291919451 4290999148 4292119931 4292513661 4291727492 4292186502 4291790977 4292185208 4292119675 4291331437 4291528062 4291987326 4291265645 4291856504 4291331446 4291396992 4291265403 4290936955 4291265404 4291593855 4291265404 4291265395 4291528568 4291199354 4290805360 4291395706 4291330937 4290870904 4290146421 4290474870 4290343286 4290671733 4292251517 4292713602 4293509252 4293508500 4293836151 4293311366 4293506931 4293508760 4293376642 4293507450 4293640598 4293838232 4293904538 4294102430 4293773729 4293773729 4293773729 4293839520 4293511077 4293905312 4293839264 4293250207 4293905567 4293249960 4293709732 4293904819 4293445545 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4287316560 4288689741 4287312459 4288100430 4287509067 4287575631 4287639881 4287048522 4287245127 4286849096 4286456905 4285730622 4284941368 4287047240 4289217615 4292108639 4292111202 4292837486 4293169267 4293236865 4293631103 4293564799 4293172357 4293566335 4293566079 4293500033 4293764729 4293501059 4293563518 4293362798 4292964703 4291518811 4290135889 4289283178 4289748615 4289617254 4289940053 4288887371 4288954191 4290069338 4290070620 4289420669 4291191933 4290074740 4286921323 4285801296 4284557409 4287975557 4287058824 4287783564 4287517561 4286920822 4285806693 4283827790 4285145964 4286799267 4287657107 4285804898 4283699796 4283306573 4287984814 4286925697 4285080947 4289041838 4289432248 4284287822 4286142847 4288510113 4283435084 4284816445 4284421445 4283766073 4285208125 4287447652 4283695928 4283698746 4284161355 4285608808 4284879935 4283368501 4284155707 4283829299 4286595184 4288702331 4287247954 4284221233 4283370560 4283565888 4284486215 4283304250 4282515495 4290026403 4291989382 4292713625 4292124827 4292714139 4293175951 4293375380 4292849554 4289683809 4284746551 4283697206 4284352822 4283698742 4285076019 4284485442 4283827253 4286525781 4288633190 4288426825 4287635523 4289541964 4290068049 4291121489 4291516759 4292041822 4292043366 4292304995 4292696679 4291845992 4292568170 4292962155 4292899195 4293160553 4292705130 4293096299 4292900476 4292903799 4292967290 4292901754 4292901239 4292706184 4293297529 4292838521 4293232267 4292839048 4293034629 4293035639 4292707467 4292444522 4292704121 4292441718 4291516006 4291576910 4292303714 4292964206 4292439638 4292831321 4292827461 4292702308 4293028960 4292109159 4292104801 4292366173 4292305514 4292901756 4293697143 4293508023 4293838240 4293708731 4292114285 4292377207 4292770936 4292312185 4292770168 4292244870 4291390587 4292043620 4291256418 4291189597 4287112784 4283632972 4284748859 4283372354 4284159051 4284489803 4284815683 4286586696 4286919757 4286391367 4287049292 4284811573 4285402942 4284876867 4283957309 4288897396 4292123807 4291730075 4291131504 4289751934 4285865288 4284157753 4282975812 4284878652 4289748072 4291790708 4292116580 4291460463 4291394426 4292121982 4291726462 4291857015 4291790977 4291856759 4291397241 4291856761 4291790721 4291725174 4291528569 4291790976 4291134076 4291856511 4291594104 4291856511 4291528575 4291331196 4290936955 4291594110 4291265406 4291331188 4291068542 4291462527 4290479472 4290674052 4290936438 4290805112 4290474613 4289819769 4290474099 4292449681 4292982152 4293572222 4293706118 4293704327 4293311107 4293704584 4293834613 4293705863 4293705347 4293838234 4293182855 4293839523 4293773985 4293773729 4294167965 4293839264 4293446309 4293576609 4293051556 4293839274 4293775268 4293511351 4293775267 4293709731 4293445299 4293839526 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4287968331 4287903823 4287967048 4287967820 4288033612 4287443017 4287573062 4287705930 4287176775 4286784584 4286325832 4286586185 4285403967 4288030791 4289807952 4291585891 4292704621 4292575599 4293168510 4293628801 4293169023 4293632383 4293172357 4293566335 4293500544 4293764729 4293501060 4293566074 4293562488 4293165419 4292506717 4291583588 4290336625 4288758618 4287046722 4288358467 4287968333 4289282892 4289478738 4289807187 4290660946 4290138481 4290534278 4288764039 4287510111 4287312746 4285737062 4287910022 4286922622 4289035168 4288634778 4286921062 4285410926 4282843187 4284820602 4289637316 4287972482 4284818762 4285937539 4283631709 4287391632 4287388563 4286134918 4288315565 4291083200 4285540219 4284821075 4290158522 4283762751 4284357440 4283898185 4286724712 4285407045 4287381328 4283105841 4283501640 4283503418 4284684858 4285344354 4285015379 4283567180 4289954207 4290352550 4284088366 4283826742 4283632454 4283830594 4284619320 4283172928 4283303731 4283435330 4292655524 4292193444 4292785306 4292585884 4292588970 4292128666 4292128159 4288369500 4284024376 4284024628 4283501366 4283828540 4284485171 4284880204 4284549944 4284286534 4286065475 4288894313 4287902795 4288686409 4290067534 4289543505 4291120971 4291777632 4291778387 4292236888 4292107110 4292501854 4292435808 4292568171 4292767337 4293159787 4292702310 4293095051 4293028967 4292904315 4293096556 4293229685 4292837752 4293100663 4292968563 4292706183 4292903302 4292970106 4293230721 4293232261 4292839553 4293298057 4292966778 4292640380 4292832889 4291979874 4292235370 4292110181 4292831838 4292042844 4286385727 4284416064 4288159299 4290329157 4291054416 4292106837 4292108378 4292303451 4292436581 4293169304 4293636779 4293839280 4292645248 4292378748 4292379001 4292770680 4292576109 4292571748 4292440182 4292239459 4292043878 4291191648 4289152340 4284552255 4284354370 4283766348 4284094788 4284424785 4285473871 4285471547 4286326088 4287511120 4285275204 4287114828 4285074998 4285339963 4284418867 4283891768 4289224318 4292711577 4291664283 4291194733 4290609799 4286067279 4283764035 4283633485 4286132052 4290734187 4291462518 4291986289 4291525742 4291134324 4292513927 4292121469 4291791486 4291856769 4291856769 4291922562 4291725183 4291134067 4291593853 4291397238 4291789433 4291659379 4291396990 4291462783 4291265395 4291133561 4291133818 4291462268 4290611074 4291396724 4291199603 4290673778 4291199603 4291330674 4290476663 4290476923 4290805112 4290345337 4289227628 4291790709 4292255872 4293111182 4293835128 4293836153 4293836152 4293705863 4293705862 4293638534 4293705347 4293641614 4293904540 4293969819 4294167967 4293575835 4293839776 4293379747 4293839262 4293840289 4293839262 4293709734 4293709476 4293315506 4293315745 4293315503 4293904560 4293709987 4293445291 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4287967049 4287968587 4287968844 4287312716 4287968073 4288032841 4287510608 4287048519 4287178056 4287242823 4286850632 4286325832 4286192712 4288229451 4290992472 4292110947 4292640109 4292772975 4293298807 4293693306 4293238917 4293172358 4293632127 4293566336 4293566079 4293501574 4293566850 4293565057 4293564286 4293297002 4292900705 4291716710 4290595156 4287967046 4287899463 4287770697 4288821582 4289019729 4289413196 4289872724 4289939028 4291055450 4289485434 4288562022 4286853982 4288363877 4286856032 4286596475 4287582343 4291135629 4288040825 4286069100 4283566934 4282974276 4286997912 4288775073 4284750431 4285150566 4287385739 4284359517 4286533513 4286928532 4286726281 4288310690 4289507500 4287712919 4283698759 4289174733 4283961667 4283437903 4284288067 4286987864 4286391875 4285736007 4284748346 4282975288 4283567160 4283238213 4283305023 4286527858 4286261864 4290087579 4290606451 4285007942 4284028479 4283832647 4284948295 4283698752 4283106873 4282318888 4287521411 4292056457 4292777606 4292720807 4292522657 4292524710 4293052076 4290080378 4282843176 4283762740 4284025922 4283762746 4284287808 4284749122 4285405240 4284944954 4284220477 4285802050 4289422964 4287642454 4289800773 4289545295 4290659146 4291053641 4291580496 4291386970 4292236889 4292172890 4291977573 4292436067 4292370027 4292962412 4292570217 4292833131 4292704874 4293032303 4293097070 4292510588 4292967543 4293293688 4292508537 4293098117 4293100147 4292970366 4293429637 4292837509 4292970356 4293230722 4292904587 4292380272 4292901741 4292442215 4292899454 4291710289 4292305503 4293157220 4291056979 4289281358 4287311946 4290136668 4290070355 4289934411 4289016651 4291053388 4292106084 4292371041 4293098858 4293305505 4293375138 4292907671 4292644748 4292769913 4292377722 4292376441 4292375673 4292767840 4292046711 4292109157 4291191391 4286916426 4284159304 4283961925 4284290378 4283765327 4285012537 4284552507 4285537866 4287508295 4286785609 4286457159 4287049807 4285009206 4285404736 4285404480 4283629627 4287709021 4292646791 4292191134 4289422448 4291332225 4286721604 4283369269 4285669447 4288297038 4291066481 4292116852 4292509033 4291853657 4292052349 4292054397 4292118903 4292119426 4291463032 4291331189 4291265653 4291988355 4291331446 4291397248 4291462782 4291462783 4291199611 4291659905 4291265404 4291528310 4291528576 4291331188 4291133809 4290870907 4291199602 4291199603 4291199612 4291265138 4290871163 4290870904 4290936696 4290408821 4290279800 4290539639 4291856499 4292650378 4294030451 4293837197 4293640326 4293638535 4293836151 4293638533 4293836680 4293640083 4293576097 4294102431 4293773985 4293773729 4293839519 4293510828 4293644443 4294167732 4293839011 4293643952 4293709232 4293643940 4293643939 4294298544 4293316530 4293315752 4293510560 4293841064 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4287968076 4287314002 4288555846 4288557129 4287900743 4287968589 4288095814 4287574087 4287113031 4287181642 4287244103 4286719047 4287046983 4289346889 4290729308 4291849833 4292379260 4293100169 4293496186 4292843143 4293302661 4293631865 4293563520 4293566592 4293566079 4293566850 4293566850 4293565818 4293563261 4293494641 4292833373 4291977311 4290003016 4288622922 4288425031 4288363600 4288297546 4289217358 4290069583 4289545559 4290924115 4290073971 4289683590 4289087086 4287711089 4287903858 4286133606 4287513975 4285543531 4287120495 4286460770 4285542267 4282908724 4285810319 4289500082 4287320983 4284948556 4286336644 4286730638 4283369543 4286665863 4287786667 4286072691 4288114088 4288842669 4289495982 4285011025 4289176500 4285343568 4283107127 4283107134 4284813114 4284024899 4288899691 4291065458 4283895612 4283307342 4283369797 4283369525 4282909247 4287521158 4288771214 4285141320 4283500852 4284752464 4285405247 4284619838 4284816468 4284948280 4287444074 4289487967 4290934126 4292120701 4292908933 4292972930 4293765527 4291075983 4285734454 4283631162 4284155962 4284815673 4284944953 4284880184 4284418356 4285470021 4284486201 4284353858 4286525272 4289948785 4289018190 4288358726 4290201160 4291184467 4291647575 4291709525 4291975266 4292173152 4292172889 4292106860 4292501350 4291978594 4293224813 4292634472 4292964728 4292965239 4292966781 4292704362 4292966011 4292574587 4292769643 4292967291 4293099907 4292640648 4293295984 4292968068 4292969604 4293166730 4292969349 4293233019 4292772218 4292967034 4292706942 4292508263 4292107642 4291973983 4291907932 4292109151 4292830310 4292764773 4292569195 4292503136 4292367709 4290664538 4290463056 4291777118 4292103769 4292179591 4293047479 4292649097 4293104269 4292905846 4292509576 4292443253 4292440945 4292505458 4291652236 4291779424 4291587694 4290333787 4284683075 4284029515 4284359242 4284425031 4283698236 4285211993 4284095559 4286194760 4287310406 4286852940 4285670986 4287640395 4284943669 4285404735 4285668415 4282975030 4286130514 4291925394 4292317839 4290409085 4291332231 4287053665 4282974271 4285801545 4288958299 4291263345 4292249194 4291526760 4291263357 4291987828 4292120711 4291726470 4292120958 4291790968 4291856771 4291988089 4291264890 4292315252 4291528051 4291397247 4291265403 4291266689 4291659905 4291133550 4291134337 4291265403 4291528567 4291396734 4291396980 4291002741 4291068533 4291462517 4290673785 4291330940 4291000939 4290936954 4290212470 4290211959 4290540904 4292447874 4293109874 4293312135 4293704325 4293638535 4293706118 4293704326 4293442707 4293837702 4293904799 4294101642 4294036641 4293904024 4293578910 4293839273 4293250463 4294233246 4293773725 4293643954 4293710001 4293644710 4293839015 4293840558 4293250212 4293840044 4293839261 4293839529 4293839271 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4287966278 4288100687 4287377225 4287969104 4287966791 4288030278 4287377994 4287574858 4287045703 4287176778 4287114823 4287115082 4287312714 4289542487 4291190107 4292113273 4292378748 4292708207 4293496188 4293693561 4292842630 4293695103 4293171590 4293171840 4293566335 4293566850 4293502344 4293566333 4293564029 4293297003 4292900450 4291520093 4290201421 4288753993 4287180359 4288358981 4288757586 4289280842 4289217871 4289806930 4291186532 4290405772 4290730353 4288168793 4287052893 4284748882 4286658144 4286926975 4286067039 4286659684 4284359512 4283433017 4285081955 4289431464 4287385470 4285080663 4286728829 4286004858 4286069621 4285604983 4285810534 4287787168 4285802094 4287457966 4287453585 4290226620 4286201739 4288841637 4287124101 4282908720 4283306565 4285801805 4283695163 4291393145 4293435523 4288760148 4283958841 4283304241 4282910545 4283766856 4288639649 4286334829 4284159556 4282581040 4287251823 4286987854 4289813115 4288632169 4289355638 4290676623 4288628553 4289945452 4290795104 4289747053 4291671723 4291547577 4284418097 4283302966 4283500601 4284288064 4285281631 4285287530 4285411927 4284812850 4285008183 4284354105 4284421452 4285802827 4290080886 4288825438 4289080903 4289741646 4291120463 4291841111 4291516238 4291975003 4292040554 4292172640 4292501586 4292177003 4292959839 4292437098 4292436584 4292963452 4293096811 4292899962 4293096043 4292575101 4292966266 4292964474 4292379499 4292901499 4293298035 4292639112 4293034866 4293230978 4293166725 4292970107 4292969351 4293034611 4293099399 4292378730 4292901997 4292703610 4292572004 4292635004 4292235879 4292565605 4292960104 4292502117 4292831588 4291905883 4292299875 4292438649 4292120737 4292716206 4293112245 4293440659 4293040272 4292710804 4292249475 4292576620 4292246664 4292244355 4292571507 4291321960 4292505190 4291454305 4287113549 4284026171 4284357698 4284357965 4283963984 4284226378 4284881987 4284751688 4285405766 4287972430 4286658136 4286916424 4286984267 4285139770 4285339966 4285008188 4284024640 4286189128 4291728012 4292126366 4290407792 4291200903 4288368226 4283960645 4285143874 4290799724 4292379748 4291986300 4292114781 4291461488 4292514441 4292054140 4292186495 4291725167 4292119427 4292185207 4291265921 4291331446 4291659649 4291790710 4291856512 4291199859 4291462783 4291462781 4291724168 4291462772 4291528575 4291199098 4290413695 4291068285 4291462525 4290936699 4291133304 4290936946 4291002482 4290870906 4290214253 4290475626 4290866292 4290805631 4292319099 4293177223 4293900663 4293639047 4293836151 4293638791 4293638531 4293837960 4293904267 4293904283 4294036641 4294036638 4293708193 4294167710 4293773728 4293839265 4293773729 4293773728 4293644700 4293643698 4293839782 4293840039 4293840554 4293511587 4293773725 4294233510 4293379753 4293709743 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4288032841 4287444302 4287509324 4288097350 4287441990 4287312973 4288754505 4287442503 4287769159 4286523207 4287770952 4287507526 4288427607 4289216591 4291126371 4292112508 4292576882 4292970871 4293365633 4293235584 4293760378 4293169537 4293628794 4293564282 4293566336 4293500287 4293764729 4293500801 4293564029 4293492584 4292901470 4291844950 4290594892 4288032844 4287900742 4288362060 4288755789 4289019728 4289544786 4289413715 4290597214 4290141281 4291514218 4290009216 4284486228 4283434052 4285080409 4287056008 4285937766 4285737559 4284944995 4283436366 4288709805 4287712881 4283963977 4284487762 4286727560 4286068854 4285674590 4286796697 4286666127 4287519650 4286070398 4288053168 4286527610 4288517029 4288501409 4288710823 4289100453 4282975030 4283435070 4285734722 4283566149 4290339954 4293107304 4292384888 4284022841 4283238456 4282974264 4286603651 4285734475 4285996608 4285867609 4286133856 4287318348 4289353343 4289419378 4290676108 4292130483 4289950051 4289744220 4289280588 4289746790 4290677898 4294175696 4288959058 4282777671 4283895375 4284222780 4284355389 4284945984 4285736261 4284422725 4285208638 4285209407 4284354111 4284219456 4286526544 4290082425 4288953161 4288493131 4290000973 4291512911 4291580495 4291319131 4291714651 4292236886 4292043361 4292107104 4292106602 4292173667 4292567914 4292700521 4292960363 4292702567 4292963964 4293031021 4292833895 4292573307 4292771692 4292967551 4293031273 4292968581 4293034115 4293033859 4292640390 4292838260 4293232261 4292969604 4293230979 4292708219 4293034374 4292444552 4292900739 4292899687 4292310648 4292568936 4292110694 4292501609 4292441189 4292837767 4292377723 4292114548 4292774550 4293836730 4292984748 4293376428 4292980395 4293041547 4293496720 4292639860 4292575369 4292443253 4292508276 4292111991 4291718006 4291519589 4290860890 4284224317 4284030789 4284353602 4284620612 4284028996 4283505233 4285145929 4285341513 4285998933 4287710289 4287310663 4286790482 4286915398 4286062410 4286459463 4284354360 4284549186 4284549434 4291396744 4292583839 4290209380 4291003526 4287315804 4285208643 4286785101 4291132529 4292117617 4291329389 4292378740 4291068535 4292119924 4292120192 4291331448 4292185209 4291790977 4291397507 4291723887 4291922554 4291922553 4291134076 4291199869 4291855216 4291265661 4291002493 4290742644 4291528319 4291265404 4291133809 4291396734 4291396979 4290805371 4290740084 4291134068 4291133561 4290805112 4290936696 4290082682 4290148730 4289753710 4291659125 4292780148 4293507202 4293704840 4293704326 4293640329 4293835893 4293640858 4293837445 4293772185 4293708450 4294036638 4294102174 4293773729 4293773729 4293773986 4293839521 4293773728 4294102184 4293644715 4293710235 4293315506 4293511338 4293250988 4293315492 4294233253 4293184688 4293839021 4293644719 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4287509067 4287575374 4287574860 4287508553 4287444559 4288688972 4287378508 4287574602 4287047754 4287311943 4286587975 4287574346 4287708493 4289415273 4291126375 4292246641 4292904303 4292970111 4292973446 4293365894 4292842872 4293696122 4293565313 4293566593 4293566079 4293567365 4293501058 4293566592 4293563004 4293298285 4292376432 4292505188 4290003534 4288100172 4287901769 4288427340 4288755789 4289282899 4289281358 4290004052 4289609294 4290531179 4291458179 4292446106 4286260306 4283368260 4285213271 4287056253 4285998158 4286067562 4284552284 4288250283 4287917197 4284555863 4283633495 4284293208 4286265451 4285740914 4285411183 4286665601 4287394468 4287190161 4287783063 4287524251 4285539697 4287458713 4288771494 4288315038 4289564844 4286003569 4283304261 4285146189 4284810809 4287382612 4291262600 4289738814 4284882755 4283107658 4284954450 4284884304 4282977097 4285935694 4289096834 4289223540 4290076037 4289751417 4290940319 4292785572 4291402372 4288690263 4288236366 4289880961 4290278516 4293775048 4291143045 4283435065 4283830861 4284358219 4284358222 4285078082 4285144901 4285145160 4285668676 4285210698 4285077565 4284814140 4283765579 4285870664 4290146946 4288366938 4288555846 4289414736 4290857296 4291384416 4291649120 4292499046 4292173152 4292107097 4292957536 4291911773 4292633699 4292700522 4292634217 4292767081 4293095532 4292703594 4293096557 4292572029 4292835945 4292963447 4292704103 4293098631 4293034115 4292902772 4293231235 4293233016 4293168776 4293034631 4292969605 4293035396 4293099137 4292838798 4292641382 4292641145 4293033340 4292245626 4293226087 4292636794 4292637302 4292969085 4293436046 4292717726 4293162623 4293367688 4293441699 4292918444 4293768619 4292981148 4292712852 4292775803 4292707455 4292444536 4291916923 4292570994 4291321704 4291651709 4291389801 4287904345 4283767114 4284620123 4284423240 4283963470 4284223812 4284161347 4284685388 4286261834 4285799749 4288631119 4286061893 4286857810 4287047754 4285272640 4286787661 4284485943 4284418117 4283498546 4290017924 4292781725 4290076268 4290807174 4287249491 4286654031 4287774542 4291327867 4292182383 4292115295 4292443240 4291988847 4292120713 4291725166 4291858303 4291790977 4291856759 4291922296 4291725184 4291725183 4291922552 4291592832 4291462774 4291462784 4291133561 4291331187 4291330940 4291528575 4291331196 4291133810 4291331188 4291133563 4291594102 4290936442 4291134078 4291132783 4290870904 4290477178 4290343529 4290146679 4290342507 4291660148 4292845963 4293505409 4293507444 4293704585 4293441139 4293640329 4293639551 4293837980 4294101900 4294102176 4294036640 4293773729 4293839521 4293773986 4294101385 4293773730 4293578654 4294167453 4293839777 4293839786 4293709476 4293644712 4294232984 4293643953 4293643940 4293315501 4293840818 4293840569 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4287575631 4287640396 4287048262 4287574346 4287509324 4288033097 4287507017 4287573831 4287180615 4286782536 4286650696 4287573574 4288562258 4290071638 4291060583 4292114813 4292903289 4292643460 4293627002 4293235584 4293694068 4293171075 4293564538 4293565818 4293566851 4293566593 4293501830 4293565817 4293563268 4293232494 4293293913 4291848808 4290398542 4288753480 4287311945 4287246924 4288298065 4288757321 4289348949 4289481044 4290333018 4290800533 4292906137 4290401908 4286067293 4284683614 4285213526 4287188366 4284687455 4286990215 4288113054 4288774825 4285080136 4284751193 4283965527 4284358489 4285937253 4285872246 4284557671 4286069611 4287060382 4286266725 4287389849 4287853218 4286466444 4286469501 4288974256 4287519885 4288315309 4287981721 4285672546 4285606220 4287512184 4287053167 4288694614 4288494960 4285672285 4286263127 4285672011 4282910534 4283043401 4285872745 4290934907 4289951884 4290674309 4292058019 4292519575 4292132535 4288493636 4288236623 4288557157 4290931301 4292262587 4293118114 4284618816 4283962692 4284160068 4284820049 4285474384 4285145934 4284885332 4285605452 4285804109 4285669447 4285732931 4284355918 4284815942 4286459729 4289554805 4288893041 4289149773 4290593618 4290530905 4292236383 4291583334 4292107362 4291844962 4292043109 4291977316 4292109675 4292633701 4292436587 4293161836 4293093996 4293095530 4292702057 4293095274 4292769384 4292963960 4292703370 4292968060 4292510328 4293099654 4292575352 4292706439 4293033859 4293231481 4292643217 4293297265 4292903301 4292969095 4292444008 4292903050 4292508296 4292705402 4292508777 4292640383 4292833381 4292772729 4293168775 4293638314 4293376180 4292644500 4292974717 4293442229 4293704112 4292916390 4292983218 4293106325 4292578183 4292311412 4292441718 4292443771 4292243077 4292308838 4291456112 4291453281 4283896899 4284292937 4283768654 4283636560 4284226377 4283965005 4284425036 4286000213 4286130249 4285734985 4288368209 4286128969 4287378505 4286325831 4285932872 4286652488 4285474117 4284352330 4283958854 4289156203 4292650385 4290149257 4291134852 4287248976 4286657870 4289747059 4291395942 4292116838 4292311925 4291526502 4291987833 4292120703 4292119417 4291790977 4291922304 4291463041 4291528568 4291593597 4291397237 4291331456 4291856502 4291199603 4291462784 4291265403 4291528575 4291659648 4290542197 4291396989 4291199354 4291331197 4291396733 4291396732 4290413696 4291330683 4290541420 4290870906 4291132525 4290212471 4290081144 4290212717 4292185473 4293108079 4293377165 4293704584 4293836151 4293837199 4293834098 4293838238 4293381004 4294102177 4293708709 4294102924 4293773730 4293773985 4293969561 4294102432 4293773729 4294167454 4293578654 4293643933 4293643941 4293839786 4293643950 4293839795 4293644722 4293643937 4293840575 4293249963 4293839790 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4287573062 4287051085 4287637575 4287573831 4287573831 4287571783 4287573837 4287574087 4287178824 4286127432 4287372615 4287048521 4287051095 4290074214 4291586407 4292113785 4292707711 4293363327 4292775793 4293301895 4293235847 4293629043 4293565570 4293564800 4293566079 4293501574 4293763701 4293501058 4293562999 4293756779 4292377698 4291715423 4290201163 4288099916 4287967562 4288557129 4288164427 4289151569 4289674830 4289476185 4290995568 4292773796 4290470003 4288830085 4286853483 4284951378 4285803116 4286329433 4287253129 4289235633 4287715975 4285341760 4285278311 4284027202 4283898973 4284355919 4285937767 4285805924 4286265708 4285346149 4286069623 4285475943 4287259798 4286599558 4286796685 4285607530 4288510895 4286071934 4289566385 4288767646 4285936482 4286527085 4287452544 4287644524 4287186283 4287055193 4284157509 4284488255 4285211470 4283041339 4285801307 4290423992 4291400104 4291659909 4291796642 4291273389 4292131758 4290282872 4288032842 4288955495 4288036680 4290274674 4293713326 4285212733 4283565876 4284158795 4284422468 4284356669 4284814392 4285338936 4285272887 4285472582 4286064714 4285868107 4284619586 4285470263 4284222276 4284814654 4289621379 4289091174 4289279052 4289741897 4291252815 4291186517 4291909721 4291648852 4292172640 4292567390 4291977061 4292173651 4292370286 4292502369 4292766826 4292833640 4292507262 4293161065 4292505721 4292635000 4292767846 4293095273 4292703079 4293293947 4293098599 4292575613 4293360499 4292704906 4292706661 4293164932 4292704645 4293100934 4292640632 4292509805 4292510059 4292575338 4292311672 4292575854 4292704888 4292772986 4293100409 4292975510 4293577139 4293247154 4292977055 4293368700 4293180342 4293443000 4293311658 4293377190 4292645255 4293231481 4292575879 4292179590 4292640357 4292308871 4292308838 4291979877 4287708505 4283829822 4284359242 4284358730 4283962173 4284618824 4284028997 4283700291 4286000204 4285407302 4286524239 4288297553 4286064457 4287379791 4286260554 4286455624 4286260292 4285008693 4284418362 4283434036 4287579230 4292843659 4290808974 4291135109 4286394702 4289223277 4290339170 4292378211 4292116840 4291719514 4291593591 4292185210 4291725942 4292119417 4291856513 4291463031 4291922560 4291724674 4291397238 4291265404 4291462783 4291397238 4291528577 4291265394 4291331196 4291133561 4290413680 4291265147 4291265136 4290674301 4291528061 4290608749 4290870907 4291790701 4291134070 4290870906 4290805369 4290674545 4290411642 4290473319 4290803319 4292054655 4293240194 4293770887 4293836408 4293834617 4293638277 4293838495 4293903751 4294102177 4294037409 4294036382 4294036384 4294102174 4293774500 4293380504 4293773729 4293839265 4293774499 4293839265 4293773727 4293839788 4293250724 4293710259 4293839781 4293644709 4293839538 4293840562 4293840561 4293839801 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4287574346 4287049546 4287637575 4287574858 4287048522 4287050058 4287574087 4287572296 4287766343 4286783560 4286653255 4287572553 4288365134 4290072162 4291455613 4291786347 4292379777 4292775029 4292972419 4293758842 4292909943 4293234819 4293563002 4293566592 4293566079 4293501570 4293501575 4293566332 4293563775 4293232494 4293227613 4291913050 4290333008 4288100172 4287375175 4287179846 4289412687 4289016906 4289150027 4290335585 4291725736 4289943916 4289680492 4289158790 4285799228 4286194792 4285215070 4286527345 4289888938 4287980166 4283367482 4283961670 4285944433 4283701318 4285409104 4284357462 4286002551 4284887386 4286198903 4285342810 4286205056 4285673072 4286333801 4288509620 4284489296 4286004611 4287655060 4288112798 4289499823 4288378005 4287118713 4284420924 4290479257 4287907676 4284881480 4285602619 4284420668 4283236416 4286127427 4286790228 4288763758 4291264133 4291593587 4291004314 4292584599 4291936173 4292460705 4289215295 4289024859 4288691273 4288693078 4292723888 4288372821 4282384446 4284418366 4284288062 4285865789 4284355647 4285010739 4285271102 4285272375 4285207612 4287116366 4286061640 4284617783 4285207613 4284154942 4285669180 4288829798 4288958562 4289417309 4289477711 4290922316 4291578451 4291646300 4292499297 4292107359 4292106853 4292765285 4291911781 4292630876 4292437100 4292963693 4292568425 4293161323 4293028202 4293161321 4292571260 4292769130 4293095274 4292507005 4293096298 4292573309 4292836458 4292770955 4292837989 4292965757 4292575609 4292771975 4293166970 4292575355 4292770682 4292507017 4292315007 4292575369 4292573543 4292247674 4292968581 4292839578 4293306510 4294102719 4293378996 4292979122 4293237379 4293837497 4293378741 4293246110 4293374371 4293040270 4292710023 4291850869 4292507509 4292311434 4292242528 4291784063 4290798447 4285073728 4284161099 4284093258 4284684874 4284489289 4284554824 4283700030 4284752718 4286262088 4286064457 4286722379 4288298066 4286784582 4286722124 4286979912 4287049288 4285601860 4285666365 4284550195 4283893314 4287905119 4292120450 4290348163 4290801517 4287771987 4288896617 4290535008 4292181859 4292445299 4292115039 4292117361 4291727233 4292184953 4291790968 4291858302 4291922306 4291463041 4291790710 4291331447 4291397247 4291659388 4291265404 4291133817 4291331196 4291528319 4291528575 4291068285 4291199609 4290870907 4291134332 4290607990 4291528062 4290936442 4290282879 4290805615 4290542957 4291395438 4291132782 4290672248 4289882988 4290671730 4292580727 4293374835 4293900663 4293638792 4293638792 4293837430 4293771654 4294102690 4293708964 4294036383 4294036639 4294036639 4294036639 4294102174 4294102175 4294102174 4293513118 4294232989 4293184672 4294233255 4293840040 4293511101 4293775779 4293249711 4293775794 4293578414 4293839779 4293446587 4293840559 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4287639367 4287114055 4287048776 4287637831 4287638343 4287043911 4287703624 4287180615 4286653259 4286849863 4286654538 4287574345 4287771468 4289416790 4291125598 4291654783 4292642159 4292970614 4293365627 4293234810 4293302146 4293631349 4293564283 4293566593 4293500544 4293698166 4293698937 4293501318 4293563504 4293299312 4292836976 4291649882 4290726471 4288752199 4287309895 4288622922 4288296781 4289016656 4289609820 4290936990 4290667639 4289677681 4291456113 4289355384 4285273434 4285800288 4287319417 4288765082 4288578468 4286462322 4283371331 4285012823 4285083987 4286135929 4285410160 4284819527 4286069098 4284224828 4286862202 4285671764 4285280111 4285804639 4285935719 4287984550 4284355934 4285806706 4287983267 4289362854 4287322501 4288244378 4289098663 4286527835 4293568905 4285727539 4284816458 4283958838 4285801802 4285869651 4287512664 4289615732 4289021025 4289424500 4291331988 4291205020 4292062114 4292857541 4290139736 4288168784 4288164940 4287970387 4291271073 4290483320 4282908729 4283828550 4284684871 4284945979 4285866059 4285537860 4285077824 4285668671 4284550451 4285408071 4287050058 4286523723 4284880448 4285142079 4285008707 4285468218 4288173670 4288563033 4288830568 4288884807 4290596950 4290596175 4291779424 4292040547 4292172896 4291912037 4292435800 4292305002 4292304740 4293026661 4292767338 4292634218 4292768103 4292966014 4292700775 4293093994 4292769644 4292766313 4293095530 4293029996 4292767076 4292966783 4292966266 4292640125 4292573048 4292836462 4292836458 4292575357 4293227883 4292248443 4292769399 4292770679 4292313208 4292708999 4292904829 4292707451 4293431925 4293177254 4294036668 4293903797 4292980386 4293299330 4293113001 4293904568 4293638324 4292979591 4293106059 4292509062 4292505968 4292509814 4291916165 4291588477 4291980903 4288824666 4283436870 4284356928 4284160844 4284423236 4284291650 4284160585 4284554822 4284751174 4286261587 4284818251 4288034638 4287641674 4286065482 4287509581 4285926717 4286525260 4285668931 4285078079 4284418110 4283826759 4286463071 4291924354 4291597214 4289948790 4287576399 4290276991 4291456101 4292180064 4291721303 4291788920 4291790454 4291856496 4291790970 4291856771 4291462775 4291725173 4291528578 4291265654 4291988346 4291789434 4291397238 4291528575 4291133560 4291331196 4291134324 4291331196 4291199353 4291133818 4291396979 4291068541 4291264890 4290676596 4291462260 4291264890 4291067770 4291133817 4290934391 4289491579 4289818219 4290343283 4291001441 4292450948 4293308022 4293509016 4293836150 4293966973 4293770635 4293904009 4294036641 4294036640 4294036364 4294036640 4294036383 4294102174 4293313955 4294102945 4293707937 4294167710 4293774499 4293904800 4293250206 4293316265 4293775791 4293446325 4294300327 4293184164 4294299313 4293250736 4293447344 4294168248 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4287113290 4287245895 4287180615 4287113291 4287702087 4287769415 4287114824 4286653768 4287372359 4286129224 4287244103 4287639881 4287248473 4288759888 4291060344 4291982704 4292247432 4292774275 4293365631 4293236359 4293236608 4293628538 4293566849 4293565305 4293566850 4293501573 4293500804 4293764214 4293563519 4293495155 4292835933 4292175949 4290528589 4287508298 4287440967 4287181385 4288820050 4289019475 4290605454 4291064967 4289152615 4290528332 4291391353 4288434816 4285078862 4287054458 4287709052 4287060103 4288243608 4285342803 4284487235 4284752745 4284423250 4286004330 4285541977 4285938040 4285475175 4285279854 4285806955 4286727281 4284557142 4285542509 4285281627 4286402175 4287385730 4283501644 4284291927 4288047503 4289300411 4287256978 4288773791 4289956258 4291191395 4282581036 4283700548 4283696191 4285803335 4290605962 4289094277 4288104029 4288826726 4289753979 4291137435 4291663759 4292922821 4291200883 4287840074 4288165202 4288691799 4290144872 4292855198 4282908716 4283502911 4284089418 4286063940 4287180878 4284618819 4285013061 4284484409 4285996102 4285536574 4286126665 4286461261 4286984268 4286193482 4285074742 4284155961 4284813115 4289093223 4288300632 4289812078 4288490308 4289674832 4291775829 4291709007 4292435807 4291910486 4292960614 4292436057 4291845995 4292633949 4292436835 4293224046 4292701545 4293093996 4293031533 4293093996 4293030252 4292766313 4292766825 4293094252 4293093994 4292572798 4292834409 4292899946 4292442216 4293032063 4292835690 4292504456 4292510828 4292702583 4292376185 4292509545 4292769399 4292311675 4292510830 4292836743 4292969864 4292840618 4293308829 4293512128 4293909193 4292915124 4293174713 4294104258 4293905326 4293574843 4293376438 4292778656 4292441458 4291981943 4292439940 4291455350 4292308853 4291849595 4284945218 4283830596 4284225101 4284291391 4285016915 4284292939 4283962946 4284225858 4284949067 4286129478 4286589257 4286657358 4287771988 4286784582 4286788429 4285864775 4285866823 4286719306 4284814130 4284483911 4283892544 4286330721 4291460473 4291401108 4290736755 4287512668 4290273895 4291455583 4291983726 4291525477 4292183412 4291987832 4291792512 4291790970 4292184952 4291857544 4291856760 4291659647 4291922553 4291330682 4291265651 4291265662 4291265403 4291528575 4291265403 4291331722 4291331195 4291133817 4291594111 4291134075 4291001974 4291462781 4290476922 4291265146 4291199613 4291461221 4290739836 4290541165 4290280559 4290278510 4289753978 4291263348 4292778114 4293702267 4293704582 4293638534 4293770633 4293904266 4294036898 4294037153 4294036382 4294037410 4294036382 4293513119 4294036382 4294102945 4294101917 4293578653 4293839008 4293839264 4293250206 4293905320 4293710257 4293250224 4293906857 4293446323 4293906099 4293644720 4293511858 4293840561 4293578422 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4287313741 4286193223 4286848072 4286784583 4286719303 4286656331 4287243847 4286720328 4287308872 4286718024 4287179080 4287047494 4287903307 4288759912 4291323492 4291127933 4292708477 4292970109 4292972417 4293694841 4293630329 4293171335 4293566591 4293566851 4293566850 4293501317 4293765243 4293501060 4293565815 4293297773 4292443490 4292043879 4290335575 4288227912 4287965511 4288554821 4287967053 4289618807 4291725215 4288822098 4289871952 4290596178 4290209918 4288300911 4285474656 4286329712 4283697204 4287917224 4286728555 4284225103 4285278291 4284357971 4286204273 4285014120 4284685910 4286072969 4284950102 4286797450 4285872481 4287056000 4286003563 4285346410 4285806692 4286003062 4286599812 4286860428 4283829838 4284950122 4288773784 4288769183 4287789996 4290091952 4284621903 4282976061 4282911817 4286133080 4291720066 4291918460 4292324521 4290420402 4290151080 4291335844 4292851878 4292462015 4292128909 4287374650 4289155930 4288824155 4289944676 4292462525 4285804356 4283439441 4283371850 4283566908 4287051854 4288759635 4285470268 4284357958 4284681267 4285996870 4285010749 4285799491 4285801030 4287642964 4285800510 4284876854 4284811331 4285467965 4288303976 4288363338 4289287277 4287903564 4290525517 4290399059 4291187018 4292497760 4292107616 4292041311 4292436064 4292699486 4292435558 4292567908 4292375911 4293158510 4292701289 4293095532 4292702313 4293095532 4292766569 4292634218 4292832106 4292702568 4293226607 4292440423 4292307560 4292966254 4292441448 4292898666 4292505444 4292573290 4292376952 4292378493 4292701305 4292507751 4292772477 4292839810 4292971392 4293102196 4293038194 4293363060 4293434235 4293431428 4293705886 4293971110 4293433747 4292710802 4293102456 4293436310 4293107093 4292110702 4291781752 4291913844 4292113272 4292048513 4289284432 4283635800 4284029508 4283764030 4284489029 4285016915 4284029764 4284357186 4284555080 4284685639 4286131018 4286458953 4287379022 4287184465 4286654022 4287968332 4286264653 4286456391 4287049548 4285400890 4284025140 4283565622 4285539925 4290937469 4292648859 4289815913 4289024365 4290145134 4292311649 4292441686 4292115556 4291197789 4291857020 4291792512 4292119408 4291790969 4291856760 4291594111 4291921267 4292119168 4291594361 4291265662 4291527024 4291331197 4291462783 4291462773 4291528318 4291331196 4291396476 4291002749 4291197802 4291462782 4290870905 4291528316 4291067769 4290674533 4291068286 4291197024 4290477693 4291196266 4290080376 4289162875 4291918438 4292650110 4293635187 4293706375 4293639812 4293904268 4293838749 4294101919 4293513632 4294102689 4293708707 4294036638 4294101919 4294036382 4293512861 4293512872 4294232743 4293578663 4293840033 4293839788 4293512107 4293839538 4293907637 4293511858 4293577650 4293250736 4293840553 4293840308 4293579182 4293839536 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4286917447 4286455112 4286324552 4286979400 4286850888 4287309127 4287246152 4286719048 4286719816 4287307080 4287177287 4287574858 4288426569 4288760925 4291192689 4291852140 4292379776 4292972155 4293431667 4292907403 4293302661 4293237630 4293564799 4293566336 4293565822 4293501573 4293501573 4293566850 4293565054 4293495148 4292836977 4292369487 4290790479 4287573833 4287377478 4287703630 4289281881 4291790494 4289153120 4289214033 4289674828 4290070633 4291329419 4287513455 4285210432 4284744786 4284227662 4287849612 4288837288 4285144389 4285147495 4284620356 4285213525 4285146446 4284227161 4285018210 4285672298 4285674080 4288373677 4286661732 4287453069 4285742712 4286071678 4286200684 4284687192 4288048284 4286268275 4283961931 4285213025 4285480041 4288508071 4288380840 4288511912 4283437903 4282515509 4290207597 4288494677 4289550714 4292122792 4293118910 4293313721 4293774000 4293248687 4292588956 4288032317 4289286235 4287901524 4289547086 4291404962 4290347112 4282777648 4283960894 4284090685 4283894839 4287704652 4288695885 4283959608 4285404224 4283893817 4285997125 4285864517 4285603138 4287051086 4286262089 4286588492 4284684345 4284745539 4285469245 4288434791 4287247178 4288500825 4288818759 4288952649 4290985802 4291972440 4291321174 4292367718 4292699999 4292435551 4292109671 4291911513 4292502879 4293026407 4292569442 4293158756 4292701034 4293095532 4292703594 4293095532 4292766569 4292374630 4293619568 4292176995 4293028970 4292896859 4292632161 4292372838 4292439402 4292637033 4292574318 4292439657 4292639852 4292964457 4292574832 4292376423 4293159533 4292111211 4292830822 4292567394 4292698475 4293093737 4292897917 4292900721 4293228935 4292770677 4293420667 4293487483 4292835703 4292309866 4290135913 4291255899 4291588218 4292245881 4291784302 4285011005 4284029769 4283961670 4284357699 4284620619 4284422983 4284686411 4284423497 4285014859 4285013316 4286067021 4285932615 4286852172 4287184206 4287311433 4287050575 4287507017 4285800264 4287116620 4284879161 4284025141 4284483654 4284617022 4290938501 4292123291 4289220701 4289485671 4291586917 4292050267 4291790199 4292114783 4291854455 4291857018 4291791738 4292119161 4291858311 4291397240 4292316547 4291134067 4291199613 4291462775 4291133561 4291331445 4291001975 4291134325 4291725699 4291002492 4291199097 4291005561 4291462012 4291068541 4290936697 4290740091 4291133831 4291199601 4291067771 4291263851 4290805628 4290670698 4290606712 4289884782 4289881964 4291134327 4293107578 4293375112 4293638788 4293968783 4293838216 4294036897 4294037152 4294037164 4294037152 4294036382 4294036381 4293512862 4294037153 4294102689 4294168224 4293579167 4293643943 4293773477 4294233767 4293054894 4293905844 4293251237 4293512626 4293513397 4293775534 4293249721 4293645475 4294233276 4293579686 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4285930824 4285996872 4286586696 4285800008 4286390856 4286848072 4286720840 4287310152 4286784584 4286783048 4286586440 4287573830 4287903309 4288168539 4291257701 4292113786 4292772989 4292972672 4292972678 4293302660 4293237374 4293237893 4293567107 4293565048 4293501575 4293765243 4293501058 4293501316 4293564279 4293493873 4292836960 4292043608 4290069839 4287638344 4287373123 4288165210 4290672020 4290077039 4288295247 4289740363 4289219420 4291389055 4291527576 4287706218 4283896638 4283632724 4286464633 4284291657 4286993295 4285278051 4285082194 4284950365 4285608559 4285476451 4284751703 4283506010 4284817236 4285744263 4288315565 4286398065 4287715990 4288043915 4285677420 4285610612 4285475192 4285081938 4288574634 4286659197 4284690281 4287060390 4286728579 4288314033 4287713151 4288244391 4287850407 4293631911 4289360558 4288308897 4291340207 4293245111 4293708735 4293446074 4292724151 4289283652 4288957273 4289480532 4288691799 4290674041 4292659378 4282908719 4283437392 4283633456 4284554060 4284025919 4285274173 4288232018 4284091192 4284879412 4285010494 4285600316 4285406525 4286063945 4287047752 4286262346 4287705163 4283958067 4285074750 4285203252 4288703091 4287443270 4288695390 4287114311 4289081674 4291117643 4290990165 4292103511 4292433768 4292109919 4292109407 4292699482 4292630881 4293089888 4292437342 4292567908 4292370797 4292832352 4293028459 4292507257 4293095018 4293095274 4292834412 4292443246 4292634447 4289735748 4289343814 4290464324 4291516744 4291845970 4292044125 4292503135 4292307035 4292107618 4291912284 4292169806 4291841868 4291843664 4292173127 4291973710 4291776851 4291118419 4292695904 4292565340 4292310373 4293028962 4290066758 4290063420 4291117906 4290991440 4289542220 4289872720 4291520612 4292771964 4291919489 4289613926 4284422212 4283701326 4284355907 4284619586 4285146187 4284226114 4284291907 4284290364 4285800262 4285340484 4287183953 4285470016 4286789196 4287374924 4286064968 4287906386 4286259271 4285600319 4286457417 4286062654 4283893556 4284483646 4284156738 4291130492 4292123030 4289484655 4290670444 4291261031 4291918961 4292836704 4292052845 4291458414 4291659648 4291857520 4291791478 4291856514 4291988080 4291199863 4291988346 4291593597 4291396982 4291659907 4291265395 4291199098 4291528576 4291396219 4290676594 4291068286 4291659382 4290414462 4291133829 4290936697 4291199613 4290676586 4291264883 4291199602 4291199869 4290805112 4291132781 4290279801 4290146169 4289686882 4291987330 4292387683 4293832323 4293836938 4293838474 4294036898 4294036381 4294037922 4294036124 4293512862 4294102688 4294037164 4293512861 4294101917 4293773473 4293774498 4293838753 4293578650 4294168245 4293579173 4293511605 4293645477 4293841847 4293840049 4293709998 4293644463 4294168753 4293840062 4292989098 4293841589 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4286128968 4285733954 4285602883 4286587720 4286455880 4286850888 4286784840 4287306824 4286784072 4286717000 4287769415 4287573832 4287183436 4289810016 4290995068 4291855728 4292378760 4292971898 4292973184 4293697919 4293631871 4293173127 4293566078 4293567367 4293764472 4293501319 4293500800 4293698680 4293564281 4293495405 4292900192 4292107349 4289677399 4288295505 4286781506 4290937243 4291130760 4288952401 4289016911 4289280087 4290866052 4292839577 4291001477 4287047767 4284488800 4285934677 4287515525 4283565112 4284227646 4285145683 4285345365 4284622939 4286004584 4285411944 4285211746 4284290396 4284356964 4286271874 4288777649 4288244130 4287650710 4286531959 4287980189 4286924403 4285941359 4284685421 4285346394 4288311715 4288313773 4287191169 4284686938 4286272120 4285150842 4285801801 4291066753 4289820304 4289419622 4291862419 4292786872 4292392626 4294102463 4293053109 4289688952 4287902279 4289155163 4288822360 4289682022 4293449932 4287054670 4283367496 4284553787 4284554310 4285472840 4283960377 4284813107 4287182671 4285276229 4284417850 4285207866 4284944953 4285471293 4286128714 4285668411 4287048778 4287511377 4284811062 4284155955 4285205305 4288565852 4286325832 4288826203 4287313738 4288162374 4289807439 4290856006 4291778907 4291777609 4291649636 4292830569 4291911514 4292110177 4292106842 4292501350 4292110941 4293225052 4292702827 4293487470 4292964217 4292770412 4292899709 4293096301 4292967537 4291449940 4289084495 4289542744 4289407558 4288357704 4289210951 4290065219 4290394694 4290590278 4291115844 4291119689 4290461262 4290263626 4289803339 4289015624 4289276229 4289933127 4291050831 4291776340 4292233814 4292302427 4291312735 4289939019 4289082457 4289808987 4291385966 4290991705 4291388767 4292703610 4292051071 4292244846 4285406019 4283699013 4284094789 4284290364 4284356169 4285603912 4284290115 4284290115 4285342280 4284685122 4286327630 4286590794 4285406532 4287969874 4286656075 4286787915 4287773009 4286392136 4285071926 4287117134 4286590027 4284615736 4284158533 4284419394 4288962432 4291992202 4290143093 4290936967 4291915356 4292445552 4292245854 4292444784 4291593322 4292187017 4291396727 4291860358 4291856504 4291265655 4291988089 4291463033 4291594105 4291331446 4291856001 4291265404 4290808182 4291396467 4290479742 4291331200 4291068274 4291199097 4291462012 4291199353 4291133810 4290151040 4291330427 4290871162 4290871164 4291263852 4290870905 4290345594 4290211959 4289293422 4290211182 4292182892 4293110141 4293703301 4293770632 4294036366 4294037153 4293709476 4294036906 4294037921 4294102431 4293513633 4294036381 4294101917 4294036394 4293513116 4294167464 4293579421 4293838763 4294102695 4293644455 4293710255 4293839548 4293250209 4293514681 4293513140 4293382326 4294168486 4293579698 4294234290 4293774770 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4285602887 4285800524 4285733954 4286062153 4285866568 4286980168 4286852680 4286783560 4286848584 4286850887 4287112518 4287576663 4287838055 4289548373 4291126117 4291590783 4292968569 4292972662 4292973182 4293238150 4293631871 4293566850 4293566851 4293369970 4293500804 4293698680 4293699709 4293697916 4293563000 4293100915 4292573549 4291782246 4290070351 4287636052 4290275977 4291987366 4288562004 4289080909 4288950861 4289418864 4292312212 4290868092 4290341511 4286590046 4284160835 4286661231 4284948291 4284226646 4283564614 4285541463 4285543800 4285213779 4285544820 4285212243 4285086306 4285475965 4284291168 4286598279 4288839344 4288116389 4287254916 4286796154 4287187858 4287191431 4287980203 4286926199 4285742470 4287056245 4289566383 4286991233 4285012810 4285348476 4283765580 4286530161 4291129996 4291261038 4292962908 4292891488 4293117884 4293714124 4293447364 4292523685 4287972432 4289807701 4288492116 4289549928 4292986041 4289890928 4282581056 4284355893 4285078598 4285272378 4284552504 4284093502 4284747059 4286064461 4286522179 4284290618 4284943930 4285996613 4285340743 4286128968 4285667907 4285803082 4287575888 4285272893 4285075782 4284353855 4288695916 4287113800 4287511631 4287444817 4288360009 4290002508 4290199118 4291318611 4291451737 4292369243 4291979105 4292236376 4292172635 4292043099 4291977316 4292435565 4293224814 4292634218 4292570217 4292831848 4292770156 4293163119 4292704364 4292901742 4292238440 4292107368 4292763491 4291648868 4291184217 4291380306 4290722642 4291315799 4292298576 4291973472 4292564073 4292104542 4291581029 4292041310 4292103276 4291710811 4292040541 4292102240 4293283686 4292961668 4292960640 4293095552 4292700821 4292828533 4292042609 4292112762 4292110695 4292571001 4292640874 4292507260 4289809240 4283370825 4284029252 4283832399 4284619586 4284687435 4284620875 4283765823 4283898184 4285209148 4285338431 4286723918 4285471559 4285865287 4287839311 4286722123 4286655563 4287773265 4286390856 4284681783 4286461005 4287117145 4284484924 4284551493 4284092221 4288696683 4292842624 4290079607 4291660672 4292113755 4292118140 4292378718 4292052074 4291592820 4292119161 4292186504 4292118903 4292185209 4291528569 4291528578 4291790717 4291528578 4291988088 4291331455 4291462782 4291593855 4291396476 4290873732 4290936183 4290939270 4290939013 4290873718 4291133564 4290742147 4290739062 4291462515 4291134077 4291330683 4290936946 4290476922 4290870125 4290015339 4290016113 4290276460 4292120952 4293042823 4293835126 4293904267 4294036641 4294037152 4294102442 4294037921 4293512614 4294103470 4294036896 4294101917 4293513633 4294101917 4294167452 4293774249 4293840304 4293579164 4294167976 4293709990 4293250480 4293840561 4293841076 4293840037 4293842360 4294234022 4293579688 4293840052 4293775795 4294102448 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4285144905 4285864770 4286128969 4285603394 4286586696 4286388808 4286260040 4286850120 4286847815 4286195530 4287179336 4287579739 4287711570 4290007429 4291323489 4292116096 4292708209 4292972157 4292972408 4293697917 4292976506 4293631617 4293566850 4293567110 4293566851 4293502088 4293501318 4293500800 4293629558 4293429098 4292573547 4291648093 4289935962 4290147723 4292187563 4288626502 4288096066 4288688719 4288952924 4290996352 4292116631 4290535542 4289812857 4286528867 4285212752 4285015124 4286198874 4284682556 4285080412 4284026688 4284620864 4283437383 4286267502 4285343597 4284754510 4286988156 4283830877 4286140812 4289572550 4288639648 4285080682 4286598272 4287385990 4286663326 4286599541 4287979662 4286861180 4286992256 4285278051 4286729845 4287254677 4284954220 4287123600 4289162136 4292970102 4293817171 4292110181 4291711841 4292449410 4294567121 4292855227 4289360234 4288757341 4288562257 4289483354 4292321936 4292461988 4284089920 4283241801 4284686925 4285208891 4285210184 4284226630 4283895614 4284814911 4286260809 4286194763 4284681522 4284551994 4285736267 4286324290 4286128970 4285668930 4285998410 4286986320 4285208643 4284551997 4284616512 4288041063 4286062662 4287707982 4287575117 4287247180 4289673289 4290135114 4291710556 4291581522 4291451480 4292108629 4291845472 4292433505 4292108634 4292042854 4291977053 4292568171 4292110695 4292898154 4292831848 4292639104 4292378219 4292966525 4292704364 4293228143 4292308584 4292370015 4292501843 4292502870 4293088103 4292433261 4292826462 4293086293 4292958815 4293483889 4292503674 4293353079 4293554821 4292968615 4292837555 4293102234 4293036212 4293108386 4293175472 4292979898 4292981672 4293293965 4292501891 4292504710 4292182122 4291918717 4292639078 4292770687 4291455583 4284879686 4283830597 4284292427 4283897925 4285078339 4285865285 4284356682 4284160574 4284422205 4285538373 4285014858 4286851659 4284815944 4286457671 4287774282 4286656588 4287179848 4287641423 4287050062 4285206329 4287048781 4287052876 4284420925 4285206842 4283697215 4287448156 4292254356 4290346891 4292116334 4292376422 4292970616 4291918175 4292314233 4291396727 4292055662 4291398262 4291857273 4291659392 4291528569 4291594103 4291528578 4291331188 4291528579 4291396980 4291659906 4290936955 4290936947 4291659391 4291199354 4291133810 4291133565 4291133811 4291068541 4290936441 4291528051 4291068286 4290739319 4290675316 4291396221 4290674540 4290606200 4290476923 4289292642 4290668906 4292447353 4293177476 4293836938 4293839005 4294037153 4294037665 4293709229 4294102430 4293840549 4293578139 4294102688 4293512617 4294168737 4293512604 4293579177 4293839527 4293579175 4293644455 4293841069 4293251240 4293775536 4293774770 4293841845 4293841075 4293643448 4293644466 4293644466 4293840553 4293839527 4293579176 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4285406275 4285275971 4286128969 4285996616 4286520904 4286392392 4286917192 4286850888 4286848072 4286848071 4287771209 4287378510 4288299869 4289417809 4290340480 4292377454 4292510835 4292970112 4293365114 4293238662 4293631873 4293370227 4293566595 4293567111 4293502829 4293699453 4293698681 4293567107 4293300100 4292708482 4292573299 4291187576 4291130510 4292251809 4288693065 4287113028 4288426313 4288622159 4289744223 4292117641 4289747574 4290532700 4289155450 4287839848 4285934699 4285012805 4287783590 4285409871 4285015373 4283303752 4284683865 4283501886 4286468232 4285869142 4284882505 4286929825 4283105347 4286470035 4290228665 4288179106 4284818775 4284621420 4286468491 4287455896 4287522461 4286594430 4286201458 4286596736 4284161874 4284819546 4288112286 4286928278 4288312998 4288966291 4292313745 4293163621 4292831837 4291709019 4291522418 4293320148 4291201145 4288951626 4289088857 4291127912 4292846989 4293249970 4286658626 4283110727 4284687693 4284554822 4285014093 4285013315 4284617787 4284093504 4284420409 4285601855 4285799748 4285865287 4284549939 4284814405 4286260555 4285274171 4286194249 4285866823 4287572553 4286128969 4284418366 4285602108 4286988881 4286195529 4287772497 4287052113 4287047497 4288229705 4289741391 4290661698 4291383385 4291382609 4291975524 4292038223 4291909724 4291714913 4292303711 4291977566 4292501351 4292435557 4292567915 4292897641 4292835949 4292770158 4293096043 4293097328 4292640880 4293160812 4292896098 4292370031 4292631385 4292435040 4293680473 4293025376 4292169058 4292825956 4293348955 4293747056 4293290120 4293033875 4293497465 4293701281 4293635470 4293632905 4293635739 4293637802 4293706169 4293307804 4293554560 4292304496 4292308866 4291918201 4293035146 4292570227 4291392881 4287575373 4283765059 4284224571 4283633225 4284555078 4285012547 4285407051 4284157496 4284091450 4284684607 4285668926 4285405244 4285470270 4285798723 4286918732 4287579997 4287178055 4287575887 4288360777 4285666372 4285537091 4286984269 4287512657 4284748356 4284485444 4284617797 4287774306 4291861916 4291525759 4291855229 4292049246 4291855467 4292836454 4291462261 4291922545 4291856260 4291463807 4291857791 4291661429 4291528313 4291528579 4291922295 4291922298 4291922296 4291594115 4291396980 4291659907 4291790713 4290807676 4290938997 4291067773 4291071096 4290871680 4291396732 4291133820 4290873733 4291462269 4291199600 4291528063 4290151281 4290608250 4290081132 4289754490 4289358204 4291064420 4292317318 4293506177 4293967992 4294037669 4294036895 4294037678 4293513373 4294168738 4293774756 4293775012 4294102432 4293644446 4293774765 4294102696 4294166961 4293579945 4294167718 4293840310 4293840294 4293840309 4293185715 4294234291 4293578673 4293645226 4293644456 4293644445 4293839785 4293839777 4293579424 4294101919 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4285538117 4285079626 4285798722 4286127945 4285932360 4286455368 4286979656 4286325320 4286454085 4286259271 4287115596 4288102222 4288366435 4289413981 4291258475 4291588991 4292837739 4292513660 4293366151 4293236095 4293632126 4293172617 4293371513 4293565564 4293501316 4293501318 4293501317 4293566333 4293300622 4293172638 4291395489 4290734991 4291462301 4288693584 4287243076 4287508551 4287834956 4288691034 4290536318 4291596197 4289218411 4290137190 4287975283 4285802835 4286659198 4285672014 4289436089 4286130529 4283696959 4283961674 4283305284 4284819043 4287258515 4285607008 4284422231 4287126153 4284488289 4287065238 4290095031 4288770980 4285410414 4284161107 4286203762 4285741695 4286796946 4288577459 4287322504 4286268024 4285609583 4285213522 4286791524 4286532228 4288970683 4289097369 4291528872 4293030747 4292368232 4291125612 4292067016 4292329645 4286784316 4289879145 4291126882 4293632381 4292781957 4289093210 4283041342 4284426320 4284090697 4284555339 4285406013 4285144390 4284684349 4284618297 4285139000 4284420658 4285996613 4285537086 4284945721 4284749113 4285471293 4286194249 4285472840 4286064200 4286461005 4286064200 4284880189 4284486979 4286525516 4286454846 4287709009 4287182414 4286586950 4287969872 4289608778 4290529365 4291119182 4291448915 4292301923 4291188571 4291908183 4291582814 4291712093 4292498791 4291977304 4292568676 4292106082 4292374119 4292900460 4293160553 4292965501 4292640623 4293554543 4292705134 4292833386 4292374375 4292106340 4292305248 4292040024 4292042086 4293220198 4292435310 4293089118 4292957532 4293287788 4293489012 4293227143 4293227389 4293231750 4293228927 4293226110 4293225595 4293033617 4293229712 4292107371 4292310662 4291917688 4292510330 4292705641 4291917943 4291388263 4284090430 4283895349 4284289866 4283895615 4284226372 4285405757 4285208638 4284552762 4284223290 4284815679 4285273405 4286919247 4284550194 4284944189 4286786380 4289022552 4286457931 4287773518 4287118415 4286260295 4286522952 4286259781 4288041052 4285009717 4284487236 4283962180 4287445858 4292319890 4291135372 4291789686 4292510828 4292905852 4291919460 4292182897 4291594104 4291661430 4291924342 4291857535 4291857791 4291529599 4291792756 4291528323 4291528568 4291528570 4291594105 4291594106 4291659641 4290742140 4291265150 4290807686 4291790968 4291396221 4291067510 4291462259 4291068275 4291133821 4290479216 4291330684 4290871154 4290870649 4290476920 4290936698 4290013035 4289425007 4290211440 4292515452 4293834115 4293904267 4294036897 4294038952 4294038177 4294103214 4293512346 4294103457 4293773994 4294103457 4293578922 4293773982 4293774764 4293645983 4293839283 4293645226 4293577889 4293841080 4293841063 4293841069 4293775531 4294168737 4293643933 4293839008 4293644962 4293839264 4293773729 4294102176 4294035851 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4285867084 4285535804 4285799748 4285734979 4285996104 4286520648 4286389320 4286521160 4285865288 4286454343 4287180617 4287247695 4289086555 4288627280 4291257187 4291851375 4292577411 4293363327 4292972922 4293302905 4293172358 4293632901 4293566594 4293501318 4293699453 4293698680 4293502859 4293566332 4293301395 4293037196 4293045913 4291655041 4290466639 4287568707 4287044424 4287506756 4287703894 4289679732 4291926955 4289547366 4289674605 4290204773 4288366195 4284748871 4285538905 4286734733 4288771478 4285012036 4284291149 4284161347 4284223064 4284952153 4287192225 4285077823 4288041886 4284363872 4286394237 4288517308 4289236903 4287585690 4288246951 4284091724 4286071676 4286533511 4284157785 4286139766 4288906428 4287060116 4288177037 4286597775 4287456939 4286860670 4289829046 4291268522 4290082711 4292707230 4291312472 4292118407 4294107590 4289096568 4289547874 4291984238 4293760109 4293514404 4290275698 4282912579 4284096336 4284751430 4284423492 4284948039 4285080909 4285211212 4284687182 4284421693 4284552247 4284817995 4285407052 4285406531 4285342283 4284617527 4285601852 4286197836 4286127176 4285603648 4286590538 4286654795 4284943928 4285143369 4286790996 4286788436 4287774288 4287247182 4286784583 4286982470 4288757587 4289611590 4290792791 4291120724 4290925396 4291711309 4291121231 4292302429 4291646555 4291715676 4292108128 4291847271 4292042338 4292108904 4292308069 4292702332 4292374371 4293161837 4292442749 4293161837 4292767849 4292765290 4292109161 4292307806 4291977300 4292236637 4291714146 4292436313 4292895331 4292959583 4292957540 4293551232 4293093494 4293355143 4293291909 4293290887 4293289863 4293355655 4293420935 4293156468 4292045443 4292312707 4292510328 4292313738 4291784299 4291456114 4287509322 4283829056 4283965263 4284096335 4283831359 4284226111 4285669956 4284422724 4284684350 4284750143 4285733695 4285207869 4286260810 4284552505 4285797184 4287246668 4288366426 4286588232 4287052620 4287116879 4287374662 4286392904 4285667655 4287974481 4285338429 4284945475 4284225096 4286331996 4291924881 4292186498 4292249723 4292706932 4292120957 4292442726 4291528826 4291856514 4291923072 4291462522 4291661430 4291856250 4291528568 4291593859 4291333235 4291987843 4291528568 4291594106 4291594106 4291659641 4290939520 4291593589 4291528053 4291528064 4290807931 4291199355 4290348163 4291134076 4291133819 4291068544 4290542970 4291132783 4291003506 4291002233 4290082682 4289623407 4289425008 4290864995 4293039225 4293376904 4294102690 4294038436 4294037921 4294038191 4294037407 4294103986 4294037664 4293708449 4294036895 4294037674 4294103993 4294102950 4293382071 4293644464 4293579431 4294169528 4293775275 4293776303 4293643675 4293643933 4293643934 4293446813 4293839523 4293446282 4293969820 4293773197 4293838747 4294036897 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4285405507 4284552247 4285930309 4285798979 4286127689 4285994309 4286586952 4285996104 4286061640 4285734215 4287640652 4289083979 4287514976 4289412945 4290666345 4291390566 4292640877 4292971122 4293168251 4293235591 4293631868 4293370487 4293566339 4293699452 4293699452 4293501319 4293764986 4293566850 4293301635 4292708739 4292966004 4291255649 4289675079 4287835719 4287046726 4288032600 4288296026 4291792289 4291131524 4289018475 4289480538 4290473341 4286660194 4284750692 4284224576 4288776619 4288440201 4283829049 4284029254 4284946779 4283307334 4286535047 4286990982 4283502413 4286464885 4286726021 4285610088 4290161853 4287915951 4286134883 4288516543 4286989199 4286136433 4288443570 4285215591 4284950108 4286072690 4289496248 4286857080 4288710587 4288971431 4287779984 4287850382 4292517294 4291530133 4290999949 4291314533 4291133573 4292922305 4289615979 4291917946 4293431923 4293904549 4291199605 4285211451 4283701601 4285014858 4283833926 4284424781 4284621388 4285801805 4284424268 4285344592 4284359499 4284555339 4285014602 4285144901 4284946755 4284949323 4285669189 4284949839 4285079367 4286195527 4285736523 4286001485 4286656330 4285277005 4284945467 4286196300 4286918996 4286788426 4286198862 4286324039 4287181130 4288358982 4289936717 4290004551 4290922317 4290789958 4291515475 4290991958 4291384925 4291124828 4292107108 4291780700 4292110951 4292373097 4292307303 4292765035 4292506469 4292700777 4292767847 4293160553 4292703594 4292834925 4292242534 4292569194 4292633451 4292109418 4291977309 4292042860 4291977555 4292302176 4292235613 4292761696 4292959327 4292829544 4292763241 4293357948 4293092716 4292960361 4292434535 4292694117 4292110947 4292509559 4292248457 4292441461 4292246381 4291851378 4289874504 4285865792 4284089923 4284686409 4283831359 4284357699 4284816976 4285076291 4284161350 4285734979 4283767108 4285667902 4285867333 4285865796 4285142329 4285600320 4287772748 4287577418 4286522697 4288364361 4287703627 4286659152 4286389063 4286257478 4288567132 4284944955 4285537350 4284551748 4287183205 4291924625 4292055444 4291525739 4291920744 4293233269 4292182114 4291659632 4291923841 4291528047 4291529591 4291923584 4291923573 4291528578 4291528566 4291988360 4291464052 4291988608 4291528568 4291594105 4291396736 4291527796 4290939528 4291136126 4290807668 4291724671 4290544512 4290807667 4291001977 4290413954 4290413944 4290936183 4290870649 4290936698 4290081645 4290475631 4289687663 4289488253 4290212450 4292712834 4293574544 4294103201 4294037420 4294038189 4294037418 4294038436 4293512345 4294037677 4294103213 4294037664 4294037417 4293513894 4294038200 4294169256 4293710506 4294102965 4294102953 4293514145 4294167967 4293578398 4293839266 4293773730 4294167178 4293641629 4293641374 4294167966 4293773986 4293969560 4293708193 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4285344081 4285471556 4285338685 4285274948 4285404733 4285802052 4286127178 4285734468 4285668675 4286388551 4287509838 4288563795 4288296781 4288494416 4291255389 4292637798 4292379007 4292642417 4293232001 4293302901 4293174153 4293371257 4293567110 4293501317 4293500803 4293698680 4293502088 4293566850 4293628545 4293035890 4292507757 4291912520 4289611095 4287899977 4286457925 4287308632 4289814632 4291531946 4288952939 4289415001 4290269278 4289615986 4285274966 4284882258 4285471571 4289500582 4287456134 4283498555 4285274692 4283175498 4283764288 4286864794 4285477979 4283960916 4284358495 4286204551 4286724485 4290170572 4288772787 4284818024 4286404487 4288970939 4287125908 4288445345 4286594429 4285409123 4284749413 4285812092 4288977340 4287984549 4287053162 4290218651 4285540963 4290021295 4290141818 4290087596 4290990687 4291007142 4292728011 4292968305 4293566330 4293634958 4293576074 4285666116 4283702881 4284358469 4284422988 4284687952 4284752460 4285211470 4285143613 4286063427 4284881730 4284617539 4284488268 4285539147 4284815935 4284618043 4284556110 4286455879 4285672010 4285210443 4286196556 4285734722 4286065739 4285998664 4285930307 4284553536 4286128967 4286985550 4286851659 4287445841 4285798982 4286263115 4287376967 4289082957 4290070091 4290529620 4290594385 4289871689 4291121498 4291578970 4291253840 4291712864 4291451735 4292108389 4292042339 4291976552 4292638311 4292632424 4292309623 4292700537 4292638331 4292963965 4292833382 4292897640 4292963946 4292567400 4292242024 4292501091 4292699494 4292042591 4291715426 4291319128 4291449943 4291906388 4291842390 4292433758 4291906651 4291905881 4292103780 4292106081 4292045428 4292448388 4292182427 4292638307 4292705898 4291918452 4290991184 4286719307 4285079365 4283896902 4283895615 4283501629 4284421701 4284554051 4284616502 4285407306 4285079368 4286522953 4284683834 4285601085 4285472839 4285535291 4285535039 4288304216 4287574611 4287115339 4287052108 4287051086 4287377996 4286324551 4286258502 4287840082 4286255934 4284945989 4283898180 4286856811 4292118650 4292121502 4291919722 4292316023 4292446070 4291723390 4291463026 4291529590 4291529600 4291398518 4291528312 4291529597 4291594112 4291594113 4291332217 4291595391 4291528310 4291595656 4291528311 4291793531 4291593857 4291790710 4290611079 4291004292 4290938740 4290545270 4291527539 4291133820 4290870908 4291265405 4290541943 4290348146 4290803565 4290346107 4290278511 4289555823 4288898154 4290405997 4292516991 4293902725 4294038181 4294038692 4294038703 4294038190 4294038177 4294102958 4294037407 4293579425 4293513898 4294103734 4293709494 4294104224 4293711033 4294103722 4294103980 4293513385 4294167968 4293512862 4294233248 4293772940 4293839266 4293773986 4293445283 4293644444 4293839020 4293773726 4293578666 4294101916 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4284226632 4285208637 4285209408 4285603400 4285534780 4285468987 4285471294 4285467448 4285731904 4286260554 4287970639 4288431954 4288297553 4289084494 4290666593 4291389547 4292771180 4292247931 4293101167 4292908941 4293632385 4293566595 4293370485 4293501319 4293698937 4293699453 4293699451 4293566336 4293367164 4293166442 4292966514 4291322460 4290200910 4287179337 4287109190 4287310667 4289748342 4291135134 4288364128 4289808987 4289421439 4286200680 4283897143 4284292208 4286657107 4289300899 4287118439 4284027196 4284029516 4283501915 4284886620 4287387534 4285211470 4284554862 4283239743 4284358510 4287981485 4290623162 4289170095 4287186069 4284490857 4289566903 4287194018 4288313771 4286729604 4285939576 4285019249 4286670249 4288247975 4288841130 4288178601 4288107626 4286853739 4288311974 4287972723 4289491091 4290857295 4292065986 4292848810 4292309111 4292975745 4294429841 4286324029 4283240779 4284030026 4284096336 4284751687 4284029764 4284555083 4285078339 4285539919 4285865538 4285407050 4283765815 4284486454 4286193740 4284093768 4285079628 4284687175 4284816970 4285669447 4286521922 4285339196 4285406013 4286128200 4286063688 4285800003 4284751172 4285668680 4286593104 4285735496 4287447634 4285866055 4286389828 4287574858 4289407814 4288886092 4289478216 4290660168 4290397513 4291251536 4290462784 4291319130 4291777877 4291451998 4291910241 4292240996 4292042600 4292108902 4292110457 4292571491 4292964455 4292506983 4292507239 4292309111 4292570235 4292109666 4292636284 4292108646 4292108902 4292700521 4292108903 4292306790 4292374139 4292438119 4291256682 4291188573 4291125342 4291650422 4291979105 4292243574 4292378744 4292773758 4292509830 4292442228 4292439154 4292441223 4291720813 4286123580 4287509326 4284814658 4284157515 4284095303 4284095047 4284158269 4284751175 4285276743 4285012549 4285609291 4285933130 4285275200 4284947783 4285801034 4285077828 4285599292 4288632177 4287444299 4287573577 4287577928 4287708504 4286720840 4286389319 4286260298 4287907665 4285799751 4285867340 4285143365 4285936472 4291660948 4292518544 4291788139 4292708735 4292314736 4291919981 4292250747 4291464063 4291922557 4291529599 4291528065 4291990156 4291528320 4291595388 4291595143 4291593855 4291595655 4291593845 4291595399 4291529596 4291660934 4290939261 4291856246 4291070598 4290938756 4291004548 4290807425 4290676350 4290545010 4290739066 4290347903 4290804859 4290807923 4290145910 4289819246 4289622397 4289421661 4289880942 4292516981 4293904539 4294037665 4294038704 4294038703 4294037919 4294037431 4293513886 4294103728 4293578651 4294168489 4293709737 4294103733 4294037929 4294038197 4294102965 4293512613 4294167196 4294101918 4293839264 4293379746 4293840036 4293578653 4294167454 4294102943 4294167208 4293578650 4294168235 4293513629 4294037163 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4285276230 4284552765 4285079111 4285471556 4285142327 4285996358 4285602367 4284945468 4285795389 4286523979 4289682276 4289087054 4288890969 4289482341 4291189595 4292111720 4292244584 4292509807 4293037170 4293694843 4293565817 4293566851 4293567111 4293763701 4293500804 4293501316 4293503114 4293566335 4293630082 4292970357 4292903262 4292109406 4290202450 4287769673 4287043653 4287374411 4289618823 4290347676 4289280079 4289412717 4287512164 4286330456 4285410154 4284422725 4286134620 4288574627 4285274431 4284620873 4283963724 4283107656 4284821343 4286269560 4283636547 4286002527 4283831383 4283633481 4288779701 4290159276 4288182198 4288841635 4285673594 4286408859 4289497269 4288379554 4287650465 4286797194 4288577460 4287517045 4284822902 4288378026 4289034403 4287579001 4284425551 4288970677 4288443544 4287980701 4288960124 4292649642 4292133828 4293763456 4294565274 4289022033 4283308618 4283834447 4284226628 4284488771 4284423496 4284489030 4284488002 4285473611 4285473357 4285996608 4285081167 4284226367 4284751175 4285474379 4284947779 4285407049 4284554309 4285079371 4285474379 4285276235 4285669961 4285801026 4286062664 4286063688 4286130249 4285404733 4284945982 4286129992 4285930311 4287575887 4285933385 4285602634 4286788685 4287837258 4289411148 4289084748 4289478226 4290594376 4290332499 4290596956 4291578967 4291320418 4291648607 4292567403 4291649632 4292042600 4292373094 4292108644 4292832122 4292375158 4292110966 4292962921 4292897639 4292307810 4292440441 4292373347 4292439140 4292440696 4292044149 4292242295 4292965480 4292508009 4292507750 4292966275 4292969350 4293033108 4293033335 4292837242 4292838777 4292836998 4292643458 4292967303 4292373360 4292508026 4292050033 4290073176 4283891767 4287181134 4284554306 4284225100 4283634232 4284225866 4284094524 4285014086 4284619845 4285276745 4285208893 4285147218 4284750143 4285274944 4285205812 4285273669 4284878658 4288892502 4287444298 4287574604 4287577167 4287642954 4286656073 4286390855 4286194246 4287840082 4286588999 4285795132 4285078343 4285080912 4291201665 4292515982 4292312931 4292252288 4292248440 4291658601 4291464321 4291528056 4291858055 4291726709 4291726956 4291528056 4291594103 4291659393 4291464307 4291594113 4291594111 4291594113 4291594102 4291659649 4291659645 4290939526 4291461498 4290873219 4290938740 4291396212 4290151294 4291004288 4290347137 4290413166 4290676355 4290345593 4290673529 4290279801 4289752941 4289097329 4289094771 4289751653 4292777832 4293904538 4294038693 4294038702 4293972910 4293973168 4294037931 4294103714 4294037161 4293711034 4294038198 4294103734 4294038701 4294038200 4294102953 4293513372 4294233504 4293579168 4293643932 4293643943 4293774241 4294102687 4294101673 4293579167 4293578151 4293579948 4293773994 4294037932 4294036907 4294037151 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4284816713 4285012804 4285602628 4284816196 4285339973 4285205316 4285074491 4285076286 4284944959 4288231759 4289087318 4289876831 4288824909 4290007141 4291124577 4291455339 4292312172 4292573804 4292904834 4293301114 4293238151 4292977020 4293565820 4293501575 4293764729 4293500802 4293567108 4293566591 4293563009 4293233268 4292507999 4291455078 4290854727 4287640136 4287046994 4287374926 4289611611 4290674585 4289480299 4288501355 4287581039 4286986852 4285538888 4287185522 4285346395 4287121770 4284028488 4284619598 4283569742 4283107400 4285348196 4286926980 4284028483 4285476454 4284554602 4283898715 4287460257 4290553019 4287463081 4287120251 4288775350 4286332284 4289309120 4288378283 4287453841 4287456912 4287521933 4284950381 4286072967 4287065761 4290082712 4289742931 4284486233 4287721359 4287451258 4289360293 4290668163 4292988870 4293906873 4294693532 4292116324 4284618310 4283698763 4284028492 4284161091 4284622416 4284421447 4284226114 4284488255 4285669190 4285734471 4284882504 4285604939 4284222532 4284095042 4285736528 4284943920 4284882500 4285209926 4284029507 4284881471 4285277257 4285867082 4285801035 4286128712 4286063688 4286129224 4285339711 4284748082 4286260042 4285668674 4285932615 4286067277 4284882248 4286457159 4287703367 4287244874 4289543242 4289083208 4290069836 4290594376 4290987078 4290989909 4291907162 4292042340 4291715426 4292237917 4292370279 4292175994 4291979880 4292440696 4292174945 4292832122 4292505956 4292702330 4292767609 4292572516 4292702074 4292701816 4292508005 4292768632 4292507749 4292838284 4292574837 4293101969 4293429132 4292974480 4293366138 4293166467 4293231764 4293034352 4292970378 4292707452 4292311669 4292443515 4292640379 4291982439 4285993538 4284747581 4287379534 4284029506 4284091206 4283831871 4284620360 4284096070 4284750917 4284553796 4285868875 4285013576 4286523720 4284355901 4285866571 4285076024 4285012293 4285468989 4289616225 4287510349 4287573576 4287510855 4287575119 4287837260 4286129735 4287311689 4287773009 4286458699 4284681784 4285670216 4285536323 4291400851 4292451486 4292249974 4292711560 4291917659 4291462775 4291989376 4291529333 4291923326 4291529086 4291531140 4291594885 4291726212 4290940810 4290939013 4291725184 4291659647 4291068541 4291725185 4290873973 4291266447 4291790718 4290219390 4291135878 4290741375 4290939012 4291264634 4290479233 4291004273 4290348423 4290410871 4290871163 4290083435 4289819512 4289031296 4289228656 4289226114 4289159265 4292387716 4293904279 4294037665 4293973177 4294170798 4294170787 4294038705 4293514403 4294038177 4294038189 4294038177 4293513127 4294103715 4294037406 4293513385 4294168749 4293512602 4293839530 4293578406 4293774764 4294168748 4293513374 4294103458 4293708451 4294102688 4294036381 4294036637 4294036381 4294036638 4294036382 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4284684606 4284488774 4284551741 4285601090 4284881731 4284947524 4284816450 4284881732 4285996361 4288168011 4289939532 4288825953 4289742680 4289807701 4291258213 4291782248 4292770157 4292115814 4293101425 4293235330 4293632127 4293632387 4293566850 4293566079 4293565824 4293567365 4293566593 4293566591 4293627266 4292970359 4292902496 4292108635 4290332501 4288231500 4287571014 4287571779 4286987353 4290013843 4289813114 4289287278 4287050846 4285739354 4285869153 4288043394 4286858865 4286659687 4284620615 4283962446 4283632715 4283501643 4286006125 4286857840 4283108167 4285212240 4285408599 4283960667 4286799507 4288905373 4286732681 4286338457 4288047513 4287255699 4287264922 4288908473 4287321742 4287981723 4286597764 4285873768 4285675904 4285611371 4288446635 4291645816 4291118948 4289101220 4285477729 4288045967 4288757592 4292583048 4294497977 4291137396 4283959615 4284228172 4283570767 4284621900 4284425036 4285015375 4284620614 4284818510 4284881738 4285143102 4285866571 4285932354 4284947524 4284029245 4284488259 4286064203 4284487742 4285536836 4286062660 4284619070 4284289599 4284746549 4285933389 4285406789 4285340731 4286128713 4286131020 4285470013 4285142073 4285603658 4286130248 4285996616 4286657615 4285339195 4285997129 4287311687 4286520647 4288095303 4288821837 4289152334 4289543505 4290004815 4291316553 4290595153 4291841371 4291847005 4292436076 4291781733 4292044899 4292306792 4292702564 4292440440 4292309110 4292570979 4292506981 4292375671 4292311419 4292900968 4292967802 4292837767 4292575351 4292640890 4292769892 4293102487 4293168264 4293301388 4293302411 4293302671 4292972687 4293034366 4293033873 4292576647 4292707449 4292379030 4292508277 4292117354 4289813352 4283498540 4285076542 4286196556 4284224322 4283635272 4284291397 4284030543 4283831620 4285079111 4285278289 4285472323 4286330190 4284881735 4285141558 4285996356 4284422463 4285340484 4285995327 4288831842 4288231755 4286918733 4288431705 4286985037 4287181385 4286784839 4287115596 4287773009 4286392138 4286061384 4286193221 4284619079 4291595660 4292452756 4292249717 4292712333 4291655008 4291331970 4291593848 4291334268 4291922303 4291334521 4291593344 4291662217 4290939013 4291724925 4291792006 4290939254 4290939270 4291790718 4290873990 4291724929 4291137398 4291790721 4290938741 4291070327 4291136134 4291069826 4290282621 4290216577 4290410874 4290870639 4290413696 4290476922 4290345592 4290016889 4289622637 4289227878 4288634736 4290011755 4292912773 4293707934 4294038948 4293972921 4293972910 4293972901 4294037922 4294037409 4294037420 4294037419 4294038434 4294102442 4293512602 4294103213 4293513372 4294036648 4294103212 4293513385 4294103201 4294103201 4293513385 4294103470 4294036381 4294036638 4294036382 4294036639 4294036639 4294036639 4293838489 4294036896 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4284878650 4284880184 4285272639 4284749111 4285013067 4285076548 4284684348 4284554823 4286126144 4287903824 4289679968 4289742422 4288629333 4290531418 4290994789 4292438373 4291654246 4292576886 4293036161 4293498234 4293632128 4293238649 4293237638 4293041787 4293370743 4293566594 4293501574 4293567107 4293562229 4293560952 4292835420 4292108893 4290201419 4288229961 4286978630 4287442769 4288952657 4289090157 4288433254 4289285742 4287316853 4286525781 4285938279 4286989156 4287320434 4285675114 4284687193 4284161360 4283568971 4282976587 4286532715 4286855806 4283307332 4283503687 4285867874 4285606768 4286731125 4288642982 4286730132 4285875847 4287652238 4287919525 4287651232 4288511662 4287917731 4288116647 4287982245 4287324069 4285217899 4285345900 4289169333 4289223045 4293282386 4290151341 4284820051 4286928264 4288370048 4290278786 4292334541 4285015359 4283505223 4285276745 4283962947 4284552519 4284684618 4284357446 4284293195 4284357704 4284616502 4285604936 4285804366 4285864514 4285078336 4284027453 4284814921 4286064203 4284618301 4284357445 4286128708 4285140798 4284552503 4284817485 4285601083 4286324810 4285798723 4285668162 4286194249 4285407303 4285535806 4285471805 4286129481 4285668931 4286259266 4285798724 4285012547 4287510606 4286850631 4285533506 4287110984 4289016905 4289150287 4289609800 4290461519 4290397511 4291055177 4291384668 4292106838 4292373354 4292373096 4292108903 4291914345 4292438886 4292964708 4292505482 4292768628 4292375413 4292768374 4292639866 4292771191 4293034131 4293299588 4292708235 4292903577 4292970121 4293367934 4292975781 4293365629 4293301135 4293367695 4292774295 4293497228 4292644745 4292510857 4292770422 4292247689 4292577389 4287179591 4284024906 4285276229 4287047240 4283569224 4284290378 4284028485 4284029500 4284818254 4285146444 4285998153 4285406532 4286261321 4284551734 4286326347 4285671240 4285010232 4285928256 4285603650 4289550442 4287445078 4287574859 4287644763 4287706960 4286653513 4286654534 4287771724 4287772495 4285866820 4286589256 4285536856 4285537868 4291530637 4292321690 4292117870 4292843661 4290932332 4291856249 4291528322 4291728252 4291923060 4291530895 4291398514 4291660678 4290807410 4291726726 4290742145 4291593341 4291659647 4291331464 4291528059 4291790720 4290153595 4291135878 4290807674 4291921792 4290545027 4290676354 4290544769 4290675834 4290084991 4290476409 4290348157 4289951863 4290411128 4290016888 4289819002 4289227894 4288635240 4289687918 4292981908 4293840803 4294038704 4294236332 4293972912 4294038693 4294038180 4294038180 4294038180 4293513374 4294037422 4294036891 4294037676 4294037417 4294038189 4294038189 4294037676 4294036894 4294037666 4294037923 4294036381 4294036381 4294036639 4294036639 4294036639 4294036896 4293838489 4294036896 4293904539 4293772181 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4284748607 4284554309 4284422980 4285077566 4284684604 4284552516 4284358474 4284355138 4286456647 4288757838 4288957520 4289810013 4288890710 4289019732 4291520351 4291914601 4292768618 4292509550 4292906109 4293300864 4293238149 4293042041 4293632388 4293436280 4293566852 4293500545 4293763699 4293500798 4293563773 4293299578 4292900972 4291454300 4290069583 4288293958 4286979399 4287509841 4288362055 4289288575 4287581811 4290338419 4286193222 4285082715 4285805425 4284291401 4288834701 4285280858 4284291914 4285081162 4284029004 4283305276 4286793076 4286463864 4283436091 4285146206 4284161876 4286199684 4287517575 4287328145 4287127954 4284553539 4284948337 4284754778 4288049320 4288049316 4288447926 4288773045 4287984292 4288113561 4287584417 4285017703 4289039782 4288766359 4291183467 4291270831 4287449457 4285017180 4288502902 4289089893 4293316275 4284617559 4286859098 4284686931 4283569234 4284163148 4284293708 4284883790 4284225856 4284884046 4284617786 4285871454 4286128709 4285669960 4284161610 4284222781 4285603395 4285736265 4284618814 4284551996 4284882245 4285342282 4284028231 4285011254 4284487999 4285078076 4285406278 4286194505 4285669186 4286259018 4285472061 4284881213 4286194249 4285734467 4286064456 4286129481 4285141819 4286983754 4287377486 4285926979 4285470016 4286716743 4288031303 4288754250 4289086799 4289544783 4290987335 4291384148 4291452511 4292303460 4292171877 4292175207 4292175993 4292240997 4292176758 4292374385 4292575114 4292377977 4292572771 4292903305 4292576636 4293036671 4292973203 4293039521 4293431157 4293167768 4292971919 4293366646 4292972951 4292971896 4293366413 4293366667 4292973454 4292644488 4292574859 4292573542 4292708226 4291589230 4284745528 4283632958 4287050063 4284619588 4283503431 4284554572 4284426063 4283765836 4284818252 4284555340 4285540172 4285408077 4285931331 4284615736 4286132558 4285143101 4285077566 4285340999 4286915400 4288767849 4288299089 4287377746 4288301388 4287051601 4287178568 4287181903 4286591051 4287179596 4286522180 4287051350 4284683074 4284942395 4291599772 4292255132 4292511864 4292382080 4291001196 4291659908 4291529598 4291728251 4291529087 4291857512 4291595144 4291528834 4290939527 4291725182 4291070340 4290939525 4291921791 4290022009 4291004290 4291005063 4291987061 4290939526 4291921791 4290873220 4290938224 4290676356 4291132791 4290413950 4290019195 4290348157 4290150512 4290410871 4290214008 4289885048 4289493105 4288638057 4289159028 4290475900 4293835924 4294102944 4293974194 4293973936 4294038435 4294038694 4294037409 4294036639 4294037666 4294036640 4294038434 4293513141 4294038443 4294037417 4294038189 4294038177 4294037409 4294037923 4294036382 4294036639 4294036639 4294036639 4294036896 4293838491 4294102689 4293838489 4294102690 4293904539 4293970845 4293838489 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4284748349 4284552516 4284949065 4284882504 4284420426 4284420667 4285079371 4284357187 4286195278 4287640654 4288298576 4288890445 4289545552 4290201173 4291125856 4292112992 4292177767 4292707184 4293232500 4293301638 4293238919 4293631616 4293370228 4293370230 4293566078 4293566073 4293502602 4293565562 4293563767 4293298034 4292835424 4292241235 4290267731 4287639625 4287634502 4287574357 4287249230 4289088342 4289485937 4286590559 4285146456 4285670757 4285146703 4284553802 4289104296 4285342801 4284096589 4284752985 4284226374 4283701340 4285545570 4286462833 4283174730 4285147739 4283568727 4285412210 4287587481 4288508810 4286865038 4285080423 4284294722 4284225889 4285609851 4286865045 4288446631 4288511915 4286929052 4288642997 4287593393 4287125919 4288179609 4289757095 4291193227 4290873252 4290659407 4287385219 4286597989 4287315807 4284425792 4284950090 4287053660 4283899209 4284228683 4284554825 4286391625 4284291911 4284356928 4284294993 4284161096 4286259014 4286063688 4286195017 4285208892 4284226630 4284684607 4286327628 4284618044 4284555854 4284945717 4286457675 4285010223 4284224333 4285797696 4284226373 4286129996 4285735499 4285798467 4285405757 4285865028 4285538376 4286195273 4285734210 4286129996 4286129736 4285143875 4286458699 4287508810 4285406787 4285467705 4285073464 4286453832 4287046472 4288886090 4289671241 4289740109 4290921542 4291514969 4291714144 4291979368 4291780192 4291913322 4292570725 4292176760 4292964455 4292309624 4292640103 4292115851 4292704887 4292771975 4293296759 4293236375 4292711318 4292974481 4293299596 4293302669 4293299597 4293299852 4293365133 4292974749 4292976026 4293042308 4292904589 4292376952 4292118133 4291988604 4290464856 4284353591 4284551751 4286916679 4284423754 4284162636 4284687694 4284095821 4284161870 4284817995 4284620876 4285669958 4286263373 4285143616 4284615992 4286062660 4284749373 4284816453 4285864259 4286062404 4288831589 4288035928 4287444044 4288237421 4287115595 4287113033 4287707473 4287116107 4287835981 4285998909 4286918477 4286195269 4285008203 4291270281 4292912016 4292250238 4292384652 4291590760 4291199860 4291594106 4291660412 4291267978 4290941843 4291529586 4291004791 4291593598 4291199355 4290939525 4291921789 4290088330 4292118142 4290284939 4291069553 4290219404 4291395707 4290676607 4290873216 4290284417 4290807172 4290022010 4290739076 4290085247 4290804342 4290150784 4289822592 4290148469 4289557631 4289294448 4289291113 4288505464 4290541423 4293115033 4294104229 4294170540 4293973948 4294038436 4294037923 4294037409 4294037666 4294036896 4294037666 4294037409 4294037407 4294037429 4294038188 4294038188 4294037420 4294037665 4294037153 4294036639 4293838747 4293838489 4294102689 4293838748 4293904007 4293772440 4293970848 4293837956 4293772695 4293048462 4293505670 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4284358730 4284614211 4284751686 4285211212 4284161090 4284488267 4284224567 4284486455 4285798978 4286723407 4288494159 4289087323 4288759382 4290927190 4291716962 4291914601 4292638828 4292641135 4293234295 4292908926 4293303669 4293566852 4293631872 4293566080 4293566847 4293501059 4293764472 4293501316 4293565053 4293496687 4292834909 4291849050 4290135119 4287900742 4286588999 4287179590 4288034122 4288957034 4289944438 4284093768 4284424007 4284752712 4283763544 4284756059 4288770445 4287055205 4283698259 4285475413 4285870443 4283567930 4286004846 4285673308 4283700554 4284620093 4283831387 4283566157 4288113051 4288905139 4288776108 4285869938 4283897174 4286132080 4285281897 4286337161 4287585953 4287916196 4288182182 4288447149 4288905656 4286995100 4287652246 4288701598 4290478241 4290020516 4286989689 4289218415 4287255136 4288174438 4283766858 4286722131 4283965516 4284032334 4284027980 4284292172 4284686924 4284425037 4284094795 4284225856 4285012032 4286195016 4286061639 4286064456 4285012292 4283765815 4285077821 4286985551 4283961667 4284423496 4284554310 4285867592 4284554568 4284552246 4284423238 4284945207 4284225859 4285932363 4286195273 4285405244 4285933389 4284420405 4285930563 4285539913 4285733952 4286197580 4285404731 4285802056 4286196810 4287706188 4284813879 4285076539 4284156978 4286583109 4287176777 4287836490 4289212489 4290070348 4291316041 4291125081 4291975264 4291583326 4291584873 4291781495 4292701796 4292307832 4292703846 4292376955 4292833657 4292510570 4292901767 4292575094 4293101453 4292972167 4292840583 4293299599 4293369737 4292972960 4293366920 4292973710 4292973452 4293039764 4293103245 4292512142 4292244613 4292707195 4291194735 4289608783 4283761470 4284224073 4286522950 4284095560 4284098385 4285014859 4284557136 4283901005 4284424267 4284620876 4286260550 4286329681 4284943416 4285473349 4284750148 4286127684 4285403968 4285077570 4287245130 4289554028 4288035928 4287441992 4288367961 4286458954 4287179077 4287641680 4287050062 4287771980 4286127431 4288101706 4285011025 4283960909 4292446851 4292387485 4292250227 4292843404 4291002480 4291331199 4291791216 4291004808 4291791997 4290939005 4291790721 4290807941 4291133048 4290219660 4291921790 4290807681 4291593351 4290219388 4291069569 4290938754 4291593351 4290219388 4291201670 4291069812 4290544258 4290610544 4290673541 4290085246 4290673528 4289951095 4290410871 4290476662 4289754503 4289622378 4289162882 4289291377 4288438121 4291726209 4293839005 4294038435 4294170554 4294172079 4293972901 4294038180 4294037666 4294036896 4294037666 4294037666 4294037409 4294038179 4294038190 4294038177 4294037420 4294037665 4294036382 4294036382 4294036897 4293837957 4294102946 4293706646 4293838232 4293706645 4293376649 4293507980 4293506441 4293500292 4293299297 4291455309 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4285012799 4284620356 4284420413 4284355133 4284814141 4284680260 4284029757 4284621390 4285405507 4286391367 4288100174 4288300876 4289676882 4290271586 4291324779 4292108638 4292640367 4292641132 4292970368 4293761152 4293238407 4293631353 4292843142 4293632385 4293566850 4293567108 4293501573 4293566336 4293563766 4293429624 4293164652 4292109407 4289676622 4286917196 4286389843 4286129476 4287112778 4290278273 4286327625 4284619843 4284617290 4284029254 4285543775 4286333048 4286855510 4287184497 4284028998 4284884301 4286132049 4284620874 4286330983 4285280874 4283699780 4284029796 4284161861 4282778195 4287389319 4289303220 4287985824 4287651214 4284027465 4286334078 4285675902 4286531963 4287718559 4286334335 4288180136 4287848859 4288517295 4288645566 4288974008 4287191964 4288970156 4290940071 4292062647 4284882517 4285872750 4287515236 4287649392 4283702088 4283439952 4284361298 4284226370 4284360271 4284817996 4284620361 4284292934 4284490573 4284622161 4286063942 4285868618 4287247181 4284358732 4283831360 4285537347 4286196043 4284815678 4284751174 4285276230 4285012805 4285146959 4284618301 4285341256 4285013573 4284881728 4285405507 4285867596 4285275714 4285409102 4285999436 4284816197 4286259271 4285736011 4285145931 4285274947 4286063432 4287443274 4287310919 4286457674 4285339198 4285142585 4285336377 4285273143 4286716232 4287508813 4288229961 4289805386 4289413701 4290134858 4291120206 4290928217 4291582562 4291388262 4291256691 4291848030 4292439935 4292505444 4292442489 4292114053 4292772214 4292771716 4292967826 4293037194 4293432695 4292971428 4293369211 4293037968 4292512390 4293364615 4292709237 4292904848 4292378484 4292377993 4291853424 4291326062 4289807956 4283895113 4284358467 4285407836 4284230480 4284293707 4284885603 4284032334 4284819024 4284949582 4284425039 4285673033 4286328652 4284752459 4285869131 4285143356 4284882245 4285472067 4285078603 4287246922 4288765020 4287906385 4287510862 4287514199 4287772234 4286526027 4287577944 4288166224 4287574603 4286656075 4287316058 4286063185 4284748857 4291139482 4292448647 4292708729 4292119681 4291067769 4290871411 4290540151 4290282866 4291264882 4291462260 4291199354 4291462002 4290873733 4291330684 4290938754 4290481289 4290938753 4291330428 4291136133 4291004290 4290676095 4291790204 4291001990 4290284410 4290544769 4290084221 4290676353 4290541944 4289429887 4290282368 4290213495 4290082680 4290214007 4289427569 4289227620 4288702329 4288899440 4292386417 4293641630 4294038434 4294170543 4294170543 4293973157 4294038180 4294036896 4294036896 4294037666 4294037666 4294037409 4294038180 4294038179 4294038180 4294037665 4294037153 4294036382 4294036896 4293706388 4294168741 4293772695 4294034827 4293575057 4293440663 4293174379 4292841319 4291717190 4288956486 4286327112 4284421191 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4284288836 4284288579 4284226885 4284619588 4284815938 4284224069 4284745532 4284096582 4284355644 4285996360 4287640140 4288629321 4289874785 4289743190 4291256419 4291783782 4292246122 4292839299 4293234299 4293234304 4293237632 4293631354 4293302910 4293172358 4293631612 4293567366 4293566594 4293565818 4293563261 4293298040 4292965727 4291453015 4289873488 4287113286 4285076544 4286129222 4290080670 4289553555 4286657869 4288572059 4284026682 4282912337 4286000729 4288307848 4285344078 4286199391 4284948550 4285672544 4285015144 4285541971 4286001502 4285212242 4284158792 4284029771 4284555102 4283040336 4284957305 4290092732 4288315056 4287784078 4284947798 4285608043 4286333811 4284818540 4286990697 4288047773 4287591081 4285939069 4287325065 4288712623 4287058071 4288247216 4288444078 4289501103 4291072935 4288704682 4289628602 4288768149 4290804871 4284820047 4283175759 4283369796 4283966031 4284029007 4284292936 4284425037 4284685898 4284096073 4285799750 4287047497 4286394445 4286851143 4284025667 4284290373 4285276745 4286264909 4284554054 4284292425 4284488003 4285734982 4285866824 4284683837 4284160062 4285339710 4284289342 4284487742 4285471810 4285341517 4286260295 4285734210 4285405766 4286131787 4286129479 4286195528 4285209411 4285472841 4287049290 4286656330 4287902537 4286324552 4285996103 4286258752 4285535552 4286914632 4285930053 4287046214 4287307846 4286651972 4287046212 4287179592 4288821835 4289019210 4289024085 4290139754 4290863218 4291124314 4291784043 4291980407 4292508273 4292115333 4292706678 4292245873 4292968578 4292710799 4293037707 4293431183 4292969351 4292379499 4292574836 4292902279 4292314244 4292704119 4291852397 4290996843 4291977806 4288689993 4283371316 4284487239 4284750654 4284424268 4284752718 4284096072 4284295761 4284949069 4284884046 4284620620 4286000975 4285079111 4285078083 4285735502 4284554567 4284618301 4285275977 4285670986 4286655049 4289221737 4288039013 4287513173 4287578713 4287576910 4287179849 4287643480 4287513423 4287575883 4287244873 4287248973 4285864771 4285408340 4291469467 4292447622 4292316544 4291725687 4290541678 4290405995 4289292658 4290473066 4291000698 4290936952 4290477176 4291068283 4290873209 4291001976 4290742147 4290284423 4291201669 4291070597 4291136133 4290938754 4291069826 4290807680 4290218873 4290938241 4291526774 4290021768 4290478461 4290936184 4289888127 4290082422 4290082934 4290082936 4290148215 4289228672 4289292915 4288700775 4288965501 4293111947 4294036122 4294038707 4294170788 4293972901 4294037923 4294037666 4294036896 4294037923 4294036896 4294037666 4294038437 4294037409 4294037666 4294036896 4294036382 4294036640 4294036897 4293904539 4293838233 4293509250 4293244567 4293638276 4293566582 4292249457 4290859589 4286850633 4285270075 4283633477 4283831869 4283633216 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4284292419 4284355148 4285274165 4284358476 4284486200 4283961656 4284159308 4283962186 4284485181 4286127686 4287049804 4288694606 4288103247 4288693320 4291255127 4292046177 4292638572 4292970355 4292970870 4293302658 4293697145 4293238150 4292909707 4293696889 4293173115 4293238393 4293567622 4293566592 4293628798 4292970607 4292245350 4291451220 4289282892 4285666878 4285999711 4291071656 4293844411 4288759650 4289290373 4291399061 4283173701 4283306567 4284949084 4287053154 4285870944 4285012030 4286000733 4285408592 4284357956 4286526825 4284094538 4284423255 4284226373 4284030796 4284355930 4283500883 4284493670 4289174971 4288776111 4289566131 4286728593 4287061123 4286663038 4284684888 4285150572 4289165483 4288250539 4286860935 4285281381 4287391652 4286467725 4287789992 4289169333 4289765553 4289034919 4289296805 4289959847 4290949567 4290290102 4288442273 4283767871 4283572302 4283767375 4284162629 4284227665 4284554307 4284227143 4284818254 4284948294 4287445327 4286853451 4286656333 4284095298 4283699761 4285274940 4287050834 4284486458 4285473351 4284095044 4284618044 4285342793 4284357189 4285339709 4285078341 4284160318 4285929533 4284621387 4285273396 4285408592 4286195528 4285800514 4286194504 4285670987 4286195528 4285801027 4285405244 4285604934 4286785607 4288233043 4287771465 4286652999 4286782280 4285996871 4287050571 4287967322 4287249237 4287771219 4288364389 4289220698 4290071142 4289679472 4289613403 4289942383 4291124076 4291059297 4291386481 4291846513 4292174960 4292110211 4292574082 4292900996 4292511113 4292967824 4292968341 4293105291 4292710286 4292576913 4293230987 4292836250 4292707448 4292375168 4290537844 4290796906 4291259994 4290728028 4286655300 4284096334 4284356928 4284294480 4284687181 4284033875 4284100180 4284488525 4284951121 4284949582 4284225858 4285608787 4285605446 4285211985 4284947520 4285078852 4285011514 4284750148 4286719559 4286654538 4288829535 4288103772 4287511381 4287578199 4287643743 4286592084 4287116884 4287575119 4287642702 4286062661 4288034644 4285738065 4285800018 4292453259 4292319100 4292972929 4291526264 4289489783 4289290072 4289485915 4289289832 4290013014 4289883771 4290080107 4290275445 4290477176 4290805113 4290410872 4290673525 4290871420 4291199611 4290542456 4291461495 4290219145 4290610562 4291135363 4290478975 4290479232 4290938508 4289955702 4290019708 4290279554 4290082678 4289558663 4290410871 4288441973 4289556848 4288636776 4289159286 4290541178 4292852356 4294167968 4293973158 4294170790 4293973158 4294038438 4294036896 4294037153 4294036896 4294037923 4294037153 4294036127 4294037153 4294036382 4294036640 4294036640 4294034831 4293771908 4293772180 4293246871 4293503362 4292713583 4292376922 4288958293 4286653763 4284027453 4284223802 4283828543 4283830585 4284550969 4284683070 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4284552260 4284945461 4284227148 4284815420 4284027711 4284157247 4284486200 4283764285 4284813631 4285274940 4287836746 4287970897 4288035406 4288755786 4290464600 4291519841 4292704621 4292575597 4292972158 4292972406 4293236870 4293632383 4293629561 4293565815 4293632128 4293172359 4293565305 4293566850 4293365362 4293428330 4292507249 4291188049 4288228942 4287903326 4291472069 4294304451 4287181363 4286256230 4288566626 4289100447 4283370819 4283565640 4283765831 4286729071 4286068584 4284686416 4285343055 4284951383 4285146708 4286133089 4284489024 4284489028 4283766862 4283962426 4283504206 4283500113 4284229476 4288317874 4288441764 4289436078 4288310688 4285542757 4286071408 4285212775 4284553325 4286532466 4288645808 4286727550 4284820587 4287658162 4288380348 4285279078 4288448933 4289827251 4289235624 4287124374 4284227648 4288761706 4289370540 4289831609 4288177316 4284951129 4283107134 4283240010 4284028219 4284030286 4284621901 4284027200 4285603143 4287967823 4286788430 4286263377 4284222517 4283502406 4285211209 4286785094 4284161354 4284160579 4284619588 4284422980 4285209670 4285209404 4284486728 4284620358 4285733700 4284355652 4285078851 4284947270 4285406784 4285933387 4285211723 4285406789 4286194760 4285276229 4286326602 4285470276 4285142336 4286983240 4287638604 4287443788 4288163913 4287706187 4289611335 4290860903 4290466657 4290992485 4291127150 4291980153 4292307830 4291848554 4291853442 4291918979 4291522672 4290930545 4291457392 4291723132 4291523964 4292378759 4292443252 4292580223 4292709768 4292514431 4292513145 4292644984 4292841597 4292907651 4292515206 4292451223 4292845974 4292908938 4292516001 4292714641 4292126380 4292912552 4290746783 4289159282 4285739872 4284753232 4283439686 4284359502 4284951635 4284882502 4283901262 4284687181 4284556366 4284686925 4286064201 4285145159 4285802062 4284488003 4284489801 4285209927 4284880184 4286065742 4286326861 4288959072 4287907925 4287575884 4287581784 4287577173 4287180885 4287052878 4288168792 4288163414 4286063688 4286723402 4286392155 4286263895 4292716956 4292314733 4292448643 4291193459 4288632658 4289686894 4289220950 4289419871 4289551717 4289487979 4290012775 4290012514 4289947772 4290277739 4289948268 4289491578 4290671477 4290214776 4290739576 4290608248 4290805112 4291856254 4290610819 4290742148 4291002236 4290347372 4290807684 4290016373 4289953663 4290019440 4290082167 4288967538 4289688447 4288637814 4289422707 4288372070 4291334280 4293638806 4294104230 4294038694 4293973158 4294037667 4294035336 4294036384 4294036384 4294037153 4294036896 4294036384 4294036621 4294036384 4294036641 4294035850 4294037155 4293969801 4293639825 4292782727 4293042555 4292118395 4290795595 4286851656 4284943936 4283960388 4284027192 4283370816 4283830591 4285405503 4285405501 4286194505 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4285078597 4285539148 4285144644 4285209926 4284552516 4284354885 4283764029 4284091977 4283960632 4285799493 4287311431 4287575375 4287508811 4287639882 4290531413 4291783785 4292245091 4293033848 4292839285 4293367430 4293238661 4293237119 4293632384 4293172614 4293563263 4293632127 4293566336 4293566849 4293431160 4292969327 4292175698 4290269291 4289285478 4292195525 4294892979 4286591030 4287455371 4285536835 4289100922 4288237412 4283898699 4284427091 4283433789 4286990445 4286661993 4285344340 4285999197 4285801806 4286397291 4284226116 4284357700 4286594423 4283962947 4283766370 4284292164 4284025939 4286334599 4289233576 4287851944 4288112789 4288714168 4287320967 4285871712 4285675115 4284488273 4284685649 4286597746 4285479805 4287453863 4289110208 4288316315 4285873287 4286532748 4288582837 4289437619 4288973229 4286594946 4283896123 4285801318 4290621347 4291475388 4290024640 4284688218 4282977355 4283241042 4283963467 4283964749 4284685636 4285537351 4287378764 4287249742 4286850374 4283372102 4283631938 4286131786 4286786637 4284420418 4284619588 4284683836 4285405756 4284358732 4285603139 4284291132 4284882763 4285274172 4284486724 4284686152 4284813877 4285408330 4284816708 4286326089 4285405243 4286196041 4285800003 4285076023 4285667648 4285076280 4286129222 4287115081 4288099659 4287641681 4289414227 4290467175 4290072160 4291322483 4291519838 4291585135 4291715937 4292175972 4292110954 4292310123 4292439138 4292505187 4291914603 4291852656 4292114300 4292176483 4292442232 4292375926 4292575113 4292509813 4292578939 4292575352 4292574596 4292576139 4292511101 4292316295 4292970624 4292641918 4292643723 4293169539 4293172881 4292783003 4293506473 4293247396 4293051570 4292395189 4290026664 4287060093 4284690004 4283111751 4284425037 4283965008 4284294221 4284490316 4284291911 4285538891 4285144644 4284685382 4284094523 4284225868 4285540171 4284225603 4286131017 4286783558 4287976288 4288171632 4286985556 4287646818 4287642452 4286526540 4287771469 4287447631 4288100682 4287116364 4287966795 4286260287 4286066766 4292649629 4292379244 4292448386 4289751913 4289546072 4290141786 4289485153 4289613409 4289614429 4289353300 4290076269 4289485925 4289553488 4289488758 4289550686 4289620849 4288899699 4290144377 4289622382 4289621870 4289688441 4290476664 4290936697 4290607990 4290673525 4290742156 4289950837 4290674042 4289953662 4289755526 4290082166 4289229936 4289162351 4289359729 4288569712 4288898417 4292385146 4293970330 4294038694 4294037923 4294038438 4294036382 4294036641 4294037412 4294035593 4294037154 4294037923 4294036382 4294036640 4294036640 4294036108 4293904544 4293838231 4293639566 4292850311 4292909187 4292645764 4290144596 4286788174 4285403707 4283502402 4284028226 4283699004 4284552764 4285009719 4286128963 4286985550 4286851401 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4285472845 4285277001 4285539149 4285212746 4285013315 4284486973 4284553797 4283961662 4284023858 4285931077 4286390344 4287182156 4287050828 4287311691 4289089104 4292111972 4292309089 4292511350 4293234301 4293301894 4293694846 4293238662 4293695353 4293238406 4293632382 4293172357 4293566851 4293566330 4293495934 4292706152 4292572023 4290927719 4293116110 4293840033 4287246651 4285935703 4286652990 4284289869 4288505226 4284951122 4283240263 4283502149 4282978642 4286397279 4287450227 4286132559 4284488278 4285935442 4285739111 4284752971 4284881236 4286861953 4284292166 4285212240 4284423256 4284160062 4285608041 4288706472 4288839332 4287648920 4288840348 4289237176 4286136953 4284425043 4283171392 4284424032 4286733712 4288115375 4287855274 4289438900 4286073223 4286465164 4286404493 4287915404 4289565359 4287646079 4288773002 4287845010 4284157747 4288176258 4291336355 4290881443 4289894595 4284292693 4283439949 4283768393 4284161347 4285014603 4286128709 4286787148 4287969874 4284948294 4284093516 4284357447 4286526031 4286132554 4284160840 4284553538 4285145164 4284292424 4284555339 4285669452 4284357187 4284747580 4284488774 4284684349 4284618300 4284816714 4284292940 4286063179 4285801026 4285209411 4285799241 4286260809 4285275714 4284617527 4285078592 4285405763 4287181388 4287902798 4288691532 4290792021 4291187544 4291453794 4291584360 4291716713 4292109413 4291124833 4291520352 4291847520 4291584871 4291980647 4292308841 4291127406 4291914601 4291651944 4292572537 4292442232 4292379516 4292573797 4292575368 4292640647 4292378745 4292444537 4291919997 4292704869 4292444027 4292378230 4292577161 4292513659 4292384402 4292781454 4293110153 4292982177 4293573542 4293705126 4293640611 4294099366 4293841850 4291408052 4287522696 4284756833 4283442507 4284358732 4284489803 4284422979 4285209669 4285080395 4284553536 4284159053 4284357184 4284685391 4285143619 4286067032 4286656587 4287974224 4288893296 4287049799 4287051851 4287843944 4287246411 4287115603 4287512153 4288166989 4287115339 4286721107 4285607013 4287576667 4292978581 4292052586 4291921531 4290274655 4289421423 4289289580 4290800500 4289355884 4289615453 4289550696 4289483619 4289616986 4289617011 4289614937 4289617785 4289421412 4289419868 4288896867 4289159542 4289750642 4289555056 4289556336 4289425273 4290082425 4289820026 4289885046 4290017144 4290083192 4289951095 4290279798 4289624711 4290082167 4289162623 4288769141 4288701057 4288832622 4292911499 4294101640 4294037668 4294038953 4294036107 4293838750 4294036110 4294035851 4294036643 4294036382 4294036382 4294036639 4294036639 4294036640 4294100624 4293837700 4293574030 4292982936 4292849561 4292450436 4291131754 4287973204 4285799748 4284421701 4283894078 4284223294 4284552253 4285866563 4286392396 4287837516 4287706702 4287180875 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4286326854 4285867847 4286064969 4285408589 4285144649 4285733436 4284685896 4284290365 4283897418 4285535548 4285802057 4287376967 4287243847 4287443273 4289479503 4291123542 4292308844 4292114532 4293297520 4292972920 4293302918 4293301630 4292910205 4293105022 4293171334 4293630591 4293565817 4293564033 4293234553 4293099909 4292048263 4293183435 4292845682 4286587450 4285995330 4287645290 4284422752 4285741155 4291533978 4282844220 4283371857 4283372106 4283304762 4285936222 4288107891 4285933401 4284949586 4285475667 4285082711 4284816716 4284815957 4286926963 4287120229 4284882779 4284423739 4283831150 4285671509 4285481078 4288378529 4288906672 4286596721 4288509865 4289302198 4285411455 4284360041 4285478004 4287123344 4288379822 4289242036 4287985562 4284950383 4286206853 4286399618 4286072707 4287524513 4288906153 4286398569 4286531442 4286331517 4286268003 4289566888 4289030289 4289634718 4290026951 4283240007 4283699780 4283963469 4284949063 4286066786 4286853450 4287905102 4285341771 4284094777 4284027724 4285278026 4286722913 4285211979 4284489543 4284752717 4284421705 4284421691 4284554566 4285867598 4284752458 4284618301 4285209927 4285604940 4285538380 4284945719 4285014087 4285670216 4285935439 4285209151 4285866828 4284487742 4285932876 4285141815 4285602627 4287838288 4288493133 4288494414 4289810791 4291190366 4290928735 4291847268 4291914339 4291452515 4291649380 4291191141 4291978877 4291325038 4291387754 4291717489 4292243064 4291455610 4292636791 4292112999 4292440952 4292376185 4292379260 4292444539 4292050028 4292507256 4292507513 4292115056 4292112536 4292115561 4292245895 4292577139 4292841603 4293172881 4292715661 4293045149 4293049245 4292983728 4293310881 4293247649 4293378466 4293641140 4294102186 4293774524 4292197557 4288706954 4284955239 4283702343 4283835471 4284815938 4284163665 4285146962 4284029758 4284097354 4284357438 4285014860 4285605961 4287842401 4288237136 4288239212 4287050590 4287120728 4287774817 4286065225 4286592333 4288364111 4287510350 4287179847 4287379808 4286262873 4287709023 4292850334 4292445038 4292117365 4289616998 4289946726 4290998905 4290408028 4290408034 4289288546 4290013547 4290074983 4289485659 4289549661 4289616488 4289419611 4289484646 4289023585 4289093227 4288893024 4288239963 4289815397 4288762196 4289815415 4289092971 4289552990 4288505977 4289750907 4289621870 4290081148 4289098097 4289818221 4288638072 4289359983 4288704377 4288568682 4288832625 4292649600 4293904281 4294037154 4294038695 4294036643 4293838216 4294034830 4294036901 4294035850 4294036640 4294036639 4294036639 4294036639 4294036896 4293640083 4293180054 4293374864 4292981380 4293171840 4292117876 4288367438 4285995074 4284221241 4284288313 4284421688 4285472068 4286063688 4286852173 4287640395 4288166737 4287509581 4287050574 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4288894820 4287580250 4286657606 4286392648 4285997127 4285799747 4284815683 4284553274 4285143101 4285669188 4287048264 4286982472 4285668680 4286783559 4288231502 4290925905 4291913815 4292640368 4292903549 4293300600 4293238143 4293235846 4293695102 4293170311 4293630329 4293565312 4293632126 4293630844 4293299071 4292773780 4293842602 4292908156 4288296529 4286978883 4286260046 4286722916 4285078078 4292057758 4288896872 4283500359 4283305279 4283372370 4283237959 4284357703 4287186547 4286592859 4283564854 4285146457 4284815691 4284621382 4284683882 4286861424 4288502164 4285868378 4285934703 4285343301 4284687192 4283435347 4285216103 4289170869 4288309669 4285018465 4288446632 4287986354 4289104056 4289233849 4287988406 4289634992 4288780219 4284752477 4286793348 4285675633 4287392931 4286794639 4286531702 4288183714 4287586217 4285014865 4287852710 4289296287 4290683828 4289161876 4285209412 4290099889 4288443050 4283241284 4283765069 4284948554 4286127173 4286851398 4288034124 4284355652 4283830864 4283831100 4285804368 4287247946 4284027720 4284751174 4284883016 4284619587 4284619588 4284880444 4285277002 4285143356 4285077562 4284554567 4284619845 4285012546 4285080142 4284682548 4285999180 4285407043 4285473358 4286194247 4285539143 4285538117 4284946494 4285798723 4286787401 4287904337 4289675340 4290990938 4291122778 4291387747 4291256412 4291518308 4291583844 4291388001 4291190625 4291583841 4291518566 4292372857 4292110437 4291654765 4292637047 4292636769 4292439927 4292572261 4292573544 4292376440 4292573288 4292702565 4291919747 4292178534 4292180076 4292115307 4292114543 4292444026 4292511347 4292844175 4292777865 4293108618 4293045662 4292654497 4293246634 4293115293 4293443248 4293641642 4292984215 4293575349 4293575589 4294166692 4294101682 4292394928 4289430944 4285477212 4283438404 4284027448 4284225597 4283567932 4283502916 4283303999 4284618813 4286194247 4287185499 4286919252 4289026917 4286523975 4287249230 4287117398 4286787658 4287180619 4288102224 4287575375 4286719557 4286987351 4284947264 4288436586 4293176984 4292116836 4291130991 4290275436 4289949797 4290607983 4290538610 4291129196 4290803823 4290341229 4290014046 4290012784 4290078050 4289486182 4289616226 4289681517 4288761687 4288959318 4289745503 4289220441 4287646551 4288499560 4289221460 4288567403 4289684067 4289421678 4288436325 4288568163 4288306531 4289880942 4288701547 4288700005 4288766071 4288764767 4287846769 4289355881 4292979335 4293839004 4294036881 4294035853 4293838219 4293904011 4293839009 4294035850 4294036641 4294036639 4294036640 4294036639 4294036639 4294036897 4293837700 4293114501 4292587405 4292973699 4290799698 4287904584 4285797446 4284091961 4284550451 4285534523 4286259018 4285933128 4286851658 4287574859 4288689998 4287379789 4288100432 4287449168 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4288967042 4288965510 4288763502 4287382613 4287313230 4286328395 4285999177 4285668937 4285733955 4286521417 4286453317 4285865800 4286125638 4285405250 4286918217 4289807440 4290927184 4292704623 4292904556 4293694594 4293629824 4293234814 4293238918 4293628538 4293630330 4293236868 4292975505 4293239712 4293312942 4292979083 4292967264 4290860374 4289348178 4287573583 4285736531 4288499567 4289299358 4290281846 4284881486 4283239236 4283897414 4283895357 4283371334 4284354370 4284884829 4287907954 4285147216 4286401661 4283040561 4283698246 4284488003 4286132826 4288371586 4286200672 4286069105 4285341771 4286534016 4282909499 4283630666 4287658120 4289363363 4288441755 4284949078 4284226371 4285872482 4286992768 4288049042 4289307324 4286005358 4285609068 4285745277 4287651729 4285412975 4287721632 4287324825 4287060884 4288110986 4287058312 4288245414 4290092201 4291994024 4288501100 4286200697 4285740375 4290427568 4285608293 4283829045 4285341000 4285538888 4286916937 4287446355 4284944702 4283570754 4283963463 4286721612 4287052365 4284486973 4284881725 4285078340 4284354877 4284423754 4284553277 4285538115 4285144134 4284291652 4285602366 4284292682 4284552260 4284357187 4284949324 4285277259 4286325831 4285146187 4286127944 4285406010 4285473872 4285602621 4285272644 4286458701 4287444046 4288888905 4290334811 4291126370 4291060064 4290927197 4292172392 4291584100 4291388257 4291583843 4291583843 4291125861 4291845991 4291785602 4291980132 4291979367 4291915387 4292440181 4292767609 4292375413 4292441206 4292439410 4291916925 4292768612 4291982205 4292113776 4292507514 4292639337 4292314239 4292971399 4293169796 4292318097 4293110925 4293047713 4293046942 4292983197 4293309863 4293509540 4293245854 4293181869 4293969315 4293444264 4293705643 4293838242 4294233013 4294563508 4292329400 4289233313 4284097873 4283238457 4283632688 4283305548 4283370546 4285207356 4285013058 4288033610 4286921560 4289028713 4286652224 4286660696 4287904864 4286788429 4286654792 4287577681 4287769669 4286196813 4286456387 4285604433 4289483878 4292714124 4291919992 4291788151 4289882731 4290607471 4291000440 4290277227 4290999918 4291459437 4290078316 4291128934 4290014056 4289883247 4290144613 4289486702 4289549923 4289684335 4289811813 4287973971 4288957529 4288302421 4289351009 4288302677 4288628571 4288498782 4288435296 4288040783 4288040024 4288827238 4287646035 4289223284 4289027168 4287649118 4287384160 4287448416 4288107101 4292580228 4294164601 4294036367 4294036902 4294034299 4293837198 4293838216 4294036898 4294036639 4294036640 4294035850 4294036641 4293838746 4293904796 4293839258 4293439377 4292909932 4290669154 4287047237 4284549437 4284486712 4285141816 4285799493 4286589769 4285801799 4286982471 4287048006 4288103250 4287968845 4287378253 4287969616 4288559695 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289557901 4289166215 4289228668 4289620595 4287253858 4287576659 4287378773 4285735749 4285800518 4287509834 4286389319 4286061641 4285339708 4285667908 4287112519 4289283152 4291449429 4292639582 4293099643 4292973191 4293302398 4293302918 4293236869 4293631866 4293236870 4293302403 4292913039 4293634452 4293631617 4293363829 4292311414 4291978847 4289284180 4286521162 4289092472 4289421171 4293576633 4285273145 4283697984 4283634246 4283501894 4283437642 4283828546 4284094786 4283501641 4285672011 4288372874 4287387271 4282974250 4283239493 4284093533 4285671253 4288180371 4287842937 4286461791 4285872485 4286925703 4282974265 4283106371 4284290397 4288245408 4289104043 4289034924 4286466186 4286269294 4286198386 4286797182 4288511911 4283567428 4287062938 4287061660 4286664065 4287323802 4287056254 4287789216 4288114095 4287061921 4287519633 4287980196 4288242553 4290227901 4286525293 4286464613 4286001009 4286198360 4289831097 4283962437 4285538122 4285142592 4286982986 4287640652 4284291650 4283634503 4284025141 4286852688 4287115597 4284680501 4284488517 4285078083 4284354877 4284489546 4283960640 4285341512 4285473611 4285406791 4284226633 4284421691 4284291134 4285930044 4285211465 4285405760 4285868107 4285734463 4286592590 4286062408 4285799490 4285535806 4284552247 4285341256 4287706446 4288759115 4290530393 4291186512 4291124832 4291387227 4291649631 4291191137 4291385696 4291585654 4291518049 4291584360 4291518566 4291915115 4291586925 4293094504 4292373093 4292571237 4292505189 4292574057 4292439412 4292246152 4292178280 4292112746 4292113770 4292573307 4291852411 4292576881 4292904319 4292970885 4292713118 4293108616 4293044622 4293046927 4293047715 4292982429 4293377420 4292982174 4293509531 4293704870 4292984499 4293904036 4293444520 4293640108 4293838243 4293772194 4294431160 4294431927 4292066490 4286206320 4283240767 4283370566 4283435832 4284420678 4285671243 4286853963 4287708249 4288305259 4286066257 4287379285 4286789710 4286262860 4286785350 4287707474 4287114828 4286851912 4286393170 4285800275 4289292394 4292713098 4292051307 4291000694 4291066492 4290871160 4290476663 4290871418 4291393131 4290281587 4291130987 4290933109 4290081143 4290343799 4290341493 4289949036 4290015086 4289488501 4289549924 4289748079 4289484904 4289089631 4288367709 4288628829 4288628304 4288561996 4288105575 4287449688 4287513686 4287318373 4288629598 4289550164 4289616226 4288894802 4287512150 4286393157 4288496477 4292121208 4293442184 4294102950 4294035852 4293839009 4293838218 4294036110 4294036384 4294036639 4294036896 4293838490 4294102689 4293772696 4293772436 4293374356 4292780169 4291330660 4287638608 4283760689 4284354872 4286390852 4286459723 4286327885 4287443017 4286851657 4286591822 4288231758 4287967821 4287838288 4288625744 4287838031 4287970136 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289365127 4290082941 4289625486 4289362312 4288503916 4289485937 4287186781 4287837261 4286657878 4287248465 4286328393 4285996360 4285275205 4285339197 4286589256 4289414218 4291385940 4292704879 4292772717 4293169275 4293300102 4293236089 4293629825 4293630330 4293171590 4293627518 4293632126 4293564798 4293170552 4293560696 4292574044 4291977059 4289018965 4288037739 4290146711 4290478458 4292190622 4283170875 4283964486 4283633471 4283634756 4284028991 4283962703 4284156995 4283635015 4284687959 4287387766 4287320703 4282908720 4283370566 4283305283 4284881238 4289562276 4287187326 4285739112 4287390606 4286861426 4283896145 4283632972 4283436350 4285346401 4287587474 4287786381 4289760701 4287582353 4286599558 4289042876 4287191951 4285477752 4284488532 4288314278 4287258533 4287782009 4288177578 4285345634 4289044153 4288178599 4287787174 4288972963 4289618308 4289226356 4290029503 4285407305 4283829050 4288833941 4288775311 4288701319 4283829558 4285341259 4287048521 4286590029 4284880456 4283830599 4283368509 4286922320 4286526028 4284227404 4284685380 4285278031 4284749371 4284816967 4284026683 4285278031 4285013059 4285476429 4284817992 4284752976 4284553538 4284358733 4285406791 4284620616 4285407305 4285474388 4287180872 4285803082 4285603912 4285538375 4285077053 4286128968 4287051084 4289086820 4289414743 4290728539 4290530387 4291057499 4290929248 4291910245 4291518564 4291715426 4292242021 4291782504 4291059830 4291191913 4292833892 4292110969 4292638311 4292374135 4292574058 4292439414 4292048233 4292508282 4292111206 4292506744 4292509309 4292113256 4292444540 4292707200 4292642931 4293170300 4292778123 4293108362 4292717971 4293111201 4292653971 4293440924 4292981665 4293047184 4292982944 4293311395 4293049746 4293573544 4293838502 4293640351 4293838259 4293772450 4293838771 4294102454 4294562488 4293185464 4288710304 4283833165 4283041854 4284092725 4285998918 4285928004 4287249738 4288435814 4286193730 4287443787 4286263886 4286393161 4286719814 4287705932 4287179334 4286853965 4286587462 4285077826 4290081918 4293041037 4291854451 4290669938 4290871674 4291265146 4290742403 4291133302 4290739578 4291396722 4290608249 4290345592 4290411640 4290474612 4290672758 4289949559 4290603625 4290080620 4290079330 4289490037 4290142044 4289420655 4289880419 4288432731 4288368737 4287908451 4287318856 4287512652 4287512406 4287251785 4289092705 4290078827 4289357398 4289878373 4287316813 4286591052 4286853457 4292316788 4293971103 4294036108 4294035855 4294036112 4293838217 4294036641 4294037923 4294036639 4293838489 4294036897 4293904798 4293770368 4293242758 4293040995 4291456861 4287312714 4284486973 4284682034 4286063690 4286787657 4287838031 4287182414 4286589771 4287183184 4287641174 4287312975 4287905360 4288561232 4287182669 4288627536 4287314511 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289888390 4288838547 4289694092 4289690251 4289165703 4289358971 4289353840 4287187797 4287577943 4287643727 4286657358 4287046728 4284943925 4285466937 4286720840 4288823889 4291449684 4292310890 4292774259 4293561467 4293236613 4293235073 4293629050 4293170043 4293695609 4293173127 4293565056 4293565569 4293562494 4293560938 4292574833 4291059033 4290079868 4290674834 4290341251 4291463554 4288169816 4283240261 4283763525 4283766858 4284223804 4283567678 4284091205 4282911049 4287122311 4289029790 4288831900 4286661738 4283369024 4282581562 4284024917 4287520914 4289629617 4285736269 4285938535 4287845494 4284553814 4284228427 4283436089 4285343848 4287716486 4286527852 4284486720 4285876087 4287784601 4288714163 4286399595 4285080168 4285544536 4285939087 4284291684 4288052642 4288114604 4287652244 4286990206 4288115106 4289438902 4288177313 4289036451 4288109945 4288170600 4288641907 4290157772 4283302708 4283503693 4288631425 4290355874 4285211734 4284685127 4287245899 4285798719 4283963976 4283897150 4283962939 4287115852 4287050573 4285404479 4284948298 4284686924 4284424267 4285013061 4284096070 4284226370 4285538890 4285604939 4285151062 4284814652 4284751171 4284881214 4284949324 4285603140 4285079623 4286194246 4285673548 4288165967 4285538890 4285472579 4284160323 4285472583 4287838288 4287055180 4289676631 4291256672 4291123292 4291516258 4290992989 4291125345 4291716452 4291583586 4291650678 4290927962 4291191658 4292110953 4292440185 4292570724 4292573802 4292375674 4292572006 4292375673 4292636772 4292374392 4292504164 4292441207 4292378233 4292441467 4292575337 4292706942 4292644237 4292777619 4292778122 4293041802 4293110414 4292652436 4293507745 4293375112 4292980386 4293046170 4292853404 4293310119 4293311653 4293245345 4293510314 4293705901 4293838232 4293772467 4293904808 4293838515 4294036651 4294300089 4294235325 4290423473 4284885076 4283044428 4285668421 4284947524 4286067285 4288437358 4285735494 4286395471 4287052626 4286325830 4287379536 4287708238 4286719814 4286329165 4285471046 4285471563 4291725707 4292120441 4292179044 4290409335 4291790718 4291527024 4291199353 4291134077 4290545009 4291133305 4290870903 4290477176 4290934387 4290345092 4290606195 4290476420 4290409845 4290999427 4289425518 4289883772 4289422448 4289555569 4289619049 4289159790 4289484381 4289091940 4288501611 4288039777 4288103513 4288566116 4290336094 4290539351 4291455328 4290073169 4287972436 4286916434 4288233043 4292909954 4293902725 4294037156 4294036641 4294035853 4294035853 4294037925 4294037666 4294036384 4294036641 4294035852 4294035848 4292980125 4292446561 4290728783 4285994562 4284089911 4284681271 4286522954 4287246924 4287641682 4287574603 4287575374 4287640909 4287445081 4287904846 4288563537 4288626770 4287775567 4287969360 4287772237 4288559181 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289691021 4289164673 4289495443 4289627543 4289367955 4289887642 4289491817 4289356669 4287844708 4288235598 4287641168 4286917451 4285403451 4284682041 4286848585 4289085006 4291909967 4292114288 4292969342 4293300870 4293234309 4293630585 4293170817 4293695104 4293172098 4293630580 4293565819 4293566076 4293628023 4292839029 4292965227 4290991705 4291987631 4293312429 4287048784 4290277250 4285344068 4283175246 4283832391 4283831880 4283767117 4283435837 4283632706 4283238203 4283239228 4288106610 4288770960 4289694397 4289035448 4288437400 4289234599 4289430433 4286722649 4286131297 4285870443 4285280347 4286204018 4283236427 4284424051 4289165725 4286861436 4285078847 4284751473 4287129233 4288643239 4285936735 4285611127 4284424256 4285478783 4286137968 4286072187 4285478501 4287720865 4288640168 4288637601 4288648381 4289101480 4288644532 4288051874 4289364910 4284880957 4283959121 4287525511 4288180135 4282516537 4284951644 4289297546 4288641950 4283765311 4286260294 4285474134 4284360527 4283897421 4283767628 4287248728 4286525259 4284686410 4285736272 4284555852 4285536327 4284292424 4283897156 4284948317 4285014604 4285605451 4285014090 4285474896 4284423755 4284947528 4284160840 4286326599 4285408845 4285999178 4286325832 4287773266 4286391882 4284618306 4285671504 4285470786 4287642457 4289151067 4289483357 4291252825 4290992220 4291909976 4291124057 4292304232 4292109926 4291256161 4290994786 4290798439 4292043882 4292504678 4292571238 4292574058 4292376957 4292572006 4292572006 4292377469 4292174694 4292637028 4292045927 4292441207 4292572776 4292575596 4292706441 4292644729 4292841342 4292775810 4292778634 4293105296 4293045647 4293110157 4292653462 4293044895 4292980620 4292983970 4293373851 4293309334 4293309578 4293245850 4293573788 4293312165 4293838248 4293838234 4293772197 4294102959 4293838502 4294036661 4294102208 4294563260 4291278767 4284953180 4284092214 4284091460 4285146693 4288105816 4285341254 4286065226 4286524489 4285932103 4286194757 4287839058 4286653766 4287639623 4284879943 4285471306 4291401622 4292969328 4290999660 4290935153 4291529853 4291265405 4291133817 4291068540 4291462270 4291199601 4291002491 4290805111 4291068283 4290542453 4290608247 4290608759 4290669426 4290017912 4291063156 4290081385 4290146680 4290079597 4289554278 4289617780 4289750375 4288437596 4289224304 4288567651 4287839831 4288893778 4289813856 4292046175 4291130713 4289746770 4288563544 4287048778 4289811799 4293176193 4293838747 4294035850 4294037154 4294037153 4294037154 4294036896 4294037668 4294037134 4294037391 4294102690 4293576613 4292976230 4290074457 4286061634 4283897415 4284486460 4285930824 4287711058 4288100432 4288036173 4287443275 4287509066 4287377482 4288430159 4288823375 4289022298 4288234318 4288431695 4287838288 4288557130 4287708752 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289228163 4288969874 4289300620 4289630603 4290154147 4289500043 4290085524 4289032071 4289880680 4287779174 4288166989 4286785862 4285797954 4284419123 4285865539 4288954954 4291257699 4292770156 4292773752 4293106305 4293631103 4293566592 4293237376 4293237633 4293630580 4293171585 4293566852 4293566075 4293629047 4292904821 4292439908 4292116108 4293974726 4292713865 4287313492 4287513177 4287248489 4285212757 4283763785 4283699010 4284419906 4283895101 4283896383 4283961676 4283766079 4285410911 4284814925 4284226885 4286594648 4287850629 4287845509 4285737039 4285672290 4286401414 4284489046 4285146976 4285280621 4286794116 4289101984 4288046469 4284481593 4283763027 4285739362 4288582331 4285538893 4284161090 4285739887 4284489318 4284422501 4286400632 4287059852 4285742453 4287058826 4287589278 4288837539 4288774306 4288511416 4288511403 4289495470 4289044408 4286859133 4282384435 4285939048 4291151301 4286203780 4283368253 4286986328 4291740100 4284945990 4285668934 4284884045 4283634502 4283766087 4283634765 4286133833 4286852172 4285078855 4285471552 4284424010 4285080394 4285014861 4283636802 4284948295 4285537599 4285541455 4285212239 4284555341 4285407044 4284489547 4284422208 4286458189 4285472326 4286523466 4286721611 4288232782 4288035142 4285209926 4285599545 4284880969 4287840335 4287904601 4289482845 4291253843 4290992221 4291191390 4291781989 4291518820 4291714664 4290992732 4290796892 4292834169 4292111718 4292440441 4292373348 4292831609 4292375929 4292572261 4292375419 4292572263 4292636772 4292374390 4292441465 4292570210 4292574316 4292511090 4292838782 4292971400 4292710270 4293104002 4292711068 4292712585 4293108360 4292716177 4293108635 4292652433 4293438858 4292983446 4292980880 4292982416 4292982182 4293311640 4293574060 4293573776 4293640354 4293838247 4293970603 4293706415 4294102712 4294036662 4294036404 4294037935 4294694330 4292263609 4285806695 4283500084 4285144648 4287644242 4285012544 4285538120 4286130506 4285537610 4286920268 4287180875 4286852173 4286457415 4284483396 4285405759 4292252053 4292512885 4291132273 4290933353 4291528576 4291265403 4291528575 4290870905 4291462268 4291199610 4290411127 4291067769 4291068025 4290739330 4290348160 4290607991 4290345591 4290674040 4290279544 4290148728 4289882742 4289622125 4289491323 4289557113 4289554798 4289815164 4289161592 4289357163 4288371311 4289289057 4290603601 4290997595 4291915104 4290402902 4288758350 4288427342 4292181360 4293179271 4294168481 4294037925 4294036897 4294037923 4294036896 4294037666 4294037666 4294036641 4293706391 4293838748 4293375343 4292446069 4288627791 4284288835 4284090427 4285670219 4287643474 4289347403 4287841359 4287903565 4287969871 4287967318 4287839567 4288629077 4288366413 4289941084 4288498004 4288625490 4287905358 4287116368 4289086801 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4288703369 4289887884 4289693580 4289432222 4289566884 4289629847 4289565324 4289888402 4289426300 4289488234 4287186521 4286787405 4285539146 4284155443 4286588486 4288953422 4291122006 4292376426 4292774004 4293365880 4293238406 4293631871 4293042298 4293237377 4293565819 4293566337 4293566847 4293565314 4293235067 4293230696 4292701285 4293172121 4294631628 4290734712 4288042368 4288101219 4283962181 4285408333 4284752715 4284029771 4285274958 4283766852 4284553294 4284093770 4285539665 4286596198 4283766084 4283238218 4285277274 4285937500 4285539414 4285999965 4284621385 4283962684 4285539418 4285938540 4286664310 4287057009 4286397534 4284882511 4283239236 4283565130 4288376988 4289107131 4283238204 4284689264 4285342801 4286071416 4285212254 4284950106 4286797972 4286994311 4285742212 4286203256 4287585956 4288972455 4288903587 4288509854 4288849599 4288777130 4290024358 4282714202 4282908727 4290743690 4292001752 4284683063 4287188369 4289693065 4287126151 4285860661 4284159042 4283698760 4283700295 4283831360 4286329697 4286656585 4285078599 4285341256 4284226375 4284489289 4284752460 4284095300 4284554826 4284750918 4285475920 4286391621 4284553795 4284291911 4284752460 4284292425 4286329166 4285999689 4286455878 4287115351 4288954187 4290137172 4285670216 4284683319 4284746559 4287443532 4287115847 4290665567 4291123292 4291513941 4291778141 4291848812 4291450460 4290401112 4291189085 4292371304 4292440438 4292441721 4292636771 4292438885 4292176504 4292636257 4292375676 4292574058 4292570725 4292310395 4292769147 4292309619 4292769915 4292313212 4292904833 4292839284 4292708227 4293169023 4292972158 4293496704 4293107077 4292713883 4292780173 4293438873 4293043100 4292979342 4293439113 4292981409 4292981138 4292981907 4293310110 4293638294 4293114534 4293771938 4293441959 4293838246 4293904798 4293838516 4294036906 4294036674 4294036403 4294037701 4294629308 4292263855 4285015632 4284881475 4287182672 4285669186 4285867334 4285539144 4285999945 4287380306 4287312204 4286788172 4286654278 4283897159 4286065231 4293237912 4292510056 4290803837 4290346105 4291396732 4291134334 4291725698 4290936185 4290282627 4291593597 4290608240 4291070855 4290345078 4290873722 4290935926 4290476919 4290805636 4290410871 4290214518 4291198340 4290542710 4290080118 4290211701 4289820024 4289753978 4289229167 4288965491 4289162355 4289616749 4289356376 4290472034 4291913313 4290997853 4290271826 4289220176 4289940057 4291990383 4294230394 4294036897 4294036897 4294037646 4294036897 4294037666 4294036896 4294037924 4294035853 4294035854 4293375357 4293175178 4290671194 4286390347 4283893820 4285602121 4287181130 4289086799 4287708001 4287776343 4288493902 4287773529 4288361546 4288498004 4289088595 4289547090 4289742681 4288824138 4287708238 4288495714 4288364108 4289022303 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4289427337 4288178037 4289491844 4289433493 4289630089 4289630618 4289630618 4289367444 4289754752 4289821830 4289354852 4287642967 4286062408 4284287794 4286326346 4288755786 4291779157 4292114289 4293167218 4293299586 4293238405 4293566850 4293631872 4293171584 4293565563 4293565562 4293566851 4293565301 4293300597 4292773492 4292964728 4293174931 4294304208 4288564329 4291134608 4290876830 4282581038 4283633982 4284024374 4284685380 4285277774 4285933901 4285014857 4285605972 4285869919 4286199892 4285409116 4283107398 4286331993 4286924143 4286063940 4284226629 4285212502 4285605201 4285082454 4284817994 4284029256 4283960900 4283899213 4284687947 4283700553 4284356697 4287587466 4287526041 4285804644 4283239232 4284558193 4285744505 4285940585 4285478526 4284953954 4287850661 4286205549 4286398071 4285942137 4289229986 4288646581 4288903581 4288775848 4287323008 4288512931 4287979671 4285015923 4288303980 4292849053 4289299373 4286465650 4286264906 4291144120 4284158289 4284160838 4283832397 4284557391 4283965007 4287051855 4285936472 4285276745 4285409100 4285277517 4284884304 4284949582 4284294735 4284949839 4284885586 4285932615 4286199128 4284752718 4284884047 4284885842 4285080396 4287183189 4286462287 4285800005 4286986841 4289874265 4289743195 4287182411 4283898953 4284092233 4286328908 4287839053 4290471536 4291451743 4291452516 4291516256 4290600799 4290006873 4290402918 4292244606 4292306788 4292373348 4292571257 4292374646 4292374392 4292638054 4292311935 4292572006 4292505190 4292571238 4292570980 4292504931 4292575086 4292508523 4292509805 4292969594 4292772990 4293169536 4292317054 4293170313 4292318862 4292711565 4293563262 4292712846 4292976519 4293045903 4292977034 4292977036 4293047699 4293373323 4292979859 4293310625 4293245324 4293638296 4293508255 4293838748 4293640097 4293904555 4294102702 4293838514 4294036660 4294036416 4294037686 4294038459 4294366909 4291276459 4284618056 4285932099 4285864512 4284946494 4285471293 4285997129 4286852169 4286260038 4287443788 4286658897 4283696958 4286656084 4292977814 4291981924 4291132787 4290935404 4291396989 4291462783 4291528310 4290742132 4290873203 4290542459 4290870648 4291134068 4291396466 4290804855 4291068027 4290870903 4290870902 4290608247 4290214276 4290410869 4290280324 4290279798 4289688696 4290211446 4290211701 4289556601 4289753464 4289096050 4289096041 4289552226 4289947735 4291062876 4291587155 4290995545 4290205782 4291123534 4293240450 4293839004 4294036639 4294037666 4294038439 4294036896 4294037666 4294037666 4294037924 4294101903 4293310847 4293243529 4292119646 4290140501 4286718022 4284617530 4286851401 4288758620 4288822095 4288298830 4289086546 4288498002 4288297037 4288494932 4289811038 4289484121 4290206822 4288891733 4289153377 4287773518 4287772237 4288430673 4289021266 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4287057767 4288305015 4288705422 4289821321 4289432736 4289631381 4289567650 4289433496 4290024605 4290087054 4289490804 4287380041 4285931336 4285335097 4286456386 4288955216 4291125090 4292376169 4292708217 4293760635 4292976762 4293566077 4293565305 4293632387 4293371000 4293565050 4293502601 4293565819 4293366648 4293757045 4292310119 4292443248 4293643960 4287902569 4288561999 4290216567 4282843707 4283632957 4283505487 4284028214 4284291651 4284555081 4284028475 4284619074 4285479516 4285735759 4286459986 4284228428 4284552520 4284098124 4284025928 4284224343 4286725480 4286597497 4285147988 4284620617 4284157766 4283307083 4283960895 4286397285 4284424782 4283436872 4283898197 4286203240 4287982235 4284095586 4283964228 4285739100 4285080414 4285873263 4285869945 4285941102 4288507569 4286663555 4286790254 4288314270 4289496754 4288838567 4288644258 4287584147 4287917462 4289628578 4287057789 4287913871 4287582561 4289698223 4284950634 4283302732 4291348404 4286197347 4283635781 4284226117 4283503688 4283369799 4287184204 4286588230 4285802052 4285409869 4284291138 4284946750 4284620874 4283700813 4284881222 4285211980 4285343052 4286918225 4284031053 4285539143 4284685382 4284486971 4286063943 4286522951 4285670215 4287903560 4290663261 4291121743 4288560209 4285468991 4284352822 4287048522 4287968599 4290536296 4291584096 4291580767 4291121750 4289943394 4291584865 4292108646 4292438373 4292109946 4292637286 4292571238 4292570980 4292638313 4292505189 4292963944 4292508523 4292964204 4292308855 4292375671 4292768637 4292507496 4292706942 4292509548 4292837755 4292774533 4293038462 4292970888 4292710270 4293102973 4293104519 4292318348 4293108116 4293435010 4292648591 4293434497 4293045904 4292649874 4293371786 4293371273 4293309836 4293244060 4293246094 4293574048 4293508009 4293640353 4293970604 4293706402 4293904564 4294036661 4294036659 4294037186 4294036670 4294038469 4294892990 4290482589 4283894069 4285469757 4284352569 4285402940 4286192451 4287575630 4285800008 4287047751 4286195783 4283957318 4288167763 4292910224 4291655012 4290999654 4291265661 4290936957 4291725690 4290936957 4291133822 4290936186 4291199604 4290608507 4290739320 4290805112 4290674043 4290610801 4290870648 4291068282 4290542455 4290608246 4290411128 4290539891 4290083204 4290277493 4289360235 4289885561 4289556343 4289163391 4289687150 4289621873 4290013797 4290274656 4291524191 4291653982 4291387981 4289943896 4291853153 4293374100 4294166412 4294037924 4294037666 4294037409 4294037666 4294037409 4294038437 4294037153 4293904798 4293246104 4293107570 4291785823 4288497491 4285536837 4286327122 4287511888 4289284180 4288235086 4288296784 4288234831 4288168781 4288888668 4288957777 4290073181 4290663516 4289482587 4289087841 4288365903 4288300622 4288626005 4289349972 4288367197 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4285671505 4286200415 4288306799 4289361285 4289495441 4289564310 4289961901 4290615704 4290485149 4290283909 4289688943 4288894568 4285799237 4284287800 4286325834 4289214538 4291451996 4292705635 4293100924 4293235584 4293632386 4293566850 4293566850 4293172871 4293565820 4293567367 4293764728 4293564801 4293366647 4293494383 4292768362 4292646028 4291394691 4288897147 4285934425 4284618293 4283041869 4284224067 4284160838 4283698247 4284027719 4284554824 4283961157 4284422468 4286594929 4283896890 4285343567 4285801033 4283766340 4284354122 4283175236 4284355404 4287519366 4287517825 4285276237 4285674585 4284357705 4283371334 4283305036 4286859635 4286530413 4282843716 4283436105 4285477740 4287783572 4287452790 4283240019 4285212256 4285415022 4285871732 4284885338 4285741184 4286732164 4287849631 4285413736 4288902565 4289171371 4288638871 4288641186 4289235637 4288310692 4289437113 4287050857 4288771484 4285468493 4289956236 4290419389 4282515502 4292126879 4288574087 4282908727 4283239749 4283701572 4283632702 4287314766 4285932871 4285798722 4285867854 4285536835 4284552764 4284880966 4283634750 4285472325 4284029767 4286326342 4286198605 4284814908 4284488260 4284159031 4284614975 4286195788 4286459722 4286783561 4288365651 4290402392 4290861151 4289808979 4285730367 4284747583 4285604424 4287969358 4289878116 4291649113 4290330447 4290402150 4291455078 4292309612 4292240482 4291976296 4292703334 4292373096 4292505956 4292767868 4292045671 4292375932 4292570980 4292374393 4292505445 4292572519 4292311419 4292573545 4292505959 4292705405 4292706429 4292641387 4293165175 4293036421 4292906361 4292710528 4293037695 4293104520 4292776583 4292713358 4293108107 4292711818 4293042839 4293040776 4293045648 4293371786 4292979087 4292979088 4293770650 4293244321 4293639827 4293508256 4293706135 4293838247 4293970603 4293838759 4294036917 4293838266 4294037172 4294037698 4294037440 4294104005 4294304198 4287915126 4285142078 4284092217 4284944704 4285733444 4286524232 4285601859 4286064969 4285141826 4283893318 4289022555 4293175700 4291652442 4291133296 4291134077 4291528559 4291528303 4291331190 4291199089 4291004798 4290742132 4290739064 4291462773 4291133560 4290739319 4291396475 4290805111 4290674042 4290542454 4290739844 4291067767 4290279288 4289820023 4290608247 4290279045 4290148215 4289687928 4289819512 4289555565 4289556861 4289817457 4291717731 4291984205 4291523929 4291651172 4291254606 4292248165 4293838469 4294036897 4294038437 4294037409 4294037666 4294037666 4294037666 4294036896 4294036641 4293970059 4293439352 4292052324 4291451223 4287179862 4286063684 4287707223 4288627278 4289153107 4288232024 4288758349 4288888145 4288824924 4289022559 4289613660 4290007130 4289418847 4289809497 4289153109 4288103500 4288754526 4289021257 4288302186 4289810266 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4284288583 4284950343 4288042088 4288310166 4289231752 4289500303 4290486694 4290419104 4291207066 4289892508 4289428101 4288701797 4286984266 4283892280 4286061124 4288495690 4291320927 4292639084 4293035387 4293234566 4293633412 4293566079 4293566076 4293566849 4293566851 4293370485 4293566595 4293567364 4293563262 4293231208 4293097585 4292909956 4291538342 4289814638 4286590801 4285540176 4283700037 4283568448 4283896636 4284158532 4283829817 4284620614 4283503179 4286860394 4285343310 4283373648 4284883784 4284292431 4284817994 4283502149 4284222297 4284688720 4288045445 4287516046 4283433774 4287057521 4285343326 4283699527 4283433797 4285016924 4288309398 4284161099 4282976328 4285082729 4285940593 4285938544 4287583879 4284095303 4285411438 4286071664 4286726269 4284953955 4284885356 4287262118 4286135414 4288312485 4287583867 4287913878 4287521430 4289236408 4288902568 4290293172 4289168305 4290995832 4283630391 4283766331 4292925888 4286130804 4290676371 4291472294 4282646585 4283567159 4283698751 4283502149 4286591808 4285735499 4285144642 4286261835 4284684610 4285669965 4284292677 4284357700 4284292425 4285079114 4285801800 4285866056 4284753233 4285080394 4284685639 4284551730 4285735491 4286591054 4285932873 4289477970 4291386712 4291190105 4290267466 4286325572 4284679733 4286261318 4287444558 4289745775 4290528849 4290663513 4291977576 4292438114 4292505192 4292041833 4291847012 4292439656 4292373350 4292766589 4292505700 4292572266 4292572521 4292570727 4292505445 4292964202 4292439653 4293096570 4292506215 4292509550 4292506984 4292510062 4292706172 4292575851 4292771449 4293103482 4293035906 4293103487 4292645253 4293496963 4293105542 4292646796 4293174151 4292712333 4293045389 4293042570 4293371014 4293047700 4292980115 4292979601 4293309836 4293180318 4293573779 4293706148 4293640353 4293574315 4293904808 4293838781 4294036916 4294036415 4294036926 4294038468 4294037955 4294301627 4293053389 4286458178 4283698743 4284813619 4286387525 4285996615 4285795645 4286391363 4285209156 4284416066 4289948262 4292580745 4291979096 4290806647 4291198060 4291331189 4290739580 4291331188 4291594105 4290676597 4291133049 4291134069 4291462516 4290476923 4291200117 4290805111 4290608506 4291133818 4290870903 4290608247 4290148472 4290674040 4290343285 4290411384 4289951351 4289622136 4289753720 4289490552 4289951356 4289423972 4289949277 4291786584 4291850576 4291850337 4291524184 4291388764 4292972917 4293837449 4294038181 4294038695 4294037409 4294037666 4294037666 4294036896 4294038697 4294035851 4293707147 4292848273 4291719764 4288230731 4286918475 4287049546 4287970638 4288760660 4288298337 4288232779 4289219940 4288758351 4289021781 4289613659 4290010208 4290536555 4289874521 4288103004 4288824399 4288823137 4288104012 4289747310 4288892500 4288367462 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4283434814 4284422204 4286463596 4287715946 4289230994 4290157479 4289829280 4290290094 4290749089 4290023564 4290149498 4289097324 4286853205 4284155698 4285797694 4288428876 4291517275 4292640367 4293037425 4293695616 4293173127 4293566849 4293567366 4293567366 4293565822 4293566596 4293567362 4293565816 4293563256 4293559657 4292246127 4293685334 4293441687 4288893818 4287184992 4286464871 4283172410 4283436352 4284160839 4284091462 4284291655 4284094019 4284356917 4287584386 4283896645 4284292675 4283700300 4284952660 4284424780 4284620614 4283961689 4285539666 4289098149 4287057781 4283500347 4285610600 4285670215 4283566133 4283763780 4283239232 4287848053 4286004097 4283435324 4283898956 4286930059 4285276241 4286203255 4287254410 4284553825 4286797962 4286992490 4286003833 4284554848 4285676130 4286925707 4288313507 4286462321 4288178827 4288246181 4287521941 4288840874 4290095029 4289832376 4288300405 4282779455 4282318924 4286796130 4288570000 4288114299 4292986571 4282318900 4283370562 4283303986 4283501628 4287048009 4285671758 4285733186 4286720584 4285405508 4284947267 4284815688 4283764280 4285076543 4284292682 4286331739 4285739342 4284357705 4285014089 4285082198 4284747058 4286259268 4285865032 4286979910 4290137166 4291124313 4291778642 4290073428 4287242313 4284548150 4284946752 4287050057 4288891230 4291256672 4291844696 4292108127 4292505449 4292306792 4292176740 4291980395 4292434538 4292637800 4292373350 4292505447 4292574061 4292504934 4292508525 4292965485 4292441193 4292572266 4292506727 4292506472 4292702585 4292705658 4292509804 4292837514 4292968055 4292970880 4292774275 4292971144 4292710528 4293299064 4293038468 4292646286 4293499520 4292712332 4293041543 4293435792 4292583311 4293438363 4292586387 4293832085 4293309085 4293243038 4293703313 4293574049 4293312422 4293705889 4293838245 4293772195 4293904562 4293838512 4294037429 4294036928 4294037697 4294037954 4294040010 4294303412 4291338413 4283498548 4284549440 4284552505 4286594913 4284613427 4285868616 4284943170 4284221501 4291458675 4291791482 4291323746 4290672248 4291134074 4291462785 4291528567 4291133820 4291133810 4291265139 4290935149 4290414198 4291068287 4291594101 4290606956 4290805369 4291264887 4290411127 4290936696 4290345336 4291002232 4290608248 4290542456 4290016376 4290082168 4290213752 4289622392 4289951097 4289622125 4290012787 4290538090 4291521121 4291653476 4292180564 4291326803 4291588442 4293437559 4293838215 4294037924 4294038695 4294037409 4294037409 4294037666 4294036899 4294037132 4294037160 4293837957 4292581225 4290073428 4287114315 4287508295 4287903321 4288560986 4288561744 4287707724 4288563539 4289152852 4288956245 4289611095 4290009183 4290534239 4290268506 4287317580 4288821839 4288757839 4287382859 4290004825 4288891731 4289940334 4288958559 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4283631925 4284354873 4285077824 4286924651 4288441989 4289632408 4290487473 4290160031 4291339954 4290550426 4289171098 4289886065 4286789459 4284154675 4284746039 4288623686 4291387231 4292706158 4292903292 4293237120 4293632127 4293566081 4293172602 4293370227 4293567367 4293370485 4293567111 4293565563 4293563768 4293233775 4292838000 4291848035 4289743449 4291736011 4287647574 4286461267 4282974778 4283831367 4284359237 4283699017 4283963460 4284225095 4285742188 4285804369 4284289600 4283634760 4284226121 4284360272 4284159556 4284357694 4284354116 4285408862 4288772766 4286992769 4283632712 4285083992 4286394717 4283961924 4284156996 4283893314 4284357456 4288107129 4286264419 4283041592 4286337416 4285209176 4285214550 4287715730 4286531707 4286399337 4287322266 4287586446 4286733711 4284491630 4286135403 4287786916 4286068335 4288773300 4289035179 4287254411 4288512181 4290487478 4289829030 4288109703 4284621907 4283040831 4284290641 4289300674 4289295754 4293845459 4283630394 4283306315 4283371339 4283370550 4286590539 4285999434 4285996871 4286591822 4284814649 4284619070 4285010498 4284683574 4284358218 4284880444 4285475148 4287509836 4284095044 4285342542 4284883017 4284353848 4285604938 4285865032 4288492878 4290532446 4291189342 4291124570 4290201930 4286521416 4284023865 4285011260 4287511125 4289679463 4291515730 4291909210 4292108127 4292307305 4292109155 4292307049 4292241255 4292831339 4292175714 4292308323 4292898923 4292505446 4292965997 4292505190 4292439654 4292899949 4292506472 4292309880 4292509547 4292900715 4292638074 4292510062 4292835949 4292641645 4292772715 4292773248 4292972409 4292969597 4292712075 4292776067 4293103746 4293038471 4292712843 4293041298 4293372295 4293435011 4292979599 4293109387 4292980880 4292983444 4293375372 4292852130 4293639571 4293507998 4293838502 4293838257 4293904808 4293904562 4293838768 4294036673 4294037172 4294036927 4294038211 4294038725 4294104264 4294303161 4286988897 4283567671 4284876349 4285602109 4284811574 4286585930 4283762482 4284483134 4292377713 4291987831 4290536799 4291199088 4291528579 4291462765 4291265399 4291331190 4291002998 4291199356 4291265396 4290542444 4291528310 4290345336 4290476921 4291264888 4290411128 4290608248 4290542712 4290082680 4291068024 4290410872 4290082680 4290607992 4290214008 4289819513 4289951096 4289490809 4290080378 4290014052 4289092181 4291389799 4291789924 4292052322 4292779131 4292780157 4293376137 4293904009 4294038695 4294038180 4294037409 4294038437 4294037413 4294037903 4294036646 4294101628 4293571975 4291985504 4289020750 4287179592 4287838030 4288822607 4289021521 4287576151 4288431196 4289744221 4288892771 4289679708 4290007644 4290009440 4289611089 4287906637 4288363353 4288756812 4288757582 4289155172 4289810271 4289087581 4288432215 4288566128 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4283370294 4283500339 4284224839 4286394713 4288838289 4289631382 4290356391 4290879910 4290748574 4290157735 4290219656 4289556864 4286987348 4283433778 4284155956 4287899466 4291060825 4292704366 4293036146 4293301121 4293566336 4293370742 4293632904 4293566080 4293565305 4293566596 4293764472 4293501316 4293565053 4293626483 4293099098 4292109407 4290072406 4293110924 4285341256 4284749115 4283372620 4284160580 4283633225 4283698245 4285015373 4284359501 4286262360 4284357960 4283765823 4284094534 4284424776 4284226883 4284025157 4284027461 4284423750 4285539912 4288970144 4286860422 4283236922 4285147991 4286858862 4285141573 4283501632 4283435836 4283305032 4284290112 4287976324 4286858882 4286332279 4285937776 4283631956 4285674850 4286728829 4285742979 4287060108 4287325342 4287653764 4287060124 4285081948 4286530684 4285676675 4288113293 4289429673 4288909487 4288638873 4289306038 4287455874 4284287031 4285675367 4283303996 4285998425 4291142328 4290482862 4293385423 4284026690 4283240779 4283371331 4283108162 4287312974 4286521928 4285866055 4287052111 4284815427 4285143876 4284226367 4283833936 4284620874 4284490318 4286328652 4285671754 4284290371 4284554051 4284683580 4284683576 4286324042 4284814906 4288757577 4290135625 4290267476 4291385426 4290069579 4288227660 4283960888 4285469755 4288823388 4289284179 4291518302 4291450962 4291912547 4292174699 4292042328 4292109156 4292439400 4292439656 4292043107 4293091423 4292899435 4292307560 4292308841 4292506729 4292901744 4292899692 4292508268 4292899432 4292900494 4292444779 4292904062 4292444530 4292901486 4292640636 4292969851 4292771704 4292971654 4293102452 4293103486 4292710789 4293104520 4292711564 4293041287 4293040773 4293041031 4292649628 4293111182 4292715410 4293046928 4293439130 4292981152 4293769880 4293180058 4293573790 4293706157 4293640104 4293772462 4293904573 4293838768 4294036660 4294036414 4294036926 4294038211 4294037954 4294037955 4294499521 4291600805 4283891761 4284419129 4285600574 4285074744 4284811319 4283566138 4285534789 4292314997 4292186502 4291128939 4291328868 4291463023 4291462788 4291265388 4291331181 4291132269 4291396983 4291134060 4290871167 4291462507 4290608252 4290936184 4290216818 4291001976 4290542456 4291002489 4290474614 4290146933 4290674296 4290542456 4290343285 4290477433 4289491308 4289556347 4289621616 4289424742 4289880418 4290341748 4291721065 4292120180 4293501313 4293241969 4293770375 4293969036 4294036897 4294037409 4294038180 4294038180 4294037411 4294037646 4294037157 4293838216 4293838990 4293237359 4291061334 4288099916 4288362574 4288757072 4288890194 4288103759 4288756302 4288890450 4289676888 4289612633 4289416796 4290534239 4290072659 4289611094 4288758351 4287641167 4288822352 4288037710 4289679197 4288957268 4289155692 4288565347 4288630626 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4283369792 4283567170 4284421702 4286065754 4287718272 4289763224 4290421927 4290160562 4290684321 4291796634 4290089872 4289757307 4285603897 4283631934 4284221235 4287903309 4291713368 4292639838 4293101427 4293037185 4293567877 4293632391 4293173862 4293632390 4293172857 4293567110 4293501573 4293500544 4293565559 4293562485 4293493098 4292175717 4289152870 4287712344 4291006623 4283368507 4283108688 4284490570 4284488771 4283699768 4283962953 4285607762 4284423496 4284816453 4284159548 4284227143 4284028228 4283636305 4284292423 4283503952 4283567174 4286331242 4289631157 4286201454 4283630399 4284684874 4286924901 4284160576 4283566399 4283635015 4284884564 4283765846 4284884560 4286793834 4287256197 4286530428 4283962688 4286399606 4284425823 4287123596 4286335086 4287456670 4287189641 4286992263 4286070392 4286008192 4285936752 4286599820 4290091186 4289239736 4288906677 4289894319 4289697721 4284222525 4283633982 4286795647 4284612691 4289893035 4291408055 4292202951 4283236395 4283305026 4283370553 4283500343 4286657358 4285733437 4286064198 4288170586 4284159296 4284880452 4284356668 4284814146 4284618822 4285142085 4285671754 4285210695 4284554052 4284356169 4285082448 4285602365 4285996872 4286654541 4289152340 4290401104 4291514454 4290002505 4290201934 4288363079 4284878654 4285405258 4287905359 4290006361 4291583068 4291779425 4292566623 4292307550 4291976799 4292304228 4292439912 4292175209 4292637288 4292440681 4292440168 4292897377 4292965998 4292506986 4292505190 4292506987 4292570214 4292508012 4292443754 4292770941 4292443243 4292898666 4292444782 4292706427 4292574843 4292969594 4292773743 4292774779 4292905865 4292971640 4293102973 4292711822 4293500035 4292976275 4293041286 4293108116 4293041033 4293045133 4293044366 4292982422 4293045136 4292982675 4293311398 4293378202 4293705889 4293838256 4293904806 4293838769 4294036918 4294037174 4294037184 4294036926 4294037440 4294038211 4294038725 4294038725 4294697424 4286196543 4284089150 4284942648 4283959606 4285139769 4282713908 4286584124 4292514436 4292578421 4290734441 4291330419 4291462779 4291462766 4291265398 4291265407 4291396982 4291396725 4290607995 4291462507 4291264894 4290610802 4290870393 4290936184 4290673529 4290608249 4290214510 4290475626 4290669939 4290671989 4290017401 4290082680 4290277494 4289490811 4289621359 4289490021 4290141799 4290273375 4291588717 4292710779 4293961079 4293505936 4293705095 4293966725 4293838474 4294037154 4294038180 4294038695 4294037409 4294037667 4294036897 4294036641 4294168468 4293701749 4292253024 4289873994 4288036176 4288102224 4289478739 4289219410 4288692047 4288693329 4289742681 4289481813 4290071636 4289944153 4290072924 4288826456 4288497247 4288233038 4288233039 4288889937 4288890195 4289744735 4289087839 4289022052 4288566897 4288630373 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4283369785 4283830089 4283897924 4285147986 4287912573 4289499542 4290617506 4291340200 4290618538 4290550169 4290221972 4289162609 4285802576 4283171897 4284942135 4287903052 4290665046 4292771698 4292904834 4293695099 4293566080 4293371257 4293632648 4293370486 4293567111 4293764473 4293501318 4293764730 4293499767 4293627764 4293034091 4292440164 4290078599 4290011769 4290411390 4282845248 4284294732 4284422222 4283831613 4283700557 4285214804 4284949583 4284030020 4284884047 4284161606 4284422976 4284163151 4284358727 4284618820 4284096587 4283894099 4287980949 4290089394 4286265948 4283106879 4283631417 4286990949 4285541462 4283236928 4285276246 4284686154 4283896391 4284951117 4284223318 4284160068 4285279317 4283567930 4286662784 4285080656 4287189630 4286792583 4287256458 4286728053 4285811313 4285675377 4286137981 4286005368 4286928769 4289496746 4289040821 4288903066 4288970400 4290094506 4286267258 4282910270 4284882003 4283696715 4289956505 4291935940 4291274407 4282318920 4283435067 4283307607 4283700030 4288298323 4286064712 4285669448 4288893023 4284030027 4285472584 4284489801 4284687697 4285339195 4284750915 4286524493 4285472843 4284354864 4284420677 4284422981 4285272892 4285929029 4288035151 4290267978 4290922318 4289019977 4290069582 4291058264 4288558154 4284941111 4285142588 4288629072 4289217365 4291973980 4292108383 4292307556 4292307301 4292109412 4292109411 4292632428 4292571992 4292505962 4292831842 4292898923 4292505960 4292307554 4292505704 4292505704 4292965470 4292508270 4292508012 4292964972 4292441961 4292902257 4292900715 4292705147 4292706428 4292838763 4293166970 4292575872 4292774532 4293100405 4292971144 4292515207 4293169025 4292711565 4293105028 4292715418 4292713367 4293042567 4293047971 4293044364 4293044877 4292979873 4293048467 4293309590 4293245604 4293706145 4293838255 4293772216 4294102710 4293838512 4294037430 4294036413 4294037954 4294037697 4294037440 4294037954 4294038725 4294565313 4290875543 4283629611 4284680505 4283763510 4284549942 4283106868 4287244103 4292644206 4292578680 4290540913 4291134068 4291462767 4291462777 4291659900 4291528567 4290739570 4291331191 4291594095 4291199102 4290479474 4291067508 4290676338 4290870649 4290739820 4290608250 4290476141 4290542714 4290083193 4290737526 4289886572 4290145655 4290017389 4289557103 4289556081 4290079856 4289750873 4291390304 4292384111 4293766027 4293637505 4293640322 4293639811 4293772701 4294036108 4294037667 4294038695 4294037153 4294038182 4294038160 4294037928 4294036110 4293706118 4292978296 4291586916 4288559688 4288625489 4289544781 4288170061 4288231756 4288758866 4289808473 4289547354 4290071642 4289812319 4291124319 4290006362 4289676624 4288233559 4288233039 4289021009 4288170076 4289939800 4289615200 4288431438 4288563545 4288631152 4288436062 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4283370294 4283697210 4283961919 4285475419 4287913342 4290348951 4289829281 4290749856 4291274666 4290224802 4289499279 4289228403 4285934152 4283302964 4283303987 4288621388 4291518300 4292311381 4293035894 4293630069 4293567879 4293173117 4293566595 4293370486 4293566597 4293304696 4293764987 4293501575 4293565314 4293627764 4292836717 4292305762 4293372569 4289621369 4286266460 4283175752 4284949836 4283829062 4283501894 4285017168 4285343575 4284423239 4284094011 4284882755 4283960134 4284221515 4284489028 4284620614 4284027717 4283633992 4284619094 4288709799 4289038250 4285936213 4283368515 4283436606 4285542218 4286197335 4283566137 4285542732 4285671508 4283830092 4285086054 4284095565 4283565629 4284292191 4284687198 4285280858 4285937018 4284561262 4287584924 4286862461 4287589025 4286992522 4285678458 4285871992 4284885884 4287389606 4289038757 4289561258 4287058574 4289897398 4288575132 4288045969 4283436868 4283108679 4283957817 4288709013 4292069067 4286664543 4283369526 4283303740 4283239238 4284421435 4288234323 4285341244 4286458189 4287446099 4284746542 4285540430 4284422724 4284945206 4284161868 4285339710 4285935181 4284886870 4284355909 4284355134 4284944177 4286260555 4285208640 4288626258 4289281869 4289676367 4290987600 4291127140 4291779164 4288625996 4285533245 4285405506 4288432732 4289809495 4291515740 4292240997 4292109162 4291976541 4292501089 4292241507 4292508010 4292897388 4292832097 4293225318 4292440168 4292505960 4292699491 4292897890 4292700779 4292440168 4292570983 4292505191 4292506217 4292574573 4292509036 4292310653 4292508779 4292509805 4292705917 4292837755 4292577135 4293165703 4292904830 4292906367 4293104023 4292776838 4292777356 4292712844 4293106308 4293107346 4293045132 4293042569 4292652436 4293045920 4293440155 4292654488 4293375645 4293245859 4293771937 4293640105 4293772461 4293904562 4293838768 4294036671 4294036413 4294037183 4294036926 4294037440 4294038211 4294038725 4294170044 4293974461 4285530161 4284158523 4283500854 4284746551 4282975027 4288494933 4291986022 4292051058 4291132282 4291265910 4291725436 4291265398 4291330923 4291002494 4291396982 4291331181 4291133557 4291396972 4291133306 4291002483 4290674044 4290870903 4290542714 4290476921 4289948790 4290080887 4290540908 4290410873 4290016889 4289885305 4289687930 4289555823 4289488228 4290144365 4290272604 4291723653 4293701246 4293838470 4293905054 4293905055 4293770375 4293902728 4294036899 4294038437 4294038694 4294037923 4294037923 4294038701 4294036878 4294102676 4293637753 4292578404 4290401099 4288559949 4289348173 4288561744 4289215824 4289150288 4289545809 4289613147 4289415770 4289877077 4291058784 4289812824 4289415511 4288889675 4287055182 4288887631 4288298833 4289218389 4288826702 4289088085 4288564071 4288695142 4288633696 4288698227 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4283435831 4283370294 4283500345 4284749380 4287518321 4289565334 4290024609 4290290094 4290683301 4291076511 4289435287 4289426279 4285999440 4283565619 4285269050 4287967053 4290991437 4292310895 4293429097 4293235850 4293565306 4293765502 4293566338 4293567882 4293369971 4293370232 4293502605 4293763958 4293499771 4293562477 4293361241 4292633699 4292977040 4289357160 4285545320 4283239484 4285539664 4283569224 4285013329 4285934423 4284489544 4284160315 4284159566 4284486214 4284226619 4283696971 4285081679 4283434043 4283631687 4283172436 4286140813 4289690020 4288705938 4286263640 4283570251 4283306828 4284686150 4285082712 4283498560 4286137451 4285210185 4283767884 4284685894 4284754529 4284027202 4284097610 4284158534 4283832394 4286399092 4285280090 4286792558 4286796943 4288245667 4286793592 4285413486 4285676399 4284226381 4287518860 4290158517 4287787935 4288179879 4289436849 4287722129 4289237174 4288639134 4285541985 4283894085 4290812864 4289698481 4285078869 4288712386 4283105334 4283173695 4284554310 4287577171 4286129221 4286393930 4287113802 4284029253 4285733948 4285078077 4285143871 4285076287 4285079111 4285602629 4284948553 4285147732 4284422466 4285472069 4285998408 4287243079 4287509318 4291185999 4291121494 4291321692 4291844191 4291649110 4288822348 4284154682 4286128702 4289087308 4290464601 4291253584 4292240735 4292307305 4292307305 4292633190 4292175715 4292963179 4292242535 4292897643 4292440424 4292505960 4292701029 4292897890 4292307817 4292506216 4292962924 4292505704 4292898153 4292509550 4292312448 4292965996 4292509293 4292965741 4292510063 4292511092 4292445553 4292837497 4292577157 4292970861 4292905609 4292906620 4292711560 4293103489 4293105799 4292778123 4292780431 4293042834 4292975763 4293502855 4292980129 4292982670 4293046945 4293311897 4293245088 4293377955 4293444275 4293970599 4293706412 4294036917 4294036672 4294036402 4294037184 4294036155 4294038725 4294036669 4294038725 4294038726 4294434243 4289096313 4283301934 4283304759 4283632439 4282908722 4289746533 4292510306 4291787379 4291459954 4291461480 4291134330 4291330933 4290808181 4291200130 4291592562 4291002743 4291331181 4291265140 4290280817 4291198577 4290279545 4290936697 4290738541 4290409322 4290280570 4290541164 4290214267 4289688440 4289687930 4289491564 4289753721 4289753979 4289753968 4289224809 4291389802 4293109359 4293706902 4294103202 4294037935 4294036639 4293838215 4293839009 4294035593 4294037411 4294038694 4294038694 4294037925 4294037391 4294036884 4293837452 4293238641 4291982691 4288825934 4289018961 4289282637 4288692816 4288692816 4288104524 4289938769 4289546327 4290532701 4290338659 4290204757 4290600032 4289478500 4287513165 4288428888 4288757838 4288431955 4289746528 4288955997 4289221728 4288435307 4287841875 4288762737 4288038739 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4283435831 4283370295 4283566131 4284945223 4286794362 4289956748 4290024866 4290290077 4291209908 4291404191 4290155923 4289035136 4287049288 4282647604 4284549431 4286915657 4291124578 4292703837 4293364859 4293238130 4293370745 4293435769 4292976766 4293369970 4293632648 4293305466 4293897588 4293500292 4293564786 4293561710 4293360986 4292570457 4292184438 4287383664 4283499070 4283372872 4285144904 4284685131 4284884559 4284555333 4284093516 4283763773 4284354364 4284356675 4284158537 4284882504 4283635272 4283696962 4282974786 4284292435 4289632700 4288638352 4288377738 4285804881 4283369542 4283895357 4283568452 4284884045 4284356159 4286460254 4284160835 4285277515 4284286523 4284424268 4283503430 4285540694 4283635017 4284094041 4286067558 4284623446 4285084551 4285875054 4289233569 4287587734 4284224566 4284554089 4284423528 4287323537 4288912304 4288773549 4289695145 4289438903 4286263149 4286398568 4289960885 4286071933 4289034425 4290295992 4288902323 4289300134 4292205783 4284354361 4283172677 4284881979 4287705675 4285210431 4286654792 4285932360 4285932099 4284750916 4285670215 4285668412 4284291909 4285076795 4285537861 4284356931 4284423755 4285146954 4285209154 4285799239 4287836747 4290465637 4291516241 4291255643 4291584103 4291781720 4291189075 4288627273 4285202490 4286851661 4288167503 4289875546 4291712854 4292240999 4292109155 4292307049 4292637544 4292373346 4292440681 4292962914 4292440424 4292897635 4292832354 4292699500 4292440682 4292505961 4292962915 4292440410 4292505433 4292901745 4292506216 4292507754 4292509294 4292572779 4292509038 4292901486 4292903019 4292640636 4292968585 4292578163 4292970111 4293038463 4293037951 4293298309 4292646024 4293103233 4292778379 4292778381 4293041031 4293108104 4292652437 4293047441 4293045409 4292981146 4293376661 4293309862 4293573798 4294036649 4293772463 4293904560 4294036929 4294036659 4294036403 4294037184 4294037183 4294036926 4294037697 4294038211 4294038725 4294302401 4292978589 4282908718 4283304246 4283304247 4283367985 4290601576 4291983199 4292249717 4291064425 4291661707 4291528301 4291462776 4291462015 4291002731 4291068534 4290870908 4291594105 4291067769 4291198576 4291001198 4290280558 4290999414 4290478711 4290608250 4290476921 4290605687 4289755501 4290737272 4289621868 4290079864 4289753978 4289555823 4289489266 4289881192 4291521621 4293639322 4294168480 4294038192 4294038693 4294037666 4294036643 4294035850 4294037155 4294038180 4294038694 4294037923 4294038695 4294037928 4293904268 4293897848 4292774727 4290863962 4289477962 4289480776 4289019473 4288625744 4289216336 4289084752 4289348945 4290597211 4289810003 4290860380 4290991965 4289481300 4288301394 4288887374 4288232279 4289087058 4289154136 4288760917 4290009203 4288433242 4288630630 4288697956 4288697964 4287449704 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4283435831 4283435830 4283172922 4284420418 4286791782 4289230991 4290091424 4290225835 4291144098 4291140506 4290090371 4289624967 4286789958 4283958068 4284024372 4287570503 4290927968 4292704077 4293166981 4293629569 4293567623 4293370487 4293632130 4293567111 4293371256 4293566854 4293305468 4293763957 4293564531 4293562229 4293165933 4292437607 4291590512 4287844449 4283240778 4284684615 4284949586 4285475930 4285341771 4284088905 4284422207 4284157760 4284554059 4284288835 4283963974 4284421699 4283762751 4283372106 4284357720 4288707755 4288636552 4286528855 4287581823 4284750925 4283503179 4283239758 4283962190 4284357440 4285672024 4286002777 4284156212 4284819024 4283369784 4283499594 4284160837 4285673826 4285081164 4283433782 4285871715 4284687709 4285016670 4284029259 4288179602 4288772771 4284882277 4285017959 4286008211 4287786140 4288905381 4289035690 4289696432 4290028469 4289630388 4286461020 4290150829 4285404755 4289107122 4289962677 4287919500 4287725696 4287785073 4283237435 4283961655 4285277510 4287245899 4284420924 4286128201 4285736005 4286261321 4285208638 4284949839 4285670985 4285143356 4285605713 4285272630 4285208638 4284750400 4285468985 4286589772 4286589002 4288953415 4291778642 4291189081 4291649894 4291584102 4291584347 4291714141 4288754253 4284941877 4286659928 4288889930 4290335592 4292041814 4292108117 4292174943 4292108899 4292439401 4292373353 4292897377 4292440424 4292898924 4292766562 4292832100 4292242531 4292897620 4292897379 4292440424 4292964204 4292505704 4292439654 4292899948 4292899692 4292899435 4292507755 4292508780 4292706693 4292509806 4292509549 4292577135 4293165704 4292774531 4292969853 4292776318 4292906124 4293104002 4292711304 4292778379 4293107857 4293106575 4292716434 4293110414 4293044366 4293045903 4292979358 4293048491 4292982939 4293639589 4293311918 4293705638 4293774522 4293706164 4293838778 4294036670 4294037183 4294036412 4294037954 4294037697 4294037440 4294038725 4294106047 4294236098 4284750146 4283106868 4283304246 4283826227 4291193946 4291849060 4291526254 4291134324 4291661182 4290871157 4291856764 4290545269 4291462518 4291067513 4291330675 4291066736 4291134582 4290410873 4291199610 4291132013 4290217076 4291132269 4290804334 4289949547 4289425530 4290935150 4290212717 4289688188 4289753198 4289556079 4289490022 4290078312 4289682014 4291787124 4293835905 4294038437 4294038693 4294038694 4294037667 4294037134 4294036386 4294037666 4294038694 4294038694 4294038695 4294038182 4294036624 4293838475 4293632882 4292181082 4290267213 4289414986 4290003531 4289151053 4288560209 4288493645 4289414480 4289348688 4289942367 4289811287 4290927191 4289942366 4289347410 4288825181 4288168023 4288234572 4288498270 4288828502 4289941614 4288366168 4288631140 4288698227 4288630877 4287384159 4287052893 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4283435831 4283370294 4283631673 4284486985 4286924896 4288706963 4290091418 4290880166 4291275947 4290160548 4290089616 4289300622 4287316563 4283500082 4284679735 4287570760 4290335827 4292770658 4293166193 4293565308 4293566081 4293173372 4293568136 4293565568 4293567111 4293567879 4293370231 4293567368 4293172339 4293694324 4293230953 4292703338 4291324511 4287775594 4284226630 4285344344 4285999707 4283898182 4284159051 4283634745 4284160317 4284357190 4284486460 4284680260 4284423490 4283963970 4283305053 4284224840 4289627815 4286794607 4283630146 4287258252 4286925160 4285018699 4283831885 4283634496 4283701311 4284490574 4286333796 4285802322 4283502395 4285343308 4284288839 4283436597 4284552776 4285213781 4284753762 4283433526 4284689252 4285412447 4284554833 4285678209 4287262398 4287980958 4287784848 4286336904 4286664837 4287589536 4289299118 4289233823 4289760175 4286329690 4288841642 4289628091 4289300908 4290091964 4292593087 4288708744 4283498539 4282515522 4282712101 4285017693 4285932350 4286720846 4286194762 4283701314 4286851912 4285144386 4285867339 4284749891 4285472320 4285210442 4284617270 4286064971 4284685643 4285012547 4284621386 4286324291 4286785355 4287377224 4289808464 4291387737 4291977566 4291518560 4291518810 4291844441 4290858574 4287507272 4284743733 4287775578 4288955473 4290267479 4291978073 4292108122 4292109414 4292698980 4292371545 4292571753 4292898923 4292505705 4292832344 4293161325 4292767321 4292963181 4292440426 4292505704 4292505704 4292507242 4292898666 4292898666 4292442733 4292508012 4292901232 4292507755 4292573035 4292508524 4292510063 4292704891 4292969595 4292576880 4292838526 4292579450 4292839299 4292775806 4292776324 4293103747 4293104511 4293042589 4292714124 4293108875 4292717458 4293110156 4292652966 4293508489 4292654485 4293377187 4293245613 4293377952 4293705909 4293970096 4294102966 4293904302 4294036927 4294036412 4294036412 4294036155 4294037697 4294037697 4294038211 4294037957 4294499510 4288172642 4282777649 4283238709 4284090440 4291459437 4291981663 4291395688 4291132268 4291661450 4291330922 4290805363 4291462252 4290870909 4290807669 4290544756 4291134327 4291000685 4290348403 4290542457 4290476922 4290807667 4290542457 4290148987 4291001198 4290214265 4289885561 4289754234 4289752940 4288966001 4289620083 4290079588 4289879142 4290338398 4292185957 4293905310 4294037923 4294038695 4294038182 4294037155 4294035855 4294035595 4294037667 4294038694 4294038694 4294037153 4294036898 4294102419 4293440131 4292252264 4292109903 4290072410 4290005332 4290071382 4289612111 4289348682 4289414225 4289480261 4289677659 4290401361 4290338139 4290335060 4289545560 4288301396 4289281102 4288757838 4289087060 4289087838 4289810287 4288828248 4288565588 4288760679 4287972703 4287974241 4287642972 4287118676 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4283435831 4283435830 4283238715 4284156222 4286466157 4289430165 4289500824 4290290599 4290750898 4290814111 4290614938 4289889142 4287319912 4284024630 4284614199 4287045448 4290400848 4292770415 4293363570 4293564279 4293371256 4293566851 4293631616 4293239657 4293305191 4293303946 4293501299 4293436535 4293300611 4293166961 4292838015 4292311147 4290468213 4287779457 4285736526 4285540702 4285212756 4283764556 4284094024 4283831615 4284620875 4283896121 4284292164 4284749376 4283897168 4284485201 4285475930 4286201703 4285149000 4283172679 4284027970 4289100949 4286855786 4285805923 4283898170 4284094533 4283635789 4284816714 4286399602 4285670727 4283895107 4283962690 4283896655 4284157254 4283832384 4285605724 4285478748 4282843967 4284754265 4287516535 4284291414 4283700546 4285281628 4285607773 4287523503 4288772776 4288577455 4288048289 4289297820 4289238447 4287917198 4286525284 4286599289 4288969645 4289168039 4290092726 4291273141 4289169582 4286472858 4284618846 4284357702 4287189085 4283498547 4286657611 4284947271 4285211208 4286851148 4285209154 4285802058 4285406531 4285344847 4285471811 4285012285 4285998669 4284683062 4285013062 4285403968 4286392137 4287114310 4288296527 4290399311 4291780436 4291846244 4291715165 4291713632 4291584873 4291581514 4286849608 4285466940 4287577681 4288822862 4290858071 4291912036 4292240749 4292307284 4292241771 4292633191 4292373608 4292505703 4292505447 4292834670 4292767595 4292831843 4292242274 4292897379 4292440682 4292765027 4292505961 4292505705 4292505448 4292964699 4292441197 4292897367 4292508013 4292573292 4292574318 4292508525 4292508267 4292903549 4292642416 4292840070 4292772988 4292839555 4293103743 4292776325 4292776840 4292713358 4293105028 4293041799 4293107346 4293042568 4293044621 4293047198 4293047212 4292652964 4293377431 4293245601 4293443502 4293510051 4293641909 4293837750 4293576115 4293904312 4294036669 4294037184 4294037183 4294036926 4294036926 4294037440 4294038212 4294433987 4292124061 4282581032 4283172918 4284485177 4291654775 4292310113 4291195508 4291134333 4291462516 4291397508 4290870907 4291462774 4291132527 4290805623 4291199852 4290542974 4291264112 4290542459 4290738541 4291132527 4290280045 4290608250 4290475629 4290083694 4290409078 4289885816 4290606198 4289885561 4289621881 4289557117 4290079076 4290079582 4290078835 4292644477 4294035081 4294037153 4294038182 4294036880 4294036111 4293838217 4294036641 4294037409 4294038694 4294037923 4294038953 4294037653 4293968765 4293567353 4292571980 4290667352 4290795608 4289808978 4290004808 4289546583 4289676106 4289282902 4289414226 4289809491 4290991445 4290860638 4290467166 4289676883 4288432462 4288364626 4288364626 4288365904 4289088597 4289681257 4288696163 4288695144 4287975255 4288235597 4287514455 4286461267 4287182934 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4283435831 4283435831 4283304245 4284222528 4286595947 4288840339 4289565081 4290944676 4290685602 4290814890 4290025107 4289364349 4288044131 4285008951 4284155956 4287046473 4290466633 4292836208 4292970350 4293630846 4293565306 4293632385 4292909450 4293369221 4292974988 4292711801 4292973450 4293305218 4293366146 4292643708 4292772717 4291849587 4290145133 4289626279 4285145944 4283765824 4284949580 4283635015 4284094789 4284423491 4284352839 4284357956 4284686411 4283832912 4284094535 4285675875 4287650948 4284289341 4284027996 4283766847 4284619610 4287450228 4286266470 4287318635 4283632458 4284489801 4283566151 4285543001 4284687184 4285279835 4283832388 4284223813 4283833672 4284026431 4284422487 4285939817 4283632951 4284683865 4285082452 4286599034 4285605978 4283962943 4283567701 4283899478 4285543274 4288311457 4288252596 4289100713 4287715982 4289170611 4288377502 4287782790 4286134112 4286135131 4286142578 4288118944 4287455364 4290292137 4292784560 4289302194 4290678722 4288371585 4286202746 4288104797 4285078077 4284684604 4284945464 4284684352 4286527308 4287316829 4285143871 4285011517 4285669961 4285865796 4285141562 4284551993 4285008692 4287377481 4287375689 4288558925 4291185227 4291191391 4291911779 4291649628 4291453024 4291649883 4290926169 4286454599 4284747323 4288102225 4289744470 4290598493 4292239701 4292042329 4292307046 4292307043 4292043356 4292373865 4292898922 4292898666 4292835952 4292833882 4292833389 4292833388 4293160542 4292897621 4292110176 4292765278 4292700250 4292505962 4292439913 4292964955 4292440939 4292966768 4292506216 4292509294 4292967280 4292510063 4292509549 4292903034 4292774004 4293165447 4292383360 4292969596 4292971897 4293037694 4293103490 4292319378 4293170066 4292319131 4293174667 4292717973 4293110157 4292655770 4293506458 4292981921 4293311393 4293050288 4293575601 4293903800 4293378221 4294168501 4293838777 4294036671 4294037172 4294036413 4294037954 4294037697 4294037697 4294037441 4294169787 4293707711 4283827765 4282909748 4285471294 4292310110 4291982941 4291265130 4291199602 4291528065 4291072891 4291001970 4290279800 4291396467 4290871926 4290870394 4291066476 4290282612 4290543216 4290542714 4290672749 4291002235 4290542456 4290608250 4290279801 4290214008 4290082938 4289621612 4289753722 4289753199 4289555302 4289293672 4290536297 4291257954 4292975479 4293971360 4294037666 4294038437 4294036644 4293838216 4293838218 4294037412 4294038180 4294038694 4294038695 4294037669 4293904011 4293572730 4292776299 4291782741 4291058779 4290600284 4290990157 4289874518 4289347148 4289610570 4289480274 4289547864 4289480020 4289875797 4290466897 4289419101 4288956491 4289346896 4288036432 4289609547 4288040276 4289218657 4288235854 4289944435 4287840338 4288107620 4287382368 4287577435 4287710315 4287050570 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4283435830 4283435831 4283304245 4283895099 4286134618 4288768903 4289566352 4290814383 4291275170 4290684579 4290744714 4289759636 4288042844 4283892784 4284287028 4287112264 4290268501 4292376926 4293626483 4293563516 4293567107 4293567366 4293304183 4292909195 4293435526 4292450691 4292978063 4293304200 4292908911 4293429876 4292837485 4291653225 4291590026 4290211982 4285275987 4284951637 4283437638 4284092997 4284027718 4284159049 4284160829 4283894839 4285210696 4284882510 4284027960 4285346909 4285014855 4283502908 4284686405 4284620103 4283504198 4287778420 4286401135 4286722648 4284750666 4283373902 4285474901 4284886618 4283962167 4284949580 4284553286 4284491086 4284554820 4284424271 4284485184 4285018972 4284752477 4284553302 4286663800 4287253378 4284422476 4283766338 4283237437 4283765080 4284755809 4288247469 4289500086 4288439695 4288315568 4288640922 4288903861 4286792549 4287649158 4282581038 4283170870 4285082183 4286066510 4283566405 4284289332 4287251792 4287908170 4287454847 4289626782 4289758131 4289425057 4289563568 4288245145 4289161868 4287250009 4285338940 4286391114 4284814909 4284617270 4286128709 4284683577 4285077567 4285603396 4287704903 4288362318 4289152087 4291515720 4291649896 4291518559 4291845729 4292109672 4292043103 4290399819 4286522698 4285866048 4288036945 4289546590 4291450975 4292108122 4292109408 4292505187 4292373608 4292831340 4292699492 4292899179 4292439910 4292834412 4292833132 4292832600 4292833644 4292440169 4292373354 4292240990 4292308325 4292963429 4292832092 4292898925 4292505192 4292509808 4292505442 4292965229 4292505960 4292510319 4292706431 4292509546 4292642703 4292837496 4292773502 4292840307 4292971656 4292512391 4293038468 4293039747 4293105543 4293038470 4292844684 4292714384 4293175949 4292717714 4293111715 4292982156 4292982178 4293312170 4293311911 4293443243 4293115813 4293707700 4293904571 4293706420 4294036915 4294036414 4294036412 4294037183 4294036926 4294037697 4294038212 4294103995 4294303410 4286985042 4282515504 4286392390 4292045928 4291130725 4291527798 4290673785 4291265133 4291072135 4291133546 4291134080 4290610547 4290282099 4290347635 4291068276 4290542202 4291132268 4290476922 4291002235 4290214508 4291001978 4290543207 4290936947 4289950585 4290674541 4289556602 4289556346 4289555825 4289488986 4290799719 4290079840 4291915101 4293108608 4293971103 4294038694 4294038440 4294035063 4293839266 4294034832 4294035594 4293972646 4294038694 4294038182 4294036367 4294167191 4293240683 4292834639 4291126117 4291122509 4291255890 4289612631 4290596948 4289742156 4289480526 4289217097 4290071119 4290005326 4289942367 4290008160 4289938250 4288626768 4288167760 4288756560 4288169295 4289286512 4288894040 4289220713 4288366687 4287974232 4288825192 4288036178 4287513696 4287579729 4287580771 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4283435836 4283435830 4283369787 4283566397 4285347428 4288310400 4290157213 4291075745 4290686381 4290617768 4291272860 4289628821 4287978846 4284483900 4284484666 4286522184 4290728270 4292374360 4293233526 4293236866 4293566336 4293566076 4293566852 4293436277 4293042301 4293763975 4293436020 4293631870 4293499257 4293234797 4293294958 4292838010 4291392648 4288563313 4284685894 4284949061 4284292430 4284489287 4284092732 4285015884 4284355651 4284357700 4284621387 4284288064 4283963715 4284094794 4283765570 4285015374 4285409625 4284094790 4284029257 4286333015 4286134634 4285541462 4284554824 4284160586 4285608541 4284620358 4283698509 4284690257 4285473869 4284225614 4284419907 4283699523 4283567684 4285278036 4284884062 4283895362 4287782023 4286135913 4282647094 4285807752 4282908725 4284293970 4285806720 4286997130 4288837282 4285480559 4289763008 4286071679 4287784578 4289363366 4287718018 4286329448 4283040570 4284947772 4287059581 4283565117 4283502902 4287378763 4282384442 4282778419 4285999172 4285805125 4284552766 4289884777 4288636790 4287778402 4287781509 4286457416 4285145924 4285013062 4285408586 4284883022 4284551480 4285340740 4286327627 4287443017 4288689998 4290201418 4291975272 4291584351 4291518302 4292110446 4291190880 4291914081 4290264140 4285996103 4286588746 4289218141 4289151060 4291714646 4292637036 4292500577 4292241257 4292637544 4292109671 4292571752 4292505447 4292898666 4292900205 4292439910 4292768108 4293157733 4292833627 4292571498 4292373860 4292765533 4292109924 4292963172 4292505689 4292505448 4292965228 4292508013 4292509551 4292899435 4292508781 4292901486 4292904060 4292640632 4292640378 4292839038 4292970366 4292772988 4292970109 4293103486 4292775811 4292778119 4293104007 4292384145 4293174153 4292717715 4293110157 4292717200 4293047972 4292982188 4293442721 4292982692 4293246129 4293969592 4293838262 4293772212 4293904826 4293838777 4294036669 4294036412 4294037183 4294037183 4294036926 4294037697 4294037442 4294564802 4290541435 4281860138 4288101201 4291850596 4291788388 4291527540 4290542460 4290873455 4291593591 4291134584 4291330419 4291134060 4291198841 4290151027 4291263600 4290348403 4290542460 4290608999 4289951855 4291199604 4290542457 4290411629 4290214265 4290345850 4290146666 4290411386 4289687149 4289557104 4289754737 4289426560 4290276959 4291914845 4292782990 4293838213 4294037410 4294038439 4294036113 4293706119 4294034832 4293970849 4294236839 4293973158 4294037413 4294103443 4293641095 4293301099 4292047191 4290990925 4290597983 4290600796 4291055442 4289217876 4289612117 4289150796 4289546068 4289480527 4290529870 4290531159 4289611342 4288890960 4288756816 4288231760 4288821064 4289219677 4288826710 4289022814 4289355373 4287709009 4287907671 4288105560 4287380051 4287579231 4287514718 4287580000 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4283369781 4283369781 4283369785 4283830604 4285080140 4287847553 4289696652 4290355624 4290684064 4291470752 4290486683 4289694848 4287912033 4285077822 4284155443 4287113288 4290401104 4292899950 4293034859 4293236355 4293566589 4293566852 4293566595 4293566596 4293436794 4293370231 4293567882 4293566849 4293237875 4293495938 4292968538 4291916389 4290542997 4288694897 4284553540 4284094029 4284421701 4285410139 4284091960 4283961926 4284027975 4284224059 4284292430 4284226635 4284226379 4284029762 4284883789 4285476956 4284227400 4283437636 4285407318 4285872995 4285542742 4284686924 4283831879 4285081167 4284226635 4284356172 4284292428 4285475664 4285674587 4284026681 4284092989 4283370816 4283699519 4286067035 4283238473 4283962434 4287455365 4286070897 4283302461 4283899978 4286796440 4285738092 4286007421 4286664327 4288509863 4287324312 4287981208 4288316322 4286991763 4288706979 4288773536 4288509341 4284350533 4284158521 4288375935 4283105336 4285669192 4284685641 4282977349 4285339964 4286264399 4285340223 4283899211 4285672012 4283899198 4285865287 4287579976 4289362291 4285472583 4285733958 4284487229 4285339967 4284683577 4285406787 4287834953 4288428622 4288626253 4290857813 4291715155 4291124570 4291781222 4291584867 4291913572 4292110696 4288429389 4284747320 4287641178 4289087571 4289810003 4292308330 4292108643 4292307549 4292241001 4292373352 4292571751 4292700522 4292441706 4292898666 4292439910 4292833386 4293160558 4292376170 4292898671 4292505945 4292765287 4292699750 4292308073 4292505960 4292572780 4292570983 4292506987 4292504934 4292506474 4292899436 4292509038 4292508780 4292311674 4292771964 4292445295 4292905862 4292577155 4292839812 4292644472 4292776325 4292842376 4292776583 4293105543 4292844171 4292778638 4293106825 4293110414 4292718230 4293047443 4293114011 4292588703 4293442732 4293310888 4292984493 4293509806 4293970619 4293772212 4293904313 4294036926 4294036669 4294036412 4294036412 4294037183 4294036926 4294037699 4294301618 4292390832 4281860131 4289019985 4291781719 4291788388 4291263614 4291134067 4291005307 4291659126 4291265665 4290151025 4291002237 4290871163 4291593845 4290739578 4290017134 4290411372 4290542460 4290804077 4290476921 4290607992 4290608249 4290674041 4290541420 4290214267 4289556601 4289951099 4289491310 4289556336 4290341728 4291126364 4291390553 4293237112 4293772678 4293904542 4294038698 4293838219 4293902203 4293838476 4294036383 4293973159 4294038696 4294037904 4293838733 4293964666 4292053094 4291714122 4291058009 4290533464 4291318606 4289680224 4290596690 4289414226 4288693581 4289149257 4289612118 4289480533 4289677391 4288956746 4288295758 4288232016 4288167246 4289022546 4288955724 4289419104 4290008188 4287645781 4288561758 4288039767 4287974243 4288036699 4287447902 4288302691 4287450206 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4283960640 4283501890 4283304255 4284025154 4284883529 4287979395 4290023317 4289893013 4290815666 4290815394 4290026390 4289957775 4287847019 4284748348 4284288818 4287048521 4290334798 4292111976 4293100653 4293694327 4293565819 4293370229 4293436024 4293370488 4293567111 4293436023 4293370488 4293370744 4293172856 4293694324 4292967274 4292050303 4291135382 4289811308 4285013062 4284815686 4283963464 4285211721 4284353350 4284488005 4283895099 4283766092 4285015373 4283763772 4283897157 4284819030 4286133592 4285411420 4283828541 4284490848 4283898429 4285672037 4285212502 4285540424 4285475419 4284819534 4283305279 4283833160 4284028227 4284227144 4286861175 4283959367 4283698502 4283897917 4284883031 4285146695 4283301954 4285675631 4286333031 4285215345 4286402954 4283568724 4286663804 4286860676 4285676136 4287583613 4285939559 4288376733 4287259544 4287060102 4286138234 4287588001 4289036707 4290025136 4286730368 4283499048 4288113563 4283238439 4285602879 4283567941 4283568440 4286065229 4285865535 4285736785 4284093499 4286393931 4285472325 4285931331 4284353847 4287050314 4286259783 4284489030 4284815934 4284024884 4285206070 4286456905 4287510351 4288757073 4289283661 4291250509 4291257184 4291977322 4291649886 4292046181 4291913567 4291321175 4288492619 4285011527 4288035148 4289746032 4290728532 4292371557 4292505443 4292108387 4292571752 4292571239 4292700525 4292899178 4292898666 4292441449 4292834669 4293095021 4292769885 4292506731 4292441706 4292766567 4291979359 4292571754 4292963165 4292897379 4292505704 4292505706 4292897881 4292834673 4292900445 4292442477 4292507243 4292508782 4292574060 4292509805 4292707460 4292642159 4292838785 4292970867 4292643466 4292775806 4292841603 4292776583 4293105799 4292776327 4292778379 4293106311 4292718229 4293044366 4293506443 4292655264 4293504673 4292982949 4293509293 4293443243 4293575600 4293838006 4293641906 4293839799 4293904313 4294036669 4294036412 4294037183 4294037954 4294036926 4294036927 4294169788 4293711032 4284678203 4288628304 4291585639 4291789674 4291397237 4290674558 4291790208 4290088060 4291199355 4291067516 4291134058 4291134069 4290542459 4291789938 4290608498 4291133565 4291068273 4290476921 4290739835 4290348145 4290607992 4290279800 4289819770 4290082925 4289622895 4289491309 4289754235 4290869369 4290472039 4291589476 4291257952 4292577142 4293307504 4293839246 4293966457 4293969299 4293902717 4293838220 4294037924 4294038694 4294038695 4294037157 4293903504 4293373030 4293033060 4290795345 4291124056 4291188312 4290728541 4289874772 4290005595 4289743182 4288495696 4289216589 4289677384 4289548118 4288625488 4288427596 4287179848 4288822350 4289154145 4288957524 4289942127 4289088099 4288432474 4288759898 4287186258 4288891509 4287253074 4288235875 4287380814 4288038501 4288237421 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4283238466 4283697202 4283501881 4283894592 4284816454 4287519845 4289498013 4290025370 4290946721 4290160035 4290549916 4289826444 4288440434 4284881728 4285405502 4287045448 4290335055 4292309339 4293100910 4293300350 4293238151 4293436279 4293173375 4293369972 4293632131 4293173898 4293369971 4293566082 4293631352 4293298027 4292769896 4292709514 4292115849 4290080640 4284617535 4285738067 4284352828 4284884558 4283635785 4283960629 4283893322 4284358477 4284554823 4283437640 4286530159 4288106359 4285343303 4284752460 4284094788 4283764555 4284161348 4285739095 4284884045 4284754257 4285342795 4284554825 4284425036 4284751432 4283573074 4283962951 4285214285 4284489806 4283698243 4284091466 4284688198 4285016170 4282712634 4287717001 4285214310 4284489814 4287060097 4285739875 4282843948 4286604949 4287715747 4285744521 4286400149 4286934683 4288447151 4287982762 4285807719 4284487762 4286399344 4288770970 4290222273 4286196567 4286926965 4284225599 4285142088 4282975036 4284096330 4286391367 4285211465 4284355132 4284749373 4285801541 4286263116 4285405251 4284686924 4285141557 4285278797 4284488259 4284159302 4284880954 4285403963 4286785351 4287968590 4289083726 4290398798 4291120985 4291256412 4291582300 4291519842 4291650661 4291715431 4290597458 4286455622 4285012293 4288167515 4289611866 4290992731 4292110178 4292306793 4292241256 4292964458 4292441450 4292900204 4292439910 4292505447 4292899948 4292767337 4293097074 4292834413 4292833130 4292833388 4292633699 4292964716 4292505961 4292307555 4292505960 4292898925 4292898138 4292832862 4292898652 4292441196 4292897896 4292902513 4292902000 4292508525 4292509807 4292902505 4292446587 4292970093 4292772993 4292774771 4293169280 4292710789 4293170056 4292711304 4292776327 4292778123 4293108103 4292718486 4293502599 4292259995 4293112736 4292983465 4293049507 4293115047 4293443500 4293442987 4293313963 4293838006 4293641650 4293576113 4294036670 4294036412 4294037183 4294036155 4294037183 4294037183 4294037699 4294237629 4288368753 4289283409 4291391581 4292050781 4290871936 4291131505 4290939758 4291330430 4290216577 4290413939 4291134088 4291199603 4290216576 4290476923 4291265150 4290216560 4291133308 4290871412 4290936184 4290542199 4290542200 4290545266 4290016888 4290214010 4290344557 4289556603 4290278253 4289884268 4290804067 4291914602 4291260255 4292047188 4292905067 4293437035 4293244023 4293242996 4293832822 4293904268 4294037668 4293973159 4294037410 4294037395 4293903229 4293502841 4292309834 4291123039 4290597718 4290726992 4290859342 4289940053 4289807947 4288626000 4289215823 4288759380 4289808732 4289545038 4288298065 4287308869 4288032842 4288301136 4289810020 4289875557 4288366682 4288564562 4288628046 4287251294 4287383124 4288694102 4287906911 4288105045 4288303997 4287450976 4287514717 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4284028211 4284027722 4283698243 4283565885 4284421445 4286729324 4289300117 4289501337 4290290611 4290814616 4291076000 4289759881 4288373619 4286395465 4285141307 4287048776 4290070350 4292506988 4292968813 4293301364 4293436021 4293566597 4293566851 4293566852 4293238909 4293436022 4293567111 4293567623 4293562488 4293104241 4292834665 4292378494 4292974207 4290598266 4284290363 4287909753 4283897405 4284553288 4283370820 4283437641 4283633478 4284619081 4285474640 4286991742 4287053663 4284555071 4284027467 4284223802 4283306571 4284226897 4285213783 4285671251 4285280090 4284554567 4284028998 4283897416 4285934166 4284556622 4284557135 4283110481 4284817996 4286728831 4283042118 4285672537 4283765822 4284885865 4285215581 4285544803 4285211727 4285080422 4286267494 4288047015 4282318926 4283106356 4288053932 4289378768 4287457686 4288974266 4287259269 4287456400 4287124868 4285346930 4284490849 4287853490 4287980695 4288314796 4287851179 4286332775 4289505747 4283236393 4284160068 4286457416 4284882765 4284751428 4285407044 4285865545 4285998406 4284226112 4285471296 4284750658 4285078852 4284750149 4284485433 4285206070 4286127684 4287707472 4287707217 4289215813 4291318107 4291579991 4291385692 4291584096 4291518304 4291977053 4291125336 4290071897 4285274947 4286786124 4288498000 4289350501 4291585379 4292239965 4292439401 4292373351 4292833386 4292832873 4292834413 4292898669 4292441194 4292835951 4292767596 4293093704 4292440170 4292831842 4293160285 4292832858 4292440426 4292700249 4292571753 4292373097 4292506201 4292242285 4292963156 4292439914 4292965228 4292442732 4292507499 4292508525 4292510319 4292706430 4292706173 4292510834 4292837499 4292773503 4292970367 4292774019 4292971641 4292776325 4292971902 4293106562 4292778124 4292779919 4293107591 4293044107 4292784537 4293111436 4293048732 4292652449 4293181352 4293310889 4293050029 4293773493 4293838005 4293904570 4293904313 4294036669 4294036412 4294037183 4294037183 4294037183 4294036412 4294036928 4294432946 4291332237 4289807955 4292441700 4291592563 4290605924 4289424485 4290673533 4290477681 4291000685 4291329905 4290674291 4290216562 4291070591 4291725166 4290807418 4290282624 4290282096 4291133307 4290282096 4290936711 4291068029 4289885302 4290410873 4290411128 4289622649 4290279545 4290411642 4290475385 4291260268 4291196772 4291719266 4291786074 4291721308 4291919713 4292972398 4292318050 4293439363 4293904267 4293972646 4294236582 4293972649 4294036863 4294033539 4293237349 4291455828 4291056471 4290727753 4290267995 4290464335 4289544789 4289348944 4288625484 4288693330 4289874267 4288693067 4288365646 4287902796 4287508295 4287118937 4289283668 4289748321 4288826711 4288563548 4288695913 4287841364 4288035421 4288037718 4288040549 4288105827 4287972444 4287383632 4287648359 4287116628 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4284026682 4283436096 4283501881 4283238207 4283962423 4286990959 4288772231 4289632160 4290552220 4290816686 4291271570 4289694860 4288705663 4286722373 4285932361 4286325575 4290399308 4292309598 4292969069 4293300617 4293631356 4293370744 4293370229 4293697153 4292911486 4293042301 4293632132 4293371000 4293564267 4293298810 4292837485 4292112745 4292976527 4289944179 4285405770 4288238699 4284226119 4284553543 4283501646 4283569743 4284620367 4286465382 4287515759 4284948295 4284163405 4283701319 4283898952 4284029253 4283698759 4284094530 4285805418 4284883537 4286132831 4284423239 4284424780 4285081167 4285607510 4286198369 4285017169 4284357451 4283044423 4285739863 4285213783 4284292427 4283762763 4285017171 4288046238 4284420930 4283635272 4284620612 4284815953 4287260283 4285478517 4283436367 4283108677 4285415518 4286201473 4287918481 4287197617 4287983002 4285411936 4284617282 4284291940 4286599550 4288377521 4290027439 4289229745 4289110718 4288705668 4282712125 4284554308 4285603143 4284748086 4283437375 4286063684 4285143102 4284881477 4285143098 4284553279 4285143615 4284355129 4284750400 4284747572 4285535548 4286325577 4288031814 4289021002 4290070361 4291188821 4290927447 4291649883 4291323235 4291583840 4291584347 4291386207 4288558663 4284419647 4287706447 4288890188 4290796638 4292109666 4292241514 4292439144 4292571495 4292833130 4292900206 4292442202 4292898412 4292835165 4292770159 4292768619 4293160815 4292440167 4292898923 4292374633 4292505448 4292505705 4292765031 4292175208 4292373859 4293223775 4292898394 4292242021 4292572522 4292508268 4292899435 4292900718 4292510577 4292899949 4292640364 4292509550 4292511092 4292837755 4293362553 4292380534 4292839813 4293102196 4292841344 4292775551 4292776585 4292777607 4292647807 4292777870 4292784021 4293175436 4292260252 4293505176 4293442478 4292982692 4293575085 4293115825 4293573036 4293642420 4293904569 4293838776 4294036669 4294036669 4294036412 4294037183 4294036412 4294037183 4294036926 4294104005 4293642939 4290725447 4292247910 4291656797 4290015087 4288959841 4289096043 4288964458 4290080370 4290082161 4290606702 4290936188 4290674284 4291199863 4290742132 4291594115 4290870908 4290085244 4290807677 4290544500 4290153065 4290739336 4290282603 4290151026 4290213497 4290083437 4291064427 4291396202 4291197796 4291526514 4292181346 4292180067 4291261278 4291912788 4291194451 4292838256 4293243762 4294101903 4294171305 4293972904 4294038420 4294100628 4293506682 4292971117 4291846993 4291056205 4290793303 4289875799 4289544264 4288759638 4289150543 4288101203 4289677137 4289348431 4289479758 4288428110 4287375941 4287247953 4289347667 4288761689 4289876839 4289153119 4288431181 4288430941 4287380811 4287513953 4287315795 4288037979 4288171621 4287972184 4288370802 4287052875 4286853709 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4283829312 4283501875 4283697210 4283700035 4283632963 4286332250 4289036429 4289565853 4290683806 4289763491 4290025107 4289825932 4289230198 4286659157 4285338175 4287572295 4290069329 4292571211 4292773490 4293495934 4293565557 4293566082 4293435765 4292976251 4293501816 4293632132 4293370487 4293566853 4293565558 4293627775 4292969326 4291716195 4292973702 4289949804 4285930313 4287516269 4285014089 4284224322 4284289850 4283898190 4284489808 4284816452 4284357444 4283966029 4284619843 4284226380 4284026692 4284554828 4284224585 4284096592 4285146451 4285411669 4285739619 4284751688 4284097350 4285279065 4285080660 4284555077 4285278039 4285343052 4285079624 4285805147 4284421186 4283699520 4282975304 4285610853 4287059840 4284421444 4283434568 4283897172 4285150554 4287787178 4286987624 4285348210 4283700047 4284029764 4283700803 4283699541 4286073717 4288714415 4287061907 4283699537 4284488016 4285674097 4285217642 4288574374 4291147964 4289899696 4284290368 4284222774 4285143102 4286194244 4283962958 4284485169 4286391114 4285278035 4284881471 4284227404 4285405759 4284353600 4284027962 4284814905 4285468477 4285339197 4286787403 4287966793 4288692299 4291448660 4290991195 4291515482 4291584347 4291781989 4291583840 4291715677 4291187792 4286454857 4284816717 4288038735 4289283170 4292043357 4292174688 4292963677 4292109667 4292571496 4292898922 4292439910 4292898411 4292441706 4292832618 4293161582 4292771953 4292834155 4292833129 4292767596 4293161567 4292769136 4292900191 4292441692 4292571498 4292373092 4292439654 4292835185 4292897121 4292506987 4292506473 4292899692 4292507755 4292507242 4292510320 4292901488 4292903277 4292509295 4292445554 4292641921 4292707954 4292446068 4292839301 4292382591 4293168768 4292775812 4293171079 4292778895 4292845452 4292781714 4293110670 4293109899 4292653733 4293047710 4293048743 4292982692 4292983977 4293247656 4293705393 4293970361 4294036926 4294036669 4294036669 4294036412 4294037183 4294037183 4294037183 4294037183 4294037184 4294236092 4291257708 4292313189 4290735962 4288039755 4287907151 4289157726 4288827218 4289159264 4289093479 4289031288 4289424227 4290540154 4290080631 4291068026 4290870125 4291199870 4291528310 4290479235 4290610548 4290478722 4290217074 4290476411 4290476923 4290673785 4290476915 4291265662 4291592304 4291921787 4291789409 4291985266 4291787356 4291394912 4291323747 4291395178 4292182632 4293638545 4294038438 4294170790 4293973160 4294037909 4294101399 4293438048 4292967507 4291321431 4291120465 4290270551 4290071125 4289480531 4289348428 4288558413 4289545550 4289809506 4288824652 4287771211 4287378767 4287311947 4288693066 4288169038 4290006886 4288235610 4288893026 4288301913 4287971933 4287445588 4287316832 4288825433 4287253078 4287514185 4287515499 4287578975 4287382093 4285801030 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4283829567 4283698494 4283697467 4283436858 4283567173 4286991469 4289233822 4289630604 4289895076 4290289316 4290616990 4289564815 4288639356 4286726230 4285800262 4286915655 4290332748 4292307556 4292969327 4293299313 4293171581 4293632128 4293566851 4293632389 4293369973 4293566596 4293370488 4293566077 4293564797 4293627769 4292903005 4291913832 4292575089 4289685386 4285998666 4286987355 4285278806 4284096324 4283896651 4283699768 4284159547 4284423240 4284488773 4284358470 4283766351 4284291130 4283833159 4284818520 4283503173 4286003293 4284619849 4286196575 4284227142 4284424287 4284949845 4286992751 4285606742 4283765826 4284292429 4284225855 4285147470 4284552767 4283636291 4283566413 4283697976 4286796409 4284423239 4284620616 4283898953 4283896146 4286925444 4288443555 4288445096 4284687699 4286529396 4284422989 4284620877 4283108685 4283698750 4286997895 4289565621 4283764283 4284357977 4287125381 4286924924 4285213266 4288579485 4287650942 4283039792 4284684864 4285668926 4285209664 4283434802 4284945981 4285735496 4284357187 4284355128 4284550976 4284878388 4284026683 4284551483 4285340992 4285273405 4285537604 4287770439 4287576147 4290070601 4291121232 4291579996 4291451219 4291385179 4291584102 4291256414 4291649621 4289018193 4284488262 4285933125 4288887632 4290269522 4291913830 4292306782 4292571755 4292637288 4292374635 4292440167 4292898666 4292833129 4292832873 4292834413 4292769384 4292833899 4292377195 4293160559 4292768347 4293096801 4293095774 4292767597 4293226607 4292831837 4292505946 4292505707 4292831826 4292899182 4292505192 4292508269 4292901231 4292442219 4292965998 4292510064 4292510063 4292508013 4292707183 4292968058 4292837755 4292838251 4292840070 4292971898 4292841345 4292776311 4292843899 4292383629 4293172357 4292712331 4293108618 4292715922 4293044619 4293505960 4292653990 4293048986 4293376940 4293181618 4293247142 4293903798 4293378999 4293904312 4294036669 4294036669 4294036412 4294036412 4294037183 4294036926 4294037183 4294036927 4294171071 4292845724 4292242507 4288628558 4288759114 4286918734 4287975756 4287969616 4287842379 4287712073 4288958546 4290011242 4289030499 4289685866 4289425520 4289948793 4290608506 4290082681 4291002492 4290477164 4290345336 4290542203 4290284923 4290476667 4290345580 4291329390 4291066477 4291922814 4291724389 4292707956 4292113746 4292245846 4291521884 4291458390 4292113511 4292053350 4293904520 4294037668 4294171046 4293973162 4294036607 4293837456 4293040224 4292046947 4290991440 4290728272 4290135117 4289610308 4288757838 4288755277 4288693072 4288890448 4289152076 4288560975 4287440969 4287442760 4288559950 4288563305 4288959333 4288892760 4289086544 4288431960 4288693856 4287312980 4287974231 4288628310 4287843942 4288959082 4287449430 4287647843 4287183437 4286326601 4286062664 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4283829563 4283501877 4283501877 4283696967 4283962946 4287052645 4288312195 4289565842 4290290599 4291341740 4290815395 4290222743 4288770932 4286591312 4285801286 4287048010 4290132549 4292178025 4292575326 4293759105 4293697659 4293171585 4293631616 4293370229 4293435508 4293632903 4293370486 4293567367 4293565302 4293561980 4293428059 4292306522 4291125600 4289290875 4285935182 4287515254 4286195275 4283695687 4283569219 4284029255 4284554826 4284885585 4284226112 4284621903 4284227140 4284094533 4283634503 4284357194 4285147737 4285278283 4284754776 4285344590 4284162122 4283636812 4284952913 4285938020 4285608013 4283831364 4284028224 4283763023 4284752456 4284359500 4283829822 4284156226 4284224836 4286270585 4283894068 4284751698 4285740641 4284027468 4285409118 4287787937 4287915674 4288773547 4283962681 4285804373 4284161367 4282910271 4284357703 4285149280 4285348180 4284950372 4283960896 4287193751 4288376470 4287121288 4288178814 4286530661 4283760693 4285798718 4285997894 4284550712 4283899461 4284684607 4285075761 4284947522 4285013316 4285075764 4283631670 4284483638 4284813621 4285535806 4286066508 4286195271 4287967818 4289412423 4290860891 4291122012 4290992462 4291449946 4291388767 4291453790 4291387229 4291123538 4287637318 4284028487 4287247438 4288627280 4291913314 4292636266 4292439396 4292240989 4292175209 4292571495 4292898922 4292441450 4292899948 4292834412 4292375401 4293163122 4292834155 4292770416 4293161309 4292767596 4292767083 4292770674 4292832087 4292374634 4292897635 4292505707 4292505960 4292897391 4292440154 4292571994 4292504936 4292506729 4292966512 4292443759 4292901743 4292706688 4292510063 4292509551 4292904305 4292642676 4292445042 4292641152 4292644474 4292841345 4292775552 4293103748 4292777357 4292776844 4293105286 4293040262 4293108877 4292783251 4292718485 4293111711 4293047723 4292981916 4292983468 4293509557 4293510585 4293707441 4293904313 4294102461 4294036412 4294038211 4294036412 4294037183 4294037954 4294036926 4294037697 4294104263 4293641136 4289548890 4287771727 4286919758 4286586440 4287904074 4286458440 4287706962 4287575121 4287382863 4287184973 4288562508 4288499542 4289286246 4289095783 4289816156 4289096044 4289555306 4290082428 4289885562 4290017145 4290214507 4290739320 4290348929 4291396736 4291988329 4292119163 4291990388 4291720278 4291524702 4290867033 4291652191 4291916126 4291722332 4293438085 4294166673 4294038438 4293972902 4294038187 4294101634 4293769069 4292643679 4291912538 4290662736 4290529348 4289215563 4287641424 4287900743 4287641166 4289086033 4289088077 4289019982 4287377225 4287048006 4287444046 4287707725 4289222242 4290005345 4288300127 4288432217 4288040293 4287842646 4287970644 4287775839 4289484652 4288697956 4288103519 4287515734 4287183702 4286855248 4286063944 4285143874 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4283697462 4283567421 4283369781 4283238713 4284353860 4285408575 4288048269 4290683030 4291341236 4290620074 4290751141 4289829529 4290478462 4286989655 4285865797 4285865542 4290331733 4292240972 4292901998 4293167219 4292908923 4293302896 4293239947 4293435507 4293239182 4293041785 4293567111 4293698938 4293499512 4293563502 4293494637 4292637805 4291322977 4289091962 4286526818 4286791516 4286921566 4283043142 4283633471 4284226112 4286000731 4284159554 4284418374 4283570496 4284290123 4283832397 4284292172 4285803338 4285673826 4283635784 4285411161 4285540693 4283308625 4284358213 4285803112 4284818759 4286657634 4284227659 4284554565 4284225088 4284026421 4283959622 4284620873 4283501895 4284554832 4284226120 4283831877 4284429691 4285280606 4288311989 4287320724 4286729873 4288577691 4289306294 4285084273 4283894597 4285414499 4286397822 4283699003 4285146188 4284554566 4284093262 4284750407 4288247727 4285277519 4287452790 4288968356 4284880451 4284091960 4284685379 4285930047 4283369786 4284618040 4285407049 4284159558 4284290373 4284027704 4284289595 4284353596 4284551990 4285075769 4285340743 4286917706 4287639881 4288164943 4289940298 4291647315 4290991445 4291319900 4291842653 4291647062 4290928218 4291780183 4289609545 4284022846 4285998665 4287969359 4289808728 4292307290 4292306788 4292241253 4292373604 4292439145 4292571751 4292897130 4292899174 4292377196 4292834156 4293163365 4292771442 4292375402 4293226092 4292375916 4292834157 4292769886 4292834414 4292834671 4292898908 4292832101 4292832859 4292897380 4292506204 4292897381 4292505705 4292965999 4292505193 4292507998 4292505946 4292509041 4292442458 4292901747 4292510064 4292509551 4292706670 4292643961 4292839279 4292839559 4292774516 4292971643 4293038469 4293104252 4292778119 4292776588 4292780430 4293107847 4292717973 4293114002 4292717456 4293047980 4293046950 4292982948 4293247658 4293640878 4293708222 4293970104 4293576634 4294036669 4294036412 4294036412 4294037183 4294036926 4294037697 4294037441 4294038971 4294039499 4290071632 4286654022 4288297038 4287049290 4287709789 4286654024 4286588485 4287114312 4287705163 4287575376 4287511120 4288036172 4287384142 4287315789 4288040019 4287908176 4289223012 4288700777 4288701799 4289357685 4289686653 4290083194 4290148216 4291330930 4291528563 4292121479 4292120688 4292052859 4291393120 4290732113 4290865500 4291651669 4292119149 4293834902 4294036364 4293973161 4294236587 4294038659 4293969026 4293500010 4292901203 4291190357 4289938761 4288954194 4288296783 4287375176 4287314002 4288951885 4288956491 4289676619 4287773010 4286980933 4287509839 4288625742 4288563280 4289222007 4288365644 4287709779 4288628825 4287843170 4287971923 4287907422 4288039254 4287844707 4288829027 4287319135 4287711585 4286724170 4286526032 4285207867 4286194506 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4283369781 4283369782 4283435836 4283369786 4283438142 4285210715 4288704902 4290157462 4290748318 4290620332 4291209637 4290550930 4289693588 4287781980 4285666372 4286654026 4289805383 4291913812 4292967540 4292971379 4293367667 4293303944 4293237622 4293632389 4293436279 4293237621 4293566592 4293698939 4293500285 4293562734 4293492842 4292704349 4290796129 4289027706 4286985042 4286662236 4287250282 4283500610 4283503427 4285014607 4285340220 4284093516 4283963973 4284355916 4283898186 4283831885 4284029760 4286200166 4284292170 4283767370 4286198367 4284226635 4283899725 4284030286 4285739596 4285539925 4285475916 4284883790 4284489289 4284094010 4283702613 4284029252 4284686408 4284751946 4284489030 4283239756 4285082704 4286338442 4282318915 4285940840 4287916697 4286071665 4288573361 4287522444 4289834434 4285413754 4284488280 4285279834 4285410138 4285805419 4287053948 4285804894 4287189885 4289571757 4283761477 4285145668 4286003532 4284881474 4284550968 4285929790 4284288058 4283698490 4285210691 4284552511 4283895609 4284553791 4284684359 4284092989 4284287802 4284418100 4285999695 4285536576 4287771981 4287836236 4288758346 4291449941 4291056729 4291453016 4290993745 4290925396 4291386718 4291191389 4290662477 4286257731 4283762748 4286853716 4288496985 4290732129 4292242531 4292505189 4292042837 4292964443 4292175459 4292175208 4292505959 4292441450 4293225836 4292768876 4292768622 4292835439 4292833626 4292833132 4292439640 4292836210 4293094237 4292766808 4292898667 4292373863 4292832101 4292832859 4292506221 4292109392 4292964444 4292307562 4292440155 4292964190 4292508014 4292966770 4292441962 4292900977 4292835935 4292901483 4292509808 4292444015 4292903036 4292839042 4292971124 4292839558 4292774516 4292776326 4292777601 4292776072 4293172105 4292711052 4293106310 4293108620 4293112207 4292784293 4293047452 4292982185 4293179562 4293311665 4292984236 4293576120 4293970105 4293576635 4294102205 4294036669 4294036412 4293710274 4294036155 4294036926 4294038468 4294037442 4294499778 4290475124 4286719558 4287511889 4288101197 4287447119 4287574604 4287641425 4287051086 4286461006 4287181902 4286591306 4287116623 4287181646 4287181134 4287772496 4287116368 4287053646 4287578957 4287579980 4287449175 4288043094 4289027430 4289883762 4290871166 4291331694 4292252288 4292118888 4291788386 4291395947 4291856997 4292183134 4291656799 4292315509 4294099833 4294037928 4294236584 4293973142 4294102422 4293571191 4292839009 4291716176 4290267460 4289217360 4288426569 4287441737 4287443273 4287968846 4288235344 4288955982 4288821070 4287377995 4287572040 4287774029 4289284960 4289220450 4289352555 4287710282 4288432227 4287974233 4288628311 4287250262 4288105048 4288500587 4288764785 4287974764 4288302435 4287053910 4286919766 4285999689 4285798720 4285799491 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4283567178 4283699508 4283304246 4283304245 4283499582 4284620356 4288771470 4290286733 4290684594 4291143585 4291341480 4290485663 4289041283 4288833137 4286258754 4285932874 4289346119 4292239965 4292116585 4293102457 4292974719 4293302138 4293304442 4293237639 4293042558 4293631617 4293502343 4293698681 4293501058 4293561465 4293560172 4292769632 4288952133 4289755531 4287575405 4287909992 4286200927 4283367999 4283371070 4285145929 4284222787 4283832902 4284357180 4283503427 4283634759 4284225599 4286266215 4285736787 4283635020 4284095295 4286135653 4284554322 4283768655 4284292422 4285018458 4285540179 4285935969 4284620874 4285804379 4285209675 4283501876 4284485454 4284225092 4284227659 4284817996 4284686153 4284490310 4284162114 4283237954 4283239748 4286994327 4285675119 4287521681 4288176534 4288251040 4289695926 4288114081 4283631672 4285413233 4287387263 4288309396 4288507271 4285273144 4285796661 4283636025 4284290118 4284224572 4285144134 4285803081 4284424783 4284486451 4284486457 4285210691 4284223289 4284420667 4284093755 4284680506 4284289594 4284421701 4284813619 4285798723 4285735496 4288166222 4288100174 4290201677 4291188570 4291059282 4290994266 4291579745 4291387742 4291058521 4291122249 4288295500 4283695165 4284682555 4288298834 4289285972 4292110946 4292896598 4292569443 4292439141 4292308074 4292830818 4292506216 4293028461 4292439910 4292834669 4292834670 4292766550 4292836209 4292767339 4292767598 4293159771 4292768877 4293096554 4293160815 4292310636 4293619040 4292767322 4292831846 4292898394 4292373607 4292109663 4292571754 4292962645 4292439899 4292573809 4292439382 4293228917 4292833643 4292441964 4292510321 4292509808 4292902765 4292641391 4292641133 4292969084 4292579451 4292840054 4292776064 4292971646 4293172355 4292318853 4293565057 4292712332 4292780175 4292783508 4292782735 4293111455 4292982951 4293181095 4293050289 4293706928 4293182129 4293641658 4293970105 4293708221 4294036669 4294036669 4294101691 4294037183 4294036926 4294037697 4294037441 4294302658 4292124310 4286455869 4287510096 4288102226 4288168785 4288104539 4287972175 4288033869 4288100432 4287576652 4287115854 4287179077 4286787401 4286260550 4285735494 4286461005 4286392393 4286458441 4285869901 4286525004 4286326858 4287186510 4287449425 4289620570 4291128422 4291063123 4291854693 4291987821 4292846706 4292646758 4292117358 4292314475 4292714868 4294036109 4294038439 4293973160 4294038680 4293901694 4293368179 4292375893 4290860371 4289346377 4287967306 4286521927 4286585415 4288163654 4287770955 4289085265 4287771211 4287969358 4287443281 4287246923 4289218653 4288960612 4288564309 4287706954 4287906902 4288761190 4287972957 4287250260 4288627788 4287908441 4289548390 4287844971 4288234849 4287449941 4287841113 4286395469 4285275973 4285471293 4285275461 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4284943934 4283566907 4283632437 4283829812 4283829056 4285013570 4288311171 4289502111 4291338661 4291079605 4291276448 4291009436 4289566359 4289098611 4285471557 4286653766 4288953674 4291650907 4292967533 4293234552 4293300610 4293697402 4292909954 4293501300 4293436281 4293369971 4293567624 4293567624 4293565306 4293566329 4293429614 4291845728 4286588493 4289950091 4287513952 4286856030 4286528096 4283238462 4285015631 4284489285 4284026692 4284028483 4284091719 4284025924 4284095049 4286860150 4284881986 4284884301 4283567174 4283700298 4286266981 4284358729 4284093762 4284096592 4286459495 4285276228 4285936983 4285278297 4285277514 4284884560 4284489029 4283567674 4285606224 4284290367 4284622672 4285015631 4283896908 4283699011 4283505744 4284555084 4283303733 4287191967 4286729103 4288114074 4287985589 4288180896 4289436597 4287057547 4289493676 4287581572 4287055206 4287913863 4286402690 4284553274 4283634499 4284027186 4284552505 4285144391 4285801032 4284157239 4283896636 4284422475 4284618044 4284353344 4284090170 4284223285 4284353596 4284288058 4284549952 4285010745 4286587466 4287244614 4288363602 4289347144 4290857289 4291059289 4291382863 4291517023 4291320404 4291059028 4291320652 4290065740 4283957300 4283829815 4286917709 4289086811 4290928222 4292501597 4292765536 4292505948 4292571483 4292765027 4292308073 4292505703 4292833385 4292900461 4292439910 4292833130 4293161072 4292767338 4293161565 4292768877 4292770672 4292833899 4292377454 4292832603 4292833886 4292700771 4292833390 4292834911 4292505452 4292505947 4293290069 4292505963 4292113258 4292964206 4292506972 4292570731 4292508765 4292508522 4292966255 4292506986 4292509808 4292903021 4292444016 4292443759 4292642673 4292838529 4292775037 4293166979 4292776581 4292775811 4292843150 4292710535 4293108107 4292779148 4293176462 4292783764 4292719783 4293111196 4292982438 4293574827 4293245874 4292984235 4294101692 4293641648 4293839807 4293904055 4293708221 4293710531 4294101691 4294037183 4294037697 4294037441 4294104251 4293970363 4287308618 4287969103 4288694098 4287909459 4288760408 4287971921 4287972177 4288628816 4287903833 4287511631 4287640910 4286655563 4286853194 4285867336 4285602624 4285667906 4285408071 4285207095 4284683063 4284816452 4285211212 4286458188 4287511887 4288762453 4289614678 4292116838 4292654214 4293311627 4292981100 4291855973 4292316023 4293701487 4293905057 4294038437 4294038700 4294036115 4294098285 4292842095 4291715654 4290004296 4287770186 4286063943 4286257736 4286718535 4287510351 4288690254 4287312203 4287574089 4287443019 4287970639 4288497488 4289091182 4289221214 4288498021 4287907935 4288035404 4287380309 4287447124 4288039010 4287904597 4287973719 4287844976 4288895335 4287384415 4287712599 4286789720 4285932358 4285800003 4285471550 4285536318 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4284619327 4284945207 4285274690 4285472836 4285209415 4285212241 4289292920 4289501334 4290684842 4291276455 4291145640 4291208354 4290026906 4288770165 4286129991 4286522953 4289348431 4292110430 4292116328 4293102458 4292973943 4293237378 4293502072 4292910461 4293303931 4293238154 4293371002 4293372028 4293566083 4293564530 4293626479 4290926678 4286852176 4289756545 4286394976 4285604943 4285341520 4283108935 4284949836 4283634761 4283830844 4284489023 4283239741 4284225613 4285541970 4285998414 4283635278 4285343831 4284359238 4283898954 4285542753 4284160585 4283174730 4284753484 4286002262 4284555340 4285343053 4284687179 4285474912 4284224067 4285213011 4285278542 4284096069 4283240008 4284222795 4284884041 4284753998 4284095046 4284490314 4283897410 4283500105 4283569743 4286402954 4288045479 4288513951 4288974261 4286860684 4289628841 4287387519 4287253633 4286792317 4284817484 4287912834 4286136184 4283697209 4283960644 4284945720 4285277001 4284485176 4284683837 4284226886 4285145930 4284292172 4283503675 4285078848 4284025660 4283699508 4284681283 4284418867 4285469755 4286326088 4286984268 4288756817 4290005065 4291120725 4291581026 4290926165 4291516501 4291319645 4291124812 4291446605 4285471043 4283828287 4285076035 4288036431 4290598245 4291846759 4292176994 4292373349 4292571243 4292505962 4292897635 4292505960 4292505703 4292898924 4292439910 4292964459 4292440168 4292766807 4292834670 4292441194 4292834412 4292832360 4292837490 4292832361 4292836210 4292768862 4293095537 4292833884 4292833133 4292440410 4292700777 4292244072 4292307547 4292964446 4292439898 4292963420 4292505450 4292572267 4292571753 4292507757 4292575858 4292576886 4292509553 4292904306 4292970353 4292969341 4292576881 4292969323 4292383362 4292578425 4293103231 4293169026 4292712583 4293106053 4292387990 4292779662 4292783507 4293175176 4292719269 4293046949 4292983727 4293115033 4293706933 4293509805 4293510328 4293642427 4293774013 4294102461 4294101948 4293709503 4294037183 4294037697 4294037698 4294037687 4294302146 4289092702 4287181385 4288039505 4288760158 4288564832 4288629844 4288631384 4288629087 4288562761 4287904335 4287970896 4287575888 4287770696 4286851913 4285933386 4286194249 4285143360 4285076792 4283699016 4284552242 4284025651 4284422719 4285668682 4287444300 4290275178 4293112202 4294034316 4293376901 4293242227 4292515942 4292382826 4293768839 4294101902 4294037671 4294038660 4294100356 4293308275 4292575049 4289940305 4287572044 4287836743 4285667656 4286849096 4287179847 4287574603 4287445073 4287640652 4287048777 4287510860 4287906893 4289021295 4289748573 4288829021 4288037978 4288102987 4287448152 4287575381 4287579222 4288101460 4287186517 4289351780 4288501085 4287975280 4287515999 4287183705 4286396237 4285602368 4286261066 4285470013 4285470782 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4285207611 4286459727 4287050573 4286393418 4285866051 4286853980 4288044396 4290286991 4291209388 4291277988 4291669939 4291277226 4290421148 4289096560 4285934150 4286522694 4289348431 4291452763 4293033588 4293101163 4292580743 4293696891 4293435765 4293501817 4293107323 4293042302 4293633903 4293566855 4293371256 4293693049 4293299570 4290005340 4287772755 4291069844 4287773277 4285473614 4285080650 4283500867 4285212244 4283370556 4284225862 4284029258 4285802838 4285146186 4284158272 4284029514 4283899718 4285606223 4284025660 4283832397 4284095048 4286001242 4283763776 4285411417 4285607511 4285343832 4284686924 4285211466 4284752715 4284949071 4284359244 4284883019 4283763003 4284224839 4283238459 4283437895 4286526809 4284683339 4283962434 4285345370 4284095047 4283832395 4283631932 4285808759 4287915673 4288979637 4288054960 4287722657 4288576426 4285279838 4287387804 4289163413 4289759134 4286789212 4283173942 4283961154 4285340734 4284750146 4283828282 4284552251 4284550451 4284091706 4284159027 4284025666 4284025658 4283764276 4284746563 4284486458 4285207865 4286391114 4287771209 4288362831 4289217609 4290858582 4291449425 4291317840 4291582038 4291318868 4291125332 4291449935 4286584899 4283500354 4284550967 4287116361 4290137943 4291912030 4292504145 4291912547 4292637276 4292571483 4292307812 4292897635 4292505704 4292897388 4292832600 4292898924 4292439912 4292440167 4293160814 4292834668 4292441194 4292835695 4292768619 4292769903 4293161053 4292768620 4292769136 4293159771 4292375130 4292768111 4293224286 4292832860 4292831845 4292897629 4292505449 4292508785 4292505434 4292964190 4292505192 4292508528 4292963419 4292506458 4292575859 4292573019 4292444275 4293034348 4292379763 4292904577 4292773745 4292970367 4292970110 4292972415 4292318346 4293104007 4293042572 4292779917 4293172617 4292717971 4292784021 4293113247 4293047722 4293048740 4292983469 4293313194 4293182130 4293576119 4293641656 4294168254 4293510327 4294036669 4294037440 4294036412 4294036926 4294037697 4294037443 4294433717 4291135888 4287048785 4287973197 4288694367 4289092444 4288957273 4288630870 4288499039 4288433751 4287974237 4288430924 4287971159 4287510095 4287837261 4286331729 4285997127 4285340739 4284357445 4284945470 4283568456 4283829048 4283306565 4283696704 4286855254 4293105272 4293641109 4294165890 4293708161 4292848225 4292639838 4292975222 4294034556 4294038422 4294038444 4294037637 4294099331 4292582238 4291649353 4288099919 4287177798 4285668424 4286455880 4287309639 4287640652 4287575374 4287641423 4287112262 4287047747 4287904864 4289155177 4289090901 4288501097 4288759656 4287447635 4286985814 4287642188 4287644513 4287050316 4287449175 4288693353 4288502624 4288631668 4288827493 4287514719 4287249228 4285801032 4286197323 4284945726 4285538888 4285799491 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4287773262 4288298575 4287576911 4287771983 4287184470 4287055710 4288307317 4289496976 4291404190 4291669670 4291999918 4291210401 4290355099 4289493624 4287053142 4286457414 4289413973 4291779923 4292246119 4293037179 4293366905 4293436791 4293303690 4293043063 4293236864 4293632132 4293568882 4293765762 4293237369 4292976499 4292969579 4290137188 4289282913 4290150788 4289088631 4284753231 4284224316 4284224329 4284686922 4284226893 4284489031 4286333546 4285147469 4284421445 4283964479 4284027206 4283965511 4284817997 4284490321 4284030281 4284226379 4285475674 4284423236 4285738840 4284685899 4285082455 4285475411 4284819283 4285345884 4285277255 4283898430 4283962949 4283899210 4283897417 4284487235 4284026435 4283567928 4285409882 4284225856 4286727527 4285080403 4283962947 4283765571 4282779459 4286135137 4288706998 4288510884 4288317884 4288578228 4287058321 4287390352 4286921575 4288237147 4289295522 4283303737 4284291398 4285210437 4284224831 4284422205 4283963449 4284027200 4284025152 4284420668 4284484660 4283632706 4284226882 4284617274 4284352569 4285602628 4287903565 4287312460 4288757582 4290464335 4291188823 4290991702 4290990671 4290994525 4291450958 4291517522 4287637830 4284682040 4283763002 4285930818 4288954966 4291582806 4292570216 4291714646 4292505195 4292373349 4292373348 4292308067 4292897380 4292507243 4292505447 4292898924 4292439912 4293228126 4292767595 4292767849 4292767595 4293225306 4292704623 4293161838 4292835694 4292376940 4292835696 4292833369 4292770417 4292834674 4293224777 4292374893 4292439898 4292898909 4292440171 4292505705 4292898651 4292505452 4292442204 4292964206 4292505176 4292506732 4292574832 4292572779 4292509041 4292573275 4292444274 4293231722 4292380290 4292643446 4292773248 4292970366 4292578427 4292841846 4293038729 4293106822 4293106566 4292648590 4293569946 4292715406 4293044634 4293048744 4292981927 4293443250 4292982955 4293510827 4293575864 4293707449 4293641656 4293839550 4294102461 4293838262 4293709503 4294037954 4294036155 4294037698 4294170047 4293377452 4287245123 4287381072 4287843912 4288562525 4289420128 4289679454 4289419872 4289025382 4288563794 4288694879 4288105819 4287511383 4287053902 4286724440 4287049800 4286062152 4285407300 4284812594 4284224562 4283372365 4283239232 4283369788 4288755017 4293043572 4294100882 4294036099 4294298247 4292644965 4292050776 4293176966 4293970577 4294035858 4294037912 4294166404 4293702017 4292309831 4287048009 4286718023 4285800008 4285929541 4286391112 4286656586 4287771980 4287116364 4287180361 4286524486 4287446624 4288496971 4288893528 4290076285 4287975254 4287445587 4287052383 4287773791 4287052119 4287051085 4287642190 4287380817 4288436328 4289223797 4288765812 4288040802 4286989909 4287314013 4286395212 4285933898 4286261321 4284814907 4286195017 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4287579990 4287514457 4287578710 4287578709 4287580514 4287450207 4288768125 4289562511 4290748833 4291145641 4291801762 4291210658 4290290078 4289955449 4287580509 4286459467 4288824660 4291977046 4292247659 4293298292 4292973946 4293697409 4292912002 4293501560 4293632387 4293173373 4293371519 4293831797 4293566080 4293696377 4293164651 4290140000 4288760931 4290212486 4286793830 4286657110 4283369796 4284092739 4284028475 4285408845 4284686924 4284620618 4284357445 4284160060 4284227143 4284355651 4284554569 4284226114 4284552775 4283965512 4284488772 4284489032 4284885325 4285542241 4284224066 4285279833 4285936992 4285608033 4285211722 4285278296 4283765565 4284292172 4283962687 4283503170 4284556622 4284818248 4283173189 4285079625 4285871457 4285279829 4285013831 4284686409 4284027989 4284357704 4285148262 4285674327 4287456415 4289103009 4289963954 4288709294 4286529665 4286596471 4288249004 4288178312 4283699519 4284686924 4284420413 4284158778 4284158778 4284224320 4284226111 4284028986 4284092981 4283698236 4283894069 4284550709 4284681787 4285534780 4287049289 4287575116 4287835721 4289413963 4290858069 4291123536 4291517275 4291515739 4291059027 4291123024 4287307588 4283236408 4284749115 4286261842 4288757582 4291189334 4291847267 4291911767 4292372832 4292439146 4292439125 4292373604 4292963181 4292440154 4292899950 4292506986 4292898666 4292505703 4292439912 4293161069 4292767849 4292833386 4292374375 4293163378 4292375400 4292834156 4292834155 4293096302 4292768621 4292835696 4292832859 4292440171 4292898660 4292901745 4292439913 4292898138 4292831843 4292833389 4292505433 4292899953 4292505433 4292571242 4292570727 4292573292 4292507499 4292902001 4292508527 4292509808 4292641136 4292838252 4292970370 4292772714 4292772991 4292841601 4292971386 4293105283 4292384658 4293038215 4293435009 4292646540 4293110669 4293047198 4293047197 4293048230 4292983468 4293181357 4293050550 4293641655 4293314228 4293707193 4293839549 4293773757 4294036669 4294037183 4294036412 4294037183 4294037699 4294103984 4293974213 4288693587 4287312205 4288103773 4288565333 4289683305 4288237660 4289681249 4288892495 4289025118 4288628306 4288104531 4287511886 4287579726 4287773536 4286788172 4286461519 4286129479 4285474381 4284226629 4284288312 4283961151 4283500607 4289150034 4292843875 4293772168 4293903743 4293640063 4293171561 4292582000 4293505924 4293902717 4294035842 4294099075 4293636469 4291524183 4288886858 4285928775 4285930568 4285602882 4286522696 4286851655 4287772237 4287111753 4286654791 4287179590 4287575129 4288628557 4289220973 4289157994 4288564315 4287381332 4287051606 4287182414 4287116364 4287116364 4287641687 4287513172 4288039278 4289420908 4289291635 4288564842 4288107629 4287643475 4286658645 4286921560 4286457414 4286063431 4285277259 4286129735 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 4278190081 )\r\t\toffset: 0 @ 0! !\r\r!TestDeviceImplementor methodsFor: 'private' stamp: 'dgd 8/9/2004 21:12'!\rscaledLenna\r\t| lenna result warpBlt |\r\tlenna := self lenna.\r\tself extent = lenna extent\r\t\tifTrue: [^ lenna].\r\t\"\"\r\tresult := Form extent: self extent depth: 32.\r\twarpBlt := WarpBlt current toForm: result.\r\twarpBlt sourceForm: lenna.\r\twarpBlt cellSize: 2;\r\t\t combinationRule: Form over.\r\twarpBlt\r\t\tcopyQuad: lenna boundingBox innerCorners\r\t\ttoRect: (0 @ 0 extent: self extent).\r\t\"\"\r\t^ result ! !\r\r!TestDeviceImplementor methodsFor: 'opening / closing' stamp: 'dgd 7/28/2004 17:34'!\rclose\r\t\"private - close the receiver\"\r\topened := false! !\r\r!TestDeviceImplementor methodsFor: 'opening / closing' stamp: 'dgd 7/28/2004 17:34'!\risOpened\r\t\"answer whatever the receiver is opened\"\r\t^ opened! !\r\r!TestDeviceImplementor methodsFor: 'opening / closing' stamp: 'dgd 7/28/2004 17:34'!\ropen\r\t\"open the device represented by the receiver\"\r\topened := true! !\r\r!TestDeviceImplementor methodsFor: 'configuration' stamp: 'dgd 8/10/2004 21:18'!\rapplyParameters: aCollection \r\t\"apply the (possible changed) collection of parameters\"\r\r\taCollection\r\t\tdo: [:parameter | \r\t\t\tparameter name == #extent\r\t\t\t\tifTrue: [self extent: parameter value].\r\t\t\tparameter name == #type\r\t\t\t\tifTrue: [type := parameter value].\r\t\t\tparameter name == #isShowingTime\r\t\t\t\tifTrue: [isShowingTime := parameter value]]! !\r\r!TestDeviceImplementor methodsFor: 'configuration' stamp: 'dgd 8/10/2004 20:16'!\rparameters\r\t\"answer a collection of parameters to configure the receiver\"\r\t| extentParameter showTimeParameter typeParameter |\r\textentParameter := ParameterDescription\r\t\t\t\textentParameterNamed: #extent\r\t\t\t\tlabel: 'Frame extent' translated\r\t\t\t\tvalue: extent\r\t\t\t\thelp: 'the frame extent in pixels' translated.\r\ttypeParameter := ParameterDescription\r\t\t\t\toptionParameterNamed: #type\r\t\t\t\tlabel: 'Type' translated\r\t\t\t\tvalue: type\r\t\t\t\toptions: {{'Lenna'. #lenna}. {'Color Bars'. #colorBars}}\r\t\t\t\thelp: 'the type of the test image' translated.\r\tshowTimeParameter := ParameterDescription\r\t\t\t\tbooleanParameterNamed: #isShowingTime\r\t\t\t\tlabel: 'show time' translated\r\t\t\t\tvalue: isShowingTime\r\t\t\t\thelp: 'the test image includes the time' translated.\r\t^ {extentParameter. typeParameter. showTimeParameter}! !\r\r!TestDeviceImplementor methodsFor: 'capturing' stamp: 'dgd 8/9/2004 21:14'!\rnextWithBrightness: brightnessFloat contrast: contrastFloat \r\t\"answer the next frame from the device represented by the  \r\treceiver\"\r\r\t| result |\r\tresult := type == #lenna \r\t\t\t\tifTrue: [self scaledLenna]\r\t\t\t\tifFalse: [self colorBars].\r\t\"\"\r\tisShowingTime \r\t\tifTrue: \r\t\t\t[\"\"\r\r\t\t\tresult getCanvas \r\t\t\t\tdrawString: Time now print24\r\t\t\t\tat: 5 @ 2\r\t\t\t\tfont: Preferences windowTitleFont\r\t\t\t\tcolor: Color white].\r\t\"\"\r\t^result! !\r\r!TestDeviceImplementor methodsFor: 'initialization' stamp: 'dgd 11/3/2006 15:02'!\rinitialize\r\t\"initialize the receiver\"\r\r\tsuper initialize.\r\r\ttype := #lenna.\r\t\"type := #colorBars.\"\r\tisShowingTime := true.\r\topened := true.\r\textent := 320 @ 240.\r! !\r\r\r!V4LDeviceImplementor methodsFor: 'printing' stamp: 'dgd 8/10/2004 20:53'!\rprintOn: aStream \r\t\"append to aStream a sequence of characters that identifies  \r\tthe receiver\"\r\r\tsuper printOn: aStream.\r\t\"\"\r\taStream\r\t\tnextPutAll: ', deviceHandle=';\r\t\tnextPutAll: deviceHandle asString;\r\t\tnextPutAll: ', deviceID:';\r\t\tnextPutAll: self deviceID asString! !\r\r!V4LDeviceImplementor methodsFor: 'opening / closing' stamp: 'dgd 8/6/2004 18:52'!\rclose\r\t\"close the receiver\"\r\t| dh |\r\tdh :=  deviceHandle.\r\t\"\"\r\tdeviceHandle := nil.\r\tbuffer := nil.\r\t\"\"\r\tself deviceClose: dh! !\r\r!V4LDeviceImplementor methodsFor: 'opening / closing' stamp: 'dgd 8/6/2004 18:52'!\risOpened\r\t\"answer whatever the receiver is opened\"\r\t^  deviceHandle notNil! !\r\r!V4LDeviceImplementor methodsFor: 'opening / closing' stamp: 'dgd 8/10/2004 20:53'!\ropen\r\t\"open the device represented by the receiver\"\r\r\t| w h |\r\tdeviceHandle := self \r\t\t\t\tdeviceCreate: deviceID\r\t\t\t\twith: desiredExtent x\r\t\t\t\theight: desiredExtent y\r\t\t\t\tpalette: desiredPalette.\r\t\"\"\r\tw := self deviceGetWidth: deviceHandle.\r\th := self deviceGetHeight: deviceHandle.\r\t\"\"\r\tbuffer := Form extent: w @ h depth: 32! !\r\r!V4LDeviceImplementor methodsFor: 'primitives' stamp: 'dgd 7/28/2004 18:16'!\rdeviceClose: deviceInteger \r\t<primitive: 'primitiveDeviceClose' module:'V4LPlugin'>\r\t^ self error: 'can''t open device  ''' , deviceInteger asString , ''''! !\r\r!V4LDeviceImplementor methodsFor: 'primitives' stamp: 'dgd 8/5/2004 22:50'!\rdeviceCreate: deviceIDInteger with: widthInteger height: heightInteger palette: paletteInteger \r\t<primitive: 'primitiveDeviceCreate' module:'V4LPlugin'>\r\t^ self error: 'can''t create device id ''' , deviceIDInteger asString , ''''! !\r\r!V4LDeviceImplementor methodsFor: 'primitives' stamp: 'dgd 7/28/2004 18:17'!\rdeviceGetHeight: deviceInteger \r\t<primitive: 'primitiveDeviceGetHeight' module:'V4LPlugin'>\r\t^ self error: 'primitive failed for device  ''' , deviceInteger asString , ''''! !\r\r!V4LDeviceImplementor methodsFor: 'primitives' stamp: 'dgd 7/28/2004 18:17'!\rdeviceGetWidth: deviceInteger \r\t<primitive: 'primitiveDeviceGetWidth' module:'V4LPlugin'>\r\t^ self error: 'primitive failed for device  ''' , deviceInteger asString , ''''! !\r\r!V4LDeviceImplementor methodsFor: 'primitives' stamp: 'dgd 7/28/2004 18:16'!\rdeviceNextFrame: deviceInteger into: bits brightness: brightnessFloat contrast: contrastFloat \r\t<primitive: 'primitiveDeviceNextFrameIntoBrightnessAndContrast' module:'V4LPlugin'>\r\t^ self error: 'can''t capture frame in device  ''' , deviceInteger asString , ''''! !\r\r!V4LDeviceImplementor methodsFor: 'accessing' stamp: 'dgd 8/5/2004 22:49'!\rdeviceID\r\"answer the receiver's deviceID\"\r\t^ deviceID! !\r\r!V4LDeviceImplementor methodsFor: 'accessing' stamp: 'dgd 8/5/2004 22:49'!\rextent\r\t\"answer the receiver's extent\"\r\t^ buffer isNil\r\t\tifTrue: [320 @ 240]\r\t\tifFalse: [buffer extent]! !\r\r!V4LDeviceImplementor methodsFor: 'capturing' stamp: 'dgd 8/6/2004 18:52'!\rnextWithBrightness: brightnessFloat contrast: contrastFloat \r\t\"answer the next frame from the device represented by the  \r\treceiver\"\r\tbuffer unhibernate.\r\tself\r\t\tdeviceNextFrame:  deviceHandle\r\t\tinto: buffer bits\r\t\tbrightness: brightnessFloat\r\t\tcontrast: contrastFloat.\r\t\" \r\tself deviceNextFrame: self deviceHandle into: buffer bits.  \r\t\"\r\t^ buffer deepCopy! !\r\r!V4LDeviceImplementor methodsFor: 'initialization' stamp: 'dgd 8/5/2004 22:19'!\rinitializeDescription: aDescription \r\t\"initialiaze the receiver's description\"\r\tsuper initializeDescription: aDescription.\r\t\"\"\r\tself\r\t\tinitializeDevice: aDescription id\r\t\textent: self class defaultExtent\r\t\tpalette: self class defaultPalette\r\t\topen: true! !\r\r!V4LDeviceImplementor methodsFor: 'initialization' stamp: 'dgd 8/10/2004 20:53'!\rinitializeDevice: deviceIDInteger extent: aPoint palette: paletteInteger open: aBoolean \r\t\"initialize the receiver\"\r\r\tdeviceID := deviceIDInteger asInteger.\r\tdesiredExtent := aPoint asIntegerPoint.\r\tdesiredPalette := paletteInteger asInteger.\r\t\"\"\r\tdeviceHandle := nil.\r\tbuffer := nil.\r\t\"\"\r\taBoolean ifTrue: [self open]! !\r\r!V4LDeviceImplementor methodsFor: 'configuration' stamp: 'dgd 8/10/2004 21:26'!\rapplyParameters: aCollection \r\t\"apply the (possible changed) collection of parameters\"\r\taCollection\r\t\tdo: [:parameter | \r\t\t\tparameter name == #extent\r\t\t\t\tifTrue: [\r\t\t\t\t\tdesiredExtent := parameter value.\r\t\t\t\t\t].\r\t\t\tparameter name == #palette\r\t\t\t\tifTrue: [desiredPalette := parameter value]]! !\r\r!V4LDeviceImplementor methodsFor: 'configuration' stamp: 'dgd 8/10/2004 21:21'!\rpalettes\r\t| palettes |\r\tpalettes := OrderedCollection new.\r\tpalettes add: {'DEFAULT - The palette the camera most like' translated. 0}.\r\t\"palettes add: {'GREY - Linear greyscale' translated. 1}.\"\r\t\"palettes add: {'HI240 - High 240 cube (BT848)' translated. 2}.\"\r\t\"palettes add: {'RGB565 - 565 16 bit RGB' translated. 3}.\"\r\tpalettes add: {'RGB24 - 24bit RGB' translated. 4}.\r\tpalettes add: {'RGB32 - 32bit RGB' translated. 5}.\r\t\"palettes add: {'RGB555 - 555 15bit RGB' translated. 6}.\"\r\t\"palettes add: {'YUV422 - YUV422 capture' translated. 7}.\"\r\t\"palettes add: {'YUYV' translated. 8}.\"\r\t\"palettes add: {'UYVY' translated. 9}.\"\r\tpalettes add: {'YUV420' translated. 10}.\r\t\"palettes add: {'YUV411 - YUV411 capture' translated. 11}.\"\r\t\"palettes add: {'RAW - RAW capture (BT848)' translated. 12}.\"\r\t\"palettes add: {'YUV422P - YUV 4:2:2 Planar' translated. 13}.\"\r\t\"palettes add: {'YUV411P - YUV 4:1:1 Planar' translated. 14}.\"\r\tpalettes add: {'YUV420P - YUV 4:2:0 Planar' translated. 15}.\r\t\"palettes add: {'YUV410P - YUV 4:1:0 Planar' translated. 16}.\"\r\t^ palettes! !\r\r!V4LDeviceImplementor methodsFor: 'configuration' stamp: 'dgd 8/10/2004 21:07'!\rparameters\r\t\"answer a collection of parameters to configure the receiver\"\r\r\t| extentParameter paletteParameter |\r\textentParameter := ParameterDescription\r\t\t\t\textentParameterNamed: #extent\r\t\t\t\tlabel: 'Frame extent' translated\r\t\t\t\tvalue: desiredExtent\r\t\t\t\thelp: 'the frame extent in pixels' translated.\r\tpaletteParameter := ParameterDescription\r\t\t\t\toptionParameterNamed: #palette\r\t\t\t\tlabel: 'Palette' translated\r\t\t\t\tvalue: desiredPalette\r\t\t\t\toptions: self palettes\r\t\t\t\thelp: 'the palette of the test image' translated.\r\t^ {extentParameter. paletteParameter}! !\r\r\r!VideoDeviceImplementor class methodsFor: 'instance creation' stamp: 'dgd 7/28/2004 17:17'!\rnew\r\t\"answer a new instance of the receiver\"\r\t^ super new initialize! !\r\r!VideoDeviceImplementor class methodsFor: 'instance creation' stamp: 'dgd 7/28/2004 20:21'!\rnewFromDescription: aDescription \r\t\"answer a new instance of the receiver represented by the  \r\tgiven description\"\r\t^ self new initializeDescription: aDescription! !\r\r!VideoDeviceImplementor class methodsFor: 'testing' stamp: 'dgd 7/28/2004 17:16'!\rworkOnCurrentEnvironment\r\t\"Answer whatever ther receiver can work on the current  \r\tenvironment. \r\t \r\tUsually the platform name is used to decide\"\r\t^ self subclassResponsibility! !\r\r!VideoDeviceImplementor class methodsFor: 'enumerating' stamp: 'dgd 8/5/2004 19:26'!\rdescriptions\r\t\"answer a collection of VideoDeviceDescription of available \r\tvideo devices\"\r\r\t^self subclassResponsibility! !\r\r!VideoDeviceImplementor class methodsFor: 'private' stamp: 'dgd 7/28/2004 18:42'!\rdescriptionForId: anInteger name: aString \r\t\"private - answer a description for the given id and name\"\r\t^ VideoDeviceImplementorDescription\r\t\ttype: self\r\t\tid: anInteger\r\t\tname: aString ! !\r\r\r!TestDeviceImplementor class methodsFor: 'enumerating' stamp: 'dgd 8/5/2004 19:26'!\rdescriptions\r\t\"answer a collection of VideoDeviceDescription of available  \r\tvideo devices\"\r\r\t^{ \r\t\tself descriptionForId: 10 name: 'Test Video Device'}! !\r\r!TestDeviceImplementor class methodsFor: 'testing' stamp: 'dgd 7/28/2004 17:34'!\rworkOnCurrentEnvironment\r\t\"Answer whatever ther receiver can work on the current  \r\tenvironment.  \r\t \r\tUsually the platform name is used to decide\"\r\t\"the test video device always works\"\r\t^ true! !\r\r\r!V4LDeviceImplementor class methodsFor: 'instance creation' stamp: 'dgd 7/28/2004 18:11'!\rdefaulfDevice\r\t\"answer the default device for instances of the receiver\"\r\t^ 0! !\r\r!V4LDeviceImplementor class methodsFor: 'instance creation' stamp: 'dgd 7/28/2004 18:11'!\rdefaultExtent\r\t\"answer the default extent for instances of the receiver\"\r\t^ 320 @ 240! !\r\r!V4LDeviceImplementor class methodsFor: 'instance creation' stamp: 'dgd 7/28/2004 18:11'!\rdefaultPalette\r\t\"answer the default extent for instances of the receiver\"\r\t^ 0! !\r\r!V4LDeviceImplementor class methodsFor: 'instance creation' stamp: 'dgd 7/28/2004 18:11'!\rdevice: idInteger \r\t\"answer an instance of the receiver\"\r\t\" \r\tLinuxCamera device: '/dev/video'  \r\t\"\r\t^ self device: idInteger extent: self defaultExtent! !\r\r!V4LDeviceImplementor class methodsFor: 'instance creation' stamp: 'dgd 8/5/2004 22:19'!\rdevice: idInteger extent: aPoint \r\t\"answer an instance of the receiver\"\r\t^ self\r\t\tdevice: idInteger\r\t\textent: aPoint\r\t\tpalette: self defaultPalette! !\r\r!V4LDeviceImplementor class methodsFor: 'instance creation' stamp: 'dgd 8/5/2004 22:20'!\rdevice: idInteger extent: aPoint palette: paletteInteger \r\t\"answer an instance of the receiver\"\r\t^ self\r\t\tdevice: idInteger\r\t\textent: aPoint\r\t\tpalette: paletteInteger\r\t\topen: true! !\r\r!V4LDeviceImplementor class methodsFor: 'instance creation' stamp: 'dgd 8/5/2004 22:21'!\rdevice: idInteger extent: aPoint palette: paletteInteger open: aBoolean \r\t\"answer an instance of the receiver\"\r\t\"VIDEO_PALETTE_RGB24 = 4. --> depth=24\"\r\t\"VIDEO_PALETTE_YUV420 = 10. --> depth=12\"\r\t^ super new\r\t\tinitializeDevice: idInteger\r\t\textent: aPoint\r\t\tpalette: paletteInteger\r\t\topen: aBoolean! !\r\r!V4LDeviceImplementor class methodsFor: 'instance creation' stamp: 'dgd 8/5/2004 22:19'!\rextent: aPoint \r\t\"answer an instance of the receiver\"\r\t^ self\r\t\textent: aPoint\r\t\tpalette: self defaultPalette! !\r\r!V4LDeviceImplementor class methodsFor: 'instance creation' stamp: 'dgd 8/5/2004 22:20'!\rextent: aPoint palette: paletteInteger \r\t\"answer an instance of the receiver\"\r\t^ self\r\t\tdevice: self defaulfDevice\r\t\textent: aPoint\r\t\tpalette: paletteInteger! !\r\r!V4LDeviceImplementor class methodsFor: 'instance creation' stamp: 'dgd 8/5/2004 22:20'!\rnewOpen: aBoolean \r\t\"answer an instance of the receiver\"\r\t^ self\r\t\tdevice: self defaulfDevice\r\t\textent: self defaultExtent\r\t\tpalette: self defaultPalette\r\t\topen: aBoolean! !\r\r!V4LDeviceImplementor class methodsFor: 'enumerating' stamp: 'dgd 7/28/2004 18:10'!\rdescriptionForDeviceID: deviceID \r\t\"answer the description for the device with the given ID\"\r\t| buffer deviceName |\r\tbuffer := ByteArray new: 32.\r\tself deviceDescribe: deviceID in: buffer.\r\t\"\"\r\tdeviceName := buffer asString\r\t\t\t\treject: [:each | each asciiValue = 0].\r\t\"\"\r\t^ deviceName! !\r\r!V4LDeviceImplementor class methodsFor: 'enumerating' stamp: 'dgd 8/5/2004 19:30'!\rdescriptions\r\t\"answer a collection of VideoDeviceDescription of available  \r\tvideo devices\"\r\t\" \r\tV4LDeviceImplementor descriptions.  \r\t \r\tTime millisecondsToRun:[  \r\tV4LDeviceImplementor descriptions  \r\t]  \r\t\"\r\t| result |\r\tresult := Set new.\r\t0\r\t\tto: 9\r\t\tdo: [:deviceID | \r\t\t\t| deviceName | \r\t\t\tdeviceName := self descriptionForDeviceID: deviceID.\r\t\t\tdeviceName isEmpty\r\t\t\t\tifFalse: [result\r\t\t\t\t\t\tadd: (self descriptionForId: deviceID name: deviceName)]].\r\t^ result! !\r\r!V4LDeviceImplementor class methodsFor: 'enumerating' stamp: 'dgd 8/20/2006 12:33'!\rworkOnCurrentEnvironment\r\t\"Answer whatever ther receiver can work on the current  \r\tenvironment.  \r\t \r\tUsually the platform name is used to decide\"\r\t\t\r\t((Smalltalk respondsTo: #osVersion) and: [Smalltalk osVersion = 'linux-gnu'])\r\t\tifTrue:[^ true].\r\t\r\tSmalltalk\r\t\tat:#SmalltalkImage\r\t\tifPresent:[:klass |\r\t\t\t^ klass current osVersion = 'linux-gnu'\r\t\t].\r\t\r\t^ false.\r! !\r\r!V4LDeviceImplementor class methodsFor: 'primitives' stamp: 'dgd 11/3/2006 11:50'!\rdeviceDescribe: deviceIDInteger in: deviceName \r\t<primitive: 'primitiveDeviceDescribe' module:'V4LPlugin'>\r\t^ self error: 'can''t describe device id ''' , deviceIDInteger asString , ''''! !\r\r\r!VideoDeviceImplementorDescription methodsFor: 'comparing' stamp: 'dgd 7/26/2004 19:37'!\rhash\r\t\"Answer a SmallInteger whose value is related to the receiver's identity.\"\r\t^ (self type hash bitXor: self id hash)\r\t\tbitXor: self name hash! !\r\r!VideoDeviceImplementorDescription methodsFor: 'comparing' stamp: 'dgd 7/26/2004 19:35'!\r= aVideoDeviceDescription \r\t\"answer whatever the receiver is equivalent to  \r\taVideoDeviceDescription\"\r\t^ self class = aVideoDeviceDescription class\r\t\tand: [self type = aVideoDeviceDescription type]\r\t\tand: [self id = aVideoDeviceDescription id]\r\t\tand: [self name = aVideoDeviceDescription name] ! !\r\r!VideoDeviceImplementorDescription methodsFor: 'accessing' stamp: 'dgd 7/26/2004 19:15'!\rid\r\t\"answer the receiver's id\"\r\t^ id! !\r\r!VideoDeviceImplementorDescription methodsFor: 'accessing' stamp: 'dgd 7/26/2004 19:15'!\rname\r\t\"answer the receiver's name\"\r\t^ name! !\r\r!VideoDeviceImplementorDescription methodsFor: 'accessing' stamp: 'dgd 7/26/2004 19:16'!\rtype\r\t\"answer the receiver's type\"\r\t^ type! !\r\r!VideoDeviceImplementorDescription methodsFor: 'printing' stamp: 'dgd 7/26/2004 19:15'!\rprintOn: aStream \r\t\"Append to aStream a sequence of characters that identifies \r\tthe receiver.\"\r\tsuper printOn: aStream.\r\t\"\"\r\taStream nextPutAll: ' name:';\r\t\t nextPutAll: self name asString;\r\t\t nextPutAll: ', id:';\r\t\t nextPutAll: self id asString;\r\t\t nextPutAll: ', type:';\r\t\t nextPutAll: self type asString! !\r\r!VideoDeviceImplementorDescription methodsFor: 'initialization' stamp: 'dgd 7/26/2004 19:08'!\rinitializeType: aClass id: anInteger name: aString \r\t\"initialize the receiver\"\r\ttype := aClass.\r\tid := anInteger.\r\tname := aString ! !\r\r!VideoDeviceImplementorDescription methodsFor: 'factory' stamp: 'dgd 7/28/2004 18:44'!\rnewImplementor\r\t\"answer the implementor instance represented by the receiver\"\r\t^ type newFromDescription: self! !\r\r\r!VideoDeviceImplementorDescription class methodsFor: 'instance creation' stamp: 'dgd 7/26/2004 19:08'!\rtype: aClass id: anInteger name: aString\r\t\"answer a new instance of the receiver\"\r\t^ self new initializeType: aClass id: anInteger name: aString! !\r\r\r!VideoMorph methodsFor: 'meta-actions' stamp: 'dgd 8/6/2004 19:17'!\ropenAPropertySheet\r\tVideoPropertiesMorph basicNew targetMorph: self;\r\t\t initialize;\r\t\t openNearTarget! !\r\r!VideoMorph methodsFor: 'e-toy support' stamp: 'dgd 7/11/2004 21:36'!\rarrowDeltaFor: aGetSelector \r\t\"Answer a number indicating the default arrow delta to be  \r\tused in a numeric readout with the given get-selector. This is  \r\ta hook that subclasses of Morph can reimplement.\"\r\t(#(#getBrightness #getContrast ) includes: aGetSelector)\r\t\tifTrue: [^ 0.1].\r\t^ super arrowDeltaFor: aGetSelector! !\r\r!VideoMorph methodsFor: 'e-toy support' stamp: 'dgd 7/11/2004 21:36'!\rdefaultFloatPrecisionFor: aGetSelector \r\t\"Answer a number indicating the default float precision to be  \r\tused in a numeric readout for which the receiver provides the \r\tdata. Individual morphs can override this. Showing fractional  \r\tvalues for readouts of getCursor was in response to an explicit \r\trequest from ack\"\r\t(#(#getBrightness #getContrast  ) includes: aGetSelector)\r\t\tifTrue: [^ 0.01].\r\t\"\"\r\t^ super defaultFloatPrecisionFor: aGetSelector! !\r\r!VideoMorph methodsFor: 'e-toy support' stamp: 'dgd 8/9/2004 20:47'!\rforgetConfigurationDialog\rconfigurationDialog_nil! !\r\r!VideoMorph methodsFor: 'e-toy support' stamp: 'dgd 8/6/2004 19:56'!\rgetAutoExtent\r\t^ self autoExtent! !\r\r!VideoMorph methodsFor: 'e-toy support' stamp: 'dgd 7/3/2004 16:02'!\rgetBrightness\r\t^ videoSource isNil\r\t\tifTrue: [0]\r\t\tifFalse: [videoSource brightness]! !\r\r!VideoMorph methodsFor: 'e-toy support' stamp: 'dgd 7/3/2004 16:02'!\rgetContrast\r\t^ videoSource isNil\r\t\tifTrue: [0]\r\t\tifFalse: [videoSource contrast]! !\r\r!VideoMorph methodsFor: 'e-toy support' stamp: 'dgd 6/28/2004 11:35'!\rgetIsRunning\r\t^ videoSource notNil\r\t\tand: [videoSource isOpened]! !\r\r!VideoMorph methodsFor: 'e-toy support' stamp: 'dgd 7/1/2004 18:34'!\rgetLastFrame\r\tvideoSource isNil\r\t\tifTrue: [^ self presenter standardPlayer costume].\r\tvideoSource isOpened\r\t\tifFalse: [^ self presenter standardPlayer costume].\r\t\"\"\r\tself updateForm.\r\t^ SketchMorph withForm: form deepCopy! !\r\r!VideoMorph methodsFor: 'e-toy support' stamp: 'dgd 7/1/2004 13:23'!\rgetResolution\r\t^ resolution! !\r\r!VideoMorph methodsFor: 'e-toy support' stamp: 'dgd 6/28/2004 11:34'!\rplay\r\tvideoSource isNil\r\t\tifFalse: [videoSource openIfCorresponds]! !\r\r!VideoMorph methodsFor: 'e-toy support' stamp: 'dgd 8/6/2004 19:57'!\rsetAutoExtent: aBoolean \r\tself autoExtent: aBoolean! !\r\r!VideoMorph methodsFor: 'e-toy support' stamp: 'dgd 8/3/2004 13:35'!\rsetBrightness: amt \r\tvideoSource isNil\r\t\tifFalse:[videoSource brightness: amt]! !\r\r!VideoMorph methodsFor: 'e-toy support' stamp: 'dgd 8/3/2004 13:36'!\rsetContrast: amt \r\tvideoSource isNil\r\t\tifFalse:[videoSource contrast: amt]! !\r\r!VideoMorph methodsFor: 'e-toy support' stamp: 'dgd 7/1/2004 13:37'!\rsetResolution: aSymbol \r\t| newResolution |\r\tnewResolution := aSymbol asSymbol.\r\tresolution := (self class resolutions includes: newResolution)\r\t\t\t\tifTrue: [newResolution]\r\t\t\t\tifFalse: [self class resolutions first]! !\r\r!VideoMorph methodsFor: 'e-toy support' stamp: 'dgd 6/28/2004 11:33'!\rstop\r\tvideoSource isNil\r\t\tifFalse: [videoSource closeIfCorresponds]! !\r\r!VideoMorph methodsFor: 'submorphs-add/remove' stamp: 'dgd 8/9/2004 19:22'!\rdelete\r\t\"Remove the receiver as a submorph of its owner and make its  \r\tnew owner be nil.\"\r\r\tself videoSource: nil.\r\tsuper delete.! !\r\r!VideoMorph methodsFor: 'initialization' stamp: 'dgd 8/9/2004 11:12'!\rinitialize\r\t\"initialize the receiver\"\r\tsuper initialize.\r\tautoExtent := true.\r\t\"\"\r\tresolution := #original.\r\t\"\"\r\tself extent: 320 @ 240.\r\tself borderWidth: 0.\r\tself updateForm! !\r\r!VideoMorph methodsFor: 'initialization' stamp: 'dgd 8/6/2004 19:45'!\rinitializeOn: aVideoSource \r\t\"initialize the receiver's videoSource\"\r\tself videoSource: aVideoSource.\r\tself tryToAutoExtent! !\r\r!VideoMorph methodsFor: 'accessing' stamp: 'dgd 8/6/2004 19:47'!\rautoExtent\r\t\"answer the receiver's autoExtent\"\r\t^ autoExtent! !\r\r!VideoMorph methodsFor: 'accessing' stamp: 'dgd 8/6/2004 19:45'!\rautoExtent: aBoolean \r\t\"change the receiver's autoExtent\"\r\tautoExtent := aBoolean.\rself tryToAutoExtent! !\r\r!VideoMorph methodsFor: 'accessing' stamp: 'dgd 8/6/2004 20:22'!\rborderWidth: anInteger \r\tsuper borderWidth: anInteger.\r\tself tryToAutoExtent ! !\r\r!VideoMorph methodsFor: 'accessing' stamp: 'dgd 8/6/2004 20:02'!\rswitchAutoExtent\r\t^ self autoExtent: self autoExtent not! !\r\r!VideoMorph methodsFor: 'accessing' stamp: 'dgd 8/9/2004 19:45'!\rvideoSource: aVideoSource \r\t\"change the receiver's videoSource\"\r\tvideoSource == aVideoSource\r\t\tifTrue: [^ self].\r\t\"\"\r\tvideoSource isNil\r\t\tifFalse: [\"\"\r\t\t\tvideoSource removeActionsWithReceiver: self.\r\t\t\tvideoSource closeIfCorresponds].\r\t\"\"\r\tvideoSource := aVideoSource.\r\tvideoSource\r\t\twhen: #extent\r\t\tsend: #tryToAutoExtent\r\t\tto: self ! !\r\r!VideoMorph methodsFor: 'private' stamp: 'dgd 6/28/2004 11:52'!\rfreeAreaExtent\r\"private - answer the extent to fill (or filled) with tha image\"\r\t^ self extent - (self borderWidth * 2)! !\r\r!VideoMorph methodsFor: 'private' stamp: 'dgd 8/9/2004 19:23'!\rscaledForm\r\t\"private - answer the form, but scaled to fit the morph\"\r\t| freeAreaExtent formExtent outForm warpBlt |\r\tfreeAreaExtent := self freeAreaExtent.\r\tformExtent := form extent.\r\t(freeAreaExtent = formExtent\r\t\t\tor: [formExtent isZero])\r\t\tifTrue: [^ form].\r\t\"\"\r\r\toutForm := Form extent: freeAreaExtent depth: form depth.\r\twarpBlt := WarpBlt current toForm: outForm.\r\twarpBlt sourceForm: form.\r\twarpBlt cellSize: 2;\r\t\t combinationRule: Form over.\r\twarpBlt\r\t\tcopyQuad: form boundingBox innerCorners\r\t\ttoRect: (0 @ 0 extent: freeAreaExtent).\r\t\"\"\r\t^ outForm! !\r\r!VideoMorph methodsFor: 'private' stamp: 'dgd 8/9/2004 19:24'!\rtryToAutoExtent\r\t\"private - if corresponds, try to change the receiver's extent\"\r\r\tautoExtent\r\t\tifTrue: [self extent: 0 @ 0]! !\r\r!VideoMorph methodsFor: 'private' stamp: 'dgd 7/13/2004 20:28'!\rupdateForm\r\t\"private - update the form from the videoSource\"\r\tvideoSource isNil\r\t\tifTrue: [\"\"\r\t\t\tform := Form extent: 320 @ 240 depth: 32.\r\t\t\tform fillColor: Color blue twiceDarker]\r\t\tifFalse: [\"\"\r\t\t\tform := videoSource next].\r\t\"\"\r\tresolution == #'256 colors'\r\t\tifTrue: [form := form asFormOfDepth: 8].\r\tresolution == #'256 grays'\r\t\tifTrue: [form := form asGrayScale].\r\r\tresolution == #'4 grays'\r\t\tifTrue: [form := form asFormOfDepth: 2].\r\tresolution == #'black and white'\r\t\tifTrue: [form := form asFormOfDepth: 1]! !\r\r!VideoMorph methodsFor: 'configuration' stamp: 'dgd 8/10/2004 18:15'!\rapplyParameters: aCollection \r\"apply the (possible changed) collection of parameters\"\r\tvideoSource isNil\r\t\tifTrue: [^ self].\r\tvideoSource applyParameters: aCollection! !\r\r!VideoMorph methodsFor: 'configuration' stamp: 'dgd 8/9/2004 20:51'!\rbringUpConfigurationDialog\r\tconfigurationDialog comeToFront.\r\tconfigurationDialog topLeft: self topLeft + 5.\r\tconfigurationDialog flash.\r! !\r\r!VideoMorph methodsFor: 'configuration' stamp: 'dgd 8/9/2004 20:50'!\rconfigureVideoDevice\r\t\"creates a dialog to configure the receiver's videoSource\"\r\tvideoSource isNil\r\t\tifTrue: [^ self].\r\t\"\"\r\tconfigurationDialog isNil\r\t\tifTrue: [self createConfigurationDialog]\r\t\tifFalse: [self bringUpConfigurationDialog] ! !\r\r!VideoMorph methodsFor: 'configuration' stamp: 'dgd 8/10/2004 14:59'!\rcreateConfigurationDialog\r\t| parameters |\r\tparameters := videoSource parameters.\r\tparameters isEmpty\r\t\tifTrue: [^ self inform: 'the video device has not parameters to configure' translated].\r\t\"\"\r\tconfigurationDialog := VideoMorphConfiguration target: self parameters: parameters.\r\tself addMorphBack: configurationDialog.\r\tconfigurationDialog topLeft: self topLeft + 5! !\r\r!VideoMorph methodsFor: 'stepping and presenter' stamp: 'dgd 7/11/2004 22:12'!\rstep\r\t\"Do some periodic activity\"\r\tvideoSource isNil\r\t\tifTrue: [^ self].\r\t\r\t\"\"\r\tself updateForm.\r\tself changed! !\r\r!VideoMorph methodsFor: 'stepping and presenter' stamp: 'dgd 8/1/2004 20:22'!\rstepTime\r\t\"Answer the desired time between steps in milliseconds\"\r\t^ 100! !\r\r!VideoMorph methodsFor: 'menus' stamp: 'dgd 8/9/2004 20:41'!\raddCustomMenuItems: aMenu hand: aHandMorph \r\tsuper addCustomMenuItems: aMenu hand: aHandMorph.\r\taMenu add: 'configure video device' translated action: #configureVideoDevice! !\r\r!VideoMorph methodsFor: 'halos and balloon help' stamp: 'dgd 8/6/2004 20:06'!\rokayToResizeEasily\r^ self autoExtent not! !\r\r!VideoMorph methodsFor: 'halos and balloon help' stamp: 'dgd 8/6/2004 20:09'!\rwantsHaloHandleWithSelector: aSelector inHalo: aHaloMorph \r\taSelector == #addDupHandle:\r\t\tifTrue: [^ false].\r\t^ super wantsHaloHandleWithSelector: aSelector inHalo: aHaloMorph ! !\r\r!VideoMorph methodsFor: 'drawing' stamp: 'dgd 7/3/2004 16:13'!\rdrawOn: aCanvas \r\t\"draw the receiver on aCanvas\"\r\tsuper drawOn: aCanvas.\r\"\"\r\taCanvas paintImage: self scaledForm at: bounds origin + self borderWidth! !\r\r!VideoMorph methodsFor: 'geometry' stamp: 'dgd 8/6/2004 19:43'!\rextent: aPoint \r\t| newExtent |\r\tnewExtent := autoExtent\r\t\t\t\tifTrue: [videoSource isNil\r\t\t\t\t\t\tifTrue: [320 @ 240]\r\t\t\t\t\t\tifFalse: [videoSource extent + (self borderWidth * 2)]]\r\t\t\t\tifFalse: [aPoint].\r\t\"\"\r\tsuper extent: newExtent ! !\r\r\r!VideoMorph class methodsFor: 'parts bin' stamp: 'dgd 7/28/2004 21:02'!\rdescriptionForPartsBin\r\t^ self\r\t\tpartName: 'Video Device'\r\t\tcategories: #('Multimedia' )\r\t\tdocumentation: 'A player for video devices like cameras, video capturers, etc.'\r\r! !\r\r!VideoMorph class methodsFor: 'parts bin' stamp: 'dgd 7/28/2004 21:02'!\rnewStandAlone\r\t^ self\r\t\ton: (VideoDevice default)! !\r\r!VideoMorph class methodsFor: 'misc' stamp: 'dgd 7/13/2004 20:28'!\rresolutions\r\t\"answer a collection of valid resolutions\"\r\t^ #(#original #'256 colors' #'256 grays' #'4 grays' #'black and white' )! !\r\r!VideoMorph class methodsFor: 'instance creation' stamp: 'dgd 6/4/2003 20:49'!\ron: aVideoSource \r\t\"answer an instance of the receiver on aVideoSource\"\r\t^ super new initializeOn: aVideoSource! !\r\r!VideoMorph class methodsFor: 'scripting' stamp: 'dgd 8/20/2006 11:11'!\radditionsToViewerCategories\r\t\"Answer a list of (<categoryName> <list of category specs>) pairs that characterize the phrases this kind of morph wishes to add to various Viewer categories.\"\r\r\t^ #(\r\t(graphics\r\t\t(\r\t\t\t(slot graphic \t'The picture currently being worn' Graphic\t readOnly Player getGraphic unused unused)\r\t\t)\r\t)\r\r\t(video\r\t\t(\r\t\t\t(command play 'Start playing the movie/sound')\r\t\t\t(command stop 'Stop playing the movie/sound')\r\r\t\t\t(slot isRunning 'Whether the movie/sound is being played' Boolean readOnly\tPlayer getIsRunning unused unused)\r\r\t\t\t(slot autoExtent 'Whether the morph is in auto-extent mode' Boolean readWrite\tPlayer getAutoExtent Player setAutoExtent:)\r\r\t\t\t(slot lastFrame 'A morph with the last frame' Player readOnly\tPlayer getLastFrame unused unused)\r\r\t\t\t(slot resolution 'Video resolution' ImageResolution readWrite Player getResolution Player setResolution:)\r\r\t\t\t(slot brightness 'Video brightness' Number readWrite\tPlayer getBrightness Player setBrightness:)\r\t\t\t(slot contrast 'Video contrast' Number readWrite\tPlayer getContrast Player setContrast:)\r\r\t\t\t(command configureVideoDevice 'Open a dialog to configure the video device')\r\t\t)\r\t)\r)\r! !\r\r!VideoMorph class methodsFor: 'class initialization' stamp: 'dgd 11/3/2006 15:18'!\rinitialize\r\t\"\r\tVideoMorph initialize.\r\t\"\r\r\t| morph |\r\r\tmorph := self on: (VideoDevice implementation: TestDeviceImplementor new).\r\tmorph updateForm.\r\r\tPartsBin\r\t\tcacheThumbnail: (Thumbnail new makeThumbnailFromForm: morph imageForm)\r\t\tforSymbol: 'Video Device'.\r! !\r\r\r!VideoMorphConfiguration methodsFor: 'building' stamp: 'dgd 8/10/2004 20:13'!\rbuild\r\tself\r\t\taddMorphBack: (StringMorph contents: 'Video Device Configuration' translated font: Preferences windowTitleFont).\r\t\"\"\r\tself addMorphBack: self spacer.\r\tparameters\r\t\tdo: [:each | self addMorphBack: each  asMorph].\r\tself addMorphBack: self spacer.\r\t\"\"\r\tself addMorphBack: self buttonsRow! !\r\r!VideoMorphConfiguration methodsFor: 'building' stamp: 'dgd 8/10/2004 14:12'!\rbuttonsRow\r\t\"private - create a row with accept/cancel buttons\"\r\t| acept cancel |\r\tacept := self\r\t\t\t\tbuttonNamed: 'Accept' translated\r\t\t\t\taction: #doAccept\r\t\t\t\tcolor: Color green darker\r\t\t\t\thelp: 'keep changes made and close panel' translated.\r\tcancel := self\r\t\t\t\tbuttonNamed: 'Cancel' translated\r\t\t\t\taction: #doCancel\r\t\t\t\tcolor: Color red darker\r\t\t\t\thelp: 'cancel changes made and close panel' translated.\r\t^ (self inARow: {acept. cancel})\r\t\t! !\r\r!VideoMorphConfiguration methodsFor: 'building' stamp: 'dgd 8/10/2004 21:18'!\rdoAccept\r| changes |\rchanges := parameters\r\t\t\t\tselect: [:each | each hasChanged].\rchanges isEmpty ifFalse:[\r\ttarget applyParameters: changes].\r\tself delete! !\r\r!VideoMorphConfiguration methodsFor: 'building' stamp: 'dgd 8/9/2004 17:11'!\rdoCancel\r\r\tself delete! !\r\r!VideoMorphConfiguration methodsFor: 'initialization' stamp: 'dgd 8/10/2004 14:05'!\rinitialize\r\tsuper initialize.\r\t\"\"\r\tself\r\t\tcolor: (Color lightYellow alpha: 0.9).\r\tself borderColor: self color muchDarker.\r\tself listDirection: #topToBottom.\r\tself borderWidth: 4.\r\tself layoutInset: 5.\r\tself cellInset: 2.\r\tself hResizing: #shrinkWrap.\r\tself vResizing: #shrinkWrap.\r\tself useRoundedCorners! !\r\r!VideoMorphConfiguration methodsFor: 'initialization' stamp: 'dgd 8/9/2004 20:47'!\rinitializeTarget: aVideoMorph parameters: aCollection \r\t\"initialize the receiver's parameters\"\rtarget _ aVideoMorph.\r\tparameters := aCollection.\r\tself build! !\r\r!VideoMorphConfiguration methodsFor: 'private' stamp: 'dgd 8/10/2004 12:33'!\rbuttonNamed: aString action: aSymbol color: aColor help: helpString \r\t\"private - answer a new button\"\r\t| button |\r\tbutton := SimpleButtonMorph new.\r\tbutton target: self.\r\tbutton label: aString.\r\tbutton color: aColor.\r\tbutton borderColor: aColor muchDarker.\r\tbutton actionSelector: aSymbol.\rhelpString isEmpty ifFalse:[\r\tbutton setBalloonText: helpString].\r\t^ button! !\r\r!VideoMorphConfiguration methodsFor: 'private' stamp: 'dgd 8/9/2004 20:04'!\rinARow: aCollectionOfMorphs \r\t\"private - create a row of morphs\"\r\t| row |\r\trow := AlignmentMorph newRow.\r\trow color: Color transparent;\r\t\t vResizing: #shrinkWrap;\r\t\t layoutInset: 2;\r\t\t wrapCentering: #center;\r\t\t cellPositioning: #leftCenter;\r\t\t cellInset: 2.\r\taCollectionOfMorphs\r\t\tdo: [:each | row addMorphBack: each].\r\t^ row! !\r\r!VideoMorphConfiguration methodsFor: 'private' stamp: 'dgd 8/9/2004 20:35'!\rspacer\r\t^StringMorph contents: ' '! !\r\r!VideoMorphConfiguration methodsFor: 'submorphs-add/remove' stamp: 'dgd 8/9/2004 20:48'!\rdelete\r\ttarget forgetConfigurationDialog.\rsuper delete.! !\r\r\r!VideoMorphConfiguration class methodsFor: 'instance creation' stamp: 'dgd 8/9/2004 20:46'!\rtarget: aVideoMorph parameters: aCollection \r\t\"answer a new instance of the receiver\"\r\t^ self new initializeTarget: aVideoMorph parameters: aCollection! !\r\r\r!VideoPropertiesMorph methodsFor: 'actions' stamp: 'dgd 8/6/2004 20:37'!\rbrightness\r\t\"answer the receiver's brightness\"\r\t^ myTarget getBrightness! !\r\r!VideoPropertiesMorph methodsFor: 'actions' stamp: 'dgd 8/6/2004 20:41'!\rbrightnessTitle\r\t^ '  Brightness ({1}%)' translated format: {(self brightness * 100.0) rounded}! !\r\r!VideoPropertiesMorph methodsFor: 'actions' stamp: 'dgd 8/6/2004 20:43'!\rbrightness: aNumber\r\t\"answer the receiver's brightness\"\r\t^ myTarget setBrightness: aNumber! !\r\r!VideoPropertiesMorph methodsFor: 'actions' stamp: 'dgd 8/6/2004 20:37'!\rcontrast\r\t\"answer the receiver's contrast\"\r\t^ myTarget getContrast! !\r\r!VideoPropertiesMorph methodsFor: 'actions' stamp: 'dgd 8/6/2004 20:40'!\rcontrastTitle\r\t^ '  Contrast ({1}%)' translated format: {(self contrast * 100.0) rounded}! !\r\r!VideoPropertiesMorph methodsFor: 'actions' stamp: 'dgd 8/6/2004 20:44'!\rcontrast: aNumber \r\t\"answer the receiver's contrast\"\r\t^ myTarget setContrast: aNumber! !\r\r!VideoPropertiesMorph methodsFor: 'actions' stamp: 'dgd 8/9/2004 20:40'!\rdoConfigureVideoDevice\r\tmyTarget configureVideoDevice! !\r\r!VideoPropertiesMorph methodsFor: 'actions' stamp: 'dgd 8/6/2004 21:41'!\rresolution\r\t\"answer the receiver's resolution\"\r\t^ myTarget getResolution! !\r\r!VideoPropertiesMorph methodsFor: 'actions' stamp: 'dgd 8/6/2004 21:41'!\rresolution: aSymbol \r\t\"change the receiver's resolution\"\r\t^ myTarget setResolution: aSymbol! !\r\r!VideoPropertiesMorph methodsFor: 'building' stamp: 'dgd 8/6/2004 20:32'!\rbrightnessIcon\r\t^ Form\r\t\textent: 22 @ 22\r\t\tdepth: 16\r\t\tfromArray: #(0 0 0 0 0 65537 0 0 0 0 0 1 65536 0 0 0 65537 0 0 0 1 65536 1 65537 0 0 0 0 0 0 0 65537 65536 0 65537 0 0 65537 65537 65537 0 0 65537 0 0 0 0 65537 65537 65537 65537 65537 0 0 0 0 0 1 65537 766332664 1671258013 1324886445 65537 65536 0 0 0 0 65537 207901432 1742694367 1740530622 1673420734 1255606371 65537 0 0 0 0 65537 1392011231 1809803231 1742694334 1673420734 1604143831 65537 0 0 0 1 77229 1742695391 1809804255 1742694334 1673421758 1604148125 697106433 65536 0 0 1 85752 1742694367 1809803231 1742694334 1673420734 1604148125 1188495361 65536 0 65537 1 91037 1740531679 1742694367 1740530622 1673420734 1604148125 1467744257 65536 65537 65537 1 90013 1673422782 1740531646 1673421758 1673420701 1604148125 1467744257 65536 65537 0 1 85752 1673421758 1673421758 1673421758 1604149149 1537039261 1188429825 65536 0 0 1 76205 1606311870 1673420734 1606311837 1604148125 1537039260 629932033 65536 0 0 0 65537 1255628701 1604149149 1604149149 1537039261 1536968406 65537 0 0 0 0 65537 140724951 1537039261 1537039261 1537039260 1188431971 65537 0 0 0 0 1 65537 697124567 1467766652 1188439436 65537 65536 0 0 0 0 0 65537 65537 65537 65537 65537 0 0 0 0 65537 0 0 65537 65537 65537 0 0 65537 0 1 65537 0 0 0 0 0 0 0 65537 65536 1 65536 0 0 0 65537 0 0 0 1 65536 0 0 0 0 0 65537 0 0 0 0 0 )\r\t\toffset: 0 @ 0! !\r\r!VideoPropertiesMorph methodsFor: 'building' stamp: 'dgd 8/7/2004 20:48'!\rcontrastIcon\r\t^ Form\r\t\textent: 16 @ 16\r\t\tdepth: 16\r\t\tfromArray: #(0 0 1 65537 65537 65536 0 0 0 1 65537 65537 65537 65537 65536 0 0 65537 77229 1324901277 835659116 348520449 65537 0 1 68708 1392011231 1742694334 837825007 837756268 69271553 65536 1 86776 1742695391 1742694367 837825007 837759471 627834881 65536 65537 766339039 1809804255 1809803231 837825007 837759471 768545990 65537 65537 1324902367 1742695391 1742694367 837825007 837759471 768550251 65537 65537 1671260094 1742694367 1742694334 837825007 837759471 768552398 65537 65537 1604150206 1740531646 1740530622 837759471 837758415 768552398 65537 65537 1324901310 1673421758 1673421758 837759471 837758415 768549227 65537 65537 699228094 1606312894 1606311870 837759471 768552399 768480454 65537 1 84695 1604149149 1604149149 768552399 768552398 560660481 65536 1 67683 1255627677 1537039261 768552399 768483691 69271553 65536 0 65537 76173 1188517756 768483691 348520449 65537 0 0 1 65537 65537 65537 65537 65536 0 0 0 1 65537 65537 65536 0 0 )\r\t\toffset: 0 @ 0! !\r\r!VideoPropertiesMorph methodsFor: 'building' stamp: 'dgd 8/6/2004 20:19'!\rpaneForAutoExtentToggle\r\r\r\t^self inARow: {\r\t\tself\r\t\t\tdirectToggleButtonFor: myTarget \r\t\t\tgetter: #autoExtent setter: #switchAutoExtent\r\t\t\thelp: 'Turn auto-extent on or off' translated.\r\t\tself lockedString: ' Auto Extent' translated.\r\t}\r\r! !\r\r!VideoPropertiesMorph methodsFor: 'building' stamp: 'dgd 8/8/2004 20:04'!\rpaneForVideoParameters\r\t| resolutionCombo brightnessSlider contrastSlider configureButton button |\r\tbrightnessSlider := self\r\t\t\t\tbuildSlider: #brightnessTitle\r\t\t\t\tselector: #brightness\r\t\t\t\thelp: 'Drag in here to change the Brightness'\r\t\t\t\ticon: self brightnessIcon.\r\tcontrastSlider := self\r\t\t\t\tbuildSlider: #contrastTitle\r\t\t\t\tselector: #contrast\r\t\t\t\thelp: 'Drag in here to change the Contrast'\r\t\t\t\ticon: self contrastIcon.\r\tresolutionCombo := self\r\t\t\t\tcreateComboLabel: 'resolution'\r\t\t\t\ttarget: self\r\t\t\t\treadSelector: #resolution\r\t\t\t\twriteSelector: #resolution:\r\t\t\t\toptions: VideoMorph resolutions.\r\tconfigureButton := self\r\t\t\t\tbuttonNamed: 'Configure Video Device' translated\r\t\t\t\taction: #doConfigureVideoDevice\r\t\t\t\tcolor: color lighter\r\t\t\t\thelp: 'press here to configure the video device' translated.\r\tbutton := configureButton submorphs anyOne.\r\tbutton borderWidth: 2;\r\t\t borderRaised;\r\t\t extent: button extent + 6.\r\t\"\"\r\t^ (self inAColumn: {brightnessSlider. contrastSlider. resolutionCombo. configureButton}) cellPositioning: #topLeft;\r\t\t layoutInset: 0;\r\t\t cellInset: 2! !\r\r!VideoPropertiesMorph methodsFor: 'building' stamp: 'dgd 8/7/2004 21:39'!\rrebuild\r\tself removeAllMorphs.\r\tself addARow: {self\r\t\t\tlockedString: ('Properties for {1}' translated format: {myTarget externalName})}.\r\tself addARow: {self inAColumn: {self paneForCornerRoundingToggle. self paneForStickinessToggle. self paneForLockedToggle. self paneForAutoExtentToggle}}.\r\tself addARow: {self paneForVideoParameters}.\r\tself addARow: {self paneForBorderColorPicker. self paneForShadowColorPicker}.\r\tself addARow: {self\r\t\t\tbuttonNamed: 'Accept' translated\r\t\t\taction: #doAccept\r\t\t\tcolor: color lighter\r\t\t\thelp: 'keep changes made and close panel' translated. self\r\t\t\tbuttonNamed: 'Cancel' translated\r\t\t\taction: #doCancel\r\t\t\tcolor: color lighter\r\t\t\thelp: 'cancel changes made and close panel' translated}.\r\tthingsToRevert := Dictionary new.\r\tthingsToRevert at: #hasDropShadow: put: myTarget hasDropShadow.\r\tthingsToRevert at: #shadowColor: put: myTarget shadowColor.\r\tthingsToRevert at: #borderColor: put: myTarget borderColor.\r\tthingsToRevert at: #borderWidth: put: myTarget borderWidth.\r\tthingsToRevert at: #cornerStyle: put: myTarget cornerStyle.\r\tthingsToRevert at: #sticky: put: myTarget isSticky.\r\tthingsToRevert at: #lock: put: myTarget isLocked.\r\tthingsToRevert at: #autoExtent: put: myTarget autoExtent.\r\tthingsToRevert at: #setContrast: put: myTarget getContrast.\r\tthingsToRevert at: #setBrightness: put: myTarget getBrightness.\r\tthingsToRevert at: #setResolution: put: myTarget getResolution! !\r\r!VideoPropertiesMorph methodsFor: 'widget creation' stamp: 'dgd 8/10/2004 12:34'!\rbuildSlider: nameStringOrSymbol selector: aSymbol help: helpString icon: aForm \r\t| title slider icon titleRow col |\r\ttitle := (nameStringOrSymbol isKindOf: Symbol)\r\t\t\t\tifTrue: [UpdatingStringMorph new useStringFormat; getSelector: nameStringOrSymbol; target: self; growable: true; minimumWidth: 24; lock]\r\t\t\t\tifFalse: [self lockedString: nameStringOrSymbol].\r\t\"\"\r\tslider := SimpleSliderMorph new color: self color twiceDarker darker;\r\t\t\t\t extent: 370 @ 2;\r\t\t\t\t target: self;\r\t\t\t\t actionSelector: (aSymbol , ':') asSymbol;\r\t\t\t\t minVal: -1.0;\r\t\t\t\t maxVal: 1.0;\r\t\t\t\t yourself.\r\tslider\r\t\tadjustToValue: (self perform: aSymbol).\r\t\"\"\r\ticon := ImageMorph new image: aForm.\r\ttitleRow := self inARow: {icon. title}.\r\ttitleRow hResizing: #shrinkWrap;\r\t\t cellInset: 3.\r\tcol := self inAColumn: {titleRow. slider}.\r\t\"\"\r\tcol borderWidth: 1;\r\t\t borderColor: color darker;\r\t\t color: color lighter;\r\t\t hResizing: #shrinkWrap;\r\r\t\t layoutInset: 5;\r\t\t cellInset: 5;\r\t\t useRoundedCorners.\rhelpString isEmpty ifFalse:[col \t\t setBalloonText: helpString.].\r\t\"\"\r\t^ col! !\r\r!VideoPropertiesMorph methodsFor: 'widget creation' stamp: 'dgd 8/6/2004 22:15'!\rcreateComboLabel: aString target: targetObject readSelector: readSelectorSymbol writeSelector: writeSelectorSymbol options: optionsArray \r\t\"private - create a combo\"\r\t| button row |\r\tbutton := SimpleButtonMorph newWithLabel: '-'.\r\tself\r\t\tupdateButton: button\r\t\tfor: targetObject\r\t\treadSelector: readSelectorSymbol\r\t\toptions: optionsArray.\r\tbutton borderWidth: 1;\r\t\t cornerStyle: #square;\r\t\t borderColor: #inset;\r\t\t color: self color darker.\r\tbutton target: self;\r\t\t actionSelector: #popUpComboTarget:readSelector:writeSelector:options:button:;\r\t\t arguments: {targetObject. readSelectorSymbol. writeSelectorSymbol. optionsArray. button}.\r\t\"\"\r\trow := AlignmentMorph newRow.\r\trow borderWidth: 1;\r\t\t borderColor: color darker;\r\t\t color: color lighter;\r\t\t hResizing: #shrinkWrap;\r\t\t layoutInset: 5;\r\t\t cellInset: 5;\r\t\t useRoundedCorners.\r\trow\r\t\taddMorphBack: (StringMorph contents: aString , ': ').\r\trow addMorphBack: button.\r\t^ row! !\r\r!VideoPropertiesMorph methodsFor: 'widget creation' stamp: 'dgd 8/10/2004 12:25'!\rgetLabelFor: targetObject readSelector: readSelectorSymbol options: optionsArray \r\t| currentValue |\r\tcurrentValue := targetObject perform: readSelectorSymbol.\r\t^ (optionsArray includes: currentValue)\r\t\tifTrue: [currentValue]\r\t\tifFalse: [^ '<unknown option>' translated]! !\r\r!VideoPropertiesMorph methodsFor: 'widget creation' stamp: 'dgd 8/6/2004 21:29'!\rperformComboOption: writeSelectorSymbol argument: argumentObject readSelector: readSelectorSymbol target: targetObject button: button options: optionsArray \r\ttargetObject perform: writeSelectorSymbol with: argumentObject.\r\t\"\"\r\tself\r\t\tupdateButton: button\r\t\tfor: targetObject\r\t\treadSelector: readSelectorSymbol\r\t\toptions: optionsArray! !\r\r!VideoPropertiesMorph methodsFor: 'widget creation' stamp: 'dgd 8/6/2004 22:11'!\rpopUpComboTarget: targetObject readSelector: readSelectorSymbol writeSelector: writeSelectorSymbol options: optionsArray button: button \r\t| menu |\r\tmenu := MenuMorph new.\r\tmenu color: self color twiceLighter.\r\toptionsArray\r\t\tdo: [:option | \"\"\r\t\t\tmenu\r\t\t\t\tadd: option \r\t\t\t\ttarget: self\r\t\t\t\tselector: #performComboOption:argument:readSelector:target:button:options:\r\t\t\t\targumentList: {writeSelectorSymbol. option . readSelectorSymbol. targetObject. button. optionsArray}].\r\tmenu popUpInWorld! !\r\r!VideoPropertiesMorph methodsFor: 'widget creation' stamp: 'dgd 8/6/2004 22:14'!\rupdateButton: button for: targetObject readSelector: readSelectorSymbol options: optionsArray \r\t| label |\r\tlabel := self\r\t\t\t\tgetLabelFor: targetObject\r\t\t\t\treadSelector: readSelectorSymbol\r\t\t\t\toptions: optionsArray.\r\tbutton label: '  ',label,'  '! !\r\r!VideoPropertiesMorph methodsFor: 'initialization' stamp: 'dgd 8/6/2004 21:37'!\rinitialize\r\t\"initialize the receiver\"\r\tsuper initialize.\r\t\"\"\r\tmyTarget isNil\r\t\tifTrue: [myTarget := RectangleMorph new openInWorld].\r\tself\r\t\tcolor: (Color\r\t\t\t\tr: 0.476\r\t\t\t\tg: 0.575\r\t\t\t\tb: 0.869).\r\tself borderColor: self color darker.\r\tself rebuild ! !\r\rVideoMorph initialize!\rVideoDevice initialize!\rImageResolutionType initialize!\r\"Postscript:\"\r\rPartsBin\r\tcacheThumbnail: (Thumbnail new makeThumbnailFromForm: (VideoMorph on: (VideoDevice implementation: TestDeviceImplementor new) ) updateForm imageForm)\r\tforSymbol: 'Video Device'.\r!\r\r"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/VideoForLinuxPlugin/VideoForLinuxPlugin.c",
    "content": "/* Automatically generated from Squeak on #(7 March 2007 2:25:53 pm) */\n\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n/* Default EXPORT macro that does nothing (see comment in sq.h): */\n#define EXPORT(returnType) returnType\n\n/* Do not include the entire sq.h file but just those parts needed. */\n/*  The virtual machine proxy definition */\n#include \"sqVirtualMachine.h\"\n/* Configuration options */\n#include \"sqConfig.h\"\n/* Platform specific definitions */\n#include \"sqPlatformSpecific.h\"\n\n#define true 1\n#define false 0\n#define null 0  /* using 'null' because nil is predefined in Think C */\n#ifdef SQUEAK_BUILTIN_PLUGIN\n#undef EXPORT\n// was #undef EXPORT(returnType) but screws NorCroft cc\n#define EXPORT(returnType) static returnType\n#endif\n#include \"VideoForLinuxPlugin.h\"\n\n/* memory access macros */\n#define byteAt(i) (*((unsigned char *) (i)))\n#define byteAtput(i, val) (*((unsigned char *) (i)) = val)\n#define longAt(i) (*((int *) (i)))\n#define longAtput(i, val) (*((int *) (i)) = val)\n\n\n/*** Constants ***/\n\n/*** Function Prototypes ***/\nstatic int clipPixel(int pixel);\nstatic int copyFrominto16destSizebrightnesscontrast(unsigned char* src2, unsigned char* dest2, int destSize, double brightness, double contrast);\nstatic int copyFrominto32destSizebrightnesscontrast(unsigned char* src2, unsigned char* dest2, int destSize, double brightness, double contrast);\n#pragma export on\nEXPORT(const char*) getModuleName(void);\n#pragma export off\nstatic int halt(void);\nstatic int height(Device device);\nstatic int msg(char *s);\nstatic int pixelbrightness256contrastFactor2(int pixel, int brightness, int contrastFactor);\n#pragma export on\nEXPORT(int) primitiveDeviceClose(void);\nEXPORT(int) primitiveDeviceCreate(void);\nEXPORT(int) primitiveDeviceDescribe(void);\nEXPORT(int) primitiveDeviceGetHeight(void);\nEXPORT(int) primitiveDeviceGetWidth(void);\nEXPORT(int) primitiveDeviceNextFrameIntoBrightnessContrastFormDepth(void);\nEXPORT(int) setInterpreter(struct VirtualMachine* anInterpreter);\n#pragma export off\nstatic int storeRedgreenbluebrightness256contrastFactor2into16Bits(int red, int green, int blue, int brig256, int contInteger, unsigned char* dest);\nstatic int storeRedgreenbluebrightness256contrastFactor2into32Bits(int red, int green, int blue, int brig256, int contInteger, unsigned char* dest);\nstatic int storeRedgreenblueinto16Bits(int red, int green, int blue, unsigned char* dest);\nstatic int storeRedgreenblueinto32Bits(int red, int green, int blue, unsigned char* dest);\nstatic int width(Device device);\n/*** Variables ***/\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\nextern\n#endif\nstruct VirtualMachine* interpreterProxy;\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\t\"VideoForLinuxPlugin 7 March 2007 (i)\"\n#else\n\t\"VideoForLinuxPlugin 7 March 2007 (e)\"\n#endif\n;\n\n\nstatic int clipPixel(int pixel) {\n    int result;\n\n\tresult = ((pixel < 0) ? 0 : pixel);\n\treturn ((result < 255) ? result : 255);\n}\n\nstatic int copyFrominto16destSizebrightnesscontrast(unsigned char* src2, unsigned char* dest2, int destSize, double brightness, double contrast) {\n    unsigned char* dest;\n    unsigned char* final;\n    int brig256;\n    unsigned char* src;\n    int contInteger;\n    double cont;\n\n\tdest = dest2;\n\tsrc = src2;\n\tfinal = dest + (destSize * 2);\n\tif ((contrast == 0.0) && (brightness == 0.0)) {\n\t\twhile (dest < final) {\n\t\t\tstoreRedgreenblueinto16Bits(src[0], src[1], src[2], dest);\n\t\t\tdest += 2;\n\t\t\tsrc += 3;\n\t\t}\n\t} else {\n\t\tbrig256 = ((int) (brightness * 256) );\n\t\tcont = 1.0 + contrast;\n\t\tcontInteger = ((int) ((cont * cont) * 32767) );\n\t\twhile (dest < final) {\n\t\t\tstoreRedgreenbluebrightness256contrastFactor2into16Bits(src[0], src[1], src[2], brig256, contInteger, dest);\n\t\t\tdest += 2;\n\t\t\tsrc += 3;\n\t\t}\n\t}\n}\n\nstatic int copyFrominto32destSizebrightnesscontrast(unsigned char* src2, unsigned char* dest2, int destSize, double brightness, double contrast) {\n    unsigned char* dest;\n    unsigned char* final;\n    int brig256;\n    unsigned char* src;\n    int contInteger;\n    double cont;\n\n\tdest = dest2;\n\tsrc = src2;\n\tfinal = dest + (destSize * 4);\n\tif ((contrast == 0.0) && (brightness == 0.0)) {\n\t\twhile (dest < final) {\n\t\t\tstoreRedgreenblueinto32Bits(src[0], src[1], src[2], dest);\n\t\t\tdest += 4;\n\t\t\tsrc += 3;\n\t\t}\n\t} else {\n\t\tbrig256 = ((int) (brightness * 256) );\n\t\tcont = 1.0 + contrast;\n\t\tcontInteger = ((int) ((cont * cont) * 32767) );\n\t\twhile (dest < final) {\n\t\t\tstoreRedgreenbluebrightness256contrastFactor2into32Bits(src[0], src[1], src[2], brig256, contInteger, dest);\n\t\t\tdest += 4;\n\t\t\tsrc += 3;\n\t\t}\n\t}\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nEXPORT(const char*) getModuleName(void) {\n\treturn moduleName;\n}\n\nstatic int halt(void) {\n\t;\n}\n\nstatic int height(Device device) {\n\treturn device->vwindow.height;\n}\n\nstatic int msg(char *s) {\n\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\n}\n\nstatic int pixelbrightness256contrastFactor2(int pixel, int brightness, int contrastFactor) {\n    int result;\n\n\tresult = ((((int) ((pixel - 128) * (contrastFactor / 32767.0)) )) + 128) + brightness;\n\treturn result;\n}\n\nEXPORT(int) primitiveDeviceClose(void) {\n    Device device;\n\n\tdevice = ((Device) (interpreterProxy->stackIntegerValue(0)));\n\tcloseDevice(device);\n\tinterpreterProxy->pop(1);\n}\n\nEXPORT(int) primitiveDeviceCreate(void) {\n    int devicePointer;\n    int deviceID;\n    int palette;\n    int height;\n    int width;\n\n\tpalette = interpreterProxy->stackIntegerValue(0);\n\theight = interpreterProxy->stackIntegerValue(1);\n\twidth = interpreterProxy->stackIntegerValue(2);\n\n\t/*  */\n\n\tdeviceID = interpreterProxy->stackIntegerValue(3);\n\tdevicePointer = (int) createDevice(deviceID, width, height, palette);\n\tif (devicePointer <= 0) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tinterpreterProxy->popthenPush(5, ((devicePointer << 1) | 1));\n}\n\nEXPORT(int) primitiveDeviceDescribe(void) {\n    int deviceID;\n    int deviceNameSize;\n    int deviceName;\n    char* deviceNamePointer;\n\n\tdeviceName = interpreterProxy->stackValue(0);\n\tif (!(interpreterProxy->isBytes(deviceName))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tdeviceNamePointer = interpreterProxy->firstIndexableField(deviceName);\n\tdeviceNameSize = interpreterProxy->byteSizeOf(deviceName);\n\tif (!(deviceNameSize == 32)) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tdeviceID = interpreterProxy->stackIntegerValue(1);\n\tdescribeDevice(deviceID, deviceNamePointer);\n\tinterpreterProxy->pop(2);\n}\n\nEXPORT(int) primitiveDeviceGetHeight(void) {\n    Device device;\n    int result;\n\n\tdevice = ((Device) (interpreterProxy->stackIntegerValue(0)));\n\tresult = device->vwindow.height;\n\tinterpreterProxy->popthenPush(2, ((result << 1) | 1));\n}\n\nEXPORT(int) primitiveDeviceGetWidth(void) {\n    Device device;\n    int result;\n\n\tdevice = ((Device) (interpreterProxy->stackIntegerValue(0)));\n\tresult = device->vwindow.width;\n\tinterpreterProxy->popthenPush(2, ((result << 1) | 1));\n}\n\nEXPORT(int) primitiveDeviceNextFrameIntoBrightnessContrastFormDepth(void) {\n    int formDepth;\n    double brightness;\n    Device device;\n    unsigned char* src;\n    int bitsArrayPointer;\n    double contrast;\n\n\tformDepth = interpreterProxy->stackIntegerValue(0);\n\tcontrast = interpreterProxy->stackFloatValue(1);\n\tcontrast = ((contrast < 1.0) ? contrast : 1.0);\n\tcontrast = ((contrast < -1.0) ? -1.0 : contrast);\n\tbrightness = interpreterProxy->stackFloatValue(2);\n\tbrightness = ((brightness < 1.0) ? brightness : 1.0);\n\tbrightness = ((brightness < -1.0) ? -1.0 : brightness);\n\tbitsArrayPointer = interpreterProxy->stackValue(3);\n\tinterpreterProxy->success(!(interpreterProxy->isPointers(bitsArrayPointer)));\n\tif (interpreterProxy->failed()) {\n\t\treturn null;\n\t}\n\n\t/* Capture */\n\n\tdevice = ((Device) (interpreterProxy->stackIntegerValue(4)));\n\tif (!(captureFrameFromDevice(device))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\tif (!(convertBufferTo24(device))) {\n\t\treturn interpreterProxy->primitiveFail();\n\t}\n\n\t/* Convert */\n\n\tsrc = device->buffer24;\n\tif (formDepth == 16) {\n\t\tcopyFrominto16destSizebrightnesscontrast(src, ((unsigned char*) (interpreterProxy->firstIndexableField(bitsArrayPointer))), (width(device)) * (height(device)), brightness, contrast);\n\t} else {\n\t\tcopyFrominto32destSizebrightnesscontrast(src, ((unsigned char*) (interpreterProxy->firstIndexableField(bitsArrayPointer))), (width(device)) * (height(device)), brightness, contrast);\n\t}\n\tinterpreterProxy->pop(5);\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nEXPORT(int) setInterpreter(struct VirtualMachine* anInterpreter) {\n    int ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\n\tif (ok == 0) {\n\t\treturn 0;\n\t}\n\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\nstatic int storeRedgreenbluebrightness256contrastFactor2into16Bits(int red, int green, int blue, int brig256, int contInteger, unsigned char* dest) {\n    int sr;\n    int sg;\n    int sb;\n    int r;\n    int g;\n    int b;\n    int result;\n    int result1;\n    int result2;\n    int result3;\n    int result4;\n    int result5;\n\n\t/* begin pixel:brightness256:contrastFactor2: */\n\tresult = ((((int) ((red - 128) * (contInteger / 32767.0)) )) + 128) + brig256;\n\tr = result;\n\t/* begin clipPixel: */\n\tresult1 = ((r < 0) ? 0 : r);\n\tr = ((result1 < 255) ? result1 : 255);\n\t/* begin pixel:brightness256:contrastFactor2: */\n\tresult2 = ((((int) ((green - 128) * (contInteger / 32767.0)) )) + 128) + brig256;\n\tg = result2;\n\t/* begin clipPixel: */\n\tresult3 = ((g < 0) ? 0 : g);\n\tg = ((result3 < 255) ? result3 : 255);\n\t/* begin pixel:brightness256:contrastFactor2: */\n\tresult4 = ((((int) ((blue - 128) * (contInteger / 32767.0)) )) + 128) + brig256;\n\tb = result4;\n\t/* begin clipPixel: */\n\tresult5 = ((b < 0) ? 0 : b);\n\tb = ((result5 < 255) ? result5 : 255);\n\tsr = ((unsigned) r >> 3);\n\tsg = ((unsigned) g >> 3);\n\tsb = ((unsigned) b >> 3);\n\tdest[0] = ((((unsigned) sg << 5)) | sb);\n\tdest[1] = (((((unsigned) sr << 2)) | (((unsigned) sg >> 3))) | 128);\n}\n\nstatic int storeRedgreenbluebrightness256contrastFactor2into32Bits(int red, int green, int blue, int brig256, int contInteger, unsigned char* dest) {\n    int r;\n    int g;\n    int b;\n    int result;\n    int result1;\n    int result2;\n    int result3;\n    int result4;\n    int result5;\n\n\t/* begin pixel:brightness256:contrastFactor2: */\n\tresult3 = ((((int) ((red - 128) * (contInteger / 32767.0)) )) + 128) + brig256;\n\tr = result3;\n\t/* begin clipPixel: */\n\tresult = ((r < 0) ? 0 : r);\n\tr = ((result < 255) ? result : 255);\n\t/* begin pixel:brightness256:contrastFactor2: */\n\tresult4 = ((((int) ((green - 128) * (contInteger / 32767.0)) )) + 128) + brig256;\n\tg = result4;\n\t/* begin clipPixel: */\n\tresult1 = ((g < 0) ? 0 : g);\n\tg = ((result1 < 255) ? result1 : 255);\n\t/* begin pixel:brightness256:contrastFactor2: */\n\tresult5 = ((((int) ((blue - 128) * (contInteger / 32767.0)) )) + 128) + brig256;\n\tb = result5;\n\t/* begin clipPixel: */\n\tresult2 = ((b < 0) ? 0 : b);\n\tb = ((result2 < 255) ? result2 : 255);\n\tdest[0] = b;\n\tdest[1] = g;\n\tdest[2] = r;\n\tdest[3] = 255;\n}\n\nstatic int storeRedgreenblueinto16Bits(int red, int green, int blue, unsigned char* dest) {\n    int sr;\n    int sg;\n    int sb;\n\n\tsr = ((unsigned) red >> 3);\n\tsg = ((unsigned) green >> 3);\n\tsb = ((unsigned) blue >> 3);\n\tdest[0] = ((((unsigned) sg << 5)) | sb);\n\tdest[1] = (((((unsigned) sr << 2)) | (((unsigned) sg >> 3))) | 128);\n}\n\nstatic int storeRedgreenblueinto32Bits(int red, int green, int blue, unsigned char* dest) {\n\tdest[0] = blue;\n\tdest[1] = green;\n\tdest[2] = red;\n\tdest[3] = 255;\n}\n\nstatic int width(Device device) {\n\treturn device->vwindow.width;\n}\n\n\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\n\nvoid* VideoForLinuxPlugin_exports[][3] = {\n\t{\"VideoForLinuxPlugin\", \"primitiveDeviceClose\", (void*)primitiveDeviceClose},\n\t{\"VideoForLinuxPlugin\", \"primitiveDeviceGetHeight\", (void*)primitiveDeviceGetHeight},\n\t{\"VideoForLinuxPlugin\", \"primitiveDeviceNextFrameIntoBrightnessContrastFormDepth\", (void*)primitiveDeviceNextFrameIntoBrightnessContrastFormDepth},\n\t{\"VideoForLinuxPlugin\", \"primitiveDeviceDescribe\", (void*)primitiveDeviceDescribe},\n\t{\"VideoForLinuxPlugin\", \"primitiveDeviceCreate\", (void*)primitiveDeviceCreate},\n\t{\"VideoForLinuxPlugin\", \"getModuleName\", (void*)getModuleName},\n\t{\"VideoForLinuxPlugin\", \"primitiveDeviceGetWidth\", (void*)primitiveDeviceGetWidth},\n\t{\"VideoForLinuxPlugin\", \"setInterpreter\", (void*)setInterpreter},\n\t{NULL, NULL, NULL}\n};\n\n\n#endif /* ifdef SQ_BUILTIN_PLUGIN */\n\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/VideoForLinuxPlugin/VideoForLinuxPlugin.h",
    "content": "#ifndef _VIDEO_FOR_LINUX_PLUGIN_H\n#define _VIDEO_FOR_LINUX_PLUGIN_H\n\n#include \"videolib.h\"\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/VideoForLinuxPlugin/acinclude.m4",
    "content": "AC_MSG_CHECKING([for VideoForLinux support])\nAC_TRY_COMPILE([\n  #include <stdlib.h>\n  #include <linux/videodev.h>\n],[;],[\n  AC_MSG_RESULT(yes)\n],[\n  AC_MSG_RESULT(no)\n  AC_PLUGIN_DISABLE\n])\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/VideoForLinuxPlugin/ccvt.h",
    "content": "/*  CCVT: ColourConVerT: simple library for converting colourspaces\n    Copyright (C) 2002 Nemosoft Unv.\n\n    This program is free software; you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation; either version 2 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n\n    For questions, remarks, patches, etc. for this program, the author can be\n    reached at nemosoft@smcc.demon.nl.\n*/\n\n/* \n $Log: ccvt.h,v $\n Revision 1.10  2003/10/24 16:55:18  nemosoft\n removed erronous log messages\n\n Revision 1.9  2002/11/03 22:46:25  nemosoft\n Adding various RGB to RGB functions.\n Adding proper copyright header too.\n\n Revision 1.8  2002/04/14 01:00:27  nemosoft\n Finishing touches: adding const, adding libs for 'show'\n*/\n\n\n#ifndef CCVT_H\n#define CCVT_H\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Colour ConVerT: going from one colour space to another.\n   ** NOTE: the set of available functions is far from complete! **\n\n   Format descriptions:\n   420i = \"4:2:0 interlaced\"\n           YYYY UU YYYY UU   even lines\n           YYYY VV YYYY VV   odd lines\n           U/V data is subsampled by 2 both in horizontal \n           and vertical directions, and intermixed with the Y values.\n   \n   420p = \"4:2:0 planar\"\n           YYYYYYYY      N lines\n           UUUU          N/2 lines\n           VVVV          N/2 lines\n           U/V is again subsampled, but all the Ys, Us and Vs are placed\n           together in separate buffers. The buffers may be placed in\n           one piece of contiguous memory though, with Y buffer first,\n           followed by U, followed by V.\n\n   yuyv = \"4:2:2 interlaced\"\n           YUYV YUYV YUYV ...   N lines\n           The U/V data is subsampled by 2 in horizontal direction only.\n\n   bgr24 = 3 bytes per pixel, in the order Blue Green Red (whoever came up\n           with that idea...)\n   rgb24 = 3 bytes per pixel, in the order Red Green Blue (which is sensible)\n   rgb32 = 4 bytes per pixel, in the order Red Green Blue Alpha, with \n           Alpha really being a filler byte (0)\n   bgr32 = last but not least, 4 bytes per pixel, in the order Blue Green Red\n           Alpha, Alpha again a filler byte (0)\n */\n\n/* 4:2:0 YUV planar to RGB/BGR     */\nvoid ccvt_420p_bgr24(int width, int height, const void *src, void *dst);\nvoid ccvt_420p_rgb24(int width, int height, const void *src, void *dst);\nvoid ccvt_420p_bgr32(int width, int height, const void *src, void *dst);\nvoid ccvt_420p_rgb32(int width, int height, const void *src, void *dst);\n\n/* 4:2:2 YUYV interlaced to RGB/BGR */\nvoid ccvt_yuyv_rgb32(int width, int height, const void *src, void *dst);\nvoid ccvt_yuyv_bgr32(int width, int height, const void *src, void *dst);\n\n/* 4:2:2 YUYV interlaced to 4:2:0 YUV planar */\nvoid ccvt_yuyv_420p(int width, int height, const void *src, void *dsty, void *dstu, void *dstv);\n\n/* RGB/BGR to 4:2:0 YUV interlaced */\n\n/* RGB/BGR to 4:2:0 YUV planar     */\nvoid ccvt_rgb24_420p(int width, int height, const void *src, void *dsty, void *dstu, void *dstv);\nvoid ccvt_bgr24_420p(int width, int height, const void *src, void *dsty, void *dstu, void *dstv);\n\n/* RGB/BGR to RGB/BGR */\nvoid ccvt_bgr24_bgr32(int width, int height, const void *const src, void *const dst);\nvoid ccvt_bgr24_rgb32(int width, int height, const void *const src, void *const dst);\nvoid ccvt_bgr32_bgr24(int width, int height, const void *const src, void *const dst);\nvoid ccvt_bgr32_rgb24(int width, int height, const void *const src, void *const dst);\nvoid ccvt_rgb24_bgr32(int width, int height, const void *const src, void *const dst);\nvoid ccvt_rgb24_rgb32(int width, int height, const void *const src, void *const dst);\nvoid ccvt_rgb32_bgr24(int width, int height, const void *const src, void *const dst);\nvoid ccvt_rgb32_rgb24(int width, int height, const void *const src, void *const dst);\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/VideoForLinuxPlugin/ccvt_c2.c",
    "content": "/*\n * Convert an image from yuv colourspace to rgb \n *\n * Code by Tony Hague (C) 2001.\n */\n\n#include \"ccvt.h\"\n#include \"ccvt_types.h\"\n\n/* by suitable definition of PIXTYPE, can do yuv to rgb or bgr, with or\nwithout word alignment */\n\n/* This doesn't exactly earn a prize in a programming beauty contest. */\n\n#define WHOLE_FUNC2RGB(type) \t\t\t\\\n\tconst unsigned char *y1, *y2, *u, *v; \t\\\n\tPIXTYPE_##type *l1, *l2;\t\t\\\n\tint r, g, b, cr, cg, cb, yp, j, i;\t\\\n\t\t\t\t\t\t\\\n\tif ((width & 1) || (height & 1))\t\\\n\t\treturn;\t\t\t\t\\\n\t\t\t\t\t\t\\\n\tl1 = (PIXTYPE_##type *)dst;\t\t\\\n\tl2 = l1 + width;\t\t\t\\\n\ty1 = (unsigned char *)src;\t\t\\\n\ty2 = y1 + width;\t\t\t\\\n\tu = (unsigned char *)src + width * height;\t\t\\\n\tv = u + (width * height) / 4;\t\t\\\n\tj = height / 2;\t\t\t\t\\\n\twhile (j--) {\t\t\t\t\\\n\t\ti = width / 2;\t\t\t\\\n\t\twhile (i--) {\t\t\t\\\n\t\t\t/* Since U & V are valid for 4 pixels, repeat code 4 \t\\\n\t\t\t   times for different Y */\t\t\t\t\\\n\t\t\tcb = ((*u-128) * 454)>>8;\t\t\t\t\\\n\t\t\tcr = ((*v-128) * 359)>>8;\t\t\t\t\\\n\t\t\tcg = ((*v-128) * 183 + (*u-128) * 88)>>8;\t\t\\\n\t\t\t\t\t\t\\\n\t\t\typ = *(y1++);\t\t\\\n\t\t\tr = yp + cr; \t\t\\\n\t\t\tb = yp + cb;\t\t\\\n\t\t\tg = yp - cg;            \\\n\t\t\tSAT(r);                 \\\n\t\t\tSAT(g);                 \\\n\t\t\tSAT(b);                 \\\n\t\t\tl1->b = b;\t\t\\\n\t\t\tl1->g = g;              \\\n\t\t\tl1->r = r;              \\\n\t\t\tl1++;                   \\\n                                                \\\n\t\t\typ = *(y1++);           \\\n\t\t\tr = yp + cr;            \\\n\t\t\tb = yp + cb;            \\\n\t\t\tg = yp - cg;            \\\n\t\t\tSAT(r);                 \\\n\t\t\tSAT(g);                 \\\n\t\t\tSAT(b);                 \\\n\t\t\tl1->b = b;\t\t\\\n\t\t\tl1->g = g;\t\t\\\n\t\t\tl1->r = r;\t\t\\\n\t\t\tl1++;\t\t\t\\\n\t\t\t\t\t\t\\\n\t\t\typ = *(y2++);\t\t\\\n\t\t\tr = yp + cr; \t\t\\\n\t\t\tb = yp + cb;\t\t\\\n\t\t\tg = yp - cg;\t\t\\\n\t\t\tSAT(r);\t\t\t\\\n\t\t\tSAT(g);\t\t\t\\\n\t\t\tSAT(b);\t\t\t\\\n\t\t\tl2->b = b;\t\t\\\n\t\t\tl2->g = g;\t\t\\\n\t\t\tl2->r = r;\t\t\\\n\t\t\tl2++;\t\t\t\\\n\t\t\t\t\t\t\\\n\t\t\typ = *(y2++);\t\t\\\n\t\t\tr = yp + cr; \t\t\\\n\t\t\tb = yp + cb;\t\t\\\n\t\t\tg = yp - cg;\t\t\\\n\t\t\tSAT(r);\t\t\t\\\n\t\t\tSAT(g);\t\t\t\\\n\t\t\tSAT(b);\t\t\t\\\n\t\t\tl2->b = b;\t\t\\\n\t\t\tl2->g = g;\t\t\\\n\t\t\tl2->r = r;\t\t\\\n\t\t\tl2++;\t\t\t\\\n\t\t\t\t\t\t\\\n\t\t\tu++;\t\t\t\\\n\t\t\tv++;\t\t\t\\\n\t\t}\t\t\t\t\\\n\t\ty1 = y2;\t\t\t\\\n\t\ty2 += width;\t\t\t\\\n\t\tl1 = l2;\t\t\t\\\n\t\tl2 += width;\t\t\t\\\n\t}\n\n\n\n\nvoid ccvt_420p_bgr32(int width, int height, const void *src, void *dst)\n{\n\tWHOLE_FUNC2RGB(bgr32)\n}\n\nvoid ccvt_420p_bgr24(int width, int height, const void *src, void *dst)\n{\n\tWHOLE_FUNC2RGB(bgr24)\n}\n\nvoid ccvt_420p_rgb32(int width, int height, const void *src, void *dst)\n{\n\tWHOLE_FUNC2RGB(rgb32)\n}\n\nvoid ccvt_420p_rgb24(int width, int height, const void *src, void *dst)\n{\n\tWHOLE_FUNC2RGB(rgb24)\n}\n\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/VideoForLinuxPlugin/ccvt_misc.c",
    "content": "/*  CCVT: ColourConVerT: simple library for converting colourspaces\n    Copyright (C) 2002 Nemosoft Unv.\n\n    This program is free software; you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation; either version 2 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n\n    For questions, remarks, patches, etc. for this program, the author can be\n    reached at nemosoft@smcc.demon.nl.\n*/\n\n/* This file contains CCVT functions that aren't available in assembly yet\n   (or are not worth programming)\n */\n\n/* \n * $Log: ccvt_misc.c,v $\n * Revision 1.7  2003/01/02 04:10:19  nemosoft\n * Adding ''upside down\" conversion to rgb/bgr routines\n *\n * Revision 1.6  2002/12/03 23:29:11  nemosoft\n * *** empty log message ***\n *\n * Revision 1.5  2002/12/03 23:27:41  nemosoft\n * fixing log messages (gcc 3.2 complaining)\n *\n   Revision 1.4  2002/12/03 22:29:07  nemosoft\n   Fixing up FTP stuff and some video\n\n   Revision 1.3  2002/11/03 22:46:25  nemosoft\n   Adding various RGB to RGB functions.\n   Adding proper copyright header too.\n */\n\n\n#include \"ccvt.h\"\n#include \"ccvt_types.h\"\n\n\n/* YUYV: two Y's and one U/V */\nvoid ccvt_yuyv_rgb32(int width, int height, const void *src, void *dst)\n{\n\n\n}\n\n\nvoid ccvt_yuyv_bgr32(int width, int height, const void *src, void *dst)\n{\n   const unsigned char *s;\n   PIXTYPE_bgr32 *d;\n   int l, c;\n   int r, g, b, cr, cg, cb, y1, y2;\n   \n   l = height;\n   s = src;\n   d = dst;\n   while (l--) {\n      c = width >> 2;\n      while (c--) {\n         y1 = *s++;\n         cb = ((*s - 128) * 454) >> 8;\n         cg = (*s++ - 128) * 88;\n         y2 = *s++;\n         cr = ((*s - 128) * 359) >> 8;\n         cg = (cg + (*s++ - 128) * 183) >> 8;\n\n         r = y1 + cr;\n         b = y1 + cb;\n         g = y1 - cg;\n         SAT(r);\n         SAT(g);\n         SAT(b);               \n         d->b = b;\t\n         d->g = g;           \n         d->r = r;          \n         d++;             \n         r = y2 + cr;\n         b = y2 + cb;\n         g = y2 - cg;\n         SAT(r);\n         SAT(g);\n         SAT(b);               \n         d->b = b;\n         d->g = g;           \n         d->r = r;          \n         d++;             \n      }\n   }\n   \n}\n\nvoid ccvt_yuyv_420p(int width, int height, const void *src, void *dsty, void *dstu, void *dstv)\n{\n   int n, l, j;\n   const unsigned char *s1, *s2;\n   unsigned char *dy, *du, *dv;\n   \n   dy = (unsigned char *)dsty;\n   du = (unsigned char *)dstu;\n   dv = (unsigned char *)dstv;\n   s1 = (unsigned char *)src;\n   s2 = s1; // keep pointer\n   n = width * height;\n   for (; n > 0; n--) {\n      *dy = *s1;\n      dy++;\n      s1 += 2;\n   }\n   \n   /* Two options here: average U/V values, or skip every second row */\n   s1 = s2; // restore pointer\n   s1++; // point to U\n   for (l = 0; l < height; l += 2) {\n      s2 = s1 + width * 2; // odd line\n      for (j = 0; j < width; j += 2) {\n         *du = (*s1 + *s2) / 2;\n         du++;\n         s1 += 2;\n         s2 += 2;\n         *dv = (*s1 + *s2) / 2;\n         dv++;\n         s1 += 2;\n         s2 += 2;\n      }\n      s1 = s2;\n   }\n}\n\n/* RGB/BGR to RGB/BGR */\n\n#define RGBBGR_BODY24(TIN, TOUT) \\\nvoid ccvt_ ## TIN ## _ ## TOUT (int width, int height, const void *const src, void *const dst) \\\n{ \\\n   const PIXTYPE_ ## TIN *in = src; \\\n   PIXTYPE_ ## TOUT *out = dst; \\\n   int l, c, stride = 0; \\\n   \\\n   if (height < 0) { stride = width; height = -height; } \\\n   out += ((height - 1) * width); \\\n   stride *= 2; \\\n   for (l = 0; l < height; l++) { \\\n      for (c = 0; c < width; c++) { \\\n         out->r = in->r; \\\n         out->g = in->g; \\\n         out->b = in->b; \\\n         in++; \\\n         out++; \\\n      } \\\n      out -= stride; \\\n   } \\\n}\n\n#define RGBBGR_BODY32(TIN, TOUT) \\\nvoid ccvt_ ## TIN ## _ ## TOUT (int width, int height, const void *const src, void *const dst) \\\n{ \\\n   const PIXTYPE_ ## TIN *in = src; \\\n   PIXTYPE_ ## TOUT *out = dst; \\\n   int l, c, stride = 0; \\\n   \\\n   if (height < 0) { stride = width; height = -height; } \\\n   out += ((height - 1) * width); \\\n   stride *= 2; \\\n   for (l = 0; l < height; l++) { \\\n      for (c = 0; c < width; c++) { \\\n         out->r = in->r; \\\n         out->g = in->g; \\\n         out->b = in->b; \\\n         out->z = 0; \\\n         in++; \\\n         out++; \\\n      } \\\n      out -= stride; \\\n   } \\\n}\n\nRGBBGR_BODY32(bgr24, bgr32)\nRGBBGR_BODY32(bgr24, rgb32)\nRGBBGR_BODY32(rgb24, bgr32)\nRGBBGR_BODY32(rgb24, rgb32)\n\nRGBBGR_BODY24(bgr32, bgr24)\nRGBBGR_BODY24(bgr32, rgb24)\nRGBBGR_BODY24(rgb32, bgr24)\nRGBBGR_BODY24(rgb32, rgb24)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/VideoForLinuxPlugin/ccvt_types.h",
    "content": "/*  CCVT: ColourConVerT: simple library for converting colourspaces\n    Copyright (C) 2002 Nemosoft Unv.\n\n    This program is free software; you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation; either version 2 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n\n    For questions, remarks, patches, etc. for this program, the author can be\n    reached at nemosoft@smcc.demon.nl.\n*/\n\n#ifndef CCVT_TYPES_H\n#define CCVT_TYPES_H\n\ntypedef struct\n{\n\tunsigned char b;\n\tunsigned char g;\n\tunsigned char r;\n\tunsigned char z;\n} PIXTYPE_bgr32;\n\ntypedef struct\n{\n\tunsigned char b;\n\tunsigned char g;\n\tunsigned char r;\n} PIXTYPE_bgr24;\n\ntypedef struct\n{\n\tunsigned char r;\n\tunsigned char g;\n\tunsigned char b;\n\tunsigned char z;\n} PIXTYPE_rgb32;\n\ntypedef struct\n{\n\tunsigned char r;\n\tunsigned char g;\n\tunsigned char b;\n} PIXTYPE_rgb24;\n\n\n#define SAT(c) \\\n\tif (c & (~255)) { if (c < 0) c = 0; else c = 255; }\n\n\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/VideoForLinuxPlugin/palettes.c",
    "content": "#include \"ccvt.h\"\n\n#include <stdio.h>\n#include \"palettes.h\"\n\n\nstruct palette_info {\n   int       id;\n   char*     name;\n   float     bytesPerPixel;\n   Converter converterFunction24;\n   Converter converterFunction16;\n   int       depth;\n};\n\n\ninline void BGR24ToRGB32(int width, int height, const void *voidSrc, void *voidDst) {\n   int i;\n\n   unsigned char* dest = (unsigned char*) voidDst;\n   unsigned char* src  = (unsigned char*) voidSrc;\n\n   unsigned char red, green, blue;\n\n   const unsigned int widthTimesHeight = width * height;\n   for (i = 0; i < widthTimesHeight; i++) {\n      blue  = *src++;\n      green = *src++;\n      red   = *src++;\n\n      *dest++ = red;\n      *dest++ = green;\n      *dest++ = blue;\n      *dest++ = 255;\n   }\n}\n\ninline void RGB565ToRGB24(int width, int height, const void *voidSrc, void *voidDst) {\n   int i;\n\n   const unsigned char* src  = (unsigned char*) voidSrc;\n         unsigned char* dest = (unsigned char*) voidDst;\n\n   unsigned char b1, b2;\n\n   unsigned char red, green, blue;\n\n   const unsigned int widthTimesHeight = width * height;\n   for (i = 0; i < widthTimesHeight; i++) {\n      b2 = *src++;\n      b1 = *src++;\n\n      red   = b1 & 248 /* 11111000 */;\n      green = (b1 << 5) | (b2 >> 5);\n      blue  = b2 << 3;\n\n      *dest++ = red;\n      *dest++ = green;\n      *dest++ = blue;\n   }\n}\n\ninline void BGR24ToRGB24(int width, int height, const void *voidSrc, void *voidDst) {\n   int i;\n\n   unsigned char* dest = (unsigned char*) voidDst;\n   unsigned char* src  = (unsigned char*) voidSrc;\n\n   unsigned char red, green, blue;\n\n   const unsigned int widthTimesHeight = width * height;\n   for (i = 0; i < widthTimesHeight; i++) {\n       blue  = *src++;\n       green = *src++;\n       red   = *src++;\n\n       *dest++ = red;\n       *dest++ = green;\n       *dest++ = blue;\n   }\n}\n\ninline unsigned char clip(const int pixel) {\n    int result;\n\n    result = ((pixel < 0) ? 0 : pixel);\n    return (unsigned char) ((result < 255) ? result : 255);\n}\n\n\n// from: http://en.wikipedia.org/wiki/YUV422\ninline void YUV444toRGB888(const unsigned char y,\n\t\t\t   const unsigned char u,\n\t\t\t   const unsigned char v,\n\t\t\t   unsigned char* dest) {\n   const int C = y - 16;\n   const int D = u - 128;\n   const int E = v - 128;\n\n   dest[0] = clip(( 298 * C           + 409 * E + 128) >> 8);\n   dest[1] = clip(( 298 * C - 100 * D - 208 * E + 128) >> 8);\n   dest[2] = clip(( 298 * C + 516 * D           + 128) >> 8);\n}\n\n\n// from: http://en.wikipedia.org/wiki/YUV422\ninline void YUYVToRGB24(int width, int height, const void *voidSrc, void *voidDst) {\n   int i;\n\n   const unsigned char* src  = (unsigned char*) voidSrc;\n         unsigned char* dest = (unsigned char*) voidDst;\n\n   unsigned char u, y1, v, y2;\n\n   const unsigned int widthTimesHeight = width * height;\n   for (i = 0; i < widthTimesHeight; i += 2) {\n      y1 = *src++;\n      u  = *src++;\n      y2 = *src++;\n      v  = *src++;\n\n      YUV444toRGB888(y1, u, v, dest);\n      dest += 3;\n\n      YUV444toRGB888(y2, u, v, dest);\n      dest += 3;\n   }\n}\n\ninline void YUV422ToRGB24(int width, int height, const void *voidSrc, void *voidDst) {\n   int i;\n\n   unsigned char* dest = (unsigned char*) voidDst;\n   unsigned char* src  = (unsigned char*) voidSrc;\n\n   unsigned char u, y1, v, y2;\n\n   const unsigned int widthTimesHeight = width * height;\n   for (i = 0; i < widthTimesHeight; i += 2) {\n      u  = *src++;\n      y1 = *src++;\n      v  = *src++;\n      y2 = *src++;\n\n      YUV444toRGB888(y1, u, v, dest);\n      dest += 3;\n\n      YUV444toRGB888(y2, u, v, dest);\n      dest += 3;\n   }\n}\n\nstatic struct palette_info palette_info_list[] = {\n   { 0,  \"UNKOWN - Unkown palette\",                        0.0,                0,                  0,  0},\n   { 1,  \"GREY - Linear greyscale\",                        0.0,                0,                  0,  8},\n   { 2,  \"HI240 - High 240 cube (BT848)\",                  0.0,                0,                  0,  8},\n   { 3,  \"RGB565 - 565 16 bit RGB\",                        2.0,    RGB565ToRGB24,                  0, 16},\n   { 4,  \"RGB24 - 24bit RGB\",                              3.0,     BGR24ToRGB24,                  0, 24},\n   { 5,  \"RGB32 - 32bit RGB\",                              4.0, ccvt_bgr32_rgb24,                  0, 32},\n   { 6,  \"RGB555 - 555 15bit RGB\",                         0.0,                0,                  0, 16},\n   { 7,  \"YUV422 - YUV422 capture\",                        1.5,    YUV422ToRGB24,                  0, 16},\n   { 8,  \"YUYV\",                                           2.0,      YUYVToRGB24,                  0, 16},\n   { 9,  \"UYVY - The great thing about standards is ...\",  0.0,                0,                  0, 16},\n   {10,  \"YUV420\",                                         1.5,  ccvt_420p_rgb24,                  0, 16},\n   {11,  \"YUV411 - YUV411 capture\",                        0.0,                0,                  0, 12},\n   {12,  \"RAW - RAW capture (BT848)\",                      0.0,                0,                  0,  8},\n   {13,  \"YUV422P - YUV 4:2:2 Planar\",                     0.0,                0,                  0, 16},\n   {14,  \"YUV411P - YUV 4:1:1 Planar\",                     0.0,                0,                  0, 12},\n   {15,  \"YUV420P - YUV 4:2:0 Planar\",                     1.5,  ccvt_420p_rgb24,                  0, 12},\n   {16,  \"YUV410P - YUV 4:1:0 Planar\",                     0.0,                0,                  0,  9}\n};\n\n\ninline float paletteBytesPerPixel(int palette) {\n   float bytesPerPixel;\n   if (palette < 1 || palette > 16) {\n      fprintf(stdout, \"* Invalid palette=%d\\n\", palette);\n      return 0;\n   }\n\n   bytesPerPixel = palette_info_list[palette].bytesPerPixel;\n   if (bytesPerPixel == 0) {\n      fprintf(stdout, \"* Palette=%d not yet supported\\n\", palette);\n      return 0;\n   }\n\n   return bytesPerPixel;\n}\n\n\ninline char* paletteName(int palette) {\n   if (palette == 0) {\n      return \"*automatic*\";\n   }\n   if (palette < 0 || palette > 16) {\n      return \"*UNKOWN*\";\n   }\n   \n   return palette_info_list[palette].name;\n}\n\ninline Converter converterFunction(const int palette) {\n   Converter funct;\n\n   if (palette < 1 || palette > 16) {\n      fprintf(stdout, \"* Invalid palette=%d\\n\", palette);\n      return 0;\n   }\n\n   funct = palette_info_list[palette].converterFunction24;\n   if (funct == 0) {\n      fprintf(stdout, \"* Palette=%d not yet supported\\n\", palette);\n      return 0;\n   }\n\n   return funct;\n}\n\ninline int paletteConvert24(const int palette,\n                            const int width, const int height,\n                            const void *src, void *dst) {\n   Converter funct = converterFunction(palette);\n   if (funct == 0) {\n      return 0;\n   }\n\n   funct(width, height, src, dst);\n   return 1;\n}\n\n\ninline int paletteDepth(int palette) {\n   int depth;\n   if (palette < 1 || palette > 16) {\n      fprintf(stdout, \"* Invalid palette=%d\\n\", palette);\n      return 0;\n   }\n\n   depth = palette_info_list[palette].depth;\n   if (depth == 0) {\n      fprintf(stdout, \"* Palette=%d not yet supported\\n\", palette);\n      return 0;\n   }\n\n   return depth;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/VideoForLinuxPlugin/palettes.h",
    "content": "#ifndef _PALETTES_H\n#define _PALETTES_H\n\ntypedef void (*Converter)(int width, int height, const void *src, void *dst);\n\n\ninline char*     paletteName         (int palette);\ninline float     paletteBytesPerPixel(int palette);\ninline int       paletteDepth        (int palette);\ninline Converter converterFunction   (const int palette);\ninline int       paletteConvert24    (int palette,\n                                      int width, int height,\n                                      const void *src, void *dst);\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/VideoForLinuxPlugin/videolib.c",
    "content": "#include <errno.h>\n#include <fcntl.h>\n#include <linux/videodev.h>\n#include <signal.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <sys/file.h>\n#include <sys/ioctl.h>\n#include <sys/mman.h>\n#include <unistd.h>\n\n#include \"palettes.h\"\n#include \"videolib.h\"\n\n\n#define DEVICE_NAME_SIZE 12\nstatic const char* videoDeviceBaseName = \"/dev/video0\";\n\n/* thanks ned! */\n#define EINTR_RETRY(expression)                                                   \\\n   (__extension__                                                                 \\\n      ({                                                                          \\\n         long int __result;                                                       \\\n         do {                                                                     \\\n            sigset_t ss1, ss2;                                                    \\\n                                                                                  \\\n            sigemptyset(&ss1);          /* init empty set of signals */           \\\n            sigaddset(&ss1, SIGALRM);   /* add ALRM to set of blocked signals */  \\\n            /* can add more signals to block here */                              \\\n            sigprocmask(SIG_BLOCK, &ss1, &ss2); /* block some signals */          \\\n                                                                                  \\\n            __result = (long int) (expression);                                   \\\n                                                                                  \\\n            sigprocmask(SIG_SETMASK, &ss2, NULL); /* restore */                   \\\n         }                                                                        \\\n         while ((__result == -1L) && (errno == EINTR));                           \\\n         __result;                                                                \\\n      })                                                                          \\\n   )\n\nstatic int xioctl(int fd, int request, void *arg) {\n   int r;\n\n   do\n     r = ioctl(fd, request, arg);\n   while (-1 == r && EINTR == errno);\n\n   return r;\n}\n\nint getBrightness(Device device) {\n   return device->vpicture.brightness;\n}\n\nint getContrast(Device device) {\n   return device->vpicture.contrast;\n}\n\nint getSaturation(Device device) {\n   return device->vpicture.colour;\n}\n\nint getHue(Device device) {\n   return device->vpicture.hue;\n}\n\nvoid showDeviceInformation(Device device) {\n   fprintf(stdout, \"    - Device Information:\\n\");\n   fprintf(stdout, \"      ================================================================\\n\");\n   fprintf(stdout, \"       V4L1 Capabilities\\n\");\n   fprintf(stdout, \"       -----------------\\n\");\n   fprintf(stdout, \"       Name: %s\\n\", device->vcapability.name);\n   fprintf(stdout, \"       Type: %d\\n\", device->vcapability.type);\n\n   if (device->vcapability.type & VID_TYPE_CAPTURE) {\n      fprintf(stdout, \"             Can capture to memory\\n\");\n   }\n   if (device->vcapability.type & VID_TYPE_TUNER) {\n      fprintf(stdout, \"             Has a tuner of some form\\n\");\n   }\n   if (device->vcapability.type & VID_TYPE_TELETEXT) {\n      fprintf(stdout, \"             Has teletext capability\\n\");\n   }\n   if (device->vcapability.type & VID_TYPE_OVERLAY) {\n      fprintf(stdout, \"             Can overlay its image onto the frame buffer\\n\");\n   }\n   if (device->vcapability.type & VID_TYPE_CHROMAKEY) {\n      fprintf(stdout, \"             Overlay is Chromakeyed\\n\");\n   }\n   if (device->vcapability.type & VID_TYPE_CLIPPING) {\n      fprintf(stdout, \"             Overlay clipping is supported\\n\");\n   }\n   if (device->vcapability.type & VID_TYPE_FRAMERAM) {\n      fprintf(stdout, \"             Overlay overwrites frame buffer memory\\n\");\n   }\n   if (device->vcapability.type & VID_TYPE_SCALES) {\n      fprintf(stdout, \"             The hardware supports image scaling\\n\");\n   }\n   if (device->vcapability.type & VID_TYPE_MONOCHROME) {\n      fprintf(stdout, \"             Image capture is grey scale only\\n\");\n   }\n   if (device->vcapability.type & VID_TYPE_SUBCAPTURE) {\n      fprintf(stdout, \"             Capture can be of only part of the image\\n\");\n   }\n   if (device->vcapability.type & VID_TYPE_MPEG_ENCODER) {\n      fprintf(stdout, \"             Can encode MPEG streams\");\n   }\n   if (device->vcapability.type & VID_TYPE_MJPEG_DECODER) {\n      fprintf(stdout, \"             Can decode MJPEG streams\");\n   }\n   if (device->vcapability.type & VID_TYPE_MJPEG_ENCODER) {\n      fprintf(stdout, \"             Can encode MJPEG streams\");\n   }\n   if (device->vcapability.type & VID_TYPE_MPEG_DECODER) {\n      fprintf(stdout, \"             Can decode MPEG streams\\n\");\n   }\n\n   fprintf(stdout,\n           \"       Channels: %d  Audios: %d  MinExtent: %d@%d  MaxExtent: %d@%d\\n\",\n           device->vcapability.channels,\n           device->vcapability.audios,\n           device->vcapability.minwidth,\n           device->vcapability.minheight,\n           device->vcapability.maxwidth,\n           device->vcapability.maxheight);\n\n   if (device->isV4L2) {\n      fprintf(stdout, \"      ----------------------------------------------------------------\\n\");\n      fprintf(stdout, \"       V4L2 Capabilities\\n\");\n      fprintf(stdout, \"       -----------------\\n\");\n\n\n      printf(\"       Driver: %s\\n\",                 device->v4l2Capability.driver);\n      printf(\"       Card: %s\\n\",                   device->v4l2Capability.card);\n      printf(\"       BusInfo: %s\\n\",                device->v4l2Capability.bus_info);\n\n      fprintf(stdout, \"       Capabilities: %d\\n\", device->v4l2Capability.capabilities);\n\n      if (device->v4l2Capability.capabilities & V4L2_CAP_VIDEO_CAPTURE ) {\n        fprintf(stdout, \"             Video Capture\\n\");\n      }\n      if (device->v4l2Capability.capabilities & V4L2_CAP_VIDEO_OUTPUT ) {\n        fprintf(stdout, \"             Video Output\\n\");\n      }\n      if (device->v4l2Capability.capabilities & V4L2_CAP_VIDEO_OVERLAY ) {\n        fprintf(stdout, \"             Video Overlay\\n\");\n      }\n      if (device->v4l2Capability.capabilities & V4L2_CAP_VBI_CAPTURE ) {\n        fprintf(stdout, \"             VBI Capture\\n\");\n      }\n      if (device->v4l2Capability.capabilities & V4L2_CAP_VBI_OUTPUT ) {\n        fprintf(stdout, \"             VBI Output\\n\");\n      }\n      if (device->v4l2Capability.capabilities & V4L2_CAP_RDS_CAPTURE ) {\n        fprintf(stdout, \"             RDS Capture\\n\");\n      }\n      if (device->v4l2Capability.capabilities & V4L2_CAP_TUNER ) {\n        fprintf(stdout, \"             Tuner\\n\");\n      }\n      if (device->v4l2Capability.capabilities & V4L2_CAP_AUDIO ) {\n        fprintf(stdout, \"             Audio\\n\");\n      }\n      if (device->v4l2Capability.capabilities & V4L2_CAP_READWRITE ) {\n        fprintf(stdout, \"             Read/Write\\n\");\n      }\n      if (device->v4l2Capability.capabilities & V4L2_CAP_ASYNCIO ) {\n        fprintf(stdout, \"             Async IO\\n\");\n      }\n      if (device->v4l2Capability.capabilities & V4L2_CAP_STREAMING ) {\n        fprintf(stdout, \"             Streaming\\n\");\n      }\n   }\n\n   fprintf(stdout, \"      ================================================================\\n\");\n}\n\n\nvoid initDevice(Device device,\n                char* deviceName,\n                int width, int height,\n                int palette) {\n   device->deviceName = (char*) malloc(1024);\n   memset(device->deviceName, 0, 1024);\n   strcpy(device->deviceName, deviceName);\n\n   device->desiredWidth  = width;\n   device->desiredHeight = height;\n\n   device->desiredPalette = palette;\n\n   device->fd = 0;\n\n   device->buffer = 0;\n\n   device->memoryMap   = 0;\n   device->mmaps       = 0;\n   device->imageSize   = 0;\n   device->bufferIndex = 0;\n   device->buffer24    = 0;\n\n   device->forceRead = FALSE;\n   device->usingMMap = FALSE;\n\n   device->isV4L2    = FALSE;\n\n   device->converterFunction = 0;\n}\n\n\n\nvoid setupMMap(Device device) {\n   int i;\n   int mmapsSize;\n   device->usingMMap = FALSE;\n\n   fprintf(stdout, \"    - Seting up MMAP for device %p\\n\", device);\n\n   if (EINTR_RETRY(xioctl(device->fd, VIDIOCGMBUF, &device->memoryBuffer)) < 0) {\n      /* failed to retrieve information about capture memory space */\n      perror(\"VIDIOCGMBUF\");\n      return;\n   }\n\n   fprintf(stdout, \"        - The device has %d buffers\\n\", device->memoryBuffer.frames);\n\n   /* obtain memory mapped area */\n   device->memoryMap = (char*) mmap(0,\n                                    device->memoryBuffer.size,\n                                    PROT_READ /*| PROT_WRITE*/,\n                                    MAP_SHARED, device->fd, 0);\n   if (device->memoryMap < (char*)0) {\n      fprintf(stdout, \"        * Failed to retrieve pointer to memory mapped area\\n\");\n      return;\n   }\n\n   /* allocate structures */\n   mmapsSize = device->memoryBuffer.frames * 32 * 4 /* sizeof(struct video_mmap)*/;\n   fprintf(stdout, \"        - Allocing %d bytes\\n\", mmapsSize);\n   device->mmaps = (struct video_mmap*) malloc(mmapsSize);\n\n   if (device->mmaps == 0) {\n      fprintf(stdout, \"        * Not enough memory\\n\");\n      return;\n   }\n\n   /* fill out the fields */\n   for (i = 0; i < device->memoryBuffer.frames; i++) {\n      fprintf(stdout, \"        - Creating the mmap #%d\\n\", i);\n\n      device->mmaps[i].frame  = i;\n      device->mmaps[i].width  = device->vwindow.width;\n      device->mmaps[i].height = device->vwindow.height;\n      device->mmaps[i].format = device->vpicture.palette;\n   }\n\n   device->usingMMap = TRUE;\n}\n\n\nBOOLEAN startCaptureInBuffers(Device device) {\n   int i;\n   for (i = 0; i < (device->memoryBuffer.frames - 1); i++) {\n      fprintf(stdout, \"- Capturing buffer #%d (1st pass)\\n\", i);\n      if (EINTR_RETRY(xioctl(device->fd, VIDIOCMCAPTURE, &device->mmaps[i])) < 0) {\n      //if (xioctl(device->fd, VIDIOCMCAPTURE, &device->mmaps[i]) < 0) {\n         perror(\"VIDIOCMCAPTURE1\");\n         return FALSE;\n      }\n   }\n\n   device->bufferIndex = device->memoryBuffer.frames - 1;\n   return TRUE;\n}\n\n\nBOOLEAN switchToRead(Device device) {\n   device->usingMMap = FALSE;\n   device->buffer    = (char*) malloc(device->imageSize);\n   if (!device->buffer) {\n      fprintf(stdout, \"* Out of memory.\\n\");\n      return FALSE;\n   }\n\n   return TRUE;\n}\n\n\nBOOLEAN rawSetupPalette(Device device) {\n\n   if (device->desiredPalette && (device->vpicture.palette != device->desiredPalette)) {\n      fprintf(stdout,\n              \"    - Changing the palette from %d (%s) to %d (%s) and depth from %d to %d\\n\",\n              device->vpicture.palette,\n              paletteName(device->vpicture.palette),\n              device->desiredPalette,\n              paletteName(device->desiredPalette),\n              device->vpicture.depth,\n              paletteDepth(device->desiredPalette));\n\n      device->vpicture.palette = device->desiredPalette;\n      device->vpicture.depth   = paletteDepth(device->desiredPalette);\n\n      if (EINTR_RETRY(xioctl(device->fd, VIDIOCSPICT, &device->vpicture)) < 0) {\n         perror(\"VIDIOCSPICT\");\n         return FALSE;\n      }\n      if (paletteDepth(device->desiredPalette) != device->vpicture.depth) {\n         fprintf(stdout, \"    * The device can't change the depth\\n\");\n         return FALSE;\n      }\n      if (device->desiredPalette != device->vpicture.palette) {\n         fprintf(stdout, \"    * The device can't change the palette\\n\");\n         return FALSE;\n      }\n   }\n\n   fprintf(stdout,\n           \"    - Depth=%d Palette=%d (%s)\\n\",\n           device->vpicture.depth,\n           device->vpicture.palette,\n           paletteName(device->vpicture.palette));\n\n   return TRUE;\n}\n\n/* let's try to change the bit depth and palette */\nBOOLEAN setupPalette(Device device) {\n\n   // The OLPC webcam supports palette 3 and 8, but 8 has better\n   // quality.  Let's try to use palette 8 and let's fallback in a\n   // good way.\n   if (device->desiredPalette == 0) {\n      if (device->vpicture.palette == 3) {\n         device->desiredPalette = 8;\n         fprintf(stdout, \"    - Trying palette 8 instead of 3 (for better quality)\\n\");\n         if (rawSetupPalette(device)) {\n            fprintf(stdout, \"    - Palette 8 set!\\n\");\n            return TRUE;\n         }\n         fprintf(stdout, \"    * Palette 8 can't be set!\\n\");\n         device->desiredPalette = 0;\n      }\n   }\n\n   return rawSetupPalette(device);\n}\n\n\nBOOLEAN setupDevice(Device device) {\n   BOOLEAN change;\n   fprintf(stdout, \"- Seting up device %p\\n\", device);\n\n\n   /* check (again) for a valid device */\n   if (!(device->vcapability.type & VID_TYPE_CAPTURE)) {\n      fprintf(stdout, \"    * The device can't capture video\\n\");\n      return FALSE;\n   }\n\n   if (device->vcapability.channels == 0) {\n      fprintf(stdout, \"    * The device hasn't inputs\\n\");\n      return FALSE;\n   }\n\n\n   /* ---------------------------------------------------------------------- */\n   /* let's try to change the capture width & height */\n   change = FALSE;\n   if (EINTR_RETRY(xioctl(device->fd, VIDIOCGWIN, &device->vwindow)) < 0) {\n      perror(\"VIDIOCGWIN1\");\n      return FALSE;\n   }\n\n   if (device->desiredWidth && (device->vwindow.width != device->desiredWidth)) {\n     fprintf(stdout, \"    - Changing the width from %d to %d\\n\", device->vwindow.width, device->desiredWidth);\n\n     device->vwindow.width = device->desiredWidth;\n     change = TRUE;\n   }\n   if (device->desiredHeight && (device->vwindow.height != device->desiredHeight)) {\n     fprintf(stdout, \"    - Changing the height from %d to %d\\n\", device->vwindow.height, device->desiredHeight);\n\n     device->vwindow.height = device->desiredHeight;\n     change = TRUE;\n   }\n\n   if (change) {\n      if (EINTR_RETRY(xioctl(device->fd, VIDIOCSWIN, &device->vwindow)) < 0) {\n         perror(\"VIDIOCGWIN2\");\n         return FALSE;\n      }\n\n      if (EINTR_RETRY(xioctl(device->fd, VIDIOCGWIN, &device->vwindow)) < 0) {\n         perror(\"VIDIOCGWIN3\");\n         return FALSE;\n      }\n      if (device->desiredWidth != device->vwindow.width) {\n         fprintf(stdout,\n                 \"    * The device can't change the capture width (now=%d)\\n\",\n                 device->vwindow.width);\n         return FALSE;\n      }\n      if (device->desiredHeight != device->vwindow.height) {\n         fprintf(stdout,\n                 \"    * The device can't change the capture height (now=%d)\\n\",\n                 device->vwindow.height);\n         return FALSE;\n      }\n\n   }\n\n   fprintf(stdout,\n           \"    - Extent=%d@%d\\n\",\n           device->vwindow.width,\n           device->vwindow.height);\n\n   if (EINTR_RETRY(xioctl(device->fd, VIDIOCGPICT, &device->vpicture)) < 0) {\n      perror(\"VIDIOCGPICT\");\n      return FALSE;\n   }\n\n   fprintf(stdout,\n           \"    - Brightness=%d, Contrast=%d, Saturation=%d, Hue=%d\\n\",\n           getBrightness(device),\n           getContrast(device),\n           getSaturation(device),\n           getHue(device));\n   /* ---------------------------------------------------------------------- */\n\n\n   /* ---------------------------------------------------------------------- */\n   if (!setupPalette(device)) {\n      return FALSE;\n   }\n   /* ---------------------------------------------------------------------- */\n\n\n   device->imageSize = (int) device->vwindow.width * device->vwindow.height * (paletteBytesPerPixel(device->vpicture.palette));\n   device->buffer24  = (char*) malloc(device->vwindow.width * device->vwindow.height * 3);\n\n   if (device->forceRead) {\n      fprintf(stdout, \"    - Capturing using (forced) read()\\n\");\n      if (!switchToRead(device)) {\n         return FALSE;\n      }\n   }\n   else {\n      setupMMap(device);\n\n      if (device->usingMMap) {\n         fprintf(stdout, \"    - Capturing using mmap()\\n\");\n         if (!startCaptureInBuffers(device)) {\n            fprintf(stdout, \"    * Falling back to read()\\n\");\n            if (!switchToRead(device)) {\n               return FALSE;\n            }\n         }\n      }\n      else {\n         fprintf(stdout, \"    - Capturing using read()\\n\");\n         if (!switchToRead(device)) {\n            return FALSE;\n         }\n      }\n   }\n\n   return TRUE;\n}\n\nvoid initializeDevice(Device device) {\n   device->isV4L2 = FALSE;\n\n   //if (EINTR_RETRY(xioctl(device->fd, VIDIOC_QUERYCAP, &cap)) < 0) {\n   if (EINTR_RETRY(xioctl(device->fd, VIDIOC_QUERYCAP, &device->v4l2Capability)) < 0) {\n      perror(\"VIDIOC_QUERYCAP\");\n      fprintf(stderr, \"    - It doesn't appear to be a v4l2 device\\n\");\n   }\n   else {\n      device->isV4L2 = TRUE;\n   }\n}\n\n\nBOOLEAN openDevice(Device device) {\n   fprintf(stdout, \"- Opening device in %p\\n\", device);\n\n   /* open the video device */\n   device->fd = EINTR_RETRY(open(device->deviceName, O_RDWR));\n   if (device->fd < 0) {\n      perror(device->deviceName);\n      return FALSE;\n   }\n   fprintf(stdout, \"    - Opened %s with fd=%d\\n\", device->deviceName, device->fd);\n\n\n   /* try to lock the device */\n   if (EINTR_RETRY(flock(device->fd, LOCK_EX | LOCK_NB)) < 0) {\n      perror(\"FLOCK\");\n      fprintf(stdout, \"    * Can't lock device\\n\");\n      return FALSE;\n   }\n\n   /* check for a valid device */\n   if (EINTR_RETRY(xioctl(device->fd, VIDIOCGCAP, &device->vcapability)) < 0) {\n      perror(\"VIDIOCGCAP\");\n      return FALSE;\n   }\n\n   initializeDevice(device);\n\n   showDeviceInformation(device);\n\n   return setupDevice(device);\n}\n\n\nDevice createDevice(int deviceID,\n                    int width, int height,\n                    int palette) {\n\n   char deviceName[DEVICE_NAME_SIZE];\n\n   strcpy(deviceName, videoDeviceBaseName);\n   deviceName[DEVICE_NAME_SIZE - 2] = deviceID + '0';\n\n   Device device;\n   fprintf(stdout,\n           \"- Creating Device: id=%d, deviceName=%s, extent=%d@%d, palette=%d-%s\\n\",\n           deviceID,\n           deviceName,\n           width, height,\n           palette, paletteName(palette));\n\n   device = (Device) malloc(SIZE_OF_DEVICE);\n   if (device == 0) {\n      fprintf(stdout, \"    * Not enough memory\\n\");\n      return 0;\n   }\n   fprintf(stdout, \"    - Structure created in %p\\n\", device);\n\n   initDevice(device,\n              deviceName,\n              width, height,\n              palette);\n\n   if (openDevice(device)) {\n      return device;\n   }\n   else {\n      closeDevice(device);\n      return 0;\n   }\n}\n\n\nBOOLEAN nextFrameMMap(Device device) {\n  //fprintf(stdout, \"- capturing buffer #%d\\n\", device->bufferIndex);\n\n   /* send a request to begin capturing to the currently indexed buffer */\n   if (EINTR_RETRY(xioctl(device->fd, VIDIOCMCAPTURE, &device->mmaps[device->bufferIndex])) < 0) {\n   //if (xioctl(device->fd, VIDIOCMCAPTURE, &device->mmaps[device->bufferIndex]) < 0) {\n      perror(\"VIDIOCMCAPTURE2\");\n      return FALSE;\n   }\n\n   /* move bufferIndex to the next frame */\n   device->bufferIndex++;\n   /* if bufferIndex is indexing beyond the last buffer set it to the first buffer */\n   device->bufferIndex %= device->memoryBuffer.frames;\n\n   //fprintf(stdout, \"- syncing buffer #%d\\n\", device->bufferIndex);\n\n   /* wait for the currently indexed frame to complete capture */\n   if (EINTR_RETRY(xioctl(device->fd, VIDIOCSYNC, &(device->mmaps[device->bufferIndex]))) < 0) {\n   //if (xioctl(device->fd, VIDIOCSYNC, &(device->mmaps[device->bufferIndex])) < 0) {\n      /* sync request failed */\n      perror(\"VIDIOCSYNC\");\n      return FALSE;\n   }\n\n   //fprintf(stdout, \"- processing buffer #%d\\n\", device->bufferIndex);\n   /* return the address of the frame data for the current buffer index */\n   device->buffer = device->memoryMap + device->memoryBuffer.offsets[device->bufferIndex];\n\n   return TRUE;\n}\n\n\n\nvoid closeDevice(Device device) {\n   fprintf(stdout, \"- Closing device in %p\\n\", device);\n\n   if (device->deviceName) {\n      free(device->deviceName);\n      device->deviceName = 0;\n   }\n  \n   if (device->buffer24) {\n      free(device->buffer24);\n      device->buffer24 = 0;\n   }\n\n   if (device->usingMMap) {\n      if (device->mmaps) {\n         free(device->mmaps);\n         device->mmaps = 0;\n\n         munmap(device->memoryMap, device->memoryBuffer.size);\n      }\n   }\n   else {\n      if (device->buffer) {\n         free(device->buffer);\n      }\n   }\n\n   if (device->fd > 0) {\n      if (EINTR_RETRY(flock(device->fd, LOCK_UN)) < 0) {\n         perror(\"FLOCK\");\n         fprintf(stdout, \"    * Can't unlock device\\n\");\n      }\n\n      close(device->fd);\n      device->fd = 0;\n   }\n\n   fprintf(stdout, \"- Destroying device in %p\\n\", device);\n   free(device);\n}\n\nBOOLEAN convertBufferTo24(Device device) {\n   if (device->converterFunction == 0) {\n      device->converterFunction = converterFunction(device->vpicture.palette);\n      if (device->converterFunction == 0) {\n         return FALSE;\n      }\n   }\n\n   device->converterFunction(device->vwindow.width,\n                             device->vwindow.height,\n                             device->buffer,\n                             device->buffer24);\n\n   return TRUE;\n}\n\nBOOLEAN captureFrameFromDevice(Device device) {\n   /* fprintf(stdout, \"- Capturing from device in %p\\n\", device); */\n\n   if (device->usingMMap) {\n      if (!nextFrameMMap(device)) {\n         return FALSE;\n      }\n   }\n   else {\n      /* fprintf(stdout, \"- reading...\\n\"); */\n\n      if (read(device->fd, device->buffer, device->imageSize) != device->imageSize) {\n         fprintf(stdout, \"\\nThe device didn't answered the correct bytes.\\n\");\n         return FALSE;\n      }\n   }\n\n   return TRUE;\n}\n\nBOOLEAN nextFrameFromDevice(Device device) {\n   if (!captureFrameFromDevice(device)) {\n      return FALSE;\n   }\n\n   return convertBufferTo24(device);\n   //return TRUE;\n}\n\n\nvoid savePPM(char* fileName, Device device) {\n   char *src = device->buffer24;\n\n   char red, green, blue;\n   unsigned int i;\n\n   FILE* ppmFile = fopen(fileName, \"w+\");\n\n   fprintf(ppmFile, \"P6\\n%d %d 255\\n\", device->vwindow.width, device->vwindow.height);\n\n   for (i = 0; i < device->vwindow.width * device->vwindow.height; i++) {\n      red   = *src++;\n      green = *src++;\n      blue  = *src++;\n\n      fputc(red,   ppmFile);\n      fputc(green, ppmFile);\n      fputc(blue,  ppmFile);\n   }\n\n   fclose(ppmFile);\n}\n\nint getPalette(Device device) {\n   return device->vpicture.palette;\n}\n\n\n/*\nvoid setBrightness(Device device, int brightness) {\n   device->vpicture.brightness = brightness;\n}\n\nvoid setContrast(Device device, int contrast) {\n   device->vpicture.contrast = contrast;\n}\n\nvoid setSaturation(Device device, int saturation) {\n   device->vpicture.colour = saturation;\n}\n\nvoid setHue(Device device, int hue) {\n   device->vpicture.hue = hue;\n}\n*/\n\nBOOLEAN updatePicture(Device device) {\n   if (EINTR_RETRY(xioctl(device->fd, VIDIOCSPICT, &device->vpicture)) < 0) {\n      perror(\"VIDIOCSPICT\");\n      return FALSE;\n   }\n\n   return TRUE;\n}\n\n\nvoid describeDevice(int deviceID, char* deviceName) {\n   int fd;\n   char device[DEVICE_NAME_SIZE];\n\n   memset(deviceName, 0, 32);\n   \n   strcpy(device, videoDeviceBaseName);\n   device[DEVICE_NAME_SIZE - 2] = deviceID + '0';\n\n   //fprintf(stdout, \"** trying to open: %d...\\n\", deviceID);\n   fd = EINTR_RETRY(open(device, O_RDWR));\n   if (fd < 0) {\n      return;\n   }\n\n   //fprintf(stdout, \"** trying to lock: %d...\\n\", deviceID);\n   /* try to lock the device */\n   if (EINTR_RETRY(flock(fd, LOCK_EX | LOCK_NB)) < 0) {\n      close(fd);\n      return;\n   }\n\n   struct video_capability vcapability;\n\n   //fprintf(stdout, \"** trying to see if it's a video device: %d...\\n\", deviceID);\n   if (EINTR_RETRY(xioctl(fd, VIDIOCGCAP, &vcapability)) < 0) {\n      close(fd);\n      return;\n   }\n\n   memcpy(deviceName, vcapability.name, 32);\n   fprintf(stdout, \"- Detected Device: id=%d name=%s\\n\", deviceID, deviceName);\n\n   close(fd);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/VideoForLinuxPlugin/videolib.h",
    "content": "#ifndef _VIDEOLIB_H\n#define _VIDEOLIB_H\n\n#include \"palettes.h\"\n\n#include <linux/videodev.h>\n\ntypedef int BOOLEAN;\n#define TRUE  1\n#define FALSE 0\n\nstruct dev {\n   char* deviceName;\n\n   unsigned int desiredWidth;\n   unsigned int desiredHeight;\n\n   char desiredPalette;\n\n   int fd;\n\n   struct video_capability vcapability;\n   struct video_window     vwindow;\n   struct video_picture    vpicture;\n\n   char *buffer;\n\n   struct video_mbuf  memoryBuffer;\n   char*              memoryMap;\n   struct video_mmap* mmaps;\n   int  imageSize;\n   int  bufferIndex;\n\n   char *buffer24;\n\n   BOOLEAN forceRead;\n   BOOLEAN usingMMap;\n\n   // Bitmap conversor\n   Converter converterFunction;\n\n   // V4L2 stuff\n   BOOLEAN isV4L2;\n   struct v4l2_capability v4l2Capability;\n};\n\ntypedef struct dev* Device;\n\n#define SIZE_OF_DEVICE     sizeof(struct dev)\n\nvoid    describeDevice(int deviceID, char* deviceName);\n\nDevice  createDevice(int deviceID,\n\t\t     int width, int height,\n\t\t     int palette);\n\nBOOLEAN convertBufferTo24     (Device device);\nBOOLEAN captureFrameFromDevice(Device device);\nBOOLEAN nextFrameFromDevice   (Device device);\n\nint getPalette(Device device);\n\n/*\nint     getBrightness(Device device);\nint     getContrast  (Device device);\nint     getSaturation(Device device);\nint     getHue       (Device device);\n\nvoid    setBrightness(Device device, int brightness);\nvoid    setContrast  (Device device, int contrast);\nvoid    setSaturation(Device device, int saturation);\nvoid    setHue       (Device device, int hue);\n*/\nBOOLEAN updatePicture(Device device);\n\nvoid    closeDevice(Device device);\n\n\nvoid savePPM(char* fileName, Device device);\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/XDisplayControlPlugin/Makefile.inc",
    "content": "XCPPFLAGS= -I$(topdir)/platforms/Cross/plugins/FilePlugin -I$(topdir)/platforms/Cross/plugins/SocketPlugin\nXINCLUDES= $(X_INCLUDES)\nXLDFLAGS= $(X_LIBS)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/XDisplayControlPlugin/acinclude.m4",
    "content": "# Require X11\n\nAC_CHECK_LIB(X11,XOpenDisplay,\n  [AC_PLUGIN_USE_LIB(X11)],\n  [AC_PLUGIN_DISABLE])\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/XDisplayControlPlugin/build.cmake",
    "content": "EXPECT_UNDEFINED_SYMBOLS ()\n"
  },
  {
    "path": "vm/src/from_squeak/unix/plugins/XDisplayControlPlugin/config.cmake",
    "content": "IF (NOT X11_FOUND)\n    PLUGIN_DISABLE ()\nELSE ()\n    PLUGIN_INCLUDE_DIRECTORIES (${cross}/plugins/FilePlugin ${cross}/plugins/SocketPlugin)\nENDIF ()\n"
  },
  {
    "path": "vm/src/from_squeak/unix/src/plugins/AioPlugin/AioPlugin.c",
    "content": "/* Automatically generated from Squeak on 23 January 2011 3:56:03 pm \r   by VMMaker 4.4.7\r */\r\r#include <math.h>\r#include <stdio.h>\r#include <stdlib.h>\r#include <string.h>\r#include <time.h>\r\r/* Default EXPORT macro that does nothing (see comment in sq.h): */\r#define EXPORT(returnType) returnType\r\r/* Do not include the entire sq.h file but just those parts needed. */\r/*  The virtual machine proxy definition */\r#include \"sqVirtualMachine.h\"\r/* Configuration options */\r#include \"sqConfig.h\"\r/* Platform specific definitions */\r#include \"sqPlatformSpecific.h\"\r\r#define true 1\r#define false 0\r#define null 0  /* using 'null' because nil is predefined in Think C */\r#ifdef SQUEAK_BUILTIN_PLUGIN\r#undef EXPORT\r// was #undef EXPORT(returnType) but screws NorCroft cc\r#define EXPORT(returnType) static returnType\r#endif\r#include <unistd.h>\r#define FILEHANDLETYPE FILE *  /* the type of low level stream to be used in a struct SQFile */\r#include \"FilePlugin.h\"\r#include \"SocketPlugin.h\"\r#include \"config.h\"\r#ifndef SQAIO_H\r# define SQAIO_H \"aio.h\"  /* aio.h has been renamed to sqaio.h */\r#endif\r#define SESSIONIDENTIFIERTYPE int\r#include SQAIO_H\r\r#include \"sqMemoryAccess.h\"\r\r\r/*** Constants ***/\r\r/*** Function Prototypes ***/\rstatic void aioForwardwithDataandFlags(int fd, void *data, int flags);\rstatic sqInt fileDescriptorFrom(sqInt aSQFileByteArray);\rstatic FILEHANDLETYPE fileHandleFrom(sqInt sqFileStructByteArray);\rstatic sqInt fileRecordSize(void);\rstatic SQFile * fileValueOf(sqInt anSQFileRecord);\rstatic VirtualMachine * getInterpreter(void);\r#pragma export on\rEXPORT(const char*) getModuleName(void);\r#pragma export off\rstatic sqInt getThisSessionIdentifier(void);\rstatic sqInt halt(void);\r#pragma export on\rEXPORT(sqInt) initialiseModule(void);\r#pragma export off\rstatic sqInt isNonNullSQFile(sqInt objectPointer);\rstatic sqInt isNullSQSocket(sqInt objectPointer);\rstatic sqInt isSQFileObject(sqInt objectPointer);\rstatic sqInt isSQSocketObject(sqInt objectPointer);\rstatic sqInt isValidFileSession(sqInt objectPointer);\r#pragma export on\rEXPORT(sqInt) moduleUnloaded(char *aModuleName);\r#pragma export off\rstatic sqInt msg(char *s);\r#pragma export on\rEXPORT(sqInt) primitiveAioDisable(void);\rEXPORT(sqInt) primitiveAioEnable(void);\rEXPORT(sqInt) primitiveAioHandle(void);\rEXPORT(sqInt) primitiveAioSuspend(void);\rEXPORT(sqInt) primitiveModuleName(void);\rEXPORT(sqInt) primitiveOSFileHandle(void);\rEXPORT(sqInt) primitiveOSSocketHandle(void);\rEXPORT(sqInt) primitiveVersionString(void);\r#pragma export off\rstatic SESSIONIDENTIFIERTYPE sessionIdentifierFromSqFile(SQFile *sqFile);\r#pragma export on\rEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\rEXPORT(sqInt) shutdownModule(void);\r#pragma export off\rstatic int socketDescriptorFrom(sqInt sqSocketOop);\rstatic sqInt socketRecordSize(void);\rstatic SQSocket * socketValueOf(sqInt anSQSocketRecord);\rstatic sqInt stringFromCString(const char *aCString);\rstatic char * versionString(void);\r/*** Variables ***/\r\r#ifdef SQUEAK_BUILTIN_PLUGIN\rextern\r#endif\rstruct VirtualMachine* interpreterProxy;\rstatic const char *moduleName =\r#ifdef SQUEAK_BUILTIN_PLUGIN\r\t\"AioPlugin 23 January 2011 (i)\"\r#else\r\t\"AioPlugin 23 January 2011 (e)\"\r#endif\r;\r\r\r\r/*\tThis function is called to signal a Smalltalk Semaphore when an asynchronous event is\r\tdetected. When translated to C, the name of this method is aioForwardwithDataandFlags.\r\tThe event handler is set up by #primitiveAioHandle. */\r\rstatic void aioForwardwithDataandFlags(int fd, void *data, int flags) {\r    int *pfd;\r    sqInt semaIndex;\r\r\tpfd = data;\r\tsemaIndex = *pfd;\r\tinterpreterProxy->signalSemaphoreWithIndex(semaIndex);\r}\r\r\r/*\tAnswer the OS file descriptor, an integer value, from a SQFile data structure\r\tbyte array, or answer -1 if unable to obtain the file descriptor (probably due\r\tto receiving an incorrect type of object as aFileHandle). */\r/*\treturn type should be int, but skip the declaration to permit inlining */\r\rstatic sqInt fileDescriptorFrom(sqInt aSQFileByteArray) {\r\tif (!((((interpreterProxy->isBytes(aSQFileByteArray)) && ((interpreterProxy->byteSizeOf(aSQFileByteArray)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(aSQFileByteArray))))) && (isNonNullSQFile(aSQFileByteArray)))) {\r\t\treturn -1;\r\t}\r\treturn fileno(fileHandleFrom(aSQFileByteArray));\r}\r\r\r/*\tAnswer a file handle from a SQFile structure. On most platforms, this\r\twill be a (FILE *). On Win32, it is a HANDLE. */\r\rstatic FILEHANDLETYPE fileHandleFrom(sqInt sqFileStructByteArray) {\r    SQFile *sqFile;\r\r\tsqFile = interpreterProxy->arrayValueOf(sqFileStructByteArray);\r\treturn sqFile->file;\r}\r\r\r/*\tAnswer the size of a SQFile data structure in bytes. */\r\rstatic sqInt fileRecordSize(void) {\r\treturn sizeof(SQFile);\r}\r\r\r/*\tReturn a pointer to the first byte of of the SQFile data structure file record within\r\tanSQFileRecord, which is expected to be a ByteArray of size self>>fileRecordSize. */\r\rstatic SQFile * fileValueOf(sqInt anSQFileRecord) {\r\treturn interpreterProxy->arrayValueOf(anSQFileRecord);\r}\r\r\r/*\tNote: This is coded so that plugins can be run from Squeak. */\r\rstatic VirtualMachine * getInterpreter(void) {\r\treturn interpreterProxy;\r}\r\r\r/*\tNote: This is hardcoded so it can be run from Squeak.\r\tThe module name is used for validating a module *after*\r\tit is loaded to check if it does really contain the module\r\twe're thinking it contains. This is important! */\r\rEXPORT(const char*) getModuleName(void) {\r\treturn moduleName;\r}\r\rstatic sqInt getThisSessionIdentifier(void) {\r\treturn interpreterProxy->getThisSessionID();\r}\r\rstatic sqInt halt(void) {\r\t;\r}\r\rEXPORT(sqInt) initialiseModule(void) {\r\treturn 1;\r}\r\r\r/*\tCheck for the common failure mode of a SQFile record with all zeros. */\r\rstatic sqInt isNonNullSQFile(sqInt objectPointer) {\r    sqInt idx;\r    unsigned char *sqFileBytes;\r\r\tsqFileBytes = interpreterProxy->arrayValueOf(objectPointer);\r\tidx = 0;\r\twhile (idx < (fileRecordSize())) {\r\t\tif ((sqFileBytes[idx]) != 0) {\r\t\t\treturn 1;\r\t\t}\r\t\tidx += 1;\r\t}\r\treturn 0;\r}\r\r\r/*\tCheck for the common failure mode of a SQSocket record with all zeros. */\r\rstatic sqInt isNullSQSocket(sqInt objectPointer) {\r    sqInt idx;\r    unsigned char *sqSocketBytes;\r\r\tsqSocketBytes = interpreterProxy->arrayValueOf(objectPointer);\r\tidx = 0;\r\twhile (idx < (socketRecordSize())) {\r\t\tif ((sqSocketBytes[idx]) != 0) {\r\t\t\treturn 0;\r\t\t}\r\t\tidx += 1;\r\t}\r\treturn 1;\r}\r\r\r/*\tAnswer true if objectPointer appears to be a valid SQFile ByteArray.\r\tThis check is appropriate if objectPointer has been passed as a parameter\r\tto a primitive, and is expected to represent a valid file reference. */\r\rstatic sqInt isSQFileObject(sqInt objectPointer) {\r\treturn (((interpreterProxy->isBytes(objectPointer)) && ((interpreterProxy->byteSizeOf(objectPointer)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(objectPointer))))) && (isNonNullSQFile(objectPointer));\r}\r\r\r/*\tAnswer true if objectPointer appears to be a valid SQSocket ByteArray. This check\r\tis appropriate if objectPointer has been passed as a parameter to a primitive, and\r\tis expected to represent a valid socket reference. */\r\rstatic sqInt isSQSocketObject(sqInt objectPointer) {\r\treturn ((interpreterProxy->isBytes(objectPointer)) && ((interpreterProxy->byteSizeOf(objectPointer)) == (socketRecordSize()))) && (!(isNullSQSocket(objectPointer)));\r}\r\r\r/*\tAnswer true if the file session matches the current interpreter session identifier. */\r\rstatic sqInt isValidFileSession(sqInt objectPointer) {\r\treturn (interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(objectPointer)));\r}\r\r\r/*\tThe module with the given name was just unloaded.\r\tMake sure we have no dangling references. */\r\rEXPORT(sqInt) moduleUnloaded(char *aModuleName) {\r}\r\rstatic sqInt msg(char *s) {\r\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\r}\r\r\r/*\tDefinitively disable asynchronous event notification for a descriptor. The\r\tparameter is an OS level integer file descriptor. */\r\rEXPORT(sqInt) primitiveAioDisable(void) {\r    sqInt fd;\r\r\tif ((interpreterProxy->nilObject()) == (interpreterProxy->stackValue(0))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tfd = interpreterProxy->stackIntegerValue(0);\r\tif (fd < 0) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\taioDisable(fd);\r\tinterpreterProxy->pop(2);\r\tinterpreterProxy->pushInteger(fd);\r}\r\r\r/*\tEnable asynchronous notification for a descriptor. The first parameter is an OS\r\tlevel integer file descriptor. The second parameter is the index of a Semaphore to\r\tbe notified, and the third parameter is a flag indicating that descriptor represents\r\tan external object and should not be closed on termination of aio handling. Answer\r\tthe semaphore index. */\r\rEXPORT(sqInt) primitiveAioEnable(void) {\r    static int eventSemaphoreIndices[FD_SETSIZE];\r    sqInt externalObject;\r    sqInt fd;\r    sqInt flags;\r    sqInt semaIndex;\r\r\tif ((interpreterProxy->nilObject()) == (interpreterProxy->stackValue(2))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tfd = interpreterProxy->stackIntegerValue(2);\r\tif (fd < 0) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tsemaIndex = interpreterProxy->stackIntegerValue(1);\r\teventSemaphoreIndices[semaIndex] = semaIndex;\r\texternalObject = interpreterProxy->stackObjectValue(0);\r\tif (externalObject == (interpreterProxy->trueObject())) {\r\t\tflags = AIO_EXT;\r\t} else {\r\t\tflags = 0;\r\t}\r\taioEnable(fd, &(eventSemaphoreIndices[semaIndex]), flags);\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->pushInteger(semaIndex);\r}\r\r\r/*\tHandle asynchronous event notification for a descriptor. The first parameter is\r\tan OS level integer file descriptor. The remaining three parameters are Boolean\r\tflags representing the types of events for which notification is being requested:\r\thandle exceptions, handle for read, and handle for write.\r\tFlags are defined in the aio.h source as:\r\t\tAIO_X\t(1<<0)\thandle for exceptions\r\t\tAIO_R\t(1<<1)\thandle for read\r\t\tAIO_W\t(1<<2)\thandle for write */\r\rEXPORT(sqInt) primitiveAioHandle(void) {\r    sqInt exceptionWatch;\r    sqInt fd;\r    sqInt flags;\r    sqInt readWatch;\r    sqInt writeWatch;\r\r\tif ((interpreterProxy->nilObject()) == (interpreterProxy->stackValue(3))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tfd = interpreterProxy->stackIntegerValue(3);\r\tif (fd < 0) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\texceptionWatch = interpreterProxy->stackObjectValue(2);\r\treadWatch = interpreterProxy->stackObjectValue(1);\r\twriteWatch = interpreterProxy->stackObjectValue(0);\r\tflags = 0;\r\tif (exceptionWatch == (interpreterProxy->trueObject())) {\r\t\tflags = flags | (AIO_X);\r\t}\r\tif (readWatch == (interpreterProxy->trueObject())) {\r\t\tflags = flags | (AIO_R);\r\t}\r\tif (writeWatch == (interpreterProxy->trueObject())) {\r\t\tflags = flags | (AIO_W);\r\t}\r\taioHandle(fd, aioForwardwithDataandFlags, flags);\r\tinterpreterProxy->pop(5);\r\tinterpreterProxy->pushInteger(flags);\r}\r\r\r/*\tTemporarily suspend asynchronous event notification for a descriptor. The first\r\tparameter is an OS level integer file descriptor. The remaining three parameters\r\tare Boolean flags representing the types of events for which notification is being\r\trequested: handle exceptions, handle for read, and handle for write.\r\tFlags are defined in the aio.h source as:\r\t\tAIO_X\t(1<<0)\thandle for exceptions\r\t\tAIO_R\t(1<<1)\thandle for read\r\t\tAIO_W\t(1<<2)\thandle for write */\r\rEXPORT(sqInt) primitiveAioSuspend(void) {\r    sqInt exceptionWatch;\r    sqInt fd;\r    sqInt flags;\r    sqInt readWatch;\r    sqInt writeWatch;\r\r\tif ((interpreterProxy->nilObject()) == (interpreterProxy->stackValue(3))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tfd = interpreterProxy->stackIntegerValue(3);\r\tif (fd < 0) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\texceptionWatch = interpreterProxy->stackObjectValue(2);\r\treadWatch = interpreterProxy->stackObjectValue(1);\r\twriteWatch = interpreterProxy->stackObjectValue(0);\r\tflags = 0;\r\tif (exceptionWatch == (interpreterProxy->trueObject())) {\r\t\tflags = flags | (AIO_X);\r\t}\r\tif (readWatch == (interpreterProxy->trueObject())) {\r\t\tflags = flags | (AIO_R);\r\t}\r\tif (writeWatch == (interpreterProxy->trueObject())) {\r\t\tflags = flags | (AIO_W);\r\t}\r\taioSuspend(fd, flags);\r\tinterpreterProxy->pop(5);\r\tinterpreterProxy->pushInteger(flags);\r}\r\r\r/*\tAnswer a string containing the module name string for this plugin. */\r\rEXPORT(sqInt) primitiveModuleName(void) {\r\tinterpreterProxy->popthenPush(1, stringFromCString(moduleName));\r}\r\r\r/*\tTake a struct SQFile from the stack, and answer the value of its Unix file number. */\r\rEXPORT(sqInt) primitiveOSFileHandle(void) {\r    sqInt fileNo;\r    sqInt sqFileOop;\r\r\tsqFileOop = interpreterProxy->stackValue(0);\r\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\t/* begin fileDescriptorFrom: */\r\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\r\t\tfileNo = -1;\r\t\tgoto l1;\r\t}\r\tfileNo = fileno(fileHandleFrom(sqFileOop));\rl1:\t/* end fileDescriptorFrom: */;\r\tinterpreterProxy->pop(2);\r\tinterpreterProxy->pushInteger(fileNo);\r}\r\r\r/*\tTake a struct SQSocket from the stack, and answer the value of its Unix file number. */\r\rEXPORT(sqInt) primitiveOSSocketHandle(void) {\r    sqInt fileNo;\r    sqInt sqSocketOop;\r\r\tsqSocketOop = interpreterProxy->stackValue(0);\r\tif (!(((interpreterProxy->isBytes(sqSocketOop)) && ((interpreterProxy->byteSizeOf(sqSocketOop)) == (socketRecordSize()))) && (!(isNullSQSocket(sqSocketOop))))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tfileNo = socketDescriptorFrom(sqSocketOop);\r\tif (fileNo < 0) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tinterpreterProxy->pop(2);\r\tinterpreterProxy->pushInteger(fileNo);\r}\r\r\r/*\tAnswer a string containing the version string for this plugin. */\r\rEXPORT(sqInt) primitiveVersionString(void) {\r\tinterpreterProxy->popthenPush(1, stringFromCString(versionString()));\r}\r\r\r/*\tAnswer the session identifier from a SQFile structure. For a valid file\r\treference, this identifier will match the session identifier supplied by\r\tthe interpreter. */\r\rstatic SESSIONIDENTIFIERTYPE sessionIdentifierFromSqFile(SQFile *sqFile) {\r\treturn sqFile->sessionID;\r}\r\r\r/*\tNote: This is coded so that is can be run from Squeak. */\r\rEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter) {\r    sqInt ok;\r\r\tinterpreterProxy = anInterpreter;\r\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\r\tif (ok == 0) {\r\t\treturn 0;\r\t}\r\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\r\treturn ok;\r}\r\rEXPORT(sqInt) shutdownModule(void) {\r}\r\r\r/*\tAnswer the OS file descriptor, an integer value, from a SQSocket data structure,\r\tor answer -1 if unable to obtain the file descriptor (probably due to receiving\r\tan incorrect type of object as aFileHandle).\r\r\tWarning: The first element of privateSocketStruct happens to be the Unix file\r\tnumber of the socket. See sqUnixSocket.c for the definition. This method takes\r\tadvantage of this, and will break if anyone ever redefines the data structure. */\r\rstatic int socketDescriptorFrom(sqInt sqSocketOop) {\r    void *privateSocketStruct;\r    SQSocket *sqSocket;\r\r\tsqSocket = interpreterProxy->arrayValueOf(sqSocketOop);\r\tprivateSocketStruct = sqSocket->privateSocketPtr;\r\tif (privateSocketStruct == 0) {\r\t\treturn -1;\r\t}\r\treturn * (int *) privateSocketStruct;\r}\r\r\r/*\tAnswer the size of a SQSocket data structure in bytes. */\r\rstatic sqInt socketRecordSize(void) {\r\treturn sizeof(SQSocket);\r}\r\r\r/*\tReturn a pointer to the first byte of of the SQsocket data structure socket record within\r\tanSQSocketRecord, which is expected to be a ByteArray of size self>>socketRecordSize. */\r\rstatic SQSocket * socketValueOf(sqInt anSQSocketRecord) {\r\treturn interpreterProxy->arrayValueOf(anSQSocketRecord);\r}\r\r\r/*\tAnswer a new String copied from a null-terminated C string.\r\tCaution: This may invoke the garbage collector. */\r\rstatic sqInt stringFromCString(const char *aCString) {\r    sqInt len;\r    sqInt newString;\r\r\tlen = strlen(aCString);\r\tnewString = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), len);\r\tstrncpy(interpreterProxy->arrayValueOf(newString), aCString, len);\r\treturn newString;\r}\r\r\r/*\tAnswer a string containing the version string for this plugin. Handle MNU\r\terrors, which can occur if class InterpreterPlugin has been removed from\r\tthe system.\r\r\tImportant: When this method is changed, the class side method must also be\r\tchanged to match. */\r/*\t2.0 supports 64bit code base */\r\rstatic char * versionString(void) {\r    static char version[]= \"2.2.2\";\r\r\treturn version;\r}\r\r\r#ifdef SQUEAK_BUILTIN_PLUGIN\r\r\rvoid* AioPlugin_exports[][3] = {\r\t{\"AioPlugin\", \"getModuleName\", (void*)getModuleName},\r\t{\"AioPlugin\", \"primitiveOSSocketHandle\", (void*)primitiveOSSocketHandle},\r\t{\"AioPlugin\", \"primitiveOSFileHandle\", (void*)primitiveOSFileHandle},\r\t{\"AioPlugin\", \"primitiveAioHandle\", (void*)primitiveAioHandle},\r\t{\"AioPlugin\", \"primitiveAioEnable\", (void*)primitiveAioEnable},\r\t{\"AioPlugin\", \"primitiveVersionString\", (void*)primitiveVersionString},\r\t{\"AioPlugin\", \"moduleUnloaded\", (void*)moduleUnloaded},\r\t{\"AioPlugin\", \"primitiveModuleName\", (void*)primitiveModuleName},\r\t{\"AioPlugin\", \"setInterpreter\", (void*)setInterpreter},\r\t{\"AioPlugin\", \"primitiveAioSuspend\", (void*)primitiveAioSuspend},\r\t{\"AioPlugin\", \"shutdownModule\", (void*)shutdownModule},\r\t{\"AioPlugin\", \"initialiseModule\", (void*)initialiseModule},\r\t{\"AioPlugin\", \"primitiveAioDisable\", (void*)primitiveAioDisable},\r\t{NULL, NULL, NULL}\r};\r\r\r#endif /* ifdef SQ_BUILTIN_PLUGIN */\r\r"
  },
  {
    "path": "vm/src/from_squeak/unix/src/plugins/B3DAcceleratorPlugin/B3DAcceleratorPlugin.c",
    "content": "/* Automatically generated from Squeak on 23 January 2011 6:31:52 pm \r   by VMMaker 4.4.7\r */\r\r#include <math.h>\r#include <stdio.h>\r#include <stdlib.h>\r#include <string.h>\r#include <time.h>\r\r/* Default EXPORT macro that does nothing (see comment in sq.h): */\r#define EXPORT(returnType) returnType\r\r/* Do not include the entire sq.h file but just those parts needed. */\r/*  The virtual machine proxy definition */\r#include \"sqVirtualMachine.h\"\r/* Configuration options */\r#include \"sqConfig.h\"\r/* Platform specific definitions */\r#include \"sqPlatformSpecific.h\"\r\r#define true 1\r#define false 0\r#define null 0  /* using 'null' because nil is predefined in Think C */\r#ifdef SQUEAK_BUILTIN_PLUGIN\r#undef EXPORT\r// was #undef EXPORT(returnType) but screws NorCroft cc\r#define EXPORT(returnType) static returnType\r#endif\r#include \"B3DAcceleratorPlugin.h\"\r\r#include \"sqMemoryAccess.h\"\r\r\r/*** Constants ***/\r\r/*** Function Prototypes ***/\rstatic void* fetchLightSourceofObject(sqInt index, sqInt anArray);\rstatic VirtualMachine * getInterpreter(void);\r#pragma export on\rEXPORT(const char*) getModuleName(void);\r#pragma export off\rstatic sqInt halt(void);\r#pragma export on\rEXPORT(sqInt) initialiseModule(void);\r#pragma export off\rstatic sqInt msg(char *s);\r#pragma export on\rEXPORT(sqInt) primitiveAllocateTexture(void);\rEXPORT(sqInt) primitiveClearDepthBuffer(void);\rEXPORT(sqInt) primitiveClearViewport(void);\rEXPORT(sqInt) primitiveCompositeTexture(void);\rEXPORT(sqInt) primitiveCreateRenderer(void);\rEXPORT(sqInt) primitiveCreateRendererFlags(void);\rEXPORT(sqInt) primitiveDestroyRenderer(void);\rEXPORT(sqInt) primitiveDestroyTexture(void);\rEXPORT(sqInt) primitiveFinishRenderer(void);\rEXPORT(sqInt) primitiveFlushRenderer(void);\rEXPORT(sqInt) primitiveGetIntProperty(void);\rEXPORT(sqInt) primitiveGetRendererColorMasks(void);\rEXPORT(sqInt) primitiveGetRendererSurfaceDepth(void);\rEXPORT(sqInt) primitiveGetRendererSurfaceHandle(void);\rEXPORT(sqInt) primitiveGetRendererSurfaceHeight(void);\rEXPORT(sqInt) primitiveGetRendererSurfaceWidth(void);\rEXPORT(sqInt) primitiveIsOverlayRenderer(void);\rEXPORT(sqInt) primitiveRenderVertexBuffer(void);\rEXPORT(sqInt) primitiveRendererVersion(void);\rEXPORT(sqInt) primitiveSetBufferRect(void);\rEXPORT(sqInt) primitiveSetFog(void);\rEXPORT(sqInt) primitiveSetIntProperty(void);\rEXPORT(sqInt) primitiveSetLights(void);\rEXPORT(sqInt) primitiveSetMaterial(void);\rEXPORT(sqInt) primitiveSetTransform(void);\rEXPORT(sqInt) primitiveSetVerboseLevel(void);\rEXPORT(sqInt) primitiveSetViewport(void);\rEXPORT(sqInt) primitiveSwapRendererBuffers(void);\rEXPORT(sqInt) primitiveTextureByteSex(void);\rEXPORT(sqInt) primitiveTextureDepth(void);\rEXPORT(sqInt) primitiveTextureGetColorMasks(void);\rEXPORT(sqInt) primitiveTextureSurfaceHandle(void);\rEXPORT(sqInt) primitiveTextureUpload(void);\rEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\rEXPORT(sqInt) shutdownModule(void);\r#pragma export off\rstatic sqInt stackLightArrayValue(sqInt stackIndex);\rstatic void * stackMaterialValue(sqInt stackIndex);\rstatic void* stackMatrix(sqInt index);\rstatic void* stackPrimitiveIndexArrayofSizevalidateforVertexSize(sqInt stackIndex, sqInt nItems, sqInt aBool, sqInt maxIndex);\rstatic void* stackPrimitiveVertex(sqInt index);\rstatic void* stackPrimitiveVertexArrayofSize(sqInt index, sqInt nItems);\r/*** Variables ***/\r\r#ifdef SQUEAK_BUILTIN_PLUGIN\rextern\r#endif\rstruct VirtualMachine* interpreterProxy;\rstatic const char *moduleName =\r#ifdef SQUEAK_BUILTIN_PLUGIN\r\t\"B3DAcceleratorPlugin 23 January 2011 (i)\"\r#else\r\t\"B3DAcceleratorPlugin 23 January 2011 (e)\"\r#endif\r;\r\r\r\r/*\tFetch the primitive light source from the given array.\r\tNote: No checks are done within here - that happened in stackLightArrayValue: */\r\rstatic void* fetchLightSourceofObject(sqInt index, sqInt anArray) {\r    sqInt lightOop;\r\r\tlightOop = interpreterProxy->fetchPointerofObject(index, anArray);\r\treturn interpreterProxy->firstIndexableField(lightOop);\r}\r\r\r/*\tNote: This is coded so that plugins can be run from Squeak. */\r\rstatic VirtualMachine * getInterpreter(void) {\r\treturn interpreterProxy;\r}\r\r\r/*\tNote: This is hardcoded so it can be run from Squeak.\r\tThe module name is used for validating a module *after*\r\tit is loaded to check if it does really contain the module\r\twe're thinking it contains. This is important! */\r\rEXPORT(const char*) getModuleName(void) {\r\treturn moduleName;\r}\r\rstatic sqInt halt(void) {\r\t;\r}\r\rEXPORT(sqInt) initialiseModule(void) {\r\treturn b3dxInitialize();\r}\r\rstatic sqInt msg(char *s) {\r\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\r}\r\rEXPORT(sqInt) primitiveAllocateTexture(void) {\r    sqInt d;\r    sqInt h;\r    sqInt renderer;\r    sqInt result;\r    sqInt w;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 4)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\th = interpreterProxy->stackIntegerValue(0);\r\tw = interpreterProxy->stackIntegerValue(1);\r\td = interpreterProxy->stackIntegerValue(2);\r\trenderer = interpreterProxy->stackIntegerValue(3);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tresult = b3dxAllocateTexture(renderer, w, h, d);\r\tif (result == -1) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tinterpreterProxy->pop(5);\r\treturn interpreterProxy->pushInteger(result);\r}\r\rEXPORT(sqInt) primitiveClearDepthBuffer(void) {\r    sqInt handle;\r    sqInt result;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\thandle = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tresult = b3dxClearDepthBuffer(handle);\r\tif (!(result)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\treturn interpreterProxy->pop(1);\r}\r\rEXPORT(sqInt) primitiveClearViewport(void) {\r    sqInt handle;\r    sqInt pv;\r    sqInt result;\r    sqInt rgba;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 3)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tpv = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(0));\r\trgba = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(1));\r\thandle = interpreterProxy->stackIntegerValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tresult = b3dxClearViewport(handle, rgba, pv);\r\tif (!(result)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\treturn interpreterProxy->pop(3);\r}\r\rEXPORT(sqInt) primitiveCompositeTexture(void) {\r    sqInt h;\r    sqInt rendererHandle;\r    sqInt result;\r    sqInt texHandle;\r    sqInt translucent;\r    sqInt w;\r    sqInt x;\r    sqInt y;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 7)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\ttranslucent = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(0));\r\th = interpreterProxy->stackIntegerValue(1);\r\tw = interpreterProxy->stackIntegerValue(2);\r\ty = interpreterProxy->stackIntegerValue(3);\r\tx = interpreterProxy->stackIntegerValue(4);\r\ttexHandle = interpreterProxy->stackIntegerValue(5);\r\trendererHandle = interpreterProxy->stackIntegerValue(6);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tresult = b3dxCompositeTexture(rendererHandle, texHandle, x, y, w, h, translucent);\r\tif (!(result)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\treturn interpreterProxy->pop(7);\r}\r\r\r/*\tNOTE: This primitive is obsolete but should be supported for older images */\r\rEXPORT(sqInt) primitiveCreateRenderer(void) {\r    sqInt allowHardware;\r    sqInt allowSoftware;\r    sqInt h;\r    sqInt result;\r    sqInt w;\r    sqInt x;\r    sqInt y;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 6)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\th = interpreterProxy->stackIntegerValue(0);\r\tw = interpreterProxy->stackIntegerValue(1);\r\ty = interpreterProxy->stackIntegerValue(2);\r\tx = interpreterProxy->stackIntegerValue(3);\r\tallowHardware = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(4));\r\tallowSoftware = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(5));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tresult = b3dxCreateRenderer(allowSoftware, allowHardware, x, y, w, h);\r\tif (result < 0) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tinterpreterProxy->pop(7);\r\treturn interpreterProxy->pushInteger(result);\r}\r\rEXPORT(sqInt) primitiveCreateRendererFlags(void) {\r    sqInt flags;\r    sqInt h;\r    sqInt result;\r    sqInt w;\r    sqInt x;\r    sqInt y;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 5)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\th = interpreterProxy->stackIntegerValue(0);\r\tw = interpreterProxy->stackIntegerValue(1);\r\ty = interpreterProxy->stackIntegerValue(2);\r\tx = interpreterProxy->stackIntegerValue(3);\r\tflags = interpreterProxy->stackIntegerValue(4);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tresult = b3dxCreateRendererFlags(x, y, w, h, flags);\r\tif (result < 0) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tinterpreterProxy->pop(6);\r\treturn interpreterProxy->pushInteger(result);\r}\r\rEXPORT(sqInt) primitiveDestroyRenderer(void) {\r    sqInt handle;\r    sqInt result;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\thandle = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tresult = b3dxDestroyRenderer(handle);\r\tif (!(result)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\treturn interpreterProxy->pop(1);\r}\r\rEXPORT(sqInt) primitiveDestroyTexture(void) {\r    sqInt handle;\r    sqInt renderer;\r    sqInt result;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 2)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\thandle = interpreterProxy->stackIntegerValue(0);\r\trenderer = interpreterProxy->stackIntegerValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tresult = b3dxDestroyTexture(renderer, handle);\r\tif (!(result)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\treturn interpreterProxy->pop(2);\r}\r\rEXPORT(sqInt) primitiveFinishRenderer(void) {\r    sqInt handle;\r    sqInt result;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\thandle = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tresult = b3dxFinishRenderer(handle);\r\tif (!(result)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\treturn interpreterProxy->pop(1);\r}\r\rEXPORT(sqInt) primitiveFlushRenderer(void) {\r    sqInt handle;\r    sqInt result;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\thandle = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tresult = b3dxFlushRenderer(handle);\r\tif (!(result)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\treturn interpreterProxy->pop(1);\r}\r\rEXPORT(sqInt) primitiveGetIntProperty(void) {\r    sqInt handle;\r    sqInt prop;\r    sqInt result;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 2)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tprop = interpreterProxy->stackIntegerValue(0);\r\thandle = interpreterProxy->stackIntegerValue(1);\r\tresult = b3dxGetIntProperty(handle, prop);\r\tinterpreterProxy->pop(3);\r\treturn interpreterProxy->pushInteger(result);\r}\r\rEXPORT(sqInt) primitiveGetRendererColorMasks(void) {\r    sqInt array;\r    sqInt arrayOop;\r    sqInt handle;\r    sqInt i;\r    int masks[4];\r    sqInt result;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 2)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tarray = interpreterProxy->stackObjectValue(0);\r\thandle = interpreterProxy->stackIntegerValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!((interpreterProxy->fetchClassOf(array)) == (interpreterProxy->classArray()))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tif (!((interpreterProxy->slotSizeOf(array)) == 4)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tresult = b3dxGetRendererColorMasks(handle, masks);\r\tif (!(result)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tarrayOop = array;\r\tfor (i = 0; i <= 3; i += 1) {\r\t\tinterpreterProxy->pushRemappableOop(arrayOop);\r\t\tresult = interpreterProxy->positive32BitIntegerFor(masks[i]);\r\t\tarrayOop = interpreterProxy->popRemappableOop();\r\t\tinterpreterProxy->storePointerofObjectwithValue(i, arrayOop, result);\r\t}\r\treturn interpreterProxy->pop(2);\r}\r\rEXPORT(sqInt) primitiveGetRendererSurfaceDepth(void) {\r    sqInt handle;\r    sqInt result;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\thandle = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tresult = b3dxGetRendererSurfaceDepth(handle);\r\tif (result < 0) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tinterpreterProxy->pop(2);\r\treturn interpreterProxy->pushInteger(result);\r}\r\rEXPORT(sqInt) primitiveGetRendererSurfaceHandle(void) {\r    sqInt handle;\r    sqInt result;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\thandle = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tresult = b3dxGetRendererSurfaceHandle(handle);\r\tif (result < 0) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tinterpreterProxy->pop(2);\r\treturn interpreterProxy->pushInteger(result);\r}\r\rEXPORT(sqInt) primitiveGetRendererSurfaceHeight(void) {\r    sqInt handle;\r    sqInt result;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\thandle = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tresult = b3dxGetRendererSurfaceHeight(handle);\r\tif (result < 0) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tinterpreterProxy->pop(2);\r\treturn interpreterProxy->pushInteger(result);\r}\r\rEXPORT(sqInt) primitiveGetRendererSurfaceWidth(void) {\r    sqInt handle;\r    sqInt result;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\thandle = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tresult = b3dxGetRendererSurfaceWidth(handle);\r\tif (result < 0) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tinterpreterProxy->pop(2);\r\treturn interpreterProxy->pushInteger(result);\r}\r\rEXPORT(sqInt) primitiveIsOverlayRenderer(void) {\r    sqInt handle;\r    sqInt result;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\thandle = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tresult = b3dxIsOverlayRenderer(handle);\r\tinterpreterProxy->pop(2);\r\treturn interpreterProxy->pushBool(result);\r}\r\rEXPORT(sqInt) primitiveRenderVertexBuffer(void) {\r    sqInt flags;\r    sqInt handle;\r    int *idxArray;\r    sqInt idxCount;\r    sqInt primType;\r    sqInt result;\r    sqInt texHandle;\r    float *vtxArray;\r    sqInt vtxCount;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 8)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tidxCount = interpreterProxy->stackIntegerValue(0);\r\tvtxCount = interpreterProxy->stackIntegerValue(2);\r\ttexHandle = interpreterProxy->stackIntegerValue(4);\r\tflags = interpreterProxy->stackIntegerValue(5);\r\tprimType = interpreterProxy->stackIntegerValue(6);\r\thandle = interpreterProxy->stackIntegerValue(7);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tvtxArray = stackPrimitiveVertexArrayofSize(3, vtxCount);\r\tidxArray = stackPrimitiveIndexArrayofSizevalidateforVertexSize(1, idxCount, 1, vtxCount);\r\tif ((vtxArray == null) || ((idxArray == null) || ((primType < 1) || ((primType > 6) || (interpreterProxy->failed()))))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tresult = b3dxRenderVertexBuffer(handle, primType, flags, texHandle, vtxArray, vtxCount, idxArray, idxCount);\r\tif (!(result)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\treturn interpreterProxy->pop(8);\r}\r\rEXPORT(sqInt) primitiveRendererVersion(void) {\r\tif (!((interpreterProxy->methodArgumentCount()) == 0)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tinterpreterProxy->pop(1);\r\treturn interpreterProxy->pushInteger(1);\r}\r\r\r/*\tPrimitive. Set the buffer rectangle (e.g., the pixel area on screen) to use for this renderer.\r\tThe viewport is positioned within the buffer rectangle. */\r\rEXPORT(sqInt) primitiveSetBufferRect(void) {\r    sqInt h;\r    sqInt handle;\r    sqInt result;\r    sqInt w;\r    sqInt x;\r    sqInt y;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 5)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\th = interpreterProxy->stackIntegerValue(0);\r\tw = interpreterProxy->stackIntegerValue(1);\r\ty = interpreterProxy->stackIntegerValue(2);\r\tx = interpreterProxy->stackIntegerValue(3);\r\thandle = interpreterProxy->stackIntegerValue(4);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tresult = b3dxSetBufferRect(handle, x, y, w, h);\r\tif (!(result)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\treturn interpreterProxy->pop(5);\r}\r\rEXPORT(sqInt) primitiveSetFog(void) {\r    double density;\r    sqInt fogType;\r    sqInt handle;\r    sqInt result;\r    sqInt rgba;\r    double start;\r    double stop;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 6)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\trgba = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(0));\r\tstop = interpreterProxy->floatValueOf(interpreterProxy->stackValue(1));\r\tstart = interpreterProxy->floatValueOf(interpreterProxy->stackValue(2));\r\tdensity = interpreterProxy->floatValueOf(interpreterProxy->stackValue(3));\r\tfogType = interpreterProxy->stackIntegerValue(4);\r\thandle = interpreterProxy->stackIntegerValue(5);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tresult = b3dxSetFog(handle, fogType, density, start, stop, rgba);\r\tif (!(result)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\treturn interpreterProxy->pop(6);\r}\r\rEXPORT(sqInt) primitiveSetIntProperty(void) {\r    sqInt handle;\r    sqInt prop;\r    sqInt result;\r    sqInt value;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 3)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tvalue = interpreterProxy->stackIntegerValue(0);\r\tprop = interpreterProxy->stackIntegerValue(1);\r\thandle = interpreterProxy->stackIntegerValue(2);\r\tresult = b3dxSetIntProperty(handle, prop, value);\r\tif (!(result)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\treturn interpreterProxy->pop(3);\r}\r\rEXPORT(sqInt) primitiveSetLights(void) {\r    sqInt handle;\r    sqInt i;\r    void* light;\r    sqInt lightArray;\r    sqInt lightCount;\r    sqInt lightOop;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 2)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tlightArray = stackLightArrayValue(0);\r\thandle = interpreterProxy->stackIntegerValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(b3dxDisableLights(handle))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tif (lightArray == null) {\r\t\treturn null;\r\t}\r\r\t/* For each enabled light source */\r\r\tlightCount = interpreterProxy->slotSizeOf(lightArray);\r\tfor (i = 0; i <= (lightCount - 1); i += 1) {\r\t\t/* begin fetchLightSource:ofObject: */\r\t\tlightOop = interpreterProxy->fetchPointerofObject(i, lightArray);\r\t\tlight = interpreterProxy->firstIndexableField(lightOop);\r\t\tif (!(b3dxLoadLight(handle, i, light))) {\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t}\r\treturn interpreterProxy->pop(2);\r}\r\rEXPORT(sqInt) primitiveSetMaterial(void) {\r    sqInt handle;\r    void*material;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 2)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tmaterial = stackMaterialValue(0);\r\thandle = interpreterProxy->stackIntegerValue(1);\r\tif (!(b3dxLoadMaterial(handle, material))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\treturn interpreterProxy->pop(2);\r}\r\r\r/*\tTransform an entire vertex buffer using the supplied modelview and projection matrix. */\r\rEXPORT(sqInt) primitiveSetTransform(void) {\r    sqInt handle;\r    float *modelViewMatrix;\r    float *projectionMatrix;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 3)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tprojectionMatrix = stackMatrix(0);\r\tmodelViewMatrix = stackMatrix(1);\r\thandle = interpreterProxy->stackIntegerValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tb3dxSetTransform(handle, modelViewMatrix, projectionMatrix);\r\treturn interpreterProxy->pop(3);\r}\r\rEXPORT(sqInt) primitiveSetVerboseLevel(void) {\r    sqInt level;\r    sqInt result;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tlevel = interpreterProxy->stackIntegerValue(0);\r\tresult = b3dxSetVerboseLevel(level);\r\tinterpreterProxy->pop(2);\r\treturn interpreterProxy->pushInteger(result);\r}\r\rEXPORT(sqInt) primitiveSetViewport(void) {\r    sqInt h;\r    sqInt handle;\r    sqInt result;\r    sqInt w;\r    sqInt x;\r    sqInt y;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 5)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\th = interpreterProxy->stackIntegerValue(0);\r\tw = interpreterProxy->stackIntegerValue(1);\r\ty = interpreterProxy->stackIntegerValue(2);\r\tx = interpreterProxy->stackIntegerValue(3);\r\thandle = interpreterProxy->stackIntegerValue(4);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tresult = b3dxSetViewport(handle, x, y, w, h);\r\tif (!(result)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\treturn interpreterProxy->pop(5);\r}\r\rEXPORT(sqInt) primitiveSwapRendererBuffers(void) {\r    sqInt handle;\r    sqInt result;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\thandle = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tresult = b3dxSwapRendererBuffers(handle);\r\tif (!(result)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\treturn interpreterProxy->pop(1);\r}\r\rEXPORT(sqInt) primitiveTextureByteSex(void) {\r    sqInt handle;\r    sqInt renderer;\r    sqInt result;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 2)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\thandle = interpreterProxy->stackIntegerValue(0);\r\trenderer = interpreterProxy->stackIntegerValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tresult = b3dxTextureByteSex(renderer, handle);\r\tif (result < 0) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tinterpreterProxy->pop(3);\r\treturn interpreterProxy->pushBool(result);\r}\r\rEXPORT(sqInt) primitiveTextureDepth(void) {\r    sqInt handle;\r    sqInt renderer;\r    sqInt result;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 2)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\thandle = interpreterProxy->stackIntegerValue(0);\r\trenderer = interpreterProxy->stackIntegerValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tresult = b3dxActualTextureDepth(renderer, handle);\r\tif (result < 0) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tinterpreterProxy->pop(3);\r\treturn interpreterProxy->pushInteger(result);\r}\r\rEXPORT(sqInt) primitiveTextureGetColorMasks(void) {\r    sqInt array;\r    sqInt arrayOop;\r    sqInt handle;\r    sqInt i;\r    int masks[4];\r    sqInt renderer;\r    sqInt result;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 3)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tarray = interpreterProxy->stackObjectValue(0);\r\thandle = interpreterProxy->stackIntegerValue(1);\r\trenderer = interpreterProxy->stackIntegerValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!((interpreterProxy->fetchClassOf(array)) == (interpreterProxy->classArray()))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tif (!((interpreterProxy->slotSizeOf(array)) == 4)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tresult = b3dxTextureColorMasks(renderer, handle, masks);\r\tif (!(result)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tarrayOop = array;\r\tfor (i = 0; i <= 3; i += 1) {\r\t\tinterpreterProxy->pushRemappableOop(arrayOop);\r\t\tresult = interpreterProxy->positive32BitIntegerFor(masks[i]);\r\t\tarrayOop = interpreterProxy->popRemappableOop();\r\t\tinterpreterProxy->storePointerofObjectwithValue(i, arrayOop, result);\r\t}\r\treturn interpreterProxy->pop(3);\r}\r\rEXPORT(sqInt) primitiveTextureSurfaceHandle(void) {\r    sqInt handle;\r    sqInt renderer;\r    sqInt result;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 2)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\thandle = interpreterProxy->stackIntegerValue(0);\r\trenderer = interpreterProxy->stackIntegerValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tresult = b3dxTextureSurfaceHandle(renderer, handle);\r\tif (result < 0) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tinterpreterProxy->pop(3);\r\treturn interpreterProxy->pushInteger(result);\r}\r\rEXPORT(sqInt) primitiveTextureUpload(void) {\r    sqInt bits;\r    void*bitsPtr;\r    sqInt d;\r    sqInt form;\r    sqInt h;\r    sqInt handle;\r    sqInt ppw;\r    sqInt renderer;\r    sqInt result;\r    sqInt w;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 3)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tform = interpreterProxy->stackValue(0);\r\tif (!((interpreterProxy->isPointers(form)) && ((interpreterProxy->slotSizeOf(form)) >= 4))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tbits = interpreterProxy->fetchPointerofObject(0, form);\r\tw = interpreterProxy->fetchIntegerofObject(1, form);\r\th = interpreterProxy->fetchIntegerofObject(2, form);\r\td = interpreterProxy->fetchIntegerofObject(3, form);\r\tppw = 32 / d;\r\tif (!(interpreterProxy->isWords(bits))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tif (!((interpreterProxy->slotSizeOf(bits)) == ((((w + ppw) - 1) / ppw) * h))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tbitsPtr = interpreterProxy->firstIndexableField(bits);\r\thandle = interpreterProxy->stackIntegerValue(1);\r\trenderer = interpreterProxy->stackIntegerValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tresult = b3dxUploadTexture(renderer, handle, w, h, d, bitsPtr);\r\tif (!(result)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\treturn interpreterProxy->pop(3);\r}\r\r\r/*\tNote: This is coded so that is can be run from Squeak. */\r\rEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter) {\r    sqInt ok;\r\r\tinterpreterProxy = anInterpreter;\r\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\r\tif (ok == 0) {\r\t\treturn 0;\r\t}\r\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\r\treturn ok;\r}\r\rEXPORT(sqInt) shutdownModule(void) {\r\treturn b3dxShutdown();\r}\r\r\r/*\tLoad an Array of B3DPrimitiveLights from the given stack index */\r\rstatic sqInt stackLightArrayValue(sqInt stackIndex) {\r    sqInt array;\r    sqInt arraySize;\r    sqInt i;\r    sqInt oop;\r\r\tarray = interpreterProxy->stackObjectValue(stackIndex);\r\tif (array == null) {\r\t\treturn null;\r\t}\r\tif (array == (interpreterProxy->nilObject())) {\r\t\treturn null;\r\t}\r\tif (!((interpreterProxy->fetchClassOf(array)) == (interpreterProxy->classArray()))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tarraySize = interpreterProxy->slotSizeOf(array);\r\tfor (i = 0; i <= (arraySize - 1); i += 1) {\r\t\toop = interpreterProxy->fetchPointerofObject(i, array);\r\t\tif ((oop & 1)) {\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\tif (!((interpreterProxy->isWords(oop)) && ((interpreterProxy->slotSizeOf(oop)) == 32))) {\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t}\r\treturn array;\r}\r\r\r/*\tLoad a B3DMaterial from the given stack index */\r\rstatic void * stackMaterialValue(sqInt stackIndex) {\r    sqInt oop;\r\r\toop = interpreterProxy->stackObjectValue(stackIndex);\r\tif (oop == null) {\r\t\treturn null;\r\t}\r\tif (oop == (interpreterProxy->nilObject())) {\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->isWords(oop)) && ((interpreterProxy->slotSizeOf(oop)) == 17)) {\r\t\treturn interpreterProxy->firstIndexableField(oop);\r\t}\r\treturn null;\r}\r\r\r/*\tLoad a 4x4 transformation matrix from the interpreter stack.\r\tReturn a pointer to the matrix data if successful, nil otherwise. */\r\rstatic void* stackMatrix(sqInt index) {\r    sqInt oop;\r\r\toop = interpreterProxy->stackObjectValue(index);\r\tif (oop == null) {\r\t\treturn null;\r\t}\r\tif (oop == (interpreterProxy->nilObject())) {\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->isWords(oop)) && ((interpreterProxy->slotSizeOf(oop)) == 16)) {\r\t\treturn interpreterProxy->firstIndexableField(oop);\r\t}\r\treturn null;\r}\r\r\r/*\tLoad a primitive index array from the interpreter stack.\r\tIf aBool is true then check that all the indexes are in the range (1,maxIndex).\r\tReturn a pointer to the index data if successful, nil otherwise. */\r\rstatic void* stackPrimitiveIndexArrayofSizevalidateforVertexSize(sqInt stackIndex, sqInt nItems, sqInt aBool, sqInt maxIndex) {\r    sqInt i;\r    int *idxPtr;\r    sqInt index;\r    sqInt oop;\r    sqInt oopSize;\r\r\toop = interpreterProxy->stackObjectValue(stackIndex);\r\tif (oop == null) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(oop))) {\r\t\treturn null;\r\t}\r\toopSize = interpreterProxy->slotSizeOf(oop);\r\tif (oopSize < nItems) {\r\t\treturn null;\r\t}\r\tidxPtr = ((int *) (interpreterProxy->firstIndexableField(oop)));\r\tif (aBool) {\r\t\tfor (i = 0; i <= (nItems - 1); i += 1) {\r\t\t\tindex = idxPtr[i];\r\t\t\tif ((index < 0) || (index > maxIndex)) {\r\t\t\t\treturn null;\r\t\t\t}\r\t\t}\r\t}\r\treturn idxPtr;\r}\r\r\r/*\tLoad a primitive vertex from the interpreter stack.\r\tReturn a pointer to the vertex data if successful, nil otherwise. */\r\rstatic void* stackPrimitiveVertex(sqInt index) {\r    sqInt oop;\r\r\toop = interpreterProxy->stackObjectValue(index);\r\tif (oop == null) {\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->isWords(oop)) && ((interpreterProxy->slotSizeOf(oop)) == 16)) {\r\t\treturn interpreterProxy->firstIndexableField(oop);\r\t}\r\treturn null;\r}\r\r\r/*\tLoad a primitive vertex array from the interpreter stack.\r\tReturn a pointer to the vertex data if successful, nil otherwise. */\r\rstatic void* stackPrimitiveVertexArrayofSize(sqInt index, sqInt nItems) {\r    sqInt oop;\r    sqInt oopSize;\r\r\toop = interpreterProxy->stackObjectValue(index);\r\tif (oop == null) {\r\t\treturn null;\r\t}\r\tif (interpreterProxy->isWords(oop)) {\r\t\toopSize = interpreterProxy->slotSizeOf(oop);\r\t\tif (((oopSize >= nItems) * 16) && ((oopSize % 16) == 0)) {\r\t\t\treturn interpreterProxy->firstIndexableField(oop);\r\t\t}\r\t}\r\treturn null;\r}\r\r\r#ifdef SQUEAK_BUILTIN_PLUGIN\r\r\rvoid* B3DAcceleratorPlugin_exports[][3] = {\r\t{\"B3DAcceleratorPlugin\", \"primitiveTextureByteSex\", (void*)primitiveTextureByteSex},\r\t{\"B3DAcceleratorPlugin\", \"primitiveSetVerboseLevel\", (void*)primitiveSetVerboseLevel},\r\t{\"B3DAcceleratorPlugin\", \"primitiveSetIntProperty\", (void*)primitiveSetIntProperty},\r\t{\"B3DAcceleratorPlugin\", \"primitiveDestroyRenderer\", (void*)primitiveDestroyRenderer},\r\t{\"B3DAcceleratorPlugin\", \"primitiveRenderVertexBuffer\", (void*)primitiveRenderVertexBuffer},\r\t{\"B3DAcceleratorPlugin\", \"primitiveGetRendererSurfaceDepth\", (void*)primitiveGetRendererSurfaceDepth},\r\t{\"B3DAcceleratorPlugin\", \"primitiveSwapRendererBuffers\", (void*)primitiveSwapRendererBuffers},\r\t{\"B3DAcceleratorPlugin\", \"shutdownModule\", (void*)shutdownModule},\r\t{\"B3DAcceleratorPlugin\", \"primitiveTextureGetColorMasks\", (void*)primitiveTextureGetColorMasks},\r\t{\"B3DAcceleratorPlugin\", \"primitiveTextureDepth\", (void*)primitiveTextureDepth},\r\t{\"B3DAcceleratorPlugin\", \"primitiveCreateRendererFlags\", (void*)primitiveCreateRendererFlags},\r\t{\"B3DAcceleratorPlugin\", \"primitiveSetLights\", (void*)primitiveSetLights},\r\t{\"B3DAcceleratorPlugin\", \"primitiveTextureSurfaceHandle\", (void*)primitiveTextureSurfaceHandle},\r\t{\"B3DAcceleratorPlugin\", \"primitiveGetRendererColorMasks\", (void*)primitiveGetRendererColorMasks},\r\t{\"B3DAcceleratorPlugin\", \"getModuleName\", (void*)getModuleName},\r\t{\"B3DAcceleratorPlugin\", \"primitiveGetRendererSurfaceHeight\", (void*)primitiveGetRendererSurfaceHeight},\r\t{\"B3DAcceleratorPlugin\", \"primitiveCompositeTexture\", (void*)primitiveCompositeTexture},\r\t{\"B3DAcceleratorPlugin\", \"primitiveFinishRenderer\", (void*)primitiveFinishRenderer},\r\t{\"B3DAcceleratorPlugin\", \"primitiveRendererVersion\", (void*)primitiveRendererVersion},\r\t{\"B3DAcceleratorPlugin\", \"setInterpreter\", (void*)setInterpreter},\r\t{\"B3DAcceleratorPlugin\", \"primitiveSetViewport\", (void*)primitiveSetViewport},\r\t{\"B3DAcceleratorPlugin\", \"primitiveSetBufferRect\", (void*)primitiveSetBufferRect},\r\t{\"B3DAcceleratorPlugin\", \"primitiveSetMaterial\", (void*)primitiveSetMaterial},\r\t{\"B3DAcceleratorPlugin\", \"primitiveGetRendererSurfaceWidth\", (void*)primitiveGetRendererSurfaceWidth},\r\t{\"B3DAcceleratorPlugin\", \"primitiveTextureUpload\", (void*)primitiveTextureUpload},\r\t{\"B3DAcceleratorPlugin\", \"primitiveSetTransform\", (void*)primitiveSetTransform},\r\t{\"B3DAcceleratorPlugin\", \"primitiveSetFog\", (void*)primitiveSetFog},\r\t{\"B3DAcceleratorPlugin\", \"primitiveClearDepthBuffer\", (void*)primitiveClearDepthBuffer},\r\t{\"B3DAcceleratorPlugin\", \"primitiveFlushRenderer\", (void*)primitiveFlushRenderer},\r\t{\"B3DAcceleratorPlugin\", \"initialiseModule\", (void*)initialiseModule},\r\t{\"B3DAcceleratorPlugin\", \"primitiveDestroyTexture\", (void*)primitiveDestroyTexture},\r\t{\"B3DAcceleratorPlugin\", \"primitiveClearViewport\", (void*)primitiveClearViewport},\r\t{\"B3DAcceleratorPlugin\", \"primitiveAllocateTexture\", (void*)primitiveAllocateTexture},\r\t{\"B3DAcceleratorPlugin\", \"primitiveCreateRenderer\", (void*)primitiveCreateRenderer},\r\t{\"B3DAcceleratorPlugin\", \"primitiveIsOverlayRenderer\", (void*)primitiveIsOverlayRenderer},\r\t{\"B3DAcceleratorPlugin\", \"primitiveGetRendererSurfaceHandle\", (void*)primitiveGetRendererSurfaceHandle},\r\t{\"B3DAcceleratorPlugin\", \"primitiveGetIntProperty\", (void*)primitiveGetIntProperty},\r\t{NULL, NULL, NULL}\r};\r\r\r#endif /* ifdef SQ_BUILTIN_PLUGIN */\r\r"
  },
  {
    "path": "vm/src/from_squeak/unix/src/plugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.c",
    "content": "/* Automatically generated from Squeak on 23 January 2011 3:55:50 pm \r   by VMMaker 4.4.7\r */\r\r#include <math.h>\r#include <stdio.h>\r#include <stdlib.h>\r#include <string.h>\r#include <time.h>\r\r/* Default EXPORT macro that does nothing (see comment in sq.h): */\r#define EXPORT(returnType) returnType\r\r/* Do not include the entire sq.h file but just those parts needed. */\r/*  The virtual machine proxy definition */\r#include \"sqVirtualMachine.h\"\r/* Configuration options */\r#include \"sqConfig.h\"\r/* Platform specific definitions */\r#include \"sqPlatformSpecific.h\"\r\r#define true 1\r#define false 0\r#define null 0  /* using 'null' because nil is predefined in Think C */\r#ifdef SQUEAK_BUILTIN_PLUGIN\r#undef EXPORT\r// was #undef EXPORT(returnType) but screws NorCroft cc\r#define EXPORT(returnType) static returnType\r#endif\r\r#include \"sqMemoryAccess.h\"\r\r\r/*** Constants ***/\r\r/*** Function Prototypes ***/\rstatic VirtualMachine * getInterpreter(void);\r#pragma export on\rEXPORT(const char*) getModuleName(void);\r#pragma export off\rstatic sqInt halt(void);\r#pragma export on\rEXPORT(sqInt) ioAddClipboardData(void);\rEXPORT(sqInt) ioClearClipboard(void);\rEXPORT(sqInt) ioCreateClipboard(void);\rEXPORT(sqInt) ioGetClipboardFormat(void);\rEXPORT(sqInt) ioReadClipboardData(void);\r#pragma export off\rstatic sqInt msg(char *s);\r#pragma export on\rEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\r#pragma export off\rstatic sqInt sqAssert(sqInt aBool);\r/*** Variables ***/\r\r#ifdef SQUEAK_BUILTIN_PLUGIN\rextern\r#endif\rstruct VirtualMachine* interpreterProxy;\rstatic const char *moduleName =\r#ifdef SQUEAK_BUILTIN_PLUGIN\r\t\"ClipboardExtendedPlugin 23 January 2011 (i)\"\r#else\r\t\"ClipboardExtendedPlugin 23 January 2011 (e)\"\r#endif\r;\r\r\r\r/*\tNote: This is coded so that plugins can be run from Squeak. */\r\rstatic VirtualMachine * getInterpreter(void) {\r\treturn interpreterProxy;\r}\r\r\r/*\tNote: This is hardcoded so it can be run from Squeak.\r\tThe module name is used for validating a module *after*\r\tit is loaded to check if it does really contain the module\r\twe're thinking it contains. This is important! */\r\rEXPORT(const char*) getModuleName(void) {\r\treturn moduleName;\r}\r\rstatic sqInt halt(void) {\r\t;\r}\r\rEXPORT(sqInt) ioAddClipboardData(void) {\r\tsqInt clipboardAddress;\r\tsqInt formatLength;\r\tsqInt dataLength;\r\tsqInt clipboard;\r\tchar *data;\r\tchar *aFormat;\r\r\tclipboard = interpreterProxy->stackValue(2);\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(1)));\r\tdata = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(1))));\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\r\taFormat = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tclipboardAddress = interpreterProxy->positive32BitValueOf(clipboard);\r\tdataLength = interpreterProxy->slotSizeOf((oopForPointer( data ) - BASE_HEADER_SIZE));\r\tformatLength = interpreterProxy->slotSizeOf((oopForPointer( aFormat ) - BASE_HEADER_SIZE));\r\tsqPasteboardPutItemFlavordatalengthformatTypeformatLength(clipboardAddress, data, dataLength, aFormat, formatLength);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(3);\r\treturn null;\r}\r\rEXPORT(sqInt) ioClearClipboard(void) {\r\tsqInt clipboardAddress;\r\tsqInt clipboard;\r\r\tclipboard = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tclipboardAddress = interpreterProxy->positive32BitValueOf(clipboard);\r\tsqPasteboardClear(clipboardAddress);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(1);\r\treturn null;\r}\r\rEXPORT(sqInt) ioCreateClipboard(void) {\r\tsqInt clipboardAddress;\r\r\tclipboardAddress = interpreterProxy->positive32BitIntegerFor(sqCreateClipboard());\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, clipboardAddress);\r\treturn null;\r}\r\rEXPORT(sqInt) ioGetClipboardFormat(void) {\r\tsqInt clipboardAddress;\r\tsqInt itemCount;\r\tsqInt clipboard;\r\tsqInt formatNumber;\r\tsqInt _return_value;\r\r\tclipboard = interpreterProxy->stackValue(1);\r\tformatNumber = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tclipboardAddress = interpreterProxy->positive32BitValueOf(clipboard);\r\titemCount = sqPasteboardGetItemCount(clipboardAddress);\r\tif (itemCount > 0) {\r\t\t_return_value = sqPasteboardCopyItemFlavorsitemNumber(clipboardAddress, formatNumber);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, _return_value);\r\t\treturn null;\r\t}\r\t_return_value = interpreterProxy->nilObject();\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) ioReadClipboardData(void) {\r\tsqInt clipboardAddress;\r\tsqInt formatLength;\r\tsqInt clipboard;\r\tchar *format;\r\tsqInt _return_value;\r\r\tclipboard = interpreterProxy->stackValue(1);\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\r\tformat = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tclipboardAddress = interpreterProxy->positive32BitValueOf(clipboard);\r\tformatLength = interpreterProxy->slotSizeOf((oopForPointer( format ) - BASE_HEADER_SIZE));\r\t_return_value = sqPasteboardCopyItemFlavorDataformatformatLength(clipboardAddress, format, formatLength);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\rstatic sqInt msg(char *s) {\r\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\r}\r\r\r/*\tNote: This is coded so that is can be run from Squeak. */\r\rEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter) {\r\tsqInt ok;\r\r\tinterpreterProxy = anInterpreter;\r\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\r\tif (ok == 0) {\r\t\treturn 0;\r\t}\r\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\r\treturn ok;\r}\r\rstatic sqInt sqAssert(sqInt aBool) {\r\t/* missing DebugCode */;\r}\r\r\r#ifdef SQUEAK_BUILTIN_PLUGIN\r\r\rvoid* ClipboardExtendedPlugin_exports[][3] = {\r\t{\"ClipboardExtendedPlugin\", \"getModuleName\", (void*)getModuleName},\r\t{\"ClipboardExtendedPlugin\", \"ioClearClipboard\", (void*)ioClearClipboard},\r\t{\"ClipboardExtendedPlugin\", \"setInterpreter\", (void*)setInterpreter},\r\t{\"ClipboardExtendedPlugin\", \"ioGetClipboardFormat\", (void*)ioGetClipboardFormat},\r\t{\"ClipboardExtendedPlugin\", \"ioCreateClipboard\", (void*)ioCreateClipboard},\r\t{\"ClipboardExtendedPlugin\", \"ioAddClipboardData\", (void*)ioAddClipboardData},\r\t{\"ClipboardExtendedPlugin\", \"ioReadClipboardData\", (void*)ioReadClipboardData},\r\t{NULL, NULL, NULL}\r};\r\r\r#endif /* ifdef SQ_BUILTIN_PLUGIN */\r\r"
  },
  {
    "path": "vm/src/from_squeak/unix/src/plugins/DBusPlugin/DBusPlugin.c",
    "content": "/* Automatically generated from Squeak on 23 January 2011 3:55:51 pm \r   by VMMaker 4.4.7\r */\r\r#include <math.h>\r#include <stdio.h>\r#include <stdlib.h>\r#include <string.h>\r#include <time.h>\r\r/* Default EXPORT macro that does nothing (see comment in sq.h): */\r#define EXPORT(returnType) returnType\r\r/* Do not include the entire sq.h file but just those parts needed. */\r/*  The virtual machine proxy definition */\r#include \"sqVirtualMachine.h\"\r/* Configuration options */\r#include \"sqConfig.h\"\r/* Platform specific definitions */\r#include \"sqPlatformSpecific.h\"\r\r#define true 1\r#define false 0\r#define null 0  /* using 'null' because nil is predefined in Think C */\r#ifdef SQUEAK_BUILTIN_PLUGIN\r#undef EXPORT\r// was #undef EXPORT(returnType) but screws NorCroft cc\r#define EXPORT(returnType) static returnType\r#endif\r#include \"aio.h\"\r\t#define DBUS_API_SUBJECT_TO_CHANGE\r#include <dbus/dbus.h>\r\ttypedef struct sqDBusData {\r\t\tDBusConnection* con;\r\t\tDBusWatch* watch;\r\t\tint semaphore;\r\t} sqDBusData;\r\r#include \"sqMemoryAccess.h\"\r\r\r/*** Constants ***/\r\r/*** Function Prototypes ***/\rstatic sqInt argumentsAddBooltoIter(sqInt oop, DBusMessageIter*iter);\rstatic sqInt argumentsAddBytetoIter(sqInt oop, DBusMessageIter*iter);\rstatic sqInt argumentsAddDoubletoIter(sqInt oop, DBusMessageIter*iter);\rstatic sqInt argumentsAddInt16toIter(sqInt oop, DBusMessageIter*iter);\rstatic sqInt argumentsAddInt32toIter(sqInt oop, DBusMessageIter*iter);\rstatic sqInt argumentsAddInt64toIter(sqInt oop, DBusMessageIter*iter);\rstatic sqInt argumentsAddObjectPathtoIter(sqInt oop, DBusMessageIter*iter);\rstatic sqInt argumentsAddSignaturetoIter(sqInt oop, DBusMessageIter*iter);\rstatic sqInt argumentsAddStringtoIter(sqInt oop, DBusMessageIter*iter);\rstatic sqInt argumentsAddUInt16toIter(sqInt oop, DBusMessageIter*iter);\rstatic sqInt argumentsAddUInt32toIter(sqInt oop, DBusMessageIter*iter);\rstatic sqInt argumentsAddUInt64toIter(sqInt oop, DBusMessageIter*iter);\rstatic sqInt buildStringOopFromCharP(const char*charP);\rstatic sqInt closeConnection(sqInt index);\rstatic DBusMessage * createErrorTofrom(char*dest, sqInt msgOop);\rstatic DBusMessage * createReplyTofrom(char*dest, sqInt msgOop);\rstatic char * fetchStringofObject(sqInt n, sqInt oop);\rstatic sqInt getBasicTypevalue(int t, void*val);\rstatic DBusConnection * getConnectionFromOop(sqInt aDBusConnection);\rstatic VirtualMachine * getInterpreter(void);\r#pragma export on\rEXPORT(const char*) getModuleName(void);\r#pragma export off\rstatic sqInt halt(void);\rstatic sqInt handleflag(int fd, int flag);\rstatic sqInt handleReadForFDwithDataandFlag(int fd, sqDBusData*data, int flag);\r#pragma export on\rEXPORT(sqInt) initialiseModule(void);\r#pragma export off\rstatic sqInt iterOpenContainercontains(sqInt t, char*s);\rstatic sqInt msg(char *s);\rstatic sqDBusData* newDataStructWithConnectionandSemaphore(DBusConnection *con, int semaphore);\r#pragma export on\rEXPORT(sqInt) primitiveDBusAddMatch(void);\rEXPORT(sqInt) primitiveDBusAppendBasicArgument(void);\rEXPORT(sqInt) primitiveDBusArgumentGetBool(void);\rEXPORT(sqInt) primitiveDBusArgumentGetByte(void);\rEXPORT(sqInt) primitiveDBusArgumentGetDouble(void);\rEXPORT(sqInt) primitiveDBusArgumentGetInt16(void);\rEXPORT(sqInt) primitiveDBusArgumentGetInt32(void);\rEXPORT(sqInt) primitiveDBusArgumentGetInt64(void);\rEXPORT(sqInt) primitiveDBusArgumentGetObjectPath(void);\rEXPORT(sqInt) primitiveDBusArgumentGetSignature(void);\rEXPORT(sqInt) primitiveDBusArgumentGetString(void);\rEXPORT(sqInt) primitiveDBusArgumentGetType(void);\rEXPORT(sqInt) primitiveDBusArgumentGetUInt16(void);\rEXPORT(sqInt) primitiveDBusArgumentGetUInt32(void);\rEXPORT(sqInt) primitiveDBusArgumentGetUInt64(void);\rEXPORT(sqInt) primitiveDBusConnectionClose(void);\rEXPORT(sqInt) primitiveDBusConnectionDispatchStatus(void);\rEXPORT(sqInt) primitiveDBusConnectionPopMessage(void);\rEXPORT(sqInt) primitiveDBusCreateMessageFrom(void);\rEXPORT(sqInt) primitiveDBusInitializeWriteIterator(void);\rEXPORT(sqInt) primitiveDBusIterCloseContainer(void);\rEXPORT(sqInt) primitiveDBusIterOpenContainerContains(void);\rEXPORT(sqInt) primitiveDBusIteratorSignature(void);\rEXPORT(sqInt) primitiveDBusMessageGetDestination(void);\rEXPORT(sqInt) primitiveDBusMessageGetErrorName(void);\rEXPORT(sqInt) primitiveDBusMessageGetInterface(void);\rEXPORT(sqInt) primitiveDBusMessageGetMember(void);\rEXPORT(sqInt) primitiveDBusMessageGetNoReply(void);\rEXPORT(sqInt) primitiveDBusMessageGetPath(void);\rEXPORT(sqInt) primitiveDBusMessageGetReplySerial(void);\rEXPORT(sqInt) primitiveDBusMessageGetSender(void);\rEXPORT(sqInt) primitiveDBusMessageGetSerial(void);\rEXPORT(sqInt) primitiveDBusMessageGetSignature(void);\rEXPORT(sqInt) primitiveDBusMessageHasArguments(void);\rEXPORT(sqInt) primitiveDBusNextIterator(void);\rEXPORT(sqInt) primitiveDBusPopMessageIterator(void);\rEXPORT(sqInt) primitiveDBusPushMessageIterator(void);\rEXPORT(sqInt) primitiveDBusRegisterName(void);\rEXPORT(sqInt) primitiveDBusReleaseName(void);\rEXPORT(sqInt) primitiveDBusRemoveMatch(void);\rEXPORT(sqInt) primitiveDBusSendMessageTimeout(void);\rEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\rEXPORT(sqInt) shutdownModule(void);\r#pragma export off\rstatic sqInt sqAssert(sqInt aBool);\rstatic dbus_bool_t sqDBusPluginAddWatchwithData(DBusWatch*watch, void*data);\rstatic void sqDBusPluginFreeWatchData(void*data);\rstatic void sqDBusPluginRemoveWatchwithData(DBusWatch*watch, void*data);\rstatic void sqDBusPluginToggleWatchwithData(DBusWatch*watch, void*data);\rstatic char * stringOopToChar(sqInt oop);\r/*** Variables ***/\rstatic DBusConnection* connections[2];\rstatic int curIter;\rstatic int curWriteIter;\rstatic dbus_bool_t hasArgument;\r\r#ifdef SQUEAK_BUILTIN_PLUGIN\rextern\r#endif\rstruct VirtualMachine* interpreterProxy;\rstatic DBusMessage* message;\rstatic DBusMessageIter messageIter[DBUS_MAXIMUM_TYPE_RECURSION_DEPTH];\rstatic const char *moduleName =\r#ifdef SQUEAK_BUILTIN_PLUGIN\r\t\"DBusPlugin 23 January 2011 (i)\"\r#else\r\t\"DBusPlugin 23 January 2011 (e)\"\r#endif\r;\rstatic DBusMessage* writeMessage;\rstatic DBusMessageIter writeMessageIter[DBUS_MAXIMUM_TYPE_RECURSION_DEPTH];\r\r\rstatic sqInt argumentsAddBooltoIter(sqInt oop, DBusMessageIter*iter) {\r\tint arg;\r\r\targ = 1;\r\tif (oop == (interpreterProxy->falseObject())) {\r\t\targ = 0;\r\t}\r\tif (!(dbus_message_iter_append_basic(iter, DBUS_TYPE_BOOLEAN, &arg))) {\r\t\tmsg(\"Can not add Boolean argument.\");\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r}\r\rstatic sqInt argumentsAddBytetoIter(sqInt oop, DBusMessageIter*iter) {\r\tsqInt intArg;\r\r\tintArg = interpreterProxy->checkedIntegerValueOf(oop);\r\tif (interpreterProxy->failed()) {\r\t\tmsg(\"Wrong oop type\");\r\t\treturn 0;\r\t}\r\tif (!(dbus_message_iter_append_basic(iter, DBUS_TYPE_BYTE, &intArg))) {\r\t\tmsg(\"Can not add Byte argument.\");\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r}\r\rstatic sqInt argumentsAddDoubletoIter(sqInt oop, DBusMessageIter*iter) {\r\tdouble arg;\r\r\tif (!(interpreterProxy->isFloatObject(oop))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\targ = interpreterProxy->floatValueOf(oop);\r\tif (!(dbus_message_iter_append_basic(iter, DBUS_TYPE_DOUBLE, &arg))) {\r\t\tmsg(\"Can not add Double argument.\");\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r}\r\rstatic sqInt argumentsAddInt16toIter(sqInt oop, DBusMessageIter*iter) {\r\tdbus_int16_t intArg;\r\r\tif (!((oop & 1))) {\r\t\tmsg(\"Oop is no integer value\");\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tintArg = (oop >> 1);\r\tif (!(dbus_message_iter_append_basic(iter, DBUS_TYPE_INT16, &intArg))) {\r\t\tmsg(\"Can not add Int16 argument.\");\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r}\r\rstatic sqInt argumentsAddInt32toIter(sqInt oop, DBusMessageIter*iter) {\r\tdbus_int32_t intArg;\r\r\tintArg = interpreterProxy->signed32BitValueOf(oop);\r\tif (interpreterProxy->failed()) {\r\t\tmsg(\"Wrong oop type\");\r\t\treturn 0;\r\t}\r\tif (!(dbus_message_iter_append_basic(iter, DBUS_TYPE_INT32, &intArg))) {\r\t\tmsg(\"Can not add Int32 argument.\");\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r}\r\rstatic sqInt argumentsAddInt64toIter(sqInt oop, DBusMessageIter*iter) {\r\tdbus_int64_t intArg;\r\r\tintArg = interpreterProxy->signed64BitValueOf(oop);\r\tif (interpreterProxy->failed()) {\r\t\tmsg(\"Wrong oop type\");\r\t\treturn 0;\r\t}\r\tif (!(dbus_message_iter_append_basic(iter, DBUS_TYPE_INT64, &intArg))) {\r\t\tmsg(\"Can not add Int64 argument.\");\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r}\r\rstatic sqInt argumentsAddObjectPathtoIter(sqInt oop, DBusMessageIter*iter) {\r\tchar*arg;\r\r\targ = stringOopToChar(oop);\r\tif (!(arg == null)) {\r\t\tif (!(dbus_message_iter_append_basic(iter, DBUS_TYPE_OBJECT_PATH, &arg))) {\r\t\t\tmsg(\"Can not add Path argument.\");\r\t\t}\r\t\tfree(arg);\r\t}\r}\r\rstatic sqInt argumentsAddSignaturetoIter(sqInt oop, DBusMessageIter*iter) {\r\tchar*arg;\r\r\targ = stringOopToChar(oop);\r\tif (!(arg == null)) {\r\t\tif (!(dbus_message_iter_append_basic(iter, DBUS_TYPE_SIGNATURE, &arg))) {\r\t\t\tmsg(\"Can not add Signature argument.\");\r\t\t}\r\t\tfree(arg);\r\t}\r}\r\rstatic sqInt argumentsAddStringtoIter(sqInt oop, DBusMessageIter*iter) {\r\tchar*arg;\r\r\targ = stringOopToChar(oop);\r\tif (!(arg == null)) {\r\t\tif (!(dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &arg))) {\r\t\t\tmsg(\"Can not add String argument.\");\r\t\t}\r\t\tfree(arg);\r\t}\r}\r\rstatic sqInt argumentsAddUInt16toIter(sqInt oop, DBusMessageIter*iter) {\r\tdbus_uint16_t intArg;\r\r\tif (!((oop & 1))) {\r\t\tmsg(\"Oop is no integer value\");\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tintArg = (oop >> 1);\r\tif (!(dbus_message_iter_append_basic(iter, DBUS_TYPE_UINT16, &intArg))) {\r\t\tmsg(\"Can not add UInt16 argument.\");\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r}\r\rstatic sqInt argumentsAddUInt32toIter(sqInt oop, DBusMessageIter*iter) {\r\tdbus_uint32_t intArg;\r\r\tintArg = interpreterProxy->positive32BitValueOf(oop);\r\tif (interpreterProxy->failed()) {\r\t\tmsg(\"Wrong oop type\");\r\t\treturn 0;\r\t}\r\tif (!(dbus_message_iter_append_basic(iter, DBUS_TYPE_UINT32, &intArg))) {\r\t\tmsg(\"Can not add UInt32 argument.\");\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r}\r\rstatic sqInt argumentsAddUInt64toIter(sqInt oop, DBusMessageIter*iter) {\r\tdbus_uint64_t intArg;\r\r\tintArg = interpreterProxy->positive64BitValueOf(oop);\r\tif (interpreterProxy->failed()) {\r\t\tmsg(\"Wrong oop type\");\r\t\treturn 0;\r\t}\r\tif (!(dbus_message_iter_append_basic(iter, DBUS_TYPE_UINT64, &intArg))) {\r\t\tmsg(\"Can not add UInt64 argument.\");\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r}\r\r\r/*\tanswers an string oop for the char pointer */\r\rstatic sqInt buildStringOopFromCharP(const char*charP) {\r\tchar *strPtr;\r\tsqInt strObj;\r\tint size;\r\r\tif (charP == null) {\r\t\treturn interpreterProxy->nilObject();\r\t}\r\tsize = 0;\r\tsize = strlen(charP);\r\tstrObj = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), size);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tstrPtr = ((char *) interpreterProxy->firstIndexableField(strObj));\r\tmemcpy(strPtr, charP, size);\r\treturn strObj;\r}\r\rstatic sqInt closeConnection(sqInt index) {\r\tif (!((connections[index]) == null)) {\r\t\tdbus_connection_close(connections[index]);\r\t\tdbus_connection_unref(connections[index]);\r\t\tconnections[index] = null;\r\t\treturn 1;\r\t}\r\treturn 0;\r}\r\r\r/*\tcreates an error message for a received message */\r\rstatic DBusMessage * createErrorTofrom(char*dest, sqInt msgOop) {\r\tsqInt serialOop;\r\tdbus_uint32_t serial;\r\tchar * name;\r\tDBusMessage *error;\r\tsqInt p;\r\r\tserialOop = interpreterProxy->fetchPointerofObject(7, msgOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\r\t/* extract the name of the error oop */\r\r\tserial = interpreterProxy->positive32BitValueOf(serialOop);\r\t/* begin fetchString:ofObject: */\r\tp = interpreterProxy->fetchPointerofObject(8, msgOop);\r\tname = stringOopToChar(p);\r\terror = null;\r\terror = dbus_message_new(DBUS_MESSAGE_TYPE_ERROR);\r\t\t\t\tdbus_message_set_destination(error, dest);\r\t\t\t\tdbus_message_set_error_name(error, name);\r\t\t\t     dbus_message_set_no_reply(error, TRUE);\r\t\t\t\tdbus_message_set_reply_serial(error, serial);\r\t\t\t\tfree(name);\r\treturn error;\r}\r\r\r/*\tanswers a message to be sent as reply to a previously received message */\r\rstatic DBusMessage * createReplyTofrom(char*dest, sqInt msgOop) {\r\tsqInt reply;\r\tsqInt serialOop;\r\tdbus_uint32_t serial;\r\r\tserialOop = interpreterProxy->fetchPointerofObject(7, msgOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tserial = interpreterProxy->positive32BitValueOf(serialOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\treply = dbus_message_new(DBUS_MESSAGE_TYPE_METHOD_RETURN);\r\tdbus_message_set_destination(reply, dest);\r\tdbus_message_set_no_reply(reply, TRUE);\r\tdbus_message_set_reply_serial(reply, serial);\r\treturn reply;\r}\r\rstatic char * fetchStringofObject(sqInt n, sqInt oop) {\r\tsqInt p;\r\r\tp = interpreterProxy->fetchPointerofObject(n, oop);\r\treturn stringOopToChar(p);\r}\r\rstatic sqInt getBasicTypevalue(int t, void*val) {\r\tint type;\r\r\tif (!(hasArgument)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\ttype = 0;\r\ttype = dbus_message_iter_get_arg_type(&messageIter[curIter]);\r\tif (!(type == t)) {\r\t\tmsg(\"Wrong argument type\");\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tdbus_message_iter_get_basic(&messageIter[curIter], val );\r}\r\r\r/*\tanswers the dbus connection. if necessary, open the dbus connection and register the watch functions. The first instance variable of aDBusConnection is 0 or 1 indicating the session or system bus. Second instance variable is a semaphore index. */\r\rstatic DBusConnection * getConnectionFromOop(sqInt aDBusConnection) {\r\tsqInt semaIndex;\r\tsqInt h;\r\tDBusConnection*conn;\r\tDBusError error;\r\tsqDBusData*data;\r\r\th = interpreterProxy->fetchIntegerofObject(0, aDBusConnection);\r\tif ((interpreterProxy->failed()) || ((h < 0) || (h > 1))) {\r\t\tmsg(\"handle must be 0 or 1\");\r\t\treturn null;\r\t}\r\tsemaIndex = interpreterProxy->fetchIntegerofObject(1, aDBusConnection);\r\tif (interpreterProxy->failed()) {\r\t\tmsg(\"semaphore index must be an integer\");\r\t\treturn null;\r\t}\r\tconn = connections[h];\r\tif (conn != null) {\r\t\treturn conn;\r\t}\r\tdbus_error_init(&error);\r\tconn = dbus_bus_get_private(h==1?DBUS_BUS_SYSTEM:DBUS_BUS_SESSION, &error);\r\tif (dbus_error_is_set (&error)) {\r\t\tmsg(error.message);\r\t\tdbus_error_free(&error);\r\t\treturn null;\r\t}\r\tconnections[h] = conn;\r\tdata = newDataStructWithConnectionandSemaphore(conn, semaIndex);\r\tif (data != null) {\r\t\tif (!(dbus_connection_set_watch_functions(\r\t\t\tconn,\r\t\t\tsqDBusPluginAddWatchwithData,\r\t\t\tsqDBusPluginRemoveWatchwithData,\r\t\t\tsqDBusPluginToggleWatchwithData, \r\t\t\tdata,\r\t\t\tsqDBusPluginFreeWatchData))) {\r\t\t\tmsg(\"Can not set the watch functions\");\r\t\t\tfree(data);\r\t\t\tdata = null;\r\t\t}\r\t}\r\tif (data == null) {\r\t\tcloseConnection(h);\r\t\treturn null;\r\t}\r\treturn conn;\r}\r\r\r/*\tNote: This is coded so that plugins can be run from Squeak. */\r\rstatic VirtualMachine * getInterpreter(void) {\r\treturn interpreterProxy;\r}\r\r\r/*\tNote: This is hardcoded so it can be run from Squeak.\r\tThe module name is used for validating a module *after*\r\tit is loaded to check if it does really contain the module\r\twe're thinking it contains. This is important! */\r\rEXPORT(const char*) getModuleName(void) {\r\treturn moduleName;\r}\r\rstatic sqInt halt(void) {\r\t;\r}\r\rstatic sqInt handleflag(int fd, int flag) {\r\taioHandle(fd, handleReadForFDwithDataandFlag , flag);\r}\r\r\r/*\ta handler function which is called when new messages arrived in the dbus queue */\r\rstatic sqInt handleReadForFDwithDataandFlag(int fd, sqDBusData*data, int flag) {\r\tsqInt semaphore;\r\r\tdbus_watch_handle(data->watch, DBUS_WATCH_READABLE);\r\thandleflag(fd, flag);\r\tsemaphore = data->semaphore;\r\tinterpreterProxy->signalSemaphoreWithIndex(semaphore);\r}\r\rEXPORT(sqInt) initialiseModule(void) {\r\tconnections[0] = null;\r\tconnections[1] = null;\r\treturn 1;\r}\r\r\r/*\topens a new container and increase writeIterator. arrays, structs, dictionarys and variants are container types in dbus */\r\rstatic sqInt iterOpenContainercontains(sqInt t, char*s) {\r\tsqInt success;\r\r\tsuccess = dbus_message_iter_open_container( &writeMessageIter[curWriteIter], t, s, &writeMessageIter[curWriteIter+1]);\r\tif (!(s == null)) {\r\t\tfree(s);\r\t}\r\tif (success) {\r\t\tcurWriteIter += 1;\r\t} else {\r\t\tmsg(\"Could not create container\");\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\treturn interpreterProxy->trueObject();\r}\r\rstatic sqInt msg(char *s) {\r\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\r}\r\r\r/*\tanswers an new data struct which is needed for handling watchers */\r\rstatic sqDBusData* newDataStructWithConnectionandSemaphore(DBusConnection *con, int semaphore) {\r\tsqDBusData*t;\r\r\tt = null;\r\tt = (sqDBusData*)malloc(sizeof(sqDBusData));\r\tif (t == null) {\r\t\tmsg(\"Cannot allocate memory for watch data structure\");\r\t\treturn null;\r\t}\r\tt->con = con; \r\t\t\t\tt->semaphore = semaphore;\r\t\t\t\tt->watch = NULL;\r\treturn t;\r}\r\r\r/*\tRegister a match rule */\r\rEXPORT(sqInt) primitiveDBusAddMatch(void) {\r\tsqInt rcvOop;\r\tchar*rule;\r\tDBusConnection *conn;\r\tDBusError error;\r\tsqInt ruleOop;\r\tsqInt _return_value;\r\r\truleOop = interpreterProxy->stackValue(0);\r\trcvOop = interpreterProxy->stackValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tconn = getConnectionFromOop(rcvOop);\r\tif (conn == null) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\trule = stringOopToChar(ruleOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tdbus_error_init(&error);\r\tdbus_bus_add_match( conn, rule, &error);\r\tdbus_connection_flush(conn);\r\tif (dbus_error_is_set(&error)) {\r\t\tmsg(((char*) (error.message)));\r\t\tdbus_error_free(&error);\r\t\tinterpreterProxy->primitiveFail();\r\t}\r\tfree(rule);\r\t_return_value = interpreterProxy->trueObject();\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\r\r/*\tappend a basic type argument to the currently topmost iterator in the iterator stack */\r\rEXPORT(sqInt) primitiveDBusAppendBasicArgument(void) {\r\tDBusMessageIter*iter;\r\tsqInt arg;\r\tsqInt t;\r\tsqInt _return_value;\r\r\targ = interpreterProxy->stackValue(1);\r\tt = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\titer = &(writeMessageIter[curWriteIter]);\r\tif (t == (DBUS_TYPE_BYTE)) {\r\t\t_return_value = argumentsAddBytetoIter(arg, iter);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, _return_value);\r\t\treturn null;\r\t}\r\tif (t == (DBUS_TYPE_INT16)) {\r\t\t_return_value = argumentsAddInt16toIter(arg, iter);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, _return_value);\r\t\treturn null;\r\t}\r\tif (t == (DBUS_TYPE_INT32)) {\r\t\t_return_value = argumentsAddInt32toIter(arg, iter);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, _return_value);\r\t\treturn null;\r\t}\r\tif (t == (DBUS_TYPE_INT64)) {\r\t\t_return_value = argumentsAddInt64toIter(arg, iter);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, _return_value);\r\t\treturn null;\r\t}\r\tif (t == (DBUS_TYPE_UINT16)) {\r\t\t_return_value = argumentsAddUInt16toIter(arg, iter);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, _return_value);\r\t\treturn null;\r\t}\r\tif (t == (DBUS_TYPE_UINT32)) {\r\t\t_return_value = argumentsAddUInt32toIter(arg, iter);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, _return_value);\r\t\treturn null;\r\t}\r\tif (t == (DBUS_TYPE_UINT64)) {\r\t\t_return_value = argumentsAddUInt64toIter(arg, iter);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, _return_value);\r\t\treturn null;\r\t}\r\tif (t == (DBUS_TYPE_DOUBLE)) {\r\t\t_return_value = argumentsAddDoubletoIter(arg, iter);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, _return_value);\r\t\treturn null;\r\t}\r\tif (t == (DBUS_TYPE_STRING)) {\r\t\t_return_value = argumentsAddStringtoIter(arg, iter);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, _return_value);\r\t\treturn null;\r\t}\r\tif (t == (DBUS_TYPE_BOOLEAN)) {\r\t\t_return_value = argumentsAddBooltoIter(arg, iter);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, _return_value);\r\t\treturn null;\r\t}\r\tif (t == (DBUS_TYPE_OBJECT_PATH)) {\r\t\t_return_value = argumentsAddObjectPathtoIter(arg, iter);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, _return_value);\r\t\treturn null;\r\t}\r\tif (t == (DBUS_TYPE_SIGNATURE)) {\r\t\t_return_value = argumentsAddSignaturetoIter(arg, iter);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, _return_value);\r\t\treturn null;\r\t}\r\tmsg(\"unknown argument type\");\r\tinterpreterProxy->primitiveFail();\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(2);\r\treturn null;\r}\r\r\r/*\treturns a bool argument */\r\rEXPORT(sqInt) primitiveDBusArgumentGetBool(void) {\r\tint type;\r\tint value;\r\tsqInt _return_value;\r\r\tif (!(hasArgument)) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\ttype = 0;\r\ttype = dbus_message_iter_get_arg_type(&messageIter[curIter]);\r\tif (!(type == (DBUS_TYPE_BOOLEAN))) {\r\t\tmsg(\"Wrong argument type: DBUS_TYPE_BOOLEAN.\");\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tvalue = 0;\r\tdbus_message_iter_get_basic(&messageIter[curIter], &value );\r\tif (value) {\r\t\t_return_value = interpreterProxy->trueObject();\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(1, _return_value);\r\t\treturn null;\r\t}\r\t_return_value = interpreterProxy->falseObject();\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\r\r/*\tread a char argument and return a SmallIntegerOop */\r\rEXPORT(sqInt) primitiveDBusArgumentGetByte(void) {\r\tchar value;\r\tsqInt _return_value;\r\r\tvalue = 0;\r\tgetBasicTypevalue(DBUS_TYPE_BYTE, &value);\r\t_return_value = interpreterProxy->integerObjectOf(value);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\r\r/*\tread a double argument and answer float oop */\r\rEXPORT(sqInt) primitiveDBusArgumentGetDouble(void) {\r\tint type;\r\tdouble value;\r\tsqInt _return_value;\r\r\tif (!(hasArgument)) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\ttype = 0;\r\ttype = dbus_message_iter_get_arg_type(&messageIter[curIter]);\r\tif (!(type == (DBUS_TYPE_DOUBLE))) {\r\t\tmsg(\"Wrong argument type: DBUS_TYPE_DOUBLE.\");\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tvalue = 0;\r\tdbus_message_iter_get_basic(&messageIter[curIter], &value );\r\t_return_value = interpreterProxy->floatObjectOf(value);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\r\r/*\tread a signed integer argument and return a SmallIntegerOop */\r\rEXPORT(sqInt) primitiveDBusArgumentGetInt16(void) {\r\tdbus_int16_t value;\r\tsqInt _return_value;\r\r\tvalue = 0;\r\tgetBasicTypevalue(DBUS_TYPE_INT16, &value);\r\t_return_value = interpreterProxy->integerObjectOf(value);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\r\r/*\tread a signed long argument and return a LargeIntegerOop depends on the sign */\r\rEXPORT(sqInt) primitiveDBusArgumentGetInt32(void) {\r\tdbus_int32_t value;\r\tsqInt _return_value;\r\r\tvalue = 0;\r\tgetBasicTypevalue(DBUS_TYPE_INT32, &value);\r\t_return_value = interpreterProxy->signed32BitIntegerFor(value);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\r\r/*\tread a signed long long argument and return a LargeIntegerOop depends on the sign */\r\rEXPORT(sqInt) primitiveDBusArgumentGetInt64(void) {\r\tdbus_int64_t value;\r\tsqInt _return_value;\r\r\tvalue = 0;\r\tgetBasicTypevalue(DBUS_TYPE_INT64, &value);\r\t_return_value = interpreterProxy->signed64BitIntegerFor(value);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\r\r/*\treturns path to an object argument as a string */\r\rEXPORT(sqInt) primitiveDBusArgumentGetObjectPath(void) {\r\tint type;\r\tchar *str;\r\tsqInt _return_value;\r\r\tif (!(hasArgument)) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\ttype = 0;\r\ttype = dbus_message_iter_get_arg_type(&messageIter[curIter]);\r\tif (!(type == (DBUS_TYPE_OBJECT_PATH))) {\r\t\tmsg(\"Wrong argument type: DBUS_TYPE_OBJECT_PATH.\");\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tstr = \"\";\r\tdbus_message_iter_get_basic(&messageIter[curIter], &str );\r\t_return_value = buildStringOopFromCharP(str);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\r\r/*\tread a signature from the arguments */\r\rEXPORT(sqInt) primitiveDBusArgumentGetSignature(void) {\r\tchar*value;\r\tsqInt _return_value;\r\r\tvalue = 0;\r\tgetBasicTypevalue(DBUS_TYPE_SIGNATURE, &value);\r\t_return_value = buildStringOopFromCharP(value);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\r\r/*\treturns the readed string argument as oop */\r\rEXPORT(sqInt) primitiveDBusArgumentGetString(void) {\r\tint type;\r\tchar *str;\r\tsqInt _return_value;\r\r\tif (!(hasArgument)) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\ttype = 0;\r\ttype = dbus_message_iter_get_arg_type(&messageIter[curIter]);\r\tif (!(type == (DBUS_TYPE_STRING))) {\r\t\tmsg(\"Wrong argument type: DBUS_TYPE_STRING.\");\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tstr = \"\";\r\tdbus_message_iter_get_basic(&messageIter[curIter], &str );\r\t_return_value = buildStringOopFromCharP(str);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\r\r/*\treturns the type of the current argument or nil) */\r\rEXPORT(sqInt) primitiveDBusArgumentGetType(void) {\r\tint type;\r\tsqInt _return_value;\r\r\tif (!(hasArgument)) {\r\t\t_return_value = interpreterProxy->nilObject();\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(1, _return_value);\r\t\treturn null;\r\t}\r\ttype = dbus_message_iter_get_arg_type(&messageIter[curIter]);\r\t_return_value = interpreterProxy->integerObjectOf(type);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\r\r/*\tread a unsigned int argument and return a SmallIntegerOop */\r\rEXPORT(sqInt) primitiveDBusArgumentGetUInt16(void) {\r\tdbus_uint16_t value;\r\tsqInt _return_value;\r\r\tvalue = 0;\r\tgetBasicTypevalue(DBUS_TYPE_UINT16, &value);\r\t_return_value = interpreterProxy->integerObjectOf(value);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\r\r/*\tread a unsigned long argument and returns a LargeInteger oop */\r\rEXPORT(sqInt) primitiveDBusArgumentGetUInt32(void) {\r\tdbus_uint32_t value;\r\tsqInt _return_value;\r\r\tvalue = 0;\r\tgetBasicTypevalue(DBUS_TYPE_UINT32, &value);\r\t_return_value = interpreterProxy->positive32BitIntegerFor(value);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\r\r/*\tread a unsigned long long argument and returns a LargeInteger oop */\r\rEXPORT(sqInt) primitiveDBusArgumentGetUInt64(void) {\r\tlong long value;\r\tsqInt _return_value;\r\r\tvalue = 0;\r\tgetBasicTypevalue(DBUS_TYPE_UINT64, &value);\r\t_return_value = interpreterProxy->positive64BitIntegerFor(value);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\r\r/*\tclose the receiver's connection */\r\rEXPORT(sqInt) primitiveDBusConnectionClose(void) {\r\tsqInt rcvOop;\r\tsqInt h;\r\tsqInt _return_value;\r\r\trcvOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\th = interpreterProxy->fetchIntegerofObject(0, rcvOop);\r\tif ((interpreterProxy->failed()) || ((h < 0) || (h > 1))) {\r\t\tmsg(\"handle must be 0 or 1\");\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\t_return_value = ((closeConnection(h))? interpreterProxy->trueObject(): interpreterProxy->falseObject());\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\r\r/*\tanswer the status of the connection */\r\rEXPORT(sqInt) primitiveDBusConnectionDispatchStatus(void) {\r\tsqInt rcvOop;\r\tsqInt status;\r\tDBusConnection*conn;\r\tsqInt _return_value;\r\r\trcvOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tconn = getConnectionFromOop(rcvOop);\r\tif (conn == null) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tstatus = null;\r\tstatus = dbus_connection_get_dispatch_status(conn);\r\t_return_value = interpreterProxy->integerObjectOf(status);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\r\r/*\tread the connection for next available message */\r\rEXPORT(sqInt) primitiveDBusConnectionPopMessage(void) {\r\tsqInt rcvOop;\r\tint msgType;\r\tDBusConnection *conn;\r\tsqInt _return_value;\r\r\trcvOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tconn = getConnectionFromOop(rcvOop);\r\tif (conn == null) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(message == null)) {\r\t\thasArgument = 0;\r\t\tcurIter = 0;\r\t\tdbus_message_unref(message);\r\t}\r\tmessage = dbus_connection_pop_message(conn);\r\tif (message == null) {\r\t\t_return_value = interpreterProxy->integerObjectOf(0);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(1, _return_value);\r\t\treturn null;\r\t}\r\r\t/* if message contains argument initialize iterator */\r\r\tmsgType = dbus_message_get_type(message);\r\thasArgument = dbus_message_iter_init(message, &(messageIter[curIter]));\r\t_return_value = interpreterProxy->integerObjectOf(msgType);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\r\r/*\tcreate a dbus message from the given oop */\r\rEXPORT(sqInt) primitiveDBusCreateMessageFrom(void) {\r\tDBusMessage *tmpMsg;\r\tint msgType;\r\tchar * path;\r\tchar * destination;\r\tchar * interface;\r\tchar * method;\r\tsqInt m;\r\tsqInt _return_value;\r\tsqInt p;\r\tsqInt p1;\r\tsqInt p2;\r\tsqInt p3;\r\r\tm = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tmsgType = interpreterProxy->fetchIntegerofObject(0, m);\r\tif (interpreterProxy->failed()) {\r\t\tmsg(\"Can not fetch message type.\");\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\t/* begin fetchString:ofObject: */\r\tp1 = interpreterProxy->fetchPointerofObject(1, m);\r\tpath = stringOopToChar(p1);\r\tif ((interpreterProxy->fetchPointerofObject(2, m)) == (interpreterProxy->nilObject())) {\r\t\tinterface = null;\r\t} else {\r\t\t/* begin fetchString:ofObject: */\r\t\tp = interpreterProxy->fetchPointerofObject(2, m);\r\t\tinterface = stringOopToChar(p);\r\t}\r\t/* begin fetchString:ofObject: */\r\tp2 = interpreterProxy->fetchPointerofObject(3, m);\r\tmethod = stringOopToChar(p2);\r\t/* begin fetchString:ofObject: */\r\tp3 = interpreterProxy->fetchPointerofObject(5, m);\r\tdestination = stringOopToChar(p3);\r\r\t/* create Signal */\r\r\ttmpMsg = null;\r\tif (msgType == 4) {\r\t\ttmpMsg = dbus_message_new_signal(path, interface, method);\r\t}\r\tif (msgType == 1) {\r\t\ttmpMsg = dbus_message_new_method_call(destination, path, interface, method);\r\t}\r\tif (msgType == 2) {\r\t\ttmpMsg = createReplyTofrom(destination, m);\r\t}\r\tif (msgType == 3) {\r\t\ttmpMsg = createErrorTofrom(destination, m);\r\t}\r\tif (tmpMsg == null) {\r\t\tmsg(\"Can not create a message.\");\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\r\t/* cleaning */\r\r\twriteMessage = tmpMsg;\r\tif (!(path == null)) {\r\t\tfree(path);\r\t}\r\tif (!(interface == null)) {\r\t\tfree(interface);\r\t}\r\tif (!(method == null)) {\r\t\tfree(method);\r\t}\r\tif (!(destination == null)) {\r\t\tfree(destination);\r\t}\r\t_return_value = interpreterProxy->trueObject();\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\r\r/*\tinitialize an interator to write message arguments */\r\rEXPORT(sqInt) primitiveDBusInitializeWriteIterator(void) {\r\tif (writeMessage == null) {\r\t\tnull;\r\t} else {\r\t\tcurWriteIter = 0;\r\t\tdbus_message_iter_init_append(writeMessage, &writeMessageIter[curWriteIter]);\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\treturn null;\r}\r\r\r/*\tpops the topmost container from the iterator stack */\r\rEXPORT(sqInt) primitiveDBusIterCloseContainer(void) {\r\tif (curWriteIter == 0) {\r\t\tmsg(\"No open container available\");\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (dbus_message_iter_close_container( &writeMessageIter[curWriteIter-1], &writeMessageIter[curWriteIter])) {\r\t\tcurWriteIter -= 1;\r\t} else {\r\t\tmsg(\"Could not close container\");\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\treturn null;\r}\r\r\r/*\tpush a new container to the iterator stack. s is the signature which describes the content of the container */\r\rEXPORT(sqInt) primitiveDBusIterOpenContainerContains(void) {\r\tchar*cSig;\r\tsqInt isContainer;\r\tsqInt t;\r\tsqInt s;\r\tsqInt _return_value;\r\r\tt = interpreterProxy->stackIntegerValue(1);\r\ts = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\r\t/* struct and dict entry must not set signature */\r\r\tcSig = null;\r\tisContainer = 0;\r\tif (t == (DBUS_TYPE_ARRAY)) {\r\t\tisContainer = 1;\r\t\tif (!(s == (interpreterProxy->nilObject()))) {\r\t\t\tcSig = stringOopToChar(s);\r\t\t}\r\t\tif (cSig == null) {\r\t\t\tmsg(\"To write an array you have to specify the signature of the contained elements\");\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tif (t == (DBUS_TYPE_VARIANT)) {\r\t\tisContainer = 1;\r\t\tif (!(s == (interpreterProxy->nilObject()))) {\r\t\t\tcSig = stringOopToChar(s);\r\t\t}\r\t\tif (cSig == null) {\r\t\t\tmsg(\"To write a variant you have to specify the signature of the contained element\");\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tif (t == (DBUS_TYPE_STRUCT)) {\r\t\tisContainer = 1;\r\t}\r\tif (t == (DBUS_TYPE_DICT_ENTRY)) {\r\t\tisContainer = 1;\r\t}\r\tif (!(isContainer)) {\r\t\tfprintf(stderr, \"\\n%d is no container type\", t);\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\t_return_value = iterOpenContainercontains(t, cSig);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\r\r/*\tanswer the signature of the current iterator  */\r\rEXPORT(sqInt) primitiveDBusIteratorSignature(void) {\r\tsqInt strOop;\r\tchar*sig;\r\r\tsig = dbus_message_iter_get_signature(&messageIter[curIter]);\r\tstrOop = buildStringOopFromCharP(sig);\r\tdbus_free(sig);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, strOop);\r\treturn null;\r}\r\r\r/*\treturns the destination of the received message or nil if there is none set */\r\rEXPORT(sqInt) primitiveDBusMessageGetDestination(void) {\r\tconst char *str;\r\tsqInt _return_value;\r\r\tstr = null;\r\tstr = dbus_message_get_destination(message);\r\tif (str == null) {\r\t\treturn null;\r\t}\r\t_return_value = buildStringOopFromCharP(str);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\r\r/*\tanswer the name name of the received error (ERROR only) */\r\rEXPORT(sqInt) primitiveDBusMessageGetErrorName(void) {\r\tint msgType;\r\tconst char *str;\r\tsqInt _return_value;\r\r\r\t/* check if it is an error message */\r\r\tmsgType = 0;\r\tmsgType = dbus_message_get_type(message);\r\tif (!(msgType == 3)) {\r\t\t_return_value = interpreterProxy->nilObject();\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(1, _return_value);\r\t\treturn null;\r\t}\r\tstr = dbus_message_get_error_name(message);\r\t_return_value = buildStringOopFromCharP(str);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\r\r/*\treturns the interface the message is being sent to (METHOD_CALL) or emitted from (SIGNAL) */\r\rEXPORT(sqInt) primitiveDBusMessageGetInterface(void) {\r\tconst char *str;\r\tsqInt _return_value;\r\r\tstr = dbus_message_get_interface(message);\r\t_return_value = buildStringOopFromCharP(str);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\r\r/*\treturns the interface member beeing invoked (METHOD_CALL) or emitted (SIGNAL) */\r\rEXPORT(sqInt) primitiveDBusMessageGetMember(void) {\r\tconst char *str;\r\tsqInt _return_value;\r\r\tstr = null;\r\tstr = dbus_message_get_member(message);\r\t_return_value = buildStringOopFromCharP(str);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\r\r/*\treturns true if the method call expects no reply otherwise returns false */\r\rEXPORT(sqInt) primitiveDBusMessageGetNoReply(void) {\r\tsqInt _return_value;\r\r\tif (dbus_message_get_no_reply(message)) {\r\t\t_return_value = interpreterProxy->trueObject();\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(1, _return_value);\r\t\treturn null;\r\t}\r\t_return_value = interpreterProxy->falseObject();\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\r\r/*\treturns the object path the message is being sent to (METHOD_CALL) or being emitted from (SIGNAL) */\r\rEXPORT(sqInt) primitiveDBusMessageGetPath(void) {\r\tconst char *path;\r\tsqInt _return_value;\r\r\tpath = dbus_message_get_path(message);\r\t_return_value = buildStringOopFromCharP(path);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\r\r/*\treturns the serial of the message to which this message is a reply or 0 if none has been specified */\r\rEXPORT(sqInt) primitiveDBusMessageGetReplySerial(void) {\r\tdbus_uint32_t serial;\r\tsqInt _return_value;\r\r\tserial = 0;\r\tserial = dbus_message_get_reply_serial(message);\r\t_return_value = interpreterProxy->positive32BitIntegerFor(serial);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\r\r/*\treturns the unique name of the connection which orginatet the message, or nil if unknown or inapplicable */\r\rEXPORT(sqInt) primitiveDBusMessageGetSender(void) {\r\tconst char *str;\r\tsqInt _return_value;\r\r\tstr = null;\r\tstr = dbus_message_get_sender(message);\r\tif (str == null) {\r\t\treturn null;\r\t}\r\t_return_value = buildStringOopFromCharP(str);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\r\r/*\treturns the serial of the message or 0 if none has been specified */\r\rEXPORT(sqInt) primitiveDBusMessageGetSerial(void) {\r\tdbus_uint32_t serial;\r\tsqInt _return_value;\r\r\tserial = 0;\r\tserial = dbus_message_get_serial(message);\r\t_return_value = interpreterProxy->positive32BitIntegerFor(serial);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\r\r/*\treturns the type signature of the message */\r\rEXPORT(sqInt) primitiveDBusMessageGetSignature(void) {\r\tconst char *str;\r\tsqInt _return_value;\r\r\tstr = null;\r\tstr = dbus_message_get_signature(message);\r\tif (str == null) {\r\t\treturn null;\r\t}\r\t_return_value = buildStringOopFromCharP(str);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\r\r/*\treturns true if the received message has arguments */\r\rEXPORT(sqInt) primitiveDBusMessageHasArguments(void) {\r\tsqInt _return_value;\r\r\tif (!(hasArgument)) {\r\t\t_return_value = interpreterProxy->falseObject();\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(1, _return_value);\r\t\treturn null;\r\t}\r\t_return_value = interpreterProxy->trueObject();\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\r\r/*\tset the next message iterator as the current. anwers if there is a next iterator  */\r\rEXPORT(sqInt) primitiveDBusNextIterator(void) {\r\tsqInt _return_value;\r\r\tif (!(hasArgument)) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\thasArgument = dbus_message_iter_next(&messageIter[curIter]);\r\t_return_value = (hasArgument? interpreterProxy->trueObject(): interpreterProxy->falseObject());\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\r\r/*\tpops a message iterator from the iterator stack */\r\rEXPORT(sqInt) primitiveDBusPopMessageIterator(void) {\r\tsqInt _return_value;\r\r\tif (curIter > 0) {\r\t\tcurIter -= 1;\r\t\thasArgument = 1;\r\t\t_return_value = interpreterProxy->trueObject();\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(1, _return_value);\r\t\treturn null;\r\t}\r\t_return_value = interpreterProxy->falseObject();\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\r\r/*\tpush an iterator for reading variants, arrays or structs */\r\rEXPORT(sqInt) primitiveDBusPushMessageIterator(void) {\r\tint type;\r\r\tif (!(hasArgument)) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\ttype = 0;\r\ttype = dbus_message_iter_get_arg_type(&messageIter[curIter]);\r\tif (!(type == (DBUS_TYPE_VARIANT))) {\r\t\tif (!(type == (DBUS_TYPE_ARRAY))) {\r\t\t\tif (!(type == (DBUS_TYPE_DICT_ENTRY))) {\r\t\t\t\tif (!(type == (DBUS_TYPE_STRUCT))) {\r\t\t\t\t\tfprintf(stderr, \"Wrong argument type: %s\", dbus_message_iter_get_signature(&messageIter[curIter]) );\r\t\t\t\t\tinterpreterProxy->primitiveFail();\r\t\t\t\t\treturn null;\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t}\r\tdbus_message_iter_recurse(&messageIter[curIter], &messageIter[curIter+1]);\r\tcurIter += 1;\r\thasArgument = 1;\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\treturn null;\r}\r\r\r/*\tRegister a name at the connection */\r\rEXPORT(sqInt) primitiveDBusRegisterName(void) {\r\tsqInt rcvOop;\r\tint ret;\r\tchar*name;\r\tDBusConnection *conn;\r\tDBusError error;\r\tsqInt nameOop;\r\tsqInt _return_value;\r\r\tnameOop = interpreterProxy->stackValue(0);\r\trcvOop = interpreterProxy->stackValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tconn = getConnectionFromOop(rcvOop);\r\tif (conn == null) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tname = stringOopToChar(nameOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tdbus_error_init(&error);\r\tret = 0;\r\tret = dbus_bus_request_name( conn, name, DBUS_NAME_FLAG_REPLACE_EXISTING, &error);\r\tif (dbus_error_is_set(&error)) {\r\t\tmsg(((char*) (error.message)));\r\t\tdbus_error_free(&error);\r\t\tinterpreterProxy->primitiveFail();\r\t}\r\tfree(name);\r\t_return_value = interpreterProxy->integerObjectOf(ret);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\r\r/*\tRelease a registered name */\r\rEXPORT(sqInt) primitiveDBusReleaseName(void) {\r\tsqInt rcvOop;\r\tint ret;\r\tchar*name;\r\tDBusConnection *conn;\r\tDBusError error;\r\tsqInt nameOop;\r\tsqInt _return_value;\r\r\tnameOop = interpreterProxy->stackValue(0);\r\trcvOop = interpreterProxy->stackValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tconn = getConnectionFromOop(rcvOop);\r\tif (conn == null) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tname = stringOopToChar(nameOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tdbus_error_init(&error);\r\tret = 0;\r\tret = dbus_bus_release_name( conn, name, &error);\r\tif (dbus_error_is_set(&error)) {\r\t\tmsg(((char*) (error.message)));\r\t\tdbus_error_free(&error);\r\t\tinterpreterProxy->primitiveFail();\r\t}\r\tfree(name);\r\t_return_value = interpreterProxy->integerObjectOf(ret);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\r\r/*\tRemove match rule */\r\rEXPORT(sqInt) primitiveDBusRemoveMatch(void) {\r\tsqInt rcvOop;\r\tchar*rule;\r\tDBusConnection *conn;\r\tDBusError error;\r\tsqInt ruleOop;\r\tsqInt _return_value;\r\r\truleOop = interpreterProxy->stackValue(0);\r\trcvOop = interpreterProxy->stackValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tconn = getConnectionFromOop(rcvOop);\r\tif (conn == null) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\trule = stringOopToChar(ruleOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tdbus_error_init(&error);\r\tdbus_bus_remove_match( conn, rule, &error);\r\tdbus_connection_flush(conn);\r\tif (dbus_error_is_set(&error)) {\r\t\tmsg(((char*) (error.message)));\r\t\tdbus_error_free(&error);\r\t\tinterpreterProxy->primitiveFail();\r\t}\r\tfree(rule);\r\t_return_value = interpreterProxy->trueObject();\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\r\r/*\tsend the previously created message and return the serial of the message. If timeout is 0, do not generate a timeout error. If timeout is -1, use a default timeout. */\r\rEXPORT(sqInt) primitiveDBusSendMessageTimeout(void) {\r\tsqInt rcvOop;\r\tdbus_uint32_t serial;\r\tDBusConnection *conn;\r\tdbus_bool_t msgSent;\r\tsqInt timeoutMilliseconds;\r\tsqInt _return_value;\r\r\ttimeoutMilliseconds = interpreterProxy->stackIntegerValue(0);\r\trcvOop = interpreterProxy->stackValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tconn = getConnectionFromOop(rcvOop);\r\tif (conn == null) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (writeMessage == null) {\r\t\tmsg(\"no current message\");\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tserial = 0;\r\tmsgSent = 1;\r\tif (timeoutMilliseconds == 0) {\r\t\tmsgSent = dbus_connection_send(conn, writeMessage, &serial);\r\t} else {\r\t\tmsgSent = dbus_connection_send_with_reply(conn, writeMessage, NULL, timeoutMilliseconds);\r\t\tserial = dbus_message_get_serial(writeMessage);\r\t}\r\tdbus_message_unref(writeMessage);\r\tif (!(msgSent)) {\r\t\tmsg(\"message send failed\");\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\t_return_value = interpreterProxy->integerObjectOf(serial);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\r\r/*\tNote: This is coded so that is can be run from Squeak. */\r\rEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter) {\r\tsqInt ok;\r\r\tinterpreterProxy = anInterpreter;\r\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\r\tif (ok == 0) {\r\t\treturn 0;\r\t}\r\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\r\treturn ok;\r}\r\r\r/*\tif connected to a bus disconnect */\r\rEXPORT(sqInt) shutdownModule(void) {\r\tsqInt i;\r\r\tfor (i = 0; i <= 1; i += 1) {\r\t\tcloseConnection(i);\r\t}\r\treturn 1;\r}\r\rstatic sqInt sqAssert(sqInt aBool) {\r\t/* missing DebugCode */;\r}\r\r\r/*\tis called when the dbus want to add a watch handle. a filedescriptor for the watch will registered in the squeak loop */\r\rstatic dbus_bool_t sqDBusPluginAddWatchwithData(DBusWatch*watch, void*data) {\r\tsqInt fd;\r\tsqInt flag;\r\r\r\t/* get the file descriptor of the watch */\r\r\tflag = dbus_watch_get_flags(watch);\r\r\t/* set watch in data structure */\r\r\tfd = dbus_watch_get_fd(watch);\r\t((sqDBusData*)data)->watch = watch;\r\tif (flag & DBUS_WATCH_READABLE) {\r\t\taioEnable(fd, data, NULL);\r\t\t\t\t\t\t\taioHandle(fd, handleReadForFDwithDataandFlag , 1<<0 | 1<<1 | 1<<3);\r\t}\r\treturn 1;\r}\r\r\r/*\tfunction is called after a watch is dissabled an the data of the watch can be freed */\r\rstatic void sqDBusPluginFreeWatchData(void*data) {\r\tfree(data);\r}\r\r\r/*\tis called when the dbus want to remove a watch handle, the filedescriptor will disabled */\r\rstatic void sqDBusPluginRemoveWatchwithData(DBusWatch*watch, void*data) {\r\tsqInt fd;\r\r\tfd = dbus_watch_get_fd(watch);\r\taioDisable(fd);\r}\r\r\r/*\ttoggle the filedescriptor */\r\rstatic void sqDBusPluginToggleWatchwithData(DBusWatch*watch, void*data) {\r\tsqInt enable;\r\tsqInt fd;\r\r\tenable = dbus_watch_get_enabled(watch);\r\tfd = dbus_watch_get_fd(watch);\r\tif (enable) {\r\t\t((sqDBusData*)data)->watch = watch;\r\t\taioEnable(fd, data, NULL);\r\t} else {\r\t\taioDisable(fd);\r\t}\r}\r\r\r/*\tconvert a string oop to an char pointer which stores the content of the oop */\r\rstatic char * stringOopToChar(sqInt oop) {\r\tchar *tmpStr;\r\tint size;\r\tchar *t;\r\r\ttmpStr = ((char*) (interpreterProxy->arrayValueOf(oop)));\r\tif (interpreterProxy->failed()) {\r\t\tmsg(\"not a string\");\r\t\treturn null;\r\t}\r\tsize = interpreterProxy->byteSizeOf(oop);\r\tt = ((char*) (malloc(size+1)));\r\tmemcpy(t, tmpStr, size);\r\tt[size] = 0;\r\treturn t;\r}\r\r\r#ifdef SQUEAK_BUILTIN_PLUGIN\r\r\rvoid* DBusPlugin_exports[][3] = {\r\t{\"DBusPlugin\", \"primitiveDBusMessageHasArguments\", (void*)primitiveDBusMessageHasArguments},\r\t{\"DBusPlugin\", \"primitiveDBusArgumentGetBool\", (void*)primitiveDBusArgumentGetBool},\r\t{\"DBusPlugin\", \"primitiveDBusMessageGetReplySerial\", (void*)primitiveDBusMessageGetReplySerial},\r\t{\"DBusPlugin\", \"initialiseModule\", (void*)initialiseModule},\r\t{\"DBusPlugin\", \"primitiveDBusAddMatch\", (void*)primitiveDBusAddMatch},\r\t{\"DBusPlugin\", \"primitiveDBusArgumentGetType\", (void*)primitiveDBusArgumentGetType},\r\t{\"DBusPlugin\", \"primitiveDBusArgumentGetObjectPath\", (void*)primitiveDBusArgumentGetObjectPath},\r\t{\"DBusPlugin\", \"primitiveDBusArgumentGetUInt32\", (void*)primitiveDBusArgumentGetUInt32},\r\t{\"DBusPlugin\", \"primitiveDBusNextIterator\", (void*)primitiveDBusNextIterator},\r\t{\"DBusPlugin\", \"primitiveDBusArgumentGetUInt16\", (void*)primitiveDBusArgumentGetUInt16},\r\t{\"DBusPlugin\", \"primitiveDBusPopMessageIterator\", (void*)primitiveDBusPopMessageIterator},\r\t{\"DBusPlugin\", \"primitiveDBusArgumentGetInt64\", (void*)primitiveDBusArgumentGetInt64},\r\t{\"DBusPlugin\", \"primitiveDBusArgumentGetDouble\", (void*)primitiveDBusArgumentGetDouble},\r\t{\"DBusPlugin\", \"primitiveDBusArgumentGetByte\", (void*)primitiveDBusArgumentGetByte},\r\t{\"DBusPlugin\", \"getModuleName\", (void*)getModuleName},\r\t{\"DBusPlugin\", \"primitiveDBusMessageGetInterface\", (void*)primitiveDBusMessageGetInterface},\r\t{\"DBusPlugin\", \"primitiveDBusMessageGetMember\", (void*)primitiveDBusMessageGetMember},\r\t{\"DBusPlugin\", \"primitiveDBusArgumentGetString\", (void*)primitiveDBusArgumentGetString},\r\t{\"DBusPlugin\", \"primitiveDBusConnectionDispatchStatus\", (void*)primitiveDBusConnectionDispatchStatus},\r\t{\"DBusPlugin\", \"primitiveDBusSendMessageTimeout\", (void*)primitiveDBusSendMessageTimeout},\r\t{\"DBusPlugin\", \"primitiveDBusMessageGetSignature\", (void*)primitiveDBusMessageGetSignature},\r\t{\"DBusPlugin\", \"primitiveDBusIterCloseContainer\", (void*)primitiveDBusIterCloseContainer},\r\t{\"DBusPlugin\", \"primitiveDBusAppendBasicArgument\", (void*)primitiveDBusAppendBasicArgument},\r\t{\"DBusPlugin\", \"primitiveDBusPushMessageIterator\", (void*)primitiveDBusPushMessageIterator},\r\t{\"DBusPlugin\", \"primitiveDBusCreateMessageFrom\", (void*)primitiveDBusCreateMessageFrom},\r\t{\"DBusPlugin\", \"primitiveDBusIteratorSignature\", (void*)primitiveDBusIteratorSignature},\r\t{\"DBusPlugin\", \"primitiveDBusRegisterName\", (void*)primitiveDBusRegisterName},\r\t{\"DBusPlugin\", \"primitiveDBusArgumentGetUInt64\", (void*)primitiveDBusArgumentGetUInt64},\r\t{\"DBusPlugin\", \"primitiveDBusMessageGetDestination\", (void*)primitiveDBusMessageGetDestination},\r\t{\"DBusPlugin\", \"setInterpreter\", (void*)setInterpreter},\r\t{\"DBusPlugin\", \"primitiveDBusIterOpenContainerContains\", (void*)primitiveDBusIterOpenContainerContains},\r\t{\"DBusPlugin\", \"primitiveDBusReleaseName\", (void*)primitiveDBusReleaseName},\r\t{\"DBusPlugin\", \"primitiveDBusMessageGetNoReply\", (void*)primitiveDBusMessageGetNoReply},\r\t{\"DBusPlugin\", \"primitiveDBusMessageGetErrorName\", (void*)primitiveDBusMessageGetErrorName},\r\t{\"DBusPlugin\", \"primitiveDBusMessageGetSerial\", (void*)primitiveDBusMessageGetSerial},\r\t{\"DBusPlugin\", \"primitiveDBusMessageGetPath\", (void*)primitiveDBusMessageGetPath},\r\t{\"DBusPlugin\", \"primitiveDBusInitializeWriteIterator\", (void*)primitiveDBusInitializeWriteIterator},\r\t{\"DBusPlugin\", \"primitiveDBusConnectionClose\", (void*)primitiveDBusConnectionClose},\r\t{\"DBusPlugin\", \"primitiveDBusRemoveMatch\", (void*)primitiveDBusRemoveMatch},\r\t{\"DBusPlugin\", \"primitiveDBusArgumentGetSignature\", (void*)primitiveDBusArgumentGetSignature},\r\t{\"DBusPlugin\", \"primitiveDBusMessageGetSender\", (void*)primitiveDBusMessageGetSender},\r\t{\"DBusPlugin\", \"primitiveDBusArgumentGetInt32\", (void*)primitiveDBusArgumentGetInt32},\r\t{\"DBusPlugin\", \"primitiveDBusConnectionPopMessage\", (void*)primitiveDBusConnectionPopMessage},\r\t{\"DBusPlugin\", \"shutdownModule\", (void*)shutdownModule},\r\t{\"DBusPlugin\", \"primitiveDBusArgumentGetInt16\", (void*)primitiveDBusArgumentGetInt16},\r\t{NULL, NULL, NULL}\r};\r\r\r#endif /* ifdef SQ_BUILTIN_PLUGIN */\r\r"
  },
  {
    "path": "vm/src/from_squeak/unix/src/plugins/FileCopyPlugin/FileCopyPlugin.c",
    "content": "/* Automatically generated from Squeak on 23 January 2011 3:55:53 pm \r   by VMMaker 4.4.7\r */\r\r#include <math.h>\r#include <stdio.h>\r#include <stdlib.h>\r#include <string.h>\r#include <time.h>\r\r/* Default EXPORT macro that does nothing (see comment in sq.h): */\r#define EXPORT(returnType) returnType\r\r/* Do not include the entire sq.h file but just those parts needed. */\r/*  The virtual machine proxy definition */\r#include \"sqVirtualMachine.h\"\r/* Configuration options */\r#include \"sqConfig.h\"\r/* Platform specific definitions */\r#include \"sqPlatformSpecific.h\"\r\r#define true 1\r#define false 0\r#define null 0  /* using 'null' because nil is predefined in Think C */\r#ifdef SQUEAK_BUILTIN_PLUGIN\r#undef EXPORT\r// was #undef EXPORT(returnType) but screws NorCroft cc\r#define EXPORT(returnType) static returnType\r#endif\r\r#include \"sqMemoryAccess.h\"\r\r\r/*** Constants ***/\r\r/*** Function Prototypes ***/\rstatic VirtualMachine * getInterpreter(void);\r#pragma export on\rEXPORT(const char*) getModuleName(void);\r#pragma export off\rstatic sqInt halt(void);\rstatic sqInt msg(char *s);\r#pragma export on\rEXPORT(sqInt) primitiveFileCopyNamedTo(void);\rEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\r#pragma export off\rstatic sqInt sqAssert(sqInt aBool);\r/*** Variables ***/\r\r#ifdef SQUEAK_BUILTIN_PLUGIN\rextern\r#endif\rstruct VirtualMachine* interpreterProxy;\rstatic const char *moduleName =\r#ifdef SQUEAK_BUILTIN_PLUGIN\r\t\"FileCopyPlugin 23 January 2011 (i)\"\r#else\r\t\"FileCopyPlugin 23 January 2011 (e)\"\r#endif\r;\r\r\r\r/*\tNote: This is coded so that plugins can be run from Squeak. */\r\rstatic VirtualMachine * getInterpreter(void) {\r\treturn interpreterProxy;\r}\r\r\r/*\tNote: This is hardcoded so it can be run from Squeak.\r\tThe module name is used for validating a module *after*\r\tit is loaded to check if it does really contain the module\r\twe're thinking it contains. This is important! */\r\rEXPORT(const char*) getModuleName(void) {\r\treturn moduleName;\r}\r\rstatic sqInt halt(void) {\r\t;\r}\r\rstatic sqInt msg(char *s) {\r\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\r}\r\rEXPORT(sqInt) primitiveFileCopyNamedTo(void) {\r\tsqInt srcSz;\r\tsqInt dstSz;\r\tsqInt ok;\r\tchar *srcName;\r\tchar *dstName;\r\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(1)));\r\tsrcName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(1))));\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\r\tdstName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tsrcSz = interpreterProxy->slotSizeOf((oopForPointer( srcName ) - BASE_HEADER_SIZE));\r\tdstSz = interpreterProxy->slotSizeOf((oopForPointer( dstName ) - BASE_HEADER_SIZE));\r\tok = sqCopyFilesizetosize(srcName, srcSz, dstName, dstSz);\r\tif (!(ok)) {\r\t\tinterpreterProxy->primitiveFail();\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(2);\r\treturn null;\r}\r\r\r/*\tNote: This is coded so that is can be run from Squeak. */\r\rEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter) {\r\tsqInt ok;\r\r\tinterpreterProxy = anInterpreter;\r\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\r\tif (ok == 0) {\r\t\treturn 0;\r\t}\r\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\r\treturn ok;\r}\r\rstatic sqInt sqAssert(sqInt aBool) {\r\t/* missing DebugCode */;\r}\r\r\r#ifdef SQUEAK_BUILTIN_PLUGIN\r\r\rvoid* FileCopyPlugin_exports[][3] = {\r\t{\"FileCopyPlugin\", \"getModuleName\", (void*)getModuleName},\r\t{\"FileCopyPlugin\", \"setInterpreter\", (void*)setInterpreter},\r\t{\"FileCopyPlugin\", \"primitiveFileCopyNamedTo\", (void*)primitiveFileCopyNamedTo},\r\t{NULL, NULL, NULL}\r};\r\r\r#endif /* ifdef SQ_BUILTIN_PLUGIN */\r\r"
  },
  {
    "path": "vm/src/from_squeak/unix/src/plugins/GStreamerPlugin/GStreamerPlugin.c",
    "content": "/* Automatically generated from Squeak on 23 January 2011 3:55:55 pm \r   by VMMaker 4.4.7\r */\r\r#include <math.h>\r#include <stdio.h>\r#include <stdlib.h>\r#include <string.h>\r#include <time.h>\r\r/* Default EXPORT macro that does nothing (see comment in sq.h): */\r#define EXPORT(returnType) returnType\r\r/* Do not include the entire sq.h file but just those parts needed. */\r/*  The virtual machine proxy definition */\r#include \"sqVirtualMachine.h\"\r/* Configuration options */\r#include \"sqConfig.h\"\r/* Platform specific definitions */\r#include \"sqPlatformSpecific.h\"\r\r#define true 1\r#define false 0\r#define null 0  /* using 'null' because nil is predefined in Think C */\r#ifdef SQUEAK_BUILTIN_PLUGIN\r#undef EXPORT\r// was #undef EXPORT(returnType) but screws NorCroft cc\r#define EXPORT(returnType) static returnType\r#endif\r#include <gst/gst.h>\r#include <gst/controller/gstcontroller.h>\r#include \"squeakAudioVideoPipeLineSignalInterface.h\"\r\r#include \"sqMemoryAccess.h\"\r\r\r/*** Constants ***/\r\r/*** Function Prototypes ***/\rstatic sqInt cbnewpad(sqInt element, sqInt newPad, sqInt  *data);\rstatic VirtualMachine * getInterpreter(void);\r#pragma export on\rEXPORT(const char*) getModuleName(void);\r#pragma export off\rstatic sqInt halt(void);\rstatic sqInt initialiseModule(void);\rstatic sqInt msg(char *s);\rstatic sqInt positive64BitIntegerForOverride(sqLong integerValue);\r#pragma export on\rEXPORT(sqInt) primitiveSqueakSinkAllocate(void);\rEXPORT(sqInt) primitiveSqueakSinkAudioGetData(void);\rEXPORT(sqInt) primitiveSqueakSinkFree(void);\rEXPORT(sqInt) primitiveSqueakSinkGetFrameRateDenominator(void);\rEXPORT(sqInt) primitiveSqueakSinkGetFrameRateNumerator(void);\rEXPORT(sqInt) primitiveSqueakSinkGetHeight(void);\rEXPORT(sqInt) primitiveSqueakSinkGetWidth(void);\rEXPORT(sqInt) primitiveSqueakSinkVideo(void);\rEXPORT(sqInt) primitiveSqueakSrc(void);\rEXPORT(sqInt) primitiveSqueakSrcWithTime(void);\rEXPORT(sqInt) primitiveSqueakSrcAllocate(void);\rEXPORT(sqInt) primitivecallbacksignalseenfor(void);\rEXPORT(sqInt) primitivegetinterpreterproxy(void);\rEXPORT(sqInt) primitivegetoop(void);\rEXPORT(sqInt) primitivegobjectclasslistproperties(void);\rEXPORT(sqInt) primitivegobjectclasslistpropertyboolatIndex(void);\rEXPORT(sqInt) primitivegobjectclasslistpropertydoubleatIndex(void);\rEXPORT(sqInt) primitivegobjectclasslistpropertyenumatIndex(void);\rEXPORT(sqInt) primitivegobjectclasslistpropertyfloatatIndex(void);\rEXPORT(sqInt) primitivegobjectclasslistpropertyintatIndex(void);\rEXPORT(sqInt) primitivegobjectclasslistpropertylongatIndex(void);\rEXPORT(sqInt) primitivegobjectclasslistpropertylonglongatIndex(void);\rEXPORT(sqInt) primitivegobjectclasslistpropertymetaDataatIndex(void);\rEXPORT(sqInt) primitivegobjectclasslistpropertypointeratIndex(void);\rEXPORT(sqInt) primitivegobjectclasslistpropertystringatIndex(void);\rEXPORT(sqInt) primitivegobjectclasslistpropertyuintatIndex(void);\rEXPORT(sqInt) primitivegobjectclasslistpropertyulongatIndex(void);\rEXPORT(sqInt) primitivegobjectclasslistpropertyulonglongatIndex(void);\rEXPORT(sqInt) primitivegobjectfree(void);\rEXPORT(sqInt) primitivegobjectgetboolfrom(void);\rEXPORT(sqInt) primitivegobjectgetdoublefrom(void);\rEXPORT(sqInt) primitivegobjectgetfloatfrom(void);\rEXPORT(sqInt) primitivegobjectgetlongfrom(void);\rEXPORT(sqInt) primitivegobjectgetlonglongfrom(void);\rEXPORT(sqInt) primitivegobjectgetpointerfrom(void);\rEXPORT(sqInt) primitivegobjectgetsmalltalkobject(void);\rEXPORT(sqInt) primitivegobjectgetstringfrom(void);\rEXPORT(sqInt) primitivegobjectgetulongfrom(void);\rEXPORT(sqInt) primitivegobjectgetulonglongfrom(void);\rEXPORT(sqInt) primitivegobjectsetboolon(void);\rEXPORT(sqInt) primitivegobjectsetdoubleon(void);\rEXPORT(sqInt) primitivegobjectsetfloaton(void);\rEXPORT(sqInt) primitivegobjectsetlonglongon(void);\rEXPORT(sqInt) primitivegobjectsetlongon(void);\rEXPORT(sqInt) primitivegobjectsetpointeron(void);\rEXPORT(sqInt) primitivegobjectsetstringon(void);\rEXPORT(sqInt) primitivegobjectsetulonglongon(void);\rEXPORT(sqInt) primitivegobjectsetulongon(void);\rEXPORT(sqInt) primitivegsignalconnect(void);\rEXPORT(sqInt) primitivegstbinadd(void);\rEXPORT(sqInt) primitivegstbinnew(void);\rEXPORT(sqInt) primitivegstbushavepending(void);\rEXPORT(sqInt) primitivegstbuspeek(void);\rEXPORT(sqInt) primitivegstbuspop(void);\rEXPORT(sqInt) primitivegstbuspopfilter(void);\rEXPORT(sqInt) primitivegstcapsfromstring(void);\rEXPORT(sqInt) primitivegstcapstostring(void);\rEXPORT(sqInt) primitivegstelementadd(void);\rEXPORT(sqInt) primitivegstelementfactorycreate(void);\rEXPORT(sqInt) primitivegstelementfactoryfind(void);\rEXPORT(sqInt) primitivegstelementfactorygetauthor(void);\rEXPORT(sqInt) primitivegstelementfactorygetdescription(void);\rEXPORT(sqInt) primitivegstelementfactorygetklass(void);\rEXPORT(sqInt) primitivegstelementfactorygetlongname(void);\rEXPORT(sqInt) primitivegstelementfactorygeturitype(void);\rEXPORT(sqInt) primitivegstelementfactorymake(void);\rEXPORT(sqInt) primitivegstelementgetcompatiblepad(void);\rEXPORT(sqInt) primitivegstelementgetrequestpad(void);\rEXPORT(sqInt) primitivegstelementgetstate(void);\rEXPORT(sqInt) primitivegstelementgetstaticpad(void);\rEXPORT(sqInt) primitivegstelementgsignalconnect(void);\rEXPORT(sqInt) primitivegstelementlink(void);\rEXPORT(sqInt) primitivegstelementlinkfiltered(void);\rEXPORT(sqInt) primitivegstelementqueryconvert(void);\rEXPORT(sqInt) primitivegstelementqueryduration(void);\rEXPORT(sqInt) primitivegstelementqueryposition(void);\rEXPORT(sqInt) primitivegstelementreleaserequestpad(void);\rEXPORT(sqInt) primitivegstelementseek(void);\rEXPORT(sqInt) primitivegstelementseeksimple(void);\rEXPORT(sqInt) primitivegstelementsetstate(void);\rEXPORT(sqInt) primitivegstghostpadnew(void);\rEXPORT(sqInt) primitivegstinitcheck(void);\rEXPORT(sqInt) primitivegstmessageparsebuffering(void);\rEXPORT(sqInt) primitivegstmessageparseduration(void);\rEXPORT(sqInt) primitivegstmessageparseerror(void);\rEXPORT(sqInt) primitivegstmessageparseinfo(void);\rEXPORT(sqInt) primitivegstmessageparsesegmentdone(void);\rEXPORT(sqInt) primitivegstmessageparsesegmentstart(void);\rEXPORT(sqInt) primitivegstmessageparsestatechanged(void);\rEXPORT(sqInt) primitivegstmessageparsewarning(void);\rEXPORT(sqInt) primitivegstmessagesrc(void);\rEXPORT(sqInt) primitivegstmessagetypestring(void);\rEXPORT(sqInt) primitivegstmessageunref(void);\rEXPORT(sqInt) primitivegstobjectunref(void);\rEXPORT(sqInt) primitivegstpadacceptcaps(void);\rEXPORT(sqInt) primitivegstpadgetcaps(void);\rEXPORT(sqInt) primitivegstpadgetparentelement(void);\rEXPORT(sqInt) primitivegstpadlink(void);\rEXPORT(sqInt) primitivegstpadsetactive(void);\rEXPORT(sqInt) primitivegstpadsetcaps(void);\rEXPORT(sqInt) primitivegstpipelineautoclock(void);\rEXPORT(sqInt) primitivegstpipelinegetautoflushbus(void);\rEXPORT(sqInt) primitivegstpipelinegetbus(void);\rEXPORT(sqInt) primitivegstpipelinegetclock(void);\rEXPORT(sqInt) primitivegstpipelinegetdelay(void);\rEXPORT(sqInt) primitivegstpipelinegetlaststreamtime(void);\rEXPORT(sqInt) primitivegstpipelinenew(void);\rEXPORT(sqInt) primitivegstpipelinesetautoflushbus(void);\rEXPORT(sqInt) primitivegstpipelinesetclock(void);\rEXPORT(sqInt) primitivegstpipelinesetdelay(void);\rEXPORT(sqInt) primitivegstpipelinesetnewstreamtime(void);\rEXPORT(sqInt) primitivegstpipelineuseclock(void);\rEXPORT(sqInt) primitivegstregistryforksetenabled(void);\rEXPORT(sqInt) primitivegstsegtrapisenabled(void);\rEXPORT(sqInt) primitivegstsegtrapsetenabled(void);\rEXPORT(sqInt) primitivegstversionstring(void);\rEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\r#pragma export off\rstatic sqInt shutdownModule(void);\rstatic sqInt signed32BitValueOfOverride(sqInt oop);\rstatic sqInt signed64BitIntegerForOverride(sqLong integerValue);\rstatic sqLong signed64BitValueOfOverride(sqInt oop);\rstatic sqInt sqAssert(sqInt aBool);\rstatic sqInt stringFromCString(const char *aCString);\r/*** Variables ***/\rstatic gboolean callbackForPadHookupElement[128];\r\r#ifdef SQUEAK_BUILTIN_PLUGIN\rextern\r#endif\rstruct VirtualMachine* interpreterProxy;\rstatic const char *moduleName =\r#ifdef SQUEAK_BUILTIN_PLUGIN\r\t\"GStreamerPlugin 23 January 2011 (i)\"\r#else\r\t\"GStreamerPlugin 23 January 2011 (e)\"\r#endif\r;\r\r\r\r/*\tOk the trick here is on the signal pad_add we may have multiple pads being created.\r\tTherefore we must find the sink pad that can handle the request. Note for ogg you could have the \r\taudio and video stream for example */\r\rstatic sqInt cbnewpad(sqInt element, sqInt newPad, sqInt  *data) {\r\tsqInt result;\r\tsqInt i;\r\tGstPad*  gstPadValue;\r\tsqInt max;\r\tGstCaps*  gstCapsValue;\r\r\tmax = data[0];\r\tgstCapsValue = null;\r\tgstPadValue = null;\r\t;\r\t;\r\tresult = 0;\r\tfor (i = 1; i <= max; i += 1) {\r\t\tgstPadValue = ((GstPad*) (data[i]));\r\t\tgstCapsValue = gst_pad_get_caps (newPad);\r\t\tresult =  gst_pad_accept_caps (gstPadValue, gstCapsValue);\r\t\tif (result) {\r\t\t\tif (i < 128) {\r\t\t\t\tcallbackForPadHookupElement[i] = 1;\r\t\t\t}\r\t\t\tgst_pad_link (newPad, gstPadValue);\r\t\t\treturn null;\r\t\t}\r\t}\r}\r\r\r/*\tNote: This is coded so that plugins can be run from Squeak. */\r\rstatic VirtualMachine * getInterpreter(void) {\r\treturn interpreterProxy;\r}\r\r\r/*\tNote: This is hardcoded so it can be run from Squeak.\r\tThe module name is used for validating a module *after*\r\tit is loaded to check if it does really contain the module\r\twe're thinking it contains. This is important! */\r\rEXPORT(const char*) getModuleName(void) {\r\treturn moduleName;\r}\r\rstatic sqInt halt(void) {\r\t;\r}\r\r\r/*\tInitialise the module */\r\rstatic sqInt initialiseModule(void) {\r\treturn 1;\r}\r\rstatic sqInt msg(char *s) {\r\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\r}\r\r\r/*\tNote - integerValue is interpreted as POSITIVE, eg, as the result of\r\t\tBitmap>at:, or integer>bitAnd:. */\r\rstatic sqInt positive64BitIntegerForOverride(sqLong integerValue) {\r\tsqInt newLargeInteger;\r\tunsigned char *where;\r\tsqInt highWord;\r\tsqInt value;\r\tsqInt i;\r\tsqInt sz;\r\r\tif ((sizeof(integerValue)) == 4) {\r\t\treturn interpreterProxy->positive32BitIntegerFor(integerValue);\r\t}\r\r\t/* shift is coerced to usqInt otherwise */\r\r\thighWord = integerValue >> 32;\r\tif (highWord == 0) {\r\t\treturn interpreterProxy->positive32BitIntegerFor(integerValue);\r\t}\r\tsz = 5;\r\tif (!((highWord = ((usqInt) highWord) >> 8) == 0)) {\r\t\tsz += 1;\r\t}\r\tif (!((highWord = ((usqInt) highWord) >> 8) == 0)) {\r\t\tsz += 1;\r\t}\r\tif (!((highWord = ((usqInt) highWord) >> 8) == 0)) {\r\t\tsz += 1;\r\t}\r\tnewLargeInteger = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classLargePositiveInteger(), sz);\r\twhere = interpreterProxy->firstIndexableField(newLargeInteger);\r\tfor (i = 0; i <= (sz - 1); i += 1) {\r\t\tvalue = (integerValue >> (i * 8)) & 255;\r\t\twhere[i] = value;\r\t}\r\treturn newLargeInteger;\r}\r\rEXPORT(sqInt) primitiveSqueakSinkAllocate(void) {\r\tSqueakAudioVideoSinkPtr squeaker;\r\tGstElement*  gstElement;\r\tsqInt type;\r\tsqInt semaphoreIndex;\r\tsqInt gstElementOoop;\r\tsqInt _return_value;\r\r\ttype = interpreterProxy->stackIntegerValue(2);\r\tsemaphoreIndex = interpreterProxy->stackIntegerValue(1);\r\tgstElementOoop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstElement = ((GstElement*) (interpreterProxy->positive32BitValueOf(gstElementOoop)));\r\tsqueaker = 0;\r\t\r\t\tsqueaker = g_malloc0(sizeof(SqueakAudioVideoSink));\r\t\tif (type) \r\t\t\tsqueaker->handler = squeakVideoHandOff;\r\t\telse\r\t\t\tsqueaker->handler = squeakAudioHandOff;\r\t\tsqueaker->owner = gstElement;\r\t\tsqueaker->interpreterProxy = interpreterProxy;\r\t\tsqueaker->semaphoreIndexForSink = semaphoreIndex;\r\t\tsqueaker->prerollCounter = 5;\r\t;\r\t;\r\t_return_value = interpreterProxy->positive32BitIntegerFor(squeaker);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(4, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveSqueakSinkAudioGetData(void) {\r\tSqueakAudioVideoSinkPtr  sink;\r\tsqInt newBytes;\r\tsqInt aSqueakSinkObject;\r\tsqInt _return_value;\r\r\taSqueakSinkObject = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tsink = ((SqueakAudioVideoSinkPtr) (interpreterProxy->positive32BitValueOf(aSqueakSinkObject)));\r\tnewBytes = 0;\r\t;\r\t\r\tGST_LOCK(sink->owner);\r\tif (sink->copyToSendToSqueakAudio && GST_BUFFER_DATA(sink->copyToSendToSqueakAudio) \r\t\t&& GST_BUFFER_OFFSET_END(sink->copyToSendToSqueakAudio)) {\r\t\t\r\t/* Got data, yes lets move that into Squeak object space */ \r\t/* Also turn the semaphore off */\r\t\t\t\r\t\tnewBytes = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), \r\t\t\tGST_BUFFER_OFFSET_END(sink->copyToSendToSqueakAudio));\r\t\tif (newBytes) \r\t\t\tmemcpy(interpreterProxy->arrayValueOf(newBytes), GST_BUFFER_DATA(sink->copyToSendToSqueakAudio),\r\t\t\t\t GST_BUFFER_OFFSET_END(sink->copyToSendToSqueakAudio));\r\t\tGST_BUFFER_OFFSET_END(sink->copyToSendToSqueakAudio) = 0;\r\t}\r\r\tsink->semaphoreWasSignaled = 0;\r\tGST_UNLOCK(sink->owner);\r\tif (newBytes == 0) {\r\t\t_return_value = interpreterProxy->nilObject();\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(2, _return_value);\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, newBytes);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveSqueakSinkFree(void) {\r\tSqueakAudioVideoSinkPtr  squeakSinkObject;\r\tsqInt aSqueakSinkObject;\r\r\taSqueakSinkObject = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tsqueakSinkObject = ((SqueakAudioVideoSinkPtr) (interpreterProxy->positive32BitValueOf(aSqueakSinkObject)));\r\tif (squeakSinkObject-> copyToSendToSqueakAudio) gst_buffer_unref(squeakSinkObject-> copyToSendToSqueakAudio);\r\t\tif (squeakSinkObject-> copyToSendToSqueakVideo) g_free(squeakSinkObject->copyToSendToSqueakVideo); \r\t\tg_free(squeakSinkObject);\r\t;\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(1);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveSqueakSinkGetFrameRateDenominator(void) {\r\tSqueakAudioVideoSinkPtr  squeakSinkObject;\r\tsqInt value;\r\tsqInt aSqueakSinkObject;\r\tsqInt _return_value;\r\r\taSqueakSinkObject = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tsqueakSinkObject = ((SqueakAudioVideoSinkPtr) (interpreterProxy->positive32BitValueOf(aSqueakSinkObject)));\r\t;\r\tvalue = 0;\r\tvalue = squeakSinkObject->fps_d;\r\t_return_value = interpreterProxy->positive32BitIntegerFor(value);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveSqueakSinkGetFrameRateNumerator(void) {\r\tSqueakAudioVideoSinkPtr  squeakSinkObject;\r\tsqInt value;\r\tsqInt aSqueakSinkObject;\r\tsqInt _return_value;\r\r\taSqueakSinkObject = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tsqueakSinkObject = ((SqueakAudioVideoSinkPtr) (interpreterProxy->positive32BitValueOf(aSqueakSinkObject)));\r\t;\r\tvalue = 0;\r\tvalue = squeakSinkObject->fps_n;\r\t_return_value = interpreterProxy->positive32BitIntegerFor(value);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveSqueakSinkGetHeight(void) {\r\tSqueakAudioVideoSinkPtr  squeakSinkObject;\r\tsqInt value;\r\tsqInt aSqueakSinkObject;\r\tsqInt _return_value;\r\r\taSqueakSinkObject = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tsqueakSinkObject = ((SqueakAudioVideoSinkPtr) (interpreterProxy->positive32BitValueOf(aSqueakSinkObject)));\r\t;\r\tvalue = 0;\r\tvalue = squeakSinkObject->height;\r\t_return_value = interpreterProxy->positive32BitIntegerFor(value);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveSqueakSinkGetWidth(void) {\r\tSqueakAudioVideoSinkPtr  squeakSinkObject;\r\tsqInt value;\r\tsqInt aSqueakSinkObject;\r\tsqInt _return_value;\r\r\taSqueakSinkObject = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tsqueakSinkObject = ((SqueakAudioVideoSinkPtr) (interpreterProxy->positive32BitValueOf(aSqueakSinkObject)));\r\t;\r\tvalue = 0;\r\tvalue = squeakSinkObject->width;\r\t_return_value = interpreterProxy->positive32BitIntegerFor(value);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveSqueakSinkVideo(void) {\r\tsqInt returnValue;\r\tSqueakAudioVideoSinkPtr  sink;\r\tsqInt aSqueakSinkObject;\r\tsqInt aBitMap;\r\tsqInt _return_value;\r\r\taSqueakSinkObject = interpreterProxy->stackValue(1);\r\taBitMap = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tsink = ((SqueakAudioVideoSinkPtr) (interpreterProxy->positive32BitValueOf(aSqueakSinkObject)));\r\treturnValue = 0;\r\t;\r\t\r\tGST_LOCK(sink->owner);\r\tif (sink->allocbytes) {\r\t\t\r\t/* Got data, yes lets move that into Squeak object space */ \r\t/* Also turn the semaphore off */\r\t\tmemcpy(interpreterProxy->arrayValueOf(aBitMap), sink->copyToSendToSqueakVideo,sink->allocbytes);\r\t\treturnValue = sink->frame_ready;\r\t}\r\r\tsink->semaphoreWasSignaled = 0;\r\tsink->frame_ready = FALSE;\r\tGST_UNLOCK(sink->owner);\r\t_return_value = (returnValue) ? interpreterProxy->trueObject(): interpreterProxy->falseObject();\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveSqueakSrc(void) {\r\tsqInt doesFrameExist;\r\tSqueakAudioVideoSinkPtr  sink;\r\tsqInt aSqueakSinkObject;\r\tsqInt data;\r\tsqInt _return_value;\r\r\taSqueakSinkObject = interpreterProxy->stackValue(1);\r\tdata = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tsink = ((SqueakAudioVideoSinkPtr) (interpreterProxy->positive32BitValueOf(aSqueakSinkObject)));\r\t;\r\tdoesFrameExist = 0;\r\tdoesFrameExist = sink->frame_ready;\r\tif (doesFrameExist) {\r\t\t_return_value = (0) ? interpreterProxy->trueObject(): interpreterProxy->falseObject();\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, _return_value);\r\t\treturn null;\r\t}\r\t\r\tGST_LOCK(sink->owner);\r\tsink->actualbytes = interpreterProxy->byteSizeOf(data);\r\tif (sink->allocbytes && (sink->allocbytes >= sink->actualbytes)) {\r\t\tmemcpy(sink->copyToSendToSqueakVideo,interpreterProxy->arrayValueOf(data),sink->actualbytes);\r\t\tsink->frame_ready = TRUE;\r\t}\r\r\tGST_UNLOCK(sink->owner);\r\t_return_value = (1) ? interpreterProxy->trueObject(): interpreterProxy->falseObject();\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveSqueakSrcWithTime(void) {\r\tGstClockTime  startTimeValue;\r\tGstClockTime  durationValue;\r\tsqInt doesFrameExist;\r\tSqueakAudioVideoSinkPtr  sink;\r\tsqInt aSqueakSinkObject;\r\tsqInt data;\r\tsqInt startTime;\r\tsqInt duration;\r\tsqInt _return_value;\r\r\taSqueakSinkObject = interpreterProxy->stackValue(3);\r\tdata = interpreterProxy->stackValue(2);\r\tstartTime = interpreterProxy->stackValue(1);\r\tduration = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tsink = ((SqueakAudioVideoSinkPtr) (interpreterProxy->positive32BitValueOf(aSqueakSinkObject)));\r\tstartTimeValue = ((GstClockTime) (interpreterProxy->positive64BitValueOf(startTime)));\r\tdurationValue = ((GstClockTime) (interpreterProxy->positive64BitValueOf(duration)));\r\t;\r\t;\r\t;\r\tdoesFrameExist = 0;\r\tdoesFrameExist = sink->frame_ready;\r\tif (doesFrameExist) {\r\t\t_return_value = (0) ? interpreterProxy->trueObject(): interpreterProxy->falseObject();\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(5, _return_value);\r\t\treturn null;\r\t}\r\t\r\tGST_LOCK(sink->owner);\r\tsink->actualbytes = interpreterProxy->byteSizeOf(data);\r\tif (sink->allocbytes && (sink->allocbytes >= sink->actualbytes)) {\r\t\tmemcpy(sink->copyToSendToSqueakVideo,interpreterProxy->arrayValueOf(data),sink->actualbytes);\r\t\tsink->frame_ready = TRUE;\r\t\tsink->startTime = startTimeValue;\r\t\tsink->duration = durationValue;\r\t}\r\r\tGST_UNLOCK(sink->owner);\r\t_return_value = (1) ? interpreterProxy->trueObject(): interpreterProxy->falseObject();\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(5, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveSqueakSrcAllocate(void) {\r\tSqueakAudioVideoSinkPtr squeaker;\r\tGstElement*  gstElement;\r\tsqInt numberOfBytes;\r\tsqInt semaphoreIndex;\r\tsqInt gstElementOoop;\r\tsqInt _return_value;\r\r\tnumberOfBytes = interpreterProxy->stackIntegerValue(2);\r\tsemaphoreIndex = interpreterProxy->stackIntegerValue(1);\r\tgstElementOoop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstElement = ((GstElement*) (interpreterProxy->positive32BitValueOf(gstElementOoop)));\r\tsqueaker = 0;\r\t\r\t\tsqueaker = g_malloc0(sizeof(SqueakAudioVideoSink));\r\t\tsqueaker->handler = squeakSrcHandOff;\r\t\tsqueaker->owner = gstElement;\r\t\tsqueaker->semaphoreIndexForSink = semaphoreIndex;\r\t\tsqueaker->copyToSendToSqueakVideo = g_malloc(numberOfBytes);\r\t\tsqueaker->allocbytes = numberOfBytes;\r\t\tsqueaker->interpreterProxy = interpreterProxy;\r\t;\r\t;\r\t_return_value = interpreterProxy->positive32BitIntegerFor(squeaker);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(4, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivecallbacksignalseenfor(void) {\r\tgboolean  value;\r\tsqInt aIndex;\r\tsqInt _return_value;\r\r\taIndex = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tvalue = 0;\r\tif ((aIndex < 1) || (aIndex > 127)) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tvalue = callbackForPadHookupElement[aIndex];\r\t_return_value = (value) ? interpreterProxy->trueObject(): interpreterProxy->falseObject();\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegetinterpreterproxy(void) {\r\tsqInt _return_value;\r\r\t_return_value = interpreterProxy->positive32BitIntegerFor(interpreterProxy);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegetoop(void) {\r\tvoid  *oopThing;\r\tsqInt aHopefullObject;\r\r\taHopefullObject = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\toopThing = ((void *) (interpreterProxy->positive32BitValueOf(aHopefullObject)));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, oopThing);\r\treturn null;\r}\r\r\r/*\tReturns an array element 1 is numer of properties, number 2 is array of GParamSpec* for all properties of a class. */\r\rEXPORT(sqInt) primitivegobjectclasslistproperties(void) {\r\t GParamSpec **  propertyspecs;\r\tguint  numproperties;\r\tsqInt propertyspecsOop;\r\tGstElement*  element;\r\tsqInt arrayOop;\r\tsqInt numpropertiesOop;\r\tsqInt elementOop;\r\r\telementOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tpropertyspecs = null;\r\tnumproperties = 0;\r\telement = ((GstElement*) (interpreterProxy->positive32BitValueOf(elementOop)));\r\tpropertyspecs = g_object_class_list_properties(G_OBJECT_GET_CLASS (element), &numproperties);;\r\t;\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2));\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->positive32BitIntegerFor(numproperties));\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->positive32BitIntegerFor(propertyspecs));\r\tpropertyspecsOop = interpreterProxy->popRemappableOop();\r\tnumpropertiesOop = interpreterProxy->popRemappableOop();\r\tarrayOop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(0, arrayOop, numpropertiesOop);\r\tinterpreterProxy->storePointerofObjectwithValue(1, arrayOop, propertyspecsOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, arrayOop);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegobjectclasslistpropertyboolatIndex(void) {\r\tsqInt defaultValueOop;\r\tsqInt boolValueOop;\r\tsqInt readable;\r\tgboolean defaultValue;\r\tGParamSpecBoolean *pstring;\r\tGParamSpec *param;\r\tsqInt arrayOop;\r\t GParamSpec **  propertyspecs;\r\tgboolean boolValue;\r\tGValue valueType = { 0, };\r\tsqInt index;\r\tsqInt propertyspecsOop;\r\r\tindex = interpreterProxy->stackIntegerValue(1);\r\tpropertyspecsOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tdefaultValue = 0;\r\tboolValue = 0;\r\tparam = 0;\r\t;\r\tpstring = 0;\r\t;\r\tpropertyspecs = ((GParamSpec **) (interpreterProxy->positive32BitValueOf(propertyspecsOop)));\r\t;\r\tparam = propertyspecs[index];\r\tpstring = G_PARAM_SPEC_BOOLEAN (param);\r\t\tdefaultValue = pstring->default_value;\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2));\r\tdefaultValueOop = (defaultValue) ? interpreterProxy->trueObject(): interpreterProxy->falseObject();\r\tinterpreterProxy->pushRemappableOop(defaultValueOop);\r\treadable = 0;\r\tif (param->flags & G_PARAM_READABLE) readable = 1;\r\tif (readable) {\r\t\tg_value_init (&valueType, param->value_type);\r\t\t\t\t\tboolValue = g_value_get_boolean (&valueType);\r\t\tboolValueOop = (boolValue) ? interpreterProxy->trueObject(): interpreterProxy->falseObject();\r\t} else {\r\t\tboolValueOop = interpreterProxy->nilObject();\r\t}\r\t;\r\tinterpreterProxy->pushRemappableOop(boolValueOop);\r\tboolValueOop = interpreterProxy->popRemappableOop();\r\tdefaultValueOop = interpreterProxy->popRemappableOop();\r\tarrayOop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(0, arrayOop, defaultValueOop);\r\tinterpreterProxy->storePointerofObjectwithValue(1, arrayOop, boolValueOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, arrayOop);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegobjectclasslistpropertydoubleatIndex(void) {\r\tsqInt doubleValue;\r\tsqInt defaultValueOop;\r\tgdouble minimumValue;\r\tsqInt minimumValueOop;\r\tgdouble defaultValue;\r\tsqInt readable;\r\tsqInt maximumValueOop;\r\tGParamSpecDouble *pstring;\r\tGParamSpec *param;\r\tsqInt arrayOop;\r\t GParamSpec **  propertyspecs;\r\tsqInt doubleValueOop;\r\tsqInt longValueOop;\r\tGValue valueType = { 0, };\r\tgdouble maximumValue;\r\tsqInt index;\r\tsqInt propertyspecsOop;\r\r\tindex = interpreterProxy->stackIntegerValue(1);\r\tpropertyspecsOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tdefaultValue = 0;\r\tdoubleValue = 0;\r\tparam = 0;\r\t;\r\tpstring = 0;\r\t;\r\tpropertyspecs = ((GParamSpec **) (interpreterProxy->positive32BitValueOf(propertyspecsOop)));\r\t;\r\tparam = propertyspecs[index];\r\tpstring = G_PARAM_SPEC_DOUBLE (param);\r\t\tdefaultValue = pstring->default_value;\r\t\tminimumValue = pstring->minimum;\r\t\tmaximumValue = pstring->maximum;\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 4));\r\tdefaultValueOop = interpreterProxy->floatObjectOf(defaultValue);\r\tinterpreterProxy->pushRemappableOop(defaultValueOop);\r\tminimumValueOop = interpreterProxy->floatObjectOf(minimumValue);\r\tinterpreterProxy->pushRemappableOop(minimumValueOop);\r\tmaximumValueOop = interpreterProxy->floatObjectOf(maximumValue);\r\tinterpreterProxy->pushRemappableOop(maximumValueOop);\r\treadable = 0;\r\tif (param->flags & G_PARAM_READABLE) readable = 1;\r\tif (readable) {\r\t\tg_value_init (&valueType, param->value_type);\r\t\t\t\t\tdoubleValue = g_value_get_double (&valueType);\r\t\tdoubleValueOop = interpreterProxy->floatObjectOf(doubleValue);\r\t} else {\r\t\tdoubleValueOop = interpreterProxy->nilObject();\r\t}\r\t;\r\tinterpreterProxy->pushRemappableOop(doubleValueOop);\r\tlongValueOop = interpreterProxy->popRemappableOop();\r\tmaximumValueOop = interpreterProxy->popRemappableOop();\r\tminimumValueOop = interpreterProxy->popRemappableOop();\r\tdefaultValueOop = interpreterProxy->popRemappableOop();\r\tarrayOop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(0, arrayOop, defaultValueOop);\r\tinterpreterProxy->storePointerofObjectwithValue(1, arrayOop, longValueOop);\r\tinterpreterProxy->storePointerofObjectwithValue(2, arrayOop, minimumValueOop);\r\tinterpreterProxy->storePointerofObjectwithValue(3, arrayOop, maximumValueOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, arrayOop);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegobjectclasslistpropertyenumatIndex(void) {\r\tlong longValue;\r\tsqInt defaultValueOop;\r\tlong defaultValue;\r\tsqInt readable;\r\tGParamSpecEnum *pstring;\r\tGParamSpec *param;\r\tsqInt arrayOop;\r\t GParamSpec **  propertyspecs;\r\tsqInt longValueOop;\r\tGValue valueType = { 0, };\r\tsqInt index;\r\tsqInt propertyspecsOop;\r\r\tindex = interpreterProxy->stackIntegerValue(1);\r\tpropertyspecsOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tdefaultValue = 0;\r\tlongValue = 0;\r\tparam = 0;\r\t;\r\tpstring = 0;\r\t;\r\tpropertyspecs = ((GParamSpec **) (interpreterProxy->positive32BitValueOf(propertyspecsOop)));\r\t;\r\tparam = propertyspecs[index];\r\tpstring = G_PARAM_SPEC_ENUM (param);\r\t\tdefaultValue = pstring->default_value;\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2));\r\tdefaultValueOop = interpreterProxy->positive32BitIntegerFor(defaultValue);\r\tinterpreterProxy->pushRemappableOop(defaultValueOop);\r\treadable = 0;\r\tif (param->flags & G_PARAM_READABLE) readable = 1;\r\tif (readable) {\r\t\tg_value_init (&valueType, param->value_type);\r\t\t\t\t\tlongValue = g_value_get_enum (&valueType);\r\t\tlongValueOop = interpreterProxy->positive32BitIntegerFor(longValue);\r\t} else {\r\t\tlongValueOop = interpreterProxy->nilObject();\r\t}\r\t;\r\tinterpreterProxy->pushRemappableOop(longValueOop);\r\tlongValueOop = interpreterProxy->popRemappableOop();\r\tdefaultValueOop = interpreterProxy->popRemappableOop();\r\tarrayOop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(0, arrayOop, defaultValueOop);\r\tinterpreterProxy->storePointerofObjectwithValue(1, arrayOop, longValueOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, arrayOop);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegobjectclasslistpropertyfloatatIndex(void) {\r\tsqInt floatValueOop;\r\tsqInt defaultValueOop;\r\tgfloat minimumValue;\r\tgfloat floatValue;\r\tsqInt minimumValueOop;\r\tgfloat defaultValue;\r\tsqInt readable;\r\tsqInt maximumValueOop;\r\tGParamSpecFloat *pstring;\r\tGParamSpec *param;\r\tsqInt arrayOop;\r\t GParamSpec **  propertyspecs;\r\tgfloat maximumValue;\r\tGValue valueType = { 0, };\r\tsqInt index;\r\tsqInt propertyspecsOop;\r\r\tindex = interpreterProxy->stackIntegerValue(1);\r\tpropertyspecsOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tdefaultValue = 0;\r\tfloatValue = 0;\r\tparam = 0;\r\t;\r\tpstring = 0;\r\t;\r\tpropertyspecs = ((GParamSpec **) (interpreterProxy->positive32BitValueOf(propertyspecsOop)));\r\t;\r\tparam = propertyspecs[index];\r\tpstring = G_PARAM_SPEC_FLOAT (param);\r\t\tdefaultValue = pstring->default_value;\r\t\tminimumValue = pstring->minimum;\r\t\tmaximumValue = pstring->maximum;\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 4));\r\tdefaultValueOop = interpreterProxy->floatObjectOf(defaultValue);\r\tinterpreterProxy->pushRemappableOop(defaultValueOop);\r\tminimumValueOop = interpreterProxy->floatObjectOf(minimumValue);\r\tinterpreterProxy->pushRemappableOop(minimumValueOop);\r\tmaximumValueOop = interpreterProxy->floatObjectOf(maximumValue);\r\tinterpreterProxy->pushRemappableOop(maximumValueOop);\r\treadable = 0;\r\tif (param->flags & G_PARAM_READABLE) readable = 1;\r\tif (readable) {\r\t\tg_value_init (&valueType, param->value_type);\r\t\t\t\t\tfloatValue = g_value_get_float (&valueType);\r\t\tfloatValueOop = interpreterProxy->floatObjectOf(floatValue);\r\t} else {\r\t\tfloatValueOop = interpreterProxy->nilObject();\r\t}\r\t;\r\tinterpreterProxy->pushRemappableOop(floatValueOop);\r\tfloatValueOop = interpreterProxy->popRemappableOop();\r\tmaximumValueOop = interpreterProxy->popRemappableOop();\r\tminimumValueOop = interpreterProxy->popRemappableOop();\r\tdefaultValueOop = interpreterProxy->popRemappableOop();\r\tarrayOop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(0, arrayOop, defaultValueOop);\r\tinterpreterProxy->storePointerofObjectwithValue(1, arrayOop, floatValueOop);\r\tinterpreterProxy->storePointerofObjectwithValue(2, arrayOop, minimumValueOop);\r\tinterpreterProxy->storePointerofObjectwithValue(3, arrayOop, maximumValueOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, arrayOop);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegobjectclasslistpropertyintatIndex(void) {\r\tsqInt intValueOop;\r\tsqInt defaultValueOop;\r\tint minimumValue;\r\tint intValue;\r\tint defaultValue;\r\tsqInt readable;\r\tsqInt minimumValueOop;\r\tsqInt maximumValueOop;\r\tGParamSpecInt *pstring;\r\tGParamSpec *param;\r\tsqInt arrayOop;\r\t GParamSpec **  propertyspecs;\r\tint maximumValue;\r\tGValue valueType = { 0, };\r\tsqInt index;\r\tsqInt propertyspecsOop;\r\r\tindex = interpreterProxy->stackIntegerValue(1);\r\tpropertyspecsOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tdefaultValue = 0;\r\tintValue = 0;\r\tparam = 0;\r\t;\r\tpstring = 0;\r\t;\r\tpropertyspecs = ((GParamSpec **) (interpreterProxy->positive32BitValueOf(propertyspecsOop)));\r\t;\r\tparam = propertyspecs[index];\r\tpstring = G_PARAM_SPEC_INT (param);\r\t\tdefaultValue = pstring->default_value;\r\t\tminimumValue = pstring->minimum;\r\t\tmaximumValue = pstring->maximum;\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 4));\r\tdefaultValueOop = interpreterProxy->signed32BitIntegerFor(defaultValue);\r\tinterpreterProxy->pushRemappableOop(defaultValueOop);\r\tminimumValueOop = interpreterProxy->signed32BitIntegerFor(minimumValue);\r\tinterpreterProxy->pushRemappableOop(minimumValueOop);\r\tmaximumValueOop = interpreterProxy->signed32BitIntegerFor(maximumValue);\r\tinterpreterProxy->pushRemappableOop(maximumValueOop);\r\treadable = 0;\r\tif (param->flags & G_PARAM_READABLE) readable = 1;\r\tif (readable) {\r\t\tg_value_init (&valueType, param->value_type);\r\t\t\t\t\tintValue = g_value_get_int (&valueType);\r\t\tintValueOop = interpreterProxy->signed32BitIntegerFor(intValue);\r\t} else {\r\t\tintValueOop = interpreterProxy->nilObject();\r\t}\r\t;\r\tinterpreterProxy->pushRemappableOop(intValueOop);\r\tintValueOop = interpreterProxy->popRemappableOop();\r\tmaximumValueOop = interpreterProxy->popRemappableOop();\r\tminimumValueOop = interpreterProxy->popRemappableOop();\r\tdefaultValueOop = interpreterProxy->popRemappableOop();\r\tarrayOop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(0, arrayOop, defaultValueOop);\r\tinterpreterProxy->storePointerofObjectwithValue(1, arrayOop, intValueOop);\r\tinterpreterProxy->storePointerofObjectwithValue(2, arrayOop, minimumValueOop);\r\tinterpreterProxy->storePointerofObjectwithValue(3, arrayOop, maximumValueOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, arrayOop);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegobjectclasslistpropertylongatIndex(void) {\r\tlong longValue;\r\tsqInt defaultValueOop;\r\tlong minimumValue;\r\tsqInt minimumValueOop;\r\tlong defaultValue;\r\tsqInt readable;\r\tsqInt maximumValueOop;\r\tGParamSpecLong *pstring;\r\tGParamSpec *param;\r\tsqInt arrayOop;\r\t GParamSpec **  propertyspecs;\r\tsqInt longValueOop;\r\tGValue valueType = { 0, };\r\tlong maximumValue;\r\tsqInt index;\r\tsqInt propertyspecsOop;\r\r\tindex = interpreterProxy->stackIntegerValue(1);\r\tpropertyspecsOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tdefaultValue = 0;\r\tlongValue = 0;\r\tparam = 0;\r\t;\r\tpstring = 0;\r\t;\r\tpropertyspecs = ((GParamSpec **) (interpreterProxy->positive32BitValueOf(propertyspecsOop)));\r\t;\r\tparam = propertyspecs[index];\r\tpstring = G_PARAM_SPEC_LONG (param);\r\t\tdefaultValue = pstring->default_value;\r\t\tminimumValue = pstring->minimum;\r\t\tmaximumValue = pstring->maximum;\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 4));\r\tdefaultValueOop = interpreterProxy->signed32BitIntegerFor(defaultValue);\r\tinterpreterProxy->pushRemappableOop(defaultValueOop);\r\tminimumValueOop = interpreterProxy->signed32BitIntegerFor(minimumValue);\r\tinterpreterProxy->pushRemappableOop(minimumValueOop);\r\tmaximumValueOop = interpreterProxy->signed32BitIntegerFor(maximumValue);\r\tinterpreterProxy->pushRemappableOop(maximumValueOop);\r\treadable = 0;\r\tif (param->flags & G_PARAM_READABLE) readable = 1;\r\tif (readable) {\r\t\tg_value_init (&valueType, param->value_type);\r\t\t\t\t\tlongValue = g_value_get_long (&valueType);\r\t\tlongValueOop = interpreterProxy->signed32BitIntegerFor(longValue);\r\t} else {\r\t\tlongValueOop = interpreterProxy->nilObject();\r\t}\r\t;\r\tinterpreterProxy->pushRemappableOop(longValueOop);\r\tlongValueOop = interpreterProxy->popRemappableOop();\r\tmaximumValueOop = interpreterProxy->popRemappableOop();\r\tminimumValueOop = interpreterProxy->popRemappableOop();\r\tdefaultValueOop = interpreterProxy->popRemappableOop();\r\tarrayOop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(0, arrayOop, defaultValueOop);\r\tinterpreterProxy->storePointerofObjectwithValue(1, arrayOop, longValueOop);\r\tinterpreterProxy->storePointerofObjectwithValue(2, arrayOop, minimumValueOop);\r\tinterpreterProxy->storePointerofObjectwithValue(3, arrayOop, maximumValueOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, arrayOop);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegobjectclasslistpropertylonglongatIndex(void) {\r\tsqInt defaultValueOop;\r\tlong long minimumValue;\r\tlong long longlongValue;\r\tlong long defaultValue;\r\tsqInt readable;\r\tsqInt minimumValueOop;\r\tsqInt maximumValueOop;\r\tGParamSpecInt64 *pstring;\r\tGParamSpec *param;\r\tsqInt arrayOop;\r\t GParamSpec **  propertyspecs;\r\tlong long maximumValue;\r\tGValue valueType = { 0, };\r\tsqInt longlongValueOop;\r\tsqInt index;\r\tsqInt propertyspecsOop;\r\r\tindex = interpreterProxy->stackIntegerValue(1);\r\tpropertyspecsOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tdefaultValue = 0;\r\tlonglongValue = 0;\r\tparam = 0;\r\t;\r\tpstring = 0;\r\t;\r\tpropertyspecs = ((GParamSpec **) (interpreterProxy->positive32BitValueOf(propertyspecsOop)));\r\t;\r\tparam = propertyspecs[index];\r\tpstring = G_PARAM_SPEC_INT64 (param);\r\t\tdefaultValue = pstring->default_value;\r\t\tminimumValue = pstring->minimum;\r\t\tmaximumValue = pstring->maximum;\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 4));\r\tdefaultValueOop = signed64BitIntegerForOverride(defaultValue);\r\tinterpreterProxy->pushRemappableOop(defaultValueOop);\r\tminimumValueOop = signed64BitIntegerForOverride(minimumValue);\r\tinterpreterProxy->pushRemappableOop(minimumValueOop);\r\tmaximumValueOop = signed64BitIntegerForOverride(maximumValue);\r\tinterpreterProxy->pushRemappableOop(maximumValueOop);\r\treadable = 0;\r\tif (param->flags & G_PARAM_READABLE) readable = 1;\r\tif (readable) {\r\t\tg_value_init (&valueType, param->value_type);\r\t\t\t\t\tlonglongValue = g_value_get_int64 (&valueType);\r\t\tlonglongValueOop = signed64BitIntegerForOverride(longlongValue);\r\t} else {\r\t\tlonglongValueOop = interpreterProxy->nilObject();\r\t}\r\t;\r\tinterpreterProxy->pushRemappableOop(longlongValueOop);\r\tlonglongValueOop = interpreterProxy->popRemappableOop();\r\tmaximumValueOop = interpreterProxy->popRemappableOop();\r\tminimumValueOop = interpreterProxy->popRemappableOop();\r\tdefaultValueOop = interpreterProxy->popRemappableOop();\r\tarrayOop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(0, arrayOop, defaultValueOop);\r\tinterpreterProxy->storePointerofObjectwithValue(1, arrayOop, longlongValueOop);\r\tinterpreterProxy->storePointerofObjectwithValue(2, arrayOop, minimumValueOop);\r\tinterpreterProxy->storePointerofObjectwithValue(3, arrayOop, maximumValueOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, arrayOop);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegobjectclasslistpropertymetaDataatIndex(void) {\r\tsqInt valueCode;\r\tsqInt blurbOop;\r\tsqInt readwriteOop;\r\t char *  name;\r\tsqInt nameOop;\r\t char *  blurb;\r\tGParamSpec *param;\r\tsqInt arrayOop;\r\t GParamSpec **  propertyspecs;\r\tsqInt readwrite;\r\tGValue valueType = { 0, };\r\tsqInt valueCodeOop;\r\tsqInt index;\r\tsqInt propertyspecsOop;\r\r\tindex = interpreterProxy->stackIntegerValue(1);\r\tpropertyspecsOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tpropertyspecs = ((GParamSpec **) (interpreterProxy->positive32BitValueOf(propertyspecsOop)));\r\t;\r\tparam = 0;\r\t;\r\tparam = propertyspecs[index];\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 4));\r\tg_value_init (&valueType, param->value_type); \r\t\tvalueCode = G_VALUE_TYPE (&valueType);\r\t\tname = g_param_spec_get_name (param);\r\t\tblurb = g_param_spec_get_blurb (param);;\r\tnameOop = stringFromCString(name);\r\tinterpreterProxy->pushRemappableOop(nameOop);\r\tblurbOop = stringFromCString(blurb);\r\tinterpreterProxy->pushRemappableOop(blurbOop);\r\treadwrite = 0;\r\t\r\t\tif (param->flags & G_PARAM_READABLE) readwrite = 1;\r\t\tif (param->flags & G_PARAM_WRITABLE) readwrite = readwrite+2;\r\t\tif (param->flags & GST_PARAM_CONTROLLABLE) readwrite = readwrite+4;;\r\t;\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->integerObjectOf(readwrite));\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->integerObjectOf(valueCode));\r\tvalueCodeOop = interpreterProxy->popRemappableOop();\r\treadwriteOop = interpreterProxy->popRemappableOop();\r\tblurbOop = interpreterProxy->popRemappableOop();\r\tnameOop = interpreterProxy->popRemappableOop();\r\tarrayOop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(0, arrayOop, nameOop);\r\tinterpreterProxy->storePointerofObjectwithValue(1, arrayOop, blurbOop);\r\tinterpreterProxy->storePointerofObjectwithValue(2, arrayOop, readwriteOop);\r\tinterpreterProxy->storePointerofObjectwithValue(3, arrayOop, valueCodeOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, arrayOop);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegobjectclasslistpropertypointeratIndex(void) {\r\tsqInt pointerValueOop;\r\tsqInt defaultValueOop;\r\tlong defaultValue;\r\tsqInt readable;\r\tGObject *pointerValue;\r\tGParamSpecEnum *pstring;\r\tGParamSpec *param;\r\tsqInt arrayOop;\r\t GParamSpec **  propertyspecs;\r\tGValue valueType = { 0, };\r\tsqInt index;\r\tsqInt propertyspecsOop;\r\r\tindex = interpreterProxy->stackIntegerValue(1);\r\tpropertyspecsOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tdefaultValue = 0;\r\tpointerValue = 0;\r\tparam = 0;\r\t;\r\tpstring = 0;\r\t;\r\tpropertyspecs = ((GParamSpec **) (interpreterProxy->positive32BitValueOf(propertyspecsOop)));\r\t;\r\tparam = propertyspecs[index];\r\tpstring = G_PARAM_SPEC_ENUM (param);\r\t\tdefaultValue = pstring->default_value;\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2));\r\tdefaultValueOop = interpreterProxy->positive32BitIntegerFor(defaultValue);\r\tinterpreterProxy->pushRemappableOop(defaultValueOop);\r\treadable = 0;\r\tif (param->flags & G_PARAM_READABLE) readable = 1;\r\tif (readable) {\r\t\tg_value_init (&valueType, param->value_type);\r\t\t\t\t\tpointerValue = g_value_get_pointer (&valueType);\r\t\tpointerValueOop = interpreterProxy->positive32BitIntegerFor(pointerValue);\r\t} else {\r\t\tpointerValueOop = interpreterProxy->nilObject();\r\t}\r\t;\r\tinterpreterProxy->pushRemappableOop(pointerValueOop);\r\tpointerValueOop = interpreterProxy->popRemappableOop();\r\tdefaultValueOop = interpreterProxy->popRemappableOop();\r\tarrayOop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(0, arrayOop, defaultValueOop);\r\tinterpreterProxy->storePointerofObjectwithValue(1, arrayOop, pointerValueOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, arrayOop);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegobjectclasslistpropertystringatIndex(void) {\r\tsqInt defaultValueOop;\r\t gchar *  defaultValue;\r\tsqInt readable;\r\tGParamSpecString *pstring;\r\tGParamSpec *param;\r\tsqInt arrayOop;\r\t GParamSpec **  propertyspecs;\r\tchar *stringValue;\r\tGValue valueType = { 0, };\r\tsqInt stringValueOop;\r\tsqInt index;\r\tsqInt propertyspecsOop;\r\r\tindex = interpreterProxy->stackIntegerValue(1);\r\tpropertyspecsOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tdefaultValue = 0;\r\tstringValue = null;\r\tparam = 0;\r\t;\r\tpstring = 0;\r\t;\r\tpropertyspecs = ((GParamSpec **) (interpreterProxy->positive32BitValueOf(propertyspecsOop)));\r\t;\r\tparam = propertyspecs[index];\r\tpstring = G_PARAM_SPEC_STRING (param);\r\t\tdefaultValue = pstring->default_value;\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2));\r\tif (defaultValue == 0) {\r\t\tdefaultValueOop = interpreterProxy->nilObject();\r\t} else {\r\t\tdefaultValueOop = stringFromCString(defaultValue);\r\t}\r\tinterpreterProxy->pushRemappableOop(defaultValueOop);\r\treadable = 0;\r\tif (param->flags & G_PARAM_READABLE) readable = 1;\r\tif (readable) {\r\t\tg_value_init (&valueType, param->value_type);\r\t\t\t\t\tstringValue = g_value_get_string (&valueType);\r\t\tstringValueOop = stringFromCString(stringValue);\r\t} else {\r\t\tstringValueOop = interpreterProxy->nilObject();\r\t}\r\t;\r\tinterpreterProxy->pushRemappableOop(stringValueOop);\r\tstringValueOop = interpreterProxy->popRemappableOop();\r\tdefaultValueOop = interpreterProxy->popRemappableOop();\r\tarrayOop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(0, arrayOop, defaultValueOop);\r\tinterpreterProxy->storePointerofObjectwithValue(1, arrayOop, stringValueOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, arrayOop);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegobjectclasslistpropertyuintatIndex(void) {\r\tsqInt defaultValueOop;\r\tunsigned int  minimumValue;\r\tsqInt uintValueOop;\r\tunsigned int  defaultValue;\r\tsqInt readable;\r\tunsigned int uintValue;\r\tsqInt minimumValueOop;\r\tsqInt maximumValueOop;\r\tGParamSpec *param;\r\tsqInt arrayOop;\r\tGParamSpecUInt *pstring;\r\t GParamSpec **  propertyspecs;\r\tunsigned int  maximumValue;\r\tGValue valueType = { 0, };\r\tsqInt index;\r\tsqInt propertyspecsOop;\r\r\tindex = interpreterProxy->stackIntegerValue(1);\r\tpropertyspecsOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tdefaultValue = 0;\r\tuintValue = 0;\r\tparam = 0;\r\t;\r\tpstring = 0;\r\t;\r\tpropertyspecs = ((GParamSpec **) (interpreterProxy->positive32BitValueOf(propertyspecsOop)));\r\t;\r\tparam = propertyspecs[index];\r\tpstring = G_PARAM_SPEC_UINT (param);\r\t\tdefaultValue = pstring->default_value;\r\t\tminimumValue = pstring->minimum;\r\t\tmaximumValue = pstring->maximum;\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 4));\r\tdefaultValueOop = interpreterProxy->positive32BitIntegerFor(defaultValue);\r\tinterpreterProxy->pushRemappableOop(defaultValueOop);\r\tminimumValueOop = interpreterProxy->positive32BitIntegerFor(minimumValue);\r\tinterpreterProxy->pushRemappableOop(minimumValueOop);\r\tmaximumValueOop = interpreterProxy->positive32BitIntegerFor(maximumValue);\r\tinterpreterProxy->pushRemappableOop(maximumValueOop);\r\treadable = 0;\r\tif (param->flags & G_PARAM_READABLE) readable = 1;\r\tif (readable) {\r\t\tg_value_init (&valueType, param->value_type);\r\t\t\t\t\tuintValue = g_value_get_uint (&valueType);\r\t\tuintValueOop = interpreterProxy->positive32BitIntegerFor(uintValue);\r\t} else {\r\t\tuintValueOop = interpreterProxy->nilObject();\r\t}\r\t;\r\tinterpreterProxy->pushRemappableOop(uintValueOop);\r\tuintValueOop = interpreterProxy->popRemappableOop();\r\tmaximumValueOop = interpreterProxy->popRemappableOop();\r\tminimumValueOop = interpreterProxy->popRemappableOop();\r\tdefaultValueOop = interpreterProxy->popRemappableOop();\r\tarrayOop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(0, arrayOop, defaultValueOop);\r\tinterpreterProxy->storePointerofObjectwithValue(1, arrayOop, uintValueOop);\r\tinterpreterProxy->storePointerofObjectwithValue(2, arrayOop, minimumValueOop);\r\tinterpreterProxy->storePointerofObjectwithValue(3, arrayOop, maximumValueOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, arrayOop);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegobjectclasslistpropertyulongatIndex(void) {\r\tsqInt defaultValueOop;\r\tunsigned long minimumValue;\r\tunsigned long ulongValue;\r\tunsigned long  defaultValue;\r\tsqInt readable;\r\tsqInt minimumValueOop;\r\tsqInt ulongValueOop;\r\tsqInt maximumValueOop;\r\tGParamSpec *param;\r\tsqInt arrayOop;\r\tGParamSpecULong *pstring;\r\t GParamSpec **  propertyspecs;\r\tunsigned long maximumValue;\r\tGValue valueType = { 0, };\r\tsqInt index;\r\tsqInt propertyspecsOop;\r\r\tindex = interpreterProxy->stackIntegerValue(1);\r\tpropertyspecsOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tdefaultValue = 0;\r\tulongValue = 0;\r\tparam = 0;\r\t;\r\tpstring = 0;\r\t;\r\tpropertyspecs = ((GParamSpec **) (interpreterProxy->positive32BitValueOf(propertyspecsOop)));\r\t;\r\tparam = propertyspecs[index];\r\tpstring = G_PARAM_SPEC_ULONG (param);\r\t\tdefaultValue = pstring->default_value;\r\t\tminimumValue = pstring->minimum;\r\t\tmaximumValue = pstring->maximum;\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 4));\r\tdefaultValueOop = interpreterProxy->positive32BitIntegerFor(defaultValue);\r\tinterpreterProxy->pushRemappableOop(defaultValueOop);\r\tminimumValueOop = interpreterProxy->positive32BitIntegerFor(minimumValue);\r\tinterpreterProxy->pushRemappableOop(minimumValueOop);\r\tmaximumValueOop = interpreterProxy->positive32BitIntegerFor(maximumValue);\r\tinterpreterProxy->pushRemappableOop(maximumValueOop);\r\treadable = 0;\r\tif (param->flags & G_PARAM_READABLE) readable = 1;\r\tif (readable) {\r\t\tg_value_init (&valueType, param->value_type);\r\t\t\t\t\tulongValue = g_value_get_ulong (&valueType);\r\t\tulongValueOop = interpreterProxy->positive32BitIntegerFor(ulongValue);\r\t} else {\r\t\tulongValueOop = interpreterProxy->nilObject();\r\t}\r\t;\r\tinterpreterProxy->pushRemappableOop(ulongValueOop);\r\tulongValueOop = interpreterProxy->popRemappableOop();\r\tmaximumValueOop = interpreterProxy->popRemappableOop();\r\tminimumValueOop = interpreterProxy->popRemappableOop();\r\tdefaultValueOop = interpreterProxy->popRemappableOop();\r\tarrayOop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(0, arrayOop, defaultValueOop);\r\tinterpreterProxy->storePointerofObjectwithValue(1, arrayOop, ulongValueOop);\r\tinterpreterProxy->storePointerofObjectwithValue(2, arrayOop, minimumValueOop);\r\tinterpreterProxy->storePointerofObjectwithValue(3, arrayOop, maximumValueOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, arrayOop);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegobjectclasslistpropertyulonglongatIndex(void) {\r\tsqInt ulonglongValueOop;\r\tunsigned long long ulonglongValue;\r\tsqInt defaultValueOop;\r\tunsigned long long minimumValue;\r\tsqInt minimumValueOop;\r\tunsigned long long defaultValue;\r\tsqInt readable;\r\tsqInt maximumValueOop;\r\tGParamSpecUInt64 *pstring;\r\tGParamSpec *param;\r\tsqInt arrayOop;\r\t GParamSpec **  propertyspecs;\r\tunsigned long long maximumValue;\r\tGValue valueType = { 0, };\r\tsqInt index;\r\tsqInt propertyspecsOop;\r\r\tindex = interpreterProxy->stackIntegerValue(1);\r\tpropertyspecsOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tdefaultValue = 0;\r\tulonglongValue = 0;\r\tparam = 0;\r\t;\r\tpstring = 0;\r\t;\r\tpropertyspecs = ((GParamSpec **) (interpreterProxy->positive32BitValueOf(propertyspecsOop)));\r\t;\r\tparam = propertyspecs[index];\r\tpstring = G_PARAM_SPEC_UINT64 (param);\r\t\tdefaultValue = pstring->default_value;\r\t\tminimumValue = pstring->minimum;\r\t\tmaximumValue = pstring->maximum;\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 4));\r\tdefaultValueOop = positive64BitIntegerForOverride(defaultValue);\r\tinterpreterProxy->pushRemappableOop(defaultValueOop);\r\tminimumValueOop = positive64BitIntegerForOverride(minimumValue);\r\tinterpreterProxy->pushRemappableOop(minimumValueOop);\r\tmaximumValueOop = positive64BitIntegerForOverride(maximumValue);\r\tinterpreterProxy->pushRemappableOop(maximumValueOop);\r\treadable = 0;\r\tif (param->flags & G_PARAM_READABLE) readable = 1;\r\tif (readable) {\r\t\tg_value_init (&valueType, param->value_type);\r\t\t\t\t\tulonglongValue = g_value_get_uint64 (&valueType);\r\t\tulonglongValueOop = positive64BitIntegerForOverride(ulonglongValue);\r\t} else {\r\t\tulonglongValueOop = interpreterProxy->nilObject();\r\t}\r\t;\r\tinterpreterProxy->pushRemappableOop(ulonglongValueOop);\r\tulonglongValueOop = interpreterProxy->popRemappableOop();\r\tmaximumValueOop = interpreterProxy->popRemappableOop();\r\tminimumValueOop = interpreterProxy->popRemappableOop();\r\tdefaultValueOop = interpreterProxy->popRemappableOop();\r\tarrayOop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(0, arrayOop, defaultValueOop);\r\tinterpreterProxy->storePointerofObjectwithValue(1, arrayOop, ulonglongValueOop);\r\tinterpreterProxy->storePointerofObjectwithValue(2, arrayOop, minimumValueOop);\r\tinterpreterProxy->storePointerofObjectwithValue(3, arrayOop, maximumValueOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, arrayOop);\r\treturn null;\r}\r\r\r/*\tg_object free it  */\r\rEXPORT(sqInt) primitivegobjectfree(void) {\r\tgpointer  gObject;\r\tsqInt obj;\r\r\tobj = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgObject = ((gpointer) (interpreterProxy->positive32BitValueOf(obj)));\r\t;\r\tg_free(gObject);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(1);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegobjectgetboolfrom(void) {\r\tgpointer  gstObject;\r\tgboolean  value;\r\tsqInt aGstObject;\r\tchar *aName;\r\tsqInt _return_value;\r\r\taGstObject = interpreterProxy->stackValue(1);\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\r\taName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\tvalue = 0;\r\t;\r\t;\r\tg_object_get(gstObject,aName,&value,NULL);\r\t_return_value = (value) ? interpreterProxy->trueObject(): interpreterProxy->falseObject();\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegobjectgetdoublefrom(void) {\r\tgpointer  gstObject;\r\tgdouble  value;\r\tsqInt aGstObject;\r\tchar *aName;\r\tsqInt _return_value;\r\r\taGstObject = interpreterProxy->stackValue(1);\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\r\taName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\tvalue = 0;\r\t;\r\t;\r\tg_object_get(gstObject,aName,&value,NULL);\r\t_return_value = interpreterProxy->floatObjectOf(value);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegobjectgetfloatfrom(void) {\r\tgpointer  gstObject;\r\tgfloat  value;\r\tsqInt aGstObject;\r\tchar *aName;\r\tsqInt _return_value;\r\r\taGstObject = interpreterProxy->stackValue(1);\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\r\taName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\tvalue = 0;\r\t;\r\t;\r\tg_object_get(gstObject,aName,&value,NULL);\r\t_return_value = interpreterProxy->floatObjectOf(value);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegobjectgetlongfrom(void) {\r\tgpointer  gstObject;\r\tlong  value;\r\tsqInt aGstObject;\r\tchar *aName;\r\tsqInt _return_value;\r\r\taGstObject = interpreterProxy->stackValue(1);\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\r\taName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\tvalue = 0;\r\t;\r\t;\r\tg_object_get(gstObject,aName,&value,NULL);\r\t_return_value = interpreterProxy->signed32BitIntegerFor(value);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegobjectgetlonglongfrom(void) {\r\tgpointer  gstObject;\r\tlong long  value;\r\tsqInt aGstObject;\r\tchar *aName;\r\tsqInt _return_value;\r\r\taGstObject = interpreterProxy->stackValue(1);\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\r\taName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\tvalue = 0;\r\t;\r\t;\r\tg_object_get(gstObject,aName,&value,NULL);\r\t_return_value = signed64BitIntegerForOverride(value);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegobjectgetpointerfrom(void) {\r\tgpointer  gstObject;\r\tgpointer  value;\r\tsqInt aGstObject;\r\tchar *aName;\r\tsqInt _return_value;\r\r\taGstObject = interpreterProxy->stackValue(1);\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\r\taName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\tvalue = 0;\r\t;\r\t;\r\tg_object_get(gstObject,aName,&value,NULL);\r\t_return_value = interpreterProxy->positive32BitIntegerFor(value);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegobjectgetsmalltalkobject(void) {\r\tgpointer  gstObject;\r\tgpointer  value;\r\tsqInt aGstObject;\r\tchar *aName;\r\tsqInt _return_value;\r\r\taGstObject = interpreterProxy->stackValue(1);\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\r\taName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\tvalue = 0;\r\t;\r\t;\r\tg_object_get(gstObject,aName,&value,NULL);\r\tif (value == 0) {\r\t\t_return_value = interpreterProxy->nilObject();\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, _return_value);\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegobjectgetstringfrom(void) {\r\tgpointer  gstObject;\r\tsqInt characterOop;\r\tchar * value;\r\tsqInt aGstObject;\r\tchar *aName;\r\r\taGstObject = interpreterProxy->stackValue(1);\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\r\taName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\tvalue = 0;\r\t;\r\tg_object_get(gstObject,aName,&value,NULL);\r\tcharacterOop = stringFromCString(value);\r\tg_free(value);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, characterOop);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegobjectgetulongfrom(void) {\r\tgpointer  gstObject;\r\tunsigned long  value;\r\tsqInt aGstObject;\r\tchar *aName;\r\tsqInt _return_value;\r\r\taGstObject = interpreterProxy->stackValue(1);\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\r\taName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\tvalue = 0;\r\t;\r\t;\r\tg_object_get(gstObject,aName,&value,NULL);\r\t_return_value = interpreterProxy->positive32BitIntegerFor(value);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegobjectgetulonglongfrom(void) {\r\tgpointer  gstObject;\r\tunsigned long long  value;\r\tsqInt aGstObject;\r\tchar *aName;\r\tsqInt _return_value;\r\r\taGstObject = interpreterProxy->stackValue(1);\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\r\taName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\tvalue = 0;\r\t;\r\t;\r\tg_object_get(gstObject,aName,&value,NULL);\r\t_return_value = positive64BitIntegerForOverride(value);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegobjectsetboolon(void) {\r\tgpointer  gstObject;\r\tgboolean  value;\r\tsqInt aGstObject;\r\tchar *aName;\r\tsqInt aValue;\r\r\taGstObject = interpreterProxy->stackValue(2);\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(1)));\r\taName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(1))));\r\taValue = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(0));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\tvalue = aValue;\r\t;\r\t;\r\tg_object_set(gstObject,aName,value,NULL);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(3);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegobjectsetdoubleon(void) {\r\tgpointer  gstObject;\r\tgdouble  value;\r\tsqInt aGstObject;\r\tchar *aName;\r\tdouble aValue;\r\r\taGstObject = interpreterProxy->stackValue(2);\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(1)));\r\taName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(1))));\r\taValue = interpreterProxy->stackFloatValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\tvalue = aValue;\r\t;\r\t;\r\tg_object_set(gstObject,aName,value,NULL);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(3);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegobjectsetfloaton(void) {\r\tgpointer  gstObject;\r\tgfloat  value;\r\tsqInt aGstObject;\r\tchar *aName;\r\tdouble aValue;\r\r\taGstObject = interpreterProxy->stackValue(2);\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(1)));\r\taName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(1))));\r\taValue = interpreterProxy->stackFloatValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\tvalue = aValue;\r\t;\r\t;\r\tg_object_set(gstObject,aName,value,NULL);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(3);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegobjectsetlonglongon(void) {\r\tgpointer  gstObject;\r\tlong long  value;\r\tsqInt aGstObject;\r\tchar *aName;\r\tsqInt aValue;\r\r\taGstObject = interpreterProxy->stackValue(2);\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(1)));\r\taName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(1))));\r\taValue = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\tvalue = ((gint64) (signed64BitValueOfOverride(aValue)));\r\t;\r\t;\r\tg_object_set(gstObject,aName,value,NULL);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(3);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegobjectsetlongon(void) {\r\tgpointer  gstObject;\r\tlong  value;\r\tsqInt aGstObject;\r\tchar *aName;\r\tsqInt aValue;\r\r\taGstObject = interpreterProxy->stackValue(2);\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(1)));\r\taName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(1))));\r\taValue = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\tvalue = ((glong) (signed32BitValueOfOverride(aValue)));\r\t;\r\t;\r\tg_object_set(gstObject,aName,value,NULL);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(3);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegobjectsetpointeron(void) {\r\tgpointer  gstObject;\r\tgpointer  value;\r\tsqInt aGstObject;\r\tchar *aName;\r\tsqInt aValue;\r\r\taGstObject = interpreterProxy->stackValue(2);\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(1)));\r\taName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(1))));\r\taValue = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\tvalue = ((gpointer) (interpreterProxy->positive32BitValueOf(aValue)));\r\t;\r\t;\r\tg_object_set(gstObject,aName,value,NULL);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(3);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegobjectsetstringon(void) {\r\tgpointer  gstObject;\r\tsqInt aGstObject;\r\tchar *aName;\r\tchar *aValue;\r\r\taGstObject = interpreterProxy->stackValue(2);\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(1)));\r\taName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(1))));\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\r\taValue = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\tg_object_set(gstObject,aName,aValue,NULL);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(3);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegobjectsetulonglongon(void) {\r\tgpointer  gstObject;\r\tunsigned long long value;\r\tsqInt aGstObject;\r\tchar *aName;\r\tsqInt aValue;\r\r\taGstObject = interpreterProxy->stackValue(2);\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(1)));\r\taName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(1))));\r\taValue = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\tvalue = ((guint64) (interpreterProxy->positive64BitValueOf(aValue)));\r\t;\r\t;\r\tg_object_set(gstObject,aName,value,NULL);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(3);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegobjectsetulongon(void) {\r\tgpointer  gstObject;\r\tunsigned long  value;\r\tsqInt aGstObject;\r\tchar *aName;\r\tsqInt aValue;\r\r\taGstObject = interpreterProxy->stackValue(2);\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(1)));\r\taName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(1))));\r\taValue = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\tvalue = ((gulong) (interpreterProxy->positive32BitValueOf(aValue)));\r\t;\r\t;\r\tg_object_set(gstObject,aName,&value,NULL);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(3);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegsignalconnect(void) {\r\tvoid*  data;\r\tGstElement*  gstElement;\r\tsqInt gstElementOoop;\r\tchar *aString;\r\tsqInt dataOops;\r\r\tgstElementOoop = interpreterProxy->stackValue(2);\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(1)));\r\taString = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(1))));\r\tdataOops = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstElement = ((GstElement*) (interpreterProxy->positive32BitValueOf(gstElementOoop)));\r\tdata = ((void*) (interpreterProxy->positive32BitValueOf(dataOops)));\r\t;\r\t;\r\tg_signal_connect(gstElement,aString, ((SqueakAudioVideoSinkPtr)data)->handler, data);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(3);\r\treturn null;\r}\r\r\r/*\tAdds the given element to the bin. Sets the element's parent, and thus takes ownership of the element. An element can only be added to one bin.\rIf the element's pads are linked to other pads, the pads will be unlinked before the element is added to the bin. */\r\rEXPORT(sqInt) primitivegstbinadd(void) {\r\tGstBin *bin;\r\tsqInt result;\r\t GstElement *element;\r\tsqInt binOop;\r\tsqInt elementOop;\r\tsqInt _return_value;\r\r\tbinOop = interpreterProxy->stackValue(1);\r\telementOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tresult = 0;\r\tbin = 0;\r\telement = 0;\r\tbin = ((GstBin *) (interpreterProxy->positive32BitValueOf(binOop)));\r\telement = ((GstElement *) (interpreterProxy->positive32BitValueOf(elementOop)));\r\tresult =  gst_bin_add(bin,element);\r\t_return_value = (result? interpreterProxy->trueObject(): interpreterProxy->falseObject());\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\r\r/*\tCreates a new bin with the given name. */\r\rEXPORT(sqInt) primitivegstbinnew(void) {\r\tGstElement*  gstElement;\r\tchar *name;\r\tsqInt _return_value;\r\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\r\tname = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstElement = 0;\r\tgstElement = gst_bin_new(name);\r\t_return_value = interpreterProxy->positive32BitIntegerFor(gstElement);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegstbushavepending(void) {\r\tgpointer  gstObject;\r\tgboolean  value;\r\tsqInt aGstObject;\r\tsqInt _return_value;\r\r\taGstObject = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\tvalue = 0;\r\t;\r\t;\r\tvalue = gst_bus_have_pending(gstObject);\r\t_return_value = (value) ? interpreterProxy->trueObject(): interpreterProxy->falseObject();\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegstbuspeek(void) {\r\tgpointer  gstObject;\r\tgpointer  value;\r\tsqInt aGstObject;\r\tsqInt _return_value;\r\r\taGstObject = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\tvalue = 0;\r\t;\r\t;\r\tvalue = gst_bus_peek(gstObject);\r\t_return_value = interpreterProxy->positive32BitIntegerFor(value);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegstbuspop(void) {\r\tgpointer  gstObject;\r\tgpointer  value;\r\tsqInt aGstObject;\r\tsqInt _return_value;\r\r\taGstObject = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\tvalue = 0;\r\t;\r\t;\r\tvalue = gst_bus_pop(gstObject);\r\t_return_value = interpreterProxy->positive32BitIntegerFor(value);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegstbuspopfilter(void) {\r\tgpointer  gstObject;\r\tgpointer  value;\r\tsqInt aGstObject;\r\tsqInt types;\r\tsqInt _return_value;\r\r\taGstObject = interpreterProxy->stackValue(1);\r\ttypes = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\tvalue = 0;\r\t;\r\t;\r\t// value = gst_bus_pop_filtered(gstObject,types);\r\t_return_value = interpreterProxy->positive32BitIntegerFor(value);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegstcapsfromstring(void) {\r\tGstCaps*  gstObject;\r\tchar *aString;\r\tsqInt _return_value;\r\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\r\taString = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = null;\r\tgstObject = gst_caps_from_string(aString);\r\t_return_value = interpreterProxy->positive32BitIntegerFor(gstObject);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegstcapstostring(void) {\r\tGstCaps*  gstObject;\r\tsqInt characterOop;\r\tchar * value;\r\tsqInt aGstObject;\r\r\taGstObject = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((GstCaps*) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\tvalue = 0;\r\t;\r\tvalue = gst_caps_to_string(gstObject);\r\tcharacterOop = stringFromCString(value);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, characterOop);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegstelementadd(void) {\r\tGstPad*  gstPad;\r\tsqInt result;\r\tGstElement*  element;\r\tsqInt elementOop;\r\tsqInt padOop;\r\tsqInt _return_value;\r\r\telementOop = interpreterProxy->stackValue(1);\r\tpadOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\telement = ((GstElement *) (interpreterProxy->positive32BitValueOf(elementOop)));\r\tgstPad = ((GstPad *) (interpreterProxy->positive32BitValueOf(padOop)));\r\t;\r\t;\r\tresult = 0;\r\tresult = gst_element_add_pad(element, gstPad);\r\t_return_value = (result) ? interpreterProxy->trueObject(): interpreterProxy->falseObject();\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\r\r/*\tCreate a new element of the type defined by the given elementfactory. It will be given the name supplied, since all elements require a name as their first argument. */\r\rEXPORT(sqInt) primitivegstelementfactorycreate(void) {\r\tGstElement*  gstElement;\r\tGstElementFactory*  gstElementFactory;\r\tsqInt factory;\r\tchar *name;\r\tsqInt _return_value;\r\r\tfactory = interpreterProxy->stackValue(1);\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\r\tname = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstElementFactory = ((GstElementFactory*) (interpreterProxy->positive32BitValueOf(factory)));\r\tgstElement = 0;\r\t;\r\tgstElement = gst_element_factory_create(gstElementFactory, name);\r\t_return_value = interpreterProxy->positive32BitIntegerFor(gstElement);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\r\r/*\tSearch for an element factory of the given name. Refs the returned element factory; caller is responsible for unreffing. */\r\rEXPORT(sqInt) primitivegstelementfactoryfind(void) {\r\tGstElementFactory*  gstElementFactory;\r\tchar *name;\r\tsqInt _return_value;\r\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\r\tname = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstElementFactory = 0;\r\t;\r\tgstElementFactory = gst_element_factory_find (name);\r\t_return_value = interpreterProxy->positive32BitIntegerFor(gstElementFactory);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\r\r/*\tGets the author for this factory */\r\rEXPORT(sqInt) primitivegstelementfactorygetauthor(void) {\r\tgchar*  author;\r\tsqInt authorOop;\r\tGstElementFactory*  gstElementFactory;\r\tsqInt factory;\r\r\tfactory = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tauthor = null;\r\tgstElementFactory = null;\r\t;\r\tgstElementFactory = ((GstElementFactory*) (interpreterProxy->positive32BitValueOf(factory)));\r\tauthor = gst_element_factory_get_author (gstElementFactory);\r\tauthorOop = stringFromCString(author);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, authorOop);\r\treturn null;\r}\r\r\r/*\tGets the description for this factory */\r\rEXPORT(sqInt) primitivegstelementfactorygetdescription(void) {\r\tgchar*  description;\r\tsqInt descriptionOop;\r\tGstElementFactory*  gstElementFactory;\r\tsqInt factory;\r\r\tfactory = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tdescription = null;\r\tgstElementFactory = null;\r\t;\r\tgstElementFactory = ((GstElementFactory*) (interpreterProxy->positive32BitValueOf(factory)));\r\tdescription = gst_element_factory_get_description (gstElementFactory);\r\tdescriptionOop = stringFromCString(description);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, descriptionOop);\r\treturn null;\r}\r\r\r/*\tets the longname for this factory */\r\rEXPORT(sqInt) primitivegstelementfactorygetklass(void) {\r\tgchar*  klass;\r\tGstElementFactory*  gstElementFactory;\r\tsqInt klassOop;\r\tsqInt factory;\r\r\tfactory = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tklass = null;\r\tgstElementFactory = null;\r\t;\r\tgstElementFactory = ((GstElementFactory*) (interpreterProxy->positive32BitValueOf(factory)));\r\t;\r\tklass = gst_element_factory_get_klass (gstElementFactory);\r\tklassOop = stringFromCString(klass);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, klassOop);\r\treturn null;\r}\r\r\r/*\tets the longname for this factory */\r\rEXPORT(sqInt) primitivegstelementfactorygetlongname(void) {\r\tgchar*  longName;\r\tsqInt longNameOop;\r\tGstElementFactory*  gstElementFactory;\r\tsqInt factory;\r\r\tfactory = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlongName = null;\r\tgstElementFactory = null;\r\t;\r\tgstElementFactory = ((GstElementFactory*) (interpreterProxy->positive32BitValueOf(factory)));\r\t;\r\tlongName = gst_element_factory_get_longname (gstElementFactory);\r\tlongNameOop = stringFromCString(longName);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, longNameOop);\r\treturn null;\r}\r\r\r/*\tGets the type of URIs the element supports or GST_URI_UNKNOWN if none. */\r\rEXPORT(sqInt) primitivegstelementfactorygeturitype(void) {\r\tsqInt uriTypeCount;\r\tGstElementFactory*  gstElementFactory;\r\tsqInt factory;\r\tsqInt _return_value;\r\r\tfactory = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\turiTypeCount = null;\r\tgstElementFactory = null;\r\t;\r\tgstElementFactory = ((GstElementFactory*) (interpreterProxy->positive32BitValueOf(factory)));\r\t;\r\turiTypeCount = gst_element_factory_get_uri_type  (gstElementFactory);\r\t_return_value = interpreterProxy->integerObjectOf(uriTypeCount);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\r\r/*\tCreate a new element of the type defined by the given element factory. If name is NULL, then the element will receive a guaranteed unique name, consisting of the element factory name and a number. If name is given, it will be given the name supplied. */\r\rEXPORT(sqInt) primitivegstelementfactorymake(void) {\r\tGstElement*  gstElement;\r\tchar *factoryName;\r\tchar *name;\r\tsqInt _return_value;\r\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(1)));\r\tfactoryName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(1))));\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\r\tname = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstElement = null;\r\t;\r\tgstElement = gst_element_factory_make(factoryName, name);\r\t_return_value = interpreterProxy->positive32BitIntegerFor(gstElement);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegstelementgetcompatiblepad(void) {\r\tGstPad*  gstPadFound;\r\tGstElement*  gstElement;\r\tGstPad*  gstPadValue;\r\tGstCaps*  gstCapsValue;\r\tsqInt gstElementOoop;\r\tsqInt aPadOop;\r\tsqInt capsOop;\r\tsqInt _return_value;\r\r\tgstElementOoop = interpreterProxy->stackValue(2);\r\taPadOop = interpreterProxy->stackValue(1);\r\tcapsOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstElement = ((GstElement*) (interpreterProxy->positive32BitValueOf(gstElementOoop)));\r\tgstPadValue = ((GstPad*) (interpreterProxy->positive32BitValueOf(aPadOop)));\r\tgstCapsValue = ((GstCaps*) (interpreterProxy->positive32BitValueOf(capsOop)));\r\tgstPadFound = 0;\r\t;\r\t;\r\t;\r\tgstPadFound = gst_element_get_compatible_pad (gstElement,gstPadValue,gstCapsValue);\r\t_return_value = interpreterProxy->positive32BitIntegerFor(gstPadFound);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(4, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegstelementgetrequestpad(void) {\r\tGstElement*  gstElement;\r\tGstPad*  gstPadValue;\r\tsqInt gstElementOoop;\r\tchar *name;\r\tsqInt _return_value;\r\r\tgstElementOoop = interpreterProxy->stackValue(1);\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\r\tname = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstPadValue = 0;\r\tgstElement = ((GstElement*) (interpreterProxy->positive32BitValueOf(gstElementOoop)));\r\t;\r\tgstPadValue = gst_element_get_request_pad (gstElement,name);\r\t_return_value = interpreterProxy->positive32BitIntegerFor(gstPadValue);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\r\r/*\tSets the state of the element. This function will try to set the requested state by going through all the intermediary states and calling the class's state change function for each.\rThis function can return GST_STATE_CHANGE_ASYNC, in which case the element will perform the remainder of the state change asynchronously in another thread. An application can use gst_element_get_state() to wait for the completion of the state change or it can wait for a state change message on the bus. */\r\rEXPORT(sqInt) primitivegstelementgetstate(void) {\r\tGstState  state;\r\tsqInt result;\r\tsqInt arrayOop;\r\tGstElement*  element;\r\tGstClockTime  gstClockTime;\r\tGstState  pending;\r\tsqInt elementOop;\r\tsqInt gstClockTimeOop;\r\r\telementOop = interpreterProxy->stackValue(1);\r\tgstClockTimeOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\telement = ((GstElement *) (interpreterProxy->positive32BitValueOf(elementOop)));\r\tgstClockTime = ((GstClockTime) (interpreterProxy->positive64BitValueOf(gstClockTimeOop)));\r\tstate = 0;\r\tpending = 0;\r\tresult = 0;\r\t;\r\t;\r\t;\r\t;\r\tresult = gst_element_get_state(element, &state, &pending, gstClockTime);\r\tarrayOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 3);\r\tinterpreterProxy->storePointerofObjectwithValue(0, arrayOop, ((result << 1) | 1));\r\tinterpreterProxy->storePointerofObjectwithValue(1, arrayOop, ((state << 1) | 1));\r\tinterpreterProxy->storePointerofObjectwithValue(2, arrayOop, ((pending << 1) | 1));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, arrayOop);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegstelementgetstaticpad(void) {\r\tGstElement*  gstElement;\r\tGstPad*  gstPadValue;\r\tsqInt gstElementOoop;\r\tchar *name;\r\tsqInt _return_value;\r\r\tgstElementOoop = interpreterProxy->stackValue(1);\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\r\tname = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstPadValue = 0;\r\tgstElement = ((GstElement*) (interpreterProxy->positive32BitValueOf(gstElementOoop)));\r\t;\r\tgstPadValue =  gst_element_get_static_pad(gstElement,name);\r\t_return_value = interpreterProxy->positive32BitIntegerFor(gstPadValue);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\r\r/*\tConnects a GCallback function to a signal for a particular object.\rThe handler will be called before the default handler of the signal. */\r\rEXPORT(sqInt) primitivegstelementgsignalconnect(void) {\r\tsqInt i;\r\tsqInt  dataPad;\r\tsqInt  *callBackData;\r\tsqInt listLength;\r\tGstElement*  element;\r\tsqInt elementOop;\r\tchar *aSignalName;\r\tsqInt *data;\r\r\telementOop = interpreterProxy->stackValue(2);\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(1)));\r\taSignalName = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(1))));\r\tinterpreterProxy->success(interpreterProxy->isIndexable(interpreterProxy->stackValue(0)));\r\tdata = ((int *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\telement = ((GstElement *) (interpreterProxy->positive32BitValueOf(elementOop)));\r\tlistLength = interpreterProxy->slotSizeOf((oopForPointer( data ) - BASE_HEADER_SIZE));\r\tcallBackData = 0;\r\tcallBackData = (sqInt*) g_malloc0(sizeof(sqInt)*(1+listLength));\r\tcallBackData[0] = (((sqInt) listLength));\r\tfor (i = 0; i <= (listLength - 1); i += 1) {\r\t\tdataPad = ((sqInt) (data[i]));\r\t\tcallBackData[i + 1] = dataPad;\r\t\tif (i < 128) {\r\t\t\tcallbackForPadHookupElement[i + 1] = 0;\r\t\t}\r\t}\r\t;\r\t;\r\t;\r\t;\r\tg_signal_connect(element, aSignalName,G_CALLBACK (cbnewpad),callBackData);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(3);\r\treturn null;\r}\r\r\r/*\tLinks src to dest. The link must be from source to destination; the other direction will not be tried. The function looks for existing pads that aren't linked yet. It will request new pads if necessary. Such pads need to be released manualy when unlinking. If multiple links are possible, only one is established.\rMake sure you have added your elements to a bin or pipeline with gst_bin_add() before trying to link them. */\r\rEXPORT(sqInt) primitivegstelementlink(void) {\r\tsqInt result;\r\tGstElement*  dest;\r\tGstElement*  src;\r\tsqInt srcOop;\r\tsqInt destOop;\r\tsqInt _return_value;\r\r\tsrcOop = interpreterProxy->stackValue(1);\r\tdestOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tsrc = ((GstElement *) (interpreterProxy->positive32BitValueOf(srcOop)));\r\tdest = ((GstElement *) (interpreterProxy->positive32BitValueOf(destOop)));\r\t;\r\t;\r\tresult = gst_element_link(src, dest);\r\t_return_value = (result? interpreterProxy->trueObject(): interpreterProxy->falseObject());\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegstelementlinkfiltered(void) {\r\tGstCaps*  caps;\r\tsqInt result;\r\tGstElement*  src;\r\tGstElement*  dest;\r\tsqInt srcOop;\r\tsqInt destOop;\r\tsqInt capsOop;\r\tsqInt _return_value;\r\r\tsrcOop = interpreterProxy->stackValue(2);\r\tdestOop = interpreterProxy->stackValue(1);\r\tcapsOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tsrc = ((GstElement *) (interpreterProxy->positive32BitValueOf(srcOop)));\r\tdest = ((GstElement *) (interpreterProxy->positive32BitValueOf(destOop)));\r\tcaps = ((GstCaps *) (interpreterProxy->positive32BitValueOf(destOop)));\r\tresult = 0;\r\t;\r\t;\r\t;\r\tresult =  gst_element_link_filtered(src, dest,caps);\r\t_return_value = (result) ? interpreterProxy->trueObject(): interpreterProxy->falseObject();\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(4, _return_value);\r\treturn null;\r}\r\r\r/*\tQueries an element for the stream position */\r\rEXPORT(sqInt) primitivegstelementqueryconvert(void) {\r\tsqInt resultOop;\r\tsqInt arrayOop;\r\tgint64 destValue;\r\tsqInt destValueOop;\r\tGstFormat destformat;\r\tsqInt result;\r\tgint64 val;\r\tGstElement*  element;\r\tsqInt elementOop;\r\tsqInt srcformat;\r\tsqInt valOop;\r\tsqInt destformatOop;\r\r\telementOop = interpreterProxy->stackValue(3);\r\tsrcformat = interpreterProxy->stackIntegerValue(2);\r\tvalOop = interpreterProxy->stackValue(1);\r\tdestformatOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\telement = ((GstElement *) (interpreterProxy->positive32BitValueOf(elementOop)));\r\tdestformat = ((GstFormat) (interpreterProxy->positive32BitValueOf(destformatOop)));\r\tval = ((gint64) (signed64BitValueOfOverride(valOop)));\r\t;\r\t;\r\t;\r\tresult = 0;\r\tdestValue = 0;\r\tresult =  gst_element_query_convert(element,srcformat,val,&destformat,&destValue);\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2));\r\tinterpreterProxy->pushRemappableOop((result) ? interpreterProxy->trueObject(): interpreterProxy->falseObject());\r\tinterpreterProxy->pushRemappableOop(signed64BitIntegerForOverride(destValue));\r\tdestValueOop = interpreterProxy->popRemappableOop();\r\tresultOop = interpreterProxy->popRemappableOop();\r\tarrayOop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(0, arrayOop, resultOop);\r\tinterpreterProxy->storePointerofObjectwithValue(1, arrayOop, destValueOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(5, arrayOop);\r\treturn null;\r}\r\r\r/*\tQueries an element for the stream position */\r\rEXPORT(sqInt) primitivegstelementqueryduration(void) {\r\tsqInt resultOop;\r\tgint64 duration;\r\tsqInt durationOop;\r\tsqInt arrayOop;\r\tsqInt result;\r\tGstFormat format;\r\tsqInt formatOopReturn;\r\tGstElement*  element;\r\tsqInt elementOop;\r\tsqInt formatOop;\r\r\telementOop = interpreterProxy->stackValue(1);\r\tformatOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\telement = ((GstElement *) (interpreterProxy->positive32BitValueOf(elementOop)));\r\tformat = ((GstFormat) (interpreterProxy->positive32BitValueOf(formatOop)));\r\t;\r\t;\r\tresult = 0;\r\tduration = 0;\r\tresult =  gst_element_query_duration(element,&format,&duration);\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 3));\r\tinterpreterProxy->pushRemappableOop((result) ? interpreterProxy->trueObject(): interpreterProxy->falseObject());\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->integerObjectOf(format));\r\tinterpreterProxy->pushRemappableOop(signed64BitIntegerForOverride(duration));\r\tdurationOop = interpreterProxy->popRemappableOop();\r\tformatOopReturn = interpreterProxy->popRemappableOop();\r\tresultOop = interpreterProxy->popRemappableOop();\r\tarrayOop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(0, arrayOop, resultOop);\r\tinterpreterProxy->storePointerofObjectwithValue(1, arrayOop, formatOopReturn);\r\tinterpreterProxy->storePointerofObjectwithValue(2, arrayOop, durationOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, arrayOop);\r\treturn null;\r}\r\r\r/*\tQueries an element for the stream position */\r\rEXPORT(sqInt) primitivegstelementqueryposition(void) {\r\tsqInt resultOop;\r\tsqInt curOop;\r\tsqInt arrayOop;\r\tgint64 cur;\r\tsqInt result;\r\tGstFormat format;\r\tsqInt formatOopReturn;\r\tGstElement*  element;\r\tsqInt elementOop;\r\tsqInt formatOop;\r\r\telementOop = interpreterProxy->stackValue(1);\r\tformatOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\telement = ((GstElement *) (interpreterProxy->positive32BitValueOf(elementOop)));\r\tformat = ((GstFormat) (interpreterProxy->positive32BitValueOf(formatOop)));\r\t;\r\t;\r\tresult = 0;\r\tcur = 0;\r\tresult =  gst_element_query_position(element,&format,&cur);\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 3));\r\tinterpreterProxy->pushRemappableOop((result) ? interpreterProxy->trueObject(): interpreterProxy->falseObject());\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->integerObjectOf(format));\r\tinterpreterProxy->pushRemappableOop(signed64BitIntegerForOverride(cur));\r\tcurOop = interpreterProxy->popRemappableOop();\r\tformatOopReturn = interpreterProxy->popRemappableOop();\r\tresultOop = interpreterProxy->popRemappableOop();\r\tarrayOop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(0, arrayOop, resultOop);\r\tinterpreterProxy->storePointerofObjectwithValue(1, arrayOop, formatOopReturn);\r\tinterpreterProxy->storePointerofObjectwithValue(2, arrayOop, curOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, arrayOop);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegstelementreleaserequestpad(void) {\r\tGstElement*  gstElement;\r\tGstPad*  gstPadValue;\r\tsqInt gstElementOoop;\r\tsqInt aPadOop;\r\r\tgstElementOoop = interpreterProxy->stackValue(1);\r\taPadOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstElement = ((GstElement*) (interpreterProxy->positive32BitValueOf(gstElementOoop)));\r\tgstPadValue = ((GstPad*) (interpreterProxy->positive32BitValueOf(aPadOop)));\r\t;\r\t;\r\tgst_element_release_request_pad(gstElement,gstPadValue);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(2);\r\treturn null;\r}\r\r\r/*\tSends a seek event to an element. See gst_event_new_seek() for the details of the parameters. \rThe seek event is sent to the element using gst_element_send_event(). */\r\rEXPORT(sqInt) primitivegstelementseek(void) {\r\tgint64  stop;\r\tgint64  cur;\r\tgboolean  result;\r\tGstElement*  element;\r\tsqInt elementOop;\r\tdouble aRate;\r\tsqInt aFormat;\r\tsqInt aFlags;\r\tsqInt aCurrentType;\r\tsqInt curOop;\r\tsqInt aStopType;\r\tsqInt stopOop;\r\tsqInt _return_value;\r\r\telementOop = interpreterProxy->stackValue(7);\r\taRate = interpreterProxy->stackFloatValue(6);\r\taFormat = interpreterProxy->stackIntegerValue(5);\r\taFlags = interpreterProxy->stackIntegerValue(4);\r\taCurrentType = interpreterProxy->stackIntegerValue(3);\r\tcurOop = interpreterProxy->stackValue(2);\r\taStopType = interpreterProxy->stackIntegerValue(1);\r\tstopOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\telement = ((GstElement *) (interpreterProxy->positive32BitValueOf(elementOop)));\r\tcur = ((gint64) (signed64BitValueOfOverride(curOop)));\r\tstop = ((gint64) (signed64BitValueOfOverride(stopOop)));\r\t;\r\t;\r\t;\r\tresult = 0;\r\tresult = gst_element_seek(element, aRate, aFormat, aFlags, aCurrentType, cur, aStopType, stop);\r\t_return_value = (result) ? interpreterProxy->trueObject(): interpreterProxy->falseObject();\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(9, _return_value);\r\treturn null;\r}\r\r\r/*\tSends a seek event to an element. */\r\rEXPORT(sqInt) primitivegstelementseeksimple(void) {\r\tgboolean  result;\r\tGstElement*  element;\r\tgint64  cur;\r\tsqInt elementOop;\r\tsqInt aFormat;\r\tsqInt aFlags;\r\tsqInt curOop;\r\tsqInt _return_value;\r\r\telementOop = interpreterProxy->stackValue(3);\r\taFormat = interpreterProxy->stackIntegerValue(2);\r\taFlags = interpreterProxy->stackIntegerValue(1);\r\tcurOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\telement = ((GstElement *) (interpreterProxy->positive32BitValueOf(elementOop)));\r\tcur = ((gint64) (signed64BitValueOfOverride(curOop)));\r\t;\r\t;\r\tresult = 0;\r\tresult = gst_element_seek_simple(element, aFormat, aFlags, cur);\r\t_return_value = (result) ? interpreterProxy->trueObject(): interpreterProxy->falseObject();\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(5, _return_value);\r\treturn null;\r}\r\r\r/*\tSets the state of the element. This function will try to set the requested state by going through all the intermediary states and calling the class's state change function for each.\rThis function can return GST_STATE_CHANGE_ASYNC, in which case the element will perform the remainder of the state change asynchronously in another thread. An application can use gst_element_get_state() to wait for the completion of the state change or it can wait for a state change message on the bus. */\r\rEXPORT(sqInt) primitivegstelementsetstate(void) {\r\tsqInt result;\r\tGstElement*  element;\r\tsqInt elementOop;\r\tsqInt aControlValue;\r\tsqInt _return_value;\r\r\telementOop = interpreterProxy->stackValue(1);\r\taControlValue = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\telement = ((GstElement *) (interpreterProxy->positive32BitValueOf(elementOop)));\r\t;\r\tresult = gst_element_set_state(element, aControlValue);\r\t_return_value = interpreterProxy->positive32BitIntegerFor(result);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegstghostpadnew(void) {\r\tGstPad*  gstPad;\r\tGstPad*  newGstPad;\r\tsqInt gstElementOoop;\r\tchar *name;\r\tsqInt _return_value;\r\r\tgstElementOoop = interpreterProxy->stackValue(1);\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\r\tname = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tnewGstPad = 0;\r\tgstPad = ((GstPad*) (interpreterProxy->positive32BitValueOf(gstElementOoop)));\r\t;\r\tnewGstPad  =   gst_ghost_pad_new(name,gstPad);\r\t_return_value = interpreterProxy->positive32BitIntegerFor(newGstPad);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\r\r/*\tInitializes the GStreamer library, setting up internal path lists, registering built-in elements, and loading standard plugins. */\r\rEXPORT(sqInt) primitivegstinitcheck(void) {\r\tgboolean initialize;\r\tsqInt _return_value;\r\r\tinitialize = 0;\r\tinitialize = gst_init_check(null,null,null);\r\t_return_value = (initialize? interpreterProxy->trueObject(): interpreterProxy->falseObject());\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegstmessageparsebuffering(void) {\r\tgpointer  gstObject;\r\tsqInt percent;\r\tsqInt aGstObject;\r\tsqInt _return_value;\r\r\taGstObject = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\t;\r\tpercent = 0;\r\tgst_message_parse_buffering(gstObject,&percent);\r\t_return_value = interpreterProxy->positive32BitIntegerFor(percent);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegstmessageparseduration(void) {\r\tsqInt positionOop;\r\tsqInt formatOop;\r\tsqInt arrayOop;\r\tgpointer  gstObject;\r\t GstFormat  format;\r\tgint64 position;\r\tsqInt aGstObject;\r\r\taGstObject = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\t;\r\tformat = 0;\r\tposition = 0;\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2));\r\t gst_message_parse_duration(gstObject,&format,&position);\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->positive32BitIntegerFor(format));\r\tinterpreterProxy->pushRemappableOop(signed64BitIntegerForOverride(position));\r\tpositionOop = interpreterProxy->popRemappableOop();\r\tformatOop = interpreterProxy->popRemappableOop();\r\tarrayOop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(0, arrayOop, formatOop);\r\tinterpreterProxy->storePointerofObjectwithValue(1, arrayOop, positionOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, arrayOop);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegstmessageparseerror(void) {\r\tsqInt debugStringOop;\r\t char *  errorMessage;\r\tsqInt arrayOop;\r\tgpointer  gstObject;\r\t char *  debugString;\r\t GError *  errorString;\r\tsqInt errorStringOop;\r\tsqInt aGstObject;\r\r\taGstObject = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\t;\r\terrorString = 0;\r\tdebugString = 0;\r\terrorMessage = 0;\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2));\r\tgst_message_parse_error(gstObject,&errorString,&debugString);\r\t\terrorMessage = errorString->message;\r\terrorStringOop = stringFromCString(errorMessage);\r\tinterpreterProxy->pushRemappableOop(errorStringOop);\r\tg_error_free(errorString);\r\tif (debugString == 0) {\r\t\tdebugStringOop = interpreterProxy->nilObject();\r\t} else {\r\t\tdebugStringOop = stringFromCString(debugString);\r\t\tg_free(debugString);\r\t}\r\tinterpreterProxy->pushRemappableOop(debugStringOop);\r\tdebugStringOop = interpreterProxy->popRemappableOop();\r\terrorStringOop = interpreterProxy->popRemappableOop();\r\tarrayOop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(0, arrayOop, errorStringOop);\r\tinterpreterProxy->storePointerofObjectwithValue(1, arrayOop, debugStringOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, arrayOop);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegstmessageparseinfo(void) {\r\tsqInt debugStringOop;\r\t char *  errorMessage;\r\tsqInt arrayOop;\r\tgpointer  gstObject;\r\t char *  debugString;\r\t GError *  errorString;\r\tsqInt errorStringOop;\r\tsqInt aGstObject;\r\r\taGstObject = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\t;\r\terrorString = 0;\r\tdebugString = 0;\r\terrorMessage = 0;\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2));\r\tgst_message_parse_info(gstObject,&errorString,&debugString);\r\t\terrorMessage = errorString->message;\r\terrorStringOop = stringFromCString(errorMessage);\r\tinterpreterProxy->pushRemappableOop(errorStringOop);\r\tg_error_free(errorString);\r\tif (debugString == 0) {\r\t\tdebugStringOop = interpreterProxy->nilObject();\r\t} else {\r\t\tdebugStringOop = stringFromCString(debugString);\r\t\tg_free(debugString);\r\t}\r\tinterpreterProxy->pushRemappableOop(debugStringOop);\r\tdebugStringOop = interpreterProxy->popRemappableOop();\r\terrorStringOop = interpreterProxy->popRemappableOop();\r\tarrayOop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(0, arrayOop, errorStringOop);\r\tinterpreterProxy->storePointerofObjectwithValue(1, arrayOop, debugStringOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, arrayOop);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegstmessageparsesegmentdone(void) {\r\tsqInt positionOop;\r\tsqInt formatOop;\r\tsqInt arrayOop;\r\tgpointer  gstObject;\r\t GstFormat  format;\r\tgint64 position;\r\tsqInt aGstObject;\r\r\taGstObject = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\t;\r\tformat = 0;\r\tposition = 0;\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2));\r\tgst_message_parse_segment_done(gstObject,&format,&position);\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->positive32BitIntegerFor(format));\r\tinterpreterProxy->pushRemappableOop(signed64BitIntegerForOverride(position));\r\tpositionOop = interpreterProxy->popRemappableOop();\r\tformatOop = interpreterProxy->popRemappableOop();\r\tarrayOop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(0, arrayOop, formatOop);\r\tinterpreterProxy->storePointerofObjectwithValue(1, arrayOop, positionOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, arrayOop);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegstmessageparsesegmentstart(void) {\r\tsqInt positionOop;\r\tsqInt formatOop;\r\tsqInt arrayOop;\r\tgpointer  gstObject;\r\t GstFormat  format;\r\tgint64 position;\r\tsqInt aGstObject;\r\r\taGstObject = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\t;\r\tformat = 0;\r\tposition = 0;\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2));\r\tgst_message_parse_segment_start(gstObject,&format,&position);\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->positive32BitIntegerFor(format));\r\tinterpreterProxy->pushRemappableOop(signed64BitIntegerForOverride(position));\r\tpositionOop = interpreterProxy->popRemappableOop();\r\tformatOop = interpreterProxy->popRemappableOop();\r\tarrayOop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(0, arrayOop, formatOop);\r\tinterpreterProxy->storePointerofObjectwithValue(1, arrayOop, positionOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, arrayOop);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegstmessageparsestatechanged(void) {\r\tsqInt newOop;\r\t  GstState  old;\r\tgpointer  gstObject;\r\t  GstState  new;\r\tsqInt pendingOop;\r\t  GstState  pending;\r\tsqInt arrayOop;\r\tsqInt oldOop;\r\tsqInt aGstObject;\r\r\taGstObject = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\t;\r\told = new = pending = 0;\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 3));\r\tgst_message_parse_state_changed(gstObject,&old,&new,&pending);\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->positive32BitIntegerFor(old));\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->positive32BitIntegerFor(new));\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->positive32BitIntegerFor(pending));\r\tpendingOop = interpreterProxy->popRemappableOop();\r\tnewOop = interpreterProxy->popRemappableOop();\r\toldOop = interpreterProxy->popRemappableOop();\r\tarrayOop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(0, arrayOop, oldOop);\r\tinterpreterProxy->storePointerofObjectwithValue(1, arrayOop, newOop);\r\tinterpreterProxy->storePointerofObjectwithValue(2, arrayOop, pendingOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, arrayOop);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegstmessageparsewarning(void) {\r\tsqInt debugStringOop;\r\t char *  errorMessage;\r\tsqInt arrayOop;\r\tgpointer  gstObject;\r\t char *  debugString;\r\t GError *  errorString;\r\tsqInt errorStringOop;\r\tsqInt aGstObject;\r\r\taGstObject = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\t;\r\terrorString = 0;\r\tdebugString = 0;\r\terrorMessage = 0;\r\tinterpreterProxy->pushRemappableOop(interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2));\r\tgst_message_parse_warning(gstObject,&errorString,&debugString);\r\t\terrorMessage = errorString->message;\r\terrorStringOop = stringFromCString(errorMessage);\r\tinterpreterProxy->pushRemappableOop(errorStringOop);\r\tg_error_free(errorString);\r\tif (debugString == 0) {\r\t\tdebugStringOop = interpreterProxy->nilObject();\r\t} else {\r\t\tdebugStringOop = stringFromCString(debugString);\r\t\tg_free(debugString);\r\t}\r\tinterpreterProxy->pushRemappableOop(debugStringOop);\r\tdebugStringOop = interpreterProxy->popRemappableOop();\r\terrorStringOop = interpreterProxy->popRemappableOop();\r\tarrayOop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(0, arrayOop, errorStringOop);\r\tinterpreterProxy->storePointerofObjectwithValue(1, arrayOop, debugStringOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, arrayOop);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegstmessagesrc(void) {\r\tgpointer  gstObject;\r\tGstObject * gstSrcObject;\r\tsqInt aGstObject;\r\tsqInt _return_value;\r\r\taGstObject = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\tgstSrcObject = null;\r\t;\r\t;\r\tgstSrcObject = GST_MESSAGE_SRC(gstObject);\r\t_return_value = interpreterProxy->positive32BitIntegerFor(gstSrcObject);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegstmessagetypestring(void) {\r\tgpointer  gstObject;\r\t char *  msgString;\r\tsqInt msgStringOop;\r\tsqInt value;\r\tsqInt aGstObject;\r\r\taGstObject = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(aGstObject)));\r\t;\r\t;\r\tvalue = GST_MESSAGE_TYPE(gstObject);\r\t\tmsgString = gst_message_type_get_name(value);\r\tmsgStringOop = stringFromCString(msgString);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, msgStringOop);\r\treturn null;\r}\r\r\r/*\tConvenience macro to decrease the reference count of the message, possibly freeing it. */\r\rEXPORT(sqInt) primitivegstmessageunref(void) {\r\tgpointer  gstObject;\r\tsqInt obj;\r\r\tobj = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(obj)));\r\tgst_message_unref(gstObject);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(1);\r\treturn null;\r}\r\r\r/*\tDecrements the reference count on object. If reference count hits zero, destroy object. This function does not take the lock on object as it relies on atomic refcounting.\rThe unref method should never be called with the LOCK held since this might deadlock the dispose function. */\r\rEXPORT(sqInt) primitivegstobjectunref(void) {\r\tgpointer  gstObject;\r\tsqInt obj;\r\r\tobj = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstObject = ((gpointer) (interpreterProxy->positive32BitValueOf(obj)));\r\tgst_object_unref(gstObject);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(1);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegstpadacceptcaps(void) {\r\tsqInt result;\r\tGstPad*  gstPadValue;\r\tGstCaps*  gstCapsValue;\r\tsqInt gstPadOop;\r\tsqInt gstCapsOop;\r\tsqInt _return_value;\r\r\tgstPadOop = interpreterProxy->stackValue(1);\r\tgstCapsOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstPadValue = ((GstPad*) (interpreterProxy->positive32BitValueOf(gstPadOop)));\r\tgstCapsValue = ((GstCaps*) (interpreterProxy->positive32BitValueOf(gstCapsOop)));\r\t;\r\t;\r\tresult = 0;\r\tresult =  gst_pad_accept_caps (gstPadValue, gstCapsValue);\r\t_return_value = (result) ? interpreterProxy->trueObject(): interpreterProxy->falseObject();\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegstpadgetcaps(void) {\r\tGstPad*  gstPadValue;\r\tGstCaps*  gstCapsValue;\r\tsqInt gstPadOop;\r\tsqInt _return_value;\r\r\tgstPadOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstCapsValue = 0;\r\tgstPadValue = ((GstPad*) (interpreterProxy->positive32BitValueOf(gstPadOop)));\r\t;\r\tgstCapsValue = gst_pad_get_caps (gstPadValue);\r\t_return_value = interpreterProxy->positive32BitIntegerFor(gstCapsValue);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegstpadgetparentelement(void) {\r\tGstPad*  gstPadValue;\r\tGstElement*  gstEvementValue;\r\tsqInt gstPadOop;\r\tsqInt _return_value;\r\r\tgstPadOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstEvementValue = 0;\r\tgstPadValue = ((GstPad*) (interpreterProxy->positive32BitValueOf(gstPadOop)));\r\t;\r\tgstEvementValue = gst_pad_get_parent_element (gstPadValue);\r\t_return_value = interpreterProxy->positive32BitIntegerFor(gstEvementValue);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegstpadlink(void) {\r\tsqInt result;\r\tGstPad*  dest;\r\tGstPad*  src;\r\tsqInt srcOop;\r\tsqInt destOop;\r\tsqInt _return_value;\r\r\tsrcOop = interpreterProxy->stackValue(1);\r\tdestOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tsrc = ((GstPad *) (interpreterProxy->positive32BitValueOf(srcOop)));\r\tdest = ((GstPad *) (interpreterProxy->positive32BitValueOf(destOop)));\r\tresult = 0;\r\t;\r\t;\r\tresult =  gst_pad_link(src, dest);\r\t_return_value = interpreterProxy->integerObjectOf(result);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegstpadsetactive(void) {\r\tsqInt result;\r\tGstPad*  gstPadValue;\r\tsqInt gstPadOop;\r\tsqInt aBoolean;\r\tsqInt _return_value;\r\r\tgstPadOop = interpreterProxy->stackValue(1);\r\taBoolean = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(0));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstPadValue = ((GstPad*) (interpreterProxy->positive32BitValueOf(gstPadOop)));\r\t;\r\tresult = 0;\r\tresult =  gst_pad_set_active (gstPadValue, aBoolean);\r\t_return_value = (result) ? interpreterProxy->trueObject(): interpreterProxy->falseObject();\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivegstpadsetcaps(void) {\r\tsqInt result;\r\tGstPad*  gstPadValue;\r\tGstCaps*  gstCapsValue;\r\tsqInt gstPadOop;\r\tsqInt gstCapsOop;\r\tsqInt _return_value;\r\r\tgstPadOop = interpreterProxy->stackValue(1);\r\tgstCapsOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstPadValue = ((GstPad*) (interpreterProxy->positive32BitValueOf(gstPadOop)));\r\tgstCapsValue = ((GstCaps*) (interpreterProxy->positive32BitValueOf(gstCapsOop)));\r\t;\r\t;\r\tresult = 0;\r\tresult =  gst_pad_set_caps(gstPadValue, gstCapsValue);\r\t_return_value = (result) ? interpreterProxy->trueObject(): interpreterProxy->falseObject();\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\r\r/*\tGets the gstClock of pipeline. */\r\rEXPORT(sqInt) primitivegstpipelineautoclock(void) {\r\tGstPipeline*  gstPipeline;\r\tsqInt gstPipelineOop;\r\r\tgstPipelineOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstPipeline = ((GstPipeline*) (interpreterProxy->positive32BitValueOf(gstPipelineOop)));\r\t;\r\tgst_pipeline_auto_clock(gstPipeline);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(1);\r\treturn null;\r}\r\r\r/*\tUsually, when a pipeline goes from READY to NULL state, it automatically flushes all pending messages on the bus, which is done for refcounting purposes, to break circular references.\rThis means that applications that update state using (async) bus messages (e.g. do certain things when a pipeline goes from PAUSED to READY) might not get to see messages when the pipeline is shut down, because they might be flushed before they can be dispatched in the main thread. This behaviour can be disabled using this function.\rIt is important that all messages on the bus are handled when the automatic flushing is disabled else memory leaks will be introduced.\r */\r\rEXPORT(sqInt) primitivegstpipelinegetautoflushbus(void) {\r\tGstPipeline*  gstPipeline;\r\tgboolean  aBoolean;\r\tsqInt gstPipelineOop;\r\tsqInt _return_value;\r\r\tgstPipelineOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstPipeline = ((GstPipeline*) (interpreterProxy->positive32BitValueOf(gstPipelineOop)));\r\taBoolean = 0;\r\t;\r\taBoolean = gst_pipeline_get_auto_flush_bus(gstPipeline);\r\t_return_value = (aBoolean) ? interpreterProxy->trueObject(): interpreterProxy->falseObject();\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\r\r/*\tGets the GstBus of pipeline. */\r\rEXPORT(sqInt) primitivegstpipelinegetbus(void) {\r\tGstBus*  gstBus;\r\tGstPipeline*  gstPipeline;\r\tsqInt gstPipelineOop;\r\tsqInt _return_value;\r\r\tgstPipelineOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstPipeline = ((GstPipeline*) (interpreterProxy->positive32BitValueOf(gstPipelineOop)));\r\tgstBus = 0;\r\tgstBus = gst_pipeline_get_bus(gstPipeline);\r\t_return_value = interpreterProxy->positive32BitIntegerFor(gstBus);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\r\r/*\tGets the gstClock of pipeline. */\r\rEXPORT(sqInt) primitivegstpipelinegetclock(void) {\r\tGstClock*  gstClock;\r\tGstPipeline*  gstPipeline;\r\tsqInt gstPipelineOop;\r\tsqInt _return_value;\r\r\tgstPipelineOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstPipeline = ((GstPipeline*) (interpreterProxy->positive32BitValueOf(gstPipelineOop)));\r\tgstClock = 0;\r\t;\r\tgstClock = gst_pipeline_get_clock(gstPipeline);\r\t_return_value = interpreterProxy->positive32BitIntegerFor(gstClock);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\r\r/*\tGet the configured delay (see gst_pipeline_set_delay()). */\r\rEXPORT(sqInt) primitivegstpipelinegetdelay(void) {\r\tGstPipeline*  gstPipeline;\r\tGstClockTime  gstClockTime;\r\tsqInt gstPipelineOop;\r\tsqInt _return_value;\r\r\tgstPipelineOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstPipeline = ((GstPipeline*) (interpreterProxy->positive32BitValueOf(gstPipelineOop)));\r\tgstClockTime = 0;\r\t;\r\tgstClockTime = gst_pipeline_get_delay(gstPipeline);\r\t_return_value = positive64BitIntegerForOverride(gstClockTime);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\r\r/*\tGets the last stream time of pipeline. If the pipeline is PLAYING, the returned time is the stream time used to configure the element's base time in the PAUSED->PLAYING state. If the pipeline is PAUSED, the returned time is the stream time when the pipeline was paused.\rThis function returns GST_CLOCK_TIME_NONE if the pipeline was configured to not handle the management of the element's base time (see gst_pipeline_set_new_stream_time()). */\r\rEXPORT(sqInt) primitivegstpipelinegetlaststreamtime(void) {\r\tGstPipeline*  gstPipeline;\r\tGstClockTime  gstClockTime;\r\tsqInt gstPipelineOop;\r\tsqInt _return_value;\r\r\tgstPipelineOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstPipeline = ((GstPipeline*) (interpreterProxy->positive32BitValueOf(gstPipelineOop)));\r\tgstClockTime = 0;\r\t;\r\tgstClockTime = gst_pipeline_get_last_stream_time(gstPipeline);\r\t_return_value = positive64BitIntegerForOverride(gstClockTime);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\r\r/*\tCreate a new pipeline with the given name. */\r\rEXPORT(sqInt) primitivegstpipelinenew(void) {\r\tGstElement*  gstElement;\r\tchar *name;\r\tsqInt _return_value;\r\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\r\tname = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstElement = 0;\r\tgstElement = gst_pipeline_new(name);\r\t_return_value = interpreterProxy->positive32BitIntegerFor(gstElement);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\r\r/*\tUsually, when a pipeline goes from READY to NULL state, it automatically flushes all pending messages on the bus, which is done for refcounting purposes, to break circular references.\rThis means that applications that update state using (async) bus messages (e.g. do certain things when a pipeline goes from PAUSED to READY) might not get to see messages when the pipeline is shut down, because they might be flushed before they can be dispatched in the main thread. This behaviour can be disabled using this function.\rIt is important that all messages on the bus are handled when the automatic flushing is disabled else memory leaks will be introduced. */\r\rEXPORT(sqInt) primitivegstpipelinesetautoflushbus(void) {\r\tGstPipeline*  gstPipeline;\r\tsqInt gstPipelineOop;\r\tsqInt aBoolean;\r\r\tgstPipelineOop = interpreterProxy->stackValue(1);\r\taBoolean = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(0));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstPipeline = ((GstPipeline*) (interpreterProxy->positive32BitValueOf(gstPipelineOop)));\r\t;\r\tgst_pipeline_set_auto_flush_bus(gstPipeline,aBoolean);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(2);\r\treturn null;\r}\r\r\r/*\tLet pipeline select a clock automatically. This is the default behaviour.\rUse this function if you previous forced a fixed clock with gst_pipeline_use_clock() and want to restore the default pipeline clock selection algorithm.\r */\r\rEXPORT(sqInt) primitivegstpipelinesetclock(void) {\r\tGstClock*  gstClock;\r\tGstPipeline*  gstPipeline;\r\tgboolean  aResult;\r\tsqInt gstPipelineOop;\r\tsqInt aClockValueOop;\r\tsqInt _return_value;\r\r\tgstPipelineOop = interpreterProxy->stackValue(1);\r\taClockValueOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstPipeline = ((GstPipeline*) (interpreterProxy->positive32BitValueOf(gstPipelineOop)));\r\tgstClock = ((GstClock*) (interpreterProxy->positive32BitValueOf(aClockValueOop)));\r\t;\r\t;\r\taResult = 0;\r\taResult =  gst_pipeline_set_clock(gstPipeline,gstClock);\r\t_return_value = (aResult) ? interpreterProxy->trueObject(): interpreterProxy->falseObject();\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\r\r/*\tSet the expected delay needed for all elements to perform the PAUSED to PLAYING state change. delay will be added to the base time of the elements so that they wait an additional delay amount of time before starting to process buffers and cannot be GST_CLOCK_TIME_NONE.\rThis option is used for tuning purposes and should normally not be used.\r */\r\rEXPORT(sqInt) primitivegstpipelinesetdelay(void) {\r\tGstPipeline*  gstPipeline;\r\tGstClockTime  gstClockTime ;\r\tsqInt gstPipelineOop;\r\tsqInt aClockValueOop;\r\r\tgstPipelineOop = interpreterProxy->stackValue(1);\r\taClockValueOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstPipeline = ((GstPipeline*) (interpreterProxy->positive32BitValueOf(gstPipelineOop)));\r\tgstClockTime = ((GstClockTime) (interpreterProxy->positive64BitValueOf(aClockValueOop)));\r\t;\r\t;\r\tgst_pipeline_set_delay(gstPipeline,gstClockTime);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(2);\r\treturn null;\r}\r\r\r/*\tSet the new stream time of pipeline to time. The stream time is used to set the base time on the elements (see gst_element_set_base_time()) in the PAUSED->PLAYING state transition.\rSetting time to GST_CLOCK_TIME_NONE will disable the pipeline's management of element base time. The application will then be responsible for performing base time distribution. This is sometimes useful if you want to synchronize capture from multiple pipelines, and you can also ensure that the pipelines have the same clock. */\r\rEXPORT(sqInt) primitivegstpipelinesetnewstreamtime(void) {\r\tGstPipeline*  gstPipeline;\r\tGstClockTime  gstClockTime ;\r\tsqInt gstPipelineOop;\r\tsqInt aClockValueOop;\r\r\tgstPipelineOop = interpreterProxy->stackValue(1);\r\taClockValueOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstPipeline = ((GstPipeline*) (interpreterProxy->positive32BitValueOf(gstPipelineOop)));\r\tgstClockTime = ((GstClockTime) (interpreterProxy->positive64BitValueOf(aClockValueOop)));\r\t;\r\t;\r\tgst_pipeline_set_new_stream_time(gstPipeline,gstClockTime);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(2);\r\treturn null;\r}\r\r\r/*\tForce pipeline to use the given clock. The pipeline will always use the given clock even if new clock providers are added to this pipeline.\rIf clock is NULL all clocking will be disabled which will make the pipeline run as fast as possible.\r */\r\rEXPORT(sqInt) primitivegstpipelineuseclock(void) {\r\tGstClock*  gstClock;\r\tGstPipeline*  gstPipeline;\r\tgboolean  aResult;\r\tsqInt gstPipelineOop;\r\tsqInt aClockValueOop;\r\r\tgstPipelineOop = interpreterProxy->stackValue(1);\r\taClockValueOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tgstPipeline = ((GstPipeline*) (interpreterProxy->positive32BitValueOf(gstPipelineOop)));\r\tgstClock = ((GstClock*) (interpreterProxy->positive32BitValueOf(aClockValueOop)));\r\t;\r\t;\r\taResult = 0;\r\tgst_pipeline_use_clock(gstPipeline,gstClock);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(2);\r\treturn null;\r}\r\r\r/*\tApplications might want to disable/enable the usage of fork() when rebuilding the registry. See gst_registry_fork_is_enabled() for more information.\rOn platforms without fork(), this function will have no effect on the return value of gst_registry_fork_is_enabled().\r\renabled:\rwhether rebuilding the registry may fork\r */\r\rEXPORT(sqInt) primitivegstregistryforksetenabled(void) {\r\tgboolean on;\r\tsqInt aBoolean;\r\r\taBoolean = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(0));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\ton = aBoolean;\r\t;\r\tgst_registry_fork_set_enabled(on);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(1);\r\treturn null;\r}\r\r\r/*\tSome functions in the GStreamer core might install a custom SIGSEGV handler to better catch and report errors to the application. Currently this feature is enabled by default when loading plugins.\rApplications might want to disable this behaviour with the gst_segtrap_set_enabled() function. This is typically done if the application wants to install its own handler without GStreamer interfering. */\r\rEXPORT(sqInt) primitivegstsegtrapisenabled(void) {\r\tgboolean on;\r\tsqInt _return_value;\r\r\ton = 0;\r\ton = gst_segtrap_is_enabled();\r\t_return_value = (on? interpreterProxy->trueObject(): interpreterProxy->falseObject());\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\r\r/*\tSome functions in the GStreamer core might install a custom SIGSEGV handler to better catch and report errors to the application. Currently this feature is enabled by default when loading plugins.\rApplications might want to disable this behaviour with the gst_segtrap_set_enabled() function. This is typically done if the application wants to install its own handler without GStreamer interfering. */\r\rEXPORT(sqInt) primitivegstsegtrapsetenabled(void) {\r\tgboolean on;\r\tsqInt aBoolean;\r\r\taBoolean = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(0));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\ton = aBoolean;\r\t;\r\tgst_segtrap_set_enabled(on);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(1);\r\treturn null;\r}\r\r\r/*\tThis function returns a string that is useful for describing this version of GStreamer to the outside world: user agent strings, logging, ... */\r\rEXPORT(sqInt) primitivegstversionstring(void) {\r\tgchar *version;\r\tsqInt versionOOp;\r\r\tversion = gst_version_string();\r\tversionOOp = stringFromCString(version);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, versionOOp);\r\treturn null;\r}\r\r\r/*\tNote: This is coded so that is can be run from Squeak. */\r\rEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter) {\r\tsqInt ok;\r\r\tinterpreterProxy = anInterpreter;\r\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\r\tif (ok == 0) {\r\t\treturn 0;\r\t}\r\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\r\treturn ok;\r}\r\rstatic sqInt shutdownModule(void) {\r\treturn 1;\r}\r\r\r/*\tConvert the given object into an integer value.\r\tThe object may be either a positive ST integer or a four-byte LargeInteger. */\r\rstatic sqInt signed32BitValueOfOverride(sqInt oop) {\r\tsqInt largeClass;\r\tunsigned char *where;\r\tsqInt negative;\r\tsqInt value;\r\tsqInt sz;\r\r\tif ((oop & 1)) {\r\t\treturn (oop >> 1);\r\t}\r\tlargeClass = interpreterProxy->fetchClassOf(oop);\r\tif (largeClass == (interpreterProxy->classLargePositiveInteger())) {\r\t\tnegative = 0;\r\t} else {\r\t\tif (largeClass == (interpreterProxy->classLargeNegativeInteger())) {\r\t\t\tnegative = 1;\r\t\t} else {\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t}\r\tsz = interpreterProxy->slotSizeOf(oop);\r\tif (!(sz == 4)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\twhere = interpreterProxy->firstIndexableField(oop);\r\r\t/* Filter out values out of range for the signed interpretation such as\r\t16rFFFFFFFF (positive w/ bit 32 set) and -16rFFFFFFFF (negative w/ bit\r\t32 set). Since the sign is implicit in the class we require that the\r\thigh bit of the magnitude is not set which is a simple test here. */\r\r\tvalue = (((where[0]) + ((where[1]) << 8)) + ((where[2]) << 16)) + ((where[3]) << 24);\r\tif (negative && (value == (1 << 31))) {\r\t\treturn value;\r\t}\r\tif (value < 0) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tif (negative) {\r\t\treturn 0 - value;\r\t} else {\r\t\treturn value;\r\t}\r}\r\r\r/*\tReturn a Large Integer object for the given integer value */\r\rstatic sqInt signed64BitIntegerForOverride(sqLong integerValue) {\r\tsqInt sz;\r\tsqInt i;\r\tsqInt newLargeInteger;\r\tsqInt intValue;\r\tsqLong magnitude;\r\tsqLong lowestIntegerValue;\r\tunsigned char*where;\r\tsqInt largeClass;\r\tusqInt highWord;\r\r\tlowestIntegerValue = 1;\r\tlowestIntegerValue = lowestIntegerValue << 63;\r\tif (integerValue == lowestIntegerValue) {\r\r\t\t/* newLargeInteger := self instantiateClass: largeClass indexableSize:  8. */\r\r\t\tlargeClass = interpreterProxy->classLargeNegativeInteger();\r\t\tnewLargeInteger = interpreterProxy->instantiateClassindexableSize(largeClass, 8);\r\t\twhere = interpreterProxy->firstIndexableField(newLargeInteger);\r\t\twhere[7] = 128;\r\t\treturn newLargeInteger;\r\t}\r\tif (integerValue < 0) {\r\t\tlargeClass = interpreterProxy->classLargeNegativeInteger();\r\t\tmagnitude = 0 - integerValue;\r\t} else {\r\t\tlargeClass = interpreterProxy->classLargePositiveInteger();\r\t\tmagnitude = integerValue;\r\t}\r\tif (magnitude <= 2147483647U) {\r\t\treturn interpreterProxy->signed32BitIntegerFor(integerValue);\r\t}\r\r\t/* shift is coerced to usqInt otherwise */\r\r\thighWord = magnitude >> 32;\r\tif (highWord == 0) {\r\t\tsz = 4;\r\t} else {\r\t\tsz = 5;\r\t\tif ((highWord = ((usqInt) highWord) >> 8) > 0) {\r\t\t\tsz += 1;\r\t\t}\r\t\tif ((highWord = ((usqInt) highWord) >> 8) > 0) {\r\t\t\tsz += 1;\r\t\t}\r\t\tif ((highWord = ((usqInt) highWord) >> 8) > 0) {\r\t\t\tsz += 1;\r\t\t}\r\t}\r\tnewLargeInteger = interpreterProxy->instantiateClassindexableSize(largeClass, sz);\r\twhere = interpreterProxy->firstIndexableField(newLargeInteger);\r\tfor (i = 0; i <= (sz - 1); i += 1) {\r\r\t\t/* self storeByte: i ofObject: newLargeInteger withValue: intValue */\r\r\t\tintValue = (magnitude >> (i * 8)) & 255;\r\t\twhere[i] = intValue;\r\t}\r\treturn newLargeInteger;\r}\r\r\r/*\tConvert the given object into an integer value.\r\tThe object may be either a positive ST integer or a eight-byte LargeInteger. */\r\rstatic sqLong signed64BitValueOfOverride(sqInt oop) {\r\tsqInt negative;\r\tsqInt sz;\r\tsqInt i;\r\tsqLong lowestIntegerValue;\r\tunsigned char *where;\r\tsqInt largeClass;\r\tsqInt szsqLong;\r\tsqLong value;\r\r\tif ((oop & 1)) {\r\t\treturn ((sqLong) ((oop >> 1)));\r\t}\r\tlargeClass = interpreterProxy->fetchClassOf(oop);\r\tif (largeClass == (interpreterProxy->classLargePositiveInteger())) {\r\t\tnegative = 0;\r\t} else {\r\t\tif (largeClass == (interpreterProxy->classLargeNegativeInteger())) {\r\t\t\tnegative = 1;\r\t\t} else {\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t}\r\tszsqLong = sizeof(sqLong);\r\tsz = interpreterProxy->slotSizeOf(oop);\r\tif (sz > szsqLong) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tvalue = 0;\r\twhere = interpreterProxy->firstIndexableField(oop);\r\tfor (i = 0; i <= (sz - 1); i += 1) {\r\t\tvalue += (((sqLong) (where[i]))) << (i * 8);\r\t}\r\tlowestIntegerValue = 1;\r\tlowestIntegerValue = lowestIntegerValue << 63;\r\tif (negative && (value == lowestIntegerValue)) {\r\t\treturn value;\r\t}\r\tif (value < 0) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tif (negative) {\r\t\treturn 0 - value;\r\t} else {\r\t\treturn value;\r\t}\r}\r\rstatic sqInt sqAssert(sqInt aBool) {\r\t/* missing DebugCode */;\r}\r\r\r/*\tAnswer a new String copied from a null-terminated C string.\r\tCaution: This may invoke the garbage collector. */\r\rstatic sqInt stringFromCString(const char *aCString) {\r\tsqInt len;\r\tsqInt newString;\r\r\tif (aCString == null) {\r\t\treturn interpreterProxy->nilObject();\r\t}\r\tlen = strlen(aCString);\r\tnewString = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), len);\r\tstrncpy(interpreterProxy->arrayValueOf(newString), aCString, len);\r\treturn newString;\r}\r\r\r#ifdef SQUEAK_BUILTIN_PLUGIN\r\r\rvoid* GStreamerPlugin_exports[][3] = {\r\t{\"GStreamerPlugin\", \"primitivegstelementfactorygeturitype\", (void*)primitivegstelementfactorygeturitype},\r\t{\"GStreamerPlugin\", \"primitivegobjectclasslistpropertyulongatIndex\", (void*)primitivegobjectclasslistpropertyulongatIndex},\r\t{\"GStreamerPlugin\", \"primitivegstpipelinesetdelay\", (void*)primitivegstpipelinesetdelay},\r\t{\"GStreamerPlugin\", \"primitivegstmessageparsesegmentstart\", (void*)primitivegstmessageparsesegmentstart},\r\t{\"GStreamerPlugin\", \"primitivegobjectgetlonglongfrom\", (void*)primitivegobjectgetlonglongfrom},\r\t{\"GStreamerPlugin\", \"primitivegstpipelinesetnewstreamtime\", (void*)primitivegstpipelinesetnewstreamtime},\r\t{\"GStreamerPlugin\", \"primitivegstelementfactorygetdescription\", (void*)primitivegstelementfactorygetdescription},\r\t{\"GStreamerPlugin\", \"primitivegstregistryforksetenabled\", (void*)primitivegstregistryforksetenabled},\r\t{\"GStreamerPlugin\", \"primitivegobjectclasslistpropertyfloatatIndex\", (void*)primitivegobjectclasslistpropertyfloatatIndex},\r\t{\"GStreamerPlugin\", \"primitivegstmessageparseerror\", (void*)primitivegstmessageparseerror},\r\t{\"GStreamerPlugin\", \"primitivegstelementseek\", (void*)primitivegstelementseek},\r\t{\"GStreamerPlugin\", \"primitivegstpadacceptcaps\", (void*)primitivegstpadacceptcaps},\r\t{\"GStreamerPlugin\", \"primitivegstmessageunref\", (void*)primitivegstmessageunref},\r\t{\"GStreamerPlugin\", \"primitiveSqueakSinkAudioGetData\", (void*)primitiveSqueakSinkAudioGetData},\r\t{\"GStreamerPlugin\", \"primitiveSqueakSinkVideo\", (void*)primitiveSqueakSinkVideo},\r\t{\"GStreamerPlugin\", \"primitivegstbuspopfilter\", (void*)primitivegstbuspopfilter},\r\t{\"GStreamerPlugin\", \"primitivegobjectclasslistpropertypointeratIndex\", (void*)primitivegobjectclasslistpropertypointeratIndex},\r\t{\"GStreamerPlugin\", \"primitivegobjectsetstringon\", (void*)primitivegobjectsetstringon},\r\t{\"GStreamerPlugin\", \"primitiveSqueakSinkGetFrameRateNumerator\", (void*)primitiveSqueakSinkGetFrameRateNumerator},\r\t{\"GStreamerPlugin\", \"primitivegobjectsetboolon\", (void*)primitivegobjectsetboolon},\r\t{\"GStreamerPlugin\", \"primitivegobjectclasslistpropertyenumatIndex\", (void*)primitivegobjectclasslistpropertyenumatIndex},\r\t{\"GStreamerPlugin\", \"primitivegstelementgsignalconnect\", (void*)primitivegstelementgsignalconnect},\r\t{\"GStreamerPlugin\", \"primitivegsignalconnect\", (void*)primitivegsignalconnect},\r\t{\"GStreamerPlugin\", \"primitivegstpadsetactive\", (void*)primitivegstpadsetactive},\r\t{\"GStreamerPlugin\", \"primitivegstmessagesrc\", (void*)primitivegstmessagesrc},\r\t{\"GStreamerPlugin\", \"primitivegstsegtrapsetenabled\", (void*)primitivegstsegtrapsetenabled},\r\t{\"GStreamerPlugin\", \"primitiveSqueakSinkGetWidth\", (void*)primitiveSqueakSinkGetWidth},\r\t{\"GStreamerPlugin\", \"primitiveSqueakSinkGetFrameRateDenominator\", (void*)primitiveSqueakSinkGetFrameRateDenominator},\r\t{\"GStreamerPlugin\", \"primitivegstpipelinegetlaststreamtime\", (void*)primitivegstpipelinegetlaststreamtime},\r\t{\"GStreamerPlugin\", \"primitivegstcapstostring\", (void*)primitivegstcapstostring},\r\t{\"GStreamerPlugin\", \"primitivegstelementgetstate\", (void*)primitivegstelementgetstate},\r\t{\"GStreamerPlugin\", \"primitivegobjectgetdoublefrom\", (void*)primitivegobjectgetdoublefrom},\r\t{\"GStreamerPlugin\", \"primitivegstelementgetcompatiblepad\", (void*)primitivegstelementgetcompatiblepad},\r\t{\"GStreamerPlugin\", \"primitivegstbuspop\", (void*)primitivegstbuspop},\r\t{\"GStreamerPlugin\", \"primitivegobjectclasslistpropertyulonglongatIndex\", (void*)primitivegobjectclasslistpropertyulonglongatIndex},\r\t{\"GStreamerPlugin\", \"primitivegstmessageparsestatechanged\", (void*)primitivegstmessageparsestatechanged},\r\t{\"GStreamerPlugin\", \"primitivegstpipelinegetdelay\", (void*)primitivegstpipelinegetdelay},\r\t{\"GStreamerPlugin\", \"primitivegstpipelinesetclock\", (void*)primitivegstpipelinesetclock},\r\t{\"GStreamerPlugin\", \"primitivegstbushavepending\", (void*)primitivegstbushavepending},\r\t{\"GStreamerPlugin\", \"primitivegobjectgetulongfrom\", (void*)primitivegobjectgetulongfrom},\r\t{\"GStreamerPlugin\", \"primitivegobjectclasslistpropertydoubleatIndex\", (void*)primitivegobjectclasslistpropertydoubleatIndex},\r\t{\"GStreamerPlugin\", \"primitivegstpadsetcaps\", (void*)primitivegstpadsetcaps},\r\t{\"GStreamerPlugin\", \"primitivegstelementsetstate\", (void*)primitivegstelementsetstate},\r\t{\"GStreamerPlugin\", \"primitivegstmessageparseinfo\", (void*)primitivegstmessageparseinfo},\r\t{\"GStreamerPlugin\", \"primitiveSqueakSinkAllocate\", (void*)primitiveSqueakSinkAllocate},\r\t{\"GStreamerPlugin\", \"primitivegobjectfree\", (void*)primitivegobjectfree},\r\t{\"GStreamerPlugin\", \"primitivegobjectgetboolfrom\", (void*)primitivegobjectgetboolfrom},\r\t{\"GStreamerPlugin\", \"primitiveSqueakSrcAllocate\", (void*)primitiveSqueakSrcAllocate},\r\t{\"GStreamerPlugin\", \"primitivegstversionstring\", (void*)primitivegstversionstring},\r\t{\"GStreamerPlugin\", \"primitivegstelementfactorygetklass\", (void*)primitivegstelementfactorygetklass},\r\t{\"GStreamerPlugin\", \"primitivegobjectclasslistpropertyboolatIndex\", (void*)primitivegobjectclasslistpropertyboolatIndex},\r\t{\"GStreamerPlugin\", \"primitivegstmessageparseduration\", (void*)primitivegstmessageparseduration},\r\t{\"GStreamerPlugin\", \"primitivegstelementfactoryfind\", (void*)primitivegstelementfactoryfind},\r\t{\"GStreamerPlugin\", \"primitivegobjectsetfloaton\", (void*)primitivegobjectsetfloaton},\r\t{\"GStreamerPlugin\", \"primitivegobjectgetlongfrom\", (void*)primitivegobjectgetlongfrom},\r\t{\"GStreamerPlugin\", \"primitivegstmessageparsebuffering\", (void*)primitivegstmessageparsebuffering},\r\t{\"GStreamerPlugin\", \"setInterpreter\", (void*)setInterpreter},\r\t{\"GStreamerPlugin\", \"primitivegstelementseeksimple\", (void*)primitivegstelementseeksimple},\r\t{\"GStreamerPlugin\", \"primitivegobjectclasslistpropertystringatIndex\", (void*)primitivegobjectclasslistpropertystringatIndex},\r\t{\"GStreamerPlugin\", \"primitivegstpadlink\", (void*)primitivegstpadlink},\r\t{\"GStreamerPlugin\", \"primitivegobjectgetulonglongfrom\", (void*)primitivegobjectgetulonglongfrom},\r\t{\"GStreamerPlugin\", \"primitivegstpipelinegetclock\", (void*)primitivegstpipelinegetclock},\r\t{\"GStreamerPlugin\", \"getModuleName\", (void*)getModuleName},\r\t{\"GStreamerPlugin\", \"primitivegetoop\", (void*)primitivegetoop},\r\t{\"GStreamerPlugin\", \"primitivegobjectgetsmalltalkobject\", (void*)primitivegobjectgetsmalltalkobject},\r\t{\"GStreamerPlugin\", \"primitivegstbinadd\", (void*)primitivegstbinadd},\r\t{\"GStreamerPlugin\", \"primitivegstelementfactorymake\", (void*)primitivegstelementfactorymake},\r\t{\"GStreamerPlugin\", \"primitivegstpipelinegetbus\", (void*)primitivegstpipelinegetbus},\r\t{\"GStreamerPlugin\", \"primitivegstpadgetparentelement\", (void*)primitivegstpadgetparentelement},\r\t{\"GStreamerPlugin\", \"primitivegstelementgetrequestpad\", (void*)primitivegstelementgetrequestpad},\r\t{\"GStreamerPlugin\", \"primitiveSqueakSrcWithTime\", (void*)primitiveSqueakSrcWithTime},\r\t{\"GStreamerPlugin\", \"primitivegobjectclasslistpropertyintatIndex\", (void*)primitivegobjectclasslistpropertyintatIndex},\r\t{\"GStreamerPlugin\", \"primitivegstpipelinenew\", (void*)primitivegstpipelinenew},\r\t{\"GStreamerPlugin\", \"primitivegobjectclasslistpropertymetaDataatIndex\", (void*)primitivegobjectclasslistpropertymetaDataatIndex},\r\t{\"GStreamerPlugin\", \"primitivegstelementqueryduration\", (void*)primitivegstelementqueryduration},\r\t{\"GStreamerPlugin\", \"primitivegstpipelinegetautoflushbus\", (void*)primitivegstpipelinegetautoflushbus},\r\t{\"GStreamerPlugin\", \"primitivegobjectgetpointerfrom\", (void*)primitivegobjectgetpointerfrom},\r\t{\"GStreamerPlugin\", \"primitivegstpipelinesetautoflushbus\", (void*)primitivegstpipelinesetautoflushbus},\r\t{\"GStreamerPlugin\", \"primitivegstelementqueryconvert\", (void*)primitivegstelementqueryconvert},\r\t{\"GStreamerPlugin\", \"primitivegobjectsetpointeron\", (void*)primitivegobjectsetpointeron},\r\t{\"GStreamerPlugin\", \"primitivegobjectsetdoubleon\", (void*)primitivegobjectsetdoubleon},\r\t{\"GStreamerPlugin\", \"primitivegobjectsetlongon\", (void*)primitivegobjectsetlongon},\r\t{\"GStreamerPlugin\", \"primitivegstelementreleaserequestpad\", (void*)primitivegstelementreleaserequestpad},\r\t{\"GStreamerPlugin\", \"primitivegobjectsetulongon\", (void*)primitivegobjectsetulongon},\r\t{\"GStreamerPlugin\", \"primitivegstelementlink\", (void*)primitivegstelementlink},\r\t{\"GStreamerPlugin\", \"primitivegstpadgetcaps\", (void*)primitivegstpadgetcaps},\r\t{\"GStreamerPlugin\", \"primitivecallbacksignalseenfor\", (void*)primitivecallbacksignalseenfor},\r\t{\"GStreamerPlugin\", \"primitivegstelementfactorycreate\", (void*)primitivegstelementfactorycreate},\r\t{\"GStreamerPlugin\", \"primitiveSqueakSrc\", (void*)primitiveSqueakSrc},\r\t{\"GStreamerPlugin\", \"primitivegobjectclasslistpropertylonglongatIndex\", (void*)primitivegobjectclasslistpropertylonglongatIndex},\r\t{\"GStreamerPlugin\", \"primitivegstbinnew\", (void*)primitivegstbinnew},\r\t{\"GStreamerPlugin\", \"primitivegstinitcheck\", (void*)primitivegstinitcheck},\r\t{\"GStreamerPlugin\", \"primitivegstghostpadnew\", (void*)primitivegstghostpadnew},\r\t{\"GStreamerPlugin\", \"primitivegstelementfactorygetauthor\", (void*)primitivegstelementfactorygetauthor},\r\t{\"GStreamerPlugin\", \"primitivegstelementfactorygetlongname\", (void*)primitivegstelementfactorygetlongname},\r\t{\"GStreamerPlugin\", \"primitivegobjectclasslistpropertyuintatIndex\", (void*)primitivegobjectclasslistpropertyuintatIndex},\r\t{\"GStreamerPlugin\", \"primitiveSqueakSinkFree\", (void*)primitiveSqueakSinkFree},\r\t{\"GStreamerPlugin\", \"primitivegstelementadd\", (void*)primitivegstelementadd},\r\t{\"GStreamerPlugin\", \"primitivegstelementgetstaticpad\", (void*)primitivegstelementgetstaticpad},\r\t{\"GStreamerPlugin\", \"primitivegobjectsetlonglongon\", (void*)primitivegobjectsetlonglongon},\r\t{\"GStreamerPlugin\", \"primitivegstpipelineuseclock\", (void*)primitivegstpipelineuseclock},\r\t{\"GStreamerPlugin\", \"primitivegobjectgetfloatfrom\", (void*)primitivegobjectgetfloatfrom},\r\t{\"GStreamerPlugin\", \"primitivegstobjectunref\", (void*)primitivegstobjectunref},\r\t{\"GStreamerPlugin\", \"primitivegobjectgetstringfrom\", (void*)primitivegobjectgetstringfrom},\r\t{\"GStreamerPlugin\", \"primitivegobjectsetulonglongon\", (void*)primitivegobjectsetulonglongon},\r\t{\"GStreamerPlugin\", \"primitivegstbuspeek\", (void*)primitivegstbuspeek},\r\t{\"GStreamerPlugin\", \"primitivegobjectclasslistproperties\", (void*)primitivegobjectclasslistproperties},\r\t{\"GStreamerPlugin\", \"primitivegstmessagetypestring\", (void*)primitivegstmessagetypestring},\r\t{\"GStreamerPlugin\", \"primitivegstmessageparsesegmentdone\", (void*)primitivegstmessageparsesegmentdone},\r\t{\"GStreamerPlugin\", \"primitivegobjectclasslistpropertylongatIndex\", (void*)primitivegobjectclasslistpropertylongatIndex},\r\t{\"GStreamerPlugin\", \"primitivegstsegtrapisenabled\", (void*)primitivegstsegtrapisenabled},\r\t{\"GStreamerPlugin\", \"primitivegstelementlinkfiltered\", (void*)primitivegstelementlinkfiltered},\r\t{\"GStreamerPlugin\", \"primitivegstmessageparsewarning\", (void*)primitivegstmessageparsewarning},\r\t{\"GStreamerPlugin\", \"primitivegstcapsfromstring\", (void*)primitivegstcapsfromstring},\r\t{\"GStreamerPlugin\", \"primitivegetinterpreterproxy\", (void*)primitivegetinterpreterproxy},\r\t{\"GStreamerPlugin\", \"primitiveSqueakSinkGetHeight\", (void*)primitiveSqueakSinkGetHeight},\r\t{\"GStreamerPlugin\", \"primitivegstelementqueryposition\", (void*)primitivegstelementqueryposition},\r\t{\"GStreamerPlugin\", \"primitivegstpipelineautoclock\", (void*)primitivegstpipelineautoclock},\r\t{NULL, NULL, NULL}\r};\r\r\r#endif /* ifdef SQ_BUILTIN_PLUGIN */\r\r"
  },
  {
    "path": "vm/src/from_squeak/unix/src/plugins/HostWindowPlugin/HostWindowPlugin.c",
    "content": "/* Automatically generated from Squeak on 23 January 2011 3:55:56 pm \r   by VMMaker 4.4.7\r */\r\r#include <math.h>\r#include <stdio.h>\r#include <stdlib.h>\r#include <string.h>\r#include <time.h>\r\r/* Default EXPORT macro that does nothing (see comment in sq.h): */\r#define EXPORT(returnType) returnType\r\r/* Do not include the entire sq.h file but just those parts needed. */\r/*  The virtual machine proxy definition */\r#include \"sqVirtualMachine.h\"\r/* Configuration options */\r#include \"sqConfig.h\"\r/* Platform specific definitions */\r#include \"sqPlatformSpecific.h\"\r\r#define true 1\r#define false 0\r#define null 0  /* using 'null' because nil is predefined in Think C */\r#ifdef SQUEAK_BUILTIN_PLUGIN\r#undef EXPORT\r// was #undef EXPORT(returnType) but screws NorCroft cc\r#define EXPORT(returnType) static returnType\r#endif\r#include \"HostWindowPlugin.h\"\r\r#include \"sqMemoryAccess.h\"\r\r\r/*** Constants ***/\r\r/*** Function Prototypes ***/\rstatic VirtualMachine * getInterpreter(void);\r#pragma export on\rEXPORT(const char*) getModuleName(void);\r#pragma export off\rstatic sqInt halt(void);\rstatic sqInt msg(char *s);\r#pragma export on\rEXPORT(sqInt) primitiveCloseHostWindow(void);\rEXPORT(sqInt) primitiveCreateHostWindow(void);\rEXPORT(sqInt) primitiveHostWindowPosition(void);\rEXPORT(sqInt) primitiveHostWindowPositionSet(void);\rEXPORT(sqInt) primitiveHostWindowSize(void);\rEXPORT(sqInt) primitiveHostWindowSizeSet(void);\rEXPORT(sqInt) primitiveHostWindowTitle(void);\rEXPORT(sqInt) primitiveShowHostWindowRect(void);\rEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\rEXPORT(sqInt) shutdownModule(void);\r#pragma export off\rstatic sqInt sqAssert(sqInt aBool);\r/*** Variables ***/\r\r#ifdef SQUEAK_BUILTIN_PLUGIN\rextern\r#endif\rstruct VirtualMachine* interpreterProxy;\rstatic const char *moduleName =\r#ifdef SQUEAK_BUILTIN_PLUGIN\r\t\"HostWindowPlugin 23 January 2011 (i)\"\r#else\r\t\"HostWindowPlugin 23 January 2011 (e)\"\r#endif\r;\r\r\r\r/*\tNote: This is coded so that plugins can be run from Squeak. */\r\rstatic VirtualMachine * getInterpreter(void) {\r\treturn interpreterProxy;\r}\r\r\r/*\tNote: This is hardcoded so it can be run from Squeak.\r\tThe module name is used for validating a module *after*\r\tit is loaded to check if it does really contain the module\r\twe're thinking it contains. This is important! */\r\rEXPORT(const char*) getModuleName(void) {\r\treturn moduleName;\r}\r\rstatic sqInt halt(void) {\r\t;\r}\r\rstatic sqInt msg(char *s) {\r\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\r}\r\r\r/*\tClose a host window. windowIndex is the SmallInt handle returned previously by primitiveCreateHostWindow. Fail if the index is invalid or the platform code fails */\r\rEXPORT(sqInt) primitiveCloseHostWindow(void) {\r\tsqInt ok;\r\tsqInt windowIndex;\r\r\twindowIndex = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tok = closeWindow(windowIndex);\r\tif (!(ok)) {\r\t\tinterpreterProxy->primitiveFail();\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(1);\r\treturn null;\r}\r\r\r/*\tCreate a host window of width 'w' pixels, height 'h' with the origin of the\ruser area at 'x@y' from the topleft corner of the screen.\rReturn the SmallInt value of the internal index to the window description block\r- which is whatever the host platform code needs it to be. */\r\rEXPORT(sqInt) primitiveCreateHostWindow(void) {\r\tsqInt windowIndex;\r\tsqInt listLength;\r\tsqInt w;\r\tsqInt h;\r\tsqInt x;\r\tsqInt y;\r\tchar *list;\r\tsqInt _return_value;\r\r\tw = interpreterProxy->stackIntegerValue(4);\r\th = interpreterProxy->stackIntegerValue(3);\r\tx = interpreterProxy->stackIntegerValue(2);\r\ty = interpreterProxy->stackIntegerValue(1);\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\r\tlist = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlistLength = interpreterProxy->slotSizeOf((oopForPointer( list ) - BASE_HEADER_SIZE));\r\twindowIndex = createWindowWidthheightoriginXyattrlength(w, h, x, y, list, listLength);\r\tif (windowIndex > 0) {\r\t\t_return_value = interpreterProxy->integerObjectOf(windowIndex);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(6, _return_value);\r\t\treturn null;\r\t} else {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r}\r\r\r/*\tReturn the origin position of the user area of the window in pixels from the topleft corner of the screen. Fail if the windowIndex is invalid or the platform routine returns -1 to indicate failure */\r\rEXPORT(sqInt) primitiveHostWindowPosition(void) {\r\tsqInt pos;\r\tsqInt windowIndex;\r\tsqInt _return_value;\r\r\twindowIndex = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tpos = ioPositionOfWindow(windowIndex);\r\tif (pos == -1) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t} else {\r\t\t_return_value = interpreterProxy->makePointwithxValueyValue(((usqInt) pos) >> 16, pos & 65535);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(2, _return_value);\r\t\treturn null;\r\t}\r}\r\r\r/*\tSet the origin position of the user area of the window  in pixels from the topleft corner of the screen- return the position actually set by the OS/GUI/window manager. Fail if the windowIndex is invalid or the platform routine returns -1 to indicate failure */\r\rEXPORT(sqInt) primitiveHostWindowPositionSet(void) {\r\tsqInt pos;\r\tsqInt windowIndex;\r\tsqInt x;\r\tsqInt y;\r\tsqInt _return_value;\r\r\twindowIndex = interpreterProxy->stackIntegerValue(2);\r\tx = interpreterProxy->stackIntegerValue(1);\r\ty = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tpos = ioPositionOfWindowSetxy(windowIndex, x, y);\r\tif (pos == -1) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t} else {\r\t\t_return_value = interpreterProxy->makePointwithxValueyValue(((usqInt) pos) >> 16, pos & 65535);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(4, _return_value);\r\t\treturn null;\r\t}\r}\r\r\r/*\tReturn the size of the user area of the window in pixels. Fail if the windowIndex is invalid or the platform routine returns -1 to indicate failure */\r\rEXPORT(sqInt) primitiveHostWindowSize(void) {\r\tsqInt size;\r\tsqInt windowIndex;\r\tsqInt _return_value;\r\r\twindowIndex = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tsize = ioSizeOfWindow(windowIndex);\r\tif (size == -1) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t} else {\r\t\t_return_value = interpreterProxy->makePointwithxValueyValue(((usqInt) size) >> 16, size & 65535);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(2, _return_value);\r\t\treturn null;\r\t}\r}\r\r\r/*\tSet the size of the user area of the window in pixels - return what is actually set by the OS/GUI/window manager. Fail if the windowIndex is invalid or the platform routine returns -1 to indicate failure */\r\rEXPORT(sqInt) primitiveHostWindowSizeSet(void) {\r\tsqInt size;\r\tsqInt windowIndex;\r\tsqInt x;\r\tsqInt y;\r\tsqInt _return_value;\r\r\twindowIndex = interpreterProxy->stackIntegerValue(2);\r\tx = interpreterProxy->stackIntegerValue(1);\r\ty = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tsize = ioSizeOfWindowSetxy(windowIndex, x, y);\r\tif (size == -1) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t} else {\r\t\t_return_value = interpreterProxy->makePointwithxValueyValue(((usqInt) size) >> 16, size & 65535);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(4, _return_value);\r\t\treturn null;\r\t}\r}\r\r\r/*\tSet the title bar label of the window. Fail if the windowIndex is invalid or the platform routine returns -1 to indicate failure */\r\rEXPORT(sqInt) primitiveHostWindowTitle(void) {\r\tsqInt res;\r\tsqInt titleLength;\r\tsqInt id;\r\tchar *titleString;\r\r\tid = interpreterProxy->stackIntegerValue(1);\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\r\ttitleString = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\ttitleLength = interpreterProxy->slotSizeOf((oopForPointer( titleString ) - BASE_HEADER_SIZE));\r\tres = ioSetTitleOfWindow(id, titleString, titleLength);\r\tif (res == -1) {\r\t\tinterpreterProxy->primitiveFail();\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(2);\r\treturn null;\r}\r\r\r/*\tHost window analogue of DisplayScreen> primShowRectLeft:right:top:bottom:\r(Interpreter>primitiveShowDisplayRect) which takes the window index, bitmap\rdetails and the rectangle bounds. Fail if the windowIndex is invalid or the\rplatform routine returns false to indicate failure */\r\rEXPORT(sqInt) primitiveShowHostWindowRect(void) {\r\tsqInt ok;\r\tsqInt windowIndex;\r\tusqInt *dispBits;\r\tsqInt w;\r\tsqInt h;\r\tsqInt d;\r\tsqInt left;\r\tsqInt right;\r\tsqInt top;\r\tsqInt bottom;\r\r\twindowIndex = interpreterProxy->stackIntegerValue(8);\r\tinterpreterProxy->success(interpreterProxy->isWords(interpreterProxy->stackValue(7)));\r\tdispBits = ((unsigned *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(7))));\r\tw = interpreterProxy->stackIntegerValue(6);\r\th = interpreterProxy->stackIntegerValue(5);\r\td = interpreterProxy->stackIntegerValue(4);\r\tleft = interpreterProxy->stackIntegerValue(3);\r\tright = interpreterProxy->stackIntegerValue(2);\r\ttop = interpreterProxy->stackIntegerValue(1);\r\tbottom = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tok = ioShowDisplayOnWindow(dispBits, w, h, d, left, right, top,\rbottom, windowIndex);\r\tif (!(ok)) {\r\t\tinterpreterProxy->primitiveFail();\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(9);\r\treturn null;\r}\r\r\r/*\tNote: This is coded so that is can be run from Squeak. */\r\rEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter) {\r\tsqInt ok;\r\r\tinterpreterProxy = anInterpreter;\r\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\r\tif (ok == 0) {\r\t\treturn 0;\r\t}\r\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\r\treturn ok;\r}\r\r\r/*\tdo any window related VM closing down work your platform requires. */\r\rEXPORT(sqInt) shutdownModule(void) {\r\treturn ioCloseAllWindows();\r}\r\rstatic sqInt sqAssert(sqInt aBool) {\r\t/* missing DebugCode */;\r}\r\r\r#ifdef SQUEAK_BUILTIN_PLUGIN\r\r\rvoid* HostWindowPlugin_exports[][3] = {\r\t{\"HostWindowPlugin\", \"shutdownModule\", (void*)shutdownModule},\r\t{\"HostWindowPlugin\", \"primitiveHostWindowSizeSet\", (void*)primitiveHostWindowSizeSet},\r\t{\"HostWindowPlugin\", \"primitiveCreateHostWindow\", (void*)primitiveCreateHostWindow},\r\t{\"HostWindowPlugin\", \"primitiveShowHostWindowRect\", (void*)primitiveShowHostWindowRect},\r\t{\"HostWindowPlugin\", \"primitiveHostWindowPositionSet\", (void*)primitiveHostWindowPositionSet},\r\t{\"HostWindowPlugin\", \"setInterpreter\", (void*)setInterpreter},\r\t{\"HostWindowPlugin\", \"primitiveHostWindowPosition\", (void*)primitiveHostWindowPosition},\r\t{\"HostWindowPlugin\", \"primitiveCloseHostWindow\", (void*)primitiveCloseHostWindow},\r\t{\"HostWindowPlugin\", \"getModuleName\", (void*)getModuleName},\r\t{\"HostWindowPlugin\", \"primitiveHostWindowTitle\", (void*)primitiveHostWindowTitle},\r\t{\"HostWindowPlugin\", \"primitiveHostWindowSize\", (void*)primitiveHostWindowSize},\r\t{NULL, NULL, NULL}\r};\r\r\r#endif /* ifdef SQ_BUILTIN_PLUGIN */\r\r"
  },
  {
    "path": "vm/src/from_squeak/unix/src/plugins/KedamaPlugin/KedamaPlugin.c",
    "content": "/* Automatically generated from Squeak on 23 January 2011 3:55:57 pm \r   by VMMaker 4.4.7\r */\r\r#include <math.h>\r#include <stdio.h>\r#include <stdlib.h>\r#include <string.h>\r#include <time.h>\r\r/* Default EXPORT macro that does nothing (see comment in sq.h): */\r#define EXPORT(returnType) returnType\r\r/* Do not include the entire sq.h file but just those parts needed. */\r/*  The virtual machine proxy definition */\r#include \"sqVirtualMachine.h\"\r/* Configuration options */\r#include \"sqConfig.h\"\r/* Platform specific definitions */\r#include \"sqPlatformSpecific.h\"\r\r#define true 1\r#define false 0\r#define null 0  /* using 'null' because nil is predefined in Think C */\r#ifdef SQUEAK_BUILTIN_PLUGIN\r#undef EXPORT\r// was #undef EXPORT(returnType) but screws NorCroft cc\r#define EXPORT(returnType) static returnType\r#endif\r\r#include \"sqMemoryAccess.h\"\r\r\r/*** Constants ***/\r\r/*** Function Prototypes ***/\rstatic double degreesFromXy(double x, double y);\rstatic double degreesToRadians(double degrees);\r#pragma export on\rEXPORT(sqInt) drawTurtlesInArray(void);\rEXPORT(sqInt) getHeadingArrayInto(void);\r#pragma export off\rstatic VirtualMachine * getInterpreter(void);\r#pragma export on\rEXPORT(const char*) getModuleName(void);\rEXPORT(sqInt) getScalarHeading(void);\r#pragma export off\rstatic sqInt halt(void);\r#pragma export on\rEXPORT(sqInt) initialiseModule(void);\r#pragma export off\rstatic sqInt kedamaRandom2(sqInt range);\rstatic sqInt kedamaRandom(sqInt range);\r#pragma export on\rEXPORT(sqInt) kedamaSetRandomSeed(void);\rEXPORT(sqInt) makeMask(void);\rEXPORT(sqInt) makeMaskLog(void);\rEXPORT(sqInt) makeTurtlesMap(void);\r#pragma export off\rstatic sqInt msg(char *s);\r#pragma export on\rEXPORT(sqInt) primPixelAtXY(void);\rEXPORT(sqInt) primPixelAtXYPut(void);\rEXPORT(sqInt) primPixelsAtXY(void);\rEXPORT(sqInt) primScalarForward(void);\rEXPORT(sqInt) primSetPixelsAtXY(void);\rEXPORT(sqInt) primTurtlesForward(void);\rEXPORT(sqInt) primUpHill(void);\rEXPORT(sqInt) primitiveAddArrays(void);\rEXPORT(sqInt) primitiveAddScalar(void);\rEXPORT(sqInt) primitiveDivArrays(void);\rEXPORT(sqInt) primitiveDivScalar(void);\rEXPORT(sqInt) primitiveMulArrays(void);\rEXPORT(sqInt) primitiveMulScalar(void);\rEXPORT(sqInt) primitiveSubArrays(void);\rEXPORT(sqInt) primitiveSubScalar(void);\r#pragma export off\rstatic double radiansToDegrees(double radians);\r#pragma export on\rEXPORT(sqInt) randomIntoFloatArray(void);\rEXPORT(sqInt) randomIntoIntegerArray(void);\rEXPORT(sqInt) randomRange(void);\rEXPORT(sqInt) scalarGetAngleTo(void);\rEXPORT(sqInt) scalarGetDistanceTo(void);\r#pragma export off\rstatic sqInt scalarXAtxArrayheadingArrayvaluedestWidthleftEdgeModerightEdgeMode(sqInt index, float* xArray, float* headingArray, double val, double destWidth, sqInt leftEdgeMode, sqInt rightEdgeMode);\rstatic sqInt scalarYAtyArrayheadingArrayvaluedestHeighttopEdgeModebottomEdgeMode(sqInt index, float* yArray, float* headingArray, double val, double destHeight, sqInt topEdgeMode, sqInt bottomEdgeMode);\r#pragma export on\rEXPORT(sqInt) setHeadingArrayFrom(void);\rEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\rEXPORT(sqInt) setScalarHeading(void);\rEXPORT(sqInt) shutdownModule(void);\rEXPORT(sqInt) turtleScalarSetX(void);\rEXPORT(sqInt) turtleScalarSetY(void);\rEXPORT(sqInt) turtlesSetX(void);\rEXPORT(sqInt) turtlesSetY(void);\rEXPORT(sqInt) vectorGetAngleTo(void);\rEXPORT(sqInt) vectorGetDistanceTo(void);\rEXPORT(sqInt) zoomBitmap(void);\r#pragma export off\r/*** Variables ***/\r\r#ifdef SQUEAK_BUILTIN_PLUGIN\rextern\r#endif\rstruct VirtualMachine* interpreterProxy;\rstatic unsigned int kedamaRandomSeed;\rstatic const char *moduleName =\r#ifdef SQUEAK_BUILTIN_PLUGIN\r\t\"KedamaPlugin 23 January 2011 (i)\"\r#else\r\t\"KedamaPlugin 23 January 2011 (e)\"\r#endif\r;\rstatic unsigned int randA;\rstatic unsigned int randM;\rstatic unsigned int randQ;\rstatic unsigned int randR;\r\r\rstatic double degreesFromXy(double x, double y) {\r    double tanVal;\r    double theta;\r\r\tif (x == 0.0) {\r\t\tif (y >= 0.0) {\r\t\t\treturn 90.0;\r\t\t} else {\r\t\t\treturn 270.0;\r\t\t}\r\t} else {\r\t\ttanVal = y / x;\r\t\ttheta = atan(tanVal);\r\t\tif (x >= 0.0) {\r\t\t\tif (y >= 0.0) {\r\t\t\t\treturn theta / 0.0174532925199433;\r\t\t\t} else {\r\t\t\t\treturn 360.0 + (theta / 0.0174532925199433);\r\t\t\t}\r\t\t} else {\r\t\t\treturn 180.0 + (theta / 0.0174532925199433);\r\t\t}\r\t}\r\treturn 0.0;\r}\r\rstatic double degreesToRadians(double degrees) {\r    double deg;\r    double headingRadians;\r    int q;\r\r\tdeg = 90.0 - degrees;\r\tq = deg / 360.0;\r\tif (deg < 0.0) {\r\t\tq -= 1;\r\t}\r\theadingRadians = (deg - (q * 360.0)) * 0.0174532925199433;\r\treturn headingRadians;\r}\r\rEXPORT(sqInt) drawTurtlesInArray(void) {\r    sqInt bitsIndex;\r    unsigned int *colorArray;\r    sqInt colorOop;\r    unsigned int *destBits;\r    sqInt destHeight;\r    sqInt destOop;\r    sqInt destWidth;\r    sqInt i;\r    sqInt size;\r    sqInt visible;\r    unsigned char *visibleArray;\r    sqInt visibleOop;\r    sqInt x;\r    float *xArray;\r    sqInt xOop;\r    sqInt y;\r    float *yArray;\r    sqInt yOop;\r\r\tvisibleOop = interpreterProxy->stackValue(0);\r\tcolorOop = interpreterProxy->stackValue(1);\r\tyOop = interpreterProxy->stackValue(2);\r\txOop = interpreterProxy->stackValue(3);\r\tdestHeight = interpreterProxy->stackIntegerValue(4);\r\tdestWidth = interpreterProxy->stackIntegerValue(5);\r\tdestOop = interpreterProxy->stackValue(6);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(destOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(xOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(yOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(colorOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isBytes(visibleOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((destHeight * destWidth) != (interpreterProxy->slotSizeOf(destOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tsize = interpreterProxy->slotSizeOf(xOop);\r\tif ((interpreterProxy->slotSizeOf(yOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->slotSizeOf(colorOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->slotSizeOf(visibleOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\txArray = interpreterProxy->firstIndexableField(xOop);\r\tyArray = interpreterProxy->firstIndexableField(yOop);\r\tcolorArray = interpreterProxy->firstIndexableField(colorOop);\r\tvisibleArray = interpreterProxy->firstIndexableField(visibleOop);\r\tdestBits = interpreterProxy->firstIndexableField(destOop);\r\tfor (i = 0; i <= (size - 1); i += 1) {\r\t\tx = ((int) (xArray[i]));\r\t\t;\r\t\ty = ((int) (yArray[i]));\r\t\t;\r\t\tvisible = visibleArray[i];\r\t\tif ((visible != 0) && (((x >= 0) && (y >= 0)) && ((x < destWidth) && (y < destHeight)))) {\r\t\t\tbitsIndex = (y * destWidth) + x;\r\t\t\tdestBits[bitsIndex] = (colorArray[i]);\r\t\t}\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(7);\r}\r\rEXPORT(sqInt) getHeadingArrayInto(void) {\r    double heading;\r    float *headingArray;\r    sqInt headingOop;\r    sqInt i;\r    float *resultArray;\r    sqInt resultOop;\r    sqInt size;\r\r\tresultOop = interpreterProxy->stackValue(0);\r\theadingOop = interpreterProxy->stackValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(headingOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(resultOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tsize = interpreterProxy->slotSizeOf(headingOop);\r\tif ((interpreterProxy->slotSizeOf(resultOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\theadingArray = interpreterProxy->firstIndexableField(headingOop);\r\tresultArray = interpreterProxy->firstIndexableField(resultOop);\r\tfor (i = 0; i <= (size - 1); i += 1) {\r\t\theading = headingArray[i];\r\t\theading = heading / 0.0174532925199433;\r\t\theading = 90.0 - heading;\r\t\tif (!(heading > 0.0)) {\r\t\t\theading += 360.0;\r\t\t}\r\t\tresultArray[i] = heading;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(2);\r}\r\r\r/*\tNote: This is coded so that plugins can be run from Squeak. */\r\rstatic VirtualMachine * getInterpreter(void) {\r\treturn interpreterProxy;\r}\r\r\r/*\tNote: This is hardcoded so it can be run from Squeak.\r\tThe module name is used for validating a module *after*\r\tit is loaded to check if it does really contain the module\r\twe're thinking it contains. This is important! */\r\rEXPORT(const char*) getModuleName(void) {\r\treturn moduleName;\r}\r\rEXPORT(sqInt) getScalarHeading(void) {\r    double heading;\r    float *headingArray;\r    sqInt headingOop;\r    sqInt index;\r    double deg;\r    double degrees;\r\r\theadingOop = interpreterProxy->stackValue(0);\r\tindex = interpreterProxy->stackIntegerValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(headingOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->slotSizeOf(headingOop)) < index) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\theadingArray = interpreterProxy->firstIndexableField(headingOop);\r\theading = headingArray[index - 1];\r\t/* begin radiansToDegrees: */\r\tdegrees = heading / 0.0174532925199433;\r\tdeg = 90.0 - degrees;\r\tif (!(deg > 0.0)) {\r\t\tdeg += 360.0;\r\t}\r\theading = deg;\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(3);\r\tinterpreterProxy->pushFloat(heading);\r}\r\rstatic sqInt halt(void) {\r\t;\r}\r\rEXPORT(sqInt) initialiseModule(void) {\r\tkedamaRandomSeed = 17;\r\r\t/*  magic constant =      16807  */\r\r\trandA = 16807;\r\r\t/*  magic constant = 2147483647  */\r\r\trandM = 2147483647U;\r\trandQ = randM / randA;\r\trandR = randM % randA;\r}\r\rstatic sqInt kedamaRandom2(sqInt range) {\r    sqInt hi;\r    sqInt lo;\r    sqInt r;\r    sqInt v;\r    sqInt val;\r\r\tif (range < 0) {\r\t\tr = 0 - range;\r\t} else {\r\t\tr = range;\r\t}\r\thi = kedamaRandomSeed / randQ;\r\tlo = kedamaRandomSeed % randQ;\r\tkedamaRandomSeed = (randA * lo) - (randR * hi);\r\tv = kedamaRandomSeed & 65535;\r\tval = ((usqInt) (v * (r + 1))) >> 16;\r\tif (range < 0) {\r\t\treturn 0 - val;\r\t} else {\r\t\treturn val;\r\t}\r}\r\rstatic sqInt kedamaRandom(sqInt range) {\r    sqInt r;\r    sqInt val;\r\r\tif (range < 0) {\r\t\tr = 0 - range;\r\t} else {\r\t\tr = range;\r\t}\r\tkedamaRandomSeed = ((kedamaRandomSeed * 1309) + 13849) & 65535;\r\tval = ((usqInt) (kedamaRandomSeed * (r + 1))) >> 16;\r\tif (range < 0) {\r\t\treturn 0 - val;\r\t} else {\r\t\treturn val;\r\t}\r}\r\rEXPORT(sqInt) kedamaSetRandomSeed(void) {\r    sqInt seed;\r\r\tseed = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tkedamaRandomSeed = seed & 65536;\r\tinterpreterProxy->pop(1);\r}\r\rEXPORT(sqInt) makeMask(void) {\r    unsigned int alpha;\r    unsigned int* dOrigin;\r    sqInt data;\r    sqInt dataBits;\r    sqInt dataSize;\r    unsigned int highMask;\r    sqInt i;\r    unsigned int* mOrigin;\r    sqInt maskBits;\r    sqInt maskSize;\r    unsigned int pixel;\r    sqInt shiftAmount;\r\r\tshiftAmount = interpreterProxy->stackIntegerValue(0);\r\tpixel = interpreterProxy->stackIntegerValue(1);\r\tmaskBits = interpreterProxy->stackValue(2);\r\tdataBits = interpreterProxy->stackValue(3);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tdataSize = interpreterProxy->slotSizeOf(dataBits);\r\tmaskSize = interpreterProxy->slotSizeOf(maskBits);\r\tif (!(dataSize == maskSize)) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (shiftAmount < -32) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (shiftAmount > 8) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tdOrigin = interpreterProxy->firstIndexableField(dataBits);\r\tmOrigin = interpreterProxy->firstIndexableField(maskBits);\r\thighMask = 4278190080U;\r\tfor (i = 0; i <= (dataSize - 1); i += 1) {\r\t\tdata = dOrigin[i];\r\t\talpha = ((shiftAmount < 0) ? ((usqInt) data >> -shiftAmount) : ((usqInt) data << shiftAmount));\r\t\tif (alpha > 255) {\r\t\t\talpha = 255;\r\t\t}\r\t\tif (alpha < 0) {\r\t\t\talpha = 0;\r\t\t}\r\t\tmOrigin[i] = (((alpha << 24) & highMask) | pixel);\r\t}\r\tinterpreterProxy->pop(4);\r}\r\rEXPORT(sqInt) makeMaskLog(void) {\r    unsigned int alpha;\r    unsigned int* dOrigin;\r    sqInt data;\r    sqInt dataBits;\r    sqInt dataSize;\r    unsigned int highMask;\r    sqInt i;\r    unsigned int* mOrigin;\r    sqInt maskBits;\r    sqInt maskSize;\r    unsigned int max;\r    unsigned int* maxFirst;\r    double maxLog;\r    sqInt maxOop;\r    unsigned int pixel;\r\r\tmaxOop = interpreterProxy->stackValue(0);\r\tpixel = interpreterProxy->stackIntegerValue(1);\r\tmaskBits = interpreterProxy->stackValue(2);\r\tdataBits = interpreterProxy->stackValue(3);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tmaxFirst = interpreterProxy->firstIndexableField(maxOop);\r\tmax = maxFirst[0];\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tmaxLog = log(max);\r\tdataSize = interpreterProxy->slotSizeOf(dataBits);\r\tmaskSize = interpreterProxy->slotSizeOf(maskBits);\r\tif (!(dataSize == maskSize)) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tdOrigin = interpreterProxy->firstIndexableField(dataBits);\r\tmOrigin = interpreterProxy->firstIndexableField(maskBits);\r\thighMask = 4278190080U;\r\tfor (i = 0; i <= (dataSize - 1); i += 1) {\r\t\tdata = dOrigin[i];\r\t\tif (data == 0) {\r\t\t\talpha = 0;\r\t\t} else {\r\t\t\talpha = ((sqInt)((255.0 / maxLog) * (log(data))));\r\t\t}\r\t\tif (alpha > 255) {\r\t\t\talpha = 255;\r\t\t}\r\t\tmOrigin[i] = (((alpha << 24) & highMask) | pixel);\r\t}\r\tinterpreterProxy->pop(4);\r}\r\rEXPORT(sqInt) makeTurtlesMap(void) {\r    sqInt height;\r    sqInt index;\r    unsigned int *map;\r    sqInt mapIndex;\r    sqInt mapOop;\r    sqInt size;\r    unsigned int *whoArray;\r    sqInt whoOop;\r    sqInt width;\r    sqInt x;\r    float *xArray;\r    sqInt xOop;\r    sqInt y;\r    float *yArray;\r    sqInt yOop;\r\r\theight = interpreterProxy->stackIntegerValue(0);\r\twidth = interpreterProxy->stackIntegerValue(1);\r\tyOop = interpreterProxy->stackValue(2);\r\txOop = interpreterProxy->stackValue(3);\r\twhoOop = interpreterProxy->stackValue(4);\r\tmapOop = interpreterProxy->stackValue(5);\r\tif (!(interpreterProxy->isWords(yOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(xOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(whoOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(mapOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tsize = interpreterProxy->slotSizeOf(whoOop);\r\tif ((interpreterProxy->slotSizeOf(xOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->slotSizeOf(yOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->slotSizeOf(mapOop)) != (height * width)) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\txArray = interpreterProxy->firstIndexableField(xOop);\r\tyArray = interpreterProxy->firstIndexableField(yOop);\r\twhoArray = interpreterProxy->firstIndexableField(whoOop);\r\tmap = interpreterProxy->firstIndexableField(mapOop);\r\tfor (index = 0; index <= ((height * width) - 1); index += 1) {\r\t\tmap[index] = 0;\r\t}\r\tfor (index = 0; index <= (size - 1); index += 1) {\r\t\tx = xArray[index];\r\t\ty = yArray[index];\r\t\tmapIndex = (width * y) + x;\r\t\tif ((mapIndex >= 0) && (mapIndex < (height * width))) {\r\t\t\tmap[mapIndex] = (whoArray[index]);\r\t\t}\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(6);\r}\r\rstatic sqInt msg(char *s) {\r\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\r}\r\rEXPORT(sqInt) primPixelAtXY(void) {\r    unsigned int *bits;\r    sqInt bitsOop;\r    sqInt height;\r    sqInt index;\r    sqInt ret;\r    sqInt width;\r    sqInt x;\r    double xPos;\r    sqInt y;\r    double yPos;\r\r\theight = interpreterProxy->stackIntegerValue(0);\r\twidth = interpreterProxy->stackIntegerValue(1);\r\tyPos = interpreterProxy->stackFloatValue(2);\r\txPos = interpreterProxy->stackFloatValue(3);\r\tbitsOop = interpreterProxy->stackValue(4);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(bitsOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->slotSizeOf(bitsOop)) != (height * width)) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tx = xPos;\r\ty = yPos;\r\tbits = interpreterProxy->firstIndexableField(bitsOop);\r\tif ((((x >= 0) && (x < width)) && (y >= 0)) && (y < height)) {\r\t\tindex = (y * width) + x;\r\t\tret = bits[index];\r\t} else {\r\t\tret = 0;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(6);\r\tinterpreterProxy->pushInteger(ret);\r}\r\rEXPORT(sqInt) primPixelAtXYPut(void) {\r    unsigned int *bits;\r    sqInt bitsOop;\r    sqInt height;\r    sqInt index;\r    sqInt v;\r    sqInt value;\r    sqInt width;\r    sqInt x;\r    double xPos;\r    sqInt y;\r    double yPos;\r\r\theight = interpreterProxy->stackIntegerValue(0);\r\twidth = interpreterProxy->stackIntegerValue(1);\r\tvalue = interpreterProxy->stackIntegerValue(2);\r\tyPos = interpreterProxy->stackFloatValue(3);\r\txPos = interpreterProxy->stackFloatValue(4);\r\tbitsOop = interpreterProxy->stackValue(5);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(bitsOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->slotSizeOf(bitsOop)) != (height * width)) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tx = xPos;\r\ty = yPos;\r\tv = value;\r\tif (v > 1073741823) {\r\t\tv = 1073741823;\r\t}\r\tif (v < 0) {\r\t\tv = 0;\r\t}\r\tbits = interpreterProxy->firstIndexableField(bitsOop);\r\tif ((((x >= 0) && (x < width)) && (y >= 0)) && (y < height)) {\r\t\tindex = (y * width) + x;\r\t\tbits[index] = v;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(6);\r}\r\rEXPORT(sqInt) primPixelsAtXY(void) {\r    unsigned int *bits;\r    sqInt bitsHeight;\r    sqInt bitsIndex;\r    sqInt bitsOop;\r    sqInt bitsWidth;\r    unsigned int *destWords;\r    sqInt destWordsOop;\r    sqInt i;\r    sqInt size;\r    sqInt x;\r    float *xArray;\r    sqInt xArrayOop;\r    sqInt y;\r    float *yArray;\r    sqInt yArrayOop;\r\r\tdestWordsOop = interpreterProxy->stackValue(0);\r\tbitsHeight = interpreterProxy->stackIntegerValue(1);\r\tbitsWidth = interpreterProxy->stackIntegerValue(2);\r\tbitsOop = interpreterProxy->stackValue(3);\r\tyArrayOop = interpreterProxy->stackValue(4);\r\txArrayOop = interpreterProxy->stackValue(5);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(destWordsOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(xArrayOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(yArrayOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(bitsOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((bitsHeight * bitsWidth) != (interpreterProxy->slotSizeOf(bitsOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tsize = interpreterProxy->slotSizeOf(xArrayOop);\r\tif ((interpreterProxy->slotSizeOf(yArrayOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->slotSizeOf(destWordsOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\txArray = interpreterProxy->firstIndexableField(xArrayOop);\r\tyArray = interpreterProxy->firstIndexableField(yArrayOop);\r\tdestWords = interpreterProxy->firstIndexableField(destWordsOop);\r\tbits = interpreterProxy->firstIndexableField(bitsOop);\r\tfor (i = 0; i <= (size - 1); i += 1) {\r\t\tx = ((int) (xArray[i]));\r\t\t;\r\t\ty = ((int) (yArray[i]));\r\t\t;\r\t\tif (((x >= 0) && (y >= 0)) && ((x < bitsWidth) && (y < bitsHeight))) {\r\t\t\tbitsIndex = (y * bitsWidth) + x;\r\t\t\tdestWords[i] = (bits[bitsIndex]);\r\t\t}\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(6);\r}\r\rEXPORT(sqInt) primScalarForward(void) {\r    sqInt bottomEdgeMode;\r    double destHeight;\r    double destWidth;\r    double dist;\r    float *headingArray;\r    sqInt headingOop;\r    sqInt i;\r    sqInt index;\r    sqInt leftEdgeMode;\r    double newX;\r    double newY;\r    sqInt rightEdgeMode;\r    sqInt size;\r    sqInt topEdgeMode;\r    double val;\r    float *xArray;\r    sqInt xOop;\r    float *yArray;\r    sqInt yOop;\r    double headingRadians;\r    double newX1;\r    double newY1;\r\r\tbottomEdgeMode = interpreterProxy->stackIntegerValue(0);\r\ttopEdgeMode = interpreterProxy->stackIntegerValue(1);\r\trightEdgeMode = interpreterProxy->stackIntegerValue(2);\r\tleftEdgeMode = interpreterProxy->stackIntegerValue(3);\r\tdestHeight = interpreterProxy->stackFloatValue(4);\r\tdestWidth = interpreterProxy->stackFloatValue(5);\r\tval = interpreterProxy->stackFloatValue(6);\r\theadingOop = interpreterProxy->stackValue(7);\r\tyOop = interpreterProxy->stackValue(8);\r\txOop = interpreterProxy->stackValue(9);\r\tindex = interpreterProxy->stackIntegerValue(10);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(xOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(yOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(headingOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tsize = interpreterProxy->slotSizeOf(xOop);\r\tif ((interpreterProxy->slotSizeOf(yOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->slotSizeOf(headingOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\txArray = interpreterProxy->firstIndexableField(xOop);\r\tyArray = interpreterProxy->firstIndexableField(yOop);\r\theadingArray = interpreterProxy->firstIndexableField(headingOop);\r\tdist = val;\r\ti = index - 1;\r\tnewX = (xArray[i]) + (dist * (cos(headingArray[i])));\r\tnewY = (yArray[i]) - (dist * (sin(headingArray[i])));\r\t/* begin scalarXAt:xArray:headingArray:value:destWidth:leftEdgeMode:rightEdgeMode: */\r\tnewX1 = newX;\r\tif (newX1 < 0.0) {\r\t\tif (leftEdgeMode == 1) {\r\t\t\tnewX1 += destWidth;\r\t\t}\r\t\tif (leftEdgeMode == 2) {\r\t\t\tnewX1 = 0.0;\r\t\t}\r\t\tif (leftEdgeMode == 3) {\r\t\t\tnewX1 = 0.0 - newX1;\r\t\t\theadingRadians = headingArray[i];\r\t\t\tif (headingRadians < 3.141592653589793) {\r\t\t\t\theadingArray[i] = (3.141592653589793 - headingRadians);\r\t\t\t} else {\r\t\t\t\theadingArray[i] = (9.42477796076938 - headingRadians);\r\t\t\t}\r\t\t}\r\t}\r\tif (newX1 >= destWidth) {\r\t\tif (rightEdgeMode == 1) {\r\t\t\tnewX1 -= destWidth;\r\t\t}\r\t\tif (rightEdgeMode == 2) {\r\t\t\tnewX1 = destWidth - 1.0e-6;\r\t\t}\r\t\tif (rightEdgeMode == 3) {\r\t\t\tnewX1 = (destWidth - 1.0e-6) - (newX1 - destWidth);\r\t\t\theadingRadians = headingArray[i];\r\t\t\tif (headingRadians < 3.141592653589793) {\r\t\t\t\theadingArray[i] = (3.141592653589793 - headingRadians);\r\t\t\t} else {\r\t\t\t\theadingArray[i] = (9.42477796076938 - headingRadians);\r\t\t\t}\r\t\t}\r\t}\r\txArray[i] = newX1;\r\t/* begin scalarYAt:yArray:headingArray:value:destHeight:topEdgeMode:bottomEdgeMode: */\r\tnewY1 = newY;\r\tif (newY1 < 0.0) {\r\t\tif (topEdgeMode == 1) {\r\t\t\tnewY1 += destHeight;\r\t\t}\r\t\tif (topEdgeMode == 2) {\r\t\t\tnewY1 = 0.0;\r\t\t}\r\t\tif (topEdgeMode == 3) {\r\t\t\tnewY1 = 0.0 - newY1;\r\t\t\theadingArray[i] = (6.283185307179586 - (headingArray[i]));\r\t\t}\r\t}\r\tif (newY1 >= destHeight) {\r\t\tif (bottomEdgeMode == 1) {\r\t\t\tnewY1 -= destHeight;\r\t\t}\r\t\tif (bottomEdgeMode == 2) {\r\t\t\tnewY1 = destHeight - 1.0e-6;\r\t\t}\r\t\tif (bottomEdgeMode == 3) {\r\t\t\tnewY1 = (destHeight - 1.0e-6) - (newY1 - destHeight);\r\t\t\theadingArray[i] = (6.283185307179586 - (headingArray[i]));\r\t\t}\r\t}\r\tyArray[i] = newY1;\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(11);\r}\r\rEXPORT(sqInt) primSetPixelsAtXY(void) {\r    unsigned int *bits;\r    sqInt bitsHeight;\r    sqInt bitsIndex;\r    sqInt bitsOop;\r    sqInt bitsWidth;\r    sqInt i;\r    unsigned int intValue;\r    sqInt isValueInt;\r    sqInt size;\r    unsigned int value;\r    sqInt valueOop;\r    unsigned int *wordsValue;\r    sqInt x;\r    float *xArray;\r    sqInt xArrayOop;\r    sqInt y;\r    float *yArray;\r    sqInt yArrayOop;\r\r\tvalueOop = interpreterProxy->stackValue(0);\r\tbitsHeight = interpreterProxy->stackIntegerValue(1);\r\tbitsWidth = interpreterProxy->stackIntegerValue(2);\r\tbitsOop = interpreterProxy->stackValue(3);\r\tyArrayOop = interpreterProxy->stackValue(4);\r\txArrayOop = interpreterProxy->stackValue(5);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(xArrayOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(yArrayOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(bitsOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((bitsHeight * bitsWidth) != (interpreterProxy->slotSizeOf(bitsOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tsize = interpreterProxy->slotSizeOf(xArrayOop);\r\tif ((interpreterProxy->slotSizeOf(yArrayOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tisValueInt = (valueOop & 1);\r\tif (isValueInt) {\r\t\tintValue = (valueOop >> 1);\r\t}\r\tif (!(isValueInt)) {\r\t\tif (!(interpreterProxy->isMemberOf(valueOop, \"WordArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t\tif ((interpreterProxy->slotSizeOf(valueOop)) != size) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\txArray = interpreterProxy->firstIndexableField(xArrayOop);\r\tyArray = interpreterProxy->firstIndexableField(yArrayOop);\r\tif (!(isValueInt)) {\r\t\twordsValue = interpreterProxy->firstIndexableField(valueOop);\r\t}\r\tbits = interpreterProxy->firstIndexableField(bitsOop);\r\tif (isValueInt) {\r\t\tvalue = intValue;\r\t}\r\tfor (i = 0; i <= (size - 1); i += 1) {\r\t\tx = ((int) (xArray[i]));\r\t\t;\r\t\ty = ((int) (yArray[i]));\r\t\t;\r\t\tif (((x >= 0) && (y >= 0)) && ((x < bitsWidth) && (y < bitsHeight))) {\r\t\t\tbitsIndex = (y * bitsWidth) + x;\r\t\t\tif (!(isValueInt)) {\r\t\t\t\tvalue = wordsValue[i];\r\t\t\t}\r\t\t\tbits[bitsIndex] = value;\r\t\t}\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(6);\r}\r\rEXPORT(sqInt) primTurtlesForward(void) {\r    sqInt bottomEdgeMode;\r    double destHeight;\r    double destWidth;\r    double dist;\r    float *headingArray;\r    sqInt headingOop;\r    sqInt i;\r    sqInt isValVector;\r    sqInt leftEdgeMode;\r    double newX;\r    double newY;\r    sqInt rightEdgeMode;\r    sqInt size;\r    sqInt topEdgeMode;\r    double val;\r    float *valArray;\r    sqInt valOop;\r    float *xArray;\r    sqInt xOop;\r    float *yArray;\r    sqInt yOop;\r    double headingRadians;\r    double newX1;\r    double newY1;\r\r\tbottomEdgeMode = interpreterProxy->stackIntegerValue(0);\r\ttopEdgeMode = interpreterProxy->stackIntegerValue(1);\r\trightEdgeMode = interpreterProxy->stackIntegerValue(2);\r\tleftEdgeMode = interpreterProxy->stackIntegerValue(3);\r\tdestHeight = interpreterProxy->stackFloatValue(4);\r\tdestWidth = interpreterProxy->stackFloatValue(5);\r\tvalOop = interpreterProxy->stackValue(6);\r\theadingOop = interpreterProxy->stackValue(7);\r\tyOop = interpreterProxy->stackValue(8);\r\txOop = interpreterProxy->stackValue(9);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(xOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(yOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(headingOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (interpreterProxy->isFloatObject(valOop)) {\r\t\tisValVector = 0;\r\t} else {\r\t\tif (interpreterProxy->isWords(valOop)) {\r\t\t\tisValVector = 1;\r\t\t} else {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tsize = interpreterProxy->slotSizeOf(xOop);\r\tif ((interpreterProxy->slotSizeOf(yOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->slotSizeOf(headingOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (isValVector) {\r\t\tif ((interpreterProxy->slotSizeOf(valOop)) != size) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\txArray = interpreterProxy->firstIndexableField(xOop);\r\tyArray = interpreterProxy->firstIndexableField(yOop);\r\theadingArray = interpreterProxy->firstIndexableField(headingOop);\r\tif (isValVector) {\r\t\tvalArray = interpreterProxy->firstIndexableField(valOop);\r\t} else {\r\t\tval = interpreterProxy->floatValueOf(valOop);\r\t}\r\tfor (i = 0; i <= (size - 1); i += 1) {\r\t\tif (isValVector) {\r\t\t\tdist = valArray[i];\r\t\t} else {\r\t\t\tdist = val;\r\t\t}\r\t\tnewX = (xArray[i]) + (dist * (cos(headingArray[i])));\r\t\tnewY = (yArray[i]) - (dist * (sin(headingArray[i])));\r\t\t/* begin scalarXAt:xArray:headingArray:value:destWidth:leftEdgeMode:rightEdgeMode: */\r\t\tnewX1 = newX;\r\t\tif (newX1 < 0.0) {\r\t\t\tif (leftEdgeMode == 1) {\r\t\t\t\tnewX1 += destWidth;\r\t\t\t}\r\t\t\tif (leftEdgeMode == 2) {\r\t\t\t\tnewX1 = 0.0;\r\t\t\t}\r\t\t\tif (leftEdgeMode == 3) {\r\t\t\t\tnewX1 = 0.0 - newX1;\r\t\t\t\theadingRadians = headingArray[i];\r\t\t\t\tif (headingRadians < 3.141592653589793) {\r\t\t\t\t\theadingArray[i] = (3.141592653589793 - headingRadians);\r\t\t\t\t} else {\r\t\t\t\t\theadingArray[i] = (9.42477796076938 - headingRadians);\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t\tif (newX1 >= destWidth) {\r\t\t\tif (rightEdgeMode == 1) {\r\t\t\t\tnewX1 -= destWidth;\r\t\t\t}\r\t\t\tif (rightEdgeMode == 2) {\r\t\t\t\tnewX1 = destWidth - 1.0e-6;\r\t\t\t}\r\t\t\tif (rightEdgeMode == 3) {\r\t\t\t\tnewX1 = (destWidth - 1.0e-6) - (newX1 - destWidth);\r\t\t\t\theadingRadians = headingArray[i];\r\t\t\t\tif (headingRadians < 3.141592653589793) {\r\t\t\t\t\theadingArray[i] = (3.141592653589793 - headingRadians);\r\t\t\t\t} else {\r\t\t\t\t\theadingArray[i] = (9.42477796076938 - headingRadians);\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t\txArray[i] = newX1;\r\t\t/* begin scalarYAt:yArray:headingArray:value:destHeight:topEdgeMode:bottomEdgeMode: */\r\t\tnewY1 = newY;\r\t\tif (newY1 < 0.0) {\r\t\t\tif (topEdgeMode == 1) {\r\t\t\t\tnewY1 += destHeight;\r\t\t\t}\r\t\t\tif (topEdgeMode == 2) {\r\t\t\t\tnewY1 = 0.0;\r\t\t\t}\r\t\t\tif (topEdgeMode == 3) {\r\t\t\t\tnewY1 = 0.0 - newY1;\r\t\t\t\theadingArray[i] = (6.283185307179586 - (headingArray[i]));\r\t\t\t}\r\t\t}\r\t\tif (newY1 >= destHeight) {\r\t\t\tif (bottomEdgeMode == 1) {\r\t\t\t\tnewY1 -= destHeight;\r\t\t\t}\r\t\t\tif (bottomEdgeMode == 2) {\r\t\t\t\tnewY1 = destHeight - 1.0e-6;\r\t\t\t}\r\t\t\tif (bottomEdgeMode == 3) {\r\t\t\t\tnewY1 = (destHeight - 1.0e-6) - (newY1 - destHeight);\r\t\t\t\theadingArray[i] = (6.283185307179586 - (headingArray[i]));\r\t\t\t}\r\t\t}\r\t\tyArray[i] = newY1;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(10);\r}\r\rEXPORT(sqInt) primUpHill(void) {\r    unsigned int *bits;\r    sqInt bitsOop;\r    sqInt endX;\r    sqInt endY;\r    sqInt height;\r    sqInt maxVal;\r    sqInt maxValX;\r    sqInt maxValY;\r    double ret;\r    sqInt rowOffset;\r    sqInt sniffRange;\r    sqInt startX;\r    sqInt startY;\r    double tH;\r    double tX;\r    double tY;\r    sqInt thisVal;\r    sqInt turtleX;\r    sqInt turtleY;\r    sqInt width;\r    sqInt x;\r    sqInt y;\r    double deg;\r    double degrees;\r\r\tsniffRange = interpreterProxy->stackIntegerValue(0);\r\theight = interpreterProxy->stackIntegerValue(1);\r\twidth = interpreterProxy->stackIntegerValue(2);\r\tbitsOop = interpreterProxy->stackValue(3);\r\ttH = interpreterProxy->stackFloatValue(4);\r\ttY = interpreterProxy->stackFloatValue(5);\r\ttX = interpreterProxy->stackFloatValue(6);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(bitsOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->slotSizeOf(bitsOop)) != (height * width)) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tbits = interpreterProxy->firstIndexableField(bitsOop);\r\tturtleX = tX;\r\tturtleY = tY;\r\tturtleX = ((turtleX < 0) ? 0 : turtleX);\r\tturtleY = ((turtleY < 0) ? 0 : turtleY);\r\tturtleX = ((turtleX < (width - 1)) ? turtleX : (width - 1));\r\tturtleY = ((turtleY < (height - 1)) ? turtleY : (height - 1));\r\tstartX = (((turtleX - sniffRange) < 0) ? 0 : (turtleX - sniffRange));\r\tendX = (((turtleX + sniffRange) < (width - 1)) ? (turtleX + sniffRange) : (width - 1));\r\tstartY = (((turtleY - sniffRange) < 0) ? 0 : (turtleY - sniffRange));\r\tendY = (((turtleY + sniffRange) < (height - 1)) ? (turtleY + sniffRange) : (height - 1));\r\tmaxVal = bits[(turtleY * width) + turtleX];\r\tmaxValX = -1;\r\tfor (y = startY; y <= endY; y += 1) {\r\t\trowOffset = y * width;\r\t\tfor (x = startX; x <= endX; x += 1) {\r\t\t\tthisVal = bits[rowOffset + x];\r\t\t\tif (thisVal > maxVal) {\r\t\t\t\tmaxValX = x;\r\t\t\t\tmaxValY = y;\r\t\t\t\tmaxVal = thisVal;\r\t\t\t}\r\t\t}\r\t}\r\tif (-1 == maxValX) {\r\t\t/* begin radiansToDegrees: */\r\t\tdegrees = tH / 0.0174532925199433;\r\t\tdeg = 90.0 - degrees;\r\t\tif (!(deg > 0.0)) {\r\t\t\tdeg += 360.0;\r\t\t}\r\t\tret = deg;\r\t} else {\r\t\tret = (degreesFromXy(((double) (maxValX - turtleX)), ((double) (maxValY - turtleY)))) + 90.0;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(8);\r\tinterpreterProxy->pushFloat(ret);\r}\r\rEXPORT(sqInt) primitiveAddArrays(void) {\r    sqInt argOop;\r    float *floatsArg;\r    float *floatsRcvr;\r    float *floatsResult;\r    sqInt i;\r    sqInt isArgWords;\r    sqInt isRcvrWords;\r    sqInt length;\r    sqInt rcvrOop;\r    sqInt resultOop;\r    unsigned int *wordsArg;\r    unsigned int *wordsRcvr;\r    unsigned int *wordsResult;\r\r\tresultOop = interpreterProxy->stackObjectValue(0);\r\targOop = interpreterProxy->stackObjectValue(1);\r\trcvrOop = interpreterProxy->stackObjectValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isWords(argOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(rcvrOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(resultOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = interpreterProxy->stSizeOf(argOop);\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(rcvrOop)));\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(resultOop)));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tisArgWords = interpreterProxy->isMemberOf(argOop, \"WordArray\");\r\tisRcvrWords = interpreterProxy->isMemberOf(rcvrOop, \"WordArray\");\r\tif (isArgWords && isRcvrWords) {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"WordArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t} else {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"KedamaFloatArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tif (isRcvrWords) {\r\t\tif (isArgWords) {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\twordsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\twordsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\twordsResult[i] = ((wordsRcvr[i]) + (wordsArg[i]));\r\t\t\t}\r\t\t} else {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((wordsRcvr[i]) + (floatsArg[i]));\r\t\t\t}\r\t\t}\r\t} else {\r\t\tif (isArgWords) {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\twordsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((floatsRcvr[i]) + (wordsArg[i]));\r\t\t\t}\r\t\t} else {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((floatsRcvr[i]) + (floatsArg[i]));\r\t\t\t}\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->push(resultOop);\r}\r\rEXPORT(sqInt) primitiveAddScalar(void) {\r    sqInt argOop;\r    double floatArg;\r    float *floatsRcvr;\r    float *floatsResult;\r    sqInt i;\r    int intArg;\r    sqInt isArgInt;\r    sqInt isRcvrWords;\r    sqInt length;\r    sqInt rcvrOop;\r    sqInt resultOop;\r    unsigned int *wordsRcvr;\r    unsigned int *wordsResult;\r\r\tresultOop = interpreterProxy->stackObjectValue(0);\r\targOop = interpreterProxy->stackValue(1);\r\trcvrOop = interpreterProxy->stackObjectValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isWords(rcvrOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(resultOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = interpreterProxy->stSizeOf(rcvrOop);\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(resultOop)));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tisArgInt = (argOop & 1);\r\tisRcvrWords = interpreterProxy->isMemberOf(rcvrOop, \"WordArray\");\r\tif (isArgInt && isRcvrWords) {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"WordArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t} else {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"KedamaFloatArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tif (isRcvrWords) {\r\t\tif (isArgInt) {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tintArg = (argOop >> 1);\r\t\t\twordsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\twordsResult[i] = ((wordsRcvr[i]) + intArg);\r\t\t\t}\r\t\t} else {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatArg = interpreterProxy->floatValueOf(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((wordsRcvr[i]) + floatArg);\r\t\t\t}\r\t\t}\r\t} else {\r\t\tif (isArgInt) {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tintArg = (argOop >> 1);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((floatsRcvr[i]) + intArg);\r\t\t\t}\r\t\t} else {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatArg = interpreterProxy->floatValueOf(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((floatsRcvr[i]) + floatArg);\r\t\t\t}\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->push(resultOop);\r}\r\rEXPORT(sqInt) primitiveDivArrays(void) {\r    sqInt argOop;\r    float *floatsArg;\r    float *floatsRcvr;\r    float *floatsResult;\r    sqInt i;\r    sqInt isArgWords;\r    sqInt isRcvrWords;\r    sqInt length;\r    sqInt rcvrOop;\r    sqInt resultOop;\r    unsigned int *wordsArg;\r    unsigned int *wordsRcvr;\r    unsigned int *wordsResult;\r\r\tresultOop = interpreterProxy->stackObjectValue(0);\r\targOop = interpreterProxy->stackObjectValue(1);\r\trcvrOop = interpreterProxy->stackObjectValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isWords(argOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(rcvrOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(resultOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = interpreterProxy->stSizeOf(argOop);\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(rcvrOop)));\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(resultOop)));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tisArgWords = interpreterProxy->isMemberOf(argOop, \"WordArray\");\r\tisRcvrWords = interpreterProxy->isMemberOf(rcvrOop, \"WordArray\");\r\tif (isArgWords && isRcvrWords) {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"WordArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t} else {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"KedamaFloatArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tif (isRcvrWords) {\r\t\tif (isArgWords) {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\twordsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\twordsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\twordsResult[i] = ((wordsRcvr[i]) / (wordsArg[i]));\r\t\t\t}\r\t\t} else {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((wordsRcvr[i]) / (floatsArg[i]));\r\t\t\t}\r\t\t}\r\t} else {\r\t\tif (isArgWords) {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\twordsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((floatsRcvr[i]) / (wordsArg[i]));\r\t\t\t}\r\t\t} else {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((floatsRcvr[i]) / (floatsArg[i]));\r\t\t\t}\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->push(resultOop);\r}\r\rEXPORT(sqInt) primitiveDivScalar(void) {\r    sqInt argOop;\r    double floatArg;\r    float *floatsRcvr;\r    float *floatsResult;\r    sqInt i;\r    int intArg;\r    sqInt isArgInt;\r    sqInt isRcvrWords;\r    sqInt length;\r    sqInt rcvrOop;\r    sqInt resultOop;\r    unsigned int *wordsRcvr;\r    unsigned int *wordsResult;\r\r\tresultOop = interpreterProxy->stackObjectValue(0);\r\targOop = interpreterProxy->stackValue(1);\r\trcvrOop = interpreterProxy->stackObjectValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isWords(rcvrOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(resultOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = interpreterProxy->stSizeOf(rcvrOop);\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(resultOop)));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tisArgInt = (argOop & 1);\r\tisRcvrWords = interpreterProxy->isMemberOf(rcvrOop, \"WordArray\");\r\tif (isArgInt && isRcvrWords) {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"WordArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t} else {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"KedamaFloatArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tif (isRcvrWords) {\r\t\tif (isArgInt) {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tintArg = (argOop >> 1);\r\t\t\twordsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\twordsResult[i] = ((wordsRcvr[i]) / intArg);\r\t\t\t}\r\t\t} else {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatArg = interpreterProxy->floatValueOf(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((wordsRcvr[i]) / floatArg);\r\t\t\t}\r\t\t}\r\t} else {\r\t\tif (isArgInt) {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tintArg = (argOop >> 1);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((floatsRcvr[i]) / intArg);\r\t\t\t}\r\t\t} else {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatArg = interpreterProxy->floatValueOf(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((floatsRcvr[i]) / floatArg);\r\t\t\t}\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->push(resultOop);\r}\r\rEXPORT(sqInt) primitiveMulArrays(void) {\r    sqInt argOop;\r    float *floatsArg;\r    float *floatsRcvr;\r    float *floatsResult;\r    sqInt i;\r    sqInt isArgWords;\r    sqInt isRcvrWords;\r    sqInt length;\r    sqInt rcvrOop;\r    sqInt resultOop;\r    unsigned int *wordsArg;\r    unsigned int *wordsRcvr;\r    unsigned int *wordsResult;\r\r\tresultOop = interpreterProxy->stackObjectValue(0);\r\targOop = interpreterProxy->stackObjectValue(1);\r\trcvrOop = interpreterProxy->stackObjectValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isWords(argOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(rcvrOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(resultOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = interpreterProxy->stSizeOf(argOop);\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(rcvrOop)));\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(resultOop)));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tisArgWords = interpreterProxy->isMemberOf(argOop, \"WordArray\");\r\tisRcvrWords = interpreterProxy->isMemberOf(rcvrOop, \"WordArray\");\r\tif (isArgWords && isRcvrWords) {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"WordArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t} else {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"KedamaFloatArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tif (isRcvrWords) {\r\t\tif (isArgWords) {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\twordsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\twordsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\twordsResult[i] = ((wordsRcvr[i]) * (wordsArg[i]));\r\t\t\t}\r\t\t} else {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((wordsRcvr[i]) * (floatsArg[i]));\r\t\t\t}\r\t\t}\r\t} else {\r\t\tif (isArgWords) {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\twordsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((floatsRcvr[i]) * (wordsArg[i]));\r\t\t\t}\r\t\t} else {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((floatsRcvr[i]) * (floatsArg[i]));\r\t\t\t}\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->push(resultOop);\r}\r\rEXPORT(sqInt) primitiveMulScalar(void) {\r    sqInt argOop;\r    double floatArg;\r    float *floatsRcvr;\r    float *floatsResult;\r    sqInt i;\r    int intArg;\r    sqInt isArgInt;\r    sqInt isRcvrWords;\r    sqInt length;\r    sqInt rcvrOop;\r    sqInt resultOop;\r    unsigned int *wordsRcvr;\r    unsigned int *wordsResult;\r\r\tresultOop = interpreterProxy->stackObjectValue(0);\r\targOop = interpreterProxy->stackValue(1);\r\trcvrOop = interpreterProxy->stackObjectValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isWords(rcvrOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(resultOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = interpreterProxy->stSizeOf(rcvrOop);\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(resultOop)));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tisArgInt = (argOop & 1);\r\tisRcvrWords = interpreterProxy->isMemberOf(rcvrOop, \"WordArray\");\r\tif (isArgInt && isRcvrWords) {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"WordArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t} else {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"KedamaFloatArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tif (isRcvrWords) {\r\t\tif (isArgInt) {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tintArg = (argOop >> 1);\r\t\t\twordsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\twordsResult[i] = ((wordsRcvr[i]) * intArg);\r\t\t\t}\r\t\t} else {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatArg = interpreterProxy->floatValueOf(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((wordsRcvr[i]) * floatArg);\r\t\t\t}\r\t\t}\r\t} else {\r\t\tif (isArgInt) {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tintArg = (argOop >> 1);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((floatsRcvr[i]) * intArg);\r\t\t\t}\r\t\t} else {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatArg = interpreterProxy->floatValueOf(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((floatsRcvr[i]) * floatArg);\r\t\t\t}\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->push(resultOop);\r}\r\rEXPORT(sqInt) primitiveSubArrays(void) {\r    sqInt argOop;\r    float *floatsArg;\r    float *floatsRcvr;\r    float *floatsResult;\r    sqInt i;\r    sqInt isArgWords;\r    sqInt isRcvrWords;\r    sqInt length;\r    sqInt rcvrOop;\r    sqInt resultOop;\r    unsigned int *wordsArg;\r    unsigned int *wordsRcvr;\r    unsigned int *wordsResult;\r\r\tresultOop = interpreterProxy->stackObjectValue(0);\r\targOop = interpreterProxy->stackObjectValue(1);\r\trcvrOop = interpreterProxy->stackObjectValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isWords(argOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(rcvrOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(resultOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = interpreterProxy->stSizeOf(argOop);\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(rcvrOop)));\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(resultOop)));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tisArgWords = interpreterProxy->isMemberOf(argOop, \"WordArray\");\r\tisRcvrWords = interpreterProxy->isMemberOf(rcvrOop, \"WordArray\");\r\tif (isArgWords && isRcvrWords) {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"WordArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t} else {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"KedamaFloatArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tif (isRcvrWords) {\r\t\tif (isArgWords) {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\twordsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\twordsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\twordsResult[i] = ((wordsRcvr[i]) - (wordsArg[i]));\r\t\t\t}\r\t\t} else {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((wordsRcvr[i]) - (floatsArg[i]));\r\t\t\t}\r\t\t}\r\t} else {\r\t\tif (isArgWords) {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\twordsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((floatsRcvr[i]) - (wordsArg[i]));\r\t\t\t}\r\t\t} else {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((floatsRcvr[i]) - (floatsArg[i]));\r\t\t\t}\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->push(resultOop);\r}\r\rEXPORT(sqInt) primitiveSubScalar(void) {\r    sqInt argOop;\r    double floatArg;\r    float *floatsRcvr;\r    float *floatsResult;\r    sqInt i;\r    int intArg;\r    sqInt isArgInt;\r    sqInt isRcvrWords;\r    sqInt length;\r    sqInt rcvrOop;\r    sqInt resultOop;\r    unsigned int *wordsRcvr;\r    unsigned int *wordsResult;\r\r\tresultOop = interpreterProxy->stackObjectValue(0);\r\targOop = interpreterProxy->stackValue(1);\r\trcvrOop = interpreterProxy->stackObjectValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isWords(rcvrOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(resultOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = interpreterProxy->stSizeOf(rcvrOop);\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(resultOop)));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tisArgInt = (argOop & 1);\r\tisRcvrWords = interpreterProxy->isMemberOf(rcvrOop, \"WordArray\");\r\tif (isArgInt && isRcvrWords) {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"WordArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t} else {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"KedamaFloatArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tif (isRcvrWords) {\r\t\tif (isArgInt) {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tintArg = (argOop >> 1);\r\t\t\twordsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\twordsResult[i] = ((wordsRcvr[i]) - intArg);\r\t\t\t}\r\t\t} else {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatArg = interpreterProxy->floatValueOf(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((wordsRcvr[i]) - floatArg);\r\t\t\t}\r\t\t}\r\t} else {\r\t\tif (isArgInt) {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tintArg = (argOop >> 1);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((floatsRcvr[i]) - intArg);\r\t\t\t}\r\t\t} else {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatArg = interpreterProxy->floatValueOf(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((floatsRcvr[i]) - floatArg);\r\t\t\t}\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->push(resultOop);\r}\r\rstatic double radiansToDegrees(double radians) {\r    double deg;\r    double degrees;\r\r\tdegrees = radians / 0.0174532925199433;\r\tdeg = 90.0 - degrees;\r\tif (!(deg > 0.0)) {\r\t\tdeg += 360.0;\r\t}\r\treturn deg;\r}\r\rEXPORT(sqInt) randomIntoFloatArray(void) {\r    double factor;\r    float *floatArray;\r    sqInt floatArrayOop;\r    sqInt from;\r    sqInt index;\r    sqInt range;\r    sqInt size;\r    sqInt to;\r\r\tfactor = interpreterProxy->stackFloatValue(0);\r\tfloatArrayOop = interpreterProxy->stackValue(1);\r\tto = interpreterProxy->stackIntegerValue(2);\r\tfrom = interpreterProxy->stackIntegerValue(3);\r\trange = interpreterProxy->stackIntegerValue(4);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(floatArrayOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tsize = interpreterProxy->stSizeOf(floatArrayOop);\r\tif (!((size >= to) && ((from >= 1) && (to >= from)))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tfloatArray = interpreterProxy->firstIndexableField(floatArrayOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfor (index = from; index <= to; index += 1) {\r\t\tfloatArray[index - 1] = ((((double) (kedamaRandom2(range)))) * factor);\r\t}\r\tinterpreterProxy->pop(5);\r}\r\rEXPORT(sqInt) randomIntoIntegerArray(void) {\r    double factor;\r    sqInt from;\r    sqInt index;\r    unsigned int *integerArray;\r    sqInt integerArrayOop;\r    sqInt range;\r    sqInt size;\r    sqInt to;\r\r\tfactor = interpreterProxy->stackFloatValue(0);\r\tintegerArrayOop = interpreterProxy->stackValue(1);\r\tto = interpreterProxy->stackIntegerValue(2);\r\tfrom = interpreterProxy->stackIntegerValue(3);\r\trange = interpreterProxy->stackIntegerValue(4);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(integerArrayOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tsize = interpreterProxy->stSizeOf(integerArrayOop);\r\tif (!((size >= to) && ((from >= 1) && (to >= from)))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tintegerArray = interpreterProxy->firstIndexableField(integerArrayOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfor (index = from; index <= to; index += 1) {\r\t\tintegerArray[index - 1] = (((int) ((((double) (kedamaRandom2(range)))) * factor)));\r\t}\r\tinterpreterProxy->pop(5);\r}\r\rEXPORT(sqInt) randomRange(void) {\r    sqInt range;\r    sqInt ret;\r    sqInt hi;\r    sqInt lo;\r    sqInt r;\r    sqInt v;\r    sqInt val;\r\r\trange = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\t/* begin kedamaRandom2: */\r\tif (range < 0) {\r\t\tr = 0 - range;\r\t} else {\r\t\tr = range;\r\t}\r\thi = kedamaRandomSeed / randQ;\r\tlo = kedamaRandomSeed % randQ;\r\tkedamaRandomSeed = (randA * lo) - (randR * hi);\r\tv = kedamaRandomSeed & 65535;\r\tval = ((usqInt) (v * (r + 1))) >> 16;\r\tif (range < 0) {\r\t\tret = 0 - val;\r\t\tgoto l1;\r\t} else {\r\t\tret = val;\r\t\tgoto l1;\r\t}\rl1:\t/* end kedamaRandom2: */;\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(2);\r\tinterpreterProxy->pushInteger(ret);\r}\r\rEXPORT(sqInt) scalarGetAngleTo(void) {\r    double fromX;\r    double fromY;\r    double r;\r    double toX;\r    double toY;\r    double x;\r    double y;\r    double tanVal;\r    double theta;\r\r\tfromY = interpreterProxy->stackFloatValue(0);\r\tfromX = interpreterProxy->stackFloatValue(1);\r\ttoY = interpreterProxy->stackFloatValue(2);\r\ttoX = interpreterProxy->stackFloatValue(3);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tx = toX - fromX;\r\ty = toY - fromY;\r\t/* begin degreesFromX:y: */\r\tif (x == 0.0) {\r\t\tif (y >= 0.0) {\r\t\t\tr = 90.0;\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\tr = 270.0;\r\t\t\tgoto l1;\r\t\t}\r\t} else {\r\t\ttanVal = y / x;\r\t\ttheta = atan(tanVal);\r\t\tif (x >= 0.0) {\r\t\t\tif (y >= 0.0) {\r\t\t\t\tr = theta / 0.0174532925199433;\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tr = 360.0 + (theta / 0.0174532925199433);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t} else {\r\t\t\tr = 180.0 + (theta / 0.0174532925199433);\r\t\t\tgoto l1;\r\t\t}\r\t}\r\tr = 0.0;\rl1:\t/* end degreesFromX:y: */;\r\tr += 90.0;\r\tif (r > 360.0) {\r\t\tr -= 360.0;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(5);\r\tinterpreterProxy->pushFloat(r);\r}\r\rEXPORT(sqInt) scalarGetDistanceTo(void) {\r    double fromX;\r    double fromY;\r    double r;\r    double toX;\r    double toY;\r    double x;\r    double y;\r\r\tfromY = interpreterProxy->stackFloatValue(0);\r\tfromX = interpreterProxy->stackFloatValue(1);\r\ttoY = interpreterProxy->stackFloatValue(2);\r\ttoX = interpreterProxy->stackFloatValue(3);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tx = fromX - toX;\r\ty = fromY - toY;\r\tr = sqrt((x * x) + (y * y));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(5);\r\tinterpreterProxy->pushFloat(r);\r}\r\rstatic sqInt scalarXAtxArrayheadingArrayvaluedestWidthleftEdgeModerightEdgeMode(sqInt index, float* xArray, float* headingArray, double val, double destWidth, sqInt leftEdgeMode, sqInt rightEdgeMode) {\r    double headingRadians;\r    double newX;\r\r\tnewX = val;\r\tif (newX < 0.0) {\r\t\tif (leftEdgeMode == 1) {\r\t\t\tnewX += destWidth;\r\t\t}\r\t\tif (leftEdgeMode == 2) {\r\t\t\tnewX = 0.0;\r\t\t}\r\t\tif (leftEdgeMode == 3) {\r\r\t\t\t/* bounce */\r\r\t\t\tnewX = 0.0 - newX;\r\t\t\theadingRadians = headingArray[index];\r\t\t\tif (headingRadians < 3.141592653589793) {\r\t\t\t\theadingArray[index] = (3.141592653589793 - headingRadians);\r\t\t\t} else {\r\t\t\t\theadingArray[index] = (9.42477796076938 - headingRadians);\r\t\t\t}\r\t\t}\r\t}\r\tif (newX >= destWidth) {\r\t\tif (rightEdgeMode == 1) {\r\t\t\tnewX -= destWidth;\r\t\t}\r\t\tif (rightEdgeMode == 2) {\r\t\t\tnewX = destWidth - 1.0e-6;\r\t\t}\r\t\tif (rightEdgeMode == 3) {\r\t\t\tnewX = (destWidth - 1.0e-6) - (newX - destWidth);\r\t\t\theadingRadians = headingArray[index];\r\t\t\tif (headingRadians < 3.141592653589793) {\r\t\t\t\theadingArray[index] = (3.141592653589793 - headingRadians);\r\t\t\t} else {\r\t\t\t\theadingArray[index] = (9.42477796076938 - headingRadians);\r\t\t\t}\r\t\t}\r\t}\r\txArray[index] = newX;\r}\r\rstatic sqInt scalarYAtyArrayheadingArrayvaluedestHeighttopEdgeModebottomEdgeMode(sqInt index, float* yArray, float* headingArray, double val, double destHeight, sqInt topEdgeMode, sqInt bottomEdgeMode) {\r    double newY;\r\r\tnewY = val;\r\tif (newY < 0.0) {\r\t\tif (topEdgeMode == 1) {\r\t\t\tnewY += destHeight;\r\t\t}\r\t\tif (topEdgeMode == 2) {\r\t\t\tnewY = 0.0;\r\t\t}\r\t\tif (topEdgeMode == 3) {\r\r\t\t\t/* bounce */\r\r\t\t\tnewY = 0.0 - newY;\r\t\t\theadingArray[index] = (6.283185307179586 - (headingArray[index]));\r\t\t}\r\t}\r\tif (newY >= destHeight) {\r\t\tif (bottomEdgeMode == 1) {\r\t\t\tnewY -= destHeight;\r\t\t}\r\t\tif (bottomEdgeMode == 2) {\r\t\t\tnewY = destHeight - 1.0e-6;\r\t\t}\r\t\tif (bottomEdgeMode == 3) {\r\t\t\tnewY = (destHeight - 1.0e-6) - (newY - destHeight);\r\t\t\theadingArray[index] = (6.283185307179586 - (headingArray[index]));\r\t\t}\r\t}\r\tyArray[index] = newY;\r}\r\rEXPORT(sqInt) setHeadingArrayFrom(void) {\r    double heading;\r    float *headingArray;\r    sqInt headingOop;\r    sqInt i;\r    sqInt isValVector;\r    float *resultArray;\r    sqInt resultOop;\r    sqInt size;\r    double deg;\r    double headingRadians;\r    int q;\r    double deg1;\r    double headingRadians1;\r    int q1;\r\r\tresultOop = interpreterProxy->stackValue(0);\r\theadingOop = interpreterProxy->stackValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(headingOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tsize = interpreterProxy->slotSizeOf(headingOop);\r\tif (interpreterProxy->isFloatObject(resultOop)) {\r\t\tisValVector = 0;\r\t} else {\r\t\tif (interpreterProxy->isWords(resultOop)) {\r\t\t\tif ((interpreterProxy->slotSizeOf(resultOop)) != size) {\r\t\t\t\tinterpreterProxy->primitiveFail();\r\t\t\t\treturn null;\r\t\t\t}\r\t\t\tisValVector = 1;\r\t\t} else {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\theadingArray = interpreterProxy->firstIndexableField(headingOop);\r\tif (isValVector) {\r\t\tresultArray = interpreterProxy->firstIndexableField(resultOop);\r\t} else {\r\t\theading = interpreterProxy->floatValueOf(resultOop);\r\t\t/* begin degreesToRadians: */\r\t\tdeg = 90.0 - heading;\r\t\tq = deg / 360.0;\r\t\tif (deg < 0.0) {\r\t\t\tq -= 1;\r\t\t}\r\t\theadingRadians = (deg - (q * 360.0)) * 0.0174532925199433;\r\t\theading = headingRadians;\r\t}\r\tfor (i = 0; i <= (size - 1); i += 1) {\r\t\tif (isValVector) {\r\t\t\theading = resultArray[i];\r\t\t\t/* begin degreesToRadians: */\r\t\t\tdeg1 = 90.0 - heading;\r\t\t\tq1 = deg1 / 360.0;\r\t\t\tif (deg1 < 0.0) {\r\t\t\t\tq1 -= 1;\r\t\t\t}\r\t\t\theadingRadians1 = (deg1 - (q1 * 360.0)) * 0.0174532925199433;\r\t\t\theading = headingRadians1;\r\t\t}\r\t\theadingArray[i] = heading;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(2);\r}\r\r\r/*\tNote: This is coded so that is can be run from Squeak. */\r\rEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter) {\r    sqInt ok;\r\r\tinterpreterProxy = anInterpreter;\r\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\r\tif (ok == 0) {\r\t\treturn 0;\r\t}\r\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\r\treturn ok;\r}\r\rEXPORT(sqInt) setScalarHeading(void) {\r    double heading;\r    float *headingArray;\r    sqInt headingOop;\r    sqInt index;\r\r\theading = interpreterProxy->stackFloatValue(0);\r\theadingOop = interpreterProxy->stackValue(1);\r\tindex = interpreterProxy->stackIntegerValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(headingOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->slotSizeOf(headingOop)) < index) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\theadingArray = interpreterProxy->firstIndexableField(headingOop);\r\theadingArray[index - 1] = (degreesToRadians(heading));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(3);\r}\r\rEXPORT(sqInt) shutdownModule(void) {\r\treturn 1;\r}\r\rEXPORT(sqInt) turtleScalarSetX(void) {\r    double destWidth;\r    float *headingArray;\r    sqInt headingOop;\r    sqInt leftEdgeMode;\r    sqInt rightEdgeMode;\r    sqInt size;\r    double val;\r    float *xArray;\r    sqInt xIndex;\r    sqInt xOop;\r    double headingRadians;\r    double newX;\r\r\trightEdgeMode = interpreterProxy->stackIntegerValue(0);\r\tleftEdgeMode = interpreterProxy->stackIntegerValue(1);\r\tdestWidth = interpreterProxy->stackFloatValue(2);\r\tval = interpreterProxy->stackFloatValue(3);\r\theadingOop = interpreterProxy->stackValue(4);\r\txIndex = interpreterProxy->stackIntegerValue(5);\r\txOop = interpreterProxy->stackValue(6);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(xOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(headingOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tsize = interpreterProxy->slotSizeOf(xOop);\r\tif ((interpreterProxy->slotSizeOf(headingOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\txArray = interpreterProxy->firstIndexableField(xOop);\r\theadingArray = interpreterProxy->firstIndexableField(headingOop);\r\t/* begin scalarXAt:xArray:headingArray:value:destWidth:leftEdgeMode:rightEdgeMode: */\r\tnewX = val;\r\tif (newX < 0.0) {\r\t\tif (leftEdgeMode == 1) {\r\t\t\tnewX += destWidth;\r\t\t}\r\t\tif (leftEdgeMode == 2) {\r\t\t\tnewX = 0.0;\r\t\t}\r\t\tif (leftEdgeMode == 3) {\r\t\t\tnewX = 0.0 - newX;\r\t\t\theadingRadians = headingArray[xIndex - 1];\r\t\t\tif (headingRadians < 3.141592653589793) {\r\t\t\t\theadingArray[xIndex - 1] = (3.141592653589793 - headingRadians);\r\t\t\t} else {\r\t\t\t\theadingArray[xIndex - 1] = (9.42477796076938 - headingRadians);\r\t\t\t}\r\t\t}\r\t}\r\tif (newX >= destWidth) {\r\t\tif (rightEdgeMode == 1) {\r\t\t\tnewX -= destWidth;\r\t\t}\r\t\tif (rightEdgeMode == 2) {\r\t\t\tnewX = destWidth - 1.0e-6;\r\t\t}\r\t\tif (rightEdgeMode == 3) {\r\t\t\tnewX = (destWidth - 1.0e-6) - (newX - destWidth);\r\t\t\theadingRadians = headingArray[xIndex - 1];\r\t\t\tif (headingRadians < 3.141592653589793) {\r\t\t\t\theadingArray[xIndex - 1] = (3.141592653589793 - headingRadians);\r\t\t\t} else {\r\t\t\t\theadingArray[xIndex - 1] = (9.42477796076938 - headingRadians);\r\t\t\t}\r\t\t}\r\t}\r\txArray[xIndex - 1] = newX;\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(7);\r}\r\rEXPORT(sqInt) turtleScalarSetY(void) {\r    sqInt bottomEdgeMode;\r    double destHeight;\r    float *headingArray;\r    sqInt headingOop;\r    sqInt size;\r    sqInt topEdgeMode;\r    double val;\r    float *yArray;\r    sqInt yIndex;\r    sqInt yOop;\r    double newY;\r\r\tbottomEdgeMode = interpreterProxy->stackIntegerValue(0);\r\ttopEdgeMode = interpreterProxy->stackIntegerValue(1);\r\tdestHeight = interpreterProxy->stackFloatValue(2);\r\tval = interpreterProxy->stackFloatValue(3);\r\theadingOop = interpreterProxy->stackValue(4);\r\tyIndex = interpreterProxy->stackIntegerValue(5);\r\tyOop = interpreterProxy->stackValue(6);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(yOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(headingOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tsize = interpreterProxy->slotSizeOf(yOop);\r\tif ((interpreterProxy->slotSizeOf(headingOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tyArray = interpreterProxy->firstIndexableField(yOop);\r\theadingArray = interpreterProxy->firstIndexableField(headingOop);\r\t/* begin scalarYAt:yArray:headingArray:value:destHeight:topEdgeMode:bottomEdgeMode: */\r\tnewY = val;\r\tif (newY < 0.0) {\r\t\tif (topEdgeMode == 1) {\r\t\t\tnewY += destHeight;\r\t\t}\r\t\tif (topEdgeMode == 2) {\r\t\t\tnewY = 0.0;\r\t\t}\r\t\tif (topEdgeMode == 3) {\r\t\t\tnewY = 0.0 - newY;\r\t\t\theadingArray[yIndex - 1] = (6.283185307179586 - (headingArray[yIndex - 1]));\r\t\t}\r\t}\r\tif (newY >= destHeight) {\r\t\tif (bottomEdgeMode == 1) {\r\t\t\tnewY -= destHeight;\r\t\t}\r\t\tif (bottomEdgeMode == 2) {\r\t\t\tnewY = destHeight - 1.0e-6;\r\t\t}\r\t\tif (bottomEdgeMode == 3) {\r\t\t\tnewY = (destHeight - 1.0e-6) - (newY - destHeight);\r\t\t\theadingArray[yIndex - 1] = (6.283185307179586 - (headingArray[yIndex - 1]));\r\t\t}\r\t}\r\tyArray[yIndex - 1] = newY;\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(7);\r}\r\rEXPORT(sqInt) turtlesSetX(void) {\r    double destWidth;\r    float *headingArray;\r    sqInt headingOop;\r    sqInt i;\r    sqInt isValVector;\r    sqInt leftEdgeMode;\r    double newX;\r    sqInt rightEdgeMode;\r    sqInt size;\r    double val;\r    float *valArray;\r    sqInt valOop;\r    float *xArray;\r    sqInt xOop;\r    double headingRadians;\r    double newX1;\r\r\trightEdgeMode = interpreterProxy->stackIntegerValue(0);\r\tleftEdgeMode = interpreterProxy->stackIntegerValue(1);\r\tdestWidth = interpreterProxy->stackFloatValue(2);\r\tvalOop = interpreterProxy->stackValue(3);\r\theadingOop = interpreterProxy->stackValue(4);\r\txOop = interpreterProxy->stackValue(5);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(xOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(headingOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (interpreterProxy->isFloatObject(valOop)) {\r\t\tisValVector = 0;\r\t} else {\r\t\tif (interpreterProxy->isWords(valOop)) {\r\t\t\tisValVector = 1;\r\t\t} else {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tsize = interpreterProxy->slotSizeOf(xOop);\r\tif ((interpreterProxy->slotSizeOf(headingOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (isValVector) {\r\t\tif ((interpreterProxy->slotSizeOf(valOop)) != size) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\txArray = interpreterProxy->firstIndexableField(xOop);\r\theadingArray = interpreterProxy->firstIndexableField(headingOop);\r\tif (isValVector) {\r\t\tvalArray = interpreterProxy->firstIndexableField(valOop);\r\t} else {\r\t\tval = interpreterProxy->floatValueOf(valOop);\r\t}\r\tfor (i = 0; i <= (size - 1); i += 1) {\r\t\tif (isValVector) {\r\t\t\tnewX = valArray[i];\r\t\t} else {\r\t\t\tnewX = val;\r\t\t}\r\t\t/* begin scalarXAt:xArray:headingArray:value:destWidth:leftEdgeMode:rightEdgeMode: */\r\t\tnewX1 = newX;\r\t\tif (newX1 < 0.0) {\r\t\t\tif (leftEdgeMode == 1) {\r\t\t\t\tnewX1 += destWidth;\r\t\t\t}\r\t\t\tif (leftEdgeMode == 2) {\r\t\t\t\tnewX1 = 0.0;\r\t\t\t}\r\t\t\tif (leftEdgeMode == 3) {\r\t\t\t\tnewX1 = 0.0 - newX1;\r\t\t\t\theadingRadians = headingArray[i];\r\t\t\t\tif (headingRadians < 3.141592653589793) {\r\t\t\t\t\theadingArray[i] = (3.141592653589793 - headingRadians);\r\t\t\t\t} else {\r\t\t\t\t\theadingArray[i] = (9.42477796076938 - headingRadians);\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t\tif (newX1 >= destWidth) {\r\t\t\tif (rightEdgeMode == 1) {\r\t\t\t\tnewX1 -= destWidth;\r\t\t\t}\r\t\t\tif (rightEdgeMode == 2) {\r\t\t\t\tnewX1 = destWidth - 1.0e-6;\r\t\t\t}\r\t\t\tif (rightEdgeMode == 3) {\r\t\t\t\tnewX1 = (destWidth - 1.0e-6) - (newX1 - destWidth);\r\t\t\t\theadingRadians = headingArray[i];\r\t\t\t\tif (headingRadians < 3.141592653589793) {\r\t\t\t\t\theadingArray[i] = (3.141592653589793 - headingRadians);\r\t\t\t\t} else {\r\t\t\t\t\theadingArray[i] = (9.42477796076938 - headingRadians);\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t\txArray[i] = newX1;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(6);\r}\r\rEXPORT(sqInt) turtlesSetY(void) {\r    sqInt bottomEdgeMode;\r    double destHeight;\r    float *headingArray;\r    sqInt headingOop;\r    sqInt i;\r    sqInt isValVector;\r    double newY;\r    sqInt size;\r    sqInt topEdgeMode;\r    double val;\r    float *valArray;\r    sqInt valOop;\r    float *yArray;\r    sqInt yOop;\r    double newY1;\r\r\tbottomEdgeMode = interpreterProxy->stackIntegerValue(0);\r\ttopEdgeMode = interpreterProxy->stackIntegerValue(1);\r\tdestHeight = interpreterProxy->stackFloatValue(2);\r\tvalOop = interpreterProxy->stackValue(3);\r\theadingOop = interpreterProxy->stackValue(4);\r\tyOop = interpreterProxy->stackValue(5);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(yOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(headingOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (interpreterProxy->isFloatObject(valOop)) {\r\t\tisValVector = 0;\r\t} else {\r\t\tif (interpreterProxy->isWords(valOop)) {\r\t\t\tisValVector = 1;\r\t\t} else {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tsize = interpreterProxy->slotSizeOf(yOop);\r\tif ((interpreterProxy->slotSizeOf(headingOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (isValVector) {\r\t\tif ((interpreterProxy->slotSizeOf(valOop)) != size) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tyArray = interpreterProxy->firstIndexableField(yOop);\r\theadingArray = interpreterProxy->firstIndexableField(headingOop);\r\tif (isValVector) {\r\t\tvalArray = interpreterProxy->firstIndexableField(valOop);\r\t} else {\r\t\tval = interpreterProxy->floatValueOf(valOop);\r\t}\r\tfor (i = 0; i <= (size - 1); i += 1) {\r\t\tif (isValVector) {\r\t\t\tnewY = valArray[i];\r\t\t} else {\r\t\t\tnewY = val;\r\t\t}\r\t\t/* begin scalarYAt:yArray:headingArray:value:destHeight:topEdgeMode:bottomEdgeMode: */\r\t\tnewY1 = newY;\r\t\tif (newY1 < 0.0) {\r\t\t\tif (topEdgeMode == 1) {\r\t\t\t\tnewY1 += destHeight;\r\t\t\t}\r\t\t\tif (topEdgeMode == 2) {\r\t\t\t\tnewY1 = 0.0;\r\t\t\t}\r\t\t\tif (topEdgeMode == 3) {\r\t\t\t\tnewY1 = 0.0 - newY1;\r\t\t\t\theadingArray[i] = (6.283185307179586 - (headingArray[i]));\r\t\t\t}\r\t\t}\r\t\tif (newY1 >= destHeight) {\r\t\t\tif (bottomEdgeMode == 1) {\r\t\t\t\tnewY1 -= destHeight;\r\t\t\t}\r\t\t\tif (bottomEdgeMode == 2) {\r\t\t\t\tnewY1 = destHeight - 1.0e-6;\r\t\t\t}\r\t\t\tif (bottomEdgeMode == 3) {\r\t\t\t\tnewY1 = (destHeight - 1.0e-6) - (newY1 - destHeight);\r\t\t\t\theadingArray[i] = (6.283185307179586 - (headingArray[i]));\r\t\t\t}\r\t\t}\r\t\tyArray[i] = newY1;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(6);\r}\r\rEXPORT(sqInt) vectorGetAngleTo(void) {\r    sqInt index;\r    sqInt isVector;\r    float *pX;\r    sqInt pXOop;\r    float *pY;\r    sqInt pYOop;\r    double ppx;\r    double ppy;\r    double r;\r    float *result;\r    sqInt resultOop;\r    sqInt size;\r    double x;\r    float *xArray;\r    sqInt xArrayOop;\r    double y;\r    float *yArray;\r    sqInt yArrayOop;\r    double tanVal;\r    double theta;\r\r\tresultOop = interpreterProxy->stackValue(0);\r\tyArrayOop = interpreterProxy->stackValue(1);\r\txArrayOop = interpreterProxy->stackValue(2);\r\tpYOop = interpreterProxy->stackValue(3);\r\tpXOop = interpreterProxy->stackValue(4);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(resultOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(xArrayOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(yArrayOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tsize = interpreterProxy->stSizeOf(resultOop);\r\tif (size < 0) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->stSizeOf(xArrayOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->stSizeOf(yArrayOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (interpreterProxy->isFloatObject(pXOop)) {\r\t\tif (interpreterProxy->isFloatObject(pYOop)) {\r\t\t\tisVector = 0;\r\t\t} else {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t} else {\r\t\tif (interpreterProxy->isFloatObject(pYOop)) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t} else {\r\t\t\tisVector = 1;\r\t\t}\r\t}\r\tif (isVector) {\r\t\tif ((interpreterProxy->stSizeOf(pXOop)) != size) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t\tif ((interpreterProxy->stSizeOf(pYOop)) != size) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tresult = interpreterProxy->firstIndexableField(resultOop);\r\txArray = interpreterProxy->firstIndexableField(xArrayOop);\r\tyArray = interpreterProxy->firstIndexableField(yArrayOop);\r\tif (isVector) {\r\t\tpX = interpreterProxy->firstIndexableField(pXOop);\r\t\tpY = interpreterProxy->firstIndexableField(pYOop);\r\t}\r\tif (!(isVector)) {\r\t\tppx = interpreterProxy->floatValueOf(pXOop);\r\t\tppy = interpreterProxy->floatValueOf(pYOop);\r\t}\r\tfor (index = 0; index <= (size - 1); index += 1) {\r\t\tif (isVector) {\r\t\t\tppx = pX[index];\r\t\t\tppy = pY[index];\r\t\t}\r\t\tx = ppx - (xArray[index]);\r\t\ty = ppy - (yArray[index]);\r\t\t/* begin degreesFromX:y: */\r\t\tif (x == 0.0) {\r\t\t\tif (y >= 0.0) {\r\t\t\t\tr = 90.0;\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tr = 270.0;\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t} else {\r\t\t\ttanVal = y / x;\r\t\t\ttheta = atan(tanVal);\r\t\t\tif (x >= 0.0) {\r\t\t\t\tif (y >= 0.0) {\r\t\t\t\t\tr = theta / 0.0174532925199433;\r\t\t\t\t\tgoto l1;\r\t\t\t\t} else {\r\t\t\t\t\tr = 360.0 + (theta / 0.0174532925199433);\r\t\t\t\t\tgoto l1;\r\t\t\t\t}\r\t\t\t} else {\r\t\t\t\tr = 180.0 + (theta / 0.0174532925199433);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t}\r\t\tr = 0.0;\r\tl1:\t/* end degreesFromX:y: */;\r\t\tr += 90.0;\r\t\tif (r > 360.0) {\r\t\t\tr -= 360.0;\r\t\t}\r\t\tresult[index] = r;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(6);\r\tinterpreterProxy->push(resultOop);\r}\r\rEXPORT(sqInt) vectorGetDistanceTo(void) {\r    sqInt index;\r    sqInt isVector;\r    float *pX;\r    sqInt pXOop;\r    float *pY;\r    sqInt pYOop;\r    double ppx;\r    double ppy;\r    float *result;\r    sqInt resultOop;\r    sqInt size;\r    double x;\r    float *xArray;\r    sqInt xArrayOop;\r    double y;\r    float *yArray;\r    sqInt yArrayOop;\r\r\tresultOop = interpreterProxy->stackValue(0);\r\tyArrayOop = interpreterProxy->stackValue(1);\r\txArrayOop = interpreterProxy->stackValue(2);\r\tpYOop = interpreterProxy->stackValue(3);\r\tpXOop = interpreterProxy->stackValue(4);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(resultOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(xArrayOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(yArrayOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tsize = interpreterProxy->stSizeOf(resultOop);\r\tif (size < 0) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->stSizeOf(xArrayOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->stSizeOf(yArrayOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (interpreterProxy->isFloatObject(pXOop)) {\r\t\tif (interpreterProxy->isFloatObject(pYOop)) {\r\t\t\tisVector = 0;\r\t\t} else {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t} else {\r\t\tif (interpreterProxy->isFloatObject(pYOop)) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t} else {\r\t\t\tisVector = 1;\r\t\t}\r\t}\r\tif (isVector) {\r\t\tif ((interpreterProxy->stSizeOf(pXOop)) != size) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t\tif ((interpreterProxy->stSizeOf(pYOop)) != size) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tresult = interpreterProxy->firstIndexableField(resultOop);\r\txArray = interpreterProxy->firstIndexableField(xArrayOop);\r\tyArray = interpreterProxy->firstIndexableField(yArrayOop);\r\tif (isVector) {\r\t\tpX = interpreterProxy->firstIndexableField(pXOop);\r\t\tpY = interpreterProxy->firstIndexableField(pYOop);\r\t}\r\tif (!(isVector)) {\r\t\tppx = interpreterProxy->floatValueOf(pXOop);\r\t\tppy = interpreterProxy->floatValueOf(pYOop);\r\t}\r\tfor (index = 0; index <= (size - 1); index += 1) {\r\t\tif (isVector) {\r\t\t\tppx = pX[index];\r\t\t\tppy = pY[index];\r\t\t}\r\t\tx = ppx - (xArray[index]);\r\t\ty = ppy - (yArray[index]);\r\t\tresult[index] = (sqrt((x * x) + (y * y)));\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(6);\r\tinterpreterProxy->push(resultOop);\r}\r\rEXPORT(sqInt) zoomBitmap(void) {\r    sqInt bit;\r    unsigned int* dOrigin;\r    sqInt dst;\r    sqInt dstIndex;\r    sqInt dstSize;\r    sqInt dummy;\r    sqInt sHeight;\r    unsigned int* sOrigin;\r    sqInt sWidth;\r    sqInt src;\r    sqInt srcIndex;\r    sqInt srcOrigin;\r    sqInt srcSize;\r    sqInt sx;\r    sqInt sy;\r    sqInt xFactor;\r    sqInt y;\r    sqInt yFactor;\r\r\tyFactor = interpreterProxy->stackIntegerValue(0);\r\txFactor = interpreterProxy->stackIntegerValue(1);\r\tsHeight = interpreterProxy->stackIntegerValue(2);\r\tsWidth = interpreterProxy->stackIntegerValue(3);\r\tdst = interpreterProxy->stackValue(4);\r\tsrc = interpreterProxy->stackValue(5);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tsrcSize = interpreterProxy->slotSizeOf(src);\r\tdstSize = interpreterProxy->slotSizeOf(dst);\r\tif (!((sWidth * sHeight) == srcSize)) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(((srcSize * xFactor) * yFactor) == dstSize)) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tsOrigin = interpreterProxy->firstIndexableField(src);\r\tdOrigin = interpreterProxy->firstIndexableField(dst);\r\tsrcIndex = 0;\r\tsrcOrigin = 0;\r\tdstIndex = 0;\r\tfor (sy = 0; sy <= (sHeight - 1); sy += 1) {\r\t\tfor (y = 0; y <= (yFactor - 1); y += 1) {\r\t\t\tfor (sx = 0; sx <= (sWidth - 1); sx += 1) {\r\t\t\t\tbit = sOrigin[srcIndex];\r\t\t\t\tsrcIndex += 1;\r\t\t\t\tfor (dummy = 0; dummy <= (xFactor - 1); dummy += 1) {\r\t\t\t\t\tdOrigin[dstIndex] = bit;\r\t\t\t\t\tdstIndex += 1;\r\t\t\t\t}\r\t\t\t}\r\t\t\tsrcIndex = srcOrigin;\r\t\t}\r\t\tsrcOrigin += sWidth;\r\t\tsrcIndex = srcOrigin;\r\t}\r\tinterpreterProxy->pop(6);\r}\r\r\r#ifdef SQUEAK_BUILTIN_PLUGIN\r\r\rvoid* KedamaPlugin_exports[][3] = {\r\t{\"KedamaPlugin\", \"makeMaskLog\", (void*)makeMaskLog},\r\t{\"KedamaPlugin\", \"vectorGetDistanceTo\", (void*)vectorGetDistanceTo},\r\t{\"KedamaPlugin\", \"getScalarHeading\", (void*)getScalarHeading},\r\t{\"KedamaPlugin\", \"shutdownModule\", (void*)shutdownModule},\r\t{\"KedamaPlugin\", \"primitiveAddScalar\", (void*)primitiveAddScalar},\r\t{\"KedamaPlugin\", \"primSetPixelsAtXY\", (void*)primSetPixelsAtXY},\r\t{\"KedamaPlugin\", \"turtleScalarSetX\", (void*)turtleScalarSetX},\r\t{\"KedamaPlugin\", \"primPixelAtXY\", (void*)primPixelAtXY},\r\t{\"KedamaPlugin\", \"primUpHill\", (void*)primUpHill},\r\t{\"KedamaPlugin\", \"primScalarForward\", (void*)primScalarForward},\r\t{\"KedamaPlugin\", \"primitiveDivArrays\", (void*)primitiveDivArrays},\r\t{\"KedamaPlugin\", \"getModuleName\", (void*)getModuleName},\r\t{\"KedamaPlugin\", \"primitiveSubArrays\", (void*)primitiveSubArrays},\r\t{\"KedamaPlugin\", \"scalarGetAngleTo\", (void*)scalarGetAngleTo},\r\t{\"KedamaPlugin\", \"randomRange\", (void*)randomRange},\r\t{\"KedamaPlugin\", \"setInterpreter\", (void*)setInterpreter},\r\t{\"KedamaPlugin\", \"kedamaSetRandomSeed\", (void*)kedamaSetRandomSeed},\r\t{\"KedamaPlugin\", \"drawTurtlesInArray\", (void*)drawTurtlesInArray},\r\t{\"KedamaPlugin\", \"turtleScalarSetY\", (void*)turtleScalarSetY},\r\t{\"KedamaPlugin\", \"randomIntoIntegerArray\", (void*)randomIntoIntegerArray},\r\t{\"KedamaPlugin\", \"getHeadingArrayInto\", (void*)getHeadingArrayInto},\r\t{\"KedamaPlugin\", \"makeTurtlesMap\", (void*)makeTurtlesMap},\r\t{\"KedamaPlugin\", \"setHeadingArrayFrom\", (void*)setHeadingArrayFrom},\r\t{\"KedamaPlugin\", \"turtlesSetX\", (void*)turtlesSetX},\r\t{\"KedamaPlugin\", \"setScalarHeading\", (void*)setScalarHeading},\r\t{\"KedamaPlugin\", \"makeMask\", (void*)makeMask},\r\t{\"KedamaPlugin\", \"primitiveDivScalar\", (void*)primitiveDivScalar},\r\t{\"KedamaPlugin\", \"primitiveSubScalar\", (void*)primitiveSubScalar},\r\t{\"KedamaPlugin\", \"primPixelsAtXY\", (void*)primPixelsAtXY},\r\t{\"KedamaPlugin\", \"vectorGetAngleTo\", (void*)vectorGetAngleTo},\r\t{\"KedamaPlugin\", \"primitiveMulArrays\", (void*)primitiveMulArrays},\r\t{\"KedamaPlugin\", \"primPixelAtXYPut\", (void*)primPixelAtXYPut},\r\t{\"KedamaPlugin\", \"zoomBitmap\", (void*)zoomBitmap},\r\t{\"KedamaPlugin\", \"initialiseModule\", (void*)initialiseModule},\r\t{\"KedamaPlugin\", \"primitiveAddArrays\", (void*)primitiveAddArrays},\r\t{\"KedamaPlugin\", \"scalarGetDistanceTo\", (void*)scalarGetDistanceTo},\r\t{\"KedamaPlugin\", \"turtlesSetY\", (void*)turtlesSetY},\r\t{\"KedamaPlugin\", \"randomIntoFloatArray\", (void*)randomIntoFloatArray},\r\t{\"KedamaPlugin\", \"primTurtlesForward\", (void*)primTurtlesForward},\r\t{\"KedamaPlugin\", \"primitiveMulScalar\", (void*)primitiveMulScalar},\r\t{NULL, NULL, NULL}\r};\r\r\r#endif /* ifdef SQ_BUILTIN_PLUGIN */\r\r"
  },
  {
    "path": "vm/src/from_squeak/unix/src/plugins/KedamaPlugin2/KedamaPlugin2.c",
    "content": "/* Automatically generated from Squeak on 23 January 2011 3:56 pm \r   by VMMaker 4.4.7\r */\r\r#include <math.h>\r#include <stdio.h>\r#include <stdlib.h>\r#include <string.h>\r#include <time.h>\r\r/* Default EXPORT macro that does nothing (see comment in sq.h): */\r#define EXPORT(returnType) returnType\r\r/* Do not include the entire sq.h file but just those parts needed. */\r/*  The virtual machine proxy definition */\r#include \"sqVirtualMachine.h\"\r/* Configuration options */\r#include \"sqConfig.h\"\r/* Platform specific definitions */\r#include \"sqPlatformSpecific.h\"\r\r#define true 1\r#define false 0\r#define null 0  /* using 'null' because nil is predefined in Think C */\r#ifdef SQUEAK_BUILTIN_PLUGIN\r#undef EXPORT\r// was #undef EXPORT(returnType) but screws NorCroft cc\r#define EXPORT(returnType) static returnType\r#endif\r\r#include \"sqMemoryAccess.h\"\r\r\r/*** Constants ***/\r\r/*** Function Prototypes ***/\rstatic double degreesFromXy(double x, double y);\rstatic double degreesToRadians(double degrees);\r#pragma export on\rEXPORT(sqInt) drawTurtlesInArray(void);\rEXPORT(sqInt) getHeadingArrayInto(void);\r#pragma export off\rstatic VirtualMachine * getInterpreter(void);\r#pragma export on\rEXPORT(const char*) getModuleName(void);\rEXPORT(sqInt) getScalarHeading(void);\r#pragma export off\rstatic sqInt halt(void);\r#pragma export on\rEXPORT(sqInt) initialiseModule(void);\r#pragma export off\rstatic sqInt kedamaRandom2(sqInt range);\rstatic sqInt kedamaRandom(sqInt range);\r#pragma export on\rEXPORT(sqInt) kedamaSetRandomSeed(void);\rEXPORT(sqInt) makeMask(void);\rEXPORT(sqInt) makeMaskLog(void);\rEXPORT(sqInt) makeTurtlesMap(void);\r#pragma export off\rstatic sqInt msg(char *s);\r#pragma export on\rEXPORT(sqInt) primPixelAtXY(void);\rEXPORT(sqInt) primPixelAtXYPut(void);\rEXPORT(sqInt) primPixelsAtXY(void);\rEXPORT(sqInt) primScalarForward(void);\rEXPORT(sqInt) primSetPixelsAtXY(void);\rEXPORT(sqInt) primTurtlesForward(void);\rEXPORT(sqInt) primUpHill(void);\rEXPORT(sqInt) primitiveAddArrays(void);\rEXPORT(sqInt) primitiveAddScalar(void);\rEXPORT(sqInt) primitiveAndByteArray(void);\rEXPORT(sqInt) primitiveDivArrays(void);\rEXPORT(sqInt) primitiveDivScalar(void);\rEXPORT(sqInt) primitiveEQArrays(void);\rEXPORT(sqInt) primitiveEQScalar(void);\rEXPORT(sqInt) primitiveGEArrays(void);\rEXPORT(sqInt) primitiveGEScalar(void);\rEXPORT(sqInt) primitiveGTArrays(void);\rEXPORT(sqInt) primitiveGTScalar(void);\rEXPORT(sqInt) primitiveLEArrays(void);\rEXPORT(sqInt) primitiveLEScalar(void);\rEXPORT(sqInt) primitiveLTArrays(void);\rEXPORT(sqInt) primitiveLTScalar(void);\rEXPORT(sqInt) primitiveMulArrays(void);\rEXPORT(sqInt) primitiveMulScalar(void);\rEXPORT(sqInt) primitiveNEArrays(void);\rEXPORT(sqInt) primitiveNEScalar(void);\rEXPORT(sqInt) primitiveNotByteArray(void);\rEXPORT(sqInt) primitiveOrByteArray(void);\rEXPORT(sqInt) primitivePredicateAtAllPutBoolean(void);\rEXPORT(sqInt) primitivePredicateAtAllPutColor(void);\rEXPORT(sqInt) primitivePredicateAtAllPutNumber(void);\rEXPORT(sqInt) primitivePredicateAtAllPutObject(void);\rEXPORT(sqInt) primitivePredicateReplaceBytes(void);\rEXPORT(sqInt) primitivePredicateReplaceWords(void);\rEXPORT(sqInt) primitiveRemArrays(void);\rEXPORT(sqInt) primitiveRemScalar(void);\rEXPORT(sqInt) primitiveSubArrays(void);\rEXPORT(sqInt) primitiveSubScalar(void);\r#pragma export off\rstatic double radiansToDegrees(double radians);\r#pragma export on\rEXPORT(sqInt) randomIntoFloatArray(void);\rEXPORT(sqInt) randomIntoIntegerArray(void);\rEXPORT(sqInt) randomRange(void);\rEXPORT(sqInt) scalarGetAngleTo(void);\rEXPORT(sqInt) scalarGetDistanceTo(void);\r#pragma export off\rstatic sqInt scalarXAtxArrayheadingArrayvaluedestWidthleftEdgeModerightEdgeMode(sqInt index, float* xArray, float* headingArray, double val, double destWidth, sqInt leftEdgeMode, sqInt rightEdgeMode);\rstatic sqInt scalarYAtyArrayheadingArrayvaluedestHeighttopEdgeModebottomEdgeMode(sqInt index, float* yArray, float* headingArray, double val, double destHeight, sqInt topEdgeMode, sqInt bottomEdgeMode);\r#pragma export on\rEXPORT(sqInt) setHeadingArrayFrom(void);\rEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\rEXPORT(sqInt) setScalarHeading(void);\rEXPORT(sqInt) shutdownModule(void);\rEXPORT(sqInt) turtleScalarSetX(void);\rEXPORT(sqInt) turtleScalarSetY(void);\rEXPORT(sqInt) turtlesSetX(void);\rEXPORT(sqInt) turtlesSetY(void);\rEXPORT(sqInt) vectorGetAngleTo(void);\rEXPORT(sqInt) vectorGetDistanceTo(void);\rEXPORT(sqInt) zoomBitmap(void);\r#pragma export off\r/*** Variables ***/\r\r#ifdef SQUEAK_BUILTIN_PLUGIN\rextern\r#endif\rstruct VirtualMachine* interpreterProxy;\rstatic unsigned int kedamaRandomSeed;\rstatic const char *moduleName =\r#ifdef SQUEAK_BUILTIN_PLUGIN\r\t\"KedamaPlugin2 23 January 2011 (i)\"\r#else\r\t\"KedamaPlugin2 23 January 2011 (e)\"\r#endif\r;\rstatic unsigned int randA;\rstatic unsigned int randM;\rstatic unsigned int randQ;\rstatic unsigned int randR;\r\r\rstatic double degreesFromXy(double x, double y) {\r    double tanVal;\r    double theta;\r\r\tif (x == 0.0) {\r\t\tif (y >= 0.0) {\r\t\t\treturn 90.0;\r\t\t} else {\r\t\t\treturn 270.0;\r\t\t}\r\t} else {\r\t\ttanVal = y / x;\r\t\ttheta = atan(tanVal);\r\t\tif (x >= 0.0) {\r\t\t\tif (y >= 0.0) {\r\t\t\t\treturn theta / 0.0174532925199433;\r\t\t\t} else {\r\t\t\t\treturn 360.0 + (theta / 0.0174532925199433);\r\t\t\t}\r\t\t} else {\r\t\t\treturn 180.0 + (theta / 0.0174532925199433);\r\t\t}\r\t}\r\treturn 0.0;\r}\r\rstatic double degreesToRadians(double degrees) {\r    double deg;\r    double headingRadians;\r    int q;\r\r\tdeg = 90.0 - degrees;\r\tq = deg / 360.0;\r\tif (deg < 0.0) {\r\t\tq -= 1;\r\t}\r\theadingRadians = (deg - (q * 360.0)) * 0.0174532925199433;\r\treturn headingRadians;\r}\r\rEXPORT(sqInt) drawTurtlesInArray(void) {\r    sqInt bitsIndex;\r    unsigned int *colorArray;\r    sqInt colorOop;\r    unsigned int *destBits;\r    sqInt destHeight;\r    sqInt destOop;\r    sqInt destWidth;\r    sqInt i;\r    sqInt size;\r    sqInt visible;\r    unsigned char *visibleArray;\r    sqInt visibleOop;\r    sqInt x;\r    float *xArray;\r    sqInt xOop;\r    sqInt y;\r    float *yArray;\r    sqInt yOop;\r\r\tvisibleOop = interpreterProxy->stackValue(0);\r\tcolorOop = interpreterProxy->stackValue(1);\r\tyOop = interpreterProxy->stackValue(2);\r\txOop = interpreterProxy->stackValue(3);\r\tdestHeight = interpreterProxy->stackIntegerValue(4);\r\tdestWidth = interpreterProxy->stackIntegerValue(5);\r\tdestOop = interpreterProxy->stackValue(6);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(destOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(xOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(yOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(colorOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isBytes(visibleOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((destHeight * destWidth) != (interpreterProxy->slotSizeOf(destOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tsize = interpreterProxy->slotSizeOf(xOop);\r\tif ((interpreterProxy->slotSizeOf(yOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->slotSizeOf(colorOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->slotSizeOf(visibleOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\txArray = interpreterProxy->firstIndexableField(xOop);\r\tyArray = interpreterProxy->firstIndexableField(yOop);\r\tcolorArray = interpreterProxy->firstIndexableField(colorOop);\r\tvisibleArray = interpreterProxy->firstIndexableField(visibleOop);\r\tdestBits = interpreterProxy->firstIndexableField(destOop);\r\tfor (i = 0; i <= (size - 1); i += 1) {\r\t\tx = ((int) (xArray[i]));\r\t\t;\r\t\ty = ((int) (yArray[i]));\r\t\t;\r\t\tvisible = visibleArray[i];\r\t\tif ((visible != 0) && (((x >= 0) && (y >= 0)) && ((x < destWidth) && (y < destHeight)))) {\r\t\t\tbitsIndex = (y * destWidth) + x;\r\t\t\tdestBits[bitsIndex] = (colorArray[i]);\r\t\t}\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(7);\r}\r\rEXPORT(sqInt) getHeadingArrayInto(void) {\r    double heading;\r    float *headingArray;\r    sqInt headingOop;\r    sqInt i;\r    float *resultArray;\r    sqInt resultOop;\r    sqInt size;\r\r\tresultOop = interpreterProxy->stackValue(0);\r\theadingOop = interpreterProxy->stackValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(headingOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(resultOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tsize = interpreterProxy->slotSizeOf(headingOop);\r\tif ((interpreterProxy->slotSizeOf(resultOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\theadingArray = interpreterProxy->firstIndexableField(headingOop);\r\tresultArray = interpreterProxy->firstIndexableField(resultOop);\r\tfor (i = 0; i <= (size - 1); i += 1) {\r\t\theading = headingArray[i];\r\t\theading = heading / 0.0174532925199433;\r\t\theading = 90.0 - heading;\r\t\tif (!(heading > 0.0)) {\r\t\t\theading += 360.0;\r\t\t}\r\t\tresultArray[i] = heading;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(2);\r}\r\r\r/*\tNote: This is coded so that plugins can be run from Squeak. */\r\rstatic VirtualMachine * getInterpreter(void) {\r\treturn interpreterProxy;\r}\r\r\r/*\tNote: This is hardcoded so it can be run from Squeak.\r\tThe module name is used for validating a module *after*\r\tit is loaded to check if it does really contain the module\r\twe're thinking it contains. This is important! */\r\rEXPORT(const char*) getModuleName(void) {\r\treturn moduleName;\r}\r\rEXPORT(sqInt) getScalarHeading(void) {\r    double heading;\r    float *headingArray;\r    sqInt headingOop;\r    sqInt index;\r    double deg;\r    double degrees;\r\r\theadingOop = interpreterProxy->stackValue(0);\r\tindex = interpreterProxy->stackIntegerValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(headingOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->slotSizeOf(headingOop)) < index) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\theadingArray = interpreterProxy->firstIndexableField(headingOop);\r\theading = headingArray[index - 1];\r\t/* begin radiansToDegrees: */\r\tdegrees = heading / 0.0174532925199433;\r\tdeg = 90.0 - degrees;\r\tif (!(deg > 0.0)) {\r\t\tdeg += 360.0;\r\t}\r\theading = deg;\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(3);\r\tinterpreterProxy->pushFloat(heading);\r}\r\rstatic sqInt halt(void) {\r\t;\r}\r\rEXPORT(sqInt) initialiseModule(void) {\r\tkedamaRandomSeed = 17;\r\r\t/*  magic constant =      16807  */\r\r\trandA = 16807;\r\r\t/*  magic constant = 2147483647  */\r\r\trandM = 2147483647U;\r\trandQ = randM / randA;\r\trandR = randM % randA;\r}\r\rstatic sqInt kedamaRandom2(sqInt range) {\r    sqInt hi;\r    sqInt lo;\r    sqInt r;\r    sqInt v;\r    sqInt val;\r\r\tif (range < 0) {\r\t\tr = 0 - range;\r\t} else {\r\t\tr = range;\r\t}\r\thi = kedamaRandomSeed / randQ;\r\tlo = kedamaRandomSeed % randQ;\r\tkedamaRandomSeed = (randA * lo) - (randR * hi);\r\tv = kedamaRandomSeed & 65535;\r\tval = ((usqInt) (v * (r + 1))) >> 16;\r\tif (range < 0) {\r\t\treturn 0 - val;\r\t} else {\r\t\treturn val;\r\t}\r}\r\rstatic sqInt kedamaRandom(sqInt range) {\r    sqInt r;\r    sqInt val;\r\r\tif (range < 0) {\r\t\tr = 0 - range;\r\t} else {\r\t\tr = range;\r\t}\r\tkedamaRandomSeed = ((kedamaRandomSeed * 1309) + 13849) & 65535;\r\tval = ((usqInt) (kedamaRandomSeed * (r + 1))) >> 16;\r\tif (range < 0) {\r\t\treturn 0 - val;\r\t} else {\r\t\treturn val;\r\t}\r}\r\rEXPORT(sqInt) kedamaSetRandomSeed(void) {\r    sqInt seed;\r\r\tseed = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tkedamaRandomSeed = seed & 65536;\r\tinterpreterProxy->pop(1);\r}\r\rEXPORT(sqInt) makeMask(void) {\r    unsigned int alpha;\r    unsigned int* dOrigin;\r    sqInt data;\r    sqInt dataBits;\r    sqInt dataSize;\r    unsigned int highMask;\r    sqInt i;\r    unsigned int* mOrigin;\r    sqInt maskBits;\r    sqInt maskSize;\r    unsigned int pixel;\r    sqInt shiftAmount;\r\r\tshiftAmount = interpreterProxy->stackIntegerValue(0);\r\tpixel = interpreterProxy->stackIntegerValue(1);\r\tmaskBits = interpreterProxy->stackValue(2);\r\tdataBits = interpreterProxy->stackValue(3);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tdataSize = interpreterProxy->slotSizeOf(dataBits);\r\tmaskSize = interpreterProxy->slotSizeOf(maskBits);\r\tif (!(dataSize == maskSize)) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (shiftAmount < -32) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (shiftAmount > 8) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tdOrigin = interpreterProxy->firstIndexableField(dataBits);\r\tmOrigin = interpreterProxy->firstIndexableField(maskBits);\r\thighMask = 4278190080U;\r\tfor (i = 0; i <= (dataSize - 1); i += 1) {\r\t\tdata = dOrigin[i];\r\t\talpha = ((shiftAmount < 0) ? ((usqInt) data >> -shiftAmount) : ((usqInt) data << shiftAmount));\r\t\tif (alpha > 255) {\r\t\t\talpha = 255;\r\t\t}\r\t\tif (alpha < 0) {\r\t\t\talpha = 0;\r\t\t}\r\t\tmOrigin[i] = (((alpha << 24) & highMask) | pixel);\r\t}\r\tinterpreterProxy->pop(4);\r}\r\rEXPORT(sqInt) makeMaskLog(void) {\r    unsigned int alpha;\r    unsigned int* dOrigin;\r    sqInt data;\r    sqInt dataBits;\r    sqInt dataSize;\r    unsigned int highMask;\r    sqInt i;\r    unsigned int* mOrigin;\r    sqInt maskBits;\r    sqInt maskSize;\r    unsigned int max;\r    unsigned int* maxFirst;\r    double maxLog;\r    sqInt maxOop;\r    unsigned int pixel;\r\r\tmaxOop = interpreterProxy->stackValue(0);\r\tpixel = interpreterProxy->stackIntegerValue(1);\r\tmaskBits = interpreterProxy->stackValue(2);\r\tdataBits = interpreterProxy->stackValue(3);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tmaxFirst = interpreterProxy->firstIndexableField(maxOop);\r\tmax = maxFirst[0];\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tmaxLog = log(max);\r\tdataSize = interpreterProxy->slotSizeOf(dataBits);\r\tmaskSize = interpreterProxy->slotSizeOf(maskBits);\r\tif (!(dataSize == maskSize)) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tdOrigin = interpreterProxy->firstIndexableField(dataBits);\r\tmOrigin = interpreterProxy->firstIndexableField(maskBits);\r\thighMask = 4278190080U;\r\tfor (i = 0; i <= (dataSize - 1); i += 1) {\r\t\tdata = dOrigin[i];\r\t\tif (data == 0) {\r\t\t\talpha = 0;\r\t\t} else {\r\t\t\talpha = ((sqInt)((255.0 / maxLog) * (log(data))));\r\t\t}\r\t\tif (alpha > 255) {\r\t\t\talpha = 255;\r\t\t}\r\t\tmOrigin[i] = (((alpha << 24) & highMask) | pixel);\r\t}\r\tinterpreterProxy->pop(4);\r}\r\rEXPORT(sqInt) makeTurtlesMap(void) {\r    sqInt height;\r    sqInt index;\r    unsigned int *map;\r    sqInt mapIndex;\r    sqInt mapOop;\r    sqInt size;\r    unsigned int *whoArray;\r    sqInt whoOop;\r    sqInt width;\r    sqInt x;\r    float *xArray;\r    sqInt xOop;\r    sqInt y;\r    float *yArray;\r    sqInt yOop;\r\r\theight = interpreterProxy->stackIntegerValue(0);\r\twidth = interpreterProxy->stackIntegerValue(1);\r\tyOop = interpreterProxy->stackValue(2);\r\txOop = interpreterProxy->stackValue(3);\r\twhoOop = interpreterProxy->stackValue(4);\r\tmapOop = interpreterProxy->stackValue(5);\r\tif (!(interpreterProxy->isWords(yOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(xOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(whoOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(mapOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tsize = interpreterProxy->slotSizeOf(whoOop);\r\tif ((interpreterProxy->slotSizeOf(xOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->slotSizeOf(yOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->slotSizeOf(mapOop)) != (height * width)) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\txArray = interpreterProxy->firstIndexableField(xOop);\r\tyArray = interpreterProxy->firstIndexableField(yOop);\r\twhoArray = interpreterProxy->firstIndexableField(whoOop);\r\tmap = interpreterProxy->firstIndexableField(mapOop);\r\tfor (index = 0; index <= ((height * width) - 1); index += 1) {\r\t\tmap[index] = 0;\r\t}\r\tfor (index = 0; index <= (size - 1); index += 1) {\r\t\tx = xArray[index];\r\t\ty = yArray[index];\r\t\tmapIndex = (width * y) + x;\r\t\tif ((mapIndex >= 0) && (mapIndex < (height * width))) {\r\t\t\tmap[mapIndex] = (whoArray[index]);\r\t\t}\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(6);\r}\r\rstatic sqInt msg(char *s) {\r\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\r}\r\rEXPORT(sqInt) primPixelAtXY(void) {\r    unsigned int *bits;\r    sqInt bitsOop;\r    sqInt height;\r    sqInt index;\r    sqInt ret;\r    sqInt width;\r    sqInt x;\r    double xPos;\r    sqInt y;\r    double yPos;\r\r\theight = interpreterProxy->stackIntegerValue(0);\r\twidth = interpreterProxy->stackIntegerValue(1);\r\tyPos = interpreterProxy->stackFloatValue(2);\r\txPos = interpreterProxy->stackFloatValue(3);\r\tbitsOop = interpreterProxy->stackValue(4);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(bitsOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->slotSizeOf(bitsOop)) != (height * width)) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tx = xPos;\r\ty = yPos;\r\tbits = interpreterProxy->firstIndexableField(bitsOop);\r\tif ((((x >= 0) && (x < width)) && (y >= 0)) && (y < height)) {\r\t\tindex = (y * width) + x;\r\t\tret = bits[index];\r\t} else {\r\t\tret = 0;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(6);\r\tinterpreterProxy->pushInteger(ret);\r}\r\rEXPORT(sqInt) primPixelAtXYPut(void) {\r    unsigned int *bits;\r    sqInt bitsOop;\r    sqInt height;\r    sqInt index;\r    sqInt v;\r    sqInt value;\r    sqInt width;\r    sqInt x;\r    double xPos;\r    sqInt y;\r    double yPos;\r\r\theight = interpreterProxy->stackIntegerValue(0);\r\twidth = interpreterProxy->stackIntegerValue(1);\r\tvalue = interpreterProxy->stackIntegerValue(2);\r\tyPos = interpreterProxy->stackFloatValue(3);\r\txPos = interpreterProxy->stackFloatValue(4);\r\tbitsOop = interpreterProxy->stackValue(5);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(bitsOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->slotSizeOf(bitsOop)) != (height * width)) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tx = xPos;\r\ty = yPos;\r\tv = value;\r\tif (v > 1073741823) {\r\t\tv = 1073741823;\r\t}\r\tif (v < 0) {\r\t\tv = 0;\r\t}\r\tbits = interpreterProxy->firstIndexableField(bitsOop);\r\tif ((((x >= 0) && (x < width)) && (y >= 0)) && (y < height)) {\r\t\tindex = (y * width) + x;\r\t\tbits[index] = v;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(6);\r}\r\rEXPORT(sqInt) primPixelsAtXY(void) {\r    unsigned int *bits;\r    sqInt bitsHeight;\r    sqInt bitsIndex;\r    sqInt bitsOop;\r    sqInt bitsWidth;\r    unsigned int *destWords;\r    sqInt destWordsOop;\r    sqInt i;\r    sqInt size;\r    sqInt x;\r    float *xArray;\r    sqInt xArrayOop;\r    sqInt y;\r    float *yArray;\r    sqInt yArrayOop;\r\r\tdestWordsOop = interpreterProxy->stackValue(0);\r\tbitsHeight = interpreterProxy->stackIntegerValue(1);\r\tbitsWidth = interpreterProxy->stackIntegerValue(2);\r\tbitsOop = interpreterProxy->stackValue(3);\r\tyArrayOop = interpreterProxy->stackValue(4);\r\txArrayOop = interpreterProxy->stackValue(5);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(destWordsOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(xArrayOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(yArrayOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(bitsOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((bitsHeight * bitsWidth) != (interpreterProxy->slotSizeOf(bitsOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tsize = interpreterProxy->slotSizeOf(xArrayOop);\r\tif ((interpreterProxy->slotSizeOf(yArrayOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->slotSizeOf(destWordsOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\txArray = interpreterProxy->firstIndexableField(xArrayOop);\r\tyArray = interpreterProxy->firstIndexableField(yArrayOop);\r\tdestWords = interpreterProxy->firstIndexableField(destWordsOop);\r\tbits = interpreterProxy->firstIndexableField(bitsOop);\r\tfor (i = 0; i <= (size - 1); i += 1) {\r\t\tx = ((int) (xArray[i]));\r\t\t;\r\t\ty = ((int) (yArray[i]));\r\t\t;\r\t\tif (((x >= 0) && (y >= 0)) && ((x < bitsWidth) && (y < bitsHeight))) {\r\t\t\tbitsIndex = (y * bitsWidth) + x;\r\t\t\tdestWords[i] = (bits[bitsIndex]);\r\t\t}\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(6);\r}\r\rEXPORT(sqInt) primScalarForward(void) {\r    sqInt bottomEdgeMode;\r    double destHeight;\r    double destWidth;\r    double dist;\r    float *headingArray;\r    sqInt headingOop;\r    sqInt i;\r    sqInt index;\r    sqInt leftEdgeMode;\r    double newX;\r    double newY;\r    sqInt rightEdgeMode;\r    sqInt size;\r    sqInt topEdgeMode;\r    double val;\r    float *xArray;\r    sqInt xOop;\r    float *yArray;\r    sqInt yOop;\r    double headingRadians;\r    double newX1;\r    double newY1;\r\r\tbottomEdgeMode = interpreterProxy->stackIntegerValue(0);\r\ttopEdgeMode = interpreterProxy->stackIntegerValue(1);\r\trightEdgeMode = interpreterProxy->stackIntegerValue(2);\r\tleftEdgeMode = interpreterProxy->stackIntegerValue(3);\r\tdestHeight = interpreterProxy->stackFloatValue(4);\r\tdestWidth = interpreterProxy->stackFloatValue(5);\r\tval = interpreterProxy->stackFloatValue(6);\r\theadingOop = interpreterProxy->stackValue(7);\r\tyOop = interpreterProxy->stackValue(8);\r\txOop = interpreterProxy->stackValue(9);\r\tindex = interpreterProxy->stackIntegerValue(10);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(xOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(yOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(headingOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tsize = interpreterProxy->slotSizeOf(xOop);\r\tif ((interpreterProxy->slotSizeOf(yOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->slotSizeOf(headingOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\txArray = interpreterProxy->firstIndexableField(xOop);\r\tyArray = interpreterProxy->firstIndexableField(yOop);\r\theadingArray = interpreterProxy->firstIndexableField(headingOop);\r\tdist = val;\r\ti = index - 1;\r\tnewX = (xArray[i]) + (dist * (cos(headingArray[i])));\r\tnewY = (yArray[i]) - (dist * (sin(headingArray[i])));\r\t/* begin scalarXAt:xArray:headingArray:value:destWidth:leftEdgeMode:rightEdgeMode: */\r\tnewX1 = newX;\r\tif (newX1 < 0.0) {\r\t\tif (leftEdgeMode == 1) {\r\t\t\tnewX1 += destWidth;\r\t\t}\r\t\tif (leftEdgeMode == 2) {\r\t\t\tnewX1 = 0.0;\r\t\t}\r\t\tif (leftEdgeMode == 3) {\r\t\t\tnewX1 = 0.0 - newX1;\r\t\t\theadingRadians = headingArray[i];\r\t\t\tif (headingRadians < 3.141592653589793) {\r\t\t\t\theadingArray[i] = (3.141592653589793 - headingRadians);\r\t\t\t} else {\r\t\t\t\theadingArray[i] = (9.42477796076938 - headingRadians);\r\t\t\t}\r\t\t}\r\t}\r\tif (newX1 >= destWidth) {\r\t\tif (rightEdgeMode == 1) {\r\t\t\tnewX1 -= destWidth;\r\t\t}\r\t\tif (rightEdgeMode == 2) {\r\t\t\tnewX1 = destWidth - 1.0e-6;\r\t\t}\r\t\tif (rightEdgeMode == 3) {\r\t\t\tnewX1 = (destWidth - 1.0e-6) - (newX1 - destWidth);\r\t\t\theadingRadians = headingArray[i];\r\t\t\tif (headingRadians < 3.141592653589793) {\r\t\t\t\theadingArray[i] = (3.141592653589793 - headingRadians);\r\t\t\t} else {\r\t\t\t\theadingArray[i] = (9.42477796076938 - headingRadians);\r\t\t\t}\r\t\t}\r\t}\r\txArray[i] = newX1;\r\t/* begin scalarYAt:yArray:headingArray:value:destHeight:topEdgeMode:bottomEdgeMode: */\r\tnewY1 = newY;\r\tif (newY1 < 0.0) {\r\t\tif (topEdgeMode == 1) {\r\t\t\tnewY1 += destHeight;\r\t\t}\r\t\tif (topEdgeMode == 2) {\r\t\t\tnewY1 = 0.0;\r\t\t}\r\t\tif (topEdgeMode == 3) {\r\t\t\tnewY1 = 0.0 - newY1;\r\t\t\theadingArray[i] = (6.283185307179586 - (headingArray[i]));\r\t\t}\r\t}\r\tif (newY1 >= destHeight) {\r\t\tif (bottomEdgeMode == 1) {\r\t\t\tnewY1 -= destHeight;\r\t\t}\r\t\tif (bottomEdgeMode == 2) {\r\t\t\tnewY1 = destHeight - 1.0e-6;\r\t\t}\r\t\tif (bottomEdgeMode == 3) {\r\t\t\tnewY1 = (destHeight - 1.0e-6) - (newY1 - destHeight);\r\t\t\theadingArray[i] = (6.283185307179586 - (headingArray[i]));\r\t\t}\r\t}\r\tyArray[i] = newY1;\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(11);\r}\r\rEXPORT(sqInt) primSetPixelsAtXY(void) {\r    unsigned int *bits;\r    sqInt bitsHeight;\r    sqInt bitsIndex;\r    sqInt bitsOop;\r    sqInt bitsWidth;\r    float *floatsValue;\r    sqInt fv;\r    sqInt i;\r    unsigned int intValue;\r    sqInt isValueInt;\r    sqInt isValueWordArray;\r    unsigned char *pArray;\r    sqInt pArrayOop;\r    sqInt size;\r    unsigned int value;\r    sqInt valueOop;\r    unsigned int *wordsValue;\r    sqInt x;\r    float *xArray;\r    sqInt xArrayOop;\r    sqInt y;\r    float *yArray;\r    sqInt yArrayOop;\r\r\tvalueOop = interpreterProxy->stackValue(0);\r\tbitsHeight = interpreterProxy->stackIntegerValue(1);\r\tbitsWidth = interpreterProxy->stackIntegerValue(2);\r\tbitsOop = interpreterProxy->stackValue(3);\r\tyArrayOop = interpreterProxy->stackValue(4);\r\txArrayOop = interpreterProxy->stackValue(5);\r\tpArrayOop = interpreterProxy->stackValue(6);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isBytes(pArrayOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(xArrayOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(yArrayOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(bitsOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((bitsHeight * bitsWidth) != (interpreterProxy->slotSizeOf(bitsOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tsize = interpreterProxy->slotSizeOf(xArrayOop);\r\tif ((interpreterProxy->slotSizeOf(pArrayOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->slotSizeOf(yArrayOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tpArray = interpreterProxy->firstIndexableField(pArrayOop);\r\txArray = interpreterProxy->firstIndexableField(xArrayOop);\r\tyArray = interpreterProxy->firstIndexableField(yArrayOop);\r\tisValueInt = (valueOop & 1);\r\tif (isValueInt) {\r\t\tintValue = (valueOop >> 1);\r\t\tvalue = intValue;\r\t} else {\r\t\tif ((interpreterProxy->slotSizeOf(valueOop)) != size) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t\tisValueWordArray = interpreterProxy->isMemberOf(valueOop, \"WordArray\");\r\t\tif (isValueWordArray) {\r\t\t\twordsValue = interpreterProxy->firstIndexableField(valueOop);\r\t\t} else {\r\t\t\tfloatsValue = interpreterProxy->firstIndexableField(valueOop);\r\t\t}\r\t}\r\tbits = interpreterProxy->firstIndexableField(bitsOop);\r\tfor (i = 0; i <= (size - 1); i += 1) {\r\t\tif ((pArray[i]) == 1) {\r\t\t\tx = ((int) (xArray[i]));\r\t\t\t;\r\t\t\ty = ((int) (yArray[i]));\r\t\t\t;\r\t\t\tif (((x >= 0) && (y >= 0)) && ((x < bitsWidth) && (y < bitsHeight))) {\r\t\t\t\tbitsIndex = (y * bitsWidth) + x;\r\t\t\t\tif (isValueInt) {\r\t\t\t\t\tbits[bitsIndex] = value;\r\t\t\t\t} else {\r\t\t\t\t\tif (isValueWordArray) {\r\t\t\t\t\t\tbits[bitsIndex] = (wordsValue[i]);\r\t\t\t\t\t} else {\r\t\t\t\t\t\tfv = floatsValue[i];\r\t\t\t\t\t\t;\r\t\t\t\t\t\tbits[bitsIndex] = fv;\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(7);\r}\r\rEXPORT(sqInt) primTurtlesForward(void) {\r    sqInt bottomEdgeMode;\r    double destHeight;\r    double destWidth;\r    double dist;\r    float *headingArray;\r    sqInt headingOop;\r    sqInt i;\r    sqInt isValVector;\r    sqInt leftEdgeMode;\r    double newX;\r    double newY;\r    unsigned char *pArray;\r    sqInt pOop;\r    sqInt rightEdgeMode;\r    sqInt size;\r    sqInt topEdgeMode;\r    double val;\r    float *valArray;\r    sqInt valOop;\r    float *xArray;\r    sqInt xOop;\r    float *yArray;\r    sqInt yOop;\r    double headingRadians;\r    double newX1;\r    double newY1;\r\r\tbottomEdgeMode = interpreterProxy->stackIntegerValue(0);\r\ttopEdgeMode = interpreterProxy->stackIntegerValue(1);\r\trightEdgeMode = interpreterProxy->stackIntegerValue(2);\r\tleftEdgeMode = interpreterProxy->stackIntegerValue(3);\r\tdestHeight = interpreterProxy->stackFloatValue(4);\r\tdestWidth = interpreterProxy->stackFloatValue(5);\r\tvalOop = interpreterProxy->stackValue(6);\r\theadingOop = interpreterProxy->stackValue(7);\r\tyOop = interpreterProxy->stackValue(8);\r\txOop = interpreterProxy->stackValue(9);\r\tpOop = interpreterProxy->stackValue(10);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isBytes(pOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(xOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(yOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(headingOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (interpreterProxy->isFloatObject(valOop)) {\r\t\tisValVector = 0;\r\t} else {\r\t\tif (interpreterProxy->isWords(valOop)) {\r\t\t\tisValVector = 1;\r\t\t} else {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tsize = interpreterProxy->slotSizeOf(xOop);\r\tif ((interpreterProxy->slotSizeOf(yOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->slotSizeOf(headingOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->slotSizeOf(pOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (isValVector) {\r\t\tif ((interpreterProxy->slotSizeOf(valOop)) != size) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tpArray = interpreterProxy->firstIndexableField(pOop);\r\txArray = interpreterProxy->firstIndexableField(xOop);\r\tyArray = interpreterProxy->firstIndexableField(yOop);\r\theadingArray = interpreterProxy->firstIndexableField(headingOop);\r\tif (isValVector) {\r\t\tvalArray = interpreterProxy->firstIndexableField(valOop);\r\t} else {\r\t\tval = interpreterProxy->floatValueOf(valOop);\r\t}\r\tfor (i = 0; i <= (size - 1); i += 1) {\r\t\tif ((pArray[i]) == 1) {\r\t\t\tif (isValVector) {\r\t\t\t\tdist = valArray[i];\r\t\t\t} else {\r\t\t\t\tdist = val;\r\t\t\t}\r\t\t\tnewX = (xArray[i]) + (dist * (cos(headingArray[i])));\r\t\t\tnewY = (yArray[i]) - (dist * (sin(headingArray[i])));\r\t\t\t/* begin scalarXAt:xArray:headingArray:value:destWidth:leftEdgeMode:rightEdgeMode: */\r\t\t\tnewX1 = newX;\r\t\t\tif (newX1 < 0.0) {\r\t\t\t\tif (leftEdgeMode == 1) {\r\t\t\t\t\tnewX1 += destWidth;\r\t\t\t\t}\r\t\t\t\tif (leftEdgeMode == 2) {\r\t\t\t\t\tnewX1 = 0.0;\r\t\t\t\t}\r\t\t\t\tif (leftEdgeMode == 3) {\r\t\t\t\t\tnewX1 = 0.0 - newX1;\r\t\t\t\t\theadingRadians = headingArray[i];\r\t\t\t\t\tif (headingRadians < 3.141592653589793) {\r\t\t\t\t\t\theadingArray[i] = (3.141592653589793 - headingRadians);\r\t\t\t\t\t} else {\r\t\t\t\t\t\theadingArray[i] = (9.42477796076938 - headingRadians);\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t}\r\t\t\tif (newX1 >= destWidth) {\r\t\t\t\tif (rightEdgeMode == 1) {\r\t\t\t\t\tnewX1 -= destWidth;\r\t\t\t\t}\r\t\t\t\tif (rightEdgeMode == 2) {\r\t\t\t\t\tnewX1 = destWidth - 1.0e-6;\r\t\t\t\t}\r\t\t\t\tif (rightEdgeMode == 3) {\r\t\t\t\t\tnewX1 = (destWidth - 1.0e-6) - (newX1 - destWidth);\r\t\t\t\t\theadingRadians = headingArray[i];\r\t\t\t\t\tif (headingRadians < 3.141592653589793) {\r\t\t\t\t\t\theadingArray[i] = (3.141592653589793 - headingRadians);\r\t\t\t\t\t} else {\r\t\t\t\t\t\theadingArray[i] = (9.42477796076938 - headingRadians);\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t}\r\t\t\txArray[i] = newX1;\r\t\t\t/* begin scalarYAt:yArray:headingArray:value:destHeight:topEdgeMode:bottomEdgeMode: */\r\t\t\tnewY1 = newY;\r\t\t\tif (newY1 < 0.0) {\r\t\t\t\tif (topEdgeMode == 1) {\r\t\t\t\t\tnewY1 += destHeight;\r\t\t\t\t}\r\t\t\t\tif (topEdgeMode == 2) {\r\t\t\t\t\tnewY1 = 0.0;\r\t\t\t\t}\r\t\t\t\tif (topEdgeMode == 3) {\r\t\t\t\t\tnewY1 = 0.0 - newY1;\r\t\t\t\t\theadingArray[i] = (6.283185307179586 - (headingArray[i]));\r\t\t\t\t}\r\t\t\t}\r\t\t\tif (newY1 >= destHeight) {\r\t\t\t\tif (bottomEdgeMode == 1) {\r\t\t\t\t\tnewY1 -= destHeight;\r\t\t\t\t}\r\t\t\t\tif (bottomEdgeMode == 2) {\r\t\t\t\t\tnewY1 = destHeight - 1.0e-6;\r\t\t\t\t}\r\t\t\t\tif (bottomEdgeMode == 3) {\r\t\t\t\t\tnewY1 = (destHeight - 1.0e-6) - (newY1 - destHeight);\r\t\t\t\t\theadingArray[i] = (6.283185307179586 - (headingArray[i]));\r\t\t\t\t}\r\t\t\t}\r\t\t\tyArray[i] = newY1;\r\t\t}\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(11);\r}\r\rEXPORT(sqInt) primUpHill(void) {\r    unsigned int *bits;\r    sqInt bitsOop;\r    sqInt endX;\r    sqInt endY;\r    sqInt height;\r    sqInt maxVal;\r    sqInt maxValX;\r    sqInt maxValY;\r    double ret;\r    sqInt rowOffset;\r    sqInt sniffRange;\r    sqInt startX;\r    sqInt startY;\r    double tH;\r    double tX;\r    double tY;\r    sqInt thisVal;\r    sqInt turtleX;\r    sqInt turtleY;\r    sqInt width;\r    sqInt x;\r    sqInt y;\r    double deg;\r    double degrees;\r\r\tsniffRange = interpreterProxy->stackIntegerValue(0);\r\theight = interpreterProxy->stackIntegerValue(1);\r\twidth = interpreterProxy->stackIntegerValue(2);\r\tbitsOop = interpreterProxy->stackValue(3);\r\ttH = interpreterProxy->stackFloatValue(4);\r\ttY = interpreterProxy->stackFloatValue(5);\r\ttX = interpreterProxy->stackFloatValue(6);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(bitsOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->slotSizeOf(bitsOop)) != (height * width)) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tbits = interpreterProxy->firstIndexableField(bitsOop);\r\tturtleX = tX;\r\tturtleY = tY;\r\tturtleX = ((turtleX < 0) ? 0 : turtleX);\r\tturtleY = ((turtleY < 0) ? 0 : turtleY);\r\tturtleX = ((turtleX < (width - 1)) ? turtleX : (width - 1));\r\tturtleY = ((turtleY < (height - 1)) ? turtleY : (height - 1));\r\tstartX = (((turtleX - sniffRange) < 0) ? 0 : (turtleX - sniffRange));\r\tendX = (((turtleX + sniffRange) < (width - 1)) ? (turtleX + sniffRange) : (width - 1));\r\tstartY = (((turtleY - sniffRange) < 0) ? 0 : (turtleY - sniffRange));\r\tendY = (((turtleY + sniffRange) < (height - 1)) ? (turtleY + sniffRange) : (height - 1));\r\tmaxVal = bits[(turtleY * width) + turtleX];\r\tmaxValX = -1;\r\tfor (y = startY; y <= endY; y += 1) {\r\t\trowOffset = y * width;\r\t\tfor (x = startX; x <= endX; x += 1) {\r\t\t\tthisVal = bits[rowOffset + x];\r\t\t\tif (thisVal > maxVal) {\r\t\t\t\tmaxValX = x;\r\t\t\t\tmaxValY = y;\r\t\t\t\tmaxVal = thisVal;\r\t\t\t}\r\t\t}\r\t}\r\tif (-1 == maxValX) {\r\t\t/* begin radiansToDegrees: */\r\t\tdegrees = tH / 0.0174532925199433;\r\t\tdeg = 90.0 - degrees;\r\t\tif (!(deg > 0.0)) {\r\t\t\tdeg += 360.0;\r\t\t}\r\t\tret = deg;\r\t} else {\r\t\tret = (degreesFromXy(((double) (maxValX - turtleX)), ((double) (maxValY - turtleY)))) + 90.0;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(8);\r\tinterpreterProxy->pushFloat(ret);\r}\r\rEXPORT(sqInt) primitiveAddArrays(void) {\r    sqInt argOop;\r    float *floatsArg;\r    float *floatsRcvr;\r    float *floatsResult;\r    sqInt i;\r    sqInt isArgWords;\r    sqInt isRcvrWords;\r    sqInt length;\r    sqInt rcvrOop;\r    sqInt resultOop;\r    unsigned int *wordsArg;\r    unsigned int *wordsRcvr;\r    unsigned int *wordsResult;\r\r\tresultOop = interpreterProxy->stackObjectValue(0);\r\targOop = interpreterProxy->stackObjectValue(1);\r\trcvrOop = interpreterProxy->stackObjectValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isWords(argOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(rcvrOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(resultOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = interpreterProxy->stSizeOf(argOop);\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(rcvrOop)));\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(resultOop)));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tisArgWords = interpreterProxy->isMemberOf(argOop, \"WordArray\");\r\tisRcvrWords = interpreterProxy->isMemberOf(rcvrOop, \"WordArray\");\r\tif (isArgWords && isRcvrWords) {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"WordArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t} else {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"KedamaFloatArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tif (isRcvrWords) {\r\t\tif (isArgWords) {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\twordsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\twordsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\twordsResult[i] = ((wordsRcvr[i]) + (wordsArg[i]));\r\t\t\t}\r\t\t} else {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((wordsRcvr[i]) + (floatsArg[i]));\r\t\t\t}\r\t\t}\r\t} else {\r\t\tif (isArgWords) {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\twordsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((floatsRcvr[i]) + (wordsArg[i]));\r\t\t\t}\r\t\t} else {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((floatsRcvr[i]) + (floatsArg[i]));\r\t\t\t}\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->push(resultOop);\r}\r\rEXPORT(sqInt) primitiveAddScalar(void) {\r    sqInt argOop;\r    double floatArg;\r    float *floatsRcvr;\r    float *floatsResult;\r    sqInt i;\r    int intArg;\r    sqInt isArgInt;\r    sqInt isRcvrWords;\r    sqInt length;\r    sqInt rcvrOop;\r    sqInt resultOop;\r    unsigned int *wordsRcvr;\r    unsigned int *wordsResult;\r\r\tresultOop = interpreterProxy->stackObjectValue(0);\r\targOop = interpreterProxy->stackValue(1);\r\trcvrOop = interpreterProxy->stackObjectValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isWords(rcvrOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(resultOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = interpreterProxy->stSizeOf(rcvrOop);\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(resultOop)));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tisArgInt = (argOop & 1);\r\tisRcvrWords = interpreterProxy->isMemberOf(rcvrOop, \"WordArray\");\r\tif (isArgInt && isRcvrWords) {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"WordArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t} else {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"KedamaFloatArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tif (isRcvrWords) {\r\t\tif (isArgInt) {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tintArg = (argOop >> 1);\r\t\t\twordsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\twordsResult[i] = ((wordsRcvr[i]) + intArg);\r\t\t\t}\r\t\t} else {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatArg = interpreterProxy->floatValueOf(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((wordsRcvr[i]) + floatArg);\r\t\t\t}\r\t\t}\r\t} else {\r\t\tif (isArgInt) {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tintArg = (argOop >> 1);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((floatsRcvr[i]) + intArg);\r\t\t\t}\r\t\t} else {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatArg = interpreterProxy->floatValueOf(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((floatsRcvr[i]) + floatArg);\r\t\t\t}\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->push(resultOop);\r}\r\rEXPORT(sqInt) primitiveAndByteArray(void) {\r    sqInt i;\r    sqInt length;\r    sqInt length1;\r    sqInt length2;\r    unsigned char *otherArray;\r    sqInt otherOop;\r    unsigned char *rcvrArray;\r    sqInt rcvrOop;\r\r\totherOop = interpreterProxy->stackObjectValue(0);\r\trcvrOop = interpreterProxy->stackValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isBytes(rcvrOop));\r\tinterpreterProxy->success(interpreterProxy->isBytes(otherOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength1 = interpreterProxy->stSizeOf(rcvrOop);\r\tlength2 = interpreterProxy->stSizeOf(otherOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = length1;\r\tif (length1 > length2) {\r\t\tlength = length2;\r\t}\r\totherArray = interpreterProxy->firstIndexableField(otherOop);\r\trcvrArray = interpreterProxy->firstIndexableField(rcvrOop);\r\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\trcvrArray[i] = (((rcvrArray[i]) + (otherArray[i])) == 2);\r\t}\r\tinterpreterProxy->pop(1);\r}\r\rEXPORT(sqInt) primitiveDivArrays(void) {\r    sqInt argOop;\r    float *floatsArg;\r    float *floatsRcvr;\r    float *floatsResult;\r    sqInt i;\r    sqInt isArgWords;\r    sqInt isRcvrWords;\r    sqInt length;\r    sqInt rcvrOop;\r    sqInt resultOop;\r    unsigned int *wordsArg;\r    unsigned int *wordsRcvr;\r    unsigned int *wordsResult;\r\r\tresultOop = interpreterProxy->stackObjectValue(0);\r\targOop = interpreterProxy->stackObjectValue(1);\r\trcvrOop = interpreterProxy->stackObjectValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isWords(argOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(rcvrOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(resultOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = interpreterProxy->stSizeOf(argOop);\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(rcvrOop)));\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(resultOop)));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tisArgWords = interpreterProxy->isMemberOf(argOop, \"WordArray\");\r\tisRcvrWords = interpreterProxy->isMemberOf(rcvrOop, \"WordArray\");\r\tif (isArgWords && isRcvrWords) {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"WordArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t} else {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"KedamaFloatArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tif (isRcvrWords) {\r\t\tif (isArgWords) {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\twordsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\twordsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\twordsResult[i] = ((wordsRcvr[i]) / (wordsArg[i]));\r\t\t\t}\r\t\t} else {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((wordsRcvr[i]) / (floatsArg[i]));\r\t\t\t}\r\t\t}\r\t} else {\r\t\tif (isArgWords) {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\twordsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((floatsRcvr[i]) / (wordsArg[i]));\r\t\t\t}\r\t\t} else {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((floatsRcvr[i]) / (floatsArg[i]));\r\t\t\t}\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->push(resultOop);\r}\r\rEXPORT(sqInt) primitiveDivScalar(void) {\r    sqInt argOop;\r    double floatArg;\r    float *floatsRcvr;\r    float *floatsResult;\r    sqInt i;\r    int intArg;\r    sqInt isArgInt;\r    sqInt isRcvrWords;\r    sqInt length;\r    sqInt rcvrOop;\r    sqInt resultOop;\r    unsigned int *wordsRcvr;\r    unsigned int *wordsResult;\r\r\tresultOop = interpreterProxy->stackObjectValue(0);\r\targOop = interpreterProxy->stackValue(1);\r\trcvrOop = interpreterProxy->stackObjectValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isWords(rcvrOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(resultOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = interpreterProxy->stSizeOf(rcvrOop);\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(resultOop)));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tisArgInt = (argOop & 1);\r\tisRcvrWords = interpreterProxy->isMemberOf(rcvrOop, \"WordArray\");\r\tif (isArgInt && isRcvrWords) {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"WordArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t} else {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"KedamaFloatArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tif (isRcvrWords) {\r\t\tif (isArgInt) {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tintArg = (argOop >> 1);\r\t\t\twordsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\twordsResult[i] = ((wordsRcvr[i]) / intArg);\r\t\t\t}\r\t\t} else {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatArg = interpreterProxy->floatValueOf(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((wordsRcvr[i]) / floatArg);\r\t\t\t}\r\t\t}\r\t} else {\r\t\tif (isArgInt) {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tintArg = (argOop >> 1);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((floatsRcvr[i]) / intArg);\r\t\t\t}\r\t\t} else {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatArg = interpreterProxy->floatValueOf(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((floatsRcvr[i]) / floatArg);\r\t\t\t}\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->push(resultOop);\r}\r\rEXPORT(sqInt) primitiveEQArrays(void) {\r    sqInt argOop;\r    unsigned char *bytesResult;\r    float *floatsArg;\r    float *floatsRcvr;\r    sqInt i;\r    sqInt isArgWords;\r    sqInt isRcvrWords;\r    sqInt length;\r    sqInt rcvrOop;\r    sqInt resultOop;\r    unsigned int *wordsArg;\r    unsigned int *wordsRcvr;\r\r\tresultOop = interpreterProxy->stackObjectValue(0);\r\targOop = interpreterProxy->stackObjectValue(1);\r\trcvrOop = interpreterProxy->stackObjectValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isWords(argOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(rcvrOop));\r\tinterpreterProxy->success(interpreterProxy->isBytes(resultOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = interpreterProxy->stSizeOf(argOop);\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(rcvrOop)));\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(resultOop)));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tisArgWords = interpreterProxy->isMemberOf(argOop, \"WordArray\");\r\tisRcvrWords = interpreterProxy->isMemberOf(rcvrOop, \"WordArray\");\r\tif (isRcvrWords) {\r\t\tif (isArgWords) {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\twordsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((wordsRcvr[i]) == (wordsArg[i]));\r\t\t\t}\r\t\t} else {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((wordsRcvr[i]) == (floatsArg[i]));\r\t\t\t}\r\t\t}\r\t} else {\r\t\tif (isArgWords) {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\twordsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((floatsRcvr[i]) == (wordsArg[i]));\r\t\t\t}\r\t\t} else {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((floatsRcvr[i]) == (floatsArg[i]));\r\t\t\t}\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->push(resultOop);\r}\r\rEXPORT(sqInt) primitiveEQScalar(void) {\r    sqInt argOop;\r    unsigned char *bytesResult;\r    double floatArg;\r    float *floatsRcvr;\r    sqInt i;\r    int intArg;\r    sqInt isArgInt;\r    sqInt isRcvrWords;\r    sqInt length;\r    sqInt rcvrOop;\r    sqInt resultOop;\r    unsigned int *wordsRcvr;\r\r\tresultOop = interpreterProxy->stackObjectValue(0);\r\targOop = interpreterProxy->stackValue(1);\r\trcvrOop = interpreterProxy->stackObjectValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isWords(rcvrOop));\r\tinterpreterProxy->success(interpreterProxy->isBytes(resultOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = interpreterProxy->stSizeOf(rcvrOop);\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(resultOop)));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tisArgInt = (argOop & 1);\r\tisRcvrWords = interpreterProxy->isMemberOf(rcvrOop, \"WordArray\");\r\tif (isRcvrWords) {\r\t\tif (isArgInt) {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tintArg = (argOop >> 1);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((wordsRcvr[i]) == intArg);\r\t\t\t}\r\t\t} else {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatArg = interpreterProxy->floatValueOf(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((wordsRcvr[i]) == floatArg);\r\t\t\t}\r\t\t}\r\t} else {\r\t\tif (isArgInt) {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tintArg = (argOop >> 1);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((floatsRcvr[i]) == intArg);\r\t\t\t}\r\t\t} else {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatArg = interpreterProxy->floatValueOf(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((floatsRcvr[i]) == floatArg);\r\t\t\t}\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->push(resultOop);\r}\r\rEXPORT(sqInt) primitiveGEArrays(void) {\r    sqInt argOop;\r    unsigned char *bytesResult;\r    float *floatsArg;\r    float *floatsRcvr;\r    sqInt i;\r    sqInt isArgWords;\r    sqInt isRcvrWords;\r    sqInt length;\r    sqInt rcvrOop;\r    sqInt resultOop;\r    unsigned int *wordsArg;\r    unsigned int *wordsRcvr;\r\r\tresultOop = interpreterProxy->stackObjectValue(0);\r\targOop = interpreterProxy->stackObjectValue(1);\r\trcvrOop = interpreterProxy->stackObjectValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isWords(argOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(rcvrOop));\r\tinterpreterProxy->success(interpreterProxy->isBytes(resultOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = interpreterProxy->stSizeOf(argOop);\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(rcvrOop)));\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(resultOop)));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tisArgWords = interpreterProxy->isMemberOf(argOop, \"WordArray\");\r\tisRcvrWords = interpreterProxy->isMemberOf(rcvrOop, \"WordArray\");\r\tif (isRcvrWords) {\r\t\tif (isArgWords) {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\twordsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((wordsRcvr[i]) >= (wordsArg[i]));\r\t\t\t}\r\t\t} else {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((wordsRcvr[i]) >= (floatsArg[i]));\r\t\t\t}\r\t\t}\r\t} else {\r\t\tif (isArgWords) {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\twordsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((floatsRcvr[i]) >= (wordsArg[i]));\r\t\t\t}\r\t\t} else {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((floatsRcvr[i]) >= (floatsArg[i]));\r\t\t\t}\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->push(resultOop);\r}\r\rEXPORT(sqInt) primitiveGEScalar(void) {\r    sqInt argOop;\r    unsigned char *bytesResult;\r    double floatArg;\r    float *floatsRcvr;\r    sqInt i;\r    int intArg;\r    sqInt isArgInt;\r    sqInt isRcvrWords;\r    sqInt length;\r    sqInt rcvrOop;\r    sqInt resultOop;\r    unsigned int *wordsRcvr;\r\r\tresultOop = interpreterProxy->stackObjectValue(0);\r\targOop = interpreterProxy->stackValue(1);\r\trcvrOop = interpreterProxy->stackObjectValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isWords(rcvrOop));\r\tinterpreterProxy->success(interpreterProxy->isBytes(resultOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = interpreterProxy->stSizeOf(rcvrOop);\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(resultOop)));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tisArgInt = (argOop & 1);\r\tisRcvrWords = interpreterProxy->isMemberOf(rcvrOop, \"WordArray\");\r\tif (isRcvrWords) {\r\t\tif (isArgInt) {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tintArg = (argOop >> 1);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((wordsRcvr[i]) >= intArg);\r\t\t\t}\r\t\t} else {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatArg = interpreterProxy->floatValueOf(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((wordsRcvr[i]) >= floatArg);\r\t\t\t}\r\t\t}\r\t} else {\r\t\tif (isArgInt) {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tintArg = (argOop >> 1);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((floatsRcvr[i]) >= intArg);\r\t\t\t}\r\t\t} else {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatArg = interpreterProxy->floatValueOf(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((floatsRcvr[i]) >= floatArg);\r\t\t\t}\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->push(resultOop);\r}\r\rEXPORT(sqInt) primitiveGTArrays(void) {\r    sqInt argOop;\r    unsigned char *bytesResult;\r    float *floatsArg;\r    float *floatsRcvr;\r    sqInt i;\r    sqInt isArgWords;\r    sqInt isRcvrWords;\r    sqInt length;\r    sqInt rcvrOop;\r    sqInt resultOop;\r    unsigned int *wordsArg;\r    unsigned int *wordsRcvr;\r\r\tresultOop = interpreterProxy->stackObjectValue(0);\r\targOop = interpreterProxy->stackObjectValue(1);\r\trcvrOop = interpreterProxy->stackObjectValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isWords(argOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(rcvrOop));\r\tinterpreterProxy->success(interpreterProxy->isBytes(resultOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = interpreterProxy->stSizeOf(argOop);\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(rcvrOop)));\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(resultOop)));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tisArgWords = interpreterProxy->isMemberOf(argOop, \"WordArray\");\r\tisRcvrWords = interpreterProxy->isMemberOf(rcvrOop, \"WordArray\");\r\tif (isRcvrWords) {\r\t\tif (isArgWords) {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\twordsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((wordsRcvr[i]) > (wordsArg[i]));\r\t\t\t}\r\t\t} else {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((wordsRcvr[i]) > (floatsArg[i]));\r\t\t\t}\r\t\t}\r\t} else {\r\t\tif (isArgWords) {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\twordsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((floatsRcvr[i]) > (wordsArg[i]));\r\t\t\t}\r\t\t} else {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((floatsRcvr[i]) > (floatsArg[i]));\r\t\t\t}\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->push(resultOop);\r}\r\rEXPORT(sqInt) primitiveGTScalar(void) {\r    sqInt argOop;\r    unsigned char *bytesResult;\r    double floatArg;\r    float *floatsRcvr;\r    sqInt i;\r    int intArg;\r    sqInt isArgInt;\r    sqInt isRcvrWords;\r    sqInt length;\r    sqInt rcvrOop;\r    sqInt resultOop;\r    unsigned int *wordsRcvr;\r\r\tresultOop = interpreterProxy->stackObjectValue(0);\r\targOop = interpreterProxy->stackValue(1);\r\trcvrOop = interpreterProxy->stackObjectValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isWords(rcvrOop));\r\tinterpreterProxy->success(interpreterProxy->isBytes(resultOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = interpreterProxy->stSizeOf(rcvrOop);\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(resultOop)));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tisArgInt = (argOop & 1);\r\tisRcvrWords = interpreterProxy->isMemberOf(rcvrOop, \"WordArray\");\r\tif (isRcvrWords) {\r\t\tif (isArgInt) {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tintArg = (argOop >> 1);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((wordsRcvr[i]) > intArg);\r\t\t\t}\r\t\t} else {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatArg = interpreterProxy->floatValueOf(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((wordsRcvr[i]) > floatArg);\r\t\t\t}\r\t\t}\r\t} else {\r\t\tif (isArgInt) {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tintArg = (argOop >> 1);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((floatsRcvr[i]) > intArg);\r\t\t\t}\r\t\t} else {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatArg = interpreterProxy->floatValueOf(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((floatsRcvr[i]) > floatArg);\r\t\t\t}\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->push(resultOop);\r}\r\rEXPORT(sqInt) primitiveLEArrays(void) {\r    sqInt argOop;\r    unsigned char *bytesResult;\r    float *floatsArg;\r    float *floatsRcvr;\r    sqInt i;\r    sqInt isArgWords;\r    sqInt isRcvrWords;\r    sqInt length;\r    sqInt rcvrOop;\r    sqInt resultOop;\r    unsigned int *wordsArg;\r    unsigned int *wordsRcvr;\r\r\tresultOop = interpreterProxy->stackObjectValue(0);\r\targOop = interpreterProxy->stackObjectValue(1);\r\trcvrOop = interpreterProxy->stackObjectValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isWords(argOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(rcvrOop));\r\tinterpreterProxy->success(interpreterProxy->isBytes(resultOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = interpreterProxy->stSizeOf(argOop);\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(rcvrOop)));\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(resultOop)));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tisArgWords = interpreterProxy->isMemberOf(argOop, \"WordArray\");\r\tisRcvrWords = interpreterProxy->isMemberOf(rcvrOop, \"WordArray\");\r\tif (isRcvrWords) {\r\t\tif (isArgWords) {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\twordsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((wordsRcvr[i]) <= (wordsArg[i]));\r\t\t\t}\r\t\t} else {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((wordsRcvr[i]) <= (floatsArg[i]));\r\t\t\t}\r\t\t}\r\t} else {\r\t\tif (isArgWords) {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\twordsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((floatsRcvr[i]) <= (wordsArg[i]));\r\t\t\t}\r\t\t} else {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((floatsRcvr[i]) <= (floatsArg[i]));\r\t\t\t}\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->push(resultOop);\r}\r\rEXPORT(sqInt) primitiveLEScalar(void) {\r    sqInt argOop;\r    unsigned char *bytesResult;\r    double floatArg;\r    float *floatsRcvr;\r    sqInt i;\r    int intArg;\r    sqInt isArgInt;\r    sqInt isRcvrWords;\r    sqInt length;\r    sqInt rcvrOop;\r    sqInt resultOop;\r    unsigned int *wordsRcvr;\r\r\tresultOop = interpreterProxy->stackObjectValue(0);\r\targOop = interpreterProxy->stackValue(1);\r\trcvrOop = interpreterProxy->stackObjectValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isWords(rcvrOop));\r\tinterpreterProxy->success(interpreterProxy->isBytes(resultOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = interpreterProxy->stSizeOf(rcvrOop);\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(resultOop)));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tisArgInt = (argOop & 1);\r\tisRcvrWords = interpreterProxy->isMemberOf(rcvrOop, \"WordArray\");\r\tif (isRcvrWords) {\r\t\tif (isArgInt) {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tintArg = (argOop >> 1);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((wordsRcvr[i]) <= intArg);\r\t\t\t}\r\t\t} else {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatArg = interpreterProxy->floatValueOf(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((wordsRcvr[i]) <= floatArg);\r\t\t\t}\r\t\t}\r\t} else {\r\t\tif (isArgInt) {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tintArg = (argOop >> 1);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((floatsRcvr[i]) <= intArg);\r\t\t\t}\r\t\t} else {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatArg = interpreterProxy->floatValueOf(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((floatsRcvr[i]) <= floatArg);\r\t\t\t}\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->push(resultOop);\r}\r\rEXPORT(sqInt) primitiveLTArrays(void) {\r    sqInt argOop;\r    unsigned char *bytesResult;\r    float *floatsArg;\r    float *floatsRcvr;\r    sqInt i;\r    sqInt isArgWords;\r    sqInt isRcvrWords;\r    sqInt length;\r    sqInt rcvrOop;\r    sqInt resultOop;\r    unsigned int *wordsArg;\r    unsigned int *wordsRcvr;\r\r\tresultOop = interpreterProxy->stackObjectValue(0);\r\targOop = interpreterProxy->stackObjectValue(1);\r\trcvrOop = interpreterProxy->stackObjectValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isWords(argOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(rcvrOop));\r\tinterpreterProxy->success(interpreterProxy->isBytes(resultOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = interpreterProxy->stSizeOf(argOop);\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(rcvrOop)));\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(resultOop)));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tisArgWords = interpreterProxy->isMemberOf(argOop, \"WordArray\");\r\tisRcvrWords = interpreterProxy->isMemberOf(rcvrOop, \"WordArray\");\r\tif (isRcvrWords) {\r\t\tif (isArgWords) {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\twordsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((wordsRcvr[i]) < (wordsArg[i]));\r\t\t\t}\r\t\t} else {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((wordsRcvr[i]) < (floatsArg[i]));\r\t\t\t}\r\t\t}\r\t} else {\r\t\tif (isArgWords) {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\twordsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((floatsRcvr[i]) < (wordsArg[i]));\r\t\t\t}\r\t\t} else {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((floatsRcvr[i]) < (floatsArg[i]));\r\t\t\t}\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->push(resultOop);\r}\r\rEXPORT(sqInt) primitiveLTScalar(void) {\r    sqInt argOop;\r    unsigned char *bytesResult;\r    double floatArg;\r    float *floatsRcvr;\r    sqInt i;\r    int intArg;\r    sqInt isArgInt;\r    sqInt isRcvrWords;\r    sqInt length;\r    sqInt rcvrOop;\r    sqInt resultOop;\r    unsigned int *wordsRcvr;\r\r\tresultOop = interpreterProxy->stackObjectValue(0);\r\targOop = interpreterProxy->stackValue(1);\r\trcvrOop = interpreterProxy->stackObjectValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isWords(rcvrOop));\r\tinterpreterProxy->success(interpreterProxy->isBytes(resultOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = interpreterProxy->stSizeOf(rcvrOop);\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(resultOop)));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tisArgInt = (argOop & 1);\r\tisRcvrWords = interpreterProxy->isMemberOf(rcvrOop, \"WordArray\");\r\tif (isRcvrWords) {\r\t\tif (isArgInt) {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tintArg = (argOop >> 1);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((wordsRcvr[i]) < intArg);\r\t\t\t}\r\t\t} else {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatArg = interpreterProxy->floatValueOf(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((wordsRcvr[i]) < floatArg);\r\t\t\t}\r\t\t}\r\t} else {\r\t\tif (isArgInt) {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tintArg = (argOop >> 1);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((floatsRcvr[i]) < intArg);\r\t\t\t}\r\t\t} else {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatArg = interpreterProxy->floatValueOf(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((floatsRcvr[i]) < floatArg);\r\t\t\t}\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->push(resultOop);\r}\r\rEXPORT(sqInt) primitiveMulArrays(void) {\r    sqInt argOop;\r    float *floatsArg;\r    float *floatsRcvr;\r    float *floatsResult;\r    sqInt i;\r    sqInt isArgWords;\r    sqInt isRcvrWords;\r    sqInt length;\r    sqInt rcvrOop;\r    sqInt resultOop;\r    unsigned int *wordsArg;\r    unsigned int *wordsRcvr;\r    unsigned int *wordsResult;\r\r\tresultOop = interpreterProxy->stackObjectValue(0);\r\targOop = interpreterProxy->stackObjectValue(1);\r\trcvrOop = interpreterProxy->stackObjectValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isWords(argOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(rcvrOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(resultOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = interpreterProxy->stSizeOf(argOop);\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(rcvrOop)));\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(resultOop)));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tisArgWords = interpreterProxy->isMemberOf(argOop, \"WordArray\");\r\tisRcvrWords = interpreterProxy->isMemberOf(rcvrOop, \"WordArray\");\r\tif (isArgWords && isRcvrWords) {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"WordArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t} else {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"KedamaFloatArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tif (isRcvrWords) {\r\t\tif (isArgWords) {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\twordsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\twordsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\twordsResult[i] = ((wordsRcvr[i]) * (wordsArg[i]));\r\t\t\t}\r\t\t} else {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((wordsRcvr[i]) * (floatsArg[i]));\r\t\t\t}\r\t\t}\r\t} else {\r\t\tif (isArgWords) {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\twordsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((floatsRcvr[i]) * (wordsArg[i]));\r\t\t\t}\r\t\t} else {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((floatsRcvr[i]) * (floatsArg[i]));\r\t\t\t}\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->push(resultOop);\r}\r\rEXPORT(sqInt) primitiveMulScalar(void) {\r    sqInt argOop;\r    double floatArg;\r    float *floatsRcvr;\r    float *floatsResult;\r    sqInt i;\r    int intArg;\r    sqInt isArgInt;\r    sqInt isRcvrWords;\r    sqInt length;\r    sqInt rcvrOop;\r    sqInt resultOop;\r    unsigned int *wordsRcvr;\r    unsigned int *wordsResult;\r\r\tresultOop = interpreterProxy->stackObjectValue(0);\r\targOop = interpreterProxy->stackValue(1);\r\trcvrOop = interpreterProxy->stackObjectValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isWords(rcvrOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(resultOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = interpreterProxy->stSizeOf(rcvrOop);\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(resultOop)));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tisArgInt = (argOop & 1);\r\tisRcvrWords = interpreterProxy->isMemberOf(rcvrOop, \"WordArray\");\r\tif (isArgInt && isRcvrWords) {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"WordArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t} else {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"KedamaFloatArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tif (isRcvrWords) {\r\t\tif (isArgInt) {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tintArg = (argOop >> 1);\r\t\t\twordsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\twordsResult[i] = ((wordsRcvr[i]) * intArg);\r\t\t\t}\r\t\t} else {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatArg = interpreterProxy->floatValueOf(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((wordsRcvr[i]) * floatArg);\r\t\t\t}\r\t\t}\r\t} else {\r\t\tif (isArgInt) {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tintArg = (argOop >> 1);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((floatsRcvr[i]) * intArg);\r\t\t\t}\r\t\t} else {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatArg = interpreterProxy->floatValueOf(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((floatsRcvr[i]) * floatArg);\r\t\t\t}\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->push(resultOop);\r}\r\rEXPORT(sqInt) primitiveNEArrays(void) {\r    sqInt argOop;\r    unsigned char *bytesResult;\r    float *floatsArg;\r    float *floatsRcvr;\r    sqInt i;\r    sqInt isArgWords;\r    sqInt isRcvrWords;\r    sqInt length;\r    sqInt rcvrOop;\r    sqInt resultOop;\r    unsigned int *wordsArg;\r    unsigned int *wordsRcvr;\r\r\tresultOop = interpreterProxy->stackObjectValue(0);\r\targOop = interpreterProxy->stackObjectValue(1);\r\trcvrOop = interpreterProxy->stackObjectValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isWords(argOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(rcvrOop));\r\tinterpreterProxy->success(interpreterProxy->isBytes(resultOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = interpreterProxy->stSizeOf(argOop);\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(rcvrOop)));\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(resultOop)));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tisArgWords = interpreterProxy->isMemberOf(argOop, \"WordArray\");\r\tisRcvrWords = interpreterProxy->isMemberOf(rcvrOop, \"WordArray\");\r\tif (isRcvrWords) {\r\t\tif (isArgWords) {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\twordsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((wordsRcvr[i]) != (wordsArg[i]));\r\t\t\t}\r\t\t} else {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((wordsRcvr[i]) != (floatsArg[i]));\r\t\t\t}\r\t\t}\r\t} else {\r\t\tif (isArgWords) {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\twordsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((floatsRcvr[i]) != (wordsArg[i]));\r\t\t\t}\r\t\t} else {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((floatsRcvr[i]) != (floatsArg[i]));\r\t\t\t}\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->push(resultOop);\r}\r\rEXPORT(sqInt) primitiveNEScalar(void) {\r    sqInt argOop;\r    unsigned char *bytesResult;\r    double floatArg;\r    float *floatsRcvr;\r    sqInt i;\r    int intArg;\r    sqInt isArgInt;\r    sqInt isRcvrWords;\r    sqInt length;\r    sqInt rcvrOop;\r    sqInt resultOop;\r    unsigned int *wordsRcvr;\r\r\tresultOop = interpreterProxy->stackObjectValue(0);\r\targOop = interpreterProxy->stackValue(1);\r\trcvrOop = interpreterProxy->stackObjectValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isWords(rcvrOop));\r\tinterpreterProxy->success(interpreterProxy->isBytes(resultOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = interpreterProxy->stSizeOf(rcvrOop);\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(resultOop)));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tisArgInt = (argOop & 1);\r\tisRcvrWords = interpreterProxy->isMemberOf(rcvrOop, \"WordArray\");\r\tif (isRcvrWords) {\r\t\tif (isArgInt) {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tintArg = (argOop >> 1);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((wordsRcvr[i]) != intArg);\r\t\t\t}\r\t\t} else {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatArg = interpreterProxy->floatValueOf(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((wordsRcvr[i]) != floatArg);\r\t\t\t}\r\t\t}\r\t} else {\r\t\tif (isArgInt) {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tintArg = (argOop >> 1);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((floatsRcvr[i]) != intArg);\r\t\t\t}\r\t\t} else {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatArg = interpreterProxy->floatValueOf(argOop);\r\t\t\tbytesResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tbytesResult[i] = ((floatsRcvr[i]) != floatArg);\r\t\t\t}\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->push(resultOop);\r}\r\rEXPORT(sqInt) primitiveNotByteArray(void) {\r    sqInt i;\r    sqInt length;\r    unsigned char *rcvrArray;\r    sqInt rcvrOop;\r\r\trcvrOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isBytes(rcvrOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = interpreterProxy->stSizeOf(rcvrOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\trcvrArray = interpreterProxy->firstIndexableField(rcvrOop);\r\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\tif ((rcvrArray[i]) == 0) {\r\t\t\trcvrArray[i] = 1;\r\t\t} else {\r\t\t\trcvrArray[i] = 0;\r\t\t}\r\t}\r}\r\rEXPORT(sqInt) primitiveOrByteArray(void) {\r    sqInt i;\r    sqInt length;\r    sqInt length1;\r    sqInt length2;\r    unsigned char *otherArray;\r    sqInt otherOop;\r    unsigned char *rcvrArray;\r    sqInt rcvrOop;\r\r\totherOop = interpreterProxy->stackObjectValue(0);\r\trcvrOop = interpreterProxy->stackValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isBytes(rcvrOop));\r\tinterpreterProxy->success(interpreterProxy->isBytes(otherOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength1 = interpreterProxy->stSizeOf(rcvrOop);\r\tlength2 = interpreterProxy->stSizeOf(otherOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = length1;\r\tif (length1 > length2) {\r\t\tlength = length2;\r\t}\r\totherArray = interpreterProxy->firstIndexableField(otherOop);\r\trcvrArray = interpreterProxy->firstIndexableField(rcvrOop);\r\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\trcvrArray[i] = (((rcvrArray[i]) + (otherArray[i])) > 0);\r\t}\r\tinterpreterProxy->pop(1);\r}\r\rEXPORT(sqInt) primitivePredicateAtAllPutBoolean(void) {\r    sqInt i;\r    unsigned char *predicates;\r    sqInt predicatesOop;\r    sqInt rcvrOop;\r    sqInt val;\r    sqInt valOop;\r    unsigned char *values;\r    sqInt valuesOop;\r\r\tvalOop = interpreterProxy->stackValue(0);\r\trcvrOop = interpreterProxy->stackObjectValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (interpreterProxy->isIntegerValue(valOop)) {\r\t\tval = (valOop >> 1);\r\t} else {\r\t\tval = interpreterProxy->booleanValueOf(valOop);\r\t}\r\tvaluesOop = interpreterProxy->fetchPointerofObject(1, rcvrOop);\r\tpredicatesOop = interpreterProxy->fetchPointerofObject(0, rcvrOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isBytes(predicatesOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isBytes(valuesOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tvalues = interpreterProxy->firstIndexableField(valuesOop);\r\tpredicates = interpreterProxy->firstIndexableField(predicatesOop);\r\tfor (i = 0; i <= ((interpreterProxy->stSizeOf(valuesOop)) - 1); i += 1) {\r\t\tif ((predicates[i]) == 1) {\r\t\t\tvalues[i] = val;\r\t\t}\r\t}\r\tinterpreterProxy->pop(1);\r}\r\rEXPORT(sqInt) primitivePredicateAtAllPutColor(void) {\r    sqInt i;\r    unsigned char *predicates;\r    sqInt predicatesOop;\r    sqInt rcvrOop;\r    unsigned int val;\r    unsigned int *values;\r    sqInt valuesOop;\r\r\tval = interpreterProxy->stackIntegerValue(0);\r\trcvrOop = interpreterProxy->stackObjectValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tval = val | 4278190080U;\r\tvaluesOop = interpreterProxy->fetchPointerofObject(1, rcvrOop);\r\tpredicatesOop = interpreterProxy->fetchPointerofObject(0, rcvrOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isBytes(predicatesOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(valuesOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tvalues = interpreterProxy->firstIndexableField(valuesOop);\r\tpredicates = interpreterProxy->firstIndexableField(predicatesOop);\r\tfor (i = 0; i <= ((interpreterProxy->stSizeOf(valuesOop)) - 1); i += 1) {\r\t\tif ((predicates[i]) == 1) {\r\t\t\tvalues[i] = val;\r\t\t}\r\t}\r\tinterpreterProxy->pop(1);\r}\r\rEXPORT(sqInt) primitivePredicateAtAllPutNumber(void) {\r    sqInt i;\r    unsigned char *predicates;\r    sqInt predicatesOop;\r    sqInt rcvrOop;\r    float val;\r    float *values;\r    sqInt valuesOop;\r\r\tval = interpreterProxy->stackFloatValue(0);\r\trcvrOop = interpreterProxy->stackObjectValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tvaluesOop = interpreterProxy->fetchPointerofObject(1, rcvrOop);\r\tpredicatesOop = interpreterProxy->fetchPointerofObject(0, rcvrOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isBytes(predicatesOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(valuesOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tvalues = interpreterProxy->firstIndexableField(valuesOop);\r\tpredicates = interpreterProxy->firstIndexableField(predicatesOop);\r\tfor (i = 0; i <= ((interpreterProxy->stSizeOf(valuesOop)) - 1); i += 1) {\r\t\tif ((predicates[i]) == 1) {\r\t\t\tvalues[i] = val;\r\t\t}\r\t}\r\tinterpreterProxy->pop(1);\r}\r\rEXPORT(sqInt) primitivePredicateAtAllPutObject(void) {\r    sqInt i;\r    unsigned char *predicates;\r    sqInt predicatesOop;\r    sqInt rcvrOop;\r    sqInt valOop;\r    int *values;\r    sqInt valuesOop;\r\r\tvalOop = interpreterProxy->stackValue(0);\r\trcvrOop = interpreterProxy->stackObjectValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tvaluesOop = interpreterProxy->fetchPointerofObject(1, rcvrOop);\r\tpredicatesOop = interpreterProxy->fetchPointerofObject(0, rcvrOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isBytes(predicatesOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isPointers(valuesOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tvalues = interpreterProxy->firstIndexableField(valuesOop);\r\tpredicates = interpreterProxy->firstIndexableField(predicatesOop);\r\tfor (i = 0; i <= ((interpreterProxy->stSizeOf(valuesOop)) - 1); i += 1) {\r\t\tif ((predicates[i]) == 1) {\r\t\t\tvalues[i] = valOop;\r\t\t}\r\t}\r\tinterpreterProxy->pop(1);\r}\r\rEXPORT(sqInt) primitivePredicateReplaceBytes(void) {\r    sqInt i;\r    unsigned char *predicates;\r    sqInt predicatesOop;\r    sqInt predicatesSize;\r    sqInt rcvrOop;\r    sqInt repOop;\r    sqInt repStart;\r    unsigned char *replacement;\r    sqInt replacementSize;\r    sqInt start;\r    sqInt stop;\r    unsigned char *values;\r    sqInt valuesOop;\r    sqInt valuesSize;\r\r\trepStart = interpreterProxy->stackIntegerValue(0);\r\trepOop = interpreterProxy->stackObjectValue(1);\r\tstop = interpreterProxy->stackIntegerValue(2);\r\tstart = interpreterProxy->stackIntegerValue(3);\r\trcvrOop = interpreterProxy->stackObjectValue(4);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tvaluesOop = interpreterProxy->fetchPointerofObject(1, rcvrOop);\r\tpredicatesOop = interpreterProxy->fetchPointerofObject(0, rcvrOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isBytes(predicatesOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!((interpreterProxy->isBytes(valuesOop)) && (interpreterProxy->isBytes(repOop)))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tvalues = interpreterProxy->firstIndexableField(valuesOop);\r\tpredicates = interpreterProxy->firstIndexableField(predicatesOop);\r\treplacement = interpreterProxy->firstIndexableField(repOop);\r\tvaluesSize = interpreterProxy->stSizeOf(valuesOop);\r\tpredicatesSize = interpreterProxy->stSizeOf(predicatesOop);\r\treplacementSize = interpreterProxy->stSizeOf(repOop);\r\tif (start > stop) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (start < 1) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (start > valuesSize) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (start > predicatesSize) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (stop > valuesSize) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (stop > predicatesSize) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (repStart < 1) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (repStart > replacementSize) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (((replacementSize - repStart) + 1) < ((stop - start) + 1)) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tfor (i = (start - 1); i <= (stop - 1); i += 1) {\r\t\tif ((predicates[i]) == 1) {\r\t\t\tvalues[i] = (replacement[(repStart + i) - start]);\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r}\r\rEXPORT(sqInt) primitivePredicateReplaceWords(void) {\r    float *floatReplacement;\r    float *floatValues;\r    unsigned int fv;\r    sqInt i;\r    unsigned char *predicates;\r    sqInt predicatesOop;\r    sqInt predicatesSize;\r    sqInt rIsFloat;\r    sqInt rcvrOop;\r    sqInt repOop;\r    sqInt repStart;\r    unsigned int *replacement;\r    sqInt replacementSize;\r    sqInt start;\r    sqInt stop;\r    sqInt vIsFloat;\r    unsigned int *values;\r    sqInt valuesOop;\r    sqInt valuesSize;\r\r\trepStart = interpreterProxy->stackIntegerValue(0);\r\trepOop = interpreterProxy->stackObjectValue(1);\r\tstop = interpreterProxy->stackIntegerValue(2);\r\tstart = interpreterProxy->stackIntegerValue(3);\r\trcvrOop = interpreterProxy->stackObjectValue(4);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tvaluesOop = interpreterProxy->fetchPointerofObject(1, rcvrOop);\r\tpredicatesOop = interpreterProxy->fetchPointerofObject(0, rcvrOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isBytes(predicatesOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(((interpreterProxy->isWords(valuesOop)) && (interpreterProxy->isWords(repOop))) || ((interpreterProxy->isPointers(valuesOop)) && (interpreterProxy->isPointers(repOop))))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tpredicates = interpreterProxy->firstIndexableField(predicatesOop);\r\tvaluesSize = interpreterProxy->stSizeOf(valuesOop);\r\tpredicatesSize = interpreterProxy->stSizeOf(predicatesOop);\r\treplacementSize = interpreterProxy->stSizeOf(repOop);\r\tif (start > stop) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (start < 1) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (start > valuesSize) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (start > predicatesSize) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (stop > valuesSize) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (stop > predicatesSize) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (repStart < 1) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (repStart > replacementSize) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (((replacementSize - repStart) + 1) < ((stop - start) + 1)) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tvIsFloat = interpreterProxy->isMemberOf(valuesOop, \"KedamaFloatArray\");\r\trIsFloat = interpreterProxy->isMemberOf(repOop, \"KedamaFloatArray\");\r\tif (vIsFloat && (rIsFloat)) {\r\t\tfloatValues = interpreterProxy->firstIndexableField(valuesOop);\r\t\tfloatReplacement = interpreterProxy->firstIndexableField(repOop);\r\t\tfor (i = (start - 1); i <= (stop - 1); i += 1) {\r\t\t\tif ((predicates[i]) == 1) {\r\t\t\t\tfloatValues[i] = (floatReplacement[(repStart + i) - start]);\r\t\t\t}\r\t\t}\r\t}\r\tif (vIsFloat && (!rIsFloat)) {\r\t\tfloatValues = interpreterProxy->firstIndexableField(valuesOop);\r\t\treplacement = interpreterProxy->firstIndexableField(repOop);\r\t\tfor (i = (start - 1); i <= (stop - 1); i += 1) {\r\t\t\tif ((predicates[i]) == 1) {\r\t\t\t\tfloatValues[i] = (replacement[(repStart + i) - start]);\r\t\t\t}\r\t\t}\r\t}\r\tif ((!vIsFloat) && (rIsFloat)) {\r\t\tvalues = interpreterProxy->firstIndexableField(valuesOop);\r\t\tfloatReplacement = interpreterProxy->firstIndexableField(repOop);\r\t\tfor (i = (start - 1); i <= (stop - 1); i += 1) {\r\t\t\tif ((predicates[i]) == 1) {\r\t\t\t\tfv = ((unsigned int) (floatReplacement[(repStart + i) - start]));\r\t\t\t\t;\r\t\t\t\tvalues[i] = fv;\r\t\t\t}\r\t\t}\r\t}\r\tif ((!vIsFloat) && (!rIsFloat)) {\r\t\tvalues = interpreterProxy->firstIndexableField(valuesOop);\r\t\treplacement = interpreterProxy->firstIndexableField(repOop);\r\t\tfor (i = (start - 1); i <= (stop - 1); i += 1) {\r\t\t\tif ((predicates[i]) == 1) {\r\t\t\t\tvalues[i] = (replacement[(repStart + i) - start]);\r\t\t\t}\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r}\r\rEXPORT(sqInt) primitiveRemArrays(void) {\r    sqInt argOop;\r    double floatArg;\r    double floatRcvr;\r    double floatResult;\r    float *floatsArg;\r    float *floatsRcvr;\r    float *floatsResult;\r    sqInt i;\r    sqInt isArgWords;\r    sqInt isRcvrWords;\r    sqInt length;\r    sqInt rcvrOop;\r    sqInt resultOop;\r    unsigned int wordArg;\r    unsigned int wordRcvr;\r    unsigned int wordResult;\r    unsigned int *wordsArg;\r    unsigned int *wordsRcvr;\r    unsigned int *wordsResult;\r\r\tresultOop = interpreterProxy->stackObjectValue(0);\r\targOop = interpreterProxy->stackObjectValue(1);\r\trcvrOop = interpreterProxy->stackObjectValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isWords(argOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(rcvrOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(resultOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = interpreterProxy->stSizeOf(argOop);\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(rcvrOop)));\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(resultOop)));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tisArgWords = interpreterProxy->isMemberOf(argOop, \"WordArray\");\r\tisRcvrWords = interpreterProxy->isMemberOf(rcvrOop, \"WordArray\");\r\tif (isArgWords && isRcvrWords) {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"WordArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t} else {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"KedamaFloatArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tif (isRcvrWords) {\r\t\tif (isArgWords) {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\twordsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\twordsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\twordRcvr = wordsRcvr[i];\r\t\t\t\twordArg = wordsArg[i];\r\r\t\t\t\t/* In this primitive, words are supposed to be unsigned. */\r\r\t\t\t\twordResult = wordRcvr % wordArg;\r\t\t\t\twordsResult[i] = wordResult;\r\t\t\t}\r\t\t} else {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\twordRcvr = wordsRcvr[i];\r\t\t\t\tfloatArg = floatsArg[i];\r\t\t\t\tfloatResult = wordRcvr / floatArg;\r\t\t\t\tfloatResult = floor(floatResult);\r\t\t\t\tfloatsResult[i] = (wordRcvr - (floatResult * floatArg));\r\t\t\t}\r\t\t}\r\t} else {\r\t\tif (isArgWords) {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\twordsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatRcvr = floatsRcvr[i];\r\t\t\t\twordArg = wordsArg[i];\r\t\t\t\tfloatResult = floatRcvr / wordArg;\r\t\t\t\tfloatResult = floor(floatResult);\r\t\t\t\tfloatsResult[i] = (floatRcvr - (floatResult * wordArg));\r\t\t\t}\r\t\t} else {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatRcvr = floatsRcvr[i];\r\t\t\t\tfloatArg = floatsArg[i];\r\t\t\t\tfloatResult = floatRcvr / floatArg;\r\t\t\t\tfloatResult = floor(floatResult);\r\t\t\t\tfloatsResult[i] = (floatRcvr - (floatResult * floatArg));\r\t\t\t}\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->push(resultOop);\r}\r\rEXPORT(sqInt) primitiveRemScalar(void) {\r    sqInt argOop;\r    double floatArg;\r    double floatRcvr;\r    double floatResult;\r    float *floatsRcvr;\r    float *floatsResult;\r    sqInt i;\r    int intArg;\r    sqInt isArgInt;\r    sqInt isRcvrWords;\r    sqInt length;\r    sqInt rcvrOop;\r    sqInt resultOop;\r    unsigned int wordRcvr;\r    unsigned int *wordsRcvr;\r    unsigned int *wordsResult;\r\r\tresultOop = interpreterProxy->stackObjectValue(0);\r\targOop = interpreterProxy->stackValue(1);\r\trcvrOop = interpreterProxy->stackObjectValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isWords(rcvrOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(resultOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = interpreterProxy->stSizeOf(rcvrOop);\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(resultOop)));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tisArgInt = (argOop & 1);\r\tisRcvrWords = interpreterProxy->isMemberOf(rcvrOop, \"WordArray\");\r\tif (isArgInt && isRcvrWords) {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"WordArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t} else {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"KedamaFloatArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tif (isRcvrWords) {\r\t\tif (isArgInt) {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tintArg = (argOop >> 1);\r\t\t\twordsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\twordsResult[i] = ((wordsRcvr[i]) % intArg);\r\t\t\t}\r\t\t} else {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatArg = interpreterProxy->floatValueOf(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\twordRcvr = wordsRcvr[i];\r\t\t\t\tfloatResult = wordRcvr / floatArg;\r\t\t\t\tfloatResult = floor(floatResult);\r\t\t\t\tfloatsResult[i] = (wordRcvr - (floatResult * floatArg));\r\t\t\t}\r\t\t}\r\t} else {\r\t\tif (isArgInt) {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tintArg = (argOop >> 1);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatRcvr = floatsRcvr[i];\r\t\t\t\tfloatResult = floatRcvr / intArg;\r\t\t\t\tfloatResult = floor(floatResult);\r\t\t\t\tfloatsResult[i] = (floatRcvr - (floatResult * intArg));\r\t\t\t}\r\t\t} else {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatArg = interpreterProxy->floatValueOf(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatRcvr = floatsRcvr[i];\r\t\t\t\tfloatResult = floatRcvr / floatArg;\r\t\t\t\tfloatResult = floor(floatResult);\r\t\t\t\tfloatsResult[i] = (floatRcvr - (floatResult * floatArg));\r\t\t\t}\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->push(resultOop);\r}\r\rEXPORT(sqInt) primitiveSubArrays(void) {\r    sqInt argOop;\r    float *floatsArg;\r    float *floatsRcvr;\r    float *floatsResult;\r    sqInt i;\r    sqInt isArgWords;\r    sqInt isRcvrWords;\r    sqInt length;\r    sqInt rcvrOop;\r    sqInt resultOop;\r    unsigned int *wordsArg;\r    unsigned int *wordsRcvr;\r    unsigned int *wordsResult;\r\r\tresultOop = interpreterProxy->stackObjectValue(0);\r\targOop = interpreterProxy->stackObjectValue(1);\r\trcvrOop = interpreterProxy->stackObjectValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isWords(argOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(rcvrOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(resultOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = interpreterProxy->stSizeOf(argOop);\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(rcvrOop)));\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(resultOop)));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tisArgWords = interpreterProxy->isMemberOf(argOop, \"WordArray\");\r\tisRcvrWords = interpreterProxy->isMemberOf(rcvrOop, \"WordArray\");\r\tif (isArgWords && isRcvrWords) {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"WordArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t} else {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"KedamaFloatArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tif (isRcvrWords) {\r\t\tif (isArgWords) {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\twordsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\twordsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\twordsResult[i] = ((wordsRcvr[i]) - (wordsArg[i]));\r\t\t\t}\r\t\t} else {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((wordsRcvr[i]) - (floatsArg[i]));\r\t\t\t}\r\t\t}\r\t} else {\r\t\tif (isArgWords) {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\twordsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((floatsRcvr[i]) - (wordsArg[i]));\r\t\t\t}\r\t\t} else {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatsArg = interpreterProxy->firstIndexableField(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((floatsRcvr[i]) - (floatsArg[i]));\r\t\t\t}\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->push(resultOop);\r}\r\rEXPORT(sqInt) primitiveSubScalar(void) {\r    sqInt argOop;\r    double floatArg;\r    float *floatsRcvr;\r    float *floatsResult;\r    sqInt i;\r    int intArg;\r    sqInt isArgInt;\r    sqInt isRcvrWords;\r    sqInt length;\r    sqInt rcvrOop;\r    sqInt resultOop;\r    unsigned int *wordsRcvr;\r    unsigned int *wordsResult;\r\r\tresultOop = interpreterProxy->stackObjectValue(0);\r\targOop = interpreterProxy->stackValue(1);\r\trcvrOop = interpreterProxy->stackObjectValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->success(interpreterProxy->isWords(rcvrOop));\r\tinterpreterProxy->success(interpreterProxy->isWords(resultOop));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlength = interpreterProxy->stSizeOf(rcvrOop);\r\tinterpreterProxy->success(length == (interpreterProxy->stSizeOf(resultOop)));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tisArgInt = (argOop & 1);\r\tisRcvrWords = interpreterProxy->isMemberOf(rcvrOop, \"WordArray\");\r\tif (isArgInt && isRcvrWords) {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"WordArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t} else {\r\t\tif (!(interpreterProxy->isMemberOf(resultOop, \"KedamaFloatArray\"))) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tif (isRcvrWords) {\r\t\tif (isArgInt) {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tintArg = (argOop >> 1);\r\t\t\twordsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\twordsResult[i] = ((wordsRcvr[i]) - intArg);\r\t\t\t}\r\t\t} else {\r\t\t\twordsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatArg = interpreterProxy->floatValueOf(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((wordsRcvr[i]) - floatArg);\r\t\t\t}\r\t\t}\r\t} else {\r\t\tif (isArgInt) {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tintArg = (argOop >> 1);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((floatsRcvr[i]) - intArg);\r\t\t\t}\r\t\t} else {\r\t\t\tfloatsRcvr = interpreterProxy->firstIndexableField(rcvrOop);\r\t\t\tfloatArg = interpreterProxy->floatValueOf(argOop);\r\t\t\tfloatsResult = interpreterProxy->firstIndexableField(resultOop);\r\t\t\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t\t\tfloatsResult[i] = ((floatsRcvr[i]) - floatArg);\r\t\t\t}\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->push(resultOop);\r}\r\rstatic double radiansToDegrees(double radians) {\r    double deg;\r    double degrees;\r\r\tdegrees = radians / 0.0174532925199433;\r\tdeg = 90.0 - degrees;\r\tif (!(deg > 0.0)) {\r\t\tdeg += 360.0;\r\t}\r\treturn deg;\r}\r\rEXPORT(sqInt) randomIntoFloatArray(void) {\r    double factor;\r    float *floatArray;\r    sqInt floatArrayOop;\r    sqInt from;\r    sqInt index;\r    sqInt range;\r    sqInt size;\r    sqInt to;\r\r\tfactor = interpreterProxy->stackFloatValue(0);\r\tfloatArrayOop = interpreterProxy->stackValue(1);\r\tto = interpreterProxy->stackIntegerValue(2);\r\tfrom = interpreterProxy->stackIntegerValue(3);\r\trange = interpreterProxy->stackIntegerValue(4);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(floatArrayOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tsize = interpreterProxy->stSizeOf(floatArrayOop);\r\tif (!((size >= to) && ((from >= 1) && (to >= from)))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tfloatArray = interpreterProxy->firstIndexableField(floatArrayOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfor (index = from; index <= to; index += 1) {\r\t\tfloatArray[index - 1] = ((((double) (kedamaRandom2(range)))) * factor);\r\t}\r\tinterpreterProxy->pop(5);\r}\r\rEXPORT(sqInt) randomIntoIntegerArray(void) {\r    double factor;\r    sqInt from;\r    sqInt index;\r    unsigned int *integerArray;\r    sqInt integerArrayOop;\r    sqInt range;\r    sqInt size;\r    sqInt to;\r\r\tfactor = interpreterProxy->stackFloatValue(0);\r\tintegerArrayOop = interpreterProxy->stackValue(1);\r\tto = interpreterProxy->stackIntegerValue(2);\r\tfrom = interpreterProxy->stackIntegerValue(3);\r\trange = interpreterProxy->stackIntegerValue(4);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(integerArrayOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tsize = interpreterProxy->stSizeOf(integerArrayOop);\r\tif (!((size >= to) && ((from >= 1) && (to >= from)))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tintegerArray = interpreterProxy->firstIndexableField(integerArrayOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfor (index = from; index <= to; index += 1) {\r\t\tintegerArray[index - 1] = (((int) ((((double) (kedamaRandom2(range)))) * factor)));\r\t}\r\tinterpreterProxy->pop(5);\r}\r\rEXPORT(sqInt) randomRange(void) {\r    sqInt range;\r    sqInt ret;\r    sqInt hi;\r    sqInt lo;\r    sqInt r;\r    sqInt v;\r    sqInt val;\r\r\trange = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\t/* begin kedamaRandom2: */\r\tif (range < 0) {\r\t\tr = 0 - range;\r\t} else {\r\t\tr = range;\r\t}\r\thi = kedamaRandomSeed / randQ;\r\tlo = kedamaRandomSeed % randQ;\r\tkedamaRandomSeed = (randA * lo) - (randR * hi);\r\tv = kedamaRandomSeed & 65535;\r\tval = ((usqInt) (v * (r + 1))) >> 16;\r\tif (range < 0) {\r\t\tret = 0 - val;\r\t\tgoto l1;\r\t} else {\r\t\tret = val;\r\t\tgoto l1;\r\t}\rl1:\t/* end kedamaRandom2: */;\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(2);\r\tinterpreterProxy->pushInteger(ret);\r}\r\rEXPORT(sqInt) scalarGetAngleTo(void) {\r    double fromX;\r    double fromY;\r    double r;\r    double toX;\r    double toY;\r    double x;\r    double y;\r    double tanVal;\r    double theta;\r\r\tfromY = interpreterProxy->stackFloatValue(0);\r\tfromX = interpreterProxy->stackFloatValue(1);\r\ttoY = interpreterProxy->stackFloatValue(2);\r\ttoX = interpreterProxy->stackFloatValue(3);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tx = toX - fromX;\r\ty = toY - fromY;\r\t/* begin degreesFromX:y: */\r\tif (x == 0.0) {\r\t\tif (y >= 0.0) {\r\t\t\tr = 90.0;\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\tr = 270.0;\r\t\t\tgoto l1;\r\t\t}\r\t} else {\r\t\ttanVal = y / x;\r\t\ttheta = atan(tanVal);\r\t\tif (x >= 0.0) {\r\t\t\tif (y >= 0.0) {\r\t\t\t\tr = theta / 0.0174532925199433;\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tr = 360.0 + (theta / 0.0174532925199433);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t} else {\r\t\t\tr = 180.0 + (theta / 0.0174532925199433);\r\t\t\tgoto l1;\r\t\t}\r\t}\r\tr = 0.0;\rl1:\t/* end degreesFromX:y: */;\r\tr += 90.0;\r\tif (r > 360.0) {\r\t\tr -= 360.0;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(5);\r\tinterpreterProxy->pushFloat(r);\r}\r\rEXPORT(sqInt) scalarGetDistanceTo(void) {\r    double fromX;\r    double fromY;\r    double r;\r    double toX;\r    double toY;\r    double x;\r    double y;\r\r\tfromY = interpreterProxy->stackFloatValue(0);\r\tfromX = interpreterProxy->stackFloatValue(1);\r\ttoY = interpreterProxy->stackFloatValue(2);\r\ttoX = interpreterProxy->stackFloatValue(3);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tx = fromX - toX;\r\ty = fromY - toY;\r\tr = sqrt((x * x) + (y * y));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(5);\r\tinterpreterProxy->pushFloat(r);\r}\r\rstatic sqInt scalarXAtxArrayheadingArrayvaluedestWidthleftEdgeModerightEdgeMode(sqInt index, float* xArray, float* headingArray, double val, double destWidth, sqInt leftEdgeMode, sqInt rightEdgeMode) {\r    double headingRadians;\r    double newX;\r\r\tnewX = val;\r\tif (newX < 0.0) {\r\t\tif (leftEdgeMode == 1) {\r\t\t\tnewX += destWidth;\r\t\t}\r\t\tif (leftEdgeMode == 2) {\r\t\t\tnewX = 0.0;\r\t\t}\r\t\tif (leftEdgeMode == 3) {\r\r\t\t\t/* bounce */\r\r\t\t\tnewX = 0.0 - newX;\r\t\t\theadingRadians = headingArray[index];\r\t\t\tif (headingRadians < 3.141592653589793) {\r\t\t\t\theadingArray[index] = (3.141592653589793 - headingRadians);\r\t\t\t} else {\r\t\t\t\theadingArray[index] = (9.42477796076938 - headingRadians);\r\t\t\t}\r\t\t}\r\t}\r\tif (newX >= destWidth) {\r\t\tif (rightEdgeMode == 1) {\r\t\t\tnewX -= destWidth;\r\t\t}\r\t\tif (rightEdgeMode == 2) {\r\t\t\tnewX = destWidth - 1.0e-6;\r\t\t}\r\t\tif (rightEdgeMode == 3) {\r\t\t\tnewX = (destWidth - 1.0e-6) - (newX - destWidth);\r\t\t\theadingRadians = headingArray[index];\r\t\t\tif (headingRadians < 3.141592653589793) {\r\t\t\t\theadingArray[index] = (3.141592653589793 - headingRadians);\r\t\t\t} else {\r\t\t\t\theadingArray[index] = (9.42477796076938 - headingRadians);\r\t\t\t}\r\t\t}\r\t}\r\txArray[index] = newX;\r}\r\rstatic sqInt scalarYAtyArrayheadingArrayvaluedestHeighttopEdgeModebottomEdgeMode(sqInt index, float* yArray, float* headingArray, double val, double destHeight, sqInt topEdgeMode, sqInt bottomEdgeMode) {\r    double newY;\r\r\tnewY = val;\r\tif (newY < 0.0) {\r\t\tif (topEdgeMode == 1) {\r\t\t\tnewY += destHeight;\r\t\t}\r\t\tif (topEdgeMode == 2) {\r\t\t\tnewY = 0.0;\r\t\t}\r\t\tif (topEdgeMode == 3) {\r\r\t\t\t/* bounce */\r\r\t\t\tnewY = 0.0 - newY;\r\t\t\theadingArray[index] = (6.283185307179586 - (headingArray[index]));\r\t\t}\r\t}\r\tif (newY >= destHeight) {\r\t\tif (bottomEdgeMode == 1) {\r\t\t\tnewY -= destHeight;\r\t\t}\r\t\tif (bottomEdgeMode == 2) {\r\t\t\tnewY = destHeight - 1.0e-6;\r\t\t}\r\t\tif (bottomEdgeMode == 3) {\r\t\t\tnewY = (destHeight - 1.0e-6) - (newY - destHeight);\r\t\t\theadingArray[index] = (6.283185307179586 - (headingArray[index]));\r\t\t}\r\t}\r\tyArray[index] = newY;\r}\r\rEXPORT(sqInt) setHeadingArrayFrom(void) {\r    double heading;\r    float *headingArray;\r    sqInt headingOop;\r    sqInt i;\r    sqInt isValVector;\r    unsigned char *pArray;\r    sqInt pOop;\r    float *resultArray;\r    sqInt resultOop;\r    sqInt size;\r    double deg;\r    double headingRadians;\r    int q;\r    double deg1;\r    double headingRadians1;\r    int q1;\r\r\tresultOop = interpreterProxy->stackValue(0);\r\theadingOop = interpreterProxy->stackValue(1);\r\tpOop = interpreterProxy->stackValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isBytes(pOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(headingOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tsize = interpreterProxy->slotSizeOf(headingOop);\r\tif (interpreterProxy->isFloatObject(resultOop)) {\r\t\tisValVector = 0;\r\t} else {\r\t\tif (interpreterProxy->isWords(resultOop)) {\r\t\t\tif ((interpreterProxy->slotSizeOf(resultOop)) != size) {\r\t\t\t\tinterpreterProxy->primitiveFail();\r\t\t\t\treturn null;\r\t\t\t}\r\t\t\tisValVector = 1;\r\t\t} else {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tpArray = interpreterProxy->firstIndexableField(pOop);\r\theadingArray = interpreterProxy->firstIndexableField(headingOop);\r\tif (isValVector) {\r\t\tresultArray = interpreterProxy->firstIndexableField(resultOop);\r\t} else {\r\t\theading = interpreterProxy->floatValueOf(resultOop);\r\t\t/* begin degreesToRadians: */\r\t\tdeg = 90.0 - heading;\r\t\tq = deg / 360.0;\r\t\tif (deg < 0.0) {\r\t\t\tq -= 1;\r\t\t}\r\t\theadingRadians = (deg - (q * 360.0)) * 0.0174532925199433;\r\t\theading = headingRadians;\r\t}\r\tfor (i = 0; i <= (size - 1); i += 1) {\r\t\tif ((pArray[i]) == 1) {\r\t\t\tif (isValVector) {\r\t\t\t\theading = resultArray[i];\r\t\t\t\t/* begin degreesToRadians: */\r\t\t\t\tdeg1 = 90.0 - heading;\r\t\t\t\tq1 = deg1 / 360.0;\r\t\t\t\tif (deg1 < 0.0) {\r\t\t\t\t\tq1 -= 1;\r\t\t\t\t}\r\t\t\t\theadingRadians1 = (deg1 - (q1 * 360.0)) * 0.0174532925199433;\r\t\t\t\theading = headingRadians1;\r\t\t\t}\r\t\t\theadingArray[i] = heading;\r\t\t}\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(3);\r}\r\r\r/*\tNote: This is coded so that is can be run from Squeak. */\r\rEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter) {\r    sqInt ok;\r\r\tinterpreterProxy = anInterpreter;\r\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\r\tif (ok == 0) {\r\t\treturn 0;\r\t}\r\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\r\treturn ok;\r}\r\rEXPORT(sqInt) setScalarHeading(void) {\r    double heading;\r    float *headingArray;\r    sqInt headingOop;\r    sqInt index;\r\r\theading = interpreterProxy->stackFloatValue(0);\r\theadingOop = interpreterProxy->stackValue(1);\r\tindex = interpreterProxy->stackIntegerValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(headingOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->slotSizeOf(headingOop)) < index) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\theadingArray = interpreterProxy->firstIndexableField(headingOop);\r\theadingArray[index - 1] = (degreesToRadians(heading));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(3);\r}\r\rEXPORT(sqInt) shutdownModule(void) {\r\treturn 1;\r}\r\rEXPORT(sqInt) turtleScalarSetX(void) {\r    double destWidth;\r    float *headingArray;\r    sqInt headingOop;\r    sqInt leftEdgeMode;\r    sqInt rightEdgeMode;\r    sqInt size;\r    double val;\r    float *xArray;\r    sqInt xIndex;\r    sqInt xOop;\r    double headingRadians;\r    double newX;\r\r\trightEdgeMode = interpreterProxy->stackIntegerValue(0);\r\tleftEdgeMode = interpreterProxy->stackIntegerValue(1);\r\tdestWidth = interpreterProxy->stackFloatValue(2);\r\tval = interpreterProxy->stackFloatValue(3);\r\theadingOop = interpreterProxy->stackValue(4);\r\txIndex = interpreterProxy->stackIntegerValue(5);\r\txOop = interpreterProxy->stackValue(6);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(xOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(headingOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tsize = interpreterProxy->slotSizeOf(xOop);\r\tif ((interpreterProxy->slotSizeOf(headingOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\txArray = interpreterProxy->firstIndexableField(xOop);\r\theadingArray = interpreterProxy->firstIndexableField(headingOop);\r\t/* begin scalarXAt:xArray:headingArray:value:destWidth:leftEdgeMode:rightEdgeMode: */\r\tnewX = val;\r\tif (newX < 0.0) {\r\t\tif (leftEdgeMode == 1) {\r\t\t\tnewX += destWidth;\r\t\t}\r\t\tif (leftEdgeMode == 2) {\r\t\t\tnewX = 0.0;\r\t\t}\r\t\tif (leftEdgeMode == 3) {\r\t\t\tnewX = 0.0 - newX;\r\t\t\theadingRadians = headingArray[xIndex - 1];\r\t\t\tif (headingRadians < 3.141592653589793) {\r\t\t\t\theadingArray[xIndex - 1] = (3.141592653589793 - headingRadians);\r\t\t\t} else {\r\t\t\t\theadingArray[xIndex - 1] = (9.42477796076938 - headingRadians);\r\t\t\t}\r\t\t}\r\t}\r\tif (newX >= destWidth) {\r\t\tif (rightEdgeMode == 1) {\r\t\t\tnewX -= destWidth;\r\t\t}\r\t\tif (rightEdgeMode == 2) {\r\t\t\tnewX = destWidth - 1.0e-6;\r\t\t}\r\t\tif (rightEdgeMode == 3) {\r\t\t\tnewX = (destWidth - 1.0e-6) - (newX - destWidth);\r\t\t\theadingRadians = headingArray[xIndex - 1];\r\t\t\tif (headingRadians < 3.141592653589793) {\r\t\t\t\theadingArray[xIndex - 1] = (3.141592653589793 - headingRadians);\r\t\t\t} else {\r\t\t\t\theadingArray[xIndex - 1] = (9.42477796076938 - headingRadians);\r\t\t\t}\r\t\t}\r\t}\r\txArray[xIndex - 1] = newX;\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(7);\r}\r\rEXPORT(sqInt) turtleScalarSetY(void) {\r    sqInt bottomEdgeMode;\r    double destHeight;\r    float *headingArray;\r    sqInt headingOop;\r    sqInt size;\r    sqInt topEdgeMode;\r    double val;\r    float *yArray;\r    sqInt yIndex;\r    sqInt yOop;\r    double newY;\r\r\tbottomEdgeMode = interpreterProxy->stackIntegerValue(0);\r\ttopEdgeMode = interpreterProxy->stackIntegerValue(1);\r\tdestHeight = interpreterProxy->stackFloatValue(2);\r\tval = interpreterProxy->stackFloatValue(3);\r\theadingOop = interpreterProxy->stackValue(4);\r\tyIndex = interpreterProxy->stackIntegerValue(5);\r\tyOop = interpreterProxy->stackValue(6);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(yOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(headingOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tsize = interpreterProxy->slotSizeOf(yOop);\r\tif ((interpreterProxy->slotSizeOf(headingOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tyArray = interpreterProxy->firstIndexableField(yOop);\r\theadingArray = interpreterProxy->firstIndexableField(headingOop);\r\t/* begin scalarYAt:yArray:headingArray:value:destHeight:topEdgeMode:bottomEdgeMode: */\r\tnewY = val;\r\tif (newY < 0.0) {\r\t\tif (topEdgeMode == 1) {\r\t\t\tnewY += destHeight;\r\t\t}\r\t\tif (topEdgeMode == 2) {\r\t\t\tnewY = 0.0;\r\t\t}\r\t\tif (topEdgeMode == 3) {\r\t\t\tnewY = 0.0 - newY;\r\t\t\theadingArray[yIndex - 1] = (6.283185307179586 - (headingArray[yIndex - 1]));\r\t\t}\r\t}\r\tif (newY >= destHeight) {\r\t\tif (bottomEdgeMode == 1) {\r\t\t\tnewY -= destHeight;\r\t\t}\r\t\tif (bottomEdgeMode == 2) {\r\t\t\tnewY = destHeight - 1.0e-6;\r\t\t}\r\t\tif (bottomEdgeMode == 3) {\r\t\t\tnewY = (destHeight - 1.0e-6) - (newY - destHeight);\r\t\t\theadingArray[yIndex - 1] = (6.283185307179586 - (headingArray[yIndex - 1]));\r\t\t}\r\t}\r\tyArray[yIndex - 1] = newY;\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(7);\r}\r\rEXPORT(sqInt) turtlesSetX(void) {\r    double destWidth;\r    float *headingArray;\r    sqInt headingOop;\r    sqInt i;\r    sqInt isValVector;\r    sqInt isWordVector;\r    sqInt leftEdgeMode;\r    double newX;\r    unsigned char *pArray;\r    sqInt pOop;\r    sqInt rightEdgeMode;\r    sqInt size;\r    double val;\r    float *valArray;\r    sqInt valOop;\r    unsigned int *wordValArray;\r    float *xArray;\r    sqInt xOop;\r    double headingRadians;\r    double newX1;\r\r\trightEdgeMode = interpreterProxy->stackIntegerValue(0);\r\tleftEdgeMode = interpreterProxy->stackIntegerValue(1);\r\tdestWidth = interpreterProxy->stackFloatValue(2);\r\tvalOop = interpreterProxy->stackValue(3);\r\theadingOop = interpreterProxy->stackValue(4);\r\txOop = interpreterProxy->stackValue(5);\r\tpOop = interpreterProxy->stackValue(6);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isBytes(pOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(xOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(headingOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (interpreterProxy->isFloatObject(valOop)) {\r\t\tisValVector = 0;\r\t} else {\r\t\tif (interpreterProxy->isWords(valOop)) {\r\t\t\tisValVector = 1;\r\t\t\tisWordVector = interpreterProxy->isMemberOf(valOop, \"WordArray\");\r\t\t} else {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tsize = interpreterProxy->slotSizeOf(xOop);\r\tif ((interpreterProxy->slotSizeOf(pOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->slotSizeOf(headingOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (isValVector) {\r\t\tif ((interpreterProxy->slotSizeOf(valOop)) != size) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tpArray = interpreterProxy->firstIndexableField(pOop);\r\txArray = interpreterProxy->firstIndexableField(xOop);\r\theadingArray = interpreterProxy->firstIndexableField(headingOop);\r\tif (isValVector) {\r\t\tif (isWordVector) {\r\t\t\twordValArray = interpreterProxy->firstIndexableField(valOop);\r\t\t} else {\r\t\t\tvalArray = interpreterProxy->firstIndexableField(valOop);\r\t\t}\r\t} else {\r\t\tval = interpreterProxy->floatValueOf(valOop);\r\t}\r\tfor (i = 0; i <= (size - 1); i += 1) {\r\t\tif ((pArray[i]) == 1) {\r\t\t\tif (isValVector) {\r\t\t\t\tif (isWordVector) {\r\t\t\t\t\tnewX = wordValArray[i];\r\t\t\t\t\t;\r\t\t\t\t} else {\r\t\t\t\t\tnewX = valArray[i];\r\t\t\t\t}\r\t\t\t} else {\r\t\t\t\tnewX = val;\r\t\t\t}\r\t\t\t/* begin scalarXAt:xArray:headingArray:value:destWidth:leftEdgeMode:rightEdgeMode: */\r\t\t\tnewX1 = newX;\r\t\t\tif (newX1 < 0.0) {\r\t\t\t\tif (leftEdgeMode == 1) {\r\t\t\t\t\tnewX1 += destWidth;\r\t\t\t\t}\r\t\t\t\tif (leftEdgeMode == 2) {\r\t\t\t\t\tnewX1 = 0.0;\r\t\t\t\t}\r\t\t\t\tif (leftEdgeMode == 3) {\r\t\t\t\t\tnewX1 = 0.0 - newX1;\r\t\t\t\t\theadingRadians = headingArray[i];\r\t\t\t\t\tif (headingRadians < 3.141592653589793) {\r\t\t\t\t\t\theadingArray[i] = (3.141592653589793 - headingRadians);\r\t\t\t\t\t} else {\r\t\t\t\t\t\theadingArray[i] = (9.42477796076938 - headingRadians);\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t}\r\t\t\tif (newX1 >= destWidth) {\r\t\t\t\tif (rightEdgeMode == 1) {\r\t\t\t\t\tnewX1 -= destWidth;\r\t\t\t\t}\r\t\t\t\tif (rightEdgeMode == 2) {\r\t\t\t\t\tnewX1 = destWidth - 1.0e-6;\r\t\t\t\t}\r\t\t\t\tif (rightEdgeMode == 3) {\r\t\t\t\t\tnewX1 = (destWidth - 1.0e-6) - (newX1 - destWidth);\r\t\t\t\t\theadingRadians = headingArray[i];\r\t\t\t\t\tif (headingRadians < 3.141592653589793) {\r\t\t\t\t\t\theadingArray[i] = (3.141592653589793 - headingRadians);\r\t\t\t\t\t} else {\r\t\t\t\t\t\theadingArray[i] = (9.42477796076938 - headingRadians);\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t}\r\t\t\txArray[i] = newX1;\r\t\t}\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(7);\r}\r\rEXPORT(sqInt) turtlesSetY(void) {\r    sqInt bottomEdgeMode;\r    double destHeight;\r    float *headingArray;\r    sqInt headingOop;\r    sqInt i;\r    sqInt isValVector;\r    sqInt isWordVector;\r    double newY;\r    unsigned char *pArray;\r    sqInt pOop;\r    sqInt size;\r    sqInt topEdgeMode;\r    double val;\r    float *valArray;\r    sqInt valOop;\r    unsigned int *wordValArray;\r    float *yArray;\r    sqInt yOop;\r    double newY1;\r\r\tbottomEdgeMode = interpreterProxy->stackIntegerValue(0);\r\ttopEdgeMode = interpreterProxy->stackIntegerValue(1);\r\tdestHeight = interpreterProxy->stackFloatValue(2);\r\tvalOop = interpreterProxy->stackValue(3);\r\theadingOop = interpreterProxy->stackValue(4);\r\tyOop = interpreterProxy->stackValue(5);\r\tpOop = interpreterProxy->stackValue(6);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isBytes(pOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(yOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(headingOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (interpreterProxy->isFloatObject(valOop)) {\r\t\tisValVector = 0;\r\t} else {\r\t\tif (interpreterProxy->isWords(valOop)) {\r\t\t\tisValVector = 1;\r\t\t\tisWordVector = interpreterProxy->isMemberOf(valOop, \"WordArray\");\r\t\t} else {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tsize = interpreterProxy->slotSizeOf(yOop);\r\tif ((interpreterProxy->slotSizeOf(pOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->slotSizeOf(headingOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (isValVector) {\r\t\tif ((interpreterProxy->slotSizeOf(valOop)) != size) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tpArray = interpreterProxy->firstIndexableField(pOop);\r\tyArray = interpreterProxy->firstIndexableField(yOop);\r\theadingArray = interpreterProxy->firstIndexableField(headingOop);\r\tif (isValVector) {\r\t\tif (isWordVector) {\r\t\t\twordValArray = interpreterProxy->firstIndexableField(valOop);\r\t\t} else {\r\t\t\tvalArray = interpreterProxy->firstIndexableField(valOop);\r\t\t}\r\t} else {\r\t\tval = interpreterProxy->floatValueOf(valOop);\r\t}\r\tfor (i = 0; i <= (size - 1); i += 1) {\r\t\tif ((pArray[i]) == 1) {\r\t\t\tif (isValVector) {\r\t\t\t\tif (isWordVector) {\r\t\t\t\t\tnewY = wordValArray[i];\r\t\t\t\t\t;\r\t\t\t\t} else {\r\t\t\t\t\tnewY = valArray[i];\r\t\t\t\t}\r\t\t\t} else {\r\t\t\t\tnewY = val;\r\t\t\t}\r\t\t\t/* begin scalarYAt:yArray:headingArray:value:destHeight:topEdgeMode:bottomEdgeMode: */\r\t\t\tnewY1 = newY;\r\t\t\tif (newY1 < 0.0) {\r\t\t\t\tif (topEdgeMode == 1) {\r\t\t\t\t\tnewY1 += destHeight;\r\t\t\t\t}\r\t\t\t\tif (topEdgeMode == 2) {\r\t\t\t\t\tnewY1 = 0.0;\r\t\t\t\t}\r\t\t\t\tif (topEdgeMode == 3) {\r\t\t\t\t\tnewY1 = 0.0 - newY1;\r\t\t\t\t\theadingArray[i] = (6.283185307179586 - (headingArray[i]));\r\t\t\t\t}\r\t\t\t}\r\t\t\tif (newY1 >= destHeight) {\r\t\t\t\tif (bottomEdgeMode == 1) {\r\t\t\t\t\tnewY1 -= destHeight;\r\t\t\t\t}\r\t\t\t\tif (bottomEdgeMode == 2) {\r\t\t\t\t\tnewY1 = destHeight - 1.0e-6;\r\t\t\t\t}\r\t\t\t\tif (bottomEdgeMode == 3) {\r\t\t\t\t\tnewY1 = (destHeight - 1.0e-6) - (newY1 - destHeight);\r\t\t\t\t\theadingArray[i] = (6.283185307179586 - (headingArray[i]));\r\t\t\t\t}\r\t\t\t}\r\t\t\tyArray[i] = newY1;\r\t\t}\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(7);\r}\r\rEXPORT(sqInt) vectorGetAngleTo(void) {\r    sqInt index;\r    sqInt isVector;\r    float *pX;\r    sqInt pXOop;\r    float *pY;\r    sqInt pYOop;\r    double ppx;\r    double ppy;\r    double r;\r    float *result;\r    sqInt resultOop;\r    sqInt size;\r    double x;\r    float *xArray;\r    sqInt xArrayOop;\r    double y;\r    float *yArray;\r    sqInt yArrayOop;\r    double tanVal;\r    double theta;\r\r\tresultOop = interpreterProxy->stackValue(0);\r\tyArrayOop = interpreterProxy->stackValue(1);\r\txArrayOop = interpreterProxy->stackValue(2);\r\tpYOop = interpreterProxy->stackValue(3);\r\tpXOop = interpreterProxy->stackValue(4);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(resultOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(xArrayOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(yArrayOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tsize = interpreterProxy->stSizeOf(resultOop);\r\tif (size < 0) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->stSizeOf(xArrayOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->stSizeOf(yArrayOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (interpreterProxy->isFloatObject(pXOop)) {\r\t\tif (interpreterProxy->isFloatObject(pYOop)) {\r\t\t\tisVector = 0;\r\t\t} else {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t} else {\r\t\tif (interpreterProxy->isFloatObject(pYOop)) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t} else {\r\t\t\tisVector = 1;\r\t\t}\r\t}\r\tif (isVector) {\r\t\tif ((interpreterProxy->stSizeOf(pXOop)) != size) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t\tif ((interpreterProxy->stSizeOf(pYOop)) != size) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tresult = interpreterProxy->firstIndexableField(resultOop);\r\txArray = interpreterProxy->firstIndexableField(xArrayOop);\r\tyArray = interpreterProxy->firstIndexableField(yArrayOop);\r\tif (isVector) {\r\t\tpX = interpreterProxy->firstIndexableField(pXOop);\r\t\tpY = interpreterProxy->firstIndexableField(pYOop);\r\t}\r\tif (!(isVector)) {\r\t\tppx = interpreterProxy->floatValueOf(pXOop);\r\t\tppy = interpreterProxy->floatValueOf(pYOop);\r\t}\r\tfor (index = 0; index <= (size - 1); index += 1) {\r\t\tif (isVector) {\r\t\t\tppx = pX[index];\r\t\t\tppy = pY[index];\r\t\t}\r\t\tx = ppx - (xArray[index]);\r\t\ty = ppy - (yArray[index]);\r\t\t/* begin degreesFromX:y: */\r\t\tif (x == 0.0) {\r\t\t\tif (y >= 0.0) {\r\t\t\t\tr = 90.0;\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tr = 270.0;\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t} else {\r\t\t\ttanVal = y / x;\r\t\t\ttheta = atan(tanVal);\r\t\t\tif (x >= 0.0) {\r\t\t\t\tif (y >= 0.0) {\r\t\t\t\t\tr = theta / 0.0174532925199433;\r\t\t\t\t\tgoto l1;\r\t\t\t\t} else {\r\t\t\t\t\tr = 360.0 + (theta / 0.0174532925199433);\r\t\t\t\t\tgoto l1;\r\t\t\t\t}\r\t\t\t} else {\r\t\t\t\tr = 180.0 + (theta / 0.0174532925199433);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t}\r\t\tr = 0.0;\r\tl1:\t/* end degreesFromX:y: */;\r\t\tr += 90.0;\r\t\tif (r > 360.0) {\r\t\t\tr -= 360.0;\r\t\t}\r\t\tresult[index] = r;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(6);\r\tinterpreterProxy->push(resultOop);\r}\r\rEXPORT(sqInt) vectorGetDistanceTo(void) {\r    sqInt index;\r    sqInt isVector;\r    float *pX;\r    sqInt pXOop;\r    float *pY;\r    sqInt pYOop;\r    double ppx;\r    double ppy;\r    float *result;\r    sqInt resultOop;\r    sqInt size;\r    double x;\r    float *xArray;\r    sqInt xArrayOop;\r    double y;\r    float *yArray;\r    sqInt yArrayOop;\r\r\tresultOop = interpreterProxy->stackValue(0);\r\tyArrayOop = interpreterProxy->stackValue(1);\r\txArrayOop = interpreterProxy->stackValue(2);\r\tpYOop = interpreterProxy->stackValue(3);\r\tpXOop = interpreterProxy->stackValue(4);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(resultOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(xArrayOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(yArrayOop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tsize = interpreterProxy->stSizeOf(resultOop);\r\tif (size < 0) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->stSizeOf(xArrayOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->stSizeOf(yArrayOop)) != size) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (interpreterProxy->isFloatObject(pXOop)) {\r\t\tif (interpreterProxy->isFloatObject(pYOop)) {\r\t\t\tisVector = 0;\r\t\t} else {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t} else {\r\t\tif (interpreterProxy->isFloatObject(pYOop)) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t} else {\r\t\t\tisVector = 1;\r\t\t}\r\t}\r\tif (isVector) {\r\t\tif ((interpreterProxy->stSizeOf(pXOop)) != size) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t\tif ((interpreterProxy->stSizeOf(pYOop)) != size) {\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\treturn null;\r\t\t}\r\t}\r\tresult = interpreterProxy->firstIndexableField(resultOop);\r\txArray = interpreterProxy->firstIndexableField(xArrayOop);\r\tyArray = interpreterProxy->firstIndexableField(yArrayOop);\r\tif (isVector) {\r\t\tpX = interpreterProxy->firstIndexableField(pXOop);\r\t\tpY = interpreterProxy->firstIndexableField(pYOop);\r\t}\r\tif (!(isVector)) {\r\t\tppx = interpreterProxy->floatValueOf(pXOop);\r\t\tppy = interpreterProxy->floatValueOf(pYOop);\r\t}\r\tfor (index = 0; index <= (size - 1); index += 1) {\r\t\tif (isVector) {\r\t\t\tppx = pX[index];\r\t\t\tppy = pY[index];\r\t\t}\r\t\tx = ppx - (xArray[index]);\r\t\ty = ppy - (yArray[index]);\r\t\tresult[index] = (sqrt((x * x) + (y * y)));\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(6);\r\tinterpreterProxy->push(resultOop);\r}\r\rEXPORT(sqInt) zoomBitmap(void) {\r    sqInt bit;\r    unsigned int* dOrigin;\r    sqInt dst;\r    sqInt dstIndex;\r    sqInt dstSize;\r    sqInt dummy;\r    sqInt sHeight;\r    unsigned int* sOrigin;\r    sqInt sWidth;\r    sqInt src;\r    sqInt srcIndex;\r    sqInt srcOrigin;\r    sqInt srcSize;\r    sqInt sx;\r    sqInt sy;\r    sqInt xFactor;\r    sqInt y;\r    sqInt yFactor;\r\r\tyFactor = interpreterProxy->stackIntegerValue(0);\r\txFactor = interpreterProxy->stackIntegerValue(1);\r\tsHeight = interpreterProxy->stackIntegerValue(2);\r\tsWidth = interpreterProxy->stackIntegerValue(3);\r\tdst = interpreterProxy->stackValue(4);\r\tsrc = interpreterProxy->stackValue(5);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tsrcSize = interpreterProxy->slotSizeOf(src);\r\tdstSize = interpreterProxy->slotSizeOf(dst);\r\tif (!((sWidth * sHeight) == srcSize)) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(((srcSize * xFactor) * yFactor) == dstSize)) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tsOrigin = interpreterProxy->firstIndexableField(src);\r\tdOrigin = interpreterProxy->firstIndexableField(dst);\r\tsrcIndex = 0;\r\tsrcOrigin = 0;\r\tdstIndex = 0;\r\tfor (sy = 0; sy <= (sHeight - 1); sy += 1) {\r\t\tfor (y = 0; y <= (yFactor - 1); y += 1) {\r\t\t\tfor (sx = 0; sx <= (sWidth - 1); sx += 1) {\r\t\t\t\tbit = sOrigin[srcIndex];\r\t\t\t\tsrcIndex += 1;\r\t\t\t\tfor (dummy = 0; dummy <= (xFactor - 1); dummy += 1) {\r\t\t\t\t\tdOrigin[dstIndex] = bit;\r\t\t\t\t\tdstIndex += 1;\r\t\t\t\t}\r\t\t\t}\r\t\t\tsrcIndex = srcOrigin;\r\t\t}\r\t\tsrcOrigin += sWidth;\r\t\tsrcIndex = srcOrigin;\r\t}\r\tinterpreterProxy->pop(6);\r}\r\r\r#ifdef SQUEAK_BUILTIN_PLUGIN\r\r\rvoid* KedamaPlugin2_exports[][3] = {\r\t{\"KedamaPlugin2\", \"primitiveAddArrays\", (void*)primitiveAddArrays},\r\t{\"KedamaPlugin2\", \"getModuleName\", (void*)getModuleName},\r\t{\"KedamaPlugin2\", \"primitiveMulArrays\", (void*)primitiveMulArrays},\r\t{\"KedamaPlugin2\", \"drawTurtlesInArray\", (void*)drawTurtlesInArray},\r\t{\"KedamaPlugin2\", \"primitiveGTScalar\", (void*)primitiveGTScalar},\r\t{\"KedamaPlugin2\", \"setScalarHeading\", (void*)setScalarHeading},\r\t{\"KedamaPlugin2\", \"primitiveSubScalar\", (void*)primitiveSubScalar},\r\t{\"KedamaPlugin2\", \"turtleScalarSetY\", (void*)turtleScalarSetY},\r\t{\"KedamaPlugin2\", \"vectorGetAngleTo\", (void*)vectorGetAngleTo},\r\t{\"KedamaPlugin2\", \"primitiveRemArrays\", (void*)primitiveRemArrays},\r\t{\"KedamaPlugin2\", \"primitiveLTArrays\", (void*)primitiveLTArrays},\r\t{\"KedamaPlugin2\", \"primitiveAddScalar\", (void*)primitiveAddScalar},\r\t{\"KedamaPlugin2\", \"primPixelsAtXY\", (void*)primPixelsAtXY},\r\t{\"KedamaPlugin2\", \"primitiveMulScalar\", (void*)primitiveMulScalar},\r\t{\"KedamaPlugin2\", \"primSetPixelsAtXY\", (void*)primSetPixelsAtXY},\r\t{\"KedamaPlugin2\", \"setHeadingArrayFrom\", (void*)setHeadingArrayFrom},\r\t{\"KedamaPlugin2\", \"primPixelAtXYPut\", (void*)primPixelAtXYPut},\r\t{\"KedamaPlugin2\", \"makeMaskLog\", (void*)makeMaskLog},\r\t{\"KedamaPlugin2\", \"primitiveLTScalar\", (void*)primitiveLTScalar},\r\t{\"KedamaPlugin2\", \"scalarGetAngleTo\", (void*)scalarGetAngleTo},\r\t{\"KedamaPlugin2\", \"primitiveOrByteArray\", (void*)primitiveOrByteArray},\r\t{\"KedamaPlugin2\", \"primitiveLEArrays\", (void*)primitiveLEArrays},\r\t{\"KedamaPlugin2\", \"primitiveRemScalar\", (void*)primitiveRemScalar},\r\t{\"KedamaPlugin2\", \"getHeadingArrayInto\", (void*)getHeadingArrayInto},\r\t{\"KedamaPlugin2\", \"turtlesSetX\", (void*)turtlesSetX},\r\t{\"KedamaPlugin2\", \"primitivePredicateReplaceBytes\", (void*)primitivePredicateReplaceBytes},\r\t{\"KedamaPlugin2\", \"primitiveDivArrays\", (void*)primitiveDivArrays},\r\t{\"KedamaPlugin2\", \"makeMask\", (void*)makeMask},\r\t{\"KedamaPlugin2\", \"primitiveLEScalar\", (void*)primitiveLEScalar},\r\t{\"KedamaPlugin2\", \"kedamaSetRandomSeed\", (void*)kedamaSetRandomSeed},\r\t{\"KedamaPlugin2\", \"randomIntoIntegerArray\", (void*)randomIntoIntegerArray},\r\t{\"KedamaPlugin2\", \"setInterpreter\", (void*)setInterpreter},\r\t{\"KedamaPlugin2\", \"primitivePredicateAtAllPutColor\", (void*)primitivePredicateAtAllPutColor},\r\t{\"KedamaPlugin2\", \"makeTurtlesMap\", (void*)makeTurtlesMap},\r\t{\"KedamaPlugin2\", \"randomIntoFloatArray\", (void*)randomIntoFloatArray},\r\t{\"KedamaPlugin2\", \"primUpHill\", (void*)primUpHill},\r\t{\"KedamaPlugin2\", \"shutdownModule\", (void*)shutdownModule},\r\t{\"KedamaPlugin2\", \"primitiveDivScalar\", (void*)primitiveDivScalar},\r\t{\"KedamaPlugin2\", \"primitiveGEArrays\", (void*)primitiveGEArrays},\r\t{\"KedamaPlugin2\", \"primitiveNotByteArray\", (void*)primitiveNotByteArray},\r\t{\"KedamaPlugin2\", \"randomRange\", (void*)randomRange},\r\t{\"KedamaPlugin2\", \"initialiseModule\", (void*)initialiseModule},\r\t{\"KedamaPlugin2\", \"getScalarHeading\", (void*)getScalarHeading},\r\t{\"KedamaPlugin2\", \"primPixelAtXY\", (void*)primPixelAtXY},\r\t{\"KedamaPlugin2\", \"primitivePredicateAtAllPutNumber\", (void*)primitivePredicateAtAllPutNumber},\r\t{\"KedamaPlugin2\", \"primitiveEQArrays\", (void*)primitiveEQArrays},\r\t{\"KedamaPlugin2\", \"primitiveNEArrays\", (void*)primitiveNEArrays},\r\t{\"KedamaPlugin2\", \"primScalarForward\", (void*)primScalarForward},\r\t{\"KedamaPlugin2\", \"vectorGetDistanceTo\", (void*)vectorGetDistanceTo},\r\t{\"KedamaPlugin2\", \"turtlesSetY\", (void*)turtlesSetY},\r\t{\"KedamaPlugin2\", \"turtleScalarSetX\", (void*)turtleScalarSetX},\r\t{\"KedamaPlugin2\", \"primTurtlesForward\", (void*)primTurtlesForward},\r\t{\"KedamaPlugin2\", \"primitiveGEScalar\", (void*)primitiveGEScalar},\r\t{\"KedamaPlugin2\", \"primitiveAndByteArray\", (void*)primitiveAndByteArray},\r\t{\"KedamaPlugin2\", \"primitivePredicateReplaceWords\", (void*)primitivePredicateReplaceWords},\r\t{\"KedamaPlugin2\", \"primitiveGTArrays\", (void*)primitiveGTArrays},\r\t{\"KedamaPlugin2\", \"primitivePredicateAtAllPutObject\", (void*)primitivePredicateAtAllPutObject},\r\t{\"KedamaPlugin2\", \"primitiveEQScalar\", (void*)primitiveEQScalar},\r\t{\"KedamaPlugin2\", \"primitivePredicateAtAllPutBoolean\", (void*)primitivePredicateAtAllPutBoolean},\r\t{\"KedamaPlugin2\", \"zoomBitmap\", (void*)zoomBitmap},\r\t{\"KedamaPlugin2\", \"primitiveNEScalar\", (void*)primitiveNEScalar},\r\t{\"KedamaPlugin2\", \"scalarGetDistanceTo\", (void*)scalarGetDistanceTo},\r\t{\"KedamaPlugin2\", \"primitiveSubArrays\", (void*)primitiveSubArrays},\r\t{NULL, NULL, NULL}\r};\r\r\r#endif /* ifdef SQ_BUILTIN_PLUGIN */\r\r"
  },
  {
    "path": "vm/src/from_squeak/unix/src/plugins/Mpeg3Plugin/Mpeg3Plugin.c",
    "content": "/* Automatically generated from Squeak on 23 January 2011 3:56:02 pm \r   by VMMaker 4.4.7\r */\r\r#include <math.h>\r#include <stdio.h>\r#include <stdlib.h>\r#include <string.h>\r#include <time.h>\r\r/* Default EXPORT macro that does nothing (see comment in sq.h): */\r#define EXPORT(returnType) returnType\r\r/* Do not include the entire sq.h file but just those parts needed. */\r/*  The virtual machine proxy definition */\r#include \"sqVirtualMachine.h\"\r/* Configuration options */\r#include \"sqConfig.h\"\r/* Platform specific definitions */\r#include \"sqPlatformSpecific.h\"\r\r#define true 1\r#define false 0\r#define null 0  /* using 'null' because nil is predefined in Think C */\r#ifdef SQUEAK_BUILTIN_PLUGIN\r#undef EXPORT\r// was #undef EXPORT(returnType) but screws NorCroft cc\r#define EXPORT(returnType) static returnType\r#endif\r#include \"Mpeg3Plugin.h\"\r\r#include \"sqMemoryAccess.h\"\r\r\r/*** Constants ***/\r\r/*** Function Prototypes ***/\rstatic sqInt checkFileEntry(mpeg3_t *  aMpegFile);\rstatic VirtualMachine * getInterpreter(void);\r#pragma export on\rEXPORT(const char*) getModuleName(void);\r#pragma export off\rstatic sqInt halt(void);\r#pragma export on\rEXPORT(sqInt) initialiseModule(void);\r#pragma export off\rstatic sqInt makeFileEntry(mpeg3_t *  aMpegFile);\rstatic mpeg3_t * mpeg3tValueOf(sqInt mpeg3tHandle);\rstatic sqInt msg(char *s);\r#pragma export on\rEXPORT(sqInt) primitiveMPEG3AudioChannels(void);\rEXPORT(sqInt) primitiveMPEG3AudioSamples(void);\rEXPORT(sqInt) primitiveMPEG3CheckSig(void);\rEXPORT(sqInt) primitiveMPEG3Close(void);\rEXPORT(sqInt) primitiveMPEG3DropFrames(void);\rEXPORT(sqInt) primitiveMPEG3EndOfAudio(void);\rEXPORT(sqInt) primitiveMPEG3EndOfVideo(void);\rEXPORT(sqInt) primitiveMPEG3FrameRate(void);\rEXPORT(sqInt) primitiveMPEG3GenerateToc(void);\rEXPORT(sqInt) primitiveMPEG3GetFrame(void);\rEXPORT(sqInt) primitiveMPEG3GetSample(void);\rEXPORT(sqInt) primitiveMPEG3GetTime(void);\rEXPORT(sqInt) primitiveMPEG3HasAudio(void);\rEXPORT(sqInt) primitiveMPEG3HasVideo(void);\rEXPORT(sqInt) primitiveMPEG3Open(void);\rEXPORT(sqInt) primitiveMPEG3OpenABuffer(void);\rEXPORT(sqInt) primitiveMPEG3PreviousFrame(void);\rEXPORT(sqInt) primitiveMPEG3ReReadAudio(void);\rEXPORT(sqInt) primitiveMPEG3ReadAudio(void);\rEXPORT(sqInt) primitiveMPEG3ReadFrameBufferOffset(void);\rEXPORT(sqInt) primitiveMPEG3ReadFrame(void);\rEXPORT(sqInt) primitiveMPEG3SampleRate(void);\rEXPORT(sqInt) primitiveMPEG3SeekPercentage(void);\rEXPORT(sqInt) primitiveMPEG3SetCpus(void);\rEXPORT(sqInt) primitiveMPEG3SetFrame(void);\rEXPORT(sqInt) primitiveMPEG3SetMmx(void);\rEXPORT(sqInt) primitiveMPEG3SetSample(void);\rEXPORT(sqInt) primitiveMPEG3TellPercentage(void);\rEXPORT(sqInt) primitiveMPEG3TotalAStreams(void);\rEXPORT(sqInt) primitiveMPEG3TotalVStreams(void);\rEXPORT(sqInt) primitiveMPEG3VideoFrames(void);\rEXPORT(sqInt) primitiveMPEG3VideoHeight(void);\rEXPORT(sqInt) primitiveMPEG3VideoWidth(void);\r#pragma export off\rstatic sqInt removeFileEntry(mpeg3_t *  aMpegFile);\r#pragma export on\rEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\rEXPORT(sqInt) shutdownModule(void);\r#pragma export off\rstatic sqInt sqAssert(sqInt aBool);\r/*** Variables ***/\r\r#ifdef SQUEAK_BUILTIN_PLUGIN\rextern\r#endif\rstruct VirtualMachine* interpreterProxy;\rstatic sqInt maximumNumberOfFilesToWatch;\rstatic const char *moduleName =\r#ifdef SQUEAK_BUILTIN_PLUGIN\r\t\"Mpeg3Plugin 23 January 2011 (i)\"\r#else\r\t\"Mpeg3Plugin 23 January 2011 (e)\"\r#endif\r;\rstatic mpeg3_t *mpegFiles[1024+1];\r\r\rstatic sqInt checkFileEntry(mpeg3_t *  aMpegFile) {\r\tsqInt i;\r\r\tfor (i = 1; i <= maximumNumberOfFilesToWatch; i += 1) {\r\t\tif ((mpegFiles[i]) == aMpegFile) {\r\t\t\treturn 1;\r\t\t}\r\t}\r\treturn 0;\r}\r\r\r/*\tNote: This is coded so that plugins can be run from Squeak. */\r\rstatic VirtualMachine * getInterpreter(void) {\r\treturn interpreterProxy;\r}\r\r\r/*\tNote: This is hardcoded so it can be run from Squeak.\r\tThe module name is used for validating a module *after*\r\tit is loaded to check if it does really contain the module\r\twe're thinking it contains. This is important! */\r\rEXPORT(const char*) getModuleName(void) {\r\treturn moduleName;\r}\r\rstatic sqInt halt(void) {\r\t;\r}\r\rEXPORT(sqInt) initialiseModule(void) {\r\tsqInt i;\r\r\tmaximumNumberOfFilesToWatch = 1024;\r\tfor (i = 1; i <= maximumNumberOfFilesToWatch; i += 1) {\r\t\tmpegFiles[i] = 0;\r\t}\r\treturn true;\r}\r\rstatic sqInt makeFileEntry(mpeg3_t *  aMpegFile) {\r\tsqInt i;\r\r\tfor (i = 1; i <= maximumNumberOfFilesToWatch; i += 1) {\r\t\tif ((mpegFiles[i]) == 0) {\r\t\t\tmpegFiles[i] = aMpegFile;\r\t\t\treturn 1;\r\t\t}\r\t}\r\treturn 0;\r}\r\r\r/*\tReturn a pointer to the first byte of of the mpeg3_t record within the  \r\tgiven Smalltalk object, or nil if socketOop is not a mpeg3_t record. */\r\rstatic mpeg3_t * mpeg3tValueOf(sqInt mpeg3tHandle) {\r\tmpeg3_t **  index;\r\tsqInt check;\r\r\tinterpreterProxy->success((interpreterProxy->isBytes(mpeg3tHandle)) && ((interpreterProxy->byteSizeOf(mpeg3tHandle)) == 4));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t} else {\r\t\tindex = ((mpeg3_t **) (interpreterProxy->firstIndexableField(mpeg3tHandle)));\r\t\tcheck = checkFileEntry(*index);\r\t\tif (check == 0) {\r\t\t\treturn null;\r\t\t}\r\t\treturn *index;\r\t}\r}\r\rstatic sqInt msg(char *s) {\r\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\r}\r\r\r/*\tint mpeg3_audio_channels(mpeg3_t *file,int stream) */\r\rEXPORT(sqInt) primitiveMPEG3AudioChannels(void) {\r\tmpeg3_t *  file;\r\tsqInt result;\r\tsqInt fileHandle;\r\tsqInt aNumber;\r\tsqInt _return_value;\r\r\tfileHandle = interpreterProxy->stackValue(1);\r\taNumber = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfile = mpeg3tValueOf(fileHandle);\r\tif (file == null) {\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, 0);\r\t\treturn null;\r\t}\r\tif (aNumber < 0) {\r\t\tinterpreterProxy->success(0);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, 0);\r\t\treturn null;\r\t}\r\tif (aNumber >= (mpeg3_total_astreams(file))) {\r\t\tinterpreterProxy->success(0);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, 0);\r\t\treturn null;\r\t}\r\tresult = mpeg3_audio_channels(file,aNumber);\r\t_return_value = interpreterProxy->integerObjectOf(result);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\r\r/*\tlong mpeg3_audio_samples(mpeg3_t *file, int stream) */\r\rEXPORT(sqInt) primitiveMPEG3AudioSamples(void) {\r\tmpeg3_t *  file;\r\tsqInt result;\r\tsqInt fileHandle;\r\tsqInt aNumber;\r\tsqInt _return_value;\r\r\tfileHandle = interpreterProxy->stackValue(1);\r\taNumber = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfile = mpeg3tValueOf(fileHandle);\r\tif (file == null) {\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, 0);\r\t\treturn null;\r\t}\r\tif (aNumber < 0) {\r\t\tinterpreterProxy->success(0);\r\t\treturn null;\r\t}\r\tif (aNumber >= (mpeg3_total_astreams(file))) {\r\t\tinterpreterProxy->success(0);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, 0);\r\t\treturn null;\r\t}\r\tresult = mpeg3_audio_samples(file,aNumber);\r\t_return_value = interpreterProxy->floatObjectOf(result);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\r\r/*\tint mpeg3_check_sig(char *path) */\r\rEXPORT(sqInt) primitiveMPEG3CheckSig(void) {\r\tsqInt result;\r\tchar storage[1024] ;\r\tsqInt sz;\r\tchar *path;\r\tsqInt _return_value;\r\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\r\tpath = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tsz = interpreterProxy->byteSizeOf((oopForPointer( path ) - BASE_HEADER_SIZE));\r\tinterpreterProxy->ioFilenamefromStringofLengthresolveAliases(storage, path, sz, 1);\r\tresult = mpeg3_check_sig(storage);\r\t_return_value = (result? interpreterProxy->trueObject(): interpreterProxy->falseObject());\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\r\r/*\tint mpeg3_close(mpeg3_t *file) */\r\rEXPORT(sqInt) primitiveMPEG3Close(void) {\r\tmpeg3_t *  file;\r\tmpeg3_t **  index;\r\tsqInt fileHandle;\r\r\tfileHandle = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfile = mpeg3tValueOf(fileHandle);\r\tif (file == null) {\r\t\treturn null;\r\t}\r\tremoveFileEntry(file); mpeg3_close(file);\r\tindex = ((mpeg3_t **) (interpreterProxy->firstIndexableField(fileHandle)));\r\t*index = 0;\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(1);\r\treturn null;\r}\r\r\r/*\tint mpeg3_drop_frames(mpeg3_t *file, long frames, int stream) */\r\rEXPORT(sqInt) primitiveMPEG3DropFrames(void) {\r\tmpeg3_t *  file;\r\tsqInt result;\r\tsqInt fileHandle;\r\tsqInt aFrameNumber;\r\tsqInt aNumber;\r\tsqInt _return_value;\r\r\tfileHandle = interpreterProxy->stackValue(2);\r\taFrameNumber = interpreterProxy->stackIntegerValue(1);\r\taNumber = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfile = mpeg3tValueOf(fileHandle);\r\tif (file == null) {\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(4, 0);\r\t\treturn null;\r\t}\r\tif (aNumber < 0) {\r\t\tinterpreterProxy->success(0);\r\t\treturn null;\r\t}\r\tif (aNumber >= (result = mpeg3_total_vstreams(file))) {\r\t\tinterpreterProxy->success(0);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(4, 0);\r\t\treturn null;\r\t}\r\tresult = mpeg3_drop_frames(file,aFrameNumber,aNumber);\r\t_return_value = interpreterProxy->integerObjectOf(result);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(4, _return_value);\r\treturn null;\r}\r\r\r/*\tint mpeg3_end_of_audio(mpeg3_t *file, int stream) */\r\rEXPORT(sqInt) primitiveMPEG3EndOfAudio(void) {\r\tmpeg3_t *  file;\r\tsqInt result;\r\tsqInt fileHandle;\r\tsqInt aNumber;\r\tsqInt _return_value;\r\r\tfileHandle = interpreterProxy->stackValue(1);\r\taNumber = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfile = mpeg3tValueOf(fileHandle);\r\tif (file == null) {\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, 0);\r\t\treturn null;\r\t}\r\tif (aNumber < 0) {\r\t\tinterpreterProxy->success(0);\r\t\treturn null;\r\t}\r\tif (aNumber >= (result = mpeg3_total_astreams(file))) {\r\t\tinterpreterProxy->success(0);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, 0);\r\t\treturn null;\r\t}\r\tresult = mpeg3_end_of_audio(file,aNumber);\r\t_return_value = (result? interpreterProxy->trueObject(): interpreterProxy->falseObject());\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\r\r/*\tint mpeg3_end_of_video(mpeg3_t *file, int stream) */\r\rEXPORT(sqInt) primitiveMPEG3EndOfVideo(void) {\r\tmpeg3_t *  file;\r\tsqInt result;\r\tsqInt fileHandle;\r\tsqInt aNumber;\r\tsqInt _return_value;\r\r\tfileHandle = interpreterProxy->stackValue(1);\r\taNumber = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfile = mpeg3tValueOf(fileHandle);\r\tif (file == null) {\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, 0);\r\t\treturn null;\r\t}\r\tif (aNumber < 0) {\r\t\tinterpreterProxy->success(0);\r\t\treturn null;\r\t}\r\tif (aNumber >= (result = mpeg3_total_vstreams(file))) {\r\t\tinterpreterProxy->success(0);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, 0);\r\t\treturn null;\r\t}\r\tresult = mpeg3_end_of_video(file,aNumber);\r\t_return_value = (result? interpreterProxy->trueObject(): interpreterProxy->falseObject());\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\r\r/*\tfloat mpeg3_frame_rate(mpeg3_t *file, int stream) */\r\rEXPORT(sqInt) primitiveMPEG3FrameRate(void) {\r\tmpeg3_t *  file;\r\tdouble  result;\r\tsqInt fileHandle;\r\tsqInt aNumber;\r\tsqInt _return_value;\r\r\tfileHandle = interpreterProxy->stackValue(1);\r\taNumber = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfile = mpeg3tValueOf(fileHandle);\r\tif (file == null) {\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, 0);\r\t\treturn null;\r\t}\r\tif (aNumber < 0) {\r\t\tinterpreterProxy->success(0);\r\t\treturn null;\r\t}\r\tif (aNumber >= (result = mpeg3_total_vstreams(file))) {\r\t\tinterpreterProxy->success(0);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, 0);\r\t\treturn null;\r\t}\r\tresult =  mpeg3_frame_rate(file,aNumber);\r\t_return_value = interpreterProxy->floatObjectOf(result);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\r\r/*\tint mpeg3_generate_toc_for_Squeak(FILE *output, char *path, int timecode_search, int print_streams, char *buffer) */\r\rEXPORT(sqInt) primitiveMPEG3GenerateToc(void) {\r\tmpeg3_t *  file;\r\tsqInt bufferSize;\r\tsqInt fileHandle;\r\tsqInt timecode;\r\tsqInt streams;\r\tchar *aString;\r\r\tfileHandle = interpreterProxy->stackValue(3);\r\ttimecode = interpreterProxy->stackIntegerValue(2);\r\tstreams = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(1));\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\r\taString = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfile = mpeg3tValueOf(fileHandle);\r\tif (file == null) {\r\t\treturn null;\r\t}\r\tbufferSize = interpreterProxy->slotSizeOf(interpreterProxy->stackValue(0));\r\tmpeg3_generate_toc_for_Squeak(file,timecode,streams,aString,bufferSize);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(4);\r\treturn null;\r}\r\r\r/*\tlong mpeg3_get_frame(mpeg3_t *file,int stream) */\r\rEXPORT(sqInt) primitiveMPEG3GetFrame(void) {\r\tmpeg3_t *  file;\r\tsqInt result;\r\tsqInt fileHandle;\r\tsqInt aNumber;\r\tsqInt _return_value;\r\r\tfileHandle = interpreterProxy->stackValue(1);\r\taNumber = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfile = mpeg3tValueOf(fileHandle);\r\tif (file == null) {\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, 0);\r\t\treturn null;\r\t}\r\tif (aNumber < 0) {\r\t\tinterpreterProxy->success(0);\r\t\treturn null;\r\t}\r\tif (aNumber >= (result = mpeg3_total_vstreams(file))) {\r\t\tinterpreterProxy->success(0);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, 0);\r\t\treturn null;\r\t}\r\tresult = mpeg3_get_frame(file,aNumber);\r\t_return_value = interpreterProxy->floatObjectOf(result);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\r\r/*\tint mpeg3_video_width(mpeg3_t *file, int stream) */\r\rEXPORT(sqInt) primitiveMPEG3GetSample(void) {\r\tmpeg3_t *  file;\r\tsqInt result;\r\tsqInt fileHandle;\r\tsqInt aNumber;\r\tsqInt _return_value;\r\r\tfileHandle = interpreterProxy->stackValue(1);\r\taNumber = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfile = mpeg3tValueOf(fileHandle);\r\tif (file == null) {\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, 0);\r\t\treturn null;\r\t}\r\tif (aNumber < 0) {\r\t\tinterpreterProxy->success(0);\r\t\treturn null;\r\t}\r\tif (aNumber >= (result = mpeg3_total_astreams(file))) {\r\t\tinterpreterProxy->success(0);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, 0);\r\t\treturn null;\r\t}\r\tresult = mpeg3_get_sample(file,aNumber);\r\t_return_value = interpreterProxy->floatObjectOf(result);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\r\r/*\tdouble mpeg3_get_time(mpeg3_t *file) */\r\rEXPORT(sqInt) primitiveMPEG3GetTime(void) {\r\tmpeg3_t *  file;\r\tdouble  result;\r\tsqInt fileHandle;\r\tsqInt _return_value;\r\r\tfileHandle = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfile = mpeg3tValueOf(fileHandle);\r\tif (file == null) {\r\t\treturn null;\r\t}\r\tresult = mpeg3_get_time(file);\r\t_return_value = interpreterProxy->floatObjectOf(result);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\r\r/*\tint mpeg3_has_audio(mpeg3_t *file) */\r\rEXPORT(sqInt) primitiveMPEG3HasAudio(void) {\r\tmpeg3_t *  file;\r\tsqInt result;\r\tsqInt fileHandle;\r\tsqInt _return_value;\r\r\tfileHandle = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfile = mpeg3tValueOf(fileHandle);\r\tif (file == null) {\r\t\treturn null;\r\t}\r\tresult = mpeg3_has_audio(file);\r\t_return_value = (result? interpreterProxy->trueObject(): interpreterProxy->falseObject());\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\r\r/*\tint mpeg3_has_video(mpeg3_t *file) */\r\rEXPORT(sqInt) primitiveMPEG3HasVideo(void) {\r\tmpeg3_t *  file;\r\tsqInt result;\r\tsqInt fileHandle;\r\tsqInt _return_value;\r\r\tfileHandle = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfile = mpeg3tValueOf(fileHandle);\r\tif (file == null) {\r\t\treturn null;\r\t}\r\tresult = mpeg3_has_video(file);\r\t_return_value = (result? interpreterProxy->trueObject(): interpreterProxy->falseObject());\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\r\r/*\tmpeg3_t* mpeg3_open(char *path) */\r\rEXPORT(sqInt) primitiveMPEG3Open(void) {\r\tsqInt mpeg3Oop;\r\tmpeg3_t ** index;\r\tchar storage[1024];\r\tsqInt sz;\r\tchar *path;\r\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\r\tpath = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tsz = interpreterProxy->byteSizeOf((oopForPointer( path ) - BASE_HEADER_SIZE));\r\tinterpreterProxy->ioFilenamefromStringofLengthresolveAliases(storage, path, sz, 1);\r\tmpeg3Oop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), 4);\r\tindex = ((mpeg3_t **) (interpreterProxy->firstIndexableField(mpeg3Oop)));\r\t*index = mpeg3_open(storage,0); makeFileEntry(*index);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, mpeg3Oop);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveMPEG3OpenABuffer(void) {\r\tsqInt mpeg3Oop;\r\tmpeg3_t ** index;\r\tchar *path;\r\tsqInt size;\r\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(1)));\r\tpath = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(1))));\r\tsize = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tmpeg3Oop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), 4);\r\tindex = ((mpeg3_t **) (interpreterProxy->firstIndexableField(mpeg3Oop)));\r\t*index = mpeg3_open(path,size); makeFileEntry(*index);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, mpeg3Oop);\r\treturn null;\r}\r\r\r/*\tint mpeg3_previous_frame(mpeg3_t *file, int stream) */\r\rEXPORT(sqInt) primitiveMPEG3PreviousFrame(void) {\r\tmpeg3_t *  file;\r\tsqInt result;\r\tsqInt fileHandle;\r\tsqInt aNumber;\r\tsqInt _return_value;\r\r\tfileHandle = interpreterProxy->stackValue(1);\r\taNumber = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfile = mpeg3tValueOf(fileHandle);\r\tif (aNumber < 0) {\r\t\tinterpreterProxy->success(0);\r\t\treturn null;\r\t}\r\tif (file == null) {\r\t\treturn null;\r\t}\r\tif (aNumber >= (result = mpeg3_total_vstreams(file))) {\r\t\tinterpreterProxy->success(0);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, 0);\r\t\treturn null;\r\t}\r\tresult = mpeg3_previous_frame(file,aNumber);\r\t_return_value = interpreterProxy->integerObjectOf(result);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\r\r/*\tint mpeg3_reread_audio(mpeg3_t *file, \r\t\tfloat *output_f, \r\t\tshort *output_i, \r\t\tint channel, \r\t\tlong samples,\r\t\tint stream) */\r\rEXPORT(sqInt) primitiveMPEG3ReReadAudio(void) {\r\tmpeg3_t *  file;\r\tshort *  arrayBase;\r\tsqInt result;\r\tsqInt fileHandle;\r\tsqInt *anArray;\r\tsqInt aChannelNumber;\r\tsqInt aSampleNumber;\r\tsqInt aNumber;\r\tsqInt _return_value;\r\r\tfileHandle = interpreterProxy->stackValue(4);\r\tinterpreterProxy->success(interpreterProxy->isIndexable(interpreterProxy->stackValue(3)));\r\tanArray = ((int *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(3))));\r\taChannelNumber = interpreterProxy->stackIntegerValue(2);\r\taSampleNumber = interpreterProxy->stackIntegerValue(1);\r\taNumber = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfile = mpeg3tValueOf(fileHandle);\r\tif (file == null) {\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(6, 0);\r\t\treturn null;\r\t}\r\tif (aNumber < 0) {\r\t\tinterpreterProxy->success(0);\r\t\treturn null;\r\t}\r\tif (aNumber >= (result = mpeg3_total_astreams(file))) {\r\t\tinterpreterProxy->success(0);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(6, 0);\r\t\treturn null;\r\t}\r\tarrayBase = ((short *) anArray);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tresult = mpeg3_reread_audio(file,(float *) NULL,arrayBase,aChannelNumber,aSampleNumber,aNumber);\r\t_return_value = interpreterProxy->integerObjectOf(result);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(6, _return_value);\r\treturn null;\r}\r\r\r/*\tint mpeg3_read_audio(mpeg3_t *file, \r\t\tfloat *output_f, \r\t\tshort *output_i, \r\t\tint channel, \r\t\tlong samples,\r\t\tint stream) */\r\rEXPORT(sqInt) primitiveMPEG3ReadAudio(void) {\r\tmpeg3_t *  file;\r\tshort *  arrayBase;\r\tsqInt result;\r\tsqInt fileHandle;\r\tsqInt *anArray;\r\tsqInt aChannelNumber;\r\tsqInt aSampleNumber;\r\tsqInt aNumber;\r\tsqInt _return_value;\r\r\tfileHandle = interpreterProxy->stackValue(4);\r\tinterpreterProxy->success(interpreterProxy->isIndexable(interpreterProxy->stackValue(3)));\r\tanArray = ((int *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(3))));\r\taChannelNumber = interpreterProxy->stackIntegerValue(2);\r\taSampleNumber = interpreterProxy->stackIntegerValue(1);\r\taNumber = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfile = mpeg3tValueOf(fileHandle);\r\tif (file == null) {\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(6, 0);\r\t\treturn null;\r\t}\r\tif (aNumber < 0) {\r\t\tinterpreterProxy->success(0);\r\t\treturn null;\r\t}\r\tif (aNumber >= (result = mpeg3_total_astreams(file))) {\r\t\tinterpreterProxy->success(0);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(6, 0);\r\t\treturn null;\r\t}\r\tarrayBase = ((short *) anArray);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tresult = mpeg3_read_audio(file,(float *) NULL,arrayBase,aChannelNumber,aSampleNumber,aNumber);\r\t_return_value = interpreterProxy->integerObjectOf(result);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(6, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveMPEG3ReadFrameBufferOffset(void) {\r\tunsigned char  ** outputRowsPtr;\r\tunsigned char *bufferBaseAddr;\r\tsqInt i;\r\tmpeg3_t * file;\r\tsqInt result;\r\tsqInt fileHandle;\r\tusqInt *aBuffer;\r\tsqInt aBufferOffset;\r\tsqInt xNumber;\r\tsqInt yNumber;\r\tsqInt width;\r\tsqInt height;\r\tsqInt outWidth;\r\tsqInt outHeight;\r\tsqInt model;\r\tsqInt aNumber;\r\tsqInt aByteNumber;\r\tsqInt _return_value;\r\r\tfileHandle = interpreterProxy->stackValue(11);\r\tinterpreterProxy->success(interpreterProxy->isWords(interpreterProxy->stackValue(10)));\r\taBuffer = ((unsigned *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(10))));\r\taBufferOffset = interpreterProxy->stackIntegerValue(9);\r\txNumber = interpreterProxy->stackIntegerValue(8);\r\tyNumber = interpreterProxy->stackIntegerValue(7);\r\twidth = interpreterProxy->stackIntegerValue(6);\r\theight = interpreterProxy->stackIntegerValue(5);\r\toutWidth = interpreterProxy->stackIntegerValue(4);\r\toutHeight = interpreterProxy->stackIntegerValue(3);\r\tmodel = interpreterProxy->stackIntegerValue(2);\r\taNumber = interpreterProxy->stackIntegerValue(1);\r\taByteNumber = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfile = mpeg3tValueOf(fileHandle);\r\tif (file == null) {\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(13, 0);\r\t\treturn null;\r\t}\r\tif (aNumber < 0) {\r\t\tinterpreterProxy->success(0);\r\t\treturn null;\r\t}\r\tif (aNumber >= (result = mpeg3_total_vstreams(file))) {\r\t\tinterpreterProxy->success(0);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(13, 0);\r\t\treturn null;\r\t}\r\tbufferBaseAddr = ((unsigned char *) aBuffer);\r\toutputRowsPtr = (unsigned char **) memoryAllocate(1,sizeof(unsigned char*) * outHeight);\r\tfor (i = 0; i <= (outHeight - 1); i += 1) {\r\t\toutputRowsPtr[i] = ((bufferBaseAddr + aBufferOffset) + (aByteNumber * i));\r\t}\r\tresult = mpeg3_read_frame(file,outputRowsPtr,xNumber,yNumber,width,height,outWidth,outHeight,model,aNumber);\r\tmemoryFree(outputRowsPtr);\r\t_return_value = interpreterProxy->integerObjectOf(result);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(13, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveMPEG3ReadFrame(void) {\r\tunsigned char  **  outputRowsPtr;\r\tunsigned char *bufferBaseAddr;\r\tsqInt i;\r\tmpeg3_t *  file;\r\tsqInt result;\r\tsqInt fileHandle;\r\tusqInt *aBuffer;\r\tsqInt xNumber;\r\tsqInt yNumber;\r\tsqInt width;\r\tsqInt height;\r\tsqInt outWidth;\r\tsqInt outHeight;\r\tsqInt model;\r\tsqInt aNumber;\r\tsqInt aByteNumber;\r\tsqInt _return_value;\r\r\tfileHandle = interpreterProxy->stackValue(10);\r\tinterpreterProxy->success(interpreterProxy->isWords(interpreterProxy->stackValue(9)));\r\taBuffer = ((unsigned *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(9))));\r\txNumber = interpreterProxy->stackIntegerValue(8);\r\tyNumber = interpreterProxy->stackIntegerValue(7);\r\twidth = interpreterProxy->stackIntegerValue(6);\r\theight = interpreterProxy->stackIntegerValue(5);\r\toutWidth = interpreterProxy->stackIntegerValue(4);\r\toutHeight = interpreterProxy->stackIntegerValue(3);\r\tmodel = interpreterProxy->stackIntegerValue(2);\r\taNumber = interpreterProxy->stackIntegerValue(1);\r\taByteNumber = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfile = mpeg3tValueOf(fileHandle);\r\tif (file == null) {\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(12, 0);\r\t\treturn null;\r\t}\r\tif (aNumber < 0) {\r\t\tinterpreterProxy->success(0);\r\t\treturn null;\r\t}\r\tif (aNumber >= (result = mpeg3_total_vstreams(file))) {\r\t\tinterpreterProxy->success(0);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(12, 0);\r\t\treturn null;\r\t}\r\tbufferBaseAddr = ((unsigned char *) aBuffer);\r\toutputRowsPtr = (unsigned char **) memoryAllocate(1,sizeof(unsigned char*) * outHeight);\r\tfor (i = 0; i <= (outHeight - 1); i += 1) {\r\t\toutputRowsPtr[i] = (bufferBaseAddr + (aByteNumber * i));\r\t}\r\tresult = mpeg3_read_frame(file,outputRowsPtr,xNumber,yNumber,width,height,outWidth,outHeight,model,aNumber);\r\tmemoryFree(outputRowsPtr);\r\t_return_value = interpreterProxy->integerObjectOf(result);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(12, _return_value);\r\treturn null;\r}\r\r\r/*\tint mpeg3_sample_rate(mpeg3_t *file,int stream) */\r\rEXPORT(sqInt) primitiveMPEG3SampleRate(void) {\r\tmpeg3_t *  file;\r\tsqInt result;\r\tsqInt fileHandle;\r\tsqInt aNumber;\r\tsqInt _return_value;\r\r\tfileHandle = interpreterProxy->stackValue(1);\r\taNumber = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfile = mpeg3tValueOf(fileHandle);\r\tif (file == null) {\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, 0);\r\t\treturn null;\r\t}\r\tif (aNumber < 0) {\r\t\tinterpreterProxy->success(0);\r\t\treturn null;\r\t}\r\tif (aNumber >= (result = mpeg3_total_astreams(file))) {\r\t\tinterpreterProxy->success(0);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, 0);\r\t\treturn null;\r\t}\r\tresult = mpeg3_sample_rate(file,aNumber);\r\t_return_value = interpreterProxy->integerObjectOf(result);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\r\r/*\tint mpeg3_seek_percentage(mpeg3_t *file, double percentage) */\r\rEXPORT(sqInt) primitiveMPEG3SeekPercentage(void) {\r\tmpeg3_t *  file;\r\tsqInt result;\r\tsqInt fileHandle;\r\tdouble aNumber;\r\tsqInt _return_value;\r\r\tfileHandle = interpreterProxy->stackValue(1);\r\taNumber = interpreterProxy->stackFloatValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfile = mpeg3tValueOf(fileHandle);\r\tif (aNumber < 0.0) {\r\t\tinterpreterProxy->success(0);\r\t\treturn null;\r\t}\r\tif (aNumber > 1.0) {\r\t\tinterpreterProxy->success(0);\r\t\treturn null;\r\t}\r\tif (file == null) {\r\t\treturn null;\r\t}\r\tresult = mpeg3_seek_percentage(file,aNumber);\r\t_return_value = interpreterProxy->integerObjectOf(result);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\r\r/*\tint mpeg3_set_cpus(mpeg3_t *file, int cpus) */\r\rEXPORT(sqInt) primitiveMPEG3SetCpus(void) {\r\tmpeg3_t *  file;\r\tsqInt fileHandle;\r\tsqInt cpus;\r\r\tfileHandle = interpreterProxy->stackValue(1);\r\tcpus = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfile = mpeg3tValueOf(fileHandle);\r\tif (cpus < 0) {\r\t\tinterpreterProxy->success(0);\r\t\treturn null;\r\t}\r\tif (file == null) {\r\t\treturn null;\r\t}\r\tmpeg3_set_cpus(file,cpus);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(2);\r\treturn null;\r}\r\r\r/*\tint mpeg3_set_frame(mpeg3_t *file, long frame, int stream) */\r\rEXPORT(sqInt) primitiveMPEG3SetFrame(void) {\r\tmpeg3_t *  file;\r\tsqInt result;\r\tsqInt fileHandle;\r\tdouble aFrameNumber;\r\tsqInt aNumber;\r\tsqInt _return_value;\r\r\tfileHandle = interpreterProxy->stackValue(2);\r\taFrameNumber = interpreterProxy->stackFloatValue(1);\r\taNumber = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfile = mpeg3tValueOf(fileHandle);\r\tif (file == null) {\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(4, 0);\r\t\treturn null;\r\t}\r\tif (aNumber < 0) {\r\t\tinterpreterProxy->success(0);\r\t\treturn null;\r\t}\r\tif (aNumber >= (result = mpeg3_total_vstreams(file))) {\r\t\tinterpreterProxy->success(0);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(4, 0);\r\t\treturn null;\r\t}\r\tresult = mpeg3_set_frame(file,(long) aFrameNumber,aNumber);\r\t_return_value = interpreterProxy->integerObjectOf(result);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(4, _return_value);\r\treturn null;\r}\r\r\r/*\tint mpeg3_set_mmx(mpeg3_t *file, int use_mmx) */\r\rEXPORT(sqInt) primitiveMPEG3SetMmx(void) {\r\tmpeg3_t *  file;\r\tsqInt fileHandle;\r\tsqInt mmx;\r\r\tfileHandle = interpreterProxy->stackValue(1);\r\tmmx = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(0));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfile = mpeg3tValueOf(fileHandle);\r\tif (file == null) {\r\t\treturn null;\r\t}\r\tmpeg3_set_mmx(file,mmx);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(2);\r\treturn null;\r}\r\r\r/*\tint mpeg3_set_sample(mpeg3_t *file, long sample, int stream) */\r\rEXPORT(sqInt) primitiveMPEG3SetSample(void) {\r\tmpeg3_t *  file;\r\tsqInt result;\r\tsqInt fileHandle;\r\tdouble aSampleNumber;\r\tsqInt aNumber;\r\tsqInt _return_value;\r\r\tfileHandle = interpreterProxy->stackValue(2);\r\taSampleNumber = interpreterProxy->stackFloatValue(1);\r\taNumber = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfile = mpeg3tValueOf(fileHandle);\r\tif (file == null) {\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(4, 0);\r\t\treturn null;\r\t}\r\tif (aNumber < 0) {\r\t\tinterpreterProxy->success(0);\r\t\treturn null;\r\t}\r\tif (aNumber >= (result = mpeg3_total_astreams(file))) {\r\t\tinterpreterProxy->success(0);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(4, 0);\r\t\treturn null;\r\t}\r\tif (aSampleNumber < 0) {\r\t\tinterpreterProxy->success(0);\r\t\treturn null;\r\t}\r\tresult = mpeg3_set_sample(file,aSampleNumber,aNumber);\r\t_return_value = interpreterProxy->integerObjectOf(result);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(4, _return_value);\r\treturn null;\r}\r\r\r/*\tdouble mpeg3_tell_percentage(mpeg3_t *file) */\r\rEXPORT(sqInt) primitiveMPEG3TellPercentage(void) {\r\tmpeg3_t *  file;\r\tdouble  result;\r\tsqInt fileHandle;\r\tsqInt _return_value;\r\r\tfileHandle = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfile = mpeg3tValueOf(fileHandle);\r\tif (file == null) {\r\t\treturn null;\r\t}\r\tresult = mpeg3_tell_percentage(file);\r\t_return_value = interpreterProxy->floatObjectOf(result);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\r\r/*\tint mpeg3_total_astreams(mpeg3_t *file) */\r\rEXPORT(sqInt) primitiveMPEG3TotalAStreams(void) {\r\tmpeg3_t *  file;\r\tsqInt result;\r\tsqInt fileHandle;\r\tsqInt _return_value;\r\r\tfileHandle = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfile = mpeg3tValueOf(fileHandle);\r\tif (file == null) {\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(2, 0);\r\t\treturn null;\r\t}\r\tresult = mpeg3_total_astreams(file);\r\t_return_value = interpreterProxy->integerObjectOf(result);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\r\r/*\tint mpeg3_total_vstreams(mpeg3_t *file) */\r\rEXPORT(sqInt) primitiveMPEG3TotalVStreams(void) {\r\tmpeg3_t *  file;\r\tsqInt result;\r\tsqInt fileHandle;\r\tsqInt _return_value;\r\r\tfileHandle = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfile = mpeg3tValueOf(fileHandle);\r\tif (file == null) {\r\t\treturn null;\r\t}\r\tresult = mpeg3_total_vstreams(file);\r\t_return_value = interpreterProxy->integerObjectOf(result);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(2, _return_value);\r\treturn null;\r}\r\r\r/*\tlong mpeg3_video_frames(mpeg3_t *file, int stream) */\r\rEXPORT(sqInt) primitiveMPEG3VideoFrames(void) {\r\tmpeg3_t *  file;\r\tsqInt result;\r\tsqInt fileHandle;\r\tsqInt aNumber;\r\tsqInt _return_value;\r\r\tfileHandle = interpreterProxy->stackValue(1);\r\taNumber = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfile = mpeg3tValueOf(fileHandle);\r\tif (file == null) {\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, 0);\r\t\treturn null;\r\t}\r\tif (aNumber < 0) {\r\t\tinterpreterProxy->success(0);\r\t\treturn null;\r\t}\r\tif (aNumber >= (result = mpeg3_total_vstreams(file))) {\r\t\tinterpreterProxy->success(0);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, 0);\r\t\treturn null;\r\t}\r\tresult = mpeg3_video_frames(file,aNumber);\r\t_return_value = interpreterProxy->floatObjectOf(result);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\r\r/*\tint mpeg3_video_height(mpeg3_t *file,int stream) */\r\rEXPORT(sqInt) primitiveMPEG3VideoHeight(void) {\r\tmpeg3_t *  file;\r\tsqInt result;\r\tsqInt fileHandle;\r\tsqInt aNumber;\r\tsqInt _return_value;\r\r\tfileHandle = interpreterProxy->stackValue(1);\r\taNumber = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfile = mpeg3tValueOf(fileHandle);\r\tif (file == null) {\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, 0);\r\t\treturn null;\r\t}\r\tif (aNumber < 0) {\r\t\tinterpreterProxy->success(0);\r\t\treturn null;\r\t}\r\tif (aNumber >= (result = mpeg3_total_vstreams(file))) {\r\t\tinterpreterProxy->success(0);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, 0);\r\t\treturn null;\r\t}\r\tresult = mpeg3_video_height(file,aNumber);\r\t_return_value = interpreterProxy->integerObjectOf(result);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\r\r/*\tint mpeg3_video_width(mpeg3_t *file, int stream) */\r\rEXPORT(sqInt) primitiveMPEG3VideoWidth(void) {\r\tmpeg3_t *  file;\r\tsqInt result;\r\tsqInt fileHandle;\r\tsqInt aNumber;\r\tsqInt _return_value;\r\r\tfileHandle = interpreterProxy->stackValue(1);\r\taNumber = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfile = mpeg3tValueOf(fileHandle);\r\tif (file == null) {\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, 0);\r\t\treturn null;\r\t}\r\tif (aNumber < 0) {\r\t\tinterpreterProxy->success(0);\r\t\treturn null;\r\t}\r\tif (aNumber >= (result = mpeg3_total_vstreams(file))) {\r\t\tinterpreterProxy->success(0);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, 0);\r\t\treturn null;\r\t}\r\tresult = mpeg3_video_width(file,aNumber);\r\t_return_value = interpreterProxy->integerObjectOf(result);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\rstatic sqInt removeFileEntry(mpeg3_t *  aMpegFile) {\r\tsqInt i;\r\r\tfor (i = 1; i <= maximumNumberOfFilesToWatch; i += 1) {\r\t\tif ((mpegFiles[i]) == aMpegFile) {\r\t\t\tmpegFiles[i] = 0;\r\t\t\treturn 1;\r\t\t}\r\t}\r\treturn 0;\r}\r\r\r/*\tNote: This is coded so that is can be run from Squeak. */\r\rEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter) {\r\tsqInt ok;\r\r\tinterpreterProxy = anInterpreter;\r\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\r\tif (ok == 0) {\r\t\treturn 0;\r\t}\r\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\r\treturn ok;\r}\r\rEXPORT(sqInt) shutdownModule(void) {\r\tsqInt i;\r\r\tfor (i = 1; i <= maximumNumberOfFilesToWatch; i += 1) {\r\t\tif ((mpegFiles[i]) != 0) {\r\t\t\tmpeg3_close(mpegFiles[i]);\r\t\t\tmpegFiles[i] = 0;\r\t\t}\r\t}\r\treturn true;\r}\r\rstatic sqInt sqAssert(sqInt aBool) {\r\t/* missing DebugCode */;\r}\r\r\r#ifdef SQUEAK_BUILTIN_PLUGIN\r\r\rvoid* Mpeg3Plugin_exports[][3] = {\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3Close\", (void*)primitiveMPEG3Close},\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3SeekPercentage\", (void*)primitiveMPEG3SeekPercentage},\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3VideoFrames\", (void*)primitiveMPEG3VideoFrames},\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3ReadFrame\", (void*)primitiveMPEG3ReadFrame},\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3HasVideo\", (void*)primitiveMPEG3HasVideo},\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3GetFrame\", (void*)primitiveMPEG3GetFrame},\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3VideoWidth\", (void*)primitiveMPEG3VideoWidth},\r\t{\"Mpeg3Plugin\", \"shutdownModule\", (void*)shutdownModule},\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3ReReadAudio\", (void*)primitiveMPEG3ReReadAudio},\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3GetTime\", (void*)primitiveMPEG3GetTime},\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3SetCpus\", (void*)primitiveMPEG3SetCpus},\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3AudioSamples\", (void*)primitiveMPEG3AudioSamples},\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3ReadAudio\", (void*)primitiveMPEG3ReadAudio},\r\t{\"Mpeg3Plugin\", \"getModuleName\", (void*)getModuleName},\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3SetSample\", (void*)primitiveMPEG3SetSample},\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3GenerateToc\", (void*)primitiveMPEG3GenerateToc},\r\t{\"Mpeg3Plugin\", \"setInterpreter\", (void*)setInterpreter},\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3CheckSig\", (void*)primitiveMPEG3CheckSig},\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3SampleRate\", (void*)primitiveMPEG3SampleRate},\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3GetSample\", (void*)primitiveMPEG3GetSample},\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3OpenABuffer\", (void*)primitiveMPEG3OpenABuffer},\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3EndOfVideo\", (void*)primitiveMPEG3EndOfVideo},\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3VideoHeight\", (void*)primitiveMPEG3VideoHeight},\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3AudioChannels\", (void*)primitiveMPEG3AudioChannels},\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3TotalVStreams\", (void*)primitiveMPEG3TotalVStreams},\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3FrameRate\", (void*)primitiveMPEG3FrameRate},\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3TellPercentage\", (void*)primitiveMPEG3TellPercentage},\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3HasAudio\", (void*)primitiveMPEG3HasAudio},\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3SetFrame\", (void*)primitiveMPEG3SetFrame},\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3PreviousFrame\", (void*)primitiveMPEG3PreviousFrame},\r\t{\"Mpeg3Plugin\", \"initialiseModule\", (void*)initialiseModule},\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3ReadFrameBufferOffset\", (void*)primitiveMPEG3ReadFrameBufferOffset},\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3SetMmx\", (void*)primitiveMPEG3SetMmx},\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3TotalAStreams\", (void*)primitiveMPEG3TotalAStreams},\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3DropFrames\", (void*)primitiveMPEG3DropFrames},\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3EndOfAudio\", (void*)primitiveMPEG3EndOfAudio},\r\t{\"Mpeg3Plugin\", \"primitiveMPEG3Open\", (void*)primitiveMPEG3Open},\r\t{NULL, NULL, NULL}\r};\r\r\r#endif /* ifdef SQ_BUILTIN_PLUGIN */\r\r"
  },
  {
    "path": "vm/src/from_squeak/unix/src/plugins/RomePlugin/RomePlugin.c",
    "content": "/* Automatically generated from Squeak on 23 January 2011 6:31:55 pm \r   by VMMaker 4.4.7\r */\r\r#include <math.h>\r#include <stdio.h>\r#include <stdlib.h>\r#include <string.h>\r#include <time.h>\r\r/* Default EXPORT macro that does nothing (see comment in sq.h): */\r#define EXPORT(returnType) returnType\r\r/* Do not include the entire sq.h file but just those parts needed. */\r/*  The virtual machine proxy definition */\r#include \"sqVirtualMachine.h\"\r/* Configuration options */\r#include \"sqConfig.h\"\r/* Platform specific definitions */\r#include \"sqPlatformSpecific.h\"\r\r#define true 1\r#define false 0\r#define null 0  /* using 'null' because nil is predefined in Think C */\r#ifdef SQUEAK_BUILTIN_PLUGIN\r#undef EXPORT\r// was #undef EXPORT(returnType) but screws NorCroft cc\r#define EXPORT(returnType) static returnType\r#endif\r#include <cairo.h>\r#include <cairo-ft.h>\r#include <pango/pangocairo.h>\r#include \"SurfacePlugin.h\"\r#define NUM_OF(array) (sizeof (array) / sizeof *(array))\r#define lastIndex(array) (NUM_OF(array) - 1)\r#define degrees(a) (a * 3.141592653589793 / 180.0)\r\r#define log(msg) fprintf(stderr, \"Squeak-Rome: \" msg \"\\n\")\r#define logwith(msg, a) fprintf(stderr, \"Squeak-Rome: \" msg \"\\n\", a)\r#define logwithwith(msg, a, b) fprintf(stderr, \"Squeak-Rome: \" msg \"\\n\", a, b)\r#define logwithwithwith(msg, a, b, c) fprintf(stderr, \"Squeak-Rome: \" msg \"\\n\", a, b, c)\r#define logwithwithwithwith(msg, a, b, c, d) fprintf(stderr, \"Squeak-Rome: \" msg \"\\n\", a, b, c, d)\r#define logwithwithwithwithwith(msg, a, b, c, d, e) fprintf(stderr, \"Squeak-Rome: \" msg \"\\n\", a, b, c, d, e)\r\r#define primFail interpreterProxy->primitiveFail()\r#define fail(msg) log(msg \"!\"); primFail\r#define failwith(msg, a) logwith(msg \"!\", a); primFail\r#define failwithwith(msg, a, b) logwithwith(msg \"!\", a, b); primFail\r\r\r#include \"sqMemoryAccess.h\"\r\r\r/*** Constants ***/\r#define CairoExtendRepeat CAIRO_EXTEND_REPEAT\r#define CairoOperatorSource CAIRO_OPERATOR_SOURCE\r#define CanvasFlagFill 256\r#define CanvasFlagStroke 255\r#define CanvasFlagsIndex 2\r#define CanvasHandleIndex 0\r#define CanvasInstSize 8\r#define CanvasStrokeColorIndex 3\r#define CanvasTargetIndex 1\r#define FormBitsIndex 0\r#define FormDepthIndex 3\r#define FormHeightIndex 2\r#define FormInstSize 5\r#define FormWidthIndex 1\r#define PluginVersion 39\r#define TextLineBottomIndex 3\r#define TextLineEndIndex 5\r#define TextLineInternalSpaceIndex 6\r#define TextLineLeftIndex 0\r#define TextLinePaddingWidthIndex 7\r#define TextLineRightIndex 1\r#define TextLineStartIndex 4\r#define TextLineTopIndex 2\r\r/*** Function Prototypes ***/\rstatic sqInt addAlignmentinto(sqInt attrArrayOop, PangoAttrList *pangoAttrList);\rstatic sqInt addColorinto(sqInt attrArrayOop, PangoAttrList *pangoAttrList);\rstatic void addColorStopTooffsetrgbalpha(cairo_pattern_t*pattern, sqInt intOffset, sqInt rgb, sqInt alpha);\rstatic sqInt addDefaultInto(PangoAttrList *pangoAttrList);\rstatic sqInt addEmphasisinto(sqInt attrArrayOop, PangoAttrList *pangoAttrList);\rstatic sqInt addFontinto(sqInt attrArrayOop, PangoAttrList *pangoAttrList);\rstatic sqInt addLanguageinto(sqInt attrArrayOop, PangoAttrList *pangoAttrList);\rstatic sqInt addSelectionAtpixelwith(PangoRectangle *rect, unsigned int c, cairo_t*context);\rstatic sqInt addSelectionFromtopixelinto(sqInt start, sqInt end, unsigned int c, PangoAttrList *pangoAttrList);\rstatic cairo_t* contextFrom(sqInt canvasOop);\rstatic sqInt createContextFor(sqInt canvasOop);\rstatic sqInt createSurfaceFor(sqInt formOop);\rstatic sqInt destroyContextFor(sqInt canvasOop);\rstatic sqInt destroySurface(sqInt surfaceID);\rstatic void fillOrStrokefrom(cairo_t*context, sqInt canvasOop);\rstatic cairo_surface_t* findSurface(sqInt surfaceID);\rstatic VirtualMachine * getInterpreter(void);\r#pragma export on\rEXPORT(const char*) getModuleName(void);\r#pragma export off\rstatic sqInt getSurfaceFormatgetWgetHgetDgetMsb(cairo_surface_t *surfaceHandle, int*wReturn, int*hReturn, int*dReturn, int*mReturn);\rstatic sqInt halt(void);\r#pragma export on\rEXPORT(sqInt) initialiseModule(void);\r#pragma export off\rstatic sqInt leadingCharOf(unsigned int value);\rstatic sqInt loadSurfacePlugin(void);\rstatic unsigned char* lockSurfacegetPitchxywh(cairo_surface_t*surfaceHandle, int*pitchReturn, sqInt x, sqInt y, sqInt w, sqInt h);\r#pragma export on\rEXPORT(sqInt) moduleUnloaded(char *aModuleName);\r#pragma export off\rstatic sqInt msg(char *s);\rstatic void polyPathfrom(cairo_t*context, sqInt pointsOop);\r#pragma export on\rEXPORT(sqInt) primitivePangoBlockAtIndex(void);\rEXPORT(sqInt) primitiveClear(void);\rEXPORT(sqInt) primitiveClipRectangleLeftRightTopBottom(void);\rEXPORT(sqInt) primitiveClose(void);\rEXPORT(sqInt) primitivePangoComposeString(void);\rEXPORT(sqInt) primitivePangoComposeString2(void);\rEXPORT(sqInt) primitiveCreateFormHandle(void);\rEXPORT(sqInt) primitiveDestroyFormHandle(void);\rEXPORT(sqInt) primitiveDrawArcRadiusXYFromTo(void);\rEXPORT(sqInt) primitiveDrawCurveFromXYviaXYandXYtoXY(void);\rEXPORT(sqInt) primitiveDrawCurveFromXYviaXYtoXY(void);\rEXPORT(sqInt) primitiveDrawGeneralBezierShape(void);\rEXPORT(sqInt) primitiveDrawImageSrcLRTBDestLRTB(void);\rEXPORT(sqInt) primitiveDrawLineFromXYtoXY(void);\rEXPORT(sqInt) primitiveDrawOvalLeftRightTopBottom(void);\rEXPORT(sqInt) primitiveDrawPolygon(void);\rEXPORT(sqInt) primitiveDrawPolyline(void);\rEXPORT(sqInt) primitiveDrawRectangleLeftRightTopBottom(void);\rEXPORT(sqInt) primitiveDrawRoundRectLeftRightTopBottomRadiusCorner(void);\rEXPORT(sqInt) primitiveDrawZeroTerminatedUtf8StringXY(void);\rEXPORT(sqInt) primitiveFillBitmapOriginXYdirectionXYnormalXYRepeatImage(void);\rEXPORT(sqInt) primitiveFillColorAlpha(void);\rEXPORT(sqInt) primitiveFillLinearOriginXYdirectionXYcolorStops(void);\rEXPORT(sqInt) primitiveFillRadialOriginXYdirectionXYnormalXYcolorStops(void);\rEXPORT(sqInt) primitiveFontFace(void);\rEXPORT(sqInt) primitiveFontSize(void);\rEXPORT(sqInt) primitiveGetLineWidth(void);\rEXPORT(sqInt) primitivePangoFontDescriptionIndex(void);\rEXPORT(sqInt) primitiveGetTransform(void);\rEXPORT(sqInt) primitivePangoIndexAtPoint(void);\rEXPORT(sqInt) primitiveLanguageAttributes(void);\rEXPORT(sqInt) primitiveOpen(void);\rEXPORT(sqInt) primitivePangoIsAvailable(void);\rEXPORT(sqInt) primitivePluginVersion(void);\rEXPORT(sqInt) primitiveRestoreState(void);\rEXPORT(sqInt) primitiveRotateBy(void);\rEXPORT(sqInt) primitiveSaveState(void);\rEXPORT(sqInt) primitiveScaleBy(void);\rEXPORT(sqInt) primitiveSetLineWidth(void);\rEXPORT(sqInt) primitiveSetTransform(void);\rEXPORT(sqInt) primitivePangoShowString(void);\rEXPORT(sqInt) primitiveShowZeroTerminatedUtf8StringXY(void);\rEXPORT(sqInt) primitiveStencilImageSrcLRTBDestLRTB(void);\rEXPORT(sqInt) primitiveTransformBy(void);\rEXPORT(sqInt) primitiveTranslateBy(void);\rEXPORT(sqInt) primitiveUTF8StringWith2Indexes(void);\rEXPORT(sqInt) primitiveUTF8StringWithIndex(void);\r#pragma export off\rstatic sqInt putCharintoat(sqInt c, unsigned char*utf8String, sqInt utf8Index);\rstatic sqInt registerSurface(cairo_surface_t*surfaceHandle);\r#pragma export on\rEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\r#pragma export off\rstatic void setSourcergbalpha(cairo_t*context, sqInt rgb, sqInt alpha);\rstatic sqInt showSurfacexywh(cairo_surface_t *surfaceHandle, sqInt x, sqInt y, sqInt w, sqInt h);\r#pragma export on\rEXPORT(sqInt) shutdownModule(void);\r#pragma export off\rstatic sqInt sqAssert(sqInt aBool);\rstatic sqInt sqCharCountInfromto(unsigned char* aString, sqInt from, sqInt to);\rstatic void strokefrom(cairo_t*context, sqInt canvasOop);\rstatic cairo_surface_t* surfaceFrom(sqInt formOop);\rstatic sqInt translateSqAttrsToPangoAttrsinto(sqInt sqAttrsArrayOop, PangoAttrList *pangoAttrList);\rstatic sqInt unlockSurfacexywh(cairo_surface_t*surfaceHandle, sqInt x, sqInt y, sqInt w, sqInt h);\rstatic sqInt unregisterSurface(sqInt surfaceID);\rstatic sqInt utf8CountFor(unsigned int value);\r/*** Variables ***/\rstatic cairo_t* contexts[64];\rstatic PangoFontDescription *defaultFontDescription;\rstatic fn_ioFindSurface findSurfaceFn;\rstatic PangoFontDescription *fontDescriptions[256];\rstatic int formatToDepth[] = {\r32, 32, 8, 1, 16};\r\r#ifdef SQUEAK_BUILTIN_PLUGIN\rextern\r#endif\rstruct VirtualMachine* interpreterProxy;\rstatic sqInt maxSurfaceID;\rstatic const char *moduleName =\r#ifdef SQUEAK_BUILTIN_PLUGIN\r\t\"RomePlugin Aeneas.39 23 January 2011 (i)\"\r#else\r\t\"RomePlugin Aeneas.39 23 January 2011 (e)\"\r#endif\r;\rstatic fn_ioRegisterSurface registerSurfaceFn;\rstatic sqSurfaceDispatch surfaceDispatch = {\r  1,\r  0,\r  (fn_getSurfaceFormat) getSurfaceFormatgetWgetHgetDgetMsb,\r  (fn_lockSurface) lockSurfacegetPitchxywh,\r  (fn_unlockSurface) unlockSurfacexywh,\r  (fn_showSurface) showSurfacexywh\r};\rstatic fn_ioUnregisterSurface unregisterSurfaceFn;\rstatic int utf8Headers[] = {\r0, 192, 224, 240, 248, 252, 254, 255};\r\r\rstatic sqInt addAlignmentinto(sqInt attrArrayOop, PangoAttrList *pangoAttrList) {\r\tsqInt start;\r\tsqInt alignment;\r\tint pangoAlignment;\r\tsqInt end;\r\tsqInt *attrArray;\r\r\tattrArray = interpreterProxy->firstIndexableField(attrArrayOop);\r\tstart = ((attrArray[1]) >> 1);\r\tend = ((attrArray[2]) >> 1);\r\talignment = ((attrArray[3]) >> 1);\r\tif (alignment == 0) {\r\t\tpangoAlignment = PANGO_ALIGN_LEFT;\r\t}\r\tif (alignment == 1) {\r\t\tpangoAlignment = PANGO_ALIGN_RIGHT;\r\t}\r\tif (alignment == 2) {\r\t\tpangoAlignment = PANGO_ALIGN_CENTER;\r\t}\r\tif (alignment == 3) {\r\t\tnull;\r\t}\r}\r\rstatic sqInt addColorinto(sqInt attrArrayOop, PangoAttrList *pangoAttrList) {\r\tsqInt start;\r\tsqInt r;\r\tsqInt b;\r\tPangoAttribute *pangoAttr;\r\tsqInt end;\r\tsqInt g;\r\tsqInt alpha;\r\tsqInt *attrArray;\r\tunsigned int c;\r\r\tattrArray = interpreterProxy->firstIndexableField(attrArrayOop);\r\tstart = ((attrArray[1]) >> 1);\r\tend = ((attrArray[2]) >> 1);\r\r\t/* self log: 'color: %u' with: c. */\r\r\tc = interpreterProxy->positive32BitValueOf(attrArray[3]);\r\talpha = ((usqInt) (c && 4278190080U)) >> 24;\r\tr = ((usqInt) (c & 16711680)) >> 16;\r\tg = ((usqInt) (c & 65280)) >> 8;\r\tb = c & 255;\r\tif (!(r == 0)) {\r\t\tr = r * 257;\r\t}\r\tif (!(g == 0)) {\r\t\tg = g * 257;\r\t}\r\tif (!(b == 0)) {\r\t\tb = b * 257;\r\t}\r\tpangoAttr = pango_attr_foreground_new(r, g, b);\r\tpangoAttr->start_index = start;\r\tpangoAttr->end_index = end;\r\tpango_attr_list_change(pangoAttrList, pangoAttr);\r}\r\rstatic void addColorStopTooffsetrgbalpha(cairo_pattern_t*pattern, sqInt intOffset, sqInt rgb, sqInt alpha) {\r\tsqInt b;\r\tsqInt r;\r\tsqInt g;\r\r\tr = (((usqInt) rgb) >> 20) & 1023;\r\tg = (((usqInt) rgb) >> 10) & 1023;\r\tb = (((usqInt) rgb) >> 0) & 1023;\r\tif (alpha == 255) {\r\t\tcairo_pattern_add_color_stop_rgb(pattern, intOffset / 65536.0, r / 1023.0, g / 1023.0, b / 1023.0);\r\t} else {\r\t\tcairo_pattern_add_color_stop_rgba(pattern, intOffset / 65536.0, r / 1023.0, g / 1023.0, b / 1023.0, alpha / 255.0);\r\t}\r}\r\rstatic sqInt addDefaultInto(PangoAttrList *pangoAttrList) {\r\tPangoAttribute *pangoAttr;\r\tPangoLanguage *lang;\r\r\tpangoAttr = pango_attr_foreground_new(0, 0, 1);\r\tpangoAttr->start_index = 0;\r\tpangoAttr->end_index = 0x7fffffff;\r\tpango_attr_list_insert(pangoAttrList, pangoAttr);\r\tpangoAttr = pango_attr_font_desc_new(defaultFontDescription);\r\tpangoAttr->start_index = 0;\r\tpangoAttr->end_index = 0x7fffffff;\r\tpango_attr_list_insert(pangoAttrList, pangoAttr);\r\tlang = pango_language_from_string(\"en-US\");\r\tpangoAttr = pango_attr_language_new(lang);\r\tpangoAttr->start_index = 0;\r\tpangoAttr->end_index = 0x7fffffff;\r\tpango_attr_list_insert(pangoAttrList, pangoAttr);\r}\r\rstatic sqInt addEmphasisinto(sqInt attrArrayOop, PangoAttrList *pangoAttrList) {\r\tsqInt start;\r\tPangoAttribute *pangoAttr;\r\tsqInt end;\r\tsqInt *attrArray;\r\tsqInt c;\r\r\tattrArray = interpreterProxy->firstIndexableField(attrArrayOop);\r\tstart = ((attrArray[1]) >> 1);\r\tend = ((attrArray[2]) >> 1);\r\tc = ((attrArray[3]) >> 1);\r\tif (c & 1) {\r\t\tpangoAttr = pango_attr_weight_new(PANGO_WEIGHT_BOLD);\r\t\tpangoAttr->start_index = start;\r\t\tpangoAttr->end_index = end;\r\t\tpango_attr_list_change(pangoAttrList, pangoAttr);\r\t}\r\tif (c & 2) {\r\t\tpangoAttr = pango_attr_style_new(PANGO_STYLE_OBLIQUE);\r\t\tpangoAttr->start_index = start;\r\t\tpangoAttr->end_index = end;\r\t\tpango_attr_list_change(pangoAttrList, pangoAttr);\r\t}\r\tif (c & 4) {\r\t\tpangoAttr = pango_attr_underline_new(PANGO_UNDERLINE_SINGLE);\r\t\tpangoAttr->start_index = start;\r\t\tpangoAttr->end_index = end;\r\t\tpango_attr_list_change(pangoAttrList, pangoAttr);\r\t}\r\tif (c & 8) {\r\t\tpangoAttr = pango_attr_stretch_new(PANGO_STRETCH_CONDENSED);\r\t\tpangoAttr->start_index = start;\r\t\tpangoAttr->end_index = end;\r\t\tpango_attr_list_change(pangoAttrList, pangoAttr);\r\t}\r\tif (c & 16) {\r\t\tpangoAttr = pango_attr_strikethrough_new(1);\r\t\tpangoAttr->start_index = start;\r\t\tpangoAttr->end_index = end;\r\t\tpango_attr_list_change(pangoAttrList, pangoAttr);\r\t}\r}\r\rstatic sqInt addFontinto(sqInt attrArrayOop, PangoAttrList *pangoAttrList) {\r\tsqInt start;\r\tPangoFontDescription *desc;\r\tsqInt fontDescIndex;\r\tPangoAttribute *pangoAttr;\r\tsqInt end;\r\tsqInt *attrArray;\r\r\tattrArray = interpreterProxy->firstIndexableField(attrArrayOop);\r\tstart = ((attrArray[1]) >> 1);\r\tend = ((attrArray[2]) >> 1);\r\tfontDescIndex = interpreterProxy->fetchIntegerofObject(5, attrArray[4]);\r\tif (fontDescIndex < 0) {\r\t\treturn null;\r\t}\r\tif (fontDescIndex > 255) {\r\t\treturn null;\r\t}\r\tdesc = fontDescriptions[fontDescIndex];\r\tif (desc == null) {\r\t\treturn null;\r\t}\r\tpangoAttr = pango_attr_font_desc_new(desc);\r\tpangoAttr->start_index = start;\r\tpangoAttr->end_index = end;\r\tpango_attr_list_change(pangoAttrList, pangoAttr);\r}\r\rstatic sqInt addLanguageinto(sqInt attrArrayOop, PangoAttrList *pangoAttrList) {\r\tsqInt start;\r\tPangoAttribute *pangoAttr;\r\tsqInt end;\r\tsqInt lang;\r\tchar *cLang;\r\tsqInt *attrArray;\r\tPangoLanguage *pangoLang;\r\r\tattrArray = interpreterProxy->firstIndexableField(attrArrayOop);\r\tstart = ((attrArray[1]) >> 1);\r\tend = ((attrArray[2]) >> 1);\r\tlang = ((attrArray[3]) >> 1);\r\tif (lang == 0) {\r\t\tcLang = \"en-US\";\r\t}\r\tif (lang == 5) {\r\t\tcLang = \"ja-JP\";\r\t}\r\tif (lang == 6) {\r\t\tcLang = \"zh-CN\";\r\t}\r\tif (lang == 7) {\r\t\tcLang = \"ko-KR\";\r\t}\r\tif (lang == 9) {\r\t\tcLang = \"zh-TW\";\r\t}\r\tif (lang == 13) {\r\t\tcLang = \"el-EL\";\r\t}\r\tif (lang == 15) {\r\t\tcLang = \"ne-NP\";\r\t}\r\tpangoLang = pango_language_from_string(cLang);\r\tpangoAttr = pango_attr_language_new(pangoLang);\r\tpangoAttr->start_index = start;\r\tpangoAttr->end_index = end;\r\tpango_attr_list_change(pangoAttrList, pangoAttr);\r}\r\rstatic sqInt addSelectionAtpixelwith(PangoRectangle *rect, unsigned int c, cairo_t*context) {\r\tsqInt a;\r\tsqInt r;\r\tsqInt b;\r\tsqInt g;\r\r\ta = ((usqInt) (c & 4278190080U)) >> 24;\r\tif (a == 0) {\r\t\treturn null;\r\t}\r\tr = ((usqInt) (c & 16711680)) >> 16;\r\tg = ((usqInt) (c & 65280)) >> 8;\r\tb = c & 255;\r\tcairo_save(context);\r\tcairo_set_source_rgba(context, r / 255.0, g / 255.0, b / 255.0, a / 255.0);\r\tcairo_new_path(context);\r\tcairo_move_to(context, PANGO_PIXELS(rect->x) + 1, PANGO_PIXELS(rect->y));\r\tcairo_line_to(context, PANGO_PIXELS(rect->x) + 1, PANGO_PIXELS(rect->y+rect->height));\r\tcairo_stroke(context);\r\tcairo_restore(context);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r}\r\rstatic sqInt addSelectionFromtopixelinto(sqInt start, sqInt end, unsigned int c, PangoAttrList *pangoAttrList) {\r\tsqInt r;\r\tsqInt b;\r\tPangoAttribute *pangoAttr;\r\tsqInt g;\r\tsqInt alpha;\r\r\talpha = ((usqInt) (c && 4278190080U)) >> 24;\r\tr = ((usqInt) (c & 16711680)) >> 16;\r\tg = ((usqInt) (c & 65280)) >> 8;\r\tb = c & 255;\r\tif ((alpha == 0) && ((r == 0) && ((g == 0) && (b == 0)))) {\r\t\treturn null;\r\t}\r\tif (!(r == 0)) {\r\t\tr = r * 257;\r\t}\r\tif (!(g == 0)) {\r\t\tg = g * 257;\r\t}\r\tif (!(b == 0)) {\r\t\tb = b * 257;\r\t}\r\tpangoAttr = pango_attr_background_new(r, g, b);\r\tpangoAttr->start_index = start;\r\tpangoAttr->end_index = end;\r\tpango_attr_list_change(pangoAttrList, pangoAttr);\r}\r\r\r/*\tGet contexts[canvasOop's handle] */\r\rstatic cairo_t* contextFrom(sqInt canvasOop) {\r\tcairo_t*context;\r\tsqInt contextIndex;\r\tsqInt targetOop;\r\r\tif ((interpreterProxy->slotSizeOf(canvasOop)) < CanvasInstSize) {\r\t\tfail(\"canvas oop invalid\");\r\t\treturn null;\r\t}\r\tcontextIndex = interpreterProxy->fetchIntegerofObject(CanvasHandleIndex, canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\tcontextIndex = interpreterProxy->fetchPointerofObject(CanvasHandleIndex, canvasOop);\r\t\tif (!(contextIndex == (interpreterProxy->nilObject()))) {\r\t\t\tfail(\"canvas handle not an integer\");\r\t\t}\r\t\treturn null;\r\t}\r\tif ((contextIndex < 0) || (contextIndex > (lastIndex(contexts)))) {\r\t\tfailwith(\"canvas handle %i out of bounds\", contextIndex);\r\t\treturn null;\r\t}\r\tcontext = contexts[contextIndex];\r\tif (context == null) {\r\t\tfailwith(\"canvas handle %i invalid\", contextIndex);\r\t\treturn null;\r\t}\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\ttargetOop = interpreterProxy->fetchPointerofObject(CanvasTargetIndex, canvasOop);\r\tif (!((surfaceFrom(targetOop)) == (cairo_get_target(context)))) {\r\t\tfailwith(\"canvas handle %i does not match target\", contextIndex);\r\t\treturn null;\r\t}\r\treturn context;\r}\r\rstatic sqInt createContextFor(sqInt canvasOop) {\r\tsqInt i;\r\tcairo_surface_t*targetSurface;\r\tcairo_t*context;\r\tsqInt targetID;\r\tsqInt contextIndex;\r\tsqInt targetOop;\r\r\tif ((interpreterProxy->slotSizeOf(canvasOop)) < CanvasInstSize) {\r\t\tfail(\"canvas oop invalid\");\r\t\treturn null;\r\t}\r\ttargetOop = interpreterProxy->fetchPointerofObject(CanvasTargetIndex, canvasOop);\r\tif ((interpreterProxy->slotSizeOf(targetOop)) <= FormBitsIndex) {\r\t\tfail(\"target oop invalid\");\r\t\treturn null;\r\t}\r\ttargetID = interpreterProxy->fetchIntegerofObject(FormBitsIndex, targetOop);\r\tif (interpreterProxy->failed()) {\r\t\tfail(\"target handle not an integer\");\r\t\treturn null;\r\t}\r\ttargetSurface = findSurface(targetID);\r\tif (!((targetSurface != null) && ((cairo_surface_status(targetSurface)) == 0))) {\r\t\tfail(\"target surface invalid\");\r\t\treturn null;\r\t}\r\tcontextIndex = -1;\r\ti = 0;\r\twhile (i <= (lastIndex(contexts))) {\r\t\tif ((contexts[i]) == null) {\r\t\t\tcontextIndex = i;\r\t\t\ti = lastIndex(contexts);\r\t\t}\r\t\ti += 1;\r\t}\r\tif (contextIndex < 0) {\r\t\tfail(\"too many canvases\");\r\t\treturn null;\r\t}\r\tcontext = cairo_create(targetSurface);\r\tcontexts[contextIndex] = context;\r\t/* missing DebugCode */;\r\treturn contextIndex;\r}\r\r\r/*\tcreate a surface, register it in SurfacePlugin and answer its surface plugin ID */\r\rstatic sqInt createSurfaceFor(sqInt formOop) {\r\tcairo_format_t format;\r\tsqInt bits;\r\tsqInt width;\r\tsqInt status;\r\tcairo_surface_t*surface;\r\tsqInt height;\r\tsqInt depth;\r\r\tif ((interpreterProxy->slotSizeOf(formOop)) < FormInstSize) {\r\t\tfail(\"form oop invalid\");\r\t\treturn -1;\r\t}\r\twidth = interpreterProxy->fetchIntegerofObject(FormWidthIndex, formOop);\r\theight = interpreterProxy->fetchIntegerofObject(FormHeightIndex, formOop);\r\tdepth = interpreterProxy->fetchIntegerofObject(FormDepthIndex, formOop);\r\tif (interpreterProxy->failed()) {\r\t\tfail(\"form fields are not integers\");\r\t\treturn -1;\r\t}\r\tswitch(depth) {\r\t\tcase 32: format = CAIRO_FORMAT_ARGB32; break;\r\t\tcase 24: format = CAIRO_FORMAT_RGB24; break;\r\t\tcase 16: format = CAIRO_FORMAT_RGB16_565; break;\r\t\tcase  8: format = CAIRO_FORMAT_A8; break;\r\t\tcase  1: format = CAIRO_FORMAT_A1; break;\r\t\tdefault: format = -1;\r\t}\r\tif ((width <= 0) || ((height <= 0) || (format < 0))) {\r\t\tfail(\"form fields out of range\");\r\t\treturn -1;\r\t}\r\tbits = interpreterProxy->fetchPointerofObject(FormBitsIndex, formOop);\r\tif (!(bits == (interpreterProxy->nilObject()))) {\r\t\tfail(\"form handle not nil\");\r\t\treturn -1;\r\t}\r\tsurface = cairo_image_surface_create(format, width, height);\r\tstatus = cairo_surface_status(surface);\r\tif (!(status == 0)) {\r\t\tfailwith(\"failed to create surface - %s\", cairo_status_to_string(status));\r\t\tcairo_surface_destroy(surface);\r\t\treturn -1;\r\t}\r\treturn registerSurface(surface);\r}\r\rstatic sqInt destroyContextFor(sqInt canvasOop) {\r\tcairo_t*context;\r\tsqInt contextIndex;\r\r\tif ((interpreterProxy->slotSizeOf(canvasOop)) < CanvasInstSize) {\r\t\tfail(\"canvas oop invalid\");\r\t\treturn null;\r\t}\r\tcontextIndex = interpreterProxy->fetchIntegerofObject(CanvasHandleIndex, canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\tfail(\"canvas handle not an integer\");\r\t\treturn null;\r\t}\r\tif ((contextIndex < 0) || (contextIndex > (lastIndex(contexts)))) {\r\t\tfailwith(\"canvas handle %i out of bounds\", contextIndex);\r\t\treturn null;\r\t}\r\tcontext = contexts[contextIndex];\r\tif (context == null) {\r\t\tfailwith(\"canvas handle %i invalid\", contextIndex);\r\t\treturn null;\r\t}\r\t/* missing DebugCode */;\r\tcairo_destroy(context);\r\tcontexts[contextIndex] = null;\r\treturn null;\r}\r\r\r/*\tfetch surface from surfaceID, destroy it and unregister from SurfacePlugin */\r\rstatic sqInt destroySurface(sqInt surfaceID) {\r\tcairo_surface_t*surface;\r\r\tsurface = findSurface(surfaceID);\r\tif (surface == null) {\r\t\tfailwith(\"could not find surface %i\", surfaceID);\r\t\treturn null;\r\t}\r\tcairo_surface_destroy(surface);\r\tunregisterSurface(surfaceID);\r\treturn null;\r}\r\r\r/*\tfill or stroke depending on canvasOop's flags */\r\rstatic void fillOrStrokefrom(cairo_t*context, sqInt canvasOop) {\r\tsqInt stroke;\r\tsqInt canvasFlags;\r\tsqInt fill;\r\tsqInt rgb;\r\r\tcanvasFlags = interpreterProxy->fetchIntegerofObject(CanvasFlagsIndex, canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\tfail(\"canvas flags not an integer\");\r\t} else {\r\t\tfill = canvasFlags & CanvasFlagFill;\r\t\tstroke = canvasFlags & CanvasFlagStroke;\r\t\tif (fill != 0) {\r\t\t\tif (stroke != 0) {\r\t\t\t\tcairo_fill_preserve(context);\r\t\t\t} else {\r\t\t\t\tcairo_fill(context);\r\t\t\t}\r\t\t}\r\t\tif (stroke != 0) {\r\t\t\trgb = interpreterProxy->fetchIntegerofObject(CanvasStrokeColorIndex, canvasOop);\r\t\t\tcairo_save(context);\r\t\t\tsetSourcergbalpha(context, rgb, stroke);\r\t\t\tcairo_stroke(context);\r\t\t\tcairo_restore(context);\r\t\t}\r\t}\r}\r\r\r/*\tAnswer surface handle for surfaceID */\r\rstatic cairo_surface_t* findSurface(sqInt surfaceID) {\r\tsqInt surfaceHandle;\r\r\tif (findSurfaceFn == null) {\r\t\tif (!(loadSurfacePlugin())) {\r\t\t\treturn null;\r\t\t}\r\t}\r\tif (!((*findSurfaceFn)(surfaceID, &surfaceDispatch, &surfaceHandle))) {\r\t\treturn null;\r\t}\r\treturn ((cairo_surface_t*) surfaceHandle);\r}\r\r\r/*\tNote: This is coded so that plugins can be run from Squeak. */\r\rstatic VirtualMachine * getInterpreter(void) {\r\treturn interpreterProxy;\r}\r\r\r/*\tNote: This is hardcoded so it can be run from Squeak.\r\tThe module name is used for validating a module *after*\r\tit is loaded to check if it does really contain the module\r\twe're thinking it contains. This is important! */\r\rEXPORT(const char*) getModuleName(void) {\r\treturn moduleName;\r}\r\rstatic sqInt getSurfaceFormatgetWgetHgetDgetMsb(cairo_surface_t *surfaceHandle, int*wReturn, int*hReturn, int*dReturn, int*mReturn) {\r\tsqInt msb;\r\tsqInt width;\r\tsqInt depth;\r\tsqInt height;\r\r\t/* missing DebugCode */;\r\twidth = cairo_image_surface_get_width(surfaceHandle);\r\theight = cairo_image_surface_get_height(surfaceHandle);\r\tdepth = formatToDepth[cairo_image_surface_get_format(surfaceHandle)];\r\tmsb = 1;\r\t*wReturn = width;\r\t*hReturn = height;\r\t*dReturn = depth;\r\t*mReturn = msb;\r\treturn 1;\r}\r\rstatic sqInt halt(void) {\r\t;\r}\r\rEXPORT(sqInt) initialiseModule(void) {\r\tsqInt i;\r\r\tfor (i = 0; i <= (lastIndex(contexts)); i += 1) {\r\t\tcontexts[i] = null;\r\t}\r\tfor (i = 0; i <= (lastIndex(fontDescriptions)); i += 1) {\r\t\tfontDescriptions[i] = null;\r\t}\r\tdefaultFontDescription = pango_font_description_from_string(\"Times New Roman 10\");\r\tregisterSurfaceFn = null;\r\tunregisterSurfaceFn = null;\r\tfindSurfaceFn = null;\r\treturn 1;\r}\r\rstatic sqInt leadingCharOf(unsigned int value) {\r\treturn ((usqInt) (value & 1069547520) >> 22);\r}\r\r\r/*\tLoad the surface support plugin */\r\rstatic sqInt loadSurfacePlugin(void) {\r\tsqInt found;\r\r\tregisterSurfaceFn = ((fn_ioRegisterSurface) (interpreterProxy->ioLoadFunctionFrom(\"ioRegisterSurface\", \"SurfacePlugin\")));\r\tunregisterSurfaceFn = ((fn_ioUnregisterSurface) (interpreterProxy->ioLoadFunctionFrom(\"ioUnregisterSurface\", \"SurfacePlugin\")));\r\tfindSurfaceFn = ((fn_ioFindSurface) (interpreterProxy->ioLoadFunctionFrom(\"ioFindSurface\", \"SurfacePlugin\")));\r\tfound = (registerSurfaceFn != null) && ((unregisterSurfaceFn != null) && (findSurfaceFn != null));\r\tif (!(found)) {\r\t\tfail(\"could not load SurfacePlugin\");\r\t}\r\tmaxSurfaceID = -1;\r\treturn found;\r}\r\rstatic unsigned char* lockSurfacegetPitchxywh(cairo_surface_t*surfaceHandle, int*pitchReturn, sqInt x, sqInt y, sqInt w, sqInt h) {\r\tsqInt pitch;\r\tunsigned char*data;\r\r\t/* missing DebugCode */;\r\tcairo_surface_flush(surfaceHandle);\r\tdata = cairo_image_surface_get_data(surfaceHandle);\r\tpitch = cairo_image_surface_get_stride(surfaceHandle);\r\t*pitchReturn = pitch;\r\treturn data;\r}\r\r\r/*\tThe module with the given name was just unloaded.\r\tMake sure we have no dangling references. */\r\rEXPORT(sqInt) moduleUnloaded(char *aModuleName) {\r\tif ((strcmp(aModuleName, \"SurfacePlugin\")) == 0) {\r\t\tregisterSurfaceFn = null;\r\t\tunregisterSurfaceFn = null;\r\t\tfindSurfaceFn = null;\r\t}\r\treturn 1;\r}\r\rstatic sqInt msg(char *s) {\r\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\r}\r\rstatic void polyPathfrom(cairo_t*context, sqInt pointsOop) {\r\tfloat*points;\r\tsqInt i;\r\tsqInt pointsCount;\r\r\tpoints = interpreterProxy->arrayValueOf(pointsOop);\r\tpointsCount = interpreterProxy->slotSizeOf(pointsOop);\r\tif (!(interpreterProxy->failed())) {\r\t\tif (pointsCount >= 2) {\r\t\t\tcairo_move_to(context, points[0], points[1]);\r\t\t\tfor (i = 2; i <= (pointsCount - 1); i += 2) {\r\t\t\t\tcairo_line_to(context, points[i], points[i + 1]);\r\t\t\t}\r\t\t}\r\t}\r}\r\rEXPORT(sqInt) primitivePangoBlockAtIndex(void) {\r\tsqInt index;\r\tcairo_t*context;\r\tsqInt origin;\r\tunsigned char*aString;\r\tsqInt trailing;\r\tsqInt aStringOop;\r\tsqInt stringLength;\r\tPangoAttrList*attrList;\r\tsqInt atEnd;\r\tPangoLayout*layout;\r\tsqInt canvasOop;\r\tsqInt corner;\r\tsqInt charData;\r\tPangoRectangle pos;\r\tsqInt inStringOop;\r\tsqInt utf8Index;\r\tsqInt x;\r\tsqInt y;\r\tsqInt sqAttrArray;\r\tsqInt w;\r\tsqInt h;\r\tsqInt withWrap;\r\tsqInt cData;\r\tsqInt _return_value;\r\r\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(8), \"Object\"));\r\tinStringOop = interpreterProxy->stackValue(8);\r\tutf8Index = interpreterProxy->stackIntegerValue(7);\r\tx = interpreterProxy->stackIntegerValue(6);\r\ty = interpreterProxy->stackIntegerValue(5);\r\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(4), \"Object\"));\r\tsqAttrArray = interpreterProxy->stackValue(4);\r\tw = interpreterProxy->stackIntegerValue(3);\r\th = interpreterProxy->stackIntegerValue(2);\r\twithWrap = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(1));\r\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"Object\"));\r\tcData = interpreterProxy->stackValue(0);\r\t;\r\tcanvasOop = interpreterProxy->stackValue(9);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\taStringOop = inStringOop;\r\taString = interpreterProxy->firstIndexableField(aStringOop);\r\tlayout = pango_cairo_create_layout(context);\r\tattrList = pango_attr_list_new();\r\ttranslateSqAttrsToPangoAttrsinto(sqAttrArray, attrList);\r\tpango_layout_set_text(layout, aString, strlen(aString));\r\tpango_layout_set_attributes(layout, attrList);\r\tpango_layout_set_width(layout, w * (PANGO_SCALE));\r\tif (withWrap) {\r\t\tpango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR);\r\t}\r\tcairo_translate(context, x, y);\r\tpango_cairo_update_layout(context, layout);\r\tstringLength = strlen(aString);\r\tif (utf8Index == (stringLength + 1)) {\r\t\tatEnd = 1;\r\t\tpango_layout_index_to_pos(layout, ((((((utf8Index - 1) < 0) ? 0 : (utf8Index - 1))) < stringLength) ? ((((utf8Index - 1) < 0) ? 0 : (utf8Index - 1))) : stringLength), &pos);\r\t\tpos.x = pos.x + pos.width;\r\t} else {\r\t\tatEnd = 0;\r\t\tpango_layout_index_to_pos(layout, (((((utf8Index < 0) ? 0 : utf8Index)) < stringLength) ? (((utf8Index < 0) ? 0 : utf8Index)) : stringLength), &pos);\r\t}\r\tpango_attr_list_unref(attrList);\r\tg_object_unref(layout);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tinterpreterProxy->pushRemappableOop(aStringOop);\r\tinterpreterProxy->pushRemappableOop(cData);\r\torigin = interpreterProxy->makePointwithxValueyValue((PANGO_PIXELS(pos.x)) + x, (PANGO_PIXELS(pos.y)) + y);\r\tinterpreterProxy->pushRemappableOop(origin);\r\tcorner = interpreterProxy->makePointwithxValueyValue((PANGO_PIXELS(pos.x+pos.width)) + x, (PANGO_PIXELS(pos.y+pos.height)) + y);\r\torigin = interpreterProxy->popRemappableOop();\r\tcharData = interpreterProxy->popRemappableOop();\r\taStringOop = interpreterProxy->popRemappableOop();\r\taString = interpreterProxy->firstIndexableField(aStringOop);\r\tinterpreterProxy->storePointerofObjectwithValue(0, charData, origin);\r\tinterpreterProxy->storePointerofObjectwithValue(1, charData, corner);\r\tindex = sqCharCountInfromto(aString, 0, utf8Index);\r\tif (!(atEnd)) {\r\t\tindex += 1;\r\t}\r\tinterpreterProxy->storePointerofObjectwithValue(2, charData, ((index << 1) | 1));\r\t_return_value = interpreterProxy->integerObjectOf(index);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(10, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveClear(void) {\r\tsqInt op;\r\tsqInt canvasFlags;\r\tsqInt fill;\r\tcairo_t*context;\r\tsqInt canvasOop;\r\r\tcanvasOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcanvasFlags = interpreterProxy->fetchIntegerofObject(CanvasFlagsIndex, canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\tfail(\"canvas flags not an integer\");\r\t\treturn null;\r\t}\r\tfill = canvasFlags & CanvasFlagFill;\r\tif (!(fill)) {\r\t\tcairo_set_source_rgba(context, 0.0, 0.0, 0.0, 0.0);\r\t}\r\top = cairo_get_operator(context);\r\tcairo_set_operator(context, CairoOperatorSource);\r\tcairo_paint(context);\r\tcairo_set_operator(context, op);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveClipRectangleLeftRightTopBottom(void) {\r\tcairo_t*context;\r\tsqInt canvasOop;\r\tdouble left;\r\tdouble right;\r\tdouble top;\r\tdouble bottom;\r\r\tleft = interpreterProxy->stackFloatValue(3);\r\tright = interpreterProxy->stackFloatValue(2);\r\ttop = interpreterProxy->stackFloatValue(1);\r\tbottom = interpreterProxy->stackFloatValue(0);\r\tcanvasOop = interpreterProxy->stackValue(4);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcairo_new_path(context);\r\tcairo_rectangle(context, left, top, right - left, bottom - top);\r\tcairo_clip(context);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(4);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveClose(void) {\r\tsqInt canvasOop;\r\r\tcanvasOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tdestroyContextFor(canvasOop);\r\tif (!(interpreterProxy->failed())) {\r\t\tinterpreterProxy->storePointerofObjectwithValue(CanvasHandleIndex, canvasOop, interpreterProxy->nilObject());\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\treturn null;\r}\r\rEXPORT(sqInt) primitivePangoComposeString(void) {\r\tcairo_t*context;\r\tsqInt linesSize;\r\tsqInt newW;\r\tsqInt sqStart;\r\tsqInt lineCount;\r\tPangoRectangle ink;\r\tsqInt start;\r\tsqInt lineIndex;\r\tPangoAttrList*attrList;\r\tsqInt sqEnd;\r\tsqInt baseline;\r\tPangoLayoutLine*line;\r\tPangoRectangle logical;\r\tsqInt totalY;\r\tsqInt prevBaseline;\r\tPangoLayout*layout;\r\tsqInt lastLine;\r\tsqInt canvasOop;\r\tsqInt addition;\r\tPangoLayoutIter*lineIter;\r\tsqInt next;\r\tchar *aString;\r\tsqInt x;\r\tsqInt y;\r\tsqInt sqAttrArray;\r\tsqInt w;\r\tsqInt h;\r\tsqInt withWrap;\r\tsqInt lines;\r\tsqInt _return_value;\r\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(7)));\r\taString = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(7))));\r\tx = interpreterProxy->stackIntegerValue(6);\r\ty = interpreterProxy->stackIntegerValue(5);\r\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(4), \"Object\"));\r\tsqAttrArray = interpreterProxy->stackValue(4);\r\tw = interpreterProxy->stackIntegerValue(3);\r\th = interpreterProxy->stackIntegerValue(2);\r\twithWrap = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(1));\r\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"Object\"));\r\tlines = interpreterProxy->stackValue(0);\r\t;\r\tcanvasOop = interpreterProxy->stackValue(8);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlayout = pango_cairo_create_layout(context);\r\tattrList = pango_attr_list_new();\r\ttranslateSqAttrsToPangoAttrsinto(sqAttrArray, attrList);\r\tpango_layout_set_text(layout, aString, strlen(aString));\r\tpango_layout_set_attributes(layout, attrList);\r\tpango_layout_set_width(layout, w * (PANGO_SCALE));\r\tif (withWrap) {\r\t\tpango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR);\r\t}\r\tcairo_translate(context, x, y);\r\tpango_cairo_update_layout(context, layout);\r\tlineCount = pango_layout_get_line_count(layout);\r\tlineIter = pango_layout_get_iter(layout);\r\tbaseline = pango_layout_iter_get_baseline(lineIter);\r\tprevBaseline = 0;\r\tcairo_translate(context, 0, PANGO_PIXELS(baseline));\r\tsqEnd = 0;\r\ttotalY = 0;\r\tlinesSize = interpreterProxy->stSizeOf(lines);\r\tlastLine = (((lineCount < linesSize) ? lineCount : linesSize)) - 1;\r\tfor (lineIndex = 0; lineIndex <= lastLine; lineIndex += 1) {\r\t\tline = pango_layout_iter_get_line_readonly(lineIter);\r\t\tpango_layout_line_get_extents(line, &ink, &logical);\r\t\tsqStart = sqEnd + 1;\r\t\tstart = line->start_index;\r\r\t\t/* self log: 'sqStart, sqEnd: %d %d' with: sqStart with: sqEnd. */\r\r\t\tsqEnd = (sqStart + (sqCharCountInfromto(aString, start, start + (line->length)))) - 1;\r\t\tif (((start + (line->length)) < (interpreterProxy->stSizeOf(((int) aString)))) && ((aString[start + (line->length)]) == 13)) {\r\t\t\tsqEnd += 1;\r\t\t}\r\t\tinterpreterProxy->storeIntegerofObjectwithValue(TextLineStartIndex, interpreterProxy->fetchPointerofObject(lineIndex, lines), sqStart);\r\t\tinterpreterProxy->storeIntegerofObjectwithValue(TextLineEndIndex, interpreterProxy->fetchPointerofObject(lineIndex, lines), sqEnd);\r\t\tinterpreterProxy->storeIntegerofObjectwithValue(TextLineLeftIndex, interpreterProxy->fetchPointerofObject(lineIndex, lines), (PANGO_PIXELS(logical.x)) + x);\r\t\tinterpreterProxy->storeIntegerofObjectwithValue(TextLineRightIndex, interpreterProxy->fetchPointerofObject(lineIndex, lines), (PANGO_PIXELS(logical.x+logical.width)) + x);\r\t\tinterpreterProxy->storeIntegerofObjectwithValue(TextLineTopIndex, interpreterProxy->fetchPointerofObject(lineIndex, lines), totalY + y);\r\t\tinterpreterProxy->storeIntegerofObjectwithValue(TextLineInternalSpaceIndex, interpreterProxy->fetchPointerofObject(lineIndex, lines), ((0 << 1) | 1));\r\t\tinterpreterProxy->storeIntegerofObjectwithValue(TextLinePaddingWidthIndex, interpreterProxy->fetchPointerofObject(lineIndex, lines), ((0 << 1) | 1));\r\t\tnext = pango_layout_iter_next_line(lineIter);\r\t\tif (next) {\r\t\t\taddition = (logical.height) + (pango_layout_get_spacing(layout));\r\t\t} else {\r\t\t\taddition = logical.height;\r\t\t}\r\t\ttotalY += PANGO_PIXELS(addition);\r\t\tinterpreterProxy->storeIntegerofObjectwithValue(TextLineBottomIndex, interpreterProxy->fetchPointerofObject(lineIndex, lines), totalY + y);\r\t}\r\tpango_layout_get_extents(layout, &ink, &logical);\r\tnewW = PANGO_PIXELS(logical.width);\r\tpango_layout_iter_free(lineIter);\r\tpango_attr_list_unref(attrList);\r\tg_object_unref(layout);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\t_return_value = interpreterProxy->integerObjectOf(newW);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(9, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivePangoComposeString2(void) {\r\tcairo_t*context;\r\tsqInt newW;\r\tsqInt sqStart;\r\tsqInt lineCount;\r\tPangoRectangle ink;\r\tunsigned char*aString;\r\tunsigned char*inString;\r\tsqInt start;\r\tsqInt lineIndex;\r\tPangoAttrList*attrList;\r\tsqInt sqEnd;\r\tsqInt baseline;\r\tPangoLayoutLine*line;\r\tPangoRectangle logical;\r\tsqInt totalY;\r\tsqInt prevBaseline;\r\tsqInt arrayOop;\r\tsqInt retArrayOop;\r\tsqInt textLine;\r\tsqInt i;\r\tPangoLayout*layout;\r\tsqInt lastLine;\r\tsqInt canvasOop;\r\tsqInt addition;\r\tsqInt textLineClass;\r\tsqInt inStringSize;\r\tPangoLayoutIter*lineIter;\r\tsqInt next;\r\tsqInt inStringOop;\r\tsqInt x;\r\tsqInt y;\r\tsqInt sqAttrArray;\r\tsqInt w;\r\tsqInt h;\r\tsqInt withWrap;\r\tsqInt inTextLineClass;\r\r\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(7), \"Object\"));\r\tinStringOop = interpreterProxy->stackValue(7);\r\tx = interpreterProxy->stackIntegerValue(6);\r\ty = interpreterProxy->stackIntegerValue(5);\r\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(4), \"Object\"));\r\tsqAttrArray = interpreterProxy->stackValue(4);\r\tw = interpreterProxy->stackIntegerValue(3);\r\th = interpreterProxy->stackIntegerValue(2);\r\twithWrap = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(1));\r\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"Object\"));\r\tinTextLineClass = interpreterProxy->stackValue(0);\r\t;\r\tcanvasOop = interpreterProxy->stackValue(8);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinStringSize = interpreterProxy->stSizeOf(inStringOop);\r\tif (inStringSize == 0) {\r\t\tprimitiveFail();\r\t\treturn null;\r\t}\r\taString = alloca(inStringSize);\r\tinString = interpreterProxy->firstIndexableField(inStringOop);\r\tstrncpy(aString, inString, inStringSize);\r\ttextLineClass = inTextLineClass;\r\tlayout = pango_cairo_create_layout(context);\r\tattrList = pango_attr_list_new();\r\ttranslateSqAttrsToPangoAttrsinto(sqAttrArray, attrList);\r\tpango_layout_set_text(layout, aString, strlen(aString));\r\tpango_layout_set_attributes(layout, attrList);\r\tpango_layout_set_width(layout, w * (PANGO_SCALE));\r\tif (withWrap) {\r\t\tpango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR);\r\t}\r\tcairo_translate(context, x, y);\r\tpango_cairo_update_layout(context, layout);\r\tlineCount = pango_layout_get_line_count(layout);\r\tlineIter = pango_layout_get_iter(layout);\r\tbaseline = pango_layout_iter_get_baseline(lineIter);\r\tprevBaseline = 0;\r\tcairo_translate(context, 0, PANGO_PIXELS(baseline));\r\tsqEnd = 0;\r\ttotalY = 0;\r\tinterpreterProxy->pushRemappableOop(textLineClass);\r\tarrayOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), lineCount);\r\ttextLineClass = interpreterProxy->popRemappableOop();\r\tfor (i = 0; i <= (lineCount - 1); i += 1) {\r\t\tinterpreterProxy->pushRemappableOop(textLineClass);\r\t\tinterpreterProxy->pushRemappableOop(arrayOop);\r\t\ttextLine = interpreterProxy->instantiateClassindexableSize(textLineClass, 0);\r\t\tarrayOop = interpreterProxy->popRemappableOop();\r\t\ttextLineClass = interpreterProxy->popRemappableOop();\r\t\tinterpreterProxy->storePointerofObjectwithValue(i, arrayOop, textLine);\r\t}\r\tlastLine = lineCount - 1;\r\tfor (lineIndex = 0; lineIndex <= lastLine; lineIndex += 1) {\r\t\tline = pango_layout_iter_get_line_readonly(lineIter);\r\t\tpango_layout_line_get_extents(line, &ink, &logical);\r\t\tsqStart = sqEnd + 1;\r\t\tstart = line->start_index;\r\r\t\t/* self log: 'sqStart, sqEnd: %d %d' with: sqStart with: sqEnd. */\r\r\t\tsqEnd = (sqStart + (sqCharCountInfromto(aString, start, start + (line->length)))) - 1;\r\t\tif (((start + (line->length)) < (interpreterProxy->stSizeOf(((int) aString)))) && ((aString[start + (line->length)]) == 13)) {\r\t\t\tsqEnd += 1;\r\t\t}\r\t\tinterpreterProxy->storeIntegerofObjectwithValue(TextLineStartIndex, interpreterProxy->fetchPointerofObject(lineIndex, arrayOop), sqStart);\r\t\tinterpreterProxy->storeIntegerofObjectwithValue(TextLineEndIndex, interpreterProxy->fetchPointerofObject(lineIndex, arrayOop), sqEnd);\r\t\tinterpreterProxy->storeIntegerofObjectwithValue(TextLineLeftIndex, interpreterProxy->fetchPointerofObject(lineIndex, arrayOop), (PANGO_PIXELS(logical.x)) + x);\r\t\tinterpreterProxy->storeIntegerofObjectwithValue(TextLineRightIndex, interpreterProxy->fetchPointerofObject(lineIndex, arrayOop), (PANGO_PIXELS(logical.x+logical.width)) + x);\r\t\tinterpreterProxy->storeIntegerofObjectwithValue(TextLineTopIndex, interpreterProxy->fetchPointerofObject(lineIndex, arrayOop), totalY + y);\r\t\tinterpreterProxy->storeIntegerofObjectwithValue(TextLineInternalSpaceIndex, interpreterProxy->fetchPointerofObject(lineIndex, arrayOop), ((0 << 1) | 1));\r\t\tinterpreterProxy->storeIntegerofObjectwithValue(TextLinePaddingWidthIndex, interpreterProxy->fetchPointerofObject(lineIndex, arrayOop), ((0 << 1) | 1));\r\t\tnext = pango_layout_iter_next_line(lineIter);\r\t\tif (next) {\r\t\t\taddition = (logical.height) + (pango_layout_get_spacing(layout));\r\t\t} else {\r\t\t\taddition = logical.height;\r\t\t}\r\t\ttotalY += PANGO_PIXELS(addition);\r\t\tinterpreterProxy->storeIntegerofObjectwithValue(TextLineBottomIndex, interpreterProxy->fetchPointerofObject(lineIndex, arrayOop), totalY + y);\r\t}\r\tpango_layout_get_extents(layout, &ink, &logical);\r\tnewW = PANGO_PIXELS(logical.width);\r\tpango_layout_iter_free(lineIter);\r\tpango_attr_list_unref(attrList);\r\tg_object_unref(layout);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tinterpreterProxy->pushRemappableOop(arrayOop);\r\tretArrayOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2);\r\tarrayOop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storeIntegerofObjectwithValue(0, retArrayOop, newW);\r\tinterpreterProxy->storePointerofObjectwithValue(1, retArrayOop, arrayOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(9, retArrayOop);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveCreateFormHandle(void) {\r\tsqInt formOop;\r\tsqInt surfaceID;\r\tsqInt _return_value;\r\r\tformOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tsurfaceID = createSurfaceFor(formOop);\r\tif (surfaceID < 0) {\r\t\tinterpreterProxy->primitiveFail();\r\t}\r\tif (!(interpreterProxy->failed())) {\r\t\t_return_value = interpreterProxy->integerObjectOf(surfaceID);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(1, _return_value);\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveDestroyFormHandle(void) {\r\tsqInt surfaceID;\r\r\tsurfaceID = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->failed())) {\r\t\tdestroySurface(surfaceID);\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(1);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveDrawArcRadiusXYFromTo(void) {\r\tcairo_t*context;\r\tsqInt canvasOop;\r\tdouble radius;\r\tdouble x;\r\tdouble y;\r\tdouble angle1;\r\tdouble angle2;\r\r\tradius = interpreterProxy->stackFloatValue(4);\r\tx = interpreterProxy->stackFloatValue(3);\r\ty = interpreterProxy->stackFloatValue(2);\r\tangle1 = interpreterProxy->stackFloatValue(1);\r\tangle2 = interpreterProxy->stackFloatValue(0);\r\tcanvasOop = interpreterProxy->stackValue(5);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcairo_new_path(context);\r\tif (radius > 0.0) {\r\t\tcairo_arc(context, x, y, radius, angle1, angle2);\r\t} else {\r\t\tcairo_arc_negative(context, x, y, -1.0 * radius, angle1, angle2);\r\t}\r\tfillOrStrokefrom(context, canvasOop);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(5);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveDrawCurveFromXYviaXYandXYtoXY(void) {\r\tcairo_t*context;\r\tsqInt canvasOop;\r\tdouble x0;\r\tdouble y0;\r\tdouble x1;\r\tdouble y1;\r\tdouble x2;\r\tdouble y2;\r\tdouble x3;\r\tdouble y3;\r\r\tx0 = interpreterProxy->stackFloatValue(7);\r\ty0 = interpreterProxy->stackFloatValue(6);\r\tx1 = interpreterProxy->stackFloatValue(5);\r\ty1 = interpreterProxy->stackFloatValue(4);\r\tx2 = interpreterProxy->stackFloatValue(3);\r\ty2 = interpreterProxy->stackFloatValue(2);\r\tx3 = interpreterProxy->stackFloatValue(1);\r\ty3 = interpreterProxy->stackFloatValue(0);\r\tcanvasOop = interpreterProxy->stackValue(8);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcairo_new_path(context);\r\tcairo_move_to(context, x0, y0);\r\tcairo_curve_to(context, x1, y1, x2, y2, x3, y3);\r\tfillOrStrokefrom(context, canvasOop);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(8);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveDrawCurveFromXYviaXYtoXY(void) {\r\tcairo_t*context;\r\tsqInt canvasOop;\r\tdouble x0;\r\tdouble y0;\r\tdouble x1;\r\tdouble y1;\r\tdouble x2;\r\tdouble y2;\r\r\tx0 = interpreterProxy->stackFloatValue(5);\r\ty0 = interpreterProxy->stackFloatValue(4);\r\tx1 = interpreterProxy->stackFloatValue(3);\r\ty1 = interpreterProxy->stackFloatValue(2);\r\tx2 = interpreterProxy->stackFloatValue(1);\r\ty2 = interpreterProxy->stackFloatValue(0);\r\tcanvasOop = interpreterProxy->stackValue(6);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcairo_new_path(context);\r\tcairo_move_to(context, x0, y0);\r\tcairo_curve_to(context, ((2.0 * x1) + x0) / 3.0, ((2.0 * y1) + y0) / 3.0, ((2.0 * x1) + x2) / 3.0, ((2.0 * y1) + y2) / 3.0, x2, y2);\r\tfillOrStrokefrom(context, canvasOop);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(6);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveDrawGeneralBezierShape(void) {\r\tcairo_t*context;\r\tsqInt shapeCount;\r\tsqInt segmentCount;\r\tshort*seg;\r\tsqInt j;\r\tsqInt yVia;\r\tsqInt i;\r\tsqInt xFrom;\r\tsqInt contourOop;\r\tsqInt canvasOop;\r\tsqInt xTo;\r\tsqInt yTo;\r\tsqInt xVia;\r\tsqInt yFrom;\r\tsqInt shapeOop;\r\r\tshapeOop = interpreterProxy->stackValue(0);\r\tcanvasOop = interpreterProxy->stackValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tshapeCount = interpreterProxy->slotSizeOf(shapeOop);\r\tcairo_new_path(context);\r\tfor (i = 0; i <= (shapeCount - 1); i += 1) {\r\t\tcontourOop = interpreterProxy->fetchPointerofObject(i, shapeOop);\r\t\tif (!(interpreterProxy->isMemberOf(contourOop, \"ShortPointArray\"))) {\r\t\t\tfailwith(\"bezier contour %i is no ShortPointArray\", i + 1);\r\t\t\treturn null;\r\t\t}\r\t\tsegmentCount = (interpreterProxy->slotSizeOf(contourOop)) / 3;\r\t\tseg = interpreterProxy->arrayValueOf(contourOop);\r\t\tfor (j = 0; j <= (segmentCount - 1); j += 1) {\r\t\t\txFrom = seg[0];\r\t\t\tyFrom = seg[1];\r\t\t\txVia = seg[2];\r\t\t\tyVia = seg[3];\r\t\t\txTo = seg[4];\r\t\t\tyTo = seg[5];\r\t\t\tif (j == 0) {\r\t\t\t\tcairo_move_to(context, xFrom, yFrom);\r\t\t\t}\r\t\t\tif ((xFrom == xVia) && (yFrom == yVia)) {\r\t\t\t\tcairo_line_to(context, xTo, yTo);\r\t\t\t} else {\r\t\t\t\tcairo_curve_to(context, (xFrom + (2.0 * xVia)) / 3.0, (yFrom + (2.0 * yVia)) / 3.0, ((2.0 * xVia) + xTo) / 3.0, ((2.0 * yVia) + yTo) / 3.0, xTo, yTo);\r\t\t\t}\r\t\t\tseg += 6;\r\t\t}\r\t\tcairo_close_path(context);\r\t}\r\tfillOrStrokefrom(context, canvasOop);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(1);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveDrawImageSrcLRTBDestLRTB(void) {\r\tcairo_surface_t*srcSurface;\r\tcairo_t*context;\r\tsqInt canvasOop;\r\tsqInt formOop;\r\tdouble dstL;\r\tdouble dstR;\r\tdouble dstT;\r\tdouble dstB;\r\tdouble srcL;\r\tdouble srcR;\r\tdouble srcT;\r\tdouble srcB;\r\r\tformOop = interpreterProxy->stackValue(8);\r\tdstL = interpreterProxy->stackFloatValue(7);\r\tdstR = interpreterProxy->stackFloatValue(6);\r\tdstT = interpreterProxy->stackFloatValue(5);\r\tdstB = interpreterProxy->stackFloatValue(4);\r\tsrcL = interpreterProxy->stackFloatValue(3);\r\tsrcR = interpreterProxy->stackFloatValue(2);\r\tsrcT = interpreterProxy->stackFloatValue(1);\r\tsrcB = interpreterProxy->stackFloatValue(0);\r\tcanvasOop = interpreterProxy->stackValue(9);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tsrcSurface = surfaceFrom(formOop);\r\tif (!((srcSurface != null) && ((cairo_surface_status(srcSurface)) == 0))) {\r\t\tfail(\"source surface invalid\");\r\t\treturn null;\r\t}\r\tif ((srcR != srcL) && (srcT != srcB)) {\r\t\tcairo_save(context);\r\t\tcairo_translate(context, dstL, dstT);\r\t\tcairo_scale(context, (dstR - dstL) / (srcR - srcL), (dstB - dstT) / (srcB - srcT));\r\t\tcairo_new_path(context);\r\t\tcairo_rectangle(context, 0.0, 0.0, srcR - srcL, srcB - srcT);\r\t\tcairo_set_source_surface(context, srcSurface, 0.0 - srcL, 0.0 - srcT);\r\t\tcairo_fill(context);\r\t\tcairo_restore(context);\r\t}\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(9);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveDrawLineFromXYtoXY(void) {\r\tcairo_t*context;\r\tsqInt canvasOop;\r\tdouble fromX;\r\tdouble fromY;\r\tdouble toX;\r\tdouble toY;\r\r\tfromX = interpreterProxy->stackFloatValue(3);\r\tfromY = interpreterProxy->stackFloatValue(2);\r\ttoX = interpreterProxy->stackFloatValue(1);\r\ttoY = interpreterProxy->stackFloatValue(0);\r\tcanvasOop = interpreterProxy->stackValue(4);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcairo_new_path(context);\r\tcairo_move_to(context, fromX, fromY);\r\tcairo_line_to(context, toX, toY);\r\tstrokefrom(context, canvasOop);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(4);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveDrawOvalLeftRightTopBottom(void) {\r\tcairo_t*context;\r\tsqInt canvasOop;\r\tdouble left;\r\tdouble right;\r\tdouble top;\r\tdouble bottom;\r\r\tleft = interpreterProxy->stackFloatValue(3);\r\tright = interpreterProxy->stackFloatValue(2);\r\ttop = interpreterProxy->stackFloatValue(1);\r\tbottom = interpreterProxy->stackFloatValue(0);\r\tcanvasOop = interpreterProxy->stackValue(4);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif ((right != left) && (top != bottom)) {\r\t\tcairo_save(context);\r\t\tcairo_new_path(context);\r\t\tcairo_translate(context, (left + right) / 2.0, (top + bottom) / 2.0);\r\t\tcairo_scale(context, (right - left) / 2.0, (bottom - top) / 2.0);\r\t\tcairo_arc(context, 0.0, 0.0, 1.0, 0.0, degrees(360.0));\r\t\tcairo_restore(context);\r\t\tfillOrStrokefrom(context, canvasOop);\r\t}\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(4);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveDrawPolygon(void) {\r\tcairo_t*context;\r\tsqInt canvasOop;\r\tsqInt pointsOop;\r\r\tpointsOop = interpreterProxy->stackValue(0);\r\tcanvasOop = interpreterProxy->stackValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcairo_new_path(context);\r\tpolyPathfrom(context, pointsOop);\r\tcairo_close_path(context);\r\tfillOrStrokefrom(context, canvasOop);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(1);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveDrawPolyline(void) {\r\tcairo_t*context;\r\tsqInt canvasOop;\r\tsqInt pointsOop;\r\r\tpointsOop = interpreterProxy->stackValue(0);\r\tcanvasOop = interpreterProxy->stackValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcairo_new_path(context);\r\tpolyPathfrom(context, pointsOop);\r\tfillOrStrokefrom(context, canvasOop);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(1);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveDrawRectangleLeftRightTopBottom(void) {\r\tcairo_t*context;\r\tsqInt canvasOop;\r\tdouble left;\r\tdouble right;\r\tdouble top;\r\tdouble bottom;\r\r\tleft = interpreterProxy->stackFloatValue(3);\r\tright = interpreterProxy->stackFloatValue(2);\r\ttop = interpreterProxy->stackFloatValue(1);\r\tbottom = interpreterProxy->stackFloatValue(0);\r\tcanvasOop = interpreterProxy->stackValue(4);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcairo_new_path(context);\r\tcairo_rectangle(context, left, top, right - left, bottom - top);\r\tfillOrStrokefrom(context, canvasOop);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(4);\r\treturn null;\r}\r\r\r/*\t\tx1\tx2\t\tx3\tx4\r\ty1\t+\t/\t-\t\\\t+\r\ty2\t/\t.\t\t.\t\\\r\t\t|\t\t\t\t|\r\ty3\t\\\t.\t\t.\t/\r\ty4\t+\t\\\t-\t/\t+ */\r\rEXPORT(sqInt) primitiveDrawRoundRectLeftRightTopBottomRadiusCorner(void) {\r\tcairo_t*context;\r\tdouble y3;\r\tdouble y2;\r\tdouble x3;\r\tdouble x2;\r\tsqInt canvasOop;\r\tdouble ry;\r\tdouble rx;\r\tdouble r;\r\tdouble x1;\r\tdouble x4;\r\tdouble y1;\r\tdouble y4;\r\tdouble radius;\r\tsqInt cornerFlags;\r\r\tx1 = interpreterProxy->stackFloatValue(5);\r\tx4 = interpreterProxy->stackFloatValue(4);\r\ty1 = interpreterProxy->stackFloatValue(3);\r\ty4 = interpreterProxy->stackFloatValue(2);\r\tradius = interpreterProxy->stackFloatValue(1);\r\tcornerFlags = interpreterProxy->stackIntegerValue(0);\r\tcanvasOop = interpreterProxy->stackValue(6);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\trx = (x4 - x1) / 2.0;\r\try = (y4 - y1) / 2.0;\r\tr = (((((radius < rx) ? radius : rx)) < ry) ? (((radius < rx) ? radius : rx)) : ry);\r\tx2 = x1 + r;\r\tx3 = x4 - r;\r\ty2 = y1 + r;\r\ty3 = y4 - r;\r\tcairo_new_path(context);\r\tif (cornerFlags & 1) {\r\t\tcairo_arc(context, x2, y2, r, degrees(180), degrees(270));\r\t} else {\r\t\tcairo_move_to(context, x1, y1);\r\t}\r\tif (cornerFlags & 8) {\r\t\tcairo_arc(context, x3, y2, r, degrees(270), degrees(360));\r\t} else {\r\t\tcairo_line_to(context, x4, y1);\r\t}\r\tif (cornerFlags & 4) {\r\t\tcairo_arc(context, x3, y3, r, degrees(0), degrees(90));\r\t} else {\r\t\tcairo_line_to(context, x4, y4);\r\t}\r\tif (cornerFlags & 2) {\r\t\tcairo_arc(context, x2, y3, r, degrees(90), degrees(180));\r\t} else {\r\t\tcairo_line_to(context, x1, y4);\r\t}\r\tcairo_close_path(context);\r\tfillOrStrokefrom(context, canvasOop);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(6);\r\treturn null;\r}\r\r\r/*\tdraw a string including its outline if selected */\r\rEXPORT(sqInt) primitiveDrawZeroTerminatedUtf8StringXY(void) {\r\tcairo_t*context;\r\tsqInt canvasOop;\r\tchar *aString;\r\tdouble x;\r\tdouble y;\r\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(2)));\r\taString = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(2))));\r\tx = interpreterProxy->stackFloatValue(1);\r\ty = interpreterProxy->stackFloatValue(0);\r\tcanvasOop = interpreterProxy->stackValue(3);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcairo_move_to(context, x, y);\r\tcairo_text_path(context, aString);\r\tfillOrStrokefrom(context, canvasOop);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(3);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveFillBitmapOriginXYdirectionXYnormalXYRepeatImage(void) {\r\tcairo_pattern_t*pattern;\r\tcairo_t*context;\r\tsqInt canvasOop;\r\tcairo_matrix_t*m;\r\tcairo_matrix_t mdata;\r\tcairo_surface_t*surface;\r\tdouble ox;\r\tdouble oy;\r\tdouble dx;\r\tdouble dy;\r\tdouble nx;\r\tdouble ny;\r\tsqInt aBoolean;\r\tsqInt formOop;\r\r\tox = interpreterProxy->stackFloatValue(7);\r\toy = interpreterProxy->stackFloatValue(6);\r\tdx = interpreterProxy->stackFloatValue(5);\r\tdy = interpreterProxy->stackFloatValue(4);\r\tnx = interpreterProxy->stackFloatValue(3);\r\tny = interpreterProxy->stackFloatValue(2);\r\taBoolean = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(1));\r\tformOop = interpreterProxy->stackValue(0);\r\tm = &mdata;\r\tcanvasOop = interpreterProxy->stackValue(8);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tsurface = surfaceFrom(formOop);\r\tif (!((surface != null) && ((cairo_surface_status(surface)) == 0))) {\r\t\tfail(\"surface invalid\");\r\t\treturn null;\r\t}\r\tpattern = cairo_pattern_create_for_surface(surface);\r\tcairo_matrix_init(m, dx, dy, nx, ny, ox, oy);\r\tcairo_matrix_invert(m);\r\tcairo_pattern_set_matrix(pattern, m);\r\tif (aBoolean) {\r\t\tcairo_pattern_set_extend(pattern, CairoExtendRepeat);\r\t}\r\tif (cairo_pattern_status(pattern)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_pattern_status(pattern)));\r\t\treturn null;\r\t}\r\tcairo_set_source(context, pattern);\r\tcairo_pattern_destroy(pattern);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(8);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveFillColorAlpha(void) {\r\tcairo_t*context;\r\tsqInt canvasOop;\r\tsqInt rgb;\r\tsqInt alpha;\r\r\trgb = interpreterProxy->stackIntegerValue(1);\r\talpha = interpreterProxy->stackIntegerValue(0);\r\tcanvasOop = interpreterProxy->stackValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tsetSourcergbalpha(context, rgb, alpha);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(2);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveFillLinearOriginXYdirectionXYcolorStops(void) {\r\tcairo_pattern_t*pattern;\r\tint*colorStops;\r\tsqInt i;\r\tsqInt colorStopsCount;\r\tcairo_t*context;\r\tsqInt canvasOop;\r\tdouble ox;\r\tdouble oy;\r\tdouble dx;\r\tdouble dy;\r\tsqInt colorStopsOop;\r\r\tox = interpreterProxy->stackFloatValue(4);\r\toy = interpreterProxy->stackFloatValue(3);\r\tdx = interpreterProxy->stackFloatValue(2);\r\tdy = interpreterProxy->stackFloatValue(1);\r\tcolorStopsOop = interpreterProxy->stackValue(0);\r\tcanvasOop = interpreterProxy->stackValue(5);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcolorStops = interpreterProxy->arrayValueOf(colorStopsOop);\r\tcolorStopsCount = interpreterProxy->slotSizeOf(colorStopsOop);\r\tif (interpreterProxy->failed()) {\r\t\tfail(\"bad colorStops array\");\r\t\treturn null;\r\t}\r\tpattern = cairo_pattern_create_linear(ox, oy, ox + dx, oy + dy);\r\tif (cairo_pattern_status(pattern)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_pattern_status(pattern)));\r\t\treturn null;\r\t}\r\tfor (i = 0; i <= (colorStopsCount - 1); i += 3) {\r\t\taddColorStopTooffsetrgbalpha(pattern, colorStops[i], colorStops[i + 1], colorStops[i + 2]);\r\t}\r\tcairo_set_source(context, pattern);\r\tcairo_pattern_destroy(pattern);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(5);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveFillRadialOriginXYdirectionXYnormalXYcolorStops(void) {\r\tint*colorStops;\r\tcairo_t*context;\r\tsqInt colorStopsCount;\r\tcairo_matrix_t*m;\r\tcairo_matrix_t mdata;\r\tsqInt i;\r\tsqInt canvasOop;\r\tcairo_pattern_t*pattern;\r\tdouble ox;\r\tdouble oy;\r\tdouble dx;\r\tdouble dy;\r\tdouble nx;\r\tdouble ny;\r\tsqInt colorStopsOop;\r\r\tox = interpreterProxy->stackFloatValue(6);\r\toy = interpreterProxy->stackFloatValue(5);\r\tdx = interpreterProxy->stackFloatValue(4);\r\tdy = interpreterProxy->stackFloatValue(3);\r\tnx = interpreterProxy->stackFloatValue(2);\r\tny = interpreterProxy->stackFloatValue(1);\r\tcolorStopsOop = interpreterProxy->stackValue(0);\r\tm = &mdata;\r\tcanvasOop = interpreterProxy->stackValue(7);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcolorStops = interpreterProxy->arrayValueOf(colorStopsOop);\r\tcolorStopsCount = interpreterProxy->slotSizeOf(colorStopsOop);\r\tif (interpreterProxy->failed()) {\r\t\tfail(\"bad colorStops array\");\r\t\treturn null;\r\t}\r\tpattern = cairo_pattern_create_radial(0.0, 0.0, 0.0, 0.0, 0.0, 1.0);\r\tcairo_matrix_init(m, dx, dy, nx, ny, ox, oy);\r\tcairo_matrix_invert(m);\r\tcairo_pattern_set_matrix(pattern, m);\r\tif (cairo_pattern_status(pattern)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_pattern_status(pattern)));\r\t\treturn null;\r\t}\r\tfor (i = 0; i <= (colorStopsCount - 1); i += 3) {\r\t\taddColorStopTooffsetrgbalpha(pattern, colorStops[i], colorStops[i + 1], colorStops[i + 2]);\r\t}\r\tcairo_set_source(context, pattern);\r\tcairo_pattern_destroy(pattern);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(7);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveFontFace(void) {\r\tcairo_font_face_t*crFace;\r\tFT_Face ftFace;\r\tcairo_t*context;\r\tsqInt canvasOop;\r\tchar *faceHandle;\r\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));\r\tfaceHandle = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));\r\tcanvasOop = interpreterProxy->stackValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tftFace = *(void**)faceHandle;\r\tcrFace = cairo_ft_font_face_create_for_ft_face(ftFace, FT_LOAD_NO_HINTING);\r\tcairo_set_font_face(context, crFace);\r\tcairo_font_face_destroy(crFace);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(1);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveFontSize(void) {\r\tcairo_t*context;\r\tsqInt canvasOop;\r\tdouble size;\r\r\tsize = interpreterProxy->stackFloatValue(0);\r\tcanvasOop = interpreterProxy->stackValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcairo_set_font_size(context, size);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(1);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveGetLineWidth(void) {\r\tdouble width;\r\tcairo_t*context;\r\tsqInt canvasOop;\r\tsqInt _return_value;\r\r\tcanvasOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\twidth = cairo_get_line_width(context);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\t_return_value = interpreterProxy->floatObjectOf(width);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivePangoFontDescriptionIndex(void) {\r\tsqInt familyNameSize;\r\tsqInt newInd;\r\tPangoFontDescription *desc;\r\tsqInt i;\r\tsqInt ind;\r\tchar cFamilyName[128];\r\tsqInt size;\r\tsqInt pangoStyle;\r\tchar *familyName;\r\tsqInt isAbsolute;\r\tsqInt familyNameOop;\r\tsqInt ptSize;\r\tsqInt _return_value;\r\r\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"Object\"));\r\tfamilyNameOop = interpreterProxy->stackValue(1);\r\tptSize = interpreterProxy->stackIntegerValue(0);\r\t;\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tfamilyNameSize = interpreterProxy->stSizeOf(familyNameOop);\r\tif (familyNameSize > 127) {\r\t\treturn null;\r\t}\r\tif ((ptSize < 0) || (ptSize > 1000000)) {\r\t\t_return_value = ((-1 << 1) | 1);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, _return_value);\r\t\treturn null;\r\t}\r\tfamilyName = interpreterProxy->firstIndexableField(familyNameOop);\r\tfor (i = 0; i <= (familyNameSize - 1); i += 1) {\r\t\tcFamilyName[i] = (familyName[i]);\r\t}\r\tcFamilyName[familyNameSize] = 0;\r\tnewInd = -1;\r\tind = 0;\r\tdesc = null;\r\twhile (newInd == -1) {\r\t\tdesc = fontDescriptions[ind];\r\t\tif (desc == null) {\r\t\t\tnewInd = ind;\r\t\t} else {\r\t\t\tisAbsolute = pango_font_description_get_size_is_absolute(desc);\r\t\t\tsize = pango_font_description_get_size(desc);\r\t\t\tif (isAbsolute) {\r\t\t\t\tsize = size;\r\t\t\t}\r\t\t\tif (((strcmp(cFamilyName, pango_font_description_get_family(desc))) == 0) && (size == (ptSize * (PANGO_SCALE)))) {\r\t\t\t\tnewInd = ind;\r\t\t\t}\r\t\t}\r\t\tind += 1;\r\t\tif (ind > 255) {\r\t\t\tnewInd = 256;\r\t\t}\r\t}\r\tif (newInd == 256) {\r\t\t_return_value = ((-1 << 1) | 1);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, _return_value);\r\t\treturn null;\r\t}\r\tif (desc == null) {\r\t\tnull;\r\t} else {\r\t\t_return_value = ((newInd << 1) | 1);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(3, _return_value);\r\t\treturn null;\r\t}\r\tdesc = pango_font_description_new();\r\tpango_font_description_set_family(desc, cFamilyName);\r\tpangoStyle = PANGO_STYLE_NORMAL;\r\tpango_font_description_set_style(desc, pangoStyle);\r\tpango_font_description_set_size(desc, ptSize * (PANGO_SCALE));\r\tfontDescriptions[newInd] = desc;\r\t_return_value = ((newInd << 1) | 1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(3, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveGetTransform(void) {\r\tcairo_t*context;\r\tsqInt canvasOop;\r\tcairo_matrix_t m;\r\tfloat *aTransform;\r\r\taTransform = ((float *) (interpreterProxy->arrayValueOf(interpreterProxy->stackValue(0))));\r\tcanvasOop = interpreterProxy->stackValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcairo_get_matrix(context, &m);\r\taTransform[0] = (m.xx);\r\taTransform[1] = (m.xy);\r\taTransform[2] = (m.x0);\r\taTransform[3] = (m.yx);\r\taTransform[4] = (m.yy);\r\taTransform[5] = (m.y0);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(1);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivePangoIndexAtPoint(void) {\r\tsqInt index;\r\tcairo_t*context;\r\tsqInt origin;\r\tunsigned char*aString;\r\tsqInt trailing;\r\tsqInt aStringOop;\r\tsqInt lineIndex;\r\tsqInt inside;\r\tPangoAttrList*attrList;\r\tPangoLayoutLine*line;\r\tsqInt xPos;\r\tPangoLayout*layout;\r\tsqInt canvasOop;\r\tsqInt corner;\r\tsqInt charData;\r\tPangoRectangle pos;\r\tsqInt inStringOop;\r\tsqInt x;\r\tsqInt y;\r\tsqInt sqAttrArray;\r\tsqInt w;\r\tsqInt h;\r\tsqInt withWrap;\r\tsqInt cData;\r\tsqInt _return_value;\r\r\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(7), \"Object\"));\r\tinStringOop = interpreterProxy->stackValue(7);\r\tx = interpreterProxy->stackIntegerValue(6);\r\ty = interpreterProxy->stackIntegerValue(5);\r\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(4), \"Object\"));\r\tsqAttrArray = interpreterProxy->stackValue(4);\r\tw = interpreterProxy->stackIntegerValue(3);\r\th = interpreterProxy->stackIntegerValue(2);\r\twithWrap = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(1));\r\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"Object\"));\r\tcData = interpreterProxy->stackValue(0);\r\t;\r\tcanvasOop = interpreterProxy->stackValue(8);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\taStringOop = inStringOop;\r\taString = interpreterProxy->firstIndexableField(aStringOop);\r\tlayout = pango_cairo_create_layout(context);\r\tattrList = pango_attr_list_new();\r\ttranslateSqAttrsToPangoAttrsinto(sqAttrArray, attrList);\r\tpango_layout_set_text(layout, aString, strlen(aString));\r\tpango_layout_set_attributes(layout, attrList);\r\tpango_layout_set_width(layout, w * (PANGO_SCALE));\r\tif (withWrap) {\r\t\tpango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR);\r\t}\r\tcairo_translate(context, x, y);\r\tpango_cairo_update_layout(context, layout);\r\tinside = pango_layout_xy_to_index(layout, x * (PANGO_SCALE), y * (PANGO_SCALE), &index, &trailing);\r\tpango_layout_index_to_pos(layout, index, &pos);\r\tline = null;\r\tif (!(inside)) {\r\t\tpango_layout_index_to_line_x(layout, index, trailing, &lineIndex, &xPos);\r\r\t\t/* self log: 'lineIndex %x' with: line. */\r\r\t\tline = pango_layout_get_line_readonly(layout, ((lineIndex < 0) ? 0 : lineIndex));\r\t\tif (line == null) {\r\t\t\tindex = strlen(aString);\r\t\t} else {\r\t\t\tpango_layout_line_ref(line);\r\r\t\t\t/* self log: 'line->length %d' with: (self cCode: 'line->length'). */\r\r\t\t\tindex = line->start_index;\r\t\t\tindex += line->length;\r\t\t\tif (trailing > 0) {\r\t\t\t\ttrailing = 1;\r\t\t\t}\r\t\t}\r\t}\r\tpango_attr_list_unref(attrList);\r\tg_object_unref(layout);\r\tif (!(line == null)) {\r\t\tpango_layout_line_unref(line);\r\t}\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tinterpreterProxy->pushRemappableOop(aStringOop);\r\tinterpreterProxy->pushRemappableOop(cData);\r\torigin = interpreterProxy->makePointwithxValueyValue(PANGO_PIXELS(pos.x), PANGO_PIXELS(pos.y));\r\tinterpreterProxy->pushRemappableOop(origin);\r\tcorner = interpreterProxy->makePointwithxValueyValue(PANGO_PIXELS(pos.x+pos.width), PANGO_PIXELS(pos.y+pos.height));\r\torigin = interpreterProxy->popRemappableOop();\r\tcharData = interpreterProxy->popRemappableOop();\r\taStringOop = interpreterProxy->popRemappableOop();\r\taString = interpreterProxy->firstIndexableField(aStringOop);\r\tinterpreterProxy->storePointerofObjectwithValue(0, charData, origin);\r\tinterpreterProxy->storePointerofObjectwithValue(1, charData, corner);\r\tindex = sqCharCountInfromto(aString, 0, (((index + trailing) < (1 + (strlen(aString)))) ? (index + trailing) : (1 + (strlen(aString)))));\r\tif (inside || (xPos <= 0)) {\r\t\tindex += 1;\r\t}\r\tinterpreterProxy->storePointerofObjectwithValue(2, charData, ((index << 1) | 1));\r\t_return_value = interpreterProxy->integerObjectOf(index);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(9, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveLanguageAttributes(void) {\r\tsqInt arraySize;\r\tsqInt array4Oop;\r\tsqInt lOop;\r\tsqInt currentStart;\r\tsqInt ws;\r\tsqInt stringOop;\r\tint *array;\r\tint *array4;\r\tunsigned int *string;\r\tsqInt currentTag;\r\tsqInt leadingChar;\r\tsqInt arrayOop;\r\tsqInt i;\r\tsqInt arrayIndex;\r\tsqInt stringSize;\r\tsqInt currentEnd;\r\tsqInt oStringOop;\r\tsqInt oLOop;\r\tsqInt oArrayOop;\r\tsqInt _return_value;\r\tsqInt v;\r\r\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(2), \"Object\"));\r\toStringOop = interpreterProxy->stackValue(2);\r\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"Object\"));\r\toLOop = interpreterProxy->stackValue(1);\r\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"Object\"));\r\toArrayOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlOop = oLOop;\r\tarrayOop = oArrayOop;\r\tstringOop = oStringOop;\r\tif (interpreterProxy->isBytes(stringOop)) {\r\t\t_return_value = interpreterProxy->integerObjectOf(0);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(4, _return_value);\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(stringOop))) {\r\t\tprimitiveFail();\r\t\treturn null;\r\t}\r\tarraySize = interpreterProxy->stSizeOf(arrayOop);\r\tif (arraySize <= 0) {\r\t\tprimitiveFail();\r\t\treturn null;\r\t}\r\tstringSize = interpreterProxy->stSizeOf(stringOop);\r\tif (stringSize == 0) {\r\t\t_return_value = interpreterProxy->integerObjectOf(0);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(4, _return_value);\r\t\treturn null;\r\t}\r\tstring = interpreterProxy->firstIndexableField(stringOop);\r\tarray = interpreterProxy->firstIndexableField(arrayOop);\r\tws = string[0];\r\tcurrentTag = ((usqInt) (ws & 1069547520) >> 22);\r\tleadingChar = -1;\r\tcurrentStart = 0;\r\t/* begin utf8CountFor: */\r\tv = ws & 2097151;\r\tif ((0 <= v) && (v <= 127)) {\r\t\tcurrentEnd = 1;\r\t\tgoto l1;\r\t}\r\tif ((128 <= v) && (v <= 2047)) {\r\t\tcurrentEnd = 2;\r\t\tgoto l1;\r\t}\r\tif ((2048 <= v) && (v <= 55295)) {\r\t\tcurrentEnd = 3;\r\t\tgoto l1;\r\t}\r\tif ((57344 <= v) && (v <= 65535)) {\r\t\tcurrentEnd = 3;\r\t\tgoto l1;\r\t}\r\tif ((65536 <= v) && (v <= 1114111)) {\r\t\tcurrentEnd = 4;\r\t\tgoto l1;\r\t}\r\tcurrentEnd = 0;\rl1:\t/* end utf8CountFor: */;\r\tarrayIndex = 0;\r\tfor (i = 1; i <= (stringSize - 1); i += 1) {\r\t\tws = string[i];\r\t\tleadingChar = ((usqInt) (ws & 1069547520) >> 22);\r\t\tif (leadingChar != currentTag) {\r\t\t\tinterpreterProxy->pushRemappableOop(stringOop);\r\t\t\tinterpreterProxy->pushRemappableOop(arrayOop);\r\t\t\tinterpreterProxy->pushRemappableOop(lOop);\r\t\t\tarray4Oop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 4);\r\t\t\tlOop = interpreterProxy->popRemappableOop();\r\t\t\tarrayOop = interpreterProxy->popRemappableOop();\r\t\t\tstringOop = interpreterProxy->popRemappableOop();\r\t\t\tarray = interpreterProxy->firstIndexableField(arrayOop);\r\t\t\tstring = interpreterProxy->firstIndexableField(stringOop);\r\t\t\tarray4 = interpreterProxy->firstIndexableField(array4Oop);\r\t\t\tarray4[0] = lOop;\r\t\t\tarray4[1] = (((currentStart << 1) | 1));\r\t\t\tarray4[2] = (((currentEnd << 1) | 1));\r\t\t\tarray4[3] = (((currentTag << 1) | 1));\r\t\t\tarray[arrayIndex] = array4Oop;\r\t\t\tarrayIndex += 1;\r\t\t\tif (arrayIndex >= arraySize) {\r\t\t\t\tprimitiveFail();\r\t\t\t\treturn null;\r\t\t\t}\r\t\t\tcurrentTag = leadingChar;\r\t\t\tcurrentStart = currentEnd;\r\t\t}\r\t\tcurrentEnd += utf8CountFor(ws);\r\t}\r\tinterpreterProxy->pushRemappableOop(stringOop);\r\tinterpreterProxy->pushRemappableOop(arrayOop);\r\tinterpreterProxy->pushRemappableOop(lOop);\r\tarray4Oop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 4);\r\tlOop = interpreterProxy->popRemappableOop();\r\tarrayOop = interpreterProxy->popRemappableOop();\r\tstringOop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(0, array4Oop, lOop);\r\tinterpreterProxy->storeIntegerofObjectwithValue(1, array4Oop, currentStart);\r\tinterpreterProxy->storeIntegerofObjectwithValue(2, array4Oop, currentEnd);\r\tinterpreterProxy->storeIntegerofObjectwithValue(3, array4Oop, currentTag);\r\tinterpreterProxy->storePointerofObjectwithValue(arrayIndex, arrayOop, array4Oop);\r\tarrayIndex += 1;\r\t_return_value = interpreterProxy->integerObjectOf(arrayIndex);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(4, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveOpen(void) {\r\tsqInt handleOop;\r\tsqInt contextIndex;\r\tsqInt canvasOop;\r\r\tcanvasOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontextIndex = createContextFor(canvasOop);\r\tif (!(interpreterProxy->failed())) {\r\t\thandleOop = interpreterProxy->integerObjectOf(contextIndex);\r\t\tinterpreterProxy->storePointerofObjectwithValue(CanvasHandleIndex, canvasOop, handleOop);\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\treturn null;\r}\r\rEXPORT(sqInt) primitivePangoIsAvailable(void) {\r\tPangoLayout*layout;\r\tcairo_t*context;\r\tsqInt canvasOop;\r\tsqInt _return_value;\r\r\tcanvasOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlayout = pango_cairo_create_layout(context);\r\tif (layout == null) {\r\t\t_return_value = interpreterProxy->integerObjectOf(2);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->popthenPush(1, _return_value);\r\t\treturn null;\r\t}\r\tg_object_unref(layout);\r\t_return_value = (1? interpreterProxy->trueObject(): interpreterProxy->falseObject());\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivePluginVersion(void) {\r\tsqInt _return_value;\r\r\t_return_value = interpreterProxy->integerObjectOf(PluginVersion);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(1, _return_value);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveRestoreState(void) {\r\tcairo_t*context;\r\tsqInt canvasOop;\r\r\tcanvasOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcairo_restore(context);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveRotateBy(void) {\r\tcairo_t*context;\r\tsqInt canvasOop;\r\tdouble angle;\r\r\tangle = interpreterProxy->stackFloatValue(0);\r\tcanvasOop = interpreterProxy->stackValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcairo_rotate(context, angle);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(1);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveSaveState(void) {\r\tcairo_t*context;\r\tsqInt canvasOop;\r\r\tcanvasOop = interpreterProxy->stackValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcairo_save(context);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveScaleBy(void) {\r\tcairo_t*context;\r\tsqInt canvasOop;\r\tdouble x;\r\tdouble y;\r\r\tx = interpreterProxy->stackFloatValue(1);\r\ty = interpreterProxy->stackFloatValue(0);\r\tcanvasOop = interpreterProxy->stackValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcairo_scale(context, x, y);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(2);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveSetLineWidth(void) {\r\tcairo_t*context;\r\tsqInt canvasOop;\r\tdouble width;\r\r\twidth = interpreterProxy->stackFloatValue(0);\r\tcanvasOop = interpreterProxy->stackValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcairo_set_line_width(context, width);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(1);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveSetTransform(void) {\r\tcairo_t*context;\r\tsqInt canvasOop;\r\tcairo_matrix_t m;\r\tfloat *aTransform;\r\r\taTransform = ((float *) (interpreterProxy->arrayValueOf(interpreterProxy->stackValue(0))));\r\tcanvasOop = interpreterProxy->stackValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcairo_matrix_init(&m, aTransform[0], aTransform[3], aTransform[1], aTransform[4], aTransform[2], aTransform[5]);\r\tcairo_set_matrix(context, &m);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(1);\r\treturn null;\r}\r\rEXPORT(sqInt) primitivePangoShowString(void) {\r\tcairo_t*context;\r\tsqInt newW;\r\tsqInt lineCount;\r\tPangoRectangle ink;\r\tunsigned int cursorColor;\r\tPangoAttrList*attrList;\r\tPangoLayoutLine*line;\r\tPangoRectangle logical;\r\tsqInt prevBaseline;\r\tPangoLayout*layout;\r\tPangoRectangle startRect;\r\tsqInt canvasOop;\r\tPangoLayoutIter*lineIter;\r\tsqInt indexToX;\r\tchar *aString;\r\tsqInt x;\r\tsqInt y;\r\tsqInt sqAttrArray;\r\tsqInt w;\r\tsqInt h;\r\tsqInt withWrap;\r\tsqInt selStart;\r\tsqInt selEnd;\r\tsqInt cPixel;\r\tsqInt _return_value;\r\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(9)));\r\taString = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(9))));\r\tx = interpreterProxy->stackIntegerValue(8);\r\ty = interpreterProxy->stackIntegerValue(7);\r\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(6), \"Object\"));\r\tsqAttrArray = interpreterProxy->stackValue(6);\r\tw = interpreterProxy->stackIntegerValue(5);\r\th = interpreterProxy->stackIntegerValue(4);\r\twithWrap = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(3));\r\tselStart = interpreterProxy->stackIntegerValue(2);\r\tselEnd = interpreterProxy->stackIntegerValue(1);\r\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(0), \"Object\"));\r\tcPixel = interpreterProxy->stackValue(0);\r\t;\r\tcanvasOop = interpreterProxy->stackValue(10);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tcursorColor = interpreterProxy->positive32BitValueOf(cPixel);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tlayout = pango_cairo_create_layout(context);\r\tattrList = pango_attr_list_new();\r\ttranslateSqAttrsToPangoAttrsinto(sqAttrArray, attrList);\r\tif (!(selStart == selEnd)) {\r\t\tif ((selStart >= 0) && (selEnd >= 0)) {\r\t\t\taddSelectionFromtopixelinto(selStart, selEnd, cursorColor, attrList);\r\t\t}\r\t}\r\tpango_layout_set_text(layout, aString, strlen(aString));\r\tpango_layout_set_attributes(layout, attrList);\r\tpango_layout_set_width(layout, w * (PANGO_SCALE));\r\tif (withWrap) {\r\t\tpango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR);\r\t}\r\tcairo_translate(context, x, y);\r\tpango_cairo_update_layout(context, layout);\r\r\t/* \tlineIter := self pangoLayoutGetIter: layout.\r\tbaseline := self pangoLayoutIterGetBaseline: lineIter.\r\tprevBaseline := 0.\r */\r\r\tlineCount = pango_layout_get_line_count(layout);\r\tif (1) {\r\t\tpango_cairo_show_layout(context, layout);\r\t} else {\r\t\tnull;\r\t}\r\tif (selStart == selEnd) {\r\t\tif ((selStart >= 0) && (selEnd >= 0)) {\r\t\t\tpango_layout_index_to_pos(layout, selStart, &startRect);\r\t\t\taddSelectionAtpixelwith(&startRect, cursorColor, context);\r\t\t}\r\t}\r\tpango_layout_get_extents(layout, &ink, &logical);\r\r\t/* self pangoLayoutIterFree: lineIter. */\r\r\tnewW = PANGO_PIXELS(logical.width);\r\tpango_attr_list_unref(attrList);\r\tg_object_unref(layout);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\t_return_value = interpreterProxy->integerObjectOf(newW);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(11, _return_value);\r\treturn null;\r}\r\r\r/*\tShow a string - ignores outline (use drawString primitive for outlines) */\r\rEXPORT(sqInt) primitiveShowZeroTerminatedUtf8StringXY(void) {\r\tcairo_t*context;\r\tsqInt canvasOop;\r\tchar *aString;\r\tdouble x;\r\tdouble y;\r\r\tinterpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(2)));\r\taString = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(2))));\r\tx = interpreterProxy->stackFloatValue(1);\r\ty = interpreterProxy->stackFloatValue(0);\r\tcanvasOop = interpreterProxy->stackValue(3);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcairo_move_to(context, x, y);\r\tcairo_show_text(context, aString);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(3);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveStencilImageSrcLRTBDestLRTB(void) {\r\tcairo_surface_t*srcSurface;\r\tcairo_t*context;\r\tsqInt canvasOop;\r\tsqInt formOop;\r\tdouble dstL;\r\tdouble dstR;\r\tdouble dstT;\r\tdouble dstB;\r\tdouble srcL;\r\tdouble srcR;\r\tdouble srcT;\r\tdouble srcB;\r\r\tformOop = interpreterProxy->stackValue(8);\r\tdstL = interpreterProxy->stackFloatValue(7);\r\tdstR = interpreterProxy->stackFloatValue(6);\r\tdstT = interpreterProxy->stackFloatValue(5);\r\tdstB = interpreterProxy->stackFloatValue(4);\r\tsrcL = interpreterProxy->stackFloatValue(3);\r\tsrcR = interpreterProxy->stackFloatValue(2);\r\tsrcT = interpreterProxy->stackFloatValue(1);\r\tsrcB = interpreterProxy->stackFloatValue(0);\r\tcanvasOop = interpreterProxy->stackValue(9);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tsrcSurface = surfaceFrom(formOop);\r\tif (!((srcSurface != null) && ((cairo_surface_status(srcSurface)) == 0))) {\r\t\tfail(\"source surface invalid\");\r\t\treturn null;\r\t}\r\tif ((srcR != srcL) && (srcT != srcB)) {\r\t\tcairo_save(context);\r\t\tcairo_translate(context, dstL, dstT);\r\t\tcairo_scale(context, (dstR - dstL) / (srcR - srcL), (dstB - dstT) / (srcB - srcT));\r\t\tcairo_new_path(context);\r\t\tcairo_rectangle(context, 0.0, 0.0, srcR - srcL, srcB - srcT);\r\t\tcairo_clip(context);\r\t\tcairo_mask_surface(context, srcSurface, 0.0 - srcL, 0.0 - srcT);\r\t\tcairo_restore(context);\r\t}\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(9);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveTransformBy(void) {\r\tcairo_t*context;\r\tsqInt canvasOop;\r\tcairo_matrix_t m;\r\tfloat *aTransform;\r\r\taTransform = ((float *) (interpreterProxy->arrayValueOf(interpreterProxy->stackValue(0))));\r\tcanvasOop = interpreterProxy->stackValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcairo_matrix_init(&m, aTransform[0], aTransform[3], aTransform[1], aTransform[4], aTransform[2], aTransform[5]);\r\tcairo_transform(context, &m);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(1);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveTranslateBy(void) {\r\tcairo_t*context;\r\tsqInt canvasOop;\r\tdouble x;\r\tdouble y;\r\r\tx = interpreterProxy->stackFloatValue(1);\r\ty = interpreterProxy->stackFloatValue(0);\r\tcanvasOop = interpreterProxy->stackValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcontext = contextFrom(canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tcairo_translate(context, x, y);\r\tif (cairo_status(context)) {\r\t\tfailwith(\"cairo error: %s\", cairo_status_to_string(cairo_status(context)));\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop(2);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveUTF8StringWith2Indexes(void) {\r\tsqInt utf8StringOop;\r\tsqInt size;\r\tsqInt bytes;\r\tsqInt mult;\r\tunsigned char *byteString;\r\tsqInt stringOop;\r\tsqInt utf8Index;\r\tsqInt arrayOop;\r\tsqInt i;\r\tsqInt newIndex2;\r\tsqInt realutf8StringOop;\r\tsqInt newIndex1;\r\tunsigned int *wideString;\r\tunsigned char *realutf8String;\r\tsqInt val;\r\tunsigned int c;\r\tunsigned char *utf8String;\r\tsqInt oStringOop;\r\tsqInt sqIndex1;\r\tsqInt sqIndex2;\r\tsqInt oArrayOop;\r\tsqInt nullFlag;\r\r\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(4), \"Object\"));\r\toStringOop = interpreterProxy->stackValue(4);\r\tsqIndex1 = interpreterProxy->stackIntegerValue(3);\r\tsqIndex2 = interpreterProxy->stackIntegerValue(2);\r\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"Object\"));\r\toArrayOop = interpreterProxy->stackValue(1);\r\tnullFlag = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(0));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tarrayOop = oArrayOop;\r\tstringOop = oStringOop;\r\tif (interpreterProxy->isPointers(stringOop)) {\r\t\tprimitiveFail();\r\t\treturn null;\r\t}\r\tbytes = interpreterProxy->isBytes(stringOop);\r\tsize = interpreterProxy->stSizeOf(stringOop);\r\tif (bytes) {\r\t\tmult = 2;\r\t} else {\r\t\tmult = 4;\r\t}\r\tinterpreterProxy->pushRemappableOop(stringOop);\r\tinterpreterProxy->pushRemappableOop(arrayOop);\r\tutf8StringOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), (size * mult) + 1);\r\tarrayOop = interpreterProxy->popRemappableOop();\r\tstringOop = interpreterProxy->popRemappableOop();\r\tif (bytes) {\r\t\tbyteString = interpreterProxy->firstIndexableField(stringOop);\r\t} else {\r\t\twideString = interpreterProxy->firstIndexableField(stringOop);\r\t}\r\tutf8Index = 0;\r\tnewIndex1 = -1;\r\tnewIndex2 = -1;\r\tutf8String = interpreterProxy->firstIndexableField(utf8StringOop);\r\tif (bytes) {\r\t\tfor (i = 0; i <= (size - 1); i += 1) {\r\t\t\tc = byteString[i];\r\t\t\tif ((i + 1) == sqIndex1) {\r\t\t\t\tnewIndex1 = utf8Index;\r\t\t\t}\r\t\t\tif ((i + 1) == sqIndex2) {\r\t\t\t\tnewIndex2 = utf8Index;\r\t\t\t}\r\t\t\tutf8Index = putCharintoat(c, utf8String, utf8Index);\r\t\t}\r\t} else {\r\t\tfor (i = 0; i <= (size - 1); i += 1) {\r\t\t\tc = wideString[i];\r\t\t\tif ((i + 1) == sqIndex1) {\r\t\t\t\tnewIndex1 = utf8Index;\r\t\t\t}\r\t\t\tif ((i + 1) == sqIndex2) {\r\t\t\t\tnewIndex2 = utf8Index;\r\t\t\t}\r\t\t\tutf8Index = putCharintoat(c, utf8String, utf8Index);\r\t\t}\r\t}\r\tif (nullFlag) {\r\t\tutf8String[utf8Index] = 0;\r\t\tutf8Index += 1;\r\t}\r\tinterpreterProxy->pushRemappableOop(utf8StringOop);\r\tinterpreterProxy->pushRemappableOop(arrayOop);\r\trealutf8StringOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), utf8Index);\r\tarrayOop = interpreterProxy->popRemappableOop();\r\tutf8StringOop = interpreterProxy->popRemappableOop();\r\tutf8String = interpreterProxy->firstIndexableField(utf8StringOop);\r\trealutf8String = interpreterProxy->firstIndexableField(realutf8StringOop);\r\tmemcpy(realutf8String, utf8String, utf8Index);\r\tinterpreterProxy->storePointerofObjectwithValue(0, arrayOop, realutf8StringOop);\r\tif (newIndex1 == -1) {\r\t\tif (sqIndex1 == -1) {\r\t\t\tval = -1;\r\t\t} else {\r\t\t\tval = utf8Index;\r\t\t}\r\t} else {\r\t\tval = newIndex1;\r\t}\r\tinterpreterProxy->storeIntegerofObjectwithValue(1, arrayOop, val);\r\tif (newIndex2 == -1) {\r\t\tif (sqIndex2 == -1) {\r\t\t\tval = -1;\r\t\t} else {\r\t\t\tval = utf8Index;\r\t\t}\r\t} else {\r\t\tval = newIndex2;\r\t}\r\tinterpreterProxy->storeIntegerofObjectwithValue(2, arrayOop, val);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(6, arrayOop);\r\treturn null;\r}\r\rEXPORT(sqInt) primitiveUTF8StringWithIndex(void) {\r\tsqInt utf8StringOop;\r\tsqInt size;\r\tsqInt bytes;\r\tsqInt mult;\r\tunsigned char *byteString;\r\tsqInt stringOop;\r\tsqInt utf8Index;\r\tsqInt arrayOop;\r\tsqInt i;\r\tsqInt realutf8StringOop;\r\tunsigned int *wideString;\r\tunsigned char *realutf8String;\r\tsqInt val;\r\tunsigned int c;\r\tsqInt newIndex;\r\tunsigned char *utf8String;\r\tsqInt oStringOop;\r\tsqInt sqIndex;\r\tsqInt oArrayOop;\r\tsqInt nullFlag;\r\r\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(3), \"Object\"));\r\toStringOop = interpreterProxy->stackValue(3);\r\tsqIndex = interpreterProxy->stackIntegerValue(2);\r\tinterpreterProxy->success(interpreterProxy->isKindOf(interpreterProxy->stackValue(1), \"Object\"));\r\toArrayOop = interpreterProxy->stackValue(1);\r\tnullFlag = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(0));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tarrayOop = oArrayOop;\r\tstringOop = oStringOop;\r\tif (interpreterProxy->isPointers(stringOop)) {\r\t\tprimitiveFail();\r\t\treturn null;\r\t}\r\tbytes = interpreterProxy->isBytes(stringOop);\r\tsize = interpreterProxy->stSizeOf(stringOop);\r\tif (bytes) {\r\t\tmult = 2;\r\t} else {\r\t\tmult = 4;\r\t}\r\tinterpreterProxy->pushRemappableOop(stringOop);\r\tinterpreterProxy->pushRemappableOop(arrayOop);\r\tutf8StringOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), (size * mult) + 1);\r\tarrayOop = interpreterProxy->popRemappableOop();\r\tstringOop = interpreterProxy->popRemappableOop();\r\tif (bytes) {\r\t\tbyteString = interpreterProxy->firstIndexableField(stringOop);\r\t} else {\r\t\twideString = interpreterProxy->firstIndexableField(stringOop);\r\t}\r\tutf8Index = 0;\r\tnewIndex = -1;\r\tutf8String = interpreterProxy->firstIndexableField(utf8StringOop);\r\tif (bytes) {\r\t\tfor (i = 0; i <= (size - 1); i += 1) {\r\t\t\tc = byteString[i];\r\t\t\tif ((i + 1) == sqIndex) {\r\t\t\t\tnewIndex = utf8Index;\r\t\t\t}\r\t\t\tutf8Index = putCharintoat(c, utf8String, utf8Index);\r\t\t}\r\t} else {\r\t\tfor (i = 0; i <= (size - 1); i += 1) {\r\t\t\tc = wideString[i];\r\t\t\tif ((i + 1) == sqIndex) {\r\t\t\t\tnewIndex = utf8Index;\r\t\t\t}\r\t\t\tutf8Index = putCharintoat(c, utf8String, utf8Index);\r\t\t}\r\t}\r\tif (nullFlag) {\r\t\tutf8String[utf8Index] = 0;\r\t\tutf8Index += 1;\r\t}\r\tinterpreterProxy->pushRemappableOop(utf8StringOop);\r\tinterpreterProxy->pushRemappableOop(arrayOop);\r\trealutf8StringOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), utf8Index);\r\tarrayOop = interpreterProxy->popRemappableOop();\r\tutf8StringOop = interpreterProxy->popRemappableOop();\r\tutf8String = interpreterProxy->firstIndexableField(utf8StringOop);\r\trealutf8String = interpreterProxy->firstIndexableField(realutf8StringOop);\r\tmemcpy(realutf8String, utf8String, utf8Index);\r\tinterpreterProxy->storePointerofObjectwithValue(0, arrayOop, realutf8StringOop);\r\tif (newIndex == -1) {\r\t\tif (sqIndex == -1) {\r\t\t\tval = -1;\r\t\t} else {\r\t\t\tval = utf8Index;\r\t\t}\r\t} else {\r\t\tval = newIndex;\r\t}\r\tinterpreterProxy->storeIntegerofObjectwithValue(1, arrayOop, val);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->popthenPush(5, arrayOop);\r\treturn null;\r}\r\rstatic sqInt putCharintoat(sqInt c, unsigned char*utf8String, sqInt utf8Index) {\r\tunsigned int val;\r\tsqInt nBytes;\r\tsqInt mask;\r\tsqInt i;\r\tsqInt index;\r\tsqInt shift;\r\tsqInt v;\r\r\tval = c & 2097151;\r\tindex = utf8Index;\r\tif ((0 <= val) && (val <= 127)) {\r\t\tutf8String[index] = val;\r\t\treturn utf8Index + 1;\r\t}\r\t/* begin utf8CountFor: */\r\tv = c & 2097151;\r\tif ((0 <= v) && (v <= 127)) {\r\t\tnBytes = 1;\r\t\tgoto l1;\r\t}\r\tif ((128 <= v) && (v <= 2047)) {\r\t\tnBytes = 2;\r\t\tgoto l1;\r\t}\r\tif ((2048 <= v) && (v <= 55295)) {\r\t\tnBytes = 3;\r\t\tgoto l1;\r\t}\r\tif ((57344 <= v) && (v <= 65535)) {\r\t\tnBytes = 3;\r\t\tgoto l1;\r\t}\r\tif ((65536 <= v) && (v <= 1114111)) {\r\t\tnBytes = 4;\r\t\tgoto l1;\r\t}\r\tnBytes = 0;\rl1:\t/* end utf8CountFor: */;\r\tmask = utf8Headers[nBytes - 1];\r\tshift = (nBytes - 1) * -6;\r\tutf8String[index] = ((((shift < 0) ? ((usqInt) val >> -shift) : ((usqInt) val << shift))) | mask);\r\tindex += 1;\r\tfor (i = 2; i <= nBytes; i += 1) {\r\t\tshift += 6;\r\t\tutf8String[index] = (((((shift < 0) ? ((usqInt) val >> -shift) : ((usqInt) val << shift))) & 63) + 128);\r\t\tindex += 1;\r\t}\r\treturn utf8Index + nBytes;\r}\r\r\r/*\tRegister the given surface, answer an ID or -1 on failure */\r\rstatic sqInt registerSurface(cairo_surface_t*surfaceHandle) {\r\tsqInt surfaceID;\r\r\tif (registerSurfaceFn == null) {\r\t\tif (!(loadSurfacePlugin())) {\r\t\t\treturn -1;\r\t\t}\r\t}\r\tif (!((*registerSurfaceFn)((int)surfaceHandle, &surfaceDispatch, &surfaceID))) {\r\t\tfail(\"could not register surface\");\r\t\treturn -1;\r\t}\r\t/* missing DebugCode */;\r\tif (surfaceID > maxSurfaceID) {\r\t\tmaxSurfaceID = surfaceID;\r\t}\r\treturn surfaceID;\r}\r\r\r/*\tNote: This is coded so that is can be run from Squeak. */\r\rEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter) {\r\tsqInt ok;\r\r\tinterpreterProxy = anInterpreter;\r\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\r\tif (ok == 0) {\r\t\treturn 0;\r\t}\r\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\r\treturn ok;\r}\r\rstatic void setSourcergbalpha(cairo_t*context, sqInt rgb, sqInt alpha) {\r\tsqInt b;\r\tsqInt r;\r\tsqInt g;\r\r\tr = (((usqInt) rgb) >> 20) & 1023;\r\tg = (((usqInt) rgb) >> 10) & 1023;\r\tb = (((usqInt) rgb) >> 0) & 1023;\r\tif (alpha == 255) {\r\t\tcairo_set_source_rgb(context, r / 1023.0, g / 1023.0, b / 1023.0);\r\t} else {\r\t\tcairo_set_source_rgba(context, r / 1023.0, g / 1023.0, b / 1023.0, alpha / 255.0);\r\t}\r}\r\rstatic sqInt showSurfacexywh(cairo_surface_t *surfaceHandle, sqInt x, sqInt y, sqInt w, sqInt h) {\r\treturn 0;\r}\r\rEXPORT(sqInt) shutdownModule(void) {\r\tPangoFontDescription*desc;\r\tsqInt i;\r\tsqInt id;\r\tcairo_surface_t*surface;\r\r\tfor (i = 0; i <= (lastIndex(contexts)); i += 1) {\r\t\tif (!((contexts[i]) == null)) {\r\t\t\tlogwith(\"context %i still active when unloading module!\", i);\r\t\t\tcairo_destroy(contexts[i]);\r\t\t\tcontexts[i] = null;\r\t\t}\r\t}\r\tfor (id = 0; id <= maxSurfaceID; id += 1) {\r\t\tsurface = findSurface(id);\r\t\tif (surface != null) {\r\t\t\tlogwith(\"surface %i still active when unloading module!\", id);\r\t\t\tdestroySurface(id);\r\t\t}\r\t}\r\tfor (i = 0; i <= 255; i += 1) {\r\t\tdesc = fontDescriptions[i];\r\t\tif (desc != null) {\r\t\t\tpango_font_description_free(desc);\r\t\t\tfontDescriptions[i] = null;\r\t\t}\r\t}\r\tif (defaultFontDescription != null) {\r\t\tpango_font_description_free(defaultFontDescription);\r\t\tdefaultFontDescription = null;\r\t}\r\treturn 1;\r}\r\rstatic sqInt sqAssert(sqInt aBool) {\r\t/* missing DebugCode */;\r}\r\rstatic sqInt sqCharCountInfromto(unsigned char* aString, sqInt from, sqInt to) {\r\tsqInt sqCount;\r\tsqInt aChar;\r\tsqInt index;\r\r\tindex = from;\r\tsqCount = 0;\r\twhile (index < to) {\r\t\taChar = aString[index];\r\t\tif (aChar < 128) {\r\t\t\tindex += 1;\r\t\t} else {\r\t\t\tif (aChar < 224) {\r\t\t\t\tindex += 2;\r\t\t\t} else {\r\t\t\t\tif (aChar < 240) {\r\t\t\t\t\tindex += 3;\r\t\t\t\t} else {\r\t\t\t\t\tif (aChar < 248) {\r\t\t\t\t\t\tindex += 4;\r\t\t\t\t\t} else {\r\t\t\t\t\t\tif (aChar < 252) {\r\t\t\t\t\t\t\tindex += 5;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\tif (aChar >= 252) {\r\t\t\t\t\t\t\t\tindex += 6;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t\tsqCount += 1;\r\t}\r\treturn sqCount;\r}\r\r\r/*\tstroke depending on canvasOop's stroke flag */\r\rstatic void strokefrom(cairo_t*context, sqInt canvasOop) {\r\tsqInt stroke;\r\tsqInt canvasFlags;\r\tsqInt rgb;\r\r\tcanvasFlags = interpreterProxy->fetchIntegerofObject(CanvasFlagsIndex, canvasOop);\r\tif (interpreterProxy->failed()) {\r\t\tfail(\"canvas flags not an integer\");\r\t} else {\r\t\tstroke = canvasFlags & CanvasFlagStroke;\r\t\tif (stroke != 0) {\r\t\t\trgb = interpreterProxy->fetchIntegerofObject(CanvasStrokeColorIndex, canvasOop);\r\t\t\tcairo_save(context);\r\t\t\tsetSourcergbalpha(context, rgb, stroke);\r\t\t\tcairo_stroke(context);\r\t\t\tcairo_restore(context);\r\t\t}\r\t}\r}\r\r\r/*\tanswer a surface by looking up its surface plugin ID stored as bits in formOop */\r\rstatic cairo_surface_t* surfaceFrom(sqInt formOop) {\r\tsqInt surfaceID;\r\r\tif ((interpreterProxy->slotSizeOf(formOop)) < FormInstSize) {\r\t\tfail(\"form oop invalid\");\r\t\treturn null;\r\t}\r\tsurfaceID = interpreterProxy->fetchIntegerofObject(FormBitsIndex, formOop);\r\tif (interpreterProxy->failed()) {\r\t\tfail(\"form handle not an integer\");\r\t\treturn null;\r\t}\r\treturn findSurface(surfaceID);\r}\r\rstatic sqInt translateSqAttrsToPangoAttrsinto(sqInt sqAttrsArrayOop, PangoAttrList *pangoAttrList) {\r\tsqInt ind;\r\tsqInt symbolOop;\r\tsqInt *sqAttrsArray;\r\tchar *symbol;\r\tsqInt sqAttrsSize;\r\tsqInt attrArray;\r\r\tsqAttrsSize = interpreterProxy->stSizeOf(sqAttrsArrayOop);\r\tsqAttrsArray = interpreterProxy->firstIndexableField(sqAttrsArrayOop);\r\taddDefaultInto(pangoAttrList);\r\tfor (ind = 0; ind <= (sqAttrsSize - 1); ind += 1) {\r\t\tattrArray = sqAttrsArray[ind];\r\t\tsymbolOop = interpreterProxy->fetchPointerofObject(0, attrArray);\r\t\tsymbol = interpreterProxy->firstIndexableField(symbolOop);\r\t\tif ((symbol[0]) == 65) {\r\t\t\taddAlignmentinto(attrArray, pangoAttrList);\r\t\t}\r\t\tif ((symbol[0]) == 67) {\r\t\t\taddColorinto(attrArray, pangoAttrList);\r\t\t}\r\t\tif ((symbol[0]) == 69) {\r\t\t\taddEmphasisinto(attrArray, pangoAttrList);\r\t\t}\r\t\tif ((symbol[0]) == 70) {\r\t\t\taddFontinto(attrArray, pangoAttrList);\r\t\t}\r\t\tif ((symbol[0]) == 76) {\r\t\t\taddLanguageinto(attrArray, pangoAttrList);\r\t\t}\r\t}\r\treturn 1;\r}\r\rstatic sqInt unlockSurfacexywh(cairo_surface_t*surfaceHandle, sqInt x, sqInt y, sqInt w, sqInt h) {\r\t/* missing DebugCode */;\r\tif ((w > 0) && (h > 0)) {\r\t\tcairo_surface_mark_dirty_rectangle(surfaceHandle, x, y, w, h);\r\t}\r\treturn 1;\r}\r\r\r/*\tUnregister the surface, answer true if successful */\r\rstatic sqInt unregisterSurface(sqInt surfaceID) {\r\tif (unregisterSurfaceFn == null) {\r\t\tif (!(loadSurfacePlugin())) {\r\t\t\treturn 0;\r\t\t}\r\t}\r\t/* missing DebugCode */;\r\tif (!((*unregisterSurfaceFn)(surfaceID))) {\r\t\tfailwith(\"could not unregister surface %i\", surfaceID);\r\t\treturn 0;\r\t}\r\treturn 1;\r}\r\rstatic sqInt utf8CountFor(unsigned int value) {\r\tsqInt v;\r\r\tv = value & 2097151;\r\tif ((0 <= v) && (v <= 127)) {\r\t\treturn 1;\r\t}\r\tif ((128 <= v) && (v <= 2047)) {\r\t\treturn 2;\r\t}\r\tif ((2048 <= v) && (v <= 55295)) {\r\t\treturn 3;\r\t}\r\tif ((57344 <= v) && (v <= 65535)) {\r\t\treturn 3;\r\t}\r\tif ((65536 <= v) && (v <= 1114111)) {\r\t\treturn 4;\r\t}\r\treturn 0;\r}\r\r\r#ifdef SQUEAK_BUILTIN_PLUGIN\r\r\rvoid* RomePlugin_exports[][3] = {\r\t{\"RomePlugin\", \"primitivePangoBlockAtIndex\", (void*)primitivePangoBlockAtIndex},\r\t{\"RomePlugin\", \"primitiveDrawImageSrcLRTBDestLRTB\", (void*)primitiveDrawImageSrcLRTBDestLRTB},\r\t{\"RomePlugin\", \"primitiveDrawGeneralBezierShape\", (void*)primitiveDrawGeneralBezierShape},\r\t{\"RomePlugin\", \"initialiseModule\", (void*)initialiseModule},\r\t{\"RomePlugin\", \"primitiveFillRadialOriginXYdirectionXYnormalXYcolorStops\", (void*)primitiveFillRadialOriginXYdirectionXYnormalXYcolorStops},\r\t{\"RomePlugin\", \"primitiveFillColorAlpha\", (void*)primitiveFillColorAlpha},\r\t{\"RomePlugin\", \"primitiveFillLinearOriginXYdirectionXYcolorStops\", (void*)primitiveFillLinearOriginXYdirectionXYcolorStops},\r\t{\"RomePlugin\", \"primitiveDestroyFormHandle\", (void*)primitiveDestroyFormHandle},\r\t{\"RomePlugin\", \"primitiveClear\", (void*)primitiveClear},\r\t{\"RomePlugin\", \"primitiveTransformBy\", (void*)primitiveTransformBy},\r\t{\"RomePlugin\", \"primitiveDrawOvalLeftRightTopBottom\", (void*)primitiveDrawOvalLeftRightTopBottom},\r\t{\"RomePlugin\", \"primitiveDrawPolygon\", (void*)primitiveDrawPolygon},\r\t{\"RomePlugin\", \"primitivePluginVersion\", (void*)primitivePluginVersion},\r\t{\"RomePlugin\", \"primitiveShowZeroTerminatedUtf8StringXY\", (void*)primitiveShowZeroTerminatedUtf8StringXY},\r\t{\"RomePlugin\", \"primitiveFontFace\", (void*)primitiveFontFace},\r\t{\"RomePlugin\", \"primitiveClipRectangleLeftRightTopBottom\", (void*)primitiveClipRectangleLeftRightTopBottom},\r\t{\"RomePlugin\", \"getModuleName\", (void*)getModuleName},\r\t{\"RomePlugin\", \"primitiveFontSize\", (void*)primitiveFontSize},\r\t{\"RomePlugin\", \"primitivePangoIndexAtPoint\", (void*)primitivePangoIndexAtPoint},\r\t{\"RomePlugin\", \"primitiveDrawPolyline\", (void*)primitiveDrawPolyline},\r\t{\"RomePlugin\", \"primitiveDrawCurveFromXYviaXYandXYtoXY\", (void*)primitiveDrawCurveFromXYviaXYandXYtoXY},\r\t{\"RomePlugin\", \"primitiveRotateBy\", (void*)primitiveRotateBy},\r\t{\"RomePlugin\", \"primitiveDrawRoundRectLeftRightTopBottomRadiusCorner\", (void*)primitiveDrawRoundRectLeftRightTopBottomRadiusCorner},\r\t{\"RomePlugin\", \"moduleUnloaded\", (void*)moduleUnloaded},\r\t{\"RomePlugin\", \"primitiveDrawLineFromXYtoXY\", (void*)primitiveDrawLineFromXYtoXY},\r\t{\"RomePlugin\", \"primitivePangoShowString\", (void*)primitivePangoShowString},\r\t{\"RomePlugin\", \"primitiveDrawArcRadiusXYFromTo\", (void*)primitiveDrawArcRadiusXYFromTo},\r\t{\"RomePlugin\", \"primitiveDrawZeroTerminatedUtf8StringXY\", (void*)primitiveDrawZeroTerminatedUtf8StringXY},\r\t{\"RomePlugin\", \"primitiveSetLineWidth\", (void*)primitiveSetLineWidth},\r\t{\"RomePlugin\", \"primitivePangoComposeString\", (void*)primitivePangoComposeString},\r\t{\"RomePlugin\", \"primitiveUTF8StringWithIndex\", (void*)primitiveUTF8StringWithIndex},\r\t{\"RomePlugin\", \"primitiveStencilImageSrcLRTBDestLRTB\", (void*)primitiveStencilImageSrcLRTBDestLRTB},\r\t{\"RomePlugin\", \"setInterpreter\", (void*)setInterpreter},\r\t{\"RomePlugin\", \"primitiveRestoreState\", (void*)primitiveRestoreState},\r\t{\"RomePlugin\", \"primitiveScaleBy\", (void*)primitiveScaleBy},\r\t{\"RomePlugin\", \"primitivePangoComposeString2\", (void*)primitivePangoComposeString2},\r\t{\"RomePlugin\", \"primitiveDrawRectangleLeftRightTopBottom\", (void*)primitiveDrawRectangleLeftRightTopBottom},\r\t{\"RomePlugin\", \"primitiveFillBitmapOriginXYdirectionXYnormalXYRepeatImage\", (void*)primitiveFillBitmapOriginXYdirectionXYnormalXYRepeatImage},\r\t{\"RomePlugin\", \"primitiveSetTransform\", (void*)primitiveSetTransform},\r\t{\"RomePlugin\", \"primitiveSaveState\", (void*)primitiveSaveState},\r\t{\"RomePlugin\", \"primitiveLanguageAttributes\", (void*)primitiveLanguageAttributes},\r\t{\"RomePlugin\", \"primitiveGetTransform\", (void*)primitiveGetTransform},\r\t{\"RomePlugin\", \"primitivePangoFontDescriptionIndex\", (void*)primitivePangoFontDescriptionIndex},\r\t{\"RomePlugin\", \"primitiveUTF8StringWith2Indexes\", (void*)primitiveUTF8StringWith2Indexes},\r\t{\"RomePlugin\", \"primitiveCreateFormHandle\", (void*)primitiveCreateFormHandle},\r\t{\"RomePlugin\", \"primitivePangoIsAvailable\", (void*)primitivePangoIsAvailable},\r\t{\"RomePlugin\", \"primitiveClose\", (void*)primitiveClose},\r\t{\"RomePlugin\", \"primitiveOpen\", (void*)primitiveOpen},\r\t{\"RomePlugin\", \"primitiveDrawCurveFromXYviaXYtoXY\", (void*)primitiveDrawCurveFromXYviaXYtoXY},\r\t{\"RomePlugin\", \"primitiveGetLineWidth\", (void*)primitiveGetLineWidth},\r\t{\"RomePlugin\", \"shutdownModule\", (void*)shutdownModule},\r\t{\"RomePlugin\", \"primitiveTranslateBy\", (void*)primitiveTranslateBy},\r\t{NULL, NULL, NULL}\r};\r\r\r#endif /* ifdef SQ_BUILTIN_PLUGIN */\r\r"
  },
  {
    "path": "vm/src/from_squeak/unix/src/plugins/Squeak3D/Squeak3D.c",
    "content": "/* Automatically generated from Squeak on 23 January 2011 6:34:03 pm \r   by VMMaker 4.4.7\r */\r\r#include <math.h>\r#include <stdio.h>\r#include <stdlib.h>\r#include <string.h>\r#include <time.h>\r\r/* Default EXPORT macro that does nothing (see comment in sq.h): */\r#define EXPORT(returnType) returnType\r\r/* Do not include the entire sq.h file but just those parts needed. */\r/*  The virtual machine proxy definition */\r#include \"sqVirtualMachine.h\"\r/* Configuration options */\r#include \"sqConfig.h\"\r/* Platform specific definitions */\r#include \"sqPlatformSpecific.h\"\r\r#define true 1\r#define false 0\r#define null 0  /* using 'null' because nil is predefined in Think C */\r#ifdef SQUEAK_BUILTIN_PLUGIN\r#undef EXPORT\r// was #undef EXPORT(returnType) but screws NorCroft cc\r#define EXPORT(returnType) static returnType\r#endif\r#include \"b3d.h\"\r#include \"b3d.h\"\r\r#include \"sqMemoryAccess.h\"\r\r\r/*** Constants ***/\r#define AmbientPart 0\r#define DiffusePart 4\r#define EmissionAlpha 15\r#define EmissionBlue 14\r#define EmissionGreen 13\r#define EmissionRed 12\r#define FlagAmbientPart 256\r#define FlagAttenuated 4\r#define FlagDiffusePart 512\r#define FlagDirectional 2\r#define FlagHasSpot 8\r#define FlagM44Identity 1\r#define FlagM44NoPerspective 2\r#define FlagM44NoTranslation 4\r#define FlagPositional 1\r#define FlagSpecularPart 1024\r#define InAllMask 1365\r#define InBackBit 1024\r#define InBottomBit 64\r#define InFrontBit 256\r#define InLeftBit 1\r#define InRightBit 4\r#define InTopBit 16\r#define MaterialShininess 16\r#define MaterialSize 17\r#define OutAllMask 2730\r#define OutBackBit 2048\r#define OutBottomBit 128\r#define OutFrontBit 512\r#define OutLeftBit 2\r#define OutRightBit 8\r#define OutTopBit 32\r#define PrimLightAttenuationConstant 18\r#define PrimLightAttenuationLinear 19\r#define PrimLightAttenuationSquared 20\r#define PrimLightDirection 15\r#define PrimLightDirectionX 15\r#define PrimLightDirectionY 16\r#define PrimLightDirectionZ 17\r#define PrimLightFlags 21\r#define PrimLightPositionX 12\r#define PrimLightPositionY 13\r#define PrimLightPositionZ 14\r#define PrimLightSize 32\r#define PrimTypeMax 6\r#define PrimVertexSize 16\r#define PrimVtxClipFlags 13\r#define PrimVtxColor32 12\r#define PrimVtxNormal 3\r#define PrimVtxNormalX 3\r#define PrimVtxNormalY 4\r#define PrimVtxNormalZ 5\r#define PrimVtxPosition 0\r#define PrimVtxPositionX 0\r#define PrimVtxPositionY 1\r#define PrimVtxPositionZ 2\r#define PrimVtxRasterPosW 11\r#define PrimVtxRasterPosX 8\r#define PrimVtxRasterPosY 9\r#define PrimVtxRasterPosZ 10\r#define PrimVtxTexCoordU 6\r#define PrimVtxTexCoordV 7\r#define PrimVtxTexCoords 6\r#define SpecularPart 8\r#define SpotLightDeltaCos 24\r#define SpotLightExponent 25\r#define SpotLightMinCos 22\r#define VBTrackAmbient 1\r#define VBTrackDiffuse 2\r#define VBTrackEmission 8\r#define VBTrackSpecular 4\r#define VBTwoSidedLighting 64\r#define VBUseLocalViewer 128\r#define VBVtxHasNormals 16\r\r/*** Function Prototypes ***/\rstatic sqInt addPartfromtrackFlagscale(float *lightPart, float *materialPart, sqInt vbTrackFlag, double scale);\rstatic sqInt analyzeMatrix3x3Length(float *m);\rstatic sqInt analyzeMatrix(float *m);\r#pragma export on\rEXPORT(sqInt) b3dClipPolygon(void);\rEXPORT(sqInt) b3dComputeMinIndexZ(void);\rEXPORT(sqInt) b3dComputeMinZ(void);\rEXPORT(sqInt) b3dDetermineClipFlags(void);\rEXPORT(sqInt) b3dInitPrimitiveObject(void);\rEXPORT(sqInt) b3dInitializeRasterizerState(void);\rEXPORT(sqInt) b3dInplaceHouseHolderInvert(void);\rEXPORT(sqInt) b3dLoadIndexArray(void);\rEXPORT(sqInt) b3dLoadVertexBuffer(void);\rEXPORT(sqInt) b3dMapVertexBuffer(void);\rEXPORT(sqInt) b3dOrthoNormInverseMatrix(void);\rEXPORT(sqInt) b3dPrimitiveNextClippedTriangle(void);\rEXPORT(sqInt) b3dPrimitiveObjectSize(void);\rEXPORT(sqInt) b3dPrimitiveTextureSize(void);\rEXPORT(sqInt) b3dRasterizerVersion(void);\rEXPORT(sqInt) b3dShadeVertexBuffer(void);\rEXPORT(sqInt) b3dShaderVersion(void);\rEXPORT(sqInt) b3dStartRasterizer(void);\rEXPORT(sqInt) b3dTransformDirection(void);\rEXPORT(sqInt) b3dTransformMatrixWithInto(void);\rEXPORT(sqInt) b3dTransformPoint(void);\rEXPORT(sqInt) b3dTransformPrimitiveNormal(void);\rEXPORT(sqInt) b3dTransformPrimitivePosition(void);\rEXPORT(sqInt) b3dTransformPrimitiveRasterPosition(void);\rEXPORT(sqInt) b3dTransformVertexBuffer(void);\rEXPORT(sqInt) b3dTransformerVersion(void);\rEXPORT(sqInt) b3dTransposeMatrix(void);\r#pragma export off\rstatic double backClipValueFromto(sqInt last, sqInt next);\rstatic double bottomClipValueFromto(sqInt last, sqInt next);\rstatic sqInt clipPolygoncountwithmask(int *vtxArray, sqInt vtxCount, int *tempVtxArray, sqInt outMask);\rstatic sqInt clipPolygonBackFromtocount(int *buf1, int *buf2, sqInt n);\rstatic sqInt clipPolygonBottomFromtocount(int *buf1, int *buf2, sqInt n);\rstatic sqInt clipPolygonFrontFromtocount(int *buf1, int *buf2, sqInt n);\rstatic sqInt clipPolygonLeftFromtocount(int *buf1, int *buf2, sqInt n);\rstatic sqInt clipPolygonRightFromtocount(int *buf1, int *buf2, sqInt n);\rstatic sqInt clipPolygonTopFromtocount(int *buf1, int *buf2, sqInt n);\rstatic sqInt computeAttenuation(void);\rstatic sqInt computeDirection(void);\rstatic sqInt computeSpecularDirection(void);\rstatic double computeSpotFactor(void);\rstatic sqInt determineClipFlagscount(void *vtxArray, sqInt count);\rstatic double dotProductOfFloatwithDouble(float * v1, double *v2);\rstatic void* fetchLightSourceofObject(sqInt index, sqInt anArray);\rstatic double frontClipValueFromto(sqInt last, sqInt next);\rstatic VirtualMachine * getInterpreter(void);\r#pragma export on\rEXPORT(const char*) getModuleName(void);\r#pragma export off\rstatic sqInt halt(void);\r#pragma export on\rEXPORT(sqInt) initialiseModule(void);\r#pragma export off\rstatic sqInt interpolateFromtoatinto(float *last, float *next, double t, float *out);\rstatic double inverseLengthOfDouble(double * aVector);\rstatic double inverseLengthOfFloat(float * aVector);\rstatic double leftClipValueFromto(sqInt last, sqInt next);\rstatic sqInt loadObjectsFrom(sqInt stackIndex);\rstatic sqInt loadPrimitiveLightSource(void);\rstatic sqInt loadPrimitiveVertex(void);\rstatic sqInt loadRasterizerState(sqInt stackIndex);\rstatic sqInt loadTextureinto(sqInt textureOop, B3DTexture *destPtr);\rstatic sqInt loadTexturesFrom(sqInt stackIndex);\rstatic sqInt loadViewportFrom(sqInt stackIndex);\rstatic sqInt mapVBofSizeinto(void *vtxArray, sqInt vtxCount, sqInt boxArray);\r#pragma export on\rEXPORT(sqInt) moduleUnloaded(char *aModuleName);\r#pragma export off\rstatic sqInt msg(char *s);\r#pragma export on\rEXPORT(sqInt) primitiveSetBitBltPlugin(void);\r#pragma export off\rstatic double processIndexedofSizeidxArrayidxSize(float *vtxArray, sqInt vtxSize, int *idxArray, sqInt idxSize);\rstatic sqInt processIndexedIDXofSizeidxArrayidxSize(float *vtxArray, sqInt vtxSize, int *idxArray, sqInt idxSize);\rstatic double processNonIndexedofSize(float *vtxArray, sqInt vtxSize);\rstatic sqInt processNonIndexedIDXofSize(float *vtxArray, sqInt vtxSize);\rstatic double rightClipValueFromto(sqInt last, sqInt next);\r#pragma export on\rEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\r#pragma export off\rstatic sqInt shadeVertex(void);\rstatic sqInt stackLightArrayValue(sqInt stackIndex);\rstatic void * stackMaterialValue(sqInt stackIndex);\rstatic void* stackMatrix(sqInt index);\rstatic void* stackPrimitiveIndexArrayofSizevalidateforVertexSize(sqInt stackIndex, sqInt nItems, sqInt aBool, sqInt maxIndex);\rstatic void* stackPrimitiveVertex(sqInt index);\rstatic void* stackPrimitiveVertexArrayofSize(sqInt index, sqInt nItems);\rstatic sqInt storeObjectsInto(sqInt stackIndex);\rstatic sqInt storePrimitiveVertex(void);\rstatic double topClipValueFromto(sqInt last, sqInt next);\rstatic sqInt transformMatrixwithinto(float *src, float *arg, float *dst);\rstatic sqInt transformPrimitiveNormalbyrescale(float *pVertex, float *matrix, sqInt rescale);\rstatic sqInt transformPrimitivePositionby(float *pVertex, float *matrix);\rstatic sqInt transformPrimitivePositionFastby(float *pVertex, float *matrix);\rstatic sqInt transformPrimitivePositionFasterby(float *pVertex, float *matrix);\rstatic sqInt transformPrimitiveRasterPositionby(float *pVertex, float *matrix);\rstatic sqInt transformVBcountbyandflags(float *vtxArray, sqInt vtxCount, float *modelViewMatrix, float *projectionMatrix, sqInt flags);\rstatic void* vbLoadArraysize(sqInt oop, sqInt count);\r/*** Variables ***/\rstatic char bbPluginName[256] = \"BitBltPlugin\";\rstatic sqInt copyBitsFn;\r\r#ifdef SQUEAK_BUILTIN_PLUGIN\rextern\r#endif\rstruct VirtualMachine* interpreterProxy;\rstatic double l2vDirection[3];\rstatic double l2vDistance;\rstatic double l2vSpecDir[3];\rstatic sqInt lightFlags;\rstatic double lightScale;\rstatic float* litVertex;\rstatic sqInt loadBBFn;\rstatic const char *moduleName =\r#ifdef SQUEAK_BUILTIN_PLUGIN\r\t\"Squeak3D 23 January 2011 (i)\"\r#else\r\t\"Squeak3D 23 January 2011 (e)\"\r#endif\r;\rstatic float* primLight;\rstatic float* primMaterial;\rstatic B3DRasterizerState state;\rstatic sqInt vbFlags;\rstatic B3DPrimitiveViewport viewport;\rstatic double vtxInColor[4];\rstatic double vtxOutColor[4];\r\r\r\r/*\tAdd the given light part to the output color, scaled by the given scale factor.\r\tIf the given flag is set in vbFlags then load the part from the primitive vertex */\r\rstatic sqInt addPartfromtrackFlagscale(float *lightPart, float *materialPart, sqInt vbTrackFlag, double scale) {\r    double aPart;\r    double bPart;\r    double gPart;\r    double rPart;\r\r\tif (vbFlags & vbTrackFlag) {\r\t\trPart = ((vtxInColor[0]) * (lightPart[0])) * scale;\r\t\tgPart = ((vtxInColor[1]) * (lightPart[1])) * scale;\r\t\tbPart = ((vtxInColor[2]) * (lightPart[2])) * scale;\r\t\taPart = ((vtxInColor[3]) * (lightPart[3])) * scale;\r\t} else {\r\r\t\t/* Note: This should be pre-computed. */\r\r\t\trPart = ((materialPart[0]) * (lightPart[0])) * scale;\r\t\tgPart = ((materialPart[1]) * (lightPart[1])) * scale;\r\t\tbPart = ((materialPart[2]) * (lightPart[2])) * scale;\r\t\taPart = ((materialPart[3]) * (lightPart[3])) * scale;\r\t}\r\tvtxOutColor[0] = ((vtxOutColor[0]) + rPart);\r\tvtxOutColor[1] = ((vtxOutColor[1]) + gPart);\r\tvtxOutColor[2] = ((vtxOutColor[2]) + bPart);\r\tvtxOutColor[3] = ((vtxOutColor[3]) + aPart);\r}\r\r\r/*\tCheck if the matrix scales normals to non-unit length. */\r\rstatic sqInt analyzeMatrix3x3Length(float *m) {\r    double det;\r\r\tdet = (((((((m[0]) * (m[5])) * (m[10])) - (((m[2]) * (m[5])) * (m[8]))) + (((m[4]) * (m[9])) * (m[2]))) - (((m[6]) * (m[9])) * (m[0]))) + (((m[8]) * (m[1])) * (m[6]))) - (((m[10]) * (m[1])) * (m[4]));\r\treturn (det < 0.99) || (det > 1.01);\r}\r\r\r/*\tAnalyze the matrix and return the appropriate flags */\r\rstatic sqInt analyzeMatrix(float *m) {\r    sqInt flags;\r\r\tflags = 0;\r\tif (((m[12]) == 0.0) && (((m[13]) == 0.0) && (((m[14]) == 0.0) && ((m[15]) == 1.0)))) {\r\r\t\t/* Check translation */\r\r\t\tflags = flags | FlagM44NoPerspective;\r\t\tif (((m[3]) == 0.0) && (((m[7]) == 0.0) && ((m[11]) == 0.0))) {\r\r\t\t\t/* Check for identity */\r\r\t\t\tflags = flags | FlagM44NoTranslation;\r\t\t\tif (((m[0]) == 1.0) && (((m[5]) == 1.0) && (((m[10]) == 1.0) && (((m[1]) == 0.0) && (((m[2]) == 0.0) && (((m[4]) == 0.0) && (((m[6]) == 0.0) && (((m[8]) == 0.0) && ((m[9]) == 0.0))))))))) {\r\t\t\t\tflags = flags | FlagM44Identity;\r\t\t\t}\r\t\t}\r\t}\r\treturn flags;\r}\r\r\r/*\tPrimitive. Clip the polygon given in the vertexArray using the temporary vertex array which is assumed to have sufficient size. */\r\rEXPORT(sqInt) b3dClipPolygon(void) {\r    sqInt count;\r    sqInt outMask;\r    int *tempVtxArray;\r    int *vtxArray;\r    sqInt vtxCount;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 4)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\toutMask = interpreterProxy->stackIntegerValue(0);\r\tvtxCount = interpreterProxy->stackIntegerValue(2);\r\tvtxArray = stackPrimitiveVertexArrayofSize(3, vtxCount + 4);\r\ttempVtxArray = stackPrimitiveVertexArrayofSize(1, vtxCount + 4);\r\tif ((vtxArray == null) || ((tempVtxArray == null) || (interpreterProxy->failed()))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tvtxArray -= PrimVertexSize;\r\ttempVtxArray -= PrimVertexSize;\r\tcount = clipPolygoncountwithmask(vtxArray, vtxCount, tempVtxArray, outMask);\r\tinterpreterProxy->pop(5);\r\tinterpreterProxy->pushInteger(count);\r}\r\r\r/*\tPrimitive. Compute and return the index for the minimal z value of all objects in the vertex buffer. */\r\rEXPORT(sqInt) b3dComputeMinIndexZ(void) {\r    int *idxArray;\r    sqInt idxSize;\r    sqInt minIndex;\r    sqInt primType;\r    float *vtxArray;\r    sqInt vtxSize;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 5)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tidxSize = interpreterProxy->stackIntegerValue(0);\r\tvtxSize = interpreterProxy->stackIntegerValue(2);\r\tprimType = interpreterProxy->stackIntegerValue(4);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tvtxArray = stackPrimitiveVertexArrayofSize(3, vtxSize);\r\tidxArray = stackPrimitiveIndexArrayofSizevalidateforVertexSize(1, idxSize, 1, vtxSize);\r\tif ((vtxArray == null) || ((idxArray == null) || (interpreterProxy->failed()))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tif ((primType < 1) || (primType > 6)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tif (primType <= 3) {\r\t\tminIndex = processNonIndexedIDXofSize(vtxArray, vtxSize);\r\t} else {\r\t\tminIndex = processIndexedIDXofSizeidxArrayidxSize(vtxArray, vtxSize, idxArray, idxSize);\r\t}\r\tif (!(interpreterProxy->failed())) {\r\t\tinterpreterProxy->pop(6);\r\t\tinterpreterProxy->pushInteger(minIndex);\r\t}\r}\r\r\r/*\tPrimitive. Compute and return the minimal z value of all objects in the vertex buffer. */\r\rEXPORT(sqInt) b3dComputeMinZ(void) {\r    int *idxArray;\r    sqInt idxSize;\r    double minZ;\r    sqInt primType;\r    float *vtxArray;\r    sqInt vtxSize;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 5)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tidxSize = interpreterProxy->stackIntegerValue(0);\r\tvtxSize = interpreterProxy->stackIntegerValue(2);\r\tprimType = interpreterProxy->stackIntegerValue(4);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tvtxArray = stackPrimitiveVertexArrayofSize(3, vtxSize);\r\tidxArray = stackPrimitiveIndexArrayofSizevalidateforVertexSize(1, idxSize, 1, vtxSize);\r\tif ((vtxArray == null) || ((idxArray == null) || (interpreterProxy->failed()))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tif ((primType < 1) || (primType > 6)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tif (primType <= 3) {\r\t\tminZ = processNonIndexedofSize(vtxArray, vtxSize);\r\t} else {\r\t\tminZ = processIndexedofSizeidxArrayidxSize(vtxArray, vtxSize, idxArray, idxSize);\r\t}\r\tif (!(interpreterProxy->failed())) {\r\t\tinterpreterProxy->pop(6);\r\t\tinterpreterProxy->pushFloat(minZ);\r\t}\r}\r\r\r/*\tPrimitive. Determine the clipping flags for all vertices. */\r\rEXPORT(sqInt) b3dDetermineClipFlags(void) {\r    sqInt result;\r    void *vtxArray;\r    sqInt vtxCount;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 2)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tvtxCount = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tvtxArray = stackPrimitiveVertexArrayofSize(1, vtxCount);\r\tif ((vtxArray == null) || (interpreterProxy->failed())) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tresult = determineClipFlagscount(vtxArray, vtxCount);\r\tif (!(interpreterProxy->failed())) {\r\t\tinterpreterProxy->pop(3);\r\t\tinterpreterProxy->pushInteger(result);\r\t}\r}\r\rEXPORT(sqInt) b3dInitPrimitiveObject(void) {\r    int *idxArray;\r    sqInt idxSize;\r    void *primObj;\r    sqInt primOop;\r    sqInt primSize;\r    sqInt primitive;\r    sqInt textureIndex;\r    int *vtxArray;\r    sqInt vtxSize;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 8)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\ttextureIndex = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tloadViewportFrom(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tvtxSize = interpreterProxy->stackIntegerValue(4);\r\tvtxArray = stackPrimitiveVertexArrayofSize(5, vtxSize);\r\tif (vtxArray == null) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tidxSize = interpreterProxy->stackIntegerValue(2);\r\tidxArray = stackPrimitiveIndexArrayofSizevalidateforVertexSize(3, idxSize, 1, vtxSize);\r\tif (idxArray == null) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tprimitive = interpreterProxy->stackIntegerValue(6);\r\tif ((primitive < 1) || (primitive > PrimTypeMax)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tif (!((primitive == 3) || ((primitive == 5) || (primitive == 6)))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tprimOop = interpreterProxy->stackObjectValue(7);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(primOop))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tprimObj = interpreterProxy->firstIndexableField(primOop);\r\r\t/* Do the work */\r\r\tprimSize = interpreterProxy->byteSizeOf(primOop);\r\tif (primitive == 3) {\r\t\tif (b3dAddPolygonObject((void*) primObj, primSize, B3D_FACE_RGB, textureIndex, (B3DPrimitiveVertex*) vtxArray, vtxSize, &viewport) != B3D_NO_ERROR) {\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t}\r\tif (primitive == 5) {\r\t\tif (b3dAddIndexedTriangleObject((void*) primObj, primSize, B3D_FACE_RGB, textureIndex, (B3DPrimitiveVertex*) vtxArray, vtxSize, (B3DInputFace*) idxArray, idxSize / 3, &viewport) != B3D_NO_ERROR) {\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t}\r\tif (primitive == 6) {\r\t\tif (b3dAddIndexedQuadObject((void*) primObj, primSize, B3D_FACE_RGB, textureIndex, (B3DPrimitiveVertex*) vtxArray, vtxSize, (B3DInputQuad*) idxArray, idxSize / 4, &viewport) != B3D_NO_ERROR) {\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t}\r\tinterpreterProxy->pop(9);\r\tinterpreterProxy->push(primOop);\r}\r\r\r/*\tPrimitive. Initialize the primitive level objects of the given rasterizer. */\r\rEXPORT(sqInt) b3dInitializeRasterizerState(void) {\r    void *obj;\r    sqInt objLen;\r    sqInt objOop;\r    sqInt stateOop;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 0)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tstateOop = interpreterProxy->stackObjectValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!((interpreterProxy->isPointers(stateOop)) && ((interpreterProxy->slotSizeOf(stateOop)) >= 7))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tobjOop = interpreterProxy->fetchPointerofObject(0, stateOop);\r\tif (((objOop & 1)) || (!(interpreterProxy->isWords(objOop)))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tobjLen = interpreterProxy->byteSizeOf(objOop);\r\tobj = interpreterProxy->firstIndexableField(objOop);\r\tif (b3dInitializeFaceAllocator(obj, objLen) != B3D_NO_ERROR) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tobjOop = interpreterProxy->fetchPointerofObject(1, stateOop);\r\tif (((objOop & 1)) || (!(interpreterProxy->isWords(objOop)))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tobjLen = interpreterProxy->byteSizeOf(objOop);\r\tobj = interpreterProxy->firstIndexableField(objOop);\r\tif (b3dInitializeEdgeAllocator(obj, objLen) != B3D_NO_ERROR) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tobjOop = interpreterProxy->fetchPointerofObject(2, stateOop);\r\tif (((objOop & 1)) || (!(interpreterProxy->isWords(objOop)))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tobjLen = interpreterProxy->byteSizeOf(objOop);\r\tobj = interpreterProxy->firstIndexableField(objOop);\r\tif (b3dInitializeAttrAllocator(obj, objLen) != B3D_NO_ERROR) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tobjOop = interpreterProxy->fetchPointerofObject(3, stateOop);\r\tif (((objOop & 1)) || (!(interpreterProxy->isWords(objOop)))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tobjLen = interpreterProxy->byteSizeOf(objOop);\r\tobj = interpreterProxy->firstIndexableField(objOop);\r\tif (b3dInitializeAET(obj, objLen) != B3D_NO_ERROR) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tobjOop = interpreterProxy->fetchPointerofObject(4, stateOop);\r\tif (((objOop & 1)) || (!(interpreterProxy->isWords(objOop)))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tobjLen = interpreterProxy->byteSizeOf(objOop);\r\tobj = interpreterProxy->firstIndexableField(objOop);\r\tif (b3dInitializeEdgeList(obj, objLen) != B3D_NO_ERROR) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tobjOop = interpreterProxy->fetchPointerofObject(5, stateOop);\r\tif (((objOop & 1)) || (!(interpreterProxy->isWords(objOop)))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tobjLen = interpreterProxy->byteSizeOf(objOop);\r\tobj = interpreterProxy->firstIndexableField(objOop);\r\tif (b3dInitializeFillList(obj, objLen) != B3D_NO_ERROR) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r}\r\r\r/*\tPrimitive. Perform an inplace house holder matrix inversion */\r\rEXPORT(sqInt) b3dInplaceHouseHolderInvert(void) {\r    double beta;\r    double d[4][4];\r    sqInt i;\r    sqInt j;\r    sqInt k;\r    double m[4][4];\r    sqInt r;\r    float *rcvr;\r    double s;\r    double sigma;\r    double sum;\r    double x[4][4] = { {1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1} };\r\r\t;\r\trcvr = stackMatrix(0);\r\tfor (i = 0; i <= 3; i += 1) {\r\t\tfor (j = 0; j <= 3; j += 1) {\r\t\t\t(m[i])[j] = (rcvr[(i * 4) + j]);\r\t\t}\r\t}\r\tfor (j = 0; j <= 3; j += 1) {\r\t\tsigma = 0.0;\r\t\tfor (i = j; i <= 3; i += 1) {\r\t\t\tsigma += ((m[i])[j]) * ((m[i])[j]);\r\t\t}\r\t\tif (sigma < 1.0e-10) {\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\tif (((m[j])[j]) < 0.0) {\r\t\t\ts = sqrt(sigma);\r\t\t} else {\r\t\t\ts = 0.0 - (sqrt(sigma));\r\t\t}\r\t\tfor (r = 0; r <= 3; r += 1) {\r\t\t\t(d[j])[r] = s;\r\t\t}\r\t\tbeta = 1.0 / ((s * ((m[j])[j])) - sigma);\r\t\t(m[j])[j] = (((m[j])[j]) - s);\r\t\tfor (k = (j + 1); k <= 3; k += 1) {\r\t\t\tsum = 0.0;\r\t\t\tfor (i = j; i <= 3; i += 1) {\r\t\t\t\tsum += ((m[i])[j]) * ((m[i])[k]);\r\t\t\t}\r\t\t\tsum = sum * beta;\r\t\t\tfor (i = j; i <= 3; i += 1) {\r\t\t\t\t(m[i])[k] = (((m[i])[k]) + (((m[i])[j]) * sum));\r\t\t\t}\r\t\t}\r\t\tfor (r = 0; r <= 3; r += 1) {\r\t\t\tsum = 0.0;\r\t\t\tfor (i = j; i <= 3; i += 1) {\r\t\t\t\tsum += ((x[i])[r]) * ((m[i])[j]);\r\t\t\t}\r\t\t\tsum = sum * beta;\r\t\t\tfor (i = j; i <= 3; i += 1) {\r\t\t\t\t(x[i])[r] = (((x[i])[r]) + (sum * ((m[i])[j])));\r\t\t\t}\r\t\t}\r\t}\r\tfor (r = 0; r <= 3; r += 1) {\r\t\tfor (i = 3; i >= 0; i += -1) {\r\t\t\tfor (j = (i + 1); j <= 3; j += 1) {\r\t\t\t\t(x[i])[r] = (((x[i])[r]) - (((x[j])[r]) * ((m[i])[j])));\r\t\t\t}\r\t\t\t(x[i])[r] = (((x[i])[r]) / ((d[i])[r]));\r\t\t}\r\t}\r\tfor (i = 0; i <= 3; i += 1) {\r\t\tfor (j = 0; j <= 3; j += 1) {\r\t\t\trcvr[(i * 4) + j] = (((float) ((x[i])[j])));\r\t\t}\r\t}\r}\r\r\r/*\tPrimitive. Load the given index array into the receiver.\r\tNOTE: dstStart is a zero-based index. */\r\rEXPORT(sqInt) b3dLoadIndexArray(void) {\r    sqInt count;\r    sqInt dstArray;\r    int *dstPtr;\r    sqInt dstSize;\r    sqInt dstStart;\r    sqInt i;\r    sqInt idx;\r    sqInt maxValue;\r    sqInt srcArray;\r    int *srcPtr;\r    sqInt vtxOffset;\r\r\tvtxOffset = interpreterProxy->stackIntegerValue(0);\r\tmaxValue = interpreterProxy->stackIntegerValue(1);\r\tcount = interpreterProxy->stackIntegerValue(2);\r\tsrcArray = interpreterProxy->stackObjectValue(3);\r\tdstStart = interpreterProxy->stackIntegerValue(4);\r\tdstArray = interpreterProxy->stackObjectValue(5);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(srcArray))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tif ((interpreterProxy->slotSizeOf(srcArray)) < count) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\r\t/* Check dstArray */\r\r\tsrcPtr = ((int*) (interpreterProxy->firstIndexableField(srcArray)));\r\r\t/* Check if there is enough room left in dstArray */\r\r\tdstSize = interpreterProxy->slotSizeOf(dstArray);\r\tif ((dstStart + count) > dstSize) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\r\t/* Do the actual work */\r\r\tdstPtr = ((int *) (interpreterProxy->firstIndexableField(dstArray)));\r\tfor (i = 0; i <= (count - 1); i += 1) {\r\t\tidx = srcPtr[i];\r\t\tif ((idx < 1) || (idx > maxValue)) {\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\tdstPtr[dstStart + i] = (idx + vtxOffset);\r\t}\r\tinterpreterProxy->pop(7);\r\tinterpreterProxy->pushInteger(count);\r}\r\r\r/*\tPrimitive. Load the data into the given vertex buffer.\r\tNOTE: dstStart is a zero-based index. */\r\rEXPORT(sqInt) b3dLoadVertexBuffer(void) {\r    int *colorPtr;\r    sqInt count;\r    int *defaultColor;\r    int *defaultNormal;\r    int *defaultTexCoords;\r    int *defaultVtx;\r    int *dstPtr;\r    sqInt dstStart;\r    sqInt i;\r    int *normalPtr;\r    int *pVtx;\r    int *texPtr;\r    int *vtxPtr;\r\r\tdefaultVtx = stackPrimitiveVertex(0);\r\tcount = interpreterProxy->stackIntegerValue(1);\r\ttexPtr = vbLoadArraysize(interpreterProxy->stackObjectValue(2), 2 * count);\r\tcolorPtr = vbLoadArraysize(interpreterProxy->stackObjectValue(3), count);\r\tnormalPtr = vbLoadArraysize(interpreterProxy->stackObjectValue(4), 3 * count);\r\tvtxPtr = vbLoadArraysize(interpreterProxy->stackObjectValue(5), 3 * count);\r\tdstStart = interpreterProxy->stackIntegerValue(6);\r\r\t/* Check for all problems above */\r\r\tdstPtr = stackPrimitiveVertexArrayofSize(7, dstStart + count);\r\tif ((dstPtr == null) || ((defaultVtx == null) || (interpreterProxy->failed()))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tif (normalPtr == null) {\r\t\tdefaultNormal = defaultVtx + PrimVtxNormal;\r\t} else {\r\t\tdefaultNormal = normalPtr;\r\t}\r\tif (texPtr == null) {\r\t\tdefaultTexCoords = defaultVtx + PrimVtxTexCoords;\r\t} else {\r\t\tdefaultTexCoords = texPtr;\r\t}\r\tif (colorPtr == null) {\r\t\tdefaultColor = defaultVtx + PrimVtxColor32;\r\t} else {\r\t\tdefaultColor = colorPtr;\r\t}\r\tpVtx = dstPtr + (dstStart * PrimVertexSize);\r\tfor (i = 0; i <= (count - 1); i += 1) {\r\t\tpVtx[PrimVtxPositionX] = (vtxPtr[0]);\r\t\tpVtx[PrimVtxPositionY] = (vtxPtr[1]);\r\t\tpVtx[PrimVtxPositionZ] = (vtxPtr[2]);\r\t\tpVtx[PrimVtxNormalX] = (defaultNormal[0]);\r\t\tpVtx[PrimVtxNormalY] = (defaultNormal[1]);\r\t\tpVtx[PrimVtxNormalZ] = (defaultNormal[2]);\r\t\tpVtx[PrimVtxColor32] = (defaultColor[0]);\r\t\tpVtx[PrimVtxTexCoordU] = (defaultTexCoords[0]);\r\t\tpVtx[PrimVtxTexCoordV] = (defaultTexCoords[1]);\r\t\tpVtx += PrimVertexSize;\r\t\tvtxPtr += 3;\r\t\tif (!(normalPtr == null)) {\r\t\t\tdefaultNormal += 3;\r\t\t}\r\t\tif (!(colorPtr == null)) {\r\t\t\tdefaultColor += 1;\r\t\t}\r\t\tif (!(texPtr == null)) {\r\t\t\tdefaultTexCoords += 2;\r\t\t}\r\t}\r\tinterpreterProxy->pop(9);\r\tinterpreterProxy->pushInteger(count);\r}\r\r\r/*\tPrimitive. Determine the bounds for all vertices in the vertex buffer. */\r\rEXPORT(sqInt) b3dMapVertexBuffer(void) {\r    sqInt boxArray;\r    void *vtxArray;\r    sqInt vtxCount;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 3)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tboxArray = interpreterProxy->stackObjectValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(((interpreterProxy->fetchClassOf(boxArray)) == (interpreterProxy->classArray())) && ((interpreterProxy->slotSizeOf(boxArray)) == 4))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tvtxCount = interpreterProxy->stackIntegerValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tvtxArray = stackPrimitiveVertexArrayofSize(2, vtxCount);\r\tif ((vtxArray == null) || (interpreterProxy->failed())) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tmapVBofSizeinto(vtxArray, vtxCount, boxArray);\r\tif (!(interpreterProxy->failed())) {\r\t\tinterpreterProxy->pop(3);\r\t}\r}\r\rEXPORT(sqInt) b3dOrthoNormInverseMatrix(void) {\r    float *dst;\r    sqInt dstOop;\r    double rx;\r    double ry;\r    double rz;\r    float *src;\r    sqInt srcOop;\r    double x;\r    double y;\r    double z;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 0)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tsrcOop = interpreterProxy->stackObjectValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!((interpreterProxy->isWords(srcOop)) && ((interpreterProxy->slotSizeOf(srcOop)) == 16))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\r\t/* reload srcOop in case of GC */\r\r\tdstOop = interpreterProxy->clone(srcOop);\r\tsrcOop = interpreterProxy->stackObjectValue(0);\r\tsrc = interpreterProxy->firstIndexableField(srcOop);\r\r\t/* Transpose upper 3x3 matrix */\r\t/* dst at: 0 put: (src at: 0). */\r\r\tdst = interpreterProxy->firstIndexableField(dstOop);\r\tdst[1] = (src[4]);\r\tdst[2] = (src[8]);\r\tdst[4] = (src[1]);\r\tdst[6] = (src[9]);\r\tdst[8] = (src[2]);\r\tdst[9] = (src[6]);\r\tx = src[3];\r\ty = src[7];\r\tz = src[11];\r\trx = ((x * (dst[0])) + (y * (dst[1]))) + (z * (dst[2]));\r\try = ((x * (dst[4])) + (y * (dst[5]))) + (z * (dst[6]));\r\trz = ((x * (dst[8])) + (y * (dst[9]))) + (z * (dst[10]));\r\tdst[3] = (((float) (0.0 - rx)));\r\tdst[7] = (((float) (0.0 - ry)));\r\tdst[11] = (((float) (0.0 - rz)));\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->push(dstOop);\r}\r\r\r/*\tPrimitive. Return the next clipped triangle from the vertex buffer and return its index. */\r\rEXPORT(sqInt) b3dPrimitiveNextClippedTriangle(void) {\r    sqInt firstIndex;\r    sqInt i;\r    sqInt idx1;\r    sqInt idx2;\r    sqInt idx3;\r    int *idxArray;\r    sqInt idxCount;\r    sqInt triMask;\r    int *vtxArray;\r    sqInt vtxCount;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 5)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tidxCount = interpreterProxy->stackIntegerValue(0);\r\tvtxCount = interpreterProxy->stackIntegerValue(2);\r\tfirstIndex = interpreterProxy->stackIntegerValue(4);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tvtxArray = stackPrimitiveVertexArrayofSize(3, vtxCount);\r\tidxArray = stackPrimitiveIndexArrayofSizevalidateforVertexSize(1, idxCount, 1, vtxCount);\r\tif ((vtxArray == null) || ((idxArray == null) || (interpreterProxy->failed()))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tidxArray -= 1;\r\tvtxArray -= PrimVertexSize;\r\tfor (i = firstIndex; i <= idxCount; i += 3) {\r\t\tidx1 = idxArray[i];\r\t\tidx2 = idxArray[i + 1];\r\t\tidx3 = idxArray[i + 2];\r\t\tif (!((idx1 == 0) || ((idx2 == 0) || (idx3 == 0)))) {\r\r\t\t\t/* Check if tri is completely inside */\r\r\t\t\ttriMask = (vtxArray[(idx1 * PrimVertexSize) + PrimVtxClipFlags]) & ((vtxArray[(idx2 * PrimVertexSize) + PrimVtxClipFlags]) & (vtxArray[(idx3 * PrimVertexSize) + PrimVtxClipFlags]));\r\t\t\tif (!((InAllMask & triMask) == InAllMask)) {\r\t\t\t\tif (triMask & OutAllMask) {\r\t\t\t\t\tidxArray[i] = 0;\r\t\t\t\t\tidxArray[i + 1] = 0;\r\t\t\t\t\tidxArray[i + 2] = 0;\r\t\t\t\t} else {\r\t\t\t\t\tinterpreterProxy->pop(6);\r\t\t\t\t\tinterpreterProxy->pushInteger(i);\r\t\t\t\t\treturn null;\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t}\r\tinterpreterProxy->pop(6);\r\tinterpreterProxy->pushInteger(0);\r}\r\r\r/*\tPrimitive. Return the minimal number of words needed for a primitive object. */\r\rEXPORT(sqInt) b3dPrimitiveObjectSize(void) {\r    sqInt objSize;\r\r\tobjSize = (((sqInt) (sizeof(B3DPrimitiveObject) + sizeof(B3DPrimitiveVertex)) >> 2)) + 1;\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->pushInteger(objSize);\r}\r\r\r/*\tPrimitive. Return the minimal number of words needed for a primitive object. */\r\rEXPORT(sqInt) b3dPrimitiveTextureSize(void) {\r    sqInt objSize;\r\r\tobjSize = (((sqInt) (sizeof(B3DTexture)) >> 2)) + 1;\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->pushInteger(objSize);\r}\r\r\r/*\tPrimitive. Return the version of the rasterizer. */\r\rEXPORT(sqInt) b3dRasterizerVersion(void) {\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->pushInteger(1);\r}\r\r\r/*\tPrimitive. Shade all the vertices in the vertex buffer using the given array of primitive light sources. Return true on success. */\r\rEXPORT(sqInt) b3dShadeVertexBuffer(void) {\r    sqInt i;\r    sqInt j;\r    sqInt lightArray;\r    sqInt lightCount;\r    float *vtxArray;\r    sqInt vtxCount;\r    sqInt lightOop;\r    sqInt rgba;\r    sqInt a;\r    sqInt b;\r    sqInt g;\r    sqInt r;\r\r\tvbFlags = interpreterProxy->stackIntegerValue(0);\r\tprimMaterial = stackMaterialValue(1);\r\tlightArray = stackLightArrayValue(2);\r\tvtxCount = interpreterProxy->stackIntegerValue(3);\r\tvtxArray = stackPrimitiveVertexArrayofSize(4, vtxCount);\r\tif ((vtxArray == null) || ((primMaterial == null) || (interpreterProxy->failed()))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tlitVertex = vtxArray;\r\r\t/* Go over all vertices */\r\r\tlightCount = interpreterProxy->slotSizeOf(lightArray);\r\tfor (i = 1; i <= vtxCount; i += 1) {\r\t\t/* begin loadPrimitiveVertex */\r\t\trgba = (((int*) litVertex))[PrimVtxColor32];\r\t\tvtxInColor[2] = ((rgba & 255) * (1.0 / 255.0));\r\t\trgba = ((usqInt) rgba) >> 8;\r\t\tvtxInColor[1] = ((rgba & 255) * (1.0 / 255.0));\r\t\trgba = ((usqInt) rgba) >> 8;\r\t\tvtxInColor[0] = ((rgba & 255) * (1.0 / 255.0));\r\t\trgba = ((usqInt) rgba) >> 8;\r\t\tvtxInColor[3] = ((rgba & 255) * (1.0 / 255.0));\r\t\tif (vbFlags & VBTrackEmission) {\r\t\t\tvtxOutColor[0] = ((vtxInColor[0]) + (primMaterial[EmissionRed]));\r\t\t\tvtxOutColor[1] = ((vtxInColor[1]) + (primMaterial[EmissionGreen]));\r\t\t\tvtxOutColor[2] = ((vtxInColor[2]) + (primMaterial[EmissionBlue]));\r\t\t\tvtxOutColor[3] = ((vtxInColor[3]) + (primMaterial[EmissionAlpha]));\r\t\t} else {\r\t\t\tvtxOutColor[0] = (primMaterial[EmissionRed]);\r\t\t\tvtxOutColor[1] = (primMaterial[EmissionGreen]);\r\t\t\tvtxOutColor[2] = (primMaterial[EmissionBlue]);\r\t\t\tvtxOutColor[3] = (primMaterial[EmissionAlpha]);\r\t\t}\r\t\tfor (j = 0; j <= (lightCount - 1); j += 1) {\r\t\t\t/* begin fetchLightSource:ofObject: */\r\t\t\tlightOop = interpreterProxy->fetchPointerofObject(j, lightArray);\r\t\t\tprimLight = interpreterProxy->firstIndexableField(lightOop);\r\t\t\t/* begin loadPrimitiveLightSource */\r\t\t\tlightFlags = (((int*) primLight))[PrimLightFlags];\r\t\t\tshadeVertex();\r\t\t}\r\t\t/* begin storePrimitiveVertex */\r\t\tr = ((sqInt)((vtxOutColor[0]) * 255));\r\t\tr = (((((r < 255) ? r : 255)) < 0) ? 0 : (((r < 255) ? r : 255)));\r\t\tg = ((sqInt)((vtxOutColor[1]) * 255));\r\t\tg = (((((g < 255) ? g : 255)) < 0) ? 0 : (((g < 255) ? g : 255)));\r\t\tb = ((sqInt)((vtxOutColor[2]) * 255));\r\t\tb = (((((b < 255) ? b : 255)) < 0) ? 0 : (((b < 255) ? b : 255)));\r\t\ta = ((sqInt)((vtxOutColor[3]) * 255));\r\t\ta = (((((a < 255) ? a : 255)) < 0) ? 0 : (((a < 255) ? a : 255)));\r\t\t(((int*) litVertex))[PrimVtxColor32] = (b + ((g + ((r + (a << 8)) << 8)) << 8));\r\t\tlitVertex += PrimVertexSize;\r\t}\r\tinterpreterProxy->pop(6);\r\tinterpreterProxy->pushBool(1);\r}\r\r\r/*\tReturn the current shader version. */\r\rEXPORT(sqInt) b3dShaderVersion(void) {\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->pushInteger(1);\r}\r\r\r/*\tPrimitive. Start the rasterizer. */\r\rEXPORT(sqInt) b3dStartRasterizer(void) {\r    sqInt errCode;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 3)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tif (!(loadRasterizerState(2))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tloadTexturesFrom(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tloadObjectsFrom(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\terrCode = b3dMainLoop(&state, B3D_NO_ERROR);\r\tstoreObjectsInto(1);\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->pushInteger(errCode);\r}\r\rEXPORT(sqInt) b3dTransformDirection(void) {\r    float *matrix;\r    double rx;\r    double ry;\r    double rz;\r    sqInt v3Oop;\r    float *vertex;\r    double x;\r    double y;\r    double z;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tv3Oop = interpreterProxy->stackObjectValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!((interpreterProxy->isWords(v3Oop)) && ((interpreterProxy->slotSizeOf(v3Oop)) == 3))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tvertex = interpreterProxy->firstIndexableField(v3Oop);\r\tmatrix = stackMatrix(1);\r\tif (matrix == null) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tx = vertex[0];\r\ty = vertex[1];\r\tz = vertex[2];\r\trx = ((x * (matrix[0])) + (y * (matrix[1]))) + (z * (matrix[2]));\r\try = ((x * (matrix[4])) + (y * (matrix[5]))) + (z * (matrix[6]));\r\trz = ((x * (matrix[8])) + (y * (matrix[9]))) + (z * (matrix[10]));\r\tv3Oop = interpreterProxy->clone(v3Oop);\r\tvertex = interpreterProxy->firstIndexableField(v3Oop);\r\tvertex[0] = (((float) rx));\r\tvertex[1] = (((float) ry));\r\tvertex[2] = (((float) rz));\r\tinterpreterProxy->pop(2);\r\tinterpreterProxy->push(v3Oop);\r}\r\r\r/*\tTransform two matrices into the third */\r\rEXPORT(sqInt) b3dTransformMatrixWithInto(void) {\r    float *m1;\r    float *m2;\r    float *m3;\r\r\tm3 = stackMatrix(0);\r\tm2 = stackMatrix(1);\r\tm1 = stackMatrix(2);\r\tif (((m1 == null) || (m2 == null)) || (m3 == null)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tif (m2 == m3) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\ttransformMatrixwithinto(m1, m2, m3);\r\tinterpreterProxy->pop(3);\r}\r\rEXPORT(sqInt) b3dTransformPoint(void) {\r    float *matrix;\r    double rw;\r    double rx;\r    double ry;\r    double rz;\r    sqInt v3Oop;\r    float *vertex;\r    double x;\r    double y;\r    double z;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tv3Oop = interpreterProxy->stackObjectValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!((interpreterProxy->isWords(v3Oop)) && ((interpreterProxy->slotSizeOf(v3Oop)) == 3))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tvertex = interpreterProxy->firstIndexableField(v3Oop);\r\tmatrix = stackMatrix(1);\r\tif (matrix == null) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tx = vertex[0];\r\ty = vertex[1];\r\tz = vertex[2];\r\trx = (((x * (matrix[0])) + (y * (matrix[1]))) + (z * (matrix[2]))) + (matrix[3]);\r\try = (((x * (matrix[4])) + (y * (matrix[5]))) + (z * (matrix[6]))) + (matrix[7]);\r\trz = (((x * (matrix[8])) + (y * (matrix[9]))) + (z * (matrix[10]))) + (matrix[11]);\r\trw = (((x * (matrix[12])) + (y * (matrix[13]))) + (z * (matrix[14]))) + (matrix[15]);\r\tv3Oop = interpreterProxy->clone(v3Oop);\r\tvertex = interpreterProxy->firstIndexableField(v3Oop);\r\tif (rw == 1.0) {\r\t\tvertex[0] = (((float) rx));\r\t\tvertex[1] = (((float) ry));\r\t\tvertex[2] = (((float) rz));\r\t} else {\r\t\tif (rw == 0.0) {\r\t\t\trw = 0.0;\r\t\t} else {\r\t\t\trw = 1.0 / rw;\r\t\t}\r\t\tvertex[0] = (((float) (rx * rw)));\r\t\tvertex[1] = (((float) (ry * rw)));\r\t\tvertex[2] = (((float) (rz * rw)));\r\t}\r\tinterpreterProxy->pop(2);\r\tinterpreterProxy->push(v3Oop);\r}\r\r\r/*\tTransform the normal of the given primitive vertex using the argument matrix and rescale the normal if necessary. */\r\rEXPORT(sqInt) b3dTransformPrimitiveNormal(void) {\r    float *matrix;\r    float *pVertex;\r    sqInt rescale;\r\r\trescale = interpreterProxy->stackValue(0);\r\tif (!(rescale == (interpreterProxy->nilObject()))) {\r\t\trescale = interpreterProxy->booleanValueOf(rescale);\r\t}\r\tmatrix = stackMatrix(1);\r\tpVertex = stackPrimitiveVertex(2);\r\tif ((matrix == null) || (pVertex == null)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tif ((rescale != 1) && (rescale != 0)) {\r\t\trescale = analyzeMatrix3x3Length(matrix);\r\t}\r\ttransformPrimitiveNormalbyrescale(pVertex, matrix, rescale);\r\tinterpreterProxy->pop(3);\r}\r\r\r/*\tTransform the position of the given primitive vertex the given matrix\r\tand store the result back inplace. */\r\rEXPORT(sqInt) b3dTransformPrimitivePosition(void) {\r    float *matrix;\r    float *pVertex;\r\r\tmatrix = stackMatrix(0);\r\tpVertex = stackPrimitiveVertex(1);\r\tif ((matrix == null) || (pVertex == null)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\ttransformPrimitivePositionby(pVertex, matrix);\r\tinterpreterProxy->pop(2);\r}\r\r\r/*\tTransform the position of the given primitive vertex the given matrix\r\tand store the result in homogenous coordinates at rasterPos. */\r\rEXPORT(sqInt) b3dTransformPrimitiveRasterPosition(void) {\r    float *matrix;\r    float *pVertex;\r\r\tmatrix = stackMatrix(0);\r\tpVertex = stackPrimitiveVertex(1);\r\tif ((matrix == null) || (pVertex == null)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\ttransformPrimitiveRasterPositionby(pVertex, matrix);\r\tinterpreterProxy->pop(2);\r}\r\r\r/*\tTransform an entire vertex buffer using the supplied modelview and projection matrix. */\r\rEXPORT(sqInt) b3dTransformVertexBuffer(void) {\r    sqInt flags;\r    float *modelViewMatrix;\r    float *projectionMatrix;\r    float *vtxArray;\r    sqInt vtxCount;\r\r\tflags = interpreterProxy->stackIntegerValue(0);\r\tprojectionMatrix = stackMatrix(1);\r\tmodelViewMatrix = stackMatrix(2);\r\tvtxCount = interpreterProxy->stackIntegerValue(3);\r\tvtxArray = stackPrimitiveVertexArrayofSize(4, vtxCount);\r\tif (((projectionMatrix == null) || (modelViewMatrix == null)) || (vtxArray == null)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\ttransformVBcountbyandflags(vtxArray, vtxCount, modelViewMatrix, projectionMatrix, flags);\r\tinterpreterProxy->pop(5);\r}\r\r\r/*\tReturn the current version of the transformer */\r\rEXPORT(sqInt) b3dTransformerVersion(void) {\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->pushInteger(1);\r}\r\rEXPORT(sqInt) b3dTransposeMatrix(void) {\r    float *dst;\r    sqInt dstOop;\r    float *src;\r    sqInt srcOop;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 0)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tsrcOop = interpreterProxy->stackObjectValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!((interpreterProxy->isWords(srcOop)) && ((interpreterProxy->slotSizeOf(srcOop)) == 16))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\r\t/* reload srcOop in case of GC */\r\r\tdstOop = interpreterProxy->clone(srcOop);\r\tsrcOop = interpreterProxy->stackObjectValue(0);\r\tsrc = interpreterProxy->firstIndexableField(srcOop);\r\r\t/* dst at: 0 put: (src at: 0). */\r\r\tdst = interpreterProxy->firstIndexableField(dstOop);\r\tdst[1] = (src[4]);\r\tdst[2] = (src[8]);\r\tdst[3] = (src[12]);\r\tdst[4] = (src[1]);\r\tdst[6] = (src[9]);\r\tdst[7] = (src[13]);\r\tdst[8] = (src[2]);\r\tdst[9] = (src[6]);\r\tdst[11] = (src[14]);\r\tdst[12] = (src[3]);\r\tdst[13] = (src[7]);\r\tdst[14] = (src[11]);\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->push(dstOop);\r}\r\rstatic double backClipValueFromto(sqInt last, sqInt next) {\r\treturn (((((float *) last))[PrimVtxRasterPosZ]) - ((((float *) last))[PrimVtxRasterPosW])) / ((((((float *) next))[PrimVtxRasterPosW]) - ((((float *) last))[PrimVtxRasterPosW])) - (((((float *) next))[PrimVtxRasterPosZ]) - ((((float *) last))[PrimVtxRasterPosZ])));\r}\r\rstatic double bottomClipValueFromto(sqInt last, sqInt next) {\r\treturn (0.0 - (((((float *) last))[PrimVtxRasterPosY]) + ((((float *) last))[PrimVtxRasterPosW]))) / ((((((float *) next))[PrimVtxRasterPosW]) - ((((float *) last))[PrimVtxRasterPosW])) + (((((float *) next))[PrimVtxRasterPosY]) - ((((float *) last))[PrimVtxRasterPosY])));\r}\r\rstatic sqInt clipPolygoncountwithmask(int *vtxArray, sqInt vtxCount, int *tempVtxArray, sqInt outMask) {\r    sqInt count;\r\r\tif (outMask == OutLeftBit) {\r\t\treturn clipPolygonLeftFromtocount(tempVtxArray, vtxArray, vtxCount);\r\t}\r\tif (outMask == OutRightBit) {\r\t\treturn clipPolygonRightFromtocount(tempVtxArray, vtxArray, vtxCount);\r\t}\r\tif (outMask == OutTopBit) {\r\t\treturn clipPolygonTopFromtocount(tempVtxArray, vtxArray, vtxCount);\r\t}\r\tif (outMask == OutBottomBit) {\r\t\treturn clipPolygonBottomFromtocount(tempVtxArray, vtxArray, vtxCount);\r\t}\r\tif (outMask == OutFrontBit) {\r\t\treturn clipPolygonFrontFromtocount(tempVtxArray, vtxArray, vtxCount);\r\t}\r\tif (outMask == OutBackBit) {\r\t\treturn clipPolygonBackFromtocount(tempVtxArray, vtxArray, vtxCount);\r\t}\r\tcount = vtxCount;\r\tcount = clipPolygonLeftFromtocount(vtxArray, tempVtxArray, count);\r\tif (count == 0) {\r\t\treturn 0;\r\t}\r\tcount = clipPolygonRightFromtocount(tempVtxArray, vtxArray, count);\r\tif (count == 0) {\r\t\treturn 0;\r\t}\r\tcount = clipPolygonTopFromtocount(vtxArray, tempVtxArray, count);\r\tif (count == 0) {\r\t\treturn 0;\r\t}\r\tcount = clipPolygonBottomFromtocount(tempVtxArray, vtxArray, count);\r\tif (count == 0) {\r\t\treturn 0;\r\t}\r\tcount = clipPolygonFrontFromtocount(vtxArray, tempVtxArray, count);\r\tif (count == 0) {\r\t\treturn 0;\r\t}\r\tcount = clipPolygonBackFromtocount(tempVtxArray, vtxArray, count);\r\treturn count;\r}\r\rstatic sqInt clipPolygonBackFromtocount(int *buf1, int *buf2, sqInt n) {\r    sqInt i;\r    sqInt inLast;\r    sqInt inNext;\r    sqInt j;\r    int *last;\r    int *next;\r    sqInt outIndex;\r    double t;\r\r\toutIndex = 0;\r\tlast = buf1 + (n * PrimVertexSize);\r\tnext = buf1 + PrimVertexSize;\r\tinLast = (last[PrimVtxClipFlags]) & InBackBit;\r\tfor (i = 1; i <= n; i += 1) {\r\t\tinNext = (next[PrimVtxClipFlags]) & InBackBit;\r\t\tif (!(inLast == inNext)) {\r\r\t\t\t/* Passes clip boundary */\r\r\t\t\tt = (((((float *) last))[PrimVtxRasterPosZ]) - ((((float *) last))[PrimVtxRasterPosW])) / ((((((float *) next))[PrimVtxRasterPosW]) - ((((float *) last))[PrimVtxRasterPosW])) - (((((float *) next))[PrimVtxRasterPosZ]) - ((((float *) last))[PrimVtxRasterPosZ])));\r\t\t\toutIndex += 1;\r\t\t\tinterpolateFromtoatinto(((float *) last), ((float *) next), t, ((float*) (buf2 + (outIndex * PrimVertexSize))));\r\t\t}\r\t\tif (inNext) {\r\t\t\toutIndex += 1;\r\t\t\tfor (j = 0; j <= (PrimVertexSize - 1); j += 1) {\r\t\t\t\tbuf2[(outIndex * PrimVertexSize) + j] = (next[j]);\r\t\t\t}\r\t\t}\r\t\tlast = next;\r\t\tinLast = inNext;\r\t\tnext += PrimVertexSize;\r\t}\r\treturn outIndex;\r}\r\rstatic sqInt clipPolygonBottomFromtocount(int *buf1, int *buf2, sqInt n) {\r    sqInt i;\r    sqInt inLast;\r    sqInt inNext;\r    sqInt j;\r    int *last;\r    int *next;\r    sqInt outIndex;\r    double t;\r\r\toutIndex = 0;\r\tlast = buf1 + (n * PrimVertexSize);\r\tnext = buf1 + PrimVertexSize;\r\tinLast = (last[PrimVtxClipFlags]) & InBottomBit;\r\tfor (i = 1; i <= n; i += 1) {\r\t\tinNext = (next[PrimVtxClipFlags]) & InBottomBit;\r\t\tif (!(inLast == inNext)) {\r\r\t\t\t/* Passes clip boundary */\r\r\t\t\tt = (0.0 - (((((float *) last))[PrimVtxRasterPosY]) + ((((float *) last))[PrimVtxRasterPosW]))) / ((((((float *) next))[PrimVtxRasterPosW]) - ((((float *) last))[PrimVtxRasterPosW])) + (((((float *) next))[PrimVtxRasterPosY]) - ((((float *) last))[PrimVtxRasterPosY])));\r\t\t\toutIndex += 1;\r\t\t\tinterpolateFromtoatinto(((float *) last), ((float *) next), t, ((float*) (buf2 + (outIndex * PrimVertexSize))));\r\t\t}\r\t\tif (inNext) {\r\t\t\toutIndex += 1;\r\t\t\tfor (j = 0; j <= (PrimVertexSize - 1); j += 1) {\r\t\t\t\tbuf2[(outIndex * PrimVertexSize) + j] = (next[j]);\r\t\t\t}\r\t\t}\r\t\tlast = next;\r\t\tinLast = inNext;\r\t\tnext += PrimVertexSize;\r\t}\r\treturn outIndex;\r}\r\rstatic sqInt clipPolygonFrontFromtocount(int *buf1, int *buf2, sqInt n) {\r    sqInt i;\r    sqInt inLast;\r    sqInt inNext;\r    sqInt j;\r    int *last;\r    int *next;\r    sqInt outIndex;\r    double t;\r\r\toutIndex = 0;\r\tlast = buf1 + (n * PrimVertexSize);\r\tnext = buf1 + PrimVertexSize;\r\tinLast = (last[PrimVtxClipFlags]) & InFrontBit;\r\tfor (i = 1; i <= n; i += 1) {\r\t\tinNext = (next[PrimVtxClipFlags]) & InFrontBit;\r\t\tif (!(inLast == inNext)) {\r\r\t\t\t/* Passes clip boundary */\r\r\t\t\tt = (0.0 - (((((float *) last))[PrimVtxRasterPosZ]) + ((((float *) last))[PrimVtxRasterPosW]))) / ((((((float *) next))[PrimVtxRasterPosW]) - ((((float *) last))[PrimVtxRasterPosW])) + (((((float *) next))[PrimVtxRasterPosZ]) - ((((float *) last))[PrimVtxRasterPosZ])));\r\t\t\toutIndex += 1;\r\t\t\tinterpolateFromtoatinto(((float *) last), ((float *) next), t, ((float*) (buf2 + (outIndex * PrimVertexSize))));\r\t\t}\r\t\tif (inNext) {\r\t\t\toutIndex += 1;\r\t\t\tfor (j = 0; j <= (PrimVertexSize - 1); j += 1) {\r\t\t\t\tbuf2[(outIndex * PrimVertexSize) + j] = (next[j]);\r\t\t\t}\r\t\t}\r\t\tlast = next;\r\t\tinLast = inNext;\r\t\tnext += PrimVertexSize;\r\t}\r\treturn outIndex;\r}\r\rstatic sqInt clipPolygonLeftFromtocount(int *buf1, int *buf2, sqInt n) {\r    sqInt i;\r    sqInt inLast;\r    sqInt inNext;\r    sqInt j;\r    int *last;\r    int *next;\r    sqInt outIndex;\r    double t;\r\r\toutIndex = 0;\r\tlast = buf1 + (n * PrimVertexSize);\r\tnext = buf1 + PrimVertexSize;\r\tinLast = (last[PrimVtxClipFlags]) & InLeftBit;\r\tfor (i = 1; i <= n; i += 1) {\r\t\tinNext = (next[PrimVtxClipFlags]) & InLeftBit;\r\t\tif (!(inLast == inNext)) {\r\r\t\t\t/* Passes clip boundary */\r\r\t\t\tt = (0.0 - (((((float *) last))[PrimVtxRasterPosX]) + ((((float *) last))[PrimVtxRasterPosW]))) / ((((((float *) next))[PrimVtxRasterPosW]) - ((((float *) last))[PrimVtxRasterPosW])) + (((((float *) next))[PrimVtxRasterPosX]) - ((((float *) last))[PrimVtxRasterPosX])));\r\t\t\toutIndex += 1;\r\t\t\tinterpolateFromtoatinto(((float *) last), ((float *) next), t, ((float*) (buf2 + (outIndex * PrimVertexSize))));\r\t\t}\r\t\tif (inNext) {\r\t\t\toutIndex += 1;\r\t\t\tfor (j = 0; j <= (PrimVertexSize - 1); j += 1) {\r\t\t\t\tbuf2[(outIndex * PrimVertexSize) + j] = (next[j]);\r\t\t\t}\r\t\t}\r\t\tlast = next;\r\t\tinLast = inNext;\r\t\tnext += PrimVertexSize;\r\t}\r\treturn outIndex;\r}\r\rstatic sqInt clipPolygonRightFromtocount(int *buf1, int *buf2, sqInt n) {\r    sqInt i;\r    sqInt inLast;\r    sqInt inNext;\r    sqInt j;\r    int *last;\r    int *next;\r    sqInt outIndex;\r    double t;\r\r\toutIndex = 0;\r\tlast = buf1 + (n * PrimVertexSize);\r\tnext = buf1 + PrimVertexSize;\r\tinLast = (last[PrimVtxClipFlags]) & InRightBit;\r\tfor (i = 1; i <= n; i += 1) {\r\t\tinNext = (next[PrimVtxClipFlags]) & InRightBit;\r\t\tif (!(inLast == inNext)) {\r\r\t\t\t/* Passes clip boundary */\r\r\t\t\tt = (((((float *) last))[PrimVtxRasterPosX]) - ((((float *) last))[PrimVtxRasterPosW])) / ((((((float *) next))[PrimVtxRasterPosW]) - ((((float *) last))[PrimVtxRasterPosW])) - (((((float *) next))[PrimVtxRasterPosX]) - ((((float *) last))[PrimVtxRasterPosX])));\r\t\t\toutIndex += 1;\r\t\t\tinterpolateFromtoatinto(((float *) last), ((float *) next), t, ((float*) (buf2 + (outIndex * PrimVertexSize))));\r\t\t}\r\t\tif (inNext) {\r\t\t\toutIndex += 1;\r\t\t\tfor (j = 0; j <= (PrimVertexSize - 1); j += 1) {\r\t\t\t\tbuf2[(outIndex * PrimVertexSize) + j] = (next[j]);\r\t\t\t}\r\t\t}\r\t\tlast = next;\r\t\tinLast = inNext;\r\t\tnext += PrimVertexSize;\r\t}\r\treturn outIndex;\r}\r\rstatic sqInt clipPolygonTopFromtocount(int *buf1, int *buf2, sqInt n) {\r    sqInt i;\r    sqInt inLast;\r    sqInt inNext;\r    sqInt j;\r    int *last;\r    int *next;\r    sqInt outIndex;\r    double t;\r\r\toutIndex = 0;\r\tlast = buf1 + (n * PrimVertexSize);\r\tnext = buf1 + PrimVertexSize;\r\tinLast = (last[PrimVtxClipFlags]) & InTopBit;\r\tfor (i = 1; i <= n; i += 1) {\r\t\tinNext = (next[PrimVtxClipFlags]) & InTopBit;\r\t\tif (!(inLast == inNext)) {\r\r\t\t\t/* Passes clip boundary */\r\r\t\t\tt = (((((float *) last))[PrimVtxRasterPosY]) - ((((float *) last))[PrimVtxRasterPosW])) / ((((((float *) next))[PrimVtxRasterPosW]) - ((((float *) last))[PrimVtxRasterPosW])) - (((((float *) next))[PrimVtxRasterPosY]) - ((((float *) last))[PrimVtxRasterPosY])));\r\t\t\toutIndex += 1;\r\t\t\tinterpolateFromtoatinto(((float *) last), ((float *) next), t, ((float*) (buf2 + (outIndex * PrimVertexSize))));\r\t\t}\r\t\tif (inNext) {\r\t\t\toutIndex += 1;\r\t\t\tfor (j = 0; j <= (PrimVertexSize - 1); j += 1) {\r\t\t\t\tbuf2[(outIndex * PrimVertexSize) + j] = (next[j]);\r\t\t\t}\r\t\t}\r\t\tlast = next;\r\t\tinLast = inNext;\r\t\tnext += PrimVertexSize;\r\t}\r\treturn outIndex;\r}\r\r\r/*\tCompute the attenuation for the current light and vertex */\r\rstatic sqInt computeAttenuation(void) {\r\tlightScale = 1.0;\r\tif (lightFlags & FlagAttenuated) {\r\t\tlightScale = 1.0 / ((primLight[PrimLightAttenuationConstant]) + (l2vDistance * ((primLight[PrimLightAttenuationLinear]) + (l2vDistance * (primLight[PrimLightAttenuationSquared])))));\r\t}\r}\r\r\r/*\tCompute the direction for the current light and vertex */\r\rstatic sqInt computeDirection(void) {\r    double scale;\r\r\tif (lightFlags & FlagPositional) {\r\t\tl2vDirection[0] = ((litVertex[PrimVtxPositionX]) - (primLight[PrimLightPositionX]));\r\t\tl2vDirection[1] = ((litVertex[PrimVtxPositionY]) - (primLight[PrimLightPositionY]));\r\t\tl2vDirection[2] = ((litVertex[PrimVtxPositionZ]) - (primLight[PrimLightPositionZ]));\r\t\tl2vDistance = (((l2vDirection[0]) * (l2vDirection[0])) + ((l2vDirection[1]) * (l2vDirection[1]))) + ((l2vDirection[2]) * (l2vDirection[2]));\r\t\tif (!((l2vDistance == 0.0) || (l2vDistance == 1.0))) {\r\t\t\tl2vDistance = sqrt(l2vDistance);\r\t\t\tscale = -1.0 / l2vDistance;\r\t\t}\r\t\tl2vDirection[0] = ((l2vDirection[0]) * scale);\r\t\tl2vDirection[1] = ((l2vDirection[1]) * scale);\r\t\tl2vDirection[2] = ((l2vDirection[2]) * scale);\r\t} else {\r\t\tif (lightFlags & FlagDirectional) {\r\t\t\tl2vDirection[0] = (primLight[PrimLightDirectionX]);\r\t\t\tl2vDirection[1] = (primLight[PrimLightDirectionY]);\r\t\t\tl2vDirection[2] = (primLight[PrimLightDirectionZ]);\r\t\t}\r\t}\r}\r\r\r/*\tComputes\r\t\tl2vSpecDir _ l2vSpecDir - vtx position safelyNormalized.\r\t */\r\rstatic sqInt computeSpecularDirection(void) {\r    double scale;\r\r\tscale = inverseLengthOfFloat(litVertex + PrimVtxPosition);\r\tl2vSpecDir[0] = ((l2vSpecDir[0]) - ((litVertex[PrimVtxPositionX]) * scale));\r\tl2vSpecDir[1] = ((l2vSpecDir[1]) - ((litVertex[PrimVtxPositionY]) * scale));\r\tl2vSpecDir[2] = ((l2vSpecDir[2]) - ((litVertex[PrimVtxPositionZ]) * scale));\r}\r\r\r/*\tCompute the spot factor for a spot light */\r\rstatic double computeSpotFactor(void) {\r    double cosAngle;\r    double deltaCos;\r    double minCos;\r\r\tcosAngle = dotProductOfFloatwithDouble(primLight + PrimLightDirection, l2vDirection);\r\tcosAngle = 0.0 - cosAngle;\r\tminCos = primLight[SpotLightMinCos];\r\tif (cosAngle < minCos) {\r\t\treturn 0.0;\r\t}\r\tdeltaCos = primLight[SpotLightDeltaCos];\r\tif (deltaCos <= 1.0e-5) {\r\t\treturn 1.0;\r\t}\r\tcosAngle = (cosAngle - minCos) / deltaCos;\r\treturn pow(cosAngle,(primLight[SpotLightExponent]));\r}\r\rstatic sqInt determineClipFlagscount(void *vtxArray, sqInt count) {\r    sqInt flags;\r    sqInt fullMask;\r    sqInt i;\r    float *vtxPtr;\r    double w;\r    double w2;\r    double x;\r    double y;\r    double z;\r\r\tvtxPtr = ((float *) vtxArray);\r\tfullMask = InAllMask + OutAllMask;\r\tfor (i = 1; i <= count; i += 1) {\r\t\tw = vtxPtr[PrimVtxRasterPosW];\r\t\tw2 = 0.0 - w;\r\t\tflags = 0;\r\t\tx = vtxPtr[PrimVtxRasterPosX];\r\t\tif (x >= w2) {\r\t\t\tflags = flags | InLeftBit;\r\t\t} else {\r\t\t\tflags = flags | OutLeftBit;\r\t\t}\r\t\tif (x <= w) {\r\t\t\tflags = flags | InRightBit;\r\t\t} else {\r\t\t\tflags = flags | OutRightBit;\r\t\t}\r\t\ty = vtxPtr[PrimVtxRasterPosY];\r\t\tif (y >= w2) {\r\t\t\tflags = flags | InBottomBit;\r\t\t} else {\r\t\t\tflags = flags | OutBottomBit;\r\t\t}\r\t\tif (y <= w) {\r\t\t\tflags = flags | InTopBit;\r\t\t} else {\r\t\t\tflags = flags | OutTopBit;\r\t\t}\r\t\tz = vtxPtr[PrimVtxRasterPosZ];\r\t\tif (z >= w2) {\r\t\t\tflags = flags | InFrontBit;\r\t\t} else {\r\t\t\tflags = flags | OutFrontBit;\r\t\t}\r\t\tif (z <= w) {\r\t\t\tflags = flags | InBackBit;\r\t\t} else {\r\t\t\tflags = flags | OutBackBit;\r\t\t}\r\t\tfullMask = fullMask & flags;\r\t\t(((int *) vtxPtr))[PrimVtxClipFlags] = flags;\r\t\tvtxPtr += PrimVertexSize;\r\t}\r\treturn fullMask;\r}\r\rstatic double dotProductOfFloatwithDouble(float * v1, double *v2) {\r\treturn (((v1[0]) * (v2[0])) + ((v1[1]) * (v2[1]))) + ((v1[2]) * (v2[2]));\r}\r\r\r/*\tFetch the primitive light source from the given array.\r\tNote: No checks are done within here - that happened in stackLightArrayValue: */\r\rstatic void* fetchLightSourceofObject(sqInt index, sqInt anArray) {\r    sqInt lightOop;\r\r\tlightOop = interpreterProxy->fetchPointerofObject(index, anArray);\r\treturn interpreterProxy->firstIndexableField(lightOop);\r}\r\rstatic double frontClipValueFromto(sqInt last, sqInt next) {\r\treturn (0.0 - (((((float *) last))[PrimVtxRasterPosZ]) + ((((float *) last))[PrimVtxRasterPosW]))) / ((((((float *) next))[PrimVtxRasterPosW]) - ((((float *) last))[PrimVtxRasterPosW])) + (((((float *) next))[PrimVtxRasterPosZ]) - ((((float *) last))[PrimVtxRasterPosZ])));\r}\r\r\r/*\tNote: This is coded so that plugins can be run from Squeak. */\r\rstatic VirtualMachine * getInterpreter(void) {\r\treturn interpreterProxy;\r}\r\r\r/*\tNote: This is hardcoded so it can be run from Squeak.\r\tThe module name is used for validating a module *after*\r\tit is loaded to check if it does really contain the module\r\twe're thinking it contains. This is important! */\r\rEXPORT(const char*) getModuleName(void) {\r\treturn moduleName;\r}\r\rstatic sqInt halt(void) {\r\t;\r}\r\rEXPORT(sqInt) initialiseModule(void) {\r\tloadBBFn = interpreterProxy->ioLoadFunctionFrom(\"loadBitBltFrom\", bbPluginName);\r\tcopyBitsFn = interpreterProxy->ioLoadFunctionFrom(\"copyBitsFromtoat\", bbPluginName);\r\treturn (loadBBFn != 0) && (copyBitsFn != 0);\r}\r\r\r/*\tInterpolate the primitive vertices last/next at the parameter t */\r\rstatic sqInt interpolateFromtoatinto(float *last, float *next, double t, float *out) {\r    double delta;\r    sqInt flags;\r    unsigned int lastValue;\r    unsigned int newValue;\r    unsigned int nextValue;\r    unsigned int rgbaLast;\r    unsigned int rgbaNext;\r    double w;\r    double w2;\r    double x;\r    double y;\r    double z;\r\r\tdelta = (next[PrimVtxRasterPosX]) - (last[PrimVtxRasterPosX]);\r\tx = (last[PrimVtxRasterPosX]) + (delta * t);\r\tout[PrimVtxRasterPosX] = (((float) x));\r\tdelta = (next[PrimVtxRasterPosY]) - (last[PrimVtxRasterPosY]);\r\ty = (last[PrimVtxRasterPosY]) + (delta * t);\r\tout[PrimVtxRasterPosY] = (((float) y));\r\tdelta = (next[PrimVtxRasterPosZ]) - (last[PrimVtxRasterPosZ]);\r\tz = (last[PrimVtxRasterPosZ]) + (delta * t);\r\tout[PrimVtxRasterPosZ] = (((float) z));\r\tdelta = (next[PrimVtxRasterPosW]) - (last[PrimVtxRasterPosW]);\r\tw = (last[PrimVtxRasterPosW]) + (delta * t);\r\tout[PrimVtxRasterPosW] = (((float) w));\r\tw2 = 0.0 - w;\r\tflags = 0;\r\tif (x >= w2) {\r\t\tflags = flags | InLeftBit;\r\t} else {\r\t\tflags = flags | OutLeftBit;\r\t}\r\tif (x <= w) {\r\t\tflags = flags | InRightBit;\r\t} else {\r\t\tflags = flags | OutRightBit;\r\t}\r\tif (y >= w2) {\r\t\tflags = flags | InBottomBit;\r\t} else {\r\t\tflags = flags | OutBottomBit;\r\t}\r\tif (y <= w) {\r\t\tflags = flags | InTopBit;\r\t} else {\r\t\tflags = flags | OutTopBit;\r\t}\r\tif (z >= w2) {\r\t\tflags = flags | InFrontBit;\r\t} else {\r\t\tflags = flags | OutFrontBit;\r\t}\r\tif (z <= w) {\r\t\tflags = flags | InBackBit;\r\t} else {\r\t\tflags = flags | OutBackBit;\r\t}\r\t(((int *) out))[PrimVtxClipFlags] = flags;\r\trgbaLast = (((unsigned int *) last))[PrimVtxColor32];\r\tlastValue = rgbaLast & 255;\r\trgbaLast = ((usqInt) rgbaLast) >> 8;\r\trgbaNext = (((unsigned int *) next))[PrimVtxColor32];\r\tnextValue = rgbaNext & 255;\r\trgbaNext = ((usqInt) rgbaNext) >> 8;\r\tdelta = (((int) (nextValue - lastValue))) * t;\r\tnewValue = ((sqInt)(lastValue + delta));\r\tlastValue = rgbaLast & 255;\r\trgbaLast = ((usqInt) rgbaLast) >> 8;\r\tnextValue = rgbaNext & 255;\r\trgbaNext = ((usqInt) rgbaNext) >> 8;\r\tdelta = (((int) (nextValue - lastValue))) * t;\r\tnewValue += (((sqInt)(lastValue + delta))) << 8;\r\tlastValue = rgbaLast & 255;\r\trgbaLast = ((usqInt) rgbaLast) >> 8;\r\tnextValue = rgbaNext & 255;\r\trgbaNext = ((usqInt) rgbaNext) >> 8;\r\tdelta = (((int) (nextValue - lastValue))) * t;\r\tnewValue += (((sqInt)(lastValue + delta))) << 16;\r\tlastValue = rgbaLast & 255;\r\tnextValue = rgbaNext & 255;\r\tdelta = (((int) (nextValue - lastValue))) * t;\r\tnewValue += (((sqInt)(lastValue + delta))) << 24;\r\t(((unsigned int*) out))[PrimVtxColor32] = newValue;\r\tdelta = (next[PrimVtxTexCoordU]) - (last[PrimVtxTexCoordU]);\r\tout[PrimVtxTexCoordU] = (((float) ((last[PrimVtxTexCoordU]) + (delta * t))));\r\tdelta = (next[PrimVtxTexCoordV]) - (last[PrimVtxTexCoordV]);\r\tout[PrimVtxTexCoordV] = (((float) ((last[PrimVtxTexCoordV]) + (delta * t))));\r}\r\rstatic double inverseLengthOfDouble(double * aVector) {\r    double scale;\r\r\tscale = (((aVector[0]) * (aVector[0])) + ((aVector[1]) * (aVector[1]))) + ((aVector[2]) * (aVector[2]));\r\tif ((scale == 0.0) || (scale == 1.0)) {\r\t\treturn scale;\r\t}\r\treturn 1.0 / (sqrt(scale));\r}\r\rstatic double inverseLengthOfFloat(float * aVector) {\r    double scale;\r\r\tscale = (((aVector[0]) * (aVector[0])) + ((aVector[1]) * (aVector[1]))) + ((aVector[2]) * (aVector[2]));\r\tif ((scale == 0.0) || (scale == 1.0)) {\r\t\treturn scale;\r\t}\r\treturn 1.0 / (sqrt(scale));\r}\r\rstatic double leftClipValueFromto(sqInt last, sqInt next) {\r\treturn (0.0 - (((((float *) last))[PrimVtxRasterPosX]) + ((((float *) last))[PrimVtxRasterPosW]))) / ((((((float *) next))[PrimVtxRasterPosW]) - ((((float *) last))[PrimVtxRasterPosW])) + (((((float *) next))[PrimVtxRasterPosX]) - ((((float *) last))[PrimVtxRasterPosX])));\r}\r\rstatic sqInt loadObjectsFrom(sqInt stackIndex) {\r    sqInt arrayOop;\r    sqInt arraySize;\r    sqInt i;\r    B3DPrimitiveObject **objArray;\r    sqInt objOop;\r    B3DPrimitiveObject *objPtr;\r\r\tarrayOop = interpreterProxy->stackObjectValue(stackIndex);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!((interpreterProxy->fetchClassOf(arrayOop)) == (interpreterProxy->classArray()))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tarraySize = interpreterProxy->slotSizeOf(arrayOop);\r\tif (arraySize > (state.nObjects)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tobjArray = state.objects;\r\tfor (i = 0; i <= (arraySize - 1); i += 1) {\r\t\tobjOop = interpreterProxy->fetchPointerofObject(i, arrayOop);\r\t\tif (((objOop & 1)) || (!(interpreterProxy->isWords(objOop)))) {\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\tobjPtr = ((B3DPrimitiveObject*) (interpreterProxy->firstIndexableField(objOop)));\r\t\tif (objPtr->magic != B3D_PRIMITIVE_OBJECT_MAGIC) {\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\tobjPtr->__oop__ = objOop;\r\t\tobjArray[i] = objPtr;\r\t}\r}\r\rstatic sqInt loadPrimitiveLightSource(void) {\r\tlightFlags = (((int*) primLight))[PrimLightFlags];\r}\r\r\r/*\tLoad the necessary values from the current primitive vertex */\r\rstatic sqInt loadPrimitiveVertex(void) {\r    sqInt rgba;\r\r\trgba = (((int*) litVertex))[PrimVtxColor32];\r\tvtxInColor[2] = ((rgba & 255) * (1.0 / 255.0));\r\trgba = ((usqInt) rgba) >> 8;\r\tvtxInColor[1] = ((rgba & 255) * (1.0 / 255.0));\r\trgba = ((usqInt) rgba) >> 8;\r\tvtxInColor[0] = ((rgba & 255) * (1.0 / 255.0));\r\trgba = ((usqInt) rgba) >> 8;\r\tvtxInColor[3] = ((rgba & 255) * (1.0 / 255.0));\r}\r\r\r/*\tLoad the rasterizer state from the given stack index. */\r\rstatic sqInt loadRasterizerState(sqInt stackIndex) {\r    sqInt obj;\r    sqInt objLen;\r    void *objPtr;\r    sqInt stateOop;\r\r\tif ((copyBitsFn == 0) || (loadBBFn == 0)) {\r\t\tif (!(initialiseModule())) {\r\t\t\treturn 0;\r\t\t}\r\t}\r\tstateOop = interpreterProxy->stackObjectValue(stackIndex);\r\tif (interpreterProxy->failed()) {\r\t\treturn 0;\r\t}\r\tif (!((interpreterProxy->isPointers(stateOop)) && ((interpreterProxy->slotSizeOf(stateOop)) >= 10))) {\r\t\treturn 0;\r\t}\r\tobj = interpreterProxy->fetchPointerofObject(0, stateOop);\r\tif (((obj & 1)) || (!(interpreterProxy->isWords(obj)))) {\r\t\treturn 0;\r\t}\r\tobjPtr = interpreterProxy->firstIndexableField(obj);\r\tstate.faceAlloc = objPtr;\r\tobj = interpreterProxy->fetchPointerofObject(1, stateOop);\r\tif (((obj & 1)) || (!(interpreterProxy->isWords(obj)))) {\r\t\treturn 0;\r\t}\r\tobjPtr = interpreterProxy->firstIndexableField(obj);\r\tstate.edgeAlloc = objPtr;\r\tobj = interpreterProxy->fetchPointerofObject(2, stateOop);\r\tif (((obj & 1)) || (!(interpreterProxy->isWords(obj)))) {\r\t\treturn 0;\r\t}\r\tobjPtr = interpreterProxy->firstIndexableField(obj);\r\tstate.attrAlloc = objPtr;\r\tobj = interpreterProxy->fetchPointerofObject(3, stateOop);\r\tif (((obj & 1)) || (!(interpreterProxy->isWords(obj)))) {\r\t\treturn 0;\r\t}\r\tobjPtr = interpreterProxy->firstIndexableField(obj);\r\tstate.aet = objPtr;\r\tobj = interpreterProxy->fetchPointerofObject(4, stateOop);\r\tif (((obj & 1)) || (!(interpreterProxy->isWords(obj)))) {\r\t\treturn 0;\r\t}\r\tobjPtr = interpreterProxy->firstIndexableField(obj);\r\tstate.addedEdges = objPtr;\r\tobj = interpreterProxy->fetchPointerofObject(5, stateOop);\r\tif (((obj & 1)) || (!(interpreterProxy->isWords(obj)))) {\r\t\treturn 0;\r\t}\r\tobjPtr = interpreterProxy->firstIndexableField(obj);\r\tstate.fillList = objPtr;\r\tobj = interpreterProxy->fetchPointerofObject(6, stateOop);\r\tif (obj == (interpreterProxy->nilObject())) {\r\t\tstate.nObjects = 0;\r\t\tstate.objects = NULL;\r\t} else {\r\t\tif (((obj & 1)) || (!(interpreterProxy->isWords(obj)))) {\r\t\t\treturn 0;\r\t\t}\r\t\tobjLen = interpreterProxy->slotSizeOf(obj);\r\t\tobjPtr = interpreterProxy->firstIndexableField(obj);\r\t\tstate.objects = (B3DPrimitiveObject **)objPtr;\r\t\tstate.nObjects = objLen;\r\t}\r\tobj = interpreterProxy->fetchPointerofObject(7, stateOop);\r\tif (obj == (interpreterProxy->nilObject())) {\r\t\tstate.nTextures = 0;\r\t\tstate.textures = NULL;\r\t} else {\r\t\tif (((obj & 1)) || (!(interpreterProxy->isWords(obj)))) {\r\t\t\treturn 0;\r\t\t}\r\t\tobjLen = interpreterProxy->byteSizeOf(obj);\r\t\tobjPtr = interpreterProxy->firstIndexableField(obj);\r\t\tstate.textures = (B3DTexture *)objPtr;\r\t\tstate.nTextures = objLen / sizeof(B3DTexture);\r\t}\r\tobj = interpreterProxy->fetchPointerofObject(8, stateOop);\r\tif (obj == (interpreterProxy->nilObject())) {\r\t\tstate.spanSize = 0;\r\t\tstate.spanBuffer = NULL;\r\t} else {\r\t\tif (!((interpreterProxy->fetchClassOf(obj)) == (interpreterProxy->classBitmap()))) {\r\t\t\treturn 0;\r\t\t}\r\t\tobjLen = interpreterProxy->slotSizeOf(obj);\r\t\tobjPtr = interpreterProxy->firstIndexableField(obj);\r\t\tstate.spanBuffer = (unsigned int *)objPtr;\r\t\tstate.spanSize = objLen;\r\t}\r\tobj = interpreterProxy->fetchPointerofObject(9, stateOop);\r\tif (obj == (interpreterProxy->nilObject())) {\r\t\tstate.spanDrawer = NULL;\r\t} else {\r\t\tif (!(((int (*) (int))loadBBFn)(obj))) {\r\t\t\treturn 0;\r\t\t}\r\t\tstate.spanDrawer = (b3dDrawBufferFunction) copyBitsFn;\r\t}\r\treturn !(interpreterProxy->failed());\r}\r\r\r/*\tNote: This still uses the old-style textures */\r\rstatic sqInt loadTextureinto(sqInt textureOop, B3DTexture *destPtr) {\r    void *bitsPtr;\r    sqInt form;\r    sqInt formBits;\r    sqInt formDepth;\r    sqInt formHeight;\r    sqInt formWidth;\r    sqInt texEnvMode;\r    sqInt texInterpolate;\r    sqInt texWrap;\r\r\tform = textureOop;\r\tif (!(interpreterProxy->isPointers(form))) {\r\t\treturn 0;\r\t}\r\tif ((interpreterProxy->slotSizeOf(form)) < 8) {\r\t\treturn 0;\r\t}\r\tformBits = interpreterProxy->fetchPointerofObject(0, form);\r\tformWidth = interpreterProxy->fetchIntegerofObject(1, form);\r\tformHeight = interpreterProxy->fetchIntegerofObject(2, form);\r\tformDepth = interpreterProxy->fetchIntegerofObject(3, form);\r\ttexWrap = interpreterProxy->booleanValueOf(interpreterProxy->fetchPointerofObject(5, form));\r\ttexInterpolate = interpreterProxy->booleanValueOf(interpreterProxy->fetchPointerofObject(6, form));\r\ttexEnvMode = interpreterProxy->fetchIntegerofObject(7, form);\r\tif (interpreterProxy->failed()) {\r\t\treturn 0;\r\t}\r\tif ((formWidth < 1) || ((formHeight < 1) || (formDepth != 32))) {\r\t\treturn 0;\r\t}\r\tif (!((interpreterProxy->fetchClassOf(formBits)) == (interpreterProxy->classBitmap()))) {\r\t\treturn 0;\r\t}\r\tif (!((interpreterProxy->byteSizeOf(formBits)) == ((formWidth * formHeight) * 4))) {\r\t\treturn 0;\r\t}\r\tif ((texEnvMode < 0) || (texEnvMode > 1)) {\r\t\treturn 0;\r\t}\r\r\t/* Set the texture parameters */\r\r\tbitsPtr = interpreterProxy->firstIndexableField(formBits);\r\treturn b3dLoadTexture(destPtr, formWidth, formHeight, formDepth, (unsigned int*) bitsPtr, 0, NULL) == B3D_NO_ERROR;\r}\r\rstatic sqInt loadTexturesFrom(sqInt stackIndex) {\r    sqInt arrayOop;\r    B3DTexture *destPtr;\r    sqInt i;\r    sqInt n;\r    sqInt textureOop;\r\r\tarrayOop = interpreterProxy->stackObjectValue(stackIndex);\r\tif (!((interpreterProxy->fetchClassOf(arrayOop)) == (interpreterProxy->classArray()))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tn = interpreterProxy->slotSizeOf(arrayOop);\r\tn = ((n < (state.nTextures)) ? n : (state.nTextures));\r\tfor (i = 0; i <= (n - 1); i += 1) {\r\t\tdestPtr = state.textures + i;\r\t\ttextureOop = interpreterProxy->fetchPointerofObject(i, arrayOop);\r\t\tif (!(loadTextureinto(textureOop, destPtr))) {\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t}\r\treturn 0;\r}\r\r\r/*\tLoad the viewport from the given stack index */\r\rstatic sqInt loadViewportFrom(sqInt stackIndex) {\r    sqInt oop;\r    sqInt p1;\r    sqInt p2;\r    sqInt x0;\r    sqInt x1;\r    sqInt y0;\r    sqInt y1;\r\r\toop = interpreterProxy->stackObjectValue(stackIndex);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isPointers(oop))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tif ((interpreterProxy->slotSizeOf(oop)) < 2) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tp1 = interpreterProxy->fetchPointerofObject(0, oop);\r\tp2 = interpreterProxy->fetchPointerofObject(1, oop);\r\tif (!((interpreterProxy->fetchClassOf(p1)) == (interpreterProxy->classPoint()))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tif (!((interpreterProxy->fetchClassOf(p2)) == (interpreterProxy->classPoint()))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tx0 = interpreterProxy->fetchIntegerofObject(0, p1);\r\ty0 = interpreterProxy->fetchIntegerofObject(1, p1);\r\tx1 = interpreterProxy->fetchIntegerofObject(0, p2);\r\ty1 = interpreterProxy->fetchIntegerofObject(1, p2);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tviewport.x0 = x0;\r\tviewport.y0 = y0;\r\tviewport.x1 = x1;\r\tviewport.y1 = y1;\r\treturn 0;\r}\r\rstatic sqInt mapVBofSizeinto(void *vtxArray, sqInt vtxCount, sqInt boxArray) {\r    double bottom;\r    sqInt flags;\r    sqInt floatOop;\r    sqInt i;\r    double left;\r    sqInt oop;\r    double right;\r    double top;\r    float *vtxPtr;\r    double w;\r    double x;\r    double y;\r\r\tvtxPtr = ((float *) vtxArray);\r\tfor (i = 1; i <= vtxCount; i += 1) {\r\t\tflags = (((int *) vtxPtr))[PrimVtxClipFlags];\r\t\tw = vtxPtr[PrimVtxRasterPosW];\r\t\tif (!(w == 0.0)) {\r\t\t\tw = 1.0 / w;\r\t\t}\r\t\tif ((flags & OutLeftBit) != 0) {\r\t\t\tx = -1.0;\r\t\t} else {\r\t\t\tif ((flags & OutRightBit) != 0) {\r\t\t\t\tx = 1.0;\r\t\t\t} else {\r\t\t\t\tx = (vtxPtr[PrimVtxRasterPosX]) * w;\r\t\t\t}\r\t\t}\r\t\tif ((flags & OutTopBit) != 0) {\r\t\t\ty = -1.0;\r\t\t} else {\r\t\t\tif ((flags & OutBottomBit) != 0) {\r\t\t\t\ty = 1.0;\r\t\t\t} else {\r\t\t\t\ty = (vtxPtr[PrimVtxRasterPosY]) * w;\r\t\t\t}\r\t\t}\r\t\tif (i == 1) {\r\t\t\tleft = right = x;\r\t\t\ttop = bottom = y;\r\t\t}\r\t\tif (x < left) {\r\t\t\tleft = x;\r\t\t}\r\t\tif (x > right) {\r\t\t\tright = x;\r\t\t}\r\t\tif (y < top) {\r\t\t\ttop = y;\r\t\t}\r\t\tif (y > bottom) {\r\t\t\tbottom = y;\r\t\t}\r\t\tvtxPtr += PrimVertexSize;\r\t}\r\toop = boxArray;\r\tinterpreterProxy->pushRemappableOop(oop);\r\tfloatOop = interpreterProxy->floatObjectOf(left);\r\toop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(0, oop, floatOop);\r\tinterpreterProxy->pushRemappableOop(oop);\r\tfloatOop = interpreterProxy->floatObjectOf(top);\r\toop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(1, oop, floatOop);\r\tinterpreterProxy->pushRemappableOop(oop);\r\tfloatOop = interpreterProxy->floatObjectOf(right);\r\toop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(2, oop, floatOop);\r\tinterpreterProxy->pushRemappableOop(oop);\r\tfloatOop = interpreterProxy->floatObjectOf(bottom);\r\toop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(3, oop, floatOop);\r}\r\r\r/*\tThe module with the given name was just unloaded.\r\tMake sure we have no dangling references. */\r\rEXPORT(sqInt) moduleUnloaded(char *aModuleName) {\r\tif ((strcmp(aModuleName, bbPluginName)) == 0) {\r\r\t\t/* BitBlt just shut down. How nasty. */\r\r\t\tloadBBFn = 0;\r\t\tcopyBitsFn = 0;\r\t}\r}\r\rstatic sqInt msg(char *s) {\r\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\r}\r\r\r/*\tPrimitive. Set the BitBlt plugin to use. */\r\rEXPORT(sqInt) primitiveSetBitBltPlugin(void) {\r    sqInt i;\r    sqInt length;\r    sqInt needReload;\r    sqInt pluginName;\r    char *ptr;\r\r\r\t/* Must be string to work */\r\r\tpluginName = interpreterProxy->stackValue(0);\r\tif (!(interpreterProxy->isBytes(pluginName))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tlength = interpreterProxy->byteSizeOf(pluginName);\r\tif (length >= 256) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tptr = interpreterProxy->firstIndexableField(pluginName);\r\tneedReload = 0;\r\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\tif (!((bbPluginName[i]) == (ptr[i]))) {\r\t\t\tbbPluginName[i] = (ptr[i]);\r\t\t\tneedReload = 1;\r\t\t}\r\t}\r\tif (!((bbPluginName[length]) == 0)) {\r\t\tbbPluginName[length] = 0;\r\t\tneedReload = 1;\r\t}\r\tif (needReload) {\r\t\tif (!(initialiseModule())) {\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t}\r\tinterpreterProxy->pop(1);\r}\r\rstatic double processIndexedofSizeidxArrayidxSize(float *vtxArray, sqInt vtxSize, int *idxArray, sqInt idxSize) {\r    sqInt i;\r    sqInt index;\r    double minZ;\r    float *vtxPtr;\r    double wValue;\r    double zValue;\r\r\tminZ = 10.0;\r\tfor (i = 1; i <= idxSize; i += 1) {\r\t\tindex = idxArray[i];\r\t\tif (index > 0) {\r\t\t\tvtxPtr = vtxArray + ((index - 1) * PrimVertexSize);\r\t\t\tzValue = vtxPtr[PrimVtxRasterPosZ];\r\t\t\twValue = vtxPtr[PrimVtxRasterPosW];\r\t\t\tif (!(wValue == 0.0)) {\r\t\t\t\tzValue = zValue / wValue;\r\t\t\t}\r\t\t\tif (zValue < minZ) {\r\t\t\t\tminZ = zValue;\r\t\t\t}\r\t\t}\r\t}\r\treturn minZ;\r}\r\rstatic sqInt processIndexedIDXofSizeidxArrayidxSize(float *vtxArray, sqInt vtxSize, int *idxArray, sqInt idxSize) {\r    sqInt i;\r    sqInt index;\r    sqInt minIndex;\r    double minZ;\r    float *vtxPtr;\r    double wValue;\r    double zValue;\r\r\tminZ = 10.0;\r\tminIndex = 0;\r\tfor (i = 1; i <= idxSize; i += 1) {\r\t\tindex = idxArray[i];\r\t\tif (index > 0) {\r\t\t\tvtxPtr = vtxArray + ((index - 1) * PrimVertexSize);\r\t\t\tzValue = vtxPtr[PrimVtxRasterPosZ];\r\t\t\twValue = vtxPtr[PrimVtxRasterPosW];\r\t\t\tif (!(wValue == 0.0)) {\r\t\t\t\tzValue = zValue / wValue;\r\t\t\t}\r\t\t\tif ((minIndex == 0) || (zValue < minZ)) {\r\t\t\t\tminIndex = i;\r\t\t\t\tminZ = zValue;\r\t\t\t}\r\t\t}\r\t}\r\treturn minIndex;\r}\r\rstatic double processNonIndexedofSize(float *vtxArray, sqInt vtxSize) {\r    sqInt i;\r    double minZ;\r    float *vtxPtr;\r    double wValue;\r    double zValue;\r\r\tminZ = 10.0;\r\tvtxPtr = vtxArray;\r\tfor (i = 1; i <= vtxSize; i += 1) {\r\t\tzValue = vtxPtr[PrimVtxRasterPosZ];\r\t\twValue = vtxPtr[PrimVtxRasterPosW];\r\t\tif (!(wValue == 0.0)) {\r\t\t\tzValue = zValue / wValue;\r\t\t}\r\t\tif (zValue < minZ) {\r\t\t\tminZ = zValue;\r\t\t}\r\t}\r\treturn minZ;\r}\r\rstatic sqInt processNonIndexedIDXofSize(float *vtxArray, sqInt vtxSize) {\r    sqInt i;\r    sqInt minIndex;\r    double minZ;\r    float *vtxPtr;\r    double wValue;\r    double zValue;\r\r\tminZ = 10.0;\r\tminIndex = 0;\r\tvtxPtr = vtxArray;\r\tfor (i = 1; i <= vtxSize; i += 1) {\r\t\tzValue = vtxPtr[PrimVtxRasterPosZ];\r\t\twValue = vtxPtr[PrimVtxRasterPosW];\r\t\tif (!(wValue == 0.0)) {\r\t\t\tzValue = zValue / wValue;\r\t\t}\r\t\tif ((minIndex == 0) || (zValue < minZ)) {\r\t\t\tminIndex = i;\r\t\t\tminZ = zValue;\r\t\t}\r\t}\r\treturn minIndex;\r}\r\rstatic double rightClipValueFromto(sqInt last, sqInt next) {\r\treturn (((((float *) last))[PrimVtxRasterPosX]) - ((((float *) last))[PrimVtxRasterPosW])) / ((((((float *) next))[PrimVtxRasterPosW]) - ((((float *) last))[PrimVtxRasterPosW])) - (((((float *) next))[PrimVtxRasterPosX]) - ((((float *) last))[PrimVtxRasterPosX])));\r}\r\r\r/*\tNote: This is coded so that is can be run from Squeak. */\r\rEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter) {\r    sqInt ok;\r\r\tinterpreterProxy = anInterpreter;\r\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\r\tif (ok == 0) {\r\t\treturn 0;\r\t}\r\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\r\treturn ok;\r}\r\rstatic sqInt shadeVertex(void) {\r    double cosAngle;\r    double specularFactor;\r    double aPart;\r    double bPart;\r    double gPart;\r    double rPart;\r    double aPart1;\r    double bPart1;\r    double gPart1;\r    double rPart1;\r    double aPart2;\r    double bPart2;\r    double gPart2;\r    double rPart2;\r    double scale;\r\r\t/* begin computeDirection */\r\tif (lightFlags & FlagPositional) {\r\t\tl2vDirection[0] = ((litVertex[PrimVtxPositionX]) - (primLight[PrimLightPositionX]));\r\t\tl2vDirection[1] = ((litVertex[PrimVtxPositionY]) - (primLight[PrimLightPositionY]));\r\t\tl2vDirection[2] = ((litVertex[PrimVtxPositionZ]) - (primLight[PrimLightPositionZ]));\r\t\tl2vDistance = (((l2vDirection[0]) * (l2vDirection[0])) + ((l2vDirection[1]) * (l2vDirection[1]))) + ((l2vDirection[2]) * (l2vDirection[2]));\r\t\tif (!((l2vDistance == 0.0) || (l2vDistance == 1.0))) {\r\t\t\tl2vDistance = sqrt(l2vDistance);\r\t\t\tscale = -1.0 / l2vDistance;\r\t\t}\r\t\tl2vDirection[0] = ((l2vDirection[0]) * scale);\r\t\tl2vDirection[1] = ((l2vDirection[1]) * scale);\r\t\tl2vDirection[2] = ((l2vDirection[2]) * scale);\r\t} else {\r\t\tif (lightFlags & FlagDirectional) {\r\t\t\tl2vDirection[0] = (primLight[PrimLightDirectionX]);\r\t\t\tl2vDirection[1] = (primLight[PrimLightDirectionY]);\r\t\t\tl2vDirection[2] = (primLight[PrimLightDirectionZ]);\r\t\t}\r\t}\r\t/* begin computeAttenuation */\r\tlightScale = 1.0;\r\tif (lightFlags & FlagAttenuated) {\r\t\tlightScale = 1.0 / ((primLight[PrimLightAttenuationConstant]) + (l2vDistance * ((primLight[PrimLightAttenuationLinear]) + (l2vDistance * (primLight[PrimLightAttenuationSquared])))));\r\t}\r\tif (lightFlags & FlagHasSpot) {\r\t\tlightScale = lightScale * (computeSpotFactor());\r\t}\r\tif (lightScale > 0.001) {\r\t\tif (lightFlags & FlagAmbientPart) {\r\t\t\t/* begin addPart:from:trackFlag:scale: */\r\t\t\tif (vbFlags & VBTrackAmbient) {\r\t\t\t\trPart = ((vtxInColor[0]) * ((primLight + AmbientPart)[0])) * lightScale;\r\t\t\t\tgPart = ((vtxInColor[1]) * ((primLight + AmbientPart)[1])) * lightScale;\r\t\t\t\tbPart = ((vtxInColor[2]) * ((primLight + AmbientPart)[2])) * lightScale;\r\t\t\t\taPart = ((vtxInColor[3]) * ((primLight + AmbientPart)[3])) * lightScale;\r\t\t\t} else {\r\t\t\t\trPart = (((primMaterial + AmbientPart)[0]) * ((primLight + AmbientPart)[0])) * lightScale;\r\t\t\t\tgPart = (((primMaterial + AmbientPart)[1]) * ((primLight + AmbientPart)[1])) * lightScale;\r\t\t\t\tbPart = (((primMaterial + AmbientPart)[2]) * ((primLight + AmbientPart)[2])) * lightScale;\r\t\t\t\taPart = (((primMaterial + AmbientPart)[3]) * ((primLight + AmbientPart)[3])) * lightScale;\r\t\t\t}\r\t\t\tvtxOutColor[0] = ((vtxOutColor[0]) + rPart);\r\t\t\tvtxOutColor[1] = ((vtxOutColor[1]) + gPart);\r\t\t\tvtxOutColor[2] = ((vtxOutColor[2]) + bPart);\r\t\t\tvtxOutColor[3] = ((vtxOutColor[3]) + aPart);\r\t\t}\r\t\tif (lightFlags & FlagDiffusePart) {\r\r\t\t\t/* Compute angle from light->vertex to vertex normal */\r\t\t\t/* For one-sided lighting negate cosAngle if necessary */\r\r\t\t\tcosAngle = dotProductOfFloatwithDouble(litVertex + PrimVtxNormal, l2vDirection);\r\t\t\tif (((vbFlags & VBTwoSidedLighting) == 0) && (cosAngle < 0.0)) {\r\t\t\t\tcosAngle = 0.0 - cosAngle;\r\t\t\t}\r\t\t\tif (cosAngle > 0.0) {\r\t\t\t\t/* begin addPart:from:trackFlag:scale: */\r\t\t\t\tif (vbFlags & VBTrackDiffuse) {\r\t\t\t\t\trPart1 = ((vtxInColor[0]) * ((primLight + DiffusePart)[0])) * (lightScale * cosAngle);\r\t\t\t\t\tgPart1 = ((vtxInColor[1]) * ((primLight + DiffusePart)[1])) * (lightScale * cosAngle);\r\t\t\t\t\tbPart1 = ((vtxInColor[2]) * ((primLight + DiffusePart)[2])) * (lightScale * cosAngle);\r\t\t\t\t\taPart1 = ((vtxInColor[3]) * ((primLight + DiffusePart)[3])) * (lightScale * cosAngle);\r\t\t\t\t} else {\r\t\t\t\t\trPart1 = (((primMaterial + DiffusePart)[0]) * ((primLight + DiffusePart)[0])) * (lightScale * cosAngle);\r\t\t\t\t\tgPart1 = (((primMaterial + DiffusePart)[1]) * ((primLight + DiffusePart)[1])) * (lightScale * cosAngle);\r\t\t\t\t\tbPart1 = (((primMaterial + DiffusePart)[2]) * ((primLight + DiffusePart)[2])) * (lightScale * cosAngle);\r\t\t\t\t\taPart1 = (((primMaterial + DiffusePart)[3]) * ((primLight + DiffusePart)[3])) * (lightScale * cosAngle);\r\t\t\t\t}\r\t\t\t\tvtxOutColor[0] = ((vtxOutColor[0]) + rPart1);\r\t\t\t\tvtxOutColor[1] = ((vtxOutColor[1]) + gPart1);\r\t\t\t\tvtxOutColor[2] = ((vtxOutColor[2]) + bPart1);\r\t\t\t\tvtxOutColor[3] = ((vtxOutColor[3]) + aPart1);\r\t\t\t}\r\t\t}\r\t}\r\tif ((lightFlags & FlagSpecularPart) && ((primMaterial[MaterialShininess]) > 0.0)) {\r\t\tl2vSpecDir[0] = (l2vDirection[0]);\r\t\tl2vSpecDir[1] = (l2vDirection[1]);\r\t\tl2vSpecDir[2] = (l2vDirection[2]);\r\t\tif (vbFlags & VBUseLocalViewer) {\r\t\t\tcomputeSpecularDirection();\r\t\t} else {\r\t\t\tl2vSpecDir[2] = ((l2vSpecDir[2]) - 1.0);\r\t\t}\r\t\tcosAngle = dotProductOfFloatwithDouble(litVertex + PrimVtxNormal, l2vSpecDir);\r\t\tif (cosAngle > 0.0) {\r\r\t\t\t/* Normalize the angle */\r\t\t\t/* cosAngle should be somewhere between 0 and 1.\r\t\t\tIf not, then the vertex normal was not normalized */\r\r\t\t\tcosAngle = cosAngle * (inverseLengthOfDouble(l2vSpecDir));\r\t\t\tif (cosAngle > 1.0) {\r\t\t\t\tspecularFactor = pow(cosAngle,(primMaterial[MaterialShininess]));\r\t\t\t} else {\r\t\t\t\tif (cosAngle == 0.0) {\r\t\t\t\t\tspecularFactor = 1.0;\r\t\t\t\t} else {\r\t\t\t\t\tspecularFactor = pow(cosAngle,(primMaterial[MaterialShininess]));\r\t\t\t\t}\r\t\t\t}\r\t\t\t/* begin addPart:from:trackFlag:scale: */\r\t\t\tif (vbFlags & VBTrackSpecular) {\r\t\t\t\trPart2 = ((vtxInColor[0]) * ((primLight + SpecularPart)[0])) * specularFactor;\r\t\t\t\tgPart2 = ((vtxInColor[1]) * ((primLight + SpecularPart)[1])) * specularFactor;\r\t\t\t\tbPart2 = ((vtxInColor[2]) * ((primLight + SpecularPart)[2])) * specularFactor;\r\t\t\t\taPart2 = ((vtxInColor[3]) * ((primLight + SpecularPart)[3])) * specularFactor;\r\t\t\t} else {\r\t\t\t\trPart2 = (((primMaterial + SpecularPart)[0]) * ((primLight + SpecularPart)[0])) * specularFactor;\r\t\t\t\tgPart2 = (((primMaterial + SpecularPart)[1]) * ((primLight + SpecularPart)[1])) * specularFactor;\r\t\t\t\tbPart2 = (((primMaterial + SpecularPart)[2]) * ((primLight + SpecularPart)[2])) * specularFactor;\r\t\t\t\taPart2 = (((primMaterial + SpecularPart)[3]) * ((primLight + SpecularPart)[3])) * specularFactor;\r\t\t\t}\r\t\t\tvtxOutColor[0] = ((vtxOutColor[0]) + rPart2);\r\t\t\tvtxOutColor[1] = ((vtxOutColor[1]) + gPart2);\r\t\t\tvtxOutColor[2] = ((vtxOutColor[2]) + bPart2);\r\t\t\tvtxOutColor[3] = ((vtxOutColor[3]) + aPart2);\r\t\t}\r\t}\r}\r\r\r/*\tLoad an Array of B3DPrimitiveLights from the given stack index */\r\rstatic sqInt stackLightArrayValue(sqInt stackIndex) {\r    sqInt array;\r    sqInt arraySize;\r    sqInt i;\r    sqInt oop;\r\r\tarray = interpreterProxy->stackObjectValue(stackIndex);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!((interpreterProxy->fetchClassOf(array)) == (interpreterProxy->classArray()))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tarraySize = interpreterProxy->slotSizeOf(array);\r\tfor (i = 0; i <= (arraySize - 1); i += 1) {\r\t\toop = interpreterProxy->fetchPointerofObject(i, array);\r\t\tif ((oop & 1)) {\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\tif (!((interpreterProxy->isWords(oop)) && ((interpreterProxy->slotSizeOf(oop)) == PrimLightSize))) {\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t}\r\treturn array;\r}\r\r\r/*\tLoad a B3DMaterial from the given stack index */\r\rstatic void * stackMaterialValue(sqInt stackIndex) {\r    sqInt oop;\r\r\toop = interpreterProxy->stackObjectValue(stackIndex);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->isWords(oop)) && ((interpreterProxy->slotSizeOf(oop)) == MaterialSize)) {\r\t\treturn interpreterProxy->firstIndexableField(oop);\r\t}\r\treturn null;\r}\r\r\r/*\tLoad a 4x4 transformation matrix from the interpreter stack.\r\tReturn a pointer to the matrix data if successful, nil otherwise. */\r\rstatic void* stackMatrix(sqInt index) {\r    sqInt oop;\r\r\toop = interpreterProxy->stackObjectValue(index);\r\tif (oop == null) {\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->isWords(oop)) && ((interpreterProxy->slotSizeOf(oop)) == 16)) {\r\t\treturn interpreterProxy->firstIndexableField(oop);\r\t}\r\treturn null;\r}\r\r\r/*\tLoad a primitive index array from the interpreter stack.\r\tIf aBool is true then check that all the indexes are in the range (1,maxIndex).\r\tReturn a pointer to the index data if successful, nil otherwise. */\r\rstatic void* stackPrimitiveIndexArrayofSizevalidateforVertexSize(sqInt stackIndex, sqInt nItems, sqInt aBool, sqInt maxIndex) {\r    sqInt i;\r    int *idxPtr;\r    sqInt index;\r    sqInt oop;\r    sqInt oopSize;\r\r\toop = interpreterProxy->stackObjectValue(stackIndex);\r\tif (oop == null) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(oop))) {\r\t\treturn null;\r\t}\r\toopSize = interpreterProxy->slotSizeOf(oop);\r\tif (oopSize < nItems) {\r\t\treturn null;\r\t}\r\tidxPtr = ((int *) (interpreterProxy->firstIndexableField(oop)));\r\tif (aBool) {\r\t\tfor (i = 0; i <= (nItems - 1); i += 1) {\r\t\t\tindex = idxPtr[i];\r\t\t\tif ((index < 0) || (index > maxIndex)) {\r\t\t\t\treturn null;\r\t\t\t}\r\t\t}\r\t}\r\treturn idxPtr;\r}\r\r\r/*\tLoad a primitive vertex from the interpreter stack.\r\tReturn a pointer to the vertex data if successful, nil otherwise. */\r\rstatic void* stackPrimitiveVertex(sqInt index) {\r    sqInt oop;\r\r\toop = interpreterProxy->stackObjectValue(index);\r\tif (oop == null) {\r\t\treturn null;\r\t}\r\tif ((interpreterProxy->isWords(oop)) && ((interpreterProxy->slotSizeOf(oop)) == PrimVertexSize)) {\r\t\treturn interpreterProxy->firstIndexableField(oop);\r\t}\r\treturn null;\r}\r\r\r/*\tLoad a primitive vertex array from the interpreter stack.\r\tReturn a pointer to the vertex data if successful, nil otherwise. */\r\rstatic void* stackPrimitiveVertexArrayofSize(sqInt index, sqInt nItems) {\r    sqInt oop;\r    sqInt oopSize;\r\r\toop = interpreterProxy->stackObjectValue(index);\r\tif (oop == null) {\r\t\treturn null;\r\t}\r\tif (interpreterProxy->isWords(oop)) {\r\t\toopSize = interpreterProxy->slotSizeOf(oop);\r\t\tif (((oopSize >= nItems) * PrimVertexSize) && ((oopSize % PrimVertexSize) == 0)) {\r\t\t\treturn interpreterProxy->firstIndexableField(oop);\r\t\t}\r\t}\r\treturn null;\r}\r\rstatic sqInt storeObjectsInto(sqInt stackIndex) {\r    sqInt arrayOop;\r    sqInt arraySize;\r    sqInt i;\r    sqInt objOop;\r\r\tarrayOop = interpreterProxy->stackObjectValue(stackIndex);\r\tarraySize = state.nObjects;\r\tfor (i = 0; i <= (arraySize - 1); i += 1) {\r\t\tobjOop = state.objects[i]->__oop__;\r\t\tinterpreterProxy->storePointerofObjectwithValue(i, arrayOop, objOop);\r\t}\r}\r\r\r/*\tStore the computed output color back into the current primitive vertex.\r\tClamp the r,g,b,a part to be in the range 0-255. */\r\rstatic sqInt storePrimitiveVertex(void) {\r    sqInt a;\r    sqInt b;\r    sqInt g;\r    sqInt r;\r\r\tr = ((sqInt)((vtxOutColor[0]) * 255));\r\tr = (((((r < 255) ? r : 255)) < 0) ? 0 : (((r < 255) ? r : 255)));\r\tg = ((sqInt)((vtxOutColor[1]) * 255));\r\tg = (((((g < 255) ? g : 255)) < 0) ? 0 : (((g < 255) ? g : 255)));\r\tb = ((sqInt)((vtxOutColor[2]) * 255));\r\tb = (((((b < 255) ? b : 255)) < 0) ? 0 : (((b < 255) ? b : 255)));\r\ta = ((sqInt)((vtxOutColor[3]) * 255));\r\r\t/* The following is equal to b + (g << 8) + (r << 16) + (a << 24) */\r\r\ta = (((((a < 255) ? a : 255)) < 0) ? 0 : (((a < 255) ? a : 255)));\r\t(((int*) litVertex))[PrimVtxColor32] = (b + ((g + ((r + (a << 8)) << 8)) << 8));\r}\r\rstatic double topClipValueFromto(sqInt last, sqInt next) {\r\treturn (((((float *) last))[PrimVtxRasterPosY]) - ((((float *) last))[PrimVtxRasterPosW])) / ((((((float *) next))[PrimVtxRasterPosW]) - ((((float *) last))[PrimVtxRasterPosW])) - (((((float *) next))[PrimVtxRasterPosY]) - ((((float *) last))[PrimVtxRasterPosY])));\r}\r\r\r/*\tTransform src with arg into dst.\r\tIt is allowed that src == dst but not arg == dst */\r\rstatic sqInt transformMatrixwithinto(float *src, float *arg, float *dst) {\r    float c1;\r    float c2;\r    float c3;\r    float c4;\r    sqInt i;\r    float *m1;\r    float *m2;\r    float *m3;\r\r\tm1 = ((float *) src);\r\tm2 = ((float *) arg);\r\tm3 = ((float *) dst);\r\tfor (i = 0; i <= 3; i += 1) {\r\r\t\t/* Compute next row */\r\r\t\tc1 = ((((m1[0]) * (m2[0])) + ((m1[1]) * (m2[4]))) + ((m1[2]) * (m2[8]))) + ((m1[3]) * (m2[12]));\r\t\tc2 = ((((m1[0]) * (m2[1])) + ((m1[1]) * (m2[5]))) + ((m1[2]) * (m2[9]))) + ((m1[3]) * (m2[13]));\r\t\tc3 = ((((m1[0]) * (m2[2])) + ((m1[1]) * (m2[6]))) + ((m1[2]) * (m2[10]))) + ((m1[3]) * (m2[14]));\r\r\t\t/* Store result */\r\r\t\tc4 = ((((m1[0]) * (m2[3])) + ((m1[1]) * (m2[7]))) + ((m1[2]) * (m2[11]))) + ((m1[3]) * (m2[15]));\r\t\tm3[0] = c1;\r\t\tm3[1] = c2;\r\t\tm3[2] = c3;\r\t\tm3[3] = c4;\r\t\tm1 += 4;\r\t\tm3 += 4;\r\t}\r}\r\r\r/*\tTransform the normal of the given primitive vertex */\r\rstatic sqInt transformPrimitiveNormalbyrescale(float *pVertex, float *matrix, sqInt rescale) {\r    double dot;\r    double rx;\r    double ry;\r    double rz;\r    double x;\r    double y;\r    double z;\r\r\tx = pVertex[PrimVtxNormalX];\r\ty = pVertex[PrimVtxNormalY];\r\tz = pVertex[PrimVtxNormalZ];\r\trx = ((x * (matrix[0])) + (y * (matrix[1]))) + (z * (matrix[2]));\r\try = ((x * (matrix[4])) + (y * (matrix[5]))) + (z * (matrix[6]));\r\trz = ((x * (matrix[8])) + (y * (matrix[9]))) + (z * (matrix[10]));\r\tif (rescale) {\r\t\tdot = ((rx * rx) + (ry * ry)) + (rz * rz);\r\t\tif (dot < 1.0e-20) {\r\t\t\trx = ry = rz = 0.0;\r\t\t} else {\r\t\t\tif (!(dot == 1.0)) {\r\t\t\t\tdot = 1.0 / (sqrt(dot));\r\t\t\t\trx = rx * dot;\r\t\t\t\try = ry * dot;\r\t\t\t\trz = rz * dot;\r\t\t\t}\r\t\t}\r\t}\r\tpVertex[PrimVtxNormalX] = (((float) rx));\r\tpVertex[PrimVtxNormalY] = (((float) ry));\r\tpVertex[PrimVtxNormalZ] = (((float) rz));\r}\r\r\r/*\tTransform the normal of the given primitive vertex */\r\rstatic sqInt transformPrimitivePositionby(float *pVertex, float *matrix) {\r    double rw;\r    double rx;\r    double ry;\r    double rz;\r    double x;\r    double y;\r    double z;\r\r\tx = pVertex[PrimVtxPositionX];\r\ty = pVertex[PrimVtxPositionY];\r\tz = pVertex[PrimVtxPositionZ];\r\trx = (((x * (matrix[0])) + (y * (matrix[1]))) + (z * (matrix[2]))) + (matrix[3]);\r\try = (((x * (matrix[4])) + (y * (matrix[5]))) + (z * (matrix[6]))) + (matrix[7]);\r\trz = (((x * (matrix[8])) + (y * (matrix[9]))) + (z * (matrix[10]))) + (matrix[11]);\r\trw = (((x * (matrix[12])) + (y * (matrix[13]))) + (z * (matrix[14]))) + (matrix[15]);\r\tif (rw == 1.0) {\r\t\tpVertex[PrimVtxPositionX] = (((float) rx));\r\t\tpVertex[PrimVtxPositionY] = (((float) ry));\r\t\tpVertex[PrimVtxPositionZ] = (((float) rz));\r\t} else {\r\t\tif (rw == 0.0) {\r\t\t\trw = 0.0;\r\t\t} else {\r\t\t\trw = 1.0 / rw;\r\t\t}\r\t\tpVertex[PrimVtxPositionX] = (((float) (rx * rw)));\r\t\tpVertex[PrimVtxPositionY] = (((float) (ry * rw)));\r\t\tpVertex[PrimVtxPositionZ] = (((float) (rz * rw)));\r\t}\r}\r\r\r/*\tTransform the position of the given primitive vertex assuming that \r\tmatrix a41 = a42 = a43 = 0.0 and a44 = 1.0 */\r\rstatic sqInt transformPrimitivePositionFastby(float *pVertex, float *matrix) {\r    double rx;\r    double ry;\r    double rz;\r    double x;\r    double y;\r    double z;\r\r\tx = pVertex[PrimVtxPositionX];\r\ty = pVertex[PrimVtxPositionY];\r\tz = pVertex[PrimVtxPositionZ];\r\trx = (((x * (matrix[0])) + (y * (matrix[1]))) + (z * (matrix[2]))) + (matrix[3]);\r\try = (((x * (matrix[4])) + (y * (matrix[5]))) + (z * (matrix[6]))) + (matrix[7]);\r\trz = (((x * (matrix[8])) + (y * (matrix[9]))) + (z * (matrix[10]))) + (matrix[11]);\r\tpVertex[PrimVtxPositionX] = (((float) rx));\r\tpVertex[PrimVtxPositionY] = (((float) ry));\r\tpVertex[PrimVtxPositionZ] = (((float) rz));\r}\r\r\r/*\tTransform the position of the given primitive vertex assuming that \r\tmatrix a14 = a24 = a34 = a41 = a42 = a43 = 0.0 and a44 = 1.0 */\r\rstatic sqInt transformPrimitivePositionFasterby(float *pVertex, float *matrix) {\r    double rx;\r    double ry;\r    double rz;\r    double x;\r    double y;\r    double z;\r\r\tx = pVertex[PrimVtxPositionX];\r\ty = pVertex[PrimVtxPositionY];\r\tz = pVertex[PrimVtxPositionZ];\r\trx = ((x * (matrix[0])) + (y * (matrix[1]))) + (z * (matrix[2]));\r\try = ((x * (matrix[4])) + (y * (matrix[5]))) + (z * (matrix[6]));\r\trz = ((x * (matrix[8])) + (y * (matrix[9]))) + (z * (matrix[10]));\r\tpVertex[PrimVtxPositionX] = (((float) rx));\r\tpVertex[PrimVtxPositionY] = (((float) ry));\r\tpVertex[PrimVtxPositionZ] = (((float) rz));\r}\r\r\r/*\tTransform the normal of the given primitive vertex */\r\rstatic sqInt transformPrimitiveRasterPositionby(float *pVertex, float *matrix) {\r    double rw;\r    double rx;\r    double ry;\r    double rz;\r    double x;\r    double y;\r    double z;\r\r\tx = pVertex[PrimVtxPositionX];\r\ty = pVertex[PrimVtxPositionY];\r\tz = pVertex[PrimVtxPositionZ];\r\trx = (((x * (matrix[0])) + (y * (matrix[1]))) + (z * (matrix[2]))) + (matrix[3]);\r\try = (((x * (matrix[4])) + (y * (matrix[5]))) + (z * (matrix[6]))) + (matrix[7]);\r\trz = (((x * (matrix[8])) + (y * (matrix[9]))) + (z * (matrix[10]))) + (matrix[11]);\r\trw = (((x * (matrix[12])) + (y * (matrix[13]))) + (z * (matrix[14]))) + (matrix[15]);\r\tpVertex[PrimVtxRasterPosX] = (((float) rx));\r\tpVertex[PrimVtxRasterPosY] = (((float) ry));\r\tpVertex[PrimVtxRasterPosZ] = (((float) rz));\r\tpVertex[PrimVtxRasterPosW] = (((float) rw));\r}\r\r\r/*\tTransform the entire vertex array by the given matrices */\r/*\tTODO: Check the actual trade-offs between vtxCount and analyzing */\r\rstatic sqInt transformVBcountbyandflags(float *vtxArray, sqInt vtxCount, float *modelViewMatrix, float *projectionMatrix, sqInt flags) {\r    sqInt hasNormals;\r    sqInt i;\r    sqInt mvFlags;\r    float *pVertex;\r    sqInt prFlags;\r    sqInt rescale;\r\r\tmvFlags = analyzeMatrix(modelViewMatrix);\r\tprFlags = analyzeMatrix(projectionMatrix);\r\tpVertex = ((float *) vtxArray);\r\r\t/* Check if we have to rescale the normals */\r\r\thasNormals = flags & VBVtxHasNormals;\r\tif (hasNormals) {\r\t\tif (mvFlags & FlagM44Identity) {\r\t\t\trescale = 0;\r\t\t} else {\r\t\t\trescale = analyzeMatrix3x3Length(modelViewMatrix);\r\t\t}\r\t}\r\tif ((mvFlags & FlagM44NoPerspective) && (prFlags == 0)) {\r\t\tif ((mvFlags == FlagM44NoTranslation) == 0) {\r\t\t\tfor (i = 1; i <= vtxCount; i += 1) {\r\t\t\t\tif (hasNormals) {\r\t\t\t\t\ttransformPrimitiveNormalbyrescale(pVertex, modelViewMatrix, rescale);\r\t\t\t\t}\r\t\t\t\ttransformPrimitivePositionFastby(pVertex, modelViewMatrix);\r\t\t\t\ttransformPrimitiveRasterPositionby(pVertex, projectionMatrix);\r\t\t\t\tpVertex += PrimVertexSize;\r\t\t\t}\r\t\t} else {\r\t\t\tfor (i = 1; i <= vtxCount; i += 1) {\r\t\t\t\tif (hasNormals) {\r\t\t\t\t\ttransformPrimitiveNormalbyrescale(pVertex, modelViewMatrix, rescale);\r\t\t\t\t}\r\t\t\t\ttransformPrimitivePositionFasterby(pVertex, modelViewMatrix);\r\t\t\t\ttransformPrimitiveRasterPositionby(pVertex, projectionMatrix);\r\t\t\t\tpVertex += PrimVertexSize;\r\t\t\t}\r\t\t}\r\t\treturn null;\r\t}\r\tif ((mvFlags & prFlags) & FlagM44Identity) {\r\t\tfor (i = 1; i <= vtxCount; i += 1) {\r\t\t\tpVertex[PrimVtxRasterPosX] = (pVertex[PrimVtxPositionX]);\r\t\t\tpVertex[PrimVtxRasterPosY] = (pVertex[PrimVtxPositionY]);\r\t\t\tpVertex[PrimVtxRasterPosZ] = (pVertex[PrimVtxPositionZ]);\r\t\t\tpVertex[PrimVtxRasterPosW] = 1.0;\r\t\t\tpVertex += PrimVertexSize;\r\t\t}\r\t\treturn null;\r\t}\r\tif (mvFlags & FlagM44Identity) {\r\t\tfor (i = 1; i <= vtxCount; i += 1) {\r\t\t\ttransformPrimitiveRasterPositionby(pVertex, projectionMatrix);\r\t\t\tpVertex += PrimVertexSize;\r\t\t}\r\t\treturn null;\r\t}\r\tif (prFlags & FlagM44Identity) {\r\t\tfor (i = 1; i <= vtxCount; i += 1) {\r\t\t\tif (hasNormals) {\r\t\t\t\ttransformPrimitiveNormalbyrescale(pVertex, modelViewMatrix, rescale);\r\t\t\t}\r\t\t\tif (mvFlags == (FlagM44NoPerspective + FlagM44NoPerspective)) {\r\t\t\t\ttransformPrimitivePositionFasterby(pVertex, modelViewMatrix);\r\t\t\t} else {\r\t\t\t\tif (mvFlags == FlagM44NoPerspective) {\r\t\t\t\t\ttransformPrimitivePositionFastby(pVertex, modelViewMatrix);\r\t\t\t\t} else {\r\t\t\t\t\ttransformPrimitivePositionby(pVertex, modelViewMatrix);\r\t\t\t\t}\r\t\t\t}\r\t\t\tpVertex[PrimVtxRasterPosX] = (pVertex[PrimVtxPositionX]);\r\t\t\tpVertex[PrimVtxRasterPosY] = (pVertex[PrimVtxPositionY]);\r\t\t\tpVertex[PrimVtxRasterPosZ] = (pVertex[PrimVtxPositionZ]);\r\t\t\tpVertex[PrimVtxRasterPosW] = 1.0;\r\t\t\tpVertex += PrimVertexSize;\r\t\t}\r\t\treturn null;\r\t}\r\tfor (i = 1; i <= vtxCount; i += 1) {\r\t\tif (hasNormals) {\r\t\t\ttransformPrimitiveNormalbyrescale(pVertex, modelViewMatrix, rescale);\r\t\t}\r\t\ttransformPrimitivePositionby(pVertex, modelViewMatrix);\r\t\ttransformPrimitiveRasterPositionby(pVertex, projectionMatrix);\r\t\tpVertex += PrimVertexSize;\r\t}\r}\r\r\r/*\tLoad the word based array of size count from the given oop */\r\rstatic void* vbLoadArraysize(sqInt oop, sqInt count) {\r\tif (oop == null) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (oop == (interpreterProxy->nilObject())) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(oop))) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!((interpreterProxy->slotSizeOf(oop)) == count)) {\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\treturn interpreterProxy->firstIndexableField(oop);\r}\r\r\r#ifdef SQUEAK_BUILTIN_PLUGIN\r\r\rvoid* Squeak3D_exports[][3] = {\r\t{\"Squeak3D\", \"b3dShaderVersion\", (void*)b3dShaderVersion},\r\t{\"Squeak3D\", \"b3dTransformPrimitiveNormal\", (void*)b3dTransformPrimitiveNormal},\r\t{\"Squeak3D\", \"b3dClipPolygon\", (void*)b3dClipPolygon},\r\t{\"Squeak3D\", \"b3dOrthoNormInverseMatrix\", (void*)b3dOrthoNormInverseMatrix},\r\t{\"Squeak3D\", \"b3dTransformVertexBuffer\", (void*)b3dTransformVertexBuffer},\r\t{\"Squeak3D\", \"b3dComputeMinZ\", (void*)b3dComputeMinZ},\r\t{\"Squeak3D\", \"b3dInitializeRasterizerState\", (void*)b3dInitializeRasterizerState},\r\t{\"Squeak3D\", \"b3dDetermineClipFlags\", (void*)b3dDetermineClipFlags},\r\t{\"Squeak3D\", \"getModuleName\", (void*)getModuleName},\r\t{\"Squeak3D\", \"setInterpreter\", (void*)setInterpreter},\r\t{\"Squeak3D\", \"b3dTransformPrimitiveRasterPosition\", (void*)b3dTransformPrimitiveRasterPosition},\r\t{\"Squeak3D\", \"primitiveSetBitBltPlugin\", (void*)primitiveSetBitBltPlugin},\r\t{\"Squeak3D\", \"b3dTransformMatrixWithInto\", (void*)b3dTransformMatrixWithInto},\r\t{\"Squeak3D\", \"b3dStartRasterizer\", (void*)b3dStartRasterizer},\r\t{\"Squeak3D\", \"b3dShadeVertexBuffer\", (void*)b3dShadeVertexBuffer},\r\t{\"Squeak3D\", \"b3dRasterizerVersion\", (void*)b3dRasterizerVersion},\r\t{\"Squeak3D\", \"b3dInitPrimitiveObject\", (void*)b3dInitPrimitiveObject},\r\t{\"Squeak3D\", \"b3dLoadVertexBuffer\", (void*)b3dLoadVertexBuffer},\r\t{\"Squeak3D\", \"b3dTransformDirection\", (void*)b3dTransformDirection},\r\t{\"Squeak3D\", \"moduleUnloaded\", (void*)moduleUnloaded},\r\t{\"Squeak3D\", \"b3dPrimitiveTextureSize\", (void*)b3dPrimitiveTextureSize},\r\t{\"Squeak3D\", \"b3dComputeMinIndexZ\", (void*)b3dComputeMinIndexZ},\r\t{\"Squeak3D\", \"b3dMapVertexBuffer\", (void*)b3dMapVertexBuffer},\r\t{\"Squeak3D\", \"initialiseModule\", (void*)initialiseModule},\r\t{\"Squeak3D\", \"b3dTransformerVersion\", (void*)b3dTransformerVersion},\r\t{\"Squeak3D\", \"b3dTransposeMatrix\", (void*)b3dTransposeMatrix},\r\t{\"Squeak3D\", \"b3dPrimitiveNextClippedTriangle\", (void*)b3dPrimitiveNextClippedTriangle},\r\t{\"Squeak3D\", \"b3dTransformPoint\", (void*)b3dTransformPoint},\r\t{\"Squeak3D\", \"b3dTransformPrimitivePosition\", (void*)b3dTransformPrimitivePosition},\r\t{\"Squeak3D\", \"b3dPrimitiveObjectSize\", (void*)b3dPrimitiveObjectSize},\r\t{\"Squeak3D\", \"b3dLoadIndexArray\", (void*)b3dLoadIndexArray},\r\t{\"Squeak3D\", \"b3dInplaceHouseHolderInvert\", (void*)b3dInplaceHouseHolderInvert},\r\t{NULL, NULL, NULL}\r};\r\r\r#endif /* ifdef SQ_BUILTIN_PLUGIN */\r\r"
  },
  {
    "path": "vm/src/from_squeak/unix/src/plugins/SqueakFFIPrims/SqueakFFIPrims.c",
    "content": "/* Automatically generated from Squeak on 23 January 2011 3:55:52 pm \r   by VMMaker 4.4.7\r */\r\r#include <math.h>\r#include <stdio.h>\r#include <stdlib.h>\r#include <string.h>\r#include <time.h>\r\r/* Default EXPORT macro that does nothing (see comment in sq.h): */\r#define EXPORT(returnType) returnType\r\r/* Do not include the entire sq.h file but just those parts needed. */\r/*  The virtual machine proxy definition */\r#include \"sqVirtualMachine.h\"\r/* Configuration options */\r#include \"sqConfig.h\"\r/* Platform specific definitions */\r#include \"sqPlatformSpecific.h\"\r\r#define true 1\r#define false 0\r#define null 0  /* using 'null' because nil is predefined in Think C */\r#ifdef SQUEAK_BUILTIN_PLUGIN\r#undef EXPORT\r// was #undef EXPORT(returnType) but screws NorCroft cc\r#define EXPORT(returnType) static returnType\r#endif\r#include \"sqFFI.h\"\r\r#include \"sqMemoryAccess.h\"\r\r\r/*** Constants ***/\r\r/*** Function Prototypes ***/\rstatic sqInt atomicTypeOf(sqInt value);\rstatic sqInt ffiAddressOfstartingAtsize(sqInt rcvr, sqInt byteOffset, sqInt byteSize);\rstatic sqInt ffiArgByValue(sqInt oop);\rstatic sqInt ffiArgumentSpecClass(sqInt oop, sqInt argSpec, sqInt argClass);\rstatic sqInt ffiAtomicArgByReferenceClass(sqInt oop, sqInt oopClass);\rstatic sqInt ffiAtomicStructByReferenceClass(sqInt oop, sqInt oopClass);\rstatic sqInt ffiCallWithFlagsAndTypes(sqInt address, sqInt callType, sqInt argTypeArray);\rstatic sqInt ffiCallWithFlagsArgsAndTypesOfSize(sqInt address, sqInt callType, sqInt argArray, sqInt argTypeArray, sqInt nArgs);\rstatic sqInt ffiCalloutToWithFlags(sqInt address, sqInt callType);\rstatic sqInt ffiCheckReturnWith(sqInt retSpec, sqInt retClass);\rstatic sqInt ffiContentsOfHandleerrCode(sqInt oop, sqInt errCode);\rstatic sqInt ffiCreateLongLongReturn(sqInt isSigned);\rstatic sqInt ffiCreateReturn(sqInt retVal);\rstatic sqInt ffiCreateReturnOop(sqInt retVal);\rstatic sqInt ffiCreateReturnPointer(sqInt retVal);\rstatic sqInt ffiCreateReturnStruct(void);\rstatic sqInt ffiFail(sqInt reason);\rstatic double ffiFloatValueOf(sqInt oop);\rstatic sqInt ffiGetLastError(void);\rstatic sqInt ffiIntegerValueOf(sqInt oop);\rstatic sqInt ffiLoadCalloutAddress(sqInt lit);\rstatic sqInt ffiLoadCalloutAddressFrom(sqInt oop);\rstatic sqInt ffiLoadCalloutModule(sqInt module);\rstatic sqInt ffiPushPointerContentsOf(sqInt oop);\rstatic sqInt ffiPushSignedLongLongOop(sqInt oop);\rstatic sqInt ffiPushStructureContentsOf(sqInt oop);\rstatic sqInt ffiPushUnsignedLongLongOop(sqInt oop);\rstatic sqInt ffiPushVoid(sqInt ignored);\rstatic sqInt ffiReturnCStringFrom(sqInt cPointer);\rstatic sqInt ffiSetLastError(sqInt errCode);\rstatic sqInt ffiValidateExternalDataAtomicType(sqInt oop, sqInt atomicType);\rstatic VirtualMachine * getInterpreter(void);\r#pragma export on\rEXPORT(const char*) getModuleName(void);\r#pragma export off\rstatic sqInt halt(void);\r#pragma export on\rEXPORT(sqInt) initialiseModule(void);\r#pragma export off\rstatic sqInt isAtomicType(sqInt typeSpec);\rstatic sqInt msg(char *s);\r#pragma export on\rEXPORT(sqInt) primitiveCallout(void);\rEXPORT(sqInt) primitiveCalloutWithArgs(void);\rEXPORT(sqInt) primitiveCreateManualSurface(void);\rEXPORT(sqInt) primitiveDestroyManualSurface(void);\rEXPORT(sqInt) primitiveFFIAllocate(void);\rEXPORT(sqInt) primitiveFFIDoubleAt(void);\rEXPORT(sqInt) primitiveFFIDoubleAtPut(void);\rEXPORT(sqInt) primitiveFFIFloatAt(void);\rEXPORT(sqInt) primitiveFFIFloatAtPut(void);\rEXPORT(sqInt) primitiveFFIFree(void);\rEXPORT(sqInt) primitiveFFIGetLastError(void);\rEXPORT(sqInt) primitiveFFIIntegerAt(void);\rEXPORT(sqInt) primitiveFFIIntegerAtPut(void);\rEXPORT(sqInt) primitiveForceLoad(void);\rEXPORT(sqInt) primitiveSetManualSurfacePointer(void);\rEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\r#pragma export off\r/*** Variables ***/\rstatic sqInt ffiArgClass;\rstatic sqInt ffiArgHeader;\rstatic sqInt ffiArgSpec;\rstatic sqInt ffiArgSpecSize;\rstatic sqInt ffiLastError;\rstatic sqInt ffiRetClass;\rstatic sqInt ffiRetHeader;\rstatic sqInt ffiRetOop;\rstatic sqInt ffiRetSpec;\rstatic sqInt ffiRetSpecSize;\r\r#ifdef SQUEAK_BUILTIN_PLUGIN\rextern\r#endif\rstruct VirtualMachine* interpreterProxy;\rstatic const char *moduleName =\r#ifdef SQUEAK_BUILTIN_PLUGIN\r\t\"SqueakFFIPrims 23 January 2011 (i)\"\r#else\r\t\"SqueakFFIPrims 23 January 2011 (e)\"\r#endif\r;\r\r\rstatic sqInt atomicTypeOf(sqInt value) {\r\treturn ((usqInt) (value & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\r}\r\r\r/*\treturn an int of the address of the byteSize slot (byte, short, int, whatever) at byteOffset in rcvr. Nominally intended for use with ExternalAddress objects, this code will work (for obscure historical reasons) with plain Byte or Word Arrays as well.  */\r\rstatic sqInt ffiAddressOfstartingAtsize(sqInt rcvr, sqInt byteOffset, sqInt byteSize) {\r    sqInt addr;\r    sqInt rcvrClass;\r    sqInt rcvrSize;\r\r\tif (!(interpreterProxy->isBytes(rcvr))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tif (!(byteOffset > 0)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\trcvrClass = interpreterProxy->fetchClassOf(rcvr);\r\trcvrSize = interpreterProxy->byteSizeOf(rcvr);\r\tif (rcvrClass == (interpreterProxy->classExternalAddress())) {\r\t\tif (!(rcvrSize == 4)) {\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\r\t\t/* don't you dare to read from object memory! */\r\r\t\taddr = interpreterProxy->fetchPointerofObject(0, rcvr);\r\t\tif ((addr == 0) || (interpreterProxy->isInMemory(addr))) {\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t} else {\r\t\tif (!(((byteOffset + byteSize) - 1) <= rcvrSize)) {\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\taddr = ((int) (interpreterProxy->firstIndexableField(rcvr)));\r\t}\r\taddr = (addr + byteOffset) - 1;\r\treturn addr;\r}\r\r\r/*\tSupport for generic callout. Prepare an argument by value for a callout. */\r\rstatic sqInt ffiArgByValue(sqInt oop) {\r    sqInt atomicType;\r    double floatValue;\r    sqInt intValue;\r    sqInt oopClass;\r    sqInt oopClass1;\r    sqInt reason;\r    sqInt reason1;\r    sqInt reason2;\r\r\r\t/* check if the range is valid */\r\r\tatomicType = ((usqInt) (ffiArgHeader & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\r\tif ((atomicType < 0) || (atomicType > FFITypeDoubleFloat)) {\r\t\t/* begin ffiFail: */\r\t\treason = FFIErrorBadAtomicType;\r\t\tffiLastError = reason;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tif (atomicType < FFITypeSingleFloat) {\r\t\tif ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSignedLongLong) >> 1)) {\r\r\t\t\t/* integer types */\r\t\t\t/* ffi support code must coerce longlong */\r\r\t\t\tintValue = oop;\r\t\t} else {\r\t\t\t/* begin ffiIntegerValueOf: */\r\t\t\tif ((oop & 1)) {\r\t\t\t\tintValue = (oop >> 1);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t\tif (oop == (interpreterProxy->nilObject())) {\r\t\t\t\tintValue = 0;\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t\tif (oop == (interpreterProxy->falseObject())) {\r\t\t\t\tintValue = 0;\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t\tif (oop == (interpreterProxy->trueObject())) {\r\t\t\t\tintValue = 1;\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t\toopClass = interpreterProxy->fetchClassOf(oop);\r\t\t\tif (oopClass == (interpreterProxy->classFloat())) {\r\t\t\t\tintValue = ((sqInt)(interpreterProxy->floatValueOf(oop)));\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t\tif (oopClass == (interpreterProxy->classCharacter())) {\r\t\t\t\tintValue = interpreterProxy->fetchIntegerofObject(0, oop);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t\tif (oopClass == (interpreterProxy->classLargePositiveInteger())) {\r\t\t\t\tintValue = interpreterProxy->positive32BitValueOf(oop);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t\tintValue = interpreterProxy->signed32BitValueOf(oop);\r\t\tl1:\t/* end ffiIntegerValueOf: */;\r\t\t}\r\t\tif (interpreterProxy->failed()) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason1 = FFIErrorCoercionFailed;\r\t\t\tffiLastError = reason1;\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\tswitch (atomicType) {\r\t\tcase 0:\r\t\t\tffiFail(FFIErrorAttemptToPassVoid);\r\t\t\tbreak;\r\t\tcase 1:\r\t\t\tffiPushUnsignedInt(intValue);\r\t\t\tbreak;\r\t\tcase 2:\r\t\t\tffiPushUnsignedByte(intValue);\r\t\t\tbreak;\r\t\tcase 3:\r\t\t\tffiPushSignedByte(intValue);\r\t\t\tbreak;\r\t\tcase 4:\r\t\t\tffiPushUnsignedShort(intValue);\r\t\t\tbreak;\r\t\tcase 5:\r\t\t\tffiPushSignedShort(intValue);\r\t\t\tbreak;\r\t\tcase 6:\r\t\t\tffiPushUnsignedInt(intValue);\r\t\t\tbreak;\r\t\tcase 7:\r\t\t\tffiPushSignedInt(intValue);\r\t\t\tbreak;\r\t\tcase 8:\r\t\t\tffiPushUnsignedLongLongOop(intValue);\r\t\t\tbreak;\r\t\tcase 9:\r\t\t\tffiPushSignedLongLongOop(intValue);\r\t\t\tbreak;\r\t\tcase 10:\r\t\t\tffiPushUnsignedChar(intValue);\r\t\t\tbreak;\r\t\tcase 11:\r\t\t\tffiPushSignedChar(intValue);\r\t\t\tbreak;\r\t\t}\r\t} else {\r\t\t/* begin ffiFloatValueOf: */\r\t\toopClass1 = interpreterProxy->fetchClassOf(oop);\r\t\tif (oopClass1 == (interpreterProxy->classFloat())) {\r\t\t\tfloatValue = interpreterProxy->floatValueOf(oop);\r\t\t\tgoto l2;\r\t\t}\r\t\tfloatValue = ((double) (ffiIntegerValueOf(oop)) );\r\tl2:\t/* end ffiFloatValueOf: */;\r\t\tif (interpreterProxy->failed()) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason2 = FFIErrorCoercionFailed;\r\t\t\tffiLastError = reason2;\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\tif (atomicType == FFITypeSingleFloat) {\r\t\t\tffiPushSingleFloat(floatValue);\r\t\t} else {\r\t\t\tffiPushDoubleFloat(floatValue);\r\t\t}\r\t}\r\treturn 0;\r}\r\r\r/*\tCallout support. Prepare the given oop as argument.\r\targSpec defines the compiled spec for the argument.\r\targClass (if non-nil) defines the required (super)class for the argument. */\r\rstatic sqInt ffiArgumentSpecClass(sqInt oop, sqInt argSpec, sqInt argClass) {\r    sqInt isStruct;\r    sqInt nilOop;\r    sqInt oopClass;\r    sqInt valueOop;\r    sqInt ptrAddress;\r    sqInt ptrClass;\r    sqInt ptrValue;\r    sqInt reason;\r    sqInt reason1;\r    sqInt reason2;\r    sqInt reason3;\r    sqInt reason4;\r    sqInt reason5;\r    sqInt reason6;\r    sqInt reason7;\r    sqInt reason8;\r    sqInt reason9;\r    sqInt reason10;\r    sqInt reason11;\r    sqInt reason12;\r    sqInt reason13;\r    sqInt atomicType;\r    sqInt valueOop1;\r    sqInt atomicType1;\r    sqInt isString;\r    sqInt reason14;\r    sqInt reason15;\r    sqInt reason16;\r    sqInt ptrType;\r    sqInt spec;\r    sqInt specOop;\r    sqInt specType;\r    sqInt reason17;\r    sqInt reason18;\r    sqInt reason21;\r    sqInt reason31;\r    sqInt reason41;\r    sqInt reason51;\r    sqInt reason61;\r    sqInt reason71;\r    sqInt reason81;\r    sqInt reason19;\r    sqInt reason20;\r    sqInt reason22;\r    sqInt atomicType2;\r    double floatValue;\r    sqInt intValue;\r    sqInt oopClass2;\r    sqInt oopClass1;\r    sqInt reason23;\r    sqInt reason110;\r    sqInt reason24;\r\r\r\t/* Prefetch class (we'll need it) */\r\r\toopClass = interpreterProxy->fetchClassOf(oop);\r\r\t/* Do the necessary type checks */\r\r\tnilOop = interpreterProxy->nilObject();\r\tif (!(argClass == nilOop)) {\r\t\tif (!(interpreterProxy->includesBehaviorThatOf(argClass, interpreterProxy->classExternalStructure()))) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason = FFIErrorWrongType;\r\t\t\tffiLastError = reason;\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\tif (!((nilOop == oop) || (interpreterProxy->includesBehaviorThatOf(oopClass, argClass)))) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason1 = FFIErrorCoercionFailed;\r\t\t\tffiLastError = reason1;\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t}\r\tisStruct = 0;\r\tif (!(((oop & 1)) || (oop == nilOop))) {\r\t\tif (interpreterProxy->isPointers(oop)) {\r\r\t\t\t/* #isPointers: will fail if oop is SmallInteger so don't even attempt to use it */\r\r\t\t\tisStruct = interpreterProxy->includesBehaviorThatOf(oopClass, interpreterProxy->classExternalStructure());\r\t\t\tif (!((argClass == nilOop) || (isStruct))) {\r\t\t\t\t/* begin ffiFail: */\r\t\t\t\treason2 = FFIErrorCoercionFailed;\r\t\t\t\tffiLastError = reason2;\r\t\t\t\treturn interpreterProxy->primitiveFail();\r\t\t\t}\r\t\t}\r\t}\r\tif (isStruct) {\r\t\tvalueOop = interpreterProxy->fetchPointerofObject(0, oop);\r\t} else {\r\t\tvalueOop = oop;\r\t}\r\r\t/* Fetch and check the contents of the compiled spec */\r\r\tffiArgClass = argClass;\r\tif ((argSpec & 1)) {\r\t\t/* begin ffiFail: */\r\t\treason3 = FFIErrorWrongType;\r\t\tffiLastError = reason3;\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(argSpec))) {\r\t\t/* begin ffiFail: */\r\t\treason4 = FFIErrorWrongType;\r\t\tffiLastError = reason4;\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tffiArgSpecSize = interpreterProxy->slotSizeOf(argSpec);\r\tif (ffiArgSpecSize == 0) {\r\t\t/* begin ffiFail: */\r\t\treason5 = FFIErrorWrongType;\r\t\tffiLastError = reason5;\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tffiArgSpec = ((int) (interpreterProxy->firstIndexableField(argSpec)));\r\r\t/* Do the actual preparation of the argument */\r\t/* Note: Order is important since FFIFlagStructure + FFIFlagPointer is used to represent 'typedef void* VoidPointer' and VoidPointer really is *struct* not pointer. */\r\r\tffiArgHeader = longAt(ffiArgSpec);\r\tif (ffiArgHeader & FFIFlagStructure) {\r\t\tif (!(isStruct)) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason6 = FFIErrorCoercionFailed;\r\t\t\tffiLastError = reason6;\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\tif (ffiArgHeader & FFIFlagAtomic) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason7 = FFIErrorWrongType;\r\t\t\tffiLastError = reason7;\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\t/* begin ffiPushStructureContentsOf: */\r\t\tptrValue = valueOop;\r\t\tptrClass = interpreterProxy->fetchClassOf(ptrValue);\r\t\tif (ptrClass == (interpreterProxy->classExternalAddress())) {\r\t\t\tptrAddress = interpreterProxy->fetchPointerofObject(0, ptrValue);\r\t\t\tif (interpreterProxy->isInMemory(ptrAddress)) {\r\t\t\t\t/* begin ffiFail: */\r\t\t\t\treason8 = FFIErrorInvalidPointer;\r\t\t\t\tffiLastError = reason8;\r\t\t\t\treturn interpreterProxy->primitiveFail();\r\t\t\t}\r\t\t\treturn ffiPushStructureOfLength(ptrAddress, ((int*) ffiArgSpec), ffiArgSpecSize);\r\t\t}\r\t\tif (ptrClass == (interpreterProxy->classByteArray())) {\r\t\t\tif (!((interpreterProxy->byteSizeOf(ptrValue)) == (ffiArgHeader & FFIStructSizeMask))) {\r\t\t\t\t/* begin ffiFail: */\r\t\t\t\treason9 = FFIErrorStructSize;\r\t\t\t\tffiLastError = reason9;\r\t\t\t\treturn interpreterProxy->primitiveFail();\r\t\t\t}\r\t\t\tptrAddress = ((int) (interpreterProxy->firstIndexableField(ptrValue)));\r\t\t\tif (!(ffiArgHeader & FFIFlagPointer)) {\r\t\t\t\treturn ffiPushStructureOfLength(ptrAddress, ((int*) ffiArgSpec), ffiArgSpecSize);\r\t\t\t}\r\t\t\tif (!((ffiArgHeader & FFIStructSizeMask) == 4)) {\r\t\t\t\t/* begin ffiFail: */\r\t\t\t\treason10 = FFIErrorStructSize;\r\t\t\t\tffiLastError = reason10;\r\t\t\t\treturn interpreterProxy->primitiveFail();\r\t\t\t}\r\t\t\tptrAddress = interpreterProxy->fetchPointerofObject(0, ptrValue);\r\t\t\tif (interpreterProxy->isInMemory(ptrAddress)) {\r\t\t\t\t/* begin ffiFail: */\r\t\t\t\treason11 = FFIErrorInvalidPointer;\r\t\t\t\tffiLastError = reason11;\r\t\t\t\treturn interpreterProxy->primitiveFail();\r\t\t\t}\r\t\t\treturn ffiPushPointer(ptrAddress);\r\t\t}\r\t\t/* begin ffiFail: */\r\t\treason12 = FFIErrorBadArg;\r\t\tffiLastError = reason12;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tif (ffiArgHeader & FFIFlagPointer) {\r\t\tif ((oop & 1)) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason13 = FFIErrorIntAsPointer;\r\t\t\tffiLastError = reason13;\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\tif (oop == (interpreterProxy->nilObject())) {\r\t\t\treturn ffiPushPointer(null);\r\t\t}\r\t\tif (ffiArgHeader & FFIFlagAtomic) {\r\t\t\tif (isStruct) {\r\t\t\t\t/* begin ffiAtomicStructByReference:Class: */\r\t\t\t\tif (!(oopClass == (interpreterProxy->classExternalData()))) {\r\t\t\t\t\t/* begin ffiFail: */\r\t\t\t\t\treason16 = FFIErrorCoercionFailed;\r\t\t\t\t\tffiLastError = reason16;\r\t\t\t\t\treturn interpreterProxy->primitiveFail();\r\t\t\t\t}\r\t\t\t\tatomicType = ((usqInt) (ffiArgHeader & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\r\t\t\t\tif (atomicType != FFITypeVoid) {\r\t\t\t\t\t/* begin ffiValidateExternalData:AtomicType: */\r\t\t\t\t\tptrType = interpreterProxy->fetchPointerofObject(1, oop);\r\t\t\t\t\tif ((ptrType & 1)) {\r\t\t\t\t\t\t/* begin ffiFail: */\r\t\t\t\t\t\treason17 = FFIErrorWrongType;\r\t\t\t\t\t\tffiLastError = reason17;\r\t\t\t\t\t\tinterpreterProxy->primitiveFail();\r\t\t\t\t\t\tgoto l1;\r\t\t\t\t\t}\r\t\t\t\t\tif (!(interpreterProxy->isPointers(ptrType))) {\r\t\t\t\t\t\t/* begin ffiFail: */\r\t\t\t\t\t\treason18 = FFIErrorWrongType;\r\t\t\t\t\t\tffiLastError = reason18;\r\t\t\t\t\t\tinterpreterProxy->primitiveFail();\r\t\t\t\t\t\tgoto l1;\r\t\t\t\t\t}\r\t\t\t\t\tif ((interpreterProxy->slotSizeOf(ptrType)) < 2) {\r\t\t\t\t\t\t/* begin ffiFail: */\r\t\t\t\t\t\treason21 = FFIErrorWrongType;\r\t\t\t\t\t\tffiLastError = reason21;\r\t\t\t\t\t\tinterpreterProxy->primitiveFail();\r\t\t\t\t\t\tgoto l1;\r\t\t\t\t\t}\r\t\t\t\t\tspecOop = interpreterProxy->fetchPointerofObject(0, ptrType);\r\t\t\t\t\tif ((specOop & 1)) {\r\t\t\t\t\t\t/* begin ffiFail: */\r\t\t\t\t\t\treason31 = FFIErrorWrongType;\r\t\t\t\t\t\tffiLastError = reason31;\r\t\t\t\t\t\tinterpreterProxy->primitiveFail();\r\t\t\t\t\t\tgoto l1;\r\t\t\t\t\t}\r\t\t\t\t\tif (!(interpreterProxy->isWords(specOop))) {\r\t\t\t\t\t\t/* begin ffiFail: */\r\t\t\t\t\t\treason41 = FFIErrorWrongType;\r\t\t\t\t\t\tffiLastError = reason41;\r\t\t\t\t\t\tinterpreterProxy->primitiveFail();\r\t\t\t\t\t\tgoto l1;\r\t\t\t\t\t}\r\t\t\t\t\tif ((interpreterProxy->slotSizeOf(specOop)) == 0) {\r\t\t\t\t\t\t/* begin ffiFail: */\r\t\t\t\t\t\treason51 = FFIErrorWrongType;\r\t\t\t\t\t\tffiLastError = reason51;\r\t\t\t\t\t\tinterpreterProxy->primitiveFail();\r\t\t\t\t\t\tgoto l1;\r\t\t\t\t\t}\r\t\t\t\t\tspec = interpreterProxy->fetchPointerofObject(0, specOop);\r\t\t\t\t\tif (!(spec & FFIFlagAtomic)) {\r\t\t\t\t\t\t/* begin ffiFail: */\r\t\t\t\t\t\treason61 = FFIErrorWrongType;\r\t\t\t\t\t\tffiLastError = reason61;\r\t\t\t\t\t\tinterpreterProxy->primitiveFail();\r\t\t\t\t\t\tgoto l1;\r\t\t\t\t\t}\r\t\t\t\t\tspecType = ((usqInt) (spec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\r\t\t\t\t\tif (specType != atomicType) {\r\t\t\t\t\t\tif (!((atomicType > FFITypeBool) && (atomicType < FFITypeSingleFloat))) {\r\t\t\t\t\t\t\t/* begin ffiFail: */\r\t\t\t\t\t\t\treason71 = FFIErrorCoercionFailed;\r\t\t\t\t\t\t\tffiLastError = reason71;\r\t\t\t\t\t\t\tinterpreterProxy->primitiveFail();\r\t\t\t\t\t\t\tgoto l1;\r\t\t\t\t\t\t}\r\t\t\t\t\t\tif (!((((usqInt) atomicType) >> 1) == (((usqInt) specType) >> 1))) {\r\t\t\t\t\t\t\t/* begin ffiFail: */\r\t\t\t\t\t\t\treason81 = FFIErrorCoercionFailed;\r\t\t\t\t\t\t\tffiLastError = reason81;\r\t\t\t\t\t\t\tinterpreterProxy->primitiveFail();\r\t\t\t\t\t\t\tgoto l1;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\tl1:\t/* end ffiValidateExternalData:AtomicType: */;\r\t\t\t\t\tif (interpreterProxy->failed()) {\r\t\t\t\t\t\treturn null;\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\tvalueOop1 = interpreterProxy->fetchPointerofObject(0, oop);\r\t\t\t\treturn ffiPushPointerContentsOf(valueOop1);\r\t\t\t} else {\r\t\t\t\t/* begin ffiAtomicArgByReference:Class: */\r\t\t\t\tatomicType1 = ((usqInt) (ffiArgHeader & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\r\t\t\t\tif (atomicType1 == FFITypeBool) {\r\t\t\t\t\t/* begin ffiFail: */\r\t\t\t\t\treason19 = FFIErrorCoercionFailed;\r\t\t\t\t\tffiLastError = reason19;\r\t\t\t\t\treturn interpreterProxy->primitiveFail();\r\t\t\t\t}\r\t\t\t\tif ((((usqInt) atomicType1) >> 1) == (((usqInt) FFITypeSignedChar) >> 1)) {\r\t\t\t\t\tisString = interpreterProxy->includesBehaviorThatOf(oopClass, interpreterProxy->classString());\r\t\t\t\t\tif (isString) {\r\t\t\t\t\t\treturn ffiPushStringOfLength(((int) (interpreterProxy->firstIndexableField(oop))), interpreterProxy->byteSizeOf(oop));\r\t\t\t\t\t}\r\t\t\t\t\tatomicType1 = FFITypeUnsignedByte;\r\t\t\t\t}\r\t\t\t\tif ((atomicType1 == FFITypeVoid) || ((((usqInt) atomicType1) >> 1) == (((usqInt) FFITypeSignedByte) >> 1))) {\r\t\t\t\t\tif (oopClass == (interpreterProxy->classByteArray())) {\r\t\t\t\t\t\treturn ffiPushPointer(((int) (interpreterProxy->firstIndexableField(oop))));\r\t\t\t\t\t}\r\t\t\t\t\tisString = interpreterProxy->includesBehaviorThatOf(oopClass, interpreterProxy->classString());\r\t\t\t\t\tif (isString) {\r\t\t\t\t\t\treturn ffiPushPointer(((int) (interpreterProxy->firstIndexableField(oop))));\r\t\t\t\t\t}\r\t\t\t\t\tif (!(atomicType1 == FFITypeVoid)) {\r\t\t\t\t\t\t/* begin ffiFail: */\r\t\t\t\t\t\treason20 = FFIErrorCoercionFailed;\r\t\t\t\t\t\tffiLastError = reason20;\r\t\t\t\t\t\treturn interpreterProxy->primitiveFail();\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\tif ((atomicType1 <= FFITypeSignedInt) || (atomicType1 == FFITypeSingleFloat)) {\r\t\t\t\t\tif (interpreterProxy->isWords(oop)) {\r\t\t\t\t\t\treturn ffiPushPointer(((int) (interpreterProxy->firstIndexableField(oop))));\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\t/* begin ffiFail: */\r\t\t\t\treason22 = FFIErrorCoercionFailed;\r\t\t\t\tffiLastError = reason22;\r\t\t\t\treturn interpreterProxy->primitiveFail();\r\t\t\t}\r\t\t}\r\t\tif (!(isStruct)) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason14 = FFIErrorCoercionFailed;\r\t\t\tffiLastError = reason14;\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\treturn ffiPushPointerContentsOf(valueOop);\r\t}\r\tif (ffiArgHeader & FFIFlagAtomic) {\r\t\t/* begin ffiArgByValue: */\r\t\tatomicType2 = ((usqInt) (ffiArgHeader & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\r\t\tif ((atomicType2 < 0) || (atomicType2 > FFITypeDoubleFloat)) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason23 = FFIErrorBadAtomicType;\r\t\t\tffiLastError = reason23;\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\tgoto l4;\r\t\t}\r\t\tif (atomicType2 < FFITypeSingleFloat) {\r\t\t\tif ((((usqInt) atomicType2) >> 1) == (((usqInt) FFITypeSignedLongLong) >> 1)) {\r\t\t\t\tintValue = valueOop;\r\t\t\t} else {\r\t\t\t\t/* begin ffiIntegerValueOf: */\r\t\t\t\tif ((valueOop & 1)) {\r\t\t\t\t\tintValue = (valueOop >> 1);\r\t\t\t\t\tgoto l3;\r\t\t\t\t}\r\t\t\t\tif (valueOop == (interpreterProxy->nilObject())) {\r\t\t\t\t\tintValue = 0;\r\t\t\t\t\tgoto l3;\r\t\t\t\t}\r\t\t\t\tif (valueOop == (interpreterProxy->falseObject())) {\r\t\t\t\t\tintValue = 0;\r\t\t\t\t\tgoto l3;\r\t\t\t\t}\r\t\t\t\tif (valueOop == (interpreterProxy->trueObject())) {\r\t\t\t\t\tintValue = 1;\r\t\t\t\t\tgoto l3;\r\t\t\t\t}\r\t\t\t\toopClass2 = interpreterProxy->fetchClassOf(valueOop);\r\t\t\t\tif (oopClass2 == (interpreterProxy->classFloat())) {\r\t\t\t\t\tintValue = ((sqInt)(interpreterProxy->floatValueOf(valueOop)));\r\t\t\t\t\tgoto l3;\r\t\t\t\t}\r\t\t\t\tif (oopClass2 == (interpreterProxy->classCharacter())) {\r\t\t\t\t\tintValue = interpreterProxy->fetchIntegerofObject(0, valueOop);\r\t\t\t\t\tgoto l3;\r\t\t\t\t}\r\t\t\t\tif (oopClass2 == (interpreterProxy->classLargePositiveInteger())) {\r\t\t\t\t\tintValue = interpreterProxy->positive32BitValueOf(valueOop);\r\t\t\t\t\tgoto l3;\r\t\t\t\t}\r\t\t\t\tintValue = interpreterProxy->signed32BitValueOf(valueOop);\r\t\t\tl3:\t/* end ffiIntegerValueOf: */;\r\t\t\t}\r\t\t\tif (interpreterProxy->failed()) {\r\t\t\t\t/* begin ffiFail: */\r\t\t\t\treason110 = FFIErrorCoercionFailed;\r\t\t\t\tffiLastError = reason110;\r\t\t\t\tinterpreterProxy->primitiveFail();\r\t\t\t\tgoto l4;\r\t\t\t}\r\t\t\tswitch (atomicType2) {\r\t\t\tcase 0:\r\t\t\t\tffiFail(FFIErrorAttemptToPassVoid);\r\t\t\t\tbreak;\r\t\t\tcase 1:\r\t\t\t\tffiPushUnsignedInt(intValue);\r\t\t\t\tbreak;\r\t\t\tcase 2:\r\t\t\t\tffiPushUnsignedByte(intValue);\r\t\t\t\tbreak;\r\t\t\tcase 3:\r\t\t\t\tffiPushSignedByte(intValue);\r\t\t\t\tbreak;\r\t\t\tcase 4:\r\t\t\t\tffiPushUnsignedShort(intValue);\r\t\t\t\tbreak;\r\t\t\tcase 5:\r\t\t\t\tffiPushSignedShort(intValue);\r\t\t\t\tbreak;\r\t\t\tcase 6:\r\t\t\t\tffiPushUnsignedInt(intValue);\r\t\t\t\tbreak;\r\t\t\tcase 7:\r\t\t\t\tffiPushSignedInt(intValue);\r\t\t\t\tbreak;\r\t\t\tcase 8:\r\t\t\t\tffiPushUnsignedLongLongOop(intValue);\r\t\t\t\tbreak;\r\t\t\tcase 9:\r\t\t\t\tffiPushSignedLongLongOop(intValue);\r\t\t\t\tbreak;\r\t\t\tcase 10:\r\t\t\t\tffiPushUnsignedChar(intValue);\r\t\t\t\tbreak;\r\t\t\tcase 11:\r\t\t\t\tffiPushSignedChar(intValue);\r\t\t\t\tbreak;\r\t\t\t}\r\t\t} else {\r\t\t\t/* begin ffiFloatValueOf: */\r\t\t\toopClass1 = interpreterProxy->fetchClassOf(valueOop);\r\t\t\tif (oopClass1 == (interpreterProxy->classFloat())) {\r\t\t\t\tfloatValue = interpreterProxy->floatValueOf(valueOop);\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\t\tfloatValue = ((double) (ffiIntegerValueOf(valueOop)) );\r\t\tl2:\t/* end ffiFloatValueOf: */;\r\t\t\tif (interpreterProxy->failed()) {\r\t\t\t\t/* begin ffiFail: */\r\t\t\t\treason24 = FFIErrorCoercionFailed;\r\t\t\t\tffiLastError = reason24;\r\t\t\t\tinterpreterProxy->primitiveFail();\r\t\t\t\tgoto l4;\r\t\t\t}\r\t\t\tif (atomicType2 == FFITypeSingleFloat) {\r\t\t\t\tffiPushSingleFloat(floatValue);\r\t\t\t} else {\r\t\t\t\tffiPushDoubleFloat(floatValue);\r\t\t\t}\r\t\t}\r\tl4:\t/* end ffiArgByValue: */;\r\t\treturn 0;\r\t}\r\t/* begin ffiFail: */\r\treason15 = FFIErrorWrongType;\r\tffiLastError = reason15;\r\treturn interpreterProxy->primitiveFail();\r}\r\r\r/*\tSupport for generic callout. Prepare a pointer reference to an atomic type for callout. Note: for type 'void*' we allow either one of ByteArray/String/Symbol or wordVariableSubclass. */\r\rstatic sqInt ffiAtomicArgByReferenceClass(sqInt oop, sqInt oopClass) {\r    sqInt atomicType;\r    sqInt isString;\r    sqInt reason;\r    sqInt reason1;\r    sqInt reason2;\r\r\tatomicType = ((usqInt) (ffiArgHeader & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\r\tif (atomicType == FFITypeBool) {\r\t\t/* begin ffiFail: */\r\t\treason = FFIErrorCoercionFailed;\r\t\tffiLastError = reason;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tif ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSignedChar) >> 1)) {\r\r\t\t/* string value (char*) */\r\t\t/* note: the only types allowed for passing into char* types are\r\t\tByteArray, String, Symbol and *no* other byte indexed objects\r\t\t(e.g., CompiledMethod, LargeInteger). We only check for strings\r\t\there and fall through to the byte* check otherwise. */\r\r\t\tisString = interpreterProxy->includesBehaviorThatOf(oopClass, interpreterProxy->classString());\r\t\tif (isString) {\r\t\t\treturn ffiPushStringOfLength(((int) (interpreterProxy->firstIndexableField(oop))), interpreterProxy->byteSizeOf(oop));\r\t\t}\r\t\tatomicType = FFITypeUnsignedByte;\r\t}\r\tif ((atomicType == FFITypeVoid) || ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSignedByte) >> 1))) {\r\t\tif (oopClass == (interpreterProxy->classByteArray())) {\r\t\t\treturn ffiPushPointer(((int) (interpreterProxy->firstIndexableField(oop))));\r\t\t}\r\t\tisString = interpreterProxy->includesBehaviorThatOf(oopClass, interpreterProxy->classString());\r\t\tif (isString) {\r\t\t\treturn ffiPushPointer(((int) (interpreterProxy->firstIndexableField(oop))));\r\t\t}\r\t\tif (!(atomicType == FFITypeVoid)) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason1 = FFIErrorCoercionFailed;\r\t\t\tffiLastError = reason1;\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t}\r\tif ((atomicType <= FFITypeSignedInt) || (atomicType == FFITypeSingleFloat)) {\r\t\tif (interpreterProxy->isWords(oop)) {\r\t\t\treturn ffiPushPointer(((int) (interpreterProxy->firstIndexableField(oop))));\r\t\t}\r\t}\r\t/* begin ffiFail: */\r\treason2 = FFIErrorCoercionFailed;\r\tffiLastError = reason2;\r\treturn interpreterProxy->primitiveFail();\r}\r\r\r/*\tSupport for generic callout. Prepare an external pointer reference to an atomic type for callout. */\r\rstatic sqInt ffiAtomicStructByReferenceClass(sqInt oop, sqInt oopClass) {\r    sqInt atomicType;\r    sqInt valueOop;\r    sqInt reason;\r    sqInt ptrType;\r    sqInt spec;\r    sqInt specOop;\r    sqInt specType;\r    sqInt reason9;\r    sqInt reason1;\r    sqInt reason2;\r    sqInt reason3;\r    sqInt reason4;\r    sqInt reason5;\r    sqInt reason6;\r    sqInt reason7;\r    sqInt reason8;\r\r\tif (!(oopClass == (interpreterProxy->classExternalData()))) {\r\t\t/* begin ffiFail: */\r\t\treason = FFIErrorCoercionFailed;\r\t\tffiLastError = reason;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\r\t/* no type checks for void pointers */\r\r\tatomicType = ((usqInt) (ffiArgHeader & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\r\tif (atomicType != FFITypeVoid) {\r\t\t/* begin ffiValidateExternalData:AtomicType: */\r\t\tptrType = interpreterProxy->fetchPointerofObject(1, oop);\r\t\tif ((ptrType & 1)) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason9 = FFIErrorWrongType;\r\t\t\tffiLastError = reason9;\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\tgoto l1;\r\t\t}\r\t\tif (!(interpreterProxy->isPointers(ptrType))) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason1 = FFIErrorWrongType;\r\t\t\tffiLastError = reason1;\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\tgoto l1;\r\t\t}\r\t\tif ((interpreterProxy->slotSizeOf(ptrType)) < 2) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason2 = FFIErrorWrongType;\r\t\t\tffiLastError = reason2;\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\tgoto l1;\r\t\t}\r\t\tspecOop = interpreterProxy->fetchPointerofObject(0, ptrType);\r\t\tif ((specOop & 1)) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason3 = FFIErrorWrongType;\r\t\t\tffiLastError = reason3;\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\tgoto l1;\r\t\t}\r\t\tif (!(interpreterProxy->isWords(specOop))) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason4 = FFIErrorWrongType;\r\t\t\tffiLastError = reason4;\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\tgoto l1;\r\t\t}\r\t\tif ((interpreterProxy->slotSizeOf(specOop)) == 0) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason5 = FFIErrorWrongType;\r\t\t\tffiLastError = reason5;\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\tgoto l1;\r\t\t}\r\t\tspec = interpreterProxy->fetchPointerofObject(0, specOop);\r\t\tif (!(spec & FFIFlagAtomic)) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason6 = FFIErrorWrongType;\r\t\t\tffiLastError = reason6;\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\tgoto l1;\r\t\t}\r\t\tspecType = ((usqInt) (spec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\r\t\tif (specType != atomicType) {\r\t\t\tif (!((atomicType > FFITypeBool) && (atomicType < FFITypeSingleFloat))) {\r\t\t\t\t/* begin ffiFail: */\r\t\t\t\treason7 = FFIErrorCoercionFailed;\r\t\t\t\tffiLastError = reason7;\r\t\t\t\tinterpreterProxy->primitiveFail();\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t\tif (!((((usqInt) atomicType) >> 1) == (((usqInt) specType) >> 1))) {\r\t\t\t\t/* begin ffiFail: */\r\t\t\t\treason8 = FFIErrorCoercionFailed;\r\t\t\t\tffiLastError = reason8;\r\t\t\t\tinterpreterProxy->primitiveFail();\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t}\r\tl1:\t/* end ffiValidateExternalData:AtomicType: */;\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t}\r\tvalueOop = interpreterProxy->fetchPointerofObject(0, oop);\r\treturn ffiPushPointerContentsOf(valueOop);\r}\r\r\r/*\tGeneric callout. Does the actual work. */\r\rstatic sqInt ffiCallWithFlagsAndTypes(sqInt address, sqInt callType, sqInt argTypeArray) {\r    sqInt argClass;\r    sqInt argSpec;\r    sqInt argType;\r    sqInt argTypes;\r    sqInt i;\r    sqInt nArgs;\r    sqInt oop;\r    sqInt stackIndex;\r    sqInt reason;\r    sqInt reason1;\r    sqInt reason2;\r    sqInt reason3;\r    sqInt reason4;\r    sqInt reason5;\r    sqInt reason6;\r\r\tif (!(ffiSupportsCallingConvention(callType))) {\r\t\t/* begin ffiFail: */\r\t\treason = FFIErrorCallType;\r\t\tffiLastError = reason;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\r\t/* Fetch return type and args */\r\r\targTypes = argTypeArray;\r\targType = interpreterProxy->fetchPointerofObject(0, argTypes);\r\targSpec = interpreterProxy->fetchPointerofObject(0, argType);\r\targClass = interpreterProxy->fetchPointerofObject(1, argType);\r\t/* begin ffiCheckReturn:With: */\r\tif (!(argClass == (interpreterProxy->nilObject()))) {\r\t\tif (!(interpreterProxy->includesBehaviorThatOf(argClass, interpreterProxy->classExternalStructure()))) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason1 = FFIErrorBadReturn;\r\t\t\tffiLastError = reason1;\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\tgoto l1;\r\t\t}\r\t}\r\tffiRetClass = argClass;\r\tif ((argSpec & 1)) {\r\t\t/* begin ffiFail: */\r\t\treason2 = FFIErrorWrongType;\r\t\tffiLastError = reason2;\r\t\tinterpreterProxy->primitiveFail();\r\t\tgoto l1;\r\t}\r\tif (!(interpreterProxy->isWords(argSpec))) {\r\t\t/* begin ffiFail: */\r\t\treason3 = FFIErrorWrongType;\r\t\tffiLastError = reason3;\r\t\tinterpreterProxy->primitiveFail();\r\t\tgoto l1;\r\t}\r\tffiRetSpecSize = interpreterProxy->slotSizeOf(argSpec);\r\tif (ffiRetSpecSize == 0) {\r\t\t/* begin ffiFail: */\r\t\treason4 = FFIErrorWrongType;\r\t\tffiLastError = reason4;\r\t\tinterpreterProxy->primitiveFail();\r\t\tgoto l1;\r\t}\r\tffiRetSpec = ((int) (interpreterProxy->firstIndexableField(argSpec)));\r\tffiRetHeader = longAt(ffiRetSpec);\r\tif (!(ffiRetHeader & FFIFlagAtomic)) {\r\t\tif (ffiRetClass == (interpreterProxy->nilObject())) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason5 = FFIErrorBadReturn;\r\t\t\tffiLastError = reason5;\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\tgoto l1;\r\t\t}\r\t}\r\tif (!(ffiCanReturn(((int*) ffiRetSpec), ffiRetSpecSize))) {\r\t\t/* begin ffiFail: */\r\t\treason6 = FFIErrorBadReturn;\r\t\tffiLastError = reason6;\r\t\tinterpreterProxy->primitiveFail();\r\t}\rl1:\t/* end ffiCheckReturn:With: */;\r\tif (interpreterProxy->failed()) {\r\t\treturn 0;\r\t}\r\tffiRetOop = argType;\r\tnArgs = interpreterProxy->methodArgumentCount();\r\r\t/* stack index goes downwards */\r\r\tstackIndex = nArgs - 1;\r\tfor (i = 1; i <= nArgs; i += 1) {\r\t\targType = interpreterProxy->fetchPointerofObject(i, argTypes);\r\t\targSpec = interpreterProxy->fetchPointerofObject(0, argType);\r\t\targClass = interpreterProxy->fetchPointerofObject(1, argType);\r\t\toop = interpreterProxy->stackValue(stackIndex);\r\t\tffiArgumentSpecClass(oop, argSpec, argClass);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn 0;\r\t\t}\r\t\tstackIndex -= 1;\r\t}\r\treturn ffiCalloutToWithFlags(address, callType);\r}\r\r\r/*\tGeneric callout. Does the actual work. */\r\rstatic sqInt ffiCallWithFlagsArgsAndTypesOfSize(sqInt address, sqInt callType, sqInt argArray, sqInt argTypeArray, sqInt nArgs) {\r    sqInt argClass;\r    sqInt argSpec;\r    sqInt argType;\r    sqInt argTypes;\r    sqInt i;\r    sqInt oop;\r    sqInt reason;\r    sqInt reason1;\r    sqInt reason2;\r    sqInt reason3;\r    sqInt reason4;\r    sqInt reason5;\r    sqInt reason6;\r\r\tif (!(ffiSupportsCallingConvention(callType))) {\r\t\t/* begin ffiFail: */\r\t\treason = FFIErrorCallType;\r\t\tffiLastError = reason;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\r\t/* Fetch return type and args */\r\r\targTypes = argTypeArray;\r\targType = interpreterProxy->fetchPointerofObject(0, argTypes);\r\targSpec = interpreterProxy->fetchPointerofObject(0, argType);\r\targClass = interpreterProxy->fetchPointerofObject(1, argType);\r\t/* begin ffiCheckReturn:With: */\r\tif (!(argClass == (interpreterProxy->nilObject()))) {\r\t\tif (!(interpreterProxy->includesBehaviorThatOf(argClass, interpreterProxy->classExternalStructure()))) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason1 = FFIErrorBadReturn;\r\t\t\tffiLastError = reason1;\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\tgoto l1;\r\t\t}\r\t}\r\tffiRetClass = argClass;\r\tif ((argSpec & 1)) {\r\t\t/* begin ffiFail: */\r\t\treason2 = FFIErrorWrongType;\r\t\tffiLastError = reason2;\r\t\tinterpreterProxy->primitiveFail();\r\t\tgoto l1;\r\t}\r\tif (!(interpreterProxy->isWords(argSpec))) {\r\t\t/* begin ffiFail: */\r\t\treason3 = FFIErrorWrongType;\r\t\tffiLastError = reason3;\r\t\tinterpreterProxy->primitiveFail();\r\t\tgoto l1;\r\t}\r\tffiRetSpecSize = interpreterProxy->slotSizeOf(argSpec);\r\tif (ffiRetSpecSize == 0) {\r\t\t/* begin ffiFail: */\r\t\treason4 = FFIErrorWrongType;\r\t\tffiLastError = reason4;\r\t\tinterpreterProxy->primitiveFail();\r\t\tgoto l1;\r\t}\r\tffiRetSpec = ((int) (interpreterProxy->firstIndexableField(argSpec)));\r\tffiRetHeader = longAt(ffiRetSpec);\r\tif (!(ffiRetHeader & FFIFlagAtomic)) {\r\t\tif (ffiRetClass == (interpreterProxy->nilObject())) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason5 = FFIErrorBadReturn;\r\t\t\tffiLastError = reason5;\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\tgoto l1;\r\t\t}\r\t}\r\tif (!(ffiCanReturn(((int*) ffiRetSpec), ffiRetSpecSize))) {\r\t\t/* begin ffiFail: */\r\t\treason6 = FFIErrorBadReturn;\r\t\tffiLastError = reason6;\r\t\tinterpreterProxy->primitiveFail();\r\t}\rl1:\t/* end ffiCheckReturn:With: */;\r\tif (interpreterProxy->failed()) {\r\t\treturn 0;\r\t}\r\tffiRetOop = argType;\r\tfor (i = 1; i <= nArgs; i += 1) {\r\t\targType = interpreterProxy->fetchPointerofObject(i, argTypes);\r\t\targSpec = interpreterProxy->fetchPointerofObject(0, argType);\r\t\targClass = interpreterProxy->fetchPointerofObject(1, argType);\r\t\toop = interpreterProxy->fetchPointerofObject(i - 1, argArray);\r\t\tffiArgumentSpecClass(oop, argSpec, argClass);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn 0;\r\t\t}\r\t}\r\treturn ffiCalloutToWithFlags(address, callType);\r}\r\r\r/*\tGo out, call this guy and create the return value */\r\rstatic sqInt ffiCalloutToWithFlags(sqInt address, sqInt callType) {\r    sqInt retVal;\r    sqInt oop;\r    sqInt retOop;\r    sqInt structSize;\r    sqInt atomicType;\r    sqInt oop1;\r    sqInt retOop1;\r    sqInt atomicType1;\r    sqInt byteSize;\r    sqInt mask;\r    sqInt shift;\r    sqInt value;\r\r\tif (ffiRetHeader & FFIFlagPointer) {\r\r\t\t/* Note: Order is important here since FFIFlagPointer + FFIFlagStructure is used to represent 'typedef void* VoidPointer' and VoidPointer must be returned as pointer *not* as struct */\r\r\t\tretVal = ffiCallAddressOfWithPointerReturn(address, callType);\r\t\treturn ffiCreateReturnPointer(retVal);\r\t}\r\tif (ffiRetHeader & FFIFlagStructure) {\r\t\tffiCallAddressOfWithStructReturn(address, callType, ((int*) ffiRetSpec), ffiRetSpecSize);\r\t\t/* begin ffiCreateReturnStruct */\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn null;\r\t\t}\r\t\tinterpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);\r\t\tstructSize = ffiRetHeader & FFIStructSizeMask;\r\t\tinterpreterProxy->pushRemappableOop(ffiRetClass);\r\t\toop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), structSize);\r\t\tffiStoreStructure(((int) (interpreterProxy->firstIndexableField(oop))), structSize);\r\t\tffiRetClass = interpreterProxy->popRemappableOop();\r\t\tinterpreterProxy->pushRemappableOop(oop);\r\t\tretOop = interpreterProxy->instantiateClassindexableSize(ffiRetClass, 0);\r\t\toop = interpreterProxy->popRemappableOop();\r\t\tinterpreterProxy->storePointerofObjectwithValue(0, retOop, oop);\r\t\treturn interpreterProxy->push(retOop);\r\t}\r\tretVal = ffiCallAddressOfWithReturnType(address, callType, ffiRetHeader);\r\t/* begin ffiCreateReturn: */\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tatomicType = ((usqInt) (ffiRetHeader & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\r\tif (atomicType <= FFITypeVoid) {\r\t\treturn interpreterProxy->pop(interpreterProxy->methodArgumentCount());\r\t}\r\tinterpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);\r\tinterpreterProxy->pushRemappableOop(ffiRetClass);\r\t/* begin ffiCreateReturnOop: */\r\tatomicType1 = ((usqInt) (ffiRetHeader & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\r\tif (atomicType1 == FFITypeBool) {\r\t\tbyteSize = ffiRetHeader & FFIStructSizeMask;\r\t\tif (byteSize == 4) {\r\t\t\tvalue = retVal;\r\t\t} else {\r\t\t\tvalue = retVal & ((1 << (byteSize * 8)) - 1);\r\t\t}\r\t\tif (value == 0) {\r\t\t\tretOop1 = interpreterProxy->falseObject();\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\tretOop1 = interpreterProxy->trueObject();\r\t\t\tgoto l1;\r\t\t}\r\t}\r\tif (atomicType1 <= FFITypeSignedInt) {\r\t\tif (atomicType1 <= FFITypeSignedShort) {\r\t\t\tshift = (((usqInt) atomicType1) >> 1) * 8;\r\t\t\tvalue = retVal & ((1 << shift) - 1);\r\t\t\tif (atomicType1 & 1) {\r\t\t\t\tmask = 1 << (shift - 1);\r\t\t\t\tvalue = (value & (mask - 1)) - (value & mask);\r\t\t\t}\r\t\t\tretOop1 = ((value << 1) | 1);\r\t\t\tgoto l1;\r\t\t}\r\t\tif (atomicType1 & 1) {\r\t\t\tretOop1 = interpreterProxy->signed32BitIntegerFor(retVal);\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\tretOop1 = interpreterProxy->positive32BitIntegerFor(retVal);\r\t\t\tgoto l1;\r\t\t}\r\t}\r\tif (atomicType1 < FFITypeSingleFloat) {\r\t\tif ((((usqInt) atomicType1) >> 1) == (((usqInt) FFITypeSignedLongLong) >> 1)) {\r\t\t\tretOop1 = ffiCreateLongLongReturn(atomicType1 & 1);\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\tretOop1 = interpreterProxy->fetchPointerofObject(retVal & 255, interpreterProxy->characterTable());\r\t\t\tgoto l1;\r\t\t}\r\t}\r\tretOop1 = interpreterProxy->floatObjectOf(ffiReturnFloatValue());\rl1:\t/* end ffiCreateReturnOop: */;\r\tffiRetClass = interpreterProxy->popRemappableOop();\r\tif (ffiRetClass == (interpreterProxy->nilObject())) {\r\t\treturn interpreterProxy->push(retOop1);\r\t}\r\tinterpreterProxy->pushRemappableOop(retOop1);\r\tretOop1 = interpreterProxy->instantiateClassindexableSize(ffiRetClass, 0);\r\toop1 = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(0, retOop1, oop1);\r\treturn interpreterProxy->push(retOop1);\r}\r\r\r/*\tMake sure we can return an object of the given type */\r\rstatic sqInt ffiCheckReturnWith(sqInt retSpec, sqInt retClass) {\r    sqInt reason;\r    sqInt reason1;\r    sqInt reason2;\r    sqInt reason3;\r    sqInt reason4;\r    sqInt reason5;\r\r\tif (!(retClass == (interpreterProxy->nilObject()))) {\r\t\tif (!(interpreterProxy->includesBehaviorThatOf(retClass, interpreterProxy->classExternalStructure()))) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason = FFIErrorBadReturn;\r\t\t\tffiLastError = reason;\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t}\r\tffiRetClass = retClass;\r\tif ((retSpec & 1)) {\r\t\t/* begin ffiFail: */\r\t\treason1 = FFIErrorWrongType;\r\t\tffiLastError = reason1;\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isWords(retSpec))) {\r\t\t/* begin ffiFail: */\r\t\treason2 = FFIErrorWrongType;\r\t\tffiLastError = reason2;\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tffiRetSpecSize = interpreterProxy->slotSizeOf(retSpec);\r\tif (ffiRetSpecSize == 0) {\r\t\t/* begin ffiFail: */\r\t\treason3 = FFIErrorWrongType;\r\t\tffiLastError = reason3;\r\t\tinterpreterProxy->primitiveFail();\r\t\treturn null;\r\t}\r\tffiRetSpec = ((int) (interpreterProxy->firstIndexableField(retSpec)));\r\tffiRetHeader = longAt(ffiRetSpec);\r\tif (!(ffiRetHeader & FFIFlagAtomic)) {\r\t\tif (ffiRetClass == (interpreterProxy->nilObject())) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason4 = FFIErrorBadReturn;\r\t\t\tffiLastError = reason4;\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t}\r\tif (!(ffiCanReturn(((int*) ffiRetSpec), ffiRetSpecSize))) {\r\t\t/* begin ffiFail: */\r\t\treason5 = FFIErrorBadReturn;\r\t\tffiLastError = reason5;\r\t\tinterpreterProxy->primitiveFail();\r\t}\r\treturn 0;\r}\r\r\r/*\tMake sure that the given oop is a valid external handle */\r\rstatic sqInt ffiContentsOfHandleerrCode(sqInt oop, sqInt errCode) {\r\tif ((oop & 1)) {\r\t\t/* begin ffiFail: */\r\t\tffiLastError = errCode;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tif (!(interpreterProxy->isBytes(oop))) {\r\t\t/* begin ffiFail: */\r\t\tffiLastError = errCode;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tif (!((interpreterProxy->byteSizeOf(oop)) == 4)) {\r\t\t/* begin ffiFail: */\r\t\tffiLastError = errCode;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\treturn interpreterProxy->fetchPointerofObject(0, oop);\r}\r\r\r/*\tCreate a longlong return value from a previous call out */\r\rstatic sqInt ffiCreateLongLongReturn(sqInt isSigned) {\r    sqInt highWord;\r    sqInt i;\r    sqInt largeClass;\r    sqInt largeInt;\r    sqInt lowWord;\r    sqInt nBytes;\r    unsigned char *ptr;\r    sqInt reason;\r\r\tlowWord = ffiLongLongResultLow();\r\thighWord = ffiLongLongResultHigh();\r\tif (isSigned) {\r\t\tif ((highWord == 0) && (lowWord >= 0)) {\r\t\t\treturn interpreterProxy->signed32BitIntegerFor(lowWord);\r\t\t}\r\t\tif ((highWord == -1) && (lowWord < 0)) {\r\t\t\treturn interpreterProxy->signed32BitIntegerFor(lowWord);\r\t\t}\r\t\tif (highWord < 0) {\r\t\t\tlargeClass = interpreterProxy->classLargeNegativeInteger();\r\t\t\tlowWord = ~lowWord;\r\t\t\thighWord = ~highWord;\r\t\t\tif (lowWord == -1) {\r\r\t\t\t\t/* e.g., overflow when adding one */\r\r\t\t\t\thighWord += 1;\r\t\t\t}\r\t\t\tlowWord += 1;\r\t\t} else {\r\t\t\tlargeClass = interpreterProxy->classLargePositiveInteger();\r\t\t}\r\t} else {\r\t\tif (highWord == 0) {\r\t\t\treturn interpreterProxy->positive32BitIntegerFor(lowWord);\r\t\t}\r\t\tlargeClass = interpreterProxy->classLargePositiveInteger();\r\t}\r\tnBytes = 8;\r\tif (!(highWord & (255 << 24))) {\r\t\tnBytes = 7;\r\t\tif (highWord < (1 << 16)) {\r\t\t\tnBytes = 6;\r\t\t}\r\t\tif (highWord < (1 << 8)) {\r\t\t\tnBytes = 5;\r\t\t}\r\t\tif (highWord == 0) {\r\t\t\tnBytes = 4;\r\t\t}\r\t}\r\tlargeInt = interpreterProxy->instantiateClassindexableSize(largeClass, nBytes);\r\tif (!(interpreterProxy->isBytes(largeInt))) {\r\t\t/* begin ffiFail: */\r\t\treason = FFIErrorBadReturn;\r\t\tffiLastError = reason;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tptr = interpreterProxy->firstIndexableField(largeInt);\r\tfor (i = 4; i <= (nBytes - 1); i += 1) {\r\t\tptr[i] = ((((usqInt) highWord) >> ((i - 4) * 8)) & 255);\r\t}\r\tptr[3] = ((((usqInt) lowWord) >> 24) & 255);\r\tptr[2] = ((((usqInt) lowWord) >> 16) & 255);\r\tptr[1] = ((((usqInt) lowWord) >> 8) & 255);\r\tptr[0] = (lowWord & 255);\r\treturn largeInt;\r}\r\r\r/*\tGeneric callout support. Create an atomic return value from an external function call */\r\rstatic sqInt ffiCreateReturn(sqInt retVal) {\r    sqInt atomicType;\r    sqInt oop;\r    sqInt retOop;\r    sqInt atomicType1;\r    sqInt byteSize;\r    sqInt mask;\r    sqInt shift;\r    sqInt value;\r\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\r\t/* void returns self */\r\r\tatomicType = ((usqInt) (ffiRetHeader & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\r\tif (atomicType <= FFITypeVoid) {\r\t\treturn interpreterProxy->pop(interpreterProxy->methodArgumentCount());\r\t}\r\tinterpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);\r\tinterpreterProxy->pushRemappableOop(ffiRetClass);\r\t/* begin ffiCreateReturnOop: */\r\tatomicType1 = ((usqInt) (ffiRetHeader & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\r\tif (atomicType1 == FFITypeBool) {\r\t\tbyteSize = ffiRetHeader & FFIStructSizeMask;\r\t\tif (byteSize == 4) {\r\t\t\tvalue = retVal;\r\t\t} else {\r\t\t\tvalue = retVal & ((1 << (byteSize * 8)) - 1);\r\t\t}\r\t\tif (value == 0) {\r\t\t\tretOop = interpreterProxy->falseObject();\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\tretOop = interpreterProxy->trueObject();\r\t\t\tgoto l1;\r\t\t}\r\t}\r\tif (atomicType1 <= FFITypeSignedInt) {\r\t\tif (atomicType1 <= FFITypeSignedShort) {\r\t\t\tshift = (((usqInt) atomicType1) >> 1) * 8;\r\t\t\tvalue = retVal & ((1 << shift) - 1);\r\t\t\tif (atomicType1 & 1) {\r\t\t\t\tmask = 1 << (shift - 1);\r\t\t\t\tvalue = (value & (mask - 1)) - (value & mask);\r\t\t\t}\r\t\t\tretOop = ((value << 1) | 1);\r\t\t\tgoto l1;\r\t\t}\r\t\tif (atomicType1 & 1) {\r\t\t\tretOop = interpreterProxy->signed32BitIntegerFor(retVal);\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\tretOop = interpreterProxy->positive32BitIntegerFor(retVal);\r\t\t\tgoto l1;\r\t\t}\r\t}\r\tif (atomicType1 < FFITypeSingleFloat) {\r\t\tif ((((usqInt) atomicType1) >> 1) == (((usqInt) FFITypeSignedLongLong) >> 1)) {\r\t\t\tretOop = ffiCreateLongLongReturn(atomicType1 & 1);\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\tretOop = interpreterProxy->fetchPointerofObject(retVal & 255, interpreterProxy->characterTable());\r\t\t\tgoto l1;\r\t\t}\r\t}\r\tretOop = interpreterProxy->floatObjectOf(ffiReturnFloatValue());\rl1:\t/* end ffiCreateReturnOop: */;\r\tffiRetClass = interpreterProxy->popRemappableOop();\r\tif (ffiRetClass == (interpreterProxy->nilObject())) {\r\t\treturn interpreterProxy->push(retOop);\r\t}\r\tinterpreterProxy->pushRemappableOop(retOop);\r\tretOop = interpreterProxy->instantiateClassindexableSize(ffiRetClass, 0);\r\toop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(0, retOop, oop);\r\treturn interpreterProxy->push(retOop);\r}\r\r\r/*\tCallout support. Return the appropriate oop for the given atomic value */\r\rstatic sqInt ffiCreateReturnOop(sqInt retVal) {\r    sqInt atomicType;\r    sqInt byteSize;\r    sqInt mask;\r    sqInt shift;\r    sqInt value;\r\r\tatomicType = ((usqInt) (ffiRetHeader & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\r\tif (atomicType == FFITypeBool) {\r\r\t\t/* Make sure bool honors the byte size requested */\r\r\t\tbyteSize = ffiRetHeader & FFIStructSizeMask;\r\t\tif (byteSize == 4) {\r\t\t\tvalue = retVal;\r\t\t} else {\r\t\t\tvalue = retVal & ((1 << (byteSize * 8)) - 1);\r\t\t}\r\t\tif (value == 0) {\r\t\t\treturn interpreterProxy->falseObject();\r\t\t} else {\r\t\t\treturn interpreterProxy->trueObject();\r\t\t}\r\t}\r\tif (atomicType <= FFITypeSignedInt) {\r\t\tif (atomicType <= FFITypeSignedShort) {\r\r\t\t\t/* these are all generall integer returns */\r\t\t\t/* byte/short. first extract partial word, then sign extend */\r\t\t\t/* # of significant bits */\r\r\t\t\tshift = (((usqInt) atomicType) >> 1) * 8;\r\t\t\tvalue = retVal & ((1 << shift) - 1);\r\t\t\tif (atomicType & 1) {\r\r\t\t\t\t/* make the guy signed */\r\r\t\t\t\tmask = 1 << (shift - 1);\r\t\t\t\tvalue = (value & (mask - 1)) - (value & mask);\r\t\t\t}\r\t\t\treturn ((value << 1) | 1);\r\t\t}\r\t\tif (atomicType & 1) {\r\t\t\treturn interpreterProxy->signed32BitIntegerFor(retVal);\r\t\t} else {\r\t\t\treturn interpreterProxy->positive32BitIntegerFor(retVal);\r\t\t}\r\t}\r\tif (atomicType < FFITypeSingleFloat) {\r\t\tif ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSignedLongLong) >> 1)) {\r\t\t\treturn ffiCreateLongLongReturn(atomicType & 1);\r\t\t} else {\r\t\t\treturn interpreterProxy->fetchPointerofObject(retVal & 255, interpreterProxy->characterTable());\r\t\t}\r\t}\r\treturn interpreterProxy->floatObjectOf(ffiReturnFloatValue());\r}\r\r\r/*\tGeneric callout support. Create a pointer return value from an external function call */\r\rstatic sqInt ffiCreateReturnPointer(sqInt retVal) {\r    sqInt atomicType;\r    sqInt classOop;\r    sqInt oop;\r    int *ptr;\r    sqInt retOop;\r\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);\r\tif (ffiRetClass == (interpreterProxy->nilObject())) {\r\r\t\t/* Create ExternalData upon return */\r\r\t\tatomicType = ((usqInt) (ffiRetHeader & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\r\t\tif ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSignedChar) >> 1)) {\r\t\t\treturn ffiReturnCStringFrom(retVal);\r\t\t}\r\t\tinterpreterProxy->pushRemappableOop(ffiRetOop);\r\t\toop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classExternalAddress(), 4);\r\t\tptr = interpreterProxy->firstIndexableField(oop);\r\t\tptr[0] = retVal;\r\t\tinterpreterProxy->pushRemappableOop(oop);\r\t\tretOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classExternalData(), 0);\r\r\t\t/* external address */\r\r\t\toop = interpreterProxy->popRemappableOop();\r\t\tinterpreterProxy->storePointerofObjectwithValue(0, retOop, oop);\r\r\t\t/* return type */\r\r\t\toop = interpreterProxy->popRemappableOop();\r\t\tinterpreterProxy->storePointerofObjectwithValue(1, retOop, oop);\r\t\treturn interpreterProxy->push(retOop);\r\t}\r\tinterpreterProxy->pushRemappableOop(ffiRetClass);\r\tif (ffiRetHeader & FFIFlagStructure) {\r\t\tclassOop = interpreterProxy->classByteArray();\r\t} else {\r\t\tclassOop = interpreterProxy->classExternalAddress();\r\t}\r\toop = interpreterProxy->instantiateClassindexableSize(classOop, 4);\r\tptr = interpreterProxy->firstIndexableField(oop);\r\tptr[0] = retVal;\r\r\t/* return class */\r\r\tffiRetClass = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->pushRemappableOop(oop);\r\tretOop = interpreterProxy->instantiateClassindexableSize(ffiRetClass, 0);\r\r\t/* external address */\r\r\toop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(0, retOop, oop);\r\treturn interpreterProxy->push(retOop);\r}\r\r\r/*\tGeneric callout support. Create a structure return value from an external function call */\r\rstatic sqInt ffiCreateReturnStruct(void) {\r    sqInt oop;\r    sqInt retOop;\r    sqInt structSize;\r\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tinterpreterProxy->pop((interpreterProxy->methodArgumentCount()) + 1);\r\tstructSize = ffiRetHeader & FFIStructSizeMask;\r\tinterpreterProxy->pushRemappableOop(ffiRetClass);\r\toop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), structSize);\r\tffiStoreStructure(((int) (interpreterProxy->firstIndexableField(oop))), structSize);\r\tffiRetClass = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->pushRemappableOop(oop);\r\tretOop = interpreterProxy->instantiateClassindexableSize(ffiRetClass, 0);\r\toop = interpreterProxy->popRemappableOop();\r\tinterpreterProxy->storePointerofObjectwithValue(0, retOop, oop);\r\treturn interpreterProxy->push(retOop);\r}\r\rstatic sqInt ffiFail(sqInt reason) {\r\tffiLastError = reason;\r\treturn interpreterProxy->primitiveFail();\r}\r\r\r/*\tSupport for generic callout. Return a float value that is coerced as C would do. */\r\rstatic double ffiFloatValueOf(sqInt oop) {\r    sqInt oopClass;\r\r\toopClass = interpreterProxy->fetchClassOf(oop);\r\tif (oopClass == (interpreterProxy->classFloat())) {\r\t\treturn interpreterProxy->floatValueOf(oop);\r\t}\r\treturn ((double) (ffiIntegerValueOf(oop)) );\r}\r\rstatic sqInt ffiGetLastError(void) {\r\treturn ffiLastError;\r}\r\r\r/*\tSupport for generic callout. Return an integer value that is coerced as C would do. */\r\rstatic sqInt ffiIntegerValueOf(sqInt oop) {\r    sqInt oopClass;\r\r\tif ((oop & 1)) {\r\t\treturn (oop >> 1);\r\t}\r\tif (oop == (interpreterProxy->nilObject())) {\r\t\treturn 0;\r\t}\r\tif (oop == (interpreterProxy->falseObject())) {\r\t\treturn 0;\r\t}\r\tif (oop == (interpreterProxy->trueObject())) {\r\t\treturn 1;\r\t}\r\toopClass = interpreterProxy->fetchClassOf(oop);\r\tif (oopClass == (interpreterProxy->classFloat())) {\r\t\treturn ((sqInt)(interpreterProxy->floatValueOf(oop)));\r\t}\r\tif (oopClass == (interpreterProxy->classCharacter())) {\r\t\treturn interpreterProxy->fetchIntegerofObject(0, oop);\r\t}\r\tif (oopClass == (interpreterProxy->classLargePositiveInteger())) {\r\t\treturn interpreterProxy->positive32BitValueOf(oop);\r\t}\r\treturn interpreterProxy->signed32BitValueOf(oop);\r}\r\r\r/*\tLoad the address of the foreign function from the given object */\r\rstatic sqInt ffiLoadCalloutAddress(sqInt lit) {\r    sqInt address;\r    sqInt addressPtr;\r    int *ptr;\r    sqInt errCode;\r    sqInt reason;\r\r\r\t/* Lookup the address */\r\t/* Make sure it's an external handle */\r\r\taddressPtr = interpreterProxy->fetchPointerofObject(0, lit);\r\t/* begin ffiContentsOfHandle:errCode: */\r\terrCode = FFIErrorBadAddress;\r\tif ((addressPtr & 1)) {\r\t\t/* begin ffiFail: */\r\t\tffiLastError = errCode;\r\t\taddress = interpreterProxy->primitiveFail();\r\t\tgoto l1;\r\t}\r\tif (!(interpreterProxy->isBytes(addressPtr))) {\r\t\t/* begin ffiFail: */\r\t\tffiLastError = errCode;\r\t\taddress = interpreterProxy->primitiveFail();\r\t\tgoto l1;\r\t}\r\tif (!((interpreterProxy->byteSizeOf(addressPtr)) == 4)) {\r\t\t/* begin ffiFail: */\r\t\tffiLastError = errCode;\r\t\taddress = interpreterProxy->primitiveFail();\r\t\tgoto l1;\r\t}\r\taddress = interpreterProxy->fetchPointerofObject(0, addressPtr);\rl1:\t/* end ffiContentsOfHandle:errCode: */;\r\tif (interpreterProxy->failed()) {\r\t\treturn 0;\r\t}\r\tif (address == 0) {\r\t\tif ((interpreterProxy->slotSizeOf(lit)) < 5) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason = FFIErrorNoModule;\r\t\t\tffiLastError = reason;\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\taddress = ffiLoadCalloutAddressFrom(lit);\r\t\tif (interpreterProxy->failed()) {\r\t\t\treturn 0;\r\t\t}\r\t\tptr = interpreterProxy->firstIndexableField(addressPtr);\r\t\tptr[0] = address;\r\t}\r\treturn address;\r}\r\r\r/*\tLoad the function address for a call out to an external function */\r\rstatic sqInt ffiLoadCalloutAddressFrom(sqInt oop) {\r    sqInt address;\r    sqInt functionLength;\r    sqInt functionName;\r    sqInt module;\r    sqInt moduleHandle;\r    sqInt reason;\r    sqInt reason1;\r\r\r\t/* First find and load the module */\r\r\tmodule = interpreterProxy->fetchPointerofObject(4, oop);\r\tmoduleHandle = ffiLoadCalloutModule(module);\r\tif (interpreterProxy->failed()) {\r\t\treturn 0;\r\t}\r\tfunctionName = interpreterProxy->fetchPointerofObject(3, oop);\r\tif (!(interpreterProxy->isBytes(functionName))) {\r\t\t/* begin ffiFail: */\r\t\treason = FFIErrorBadExternalFunction;\r\t\tffiLastError = reason;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tfunctionLength = interpreterProxy->byteSizeOf(functionName);\r\taddress = interpreterProxy->ioLoadSymbolOfLengthFromModule(((int) (interpreterProxy->firstIndexableField(functionName))), functionLength, moduleHandle);\r\tif ((interpreterProxy->failed()) || (address == 0)) {\r\t\t/* begin ffiFail: */\r\t\treason1 = FFIErrorAddressNotFound;\r\t\tffiLastError = reason1;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\treturn address;\r}\r\r\r/*\tLoad the given module and return its handle */\r\rstatic sqInt ffiLoadCalloutModule(sqInt module) {\r    sqInt ffiModuleName;\r    sqInt moduleHandle;\r    sqInt moduleHandlePtr;\r    sqInt moduleLength;\r    int *ptr;\r    sqInt rcvr;\r    sqInt theClass;\r    sqInt errCode;\r    sqInt reason;\r    sqInt reason1;\r    sqInt reason2;\r\r\tif (interpreterProxy->isBytes(module)) {\r\r\t\t/* plain module name */\r\r\t\tffiModuleName = module;\r\t\tmoduleLength = interpreterProxy->byteSizeOf(ffiModuleName);\r\t\tmoduleHandle = interpreterProxy->ioLoadModuleOfLength(((int) (interpreterProxy->firstIndexableField(ffiModuleName))), moduleLength);\r\t\tif (interpreterProxy->failed()) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason = FFIErrorModuleNotFound;\r\t\t\tffiLastError = reason;\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\treturn moduleHandle;\r\t}\r\trcvr = interpreterProxy->stackValue(interpreterProxy->methodArgumentCount());\r\ttheClass = interpreterProxy->fetchClassOf(rcvr);\r\tif (!(interpreterProxy->includesBehaviorThatOf(theClass, interpreterProxy->classExternalLibrary()))) {\r\t\treturn 0;\r\t}\r\tmoduleHandlePtr = interpreterProxy->fetchPointerofObject(0, rcvr);\r\t/* begin ffiContentsOfHandle:errCode: */\r\terrCode = FFIErrorBadExternalLibrary;\r\tif ((moduleHandlePtr & 1)) {\r\t\t/* begin ffiFail: */\r\t\tffiLastError = errCode;\r\t\tmoduleHandle = interpreterProxy->primitiveFail();\r\t\tgoto l1;\r\t}\r\tif (!(interpreterProxy->isBytes(moduleHandlePtr))) {\r\t\t/* begin ffiFail: */\r\t\tffiLastError = errCode;\r\t\tmoduleHandle = interpreterProxy->primitiveFail();\r\t\tgoto l1;\r\t}\r\tif (!((interpreterProxy->byteSizeOf(moduleHandlePtr)) == 4)) {\r\t\t/* begin ffiFail: */\r\t\tffiLastError = errCode;\r\t\tmoduleHandle = interpreterProxy->primitiveFail();\r\t\tgoto l1;\r\t}\r\tmoduleHandle = interpreterProxy->fetchPointerofObject(0, moduleHandlePtr);\rl1:\t/* end ffiContentsOfHandle:errCode: */;\r\tif (interpreterProxy->failed()) {\r\t\treturn 0;\r\t}\r\tif (moduleHandle == 0) {\r\r\t\t/* need to reload module */\r\r\t\tffiModuleName = interpreterProxy->fetchPointerofObject(1, rcvr);\r\t\tif (!(interpreterProxy->isBytes(ffiModuleName))) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason1 = FFIErrorBadExternalLibrary;\r\t\t\tffiLastError = reason1;\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\tmoduleLength = interpreterProxy->byteSizeOf(ffiModuleName);\r\t\tmoduleHandle = interpreterProxy->ioLoadModuleOfLength(((int) (interpreterProxy->firstIndexableField(ffiModuleName))), moduleLength);\r\t\tif (interpreterProxy->failed()) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason2 = FFIErrorModuleNotFound;\r\t\t\tffiLastError = reason2;\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\tptr = interpreterProxy->firstIndexableField(moduleHandlePtr);\r\t\tptr[0] = moduleHandle;\r\t}\r\treturn moduleHandle;\r}\r\r\r/*\tPush the contents of the given external structure */\r\rstatic sqInt ffiPushPointerContentsOf(sqInt oop) {\r    sqInt ptrAddress;\r    sqInt ptrClass;\r    sqInt ptrValue;\r    sqInt reason;\r    sqInt reason1;\r\r\tptrValue = oop;\r\tptrClass = interpreterProxy->fetchClassOf(ptrValue);\r\tif (ptrClass == (interpreterProxy->classExternalAddress())) {\r\r\t\t/* Don't you dare to pass pointers into object memory */\r\r\t\tptrAddress = interpreterProxy->fetchPointerofObject(0, ptrValue);\r\t\tif (interpreterProxy->isInMemory(ptrAddress)) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason = FFIErrorInvalidPointer;\r\t\t\tffiLastError = reason;\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\treturn ffiPushPointer(ptrAddress);\r\t}\r\tif (ptrClass == (interpreterProxy->classByteArray())) {\r\t\tptrAddress = ((int) (interpreterProxy->firstIndexableField(ptrValue)));\r\t\treturn ffiPushPointer(ptrAddress);\r\t}\r\t/* begin ffiFail: */\r\treason1 = FFIErrorBadArg;\r\tffiLastError = reason1;\r\treturn interpreterProxy->primitiveFail();\r}\r\r\r/*\tPush a longlong type (e.g., a 64bit integer).\r\tNote: Coercions from float are *not* supported. */\r\rstatic sqInt ffiPushSignedLongLongOop(sqInt oop) {\r    sqInt highWord;\r    sqInt i;\r    sqInt length;\r    sqInt lowWord;\r    sqInt negative;\r    sqInt oopClass;\r    unsigned char *ptr;\r    sqInt reason;\r    sqInt reason1;\r    sqInt reason2;\r\r\tif (oop == (interpreterProxy->nilObject())) {\r\t\treturn ffiPushSignedLongLong(0, 0);\r\t}\r\tif (oop == (interpreterProxy->falseObject())) {\r\t\treturn ffiPushSignedLongLong(0, 0);\r\t}\r\tif (oop == (interpreterProxy->trueObject())) {\r\t\treturn ffiPushSignedLongLong(0, 1);\r\t}\r\tif ((oop & 1)) {\r\t\tlowWord = (oop >> 1);\r\t\tif (lowWord < 0) {\r\t\t\thighWord = -1;\r\t\t} else {\r\t\t\thighWord = 0;\r\t\t}\r\t} else {\r\t\toopClass = interpreterProxy->fetchClassOf(oop);\r\t\tif (oopClass == (interpreterProxy->classLargePositiveInteger())) {\r\t\t\tnegative = 0;\r\t\t} else {\r\t\t\tif (oopClass == (interpreterProxy->classLargeNegativeInteger())) {\r\t\t\t\tnegative = 1;\r\t\t\t} else {\r\t\t\t\t/* begin ffiFail: */\r\t\t\t\treason = FFIErrorCoercionFailed;\r\t\t\t\tffiLastError = reason;\r\t\t\t\treturn interpreterProxy->primitiveFail();\r\t\t\t}\r\t\t}\r\t\tif (!(interpreterProxy->isBytes(oop))) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason1 = FFIErrorCoercionFailed;\r\t\t\tffiLastError = reason1;\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\tlength = interpreterProxy->byteSizeOf(oop);\r\t\tif (length > 8) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason2 = FFIErrorCoercionFailed;\r\t\t\tffiLastError = reason2;\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\tlowWord = highWord = 0;\r\t\tptr = interpreterProxy->firstIndexableField(oop);\r\t\tfor (i = 0; i <= ((((length < 4) ? length : 4)) - 1); i += 1) {\r\t\t\tlowWord += (ptr[i]) << (i * 8);\r\t\t}\r\t\tfor (i = 0; i <= (length - 5); i += 1) {\r\t\t\thighWord += (ptr[i + 4]) << (i * 8);\r\t\t}\r\t\tif (negative) {\r\t\t\tlowWord = ~lowWord;\r\t\t\thighWord = ~highWord;\r\t\t\tif (lowWord == -1) {\r\r\t\t\t\t/* e.g., will overflow when adding one */\r\r\t\t\t\thighWord += 1;\r\t\t\t}\r\t\t\tlowWord += 1;\r\t\t}\r\t}\r\treturn ffiPushSignedLongLong(lowWord, highWord);\r}\r\r\r/*\tPush the contents of the given external structure */\r\rstatic sqInt ffiPushStructureContentsOf(sqInt oop) {\r    sqInt ptrAddress;\r    sqInt ptrClass;\r    sqInt ptrValue;\r    sqInt reason;\r    sqInt reason1;\r    sqInt reason2;\r    sqInt reason3;\r    sqInt reason4;\r\r\tptrValue = oop;\r\tptrClass = interpreterProxy->fetchClassOf(ptrValue);\r\tif (ptrClass == (interpreterProxy->classExternalAddress())) {\r\r\t\t/* There is no way we can make sure the structure is valid.\r\t\tBut we can at least check for attempts to pass pointers to ST memory. */\r\r\t\tptrAddress = interpreterProxy->fetchPointerofObject(0, ptrValue);\r\t\tif (interpreterProxy->isInMemory(ptrAddress)) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason = FFIErrorInvalidPointer;\r\t\t\tffiLastError = reason;\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\treturn ffiPushStructureOfLength(ptrAddress, ((int*) ffiArgSpec), ffiArgSpecSize);\r\t}\r\tif (ptrClass == (interpreterProxy->classByteArray())) {\r\t\tif (!((interpreterProxy->byteSizeOf(ptrValue)) == (ffiArgHeader & FFIStructSizeMask))) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason1 = FFIErrorStructSize;\r\t\t\tffiLastError = reason1;\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\tptrAddress = ((int) (interpreterProxy->firstIndexableField(ptrValue)));\r\t\tif (!(ffiArgHeader & FFIFlagPointer)) {\r\t\t\treturn ffiPushStructureOfLength(ptrAddress, ((int*) ffiArgSpec), ffiArgSpecSize);\r\t\t}\r\t\tif (!((ffiArgHeader & FFIStructSizeMask) == 4)) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason2 = FFIErrorStructSize;\r\t\t\tffiLastError = reason2;\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\tptrAddress = interpreterProxy->fetchPointerofObject(0, ptrValue);\r\t\tif (interpreterProxy->isInMemory(ptrAddress)) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason3 = FFIErrorInvalidPointer;\r\t\t\tffiLastError = reason3;\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\treturn ffiPushPointer(ptrAddress);\r\t}\r\t/* begin ffiFail: */\r\treason4 = FFIErrorBadArg;\r\tffiLastError = reason4;\r\treturn interpreterProxy->primitiveFail();\r}\r\r\r/*\tPush a longlong type (e.g., a 64bit integer).\r\tNote: Coercions from float are *not* supported. */\r\rstatic sqInt ffiPushUnsignedLongLongOop(sqInt oop) {\r    sqInt highWord;\r    sqInt i;\r    sqInt length;\r    sqInt lowWord;\r    unsigned char *ptr;\r    sqInt reason;\r    sqInt reason1;\r    sqInt reason2;\r\r\tif (oop == (interpreterProxy->nilObject())) {\r\t\treturn ffiPushUnsignedLongLong(0, 0);\r\t}\r\tif (oop == (interpreterProxy->falseObject())) {\r\t\treturn ffiPushUnsignedLongLong(0, 0);\r\t}\r\tif (oop == (interpreterProxy->trueObject())) {\r\t\treturn ffiPushUnsignedLongLong(0, 1);\r\t}\r\tif ((oop & 1)) {\r\t\tlowWord = (oop >> 1);\r\t\tif (lowWord < 0) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason = FFIErrorCoercionFailed;\r\t\t\tffiLastError = reason;\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\thighWord = 0;\r\t} else {\r\t\tif (!((interpreterProxy->fetchClassOf(oop)) == (interpreterProxy->classLargePositiveInteger()))) {\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\tif (!(interpreterProxy->isBytes(oop))) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason1 = FFIErrorCoercionFailed;\r\t\t\tffiLastError = reason1;\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\tlength = interpreterProxy->byteSizeOf(oop);\r\t\tif (length > 8) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason2 = FFIErrorCoercionFailed;\r\t\t\tffiLastError = reason2;\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\tlowWord = highWord = 0;\r\t\tptr = interpreterProxy->firstIndexableField(oop);\r\t\tfor (i = 0; i <= ((((length < 4) ? length : 4)) - 1); i += 1) {\r\t\t\tlowWord += (ptr[i]) << (i * 8);\r\t\t}\r\t\tfor (i = 0; i <= (length - 5); i += 1) {\r\t\t\thighWord += (ptr[i + 4]) << (i * 8);\r\t\t}\r\t}\r\treturn ffiPushUnsignedLongLong(lowWord, highWord);\r}\r\r\r/*\tThis is a fallback in case somebody tries to pass a 'void' value.\r\tWe could simply ignore the argument but I think it's better to let\r\tthe caller know what he did */\r\rstatic sqInt ffiPushVoid(sqInt ignored) {\r    sqInt reason;\r\r\t/* begin ffiFail: */\r\treason = FFIErrorAttemptToPassVoid;\r\tffiLastError = reason;\r\treturn interpreterProxy->primitiveFail();\r}\r\r\r/*\tCreate a Smalltalk string from a zero terminated C string */\r\rstatic sqInt ffiReturnCStringFrom(sqInt cPointer) {\r    char *cString;\r    sqInt i;\r    sqInt strLen;\r    sqInt strOop;\r    char *strPtr;\r\r\tif (cPointer == null) {\r\t\treturn interpreterProxy->push(interpreterProxy->nilObject());\r\t}\r\tcString = ((char *) cPointer);\r\tstrLen = 0;\r\twhile (!((cString[strLen]) == 0)) {\r\t\tstrLen += 1;\r\t}\r\tstrOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), strLen);\r\tstrPtr = interpreterProxy->firstIndexableField(strOop);\r\tfor (i = 0; i <= (strLen - 1); i += 1) {\r\t\tstrPtr[i] = (cString[i]);\r\t}\r\treturn interpreterProxy->push(strOop);\r}\r\rstatic sqInt ffiSetLastError(sqInt errCode) {\r\treturn ffiLastError = errCode;\r}\r\r\r/*\tValidate if the given oop (an instance of ExternalData) can be passed as a pointer to the given atomic type. */\r\rstatic sqInt ffiValidateExternalDataAtomicType(sqInt oop, sqInt atomicType) {\r    sqInt ptrType;\r    sqInt spec;\r    sqInt specOop;\r    sqInt specType;\r    sqInt reason;\r    sqInt reason1;\r    sqInt reason2;\r    sqInt reason3;\r    sqInt reason4;\r    sqInt reason5;\r    sqInt reason6;\r    sqInt reason7;\r    sqInt reason8;\r\r\tptrType = interpreterProxy->fetchPointerofObject(1, oop);\r\tif ((ptrType & 1)) {\r\t\t/* begin ffiFail: */\r\t\treason = FFIErrorWrongType;\r\t\tffiLastError = reason;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tif (!(interpreterProxy->isPointers(ptrType))) {\r\t\t/* begin ffiFail: */\r\t\treason1 = FFIErrorWrongType;\r\t\tffiLastError = reason1;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tif ((interpreterProxy->slotSizeOf(ptrType)) < 2) {\r\t\t/* begin ffiFail: */\r\t\treason2 = FFIErrorWrongType;\r\t\tffiLastError = reason2;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tspecOop = interpreterProxy->fetchPointerofObject(0, ptrType);\r\tif ((specOop & 1)) {\r\t\t/* begin ffiFail: */\r\t\treason3 = FFIErrorWrongType;\r\t\tffiLastError = reason3;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tif (!(interpreterProxy->isWords(specOop))) {\r\t\t/* begin ffiFail: */\r\t\treason4 = FFIErrorWrongType;\r\t\tffiLastError = reason4;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tif ((interpreterProxy->slotSizeOf(specOop)) == 0) {\r\t\t/* begin ffiFail: */\r\t\treason5 = FFIErrorWrongType;\r\t\tffiLastError = reason5;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tspec = interpreterProxy->fetchPointerofObject(0, specOop);\r\tif (!(spec & FFIFlagAtomic)) {\r\t\t/* begin ffiFail: */\r\t\treason6 = FFIErrorWrongType;\r\t\tffiLastError = reason6;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tspecType = ((usqInt) (spec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;\r\tif (specType != atomicType) {\r\t\tif (!((atomicType > FFITypeBool) && (atomicType < FFITypeSingleFloat))) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason7 = FFIErrorCoercionFailed;\r\t\t\tffiLastError = reason7;\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\tif (!((((usqInt) atomicType) >> 1) == (((usqInt) specType) >> 1))) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason8 = FFIErrorCoercionFailed;\r\t\t\tffiLastError = reason8;\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t}\r\treturn 0;\r}\r\r\r/*\tNote: This is coded so that plugins can be run from Squeak. */\r\rstatic VirtualMachine * getInterpreter(void) {\r\treturn interpreterProxy;\r}\r\r\r/*\tNote: This is hardcoded so it can be run from Squeak.\r\tThe module name is used for validating a module *after*\r\tit is loaded to check if it does really contain the module\r\twe're thinking it contains. This is important! */\r\rEXPORT(const char*) getModuleName(void) {\r\treturn moduleName;\r}\r\rstatic sqInt halt(void) {\r\t;\r}\r\rEXPORT(sqInt) initialiseModule(void) {\r\tinitSurfacePluginFunctionPointers();\r}\r\rstatic sqInt isAtomicType(sqInt typeSpec) {\r\treturn typeSpec & FFIFlagAtomic;\r}\r\rstatic sqInt msg(char *s) {\r\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\r}\r\r\r/*\tIMPORTANT: IF YOU CHANGE THE NAME OF THIS METHOD YOU MUST CHANGE\r\t\tInterpreter>>primitiveCalloutToFFI\r\tTO REFLECT THE CHANGE. */\r/*\tPerform a function call to a foreign function.\r\tOnly invoked from method containing explicit external call spec. */\r\rEXPORT(sqInt) primitiveCallout(void) {\r    sqInt address;\r    sqInt argTypes;\r    sqInt flags;\r    sqInt lit;\r    sqInt litClass;\r    sqInt meth;\r    sqInt nArgs;\r    sqInt reason;\r    sqInt reason1;\r    sqInt reason2;\r    sqInt reason3;\r    sqInt argClass;\r    sqInt argSpec;\r    sqInt argType;\r    sqInt argTypes1;\r    sqInt i;\r    sqInt nArgs1;\r    sqInt oop;\r    sqInt stackIndex;\r    sqInt reason4;\r    sqInt reason6;\r    sqInt reason11;\r    sqInt reason21;\r    sqInt reason31;\r    sqInt reason41;\r    sqInt reason5;\r\r\tffiLastError = FFIErrorGenericError;\r\r\t/* Look if the method is itself a callout function */\r\r\tlit = null;\r\tmeth = interpreterProxy->primitiveMethod();\r\tif (!((interpreterProxy->literalCountOf(meth)) > 0)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tlit = interpreterProxy->literalofMethod(0, meth);\r\tlitClass = interpreterProxy->fetchClassOf(lit);\r\tif (!(interpreterProxy->includesBehaviorThatOf(litClass, interpreterProxy->classExternalFunction()))) {\r\t\t/* begin ffiFail: */\r\t\treason = FFIErrorNotFunction;\r\t\tffiLastError = reason;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\taddress = ffiLoadCalloutAddress(lit);\r\tif (interpreterProxy->failed()) {\r\t\treturn 0;\r\t}\r\tflags = interpreterProxy->fetchIntegerofObject(1, lit);\r\tif (interpreterProxy->failed()) {\r\t\t/* begin ffiFail: */\r\t\treason1 = FFIErrorBadArgs;\r\t\tffiLastError = reason1;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\r\t/* must be array of arg types */\r\r\targTypes = interpreterProxy->fetchPointerofObject(2, lit);\r\tif (!(interpreterProxy->isArray(argTypes))) {\r\t\t/* begin ffiFail: */\r\t\treason2 = FFIErrorBadArgs;\r\t\tffiLastError = reason2;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\r\t/* must be argumentCount+1 arg types */\r\r\tnArgs = interpreterProxy->slotSizeOf(argTypes);\r\tif (!(nArgs == ((interpreterProxy->methodArgumentCount()) + 1))) {\r\t\t/* begin ffiFail: */\r\t\treason3 = FFIErrorBadArgs;\r\t\tffiLastError = reason3;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tffiInitialize();\r\t/* begin ffiCall:WithFlags:AndTypes: */\r\tif (!(ffiSupportsCallingConvention(flags))) {\r\t\t/* begin ffiFail: */\r\t\treason4 = FFIErrorCallType;\r\t\tffiLastError = reason4;\r\t\tinterpreterProxy->primitiveFail();\r\t\tgoto l1;\r\t}\r\targTypes1 = argTypes;\r\targType = interpreterProxy->fetchPointerofObject(0, argTypes1);\r\targSpec = interpreterProxy->fetchPointerofObject(0, argType);\r\targClass = interpreterProxy->fetchPointerofObject(1, argType);\r\t/* begin ffiCheckReturn:With: */\r\tif (!(argClass == (interpreterProxy->nilObject()))) {\r\t\tif (!(interpreterProxy->includesBehaviorThatOf(argClass, interpreterProxy->classExternalStructure()))) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason6 = FFIErrorBadReturn;\r\t\t\tffiLastError = reason6;\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\tgoto l2;\r\t\t}\r\t}\r\tffiRetClass = argClass;\r\tif ((argSpec & 1)) {\r\t\t/* begin ffiFail: */\r\t\treason11 = FFIErrorWrongType;\r\t\tffiLastError = reason11;\r\t\tinterpreterProxy->primitiveFail();\r\t\tgoto l2;\r\t}\r\tif (!(interpreterProxy->isWords(argSpec))) {\r\t\t/* begin ffiFail: */\r\t\treason21 = FFIErrorWrongType;\r\t\tffiLastError = reason21;\r\t\tinterpreterProxy->primitiveFail();\r\t\tgoto l2;\r\t}\r\tffiRetSpecSize = interpreterProxy->slotSizeOf(argSpec);\r\tif (ffiRetSpecSize == 0) {\r\t\t/* begin ffiFail: */\r\t\treason31 = FFIErrorWrongType;\r\t\tffiLastError = reason31;\r\t\tinterpreterProxy->primitiveFail();\r\t\tgoto l2;\r\t}\r\tffiRetSpec = ((int) (interpreterProxy->firstIndexableField(argSpec)));\r\tffiRetHeader = longAt(ffiRetSpec);\r\tif (!(ffiRetHeader & FFIFlagAtomic)) {\r\t\tif (ffiRetClass == (interpreterProxy->nilObject())) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason41 = FFIErrorBadReturn;\r\t\t\tffiLastError = reason41;\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\tgoto l2;\r\t\t}\r\t}\r\tif (!(ffiCanReturn(((int*) ffiRetSpec), ffiRetSpecSize))) {\r\t\t/* begin ffiFail: */\r\t\treason5 = FFIErrorBadReturn;\r\t\tffiLastError = reason5;\r\t\tinterpreterProxy->primitiveFail();\r\t}\rl2:\t/* end ffiCheckReturn:With: */;\r\tif (interpreterProxy->failed()) {\r\t\tgoto l1;\r\t}\r\tffiRetOop = argType;\r\tnArgs1 = interpreterProxy->methodArgumentCount();\r\tstackIndex = nArgs1 - 1;\r\tfor (i = 1; i <= nArgs1; i += 1) {\r\t\targType = interpreterProxy->fetchPointerofObject(i, argTypes1);\r\t\targSpec = interpreterProxy->fetchPointerofObject(0, argType);\r\t\targClass = interpreterProxy->fetchPointerofObject(1, argType);\r\t\toop = interpreterProxy->stackValue(stackIndex);\r\t\tffiArgumentSpecClass(oop, argSpec, argClass);\r\t\tif (interpreterProxy->failed()) {\r\t\t\tgoto l1;\r\t\t}\r\t\tstackIndex -= 1;\r\t}\r\tffiCalloutToWithFlags(address, flags);\rl1:\t/* end ffiCall:WithFlags:AndTypes: */;\r\tffiCleanup();\r\treturn 0;\r}\r\r\r/*\tPerform a function call to a foreign function.\r\tOnly invoked from ExternalFunction>>invokeWithArguments: */\r\rEXPORT(sqInt) primitiveCalloutWithArgs(void) {\r    sqInt address;\r    sqInt argArray;\r    sqInt argTypes;\r    sqInt flags;\r    sqInt lit;\r    sqInt litClass;\r    sqInt nArgs;\r    sqInt reason;\r    sqInt reason1;\r    sqInt reason2;\r    sqInt reason3;\r    sqInt reason4;\r    sqInt reason5;\r    sqInt argClass;\r    sqInt argSpec;\r    sqInt argType;\r    sqInt argTypes1;\r    sqInt i;\r    sqInt oop;\r    sqInt reason6;\r    sqInt reason7;\r    sqInt reason11;\r    sqInt reason21;\r    sqInt reason31;\r    sqInt reason41;\r    sqInt reason51;\r\r\tffiLastError = FFIErrorGenericError;\r\r\t/* Look if the method is itself a callout function */\r\r\tlit = null;\r\tlit = interpreterProxy->stackValue(interpreterProxy->methodArgumentCount());\r\tlitClass = interpreterProxy->fetchClassOf(lit);\r\tif (!(interpreterProxy->includesBehaviorThatOf(litClass, interpreterProxy->classExternalFunction()))) {\r\t\t/* begin ffiFail: */\r\t\treason = FFIErrorNotFunction;\r\t\tffiLastError = reason;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\taddress = ffiLoadCalloutAddress(lit);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tflags = interpreterProxy->fetchIntegerofObject(1, lit);\r\tif (interpreterProxy->failed()) {\r\t\t/* begin ffiFail: */\r\t\treason1 = FFIErrorBadArgs;\r\t\tffiLastError = reason1;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\r\t/* must be array of arg types */\r\r\targTypes = interpreterProxy->fetchPointerofObject(2, lit);\r\tif (!(interpreterProxy->isArray(argTypes))) {\r\t\t/* begin ffiFail: */\r\t\treason2 = FFIErrorBadArgs;\r\t\tffiLastError = reason2;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tnArgs = interpreterProxy->slotSizeOf(argTypes);\r\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\r\t\t/* begin ffiFail: */\r\t\treason3 = FFIErrorBadArgs;\r\t\tffiLastError = reason3;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\targArray = interpreterProxy->stackValue(0);\r\tif (!(interpreterProxy->isArray(argArray))) {\r\t\t/* begin ffiFail: */\r\t\treason4 = FFIErrorBadArgs;\r\t\tffiLastError = reason4;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tif (!(nArgs == ((interpreterProxy->slotSizeOf(argArray)) + 1))) {\r\t\t/* begin ffiFail: */\r\t\treason5 = FFIErrorBadArgs;\r\t\tffiLastError = reason5;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tffiInitialize();\r\t/* begin ffiCall:WithFlags:Args:AndTypes:OfSize: */\r\tif (!(ffiSupportsCallingConvention(flags))) {\r\t\t/* begin ffiFail: */\r\t\treason6 = FFIErrorCallType;\r\t\tffiLastError = reason6;\r\t\tinterpreterProxy->primitiveFail();\r\t\tgoto l1;\r\t}\r\targTypes1 = argTypes;\r\targType = interpreterProxy->fetchPointerofObject(0, argTypes1);\r\targSpec = interpreterProxy->fetchPointerofObject(0, argType);\r\targClass = interpreterProxy->fetchPointerofObject(1, argType);\r\t/* begin ffiCheckReturn:With: */\r\tif (!(argClass == (interpreterProxy->nilObject()))) {\r\t\tif (!(interpreterProxy->includesBehaviorThatOf(argClass, interpreterProxy->classExternalStructure()))) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason7 = FFIErrorBadReturn;\r\t\t\tffiLastError = reason7;\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\tgoto l2;\r\t\t}\r\t}\r\tffiRetClass = argClass;\r\tif ((argSpec & 1)) {\r\t\t/* begin ffiFail: */\r\t\treason11 = FFIErrorWrongType;\r\t\tffiLastError = reason11;\r\t\tinterpreterProxy->primitiveFail();\r\t\tgoto l2;\r\t}\r\tif (!(interpreterProxy->isWords(argSpec))) {\r\t\t/* begin ffiFail: */\r\t\treason21 = FFIErrorWrongType;\r\t\tffiLastError = reason21;\r\t\tinterpreterProxy->primitiveFail();\r\t\tgoto l2;\r\t}\r\tffiRetSpecSize = interpreterProxy->slotSizeOf(argSpec);\r\tif (ffiRetSpecSize == 0) {\r\t\t/* begin ffiFail: */\r\t\treason31 = FFIErrorWrongType;\r\t\tffiLastError = reason31;\r\t\tinterpreterProxy->primitiveFail();\r\t\tgoto l2;\r\t}\r\tffiRetSpec = ((int) (interpreterProxy->firstIndexableField(argSpec)));\r\tffiRetHeader = longAt(ffiRetSpec);\r\tif (!(ffiRetHeader & FFIFlagAtomic)) {\r\t\tif (ffiRetClass == (interpreterProxy->nilObject())) {\r\t\t\t/* begin ffiFail: */\r\t\t\treason41 = FFIErrorBadReturn;\r\t\t\tffiLastError = reason41;\r\t\t\tinterpreterProxy->primitiveFail();\r\t\t\tgoto l2;\r\t\t}\r\t}\r\tif (!(ffiCanReturn(((int*) ffiRetSpec), ffiRetSpecSize))) {\r\t\t/* begin ffiFail: */\r\t\treason51 = FFIErrorBadReturn;\r\t\tffiLastError = reason51;\r\t\tinterpreterProxy->primitiveFail();\r\t}\rl2:\t/* end ffiCheckReturn:With: */;\r\tif (interpreterProxy->failed()) {\r\t\tgoto l1;\r\t}\r\tffiRetOop = argType;\r\tfor (i = 1; i <= (nArgs - 1); i += 1) {\r\t\targType = interpreterProxy->fetchPointerofObject(i, argTypes1);\r\t\targSpec = interpreterProxy->fetchPointerofObject(0, argType);\r\t\targClass = interpreterProxy->fetchPointerofObject(1, argType);\r\t\toop = interpreterProxy->fetchPointerofObject(i - 1, argArray);\r\t\tffiArgumentSpecClass(oop, argSpec, argClass);\r\t\tif (interpreterProxy->failed()) {\r\t\t\tgoto l1;\r\t\t}\r\t}\r\tffiCalloutToWithFlags(address, flags);\rl1:\t/* end ffiCall:WithFlags:Args:AndTypes:OfSize: */;\r\tffiCleanup();\r\treturn 0;\r}\r\r\r/*\targuments: name(type, stack offset)\r\t\twidth(Integer, 4)\r\t\theight(Integer, 3)\r\t\trowPitch(Integer, 2)\r\t\tdepth(Integer, 1)\r\t\tisMSB(Boolean, 0) */\r\rEXPORT(sqInt) primitiveCreateManualSurface(void) {\r    sqInt depth;\r    sqInt height;\r    sqInt isMSB;\r    sqInt result;\r    sqInt rowPitch;\r    sqInt width;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 5)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\twidth = interpreterProxy->stackIntegerValue(4);\r\theight = interpreterProxy->stackIntegerValue(3);\r\trowPitch = interpreterProxy->stackIntegerValue(2);\r\tdepth = interpreterProxy->stackIntegerValue(1);\r\tisMSB = interpreterProxy->stackObjectValue(0);\r\tisMSB = interpreterProxy->booleanValueOf(isMSB);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\t;\r\t;\r\t;\r\t;\r\t;\r\tresult = createManualSurface(width, height, rowPitch, depth, isMSB);\r\tif (result < 0) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tresult = interpreterProxy->signed32BitIntegerFor(result);\r\treturn interpreterProxy->popthenPush(6, result);\r}\r\r\r/*\targuments: name(type, stack offset)\r\t\tsurfaceID(Integer, 0) */\r\rEXPORT(sqInt) primitiveDestroyManualSurface(void) {\r    sqInt result;\r    sqInt surfaceID;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 1)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tsurfaceID = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tresult = destroyManualSurface(surfaceID);\r\tif (result == 0) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\treturn interpreterProxy->pop(1);\r}\r\r\r/*\tPrimitive. Allocate an object on the external heap. */\r\rEXPORT(sqInt) primitiveFFIAllocate(void) {\r    sqInt addr;\r    sqInt byteSize;\r    sqInt oop;\r    int *ptr;\r\r\tbyteSize = interpreterProxy->stackIntegerValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\taddr = ffiAlloc(byteSize);\r\tif (addr == 0) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\toop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classExternalAddress(), 4);\r\tptr = interpreterProxy->firstIndexableField(oop);\r\tptr[0] = addr;\r\tinterpreterProxy->pop(2);\r\treturn interpreterProxy->push(oop);\r}\r\r\r/*\tReturn a (signed or unsigned) n byte integer from the given byte offset. */\r\rEXPORT(sqInt) primitiveFFIDoubleAt(void) {\r    sqInt addr;\r    sqInt byteOffset;\r    double  floatValue;\r    sqInt rcvr;\r\r\tbyteOffset = interpreterProxy->stackIntegerValue(0);\r\trcvr = interpreterProxy->stackObjectValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn 0;\r\t}\r\taddr = ffiAddressOfstartingAtsize(rcvr, byteOffset, 8);\r\tif (interpreterProxy->failed()) {\r\t\treturn 0;\r\t}\r\t((int*)(&floatValue))[0] = ((int*)addr)[0];\r\t((int*)(&floatValue))[1] = ((int*)addr)[1];\r\tinterpreterProxy->pop(2);\r\treturn interpreterProxy->pushFloat(floatValue);\r}\r\r\r/*\tReturn a (signed or unsigned) n byte integer from the given byte offset. */\r\rEXPORT(sqInt) primitiveFFIDoubleAtPut(void) {\r    sqInt addr;\r    sqInt byteOffset;\r    sqInt floatOop;\r    double  floatValue;\r    sqInt rcvr;\r\r\tfloatOop = interpreterProxy->stackValue(0);\r\tif ((floatOop & 1)) {\r\t\tfloatValue = ((double) ((floatOop >> 1)));\r\t} else {\r\t\tfloatValue = ((double) (interpreterProxy->floatValueOf(floatOop)));\r\t}\r\tbyteOffset = interpreterProxy->stackIntegerValue(1);\r\trcvr = interpreterProxy->stackObjectValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn 0;\r\t}\r\taddr = ffiAddressOfstartingAtsize(rcvr, byteOffset, 8);\r\tif (interpreterProxy->failed()) {\r\t\treturn 0;\r\t}\r\t((int*)addr)[0] = ((int*)(&floatValue))[0];\r\t((int*)addr)[1] = ((int*)(&floatValue))[1];\r\tinterpreterProxy->pop(3);\r\treturn interpreterProxy->push(floatOop);\r}\r\r\r/*\tReturn a (signed or unsigned) n byte integer from the given byte offset. */\r\rEXPORT(sqInt) primitiveFFIFloatAt(void) {\r    sqInt addr;\r    sqInt byteOffset;\r    float  floatValue;\r    sqInt rcvr;\r\r\tbyteOffset = interpreterProxy->stackIntegerValue(0);\r\trcvr = interpreterProxy->stackObjectValue(1);\r\tif (interpreterProxy->failed()) {\r\t\treturn 0;\r\t}\r\taddr = ffiAddressOfstartingAtsize(rcvr, byteOffset, 4);\r\tif (interpreterProxy->failed()) {\r\t\treturn 0;\r\t}\r\t((int*)(&floatValue))[0] = ((int*)addr)[0];\r\tinterpreterProxy->pop(2);\r\treturn interpreterProxy->pushFloat(floatValue);\r}\r\r\r/*\tReturn a (signed or unsigned) n byte integer from the given byte offset. */\r\rEXPORT(sqInt) primitiveFFIFloatAtPut(void) {\r    sqInt addr;\r    sqInt byteOffset;\r    sqInt floatOop;\r    float  floatValue;\r    sqInt rcvr;\r\r\tfloatOop = interpreterProxy->stackValue(0);\r\tif ((floatOop & 1)) {\r\t\tfloatValue = ((float) ((floatOop >> 1)));\r\t} else {\r\t\tfloatValue = ((float) (interpreterProxy->floatValueOf(floatOop)));\r\t}\r\tbyteOffset = interpreterProxy->stackIntegerValue(1);\r\trcvr = interpreterProxy->stackObjectValue(2);\r\tif (interpreterProxy->failed()) {\r\t\treturn 0;\r\t}\r\taddr = ffiAddressOfstartingAtsize(rcvr, byteOffset, 4);\r\tif (interpreterProxy->failed()) {\r\t\treturn 0;\r\t}\r\t((int*)addr)[0] = ((int*)(&floatValue))[0];\r\tinterpreterProxy->pop(3);\r\treturn interpreterProxy->push(floatOop);\r}\r\r\r/*\tPrimitive. Free the object pointed to on the external heap. */\r\rEXPORT(sqInt) primitiveFFIFree(void) {\r    sqInt addr;\r    sqInt oop;\r    int *ptr;\r\r\toop = interpreterProxy->stackObjectValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!((interpreterProxy->fetchClassOf(oop)) == (interpreterProxy->classExternalAddress()))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tif (!((interpreterProxy->byteSizeOf(oop)) == 4)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tptr = interpreterProxy->firstIndexableField(oop);\r\r\t/* Don't you dare to free Squeak's memory! */\r\r\taddr = ptr[0];\r\tif ((addr == 0) || (interpreterProxy->isInMemory(addr))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tffiFree(addr);\r\treturn ptr[0] = 0;\r}\r\r\r/*\tPrimitive. Return the error code from a failed call to the foreign function interface. */\r\rEXPORT(sqInt) primitiveFFIGetLastError(void) {\r\tinterpreterProxy->pop(1);\r\treturn interpreterProxy->pushInteger(ffiLastError);\r}\r\r\r/*\tReturn a (signed or unsigned) n byte integer from the given byte offset. */\r\rEXPORT(sqInt) primitiveFFIIntegerAt(void) {\r    sqInt addr;\r    sqInt byteOffset;\r    sqInt byteSize;\r    sqInt isSigned;\r    sqInt mask;\r    sqInt rcvr;\r    sqInt value;\r\r\tisSigned = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(0));\r\tbyteSize = interpreterProxy->stackIntegerValue(1);\r\tbyteOffset = interpreterProxy->stackIntegerValue(2);\r\trcvr = interpreterProxy->stackObjectValue(3);\r\tif (interpreterProxy->failed()) {\r\t\treturn 0;\r\t}\r\tif (!((byteOffset > 0) && ((byteSize == 1) || ((byteSize == 2) || (byteSize == 4))))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\taddr = ffiAddressOfstartingAtsize(rcvr, byteOffset, byteSize);\r\tif (interpreterProxy->failed()) {\r\t\treturn 0;\r\t}\r\tif (byteSize < 4) {\r\t\tif (byteSize == 1) {\r\r\t\t\t/* short/byte */\r\r\t\t\tvalue = byteAt(addr);\r\t\t} else {\r\t\t\tvalue = *((unsigned short int *) addr);\r\t\t}\r\t\tif (isSigned) {\r\r\t\t\t/* sign extend value */\r\r\t\t\tmask = 1 << ((byteSize * 8) - 1);\r\t\t\tvalue = (value & (mask - 1)) - (value & mask);\r\t\t}\r\t\tvalue = ((value << 1) | 1);\r\t} else {\r\r\t\t/* general 32 bit integer */\r\r\t\tvalue = longAt(addr);\r\t\tif (isSigned) {\r\t\t\tvalue = interpreterProxy->signed32BitIntegerFor(value);\r\t\t} else {\r\t\t\tvalue = interpreterProxy->positive32BitIntegerFor(value);\r\t\t}\r\t}\r\tinterpreterProxy->pop(4);\r\treturn interpreterProxy->push(value);\r}\r\r\r/*\tStore a (signed or unsigned) n byte integer at the given byte offset. */\r\rEXPORT(sqInt) primitiveFFIIntegerAtPut(void) {\r    sqInt addr;\r    sqInt byteOffset;\r    sqInt byteSize;\r    sqInt isSigned;\r    sqInt max;\r    sqInt rcvr;\r    sqInt value;\r    sqInt valueOop;\r\r\tisSigned = interpreterProxy->booleanValueOf(interpreterProxy->stackValue(0));\r\tbyteSize = interpreterProxy->stackIntegerValue(1);\r\tvalueOop = interpreterProxy->stackValue(2);\r\tbyteOffset = interpreterProxy->stackIntegerValue(3);\r\trcvr = interpreterProxy->stackObjectValue(4);\r\tif (interpreterProxy->failed()) {\r\t\treturn 0;\r\t}\r\tif (!((byteOffset > 0) && ((byteSize == 1) || ((byteSize == 2) || (byteSize == 4))))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\taddr = ffiAddressOfstartingAtsize(rcvr, byteOffset, byteSize);\r\tif (interpreterProxy->failed()) {\r\t\treturn 0;\r\t}\r\tif (isSigned) {\r\t\tvalue = interpreterProxy->signed32BitValueOf(valueOop);\r\t} else {\r\t\tvalue = interpreterProxy->positive32BitValueOf(valueOop);\r\t}\r\tif (interpreterProxy->failed()) {\r\t\treturn 0;\r\t}\r\tif (byteSize < 4) {\r\t\tif (isSigned) {\r\t\t\tmax = 1 << ((8 * byteSize) - 1);\r\t\t\tif (value >= max) {\r\t\t\t\treturn interpreterProxy->primitiveFail();\r\t\t\t}\r\t\t\tif (value < (0 - max)) {\r\t\t\t\treturn interpreterProxy->primitiveFail();\r\t\t\t}\r\t\t} else {\r\t\t\tif (value >= (1 << (8 * byteSize))) {\r\t\t\t\treturn interpreterProxy->primitiveFail();\r\t\t\t}\r\t\t}\r\t\tif (byteSize == 1) {\r\t\t\tbyteAtput(addr, value);\r\t\t} else {\r\t\t\t*((short int *) addr) = value;\r\t\t}\r\t} else {\r\t\tlongAtput(addr, value);\r\t}\r\tinterpreterProxy->pop(5);\r\treturn interpreterProxy->push(valueOop);\r}\r\r\r/*\tPrimitive. Force loading the receiver (an instance of ExternalLibrary). */\r\rEXPORT(sqInt) primitiveForceLoad(void) {\r    sqInt ffiModuleName;\r    sqInt moduleHandle;\r    sqInt moduleHandlePtr;\r    sqInt moduleLength;\r    int *ptr;\r    sqInt rcvr;\r    sqInt theClass;\r    sqInt reason;\r    sqInt reason1;\r    sqInt reason2;\r    sqInt errCode;\r\r\tffiLastError = FFIErrorGenericError;\r\tif (!((interpreterProxy->methodArgumentCount()) == 0)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\trcvr = interpreterProxy->stackValue(0);\r\ttheClass = interpreterProxy->fetchClassOf(rcvr);\r\tif (!(interpreterProxy->includesBehaviorThatOf(theClass, interpreterProxy->classExternalLibrary()))) {\r\t\t/* begin ffiFail: */\r\t\treason = FFIErrorBadExternalLibrary;\r\t\tffiLastError = reason;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tmoduleHandlePtr = interpreterProxy->fetchPointerofObject(0, rcvr);\r\t/* begin ffiContentsOfHandle:errCode: */\r\terrCode = FFIErrorBadExternalLibrary;\r\tif ((moduleHandlePtr & 1)) {\r\t\t/* begin ffiFail: */\r\t\tffiLastError = errCode;\r\t\tmoduleHandle = interpreterProxy->primitiveFail();\r\t\tgoto l1;\r\t}\r\tif (!(interpreterProxy->isBytes(moduleHandlePtr))) {\r\t\t/* begin ffiFail: */\r\t\tffiLastError = errCode;\r\t\tmoduleHandle = interpreterProxy->primitiveFail();\r\t\tgoto l1;\r\t}\r\tif (!((interpreterProxy->byteSizeOf(moduleHandlePtr)) == 4)) {\r\t\t/* begin ffiFail: */\r\t\tffiLastError = errCode;\r\t\tmoduleHandle = interpreterProxy->primitiveFail();\r\t\tgoto l1;\r\t}\r\tmoduleHandle = interpreterProxy->fetchPointerofObject(0, moduleHandlePtr);\rl1:\t/* end ffiContentsOfHandle:errCode: */;\r\tif (interpreterProxy->failed()) {\r\t\treturn 0;\r\t}\r\tffiModuleName = interpreterProxy->fetchPointerofObject(1, rcvr);\r\tif (!(interpreterProxy->isBytes(ffiModuleName))) {\r\t\t/* begin ffiFail: */\r\t\treason1 = FFIErrorBadExternalLibrary;\r\t\tffiLastError = reason1;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tmoduleLength = interpreterProxy->byteSizeOf(ffiModuleName);\r\tmoduleHandle = interpreterProxy->ioLoadModuleOfLength(((int) (interpreterProxy->firstIndexableField(ffiModuleName))), moduleLength);\r\tif (interpreterProxy->failed()) {\r\t\t/* begin ffiFail: */\r\t\treason2 = FFIErrorModuleNotFound;\r\t\tffiLastError = reason2;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tptr = interpreterProxy->firstIndexableField(moduleHandlePtr);\r\tptr[0] = moduleHandle;\r\treturn 0;\r}\r\r\r/*\tCreate a 'manual surface' data-structure.  See the ExternalForm class in the FFI package for example usage. */\r/*\targuments: name(type, stack offset)\r\t\tsurfaceID(Integer, 1)\r\t\tptr(uint32, 0) */\r\rEXPORT(sqInt) primitiveSetManualSurfacePointer(void) {\r    unsigned int ptr;\r    sqInt result;\r    sqInt surfaceID;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 2)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tsurfaceID = interpreterProxy->stackIntegerValue(1);\r\tptr = interpreterProxy->positive32BitValueOf(interpreterProxy->stackValue(0));\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\t;\r\t;\r\tresult = setManualSurfacePointer(surfaceID, (void*)ptr);\r\tif (result == 0) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\treturn interpreterProxy->pop(2);\r}\r\r\r/*\tNote: This is coded so that is can be run from Squeak. */\r\rEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter) {\r    sqInt ok;\r\r\tinterpreterProxy = anInterpreter;\r\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\r\tif (ok == 0) {\r\t\treturn 0;\r\t}\r\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\r\treturn ok;\r}\r\r\r#ifdef SQUEAK_BUILTIN_PLUGIN\r\r\rvoid* SqueakFFIPrims_exports[][3] = {\r\t{\"SqueakFFIPrims\", \"primitiveFFIIntegerAtPut\", (void*)primitiveFFIIntegerAtPut},\r\t{\"SqueakFFIPrims\", \"primitiveFFIAllocate\", (void*)primitiveFFIAllocate},\r\t{\"SqueakFFIPrims\", \"primitiveCalloutWithArgs\", (void*)primitiveCalloutWithArgs},\r\t{\"SqueakFFIPrims\", \"primitiveFFIFloatAt\", (void*)primitiveFFIFloatAt},\r\t{\"SqueakFFIPrims\", \"primitiveFFIFree\", (void*)primitiveFFIFree},\r\t{\"SqueakFFIPrims\", \"primitiveFFIIntegerAt\", (void*)primitiveFFIIntegerAt},\r\t{\"SqueakFFIPrims\", \"primitiveSetManualSurfacePointer\", (void*)primitiveSetManualSurfacePointer},\r\t{\"SqueakFFIPrims\", \"primitiveCreateManualSurface\", (void*)primitiveCreateManualSurface},\r\t{\"SqueakFFIPrims\", \"primitiveFFIDoubleAt\", (void*)primitiveFFIDoubleAt},\r\t{\"SqueakFFIPrims\", \"primitiveDestroyManualSurface\", (void*)primitiveDestroyManualSurface},\r\t{\"SqueakFFIPrims\", \"primitiveCallout\", (void*)primitiveCallout},\r\t{\"SqueakFFIPrims\", \"setInterpreter\", (void*)setInterpreter},\r\t{\"SqueakFFIPrims\", \"primitiveFFIDoubleAtPut\", (void*)primitiveFFIDoubleAtPut},\r\t{\"SqueakFFIPrims\", \"initialiseModule\", (void*)initialiseModule},\r\t{\"SqueakFFIPrims\", \"getModuleName\", (void*)getModuleName},\r\t{\"SqueakFFIPrims\", \"primitiveFFIFloatAtPut\", (void*)primitiveFFIFloatAtPut},\r\t{\"SqueakFFIPrims\", \"primitiveFFIGetLastError\", (void*)primitiveFFIGetLastError},\r\t{\"SqueakFFIPrims\", \"primitiveForceLoad\", (void*)primitiveForceLoad},\r\t{NULL, NULL, NULL}\r};\r\r\r#endif /* ifdef SQ_BUILTIN_PLUGIN */\r\r"
  },
  {
    "path": "vm/src/from_squeak/unix/src/plugins/UUIDPlugin/UUIDPlugin.c",
    "content": "/* Automatically generated from Squeak on 23 January 2011 3:56:02 pm \r   by VMMaker 4.4.7\r */\r\r#include <math.h>\r#include <stdio.h>\r#include <stdlib.h>\r#include <string.h>\r#include <time.h>\r\r/* Default EXPORT macro that does nothing (see comment in sq.h): */\r#define EXPORT(returnType) returnType\r\r/* Do not include the entire sq.h file but just those parts needed. */\r/*  The virtual machine proxy definition */\r#include \"sqVirtualMachine.h\"\r/* Configuration options */\r#include \"sqConfig.h\"\r/* Platform specific definitions */\r#include \"sqPlatformSpecific.h\"\r\r#define true 1\r#define false 0\r#define null 0  /* using 'null' because nil is predefined in Think C */\r#ifdef SQUEAK_BUILTIN_PLUGIN\r#undef EXPORT\r// was #undef EXPORT(returnType) but screws NorCroft cc\r#define EXPORT(returnType) static returnType\r#endif\r#include \"UUIDPlugin.h\"\r\r#include \"sqMemoryAccess.h\"\r\r\r/*** Constants ***/\r\r/*** Function Prototypes ***/\rstatic VirtualMachine * getInterpreter(void);\r#pragma export on\rEXPORT(const char*) getModuleName(void);\r#pragma export off\rstatic sqInt halt(void);\r#pragma export on\rEXPORT(sqInt) initialiseModule(void);\r#pragma export off\rstatic sqInt msg(char *s);\r#pragma export on\rEXPORT(sqInt) primitiveMakeUUID(void);\rEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\rEXPORT(sqInt) shutdownModule(void);\r#pragma export off\rstatic sqInt sqAssert(sqInt aBool);\r/*** Variables ***/\r\r#ifdef SQUEAK_BUILTIN_PLUGIN\rextern\r#endif\rstruct VirtualMachine* interpreterProxy;\rstatic const char *moduleName =\r#ifdef SQUEAK_BUILTIN_PLUGIN\r\t\"UUIDPlugin 23 January 2011 (i)\"\r#else\r\t\"UUIDPlugin 23 January 2011 (e)\"\r#endif\r;\r\r\r\r/*\tNote: This is coded so that plugins can be run from Squeak. */\r\rstatic VirtualMachine * getInterpreter(void) {\r\treturn interpreterProxy;\r}\r\r\r/*\tNote: This is hardcoded so it can be run from Squeak.\r\tThe module name is used for validating a module *after*\r\tit is loaded to check if it does really contain the module\r\twe're thinking it contains. This is important! */\r\rEXPORT(const char*) getModuleName(void) {\r\treturn moduleName;\r}\r\rstatic sqInt halt(void) {\r\t;\r}\r\rEXPORT(sqInt) initialiseModule(void) {\r\treturn sqUUIDInit();\r}\r\rstatic sqInt msg(char *s) {\r\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\r}\r\rEXPORT(sqInt) primitiveMakeUUID(void) {\r\tsqInt oop;\r\tchar*location;\r\r\tif (!((interpreterProxy->methodArgumentCount()) == 0)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\toop = interpreterProxy->stackObjectValue(0);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(interpreterProxy->isBytes(oop))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tif (!((interpreterProxy->byteSizeOf(oop)) == 16)) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tlocation = interpreterProxy->firstIndexableField(oop);\r\treturn MakeUUID(location);\r}\r\r\r/*\tNote: This is coded so that is can be run from Squeak. */\r\rEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter) {\r\tsqInt ok;\r\r\tinterpreterProxy = anInterpreter;\r\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\r\tif (ok == 0) {\r\t\treturn 0;\r\t}\r\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\r\treturn ok;\r}\r\rEXPORT(sqInt) shutdownModule(void) {\r\treturn sqUUIDShutdown();\r}\r\rstatic sqInt sqAssert(sqInt aBool) {\r\t/* missing DebugCode */;\r}\r\r\r#ifdef SQUEAK_BUILTIN_PLUGIN\r\r\rvoid* UUIDPlugin_exports[][3] = {\r\t{\"UUIDPlugin\", \"shutdownModule\", (void*)shutdownModule},\r\t{\"UUIDPlugin\", \"setInterpreter\", (void*)setInterpreter},\r\t{\"UUIDPlugin\", \"initialiseModule\", (void*)initialiseModule},\r\t{\"UUIDPlugin\", \"primitiveMakeUUID\", (void*)primitiveMakeUUID},\r\t{\"UUIDPlugin\", \"getModuleName\", (void*)getModuleName},\r\t{NULL, NULL, NULL}\r};\r\r\r#endif /* ifdef SQ_BUILTIN_PLUGIN */\r\r"
  },
  {
    "path": "vm/src/from_squeak/unix/src/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c",
    "content": "/* Automatically generated from Squeak on 23 January 2011 3:56:04 pm \r   by VMMaker 4.4.7\r */\r\r#include <math.h>\r#include <stdio.h>\r#include <stdlib.h>\r#include <string.h>\r#include <time.h>\r\r/* Default EXPORT macro that does nothing (see comment in sq.h): */\r#define EXPORT(returnType) returnType\r\r/* Do not include the entire sq.h file but just those parts needed. */\r/*  The virtual machine proxy definition */\r#include \"sqVirtualMachine.h\"\r/* Configuration options */\r#include \"sqConfig.h\"\r/* Platform specific definitions */\r#include \"sqPlatformSpecific.h\"\r\r#define true 1\r#define false 0\r#define null 0  /* using 'null' because nil is predefined in Think C */\r#ifdef SQUEAK_BUILTIN_PLUGIN\r#undef EXPORT\r// was #undef EXPORT(returnType) but screws NorCroft cc\r#define EXPORT(returnType) static returnType\r#endif\r#include <sys/types.h>\r/* D T Lewis - UnixOSProcessPlugin.c translated from class\r   UnixOSProcessPlugin of OSProcessPlugin version 4.3.3 */\r#include <sys/time.h>\r#include <sys/wait.h>\r#include <signal.h>\r#include <unistd.h>\r#include <stdlib.h>\r#include <fcntl.h>\r#include <signal.h>\r#include <pthread.h>\r#include <sys/stat.h>\r#include <errno.h>\r#include \"config.h\"\r#define FILEHANDLETYPE FILE *  /* the type of low level stream to be used in a struct SQFile */\r#ifndef SQAIO_H\r# define SQAIO_H \"aio.h\"          /* aio.h has been renamed to sqaio.h */\r#endif\r#include SQAIO_H\r#include \"FilePlugin.h\"\r#include \"SocketPlugin.h\"\r#define SESSIONIDENTIFIERTYPE int\r\r#include \"sqMemoryAccess.h\"\r\r\r/*** Constants ***/\r\r/*** Function Prototypes ***/\rstatic void aioForwardwithDataandFlags(int fd, void *data, int flags);\rstatic char * cStringFromString(sqInt aString);\rstatic void * callocWrappersize(sqInt count, sqInt objectSize);\rstatic sqInt copyBytesFromtolength(void *charArray1, void *charArray2, sqInt len);\rstatic sqInt createPipeForReaderwriter(FILEHANDLETYPE *readerIOStreamPtr, FILEHANDLETYPE *writerIOStreamPtr);\rstatic sqInt descriptorTableSize(void);\rstatic void dupToStdErr(sqInt anSQFileDataStructure);\rstatic void dupToStdIn(sqInt anSQFileDataStructure);\rstatic void dupToStdOut(sqInt anSQFileDataStructure);\rstatic sqInt fileDescriptorFrom(sqInt aSQFileByteArray);\rstatic FILEHANDLETYPE fileHandleFrom(sqInt sqFileStructByteArray);\rstatic sqInt fileRecordSize(void);\rstatic SQFile * fileValueOf(sqInt anSQFileRecord);\rstatic sqInt fixPointersInArrayOfStringswithOffsetscount(char *flattenedArrayOfStrings, sqInt *offsetArray, sqInt count);\rstatic sqInt forkAndExecInDirectory(sqInt useSignalHandler);\r#pragma export on\rEXPORT(pid_t) forkSqueak(sqInt useSignalHandler);\r#pragma export off\rstatic void * forwardSignaltoSemaphoreAt(sqInt sigNum, sqInt semaphoreIndex);\rstatic VirtualMachine * getInterpreter(void);\r#pragma export on\rEXPORT(const char*) getModuleName(void);\r#pragma export off\rstatic sqInt getThisSessionIdentifier(void);\rstatic sqInt halt(void);\rstatic void handleSignal(int sigNum);\rstatic void * handleSignalFunctionAddress(void);\r#pragma export on\rEXPORT(sqInt) initialiseModule(void);\r#pragma export off\rstatic sqInt initializeModuleForPlatform(void);\rstatic sqInt isNonNullSQFile(sqInt objectPointer);\rstatic sqInt isNullSQSocket(sqInt objectPointer);\rstatic sqInt isSQFileObject(sqInt objectPointer);\rstatic sqInt isSQSocketObject(sqInt objectPointer);\rstatic sqInt isValidFileSession(sqInt objectPointer);\rstatic sqInt isVmThread(void);\rstatic sqInt makePipeForReaderwriter(FILEHANDLETYPE *readerIOStreamPtr, FILEHANDLETYPE *writerIOStreamPtr);\rstatic sqInt maskForThisThreadAndResend(int sigNum);\rstatic sqInt maskSignalForThisThread(int sigNum);\r#pragma export on\rEXPORT(sqInt) moduleUnloaded(char *aModuleName);\r#pragma export off\rstatic sqInt msg(char *s);\rstatic sqInt newPthreadTypeByteArray(sqInt aPthreadType);\rstatic sqInt newSQFileByteArray(void);\rstatic sqInt newSQSocketByteArray(void);\rstatic void ** originalSignalHandlers(void);\rstatic void * pointerFrom(sqInt aByteArray);\r#pragma export on\rEXPORT(sqInt) primitiveAioDisable(void);\rEXPORT(sqInt) primitiveAioEnable(void);\rEXPORT(sqInt) primitiveAioHandle(void);\rEXPORT(sqInt) primitiveAioSuspend(void);\rEXPORT(sqInt) primitiveArgumentAt(void);\rEXPORT(sqInt) primitiveCanReceiveSignals(sqInt anIntegerPid);\rEXPORT(sqInt) primitiveChdir(void);\rEXPORT(sqInt) primitiveCreatePipe(void);\rEXPORT(sqInt) primitiveCreatePipeWithSessionIdentifier(void);\rEXPORT(sqInt) primitiveDupTo(sqInt oldFileDescriptor, sqInt newFileDescriptor);\rEXPORT(sqInt) primitiveEnvironmentAt(void);\rEXPORT(sqInt) primitiveEnvironmentAtSymbol(void);\rEXPORT(sqInt) primitiveErrorMessageAt(void);\rEXPORT(sqInt) primitiveFileProtectionMask(void);\rEXPORT(sqInt) primitiveFileStat(void);\rEXPORT(sqInt) primitiveFixPointersInArrayOfStrings(void);\rEXPORT(sqInt) primitiveForkAndExecInDirectory(void);\rEXPORT(sqInt) primitiveForkExec(void);\rEXPORT(sqInt) primitiveForkSqueak(void);\rEXPORT(sqInt) primitiveForkSqueakWithoutSigHandler(void);\rEXPORT(sqInt) primitiveForwardSignalToSemaphore(void);\rEXPORT(sqInt) primitiveGetCurrentWorkingDirectory(void);\rEXPORT(sqInt) primitiveGetEGid(void);\rEXPORT(sqInt) primitiveGetEUid(void);\rEXPORT(sqInt) primitiveGetGid(void);\rEXPORT(sqInt) primitiveGetPGid(void);\rEXPORT(sqInt) primitiveGetPGrp(void);\rEXPORT(sqInt) primitiveGetPPid(void);\rEXPORT(sqInt) primitiveGetPid(void);\rEXPORT(sqInt) primitiveGetSession(void);\rEXPORT(sqInt) primitiveGetStdErrHandle(void);\rEXPORT(sqInt) primitiveGetStdErrHandleWithSessionIdentifier(void);\rEXPORT(sqInt) primitiveGetStdInHandle(void);\rEXPORT(sqInt) primitiveGetStdInHandleWithSessionIdentifier(void);\rEXPORT(sqInt) primitiveGetStdOutHandle(void);\rEXPORT(sqInt) primitiveGetStdOutHandleWithSessionIdentifier(void);\rEXPORT(sqInt) primitiveGetThreadID(void);\rEXPORT(sqInt) primitiveGetUid(void);\rEXPORT(sqInt) primitiveIsAtEndOfFile(void);\rEXPORT(sqInt) primitiveKillOnExit(void);\rEXPORT(sqInt) primitiveLockFileRegion(void);\rEXPORT(sqInt) primitiveMakePipe(void);\rEXPORT(sqInt) primitiveMakePipeWithSessionIdentifier(void);\rEXPORT(sqInt) primitiveModuleName(void);\rEXPORT(sqInt) primitiveNice(void);\rEXPORT(sqInt) primitivePutEnv(void);\rEXPORT(sqInt) primitiveRealpath(void);\rEXPORT(sqInt) primitiveReapChildProcess(void);\rEXPORT(sqInt) primitiveSQFileFlush(void);\rEXPORT(sqInt) primitiveSQFileFlushWithSessionIdentifier(void);\rEXPORT(sqInt) primitiveSQFileSetBlocking(void);\rEXPORT(sqInt) primitiveSQFileSetBlockingWithSessionIdentifier(void);\rEXPORT(sqInt) primitiveSQFileSetNonBlocking(void);\rEXPORT(sqInt) primitiveSQFileSetNonBlockingWithSessionIdentifier(void);\rEXPORT(sqInt) primitiveSQFileSetUnbuffered(void);\rEXPORT(sqInt) primitiveSQFileSetUnbufferedWithSessionIdentifier(void);\rEXPORT(sqInt) primitiveSemaIndexFor(void);\rEXPORT(sqInt) primitiveSendSigabrtTo(sqInt anIntegerPid);\rEXPORT(sqInt) primitiveSendSigalrmTo(sqInt anIntegerPid);\rEXPORT(sqInt) primitiveSendSigchldTo(sqInt anIntegerPid);\rEXPORT(sqInt) primitiveSendSigcontTo(sqInt anIntegerPid);\rEXPORT(sqInt) primitiveSendSighupTo(sqInt anIntegerPid);\rEXPORT(sqInt) primitiveSendSigintTo(sqInt anIntegerPid);\rEXPORT(sqInt) primitiveSendSigkillTo(sqInt anIntegerPid);\rEXPORT(sqInt) primitiveSendSigpipeTo(sqInt anIntegerPid);\rEXPORT(sqInt) primitiveSendSigquitTo(sqInt anIntegerPid);\rEXPORT(sqInt) primitiveSendSigstopTo(sqInt anIntegerPid);\rEXPORT(sqInt) primitiveSendSigtermTo(sqInt anIntegerPid);\rEXPORT(sqInt) primitiveSendSigusr1To(sqInt anIntegerPid);\rEXPORT(sqInt) primitiveSendSigusr2To(sqInt anIntegerPid);\rEXPORT(sqInt) primitiveSetPGid(void);\rEXPORT(sqInt) primitiveSetPGrp(void);\rEXPORT(sqInt) primitiveSetSemaIndex(void);\rEXPORT(sqInt) primitiveSetSid(void);\rEXPORT(sqInt) primitiveSigChldNumber(void);\rEXPORT(sqInt) primitiveSigHupNumber(void);\rEXPORT(sqInt) primitiveSigIntNumber(void);\rEXPORT(sqInt) primitiveSigKillNumber(void);\rEXPORT(sqInt) primitiveSigPipeNumber(void);\rEXPORT(sqInt) primitiveSigQuitNumber(void);\rEXPORT(sqInt) primitiveSigTermNumber(void);\rEXPORT(sqInt) primitiveSigUsr1Number(void);\rEXPORT(sqInt) primitiveSigUsr2Number(void);\rEXPORT(sqInt) primitiveSizeOfInt(void);\rEXPORT(sqInt) primitiveSizeOfPointer(void);\rEXPORT(sqInt) primitiveTestEndOfFileFlag(void);\rEXPORT(sqInt) primitiveTestLockableFileRegion(void);\rEXPORT(sqInt) primitiveUnixFileClose(sqInt anIntegerFileNumber);\rEXPORT(sqInt) primitiveUnixFileNumber(void);\rEXPORT(sqInt) primitiveUnlockFileRegion(void);\rEXPORT(sqInt) primitiveUnsetEnv(void);\rEXPORT(sqInt) primitiveVersionString(void);\r#pragma export off\rstatic void reapChildProcess(int sigNum);\rstatic sqInt resendSignal(int sigNum);\rstatic void restoreDefaultSignalHandlers(void);\rstatic sqInt sandboxSecurity(void);\rstatic sqInt securityHeurisitic(void);\rstatic unsigned char * semaphoreIndices(void);\rstatic sqInt sendSignaltoPid(sqInt sig, sqInt pid);\rstatic void sendSignalToPids(void);\rstatic SESSIONIDENTIFIERTYPE sessionIdentifierFrom(sqInt aByteArray);\rstatic SESSIONIDENTIFIERTYPE sessionIdentifierFromSqFile(SQFile *sqFile);\r#pragma export on\rEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\r#pragma export off\rstatic void setSigChldDefaultHandler(void);\rstatic void setSigChldHandler(void);\rstatic void setSigIntDefaultHandler(void);\rstatic void setSigIntIgnore(void);\rstatic void setSigPipeDefaultHandler(void);\rstatic sqInt setSigPipeHandler(void);\rstatic void setSigPipeIgnore(void);\rstatic void * setSignalNumberhandler(sqInt anInteger, void *signalHandlerAddress);\r#pragma export on\rEXPORT(sqInt) shutdownModule(void);\r#pragma export off\rstatic sqInt sigAbrtNumber(void);\rstatic sqInt sigAlrmNumber(void);\rstatic sqInt sigChldNumber(void);\rstatic sqInt sigContNumber(void);\rstatic void * sigDefaultNumber(void);\rstatic void * sigErrorNumber(void);\rstatic sqInt sigHupNumber(void);\rstatic void * sigIgnoreNumber(void);\rstatic sqInt sigIntNumber(void);\rstatic sqInt sigKillNumber(void);\rstatic sqInt sigPipeNumber(void);\rstatic sqInt sigQuitNumber(void);\rstatic sqInt sigStopNumber(void);\rstatic sqInt sigTermNumber(void);\rstatic sqInt sigUsr1Number(void);\rstatic sqInt sigUsr2Number(void);\rstatic sqInt signalArraySize(void);\rstatic void ** signalHandlers(void);\rstatic sqInt sizeOfInt(void);\rstatic sqInt sizeOfPointer(void);\rstatic sqInt sizeOfSession(void);\rstatic int socketDescriptorFrom(sqInt sqSocketOop);\rstatic sqInt socketRecordSize(void);\rstatic SQSocket * socketValueOf(sqInt anSQSocketRecord);\rstatic sqInt stringFromCString(const char *aCString);\rstatic char * transientCStringFromString(sqInt aString);\rstatic int unixFileNumber(FILEHANDLETYPE fileHandle);\rstatic char * versionString(void);\r/*** Variables ***/\r\r#ifdef SQUEAK_BUILTIN_PLUGIN\rextern\r#endif\rstruct VirtualMachine* interpreterProxy;\rstatic const char *moduleName =\r#ifdef SQUEAK_BUILTIN_PLUGIN\r\t\"UnixOSProcessPlugin 23 January 2011 (i)\"\r#else\r\t\"UnixOSProcessPlugin 23 January 2011 (e)\"\r#endif\r;\rstatic void *originalSigHandlers[NSIG];\rstatic int osprocessSandboxSecurity;\rstatic pid_t *pidArray = NULL;\rstatic sqInt pidCount;\rstatic unsigned char semaIndices[NSIG];\rstatic sqInt sigChldSemaIndex;\rstatic void *sigHandlers[NSIG];\rstatic int sigNumToSend = SIGTERM;\rstatic pthread_t vmThread;\r\r\r\r/*\tDeprecated. This primitive has been replaced by a similar implementation in AioPlugin. */\r/*\tThis function is called to signal a Smalltalk Semaphore when an asynchronous event is\r\tdetected. When translated to C, the name of this method is aioForwardwithDataandFlags.\r\tThe event handler is set up by #primitiveAioHandle. */\r\rstatic void aioForwardwithDataandFlags(int fd, void *data, int flags) {\r    sqInt *pfd;\r    sqInt semaIndex;\r\r\tpfd = data;\r\tsemaIndex = *pfd;\r\tinterpreterProxy->signalSemaphoreWithIndex(semaIndex);\r}\r\r\r/*\tAnswer a new null-terminated C string copied from aString. The C string\r\tis allocated from the C runtime heap. See transientCStringFromString for\r\ta version which allocates from object memory.\r\tCaution: This may invoke the garbage collector. */\r\rstatic char * cStringFromString(sqInt aString) {\r    char *cString;\r    sqInt len;\r    char *sPtr;\r\r\tsPtr = interpreterProxy->arrayValueOf(aString);\r\tlen = interpreterProxy->sizeOfSTArrayFromCPrimitive(sPtr);\r\r\t/* Space for a null terminated C string. */\r\r\tcString = callocWrappersize(len + 1, 1);\r\t(char *) strncpy (cString, sPtr, len);\r\treturn cString;\r}\r\r\r/*\tUsing malloc() and calloc() is something I would like to avoid, since it is\r\tlikely to cause problems some time in the future if somebody redesigns\r\tobject memory allocation. This wrapper just makes it easy to find senders\r\tof calloc() in my code. -dtl */\r\rstatic void * callocWrappersize(sqInt count, sqInt objectSize) {\r\treturn calloc(count, objectSize);\r}\r\r\r/*\tself cCode: 'memcpy(charArray2, charArray1, len' */\r\rstatic sqInt copyBytesFromtolength(void *charArray1, void *charArray2, sqInt len) {\r\tmemcpy(charArray2, charArray1, len);\r}\r\r\r/*\tCreate a pipe and populate the readerIOStream and writerIOStream variables.\r\tThe SIGPIPE handler must have been set before creating the pipe. Answer true for\r\tsuccess, else false. */\r\rstatic sqInt createPipeForReaderwriter(FILEHANDLETYPE *readerIOStreamPtr, FILEHANDLETYPE *writerIOStreamPtr) {\r    int filedes[2];\r\r\tif ((pipe(filedes)) == -1) {\r\t\treturn 0;\r\t} else {\r\t\t*writerIOStreamPtr= (FILE *) fdopen (filedes[1], \"a\");\r\t\t*readerIOStreamPtr= (FILE *) fdopen (filedes[0], \"r\");\r\t\treturn 1;\r\t}\r}\r\r\r/*\tAnswer the size of the file descriptor table for a process. I am not sure of the most portable\r\tway to do this. If this implementation does not work on your Unix platform, try changing\r\tit to answer the value of FOPEN:=MAX, which will hopefully be defined in stdio.h. If\r\tall else fails, just hard code it to answer 20, which would be safe for any Unix. */\r\rstatic sqInt descriptorTableSize(void) {\r\treturn getdtablesize();\r}\r\r\r/*\tDup a file descriptor to allow it to be attached as the standard error when we\r\texec() a new executable. This is Unix specific, in that it assumes that file descriptor\r\t0 is stdin, 1 is stdout, and 2 is stderr. The dup2() call is used to copy the open file\r\tdescriptors into file descriptors 0, 1 and 2 so that the image which we execute will\r\tuse them as stdin, stdout, and stderr. */\r\rstatic void dupToStdErr(sqInt anSQFileDataStructure) {\r    sqInt filenoToDup;\r\r\t/* begin fileDescriptorFrom: */\r\tif (!((((interpreterProxy->isBytes(anSQFileDataStructure)) && ((interpreterProxy->byteSizeOf(anSQFileDataStructure)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(anSQFileDataStructure))))) && (isNonNullSQFile(anSQFileDataStructure)))) {\r\t\tfilenoToDup = -1;\r\t\tgoto l1;\r\t}\r\tfilenoToDup = fileno(fileHandleFrom(anSQFileDataStructure));\rl1:\t/* end fileDescriptorFrom: */;\r\tif (!(filenoToDup < 0)) {\r\t\tif (!(filenoToDup == 2)) {\r\t\t\tfflush(stderr);\r\t\t\tdup2(filenoToDup, 2);\r\t\t}\r\t}\r}\r\r\r/*\tDup a file descriptor to allow it to be attached as the standard input when we\r\texec() a new executable. This is Unix specific, in that it assumes that file descriptor\r\t0 is stdin, 1 is stdout, and 2 is stderr. The dup2() call is used to copy the open file\r\tdescriptors into file descriptors 0, 1 and 2 so that the image which we execute will\r\tuse them as stdin, stdout, and stderr. */\r\rstatic void dupToStdIn(sqInt anSQFileDataStructure) {\r    sqInt filenoToDup;\r\r\t/* begin fileDescriptorFrom: */\r\tif (!((((interpreterProxy->isBytes(anSQFileDataStructure)) && ((interpreterProxy->byteSizeOf(anSQFileDataStructure)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(anSQFileDataStructure))))) && (isNonNullSQFile(anSQFileDataStructure)))) {\r\t\tfilenoToDup = -1;\r\t\tgoto l1;\r\t}\r\tfilenoToDup = fileno(fileHandleFrom(anSQFileDataStructure));\rl1:\t/* end fileDescriptorFrom: */;\r\tif (!(filenoToDup < 0)) {\r\t\tif (!(filenoToDup == 0)) {\r\t\t\tfflush(stdin);\r\t\t\tdup2(filenoToDup, 0);\r\t\t\trewind(stdin);\r\t\t}\r\t}\r}\r\r\r/*\tDup a file descriptor to allow it to be attached as the standard output when we\r\texec() a new executable. This is Unix specific, in that it assumes that file descriptor\r\t0 is stdin, 1 is stdout, and 2 is stderr. The dup2() call is used to copy the open file\r\tdescriptors into file descriptors 0, 1 and 2 so that the image which we execute will\r\tuse them as stdin, stdout, and stderr. */\r\rstatic void dupToStdOut(sqInt anSQFileDataStructure) {\r    sqInt filenoToDup;\r\r\t/* begin fileDescriptorFrom: */\r\tif (!((((interpreterProxy->isBytes(anSQFileDataStructure)) && ((interpreterProxy->byteSizeOf(anSQFileDataStructure)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(anSQFileDataStructure))))) && (isNonNullSQFile(anSQFileDataStructure)))) {\r\t\tfilenoToDup = -1;\r\t\tgoto l1;\r\t}\r\tfilenoToDup = fileno(fileHandleFrom(anSQFileDataStructure));\rl1:\t/* end fileDescriptorFrom: */;\r\tif (!(filenoToDup < 0)) {\r\t\tif (!(filenoToDup == 1)) {\r\t\t\tfflush(stdout);\r\t\t\tdup2(filenoToDup, 1);\r\t\t}\r\t}\r}\r\r\r/*\tAnswer the OS file descriptor, an integer value, from a SQFile data structure\r\tbyte array, or answer -1 if unable to obtain the file descriptor (probably due\r\tto receiving an incorrect type of object as aFileHandle). */\r/*\treturn type should be int, but skip the declaration to permit inlining */\r\rstatic sqInt fileDescriptorFrom(sqInt aSQFileByteArray) {\r\tif (!((((interpreterProxy->isBytes(aSQFileByteArray)) && ((interpreterProxy->byteSizeOf(aSQFileByteArray)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(aSQFileByteArray))))) && (isNonNullSQFile(aSQFileByteArray)))) {\r\t\treturn -1;\r\t}\r\treturn fileno(fileHandleFrom(aSQFileByteArray));\r}\r\r\r/*\tAnswer a file handle from a SQFile structure. On most platforms, this\r\twill be a (FILE *). On Win32, it is a HANDLE. */\r\rstatic FILEHANDLETYPE fileHandleFrom(sqInt sqFileStructByteArray) {\r    SQFile *sqFile;\r\r\tsqFile = interpreterProxy->arrayValueOf(sqFileStructByteArray);\r\treturn sqFile->file;\r}\r\r\r/*\tAnswer the size of a SQFile data structure in bytes. */\r\rstatic sqInt fileRecordSize(void) {\r\treturn sizeof(SQFile);\r}\r\r\r/*\tReturn a pointer to the first byte of of the SQFile data structure file record within\r\tanSQFileRecord, which is expected to be a ByteArray of size self>>fileRecordSize. */\r\rstatic SQFile * fileValueOf(sqInt anSQFileRecord) {\r\treturn interpreterProxy->arrayValueOf(anSQFileRecord);\r}\r\r\r/*\tUse the address offsets in offsetArray to fix up the pointers in cStringArray.\r\tThe result is a C array of pointers to char, used for argv and env vectors. */\r\rstatic sqInt fixPointersInArrayOfStringswithOffsetscount(char *flattenedArrayOfStrings, sqInt *offsetArray, sqInt count) {\r    sqInt idx;\r    char **ptr;\r\r\tptr = ((char **) flattenedArrayOfStrings);\r\tidx = 0;\r\twhile (idx < count) {\r\t\tptr[idx] = (flattenedArrayOfStrings + (((offsetArray[idx]) >> 1)));\r\t\tidx += 1;\r\t}\r}\r\r\r/*\tFork a child OS process, and do an exec in the child. The parent continues on in\r\tSmalltalk, and this method answers the pid of the child which was created. If\r\tuseSignalHandler is true, set the signal handler for SIGCHLD. Otherwise, assume\r\tthat death of child events are handled through some other mechanism.\r\r\tIn this implementation, memory for the argument and environment arrays is allocated\r\tin the image prior to calling this primitive. This allows us to avoid invoking the\r\tgarbage collector in this primitive (thereby moving the locations of environment\r\tand argument memory), but comes at the cost of twiddling C pointers here in the\r\tprimitive. An alternative to this whole mess is just to malloc the environment and\r\targument vectors, but I think it is a good idea to avoid malloc as much as possible\r\tso as not to limit future ObjectMemory implementations.\r\r\tThis primitive replaces #primitiveForkAndExec from earlier versions of the plugin.\r\tThe new name permits backward compatibility for an image running on a VM\r\twhich does not yet have the updated plugin. This implementation uses a different\r\targument format on the stack, and differs functionally in that the child now closes\r\tall file descriptors (including sockets) not required (that is, everything except stdin,\r\tstdout, and stderr on descriptors 0, 1 and 2). This eliminates some flakey behavior\r\tin child processes connected to Squeak by pipes, which failed to exit at expected times\r\tdue to the old file descriptors remaining open. This is also cleaner in that garbage\r\tdescriptors are not left hanging around the the child.\r\r\tOn entry, the stack contains:\r\t\t0: workingDir, a null terminated string specifying the working directory to use, or nil.\r\t\t1: envOffsets, an array of integers for calculating environment string address offsets.\r\t\t2: envVecBuffer, a String buffer containing environment strings arranged to look like char **.\r\t\t3: argOffsets, an array of integers for calculating argument string address offsets.\r\t\t4: argVecBuffer, a String buffer containing argument strings arranged to look like char **.\r\t\t5: stdErr, a ByteArray handle.\r\t\t6: stdOut, a ByteArray handle.\r\t\t7: stdIn, a ByteArray handle.\r\t\t8: executableFile, a null terminated string with the name of the file to execute.\r\t\t9: the sender */\r\rstatic sqInt forkAndExecInDirectory(sqInt useSignalHandler) {\r    sqInt argCount;\r    sqInt *argOffsetPtr;\r    sqInt argOffsets;\r    sqInt argVecBuffer;\r    char **args;\r    char *argsPtr;\r    char **env;\r    sqInt envCount;\r    sqInt *envOffsetPtr;\r    sqInt envOffsets;\r    char *envPtr;\r    extern char **envVec;\r    sqInt envVecBuffer;\r    sqInt executableFile;\r    sqInt handleCount;\r    sqInt idx;\r    struct itimerval intervalTimer;\r    pid_t pid;\r    char *progNamePtr;\r    sqInt pwd;\r    char *pwdPtr;\r    struct itimerval saveIntervalTimer;\r    sqInt stdErr;\r    sqInt stdIn;\r    sqInt stdOut;\r    sqInt workingDir;\r    sqInt sigNum;\r\r\tif (useSignalHandler) {\r\t\tsetSigChldHandler();\r\t}\r\tif ((sandboxSecurity()) == 1) {\r\t\tinterpreterProxy->pop(10);\r\t\tinterpreterProxy->pushInteger(-1);\r\t} else {\r\t\tintervalTimer.it_interval.tv_sec = 0;\r\t\tintervalTimer.it_interval.tv_usec = 0;\r\t\tintervalTimer.it_value.tv_sec = 0;\r\t\tintervalTimer.it_value.tv_usec = 0;\r\t\tsetitimer (ITIMER_REAL, &intervalTimer, &saveIntervalTimer);\r\t\tif ((pid = vfork()) == 0) {\r\r\t\t\t/* This is the new child process */\r\r\t\t\tworkingDir = interpreterProxy->stackObjectValue(0);\r\t\t\tenvOffsets = interpreterProxy->stackObjectValue(1);\r\t\t\tenvVecBuffer = interpreterProxy->stackObjectValue(2);\r\t\t\targOffsets = interpreterProxy->stackObjectValue(3);\r\t\t\targVecBuffer = interpreterProxy->stackObjectValue(4);\r\t\t\tstdErr = interpreterProxy->stackObjectValue(5);\r\t\t\tstdOut = interpreterProxy->stackObjectValue(6);\r\t\t\tstdIn = interpreterProxy->stackObjectValue(7);\r\r\t\t\t/* If a new working directory has been specified, try to chdir() to it. */\r\r\t\t\texecutableFile = interpreterProxy->stackObjectValue(8);\r\t\t\tif (workingDir != (interpreterProxy->nilObject())) {\r\t\t\t\tpwdPtr = interpreterProxy->firstIndexableField(workingDir);\r\t\t\t\tif (pwdPtr == 0) {\r\t\t\t\t\tfprintf(stderr, \"bad workingDir parameter\\n\");\r\t\t\t\t\t_exit(-1);\r\t\t\t\t} else {\r\t\t\t\t\tpwd = chdir(pwdPtr);\r\t\t\t\t\tif (pwd != 0) {\r\t\t\t\t\t\tperror(\"chdir\");\r\t\t\t\t\t\t_exit(-1);\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t}\r\r\t\t\t/* Dup the file handles to attach the new child process to the right streams\r\t\t\ton descriptors 0, 1 and 2. */\r\r\t\t\tprogNamePtr = interpreterProxy->arrayValueOf(executableFile);\r\t\t\tif (!(stdErr == (interpreterProxy->nilObject()))) {\r\t\t\t\tdupToStdErr(stdErr);\r\t\t\t}\r\t\t\tif (!(stdOut == (interpreterProxy->nilObject()))) {\r\t\t\t\tdupToStdOut(stdOut);\r\t\t\t}\r\t\t\tif (!(stdIn == (interpreterProxy->nilObject()))) {\r\t\t\t\tdupToStdIn(stdIn);\r\t\t\t}\r\r\t\t\t/* First Unix file descriptor after stdin, stdout, stderr. */\r\r\t\t\tidx = 3;\r\t\t\thandleCount = descriptorTableSize();\r\t\t\twhile (idx < handleCount) {\r\t\t\t\tclose(idx);\r\t\t\t\tidx += 1;\r\t\t\t}\r\t\t\tif (envVecBuffer == (interpreterProxy->nilObject())) {\r\t\t\t\tenv = envVec;\r\t\t\t} else {\r\t\t\t\tenvCount = interpreterProxy->stSizeOf(envOffsets);\r\t\t\t\tenvPtr = interpreterProxy->arrayValueOf(envVecBuffer);\r\t\t\t\tenvOffsetPtr = interpreterProxy->firstIndexableField(envOffsets);\r\t\t\t\tfixPointersInArrayOfStringswithOffsetscount(envPtr, envOffsetPtr, envCount);\r\t\t\t\tenv = ((char **) envPtr);\r\t\t\t}\r\t\t\targCount = interpreterProxy->stSizeOf(argOffsets);\r\t\t\targsPtr = interpreterProxy->arrayValueOf(argVecBuffer);\r\t\t\targOffsetPtr = interpreterProxy->firstIndexableField(argOffsets);\r\t\t\tfixPointersInArrayOfStringswithOffsetscount(argsPtr, argOffsetPtr, argCount);\r\r\t\t\t/* Clean things up before clobbering the running image. */\r\t\t\t/* Note: If any file descriptors, signal handlers, or other references to external\r\t\t\tresources need to be cleaned up, do it here. */\r\r\t\t\targs = ((char **) argsPtr);\r\t\t\t/* begin restoreDefaultSignalHandlers */\r\t\t\tsigNum = 1;\r\t\t\twhile (sigNum <= (signalArraySize())) {\r\t\t\t\tif ((semaIndices[sigNum]) > 0) {\r\t\t\t\t\tsetSignalNumberhandler(sigNum, originalSigHandlers[sigNum]);\r\t\t\t\t}\r\t\t\t\tsigNum += 1;\r\t\t\t}\r\t\t\tif ((execve(progNamePtr, args, env)) == -1) {\r\t\t\t\tperror(progNamePtr);\r\t\t\t\t_exit(-1);\r\t\t\t} else {\r\t\t\t\t/* Can't get here from there */;\r\t\t\t}\r\t\t} else {\r\t\t\tsetitimer (ITIMER_REAL, &saveIntervalTimer, 0L);\r\t\t\tinterpreterProxy->pop(10);\r\t\t\tinterpreterProxy->pushInteger(pid);\r\t\t}\r\t}\r}\r\r\r/*\tFork a child process, and continue running squeak in the child process.\r\tAnswer the result of the fork() call, either the child pid or zero.\r\r\tAfter calling fork(), two OS processes exist, one of which is the child of the other. On\r\tsystems which implement copy-on-write memory management, and which support the\r\tfork() system call, both processes will be running Smalltalk images, and will be sharing\r\tthe same memory space. In the original OS process, the resulting value of pid is the\r\tprocess id of the child process (a non-zero integer). In the child process, the value of\r\tpid is zero.\r\r\tThe child recreates sufficient external resources to continue running. This is done by\r\tattaching to a new X session. The child is otherwise a copy of the parent process, and\r\twill continue executing the Smalltalk image at the same point as its parent. The return\r\tvalue of this primitive may be used by the two running Smalltalk images to determine\r\twhich is the parent and which is the child.\r\r\tThe child should not depend on using existing connections to external resources. For\r\texample, the child may lose its connections to stdin, stdout, and stderr after its parent\r\texits.\r\r\tThe new child image does not start itself from the image in the file system; rather it is\r\ta clone of the parent image as it existed at the time of primitiveForkSqueak. For this\r\treason, the parent and child should agree in advance as to whom is allowed to save the\r\timage to the file system, otherwise one Smalltalk may overwrite the image of the other.\r\r\tThis is a simple call to fork(), rather than the more common idiom of vfork() followed\r\tby exec(). The vfork() call cannot be used here because it is designed to be followed by\r\tan exec(), and its semantics require the parent process to wait for the child to exit. See\r\tthe BSD programmers documentation for details. */\r\rEXPORT(pid_t) forkSqueak(sqInt useSignalHandler) {\r    struct itimerval intervalTimer;\r    pid_t pid;\r    struct itimerval saveIntervalTimer;\r\r\tintervalTimer.it_interval.tv_sec = 0;\r\tintervalTimer.it_interval.tv_usec = 0;\r\tintervalTimer.it_value.tv_sec = 0;\r\tintervalTimer.it_value.tv_usec = 0;\r\tsetitimer (ITIMER_REAL, &intervalTimer, &saveIntervalTimer);\r\tif (useSignalHandler) {\r\t\tsetSigChldHandler();\r\t}\r\r\t/* Enable the timer again before resuming Smalltalk. */\r\r\tpid = fork();\r\tsetitimer (ITIMER_REAL, &saveIntervalTimer, 0L);\r\treturn pid;\r}\r\r\r/*\tSet a signal handler in the VM which will signal a Smalltalk semaphore at\r\tsemaphoreIndex whenever an external signal sigNum is received. Answer the\r\tprior value of the signal handler. If semaphoreIndex is zero, the handler is\r\tunregistered, and the VM returns to its default behavior for handling that\r\tsignal. A handler must be unregistered before it can be registered again.\r\r\tThe Smalltalk semaphore is expected to be kept at the same index location\r\tindefinitely during the lifetime of a Squeak session. If that is not the case, the\r\thandler must be unregistered prior to unregistering the Smalltalk semaphore. */\r\rstatic void * forwardSignaltoSemaphoreAt(sqInt sigNum, sqInt semaphoreIndex) {\r    void *oldHandler;\r\r\tif (semaphoreIndex == 0) {\r\t\tif ((semaIndices[sigNum]) > 0) {\r\r\t\t\t/* Disable the handler */\r\r\t\t\toldHandler = originalSigHandlers[sigNum];\r\t\t\tsetSignalNumberhandler(sigNum, oldHandler);\r\t\t\tsemaIndices[sigNum] = 0;\r\t\t\treturn oldHandler;\r\t\t} else {\r\t\t\treturn sigErrorNumber();\r\t\t}\r\t}\r\tif ((semaIndices[sigNum]) > 0) {\r\t\treturn sigErrorNumber();\r\t}\r\toldHandler = setSignalNumberhandler(sigNum, handleSignalFunctionAddress());\r\tif (oldHandler != (sigErrorNumber())) {\r\t\toriginalSigHandlers[sigNum] = oldHandler;\r\t\tsemaIndices[sigNum] = semaphoreIndex;\r\t}\r\treturn oldHandler;\r}\r\r\r/*\tNote: This is coded so that plugins can be run from Squeak. */\r\rstatic VirtualMachine * getInterpreter(void) {\r\treturn interpreterProxy;\r}\r\r\r/*\tNote: This is hardcoded so it can be run from Squeak.\r\tThe module name is used for validating a module *after*\r\tit is loaded to check if it does really contain the module\r\twe're thinking it contains. This is important! */\r\rEXPORT(const char*) getModuleName(void) {\r\treturn moduleName;\r}\r\rstatic sqInt getThisSessionIdentifier(void) {\r\treturn interpreterProxy->getThisSessionID();\r}\r\rstatic sqInt halt(void) {\r\t;\r}\r\r\r/*\tThis is a signal handler function which runs when a signal is received\r\tfrom the operating system. When the signal is received, a Smalltalk Semaphore\r\tis signaled. This effectively passes the external signal to Squeak to allow\r\tit to be handled in Smalltalk. */\r\rstatic void handleSignal(int sigNum) {\r    sqInt semaIndex;\r\r\tsemaIndex = semaIndices[sigNum];\r\tforwardSignaltoSemaphoreAt(sigNum, semaIndex);\r\tif (isVmThread()) {\r\t\tif (semaIndex > 0) {\r\t\t\tinterpreterProxy->signalSemaphoreWithIndex(semaIndex);\r\t\t}\r\t} else {\r\t\tmaskForThisThreadAndResend(sigNum);\r\t}\r}\r\rstatic void * handleSignalFunctionAddress(void) {\r\treturn handleSignal;\r}\r\rEXPORT(sqInt) initialiseModule(void) {\r\tosprocessSandboxSecurity = -1;\r\tinitializeModuleForPlatform();\r\treturn 1;\r}\r\r\r/*\tPlatform specific initialization */\r\rstatic sqInt initializeModuleForPlatform(void) {\r\tpidCount = 0;\r\tatexit(sendSignalToPids);\r\tvmThread = pthread_self();\r}\r\r\r/*\tCheck for the common failure mode of a SQFile record with all zeros. */\r\rstatic sqInt isNonNullSQFile(sqInt objectPointer) {\r    sqInt idx;\r    unsigned char *sqFileBytes;\r\r\tsqFileBytes = interpreterProxy->arrayValueOf(objectPointer);\r\tidx = 0;\r\twhile (idx < (fileRecordSize())) {\r\t\tif ((sqFileBytes[idx]) != 0) {\r\t\t\treturn 1;\r\t\t}\r\t\tidx += 1;\r\t}\r\treturn 0;\r}\r\r\r/*\tCheck for the common failure mode of a SQSocket record with all zeros. */\r\rstatic sqInt isNullSQSocket(sqInt objectPointer) {\r    sqInt idx;\r    unsigned char *sqSocketBytes;\r\r\tsqSocketBytes = interpreterProxy->arrayValueOf(objectPointer);\r\tidx = 0;\r\twhile (idx < (socketRecordSize())) {\r\t\tif ((sqSocketBytes[idx]) != 0) {\r\t\t\treturn 0;\r\t\t}\r\t\tidx += 1;\r\t}\r\treturn 1;\r}\r\r\r/*\tAnswer true if objectPointer appears to be a valid SQFile ByteArray.\r\tThis check is appropriate if objectPointer has been passed as a parameter\r\tto a primitive, and is expected to represent a valid file reference. */\r\rstatic sqInt isSQFileObject(sqInt objectPointer) {\r\treturn (((interpreterProxy->isBytes(objectPointer)) && ((interpreterProxy->byteSizeOf(objectPointer)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(objectPointer))))) && (isNonNullSQFile(objectPointer));\r}\r\r\r/*\tAnswer true if objectPointer appears to be a valid SQSocket ByteArray. This check\r\tis appropriate if objectPointer has been passed as a parameter to a primitive, and\r\tis expected to represent a valid socket reference. */\r\rstatic sqInt isSQSocketObject(sqInt objectPointer) {\r\treturn ((interpreterProxy->isBytes(objectPointer)) && ((interpreterProxy->byteSizeOf(objectPointer)) == (socketRecordSize()))) && (!(isNullSQSocket(objectPointer)));\r}\r\r\r/*\tAnswer true if the file session matches the current interpreter session identifier. */\r\rstatic sqInt isValidFileSession(sqInt objectPointer) {\r\treturn (interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(objectPointer)));\r}\r\r\r/*\tAnswer true if this method is executing in the context of the pthread in\r\twhich the interpreter executes. */\r\rstatic sqInt isVmThread(void) {\r    pthread_t thisThread;\r\r\tthisThread = pthread_self();\r\treturn pthread_equal(thisThread, vmThread);\r}\r\r\r/*\tCreate a pipe and populate the readerIOStream and writerIOStream variables.\r\tMake sure the SIGPIPE handler is set before creating the pipe. Answer true for\r\tsuccess, else false */\r\rstatic sqInt makePipeForReaderwriter(FILEHANDLETYPE *readerIOStreamPtr, FILEHANDLETYPE *writerIOStreamPtr) {\r    int filedes[2];\r\r\t/* begin setSigPipeHandler */\r\t/* begin setSigPipeIgnore */\r\tsetSignalNumberhandler(sigPipeNumber(), sigIgnoreNumber());\r\tif ((pipe(filedes)) == -1) {\r\t\treturn 0;\r\t} else {\r\t\t*writerIOStreamPtr= (FILE *) fdopen (filedes[1], \"a\");\r\t\t*readerIOStreamPtr= (FILE *) fdopen (filedes[0], \"r\");\r\t\treturn 1;\r\t}\r}\r\r\r/*\tPrevent any future instances of signal sigNum from being delivered\r\tto this pthread, and reschedule the current signal to be delivered to\r\tthis OS process. Any pthread other than the interpreter thread will\r\tcall this method. Eventually the signal will be delivered to the\r\tinterpreter thread, which will handle it in the context of the interpreter\r\tthread. */\r\rstatic sqInt maskForThisThreadAndResend(int sigNum) {\r\tmaskSignalForThisThread(sigNum);\r\tresendSignal(sigNum);\r}\r\r\r/*\tPrevent future invocations of signal sigNum from being delivered to this pthread. */\r\rstatic sqInt maskSignalForThisThread(int sigNum) {\r    sigset_t sigset;\r\r\tsigemptyset(&sigset);\r\tsigaddset(&sigset, sigNum);\r\tpthread_sigmask(SIG_BLOCK, &sigset, NULL);\r}\r\r\r/*\tThe module with the given name was just unloaded.\r\tMake sure we have no dangling references. */\r\rEXPORT(sqInt) moduleUnloaded(char *aModuleName) {\r}\r\rstatic sqInt msg(char *s) {\r\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\r}\r\r\r/*\tA pthread_t is an unsigned long, which may be 8 bytes on some 64 bit\r\tplatforms. This stores the value in a byte array that can be easily\r\tpassed to the image. */\r\rstatic sqInt newPthreadTypeByteArray(sqInt aPthreadType) {\r    sqInt byteArray;\r    sqInt len;\r    pthread_t *ptr;\r\r\tlen = sizeof(pthread_t);\r\tbyteArray = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), len);\r\tptr = interpreterProxy->arrayValueOf(byteArray);\r\t*ptr = aPthreadType;\r\treturn byteArray;\r}\r\r\r/*\tAnswer a new ByteArray sized to contain a SQFile data structure. */\r\rstatic sqInt newSQFileByteArray(void) {\r\treturn interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\r}\r\r\r/*\tAnswer a new ByteArray sized to contain a SQSocket data structure. */\r\rstatic sqInt newSQSocketByteArray(void) {\r\treturn interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), socketRecordSize());\r}\r\r\r/*\tAn array of signal handler function addresses, one for each signal type. The\r\tvalue at each entry is the address of the original signal handler function prior\r\tto having set a handler. */\r\rstatic void ** originalSignalHandlers(void) {\r\treturn originalSigHandlers;\r}\r\r\r/*\tAnswer the pointer represented by aByteArray. */\r\rstatic void * pointerFrom(sqInt aByteArray) {\r    sqInt idx;\r    union {void *address; unsigned char bytes[sizeof(void *)];} pointerUnion;\r    unsigned char *ptr;\r\r\tif (!((interpreterProxy->isBytes(aByteArray)) && ((interpreterProxy->stSizeOf(aByteArray)) == (sizeOfPointer())))) {\r\t\treturn null;\r\t}\r\tptr = interpreterProxy->arrayValueOf(aByteArray);\r\tidx = 0;\r\twhile (idx < (sizeOfPointer())) {\r\t\tpointerUnion.bytes[idx] = ptr[idx];\r\t\tidx += 1;\r\t}\r\treturn pointerUnion.address;\r}\r\r\r/*\tDeprecated. This primitive has been replaced by a similar implementation in AioPlugin. */\r/*\tDefinitively disable asynchronous event notification for a descriptor. The\r\tparameter is a sqFile ByteArray representing the ioHandle for a file. */\r\rEXPORT(sqInt) primitiveAioDisable(void) {\r    int fd;\r    sqInt sqFile;\r\r\tsqFile = interpreterProxy->stackObjectValue(0);\r\t/* begin fileDescriptorFrom: */\r\tif (!((((interpreterProxy->isBytes(sqFile)) && ((interpreterProxy->byteSizeOf(sqFile)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFile))))) && (isNonNullSQFile(sqFile)))) {\r\t\tfd = -1;\r\t\tgoto l1;\r\t}\r\tfd = fileno(fileHandleFrom(sqFile));\rl1:\t/* end fileDescriptorFrom: */;\r\tif (fd < 0) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\taioDisable(fd);\r\tinterpreterProxy->pop(2);\r\tinterpreterProxy->pushInteger(fd);\r}\r\r\r/*\tDeprecated. This primitive has been replaced by a similar implementation in AioPlugin. */\r/*\tEnable asynchronous notification for a descriptor. The first parameter is a sqFile\r\tByteArray representing the ioHandle for a file, the second parameter is the index\r\tof a Semaphore to be notified, and the third parameter is a flag indicating that\r\tsqFile represents an external object and should not be closed on termination of\r\taio handling. Answer the semaphore index. */\r\rEXPORT(sqInt) primitiveAioEnable(void) {\r    static int eventSemaphoreIndices[FD_SETSIZE];\r    sqInt externalObject;\r    int fd;\r    int flags;\r    sqInt semaIndex;\r    sqInt sqFile;\r\r\tsqFile = interpreterProxy->stackObjectValue(2);\r\tif (!((interpreterProxy->isBytes(sqFile)) && ((interpreterProxy->stSizeOf(sqFile)) == (fileRecordSize())))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\t/* begin fileDescriptorFrom: */\r\tif (!((((interpreterProxy->isBytes(sqFile)) && ((interpreterProxy->byteSizeOf(sqFile)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFile))))) && (isNonNullSQFile(sqFile)))) {\r\t\tfd = -1;\r\t\tgoto l1;\r\t}\r\tfd = fileno(fileHandleFrom(sqFile));\rl1:\t/* end fileDescriptorFrom: */;\r\tif (fd < 0) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tsemaIndex = interpreterProxy->stackIntegerValue(1);\r\teventSemaphoreIndices[semaIndex] = semaIndex;\r\texternalObject = interpreterProxy->stackObjectValue(0);\r\tif (externalObject == (interpreterProxy->trueObject())) {\r\t\tflags = AIO_EXT;\r\t} else {\r\t\tflags = 0;\r\t}\r\taioEnable(fd, &(eventSemaphoreIndices[semaIndex]), flags);\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->pushInteger(semaIndex);\r}\r\r\r/*\tDeprecated. This primitive has been replaced by a similar implementation in AioPlugin. */\r/*\tHandle asynchronous event notification for a descriptor. The first parameter is\r\ta sqFile ByteArray representing the ioHandle for a file, and the remaining three\r\tparameters are Boolean flags representing the types of events for which notification\r\tis being requested: handle exceptions, handle for read, and handle for write.\r\tFlags are defined in the aio.h source as:\r\t\tAIO_X\t(1<<0)\thandle for exceptions\r\t\tAIO_R\t(1<<1)\thandle for read\r\t\tAIO_W\t(1<<2)\thandle for write */\r\rEXPORT(sqInt) primitiveAioHandle(void) {\r    sqInt exceptionWatch;\r    int fd;\r    int flags;\r    sqInt readWatch;\r    sqInt sqFile;\r    sqInt writeWatch;\r\r\tsqFile = interpreterProxy->stackObjectValue(3);\r\tif (!((interpreterProxy->isBytes(sqFile)) && ((interpreterProxy->stSizeOf(sqFile)) == (fileRecordSize())))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\t/* begin fileDescriptorFrom: */\r\tif (!((((interpreterProxy->isBytes(sqFile)) && ((interpreterProxy->byteSizeOf(sqFile)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFile))))) && (isNonNullSQFile(sqFile)))) {\r\t\tfd = -1;\r\t\tgoto l1;\r\t}\r\tfd = fileno(fileHandleFrom(sqFile));\rl1:\t/* end fileDescriptorFrom: */;\r\tif (fd < 0) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\texceptionWatch = interpreterProxy->stackObjectValue(2);\r\treadWatch = interpreterProxy->stackObjectValue(1);\r\twriteWatch = interpreterProxy->stackObjectValue(0);\r\tflags = 0;\r\tif (exceptionWatch == (interpreterProxy->trueObject())) {\r\t\tflags = flags | (AIO_X);\r\t}\r\tif (readWatch == (interpreterProxy->trueObject())) {\r\t\tflags = flags | (AIO_R);\r\t}\r\tif (writeWatch == (interpreterProxy->trueObject())) {\r\t\tflags = flags | (AIO_W);\r\t}\r\taioHandle(fd, aioForwardwithDataandFlags, flags);\r\tinterpreterProxy->pop(5);\r\tinterpreterProxy->pushInteger(flags);\r}\r\r\r/*\tDeprecated. This primitive has been replaced by a similar implementation in AioPlugin. */\r/*\tTemporarily suspend asynchronous event notification for a descriptor. The first\r\tparameter is a sqFile ByteArray representing the ioHandle for a file, and the\r\tremaining three parameters are Boolean flags representing the types of events\r\tfor which notification is being requested: handle exceptions, handle for read,\r\tand handle for write.\r\tFlags are defined in the aio.h source as:\r\t\tAIO_X\t(1<<0)\thandle for exceptions\r\t\tAIO_R\t(1<<1)\thandle for read\r\t\tAIO_W\t(1<<2)\thandle for write */\r\rEXPORT(sqInt) primitiveAioSuspend(void) {\r    sqInt exceptionWatch;\r    int fd;\r    int flags;\r    sqInt readWatch;\r    sqInt sqFile;\r    sqInt writeWatch;\r\r\tsqFile = interpreterProxy->stackObjectValue(3);\r\tif (!((interpreterProxy->isBytes(sqFile)) && ((interpreterProxy->stSizeOf(sqFile)) == (fileRecordSize())))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\t/* begin fileDescriptorFrom: */\r\tif (!((((interpreterProxy->isBytes(sqFile)) && ((interpreterProxy->byteSizeOf(sqFile)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFile))))) && (isNonNullSQFile(sqFile)))) {\r\t\tfd = -1;\r\t\tgoto l1;\r\t}\r\tfd = fileno(fileHandleFrom(sqFile));\rl1:\t/* end fileDescriptorFrom: */;\r\tif (fd < 0) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\texceptionWatch = interpreterProxy->stackObjectValue(2);\r\treadWatch = interpreterProxy->stackObjectValue(1);\r\twriteWatch = interpreterProxy->stackObjectValue(0);\r\tflags = 0;\r\tif (exceptionWatch == (interpreterProxy->trueObject())) {\r\t\tflags = flags | (AIO_X);\r\t}\r\tif (readWatch == (interpreterProxy->trueObject())) {\r\t\tflags = flags | (AIO_R);\r\t}\r\tif (writeWatch == (interpreterProxy->trueObject())) {\r\t\tflags = flags | (AIO_W);\r\t}\r\taioSuspend(fd, flags);\r\tinterpreterProxy->pop(5);\r\tinterpreterProxy->pushInteger(flags);\r}\r\r\r/*\tAnswer a string containing the OS process argument at index (an Integer) in the\r\targument list. */\r\rEXPORT(sqInt) primitiveArgumentAt(void) {\r    extern int argCnt;\r    extern char **argVec;\r    sqInt index;\r    sqInt s;\r    char *sPtr;\r\r\tindex = interpreterProxy->stackIntegerValue(0);\r\tif ((index > argCnt) || (index < 1)) {\r\t\tinterpreterProxy->pop(2);\r\t\tinterpreterProxy->push(interpreterProxy->nilObject());\r\t} else {\r\t\tsPtr = argVec[index - 1];\r\t\ts = stringFromCString(sPtr);\r\t\tinterpreterProxy->pop(2);\r\t\tinterpreterProxy->push(s);\r\t}\r}\r\r\r/*\tSend a null signal to the OS process identified by anIntegerPid. Answer false for\r\ta bad parameter on the stack (the common case is for anIntegerPid equal to nil,\r\tfor which case we should answer false). Answer true if the process exists and can\r\treceive signals from this process, otherwise false. This test is useful for determining\r\tif a child process still exists following a Squeak image restart. */\r\rEXPORT(sqInt) primitiveCanReceiveSignals(sqInt anIntegerPid) {\r    pid_t pidToSignal;\r    int result;\r\r\tif (((interpreterProxy->stackValue(0)) & 1)) {\r\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\r\t\tresult = kill(pidToSignal, 0);\r\t\tinterpreterProxy->pop(2);\r\t\tif (result == 0) {\r\t\t\tinterpreterProxy->push(interpreterProxy->trueObject());\r\t\t} else {\r\t\t\tinterpreterProxy->push(interpreterProxy->falseObject());\r\t\t}\r\t} else {\r\t\tinterpreterProxy->pop(2);\r\t\tinterpreterProxy->push(interpreterProxy->falseObject());\r\t}\r}\r\r\r/*\tCall chdir(2) to change current working directory to the specified path string. Answer\r\tnil for success, or errno on failure. */\r\rEXPORT(sqInt) primitiveChdir(void) {\r    extern int errno;\r    char *path;\r\r\tpath = transientCStringFromString(interpreterProxy->stackObjectValue(0));\r\tif (chdir(path)) {\r\t\tinterpreterProxy->pop(2);\r\t\tinterpreterProxy->push(interpreterProxy->nilObject());\r\t} else {\r\t\tinterpreterProxy->pop(2);\r\t\tinterpreterProxy->pushInteger(errno);\r\t}\r}\r\r\r/*\tCreate a pipe, and answer an array of two file handles for the pipe writer and reader.\r\tThe readerIOStream and writerIOStream variables represent the low level pipe streams,\r\twhich will be of type (FILE *) or HANDLE, depending on what the FilePlugin support\r\tcode is using to represent file streams. FILEHANDLETYPE is defined in my subclasses\r\tin the #declareCVarsIn: class method. */\r\rEXPORT(sqInt) primitiveCreatePipe(void) {\r    sqInt arrayResult;\r    sqInt reader;\r    FILEHANDLETYPE readerIOStream;\r    FILEHANDLETYPE *readerIOStreamPtr;\r    SQFile *readerPtr;\r    SESSIONIDENTIFIERTYPE thisSession;\r    sqInt writer;\r    FILEHANDLETYPE writerIOStream;\r    FILEHANDLETYPE *writerIOStreamPtr;\r    SQFile *writerPtr;\r\r\r\t/* Create the anonymous OS pipe */\r\r\tthisSession = interpreterProxy->getThisSessionID();\r\treaderIOStreamPtr = &readerIOStream;\r\twriterIOStreamPtr = &writerIOStream;\r\tif (!(createPipeForReaderwriter(readerIOStreamPtr, writerIOStreamPtr))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\twriter = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\r\twriterPtr = interpreterProxy->arrayValueOf(writer);\r\twriterPtr->file = writerIOStream;\r\twriterPtr->sessionID = thisSession;\r\twriterPtr->writable = 1;\r\twriterPtr->lastOp = 0;\r\tinterpreterProxy->pushRemappableOop(writer);\r\treader = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\r\treaderPtr = interpreterProxy->arrayValueOf(reader);\r\treaderPtr->file = readerIOStream;\r\treaderPtr->sessionID = thisSession;\r\treaderPtr->writable = 0;\r\treaderPtr->lastOp = 0;\r\tinterpreterProxy->pushRemappableOop(reader);\r\tarrayResult = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2);\r\tinterpreterProxy->stObjectatput(arrayResult, 1, interpreterProxy->popRemappableOop());\r\tinterpreterProxy->stObjectatput(arrayResult, 2, interpreterProxy->popRemappableOop());\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->push(arrayResult);\r}\r\r\r/*\tCreate a pipe, and answer an array of two file handles for the pipe writer and reader.\r\tThe session identifier is passed as the parameter to this primitive. Use this variant\r\tif the session identifier is not available directly in the VM (as may be the case if\r\tit is not possible to link from this plugin to a variable elsewhere in the VM).\r\tThe readerIOStream and writerIOStream variables represent the low level pipe streams,\r\twhich will be of type (FILE *) or HANDLE, depending on what the FilePlugin support\r\tcode is using to represent file streams. FILEHANDLETYPE is defined in my subclasses\r\tin the #declareCVarsIn: class method. */\r\rEXPORT(sqInt) primitiveCreatePipeWithSessionIdentifier(void) {\r    sqInt arrayResult;\r    sqInt reader;\r    FILEHANDLETYPE readerIOStream;\r    FILEHANDLETYPE *readerIOStreamPtr;\r    SQFile *readerPtr;\r    SESSIONIDENTIFIERTYPE thisSession;\r    sqInt writer;\r    FILEHANDLETYPE writerIOStream;\r    FILEHANDLETYPE *writerIOStreamPtr;\r    SQFile *writerPtr;\r\r\r\t/* Create the anonymous OS pipe */\r\r\tthisSession = sessionIdentifierFrom(interpreterProxy->stackObjectValue(0));\r\treaderIOStreamPtr = &readerIOStream;\r\twriterIOStreamPtr = &writerIOStream;\r\tif (!(createPipeForReaderwriter(readerIOStreamPtr, writerIOStreamPtr))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\twriter = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\r\twriterPtr = interpreterProxy->arrayValueOf(writer);\r\twriterPtr->file = writerIOStream;\r\twriterPtr->sessionID = thisSession;\r\twriterPtr->writable = 1;\r\twriterPtr->lastOp = 0;\r\tinterpreterProxy->pushRemappableOop(writer);\r\treader = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\r\treaderPtr = interpreterProxy->arrayValueOf(reader);\r\treaderPtr->file = readerIOStream;\r\treaderPtr->sessionID = thisSession;\r\treaderPtr->writable = 0;\r\treaderPtr->lastOp = 0;\r\tinterpreterProxy->pushRemappableOop(reader);\r\tarrayResult = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2);\r\tinterpreterProxy->stObjectatput(arrayResult, 1, interpreterProxy->popRemappableOop());\r\tinterpreterProxy->stObjectatput(arrayResult, 2, interpreterProxy->popRemappableOop());\r\tinterpreterProxy->pop(2);\r\tinterpreterProxy->push(arrayResult);\r}\r\r\r/*\tCall dup2() to duplicate a file descriptor. Answer the duplicated file descriptor\r\tor -1 on failure. */\r\rEXPORT(sqInt) primitiveDupTo(sqInt oldFileDescriptor, sqInt newFileDescriptor) {\r    int newfd;\r    int oldfd;\r    int result;\r\r\tnewfd = interpreterProxy->stackIntegerValue(0);\r\toldfd = interpreterProxy->stackIntegerValue(1);\r\tresult = dup2(oldfd, newfd);\r\tinterpreterProxy->pop(3);\r\tinterpreterProxy->pushInteger(result);\r}\r\r\r/*\tAnswer a string containing the OS process environment string at index (an Integer)\r\tin the environment list. */\r\rEXPORT(sqInt) primitiveEnvironmentAt(void) {\r    sqInt envCnt;\r    extern char **envVec;\r    sqInt index;\r    char **p;\r    sqInt s;\r    char *sPtr;\r\r\tp = envVec;\r\tenvCnt = 0;\r\twhile (*p++) envCnt++;\r\tindex = interpreterProxy->stackIntegerValue(0);\r\tif ((index > envCnt) || (index < 1)) {\r\t\tinterpreterProxy->pop(2);\r\t\tinterpreterProxy->push(interpreterProxy->nilObject());\r\t} else {\r\t\tsPtr = envVec[index - 1];\r\t\ts = stringFromCString(sPtr);\r\t\tinterpreterProxy->pop(2);\r\t\tinterpreterProxy->push(s);\r\t}\r}\r\r\r/*\tAnswer the value of an environment variable keyed by a Symbol. */\r\rEXPORT(sqInt) primitiveEnvironmentAtSymbol(void) {\r    char * getenvResult;\r\r\tgetenvResult = getenv(transientCStringFromString(interpreterProxy->stackObjectValue(0)));\r\tif (getenvResult == 0) {\r\t\treturn interpreterProxy->primitiveFail();\r\t} else {\r\t\tinterpreterProxy->pop(2);\r\t\tinterpreterProxy->push(stringFromCString(getenvResult));\r\t}\r}\r\r\r/*\tAnswer a string describing an error message */\r\rEXPORT(sqInt) primitiveErrorMessageAt(void) {\r    sqInt errMessage;\r    sqInt index;\r    char *p;\r\r\tindex = interpreterProxy->stackIntegerValue(0);\r\tp = ((char *) (strerror(index)));\r\terrMessage = stringFromCString(p);\r\tinterpreterProxy->pop(2);\r\tinterpreterProxy->push(errMessage);\r}\r\r\r/*\tCall stat(2) to obtain the file protection mask for a file. Answer an Array of\r\tfour integers representing the protection mask, or answer errno on failure. The\r\tprotection mask is four Integers, each of which may be considered an octal digit\r\t(0-7), with bit values 4, 2, and 1. The first digit selects the set user ID (4) and set\r\tgroup ID (2) and save text image (1) attributes. The second digit selects permissions\r\tfor the user who owns the file: read (4), write (2), and execute (1); the third\r\tselects permissions for other users in the file's group, with the same values; and\r\tthe fourth for other users not in the file's group, with the same values. */\r\rEXPORT(sqInt) primitiveFileProtectionMask(void) {\r    sqInt buffer;\r    extern int errno;\r    sqInt mode;\r    char *path;\r    sqInt result;\r    struct stat *statBuf;\r\r\tbuffer = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(struct stat));\r\tstatBuf = interpreterProxy->arrayValueOf(buffer);\r\tpath = transientCStringFromString(interpreterProxy->stackObjectValue(0));\r\tmode = stat(path, statBuf);\r\tif (mode == 0) {\r\t\tmode = statBuf->st_mode;\r\t\tresult = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 4);\r\t\tinterpreterProxy->stObjectatput(result, 4, (((mode & 07) << 1) | 1));\r\t\tinterpreterProxy->stObjectatput(result, 3, ((((mode & 070) >> 3) << 1) | 1));\r\t\tinterpreterProxy->stObjectatput(result, 2, ((((mode & 0700) >> 6) << 1) | 1));\r\t\tinterpreterProxy->stObjectatput(result, 1, ((((mode & 07000) >> 9) << 1) | 1));\r\t\tinterpreterProxy->pop(2);\r\t\tinterpreterProxy->push(result);\r\t} else {\r\t\tinterpreterProxy->pop(2);\r\t\tinterpreterProxy->pushInteger(errno);\r\t}\r}\r\r\r/*\tCall stat(2) to obtain the file protection mask for a file. Answer errno on failure,\r\tor on success answer an array with: UID with: GID with: protectionMask. The\t\r\tprotectionMask is an Array of four integers representing the protection mask, or\r\tanswer errno on failure. The protection mask is four Integers, each of which may\r\tbe considered an octal digit (0-7), with bit values 4, 2, and 1. The first digit selects\r\tthe set user ID (4) and set group ID (2) and save text image (1) attributes. The second\r\tdigit selects permissions for the user who owns the file: read (4), write (2), and\r\texecute (1); the third selects permissions for other users in the file's group, with\r\tthe same values; and the fourth for other users not in the file's group, with the\r\tsame values. */\r\rEXPORT(sqInt) primitiveFileStat(void) {\r    sqInt buffer;\r    extern int errno;\r    sqInt gid;\r    sqInt mask;\r    sqInt mode;\r    char *path;\r    sqInt result;\r    struct stat *statBuf;\r    sqInt uid;\r\r\tresult = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 3);\r\tuid = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(uid_t));\r\tgid = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(gid_t));\r\tmask = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 4);\r\tbuffer = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeof(struct stat));\r\tstatBuf = interpreterProxy->arrayValueOf(buffer);\r\tpath = transientCStringFromString(interpreterProxy->stackObjectValue(0));\r\tmode = stat(path, statBuf);\r\tif (mode == 0) {\r\t\tmode = statBuf->st_mode;\r\t\tinterpreterProxy->stObjectatput(mask, 4, (((mode & 07) << 1) | 1));\r\t\tinterpreterProxy->stObjectatput(mask, 3, ((((mode & 070) >> 3) << 1) | 1));\r\t\tinterpreterProxy->stObjectatput(mask, 2, ((((mode & 0700) >> 6) << 1) | 1));\r\t\tinterpreterProxy->stObjectatput(mask, 1, ((((mode & 07000) >> 9) << 1) | 1));\r\t\tinterpreterProxy->stObjectatput(result, 3, mask);\r\t\tinterpreterProxy->stObjectatput(result, 2, (((statBuf->st_gid) << 1) | 1));\r\t\tinterpreterProxy->stObjectatput(result, 1, (((statBuf->st_uid) << 1) | 1));\r\t\tinterpreterProxy->pop(2);\r\t\tinterpreterProxy->push(result);\r\t} else {\r\t\tinterpreterProxy->pop(2);\r\t\tinterpreterProxy->pushInteger(errno);\r\t}\r}\r\r\r/*\tThis primitive exists only for purposes of testing the\r\tfixPointersInArrayOfStrings:withOffsets:count: method. I believe it to be\r\treasonably machine and compiler independent, but have no way of verifying\r\tthis on a variety of machines, so I'll leave this test method here in case\r\tsomeone runs into problems on other hardware or compilers. -dtl */\r\rEXPORT(sqInt) primitiveFixPointersInArrayOfStrings(void) {\r    sqInt cStringArray;\r    sqInt count;\r    char *flattenedArrayOfStrings;\r    sqInt offsetArray;\r    sqInt *offsets;\r\r\tcount = interpreterProxy->stackIntegerValue(0);\r\toffsetArray = interpreterProxy->stackObjectValue(1);\r\tcStringArray = interpreterProxy->stackObjectValue(2);\r\toffsets = interpreterProxy->firstIndexableField(offsetArray);\r\tflattenedArrayOfStrings = interpreterProxy->arrayValueOf(cStringArray);\r\tfixPointersInArrayOfStringswithOffsetscount(flattenedArrayOfStrings, offsets, count);\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->push(cStringArray);\r}\r\r\r/*\tFork a child OS process, and do an exec in the child. The parent continues on in\r\tSmalltalk, and this method answers the pid of the child which was created.\r\r\tOn entry, the stack contains:\r\t\t0: workingDir, a null terminated string specifying the working directory to use, or nil.\r\t\t1: envOffsets, an array of integers for calculating environment string address offsets.\r\t\t2: envVecBuffer, a String buffer containing environment strings arranged to look like char **.\r\t\t3: argOffsets, an array of integers for calculating argument string address offsets.\r\t\t4: argVecBuffer, a String buffer containing argument strings arranged to look like char **.\r\t\t5: stdErr, a ByteArray handle.\r\t\t6: stdOut, a ByteArray handle.\r\t\t7: stdIn, a ByteArray handle.\r\t\t8: executableFile, a null terminated string with the name of the file to execute.\r\t\t9: the sender */\r\rEXPORT(sqInt) primitiveForkAndExecInDirectory(void) {\r\treturn forkAndExecInDirectory(1);\r}\r\r\r/*\tFork a child OS process, and do an exec in the child. The parent continues on in\r\tSmalltalk, and this method answers the pid of the child which was created.\r\r\tOn entry, the stack contains:\r\t\t0: workingDir, a null terminated string specifying the working directory to use, or nil.\r\t\t1: envOffsets, an array of integers for calculating environment string address offsets.\r\t\t2: envVecBuffer, a String buffer containing environment strings arranged to look like char **.\r\t\t3: argOffsets, an array of integers for calculating argument string address offsets.\r\t\t4: argVecBuffer, a String buffer containing argument strings arranged to look like char **.\r\t\t5: stdErr, a ByteArray handle.\r\t\t6: stdOut, a ByteArray handle.\r\t\t7: stdIn, a ByteArray handle.\r\t\t8: executableFile, a null terminated string with the name of the file to execute.\r\t\t9: the sender */\r\rEXPORT(sqInt) primitiveForkExec(void) {\r\treturn forkAndExecInDirectory(0);\r}\r\r\r/*\tFork a child process, and continue running squeak in the child process. Leave the\r\tX session connected to the parent process, but close its file descriptor for the child\r\tprocess. Open a new X session for the child.\r\r\tThe child should not depend on using existing connections to external resources. For\r\texample, the child may lose its connections to stdin, stdout, and stderr after its parent\r\texits. */\r\rEXPORT(sqInt) primitiveForkSqueak(void) {\r    pid_t pid;\r\r\tif ((sandboxSecurity()) == 1) {\r\t\tinterpreterProxy->pop(1);\r\t\tinterpreterProxy->pushInteger(-1);\r\t} else {\r\t\tpid = forkSqueak(1);\r\t\tinterpreterProxy->pop(1);\r\t\tinterpreterProxy->pushInteger(pid);\r\t}\r}\r\r\r/*\tFork a child process, and continue running squeak in the child process. Leave the\r\tX session connected to the parent process, but close its file descriptor for the child\r\tprocess. Open a new X session for the child.\r\r\tThe child should not depend on using existing connections to external resources. For\r\texample, the child may lose its connections to stdin, stdout, and stderr after its parent\r\texits. */\r\rEXPORT(sqInt) primitiveForkSqueakWithoutSigHandler(void) {\r    pid_t pid;\r\r\tif ((sandboxSecurity()) == 1) {\r\t\tinterpreterProxy->pop(1);\r\t\tinterpreterProxy->pushInteger(-1);\r\t} else {\r\t\tpid = forkSqueak(0);\r\t\tinterpreterProxy->pop(1);\r\t\tinterpreterProxy->pushInteger(pid);\r\t}\r}\r\r\r/*\tSet a signal handler in the VM which will signal a Smalltalk semaphore at\r\tsemaphoreIndex whenever an external signal sigNum is received. Answer the\r\tprior value of the signal handler. If semaphoreIndex is zero or nil, the handler\r\tis unregistered, and the VM returns to its default behavior for handling that\r\tsignal.\r\r\tThe Smalltalk semaphore is expected to be kept at the same index location\r\tindefinitely during the lifetime of a Squeak session. If that is not the case, the\r\thandler must be unregistered prior to unregistering the Smalltalk semaphore. */\r\rEXPORT(sqInt) primitiveForwardSignalToSemaphore(void) {\r    char *hPtr;\r    void *handler;\r    sqInt idx;\r    sqInt index;\r    union {void *handler; unsigned char bytes[sizeof(void *)];} priorHandler;\r    sqInt priorHandlerObject;\r    sqInt semaphoreIndex;\r    sqInt sigNum;\r\r\tindex = interpreterProxy->stackValue(0);\r\tif (index == (interpreterProxy->nilObject())) {\r\t\tsemaphoreIndex = 0;\r\t} else {\r\t\tif ((index & 1)) {\r\t\t\tsemaphoreIndex = interpreterProxy->stackIntegerValue(0);\r\t\t} else {\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t}\r\tsigNum = interpreterProxy->stackIntegerValue(1);\r\thandler = forwardSignaltoSemaphoreAt(sigNum, semaphoreIndex);\r\tif (handler == (sigErrorNumber())) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tpriorHandlerObject = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sizeOfPointer());\r\thPtr = interpreterProxy->arrayValueOf(priorHandlerObject);\r\tpriorHandler.handler = handler;\r\tidx = 0;\r\twhile (idx < (sizeOfPointer())) {\r\t\thPtr[idx] = priorHandler.bytes[idx];\r\t\tidx += 1;\r\t}\r\tinterpreterProxy->popthenPush(3, priorHandlerObject);\r}\r\r\r/*\tAnswer a string containing the current working directory. */\r\rEXPORT(sqInt) primitiveGetCurrentWorkingDirectory(void) {\r    char *buffer;\r    sqInt bufferSize;\r    char *cwd;\r    sqInt cwdString;\r    sqInt incrementBy;\r    sqInt maxSize;\r\r\tbufferSize = 100;\r\tincrementBy = 100;\r\tmaxSize = 5000;\r\twhile (1) {\r\t\tcwdString = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), bufferSize);\r\t\tbuffer = interpreterProxy->arrayValueOf(cwdString);\r\r\t\t/* getcwd(buffer, bufferSize) */\r\r\t\tcwd = getcwd(buffer, bufferSize);\r\t\tif (!((cwd == 0) && (bufferSize < maxSize))) break;\r\t\tbufferSize += incrementBy;\r\t}\r\tif (cwd == 0) {\r\t\treturn interpreterProxy->primitiveFail();\r\t} else {\r\t\tcwdString = stringFromCString(cwd);\r\t\tinterpreterProxy->pop(1);\r\t\tinterpreterProxy->push(cwdString);\r\t}\r}\r\r\r/*\tAnswer the effective group ID of my OS process */\r\rEXPORT(sqInt) primitiveGetEGid(void) {\r    gid_t eGid;\r\r\teGid = getegid();\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->pushInteger(eGid);\r}\r\r\r/*\tAnswer the effective user ID of my OS process */\r\rEXPORT(sqInt) primitiveGetEUid(void) {\r    uid_t eUid;\r\r\teUid = geteuid();\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->pushInteger(eUid);\r}\r\r\r/*\tAnswer the group ID of my OS process */\r\rEXPORT(sqInt) primitiveGetGid(void) {\r    gid_t gid;\r\r\tgid = getgid();\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->pushInteger(gid);\r}\r\r\r/*\tAnswer the process group ID of the process identified by pid */\r\rEXPORT(sqInt) primitiveGetPGid(void) {\r    pid_t pgid;\r    pid_t pid;\r\r\tpid = interpreterProxy->stackIntegerValue(0);\r\tpgid = getpgid(pid);\r\tif (pgid == -1) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tinterpreterProxy->pop(2);\r\tinterpreterProxy->pushInteger(pgid);\r}\r\r\r/*\tAnswer the process group ID of this OS process */\r\rEXPORT(sqInt) primitiveGetPGrp(void) {\r    pid_t pgid;\r\r\tpgid = getpgrp();\r\tif (pgid == -1) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->pushInteger(pgid);\r}\r\r\r/*\tAnswer the process ID of the parent process of my OS process */\r\rEXPORT(sqInt) primitiveGetPPid(void) {\r    pid_t ppid;\r\r\tppid = getppid();\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->pushInteger(ppid);\r}\r\r\r/*\tAnswer the process ID of my OS process */\r\rEXPORT(sqInt) primitiveGetPid(void) {\r    pid_t pid;\r\r\tpid = getpid();\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->pushInteger(pid);\r}\r\r\r/*\tAnswer the unique session identifier for this Smalltalk instance running in this\r\tOS process. The C integer value is coerced into a Smalltalk ByteArray to preserve\r\tthe full range of possible values. */\r\rEXPORT(sqInt) primitiveGetSession(void) {\r    unsigned char *sessionByteArrayPointer;\r    sqInt sessionIDSize;\r    sqInt sessionOop;\r    SESSIONIDENTIFIERTYPE thisSessionID;\r\r\tthisSessionID = interpreterProxy->getThisSessionID();\r\tsessionIDSize = sizeof(thisSessionID);\r\tsessionOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), sessionIDSize);\r\tsessionByteArrayPointer = interpreterProxy->arrayValueOf(sessionOop);\r\tif (thisSessionID == null) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tcopyBytesFromtolength((unsigned char *)&thisSessionID, sessionByteArrayPointer, sessionIDSize);\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->push(sessionOop);\r}\r\r\r/*\tAnswer the file handle for standard error of my OS process */\r\rEXPORT(sqInt) primitiveGetStdErrHandle(void) {\r    SQFile *file;\r    sqInt fileOop;\r    SESSIONIDENTIFIERTYPE thisSession;\r\r\tfileOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\r\tfile = interpreterProxy->arrayValueOf(fileOop);\r\tthisSession = interpreterProxy->getThisSessionID();\r\tfile->file = stderr;\r\tfile->sessionID = thisSession;\r\tfile->writable = 1;\r\tfile->lastOp = 0;\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->push(fileOop);\r}\r\r\r/*\tAnswer the file handle for standard error of my OS process. The session\r\tidentifier is passed as the parameter to this primitive. Use this variant if\r\tthe session identifier is not available directly in the VM (as may be the\r\tcase if it is not possible to link from this plugin to a variable elsewhere\r\tin the VM). */\r\rEXPORT(sqInt) primitiveGetStdErrHandleWithSessionIdentifier(void) {\r    SQFile *file;\r    sqInt fileOop;\r    SESSIONIDENTIFIERTYPE thisSession;\r\r\tfileOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\r\tfile = interpreterProxy->arrayValueOf(fileOop);\r\tthisSession = sessionIdentifierFrom(interpreterProxy->stackObjectValue(0));\r\tfile->file = stderr;\r\tfile->sessionID = thisSession;\r\tfile->writable = 1;\r\tfile->lastOp = 0;\r\tinterpreterProxy->pop(2);\r\tinterpreterProxy->push(fileOop);\r}\r\r\r/*\tAnswer the file handle for standard input of my OS process */\r\rEXPORT(sqInt) primitiveGetStdInHandle(void) {\r    SQFile *file;\r    sqInt fileOop;\r    SESSIONIDENTIFIERTYPE thisSession;\r\r\tfileOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\r\tfile = interpreterProxy->arrayValueOf(fileOop);\r\tthisSession = interpreterProxy->getThisSessionID();\r\tfile->file = stdin;\r\tfile->sessionID = thisSession;\r\tfile->writable = 0;\r\tfile->lastOp = 0;\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->push(fileOop);\r}\r\r\r/*\tAnswer the file handle for standard input of my OS process. The session\r\tidentifier is passed as the parameter to this primitive. Use this variant if\r\tthe session identifier is not available directly in the VM (as may be the\r\tcase if it is not possible to link from this plugin to a variable elsewhere\r\tin the VM). */\r\rEXPORT(sqInt) primitiveGetStdInHandleWithSessionIdentifier(void) {\r    SQFile *file;\r    sqInt fileOop;\r    SESSIONIDENTIFIERTYPE thisSession;\r\r\tfileOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\r\tfile = interpreterProxy->arrayValueOf(fileOop);\r\tthisSession = sessionIdentifierFrom(interpreterProxy->stackObjectValue(0));\r\tfile->file = stdin;\r\tfile->sessionID = thisSession;\r\tfile->writable = 0;\r\tfile->lastOp = 0;\r\tinterpreterProxy->pop(2);\r\tinterpreterProxy->push(fileOop);\r}\r\r\r/*\tAnswer the file handle for standard output of my OS process */\r\rEXPORT(sqInt) primitiveGetStdOutHandle(void) {\r    SQFile *file;\r    sqInt fileOop;\r    SESSIONIDENTIFIERTYPE thisSession;\r\r\tfileOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\r\tfile = interpreterProxy->arrayValueOf(fileOop);\r\tthisSession = interpreterProxy->getThisSessionID();\r\tfile->file = stdout;\r\tfile->sessionID = thisSession;\r\tfile->writable = 1;\r\tfile->lastOp = 0;\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->push(fileOop);\r}\r\r\r/*\tAnswer the file handle for standard output of my OS process. The session\r\tidentifier is passed as the parameter to this primitive. Use this variant if\r\tthe session identifier is not available directly in the VM (as may be the\r\tcase if it is not possible to link from this plugin to a variable elsewhere\r\tin the VM). */\r\rEXPORT(sqInt) primitiveGetStdOutHandleWithSessionIdentifier(void) {\r    SQFile *file;\r    sqInt fileOop;\r    SESSIONIDENTIFIERTYPE thisSession;\r\r\tfileOop = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\r\tfile = interpreterProxy->arrayValueOf(fileOop);\r\tthisSession = sessionIdentifierFrom(interpreterProxy->stackObjectValue(0));\r\tfile->file = stdout;\r\tfile->sessionID = thisSession;\r\tfile->writable = 1;\r\tfile->lastOp = 0;\r\tinterpreterProxy->pop(2);\r\tinterpreterProxy->push(fileOop);\r}\r\r\r/*\tAnswer the ID of the pthread that is currently executing (the interpreter thread).\r\tA thread ID may be a 64 bit value on some platforms, so answer a byte array\r\tcontaining the value in machine-dependent byte order. */\r\rEXPORT(sqInt) primitiveGetThreadID(void) {\r\tinterpreterProxy->popthenPush(1, newPthreadTypeByteArray(vmThread));\r}\r\r\r/*\tAnswer the user ID of my OS process */\r\rEXPORT(sqInt) primitiveGetUid(void) {\r    uid_t uid;\r\r\tuid = getuid();\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->pushInteger(uid);\r}\r\r\r/*\tTake a struct SQFile from the stack, and call feof(3) to determine if the file has\r\treached end of file. */\r/*\tDeprecated. The return values are reversed. Use primitiveTestEndOfFileFlag. */\r\rEXPORT(sqInt) primitiveIsAtEndOfFile(void) {\r    FILEHANDLETYPE file;\r    sqInt result;\r    sqInt sqFileOop;\r\r\tsqFileOop = interpreterProxy->stackValue(0);\r\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tfile = fileHandleFrom(sqFileOop);\r\tif (file == 0) {\r\t\treturn primitiveFail();\r\t}\r\tif (feof(file)) {\r\t\tresult = interpreterProxy->trueObject();\r\t} else {\r\t\tresult = interpreterProxy->falseObject();\r\t}\r\tinterpreterProxy->pop(2);\r\tinterpreterProxy->push(result);\r}\r\r\r/*\tSet a list of pids to kill with signum when VM exits. If the signum\r\tparameter is nil, the default value of SIGTERM will be used. */\r\rEXPORT(sqInt) primitiveKillOnExit(void) {\r    sqInt count;\r    pid_t *p;\r    pid_t pid;\r    sqInt *pidPointer;\r    sqInt pids;\r    sqInt signum;\r\r\tpids = interpreterProxy->stackValue(1);\r\tsignum = interpreterProxy->stackValue(0);\r\tpidCount = interpreterProxy->stSizeOf(pids);\r\tif (interpreterProxy->failed()) {\r\t\treturn null;\r\t}\r\tif (!(pidArray == 0)) {\r\t\tfree(pidArray);\r\t}\r\tpidArray = malloc(pidCount * sizeof(pid_t));\r\tif (pidArray == 0) {\r\t\tpidCount = 0;\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tpidPointer = interpreterProxy->firstIndexableField(pids);\r\tcount = 0;\r\tp = pidArray;\r\twhile (count <= pidCount) {\r\t\tpid = ((*pidPointer++) >> 1);\r\t\t*p++ = pid;\r\t\tcount += 1;\r\t}\r\tif (!(signum == (interpreterProxy->nilObject()))) {\r\t\tsigNumToSend = interpreterProxy->checkedIntegerValueOf(signum);\r\t}\r\tif (interpreterProxy->failed()) {\r\t\tpidCount = 0;\r\t}\r\tinterpreterProxy->pop(2);\r}\r\r\r/*\tTake a struct SQFile from the stack, and request a lock on the specified region.\r\tIf the exclusive flag is true, then request an exclusive (F_WRLCK) lock on the\r     file. Otherwise, request a shared (F_RDLCK) lock. Any number of Unix processes\r     may hold  a read lock (shared lock) on a file region, but only one process may\r     hold a write lock (exclusive lock). Answer the result of the call to fcntl().\r\r\tIf length is zero, then the entire file will be locked, including region extents that\r\thave not yet been allocated for the file. */\r\rEXPORT(sqInt) primitiveLockFileRegion(void) {\r    sqInt exclusive;\r    int fileNo;\r    sqInt len;\r    struct flock lockStruct;\r    int result;\r    sqInt sqFileOop;\r    sqInt start;\r\r\texclusive = (interpreterProxy->stackValue(0)) == (interpreterProxy->trueObject());\r\tlen = interpreterProxy->stackIntegerValue(1);\r\tstart = interpreterProxy->stackIntegerValue(2);\r\tsqFileOop = interpreterProxy->stackValue(3);\r\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\r\t/* Set up the flock structure parameter for fcntl() */\r\r\tfileNo = unixFileNumber(fileHandleFrom(sqFileOop));\r\tif (exclusive) {\r\t\tlockStruct.l_type = F_WRLCK;\r\t} else {\r\t\tlockStruct.l_type = F_RDLCK;\r\t}\r\tlockStruct.l_whence = SEEK_SET;\r\tlockStruct.l_start = start;\r\tlockStruct.l_len = len;\r\tlockStruct.l_pid = 0;\r\tresult = fcntl(fileNo, F_SETLK, &lockStruct);\r\tinterpreterProxy->pop(5);\r\tinterpreterProxy->pushInteger(result);\r}\r\r\r/*\tCreate a pipe, and answer an array of two file handles for the pipe writer and reader.\r\tThe readerIOStream and writerIOStream variables represent the low level pipe streams,\r\twhich will be of type (FILE *) or HANDLE, depending on what the FilePlugin support\r\tcode is using to represent file streams. FILEHANDLETYPE is defined in my subclasses\r\tin the #declareCVarsIn: class method. */\r\rEXPORT(sqInt) primitiveMakePipe(void) {\r    sqInt arrayResult;\r    sqInt reader;\r    FILEHANDLETYPE readerIOStream;\r    FILEHANDLETYPE *readerIOStreamPtr;\r    SQFile *readerPtr;\r    SESSIONIDENTIFIERTYPE thisSession;\r    sqInt writer;\r    FILEHANDLETYPE writerIOStream;\r    FILEHANDLETYPE *writerIOStreamPtr;\r    SQFile *writerPtr;\r\r\r\t/* Create the anonymous OS pipe */\r\r\tthisSession = interpreterProxy->getThisSessionID();\r\treaderIOStreamPtr = &readerIOStream;\r\twriterIOStreamPtr = &writerIOStream;\r\tif (!(makePipeForReaderwriter(readerIOStreamPtr, writerIOStreamPtr))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\twriter = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\r\twriterPtr = interpreterProxy->arrayValueOf(writer);\r\twriterPtr->file = writerIOStream;\r\twriterPtr->sessionID = thisSession;\r\twriterPtr->writable = 1;\r\twriterPtr->lastOp = 0;\r\tinterpreterProxy->pushRemappableOop(writer);\r\treader = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\r\treaderPtr = interpreterProxy->arrayValueOf(reader);\r\treaderPtr->file = readerIOStream;\r\treaderPtr->sessionID = thisSession;\r\treaderPtr->writable = 0;\r\treaderPtr->lastOp = 0;\r\tinterpreterProxy->pushRemappableOop(reader);\r\tarrayResult = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2);\r\tinterpreterProxy->stObjectatput(arrayResult, 1, interpreterProxy->popRemappableOop());\r\tinterpreterProxy->stObjectatput(arrayResult, 2, interpreterProxy->popRemappableOop());\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->push(arrayResult);\r}\r\r\r/*\tCreate a pipe, and answer an array of two file handles for the pipe writer and reader.\r\tThe session identifier is passed as the parameter to this primitive. Use this variant\r\tif the session identifier is not available directly in the VM (as may be the case if\r\tit is not possible to link from this plugin to a variable elsewhere in the VM).\r\tThe readerIOStream and writerIOStream variables represent the low level pipe streams,\r\twhich will be of type (FILE *) or HANDLE, depending on what the FilePlugin support\r\tcode is using to represent file streams. FILEHANDLETYPE is defined in my subclasses\r\tin the #declareCVarsIn: class method. */\r\rEXPORT(sqInt) primitiveMakePipeWithSessionIdentifier(void) {\r    sqInt arrayResult;\r    sqInt reader;\r    FILEHANDLETYPE readerIOStream;\r    FILEHANDLETYPE *readerIOStreamPtr;\r    SQFile *readerPtr;\r    SESSIONIDENTIFIERTYPE thisSession;\r    sqInt writer;\r    FILEHANDLETYPE writerIOStream;\r    FILEHANDLETYPE *writerIOStreamPtr;\r    SQFile *writerPtr;\r\r\r\t/* Create the anonymous OS pipe */\r\r\tthisSession = sessionIdentifierFrom(interpreterProxy->stackObjectValue(0));\r\treaderIOStreamPtr = &readerIOStream;\r\twriterIOStreamPtr = &writerIOStream;\r\tif (!(makePipeForReaderwriter(readerIOStreamPtr, writerIOStreamPtr))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\twriter = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\r\twriterPtr = interpreterProxy->arrayValueOf(writer);\r\twriterPtr->file = writerIOStream;\r\twriterPtr->sessionID = thisSession;\r\twriterPtr->writable = 1;\r\twriterPtr->lastOp = 0;\r\tinterpreterProxy->pushRemappableOop(writer);\r\treader = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), fileRecordSize());\r\treaderPtr = interpreterProxy->arrayValueOf(reader);\r\treaderPtr->file = readerIOStream;\r\treaderPtr->sessionID = thisSession;\r\treaderPtr->writable = 0;\r\treaderPtr->lastOp = 0;\r\tinterpreterProxy->pushRemappableOop(reader);\r\tarrayResult = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2);\r\tinterpreterProxy->stObjectatput(arrayResult, 1, interpreterProxy->popRemappableOop());\r\tinterpreterProxy->stObjectatput(arrayResult, 2, interpreterProxy->popRemappableOop());\r\tinterpreterProxy->pop(2);\r\tinterpreterProxy->push(arrayResult);\r}\r\r\r/*\tAnswer a string containing the module name string for this plugin. */\r\rEXPORT(sqInt) primitiveModuleName(void) {\r\tinterpreterProxy->popthenPush(1, stringFromCString(moduleName));\r}\r\r\r/*\tChange the scheduling priority of this process by the given nice increment.\r\tA positive increment decreases the priority. Only the superuser can specify\r\ta negative value (to increase the priority). See man(2) nice.\r\r\tDifferent versions of Unix are inconsistent in their return values. The only\r\treliable test for success is to clear errno prior to the call, and test its value\r\tif the result of nice() is -1. */\r\rEXPORT(sqInt) primitiveNice(void) {\r    extern int errno;\r    int niceIncrement;\r    sqInt result;\r\r\tniceIncrement = interpreterProxy->stackIntegerValue(0);\r\terrno = 0;\r\tresult = nice(niceIncrement);\r\tif (result == -1) {\r\t\tif (!(errno == 0)) {\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t}\r\tinterpreterProxy->pop(2);\r\tinterpreterProxy->pushInteger(result);\r}\r\r\r/*\tSet an environment variable using a string of the form 'KEY=value'. This\r\timplementation allocates a C string using malloc to allocate from the C heap\r\t(using cStringFromString rather than transientCStringFromString). This\r\tis necessary because the C runtime library does not make a copy of the\r\tstring into separately allocated environment memory. */\r\rEXPORT(sqInt) primitivePutEnv(void) {\r    char *cStringPtr;\r    sqInt keyValueString;\r\r\tkeyValueString = interpreterProxy->stackObjectValue(0);\r\tcStringPtr = cStringFromString(keyValueString);\r\tif ((putenv(cStringPtr)) == 0) {\r\t\tinterpreterProxy->pop(2);\r\t\tinterpreterProxy->push(keyValueString);\r\t} else {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r}\r\r\r/*\tAnswer the real path for a path string as determined by realpath(). */\r\rEXPORT(sqInt) primitiveRealpath(void) {\r    char *buffer;\r    sqInt bufferSize;\r    sqInt newPathString;\r    char *pathString;\r    char * realpathResult;\r    sqInt s;\r\r\tbufferSize = 1024;\r\tnewPathString = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), bufferSize);\r\tinterpreterProxy->pushRemappableOop(newPathString);\r\tpathString = transientCStringFromString(interpreterProxy->stackObjectValue(0));\r\tnewPathString = interpreterProxy->popRemappableOop();\r\tbuffer = interpreterProxy->arrayValueOf(newPathString);\r\trealpathResult = realpath(pathString, buffer);\r\tif (realpathResult == 0) {\r\t\treturn interpreterProxy->primitiveFail();\r\t} else {\r\t\tif ((strlen(realpathResult)) >= 1024) {\r\t\t\tperror(\"warning: statically allocated array exceeded in UnixOSProcessPlugin>>primitiveRealPath, object memory may have been corrupted\");\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\ts = stringFromCString(realpathResult);\r\t\tinterpreterProxy->pop(2);\r\t\tinterpreterProxy->push(s);\r\t}\r}\r\r\r/*\tClean up after the death of a child, and answer an array with the pid and\r\tthe exit status of the child process. Answer nil if the pidToHandle does not exist. */\r\rEXPORT(sqInt) primitiveReapChildProcess(void) {\r    sqInt *arrayPtr;\r    int exitStatus;\r    pid_t pidResult;\r    sqInt pidToHandle;\r    sqInt resultArray;\r\r\r\t/* Force C code translator to declare the variable */\r\r\texitStatus = 0;\r\tpidToHandle = interpreterProxy->stackIntegerValue(0);\r\tpidResult = waitpid ( pidToHandle, &exitStatus, WNOHANG );\r\tif (pidResult <= 0) {\r\t\tinterpreterProxy->pop(2);\r\t\tinterpreterProxy->push(interpreterProxy->nilObject());\r\t} else {\r\r\t\t/* Answer an array with pid and result status  */\r\r\t\tresultArray = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 2);\r\t\tarrayPtr = interpreterProxy->firstIndexableField(resultArray);\r\t\tarrayPtr[0] = integerObjectOf(pidResult);\r\t\tarrayPtr[1] = integerObjectOf(exitStatus);\r\t\tinterpreterProxy->pop(2);\r\t\tinterpreterProxy->push(resultArray);\r\t}\r}\r\r\r/*\tTake a struct SQFile from the stack, and call fflush() to flush the OS stream. This flushes the\r\tfile stream in the C library, not the stream in Smalltalk. For output streams, consider setting\r\tthe OS stream (C library) to unbuffered output, and letting Smalltalk do all the buffering. */\r\rEXPORT(sqInt) primitiveSQFileFlush(void) {\r    int result;\r    sqInt sqFileOop;\r\r\tsqFileOop = interpreterProxy->stackValue(0);\r\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tresult = fflush(fileHandleFrom(sqFileOop));\r\tinterpreterProxy->pop(2);\r\tinterpreterProxy->pushInteger(result);\r}\r\r\r/*\tTake a struct SQFile from the stack, and call fflush() to flush the OS stream. This flushes the\r\tfile stream in the C library, not the stream in Smalltalk. For output streams, consider setting\r\tthe OS stream (C library) to unbuffered output, and letting Smalltalk do all the buffering.\r\tThe session identifier is passed as the parameter to this primitive. Use this variant if the session\r\tidentifier is not available directly in the VM (as may be the case if it is not possible to link from\r\tthis plugin to a variable elsewhere in the VM). */\r\rEXPORT(sqInt) primitiveSQFileFlushWithSessionIdentifier(void) {\r    int result;\r    sqInt sqFileOop;\r\r\tsqFileOop = interpreterProxy->stackValue(1);\r\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tresult = fflush(fileHandleFrom(sqFileOop));\r\tinterpreterProxy->pop(3);\r\tinterpreterProxy->pushInteger(result);\r}\r\r\r/*\tTake a struct SQFile from the stack, and call fcntl() to set the file for blocking I/O. */\r\rEXPORT(sqInt) primitiveSQFileSetBlocking(void) {\r    sqInt descriptor;\r    int flags;\r    sqInt retVal;\r    sqInt sqFileOop;\r\r\tsqFileOop = interpreterProxy->stackValue(0);\r\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\t/* begin fileDescriptorFrom: */\r\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\r\t\tdescriptor = -1;\r\t\tgoto l1;\r\t}\r\tdescriptor = fileno(fileHandleFrom(sqFileOop));\rl1:\t/* end fileDescriptorFrom: */;\r\tif (descriptor == -1) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tflags = fcntl(descriptor, F_GETFL);\r\tretVal = fcntl(descriptor, F_SETFL, flags & ~O_NONBLOCK);\r\tinterpreterProxy->pop(2);\r\tinterpreterProxy->pushInteger(retVal);\r}\r\r\r/*\tTake a struct SQFile from the stack, and call fcntl() to set the file for blocking I/O.\r\tUse this variant if the session identifier is not available directly in the VM (as may be\r\tthe case if it is not possible to link from this plugin to a variable elsewhere in the VM). */\r\rEXPORT(sqInt) primitiveSQFileSetBlockingWithSessionIdentifier(void) {\r    sqInt descriptor;\r    sqInt flags;\r    sqInt retVal;\r    SQFile *sqFile;\r    sqInt sqFileOop;\r    SESSIONIDENTIFIERTYPE thisSession;\r\r\tsqFileOop = interpreterProxy->stackValue(1);\r\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tsqFile = interpreterProxy->arrayValueOf(sqFileOop);\r\tthisSession = sessionIdentifierFrom(interpreterProxy->stackObjectValue(0));\r\tif (thisSession == (sqFile->sessionID)) {\r\t\t/* begin fileDescriptorFrom: */\r\t\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\r\t\t\tdescriptor = -1;\r\t\t\tgoto l1;\r\t\t}\r\t\tdescriptor = fileno(fileHandleFrom(sqFileOop));\r\tl1:\t/* end fileDescriptorFrom: */;\r\t\tif (descriptor < 0) {\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\tflags = fcntl(descriptor, F_GETFL);\r\t\tretVal = fcntl(descriptor, F_SETFL, flags & ~O_NONBLOCK);\r\t\tinterpreterProxy->pop(3);\r\t\tinterpreterProxy->pushInteger(retVal);\r\t} else {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r}\r\r\r/*\tTake a struct SQFile from the stack, and call fcntl() to set the file non-blocking I/O. */\r\rEXPORT(sqInt) primitiveSQFileSetNonBlocking(void) {\r    sqInt descriptor;\r    int flags;\r    sqInt retVal;\r    sqInt sqFileOop;\r\r\tsqFileOop = interpreterProxy->stackValue(0);\r\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\t/* begin fileDescriptorFrom: */\r\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\r\t\tdescriptor = -1;\r\t\tgoto l1;\r\t}\r\tdescriptor = fileno(fileHandleFrom(sqFileOop));\rl1:\t/* end fileDescriptorFrom: */;\r\tif (descriptor < 0) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tflags = fcntl(descriptor, F_GETFL);\r\tretVal = fcntl(descriptor, F_SETFL, flags | O_NONBLOCK);\r\tinterpreterProxy->pop(2);\r\tinterpreterProxy->pushInteger(retVal);\r}\r\r\r/*\tTake a struct SQFile from the stack, and call fcntl() to set the file non-blocking I/O.\r\tUse this variant if the session identifier is not available directly in the VM (as may be\r\tthe case if it is not possible to link from this plugin to a variable elsewhere in the VM). */\r\rEXPORT(sqInt) primitiveSQFileSetNonBlockingWithSessionIdentifier(void) {\r    sqInt descriptor;\r    sqInt flags;\r    sqInt retVal;\r    SQFile *sqFile;\r    sqInt sqFileOop;\r    SESSIONIDENTIFIERTYPE thisSession;\r\r\tsqFileOop = interpreterProxy->stackValue(1);\r\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tsqFile = interpreterProxy->arrayValueOf(sqFileOop);\r\tthisSession = sessionIdentifierFrom(interpreterProxy->stackObjectValue(0));\r\tif (thisSession == (sqFile->sessionID)) {\r\t\t/* begin fileDescriptorFrom: */\r\t\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\r\t\t\tdescriptor = -1;\r\t\t\tgoto l1;\r\t\t}\r\t\tdescriptor = fileno(fileHandleFrom(sqFileOop));\r\tl1:\t/* end fileDescriptorFrom: */;\r\t\tif (descriptor < 0) {\r\t\t\treturn interpreterProxy->primitiveFail();\r\t\t}\r\t\tflags = fcntl(descriptor, F_GETFL);\r\t\tretVal = fcntl(descriptor, F_SETFL, flags | O_NONBLOCK);\r\t\tinterpreterProxy->pop(3);\r\t\tinterpreterProxy->pushInteger(retVal);\r\t} else {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r}\r\r\r/*\tTake a struct SQFile from the stack, and call setbuf() to set the OS file stream\r\t(implemented in the C library) for unbuffered I/O. Answers the result of a fflush()\r\tcall, not the result of the setbuf() call (which is type void). This is nearly useless,\r\tbut may at least provide an indicator that we are operating on a valid file stream. */\r\rEXPORT(sqInt) primitiveSQFileSetUnbuffered(void) {\r    FILEHANDLETYPE file;\r    sqInt retVal;\r    sqInt sqFileOop;\r\r\tsqFileOop = interpreterProxy->stackValue(0);\r\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tfile = fileHandleFrom(sqFileOop);\r\tretVal = fflush(file);\r\tsetbuf(file, 0);\r\tinterpreterProxy->pop(2);\r\tinterpreterProxy->pushInteger(retVal);\r}\r\r\r/*\tTake a struct SQFile from the stack, and call setbuf() to set the OS file stream (implemented in\r\tthe C library) for unbuffered I/O. Answers the result of a fflush() call, not the result of the\r\tsetbuf() call (which is type void). This is nearly useless, but may at least provide an indicator\r\tthat we are operating on a valid file stream. Use this variant if the session identifier is not\r\tavailable directly in the VM (as may be the case if it is not possible to link from this plugin\r\tto a variable elsewhere in the VM). */\r\rEXPORT(sqInt) primitiveSQFileSetUnbufferedWithSessionIdentifier(void) {\r    sqInt retVal;\r    SQFile *sqFile;\r    sqInt sqFileOop;\r    SESSIONIDENTIFIERTYPE thisSession;\r\r\tsqFileOop = interpreterProxy->stackValue(1);\r\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tsqFile = interpreterProxy->arrayValueOf(sqFileOop);\r\tthisSession = sessionIdentifierFrom(interpreterProxy->stackObjectValue(0));\r\tif (thisSession == (sqFile->sessionID)) {\r\t\tretVal = fflush(sqFile->file);\r\t\tsetbuf(sqFile->file, NULL);\r\t\tinterpreterProxy->pop(3);\r\t\tinterpreterProxy->pushInteger(retVal);\r\t} else {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r}\r\r\r/*\tAnswer the registration index of the semaphore currently associated with the\r\tsignal handler for sigNum. */\r\rEXPORT(sqInt) primitiveSemaIndexFor(void) {\r    sqInt index;\r    sqInt sigNum;\r\r\tsigNum = interpreterProxy->stackIntegerValue(0);\r\tindex = semaIndices[sigNum];\r\tinterpreterProxy->pop(2);\r\tinterpreterProxy->pushInteger(index);\r}\r\r\r/*\tSend SIGABRT (abort) to the OS process identified by anIntegerPid. Use an explicit\r\tcheck for isIntegerObject so we can return -1 on error (the stackIntegerValue: method\r\tanswers 1 on error, and 1 is a valid pid number). */\r\rEXPORT(sqInt) primitiveSendSigabrtTo(sqInt anIntegerPid) {\r    pid_t pidToSignal;\r    int result;\r    sqInt sig;\r\r\tif ((sandboxSecurity()) == 1) {\r\t\tinterpreterProxy->pop(2);\r\t\tinterpreterProxy->pushInteger(-1);\r\t} else {\r\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\r\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\r\t\t\t/* begin sendSignal:toPid: */\r\t\t\tsig = sigAbrtNumber();\r\t\t\tresult = kill(pidToSignal, sig);\r\t\t\tinterpreterProxy->pop(2);\r\t\t\tinterpreterProxy->pushInteger(result);\r\t\t} else {\r\t\t\tinterpreterProxy->pop(2);\r\t\t\tinterpreterProxy->pushInteger(-1);\r\t\t}\r\t}\r}\r\r\r/*\tSend SIGALRM (alarm clock) to the OS process identified by anIntegerPid. Use an explicit\r\tcheck for isIntegerObject so we can return -1 on error (the stackIntegerValue: method\r\tanswers 1 on error, and 1 is a valid pid number). */\r\rEXPORT(sqInt) primitiveSendSigalrmTo(sqInt anIntegerPid) {\r    pid_t pidToSignal;\r    int result;\r    sqInt sig;\r\r\tif ((sandboxSecurity()) == 1) {\r\t\tinterpreterProxy->pop(2);\r\t\tinterpreterProxy->pushInteger(-1);\r\t} else {\r\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\r\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\r\t\t\t/* begin sendSignal:toPid: */\r\t\t\tsig = sigAlrmNumber();\r\t\t\tresult = kill(pidToSignal, sig);\r\t\t\tinterpreterProxy->pop(2);\r\t\t\tinterpreterProxy->pushInteger(result);\r\t\t} else {\r\t\t\tinterpreterProxy->pop(2);\r\t\t\tinterpreterProxy->pushInteger(-1);\r\t\t}\r\t}\r}\r\r\r/*\tSend SIGCHLD (child status has changed, usually death of child) to the OS process\r\tidentified by anIntegerPid. Use an explicit check for isIntegerObject so we can\r\treturn -1 on error (the stackIntegerValue: method answers 1 on error, and 1 is a\r\tvalid pid number). */\r\rEXPORT(sqInt) primitiveSendSigchldTo(sqInt anIntegerPid) {\r    pid_t pidToSignal;\r    int result;\r    sqInt sig;\r\r\tif ((sandboxSecurity()) == 1) {\r\t\tinterpreterProxy->pop(2);\r\t\tinterpreterProxy->pushInteger(-1);\r\t} else {\r\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\r\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\r\t\t\t/* begin sendSignal:toPid: */\r\t\t\tsig = sigChldNumber();\r\t\t\tresult = kill(pidToSignal, sig);\r\t\t\tinterpreterProxy->pop(2);\r\t\t\tinterpreterProxy->pushInteger(result);\r\t\t} else {\r\t\t\tinterpreterProxy->pop(2);\r\t\t\tinterpreterProxy->pushInteger(-1);\r\t\t}\r\t}\r}\r\r\r/*\tSend SIGCONT (continue) to the OS process identified by anIntegerPid. Use an explicit\r\tcheck for isIntegerObject so we can return -1 on error (the stackIntegerValue: method\r\tanswers 1 on error, and 1 is a valid pid number). */\r\rEXPORT(sqInt) primitiveSendSigcontTo(sqInt anIntegerPid) {\r    pid_t pidToSignal;\r    int result;\r    sqInt sig;\r\r\tif ((sandboxSecurity()) == 1) {\r\t\tinterpreterProxy->pop(2);\r\t\tinterpreterProxy->pushInteger(-1);\r\t} else {\r\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\r\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\r\t\t\t/* begin sendSignal:toPid: */\r\t\t\tsig = sigContNumber();\r\t\t\tresult = kill(pidToSignal, sig);\r\t\t\tinterpreterProxy->pop(2);\r\t\t\tinterpreterProxy->pushInteger(result);\r\t\t} else {\r\t\t\tinterpreterProxy->pop(2);\r\t\t\tinterpreterProxy->pushInteger(-1);\r\t\t}\r\t}\r}\r\r\r/*\tSend SIGHUP (hangup) to the OS process identified by anIntegerPid. Use an explicit\r\tcheck for isIntegerObject so we can return -1 on error (the stackIntegerValue: method\r\tanswers 1 on error, and 1 is a valid pid number). */\r\rEXPORT(sqInt) primitiveSendSighupTo(sqInt anIntegerPid) {\r    pid_t pidToSignal;\r    int result;\r    sqInt sig;\r\r\tif ((sandboxSecurity()) == 1) {\r\t\tinterpreterProxy->pop(2);\r\t\tinterpreterProxy->pushInteger(-1);\r\t} else {\r\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\r\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\r\t\t\t/* begin sendSignal:toPid: */\r\t\t\tsig = sigHupNumber();\r\t\t\tresult = kill(pidToSignal, sig);\r\t\t\tinterpreterProxy->pop(2);\r\t\t\tinterpreterProxy->pushInteger(result);\r\t\t} else {\r\t\t\tinterpreterProxy->pop(2);\r\t\t\tinterpreterProxy->pushInteger(-1);\r\t\t}\r\t}\r}\r\r\r/*\tSend SIGINT (interrupt) to the OS process identified by anIntegerPid. Use an explicit\r\tcheck for isIntegerObject so we can return -1 on error (the stackIntegerValue: method\r\tanswers 1 on error, and 1 is a valid pid number). */\r\rEXPORT(sqInt) primitiveSendSigintTo(sqInt anIntegerPid) {\r    pid_t pidToSignal;\r    int result;\r    sqInt sig;\r\r\tif ((sandboxSecurity()) == 1) {\r\t\tinterpreterProxy->pop(2);\r\t\tinterpreterProxy->pushInteger(-1);\r\t} else {\r\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\r\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\r\t\t\t/* begin sendSignal:toPid: */\r\t\t\tsig = sigIntNumber();\r\t\t\tresult = kill(pidToSignal, sig);\r\t\t\tinterpreterProxy->pop(2);\r\t\t\tinterpreterProxy->pushInteger(result);\r\t\t} else {\r\t\t\tinterpreterProxy->pop(2);\r\t\t\tinterpreterProxy->pushInteger(-1);\r\t\t}\r\t}\r}\r\r\r/*\tSend SIGKILL (kill, unblockable) to the OS process identified by anIntegerPid. Use an explicit\r\tcheck for isIntegerObject so we can return -1 on error (the stackIntegerValue: method\r\tanswers 1 on error, and 1 is a valid pid number). */\r\rEXPORT(sqInt) primitiveSendSigkillTo(sqInt anIntegerPid) {\r    pid_t pidToSignal;\r    int result;\r    sqInt sig;\r\r\tif ((sandboxSecurity()) == 1) {\r\t\tinterpreterProxy->pop(2);\r\t\tinterpreterProxy->pushInteger(-1);\r\t} else {\r\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\r\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\r\t\t\t/* begin sendSignal:toPid: */\r\t\t\tsig = sigKillNumber();\r\t\t\tresult = kill(pidToSignal, sig);\r\t\t\tinterpreterProxy->pop(2);\r\t\t\tinterpreterProxy->pushInteger(result);\r\t\t} else {\r\t\t\tinterpreterProxy->pop(2);\r\t\t\tinterpreterProxy->pushInteger(-1);\r\t\t}\r\t}\r}\r\r\r/*\tSend SIGPIPE (broken pipe) to the OS process identified by anIntegerPid. Use an explicit\r\tcheck for isIntegerObject so we can return -1 on error (the stackIntegerValue: method\r\tanswers 1 on error, and 1 is a valid pid number). */\r\rEXPORT(sqInt) primitiveSendSigpipeTo(sqInt anIntegerPid) {\r    pid_t pidToSignal;\r    int result;\r    sqInt sig;\r\r\tif ((sandboxSecurity()) == 1) {\r\t\tinterpreterProxy->pop(2);\r\t\tinterpreterProxy->pushInteger(-1);\r\t} else {\r\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\r\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\r\t\t\t/* begin sendSignal:toPid: */\r\t\t\tsig = sigPipeNumber();\r\t\t\tresult = kill(pidToSignal, sig);\r\t\t\tinterpreterProxy->pop(2);\r\t\t\tinterpreterProxy->pushInteger(result);\r\t\t} else {\r\t\t\tinterpreterProxy->pop(2);\r\t\t\tinterpreterProxy->pushInteger(-1);\r\t\t}\r\t}\r}\r\r\r/*\tSend SIGQUIT (quit) to the OS process identified by anIntegerPid. Use an explicit\r\tcheck for isIntegerObject so we can return -1 on error (the stackIntegerValue: method\r\tanswers 1 on error, and 1 is a valid pid number). */\r\rEXPORT(sqInt) primitiveSendSigquitTo(sqInt anIntegerPid) {\r    pid_t pidToSignal;\r    int result;\r    sqInt sig;\r\r\tif ((sandboxSecurity()) == 1) {\r\t\tinterpreterProxy->pop(2);\r\t\tinterpreterProxy->pushInteger(-1);\r\t} else {\r\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\r\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\r\t\t\t/* begin sendSignal:toPid: */\r\t\t\tsig = sigQuitNumber();\r\t\t\tresult = kill(pidToSignal, sig);\r\t\t\tinterpreterProxy->pop(2);\r\t\t\tinterpreterProxy->pushInteger(result);\r\t\t} else {\r\t\t\tinterpreterProxy->pop(2);\r\t\t\tinterpreterProxy->pushInteger(-1);\r\t\t}\r\t}\r}\r\r\r/*\tSend SIGSTOP (stop, unblockable) to the OS process identified by anIntegerPid. Use an explicit\r\tcheck for isIntegerObject so we can return -1 on error (the stackIntegerValue: method\r\tanswers 1 on error, and 1 is a valid pid number). */\r\rEXPORT(sqInt) primitiveSendSigstopTo(sqInt anIntegerPid) {\r    pid_t pidToSignal;\r    int result;\r    sqInt sig;\r\r\tif ((sandboxSecurity()) == 1) {\r\t\tinterpreterProxy->pop(2);\r\t\tinterpreterProxy->pushInteger(-1);\r\t} else {\r\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\r\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\r\t\t\t/* begin sendSignal:toPid: */\r\t\t\tsig = sigStopNumber();\r\t\t\tresult = kill(pidToSignal, sig);\r\t\t\tinterpreterProxy->pop(2);\r\t\t\tinterpreterProxy->pushInteger(result);\r\t\t} else {\r\t\t\tinterpreterProxy->pop(2);\r\t\t\tinterpreterProxy->pushInteger(-1);\r\t\t}\r\t}\r}\r\r\r/*\tSend SIGTERM (termination) to the OS process identified by anIntegerPid. Use an explicit\r\tcheck for isIntegerObject so we can return -1 on error (the stackIntegerValue: method\r\tanswers 1 on error, and 1 is a valid pid number). */\r\rEXPORT(sqInt) primitiveSendSigtermTo(sqInt anIntegerPid) {\r    pid_t pidToSignal;\r    int result;\r    sqInt sig;\r\r\tif ((sandboxSecurity()) == 1) {\r\t\tinterpreterProxy->pop(2);\r\t\tinterpreterProxy->pushInteger(-1);\r\t} else {\r\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\r\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\r\t\t\t/* begin sendSignal:toPid: */\r\t\t\tsig = sigTermNumber();\r\t\t\tresult = kill(pidToSignal, sig);\r\t\t\tinterpreterProxy->pop(2);\r\t\t\tinterpreterProxy->pushInteger(result);\r\t\t} else {\r\t\t\tinterpreterProxy->pop(2);\r\t\t\tinterpreterProxy->pushInteger(-1);\r\t\t}\r\t}\r}\r\r\r/*\tSend SIGUSR1 (User-defined signal 1) to the OS process identified by anIntegerPid. Use\r\tan explicit check for isIntegerObject so we can return -1 on error (the stackIntegerValue:\r\tmethod answers 1 on error, and 1 is a valid pid number). */\r\rEXPORT(sqInt) primitiveSendSigusr1To(sqInt anIntegerPid) {\r    pid_t pidToSignal;\r    int result;\r    sqInt sig;\r\r\tif ((sandboxSecurity()) == 1) {\r\t\tinterpreterProxy->pop(2);\r\t\tinterpreterProxy->pushInteger(-1);\r\t} else {\r\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\r\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\r\t\t\t/* begin sendSignal:toPid: */\r\t\t\tsig = sigUsr1Number();\r\t\t\tresult = kill(pidToSignal, sig);\r\t\t\tinterpreterProxy->pop(2);\r\t\t\tinterpreterProxy->pushInteger(result);\r\t\t} else {\r\t\t\tinterpreterProxy->pop(2);\r\t\t\tinterpreterProxy->pushInteger(-1);\r\t\t}\r\t}\r}\r\r\r/*\tSend SIGUSR2 (User-defined signal 2) to the OS process identified by anIntegerPid. Use\r\tan explicit check for isIntegerObject so we can return -1 on error (the stackIntegerValue:\r\tmethod answers 1 on error, and 1 is a valid pid number). */\r\rEXPORT(sqInt) primitiveSendSigusr2To(sqInt anIntegerPid) {\r    pid_t pidToSignal;\r    int result;\r    sqInt sig;\r\r\tif ((sandboxSecurity()) == 1) {\r\t\tinterpreterProxy->pop(2);\r\t\tinterpreterProxy->pushInteger(-1);\r\t} else {\r\t\tif (((interpreterProxy->stackValue(0)) & 1)) {\r\t\t\tpidToSignal = interpreterProxy->stackIntegerValue(0);\r\t\t\t/* begin sendSignal:toPid: */\r\t\t\tsig = sigUsr2Number();\r\t\t\tresult = kill(pidToSignal, sig);\r\t\t\tinterpreterProxy->pop(2);\r\t\t\tinterpreterProxy->pushInteger(result);\r\t\t} else {\r\t\t\tinterpreterProxy->pop(2);\r\t\t\tinterpreterProxy->pushInteger(-1);\r\t\t}\r\t}\r}\r\r\r/*\tSet the process group ID of the process identified by pid to a new process\r\tgroup ID. */\r\rEXPORT(sqInt) primitiveSetPGid(void) {\r    pid_t pgid;\r    pid_t pid;\r\r\tpid = interpreterProxy->stackIntegerValue(1);\r\tpgid = interpreterProxy->stackIntegerValue(0);\r\tif ((setpgid(pid, pgid)) == -1) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tinterpreterProxy->pop(2);\r}\r\r\r/*\tSet a new process group for this OS process. Newly created child processes\r\twill be members of the new process group. Note: Use setpgid(0,0) rather than\r\tthe equivalent setpgrp() because setpgrp() is implemented differently on\r\tsome flavors of Unix. */\r\rEXPORT(sqInt) primitiveSetPGrp(void) {\r\tif ((setpgid(0, 0)) == -1) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r}\r\r\r/*\tSet the index of the semaphore used by the OSProcess with which I collaborate. My\r\tOSProcess should set this value so that I can use it when handling SIGCHLD signals\r\t(death of child). In the C translation this is a static int which would be shared by all\r\tinstances of UnixOSProcessPlugin, which is expected to be a singleton. Answer the\r\tvalue of the semaphore index. */\r\rEXPORT(sqInt) primitiveSetSemaIndex(void) {\r\tsigChldSemaIndex = interpreterProxy->stackIntegerValue(0);\r\tinterpreterProxy->pop(2);\r\tinterpreterProxy->pushInteger(sigChldSemaIndex);\r}\r\r\r/*\tQuoted from Linux man pages:\r\tsetsid() creates a new session if the calling process is not a process group leader.\r\tThe calling process is the leader of the new session, the process  group  leader  of\r\tthe new process group, and has no controlling tty.  The process group ID and session\r\tID of the calling process are set to the PID of the calling  process.   The  calling\r\tprocess  will be the only process in this new process group and in this new session. */\r\rEXPORT(sqInt) primitiveSetSid(void) {\r    pid_t sessionId;\r\r\tsessionId = setsid();\r\tif (sessionId == -1) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->pushInteger(sessionId);\r}\r\r\r/*\tInteger value corresponding to SIGCHLD */\r\rEXPORT(sqInt) primitiveSigChldNumber(void) {\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->pushInteger(sigChldNumber());\r}\r\r\r/*\tInteger value corresponding to SIGHUP */\r\rEXPORT(sqInt) primitiveSigHupNumber(void) {\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->pushInteger(sigHupNumber());\r}\r\r\r/*\tInteger value corresponding to SIGINT */\r\rEXPORT(sqInt) primitiveSigIntNumber(void) {\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->pushInteger(sigIntNumber());\r}\r\r\r/*\tInteger value corresponding to SIGKILL */\r\rEXPORT(sqInt) primitiveSigKillNumber(void) {\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->pushInteger(sigKillNumber());\r}\r\r\r/*\tInteger value corresponding to SIGPIPE */\r\rEXPORT(sqInt) primitiveSigPipeNumber(void) {\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->pushInteger(sigPipeNumber());\r}\r\r\r/*\tInteger value corresponding to SIGQUIT */\r\rEXPORT(sqInt) primitiveSigQuitNumber(void) {\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->pushInteger(sigQuitNumber());\r}\r\r\r/*\tInteger value corresponding to SIGTERM */\r\rEXPORT(sqInt) primitiveSigTermNumber(void) {\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->pushInteger(sigTermNumber());\r}\r\r\r/*\tInteger value corresponding to SIGUSR1 */\r\rEXPORT(sqInt) primitiveSigUsr1Number(void) {\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->pushInteger(sigUsr1Number());\r}\r\r\r/*\tInteger value corresponding to SIGUSR2 */\r\rEXPORT(sqInt) primitiveSigUsr2Number(void) {\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->pushInteger(sigUsr2Number());\r}\r\r\r/*\tSize in bytes of an integer, for this C compiler on this machine. */\r\rEXPORT(sqInt) primitiveSizeOfInt(void) {\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->pushInteger(sizeOfInt());\r}\r\r\r/*\tSize in bytes of a void pointer, for this C compiler on this machine. */\r\rEXPORT(sqInt) primitiveSizeOfPointer(void) {\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->pushInteger(sizeOfPointer());\r}\r\r\r/*\tTake a struct SQFile from the stack, and call feof(3) to determine if the file has\r\treached end of file. The flag is set only by a previous read operation, so end of\r\tfile is not detected until an actual EOF condition has been detected by a read attempt. */\r\rEXPORT(sqInt) primitiveTestEndOfFileFlag(void) {\r    FILEHANDLETYPE file;\r    sqInt result;\r    sqInt sqFileOop;\r\r\tsqFileOop = interpreterProxy->stackValue(0);\r\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tfile = fileHandleFrom(sqFileOop);\r\tif (file == 0) {\r\t\treturn primitiveFail();\r\t}\r\tif (feof(file)) {\r\t\tresult = interpreterProxy->trueObject();\r\t} else {\r\t\tresult = interpreterProxy->falseObject();\r\t}\r\tinterpreterProxy->pop(2);\r\tinterpreterProxy->push(result);\r}\r\r\r/*\tTake a struct SQFile from the stack, and check for ability to lock the specified region.\r\tIf the exclusive flag is true, then specify an exclusive (F_WRLCK) lock on the\r     file. Otherwise, specify a shared (F_RDLCK) lock. Any number of Unix processes\r     may hold  a read lock (shared lock) on a file region, but only one process may\r     hold a write lock (exclusive lock).\r\r\tIf length is zero, then the request is for the entire file to be locked, including\r\tregion extents that have not yet been allocated for the file.\r\r\tIf the fcntl() call fails, answer -1 (the result of the failed call). Otherwise,\r\tanswer an array with the following six fields:\r\t\tlockable (true or false)\r\t\tl_pid (pid of the process preventing this lock request, or nil)\r\t\tl_type (request type F_WRLCK or F_RDLOCK of the process preventing this lock request)\r\t\tl_whence (the SEEK_SET, SEEK_CUR, or SEEK_END value of the lock preventing this lock request).\r\t\tl_start (offset of the region lock preventing this lock request)\r\t\tl_len (length of the region lock preventing this lock request) */\r\rEXPORT(sqInt) primitiveTestLockableFileRegion(void) {\r    sqInt canObtainLock;\r    sqInt exclusive;\r    int fileNo;\r    sqInt len;\r    struct flock lockStruct;\r    int result;\r    sqInt resultArray;\r    sqInt sqFileOop;\r    sqInt start;\r\r\texclusive = (interpreterProxy->stackValue(0)) == (interpreterProxy->trueObject());\r\tlen = interpreterProxy->stackIntegerValue(1);\r\tstart = interpreterProxy->stackIntegerValue(2);\r\tsqFileOop = interpreterProxy->stackValue(3);\r\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\r\t/* Set up the flock structure parameter for fcntl() */\r\r\tfileNo = unixFileNumber(fileHandleFrom(sqFileOop));\r\tif (exclusive) {\r\t\tlockStruct.l_type = F_WRLCK;\r\t} else {\r\t\tlockStruct.l_type = F_RDLCK;\r\t}\r\tlockStruct.l_whence = SEEK_SET;\r\tlockStruct.l_start = start;\r\tlockStruct.l_len = len;\r\tlockStruct.l_pid = 0;\r\tresult = fcntl(fileNo, F_GETLK, &lockStruct);\r\tif (result == -1) {\r\t\tinterpreterProxy->pop(5);\r\t\tinterpreterProxy->pushInteger(result);\r\t} else {\r\t\tif (lockStruct.l_type == F_UNLCK) {\r\t\t\tcanObtainLock = interpreterProxy->trueObject();\r\t\t} else {\r\t\t\tcanObtainLock = interpreterProxy->falseObject();\r\t\t}\r\t\tresultArray = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classArray(), 6);\r\t\tinterpreterProxy->stObjectatput(resultArray, 1, canObtainLock);\r\t\tinterpreterProxy->stObjectatput(resultArray, 2, (((lockStruct.l_pid) << 1) | 1));\r\t\tinterpreterProxy->stObjectatput(resultArray, 3, (((lockStruct.l_type) << 1) | 1));\r\t\tinterpreterProxy->stObjectatput(resultArray, 4, (((lockStruct.l_whence) << 1) | 1));\r\t\tinterpreterProxy->stObjectatput(resultArray, 5, (((lockStruct.l_start) << 1) | 1));\r\t\tinterpreterProxy->stObjectatput(resultArray, 6, (((lockStruct.l_len) << 1) | 1));\r\t\tinterpreterProxy->popthenPush(5, resultArray);\r\t}\r}\r\r\r/*\tClose a file handle at the close(2) level, using a handle returned by\r\t#primitiveUnixFileNumber. */\r\rEXPORT(sqInt) primitiveUnixFileClose(sqInt anIntegerFileNumber) {\r    int handle;\r    int result;\r\r\thandle = interpreterProxy->stackIntegerValue(0);\r\tresult = close(handle);\r\tinterpreterProxy->pop(2);\r\tinterpreterProxy->pushInteger(result);\r}\r\r\r/*\tTake a struct SQFile from the stack, and answer the value of its Unix file number.\r\tThe Unix file number is not directly useful to Squeak, but may be interesting for\r\tdebugging problems involving failure to close unused file handles. */\r\rEXPORT(sqInt) primitiveUnixFileNumber(void) {\r    int fileNo;\r    sqInt sqFileOop;\r\r\tsqFileOop = interpreterProxy->stackValue(0);\r\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\tfileNo = unixFileNumber(fileHandleFrom(sqFileOop));\r\tinterpreterProxy->pop(2);\r\tinterpreterProxy->pushInteger(fileNo);\r}\r\r\r/*\tTake a struct SQFile from the stack, and unlock the specified region.\r\tAnswer the result of the call to fcntl(). If the region is in the file lock cache,\r\tremove it, but otherwise ignore the cache. The cache supports Win32 semantics\r\twithin a single Squeak image, but not across separate images, therefore the\r\tunlock should be attempted regardless of whether this image thinks that the\r\tregion has previously been locked. Answer the result of the call to fcntl(). */\r\rEXPORT(sqInt) primitiveUnlockFileRegion(void) {\r    int fileNo;\r    sqInt len;\r    struct flock lockStruct;\r    int result;\r    sqInt sqFileOop;\r    sqInt start;\r\r\tlen = interpreterProxy->stackIntegerValue(0);\r\tstart = interpreterProxy->stackIntegerValue(1);\r\tsqFileOop = interpreterProxy->stackValue(2);\r\tif (!((((interpreterProxy->isBytes(sqFileOop)) && ((interpreterProxy->byteSizeOf(sqFileOop)) == (fileRecordSize()))) && ((interpreterProxy->getThisSessionID()) == (sessionIdentifierFromSqFile(interpreterProxy->arrayValueOf(sqFileOop))))) && (isNonNullSQFile(sqFileOop)))) {\r\t\treturn interpreterProxy->primitiveFail();\r\t}\r\r\t/* Set up the flock structure parameter for fcntl() */\r\r\tfileNo = unixFileNumber(fileHandleFrom(sqFileOop));\r\tlockStruct.l_type = F_UNLCK;\r\tlockStruct.l_whence = SEEK_SET;\r\tlockStruct.l_start = start;\r\tlockStruct.l_len = len;\r\tlockStruct.l_pid = 0;\r\tresult = fcntl(fileNo, F_SETLK, &lockStruct);\r\tinterpreterProxy->pop(4);\r\tinterpreterProxy->pushInteger(result);\r}\r\r\r/*\tUnset an environment variable. */\r/*\tFIXME: unsetenv() is not portable. For Solaris or any other system which does not\r\tsupport unsetenv(), just comment it out in this method and rebuild the plugin. */\r\rEXPORT(sqInt) primitiveUnsetEnv(void) {\r\tunsetenv(transientCStringFromString(interpreterProxy->stackObjectValue(0)));\r\tinterpreterProxy->pop(1);\r}\r\r\r/*\tAnswer a string containing the version string for this plugin. */\r\rEXPORT(sqInt) primitiveVersionString(void) {\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->push(stringFromCString(versionString()));\r}\r\r\r/*\tThis is a signal handler for SIGCHLD. It is not meant to be called from Smalltalk,\r\tand should only be called indirectly as a result of a death of child signal from\r\tthe operating system.\r\r\tChild processes must be cleaned up by the parent, otherwise they continue\r\tto exist as zombies until the parent exits. This handler resets the signal handler\r\tto catch the next SIGCHLD signal, then sets a semaphore to notify the system\r\tthat a child process needs to be cleaned up. The actual clean up is done by a\r\tSmalltalk process which waits on the semaphore, then calls primitiveReapChildProcess.\r\r\tNote: If child processes die faster than we can clean them up, signals will be lost\r\tand child processes will remain as zombies. */\r\rstatic void reapChildProcess(int sigNum) {\r\tsetSigChldHandler();\r\tif (sigChldSemaIndex > 0) {\r\t\tinterpreterProxy->signalSemaphoreWithIndex(sigChldSemaIndex);\r\t}\r}\r\r\r/*\tSignal sigNum has been caught by a thread other than the pthread in which\r\tthe interpreter is executing. Rather than handling it in this thread, resend\r\tit to the interpreter thread. */\r\rstatic sqInt resendSignal(int sigNum) {\r\tpthread_kill(vmThread, sigNum);\r}\r\r\r/*\tRestore signal handlers to their original behaviors. */\r\rstatic void restoreDefaultSignalHandlers(void) {\r    sqInt sigNum;\r\r\tsigNum = 1;\r\twhile (sigNum <= (signalArraySize())) {\r\t\tif ((semaIndices[sigNum]) > 0) {\r\t\t\tsetSignalNumberhandler(sigNum, originalSigHandlers[sigNum]);\r\t\t}\r\t\tsigNum += 1;\r\t}\r}\r\r\r/*\tAnswer 1 if running in secure mode, else 0. The osprocessSandboxSecurity\r\tvariable is initialized to -1. On the first call to this method, set its value to\r\teither 0 (user has full access to the plugin) or 1 (user is not permitted to do\r\tdangerous things). */\r\rstatic sqInt sandboxSecurity(void) {\r\tif (osprocessSandboxSecurity < 0) {\r\t\tosprocessSandboxSecurity = securityHeurisitic();\r\t}\r\treturn osprocessSandboxSecurity;\r}\r\r\r/*\tAnswer 0 to permit full access to OSProcess functions, or 1 if access should be\r\trestricted for dangerous functions. The rules are:\r\t\t- If the security plugin is not present, grant full access\r\t\t- If the security plugin can be loaded, restrict access unless user has all\r\t\t  of secCanWriteImage, secHasFileAccess and secHasSocketAccess */\r/*\tFIXME: This function has not been tested. -dtl */\r/*\tIf the security plugin can be loaded, use it to check. If not, assume it's ok */\r\rstatic sqInt securityHeurisitic(void) {\r    sqInt canWriteImage;\r    sqInt hasFileAccess;\r    sqInt hasSocketAccess;\r    void (*sCWIfn)(void);\r    void (*sHFAfn)(void);\r    void (*sHSAfn)(void);\r\r\tsCWIfn = interpreterProxy->ioLoadFunctionFrom(\"secCanWriteImage\", \"SecurityPlugin\");\r\tif (sCWIfn == 0) {\r\t\treturn 0;\r\t}\r\tcanWriteImage =  ((int (*) (void)) sCWIfn)();\r\tsHFAfn = interpreterProxy->ioLoadFunctionFrom(\"secHasFileAccess\", \"SecurityPlugin\");\r\tif (sHFAfn == 0) {\r\t\treturn 0;\r\t}\r\thasFileAccess =  ((int (*) (void)) sHFAfn)();\r\tsHSAfn = interpreterProxy->ioLoadFunctionFrom(\"secHasSocketAccess\", \"SecurityPlugin\");\r\tif (sHSAfn == 0) {\r\t\treturn 0;\r\t}\r\thasSocketAccess =  ((int (*) (void)) sHSAfn)();\r\tif ((canWriteImage && (hasFileAccess)) && (hasSocketAccess)) {\r\t\treturn 0;\r\t} else {\r\t\treturn 1;\r\t}\r}\r\r\r/*\tAn array of Smalltalk Semaphore indices, one for each signal type for which\r\ta handler has been set. If an entry is zero, then no handler is active. */\r\rstatic unsigned char * semaphoreIndices(void) {\r\treturn semaIndices;\r}\r\r\r/*\tkill(pid, sig) */\r\rstatic sqInt sendSignaltoPid(sqInt sig, sqInt pid) {\r\treturn kill(pid, sig);\r}\r\r\r/*\tExit function to be registered with atexit() to signal child processes on VM exit. */\r\rstatic void sendSignalToPids(void) {\r    sqInt count;\r    pid_t pid;\r    sqInt sig;\r\r\tcount = 0;\r\twhile (count < pidCount) {\r\t\tpid = pidArray[count];\r\t\t/* begin sendSignal:toPid: */\r\t\tsig = sigNumToSend;\r\t\tkill(pid, sig);\r\t\tcount += 1;\r\t}\r}\r\r\r/*\tAnswer a session ID represented by aByteArray. The session ID is used in\r\tthe SQFile structure. If that data structure changes, we should see compiler\r\twarnings about type mismatch with SESSIONIDENTIFIERTYPE. */\r\rstatic SESSIONIDENTIFIERTYPE sessionIdentifierFrom(sqInt aByteArray) {\r    sqInt idx;\r    unsigned char *session;\r    union {SESSIONIDENTIFIERTYPE session; unsigned char bytes[sizeof(SESSIONIDENTIFIERTYPE)];} sessionUnion;\r\r\tif (!((interpreterProxy->isBytes(aByteArray)) && ((interpreterProxy->stSizeOf(aByteArray)) == (sizeOfSession())))) {\r\t\treturn null;\r\t}\r\tsession = interpreterProxy->arrayValueOf(aByteArray);\r\tidx = 0;\r\twhile (idx < (sizeOfSession())) {\r\t\tsessionUnion.bytes[idx] = session[idx];\r\t\tidx += 1;\r\t}\r\treturn sessionUnion.session;\r}\r\r\r/*\tAnswer the session identifier from a SQFile structure. For a valid file\r\treference, this identifier will match the session identifier supplied by\r\tthe interpreter. */\r\rstatic SESSIONIDENTIFIERTYPE sessionIdentifierFromSqFile(SQFile *sqFile) {\r\treturn sqFile->sessionID;\r}\r\r\r/*\tNote: This is coded so that is can be run from Squeak. */\r\rEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter) {\r    sqInt ok;\r\r\tinterpreterProxy = anInterpreter;\r\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\r\tif (ok == 0) {\r\t\treturn 0;\r\t}\r\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\r\treturn ok;\r}\r\rstatic void setSigChldDefaultHandler(void) {\r\tsetSignalNumberhandler(sigChldNumber(), sigDefaultNumber());\r}\r\r\r/*\tSet the SIGCHLD signal handler in the virtual machine. */\r\rstatic void setSigChldHandler(void) {\r\tif ((signal(SIGCHLD, reapChildProcess)) == (sigErrorNumber())) {\r\t\tperror(\"signal\");\r\t}\r}\r\rstatic void setSigIntDefaultHandler(void) {\r\tsetSignalNumberhandler(sigIntNumber(), sigDefaultNumber());\r}\r\r\r/*\tSet the SIGINT signal handler in the virtual machine to ignore interrupts. */\r\rstatic void setSigIntIgnore(void) {\r\tsetSignalNumberhandler(sigIntNumber(), sigIgnoreNumber());\r}\r\rstatic void setSigPipeDefaultHandler(void) {\r\tsetSignalNumberhandler(sigPipeNumber(), sigDefaultNumber());\r}\r\r\r/*\tSet the SIGPIPE signal handler in the virtual machine to ignore pipe error signals.\r\tIf a pipe is opened to a child process, and the child exits, then subsequent writes to\r\tthe pipe generate a SIGPIPE signal. If this signal is not handled, the VM will exit\r\twithout warning. */\r\rstatic sqInt setSigPipeHandler(void) {\r\t/* begin setSigPipeIgnore */\r\tsetSignalNumberhandler(sigPipeNumber(), sigIgnoreNumber());\r}\r\r\r/*\tSet the SIGPIPE signal handler in the virtual machine to ignore pipe error signals. */\r\rstatic void setSigPipeIgnore(void) {\r\tsetSignalNumberhandler(sigPipeNumber(), sigIgnoreNumber());\r}\r\r\r/*\tSet a signal handler. The C code translator will convert #sig:nal: into 'signal(parm1, parm2)' */\r\rstatic void * setSignalNumberhandler(sqInt anInteger, void *signalHandlerAddress) {\r\treturn signal(anInteger, signalHandlerAddress);\r}\r\rEXPORT(sqInt) shutdownModule(void) {\r    sqInt sigNum;\r\r\t/* begin restoreDefaultSignalHandlers */\r\tsigNum = 1;\r\twhile (sigNum <= (signalArraySize())) {\r\t\tif ((semaIndices[sigNum]) > 0) {\r\t\t\tsetSignalNumberhandler(sigNum, originalSigHandlers[sigNum]);\r\t\t}\r\t\tsigNum += 1;\r\t}\r}\r\r\r/*\tAbort signal from abort(3) */\r\rstatic sqInt sigAbrtNumber(void) {\r\treturn SIGABRT;\r}\r\r\r/*\tTimer signal from alarm(2) */\r\rstatic sqInt sigAlrmNumber(void) {\r\treturn SIGALRM;\r}\r\r\r/*\tChild status has changed (POSIX). */\r\rstatic sqInt sigChldNumber(void) {\r\treturn SIGCHLD;\r}\r\r\r/*\tContinue if stopped */\r\rstatic sqInt sigContNumber(void) {\r\treturn SIGCONT;\r}\r\r\r/*\tDefault action for a signal */\r\rstatic void * sigDefaultNumber(void) {\r\treturn SIG_DFL;\r}\r\r\r/*\tError return from signal() */\r\rstatic void * sigErrorNumber(void) {\r\treturn SIG_ERR;\r}\r\r\r/*\tHangup detected on controlling terminal or death of controlling process */\r\rstatic sqInt sigHupNumber(void) {\r\treturn SIGHUP;\r}\r\r\r/*\tIgnore action for a signal */\r\rstatic void * sigIgnoreNumber(void) {\r\treturn SIG_IGN;\r}\r\r\r/*\tInterrupt (ANSI). */\r\rstatic sqInt sigIntNumber(void) {\r\treturn SIGINT;\r}\r\r\r/*\tKill signal */\r\rstatic sqInt sigKillNumber(void) {\r\treturn SIGKILL;\r}\r\r\r/*\tBroken pipe (POSIX). */\r\rstatic sqInt sigPipeNumber(void) {\r\treturn SIGPIPE;\r}\r\r\r/*\tQuit from keyboard */\r\rstatic sqInt sigQuitNumber(void) {\r\treturn SIGQUIT;\r}\r\r\r/*\tStop process */\r\rstatic sqInt sigStopNumber(void) {\r\treturn SIGSTOP;\r}\r\r\r/*\tTermination signal. This is the default signal sent by the unix kill(1) command. */\r\rstatic sqInt sigTermNumber(void) {\r\treturn SIGTERM;\r}\r\r\r/*\tUser defined signal number 1. This is value is platform-dependent, so the\r\tinSmalltalk default of 10 may be wrong on some platforms. */\r\rstatic sqInt sigUsr1Number(void) {\r\treturn SIGUSR1;\r}\r\r\r/*\tUser defined signal number 2. This is value is platform-dependent, so the\r\tinSmalltalk default of 12 may be wrong on some platforms. */\r\rstatic sqInt sigUsr2Number(void) {\r\treturn SIGUSR2;\r}\r\r\r/*\tNumber of possible signals for this OS plus one. The signal handler arrays\r\tdeclared in #declareCVarsIn: are this size. */\r\rstatic sqInt signalArraySize(void) {\r\treturn NSIG;\r}\r\r\r/*\tAn array of signal handler function addresses, with each entry corresponding\r\tto a signal type. */\r\rstatic void ** signalHandlers(void) {\r\treturn sigHandlers;\r}\r\r\r/*\tSize in bytes of an integer, for this C compiler on this machine. */\r\rstatic sqInt sizeOfInt(void) {\r\treturn sizeof(int);\r}\r\r\r/*\tSize in bytes of a void pointer, for this C compiler on this machine. */\r\rstatic sqInt sizeOfPointer(void) {\r\treturn sizeof(void *);\r}\r\r\r/*\tSize of a SESSIONIDENTIFIERTYPE. Should match usage in the SQFile data structure,\r\totherwise we should get compiler warnings. */\r\rstatic sqInt sizeOfSession(void) {\r\treturn sizeof(SESSIONIDENTIFIERTYPE);\r}\r\r\r/*\tAnswer the OS file descriptor, an integer value, from a SQSocket data structure,\r\tor answer -1 if unable to obtain the file descriptor (probably due to receiving\r\tan incorrect type of object as aFileHandle).\r\r\tWarning: The first element of privateSocketStruct happens to be the Unix file\r\tnumber of the socket. See sqUnixSocket.c for the definition. This method takes\r\tadvantage of this, and will break if anyone ever redefines the data structure. */\r\rstatic int socketDescriptorFrom(sqInt sqSocketOop) {\r    void *privateSocketStruct;\r    SQSocket *sqSocket;\r\r\tsqSocket = interpreterProxy->arrayValueOf(sqSocketOop);\r\tprivateSocketStruct = sqSocket->privateSocketPtr;\r\tif (privateSocketStruct == 0) {\r\t\treturn -1;\r\t}\r\treturn * (int *) privateSocketStruct;\r}\r\r\r/*\tAnswer the size of a SQSocket data structure in bytes. */\r\rstatic sqInt socketRecordSize(void) {\r\treturn sizeof(SQSocket);\r}\r\r\r/*\tReturn a pointer to the first byte of of the SQsocket data structure socket record within\r\tanSQSocketRecord, which is expected to be a ByteArray of size self>>socketRecordSize. */\r\rstatic SQSocket * socketValueOf(sqInt anSQSocketRecord) {\r\treturn interpreterProxy->arrayValueOf(anSQSocketRecord);\r}\r\r\r/*\tAnswer a new String copied from a null-terminated C string.\r\tCaution: This may invoke the garbage collector. */\r\rstatic sqInt stringFromCString(const char *aCString) {\r    sqInt len;\r    sqInt newString;\r\r\tlen = strlen(aCString);\r\tnewString = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), len);\r\tstrncpy(interpreterProxy->arrayValueOf(newString), aCString, len);\r\treturn newString;\r}\r\r\r/*\tAnswer a new null-terminated C string copied from aString.\r\tThe string is allocated in object memory, and will be moved\r\twithout warning by the garbage collector. Any C pointer\r\treference the the result is valid only until the garbage\r\tcollector next runs. Therefore, this method should only be used\r\twithin a single primitive in a section of code in which the\r\tgarbage collector is guaranteed not to run. Note also that\r\tthis method may itself invoke the garbage collector prior\r\tto allocating the new C string.\r\r\tWarning: The result of this method will be invalidated by the\r\tnext garbage collection, including a GC triggered by creation\r\tof a new object within a primitive. Do not call this method\r\ttwice to obtain two string pointers. */\r\rstatic char * transientCStringFromString(sqInt aString) {\r    char *cString;\r    sqInt len;\r    sqInt newString;\r    char *stringPtr;\r\r\r\t/* Allocate space for a null terminated C string. */\r\r\tlen = interpreterProxy->sizeOfSTArrayFromCPrimitive(interpreterProxy->arrayValueOf(aString));\r\tinterpreterProxy->pushRemappableOop(aString);\r\tnewString = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), len + 1);\r\tstringPtr = interpreterProxy->arrayValueOf(interpreterProxy->popRemappableOop());\r\r\t/* Point to the actual C string. */\r\r\tcString = interpreterProxy->arrayValueOf(newString);\r\t(char *)strncpy(cString, stringPtr, len);\r\tcString[len] = 0;\r\treturn cString;\r}\r\r\r/*\tAnswer the integer Unix file number corresponding to a file handle (FILE* ). */\r\rstatic int unixFileNumber(FILEHANDLETYPE fileHandle) {\r\treturn fileno(fileHandle);\r}\r\r\r/*\tAnswer a string containing the version string for this plugin. Handle MNU\r\terrors, which can occur if class InterpreterPlugin has been removed from\r\tthe system.\r\r\tImportant: When this method is changed, the class side method must also be\r\tchanged to match. */\r/*\t4.0 supports 64bit code base */\r\rstatic char * versionString(void) {\r    static char version[]= \"4.3.3\";\r\r\treturn version;\r}\r\r\r#ifdef SQUEAK_BUILTIN_PLUGIN\r\r\rvoid* UnixOSProcessPlugin_exports[][3] = {\r\t{\"UnixOSProcessPlugin\", \"primitiveSQFileSetBlocking\", (void*)primitiveSQFileSetBlocking},\r\t{\"UnixOSProcessPlugin\", \"moduleUnloaded\", (void*)moduleUnloaded},\r\t{\"UnixOSProcessPlugin\", \"primitiveSigTermNumber\", (void*)primitiveSigTermNumber},\r\t{\"UnixOSProcessPlugin\", \"primitiveSigQuitNumber\", (void*)primitiveSigQuitNumber},\r\t{\"UnixOSProcessPlugin\", \"primitiveSigHupNumber\", (void*)primitiveSigHupNumber},\r\t{\"UnixOSProcessPlugin\", \"primitiveSendSigquitTo\", (void*)primitiveSendSigquitTo},\r\t{\"UnixOSProcessPlugin\", \"forkSqueak\", (void*)forkSqueak},\r\t{\"UnixOSProcessPlugin\", \"primitiveFileStat\", (void*)primitiveFileStat},\r\t{\"UnixOSProcessPlugin\", \"primitiveFileProtectionMask\", (void*)primitiveFileProtectionMask},\r\t{\"UnixOSProcessPlugin\", \"primitiveSQFileFlush\", (void*)primitiveSQFileFlush},\r\t{\"UnixOSProcessPlugin\", \"primitiveForkSqueak\", (void*)primitiveForkSqueak},\r\t{\"UnixOSProcessPlugin\", \"primitiveGetPid\", (void*)primitiveGetPid},\r\t{\"UnixOSProcessPlugin\", \"shutdownModule\", (void*)shutdownModule},\r\t{\"UnixOSProcessPlugin\", \"primitiveVersionString\", (void*)primitiveVersionString},\r\t{\"UnixOSProcessPlugin\", \"primitiveGetCurrentWorkingDirectory\", (void*)primitiveGetCurrentWorkingDirectory},\r\t{\"UnixOSProcessPlugin\", \"primitiveForkExec\", (void*)primitiveForkExec},\r\t{\"UnixOSProcessPlugin\", \"primitiveTestEndOfFileFlag\", (void*)primitiveTestEndOfFileFlag},\r\t{\"UnixOSProcessPlugin\", \"primitiveGetPGrp\", (void*)primitiveGetPGrp},\r\t{\"UnixOSProcessPlugin\", \"primitiveGetStdOutHandleWithSessionIdentifier\", (void*)primitiveGetStdOutHandleWithSessionIdentifier},\r\t{\"UnixOSProcessPlugin\", \"primitiveGetStdInHandleWithSessionIdentifier\", (void*)primitiveGetStdInHandleWithSessionIdentifier},\r\t{\"UnixOSProcessPlugin\", \"primitiveSigUsr1Number\", (void*)primitiveSigUsr1Number},\r\t{\"UnixOSProcessPlugin\", \"primitiveGetGid\", (void*)primitiveGetGid},\r\t{\"UnixOSProcessPlugin\", \"primitiveForkSqueakWithoutSigHandler\", (void*)primitiveForkSqueakWithoutSigHandler},\r\t{\"UnixOSProcessPlugin\", \"primitiveSendSigabrtTo\", (void*)primitiveSendSigabrtTo},\r\t{\"UnixOSProcessPlugin\", \"primitivePutEnv\", (void*)primitivePutEnv},\r\t{\"UnixOSProcessPlugin\", \"primitiveGetEGid\", (void*)primitiveGetEGid},\r\t{\"UnixOSProcessPlugin\", \"primitiveSigIntNumber\", (void*)primitiveSigIntNumber},\r\t{\"UnixOSProcessPlugin\", \"primitiveSigKillNumber\", (void*)primitiveSigKillNumber},\r\t{\"UnixOSProcessPlugin\", \"primitiveTestLockableFileRegion\", (void*)primitiveTestLockableFileRegion},\r\t{\"UnixOSProcessPlugin\", \"primitiveSetPGid\", (void*)primitiveSetPGid},\r\t{\"UnixOSProcessPlugin\", \"primitiveSetSemaIndex\", (void*)primitiveSetSemaIndex},\r\t{\"UnixOSProcessPlugin\", \"primitiveLockFileRegion\", (void*)primitiveLockFileRegion},\r\t{\"UnixOSProcessPlugin\", \"primitiveSendSigusr1To\", (void*)primitiveSendSigusr1To},\r\t{\"UnixOSProcessPlugin\", \"primitiveAioHandle\", (void*)primitiveAioHandle},\r\t{\"UnixOSProcessPlugin\", \"primitiveGetThreadID\", (void*)primitiveGetThreadID},\r\t{\"UnixOSProcessPlugin\", \"primitiveSendSigalrmTo\", (void*)primitiveSendSigalrmTo},\r\t{\"UnixOSProcessPlugin\", \"primitiveMakePipe\", (void*)primitiveMakePipe},\r\t{\"UnixOSProcessPlugin\", \"primitiveGetSession\", (void*)primitiveGetSession},\r\t{\"UnixOSProcessPlugin\", \"primitiveForkAndExecInDirectory\", (void*)primitiveForkAndExecInDirectory},\r\t{\"UnixOSProcessPlugin\", \"primitiveGetUid\", (void*)primitiveGetUid},\r\t{\"UnixOSProcessPlugin\", \"primitiveSigPipeNumber\", (void*)primitiveSigPipeNumber},\r\t{\"UnixOSProcessPlugin\", \"primitiveSizeOfInt\", (void*)primitiveSizeOfInt},\r\t{\"UnixOSProcessPlugin\", \"primitiveChdir\", (void*)primitiveChdir},\r\t{\"UnixOSProcessPlugin\", \"primitiveSendSighupTo\", (void*)primitiveSendSighupTo},\r\t{\"UnixOSProcessPlugin\", \"primitiveSendSigchldTo\", (void*)primitiveSendSigchldTo},\r\t{\"UnixOSProcessPlugin\", \"primitiveForwardSignalToSemaphore\", (void*)primitiveForwardSignalToSemaphore},\r\t{\"UnixOSProcessPlugin\", \"primitiveSQFileSetNonBlocking\", (void*)primitiveSQFileSetNonBlocking},\r\t{\"UnixOSProcessPlugin\", \"primitiveSetSid\", (void*)primitiveSetSid},\r\t{\"UnixOSProcessPlugin\", \"primitiveRealpath\", (void*)primitiveRealpath},\r\t{\"UnixOSProcessPlugin\", \"primitiveSendSigpipeTo\", (void*)primitiveSendSigpipeTo},\r\t{\"UnixOSProcessPlugin\", \"primitiveGetStdOutHandle\", (void*)primitiveGetStdOutHandle},\r\t{\"UnixOSProcessPlugin\", \"primitiveSendSigintTo\", (void*)primitiveSendSigintTo},\r\t{\"UnixOSProcessPlugin\", \"primitiveAioSuspend\", (void*)primitiveAioSuspend},\r\t{\"UnixOSProcessPlugin\", \"primitiveSendSigtermTo\", (void*)primitiveSendSigtermTo},\r\t{\"UnixOSProcessPlugin\", \"setInterpreter\", (void*)setInterpreter},\r\t{\"UnixOSProcessPlugin\", \"primitiveSQFileSetBlockingWithSessionIdentifier\", (void*)primitiveSQFileSetBlockingWithSessionIdentifier},\r\t{\"UnixOSProcessPlugin\", \"primitiveGetPPid\", (void*)primitiveGetPPid},\r\t{\"UnixOSProcessPlugin\", \"initialiseModule\", (void*)initialiseModule},\r\t{\"UnixOSProcessPlugin\", \"primitiveSigUsr2Number\", (void*)primitiveSigUsr2Number},\r\t{\"UnixOSProcessPlugin\", \"primitiveSendSigusr2To\", (void*)primitiveSendSigusr2To},\r\t{\"UnixOSProcessPlugin\", \"primitiveSendSigkillTo\", (void*)primitiveSendSigkillTo},\r\t{\"UnixOSProcessPlugin\", \"primitiveSemaIndexFor\", (void*)primitiveSemaIndexFor},\r\t{\"UnixOSProcessPlugin\", \"primitiveReapChildProcess\", (void*)primitiveReapChildProcess},\r\t{\"UnixOSProcessPlugin\", \"primitiveErrorMessageAt\", (void*)primitiveErrorMessageAt},\r\t{\"UnixOSProcessPlugin\", \"primitiveArgumentAt\", (void*)primitiveArgumentAt},\r\t{\"UnixOSProcessPlugin\", \"primitiveGetPGid\", (void*)primitiveGetPGid},\r\t{\"UnixOSProcessPlugin\", \"primitiveGetStdErrHandle\", (void*)primitiveGetStdErrHandle},\r\t{\"UnixOSProcessPlugin\", \"primitiveUnixFileClose\", (void*)primitiveUnixFileClose},\r\t{\"UnixOSProcessPlugin\", \"primitiveSQFileSetNonBlockingWithSessionIdentifier\", (void*)primitiveSQFileSetNonBlockingWithSessionIdentifier},\r\t{\"UnixOSProcessPlugin\", \"primitiveAioEnable\", (void*)primitiveAioEnable},\r\t{\"UnixOSProcessPlugin\", \"primitiveSQFileSetUnbuffered\", (void*)primitiveSQFileSetUnbuffered},\r\t{\"UnixOSProcessPlugin\", \"primitiveUnixFileNumber\", (void*)primitiveUnixFileNumber},\r\t{\"UnixOSProcessPlugin\", \"primitiveGetStdErrHandleWithSessionIdentifier\", (void*)primitiveGetStdErrHandleWithSessionIdentifier},\r\t{\"UnixOSProcessPlugin\", \"primitiveKillOnExit\", (void*)primitiveKillOnExit},\r\t{\"UnixOSProcessPlugin\", \"primitiveCanReceiveSignals\", (void*)primitiveCanReceiveSignals},\r\t{\"UnixOSProcessPlugin\", \"primitiveMakePipeWithSessionIdentifier\", (void*)primitiveMakePipeWithSessionIdentifier},\r\t{\"UnixOSProcessPlugin\", \"primitiveGetEUid\", (void*)primitiveGetEUid},\r\t{\"UnixOSProcessPlugin\", \"primitiveSQFileSetUnbufferedWithSessionIdentifier\", (void*)primitiveSQFileSetUnbufferedWithSessionIdentifier},\r\t{\"UnixOSProcessPlugin\", \"primitiveSizeOfPointer\", (void*)primitiveSizeOfPointer},\r\t{\"UnixOSProcessPlugin\", \"primitiveDupTo\", (void*)primitiveDupTo},\r\t{\"UnixOSProcessPlugin\", \"primitiveSigChldNumber\", (void*)primitiveSigChldNumber},\r\t{\"UnixOSProcessPlugin\", \"primitiveGetStdInHandle\", (void*)primitiveGetStdInHandle},\r\t{\"UnixOSProcessPlugin\", \"primitiveCreatePipe\", (void*)primitiveCreatePipe},\r\t{\"UnixOSProcessPlugin\", \"primitiveUnlockFileRegion\", (void*)primitiveUnlockFileRegion},\r\t{\"UnixOSProcessPlugin\", \"primitiveModuleName\", (void*)primitiveModuleName},\r\t{\"UnixOSProcessPlugin\", \"primitiveFixPointersInArrayOfStrings\", (void*)primitiveFixPointersInArrayOfStrings},\r\t{\"UnixOSProcessPlugin\", \"primitiveUnsetEnv\", (void*)primitiveUnsetEnv},\r\t{\"UnixOSProcessPlugin\", \"primitiveNice\", (void*)primitiveNice},\r\t{\"UnixOSProcessPlugin\", \"primitiveSendSigcontTo\", (void*)primitiveSendSigcontTo},\r\t{\"UnixOSProcessPlugin\", \"primitiveEnvironmentAt\", (void*)primitiveEnvironmentAt},\r\t{\"UnixOSProcessPlugin\", \"primitiveSendSigstopTo\", (void*)primitiveSendSigstopTo},\r\t{\"UnixOSProcessPlugin\", \"primitiveEnvironmentAtSymbol\", (void*)primitiveEnvironmentAtSymbol},\r\t{\"UnixOSProcessPlugin\", \"primitiveSetPGrp\", (void*)primitiveSetPGrp},\r\t{\"UnixOSProcessPlugin\", \"primitiveCreatePipeWithSessionIdentifier\", (void*)primitiveCreatePipeWithSessionIdentifier},\r\t{\"UnixOSProcessPlugin\", \"primitiveIsAtEndOfFile\", (void*)primitiveIsAtEndOfFile},\r\t{\"UnixOSProcessPlugin\", \"getModuleName\", (void*)getModuleName},\r\t{\"UnixOSProcessPlugin\", \"primitiveAioDisable\", (void*)primitiveAioDisable},\r\t{\"UnixOSProcessPlugin\", \"primitiveSQFileFlushWithSessionIdentifier\", (void*)primitiveSQFileFlushWithSessionIdentifier},\r\t{NULL, NULL, NULL}\r};\r\r\r#endif /* ifdef SQ_BUILTIN_PLUGIN */\r\r"
  },
  {
    "path": "vm/src/from_squeak/unix/src/plugins/XDisplayControlPlugin/XDisplayControlPlugin.c",
    "content": "/* Automatically generated from Squeak on 23 January 2011 3:56:05 pm \r   by VMMaker 4.4.7\r */\r\r#include <math.h>\r#include <stdio.h>\r#include <stdlib.h>\r#include <string.h>\r#include <time.h>\r\r/* Default EXPORT macro that does nothing (see comment in sq.h): */\r#define EXPORT(returnType) returnType\r\r/* Do not include the entire sq.h file but just those parts needed. */\r/*  The virtual machine proxy definition */\r#include \"sqVirtualMachine.h\"\r/* Configuration options */\r#include \"sqConfig.h\"\r/* Platform specific definitions */\r#include \"sqPlatformSpecific.h\"\r\r#define true 1\r#define false 0\r#define null 0  /* using 'null' because nil is predefined in Think C */\r#ifdef SQUEAK_BUILTIN_PLUGIN\r#undef EXPORT\r// was #undef EXPORT(returnType) but screws NorCroft cc\r#define EXPORT(returnType) static returnType\r#endif\r#include <X11/Xlib.h>\r\r#include \"sqMemoryAccess.h\"\r\r\r/*** Constants ***/\r\r/*** Function Prototypes ***/\rstatic VirtualMachine * getInterpreter(void);\r#pragma export on\rEXPORT(const char*) getModuleName(void);\r#pragma export off\rstatic sqInt halt(void);\r#pragma export on\rEXPORT(sqInt) initialiseModule(void);\rEXPORT(sqInt) moduleUnloaded(char *aModuleName);\r#pragma export off\rstatic sqInt msg(char *s);\r#pragma export on\rEXPORT(sqInt) primitiveCanConnectToDisplay(void);\rEXPORT(sqInt) primitiveDisconnectDisplay(void);\rEXPORT(sqInt) primitiveFlushDisplay(void);\rEXPORT(sqInt) primitiveGetDisplayName(void);\rEXPORT(sqInt) primitiveIsConnectedToDisplay(void);\rEXPORT(sqInt) primitiveKillDisplay(void);\rEXPORT(sqInt) primitiveModuleName(void);\rEXPORT(sqInt) primitiveOpenDisplay(void);\rEXPORT(sqInt) primitiveSetDisplayName(void);\rEXPORT(sqInt) primitiveVersionString(void);\r#pragma export off\rstatic sqInt sandboxSecurity(void);\rstatic sqInt securityHeurisitic(void);\r#pragma export on\rEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);\rEXPORT(sqInt) shutdownModule(void);\r#pragma export off\rstatic sqInt stringFromCString(const char *aCString);\rstatic char * transientCStringFromString(sqInt aString);\rstatic char * versionString(void);\r/*** Variables ***/\r\r#ifdef SQUEAK_BUILTIN_PLUGIN\rextern\r#endif\rstruct VirtualMachine* interpreterProxy;\rstatic const char *moduleName =\r#ifdef SQUEAK_BUILTIN_PLUGIN\r\t\"XDisplayControlPlugin 23 January 2011 (i)\"\r#else\r\t\"XDisplayControlPlugin 23 January 2011 (e)\"\r#endif\r;\rstatic int osprocessSandboxSecurity;\r\r\r\r/*\tNote: This is coded so that plugins can be run from Squeak. */\r\rstatic VirtualMachine * getInterpreter(void) {\r\treturn interpreterProxy;\r}\r\r\r/*\tNote: This is hardcoded so it can be run from Squeak.\r\tThe module name is used for validating a module *after*\r\tit is loaded to check if it does really contain the module\r\twe're thinking it contains. This is important! */\r\rEXPORT(const char*) getModuleName(void) {\r\treturn moduleName;\r}\r\rstatic sqInt halt(void) {\r\t;\r}\r\rEXPORT(sqInt) initialiseModule(void) {\r\tosprocessSandboxSecurity = -1;\r\treturn 1;\r}\r\r\r/*\tThe module with the given name was just unloaded.\r\tMake sure we have no dangling references. */\r\rEXPORT(sqInt) moduleUnloaded(char *aModuleName) {\r}\r\rstatic sqInt msg(char *s) {\r\tfprintf(stderr, \"\\n%s: %s\", moduleName, s);\r}\r\r\r/*\tOpen and close a connection to displayName. It the connection was successfully\r\topened, answer true; otherwise false. This is intended to check for the ability\r\tto open an X display prior to actually making the attempt. */\r\rEXPORT(sqInt) primitiveCanConnectToDisplay(void) {\r    Display *d;\r    sqInt name;\r    char * namePtr;\r\r\tif ((sandboxSecurity()) == 1) {\r\t\tinterpreterProxy->pop(2);\r\t\tinterpreterProxy->push(interpreterProxy->falseObject());\r\t} else {\r\t\tname = interpreterProxy->stackObjectValue(0);\r\t\tnamePtr = transientCStringFromString(name);\r\t\td = XOpenDisplay(namePtr);\r\t\tif (d == 0) {\r\t\t\tinterpreterProxy->pop(2);\r\t\t\tinterpreterProxy->push(interpreterProxy->falseObject());\r\t\t} else {\r\t\t\tXCloseDisplay(d);\r\t\t\tinterpreterProxy->pop(2);\r\t\t\tinterpreterProxy->push(interpreterProxy->trueObject());\r\t\t}\r\t}\r}\r\r\r/*\tCall an internal function which will disconnect the X display session. The actual\r\tSqueak window on the X server is not effected, but this instance of Squeak will\r\tnot have any further interaction with it. */\r\rEXPORT(sqInt) primitiveDisconnectDisplay(void) {\r\tif (!((sandboxSecurity()) == 1)) {\r\t\tforgetXDisplay();\r\t}\r}\r\r\r/*\tCall an internal function to synchronize output to the X display. */\r\rEXPORT(sqInt) primitiveFlushDisplay(void) {\r\tsynchronizeXDisplay();\r}\r\r\r/*\tAnswer a string containing the name for the X display, or nil if the display was opened\r\tusing the $DISPLAY environment variable. This answers the name of the X display as of\r\tthe time it was last opened, which may be different from the current setting of $DISPLAY. */\r\rEXPORT(sqInt) primitiveGetDisplayName(void) {\r    extern char *displayName;\r\r\tif (displayName == 0) {\r\t\tinterpreterProxy->pop(1);\r\t\tinterpreterProxy->push(interpreterProxy->nilObject());\r\t} else {\r\t\tinterpreterProxy->pop(1);\r\t\tinterpreterProxy->push(stringFromCString(displayName));\r\t}\r}\r\r\r/*\tAnswer true if VM is currently connected to an X server. */\r\rEXPORT(sqInt) primitiveIsConnectedToDisplay(void) {\r    extern int isConnectedToXServer;\r\r\tif (isConnectedToXServer != 0) {\r\t\tinterpreterProxy->pop(1);\r\t\tinterpreterProxy->push(interpreterProxy->trueObject());\r\t} else {\r\t\tinterpreterProxy->pop(1);\r\t\tinterpreterProxy->push(interpreterProxy->falseObject());\r\t}\r}\r\r\r/*\tCall an internal function to disconnect the X display session and destroy\r\tthe Squeak window on the X display. */\r\rEXPORT(sqInt) primitiveKillDisplay(void) {\r\tif (!((sandboxSecurity()) == 1)) {\r\t\tdisconnectXDisplay();\r\t}\r}\r\r\r/*\tAnswer a string containing the module name string for this plugin. */\r\rEXPORT(sqInt) primitiveModuleName(void) {\r\tinterpreterProxy->popthenPush(1, stringFromCString(moduleName));\r}\r\r\r/*\tCall an internal function which will open the X display session. */\r\rEXPORT(sqInt) primitiveOpenDisplay(void) {\r\tif (!((sandboxSecurity()) == 1)) {\r\t\topenXDisplay();\r\t}\r}\r\r\r/*\tSet the name for the X display for use in the next call to primitiveOpenXDisplay. Expects\r\tone parameter which must be either a String or nil. */\r\rEXPORT(sqInt) primitiveSetDisplayName(void) {\r    extern char *displayName;\r    sqInt name;\r    static char nameBuffer[501];\r    char * namePtr;\r\r\tif ((sandboxSecurity()) == 1) {\r\t\tinterpreterProxy->pop(2);\r\t\tinterpreterProxy->pushInteger(-1);\r\t} else {\r\t\tname = interpreterProxy->stackObjectValue(0);\r\t\tif (name == (interpreterProxy->nilObject())) {\r\t\t\tdisplayName = 0;\r\t\t} else {\r\t\t\tnamePtr = transientCStringFromString(name);\r\t\t\tstrncpy(nameBuffer, namePtr, 500);\r\t\t\tnameBuffer[500] = 0;\r\t\t\tdisplayName = nameBuffer;\r\t\t}\r\t\tinterpreterProxy->pop(1);\r\t}\r}\r\r\r/*\tAnswer a string containing the version string for this plugin. */\r\rEXPORT(sqInt) primitiveVersionString(void) {\r\tinterpreterProxy->pop(1);\r\tinterpreterProxy->push(stringFromCString(versionString()));\r}\r\r\r/*\tAnswer 1 if running in secure mode, else 0. The osprocessSandboxSecurity\r\tvariable is initialized to -1. On the first call to this method, set its value to\r\teither 0 (user has full access to the plugin) or 1 (user is not permitted to do\r\tdangerous things). */\r\rstatic sqInt sandboxSecurity(void) {\r\tif (osprocessSandboxSecurity < 0) {\r\t\tosprocessSandboxSecurity = securityHeurisitic();\r\t}\r\treturn osprocessSandboxSecurity;\r}\r\r\r/*\tAnswer 0 to permit full access to OSProcess functions, or 1 if access should be\r\trestricted for dangerous functions. The rules are:\r\t\t- If the security plugin is not present, grant full access\r\t\t- If the security plugin can be loaded, restrict access unless user has all\r\t\t  of secCanWriteImage, secHasFileAccess and secHasSocketAccess */\r/*\tFIXME: This function has not been tested. -dtl */\r/*\tIf the security plugin can be loaded, use it to check. If not, assume it's ok */\r\rstatic sqInt securityHeurisitic(void) {\r    sqInt canWriteImage;\r    sqInt hasFileAccess;\r    sqInt hasSocketAccess;\r    void (*sCWIfn)(void);\r    void (*sHFAfn)(void);\r    void (*sHSAfn)(void);\r\r\tsCWIfn = interpreterProxy->ioLoadFunctionFrom(\"secCanWriteImage\", \"SecurityPlugin\");\r\tif (sCWIfn == 0) {\r\t\treturn 0;\r\t}\r\tcanWriteImage =  ((int (*) (void)) sCWIfn)();\r\tsHFAfn = interpreterProxy->ioLoadFunctionFrom(\"secHasFileAccess\", \"SecurityPlugin\");\r\tif (sHFAfn == 0) {\r\t\treturn 0;\r\t}\r\thasFileAccess =  ((int (*) (void)) sHFAfn)();\r\tsHSAfn = interpreterProxy->ioLoadFunctionFrom(\"secHasSocketAccess\", \"SecurityPlugin\");\r\tif (sHSAfn == 0) {\r\t\treturn 0;\r\t}\r\thasSocketAccess =  ((int (*) (void)) sHSAfn)();\r\tif ((canWriteImage && (hasFileAccess)) && (hasSocketAccess)) {\r\t\treturn 0;\r\t} else {\r\t\treturn 1;\r\t}\r}\r\r\r/*\tNote: This is coded so that is can be run from Squeak. */\r\rEXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter) {\r    sqInt ok;\r\r\tinterpreterProxy = anInterpreter;\r\tok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR;\r\tif (ok == 0) {\r\t\treturn 0;\r\t}\r\tok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR;\r\treturn ok;\r}\r\rEXPORT(sqInt) shutdownModule(void) {\r}\r\r\r/*\tAnswer a new String copied from a null-terminated C string.\r\tCaution: This may invoke the garbage collector. */\r\rstatic sqInt stringFromCString(const char *aCString) {\r    sqInt len;\r    sqInt newString;\r\r\tlen = strlen(aCString);\r\tnewString = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), len);\r\tstrncpy(interpreterProxy->arrayValueOf(newString), aCString, len);\r\treturn newString;\r}\r\r\r/*\tAnswer a new null-terminated C string copied from aString.\r\tThe string is allocated in object memory, and will be moved\r\twithout warning by the garbage collector. Any C pointer\r\treference the the result is valid only until the garbage\r\tcollector next runs. Therefore, this method should only be used\r\twithin a single primitive in a section of code in which the\r\tgarbage collector is guaranteed not to run. Note also that\r\tthis method may itself invoke the garbage collector prior\r\tto allocating the new C string.\r\r\tWarning: The result of this method will be invalidated by the\r\tnext garbage collection, including a GC triggered by creation\r\tof a new object within a primitive. Do not call this method\r\ttwice to obtain two string pointers. */\r\rstatic char * transientCStringFromString(sqInt aString) {\r    char *cString;\r    sqInt len;\r    sqInt newString;\r    char *stringPtr;\r\r\r\t/* Allocate space for a null terminated C string. */\r\r\tlen = interpreterProxy->sizeOfSTArrayFromCPrimitive(interpreterProxy->arrayValueOf(aString));\r\tinterpreterProxy->pushRemappableOop(aString);\r\tnewString = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), len + 1);\r\tstringPtr = interpreterProxy->arrayValueOf(interpreterProxy->popRemappableOop());\r\r\t/* Point to the actual C string. */\r\r\tcString = interpreterProxy->arrayValueOf(newString);\r\t(char *)strncpy(cString, stringPtr, len);\r\tcString[len] = 0;\r\treturn cString;\r}\r\r\r/*\tAnswer a string containing the version string for this plugin. Handle MNU\r\terrors, which can occur if class InterpreterPlugin has been removed from\r\tthe system.\r\r\tImportant: When this method is changed, the class side method must also be\r\tchanged to match. */\r/*\t2.0 supports 64bit code base */\r\rstatic char * versionString(void) {\r    static char version[]= \"2.1.4\";\r\r\treturn version;\r}\r\r\r#ifdef SQUEAK_BUILTIN_PLUGIN\r\r\rvoid* XDisplayControlPlugin_exports[][3] = {\r\t{\"XDisplayControlPlugin\", \"initialiseModule\", (void*)initialiseModule},\r\t{\"XDisplayControlPlugin\", \"getModuleName\", (void*)getModuleName},\r\t{\"XDisplayControlPlugin\", \"primitiveFlushDisplay\", (void*)primitiveFlushDisplay},\r\t{\"XDisplayControlPlugin\", \"primitiveIsConnectedToDisplay\", (void*)primitiveIsConnectedToDisplay},\r\t{\"XDisplayControlPlugin\", \"primitiveKillDisplay\", (void*)primitiveKillDisplay},\r\t{\"XDisplayControlPlugin\", \"primitiveDisconnectDisplay\", (void*)primitiveDisconnectDisplay},\r\t{\"XDisplayControlPlugin\", \"primitiveVersionString\", (void*)primitiveVersionString},\r\t{\"XDisplayControlPlugin\", \"moduleUnloaded\", (void*)moduleUnloaded},\r\t{\"XDisplayControlPlugin\", \"primitiveModuleName\", (void*)primitiveModuleName},\r\t{\"XDisplayControlPlugin\", \"setInterpreter\", (void*)setInterpreter},\r\t{\"XDisplayControlPlugin\", \"shutdownModule\", (void*)shutdownModule},\r\t{\"XDisplayControlPlugin\", \"primitiveOpenDisplay\", (void*)primitiveOpenDisplay},\r\t{\"XDisplayControlPlugin\", \"primitiveCanConnectToDisplay\", (void*)primitiveCanConnectToDisplay},\r\t{\"XDisplayControlPlugin\", \"primitiveGetDisplayName\", (void*)primitiveGetDisplayName},\r\t{\"XDisplayControlPlugin\", \"primitiveSetDisplayName\", (void*)primitiveSetDisplayName},\r\t{NULL, NULL, NULL}\r};\r\r\r#endif /* ifdef SQ_BUILTIN_PLUGIN */\r\r"
  },
  {
    "path": "vm/src/from_squeak/unix/src/plugins.ext",
    "content": "# Automatically generated makefile include for external plugins\rEXTERNAL_PLUGINS = B3DAcceleratorPlugin Squeak3D ClipboardExtendedPlugin DBusPlugin SqueakFFIPrims FileCopyPlugin GStreamerPlugin HostWindowPlugin KedamaPlugin KedamaPlugin2 MIDIPlugin Mpeg3Plugin RomePlugin UUIDPlugin AioPlugin UnixOSProcessPlugin XDisplayControlPlugin\r"
  },
  {
    "path": "vm/src/from_squeak/unix/src/plugins.int",
    "content": "# Automatically generated makefile include for internal plugins\rINTERNAL_PLUGINS = ADPCMCodecPlugin AsynchFilePlugin BMPReadWriterPlugin B2DPlugin BitBltPlugin CroquetPlugin DSAPrims ZipPlugin DropPlugin FFTPlugin FT2Plugin FilePlugin FloatArrayPlugin FloatMathPlugin GeniePlugin JPEGReadWriter2Plugin JPEGReaderPlugin JoystickTabletPlugin Klatt LargeIntegers LocalePlugin Matrix2x3Plugin MiscPrimitivePlugin RePlugin SecurityPlugin SerialPlugin SlangTestSupportPlugin SocketPlugin SoundCodecPrims SoundGenerationPlugin SoundPlugin StarSqueakPlugin SurfacePlugin\r"
  },
  {
    "path": "vm/src/from_squeak/unix/src/vm/interp.c",
    "content": "/* Automatically generated from Squeak on 23 January 2011 3:55:17 pm \r   by VMMaker 4.4.7\r */\r#define SQ_USE_GLOBAL_STRUCT 1\r\r#include \"sq.h\"\r#include <setjmp.h>\r\r#ifndef allocateMemoryMinimumImageFileHeaderSize\r /* Called by Interpreter>>allocateMemory:minimum:imageFile:headerSize: */\r /* Default definition if not previously defined in config.h */\r #define allocateMemoryMinimumImageFileHeaderSize(heapSize, minimumMemory, fileStream, headerSize) \\\r    sqAllocateMemory(minimumMemory, heapSize)\r#endif\r\r#ifndef sqImageFileReadEntireImage\r /* Called by Interpreter>>sqImage:read:size:length: */\r /* Default definition if not previously defined in config.h */\r #define sqImageFileReadEntireImage(memoryAddress, elementSize,  length, fileStream) \\\r    sqImageFileRead(memoryAddress, elementSize,  length, fileStream)\r#endif\r\r#ifndef error\r /* error() function called from Interpreter */\r /* Default definition if not previously defined in config.h */\r #define error(str) defaultErrorProc(str)\r#endif\r\r#ifndef ioMicroSecondClock\r /* Called by Interpreter>>primitiveMicrosecondClock and GC methods */\r /* Default definition if not previously defined in config.h */\r #define ioMicroSecondClock ioMSecs\r#endif\r\r#ifndef ioUtcWithOffset\r /* Called by Interpreter>>primitiveUtcWithOffset */\r /* Default definition if not previously defined in config.h */\r #define ioUtcWithOffset(clock, offset) setMicroSecondsandOffset(clock, offset)\r#endif\r\r#include \"sqMemoryAccess.h\"\r\rsqInt printCallStack(void);\rvoid defaultErrorProc(char *s) {\r\t/* Print an error message and exit. */\r\tstatic sqInt printingStack = false;\r\r\tprintf(\"\\n%s\\n\\n\", s);\r\tif (!printingStack) {\r\t\t/* flag prevents recursive error when trying to print a broken stack */\r\t\tprintingStack = true;\r\t\tprintCallStack();\r\t}\r\texit(-1);\r}\r\r/*** Constants ***/\r#define ActiveProcessIndex 1\r#define AtCacheFixedFields 4\r#define AtCacheFmt 3\r#define AtCacheMask 28\r#define AtCacheOop 1\r#define AtCacheSize 2\r#define AtCacheTotalSize 64\r#define AtPutBase 32\r#define BlockArgumentCountIndex 3\r#define Byte0Mask 255\r#define Byte1Mask 65280\r#define Byte1Shift 8\r#define Byte1ShiftNegated -8\r#define Byte2Mask 16711680\r#define Byte3Mask 4278190080U\r#define Byte3Shift 24\r#define Byte3ShiftNegated -24\r#define Byte4Mask 1095216660480U\r#define Byte4Shift 32\r#define Byte4ShiftNegated -32\r#define Byte5Mask 280375465082880U\r#define Byte5Shift 40\r#define Byte5ShiftNegated -40\r#define Byte6Mask 71776119061217280U\r#define Byte7Mask 18374686479671623680U\r#define Byte7Shift 56\r#define Byte7ShiftNegated -56\r#define Bytes3to0Mask 4294967295U\r#define Bytes7to4Mask 18446744069414584320U\r#define CacheProbeMax 3\r#define CallerIndex 0\r#define CharacterTable 24\r#define CharacterValueIndex 0\r#define ClassAlien 52\r#define ClassArray 7\r#define ClassBitmap 4\r#define ClassBlockClosure 36\r#define ClassBlockContext 11\r#define ClassByteArray 26\r#define ClassCharacter 19\r#define ClassExternalAddress 43\r#define ClassExternalData 45\r#define ClassExternalFunction 46\r#define ClassExternalLibrary 47\r#define ClassExternalStructure 44\r#define ClassFloat 9\r#define ClassInteger 5\r#define ClassLargeNegativeInteger 42\r#define ClassLargePositiveInteger 13\r#define ClassMessage 15\r#define ClassMethodContext 10\r#define ClassPoint 12\r#define ClassSemaphore 18\r#define ClassString 6\r#define ClassUnsafeAlien 54\r#define ClassWeakFinalizer 55\r#define ClosureFirstCopiedValueIndex 3\r#define ClosureIndex 4\r#define ClosureNumArgsIndex 2\r#define ClosureOuterContextIndex 0\r#define ClosureStartPCIndex 1\r#define CompactClassMask 126976\r#define CompactClasses 28\r#define ConstMinusOne -1\r#define ConstOne 3\r#define ConstTwo 5\r#define ConstZero 1\r#define ContextFixedSizePlusHeader 7\r#define CrossedX 258\r#define CtxtTempFrameStart 6\r#define DoAssertionChecks 0\r#define DoBalanceChecks 0\r#define Done 4\r#define EndOfRun 257\r#define ExcessSignalsIndex 2\r#define ExternalObjectsArray 38\r#define ExtraRootSize 2048\r#define FalseObject 1\r#define FirstLinkIndex 0\r#define GCTopMarker 3\r#define HashBits 536739840\r#define HashBitsOffset 17\r#define HeaderIndex 0\r#define HeaderTypeClass 1\r#define HeaderTypeFree 2\r#define HeaderTypeGC 2\r#define HeaderTypeShort 3\r#define HeaderTypeSizeAndClass 0\r#define HomeIndex 5\r#define InitialIPIndex 4\r#define InstanceSpecificationIndex 2\r#define InstructionPointerIndex 1\r#define InterpreterSourceVersion \"4.4.7\"\r#define InvokeCallbackSelector 53\r#define LargeContextBit 262144\r#define LastLinkIndex 1\r#define LiteralStart 1\r#define MaxExternalPrimitiveTableSize 4096\r#define MaxJumpBuf 32\r#define MaxPrimitiveIndex 575\r#define MessageArgumentsIndex 1\r#define MessageDictionaryIndex 1\r#define MessageLookupClassIndex 2\r#define MessageSelectorIndex 0\r#define MethodArrayIndex 1\r#define MethodCacheClass 2\r#define MethodCacheEntries 512\r#define MethodCacheEntrySize 8\r#define MethodCacheMask 4088\r#define MethodCacheMethod 3\r#define MethodCacheNative 5\r#define MethodCachePrim 4\r#define MethodCachePrimFunction 6\r#define MethodCacheSelector 1\r#define MethodCacheSize 4096\r#define MethodIndex 3\r#define MillisecondClockMask 536870911\r#define MyListIndex 3\r#define NextLinkIndex 0\r#define NilContext 1\r#define NilObject 0\r#define PrimitiveExternalCallIndex 117\r#define PriorityIndex 2\r#define ProcessListsIndex 0\r#define ProcessSignalingLowSpace 22\r#define ReceiverIndex 5\r#define RootTableRedZone 2400\r#define RootTableSize 2500\r#define SchedulerAssociation 3\r#define SelectorAboutToReturn 48\r#define SelectorCannotInterpret 34\r#define SelectorCannotReturn 21\r#define SelectorDoesNotUnderstand 20\r#define SelectorMustBeBoolean 25\r#define SelectorRunWithIn 49\r#define SelectorStart 2\r#define SemaphoresToSignalSize 500\r#define SenderIndex 0\r#define SpecialSelectors 23\r#define StackPointerIndex 2\r#define StartField 1\r#define StartObj 2\r#define SuperclassIndex 0\r#define SuspendedContextIndex 1\r#define TempFrameStart 6\r#define TheDisplay 14\r#define TheFinalizationSemaphore 41\r#define TheInterruptSemaphore 30\r#define TheLowSpaceSemaphore 17\r#define TheTimerSemaphore 29\r#define TrueObject 2\r#define TypeMask 3\r#define Upward 3\r#define ValueIndex 1\r#define XIndex 0\r#define YIndex 1\r\r/*** Function Prototypes ***/\rsqInt accessibleObjectAfter(sqInt oop);\rsqInt activateNewClosureMethod(sqInt blockClosure);\rsqInt activateNewMethod(void);\r#pragma export on\rEXPORT(sqInt) addGCRoot(sqInt *varLoc);\r#pragma export off\rsqInt addNewMethodToCache(void);\rsqInt addToExternalPrimitiveTable(void *functionAddress);\rsqInt adjustAllOopsBy(sqInt bytesToShift);\rsqInt allYoungand(sqInt array1, sqInt array2);\rsqInt allocateChunk(sqInt byteSize);\rsqInt allocateOrRecycleContext(sqInt needsLarge);\rsqInt argumentCountOf(sqInt methodPointer);\rvoid * arrayValueOf(sqInt arrayOop);\rsqInt asciiOfCharacter(sqInt characterObj);\rsqInt balancedStackafterPrimitivewithArgs(sqInt delta, sqInt primIdx, sqInt nArgs);\rsqInt baseHeaderSize(void);\rsqInt beRootIfOld(sqInt oop);\rsqInt beRootWhileForwarding(sqInt oop);\rsqInt becomewith(sqInt array1, sqInt array2);\rsqInt becomewithtwoWaycopyHash(sqInt array1, sqInt array2, sqInt twoWayFlag, sqInt copyHashFlag);\rsqInt biasToGrow(void);\rsqInt booleanValueOf(sqInt obj);\rsqInt byteSizeOf(sqInt oop);\rsqInt byteSwapByteObjectsFromto(sqInt startOop, sqInt stopAddr);\rsqInt byteSwapped(sqInt w);\rsqInt bytesPerWord(void);\rsqInt callExternalPrimitive(void *functionID);\r#pragma export on\rEXPORT(sqInt) callInterpreter(void);\rEXPORT(sqInt) callbackEnter(sqInt *callbackID);\rEXPORT(sqInt) callbackLeave(sqInt cbID);\r#pragma export off\rsqInt changeClassOfto(sqInt rcvr, sqInt argClass);\rsqInt characterForAscii(sqInt ascii);\rsqInt characterTable(void);\rsqInt checkForInterrupts(void);\rsqInt checkImageVersionFromstartingAt(sqImageFile  f, squeakFileOffsetType  imageOffset);\rsqInt checkedIntegerValueOf(sqInt intOop);\rsqInt checkedLongAt(sqInt byteAddress);\rsqInt classAlien(void);\rsqInt classArray(void);\rsqInt classBitmap(void);\rsqInt classByteArray(void);\rsqInt classCharacter(void);\rsqInt classExternalAddress(void);\rsqInt classExternalData(void);\rsqInt classExternalFunction(void);\rsqInt classExternalLibrary(void);\rsqInt classExternalStructure(void);\rsqInt classFloat(void);\rsqInt classLargeNegativeInteger(void);\rsqInt classLargePositiveInteger(void);\rsqInt classNameOfIs(sqInt aClass, char *className);\rsqInt classPoint(void);\rsqInt classSemaphore(void);\rsqInt classSmallInteger(void);\rsqInt classString(void);\rsqInt classUnsafeAlien(void);\rsqInt clone(sqInt oop);\rsqInt commonAt(sqInt stringy);\rsqInt commonAtPut(sqInt stringy);\rsqInt commonVariableatcacheIndex(sqInt rcvr, sqInt index, sqInt atIx);\rsqInt compare31or32Bitsequal(sqInt obj1, sqInt obj2);\rsqInt compilerCreateActualMessagestoringArgs(sqInt aMessage, sqInt argArray);\rsqInt compilerFlushCache(sqInt aCompiledMethod);\rsqInt compilerMapFromto(sqInt memStart, sqInt memEnd);\rsqInt compilerMark(void);\rsqInt compilerPostGC(void);\rsqInt compilerPostSnapshot(void);\rsqInt compilerPreGC(sqInt fullGCFlag);\rsqInt compilerPreSnapshot(void);\rsqInt compilerProcessChange(void);\rsqInt compilerProcessChangeto(sqInt oldProc, sqInt newProc);\rsqInt compilerTranslateMethod(void);\rsqInt containOnlyOopsand(sqInt array1, sqInt array2);\rsqInt contexthasSender(sqInt thisCntx, sqInt aContext);\rsqInt copyBits(void);\rsqInt copyBitsFromtoat(sqInt x0, sqInt x1, sqInt y);\rsqInt copyObjtoSegmentaddrstopAtsaveOopAtheaderAt(sqInt oop, sqInt segmentWordArray, sqInt lastSeg, sqInt stopAddr, sqInt oopPtr, sqInt hdrPtr);\rsqInt createActualMessageTo(sqInt aClass);\rsqInt dispatchFunctionPointer(void *aFunctionPointer);\rsqInt dispatchFunctionPointerOnin(sqInt primIdx, void *primTable[]);\rsqInt displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b);\rsqInt displayObject(void);\rsqInt doPrimitiveDivby(sqInt rcvr, sqInt arg);\rsqInt doPrimitiveModby(sqInt rcvr, sqInt arg);\rsqInt dummyReferToProxy(void);\r#pragma export on\rEXPORT(sqInt) dumpImage(char *fileName);\r#pragma export off\rsqInt executeNewMethodFromCache(void);\r#pragma export on\rEXPORT(sqInt) extraHeaderBytes(sqInt oopOrChunk);\r#pragma export off\rsqInt failed(void);\rsqInt falseObject(void);\rvoid * fetchArrayofObject(sqInt fieldIndex, sqInt objectPointer);\rsqInt fetchClassOf(sqInt oop);\rsqInt fetchClassOfNonInt(sqInt oop);\rdouble fetchFloatofObject(sqInt fieldIndex, sqInt objectPointer);\rsqInt fetchIntegerofObject(sqInt fieldIndex, sqInt objectPointer);\rsqInt fetchLong32ofObject(sqInt fieldIndex, sqInt oop);\rsqInt fetchPointerofObject(sqInt fieldIndex, sqInt oop);\rsqInt fetchStackPointerOf(sqInt aContext);\rsqInt fetchWordLengthOf(sqInt objectPointer);\rsqInt finalizeReference(usqInt oop);\rsqInt findClassOfMethodforReceiver(sqInt meth, sqInt rcvr);\rsqInt findNewMethodInClass(sqInt class);\rsqInt findSelectorOfMethodforReceiver(sqInt meth, sqInt rcvr);\rsqInt firstAccessibleObject(void);\rchar * firstFixedField(sqInt oop);\rchar * firstIndexableField(sqInt oop);\rsqInt floatObjectOf(double  aFloat);\rdouble floatValueOf(sqInt oop);\rsqInt flushExternalPrimitiveOf(sqInt methodPtr);\rsqInt flushExternalPrimitives(void);\rsqInt forceInterruptCheck(void);\rsqInt fullDisplayUpdate(void);\rsqInt fullGC(void);\rsqInt fwdTableInit(sqInt blkSize);\rsqInt fwdTableSize(sqInt blkSize);\rsqInt getCurrentBytecode(void);\rsqInt getFullScreenFlag(void);\rsqInt getInterruptCheckCounter(void);\rsqInt getInterruptKeycode(void);\rsqInt getInterruptPending(void);\rsqInt getLongFromFileswap(sqImageFile  aFile, sqInt swapFlag);\rsqInt getNextWakeupTick(void);\rsqInt getSavedWindowSize(void);\r#pragma export on\rEXPORT(sqInt) getStackPointer(void);\r#pragma export off\rsqInt getThisSessionID(void);\rsqInt growObjectMemory(usqInt delta);\rsqInt headerOf(sqInt methodPointer);\rsqInt imageSegmentVersion(void);\rsqInt incCompBody(void);\rsqInt incCompMakeFwd(void);\rsqInt incCompMove(sqInt bytesFreed);\rsqInt includesBehaviorThatOf(sqInt aClass, sqInt aSuperclass);\rsqInt incrementalGC(void);\rsqInt initCompilerHooks(void);\rsqInt initializeImageFormatVersionIfNeeded(void);\rsqInt initializeInterpreter(sqInt bytesToShift);\rsqInt initializeMemoryFirstFree(usqInt firstFree);\rsqInt initializeObjectMemory(sqInt bytesToShift);\rsqInt installinAtCacheatstring(sqInt rcvr, sqInt *cache, sqInt atIx, sqInt stringy);\rsqInt instantiateClassindexableSize(sqInt classPointer, sqInt size);\rsqInt instantiateContextsizeInBytes(sqInt classPointer, sqInt sizeInBytes);\rsqInt instantiateSmallClasssizeInBytes(sqInt classPointer, sqInt sizeInBytes);\rsqInt integerObjectOf(sqInt value);\rsqInt integerValueOf(sqInt objectPointer);\r#pragma export on\rEXPORT(sqInt) internalIsImmutable(sqInt oop);\rEXPORT(sqInt) internalIsMutable(sqInt oop);\r#pragma export off\rsqInt interpret(void);\rsqInt ioFilenamefromStringofLengthresolveAliases(char *aCharBuffer, char *aFilenameString, sqInt filenameLength, sqInt aBoolean);\rsqInt isKindOf(sqInt oop, char *className);\rsqInt isMemberOf(sqInt oop, char *className);\rsqInt isArray(sqInt oop);\rsqInt isBigEnder(void);\rsqInt isBytes(sqInt oop);\rsqInt isExcessiveAllocationRequestshift(sqInt size, sqInt bits);\rsqInt isFloatObject(sqInt oop);\rsqInt isHandlerMarked(sqInt aContext);\rsqInt isInMemory(sqInt address);\rsqInt isIndexable(sqInt oop);\rsqInt isIntegerObject(sqInt objectPointer);\rsqInt isIntegerValue(sqInt intValue);\rsqInt isPointers(sqInt oop);\rsqInt isWeak(sqInt oop);\rsqInt isWords(sqInt oop);\rsqInt isWordsOrBytes(sqInt oop);\rsqInt isWordsOrBytesNonInt(sqInt oop);\rsqInt lastPointerOf(sqInt oop);\rsqInt lengthOf(sqInt oop);\rsqInt literalofMethod(sqInt offset, sqInt methodPointer);\rsqInt literalCountOf(sqInt methodPointer);\rsqInt literalCountOfHeader(sqInt headerPointer);\rsqInt loadBitBltFrom(sqInt bb);\rsqInt loadInitialContext(void);\rsqInt lookupInMethodCacheSelclass(sqInt selector, sqInt class);\rsqInt lookupMethodInClass(sqInt class);\rsqInt lookupMethodInDictionary(sqInt dictionary);\rsqInt lookupMethodNoMNUEtcInClass(sqInt class);\rsqInt lowestFreeAfter(sqInt chunk);\rsqInt makePointwithxValueyValue(sqInt xValue, sqInt yValue);\rsqInt mapPointersInObjectsFromto(sqInt memStart, sqInt memEnd);\rsqInt markAndTrace(sqInt oop);\rsqInt markAndTraceInterpreterOops(void);\rsqInt markPhase(void);\rsqInt methodArgumentCount(void);\rsqInt methodPrimitiveIndex(void);\r#pragma export on\rEXPORT(sqInt) moduleUnloaded(char *aModuleName);\r#pragma export off\rsqInt nilObject(void);\rsqInt nonWeakFieldsOf(sqInt oop);\rsqInt normalizeFloatOrderingInImage(void);\rsqInt noteAsRootheaderLoc(sqInt oop, sqInt headerLoc);\rsqInt nullCompilerHook(void);\rsqInt objectAfter(sqInt oop);\rsqInt obsoleteDontUseThisFetchWordofObject(sqInt fieldIndex, sqInt oop);\rsqInt okayFields(sqInt oop);\rsqInt okayOop(sqInt signedOop);\rsqInt oopisGreaterThan(sqInt anOop, sqInt otherOop);\rsqInt oopisGreaterThanOrEqualTo(sqInt anOop, sqInt otherOop);\rsqInt oopisLessThan(sqInt anOop, sqInt otherOop);\rsqInt oopHasAcceptableClass(sqInt signedOop);\rsqInt oopHasOkayClass(sqInt signedOop);\rsqInt pop(sqInt nItems);\rsqInt popthenPush(sqInt nItems, sqInt oop);\rdouble popFloat(void);\rsqInt popRemappableOop(void);\rsqInt popStack(void);\rsqInt positive32BitIntegerFor(sqInt integerValue);\rsqInt positive32BitValueOf(sqInt oop);\rsqInt positive64BitIntegerFor(sqLong integerValue);\rsqLong positive64BitValueOf(sqInt oop);\rsqInt possibleRootStoreIntovalue(sqInt oop, sqInt valueObj);\rsqInt postGCAction(void);\rsqInt prepareForwardingTableForBecomingwithtwoWay(sqInt array1, sqInt array2, sqInt twoWayFlag);\rsqInt primitiveAdd(void);\r#pragma export on\rEXPORT(sqInt) primitiveAddLargeIntegers(void);\r#pragma export off\rsqInt primitiveAdoptInstance(void);\rsqInt primitiveArctan(void);\rsqInt primitiveArrayBecome(void);\rsqInt primitiveArrayBecomeOneWay(void);\rsqInt primitiveArrayBecomeOneWayCopyHash(void);\rsqInt primitiveAsFloat(void);\rsqInt primitiveAsOop(void);\rsqInt primitiveAt(void);\rsqInt primitiveAtPut(void);\rsqInt primitiveBeCursor(void);\rsqInt primitiveBeDisplay(void);\rsqInt primitiveBeep(void);\rsqInt primitiveBitAnd(void);\r#pragma export on\rEXPORT(sqInt) primitiveBitAndLargeIntegers(void);\r#pragma export off\rsqInt primitiveBitOr(void);\r#pragma export on\rEXPORT(sqInt) primitiveBitOrLargeIntegers(void);\r#pragma export off\rsqInt primitiveBitShift(void);\r#pragma export on\rEXPORT(sqInt) primitiveBitShiftLargeIntegers(void);\r#pragma export off\rsqInt primitiveBitXor(void);\r#pragma export on\rEXPORT(sqInt) primitiveBitXorLargeIntegers(void);\r#pragma export off\rsqInt primitiveBlockCopy(void);\rsqInt primitiveBytesLeft(void);\rsqInt primitiveCalloutToFFI(void);\rsqInt primitiveChangeClass(void);\r#pragma export on\rEXPORT(sqInt) primitiveChangeClassWithClass(void);\r#pragma export off\rsqInt primitiveClass(void);\rsqInt primitiveClipboardText(void);\rsqInt primitiveClone(void);\rsqInt primitiveClosureCopyWithCopiedValues(void);\rsqInt primitiveClosureValue(void);\rsqInt primitiveClosureValueNoContextSwitch(void);\rsqInt primitiveClosureValueWithArgs(void);\rsqInt primitiveConstantFill(void);\rsqInt primitiveCopyObject(void);\rsqInt primitiveDeferDisplayUpdates(void);\r#pragma export on\rEXPORT(sqInt) primitiveDisablePowerManager(void);\r#pragma export off\rsqInt primitiveDiv(void);\r#pragma export on\rEXPORT(sqInt) primitiveDivLargeIntegers(void);\r#pragma export off\rsqInt primitiveDivide(void);\r#pragma export on\rEXPORT(sqInt) primitiveDivideLargeIntegers(void);\r#pragma export off\rsqInt primitiveDoPrimitiveWithArgs(void);\rsqInt primitiveEqual(void);\r#pragma export on\rEXPORT(sqInt) primitiveEqualLargeIntegers(void);\r#pragma export off\rsqInt primitiveEquivalent(void);\rsqInt primitiveExecuteMethod(void);\rsqInt primitiveExecuteMethodArgsArray(void);\rsqInt primitiveExitToDebugger(void);\rsqInt primitiveExp(void);\rsqInt primitiveExponent(void);\rsqInt primitiveExternalCall(void);\rsqInt primitiveFail(void);\rsqInt primitiveFailFor(sqInt reasonCode);\rsqInt primitiveFindHandlerContext(void);\rsqInt primitiveFindNextUnwindContext(void);\rsqInt primitiveFloatAdd(void);\rsqInt primitiveFloatAddtoArg(sqInt rcvrOop, sqInt argOop);\rsqInt primitiveFloatDivide(void);\rsqInt primitiveFloatDividebyArg(sqInt rcvrOop, sqInt argOop);\rsqInt primitiveFloatEqual(void);\rsqInt primitiveFloatEqualtoArg(sqInt rcvrOop, sqInt argOop);\rsqInt primitiveFloatGreaterthanArg(sqInt rcvrOop, sqInt argOop);\rsqInt primitiveFloatGreaterOrEqual(void);\rsqInt primitiveFloatGreaterOrEqualtoArg(sqInt rcvrOop, sqInt argOop);\rsqInt primitiveFloatGreaterThan(void);\rsqInt primitiveFloatLessthanArg(sqInt rcvrOop, sqInt argOop);\rsqInt primitiveFloatLessOrEqual(void);\rsqInt primitiveFloatLessOrEqualtoArg(sqInt rcvrOop, sqInt argOop);\rsqInt primitiveFloatLessThan(void);\rsqInt primitiveFloatMultiply(void);\rsqInt primitiveFloatMultiplybyArg(sqInt rcvrOop, sqInt argOop);\rsqInt primitiveFloatNotEqual(void);\rsqInt primitiveFloatSubtract(void);\rsqInt primitiveFloatSubtractfromArg(sqInt rcvrOop, sqInt argOop);\rsqInt primitiveFlushCache(void);\rsqInt primitiveFlushCacheByMethod(void);\rsqInt primitiveFlushCacheSelective(void);\rsqInt primitiveFlushExternalPrimitives(void);\rsqInt primitiveForceDisplayUpdate(void);\r#pragma export on\rEXPORT(sqInt) primitiveForceTenure(void);\r#pragma export off\rsqInt primitiveFormPrint(void);\rsqInt primitiveFractionalPart(void);\rsqInt primitiveFullGC(void);\rsqInt primitiveGetAttribute(void);\rsqInt primitiveGetNextEvent(void);\rsqInt primitiveGreaterOrEqual(void);\r#pragma export on\rEXPORT(sqInt) primitiveGreaterOrEqualLargeIntegers(void);\r#pragma export off\rsqInt primitiveGreaterThan(void);\r#pragma export on\rEXPORT(sqInt) primitiveGreaterThanLargeIntegers(void);\rEXPORT(sqInt) primitiveImageFormatVersion(void);\r#pragma export off\rsqInt primitiveImageName(void);\rsqInt primitiveIncrementalGC(void);\rsqInt primitiveIndexOf(sqInt methodPointer);\rsqInt primitiveInputSemaphore(void);\rsqInt primitiveInputWord(void);\rsqInt primitiveInstVarAt(void);\rsqInt primitiveInstVarAtPut(void);\rsqInt primitiveInstVarsPutFromStack(void);\rsqInt primitiveIntegerAt(void);\rsqInt primitiveIntegerAtPut(void);\r#pragma export on\rEXPORT(sqInt) primitiveInterpreterSourceVersion(void);\r#pragma export off\rsqInt primitiveInterruptSemaphore(void);\rsqInt primitiveInvokeObjectAsMethod(void);\r#pragma export on\rEXPORT(sqInt) primitiveIsRoot(void);\rEXPORT(sqInt) primitiveIsYoung(void);\r#pragma export off\rsqInt primitiveKbdNext(void);\rsqInt primitiveKbdPeek(void);\rsqInt primitiveLessOrEqual(void);\r#pragma export on\rEXPORT(sqInt) primitiveLessOrEqualLargeIntegers(void);\r#pragma export off\rsqInt primitiveLessThan(void);\r#pragma export on\rEXPORT(sqInt) primitiveLessThanLargeIntegers(void);\r#pragma export off\rsqInt primitiveListBuiltinModule(void);\rsqInt primitiveListExternalModule(void);\rsqInt primitiveLoadImageSegment(void);\rsqInt primitiveLoadInstVar(void);\rsqInt primitiveLogN(void);\rsqInt primitiveLowSpaceSemaphore(void);\rsqInt primitiveMakePoint(void);\rsqInt primitiveMarkHandlerMethod(void);\rsqInt primitiveMarkUnwindMethod(void);\rsqInt primitiveMethod(void);\r#pragma export on\rEXPORT(sqInt) primitiveMicrosecondClock(void);\r#pragma export off\rsqInt primitiveMillisecondClock(void);\rsqInt primitiveMod(void);\r#pragma export on\rEXPORT(sqInt) primitiveModLargeIntegers(void);\r#pragma export off\rsqInt primitiveMouseButtons(void);\rsqInt primitiveMousePoint(void);\rsqInt primitiveMultiply(void);\r#pragma export on\rEXPORT(sqInt) primitiveMultiplyLargeIntegers(void);\r#pragma export off\rsqInt primitiveNew(void);\rsqInt primitiveNewMethod(void);\rsqInt primitiveNewWithArg(void);\rsqInt primitiveNextInstance(void);\rsqInt primitiveNextObject(void);\rsqInt primitiveNoop(void);\rsqInt primitiveNotEqual(void);\r#pragma export on\rEXPORT(sqInt) primitiveNotEqualLargeIntegers(void);\r#pragma export off\rsqInt primitiveObjectAt(void);\rsqInt primitiveObjectAtPut(void);\rsqInt primitiveObjectPointsTo(void);\rsqInt primitivePerform(void);\rsqInt primitivePerformAt(sqInt lookupClass);\rsqInt primitivePerformInSuperclass(void);\rsqInt primitivePerformWithArgs(void);\r#pragma export on\rEXPORT(sqInt) primitivePlatformSourceVersion(void);\r#pragma export off\rsqInt primitivePushFalse(void);\rsqInt primitivePushMinusOne(void);\rsqInt primitivePushNil(void);\rsqInt primitivePushOne(void);\rsqInt primitivePushSelf(void);\rsqInt primitivePushTrue(void);\rsqInt primitivePushTwo(void);\rsqInt primitivePushZero(void);\rsqInt primitiveQuit(void);\rsqInt primitiveQuo(void);\r#pragma export on\rEXPORT(sqInt) primitiveQuoLargeIntegers(void);\r#pragma export off\rsqInt primitiveRelinquishProcessor(void);\rsqInt primitiveResponse(void);\rsqInt primitiveResume(void);\r#pragma export on\rEXPORT(sqInt) primitiveRootTable(void);\rEXPORT(sqInt) primitiveRootTableAt(void);\r#pragma export off\rsqInt primitiveScanCharacters(void);\r#pragma export on\rEXPORT(sqInt) primitiveScreenDepth(void);\r#pragma export off\rsqInt primitiveScreenSize(void);\rsqInt primitiveSecondsClock(void);\rsqInt primitiveSetDisplayMode(void);\rsqInt primitiveSetFullScreen(void);\r#pragma export on\rEXPORT(sqInt) primitiveSetGCBiasToGrow(void);\rEXPORT(sqInt) primitiveSetGCBiasToGrowGCLimit(void);\rEXPORT(sqInt) primitiveSetGCSemaphore(void);\r#pragma export off\rsqInt primitiveSetInterruptKey(void);\rsqInt primitiveShortAt(void);\rsqInt primitiveShortAtPut(void);\rsqInt primitiveShowDisplayRect(void);\rsqInt primitiveSignal(void);\rsqInt primitiveSignalAtBytesLeft(void);\rsqInt primitiveSignalAtMilliseconds(void);\rsqInt primitiveSine(void);\rsqInt primitiveSize(void);\rsqInt primitiveSnapshot(void);\rsqInt primitiveSnapshotEmbedded(void);\rsqInt primitiveSomeInstance(void);\rsqInt primitiveSomeObject(void);\rsqInt primitiveSpecialObjectsOop(void);\rsqInt primitiveSquareRoot(void);\rsqInt primitiveStoreImageSegment(void);\rsqInt primitiveStoreStackp(void);\rsqInt primitiveStringAt(void);\rsqInt primitiveStringAtPut(void);\rsqInt primitiveStringReplace(void);\rsqInt primitiveSubtract(void);\r#pragma export on\rEXPORT(sqInt) primitiveSubtractLargeIntegers(void);\r#pragma export off\rsqInt primitiveSuspend(void);\rsqInt primitiveTerminateTo(void);\rsqInt primitiveTestDisplayDepth(void);\rsqInt primitiveTimesTwoPower(void);\rsqInt primitiveTruncated(void);\rsqInt primitiveUnloadModule(void);\r#pragma export on\rEXPORT(sqInt) primitiveUtcWithOffset(void);\r#pragma export off\rsqInt primitiveVMParameter(void);\rsqInt primitiveVMPath(void);\r#pragma export on\rEXPORT(sqInt) primitiveVMVersion(void);\r#pragma export off\rsqInt primitiveValue(void);\rsqInt primitiveValueUninterruptably(void);\rsqInt primitiveValueWithArgs(void);\rsqInt primitiveWait(void);\rsqInt primitiveYield(void);\rsqInt print(char *s);\r#pragma export on\rEXPORT(sqInt) printAllStacks(void);\r#pragma export off\rsqInt printCallStack(void);\rsqInt printCallStackOf(sqInt aContext);\rsqInt printNameOfClasscount(sqInt classOop, sqInt cnt);\rsqInt printNum(sqInt n);\rsqInt printStringOf(sqInt oop);\rsqInt printUnbalancedStack(sqInt primIdx);\rsqInt push(sqInt object);\rsqInt pushBool(sqInt trueOrFalse);\rsqInt pushFloat(double  f);\rsqInt pushInteger(sqInt integerValue);\rsqInt pushRemappableOop(sqInt oop);\rsqInt putLongtoFile(sqInt aWord, sqImageFile  aFile);\r#pragma export on\rEXPORT(sqInt) readImageFormatFromFileStartingAt(sqImageFile  f, squeakFileOffsetType  imageOffset);\r#pragma export off\rsqInt readImageFromFileHeapSizeStartingAt(sqImageFile  f, usqInt desiredHeapSize, squeakFileOffsetType  imageOffset);\rsqInt readableFormat(sqInt imageVersion);\r#pragma export on\rEXPORT(sqInt) reestablishContextPriorToCallback(sqInt callbackContext);\r#pragma export off\rsqInt remap(sqInt oop);\rsqInt removeFirstLinkOfList(sqInt aList);\r#pragma export on\rEXPORT(sqInt) removeGCRoot(sqInt *varLoc);\r#pragma export off\rsqInt restoreHeaderOf(sqInt oop);\rsqInt restoreHeadersFromtofromandtofrom(sqInt firstIn, sqInt lastIn, sqInt hdrBaseIn, sqInt firstOut, sqInt lastOut, sqInt hdrBaseOut);\rsqInt resume(sqInt aProcess);\rsqInt reverseDisplayFromto(sqInt startIndex, sqInt endIndex);\rsqInt rewriteMethodCacheSelclassprimIndex(sqInt selector, sqInt class, sqInt localPrimIndex);\rsqInt rewriteMethodCacheSelclassprimIndexprimFunction(sqInt selector, sqInt class, sqInt localPrimIndex, void *localPrimAddress);\r#pragma export on\rEXPORT(sqInt) sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt regsPtr, sqInt jmpBufPtr);\r#pragma export off\rsqInt setCompilerInitialized(sqInt newFlag);\rsqInt setFullScreenFlag(sqInt value);\rsqInt setInterruptCheckCounter(sqInt value);\rsqInt setInterruptKeycode(sqInt value);\rsqInt setInterruptPending(sqInt value);\rsqInt setMicroSecondsandOffset(sqLong *microSeconds, int *utcOffset);\rsqInt setNextWakeupTick(sqInt value);\rsqInt setSavedWindowSize(sqInt value);\rsqInt showDisplayBitsLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b);\rsqInt signalSemaphoreWithIndex(sqInt index);\rsqInt signed32BitIntegerFor(int integerValue);\rint signed32BitValueOf(sqInt oop);\rsqInt signed64BitIntegerFor(sqLong integerValue);\rsqLong signed64BitValueOf(sqInt oop);\rsqInt sizeBitsOf(sqInt oop);\rsqInt sizeOfSTArrayFromCPrimitive(void *cPtr);\rsqInt slotSizeOf(sqInt oop);\rsqInt snapshot(sqInt embedded);\rsqInt splObj(sqInt index);\rsqInt stObjectat(sqInt array, sqInt index);\rsqInt stObjectatput(sqInt array, sqInt index, sqInt value);\rsqInt stSizeOf(sqInt oop);\rdouble stackFloatValue(sqInt offset);\rsqInt stackIntegerValue(sqInt offset);\rsqInt stackObjectValue(sqInt offset);\rsqInt stackValue(sqInt offset);\rsqInt storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integerValue);\rsqInt storePointerofObjectwithValue(sqInt fieldIndex, sqInt oop, sqInt valuePointer);\rsqInt success(sqInt successValue);\rsqInt sufficientSpaceAfterGC(usqInt minFree);\rsqInt sufficientSpaceToAllocate(usqInt bytes);\rsqInt superclassOf(sqInt classPointer);\rsqInt sweepPhase(void);\rsqInt synchronousSignal(sqInt aSemaphore);\rsqInt transferTo(sqInt aProc);\rsqInt trueObject(void);\rsqInt updatePointersInRangeFromto(sqInt memStart, sqInt memEnd);\rsqInt updatePointersInRootObjectsFromto(sqInt memStart, sqInt memEnd);\rsqInt validateRoots(void);\rsqInt verifyCleanHeaders(void);\rsqInt vmEndianness(void);\rsqInt wakeHighestPriority(void);\rsqInt wordSwapped(sqInt w);\rsqInt writeImageFile(sqInt imageBytes);\rsqInt writeImageFileIO(sqInt imageBytes);\r/*** Variables ***/\rstatic struct foo {\rsqInt successFlag;\rsqInt specialObjectsOop;\rsqInt nilObj;\rsqInt argumentCount;\rsqInt falseObj;\rsqInt trueObj;\rsqInt interruptCheckCounter;\rsqInt remapBufferCount;\rsqInt nextPollTick;\rsqInt primitiveIndex;\rsqInt messageSelector;\rsqInt rootTableCount;\rsqInt compilerInitialized;\rsqInt allocationCount;\rsqInt receiver;\rsqInt lkupClass;\rsqInt allocationsBetweenGCs;\rsqInt lowSpaceThreshold;\rsqInt signalLowSpace;\rsqInt lastHash;\rsqInt reclaimableContextCount;\rsqInt freeContexts;\rsqInt pendingFinalizationSignals;\rsqInt freeLargeContexts;\rsqInt newNativeMethod;\rsqInt methodClass;\rsqInt jmpDepth;\rsqInt statMarkCount;\rsqInt extraRootCount;\rsqInt nextWakeupTick;\rsqInt interruptKeycode;\rsqInt semaphoresToSignalCountA;\rsqInt receiverClass;\rsqInt interruptPending;\rsqInt semaphoresToSignalCountB;\rsqInt fullScreenFlag;\rsqInt statCompMoveCount;\rsqInt statSweepCount;\rsqInt statMkFwdCount;\rsqInt semaphoresUseBufferA;\rsqInt tenuringThreshold;\rsqInt gcBiasToGrow;\rsqInt statRootTableOverflows;\rsqInt statFullGCs;\rsqInt gcBiasToGrowGCLimit;\rsqInt statTenures;\rsqInt statIncrGCs;\rsqInt statGrowMemory;\rsqInt savedWindowSize;\rsqInt deferDisplayUpdates;\rsqInt statShrinkMemory;\rsqInt statpendingFinalizationSignals;\rsqInt forceTenureFlag;\rsqInt totalObjectCount;\rsqInt interruptChecksEveryNms;\rsqInt gcSemaphoreIndex;\rsqInt statAllocationCount;\rsqInt lastTick;\rsqInt weakRootCount;\rsqInt jmpMax;\rsqInt interruptCheckCounterFeedBackReset;\rsqInt statSpecialMarkCount;\rsqInt globalSessionID;\rsqInt statSurvivorCount;\rsqInt statRootTableCount;\rsqLong statGCTime;\rsqLong statIGCDeltaTime;\rsqLong statIncrGCMSecs;\rusqInt shrinkThreshold;\rsqLong statFullGCMSecs;\rusqInt gcBiasToGrowThreshold;\rsqInt headerTypeBytes[4];\rsqInt remapBuffer[26];\rusqInt growHeadroom;\rsqInt processSignalingLowSpace;\rsqInt semaphoresToSignalB[501];\rsqInt semaphoresToSignalA[501];\rsqInt atCache[65];\rusqInt method;\rusqInt theHomeContext;\rusqInt stackPointer;\rusqInt instructionPointer;\rvoid *primitiveFunctionPointer;\rusqInt newMethod;\rvoid *externalPrimitiveTable[4097];\rlong methodCache[4097];\rusqInt endOfMemory;\rsqInt weakRoots[2625];\rsqInt* extraRoots[2049];\rusqInt compStart;\rusqInt freeBlock;\rusqInt fwdTableNext;\rusqInt compEnd;\rsqInt rootTable[2501];\rusqInt memoryLimit;\rusqInt fwdTableLast;\rsqInt suspendedCallbacks[33];\rjmp_buf jmpBuf[33];\rsqInt suspendedMethods[33];\rusqInt youngStart;\rusqInt activeContext;\r } fum;\rstruct foo * foo = &fum;\r\rsqInt extraVMMemory;\rconst char *interpreterVersion = \"Squeak4.1 of 17 April 2010 [latest update: #9957]\";\rsqInt (*compilerHooks[16])();\rstruct VirtualMachine* interpreterProxy;\rsqInt imageFormatVersionNumber = 0;\rvoid* showSurfaceFn;\rsqInt imageFormatInitialVersion = 0;\rusqInt memory;\rvoid *primitiveTable[577] = {\r\t/* 0*/ (void *)primitiveFail,\r\t/* 1*/ (void *)primitiveAdd,\r\t/* 2*/ (void *)primitiveSubtract,\r\t/* 3*/ (void *)primitiveLessThan,\r\t/* 4*/ (void *)primitiveGreaterThan,\r\t/* 5*/ (void *)primitiveLessOrEqual,\r\t/* 6*/ (void *)primitiveGreaterOrEqual,\r\t/* 7*/ (void *)primitiveEqual,\r\t/* 8*/ (void *)primitiveNotEqual,\r\t/* 9*/ (void *)primitiveMultiply,\r\t/* 10*/ (void *)primitiveDivide,\r\t/* 11*/ (void *)primitiveMod,\r\t/* 12*/ (void *)primitiveDiv,\r\t/* 13*/ (void *)primitiveQuo,\r\t/* 14*/ (void *)primitiveBitAnd,\r\t/* 15*/ (void *)primitiveBitOr,\r\t/* 16*/ (void *)primitiveBitXor,\r\t/* 17*/ (void *)primitiveBitShift,\r\t/* 18*/ (void *)primitiveMakePoint,\r\t/* 19*/ (void *)primitiveFail,\r\t/* 20*/ (void *)primitiveFail,\r\t/* 21*/ (void *)primitiveAddLargeIntegers,\r\t/* 22*/ (void *)primitiveSubtractLargeIntegers,\r\t/* 23*/ (void *)primitiveLessThanLargeIntegers,\r\t/* 24*/ (void *)primitiveGreaterThanLargeIntegers,\r\t/* 25*/ (void *)primitiveLessOrEqualLargeIntegers,\r\t/* 26*/ (void *)primitiveGreaterOrEqualLargeIntegers,\r\t/* 27*/ (void *)primitiveEqualLargeIntegers,\r\t/* 28*/ (void *)primitiveNotEqualLargeIntegers,\r\t/* 29*/ (void *)primitiveMultiplyLargeIntegers,\r\t/* 30*/ (void *)primitiveDivideLargeIntegers,\r\t/* 31*/ (void *)primitiveModLargeIntegers,\r\t/* 32*/ (void *)primitiveDivLargeIntegers,\r\t/* 33*/ (void *)primitiveQuoLargeIntegers,\r\t/* 34*/ (void *)primitiveBitAndLargeIntegers,\r\t/* 35*/ (void *)primitiveBitOrLargeIntegers,\r\t/* 36*/ (void *)primitiveBitXorLargeIntegers,\r\t/* 37*/ (void *)primitiveBitShiftLargeIntegers,\r\t/* 38*/ (void *)primitiveFail,\r\t/* 39*/ (void *)primitiveFail,\r\t/* 40*/ (void *)primitiveAsFloat,\r\t/* 41*/ (void *)primitiveFloatAdd,\r\t/* 42*/ (void *)primitiveFloatSubtract,\r\t/* 43*/ (void *)primitiveFloatLessThan,\r\t/* 44*/ (void *)primitiveFloatGreaterThan,\r\t/* 45*/ (void *)primitiveFloatLessOrEqual,\r\t/* 46*/ (void *)primitiveFloatGreaterOrEqual,\r\t/* 47*/ (void *)primitiveFloatEqual,\r\t/* 48*/ (void *)primitiveFloatNotEqual,\r\t/* 49*/ (void *)primitiveFloatMultiply,\r\t/* 50*/ (void *)primitiveFloatDivide,\r\t/* 51*/ (void *)primitiveTruncated,\r\t/* 52*/ (void *)primitiveFractionalPart,\r\t/* 53*/ (void *)primitiveExponent,\r\t/* 54*/ (void *)primitiveTimesTwoPower,\r\t/* 55*/ (void *)primitiveSquareRoot,\r\t/* 56*/ (void *)primitiveSine,\r\t/* 57*/ (void *)primitiveArctan,\r\t/* 58*/ (void *)primitiveLogN,\r\t/* 59*/ (void *)primitiveExp,\r\t/* 60*/ (void *)primitiveAt,\r\t/* 61*/ (void *)primitiveAtPut,\r\t/* 62*/ (void *)primitiveSize,\r\t/* 63*/ (void *)primitiveStringAt,\r\t/* 64*/ (void *)primitiveStringAtPut,\r\t/* 65*/ (void *)primitiveFail,\r\t/* 66*/ (void *)primitiveFail,\r\t/* 67*/ (void *)primitiveFail,\r\t/* 68*/ (void *)primitiveObjectAt,\r\t/* 69*/ (void *)primitiveObjectAtPut,\r\t/* 70*/ (void *)primitiveNew,\r\t/* 71*/ (void *)primitiveNewWithArg,\r\t/* 72*/ (void *)primitiveArrayBecomeOneWay,\r\t/* 73*/ (void *)primitiveInstVarAt,\r\t/* 74*/ (void *)primitiveInstVarAtPut,\r\t/* 75*/ (void *)primitiveAsOop,\r\t/* 76*/ (void *)primitiveStoreStackp,\r\t/* 77*/ (void *)primitiveSomeInstance,\r\t/* 78*/ (void *)primitiveNextInstance,\r\t/* 79*/ (void *)primitiveNewMethod,\r\t/* 80*/ (void *)primitiveBlockCopy,\r\t/* 81*/ (void *)primitiveValue,\r\t/* 82*/ (void *)primitiveValueWithArgs,\r\t/* 83*/ (void *)primitivePerform,\r\t/* 84*/ (void *)primitivePerformWithArgs,\r\t/* 85*/ (void *)primitiveSignal,\r\t/* 86*/ (void *)primitiveWait,\r\t/* 87*/ (void *)primitiveResume,\r\t/* 88*/ (void *)primitiveSuspend,\r\t/* 89*/ (void *)primitiveFlushCache,\r\t/* 90*/ (void *)primitiveMousePoint,\r\t/* 91*/ (void *)primitiveTestDisplayDepth,\r\t/* 92*/ (void *)primitiveSetDisplayMode,\r\t/* 93*/ (void *)primitiveInputSemaphore,\r\t/* 94*/ (void *)primitiveGetNextEvent,\r\t/* 95*/ (void *)primitiveInputWord,\r\t/* 96*/ (void *)primitiveFail,\r\t/* 97*/ (void *)primitiveSnapshot,\r\t/* 98*/ (void *)primitiveStoreImageSegment,\r\t/* 99*/ (void *)primitiveLoadImageSegment,\r\t/* 100*/ (void *)primitivePerformInSuperclass,\r\t/* 101*/ (void *)primitiveBeCursor,\r\t/* 102*/ (void *)primitiveBeDisplay,\r\t/* 103*/ (void *)primitiveScanCharacters,\r\t/* 104*/ (void *)primitiveFail,\r\t/* 105*/ (void *)primitiveStringReplace,\r\t/* 106*/ (void *)primitiveScreenSize,\r\t/* 107*/ (void *)primitiveMouseButtons,\r\t/* 108*/ (void *)primitiveKbdNext,\r\t/* 109*/ (void *)primitiveKbdPeek,\r\t/* 110*/ (void *)primitiveEquivalent,\r\t/* 111*/ (void *)primitiveClass,\r\t/* 112*/ (void *)primitiveBytesLeft,\r\t/* 113*/ (void *)primitiveQuit,\r\t/* 114*/ (void *)primitiveExitToDebugger,\r\t/* 115*/ (void *)primitiveChangeClass,\r\t/* 116*/ (void *)primitiveFlushCacheByMethod,\r\t/* 117*/ (void *)primitiveExternalCall,\r\t/* 118*/ (void *)primitiveDoPrimitiveWithArgs,\r\t/* 119*/ (void *)primitiveFlushCacheSelective,\r\t/* 120*/ (void *)primitiveCalloutToFFI,\r\t/* 121*/ (void *)primitiveImageName,\r\t/* 122*/ (void *)primitiveNoop,\r\t/* 123*/ (void *)primitiveValueUninterruptably,\r\t/* 124*/ (void *)primitiveLowSpaceSemaphore,\r\t/* 125*/ (void *)primitiveSignalAtBytesLeft,\r\t/* 126*/ (void *)primitiveDeferDisplayUpdates,\r\t/* 127*/ (void *)primitiveShowDisplayRect,\r\t/* 128*/ (void *)primitiveArrayBecome,\r\t/* 129*/ (void *)primitiveSpecialObjectsOop,\r\t/* 130*/ (void *)primitiveFullGC,\r\t/* 131*/ (void *)primitiveIncrementalGC,\r\t/* 132*/ (void *)primitiveObjectPointsTo,\r\t/* 133*/ (void *)primitiveSetInterruptKey,\r\t/* 134*/ (void *)primitiveInterruptSemaphore,\r\t/* 135*/ (void *)primitiveMillisecondClock,\r\t/* 136*/ (void *)primitiveSignalAtMilliseconds,\r\t/* 137*/ (void *)primitiveSecondsClock,\r\t/* 138*/ (void *)primitiveSomeObject,\r\t/* 139*/ (void *)primitiveNextObject,\r\t/* 140*/ (void *)primitiveBeep,\r\t/* 141*/ (void *)primitiveClipboardText,\r\t/* 142*/ (void *)primitiveVMPath,\r\t/* 143*/ (void *)primitiveShortAt,\r\t/* 144*/ (void *)primitiveShortAtPut,\r\t/* 145*/ (void *)primitiveConstantFill,\r\t/* 146*/ (void *)primitiveFail,\r\t/* 147*/ (void *)primitiveFail,\r\t/* 148*/ (void *)primitiveClone,\r\t/* 149*/ (void *)primitiveGetAttribute,\r\t/* 150*/ (void *)primitiveFail,\r\t/* 151*/ (void *)primitiveFail,\r\t/* 152*/ (void *)primitiveFail,\r\t/* 153*/ (void *)primitiveFail,\r\t/* 154*/ (void *)primitiveFail,\r\t/* 155*/ (void *)primitiveFail,\r\t/* 156*/ (void *)primitiveFail,\r\t/* 157*/ (void *)primitiveFail,\r\t/* 158*/ (void *)primitiveFail,\r\t/* 159*/ (void *)primitiveFail,\r\t/* 160*/ (void *)primitiveAdoptInstance,\r\t/* 161*/ (void *)primitiveFail,\r\t/* 162*/ (void *)primitiveFail,\r\t/* 163*/ (void *)primitiveFail,\r\t/* 164*/ (void *)primitiveFail,\r\t/* 165*/ (void *)primitiveIntegerAt,\r\t/* 166*/ (void *)primitiveIntegerAtPut,\r\t/* 167*/ (void *)primitiveYield,\r\t/* 168*/ (void *)primitiveCopyObject,\r\t/* 169*/ (void *)primitiveFail,\r\t/* 170*/ (void *)primitiveFail,\r\t/* 171*/ (void *)primitiveFail,\r\t/* 172*/ (void *)primitiveFail,\r\t/* 173*/ (void *)primitiveFail,\r\t/* 174*/ (void *)primitiveFail,\r\t/* 175*/ (void *)primitiveFail,\r\t/* 176*/ (void *)primitiveFail,\r\t/* 177*/ (void *)primitiveFail,\r\t/* 178*/ (void *)primitiveFail,\r\t/* 179*/ (void *)primitiveFail,\r\t/* 180*/ (void *)primitiveFail,\r\t/* 181*/ (void *)primitiveFail,\r\t/* 182*/ (void *)primitiveFail,\r\t/* 183*/ (void *)primitiveFail,\r\t/* 184*/ (void *)primitiveFail,\r\t/* 185*/ (void *)primitiveFail,\r\t/* 186*/ (void *)primitiveFail,\r\t/* 187*/ (void *)primitiveFail,\r\t/* 188*/ (void *)primitiveExecuteMethodArgsArray,\r\t/* 189*/ (void *)primitiveExecuteMethod,\r\t/* 190*/ (void *)primitiveFail,\r\t/* 191*/ (void *)primitiveFail,\r\t/* 192*/ (void *)primitiveFail,\r\t/* 193*/ (void *)primitiveFail,\r\t/* 194*/ (void *)primitiveFail,\r\t/* 195*/ (void *)primitiveFindNextUnwindContext,\r\t/* 196*/ (void *)primitiveTerminateTo,\r\t/* 197*/ (void *)primitiveFindHandlerContext,\r\t/* 198*/ (void *)primitiveMarkUnwindMethod,\r\t/* 199*/ (void *)primitiveMarkHandlerMethod,\r\t/* 200*/ (void *)primitiveClosureCopyWithCopiedValues,\r\t/* 201*/ (void *)primitiveClosureValue,\r\t/* 202*/ (void *)primitiveClosureValue,\r\t/* 203*/ (void *)primitiveClosureValue,\r\t/* 204*/ (void *)primitiveClosureValue,\r\t/* 205*/ (void *)primitiveClosureValue,\r\t/* 206*/ (void *)primitiveClosureValueWithArgs,\r\t/* 207*/ (void *)primitiveFail,\r\t/* 208*/ (void *)primitiveFail,\r\t/* 209*/ (void *)primitiveFail,\r\t/* 210*/ (void *)primitiveAt,\r\t/* 211*/ (void *)primitiveAtPut,\r\t/* 212*/ (void *)primitiveSize,\r\t/* 213*/ (void *)primitiveFail,\r\t/* 214*/ (void *)primitiveFail,\r\t/* 215*/ (void *)primitiveFail,\r\t/* 216*/ (void *)primitiveFail,\r\t/* 217*/ (void *)primitiveFail,\r\t/* 218*/ (void *)primitiveFail,\r\t/* 219*/ (void *)primitiveFail,\r\t/* 220*/ (void *)primitiveFail,\r\t/* 221*/ (void *)primitiveClosureValueNoContextSwitch,\r\t/* 222*/ (void *)primitiveClosureValueNoContextSwitch,\r\t/* 223*/ (void *)primitiveFail,\r\t/* 224*/ (void *)primitiveFail,\r\t/* 225*/ (void *)primitiveFail,\r\t/* 226*/ (void *)primitiveFail,\r\t/* 227*/ (void *)primitiveFail,\r\t/* 228*/ (void *)primitiveFail,\r\t/* 229*/ (void *)primitiveFail,\r\t/* 230*/ (void *)primitiveRelinquishProcessor,\r\t/* 231*/ (void *)primitiveForceDisplayUpdate,\r\t/* 232*/ (void *)primitiveFormPrint,\r\t/* 233*/ (void *)primitiveSetFullScreen,\r\t/* 234*/ (void *)primitiveFail,\r\t/* 235*/ (void *)primitiveFail,\r\t/* 236*/ (void *)primitiveFail,\r\t/* 237*/ (void *)primitiveFail,\r\t/* 238*/ (void *)primitiveFail,\r\t/* 239*/ (void *)primitiveFail,\r\t/* 240*/ (void *)primitiveFail,\r\t/* 241*/ (void *)primitiveFail,\r\t/* 242*/ (void *)primitiveFail,\r\t/* 243*/ (void *)primitiveFail,\r\t/* 244*/ (void *)primitiveFail,\r\t/* 245*/ (void *)primitiveFail,\r\t/* 246*/ (void *)primitiveFail,\r\t/* 247*/ (void *)primitiveSnapshotEmbedded,\r\t/* 248*/ (void *)primitiveInvokeObjectAsMethod,\r\t/* 249*/ (void *)primitiveArrayBecomeOneWayCopyHash,\r\t/* 250*/ (void *)clearProfile,\r\t/* 251*/ (void *)dumpProfile,\r\t/* 252*/ (void *)startProfiling,\r\t/* 253*/ (void *)stopProfiling,\r\t/* 254*/ (void *)primitiveVMParameter,\r\t/* 255*/ (void *)primitiveInstVarsPutFromStack,\r\t/* 256*/ (void *)primitivePushSelf,\r\t/* 257*/ (void *)primitivePushTrue,\r\t/* 258*/ (void *)primitivePushFalse,\r\t/* 259*/ (void *)primitivePushNil,\r\t/* 260*/ (void *)primitivePushMinusOne,\r\t/* 261*/ (void *)primitivePushZero,\r\t/* 262*/ (void *)primitivePushOne,\r\t/* 263*/ (void *)primitivePushTwo,\r\t/* 264*/ (void *)primitiveLoadInstVar,\r\t/* 265*/ (void *)primitiveLoadInstVar,\r\t/* 266*/ (void *)primitiveLoadInstVar,\r\t/* 267*/ (void *)primitiveLoadInstVar,\r\t/* 268*/ (void *)primitiveLoadInstVar,\r\t/* 269*/ (void *)primitiveLoadInstVar,\r\t/* 270*/ (void *)primitiveLoadInstVar,\r\t/* 271*/ (void *)primitiveLoadInstVar,\r\t/* 272*/ (void *)primitiveLoadInstVar,\r\t/* 273*/ (void *)primitiveLoadInstVar,\r\t/* 274*/ (void *)primitiveLoadInstVar,\r\t/* 275*/ (void *)primitiveLoadInstVar,\r\t/* 276*/ (void *)primitiveLoadInstVar,\r\t/* 277*/ (void *)primitiveLoadInstVar,\r\t/* 278*/ (void *)primitiveLoadInstVar,\r\t/* 279*/ (void *)primitiveLoadInstVar,\r\t/* 280*/ (void *)primitiveLoadInstVar,\r\t/* 281*/ (void *)primitiveLoadInstVar,\r\t/* 282*/ (void *)primitiveLoadInstVar,\r\t/* 283*/ (void *)primitiveLoadInstVar,\r\t/* 284*/ (void *)primitiveLoadInstVar,\r\t/* 285*/ (void *)primitiveLoadInstVar,\r\t/* 286*/ (void *)primitiveLoadInstVar,\r\t/* 287*/ (void *)primitiveLoadInstVar,\r\t/* 288*/ (void *)primitiveLoadInstVar,\r\t/* 289*/ (void *)primitiveLoadInstVar,\r\t/* 290*/ (void *)primitiveLoadInstVar,\r\t/* 291*/ (void *)primitiveLoadInstVar,\r\t/* 292*/ (void *)primitiveLoadInstVar,\r\t/* 293*/ (void *)primitiveLoadInstVar,\r\t/* 294*/ (void *)primitiveLoadInstVar,\r\t/* 295*/ (void *)primitiveLoadInstVar,\r\t/* 296*/ (void *)primitiveLoadInstVar,\r\t/* 297*/ (void *)primitiveLoadInstVar,\r\t/* 298*/ (void *)primitiveLoadInstVar,\r\t/* 299*/ (void *)primitiveLoadInstVar,\r\t/* 300*/ (void *)primitiveLoadInstVar,\r\t/* 301*/ (void *)primitiveLoadInstVar,\r\t/* 302*/ (void *)primitiveLoadInstVar,\r\t/* 303*/ (void *)primitiveLoadInstVar,\r\t/* 304*/ (void *)primitiveLoadInstVar,\r\t/* 305*/ (void *)primitiveLoadInstVar,\r\t/* 306*/ (void *)primitiveLoadInstVar,\r\t/* 307*/ (void *)primitiveLoadInstVar,\r\t/* 308*/ (void *)primitiveLoadInstVar,\r\t/* 309*/ (void *)primitiveLoadInstVar,\r\t/* 310*/ (void *)primitiveLoadInstVar,\r\t/* 311*/ (void *)primitiveLoadInstVar,\r\t/* 312*/ (void *)primitiveLoadInstVar,\r\t/* 313*/ (void *)primitiveLoadInstVar,\r\t/* 314*/ (void *)primitiveLoadInstVar,\r\t/* 315*/ (void *)primitiveLoadInstVar,\r\t/* 316*/ (void *)primitiveLoadInstVar,\r\t/* 317*/ (void *)primitiveLoadInstVar,\r\t/* 318*/ (void *)primitiveLoadInstVar,\r\t/* 319*/ (void *)primitiveLoadInstVar,\r\t/* 320*/ (void *)primitiveLoadInstVar,\r\t/* 321*/ (void *)primitiveLoadInstVar,\r\t/* 322*/ (void *)primitiveLoadInstVar,\r\t/* 323*/ (void *)primitiveLoadInstVar,\r\t/* 324*/ (void *)primitiveLoadInstVar,\r\t/* 325*/ (void *)primitiveLoadInstVar,\r\t/* 326*/ (void *)primitiveLoadInstVar,\r\t/* 327*/ (void *)primitiveLoadInstVar,\r\t/* 328*/ (void *)primitiveLoadInstVar,\r\t/* 329*/ (void *)primitiveLoadInstVar,\r\t/* 330*/ (void *)primitiveLoadInstVar,\r\t/* 331*/ (void *)primitiveLoadInstVar,\r\t/* 332*/ (void *)primitiveLoadInstVar,\r\t/* 333*/ (void *)primitiveLoadInstVar,\r\t/* 334*/ (void *)primitiveLoadInstVar,\r\t/* 335*/ (void *)primitiveLoadInstVar,\r\t/* 336*/ (void *)primitiveLoadInstVar,\r\t/* 337*/ (void *)primitiveLoadInstVar,\r\t/* 338*/ (void *)primitiveLoadInstVar,\r\t/* 339*/ (void *)primitiveLoadInstVar,\r\t/* 340*/ (void *)primitiveLoadInstVar,\r\t/* 341*/ (void *)primitiveLoadInstVar,\r\t/* 342*/ (void *)primitiveLoadInstVar,\r\t/* 343*/ (void *)primitiveLoadInstVar,\r\t/* 344*/ (void *)primitiveLoadInstVar,\r\t/* 345*/ (void *)primitiveLoadInstVar,\r\t/* 346*/ (void *)primitiveLoadInstVar,\r\t/* 347*/ (void *)primitiveLoadInstVar,\r\t/* 348*/ (void *)primitiveLoadInstVar,\r\t/* 349*/ (void *)primitiveLoadInstVar,\r\t/* 350*/ (void *)primitiveLoadInstVar,\r\t/* 351*/ (void *)primitiveLoadInstVar,\r\t/* 352*/ (void *)primitiveLoadInstVar,\r\t/* 353*/ (void *)primitiveLoadInstVar,\r\t/* 354*/ (void *)primitiveLoadInstVar,\r\t/* 355*/ (void *)primitiveLoadInstVar,\r\t/* 356*/ (void *)primitiveLoadInstVar,\r\t/* 357*/ (void *)primitiveLoadInstVar,\r\t/* 358*/ (void *)primitiveLoadInstVar,\r\t/* 359*/ (void *)primitiveLoadInstVar,\r\t/* 360*/ (void *)primitiveLoadInstVar,\r\t/* 361*/ (void *)primitiveLoadInstVar,\r\t/* 362*/ (void *)primitiveLoadInstVar,\r\t/* 363*/ (void *)primitiveLoadInstVar,\r\t/* 364*/ (void *)primitiveLoadInstVar,\r\t/* 365*/ (void *)primitiveLoadInstVar,\r\t/* 366*/ (void *)primitiveLoadInstVar,\r\t/* 367*/ (void *)primitiveLoadInstVar,\r\t/* 368*/ (void *)primitiveLoadInstVar,\r\t/* 369*/ (void *)primitiveLoadInstVar,\r\t/* 370*/ (void *)primitiveLoadInstVar,\r\t/* 371*/ (void *)primitiveLoadInstVar,\r\t/* 372*/ (void *)primitiveLoadInstVar,\r\t/* 373*/ (void *)primitiveLoadInstVar,\r\t/* 374*/ (void *)primitiveLoadInstVar,\r\t/* 375*/ (void *)primitiveLoadInstVar,\r\t/* 376*/ (void *)primitiveLoadInstVar,\r\t/* 377*/ (void *)primitiveLoadInstVar,\r\t/* 378*/ (void *)primitiveLoadInstVar,\r\t/* 379*/ (void *)primitiveLoadInstVar,\r\t/* 380*/ (void *)primitiveLoadInstVar,\r\t/* 381*/ (void *)primitiveLoadInstVar,\r\t/* 382*/ (void *)primitiveLoadInstVar,\r\t/* 383*/ (void *)primitiveLoadInstVar,\r\t/* 384*/ (void *)primitiveLoadInstVar,\r\t/* 385*/ (void *)primitiveLoadInstVar,\r\t/* 386*/ (void *)primitiveLoadInstVar,\r\t/* 387*/ (void *)primitiveLoadInstVar,\r\t/* 388*/ (void *)primitiveLoadInstVar,\r\t/* 389*/ (void *)primitiveLoadInstVar,\r\t/* 390*/ (void *)primitiveLoadInstVar,\r\t/* 391*/ (void *)primitiveLoadInstVar,\r\t/* 392*/ (void *)primitiveLoadInstVar,\r\t/* 393*/ (void *)primitiveLoadInstVar,\r\t/* 394*/ (void *)primitiveLoadInstVar,\r\t/* 395*/ (void *)primitiveLoadInstVar,\r\t/* 396*/ (void *)primitiveLoadInstVar,\r\t/* 397*/ (void *)primitiveLoadInstVar,\r\t/* 398*/ (void *)primitiveLoadInstVar,\r\t/* 399*/ (void *)primitiveLoadInstVar,\r\t/* 400*/ (void *)primitiveLoadInstVar,\r\t/* 401*/ (void *)primitiveLoadInstVar,\r\t/* 402*/ (void *)primitiveLoadInstVar,\r\t/* 403*/ (void *)primitiveLoadInstVar,\r\t/* 404*/ (void *)primitiveLoadInstVar,\r\t/* 405*/ (void *)primitiveLoadInstVar,\r\t/* 406*/ (void *)primitiveLoadInstVar,\r\t/* 407*/ (void *)primitiveLoadInstVar,\r\t/* 408*/ (void *)primitiveLoadInstVar,\r\t/* 409*/ (void *)primitiveLoadInstVar,\r\t/* 410*/ (void *)primitiveLoadInstVar,\r\t/* 411*/ (void *)primitiveLoadInstVar,\r\t/* 412*/ (void *)primitiveLoadInstVar,\r\t/* 413*/ (void *)primitiveLoadInstVar,\r\t/* 414*/ (void *)primitiveLoadInstVar,\r\t/* 415*/ (void *)primitiveLoadInstVar,\r\t/* 416*/ (void *)primitiveLoadInstVar,\r\t/* 417*/ (void *)primitiveLoadInstVar,\r\t/* 418*/ (void *)primitiveLoadInstVar,\r\t/* 419*/ (void *)primitiveLoadInstVar,\r\t/* 420*/ (void *)primitiveLoadInstVar,\r\t/* 421*/ (void *)primitiveLoadInstVar,\r\t/* 422*/ (void *)primitiveLoadInstVar,\r\t/* 423*/ (void *)primitiveLoadInstVar,\r\t/* 424*/ (void *)primitiveLoadInstVar,\r\t/* 425*/ (void *)primitiveLoadInstVar,\r\t/* 426*/ (void *)primitiveLoadInstVar,\r\t/* 427*/ (void *)primitiveLoadInstVar,\r\t/* 428*/ (void *)primitiveLoadInstVar,\r\t/* 429*/ (void *)primitiveLoadInstVar,\r\t/* 430*/ (void *)primitiveLoadInstVar,\r\t/* 431*/ (void *)primitiveLoadInstVar,\r\t/* 432*/ (void *)primitiveLoadInstVar,\r\t/* 433*/ (void *)primitiveLoadInstVar,\r\t/* 434*/ (void *)primitiveLoadInstVar,\r\t/* 435*/ (void *)primitiveLoadInstVar,\r\t/* 436*/ (void *)primitiveLoadInstVar,\r\t/* 437*/ (void *)primitiveLoadInstVar,\r\t/* 438*/ (void *)primitiveLoadInstVar,\r\t/* 439*/ (void *)primitiveLoadInstVar,\r\t/* 440*/ (void *)primitiveLoadInstVar,\r\t/* 441*/ (void *)primitiveLoadInstVar,\r\t/* 442*/ (void *)primitiveLoadInstVar,\r\t/* 443*/ (void *)primitiveLoadInstVar,\r\t/* 444*/ (void *)primitiveLoadInstVar,\r\t/* 445*/ (void *)primitiveLoadInstVar,\r\t/* 446*/ (void *)primitiveLoadInstVar,\r\t/* 447*/ (void *)primitiveLoadInstVar,\r\t/* 448*/ (void *)primitiveLoadInstVar,\r\t/* 449*/ (void *)primitiveLoadInstVar,\r\t/* 450*/ (void *)primitiveLoadInstVar,\r\t/* 451*/ (void *)primitiveLoadInstVar,\r\t/* 452*/ (void *)primitiveLoadInstVar,\r\t/* 453*/ (void *)primitiveLoadInstVar,\r\t/* 454*/ (void *)primitiveLoadInstVar,\r\t/* 455*/ (void *)primitiveLoadInstVar,\r\t/* 456*/ (void *)primitiveLoadInstVar,\r\t/* 457*/ (void *)primitiveLoadInstVar,\r\t/* 458*/ (void *)primitiveLoadInstVar,\r\t/* 459*/ (void *)primitiveLoadInstVar,\r\t/* 460*/ (void *)primitiveLoadInstVar,\r\t/* 461*/ (void *)primitiveLoadInstVar,\r\t/* 462*/ (void *)primitiveLoadInstVar,\r\t/* 463*/ (void *)primitiveLoadInstVar,\r\t/* 464*/ (void *)primitiveLoadInstVar,\r\t/* 465*/ (void *)primitiveLoadInstVar,\r\t/* 466*/ (void *)primitiveLoadInstVar,\r\t/* 467*/ (void *)primitiveLoadInstVar,\r\t/* 468*/ (void *)primitiveLoadInstVar,\r\t/* 469*/ (void *)primitiveLoadInstVar,\r\t/* 470*/ (void *)primitiveLoadInstVar,\r\t/* 471*/ (void *)primitiveLoadInstVar,\r\t/* 472*/ (void *)primitiveLoadInstVar,\r\t/* 473*/ (void *)primitiveLoadInstVar,\r\t/* 474*/ (void *)primitiveLoadInstVar,\r\t/* 475*/ (void *)primitiveLoadInstVar,\r\t/* 476*/ (void *)primitiveLoadInstVar,\r\t/* 477*/ (void *)primitiveLoadInstVar,\r\t/* 478*/ (void *)primitiveLoadInstVar,\r\t/* 479*/ (void *)primitiveLoadInstVar,\r\t/* 480*/ (void *)primitiveLoadInstVar,\r\t/* 481*/ (void *)primitiveLoadInstVar,\r\t/* 482*/ (void *)primitiveLoadInstVar,\r\t/* 483*/ (void *)primitiveLoadInstVar,\r\t/* 484*/ (void *)primitiveLoadInstVar,\r\t/* 485*/ (void *)primitiveLoadInstVar,\r\t/* 486*/ (void *)primitiveLoadInstVar,\r\t/* 487*/ (void *)primitiveLoadInstVar,\r\t/* 488*/ (void *)primitiveLoadInstVar,\r\t/* 489*/ (void *)primitiveLoadInstVar,\r\t/* 490*/ (void *)primitiveLoadInstVar,\r\t/* 491*/ (void *)primitiveLoadInstVar,\r\t/* 492*/ (void *)primitiveLoadInstVar,\r\t/* 493*/ (void *)primitiveLoadInstVar,\r\t/* 494*/ (void *)primitiveLoadInstVar,\r\t/* 495*/ (void *)primitiveLoadInstVar,\r\t/* 496*/ (void *)primitiveLoadInstVar,\r\t/* 497*/ (void *)primitiveLoadInstVar,\r\t/* 498*/ (void *)primitiveLoadInstVar,\r\t/* 499*/ (void *)primitiveLoadInstVar,\r\t/* 500*/ (void *)primitiveLoadInstVar,\r\t/* 501*/ (void *)primitiveLoadInstVar,\r\t/* 502*/ (void *)primitiveLoadInstVar,\r\t/* 503*/ (void *)primitiveLoadInstVar,\r\t/* 504*/ (void *)primitiveLoadInstVar,\r\t/* 505*/ (void *)primitiveLoadInstVar,\r\t/* 506*/ (void *)primitiveLoadInstVar,\r\t/* 507*/ (void *)primitiveLoadInstVar,\r\t/* 508*/ (void *)primitiveLoadInstVar,\r\t/* 509*/ (void *)primitiveLoadInstVar,\r\t/* 510*/ (void *)primitiveLoadInstVar,\r\t/* 511*/ (void *)primitiveLoadInstVar,\r\t/* 512*/ (void *)primitiveLoadInstVar,\r\t/* 513*/ (void *)primitiveLoadInstVar,\r\t/* 514*/ (void *)primitiveLoadInstVar,\r\t/* 515*/ (void *)primitiveLoadInstVar,\r\t/* 516*/ (void *)primitiveLoadInstVar,\r\t/* 517*/ (void *)primitiveLoadInstVar,\r\t/* 518*/ (void *)primitiveLoadInstVar,\r\t/* 519*/ (void *)primitiveLoadInstVar,\r\t/* 520*/ (void *)primitiveFail,\r\t/* 521*/ (void *)primitiveFail,\r\t/* 522*/ (void *)primitiveFail,\r\t/* 523*/ (void *)primitiveFail,\r\t/* 524*/ (void *)primitiveFail,\r\t/* 525*/ (void *)primitiveFail,\r\t/* 526*/ (void *)primitiveFail,\r\t/* 527*/ (void *)primitiveFail,\r\t/* 528*/ (void *)primitiveFail,\r\t/* 529*/ (void *)primitiveFail,\r\t/* 530*/ (void *)primitiveFail,\r\t/* 531*/ (void *)primitiveFail,\r\t/* 532*/ (void *)primitiveFail,\r\t/* 533*/ (void *)primitiveFail,\r\t/* 534*/ (void *)primitiveFail,\r\t/* 535*/ (void *)primitiveFail,\r\t/* 536*/ (void *)primitiveFail,\r\t/* 537*/ (void *)primitiveFail,\r\t/* 538*/ (void *)primitiveFail,\r\t/* 539*/ (void *)primitiveFail,\r\t/* 540*/ (void *)primitiveFail,\r\t/* 541*/ (void *)primitiveFail,\r\t/* 542*/ (void *)primitiveFail,\r\t/* 543*/ (void *)primitiveFail,\r\t/* 544*/ (void *)primitiveFail,\r\t/* 545*/ (void *)primitiveFail,\r\t/* 546*/ (void *)primitiveFail,\r\t/* 547*/ (void *)primitiveFail,\r\t/* 548*/ (void *)primitiveFail,\r\t/* 549*/ (void *)primitiveFail,\r\t/* 550*/ (void *)primitiveFail,\r\t/* 551*/ (void *)primitiveFail,\r\t/* 552*/ (void *)primitiveFail,\r\t/* 553*/ (void *)primitiveFail,\r\t/* 554*/ (void *)primitiveFail,\r\t/* 555*/ (void *)primitiveFail,\r\t/* 556*/ (void *)primitiveFail,\r\t/* 557*/ (void *)primitiveFail,\r\t/* 558*/ (void *)primitiveFail,\r\t/* 559*/ (void *)primitiveFail,\r\t/* 560*/ (void *)primitiveFail,\r\t/* 561*/ (void *)primitiveFail,\r\t/* 562*/ (void *)primitiveFail,\r\t/* 563*/ (void *)primitiveFail,\r\t/* 564*/ (void *)primitiveFail,\r\t/* 565*/ (void *)primitiveFail,\r\t/* 566*/ (void *)primitiveFail,\r\t/* 567*/ (void *)primitiveFail,\r\t/* 568*/ (void *)primitiveFail,\r\t/* 569*/ (void *)primitiveFail,\r\t/* 570*/ (void *)primitiveFlushExternalPrimitives,\r\t/* 571*/ (void *)primitiveUnloadModule,\r\t/* 572*/ (void *)primitiveListBuiltinModule,\r\t/* 573*/ (void *)primitiveListExternalModule,\r\t/* 574*/ (void *)primitiveFail,\r\t/* 575*/ (void *)primitiveFail,\r 0 };\r\r\r\r/*\tReturn the accessible object following the given object or \r\tfree chunk in the heap. Return nil when heap is exhausted. */\r\rsqInt accessibleObjectAfter(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt obj;\r    sqInt sz;\r    sqInt header;\r    sqInt sz1;\r    sqInt header1;\r\r\t/* begin objectAfter: */\r\tif (DoAssertionChecks) {\r\t\tif ((((usqInt) oop)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\terror(\"no objects after the end of memory\");\r\t\t}\r\t}\r\tif (((longAt(oop)) & TypeMask) == HeaderTypeFree) {\r\t\tsz1 = (longAt(oop)) & (ALL_BUT_TYPE_MASK);\r\t} else {\r\t\t/* begin sizeBitsOf: */\r\t\theader1 = longAt(oop);\r\t\tif ((header1 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\tsz1 = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\tgoto l2;\r\t\t} else {\r\t\t\tsz1 = header1 & (SIZE_MASK);\r\t\t\tgoto l2;\r\t\t}\r\tl2:\t/* end sizeBitsOf: */;\r\t}\r\tobj = (oop + sz1) + (foo->headerTypeBytes[(longAt(oop + sz1)) & TypeMask]);\r\twhile ((((usqInt) obj)) < (((usqInt) foo->endOfMemory))) {\r\t\tif (!(((longAt(obj)) & TypeMask) == HeaderTypeFree)) {\r\t\t\treturn obj;\r\t\t}\r\t\t/* begin objectAfter: */\r\t\tif (DoAssertionChecks) {\r\t\t\tif ((((usqInt) obj)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t}\r\t\t}\r\t\tif (((longAt(obj)) & TypeMask) == HeaderTypeFree) {\r\t\t\tsz = (longAt(obj)) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader = longAt(obj);\r\t\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(obj - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tsz = header & (SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\tl1:\t/* end sizeBitsOf: */;\r\t\t}\r\t\tobj = (obj + sz) + (foo->headerTypeBytes[(longAt(obj + sz)) & TypeMask]);\r\t}\r\treturn null;\r}\r\r\r/*\tSimilar to activateNewMethod but for Closure and newMethod. */\r\rsqInt activateNewClosureMethod(sqInt blockClosure) {\rregister struct foo * foo = &fum;\r    sqInt closureMethod;\r    sqInt i;\r    sqInt methodHeader;\r    sqInt newContext;\r    sqInt numCopied;\r    sqInt outerContext;\r    sqInt theBlockClosure;\r    sqInt where;\r    sqInt oop;\r    sqInt activeCntx;\r    sqInt valuePointer;\r    sqInt valuePointer1;\r    sqInt tmp;\r\r\tif (DoAssertionChecks) {\r\t\tokayOop(blockClosure);\r\t}\r\touterContext = longAt((blockClosure + (BASE_HEADER_SIZE)) + (ClosureOuterContextIndex << (SHIFT_FOR_WORD)));\r\tif (DoAssertionChecks) {\r\t\tokayOop(outerContext);\r\t}\r\tclosureMethod = longAt((outerContext + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\tmethodHeader = longAt((closureMethod + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD)));\r\t/* begin pushRemappableOop: */\r\tfoo->remapBuffer[(foo->remapBufferCount += 1)] = blockClosure;\r\r\t/* All for one, and one for all! */\r\t/* allocateOrRecycleContext: may cause a GC; restore blockClosure and refetch outerContext et al */\r\r\tnewContext = allocateOrRecycleContext(methodHeader & LargeContextBit);\r\t/* begin popRemappableOop */\r\toop = foo->remapBuffer[foo->remapBufferCount];\r\tfoo->remapBufferCount -= 1;\r\ttheBlockClosure = oop;\r\touterContext = longAt((theBlockClosure + (BASE_HEADER_SIZE)) + (ClosureOuterContextIndex << (SHIFT_FOR_WORD)));\r\r\t/* Assume: newContext will be recorded as a root if necessary by the\r\t call to newActiveContext: below, so we can use unchecked stores. */\r\r\tnumCopied = (fetchWordLengthOf(theBlockClosure)) - ClosureFirstCopiedValueIndex;\r\twhere = newContext + (BASE_HEADER_SIZE);\r\tlongAtput(where + (SenderIndex << (SHIFT_FOR_WORD)), foo->activeContext);\r\tlongAtput(where + (InstructionPointerIndex << (SHIFT_FOR_WORD)), longAt((theBlockClosure + (BASE_HEADER_SIZE)) + (ClosureStartPCIndex << (SHIFT_FOR_WORD))));\r\tlongAtput(where + (StackPointerIndex << (SHIFT_FOR_WORD)), (((foo->argumentCount + numCopied) << 1) | 1));\r\tlongAtput(where + (MethodIndex << (SHIFT_FOR_WORD)), longAt((outerContext + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD))));\r\tlongAtput(where + (ClosureIndex << (SHIFT_FOR_WORD)), theBlockClosure);\r\tlongAtput(where + (ReceiverIndex << (SHIFT_FOR_WORD)), longAt((outerContext + (BASE_HEADER_SIZE)) + (ReceiverIndex << (SHIFT_FOR_WORD))));\r\tfor (i = 1; i <= foo->argumentCount; i += 1) {\r\t\tlongAtput(where + ((ReceiverIndex + i) << (SHIFT_FOR_WORD)), longAt(foo->stackPointer - ((foo->argumentCount - i) * (BYTES_PER_WORD))));\r\t}\r\twhere = (newContext + (BASE_HEADER_SIZE)) + (((ReceiverIndex + 1) + foo->argumentCount) << (SHIFT_FOR_WORD));\r\tfor (i = 0; i <= (numCopied - 1); i += 1) {\r\t\tlongAtput(where + (i << (SHIFT_FOR_WORD)), longAt((theBlockClosure + (BASE_HEADER_SIZE)) + ((i + ClosureFirstCopiedValueIndex) << (SHIFT_FOR_WORD))));\r\t}\r\t/* begin pop: */\r\tfoo->stackPointer -= (foo->argumentCount + 1) * (BYTES_PER_WORD);\r\t/* begin newActiveContext: */\r\t/* begin storeContextRegisters: */\r\tactiveCntx = foo->activeContext;\r\t/* begin storePointerUnchecked:ofObject:withValue: */\r\tvaluePointer = ((((foo->instructionPointer - foo->method) - ((BASE_HEADER_SIZE) - 2)) << 1) | 1);\r\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t/* begin storePointerUnchecked:ofObject:withValue: */\r\tvaluePointer1 = (((((((usqInt) ((foo->stackPointer - foo->activeContext) - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD)) - TempFrameStart) + 1) << 1) | 1);\r\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\tif ((((usqInt) newContext)) < (((usqInt) foo->youngStart))) {\r\t\tbeRootIfOld(newContext);\r\t}\r\tfoo->activeContext = newContext;\r\t/* begin fetchContextRegisters: */\r\ttmp = longAt((newContext + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\tif ((tmp & 1)) {\r\t\ttmp = longAt((newContext + (BASE_HEADER_SIZE)) + (HomeIndex << (SHIFT_FOR_WORD)));\r\t\tif ((((usqInt) tmp)) < (((usqInt) foo->youngStart))) {\r\t\t\tbeRootIfOld(tmp);\r\t\t}\r\t} else {\r\t\ttmp = newContext;\r\t}\r\tfoo->theHomeContext = tmp;\r\tfoo->receiver = longAt((tmp + (BASE_HEADER_SIZE)) + (ReceiverIndex << (SHIFT_FOR_WORD)));\r\tfoo->method = longAt((tmp + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\ttmp = ((longAt((newContext + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tfoo->instructionPointer = ((foo->method + tmp) + (BASE_HEADER_SIZE)) - 2;\r\ttmp = ((longAt((newContext + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tfoo->stackPointer = (newContext + (BASE_HEADER_SIZE)) + (((TempFrameStart + tmp) - 1) * (BYTES_PER_WORD));\r}\r\rsqInt activateNewMethod(void) {\rregister struct foo * foo = &fum;\r    sqInt i;\r    sqInt initialIP;\r    sqInt methodHeader;\r    sqInt newContext;\r    sqInt nilOop;\r    sqInt tempCount;\r    sqInt where;\r    sqInt methodPointer;\r    sqInt activeCntx;\r    sqInt valuePointer;\r    sqInt valuePointer1;\r    sqInt tmp;\r\r\t/* begin headerOf: */\r\tmethodPointer = foo->newMethod;\r\tmethodHeader = longAt((methodPointer + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD)));\r\tnewContext = allocateOrRecycleContext(methodHeader & LargeContextBit);\r\tinitialIP = ((LiteralStart + ((((usqInt) methodHeader) >> 10) & 255)) * (BYTES_PER_WORD)) + 1;\r\r\t/* Assume: newContext will be recorded as a root if necessary by the\r\t call to newActiveContext: below, so we can use unchecked stores. */\r\r\ttempCount = (((usqInt) methodHeader) >> 19) & 63;\r\twhere = newContext + (BASE_HEADER_SIZE);\r\tlongAtput(where + (SenderIndex << (SHIFT_FOR_WORD)), foo->activeContext);\r\tlongAtput(where + (InstructionPointerIndex << (SHIFT_FOR_WORD)), ((initialIP << 1) | 1));\r\tlongAtput(where + (StackPointerIndex << (SHIFT_FOR_WORD)), ((tempCount << 1) | 1));\r\tlongAtput(where + (MethodIndex << (SHIFT_FOR_WORD)), foo->newMethod);\r\tlongAtput(where + (ClosureIndex << (SHIFT_FOR_WORD)), foo->nilObj);\r\tfor (i = 0; i <= foo->argumentCount; i += 1) {\r\t\tlongAtput(where + ((ReceiverIndex + i) << (SHIFT_FOR_WORD)), longAt(foo->stackPointer - ((foo->argumentCount - i) * (BYTES_PER_WORD))));\r\t}\r\tnilOop = foo->nilObj;\r\tfor (i = ((foo->argumentCount + 1) + ReceiverIndex); i <= (tempCount + ReceiverIndex); i += 1) {\r\t\tlongAtput(where + (i << (SHIFT_FOR_WORD)), nilOop);\r\t}\r\t/* begin pop: */\r\tfoo->stackPointer -= (foo->argumentCount + 1) * (BYTES_PER_WORD);\r\tfoo->reclaimableContextCount += 1;\r\t/* begin newActiveContext: */\r\t/* begin storeContextRegisters: */\r\tactiveCntx = foo->activeContext;\r\t/* begin storePointerUnchecked:ofObject:withValue: */\r\tvaluePointer = ((((foo->instructionPointer - foo->method) - ((BASE_HEADER_SIZE) - 2)) << 1) | 1);\r\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t/* begin storePointerUnchecked:ofObject:withValue: */\r\tvaluePointer1 = (((((((usqInt) ((foo->stackPointer - foo->activeContext) - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD)) - TempFrameStart) + 1) << 1) | 1);\r\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\tif ((((usqInt) newContext)) < (((usqInt) foo->youngStart))) {\r\t\tbeRootIfOld(newContext);\r\t}\r\tfoo->activeContext = newContext;\r\t/* begin fetchContextRegisters: */\r\ttmp = longAt((newContext + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\tif ((tmp & 1)) {\r\t\ttmp = longAt((newContext + (BASE_HEADER_SIZE)) + (HomeIndex << (SHIFT_FOR_WORD)));\r\t\tif ((((usqInt) tmp)) < (((usqInt) foo->youngStart))) {\r\t\t\tbeRootIfOld(tmp);\r\t\t}\r\t} else {\r\t\ttmp = newContext;\r\t}\r\tfoo->theHomeContext = tmp;\r\tfoo->receiver = longAt((tmp + (BASE_HEADER_SIZE)) + (ReceiverIndex << (SHIFT_FOR_WORD)));\r\tfoo->method = longAt((tmp + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\ttmp = ((longAt((newContext + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tfoo->instructionPointer = ((foo->method + tmp) + (BASE_HEADER_SIZE)) - 2;\r\ttmp = ((longAt((newContext + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tfoo->stackPointer = (newContext + (BASE_HEADER_SIZE)) + (((TempFrameStart + tmp) - 1) * (BYTES_PER_WORD));\r}\r\r\r/*\tAdd the given variable location to the extra roots table */\r\rEXPORT(sqInt) addGCRoot(sqInt *varLoc) {\rregister struct foo * foo = &fum;\r\tif (foo->extraRootCount >= ExtraRootSize) {\r\t\treturn 0;\r\t}\r\tfoo->extraRoots[(foo->extraRootCount += 1)] = varLoc;\r\treturn 1;\r}\r\r\r/*\tAdd the given entry to the method cache.\r\tThe policy is as follows:\r\t\tLook for an empty entry anywhere in the reprobe chain.\r\t\tIf found, install the new entry there.\r\t\tIf not found, then install the new entry at the first probe position\r\t\t\tand delete the entries in the rest of the reprobe chain.\r\t\tThis has two useful purposes:\r\t\t\tIf there is active contention over the first slot, the second\r\t\t\t\tor third will likely be free for reentry after ejection.\r\t\t\tAlso, flushing is good when reprobe chains are getting full. */\r\rsqInt addNewMethodToCache(void) {\rregister struct foo * foo = &fum;\r    sqInt hash;\r    sqInt p;\r    sqInt probe;\r\r\tfoo->compilerInitialized && (compilerTranslateMethod());\r\r\t/* drop low-order zeros from addresses */\r\r\thash = foo->messageSelector ^ foo->lkupClass;\r\tfoo->primitiveFunctionPointer = primitiveTable[foo->primitiveIndex];\r\tfor (p = 0; p <= (CacheProbeMax - 1); p += 1) {\r\t\tprobe = (((usqInt) hash) >> p) & MethodCacheMask;\r\t\tif ((foo->methodCache[probe + MethodCacheSelector]) == 0) {\r\t\t\tfoo->methodCache[probe + MethodCacheSelector] = foo->messageSelector;\r\t\t\tfoo->methodCache[probe + MethodCacheClass] = foo->lkupClass;\r\t\t\tfoo->methodCache[probe + MethodCacheMethod] = foo->newMethod;\r\t\t\tfoo->methodCache[probe + MethodCachePrim] = foo->primitiveIndex;\r\t\t\tfoo->methodCache[probe + MethodCacheNative] = foo->newNativeMethod;\r\t\t\tfoo->methodCache[probe + MethodCachePrimFunction] = (((long) foo->primitiveFunctionPointer));\r\t\t\treturn null;\r\t\t}\r\t}\r\r\t/* first probe */\r\r\tprobe = hash & MethodCacheMask;\r\tfoo->methodCache[probe + MethodCacheSelector] = foo->messageSelector;\r\tfoo->methodCache[probe + MethodCacheClass] = foo->lkupClass;\r\tfoo->methodCache[probe + MethodCacheMethod] = foo->newMethod;\r\tfoo->methodCache[probe + MethodCachePrim] = foo->primitiveIndex;\r\tfoo->methodCache[probe + MethodCacheNative] = foo->newNativeMethod;\r\tfoo->methodCache[probe + MethodCachePrimFunction] = (((long) foo->primitiveFunctionPointer));\r\tfor (p = 1; p <= (CacheProbeMax - 1); p += 1) {\r\t\tprobe = (((usqInt) hash) >> p) & MethodCacheMask;\r\t\tfoo->methodCache[probe + MethodCacheSelector] = 0;\r\t}\r}\r\r\r/*\tAdd the given function address to the external primitive table and return the index where it's stored. This function doesn't need to be fast since it is only called when an external primitive has been looked up (which takes quite a bit of time itself). So there's nothing specifically complicated here.\r\tNote: Return index will be one-based (ST convention) */\r\rsqInt addToExternalPrimitiveTable(void *functionAddress) {\rregister struct foo * foo = &fum;\r    sqInt i;\r\r\tfor (i = 0; i <= (MaxExternalPrimitiveTableSize - 1); i += 1) {\r\t\tif ((foo->externalPrimitiveTable[i]) == 0) {\r\t\t\tfoo->externalPrimitiveTable[i] = functionAddress;\r\t\t\treturn i + 1;\r\t\t}\r\t}\r\treturn 0;\r}\r\r\r/*\tAdjust all oop references by the given number of bytes. This \r\tis done just after reading in an image when the new base \r\taddress of the object heap is different from the base address \r\tin the image. */\r/*\tdi 11/18/2000 - return number of objects found */\r\rsqInt adjustAllOopsBy(sqInt bytesToShift) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r    sqInt totalObjects;\r    sqInt classHeader;\r    sqInt fieldAddr;\r    sqInt fieldOop;\r    sqInt newClassOop;\r    sqInt sz;\r    sqInt header;\r\r\tif (bytesToShift == 0) {\r\t\treturn 300000;\r\t}\r\ttotalObjects = 0;\r\toop = memory + (foo->headerTypeBytes[(longAt(memory)) & TypeMask]);\r\twhile ((((usqInt) oop)) < (((usqInt) foo->endOfMemory))) {\r\t\tif (!(((longAt(oop)) & TypeMask) == HeaderTypeFree)) {\r\t\t\ttotalObjects += 1;\r\t\t\t/* begin adjustFieldsAndClassOf:by: */\r\t\t\tif (bytesToShift == 0) {\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t\tfieldAddr = oop + (lastPointerOf(oop));\r\t\t\twhile ((((usqInt) fieldAddr)) > (((usqInt) oop))) {\r\t\t\t\tfieldOop = longAt(fieldAddr);\r\t\t\t\tif (!((fieldOop & 1))) {\r\t\t\t\t\tlongAtput(fieldAddr, fieldOop + bytesToShift);\r\t\t\t\t}\r\t\t\t\tfieldAddr -= BYTES_PER_WORD;\r\t\t\t}\r\t\t\tif (((longAt(oop)) & TypeMask) != HeaderTypeShort) {\r\t\t\t\tclassHeader = longAt(oop - (BYTES_PER_WORD));\r\t\t\t\tnewClassOop = (classHeader & (ALL_BUT_TYPE_MASK)) + bytesToShift;\r\t\t\t\tlongAtput(oop - (BYTES_PER_WORD), newClassOop | (classHeader & TypeMask));\r\t\t\t}\r\t\tl1:\t/* end adjustFieldsAndClassOf:by: */;\r\t\t}\r\t\t/* begin objectAfter: */\r\t\tif (DoAssertionChecks) {\r\t\t\tif ((((usqInt) oop)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t}\r\t\t}\r\t\tif (((longAt(oop)) & TypeMask) == HeaderTypeFree) {\r\t\t\tsz = (longAt(oop)) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader = longAt(oop);\r\t\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l2;\r\t\t\t} else {\r\t\t\t\tsz = header & (SIZE_MASK);\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\tl2:\t/* end sizeBitsOf: */;\r\t\t}\r\t\toop = (oop + sz) + (foo->headerTypeBytes[(longAt(oop + sz)) & TypeMask]);\r\t}\r\treturn totalObjects;\r}\r\r\r/*\tReturn true if all the oops in both arrays, and the arrays \r\tthemselves, are in the young object space. */\r\rsqInt allYoungand(sqInt array1, sqInt array2) {\rregister struct foo * foo = &fum;\r    sqInt fieldOffset;\r    sqInt contextSize;\r    sqInt fmt;\r    sqInt header;\r    sqInt methodHeader;\r    sqInt sz;\r    sqInt sp;\r    sqInt header1;\r    sqInt type;\r\r\tif ((((usqInt) array1)) < (((usqInt) foo->youngStart))) {\r\t\treturn 0;\r\t}\r\tif ((((usqInt) array2)) < (((usqInt) foo->youngStart))) {\r\t\treturn 0;\r\t}\r\t/* begin lastPointerOf: */\r\theader = longAt(array1);\r\tfmt = (((usqInt) header) >> 8) & 15;\r\tif (fmt <= 4) {\r\t\tif ((fmt == 3) && ((((((usqInt) header) >> 12) & 31) == 13) || ((((((usqInt) header) >> 12) & 31) == 14) || (((((usqInt) header) >> 12) & 31) == 4)))) {\r\t\t\t/* begin fetchStackPointerOf: */\r\t\t\tsp = longAt((array1 + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)));\r\t\t\tif (!((sp & 1))) {\r\t\t\t\tcontextSize = 0;\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t\tcontextSize = (sp >> 1);\r\t\tl1:\t/* end fetchStackPointerOf: */;\r\t\t\tfieldOffset = (CtxtTempFrameStart + contextSize) * (BYTES_PER_WORD);\r\t\t\tgoto l2;\r\t\t}\r\t\t/* begin sizeBitsOfSafe: */\r\t\theader1 = longAt(array1);\r\t\t/* begin rightType: */\r\t\tif ((header1 & (SIZE_MASK)) == 0) {\r\t\t\ttype = HeaderTypeSizeAndClass;\r\t\t\tgoto l3;\r\t\t} else {\r\t\t\tif ((header1 & CompactClassMask) == 0) {\r\t\t\t\ttype = HeaderTypeClass;\r\t\t\t\tgoto l3;\r\t\t\t} else {\r\t\t\t\ttype = HeaderTypeShort;\r\t\t\t\tgoto l3;\r\t\t\t}\r\t\t}\r\tl3:\t/* end rightType: */;\r\t\tif (type == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(array1 - ((BYTES_PER_WORD) * 2))) & (ALL_BUT_TYPE_MASK);\r\t\t\tgoto l4;\r\t\t} else {\r\t\t\tsz = header1 & (SIZE_MASK);\r\t\t\tgoto l4;\r\t\t}\r\tl4:\t/* end sizeBitsOfSafe: */;\r\t\tfieldOffset = sz - (BASE_HEADER_SIZE);\r\t\tgoto l2;\r\t}\r\tif (fmt < 12) {\r\t\tfieldOffset = 0;\r\t\tgoto l2;\r\t}\r\tmethodHeader = longAt(array1 + (BASE_HEADER_SIZE));\r\tfieldOffset = (((((usqInt) methodHeader) >> 10) & 255) * (BYTES_PER_WORD)) + (BASE_HEADER_SIZE);\rl2:\t/* end lastPointerOf: */;\r\twhile (fieldOffset >= (BASE_HEADER_SIZE)) {\r\t\tif ((((usqInt) (longAt(array1 + fieldOffset)))) < (((usqInt) foo->youngStart))) {\r\t\t\treturn 0;\r\t\t}\r\t\tif ((((usqInt) (longAt(array2 + fieldOffset)))) < (((usqInt) foo->youngStart))) {\r\t\t\treturn 0;\r\t\t}\r\t\tfieldOffset -= BYTES_PER_WORD;\r\t}\r\treturn 1;\r}\r\r\r/*\tAllocate a chunk of the given size. Sender must be sure that  the requested size includes enough space for the header  word(s).  */\r/*\tDetails: To limit the time per incremental GC, do one every so many allocations. The number is settable via primitiveVMParameter to tune your memory system */\r\rsqInt allocateChunk(sqInt byteSize) {\rregister struct foo * foo = &fum;\r    sqInt enoughSpace;\r    sqInt newChunk;\r    sqInt newFreeSize;\r    usqInt minFree;\r    sqInt currentProc;\r    sqInt lastSavedProcess;\r    sqInt sched;\r    sqInt oop;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\tif (foo->allocationCount >= foo->allocationsBetweenGCs) {\r\t\tincrementalGC();\r\t}\r\t/* begin sufficientSpaceToAllocate: */\r\tminFree = (foo->lowSpaceThreshold + byteSize) + (BASE_HEADER_SIZE);\r\tif (oopisGreaterThanOrEqualTo((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), minFree)) {\r\t\tenoughSpace = 1;\r\t\tgoto l1;\r\t} else {\r\t\tenoughSpace = sufficientSpaceAfterGC(minFree);\r\t\tgoto l1;\r\t}\rl1:\t/* end sufficientSpaceToAllocate: */;\r\tif (!(enoughSpace)) {\r\r\t\t/* signal that space is running low, but proceed with allocation if possible */\r\r\t\tfoo->signalLowSpace = 1;\r\r\t\t/* disable additional interrupts until lowSpaceThreshold is reset by image */\r\r\t\tfoo->lowSpaceThreshold = 0;\r\t\t/* begin saveProcessSignalingLowSpace */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop2 = foo->specialObjectsOop;\r\t\tlastSavedProcess = longAt((oop2 + (BASE_HEADER_SIZE)) + (ProcessSignalingLowSpace << (SHIFT_FOR_WORD)));\r\t\tif (lastSavedProcess == foo->nilObj) {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop3 = foo->specialObjectsOop;\r\t\t\toop = longAt((oop3 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\t\t\tsched = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\tcurrentProc = longAt((sched + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)));\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\toop1 = foo->specialObjectsOop;\r\t\t\tif ((((usqInt) oop1)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(oop1, currentProc);\r\t\t\t}\r\t\t\tlongAtput((oop1 + (BASE_HEADER_SIZE)) + (ProcessSignalingLowSpace << (SHIFT_FOR_WORD)), currentProc);\r\t\t}\r\t\t/* begin forceInterruptCheck */\r\t\tfoo->interruptCheckCounter = -1000;\r\t\tfoo->nextPollTick = 0;\r\t}\r\tif (oopisLessThan((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), byteSize + (BASE_HEADER_SIZE))) {\r\t\terror(\"out of memory\");\r\t}\r\tnewFreeSize = ((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK)) - byteSize;\r\tnewChunk = foo->freeBlock;\r\r\t/* Assume: client will initialize object header of free chunk, so following is not needed: */\r\t/* self setSizeOfFree: newChunk to: byteSize. */\r\r\tfoo->freeBlock += byteSize;\r\t/* begin setSizeOfFree:to: */\r\tlongAtput(foo->freeBlock, (newFreeSize & (ALL_BUT_TYPE_MASK)) | HeaderTypeFree);\r\tfoo->allocationCount += 1;\r\treturn newChunk;\r}\r\r\r/*\tReturn a recycled context or a newly allocated one if none is available for recycling. */\r\rsqInt allocateOrRecycleContext(sqInt needsLarge) {\rregister struct foo * foo = &fum;\r    sqInt cntxt;\r    sqInt valuePointer;\r\r\tif (needsLarge == 0) {\r\t\tif (foo->freeContexts != NilContext) {\r\t\t\tcntxt = foo->freeContexts;\r\t\t\tfoo->freeContexts = longAt((cntxt + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)));\r\t\t\treturn cntxt;\r\t\t}\r\t} else {\r\t\tif (foo->freeLargeContexts != NilContext) {\r\t\t\tcntxt = foo->freeLargeContexts;\r\t\t\tfoo->freeLargeContexts = longAt((cntxt + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)));\r\t\t\treturn cntxt;\r\t\t}\r\t}\r\tif (needsLarge == 0) {\r\t\tcntxt = instantiateContextsizeInBytes(fetchPointerofObject(ClassMethodContext, foo->specialObjectsOop), SMALL_CONTEXT_SIZE);\r\t} else {\r\t\tcntxt = instantiateContextsizeInBytes(fetchPointerofObject(ClassMethodContext, foo->specialObjectsOop), LARGE_CONTEXT_SIZE);\r\t}\r\t/* begin storePointerUnchecked:ofObject:withValue: */\r\tvaluePointer = foo->nilObj;\r\tlongAtput((cntxt + (BASE_HEADER_SIZE)) + (4 << (SHIFT_FOR_WORD)), valuePointer);\r\treturn cntxt;\r}\r\rsqInt argumentCountOf(sqInt methodPointer) {\r\treturn (((usqInt) (longAt((methodPointer + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD))))) >> 25) & 15;\r}\r\r\r/*\tReturn the address of first indexable field of resulting array object, or fail if the instance variable does not contain an indexable bytes or words object. */\r/*\tNote: May be called by translated primitive code. */\r\rvoid * arrayValueOf(sqInt arrayOop) {\r\tif ((!((arrayOop & 1))) && (((arrayOop & 1) == 0) && (isWordsOrBytesNonInt(arrayOop)))) {\r\t\treturn pointerForOop(arrayOop + (BASE_HEADER_SIZE));\r\t}\r\t/* begin primitiveFail */\r\tfoo->successFlag = 0;\r}\r\r\r/*\tReturns an integer object */\r\rsqInt asciiOfCharacter(sqInt characterObj) {\rregister struct foo * foo = &fum;\r    sqInt classOop;\r    sqInt ccIndex;\r    sqInt cl;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop;\r\r\t/* begin assertClassOf:is: */\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\tclassOop = longAt((oop + (BASE_HEADER_SIZE)) + (ClassCharacter << (SHIFT_FOR_WORD)));\r\tif ((characterObj & 1)) {\r\t\tfoo->successFlag = 0;\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(characterObj))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tcl = (longAt(characterObj - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop2 = foo->specialObjectsOop;\r\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tcl = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t}\r\t/* begin success: */\r\tfoo->successFlag = (cl == classOop) && foo->successFlag;\rl1:\t/* end assertClassOf:is: */;\r\tif (foo->successFlag) {\r\t\treturn longAt((characterObj + (BASE_HEADER_SIZE)) + (CharacterValueIndex << (SHIFT_FOR_WORD)));\r\t} else {\r\t\treturn ConstZero;\r\t}\r}\r\r\r/*\tReturn true if the stack is still balanced after executing primitive primIndex with nArgs args. Delta is 'stackPointer - activeContext' which is a relative measure for the stack pointer (so we don't have to relocate it during the primitive) */\r\rsqInt balancedStackafterPrimitivewithArgs(sqInt delta, sqInt primIdx, sqInt nArgs) {\rregister struct foo * foo = &fum;\r\tif ((primIdx >= 81) && (primIdx <= 88)) {\r\t\treturn 1;\r\t}\r\tif (foo->successFlag) {\r\t\treturn ((foo->stackPointer - foo->activeContext) + (nArgs * (BYTES_PER_WORD))) == delta;\r\t}\r\treturn (foo->stackPointer - foo->activeContext) == delta;\r}\r\r\r/*\tAnswer the size of an object memory header word in bytes. */\r\rsqInt baseHeaderSize(void) {\r\treturn BASE_HEADER_SIZE;\r}\r\r\r/*\tIf this object is old, mark it as a root (because a new object \r\tmay be stored into it) */\r\rsqInt beRootIfOld(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt header;\r\r\tif (((((usqInt) oop)) < (((usqInt) foo->youngStart))) && (!((oop & 1)))) {\r\t\t/* begin noteAsRoot:headerLoc: */\r\t\theader = longAt(oop);\r\t\tif ((header & (ROOT_BIT)) == 0) {\r\t\t\tif (foo->rootTableCount < RootTableRedZone) {\r\t\t\t\tfoo->rootTableCount += 1;\r\t\t\t\tfoo->rootTable[foo->rootTableCount] = oop;\r\t\t\t\tlongAtput(oop, header | (ROOT_BIT));\r\t\t\t} else {\r\t\t\t\tif (foo->rootTableCount < RootTableSize) {\r\t\t\t\t\tfoo->rootTableCount += 1;\r\t\t\t\t\tfoo->rootTable[foo->rootTableCount] = oop;\r\t\t\t\t\tlongAtput(oop, header | (ROOT_BIT));\r\t\t\t\t\tfoo->allocationCount = foo->allocationsBetweenGCs + 1;\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t}\r}\r\r\r/*\tRecord that the given oop in the old object area points to an object in the young area when oop may be forwarded. */\r/*\tWarning: No young objects should be recorded as roots. Callers are responsible for ensuring this constraint is not violated. */\r\rsqInt beRootWhileForwarding(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt fwdBlock;\r    sqInt header;\r    sqInt header1;\r    sqInt header2;\r\r\theader = longAt(oop);\r\tif ((header & (MARK_BIT)) != 0) {\r\r\t\t/* This oop is forwarded */\r\r\t\tfwdBlock = (header & (ALL_BUT_MARK_BIT_AND_TYPE_MASK)) << 1;\r\t\tif (DoAssertionChecks) {\r\t\t\t/* begin fwdBlockValidate: */\r\t\t\tif (!(((((usqInt) fwdBlock)) > (((usqInt) foo->endOfMemory))) && (((((usqInt) fwdBlock)) <= (((usqInt) foo->fwdTableNext))) && ((fwdBlock & 3) == 0)))) {\r\t\t\t\terror(\"invalid fwd table entry\");\r\t\t\t}\r\t\t}\r\t\t/* begin noteAsRoot:headerLoc: */\r\t\theader1 = longAt(fwdBlock + (BYTES_PER_WORD));\r\t\tif ((header1 & (ROOT_BIT)) == 0) {\r\t\t\tif (foo->rootTableCount < RootTableRedZone) {\r\t\t\t\tfoo->rootTableCount += 1;\r\t\t\t\tfoo->rootTable[foo->rootTableCount] = oop;\r\t\t\t\tlongAtput(fwdBlock + (BYTES_PER_WORD), header1 | (ROOT_BIT));\r\t\t\t} else {\r\t\t\t\tif (foo->rootTableCount < RootTableSize) {\r\t\t\t\t\tfoo->rootTableCount += 1;\r\t\t\t\t\tfoo->rootTable[foo->rootTableCount] = oop;\r\t\t\t\t\tlongAtput(fwdBlock + (BYTES_PER_WORD), header1 | (ROOT_BIT));\r\t\t\t\t\tfoo->allocationCount = foo->allocationsBetweenGCs + 1;\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t} else {\r\t\t/* begin noteAsRoot:headerLoc: */\r\t\theader2 = longAt(oop);\r\t\tif ((header2 & (ROOT_BIT)) == 0) {\r\t\t\tif (foo->rootTableCount < RootTableRedZone) {\r\t\t\t\tfoo->rootTableCount += 1;\r\t\t\t\tfoo->rootTable[foo->rootTableCount] = oop;\r\t\t\t\tlongAtput(oop, header2 | (ROOT_BIT));\r\t\t\t} else {\r\t\t\t\tif (foo->rootTableCount < RootTableSize) {\r\t\t\t\t\tfoo->rootTableCount += 1;\r\t\t\t\t\tfoo->rootTable[foo->rootTableCount] = oop;\r\t\t\t\t\tlongAtput(oop, header2 | (ROOT_BIT));\r\t\t\t\t\tfoo->allocationCount = foo->allocationsBetweenGCs + 1;\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t}\r}\r\rsqInt becomewith(sqInt array1, sqInt array2) {\r\treturn becomewithtwoWaycopyHash(array1, array2, 1, 1);\r}\r\r\r/*\tAll references to each object in array1 are swapped with all references to the corresponding object in array2. That is, all pointers to one object are replaced with with pointers to the other. The arguments must be arrays of the same length. \r\tReturns true if the primitive succeeds. */\r/*\tImplementation: Uses forwarding blocks to update references as done in compaction. */\r\rsqInt becomewithtwoWaycopyHash(sqInt array1, sqInt array2, sqInt twoWayFlag, sqInt copyHashFlag) {\rregister struct foo * foo = &fum;\r    sqInt fieldOffset;\r    sqInt hdr1;\r    sqInt hdr2;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt fwdBlock;\r    sqInt hdr11;\r    sqInt hdr21;\r    sqInt oop11;\r    sqInt oop21;\r    sqInt contextSize;\r    sqInt fmt;\r    sqInt header;\r    sqInt methodHeader;\r    sqInt sz;\r    sqInt sp;\r    sqInt header1;\r    sqInt type;\r\r\tif (!(((array1 & 1) == 0) && (((((usqInt) (longAt(array1))) >> 8) & 15) == 2))) {\r\t\treturn 0;\r\t}\r\tif (!(((array2 & 1) == 0) && (((((usqInt) (longAt(array2))) >> 8) & 15) == 2))) {\r\t\treturn 0;\r\t}\r\tif (!((lastPointerOf(array1)) == (lastPointerOf(array2)))) {\r\t\treturn 0;\r\t}\r\tif (!(containOnlyOopsand(array1, array2))) {\r\t\treturn 0;\r\t}\r\tif (!(prepareForwardingTableForBecomingwithtwoWay(array1, array2, twoWayFlag))) {\r\t\treturn 0;\r\t}\r\tif (allYoungand(array1, array2)) {\r\t\tmapPointersInObjectsFromto(foo->youngStart, foo->endOfMemory);\r\t} else {\r\t\tmapPointersInObjectsFromto(memory, foo->endOfMemory);\r\t}\r\tif (twoWayFlag) {\r\t\t/* begin restoreHeadersAfterBecoming:with: */\r\t\t/* begin lastPointerOf: */\r\t\theader = longAt(array1);\r\t\tfmt = (((usqInt) header) >> 8) & 15;\r\t\tif (fmt <= 4) {\r\t\t\tif ((fmt == 3) && ((((((usqInt) header) >> 12) & 31) == 13) || ((((((usqInt) header) >> 12) & 31) == 14) || (((((usqInt) header) >> 12) & 31) == 4)))) {\r\t\t\t\t/* begin fetchStackPointerOf: */\r\t\t\t\tsp = longAt((array1 + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tif (!((sp & 1))) {\r\t\t\t\t\tcontextSize = 0;\r\t\t\t\t\tgoto l1;\r\t\t\t\t}\r\t\t\t\tcontextSize = (sp >> 1);\r\t\t\tl1:\t/* end fetchStackPointerOf: */;\r\t\t\t\tfieldOffset = (CtxtTempFrameStart + contextSize) * (BYTES_PER_WORD);\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\t\t/* begin sizeBitsOfSafe: */\r\t\t\theader1 = longAt(array1);\r\t\t\t/* begin rightType: */\r\t\t\tif ((header1 & (SIZE_MASK)) == 0) {\r\t\t\t\ttype = HeaderTypeSizeAndClass;\r\t\t\t\tgoto l3;\r\t\t\t} else {\r\t\t\t\tif ((header1 & CompactClassMask) == 0) {\r\t\t\t\t\ttype = HeaderTypeClass;\r\t\t\t\t\tgoto l3;\r\t\t\t\t} else {\r\t\t\t\t\ttype = HeaderTypeShort;\r\t\t\t\t\tgoto l3;\r\t\t\t\t}\r\t\t\t}\r\t\tl3:\t/* end rightType: */;\r\t\t\tif (type == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(array1 - ((BYTES_PER_WORD) * 2))) & (ALL_BUT_TYPE_MASK);\r\t\t\t\tgoto l4;\r\t\t\t} else {\r\t\t\t\tsz = header1 & (SIZE_MASK);\r\t\t\t\tgoto l4;\r\t\t\t}\r\t\tl4:\t/* end sizeBitsOfSafe: */;\r\t\t\tfieldOffset = sz - (BASE_HEADER_SIZE);\r\t\t\tgoto l2;\r\t\t}\r\t\tif (fmt < 12) {\r\t\t\tfieldOffset = 0;\r\t\t\tgoto l2;\r\t\t}\r\t\tmethodHeader = longAt(array1 + (BASE_HEADER_SIZE));\r\t\tfieldOffset = (((((usqInt) methodHeader) >> 10) & 255) * (BYTES_PER_WORD)) + (BASE_HEADER_SIZE);\r\tl2:\t/* end lastPointerOf: */;\r\t\twhile (fieldOffset >= (BASE_HEADER_SIZE)) {\r\t\t\toop1 = longAt(array1 + fieldOffset);\r\t\t\toop2 = longAt(array2 + fieldOffset);\r\t\t\tif (!(oop1 == oop2)) {\r\t\t\t\trestoreHeaderOf(oop1);\r\t\t\t\trestoreHeaderOf(oop2);\r\t\t\t\thdr1 = longAt(oop1);\r\t\t\t\thdr2 = longAt(oop2);\r\t\t\t\tlongAtput(oop1, (hdr1 & (ALL_BUT_HASH_BITS)) | (hdr2 & HashBits));\r\t\t\t\tlongAtput(oop2, (hdr2 & (ALL_BUT_HASH_BITS)) | (hdr1 & HashBits));\r\t\t\t}\r\t\t\tfieldOffset -= BYTES_PER_WORD;\r\t\t}\r\t} else {\r\t\t/* begin restoreHeadersAfterForwardBecome: */\r\t\tfwdBlock = ((foo->endOfMemory + (BASE_HEADER_SIZE)) + 7) & ((WORD_MASK) - 7);\r\t\tflag(\"Dan\");\r\t\tfwdBlock += (BYTES_PER_WORD) * 4;\r\t\twhile ((((usqInt) fwdBlock)) <= (((usqInt) foo->fwdTableNext))) {\r\t\t\toop11 = longAt(fwdBlock + ((BYTES_PER_WORD) * 2));\r\t\t\toop21 = longAt(fwdBlock);\r\t\t\trestoreHeaderOf(oop11);\r\t\t\tif (copyHashFlag) {\r\t\t\t\thdr11 = longAt(oop11);\r\t\t\t\thdr21 = longAt(oop21);\r\t\t\t\tlongAtput(oop21, (hdr21 & (ALL_BUT_HASH_BITS)) | (hdr11 & HashBits));\r\t\t\t}\r\t\t\tfwdBlock += (BYTES_PER_WORD) * 4;\r\t\t}\r\t}\r\tinitializeMemoryFirstFree(foo->freeBlock);\r\t/* begin forceInterruptCheck */\r\tfoo->interruptCheckCounter = -1000;\r\tfoo->nextPollTick = 0;\r\treturn 1;\r}\r\rsqInt biasToGrow(void) {\rregister struct foo * foo = &fum;\r    usqInt growSize;\r\r\tgrowSize = (((sqInt) (foo->growHeadroom * 3) >> 1)) - ((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK));\r\tif (growSize > 0) {\r\t\tgrowObjectMemory(growSize);\r\t}\r}\r\r\r/*\tconvert true and false (Smalltalk) to true or false(C) */\r\rsqInt booleanValueOf(sqInt obj) {\rregister struct foo * foo = &fum;\r\tif (obj == foo->trueObj) {\r\t\treturn 1;\r\t}\r\tif (obj == foo->falseObj) {\r\t\treturn 0;\r\t}\r\tfoo->successFlag = 0;\r\treturn null;\r}\r\rsqInt byteSizeOf(sqInt oop) {\r    sqInt slots;\r    sqInt header;\r    sqInt sz;\r\r\tflag(\"Dan\");\r\tif ((oop & 1)) {\r\t\treturn 0;\r\t}\r\t/* begin slotSizeOf: */\r\tif ((oop & 1)) {\r\t\tslots = 0;\r\t\tgoto l1;\r\t}\r\t/* begin lengthOf: */\r\theader = longAt(oop);\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz = header & (SIZE_MASK);\r\t}\r\tsz -= header & (SIZE_4_BIT);\r\tif (((((usqInt) header) >> 8) & 15) <= 4) {\r\t\tslots = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tgoto l2;\r\t}\r\tif (((((usqInt) header) >> 8) & 15) < 8) {\r\t\tslots = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> 2;\r\t\tgoto l2;\r\t} else {\r\t\tslots = (sz - (BASE_HEADER_SIZE)) - (((((usqInt) header) >> 8) & 15) & 3);\r\t\tgoto l2;\r\t}\rl2:\t/* end lengthOf:baseHeader:format: */;\rl1:\t/* end slotSizeOf: */;\r\tif (((((usqInt) (longAt(oop))) >> 8) & 15) >= 8) {\r\t\treturn slots;\r\t} else {\r\t\treturn slots * 4;\r\t}\r}\r\r\r/*\tByte-swap the words of all bytes objects in a range of the \r\timage, including Strings, ByteArrays, and CompiledMethods. \r\tThis returns these objects to their original byte ordering \r\tafter blindly byte-swapping the entire image. For compiled \r\tmethods, byte-swap only their bytecodes part. */\r\rsqInt byteSwapByteObjectsFromto(sqInt startOop, sqInt stopAddr) {\rregister struct foo * foo = &fum;\r    sqInt fmt;\r    sqInt methodHeader;\r    sqInt oop;\r    sqInt wordAddr;\r    sqInt stopAddr1;\r    sqInt addr;\r    sqInt stopAddr2;\r    sqInt addr1;\r    sqInt sz;\r    sqInt header;\r\r\toop = startOop;\r\twhile ((((usqInt) oop)) < (((usqInt) stopAddr))) {\r\t\tif (!(((longAt(oop)) & TypeMask) == HeaderTypeFree)) {\r\t\t\tfmt = (((usqInt) (longAt(oop))) >> 8) & 15;\r\t\t\tif (fmt >= 8) {\r\r\t\t\t\t/* oop contains bytes */\r\r\t\t\t\twordAddr = oop + (BASE_HEADER_SIZE);\r\t\t\t\tif (fmt >= 12) {\r\r\t\t\t\t\t/* compiled method; start after methodHeader and literals */\r\r\t\t\t\t\tmethodHeader = longAt(oop + (BASE_HEADER_SIZE));\r\t\t\t\t\twordAddr = (wordAddr + (BYTES_PER_WORD)) + (((((usqInt) methodHeader) >> 10) & 255) * (BYTES_PER_WORD));\r\t\t\t\t}\r\t\t\t\t/* begin reverseBytesFrom:to: */\r\t\t\t\tstopAddr1 = oop + (sizeBitsOf(oop));\r\t\t\t\tflag(\"Dan\");\r\t\t\t\taddr = wordAddr;\r\t\t\t\twhile ((((usqInt) addr)) < (((usqInt) stopAddr1))) {\r\t\t\t\t\tlongAtput(addr, byteSwapped(longAt(addr)));\r\t\t\t\t\taddr += BYTES_PER_WORD;\r\t\t\t\t}\r\t\t\t}\r\t\t\tif ((fmt == 6) && ((BYTES_PER_WORD) == 8)) {\r\r\t\t\t\t/* Object contains 32-bit half-words packed into 64-bit machine words. */\r\r\t\t\t\twordAddr = oop + (BASE_HEADER_SIZE);\r\t\t\t\t/* begin reverseWordsFrom:to: */\r\t\t\t\tstopAddr2 = oop + (sizeBitsOf(oop));\r\t\t\t\taddr1 = wordAddr;\r\t\t\t\twhile ((((usqInt) addr1)) < (((usqInt) stopAddr2))) {\r\t\t\t\t\tlongAtput(addr1, wordSwapped(longAt(addr1)));\r\t\t\t\t\taddr1 += BYTES_PER_WORD;\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t\t/* begin objectAfter: */\r\t\tif (DoAssertionChecks) {\r\t\t\tif ((((usqInt) oop)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t}\r\t\t}\r\t\tif (((longAt(oop)) & TypeMask) == HeaderTypeFree) {\r\t\t\tsz = (longAt(oop)) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader = longAt(oop);\r\t\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tsz = header & (SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\tl1:\t/* end sizeBitsOf: */;\r\t\t}\r\t\toop = (oop + sz) + (foo->headerTypeBytes[(longAt(oop + sz)) & TypeMask]);\r\t}\r}\r\r\r/*\tAnswer the given integer with its bytes in the reverse order. */\r\rsqInt byteSwapped(sqInt w) {\r\t\r# if (BYTES_PER_WORD == 4)  // swap bytes in an object word\r\treturn ((((((usqInt) w >> 24)) & Byte0Mask) + ((((usqInt) w >> 8)) & Byte1Mask)) + ((((usqInt) w << 8)) & Byte2Mask)) + ((((usqInt) w << 24)) & Byte3Mask);\r# else\r\treturn ((((((((((usqInt) w >> 56)) & Byte0Mask) + ((((usqInt) w >> 40)) & Byte1Mask)) + ((((usqInt) w >> 24)) & Byte2Mask)) + ((((usqInt) w >> 8)) & Byte3Mask)) + ((((usqInt) w << 8)) & Byte4Mask)) + ((((usqInt) w << 24)) & Byte5Mask)) + ((((usqInt) w << 40)) & Byte6Mask)) + ((((usqInt) w << 56)) & Byte7Mask);\r# endif  // BYTES_PER_WORD == 4\r\t\r}\r\r\r/*\tAnswer the size of an object memory word in bytes. */\r\rsqInt bytesPerWord(void) {\r\treturn BYTES_PER_WORD;\r}\r\r\r/*\tCall the external plugin function identified. In the VM this is an address, see \tInterpreterSimulator for it's version.  */\r\rsqInt callExternalPrimitive(void *functionID) {\r\tdispatchFunctionPointer(functionID);\r}\r\r\r/*\tExternal call into the interpreter */\r\rEXPORT(sqInt) callInterpreter(void) {\r\tinterpret();\r}\r\r\r/*\tRe-enter the interpreter for executing a callback */\r\rEXPORT(sqInt) callbackEnter(sqInt *callbackID) {\rregister struct foo * foo = &fum;\r    sqInt activeProc;\r    sqInt result;\r    sqInt oop;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r    sqInt oop4;\r    sqInt oop5;\r    sqInt priority;\r    sqInt processList;\r    sqInt processLists;\r    sqInt oop6;\r    sqInt oop11;\r    sqInt lastLink;\r    sqInt oop21;\r\r\tif (foo->primitiveIndex == 0) {\r\t\treturn 0;\r\t}\r\tif (foo->jmpDepth >= foo->jmpMax) {\r\t\treturn 0;\r\t}\r\r\t/* Suspend the currently active process */\r\r\tfoo->jmpDepth += 1;\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\toop4 = foo->specialObjectsOop;\r\toop2 = longAt((oop4 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\toop = longAt((oop2 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\tactiveProc = longAt((oop + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)));\r\tfoo->suspendedCallbacks[foo->jmpDepth] = activeProc;\r\tfoo->suspendedMethods[foo->jmpDepth] = foo->newMethod;\r\ttransferTo(wakeHighestPriority());\r\t/* begin forceInterruptCheck */\r\tfoo->interruptCheckCounter = -1000;\r\tfoo->nextPollTick = 0;\r\tresult = setjmp(foo->jmpBuf[foo->jmpDepth]);\r\tif (result == 0) {\r\t\tcallbackID[0] = foo->jmpDepth;\r\t\tinterpret();\r\t}\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\toop5 = foo->specialObjectsOop;\r\toop3 = longAt((oop5 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\toop1 = longAt((oop3 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\tactiveProc = longAt((oop1 + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)));\r\t/* begin putToSleep: */\r\tpriority = ((longAt((activeProc + (BASE_HEADER_SIZE)) + (PriorityIndex << (SHIFT_FOR_WORD)))) >> 1);\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\toop21 = foo->specialObjectsOop;\r\toop11 = longAt((oop21 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\toop6 = longAt((oop11 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\tprocessLists = longAt((oop6 + (BASE_HEADER_SIZE)) + (ProcessListsIndex << (SHIFT_FOR_WORD)));\r\tprocessList = longAt((processLists + (BASE_HEADER_SIZE)) + ((priority - 1) << (SHIFT_FOR_WORD)));\r\t/* begin addLastLink:toList: */\r\tif ((longAt((processList + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)))) == foo->nilObj) {\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tif ((((usqInt) processList)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(processList, activeProc);\r\t\t}\r\t\tlongAtput((processList + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)), activeProc);\r\t} else {\r\t\tlastLink = longAt((processList + (BASE_HEADER_SIZE)) + (LastLinkIndex << (SHIFT_FOR_WORD)));\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tif ((((usqInt) lastLink)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(lastLink, activeProc);\r\t\t}\r\t\tlongAtput((lastLink + (BASE_HEADER_SIZE)) + (NextLinkIndex << (SHIFT_FOR_WORD)), activeProc);\r\t}\r\t/* begin storePointer:ofObject:withValue: */\r\tif ((((usqInt) processList)) < (((usqInt) foo->youngStart))) {\r\t\tpossibleRootStoreIntovalue(processList, activeProc);\r\t}\r\tlongAtput((processList + (BASE_HEADER_SIZE)) + (LastLinkIndex << (SHIFT_FOR_WORD)), activeProc);\r\t/* begin storePointer:ofObject:withValue: */\r\tif ((((usqInt) activeProc)) < (((usqInt) foo->youngStart))) {\r\t\tpossibleRootStoreIntovalue(activeProc, processList);\r\t}\r\tlongAtput((activeProc + (BASE_HEADER_SIZE)) + (MyListIndex << (SHIFT_FOR_WORD)), processList);\r\tactiveProc = foo->suspendedCallbacks[foo->jmpDepth];\r\r\t/* see comment above */\r\r\tfoo->newMethod = foo->suspendedMethods[foo->jmpDepth];\r\ttransferTo(activeProc);\r\tfoo->jmpDepth -= 1;\r\treturn 1;\r}\r\r\r/*\tLeave from a previous callback */\r/*\tFor now, do not allow a callback unless we're in a primitiveResponse */\r\rEXPORT(sqInt) callbackLeave(sqInt cbID) {\rregister struct foo * foo = &fum;\r\tif (foo->primitiveIndex == 0) {\r\t\treturn 0;\r\t}\r\tif (!(cbID == foo->jmpDepth)) {\r\t\treturn 0;\r\t}\r\tif (cbID < 1) {\r\t\treturn 0;\r\t}\r\tlongjmp(foo->jmpBuf[foo->jmpDepth], 1);\r}\r\r\r/*\tChange the class of the receiver into the class specified by the argument given that the format of the receiver matches the format of the argument. Fail if receiver or argument are SmallIntegers, or the receiver is an instance of a compact class and the argument isn't, or when the argument's class is compact and the receiver isn't, or when the format of the receiver is different from the format of the argument's class, or when the arguments class is fixed and the receiver's size differs from the size that an instance of the argument's class should have. */\r/*\tCheck what the format of the class says */\r\rsqInt changeClassOfto(sqInt rcvr, sqInt argClass) {\rregister struct foo * foo = &fum;\r    sqInt argFormat;\r    sqInt byteSize;\r    sqInt ccIndex;\r    sqInt classHdr;\r    sqInt rcvrFormat;\r    sqInt sizeHiBits;\r    sqInt i;\r    sqInt i1;\r\r\r\t/* Low 2 bits are 0 */\r\t/* Compute the size of instances of the class (used for fixed field classes only) */\r\r\tclassHdr = (longAt((argClass + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1;\r\tsizeHiBits = ((usqInt) (classHdr & 393216)) >> 9;\r\tclassHdr = classHdr & 131071;\r\r\t/* size in bytes -- low 2 bits are 0 */\r\t/* Check the receiver's format against that of the class */\r\r\tbyteSize = (classHdr & (SIZE_MASK)) + sizeHiBits;\r\targFormat = (((usqInt) classHdr) >> 8) & 15;\r\trcvrFormat = (((usqInt) (longAt(rcvr))) >> 8) & 15;\r\tif (!(argFormat == rcvrFormat)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif (argFormat < 2) {\r\t\tif (!((byteSize - (BASE_HEADER_SIZE)) == (byteSizeOf(rcvr)))) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t}\r\tif (((longAt(rcvr)) & TypeMask) == HeaderTypeShort) {\r\r\t\t/* Compact classes. Check if the arg's class is compact and exchange ccIndex */\r\r\t\tccIndex = classHdr & CompactClassMask;\r\t\tif (ccIndex == 0) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t\tlongAtput(rcvr, ((longAt(rcvr)) & (~CompactClassMask)) | ccIndex);\r\t} else {\r\t\tlongAtput(rcvr - (BASE_HEADER_SIZE), argClass | ((longAt(rcvr)) & TypeMask));\r\t\tif ((((usqInt) rcvr)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(rcvr, argClass);\r\t\t}\r\t}\r\t/* begin flushMethodCache */\r\tfor (i = 1; i <= MethodCacheSize; i += 1) {\r\t\tfoo->methodCache[i] = 0;\r\t}\r\t/* begin flushAtCache */\r\tfor (i1 = 1; i1 <= AtCacheTotalSize; i1 += 1) {\r\t\tfoo->atCache[i1] = 0;\r\t}\r}\r\r\r/*\tArg must lie in range 0-255! */\r\rsqInt characterForAscii(sqInt ascii) {\r    sqInt oop;\r    sqInt oop1;\r\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\toop1 = foo->specialObjectsOop;\r\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (CharacterTable << (SHIFT_FOR_WORD)));\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ascii << (SHIFT_FOR_WORD)));\r}\r\rsqInt characterTable(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (CharacterTable << (SHIFT_FOR_WORD)));\r}\r\r\r/*\tCheck for possible interrupts and handle one if necessary. */\r\rsqInt checkForInterrupts(void) {\rregister struct foo * foo = &fum;\r    sqInt now;\r    sqInt sema;\r    sqInt oop;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r    sqInt i;\r    sqInt index;\r    sqInt sema1;\r    sqInt xArray;\r    sqInt xSize;\r    sqInt oop4;\r\r\r\t/* Mask so same wrapping as primitiveMillisecondClock */\r\r\tnow = (ioMSecs()) & MillisecondClockMask;\r\tif (!(foo->interruptCheckCounter < -100)) {\r\t\tif ((now - foo->lastTick) < foo->interruptChecksEveryNms) {\r\r\t\t\t/* don't play with the feedback if we forced a check. It only makes life difficult */\r\t\t\t/* wrapping is not a concern, it'll get caught quickly  \r\t\t\t\tenough. This clause is trying to keep a reasonable  \r\t\t\t\tguess of how many times per \tinterruptChecksEveryNms we are calling  \r\t\t\t\tquickCheckForInterrupts. Not sure how effective it really is. */\r\r\t\t\tfoo->interruptCheckCounterFeedBackReset += 10;\r\t\t} else {\r\t\t\tif (foo->interruptCheckCounterFeedBackReset <= 1000) {\r\t\t\t\tfoo->interruptCheckCounterFeedBackReset = 1000;\r\t\t\t} else {\r\t\t\t\tfoo->interruptCheckCounterFeedBackReset -= 12;\r\t\t\t}\r\t\t}\r\t}\r\tfoo->interruptCheckCounter = foo->interruptCheckCounterFeedBackReset;\r\tif (foo->signalLowSpace) {\r\r\t\t/* reset flag */\r\r\t\tfoo->signalLowSpace = 0;\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop = foo->specialObjectsOop;\r\t\tsema = longAt((oop + (BASE_HEADER_SIZE)) + (TheLowSpaceSemaphore << (SHIFT_FOR_WORD)));\r\t\tif (!(sema == foo->nilObj)) {\r\t\t\tsynchronousSignal(sema);\r\t\t}\r\t}\r\tif (now < foo->lastTick) {\r\r\t\t/* millisecond clock wrapped so correct the nextPollTick */\r\r\t\tfoo->nextPollTick = (foo->nextPollTick - MillisecondClockMask) - 1;\r\t}\r\tif (now >= foo->nextPollTick) {\r\t\tioProcessEvents();\r\r\t\t/* msecs to wait before next call to ioProcessEvents.  \r\t\t\tNote that strictly speaking we might need to update  \r\t\t\t'now' at this point since ioProcessEvents could take a  \r\t\t\tvery long time on some platforms */\r\r\t\tfoo->nextPollTick = now + 200;\r\t}\r\tif (foo->interruptPending) {\r\r\t\t/* reset interrupt flag */\r\r\t\tfoo->interruptPending = 0;\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tsema = longAt((oop1 + (BASE_HEADER_SIZE)) + (TheInterruptSemaphore << (SHIFT_FOR_WORD)));\r\t\tif (!(sema == foo->nilObj)) {\r\t\t\tsynchronousSignal(sema);\r\t\t}\r\t}\r\tif (foo->nextWakeupTick != 0) {\r\t\tif (now < foo->lastTick) {\r\r\t\t\t/* the clock has wrapped. Subtract the wrap  \r\t\t\t\t\tinterval from nextWakeupTick - this might just  \r\t\t\t\t\tpossibly result in 0. Since this is used as a flag  \r\t\t\t\t\tvalue for 'no timer' we do the 0 check above */\r\r\t\t\tfoo->nextWakeupTick = (foo->nextWakeupTick - MillisecondClockMask) - 1;\r\t\t}\r\t\tif (now >= foo->nextWakeupTick) {\r\r\t\t\t/* set timer interrupt to 0 for 'no timer' */\r\r\t\t\tfoo->nextWakeupTick = 0;\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop2 = foo->specialObjectsOop;\r\t\t\tsema = longAt((oop2 + (BASE_HEADER_SIZE)) + (TheTimerSemaphore << (SHIFT_FOR_WORD)));\r\t\t\tif (!(sema == foo->nilObj)) {\r\t\t\t\tsynchronousSignal(sema);\r\t\t\t}\r\t\t}\r\t}\r\tif (foo->pendingFinalizationSignals > 0) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\tsema = longAt((oop3 + (BASE_HEADER_SIZE)) + (TheFinalizationSemaphore << (SHIFT_FOR_WORD)));\r\t\tif ((fetchClassOf(sema)) == (fetchPointerofObject(ClassSemaphore, foo->specialObjectsOop))) {\r\t\t\tsynchronousSignal(sema);\r\t\t}\r\t\tfoo->pendingFinalizationSignals = 0;\r\t}\r\tif ((foo->semaphoresToSignalCountA > 0) || (foo->semaphoresToSignalCountB > 0)) {\r\t\t/* begin signalExternalSemaphores */\r\t\tfoo->semaphoresUseBufferA = !foo->semaphoresUseBufferA;\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop4 = foo->specialObjectsOop;\r\t\txArray = longAt((oop4 + (BASE_HEADER_SIZE)) + (ExternalObjectsArray << (SHIFT_FOR_WORD)));\r\t\txSize = stSizeOf(xArray);\r\t\tif (foo->semaphoresUseBufferA) {\r\t\t\tfor (i = 1; i <= foo->semaphoresToSignalCountB; i += 1) {\r\t\t\t\tindex = foo->semaphoresToSignalB[i];\r\t\t\t\tif (index <= xSize) {\r\t\t\t\t\tsema1 = longAt((xArray + (BASE_HEADER_SIZE)) + ((index - 1) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tif ((fetchClassOf(sema1)) == (fetchPointerofObject(ClassSemaphore, foo->specialObjectsOop))) {\r\t\t\t\t\t\tsynchronousSignal(sema1);\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t}\r\t\t\tfoo->semaphoresToSignalCountB = 0;\r\t\t} else {\r\t\t\tfor (i = 1; i <= foo->semaphoresToSignalCountA; i += 1) {\r\t\t\t\tindex = foo->semaphoresToSignalA[i];\r\t\t\t\tif (index <= xSize) {\r\t\t\t\t\tsema1 = longAt((xArray + (BASE_HEADER_SIZE)) + ((index - 1) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tif ((fetchClassOf(sema1)) == (fetchPointerofObject(ClassSemaphore, foo->specialObjectsOop))) {\r\t\t\t\t\t\tsynchronousSignal(sema1);\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t}\r\t\t\tfoo->semaphoresToSignalCountA = 0;\r\t\t}\r\t}\r\tfoo->lastTick = now;\r}\r\r\r/*\tRead and verify the image file version number and return true if the the given image file needs to be byte-swapped. As a side effect, position the file stream just after the version number of the image header. This code prints a warning and does a hard-exit if it cannot find a valid version number. */\r/*\tThis code is based on C code by Ian Piumarta. */\r\rsqInt checkImageVersionFromstartingAt(sqImageFile  f, squeakFileOffsetType  imageOffset) {\r    sqInt firstVersion;\r\r\tsqImageFileSeek(f, imageOffset);\r\timageFormatInitialVersion = firstVersion = getLongFromFileswap(f, 0);\r\tif (readableFormat(imageFormatInitialVersion)) {\r\t\treturn 0;\r\t}\r\tsqImageFileSeek(f, imageOffset);\r\timageFormatInitialVersion = getLongFromFileswap(f, 1);\r\tif (readableFormat(imageFormatInitialVersion)) {\r\t\treturn 1;\r\t}\r\tif (imageOffset == 0) {\r\t\tsqImageFileSeek(f, 512);\r\t\timageFormatInitialVersion = getLongFromFileswap(f, 0);\r\t\tif (readableFormat(imageFormatInitialVersion)) {\r\t\t\treturn 0;\r\t\t}\r\t\tsqImageFileSeek(f, 512);\r\t\timageFormatInitialVersion = getLongFromFileswap(f, 1);\r\t\tif (readableFormat(imageFormatInitialVersion)) {\r\t\t\treturn 1;\r\t\t}\r\t}\r\tprint(\"This interpreter (vers. \");\r\tprintNum(imageFormatVersionNumber);\r\tprint(\") cannot read image file (vers. \");\r\tprintNum(firstVersion);\r\tprint(\").\");\r\t/* begin cr */\r\tprintf(\"\\n\");\r\tprint(\"Press CR to quit...\");\r\tgetchar();\r\tioExit();\r}\r\r\r/*\tNote: May be called by translated primitive code. */\r\rsqInt checkedIntegerValueOf(sqInt intOop) {\r\tif ((intOop & 1)) {\r\t\treturn (intOop >> 1);\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn 0;\r\t}\r}\r\r\r/*\tAssumes zero-based array indexing. For testing in Smalltalk, this method should be overridden in a subclass. */\r\rsqInt checkedLongAt(sqInt byteAddress) {\rregister struct foo * foo = &fum;\r\t/* begin checkAddress: */\r\tif ((((usqInt) byteAddress)) < (((usqInt) memory))) {\r\t\terror(\"bad address: negative\");\r\t}\r\tif ((((usqInt) byteAddress)) >= (((usqInt) foo->memoryLimit))) {\r\t\terror(\"bad address: past end of heap\");\r\t}\r\t/* begin checkAddress: */\r\tif ((((usqInt) (byteAddress + 3))) < (((usqInt) memory))) {\r\t\terror(\"bad address: negative\");\r\t}\r\tif ((((usqInt) (byteAddress + 3))) >= (((usqInt) foo->memoryLimit))) {\r\t\terror(\"bad address: past end of heap\");\r\t}\r\treturn longAt(byteAddress);\r}\r\rsqInt classAlien(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassAlien << (SHIFT_FOR_WORD)));\r}\r\rsqInt classArray(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassArray << (SHIFT_FOR_WORD)));\r}\r\rsqInt classBitmap(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassBitmap << (SHIFT_FOR_WORD)));\r}\r\rsqInt classByteArray(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassByteArray << (SHIFT_FOR_WORD)));\r}\r\rsqInt classCharacter(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassCharacter << (SHIFT_FOR_WORD)));\r}\r\rsqInt classExternalAddress(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassExternalAddress << (SHIFT_FOR_WORD)));\r}\r\rsqInt classExternalData(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassExternalData << (SHIFT_FOR_WORD)));\r}\r\rsqInt classExternalFunction(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassExternalFunction << (SHIFT_FOR_WORD)));\r}\r\rsqInt classExternalLibrary(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassExternalLibrary << (SHIFT_FOR_WORD)));\r}\r\rsqInt classExternalStructure(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassExternalStructure << (SHIFT_FOR_WORD)));\r}\r\rsqInt classFloat(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassFloat << (SHIFT_FOR_WORD)));\r}\r\rsqInt classLargeNegativeInteger(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassLargeNegativeInteger << (SHIFT_FOR_WORD)));\r}\r\rsqInt classLargePositiveInteger(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassLargePositiveInteger << (SHIFT_FOR_WORD)));\r}\r\r\r/*\tCheck if aClass's name is className */\r\rsqInt classNameOfIs(sqInt aClass, char *className) {\r    sqInt i;\r    sqInt length;\r    sqInt name;\r    char *srcName;\r\r\tif ((lengthOf(aClass)) <= 6) {\r\t\treturn 0;\r\t}\r\tname = longAt((aClass + (BASE_HEADER_SIZE)) + (6 << (SHIFT_FOR_WORD)));\r\tif (!(((name & 1) == 0) && (((((usqInt) (longAt(name))) >> 8) & 15) >= 8))) {\r\t\treturn 0;\r\t}\r\tlength = stSizeOf(name);\r\tsrcName = ((char *) (arrayValueOf(name)));\r\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\tif (!((srcName[i]) == (className[i]))) {\r\t\t\treturn 0;\r\t\t}\r\t}\r\treturn (className[length]) == 0;\r}\r\rsqInt classPoint(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassPoint << (SHIFT_FOR_WORD)));\r}\r\rsqInt classSemaphore(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassSemaphore << (SHIFT_FOR_WORD)));\r}\r\rsqInt classSmallInteger(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r}\r\rsqInt classString(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassString << (SHIFT_FOR_WORD)));\r}\r\rsqInt classUnsafeAlien(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (ClassUnsafeAlien << (SHIFT_FOR_WORD)));\r}\r\r\r/*\tReturn a shallow copy of the given object. May cause GC */\r/*\tAssume: Oop is a real object, not a small integer. */\r\rsqInt clone(sqInt oop) {\rregister struct foo * foo = &fum;\r    usqInt bytes;\r    sqInt extraHdrBytes;\r    usqInt fromIndex;\r    sqInt hash;\r    sqInt header;\r    usqInt lastFrom;\r    sqInt newChunk;\r    sqInt newOop;\r    sqInt remappedOop;\r    sqInt toIndex;\r    sqInt header1;\r    sqInt enoughSpace;\r    sqInt newChunk1;\r    sqInt newFreeSize;\r    usqInt minFree;\r    sqInt oop1;\r    sqInt currentProc;\r    sqInt lastSavedProcess;\r    sqInt sched;\r    sqInt oop4;\r    sqInt oop11;\r    sqInt oop2;\r    sqInt oop3;\r\r\textraHdrBytes = foo->headerTypeBytes[(longAt(oop)) & TypeMask];\r\t/* begin sizeBitsOf: */\r\theader1 = longAt(oop);\r\tif ((header1 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tbytes = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\tbytes = header1 & (SIZE_MASK);\r\t\tgoto l1;\r\t}\rl1:\t/* end sizeBitsOf: */;\r\r\t/* allocate space for the copy, remapping oop in case of a GC */\r\r\tbytes += extraHdrBytes;\r\t/* begin pushRemappableOop: */\r\tfoo->remapBuffer[(foo->remapBufferCount += 1)] = oop;\r\tif (!(sufficientSpaceToAllocate(2500 + bytes))) {\r\t\treturn 0;\r\t}\r\t/* begin allocateChunk: */\r\tif (foo->allocationCount >= foo->allocationsBetweenGCs) {\r\t\tincrementalGC();\r\t}\r\t/* begin sufficientSpaceToAllocate: */\r\tminFree = (foo->lowSpaceThreshold + bytes) + (BASE_HEADER_SIZE);\r\tif (oopisGreaterThanOrEqualTo((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), minFree)) {\r\t\tenoughSpace = 1;\r\t\tgoto l2;\r\t} else {\r\t\tenoughSpace = sufficientSpaceAfterGC(minFree);\r\t\tgoto l2;\r\t}\rl2:\t/* end sufficientSpaceToAllocate: */;\r\tif (!(enoughSpace)) {\r\t\tfoo->signalLowSpace = 1;\r\t\tfoo->lowSpaceThreshold = 0;\r\t\t/* begin saveProcessSignalingLowSpace */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop2 = foo->specialObjectsOop;\r\t\tlastSavedProcess = longAt((oop2 + (BASE_HEADER_SIZE)) + (ProcessSignalingLowSpace << (SHIFT_FOR_WORD)));\r\t\tif (lastSavedProcess == foo->nilObj) {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop3 = foo->specialObjectsOop;\r\t\t\toop4 = longAt((oop3 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\t\t\tsched = longAt((oop4 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\tcurrentProc = longAt((sched + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)));\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\toop11 = foo->specialObjectsOop;\r\t\t\tif ((((usqInt) oop11)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(oop11, currentProc);\r\t\t\t}\r\t\t\tlongAtput((oop11 + (BASE_HEADER_SIZE)) + (ProcessSignalingLowSpace << (SHIFT_FOR_WORD)), currentProc);\r\t\t}\r\t\t/* begin forceInterruptCheck */\r\t\tfoo->interruptCheckCounter = -1000;\r\t\tfoo->nextPollTick = 0;\r\t}\r\tif (oopisLessThan((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), bytes + (BASE_HEADER_SIZE))) {\r\t\terror(\"out of memory\");\r\t}\r\tnewFreeSize = ((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK)) - bytes;\r\tnewChunk1 = foo->freeBlock;\r\tfoo->freeBlock += bytes;\r\t/* begin setSizeOfFree:to: */\r\tlongAtput(foo->freeBlock, (newFreeSize & (ALL_BUT_TYPE_MASK)) | HeaderTypeFree);\r\tfoo->allocationCount += 1;\r\tnewChunk = newChunk1;\r\t/* begin popRemappableOop */\r\toop1 = foo->remapBuffer[foo->remapBufferCount];\r\tfoo->remapBufferCount -= 1;\r\tremappedOop = oop1;\r\r\t/* loop below uses pre-increment */\r\r\ttoIndex = newChunk - (BYTES_PER_WORD);\r\tfromIndex = (remappedOop - extraHdrBytes) - (BYTES_PER_WORD);\r\tlastFrom = fromIndex + bytes;\r\twhile (fromIndex < lastFrom) {\r\t\tlongAtput(toIndex += BYTES_PER_WORD, longAt(fromIndex += BYTES_PER_WORD));\r\t}\r\r\t/* convert from chunk to oop */\r\t/* fix base header: compute new hash and clear Mark and Root bits */\r\r\tnewOop = newChunk + extraHdrBytes;\r\t/* begin newObjectHash */\r\tfoo->lastHash = (13849 + (27181 * foo->lastHash)) & 65535;\r\thash = foo->lastHash;\r\r\t/* use old ccIndex, format, size, and header-type fields */\r\r\theader = (longAt(newOop)) & 131071;\r\theader = header | ((hash << 17) & 536739840);\r\tlongAtput(newOop, header);\r\treturn newOop;\r}\r\r\r/*\tThis code is called if the receiver responds primitively to at:.\r\tIf this is so, it will be installed in the atCache so that subsequent calls of at:\r\tor next may be handled immediately in bytecode primitive routines. */\r\rsqInt commonAt(sqInt stringy) {\rregister struct foo * foo = &fum;\r    sqInt atIx;\r    sqInt index;\r    sqInt rcvr;\r    sqInt result;\r    sqInt sp;\r    sqInt oop;\r    sqInt sp1;\r    sqInt oop1;\r\r\r\t/* Sets successFlag */\r\r\tindex = positive32BitValueOf(longAt(foo->stackPointer));\r\trcvr = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\tif (!(foo->successFlag && (!((rcvr & 1))))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif ((foo->messageSelector == (fetchPointerofObject(16 * 2, fetchPointerofObject(SpecialSelectors, foo->specialObjectsOop)))) && (foo->lkupClass == (fetchClassOfNonInt(rcvr)))) {\r\r\t\t/* OK -- look in the at-cache */\r\t\t/* Index into atCache = 4N, for N = 0 ... 7 */\r\r\t\tatIx = rcvr & AtCacheMask;\r\t\tif (!((foo->atCache[atIx + AtCacheOop]) == rcvr)) {\r\t\t\tinstallinAtCacheatstring(rcvr, foo->atCache, atIx, stringy);\r\t\t}\r\t\tif (foo->successFlag) {\r\t\t\tresult = commonVariableatcacheIndex(rcvr, index, atIx);\r\t\t}\r\t\tif (foo->successFlag) {\r\t\t\t/* begin pop:thenPush: */\r\t\t\tlongAtput(sp = foo->stackPointer - (((foo->argumentCount + 1) - 1) * (BYTES_PER_WORD)), result);\r\t\t\tfoo->stackPointer = sp;\r\t\t\treturn null;\r\t\t}\r\t}\r\tfoo->successFlag = 1;\r\tresult = stObjectat(rcvr, index);\r\tif (foo->successFlag) {\r\t\tif (stringy) {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop1 = foo->specialObjectsOop;\r\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (CharacterTable << (SHIFT_FOR_WORD)));\r\t\t\tresult = longAt((oop + (BASE_HEADER_SIZE)) + (((result >> 1)) << (SHIFT_FOR_WORD)));\r\t\t}\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp1 = foo->stackPointer - (((foo->argumentCount + 1) - 1) * (BYTES_PER_WORD)), result);\r\t\tfoo->stackPointer = sp1;\r\t\treturn null;\r\t}\r}\r\r\r/*\tThis code is called if the receiver responds primitively to at:Put:.\r\tIf this is so, it will be installed in the atPutCache so that subsequent calls of at:\r\tor  next may be handled immediately in bytecode primitive routines. */\r\rsqInt commonAtPut(sqInt stringy) {\rregister struct foo * foo = &fum;\r    sqInt atIx;\r    sqInt index;\r    sqInt rcvr;\r    sqInt value;\r    sqInt sp;\r    sqInt sp1;\r    sqInt fixedFields;\r    sqInt fmt;\r    sqInt stSize;\r    sqInt valToPut;\r\r\tvalue = longAt(foo->stackPointer);\r\r\t/* Sets successFlag */\r\r\tindex = positive32BitValueOf(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))));\r\trcvr = longAt(foo->stackPointer - (2 * (BYTES_PER_WORD)));\r\tif (!(foo->successFlag && (!((rcvr & 1))))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif ((foo->messageSelector == (fetchPointerofObject(17 * 2, fetchPointerofObject(SpecialSelectors, foo->specialObjectsOop)))) && (foo->lkupClass == (fetchClassOfNonInt(rcvr)))) {\r\r\t\t/* OK -- look in the at-cache */\r\t\t/* Index into atPutCache */\r\r\t\tatIx = (rcvr & AtCacheMask) + AtPutBase;\r\t\tif (!((foo->atCache[atIx + AtCacheOop]) == rcvr)) {\r\t\t\tinstallinAtCacheatstring(rcvr, foo->atCache, atIx, stringy);\r\t\t}\r\t\tif (foo->successFlag) {\r\t\t\t/* begin commonVariable:at:put:cacheIndex: */\r\t\t\tstSize = foo->atCache[atIx + AtCacheSize];\r\t\t\tif (((((usqInt) index)) >= (((usqInt) 1))) && ((((usqInt) index)) <= (((usqInt) stSize)))) {\r\t\t\t\tfmt = foo->atCache[atIx + AtCacheFmt];\r\t\t\t\tif (fmt <= 4) {\r\t\t\t\t\tfixedFields = foo->atCache[atIx + AtCacheFixedFields];\r\t\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\t\tif ((((usqInt) rcvr)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\tpossibleRootStoreIntovalue(rcvr, value);\r\t\t\t\t\t}\r\t\t\t\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (((index + fixedFields) - 1) << (SHIFT_FOR_WORD)), value);\r\t\t\t\t\tgoto l1;\r\t\t\t\t}\r\t\t\t\tif (fmt < 8) {\r\t\t\t\t\tvalToPut = positive32BitValueOf(value);\r\t\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t\tlong32Atput((rcvr + (BASE_HEADER_SIZE)) + ((index - 1) << 2), valToPut);\r\t\t\t\t\t}\r\t\t\t\t\tgoto l1;\r\t\t\t\t}\r\t\t\t\tif (fmt >= 16) {\r\t\t\t\t\tvalToPut = asciiOfCharacter(value);\r\t\t\t\t\tif (!(foo->successFlag)) {\r\t\t\t\t\t\tgoto l1;\r\t\t\t\t\t}\r\t\t\t\t} else {\r\t\t\t\t\tvalToPut = value;\r\t\t\t\t}\r\t\t\t\tif ((valToPut & 1)) {\r\t\t\t\t\tvalToPut = (valToPut >> 1);\r\t\t\t\t\tif (!((valToPut >= 0) && (valToPut <= 255))) {\r\t\t\t\t\t\t/* begin primitiveFail */\r\t\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t\t\tgoto l1;\r\t\t\t\t\t}\r\t\t\t\t\tbyteAtput((rcvr + (BASE_HEADER_SIZE)) + (index - 1), valToPut);\r\t\t\t\t\tgoto l1;\r\t\t\t\t}\r\t\t\t}\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\tl1:\t/* end commonVariable:at:put:cacheIndex: */;\r\t\t}\r\t\tif (foo->successFlag) {\r\t\t\t/* begin pop:thenPush: */\r\t\t\tlongAtput(sp = foo->stackPointer - (((foo->argumentCount + 1) - 1) * (BYTES_PER_WORD)), value);\r\t\t\tfoo->stackPointer = sp;\r\t\t\treturn null;\r\t\t}\r\t}\r\tfoo->successFlag = 1;\r\tif (stringy) {\r\t\tstObjectatput(rcvr, index, asciiOfCharacter(value));\r\t} else {\r\t\tstObjectatput(rcvr, index, value);\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp1 = foo->stackPointer - (((foo->argumentCount + 1) - 1) * (BYTES_PER_WORD)), value);\r\t\tfoo->stackPointer = sp1;\r\t\treturn null;\r\t}\r}\r\r\r/*\tThis code assumes the receiver has been identified at location atIx in the atCache. */\r\rsqInt commonVariableatcacheIndex(sqInt rcvr, sqInt index, sqInt atIx) {\rregister struct foo * foo = &fum;\r    sqInt fixedFields;\r    sqInt fmt;\r    sqInt result;\r    sqInt stSize;\r    sqInt oop;\r    sqInt oop1;\r\r\tstSize = foo->atCache[atIx + AtCacheSize];\r\tif (((((usqInt) index)) >= (((usqInt) 1))) && ((((usqInt) index)) <= (((usqInt) stSize)))) {\r\t\tfmt = foo->atCache[atIx + AtCacheFmt];\r\t\tif (fmt <= 4) {\r\t\t\tfixedFields = foo->atCache[atIx + AtCacheFixedFields];\r\t\t\treturn longAt((rcvr + (BASE_HEADER_SIZE)) + (((index + fixedFields) - 1) << (SHIFT_FOR_WORD)));\r\t\t}\r\t\tif (fmt < 8) {\r\r\t\t\t/* Bitmap */\r\r\t\t\tresult = long32At((rcvr + (BASE_HEADER_SIZE)) + ((index - 1) << 2));\r\t\t\tresult = positive32BitIntegerFor(result);\r\t\t\treturn result;\r\t\t}\r\t\tif (fmt >= 16) {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop1 = foo->specialObjectsOop;\r\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (CharacterTable << (SHIFT_FOR_WORD)));\r\t\t\treturn longAt((oop + (BASE_HEADER_SIZE)) + ((byteAt((rcvr + (BASE_HEADER_SIZE)) + (index - 1))) << (SHIFT_FOR_WORD)));\r\t\t} else {\r\t\t\treturn (((byteAt((rcvr + (BASE_HEADER_SIZE)) + (index - 1))) << 1) | 1);\r\t\t}\r\t}\r\t/* begin primitiveFail */\r\tfoo->successFlag = 0;\r}\r\r\r/*\tMay set success to false */\r/*\tFirst compare two ST integers... */\r\rsqInt compare31or32Bitsequal(sqInt obj1, sqInt obj2) {\r\tif (((obj1 & 1)) && ((obj2 & 1))) {\r\t\treturn obj1 == obj2;\r\t}\r\treturn (positive32BitValueOf(obj1)) == (positive32BitValueOf(obj2));\r}\r\rsqInt compilerCreateActualMessagestoringArgs(sqInt aMessage, sqInt argArray) {\r\treturn compilerHooks[14](aMessage, argArray);\r}\r\rsqInt compilerFlushCache(sqInt aCompiledMethod) {\r\treturn compilerHooks[2](aCompiledMethod);\r}\r\rsqInt compilerMapFromto(sqInt memStart, sqInt memEnd) {\r\treturn compilerHooks[4](memStart, memEnd);\r}\r\rsqInt compilerMark(void) {\r\treturn compilerHooks[9]();\r}\r\rsqInt compilerPostGC(void) {\r\treturn compilerHooks[5]();\r}\r\rsqInt compilerPostSnapshot(void) {\r\treturn compilerHooks[8]();\r}\r\rsqInt compilerPreGC(sqInt fullGCFlag) {\r\treturn compilerHooks[3](fullGCFlag);\r}\r\rsqInt compilerPreSnapshot(void) {\r\treturn compilerHooks[7]();\r}\r\rsqInt compilerProcessChange(void) {\r\treturn compilerHooks[6]();\r}\r\rsqInt compilerProcessChangeto(sqInt oldProc, sqInt newProc) {\r\treturn compilerHooks[6](oldProc, newProc);\r}\r\rsqInt compilerTranslateMethod(void) {\r\treturn compilerHooks[1]();\r}\r\r\r/*\tReturn true if neither array contains a small integer. You \r\tcan't become: integers! */\r\rsqInt containOnlyOopsand(sqInt array1, sqInt array2) {\r    sqInt fieldOffset;\r    sqInt contextSize;\r    sqInt fmt;\r    sqInt header;\r    sqInt methodHeader;\r    sqInt sz;\r    sqInt sp;\r    sqInt header1;\r    sqInt type;\r\r\t/* begin lastPointerOf: */\r\theader = longAt(array1);\r\tfmt = (((usqInt) header) >> 8) & 15;\r\tif (fmt <= 4) {\r\t\tif ((fmt == 3) && ((((((usqInt) header) >> 12) & 31) == 13) || ((((((usqInt) header) >> 12) & 31) == 14) || (((((usqInt) header) >> 12) & 31) == 4)))) {\r\t\t\t/* begin fetchStackPointerOf: */\r\t\t\tsp = longAt((array1 + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)));\r\t\t\tif (!((sp & 1))) {\r\t\t\t\tcontextSize = 0;\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t\tcontextSize = (sp >> 1);\r\t\tl1:\t/* end fetchStackPointerOf: */;\r\t\t\tfieldOffset = (CtxtTempFrameStart + contextSize) * (BYTES_PER_WORD);\r\t\t\tgoto l2;\r\t\t}\r\t\t/* begin sizeBitsOfSafe: */\r\t\theader1 = longAt(array1);\r\t\t/* begin rightType: */\r\t\tif ((header1 & (SIZE_MASK)) == 0) {\r\t\t\ttype = HeaderTypeSizeAndClass;\r\t\t\tgoto l3;\r\t\t} else {\r\t\t\tif ((header1 & CompactClassMask) == 0) {\r\t\t\t\ttype = HeaderTypeClass;\r\t\t\t\tgoto l3;\r\t\t\t} else {\r\t\t\t\ttype = HeaderTypeShort;\r\t\t\t\tgoto l3;\r\t\t\t}\r\t\t}\r\tl3:\t/* end rightType: */;\r\t\tif (type == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(array1 - ((BYTES_PER_WORD) * 2))) & (ALL_BUT_TYPE_MASK);\r\t\t\tgoto l4;\r\t\t} else {\r\t\t\tsz = header1 & (SIZE_MASK);\r\t\t\tgoto l4;\r\t\t}\r\tl4:\t/* end sizeBitsOfSafe: */;\r\t\tfieldOffset = sz - (BASE_HEADER_SIZE);\r\t\tgoto l2;\r\t}\r\tif (fmt < 12) {\r\t\tfieldOffset = 0;\r\t\tgoto l2;\r\t}\r\tmethodHeader = longAt(array1 + (BASE_HEADER_SIZE));\r\tfieldOffset = (((((usqInt) methodHeader) >> 10) & 255) * (BYTES_PER_WORD)) + (BASE_HEADER_SIZE);\rl2:\t/* end lastPointerOf: */;\r\twhile (fieldOffset >= (BASE_HEADER_SIZE)) {\r\t\tif (((longAt(array1 + fieldOffset)) & 1)) {\r\t\t\treturn 0;\r\t\t}\r\t\tif (((longAt(array2 + fieldOffset)) & 1)) {\r\t\t\treturn 0;\r\t\t}\r\t\tfieldOffset -= BYTES_PER_WORD;\r\t}\r\treturn 1;\r}\r\r\r/*\tDoes thisCntx have aContext in its sender chain? */\r\rsqInt contexthasSender(sqInt thisCntx, sqInt aContext) {\r    sqInt nilOop;\r    sqInt s;\r\r\tif (thisCntx == aContext) {\r\t\treturn 0;\r\t}\r\tnilOop = foo->nilObj;\r\ts = longAt((thisCntx + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\twhile (!(s == nilOop)) {\r\t\tif (s == aContext) {\r\t\t\treturn 1;\r\t\t}\r\t\ts = longAt((s + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\t}\r\treturn 0;\r}\r\r\r/*\tThis entry point needs to be implemented for the interpreter proxy.\r\tSince BitBlt is now a plugin we need to look up BitBltPlugin:=copyBits\r\tand call it. This entire mechanism should eventually go away and be\r\treplaced with a dynamic lookup from BitBltPlugin itself but for backward\r\tcompatibility this stub is provided */\r\rsqInt copyBits(void) {\r    void *fn;\r\r\tfn = ioLoadFunctionFrom(\"copyBits\", \"BitBltPlugin\");\r\tif (fn == 0) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\treturn ((sqInt (*)(void))fn)();\r}\r\r\r/*\tThis entry point needs to be implemented for the interpreter proxy.\r\tSince BitBlt is now a plugin we need to look up BitBltPlugin:=copyBitsFrom:to:at:\r\tand call it. This entire mechanism should eventually go away and be\r\treplaced with a dynamic lookup from BitBltPlugin itself but for backward\r\tcompatibility this stub is provided */\r\rsqInt copyBitsFromtoat(sqInt x0, sqInt x1, sqInt y) {\r    void *fn;\r\r\tfn = ioLoadFunctionFrom(\"copyBitsFromtoat\", \"BitBltPlugin\");\r\tif (fn == 0) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\treturn ((sqInt (*)(sqInt, sqInt, sqInt))fn)(x0, x1, y);\r}\r\r\r/*\tCopy this object into the segment beginning at lastSeg.\r\tInstall a forwarding pointer, and save oop and header.\r\tFail if out of space.  Return the next segmentAddr if successful. */\r/*\tCopy the object... */\r\rsqInt copyObjtoSegmentaddrstopAtsaveOopAtheaderAt(sqInt oop, sqInt segmentWordArray, sqInt lastSeg, sqInt stopAddr, sqInt oopPtr, sqInt hdrPtr) {\rregister struct foo * foo = &fum;\r    sqInt bodySize;\r    sqInt extraSize;\r    sqInt hdrAddr;\r    sqInt header;\r    sqInt in;\r    sqInt lastIn;\r    sqInt out;\r\r\tflag(\"Dan\");\r\tif (!(foo->successFlag)) {\r\t\treturn lastSeg;\r\t}\r\textraSize = foo->headerTypeBytes[(longAt(oop)) & TypeMask];\r\t/* begin sizeBitsOf: */\r\theader = longAt(oop);\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tbodySize = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\tbodySize = header & (SIZE_MASK);\r\t\tgoto l1;\r\t}\rl1:\t/* end sizeBitsOf: */;\r\tif ((((usqInt) ((lastSeg + extraSize) + bodySize))) >= (((usqInt) stopAddr))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin transfer:from:to: */\r\tflag(\"Dan\");\r\tin = (oop - extraSize) - (BYTES_PER_WORD);\r\tlastIn = in + (((extraSize + bodySize) / (BYTES_PER_WORD)) * (BYTES_PER_WORD));\r\tout = (lastSeg + (BYTES_PER_WORD)) - (BYTES_PER_WORD);\r\twhile ((((usqInt) in)) < (((usqInt) lastIn))) {\r\t\tlongAtput(out += BYTES_PER_WORD, longAt(in += BYTES_PER_WORD));\r\t}\r\thdrAddr = (lastSeg + (BYTES_PER_WORD)) + extraSize;\r\tlongAtput(hdrAddr, (longAt(hdrAddr)) & ((ALL_BUT_ROOT_BIT) - (MARK_BIT)));\r\t/* begin forward:to:savingOopAt:andHeaderAt: */\r\tlongAtput(oopPtr, oop);\r\tlongAtput(hdrPtr, longAt(oop));\r\tlongAtput(oop, (((lastSeg + (BYTES_PER_WORD)) + extraSize) - segmentWordArray) + HeaderTypeFree);\r\treturn (lastSeg + extraSize) + bodySize;\r}\r\r\r/*\tBundle up the selector, arguments and lookupClass into a Message object. \r\tIn the process it pops the arguments off the stack, and pushes the message object. \r\tThis can then be presented as the argument of e.g. #doesNotUnderstand:. \r\tikp 11/20/1999 03:59 -- added hook for external runtime compilers. */\r/*\tremap lookupClass in case GC happens during allocation */\r\rsqInt createActualMessageTo(sqInt aClass) {\rregister struct foo * foo = &fum;\r    sqInt argumentArray;\r    sqInt lookupClass;\r    sqInt message;\r    sqInt sp;\r    sqInt oop;\r    sqInt oop1;\r    sqInt count;\r    sqInt src;\r    sqInt in;\r    sqInt lastIn;\r    sqInt out;\r    sqInt valuePointer;\r\r\t/* begin pushRemappableOop: */\r\tfoo->remapBuffer[(foo->remapBufferCount += 1)] = aClass;\r\r\t/* remap argumentArray in case GC happens during allocation */\r\r\targumentArray = instantiateClassindexableSize(fetchPointerofObject(ClassArray, foo->specialObjectsOop), foo->argumentCount);\r\t/* begin pushRemappableOop: */\r\tfoo->remapBuffer[(foo->remapBufferCount += 1)] = argumentArray;\r\tmessage = instantiateClassindexableSize(fetchPointerofObject(ClassMessage, foo->specialObjectsOop), 0);\r\t/* begin popRemappableOop */\r\toop = foo->remapBuffer[foo->remapBufferCount];\r\tfoo->remapBufferCount -= 1;\r\targumentArray = oop;\r\t/* begin popRemappableOop */\r\toop1 = foo->remapBuffer[foo->remapBufferCount];\r\tfoo->remapBufferCount -= 1;\r\tlookupClass = oop1;\r\tbeRootIfOld(argumentArray);\r\tif (foo->compilerInitialized) {\r\t\tcompilerCreateActualMessagestoringArgs(message, argumentArray);\r\t} else {\r\t\t/* begin transfer:from:to: */\r\t\tcount = foo->argumentCount;\r\t\tsrc = foo->stackPointer - ((foo->argumentCount - 1) * (BYTES_PER_WORD));\r\t\tflag(\"Dan\");\r\t\tin = src - (BYTES_PER_WORD);\r\t\tlastIn = in + (count * (BYTES_PER_WORD));\r\t\tout = (argumentArray + (BASE_HEADER_SIZE)) - (BYTES_PER_WORD);\r\t\twhile ((((usqInt) in)) < (((usqInt) lastIn))) {\r\t\t\tlongAtput(out += BYTES_PER_WORD, longAt(in += BYTES_PER_WORD));\r\t\t}\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp = foo->stackPointer - ((foo->argumentCount - 1) * (BYTES_PER_WORD)), message);\r\t\tfoo->stackPointer = sp;\r\t}\r\tfoo->argumentCount = 1;\r\t/* begin storePointer:ofObject:withValue: */\r\tvaluePointer = foo->messageSelector;\r\tif ((((usqInt) message)) < (((usqInt) foo->youngStart))) {\r\t\tpossibleRootStoreIntovalue(message, valuePointer);\r\t}\r\tlongAtput((message + (BASE_HEADER_SIZE)) + (MessageSelectorIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t/* begin storePointer:ofObject:withValue: */\r\tif ((((usqInt) message)) < (((usqInt) foo->youngStart))) {\r\t\tpossibleRootStoreIntovalue(message, argumentArray);\r\t}\r\tlongAtput((message + (BASE_HEADER_SIZE)) + (MessageArgumentsIndex << (SHIFT_FOR_WORD)), argumentArray);\r\tif ((lastPointerOf(message)) >= ((MessageLookupClassIndex * (BYTES_PER_WORD)) + (BASE_HEADER_SIZE))) {\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tif ((((usqInt) message)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(message, lookupClass);\r\t\t}\r\t\tlongAtput((message + (BASE_HEADER_SIZE)) + (MessageLookupClassIndex << (SHIFT_FOR_WORD)), lookupClass);\r\t}\r}\r\rsqInt dispatchFunctionPointer(void *aFunctionPointer) {\r\t((void (*)(void))aFunctionPointer)();\r}\r\r\r/*\tCall the primitive at index primIdx in the primitiveTable. */\r\rsqInt dispatchFunctionPointerOnin(sqInt primIdx, void *primTable[]) {\r\treturn dispatchFunctionPointer(primTable[primIdx]);\r}\r\r\r/*\tRepaint the portion of the Smalltalk screen bounded by the affected rectangle. Used to synchronize the screen after a Bitblt to the Smalltalk Display object. */\r\rsqInt displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b) {\rregister struct foo * foo = &fum;\r    sqInt bottom;\r    sqInt d;\r    sqInt dispBits;\r    sqInt dispBitsIndex;\r    sqInt displayObj;\r    sqInt h;\r    sqInt left;\r    sqInt right;\r    sqInt surfaceHandle;\r    sqInt top;\r    sqInt w;\r    sqInt oop;\r    sqInt successValue;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\tdisplayObj = longAt((oop + (BASE_HEADER_SIZE)) + (TheDisplay << (SHIFT_FOR_WORD)));\r\tif (!(aForm == displayObj)) {\r\t\treturn null;\r\t}\r\t/* begin success: */\r\tsuccessValue = (((displayObj & 1) == 0) && (((((usqInt) (longAt(displayObj))) >> 8) & 15) <= 4)) && ((lengthOf(displayObj)) >= 4);\r\tfoo->successFlag = successValue && foo->successFlag;\r\tif (foo->successFlag) {\r\t\tdispBits = longAt((displayObj + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)));\r\t\tw = fetchIntegerofObject(1, displayObj);\r\t\th = fetchIntegerofObject(2, displayObj);\r\t\td = fetchIntegerofObject(3, displayObj);\r\t}\r\tif (l < 0) {\r\t\tleft = 0;\r\t} else {\r\t\tleft = l;\r\t}\r\tif (r > w) {\r\t\tright = w;\r\t} else {\r\t\tright = r;\r\t}\r\tif (t < 0) {\r\t\ttop = 0;\r\t} else {\r\t\ttop = t;\r\t}\r\tif (b > h) {\r\t\tbottom = h;\r\t} else {\r\t\tbottom = b;\r\t}\r\tif (!((left <= right) && (top <= bottom))) {\r\t\treturn null;\r\t}\r\tif (foo->successFlag) {\r\t\tif ((dispBits & 1)) {\r\t\t\tsurfaceHandle = (dispBits >> 1);\r\t\t\tif (showSurfaceFn == 0) {\r\t\t\t\tshowSurfaceFn = ioLoadFunctionFrom(\"ioShowSurface\", \"SurfacePlugin\");\r\t\t\t\tif (showSurfaceFn == 0) {\r\t\t\t\t\t/* begin success: */\r\t\t\t\t\tfoo->successFlag = 0 && foo->successFlag;\r\t\t\t\t\treturn null;\r\t\t\t\t}\r\t\t\t}\r\t\t\t((sqInt (*)(sqInt, sqInt, sqInt, sqInt, sqInt))showSurfaceFn)(surfaceHandle, left, top, right-left, bottom-top);\r\t\t} else {\r\r\t\t\t/* index in memory byte array */\r\r\t\t\tdispBitsIndex = dispBits + (BASE_HEADER_SIZE);\r\t\t\tioShowDisplay(dispBitsIndex, w, h, d, left, right, top, bottom);\r\t\t}\r\t}\r}\r\rsqInt displayObject(void) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (TheDisplay << (SHIFT_FOR_WORD)));\r}\r\r\r/*\tRounds negative results towards negative infinity, rather than zero. */\r\rsqInt doPrimitiveDivby(sqInt rcvr, sqInt arg) {\rregister struct foo * foo = &fum;\r    sqInt integerArg;\r    sqInt integerRcvr;\r    sqInt posArg;\r    sqInt posRcvr;\r    sqInt result;\r    sqInt successValue;\r\r\tif (((rcvr & arg) & 1) != 0) {\r\t\tintegerRcvr = (rcvr >> 1);\r\t\tintegerArg = (arg >> 1);\r\t\t/* begin success: */\r\t\tfoo->successFlag = (integerArg != 0) && foo->successFlag;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t}\r\tif (!(foo->successFlag)) {\r\t\treturn 1;\r\t}\r\tif (integerRcvr > 0) {\r\t\tif (integerArg > 0) {\r\t\t\tresult = integerRcvr / integerArg;\r\t\t} else {\r\r\t\t\t/* round negative result toward negative infinity */\r\r\t\t\tposArg = 0 - integerArg;\r\t\t\tresult = 0 - ((integerRcvr + (posArg - 1)) / posArg);\r\t\t}\r\t} else {\r\t\tposRcvr = 0 - integerRcvr;\r\t\tif (integerArg > 0) {\r\r\t\t\t/* round negative result toward negative infinity */\r\r\t\t\tresult = 0 - ((posRcvr + (integerArg - 1)) / integerArg);\r\t\t} else {\r\t\t\tposArg = 0 - integerArg;\r\t\t\tresult = posRcvr / posArg;\r\t\t}\r\t}\r\t/* begin success: */\r\tsuccessValue = \r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t(((((int) result)) ^ ((((int) result)) << 1)) >= 0)\r# else\r\t\t((result >= -1073741824) && (result <= 1073741823))\r# endif  // SQ_HOST32\r\t;\r\tfoo->successFlag = successValue && foo->successFlag;\r\treturn result;\r}\r\rsqInt doPrimitiveModby(sqInt rcvr, sqInt arg) {\rregister struct foo * foo = &fum;\r    sqInt integerArg;\r    sqInt integerRcvr;\r    sqInt integerResult;\r    sqInt successValue;\r\r\tif (((rcvr & arg) & 1) != 0) {\r\t\tintegerRcvr = (rcvr >> 1);\r\t\tintegerArg = (arg >> 1);\r\t\t/* begin success: */\r\t\tfoo->successFlag = (integerArg != 0) && foo->successFlag;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t}\r\tif (!(foo->successFlag)) {\r\t\treturn 1;\r\t}\r\r\t/* ensure that the result has the same sign as the integerArg */\r\r\tintegerResult = integerRcvr % integerArg;\r\tif (integerArg < 0) {\r\t\tif (integerResult > 0) {\r\t\t\tintegerResult += integerArg;\r\t\t}\r\t} else {\r\t\tif (integerResult < 0) {\r\t\t\tintegerResult += integerArg;\r\t\t}\r\t}\r\t/* begin success: */\r\tsuccessValue = \r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t(((((int) integerResult)) ^ ((((int) integerResult)) << 1)) >= 0)\r# else\r\t\t((integerResult >= -1073741824) && (integerResult <= 1073741823))\r# endif  // SQ_HOST32\r\t;\r\tfoo->successFlag = successValue && foo->successFlag;\r\treturn integerResult;\r}\r\rsqInt dummyReferToProxy(void) {\r\tinterpreterProxy = interpreterProxy;\r}\r\r\r/*\tDump the entire image out to the given file. Intended for debugging only. */\r\rEXPORT(sqInt) dumpImage(char *fileName) {\r    sqInt dataSize;\r    sqImageFile f;\r    sqInt result;\r\r\tf = sqImageFileOpen(fileName, \"wb\");\r\tif (f == null) {\r\t\treturn -1;\r\t}\r\tdataSize = foo->endOfMemory - memory;\r\tresult = sqImageFileWrite(pointerForOop(memory), sizeof(unsigned char), dataSize, f);\r\tsqImageFileClose(f);\r\treturn result;\r}\r\r\r/*\texecute a method found in the mCache - which means that \r\tprimitiveIndex & primitiveFunctionPointer are already set. Any sender \r\tneeds to have previously sent findMethodInClass: or equivalent */\r\rsqInt executeNewMethodFromCache(void) {\rregister struct foo * foo = &fum;\r    sqInt delta;\r    sqInt nArgs;\r\r\tif (foo->primitiveIndex > 0) {\r\t\tif (DoBalanceChecks) {\r\r\t\t\t/* check stack balance */\r\r\t\t\tnArgs = foo->argumentCount;\r\t\t\tdelta = foo->stackPointer - foo->activeContext;\r\t\t}\r\t\tfoo->successFlag = 1;\r\t\tdispatchFunctionPointer(foo->primitiveFunctionPointer);\r\t\tif (DoBalanceChecks) {\r\t\t\tif (!(balancedStackafterPrimitivewithArgs(delta, foo->primitiveIndex, nArgs))) {\r\t\t\t\tprintUnbalancedStack(foo->primitiveIndex);\r\t\t\t}\r\t\t}\r\t\tif (foo->successFlag) {\r\t\t\treturn null;\r\t\t}\r\t}\r\tactivateNewMethod();\r\t/* begin quickCheckForInterrupts */\r\tif ((foo->interruptCheckCounter -= 1) <= 0) {\r\t\tcheckForInterrupts();\r\t}\r}\r\r\r/*\tReturn the number of extra bytes used by the given object's header. */\r/*\tWarning: This method should not be used during marking, when the header type bits of an object may be incorrect. */\r/*\tJMM should be an array lookup! */\r\rEXPORT(sqInt) extraHeaderBytes(sqInt oopOrChunk) {\r\treturn foo->headerTypeBytes[(longAt(oopOrChunk)) & TypeMask];\r}\r\rsqInt failed(void) {\r\treturn !foo->successFlag;\r}\r\rsqInt falseObject(void) {\r\treturn foo->falseObj;\r}\r\r\r/*\tFetch the instance variable at the given index of the given object. Return the address of first indexable field of resulting array object, or fail if the instance variable does not contain an indexable bytes or words object. */\r/*\tNote: May be called by translated primitive code. */\r\rvoid * fetchArrayofObject(sqInt fieldIndex, sqInt objectPointer) {\r    sqInt arrayOop;\r\r\tarrayOop = longAt((objectPointer + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t/* begin arrayValueOf: */\r\tif ((!((arrayOop & 1))) && (((arrayOop & 1) == 0) && (isWordsOrBytesNonInt(arrayOop)))) {\r\t\treturn pointerForOop(arrayOop + (BASE_HEADER_SIZE));\r\t}\r\t/* begin primitiveFail */\r\tfoo->successFlag = 0;\r\treturn null;\r}\r\rsqInt fetchClassOf(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\tif ((oop & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\treturn longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t}\r\tccIndex = (((usqInt) (longAt(oop))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\treturn (longAt(oop - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\treturn longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t}\r}\r\rsqInt fetchClassOfNonInt(sqInt oop) {\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r\r\tccIndex = (((usqInt) (longAt(oop))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\treturn (longAt(oop - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop2 = foo->specialObjectsOop;\r\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\treturn longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t}\r}\r\r\r/*\tFetch the instance variable at the given index of the given object. Return the C double precision floating point value of that instance variable, or fail if it is not a Float. */\r/*\tNote: May be called by translated primitive code. */\r\rdouble fetchFloatofObject(sqInt fieldIndex, sqInt objectPointer) {\r    sqInt floatOop;\r\r\tfloatOop = longAt((objectPointer + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\treturn floatValueOf(floatOop);\r}\r\r\r/*\tNote: May be called by translated primitive code. */\r\rsqInt fetchIntegerofObject(sqInt fieldIndex, sqInt objectPointer) {\r    sqInt intOop;\r\r\tintOop = longAt((objectPointer + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((intOop & 1)) {\r\t\treturn (intOop >> 1);\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn 0;\r\t}\r\treturn null;\r}\r\r\r/*\t index by 32-bit units, and return a 32-bit value. Intended to replace fetchWord:ofObject: */\r\rsqInt fetchLong32ofObject(sqInt fieldIndex, sqInt oop) {\r\treturn long32At((oop + (BASE_HEADER_SIZE)) + (fieldIndex << 2));\r}\r\r\r/*\tindex by word size, and return a pointer as long as the word size */\r\rsqInt fetchPointerofObject(sqInt fieldIndex, sqInt oop) {\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r}\r\r\r/*\tReturn the stackPointer of a Context or BlockContext. */\r\rsqInt fetchStackPointerOf(sqInt aContext) {\r    sqInt sp;\r\r\tsp = longAt((aContext + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)));\r\tif (!((sp & 1))) {\r\t\treturn 0;\r\t}\r\treturn (sp >> 1);\r}\r\r\r/*\tNOTE: this gives size appropriate for fetchPointer: n, but not in general for, eg, fetchLong32, etc. */\r\rsqInt fetchWordLengthOf(sqInt objectPointer) {\r    sqInt sz;\r    sqInt header;\r\r\t/* begin sizeBitsOf: */\r\theader = longAt(objectPointer);\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(objectPointer - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\tsz = header & (SIZE_MASK);\r\t\tgoto l1;\r\t}\rl1:\t/* end sizeBitsOf: */;\r\treturn ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r}\r\r\r/*\tDuring sweep phase we have encountered a weak reference. \r\tCheck if  its object has gone away (or is about to) and if so, signal a \r\tsemaphore.  */\r/*\tDo *not* inline this in sweepPhase - it is quite an unlikely \r\tcase to run into a weak reference */\r\rsqInt finalizeReference(usqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt chunk;\r    sqInt firstField;\r    sqInt i;\r    sqInt lastField;\r    sqInt nonWeakCnt;\r    sqInt oopGone;\r    usqInt weakOop;\r    sqInt listItemOop;\r    sqInt listOop;\r    sqInt contextSize;\r    sqInt fmt;\r    sqInt header;\r    sqInt methodHeader;\r    sqInt sz;\r    sqInt sp;\r    sqInt header1;\r    sqInt type;\r\r\tnonWeakCnt = nonWeakFieldsOf(oop);\r\tfirstField = (BASE_HEADER_SIZE) + (nonWeakCnt << (SHIFT_FOR_WORD));\r\t/* begin lastPointerOf: */\r\theader = longAt(oop);\r\tfmt = (((usqInt) header) >> 8) & 15;\r\tif (fmt <= 4) {\r\t\tif ((fmt == 3) && ((((((usqInt) header) >> 12) & 31) == 13) || ((((((usqInt) header) >> 12) & 31) == 14) || (((((usqInt) header) >> 12) & 31) == 4)))) {\r\t\t\t/* begin fetchStackPointerOf: */\r\t\t\tsp = longAt((oop + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)));\r\t\t\tif (!((sp & 1))) {\r\t\t\t\tcontextSize = 0;\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t\tcontextSize = (sp >> 1);\r\t\tl1:\t/* end fetchStackPointerOf: */;\r\t\t\tlastField = (CtxtTempFrameStart + contextSize) * (BYTES_PER_WORD);\r\t\t\tgoto l2;\r\t\t}\r\t\t/* begin sizeBitsOfSafe: */\r\t\theader1 = longAt(oop);\r\t\t/* begin rightType: */\r\t\tif ((header1 & (SIZE_MASK)) == 0) {\r\t\t\ttype = HeaderTypeSizeAndClass;\r\t\t\tgoto l3;\r\t\t} else {\r\t\t\tif ((header1 & CompactClassMask) == 0) {\r\t\t\t\ttype = HeaderTypeClass;\r\t\t\t\tgoto l3;\r\t\t\t} else {\r\t\t\t\ttype = HeaderTypeShort;\r\t\t\t\tgoto l3;\r\t\t\t}\r\t\t}\r\tl3:\t/* end rightType: */;\r\t\tif (type == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (ALL_BUT_TYPE_MASK);\r\t\t\tgoto l4;\r\t\t} else {\r\t\t\tsz = header1 & (SIZE_MASK);\r\t\t\tgoto l4;\r\t\t}\r\tl4:\t/* end sizeBitsOfSafe: */;\r\t\tlastField = sz - (BASE_HEADER_SIZE);\r\t\tgoto l2;\r\t}\r\tif (fmt < 12) {\r\t\tlastField = 0;\r\t\tgoto l2;\r\t}\r\tmethodHeader = longAt(oop + (BASE_HEADER_SIZE));\r\tlastField = (((((usqInt) methodHeader) >> 10) & 255) * (BYTES_PER_WORD)) + (BASE_HEADER_SIZE);\rl2:\t/* end lastPointerOf: */;\r\tfor (i = firstField; i <= lastField; i += (BYTES_PER_WORD)) {\r\r\t\t/* ar 1/18/2005: Added oop < youngStart test to make sure we're not testing\r\t\t\tobjects in non-GCable region. This could lead to a forward reference in\r\t\t\told space with the oop pointed to not being marked and thus treated as free. */\r\r\t\tweakOop = longAt(oop + i);\r\t\tif (!((weakOop == foo->nilObj) || (((weakOop & 1)) || (weakOop < foo->youngStart)))) {\r\t\t\tif (weakOop < oop) {\r\r\t\t\t\t/* Check if the object is being collected. \r\t\t\t\t\tIf the weak reference points  \r\t\t\t\t\t* backward: check if the weakOops chunk is free\r\t\t\t\t\t* forward: check if the weakOoop has been marked by GC */\r\r\t\t\t\tchunk = weakOop - (foo->headerTypeBytes[(longAt(weakOop)) & TypeMask]);\r\t\t\t\toopGone = ((longAt(chunk)) & TypeMask) == HeaderTypeFree;\r\t\t\t} else {\r\t\t\t\toopGone = ((longAt(weakOop)) & (MARK_BIT)) == 0;\r\t\t\t}\r\t\t\tif (oopGone) {\r\t\t\t\tlongAtput(oop + i, foo->nilObj);\r\t\t\t\tif (nonWeakCnt >= 2) {\r\t\t\t\t\t/* begin weakFinalizerCheck: */\r\t\t\t\t\tlistOop = longAt((oop + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)));\r\t\t\t\t\tif ((fetchClassOf(listOop)) == (fetchPointerofObject(ClassWeakFinalizer, foo->specialObjectsOop))) {\r\t\t\t\t\t\tlistItemOop = longAt((listOop + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)));\r\t\t\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\t\t\tif ((((usqInt) oop)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\t\tpossibleRootStoreIntovalue(oop, listItemOop);\r\t\t\t\t\t\t}\r\t\t\t\t\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + (1 << (SHIFT_FOR_WORD)), listItemOop);\r\t\t\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\t\t\tif ((((usqInt) listOop)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\t\tpossibleRootStoreIntovalue(listOop, oop);\r\t\t\t\t\t\t}\r\t\t\t\t\t\tlongAtput((listOop + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)), oop);\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\t/* begin signalFinalization: */\r\t\t\t\t/* begin forceInterruptCheck */\r\t\t\t\tfoo->interruptCheckCounter = -1000;\r\t\t\t\tfoo->nextPollTick = 0;\r\t\t\t\tfoo->pendingFinalizationSignals += 1;\r\t\t\t}\r\t\t}\r\t}\r}\r\rsqInt findClassOfMethodforReceiver(sqInt meth, sqInt rcvr) {\rregister struct foo * foo = &fum;\r    sqInt classDict;\r    sqInt classDictSize;\r    sqInt currClass;\r    sqInt done;\r    sqInt i;\r    sqInt methodArray;\r    sqInt sz;\r    sqInt ccIndex;\r    sqInt ccIndex1;\r    sqInt oop;\r    sqInt oop1;\r    sqInt header;\r    sqInt oop2;\r    sqInt oop3;\r    sqInt oop4;\r    sqInt oop5;\r\r\t/* begin fetchClassOf: */\r\tif ((rcvr & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop = foo->specialObjectsOop;\r\t\tcurrClass = longAt((oop + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tcurrClass = (longAt(rcvr - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop4 = foo->specialObjectsOop;\r\t\toop1 = longAt((oop4 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tcurrClass = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\rl1:\t/* end fetchClassOf: */;\r\tdone = 0;\r\twhile (!(done)) {\r\t\tclassDict = longAt((currClass + (BASE_HEADER_SIZE)) + (MessageDictionaryIndex << (SHIFT_FOR_WORD)));\r\t\t/* begin fetchWordLengthOf: */\r\t\t/* begin sizeBitsOf: */\r\t\theader = longAt(classDict);\r\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(classDict - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\tgoto l2;\r\t\t} else {\r\t\t\tsz = header & (SIZE_MASK);\r\t\t\tgoto l2;\r\t\t}\r\tl2:\t/* end sizeBitsOf: */;\r\t\tclassDictSize = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tmethodArray = longAt((classDict + (BASE_HEADER_SIZE)) + (MethodArrayIndex << (SHIFT_FOR_WORD)));\r\t\ti = 0;\r\t\twhile (i < (classDictSize - SelectorStart)) {\r\t\t\tif (meth == (longAt((methodArray + (BASE_HEADER_SIZE)) + (i << (SHIFT_FOR_WORD))))) {\r\t\t\t\treturn currClass;\r\t\t\t}\r\t\t\ti += 1;\r\t\t}\r\t\tcurrClass = longAt((currClass + (BASE_HEADER_SIZE)) + (SuperclassIndex << (SHIFT_FOR_WORD)));\r\t\tdone = currClass == foo->nilObj;\r\t}\r\t/* begin fetchClassOf: */\r\tif ((rcvr & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop2 = foo->specialObjectsOop;\r\t\treturn longAt((oop2 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t}\r\tccIndex1 = (((usqInt) (longAt(rcvr))) >> 12) & 31;\r\tif (ccIndex1 == 0) {\r\t\treturn (longAt(rcvr - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop5 = foo->specialObjectsOop;\r\t\toop3 = longAt((oop5 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\treturn longAt((oop3 + (BASE_HEADER_SIZE)) + ((ccIndex1 - 1) << (SHIFT_FOR_WORD)));\r\t}\r\treturn null;\r}\r\r\r/*\tFind the compiled method to be run when the current \r\tmessageSelector is sent to the given class, setting the values \r\tof 'newMethod' and 'primitiveIndex'. */\r\rsqInt findNewMethodInClass(sqInt class) {\rregister struct foo * foo = &fum;\r    sqInt ok;\r    sqInt hash;\r    sqInt probe;\r\r\t/* begin lookupInMethodCacheSel:class: */\r\thash = foo->messageSelector ^ class;\r\tprobe = hash & MethodCacheMask;\r\tif (((foo->methodCache[probe + MethodCacheSelector]) == foo->messageSelector) && ((foo->methodCache[probe + MethodCacheClass]) == class)) {\r\t\tfoo->newMethod = foo->methodCache[probe + MethodCacheMethod];\r\t\tfoo->primitiveIndex = foo->methodCache[probe + MethodCachePrim];\r\t\tfoo->newNativeMethod = foo->methodCache[probe + MethodCacheNative];\r\t\tfoo->primitiveFunctionPointer = ((void *) (foo->methodCache[probe + MethodCachePrimFunction]));\r\t\tok = 1;\r\t\tgoto l1;\r\t}\r\tprobe = (((usqInt) hash) >> 1) & MethodCacheMask;\r\tif (((foo->methodCache[probe + MethodCacheSelector]) == foo->messageSelector) && ((foo->methodCache[probe + MethodCacheClass]) == class)) {\r\t\tfoo->newMethod = foo->methodCache[probe + MethodCacheMethod];\r\t\tfoo->primitiveIndex = foo->methodCache[probe + MethodCachePrim];\r\t\tfoo->newNativeMethod = foo->methodCache[probe + MethodCacheNative];\r\t\tfoo->primitiveFunctionPointer = ((void *) (foo->methodCache[probe + MethodCachePrimFunction]));\r\t\tok = 1;\r\t\tgoto l1;\r\t}\r\tprobe = (((usqInt) hash) >> 2) & MethodCacheMask;\r\tif (((foo->methodCache[probe + MethodCacheSelector]) == foo->messageSelector) && ((foo->methodCache[probe + MethodCacheClass]) == class)) {\r\t\tfoo->newMethod = foo->methodCache[probe + MethodCacheMethod];\r\t\tfoo->primitiveIndex = foo->methodCache[probe + MethodCachePrim];\r\t\tfoo->newNativeMethod = foo->methodCache[probe + MethodCacheNative];\r\t\tfoo->primitiveFunctionPointer = ((void *) (foo->methodCache[probe + MethodCachePrimFunction]));\r\t\tok = 1;\r\t\tgoto l1;\r\t}\r\tok = 0;\rl1:\t/* end lookupInMethodCacheSel:class: */;\r\tif (!(ok)) {\r\t\tlookupMethodInClass(class);\r\t\tfoo->lkupClass = class;\r\t\taddNewMethodToCache();\r\t}\r}\r\rsqInt findSelectorOfMethodforReceiver(sqInt meth, sqInt rcvr) {\rregister struct foo * foo = &fum;\r    sqInt classDict;\r    sqInt classDictSize;\r    sqInt currClass;\r    sqInt done;\r    sqInt i;\r    sqInt methodArray;\r    sqInt sz;\r    sqInt ccIndex;\r    sqInt oop;\r    sqInt oop1;\r    sqInt header;\r    sqInt oop2;\r\r\t/* begin fetchClassOf: */\r\tif ((rcvr & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop = foo->specialObjectsOop;\r\t\tcurrClass = longAt((oop + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tcurrClass = (longAt(rcvr - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop2 = foo->specialObjectsOop;\r\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tcurrClass = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\rl1:\t/* end fetchClassOf: */;\r\tdone = 0;\r\twhile (!(done)) {\r\t\tclassDict = longAt((currClass + (BASE_HEADER_SIZE)) + (MessageDictionaryIndex << (SHIFT_FOR_WORD)));\r\t\t/* begin fetchWordLengthOf: */\r\t\t/* begin sizeBitsOf: */\r\t\theader = longAt(classDict);\r\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(classDict - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\tgoto l2;\r\t\t} else {\r\t\t\tsz = header & (SIZE_MASK);\r\t\t\tgoto l2;\r\t\t}\r\tl2:\t/* end sizeBitsOf: */;\r\t\tclassDictSize = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tmethodArray = longAt((classDict + (BASE_HEADER_SIZE)) + (MethodArrayIndex << (SHIFT_FOR_WORD)));\r\t\ti = 0;\r\t\twhile (i <= (classDictSize - SelectorStart)) {\r\t\t\tif (meth == (longAt((methodArray + (BASE_HEADER_SIZE)) + (i << (SHIFT_FOR_WORD))))) {\r\t\t\t\treturn longAt((classDict + (BASE_HEADER_SIZE)) + ((i + SelectorStart) << (SHIFT_FOR_WORD)));\r\t\t\t}\r\t\t\ti += 1;\r\t\t}\r\t\tcurrClass = longAt((currClass + (BASE_HEADER_SIZE)) + (SuperclassIndex << (SHIFT_FOR_WORD)));\r\t\tdone = currClass == foo->nilObj;\r\t}\r\treturn foo->nilObj;\r}\r\r\r/*\tReturn the first accessible object in the heap. */\r\rsqInt firstAccessibleObject(void) {\rregister struct foo * foo = &fum;\r    sqInt obj;\r    sqInt sz;\r    sqInt header;\r\r\tobj = memory + (foo->headerTypeBytes[(longAt(memory)) & TypeMask]);\r\twhile ((((usqInt) obj)) < (((usqInt) foo->endOfMemory))) {\r\t\tif (!(((longAt(obj)) & TypeMask) == HeaderTypeFree)) {\r\t\t\treturn obj;\r\t\t}\r\t\t/* begin objectAfter: */\r\t\tif (DoAssertionChecks) {\r\t\t\tif ((((usqInt) obj)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t}\r\t\t}\r\t\tif (((longAt(obj)) & TypeMask) == HeaderTypeFree) {\r\t\t\tsz = (longAt(obj)) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader = longAt(obj);\r\t\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(obj - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tsz = header & (SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\tl1:\t/* end sizeBitsOf: */;\r\t\t}\r\t\tobj = (obj + sz) + (foo->headerTypeBytes[(longAt(obj + sz)) & TypeMask]);\r\t}\r\terror(\"heap is empty\");\r}\r\rchar * firstFixedField(sqInt oop) {\r\treturn pointerForOop(oop + (BASE_HEADER_SIZE));\r}\r\r\r/*\tNOTE: copied in InterpreterSimulator, so please duplicate any changes */\r\rchar * firstIndexableField(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt fixedFields;\r    sqInt fmt;\r    sqInt hdr;\r    sqInt totalLength;\r    sqInt sz;\r    sqInt class;\r    sqInt classFormat;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\thdr = longAt(oop);\r\tfmt = (((usqInt) hdr) >> 8) & 15;\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((hdr & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz = hdr & (SIZE_MASK);\r\t}\r\tsz -= hdr & (SIZE_4_BIT);\r\tif (fmt <= 4) {\r\t\ttotalLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tgoto l1;\r\t}\r\tif (fmt < 8) {\r\t\ttotalLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> 2;\r\t\tgoto l1;\r\t} else {\r\t\ttotalLength = (sz - (BASE_HEADER_SIZE)) - (fmt & 3);\r\t\tgoto l1;\r\t}\rl1:\t/* end lengthOf:baseHeader:format: */;\r\t/* begin fixedFieldsOf:format:length: */\r\tif ((fmt > 4) || (fmt == 2)) {\r\t\tfixedFields = 0;\r\t\tgoto l3;\r\t}\r\tif (fmt < 2) {\r\t\tfixedFields = totalLength;\r\t\tgoto l3;\r\t}\r\t/* begin fetchClassOf: */\r\tif ((oop & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tclass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l2;\r\t}\r\tccIndex = (((usqInt) (longAt(oop))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tclass = (longAt(oop - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tclass = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l2;\r\t}\rl2:\t/* end fetchClassOf: */;\r\tclassFormat = (longAt((class + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1;\r\tfixedFields = (((((usqInt) classFormat) >> 11) & 192) + ((((usqInt) classFormat) >> 2) & 63)) - 1;\rl3:\t/* end fixedFieldsOf:format:length: */;\r\tif (fmt < 8) {\r\t\tif (fmt == 6) {\r\t\t\treturn pointerForOop((oop + (BASE_HEADER_SIZE)) + (fixedFields << 2));\r\t\t}\r\t\treturn pointerForOop((oop + (BASE_HEADER_SIZE)) + (fixedFields << (SHIFT_FOR_WORD)));\r\t} else {\r\t\treturn pointerForOop((oop + (BASE_HEADER_SIZE)) + fixedFields);\r\t}\r}\r\rsqInt floatObjectOf(double  aFloat) {\r    sqInt newFloatObj;\r\r\tflag(\"Dan\");\r\tnewFloatObj = instantiateSmallClasssizeInBytes(fetchPointerofObject(ClassFloat, foo->specialObjectsOop), 8 + (BASE_HEADER_SIZE));\r\tstoreFloatAtfrom(newFloatObj + (BASE_HEADER_SIZE), aFloat);\r\treturn newFloatObj;\r}\r\r\r/*\tFetch the instance variable at the given index of the given object. Return the C double precision floating point value of that instance variable, or fail if it is not a Float. */\r/*\tNote: May be called by translated primitive code. */\r\rdouble floatValueOf(sqInt oop) {\rregister struct foo * foo = &fum;\r    double  result;\r    sqInt classOop;\r    sqInt ccIndex;\r    sqInt cl;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\tflag(\"Dan\");\r\t/* begin assertClassOf:is: */\r\t/* begin fetchPointer:ofObject: */\r\toop3 = foo->specialObjectsOop;\r\tclassOop = longAt((oop3 + (BASE_HEADER_SIZE)) + (ClassFloat << (SHIFT_FOR_WORD)));\r\tif ((oop & 1)) {\r\t\tfoo->successFlag = 0;\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(oop))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tcl = (longAt(oop - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop2 = foo->specialObjectsOop;\r\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tcl = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t}\r\t/* begin success: */\r\tfoo->successFlag = (cl == classOop) && foo->successFlag;\rl1:\t/* end assertClassOf:is: */;\r\tif (foo->successFlag) {\r\t\t;\r\t\tfetchFloatAtinto(oop + (BASE_HEADER_SIZE), result);\r\t} else {\r\t\tresult = 0.0;\r\t}\r\treturn result;\r}\r\r\r/*\tmethodPtr is a CompiledMethod containing an external primitive. Flush the function address and session ID of the CM */\r\rsqInt flushExternalPrimitiveOf(sqInt methodPtr) {\r    sqInt lit;\r\r\tif (!((literalCountOfHeader(longAt((methodPtr + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD))))) > 0)) {\r\t\treturn null;\r\t}\r\tlit = longAt((methodPtr + (BASE_HEADER_SIZE)) + ((0 + LiteralStart) << (SHIFT_FOR_WORD)));\r\tif (!((((lit & 1) == 0) && (((((usqInt) (longAt(lit))) >> 8) & 15) == 2)) && ((lengthOf(lit)) == 4))) {\r\t\treturn null;\r\t}\r\tlongAtput((lit + (BASE_HEADER_SIZE)) + (2 << (SHIFT_FOR_WORD)), ConstZero);\r\tlongAtput((lit + (BASE_HEADER_SIZE)) + (3 << (SHIFT_FOR_WORD)), ConstZero);\r}\r\r\r/*\tFlush the references to external functions from plugin \r\tprimitives. This will force a reload of those primitives when \r\taccessed next. \r\tNote: We must flush the method cache here so that any \r\tfailed primitives are looked up again. */\r\rsqInt flushExternalPrimitives(void) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r    sqInt primIdx;\r    sqInt primBits;\r    sqInt i;\r    sqInt i1;\r    sqInt i2;\r    sqInt sz;\r    sqInt header;\r\r\toop = memory + (foo->headerTypeBytes[(longAt(memory)) & TypeMask]);\r\twhile ((((usqInt) oop)) < (((usqInt) foo->endOfMemory))) {\r\t\tif (!(((longAt(oop)) & TypeMask) == HeaderTypeFree)) {\r\t\t\tif (((((usqInt) (longAt(oop))) >> 8) & 15) >= 12) {\r\t\t\t\t/* begin primitiveIndexOf: */\r\t\t\t\tprimBits = (((usqInt) (longAt((oop + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD))))) >> 1) & 268435967;\r\t\t\t\tprimIdx = (primBits & 511) + (((usqInt) primBits) >> 19);\r\t\t\t\tif (primIdx == PrimitiveExternalCallIndex) {\r\t\t\t\t\tflushExternalPrimitiveOf(oop);\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t\t/* begin objectAfter: */\r\t\tif (DoAssertionChecks) {\r\t\t\tif ((((usqInt) oop)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t}\r\t\t}\r\t\tif (((longAt(oop)) & TypeMask) == HeaderTypeFree) {\r\t\t\tsz = (longAt(oop)) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader = longAt(oop);\r\t\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tsz = header & (SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\tl1:\t/* end sizeBitsOf: */;\r\t\t}\r\t\toop = (oop + sz) + (foo->headerTypeBytes[(longAt(oop + sz)) & TypeMask]);\r\t}\r\t/* begin flushMethodCache */\r\tfor (i = 1; i <= MethodCacheSize; i += 1) {\r\t\tfoo->methodCache[i] = 0;\r\t}\r\t/* begin flushAtCache */\r\tfor (i1 = 1; i1 <= AtCacheTotalSize; i1 += 1) {\r\t\tfoo->atCache[i1] = 0;\r\t}\r\t/* begin flushExternalPrimitiveTable */\r\tfor (i2 = 0; i2 <= (MaxExternalPrimitiveTableSize - 1); i2 += 1) {\r\t\tfoo->externalPrimitiveTable[i2] = 0;\r\t}\r}\r\r\r/*\tforce an interrupt check ASAP - setting interruptCheckCounter to a large -ve number is used as a flag to skip messing with the feedback mechanism and nextPollTick resetting makes sure that ioProcess gets called as near immediately as we can manage */\r\rsqInt forceInterruptCheck(void) {\rregister struct foo * foo = &fum;\r\tfoo->interruptCheckCounter = -1000;\r\tfoo->nextPollTick = 0;\r}\r\r\r/*\tRepaint the entire smalltalk screen, ignoring the affected rectangle. Used in some platform's code when the Smalltalk window is brought to the front or uncovered. */\r\rsqInt fullDisplayUpdate(void) {\r    sqInt displayObj;\r    sqInt h;\r    sqInt w;\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\tdisplayObj = longAt((oop + (BASE_HEADER_SIZE)) + (TheDisplay << (SHIFT_FOR_WORD)));\r\tif ((((displayObj & 1) == 0) && (((((usqInt) (longAt(displayObj))) >> 8) & 15) <= 4)) && ((lengthOf(displayObj)) >= 4)) {\r\t\tw = fetchIntegerofObject(1, displayObj);\r\t\th = fetchIntegerofObject(2, displayObj);\r\t\tdisplayBitsOfLeftTopRightBottom(displayObj, 0, 0, w, h);\r\t\tioForceDisplayUpdate();\r\t}\r}\r\r\r/*\tDo a mark/sweep garbage collection of the entire object memory. Free inaccessible objects but do not move them. */\r\rsqInt fullGC(void) {\rregister struct foo * foo = &fum;\r    sqLong startTime;\r    sqInt i;\r    sqInt oop;\r    sqInt sz;\r    sqInt activeCntx;\r    sqInt valuePointer;\r    sqInt valuePointer1;\r\r\tif (DoAssertionChecks) {\r\t\treverseDisplayFromto(0, 7);\r\t}\r\t/* begin preGCAction: */\r\tif (foo->compilerInitialized) {\r\t\tcompilerPreGC(1);\r\t} else {\r\t\t/* begin storeContextRegisters: */\r\t\tactiveCntx = foo->activeContext;\r\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\tvaluePointer = ((((foo->instructionPointer - foo->method) - ((BASE_HEADER_SIZE) - 2)) << 1) | 1);\r\t\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\tvaluePointer1 = (((((((usqInt) ((foo->stackPointer - foo->activeContext) - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD)) - TempFrameStart) + 1) << 1) | 1);\r\t\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\t}\r\tstartTime = ioMicroSecondClock();\r\tfoo->statSweepCount = foo->statMarkCount = foo->statMkFwdCount = foo->statCompMoveCount = 0;\r\t/* begin clearRootsTable */\r\tfor (i = 1; i <= foo->rootTableCount; i += 1) {\r\t\toop = foo->rootTable[i];\r\t\tlongAtput(oop, (longAt(oop)) & (ALL_BUT_ROOT_BIT));\r\t\tfoo->rootTable[i] = 0;\r\t}\r\tfoo->rootTableCount = 0;\r\r\t/* process all of memory */\r\r\tfoo->youngStart = memory;\r\tmarkPhase();\r\tfoo->totalObjectCount = sweepPhase();\r\t/* begin fullCompaction */\r\tfoo->compStart = lowestFreeAfter(memory);\r\tif (foo->compStart == foo->freeBlock) {\r\t\tinitializeMemoryFirstFree(foo->freeBlock);\r\t\tgoto l1;\r\t}\r\tif ((sz = fwdTableSize(8)) < foo->totalObjectCount) {\r\t\tgrowObjectMemory(((foo->totalObjectCount - sz) + 10000) * 8);\r\t}\r\twhile (foo->compStart < foo->freeBlock) {\r\t\tfoo->compStart = incCompBody();\r\t}\rl1:\t/* end fullCompaction */;\r\tfoo->allocationCount = 0;\r\tfoo->statFullGCs += 1;\r\tfoo->statGCTime = ioMicroSecondClock();\r\tfoo->statFullGCMSecs += foo->statGCTime - startTime;\r\t/* begin capturePendingFinalizationSignals */\r\tfoo->statpendingFinalizationSignals = foo->pendingFinalizationSignals;\r\r\t/* reset the young object boundary */\r\r\tfoo->youngStart = foo->freeBlock;\r\tpostGCAction();\r\tif (DoAssertionChecks) {\r\t\treverseDisplayFromto(0, 7);\r\t}\r}\r\r\r/*\tSet the limits for a table of two- or three-word forwarding blocks above the last used oop. The pointer fwdTableNext moves up to fwdTableLast. Used for compaction of memory and become-ing objects. Returns the number of forwarding blocks available. */\r\rsqInt fwdTableInit(sqInt blkSize) {\rregister struct foo * foo = &fum;\r\t/* begin setSizeOfFree:to: */\r\tlongAtput(foo->freeBlock, ((BASE_HEADER_SIZE) & (ALL_BUT_TYPE_MASK)) | HeaderTypeFree);\r\r\t/* make a fake free chunk at endOfMemory for use as a sentinal in memory scans */\r\r\tfoo->endOfMemory = foo->freeBlock + (BASE_HEADER_SIZE);\r\t/* begin setSizeOfFree:to: */\r\tlongAtput(foo->endOfMemory, ((BASE_HEADER_SIZE) & (ALL_BUT_TYPE_MASK)) | HeaderTypeFree);\r\tfoo->fwdTableNext = ((foo->endOfMemory + (BASE_HEADER_SIZE)) + 7) & ((WORD_MASK) - 7);\r\tflag(\"Dan\");\r\r\t/* last forwarding table entry */\r\t/* return the number of forwarding blocks available */\r\r\tfoo->fwdTableLast = foo->memoryLimit - blkSize;\r\treturn (foo->fwdTableLast - foo->fwdTableNext) / blkSize;\r}\r\r\r/*\tEstimate the number of forwarding blocks available for compaction */\r\rsqInt fwdTableSize(sqInt blkSize) {\rregister struct foo * foo = &fum;\r    sqInt eom;\r    sqInt fwdFirst;\r    sqInt fwdLast;\r\r\r\t/* use all memory free between freeBlock and memoryLimit for forwarding table */\r\t/* Note: Forward blocks must be quadword aligned. */\r\r\teom = foo->freeBlock + (BASE_HEADER_SIZE);\r\tfwdFirst = ((eom + (BASE_HEADER_SIZE)) + 7) & ((WORD_MASK) - 7);\r\tflag(\"Dan\");\r\r\t/* last forwarding table entry */\r\t/* return the number of forwarding blocks available */\r\r\tfwdLast = foo->memoryLimit - blkSize;\r\treturn (fwdLast - fwdFirst) / blkSize;\r}\r\r\r/*\tcurrentBytecode will be private to the main dispatch loop in the generated code. This method allows the currentBytecode to be retrieved from global variables. */\r\rsqInt getCurrentBytecode(void) {\r\treturn byteAt(foo->instructionPointer);\r}\r\rsqInt getFullScreenFlag(void) {\r\treturn foo->fullScreenFlag;\r}\r\rsqInt getInterruptCheckCounter(void) {\r\treturn foo->interruptCheckCounter;\r}\r\rsqInt getInterruptKeycode(void) {\r\treturn foo->interruptKeycode;\r}\r\rsqInt getInterruptPending(void) {\r\treturn foo->interruptPending;\r}\r\r\r/*\tAnswer the next word read from aFile, byte-swapped according to the swapFlag. */\r\rsqInt getLongFromFileswap(sqImageFile  aFile, sqInt swapFlag) {\r    sqInt w;\r\r\tw = 0;\r\tsqImageFileRead(&w, sizeof(w), 1, aFile);\r\tif (swapFlag) {\r\t\t/* begin byteSwapped: */\r\t\t\r# if (BYTES_PER_WORD == 4)  // swap bytes in an object word\r\t\treturn ((((((usqInt) w >> 24)) & Byte0Mask) + ((((usqInt) w >> 8)) & Byte1Mask)) + ((((usqInt) w << 8)) & Byte2Mask)) + ((((usqInt) w << 24)) & Byte3Mask);\r# else\r\t\treturn ((((((((((usqInt) w >> 56)) & Byte0Mask) + ((((usqInt) w >> 40)) & Byte1Mask)) + ((((usqInt) w >> 24)) & Byte2Mask)) + ((((usqInt) w >> 8)) & Byte3Mask)) + ((((usqInt) w << 8)) & Byte4Mask)) + ((((usqInt) w << 24)) & Byte5Mask)) + ((((usqInt) w << 40)) & Byte6Mask)) + ((((usqInt) w << 56)) & Byte7Mask);\r# endif  // BYTES_PER_WORD == 4\r\t\t\r\t\treturn null;\r\t} else {\r\t\treturn w;\r\t}\r}\r\rsqInt getNextWakeupTick(void) {\r\treturn foo->nextWakeupTick;\r}\r\rsqInt getSavedWindowSize(void) {\r\treturn foo->savedWindowSize;\r}\r\r\r/*\tFor Newsqueak FFI */\r\rEXPORT(sqInt) getStackPointer(void) {\r\treturn foo->stackPointer;\r}\r\r\r/*\treturn the global session ID value */\r\rsqInt getThisSessionID(void) {\r\treturn foo->globalSessionID;\r}\r\r\r/*\tAttempt to grow the object memory by the given delta \r\tamount  */\r\rsqInt growObjectMemory(usqInt delta) {\rregister struct foo * foo = &fum;\r    usqInt limit;\r\r\tif (!(isExcessiveAllocationRequestshift(delta, 0))) {\r\t\tfoo->statGrowMemory += 1;\r\t\tlimit = sqGrowMemoryBy(foo->memoryLimit, delta);\r\t\tif (!(limit == foo->memoryLimit)) {\r\r\t\t\t/* remove a tad for safety */\r\r\t\t\tfoo->memoryLimit = limit - 24;\r\t\t\tinitializeMemoryFirstFree(foo->freeBlock);\r\t\t}\r\t}\r}\r\rsqInt headerOf(sqInt methodPointer) {\r\treturn longAt((methodPointer + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD)));\r}\r\r\r/*\ta more complex version that tells both the word reversal and the endianness of the machine it came from.  Low half of word is 6502.  Top byte is top byte of #doesNotUnderstand: on this machine. ($d on the Mac or $s on the PC) */\r\rsqInt imageSegmentVersion(void) {\r    sqInt wholeWord;\r\r\r\t/* first data word, 'does'  */\r\r\twholeWord = longAt((fetchPointerofObject(SelectorDoesNotUnderstand, foo->specialObjectsOop)) + (BASE_HEADER_SIZE));\r\treturn imageFormatVersionNumber | (wholeWord & 4278190080U);\r}\r\r\r/*\tMove objects to consolidate free space into one big chunk. Return the newly created free chunk. */\r\rsqInt incCompBody(void) {\rregister struct foo * foo = &fum;\r    sqInt bytesFreed;\r\r\tfwdTableInit((BYTES_PER_WORD) * 2);\r\r\t/* update pointers to point at new oops */\r\r\tbytesFreed = incCompMakeFwd();\r\tmapPointersInObjectsFromto(foo->youngStart, foo->endOfMemory);\r\treturn incCompMove(bytesFreed);\r}\r\r\r/*\tCreate and initialize forwarding blocks for all non-free objects  \r\tfollowing compStart. If the supply of forwarding blocks is exhausted,  \r\tset compEnd to the first chunk above the area to be \r\tcompacted; otherwise, set it to endOfMemory. Return the number of \r\tbytes to be freed. */\r\rsqInt incCompMakeFwd(void) {\rregister struct foo * foo = &fum;\r    sqInt bytesFreed;\r    sqInt fwdBlock;\r    sqInt newOop;\r    sqInt oop;\r    sqInt originalHeader;\r    sqInt originalHeaderType;\r    sqInt fwdBlock1;\r    sqInt header;\r    sqInt realHeader;\r    sqInt sz;\r    sqInt sz1;\r    sqInt header1;\r\r\tbytesFreed = 0;\r\toop = foo->compStart + (foo->headerTypeBytes[(longAt(foo->compStart)) & TypeMask]);\r\twhile ((((usqInt) oop)) < (((usqInt) foo->endOfMemory))) {\r\t\tfoo->statMkFwdCount += 1;\r\t\tif (((longAt(oop)) & TypeMask) == HeaderTypeFree) {\r\t\t\tbytesFreed += (longAt(oop)) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin fwdBlockGet: */\r\t\t\tfoo->fwdTableNext += (BYTES_PER_WORD) * 2;\r\t\t\tif (foo->fwdTableNext <= foo->fwdTableLast) {\r\t\t\t\tfwdBlock = foo->fwdTableNext;\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tfwdBlock = null;\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\tl1:\t/* end fwdBlockGet: */;\r\t\t\tif (fwdBlock == null) {\r\r\t\t\t\t/* stop; we have used all available forwarding blocks */\r\r\t\t\t\tfoo->compEnd = oop - (foo->headerTypeBytes[(longAt(oop)) & TypeMask]);\r\t\t\t\treturn bytesFreed;\r\t\t\t}\r\t\t\tnewOop = oop - bytesFreed;\r\t\t\t/* begin initForwardBlock:mapping:to:withBackPtr: */\r\t\t\toriginalHeader = longAt(oop);\r\t\t\tif (DoAssertionChecks) {\r\t\t\t\tif (fwdBlock == null) {\r\t\t\t\t\terror(\"ran out of forwarding blocks in become\");\r\t\t\t\t}\r\t\t\t\tif ((originalHeader & (MARK_BIT)) != 0) {\r\t\t\t\t\terror(\"object already has a forwarding table entry\");\r\t\t\t\t}\r\t\t\t}\r\t\t\toriginalHeaderType = originalHeader & TypeMask;\r\t\t\tlongAtput(fwdBlock, newOop);\r\t\t\tlongAtput(fwdBlock + (BYTES_PER_WORD), originalHeader);\r\t\t\tif (0) {\r\t\t\t\tlongAtput(fwdBlock + ((BYTES_PER_WORD) * 2), oop);\r\t\t\t}\r\t\t\tlongAtput(oop, (((usqInt) fwdBlock) >> 1) | ((MARK_BIT) | originalHeaderType));\r\t\t}\r\t\t/* begin objectAfterWhileForwarding: */\r\t\theader = longAt(oop);\r\t\tif ((header & (MARK_BIT)) == 0) {\r\t\t\t/* begin objectAfter: */\r\t\t\tif (DoAssertionChecks) {\r\t\t\t\tif ((((usqInt) oop)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t\t}\r\t\t\t}\r\t\t\tif (((longAt(oop)) & TypeMask) == HeaderTypeFree) {\r\t\t\t\tsz1 = (longAt(oop)) & (ALL_BUT_TYPE_MASK);\r\t\t\t} else {\r\t\t\t\t/* begin sizeBitsOf: */\r\t\t\t\theader1 = longAt(oop);\r\t\t\t\tif ((header1 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\t\tsz1 = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\t\tgoto l3;\r\t\t\t\t} else {\r\t\t\t\t\tsz1 = header1 & (SIZE_MASK);\r\t\t\t\t\tgoto l3;\r\t\t\t\t}\r\t\t\tl3:\t/* end sizeBitsOf: */;\r\t\t\t}\r\t\t\toop = (oop + sz1) + (foo->headerTypeBytes[(longAt(oop + sz1)) & TypeMask]);\r\t\t\tgoto l2;\r\t\t}\r\t\tfwdBlock1 = (header & (ALL_BUT_MARK_BIT_AND_TYPE_MASK)) << 1;\r\t\tif (DoAssertionChecks) {\r\t\t\t/* begin fwdBlockValidate: */\r\t\t\tif (!(((((usqInt) fwdBlock1)) > (((usqInt) foo->endOfMemory))) && (((((usqInt) fwdBlock1)) <= (((usqInt) foo->fwdTableNext))) && ((fwdBlock1 & 3) == 0)))) {\r\t\t\t\terror(\"invalid fwd table entry\");\r\t\t\t}\r\t\t}\r\t\trealHeader = longAt(fwdBlock1 + (BYTES_PER_WORD));\r\t\tif ((realHeader & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t} else {\r\t\t\tsz = realHeader & (SIZE_MASK);\r\t\t}\r\t\toop = (oop + sz) + (foo->headerTypeBytes[(longAt(oop + sz)) & TypeMask]);\r\tl2:\t/* end objectAfterWhileForwarding: */;\r\t}\r\tfoo->compEnd = foo->endOfMemory;\r\treturn bytesFreed;\r}\r\r\r/*\tMove all non-free objects between compStart and compEnd to their new  \r\tlocations, restoring their headers in the process. Create a new free  \r\tblock at the end of memory. Return the newly created free chunk.  */\r/*\tNote: The free block used by the allocator always must be the last free  \r\tblock in memory. It may take several compaction passes to make all  \r\tfree space bubble up to the end of memory. */\r\rsqInt incCompMove(sqInt bytesFreed) {\rregister struct foo * foo = &fum;\r    sqInt bytesToMove;\r    usqInt firstWord;\r    sqInt fwdBlock;\r    sqInt header;\r    usqInt lastWord;\r    sqInt newFreeChunk;\r    sqInt newOop;\r    sqInt next;\r    sqInt oop;\r    sqInt sz;\r    sqInt target;\r    usqInt w;\r    sqInt header1;\r    sqInt fwdBlock1;\r    sqInt header2;\r    sqInt realHeader;\r    sqInt sz1;\r    sqInt sz2;\r    sqInt header3;\r\r\tnewOop = null;\r\toop = foo->compStart + (foo->headerTypeBytes[(longAt(foo->compStart)) & TypeMask]);\r\twhile ((((usqInt) oop)) < (((usqInt) foo->compEnd))) {\r\t\tfoo->statCompMoveCount += 1;\r\t\t/* begin objectAfterWhileForwarding: */\r\t\theader2 = longAt(oop);\r\t\tif ((header2 & (MARK_BIT)) == 0) {\r\t\t\t/* begin objectAfter: */\r\t\t\tif (DoAssertionChecks) {\r\t\t\t\tif ((((usqInt) oop)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t\t}\r\t\t\t}\r\t\t\tif (((longAt(oop)) & TypeMask) == HeaderTypeFree) {\r\t\t\t\tsz2 = (longAt(oop)) & (ALL_BUT_TYPE_MASK);\r\t\t\t} else {\r\t\t\t\t/* begin sizeBitsOf: */\r\t\t\t\theader3 = longAt(oop);\r\t\t\t\tif ((header3 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\t\tsz2 = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\t\tgoto l3;\r\t\t\t\t} else {\r\t\t\t\t\tsz2 = header3 & (SIZE_MASK);\r\t\t\t\t\tgoto l3;\r\t\t\t\t}\r\t\t\tl3:\t/* end sizeBitsOf: */;\r\t\t\t}\r\t\t\tnext = (oop + sz2) + (foo->headerTypeBytes[(longAt(oop + sz2)) & TypeMask]);\r\t\t\tgoto l2;\r\t\t}\r\t\tfwdBlock1 = (header2 & (ALL_BUT_MARK_BIT_AND_TYPE_MASK)) << 1;\r\t\tif (DoAssertionChecks) {\r\t\t\t/* begin fwdBlockValidate: */\r\t\t\tif (!(((((usqInt) fwdBlock1)) > (((usqInt) foo->endOfMemory))) && (((((usqInt) fwdBlock1)) <= (((usqInt) foo->fwdTableNext))) && ((fwdBlock1 & 3) == 0)))) {\r\t\t\t\terror(\"invalid fwd table entry\");\r\t\t\t}\r\t\t}\r\t\trealHeader = longAt(fwdBlock1 + (BYTES_PER_WORD));\r\t\tif ((realHeader & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\tsz1 = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t} else {\r\t\t\tsz1 = realHeader & (SIZE_MASK);\r\t\t}\r\t\tnext = (oop + sz1) + (foo->headerTypeBytes[(longAt(oop + sz1)) & TypeMask]);\r\tl2:\t/* end objectAfterWhileForwarding: */;\r\t\tif (!(((longAt(oop)) & TypeMask) == HeaderTypeFree)) {\r\r\t\t\t/* a moving object; unwind its forwarding block */\r\r\t\t\tfwdBlock = ((longAt(oop)) & (ALL_BUT_MARK_BIT_AND_TYPE_MASK)) << 1;\r\t\t\tif (DoAssertionChecks) {\r\t\t\t\t/* begin fwdBlockValidate: */\r\t\t\t\tif (!(((((usqInt) fwdBlock)) > (((usqInt) foo->endOfMemory))) && (((((usqInt) fwdBlock)) <= (((usqInt) foo->fwdTableNext))) && ((fwdBlock & 3) == 0)))) {\r\t\t\t\t\terror(\"invalid fwd table entry\");\r\t\t\t\t}\r\t\t\t}\r\t\t\tnewOop = longAt(fwdBlock);\r\t\t\theader = longAt(fwdBlock + (BYTES_PER_WORD));\r\t\t\tlongAtput(oop, header);\r\r\t\t\t/* move the oop (including any extra header words)  */\r\r\t\t\tbytesToMove = oop - newOop;\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader1 = longAt(oop);\r\t\t\tif ((header1 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tsz = header1 & (SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\tl1:\t/* end sizeBitsOf: */;\r\t\t\tfirstWord = oop - (foo->headerTypeBytes[(longAt(oop)) & TypeMask]);\r\t\t\tlastWord = (oop + sz) - (BASE_HEADER_SIZE);\r\t\t\ttarget = firstWord - bytesToMove;\r\t\t\tfor (w = firstWord; w <= lastWord; w += (BYTES_PER_WORD)) {\r\t\t\t\tlongAtput(target, longAt(w));\r\t\t\t\ttarget += BYTES_PER_WORD;\r\t\t\t}\r\t\t}\r\t\toop = next;\r\t}\r\tif (newOop == null) {\r\r\t\t/* no objects moved */\r\r\t\toop = foo->compStart + (foo->headerTypeBytes[(longAt(foo->compStart)) & TypeMask]);\r\t\tif ((((longAt(oop)) & TypeMask) == HeaderTypeFree) && ((objectAfter(oop)) == (foo->compEnd + (foo->headerTypeBytes[(longAt(foo->compEnd)) & TypeMask])))) {\r\t\t\tnewFreeChunk = oop;\r\t\t} else {\r\t\t\tnewFreeChunk = foo->freeBlock;\r\t\t}\r\t} else {\r\r\t\t/* initialize the newly freed memory chunk */\r\t\t/* newOop is the last object moved; free chunk starts \r\t\t\tright after it */\r\r\t\tnewFreeChunk = newOop + (sizeBitsOf(newOop));\r\t\t/* begin setSizeOfFree:to: */\r\t\tlongAtput(newFreeChunk, (bytesFreed & (ALL_BUT_TYPE_MASK)) | HeaderTypeFree);\r\t}\r\tif (DoAssertionChecks) {\r\t\tif (!((objectAfter(newFreeChunk)) == (foo->compEnd + (foo->headerTypeBytes[(longAt(foo->compEnd)) & TypeMask])))) {\r\t\t\terror(\"problem creating free chunk after compaction\");\r\t\t}\r\t}\r\tif ((objectAfter(newFreeChunk)) == foo->endOfMemory) {\r\t\tinitializeMemoryFirstFree(newFreeChunk);\r\t} else {\r\t\tinitializeMemoryFirstFree(foo->freeBlock);\r\t}\r\treturn newFreeChunk;\r}\r\r\r/*\tReturn the equivalent of \r\t\taClass includesBehavior: aSuperclass.\r\tNote: written for efficiency and better inlining (only 1 temp) */\r\rsqInt includesBehaviorThatOf(sqInt aClass, sqInt aSuperclass) {\rregister struct foo * foo = &fum;\r    sqInt theClass;\r\r\tif (((theClass = aClass) == aSuperclass) || (aSuperclass == foo->nilObj)) {\r\t\treturn 1;\r\t}\r\tdo {\r\t\tif ((theClass = longAt((theClass + (BASE_HEADER_SIZE)) + (SuperclassIndex << (SHIFT_FOR_WORD)))) == aSuperclass) {\r\t\t\treturn 1;\r\t\t}\r\t} while(theClass != foo->nilObj);\r\treturn 0;\r}\r\r\r/*\tDo a mark/sweep garbage collection of just the young object \r\tarea of object memory (i.e., objects above youngStart), using \r\tthe root table to identify objects containing pointers to \r\tyoung objects from the old object area. */\r\rsqInt incrementalGC(void) {\rregister struct foo * foo = &fum;\r    sqInt i;\r    sqLong startTime;\r    sqInt survivorCount;\r    sqInt weDidGrow;\r    sqInt growth;\r    sqInt i1;\r    sqInt oop;\r    sqInt activeCntx;\r    sqInt valuePointer;\r    sqInt valuePointer1;\r\r\tif (foo->rootTableCount >= RootTableSize) {\r\r\t\t/* root table overflow; cannot do an incremental GC (this should be very rare) */\r\r\t\tfoo->statRootTableOverflows += 1;\r\t\treturn fullGC();\r\t}\r\tif (DoAssertionChecks) {\r\t\treverseDisplayFromto(8, 15);\r\t\tvalidateRoots();\r\t\t/* begin validate */\r\t}\r\t/* begin preGCAction: */\r\tif (foo->compilerInitialized) {\r\t\tcompilerPreGC(0);\r\t} else {\r\t\t/* begin storeContextRegisters: */\r\t\tactiveCntx = foo->activeContext;\r\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\tvaluePointer = ((((foo->instructionPointer - foo->method) - ((BASE_HEADER_SIZE) - 2)) << 1) | 1);\r\t\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\tvaluePointer1 = (((((((usqInt) ((foo->stackPointer - foo->activeContext) - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD)) - TempFrameStart) + 1) << 1) | 1);\r\t\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\t}\r\tstartTime = ioMicroSecondClock();\r\tfoo->weakRootCount = 0;\r\tfoo->statSweepCount = foo->statMarkCount = foo->statMkFwdCount = foo->statCompMoveCount = 0;\r\tmarkPhase();\r\tfor (i = 1; i <= foo->weakRootCount; i += 1) {\r\t\tfinalizeReference(foo->weakRoots[i]);\r\t}\r\tsurvivorCount = sweepPhase();\r\t/* begin incrementalCompaction */\r\tif (foo->compStart == foo->freeBlock) {\r\t\tinitializeMemoryFirstFree(foo->freeBlock);\r\t} else {\r\t\tincCompBody();\r\t}\r\tfoo->statAllocationCount = foo->allocationCount;\r\tfoo->allocationCount = 0;\r\tfoo->statIncrGCs += 1;\r\tfoo->statGCTime = ioMicroSecondClock();\r\tfoo->statIGCDeltaTime = foo->statGCTime - startTime;\r\tfoo->statIncrGCMSecs += foo->statIGCDeltaTime;\r\t/* begin capturePendingFinalizationSignals */\r\tfoo->statpendingFinalizationSignals = foo->pendingFinalizationSignals;\r\t/* begin forceInterruptCheck */\r\tfoo->interruptCheckCounter = -1000;\r\tfoo->nextPollTick = 0;\r\tfoo->statRootTableCount = foo->rootTableCount;\r\tfoo->statSurvivorCount = survivorCount;\r\tweDidGrow = 0;\r\tif (((survivorCount > foo->tenuringThreshold) || (foo->rootTableCount >= RootTableRedZone)) || (foo->forceTenureFlag == 1)) {\r\r\t\t/* move up the young space boundary if \r\t\t\t* there are too many survivors: \r\t\t\tthis limits the number of objects that must be \r\t\t\tprocessed on future incremental GC's \r\t\t\t* we're about to overflow the roots table \r\t\t\tthis limits the number of full GCs that may be caused \r\t\t\tby root table overflows in the near future */\r\r\t\tfoo->forceTenureFlag = 0;\r\t\tfoo->statTenures += 1;\r\t\t/* begin clearRootsTable */\r\t\tfor (i1 = 1; i1 <= foo->rootTableCount; i1 += 1) {\r\t\t\toop = foo->rootTable[i1];\r\t\t\tlongAtput(oop, (longAt(oop)) & (ALL_BUT_ROOT_BIT));\r\t\t\tfoo->rootTable[i1] = 0;\r\t\t}\r\t\tfoo->rootTableCount = 0;\r\t\tif ((foo->freeBlock < foo->growHeadroom) && (foo->gcBiasToGrow > 0)) {\r\t\t\tbiasToGrow();\r\t\t\tweDidGrow = 1;\r\t\t}\r\t\tfoo->youngStart = foo->freeBlock;\r\t}\r\tpostGCAction();\r\tif (DoAssertionChecks) {\r\t\tvalidateRoots();\r\t\t/* begin validate */\r\t\treverseDisplayFromto(8, 15);\r\t}\r\tif (weDidGrow) {\r\t\t/* begin biasToGrowCheckGCLimit */\r\t\tgrowth = (foo->youngStart - memory) - foo->gcBiasToGrowThreshold;\r\t\tif (growth < 0) {\r\t\t\tfoo->gcBiasToGrowThreshold = foo->youngStart - memory;\r\t\t}\r\t\tif (growth > foo->gcBiasToGrowGCLimit) {\r\t\t\tfullGC();\r\t\t\tfoo->gcBiasToGrowThreshold = foo->youngStart - memory;\r\t\t}\r\t}\r}\r\r\r/*\tInitialize hooks for the 'null compiler' */\r\rsqInt initCompilerHooks(void) {\r\tcompilerHooks[1]= nullCompilerHook;\r\tcompilerHooks[2]= nullCompilerHook;\r\tcompilerHooks[3]= nullCompilerHook;\r\tcompilerHooks[4]= nullCompilerHook;\r\tcompilerHooks[5]= nullCompilerHook;\r\tcompilerHooks[6]= nullCompilerHook;\r\tcompilerHooks[7]= nullCompilerHook;\r\tcompilerHooks[8]= nullCompilerHook;\r\tcompilerHooks[9]= nullCompilerHook;\r\tcompilerHooks[10]= nullCompilerHook;\r\tcompilerHooks[11]= nullCompilerHook;\r\tcompilerHooks[12]= nullCompilerHook;\r\tcompilerHooks[13]= nullCompilerHook;\r\tcompilerHooks[14]= nullCompilerHook;\r\tfoo->compilerInitialized = 0;\r}\r\r\r/*\tSet the imageFormatVersionNumber to a default value for this word\r\tsize. Normally this will have been set at image load time, but set it to\r\ta reasonable default if this has not been done. */\r\rsqInt initializeImageFormatVersionIfNeeded(void) {\r\tif (imageFormatVersionNumber == 0) {\r\t\tif ((BYTES_PER_WORD) == 8) {\r\t\t\timageFormatVersionNumber = 68000;\r\t\t} else {\r\t\t\timageFormatVersionNumber = 6502;\r\t\t}\r\t}\r}\r\r\r/*\tInitialize Interpreter state before starting execution of a new image. */\r\rsqInt initializeInterpreter(sqInt bytesToShift) {\rregister struct foo * foo = &fum;\r    sqInt i;\r    sqInt i1;\r    sqInt proc;\r    sqInt sched;\r    sqInt oop;\r    sqInt oop1;\r    sqInt activeCntx;\r    sqInt tmp;\r\r\tinterpreterProxy = sqGetInterpreterProxy();\r\tdummyReferToProxy();\r\tinitializeObjectMemory(bytesToShift);\r\tinitCompilerHooks();\r\tfoo->activeContext = foo->nilObj;\r\tfoo->theHomeContext = foo->nilObj;\r\tfoo->method = foo->nilObj;\r\tfoo->receiver = foo->nilObj;\r\tfoo->messageSelector = foo->nilObj;\r\tfoo->newMethod = foo->nilObj;\r\tfoo->methodClass = foo->nilObj;\r\tfoo->lkupClass = foo->nilObj;\r\tfoo->receiverClass = foo->nilObj;\r\tfoo->newNativeMethod = foo->nilObj;\r\t/* begin flushMethodCache */\r\tfor (i = 1; i <= MethodCacheSize; i += 1) {\r\t\tfoo->methodCache[i] = 0;\r\t}\r\t/* begin flushAtCache */\r\tfor (i1 = 1; i1 <= AtCacheTotalSize; i1 += 1) {\r\t\tfoo->atCache[i1] = 0;\r\t}\r\t/* begin loadInitialContext */\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\toop1 = foo->specialObjectsOop;\r\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\tsched = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\tproc = longAt((sched + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)));\r\tfoo->activeContext = longAt((proc + (BASE_HEADER_SIZE)) + (SuspendedContextIndex << (SHIFT_FOR_WORD)));\r\tif ((((usqInt) foo->activeContext)) < (((usqInt) foo->youngStart))) {\r\t\tbeRootIfOld(foo->activeContext);\r\t}\r\t/* begin fetchContextRegisters: */\r\tactiveCntx = foo->activeContext;\r\ttmp = longAt((activeCntx + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\tif ((tmp & 1)) {\r\t\ttmp = longAt((activeCntx + (BASE_HEADER_SIZE)) + (HomeIndex << (SHIFT_FOR_WORD)));\r\t\tif ((((usqInt) tmp)) < (((usqInt) foo->youngStart))) {\r\t\t\tbeRootIfOld(tmp);\r\t\t}\r\t} else {\r\t\ttmp = activeCntx;\r\t}\r\tfoo->theHomeContext = tmp;\r\tfoo->receiver = longAt((tmp + (BASE_HEADER_SIZE)) + (ReceiverIndex << (SHIFT_FOR_WORD)));\r\tfoo->method = longAt((tmp + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\ttmp = ((longAt((activeCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tfoo->instructionPointer = ((foo->method + tmp) + (BASE_HEADER_SIZE)) - 2;\r\ttmp = ((longAt((activeCntx + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tfoo->stackPointer = (activeCntx + (BASE_HEADER_SIZE)) + (((TempFrameStart + tmp) - 1) * (BYTES_PER_WORD));\r\tfoo->reclaimableContextCount = 0;\r\t/* begin initialCleanup */\r\tif (((longAt(foo->activeContext)) & (ROOT_BIT)) == 0) {\r\t\tgoto l1;\r\t}\r\tlongAtput(foo->activeContext, (longAt(foo->activeContext)) & (ALL_BUT_ROOT_BIT));\r\tflushExternalPrimitives();\rl1:\t/* end initialCleanup */;\r\tfoo->interruptCheckCounter = 0;\r\tfoo->interruptCheckCounterFeedBackReset = 1000;\r\tfoo->interruptChecksEveryNms = 1;\r\tfoo->nextPollTick = 0;\r\tfoo->nextWakeupTick = 0;\r\tfoo->lastTick = 0;\r\r\t/* cmd-. as used for Mac but no other OS */\r\r\tfoo->interruptKeycode = 2094;\r\tfoo->interruptPending = 0;\r\tfoo->semaphoresUseBufferA = 1;\r\tfoo->semaphoresToSignalCountA = 0;\r\tfoo->semaphoresToSignalCountB = 0;\r\tfoo->deferDisplayUpdates = 0;\r\tfoo->pendingFinalizationSignals = 0;\r\tfoo->globalSessionID = 0;\r\twhile (foo->globalSessionID == 0) {\r\t\tfoo->globalSessionID = time(NULL) + ioMSecs();\r\t}\r\tfoo->jmpDepth = 0;\r\tfoo->jmpMax = MaxJumpBuf;\r}\r\r\r/*\tInitialize endOfMemory to the top of oop storage space, reserving some space for forwarding blocks, and create the freeBlock from which space is allocated. Also create a fake free chunk at endOfMemory to act as a sentinal for memory scans.  */\r/*\tNote: The amount of space reserved for forwarding blocks should be chosen to ensure that incremental compactions can usually be done in a single pass. However, there should be enough forwarding blocks so a full compaction can be done in a reasonable number of passes, say ten. (A full compaction requires N object-moving passes, where N = number of non-garbage objects / number of forwarding blocks). \r\tdi 11/18/2000 Re totalObjectCount: Provide a margin of one byte per object to be used for forwarding pointers at GC time. Since fwd blocks are 8 bytes, this means an absolute worst case of 8 passes to compact memory. In most cases it will be adequate to do compaction in a single pass.  */\r\rsqInt initializeMemoryFirstFree(usqInt firstFree) {\rregister struct foo * foo = &fum;\r    usqInt fwdBlockBytes;\r\r\r\t/* reserve space for forwarding blocks */\r\r\tfwdBlockBytes = foo->totalObjectCount & (((WORD_MASK) - (BYTES_PER_WORD)) + 1);\r\tif (!((((usqInt) (foo->memoryLimit - fwdBlockBytes))) >= (((usqInt) (firstFree + (BASE_HEADER_SIZE)))))) {\r\r\t\t/* reserve enough space for a minimal free block of BaseHeaderSize bytes */\r\r\t\tfwdBlockBytes = foo->memoryLimit - (firstFree + (BASE_HEADER_SIZE));\r\t}\r\tfoo->endOfMemory = foo->memoryLimit - fwdBlockBytes;\r\tfoo->freeBlock = firstFree;\r\t/* begin setSizeOfFree:to: */\r\tlongAtput(foo->freeBlock, ((foo->endOfMemory - firstFree) & (ALL_BUT_TYPE_MASK)) | HeaderTypeFree);\r\t/* begin setSizeOfFree:to: */\r\tlongAtput(foo->endOfMemory, ((BASE_HEADER_SIZE) & (ALL_BUT_TYPE_MASK)) | HeaderTypeFree);\r\tif (DoAssertionChecks) {\r\t\tif (!((foo->freeBlock < foo->endOfMemory) && (foo->endOfMemory < foo->memoryLimit))) {\r\t\t\terror(\"error in free space computation\");\r\t\t}\r\t\tif (!((foo->endOfMemory + (foo->headerTypeBytes[(longAt(foo->endOfMemory)) & TypeMask])) == foo->endOfMemory)) {\r\t\t\terror(\"header format must have changed\");\r\t\t}\r\t\tif (!((objectAfter(foo->freeBlock)) == foo->endOfMemory)) {\r\t\t\terror(\"free block not properly initialized\");\r\t\t}\r\t}\r}\r\r\r/*\tInitialize object memory variables at startup time. Assume endOfMemory is initially set (by the image-reading code) to the end of the last object in the image. Initialization redefines endOfMemory to be the end of the object allocation area based on the total available memory, but reserving some space for forwarding blocks. */\r/*\tAssume: image reader initializes the following variables:\r\t\tmemory\r\t\tendOfMemory\r\t\tmemoryLimit\r\t\tspecialObjectsOop\r\t\tlastHash\r\t */\r/*\tdi 11/18/2000 fix slow full GC */\r/*\tset the start of the young object space */\r\rsqInt initializeObjectMemory(sqInt bytesToShift) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r    sqInt oop1;\r    sqInt oop2;\r\r\r\t/* image may be at a different address; adjust oops for new location */\r\r\tfoo->youngStart = foo->endOfMemory;\r\tfoo->totalObjectCount = adjustAllOopsBy(bytesToShift);\r\tinitializeMemoryFirstFree(foo->endOfMemory);\r\r\t/* heavily used special objects */\r\r\tfoo->specialObjectsOop += bytesToShift;\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\tfoo->nilObj = longAt((oop + (BASE_HEADER_SIZE)) + (NilObject << (SHIFT_FOR_WORD)));\r\t/* begin fetchPointer:ofObject: */\r\toop1 = foo->specialObjectsOop;\r\tfoo->falseObj = longAt((oop1 + (BASE_HEADER_SIZE)) + (FalseObject << (SHIFT_FOR_WORD)));\r\t/* begin fetchPointer:ofObject: */\r\toop2 = foo->specialObjectsOop;\r\tfoo->trueObj = longAt((oop2 + (BASE_HEADER_SIZE)) + (TrueObject << (SHIFT_FOR_WORD)));\r\tfoo->rootTableCount = 0;\r\tfoo->freeContexts = NilContext;\r\tfoo->freeLargeContexts = NilContext;\r\tfoo->allocationCount = 0;\r\tfoo->lowSpaceThreshold = 0;\r\tfoo->signalLowSpace = 0;\r\tfoo->compStart = 0;\r\tfoo->compEnd = 0;\r\tfoo->fwdTableNext = 0;\r\tfoo->fwdTableLast = 0;\r\tfoo->remapBufferCount = 0;\r\r\t/* do incremental GC after this many allocations */\r\r\tfoo->allocationsBetweenGCs = 4000;\r\r\t/* tenure all suriving objects if count is over this threshold */\r\r\tfoo->tenuringThreshold = 2000;\r\r\t/* four megabyte of headroom when growing */\r\r\tfoo->growHeadroom = (4 * 1024) * 1024;\r\r\t/* eight megabyte of free space before shrinking */\r\t/* garbage collection statistics */\r\r\tfoo->shrinkThreshold = (8 * 1024) * 1024;\r\tfoo->statFullGCs = 0;\r\tfoo->statFullGCMSecs = 0;\r\tfoo->statIncrGCs = 0;\r\tfoo->statIncrGCMSecs = 0;\r\tfoo->statTenures = 0;\r\tfoo->statRootTableOverflows = 0;\r\tfoo->statGrowMemory = 0;\r\tfoo->statShrinkMemory = 0;\r\tfoo->forceTenureFlag = 0;\r\tfoo->gcBiasToGrow = 0;\r\tfoo->gcBiasToGrowGCLimit = 0;\r\tfoo->extraRootCount = 0;\r}\r\r\r/*\tInstall the oop of this object in the given cache (at or atPut), along with\r\tits size, format and fixedSize */\r\rsqInt installinAtCacheatstring(sqInt rcvr, sqInt *cache, sqInt atIx, sqInt stringy) {\rregister struct foo * foo = &fum;\r    sqInt fixedFields;\r    sqInt fmt;\r    sqInt hdr;\r    sqInt totalLength;\r    sqInt sz;\r    sqInt class;\r    sqInt classFormat;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\thdr = longAt(rcvr);\r\tfmt = (((usqInt) hdr) >> 8) & 15;\r\tif ((fmt == 3) && ((((((usqInt) hdr) >> 12) & 31) == 13) || ((((((usqInt) hdr) >> 12) & 31) == 14) || (((((usqInt) hdr) >> 12) & 31) == 4)))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((hdr & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(rcvr - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz = hdr & (SIZE_MASK);\r\t}\r\tsz -= hdr & (SIZE_4_BIT);\r\tif (fmt <= 4) {\r\t\ttotalLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tgoto l1;\r\t}\r\tif (fmt < 8) {\r\t\ttotalLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> 2;\r\t\tgoto l1;\r\t} else {\r\t\ttotalLength = (sz - (BASE_HEADER_SIZE)) - (fmt & 3);\r\t\tgoto l1;\r\t}\rl1:\t/* end lengthOf:baseHeader:format: */;\r\t/* begin fixedFieldsOf:format:length: */\r\tif ((fmt > 4) || (fmt == 2)) {\r\t\tfixedFields = 0;\r\t\tgoto l3;\r\t}\r\tif (fmt < 2) {\r\t\tfixedFields = totalLength;\r\t\tgoto l3;\r\t}\r\t/* begin fetchClassOf: */\r\tif ((rcvr & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tclass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l2;\r\t}\r\tccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tclass = (longAt(rcvr - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tclass = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l2;\r\t}\rl2:\t/* end fetchClassOf: */;\r\tclassFormat = (longAt((class + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1;\r\tfixedFields = (((((usqInt) classFormat) >> 11) & 192) + ((((usqInt) classFormat) >> 2) & 63)) - 1;\rl3:\t/* end fixedFieldsOf:format:length: */;\r\tcache[atIx + AtCacheOop] = rcvr;\r\tif (stringy) {\r\t\tcache[atIx + AtCacheFmt] = (fmt + 16);\r\t} else {\r\t\tcache[atIx + AtCacheFmt] = fmt;\r\t}\r\tcache[atIx + AtCacheFixedFields] = fixedFields;\r\tcache[atIx + AtCacheSize] = (totalLength - fixedFields);\r}\r\r\r/*\tNOTE: This method supports the backward-compatible split instSize field of the \r\tclass format word. The sizeHiBits will go away and other shifts change by 2 \r\twhen the split fields get merged in an (incompatible) image change. */\r\rsqInt instantiateClassindexableSize(sqInt classPointer, sqInt size) {\rregister struct foo * foo = &fum;\r    sqInt binc;\r    sqInt bm1;\r    sqInt byteSize;\r    sqInt cClass;\r    sqInt classFormat;\r    sqInt fillWord;\r    sqInt format;\r    sqInt hash;\r    sqInt hdrSize;\r    sqInt header1;\r    sqInt header2;\r    sqInt header3;\r    sqInt newObj;\r    sqInt sizeHiBits;\r    usqInt end;\r    usqInt i;\r    sqInt newObj1;\r    sqInt remappedClassOop;\r    sqInt enoughSpace;\r    sqInt newChunk;\r    sqInt newFreeSize;\r    sqInt oop;\r    usqInt minFree;\r    sqInt currentProc;\r    sqInt lastSavedProcess;\r    sqInt sched;\r    sqInt oop4;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\tif (DoAssertionChecks) {\r\t\tif (size < 0) {\r\t\t\terror(\"cannot have a negative indexable field count\");\r\t\t}\r\t}\r\t/* begin newObjectHash */\r\tfoo->lastHash = (13849 + (27181 * foo->lastHash)) & 65535;\r\thash = foo->lastHash;\r\r\t/* Low 2 bits are 0 */\r\r\tclassFormat = (longAt((classPointer + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1;\r\theader1 = (classFormat & 130816) | ((hash << HashBitsOffset) & HashBits);\r\theader2 = classPointer;\r\theader3 = 0;\r\tsizeHiBits = ((usqInt) (classFormat & 393216)) >> 9;\r\r\t/* compact class field from format word */\r\r\tcClass = header1 & CompactClassMask;\r\r\t/* size in bytes -- low 2 bits are 0 */\r\t/* Note this byteSize comes from the format word of the class which is pre-shifted\r\t\tto 4 bytes per field.  Need another shift for 8 bytes per word... */\r\r\tbyteSize = (classFormat & ((SIZE_MASK) + (SIZE_4_BIT))) + sizeHiBits;\r\tbyteSize = byteSize << ((SHIFT_FOR_WORD) - 2);\r\tformat = (((usqInt) classFormat) >> 8) & 15;\r\tflag(\"sizeLowBits\");\r\tif (format < 8) {\r\t\tif (format == 6) {\r\r\t\t\t/* long32 bitmaps */\r\r\t\t\tbm1 = (BYTES_PER_WORD) - 1;\r\r\t\t\t/* round up */\r\r\t\t\tbyteSize = ((byteSize + (size * 4)) + bm1) & (LONG_SIZE_MASK);\r\r\t\t\t/* odd bytes */\r\t\t\t/* extra low bit (4) for 64-bit VM goes in 4-bit (betw hdr bits and sizeBits) */\r\r\t\t\tbinc = bm1 - (((size * 4) + bm1) & bm1);\r\t\t\theader1 = header1 | (binc & 4);\r\t\t} else {\r\r\t\t\t/* Arrays and 64-bit bitmaps */\r\r\t\t\tbyteSize += size * (BYTES_PER_WORD);\r\t\t}\r\t} else {\r\r\t\t/* Strings and Methods */\r\r\t\tbm1 = (BYTES_PER_WORD) - 1;\r\r\t\t/* round up */\r\r\t\tbyteSize = ((byteSize + size) + bm1) & (LONG_SIZE_MASK);\r\r\t\t/* odd bytes */\r\t\t/* low bits of byte size go in format field */\r\r\t\tbinc = bm1 - ((size + bm1) & bm1);\r\r\t\t/* extra low bit (4) for 64-bit VM goes in 4-bit (betw hdr bits and sizeBits) */\r\r\t\theader1 = header1 | ((binc & 3) << 8);\r\t\theader1 = header1 | (binc & 4);\r\t}\r\tif (byteSize > 255) {\r\r\t\t/* requires size header word */\r\r\t\theader3 = byteSize;\r\t\theader1 = header1;\r\t} else {\r\t\theader1 = header1 | byteSize;\r\t}\r\tif (header3 > 0) {\r\r\t\t/* requires full header */\r\r\t\thdrSize = 3;\r\t} else {\r\t\tif (cClass == 0) {\r\t\t\thdrSize = 2;\r\t\t} else {\r\t\t\thdrSize = 1;\r\t\t}\r\t}\r\tif (format <= 4) {\r\r\t\t/* if pointers, fill with nil oop */\r\r\t\tfillWord = foo->nilObj;\r\t} else {\r\t\tfillWord = 0;\r\t}\r\t/* begin allocate:headerSize:h1:h2:h3:doFill:with: */\r\tif (hdrSize > 1) {\r\t\t/* begin pushRemappableOop: */\r\t\tfoo->remapBuffer[(foo->remapBufferCount += 1)] = header2;\r\t}\r\t/* begin allocateChunk: */\r\tif (foo->allocationCount >= foo->allocationsBetweenGCs) {\r\t\tincrementalGC();\r\t}\r\t/* begin sufficientSpaceToAllocate: */\r\tminFree = (foo->lowSpaceThreshold + (byteSize + ((hdrSize - 1) * (BYTES_PER_WORD)))) + (BASE_HEADER_SIZE);\r\tif (oopisGreaterThanOrEqualTo((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), minFree)) {\r\t\tenoughSpace = 1;\r\t\tgoto l1;\r\t} else {\r\t\tenoughSpace = sufficientSpaceAfterGC(minFree);\r\t\tgoto l1;\r\t}\rl1:\t/* end sufficientSpaceToAllocate: */;\r\tif (!(enoughSpace)) {\r\t\tfoo->signalLowSpace = 1;\r\t\tfoo->lowSpaceThreshold = 0;\r\t\t/* begin saveProcessSignalingLowSpace */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop2 = foo->specialObjectsOop;\r\t\tlastSavedProcess = longAt((oop2 + (BASE_HEADER_SIZE)) + (ProcessSignalingLowSpace << (SHIFT_FOR_WORD)));\r\t\tif (lastSavedProcess == foo->nilObj) {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop3 = foo->specialObjectsOop;\r\t\t\toop4 = longAt((oop3 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\t\t\tsched = longAt((oop4 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\tcurrentProc = longAt((sched + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)));\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\toop1 = foo->specialObjectsOop;\r\t\t\tif ((((usqInt) oop1)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(oop1, currentProc);\r\t\t\t}\r\t\t\tlongAtput((oop1 + (BASE_HEADER_SIZE)) + (ProcessSignalingLowSpace << (SHIFT_FOR_WORD)), currentProc);\r\t\t}\r\t\t/* begin forceInterruptCheck */\r\t\tfoo->interruptCheckCounter = -1000;\r\t\tfoo->nextPollTick = 0;\r\t}\r\tif (oopisLessThan((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), (byteSize + ((hdrSize - 1) * (BYTES_PER_WORD))) + (BASE_HEADER_SIZE))) {\r\t\terror(\"out of memory\");\r\t}\r\tnewFreeSize = ((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK)) - (byteSize + ((hdrSize - 1) * (BYTES_PER_WORD)));\r\tnewChunk = foo->freeBlock;\r\tfoo->freeBlock += byteSize + ((hdrSize - 1) * (BYTES_PER_WORD));\r\t/* begin setSizeOfFree:to: */\r\tlongAtput(foo->freeBlock, (newFreeSize & (ALL_BUT_TYPE_MASK)) | HeaderTypeFree);\r\tfoo->allocationCount += 1;\r\tnewObj1 = newChunk;\r\tif (hdrSize > 1) {\r\t\t/* begin popRemappableOop */\r\t\toop = foo->remapBuffer[foo->remapBufferCount];\r\t\tfoo->remapBufferCount -= 1;\r\t\tremappedClassOop = oop;\r\t}\r\tif (hdrSize == 3) {\r\t\tlongAtput(newObj1, header3 | HeaderTypeSizeAndClass);\r\t\tlongAtput(newObj1 + (BYTES_PER_WORD), remappedClassOop | HeaderTypeSizeAndClass);\r\t\tlongAtput(newObj1 + ((BYTES_PER_WORD) * 2), header1 | HeaderTypeSizeAndClass);\r\t\tnewObj1 += (BYTES_PER_WORD) * 2;\r\t}\r\tif (hdrSize == 2) {\r\t\tlongAtput(newObj1, remappedClassOop | HeaderTypeClass);\r\t\tlongAtput(newObj1 + (BYTES_PER_WORD), header1 | HeaderTypeClass);\r\t\tnewObj1 += BYTES_PER_WORD;\r\t}\r\tif (hdrSize == 1) {\r\t\tlongAtput(newObj1, header1 | HeaderTypeShort);\r\t}\r\tif (1) {\r\t\tend = newObj1 + byteSize;\r\t\ti = newObj1 + (BYTES_PER_WORD);\r\t\twhile (i < end) {\r\t\t\tlongAtput(i, fillWord);\r\t\t\ti += BYTES_PER_WORD;\r\t\t}\r\t}\r\tif (DoAssertionChecks) {\r\t\tokayOop(newObj1);\r\t\toopHasOkayClass(newObj1);\r\t\tif (!((objectAfter(newObj1)) == foo->freeBlock)) {\r\t\t\terror(\"allocate bug: did not set header of new oop correctly\");\r\t\t}\r\t\tif (!((objectAfter(foo->freeBlock)) == foo->endOfMemory)) {\r\t\t\terror(\"allocate bug: did not set header of freeBlock correctly\");\r\t\t}\r\t}\r\tnewObj = newObj1;\r\treturn newObj;\r}\r\r\r/*\tThis version of instantiateClass assumes that the total object \r\tsize is under 256 bytes, the limit for objects with only one or \r\ttwo header words. Note that the size is specified in bytes \r\tand should include four bytes for the base header word. */\r\rsqInt instantiateContextsizeInBytes(sqInt classPointer, sqInt sizeInBytes) {\rregister struct foo * foo = &fum;\r    sqInt hash;\r    sqInt hdrSize;\r    sqInt header1;\r    sqInt header2;\r    sqInt extendedSize;\r    usqInt end;\r    usqInt i;\r    sqInt newObj;\r    sqInt remappedClassOop;\r    sqInt enoughSpace;\r    sqInt newChunk;\r    sqInt newFreeSize;\r    sqInt oop;\r    usqInt minFree;\r    sqInt currentProc;\r    sqInt lastSavedProcess;\r    sqInt sched;\r    sqInt oop4;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\t/* begin newObjectHash */\r\tfoo->lastHash = (13849 + (27181 * foo->lastHash)) & 65535;\r\thash = foo->lastHash;\r\theader1 = ((hash << HashBitsOffset) & HashBits) | ((longAt((classPointer + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1);\r\theader2 = classPointer;\r\tif ((header1 & CompactClassMask) > 0) {\r\r\t\t/* are contexts compact? */\r\r\t\thdrSize = 1;\r\t} else {\r\t\thdrSize = 2;\r\t}\r\tif (sizeInBytes <= (SIZE_MASK)) {\r\r\t\t/* OR size into header1.  Must not do this if size > SizeMask */\r\r\t\theader1 += sizeInBytes - (header1 & (SIZE_MASK));\r\t} else {\r\r\t\t/* Zero the size field of header1 if large */\r\r\t\thdrSize = 3;\r\t\theader1 -= header1 & (SIZE_MASK);\r\t}\r\tflag(\"Dan\");\r\t/* begin allocate:headerSize:h1:h2:h3:doFill:with: */\r\textendedSize = LARGE_CONTEXT_SIZE;\r\tif (hdrSize > 1) {\r\t\t/* begin pushRemappableOop: */\r\t\tfoo->remapBuffer[(foo->remapBufferCount += 1)] = header2;\r\t}\r\t/* begin allocateChunk: */\r\tif (foo->allocationCount >= foo->allocationsBetweenGCs) {\r\t\tincrementalGC();\r\t}\r\t/* begin sufficientSpaceToAllocate: */\r\tminFree = (foo->lowSpaceThreshold + (sizeInBytes + ((hdrSize - 1) * (BYTES_PER_WORD)))) + (BASE_HEADER_SIZE);\r\tif (oopisGreaterThanOrEqualTo((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), minFree)) {\r\t\tenoughSpace = 1;\r\t\tgoto l1;\r\t} else {\r\t\tenoughSpace = sufficientSpaceAfterGC(minFree);\r\t\tgoto l1;\r\t}\rl1:\t/* end sufficientSpaceToAllocate: */;\r\tif (!(enoughSpace)) {\r\t\tfoo->signalLowSpace = 1;\r\t\tfoo->lowSpaceThreshold = 0;\r\t\t/* begin saveProcessSignalingLowSpace */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop2 = foo->specialObjectsOop;\r\t\tlastSavedProcess = longAt((oop2 + (BASE_HEADER_SIZE)) + (ProcessSignalingLowSpace << (SHIFT_FOR_WORD)));\r\t\tif (lastSavedProcess == foo->nilObj) {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop3 = foo->specialObjectsOop;\r\t\t\toop4 = longAt((oop3 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\t\t\tsched = longAt((oop4 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\tcurrentProc = longAt((sched + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)));\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\toop1 = foo->specialObjectsOop;\r\t\t\tif ((((usqInt) oop1)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(oop1, currentProc);\r\t\t\t}\r\t\t\tlongAtput((oop1 + (BASE_HEADER_SIZE)) + (ProcessSignalingLowSpace << (SHIFT_FOR_WORD)), currentProc);\r\t\t}\r\t\t/* begin forceInterruptCheck */\r\t\tfoo->interruptCheckCounter = -1000;\r\t\tfoo->nextPollTick = 0;\r\t}\r\tif (oopisLessThan((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), (sizeInBytes + ((hdrSize - 1) * (BYTES_PER_WORD))) + (BASE_HEADER_SIZE))) {\r\t\terror(\"out of memory\");\r\t}\r\tnewFreeSize = ((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK)) - (sizeInBytes + ((hdrSize - 1) * (BYTES_PER_WORD)));\r\tnewChunk = foo->freeBlock;\r\tfoo->freeBlock += sizeInBytes + ((hdrSize - 1) * (BYTES_PER_WORD));\r\t/* begin setSizeOfFree:to: */\r\tlongAtput(foo->freeBlock, (newFreeSize & (ALL_BUT_TYPE_MASK)) | HeaderTypeFree);\r\tfoo->allocationCount += 1;\r\tnewObj = newChunk;\r\tif (hdrSize > 1) {\r\t\t/* begin popRemappableOop */\r\t\toop = foo->remapBuffer[foo->remapBufferCount];\r\t\tfoo->remapBufferCount -= 1;\r\t\tremappedClassOop = oop;\r\t}\r\tif (hdrSize == 3) {\r\t\tlongAtput(newObj, extendedSize | HeaderTypeSizeAndClass);\r\t\tlongAtput(newObj + (BYTES_PER_WORD), remappedClassOop | HeaderTypeSizeAndClass);\r\t\tlongAtput(newObj + ((BYTES_PER_WORD) * 2), header1 | HeaderTypeSizeAndClass);\r\t\tnewObj += (BYTES_PER_WORD) * 2;\r\t}\r\tif (hdrSize == 2) {\r\t\tlongAtput(newObj, remappedClassOop | HeaderTypeClass);\r\t\tlongAtput(newObj + (BYTES_PER_WORD), header1 | HeaderTypeClass);\r\t\tnewObj += BYTES_PER_WORD;\r\t}\r\tif (hdrSize == 1) {\r\t\tlongAtput(newObj, header1 | HeaderTypeShort);\r\t}\r\tif (0) {\r\t\tend = newObj + sizeInBytes;\r\t\ti = newObj + (BYTES_PER_WORD);\r\t\twhile (i < end) {\r\t\t\tlongAtput(i, 0);\r\t\t\ti += BYTES_PER_WORD;\r\t\t}\r\t}\r\tif (DoAssertionChecks) {\r\t\tokayOop(newObj);\r\t\toopHasOkayClass(newObj);\r\t\tif (!((objectAfter(newObj)) == foo->freeBlock)) {\r\t\t\terror(\"allocate bug: did not set header of new oop correctly\");\r\t\t}\r\t\tif (!((objectAfter(foo->freeBlock)) == foo->endOfMemory)) {\r\t\t\terror(\"allocate bug: did not set header of freeBlock correctly\");\r\t\t}\r\t}\r\treturn newObj;\r}\r\r\r/*\tThis version of instantiateClass assumes that the total object \r\tsize is under 256 bytes, the limit for objects with only one or \r\ttwo header words. Note that the size is specified in bytes \r\tand should include 4 or 8 bytes for the base header word. \r\tNOTE this code will only work for sizes that are an integral number of words\r\t\t(like not a 32-bit LargeInteger in a 64-bit system). \r\tMay cause a GC.\r\tNote that the created small object IS NOT FILLED and must be completed before returning it to Squeak. Since this call is used in routines that do jsut that we are safe. Break this rule and die. */\r\rsqInt instantiateSmallClasssizeInBytes(sqInt classPointer, sqInt sizeInBytes) {\rregister struct foo * foo = &fum;\r    sqInt hash;\r    sqInt hdrSize;\r    sqInt header1;\r    sqInt header2;\r    usqInt end;\r    usqInt i;\r    sqInt newObj;\r    sqInt remappedClassOop;\r    sqInt enoughSpace;\r    sqInt newChunk;\r    sqInt newFreeSize;\r    sqInt oop;\r    usqInt minFree;\r    sqInt currentProc;\r    sqInt lastSavedProcess;\r    sqInt sched;\r    sqInt oop4;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\tif (!((sizeInBytes & ((BYTES_PER_WORD) - 1)) == 0)) {\r\t\terror(\"size must be integral number of words\");\r\t}\r\t/* begin newObjectHash */\r\tfoo->lastHash = (13849 + (27181 * foo->lastHash)) & 65535;\r\thash = foo->lastHash;\r\theader1 = ((hash << HashBitsOffset) & HashBits) | ((longAt((classPointer + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1);\r\theader2 = classPointer;\r\tif ((header1 & CompactClassMask) > 0) {\r\r\t\t/* is this a compact class */\r\r\t\thdrSize = 1;\r\t} else {\r\t\thdrSize = 2;\r\t}\r\theader1 += sizeInBytes - (header1 & ((SIZE_MASK) + (SIZE_4_BIT)));\r\t/* begin allocate:headerSize:h1:h2:h3:doFill:with: */\r\tif (hdrSize > 1) {\r\t\t/* begin pushRemappableOop: */\r\t\tfoo->remapBuffer[(foo->remapBufferCount += 1)] = header2;\r\t}\r\t/* begin allocateChunk: */\r\tif (foo->allocationCount >= foo->allocationsBetweenGCs) {\r\t\tincrementalGC();\r\t}\r\t/* begin sufficientSpaceToAllocate: */\r\tminFree = (foo->lowSpaceThreshold + (sizeInBytes + ((hdrSize - 1) * (BYTES_PER_WORD)))) + (BASE_HEADER_SIZE);\r\tif (oopisGreaterThanOrEqualTo((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), minFree)) {\r\t\tenoughSpace = 1;\r\t\tgoto l1;\r\t} else {\r\t\tenoughSpace = sufficientSpaceAfterGC(minFree);\r\t\tgoto l1;\r\t}\rl1:\t/* end sufficientSpaceToAllocate: */;\r\tif (!(enoughSpace)) {\r\t\tfoo->signalLowSpace = 1;\r\t\tfoo->lowSpaceThreshold = 0;\r\t\t/* begin saveProcessSignalingLowSpace */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop2 = foo->specialObjectsOop;\r\t\tlastSavedProcess = longAt((oop2 + (BASE_HEADER_SIZE)) + (ProcessSignalingLowSpace << (SHIFT_FOR_WORD)));\r\t\tif (lastSavedProcess == foo->nilObj) {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop3 = foo->specialObjectsOop;\r\t\t\toop4 = longAt((oop3 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\t\t\tsched = longAt((oop4 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\tcurrentProc = longAt((sched + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)));\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\toop1 = foo->specialObjectsOop;\r\t\t\tif ((((usqInt) oop1)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(oop1, currentProc);\r\t\t\t}\r\t\t\tlongAtput((oop1 + (BASE_HEADER_SIZE)) + (ProcessSignalingLowSpace << (SHIFT_FOR_WORD)), currentProc);\r\t\t}\r\t\t/* begin forceInterruptCheck */\r\t\tfoo->interruptCheckCounter = -1000;\r\t\tfoo->nextPollTick = 0;\r\t}\r\tif (oopisLessThan((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), (sizeInBytes + ((hdrSize - 1) * (BYTES_PER_WORD))) + (BASE_HEADER_SIZE))) {\r\t\terror(\"out of memory\");\r\t}\r\tnewFreeSize = ((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK)) - (sizeInBytes + ((hdrSize - 1) * (BYTES_PER_WORD)));\r\tnewChunk = foo->freeBlock;\r\tfoo->freeBlock += sizeInBytes + ((hdrSize - 1) * (BYTES_PER_WORD));\r\t/* begin setSizeOfFree:to: */\r\tlongAtput(foo->freeBlock, (newFreeSize & (ALL_BUT_TYPE_MASK)) | HeaderTypeFree);\r\tfoo->allocationCount += 1;\r\tnewObj = newChunk;\r\tif (hdrSize > 1) {\r\t\t/* begin popRemappableOop */\r\t\toop = foo->remapBuffer[foo->remapBufferCount];\r\t\tfoo->remapBufferCount -= 1;\r\t\tremappedClassOop = oop;\r\t}\r\tif (hdrSize == 3) {\r\t\tlongAtput(newObj, 0 | HeaderTypeSizeAndClass);\r\t\tlongAtput(newObj + (BYTES_PER_WORD), remappedClassOop | HeaderTypeSizeAndClass);\r\t\tlongAtput(newObj + ((BYTES_PER_WORD) * 2), header1 | HeaderTypeSizeAndClass);\r\t\tnewObj += (BYTES_PER_WORD) * 2;\r\t}\r\tif (hdrSize == 2) {\r\t\tlongAtput(newObj, remappedClassOop | HeaderTypeClass);\r\t\tlongAtput(newObj + (BYTES_PER_WORD), header1 | HeaderTypeClass);\r\t\tnewObj += BYTES_PER_WORD;\r\t}\r\tif (hdrSize == 1) {\r\t\tlongAtput(newObj, header1 | HeaderTypeShort);\r\t}\r\tif (0) {\r\t\tend = newObj + sizeInBytes;\r\t\ti = newObj + (BYTES_PER_WORD);\r\t\twhile (i < end) {\r\t\t\tlongAtput(i, 0);\r\t\t\ti += BYTES_PER_WORD;\r\t\t}\r\t}\r\tif (DoAssertionChecks) {\r\t\tokayOop(newObj);\r\t\toopHasOkayClass(newObj);\r\t\tif (!((objectAfter(newObj)) == foo->freeBlock)) {\r\t\t\terror(\"allocate bug: did not set header of new oop correctly\");\r\t\t}\r\t\tif (!((objectAfter(foo->freeBlock)) == foo->endOfMemory)) {\r\t\t\terror(\"allocate bug: did not set header of freeBlock correctly\");\r\t\t}\r\t}\r\treturn newObj;\r}\r\rsqInt integerObjectOf(sqInt value) {\r\treturn (value << 1) + 1;\r}\r\r\r/*\tTranslator produces 'objectPointer >> 1' */\r\rsqInt integerValueOf(sqInt objectPointer) {\r\tif ((objectPointer & 2147483648U) != 0) {\r\t\treturn ((((usqInt) (objectPointer & 2147483647U)) >> 1) - 1073741823) - 1;\r\t} else {\r\t\treturn ((usqInt) objectPointer) >> 1;\r\t}\r}\r\rEXPORT(sqInt) internalIsImmutable(sqInt oop) {\r\treturn 0;\r}\r\rEXPORT(sqInt) internalIsMutable(sqInt oop) {\r\treturn 1;\r}\r\r\r/*\tThis is the main interpreter loop. It normally loops forever, fetching and executing bytecodes. When running in the context of a browser plugin VM, however, it must return control to the browser periodically. This should done only when the state of the currently running Squeak thread is safely stored in the object heap. Since this is the case at the moment that a check for interrupts is performed, that is when we return to the browser if it is time to do so. Interrupt checks happen quite frequently. */\r/*\tshould not be inlined into any senders */\r/*\trecord entry time when running as a browser plug-in */\r\rsqInt interpret(void) {\rregister struct foo * foo = &fum;\r    sqInt localReturnValue;\r    sqInt localReturnContext;\r    sqInt localHomeContext;\r    char* localSP;\r    char* localIP;\r    sqInt currentBytecode;\r\r\tbrowserPluginInitialiseIfNeeded();\r\tinitializeImageFormatVersionIfNeeded();\r\t/* begin internalizeIPandSP */\r\tlocalIP = pointerForOop(foo->instructionPointer);\r\tlocalSP = pointerForOop(foo->stackPointer);\r\tlocalHomeContext = foo->theHomeContext;\r\t/* begin fetchNextBytecode */\r\tcurrentBytecode = byteAtPointer(++localIP);\r\twhile (1) {\r\t\tswitch (currentBytecode) {\r\t\tcase 0:\r\t\t\t/* pushReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\tfieldIndex = 0 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->receiver;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 1:\r\t\t\t/* pushReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\tfieldIndex = 1 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->receiver;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 2:\r\t\t\t/* pushReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\tfieldIndex = 2 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->receiver;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 3:\r\t\t\t/* pushReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\tfieldIndex = 3 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->receiver;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 4:\r\t\t\t/* pushReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\tfieldIndex = 4 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->receiver;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 5:\r\t\t\t/* pushReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\tfieldIndex = 5 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->receiver;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 6:\r\t\t\t/* pushReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\tfieldIndex = 6 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->receiver;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 7:\r\t\t\t/* pushReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\tfieldIndex = 7 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->receiver;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 8:\r\t\t\t/* pushReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\tfieldIndex = 8 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->receiver;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 9:\r\t\t\t/* pushReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\tfieldIndex = 9 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->receiver;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 10:\r\t\t\t/* pushReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\tfieldIndex = 10 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->receiver;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 11:\r\t\t\t/* pushReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\tfieldIndex = 11 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->receiver;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 12:\r\t\t\t/* pushReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\tfieldIndex = 12 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->receiver;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 13:\r\t\t\t/* pushReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\tfieldIndex = 13 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->receiver;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 14:\r\t\t\t/* pushReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\tfieldIndex = 14 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->receiver;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 15:\r\t\t\t/* pushReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\tfieldIndex = 15 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->receiver;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 16:\r\t\t\t/* pushTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt temporaryIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\ttemporaryIndex = 16 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + ((temporaryIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 17:\r\t\t\t/* pushTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt temporaryIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\ttemporaryIndex = 17 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + ((temporaryIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 18:\r\t\t\t/* pushTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt temporaryIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\ttemporaryIndex = 18 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + ((temporaryIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 19:\r\t\t\t/* pushTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt temporaryIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\ttemporaryIndex = 19 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + ((temporaryIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 20:\r\t\t\t/* pushTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt temporaryIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\ttemporaryIndex = 20 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + ((temporaryIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 21:\r\t\t\t/* pushTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt temporaryIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\ttemporaryIndex = 21 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + ((temporaryIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 22:\r\t\t\t/* pushTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt temporaryIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\ttemporaryIndex = 22 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + ((temporaryIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 23:\r\t\t\t/* pushTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt temporaryIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\ttemporaryIndex = 23 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + ((temporaryIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 24:\r\t\t\t/* pushTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt temporaryIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\ttemporaryIndex = 24 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + ((temporaryIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 25:\r\t\t\t/* pushTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt temporaryIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\ttemporaryIndex = 25 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + ((temporaryIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 26:\r\t\t\t/* pushTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt temporaryIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\ttemporaryIndex = 26 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + ((temporaryIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 27:\r\t\t\t/* pushTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt temporaryIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\ttemporaryIndex = 27 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + ((temporaryIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 28:\r\t\t\t/* pushTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt temporaryIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\ttemporaryIndex = 28 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + ((temporaryIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 29:\r\t\t\t/* pushTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt temporaryIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\ttemporaryIndex = 29 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + ((temporaryIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 30:\r\t\t\t/* pushTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt temporaryIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\ttemporaryIndex = 30 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + ((temporaryIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 31:\r\t\t\t/* pushTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt temporaryIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\ttemporaryIndex = 31 & 15;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + ((temporaryIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 32:\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 32 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 33:\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 33 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 34:\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 34 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 35:\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 35 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 36:\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 36 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 37:\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 37 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 38:\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 38 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 39:\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 39 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 40:\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 40 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 41:\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 41 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 42:\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 42 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 43:\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 43 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 44:\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 44 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 45:\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 45 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 46:\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 46 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 47:\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 47 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 48:\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 48 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 49:\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 49 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 50:\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 50 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 51:\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 51 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 52:\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 52 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 53:\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 53 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 54:\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 54 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 55:\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 55 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 56:\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 56 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 57:\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 57 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 58:\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 58 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 59:\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 59 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 60:\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 60 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 61:\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 61 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 62:\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 62 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 63:\r\t\t\t/* pushLiteralConstantBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\tliteralIndex = 63 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tobject = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 64:\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 64 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 65:\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 65 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 66:\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 66 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 67:\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 67 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 68:\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 68 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 69:\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 69 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 70:\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 70 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 71:\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 71 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 72:\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 72 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 73:\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 73 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 74:\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 74 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 75:\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 75 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 76:\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 76 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 77:\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 77 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 78:\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 78 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 79:\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 79 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 80:\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 80 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 81:\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 81 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 82:\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 82 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 83:\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 83 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 84:\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 84 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 85:\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 85 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 86:\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 86 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 87:\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 87 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 88:\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 88 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 89:\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 89 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 90:\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 90 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 91:\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 91 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 92:\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 92 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 93:\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 93 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 94:\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 94 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 95:\r\t\t\t/* pushLiteralVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt literalIndex;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\tliteralIndex = 95 & 31;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\toop = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((literalIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 96:\r\t\t\t/* storeAndPopReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt top;\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\trcvr = foo->receiver;\r\t\t\t\ttop = longAtPointer(localSP);\r\t\t\t\tif ((((usqInt) rcvr)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\tpossibleRootStoreIntovalue(rcvr, top);\r\t\t\t\t}\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tfieldIndex = 96 & 7;\r\t\t\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), top);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 97:\r\t\t\t/* storeAndPopReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt top;\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\trcvr = foo->receiver;\r\t\t\t\ttop = longAtPointer(localSP);\r\t\t\t\tif ((((usqInt) rcvr)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\tpossibleRootStoreIntovalue(rcvr, top);\r\t\t\t\t}\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tfieldIndex = 97 & 7;\r\t\t\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), top);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 98:\r\t\t\t/* storeAndPopReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt top;\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\trcvr = foo->receiver;\r\t\t\t\ttop = longAtPointer(localSP);\r\t\t\t\tif ((((usqInt) rcvr)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\tpossibleRootStoreIntovalue(rcvr, top);\r\t\t\t\t}\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tfieldIndex = 98 & 7;\r\t\t\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), top);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 99:\r\t\t\t/* storeAndPopReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt top;\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\trcvr = foo->receiver;\r\t\t\t\ttop = longAtPointer(localSP);\r\t\t\t\tif ((((usqInt) rcvr)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\tpossibleRootStoreIntovalue(rcvr, top);\r\t\t\t\t}\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tfieldIndex = 99 & 7;\r\t\t\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), top);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 100:\r\t\t\t/* storeAndPopReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt top;\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\trcvr = foo->receiver;\r\t\t\t\ttop = longAtPointer(localSP);\r\t\t\t\tif ((((usqInt) rcvr)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\tpossibleRootStoreIntovalue(rcvr, top);\r\t\t\t\t}\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tfieldIndex = 100 & 7;\r\t\t\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), top);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 101:\r\t\t\t/* storeAndPopReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt top;\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\trcvr = foo->receiver;\r\t\t\t\ttop = longAtPointer(localSP);\r\t\t\t\tif ((((usqInt) rcvr)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\tpossibleRootStoreIntovalue(rcvr, top);\r\t\t\t\t}\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tfieldIndex = 101 & 7;\r\t\t\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), top);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 102:\r\t\t\t/* storeAndPopReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt top;\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\trcvr = foo->receiver;\r\t\t\t\ttop = longAtPointer(localSP);\r\t\t\t\tif ((((usqInt) rcvr)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\tpossibleRootStoreIntovalue(rcvr, top);\r\t\t\t\t}\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tfieldIndex = 102 & 7;\r\t\t\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), top);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 103:\r\t\t\t/* storeAndPopReceiverVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt top;\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\trcvr = foo->receiver;\r\t\t\t\ttop = longAtPointer(localSP);\r\t\t\t\tif ((((usqInt) rcvr)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\tpossibleRootStoreIntovalue(rcvr, top);\r\t\t\t\t}\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tfieldIndex = 103 & 7;\r\t\t\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), top);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 104:\r\t\t\t/* storeAndPopTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tfieldIndex = (104 & 7) + TempFrameStart;\r\t\t\t\toop = localHomeContext;\r\t\t\t\tvaluePointer = longAtPointer(localSP);\r\t\t\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 105:\r\t\t\t/* storeAndPopTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tfieldIndex = (105 & 7) + TempFrameStart;\r\t\t\t\toop = localHomeContext;\r\t\t\t\tvaluePointer = longAtPointer(localSP);\r\t\t\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 106:\r\t\t\t/* storeAndPopTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tfieldIndex = (106 & 7) + TempFrameStart;\r\t\t\t\toop = localHomeContext;\r\t\t\t\tvaluePointer = longAtPointer(localSP);\r\t\t\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 107:\r\t\t\t/* storeAndPopTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tfieldIndex = (107 & 7) + TempFrameStart;\r\t\t\t\toop = localHomeContext;\r\t\t\t\tvaluePointer = longAtPointer(localSP);\r\t\t\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 108:\r\t\t\t/* storeAndPopTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tfieldIndex = (108 & 7) + TempFrameStart;\r\t\t\t\toop = localHomeContext;\r\t\t\t\tvaluePointer = longAtPointer(localSP);\r\t\t\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 109:\r\t\t\t/* storeAndPopTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tfieldIndex = (109 & 7) + TempFrameStart;\r\t\t\t\toop = localHomeContext;\r\t\t\t\tvaluePointer = longAtPointer(localSP);\r\t\t\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 110:\r\t\t\t/* storeAndPopTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tfieldIndex = (110 & 7) + TempFrameStart;\r\t\t\t\toop = localHomeContext;\r\t\t\t\tvaluePointer = longAtPointer(localSP);\r\t\t\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 111:\r\t\t\t/* storeAndPopTemporaryVariableBytecode */\r\t\t\t{\r\t\t\t\tsqInt fieldIndex;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tflag(\"requires currentBytecode to be expanded to a constant\");\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tfieldIndex = (111 & 7) + TempFrameStart;\r\t\t\t\toop = localHomeContext;\r\t\t\t\tvaluePointer = longAtPointer(localSP);\r\t\t\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 112:\r\t\t\t/* pushReceiverBytecode */\r\t\t\t{\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin internalPush: */\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->receiver);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 113:\r\t\t\t/* pushConstantTrueBytecode */\r\t\t\t{\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin internalPush: */\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->trueObj);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 114:\r\t\t\t/* pushConstantFalseBytecode */\r\t\t\t{\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin internalPush: */\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->falseObj);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 115:\r\t\t\t/* pushConstantNilBytecode */\r\t\t\t{\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin internalPush: */\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->nilObj);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 116:\r\t\t\t/* pushConstantMinusOneBytecode */\r\t\t\t{\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin internalPush: */\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, ConstMinusOne);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 117:\r\t\t\t/* pushConstantZeroBytecode */\r\t\t\t{\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin internalPush: */\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, ConstZero);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 118:\r\t\t\t/* pushConstantOneBytecode */\r\t\t\t{\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin internalPush: */\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, ConstOne);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 119:\r\t\t\t/* pushConstantTwoBytecode */\r\t\t\t{\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin internalPush: */\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, ConstTwo);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 120:\r\t\t\t/* returnReceiver */\r\t\t\t{\r\t\t\t\tsqInt closureOrNil;\r\t\t\t\tsqInt context;\r\t\t\t\t/* begin sender */\r\t\t\t\tcontext = localHomeContext;\r\t\t\t\twhile ((closureOrNil = longAt((context + (BASE_HEADER_SIZE)) + (ClosureIndex << (SHIFT_FOR_WORD)))) != foo->nilObj) {\r\t\t\t\t\tcontext = longAt((closureOrNil + (BASE_HEADER_SIZE)) + (ClosureOuterContextIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t}\r\t\t\t\tlocalReturnContext = longAt((context + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlocalReturnValue = foo->receiver;\r\t\t\t\t/* goto commonReturn */\r\t\t\t}\r;\r\t\t\t\r\t\tcommonReturn:\r\t\t\t/* commonReturn */\r\t\t\t{\r\t\t\t\tsqInt contextOfCaller;\r\t\t\t\tsqInt localCntx;\r\t\t\t\tsqInt localVal;\r\t\t\t\tsqInt nilOop;\r\t\t\t\tsqInt thisCntx;\r\t\t\t\tsqInt unwindMarked;\r\t\t\t\tsqInt header;\r\t\t\t\tsqInt meth;\r\t\t\t\tsqInt pIndex;\r\t\t\t\tsqInt header1;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt oop2;\r\t\t\t\tsqInt oop3;\r\t\t\t\tsqInt primBits;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tsqInt valuePointer1;\r\t\t\t\tsqInt tmp;\r\t\t\t\tnilOop = foo->nilObj;\r\t\t\t\tthisCntx = foo->activeContext;\r\t\t\t\tlocalCntx = localReturnContext;\r\t\t\t\tlocalVal = localReturnValue;\r\t\t\t\tif ((localCntx == nilOop) || ((longAt((localCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)))) == nilOop)) {\r\t\t\t\t\t/* begin internalCannotReturn: */\r\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->activeContext);\r\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, localVal);\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\t\tfoo->messageSelector = longAt((oop1 + (BASE_HEADER_SIZE)) + (SelectorCannotReturn << (SHIFT_FOR_WORD)));\r\t\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\t\tgoto normalSend;\r\t\t\t\t\tgoto l42;\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->activeContext;\r\t\t\t\tthisCntx = longAt((oop + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\t\t\t\twhile (!(thisCntx == localCntx)) {\r\t\t\t\t\tif (thisCntx == nilOop) {\r\t\t\t\t\t\t/* begin internalCannotReturn: */\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->activeContext);\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, localVal);\r\t\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t\toop2 = foo->specialObjectsOop;\r\t\t\t\t\t\tfoo->messageSelector = longAt((oop2 + (BASE_HEADER_SIZE)) + (SelectorCannotReturn << (SHIFT_FOR_WORD)));\r\t\t\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\t\t\tgoto normalSend;\r\t\t\t\t\t\tgoto l42;\r\t\t\t\t\t}\r\t\t\t\t\t/* begin isUnwindMarked: */\r\t\t\t\t\theader = longAt(thisCntx);\r\t\t\t\t\tif (!(((((usqInt) header) >> 12) & 31) == 14)) {\r\t\t\t\t\t\tunwindMarked = 0;\r\t\t\t\t\t\tgoto l43;\r\t\t\t\t\t}\r\t\t\t\t\tmeth = longAt((thisCntx + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t\t/* begin primitiveIndexOf: */\r\t\t\t\t\tprimBits = (((usqInt) (longAt((meth + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD))))) >> 1) & 268435967;\r\t\t\t\t\tpIndex = (primBits & 511) + (((usqInt) primBits) >> 19);\r\t\t\t\t\tunwindMarked = pIndex == 198;\r\t\t\t\tl43:\t/* end isUnwindMarked: */;\r\t\t\t\t\tif (unwindMarked) {\r\t\t\t\t\t\t/* begin internalAboutToReturn:through: */\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->activeContext);\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, localVal);\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, thisCntx);\r\t\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t\toop3 = foo->specialObjectsOop;\r\t\t\t\t\t\tfoo->messageSelector = longAt((oop3 + (BASE_HEADER_SIZE)) + (SelectorAboutToReturn << (SHIFT_FOR_WORD)));\r\t\t\t\t\t\tfoo->argumentCount = 2;\r\t\t\t\t\t\tgoto normalSend;\r\t\t\t\t\t\tgoto l42;\r\t\t\t\t\t}\r\t\t\t\t\tthisCntx = longAt((thisCntx + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t}\r\t\t\t\tthisCntx = foo->activeContext;\r\t\t\t\twhile (!(thisCntx == localCntx)) {\r\t\t\t\t\tcontextOfCaller = longAt((thisCntx + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t\tlongAtput((thisCntx + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)), nilOop);\r\t\t\t\t\tlongAtput((thisCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), nilOop);\r\t\t\t\t\tif (foo->reclaimableContextCount > 0) {\r\t\t\t\t\t\tfoo->reclaimableContextCount -= 1;\r\t\t\t\t\t\t/* begin recycleContextIfPossible: */\r\t\t\t\t\t\tif ((((usqInt) thisCntx)) >= (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\t\theader1 = longAt(thisCntx);\r\t\t\t\t\t\t\tif (((((usqInt) header1) >> 12) & 31) == 14) {\r\t\t\t\t\t\t\t\tif ((header1 & (SIZE_MASK)) == (SMALL_CONTEXT_SIZE)) {\r\t\t\t\t\t\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\t\t\t\t\t\tvaluePointer = foo->freeContexts;\r\t\t\t\t\t\t\t\t\tlongAtput((thisCntx + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t\t\t\t\t\tfoo->freeContexts = thisCntx;\r\t\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\t\tif ((header1 & (SIZE_MASK)) == (LARGE_CONTEXT_SIZE)) {\r\t\t\t\t\t\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\t\t\t\t\t\tvaluePointer1 = foo->freeLargeContexts;\r\t\t\t\t\t\t\t\t\tlongAtput((thisCntx + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)), valuePointer1);\r\t\t\t\t\t\t\t\t\tfoo->freeLargeContexts = thisCntx;\r\t\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tthisCntx = contextOfCaller;\r\t\t\t\t}\r\t\t\t\tfoo->activeContext = thisCntx;\r\t\t\t\tif ((((usqInt) thisCntx)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\tbeRootIfOld(thisCntx);\r\t\t\t\t}\r\t\t\t\t/* begin internalFetchContextRegisters: */\r\t\t\t\ttmp = longAt((thisCntx + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tif ((tmp & 1)) {\r\t\t\t\t\ttmp = longAt((thisCntx + (BASE_HEADER_SIZE)) + (HomeIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t\tif ((((usqInt) tmp)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\tbeRootIfOld(tmp);\r\t\t\t\t\t}\r\t\t\t\t} else {\r\t\t\t\t\ttmp = thisCntx;\r\t\t\t\t}\r\t\t\t\tlocalHomeContext = tmp;\r\t\t\t\tfoo->receiver = longAt((tmp + (BASE_HEADER_SIZE)) + (ReceiverIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->method = longAt((tmp + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\t\t\t\ttmp = ((longAt((thisCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\t\t\t\tlocalIP = pointerForOop(((foo->method + tmp) + (BASE_HEADER_SIZE)) - 2);\r\t\t\t\ttmp = ((longAt((thisCntx + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\t\t\t\tlocalSP = pointerForOop((thisCntx + (BASE_HEADER_SIZE)) + (((TempFrameStart + tmp) - 1) * (BYTES_PER_WORD)));\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin internalPush: */\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, localVal);\r\t\t\t}\r;\r\t\tl42:\t/* end case */;\r\t\t\tbreak;\r\t\tcase 121:\r\t\t\t/* returnTrue */\r\t\t\t{\r\t\t\t\tsqInt closureOrNil;\r\t\t\t\tsqInt context;\r\t\t\t\t/* begin sender */\r\t\t\t\tcontext = localHomeContext;\r\t\t\t\twhile ((closureOrNil = longAt((context + (BASE_HEADER_SIZE)) + (ClosureIndex << (SHIFT_FOR_WORD)))) != foo->nilObj) {\r\t\t\t\t\tcontext = longAt((closureOrNil + (BASE_HEADER_SIZE)) + (ClosureOuterContextIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t}\r\t\t\t\tlocalReturnContext = longAt((context + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlocalReturnValue = foo->trueObj;\r\t\t\t\tgoto commonReturn;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 122:\r\t\t\t/* returnFalse */\r\t\t\t{\r\t\t\t\tsqInt closureOrNil;\r\t\t\t\tsqInt context;\r\t\t\t\t/* begin sender */\r\t\t\t\tcontext = localHomeContext;\r\t\t\t\twhile ((closureOrNil = longAt((context + (BASE_HEADER_SIZE)) + (ClosureIndex << (SHIFT_FOR_WORD)))) != foo->nilObj) {\r\t\t\t\t\tcontext = longAt((closureOrNil + (BASE_HEADER_SIZE)) + (ClosureOuterContextIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t}\r\t\t\t\tlocalReturnContext = longAt((context + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlocalReturnValue = foo->falseObj;\r\t\t\t\tgoto commonReturn;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 123:\r\t\t\t/* returnNil */\r\t\t\t{\r\t\t\t\tsqInt closureOrNil;\r\t\t\t\tsqInt context;\r\t\t\t\t/* begin sender */\r\t\t\t\tcontext = localHomeContext;\r\t\t\t\twhile ((closureOrNil = longAt((context + (BASE_HEADER_SIZE)) + (ClosureIndex << (SHIFT_FOR_WORD)))) != foo->nilObj) {\r\t\t\t\t\tcontext = longAt((closureOrNil + (BASE_HEADER_SIZE)) + (ClosureOuterContextIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t}\r\t\t\t\tlocalReturnContext = longAt((context + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlocalReturnValue = foo->nilObj;\r\t\t\t\tgoto commonReturn;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 124:\r\t\t\t/* returnTopFromMethod */\r\t\t\t{\r\t\t\t\tsqInt closureOrNil;\r\t\t\t\tsqInt context;\r\t\t\t\t/* begin sender */\r\t\t\t\tcontext = localHomeContext;\r\t\t\t\twhile ((closureOrNil = longAt((context + (BASE_HEADER_SIZE)) + (ClosureIndex << (SHIFT_FOR_WORD)))) != foo->nilObj) {\r\t\t\t\t\tcontext = longAt((closureOrNil + (BASE_HEADER_SIZE)) + (ClosureOuterContextIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t}\r\t\t\t\tlocalReturnContext = longAt((context + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlocalReturnValue = longAtPointer(localSP);\r\t\t\t\tgoto commonReturn;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 125:\r\t\t\t/* returnTopFromBlock */\r\t\t\t{\r\t\t\t\tsqInt oop;\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = foo->activeContext;\r\t\t\t\tlocalReturnContext = longAt((oop + (BASE_HEADER_SIZE)) + (CallerIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlocalReturnValue = longAtPointer(localSP);\r\t\t\t\tgoto commonReturn;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 126:\r\t\tcase 127:\r\t\t\t/* unknownBytecode */\r\t\t\t{\r\t\t\t\terror(\"Unknown bytecode\");\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 128:\r\t\t\t/* extendedPushBytecode */\r\t\t\t{\r\t\t\t\tsqInt descriptor;\r\t\t\t\tsqInt variableIndex;\r\t\t\t\tsqInt variableType;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt object1;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt object2;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tsqInt object3;\r\t\t\t\tsqInt oop2;\r\t\t\t\tsqInt methodPointer1;\r\t\t\t\tdescriptor = byteAtPointer(++localIP);\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\tvariableType = (((usqInt) descriptor) >> 6) & 3;\r\t\t\t\tvariableIndex = descriptor & 63;\r\t\t\t\tif (variableType == 0) {\r\t\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\toop = foo->receiver;\r\t\t\t\t\tobject = longAt((oop + (BASE_HEADER_SIZE)) + (variableIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t\t\tgoto l1;\r\t\t\t\t}\r\t\t\t\tif (variableType == 1) {\r\t\t\t\t\t/* begin pushTemporaryVariable: */\r\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\toop1 = localHomeContext;\r\t\t\t\t\tobject1 = longAt((oop1 + (BASE_HEADER_SIZE)) + ((variableIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object1);\r\t\t\t\t\tgoto l1;\r\t\t\t\t}\r\t\t\t\tif (variableType == 2) {\r\t\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\t\tmethodPointer = foo->method;\r\t\t\t\t\tobject2 = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((variableIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object2);\r\t\t\t\t\tgoto l1;\r\t\t\t\t}\r\t\t\t\tif (variableType == 3) {\r\t\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\t\tmethodPointer1 = foo->method;\r\t\t\t\t\toop2 = longAt((methodPointer1 + (BASE_HEADER_SIZE)) + ((variableIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tobject3 = longAt((oop2 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object3);\r\t\t\t\t\tgoto l1;\r\t\t\t\t}\r\t\t\t}\r;\r\t\tl1:\t/* end case */;\r\t\t\tbreak;\r\t\tcase 129:\r\t\t\t/* extendedStoreBytecode */\r\t\t\t{\r\t\t\t\tsqInt association;\r\t\t\t\tsqInt descriptor;\r\t\t\t\tsqInt variableIndex;\r\t\t\t\tsqInt variableType;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt valuePointer1;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tsqInt valuePointer2;\r\t\t\t\tdescriptor = byteAtPointer(++localIP);\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\tvariableType = (((usqInt) descriptor) >> 6) & 3;\r\t\t\t\tvariableIndex = descriptor & 63;\r\t\t\t\tif (variableType == 0) {\r\t\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\t\toop = foo->receiver;\r\t\t\t\t\tvaluePointer = longAtPointer(localSP);\r\t\t\t\t\tif ((((usqInt) oop)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\tpossibleRootStoreIntovalue(oop, valuePointer);\r\t\t\t\t\t}\r\t\t\t\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + (variableIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t\tgoto l2;\r\t\t\t\t}\r\t\t\t\tif (variableType == 1) {\r\t\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\t\toop1 = localHomeContext;\r\t\t\t\t\tvaluePointer1 = longAtPointer(localSP);\r\t\t\t\t\tlongAtput((oop1 + (BASE_HEADER_SIZE)) + ((variableIndex + TempFrameStart) << (SHIFT_FOR_WORD)), valuePointer1);\r\t\t\t\t\tgoto l2;\r\t\t\t\t}\r\t\t\t\tif (variableType == 2) {\r\t\t\t\t\terror(\"illegal store\");\r\t\t\t\t}\r\t\t\t\tif (variableType == 3) {\r\t\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\t\tmethodPointer = foo->method;\r\t\t\t\t\tassociation = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((variableIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\t\tvaluePointer2 = longAtPointer(localSP);\r\t\t\t\t\tif ((((usqInt) association)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\tpossibleRootStoreIntovalue(association, valuePointer2);\r\t\t\t\t\t}\r\t\t\t\t\tlongAtput((association + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)), valuePointer2);\r\t\t\t\t\tgoto l2;\r\t\t\t\t}\r\t\t\t}\r;\r\t\tl2:\t/* end case */;\r\t\t\tbreak;\r\t\tcase 130:\r\t\t\t/* extendedStoreAndPopBytecode */\r\t\t\t{\r\t\t\t\tsqInt association;\r\t\t\t\tsqInt descriptor;\r\t\t\t\tsqInt variableIndex;\r\t\t\t\tsqInt variableType;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt valuePointer1;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tsqInt valuePointer2;\r\t\t\t\t/* begin extendedStoreBytecode */\r\t\t\t\tdescriptor = byteAtPointer(++localIP);\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\tvariableType = (((usqInt) descriptor) >> 6) & 3;\r\t\t\t\tvariableIndex = descriptor & 63;\r\t\t\t\tif (variableType == 0) {\r\t\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\t\toop = foo->receiver;\r\t\t\t\t\tvaluePointer = longAtPointer(localSP);\r\t\t\t\t\tif ((((usqInt) oop)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\tpossibleRootStoreIntovalue(oop, valuePointer);\r\t\t\t\t\t}\r\t\t\t\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + (variableIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t\tgoto l3;\r\t\t\t\t}\r\t\t\t\tif (variableType == 1) {\r\t\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\t\toop1 = localHomeContext;\r\t\t\t\t\tvaluePointer1 = longAtPointer(localSP);\r\t\t\t\t\tlongAtput((oop1 + (BASE_HEADER_SIZE)) + ((variableIndex + TempFrameStart) << (SHIFT_FOR_WORD)), valuePointer1);\r\t\t\t\t\tgoto l3;\r\t\t\t\t}\r\t\t\t\tif (variableType == 2) {\r\t\t\t\t\terror(\"illegal store\");\r\t\t\t\t}\r\t\t\t\tif (variableType == 3) {\r\t\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\t\tmethodPointer = foo->method;\r\t\t\t\t\tassociation = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((variableIndex + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\t\tvaluePointer2 = longAtPointer(localSP);\r\t\t\t\t\tif ((((usqInt) association)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\tpossibleRootStoreIntovalue(association, valuePointer2);\r\t\t\t\t\t}\r\t\t\t\t\tlongAtput((association + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)), valuePointer2);\r\t\t\t\t\tgoto l3;\r\t\t\t\t}\r\t\t\tl3:\t/* end extendedStoreBytecode */;\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 131:\r\t\t\t/* singleExtendedSendBytecode */\r\t\t\t{\r\t\t\t\tsqInt descriptor;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tdescriptor = byteAtPointer(++localIP);\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + (((descriptor & 31) + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((usqInt) descriptor) >> 5;\r\t\t\t\t/* goto normalSend */\r\t\t\t}\r;\r\t\t\t\r\t\tnormalSend:\r\t\t\t/* normalSend */\r\t\t\t{\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt ccIndex;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt oop2;\r\t\t\t\trcvr = longAtPointer(localSP - (foo->argumentCount * (BYTES_PER_WORD)));\r\t\t\t\t/* begin fetchClassOf: */\r\t\t\t\tif ((rcvr & 1)) {\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\toop = foo->specialObjectsOop;\r\t\t\t\t\tfoo->lkupClass = longAt((oop + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\t\t\t\tgoto l44;\r\t\t\t\t}\r\t\t\t\tccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31;\r\t\t\t\tif (ccIndex == 0) {\r\t\t\t\t\tfoo->lkupClass = (longAt(rcvr - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\t\t\t\tgoto l44;\r\t\t\t\t} else {\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\toop2 = foo->specialObjectsOop;\r\t\t\t\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\t\t\t\tfoo->lkupClass = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tgoto l44;\r\t\t\t\t}\r\t\t\tl44:\t/* end fetchClassOf: */;\r\t\t\t\tfoo->receiverClass = foo->lkupClass;\r\t\t\t\t/* goto commonSend */\r\t\t\t}\r;\r\t\t\t\r\t\tcommonSend:\r\t\t\t/* commonSend */\r\t\t\t{\r\t\t\t\tsqInt ok;\r\t\t\t\tsqInt hash;\r\t\t\t\tsqInt probe;\r\t\t\t\tsqInt delta;\r\t\t\t\tsqInt localPrimIndex;\r\t\t\t\tsqInt nArgs;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt argCount2;\r\t\t\t\tsqInt i;\r\t\t\t\tsqInt methodHeader;\r\t\t\t\tsqInt needsLarge;\r\t\t\t\tsqInt newContext;\r\t\t\t\tsqInt tempCount;\r\t\t\t\tsqInt where;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tsqInt activeCntx;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tsqInt valuePointer1;\r\t\t\t\tsqInt tmp;\r\t\t\t\t/* begin internalFindNewMethod */\r\t\t\t\t/* begin lookupInMethodCacheSel:class: */\r\t\t\t\thash = foo->messageSelector ^ foo->lkupClass;\r\t\t\t\tprobe = hash & MethodCacheMask;\r\t\t\t\tif (((foo->methodCache[probe + MethodCacheSelector]) == foo->messageSelector) && ((foo->methodCache[probe + MethodCacheClass]) == foo->lkupClass)) {\r\t\t\t\t\tfoo->newMethod = foo->methodCache[probe + MethodCacheMethod];\r\t\t\t\t\tfoo->primitiveIndex = foo->methodCache[probe + MethodCachePrim];\r\t\t\t\t\tfoo->newNativeMethod = foo->methodCache[probe + MethodCacheNative];\r\t\t\t\t\tfoo->primitiveFunctionPointer = ((void *) (foo->methodCache[probe + MethodCachePrimFunction]));\r\t\t\t\t\tok = 1;\r\t\t\t\t\tgoto l45;\r\t\t\t\t}\r\t\t\t\tprobe = (((usqInt) hash) >> 1) & MethodCacheMask;\r\t\t\t\tif (((foo->methodCache[probe + MethodCacheSelector]) == foo->messageSelector) && ((foo->methodCache[probe + MethodCacheClass]) == foo->lkupClass)) {\r\t\t\t\t\tfoo->newMethod = foo->methodCache[probe + MethodCacheMethod];\r\t\t\t\t\tfoo->primitiveIndex = foo->methodCache[probe + MethodCachePrim];\r\t\t\t\t\tfoo->newNativeMethod = foo->methodCache[probe + MethodCacheNative];\r\t\t\t\t\tfoo->primitiveFunctionPointer = ((void *) (foo->methodCache[probe + MethodCachePrimFunction]));\r\t\t\t\t\tok = 1;\r\t\t\t\t\tgoto l45;\r\t\t\t\t}\r\t\t\t\tprobe = (((usqInt) hash) >> 2) & MethodCacheMask;\r\t\t\t\tif (((foo->methodCache[probe + MethodCacheSelector]) == foo->messageSelector) && ((foo->methodCache[probe + MethodCacheClass]) == foo->lkupClass)) {\r\t\t\t\t\tfoo->newMethod = foo->methodCache[probe + MethodCacheMethod];\r\t\t\t\t\tfoo->primitiveIndex = foo->methodCache[probe + MethodCachePrim];\r\t\t\t\t\tfoo->newNativeMethod = foo->methodCache[probe + MethodCacheNative];\r\t\t\t\t\tfoo->primitiveFunctionPointer = ((void *) (foo->methodCache[probe + MethodCachePrimFunction]));\r\t\t\t\t\tok = 1;\r\t\t\t\t\tgoto l45;\r\t\t\t\t}\r\t\t\t\tok = 0;\r\t\t\tl45:\t/* end lookupInMethodCacheSel:class: */;\r\t\t\t\tif (!(ok)) {\r\t\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t\tlookupMethodInClass(foo->lkupClass);\r\t\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\t\taddNewMethodToCache();\r\t\t\t\t}\r\t\t\t\t/* begin internalExecuteNewMethod */\r\t\t\t\tlocalPrimIndex = foo->primitiveIndex;\r\t\t\t\tif (localPrimIndex > 0) {\r\t\t\t\t\tif ((localPrimIndex > 255) && (localPrimIndex < 520)) {\r\t\t\t\t\t\tif (localPrimIndex >= 264) {\r\t\t\t\t\t\t\t/* begin internalPop:thenPush: */\r\t\t\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t\t\toop1 = longAtPointer(localSP);\r\t\t\t\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + ((localPrimIndex - 264) << (SHIFT_FOR_WORD)));\r\t\t\t\t\t\t\tlongAtPointerput(localSP -= (1 - 1) * (BYTES_PER_WORD), oop);\r\t\t\t\t\t\t\tgoto l46;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\tif (localPrimIndex == 256) {\r\t\t\t\t\t\t\t\tgoto l46;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\tif (localPrimIndex == 257) {\r\t\t\t\t\t\t\t\t/* begin internalPop:thenPush: */\r\t\t\t\t\t\t\t\tlongAtPointerput(localSP -= (1 - 1) * (BYTES_PER_WORD), foo->trueObj);\r\t\t\t\t\t\t\t\tgoto l46;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\tif (localPrimIndex == 258) {\r\t\t\t\t\t\t\t\t/* begin internalPop:thenPush: */\r\t\t\t\t\t\t\t\tlongAtPointerput(localSP -= (1 - 1) * (BYTES_PER_WORD), foo->falseObj);\r\t\t\t\t\t\t\t\tgoto l46;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\tif (localPrimIndex == 259) {\r\t\t\t\t\t\t\t\t/* begin internalPop:thenPush: */\r\t\t\t\t\t\t\t\tlongAtPointerput(localSP -= (1 - 1) * (BYTES_PER_WORD), foo->nilObj);\r\t\t\t\t\t\t\t\tgoto l46;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\t/* begin internalPop:thenPush: */\r\t\t\t\t\t\t\tlongAtPointerput(localSP -= (1 - 1) * (BYTES_PER_WORD), (((localPrimIndex - 261) << 1) | 1));\r\t\t\t\t\t\t\tgoto l46;\r\t\t\t\t\t\t}\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t\t\tif (DoBalanceChecks) {\r\t\t\t\t\t\t\tnArgs = foo->argumentCount;\r\t\t\t\t\t\t\tdelta = foo->stackPointer - foo->activeContext;\r\t\t\t\t\t\t}\r\t\t\t\t\t\tfoo->successFlag = 1;\r\t\t\t\t\t\tdispatchFunctionPointer(foo->primitiveFunctionPointer);\r\t\t\t\t\t\tif (DoBalanceChecks) {\r\t\t\t\t\t\t\tif (!(balancedStackafterPrimitivewithArgs(delta, localPrimIndex, nArgs))) {\r\t\t\t\t\t\t\t\tprintUnbalancedStack(localPrimIndex);\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t}\r\t\t\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t\t\tbrowserPluginReturnIfNeeded();\r\t\t\t\t\t\t\tgoto l46;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\t/* begin internalActivateNewMethod */\r\t\t\t\t/* begin headerOf: */\r\t\t\t\tmethodPointer = foo->newMethod;\r\t\t\t\tmethodHeader = longAt((methodPointer + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tneedsLarge = methodHeader & LargeContextBit;\r\t\t\t\tif ((needsLarge == 0) && (foo->freeContexts != NilContext)) {\r\t\t\t\t\tnewContext = foo->freeContexts;\r\t\t\t\t\tfoo->freeContexts = longAt((newContext + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)));\r\t\t\t\t} else {\r\t\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t\tnewContext = allocateOrRecycleContext(needsLarge);\r\t\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\t}\r\t\t\t\ttempCount = (((usqInt) methodHeader) >> 19) & 63;\r\t\t\t\twhere = newContext + (BASE_HEADER_SIZE);\r\t\t\t\tlongAtput(where + (SenderIndex << (SHIFT_FOR_WORD)), foo->activeContext);\r\t\t\t\tlongAtput(where + (InstructionPointerIndex << (SHIFT_FOR_WORD)), (((((LiteralStart + ((((usqInt) methodHeader) >> 10) & 255)) * (BYTES_PER_WORD)) + 1) << 1) | 1));\r\t\t\t\tlongAtput(where + (StackPointerIndex << (SHIFT_FOR_WORD)), ((tempCount << 1) | 1));\r\t\t\t\tlongAtput(where + (MethodIndex << (SHIFT_FOR_WORD)), foo->newMethod);\r\t\t\t\tlongAtput(where + (ClosureIndex << (SHIFT_FOR_WORD)), foo->nilObj);\r\t\t\t\targCount2 = foo->argumentCount;\r\t\t\t\tfor (i = 0; i <= argCount2; i += 1) {\r\t\t\t\t\tlongAtput(where + ((ReceiverIndex + i) << (SHIFT_FOR_WORD)), longAtPointer(localSP - ((argCount2 - i) * (BYTES_PER_WORD))));\r\t\t\t\t}\r\t\t\t\tmethodHeader = foo->nilObj;\r\t\t\t\tfor (i = ((argCount2 + 1) + ReceiverIndex); i <= (tempCount + ReceiverIndex); i += 1) {\r\t\t\t\t\tlongAtput(where + (i << (SHIFT_FOR_WORD)), methodHeader);\r\t\t\t\t}\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= (argCount2 + 1) * (BYTES_PER_WORD);\r\t\t\t\tfoo->reclaimableContextCount += 1;\r\t\t\t\t/* begin internalNewActiveContext: */\r\t\t\t\t/* begin internalStoreContextRegisters: */\r\t\t\t\tactiveCntx = foo->activeContext;\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tvaluePointer = (((((oopForPointer(localIP)) + 2) - (foo->method + (BASE_HEADER_SIZE))) << 1) | 1);\r\t\t\t\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tvaluePointer1 = (((((((usqInt) ((oopForPointer(localSP)) - (activeCntx + (BASE_HEADER_SIZE)))) >> (SHIFT_FOR_WORD)) - TempFrameStart) + 1) << 1) | 1);\r\t\t\t\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\t\t\t\tif ((((usqInt) newContext)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\tbeRootIfOld(newContext);\r\t\t\t\t}\r\t\t\t\tfoo->activeContext = newContext;\r\t\t\t\t/* begin internalFetchContextRegisters: */\r\t\t\t\ttmp = longAt((newContext + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tif ((tmp & 1)) {\r\t\t\t\t\ttmp = longAt((newContext + (BASE_HEADER_SIZE)) + (HomeIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t\tif ((((usqInt) tmp)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\tbeRootIfOld(tmp);\r\t\t\t\t\t}\r\t\t\t\t} else {\r\t\t\t\t\ttmp = newContext;\r\t\t\t\t}\r\t\t\t\tlocalHomeContext = tmp;\r\t\t\t\tfoo->receiver = longAt((tmp + (BASE_HEADER_SIZE)) + (ReceiverIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->method = longAt((tmp + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\t\t\t\ttmp = ((longAt((newContext + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\t\t\t\tlocalIP = pointerForOop(((foo->method + tmp) + (BASE_HEADER_SIZE)) - 2);\r\t\t\t\ttmp = ((longAt((newContext + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\t\t\t\tlocalSP = pointerForOop((newContext + (BASE_HEADER_SIZE)) + (((TempFrameStart + tmp) - 1) * (BYTES_PER_WORD)));\r\t\t\t\t/* begin internalQuickCheckForInterrupts */\r\t\t\t\tif ((foo->interruptCheckCounter -= 1) <= 0) {\r\t\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t\tcheckForInterrupts();\r\t\t\t\t\tbrowserPluginReturnIfNeeded();\r\t\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\t}\r\t\t\tl46:\t/* end internalExecuteNewMethod */;\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 132:\r\t\t\t/* doubleExtendedDoAnythingBytecode */\r\t\t\t{\r\t\t\t\tsqInt byte2;\r\t\t\t\tsqInt byte3;\r\t\t\t\tsqInt opType;\r\t\t\t\tsqInt top;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tsqInt methodPointer1;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt oop2;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt oop3;\r\t\t\t\tsqInt methodPointer2;\r\t\t\t\tsqInt object1;\r\t\t\t\tsqInt methodPointer3;\r\t\t\t\tsqInt object2;\r\t\t\t\tsqInt oop4;\r\t\t\t\tsqInt methodPointer4;\r\t\t\t\tbyte2 = byteAtPointer(++localIP);\r\t\t\t\tbyte3 = byteAtPointer(++localIP);\r\t\t\t\topType = ((usqInt) byte2) >> 5;\r\t\t\t\tif (opType == 0) {\r\t\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\t\tmethodPointer = foo->method;\r\t\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((byte3 + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tfoo->argumentCount = byte2 & 31;\r\t\t\t\t\tgoto normalSend;\r\t\t\t\t\tgoto l4;\r\t\t\t\t}\r\t\t\t\tif (opType == 1) {\r\t\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\t\tmethodPointer1 = foo->method;\r\t\t\t\t\tfoo->messageSelector = longAt((methodPointer1 + (BASE_HEADER_SIZE)) + ((byte3 + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tfoo->argumentCount = byte2 & 31;\r\t\t\t\t\tgoto commonSupersend;\r\t\t\t\t\tgoto l4;\r\t\t\t\t}\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\tif (opType == 2) {\r\t\t\t\t\t/* begin pushReceiverVariable: */\r\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\toop3 = foo->receiver;\r\t\t\t\t\tobject = longAt((oop3 + (BASE_HEADER_SIZE)) + (byte3 << (SHIFT_FOR_WORD)));\r\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t\t\tgoto l4;\r\t\t\t\t}\r\t\t\t\tif (opType == 3) {\r\t\t\t\t\t/* begin pushLiteralConstant: */\r\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\t\tmethodPointer3 = foo->method;\r\t\t\t\t\tobject1 = longAt((methodPointer3 + (BASE_HEADER_SIZE)) + ((byte3 + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object1);\r\t\t\t\t\tgoto l4;\r\t\t\t\t}\r\t\t\t\tif (opType == 4) {\r\t\t\t\t\t/* begin pushLiteralVariable: */\r\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\t\tmethodPointer4 = foo->method;\r\t\t\t\t\toop4 = longAt((methodPointer4 + (BASE_HEADER_SIZE)) + ((byte3 + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tobject2 = longAt((oop4 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object2);\r\t\t\t\t\tgoto l4;\r\t\t\t\t}\r\t\t\t\tif (opType == 5) {\r\t\t\t\t\ttop = longAtPointer(localSP);\r\t\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\t\toop = foo->receiver;\r\t\t\t\t\tif ((((usqInt) oop)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\tpossibleRootStoreIntovalue(oop, top);\r\t\t\t\t\t}\r\t\t\t\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + (byte3 << (SHIFT_FOR_WORD)), top);\r\t\t\t\t\tgoto l4;\r\t\t\t\t}\r\t\t\t\tif (opType == 6) {\r\t\t\t\t\ttop = longAtPointer(localSP);\r\t\t\t\t\t/* begin internalPop: */\r\t\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\t\toop1 = foo->receiver;\r\t\t\t\t\tif ((((usqInt) oop1)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\tpossibleRootStoreIntovalue(oop1, top);\r\t\t\t\t\t}\r\t\t\t\t\tlongAtput((oop1 + (BASE_HEADER_SIZE)) + (byte3 << (SHIFT_FOR_WORD)), top);\r\t\t\t\t\tgoto l4;\r\t\t\t\t}\r\t\t\t\tif (opType == 7) {\r\t\t\t\t\ttop = longAtPointer(localSP);\r\t\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\t\tmethodPointer2 = foo->method;\r\t\t\t\t\toop2 = longAt((methodPointer2 + (BASE_HEADER_SIZE)) + ((byte3 + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tif ((((usqInt) oop2)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\tpossibleRootStoreIntovalue(oop2, top);\r\t\t\t\t\t}\r\t\t\t\t\tlongAtput((oop2 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)), top);\r\t\t\t\t\tgoto l4;\r\t\t\t\t}\r\t\t\t}\r;\r\t\tl4:\t/* end case */;\r\t\t\tbreak;\r\t\tcase 133:\r\t\t\t/* singleExtendedSuperBytecode */\r\t\t\t{\r\t\t\t\tsqInt descriptor;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tdescriptor = byteAtPointer(++localIP);\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + (((descriptor & 31) + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((usqInt) descriptor) >> 5;\r\t\t\t\t/* goto commonSupersend */\r\t\t\t}\r;\r\t\t\t\r\t\tcommonSupersend:\r\t\t\t/* superclassSend */\r\t\t\t{\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt classPointer;\r\t\t\t\tsqInt ccIndex;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt oop2;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tsqInt oop3;\r\t\t\t\tsqInt offset;\r\t\t\t\t/* begin superclassOf: */\r\t\t\t\t/* begin methodClassOf: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\toffset = (literalCountOfHeader(longAt((methodPointer + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD))))) - 1;\r\t\t\t\toop3 = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tclassPointer = longAt((oop3 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->lkupClass = longAt((classPointer + (BASE_HEADER_SIZE)) + (SuperclassIndex << (SHIFT_FOR_WORD)));\r\t\t\t\trcvr = longAtPointer(localSP - (foo->argumentCount * (BYTES_PER_WORD)));\r\t\t\t\t/* begin fetchClassOf: */\r\t\t\t\tif ((rcvr & 1)) {\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\toop = foo->specialObjectsOop;\r\t\t\t\t\tfoo->receiverClass = longAt((oop + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\t\t\t\tgoto l47;\r\t\t\t\t}\r\t\t\t\tccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31;\r\t\t\t\tif (ccIndex == 0) {\r\t\t\t\t\tfoo->receiverClass = (longAt(rcvr - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\t\t\t\tgoto l47;\r\t\t\t\t} else {\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\toop2 = foo->specialObjectsOop;\r\t\t\t\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\t\t\t\tfoo->receiverClass = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tgoto l47;\r\t\t\t\t}\r\t\t\tl47:\t/* end fetchClassOf: */;\r\t\t\t\tgoto commonSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 134:\r\t\t\t/* secondExtendedSendBytecode */\r\t\t\t{\r\t\t\t\tsqInt descriptor;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\tdescriptor = byteAtPointer(++localIP);\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + (((descriptor & 63) + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((usqInt) descriptor) >> 6;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 135:\r\t\t\t/* popStackBytecode */\r\t\t\t{\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 136:\r\t\t\t/* duplicateTopBytecode */\r\t\t\t{\r\t\t\t\tsqInt object;\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin internalPush: */\r\t\t\t\tobject = longAtPointer(localSP);\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 137:\r\t\t\t/* pushActiveContextBytecode */\r\t\t\t{\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\tfoo->reclaimableContextCount = 0;\r\t\t\t\t/* begin internalPush: */\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->activeContext);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 138:\r\t\t\t/* pushNewArrayBytecode */\r\t\t\t{\r\t\t\t\tsqInt array;\r\t\t\t\tsqInt i;\r\t\t\t\tsqInt popValues;\r\t\t\t\tsqInt size;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tsize = byteAtPointer(++localIP);\r\t\t\t\tpopValues = size > 127;\r\t\t\t\tsize = size & 127;\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\tarray = instantiateClassindexableSize(fetchPointerofObject(ClassArray, foo->specialObjectsOop), size);\r\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\tif (popValues) {\r\t\t\t\t\tfor (i = 0; i <= (size - 1); i += 1) {\r\t\t\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\t\t\tvaluePointer = longAtPointer(localSP - (((size - i) - 1) * (BYTES_PER_WORD)));\r\t\t\t\t\t\tlongAtput((array + (BASE_HEADER_SIZE)) + (i << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t\t}\r\t\t\t\t\t/* begin internalPop: */\r\t\t\t\t\tlocalSP -= size * (BYTES_PER_WORD);\r\t\t\t\t}\r\t\t\t\t/* begin internalPush: */\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, array);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 139:\r\t\t\t/* unknownBytecode */\r\t\t\t{\r\t\t\t\terror(\"Unknown bytecode\");\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 140:\r\t\t\t/* pushRemoteTempLongBytecode */\r\t\t\t{\r\t\t\t\tsqInt remoteTempIndex;\r\t\t\t\tsqInt tempVectorIndex;\r\t\t\t\tsqInt tempVector;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt object;\r\t\t\t\tremoteTempIndex = byteAtPointer(++localIP);\r\t\t\t\ttempVectorIndex = byteAtPointer(++localIP);\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin pushRemoteTemp:inVectorAt: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\ttempVector = longAt((oop + (BASE_HEADER_SIZE)) + ((tempVectorIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\t/* begin internalPush: */\r\t\t\t\tobject = longAt((tempVector + (BASE_HEADER_SIZE)) + (remoteTempIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, object);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 141:\r\t\t\t/* storeRemoteTempLongBytecode */\r\t\t\t{\r\t\t\t\tsqInt remoteTempIndex;\r\t\t\t\tsqInt tempVectorIndex;\r\t\t\t\tsqInt tempVector;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tremoteTempIndex = byteAtPointer(++localIP);\r\t\t\t\ttempVectorIndex = byteAtPointer(++localIP);\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin storeRemoteTemp:inVectorAt: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\ttempVector = longAt((oop + (BASE_HEADER_SIZE)) + ((tempVectorIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\tvaluePointer = longAtPointer(localSP);\r\t\t\t\tif ((((usqInt) tempVector)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\tpossibleRootStoreIntovalue(tempVector, valuePointer);\r\t\t\t\t}\r\t\t\t\tlongAtput((tempVector + (BASE_HEADER_SIZE)) + (remoteTempIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 142:\r\t\t\t/* storeAndPopRemoteTempLongBytecode */\r\t\t\t{\r\t\t\t\tsqInt remoteTempIndex;\r\t\t\t\tsqInt tempVectorIndex;\r\t\t\t\tsqInt tempVector;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\t/* begin storeRemoteTempLongBytecode */\r\t\t\t\tremoteTempIndex = byteAtPointer(++localIP);\r\t\t\t\ttempVectorIndex = byteAtPointer(++localIP);\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin storeRemoteTemp:inVectorAt: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop = localHomeContext;\r\t\t\t\ttempVector = longAt((oop + (BASE_HEADER_SIZE)) + ((tempVectorIndex + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\tvaluePointer = longAtPointer(localSP);\r\t\t\t\tif ((((usqInt) tempVector)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\tpossibleRootStoreIntovalue(tempVector, valuePointer);\r\t\t\t\t}\r\t\t\t\tlongAtput((tempVector + (BASE_HEADER_SIZE)) + (remoteTempIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 143:\r\t\t\t/* pushClosureCopyCopiedValuesBytecode */\r\t\t\t{\r\t\t\t\tsqInt blockSize;\r\t\t\t\tsqInt i;\r\t\t\t\tsqInt newClosure;\r\t\t\t\tsqInt numArgs;\r\t\t\t\tsqInt numArgsNumCopied;\r\t\t\t\tsqInt numCopied;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tsqInt initialIP;\r\t\t\t\tsqInt newClosure1;\r\t\t\t\tsqInt valuePointer1;\r\t\t\t\tif ((BYTES_PER_WORD) == 4) {\r\t\t\t\t\timageFormatVersionNumber = 6504;\r\t\t\t\t} else {\r\t\t\t\t\timageFormatVersionNumber = 68002;\r\t\t\t\t}\r\t\t\t\tnumArgsNumCopied = byteAtPointer(++localIP);\r\t\t\t\tnumArgs = numArgsNumCopied & 15;\r\t\t\t\tnumCopied = ((usqInt) numArgsNumCopied >> 4);\r\t\t\t\tblockSize = (byteAtPointer(++localIP)) << 8;\r\t\t\t\tblockSize += byteAtPointer(++localIP);\r\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t/* begin closureNumArgs:instructionPointer:numCopiedValues: */\r\t\t\t\tinitialIP = ((oopForPointer(localIP)) + 2) - (foo->method + (BASE_HEADER_SIZE));\r\t\t\t\tnewClosure1 = instantiateSmallClasssizeInBytes(fetchPointerofObject(ClassBlockClosure, foo->specialObjectsOop), ((BYTES_PER_WORD) * (ClosureFirstCopiedValueIndex + numCopied)) + (BASE_HEADER_SIZE));\r\t\t\t\tlongAtput((newClosure1 + (BASE_HEADER_SIZE)) + (ClosureStartPCIndex << (SHIFT_FOR_WORD)), ((initialIP << 1) | 1));\r\t\t\t\tlongAtput((newClosure1 + (BASE_HEADER_SIZE)) + (ClosureNumArgsIndex << (SHIFT_FOR_WORD)), ((numArgs << 1) | 1));\r\t\t\t\tnewClosure = newClosure1;\r\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\tvaluePointer1 = foo->activeContext;\r\t\t\t\tlongAtput((newClosure + (BASE_HEADER_SIZE)) + (ClosureOuterContextIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\t\t\t\tfoo->reclaimableContextCount = 0;\r\t\t\t\tif (numCopied > 0) {\r\t\t\t\t\tfor (i = 0; i <= (numCopied - 1); i += 1) {\r\t\t\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\t\t\tvaluePointer = longAtPointer(localSP - (((numCopied - i) - 1) * (BYTES_PER_WORD)));\r\t\t\t\t\t\tlongAtput((newClosure + (BASE_HEADER_SIZE)) + ((i + ClosureFirstCopiedValueIndex) << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t\t}\r\t\t\t\t\t/* begin internalPop: */\r\t\t\t\t\tlocalSP -= numCopied * (BYTES_PER_WORD);\r\t\t\t\t}\r\t\t\t\tlocalIP += blockSize;\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin internalPush: */\r\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, newClosure);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 144:\r\t\t\t/* shortUnconditionalJump */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\t/* begin jump: */\r\t\t\t\toffset = (144 & 7) + 1;\r\t\t\t\tlocalIP = (localIP + offset) + 1;\r\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 145:\r\t\t\t/* shortUnconditionalJump */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\t/* begin jump: */\r\t\t\t\toffset = (145 & 7) + 1;\r\t\t\t\tlocalIP = (localIP + offset) + 1;\r\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 146:\r\t\t\t/* shortUnconditionalJump */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\t/* begin jump: */\r\t\t\t\toffset = (146 & 7) + 1;\r\t\t\t\tlocalIP = (localIP + offset) + 1;\r\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 147:\r\t\t\t/* shortUnconditionalJump */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\t/* begin jump: */\r\t\t\t\toffset = (147 & 7) + 1;\r\t\t\t\tlocalIP = (localIP + offset) + 1;\r\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 148:\r\t\t\t/* shortUnconditionalJump */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\t/* begin jump: */\r\t\t\t\toffset = (148 & 7) + 1;\r\t\t\t\tlocalIP = (localIP + offset) + 1;\r\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 149:\r\t\t\t/* shortUnconditionalJump */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\t/* begin jump: */\r\t\t\t\toffset = (149 & 7) + 1;\r\t\t\t\tlocalIP = (localIP + offset) + 1;\r\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 150:\r\t\t\t/* shortUnconditionalJump */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\t/* begin jump: */\r\t\t\t\toffset = (150 & 7) + 1;\r\t\t\t\tlocalIP = (localIP + offset) + 1;\r\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 151:\r\t\t\t/* shortUnconditionalJump */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\t/* begin jump: */\r\t\t\t\toffset = (151 & 7) + 1;\r\t\t\t\tlocalIP = (localIP + offset) + 1;\r\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 152:\r\t\tcase 153:\r\t\tcase 154:\r\t\tcase 155:\r\t\tcase 156:\r\t\tcase 157:\r\t\tcase 158:\r\t\tcase 159:\r\t\t\t/* shortConditionalJump */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt boolean;\r\t\t\t\tsqInt oop;\r\t\t\t\t/* begin jumplfFalseBy: */\r\t\t\t\toffset = (currentBytecode & 7) + 1;\r\t\t\t\tboolean = longAtPointer(localSP);\r\t\t\t\tif (boolean == foo->falseObj) {\r\t\t\t\t\t/* begin jump: */\r\t\t\t\t\tlocalIP = (localIP + offset) + 1;\r\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t} else {\r\t\t\t\t\tif (!(boolean == foo->trueObj)) {\r\t\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t\toop = foo->specialObjectsOop;\r\t\t\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + (SelectorMustBeBoolean << (SHIFT_FOR_WORD)));\r\t\t\t\t\t\tfoo->argumentCount = 0;\r\t\t\t\t\t\tgoto normalSend;\r\t\t\t\t\t\tgoto l5;\r\t\t\t\t\t}\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t}\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\tl5:\t/* end jumplfFalseBy: */;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 160:\r\t\tcase 161:\r\t\tcase 162:\r\t\tcase 163:\r\t\tcase 164:\r\t\tcase 165:\r\t\tcase 166:\r\t\tcase 167:\r\t\t\t/* longUnconditionalJump */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\toffset = (((currentBytecode & 7) - 4) * 256) + (byteAtPointer(++localIP));\r\t\t\t\tlocalIP += offset;\r\t\t\t\tif (offset < 0) {\r\t\t\t\t\t/* begin internalQuickCheckForInterrupts */\r\t\t\t\t\tif ((foo->interruptCheckCounter -= 1) <= 0) {\r\t\t\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t\t\tcheckForInterrupts();\r\t\t\t\t\t\tbrowserPluginReturnIfNeeded();\r\t\t\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 168:\r\t\tcase 169:\r\t\tcase 170:\r\t\tcase 171:\r\t\t\t/* longJumpIfTrue */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt boolean;\r\t\t\t\tsqInt oop;\r\t\t\t\t/* begin jumplfTrueBy: */\r\t\t\t\toffset = ((currentBytecode & 3) * 256) + (byteAtPointer(++localIP));\r\t\t\t\tboolean = longAtPointer(localSP);\r\t\t\t\tif (boolean == foo->trueObj) {\r\t\t\t\t\t/* begin jump: */\r\t\t\t\t\tlocalIP = (localIP + offset) + 1;\r\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t} else {\r\t\t\t\t\tif (!(boolean == foo->falseObj)) {\r\t\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t\toop = foo->specialObjectsOop;\r\t\t\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + (SelectorMustBeBoolean << (SHIFT_FOR_WORD)));\r\t\t\t\t\t\tfoo->argumentCount = 0;\r\t\t\t\t\t\tgoto normalSend;\r\t\t\t\t\t\tgoto l6;\r\t\t\t\t\t}\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t}\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\tl6:\t/* end jumplfTrueBy: */;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 172:\r\t\tcase 173:\r\t\tcase 174:\r\t\tcase 175:\r\t\t\t/* longJumpIfFalse */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt boolean;\r\t\t\t\tsqInt oop;\r\t\t\t\t/* begin jumplfFalseBy: */\r\t\t\t\toffset = ((currentBytecode & 3) * 256) + (byteAtPointer(++localIP));\r\t\t\t\tboolean = longAtPointer(localSP);\r\t\t\t\tif (boolean == foo->falseObj) {\r\t\t\t\t\t/* begin jump: */\r\t\t\t\t\tlocalIP = (localIP + offset) + 1;\r\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t} else {\r\t\t\t\t\tif (!(boolean == foo->trueObj)) {\r\t\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t\toop = foo->specialObjectsOop;\r\t\t\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + (SelectorMustBeBoolean << (SHIFT_FOR_WORD)));\r\t\t\t\t\t\tfoo->argumentCount = 0;\r\t\t\t\t\t\tgoto normalSend;\r\t\t\t\t\t\tgoto l7;\r\t\t\t\t\t}\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t}\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 1 * (BYTES_PER_WORD);\r\t\t\tl7:\t/* end jumplfFalseBy: */;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 176:\r\t\t\t/* bytecodePrimAdd */\r\t\t\t{\r\t\t\t\tsqInt arg;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt result;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\trcvr = longAtPointer(localSP - (1 * (BYTES_PER_WORD)));\r\t\t\t\targ = longAtPointer(localSP - (0 * (BYTES_PER_WORD)));\r\t\t\t\tif (((rcvr & arg) & 1) != 0) {\r\t\t\t\t\tresult = ((rcvr >> 1)) + ((arg >> 1));\r\t\t\t\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t\t\t\t(((((int) result)) ^ ((((int) result)) << 1)) >= 0)\r# else\r\t\t\t\t\t\t((result >= -1073741824) && (result <= 1073741823))\r# endif  // SQ_HOST32\r\t\t\t\t\t) {\r\t\t\t\t\t\t/* begin internalPop:thenPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP -= (2 - 1) * (BYTES_PER_WORD), ((result << 1) | 1));\r\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\tgoto l8;\r\t\t\t\t\t}\r\t\t\t\t} else {\r\t\t\t\t\tfoo->successFlag = 1;\r\t\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t\tprimitiveFloatAddtoArg(rcvr, arg);\r\t\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\tgoto l8;\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((0 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl8:\t/* end case */;\r\t\t\tbreak;\r\t\tcase 177:\r\t\t\t/* bytecodePrimSubtract */\r\t\t\t{\r\t\t\t\tsqInt arg;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt result;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\trcvr = longAtPointer(localSP - (1 * (BYTES_PER_WORD)));\r\t\t\t\targ = longAtPointer(localSP - (0 * (BYTES_PER_WORD)));\r\t\t\t\tif (((rcvr & arg) & 1) != 0) {\r\t\t\t\t\tresult = ((rcvr >> 1)) - ((arg >> 1));\r\t\t\t\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t\t\t\t(((((int) result)) ^ ((((int) result)) << 1)) >= 0)\r# else\r\t\t\t\t\t\t((result >= -1073741824) && (result <= 1073741823))\r# endif  // SQ_HOST32\r\t\t\t\t\t) {\r\t\t\t\t\t\t/* begin internalPop:thenPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP -= (2 - 1) * (BYTES_PER_WORD), ((result << 1) | 1));\r\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\tgoto l9;\r\t\t\t\t\t}\r\t\t\t\t} else {\r\t\t\t\t\tfoo->successFlag = 1;\r\t\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t\tprimitiveFloatSubtractfromArg(rcvr, arg);\r\t\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\tgoto l9;\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((1 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl9:\t/* end case */;\r\t\t\tbreak;\r\t\tcase 178:\r\t\t\t/* bytecodePrimLessThan */\r\t\t\t{\r\t\t\t\tsqInt aBool;\r\t\t\t\tsqInt arg;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt bytecode;\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt bytecode1;\r\t\t\t\tsqInt offset1;\r\t\t\t\tsqInt bytecode2;\r\t\t\t\tsqInt offset2;\r\t\t\t\tsqInt oop1;\r\t\t\t\trcvr = longAtPointer(localSP - (1 * (BYTES_PER_WORD)));\r\t\t\t\targ = longAtPointer(localSP - (0 * (BYTES_PER_WORD)));\r\t\t\t\tif (((rcvr & arg) & 1) != 0) {\r\t\t\t\t\t;\r\t\t\t\t\t/* begin booleanCheat: */\r\t\t\t\t\tbytecode1 = byteAtPointer(++localIP);\r\t\t\t\t\t/* begin internalPop: */\r\t\t\t\t\tlocalSP -= 2 * (BYTES_PER_WORD);\r\t\t\t\t\tif ((bytecode1 < 160) && (bytecode1 > 151)) {\r\t\t\t\t\t\tif (rcvr < arg) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l10;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + (bytecode1 - 151)) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l10;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tif (bytecode1 == 172) {\r\t\t\t\t\t\toffset1 = byteAtPointer(++localIP);\r\t\t\t\t\t\tif (rcvr < arg) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l10;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + offset1) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l10;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tlocalIP -= 1;\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tif (rcvr < arg) {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->trueObj);\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->falseObj);\r\t\t\t\t\t}\r\t\t\t\t\tgoto l10;\r\t\t\t\t}\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\taBool = primitiveFloatLessthanArg(rcvr, arg);\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin booleanCheat: */\r\t\t\t\t\tbytecode2 = byteAtPointer(++localIP);\r\t\t\t\t\t/* begin internalPop: */\r\t\t\t\t\tlocalSP -= 2 * (BYTES_PER_WORD);\r\t\t\t\t\tif ((bytecode2 < 160) && (bytecode2 > 151)) {\r\t\t\t\t\t\tif (aBool) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l10;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + (bytecode2 - 151)) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l10;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tif (bytecode2 == 172) {\r\t\t\t\t\t\toffset2 = byteAtPointer(++localIP);\r\t\t\t\t\t\tif (aBool) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l10;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + offset2) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l10;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tlocalIP -= 1;\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tif (aBool) {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->trueObj);\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->falseObj);\r\t\t\t\t\t}\r\t\t\t\t\tgoto l10;\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((2 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl10:\t/* end case */;\r\t\t\tbreak;\r\t\tcase 179:\r\t\t\t/* bytecodePrimGreaterThan */\r\t\t\t{\r\t\t\t\tsqInt aBool;\r\t\t\t\tsqInt arg;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt bytecode;\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt bytecode1;\r\t\t\t\tsqInt offset1;\r\t\t\t\tsqInt bytecode2;\r\t\t\t\tsqInt offset2;\r\t\t\t\tsqInt oop1;\r\t\t\t\trcvr = longAtPointer(localSP - (1 * (BYTES_PER_WORD)));\r\t\t\t\targ = longAtPointer(localSP - (0 * (BYTES_PER_WORD)));\r\t\t\t\tif (((rcvr & arg) & 1) != 0) {\r\t\t\t\t\t;\r\t\t\t\t\t/* begin booleanCheat: */\r\t\t\t\t\tbytecode1 = byteAtPointer(++localIP);\r\t\t\t\t\t/* begin internalPop: */\r\t\t\t\t\tlocalSP -= 2 * (BYTES_PER_WORD);\r\t\t\t\t\tif ((bytecode1 < 160) && (bytecode1 > 151)) {\r\t\t\t\t\t\tif (rcvr > arg) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l11;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + (bytecode1 - 151)) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l11;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tif (bytecode1 == 172) {\r\t\t\t\t\t\toffset1 = byteAtPointer(++localIP);\r\t\t\t\t\t\tif (rcvr > arg) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l11;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + offset1) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l11;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tlocalIP -= 1;\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tif (rcvr > arg) {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->trueObj);\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->falseObj);\r\t\t\t\t\t}\r\t\t\t\t\tgoto l11;\r\t\t\t\t}\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\taBool = primitiveFloatGreaterthanArg(rcvr, arg);\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin booleanCheat: */\r\t\t\t\t\tbytecode2 = byteAtPointer(++localIP);\r\t\t\t\t\t/* begin internalPop: */\r\t\t\t\t\tlocalSP -= 2 * (BYTES_PER_WORD);\r\t\t\t\t\tif ((bytecode2 < 160) && (bytecode2 > 151)) {\r\t\t\t\t\t\tif (aBool) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l11;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + (bytecode2 - 151)) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l11;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tif (bytecode2 == 172) {\r\t\t\t\t\t\toffset2 = byteAtPointer(++localIP);\r\t\t\t\t\t\tif (aBool) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l11;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + offset2) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l11;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tlocalIP -= 1;\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tif (aBool) {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->trueObj);\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->falseObj);\r\t\t\t\t\t}\r\t\t\t\t\tgoto l11;\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((3 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl11:\t/* end case */;\r\t\t\tbreak;\r\t\tcase 180:\r\t\t\t/* bytecodePrimLessOrEqual */\r\t\t\t{\r\t\t\t\tsqInt aBool;\r\t\t\t\tsqInt arg;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt bytecode;\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt bytecode1;\r\t\t\t\tsqInt offset1;\r\t\t\t\tsqInt bytecode2;\r\t\t\t\tsqInt offset2;\r\t\t\t\tsqInt oop1;\r\t\t\t\trcvr = longAtPointer(localSP - (1 * (BYTES_PER_WORD)));\r\t\t\t\targ = longAtPointer(localSP - (0 * (BYTES_PER_WORD)));\r\t\t\t\tif (((rcvr & arg) & 1) != 0) {\r\t\t\t\t\t;\r\t\t\t\t\t/* begin booleanCheat: */\r\t\t\t\t\tbytecode1 = byteAtPointer(++localIP);\r\t\t\t\t\t/* begin internalPop: */\r\t\t\t\t\tlocalSP -= 2 * (BYTES_PER_WORD);\r\t\t\t\t\tif ((bytecode1 < 160) && (bytecode1 > 151)) {\r\t\t\t\t\t\tif (rcvr <= arg) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l12;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + (bytecode1 - 151)) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l12;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tif (bytecode1 == 172) {\r\t\t\t\t\t\toffset1 = byteAtPointer(++localIP);\r\t\t\t\t\t\tif (rcvr <= arg) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l12;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + offset1) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l12;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tlocalIP -= 1;\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tif (rcvr <= arg) {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->trueObj);\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->falseObj);\r\t\t\t\t\t}\r\t\t\t\t\tgoto l12;\r\t\t\t\t}\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\taBool = primitiveFloatLessOrEqualtoArg(rcvr, arg);\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin booleanCheat: */\r\t\t\t\t\tbytecode2 = byteAtPointer(++localIP);\r\t\t\t\t\t/* begin internalPop: */\r\t\t\t\t\tlocalSP -= 2 * (BYTES_PER_WORD);\r\t\t\t\t\tif ((bytecode2 < 160) && (bytecode2 > 151)) {\r\t\t\t\t\t\tif (aBool) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l12;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + (bytecode2 - 151)) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l12;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tif (bytecode2 == 172) {\r\t\t\t\t\t\toffset2 = byteAtPointer(++localIP);\r\t\t\t\t\t\tif (aBool) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l12;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + offset2) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l12;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tlocalIP -= 1;\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tif (aBool) {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->trueObj);\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->falseObj);\r\t\t\t\t\t}\r\t\t\t\t\tgoto l12;\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((4 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl12:\t/* end case */;\r\t\t\tbreak;\r\t\tcase 181:\r\t\t\t/* bytecodePrimGreaterOrEqual */\r\t\t\t{\r\t\t\t\tsqInt aBool;\r\t\t\t\tsqInt arg;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt bytecode;\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt bytecode1;\r\t\t\t\tsqInt offset1;\r\t\t\t\tsqInt bytecode2;\r\t\t\t\tsqInt offset2;\r\t\t\t\tsqInt oop1;\r\t\t\t\trcvr = longAtPointer(localSP - (1 * (BYTES_PER_WORD)));\r\t\t\t\targ = longAtPointer(localSP - (0 * (BYTES_PER_WORD)));\r\t\t\t\tif (((rcvr & arg) & 1) != 0) {\r\t\t\t\t\t;\r\t\t\t\t\t/* begin booleanCheat: */\r\t\t\t\t\tbytecode1 = byteAtPointer(++localIP);\r\t\t\t\t\t/* begin internalPop: */\r\t\t\t\t\tlocalSP -= 2 * (BYTES_PER_WORD);\r\t\t\t\t\tif ((bytecode1 < 160) && (bytecode1 > 151)) {\r\t\t\t\t\t\tif (rcvr >= arg) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l13;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + (bytecode1 - 151)) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l13;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tif (bytecode1 == 172) {\r\t\t\t\t\t\toffset1 = byteAtPointer(++localIP);\r\t\t\t\t\t\tif (rcvr >= arg) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l13;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + offset1) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l13;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tlocalIP -= 1;\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tif (rcvr >= arg) {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->trueObj);\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->falseObj);\r\t\t\t\t\t}\r\t\t\t\t\tgoto l13;\r\t\t\t\t}\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\taBool = primitiveFloatGreaterOrEqualtoArg(rcvr, arg);\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin booleanCheat: */\r\t\t\t\t\tbytecode2 = byteAtPointer(++localIP);\r\t\t\t\t\t/* begin internalPop: */\r\t\t\t\t\tlocalSP -= 2 * (BYTES_PER_WORD);\r\t\t\t\t\tif ((bytecode2 < 160) && (bytecode2 > 151)) {\r\t\t\t\t\t\tif (aBool) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l13;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + (bytecode2 - 151)) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l13;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tif (bytecode2 == 172) {\r\t\t\t\t\t\toffset2 = byteAtPointer(++localIP);\r\t\t\t\t\t\tif (aBool) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l13;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + offset2) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l13;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tlocalIP -= 1;\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tif (aBool) {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->trueObj);\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->falseObj);\r\t\t\t\t\t}\r\t\t\t\t\tgoto l13;\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((5 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl13:\t/* end case */;\r\t\t\tbreak;\r\t\tcase 182:\r\t\t\t/* bytecodePrimEqual */\r\t\t\t{\r\t\t\t\tsqInt aBool;\r\t\t\t\tsqInt arg;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt bytecode;\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt bytecode1;\r\t\t\t\tsqInt offset1;\r\t\t\t\tsqInt oop1;\r\t\t\t\trcvr = longAtPointer(localSP - (1 * (BYTES_PER_WORD)));\r\t\t\t\targ = longAtPointer(localSP - (0 * (BYTES_PER_WORD)));\r\t\t\t\tif (((rcvr & arg) & 1) != 0) {\r\t\t\t\t\t/* begin booleanCheat: */\r\t\t\t\t\tbytecode = byteAtPointer(++localIP);\r\t\t\t\t\t/* begin internalPop: */\r\t\t\t\t\tlocalSP -= 2 * (BYTES_PER_WORD);\r\t\t\t\t\tif ((bytecode < 160) && (bytecode > 151)) {\r\t\t\t\t\t\tif (rcvr == arg) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l14;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + (bytecode - 151)) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l14;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tif (bytecode == 172) {\r\t\t\t\t\t\toffset = byteAtPointer(++localIP);\r\t\t\t\t\t\tif (rcvr == arg) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l14;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + offset) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l14;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tlocalIP -= 1;\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tif (rcvr == arg) {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->trueObj);\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->falseObj);\r\t\t\t\t\t}\r\t\t\t\t\tgoto l14;\r\t\t\t\t}\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\taBool = primitiveFloatEqualtoArg(rcvr, arg);\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin booleanCheat: */\r\t\t\t\t\tbytecode1 = byteAtPointer(++localIP);\r\t\t\t\t\t/* begin internalPop: */\r\t\t\t\t\tlocalSP -= 2 * (BYTES_PER_WORD);\r\t\t\t\t\tif ((bytecode1 < 160) && (bytecode1 > 151)) {\r\t\t\t\t\t\tif (aBool) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l14;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + (bytecode1 - 151)) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l14;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tif (bytecode1 == 172) {\r\t\t\t\t\t\toffset1 = byteAtPointer(++localIP);\r\t\t\t\t\t\tif (aBool) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l14;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + offset1) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l14;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tlocalIP -= 1;\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tif (aBool) {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->trueObj);\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->falseObj);\r\t\t\t\t\t}\r\t\t\t\t\tgoto l14;\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((6 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl14:\t/* end case */;\r\t\t\tbreak;\r\t\tcase 183:\r\t\t\t/* bytecodePrimNotEqual */\r\t\t\t{\r\t\t\t\tsqInt aBool;\r\t\t\t\tsqInt arg;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt bytecode;\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt bytecode1;\r\t\t\t\tsqInt offset1;\r\t\t\t\tsqInt oop1;\r\t\t\t\trcvr = longAtPointer(localSP - (1 * (BYTES_PER_WORD)));\r\t\t\t\targ = longAtPointer(localSP - (0 * (BYTES_PER_WORD)));\r\t\t\t\tif (((rcvr & arg) & 1) != 0) {\r\t\t\t\t\t/* begin booleanCheat: */\r\t\t\t\t\tbytecode = byteAtPointer(++localIP);\r\t\t\t\t\t/* begin internalPop: */\r\t\t\t\t\tlocalSP -= 2 * (BYTES_PER_WORD);\r\t\t\t\t\tif ((bytecode < 160) && (bytecode > 151)) {\r\t\t\t\t\t\tif (rcvr != arg) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l15;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + (bytecode - 151)) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l15;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tif (bytecode == 172) {\r\t\t\t\t\t\toffset = byteAtPointer(++localIP);\r\t\t\t\t\t\tif (rcvr != arg) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l15;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + offset) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l15;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tlocalIP -= 1;\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tif (rcvr != arg) {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->trueObj);\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->falseObj);\r\t\t\t\t\t}\r\t\t\t\t\tgoto l15;\r\t\t\t\t}\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\taBool = primitiveFloatEqualtoArg(rcvr, arg);\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin booleanCheat: */\r\t\t\t\t\tbytecode1 = byteAtPointer(++localIP);\r\t\t\t\t\t/* begin internalPop: */\r\t\t\t\t\tlocalSP -= 2 * (BYTES_PER_WORD);\r\t\t\t\t\tif ((bytecode1 < 160) && (bytecode1 > 151)) {\r\t\t\t\t\t\tif (!aBool) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l15;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + (bytecode1 - 151)) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l15;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tif (bytecode1 == 172) {\r\t\t\t\t\t\toffset1 = byteAtPointer(++localIP);\r\t\t\t\t\t\tif (!aBool) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l15;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\t\tlocalIP = (localIP + offset1) + 1;\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\t\tgoto l15;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tlocalIP -= 1;\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tif (!aBool) {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->trueObj);\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->falseObj);\r\t\t\t\t\t}\r\t\t\t\t\tgoto l15;\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((7 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl15:\t/* end case */;\r\t\t\tbreak;\r\t\tcase 184:\r\t\t\t/* bytecodePrimMultiply */\r\t\t\t{\r\t\t\t\tsqInt arg;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt result;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\trcvr = longAtPointer(localSP - (1 * (BYTES_PER_WORD)));\r\t\t\t\targ = longAtPointer(localSP - (0 * (BYTES_PER_WORD)));\r\t\t\t\tif (((rcvr & arg) & 1) != 0) {\r\t\t\t\t\trcvr = (rcvr >> 1);\r\t\t\t\t\targ = (arg >> 1);\r\t\t\t\t\tresult = rcvr * arg;\r\t\t\t\t\tif (((arg == 0) || ((result / arg) == rcvr)) && (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t(((((int) result)) ^ ((((int) result)) << 1)) >= 0)\r# else\r\t((result >= -1073741824) && (result <= 1073741823))\r# endif  // SQ_HOST32\r)) {\r\t\t\t\t\t\t/* begin internalPop:thenPush: */\r\t\t\t\t\t\tlongAtPointerput(localSP -= (2 - 1) * (BYTES_PER_WORD), ((result << 1) | 1));\r\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\tgoto l16;\r\t\t\t\t\t}\r\t\t\t\t} else {\r\t\t\t\t\tfoo->successFlag = 1;\r\t\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t\tprimitiveFloatMultiplybyArg(rcvr, arg);\r\t\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\tgoto l16;\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((8 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl16:\t/* end case */;\r\t\t\tbreak;\r\t\tcase 185:\r\t\t\t/* bytecodePrimDivide */\r\t\t\t{\r\t\t\t\tsqInt arg;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt result;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\trcvr = longAtPointer(localSP - (1 * (BYTES_PER_WORD)));\r\t\t\t\targ = longAtPointer(localSP - (0 * (BYTES_PER_WORD)));\r\t\t\t\tif (((rcvr & arg) & 1) != 0) {\r\t\t\t\t\trcvr = (rcvr >> 1);\r\t\t\t\t\targ = (arg >> 1);\r\t\t\t\t\tif ((arg != 0) && ((rcvr % arg) == 0)) {\r\t\t\t\t\t\tresult = rcvr / arg;\r\t\t\t\t\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t\t\t\t\t(((((int) result)) ^ ((((int) result)) << 1)) >= 0)\r# else\r\t\t\t\t\t\t\t((result >= -1073741824) && (result <= 1073741823))\r# endif  // SQ_HOST32\r\t\t\t\t\t\t) {\r\t\t\t\t\t\t\t/* begin internalPop:thenPush: */\r\t\t\t\t\t\t\tlongAtPointerput(localSP -= (2 - 1) * (BYTES_PER_WORD), ((result << 1) | 1));\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\tgoto l17;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t} else {\r\t\t\t\t\tfoo->successFlag = 1;\r\t\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t\tprimitiveFloatDividebyArg(rcvr, arg);\r\t\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\tgoto l17;\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((9 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl17:\t/* end case */;\r\t\t\tbreak;\r\t\tcase 186:\r\t\t\t/* bytecodePrimMod */\r\t\t\t{\r\t\t\t\tsqInt mod;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\tmod = doPrimitiveModby(longAtPointer(localSP - (1 * (BYTES_PER_WORD))), longAtPointer(localSP - (0 * (BYTES_PER_WORD))));\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin internalPop:thenPush: */\r\t\t\t\t\tlongAtPointerput(localSP -= (2 - 1) * (BYTES_PER_WORD), ((mod << 1) | 1));\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tgoto l18;\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((10 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl18:\t/* end case */;\r\t\t\tbreak;\r\t\tcase 187:\r\t\t\t/* bytecodePrimMakePoint */\r\t\t\t{\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt argument;\r\t\t\t\tsqInt pt;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt sp;\r\t\t\t\tsqInt pointResult;\r\t\t\t\tsqInt pointResult1;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tsqInt pointResult2;\r\t\t\t\tsqInt valuePointer1;\r\t\t\t\tsqInt valuePointer2;\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t/* begin primitiveMakePoint */\r\t\t\t\targument = longAt(foo->stackPointer);\r\t\t\t\trcvr = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t\t\t\tif ((rcvr & 1)) {\r\t\t\t\t\tif ((argument & 1)) {\r\t\t\t\t\t\t/* begin makePointwithxValue:yValue: */\r\t\t\t\t\t\tpointResult = instantiateSmallClasssizeInBytes(fetchPointerofObject(ClassPoint, foo->specialObjectsOop), 3 * (BYTES_PER_WORD));\r\t\t\t\t\t\tlongAtput((pointResult + (BASE_HEADER_SIZE)) + (XIndex << (SHIFT_FOR_WORD)), ((((rcvr >> 1)) << 1) | 1));\r\t\t\t\t\t\tlongAtput((pointResult + (BASE_HEADER_SIZE)) + (YIndex << (SHIFT_FOR_WORD)), ((((argument >> 1)) << 1) | 1));\r\t\t\t\t\t\tpt = pointResult;\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin makePointwithxValue:yValue: */\r\t\t\t\t\t\tpointResult1 = instantiateSmallClasssizeInBytes(fetchPointerofObject(ClassPoint, foo->specialObjectsOop), 3 * (BYTES_PER_WORD));\r\t\t\t\t\t\tlongAtput((pointResult1 + (BASE_HEADER_SIZE)) + (XIndex << (SHIFT_FOR_WORD)), ((((rcvr >> 1)) << 1) | 1));\r\t\t\t\t\t\tlongAtput((pointResult1 + (BASE_HEADER_SIZE)) + (YIndex << (SHIFT_FOR_WORD)), ((0 << 1) | 1));\r\t\t\t\t\t\tpt = pointResult1;\r\t\t\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\t\t\tvaluePointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t\t\t\t\t\tif ((((usqInt) pt)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\t\tpossibleRootStoreIntovalue(pt, valuePointer);\r\t\t\t\t\t\t}\r\t\t\t\t\t\tlongAtput((pt + (BASE_HEADER_SIZE)) + (1 << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t\t}\r\t\t\t\t} else {\r\t\t\t\t\tif (!((fetchClassOf(rcvr)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop)))) {\r\t\t\t\t\t\t/* begin success: */\r\t\t\t\t\t\tfoo->successFlag = 0 && foo->successFlag;\r\t\t\t\t\t\tgoto l20;\r\t\t\t\t\t}\r\t\t\t\t\t/* begin makePointwithxValue:yValue: */\r\t\t\t\t\tpointResult2 = instantiateSmallClasssizeInBytes(fetchPointerofObject(ClassPoint, foo->specialObjectsOop), 3 * (BYTES_PER_WORD));\r\t\t\t\t\tlongAtput((pointResult2 + (BASE_HEADER_SIZE)) + (XIndex << (SHIFT_FOR_WORD)), ((0 << 1) | 1));\r\t\t\t\t\tlongAtput((pointResult2 + (BASE_HEADER_SIZE)) + (YIndex << (SHIFT_FOR_WORD)), ((0 << 1) | 1));\r\t\t\t\t\tpt = pointResult2;\r\t\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\t\tvaluePointer1 = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t\t\t\t\tif ((((usqInt) pt)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\tpossibleRootStoreIntovalue(pt, valuePointer1);\r\t\t\t\t\t}\r\t\t\t\t\tlongAtput((pt + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)), valuePointer1);\r\t\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\t\tvaluePointer2 = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t\t\t\t\tif ((((usqInt) pt)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\tpossibleRootStoreIntovalue(pt, valuePointer2);\r\t\t\t\t\t}\r\t\t\t\t\tlongAtput((pt + (BASE_HEADER_SIZE)) + (1 << (SHIFT_FOR_WORD)), valuePointer2);\r\t\t\t\t}\r\t\t\t\t/* begin pop:thenPush: */\r\t\t\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), pt);\r\t\t\t\tfoo->stackPointer = sp;\r\t\t\tl20:\t/* end primitiveMakePoint */;\r\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tgoto l19;\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((11 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl19:\t/* end case */;\r\t\t\tbreak;\r\t\tcase 188:\r\t\t\t/* bytecodePrimBitShift */\r\t\t\t{\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt integerArgument;\r\t\t\t\tsqInt integerReceiver;\r\t\t\t\tsqInt shifted;\r\t\t\t\tsqInt top;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt sp;\r\t\t\t\tsqInt top1;\r\t\t\t\tsqInt integerPointer;\r\t\t\t\tsqInt top2;\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t/* begin primitiveBitShift */\r\t\t\t\t/* begin popInteger */\r\t\t\t\t/* begin popStack */\r\t\t\t\ttop2 = longAt(foo->stackPointer);\r\t\t\t\tfoo->stackPointer -= BYTES_PER_WORD;\r\t\t\t\tintegerPointer = top2;\r\t\t\t\t/* begin checkedIntegerValueOf: */\r\t\t\t\tif ((integerPointer & 1)) {\r\t\t\t\t\tintegerArgument = (integerPointer >> 1);\r\t\t\t\t\tgoto l22;\r\t\t\t\t} else {\r\t\t\t\t\t/* begin primitiveFail */\r\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t\tintegerArgument = 0;\r\t\t\t\t\tgoto l22;\r\t\t\t\t}\r\t\t\t\tintegerArgument = null;\r\t\t\tl22:\t/* end popInteger */;\r\t\t\t\t/* begin popPos32BitInteger */\r\t\t\t\t/* begin popStack */\r\t\t\t\ttop1 = longAt(foo->stackPointer);\r\t\t\t\tfoo->stackPointer -= BYTES_PER_WORD;\r\t\t\t\ttop = top1;\r\t\t\t\tintegerReceiver = positive32BitValueOf(top);\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\tif (integerArgument >= 0) {\r\t\t\t\t\t\t/* begin success: */\r\t\t\t\t\t\tfoo->successFlag = (integerArgument <= 31) && foo->successFlag;\r\t\t\t\t\t\tshifted = integerReceiver << integerArgument;\r\t\t\t\t\t\t/* begin success: */\r\t\t\t\t\t\tfoo->successFlag = ((((usqInt) shifted) >> integerArgument) == integerReceiver) && foo->successFlag;\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin success: */\r\t\t\t\t\t\tfoo->successFlag = (integerArgument >= -31) && foo->successFlag;\r\t\t\t\t\t\tshifted = ((integerArgument < 0) ? ((usqInt) integerReceiver >> -integerArgument) : ((usqInt) integerReceiver << integerArgument));\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin push: */\r\t\t\t\t\tobject = positive32BitIntegerFor(shifted);\r\t\t\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\t\t\t\t\tfoo->stackPointer = sp;\r\t\t\t\t} else {\r\t\t\t\t\t/* begin unPop: */\r\t\t\t\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t\t\t\t}\r\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tgoto l21;\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((12 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl21:\t/* end case */;\r\t\t\tbreak;\r\t\tcase 189:\r\t\t\t/* bytecodePrimDiv */\r\t\t\t{\r\t\t\t\tsqInt quotient;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\tquotient = doPrimitiveDivby(longAtPointer(localSP - (1 * (BYTES_PER_WORD))), longAtPointer(localSP - (0 * (BYTES_PER_WORD))));\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin internalPop:thenPush: */\r\t\t\t\t\tlongAtPointerput(localSP -= (2 - 1) * (BYTES_PER_WORD), ((quotient << 1) | 1));\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tgoto l23;\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((13 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl23:\t/* end case */;\r\t\t\tbreak;\r\t\tcase 190:\r\t\t\t/* bytecodePrimBitAnd */\r\t\t\t{\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt integerArgument;\r\t\t\t\tsqInt integerReceiver;\r\t\t\t\tsqInt top;\r\t\t\t\tsqInt top1;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt sp;\r\t\t\t\tsqInt top2;\r\t\t\t\tsqInt top3;\r\t\t\t\tsqInt oop1;\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t/* begin primitiveBitAnd */\r\t\t\t\t/* begin popPos32BitInteger */\r\t\t\t\t/* begin popStack */\r\t\t\t\ttop2 = longAt(foo->stackPointer);\r\t\t\t\tfoo->stackPointer -= BYTES_PER_WORD;\r\t\t\t\ttop = top2;\r\t\t\t\tintegerArgument = positive32BitValueOf(top);\r\t\t\t\t/* begin popPos32BitInteger */\r\t\t\t\t/* begin popStack */\r\t\t\t\ttop3 = longAt(foo->stackPointer);\r\t\t\t\tfoo->stackPointer -= BYTES_PER_WORD;\r\t\t\t\ttop1 = top3;\r\t\t\t\tintegerReceiver = positive32BitValueOf(top1);\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin push: */\r\t\t\t\t\tobject = positive32BitIntegerFor(integerReceiver & integerArgument);\r\t\t\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\t\t\t\t\tfoo->stackPointer = sp;\r\t\t\t\t} else {\r\t\t\t\t\t/* begin unPop: */\r\t\t\t\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t\t\t\t}\r\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tgoto l24;\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((14 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl24:\t/* end case */;\r\t\t\tbreak;\r\t\tcase 191:\r\t\t\t/* bytecodePrimBitOr */\r\t\t\t{\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt integerArgument;\r\t\t\t\tsqInt integerReceiver;\r\t\t\t\tsqInt top;\r\t\t\t\tsqInt top1;\r\t\t\t\tsqInt object;\r\t\t\t\tsqInt sp;\r\t\t\t\tsqInt top2;\r\t\t\t\tsqInt top3;\r\t\t\t\tsqInt oop1;\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t/* begin primitiveBitOr */\r\t\t\t\t/* begin popPos32BitInteger */\r\t\t\t\t/* begin popStack */\r\t\t\t\ttop2 = longAt(foo->stackPointer);\r\t\t\t\tfoo->stackPointer -= BYTES_PER_WORD;\r\t\t\t\ttop = top2;\r\t\t\t\tintegerArgument = positive32BitValueOf(top);\r\t\t\t\t/* begin popPos32BitInteger */\r\t\t\t\t/* begin popStack */\r\t\t\t\ttop3 = longAt(foo->stackPointer);\r\t\t\t\tfoo->stackPointer -= BYTES_PER_WORD;\r\t\t\t\ttop1 = top3;\r\t\t\t\tintegerReceiver = positive32BitValueOf(top1);\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin push: */\r\t\t\t\t\tobject = positive32BitIntegerFor(integerReceiver | integerArgument);\r\t\t\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\t\t\t\t\tfoo->stackPointer = sp;\r\t\t\t\t} else {\r\t\t\t\t\t/* begin unPop: */\r\t\t\t\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t\t\t\t}\r\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tgoto l25;\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((15 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl25:\t/* end case */;\r\t\t\tbreak;\r\t\tcase 192:\r\t\t\t/* bytecodePrimAt */\r\t\t\t{\r\t\t\t\tsqInt atIx;\r\t\t\t\tsqInt index;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt result;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt fixedFields;\r\t\t\t\tsqInt fmt;\r\t\t\t\tsqInt result1;\r\t\t\t\tsqInt stSize;\r\t\t\t\tsqInt oop2;\r\t\t\t\tsqInt oop11;\r\t\t\t\tindex = longAtPointer(localSP);\r\t\t\t\trcvr = longAtPointer(localSP - (1 * (BYTES_PER_WORD)));\r\t\t\t\tfoo->successFlag = (!((rcvr & 1))) && ((index & 1));\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\tatIx = rcvr & AtCacheMask;\r\t\t\t\t\tif ((foo->atCache[atIx + AtCacheOop]) == rcvr) {\r\t\t\t\t\t\t/* begin commonVariableInternal:at:cacheIndex: */\r\t\t\t\t\t\tstSize = foo->atCache[atIx + AtCacheSize];\r\t\t\t\t\t\tif (((((usqInt) ((index >> 1)))) >= (((usqInt) 1))) && ((((usqInt) ((index >> 1)))) <= (((usqInt) stSize)))) {\r\t\t\t\t\t\t\tfmt = foo->atCache[atIx + AtCacheFmt];\r\t\t\t\t\t\t\tif (fmt <= 4) {\r\t\t\t\t\t\t\t\tfixedFields = foo->atCache[atIx + AtCacheFixedFields];\r\t\t\t\t\t\t\t\tresult = longAt((rcvr + (BASE_HEADER_SIZE)) + (((((index >> 1)) + fixedFields) - 1) << (SHIFT_FOR_WORD)));\r\t\t\t\t\t\t\t\tgoto l27;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\tif (fmt < 8) {\r\t\t\t\t\t\t\t\tresult1 = long32At((rcvr + (BASE_HEADER_SIZE)) + ((((index >> 1)) - 1) << 2));\r\t\t\t\t\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\t\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\t\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\t\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t\t\t\t\tresult1 = positive32BitIntegerFor(result1);\r\t\t\t\t\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\t\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\t\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\t\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\t\t\t\t\tresult = result1;\r\t\t\t\t\t\t\t\tgoto l27;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\tif (fmt >= 16) {\r\t\t\t\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t\t\t\toop11 = foo->specialObjectsOop;\r\t\t\t\t\t\t\t\toop2 = longAt((oop11 + (BASE_HEADER_SIZE)) + (CharacterTable << (SHIFT_FOR_WORD)));\r\t\t\t\t\t\t\t\tresult = longAt((oop2 + (BASE_HEADER_SIZE)) + ((byteAt((rcvr + (BASE_HEADER_SIZE)) + (((index >> 1)) - 1))) << (SHIFT_FOR_WORD)));\r\t\t\t\t\t\t\t\tgoto l27;\r\t\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t\tresult = (((byteAt((rcvr + (BASE_HEADER_SIZE)) + (((index >> 1)) - 1))) << 1) | 1);\r\t\t\t\t\t\t\t\tgoto l27;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t}\r\t\t\t\t\t\t/* begin primitiveFail */\r\t\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t\tl27:\t/* end commonVariableInternal:at:cacheIndex: */;\r\t\t\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\t/* begin internalPop:thenPush: */\r\t\t\t\t\t\t\tlongAtPointerput(localSP -= (2 - 1) * (BYTES_PER_WORD), result);\r\t\t\t\t\t\t\tgoto l26;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((16 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl26:\t/* end case */;\r\t\t\tbreak;\r\t\tcase 193:\r\t\t\t/* bytecodePrimAtPut */\r\t\t\t{\r\t\t\t\tsqInt atIx;\r\t\t\t\tsqInt index;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt value;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt fixedFields;\r\t\t\t\tsqInt fmt;\r\t\t\t\tsqInt stSize;\r\t\t\t\tsqInt valToPut;\r\t\t\t\tvalue = longAtPointer(localSP);\r\t\t\t\tindex = longAtPointer(localSP - (1 * (BYTES_PER_WORD)));\r\t\t\t\trcvr = longAtPointer(localSP - (2 * (BYTES_PER_WORD)));\r\t\t\t\tfoo->successFlag = (!((rcvr & 1))) && ((index & 1));\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\tatIx = (rcvr & AtCacheMask) + AtPutBase;\r\t\t\t\t\tif ((foo->atCache[atIx + AtCacheOop]) == rcvr) {\r\t\t\t\t\t\t/* begin commonVariable:at:put:cacheIndex: */\r\t\t\t\t\t\tstSize = foo->atCache[atIx + AtCacheSize];\r\t\t\t\t\t\tif (((((usqInt) ((index >> 1)))) >= (((usqInt) 1))) && ((((usqInt) ((index >> 1)))) <= (((usqInt) stSize)))) {\r\t\t\t\t\t\t\tfmt = foo->atCache[atIx + AtCacheFmt];\r\t\t\t\t\t\t\tif (fmt <= 4) {\r\t\t\t\t\t\t\t\tfixedFields = foo->atCache[atIx + AtCacheFixedFields];\r\t\t\t\t\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\t\t\t\t\tif ((((usqInt) rcvr)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\t\t\t\t\tpossibleRootStoreIntovalue(rcvr, value);\r\t\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (((((index >> 1)) + fixedFields) - 1) << (SHIFT_FOR_WORD)), value);\r\t\t\t\t\t\t\t\tgoto l29;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\tif (fmt < 8) {\r\t\t\t\t\t\t\t\tvalToPut = positive32BitValueOf(value);\r\t\t\t\t\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t\t\t\t\tlong32Atput((rcvr + (BASE_HEADER_SIZE)) + ((((index >> 1)) - 1) << 2), valToPut);\r\t\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\t\tgoto l29;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\tif (fmt >= 16) {\r\t\t\t\t\t\t\t\tvalToPut = asciiOfCharacter(value);\r\t\t\t\t\t\t\t\tif (!(foo->successFlag)) {\r\t\t\t\t\t\t\t\t\tgoto l29;\r\t\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t\tvalToPut = value;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\tif ((valToPut & 1)) {\r\t\t\t\t\t\t\t\tvalToPut = (valToPut >> 1);\r\t\t\t\t\t\t\t\tif (!((valToPut >= 0) && (valToPut <= 255))) {\r\t\t\t\t\t\t\t\t\t/* begin primitiveFail */\r\t\t\t\t\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t\t\t\t\t\tgoto l29;\r\t\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\t\tbyteAtput((rcvr + (BASE_HEADER_SIZE)) + (((index >> 1)) - 1), valToPut);\r\t\t\t\t\t\t\t\tgoto l29;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t}\r\t\t\t\t\t\t/* begin primitiveFail */\r\t\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t\tl29:\t/* end commonVariable:at:put:cacheIndex: */;\r\t\t\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\t\t/* begin internalPop:thenPush: */\r\t\t\t\t\t\t\tlongAtPointerput(localSP -= (3 - 1) * (BYTES_PER_WORD), value);\r\t\t\t\t\t\t\tgoto l28;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((17 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 2;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl28:\t/* end case */;\r\t\t\tbreak;\r\t\tcase 194:\r\t\t\t/* bytecodePrimSize */\r\t\t\t{\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((18 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 0;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 195:\r\t\t\t/* bytecodePrimNext */\r\t\t\t{\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((19 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 0;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 196:\r\t\t\t/* bytecodePrimNextPut */\r\t\t\t{\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((20 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 197:\r\t\t\t/* bytecodePrimAtEnd */\r\t\t\t{\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((21 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 0;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 198:\r\t\t\t/* bytecodePrimEquivalent */\r\t\t\t{\r\t\t\t\tsqInt arg;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt bytecode;\r\t\t\t\tsqInt offset;\r\t\t\t\trcvr = longAtPointer(localSP - (1 * (BYTES_PER_WORD)));\r\t\t\t\targ = longAtPointer(localSP - (0 * (BYTES_PER_WORD)));\r\t\t\t\t/* begin booleanCheat: */\r\t\t\t\tbytecode = byteAtPointer(++localIP);\r\t\t\t\t/* begin internalPop: */\r\t\t\t\tlocalSP -= 2 * (BYTES_PER_WORD);\r\t\t\t\tif ((bytecode < 160) && (bytecode > 151)) {\r\t\t\t\t\tif (rcvr == arg) {\r\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\tgoto l30;\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\tlocalIP = (localIP + (bytecode - 151)) + 1;\r\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\tgoto l30;\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\tif (bytecode == 172) {\r\t\t\t\t\toffset = byteAtPointer(++localIP);\r\t\t\t\t\tif (rcvr == arg) {\r\t\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\t\tgoto l30;\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin jump: */\r\t\t\t\t\t\tlocalIP = (localIP + offset) + 1;\r\t\t\t\t\t\tcurrentBytecode = byteAtPointer(localIP);\r\t\t\t\t\t\tgoto l30;\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\tlocalIP -= 1;\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\tif (rcvr == arg) {\r\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->trueObj);\r\t\t\t\t} else {\r\t\t\t\t\t/* begin internalPush: */\r\t\t\t\t\tlongAtPointerput(localSP += BYTES_PER_WORD, foo->falseObj);\r\t\t\t\t}\r\t\t\tl30:\t/* end booleanCheat: */;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 199:\r\t\t\t/* bytecodePrimClass */\r\t\t\t{\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt ccIndex;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt oop2;\r\t\t\t\tsqInt oop3;\r\t\t\t\trcvr = longAtPointer(localSP);\r\t\t\t\t/* begin internalPop:thenPush: */\r\t\t\t\t/* begin fetchClassOf: */\r\t\t\t\tif ((rcvr & 1)) {\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\t\t\t\tgoto l31;\r\t\t\t\t}\r\t\t\t\tccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31;\r\t\t\t\tif (ccIndex == 0) {\r\t\t\t\t\toop = (longAt(rcvr - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\t\t\t\tgoto l31;\r\t\t\t\t} else {\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\toop3 = foo->specialObjectsOop;\r\t\t\t\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\t\t\t\toop = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tgoto l31;\r\t\t\t\t}\r\t\t\tl31:\t/* end fetchClassOf: */;\r\t\t\t\tlongAtPointerput(localSP -= (1 - 1) * (BYTES_PER_WORD), oop);\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 200:\r\t\t\t/* bytecodePrimBlockCopy */\r\t\t\t{\r\t\t\t\tsqInt hdr;\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt successValue;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt context;\r\t\t\t\tsqInt contextSize;\r\t\t\t\tsqInt initialIP;\r\t\t\t\tsqInt methodContext;\r\t\t\t\tsqInt newContext;\r\t\t\t\tsqInt header;\r\t\t\t\tsqInt oop2;\r\t\t\t\tsqInt valuePointer;\r\t\t\t\tsqInt valuePointer1;\r\t\t\t\tsqInt sp;\r\t\t\t\trcvr = longAtPointer(localSP - (1 * (BYTES_PER_WORD)));\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\thdr = longAt(rcvr);\r\t\t\t\t/* begin success: */\r\t\t\t\tsuccessValue = (((((usqInt) hdr) >> 12) & 31) == 13) || ((((((usqInt) hdr) >> 12) & 31) == 14) || (((((usqInt) hdr) >> 12) & 31) == 4));\r\t\t\t\tfoo->successFlag = successValue && foo->successFlag;\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t\t/* begin primitiveBlockCopy */\r\t\t\t\t\tcontext = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t\t\t\t\tif (((longAt((context + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)))) & 1)) {\r\t\t\t\t\t\tmethodContext = longAt((context + (BASE_HEADER_SIZE)) + (HomeIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t\t} else {\r\t\t\t\t\t\tmethodContext = context;\r\t\t\t\t\t}\r\t\t\t\t\t/* begin sizeBitsOf: */\r\t\t\t\t\theader = longAt(methodContext);\r\t\t\t\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\t\t\tcontextSize = (longAt(methodContext - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\t\t\tgoto l33;\r\t\t\t\t\t} else {\r\t\t\t\t\t\tcontextSize = header & (SIZE_MASK);\r\t\t\t\t\t\tgoto l33;\r\t\t\t\t\t}\r\t\t\t\tl33:\t/* end sizeBitsOf: */;\r\t\t\t\t\tcontext = null;\r\t\t\t\t\t/* begin pushRemappableOop: */\r\t\t\t\t\tfoo->remapBuffer[(foo->remapBufferCount += 1)] = methodContext;\r\t\t\t\t\tnewContext = instantiateContextsizeInBytes(fetchPointerofObject(ClassBlockContext, foo->specialObjectsOop), contextSize);\r\t\t\t\t\t/* begin popRemappableOop */\r\t\t\t\t\toop2 = foo->remapBuffer[foo->remapBufferCount];\r\t\t\t\t\tfoo->remapBufferCount -= 1;\r\t\t\t\t\tmethodContext = oop2;\r\t\t\t\t\tinitialIP = (((((foo->instructionPointer + 1) + 3) - (foo->method + (BASE_HEADER_SIZE))) << 1) | 1);\r\t\t\t\t\tlongAtput((newContext + (BASE_HEADER_SIZE)) + (InitialIPIndex << (SHIFT_FOR_WORD)), initialIP);\r\t\t\t\t\tlongAtput((newContext + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), initialIP);\r\t\t\t\t\t/* begin storeStackPointerValue:inContext: */\r\t\t\t\t\tlongAtput((newContext + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)), ((0 << 1) | 1));\r\t\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\t\tvaluePointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t\t\t\t\tlongAtput((newContext + (BASE_HEADER_SIZE)) + (BlockArgumentCountIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t\t\tlongAtput((newContext + (BASE_HEADER_SIZE)) + (HomeIndex << (SHIFT_FOR_WORD)), methodContext);\r\t\t\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\t\t\tvaluePointer1 = foo->nilObj;\r\t\t\t\t\tlongAtput((newContext + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\t\t\t\t\t/* begin pop:thenPush: */\r\t\t\t\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), newContext);\r\t\t\t\t\tfoo->stackPointer = sp;\r\t\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\t}\r\t\t\t\tif (!(foo->successFlag)) {\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((24 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\t\tgoto normalSend;\r\t\t\t\t\tgoto l32;\r\t\t\t\t}\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t}\r;\r\t\tl32:\t/* end case */;\r\t\t\tbreak;\r\t\tcase 201:\r\t\t\t/* bytecodePrimValue */\r\t\t\t{\r\t\t\t\tsqInt maybeBlock;\r\t\t\t\tsqInt rcvrClass;\r\t\t\t\tsqInt ccIndex;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt oop2;\r\t\t\t\tsqInt oop3;\r\t\t\t\tmaybeBlock = longAtPointer(localSP);\r\t\t\t\tfoo->argumentCount = 0;\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\tif ((maybeBlock & 1) == 0) {\r\t\t\t\t\t/* begin fetchClassOfNonInt: */\r\t\t\t\t\tccIndex = (((usqInt) (longAt(maybeBlock))) >> 12) & 31;\r\t\t\t\t\tif (ccIndex == 0) {\r\t\t\t\t\t\trcvrClass = (longAt(maybeBlock - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\t\t\t\t\tgoto l35;\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t\toop3 = foo->specialObjectsOop;\r\t\t\t\t\t\toop1 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\t\t\t\t\trcvrClass = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\t\t\t\t\tgoto l35;\r\t\t\t\t\t}\r\t\t\t\tl35:\t/* end fetchClassOfNonInt: */;\r\t\t\t\t\tif (rcvrClass == (fetchPointerofObject(ClassBlockClosure, foo->specialObjectsOop))) {\r\t\t\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t\t\tprimitiveClosureValue();\r\t\t\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\t\t} else {\r\t\t\t\t\t\tif (rcvrClass == (fetchPointerofObject(ClassBlockContext, foo->specialObjectsOop))) {\r\t\t\t\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t\t\t\tprimitiveValue();\r\t\t\t\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\tif (!(foo->successFlag)) {\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\toop2 = foo->specialObjectsOop;\r\t\t\t\t\toop = longAt((oop2 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((25 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tgoto normalSend;\r\t\t\t\t\tgoto l34;\r\t\t\t\t}\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t}\r;\r\t\tl34:\t/* end case */;\r\t\t\tbreak;\r\t\tcase 202:\r\t\t\t/* bytecodePrimValueWithArg */\r\t\t\t{\r\t\t\t\tsqInt maybeBlock;\r\t\t\t\tsqInt rcvrClass;\r\t\t\t\tsqInt ccIndex;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt oop2;\r\t\t\t\tsqInt oop3;\r\t\t\t\tmaybeBlock = longAtPointer(localSP - (1 * (BYTES_PER_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\tif ((maybeBlock & 1) == 0) {\r\t\t\t\t\t/* begin fetchClassOfNonInt: */\r\t\t\t\t\tccIndex = (((usqInt) (longAt(maybeBlock))) >> 12) & 31;\r\t\t\t\t\tif (ccIndex == 0) {\r\t\t\t\t\t\trcvrClass = (longAt(maybeBlock - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\t\t\t\t\tgoto l37;\r\t\t\t\t\t} else {\r\t\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t\toop3 = foo->specialObjectsOop;\r\t\t\t\t\t\toop1 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\t\t\t\t\trcvrClass = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\t\t\t\t\tgoto l37;\r\t\t\t\t\t}\r\t\t\t\tl37:\t/* end fetchClassOfNonInt: */;\r\t\t\t\t\tif (rcvrClass == (fetchPointerofObject(ClassBlockClosure, foo->specialObjectsOop))) {\r\t\t\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t\t\tprimitiveClosureValue();\r\t\t\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\t\t} else {\r\t\t\t\t\t\tif (rcvrClass == (fetchPointerofObject(ClassBlockContext, foo->specialObjectsOop))) {\r\t\t\t\t\t\t\t/* begin externalizeIPandSP */\r\t\t\t\t\t\t\tfoo->instructionPointer = oopForPointer(localIP);\r\t\t\t\t\t\t\tfoo->stackPointer = oopForPointer(localSP);\r\t\t\t\t\t\t\tfoo->theHomeContext = localHomeContext;\r\t\t\t\t\t\t\tprimitiveValue();\r\t\t\t\t\t\t\t/* begin internalizeIPandSP */\r\t\t\t\t\t\t\tlocalIP = pointerForOop(foo->instructionPointer);\r\t\t\t\t\t\t\tlocalSP = pointerForOop(foo->stackPointer);\r\t\t\t\t\t\t\tlocalHomeContext = foo->theHomeContext;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\tif (!(foo->successFlag)) {\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\toop2 = foo->specialObjectsOop;\r\t\t\t\t\toop = longAt((oop2 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((26 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tgoto normalSend;\r\t\t\t\t\tgoto l36;\r\t\t\t\t}\r\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t}\r;\r\t\tl36:\t/* end case */;\r\t\t\tbreak;\r\t\tcase 203:\r\t\t\t/* bytecodePrimDo */\r\t\t\t{\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((27 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 204:\r\t\t\t/* bytecodePrimNew */\r\t\t\t{\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((28 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 0;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 205:\r\t\t\t/* bytecodePrimNewWithArg */\r\t\t\t{\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop1 = foo->specialObjectsOop;\r\t\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + ((29 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 206:\r\t\t\t/* bytecodePrimPointX */\r\t\t\t{\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt oop2;\r\t\t\t\tsqInt classOop;\r\t\t\t\tsqInt ccIndex;\r\t\t\t\tsqInt cl;\r\t\t\t\tsqInt oop11;\r\t\t\t\tsqInt oop21;\r\t\t\t\tsqInt oop3;\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\trcvr = longAtPointer(localSP);\r\t\t\t\t/* begin assertClassOf:is: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop3 = foo->specialObjectsOop;\r\t\t\t\tclassOop = longAt((oop3 + (BASE_HEADER_SIZE)) + (ClassPoint << (SHIFT_FOR_WORD)));\r\t\t\t\tif ((rcvr & 1)) {\r\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t\tgoto l39;\r\t\t\t\t}\r\t\t\t\tccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31;\r\t\t\t\tif (ccIndex == 0) {\r\t\t\t\t\tcl = (longAt(rcvr - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\t\t\t} else {\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\toop21 = foo->specialObjectsOop;\r\t\t\t\t\toop11 = longAt((oop21 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\t\t\t\tcl = longAt((oop11 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\t\t\t}\r\t\t\t\t/* begin success: */\r\t\t\t\tfoo->successFlag = (cl == classOop) && foo->successFlag;\r\t\t\tl39:\t/* end assertClassOf:is: */;\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin internalPop:thenPush: */\r\t\t\t\t\toop = longAt((rcvr + (BASE_HEADER_SIZE)) + (XIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t\tlongAtPointerput(localSP -= (1 - 1) * (BYTES_PER_WORD), oop);\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tgoto l38;\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop2 = foo->specialObjectsOop;\r\t\t\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop1 + (BASE_HEADER_SIZE)) + ((30 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 0;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl38:\t/* end case */;\r\t\t\tbreak;\r\t\tcase 207:\r\t\t\t/* bytecodePrimPointY */\r\t\t\t{\r\t\t\t\tsqInt rcvr;\r\t\t\t\tsqInt oop;\r\t\t\t\tsqInt oop1;\r\t\t\t\tsqInt oop2;\r\t\t\t\tsqInt classOop;\r\t\t\t\tsqInt ccIndex;\r\t\t\t\tsqInt cl;\r\t\t\t\tsqInt oop11;\r\t\t\t\tsqInt oop21;\r\t\t\t\tsqInt oop3;\r\t\t\t\tfoo->successFlag = 1;\r\t\t\t\trcvr = longAtPointer(localSP);\r\t\t\t\t/* begin assertClassOf:is: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop3 = foo->specialObjectsOop;\r\t\t\t\tclassOop = longAt((oop3 + (BASE_HEADER_SIZE)) + (ClassPoint << (SHIFT_FOR_WORD)));\r\t\t\t\tif ((rcvr & 1)) {\r\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t\tgoto l41;\r\t\t\t\t}\r\t\t\t\tccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31;\r\t\t\t\tif (ccIndex == 0) {\r\t\t\t\t\tcl = (longAt(rcvr - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\t\t\t} else {\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t\toop21 = foo->specialObjectsOop;\r\t\t\t\t\toop11 = longAt((oop21 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\t\t\t\tcl = longAt((oop11 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\t\t\t}\r\t\t\t\t/* begin success: */\r\t\t\t\tfoo->successFlag = (cl == classOop) && foo->successFlag;\r\t\t\tl41:\t/* end assertClassOf:is: */;\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\t/* begin internalPop:thenPush: */\r\t\t\t\t\toop = longAt((rcvr + (BASE_HEADER_SIZE)) + (YIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t\tlongAtPointerput(localSP -= (1 - 1) * (BYTES_PER_WORD), oop);\r\t\t\t\t\t/* begin fetchNextBytecode */\r\t\t\t\t\tcurrentBytecode = byteAtPointer(++localIP);\r\t\t\t\t\tgoto l40;\r\t\t\t\t}\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t\toop2 = foo->specialObjectsOop;\r\t\t\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (SpecialSelectors << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->messageSelector = longAt((oop1 + (BASE_HEADER_SIZE)) + ((31 * 2) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = 0;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\tl40:\t/* end case */;\r\t\t\tbreak;\r\t\tcase 208:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 208 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 208) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 209:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 209 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 209) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 210:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 210 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 210) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 211:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 211 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 211) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 212:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 212 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 212) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 213:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 213 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 213) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 214:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 214 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 214) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 215:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 215 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 215) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 216:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 216 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 216) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 217:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 217 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 217) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 218:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 218 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 218) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 219:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 219 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 219) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 220:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 220 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 220) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 221:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 221 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 221) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 222:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 222 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 222) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 223:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 223 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 223) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 224:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 224 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 224) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 225:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 225 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 225) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 226:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 226 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 226) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 227:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 227 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 227) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 228:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 228 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 228) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 229:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 229 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 229) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 230:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 230 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 230) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 231:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 231 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 231) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 232:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 232 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 232) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 233:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 233 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 233) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 234:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 234 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 234) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 235:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 235 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 235) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 236:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 236 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 236) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 237:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 237 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 237) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 238:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 238 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 238) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 239:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 239 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 239) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 240:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 240 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 240) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 241:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 241 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 241) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 242:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 242 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 242) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 243:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 243 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 243) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 244:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 244 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 244) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 245:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 245 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 245) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 246:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 246 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 246) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 247:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 247 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 247) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 248:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 248 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 248) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 249:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 249 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 249) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 250:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 250 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 250) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 251:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 251 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 251) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 252:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 252 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 252) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 253:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 253 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 253) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 254:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 254 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 254) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\tcase 255:\r\t\t\t/* sendLiteralSelectorBytecode */\r\t\t\t{\r\t\t\t\tsqInt offset;\r\t\t\t\tsqInt methodPointer;\r\t\t\t\t/* begin literal: */\r\t\t\t\toffset = 255 & 15;\r\t\t\t\t/* begin literal:ofMethod: */\r\t\t\t\tmethodPointer = foo->method;\r\t\t\t\tfoo->messageSelector = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->argumentCount = ((((usqInt) 255) >> 4) & 3) - 1;\r\t\t\t\tgoto normalSend;\r\t\t\t}\r;\r\t\t\tbreak;\r\t\t}\r\t}\r\r\t/* undo the pre-increment of IP before returning */\r\r\tlocalIP -= 1;\r\t/* begin externalizeIPandSP */\r\tfoo->instructionPointer = oopForPointer(localIP);\r\tfoo->stackPointer = oopForPointer(localSP);\r\tfoo->theHomeContext = localHomeContext;\r}\r\r\r/*\tthe vm has to convert aFilenameString via any canonicalization and char-mapping and put the result in aCharBuffer.\rNote the resolveAliases flag - this is an awful artefact of OSX and Apples demented alias handling. When opening a file, the flag must be  true, when closing or renaming it must be false. Sigh. */\r\rsqInt ioFilenamefromStringofLengthresolveAliases(char *aCharBuffer, char *aFilenameString, sqInt filenameLength, sqInt aBoolean) {\r\tsqGetFilenameFromString(aCharBuffer, aFilenameString, filenameLength, aBoolean);\r}\r\r\r/*\tSupport for external primitives. */\r\rsqInt isKindOf(sqInt oop, char *className) {\rregister struct foo * foo = &fum;\r    sqInt oopClass;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\t/* begin fetchClassOf: */\r\tif ((oop & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\toopClass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(oop))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\toopClass = (longAt(oop - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\toopClass = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\rl1:\t/* end fetchClassOf: */;\r\twhile (!(oopClass == foo->nilObj)) {\r\t\tif (classNameOfIs(oopClass, className)) {\r\t\t\treturn 1;\r\t\t}\r\t\toopClass = longAt((oopClass + (BASE_HEADER_SIZE)) + (SuperclassIndex << (SHIFT_FOR_WORD)));\r\t}\r\treturn 0;\r}\r\r\r/*\tSupport for external primitives */\r\rsqInt isMemberOf(sqInt oop, char *className) {\rregister struct foo * foo = &fum;\r    sqInt oopClass;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\t/* begin fetchClassOf: */\r\tif ((oop & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\toopClass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(oop))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\toopClass = (longAt(oop - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\toopClass = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\rl1:\t/* end fetchClassOf: */;\r\treturn classNameOfIs(oopClass, className);\r}\r\r\r/*\tAnswer true if this is an indexable object with pointer elements, e.g., an array */\r\rsqInt isArray(sqInt oop) {\r\treturn ((oop & 1) == 0) && (((((usqInt) (longAt(oop))) >> 8) & 15) == 2);\r}\r\r\r/*\tAnswer true (non-zero) if running on a big endian machine. */\r\rsqInt isBigEnder(void) {\r    sqInt anInt;\r    char *cString;\r    static sqInt endianness = -1;\r    sqInt i;\r    sqInt len;\r\r\tif (!(endianness == -1)) {\r\t\treturn endianness;\r\t}\r\tlen = sizeof(anInt);\r\tcString = (char *) &anInt;\r\ti = 0;\r\twhile (i < len) {\r\t\tcString[i] = i;\r\t\ti += 1;\r\t}\r\tendianness = anInt & 255;\r\treturn endianness;\r}\r\r\r/*\tAnswer true if the argument contains indexable bytes. See comment in formatOf: */\r/*\tNote: Includes CompiledMethods. */\r\rsqInt isBytes(sqInt oop) {\r\treturn ((oop & 1) == 0) && (((((usqInt) (longAt(oop))) >> 8) & 15) >= 8);\r}\r\r\r/*\tAnswer true if size is greater than (((2 raisedTo: 31) - 1) >> bits). Used\r\tto limit size of allocation requests to 31 bit integer maximum to prevent\r\tarithmetic overflow in subsequent calculations. Always answers false\r\tin interpreter simulation.\r\t\r\tIn the case of a 64-bit object memory running on a 64-bit host platform,\r\tallow larger allocation requests.\r\r\tAssumes that sizeof(int) is 4 for all platforms. */\r\rsqInt isExcessiveAllocationRequestshift(sqInt size, sqInt bits) {\r    int int32;\r    sqInt int64;\r    sqInt shiftCount;\r\r\t\r# ifdef SQ_IMAGE64  // a 64-bit object memory word size\r\t\r# ifdef SQ_HOST64  // running on a 64-bit host platform\r\r\t/* use 64 bit check if both image and host are 64 bits */\r\r\tint64 = size;\r\tshiftCount = 0;\r\tif (int64 < 0) {\r\t\treturn 1;\r\t}\r\twhile (shiftCount < bits) {\r\t\tint64 = int64 << 1;\r\t\tif (int64 < 0) {\r\t\t\treturn 1;\r\t\t}\r\t\tshiftCount += 1;\r\t}\r\treturn 0;\r# else\r\tif (size > 4294967295U) {\r\t\treturn 0;\r\t}\r# endif  // SQ_HOST64\r\t\r# else\r\r\t/* common case of 32 bit image on either 32 or 64 bit host */\r\r\tint32 = size;\r\tshiftCount = 0;\r\tif (int32 < 0) {\r\t\treturn 1;\r\t}\r\twhile (shiftCount < bits) {\r\t\tint32 = int32 << 1;\r\t\tif (int32 < 0) {\r\t\t\treturn 1;\r\t\t}\r\t\tshiftCount += 1;\r\t}\r\treturn 0;\r# endif  // SQ_IMAGE64\r\t\r}\r\rsqInt isFloatObject(sqInt oop) {\r\treturn (fetchClassOf(oop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop));\r}\r\r\r/*\tIs this a MethodContext whose meth has a primitive number of 199? */\r/*\tNB: the use of a primitive number for marking the method is pretty grungy, but it is simple to use for a test sytem, not too expensive and we don't actually have the two spare method header bits we need. We can probably obtain them when the method format is changed.\r\tNB 2: actually, the jitter will probably implement the prim to actually mark the volatile frame by changing the return function pointer. */\r\rsqInt isHandlerMarked(sqInt aContext) {\r    sqInt header;\r    sqInt meth;\r    sqInt pIndex;\r    sqInt primBits;\r\r\theader = longAt(aContext);\r\tif (!(((((usqInt) header) >> 12) & 31) == 14)) {\r\t\treturn 0;\r\t}\r\tmeth = longAt((aContext + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\t/* begin primitiveIndexOf: */\r\tprimBits = (((usqInt) (longAt((meth + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD))))) >> 1) & 268435967;\r\tpIndex = (primBits & 511) + (((usqInt) primBits) >> 19);\r\treturn pIndex == 199;\r}\r\r\r/*\tReturn true if the given address is in ST object memory */\r\rsqInt isInMemory(sqInt address) {\r\treturn ((((usqInt) address)) >= (((usqInt) memory))) && ((((usqInt) address)) < (((usqInt) foo->endOfMemory)));\r}\r\rsqInt isIndexable(sqInt oop) {\r\treturn ((((usqInt) (longAt(oop))) >> 8) & 15) >= 2;\r}\r\rsqInt isIntegerObject(sqInt objectPointer) {\r\treturn (objectPointer & 1) > 0;\r}\r\r\r/*\tReturn true if the given value can be represented as a Smalltalk integer value. */\r/*\tUse a shift and XOR to set the sign bit if and only if the top two bits of the given\r\tvalue are the same, then test the sign bit. Note that the top two bits are equal for\r\texactly those integers in the range that can be represented in 31-bits or 63-bits.\r\r\tOperands are coerced to machine integer size so the test will work with 64 bit\r\timages on 32 bit hosts. When running on a 32 bit host, the cast to int has little\r\tor no performance impact for either 32 bit or 64 bit images.\r\r\tOn a 64 bit host, the shift and XOR test is replaced by an explicit range check,\r\twhich provides the best performance for both 32 bit and 64 bit images.\r\r\tIf the range of small integers is enlarged for 64 bit images, this method must\r\tbe updated accordingly. */\r\rsqInt isIntegerValue(sqInt intValue) {\r\treturn \r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t(((((int) intValue)) ^ ((((int) intValue)) << 1)) >= 0)\r# else\r\t\t((intValue >= -1073741824) && (intValue <= 1073741823))\r# endif  // SQ_HOST32\r\t;\r}\r\r\r/*\tAnswer true if the argument has only fields that can hold oops. See comment in formatOf: */\r\rsqInt isPointers(sqInt oop) {\r\treturn ((oop & 1) == 0) && (((((usqInt) (longAt(oop))) >> 8) & 15) <= 4);\r}\r\r\r/*\tAnswer true if the argument has only weak fields that can hold oops. See comment in formatOf: */\r\rsqInt isWeak(sqInt oop) {\r\treturn ((oop & 1) == 0) && (((((usqInt) (longAt(oop))) >> 8) & 15) == 4);\r}\r\r\r/*\tAnswer true if the argument contains only indexable words (no oops). See comment in formatOf: */\r\rsqInt isWords(sqInt oop) {\r\treturn ((oop & 1) == 0) && (((((usqInt) (longAt(oop))) >> 8) & 15) == 6);\r}\r\r\r/*\tAnswer true if the contains only indexable words or bytes (no oops). See comment in formatOf: */\r/*\tNote: Excludes CompiledMethods. */\r\rsqInt isWordsOrBytes(sqInt oop) {\r\treturn ((oop & 1) == 0) && (isWordsOrBytesNonInt(oop));\r}\r\r\r/*\tAnswer true if the contains only indexable words or bytes (no oops). See comment in formatOf: */\r/*\tNote: Excludes CompiledMethods. */\r\rsqInt isWordsOrBytesNonInt(sqInt oop) {\r    sqInt fmt;\r\r\tfmt = (((usqInt) (longAt(oop))) >> 8) & 15;\r\treturn (fmt == 6) || ((fmt >= 8) && (fmt <= 11));\r}\r\r\r/*\tReturn the byte offset of the last pointer field of the given object.  \r\tWorks with CompiledMethods, as well as ordinary objects. \r\tCan be used even when the type bits are not correct. */\r\rsqInt lastPointerOf(sqInt oop) {\r    sqInt contextSize;\r    sqInt fmt;\r    sqInt header;\r    sqInt methodHeader;\r    sqInt sz;\r    sqInt sp;\r    sqInt header1;\r    sqInt type;\r\r\theader = longAt(oop);\r\tfmt = (((usqInt) header) >> 8) & 15;\r\tif (fmt <= 4) {\r\t\tif ((fmt == 3) && ((((((usqInt) header) >> 12) & 31) == 13) || ((((((usqInt) header) >> 12) & 31) == 14) || (((((usqInt) header) >> 12) & 31) == 4)))) {\r\t\t\t/* begin fetchStackPointerOf: */\r\t\t\tsp = longAt((oop + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)));\r\t\t\tif (!((sp & 1))) {\r\t\t\t\tcontextSize = 0;\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t\tcontextSize = (sp >> 1);\r\t\tl1:\t/* end fetchStackPointerOf: */;\r\t\t\treturn (CtxtTempFrameStart + contextSize) * (BYTES_PER_WORD);\r\t\t}\r\t\t/* begin sizeBitsOfSafe: */\r\t\theader1 = longAt(oop);\r\t\t/* begin rightType: */\r\t\tif ((header1 & (SIZE_MASK)) == 0) {\r\t\t\ttype = HeaderTypeSizeAndClass;\r\t\t\tgoto l2;\r\t\t} else {\r\t\t\tif ((header1 & CompactClassMask) == 0) {\r\t\t\t\ttype = HeaderTypeClass;\r\t\t\t\tgoto l2;\r\t\t\t} else {\r\t\t\t\ttype = HeaderTypeShort;\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\t}\r\tl2:\t/* end rightType: */;\r\t\tif (type == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (ALL_BUT_TYPE_MASK);\r\t\t\tgoto l3;\r\t\t} else {\r\t\t\tsz = header1 & (SIZE_MASK);\r\t\t\tgoto l3;\r\t\t}\r\tl3:\t/* end sizeBitsOfSafe: */;\r\t\treturn sz - (BASE_HEADER_SIZE);\r\t}\r\tif (fmt < 12) {\r\t\treturn 0;\r\t}\r\tmethodHeader = longAt(oop + (BASE_HEADER_SIZE));\r\treturn (((((usqInt) methodHeader) >> 10) & 255) * (BYTES_PER_WORD)) + (BASE_HEADER_SIZE);\r}\r\r\r/*\tReturn the number of indexable bytes or words in the given object. Assume the argument is not an integer. For a CompiledMethod, the size of the method header (in bytes) should be subtracted from the result. */\r\rsqInt lengthOf(sqInt oop) {\r    sqInt header;\r    sqInt sz;\r\r\theader = longAt(oop);\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz = header & (SIZE_MASK);\r\t}\r\tsz -= header & (SIZE_4_BIT);\r\tif (((((usqInt) header) >> 8) & 15) <= 4) {\r\t\treturn ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t}\r\tif (((((usqInt) header) >> 8) & 15) < 8) {\r\t\treturn ((usqInt) (sz - (BASE_HEADER_SIZE))) >> 2;\r\t} else {\r\t\treturn (sz - (BASE_HEADER_SIZE)) - (((((usqInt) header) >> 8) & 15) & 3);\r\t}\r\treturn null;\r}\r\rsqInt literalofMethod(sqInt offset, sqInt methodPointer) {\r\treturn longAt((methodPointer + (BASE_HEADER_SIZE)) + ((offset + LiteralStart) << (SHIFT_FOR_WORD)));\r}\r\rsqInt literalCountOf(sqInt methodPointer) {\r    sqInt headerPointer;\r\r\t/* begin literalCountOfHeader: */\r\theaderPointer = longAt((methodPointer + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD)));\r\treturn (((usqInt) headerPointer) >> 10) & 255;\r}\r\rsqInt literalCountOfHeader(sqInt headerPointer) {\r\treturn (((usqInt) headerPointer) >> 10) & 255;\r}\r\r\r/*\tThis entry point needs to be implemented for the interpreter proxy.\r\tSince BitBlt is now a plugin we need to look up BitBltPlugin:=loadBitBltFrom\r\tand call it. This entire mechanism should eventually go away and be\r\treplaced with a dynamic lookup from BitBltPlugin itself but for backward\r\tcompatibility this stub is provided */\r\rsqInt loadBitBltFrom(sqInt bb) {\r    void *fn;\r\r\tfn = ioLoadFunctionFrom(\"loadBitBltFrom\", \"BitBltPlugin\");\r\tif (fn == 0) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\treturn ((sqInt (*)(sqInt))fn)(bb);\r}\r\rsqInt loadInitialContext(void) {\rregister struct foo * foo = &fum;\r    sqInt proc;\r    sqInt sched;\r    sqInt oop;\r    sqInt oop1;\r    sqInt activeCntx;\r    sqInt tmp;\r\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\toop1 = foo->specialObjectsOop;\r\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\tsched = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\tproc = longAt((sched + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)));\r\tfoo->activeContext = longAt((proc + (BASE_HEADER_SIZE)) + (SuspendedContextIndex << (SHIFT_FOR_WORD)));\r\tif ((((usqInt) foo->activeContext)) < (((usqInt) foo->youngStart))) {\r\t\tbeRootIfOld(foo->activeContext);\r\t}\r\t/* begin fetchContextRegisters: */\r\tactiveCntx = foo->activeContext;\r\ttmp = longAt((activeCntx + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\tif ((tmp & 1)) {\r\t\ttmp = longAt((activeCntx + (BASE_HEADER_SIZE)) + (HomeIndex << (SHIFT_FOR_WORD)));\r\t\tif ((((usqInt) tmp)) < (((usqInt) foo->youngStart))) {\r\t\t\tbeRootIfOld(tmp);\r\t\t}\r\t} else {\r\t\ttmp = activeCntx;\r\t}\r\tfoo->theHomeContext = tmp;\r\tfoo->receiver = longAt((tmp + (BASE_HEADER_SIZE)) + (ReceiverIndex << (SHIFT_FOR_WORD)));\r\tfoo->method = longAt((tmp + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\ttmp = ((longAt((activeCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tfoo->instructionPointer = ((foo->method + tmp) + (BASE_HEADER_SIZE)) - 2;\r\ttmp = ((longAt((activeCntx + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tfoo->stackPointer = (activeCntx + (BASE_HEADER_SIZE)) + (((TempFrameStart + tmp) - 1) * (BYTES_PER_WORD));\r\tfoo->reclaimableContextCount = 0;\r}\r\r\r/*\tThis method implements a simple method lookup cache. If an entry for the given selector and class is found in the cache, set the values of 'newMethod' and 'primitiveIndex' and return true. Otherwise, return false. */\r/*\tAbout the re-probe scheme: The hash is the low bits of the XOR of two large addresses, minus their useless lowest two bits. If a probe doesn't get a hit, the hash is shifted right one bit to compute the next probe, introducing a new randomish bit. The cache is probed CacheProbeMax times before giving up. */\r/*\tWARNING: Since the hash computation is based on the object addresses of the class and selector, we must rehash or flush when compacting storage. We've chosen to flush, since that also saves the trouble of updating the addresses of the objects in the cache. */\r\rsqInt lookupInMethodCacheSelclass(sqInt selector, sqInt class) {\rregister struct foo * foo = &fum;\r    sqInt hash;\r    sqInt probe;\r\r\r\t/* shift drops two low-order zeros from addresses */\r\r\thash = selector ^ class;\r\r\t/* first probe */\r\r\tprobe = hash & MethodCacheMask;\r\tif (((foo->methodCache[probe + MethodCacheSelector]) == selector) && ((foo->methodCache[probe + MethodCacheClass]) == class)) {\r\t\tfoo->newMethod = foo->methodCache[probe + MethodCacheMethod];\r\t\tfoo->primitiveIndex = foo->methodCache[probe + MethodCachePrim];\r\t\tfoo->newNativeMethod = foo->methodCache[probe + MethodCacheNative];\r\t\tfoo->primitiveFunctionPointer = ((void *) (foo->methodCache[probe + MethodCachePrimFunction]));\r\t\treturn 1;\r\t}\r\r\t/* second probe */\r\r\tprobe = (((usqInt) hash) >> 1) & MethodCacheMask;\r\tif (((foo->methodCache[probe + MethodCacheSelector]) == selector) && ((foo->methodCache[probe + MethodCacheClass]) == class)) {\r\t\tfoo->newMethod = foo->methodCache[probe + MethodCacheMethod];\r\t\tfoo->primitiveIndex = foo->methodCache[probe + MethodCachePrim];\r\t\tfoo->newNativeMethod = foo->methodCache[probe + MethodCacheNative];\r\t\tfoo->primitiveFunctionPointer = ((void *) (foo->methodCache[probe + MethodCachePrimFunction]));\r\t\treturn 1;\r\t}\r\tprobe = (((usqInt) hash) >> 2) & MethodCacheMask;\r\tif (((foo->methodCache[probe + MethodCacheSelector]) == selector) && ((foo->methodCache[probe + MethodCacheClass]) == class)) {\r\t\tfoo->newMethod = foo->methodCache[probe + MethodCacheMethod];\r\t\tfoo->primitiveIndex = foo->methodCache[probe + MethodCachePrim];\r\t\tfoo->newNativeMethod = foo->methodCache[probe + MethodCacheNative];\r\t\tfoo->primitiveFunctionPointer = ((void *) (foo->methodCache[probe + MethodCachePrimFunction]));\r\t\treturn 1;\r\t}\r\treturn 0;\r}\r\rsqInt lookupMethodInClass(sqInt class) {\rregister struct foo * foo = &fum;\r    sqInt currentClass;\r    sqInt dictionary;\r    sqInt found;\r    sqInt rclass;\r    sqInt oop;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r    sqInt index;\r    sqInt length;\r    sqInt mask;\r    sqInt methodArray;\r    sqInt nextSelector;\r    sqInt wrapAround;\r    sqInt sz;\r    sqInt methodPointer;\r    sqInt primBits;\r    sqInt header;\r\r\tcurrentClass = class;\r\twhile (currentClass != foo->nilObj) {\r\t\tdictionary = longAt((currentClass + (BASE_HEADER_SIZE)) + (MessageDictionaryIndex << (SHIFT_FOR_WORD)));\r\t\tif (dictionary == foo->nilObj) {\r\t\t\t/* begin pushRemappableOop: */\r\t\t\tfoo->remapBuffer[(foo->remapBufferCount += 1)] = currentClass;\r\t\t\tcreateActualMessageTo(class);\r\t\t\t/* begin popRemappableOop */\r\t\t\toop = foo->remapBuffer[foo->remapBufferCount];\r\t\t\tfoo->remapBufferCount -= 1;\r\t\t\tcurrentClass = oop;\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop1 = foo->specialObjectsOop;\r\t\t\tfoo->messageSelector = longAt((oop1 + (BASE_HEADER_SIZE)) + (SelectorCannotInterpret << (SHIFT_FOR_WORD)));\r\t\t\treturn lookupMethodInClass(longAt((currentClass + (BASE_HEADER_SIZE)) + (SuperclassIndex << (SHIFT_FOR_WORD))));\r\t\t}\r\t\t/* begin lookupMethodInDictionary: */\r\t\t/* begin fetchWordLengthOf: */\r\t\t/* begin sizeBitsOf: */\r\t\theader = longAt(dictionary);\r\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(dictionary - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\tsz = header & (SIZE_MASK);\r\t\t\tgoto l1;\r\t\t}\r\tl1:\t/* end sizeBitsOf: */;\r\t\tlength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tmask = (length - SelectorStart) - 1;\r\t\tif ((foo->messageSelector & 1)) {\r\t\t\tindex = (mask & ((foo->messageSelector >> 1))) + SelectorStart;\r\t\t} else {\r\t\t\tindex = (mask & ((((usqInt) (longAt(foo->messageSelector))) >> 17) & 4095)) + SelectorStart;\r\t\t}\r\t\twrapAround = 0;\r\t\twhile (1) {\r\t\t\tnextSelector = longAt((dictionary + (BASE_HEADER_SIZE)) + (index << (SHIFT_FOR_WORD)));\r\t\t\tif (nextSelector == foo->nilObj) {\r\t\t\t\tfound = 0;\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\t\tif (nextSelector == foo->messageSelector) {\r\t\t\t\tmethodArray = longAt((dictionary + (BASE_HEADER_SIZE)) + (MethodArrayIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tfoo->newMethod = longAt((methodArray + (BASE_HEADER_SIZE)) + ((index - SelectorStart) << (SHIFT_FOR_WORD)));\r\t\t\t\tif (((((usqInt) (longAt(foo->newMethod))) >> 8) & 15) >= 12) {\r\t\t\t\t\t/* begin primitiveIndexOf: */\r\t\t\t\t\tmethodPointer = foo->newMethod;\r\t\t\t\t\tprimBits = (((usqInt) (longAt((methodPointer + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD))))) >> 1) & 268435967;\r\t\t\t\t\tfoo->primitiveIndex = (primBits & 511) + (((usqInt) primBits) >> 19);\r\t\t\t\t\tif (foo->primitiveIndex > MaxPrimitiveIndex) {\r\t\t\t\t\t\tfoo->primitiveIndex = 0;\r\t\t\t\t\t}\r\t\t\t\t} else {\r\t\t\t\t\tfoo->primitiveIndex = 248;\r\t\t\t\t}\r\t\t\t\tfound = 1;\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\t\tindex += 1;\r\t\t\tif (index == length) {\r\t\t\t\tif (wrapAround) {\r\t\t\t\t\tfound = 0;\r\t\t\t\t\tgoto l2;\r\t\t\t\t}\r\t\t\t\twrapAround = 1;\r\t\t\t\tindex = SelectorStart;\r\t\t\t}\r\t\t}\r\tl2:\t/* end lookupMethodInDictionary: */;\r\t\tif (found) {\r\t\t\treturn foo->methodClass = currentClass;\r\t\t}\r\t\tcurrentClass = longAt((currentClass + (BASE_HEADER_SIZE)) + (SuperclassIndex << (SHIFT_FOR_WORD)));\r\t}\r\tif (foo->messageSelector == (fetchPointerofObject(SelectorDoesNotUnderstand, foo->specialObjectsOop))) {\r\t\terror(\"Recursive not understood error encountered\");\r\t}\r\t/* begin pushRemappableOop: */\r\tfoo->remapBuffer[(foo->remapBufferCount += 1)] = class;\r\tcreateActualMessageTo(class);\r\t/* begin popRemappableOop */\r\toop2 = foo->remapBuffer[foo->remapBufferCount];\r\tfoo->remapBufferCount -= 1;\r\trclass = oop2;\r\t/* begin fetchPointer:ofObject: */\r\toop3 = foo->specialObjectsOop;\r\tfoo->messageSelector = longAt((oop3 + (BASE_HEADER_SIZE)) + (SelectorDoesNotUnderstand << (SHIFT_FOR_WORD)));\r\treturn lookupMethodInClass(rclass);\r}\r\r\r/*\tThis method lookup tolerates integers as Dictionary keys to \r\tsupport execution of images in which Symbols have been \r\tcompacted out */\r\rsqInt lookupMethodInDictionary(sqInt dictionary) {\rregister struct foo * foo = &fum;\r    sqInt index;\r    sqInt length;\r    sqInt mask;\r    sqInt methodArray;\r    sqInt nextSelector;\r    sqInt wrapAround;\r    sqInt sz;\r    sqInt methodPointer;\r    sqInt primBits;\r    sqInt header;\r\r\t/* begin fetchWordLengthOf: */\r\t/* begin sizeBitsOf: */\r\theader = longAt(dictionary);\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(dictionary - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\tsz = header & (SIZE_MASK);\r\t\tgoto l1;\r\t}\rl1:\t/* end sizeBitsOf: */;\r\tlength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\tmask = (length - SelectorStart) - 1;\r\tif ((foo->messageSelector & 1)) {\r\t\tindex = (mask & ((foo->messageSelector >> 1))) + SelectorStart;\r\t} else {\r\t\tindex = (mask & ((((usqInt) (longAt(foo->messageSelector))) >> 17) & 4095)) + SelectorStart;\r\t}\r\twrapAround = 0;\r\twhile (1) {\r\t\tnextSelector = longAt((dictionary + (BASE_HEADER_SIZE)) + (index << (SHIFT_FOR_WORD)));\r\t\tif (nextSelector == foo->nilObj) {\r\t\t\treturn 0;\r\t\t}\r\t\tif (nextSelector == foo->messageSelector) {\r\t\t\tmethodArray = longAt((dictionary + (BASE_HEADER_SIZE)) + (MethodArrayIndex << (SHIFT_FOR_WORD)));\r\r\t\t\t/* Check if newMethod is a CompiledMethod. */\r\r\t\t\tfoo->newMethod = longAt((methodArray + (BASE_HEADER_SIZE)) + ((index - SelectorStart) << (SHIFT_FOR_WORD)));\r\t\t\tif (((((usqInt) (longAt(foo->newMethod))) >> 8) & 15) >= 12) {\r\t\t\t\t/* begin primitiveIndexOf: */\r\t\t\t\tmethodPointer = foo->newMethod;\r\t\t\t\tprimBits = (((usqInt) (longAt((methodPointer + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD))))) >> 1) & 268435967;\r\t\t\t\tfoo->primitiveIndex = (primBits & 511) + (((usqInt) primBits) >> 19);\r\t\t\t\tif (foo->primitiveIndex > MaxPrimitiveIndex) {\r\r\t\t\t\t\t/* If primitiveIndex is out of range, set to zero before putting in \r\t\t\t\t\t\t\t\t\tcache. This is equiv to primFail, and avoids the need to check on \r\t\t\t\t\t\t\t\t\tevery send. */\r\r\t\t\t\t\tfoo->primitiveIndex = 0;\r\t\t\t\t}\r\t\t\t} else {\r\r\t\t\t\t/* indicate that this is no compiled method - use primitiveInvokeObjectAsMethod */\r\r\t\t\t\tfoo->primitiveIndex = 248;\r\t\t\t}\r\t\t\treturn 1;\r\t\t}\r\t\tindex += 1;\r\t\tif (index == length) {\r\t\t\tif (wrapAround) {\r\t\t\t\treturn 0;\r\t\t\t}\r\t\t\twrapAround = 1;\r\t\t\tindex = SelectorStart;\r\t\t}\r\t}\r}\r\r\r/*\tLookup.  Answer false on failure father than performing MNU processing etc. */\r\rsqInt lookupMethodNoMNUEtcInClass(sqInt class) {\rregister struct foo * foo = &fum;\r    sqInt currentClass;\r    sqInt dictionary;\r\r\tcurrentClass = class;\r\twhile (currentClass != foo->nilObj) {\r\t\tdictionary = longAt((currentClass + (BASE_HEADER_SIZE)) + (MessageDictionaryIndex << (SHIFT_FOR_WORD)));\r\t\tif ((dictionary != foo->nilObj) && (lookupMethodInDictionary(dictionary))) {\r\t\t\tfoo->methodClass = currentClass;\r\t\t\treturn 1;\r\t\t}\r\t\tcurrentClass = longAt((currentClass + (BASE_HEADER_SIZE)) + (SuperclassIndex << (SHIFT_FOR_WORD)));\r\t}\r\treturn 0;\r}\r\r\r/*\tReturn the first free block after the given chunk in memory. */\r\rsqInt lowestFreeAfter(sqInt chunk) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r    sqInt oopHeader;\r    sqInt oopHeaderType;\r    sqInt oopSize;\r\r\toop = chunk + (foo->headerTypeBytes[(longAt(chunk)) & TypeMask]);\r\twhile ((((usqInt) oop)) < (((usqInt) foo->endOfMemory))) {\r\t\toopHeader = longAt(oop);\r\t\toopHeaderType = oopHeader & TypeMask;\r\t\tif (oopHeaderType == HeaderTypeFree) {\r\t\t\treturn oop;\r\t\t} else {\r\t\t\tif (oopHeaderType == HeaderTypeSizeAndClass) {\r\t\t\t\toopSize = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (ALL_BUT_TYPE_MASK);\r\t\t\t} else {\r\t\t\t\toopSize = oopHeader & (SIZE_MASK);\r\t\t\t}\r\t\t}\r\t\toop = (oop + oopSize) + (foo->headerTypeBytes[(longAt(oop + oopSize)) & TypeMask]);\r\t}\r\terror(\"expected to find at least one free object\");\r}\r\r\r/*\tmake a Point xValue@yValue.\rWe know both will be integers so no value nor root checking is needed */\r\rsqInt makePointwithxValueyValue(sqInt xValue, sqInt yValue) {\r    sqInt pointResult;\r\r\tpointResult = instantiateSmallClasssizeInBytes(fetchPointerofObject(ClassPoint, foo->specialObjectsOop), 3 * (BYTES_PER_WORD));\r\tlongAtput((pointResult + (BASE_HEADER_SIZE)) + (XIndex << (SHIFT_FOR_WORD)), ((xValue << 1) | 1));\r\tlongAtput((pointResult + (BASE_HEADER_SIZE)) + (YIndex << (SHIFT_FOR_WORD)), ((yValue << 1) | 1));\r\treturn pointResult;\r}\r\r\r/*\tUse the forwarding table to update the pointers of all non-free objects in the given range of memory. Also remap pointers in root objects which may contains pointers into the given memory range, and don't forget to flush the method cache based on the range */\r\rsqInt mapPointersInObjectsFromto(sqInt memStart, sqInt memEnd) {\rregister struct foo * foo = &fum;\r    sqInt i;\r    sqInt oop;\r    sqInt i1;\r    sqInt oop1;\r    sqInt i2;\r    sqInt probe;\r\r\t/* begin compilerMapHookFrom:to: */\r\tif (foo->compilerInitialized) {\r\t\tcompilerMapFromto(memStart, memEnd);\r\t}\r\t/* begin mapInterpreterOops */\r\tfoo->nilObj = remap(foo->nilObj);\r\tfoo->falseObj = remap(foo->falseObj);\r\tfoo->trueObj = remap(foo->trueObj);\r\tfoo->specialObjectsOop = remap(foo->specialObjectsOop);\r\tif (!(foo->compilerInitialized)) {\r\t\tfoo->stackPointer -= foo->activeContext;\r\t\tfoo->activeContext = remap(foo->activeContext);\r\t\tfoo->stackPointer += foo->activeContext;\r\t\tfoo->theHomeContext = remap(foo->theHomeContext);\r\t}\r\tfoo->instructionPointer -= foo->method;\r\tfoo->method = remap(foo->method);\r\tfoo->instructionPointer += foo->method;\r\tfoo->receiver = remap(foo->receiver);\r\tfoo->messageSelector = remap(foo->messageSelector);\r\tfoo->newMethod = remap(foo->newMethod);\r\tfoo->methodClass = remap(foo->methodClass);\r\tfoo->lkupClass = remap(foo->lkupClass);\r\tfoo->receiverClass = remap(foo->receiverClass);\r\tfor (i1 = 1; i1 <= foo->remapBufferCount; i1 += 1) {\r\t\toop1 = foo->remapBuffer[i1];\r\t\tif (!((oop1 & 1))) {\r\t\t\tfoo->remapBuffer[i1] = (remap(oop1));\r\t\t}\r\t}\r\tfor (i1 = 1; i1 <= foo->jmpDepth; i1 += 1) {\r\t\toop1 = foo->suspendedCallbacks[i1];\r\t\tif (!((oop1 & 1))) {\r\t\t\tfoo->suspendedCallbacks[i1] = (remap(oop1));\r\t\t}\r\t\toop1 = foo->suspendedMethods[i1];\r\t\tif (!((oop1 & 1))) {\r\t\t\tfoo->suspendedMethods[i1] = (remap(oop1));\r\t\t}\r\t}\r\tfor (i = 1; i <= foo->extraRootCount; i += 1) {\r\t\toop = (foo->extraRoots[i])[0];\r\t\tif (!((oop & 1))) {\r\t\t\t(foo->extraRoots[i])[0] = (remap(oop));\r\t\t}\r\t}\r\t/* begin flushMethodCacheFrom:to: */\r\tprobe = 0;\r\tfor (i2 = 1; i2 <= MethodCacheEntries; i2 += 1) {\r\t\tif (!((foo->methodCache[probe + MethodCacheSelector]) == 0)) {\r\t\t\tif ((((((((usqInt) (foo->methodCache[probe + MethodCacheSelector]))) >= (((usqInt) memStart))) && ((((usqInt) (foo->methodCache[probe + MethodCacheSelector]))) < (((usqInt) memEnd)))) || (((((usqInt) (foo->methodCache[probe + MethodCacheClass]))) >= (((usqInt) memStart))) && ((((usqInt) (foo->methodCache[probe + MethodCacheClass]))) < (((usqInt) memEnd))))) || (((((usqInt) (foo->methodCache[probe + MethodCacheMethod]))) >= (((usqInt) memStart))) && ((((usqInt) (foo->methodCache[probe + MethodCacheMethod]))) < (((usqInt) memEnd))))) || (((((usqInt) (foo->methodCache[probe + MethodCacheNative]))) >= (((usqInt) memStart))) && ((((usqInt) (foo->methodCache[probe + MethodCacheNative]))) < (((usqInt) memEnd))))) {\r\t\t\t\tfoo->methodCache[probe + MethodCacheSelector] = 0;\r\t\t\t}\r\t\t}\r\t\tprobe += MethodCacheEntrySize;\r\t}\r\tfor (i2 = 1; i2 <= AtCacheTotalSize; i2 += 1) {\r\t\tfoo->atCache[i2] = 0;\r\t}\r\tupdatePointersInRootObjectsFromto(memStart, memEnd);\r\tupdatePointersInRangeFromto(memStart, memEnd);\r}\r\r\r/*\tMark all objects reachable from the given one.\r\tTrace from the given object even if it is old.\r\tDo not trace if it is already marked.\r\tMark it only if it is a young object. */\r/*\tTracer state variables:\r\t\tchild\t\tobject being examined\r\t\tfield\t\tnext field of child to examine\r\t\tparentField\tfield where child was stored in its referencing object */\r\rsqInt markAndTrace(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt action;\r    sqInt header;\r    sqInt lastFieldOffset;\r    sqInt statMarkCountLocal;\r    sqInt contextSize;\r    sqInt fmt;\r    sqInt header1;\r    sqInt methodHeader;\r    sqInt sz;\r    sqInt sp;\r    sqInt header2;\r    sqInt lastFieldOffset1;\r    sqInt oop1;\r    sqInt header3;\r    sqInt type;\r    sqInt childType;\r    sqInt typeBits;\r    sqInt contextSize1;\r    sqInt fmt1;\r    sqInt header4;\r    sqInt methodHeader1;\r    sqInt sz1;\r    sqInt sp1;\r    sqInt header11;\r    sqInt type1;\r    sqInt header5;\r    sqInt type2;\r    sqInt child;\r    usqInt youngStartLocal;\r    sqInt parentField;\r    sqInt field;\r\r\theader = longAt(oop);\r\tif (!((header & (MARK_BIT)) == 0)) {\r\t\treturn 0;\r\t}\r\theader = (header & (ALL_BUT_TYPE_MASK)) | HeaderTypeGC;\r\tif ((((usqInt) oop)) >= (((usqInt) foo->youngStart))) {\r\t\theader = header | (MARK_BIT);\r\t}\r\tlongAtput(oop, header);\r\tparentField = GCTopMarker;\r\tchild = oop;\r\tif (((((usqInt) (longAt(oop))) >> 8) & 15) == 4) {\r\r\t\t/* Set lastFieldOffset before the weak fields in the receiver */\r\t\t/* And remember as weak root */\r\r\t\tlastFieldOffset = (nonWeakFieldsOf(oop)) << (SHIFT_FOR_WORD);\r\t\tfoo->weakRootCount += 1;\r\t\tfoo->weakRoots[foo->weakRootCount] = oop;\r\t} else {\r\t\t/* begin lastPointerOf: */\r\t\theader1 = longAt(oop);\r\t\tfmt = (((usqInt) header1) >> 8) & 15;\r\t\tif (fmt <= 4) {\r\t\t\tif ((fmt == 3) && ((((((usqInt) header1) >> 12) & 31) == 13) || ((((((usqInt) header1) >> 12) & 31) == 14) || (((((usqInt) header1) >> 12) & 31) == 4)))) {\r\t\t\t\t/* begin fetchStackPointerOf: */\r\t\t\t\tsp = longAt((oop + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tif (!((sp & 1))) {\r\t\t\t\t\tcontextSize = 0;\r\t\t\t\t\tgoto l1;\r\t\t\t\t}\r\t\t\t\tcontextSize = (sp >> 1);\r\t\t\tl1:\t/* end fetchStackPointerOf: */;\r\t\t\t\tlastFieldOffset = (CtxtTempFrameStart + contextSize) * (BYTES_PER_WORD);\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\t\t/* begin sizeBitsOfSafe: */\r\t\t\theader3 = longAt(oop);\r\t\t\t/* begin rightType: */\r\t\t\tif ((header3 & (SIZE_MASK)) == 0) {\r\t\t\t\ttype = HeaderTypeSizeAndClass;\r\t\t\t\tgoto l4;\r\t\t\t} else {\r\t\t\t\tif ((header3 & CompactClassMask) == 0) {\r\t\t\t\t\ttype = HeaderTypeClass;\r\t\t\t\t\tgoto l4;\r\t\t\t\t} else {\r\t\t\t\t\ttype = HeaderTypeShort;\r\t\t\t\t\tgoto l4;\r\t\t\t\t}\r\t\t\t}\r\t\tl4:\t/* end rightType: */;\r\t\t\tif (type == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (ALL_BUT_TYPE_MASK);\r\t\t\t\tgoto l5;\r\t\t\t} else {\r\t\t\t\tsz = header3 & (SIZE_MASK);\r\t\t\t\tgoto l5;\r\t\t\t}\r\t\tl5:\t/* end sizeBitsOfSafe: */;\r\t\t\tlastFieldOffset = sz - (BASE_HEADER_SIZE);\r\t\t\tgoto l2;\r\t\t}\r\t\tif (fmt < 12) {\r\t\t\tlastFieldOffset = 0;\r\t\t\tgoto l2;\r\t\t}\r\t\tmethodHeader = longAt(oop + (BASE_HEADER_SIZE));\r\t\tlastFieldOffset = (((((usqInt) methodHeader) >> 10) & 255) * (BYTES_PER_WORD)) + (BASE_HEADER_SIZE);\r\tl2:\t/* end lastPointerOf: */;\r\t}\r\tfield = oop + lastFieldOffset;\r\taction = StartField;\r\tyoungStartLocal = foo->youngStart;\r\r\t/* run the tracer state machine until all objects reachable from oop are marked */\r\r\tstatMarkCountLocal = foo->statMarkCount;\r\twhile (!(action == Done)) {\r\t\tstatMarkCountLocal += 1;\r\t\tif (action == StartField) {\r\t\t\t/* begin startField */\r\t\t\tchild = longAt(field);\r\t\t\ttypeBits = child & TypeMask;\r\t\t\tif ((typeBits & 1) == 1) {\r\t\t\t\tfield -= BYTES_PER_WORD;\r\t\t\t\taction = StartField;\r\t\t\t\tgoto l7;\r\t\t\t}\r\t\t\tif (typeBits == 0) {\r\t\t\t\tlongAtput(field, parentField);\r\t\t\t\tparentField = field;\r\t\t\t\taction = StartObj;\r\t\t\t\tgoto l7;\r\t\t\t}\r\t\t\tif (typeBits == 2) {\r\t\t\t\tif ((child & CompactClassMask) != 0) {\r\t\t\t\t\tchild = child & (ALL_BUT_TYPE_MASK);\r\t\t\t\t\t/* begin rightType: */\r\t\t\t\t\tif ((child & (SIZE_MASK)) == 0) {\r\t\t\t\t\t\tchildType = HeaderTypeSizeAndClass;\r\t\t\t\t\t\tgoto l6;\r\t\t\t\t\t} else {\r\t\t\t\t\t\tif ((child & CompactClassMask) == 0) {\r\t\t\t\t\t\t\tchildType = HeaderTypeClass;\r\t\t\t\t\t\t\tgoto l6;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\tchildType = HeaderTypeShort;\r\t\t\t\t\t\t\tgoto l6;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\tl6:\t/* end rightType: */;\r\t\t\t\t\tlongAtput(field, child | childType);\r\t\t\t\t\taction = Upward;\r\t\t\t\t\tgoto l7;\r\t\t\t\t} else {\r\t\t\t\t\tchild = longAt(field - (BYTES_PER_WORD));\r\t\t\t\t\tchild = child & (ALL_BUT_TYPE_MASK);\r\t\t\t\t\tlongAtput(field - (BYTES_PER_WORD), parentField);\r\t\t\t\t\tparentField = (field - (BYTES_PER_WORD)) | 1;\r\t\t\t\t\taction = StartObj;\r\t\t\t\t\tgoto l7;\r\t\t\t\t}\r\t\t\t}\r\t\tl7:\t/* end startField */;\r\t\t}\r\t\tif (action == StartObj) {\r\t\t\t/* begin startObj */\r\t\t\toop1 = child;\r\t\t\tif ((((usqInt) oop1)) < (((usqInt) youngStartLocal))) {\r\t\t\t\tfield = oop1;\r\t\t\t\taction = Upward;\r\t\t\t\tgoto l3;\r\t\t\t}\r\t\t\theader2 = longAt(oop1);\r\t\t\tif ((header2 & (MARK_BIT)) == 0) {\r\t\t\t\tif (((((usqInt) (longAt(oop1))) >> 8) & 15) == 4) {\r\t\t\t\t\tlastFieldOffset1 = (nonWeakFieldsOf(oop1)) << (SHIFT_FOR_WORD);\r\t\t\t\t} else {\r\t\t\t\t\t/* begin lastPointerOf: */\r\t\t\t\t\theader4 = longAt(oop1);\r\t\t\t\t\tfmt1 = (((usqInt) header4) >> 8) & 15;\r\t\t\t\t\tif (fmt1 <= 4) {\r\t\t\t\t\t\tif ((fmt1 == 3) && ((((((usqInt) header4) >> 12) & 31) == 13) || ((((((usqInt) header4) >> 12) & 31) == 14) || (((((usqInt) header4) >> 12) & 31) == 4)))) {\r\t\t\t\t\t\t\t/* begin fetchStackPointerOf: */\r\t\t\t\t\t\t\tsp1 = longAt((oop1 + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t\t\t\tif (!((sp1 & 1))) {\r\t\t\t\t\t\t\t\tcontextSize1 = 0;\r\t\t\t\t\t\t\t\tgoto l8;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\tcontextSize1 = (sp1 >> 1);\r\t\t\t\t\t\tl8:\t/* end fetchStackPointerOf: */;\r\t\t\t\t\t\t\tlastFieldOffset1 = (CtxtTempFrameStart + contextSize1) * (BYTES_PER_WORD);\r\t\t\t\t\t\t\tgoto l11;\r\t\t\t\t\t\t}\r\t\t\t\t\t\t/* begin sizeBitsOfSafe: */\r\t\t\t\t\t\theader11 = longAt(oop1);\r\t\t\t\t\t\t/* begin rightType: */\r\t\t\t\t\t\tif ((header11 & (SIZE_MASK)) == 0) {\r\t\t\t\t\t\t\ttype1 = HeaderTypeSizeAndClass;\r\t\t\t\t\t\t\tgoto l9;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\tif ((header11 & CompactClassMask) == 0) {\r\t\t\t\t\t\t\t\ttype1 = HeaderTypeClass;\r\t\t\t\t\t\t\t\tgoto l9;\r\t\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\t\ttype1 = HeaderTypeShort;\r\t\t\t\t\t\t\t\tgoto l9;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t}\r\t\t\t\t\tl9:\t/* end rightType: */;\r\t\t\t\t\t\tif (type1 == HeaderTypeSizeAndClass) {\r\t\t\t\t\t\t\tsz1 = (longAt(oop1 - ((BYTES_PER_WORD) * 2))) & (ALL_BUT_TYPE_MASK);\r\t\t\t\t\t\t\tgoto l10;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\tsz1 = header11 & (SIZE_MASK);\r\t\t\t\t\t\t\tgoto l10;\r\t\t\t\t\t\t}\r\t\t\t\t\tl10:\t/* end sizeBitsOfSafe: */;\r\t\t\t\t\t\tlastFieldOffset1 = sz1 - (BASE_HEADER_SIZE);\r\t\t\t\t\t\tgoto l11;\r\t\t\t\t\t}\r\t\t\t\t\tif (fmt1 < 12) {\r\t\t\t\t\t\tlastFieldOffset1 = 0;\r\t\t\t\t\t\tgoto l11;\r\t\t\t\t\t}\r\t\t\t\t\tmethodHeader1 = longAt(oop1 + (BASE_HEADER_SIZE));\r\t\t\t\t\tlastFieldOffset1 = (((((usqInt) methodHeader1) >> 10) & 255) * (BYTES_PER_WORD)) + (BASE_HEADER_SIZE);\r\t\t\t\tl11:\t/* end lastPointerOf: */;\r\t\t\t\t}\r\t\t\t\theader2 = header2 & (ALL_BUT_TYPE_MASK);\r\t\t\t\theader2 = (header2 | (MARK_BIT)) | HeaderTypeGC;\r\t\t\t\tlongAtput(oop1, header2);\r\t\t\t\tfield = oop1 + lastFieldOffset1;\r\t\t\t\taction = StartField;\r\t\t\t\tgoto l3;\r\t\t\t} else {\r\t\t\t\tfield = oop1;\r\t\t\t\taction = Upward;\r\t\t\t\tgoto l3;\r\t\t\t}\r\t\tl3:\t/* end startObj */;\r\t\t}\r\t\tif (action == Upward) {\r\t\t\t/* begin upward */\r\t\t\tif ((parentField & 1) == 1) {\r\t\t\t\tif (parentField == GCTopMarker) {\r\t\t\t\t\theader5 = (longAt(field)) & (ALL_BUT_TYPE_MASK);\r\t\t\t\t\t/* begin rightType: */\r\t\t\t\t\tif ((header5 & (SIZE_MASK)) == 0) {\r\t\t\t\t\t\ttype2 = HeaderTypeSizeAndClass;\r\t\t\t\t\t\tgoto l12;\r\t\t\t\t\t} else {\r\t\t\t\t\t\tif ((header5 & CompactClassMask) == 0) {\r\t\t\t\t\t\t\ttype2 = HeaderTypeClass;\r\t\t\t\t\t\t\tgoto l12;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\ttype2 = HeaderTypeShort;\r\t\t\t\t\t\t\tgoto l12;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\tl12:\t/* end rightType: */;\r\t\t\t\t\tlongAtput(field, header5 | type2);\r\t\t\t\t\taction = Done;\r\t\t\t\t\tgoto l14;\r\t\t\t\t} else {\r\t\t\t\t\tchild = field;\r\t\t\t\t\tfield = parentField - 1;\r\t\t\t\t\tparentField = longAt(field);\r\t\t\t\t\theader5 = longAt(field + (BYTES_PER_WORD));\r\t\t\t\t\t/* begin rightType: */\r\t\t\t\t\tif ((header5 & (SIZE_MASK)) == 0) {\r\t\t\t\t\t\ttype2 = HeaderTypeSizeAndClass;\r\t\t\t\t\t\tgoto l13;\r\t\t\t\t\t} else {\r\t\t\t\t\t\tif ((header5 & CompactClassMask) == 0) {\r\t\t\t\t\t\t\ttype2 = HeaderTypeClass;\r\t\t\t\t\t\t\tgoto l13;\r\t\t\t\t\t\t} else {\r\t\t\t\t\t\t\ttype2 = HeaderTypeShort;\r\t\t\t\t\t\t\tgoto l13;\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\tl13:\t/* end rightType: */;\r\t\t\t\t\tlongAtput(field, child | type2);\r\t\t\t\t\tfield += BYTES_PER_WORD;\r\t\t\t\t\theader5 = header5 & (ALL_BUT_TYPE_MASK);\r\t\t\t\t\tlongAtput(field, header5 | type2);\r\t\t\t\t\taction = Upward;\r\t\t\t\t\tgoto l14;\r\t\t\t\t}\r\t\t\t} else {\r\t\t\t\tchild = field;\r\t\t\t\tfield = parentField;\r\t\t\t\tparentField = longAt(field);\r\t\t\t\tlongAtput(field, child);\r\t\t\t\tfield -= BYTES_PER_WORD;\r\t\t\t\taction = StartField;\r\t\t\t\tgoto l14;\r\t\t\t}\r\t\tl14:\t/* end upward */;\r\t\t}\r\t}\r\tfoo->statMarkCount = statMarkCountLocal;\r}\r\r\r/*\tMark and trace all oops in the interpreter's state. */\r/*\tAssume: All traced variables contain valid oops. */\r\rsqInt markAndTraceInterpreterOops(void) {\rregister struct foo * foo = &fum;\r    sqInt i;\r    sqInt oop;\r\r\t/* begin compilerMarkHook */\r\tif (foo->compilerInitialized) {\r\t\tcompilerMark();\r\t}\r\tmarkAndTrace(foo->specialObjectsOop);\r\tif (foo->compilerInitialized) {\r\t\tmarkAndTrace(foo->receiver);\r\t\tmarkAndTrace(foo->method);\r\t} else {\r\t\tmarkAndTrace(foo->activeContext);\r\t}\r\tmarkAndTrace(foo->messageSelector);\r\tmarkAndTrace(foo->newMethod);\r\tmarkAndTrace(foo->methodClass);\r\tmarkAndTrace(foo->lkupClass);\r\tmarkAndTrace(foo->receiverClass);\r\tfor (i = 1; i <= foo->remapBufferCount; i += 1) {\r\t\toop = foo->remapBuffer[i];\r\t\tif (!((oop & 1))) {\r\t\t\tmarkAndTrace(oop);\r\t\t}\r\t}\r\tfor (i = 1; i <= foo->jmpDepth; i += 1) {\r\t\toop = foo->suspendedCallbacks[i];\r\t\tif (!((oop & 1))) {\r\t\t\tmarkAndTrace(oop);\r\t\t}\r\t\toop = foo->suspendedMethods[i];\r\t\tif (!((oop & 1))) {\r\t\t\tmarkAndTrace(oop);\r\t\t}\r\t}\r}\r\r\r/*\tMark phase of the mark and sweep garbage collector. Set \r\tthe mark bits of all reachable objects. Free chunks are \r\tuntouched by this process. */\r/*\tAssume: All non-free objects are initially unmarked. Root \r\tobjects were unmarked when they were made roots. (Make \r\tsure this stays true!!). */\r\rsqInt markPhase(void) {\rregister struct foo * foo = &fum;\r    sqInt i;\r    sqInt oop;\r\r\r\t/* clear the recycled context lists */\r\r\tfoo->freeContexts = NilContext;\r\r\t/* trace the interpreter's objects, including the active stack \r\tand special objects array */\r\r\tfoo->freeLargeContexts = NilContext;\r\tmarkAndTraceInterpreterOops();\r\r\t/* trace the roots */\r\r\tfoo->statSpecialMarkCount = foo->statMarkCount;\r\tfor (i = 1; i <= foo->rootTableCount; i += 1) {\r\t\toop = foo->rootTable[i];\r\t\tmarkAndTrace(oop);\r\t}\r\tfor (i = 1; i <= foo->extraRootCount; i += 1) {\r\t\toop = (foo->extraRoots[i])[0];\r\t\tif (!((oop & 1))) {\r\t\t\tmarkAndTrace(oop);\r\t\t}\r\t}\r}\r\rsqInt methodArgumentCount(void) {\r\treturn foo->argumentCount;\r}\r\rsqInt methodPrimitiveIndex(void) {\r\treturn foo->primitiveIndex;\r}\r\r\r/*\tThe module with the given name was just unloaded. \r\tMake sure we have no dangling references. */\r\rEXPORT(sqInt) moduleUnloaded(char *aModuleName) {\r\tif ((strcmp(aModuleName, \"SurfacePlugin\")) == 0) {\r\r\t\t/* Surface plugin went away. Should never happen. But  then, who knows */\r\r\t\tshowSurfaceFn = 0;\r\t}\r}\r\r\r/*\tFor access from BitBlt module */\r\rsqInt nilObject(void) {\r\treturn foo->nilObj;\r}\r\r\r/*\tReturn the number of non-weak fields in oop (i.e. the number of fixed fields).\r\tNote: The following is copied from fixedFieldsOf:format:length: since we do know\r\tthe format of the oop (e.g. format = 4) and thus don't need the length. */\r\rsqInt nonWeakFieldsOf(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt class;\r    sqInt classFormat;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\tif (!(((((usqInt) (longAt(oop))) >> 8) & 15) == 4)) {\r\t\terror(\"Called fixedFieldsOfWeak: with a non-weak oop\");\r\t}\r\t/* begin fetchClassOf: */\r\tif ((oop & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tclass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(oop))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tclass = (longAt(oop - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tclass = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\rl1:\t/* end fetchClassOf: */;\r\tclassFormat = (longAt((class + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1;\r\treturn (((((usqInt) classFormat) >> 11) & 192) + ((((usqInt) classFormat) >> 2) & 63)) - 1;\r}\r\r\r/*\tFloat objects were saved in platform word ordering. Reorder them into the\r\ttraditional object format. */\r\rsqInt normalizeFloatOrderingInImage(void) {\rregister struct foo * foo = &fum;\r    unsigned int *floatData;\r    sqInt oop;\r    unsigned int val;\r    sqInt obj;\r    sqInt sz;\r    sqInt header;\r\r\tif (!(isBigEnder())) {\r\t\t/* begin firstAccessibleObject */\r\t\tobj = memory + (foo->headerTypeBytes[(longAt(memory)) & TypeMask]);\r\t\twhile ((((usqInt) obj)) < (((usqInt) foo->endOfMemory))) {\r\t\t\tif (!(((longAt(obj)) & TypeMask) == HeaderTypeFree)) {\r\t\t\t\toop = obj;\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t\t/* begin objectAfter: */\r\t\t\tif (DoAssertionChecks) {\r\t\t\t\tif ((((usqInt) obj)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t\t}\r\t\t\t}\r\t\t\tif (((longAt(obj)) & TypeMask) == HeaderTypeFree) {\r\t\t\t\tsz = (longAt(obj)) & (ALL_BUT_TYPE_MASK);\r\t\t\t} else {\r\t\t\t\t/* begin sizeBitsOf: */\r\t\t\t\theader = longAt(obj);\r\t\t\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\t\tsz = (longAt(obj - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\t\tgoto l2;\r\t\t\t\t} else {\r\t\t\t\t\tsz = header & (SIZE_MASK);\r\t\t\t\t\tgoto l2;\r\t\t\t\t}\r\t\t\tl2:\t/* end sizeBitsOf: */;\r\t\t\t}\r\t\t\tobj = (obj + sz) + (foo->headerTypeBytes[(longAt(obj + sz)) & TypeMask]);\r\t\t}\r\t\terror(\"heap is empty\");\r\tl1:\t/* end firstAccessibleObject */;\r\t\twhile (!(oop == null)) {\r\t\t\tif (!(((longAt(oop)) & TypeMask) == HeaderTypeFree)) {\r\t\t\t\tif ((fetchClassOf(oop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\t\t\t\tfloatData = ((unsigned int *) (firstIndexableField(oop)));\r\t\t\t\t\tval = floatData[0];\r\t\t\t\t\tfloatData[0] = (floatData[1]);\r\t\t\t\t\tfloatData[1] = val;\r\t\t\t\t}\r\t\t\t\toop = accessibleObjectAfter(oop);\r\t\t\t}\r\t\t}\r\t}\r}\r\r\r/*\tRecord that the given oop in the old object area points to an \r\tobject in the young area. \r\tHeaderLoc is usually = oop, but may be an addr in a \r\tforwarding block. */\r\rsqInt noteAsRootheaderLoc(sqInt oop, sqInt headerLoc) {\rregister struct foo * foo = &fum;\r    sqInt header;\r\r\theader = longAt(headerLoc);\r\tif ((header & (ROOT_BIT)) == 0) {\r\t\tif (foo->rootTableCount < RootTableRedZone) {\r\r\t\t\t/* record oop as root only if not already recorded */\r\t\t\t/* record root if there is enough room in the roots \r\t\t\t\t\ttable  */\r\r\t\t\tfoo->rootTableCount += 1;\r\t\t\tfoo->rootTable[foo->rootTableCount] = oop;\r\t\t\tlongAtput(headerLoc, header | (ROOT_BIT));\r\t\t} else {\r\t\t\tif (foo->rootTableCount < RootTableSize) {\r\r\t\t\t\t/* we're getting in the red zone */\r\t\t\t\t/* but there's still space to record it */\r\r\t\t\t\tfoo->rootTableCount += 1;\r\t\t\t\tfoo->rootTable[foo->rootTableCount] = oop;\r\t\t\t\tlongAtput(headerLoc, header | (ROOT_BIT));\r\t\t\t\tfoo->allocationCount = foo->allocationsBetweenGCs + 1;\r\t\t\t}\r\t\t}\r\t}\r}\r\r\r/*\tThis should never be called: either the compiler is uninitialised (in which case the hooks should never be reached) or the compiler initialisation should have replaced all the hook with their external implementations. */\r\rsqInt nullCompilerHook(void) {\r\terror(\"uninitialised compiler hook called\");\r\treturn 0;\r}\r\r\r/*\tReturn the object or free chunk immediately following the \r\tgiven object or free chunk in memory. Return endOfMemory \r\twhen enumeration is complete. */\r\rsqInt objectAfter(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt sz;\r    sqInt header;\r\r\tif (DoAssertionChecks) {\r\t\tif ((((usqInt) oop)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\terror(\"no objects after the end of memory\");\r\t\t}\r\t}\r\tif (((longAt(oop)) & TypeMask) == HeaderTypeFree) {\r\t\tsz = (longAt(oop)) & (ALL_BUT_TYPE_MASK);\r\t} else {\r\t\t/* begin sizeBitsOf: */\r\t\theader = longAt(oop);\r\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\tsz = header & (SIZE_MASK);\r\t\t\tgoto l1;\r\t\t}\r\tl1:\t/* end sizeBitsOf: */;\r\t}\r\treturn (oop + sz) + (foo->headerTypeBytes[(longAt(oop + sz)) & TypeMask]);\r}\r\r\r/*\tThis message is deprecated but supported for a while via a tweak to sqVirtualMachine.[ch] Use fetchLong32, fetchLong64 or fetchPointer instead for new code */\r\rsqInt obsoleteDontUseThisFetchWordofObject(sqInt fieldIndex, sqInt oop) {\r\treturn long32At((oop + (BASE_HEADER_SIZE)) + (fieldIndex << 2));\r}\r\r\r/*\tIf this is a pointers object, check that its fields are all okay oops. */\r\rsqInt okayFields(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt c;\r    sqInt fieldOop;\r    sqInt i;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\tif ((oop == null) || (oop == 0)) {\r\t\treturn 1;\r\t}\r\tif ((oop & 1)) {\r\t\treturn 1;\r\t}\r\tokayOop(oop);\r\toopHasOkayClass(oop);\r\tif (!(((oop & 1) == 0) && (((((usqInt) (longAt(oop))) >> 8) & 15) <= 4))) {\r\t\treturn 1;\r\t}\r\t/* begin fetchClassOf: */\r\tif ((oop & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tc = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(oop))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tc = (longAt(oop - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tc = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\rl1:\t/* end fetchClassOf: */;\r\tif ((c == (fetchPointerofObject(ClassMethodContext, foo->specialObjectsOop))) || (c == (fetchPointerofObject(ClassBlockContext, foo->specialObjectsOop)))) {\r\t\ti = (CtxtTempFrameStart + (fetchStackPointerOf(oop))) - 1;\r\t} else {\r\t\ti = (lengthOf(oop)) - 1;\r\t}\r\twhile (i >= 0) {\r\t\tfieldOop = longAt((oop + (BASE_HEADER_SIZE)) + (i << (SHIFT_FOR_WORD)));\r\t\tif (!((fieldOop & 1))) {\r\t\t\tokayOop(fieldOop);\r\t\t\toopHasOkayClass(fieldOop);\r\t\t}\r\t\ti -= 1;\r\t}\r}\r\r\r/*\tVerify that the given oop is legitimate. Check address, header, and size but not class. */\r\rsqInt okayOop(sqInt signedOop) {\rregister struct foo * foo = &fum;\r    sqInt fmt;\r    usqInt oop;\r    sqInt sz;\r    sqInt type;\r    sqInt unusedBit;\r    sqInt header;\r\r\r\t/* address and size checks */\r\r\toop = ((usqInt) signedOop);\r\tif ((oop & 1)) {\r\t\treturn 1;\r\t}\r\tif (!(oop < foo->endOfMemory)) {\r\t\terror(\"oop is not a valid address\");\r\t}\r\tif (!((oop % (BYTES_PER_WORD)) == 0)) {\r\t\terror(\"oop is not a word-aligned address\");\r\t}\r\t/* begin sizeBitsOf: */\r\theader = longAt(oop);\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\tsz = header & (SIZE_MASK);\r\t\tgoto l1;\r\t}\rl1:\t/* end sizeBitsOf: */;\r\tif (!((oop + sz) < foo->endOfMemory)) {\r\t\terror(\"oop size would make it extend beyond the end of memory\");\r\t}\r\ttype = (longAt(oop)) & TypeMask;\r\tif (type == HeaderTypeFree) {\r\t\terror(\"oop is a free chunk, not an object\");\r\t}\r\tif (type == HeaderTypeShort) {\r\t\tif (((((usqInt) (longAt(oop))) >> 12) & 31) == 0) {\r\t\t\terror(\"cannot have zero compact class field in a short header\");\r\t\t}\r\t}\r\tif (type == HeaderTypeClass) {\r\t\tif (!((oop >= (BYTES_PER_WORD)) && (((longAt(oop - (BYTES_PER_WORD))) & TypeMask) == type))) {\r\t\t\terror(\"class header word has wrong type\");\r\t\t}\r\t}\r\tif (type == HeaderTypeSizeAndClass) {\r\t\tif (!((oop >= ((BYTES_PER_WORD) * 2)) && ((((longAt(oop - ((BYTES_PER_WORD) * 2))) & TypeMask) == type) && (((longAt(oop - (BYTES_PER_WORD))) & TypeMask) == type)))) {\r\t\t\terror(\"class header word has wrong type\");\r\t\t}\r\t}\r\tfmt = (((usqInt) (longAt(oop))) >> 8) & 15;\r\tif ((fmt == 5) || (fmt == 7)) {\r\t\terror(\"oop has an unknown format type\");\r\t}\r\tunusedBit = 536870912;\r\tif ((BYTES_PER_WORD) == 8) {\r\t\tunusedBit = unusedBit << 16;\r\t\tunusedBit = unusedBit << 16;\r\t}\r\tif (!(((longAt(oop)) & unusedBit) == 0)) {\r\t\terror(\"unused header bit 30 is set; should be zero\");\r\t}\r\tif ((((longAt(oop)) & (ROOT_BIT)) == 1) && (oop >= foo->youngStart)) {\r\t\terror(\"root bit is set in a young object\");\r\t}\r\treturn 1;\r}\r\r\r/*\tCompare two oop values, treating them as object memory locations.\r\tUse #cCoerce:to: to ensure comparison of unsigned magnitudes. This\r\tmethod will be inlined during C translation. */\r\rsqInt oopisGreaterThan(sqInt anOop, sqInt otherOop) {\r\treturn (((usqInt) anOop)) > (((usqInt) otherOop));\r}\r\r\r/*\tCompare two oop values, treating them as object memory locations.\r\tUse #cCoerce:to: to ensure comparison of unsigned magnitudes. This\r\tmethod will be inlined during C translation. */\r\rsqInt oopisGreaterThanOrEqualTo(sqInt anOop, sqInt otherOop) {\r\treturn (((usqInt) anOop)) >= (((usqInt) otherOop));\r}\r\r\r/*\tCompare two oop values, treating them as object memory locations.\r\tUse #cCoerce:to: to ensure comparison of unsigned magnitudes. This\r\tmethod will be inlined during C translation. */\r\rsqInt oopisLessThan(sqInt anOop, sqInt otherOop) {\r\treturn (((usqInt) anOop)) < (((usqInt) otherOop));\r}\r\r\r/*\tSimilar to oopHasOkayClass:, except that it only returns true or false. */\r\rsqInt oopHasAcceptableClass(sqInt signedOop) {\rregister struct foo * foo = &fum;\r    sqInt behaviorFormatBits;\r    sqInt formatMask;\r    usqInt oop;\r    usqInt oopClass;\r    sqInt oopFormatBits;\r\r\tif ((signedOop & 1)) {\r\t\treturn 1;\r\t}\r\toop = ((usqInt) signedOop);\r\tif (!(oop < foo->endOfMemory)) {\r\t\treturn 0;\r\t}\r\tif (!((oop % (BYTES_PER_WORD)) == 0)) {\r\t\treturn 0;\r\t}\r\tif (!((oop + (sizeBitsOf(oop))) < foo->endOfMemory)) {\r\t\treturn 0;\r\t}\r\toopClass = ((usqInt) (fetchClassOf(oop)));\r\tif ((oopClass & 1)) {\r\t\treturn 0;\r\t}\r\tif (!(oopClass < foo->endOfMemory)) {\r\t\treturn 0;\r\t}\r\tif (!((oopClass % (BYTES_PER_WORD)) == 0)) {\r\t\treturn 0;\r\t}\r\tif (!((oopClass + (sizeBitsOf(oopClass))) < foo->endOfMemory)) {\r\t\treturn 0;\r\t}\r\tif (!((((oopClass & 1) == 0) && (((((usqInt) (longAt(oopClass))) >> 8) & 15) <= 4)) && ((lengthOf(oopClass)) >= 3))) {\r\t\treturn 0;\r\t}\r\tif (((oop & 1) == 0) && (((((usqInt) (longAt(oop))) >> 8) & 15) >= 8)) {\r\r\t\t/* ignore extra bytes size bits */\r\r\t\tformatMask = 3072;\r\t} else {\r\t\tformatMask = 3840;\r\t}\r\tbehaviorFormatBits = ((longAt((oopClass + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1) & formatMask;\r\toopFormatBits = (longAt(oop)) & formatMask;\r\tif (!(behaviorFormatBits == oopFormatBits)) {\r\t\treturn 0;\r\t}\r\treturn 1;\r}\r\r\r/*\tAttempt to verify that the given oop has a reasonable behavior. The class must be a valid, non-integer oop and must not be nilObj. It must be a pointers object with three or more fields. Finally, the instance specification field of the behavior must match that of the instance. */\r\rsqInt oopHasOkayClass(sqInt signedOop) {\r    sqInt behaviorFormatBits;\r    sqInt formatMask;\r    usqInt oop;\r    usqInt oopClass;\r    sqInt oopFormatBits;\r\r\toop = ((usqInt) signedOop);\r\tokayOop(oop);\r\toopClass = ((usqInt) (fetchClassOf(oop)));\r\tif ((oopClass & 1)) {\r\t\terror(\"a SmallInteger is not a valid class or behavior\");\r\t}\r\tokayOop(oopClass);\r\tif (!((((oopClass & 1) == 0) && (((((usqInt) (longAt(oopClass))) >> 8) & 15) <= 4)) && ((lengthOf(oopClass)) >= 3))) {\r\t\terror(\"a class (behavior) must be a pointers object of size >= 3\");\r\t}\r\tif (((oop & 1) == 0) && (((((usqInt) (longAt(oop))) >> 8) & 15) >= 8)) {\r\r\t\t/* ignore extra bytes size bits */\r\r\t\tformatMask = 3072;\r\t} else {\r\t\tformatMask = 3840;\r\t}\r\tbehaviorFormatBits = ((longAt((oopClass + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1) & formatMask;\r\toopFormatBits = (longAt(oop)) & formatMask;\r\tif (!(behaviorFormatBits == oopFormatBits)) {\r\t\terror(\"object and its class (behavior) formats differ\");\r\t}\r\treturn 1;\r}\r\r\r/*\tNote: May be called by translated primitive code. */\r\rsqInt pop(sqInt nItems) {\rregister struct foo * foo = &fum;\r\tfoo->stackPointer -= nItems * (BYTES_PER_WORD);\r}\r\rsqInt popthenPush(sqInt nItems, sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt sp;\r\r\tlongAtput(sp = foo->stackPointer - ((nItems - 1) * (BYTES_PER_WORD)), oop);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tNote: May be called by translated primitive code. */\r\rdouble popFloat(void) {\rregister struct foo * foo = &fum;\r    double  result;\r    sqInt top;\r    sqInt top1;\r    sqInt classOop;\r    sqInt ccIndex;\r    sqInt cl;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop;\r\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\ttop = top1;\r\t/* begin assertClassOf:is: */\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\tclassOop = longAt((oop + (BASE_HEADER_SIZE)) + (ClassFloat << (SHIFT_FOR_WORD)));\r\tif ((top & 1)) {\r\t\tfoo->successFlag = 0;\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(top))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tcl = (longAt(top - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop2 = foo->specialObjectsOop;\r\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tcl = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t}\r\t/* begin success: */\r\tfoo->successFlag = (cl == classOop) && foo->successFlag;\rl1:\t/* end assertClassOf:is: */;\r\tif (foo->successFlag) {\r\t\t;\r\t\tfetchFloatAtinto(top + (BASE_HEADER_SIZE), result);\r\t}\r\treturn result;\r}\r\r\r/*\tPop and return the possibly remapped object from the remap buffer. */\r\rsqInt popRemappableOop(void) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r\r\toop = foo->remapBuffer[foo->remapBufferCount];\r\tfoo->remapBufferCount -= 1;\r\treturn oop;\r}\r\rsqInt popStack(void) {\rregister struct foo * foo = &fum;\r    sqInt top;\r\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\treturn top;\r}\r\r\r/*\tNote - integerValue is interpreted as POSITIVE, eg, as the result of\r\t\tBitmap>at:, or integer>bitAnd:. */\r\rsqInt positive32BitIntegerFor(sqInt integerValue) {\rregister struct foo * foo = &fum;\r    sqInt newLargeInteger;\r\r\tif (integerValue >= 0) {\r\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t(((((int) integerValue)) ^ ((((int) integerValue)) << 1)) >= 0)\r# else\r\t\t\t((integerValue >= -1073741824) && (integerValue <= 1073741823))\r# endif  // SQ_HOST32\r\t\t) {\r\t\t\treturn ((integerValue << 1) | 1);\r\t\t}\r\t}\r\tif ((BYTES_PER_WORD) == 4) {\r\r\t\t/* Faster instantiateSmallClass: currently only works with integral word size. */\r\r\t\tnewLargeInteger = instantiateSmallClasssizeInBytes(fetchPointerofObject(ClassLargePositiveInteger, foo->specialObjectsOop), (BASE_HEADER_SIZE) + 4);\r\t} else {\r\r\t\t/* Cant use instantiateSmallClass: due to integral word requirement. */\r\r\t\tnewLargeInteger = instantiateClassindexableSize(fetchPointerofObject(ClassLargePositiveInteger, foo->specialObjectsOop), 4);\r\t}\r\tbyteAtput((newLargeInteger + (BASE_HEADER_SIZE)) + 3, (((usqInt) integerValue) >> 24) & 255);\r\tbyteAtput((newLargeInteger + (BASE_HEADER_SIZE)) + 2, (((usqInt) integerValue) >> 16) & 255);\r\tbyteAtput((newLargeInteger + (BASE_HEADER_SIZE)) + 1, (((usqInt) integerValue) >> 8) & 255);\r\tbyteAtput((newLargeInteger + (BASE_HEADER_SIZE)) + 0, integerValue & 255);\r\treturn newLargeInteger;\r}\r\r\r/*\tConvert the given object into an integer value.\r\tThe object may be either a positive ST integer or a four-byte LargePositiveInteger. */\r\rsqInt positive32BitValueOf(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt sz;\r    sqInt value;\r    sqInt header;\r    sqInt sz1;\r    sqInt classOop;\r    sqInt ccIndex;\r    sqInt cl;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\tif ((oop & 1)) {\r\t\tvalue = (oop >> 1);\r\t\tif (value < 0) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t\treturn value;\r\t}\r\t/* begin assertClassOf:is: */\r\t/* begin fetchPointer:ofObject: */\r\toop3 = foo->specialObjectsOop;\r\tclassOop = longAt((oop3 + (BASE_HEADER_SIZE)) + (ClassLargePositiveInteger << (SHIFT_FOR_WORD)));\r\tif ((oop & 1)) {\r\t\tfoo->successFlag = 0;\r\t\tgoto l2;\r\t}\r\tccIndex = (((usqInt) (longAt(oop))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tcl = (longAt(oop - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop2 = foo->specialObjectsOop;\r\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tcl = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t}\r\t/* begin success: */\r\tfoo->successFlag = (cl == classOop) && foo->successFlag;\rl2:\t/* end assertClassOf:is: */;\r\tif (foo->successFlag) {\r\t\t/* begin lengthOf: */\r\t\theader = longAt(oop);\r\t\t/* begin lengthOf:baseHeader:format: */\r\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\tsz1 = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t} else {\r\t\t\tsz1 = header & (SIZE_MASK);\r\t\t}\r\t\tsz1 -= header & (SIZE_4_BIT);\r\t\tif (((((usqInt) header) >> 8) & 15) <= 4) {\r\t\t\tsz = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\t\tgoto l1;\r\t\t}\r\t\tif (((((usqInt) header) >> 8) & 15) < 8) {\r\t\t\tsz = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> 2;\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\tsz = (sz1 - (BASE_HEADER_SIZE)) - (((((usqInt) header) >> 8) & 15) & 3);\r\t\t\tgoto l1;\r\t\t}\r\tl1:\t/* end lengthOf:baseHeader:format: */;\r\t\tif (!(sz == 4)) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t}\r\tif (foo->successFlag) {\r\t\treturn (((byteAt((oop + (BASE_HEADER_SIZE)) + 0)) + ((byteAt((oop + (BASE_HEADER_SIZE)) + 1)) << 8)) + ((byteAt((oop + (BASE_HEADER_SIZE)) + 2)) << 16)) + ((byteAt((oop + (BASE_HEADER_SIZE)) + 3)) << 24);\r\t}\r}\r\r\r/*\tNote - integerValue is interpreted as POSITIVE, eg, as the result of\r\t\tBitmap>at:, or integer>bitAnd:. */\r\rsqInt positive64BitIntegerFor(sqLong integerValue) {\r    sqInt highWord;\r    sqInt i;\r    sqInt newLargeInteger;\r    sqInt sz;\r    sqInt value;\r\r\tif ((sizeof(integerValue)) == 4) {\r\t\treturn positive32BitIntegerFor(integerValue);\r\t}\r\r\t/* shift is coerced to usqInt otherwise */\r\r\thighWord = integerValue >> 32;\r\tif (highWord == 0) {\r\t\treturn positive32BitIntegerFor(integerValue);\r\t}\r\tsz = 5;\r\tif (!((highWord = ((usqInt) highWord) >> 8) == 0)) {\r\t\tsz += 1;\r\t}\r\tif (!((highWord = ((usqInt) highWord) >> 8) == 0)) {\r\t\tsz += 1;\r\t}\r\tif (!((highWord = ((usqInt) highWord) >> 8) == 0)) {\r\t\tsz += 1;\r\t}\r\tnewLargeInteger = instantiateClassindexableSize(fetchPointerofObject(ClassLargePositiveInteger, foo->specialObjectsOop), sz);\r\tfor (i = 0; i <= (sz - 1); i += 1) {\r\t\tvalue = (integerValue >> (i * 8)) & 255;\r\t\tbyteAtput((newLargeInteger + (BASE_HEADER_SIZE)) + i, value);\r\t}\r\treturn newLargeInteger;\r}\r\r\r/*\tConvert the given object into an integer value.\r\tThe object may be either a positive ST integer or a eight-byte LargePositiveInteger. */\r\rsqLong positive64BitValueOf(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt i;\r    sqInt sz;\r    sqInt szsqLong;\r    sqLong value;\r    sqInt header;\r    sqInt sz1;\r    sqInt classOop;\r    sqInt ccIndex;\r    sqInt cl;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\tif ((oop & 1)) {\r\t\tvalue = (oop >> 1);\r\t\tif (value < 0) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t\treturn value;\r\t}\r\t/* begin assertClassOf:is: */\r\t/* begin fetchPointer:ofObject: */\r\toop3 = foo->specialObjectsOop;\r\tclassOop = longAt((oop3 + (BASE_HEADER_SIZE)) + (ClassLargePositiveInteger << (SHIFT_FOR_WORD)));\r\tif ((oop & 1)) {\r\t\tfoo->successFlag = 0;\r\t\tgoto l2;\r\t}\r\tccIndex = (((usqInt) (longAt(oop))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tcl = (longAt(oop - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop2 = foo->specialObjectsOop;\r\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tcl = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t}\r\t/* begin success: */\r\tfoo->successFlag = (cl == classOop) && foo->successFlag;\rl2:\t/* end assertClassOf:is: */;\r\tif (!(foo->successFlag)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tszsqLong = sizeof(sqLong);\r\t/* begin lengthOf: */\r\theader = longAt(oop);\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz1 = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz1 = header & (SIZE_MASK);\r\t}\r\tsz1 -= header & (SIZE_4_BIT);\r\tif (((((usqInt) header) >> 8) & 15) <= 4) {\r\t\tsz = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tgoto l1;\r\t}\r\tif (((((usqInt) header) >> 8) & 15) < 8) {\r\t\tsz = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> 2;\r\t\tgoto l1;\r\t} else {\r\t\tsz = (sz1 - (BASE_HEADER_SIZE)) - (((((usqInt) header) >> 8) & 15) & 3);\r\t\tgoto l1;\r\t}\rl1:\t/* end lengthOf:baseHeader:format: */;\r\tif (sz > szsqLong) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tvalue = 0;\r\tfor (i = 0; i <= (sz - 1); i += 1) {\r\t\tvalue += (((sqLong) (byteAt((oop + (BASE_HEADER_SIZE)) + i)))) << (i * 8);\r\t}\r\treturn value;\r}\r\r\r/*\toop is an old object. If valueObj is young, mark the object as a root. */\r\rsqInt possibleRootStoreIntovalue(sqInt oop, sqInt valueObj) {\rregister struct foo * foo = &fum;\r    sqInt header;\r\r\tif (((((usqInt) valueObj)) >= (((usqInt) foo->youngStart))) && (!((valueObj & 1)))) {\r\t\t/* begin noteAsRoot:headerLoc: */\r\t\theader = longAt(oop);\r\t\tif ((header & (ROOT_BIT)) == 0) {\r\t\t\tif (foo->rootTableCount < RootTableRedZone) {\r\t\t\t\tfoo->rootTableCount += 1;\r\t\t\t\tfoo->rootTable[foo->rootTableCount] = oop;\r\t\t\t\tlongAtput(oop, header | (ROOT_BIT));\r\t\t\t} else {\r\t\t\t\tif (foo->rootTableCount < RootTableSize) {\r\t\t\t\t\tfoo->rootTableCount += 1;\r\t\t\t\t\tfoo->rootTable[foo->rootTableCount] = oop;\r\t\t\t\t\tlongAtput(oop, header | (ROOT_BIT));\r\t\t\t\t\tfoo->allocationCount = foo->allocationsBetweenGCs + 1;\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t}\r}\r\r\r/*\tMark the active and home contexts as roots if old. This \r\tallows the interpreter to use storePointerUnchecked to \r\tstore into them. */\r\rsqInt postGCAction(void) {\rregister struct foo * foo = &fum;\r    sqInt delta;\r    sqInt limit;\r\r\tif (foo->compilerInitialized) {\r\t\tcompilerPostGC();\r\t} else {\r\t\tif ((((usqInt) foo->activeContext)) < (((usqInt) foo->youngStart))) {\r\t\t\tbeRootIfOld(foo->activeContext);\r\t\t}\r\t\tif ((((usqInt) foo->theHomeContext)) < (((usqInt) foo->youngStart))) {\r\t\t\tbeRootIfOld(foo->theHomeContext);\r\t\t}\r\t}\r\tif (oopisGreaterThan((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), foo->shrinkThreshold)) {\r\t\t/* begin shrinkObjectMemory: */\r\t\tdelta = ((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK)) - foo->growHeadroom;\r\t\tfoo->statShrinkMemory += 1;\r\t\tlimit = sqShrinkMemoryBy(foo->memoryLimit, delta);\r\t\tif (!(limit == foo->memoryLimit)) {\r\t\t\tfoo->memoryLimit = limit - 24;\r\t\t\tinitializeMemoryFirstFree(foo->freeBlock);\r\t\t}\r\t}\r\t/* begin signalSemaphoreWithIndex: */\r\tif (foo->gcSemaphoreIndex <= 0) {\r\t\tgoto l1;\r\t}\r\tif (foo->semaphoresUseBufferA) {\r\t\tif (foo->semaphoresToSignalCountA < SemaphoresToSignalSize) {\r\t\t\tfoo->semaphoresToSignalCountA += 1;\r\t\t\tfoo->semaphoresToSignalA[foo->semaphoresToSignalCountA] = foo->gcSemaphoreIndex;\r\t\t}\r\t} else {\r\t\tif (foo->semaphoresToSignalCountB < SemaphoresToSignalSize) {\r\t\t\tfoo->semaphoresToSignalCountB += 1;\r\t\t\tfoo->semaphoresToSignalB[foo->semaphoresToSignalCountB] = foo->gcSemaphoreIndex;\r\t\t}\r\t}\r\t/* begin forceInterruptCheck */\r\tfoo->interruptCheckCounter = -1000;\r\tfoo->nextPollTick = 0;\rl1:\t/* end signalSemaphoreWithIndex: */;\r}\r\r\r/*\tEnsure that there are enough forwarding blocks to \r\taccomodate this become, then prepare forwarding blocks for \r\tthe pointer swap. Return true if successful. */\r/*\tDetails: Doing a GC might generate enough space for \r\tforwarding blocks if we're short. However, this is an \r\tuncommon enough case that it is better handled by primitive \r\tfail code at the Smalltalk level. */\r/*\tImportant note on multiple references to same object  - since the preparation of\r\tfwdBlocks is NOT idempotent we get VM crashes if the same object is referenced more\r\tthan once in such a way as to require multiple fwdBlocks.\r\toop1 forwardBecome: oop1 is ok since only a single fwdBlock is needed.\r\toop1 become: oop1 would fail because the second fwdBlock woudl not have the actual object\r\theader but rather the mutated ref to the first fwdBlock.\r\tFurther problems can arise with an array1 or array2 that refer multiply to the same \r\tobject. This would notbe expected input for programmer writen code but might arise from\r\tautomatic usage such as in ImageSegment loading.\r\tTo avoid the simple and rather common case of oop1 become*: oop1, we skip such pairs\r\tand simply avoid making fwdBlocks - it is redundant anyway */\r\rsqInt prepareForwardingTableForBecomingwithtwoWay(sqInt array1, sqInt array2, sqInt twoWayFlag) {\rregister struct foo * foo = &fum;\r    sqInt entriesAvailable;\r    sqInt entriesNeeded;\r    sqInt fieldOffset;\r    sqInt fwdBlkSize;\r    sqInt fwdBlock;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt originalHeader;\r    sqInt originalHeaderType;\r    sqInt originalHeader1;\r    sqInt originalHeaderType1;\r    sqInt contextSize;\r    sqInt fmt;\r    sqInt header;\r    sqInt methodHeader;\r    sqInt sz;\r    sqInt sp;\r    sqInt header1;\r    sqInt type;\r\r\r\t/* need enough entries for all oops */\r\t/* Note: Forward blocks must be quadword aligned - see fwdTableInit:. */\r\r\tentriesNeeded = (lastPointerOf(array1)) / (BYTES_PER_WORD);\r\tif (twoWayFlag) {\r\r\t\t/* Double the number of blocks for two-way become */\r\r\t\tentriesNeeded = entriesNeeded * 2;\r\t\tfwdBlkSize = (BYTES_PER_WORD) * 2;\r\t} else {\r\r\t\t/* One-way become needs backPointers in fwd blocks. */\r\r\t\tfwdBlkSize = (BYTES_PER_WORD) * 4;\r\t}\r\tentriesAvailable = fwdTableInit(fwdBlkSize);\r\tif (entriesAvailable < entriesNeeded) {\r\t\tinitializeMemoryFirstFree(foo->freeBlock);\r\t\treturn 0;\r\t}\r\t/* begin lastPointerOf: */\r\theader = longAt(array1);\r\tfmt = (((usqInt) header) >> 8) & 15;\r\tif (fmt <= 4) {\r\t\tif ((fmt == 3) && ((((((usqInt) header) >> 12) & 31) == 13) || ((((((usqInt) header) >> 12) & 31) == 14) || (((((usqInt) header) >> 12) & 31) == 4)))) {\r\t\t\t/* begin fetchStackPointerOf: */\r\t\t\tsp = longAt((array1 + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)));\r\t\t\tif (!((sp & 1))) {\r\t\t\t\tcontextSize = 0;\r\t\t\t\tgoto l3;\r\t\t\t}\r\t\t\tcontextSize = (sp >> 1);\r\t\tl3:\t/* end fetchStackPointerOf: */;\r\t\t\tfieldOffset = (CtxtTempFrameStart + contextSize) * (BYTES_PER_WORD);\r\t\t\tgoto l4;\r\t\t}\r\t\t/* begin sizeBitsOfSafe: */\r\t\theader1 = longAt(array1);\r\t\t/* begin rightType: */\r\t\tif ((header1 & (SIZE_MASK)) == 0) {\r\t\t\ttype = HeaderTypeSizeAndClass;\r\t\t\tgoto l5;\r\t\t} else {\r\t\t\tif ((header1 & CompactClassMask) == 0) {\r\t\t\t\ttype = HeaderTypeClass;\r\t\t\t\tgoto l5;\r\t\t\t} else {\r\t\t\t\ttype = HeaderTypeShort;\r\t\t\t\tgoto l5;\r\t\t\t}\r\t\t}\r\tl5:\t/* end rightType: */;\r\t\tif (type == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(array1 - ((BYTES_PER_WORD) * 2))) & (ALL_BUT_TYPE_MASK);\r\t\t\tgoto l6;\r\t\t} else {\r\t\t\tsz = header1 & (SIZE_MASK);\r\t\t\tgoto l6;\r\t\t}\r\tl6:\t/* end sizeBitsOfSafe: */;\r\t\tfieldOffset = sz - (BASE_HEADER_SIZE);\r\t\tgoto l4;\r\t}\r\tif (fmt < 12) {\r\t\tfieldOffset = 0;\r\t\tgoto l4;\r\t}\r\tmethodHeader = longAt(array1 + (BASE_HEADER_SIZE));\r\tfieldOffset = (((((usqInt) methodHeader) >> 10) & 255) * (BYTES_PER_WORD)) + (BASE_HEADER_SIZE);\rl4:\t/* end lastPointerOf: */;\r\twhile (fieldOffset >= (BASE_HEADER_SIZE)) {\r\t\toop1 = longAt(array1 + fieldOffset);\r\r\t\t/* if oop1 == oop2, no need to do any work for this pair.\r\t\t\tMay still be other entries in the arrays though so keep looking */\r\r\t\toop2 = longAt(array2 + fieldOffset);\r\t\tif (!(oop1 == oop2)) {\r\t\t\t/* begin fwdBlockGet: */\r\t\t\tfoo->fwdTableNext += fwdBlkSize;\r\t\t\tif (foo->fwdTableNext <= foo->fwdTableLast) {\r\t\t\t\tfwdBlock = foo->fwdTableNext;\r\t\t\t\tgoto l2;\r\t\t\t} else {\r\t\t\t\tfwdBlock = null;\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\tl2:\t/* end fwdBlockGet: */;\r\t\t\t/* begin initForwardBlock:mapping:to:withBackPtr: */\r\t\t\toriginalHeader1 = longAt(oop1);\r\t\t\tif (DoAssertionChecks) {\r\t\t\t\tif (fwdBlock == null) {\r\t\t\t\t\terror(\"ran out of forwarding blocks in become\");\r\t\t\t\t}\r\t\t\t\tif ((originalHeader1 & (MARK_BIT)) != 0) {\r\t\t\t\t\terror(\"object already has a forwarding table entry\");\r\t\t\t\t}\r\t\t\t}\r\t\t\toriginalHeaderType1 = originalHeader1 & TypeMask;\r\t\t\tlongAtput(fwdBlock, oop2);\r\t\t\tlongAtput(fwdBlock + (BYTES_PER_WORD), originalHeader1);\r\t\t\tif (!twoWayFlag) {\r\t\t\t\tlongAtput(fwdBlock + ((BYTES_PER_WORD) * 2), oop1);\r\t\t\t}\r\t\t\tlongAtput(oop1, (((usqInt) fwdBlock) >> 1) | ((MARK_BIT) | originalHeaderType1));\r\t\t\tif (twoWayFlag) {\r\t\t\t\t/* begin fwdBlockGet: */\r\t\t\t\tfoo->fwdTableNext += fwdBlkSize;\r\t\t\t\tif (foo->fwdTableNext <= foo->fwdTableLast) {\r\t\t\t\t\tfwdBlock = foo->fwdTableNext;\r\t\t\t\t\tgoto l1;\r\t\t\t\t} else {\r\t\t\t\t\tfwdBlock = null;\r\t\t\t\t\tgoto l1;\r\t\t\t\t}\r\t\t\tl1:\t/* end fwdBlockGet: */;\r\t\t\t\t/* begin initForwardBlock:mapping:to:withBackPtr: */\r\t\t\t\toriginalHeader = longAt(oop2);\r\t\t\t\tif (DoAssertionChecks) {\r\t\t\t\t\tif (fwdBlock == null) {\r\t\t\t\t\t\terror(\"ran out of forwarding blocks in become\");\r\t\t\t\t\t}\r\t\t\t\t\tif ((originalHeader & (MARK_BIT)) != 0) {\r\t\t\t\t\t\terror(\"object already has a forwarding table entry\");\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\toriginalHeaderType = originalHeader & TypeMask;\r\t\t\t\tlongAtput(fwdBlock, oop1);\r\t\t\t\tlongAtput(fwdBlock + (BYTES_PER_WORD), originalHeader);\r\t\t\t\tif (!twoWayFlag) {\r\t\t\t\t\tlongAtput(fwdBlock + ((BYTES_PER_WORD) * 2), oop2);\r\t\t\t\t}\r\t\t\t\tlongAtput(oop2, (((usqInt) fwdBlock) >> 1) | ((MARK_BIT) | originalHeaderType));\r\t\t\t}\r\t\t}\r\t\tfieldOffset -= BYTES_PER_WORD;\r\t}\r\treturn 1;\r}\r\rsqInt primitiveAdd(void) {\rregister struct foo * foo = &fum;\r    sqInt integerResult;\r    sqInt sp;\r\r\t/* begin pop2AndPushIntegerIfOK: */\r\tintegerResult = (stackIntegerValue(1)) + (stackIntegerValue(0));\r\tif (foo->successFlag) {\r\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t(((((int) integerResult)) ^ ((((int) integerResult)) << 1)) >= 0)\r# else\r\t\t\t((integerResult >= -1073741824) && (integerResult <= 1073741823))\r# endif  // SQ_HOST32\r\t\t) {\r\t\t\t/* begin pop:thenPush: */\r\t\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), ((integerResult << 1) | 1));\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\tfoo->successFlag = 0;\r\t\t}\r\t}\r}\r\r\r/*\tPrimitive arithmetic operations for large integers in 64 bit range */\r\rEXPORT(sqInt) primitiveAddLargeIntegers(void) {\rregister struct foo * foo = &fum;\r    sqLong integerArg;\r    sqLong integerRcvr;\r    sqInt oopResult;\r    sqLong result;\r    sqInt sp;\r\r\tintegerArg = signed64BitValueOf(longAt(foo->stackPointer - (0 * (BYTES_PER_WORD))));\r\tintegerRcvr = signed64BitValueOf(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))));\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\r\t/* Now check overflow conditions. First is whether rcvr and arg are of the same sign.\r\tIf they are we need to check for overflow more carefully. */\r\r\tresult = integerRcvr + integerArg;\r\tif (!((integerRcvr ^ integerArg) < 0)) {\r\t\tif ((integerRcvr ^ result) < 0) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t}\r\t}\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\toopResult = signed64BitIntegerFor(result);\r\tif (foo->successFlag) {\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), oopResult);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\r\r/*\tPrimitive. Change the class of the argument to make it an instance of the receiver\r\t given that the format of the receiver matches the format of the argument's class.\r\t Fail if receiver or argument are SmallIntegers, or the receiver is an instance of a\r\t compact class and the argument isn't, or when the argument's class is compact and\r\t the receiver isn't, or when the format of the receiver is different from the format of\r\t the argument's class, or when the arguments class is fixed and the receiver's size\r\t differs from the size that an instance of the argument's class should have. */\r\rsqInt primitiveAdoptInstance(void) {\rregister struct foo * foo = &fum;\r    sqInt arg;\r    sqInt err;\r    sqInt rcvr;\r    sqInt i;\r    sqInt oop;\r    sqInt oop1;\r\r\t/* begin stackObjectValue: */\r\toop = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\tif ((oop & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\targ = null;\r\t\tgoto l1;\r\t}\r\targ = oop;\rl1:\t/* end stackObjectValue: */;\r\t/* begin stackObjectValue: */\r\toop1 = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\tif ((oop1 & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\trcvr = null;\r\t\tgoto l2;\r\t}\r\trcvr = oop1;\rl2:\t/* end stackObjectValue: */;\r\terr = changeClassOfto(arg, rcvr);\r\tif (err == 0) {\r\t\t/* begin flushAtCache */\r\t\tfor (i = 1; i <= AtCacheTotalSize; i += 1) {\r\t\t\tfoo->atCache[i] = 0;\r\t\t}\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= foo->argumentCount * (BYTES_PER_WORD);\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t}\r\treturn null;\r}\r\rsqInt primitiveArctan(void) {\rregister struct foo * foo = &fum;\r    double  rcvr;\r\r\trcvr = popFloat();\r\tif (foo->successFlag) {\r\t\tpushFloat(atan(rcvr));\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 1 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tWe must flush the method cache here, to eliminate stale references\r\tto mutated classes and/or selectors. */\r\rsqInt primitiveArrayBecome(void) {\rregister struct foo * foo = &fum;\r    sqInt arg;\r    sqInt rcvr;\r    sqInt successValue;\r\r\targ = longAt(foo->stackPointer);\r\trcvr = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin success: */\r\tsuccessValue = becomewithtwoWaycopyHash(rcvr, arg, 1, 1);\r\tfoo->successFlag = successValue && foo->successFlag;\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tWe must flush the method cache here, to eliminate stale references\r\tto mutated classes and/or selectors. */\r\rsqInt primitiveArrayBecomeOneWay(void) {\rregister struct foo * foo = &fum;\r    sqInt arg;\r    sqInt rcvr;\r    sqInt successValue;\r\r\targ = longAt(foo->stackPointer);\r\trcvr = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin success: */\r\tsuccessValue = becomewithtwoWaycopyHash(rcvr, arg, 0, 1);\r\tfoo->successFlag = successValue && foo->successFlag;\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tSimilar to primitiveArrayBecomeOneWay but accepts a third argument whether to copy\r\tthe receiver's identity hash over the argument's identity hash. */\r\rsqInt primitiveArrayBecomeOneWayCopyHash(void) {\rregister struct foo * foo = &fum;\r    sqInt arg;\r    sqInt copyHashFlag;\r    sqInt rcvr;\r    sqInt successValue;\r\r\t/* begin booleanValueOf: */\r\tif ((longAt(foo->stackPointer)) == foo->trueObj) {\r\t\tcopyHashFlag = 1;\r\t\tgoto l1;\r\t}\r\tif ((longAt(foo->stackPointer)) == foo->falseObj) {\r\t\tcopyHashFlag = 0;\r\t\tgoto l1;\r\t}\r\tfoo->successFlag = 0;\r\tcopyHashFlag = null;\rl1:\t/* end booleanValueOf: */;\r\targ = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\trcvr = longAt(foo->stackPointer - (2 * (BYTES_PER_WORD)));\r\t/* begin success: */\r\tsuccessValue = becomewithtwoWaycopyHash(rcvr, arg, 0, copyHashFlag);\r\tfoo->successFlag = successValue && foo->successFlag;\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t}\r}\r\rsqInt primitiveAsFloat(void) {\rregister struct foo * foo = &fum;\r    sqInt arg;\r    sqInt integerPointer;\r    sqInt top;\r\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer = top;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\targ = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\targ = 0;\r\t\tgoto l1;\r\t}\r\targ = null;\rl1:\t/* end popInteger */;\r\tif (foo->successFlag) {\r\t\tpushFloat(((double) arg));\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 1 * (BYTES_PER_WORD);\r\t}\r}\r\rsqInt primitiveAsOop(void) {\rregister struct foo * foo = &fum;\r    sqInt thisReceiver;\r    sqInt sp;\r\r\tthisReceiver = longAt(foo->stackPointer);\r\t/* begin success: */\r\tfoo->successFlag = (!((thisReceiver & 1))) && foo->successFlag;\r\tif (foo->successFlag) {\r\t\t/* begin pop:thenPushInteger: */\r\t\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), ((((((usqInt) (longAt(thisReceiver))) >> 17) & 4095) << 1) | 1));\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\rsqInt primitiveAt(void) {\r\tcommonAt(0);\r}\r\rsqInt primitiveAtPut(void) {\r\tcommonAtPut(0);\r}\r\r\r/*\tSet the cursor to the given shape. The Mac only supports 16x16 pixel cursors. Cursor offsets are handled by Smalltalk. */\r\rsqInt primitiveBeCursor(void) {\rregister struct foo * foo = &fum;\r    sqInt bitsObj;\r    sqInt cursorBitsIndex;\r    sqInt cursorObj;\r    sqInt depth;\r    sqInt extentX;\r    sqInt extentY;\r    sqInt i;\r    sqInt maskBitsIndex;\r    sqInt maskObj;\r    sqInt offsetObj;\r    sqInt offsetX;\r    sqInt offsetY;\r    sqInt ourCursor;\r    sqInt successValue;\r    sqInt successValue1;\r    sqInt successValue2;\r    sqInt successValue3;\r    sqInt successValue4;\r    sqInt successValue5;\r    sqInt successValue6;\r    sqInt successValue7;\r    sqInt successValue8;\r    sqInt successValue9;\r    sqInt successValue10;\r    sqInt successValue11;\r    sqInt successValue12;\r\r\tflag(\"Dan\");\r\tif ((BYTES_PER_WORD) == 8) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= foo->argumentCount * (BYTES_PER_WORD);\r\t\treturn null;\r\t}\r\tif (foo->argumentCount == 0) {\r\t\tcursorObj = longAt(foo->stackPointer);\r\t\tmaskBitsIndex = null;\r\t}\r\tif (foo->argumentCount == 1) {\r\t\tcursorObj = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t\tmaskObj = longAt(foo->stackPointer);\r\t}\r\t/* begin success: */\r\tfoo->successFlag = (foo->argumentCount < 2) && foo->successFlag;\r\t/* begin success: */\r\tsuccessValue11 = (((cursorObj & 1) == 0) && (((((usqInt) (longAt(cursorObj))) >> 8) & 15) <= 4)) && ((lengthOf(cursorObj)) >= 5);\r\tfoo->successFlag = successValue11 && foo->successFlag;\r\tif (foo->successFlag) {\r\t\tbitsObj = longAt((cursorObj + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)));\r\t\textentX = fetchIntegerofObject(1, cursorObj);\r\t\textentY = fetchIntegerofObject(2, cursorObj);\r\t\tdepth = fetchIntegerofObject(3, cursorObj);\r\t\toffsetObj = longAt((cursorObj + (BASE_HEADER_SIZE)) + (4 << (SHIFT_FOR_WORD)));\r\t}\r\t/* begin success: */\r\tsuccessValue12 = (((offsetObj & 1) == 0) && (((((usqInt) (longAt(offsetObj))) >> 8) & 15) <= 4)) && ((lengthOf(offsetObj)) >= 2);\r\tfoo->successFlag = successValue12 && foo->successFlag;\r\tif (foo->successFlag) {\r\t\toffsetX = fetchIntegerofObject(0, offsetObj);\r\t\toffsetY = fetchIntegerofObject(1, offsetObj);\r\t\tif ((foo->argumentCount == 0) && (depth == 32)) {\r\t\t\t/* begin success: */\r\t\t\tsuccessValue = (extentX > 0) && (extentY > 0);\r\t\t\tfoo->successFlag = successValue && foo->successFlag;\r\t\t\t/* begin success: */\r\t\t\tsuccessValue1 = (offsetX >= (extentX * -1)) && (offsetX <= 0);\r\t\t\tfoo->successFlag = successValue1 && foo->successFlag;\r\t\t\t/* begin success: */\r\t\t\tsuccessValue2 = (offsetY >= (extentY * -1)) && (offsetY <= 0);\r\t\t\tfoo->successFlag = successValue2 && foo->successFlag;\r\t\t\tcursorBitsIndex = bitsObj + (BASE_HEADER_SIZE);\r\t\t\t/* begin success: */\r\t\t\tsuccessValue3 = (((bitsObj & 1) == 0) && (((((usqInt) (longAt(bitsObj))) >> 8) & 15) == 6)) && ((lengthOf(bitsObj)) == (extentX * extentY));\r\t\t\tfoo->successFlag = successValue3 && foo->successFlag;\r\t\t\t;\r\t\t} else {\r\t\t\t/* begin success: */\r\t\t\tsuccessValue4 = (extentX == 16) && ((extentY == 16) && (depth == 1));\r\t\t\tfoo->successFlag = successValue4 && foo->successFlag;\r\t\t\t/* begin success: */\r\t\t\tsuccessValue5 = (offsetX >= -16) && (offsetX <= 0);\r\t\t\tfoo->successFlag = successValue5 && foo->successFlag;\r\t\t\t/* begin success: */\r\t\t\tsuccessValue6 = (offsetY >= -16) && (offsetY <= 0);\r\t\t\tfoo->successFlag = successValue6 && foo->successFlag;\r\t\t\t/* begin success: */\r\t\t\tsuccessValue7 = (((bitsObj & 1) == 0) && (((((usqInt) (longAt(bitsObj))) >> 8) & 15) == 6)) && ((lengthOf(bitsObj)) == 16);\r\t\t\tfoo->successFlag = successValue7 && foo->successFlag;\r\t\t\tcursorBitsIndex = bitsObj + (BASE_HEADER_SIZE);\r\t\t\t;\r\t\t}\r\t}\r\tif (foo->argumentCount == 1) {\r\t\t/* begin success: */\r\t\tsuccessValue10 = (((maskObj & 1) == 0) && (((((usqInt) (longAt(maskObj))) >> 8) & 15) <= 4)) && ((lengthOf(maskObj)) >= 5);\r\t\tfoo->successFlag = successValue10 && foo->successFlag;\r\t\tif (foo->successFlag) {\r\t\t\tbitsObj = longAt((maskObj + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)));\r\t\t\textentX = fetchIntegerofObject(1, maskObj);\r\t\t\textentY = fetchIntegerofObject(2, maskObj);\r\t\t\tdepth = fetchIntegerofObject(3, maskObj);\r\t\t}\r\t\tif (foo->successFlag) {\r\t\t\t/* begin success: */\r\t\t\tsuccessValue8 = (extentX == 16) && ((extentY == 16) && (depth == 1));\r\t\t\tfoo->successFlag = successValue8 && foo->successFlag;\r\t\t\t/* begin success: */\r\t\t\tsuccessValue9 = (((bitsObj & 1) == 0) && (((((usqInt) (longAt(bitsObj))) >> 8) & 15) == 6)) && ((lengthOf(bitsObj)) == 16);\r\t\t\tfoo->successFlag = successValue9 && foo->successFlag;\r\t\t\tmaskBitsIndex = bitsObj + (BASE_HEADER_SIZE);\r\t\t}\r\t}\r\tif (foo->successFlag) {\r\t\tif (foo->argumentCount == 0) {\r\t\t\tif (depth == 32) {\r\t\t\t\tif (!(ioSetCursorARGB(cursorBitsIndex, extentX, extentY, offsetX, offsetY))) {\r\t\t\t\t\t/* begin success: */\r\t\t\t\t\tfoo->successFlag = 0 && foo->successFlag;\r\t\t\t\t\treturn null;\r\t\t\t\t}\r\t\t\t} else {\r\t\t\t\tioSetCursor(cursorBitsIndex, offsetX, offsetY);\r\t\t\t}\r\t\t} else {\r\t\t\tioSetCursorWithMask(cursorBitsIndex, maskBitsIndex, offsetX, offsetY);\r\t\t}\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= foo->argumentCount * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tRecord the system Display object in the specialObjectsTable. */\r\rsqInt primitiveBeDisplay(void) {\rregister struct foo * foo = &fum;\r    sqInt rcvr;\r    sqInt successValue;\r    sqInt oop;\r\r\trcvr = longAt(foo->stackPointer);\r\t/* begin success: */\r\tsuccessValue = (((rcvr & 1) == 0) && (((((usqInt) (longAt(rcvr))) >> 8) & 15) <= 4)) && ((lengthOf(rcvr)) >= 4);\r\tfoo->successFlag = successValue && foo->successFlag;\r\tif (foo->successFlag) {\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\toop = foo->specialObjectsOop;\r\t\tif ((((usqInt) oop)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(oop, rcvr);\r\t\t}\r\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + (TheDisplay << (SHIFT_FOR_WORD)), rcvr);\r\t}\r}\r\r\r/*\tmake the basic beep noise */\r\rsqInt primitiveBeep(void) {\r\tioBeep();\r}\r\rsqInt primitiveBitAnd(void) {\rregister struct foo * foo = &fum;\r    sqInt integerArgument;\r    sqInt integerReceiver;\r    sqInt top;\r    sqInt top1;\r    sqInt object;\r    sqInt sp;\r    sqInt top2;\r    sqInt top3;\r\r\t/* begin popPos32BitInteger */\r\t/* begin popStack */\r\ttop2 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\ttop = top2;\r\tintegerArgument = positive32BitValueOf(top);\r\t/* begin popPos32BitInteger */\r\t/* begin popStack */\r\ttop3 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\ttop1 = top3;\r\tintegerReceiver = positive32BitValueOf(top1);\r\tif (foo->successFlag) {\r\t\t/* begin push: */\r\t\tobject = positive32BitIntegerFor(integerReceiver & integerArgument);\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\t\tfoo->stackPointer = sp;\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tPrimitive logical operations for large integers in 64 bit range */\r\rEXPORT(sqInt) primitiveBitAndLargeIntegers(void) {\rregister struct foo * foo = &fum;\r    sqLong integerArg;\r    sqLong integerRcvr;\r    sqInt oopResult;\r    sqInt sp;\r\r\tintegerArg = positive64BitValueOf(longAt(foo->stackPointer - (0 * (BYTES_PER_WORD))));\r\tintegerRcvr = positive64BitValueOf(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))));\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\toopResult = positive64BitIntegerFor(integerRcvr & integerArg);\r\tif (foo->successFlag) {\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), oopResult);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\rsqInt primitiveBitOr(void) {\rregister struct foo * foo = &fum;\r    sqInt integerArgument;\r    sqInt integerReceiver;\r    sqInt top;\r    sqInt top1;\r    sqInt object;\r    sqInt sp;\r    sqInt top2;\r    sqInt top3;\r\r\t/* begin popPos32BitInteger */\r\t/* begin popStack */\r\ttop2 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\ttop = top2;\r\tintegerArgument = positive32BitValueOf(top);\r\t/* begin popPos32BitInteger */\r\t/* begin popStack */\r\ttop3 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\ttop1 = top3;\r\tintegerReceiver = positive32BitValueOf(top1);\r\tif (foo->successFlag) {\r\t\t/* begin push: */\r\t\tobject = positive32BitIntegerFor(integerReceiver | integerArgument);\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\t\tfoo->stackPointer = sp;\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tPrimitive logical operations for large integers in 64 bit range */\r\rEXPORT(sqInt) primitiveBitOrLargeIntegers(void) {\rregister struct foo * foo = &fum;\r    sqLong integerArg;\r    sqLong integerRcvr;\r    sqInt oopResult;\r    sqInt sp;\r\r\tintegerArg = positive64BitValueOf(longAt(foo->stackPointer - (0 * (BYTES_PER_WORD))));\r\tintegerRcvr = positive64BitValueOf(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))));\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\toopResult = positive64BitIntegerFor(integerRcvr | integerArg);\r\tif (foo->successFlag) {\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), oopResult);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\rsqInt primitiveBitShift(void) {\rregister struct foo * foo = &fum;\r    sqInt integerArgument;\r    sqInt integerReceiver;\r    sqInt shifted;\r    sqInt top;\r    sqInt object;\r    sqInt sp;\r    sqInt top1;\r    sqInt integerPointer;\r    sqInt top2;\r\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop2 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer = top2;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tintegerArgument = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tintegerArgument = 0;\r\t\tgoto l1;\r\t}\r\tintegerArgument = null;\rl1:\t/* end popInteger */;\r\t/* begin popPos32BitInteger */\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\ttop = top1;\r\tintegerReceiver = positive32BitValueOf(top);\r\tif (foo->successFlag) {\r\t\tif (integerArgument >= 0) {\r\t\t\t/* begin success: */\r\t\t\tfoo->successFlag = (integerArgument <= 31) && foo->successFlag;\r\t\t\tshifted = integerReceiver << integerArgument;\r\t\t\t/* begin success: */\r\t\t\tfoo->successFlag = ((((usqInt) shifted) >> integerArgument) == integerReceiver) && foo->successFlag;\r\t\t} else {\r\t\t\t/* begin success: */\r\t\t\tfoo->successFlag = (integerArgument >= -31) && foo->successFlag;\r\t\t\tshifted = ((integerArgument < 0) ? ((usqInt) integerReceiver >> -integerArgument) : ((usqInt) integerReceiver << integerArgument));\r\t\t}\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin push: */\r\t\tobject = positive32BitIntegerFor(shifted);\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\t\tfoo->stackPointer = sp;\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tPrimitive logical operations for large integers in 64 bit range */\r\rEXPORT(sqInt) primitiveBitShiftLargeIntegers(void) {\rregister struct foo * foo = &fum;\r    sqLong integerArg;\r    sqLong integerRcvr;\r    sqInt oopResult;\r    sqLong shifted;\r    sqInt sp;\r    sqInt integerPointer;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tintegerArg = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tintegerArg = 0;\r\t\tgoto l1;\r\t}\r\tintegerArg = null;\rl1:\t/* end stackIntegerValue: */;\r\tintegerRcvr = signed64BitValueOf(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))));\r\tif (foo->successFlag) {\r\t\tif (integerArg >= 0) {\r\t\t\t/* begin success: */\r\t\t\tfoo->successFlag = (integerArg < 64) && foo->successFlag;\r\t\t\tshifted = integerRcvr << integerArg;\r\t\t\t/* begin success: */\r\t\t\tfoo->successFlag = ((shifted >> integerArg) == integerRcvr) && foo->successFlag;\r\t\t} else {\r\t\t\t/* begin success: */\r\t\t\tfoo->successFlag = (integerArg > -64) && foo->successFlag;\r\t\t\tshifted = integerRcvr >> (0 - integerArg);\r\t\t}\r\t}\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\toopResult = signed64BitIntegerFor(shifted);\r\tif (foo->successFlag) {\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), oopResult);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\rsqInt primitiveBitXor(void) {\rregister struct foo * foo = &fum;\r    sqInt integerArgument;\r    sqInt integerReceiver;\r    sqInt top;\r    sqInt top1;\r    sqInt object;\r    sqInt sp;\r    sqInt top2;\r    sqInt top3;\r\r\t/* begin popPos32BitInteger */\r\t/* begin popStack */\r\ttop2 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\ttop = top2;\r\tintegerArgument = positive32BitValueOf(top);\r\t/* begin popPos32BitInteger */\r\t/* begin popStack */\r\ttop3 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\ttop1 = top3;\r\tintegerReceiver = positive32BitValueOf(top1);\r\tif (foo->successFlag) {\r\t\t/* begin push: */\r\t\tobject = positive32BitIntegerFor(integerReceiver ^ integerArgument);\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\t\tfoo->stackPointer = sp;\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tPrimitive logical operations for large integers in 64 bit range */\r\rEXPORT(sqInt) primitiveBitXorLargeIntegers(void) {\rregister struct foo * foo = &fum;\r    sqLong integerArg;\r    sqLong integerRcvr;\r    sqInt oopResult;\r    sqInt sp;\r\r\tintegerArg = positive64BitValueOf(longAt(foo->stackPointer - (0 * (BYTES_PER_WORD))));\r\tintegerRcvr = positive64BitValueOf(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))));\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\toopResult = positive64BitIntegerFor(integerRcvr ^ integerArg);\r\tif (foo->successFlag) {\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), oopResult);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\rsqInt primitiveBlockCopy(void) {\rregister struct foo * foo = &fum;\r    sqInt context;\r    sqInt contextSize;\r    sqInt initialIP;\r    sqInt methodContext;\r    sqInt newContext;\r    sqInt header;\r    sqInt oop;\r    sqInt valuePointer;\r    sqInt valuePointer1;\r    sqInt sp;\r\r\tcontext = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\tif (((longAt((context + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)))) & 1)) {\r\r\t\t/* context is a block; get the context of its enclosing method */\r\r\t\tmethodContext = longAt((context + (BASE_HEADER_SIZE)) + (HomeIndex << (SHIFT_FOR_WORD)));\r\t} else {\r\t\tmethodContext = context;\r\t}\r\t/* begin sizeBitsOf: */\r\theader = longAt(methodContext);\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tcontextSize = (longAt(methodContext - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\tcontextSize = header & (SIZE_MASK);\r\t\tgoto l1;\r\t}\rl1:\t/* end sizeBitsOf: */;\r\r\t/* context is no longer needed and is not preserved across allocation */\r\t/* remap methodContext in case GC happens during allocation */\r\r\tcontext = null;\r\t/* begin pushRemappableOop: */\r\tfoo->remapBuffer[(foo->remapBufferCount += 1)] = methodContext;\r\tnewContext = instantiateContextsizeInBytes(fetchPointerofObject(ClassBlockContext, foo->specialObjectsOop), contextSize);\r\t/* begin popRemappableOop */\r\toop = foo->remapBuffer[foo->remapBufferCount];\r\tfoo->remapBufferCount -= 1;\r\tmethodContext = oop;\r\r\t/* Was instructionPointer + 3, but now it's greater by 1 due to preIncrement */\r\t/* Assume: have just allocated a new context; it must be young.\r\t Thus, can use uncheck stores. See the comment in fetchContextRegisters. */\r\r\tinitialIP = (((((foo->instructionPointer + 1) + 3) - (foo->method + (BASE_HEADER_SIZE))) << 1) | 1);\r\tlongAtput((newContext + (BASE_HEADER_SIZE)) + (InitialIPIndex << (SHIFT_FOR_WORD)), initialIP);\r\tlongAtput((newContext + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), initialIP);\r\t/* begin storeStackPointerValue:inContext: */\r\tlongAtput((newContext + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)), ((0 << 1) | 1));\r\t/* begin storePointerUnchecked:ofObject:withValue: */\r\tvaluePointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\tlongAtput((newContext + (BASE_HEADER_SIZE)) + (BlockArgumentCountIndex << (SHIFT_FOR_WORD)), valuePointer);\r\tlongAtput((newContext + (BASE_HEADER_SIZE)) + (HomeIndex << (SHIFT_FOR_WORD)), methodContext);\r\t/* begin storePointerUnchecked:ofObject:withValue: */\r\tvaluePointer1 = foo->nilObj;\r\tlongAtput((newContext + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\t/* begin pop:thenPush: */\r\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), newContext);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tReports bytes available at this moment. For more meaningful \r\tresults, calls to this primitive should be preceeded by a full \r\tor incremental garbage collection. */\r\rsqInt primitiveBytesLeft(void) {\rregister struct foo * foo = &fum;\r    sqInt aBool;\r    sqInt oop;\r    sqInt sp;\r    sqInt oop1;\r    sqInt sp1;\r\r\tif (foo->argumentCount == 0) {\r\t\t/* begin pop:thenPush: */\r\t\toop = positive64BitIntegerFor((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK));\r\t\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), oop);\r\t\tfoo->stackPointer = sp;\r\t\treturn null;\r\t}\r\tif (foo->argumentCount == 1) {\r\t\t/* begin booleanValueOf: */\r\t\tif ((longAt(foo->stackPointer)) == foo->trueObj) {\r\t\t\taBool = 1;\r\t\t\tgoto l1;\r\t\t}\r\t\tif ((longAt(foo->stackPointer)) == foo->falseObj) {\r\t\t\taBool = 0;\r\t\t\tgoto l1;\r\t\t}\r\t\tfoo->successFlag = 0;\r\t\taBool = null;\r\tl1:\t/* end booleanValueOf: */;\r\t\tif (!(foo->successFlag)) {\r\t\t\treturn null;\r\t\t}\r\t\t/* begin pop:thenPush: */\r\t\toop1 = positive64BitIntegerFor(((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK)) + (sqMemoryExtraBytesLeft(aBool)));\r\t\tlongAtput(sp1 = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), oop1);\r\t\tfoo->stackPointer = sp1;\r\t\treturn null;\r\t}\r\t/* begin primitiveFail */\r\tfoo->successFlag = 0;\r\treturn null;\r}\r\r\r/*\tPerform a function call to a foreign function.\r\tOnly invoked from method containing explicit external call spec.\r\tDue to this we use the pluggable prim mechanism explicitly here\r\t(the first literal of any FFI spec'ed method is an ExternalFunction\r\tand not an array as used in the pluggable primitive mechanism). */\r\rsqInt primitiveCalloutToFFI(void) {\r    static void *function = 0;\r    static char *functionName = \"primitiveCallout\";\r    static char *moduleName = \"SqueakFFIPrims\";\r\r\tif (function == 0) {\r\t\tfunction = ioLoadExternalFunctionOfLengthFromModuleOfLength(oopForPointer(functionName), 16, oopForPointer(moduleName), 14);\r\t\tif (function == 0) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t}\r\treturn ((sqInt (*)(void))function)();\r}\r\r\r/*\tPrimitive. Change the class of the receiver into the class of the argument given that the format of the receiver matches the format of the argument's class. Fail if receiver or argument are SmallIntegers, or the receiver is an instance of a compact class and the argument isn't, or when the argument's class is compact and the receiver isn't, or when the format of the receiver is different from the format of the argument's class, or when the arguments class is fixed and the receiver's size differs from the size that an instance of the argument's class should have. */\r\rsqInt primitiveChangeClass(void) {\rregister struct foo * foo = &fum;\r    sqInt arg;\r    sqInt argClass;\r    sqInt rcvr;\r    sqInt ccIndex;\r    sqInt oop;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r    sqInt oop4;\r\r\tif (!(foo->argumentCount == 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin stackObjectValue: */\r\toop2 = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\tif ((oop2 & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\targ = null;\r\t\tgoto l2;\r\t}\r\targ = oop2;\rl2:\t/* end stackObjectValue: */;\r\t/* begin stackObjectValue: */\r\toop3 = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\tif ((oop3 & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\trcvr = null;\r\t\tgoto l3;\r\t}\r\trcvr = oop3;\rl3:\t/* end stackObjectValue: */;\r\t/* begin fetchClassOf: */\r\tif ((arg & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop = foo->specialObjectsOop;\r\t\targClass = longAt((oop + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(arg))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\targClass = (longAt(arg - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop4 = foo->specialObjectsOop;\r\t\toop1 = longAt((oop4 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\targClass = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\rl1:\t/* end fetchClassOf: */;\r\tchangeClassOfto(rcvr, argClass);\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t}\r\treturn null;\r}\r\r\r/*\tPrimitive. Change the class of the receiver into the class of the argument given that the format of the receiver matches the format of the argument's class. Fail if receiver or argument are SmallIntegers, or the receiver is an instance of a compact class and the argument isn't, or when the argument's class is compact and the receiver isn't, or when the format of the receiver is different from the format of the argument's class, or when the arguments class is fixed and the receiver's size differs from the size that an instance of the argument's class should have. */\r\rEXPORT(sqInt) primitiveChangeClassWithClass(void) {\rregister struct foo * foo = &fum;\r    sqInt argClass;\r    sqInt rcvr;\r    sqInt oop;\r    sqInt oop1;\r\r\tif (!(foo->argumentCount == 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin stackObjectValue: */\r\toop = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\tif ((oop & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\targClass = null;\r\t\tgoto l1;\r\t}\r\targClass = oop;\rl1:\t/* end stackObjectValue: */;\r\t/* begin stackObjectValue: */\r\toop1 = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\tif ((oop1 & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\trcvr = null;\r\t\tgoto l2;\r\t}\r\trcvr = oop1;\rl2:\t/* end stackObjectValue: */;\r\tchangeClassOfto(rcvr, argClass);\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t}\r\treturn null;\r}\r\rsqInt primitiveClass(void) {\rregister struct foo * foo = &fum;\r    sqInt instance;\r    sqInt oop;\r    sqInt sp;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\tinstance = longAt(foo->stackPointer);\r\t/* begin pop:thenPush: */\r\t/* begin fetchClassOf: */\r\tif ((instance & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(instance))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\toop = (longAt(instance - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\toop = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\rl1:\t/* end fetchClassOf: */;\r\tlongAtput(sp = foo->stackPointer - (((foo->argumentCount + 1) - 1) * (BYTES_PER_WORD)), oop);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tWhen called with a single string argument, post the string to \r\tthe clipboard. When called with zero arguments, return a \r\tstring containing the current clipboard contents. */\r\rsqInt primitiveClipboardText(void) {\rregister struct foo * foo = &fum;\r    sqInt s;\r    sqInt sz;\r    sqInt sp;\r\r\tif (foo->argumentCount == 1) {\r\t\ts = longAt(foo->stackPointer);\r\t\tif (!(((s & 1) == 0) && (((((usqInt) (longAt(s))) >> 8) & 15) >= 8))) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t\tif (foo->successFlag) {\r\t\t\tsz = stSizeOf(s);\r\t\t\tclipboardWriteFromAt(sz, s + (BASE_HEADER_SIZE), 0);\r\t\t\t/* begin pop: */\r\t\t\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t\t}\r\t} else {\r\t\tsz = clipboardSize();\r\t\tif (!(sufficientSpaceToAllocate(sz))) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t\ts = instantiateClassindexableSize(fetchPointerofObject(ClassString, foo->specialObjectsOop), sz);\r\t\tclipboardReadIntoAt(sz, s + (BASE_HEADER_SIZE), 0);\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), s);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\r\r/*\tReturn a shallow copy of the receiver. */\r\rsqInt primitiveClone(void) {\rregister struct foo * foo = &fum;\r    sqInt newCopy;\r    sqInt sp;\r\r\tnewCopy = clone(longAt(foo->stackPointer));\r\tif (newCopy == 0) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin pop:thenPush: */\r\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), newCopy);\r\tfoo->stackPointer = sp;\r}\r\rsqInt primitiveClosureCopyWithCopiedValues(void) {\rregister struct foo * foo = &fum;\r    sqInt copiedValues;\r    sqInt i;\r    sqInt newClosure;\r    sqInt numArgs;\r    sqInt numCopiedValues;\r    sqInt successValue;\r    sqInt sz;\r    sqInt sp;\r    sqInt valuePointer;\r    sqInt header;\r    sqInt initialIP;\r    sqInt newClosure1;\r    sqInt valuePointer1;\r    sqInt integerPointer;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tnumArgs = (integerPointer >> 1);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tnumArgs = 0;\r\t\tgoto l2;\r\t}\r\tnumArgs = null;\rl2:\t/* end stackIntegerValue: */;\r\tcopiedValues = longAt(foo->stackPointer);\r\t/* begin success: */\r\tsuccessValue = (fetchClassOf(copiedValues)) == (fetchPointerofObject(ClassArray, foo->specialObjectsOop));\r\tfoo->successFlag = successValue && foo->successFlag;\r\tif (!(foo->successFlag)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin fetchWordLengthOf: */\r\t/* begin sizeBitsOf: */\r\theader = longAt(copiedValues);\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(copiedValues - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\tsz = header & (SIZE_MASK);\r\t\tgoto l1;\r\t}\rl1:\t/* end sizeBitsOf: */;\r\tnumCopiedValues = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t/* begin closureNumArgs:instructionPointer:numCopiedValues: */\r\tinitialIP = (foo->instructionPointer + 2) - (foo->method + (BASE_HEADER_SIZE));\r\tnewClosure1 = instantiateSmallClasssizeInBytes(fetchPointerofObject(ClassBlockClosure, foo->specialObjectsOop), ((BYTES_PER_WORD) * (ClosureFirstCopiedValueIndex + numCopiedValues)) + (BASE_HEADER_SIZE));\r\tlongAtput((newClosure1 + (BASE_HEADER_SIZE)) + (ClosureStartPCIndex << (SHIFT_FOR_WORD)), ((initialIP << 1) | 1));\r\tlongAtput((newClosure1 + (BASE_HEADER_SIZE)) + (ClosureNumArgsIndex << (SHIFT_FOR_WORD)), ((numArgs << 1) | 1));\r\tnewClosure = newClosure1;\r\t/* begin storePointerUnchecked:ofObject:withValue: */\r\tvaluePointer1 = longAt(foo->stackPointer - (2 * (BYTES_PER_WORD)));\r\tlongAtput((newClosure + (BASE_HEADER_SIZE)) + (ClosureOuterContextIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\tif (numCopiedValues > 0) {\r\r\t\t/* Allocation may have done a GC and copiedValues may have moved. */\r\r\t\tcopiedValues = longAt(foo->stackPointer);\r\t\tfor (i = 0; i <= (numCopiedValues - 1); i += 1) {\r\t\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\t\tvaluePointer = longAt((copiedValues + (BASE_HEADER_SIZE)) + (i << (SHIFT_FOR_WORD)));\r\t\t\tlongAtput((newClosure + (BASE_HEADER_SIZE)) + ((i + ClosureFirstCopiedValueIndex) << (SHIFT_FOR_WORD)), valuePointer);\r\t\t}\r\t}\r\t/* begin pop:thenPush: */\r\tlongAtput(sp = foo->stackPointer - ((3 - 1) * (BYTES_PER_WORD)), newClosure);\r\tfoo->stackPointer = sp;\r}\r\rsqInt primitiveClosureValue(void) {\rregister struct foo * foo = &fum;\r    sqInt blockArgumentCount;\r    sqInt blockClosure;\r    sqInt closureMethod;\r    sqInt outerContext;\r\r\tblockClosure = longAt(foo->stackPointer - (foo->argumentCount * (BYTES_PER_WORD)));\r\tblockArgumentCount = ((longAt((blockClosure + (BASE_HEADER_SIZE)) + (ClosureNumArgsIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tif (!(foo->argumentCount == blockArgumentCount)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\touterContext = longAt((blockClosure + (BASE_HEADER_SIZE)) + (ClosureOuterContextIndex << (SHIFT_FOR_WORD)));\r\tif (!(((outerContext & 1) == 0) && ((((((usqInt) (longAt(outerContext))) >> 12) & 31) == 13) || ((((((usqInt) (longAt(outerContext))) >> 12) & 31) == 14) || (((((usqInt) (longAt(outerContext))) >> 12) & 31) == 4))))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\r\t/* Check if the closure's method is actually a CompiledMethod. */\r\r\tclosureMethod = longAt((outerContext + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\tif (!(((closureMethod & 1) == 0) && (((((usqInt) (longAt(closureMethod))) >> 8) & 15) >= 12))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tactivateNewClosureMethod(blockClosure);\r\t/* begin quickCheckForInterrupts */\r\tif ((foo->interruptCheckCounter -= 1) <= 0) {\r\t\tcheckForInterrupts();\r\t}\r}\r\r\r/*\tAn exact clone of primitiveClosureValue except that this version will not\r\t check for interrupts on stack overflow. */\r\rsqInt primitiveClosureValueNoContextSwitch(void) {\rregister struct foo * foo = &fum;\r    sqInt blockArgumentCount;\r    sqInt blockClosure;\r    sqInt closureMethod;\r    sqInt outerContext;\r\r\tblockClosure = longAt(foo->stackPointer - (foo->argumentCount * (BYTES_PER_WORD)));\r\tblockArgumentCount = ((longAt((blockClosure + (BASE_HEADER_SIZE)) + (ClosureNumArgsIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tif (!(foo->argumentCount == blockArgumentCount)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\touterContext = longAt((blockClosure + (BASE_HEADER_SIZE)) + (ClosureOuterContextIndex << (SHIFT_FOR_WORD)));\r\tif (!(((outerContext & 1) == 0) && ((((((usqInt) (longAt(outerContext))) >> 12) & 31) == 13) || ((((((usqInt) (longAt(outerContext))) >> 12) & 31) == 14) || (((((usqInt) (longAt(outerContext))) >> 12) & 31) == 4))))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\r\t/* Check if the closure's method is actually a CompiledMethod. */\r\r\tclosureMethod = longAt((outerContext + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\tif (!(((closureMethod & 1) == 0) && (((((usqInt) (longAt(closureMethod))) >> 8) & 15) >= 12))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tactivateNewClosureMethod(blockClosure);\r}\r\rsqInt primitiveClosureValueWithArgs(void) {\rregister struct foo * foo = &fum;\r    sqInt argumentArray;\r    sqInt arraySize;\r    sqInt blockArgumentCount;\r    sqInt blockClosure;\r    sqInt closureMethod;\r    sqInt cntxSize;\r    sqInt index;\r    sqInt outerContext;\r    sqInt object;\r    sqInt sp;\r    sqInt sz;\r    sqInt header;\r    sqInt objectPointer;\r    sqInt sz1;\r    sqInt header1;\r    sqInt top;\r\r\targumentArray = longAt(foo->stackPointer);\r\tif (!(((argumentArray & 1) == 0) && (((((usqInt) (longAt(argumentArray))) >> 8) & 15) == 2))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin fetchWordLengthOf: */\r\t/* begin sizeBitsOf: */\r\theader = longAt(argumentArray);\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(argumentArray - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\tsz = header & (SIZE_MASK);\r\t\tgoto l1;\r\t}\rl1:\t/* end sizeBitsOf: */;\r\tarraySize = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t/* begin fetchWordLengthOf: */\r\tobjectPointer = foo->activeContext;\r\t/* begin sizeBitsOf: */\r\theader1 = longAt(objectPointer);\r\tif ((header1 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz1 = (longAt(objectPointer - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\tgoto l2;\r\t} else {\r\t\tsz1 = header1 & (SIZE_MASK);\r\t\tgoto l2;\r\t}\rl2:\t/* end sizeBitsOf: */;\r\tcntxSize = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\tif (!(((((usqInt) ((foo->stackPointer - foo->activeContext) - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD)) + arraySize) < cntxSize)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tblockClosure = longAt(foo->stackPointer - (foo->argumentCount * (BYTES_PER_WORD)));\r\tblockArgumentCount = ((longAt((blockClosure + (BASE_HEADER_SIZE)) + (ClosureNumArgsIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tif (!(arraySize == blockArgumentCount)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\touterContext = longAt((blockClosure + (BASE_HEADER_SIZE)) + (ClosureOuterContextIndex << (SHIFT_FOR_WORD)));\r\tif (!(((outerContext & 1) == 0) && ((((((usqInt) (longAt(outerContext))) >> 12) & 31) == 13) || ((((((usqInt) (longAt(outerContext))) >> 12) & 31) == 14) || (((((usqInt) (longAt(outerContext))) >> 12) & 31) == 4))))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\r\t/* Check if the closure's method is actually a CompiledMethod. */\r\r\tclosureMethod = longAt((outerContext + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\tif (!(((closureMethod & 1) == 0) && (((((usqInt) (longAt(closureMethod))) >> 8) & 15) >= 12))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tindex = 1;\r\twhile (index <= arraySize) {\r\t\t/* begin push: */\r\t\tobject = longAt((argumentArray + (BASE_HEADER_SIZE)) + ((index - 1) << (SHIFT_FOR_WORD)));\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\t\tfoo->stackPointer = sp;\r\t\tindex += 1;\r\t}\r\tfoo->argumentCount = arraySize;\r\tactivateNewClosureMethod(blockClosure);\r\t/* begin quickCheckForInterrupts */\r\tif ((foo->interruptCheckCounter -= 1) <= 0) {\r\t\tcheckForInterrupts();\r\t}\r}\r\r\r/*\tFill the receiver, which must be an indexable bytes or words \r\tobjects, with the given integer value. */\r\rsqInt primitiveConstantFill(void) {\rregister struct foo * foo = &fum;\r    usqInt end;\r    sqInt fillValue;\r    usqInt i;\r    sqInt rcvr;\r    sqInt rcvrIsBytes;\r    sqInt successValue;\r    sqInt successValue1;\r\r\tfillValue = positive32BitValueOf(longAt(foo->stackPointer));\r\trcvr = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin success: */\r\tsuccessValue1 = ((rcvr & 1) == 0) && (isWordsOrBytesNonInt(rcvr));\r\tfoo->successFlag = successValue1 && foo->successFlag;\r\trcvrIsBytes = ((rcvr & 1) == 0) && (((((usqInt) (longAt(rcvr))) >> 8) & 15) >= 8);\r\tif (rcvrIsBytes) {\r\t\t/* begin success: */\r\t\tsuccessValue = (fillValue >= 0) && (fillValue <= 255);\r\t\tfoo->successFlag = successValue && foo->successFlag;\r\t}\r\tif (foo->successFlag) {\r\t\tend = rcvr + (sizeBitsOf(rcvr));\r\t\ti = rcvr + (BASE_HEADER_SIZE);\r\t\tif (rcvrIsBytes) {\r\t\t\twhile (i < end) {\r\t\t\t\tbyteAtput(i, fillValue);\r\t\t\t\ti += 1;\r\t\t\t}\r\t\t} else {\r\t\t\twhile (i < end) {\r\t\t\t\tlong32Atput(i, fillValue);\r\t\t\t\ti += 4;\r\t\t\t}\r\t\t}\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tPrimitive. Copy the state of the receiver from the argument. \r\t\tFail if receiver and argument are of a different class. \r\t\tFail if the receiver or argument are non-pointer objects.\r\t\tFail if receiver and argument have different lengths (for indexable objects).\r\t */\r\rsqInt primitiveCopyObject(void) {\rregister struct foo * foo = &fum;\r    sqInt arg;\r    sqInt i;\r    sqInt length;\r    sqInt rcvr;\r    sqInt header;\r    sqInt valuePointer;\r    sqInt oop;\r    sqInt oop1;\r    sqInt sz;\r\r\tif (!(foo->argumentCount == 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin stackObjectValue: */\r\toop = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\tif ((oop & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\targ = null;\r\t\tgoto l1;\r\t}\r\targ = oop;\rl1:\t/* end stackObjectValue: */;\r\t/* begin stackObjectValue: */\r\toop1 = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\tif ((oop1 & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\trcvr = null;\r\t\tgoto l2;\r\t}\r\trcvr = oop1;\rl2:\t/* end stackObjectValue: */;\r\tif (!foo->successFlag) {\r\t\treturn null;\r\t}\r\tif (!(((rcvr & 1) == 0) && (((((usqInt) (longAt(rcvr))) >> 8) & 15) <= 4))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif (!((fetchClassOf(rcvr)) == (fetchClassOf(arg)))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin lengthOf: */\r\theader = longAt(rcvr);\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(rcvr - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz = header & (SIZE_MASK);\r\t}\r\tsz -= header & (SIZE_4_BIT);\r\tif (((((usqInt) header) >> 8) & 15) <= 4) {\r\t\tlength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tgoto l3;\r\t}\r\tif (((((usqInt) header) >> 8) & 15) < 8) {\r\t\tlength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> 2;\r\t\tgoto l3;\r\t} else {\r\t\tlength = (sz - (BASE_HEADER_SIZE)) - (((((usqInt) header) >> 8) & 15) & 3);\r\t\tgoto l3;\r\t}\rl3:\t/* end lengthOf:baseHeader:format: */;\r\tif (!(length == (lengthOf(arg)))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer = longAt((arg + (BASE_HEADER_SIZE)) + (i << (SHIFT_FOR_WORD)));\r\t\tif ((((usqInt) rcvr)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(rcvr, valuePointer);\r\t\t}\r\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (i << (SHIFT_FOR_WORD)), valuePointer);\r\t}\r\t/* begin pop: */\r\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r}\r\r\r/*\tSet or clear the flag that controls whether modifications of \r\tthe Display object are propagated to the underlying \r\tplatform's screen. */\r\rsqInt primitiveDeferDisplayUpdates(void) {\rregister struct foo * foo = &fum;\r    sqInt flag;\r\r\tflag = longAt(foo->stackPointer);\r\tif (flag == foo->trueObj) {\r\t\tfoo->deferDisplayUpdates = 1;\r\t} else {\r\t\tif (flag == foo->falseObj) {\r\t\t\tfoo->deferDisplayUpdates = 0;\r\t\t} else {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t}\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tPass in a non-negative value to disable the architectures powermanager if any, zero to enable. This is a named (not numbered) primitive in the null module (ie the VM) */\r\rEXPORT(sqInt) primitiveDisablePowerManager(void) {\rregister struct foo * foo = &fum;\r    sqInt integer;\r    sqInt integerPointer;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tinteger = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tinteger = 0;\r\t\tgoto l1;\r\t}\r\tinteger = null;\rl1:\t/* end stackIntegerValue: */;\r\tif (foo->successFlag) {\r\t\tioDisablePowerManager(integer);\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t}\r}\r\rsqInt primitiveDiv(void) {\rregister struct foo * foo = &fum;\r    sqInt quotient;\r    sqInt sp;\r\r\tquotient = doPrimitiveDivby(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))), longAt(foo->stackPointer));\r\t/* begin pop2AndPushIntegerIfOK: */\r\tif (foo->successFlag) {\r\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t(((((int) quotient)) ^ ((((int) quotient)) << 1)) >= 0)\r# else\r\t\t\t((quotient >= -1073741824) && (quotient <= 1073741823))\r# endif  // SQ_HOST32\r\t\t) {\r\t\t\t/* begin pop:thenPush: */\r\t\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), ((quotient << 1) | 1));\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\tfoo->successFlag = 0;\r\t\t}\r\t}\r}\r\r\r/*\tPrimitive arithmetic operations for large integers in 64 bit range */\r\rEXPORT(sqInt) primitiveDivLargeIntegers(void) {\rregister struct foo * foo = &fum;\r    sqLong integerArg;\r    sqLong integerRcvr;\r    sqInt oopResult;\r    sqLong posArg;\r    sqLong posRcvr;\r    sqLong result;\r    sqInt sp;\r\r\tintegerArg = signed64BitValueOf(longAt(foo->stackPointer - (0 * (BYTES_PER_WORD))));\r\tintegerRcvr = signed64BitValueOf(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))));\r\tif (integerArg == 0) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t}\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\tif (integerRcvr > 0) {\r\t\tif (integerArg > 0) {\r\t\t\tresult = integerRcvr / integerArg;\r\t\t} else {\r\r\t\t\t/* round negative result toward negative infinity */\r\r\t\t\tposArg = 0 - integerArg;\r\r\t\t\t/* can overflow! */\r\r\t\t\tposRcvr = integerRcvr + (posArg - 1);\r\t\t\tif (posRcvr < 0) {\r\t\t\t\t/* begin primitiveFail */\r\t\t\t\tfoo->successFlag = 0;\r\t\t\t}\r\t\t\tresult = 0 - (posRcvr / posArg);\r\t\t}\r\t} else {\r\t\tposRcvr = 0 - integerRcvr;\r\t\tif (integerArg > 0) {\r\r\t\t\t/* round negative result toward negative infinity */\r\t\t\t/* can overflow! */\r\r\t\t\tposRcvr += integerArg - 1;\r\t\t\tif (posRcvr < 0) {\r\t\t\t\t/* begin primitiveFail */\r\t\t\t\tfoo->successFlag = 0;\r\t\t\t}\r\t\t\tresult = 0 - (posRcvr / integerArg);\r\t\t} else {\r\t\t\tposArg = 0 - integerArg;\r\t\t\tresult = posRcvr / posArg;\r\t\t}\r\t}\r\tif (foo->successFlag) {\r\t\toopResult = signed64BitIntegerFor(result);\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), oopResult);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\rsqInt primitiveDivide(void) {\rregister struct foo * foo = &fum;\r    sqInt integerArgument;\r    sqInt integerReceiver;\r    sqInt sp;\r    sqInt integerPointer;\r    sqInt integerPointer1;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tintegerReceiver = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tintegerReceiver = 0;\r\t\tgoto l1;\r\t}\r\tintegerReceiver = null;\rl1:\t/* end stackIntegerValue: */;\r\t/* begin stackIntegerValue: */\r\tintegerPointer1 = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer1 & 1)) {\r\t\tintegerArgument = (integerPointer1 >> 1);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tintegerArgument = 0;\r\t\tgoto l2;\r\t}\r\tintegerArgument = null;\rl2:\t/* end stackIntegerValue: */;\r\tif ((integerArgument != 0) && ((integerReceiver % integerArgument) == 0)) {\r\t\t/* begin pop2AndPushIntegerIfOK: */\r\t\tif (foo->successFlag) {\r\t\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t\t(((((int) (integerReceiver / integerArgument))) ^ ((((int) (integerReceiver / integerArgument))) << 1)) >= 0)\r# else\r\t\t\t\t(((integerReceiver / integerArgument) >= -1073741824) && ((integerReceiver / integerArgument) <= 1073741823))\r# endif  // SQ_HOST32\r\t\t\t) {\r\t\t\t\t/* begin pop:thenPush: */\r\t\t\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), (((integerReceiver / integerArgument) << 1) | 1));\r\t\t\t\tfoo->stackPointer = sp;\r\t\t\t} else {\r\t\t\t\tfoo->successFlag = 0;\r\t\t\t}\r\t\t}\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t}\r}\r\r\r/*\tPrimitive arithmetic operations for large integers in 64 bit range */\r\rEXPORT(sqInt) primitiveDivideLargeIntegers(void) {\rregister struct foo * foo = &fum;\r    sqLong integerArg;\r    sqLong integerRcvr;\r    sqInt oopResult;\r    sqLong result;\r    sqInt sp;\r\r\tintegerArg = signed64BitValueOf(longAt(foo->stackPointer - (0 * (BYTES_PER_WORD))));\r\tintegerRcvr = signed64BitValueOf(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))));\r\tif (!((integerArg != 0) && ((integerRcvr % integerArg) == 0))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t}\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\tresult = integerRcvr / integerArg;\r\toopResult = signed64BitIntegerFor(result);\r\tif (foo->successFlag) {\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), oopResult);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\rsqInt primitiveDoPrimitiveWithArgs(void) {\rregister struct foo * foo = &fum;\r    sqInt argumentArray;\r    sqInt arraySize;\r    sqInt cntxSize;\r    sqInt index;\r    sqInt primIdx;\r    sqInt object;\r    sqInt sp;\r    sqInt sp1;\r    sqInt sp2;\r    sqInt sz;\r    sqInt header;\r    sqInt objectPointer;\r    sqInt sz1;\r    sqInt header1;\r    sqInt successValue;\r    sqInt oop;\r    sqInt integerPointer;\r\r\targumentArray = longAt(foo->stackPointer);\r\t/* begin fetchWordLengthOf: */\r\t/* begin sizeBitsOf: */\r\theader = longAt(argumentArray);\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(argumentArray - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\tsz = header & (SIZE_MASK);\r\t\tgoto l1;\r\t}\rl1:\t/* end sizeBitsOf: */;\r\tarraySize = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t/* begin fetchWordLengthOf: */\r\tobjectPointer = foo->activeContext;\r\t/* begin sizeBitsOf: */\r\theader1 = longAt(objectPointer);\r\tif ((header1 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz1 = (longAt(objectPointer - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\tgoto l2;\r\t} else {\r\t\tsz1 = header1 & (SIZE_MASK);\r\t\tgoto l2;\r\t}\rl2:\t/* end sizeBitsOf: */;\r\tcntxSize = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t/* begin success: */\r\tsuccessValue = ((((usqInt) ((foo->stackPointer - foo->activeContext) - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD)) + arraySize) < cntxSize;\r\tfoo->successFlag = successValue && foo->successFlag;\r\tif (!(((argumentArray & 1) == 0) && (((((usqInt) (longAt(argumentArray))) >> 8) & 15) == 2))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tprimIdx = (integerPointer >> 1);\r\t\tgoto l3;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tprimIdx = 0;\r\t\tgoto l3;\r\t}\r\tprimIdx = null;\rl3:\t/* end stackIntegerValue: */;\r\tif (!(foo->successFlag)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin pop: */\r\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\tfoo->primitiveIndex = primIdx;\r\tfoo->argumentCount = arraySize;\r\tindex = 1;\r\twhile (index <= foo->argumentCount) {\r\t\t/* begin push: */\r\t\tobject = longAt((argumentArray + (BASE_HEADER_SIZE)) + ((index - 1) << (SHIFT_FOR_WORD)));\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\t\tfoo->stackPointer = sp;\r\t\tindex += 1;\r\t}\r\t/* begin pushRemappableOop: */\r\tfoo->remapBuffer[(foo->remapBufferCount += 1)] = argumentArray;\r\tfoo->lkupClass = foo->nilObj;\r\tprimitiveResponse();\r\t/* begin popRemappableOop */\r\toop = foo->remapBuffer[foo->remapBufferCount];\r\tfoo->remapBufferCount -= 1;\r\targumentArray = oop;\r\tif (!(foo->successFlag)) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= arraySize * (BYTES_PER_WORD);\r\t\t/* begin pushInteger: */\r\t\t/* begin push: */\r\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), ((primIdx << 1) | 1));\r\t\tfoo->stackPointer = sp1;\r\t\t/* begin push: */\r\t\tlongAtput(sp2 = foo->stackPointer + (BYTES_PER_WORD), argumentArray);\r\t\tfoo->stackPointer = sp2;\r\t\tfoo->argumentCount = 2;\r\t}\r}\r\rsqInt primitiveEqual(void) {\rregister struct foo * foo = &fum;\r    sqInt integerArgument;\r    sqInt integerReceiver;\r    sqInt result;\r    sqInt top;\r    sqInt top1;\r    sqInt sp;\r    sqInt sp1;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerArgument = top;\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerReceiver = top1;\r\t/* begin compare31or32Bits:equal: */\r\tif (((integerReceiver & 1)) && ((integerArgument & 1))) {\r\t\tresult = integerReceiver == integerArgument;\r\t\tgoto l1;\r\t}\r\tresult = (positive32BitValueOf(integerReceiver)) == (positive32BitValueOf(integerArgument));\rl1:\t/* end compare31or32Bits:equal: */;\r\t/* begin checkBooleanResult: */\r\tif (foo->successFlag) {\r\t\t/* begin pushBool: */\r\t\tif (result) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tPrimitive comparison operations for large integers in 64 bit range */\r\rEXPORT(sqInt) primitiveEqualLargeIntegers(void) {\rregister struct foo * foo = &fum;\r    sqLong integerArg;\r    sqLong integerRcvr;\r    sqInt sp;\r    sqInt sp1;\r\r\tintegerArg = signed64BitValueOf(longAt(foo->stackPointer - (0 * (BYTES_PER_WORD))));\r\tintegerRcvr = signed64BitValueOf(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))));\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\t/* begin pushBool: */\r\t\tif (integerRcvr == integerArg) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t}\r}\r\r\r/*\tis the receiver the same object as the argument? */\r\rsqInt primitiveEquivalent(void) {\rregister struct foo * foo = &fum;\r    sqInt otherObject;\r    sqInt thisObject;\r    sqInt top;\r    sqInt top1;\r    sqInt sp;\r    sqInt sp1;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\totherObject = top;\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tthisObject = top1;\r\t/* begin pushBool: */\r\tif (thisObject == otherObject) {\r\t\t/* begin push: */\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\tfoo->stackPointer = sp;\r\t} else {\r\t\t/* begin push: */\r\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\tfoo->stackPointer = sp1;\r\t}\r}\r\r\r/*\treceiver, args, then method are on top of stack. Execute method against receiver and args */\r\rsqInt primitiveExecuteMethod(void) {\rregister struct foo * foo = &fum;\r    sqInt top;\r    sqInt successValue;\r    sqInt methodPointer;\r    sqInt primBits;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tfoo->newMethod = top;\r\t/* begin primitiveIndexOf: */\r\tmethodPointer = foo->newMethod;\r\tprimBits = (((usqInt) (longAt((methodPointer + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD))))) >> 1) & 268435967;\r\tfoo->primitiveIndex = (primBits & 511) + (((usqInt) primBits) >> 19);\r\t/* begin success: */\r\tsuccessValue = (foo->argumentCount - 1) == (argumentCountOf(foo->newMethod));\r\tfoo->successFlag = successValue && foo->successFlag;\r\tif (foo->successFlag) {\r\t\tfoo->argumentCount -= 1;\r\t\t/* begin executeNewMethod */\r\t\tif (foo->primitiveIndex > 0) {\r\t\t\tprimitiveResponse();\r\t\t\tif (foo->successFlag) {\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t}\r\t\tactivateNewMethod();\r\t\t/* begin quickCheckForInterrupts */\r\t\tif ((foo->interruptCheckCounter -= 1) <= 0) {\r\t\t\tcheckForInterrupts();\r\t\t}\r\tl1:\t/* end executeNewMethod */;\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 1 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\treceiver, argsArray, then method are on top of stack.  Execute method against receiver and args */\r\rsqInt primitiveExecuteMethodArgsArray(void) {\rregister struct foo * foo = &fum;\r    sqInt argCnt;\r    sqInt argumentArray;\r    sqInt methodArgument;\r    sqInt top;\r    sqInt top1;\r    sqInt dst;\r    sqInt in;\r    sqInt lastIn;\r    sqInt out;\r    sqInt methodPointer;\r    sqInt primBits;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tmethodArgument = top;\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\targumentArray = top1;\r\tif (!((((methodArgument & 1) == 0) && (((((usqInt) (longAt(methodArgument))) >> 8) & 15) >= 12)) && (((argumentArray & 1) == 0) && (((((usqInt) (longAt(argumentArray))) >> 8) & 15) == 2)))) {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\targCnt = (((usqInt) (longAt((methodArgument + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD))))) >> 25) & 15;\r\tif (!(argCnt == (fetchWordLengthOf(argumentArray)))) {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin transfer:from:to: */\r\tdst = foo->stackPointer + (BYTES_PER_WORD);\r\tflag(\"Dan\");\r\tin = (argumentArray + (BASE_HEADER_SIZE)) - (BYTES_PER_WORD);\r\tlastIn = in + (argCnt * (BYTES_PER_WORD));\r\tout = dst - (BYTES_PER_WORD);\r\twhile ((((usqInt) in)) < (((usqInt) lastIn))) {\r\t\tlongAtput(out += BYTES_PER_WORD, longAt(in += BYTES_PER_WORD));\r\t}\r\t/* begin unPop: */\r\tfoo->stackPointer += argCnt * (BYTES_PER_WORD);\r\tfoo->newMethod = methodArgument;\r\t/* begin primitiveIndexOf: */\r\tmethodPointer = foo->newMethod;\r\tprimBits = (((usqInt) (longAt((methodPointer + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD))))) >> 1) & 268435967;\r\tfoo->primitiveIndex = (primBits & 511) + (((usqInt) primBits) >> 19);\r\tfoo->argumentCount = argCnt;\r\t/* begin executeNewMethod */\r\tif (foo->primitiveIndex > 0) {\r\t\tprimitiveResponse();\r\t\tif (foo->successFlag) {\r\t\t\tgoto l1;\r\t\t}\r\t}\r\tactivateNewMethod();\r\t/* begin quickCheckForInterrupts */\r\tif ((foo->interruptCheckCounter -= 1) <= 0) {\r\t\tcheckForInterrupts();\r\t}\rl1:\t/* end executeNewMethod */;\r\tfoo->successFlag = 1;\r}\r\rsqInt primitiveExitToDebugger(void) {\r\terror(\"Exit to debugger at user request\");\r}\r\r\r/*\tComputes E raised to the receiver power. */\r\rsqInt primitiveExp(void) {\rregister struct foo * foo = &fum;\r    double  rcvr;\r\r\trcvr = popFloat();\r\tif (foo->successFlag) {\r\t\tpushFloat(exp(rcvr));\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 1 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tExponent part of this float. */\r\rsqInt primitiveExponent(void) {\rregister struct foo * foo = &fum;\r    double  frac;\r    int  pwr;\r    double  rcvr;\r    sqInt sp;\r\r\trcvr = popFloat();\r\tif (foo->successFlag) {\r\t\tfrac = frexp(rcvr, &pwr);\r\t\t/* begin pushInteger: */\r\t\t/* begin push: */\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), (((pwr - 1) << 1) | 1));\r\t\tfoo->stackPointer = sp;\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 1 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tCall an external primitive. The external primitive methods \r\tcontain as first literal an array consisting of: \r\t* The module name (String | Symbol) \r\t* The function name (String | Symbol) \r\t* The session ID (SmallInteger) [OBSOLETE] \r\t* The function index (Integer) in the externalPrimitiveTable \r\tFor fast failures the primitive index of any method where the \r\texternal prim is not found is rewritten in the method cache \r\twith zero. This allows for ultra fast responses as long as the \r\tmethod stays in the cache. \r\tThe fast failure response relies on lkupClass being properly \r\tset. This is done in \r\t#addToMethodCacheSel:class:method:primIndex: to \r\tcompensate for execution of methods that are looked up in a \r\tsuperclass (such as in primitivePerformAt). \r\tWith the latest modifications (e.g., actually flushing the \r\tfunction addresses from the VM), the session ID is obsolete. \r\tBut for backward compatibility it is still kept around. Also, a \r\tfailed lookup is reported specially. If a method has been \r\tlooked up and not been found, the function address is stored \r\tas -1 (e.g., the SmallInteger -1 to distinguish from \r\t16rFFFFFFFF which may be returned from the lookup). \r\tIt is absolutely okay to remove the rewrite if we run into any \r\tproblems later on. It has an approximate speed difference of \r\t30% per failed primitive call which may be noticable but if, \r\tfor any reasons, we run into problems (like with J3) we can \r\talways remove the rewrite. \r\t */\r\rsqInt primitiveExternalCall(void) {\rregister struct foo * foo = &fum;\r    void *addr;\r    sqInt functionLength;\r    sqInt functionName;\r    sqInt index;\r    sqInt lit;\r    sqInt moduleLength;\r    sqInt moduleName;\r    sqInt successValue;\r    sqInt header;\r    sqInt successValue1;\r    sqInt methodPointer;\r    sqInt successValue2;\r    sqInt successValue3;\r    sqInt header1;\r    sqInt sz;\r    sqInt sz1;\r\r\t/* begin success: */\r\tsuccessValue1 = (literalCountOf(foo->newMethod)) > 0;\r\tfoo->successFlag = successValue1 && foo->successFlag;\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\t/* begin literal:ofMethod: */\r\tmethodPointer = foo->newMethod;\r\tlit = longAt((methodPointer + (BASE_HEADER_SIZE)) + ((0 + LiteralStart) << (SHIFT_FOR_WORD)));\r\t/* begin success: */\r\tsuccessValue2 = (((lit & 1) == 0) && (((((usqInt) (longAt(lit))) >> 8) & 15) == 2)) && ((lengthOf(lit)) == 4);\r\tfoo->successFlag = successValue2 && foo->successFlag;\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\tindex = longAt((lit + (BASE_HEADER_SIZE)) + (3 << (SHIFT_FOR_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((index & 1)) {\r\t\tindex = (index >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tindex = 0;\r\t\tgoto l1;\r\t}\rl1:\t/* end checkedIntegerValueOf: */;\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\tif (index < 0) {\r\t\trewriteMethodCacheSelclassprimIndex(foo->messageSelector, foo->lkupClass, 0);\r\t\t/* begin success: */\r\t\tfoo->successFlag = 0 && foo->successFlag;\r\t\treturn null;\r\t}\r\tif ((index > 0) && (index <= MaxExternalPrimitiveTableSize)) {\r\t\taddr = foo->externalPrimitiveTable[index - 1];\r\t\tif (addr != 0) {\r\t\t\trewriteMethodCacheSelclassprimIndexprimFunction(foo->messageSelector, foo->lkupClass, 1000 + index, addr);\r\t\t\tcallExternalPrimitive(addr);\r\t\t\treturn null;\r\t\t}\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tlongAtput((lit + (BASE_HEADER_SIZE)) + (2 << (SHIFT_FOR_WORD)), ConstZero);\r\tlongAtput((lit + (BASE_HEADER_SIZE)) + (3 << (SHIFT_FOR_WORD)), ConstZero);\r\tmoduleName = longAt((lit + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)));\r\tif (moduleName == foo->nilObj) {\r\t\tmoduleLength = 0;\r\t} else {\r\t\t/* begin success: */\r\t\tsuccessValue = ((moduleName & 1) == 0) && (((((usqInt) (longAt(moduleName))) >> 8) & 15) >= 8);\r\t\tfoo->successFlag = successValue && foo->successFlag;\r\t\t/* begin lengthOf: */\r\t\theader = longAt(moduleName);\r\t\t/* begin lengthOf:baseHeader:format: */\r\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(moduleName - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t} else {\r\t\t\tsz = header & (SIZE_MASK);\r\t\t}\r\t\tsz -= header & (SIZE_4_BIT);\r\t\tif (((((usqInt) header) >> 8) & 15) <= 4) {\r\t\t\tmoduleLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\t\tgoto l2;\r\t\t}\r\t\tif (((((usqInt) header) >> 8) & 15) < 8) {\r\t\t\tmoduleLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> 2;\r\t\t\tgoto l2;\r\t\t} else {\r\t\t\tmoduleLength = (sz - (BASE_HEADER_SIZE)) - (((((usqInt) header) >> 8) & 15) & 3);\r\t\t\tgoto l2;\r\t\t}\r\tl2:\t/* end lengthOf:baseHeader:format: */;\r\t\t;\r\t}\r\tfunctionName = longAt((lit + (BASE_HEADER_SIZE)) + (1 << (SHIFT_FOR_WORD)));\r\t/* begin success: */\r\tsuccessValue3 = ((functionName & 1) == 0) && (((((usqInt) (longAt(functionName))) >> 8) & 15) >= 8);\r\tfoo->successFlag = successValue3 && foo->successFlag;\r\t/* begin lengthOf: */\r\theader1 = longAt(functionName);\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((header1 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz1 = (longAt(functionName - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz1 = header1 & (SIZE_MASK);\r\t}\r\tsz1 -= header1 & (SIZE_4_BIT);\r\tif (((((usqInt) header1) >> 8) & 15) <= 4) {\r\t\tfunctionLength = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tgoto l3;\r\t}\r\tif (((((usqInt) header1) >> 8) & 15) < 8) {\r\t\tfunctionLength = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> 2;\r\t\tgoto l3;\r\t} else {\r\t\tfunctionLength = (sz1 - (BASE_HEADER_SIZE)) - (((((usqInt) header1) >> 8) & 15) & 3);\r\t\tgoto l3;\r\t}\rl3:\t/* end lengthOf:baseHeader:format: */;\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\taddr = ioLoadExternalFunctionOfLengthFromModuleOfLength(functionName + (BASE_HEADER_SIZE), functionLength, moduleName + (BASE_HEADER_SIZE), moduleLength);\r\tif (addr == 0) {\r\t\tindex = -1;\r\t} else {\r\r\t\t/* add the function to the external primitive table */\r\r\t\tindex = addToExternalPrimitiveTable(addr);\r\t}\r\t/* begin success: */\r\tfoo->successFlag = (index >= 0) && foo->successFlag;\r\tlongAtput((lit + (BASE_HEADER_SIZE)) + (3 << (SHIFT_FOR_WORD)), ((index << 1) | 1));\r\tif (foo->successFlag && (addr != 0)) {\r\t\trewriteMethodCacheSelclassprimIndexprimFunction(foo->messageSelector, foo->lkupClass, 1000 + index, addr);\r\t\tcallExternalPrimitive(addr);\r\t} else {\r\t\trewriteMethodCacheSelclassprimIndex(foo->messageSelector, foo->lkupClass, 0);\r\t}\r}\r\rsqInt primitiveFail(void) {\r\tfoo->successFlag = 0;\r}\r\r\r/*\tSet specific primitive failure. */\r\rsqInt primitiveFailFor(sqInt reasonCode) {\rregister struct foo * foo = &fum;\r    sqInt primFailCode;\r\r\tprimFailCode = reasonCode;\r\t/* begin primitiveFail */\r\tfoo->successFlag = 0;\r}\r\r\r/*\tPrimitive. Search up the context stack for the next method context marked for exception handling starting at the receiver. Return nil if none found */\r\rsqInt primitiveFindHandlerContext(void) {\rregister struct foo * foo = &fum;\r    sqInt nilOop;\r    sqInt thisCntx;\r    sqInt sp;\r    sqInt top;\r    sqInt sp1;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tthisCntx = top;\r\tnilOop = foo->nilObj;\r\tdo {\r\t\tif (isHandlerMarked(thisCntx)) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), thisCntx);\r\t\t\tfoo->stackPointer = sp;\r\t\t\treturn null;\r\t\t}\r\t\tthisCntx = longAt((thisCntx + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\t} while(!(thisCntx == nilOop));\r\t/* begin push: */\r\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->nilObj);\r\tfoo->stackPointer = sp1;\r\treturn null;\r}\r\r\r/*\tPrimitive. Search up the context stack for the next method context marked for unwind handling from the receiver up to but not including the argument. Return nil if none found. */\r\rsqInt primitiveFindNextUnwindContext(void) {\rregister struct foo * foo = &fum;\r    sqInt aContext;\r    sqInt nilOop;\r    sqInt thisCntx;\r    sqInt unwindMarked;\r    sqInt sp;\r    sqInt header;\r    sqInt meth;\r    sqInt pIndex;\r    sqInt top;\r    sqInt oop;\r    sqInt sp1;\r    sqInt primBits;\r    sqInt top1;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\taContext = top;\r\t/* begin fetchPointer:ofObject: */\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\toop = top1;\r\tthisCntx = longAt((oop + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\tnilOop = foo->nilObj;\r\twhile (!((thisCntx == aContext) || (thisCntx == nilOop))) {\r\t\t/* begin isUnwindMarked: */\r\t\theader = longAt(thisCntx);\r\t\tif (!(((((usqInt) header) >> 12) & 31) == 14)) {\r\t\t\tunwindMarked = 0;\r\t\t\tgoto l1;\r\t\t}\r\t\tmeth = longAt((thisCntx + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\t\t/* begin primitiveIndexOf: */\r\t\tprimBits = (((usqInt) (longAt((meth + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD))))) >> 1) & 268435967;\r\t\tpIndex = (primBits & 511) + (((usqInt) primBits) >> 19);\r\t\tunwindMarked = pIndex == 198;\r\tl1:\t/* end isUnwindMarked: */;\r\t\tif (unwindMarked) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), thisCntx);\r\t\t\tfoo->stackPointer = sp;\r\t\t\treturn null;\r\t\t}\r\t\tthisCntx = longAt((thisCntx + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\t}\r\t/* begin push: */\r\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), nilOop);\r\tfoo->stackPointer = sp1;\r\treturn null;\r}\r\rsqInt primitiveFloatAdd(void) {\rregister struct foo * foo = &fum;\r\treturn primitiveFloatAddtoArg(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))), longAt(foo->stackPointer));\r}\r\rsqInt primitiveFloatAddtoArg(sqInt rcvrOop, sqInt argOop) {\rregister struct foo * foo = &fum;\r    double arg;\r    double rcvr;\r\r\t/* begin loadFloatOrIntFrom: */\r\tif ((rcvrOop & 1)) {\r\t\trcvr = ((double) ((rcvrOop >> 1)) );\r\t\tgoto l1;\r\t}\r\tif ((fetchClassOfNonInt(rcvrOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\trcvr = floatValueOf(rcvrOop);\r\t\tgoto l1;\r\t}\r\tfoo->successFlag = 0;\rl1:\t/* end loadFloatOrIntFrom: */;\r\t/* begin loadFloatOrIntFrom: */\r\tif ((argOop & 1)) {\r\t\targ = ((double) ((argOop >> 1)) );\r\t\tgoto l2;\r\t}\r\tif ((fetchClassOfNonInt(argOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\targ = floatValueOf(argOop);\r\t\tgoto l2;\r\t}\r\tfoo->successFlag = 0;\rl2:\t/* end loadFloatOrIntFrom: */;\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\tpushFloat(rcvr + arg);\r\t}\r}\r\rsqInt primitiveFloatDivide(void) {\rregister struct foo * foo = &fum;\r\treturn primitiveFloatDividebyArg(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))), longAt(foo->stackPointer));\r}\r\rsqInt primitiveFloatDividebyArg(sqInt rcvrOop, sqInt argOop) {\rregister struct foo * foo = &fum;\r    double arg;\r    double rcvr;\r\r\t/* begin loadFloatOrIntFrom: */\r\tif ((rcvrOop & 1)) {\r\t\trcvr = ((double) ((rcvrOop >> 1)) );\r\t\tgoto l1;\r\t}\r\tif ((fetchClassOfNonInt(rcvrOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\trcvr = floatValueOf(rcvrOop);\r\t\tgoto l1;\r\t}\r\tfoo->successFlag = 0;\rl1:\t/* end loadFloatOrIntFrom: */;\r\t/* begin loadFloatOrIntFrom: */\r\tif ((argOop & 1)) {\r\t\targ = ((double) ((argOop >> 1)) );\r\t\tgoto l2;\r\t}\r\tif ((fetchClassOfNonInt(argOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\targ = floatValueOf(argOop);\r\t\tgoto l2;\r\t}\r\tfoo->successFlag = 0;\rl2:\t/* end loadFloatOrIntFrom: */;\r\tif (foo->successFlag) {\r\t\t/* begin success: */\r\t\tfoo->successFlag = (arg != 0.0) && foo->successFlag;\r\t\tif (foo->successFlag) {\r\t\t\t/* begin pop: */\r\t\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\t\tpushFloat(rcvr / arg);\r\t\t}\r\t}\r}\r\rsqInt primitiveFloatEqual(void) {\rregister struct foo * foo = &fum;\r    sqInt aBool;\r    sqInt sp;\r    sqInt sp1;\r\r\taBool = primitiveFloatEqualtoArg(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))), longAt(foo->stackPointer));\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\t/* begin pushBool: */\r\t\tif (aBool) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t}\r}\r\rsqInt primitiveFloatEqualtoArg(sqInt rcvrOop, sqInt argOop) {\rregister struct foo * foo = &fum;\r    double arg;\r    double rcvr;\r\r\t/* begin loadFloatOrIntFrom: */\r\tif ((rcvrOop & 1)) {\r\t\trcvr = ((double) ((rcvrOop >> 1)) );\r\t\tgoto l1;\r\t}\r\tif ((fetchClassOfNonInt(rcvrOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\trcvr = floatValueOf(rcvrOop);\r\t\tgoto l1;\r\t}\r\tfoo->successFlag = 0;\rl1:\t/* end loadFloatOrIntFrom: */;\r\t/* begin loadFloatOrIntFrom: */\r\tif ((argOop & 1)) {\r\t\targ = ((double) ((argOop >> 1)) );\r\t\tgoto l2;\r\t}\r\tif ((fetchClassOfNonInt(argOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\targ = floatValueOf(argOop);\r\t\tgoto l2;\r\t}\r\tfoo->successFlag = 0;\rl2:\t/* end loadFloatOrIntFrom: */;\r\tif (foo->successFlag) {\r\t\treturn rcvr == arg;\r\t}\r}\r\rsqInt primitiveFloatGreaterthanArg(sqInt rcvrOop, sqInt argOop) {\rregister struct foo * foo = &fum;\r    double arg;\r    double rcvr;\r\r\t/* begin loadFloatOrIntFrom: */\r\tif ((rcvrOop & 1)) {\r\t\trcvr = ((double) ((rcvrOop >> 1)) );\r\t\tgoto l1;\r\t}\r\tif ((fetchClassOfNonInt(rcvrOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\trcvr = floatValueOf(rcvrOop);\r\t\tgoto l1;\r\t}\r\tfoo->successFlag = 0;\rl1:\t/* end loadFloatOrIntFrom: */;\r\t/* begin loadFloatOrIntFrom: */\r\tif ((argOop & 1)) {\r\t\targ = ((double) ((argOop >> 1)) );\r\t\tgoto l2;\r\t}\r\tif ((fetchClassOfNonInt(argOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\targ = floatValueOf(argOop);\r\t\tgoto l2;\r\t}\r\tfoo->successFlag = 0;\rl2:\t/* end loadFloatOrIntFrom: */;\r\tif (foo->successFlag) {\r\t\treturn rcvr > arg;\r\t}\r}\r\rsqInt primitiveFloatGreaterOrEqual(void) {\rregister struct foo * foo = &fum;\r    sqInt aBool;\r    sqInt sp;\r    sqInt sp1;\r\r\taBool = primitiveFloatGreaterOrEqualtoArg(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))), longAt(foo->stackPointer));\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\t/* begin pushBool: */\r\t\tif (aBool) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t}\r}\r\rsqInt primitiveFloatGreaterOrEqualtoArg(sqInt rcvrOop, sqInt argOop) {\rregister struct foo * foo = &fum;\r    double arg;\r    double rcvr;\r\r\t/* begin loadFloatOrIntFrom: */\r\tif ((rcvrOop & 1)) {\r\t\trcvr = ((double) ((rcvrOop >> 1)) );\r\t\tgoto l1;\r\t}\r\tif ((fetchClassOfNonInt(rcvrOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\trcvr = floatValueOf(rcvrOop);\r\t\tgoto l1;\r\t}\r\tfoo->successFlag = 0;\rl1:\t/* end loadFloatOrIntFrom: */;\r\t/* begin loadFloatOrIntFrom: */\r\tif ((argOop & 1)) {\r\t\targ = ((double) ((argOop >> 1)) );\r\t\tgoto l2;\r\t}\r\tif ((fetchClassOfNonInt(argOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\targ = floatValueOf(argOop);\r\t\tgoto l2;\r\t}\r\tfoo->successFlag = 0;\rl2:\t/* end loadFloatOrIntFrom: */;\r\tif (foo->successFlag) {\r\t\treturn rcvr >= arg;\r\t}\r}\r\rsqInt primitiveFloatGreaterThan(void) {\rregister struct foo * foo = &fum;\r    sqInt aBool;\r    sqInt sp;\r    sqInt sp1;\r\r\taBool = primitiveFloatGreaterthanArg(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))), longAt(foo->stackPointer));\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\t/* begin pushBool: */\r\t\tif (aBool) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t}\r}\r\rsqInt primitiveFloatLessthanArg(sqInt rcvrOop, sqInt argOop) {\rregister struct foo * foo = &fum;\r    double arg;\r    double rcvr;\r\r\t/* begin loadFloatOrIntFrom: */\r\tif ((rcvrOop & 1)) {\r\t\trcvr = ((double) ((rcvrOop >> 1)) );\r\t\tgoto l1;\r\t}\r\tif ((fetchClassOfNonInt(rcvrOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\trcvr = floatValueOf(rcvrOop);\r\t\tgoto l1;\r\t}\r\tfoo->successFlag = 0;\rl1:\t/* end loadFloatOrIntFrom: */;\r\t/* begin loadFloatOrIntFrom: */\r\tif ((argOop & 1)) {\r\t\targ = ((double) ((argOop >> 1)) );\r\t\tgoto l2;\r\t}\r\tif ((fetchClassOfNonInt(argOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\targ = floatValueOf(argOop);\r\t\tgoto l2;\r\t}\r\tfoo->successFlag = 0;\rl2:\t/* end loadFloatOrIntFrom: */;\r\tif (foo->successFlag) {\r\t\treturn rcvr < arg;\r\t}\r}\r\rsqInt primitiveFloatLessOrEqual(void) {\rregister struct foo * foo = &fum;\r    sqInt aBool;\r    sqInt sp;\r    sqInt sp1;\r\r\taBool = primitiveFloatLessOrEqualtoArg(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))), longAt(foo->stackPointer));\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\t/* begin pushBool: */\r\t\tif (aBool) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t}\r}\r\rsqInt primitiveFloatLessOrEqualtoArg(sqInt rcvrOop, sqInt argOop) {\rregister struct foo * foo = &fum;\r    double arg;\r    double rcvr;\r\r\t/* begin loadFloatOrIntFrom: */\r\tif ((rcvrOop & 1)) {\r\t\trcvr = ((double) ((rcvrOop >> 1)) );\r\t\tgoto l1;\r\t}\r\tif ((fetchClassOfNonInt(rcvrOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\trcvr = floatValueOf(rcvrOop);\r\t\tgoto l1;\r\t}\r\tfoo->successFlag = 0;\rl1:\t/* end loadFloatOrIntFrom: */;\r\t/* begin loadFloatOrIntFrom: */\r\tif ((argOop & 1)) {\r\t\targ = ((double) ((argOop >> 1)) );\r\t\tgoto l2;\r\t}\r\tif ((fetchClassOfNonInt(argOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\targ = floatValueOf(argOop);\r\t\tgoto l2;\r\t}\r\tfoo->successFlag = 0;\rl2:\t/* end loadFloatOrIntFrom: */;\r\tif (foo->successFlag) {\r\t\treturn rcvr <= arg;\r\t}\r}\r\rsqInt primitiveFloatLessThan(void) {\rregister struct foo * foo = &fum;\r    sqInt aBool;\r    sqInt sp;\r    sqInt sp1;\r\r\taBool = primitiveFloatLessthanArg(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))), longAt(foo->stackPointer));\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\t/* begin pushBool: */\r\t\tif (aBool) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t}\r}\r\rsqInt primitiveFloatMultiply(void) {\rregister struct foo * foo = &fum;\r\treturn primitiveFloatMultiplybyArg(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))), longAt(foo->stackPointer));\r}\r\rsqInt primitiveFloatMultiplybyArg(sqInt rcvrOop, sqInt argOop) {\rregister struct foo * foo = &fum;\r    double arg;\r    double rcvr;\r\r\t/* begin loadFloatOrIntFrom: */\r\tif ((rcvrOop & 1)) {\r\t\trcvr = ((double) ((rcvrOop >> 1)) );\r\t\tgoto l1;\r\t}\r\tif ((fetchClassOfNonInt(rcvrOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\trcvr = floatValueOf(rcvrOop);\r\t\tgoto l1;\r\t}\r\tfoo->successFlag = 0;\rl1:\t/* end loadFloatOrIntFrom: */;\r\t/* begin loadFloatOrIntFrom: */\r\tif ((argOop & 1)) {\r\t\targ = ((double) ((argOop >> 1)) );\r\t\tgoto l2;\r\t}\r\tif ((fetchClassOfNonInt(argOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\targ = floatValueOf(argOop);\r\t\tgoto l2;\r\t}\r\tfoo->successFlag = 0;\rl2:\t/* end loadFloatOrIntFrom: */;\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\tpushFloat(rcvr * arg);\r\t}\r}\r\rsqInt primitiveFloatNotEqual(void) {\rregister struct foo * foo = &fum;\r    sqInt aBool;\r    sqInt sp;\r    sqInt sp1;\r\r\taBool = primitiveFloatEqualtoArg(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))), longAt(foo->stackPointer));\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\t/* begin pushBool: */\r\t\tif (!aBool) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t}\r}\r\rsqInt primitiveFloatSubtract(void) {\rregister struct foo * foo = &fum;\r\treturn primitiveFloatSubtractfromArg(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))), longAt(foo->stackPointer));\r}\r\rsqInt primitiveFloatSubtractfromArg(sqInt rcvrOop, sqInt argOop) {\rregister struct foo * foo = &fum;\r    double arg;\r    double rcvr;\r\r\t/* begin loadFloatOrIntFrom: */\r\tif ((rcvrOop & 1)) {\r\t\trcvr = ((double) ((rcvrOop >> 1)) );\r\t\tgoto l1;\r\t}\r\tif ((fetchClassOfNonInt(rcvrOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\trcvr = floatValueOf(rcvrOop);\r\t\tgoto l1;\r\t}\r\tfoo->successFlag = 0;\rl1:\t/* end loadFloatOrIntFrom: */;\r\t/* begin loadFloatOrIntFrom: */\r\tif ((argOop & 1)) {\r\t\targ = ((double) ((argOop >> 1)) );\r\t\tgoto l2;\r\t}\r\tif ((fetchClassOfNonInt(argOop)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop))) {\r\t\targ = floatValueOf(argOop);\r\t\tgoto l2;\r\t}\r\tfoo->successFlag = 0;\rl2:\t/* end loadFloatOrIntFrom: */;\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\tpushFloat(rcvr - arg);\r\t}\r}\r\r\r/*\tClear the method lookup cache. This must be done after every programming change. */\r\rsqInt primitiveFlushCache(void) {\rregister struct foo * foo = &fum;\r    sqInt aCompiledMethod;\r    sqInt i;\r    sqInt i1;\r\r\t/* begin flushMethodCache */\r\tfor (i = 1; i <= MethodCacheSize; i += 1) {\r\t\tfoo->methodCache[i] = 0;\r\t}\r\t/* begin flushAtCache */\r\tfor (i1 = 1; i1 <= AtCacheTotalSize; i1 += 1) {\r\t\tfoo->atCache[i1] = 0;\r\t}\r\t/* begin compilerFlushCacheHook: */\r\taCompiledMethod = null;\r\tif (foo->compilerInitialized) {\r\t\tcompilerFlushCache(aCompiledMethod);\r\t}\r}\r\r\r/*\tThe receiver is a compiledMethod.  Clear all entries in the method lookup cache that refer to this method, presumably because it has been redefined, overridden or removed. */\r\rsqInt primitiveFlushCacheByMethod(void) {\rregister struct foo * foo = &fum;\r    sqInt i;\r    sqInt oldMethod;\r    sqInt probe;\r\r\toldMethod = longAt(foo->stackPointer);\r\tprobe = 0;\r\tfor (i = 1; i <= MethodCacheEntries; i += 1) {\r\t\tif ((foo->methodCache[probe + MethodCacheMethod]) == oldMethod) {\r\t\t\tfoo->methodCache[probe + MethodCacheSelector] = 0;\r\t\t}\r\t\tprobe += MethodCacheEntrySize;\r\t}\r\t/* begin compilerFlushCacheHook: */\r\tif (foo->compilerInitialized) {\r\t\tcompilerFlushCache(oldMethod);\r\t}\r}\r\r\r/*\tThe receiver is a message selector.  Clear all entries in the method lookup cache with this selector, presumably because an associated method has been redefined. */\r\rsqInt primitiveFlushCacheSelective(void) {\rregister struct foo * foo = &fum;\r    sqInt i;\r    sqInt probe;\r    sqInt selector;\r\r\tselector = longAt(foo->stackPointer);\r\tprobe = 0;\r\tfor (i = 1; i <= MethodCacheEntries; i += 1) {\r\t\tif ((foo->methodCache[probe + MethodCacheSelector]) == selector) {\r\t\t\tfoo->methodCache[probe + MethodCacheSelector] = 0;\r\t\t}\r\t\tprobe += MethodCacheEntrySize;\r\t}\r}\r\r\r/*\tPrimitive. Flush all the existing external primitives in the image thus forcing a reload on next invokation. */\r\rsqInt primitiveFlushExternalPrimitives(void) {\r\treturn flushExternalPrimitives();\r}\r\r\r/*\tOn some platforms, this primitive forces enqueued display updates to be processed immediately. On others, it does nothing. */\r\rsqInt primitiveForceDisplayUpdate(void) {\r\tioForceDisplayUpdate();\r}\r\r\r/*\tSet force tenure flag to true, this forces a tenure operation on the next incremental GC */\r\rEXPORT(sqInt) primitiveForceTenure(void) {\r\tfoo->forceTenureFlag = 1;\r}\r\r\r/*\tOn platforms that support it, this primitive prints the receiver, assumed to be a Form, to the default printer. */\r\rsqInt primitiveFormPrint(void) {\rregister struct foo * foo = &fum;\r    sqInt bitsArray;\r    sqInt bitsArraySize;\r    sqInt depth;\r    sqInt h;\r    double  hScale;\r    sqInt landscapeFlag;\r    sqInt ok;\r    sqInt pixelsPerWord;\r    sqInt rcvr;\r    double  vScale;\r    sqInt w;\r    sqInt wordsPerLine;\r    sqInt fmt;\r    sqInt header;\r    sqInt sz;\r\r\t/* begin booleanValueOf: */\r\tif ((longAt(foo->stackPointer)) == foo->trueObj) {\r\t\tlandscapeFlag = 1;\r\t\tgoto l2;\r\t}\r\tif ((longAt(foo->stackPointer)) == foo->falseObj) {\r\t\tlandscapeFlag = 0;\r\t\tgoto l2;\r\t}\r\tfoo->successFlag = 0;\r\tlandscapeFlag = null;\rl2:\t/* end booleanValueOf: */;\r\tvScale = floatValueOf(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))));\r\thScale = floatValueOf(longAt(foo->stackPointer - (2 * (BYTES_PER_WORD))));\r\trcvr = longAt(foo->stackPointer - (3 * (BYTES_PER_WORD)));\r\tif ((rcvr & 1)) {\r\t\t/* begin success: */\r\t\tfoo->successFlag = 0 && foo->successFlag;\r\t}\r\tif (foo->successFlag) {\r\t\tif (!((((rcvr & 1) == 0) && (((((usqInt) (longAt(rcvr))) >> 8) & 15) <= 4)) && ((lengthOf(rcvr)) >= 4))) {\r\t\t\t/* begin success: */\r\t\t\tfoo->successFlag = 0 && foo->successFlag;\r\t\t}\r\t}\r\tif (foo->successFlag) {\r\t\tbitsArray = longAt((rcvr + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)));\r\t\tw = fetchIntegerofObject(1, rcvr);\r\t\th = fetchIntegerofObject(2, rcvr);\r\t\tdepth = fetchIntegerofObject(3, rcvr);\r\t\tif (!((w > 0) && (h > 0))) {\r\t\t\t/* begin success: */\r\t\t\tfoo->successFlag = 0 && foo->successFlag;\r\t\t}\r\t\tpixelsPerWord = 32 / depth;\r\t\twordsPerLine = (w + (pixelsPerWord - 1)) / pixelsPerWord;\r\t\tif ((!((rcvr & 1))) && (((bitsArray & 1) == 0) && (isWordsOrBytesNonInt(bitsArray)))) {\r\t\t\t/* begin byteLengthOf: */\r\t\t\theader = longAt(bitsArray);\r\t\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(bitsArray - ((BYTES_PER_WORD) * 2))) & (ALL_BUT_TYPE_MASK);\r\t\t\t} else {\r\t\t\t\tsz = header & (SIZE_MASK);\r\t\t\t}\r\t\t\tfmt = (((usqInt) header) >> 8) & 15;\r\t\t\tif (fmt < 8) {\r\t\t\t\tbitsArraySize = sz - (BASE_HEADER_SIZE);\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tbitsArraySize = (sz - (BASE_HEADER_SIZE)) - (fmt & 3);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\tl1:\t/* end byteLengthOf: */;\r\t\t\t/* begin success: */\r\t\t\tfoo->successFlag = (bitsArraySize == ((wordsPerLine * h) * 4)) && foo->successFlag;\r\t\t} else {\r\t\t\t/* begin success: */\r\t\t\tfoo->successFlag = 0 && foo->successFlag;\r\t\t}\r\t}\r\tif (foo->successFlag) {\r\t\tif ((BYTES_PER_WORD) == 8) {\r\t\t\tok = ioFormPrint(bitsArray + 8, w, h, depth, hScale, vScale, landscapeFlag);\r\t\t} else {\r\t\t\tok = ioFormPrint(bitsArray + 4, w, h, depth, hScale, vScale, landscapeFlag);\r\t\t}\r\t\t/* begin success: */\r\t\tfoo->successFlag = ok && foo->successFlag;\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 3 * (BYTES_PER_WORD);\r\t}\r}\r\rsqInt primitiveFractionalPart(void) {\rregister struct foo * foo = &fum;\r    double  frac;\r    double  rcvr;\r    double  trunc;\r\r\trcvr = popFloat();\r\tif (foo->successFlag) {\r\t\tfrac = modf(rcvr, &trunc);\r\t\tpushFloat(frac);\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 1 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tDo a full garbage collection and return the number of bytes available (including swap space if dynamic memory management is supported). */\r\rsqInt primitiveFullGC(void) {\rregister struct foo * foo = &fum;\r    sqInt object;\r    sqInt sp;\r\r\t/* begin pop: */\r\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\tincrementalGC();\r\tfullGC();\r\t/* begin push: */\r\tobject = positive64BitIntegerFor(((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK)) + (sqMemoryExtraBytesLeft(1)));\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tFetch the system attribute with the given integer ID. The \r\tresult is a string, which will be empty if the attribute is not \r\tdefined. */\r\rsqInt primitiveGetAttribute(void) {\rregister struct foo * foo = &fum;\r    sqInt attr;\r    sqInt s;\r    sqInt sz;\r    sqInt sp;\r    sqInt integerPointer;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tattr = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tattr = 0;\r\t\tgoto l1;\r\t}\r\tattr = null;\rl1:\t/* end stackIntegerValue: */;\r\tif (foo->successFlag) {\r\t\tsz = attributeSize(attr);\r\t}\r\tif (foo->successFlag) {\r\t\ts = instantiateClassindexableSize(fetchPointerofObject(ClassString, foo->specialObjectsOop), sz);\r\t\tgetAttributeIntoLength(attr, s + (BASE_HEADER_SIZE), sz);\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), s);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\r\r/*\tPrimitive. Return the next input event from the VM event queue. */\r\rsqInt primitiveGetNextEvent(void) {\rregister struct foo * foo = &fum;\r    sqInt arg;\r    sqInt eventTypeIs;\r    int evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };\r    sqInt i;\r    sqInt value;\r    sqInt oop;\r\r\t;\r\targ = longAt(foo->stackPointer);\r\tif (!((((arg & 1) == 0) && (((((usqInt) (longAt(arg))) >> 8) & 15) == 2)) && ((slotSizeOf(arg)) == 8))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tioGetNextEvent(((sqInputEvent*) evtBuf));\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\teventTypeIs = evtBuf[0];\r\t/* begin storeInteger:ofObject:withValue: */\r\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t(((((int) (evtBuf[0]))) ^ ((((int) (evtBuf[0]))) << 1)) >= 0)\r# else\r\t\t(((evtBuf[0]) >= -1073741824) && ((evtBuf[0]) <= 1073741823))\r# endif  // SQ_HOST32\r\t) {\r\t\tlongAtput((arg + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)), (((evtBuf[0]) << 1) | 1));\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t}\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\tif (eventTypeIs == 6) {\r\t\tfor (i = 1; i <= 7; i += 1) {\r\t\t\tvalue = evtBuf[i];\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tif ((((usqInt) arg)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(arg, value);\r\t\t\t}\r\t\t\tlongAtput((arg + (BASE_HEADER_SIZE)) + (i << (SHIFT_FOR_WORD)), value);\r\t\t}\r\t} else {\r\t\t/* begin storeInteger:ofObject:withValue: */\r\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t(((((int) ((evtBuf[1]) & MillisecondClockMask))) ^ ((((int) ((evtBuf[1]) & MillisecondClockMask))) << 1)) >= 0)\r# else\r\t\t\t((((evtBuf[1]) & MillisecondClockMask) >= -1073741824) && (((evtBuf[1]) & MillisecondClockMask) <= 1073741823))\r# endif  // SQ_HOST32\r\t\t) {\r\t\t\tlongAtput((arg + (BASE_HEADER_SIZE)) + (1 << (SHIFT_FOR_WORD)), ((((evtBuf[1]) & MillisecondClockMask) << 1) | 1));\r\t\t} else {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t}\r\t\tif (!(foo->successFlag)) {\r\t\t\treturn null;\r\t\t}\r\t\tfor (i = 2; i <= 7; i += 1) {\r\t\t\tvalue = evtBuf[i];\r\t\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t\t(((((int) value)) ^ ((((int) value)) << 1)) >= 0)\r# else\r\t\t\t\t((value >= -1073741824) && (value <= 1073741823))\r# endif  // SQ_HOST32\r\t\t\t) {\r\t\t\t\t/* begin storeInteger:ofObject:withValue: */\r\t\t\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t\t\t(((((int) value)) ^ ((((int) value)) << 1)) >= 0)\r# else\r\t\t\t\t\t((value >= -1073741824) && (value <= 1073741823))\r# endif  // SQ_HOST32\r\t\t\t\t) {\r\t\t\t\t\tlongAtput((arg + (BASE_HEADER_SIZE)) + (i << (SHIFT_FOR_WORD)), ((value << 1) | 1));\r\t\t\t\t} else {\r\t\t\t\t\t/* begin primitiveFail */\r\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t}\r\t\t\t} else {\r\t\t\t\t/* begin pushRemappableOop: */\r\t\t\t\tfoo->remapBuffer[(foo->remapBufferCount += 1)] = arg;\r\t\t\t\tvalue = positive32BitIntegerFor(value);\r\t\t\t\t/* begin popRemappableOop */\r\t\t\t\toop = foo->remapBuffer[foo->remapBufferCount];\r\t\t\t\tfoo->remapBufferCount -= 1;\r\t\t\t\targ = oop;\r\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\tif ((((usqInt) arg)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\tpossibleRootStoreIntovalue(arg, value);\r\t\t\t\t}\r\t\t\t\tlongAtput((arg + (BASE_HEADER_SIZE)) + (i << (SHIFT_FOR_WORD)), value);\r\t\t\t}\r\t\t}\r\t}\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\t/* begin pop: */\r\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r}\r\rsqInt primitiveGreaterOrEqual(void) {\rregister struct foo * foo = &fum;\r    sqInt integerArgument;\r    sqInt integerReceiver;\r    sqInt sp;\r    sqInt sp1;\r    sqInt integerPointer;\r    sqInt top;\r    sqInt integerPointer1;\r    sqInt top1;\r\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer = top;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tintegerArgument = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tintegerArgument = 0;\r\t\tgoto l1;\r\t}\r\tintegerArgument = null;\rl1:\t/* end popInteger */;\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer1 = top1;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer1 & 1)) {\r\t\tintegerReceiver = (integerPointer1 >> 1);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tintegerReceiver = 0;\r\t\tgoto l2;\r\t}\r\tintegerReceiver = null;\rl2:\t/* end popInteger */;\r\t/* begin checkBooleanResult: */\r\tif (foo->successFlag) {\r\t\t/* begin pushBool: */\r\t\tif (integerReceiver >= integerArgument) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tPrimitive comparison operations for large integers in 64 bit range */\r\rEXPORT(sqInt) primitiveGreaterOrEqualLargeIntegers(void) {\rregister struct foo * foo = &fum;\r    sqLong integerArg;\r    sqLong integerRcvr;\r    sqInt sp;\r    sqInt sp1;\r\r\tintegerArg = signed64BitValueOf(longAt(foo->stackPointer - (0 * (BYTES_PER_WORD))));\r\tintegerRcvr = signed64BitValueOf(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))));\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\t/* begin pushBool: */\r\t\tif (integerRcvr >= integerArg) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t}\r}\r\rsqInt primitiveGreaterThan(void) {\rregister struct foo * foo = &fum;\r    sqInt integerArgument;\r    sqInt integerReceiver;\r    sqInt sp;\r    sqInt sp1;\r    sqInt integerPointer;\r    sqInt top;\r    sqInt integerPointer1;\r    sqInt top1;\r\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer = top;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tintegerArgument = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tintegerArgument = 0;\r\t\tgoto l1;\r\t}\r\tintegerArgument = null;\rl1:\t/* end popInteger */;\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer1 = top1;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer1 & 1)) {\r\t\tintegerReceiver = (integerPointer1 >> 1);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tintegerReceiver = 0;\r\t\tgoto l2;\r\t}\r\tintegerReceiver = null;\rl2:\t/* end popInteger */;\r\t/* begin checkBooleanResult: */\r\tif (foo->successFlag) {\r\t\t/* begin pushBool: */\r\t\tif (integerReceiver > integerArgument) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tPrimitive comparison operations for large integers in 64 bit range */\r\rEXPORT(sqInt) primitiveGreaterThanLargeIntegers(void) {\rregister struct foo * foo = &fum;\r    sqLong integerArg;\r    sqLong integerRcvr;\r    sqInt sp;\r    sqInt sp1;\r\r\tintegerArg = signed64BitValueOf(longAt(foo->stackPointer - (0 * (BYTES_PER_WORD))));\r\tintegerRcvr = signed64BitValueOf(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))));\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\t/* begin pushBool: */\r\t\tif (integerRcvr > integerArg) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t}\r}\r\r\r/*\tAnswer an integer identifying the type of image. The image version number may\r\tidentify the format of the image (e.g. 32 or 64-bit word size) or specific requirements\r\tof the image (e.g. block closure support required).\r\t\r\tThis is a named (not numbered) primitive in the null module (ie the VM) */\r\rEXPORT(sqInt) primitiveImageFormatVersion(void) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r    sqInt sp;\r\r\t/* begin pop:thenPush: */\r\toop = positive32BitIntegerFor(imageFormatVersionNumber);\r\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), oop);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tWhen called with a single string argument, record the string as the current image file name. When called with zero arguments, return a string containing the current image file name. */\r\rsqInt primitiveImageName(void) {\rregister struct foo * foo = &fum;\r    sqInt okToRename;\r    sqInt s;\r    void *sCRIfn;\r    sqInt sz;\r    sqInt sp;\r    sqInt classOop;\r    sqInt ccIndex;\r    sqInt cl;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop;\r\r\tif (foo->argumentCount == 1) {\r\r\t\t/* If the security plugin can be loaded, use it to check for rename permission.\r\t\tIf not, assume it's ok */\r\r\t\tsCRIfn = ioLoadFunctionFrom(\"secCanRenameImage\", \"SecurityPlugin\");\r\t\tif (sCRIfn != 0) {\r\t\t\tokToRename =  ((sqInt (*)(void))sCRIfn)();\r\t\t\tif (!(okToRename)) {\r\t\t\t\t/* begin primitiveFail */\r\t\t\t\tfoo->successFlag = 0;\r\t\t\t\treturn null;\r\t\t\t}\r\t\t}\r\t\ts = longAt(foo->stackPointer);\r\t\t/* begin assertClassOf:is: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop = foo->specialObjectsOop;\r\t\tclassOop = longAt((oop + (BASE_HEADER_SIZE)) + (ClassString << (SHIFT_FOR_WORD)));\r\t\tif ((s & 1)) {\r\t\t\tfoo->successFlag = 0;\r\t\t\tgoto l1;\r\t\t}\r\t\tccIndex = (((usqInt) (longAt(s))) >> 12) & 31;\r\t\tif (ccIndex == 0) {\r\t\t\tcl = (longAt(s - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop2 = foo->specialObjectsOop;\r\t\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\t\tcl = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\t}\r\t\t/* begin success: */\r\t\tfoo->successFlag = (cl == classOop) && foo->successFlag;\r\tl1:\t/* end assertClassOf:is: */;\r\t\tif (foo->successFlag) {\r\t\t\tsz = stSizeOf(s);\r\t\t\timageNamePutLength(s + (BASE_HEADER_SIZE), sz);\r\t\t\t/* begin pop: */\r\t\t\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t\t}\r\t} else {\r\t\tsz = imageNameSize();\r\t\ts = instantiateClassindexableSize(fetchPointerofObject(ClassString, foo->specialObjectsOop), sz);\r\t\timageNameGetLength(s + (BASE_HEADER_SIZE), sz);\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t\t/* begin push: */\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), s);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\r\r/*\tDo a quick, incremental garbage collection and return the number of bytes immediately available. (Note: more space may be made available by doing a full garbage collection. */\r\rsqInt primitiveIncrementalGC(void) {\rregister struct foo * foo = &fum;\r    sqInt object;\r    sqInt sp;\r\r\t/* begin pop: */\r\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\tincrementalGC();\r\t/* begin push: */\r\tobject = positive64BitIntegerFor(((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK)) + (sqMemoryExtraBytesLeft(0)));\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tNote: We now have 10 bits of primitive index, but they are in two places\r\tfor temporary backward compatibility.  The time to unpack is negligible,\r\tsince the reconstituted full index is stored in the method cache. */\r\rsqInt primitiveIndexOf(sqInt methodPointer) {\r    sqInt primBits;\r\r\tprimBits = (((usqInt) (longAt((methodPointer + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD))))) >> 1) & 268435967;\r\treturn (primBits & 511) + (((usqInt) primBits) >> 19);\r}\r\r\r/*\tRegister the input semaphore. The argument is an index into the ExternalObjectsArray part of the specialObjectsArray and must have been allocated via 'Smalltalk registerExternalObject: the Semaphore'  */\r\rsqInt primitiveInputSemaphore(void) {\rregister struct foo * foo = &fum;\r    sqInt arg;\r\r\targ = longAt(foo->stackPointer);\r\tif ((arg & 1)) {\r\t\tioSetInputSemaphore((arg >> 1));\r\t\tif (foo->successFlag) {\r\t\t\t/* begin pop: */\r\t\t\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t\t}\r\t\treturn null;\r\t}\r}\r\r\r/*\tReturn an integer indicating the reason for the most recent input interrupt. */\r\rsqInt primitiveInputWord(void) {\rregister struct foo * foo = &fum;\r    sqInt sp;\r\r\t/* begin pop:thenPushInteger: */\r\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), ((0 << 1) | 1));\r\tfoo->stackPointer = sp;\r}\r\rsqInt primitiveInstVarAt(void) {\rregister struct foo * foo = &fum;\r    sqInt fixedFields;\r    sqInt fmt;\r    sqInt hdr;\r    sqInt index;\r    sqInt rcvr;\r    sqInt totalLength;\r    sqInt value;\r    sqInt sp;\r    sqInt sz;\r    sqInt integerPointer;\r    sqInt class;\r    sqInt classFormat;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tindex = (integerPointer >> 1);\r\t\tgoto l3;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tindex = 0;\r\t\tgoto l3;\r\t}\r\tindex = null;\rl3:\t/* end stackIntegerValue: */;\r\trcvr = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\tif (foo->successFlag) {\r\t\thdr = longAt(rcvr);\r\t\tfmt = (((usqInt) hdr) >> 8) & 15;\r\t\t/* begin lengthOf:baseHeader:format: */\r\t\tif ((hdr & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(rcvr - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t} else {\r\t\t\tsz = hdr & (SIZE_MASK);\r\t\t}\r\t\tsz -= hdr & (SIZE_4_BIT);\r\t\tif (fmt <= 4) {\r\t\t\ttotalLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\t\tgoto l1;\r\t\t}\r\t\tif (fmt < 8) {\r\t\t\ttotalLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> 2;\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\ttotalLength = (sz - (BASE_HEADER_SIZE)) - (fmt & 3);\r\t\t\tgoto l1;\r\t\t}\r\tl1:\t/* end lengthOf:baseHeader:format: */;\r\t\t/* begin fixedFieldsOf:format:length: */\r\t\tif ((fmt > 4) || (fmt == 2)) {\r\t\t\tfixedFields = 0;\r\t\t\tgoto l5;\r\t\t}\r\t\tif (fmt < 2) {\r\t\t\tfixedFields = totalLength;\r\t\t\tgoto l5;\r\t\t}\r\t\t/* begin fetchClassOf: */\r\t\tif ((rcvr & 1)) {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop1 = foo->specialObjectsOop;\r\t\t\tclass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\t\tgoto l4;\r\t\t}\r\t\tccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31;\r\t\tif (ccIndex == 0) {\r\t\t\tclass = (longAt(rcvr - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\t\tgoto l4;\r\t\t} else {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop3 = foo->specialObjectsOop;\r\t\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\t\tclass = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\t\tgoto l4;\r\t\t}\r\tl4:\t/* end fetchClassOf: */;\r\t\tclassFormat = (longAt((class + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1;\r\t\tfixedFields = (((((usqInt) classFormat) >> 11) & 192) + ((((usqInt) classFormat) >> 2) & 63)) - 1;\r\tl5:\t/* end fixedFieldsOf:format:length: */;\r\t\tif (!((index >= 1) && (index <= fixedFields))) {\r\t\t\tfoo->successFlag = 0;\r\t\t}\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin subscript:with:format: */\r\t\tif (fmt <= 4) {\r\t\t\tvalue = longAt((rcvr + (BASE_HEADER_SIZE)) + ((index - 1) << (SHIFT_FOR_WORD)));\r\t\t\tgoto l2;\r\t\t}\r\t\tif (fmt < 8) {\r\t\t\tvalue = positive32BitIntegerFor(long32At((rcvr + (BASE_HEADER_SIZE)) + ((index - 1) << 2)));\r\t\t\tgoto l2;\r\t\t} else {\r\t\t\tvalue = (((byteAt((rcvr + (BASE_HEADER_SIZE)) + (index - 1))) << 1) | 1);\r\t\t\tgoto l2;\r\t\t}\r\tl2:\t/* end subscript:with:format: */;\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp = foo->stackPointer - (((foo->argumentCount + 1) - 1) * (BYTES_PER_WORD)), value);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\rsqInt primitiveInstVarAtPut(void) {\rregister struct foo * foo = &fum;\r    sqInt fixedFields;\r    sqInt fmt;\r    sqInt hdr;\r    sqInt index;\r    sqInt newValue;\r    sqInt rcvr;\r    sqInt totalLength;\r    sqInt sp;\r    sqInt sz;\r    sqInt valueToStore;\r    sqInt integerPointer;\r    sqInt class;\r    sqInt classFormat;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\tnewValue = longAt(foo->stackPointer);\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tindex = (integerPointer >> 1);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tindex = 0;\r\t\tgoto l2;\r\t}\r\tindex = null;\rl2:\t/* end stackIntegerValue: */;\r\trcvr = longAt(foo->stackPointer - (2 * (BYTES_PER_WORD)));\r\tif (foo->successFlag) {\r\t\thdr = longAt(rcvr);\r\t\tfmt = (((usqInt) hdr) >> 8) & 15;\r\t\t/* begin lengthOf:baseHeader:format: */\r\t\tif ((hdr & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(rcvr - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t} else {\r\t\t\tsz = hdr & (SIZE_MASK);\r\t\t}\r\t\tsz -= hdr & (SIZE_4_BIT);\r\t\tif (fmt <= 4) {\r\t\t\ttotalLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\t\tgoto l1;\r\t\t}\r\t\tif (fmt < 8) {\r\t\t\ttotalLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> 2;\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\ttotalLength = (sz - (BASE_HEADER_SIZE)) - (fmt & 3);\r\t\t\tgoto l1;\r\t\t}\r\tl1:\t/* end lengthOf:baseHeader:format: */;\r\t\t/* begin fixedFieldsOf:format:length: */\r\t\tif ((fmt > 4) || (fmt == 2)) {\r\t\t\tfixedFields = 0;\r\t\t\tgoto l4;\r\t\t}\r\t\tif (fmt < 2) {\r\t\t\tfixedFields = totalLength;\r\t\t\tgoto l4;\r\t\t}\r\t\t/* begin fetchClassOf: */\r\t\tif ((rcvr & 1)) {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop1 = foo->specialObjectsOop;\r\t\t\tclass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\t\tgoto l3;\r\t\t}\r\t\tccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31;\r\t\tif (ccIndex == 0) {\r\t\t\tclass = (longAt(rcvr - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\t\tgoto l3;\r\t\t} else {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop3 = foo->specialObjectsOop;\r\t\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\t\tclass = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\t\tgoto l3;\r\t\t}\r\tl3:\t/* end fetchClassOf: */;\r\t\tclassFormat = (longAt((class + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1;\r\t\tfixedFields = (((((usqInt) classFormat) >> 11) & 192) + ((((usqInt) classFormat) >> 2) & 63)) - 1;\r\tl4:\t/* end fixedFieldsOf:format:length: */;\r\t\tif (!((index >= 1) && (index <= fixedFields))) {\r\t\t\tfoo->successFlag = 0;\r\t\t}\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin subscript:with:storing:format: */\r\t\tif (fmt <= 4) {\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tif ((((usqInt) rcvr)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(rcvr, newValue);\r\t\t\t}\r\t\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + ((index - 1) << (SHIFT_FOR_WORD)), newValue);\r\t\t} else {\r\t\t\tif (fmt < 8) {\r\t\t\t\tvalueToStore = positive32BitValueOf(newValue);\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\tlong32Atput((rcvr + (BASE_HEADER_SIZE)) + ((index - 1) << 2), valueToStore);\r\t\t\t\t}\r\t\t\t} else {\r\t\t\t\tif (!((newValue & 1))) {\r\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t}\r\t\t\t\tvalueToStore = (newValue >> 1);\r\t\t\t\tif (!((valueToStore >= 0) && (valueToStore <= 255))) {\r\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t}\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\tbyteAtput((rcvr + (BASE_HEADER_SIZE)) + (index - 1), valueToStore);\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp = foo->stackPointer - (((foo->argumentCount + 1) - 1) * (BYTES_PER_WORD)), newValue);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\r\r/*\tNote:  this primitive has been decommissioned.  It is only here for short-term compatibility with an internal 2.3beta-d image that used this.  It did not save much time and it complicated several things.  Plus Jitter will do it right anyway. */\r\rsqInt primitiveInstVarsPutFromStack(void) {\rregister struct foo * foo = &fum;\r    sqInt i;\r    sqInt offsetBits;\r    sqInt rcvr;\r    sqInt valuePointer;\r\r\r\t/* Mark dirty so stores below can be unchecked */\r\r\trcvr = longAt(foo->stackPointer - (foo->argumentCount * (BYTES_PER_WORD)));\r\tif ((((usqInt) rcvr)) < (((usqInt) foo->youngStart))) {\r\t\tbeRootIfOld(rcvr);\r\t}\r\tfor (i = 0; i <= (foo->argumentCount - 1); i += 1) {\r\t\tif ((i & 3) == 0) {\r\t\t\toffsetBits = positive32BitValueOf(literalofMethod(((sqInt) i >> 2), foo->newMethod));\r\t\t}\r\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\tvaluePointer = longAt(foo->stackPointer - (i * (BYTES_PER_WORD)));\r\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + ((offsetBits & 255) << (SHIFT_FOR_WORD)), valuePointer);\r\t\toffsetBits = ((usqInt) offsetBits) >> 8;\r\t}\r\t/* begin pop: */\r\tfoo->stackPointer -= foo->argumentCount * (BYTES_PER_WORD);\r}\r\r\r/*\tReturn the 32bit signed integer contents of a words receiver */\r\rsqInt primitiveIntegerAt(void) {\rregister struct foo * foo = &fum;\r    sqInt addr;\r    sqInt index;\r    int intValue;\r    sqInt rcvr;\r    sqInt sz;\r    sqInt value;\r    sqInt object;\r    sqInt sp;\r    sqInt header;\r    sqInt successValue;\r    sqInt sp1;\r    sqInt sz1;\r    sqInt integerPointer;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tindex = (integerPointer >> 1);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tindex = 0;\r\t\tgoto l2;\r\t}\r\tindex = null;\rl2:\t/* end stackIntegerValue: */;\r\trcvr = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\tif ((rcvr & 1)) {\r\t\t/* begin success: */\r\t\tfoo->successFlag = 0 && foo->successFlag;\r\t\treturn null;\r\t}\r\tif (!(((rcvr & 1) == 0) && (((((usqInt) (longAt(rcvr))) >> 8) & 15) == 6))) {\r\t\t/* begin success: */\r\t\tfoo->successFlag = 0 && foo->successFlag;\r\t\treturn null;\r\t}\r\t/* begin lengthOf: */\r\theader = longAt(rcvr);\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz1 = (longAt(rcvr - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz1 = header & (SIZE_MASK);\r\t}\r\tsz1 -= header & (SIZE_4_BIT);\r\tif (((((usqInt) header) >> 8) & 15) <= 4) {\r\t\tsz = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tgoto l1;\r\t}\r\tif (((((usqInt) header) >> 8) & 15) < 8) {\r\t\tsz = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> 2;\r\t\tgoto l1;\r\t} else {\r\t\tsz = (sz1 - (BASE_HEADER_SIZE)) - (((((usqInt) header) >> 8) & 15) & 3);\r\t\tgoto l1;\r\t}\rl1:\t/* end lengthOf:baseHeader:format: */;\r\t/* begin success: */\r\tsuccessValue = (index >= 1) && (index <= sz);\r\tfoo->successFlag = successValue && foo->successFlag;\r\tif (foo->successFlag) {\r\r\t\t/* for zero indexing */\r\r\t\taddr = ((rcvr + (BASE_HEADER_SIZE)) - 4) + (index * 4);\r\t\tvalue = intAt(addr);\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t(((((int) value)) ^ ((((int) value)) << 1)) >= 0)\r# else\r\t\t\t((value >= -1073741824) && (value <= 1073741823))\r# endif  // SQ_HOST32\r\t\t) {\r\t\t\t/* begin pushInteger: */\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), ((value << 1) | 1));\r\t\t\tfoo->stackPointer = sp1;\r\t\t} else {\r\r\t\t\t/* 32 bit int may have been stored in 32 or 64 bit sqInt */\r\r\t\t\tintValue = value;\r\t\t\t/* begin push: */\r\t\t\tobject = signed32BitIntegerFor(intValue);\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\t\t\tfoo->stackPointer = sp;\r\t\t}\r\t}\r}\r\r\r/*\tReturn the 32bit signed integer contents of a words receiver */\r\rsqInt primitiveIntegerAtPut(void) {\rregister struct foo * foo = &fum;\r    sqInt addr;\r    sqInt index;\r    sqInt rcvr;\r    sqInt sz;\r    sqInt value;\r    sqInt valueOop;\r    sqInt sp;\r    sqInt header;\r    sqInt sz1;\r    sqInt integerPointer;\r\r\tvalueOop = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tindex = (integerPointer >> 1);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tindex = 0;\r\t\tgoto l2;\r\t}\r\tindex = null;\rl2:\t/* end stackIntegerValue: */;\r\trcvr = longAt(foo->stackPointer - (2 * (BYTES_PER_WORD)));\r\tif ((rcvr & 1)) {\r\t\t/* begin success: */\r\t\tfoo->successFlag = 0 && foo->successFlag;\r\t\treturn null;\r\t}\r\tif (!(((rcvr & 1) == 0) && (((((usqInt) (longAt(rcvr))) >> 8) & 15) == 6))) {\r\t\t/* begin success: */\r\t\tfoo->successFlag = 0 && foo->successFlag;\r\t\treturn null;\r\t}\r\t/* begin lengthOf: */\r\theader = longAt(rcvr);\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz1 = (longAt(rcvr - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz1 = header & (SIZE_MASK);\r\t}\r\tsz1 -= header & (SIZE_4_BIT);\r\tif (((((usqInt) header) >> 8) & 15) <= 4) {\r\t\tsz = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tgoto l1;\r\t}\r\tif (((((usqInt) header) >> 8) & 15) < 8) {\r\t\tsz = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> 2;\r\t\tgoto l1;\r\t} else {\r\t\tsz = (sz1 - (BASE_HEADER_SIZE)) - (((((usqInt) header) >> 8) & 15) & 3);\r\t\tgoto l1;\r\t}\rl1:\t/* end lengthOf:baseHeader:format: */;\r\tif (!((index >= 1) && (index <= sz))) {\r\t\t/* begin success: */\r\t\tfoo->successFlag = 0 && foo->successFlag;\r\t\treturn null;\r\t}\r\tif ((valueOop & 1)) {\r\t\tvalue = (valueOop >> 1);\r\t} else {\r\t\tvalue = signed32BitValueOf(valueOop);\r\t}\r\tif (foo->successFlag) {\r\r\t\t/* for zero indexing */\r\r\t\taddr = ((rcvr + (BASE_HEADER_SIZE)) - 4) + (index * 4);\r\t\tvalue = intAtput(addr, value);\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp = foo->stackPointer - ((3 - 1) * (BYTES_PER_WORD)), valueOop);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\r\r/*\tAnswer a string corresponding to the version of the interpreter source. This\r\trepresents the version level of the Smalltalk source code (interpreter and various\r\tplugins) that is translated to C by a CCodeGenerator, as distinct from the external\r\tplatform source code, typically written in C and managed separately for each platform.\r\tThis is a named (not numbered) primitive in the null module (ie the VM) */\r\rEXPORT(sqInt) primitiveInterpreterSourceVersion(void) {\rregister struct foo * foo = &fum;\r    char *cString;\r    sqInt len;\r    void * p;\r    sqInt versionString;\r    sqInt sp;\r\r\tcString = InterpreterSourceVersion;\r\tlen = strlen(cString);\r\tversionString = instantiateClassindexableSize(fetchPointerofObject(ClassString, foo->specialObjectsOop), len);\r\t/* begin arrayValueOf: */\r\tif ((!((versionString & 1))) && (((versionString & 1) == 0) && (isWordsOrBytesNonInt(versionString)))) {\r\t\tp = pointerForOop(versionString + (BASE_HEADER_SIZE));\r\t\tgoto l1;\r\t}\r\t/* begin primitiveFail */\r\tfoo->successFlag = 0;\rl1:\t/* end arrayValueOf: */;\r\tstrncpy(p, cString, len);\r\t/* begin pop:thenPush: */\r\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), versionString);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tRegister the user interrupt semaphore. If the argument is \r\tnot a Semaphore, unregister the current interrupt \r\tsemaphore.  */\r\rsqInt primitiveInterruptSemaphore(void) {\rregister struct foo * foo = &fum;\r    sqInt arg;\r    sqInt top;\r    sqInt oop;\r    sqInt oop1;\r    sqInt valuePointer;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\targ = top;\r\tif ((fetchClassOf(arg)) == (fetchPointerofObject(ClassSemaphore, foo->specialObjectsOop))) {\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\toop = foo->specialObjectsOop;\r\t\tif ((((usqInt) oop)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(oop, arg);\r\t\t}\r\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + (TheInterruptSemaphore << (SHIFT_FOR_WORD)), arg);\r\t} else {\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tvaluePointer = foo->nilObj;\r\t\tif ((((usqInt) oop1)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(oop1, valuePointer);\r\t\t}\r\t\tlongAtput((oop1 + (BASE_HEADER_SIZE)) + (TheInterruptSemaphore << (SHIFT_FOR_WORD)), valuePointer);\r\t}\r}\r\r\r/*\tPrimitive. 'Invoke' an object like a function, sending the special message \r\t\trun: originalSelector with: arguments in: aReceiver.\r\t */\r\rsqInt primitiveInvokeObjectAsMethod(void) {\rregister struct foo * foo = &fum;\r    sqInt lookupClass;\r    sqInt newReceiver;\r    sqInt runArgs;\r    sqInt runReceiver;\r    sqInt runSelector;\r    sqInt oop;\r    sqInt sp;\r    sqInt sp1;\r    sqInt sp2;\r    sqInt sp3;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt count;\r    sqInt src;\r    sqInt in;\r    sqInt lastIn;\r    sqInt out;\r    sqInt oop3;\r\r\trunArgs = instantiateClassindexableSize(fetchPointerofObject(ClassArray, foo->specialObjectsOop), foo->argumentCount);\r\tbeRootIfOld(runArgs);\r\t/* begin transfer:from:to: */\r\tcount = foo->argumentCount;\r\tsrc = foo->stackPointer - ((foo->argumentCount - 1) * (BYTES_PER_WORD));\r\tflag(\"Dan\");\r\tin = src - (BYTES_PER_WORD);\r\tlastIn = in + (count * (BYTES_PER_WORD));\r\tout = (runArgs + (BASE_HEADER_SIZE)) - (BYTES_PER_WORD);\r\twhile ((((usqInt) in)) < (((usqInt) lastIn))) {\r\t\tlongAtput(out += BYTES_PER_WORD, longAt(in += BYTES_PER_WORD));\r\t}\r\trunSelector = foo->messageSelector;\r\trunReceiver = longAt(foo->stackPointer - (foo->argumentCount * (BYTES_PER_WORD)));\r\t/* begin pop: */\r\tfoo->stackPointer -= (foo->argumentCount + 1) * (BYTES_PER_WORD);\r\tnewReceiver = foo->newMethod;\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\tfoo->messageSelector = longAt((oop + (BASE_HEADER_SIZE)) + (SelectorRunWithIn << (SHIFT_FOR_WORD)));\r\tfoo->argumentCount = 3;\r\t/* begin push: */\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), newReceiver);\r\tfoo->stackPointer = sp;\r\t/* begin push: */\r\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), runSelector);\r\tfoo->stackPointer = sp1;\r\t/* begin push: */\r\tlongAtput(sp2 = foo->stackPointer + (BYTES_PER_WORD), runArgs);\r\tfoo->stackPointer = sp2;\r\t/* begin push: */\r\tlongAtput(sp3 = foo->stackPointer + (BYTES_PER_WORD), runReceiver);\r\tfoo->stackPointer = sp3;\r\t/* begin fetchClassOf: */\r\tif ((newReceiver & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tlookupClass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(newReceiver))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tlookupClass = (longAt(newReceiver - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tlookupClass = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\rl1:\t/* end fetchClassOf: */;\r\tfindNewMethodInClass(lookupClass);\r\texecuteNewMethodFromCache();\r\tfoo->successFlag = 1;\r}\r\r\r/*\tPrimitive. Answer whether the argument to the primitive is a root for young space */\r\rEXPORT(sqInt) primitiveIsRoot(void) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r    sqInt trueOrFalse;\r    sqInt sp;\r    sqInt sp1;\r    sqInt oop1;\r\r\t/* begin stackObjectValue: */\r\toop1 = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\tif ((oop1 & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\toop = null;\r\t\tgoto l1;\r\t}\r\toop = oop1;\rl1:\t/* end stackObjectValue: */;\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= (foo->argumentCount + 1) * (BYTES_PER_WORD);\r\t\t/* begin pushBool: */\r\t\ttrueOrFalse = (longAt(oop)) & (ROOT_BIT);\r\t\tif (trueOrFalse) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t}\r}\r\r\r/*\tPrimitive. Answer whether the argument to the primitive resides in young space. */\r\rEXPORT(sqInt) primitiveIsYoung(void) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r    sqInt trueOrFalse;\r    sqInt sp;\r    sqInt sp1;\r    sqInt oop1;\r\r\t/* begin stackObjectValue: */\r\toop1 = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\tif ((oop1 & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\toop = null;\r\t\tgoto l1;\r\t}\r\toop = oop1;\rl1:\t/* end stackObjectValue: */;\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= (foo->argumentCount + 1) * (BYTES_PER_WORD);\r\t\t/* begin pushBool: */\r\t\ttrueOrFalse = (((usqInt) oop)) >= (((usqInt) foo->youngStart));\r\t\tif (trueOrFalse) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t}\r}\r\r\r/*\tObsolete on virtually all platforms; old style input polling code.\r\tReturn the next keycode and remove it from the input buffer. The low byte is the 8-bit ISO character. The next four bits are the Smalltalk modifier bits <cmd><option><ctrl><shift>. */\r\rsqInt primitiveKbdNext(void) {\rregister struct foo * foo = &fum;\r    sqInt keystrokeWord;\r    sqInt sp;\r    sqInt sp1;\r\r\t/* begin pop: */\r\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\tkeystrokeWord = ioGetKeystroke();\r\tif (keystrokeWord >= 0) {\r\t\t/* begin pushInteger: */\r\t\t/* begin push: */\r\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), ((keystrokeWord << 1) | 1));\r\t\tfoo->stackPointer = sp1;\r\t} else {\r\t\t/* begin push: */\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->nilObj);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\r\r/*\tObsolete on virtually all platforms; old style input polling code.\r\tReturn the next keycode and without removing it from the input buffer. The low byte is the 8-bit ISO character. The next four bits are the Smalltalk modifier bits <cmd><option><ctrl><shift>. */\r\rsqInt primitiveKbdPeek(void) {\rregister struct foo * foo = &fum;\r    sqInt keystrokeWord;\r    sqInt sp;\r    sqInt sp1;\r\r\t/* begin pop: */\r\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\tkeystrokeWord = ioPeekKeystroke();\r\tif (keystrokeWord >= 0) {\r\t\t/* begin pushInteger: */\r\t\t/* begin push: */\r\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), ((keystrokeWord << 1) | 1));\r\t\tfoo->stackPointer = sp1;\r\t} else {\r\t\t/* begin push: */\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->nilObj);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\rsqInt primitiveLessOrEqual(void) {\rregister struct foo * foo = &fum;\r    sqInt integerArgument;\r    sqInt integerReceiver;\r    sqInt sp;\r    sqInt sp1;\r    sqInt integerPointer;\r    sqInt top;\r    sqInt integerPointer1;\r    sqInt top1;\r\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer = top;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tintegerArgument = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tintegerArgument = 0;\r\t\tgoto l1;\r\t}\r\tintegerArgument = null;\rl1:\t/* end popInteger */;\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer1 = top1;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer1 & 1)) {\r\t\tintegerReceiver = (integerPointer1 >> 1);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tintegerReceiver = 0;\r\t\tgoto l2;\r\t}\r\tintegerReceiver = null;\rl2:\t/* end popInteger */;\r\t/* begin checkBooleanResult: */\r\tif (foo->successFlag) {\r\t\t/* begin pushBool: */\r\t\tif (integerReceiver <= integerArgument) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tPrimitive comparison operations for large integers in 64 bit range */\r\rEXPORT(sqInt) primitiveLessOrEqualLargeIntegers(void) {\rregister struct foo * foo = &fum;\r    sqLong integerArg;\r    sqLong integerRcvr;\r    sqInt sp;\r    sqInt sp1;\r\r\tintegerArg = signed64BitValueOf(longAt(foo->stackPointer - (0 * (BYTES_PER_WORD))));\r\tintegerRcvr = signed64BitValueOf(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))));\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\t/* begin pushBool: */\r\t\tif (integerRcvr <= integerArg) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t}\r}\r\rsqInt primitiveLessThan(void) {\rregister struct foo * foo = &fum;\r    sqInt integerArgument;\r    sqInt integerReceiver;\r    sqInt sp;\r    sqInt sp1;\r    sqInt integerPointer;\r    sqInt top;\r    sqInt integerPointer1;\r    sqInt top1;\r\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer = top;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tintegerArgument = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tintegerArgument = 0;\r\t\tgoto l1;\r\t}\r\tintegerArgument = null;\rl1:\t/* end popInteger */;\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer1 = top1;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer1 & 1)) {\r\t\tintegerReceiver = (integerPointer1 >> 1);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tintegerReceiver = 0;\r\t\tgoto l2;\r\t}\r\tintegerReceiver = null;\rl2:\t/* end popInteger */;\r\t/* begin checkBooleanResult: */\r\tif (foo->successFlag) {\r\t\t/* begin pushBool: */\r\t\tif (integerReceiver < integerArgument) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tPrimitive comparison operations for large integers in 64 bit range */\r\rEXPORT(sqInt) primitiveLessThanLargeIntegers(void) {\rregister struct foo * foo = &fum;\r    sqLong integerArg;\r    sqLong integerRcvr;\r    sqInt sp;\r    sqInt sp1;\r\r\tintegerArg = signed64BitValueOf(longAt(foo->stackPointer - (0 * (BYTES_PER_WORD))));\r\tintegerRcvr = signed64BitValueOf(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))));\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\t/* begin pushBool: */\r\t\tif (integerRcvr < integerArg) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t}\r}\r\r\r/*\tPrimitive. Return the n-th builtin module name. */\r\rsqInt primitiveListBuiltinModule(void) {\rregister struct foo * foo = &fum;\r    sqInt i;\r    sqInt index;\r    sqInt length;\r    char *moduleName;\r    sqInt nameOop;\r    sqInt sp;\r    sqInt sp1;\r    sqInt integerPointer;\r\r\tif (!(foo->argumentCount == 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tindex = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tindex = 0;\r\t\tgoto l1;\r\t}\r\tindex = null;\rl1:\t/* end stackIntegerValue: */;\r\tif (index <= 0) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tmoduleName = ioListBuiltinModule(index);\r\tif (moduleName == null) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\t/* begin push: */\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->nilObj);\r\t\tfoo->stackPointer = sp;\r\t\treturn null;\r\t}\r\tlength = strlen(moduleName);\r\tnameOop = instantiateClassindexableSize(fetchPointerofObject(ClassString, foo->specialObjectsOop), length);\r\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\tbyteAtput((nameOop + (BASE_HEADER_SIZE)) + i, moduleName[i]);\r\t}\r\t/* begin forceInterruptCheck */\r\tfoo->interruptCheckCounter = -1000;\r\tfoo->nextPollTick = 0;\r\t/* begin pop:thenPush: */\r\tlongAtput(sp1 = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), nameOop);\r\tfoo->stackPointer = sp1;\r}\r\r\r/*\tPrimitive. Return the n-th loaded external module name. */\r\rsqInt primitiveListExternalModule(void) {\rregister struct foo * foo = &fum;\r    sqInt i;\r    sqInt index;\r    sqInt length;\r    char *moduleName;\r    sqInt nameOop;\r    sqInt sp;\r    sqInt sp1;\r    sqInt integerPointer;\r\r\tif (!(foo->argumentCount == 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tindex = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tindex = 0;\r\t\tgoto l1;\r\t}\r\tindex = null;\rl1:\t/* end stackIntegerValue: */;\r\tif (index <= 0) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tmoduleName = ioListLoadedModule(index);\r\tif (moduleName == null) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\t/* begin push: */\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->nilObj);\r\t\tfoo->stackPointer = sp;\r\t\treturn null;\r\t}\r\tlength = strlen(moduleName);\r\tnameOop = instantiateClassindexableSize(fetchPointerofObject(ClassString, foo->specialObjectsOop), length);\r\tfor (i = 0; i <= (length - 1); i += 1) {\r\t\tbyteAtput((nameOop + (BASE_HEADER_SIZE)) + i, moduleName[i]);\r\t}\r\t/* begin forceInterruptCheck */\r\tfoo->interruptCheckCounter = -1000;\r\tfoo->nextPollTick = 0;\r\t/* begin pop:thenPush: */\r\tlongAtput(sp1 = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), nameOop);\r\tfoo->stackPointer = sp1;\r}\r\r\r/*\tThis primitive is called from Squeak as...\r\t\t<imageSegment> loadSegmentFrom: aWordArray outPointers: anArray. */\r/*\tThis primitive will load a binary image segment created by primitiveStoreImageSegment.  It expects the outPointer array to be of the proper size, and the wordArray to be well formed.  It will return as its value the original array of roots, and the erstwhile segmentWordArray will have been truncated to a size of zero.  If this primitive should fail, the segmentWordArray will, sadly, have been reduced to an unrecognizable and unusable jumble.  But what more could you have done with it anyway? */\r\rsqInt primitiveLoadImageSegment(void) {\rregister struct foo * foo = &fum;\r    sqInt data;\r    sqInt doingClass;\r    usqInt endSeg;\r    sqInt extraSize;\r    sqInt fieldOop;\r    usqInt fieldPtr;\r    sqInt hdrTypeBits;\r    sqInt header;\r    usqInt lastOut;\r    usqInt lastPtr;\r    sqInt mapOop;\r    sqInt outPointerArray;\r    usqInt outPtr;\r    usqInt segOop;\r    sqInt segmentWordArray;\r    sqInt sp;\r    sqInt addr;\r    sqInt addr1;\r    sqInt sz;\r    sqInt header1;\r    sqInt sz1;\r    sqInt header2;\r\r\tif (DoAssertionChecks) {\r\t\tverifyCleanHeaders();\r\t}\r\toutPointerArray = longAt(foo->stackPointer);\r\tlastOut = outPointerArray + (lastPointerOf(outPointerArray));\r\tsegmentWordArray = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\r\t/* Essential type checks */\r\r\tendSeg = (segmentWordArray + (sizeBitsOf(segmentWordArray))) - (BASE_HEADER_SIZE);\r\tif (!((((((usqInt) (longAt(outPointerArray))) >> 8) & 15) == 2) && (((((usqInt) (longAt(segmentWordArray))) >> 8) & 15) == 6))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tdata = longAt(segmentWordArray + (BASE_HEADER_SIZE));\r\tif (!(readableFormat(data & 65535))) {\r\t\t/* begin reverseBytesFrom:to: */\r\t\tflag(\"Dan\");\r\t\taddr1 = segmentWordArray + (BASE_HEADER_SIZE);\r\t\twhile ((((usqInt) addr1)) < (((usqInt) (endSeg + (BYTES_PER_WORD))))) {\r\t\t\tlongAtput(addr1, byteSwapped(longAt(addr1)));\r\t\t\taddr1 += BYTES_PER_WORD;\r\t\t}\r\t\tdata = longAt(segmentWordArray + (BASE_HEADER_SIZE));\r\t\tif (!(readableFormat(data & 65535))) {\r\t\t\t/* begin reverseBytesFrom:to: */\r\t\t\tflag(\"Dan\");\r\t\t\taddr = segmentWordArray + (BASE_HEADER_SIZE);\r\t\t\twhile ((((usqInt) addr)) < (((usqInt) (endSeg + (BYTES_PER_WORD))))) {\r\t\t\t\tlongAtput(addr, byteSwapped(longAt(addr)));\r\t\t\t\taddr += BYTES_PER_WORD;\r\t\t\t}\r\t\t\tif (DoAssertionChecks) {\r\t\t\t\tverifyCleanHeaders();\r\t\t\t}\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t}\r\tif (!((((usqInt) data) >> 16) == (((usqInt) (imageSegmentVersion())) >> 16))) {\r\r\t\t/* Reverse the byte-type objects once */\r\t\t/* Oop of first embedded object */\r\r\t\tsegOop = ((segmentWordArray + (BASE_HEADER_SIZE)) + (BYTES_PER_WORD)) + (foo->headerTypeBytes[(longAt((segmentWordArray + (BASE_HEADER_SIZE)) + (BYTES_PER_WORD))) & TypeMask]);\r\t\tbyteSwapByteObjectsFromto(segOop, endSeg + (BYTES_PER_WORD));\r\t}\r\tsegOop = ((segmentWordArray + (BASE_HEADER_SIZE)) + (BYTES_PER_WORD)) + (foo->headerTypeBytes[(longAt((segmentWordArray + (BASE_HEADER_SIZE)) + (BYTES_PER_WORD))) & TypeMask]);\r\twhile (segOop <= endSeg) {\r\t\tif (((longAt(segOop)) & TypeMask) <= 1) {\r\r\t\t\t/* This object has a class field (type = 0 or 1) -- start with that. */\r\r\t\t\tfieldPtr = segOop - (BYTES_PER_WORD);\r\t\t\tdoingClass = 1;\r\t\t} else {\r\r\t\t\t/* No class field -- start with first data field */\r\r\t\t\tfieldPtr = segOop + (BASE_HEADER_SIZE);\r\t\t\tdoingClass = 0;\r\t\t}\r\r\t\t/* last field */\r\r\t\tlastPtr = segOop + (lastPointerOf(segOop));\r\t\tif (lastPtr > endSeg) {\r\t\t\tif (DoAssertionChecks) {\r\t\t\t\tverifyCleanHeaders();\r\t\t\t}\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t\twhile (!(fieldPtr > lastPtr)) {\r\r\t\t\t/* Examine each pointer field */\r\r\t\t\tfieldOop = longAt(fieldPtr);\r\t\t\tif (doingClass) {\r\t\t\t\thdrTypeBits = (longAt(fieldPtr)) & TypeMask;\r\t\t\t\tfieldOop -= hdrTypeBits;\r\t\t\t}\r\t\t\tif ((fieldOop & 1)) {\r\r\t\t\t\t/* Integer -- nothing to do */\r\r\t\t\t\tfieldPtr += BYTES_PER_WORD;\r\t\t\t} else {\r\t\t\t\tif (!((fieldOop & 3) == 0)) {\r\t\t\t\t\t/* begin primitiveFail */\r\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t\treturn null;\r\t\t\t\t}\r\t\t\t\tif ((fieldOop & 2147483648U) == 0) {\r\r\t\t\t\t\t/* Internal pointer -- add segment offset */\r\r\t\t\t\t\tmapOop = fieldOop + segmentWordArray;\r\t\t\t\t} else {\r\r\t\t\t\t\t/* External pointer -- look it up in outPointers */\r\r\t\t\t\t\toutPtr = outPointerArray + (fieldOop & 2147483647U);\r\t\t\t\t\tif (outPtr > lastOut) {\r\t\t\t\t\t\t/* begin primitiveFail */\r\t\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t\t\treturn null;\r\t\t\t\t\t}\r\t\t\t\t\tmapOop = longAt(outPtr);\r\t\t\t\t}\r\t\t\t\tif (doingClass) {\r\t\t\t\t\tlongAtput(fieldPtr, mapOop + hdrTypeBits);\r\t\t\t\t\tfieldPtr += 8;\r\t\t\t\t\tdoingClass = 0;\r\t\t\t\t} else {\r\t\t\t\t\tlongAtput(fieldPtr, mapOop);\r\t\t\t\t\tfieldPtr += BYTES_PER_WORD;\r\t\t\t\t}\r\t\t\t\tif (segOop < foo->youngStart) {\r\t\t\t\t\tpossibleRootStoreIntovalue(segOop, mapOop);\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t\t/* begin objectAfter: */\r\t\tif (DoAssertionChecks) {\r\t\t\tif ((((usqInt) segOop)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t}\r\t\t}\r\t\tif (((longAt(segOop)) & TypeMask) == HeaderTypeFree) {\r\t\t\tsz = (longAt(segOop)) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader1 = longAt(segOop);\r\t\t\tif ((header1 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(segOop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tsz = header1 & (SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\tl1:\t/* end sizeBitsOf: */;\r\t\t}\r\t\tsegOop = (segOop + sz) + (foo->headerTypeBytes[(longAt(segOop + sz)) & TypeMask]);\r\t}\r\tsegOop = ((segmentWordArray + (BASE_HEADER_SIZE)) + (BYTES_PER_WORD)) + (foo->headerTypeBytes[(longAt((segmentWordArray + (BASE_HEADER_SIZE)) + (BYTES_PER_WORD))) & TypeMask]);\r\twhile (segOop <= endSeg) {\r\t\tif (!(oopHasAcceptableClass(segOop))) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\r\t\t/* first field */\r\r\t\tfieldPtr = segOop + (BASE_HEADER_SIZE);\r\r\t\t/* last field */\r\t\t/* Go through all oops, remapping them... */\r\r\t\tlastPtr = segOop + (lastPointerOf(segOop));\r\t\twhile (!(fieldPtr > lastPtr)) {\r\r\t\t\t/* Examine each pointer field */\r\r\t\t\tfieldOop = longAt(fieldPtr);\r\t\t\tif (!(oopHasAcceptableClass(fieldOop))) {\r\t\t\t\t/* begin primitiveFail */\r\t\t\t\tfoo->successFlag = 0;\r\t\t\t\treturn null;\r\t\t\t}\r\t\t\tfieldPtr += BYTES_PER_WORD;\r\t\t}\r\t\t/* begin objectAfter: */\r\t\tif (DoAssertionChecks) {\r\t\t\tif ((((usqInt) segOop)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t}\r\t\t}\r\t\tif (((longAt(segOop)) & TypeMask) == HeaderTypeFree) {\r\t\t\tsz1 = (longAt(segOop)) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader2 = longAt(segOop);\r\t\t\tif ((header2 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz1 = (longAt(segOop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l2;\r\t\t\t} else {\r\t\t\t\tsz1 = header2 & (SIZE_MASK);\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\tl2:\t/* end sizeBitsOf: */;\r\t\t}\r\t\tsegOop = (segOop + sz1) + (foo->headerTypeBytes[(longAt(segOop + sz1)) & TypeMask]);\r\t}\r\textraSize = foo->headerTypeBytes[(longAt(segmentWordArray)) & TypeMask];\r\thdrTypeBits = (longAt(segmentWordArray)) & TypeMask;\r\tif (extraSize == 8) {\r\t\tlongAtput(segmentWordArray - extraSize, ((BASE_HEADER_SIZE) + (BYTES_PER_WORD)) + hdrTypeBits);\r\t} else {\r\t\theader = longAt(segmentWordArray);\r\t\tlongAtput(segmentWordArray, ((header - (header & (SIZE_MASK))) + (BASE_HEADER_SIZE)) + (BYTES_PER_WORD));\r\t}\r\tif (DoAssertionChecks) {\r\t\tverifyCleanHeaders();\r\t}\r\t/* begin pop:thenPush: */\r\tlongAtput(sp = foo->stackPointer - ((3 - 1) * (BYTES_PER_WORD)), ((segmentWordArray + (BASE_HEADER_SIZE)) + (BYTES_PER_WORD)) + (foo->headerTypeBytes[(longAt((segmentWordArray + (BASE_HEADER_SIZE)) + (BYTES_PER_WORD))) & TypeMask]));\r\tfoo->stackPointer = sp;\r}\r\rsqInt primitiveLoadInstVar(void) {\rregister struct foo * foo = &fum;\r    sqInt thisReceiver;\r    sqInt top;\r    sqInt object;\r    sqInt sp;\r    sqInt fieldIndex;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tthisReceiver = top;\r\t/* begin push: */\r\t/* begin fetchPointer:ofObject: */\r\tfieldIndex = foo->primitiveIndex - 264;\r\tobject = longAt((thisReceiver + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)));\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tNatural log. */\r\rsqInt primitiveLogN(void) {\rregister struct foo * foo = &fum;\r    double  rcvr;\r\r\trcvr = popFloat();\r\tif (foo->successFlag) {\r\t\tpushFloat(log(rcvr));\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 1 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tRegister the low-space semaphore. If the argument is not a \r\tSemaphore, unregister the current low-space Semaphore. */\r\rsqInt primitiveLowSpaceSemaphore(void) {\rregister struct foo * foo = &fum;\r    sqInt arg;\r    sqInt top;\r    sqInt oop;\r    sqInt oop1;\r    sqInt valuePointer;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\targ = top;\r\tif ((fetchClassOf(arg)) == (fetchPointerofObject(ClassSemaphore, foo->specialObjectsOop))) {\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\toop = foo->specialObjectsOop;\r\t\tif ((((usqInt) oop)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(oop, arg);\r\t\t}\r\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + (TheLowSpaceSemaphore << (SHIFT_FOR_WORD)), arg);\r\t} else {\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tvaluePointer = foo->nilObj;\r\t\tif ((((usqInt) oop1)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(oop1, valuePointer);\r\t\t}\r\t\tlongAtput((oop1 + (BASE_HEADER_SIZE)) + (TheLowSpaceSemaphore << (SHIFT_FOR_WORD)), valuePointer);\r\t}\r}\r\rsqInt primitiveMakePoint(void) {\rregister struct foo * foo = &fum;\r    sqInt argument;\r    sqInt pt;\r    sqInt rcvr;\r    sqInt sp;\r    sqInt pointResult;\r    sqInt pointResult1;\r    sqInt valuePointer;\r    sqInt pointResult2;\r    sqInt valuePointer1;\r    sqInt valuePointer2;\r\r\targument = longAt(foo->stackPointer);\r\trcvr = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\tif ((rcvr & 1)) {\r\t\tif ((argument & 1)) {\r\t\t\t/* begin makePointwithxValue:yValue: */\r\t\t\tpointResult = instantiateSmallClasssizeInBytes(fetchPointerofObject(ClassPoint, foo->specialObjectsOop), 3 * (BYTES_PER_WORD));\r\t\t\tlongAtput((pointResult + (BASE_HEADER_SIZE)) + (XIndex << (SHIFT_FOR_WORD)), ((((rcvr >> 1)) << 1) | 1));\r\t\t\tlongAtput((pointResult + (BASE_HEADER_SIZE)) + (YIndex << (SHIFT_FOR_WORD)), ((((argument >> 1)) << 1) | 1));\r\t\t\tpt = pointResult;\r\t\t} else {\r\t\t\t/* begin makePointwithxValue:yValue: */\r\t\t\tpointResult1 = instantiateSmallClasssizeInBytes(fetchPointerofObject(ClassPoint, foo->specialObjectsOop), 3 * (BYTES_PER_WORD));\r\t\t\tlongAtput((pointResult1 + (BASE_HEADER_SIZE)) + (XIndex << (SHIFT_FOR_WORD)), ((((rcvr >> 1)) << 1) | 1));\r\t\t\tlongAtput((pointResult1 + (BASE_HEADER_SIZE)) + (YIndex << (SHIFT_FOR_WORD)), ((0 << 1) | 1));\r\t\t\tpt = pointResult1;\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tvaluePointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t\t\tif ((((usqInt) pt)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(pt, valuePointer);\r\t\t\t}\r\t\t\tlongAtput((pt + (BASE_HEADER_SIZE)) + (1 << (SHIFT_FOR_WORD)), valuePointer);\r\t\t}\r\t} else {\r\t\tif (!((fetchClassOf(rcvr)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop)))) {\r\t\t\t/* begin success: */\r\t\t\tfoo->successFlag = 0 && foo->successFlag;\r\t\t\treturn null;\r\t\t}\r\t\t/* begin makePointwithxValue:yValue: */\r\t\tpointResult2 = instantiateSmallClasssizeInBytes(fetchPointerofObject(ClassPoint, foo->specialObjectsOop), 3 * (BYTES_PER_WORD));\r\t\tlongAtput((pointResult2 + (BASE_HEADER_SIZE)) + (XIndex << (SHIFT_FOR_WORD)), ((0 << 1) | 1));\r\t\tlongAtput((pointResult2 + (BASE_HEADER_SIZE)) + (YIndex << (SHIFT_FOR_WORD)), ((0 << 1) | 1));\r\t\tpt = pointResult2;\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer1 = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t\tif ((((usqInt) pt)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(pt, valuePointer1);\r\t\t}\r\t\tlongAtput((pt + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)), valuePointer1);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer2 = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t\tif ((((usqInt) pt)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(pt, valuePointer2);\r\t\t}\r\t\tlongAtput((pt + (BASE_HEADER_SIZE)) + (1 << (SHIFT_FOR_WORD)), valuePointer2);\r\t}\r\t/* begin pop:thenPush: */\r\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), pt);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tPrimitive. Mark the method for exception handling. The primitive must fail after marking the context so that the regular code is run. */\r\rsqInt primitiveMarkHandlerMethod(void) {\r\t/* begin primitiveFail */\r\tfoo->successFlag = 0;\r\treturn null;\r}\r\r\r/*\tPrimitive. Mark the method for exception unwinding. The primitive must fail after marking the context so that the regular code is run. */\r\rsqInt primitiveMarkUnwindMethod(void) {\r\t/* begin primitiveFail */\r\tfoo->successFlag = 0;\r\treturn null;\r}\r\r\r/*\tReturn the method an external primitive was defined in */\r\rsqInt primitiveMethod(void) {\r\treturn foo->newMethod;\r}\r\r\r/*\tThis is a named (not numbered) primitive in the null module (ie the VM) */\r\rEXPORT(sqInt) primitiveMicrosecondClock(void) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r    sqInt sp;\r\r\t/* begin pop:thenPush: */\r\toop = positive64BitIntegerFor(ioMicroSecondClock());\r\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), oop);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tReturn the value of the millisecond clock as an integer. Note that the millisecond clock wraps around periodically. On some platforms it can wrap daily. The range is limited to SmallInteger maxVal / 2 to allow delays of up to that length without overflowing a SmallInteger. */\r\rsqInt primitiveMillisecondClock(void) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r    sqInt sp;\r\r\t/* begin pop:thenPush: */\r\toop = ((((ioMSecs()) & MillisecondClockMask) << 1) | 1);\r\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), oop);\r\tfoo->stackPointer = sp;\r}\r\rsqInt primitiveMod(void) {\rregister struct foo * foo = &fum;\r    sqInt mod;\r    sqInt sp;\r\r\tmod = doPrimitiveModby(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))), longAt(foo->stackPointer));\r\t/* begin pop2AndPushIntegerIfOK: */\r\tif (foo->successFlag) {\r\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t(((((int) mod)) ^ ((((int) mod)) << 1)) >= 0)\r# else\r\t\t\t((mod >= -1073741824) && (mod <= 1073741823))\r# endif  // SQ_HOST32\r\t\t) {\r\t\t\t/* begin pop:thenPush: */\r\t\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), ((mod << 1) | 1));\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\tfoo->successFlag = 0;\r\t\t}\r\t}\r}\r\r\r/*\tPrimitive arithmetic operations for large integers in 64 bit range */\r\rEXPORT(sqInt) primitiveModLargeIntegers(void) {\rregister struct foo * foo = &fum;\r    sqLong integerArg;\r    sqLong integerRcvr;\r    sqInt oopResult;\r    sqLong result;\r    sqInt sp;\r\r\tintegerArg = signed64BitValueOf(longAt(foo->stackPointer - (0 * (BYTES_PER_WORD))));\r\tintegerRcvr = signed64BitValueOf(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))));\r\tif (integerArg == 0) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t}\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\r\t/* ensure that the result has the same sign as the integerArg */\r\r\tresult = integerRcvr % integerArg;\r\tif (integerArg < 0) {\r\t\tif (result > 0) {\r\t\t\tresult += integerArg;\r\t\t}\r\t} else {\r\t\tif (result < 0) {\r\t\t\tresult += integerArg;\r\t\t}\r\t}\r\toopResult = signed64BitIntegerFor(result);\r\tif (foo->successFlag) {\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), oopResult);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\r\r/*\tObsolete on virtually all platforms; old style input polling code.\r\tReturn the mouse button state. The low three bits encode the state of the <red><yellow><blue> mouse buttons. The next four bits encode the Smalltalk modifier bits <cmd><option><ctrl><shift>. */\r\rsqInt primitiveMouseButtons(void) {\rregister struct foo * foo = &fum;\r    sqInt buttonWord;\r    sqInt sp;\r\r\t/* begin pop: */\r\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\tbuttonWord = ioGetButtonState();\r\t/* begin pushInteger: */\r\t/* begin push: */\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), ((buttonWord << 1) | 1));\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tObsolete on virtually all platforms; old style input polling code.\r\tReturn a Point indicating current position of the mouse. Note that mouse coordinates may be negative if the mouse moves above or to the left of the top-left corner of the Smalltalk window. */\r\rsqInt primitiveMousePoint(void) {\rregister struct foo * foo = &fum;\r    sqInt pointWord;\r    sqInt x;\r    sqInt y;\r    sqInt object;\r    sqInt sp;\r    sqInt pointResult;\r\r\t/* begin pop: */\r\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\tpointWord = ioMousePoint();\r\t/* begin signExtend16: */\r\tif ((((((usqInt) pointWord) >> 16) & 65535) & 32768) == 0) {\r\t\tx = (((usqInt) pointWord) >> 16) & 65535;\r\t\tgoto l1;\r\t} else {\r\t\tx = ((((usqInt) pointWord) >> 16) & 65535) - 65536;\r\t\tgoto l1;\r\t}\rl1:\t/* end signExtend16: */;\r\t/* begin signExtend16: */\r\tif (((pointWord & 65535) & 32768) == 0) {\r\t\ty = pointWord & 65535;\r\t\tgoto l2;\r\t} else {\r\t\ty = (pointWord & 65535) - 65536;\r\t\tgoto l2;\r\t}\rl2:\t/* end signExtend16: */;\r\t/* begin push: */\r\t/* begin makePointwithxValue:yValue: */\r\tpointResult = instantiateSmallClasssizeInBytes(fetchPointerofObject(ClassPoint, foo->specialObjectsOop), 3 * (BYTES_PER_WORD));\r\tlongAtput((pointResult + (BASE_HEADER_SIZE)) + (XIndex << (SHIFT_FOR_WORD)), ((x << 1) | 1));\r\tlongAtput((pointResult + (BASE_HEADER_SIZE)) + (YIndex << (SHIFT_FOR_WORD)), ((y << 1) | 1));\r\tobject = pointResult;\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\tfoo->stackPointer = sp;\r}\r\rsqInt primitiveMultiply(void) {\rregister struct foo * foo = &fum;\r    sqInt integerArg;\r    sqInt integerRcvr;\r    sqInt integerResult;\r    sqInt sp;\r    sqInt integerPointer;\r    sqInt integerPointer1;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tintegerRcvr = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tintegerRcvr = 0;\r\t\tgoto l1;\r\t}\r\tintegerRcvr = null;\rl1:\t/* end stackIntegerValue: */;\r\t/* begin stackIntegerValue: */\r\tintegerPointer1 = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer1 & 1)) {\r\t\tintegerArg = (integerPointer1 >> 1);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tintegerArg = 0;\r\t\tgoto l2;\r\t}\r\tintegerArg = null;\rl2:\t/* end stackIntegerValue: */;\r\tif (foo->successFlag) {\r\r\t\t/* check for C overflow by seeing if computation is reversible */\r\r\t\tintegerResult = integerRcvr * integerArg;\r\t\tif ((integerArg == 0) || ((integerResult / integerArg) == integerRcvr)) {\r\t\t\t/* begin pop2AndPushIntegerIfOK: */\r\t\t\tif (foo->successFlag) {\r\t\t\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t\t\t(((((int) integerResult)) ^ ((((int) integerResult)) << 1)) >= 0)\r# else\r\t\t\t\t\t((integerResult >= -1073741824) && (integerResult <= 1073741823))\r# endif  // SQ_HOST32\r\t\t\t\t) {\r\t\t\t\t\t/* begin pop:thenPush: */\r\t\t\t\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), ((integerResult << 1) | 1));\r\t\t\t\t\tfoo->stackPointer = sp;\r\t\t\t\t} else {\r\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t}\r\t\t\t}\r\t\t} else {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t}\r\t}\r}\r\r\r/*\tPrimitive arithmetic operations for large integers in 64 bit range */\r\rEXPORT(sqInt) primitiveMultiplyLargeIntegers(void) {\rregister struct foo * foo = &fum;\r    sqLong integerArg;\r    sqLong integerRcvr;\r    sqInt oopResult;\r    sqLong result;\r    sqInt sp;\r\r\tintegerArg = signed64BitValueOf(longAt(foo->stackPointer - (0 * (BYTES_PER_WORD))));\r\tintegerRcvr = signed64BitValueOf(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))));\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\r\t/* check for C overflow by seeing if computation is reversible */\r\r\tresult = integerRcvr * integerArg;\r\tif ((integerArg == 0) || ((result / integerArg) == integerRcvr)) {\r\t\toopResult = signed64BitIntegerFor(result);\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), oopResult);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\r\r/*\tAllocate a new fixed-size instance. Fail if the allocation would leave less than lowSpaceThreshold bytes free. May cause a GC */\r\rsqInt primitiveNew(void) {\rregister struct foo * foo = &fum;\r    sqInt class;\r    sqInt spaceOkay;\r    sqInt object;\r    sqInt sp;\r    sqInt format;\r    usqInt minFree;\r    usqInt minFree1;\r\r\r\t/* The following may cause GC! */\r\r\tclass = longAt(foo->stackPointer);\r\t/* begin sufficientSpaceToInstantiate:indexableSize: */\r\tformat = (((usqInt) ((longAt((class + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1)) >> 8) & 15;\r\tif ((0 > 0) && (format < 2)) {\r\t\tspaceOkay = 0;\r\t\tgoto l1;\r\t}\r\tif (format < 8) {\r\t\tif (isExcessiveAllocationRequestshift(0, SHIFT_FOR_WORD)) {\r\t\t\tspaceOkay = 0;\r\t\t\tgoto l1;\r\t\t}\r\t\t/* begin sufficientSpaceToAllocate: */\r\t\tminFree = (foo->lowSpaceThreshold + (2500 + (0 * (BYTES_PER_WORD)))) + (BASE_HEADER_SIZE);\r\t\tif (oopisGreaterThanOrEqualTo((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), minFree)) {\r\t\t\tspaceOkay = 1;\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\tspaceOkay = sufficientSpaceAfterGC(minFree);\r\t\t\tgoto l1;\r\t\t}\r\t\tspaceOkay = null;\r\t\tgoto l1;\r\t} else {\r\t\tif (isExcessiveAllocationRequestshift(0, 0)) {\r\t\t\tspaceOkay = 0;\r\t\t\tgoto l1;\r\t\t}\r\t\t/* begin sufficientSpaceToAllocate: */\r\t\tminFree1 = (foo->lowSpaceThreshold + (2500 + 0)) + (BASE_HEADER_SIZE);\r\t\tif (oopisGreaterThanOrEqualTo((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), minFree1)) {\r\t\t\tspaceOkay = 1;\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\tspaceOkay = sufficientSpaceAfterGC(minFree1);\r\t\t\tgoto l1;\r\t\t}\r\t\tspaceOkay = null;\r\t\tgoto l1;\r\t}\rl1:\t/* end sufficientSpaceToInstantiate:indexableSize: */;\r\t/* begin success: */\r\tfoo->successFlag = spaceOkay && foo->successFlag;\r\tif (foo->successFlag) {\r\t\t/* begin push: */\r\t\tobject = instantiateClassindexableSize(popStack(), 0);\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\rsqInt primitiveNewMethod(void) {\rregister struct foo * foo = &fum;\r    sqInt bytecodeCount;\r    sqInt class;\r    sqInt header;\r    sqInt i;\r    sqInt literalCount;\r    sqInt size;\r    sqInt theMethod;\r    sqInt valuePointer;\r    sqInt top;\r    sqInt integerPointer;\r    sqInt top1;\r    sqInt top2;\r    sqInt sp;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\theader = top;\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer = top1;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tbytecodeCount = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tbytecodeCount = 0;\r\t\tgoto l1;\r\t}\r\tbytecodeCount = null;\rl1:\t/* end popInteger */;\r\t/* begin success: */\r\tfoo->successFlag = ((header & 1)) && foo->successFlag;\r\tif (!(foo->successFlag)) {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t\treturn null;\r\t}\r\t/* begin popStack */\r\ttop2 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tclass = top2;\r\tsize = ((((((usqInt) header) >> 10) & 255) + 1) * (BYTES_PER_WORD)) + bytecodeCount;\r\ttheMethod = instantiateClassindexableSize(class, size);\r\tlongAtput((theMethod + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD)), header);\r\tliteralCount = (((usqInt) header) >> 10) & 255;\r\tfor (i = 1; i <= literalCount; i += 1) {\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer = foo->nilObj;\r\t\tif ((((usqInt) theMethod)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(theMethod, valuePointer);\r\t\t}\r\t\tlongAtput((theMethod + (BASE_HEADER_SIZE)) + (i << (SHIFT_FOR_WORD)), valuePointer);\r\t}\r\t/* begin push: */\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), theMethod);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tAllocate a new indexable instance. Fail if the allocation would leave less than lowSpaceThreshold bytes free. */\r\rsqInt primitiveNewWithArg(void) {\rregister struct foo * foo = &fum;\r    sqInt class;\r    usqInt size;\r    sqInt spaceOkay;\r    sqInt oop;\r    sqInt sp;\r    sqInt format;\r    usqInt minFree;\r    usqInt minFree1;\r\r\t\r# if (SQ_IMAGE64 && SQ_HOST64)  // permit large object allocation on 64 bit image and host\r\tsize = positive64BitValueOf(longAt(foo->stackPointer));\r# else\r\tsize = positive32BitValueOf(longAt(foo->stackPointer));\r# endif  // SQ_IMAGE64 && SQ_HOST64\r\t\r\tclass = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin success: */\r\tfoo->successFlag = (size >= 0) && foo->successFlag;\r\tif (foo->successFlag) {\r\t\t/* begin sufficientSpaceToInstantiate:indexableSize: */\r\t\tformat = (((usqInt) ((longAt((class + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1)) >> 8) & 15;\r\t\tif ((size > 0) && (format < 2)) {\r\t\t\tspaceOkay = 0;\r\t\t\tgoto l1;\r\t\t}\r\t\tif (format < 8) {\r\t\t\tif (isExcessiveAllocationRequestshift(size, SHIFT_FOR_WORD)) {\r\t\t\t\tspaceOkay = 0;\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t\t/* begin sufficientSpaceToAllocate: */\r\t\t\tminFree = (foo->lowSpaceThreshold + (2500 + (size * (BYTES_PER_WORD)))) + (BASE_HEADER_SIZE);\r\t\t\tif (oopisGreaterThanOrEqualTo((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), minFree)) {\r\t\t\t\tspaceOkay = 1;\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tspaceOkay = sufficientSpaceAfterGC(minFree);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t\tspaceOkay = null;\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\tif (isExcessiveAllocationRequestshift(size, 0)) {\r\t\t\t\tspaceOkay = 0;\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t\t/* begin sufficientSpaceToAllocate: */\r\t\t\tminFree1 = (foo->lowSpaceThreshold + (2500 + size)) + (BASE_HEADER_SIZE);\r\t\t\tif (oopisGreaterThanOrEqualTo((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), minFree1)) {\r\t\t\t\tspaceOkay = 1;\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tspaceOkay = sufficientSpaceAfterGC(minFree1);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t\tspaceOkay = null;\r\t\t\tgoto l1;\r\t\t}\r\tl1:\t/* end sufficientSpaceToInstantiate:indexableSize: */;\r\t\t/* begin success: */\r\t\tfoo->successFlag = spaceOkay && foo->successFlag;\r\t\tclass = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin pop:thenPush: */\r\t\toop = instantiateClassindexableSize(class, size);\r\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), oop);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\rsqInt primitiveNextInstance(void) {\rregister struct foo * foo = &fum;\r    sqInt instance;\r    sqInt object;\r    sqInt sp;\r    sqInt classPointer;\r    sqInt thisClass;\r    sqInt thisObj;\r    sqInt ccIndex;\r    sqInt ccIndex1;\r    sqInt oop;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r    sqInt oop4;\r    sqInt oop5;\r\r\tobject = longAt(foo->stackPointer);\r\t/* begin instanceAfter: */\r\t/* begin fetchClassOf: */\r\tif ((object & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop = foo->specialObjectsOop;\r\t\tclassPointer = longAt((oop + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l2;\r\t}\r\tccIndex1 = (((usqInt) (longAt(object))) >> 12) & 31;\r\tif (ccIndex1 == 0) {\r\t\tclassPointer = (longAt(object - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop4 = foo->specialObjectsOop;\r\t\toop1 = longAt((oop4 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tclassPointer = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex1 - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l2;\r\t}\rl2:\t/* end fetchClassOf: */;\r\tthisObj = accessibleObjectAfter(object);\r\twhile (!(thisObj == null)) {\r\t\t/* begin fetchClassOf: */\r\t\tif ((thisObj & 1)) {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop2 = foo->specialObjectsOop;\r\t\t\tthisClass = longAt((oop2 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\t\tgoto l1;\r\t\t}\r\t\tccIndex = (((usqInt) (longAt(thisObj))) >> 12) & 31;\r\t\tif (ccIndex == 0) {\r\t\t\tthisClass = (longAt(thisObj - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop5 = foo->specialObjectsOop;\r\t\t\toop3 = longAt((oop5 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\t\tthisClass = longAt((oop3 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\t\tgoto l1;\r\t\t}\r\tl1:\t/* end fetchClassOf: */;\r\t\tif (thisClass == classPointer) {\r\t\t\tinstance = thisObj;\r\t\t\tgoto l3;\r\t\t}\r\t\tthisObj = accessibleObjectAfter(thisObj);\r\t}\r\tinstance = foo->nilObj;\rl3:\t/* end instanceAfter: */;\r\tif (instance == foo->nilObj) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t} else {\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp = foo->stackPointer - (((foo->argumentCount + 1) - 1) * (BYTES_PER_WORD)), instance);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\r\r/*\tReturn the object following the receiver in the heap. Return the SmallInteger zero when there are no more objects. */\r\rsqInt primitiveNextObject(void) {\rregister struct foo * foo = &fum;\r    sqInt instance;\r    sqInt object;\r    sqInt sp;\r    sqInt sp1;\r\r\tobject = longAt(foo->stackPointer);\r\tinstance = accessibleObjectAfter(object);\r\tif (instance == null) {\r\t\t/* begin pop:thenPushInteger: */\r\t\tlongAtput(sp = foo->stackPointer - (((foo->argumentCount + 1) - 1) * (BYTES_PER_WORD)), ((0 << 1) | 1));\r\t\tfoo->stackPointer = sp;\r\t} else {\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp1 = foo->stackPointer - (((foo->argumentCount + 1) - 1) * (BYTES_PER_WORD)), instance);\r\t\tfoo->stackPointer = sp1;\r\t}\r}\r\r\r/*\tA placeholder for primitives that haven't been implemented or are being withdrawn gradually. Just absorbs any arguments and returns the receiver. */\r\rsqInt primitiveNoop(void) {\rregister struct foo * foo = &fum;\r\t/* begin pop: */\r\tfoo->stackPointer -= foo->argumentCount * (BYTES_PER_WORD);\r}\r\rsqInt primitiveNotEqual(void) {\rregister struct foo * foo = &fum;\r    sqInt integerArgument;\r    sqInt integerReceiver;\r    sqInt result;\r    sqInt top;\r    sqInt top1;\r    sqInt sp;\r    sqInt sp1;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerArgument = top;\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerReceiver = top1;\r\tresult = !(compare31or32Bitsequal(integerReceiver, integerArgument));\r\t/* begin checkBooleanResult: */\r\tif (foo->successFlag) {\r\t\t/* begin pushBool: */\r\t\tif (result) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tPrimitive comparison operations for large integers in 64 bit range */\r\rEXPORT(sqInt) primitiveNotEqualLargeIntegers(void) {\rregister struct foo * foo = &fum;\r    sqLong integerArg;\r    sqLong integerRcvr;\r    sqInt sp;\r    sqInt sp1;\r\r\tintegerArg = signed64BitValueOf(longAt(foo->stackPointer - (0 * (BYTES_PER_WORD))));\r\tintegerRcvr = signed64BitValueOf(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))));\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\t/* begin pushBool: */\r\t\tif (integerRcvr != integerArg) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t}\r}\r\r\r/*\tDefined for CompiledMethods only */\r\rsqInt primitiveObjectAt(void) {\rregister struct foo * foo = &fum;\r    sqInt index;\r    sqInt thisReceiver;\r    sqInt object;\r    sqInt sp;\r    sqInt top;\r    sqInt successValue;\r    sqInt integerPointer;\r    sqInt top1;\r\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer = top1;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tindex = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tindex = 0;\r\t\tgoto l1;\r\t}\r\tindex = null;\rl1:\t/* end popInteger */;\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tthisReceiver = top;\r\t/* begin success: */\r\tfoo->successFlag = (index > 0) && foo->successFlag;\r\t/* begin success: */\r\tsuccessValue = index <= ((literalCountOfHeader(longAt((thisReceiver + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD))))) + LiteralStart);\r\tfoo->successFlag = successValue && foo->successFlag;\r\tif (foo->successFlag) {\r\t\t/* begin push: */\r\t\tobject = longAt((thisReceiver + (BASE_HEADER_SIZE)) + ((index - 1) << (SHIFT_FOR_WORD)));\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\t\tfoo->stackPointer = sp;\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tDefined for CompiledMethods only */\r\rsqInt primitiveObjectAtPut(void) {\rregister struct foo * foo = &fum;\r    sqInt index;\r    sqInt newValue;\r    sqInt thisReceiver;\r    sqInt sp;\r    sqInt top;\r    sqInt top1;\r    sqInt successValue;\r    sqInt integerPointer;\r    sqInt top2;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tnewValue = top;\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop2 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer = top2;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tindex = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tindex = 0;\r\t\tgoto l1;\r\t}\r\tindex = null;\rl1:\t/* end popInteger */;\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tthisReceiver = top1;\r\t/* begin success: */\r\tfoo->successFlag = (index > 0) && foo->successFlag;\r\t/* begin success: */\r\tsuccessValue = index <= ((literalCountOfHeader(longAt((thisReceiver + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD))))) + LiteralStart);\r\tfoo->successFlag = successValue && foo->successFlag;\r\tif (foo->successFlag) {\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tif ((((usqInt) thisReceiver)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(thisReceiver, newValue);\r\t\t}\r\t\tlongAtput((thisReceiver + (BASE_HEADER_SIZE)) + ((index - 1) << (SHIFT_FOR_WORD)), newValue);\r\t\t/* begin push: */\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), newValue);\r\t\tfoo->stackPointer = sp;\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 3 * (BYTES_PER_WORD);\r\t}\r}\r\rsqInt primitiveObjectPointsTo(void) {\rregister struct foo * foo = &fum;\r    sqInt i;\r    sqInt lastField;\r    sqInt rcvr;\r    sqInt thang;\r    sqInt top;\r    sqInt top1;\r    sqInt sp;\r    sqInt sp1;\r    sqInt sp2;\r    sqInt sp3;\r    sqInt sp4;\r    sqInt sp5;\r    sqInt contextSize;\r    sqInt fmt;\r    sqInt header;\r    sqInt methodHeader;\r    sqInt sz;\r    sqInt sp6;\r    sqInt header1;\r    sqInt type;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tthang = top;\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\trcvr = top1;\r\tif ((rcvr & 1)) {\r\t\t/* begin pushBool: */\r\t\tif (0) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t\treturn null;\r\t}\r\t/* begin lastPointerOf: */\r\theader = longAt(rcvr);\r\tfmt = (((usqInt) header) >> 8) & 15;\r\tif (fmt <= 4) {\r\t\tif ((fmt == 3) && ((((((usqInt) header) >> 12) & 31) == 13) || ((((((usqInt) header) >> 12) & 31) == 14) || (((((usqInt) header) >> 12) & 31) == 4)))) {\r\t\t\t/* begin fetchStackPointerOf: */\r\t\t\tsp6 = longAt((rcvr + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)));\r\t\t\tif (!((sp6 & 1))) {\r\t\t\t\tcontextSize = 0;\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\t\tcontextSize = (sp6 >> 1);\r\t\tl1:\t/* end fetchStackPointerOf: */;\r\t\t\tlastField = (CtxtTempFrameStart + contextSize) * (BYTES_PER_WORD);\r\t\t\tgoto l2;\r\t\t}\r\t\t/* begin sizeBitsOfSafe: */\r\t\theader1 = longAt(rcvr);\r\t\t/* begin rightType: */\r\t\tif ((header1 & (SIZE_MASK)) == 0) {\r\t\t\ttype = HeaderTypeSizeAndClass;\r\t\t\tgoto l3;\r\t\t} else {\r\t\t\tif ((header1 & CompactClassMask) == 0) {\r\t\t\t\ttype = HeaderTypeClass;\r\t\t\t\tgoto l3;\r\t\t\t} else {\r\t\t\t\ttype = HeaderTypeShort;\r\t\t\t\tgoto l3;\r\t\t\t}\r\t\t}\r\tl3:\t/* end rightType: */;\r\t\tif (type == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(rcvr - ((BYTES_PER_WORD) * 2))) & (ALL_BUT_TYPE_MASK);\r\t\t\tgoto l4;\r\t\t} else {\r\t\t\tsz = header1 & (SIZE_MASK);\r\t\t\tgoto l4;\r\t\t}\r\tl4:\t/* end sizeBitsOfSafe: */;\r\t\tlastField = sz - (BASE_HEADER_SIZE);\r\t\tgoto l2;\r\t}\r\tif (fmt < 12) {\r\t\tlastField = 0;\r\t\tgoto l2;\r\t}\r\tmethodHeader = longAt(rcvr + (BASE_HEADER_SIZE));\r\tlastField = (((((usqInt) methodHeader) >> 10) & 255) * (BYTES_PER_WORD)) + (BASE_HEADER_SIZE);\rl2:\t/* end lastPointerOf: */;\r\tfor (i = (BASE_HEADER_SIZE); i <= lastField; i += (BYTES_PER_WORD)) {\r\t\tif ((longAt(rcvr + i)) == thang) {\r\t\t\t/* begin pushBool: */\r\t\t\tif (1) {\r\t\t\t\t/* begin push: */\r\t\t\t\tlongAtput(sp2 = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\t\tfoo->stackPointer = sp2;\r\t\t\t} else {\r\t\t\t\t/* begin push: */\r\t\t\t\tlongAtput(sp3 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\t\tfoo->stackPointer = sp3;\r\t\t\t}\r\t\t\treturn null;\r\t\t}\r\t}\r\t/* begin pushBool: */\r\tif (0) {\r\t\t/* begin push: */\r\t\tlongAtput(sp4 = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\tfoo->stackPointer = sp4;\r\t} else {\r\t\t/* begin push: */\r\t\tlongAtput(sp5 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\tfoo->stackPointer = sp5;\r\t}\r}\r\rsqInt primitivePerform(void) {\rregister struct foo * foo = &fum;\r    sqInt i;\r    sqInt lookupClass;\r    sqInt newReceiver;\r    sqInt performMethod;\r    sqInt performSelector;\r    sqInt selectorIndex;\r    sqInt successValue;\r    sqInt fieldIndex;\r    sqInt oop;\r    sqInt valuePointer;\r    sqInt oop1;\r    sqInt valuePointer1;\r    sqInt count;\r    sqInt fromOop;\r    sqInt toOop;\r    sqInt fromIndex;\r    sqInt lastFrom;\r    sqInt toIndex;\r    sqInt ccIndex;\r    sqInt oop11;\r    sqInt oop2;\r    sqInt oop3;\r    sqInt fieldIndex1;\r    sqInt oop4;\r\r\tperformSelector = foo->messageSelector;\r\tperformMethod = foo->newMethod;\r\tfoo->messageSelector = longAt(foo->stackPointer - ((foo->argumentCount - 1) * (BYTES_PER_WORD)));\r\r\t/* NOTE: the following lookup may fail and be converted to #doesNotUnderstand:, so we must adjust argumentCount and slide args now, so that would work. */\r\t/* Slide arguments down over selector */\r\r\tnewReceiver = longAt(foo->stackPointer - (foo->argumentCount * (BYTES_PER_WORD)));\r\tfoo->argumentCount -= 1;\r\tselectorIndex = (((usqInt) ((foo->stackPointer - foo->activeContext) - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD)) - foo->argumentCount;\r\t/* begin transfer:fromIndex:ofObject:toIndex:ofObject: */\r\tcount = foo->argumentCount;\r\tfromOop = foo->activeContext;\r\ttoOop = foo->activeContext;\r\tflag(\"Dan\");\r\tfromIndex = fromOop + ((selectorIndex + 1) * (BYTES_PER_WORD));\r\ttoIndex = toOop + (selectorIndex * (BYTES_PER_WORD));\r\tlastFrom = fromIndex + (count * (BYTES_PER_WORD));\r\twhile ((((usqInt) fromIndex)) < (((usqInt) lastFrom))) {\r\t\tfromIndex += BYTES_PER_WORD;\r\t\ttoIndex += BYTES_PER_WORD;\r\t\tlongAtput(toIndex, longAt(fromIndex));\r\t}\r\t/* begin pop: */\r\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t/* begin fetchClassOf: */\r\tif ((newReceiver & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop11 = foo->specialObjectsOop;\r\t\tlookupClass = longAt((oop11 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(newReceiver))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tlookupClass = (longAt(newReceiver - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tlookupClass = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\rl1:\t/* end fetchClassOf: */;\r\tfindNewMethodInClass(lookupClass);\r\tif (((foo->newMethod & 1) == 0) && (((((usqInt) (longAt(foo->newMethod))) >> 8) & 15) >= 12)) {\r\t\t/* begin success: */\r\t\tsuccessValue = (argumentCountOf(foo->newMethod)) == foo->argumentCount;\r\t\tfoo->successFlag = successValue && foo->successFlag;\r\t}\r\tif (foo->successFlag) {\r\t\texecuteNewMethodFromCache();\r\t\tfoo->successFlag = 1;\r\t} else {\r\t\tfor (i = 1; i <= foo->argumentCount; i += 1) {\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tfieldIndex = ((foo->argumentCount - i) + 1) + selectorIndex;\r\t\t\toop = foo->activeContext;\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\tfieldIndex1 = (foo->argumentCount - i) + selectorIndex;\r\t\t\toop4 = foo->activeContext;\r\t\t\tvaluePointer = longAt((oop4 + (BASE_HEADER_SIZE)) + (fieldIndex1 << (SHIFT_FOR_WORD)));\r\t\t\tif ((((usqInt) oop)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(oop, valuePointer);\r\t\t\t}\r\t\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t}\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 1 * (BYTES_PER_WORD);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\toop1 = foo->activeContext;\r\t\tvaluePointer1 = foo->messageSelector;\r\t\tif ((((usqInt) oop1)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(oop1, valuePointer1);\r\t\t}\r\t\tlongAtput((oop1 + (BASE_HEADER_SIZE)) + (selectorIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\t\tfoo->argumentCount += 1;\r\t\tfoo->newMethod = performMethod;\r\t\tfoo->messageSelector = performSelector;\r\t}\r}\r\r\r/*\tCommon routine used by perform:withArgs: and perform:withArgs:inSuperclass: */\r/*\tNOTE:  The case of doesNotUnderstand: is not a failure to perform.\r\tThe only failures are arg types and consistency of argumentCount. */\r\rsqInt primitivePerformAt(sqInt lookupClass) {\rregister struct foo * foo = &fum;\r    sqInt argumentArray;\r    sqInt arraySize;\r    sqInt cntxSize;\r    sqInt index;\r    sqInt performArgCount;\r    sqInt performMethod;\r    sqInt performSelector;\r    sqInt sz;\r    sqInt header;\r    sqInt objectPointer;\r    sqInt sz1;\r    sqInt header1;\r    sqInt successValue;\r    sqInt object;\r    sqInt sp;\r    sqInt successValue1;\r    sqInt sp1;\r    sqInt sp2;\r    sqInt top;\r    sqInt top1;\r\r\targumentArray = longAt(foo->stackPointer);\r\tif (!(((argumentArray & 1) == 0) && (((((usqInt) (longAt(argumentArray))) >> 8) & 15) == 2))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin fetchWordLengthOf: */\r\t\t/* begin sizeBitsOf: */\r\t\theader = longAt(argumentArray);\r\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(argumentArray - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\tsz = header & (SIZE_MASK);\r\t\t\tgoto l1;\r\t\t}\r\tl1:\t/* end sizeBitsOf: */;\r\t\tarraySize = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\t/* begin fetchWordLengthOf: */\r\t\tobjectPointer = foo->activeContext;\r\t\t/* begin sizeBitsOf: */\r\t\theader1 = longAt(objectPointer);\r\t\tif ((header1 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\tsz1 = (longAt(objectPointer - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\tgoto l2;\r\t\t} else {\r\t\t\tsz1 = header1 & (SIZE_MASK);\r\t\t\tgoto l2;\r\t\t}\r\tl2:\t/* end sizeBitsOf: */;\r\t\tcntxSize = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\t/* begin success: */\r\t\tsuccessValue = ((((usqInt) ((foo->stackPointer - foo->activeContext) - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD)) + arraySize) < cntxSize;\r\t\tfoo->successFlag = successValue && foo->successFlag;\r\t}\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\tperformSelector = foo->messageSelector;\r\tperformMethod = foo->newMethod;\r\r\t/* pop the arg array and the selector, then push the args out of the array, as if they were on the stack */\r\r\tperformArgCount = foo->argumentCount;\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tfoo->messageSelector = top1;\r\tindex = 1;\r\twhile (index <= arraySize) {\r\t\t/* begin push: */\r\t\tobject = longAt((argumentArray + (BASE_HEADER_SIZE)) + ((index - 1) << (SHIFT_FOR_WORD)));\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\t\tfoo->stackPointer = sp;\r\t\tindex += 1;\r\t}\r\tfoo->argumentCount = arraySize;\r\tfindNewMethodInClass(lookupClass);\r\tif (((foo->newMethod & 1) == 0) && (((((usqInt) (longAt(foo->newMethod))) >> 8) & 15) >= 12)) {\r\t\t/* begin success: */\r\t\tsuccessValue1 = (argumentCountOf(foo->newMethod)) == foo->argumentCount;\r\t\tfoo->successFlag = successValue1 && foo->successFlag;\r\t}\r\tif (foo->successFlag) {\r\t\texecuteNewMethodFromCache();\r\t\tfoo->successFlag = 1;\r\t} else {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= foo->argumentCount * (BYTES_PER_WORD);\r\t\t/* begin push: */\r\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->messageSelector);\r\t\tfoo->stackPointer = sp1;\r\t\t/* begin push: */\r\t\tlongAtput(sp2 = foo->stackPointer + (BYTES_PER_WORD), argumentArray);\r\t\tfoo->stackPointer = sp2;\r\t\tfoo->messageSelector = performSelector;\r\t\tfoo->newMethod = performMethod;\r\t\tfoo->argumentCount = performArgCount;\r\t}\r}\r\rsqInt primitivePerformInSuperclass(void) {\rregister struct foo * foo = &fum;\r    sqInt currentClass;\r    sqInt lookupClass;\r    sqInt rcvr;\r    sqInt sp;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt top;\r    sqInt oop;\r\r\tlookupClass = longAt(foo->stackPointer);\r\trcvr = longAt(foo->stackPointer - (foo->argumentCount * (BYTES_PER_WORD)));\r\t/* begin fetchClassOf: */\r\tif ((rcvr & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tcurrentClass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tcurrentClass = (longAt(rcvr - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop = foo->specialObjectsOop;\r\t\toop2 = longAt((oop + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tcurrentClass = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\rl1:\t/* end fetchClassOf: */;\r\twhile (currentClass != lookupClass) {\r\t\tcurrentClass = longAt((currentClass + (BASE_HEADER_SIZE)) + (SuperclassIndex << (SHIFT_FOR_WORD)));\r\t\tif (currentClass == foo->nilObj) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t}\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tprimitivePerformAt(lookupClass);\r\tif (!(foo->successFlag)) {\r\t\t/* begin push: */\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), lookupClass);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\rsqInt primitivePerformWithArgs(void) {\rregister struct foo * foo = &fum;\r    sqInt lookupClass;\r    sqInt rcvr;\r    sqInt ccIndex;\r    sqInt oop;\r    sqInt oop1;\r    sqInt oop2;\r\r\trcvr = longAt(foo->stackPointer - (foo->argumentCount * (BYTES_PER_WORD)));\r\t/* begin fetchClassOf: */\r\tif ((rcvr & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop = foo->specialObjectsOop;\r\t\tlookupClass = longAt((oop + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tlookupClass = (longAt(rcvr - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop2 = foo->specialObjectsOop;\r\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tlookupClass = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\rl1:\t/* end fetchClassOf: */;\r\tprimitivePerformAt(lookupClass);\r}\r\r\r/*\tAnswer a string corresponding to the version of the external platform source\r\tcode, typically written in C and managed separately for each platform.\r\tThis is a named (not numbered) primitive in the null module (ie the VM) */\r\rEXPORT(sqInt) primitivePlatformSourceVersion(void) {\rregister struct foo * foo = &fum;\r    sqInt len;\r    void * p;\r    sqInt versionString;\r    sqInt sp;\r\r\t\r# ifdef PLATFORM_SOURCE_VERSION  // version level of platform support code\r\tlen = strlen(PLATFORM_SOURCE_VERSION);\r\tversionString = instantiateClassindexableSize(fetchPointerofObject(ClassString, foo->specialObjectsOop), len);\r\t/* begin arrayValueOf: */\r\tif ((!((versionString & 1))) && (((versionString & 1) == 0) && (isWordsOrBytesNonInt(versionString)))) {\r\t\tp = pointerForOop(versionString + (BASE_HEADER_SIZE));\r\t\tgoto l1;\r\t}\r\t/* begin primitiveFail */\r\tfoo->successFlag = 0;\rl1:\t/* end arrayValueOf: */;\r\tstrncpy(p, PLATFORM_SOURCE_VERSION, len);\r# else\r\t/* begin primitiveFail */\r\tfoo->successFlag = 0;\r\treturn null;\r# endif  // PLATFORM_SOURCE_VERSION\r\t\r\t/* begin pop:thenPush: */\r\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), versionString);\r\tfoo->stackPointer = sp;\r}\r\rsqInt primitivePushFalse(void) {\rregister struct foo * foo = &fum;\r    sqInt top;\r    sqInt sp;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\t/* begin push: */\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\tfoo->stackPointer = sp;\r}\r\rsqInt primitivePushMinusOne(void) {\rregister struct foo * foo = &fum;\r    sqInt top;\r    sqInt sp;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\t/* begin push: */\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), ConstMinusOne);\r\tfoo->stackPointer = sp;\r}\r\rsqInt primitivePushNil(void) {\rregister struct foo * foo = &fum;\r    sqInt top;\r    sqInt sp;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\t/* begin push: */\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->nilObj);\r\tfoo->stackPointer = sp;\r}\r\rsqInt primitivePushOne(void) {\rregister struct foo * foo = &fum;\r    sqInt top;\r    sqInt sp;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\t/* begin push: */\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), ConstOne);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\t\tno-op, really...\r\tthisReceiver := self popStack.\r\tself push: thisReceiver\r */\r\rsqInt primitivePushSelf(void) {\r}\r\rsqInt primitivePushTrue(void) {\rregister struct foo * foo = &fum;\r    sqInt top;\r    sqInt sp;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\t/* begin push: */\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\tfoo->stackPointer = sp;\r}\r\rsqInt primitivePushTwo(void) {\rregister struct foo * foo = &fum;\r    sqInt top;\r    sqInt sp;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\t/* begin push: */\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), ConstTwo);\r\tfoo->stackPointer = sp;\r}\r\rsqInt primitivePushZero(void) {\rregister struct foo * foo = &fum;\r    sqInt top;\r    sqInt sp;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\t/* begin push: */\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), ConstZero);\r\tfoo->stackPointer = sp;\r}\r\rsqInt primitiveQuit(void) {\r\tioExit();\r}\r\r\r/*\tRounds negative results towards zero. */\r\rsqInt primitiveQuo(void) {\rregister struct foo * foo = &fum;\r    sqInt integerArg;\r    sqInt integerRcvr;\r    sqInt integerResult;\r    sqInt sp;\r    sqInt integerPointer;\r    sqInt integerPointer1;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tintegerRcvr = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tintegerRcvr = 0;\r\t\tgoto l1;\r\t}\r\tintegerRcvr = null;\rl1:\t/* end stackIntegerValue: */;\r\t/* begin stackIntegerValue: */\r\tintegerPointer1 = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer1 & 1)) {\r\t\tintegerArg = (integerPointer1 >> 1);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tintegerArg = 0;\r\t\tgoto l2;\r\t}\r\tintegerArg = null;\rl2:\t/* end stackIntegerValue: */;\r\t/* begin success: */\r\tfoo->successFlag = (integerArg != 0) && foo->successFlag;\r\tif (foo->successFlag) {\r\t\tif (integerRcvr > 0) {\r\t\t\tif (integerArg > 0) {\r\t\t\t\tintegerResult = integerRcvr / integerArg;\r\t\t\t} else {\r\t\t\t\tintegerResult = 0 - (integerRcvr / (0 - integerArg));\r\t\t\t}\r\t\t} else {\r\t\t\tif (integerArg > 0) {\r\t\t\t\tintegerResult = 0 - ((0 - integerRcvr) / integerArg);\r\t\t\t} else {\r\t\t\t\tintegerResult = (0 - integerRcvr) / (0 - integerArg);\r\t\t\t}\r\t\t}\r\t}\r\t/* begin pop2AndPushIntegerIfOK: */\r\tif (foo->successFlag) {\r\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t(((((int) integerResult)) ^ ((((int) integerResult)) << 1)) >= 0)\r# else\r\t\t\t((integerResult >= -1073741824) && (integerResult <= 1073741823))\r# endif  // SQ_HOST32\r\t\t) {\r\t\t\t/* begin pop:thenPush: */\r\t\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), ((integerResult << 1) | 1));\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\tfoo->successFlag = 0;\r\t\t}\r\t}\r}\r\r\r/*\tPrimitive arithmetic operations for large integers in 64 bit range */\r\rEXPORT(sqInt) primitiveQuoLargeIntegers(void) {\rregister struct foo * foo = &fum;\r    sqLong integerArg;\r    sqLong integerRcvr;\r    sqInt oopResult;\r    sqLong result;\r    sqInt sp;\r\r\tintegerArg = signed64BitValueOf(longAt(foo->stackPointer - (0 * (BYTES_PER_WORD))));\r\tintegerRcvr = signed64BitValueOf(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))));\r\tif (integerArg == 0) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t}\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\tif (integerRcvr > 0) {\r\t\tif (integerArg > 0) {\r\t\t\tresult = integerRcvr / integerArg;\r\t\t} else {\r\t\t\tresult = 0 - (integerRcvr / (0 - integerArg));\r\t\t}\r\t} else {\r\t\tif (integerArg > 0) {\r\t\t\tresult = 0 - ((0 - integerRcvr) / integerArg);\r\t\t} else {\r\t\t\tresult = (0 - integerRcvr) / (0 - integerArg);\r\t\t}\r\t}\r\toopResult = signed64BitIntegerFor(result);\r\tif (foo->successFlag) {\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), oopResult);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\r\r/*\tRelinquish the processor for up to the given number of microseconds. The exact behavior of this primitive is platform dependent. */\r\rsqInt primitiveRelinquishProcessor(void) {\rregister struct foo * foo = &fum;\r    sqInt microSecs;\r    sqInt integerPointer;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tmicroSecs = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tmicroSecs = 0;\r\t\tgoto l1;\r\t}\r\tmicroSecs = null;\rl1:\t/* end stackIntegerValue: */;\r\tif (foo->successFlag) {\r\t\tioRelinquishProcessorForMicroseconds(microSecs);\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tNB: tpr removed the timer checks here and moved them to the primitiveExternalCall method.\r\tWe make the possibly unwarranted assumption that numbered prims are quick and external prims are slow. */\r\rsqInt primitiveResponse(void) {\rregister struct foo * foo = &fum;\r    sqInt delta;\r    sqInt nArgs;\r    sqInt primIdx;\r\r\tif (DoBalanceChecks) {\r\r\t\t/* check stack balance */\r\r\t\tnArgs = foo->argumentCount;\r\t\tdelta = foo->stackPointer - foo->activeContext;\r\t}\r\tprimIdx = foo->primitiveIndex;\r\r\t/* self dispatchOn: primitiveIndex in: primitiveTable. */\r\r\tfoo->successFlag = 1;\r\tdispatchFunctionPointerOnin(primIdx, primitiveTable);\r\tif (DoBalanceChecks) {\r\t\tif (!(balancedStackafterPrimitivewithArgs(delta, primIdx, nArgs))) {\r\t\t\tprintUnbalancedStack(primIdx);\r\t\t}\r\t}\r\r\t/* clear out primIndex so VM knows we're no longer in primitive */\r\r\tfoo->primitiveIndex = 0;\r\treturn foo->successFlag;\r}\r\r\r/*\tput this process on the scheduler's lists thus allowing it to proceed next time there is a chance for processes of it's priority level */\r\rsqInt primitiveResume(void) {\rregister struct foo * foo = &fum;\r    sqInt proc;\r\r\r\t/* rcvr */\r\t/* self success: ((self fetchClassOf: proc) = (self splObj: ClassProcess)). */\r\r\tproc = longAt(foo->stackPointer);\r\tif (foo->successFlag) {\r\t\tresume(proc);\r\t}\r}\r\r\r/*\tPrimitive. Answer a copy (snapshot) element of the root table.\r\tThe primitive can cause GC itself and if so the return value may\r\tbe inaccurate - in this case one should guard the read operation\r\tby looking at the gc counter statistics. */\r\rEXPORT(sqInt) primitiveRootTable(void) {\rregister struct foo * foo = &fum;\r    sqInt i;\r    sqInt oop;\r    sqInt sz;\r    sqInt sp;\r    sqInt valuePointer;\r\r\tsz = foo->rootTableCount;\r\r\t/* can cause GC */\r\r\toop = instantiateClassindexableSize(fetchPointerofObject(ClassArray, foo->specialObjectsOop), sz);\r\tif (sz > foo->rootTableCount) {\r\t\tsz = foo->rootTableCount;\r\t}\r\tfor (i = 1; i <= sz; i += 1) {\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer = foo->rootTable[i];\r\t\tif ((((usqInt) oop)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(oop, valuePointer);\r\t\t}\r\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + ((i - 1) << (SHIFT_FOR_WORD)), valuePointer);\r\t}\r\t/* begin pop: */\r\tfoo->stackPointer -= (foo->argumentCount + 1) * (BYTES_PER_WORD);\r\t/* begin push: */\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), oop);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tPrimitive. Answer the nth element of the root table.\r\tThis primitive avoids the creation of an extra array;\r\tit is intended for enumerations of the form:\r\t\tindex := 1.\r\t\t[root := Smalltalk rootTableAt: index.\r\t\troot == nil] whileFalse:[index := index + 1].\r\t */\r\rEXPORT(sqInt) primitiveRootTableAt(void) {\rregister struct foo * foo = &fum;\r    sqInt index;\r    sqInt sp;\r    sqInt successValue;\r    sqInt integerPointer;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tindex = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tindex = 0;\r\t\tgoto l1;\r\t}\r\tindex = null;\rl1:\t/* end stackIntegerValue: */;\r\t/* begin success: */\r\tsuccessValue = (index > 0) && (index <= foo->rootTableCount);\r\tfoo->successFlag = successValue && foo->successFlag;\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= (foo->argumentCount + 1) * (BYTES_PER_WORD);\r\t\t/* begin push: */\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->rootTable[index]);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\r\r/*\tThe character scanner primitive. */\r\rsqInt primitiveScanCharacters(void) {\rregister struct foo * foo = &fum;\r    sqInt ascii;\r    sqInt glyphIndex;\r    sqInt kernDelta;\r    sqInt maxGlyph;\r    sqInt nextDestX;\r    sqInt nilOop;\r    sqInt rcvr;\r    sqInt scanDestX;\r    sqInt scanLastIndex;\r    sqInt scanMap;\r    sqInt scanRightX;\r    sqInt scanStartIndex;\r    sqInt scanStopIndex;\r    sqInt scanXTable;\r    sqInt sourceString;\r    sqInt sourceX;\r    sqInt sourceX2;\r    sqInt stopReason;\r    sqInt stops;\r    sqInt sp;\r    sqInt object;\r    sqInt sp1;\r    sqInt object1;\r    sqInt sp2;\r    sqInt oop;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt integerPointer;\r    sqInt integerPointer1;\r    sqInt integerPointer2;\r    sqInt integerPointer3;\r\r\tif (!(foo->argumentCount == 6)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tkernDelta = (integerPointer >> 1);\r\t\tgoto l4;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tkernDelta = 0;\r\t\tgoto l4;\r\t}\r\tkernDelta = null;\rl4:\t/* end stackIntegerValue: */;\r\t/* begin stackObjectValue: */\r\toop = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\tif ((oop & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tstops = null;\r\t\tgoto l1;\r\t}\r\tstops = oop;\rl1:\t/* end stackObjectValue: */;\r\tif (!(((stops & 1) == 0) && (((((usqInt) (longAt(stops))) >> 8) & 15) == 2))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif (!((slotSizeOf(stops)) >= 258)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin stackIntegerValue: */\r\tintegerPointer1 = longAt(foo->stackPointer - (2 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer1 & 1)) {\r\t\tscanRightX = (integerPointer1 >> 1);\r\t\tgoto l5;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tscanRightX = 0;\r\t\tgoto l5;\r\t}\r\tscanRightX = null;\rl5:\t/* end stackIntegerValue: */;\r\t/* begin stackObjectValue: */\r\toop1 = longAt(foo->stackPointer - (3 * (BYTES_PER_WORD)));\r\tif ((oop1 & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tsourceString = null;\r\t\tgoto l2;\r\t}\r\tsourceString = oop1;\rl2:\t/* end stackObjectValue: */;\r\tif (!(((sourceString & 1) == 0) && (((((usqInt) (longAt(sourceString))) >> 8) & 15) >= 8))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin stackIntegerValue: */\r\tintegerPointer2 = longAt(foo->stackPointer - (4 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer2 & 1)) {\r\t\tscanStopIndex = (integerPointer2 >> 1);\r\t\tgoto l6;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tscanStopIndex = 0;\r\t\tgoto l6;\r\t}\r\tscanStopIndex = null;\rl6:\t/* end stackIntegerValue: */;\r\t/* begin stackIntegerValue: */\r\tintegerPointer3 = longAt(foo->stackPointer - (5 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer3 & 1)) {\r\t\tscanStartIndex = (integerPointer3 >> 1);\r\t\tgoto l7;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tscanStartIndex = 0;\r\t\tgoto l7;\r\t}\r\tscanStartIndex = null;\rl7:\t/* end stackIntegerValue: */;\r\tif (!((scanStartIndex > 0) && ((scanStopIndex > 0) && (scanStopIndex <= (byteSizeOf(sourceString)))))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin stackObjectValue: */\r\toop2 = longAt(foo->stackPointer - (6 * (BYTES_PER_WORD)));\r\tif ((oop2 & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\trcvr = null;\r\t\tgoto l3;\r\t}\r\trcvr = oop2;\rl3:\t/* end stackObjectValue: */;\r\tif (!((((rcvr & 1) == 0) && (((((usqInt) (longAt(rcvr))) >> 8) & 15) <= 4)) && ((slotSizeOf(rcvr)) >= 4))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tscanDestX = fetchIntegerofObject(0, rcvr);\r\tscanLastIndex = fetchIntegerofObject(1, rcvr);\r\tscanXTable = longAt((rcvr + (BASE_HEADER_SIZE)) + (2 << (SHIFT_FOR_WORD)));\r\tscanMap = longAt((rcvr + (BASE_HEADER_SIZE)) + (3 << (SHIFT_FOR_WORD)));\r\tif (!((((scanXTable & 1) == 0) && (((((usqInt) (longAt(scanXTable))) >> 8) & 15) == 2)) && (((scanMap & 1) == 0) && (((((usqInt) (longAt(scanMap))) >> 8) & 15) == 2)))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif (!((slotSizeOf(scanMap)) == 256)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\r\t/* Okay, here we go. We have eliminated nearly all failure \r\tconditions, to optimize the inner fetches. */\r\r\tmaxGlyph = (slotSizeOf(scanXTable)) - 2;\r\tscanLastIndex = scanStartIndex;\r\tnilOop = foo->nilObj;\r\twhile (scanLastIndex <= scanStopIndex) {\r\r\t\t/* Known to be okay since scanStartIndex > 0 and scanStopIndex <= sourceString size */\r\t\t/* Known to be okay since stops size >= 258 */\r\r\t\tascii = byteAt((sourceString + (BASE_HEADER_SIZE)) + (scanLastIndex - 1));\r\t\tif (!((stopReason = longAt((stops + (BASE_HEADER_SIZE)) + (ascii << (SHIFT_FOR_WORD)))) == nilOop)) {\r\t\t\tif (!(\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t\t\t(((((int) scanDestX)) ^ ((((int) scanDestX)) << 1)) >= 0)\r# else\r\t\t\t\t\t((scanDestX >= -1073741824) && (scanDestX <= 1073741823))\r# endif  // SQ_HOST32\r\t\t\t\t)) {\r\t\t\t\t/* begin primitiveFail */\r\t\t\t\tfoo->successFlag = 0;\r\t\t\t\treturn null;\r\t\t\t}\r\t\t\t/* begin storeInteger:ofObject:withValue: */\r\t\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t\t(((((int) scanDestX)) ^ ((((int) scanDestX)) << 1)) >= 0)\r# else\r\t\t\t\t((scanDestX >= -1073741824) && (scanDestX <= 1073741823))\r# endif  // SQ_HOST32\r\t\t\t) {\r\t\t\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)), ((scanDestX << 1) | 1));\r\t\t\t} else {\r\t\t\t\t/* begin primitiveFail */\r\t\t\t\tfoo->successFlag = 0;\r\t\t\t}\r\t\t\t/* begin storeInteger:ofObject:withValue: */\r\t\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t\t(((((int) scanLastIndex)) ^ ((((int) scanLastIndex)) << 1)) >= 0)\r# else\r\t\t\t\t((scanLastIndex >= -1073741824) && (scanLastIndex <= 1073741823))\r# endif  // SQ_HOST32\r\t\t\t) {\r\t\t\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (1 << (SHIFT_FOR_WORD)), ((scanLastIndex << 1) | 1));\r\t\t\t} else {\r\t\t\t\t/* begin primitiveFail */\r\t\t\t\tfoo->successFlag = 0;\r\t\t\t}\r\t\t\t/* begin pop: */\r\t\t\tfoo->stackPointer -= 7 * (BYTES_PER_WORD);\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), stopReason);\r\t\t\tfoo->stackPointer = sp;\r\t\t\treturn null;\r\t\t}\r\r\t\t/* fail if the glyphIndex is out of range */\r\r\t\tglyphIndex = fetchIntegerofObject(ascii, scanMap);\r\t\tif ((!foo->successFlag) || ((glyphIndex < 0) || (glyphIndex > maxGlyph))) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t\tsourceX = fetchIntegerofObject(glyphIndex, scanXTable);\r\r\t\t/* Above may fail if non-integer entries in scanXTable */\r\r\t\tsourceX2 = fetchIntegerofObject(glyphIndex + 1, scanXTable);\r\t\tif (!foo->successFlag) {\r\t\t\treturn null;\r\t\t}\r\t\tnextDestX = (scanDestX + sourceX2) - sourceX;\r\t\tif (nextDestX > scanRightX) {\r\t\t\tif (!(\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t\t\t(((((int) scanDestX)) ^ ((((int) scanDestX)) << 1)) >= 0)\r# else\r\t\t\t\t\t((scanDestX >= -1073741824) && (scanDestX <= 1073741823))\r# endif  // SQ_HOST32\r\t\t\t\t)) {\r\t\t\t\t/* begin primitiveFail */\r\t\t\t\tfoo->successFlag = 0;\r\t\t\t\treturn null;\r\t\t\t}\r\t\t\t/* begin storeInteger:ofObject:withValue: */\r\t\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t\t(((((int) scanDestX)) ^ ((((int) scanDestX)) << 1)) >= 0)\r# else\r\t\t\t\t((scanDestX >= -1073741824) && (scanDestX <= 1073741823))\r# endif  // SQ_HOST32\r\t\t\t) {\r\t\t\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)), ((scanDestX << 1) | 1));\r\t\t\t} else {\r\t\t\t\t/* begin primitiveFail */\r\t\t\t\tfoo->successFlag = 0;\r\t\t\t}\r\t\t\t/* begin storeInteger:ofObject:withValue: */\r\t\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t\t(((((int) scanLastIndex)) ^ ((((int) scanLastIndex)) << 1)) >= 0)\r# else\r\t\t\t\t((scanLastIndex >= -1073741824) && (scanLastIndex <= 1073741823))\r# endif  // SQ_HOST32\r\t\t\t) {\r\t\t\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (1 << (SHIFT_FOR_WORD)), ((scanLastIndex << 1) | 1));\r\t\t\t} else {\r\t\t\t\t/* begin primitiveFail */\r\t\t\t\tfoo->successFlag = 0;\r\t\t\t}\r\t\t\t/* begin pop: */\r\t\t\tfoo->stackPointer -= 7 * (BYTES_PER_WORD);\r\t\t\t/* begin push: */\r\t\t\tobject = longAt((stops + (BASE_HEADER_SIZE)) + ((CrossedX - 1) << (SHIFT_FOR_WORD)));\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), object);\r\t\t\tfoo->stackPointer = sp1;\r\t\t\treturn null;\r\t\t}\r\t\tscanDestX = nextDestX + kernDelta;\r\t\tscanLastIndex += 1;\r\t}\r\tif (!(\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t(((((int) scanDestX)) ^ ((((int) scanDestX)) << 1)) >= 0)\r# else\r\t\t\t((scanDestX >= -1073741824) && (scanDestX <= 1073741823))\r# endif  // SQ_HOST32\r\t\t)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin storeInteger:ofObject:withValue: */\r\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t(((((int) scanDestX)) ^ ((((int) scanDestX)) << 1)) >= 0)\r# else\r\t\t((scanDestX >= -1073741824) && (scanDestX <= 1073741823))\r# endif  // SQ_HOST32\r\t) {\r\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)), ((scanDestX << 1) | 1));\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t}\r\t/* begin storeInteger:ofObject:withValue: */\r\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t(((((int) scanStopIndex)) ^ ((((int) scanStopIndex)) << 1)) >= 0)\r# else\r\t\t((scanStopIndex >= -1073741824) && (scanStopIndex <= 1073741823))\r# endif  // SQ_HOST32\r\t) {\r\t\tlongAtput((rcvr + (BASE_HEADER_SIZE)) + (1 << (SHIFT_FOR_WORD)), ((scanStopIndex << 1) | 1));\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t}\r\t/* begin pop: */\r\tfoo->stackPointer -= 7 * (BYTES_PER_WORD);\r\t/* begin push: */\r\tobject1 = longAt((stops + (BASE_HEADER_SIZE)) + ((EndOfRun - 1) << (SHIFT_FOR_WORD)));\r\tlongAtput(sp2 = foo->stackPointer + (BYTES_PER_WORD), object1);\r\tfoo->stackPointer = sp2;\r\treturn null;\r}\r\r\r/*\tReturn a SmallInteger indicating the current depth of the OS screen. Negative values are used to imply LSB type pixel format an there is some support in the VM for handling either MSB or LSB */\r\rEXPORT(sqInt) primitiveScreenDepth(void) {\rregister struct foo * foo = &fum;\r    sqInt depth;\r    sqInt sp;\r\r\tdepth = ioScreenDepth();\r\tif (!foo->successFlag) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin pop:thenPushInteger: */\r\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), ((depth << 1) | 1));\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tReturn a point indicating the current size of the Smalltalk window. Currently there is a limit of 65535 in each direction because the point is encoded into a single 32bit value in the image header. This might well become a problem one day */\r\rsqInt primitiveScreenSize(void) {\rregister struct foo * foo = &fum;\r    sqInt pointWord;\r    sqInt object;\r    sqInt sp;\r    sqInt pointResult;\r\r\t/* begin pop: */\r\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\tpointWord = ioScreenSize();\r\t/* begin push: */\r\t/* begin makePointwithxValue:yValue: */\r\tpointResult = instantiateSmallClasssizeInBytes(fetchPointerofObject(ClassPoint, foo->specialObjectsOop), 3 * (BYTES_PER_WORD));\r\tlongAtput((pointResult + (BASE_HEADER_SIZE)) + (XIndex << (SHIFT_FOR_WORD)), ((((((usqInt) pointWord) >> 16) & 65535) << 1) | 1));\r\tlongAtput((pointResult + (BASE_HEADER_SIZE)) + (YIndex << (SHIFT_FOR_WORD)), (((pointWord & 65535) << 1) | 1));\r\tobject = pointResult;\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tReturn the number of seconds since January 1, 1901 as an integer. */\r\rsqInt primitiveSecondsClock(void) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r    sqInt sp;\r\r\t/* begin pop:thenPush: */\r\toop = positive32BitIntegerFor(ioSeconds());\r\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), oop);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tSet to OS to the requested display mode.\r\tSee also DisplayScreen setDisplayDepth:extent:fullscreen: */\r\rsqInt primitiveSetDisplayMode(void) {\rregister struct foo * foo = &fum;\r    sqInt d;\r    sqInt fsFlag;\r    sqInt h;\r    sqInt okay;\r    sqInt w;\r    sqInt sp;\r    sqInt sp1;\r    sqInt integerPointer;\r    sqInt integerPointer1;\r    sqInt integerPointer2;\r\r\t/* begin booleanValueOf: */\r\tif ((longAt(foo->stackPointer)) == foo->trueObj) {\r\t\tfsFlag = 1;\r\t\tgoto l1;\r\t}\r\tif ((longAt(foo->stackPointer)) == foo->falseObj) {\r\t\tfsFlag = 0;\r\t\tgoto l1;\r\t}\r\tfoo->successFlag = 0;\r\tfsFlag = null;\rl1:\t/* end booleanValueOf: */;\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\th = (integerPointer >> 1);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\th = 0;\r\t\tgoto l2;\r\t}\r\th = null;\rl2:\t/* end stackIntegerValue: */;\r\t/* begin stackIntegerValue: */\r\tintegerPointer1 = longAt(foo->stackPointer - (2 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer1 & 1)) {\r\t\tw = (integerPointer1 >> 1);\r\t\tgoto l3;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tw = 0;\r\t\tgoto l3;\r\t}\r\tw = null;\rl3:\t/* end stackIntegerValue: */;\r\t/* begin stackIntegerValue: */\r\tintegerPointer2 = longAt(foo->stackPointer - (3 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer2 & 1)) {\r\t\td = (integerPointer2 >> 1);\r\t\tgoto l4;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\td = 0;\r\t\tgoto l4;\r\t}\r\td = null;\rl4:\t/* end stackIntegerValue: */;\r\tif (foo->successFlag) {\r\t\tokay = ioSetDisplayMode(w, h, d, fsFlag);\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 5 * (BYTES_PER_WORD);\r\t\t/* begin pushBool: */\r\t\tif (okay) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t}\r}\r\r\r/*\tOn platforms that support it, set full-screen mode to the value of the boolean argument. */\r\rsqInt primitiveSetFullScreen(void) {\rregister struct foo * foo = &fum;\r    sqInt argOop;\r\r\targOop = longAt(foo->stackPointer);\r\tif (argOop == foo->trueObj) {\r\t\tioSetFullScreen(1);\r\t} else {\r\t\tif (argOop == foo->falseObj) {\r\t\t\tioSetFullScreen(0);\r\t\t} else {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t}\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tPrimitive. Indicate if the GC logic should have bias to grow */\r\rEXPORT(sqInt) primitiveSetGCBiasToGrow(void) {\rregister struct foo * foo = &fum;\r    sqInt flag;\r    sqInt integerPointer;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tflag = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tflag = 0;\r\t\tgoto l1;\r\t}\r\tflag = null;\rl1:\t/* end stackIntegerValue: */;\r\tif (foo->successFlag) {\r\t\tfoo->gcBiasToGrow = flag;\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= foo->argumentCount * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tPrimitive. If the GC logic has  bias to grow, set growth limit */\r\rEXPORT(sqInt) primitiveSetGCBiasToGrowGCLimit(void) {\rregister struct foo * foo = &fum;\r    sqInt value;\r    sqInt integerPointer;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tvalue = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tvalue = 0;\r\t\tgoto l1;\r\t}\r\tvalue = null;\rl1:\t/* end stackIntegerValue: */;\r\tif (foo->successFlag) {\r\t\tfoo->gcBiasToGrowGCLimit = value;\r\t\tfoo->gcBiasToGrowThreshold = foo->youngStart - (((int) memory));\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= foo->argumentCount * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tPrimitive. Indicate the semaphore to be signalled for upon garbage collection */\r\rEXPORT(sqInt) primitiveSetGCSemaphore(void) {\rregister struct foo * foo = &fum;\r    sqInt index;\r    sqInt integerPointer;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tindex = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tindex = 0;\r\t\tgoto l1;\r\t}\r\tindex = null;\rl1:\t/* end stackIntegerValue: */;\r\tif (foo->successFlag) {\r\t\tfoo->gcSemaphoreIndex = index;\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= foo->argumentCount * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tSet the user interrupt keycode. The keycode is an integer whose encoding is described in the comment for primitiveKbdNext. */\r\rsqInt primitiveSetInterruptKey(void) {\rregister struct foo * foo = &fum;\r    sqInt keycode;\r    sqInt integerPointer;\r    sqInt top;\r\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer = top;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tkeycode = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tkeycode = 0;\r\t\tgoto l1;\r\t}\r\tkeycode = null;\rl1:\t/* end popInteger */;\r\tif (foo->successFlag) {\r\t\tfoo->interruptKeycode = keycode;\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 1 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tTreat the receiver, which can be indexible by either bytes or words, as an array of signed 16-bit values. Return the contents of the given index. Note that the index specifies the i-th 16-bit entry, not the i-th byte or word. */\r\rsqInt primitiveShortAt(void) {\rregister struct foo * foo = &fum;\r    sqInt addr;\r    sqInt index;\r    sqInt rcvr;\r    sqInt sz;\r    sqInt value;\r    sqInt sp;\r    sqInt successValue;\r    sqInt successValue1;\r    sqInt integerPointer;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tindex = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tindex = 0;\r\t\tgoto l1;\r\t}\r\tindex = null;\rl1:\t/* end stackIntegerValue: */;\r\trcvr = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin success: */\r\tsuccessValue = (!((rcvr & 1))) && (((rcvr & 1) == 0) && (isWordsOrBytesNonInt(rcvr)));\r\tfoo->successFlag = successValue && foo->successFlag;\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\r\t/* number of 16-bit fields */\r\r\tsz = ((sqInt) ((sizeBitsOf(rcvr)) - (BASE_HEADER_SIZE)) >> 1);\r\t/* begin success: */\r\tsuccessValue1 = (index >= 1) && (index <= sz);\r\tfoo->successFlag = successValue1 && foo->successFlag;\r\tif (foo->successFlag) {\r\t\taddr = (rcvr + (BASE_HEADER_SIZE)) + (2 * (index - 1));\r\t\tvalue = shortAt(addr);\r\t\t/* begin pop:thenPushInteger: */\r\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), ((value << 1) | 1));\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\r\r/*\tTreat the receiver, which can be indexible by either bytes or words, as an array of signed 16-bit values. Set the contents of the given index to the given value. Note that the index specifies the i-th 16-bit entry, not the i-th byte or word. */\r\rsqInt primitiveShortAtPut(void) {\rregister struct foo * foo = &fum;\r    sqInt addr;\r    sqInt index;\r    sqInt rcvr;\r    sqInt sz;\r    sqInt value;\r    sqInt successValue;\r    sqInt successValue1;\r    sqInt successValue2;\r    sqInt integerPointer;\r    sqInt integerPointer1;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tvalue = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tvalue = 0;\r\t\tgoto l1;\r\t}\r\tvalue = null;\rl1:\t/* end stackIntegerValue: */;\r\t/* begin stackIntegerValue: */\r\tintegerPointer1 = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer1 & 1)) {\r\t\tindex = (integerPointer1 >> 1);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tindex = 0;\r\t\tgoto l2;\r\t}\r\tindex = null;\rl2:\t/* end stackIntegerValue: */;\r\trcvr = longAt(foo->stackPointer - (2 * (BYTES_PER_WORD)));\r\t/* begin success: */\r\tsuccessValue = (!((rcvr & 1))) && (((rcvr & 1) == 0) && (isWordsOrBytesNonInt(rcvr)));\r\tfoo->successFlag = successValue && foo->successFlag;\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\r\t/* number of 16-bit fields */\r\r\tsz = ((sqInt) ((sizeBitsOf(rcvr)) - (BASE_HEADER_SIZE)) >> 1);\r\t/* begin success: */\r\tsuccessValue1 = (index >= 1) && (index <= sz);\r\tfoo->successFlag = successValue1 && foo->successFlag;\r\t/* begin success: */\r\tsuccessValue2 = (value >= -32768) && (value <= 32767);\r\tfoo->successFlag = successValue2 && foo->successFlag;\r\tif (foo->successFlag) {\r\t\taddr = (rcvr + (BASE_HEADER_SIZE)) + (2 * (index - 1));\r\t\tshortAtput(addr, value);\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tForce the given rectangular section of the Display to be \r\tcopied to the screen. */\r\rsqInt primitiveShowDisplayRect(void) {\rregister struct foo * foo = &fum;\r    sqInt bottom;\r    sqInt left;\r    sqInt right;\r    sqInt top;\r    sqInt integerPointer;\r    sqInt integerPointer1;\r    sqInt integerPointer2;\r    sqInt integerPointer3;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tbottom = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tbottom = 0;\r\t\tgoto l1;\r\t}\r\tbottom = null;\rl1:\t/* end stackIntegerValue: */;\r\t/* begin stackIntegerValue: */\r\tintegerPointer1 = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer1 & 1)) {\r\t\ttop = (integerPointer1 >> 1);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\ttop = 0;\r\t\tgoto l2;\r\t}\r\ttop = null;\rl2:\t/* end stackIntegerValue: */;\r\t/* begin stackIntegerValue: */\r\tintegerPointer2 = longAt(foo->stackPointer - (2 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer2 & 1)) {\r\t\tright = (integerPointer2 >> 1);\r\t\tgoto l3;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tright = 0;\r\t\tgoto l3;\r\t}\r\tright = null;\rl3:\t/* end stackIntegerValue: */;\r\t/* begin stackIntegerValue: */\r\tintegerPointer3 = longAt(foo->stackPointer - (3 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer3 & 1)) {\r\t\tleft = (integerPointer3 >> 1);\r\t\tgoto l4;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tleft = 0;\r\t\tgoto l4;\r\t}\r\tleft = null;\rl4:\t/* end stackIntegerValue: */;\r\tdisplayBitsOfLeftTopRightBottom(fetchPointerofObject(TheDisplay, foo->specialObjectsOop), left, top, right, bottom);\r\tif (foo->successFlag) {\r\t\tioForceDisplayUpdate();\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 4 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tsynchromously signal the semaphore. This may change the active process as a result */\r\rsqInt primitiveSignal(void) {\rregister struct foo * foo = &fum;\r    sqInt sema;\r    sqInt classOop;\r    sqInt ccIndex;\r    sqInt cl;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop;\r\r\r\t/* rcvr */\r\r\tsema = longAt(foo->stackPointer);\r\t/* begin assertClassOf:is: */\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\tclassOop = longAt((oop + (BASE_HEADER_SIZE)) + (ClassSemaphore << (SHIFT_FOR_WORD)));\r\tif ((sema & 1)) {\r\t\tfoo->successFlag = 0;\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(sema))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tcl = (longAt(sema - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop2 = foo->specialObjectsOop;\r\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tcl = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t}\r\t/* begin success: */\r\tfoo->successFlag = (cl == classOop) && foo->successFlag;\rl1:\t/* end assertClassOf:is: */;\r\tif (foo->successFlag) {\r\t\tsynchronousSignal(sema);\r\t}\r}\r\r\r/*\tSet the low-water mark for free space. When the free space \r\tfalls below this level, the new and new: primitives fail and \r\tsystem attempts to allocate space (e.g., to create a method \r\tcontext) cause the low-space semaphore (if one is \r\tregistered) to be signalled. */\r\rsqInt primitiveSignalAtBytesLeft(void) {\rregister struct foo * foo = &fum;\r    sqInt bytes;\r    sqInt integerPointer;\r    sqInt top;\r\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer = top;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tbytes = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tbytes = 0;\r\t\tgoto l1;\r\t}\r\tbytes = null;\rl1:\t/* end popInteger */;\r\tif (foo->successFlag) {\r\t\tfoo->lowSpaceThreshold = bytes;\r\t} else {\r\t\tfoo->lowSpaceThreshold = 0;\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 1 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tCause the time semaphore, if one has been registered, to\r\tbe signalled when the millisecond clock is greater than or\r\tequal to the given tick value. A tick value of zero turns off\r\ttimer interrupts. */\r\rsqInt primitiveSignalAtMilliseconds(void) {\rregister struct foo * foo = &fum;\r    sqInt sema;\r    sqInt tick;\r    sqInt top;\r    sqInt oop;\r    sqInt oop1;\r    sqInt valuePointer;\r    sqInt integerPointer;\r    sqInt top1;\r\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer = top1;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\ttick = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\ttick = 0;\r\t\tgoto l1;\r\t}\r\ttick = null;\rl1:\t/* end popInteger */;\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tsema = top;\r\tif (foo->successFlag) {\r\t\tif ((fetchClassOf(sema)) == (fetchPointerofObject(ClassSemaphore, foo->specialObjectsOop))) {\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\toop = foo->specialObjectsOop;\r\t\t\tif ((((usqInt) oop)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(oop, sema);\r\t\t\t}\r\t\t\tlongAtput((oop + (BASE_HEADER_SIZE)) + (TheTimerSemaphore << (SHIFT_FOR_WORD)), sema);\r\t\t\tfoo->nextWakeupTick = tick;\r\t\t} else {\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\toop1 = foo->specialObjectsOop;\r\t\t\tvaluePointer = foo->nilObj;\r\t\t\tif ((((usqInt) oop1)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(oop1, valuePointer);\r\t\t\t}\r\t\t\tlongAtput((oop1 + (BASE_HEADER_SIZE)) + (TheTimerSemaphore << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\tfoo->nextWakeupTick = 0;\r\t\t}\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t}\r}\r\rsqInt primitiveSine(void) {\rregister struct foo * foo = &fum;\r    double  rcvr;\r\r\trcvr = popFloat();\r\tif (foo->successFlag) {\r\t\tpushFloat(sin(rcvr));\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 1 * (BYTES_PER_WORD);\r\t}\r}\r\rsqInt primitiveSize(void) {\rregister struct foo * foo = &fum;\r    sqInt rcvr;\r    sqInt sz;\r    sqInt oop;\r    sqInt sp;\r\r\trcvr = longAt(foo->stackPointer);\r\tif ((rcvr & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif (((((usqInt) (longAt(rcvr))) >> 8) & 15) < 2) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tsz = stSizeOf(rcvr);\r\tif (foo->successFlag) {\r\t\t/* begin pop:thenPush: */\r\t\toop = positive32BitIntegerFor(sz);\r\t\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), oop);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\r\r/*\tsave a normal snapshot under the same name as it was loaded unless it has been renamed by the last primitiveImageName */\r\rsqInt primitiveSnapshot(void) {\r\treturn snapshot(0);\r}\r\r\r/*\tsave an embedded snapshot */\r\rsqInt primitiveSnapshotEmbedded(void) {\r\treturn snapshot(1);\r}\r\rsqInt primitiveSomeInstance(void) {\rregister struct foo * foo = &fum;\r    sqInt class;\r    sqInt instance;\r    sqInt sp;\r    sqInt thisClass;\r    sqInt thisObj;\r    sqInt ccIndex;\r    sqInt oop;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt obj;\r    sqInt sz;\r    sqInt header;\r\r\tclass = longAt(foo->stackPointer);\r\t/* begin initialInstanceOf: */\r\t/* begin firstAccessibleObject */\r\tobj = memory + (foo->headerTypeBytes[(longAt(memory)) & TypeMask]);\r\twhile ((((usqInt) obj)) < (((usqInt) foo->endOfMemory))) {\r\t\tif (!(((longAt(obj)) & TypeMask) == HeaderTypeFree)) {\r\t\t\tthisObj = obj;\r\t\t\tgoto l3;\r\t\t}\r\t\t/* begin objectAfter: */\r\t\tif (DoAssertionChecks) {\r\t\t\tif ((((usqInt) obj)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t}\r\t\t}\r\t\tif (((longAt(obj)) & TypeMask) == HeaderTypeFree) {\r\t\t\tsz = (longAt(obj)) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader = longAt(obj);\r\t\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(obj - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l4;\r\t\t\t} else {\r\t\t\t\tsz = header & (SIZE_MASK);\r\t\t\t\tgoto l4;\r\t\t\t}\r\t\tl4:\t/* end sizeBitsOf: */;\r\t\t}\r\t\tobj = (obj + sz) + (foo->headerTypeBytes[(longAt(obj + sz)) & TypeMask]);\r\t}\r\terror(\"heap is empty\");\rl3:\t/* end firstAccessibleObject */;\r\twhile (!(thisObj == null)) {\r\t\t/* begin fetchClassOf: */\r\t\tif ((thisObj & 1)) {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop = foo->specialObjectsOop;\r\t\t\tthisClass = longAt((oop + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\t\tgoto l1;\r\t\t}\r\t\tccIndex = (((usqInt) (longAt(thisObj))) >> 12) & 31;\r\t\tif (ccIndex == 0) {\r\t\t\tthisClass = (longAt(thisObj - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop2 = foo->specialObjectsOop;\r\t\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\t\tthisClass = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\t\tgoto l1;\r\t\t}\r\tl1:\t/* end fetchClassOf: */;\r\t\tif (thisClass == class) {\r\t\t\tinstance = thisObj;\r\t\t\tgoto l2;\r\t\t}\r\t\tthisObj = accessibleObjectAfter(thisObj);\r\t}\r\tinstance = foo->nilObj;\rl2:\t/* end initialInstanceOf: */;\r\tif (instance == foo->nilObj) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t} else {\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp = foo->stackPointer - (((foo->argumentCount + 1) - 1) * (BYTES_PER_WORD)), instance);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\r\r/*\tReturn the first object in the heap. */\r\rsqInt primitiveSomeObject(void) {\rregister struct foo * foo = &fum;\r    sqInt object;\r    sqInt sp;\r    sqInt obj;\r    sqInt sz;\r    sqInt header;\r\r\t/* begin pop: */\r\tfoo->stackPointer -= (foo->argumentCount + 1) * (BYTES_PER_WORD);\r\t/* begin push: */\r\t/* begin firstAccessibleObject */\r\tobj = memory + (foo->headerTypeBytes[(longAt(memory)) & TypeMask]);\r\twhile ((((usqInt) obj)) < (((usqInt) foo->endOfMemory))) {\r\t\tif (!(((longAt(obj)) & TypeMask) == HeaderTypeFree)) {\r\t\t\tobject = obj;\r\t\t\tgoto l1;\r\t\t}\r\t\t/* begin objectAfter: */\r\t\tif (DoAssertionChecks) {\r\t\t\tif ((((usqInt) obj)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t}\r\t\t}\r\t\tif (((longAt(obj)) & TypeMask) == HeaderTypeFree) {\r\t\t\tsz = (longAt(obj)) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader = longAt(obj);\r\t\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(obj - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l2;\r\t\t\t} else {\r\t\t\t\tsz = header & (SIZE_MASK);\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\tl2:\t/* end sizeBitsOf: */;\r\t\t}\r\t\tobj = (obj + sz) + (foo->headerTypeBytes[(longAt(obj + sz)) & TypeMask]);\r\t}\r\terror(\"heap is empty\");\rl1:\t/* end firstAccessibleObject */;\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tReturn the oop of the SpecialObjectsArray. */\r\rsqInt primitiveSpecialObjectsOop(void) {\rregister struct foo * foo = &fum;\r    sqInt sp;\r\r\t/* begin pop:thenPush: */\r\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), foo->specialObjectsOop);\r\tfoo->stackPointer = sp;\r}\r\rsqInt primitiveSquareRoot(void) {\rregister struct foo * foo = &fum;\r    double  rcvr;\r\r\trcvr = popFloat();\r\t/* begin success: */\r\tfoo->successFlag = (rcvr >= 0.0) && foo->successFlag;\r\tif (foo->successFlag) {\r\t\tpushFloat(sqrt(rcvr));\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 1 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tThis primitive is called from Squeak as...\r\t\t<imageSegment> storeSegmentFor: arrayOfRoots into: aWordArray outPointers: anArray. */\r/*\tThis primitive will store a binary image segment (in the same format as the Squeak image file) of the receiver and every object in its proper tree of subParts (ie, that is not refered to from anywhere else outside the tree).  All pointers from within the tree to objects outside the tree will be copied into the array of outpointers.  In their place in the image segment will be an oop equal to the offset in the outPointer array (the first would be 4). but with the high bit set. */\r/*\tThe primitive expects the array and wordArray to be more than adequately long.  In this case it returns normally, and truncates the two arrays to exactly the right size.  To simplify truncation, both incoming arrays are required to be 256 bytes or more long (ie with 3-word headers).  If either array is too small, the primitive will fail, but in no other case.\r\rDuring operation of the primitive, it is necessary to convert from both internal and external oops to their mapped values.  To make this fast, the headers of the original objects in question are replaced by the mapped values (and this is noted by adding the forbidden XX header type).  Tables are kept of both kinds of oops, as well as of the original headers for restoration.\r\rTo be specific, there are two similar two-part tables, the outpointer array, and one in the upper fifth of the segmentWordArray.  Each grows oops from the bottom up, and preserved headers from halfway up.\r\rIn case of either success or failure, the headers must be restored.  In the event of primitive failure, the table of outpointers must also be nilled out (since the garbage in the high half will not have been discarded. */\r\rsqInt primitiveStoreImageSegment(void) {\rregister struct foo * foo = &fum;\r    sqInt arrayOfRoots;\r    sqInt doingClass;\r    usqInt endSeg;\r    sqInt extraSize;\r    sqInt fieldOop;\r    usqInt fieldPtr;\r    usqInt firstIn;\r    usqInt firstOut;\r    usqInt hdrBaseIn;\r    usqInt hdrBaseOut;\r    sqInt hdrTypeBits;\r    sqInt header;\r    usqInt lastIn;\r    usqInt lastOut;\r    usqInt lastPtr;\r    usqInt lastSeg;\r    sqInt mapOop;\r    sqInt outPointerArray;\r    usqInt savedYoungStart;\r    usqInt segOop;\r    sqInt segmentWordArray;\r    sqInt versionOffset;\r    sqInt i;\r    sqInt lastAddr;\r    sqInt i1;\r    sqInt lastAddr1;\r    sqInt i2;\r    sqInt lastAddr2;\r    sqInt i3;\r    sqInt lastAddr3;\r    sqInt in;\r    sqInt lastIn1;\r    sqInt out;\r    sqInt in1;\r    sqInt lastIn2;\r    sqInt out1;\r    sqInt sz;\r    sqInt header1;\r\r\toutPointerArray = longAt(foo->stackPointer);\r\tsegmentWordArray = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\r\t/* Essential type checks */\r\r\tarrayOfRoots = longAt(foo->stackPointer - (2 * (BYTES_PER_WORD)));\r\tif (!((((((usqInt) (longAt(arrayOfRoots))) >> 8) & 15) == 2) && ((((((usqInt) (longAt(outPointerArray))) >> 8) & 15) == 2) && (((((usqInt) (longAt(segmentWordArray))) >> 8) & 15) == 6)))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif (!((((longAt(outPointerArray)) & TypeMask) == HeaderTypeSizeAndClass) && (((longAt(segmentWordArray)) & TypeMask) == HeaderTypeSizeAndClass))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif (DoAssertionChecks) {\r\t\tverifyCleanHeaders();\r\t}\r\tfirstOut = outPointerArray + (BASE_HEADER_SIZE);\r\tlastOut = firstOut - (BYTES_PER_WORD);\r\r\t/* top half */\r\r\thdrBaseOut = outPointerArray + (((lastPointerOf(outPointerArray)) / ((BYTES_PER_WORD) * 2)) * (BYTES_PER_WORD));\r\tlastSeg = segmentWordArray;\r\r\t/* Write a version number for byte order and version check */\r\r\tendSeg = (segmentWordArray + (sizeBitsOf(segmentWordArray))) - (BYTES_PER_WORD);\r\tversionOffset = BYTES_PER_WORD;\r\tlastSeg += versionOffset;\r\tif (lastSeg > endSeg) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tlongAtput(lastSeg, imageSegmentVersion());\r\r\t/* Take 1/8 of seg */\r\r\tfirstIn = endSeg - (((sizeBitsOf(segmentWordArray)) / ((BYTES_PER_WORD) * 8)) * (BYTES_PER_WORD));\r\tlastIn = firstIn - (BYTES_PER_WORD);\r\r\t/* top half of that */\r\t/* First mark the rootArray and all root objects. */\r\r\thdrBaseIn = firstIn + (((sizeBitsOf(segmentWordArray)) / ((BYTES_PER_WORD) * 16)) * (BYTES_PER_WORD));\r\tlongAtput(arrayOfRoots, (longAt(arrayOfRoots)) | (MARK_BIT));\r\tlastPtr = arrayOfRoots + (lastPointerOf(arrayOfRoots));\r\tfieldPtr = arrayOfRoots + (BASE_HEADER_SIZE);\r\twhile (fieldPtr <= lastPtr) {\r\t\tfieldOop = longAt(fieldPtr);\r\t\tif (!((fieldOop & 1))) {\r\t\t\tlongAtput(fieldOop, (longAt(fieldOop)) | (MARK_BIT));\r\t\t}\r\t\tfieldPtr += BYTES_PER_WORD;\r\t}\r\tsavedYoungStart = foo->youngStart;\r\r\t/* process all of memory */\r\t/* clear the recycled context lists */\r\r\tfoo->youngStart = memory;\r\tfoo->freeContexts = NilContext;\r\tfoo->freeLargeContexts = NilContext;\r\tmarkAndTraceInterpreterOops();\r\r\t/* Finally unmark the rootArray and all root objects. */\r\r\tfoo->youngStart = savedYoungStart;\r\tlongAtput(arrayOfRoots, (longAt(arrayOfRoots)) & (ALL_BUT_MARK_BIT));\r\tfieldPtr = arrayOfRoots + (BASE_HEADER_SIZE);\r\twhile (fieldPtr <= lastPtr) {\r\t\tfieldOop = longAt(fieldPtr);\r\t\tif (!((fieldOop & 1))) {\r\t\t\tlongAtput(fieldOop, (longAt(fieldOop)) & (ALL_BUT_MARK_BIT));\r\t\t}\r\t\tfieldPtr += BYTES_PER_WORD;\r\t}\r\tlastIn += BYTES_PER_WORD;\r\tif (lastIn >= hdrBaseIn) {\r\t\tfoo->successFlag = 0;\r\t}\r\tlastSeg = copyObjtoSegmentaddrstopAtsaveOopAtheaderAt(arrayOfRoots, segmentWordArray, lastSeg, firstIn, lastIn, hdrBaseIn + (lastIn - firstIn));\r\tif (!(foo->successFlag)) {\r\t\tlastIn -= BYTES_PER_WORD;\r\t\trestoreHeadersFromtofromandtofrom(firstIn, lastIn, hdrBaseIn, firstOut, lastOut, hdrBaseOut);\r\t\t/* begin primitiveFailAfterCleanup: */\r\t\tlastAddr = outPointerArray + (lastPointerOf(outPointerArray));\r\t\ti = outPointerArray + (BASE_HEADER_SIZE);\r\t\twhile (i <= lastAddr) {\r\t\t\tlongAtput(i, foo->nilObj);\r\t\t\ti += BYTES_PER_WORD;\r\t\t}\r\t\tif (DoAssertionChecks) {\r\t\t\tverifyCleanHeaders();\r\t\t}\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tsegOop = ((segmentWordArray + versionOffset) + (BASE_HEADER_SIZE)) + (foo->headerTypeBytes[(longAt((segmentWordArray + versionOffset) + (BASE_HEADER_SIZE))) & TypeMask]);\r\twhile (segOop <= lastSeg) {\r\t\tif (((longAt(segOop)) & TypeMask) <= 1) {\r\r\t\t\t/* This object has a class field (type=0 or 1) -- start with that. */\r\r\t\t\tfieldPtr = segOop - (BYTES_PER_WORD);\r\t\t\tdoingClass = 1;\r\t\t} else {\r\r\t\t\t/* No class field -- start with first data field */\r\r\t\t\tfieldPtr = segOop + (BASE_HEADER_SIZE);\r\t\t\tdoingClass = 0;\r\t\t}\r\r\t\t/* last field */\r\t\t/* Go through all oops, remapping them... */\r\r\t\tlastPtr = segOop + (lastPointerOf(segOop));\r\t\twhile (!(fieldPtr > lastPtr)) {\r\r\t\t\t/* Examine each pointer field */\r\r\t\t\tfieldOop = longAt(fieldPtr);\r\t\t\tif (doingClass) {\r\t\t\t\thdrTypeBits = fieldOop & TypeMask;\r\t\t\t\tfieldOop -= hdrTypeBits;\r\t\t\t}\r\t\t\tif ((fieldOop & 1)) {\r\r\t\t\t\t/* Just an integer -- nothing to do */\r\r\t\t\t\tfieldPtr += BYTES_PER_WORD;\r\t\t\t} else {\r\t\t\t\theader = longAt(fieldOop);\r\t\t\t\tif ((header & TypeMask) == HeaderTypeFree) {\r\r\t\t\t\t\t/* Has already been forwarded -- this is the link */\r\r\t\t\t\t\tmapOop = header & (ALL_BUT_TYPE_MASK);\r\t\t\t\t} else {\r\t\t\t\t\tif (((longAt(fieldOop)) & (MARK_BIT)) == 0) {\r\r\t\t\t\t\t\t/* Points to an unmarked obj -- an internal pointer.\r\t\t\t\t\t\t\tCopy the object into the segment, and forward its oop. */\r\r\t\t\t\t\t\tlastIn += BYTES_PER_WORD;\r\t\t\t\t\t\tif (lastIn >= hdrBaseIn) {\r\t\t\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t\t\t}\r\t\t\t\t\t\tlastSeg = copyObjtoSegmentaddrstopAtsaveOopAtheaderAt(fieldOop, segmentWordArray, lastSeg, firstIn, lastIn, hdrBaseIn + (lastIn - firstIn));\r\t\t\t\t\t\tif (!(foo->successFlag)) {\r\r\t\t\t\t\t\t\t/* Out of space in segment */\r\r\t\t\t\t\t\t\tlastIn -= BYTES_PER_WORD;\r\t\t\t\t\t\t\trestoreHeadersFromtofromandtofrom(firstIn, lastIn, hdrBaseIn, firstOut, lastOut, hdrBaseOut);\r\t\t\t\t\t\t\t/* begin primitiveFailAfterCleanup: */\r\t\t\t\t\t\t\tlastAddr1 = outPointerArray + (lastPointerOf(outPointerArray));\r\t\t\t\t\t\t\ti1 = outPointerArray + (BASE_HEADER_SIZE);\r\t\t\t\t\t\t\twhile (i1 <= lastAddr1) {\r\t\t\t\t\t\t\t\tlongAtput(i1, foo->nilObj);\r\t\t\t\t\t\t\t\ti1 += BYTES_PER_WORD;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\tif (DoAssertionChecks) {\r\t\t\t\t\t\t\t\tverifyCleanHeaders();\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\t/* begin primitiveFail */\r\t\t\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t\t\t\treturn null;\r\t\t\t\t\t\t}\r\t\t\t\t\t\tmapOop = (longAt(fieldOop)) & (ALL_BUT_TYPE_MASK);\r\t\t\t\t\t} else {\r\r\t\t\t\t\t\t/* Points to a marked obj -- an external pointer.\r\t\t\t\t\t\t\tMap it as a tagged index in outPointers, and forward its oop. */\r\r\t\t\t\t\t\tlastOut += BYTES_PER_WORD;\r\t\t\t\t\t\tif (lastOut >= hdrBaseOut) {\r\r\t\t\t\t\t\t\t/* Out of space in outPointerArray */\r\r\t\t\t\t\t\t\tlastOut -= BYTES_PER_WORD;\r\t\t\t\t\t\t\trestoreHeadersFromtofromandtofrom(firstIn, lastIn, hdrBaseIn, firstOut, lastOut, hdrBaseOut);\r\t\t\t\t\t\t\t/* begin primitiveFailAfterCleanup: */\r\t\t\t\t\t\t\tlastAddr2 = outPointerArray + (lastPointerOf(outPointerArray));\r\t\t\t\t\t\t\ti2 = outPointerArray + (BASE_HEADER_SIZE);\r\t\t\t\t\t\t\twhile (i2 <= lastAddr2) {\r\t\t\t\t\t\t\t\tlongAtput(i2, foo->nilObj);\r\t\t\t\t\t\t\t\ti2 += BYTES_PER_WORD;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\tif (DoAssertionChecks) {\r\t\t\t\t\t\t\t\tverifyCleanHeaders();\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\t/* begin primitiveFail */\r\t\t\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t\t\t\treturn null;\r\t\t\t\t\t\t}\r\t\t\t\t\t\tmapOop = (lastOut - outPointerArray) | 2147483648U;\r\t\t\t\t\t\t/* begin forward:to:savingOopAt:andHeaderAt: */\r\t\t\t\t\t\tlongAtput(lastOut, fieldOop);\r\t\t\t\t\t\tlongAtput(hdrBaseOut + (lastOut - firstOut), longAt(fieldOop));\r\t\t\t\t\t\tlongAtput(fieldOop, mapOop + HeaderTypeFree);\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\tif (doingClass) {\r\t\t\t\t\tlongAtput(fieldPtr, mapOop + hdrTypeBits);\r\t\t\t\t\tfieldPtr += (BYTES_PER_WORD) * 2;\r\t\t\t\t\tdoingClass = 0;\r\t\t\t\t} else {\r\t\t\t\t\tlongAtput(fieldPtr, mapOop);\r\t\t\t\t\tfieldPtr += BYTES_PER_WORD;\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t\t/* begin objectAfter: */\r\t\tif (DoAssertionChecks) {\r\t\t\tif ((((usqInt) segOop)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t}\r\t\t}\r\t\tif (((longAt(segOop)) & TypeMask) == HeaderTypeFree) {\r\t\t\tsz = (longAt(segOop)) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader1 = longAt(segOop);\r\t\t\tif ((header1 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(segOop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tsz = header1 & (SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\tl1:\t/* end sizeBitsOf: */;\r\t\t}\r\t\tsegOop = (segOop + sz) + (foo->headerTypeBytes[(longAt(segOop + sz)) & TypeMask]);\r\t}\r\trestoreHeadersFromtofromandtofrom(firstIn, lastIn, hdrBaseIn, firstOut, lastOut, hdrBaseOut);\r\tif ((((outPointerArray + (lastPointerOf(outPointerArray))) - lastOut) < 12) || ((endSeg - lastSeg) < 12)) {\r\t\t/* begin primitiveFailAfterCleanup: */\r\t\tlastAddr3 = outPointerArray + (lastPointerOf(outPointerArray));\r\t\ti3 = outPointerArray + (BASE_HEADER_SIZE);\r\t\twhile (i3 <= lastAddr3) {\r\t\t\tlongAtput(i3, foo->nilObj);\r\t\t\ti3 += BYTES_PER_WORD;\r\t\t}\r\t\tif (DoAssertionChecks) {\r\t\t\tverifyCleanHeaders();\r\t\t}\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\textraSize = foo->headerTypeBytes[(longAt(segmentWordArray)) & TypeMask];\r\r\t/* Copy the 3-word wordArray header to establish a free chunk. */\r\r\thdrTypeBits = (longAt(segmentWordArray)) & TypeMask;\r\t/* begin transfer:from:to: */\r\tflag(\"Dan\");\r\tin = (segmentWordArray - extraSize) - (BYTES_PER_WORD);\r\tlastIn1 = in + (3 * (BYTES_PER_WORD));\r\tout = (lastOut + (BYTES_PER_WORD)) - (BYTES_PER_WORD);\r\twhile ((((usqInt) in)) < (((usqInt) lastIn1))) {\r\t\tlongAtput(out += BYTES_PER_WORD, longAt(in += BYTES_PER_WORD));\r\t}\r\tlongAtput(lastOut + (BYTES_PER_WORD), (((outPointerArray + (lastPointerOf(outPointerArray))) - lastOut) - extraSize) + hdrTypeBits);\r\tlongAtput(outPointerArray - extraSize, ((lastOut - firstOut) + ((BYTES_PER_WORD) * 2)) + hdrTypeBits);\r\tbeRootIfOld(outPointerArray);\r\t/* begin transfer:from:to: */\r\tflag(\"Dan\");\r\tin1 = (segmentWordArray - extraSize) - (BYTES_PER_WORD);\r\tlastIn2 = in1 + (3 * (BYTES_PER_WORD));\r\tout1 = (lastSeg + (BYTES_PER_WORD)) - (BYTES_PER_WORD);\r\twhile ((((usqInt) in1)) < (((usqInt) lastIn2))) {\r\t\tlongAtput(out1 += BYTES_PER_WORD, longAt(in1 += BYTES_PER_WORD));\r\t}\r\tlongAtput(segmentWordArray - extraSize, ((lastSeg - segmentWordArray) + (BASE_HEADER_SIZE)) + hdrTypeBits);\r\tlongAtput(lastSeg + (BYTES_PER_WORD), ((endSeg - lastSeg) - extraSize) + hdrTypeBits);\r\tif (DoAssertionChecks) {\r\t\tverifyCleanHeaders();\r\t}\r\t/* begin pop: */\r\tfoo->stackPointer -= 3 * (BYTES_PER_WORD);\r}\r\r\r/*\tAtomic store into context stackPointer. \r\tAlso ensures that any newly accessible cells are initialized to nil  */\r\rsqInt primitiveStoreStackp(void) {\rregister struct foo * foo = &fum;\r    sqInt ctxt;\r    sqInt i;\r    sqInt newStackp;\r    sqInt stackp;\r    sqInt successValue;\r    sqInt sp;\r    sqInt valuePointer;\r    sqInt otherOop;\r    sqInt integerPointer;\r\r\tctxt = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tnewStackp = (integerPointer >> 1);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tnewStackp = 0;\r\t\tgoto l2;\r\t}\r\tnewStackp = null;\rl2:\t/* end stackIntegerValue: */;\r\t/* begin success: */\r\tfoo->successFlag = ((((usqInt) newStackp)) >= (((usqInt) 0))) && foo->successFlag;\r\t/* begin success: */\r\t/* begin oop:isLessThanOrEqualTo: */\r\totherOop = (((LARGE_CONTEXT_SIZE) - (BASE_HEADER_SIZE)) / (BYTES_PER_WORD)) - CtxtTempFrameStart;\r\tsuccessValue = (((usqInt) newStackp)) <= (((usqInt) otherOop));\r\tfoo->successFlag = successValue && foo->successFlag;\r\tif (!(foo->successFlag)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin fetchStackPointerOf: */\r\tsp = longAt((ctxt + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)));\r\tif (!((sp & 1))) {\r\t\tstackp = 0;\r\t\tgoto l1;\r\t}\r\tstackp = (sp >> 1);\rl1:\t/* end fetchStackPointerOf: */;\r\tif ((((usqInt) newStackp)) > (((usqInt) stackp))) {\r\t\tfor (i = (stackp + 1); i <= newStackp; i += 1) {\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tvaluePointer = foo->nilObj;\r\t\t\tif ((((usqInt) ctxt)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(ctxt, valuePointer);\r\t\t\t}\r\t\t\tlongAtput((ctxt + (BASE_HEADER_SIZE)) + (((i + CtxtTempFrameStart) - 1) << (SHIFT_FOR_WORD)), valuePointer);\r\t\t}\r\t}\r\t/* begin storeStackPointerValue:inContext: */\r\tlongAtput((ctxt + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)), ((newStackp << 1) | 1));\r\t/* begin pop: */\r\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r}\r\rsqInt primitiveStringAt(void) {\r\tcommonAt(1);\r}\r\rsqInt primitiveStringAtPut(void) {\r\tcommonAtPut(1);\r}\r\r\r/*\t \r\t<array> primReplaceFrom: start to: stop with: replacement \r\tstartingAt: repStart  \r\t<primitive: 105>\r\t */\r\rsqInt primitiveStringReplace(void) {\rregister struct foo * foo = &fum;\r    sqInt array;\r    sqInt arrayFmt;\r    sqInt arrayInstSize;\r    sqInt hdr;\r    sqInt i;\r    sqInt repl;\r    sqInt replFmt;\r    sqInt replInstSize;\r    sqInt replStart;\r    sqInt srcIndex;\r    sqInt start;\r    sqInt stop;\r    sqInt totalLength;\r    sqInt valuePointer;\r    sqInt valueWord;\r    sqInt sz;\r    sqInt sz1;\r    sqInt integerPointer;\r    sqInt integerPointer1;\r    sqInt integerPointer2;\r    sqInt class;\r    sqInt classFormat;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r    sqInt class1;\r    sqInt classFormat1;\r    sqInt ccIndex1;\r    sqInt oop11;\r    sqInt oop21;\r    sqInt oop31;\r\r\tarray = longAt(foo->stackPointer - (4 * (BYTES_PER_WORD)));\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (3 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tstart = (integerPointer >> 1);\r\t\tgoto l3;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tstart = 0;\r\t\tgoto l3;\r\t}\r\tstart = null;\rl3:\t/* end stackIntegerValue: */;\r\t/* begin stackIntegerValue: */\r\tintegerPointer1 = longAt(foo->stackPointer - (2 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer1 & 1)) {\r\t\tstop = (integerPointer1 >> 1);\r\t\tgoto l4;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tstop = 0;\r\t\tgoto l4;\r\t}\r\tstop = null;\rl4:\t/* end stackIntegerValue: */;\r\trepl = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\t/* begin stackIntegerValue: */\r\tintegerPointer2 = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer2 & 1)) {\r\t\treplStart = (integerPointer2 >> 1);\r\t\tgoto l5;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treplStart = 0;\r\t\tgoto l5;\r\t}\r\treplStart = null;\rl5:\t/* end stackIntegerValue: */;\r\tif (!(foo->successFlag)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif ((repl & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\thdr = longAt(array);\r\tarrayFmt = (((usqInt) hdr) >> 8) & 15;\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((hdr & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(array - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz = hdr & (SIZE_MASK);\r\t}\r\tsz -= hdr & (SIZE_4_BIT);\r\tif (arrayFmt <= 4) {\r\t\ttotalLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tgoto l1;\r\t}\r\tif (arrayFmt < 8) {\r\t\ttotalLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> 2;\r\t\tgoto l1;\r\t} else {\r\t\ttotalLength = (sz - (BASE_HEADER_SIZE)) - (arrayFmt & 3);\r\t\tgoto l1;\r\t}\rl1:\t/* end lengthOf:baseHeader:format: */;\r\t/* begin fixedFieldsOf:format:length: */\r\tif ((arrayFmt > 4) || (arrayFmt == 2)) {\r\t\tarrayInstSize = 0;\r\t\tgoto l7;\r\t}\r\tif (arrayFmt < 2) {\r\t\tarrayInstSize = totalLength;\r\t\tgoto l7;\r\t}\r\t/* begin fetchClassOf: */\r\tif ((array & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tclass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l6;\r\t}\r\tccIndex = (((usqInt) (longAt(array))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tclass = (longAt(array - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l6;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tclass = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l6;\r\t}\rl6:\t/* end fetchClassOf: */;\r\tclassFormat = (longAt((class + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1;\r\tarrayInstSize = (((((usqInt) classFormat) >> 11) & 192) + ((((usqInt) classFormat) >> 2) & 63)) - 1;\rl7:\t/* end fixedFieldsOf:format:length: */;\r\tif (!((start >= 1) && (((start - 1) <= stop) && ((stop + arrayInstSize) <= totalLength)))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\thdr = longAt(repl);\r\treplFmt = (((usqInt) hdr) >> 8) & 15;\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((hdr & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz1 = (longAt(repl - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz1 = hdr & (SIZE_MASK);\r\t}\r\tsz1 -= hdr & (SIZE_4_BIT);\r\tif (replFmt <= 4) {\r\t\ttotalLength = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tgoto l2;\r\t}\r\tif (replFmt < 8) {\r\t\ttotalLength = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> 2;\r\t\tgoto l2;\r\t} else {\r\t\ttotalLength = (sz1 - (BASE_HEADER_SIZE)) - (replFmt & 3);\r\t\tgoto l2;\r\t}\rl2:\t/* end lengthOf:baseHeader:format: */;\r\t/* begin fixedFieldsOf:format:length: */\r\tif ((replFmt > 4) || (replFmt == 2)) {\r\t\treplInstSize = 0;\r\t\tgoto l9;\r\t}\r\tif (replFmt < 2) {\r\t\treplInstSize = totalLength;\r\t\tgoto l9;\r\t}\r\t/* begin fetchClassOf: */\r\tif ((repl & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop11 = foo->specialObjectsOop;\r\t\tclass1 = longAt((oop11 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l8;\r\t}\r\tccIndex1 = (((usqInt) (longAt(repl))) >> 12) & 31;\r\tif (ccIndex1 == 0) {\r\t\tclass1 = (longAt(repl - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l8;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop31 = foo->specialObjectsOop;\r\t\toop21 = longAt((oop31 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tclass1 = longAt((oop21 + (BASE_HEADER_SIZE)) + ((ccIndex1 - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l8;\r\t}\rl8:\t/* end fetchClassOf: */;\r\tclassFormat1 = (longAt((class1 + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1;\r\treplInstSize = (((((usqInt) classFormat1) >> 11) & 192) + ((((usqInt) classFormat1) >> 2) & 63)) - 1;\rl9:\t/* end fixedFieldsOf:format:length: */;\r\tif (!((replStart >= 1) && ((((stop - start) + replStart) + replInstSize) <= totalLength))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif (arrayFmt < 8) {\r\t\tif (!(arrayFmt == replFmt)) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t} else {\r\t\tif (!((arrayFmt & 12) == (replFmt & 12))) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t}\r\r\t/* - 1 for 0-based access */\r\r\tsrcIndex = (replStart + replInstSize) - 1;\r\tif (arrayFmt <= 4) {\r\t\tfor (i = ((start + arrayInstSize) - 1); i <= ((stop + arrayInstSize) - 1); i += 1) {\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tvaluePointer = longAt((repl + (BASE_HEADER_SIZE)) + (srcIndex << (SHIFT_FOR_WORD)));\r\t\t\tif ((((usqInt) array)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(array, valuePointer);\r\t\t\t}\r\t\t\tlongAtput((array + (BASE_HEADER_SIZE)) + (i << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\tsrcIndex += 1;\r\t\t}\r\t} else {\r\t\tif (arrayFmt < 8) {\r\t\t\tfor (i = ((start + arrayInstSize) - 1); i <= ((stop + arrayInstSize) - 1); i += 1) {\r\t\t\t\t/* begin storeLong32:ofObject:withValue: */\r\t\t\t\tvalueWord = long32At((repl + (BASE_HEADER_SIZE)) + (srcIndex << 2));\r\t\t\t\tlong32Atput((array + (BASE_HEADER_SIZE)) + (i << 2), valueWord);\r\t\t\t\tsrcIndex += 1;\r\t\t\t}\r\t\t} else {\r\t\t\tfor (i = ((start + arrayInstSize) - 1); i <= ((stop + arrayInstSize) - 1); i += 1) {\r\t\t\t\tbyteAtput((array + (BASE_HEADER_SIZE)) + i, byteAt((repl + (BASE_HEADER_SIZE)) + srcIndex));\r\t\t\t\tsrcIndex += 1;\r\t\t\t}\r\t\t}\r\t}\r\t/* begin pop: */\r\tfoo->stackPointer -= foo->argumentCount * (BYTES_PER_WORD);\r}\r\rsqInt primitiveSubtract(void) {\rregister struct foo * foo = &fum;\r    sqInt integerResult;\r    sqInt sp;\r\r\t/* begin pop2AndPushIntegerIfOK: */\r\tintegerResult = (stackIntegerValue(1)) - (stackIntegerValue(0));\r\tif (foo->successFlag) {\r\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t(((((int) integerResult)) ^ ((((int) integerResult)) << 1)) >= 0)\r# else\r\t\t\t((integerResult >= -1073741824) && (integerResult <= 1073741823))\r# endif  // SQ_HOST32\r\t\t) {\r\t\t\t/* begin pop:thenPush: */\r\t\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), ((integerResult << 1) | 1));\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\tfoo->successFlag = 0;\r\t\t}\r\t}\r}\r\r\r/*\tPrimitive arithmetic operations for large integers in 64 bit range */\r\rEXPORT(sqInt) primitiveSubtractLargeIntegers(void) {\rregister struct foo * foo = &fum;\r    sqLong integerArg;\r    sqLong integerArgNegated;\r    sqLong integerRcvr;\r    sqInt oopResult;\r    sqLong result;\r    sqInt sp;\r\r\tintegerArg = signed64BitValueOf(longAt(foo->stackPointer - (0 * (BYTES_PER_WORD))));\r\tintegerRcvr = signed64BitValueOf(longAt(foo->stackPointer - (1 * (BYTES_PER_WORD))));\r\tif (!(foo->successFlag)) {\r\t\treturn null;\r\t}\r\tif (integerArg == 0) {\r\t\tresult = integerRcvr;\r\t} else {\r\r\t\t/* Reverse the argument so that we can recycle the overflow code from addition.\r\t\t\t But the most -ve 64-bit value can overflow, so check; 0 - most -ve = most -ve */\r\r\t\tintegerArgNegated = 0 - integerArg;\r\t\tif (integerArgNegated == integerArg) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\r\t\t/* Now check overflow conditions. First is whether rcvr and arg are of the same sign.\r\t\t\t If they are we need to check for overflow more carefully. */\r\r\t\tresult = integerRcvr + integerArgNegated;\r\t\tif (!((integerRcvr ^ integerArgNegated) < 0)) {\r\t\t\tif ((integerRcvr ^ result) < 0) {\r\t\t\t\t/* begin primitiveFail */\r\t\t\t\tfoo->successFlag = 0;\r\t\t\t\treturn null;\r\t\t\t}\r\t\t}\r\t}\r\toopResult = signed64BitIntegerFor(result);\r\tif (foo->successFlag) {\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), oopResult);\r\t\tfoo->stackPointer = sp;\r\t}\r}\r\r\r/*\tPrimitive. Suspend the receiver, aProcess such that it can be executed again\r\tby sending #resume. If the given process is not currently running, take it off\r\tits corresponding list. The primitive returns the list the receiver was previously on. */\r\rsqInt primitiveSuspend(void) {\rregister struct foo * foo = &fum;\r    sqInt activeProc;\r    sqInt myList;\r    sqInt process;\r    sqInt sp;\r    sqInt valuePointer;\r    sqInt sp1;\r    sqInt oop;\r    sqInt oop1;\r    sqInt firstLink;\r    sqInt lastLink;\r    sqInt nextLink;\r    sqInt tempLink;\r    sqInt valuePointer2;\r    sqInt valuePointer1;\r    sqInt oop2;\r\r\tprocess = longAt(foo->stackPointer);\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\toop2 = foo->specialObjectsOop;\r\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\tactiveProc = longAt((oop + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)));\r\tif (process == activeProc) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t\t/* begin push: */\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->nilObj);\r\t\tfoo->stackPointer = sp;\r\t\ttransferTo(wakeHighestPriority());\r\t} else {\r\r\t\t/* XXXX Fixme. We should really check whether myList is a kind of LinkedList or not\r\t\tbut we can't easily so just do a quick check for nil which is the most common case. */\r\r\t\tmyList = longAt((process + (BASE_HEADER_SIZE)) + (MyListIndex << (SHIFT_FOR_WORD)));\r\t\tif (myList == foo->nilObj) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t\t/* begin removeProcess:fromList: */\r\t\tfirstLink = longAt((myList + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)));\r\t\tlastLink = longAt((myList + (BASE_HEADER_SIZE)) + (LastLinkIndex << (SHIFT_FOR_WORD)));\r\t\tif (process == firstLink) {\r\t\t\tnextLink = longAt((process + (BASE_HEADER_SIZE)) + (NextLinkIndex << (SHIFT_FOR_WORD)));\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tif ((((usqInt) myList)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(myList, nextLink);\r\t\t\t}\r\t\t\tlongAtput((myList + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)), nextLink);\r\t\t\tif (process == lastLink) {\r\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\tvaluePointer2 = foo->nilObj;\r\t\t\t\tif ((((usqInt) myList)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\tpossibleRootStoreIntovalue(myList, valuePointer2);\r\t\t\t\t}\r\t\t\t\tlongAtput((myList + (BASE_HEADER_SIZE)) + (LastLinkIndex << (SHIFT_FOR_WORD)), valuePointer2);\r\t\t\t}\r\t\t} else {\r\t\t\ttempLink = firstLink;\r\t\t\t\t\twhile (1) {\r\t\t\t\tif (tempLink == foo->nilObj) {\r\t\t\t\t\t/* begin success: */\r\t\t\t\t\tfoo->successFlag = 0 && foo->successFlag;\r\t\t\t\t\tgoto l1;\r\t\t\t\t}\r\t\t\t\tnextLink = longAt((tempLink + (BASE_HEADER_SIZE)) + (NextLinkIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tif (nextLink == process) break;\r\t\t\t\ttempLink = longAt((tempLink + (BASE_HEADER_SIZE)) + (NextLinkIndex << (SHIFT_FOR_WORD)));\r\t\t\t}\r\t\t\tnextLink = longAt((process + (BASE_HEADER_SIZE)) + (NextLinkIndex << (SHIFT_FOR_WORD)));\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tif ((((usqInt) tempLink)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(tempLink, nextLink);\r\t\t\t}\r\t\t\tlongAtput((tempLink + (BASE_HEADER_SIZE)) + (NextLinkIndex << (SHIFT_FOR_WORD)), nextLink);\r\t\t\tif (process == lastLink) {\r\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\tif ((((usqInt) myList)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\tpossibleRootStoreIntovalue(myList, tempLink);\r\t\t\t\t}\r\t\t\t\tlongAtput((myList + (BASE_HEADER_SIZE)) + (LastLinkIndex << (SHIFT_FOR_WORD)), tempLink);\r\t\t\t}\r\t\t}\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer1 = foo->nilObj;\r\t\tif ((((usqInt) process)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(process, valuePointer1);\r\t\t}\r\t\tlongAtput((process + (BASE_HEADER_SIZE)) + (NextLinkIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\tl1:\t/* end removeProcess:fromList: */;\r\t\tif (foo->successFlag) {\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tvaluePointer = foo->nilObj;\r\t\t\tif ((((usqInt) process)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(process, valuePointer);\r\t\t\t}\r\t\t\tlongAtput((process + (BASE_HEADER_SIZE)) + (MyListIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t\t/* begin pop: */\r\t\t\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), myList);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t}\r}\r\r\r/*\tPrimitive. Terminate up the context stack from the receiver up to but not including the argument, if previousContext is on my Context stack. Make previousContext my sender. This prim has to shadow the code in ContextPart>terminateTo: to be correct */\r\rsqInt primitiveTerminateTo(void) {\rregister struct foo * foo = &fum;\r    sqInt aContext;\r    sqInt currentCntx;\r    sqInt nextCntx;\r    sqInt nilOop;\r    sqInt thisCntx;\r    sqInt top;\r    sqInt top1;\r    sqInt sp;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\taContext = top;\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tthisCntx = top1;\r\tif (contexthasSender(thisCntx, aContext)) {\r\t\tnilOop = foo->nilObj;\r\t\tcurrentCntx = longAt((thisCntx + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\t\twhile (!(currentCntx == aContext)) {\r\t\t\tnextCntx = longAt((currentCntx + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tif ((((usqInt) currentCntx)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(currentCntx, nilOop);\r\t\t\t}\r\t\t\tlongAtput((currentCntx + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)), nilOop);\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tif ((((usqInt) currentCntx)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(currentCntx, nilOop);\r\t\t\t}\r\t\t\tlongAtput((currentCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), nilOop);\r\t\t\tcurrentCntx = nextCntx;\r\t\t}\r\t}\r\t/* begin storePointer:ofObject:withValue: */\r\tif ((((usqInt) thisCntx)) < (((usqInt) foo->youngStart))) {\r\t\tpossibleRootStoreIntovalue(thisCntx, aContext);\r\t}\r\tlongAtput((thisCntx + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)), aContext);\r\t/* begin push: */\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), thisCntx);\r\tfoo->stackPointer = sp;\r\treturn null;\r}\r\r\r/*\tReturn true if the host OS does support the given display depth. */\r\rsqInt primitiveTestDisplayDepth(void) {\rregister struct foo * foo = &fum;\r    sqInt bitsPerPixel;\r    sqInt okay;\r    sqInt sp;\r    sqInt sp1;\r    sqInt integerPointer;\r\r\t/* begin stackIntegerValue: */\r\tintegerPointer = longAt(foo->stackPointer - (0 * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\tbitsPerPixel = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tbitsPerPixel = 0;\r\t\tgoto l1;\r\t}\r\tbitsPerPixel = null;\rl1:\t/* end stackIntegerValue: */;\r\tif (foo->successFlag) {\r\t\tokay = ioHasDisplayDepth(bitsPerPixel);\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 2 * (BYTES_PER_WORD);\r\t\t/* begin pushBool: */\r\t\tif (okay) {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\t\tfoo->stackPointer = sp;\r\t\t} else {\r\t\t\t/* begin push: */\r\t\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\t\tfoo->stackPointer = sp1;\r\t\t}\r\t}\r}\r\rsqInt primitiveTimesTwoPower(void) {\rregister struct foo * foo = &fum;\r    sqInt arg;\r    double  rcvr;\r    sqInt integerPointer;\r    sqInt top;\r\r\t/* begin popInteger */\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tintegerPointer = top;\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\targ = (integerPointer >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\targ = 0;\r\t\tgoto l1;\r\t}\r\targ = null;\rl1:\t/* end popInteger */;\r\trcvr = popFloat();\r\tif (foo->successFlag) {\r\t\tpushFloat(ldexp(rcvr, arg));\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t}\r}\r\rsqInt primitiveTruncated(void) {\rregister struct foo * foo = &fum;\r    double  frac;\r    double  rcvr;\r    double  trunc;\r    sqInt successValue;\r    sqInt sp;\r\r\trcvr = popFloat();\r\tif (foo->successFlag) {\r\t\tfrac = modf(rcvr, &trunc);\r\t\tflag(\"Dan\");\r\t\tsuccess((-1073741824.0 <= trunc) && (trunc <= 1073741823.0));\r\t}\r\tif (foo->successFlag) {\r\t\tpushInteger((sqInt) trunc);\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 1 * (BYTES_PER_WORD);\r\t}\r}\r\r\r/*\tPrimitive. Unload the module with the given name. */\r/*\tReloading of the module will happen *later* automatically, when a \r\tfunction from it is called. This is ensured by invalidating current sessionID. */\r\rsqInt primitiveUnloadModule(void) {\rregister struct foo * foo = &fum;\r    sqInt moduleName;\r\r\tif (!(foo->argumentCount == 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tmoduleName = longAt(foo->stackPointer);\r\tif ((moduleName & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif (!(((moduleName & 1) == 0) && (((((usqInt) (longAt(moduleName))) >> 8) & 15) >= 8))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif (!(ioUnloadModuleOfLength(oopForPointer(firstIndexableField(moduleName)), byteSizeOf(moduleName)))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tflushExternalPrimitives();\r\t/* begin forceInterruptCheck */\r\tfoo->interruptCheckCounter = -1000;\r\tfoo->nextPollTick = 0;\r\t/* begin pop: */\r\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r}\r\r\r/*\tAnswer an array with UTC microseconds since the Posix epoch and\r\tthe current seconds offset from GMT in the local time zone.\r\tThis is a named (not numbered) primitive in the null module (ie the VM) */\r\rEXPORT(sqInt) primitiveUtcWithOffset(void) {\rregister struct foo * foo = &fum;\r    sqLong clock;\r    int offset;\r    sqInt resultArray;\r    sqInt oop;\r    sqInt sp;\r\r\tif ((ioUtcWithOffset(&clock, &offset)) == -1) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin pushRemappableOop: */\r\toop = positive64BitIntegerFor(clock);\r\tfoo->remapBuffer[(foo->remapBufferCount += 1)] = oop;\r\tresultArray = instantiateClassindexableSize(fetchPointerofObject(ClassArray, foo->specialObjectsOop), 2);\r\tstObjectatput(resultArray, 1, popRemappableOop());\r\tstObjectatput(resultArray, 2, ((offset << 1) | 1));\r\t/* begin pop:thenPush: */\r\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), resultArray);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tBehaviour depends on argument count:\r\t\t0 args:\treturn an Array of VM parameter values;\r\t\t1 arg:\treturn the indicated VM parameter;\r\t\t2 args:\tset the VM indicated parameter.\r\tVM parameters are numbered as follows:\r\t\t1\tend of old-space (0-based, read-only)\r\t\t2\tend of young-space (read-only)\r\t\t3\tend of memory (read-only)\r\t\t4\tallocationCount (read-only)\r\t\t5\tallocations between GCs (read-write)\r\t\t6\tsurvivor count tenuring threshold (read-write)\r\t\t7\tfull GCs since startup (read-only)\r\t\t8\ttotal milliseconds in full GCs since startup (read-only)\r\t\t9\tincremental GCs since startup (read-only)\r\t\t10\ttotal milliseconds in incremental GCs since startup (read-only)\r\t\t11\ttenures of surving objects since startup (read-only)\r\t\t12-20 specific to the translating VM\r\t\t21\troot table size (read-only)\r\t\t22\troot table overflows since startup (read-only)\r\t\t23\tbytes of extra memory to reserve for VM buffers, plugins, etc.\r\t\t24\tmemory threshold above which shrinking object memory (rw)\r\t\t25\tmemory headroom when growing object memory (rw)\r\t\t26  interruptChecksEveryNms - force an ioProcessEvents every N milliseconds, in case the image  is not calling getNextEvent often (rw)\r\t\t27\tnumber of times mark loop iterated for current IGC/FGC (read-only) includes ALL marking\r\t\t28\tnumber of times sweep loop iterated  for current IGC/FGC (read-only)\r\t\t29\tnumber of times make forward loop iterated for current IGC/FGC (read-only)\r\t\t30\tnumber of times compact move loop iterated for current IGC/FGC (read-only)\r\t\t31\tnumber of grow memory requests (read-only)\r\t\t32\tnumber of shrink memory requests (read-only)\r\t\t33\tnumber of root table entries used for current IGC/FGC (read-only)\r\t\t34\tnumber of allocations done before current IGC/FGC (read-only)\r\t\t35\tnumber of survivor objects after current IGC/FGC (read-only)\r\t\t36  millisecond clock when current IGC/FGC completed (read-only)\r\t\t37  number of marked objects for Roots of the world, not including Root Table entries for current IGC/FGC (read-only)\r\t\t38  milliseconds taken by current IGC  (read-only)\r\t\t39  Number of finalization signals for Weak Objects pending when current IGC/FGC completed (read-only)\r\t\t40 BytesPerWord for this image\r\t\t\r\tNote: Thanks to Ian Piumarta for this primitive. */\r\rsqInt primitiveVMParameter(void) {\rregister struct foo * foo = &fum;\r    sqInt arg;\r    sqInt i;\r    sqInt index;\r    sqInt mem;\r    sqInt paramsArraySize;\r    sqInt result;\r    sqLong resultLargePositiveInteger;\r    sqInt statFullGCMSecsObj;\r    sqInt statGCTimeObj;\r    sqInt statIGCDeltaTimeObj;\r    sqInt statIncrGCMSecsObj;\r    sqInt oop;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r    sqInt oop4;\r    sqInt oop5;\r    sqInt oop6;\r    sqInt oop7;\r    sqInt oop8;\r    sqInt sp;\r    sqInt sp1;\r    sqInt oop9;\r    sqInt sp2;\r    sqInt sp3;\r    sqInt valuePointer;\r    sqInt valuePointer1;\r    sqInt valuePointer2;\r    sqInt valuePointer3;\r    sqInt valuePointer4;\r    sqInt valuePointer5;\r    sqInt valuePointer6;\r    sqInt valuePointer7;\r    sqInt valuePointer8;\r    sqInt valuePointer9;\r    sqInt valuePointer10;\r    sqInt valuePointer11;\r    sqInt valuePointer12;\r    sqInt valuePointer13;\r    sqInt valuePointer14;\r    sqInt valuePointer15;\r    sqInt valuePointer16;\r    sqInt valuePointer17;\r    sqInt valuePointer18;\r    sqInt valuePointer19;\r    sqInt valuePointer20;\r    sqInt valuePointer21;\r    sqInt valuePointer22;\r    sqInt valuePointer23;\r    sqInt valuePointer24;\r    sqInt valuePointer25;\r\r\tmem = memory;\r\tparamsArraySize = 40;\r\tif (foo->argumentCount == 0) {\r\t\tresult = instantiateClassindexableSize(fetchPointerofObject(ClassArray, foo->specialObjectsOop), paramsArraySize);\r\t\t/* begin pushRemappableOop: */\r\t\tfoo->remapBuffer[(foo->remapBufferCount += 1)] = result;\r\t\t/* begin pushRemappableOop: */\r\t\toop = positive64BitIntegerFor(foo->statFullGCMSecs);\r\t\tfoo->remapBuffer[(foo->remapBufferCount += 1)] = oop;\r\t\t/* begin pushRemappableOop: */\r\t\toop1 = positive64BitIntegerFor(foo->statIncrGCMSecs);\r\t\tfoo->remapBuffer[(foo->remapBufferCount += 1)] = oop1;\r\t\t/* begin pushRemappableOop: */\r\t\toop2 = positive64BitIntegerFor(foo->statGCTime);\r\t\tfoo->remapBuffer[(foo->remapBufferCount += 1)] = oop2;\r\t\t/* begin pushRemappableOop: */\r\t\toop3 = positive64BitIntegerFor(foo->statIGCDeltaTime);\r\t\tfoo->remapBuffer[(foo->remapBufferCount += 1)] = oop3;\r\t\t/* begin popRemappableOop */\r\t\toop4 = foo->remapBuffer[foo->remapBufferCount];\r\t\tfoo->remapBufferCount -= 1;\r\t\tstatIGCDeltaTimeObj = oop4;\r\t\t/* begin popRemappableOop */\r\t\toop5 = foo->remapBuffer[foo->remapBufferCount];\r\t\tfoo->remapBufferCount -= 1;\r\t\tstatGCTimeObj = oop5;\r\t\t/* begin popRemappableOop */\r\t\toop6 = foo->remapBuffer[foo->remapBufferCount];\r\t\tfoo->remapBufferCount -= 1;\r\t\tstatIncrGCMSecsObj = oop6;\r\t\t/* begin popRemappableOop */\r\t\toop7 = foo->remapBuffer[foo->remapBufferCount];\r\t\tfoo->remapBufferCount -= 1;\r\t\tstatFullGCMSecsObj = oop7;\r\t\t/* begin popRemappableOop */\r\t\toop8 = foo->remapBuffer[foo->remapBufferCount];\r\t\tfoo->remapBufferCount -= 1;\r\t\tresult = oop8;\r\t\tfor (i = 0; i <= (paramsArraySize - 1); i += 1) {\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(result, ConstZero);\r\t\t\t}\r\t\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (i << (SHIFT_FOR_WORD)), ConstZero);\r\t\t}\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer = positive64BitIntegerFor(foo->youngStart - mem);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)), valuePointer);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer1 = positive64BitIntegerFor(foo->freeBlock - mem);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer1);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (1 << (SHIFT_FOR_WORD)), valuePointer1);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer2 = positive64BitIntegerFor(foo->endOfMemory - mem);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer2);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (2 << (SHIFT_FOR_WORD)), valuePointer2);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer3 = ((foo->allocationCount << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer3);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (3 << (SHIFT_FOR_WORD)), valuePointer3);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer4 = ((foo->allocationsBetweenGCs << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer4);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (4 << (SHIFT_FOR_WORD)), valuePointer4);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer5 = ((foo->tenuringThreshold << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer5);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (5 << (SHIFT_FOR_WORD)), valuePointer5);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer6 = ((foo->statFullGCs << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer6);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (6 << (SHIFT_FOR_WORD)), valuePointer6);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, statFullGCMSecsObj);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (7 << (SHIFT_FOR_WORD)), statFullGCMSecsObj);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer7 = ((foo->statIncrGCs << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer7);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (8 << (SHIFT_FOR_WORD)), valuePointer7);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, statIncrGCMSecsObj);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (9 << (SHIFT_FOR_WORD)), statIncrGCMSecsObj);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer8 = ((foo->statTenures << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer8);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (10 << (SHIFT_FOR_WORD)), valuePointer8);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer9 = ((foo->rootTableCount << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer9);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (20 << (SHIFT_FOR_WORD)), valuePointer9);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer10 = ((foo->statRootTableOverflows << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer10);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (21 << (SHIFT_FOR_WORD)), valuePointer10);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer11 = positive64BitIntegerFor(extraVMMemory);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer11);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (22 << (SHIFT_FOR_WORD)), valuePointer11);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer12 = positive64BitIntegerFor(foo->shrinkThreshold);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer12);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (23 << (SHIFT_FOR_WORD)), valuePointer12);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer13 = positive64BitIntegerFor(foo->growHeadroom);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer13);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (24 << (SHIFT_FOR_WORD)), valuePointer13);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer14 = ((foo->interruptChecksEveryNms << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer14);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (25 << (SHIFT_FOR_WORD)), valuePointer14);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer15 = ((foo->statMarkCount << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer15);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (26 << (SHIFT_FOR_WORD)), valuePointer15);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer16 = ((foo->statSweepCount << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer16);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (27 << (SHIFT_FOR_WORD)), valuePointer16);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer17 = ((foo->statMkFwdCount << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer17);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (28 << (SHIFT_FOR_WORD)), valuePointer17);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer18 = ((foo->statCompMoveCount << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer18);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (29 << (SHIFT_FOR_WORD)), valuePointer18);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer19 = ((foo->statGrowMemory << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer19);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (30 << (SHIFT_FOR_WORD)), valuePointer19);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer20 = ((foo->statShrinkMemory << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer20);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (31 << (SHIFT_FOR_WORD)), valuePointer20);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer21 = ((foo->statRootTableCount << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer21);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (32 << (SHIFT_FOR_WORD)), valuePointer21);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer22 = ((foo->statAllocationCount << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer22);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (33 << (SHIFT_FOR_WORD)), valuePointer22);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer23 = ((foo->statSurvivorCount << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer23);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (34 << (SHIFT_FOR_WORD)), valuePointer23);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, statGCTimeObj);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (35 << (SHIFT_FOR_WORD)), statGCTimeObj);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer24 = ((foo->statSpecialMarkCount << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer24);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (36 << (SHIFT_FOR_WORD)), valuePointer24);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, statIGCDeltaTimeObj);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (37 << (SHIFT_FOR_WORD)), statIGCDeltaTimeObj);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer25 = ((foo->statpendingFinalizationSignals << 1) | 1);\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, valuePointer25);\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (38 << (SHIFT_FOR_WORD)), valuePointer25);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tif ((((usqInt) result)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(result, (((BYTES_PER_WORD) << 1) | 1));\r\t\t}\r\t\tlongAtput((result + (BASE_HEADER_SIZE)) + (39 << (SHIFT_FOR_WORD)), (((BYTES_PER_WORD) << 1) | 1));\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), result);\r\t\tfoo->stackPointer = sp;\r\t\treturn null;\r\t}\r\targ = longAt(foo->stackPointer);\r\tif (!((arg & 1))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\targ = (arg >> 1);\r\tresultLargePositiveInteger = -1;\r\tif (foo->argumentCount == 1) {\r\t\tif ((arg < 1) || (arg > paramsArraySize)) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t\tif (arg == 1) {\r\t\t\tresultLargePositiveInteger = foo->youngStart - mem;\r\t\t}\r\t\tif (arg == 2) {\r\t\t\tresultLargePositiveInteger = foo->freeBlock - mem;\r\t\t}\r\t\tif (arg == 3) {\r\t\t\tresultLargePositiveInteger = foo->endOfMemory - mem;\r\t\t}\r\t\tif (arg == 4) {\r\t\t\tresult = foo->allocationCount;\r\t\t}\r\t\tif (arg == 5) {\r\t\t\tresult = foo->allocationsBetweenGCs;\r\t\t}\r\t\tif (arg == 6) {\r\t\t\tresult = foo->tenuringThreshold;\r\t\t}\r\t\tif (arg == 7) {\r\t\t\tresult = foo->statFullGCs;\r\t\t}\r\t\tif (arg == 8) {\r\t\t\tresultLargePositiveInteger = foo->statFullGCMSecs;\r\t\t}\r\t\tif (arg == 9) {\r\t\t\tresult = foo->statIncrGCs;\r\t\t}\r\t\tif (arg == 10) {\r\t\t\tresultLargePositiveInteger = foo->statIncrGCMSecs;\r\t\t}\r\t\tif (arg == 11) {\r\t\t\tresult = foo->statTenures;\r\t\t}\r\t\tif ((arg >= 12) && (arg <= 20)) {\r\t\t\tresult = 0;\r\t\t}\r\t\tif (arg == 21) {\r\t\t\tresult = foo->rootTableCount;\r\t\t}\r\t\tif (arg == 22) {\r\t\t\tresult = foo->statRootTableOverflows;\r\t\t}\r\t\tif (arg == 23) {\r\t\t\tresultLargePositiveInteger = extraVMMemory;\r\t\t}\r\t\tif (arg == 24) {\r\t\t\tresultLargePositiveInteger = foo->shrinkThreshold;\r\t\t}\r\t\tif (arg == 25) {\r\t\t\tresultLargePositiveInteger = foo->growHeadroom;\r\t\t}\r\t\tif (arg == 26) {\r\t\t\tresult = foo->interruptChecksEveryNms;\r\t\t}\r\t\tif (arg == 27) {\r\t\t\tresult = foo->statMarkCount;\r\t\t}\r\t\tif (arg == 28) {\r\t\t\tresult = foo->statSweepCount;\r\t\t}\r\t\tif (arg == 29) {\r\t\t\tresult = foo->statMkFwdCount;\r\t\t}\r\t\tif (arg == 30) {\r\t\t\tresult = foo->statCompMoveCount;\r\t\t}\r\t\tif (arg == 31) {\r\t\t\tresult = foo->statGrowMemory;\r\t\t}\r\t\tif (arg == 32) {\r\t\t\tresult = foo->statShrinkMemory;\r\t\t}\r\t\tif (arg == 33) {\r\t\t\tresult = foo->statRootTableCount;\r\t\t}\r\t\tif (arg == 34) {\r\t\t\tresult = foo->statAllocationCount;\r\t\t}\r\t\tif (arg == 35) {\r\t\t\tresult = foo->statSurvivorCount;\r\t\t}\r\t\tif (arg == 36) {\r\t\t\tresultLargePositiveInteger = foo->statGCTime;\r\t\t}\r\t\tif (arg == 37) {\r\t\t\tresult = foo->statSpecialMarkCount;\r\t\t}\r\t\tif (arg == 38) {\r\t\t\tresultLargePositiveInteger = foo->statIGCDeltaTime;\r\t\t}\r\t\tif (arg == 39) {\r\t\t\tresult = foo->statpendingFinalizationSignals;\r\t\t}\r\t\tif (arg == 40) {\r\t\t\tresult = BYTES_PER_WORD;\r\t\t}\r\t\tif (resultLargePositiveInteger == -1) {\r\t\t\t/* begin pop:thenPush: */\r\t\t\tlongAtput(sp1 = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), ((result << 1) | 1));\r\t\t\tfoo->stackPointer = sp1;\r\t\t} else {\r\t\t\t/* begin pop:thenPush: */\r\t\t\toop9 = positive64BitIntegerFor(resultLargePositiveInteger);\r\t\t\tlongAtput(sp2 = foo->stackPointer - ((2 - 1) * (BYTES_PER_WORD)), oop9);\r\t\t\tfoo->stackPointer = sp2;\r\t\t}\r\t\treturn null;\r\t}\r\tif (!(foo->argumentCount == 2)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tindex = longAt(foo->stackPointer - (1 * (BYTES_PER_WORD)));\r\tif (!((index & 1))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tindex = (index >> 1);\r\tif (index <= 0) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tfoo->successFlag = 0;\r\tif (index == 5) {\r\t\tresult = foo->allocationsBetweenGCs;\r\t\tfoo->allocationsBetweenGCs = arg;\r\t\tfoo->successFlag = 1;\r\t}\r\tif (index == 6) {\r\t\tresult = foo->tenuringThreshold;\r\t\tfoo->tenuringThreshold = arg;\r\t\tfoo->successFlag = 1;\r\t}\r\tif (index == 23) {\r\t\tresult = extraVMMemory;\r\t\textraVMMemory = arg;\r\t\tfoo->successFlag = 1;\r\t}\r\tif (index == 24) {\r\t\tresult = foo->shrinkThreshold;\r\t\tif (arg > 0) {\r\t\t\tfoo->shrinkThreshold = arg;\r\t\t\tfoo->successFlag = 1;\r\t\t}\r\t}\r\tif (index == 25) {\r\t\tresult = foo->growHeadroom;\r\t\tif (arg > 0) {\r\t\t\tfoo->growHeadroom = arg;\r\t\t\tfoo->successFlag = 1;\r\t\t}\r\t}\r\tif (index == 26) {\r\t\tif (arg > 1) {\r\t\t\tresult = foo->interruptChecksEveryNms;\r\t\t\tfoo->interruptChecksEveryNms = arg;\r\t\t\tfoo->successFlag = 1;\r\t\t}\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin pop:thenPush: */\r\t\tlongAtput(sp3 = foo->stackPointer - ((3 - 1) * (BYTES_PER_WORD)), ((result << 1) | 1));\r\t\tfoo->stackPointer = sp3;\r\t\treturn null;\r\t}\r\t/* begin primitiveFail */\r\tfoo->successFlag = 0;\r}\r\r\r/*\tReturn a string containing the path name of VM's directory. */\r\rsqInt primitiveVMPath(void) {\rregister struct foo * foo = &fum;\r    sqInt s;\r    sqInt sz;\r    sqInt sp;\r\r\tsz = vmPathSize();\r\ts = instantiateClassindexableSize(fetchPointerofObject(ClassString, foo->specialObjectsOop), sz);\r\tvmPathGetLength(s + (BASE_HEADER_SIZE), sz);\r\t/* begin pop:thenPush: */\r\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), s);\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tAnswer a string corresponding to the version of virtual machine. This\r\trepresents the version level of the Smalltalk source code (interpreter and various\r\tplugins) that is translated to C by a CCodeGenerator,  in addition to the external\r\tplatform source code, typically written in C and managed separately for each platform.\r\tBy convention, this is a string composed of the interpreter source version and the\r\tplatform source version, e.g. '4.0.2-2172'.\r\t\r\tThis is a named (not numbered) primitive in the null module (ie the VM) */\r\rEXPORT(sqInt) primitiveVMVersion(void) {\rregister struct foo * foo = &fum;\r    sqInt len;\r    void * p;\r    sqInt versionString;\r    sqInt sp;\r\r\t\r# ifdef VM_VERSION  // version level of interpreter plus platform support code\r\tlen = strlen(VM_VERSION);\r\tversionString = instantiateClassindexableSize(fetchPointerofObject(ClassString, foo->specialObjectsOop), len);\r\t/* begin arrayValueOf: */\r\tif ((!((versionString & 1))) && (((versionString & 1) == 0) && (isWordsOrBytesNonInt(versionString)))) {\r\t\tp = pointerForOop(versionString + (BASE_HEADER_SIZE));\r\t\tgoto l1;\r\t}\r\t/* begin primitiveFail */\r\tfoo->successFlag = 0;\rl1:\t/* end arrayValueOf: */;\r\tstrncpy(p, VM_VERSION, len);\r# else\r\t/* begin primitiveFail */\r\tfoo->successFlag = 0;\r\treturn null;\r# endif  // VM_VERSION\r\t\r\t/* begin pop:thenPush: */\r\tlongAtput(sp = foo->stackPointer - ((1 - 1) * (BYTES_PER_WORD)), versionString);\r\tfoo->stackPointer = sp;\r}\r\rsqInt primitiveValue(void) {\rregister struct foo * foo = &fum;\r    sqInt blockArgumentCount;\r    sqInt blockContext;\r    sqInt initialIP;\r    sqInt count;\r    sqInt firstFrom;\r    sqInt fromOop;\r    sqInt fromIndex;\r    sqInt lastFrom;\r    sqInt toIndex;\r    sqInt value;\r    sqInt valuePointer;\r    sqInt activeCntx;\r    sqInt tmp;\r    sqInt successValue;\r    sqInt valuePointer1;\r    sqInt valuePointer2;\r    sqInt localArgCount;\r\r\tblockContext = longAt(foo->stackPointer - (foo->argumentCount * (BYTES_PER_WORD)));\r\t/* begin argumentCountOfBlock: */\r\tlocalArgCount = longAt((blockContext + (BASE_HEADER_SIZE)) + (BlockArgumentCountIndex << (SHIFT_FOR_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((localArgCount & 1)) {\r\t\tblockArgumentCount = (localArgCount >> 1);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tblockArgumentCount = 0;\r\t\tgoto l1;\r\t}\r\tblockArgumentCount = null;\rl1:\t/* end argumentCountOfBlock: */;\r\t/* begin success: */\r\tsuccessValue = (foo->argumentCount == blockArgumentCount) && ((longAt((blockContext + (BASE_HEADER_SIZE)) + (CallerIndex << (SHIFT_FOR_WORD)))) == foo->nilObj);\r\tfoo->successFlag = successValue && foo->successFlag;\r\tif (foo->successFlag) {\r\t\t/* begin transfer:fromIndex:ofObject:toIndex:ofObject: */\r\t\tcount = foo->argumentCount;\r\t\tfirstFrom = ((((usqInt) ((foo->stackPointer - foo->activeContext) - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD)) - foo->argumentCount) + 1;\r\t\tfromOop = foo->activeContext;\r\t\tflag(\"Dan\");\r\t\tfromIndex = fromOop + (firstFrom * (BYTES_PER_WORD));\r\t\ttoIndex = blockContext + (TempFrameStart * (BYTES_PER_WORD));\r\t\tlastFrom = fromIndex + (count * (BYTES_PER_WORD));\r\t\twhile ((((usqInt) fromIndex)) < (((usqInt) lastFrom))) {\r\t\t\tfromIndex += BYTES_PER_WORD;\r\t\t\ttoIndex += BYTES_PER_WORD;\r\t\t\tlongAtput(toIndex, longAt(fromIndex));\r\t\t}\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= (foo->argumentCount + 1) * (BYTES_PER_WORD);\r\t\tinitialIP = longAt((blockContext + (BASE_HEADER_SIZE)) + (InitialIPIndex << (SHIFT_FOR_WORD)));\r\t\tlongAtput((blockContext + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), initialIP);\r\t\t/* begin storeStackPointerValue:inContext: */\r\t\tvalue = foo->argumentCount;\r\t\tlongAtput((blockContext + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)), ((value << 1) | 1));\r\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\tvaluePointer = foo->activeContext;\r\t\tlongAtput((blockContext + (BASE_HEADER_SIZE)) + (CallerIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t/* begin newActiveContext: */\r\t\t/* begin storeContextRegisters: */\r\t\tactiveCntx = foo->activeContext;\r\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\tvaluePointer1 = ((((foo->instructionPointer - foo->method) - ((BASE_HEADER_SIZE) - 2)) << 1) | 1);\r\t\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\tvaluePointer2 = (((((((usqInt) ((foo->stackPointer - foo->activeContext) - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD)) - TempFrameStart) + 1) << 1) | 1);\r\t\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)), valuePointer2);\r\t\tif ((((usqInt) blockContext)) < (((usqInt) foo->youngStart))) {\r\t\t\tbeRootIfOld(blockContext);\r\t\t}\r\t\tfoo->activeContext = blockContext;\r\t\t/* begin fetchContextRegisters: */\r\t\ttmp = longAt((blockContext + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\t\tif ((tmp & 1)) {\r\t\t\ttmp = longAt((blockContext + (BASE_HEADER_SIZE)) + (HomeIndex << (SHIFT_FOR_WORD)));\r\t\t\tif ((((usqInt) tmp)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tbeRootIfOld(tmp);\r\t\t\t}\r\t\t} else {\r\t\t\ttmp = blockContext;\r\t\t}\r\t\tfoo->theHomeContext = tmp;\r\t\tfoo->receiver = longAt((tmp + (BASE_HEADER_SIZE)) + (ReceiverIndex << (SHIFT_FOR_WORD)));\r\t\tfoo->method = longAt((tmp + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\t\ttmp = ((longAt((blockContext + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\t\tfoo->instructionPointer = ((foo->method + tmp) + (BASE_HEADER_SIZE)) - 2;\r\t\ttmp = ((longAt((blockContext + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\t\tfoo->stackPointer = (blockContext + (BASE_HEADER_SIZE)) + (((TempFrameStart + tmp) - 1) * (BYTES_PER_WORD));\r\t}\r}\r\r\r/*\tThe only purpose of this primitive is to indicate that the new EH mechanisms are supported. */\r\rsqInt primitiveValueUninterruptably(void) {\r\treturn primitiveValue();\r}\r\rsqInt primitiveValueWithArgs(void) {\rregister struct foo * foo = &fum;\r    sqInt argumentArray;\r    sqInt arrayArgumentCount;\r    sqInt blockArgumentCount;\r    sqInt blockContext;\r    sqInt initialIP;\r    sqInt sz;\r    sqInt header;\r    sqInt successValue;\r    sqInt fromIndex;\r    sqInt lastFrom;\r    sqInt toIndex;\r    sqInt valuePointer;\r    sqInt activeCntx;\r    sqInt tmp;\r    sqInt top;\r    sqInt top1;\r    sqInt valuePointer1;\r    sqInt valuePointer2;\r    sqInt localArgCount;\r\r\t/* begin popStack */\r\ttop = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\targumentArray = top;\r\t/* begin popStack */\r\ttop1 = longAt(foo->stackPointer);\r\tfoo->stackPointer -= BYTES_PER_WORD;\r\tblockContext = top1;\r\t/* begin argumentCountOfBlock: */\r\tlocalArgCount = longAt((blockContext + (BASE_HEADER_SIZE)) + (BlockArgumentCountIndex << (SHIFT_FOR_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((localArgCount & 1)) {\r\t\tblockArgumentCount = (localArgCount >> 1);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\tblockArgumentCount = 0;\r\t\tgoto l2;\r\t}\r\tblockArgumentCount = null;\rl2:\t/* end argumentCountOfBlock: */;\r\tif (!(((argumentArray & 1) == 0) && (((((usqInt) (longAt(argumentArray))) >> 8) & 15) == 2))) {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin fetchWordLengthOf: */\r\t\t/* begin sizeBitsOf: */\r\t\theader = longAt(argumentArray);\r\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(argumentArray - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\tsz = header & (SIZE_MASK);\r\t\t\tgoto l1;\r\t\t}\r\tl1:\t/* end sizeBitsOf: */;\r\t\tarrayArgumentCount = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\t/* begin success: */\r\t\tsuccessValue = (arrayArgumentCount == blockArgumentCount) && ((longAt((blockContext + (BASE_HEADER_SIZE)) + (CallerIndex << (SHIFT_FOR_WORD)))) == foo->nilObj);\r\t\tfoo->successFlag = successValue && foo->successFlag;\r\t}\r\tif (foo->successFlag) {\r\t\t/* begin transfer:fromIndex:ofObject:toIndex:ofObject: */\r\t\tflag(\"Dan\");\r\t\tfromIndex = argumentArray + (0 * (BYTES_PER_WORD));\r\t\ttoIndex = blockContext + (TempFrameStart * (BYTES_PER_WORD));\r\t\tlastFrom = fromIndex + (arrayArgumentCount * (BYTES_PER_WORD));\r\t\twhile ((((usqInt) fromIndex)) < (((usqInt) lastFrom))) {\r\t\t\tfromIndex += BYTES_PER_WORD;\r\t\t\ttoIndex += BYTES_PER_WORD;\r\t\t\tlongAtput(toIndex, longAt(fromIndex));\r\t\t}\r\t\tinitialIP = longAt((blockContext + (BASE_HEADER_SIZE)) + (InitialIPIndex << (SHIFT_FOR_WORD)));\r\t\tlongAtput((blockContext + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), initialIP);\r\t\t/* begin storeStackPointerValue:inContext: */\r\t\tlongAtput((blockContext + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)), ((arrayArgumentCount << 1) | 1));\r\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\tvaluePointer = foo->activeContext;\r\t\tlongAtput((blockContext + (BASE_HEADER_SIZE)) + (CallerIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t/* begin newActiveContext: */\r\t\t/* begin storeContextRegisters: */\r\t\tactiveCntx = foo->activeContext;\r\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\tvaluePointer1 = ((((foo->instructionPointer - foo->method) - ((BASE_HEADER_SIZE) - 2)) << 1) | 1);\r\t\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\tvaluePointer2 = (((((((usqInt) ((foo->stackPointer - foo->activeContext) - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD)) - TempFrameStart) + 1) << 1) | 1);\r\t\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)), valuePointer2);\r\t\tif ((((usqInt) blockContext)) < (((usqInt) foo->youngStart))) {\r\t\t\tbeRootIfOld(blockContext);\r\t\t}\r\t\tfoo->activeContext = blockContext;\r\t\t/* begin fetchContextRegisters: */\r\t\ttmp = longAt((blockContext + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\t\tif ((tmp & 1)) {\r\t\t\ttmp = longAt((blockContext + (BASE_HEADER_SIZE)) + (HomeIndex << (SHIFT_FOR_WORD)));\r\t\t\tif ((((usqInt) tmp)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tbeRootIfOld(tmp);\r\t\t\t}\r\t\t} else {\r\t\t\ttmp = blockContext;\r\t\t}\r\t\tfoo->theHomeContext = tmp;\r\t\tfoo->receiver = longAt((tmp + (BASE_HEADER_SIZE)) + (ReceiverIndex << (SHIFT_FOR_WORD)));\r\t\tfoo->method = longAt((tmp + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\t\ttmp = ((longAt((blockContext + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\t\tfoo->instructionPointer = ((foo->method + tmp) + (BASE_HEADER_SIZE)) - 2;\r\t\ttmp = ((longAt((blockContext + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\t\tfoo->stackPointer = (blockContext + (BASE_HEADER_SIZE)) + (((TempFrameStart + tmp) - 1) * (BYTES_PER_WORD));\r\t} else {\r\t\t/* begin unPop: */\r\t\tfoo->stackPointer += 2 * (BYTES_PER_WORD);\r\t}\r}\r\rsqInt primitiveWait(void) {\rregister struct foo * foo = &fum;\r    sqInt activeProc;\r    sqInt excessSignals;\r    sqInt sema;\r    sqInt oop;\r    sqInt oop1;\r    sqInt lastLink;\r    sqInt oop2;\r    sqInt classOop;\r    sqInt ccIndex;\r    sqInt cl;\r    sqInt oop11;\r    sqInt oop21;\r    sqInt oop3;\r\r\r\t/* rcvr */\r\r\tsema = longAt(foo->stackPointer);\r\t/* begin assertClassOf:is: */\r\t/* begin fetchPointer:ofObject: */\r\toop3 = foo->specialObjectsOop;\r\tclassOop = longAt((oop3 + (BASE_HEADER_SIZE)) + (ClassSemaphore << (SHIFT_FOR_WORD)));\r\tif ((sema & 1)) {\r\t\tfoo->successFlag = 0;\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(sema))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tcl = (longAt(sema - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop21 = foo->specialObjectsOop;\r\t\toop11 = longAt((oop21 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tcl = longAt((oop11 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t}\r\t/* begin success: */\r\tfoo->successFlag = (cl == classOop) && foo->successFlag;\rl1:\t/* end assertClassOf:is: */;\r\tif (foo->successFlag) {\r\t\texcessSignals = fetchIntegerofObject(ExcessSignalsIndex, sema);\r\t\tif (excessSignals > 0) {\r\t\t\t/* begin storeInteger:ofObject:withValue: */\r\t\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t\t(((((int) (excessSignals - 1))) ^ ((((int) (excessSignals - 1))) << 1)) >= 0)\r# else\r\t\t\t\t(((excessSignals - 1) >= -1073741824) && ((excessSignals - 1) <= 1073741823))\r# endif  // SQ_HOST32\r\t\t\t) {\r\t\t\t\tlongAtput((sema + (BASE_HEADER_SIZE)) + (ExcessSignalsIndex << (SHIFT_FOR_WORD)), (((excessSignals - 1) << 1) | 1));\r\t\t\t} else {\r\t\t\t\t/* begin primitiveFail */\r\t\t\t\tfoo->successFlag = 0;\r\t\t\t}\r\t\t} else {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop2 = foo->specialObjectsOop;\r\t\t\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\t\t\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\t\tactiveProc = longAt((oop + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)));\r\t\t\t/* begin addLastLink:toList: */\r\t\t\tif ((longAt((sema + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)))) == foo->nilObj) {\r\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\tif ((((usqInt) sema)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\tpossibleRootStoreIntovalue(sema, activeProc);\r\t\t\t\t}\r\t\t\t\tlongAtput((sema + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)), activeProc);\r\t\t\t} else {\r\t\t\t\tlastLink = longAt((sema + (BASE_HEADER_SIZE)) + (LastLinkIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\t\tif ((((usqInt) lastLink)) < (((usqInt) foo->youngStart))) {\r\t\t\t\t\tpossibleRootStoreIntovalue(lastLink, activeProc);\r\t\t\t\t}\r\t\t\t\tlongAtput((lastLink + (BASE_HEADER_SIZE)) + (NextLinkIndex << (SHIFT_FOR_WORD)), activeProc);\r\t\t\t}\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tif ((((usqInt) sema)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(sema, activeProc);\r\t\t\t}\r\t\t\tlongAtput((sema + (BASE_HEADER_SIZE)) + (LastLinkIndex << (SHIFT_FOR_WORD)), activeProc);\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tif ((((usqInt) activeProc)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(activeProc, sema);\r\t\t\t}\r\t\t\tlongAtput((activeProc + (BASE_HEADER_SIZE)) + (MyListIndex << (SHIFT_FOR_WORD)), sema);\r\t\t\ttransferTo(wakeHighestPriority());\r\t\t}\r\t}\r}\r\r\r/*\tprimitively do the equivalent of Process>yield */\r\rsqInt primitiveYield(void) {\rregister struct foo * foo = &fum;\r    sqInt activeProc;\r    sqInt priority;\r    sqInt processList;\r    sqInt processLists;\r    sqInt oop;\r    sqInt oop1;\r    sqInt lastLink;\r    sqInt oop2;\r    sqInt oop3;\r    sqInt oop4;\r    sqInt oop5;\r\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\toop4 = foo->specialObjectsOop;\r\toop2 = longAt((oop4 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\toop = longAt((oop2 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\tactiveProc = longAt((oop + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)));\r\tpriority = ((longAt((activeProc + (BASE_HEADER_SIZE)) + (PriorityIndex << (SHIFT_FOR_WORD)))) >> 1);\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\toop5 = foo->specialObjectsOop;\r\toop3 = longAt((oop5 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\toop1 = longAt((oop3 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\tprocessLists = longAt((oop1 + (BASE_HEADER_SIZE)) + (ProcessListsIndex << (SHIFT_FOR_WORD)));\r\tprocessList = longAt((processLists + (BASE_HEADER_SIZE)) + ((priority - 1) << (SHIFT_FOR_WORD)));\r\tif (!((longAt((processList + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)))) == foo->nilObj)) {\r\t\t/* begin addLastLink:toList: */\r\t\tif ((longAt((processList + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)))) == foo->nilObj) {\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tif ((((usqInt) processList)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(processList, activeProc);\r\t\t\t}\r\t\t\tlongAtput((processList + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)), activeProc);\r\t\t} else {\r\t\t\tlastLink = longAt((processList + (BASE_HEADER_SIZE)) + (LastLinkIndex << (SHIFT_FOR_WORD)));\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tif ((((usqInt) lastLink)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(lastLink, activeProc);\r\t\t\t}\r\t\t\tlongAtput((lastLink + (BASE_HEADER_SIZE)) + (NextLinkIndex << (SHIFT_FOR_WORD)), activeProc);\r\t\t}\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tif ((((usqInt) processList)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(processList, activeProc);\r\t\t}\r\t\tlongAtput((processList + (BASE_HEADER_SIZE)) + (LastLinkIndex << (SHIFT_FOR_WORD)), activeProc);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tif ((((usqInt) activeProc)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(activeProc, processList);\r\t\t}\r\t\tlongAtput((activeProc + (BASE_HEADER_SIZE)) + (MyListIndex << (SHIFT_FOR_WORD)), processList);\r\t\ttransferTo(wakeHighestPriority());\r\t}\r}\r\r\r/*\tFor testing in Smalltalk, this method should be overridden in a subclass. */\r\rsqInt print(char *s) {\r\tprintf(\"%s\", s);\r}\r\r\r/*\tPrint all the stacks of all running processes, including those that are currently suspended. */\r\rEXPORT(sqInt) printAllStacks(void) {\rregister struct foo * foo = &fum;\r    sqInt ctx;\r    sqInt oop;\r    sqInt proc;\r    sqInt oop1;\r    sqInt sz;\r    sqInt header;\r    sqInt oop2;\r    sqInt oop3;\r\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\toop3 = foo->specialObjectsOop;\r\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\tproc = longAt((oop1 + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)));\r\tprintNameOfClasscount(fetchClassOf(proc), 5);\r\t/* begin cr */\r\tprintf(\"\\n\");\r\tprintCallStackOf(foo->activeContext);\r\toop = memory + (foo->headerTypeBytes[(longAt(memory)) & TypeMask]);\r\twhile ((((usqInt) oop)) < (((usqInt) foo->endOfMemory))) {\r\t\tif ((fetchClassOf(oop)) == (fetchPointerofObject(ClassSemaphore, foo->specialObjectsOop))) {\r\t\t\t/* begin cr */\r\t\t\tprintf(\"\\n\");\r\t\t\tproc = longAt((oop + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)));\r\t\t\twhile (!(proc == foo->nilObj)) {\r\t\t\t\tprintNameOfClasscount(fetchClassOf(proc), 5);\r\t\t\t\t/* begin cr */\r\t\t\t\tprintf(\"\\n\");\r\t\t\t\tctx = longAt((proc + (BASE_HEADER_SIZE)) + (SuspendedContextIndex << (SHIFT_FOR_WORD)));\r\t\t\t\tif (!(ctx == foo->nilObj)) {\r\t\t\t\t\tprintCallStackOf(ctx);\r\t\t\t\t}\r\t\t\t\tproc = longAt((proc + (BASE_HEADER_SIZE)) + (NextLinkIndex << (SHIFT_FOR_WORD)));\r\t\t\t}\r\t\t}\r\t\t/* begin objectAfter: */\r\t\tif (DoAssertionChecks) {\r\t\t\tif ((((usqInt) oop)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t}\r\t\t}\r\t\tif (((longAt(oop)) & TypeMask) == HeaderTypeFree) {\r\t\t\tsz = (longAt(oop)) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader = longAt(oop);\r\t\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tsz = header & (SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\tl1:\t/* end sizeBitsOf: */;\r\t\t}\r\t\toop = (oop + sz) + (foo->headerTypeBytes[(longAt(oop + sz)) & TypeMask]);\r\t}\r}\r\rsqInt printCallStack(void) {\r\treturn printCallStackOf(foo->activeContext);\r}\r\rsqInt printCallStackOf(sqInt aContext) {\rregister struct foo * foo = &fum;\r    sqInt ctxt;\r    sqInt home;\r    sqInt message;\r    sqInt methClass;\r    sqInt methodSel;\r    sqInt meth;\r    sqInt rcvr;\r    sqInt classDict;\r    sqInt classDictSize;\r    sqInt currClass;\r    sqInt done;\r    sqInt i;\r    sqInt methodArray;\r    sqInt sz;\r    sqInt ccIndex;\r    sqInt ccIndex1;\r    sqInt oop;\r    sqInt oop1;\r    sqInt header;\r    sqInt oop2;\r    sqInt oop3;\r    sqInt oop4;\r    sqInt oop5;\r    sqInt meth1;\r    sqInt rcvr1;\r    sqInt classDict1;\r    sqInt classDictSize1;\r    sqInt currClass1;\r    sqInt done1;\r    sqInt i1;\r    sqInt methodArray1;\r    sqInt sz1;\r    sqInt ccIndex2;\r    sqInt oop6;\r    sqInt oop11;\r    sqInt header1;\r    sqInt oop21;\r\r\tctxt = aContext;\r\twhile (!(ctxt == foo->nilObj)) {\r\t\tif ((fetchClassOf(ctxt)) == (fetchPointerofObject(ClassBlockContext, foo->specialObjectsOop))) {\r\t\t\thome = longAt((ctxt + (BASE_HEADER_SIZE)) + (HomeIndex << (SHIFT_FOR_WORD)));\r\t\t} else {\r\t\t\thome = ctxt;\r\t\t}\r\t\t/* begin findClassOfMethod:forReceiver: */\r\t\tmeth = longAt((home + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\t\trcvr = longAt((home + (BASE_HEADER_SIZE)) + (ReceiverIndex << (SHIFT_FOR_WORD)));\r\t\t/* begin fetchClassOf: */\r\t\tif ((rcvr & 1)) {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop = foo->specialObjectsOop;\r\t\t\tcurrClass = longAt((oop + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\t\tgoto l1;\r\t\t}\r\t\tccIndex = (((usqInt) (longAt(rcvr))) >> 12) & 31;\r\t\tif (ccIndex == 0) {\r\t\t\tcurrClass = (longAt(rcvr - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\t\tgoto l1;\r\t\t} else {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop4 = foo->specialObjectsOop;\r\t\t\toop1 = longAt((oop4 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\t\tcurrClass = longAt((oop1 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\t\tgoto l1;\r\t\t}\r\tl1:\t/* end fetchClassOf: */;\r\t\tdone = 0;\r\t\twhile (!(done)) {\r\t\t\tclassDict = longAt((currClass + (BASE_HEADER_SIZE)) + (MessageDictionaryIndex << (SHIFT_FOR_WORD)));\r\t\t\t/* begin fetchWordLengthOf: */\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader = longAt(classDict);\r\t\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(classDict - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l2;\r\t\t\t} else {\r\t\t\t\tsz = header & (SIZE_MASK);\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\tl2:\t/* end sizeBitsOf: */;\r\t\t\tclassDictSize = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\t\tmethodArray = longAt((classDict + (BASE_HEADER_SIZE)) + (MethodArrayIndex << (SHIFT_FOR_WORD)));\r\t\t\ti = 0;\r\t\t\twhile (i < (classDictSize - SelectorStart)) {\r\t\t\t\tif (meth == (longAt((methodArray + (BASE_HEADER_SIZE)) + (i << (SHIFT_FOR_WORD))))) {\r\t\t\t\t\tmethClass = currClass;\r\t\t\t\t\tgoto l3;\r\t\t\t\t}\r\t\t\t\ti += 1;\r\t\t\t}\r\t\t\tcurrClass = longAt((currClass + (BASE_HEADER_SIZE)) + (SuperclassIndex << (SHIFT_FOR_WORD)));\r\t\t\tdone = currClass == foo->nilObj;\r\t\t}\r\t\t/* begin fetchClassOf: */\r\t\tif ((rcvr & 1)) {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop2 = foo->specialObjectsOop;\r\t\t\tmethClass = longAt((oop2 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\t\tgoto l3;\r\t\t}\r\t\tccIndex1 = (((usqInt) (longAt(rcvr))) >> 12) & 31;\r\t\tif (ccIndex1 == 0) {\r\t\t\tmethClass = (longAt(rcvr - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\t\tgoto l3;\r\t\t} else {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop5 = foo->specialObjectsOop;\r\t\t\toop3 = longAt((oop5 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\t\tmethClass = longAt((oop3 + (BASE_HEADER_SIZE)) + ((ccIndex1 - 1) << (SHIFT_FOR_WORD)));\r\t\t\tgoto l3;\r\t\t}\r\t\tmethClass = null;\r\tl3:\t/* end findClassOfMethod:forReceiver: */;\r\t\t/* begin findSelectorOfMethod:forReceiver: */\r\t\tmeth1 = longAt((home + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\t\trcvr1 = longAt((home + (BASE_HEADER_SIZE)) + (ReceiverIndex << (SHIFT_FOR_WORD)));\r\t\t/* begin fetchClassOf: */\r\t\tif ((rcvr1 & 1)) {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop6 = foo->specialObjectsOop;\r\t\t\tcurrClass1 = longAt((oop6 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\t\tgoto l4;\r\t\t}\r\t\tccIndex2 = (((usqInt) (longAt(rcvr1))) >> 12) & 31;\r\t\tif (ccIndex2 == 0) {\r\t\t\tcurrClass1 = (longAt(rcvr1 - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\t\tgoto l4;\r\t\t} else {\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\t/* begin fetchPointer:ofObject: */\r\t\t\toop21 = foo->specialObjectsOop;\r\t\t\toop11 = longAt((oop21 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\t\tcurrClass1 = longAt((oop11 + (BASE_HEADER_SIZE)) + ((ccIndex2 - 1) << (SHIFT_FOR_WORD)));\r\t\t\tgoto l4;\r\t\t}\r\tl4:\t/* end fetchClassOf: */;\r\t\tdone1 = 0;\r\t\twhile (!(done1)) {\r\t\t\tclassDict1 = longAt((currClass1 + (BASE_HEADER_SIZE)) + (MessageDictionaryIndex << (SHIFT_FOR_WORD)));\r\t\t\t/* begin fetchWordLengthOf: */\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader1 = longAt(classDict1);\r\t\t\tif ((header1 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz1 = (longAt(classDict1 - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l5;\r\t\t\t} else {\r\t\t\t\tsz1 = header1 & (SIZE_MASK);\r\t\t\t\tgoto l5;\r\t\t\t}\r\t\tl5:\t/* end sizeBitsOf: */;\r\t\t\tclassDictSize1 = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\t\tmethodArray1 = longAt((classDict1 + (BASE_HEADER_SIZE)) + (MethodArrayIndex << (SHIFT_FOR_WORD)));\r\t\t\ti1 = 0;\r\t\t\twhile (i1 <= (classDictSize1 - SelectorStart)) {\r\t\t\t\tif (meth1 == (longAt((methodArray1 + (BASE_HEADER_SIZE)) + (i1 << (SHIFT_FOR_WORD))))) {\r\t\t\t\t\tmethodSel = longAt((classDict1 + (BASE_HEADER_SIZE)) + ((i1 + SelectorStart) << (SHIFT_FOR_WORD)));\r\t\t\t\t\tgoto l6;\r\t\t\t\t}\r\t\t\t\ti1 += 1;\r\t\t\t}\r\t\t\tcurrClass1 = longAt((currClass1 + (BASE_HEADER_SIZE)) + (SuperclassIndex << (SHIFT_FOR_WORD)));\r\t\t\tdone1 = currClass1 == foo->nilObj;\r\t\t}\r\t\tmethodSel = foo->nilObj;\r\tl6:\t/* end findSelectorOfMethod:forReceiver: */;\r\t\tprintNum(ctxt);\r\t\tprint(\" \");\r\t\tif (!(ctxt == home)) {\r\t\t\tprint(\"[] in \");\r\t\t}\r\t\tprintNameOfClasscount(methClass, 5);\r\t\tprint(\">\");\r\t\tif (methodSel == foo->nilObj) {\r\t\t\tprint(\"?\");\r\t\t} else {\r\t\t\tprintStringOf(methodSel);\r\t\t}\r\t\tif (methodSel == (fetchPointerofObject(SelectorDoesNotUnderstand, foo->specialObjectsOop))) {\r\r\t\t\t/* print arg message selector */\r\r\t\t\tmessage = longAt((home + (BASE_HEADER_SIZE)) + ((0 + TempFrameStart) << (SHIFT_FOR_WORD)));\r\t\t\tmethodSel = longAt((message + (BASE_HEADER_SIZE)) + (MessageSelectorIndex << (SHIFT_FOR_WORD)));\r\t\t\tprint(\" \");\r\t\t\tprintStringOf(methodSel);\r\t\t}\r\t\t/* begin cr */\r\t\tprintf(\"\\n\");\r\t\tctxt = longAt((ctxt + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\t}\r}\r\r\r/*\tDetails: The count argument is used to avoid a possible infinite recursion if classOop is a corrupted object. */\r\rsqInt printNameOfClasscount(sqInt classOop, sqInt cnt) {\r\tif (cnt <= 0) {\r\t\treturn print(\"bad class\");\r\t}\r\tif ((sizeBitsOf(classOop)) == (7 * (BYTES_PER_WORD))) {\r\t\tprintNameOfClasscount(longAt((classOop + (BASE_HEADER_SIZE)) + (5 << (SHIFT_FOR_WORD))), cnt - 1);\r\t\tprint(\" class\");\r\t} else {\r\t\tprintStringOf(longAt((classOop + (BASE_HEADER_SIZE)) + (6 << (SHIFT_FOR_WORD))));\r\t}\r}\r\r\r/*\tFor testing in Smalltalk, this method should be overridden in a subclass. */\r\rsqInt printNum(sqInt n) {\r\tprintf(\"%ld\", (long) n);\r}\r\rsqInt printStringOf(sqInt oop) {\r    sqInt cnt;\r    sqInt fmt;\r    sqInt i;\r\r\tif ((oop & 1)) {\r\t\treturn null;\r\t}\r\tfmt = (((usqInt) (longAt(oop))) >> 8) & 15;\r\tif (fmt < 8) {\r\t\treturn null;\r\t}\r\tcnt = ((100 < (lengthOf(oop))) ? 100 : (lengthOf(oop)));\r\ti = 0;\r\twhile (i < cnt) {\r\t\t/* begin printChar: */\r\t\tputchar(byteAt((oop + (BASE_HEADER_SIZE)) + i));\r\t\ti += 1;\r\t}\r}\r\rsqInt printUnbalancedStack(sqInt primIdx) {\r\tprint(\"Stack unbalanced after \");\r\tif (foo->successFlag) {\r\t\tprint(\"successful primitive \");\r\t} else {\r\t\tprint(\"failed primitive \");\r\t}\r\tprintNum(primIdx);\r\t/* begin cr */\r\tprintf(\"\\n\");\r}\r\rsqInt push(sqInt object) {\rregister struct foo * foo = &fum;\r    sqInt sp;\r\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\tfoo->stackPointer = sp;\r}\r\rsqInt pushBool(sqInt trueOrFalse) {\rregister struct foo * foo = &fum;\r    sqInt sp;\r    sqInt sp1;\r\r\tif (trueOrFalse) {\r\t\t/* begin push: */\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\tfoo->stackPointer = sp;\r\t} else {\r\t\t/* begin push: */\r\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\tfoo->stackPointer = sp1;\r\t}\r}\r\rsqInt pushFloat(double  f) {\rregister struct foo * foo = &fum;\r    sqInt object;\r    sqInt sp;\r\r\t/* begin push: */\r\tobject = floatObjectOf(f);\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), object);\r\tfoo->stackPointer = sp;\r}\r\rsqInt pushInteger(sqInt integerValue) {\rregister struct foo * foo = &fum;\r    sqInt sp;\r\r\t/* begin push: */\r\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), ((integerValue << 1) | 1));\r\tfoo->stackPointer = sp;\r}\r\r\r/*\tRecord the given object in a the remap buffer. Objects in this buffer are remapped when a compaction occurs. This facility is used by the interpreter to ensure that objects in temporary variables are properly remapped. */\r\rsqInt pushRemappableOop(sqInt oop) {\rregister struct foo * foo = &fum;\r\tfoo->remapBuffer[(foo->remapBufferCount += 1)] = oop;\r}\r\r\r/*\tAppend aWord to aFile in this platforms 'natural' byte order.  (Bytes will be swapped, if\r\tnecessary, when the image is read on a different platform.) Set successFlag to false if\r\tthe write fails. */\r\rsqInt putLongtoFile(sqInt aWord, sqImageFile  aFile) {\rregister struct foo * foo = &fum;\r    sqInt objectsWritten;\r\r\tobjectsWritten = sqImageFileWrite(&aWord, sizeof(aWord), 1, aFile);\r\t/* begin success: */\r\tfoo->successFlag = (objectsWritten == 1) && foo->successFlag;\r}\r\r\r/*\tRead an image header from the given file stream, and answer the image format\r\tversion number for the saved image. Exported to allow platform support code to\r\tquery image files for image format number. */\r\rEXPORT(sqInt) readImageFormatFromFileStartingAt(sqImageFile  f, squeakFileOffsetType  imageOffset) {\r\tcheckImageVersionFromstartingAt(f, imageOffset);\r\treturn imageFormatInitialVersion;\r}\r\r\r/*\tRead an image from the given file stream, allocating the given amount of memory to its object heap. Fail if the image has an unknown format or requires more than the given amount of memory. */\r/*\tDetails: This method detects when the image was stored on a machine with the opposite byte ordering from this machine and swaps the bytes automatically. Furthermore, it allows the header information to start 512 bytes into the file, since some file transfer programs for the Macintosh apparently prepend a Mac-specific header of this size. Note that this same 512 bytes of prefix area could also be used to store an exec command on Unix systems, allowing one to launch Smalltalk by invoking the image name as a command. */\r/*\tThis code is based on C code by Ian Piumarta and Smalltalk code by Tim Rowledge. Many thanks to both of you!! */\r\rsqInt readImageFromFileHeapSizeStartingAt(sqImageFile  f, usqInt desiredHeapSize, squeakFileOffsetType  imageOffset) {\rregister struct foo * foo = &fum;\r    size_t bytesRead;\r    sqInt bytesToShift;\r    size_t  dataSize;\r    sqInt headerSize;\r    squeakFileOffsetType  headerStart;\r    sqInt heapSize;\r    sqInt memStart;\r    sqInt minimumMemory;\r    sqInt oldBaseAddr;\r    sqInt swapBytes;\r    sqInt flagsWord;\r    char *memoryAddress;\r    sqInt startAddr;\r    sqInt stopAddr;\r    sqInt addr;\r\r\tswapBytes = checkImageVersionFromstartingAt(f, imageOffset);\r\r\t/* record header start position */\r\r\theaderStart = (sqImageFilePosition(f)) - (BYTES_PER_WORD);\r\theaderSize = getLongFromFileswap(f, swapBytes);\r\tdataSize = getLongFromFileswap(f, swapBytes);\r\toldBaseAddr = getLongFromFileswap(f, swapBytes);\r\tfoo->specialObjectsOop = getLongFromFileswap(f, swapBytes);\r\tfoo->lastHash = getLongFromFileswap(f, swapBytes);\r\tfoo->savedWindowSize = getLongFromFileswap(f, swapBytes);\r\t/* begin oldFormatFullScreenFlag: */\r\tflagsWord = getLongFromFileswap(f, swapBytes);\r\tfoo->fullScreenFlag = flagsWord & 1;\r\textraVMMemory = getLongFromFileswap(f, swapBytes);\r\tif (foo->lastHash == 0) {\r\r\t\t/* lastHash wasn't stored (e.g. by the cloner); use 999 as the seed */\r\r\t\tfoo->lastHash = 999;\r\t}\r\theapSize = reserveExtraCHeapBytes(desiredHeapSize, extraVMMemory);\r\r\t/* need at least 100K of breathing room */\r\r\tminimumMemory = dataSize + 100000;\r\tif (heapSize < minimumMemory) {\r\t\tinsufficientMemorySpecifiedError();\r\t}\r\tmemory = allocateMemoryMinimumImageFileHeaderSize(heapSize, minimumMemory, f, headerSize);\r\tif (memory == null) {\r\t\tinsufficientMemoryAvailableError();\r\t}\r\tmemStart = memory;\r\r\t/* decrease memoryLimit a tad for safety */\r\r\tfoo->memoryLimit = (memStart + heapSize) - 24;\r\r\t/* position file after the header */\r\r\tfoo->endOfMemory = memStart + dataSize;\r\tsqImageFileSeek(f, headerStart + headerSize);\r\t/* begin sqImage:read:size:length: */\r\tmemoryAddress = pointerForOop(memory);\r\tbytesRead = sqImageFileReadEntireImage(memoryAddress, sizeof(unsigned char), dataSize, f);\r\tif (bytesRead != dataSize) {\r\t\tunableToReadImageError();\r\t}\r\tfoo->headerTypeBytes[0] = ((BYTES_PER_WORD) * 2);\r\tfoo->headerTypeBytes[1] = (BYTES_PER_WORD);\r\tfoo->headerTypeBytes[2] = 0;\r\tfoo->headerTypeBytes[3] = 0;\r\tif (swapBytes) {\r\t\t/* begin reverseBytesInImage */\r\t\t/* begin reverseBytesFrom:to: */\r\t\tstartAddr = memory;\r\t\tstopAddr = foo->endOfMemory;\r\t\tflag(\"Dan\");\r\t\taddr = startAddr;\r\t\twhile ((((usqInt) addr)) < (((usqInt) stopAddr))) {\r\t\t\tlongAtput(addr, byteSwapped(longAt(addr)));\r\t\t\taddr += BYTES_PER_WORD;\r\t\t}\r\t\t/* begin byteSwapByteObjects */\r\t\tbyteSwapByteObjectsFromto(memory + (foo->headerTypeBytes[(longAt(memory)) & TypeMask]), foo->endOfMemory);\r\t}\r\tbytesToShift = memStart - oldBaseAddr;\r\tinitializeInterpreter(bytesToShift);\r\tisBigEnder();\r\tif ((imageFormatInitialVersion & 1) == 1) {\r\t\tnormalizeFloatOrderingInImage();\r\t}\r\treturn dataSize;\r}\r\r\r/*\tAnwer true if images of the given format are readable by this interpreter. Allows\r\ta virtual machine to accept selected older image formats.  In our case we can\r\tselect a newer (closure) image format as well as the existing format. Images with\r\tplatform-ordered floats (StackInterpreter and Cog format) are readable but will be\r\tconverted to traditional word ordering. */\r\rsqInt readableFormat(sqInt imageVersion) {\r\tif ((BYTES_PER_WORD) == 4) {\r\t\treturn ((imageVersion == 6502) || (imageVersion == 6504)) || (imageVersion == 6505);\r\t} else {\r\t\treturn ((imageVersion == 68000) || (imageVersion == 68002)) || (imageVersion == 68003);\r\t}\r}\r\r\r/*\tcallbackContext is an activation of invokeCallback:stack:registers:jmpbuf:.  Its sender\r\t is the interpreter's state prior to the callback.  Reestablish that state. */\r\rEXPORT(sqInt) reestablishContextPriorToCallback(sqInt callbackContext) {\rregister struct foo * foo = &fum;\r    sqInt calloutContext;\r    sqInt activeCntx;\r    sqInt tmp;\r    sqInt valuePointer;\r    sqInt valuePointer1;\r\r\tif ((fetchClassOf(callbackContext)) != (fetchPointerofObject(ClassMethodContext, foo->specialObjectsOop))) {\r\t\treturn 0;\r\t}\r\tcalloutContext = longAt((callbackContext + (BASE_HEADER_SIZE)) + (SenderIndex << (SHIFT_FOR_WORD)));\r\t/* begin newActiveContext: */\r\t/* begin storeContextRegisters: */\r\tactiveCntx = foo->activeContext;\r\t/* begin storePointerUnchecked:ofObject:withValue: */\r\tvaluePointer = ((((foo->instructionPointer - foo->method) - ((BASE_HEADER_SIZE) - 2)) << 1) | 1);\r\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t/* begin storePointerUnchecked:ofObject:withValue: */\r\tvaluePointer1 = (((((((usqInt) ((foo->stackPointer - foo->activeContext) - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD)) - TempFrameStart) + 1) << 1) | 1);\r\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\tif ((((usqInt) calloutContext)) < (((usqInt) foo->youngStart))) {\r\t\tbeRootIfOld(calloutContext);\r\t}\r\tfoo->activeContext = calloutContext;\r\t/* begin fetchContextRegisters: */\r\ttmp = longAt((calloutContext + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\tif ((tmp & 1)) {\r\t\ttmp = longAt((calloutContext + (BASE_HEADER_SIZE)) + (HomeIndex << (SHIFT_FOR_WORD)));\r\t\tif ((((usqInt) tmp)) < (((usqInt) foo->youngStart))) {\r\t\t\tbeRootIfOld(tmp);\r\t\t}\r\t} else {\r\t\ttmp = calloutContext;\r\t}\r\tfoo->theHomeContext = tmp;\r\tfoo->receiver = longAt((tmp + (BASE_HEADER_SIZE)) + (ReceiverIndex << (SHIFT_FOR_WORD)));\r\tfoo->method = longAt((tmp + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\ttmp = ((longAt((calloutContext + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tfoo->instructionPointer = ((foo->method + tmp) + (BASE_HEADER_SIZE)) - 2;\r\ttmp = ((longAt((calloutContext + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tfoo->stackPointer = (calloutContext + (BASE_HEADER_SIZE)) + (((TempFrameStart + tmp) - 1) * (BYTES_PER_WORD));\r\treturn 1;\r}\r\r\r/*\tMap the given oop to its new value during a compaction or \r\tbecome: operation. If it has no forwarding table entry, \r\treturn the oop itself. */\r\rsqInt remap(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt fwdBlock;\r\r\tif (((oop & 1) == 0) && (((longAt(oop)) & (MARK_BIT)) != 0)) {\r\r\t\t/* get the new value for oop from its forwarding block */\r\r\t\tfwdBlock = ((longAt(oop)) & (ALL_BUT_MARK_BIT_AND_TYPE_MASK)) << 1;\r\t\tif (DoAssertionChecks) {\r\t\t\t/* begin fwdBlockValidate: */\r\t\t\tif (!(((((usqInt) fwdBlock)) > (((usqInt) foo->endOfMemory))) && (((((usqInt) fwdBlock)) <= (((usqInt) foo->fwdTableNext))) && ((fwdBlock & 3) == 0)))) {\r\t\t\t\terror(\"invalid fwd table entry\");\r\t\t\t}\r\t\t}\r\t\treturn longAt(fwdBlock);\r\t}\r\treturn oop;\r}\r\r\r/*\tRemove the first process from the given linked list. */\r\rsqInt removeFirstLinkOfList(sqInt aList) {\rregister struct foo * foo = &fum;\r    sqInt first;\r    sqInt last;\r    sqInt next;\r    sqInt valuePointer;\r    sqInt valuePointer1;\r    sqInt valuePointer2;\r\r\tfirst = longAt((aList + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)));\r\tlast = longAt((aList + (BASE_HEADER_SIZE)) + (LastLinkIndex << (SHIFT_FOR_WORD)));\r\tif (first == last) {\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer = foo->nilObj;\r\t\tif ((((usqInt) aList)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(aList, valuePointer);\r\t\t}\r\t\tlongAtput((aList + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer1 = foo->nilObj;\r\t\tif ((((usqInt) aList)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(aList, valuePointer1);\r\t\t}\r\t\tlongAtput((aList + (BASE_HEADER_SIZE)) + (LastLinkIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\t} else {\r\t\tnext = longAt((first + (BASE_HEADER_SIZE)) + (NextLinkIndex << (SHIFT_FOR_WORD)));\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tif ((((usqInt) aList)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(aList, next);\r\t\t}\r\t\tlongAtput((aList + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)), next);\r\t}\r\t/* begin storePointer:ofObject:withValue: */\r\tvaluePointer2 = foo->nilObj;\r\tif ((((usqInt) first)) < (((usqInt) foo->youngStart))) {\r\t\tpossibleRootStoreIntovalue(first, valuePointer2);\r\t}\r\tlongAtput((first + (BASE_HEADER_SIZE)) + (NextLinkIndex << (SHIFT_FOR_WORD)), valuePointer2);\r\treturn first;\r}\r\r\r/*\tRemove the given variable location to the extra roots table */\r\rEXPORT(sqInt) removeGCRoot(sqInt *varLoc) {\rregister struct foo * foo = &fum;\r    sqInt i;\r    sqInt *root;\r\r\tfor (i = 1; i <= foo->extraRootCount; i += 1) {\r\t\troot = foo->extraRoots[i];\r\t\tif (root == varLoc) {\r\t\t\tfoo->extraRoots[i] = (foo->extraRoots[foo->extraRootCount]);\r\t\t\tfoo->extraRootCount -= 1;\r\t\t\treturn 1;\r\t\t}\r\t}\r\treturn 0;\r}\r\r\r/*\tRestore the original header of the given oop from its \r\tforwarding block. */\r\rsqInt restoreHeaderOf(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt fwdBlock;\r    sqInt fwdHeader;\r\r\tfwdHeader = longAt(oop);\r\tfwdBlock = (fwdHeader & (ALL_BUT_MARK_BIT_AND_TYPE_MASK)) << 1;\r\tif (DoAssertionChecks) {\r\t\tif ((fwdHeader & (MARK_BIT)) == 0) {\r\t\t\terror(\"attempting to restore the header of an object that has no forwarding block\");\r\t\t}\r\t\t/* begin fwdBlockValidate: */\r\t\tif (!(((((usqInt) fwdBlock)) > (((usqInt) foo->endOfMemory))) && (((((usqInt) fwdBlock)) <= (((usqInt) foo->fwdTableNext))) && ((fwdBlock & 3) == 0)))) {\r\t\t\terror(\"invalid fwd table entry\");\r\t\t}\r\t}\r\tlongAtput(oop, longAt(fwdBlock + (BYTES_PER_WORD)));\r}\r\r\r/*\tRestore headers smashed by forwarding links */\r\rsqInt restoreHeadersFromtofromandtofrom(sqInt firstIn, sqInt lastIn, sqInt hdrBaseIn, sqInt firstOut, sqInt lastOut, sqInt hdrBaseOut) {\rregister struct foo * foo = &fum;\r    sqInt header;\r    sqInt oop;\r    sqInt tablePtr;\r    sqInt sz;\r    sqInt header1;\r\r\ttablePtr = firstIn;\r\twhile ((((usqInt) tablePtr)) <= (((usqInt) lastIn))) {\r\t\toop = longAt(tablePtr);\r\t\theader = longAt(hdrBaseIn + (tablePtr - firstIn));\r\t\tlongAtput(oop, header);\r\t\ttablePtr += BYTES_PER_WORD;\r\t}\r\ttablePtr = firstOut;\r\twhile ((((usqInt) tablePtr)) <= (((usqInt) lastOut))) {\r\t\toop = longAt(tablePtr);\r\t\theader = longAt(hdrBaseOut + (tablePtr - firstOut));\r\t\tlongAtput(oop, header);\r\t\ttablePtr += BYTES_PER_WORD;\r\t}\r\toop = memory + (foo->headerTypeBytes[(longAt(memory)) & TypeMask]);\r\twhile ((((usqInt) oop)) < (((usqInt) foo->endOfMemory))) {\r\t\tif (!(((longAt(oop)) & TypeMask) == HeaderTypeFree)) {\r\t\t\tlongAtput(oop, (longAt(oop)) & (ALL_BUT_MARK_BIT));\r\t\t}\r\t\t/* begin objectAfter: */\r\t\tif (DoAssertionChecks) {\r\t\t\tif ((((usqInt) oop)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t}\r\t\t}\r\t\tif (((longAt(oop)) & TypeMask) == HeaderTypeFree) {\r\t\t\tsz = (longAt(oop)) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader1 = longAt(oop);\r\t\t\tif ((header1 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tsz = header1 & (SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\tl1:\t/* end sizeBitsOf: */;\r\t\t}\r\t\toop = (oop + sz) + (foo->headerTypeBytes[(longAt(oop + sz)) & TypeMask]);\r\t}\r}\r\rsqInt resume(sqInt aProcess) {\rregister struct foo * foo = &fum;\r    sqInt activePriority;\r    sqInt activeProc;\r    sqInt newPriority;\r    sqInt oop;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt priority;\r    sqInt processList;\r    sqInt processLists;\r    sqInt oop3;\r    sqInt oop11;\r    sqInt lastLink;\r    sqInt oop21;\r    sqInt priority1;\r    sqInt processList1;\r    sqInt processLists1;\r    sqInt oop4;\r    sqInt oop12;\r    sqInt lastLink1;\r    sqInt oop22;\r\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\toop2 = foo->specialObjectsOop;\r\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\tactiveProc = longAt((oop + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)));\r\tactivePriority = ((longAt((activeProc + (BASE_HEADER_SIZE)) + (PriorityIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tnewPriority = ((longAt((aProcess + (BASE_HEADER_SIZE)) + (PriorityIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tif (newPriority > activePriority) {\r\t\t/* begin putToSleep: */\r\t\tpriority = ((longAt((activeProc + (BASE_HEADER_SIZE)) + (PriorityIndex << (SHIFT_FOR_WORD)))) >> 1);\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop21 = foo->specialObjectsOop;\r\t\toop11 = longAt((oop21 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\t\toop3 = longAt((oop11 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\tprocessLists = longAt((oop3 + (BASE_HEADER_SIZE)) + (ProcessListsIndex << (SHIFT_FOR_WORD)));\r\t\tprocessList = longAt((processLists + (BASE_HEADER_SIZE)) + ((priority - 1) << (SHIFT_FOR_WORD)));\r\t\t/* begin addLastLink:toList: */\r\t\tif ((longAt((processList + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)))) == foo->nilObj) {\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tif ((((usqInt) processList)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(processList, activeProc);\r\t\t\t}\r\t\t\tlongAtput((processList + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)), activeProc);\r\t\t} else {\r\t\t\tlastLink = longAt((processList + (BASE_HEADER_SIZE)) + (LastLinkIndex << (SHIFT_FOR_WORD)));\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tif ((((usqInt) lastLink)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(lastLink, activeProc);\r\t\t\t}\r\t\t\tlongAtput((lastLink + (BASE_HEADER_SIZE)) + (NextLinkIndex << (SHIFT_FOR_WORD)), activeProc);\r\t\t}\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tif ((((usqInt) processList)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(processList, activeProc);\r\t\t}\r\t\tlongAtput((processList + (BASE_HEADER_SIZE)) + (LastLinkIndex << (SHIFT_FOR_WORD)), activeProc);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tif ((((usqInt) activeProc)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(activeProc, processList);\r\t\t}\r\t\tlongAtput((activeProc + (BASE_HEADER_SIZE)) + (MyListIndex << (SHIFT_FOR_WORD)), processList);\r\t\ttransferTo(aProcess);\r\t} else {\r\t\t/* begin putToSleep: */\r\t\tpriority1 = ((longAt((aProcess + (BASE_HEADER_SIZE)) + (PriorityIndex << (SHIFT_FOR_WORD)))) >> 1);\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop22 = foo->specialObjectsOop;\r\t\toop12 = longAt((oop22 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\t\toop4 = longAt((oop12 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\t\tprocessLists1 = longAt((oop4 + (BASE_HEADER_SIZE)) + (ProcessListsIndex << (SHIFT_FOR_WORD)));\r\t\tprocessList1 = longAt((processLists1 + (BASE_HEADER_SIZE)) + ((priority1 - 1) << (SHIFT_FOR_WORD)));\r\t\t/* begin addLastLink:toList: */\r\t\tif ((longAt((processList1 + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)))) == foo->nilObj) {\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tif ((((usqInt) processList1)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(processList1, aProcess);\r\t\t\t}\r\t\t\tlongAtput((processList1 + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)), aProcess);\r\t\t} else {\r\t\t\tlastLink1 = longAt((processList1 + (BASE_HEADER_SIZE)) + (LastLinkIndex << (SHIFT_FOR_WORD)));\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tif ((((usqInt) lastLink1)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(lastLink1, aProcess);\r\t\t\t}\r\t\t\tlongAtput((lastLink1 + (BASE_HEADER_SIZE)) + (NextLinkIndex << (SHIFT_FOR_WORD)), aProcess);\r\t\t}\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tif ((((usqInt) processList1)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(processList1, aProcess);\r\t\t}\r\t\tlongAtput((processList1 + (BASE_HEADER_SIZE)) + (LastLinkIndex << (SHIFT_FOR_WORD)), aProcess);\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tif ((((usqInt) aProcess)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(aProcess, processList1);\r\t\t}\r\t\tlongAtput((aProcess + (BASE_HEADER_SIZE)) + (MyListIndex << (SHIFT_FOR_WORD)), processList1);\r\t}\r}\r\r\r/*\tReverse the given range of Display words (at different bit \r\tdepths, this will reverse different numbers of pixels). Used to \r\tgive feedback during VM activities such as garbage \r\tcollection when debugging. It is assumed that the given \r\tword range falls entirely within the first line of the Display. */\r\rsqInt reverseDisplayFromto(sqInt startIndex, sqInt endIndex) {\rregister struct foo * foo = &fum;\r    sqInt dispBitsPtr;\r    sqInt displayObj;\r    sqInt ptr;\r    sqInt reversed;\r    sqInt w;\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\tdisplayObj = longAt((oop + (BASE_HEADER_SIZE)) + (TheDisplay << (SHIFT_FOR_WORD)));\r\tif (!((((displayObj & 1) == 0) && (((((usqInt) (longAt(displayObj))) >> 8) & 15) <= 4)) && ((lengthOf(displayObj)) >= 4))) {\r\t\treturn null;\r\t}\r\tw = fetchIntegerofObject(1, displayObj);\r\tdispBitsPtr = longAt((displayObj + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)));\r\tif ((dispBitsPtr & 1)) {\r\t\treturn null;\r\t}\r\tdispBitsPtr += BASE_HEADER_SIZE;\r\tfor (ptr = (dispBitsPtr + (startIndex * 4)); ptr <= (dispBitsPtr + (endIndex * 4)); ptr += 4) {\r\t\treversed = (long32At(ptr)) ^ 4294967295U;\r\t\tlongAtput(ptr, reversed);\r\t}\r\tfoo->successFlag = 1;\r\tdisplayBitsOfLeftTopRightBottom(displayObj, 0, 0, w, 1);\r\tioForceDisplayUpdate();\r}\r\r\r/*\tRewrite the cache entry with the given primitive index and matching function pointer */\r\rsqInt rewriteMethodCacheSelclassprimIndex(sqInt selector, sqInt class, sqInt localPrimIndex) {\r    void *primPtr;\r\r\tif (localPrimIndex == 0) {\r\t\tprimPtr = 0;\r\t} else {\r\t\tprimPtr = primitiveTable[localPrimIndex];\r\t}\r\trewriteMethodCacheSelclassprimIndexprimFunction(selector, class, localPrimIndex, primPtr);\r}\r\r\r/*\tRewrite an existing entry in the method cache with a new primitive \r\tindex & function address. Used by primExternalCall to make direct jumps to found external prims */\r\rsqInt rewriteMethodCacheSelclassprimIndexprimFunction(sqInt selector, sqInt class, sqInt localPrimIndex, void *localPrimAddress) {\rregister struct foo * foo = &fum;\r    sqInt hash;\r    sqInt p;\r    sqInt probe;\r\r\thash = selector ^ class;\r\tfor (p = 0; p <= (CacheProbeMax - 1); p += 1) {\r\t\tprobe = (((usqInt) hash) >> p) & MethodCacheMask;\r\t\tif (((foo->methodCache[probe + MethodCacheSelector]) == selector) && ((foo->methodCache[probe + MethodCacheClass]) == class)) {\r\t\t\tfoo->methodCache[probe + MethodCachePrim] = localPrimIndex;\r\t\t\tfoo->methodCache[probe + MethodCachePrimFunction] = (((long) localPrimAddress));\r\t\t\treturn null;\r\t\t}\r\t}\r}\r\r\r/*\tSend the 4 argument callback message invokeCallback:stack:registers:jmpbuf:\r\t to Alien class with the supplied args.  The arguments are raw C addresses\r\t and are converted to integer objects on the way. */\r\rEXPORT(sqInt) sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt regsPtr, sqInt jmpBufPtr) {\rregister struct foo * foo = &fum;\r    sqInt where;\r    sqInt oop;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r    sqInt oop4;\r    sqInt oop5;\r    sqInt ccIndex;\r    sqInt oop6;\r    sqInt oop7;\r    sqInt activeCntx;\r    sqInt i;\r    sqInt initialIP;\r    sqInt methodHeader;\r    sqInt needsLarge;\r    sqInt newContext;\r    sqInt tempCount;\r    sqInt where1;\r    sqInt methodPointer;\r    sqInt activeCntx1;\r    sqInt tmp;\r    sqInt oop8;\r    sqInt valuePointer;\r    sqInt valuePointer1;\r\r\t/* begin pushRemappableOop: */\r\toop = positive32BitIntegerFor(jmpBufPtr);\r\tfoo->remapBuffer[(foo->remapBufferCount += 1)] = oop;\r\t/* begin pushRemappableOop: */\r\toop1 = positive32BitIntegerFor(regsPtr);\r\tfoo->remapBuffer[(foo->remapBufferCount += 1)] = oop1;\r\t/* begin pushRemappableOop: */\r\toop2 = positive32BitIntegerFor(stackPtr);\r\tfoo->remapBuffer[(foo->remapBufferCount += 1)] = oop2;\r\t/* begin pushRemappableOop: */\r\toop3 = positive32BitIntegerFor(thunkPtr);\r\tfoo->remapBuffer[(foo->remapBufferCount += 1)] = oop3;\r\t/* begin fetchPointer:ofObject: */\r\toop4 = foo->specialObjectsOop;\r\tfoo->receiver = longAt((oop4 + (BASE_HEADER_SIZE)) + (ClassAlien << (SHIFT_FOR_WORD)));\r\t/* begin fetchClassOfNonInt: */\r\toop5 = foo->receiver;\r\tccIndex = (((usqInt) (longAt(oop5))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tfoo->lkupClass = (longAt(oop5 - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop8 = foo->specialObjectsOop;\r\t\toop7 = longAt((oop8 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tfoo->lkupClass = longAt((oop7 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\rl1:\t/* end fetchClassOfNonInt: */;\r\t/* begin fetchPointer:ofObject: */\r\toop6 = foo->specialObjectsOop;\r\tfoo->messageSelector = longAt((oop6 + (BASE_HEADER_SIZE)) + (InvokeCallbackSelector << (SHIFT_FOR_WORD)));\r\tif (!(lookupInMethodCacheSelclass(foo->messageSelector, foo->lkupClass))) {\r\t\tif (!(lookupMethodNoMNUEtcInClass(foo->lkupClass))) {\r\t\t\treturn 0;\r\t\t}\r\t}\r\tif (foo->primitiveIndex != 0) {\r\t\treturn 0;\r\t}\r\t/* begin storeContextRegisters: */\r\tactiveCntx = foo->activeContext;\r\t/* begin storePointerUnchecked:ofObject:withValue: */\r\tvaluePointer = ((((foo->instructionPointer - foo->method) - ((BASE_HEADER_SIZE) - 2)) << 1) | 1);\r\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t/* begin storePointerUnchecked:ofObject:withValue: */\r\tvaluePointer1 = (((((((usqInt) ((foo->stackPointer - foo->activeContext) - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD)) - TempFrameStart) + 1) << 1) | 1);\r\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\t/* begin internalJustActivateNewMethod */\r\t/* begin headerOf: */\r\tmethodPointer = foo->newMethod;\r\tmethodHeader = longAt((methodPointer + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD)));\r\tneedsLarge = methodHeader & LargeContextBit;\r\tif ((needsLarge == 0) && (foo->freeContexts != NilContext)) {\r\t\tnewContext = foo->freeContexts;\r\t\tfoo->freeContexts = longAt((newContext + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)));\r\t} else {\r\t\tnewContext = allocateOrRecycleContext(needsLarge);\r\t}\r\tinitialIP = ((LiteralStart + ((((usqInt) methodHeader) >> 10) & 255)) * (BYTES_PER_WORD)) + 1;\r\ttempCount = (((usqInt) methodHeader) >> 19) & 63;\r\twhere1 = newContext + (BASE_HEADER_SIZE);\r\tlongAtput(where1 + (SenderIndex << (SHIFT_FOR_WORD)), foo->activeContext);\r\tlongAtput(where1 + (InstructionPointerIndex << (SHIFT_FOR_WORD)), ((initialIP << 1) | 1));\r\tlongAtput(where1 + (StackPointerIndex << (SHIFT_FOR_WORD)), ((tempCount << 1) | 1));\r\tlongAtput(where1 + (MethodIndex << (SHIFT_FOR_WORD)), foo->newMethod);\r\tlongAtput(where1 + (ReceiverIndex << (SHIFT_FOR_WORD)), foo->receiver);\r\tneedsLarge = foo->nilObj;\r\tfor (i = (ReceiverIndex + 1); i <= (tempCount + ReceiverIndex); i += 1) {\r\t\tlongAtput(where1 + (i << (SHIFT_FOR_WORD)), needsLarge);\r\t}\r\tfoo->reclaimableContextCount += 1;\r\tfoo->activeContext = newContext;\r\twhere = (foo->activeContext + (BASE_HEADER_SIZE)) + (ReceiverIndex << (SHIFT_FOR_WORD));\r\tlongAtput(where + (1 << (SHIFT_FOR_WORD)), popRemappableOop());\r\tlongAtput(where + (2 << (SHIFT_FOR_WORD)), popRemappableOop());\r\tlongAtput(where + (3 << (SHIFT_FOR_WORD)), popRemappableOop());\r\tlongAtput(where + (4 << (SHIFT_FOR_WORD)), popRemappableOop());\r\t/* begin fetchContextRegisters: */\r\tactiveCntx1 = foo->activeContext;\r\ttmp = longAt((activeCntx1 + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\tif ((tmp & 1)) {\r\t\ttmp = longAt((activeCntx1 + (BASE_HEADER_SIZE)) + (HomeIndex << (SHIFT_FOR_WORD)));\r\t\tif ((((usqInt) tmp)) < (((usqInt) foo->youngStart))) {\r\t\t\tbeRootIfOld(tmp);\r\t\t}\r\t} else {\r\t\ttmp = activeCntx1;\r\t}\r\tfoo->theHomeContext = tmp;\r\tfoo->receiver = longAt((tmp + (BASE_HEADER_SIZE)) + (ReceiverIndex << (SHIFT_FOR_WORD)));\r\tfoo->method = longAt((tmp + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\ttmp = ((longAt((activeCntx1 + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tfoo->instructionPointer = ((foo->method + tmp) + (BASE_HEADER_SIZE)) - 2;\r\ttmp = ((longAt((activeCntx1 + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\tfoo->stackPointer = (activeCntx1 + (BASE_HEADER_SIZE)) + (((TempFrameStart + tmp) - 1) * (BYTES_PER_WORD));\r\tcallInterpreter();\r\treturn 1;\r}\r\rsqInt setCompilerInitialized(sqInt newFlag) {\rregister struct foo * foo = &fum;\r    sqInt oldFlag;\r\r\toldFlag = foo->compilerInitialized;\r\tfoo->compilerInitialized = newFlag;\r\treturn oldFlag;\r}\r\rsqInt setFullScreenFlag(sqInt value) {\r\tfoo->fullScreenFlag = value;\r}\r\rsqInt setInterruptCheckCounter(sqInt value) {\r\tfoo->interruptCheckCounter = value;\r}\r\rsqInt setInterruptKeycode(sqInt value) {\r\tfoo->interruptKeycode = value;\r}\r\rsqInt setInterruptPending(sqInt value) {\r\tfoo->interruptPending = value;\r}\r\r\r/*\tA default substitute for unimplemented ioUtcWithOffset external function. */\r\rsqInt setMicroSecondsandOffset(sqLong *microSeconds, int *utcOffset) {\r\tflag(\"toRemove\");\r\treturn -1;\r}\r\rsqInt setNextWakeupTick(sqInt value) {\r\tfoo->nextWakeupTick = value;\r}\r\rsqInt setSavedWindowSize(sqInt value) {\r\tfoo->savedWindowSize = value;\r}\r\r\r/*\tRepaint the portion of the Smalltalk screen bounded by the affected rectangle. Used to synchronize the screen after a Bitblt to the Smalltalk Display object. */\r\rsqInt showDisplayBitsLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b) {\r\tif (foo->deferDisplayUpdates) {\r\t\treturn null;\r\t}\r\tdisplayBitsOfLeftTopRightBottom(aForm, l, t, r, b);\r}\r\r\r/*\tRecord the given semaphore index in the double buffer semaphores array to be signaled at the next convenient moment. Force a real interrupt check as soon as possible. */\r\rsqInt signalSemaphoreWithIndex(sqInt index) {\rregister struct foo * foo = &fum;\r\tif (index <= 0) {\r\t\treturn null;\r\t}\r\tif (foo->semaphoresUseBufferA) {\r\t\tif (foo->semaphoresToSignalCountA < SemaphoresToSignalSize) {\r\t\t\tfoo->semaphoresToSignalCountA += 1;\r\t\t\tfoo->semaphoresToSignalA[foo->semaphoresToSignalCountA] = index;\r\t\t}\r\t} else {\r\t\tif (foo->semaphoresToSignalCountB < SemaphoresToSignalSize) {\r\t\t\tfoo->semaphoresToSignalCountB += 1;\r\t\t\tfoo->semaphoresToSignalB[foo->semaphoresToSignalCountB] = index;\r\t\t}\r\t}\r\t/* begin forceInterruptCheck */\r\tfoo->interruptCheckCounter = -1000;\r\tfoo->nextPollTick = 0;\r}\r\r\r/*\tReturn a full 32 bit integer object for the given integer value */\r\rsqInt signed32BitIntegerFor(int integerValue) {\rregister struct foo * foo = &fum;\r    sqInt largeClass;\r    sqInt newLargeInteger;\r    sqInt value;\r    sqInt oop;\r    sqInt oop1;\r\r\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t(((((int) integerValue)) ^ ((((int) integerValue)) << 1)) >= 0)\r# else\r\t\t((integerValue >= -1073741824) && (integerValue <= 1073741823))\r# endif  // SQ_HOST32\r\t) {\r\t\treturn ((integerValue << 1) | 1);\r\t}\r\tif (integerValue < 0) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop = foo->specialObjectsOop;\r\t\tlargeClass = longAt((oop + (BASE_HEADER_SIZE)) + (ClassLargeNegativeInteger << (SHIFT_FOR_WORD)));\r\t\tvalue = 0 - integerValue;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tlargeClass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassLargePositiveInteger << (SHIFT_FOR_WORD)));\r\t\tvalue = integerValue;\r\t}\r\tnewLargeInteger = instantiateClassindexableSize(largeClass, 4);\r\tbyteAtput((newLargeInteger + (BASE_HEADER_SIZE)) + 3, (((usqInt) value) >> 24) & 255);\r\tbyteAtput((newLargeInteger + (BASE_HEADER_SIZE)) + 2, (((usqInt) value) >> 16) & 255);\r\tbyteAtput((newLargeInteger + (BASE_HEADER_SIZE)) + 1, (((usqInt) value) >> 8) & 255);\r\tbyteAtput((newLargeInteger + (BASE_HEADER_SIZE)) + 0, value & 255);\r\treturn newLargeInteger;\r}\r\r\r/*\tConvert the given object into an integer value.\r\tThe object may be either a positive ST integer or a four-byte LargeInteger. */\r\rint signed32BitValueOf(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt largeClass;\r    sqInt negative;\r    sqInt sz;\r    int value;\r    sqInt ccIndex;\r    sqInt header;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt sz1;\r    sqInt oop3;\r\r\tif ((oop & 1)) {\r\t\treturn (oop >> 1);\r\t}\r\tif ((lengthOf(oop)) > 4) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin fetchClassOf: */\r\tif ((oop & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tlargeClass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(oop))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tlargeClass = (longAt(oop - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tlargeClass = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\rl1:\t/* end fetchClassOf: */;\r\tif (largeClass == (fetchPointerofObject(ClassLargePositiveInteger, foo->specialObjectsOop))) {\r\t\tnegative = 0;\r\t} else {\r\t\tif (largeClass == (fetchPointerofObject(ClassLargeNegativeInteger, foo->specialObjectsOop))) {\r\t\t\tnegative = 1;\r\t\t} else {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t}\r\t/* begin lengthOf: */\r\theader = longAt(oop);\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz1 = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz1 = header & (SIZE_MASK);\r\t}\r\tsz1 -= header & (SIZE_4_BIT);\r\tif (((((usqInt) header) >> 8) & 15) <= 4) {\r\t\tsz = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tgoto l2;\r\t}\r\tif (((((usqInt) header) >> 8) & 15) < 8) {\r\t\tsz = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> 2;\r\t\tgoto l2;\r\t} else {\r\t\tsz = (sz1 - (BASE_HEADER_SIZE)) - (((((usqInt) header) >> 8) & 15) & 3);\r\t\tgoto l2;\r\t}\rl2:\t/* end lengthOf:baseHeader:format: */;\r\tif (!(sz == 4)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\r\t/* Fail if value exceeds range of a 32-bit two's-complement signed integer. */\r\r\tvalue = (((byteAt((oop + (BASE_HEADER_SIZE)) + 0)) + ((byteAt((oop + (BASE_HEADER_SIZE)) + 1)) << 8)) + ((byteAt((oop + (BASE_HEADER_SIZE)) + 2)) << 16)) + ((byteAt((oop + (BASE_HEADER_SIZE)) + 3)) << 24);\r\tif (negative) {\r\t\tvalue = 0 - value;\r\t\tif (value >= 0) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t} else {\r\t\tif (value < 0) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t}\r\treturn value;\r}\r\r\r/*\tReturn a Large Integer object for the given integer value */\r\rsqInt signed64BitIntegerFor(sqLong integerValue) {\rregister struct foo * foo = &fum;\r    usqInt highWord;\r    sqInt i;\r    sqInt intValue;\r    sqInt largeClass;\r    unsigned sqLong magnitude;\r    sqInt newLargeInteger;\r    sqInt sz;\r    sqInt oop;\r    sqInt oop1;\r\r\tif (integerValue < 0) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop = foo->specialObjectsOop;\r\t\tlargeClass = longAt((oop + (BASE_HEADER_SIZE)) + (ClassLargeNegativeInteger << (SHIFT_FOR_WORD)));\r\t\tmagnitude = 0 - integerValue;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tlargeClass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassLargePositiveInteger << (SHIFT_FOR_WORD)));\r\t\tmagnitude = integerValue;\r\t}\r\tif (magnitude <= 2147483647U) {\r\t\treturn signed32BitIntegerFor(integerValue);\r\t}\r\r\t/* shift is coerced to usqInt otherwise */\r\r\thighWord = magnitude >> 32;\r\tif (highWord == 0) {\r\t\tsz = 4;\r\t} else {\r\t\tsz = 5;\r\t\tif (!((highWord = ((usqInt) highWord) >> 8) == 0)) {\r\t\t\tsz += 1;\r\t\t}\r\t\tif (!((highWord = ((usqInt) highWord) >> 8) == 0)) {\r\t\t\tsz += 1;\r\t\t}\r\t\tif (!((highWord = ((usqInt) highWord) >> 8) == 0)) {\r\t\t\tsz += 1;\r\t\t}\r\t}\r\tnewLargeInteger = instantiateClassindexableSize(largeClass, sz);\r\tfor (i = 0; i <= (sz - 1); i += 1) {\r\t\tintValue = (magnitude >> (i * 8)) & 255;\r\t\tbyteAtput((newLargeInteger + (BASE_HEADER_SIZE)) + i, intValue);\r\t}\r\treturn newLargeInteger;\r}\r\r\r/*\tConvert the given object into an integer value.\r\tThe object may be either a positive ST integer or a eight-byte LargeInteger. */\r\rsqLong signed64BitValueOf(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt i;\r    sqInt largeClass;\r    sqInt negative;\r    sqInt sz;\r    sqInt szsqLong;\r    sqLong value;\r    sqInt header;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt sz1;\r    sqInt oop3;\r\r\tif ((oop & 1)) {\r\t\treturn ((sqLong) ((oop >> 1)));\r\t}\r\t/* begin lengthOf: */\r\theader = longAt(oop);\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz1 = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz1 = header & (SIZE_MASK);\r\t}\r\tsz1 -= header & (SIZE_4_BIT);\r\tif (((((usqInt) header) >> 8) & 15) <= 4) {\r\t\tsz = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tgoto l2;\r\t}\r\tif (((((usqInt) header) >> 8) & 15) < 8) {\r\t\tsz = ((usqInt) (sz1 - (BASE_HEADER_SIZE))) >> 2;\r\t\tgoto l2;\r\t} else {\r\t\tsz = (sz1 - (BASE_HEADER_SIZE)) - (((((usqInt) header) >> 8) & 15) & 3);\r\t\tgoto l2;\r\t}\rl2:\t/* end lengthOf:baseHeader:format: */;\r\tif (sz > 8) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\t/* begin fetchClassOf: */\r\tif ((oop & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tlargeClass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\r\tccIndex = (((usqInt) (longAt(oop))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tlargeClass = (longAt(oop - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tlargeClass = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l1;\r\t}\rl1:\t/* end fetchClassOf: */;\r\tif (largeClass == (fetchPointerofObject(ClassLargePositiveInteger, foo->specialObjectsOop))) {\r\t\tnegative = 0;\r\t} else {\r\t\tif (largeClass == (fetchPointerofObject(ClassLargeNegativeInteger, foo->specialObjectsOop))) {\r\t\t\tnegative = 1;\r\t\t} else {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t}\r\tszsqLong = sizeof(sqLong);\r\tif (sz > szsqLong) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\tvalue = 0;\r\tfor (i = 0; i <= (sz - 1); i += 1) {\r\t\tvalue += (((sqLong) (byteAt((oop + (BASE_HEADER_SIZE)) + i)))) << (i * 8);\r\t}\r\tif (negative) {\r\t\tvalue = 0 - value;\r\t\tif (value >= 0) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t} else {\r\t\tif (value < 0) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t}\r\treturn value;\r}\r\r\r/*\tAnswer the number of bytes in the given object, including its base header, rounded up to an integral number of words. */\r/*\tNote: byte indexable objects need to have low bits subtracted from this size. */\r\rsqInt sizeBitsOf(sqInt oop) {\r    sqInt header;\r\r\theader = longAt(oop);\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\treturn (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\treturn header & (SIZE_MASK);\r\t}\r}\r\r\r/*\tReturn the number of indexable fields of the given object. This method is to be called from an automatically generated C primitive. The argument is assumed to be a pointer to the first indexable field of a words or bytes object; the object header starts 4 bytes before that. */\r/*\tNote: Only called by translated primitive code. */\r\rsqInt sizeOfSTArrayFromCPrimitive(void *cPtr) {\r    sqInt oop;\r    sqInt header;\r    sqInt sz;\r\r\toop = (oopForPointer(((char *) cPtr))) - (BASE_HEADER_SIZE);\r\tif (!(((oop & 1) == 0) && (isWordsOrBytesNonInt(oop)))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn 0;\r\t}\r\t/* begin lengthOf: */\r\theader = longAt(oop);\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz = header & (SIZE_MASK);\r\t}\r\tsz -= header & (SIZE_4_BIT);\r\tif (((((usqInt) header) >> 8) & 15) <= 4) {\r\t\treturn ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t}\r\tif (((((usqInt) header) >> 8) & 15) < 8) {\r\t\treturn ((usqInt) (sz - (BASE_HEADER_SIZE))) >> 2;\r\t} else {\r\t\treturn (sz - (BASE_HEADER_SIZE)) - (((((usqInt) header) >> 8) & 15) & 3);\r\t}\r\treturn null;\r}\r\r\r/*\tReturns the number of slots in the receiver.\r\tIf the receiver is a byte object, return the number of bytes.\r\tOtherwise return the number of words. */\r\rsqInt slotSizeOf(sqInt oop) {\r    sqInt header;\r    sqInt sz;\r\r\tif ((oop & 1)) {\r\t\treturn 0;\r\t}\r\t/* begin lengthOf: */\r\theader = longAt(oop);\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz = header & (SIZE_MASK);\r\t}\r\tsz -= header & (SIZE_4_BIT);\r\tif (((((usqInt) header) >> 8) & 15) <= 4) {\r\t\treturn ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t}\r\tif (((((usqInt) header) >> 8) & 15) < 8) {\r\t\treturn ((usqInt) (sz - (BASE_HEADER_SIZE))) >> 2;\r\t} else {\r\t\treturn (sz - (BASE_HEADER_SIZE)) - (((((usqInt) header) >> 8) & 15) & 3);\r\t}\r\treturn null;\r}\r\r\r/*\tupdate state of active context */\r\rsqInt snapshot(sqInt embedded) {\rregister struct foo * foo = &fum;\r    sqInt activeProc;\r    sqInt dataSize;\r    sqInt rcvr;\r    void *setMacType;\r    sqInt top;\r    sqInt sp;\r    sqInt sp1;\r    sqInt sp2;\r    sqInt oop;\r    sqInt activeCntx;\r    sqInt oop1;\r    sqInt valuePointer;\r    sqInt valuePointer1;\r    sqInt valuePointer2;\r    sqInt oop2;\r    sqInt fmt;\r    sqInt header;\r    sqInt i;\r    sqInt oop3;\r    sqInt sz;\r    sqInt header1;\r    sqInt i1;\r    sqInt oop11;\r    sqInt sz1;\r    sqInt header2;\r\r\tif (foo->compilerInitialized) {\r\t\tcompilerPreSnapshot();\r\t} else {\r\t\t/* begin storeContextRegisters: */\r\t\tactiveCntx = foo->activeContext;\r\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\tvaluePointer1 = ((((foo->instructionPointer - foo->method) - ((BASE_HEADER_SIZE) - 2)) << 1) | 1);\r\t\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\tvaluePointer2 = (((((((usqInt) ((foo->stackPointer - foo->activeContext) - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD)) - TempFrameStart) + 1) << 1) | 1);\r\t\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)), valuePointer2);\r\t}\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\toop2 = foo->specialObjectsOop;\r\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\tactiveProc = longAt((oop + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)));\r\t/* begin storePointer:ofObject:withValue: */\r\tvaluePointer = foo->activeContext;\r\tif ((((usqInt) activeProc)) < (((usqInt) foo->youngStart))) {\r\t\tpossibleRootStoreIntovalue(activeProc, valuePointer);\r\t}\r\tlongAtput((activeProc + (BASE_HEADER_SIZE)) + (SuspendedContextIndex << (SHIFT_FOR_WORD)), valuePointer);\r\tincrementalGC();\r\tfullGC();\r\t/* begin snapshotCleanUp */\r\toop3 = memory + (foo->headerTypeBytes[(longAt(memory)) & TypeMask]);\r\twhile ((((usqInt) oop3)) < (((usqInt) foo->endOfMemory))) {\r\t\tif (!(((longAt(oop3)) & TypeMask) == HeaderTypeFree)) {\r\t\t\theader = longAt(oop3);\r\t\t\tfmt = (((usqInt) header) >> 8) & 15;\r\t\t\tif ((fmt == 3) && ((((((usqInt) header) >> 12) & 31) == 13) || ((((((usqInt) header) >> 12) & 31) == 14) || (((((usqInt) header) >> 12) & 31) == 4)))) {\r\t\t\t\t/* begin sizeBitsOf: */\r\t\t\t\theader1 = longAt(oop3);\r\t\t\t\tif ((header1 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\t\tsz = (longAt(oop3 - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\t\tgoto l1;\r\t\t\t\t} else {\r\t\t\t\t\tsz = header1 & (SIZE_MASK);\r\t\t\t\t\tgoto l1;\r\t\t\t\t}\r\t\t\tl1:\t/* end sizeBitsOf: */;\r\t\t\t\tfor (i = ((lastPointerOf(oop3)) + (BYTES_PER_WORD)); i <= (sz - (BASE_HEADER_SIZE)); i += (BYTES_PER_WORD)) {\r\t\t\t\t\tlongAtput(oop3 + i, foo->nilObj);\r\t\t\t\t}\r\t\t\t}\r\t\t\tif (fmt >= 12) {\r\t\t\t\tif ((primitiveIndexOf(oop3)) == PrimitiveExternalCallIndex) {\r\t\t\t\t\tflushExternalPrimitiveOf(oop3);\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t\t/* begin objectAfter: */\r\t\tif (DoAssertionChecks) {\r\t\t\tif ((((usqInt) oop3)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t}\r\t\t}\r\t\tif (((longAt(oop3)) & TypeMask) == HeaderTypeFree) {\r\t\t\tsz1 = (longAt(oop3)) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader2 = longAt(oop3);\r\t\t\tif ((header2 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz1 = (longAt(oop3 - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l2;\r\t\t\t} else {\r\t\t\t\tsz1 = header2 & (SIZE_MASK);\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\tl2:\t/* end sizeBitsOf: */;\r\t\t}\r\t\toop3 = (oop3 + sz1) + (foo->headerTypeBytes[(longAt(oop3 + sz1)) & TypeMask]);\r\t}\r\t/* begin clearRootsTable */\r\tfor (i1 = 1; i1 <= foo->rootTableCount; i1 += 1) {\r\t\toop11 = foo->rootTable[i1];\r\t\tlongAtput(oop11, (longAt(oop11)) & (ALL_BUT_ROOT_BIT));\r\t\tfoo->rootTable[i1] = 0;\r\t}\r\tfoo->rootTableCount = 0;\r\r\t/* Assume all objects are below the start of the free block */\r\r\tdataSize = foo->freeBlock - memory;\r\tif (foo->successFlag) {\r\t\t/* begin popStack */\r\t\ttop = longAt(foo->stackPointer);\r\t\tfoo->stackPointer -= BYTES_PER_WORD;\r\t\trcvr = top;\r\t\t/* begin push: */\r\t\tlongAtput(sp = foo->stackPointer + (BYTES_PER_WORD), foo->trueObj);\r\t\tfoo->stackPointer = sp;\r\t\twriteImageFile(dataSize);\r\t\tif (!(embedded)) {\r\r\t\t\t/* set Mac file type and creator; this is a noop on other platforms */\r\r\t\t\tsetMacType = ioLoadFunctionFrom(\"setMacFileTypeAndCreator\", \"FilePlugin\");\r\t\t\tif (!(setMacType == 0)) {\r\t\t\t\t((sqInt (*)(char *, char *, char *))setMacType)(imageName, \"STim\", \"FAST\");\r\t\t\t}\r\t\t}\r\t\t/* begin pop: */\r\t\tfoo->stackPointer -= 1 * (BYTES_PER_WORD);\r\t}\r\tbeRootIfOld(foo->activeContext);\r\tif (foo->successFlag) {\r\t\t/* begin push: */\r\t\tlongAtput(sp1 = foo->stackPointer + (BYTES_PER_WORD), foo->falseObj);\r\t\tfoo->stackPointer = sp1;\r\t} else {\r\t\t/* begin push: */\r\t\tlongAtput(sp2 = foo->stackPointer + (BYTES_PER_WORD), rcvr);\r\t\tfoo->stackPointer = sp2;\r\t}\r\tif (foo->compilerInitialized) {\r\t\tcompilerPostSnapshot();\r\t}\r}\r\r\r/*\tReturn one of the objects in the SpecialObjectsArray */\r\rsqInt splObj(sqInt index) {\r    sqInt oop;\r\r\t/* begin fetchPointer:ofObject: */\r\toop = foo->specialObjectsOop;\r\treturn longAt((oop + (BASE_HEADER_SIZE)) + (index << (SHIFT_FOR_WORD)));\r}\r\r\r/*\tReturn what ST would return for <obj> at: index. */\r\rsqInt stObjectat(sqInt array, sqInt index) {\rregister struct foo * foo = &fum;\r    sqInt fixedFields;\r    sqInt fmt;\r    sqInt hdr;\r    sqInt stSize;\r    sqInt totalLength;\r    sqInt sp;\r    sqInt sz;\r    sqInt class;\r    sqInt classFormat;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\thdr = longAt(array);\r\tfmt = (((usqInt) hdr) >> 8) & 15;\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((hdr & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(array - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz = hdr & (SIZE_MASK);\r\t}\r\tsz -= hdr & (SIZE_4_BIT);\r\tif (fmt <= 4) {\r\t\ttotalLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tgoto l2;\r\t}\r\tif (fmt < 8) {\r\t\ttotalLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> 2;\r\t\tgoto l2;\r\t} else {\r\t\ttotalLength = (sz - (BASE_HEADER_SIZE)) - (fmt & 3);\r\t\tgoto l2;\r\t}\rl2:\t/* end lengthOf:baseHeader:format: */;\r\t/* begin fixedFieldsOf:format:length: */\r\tif ((fmt > 4) || (fmt == 2)) {\r\t\tfixedFields = 0;\r\t\tgoto l4;\r\t}\r\tif (fmt < 2) {\r\t\tfixedFields = totalLength;\r\t\tgoto l4;\r\t}\r\t/* begin fetchClassOf: */\r\tif ((array & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tclass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l3;\r\t}\r\tccIndex = (((usqInt) (longAt(array))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tclass = (longAt(array - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l3;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tclass = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l3;\r\t}\rl3:\t/* end fetchClassOf: */;\r\tclassFormat = (longAt((class + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1;\r\tfixedFields = (((((usqInt) classFormat) >> 11) & 192) + ((((usqInt) classFormat) >> 2) & 63)) - 1;\rl4:\t/* end fixedFieldsOf:format:length: */;\r\tif ((fmt == 3) && ((((((usqInt) hdr) >> 12) & 31) == 13) || ((((((usqInt) hdr) >> 12) & 31) == 14) || (((((usqInt) hdr) >> 12) & 31) == 4)))) {\r\t\t/* begin fetchStackPointerOf: */\r\t\tsp = longAt((array + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)));\r\t\tif (!((sp & 1))) {\r\t\t\tstSize = 0;\r\t\t\tgoto l1;\r\t\t}\r\t\tstSize = (sp >> 1);\r\tl1:\t/* end fetchStackPointerOf: */;\r\t} else {\r\t\tstSize = totalLength - fixedFields;\r\t}\r\tif (((((usqInt) index)) >= (((usqInt) 1))) && ((((usqInt) index)) <= (((usqInt) stSize)))) {\r\t\t/* begin subscript:with:format: */\r\t\tif (fmt <= 4) {\r\t\t\treturn longAt((array + (BASE_HEADER_SIZE)) + (((index + fixedFields) - 1) << (SHIFT_FOR_WORD)));\r\t\t}\r\t\tif (fmt < 8) {\r\t\t\treturn positive32BitIntegerFor(long32At((array + (BASE_HEADER_SIZE)) + (((index + fixedFields) - 1) << 2)));\r\t\t} else {\r\t\t\treturn (((byteAt((array + (BASE_HEADER_SIZE)) + ((index + fixedFields) - 1))) << 1) | 1);\r\t\t}\r\t\treturn null;\r\t} else {\r\t\tfoo->successFlag = 0;\r\t\treturn 0;\r\t}\r}\r\r\r/*\tDo what ST would return for <obj> at: index put: value. */\r\rsqInt stObjectatput(sqInt array, sqInt index, sqInt value) {\rregister struct foo * foo = &fum;\r    sqInt fixedFields;\r    sqInt fmt;\r    sqInt hdr;\r    sqInt stSize;\r    sqInt totalLength;\r    sqInt sp;\r    sqInt sz;\r    sqInt valueToStore;\r    sqInt class;\r    sqInt classFormat;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\thdr = longAt(array);\r\tfmt = (((usqInt) hdr) >> 8) & 15;\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((hdr & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(array - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz = hdr & (SIZE_MASK);\r\t}\r\tsz -= hdr & (SIZE_4_BIT);\r\tif (fmt <= 4) {\r\t\ttotalLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tgoto l2;\r\t}\r\tif (fmt < 8) {\r\t\ttotalLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> 2;\r\t\tgoto l2;\r\t} else {\r\t\ttotalLength = (sz - (BASE_HEADER_SIZE)) - (fmt & 3);\r\t\tgoto l2;\r\t}\rl2:\t/* end lengthOf:baseHeader:format: */;\r\t/* begin fixedFieldsOf:format:length: */\r\tif ((fmt > 4) || (fmt == 2)) {\r\t\tfixedFields = 0;\r\t\tgoto l4;\r\t}\r\tif (fmt < 2) {\r\t\tfixedFields = totalLength;\r\t\tgoto l4;\r\t}\r\t/* begin fetchClassOf: */\r\tif ((array & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tclass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l3;\r\t}\r\tccIndex = (((usqInt) (longAt(array))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tclass = (longAt(array - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l3;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tclass = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l3;\r\t}\rl3:\t/* end fetchClassOf: */;\r\tclassFormat = (longAt((class + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1;\r\tfixedFields = (((((usqInt) classFormat) >> 11) & 192) + ((((usqInt) classFormat) >> 2) & 63)) - 1;\rl4:\t/* end fixedFieldsOf:format:length: */;\r\tif ((fmt == 3) && ((((((usqInt) hdr) >> 12) & 31) == 13) || ((((((usqInt) hdr) >> 12) & 31) == 14) || (((((usqInt) hdr) >> 12) & 31) == 4)))) {\r\t\t/* begin fetchStackPointerOf: */\r\t\tsp = longAt((array + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)));\r\t\tif (!((sp & 1))) {\r\t\t\tstSize = 0;\r\t\t\tgoto l1;\r\t\t}\r\t\tstSize = (sp >> 1);\r\tl1:\t/* end fetchStackPointerOf: */;\r\t} else {\r\t\tstSize = totalLength - fixedFields;\r\t}\r\tif (((((usqInt) index)) >= (((usqInt) 1))) && ((((usqInt) index)) <= (((usqInt) stSize)))) {\r\t\t/* begin subscript:with:storing:format: */\r\t\tif (fmt <= 4) {\r\t\t\t/* begin storePointer:ofObject:withValue: */\r\t\t\tif ((((usqInt) array)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tpossibleRootStoreIntovalue(array, value);\r\t\t\t}\r\t\t\tlongAtput((array + (BASE_HEADER_SIZE)) + (((index + fixedFields) - 1) << (SHIFT_FOR_WORD)), value);\r\t\t} else {\r\t\t\tif (fmt < 8) {\r\t\t\t\tvalueToStore = positive32BitValueOf(value);\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\tlong32Atput((array + (BASE_HEADER_SIZE)) + (((index + fixedFields) - 1) << 2), valueToStore);\r\t\t\t\t}\r\t\t\t} else {\r\t\t\t\tif (!((value & 1))) {\r\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t}\r\t\t\t\tvalueToStore = (value >> 1);\r\t\t\t\tif (!((valueToStore >= 0) && (valueToStore <= 255))) {\r\t\t\t\t\tfoo->successFlag = 0;\r\t\t\t\t}\r\t\t\t\tif (foo->successFlag) {\r\t\t\t\t\tbyteAtput((array + (BASE_HEADER_SIZE)) + ((index + fixedFields) - 1), valueToStore);\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t} else {\r\t\tfoo->successFlag = 0;\r\t}\r}\r\r\r/*\tReturn the number of indexable fields in the given object. (i.e., what Smalltalk would return for <obj> size). */\r/*\tNote: Assume oop is not a SmallInteger! */\r\rsqInt stSizeOf(sqInt oop) {\rregister struct foo * foo = &fum;\r    sqInt fixedFields;\r    sqInt fmt;\r    sqInt hdr;\r    sqInt totalLength;\r    sqInt sp;\r    sqInt sz;\r    sqInt class;\r    sqInt classFormat;\r    sqInt ccIndex;\r    sqInt oop1;\r    sqInt oop2;\r    sqInt oop3;\r\r\thdr = longAt(oop);\r\tfmt = (((usqInt) hdr) >> 8) & 15;\r\t/* begin lengthOf:baseHeader:format: */\r\tif ((hdr & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t} else {\r\t\tsz = hdr & (SIZE_MASK);\r\t}\r\tsz -= hdr & (SIZE_4_BIT);\r\tif (fmt <= 4) {\r\t\ttotalLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\t\tgoto l1;\r\t}\r\tif (fmt < 8) {\r\t\ttotalLength = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> 2;\r\t\tgoto l1;\r\t} else {\r\t\ttotalLength = (sz - (BASE_HEADER_SIZE)) - (fmt & 3);\r\t\tgoto l1;\r\t}\rl1:\t/* end lengthOf:baseHeader:format: */;\r\t/* begin fixedFieldsOf:format:length: */\r\tif ((fmt > 4) || (fmt == 2)) {\r\t\tfixedFields = 0;\r\t\tgoto l3;\r\t}\r\tif (fmt < 2) {\r\t\tfixedFields = totalLength;\r\t\tgoto l3;\r\t}\r\t/* begin fetchClassOf: */\r\tif ((oop & 1)) {\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop1 = foo->specialObjectsOop;\r\t\tclass = longAt((oop1 + (BASE_HEADER_SIZE)) + (ClassInteger << (SHIFT_FOR_WORD)));\r\t\tgoto l2;\r\t}\r\tccIndex = (((usqInt) (longAt(oop))) >> 12) & 31;\r\tif (ccIndex == 0) {\r\t\tclass = (longAt(oop - (BASE_HEADER_SIZE))) & (ALL_BUT_TYPE_MASK);\r\t\tgoto l2;\r\t} else {\r\t\t/* begin fetchPointer:ofObject: */\r\t\t/* begin fetchPointer:ofObject: */\r\t\toop3 = foo->specialObjectsOop;\r\t\toop2 = longAt((oop3 + (BASE_HEADER_SIZE)) + (CompactClasses << (SHIFT_FOR_WORD)));\r\t\tclass = longAt((oop2 + (BASE_HEADER_SIZE)) + ((ccIndex - 1) << (SHIFT_FOR_WORD)));\r\t\tgoto l2;\r\t}\rl2:\t/* end fetchClassOf: */;\r\tclassFormat = (longAt((class + (BASE_HEADER_SIZE)) + (InstanceSpecificationIndex << (SHIFT_FOR_WORD)))) - 1;\r\tfixedFields = (((((usqInt) classFormat) >> 11) & 192) + ((((usqInt) classFormat) >> 2) & 63)) - 1;\rl3:\t/* end fixedFieldsOf:format:length: */;\r\tif ((fmt == 3) && ((((((usqInt) hdr) >> 12) & 31) == 13) || ((((((usqInt) hdr) >> 12) & 31) == 14) || (((((usqInt) hdr) >> 12) & 31) == 4)))) {\r\t\t/* begin fetchStackPointerOf: */\r\t\tsp = longAt((oop + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)));\r\t\tif (!((sp & 1))) {\r\t\t\treturn 0;\r\t\t}\r\t\treturn (sp >> 1);\r\t} else {\r\t\treturn totalLength - fixedFields;\r\t}\r}\r\r\r/*\tNote: May be called by translated primitive code. */\r\rdouble stackFloatValue(sqInt offset) {\rregister struct foo * foo = &fum;\r    sqInt floatPointer;\r    double  result;\r\r\tfloatPointer = longAt(foo->stackPointer - (offset * (BYTES_PER_WORD)));\r\tif (!((fetchClassOf(floatPointer)) == (fetchPointerofObject(ClassFloat, foo->specialObjectsOop)))) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn 0.0;\r\t}\r\t;\r\tfetchFloatAtinto(floatPointer + (BASE_HEADER_SIZE), result);\r\treturn result;\r}\r\rsqInt stackIntegerValue(sqInt offset) {\rregister struct foo * foo = &fum;\r    sqInt integerPointer;\r\r\tintegerPointer = longAt(foo->stackPointer - (offset * (BYTES_PER_WORD)));\r\t/* begin checkedIntegerValueOf: */\r\tif ((integerPointer & 1)) {\r\t\treturn (integerPointer >> 1);\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn 0;\r\t}\r\treturn null;\r}\r\r\r/*\tEnsures that the given object is a real object, not a SmallInteger. */\r\rsqInt stackObjectValue(sqInt offset) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r\r\toop = longAt(foo->stackPointer - (offset * (BYTES_PER_WORD)));\r\tif ((oop & 1)) {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t\treturn null;\r\t}\r\treturn oop;\r}\r\rsqInt stackValue(sqInt offset) {\r\treturn longAt(foo->stackPointer - (offset * (BYTES_PER_WORD)));\r}\r\r\r/*\tNote: May be called by translated primitive code. */\r\rsqInt storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integerValue) {\r\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t(((((int) integerValue)) ^ ((((int) integerValue)) << 1)) >= 0)\r# else\r\t\t((integerValue >= -1073741824) && (integerValue <= 1073741823))\r# endif  // SQ_HOST32\r\t) {\r\t\tlongAtput((objectPointer + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), ((integerValue << 1) | 1));\r\t} else {\r\t\t/* begin primitiveFail */\r\t\tfoo->successFlag = 0;\r\t}\r}\r\r\r/*\tNote must check here for stores of young objects into old ones. */\r\rsqInt storePointerofObjectwithValue(sqInt fieldIndex, sqInt oop, sqInt valuePointer) {\r\tif ((((usqInt) oop)) < (((usqInt) foo->youngStart))) {\r\t\tpossibleRootStoreIntovalue(oop, valuePointer);\r\t}\r\treturn longAtput((oop + (BASE_HEADER_SIZE)) + (fieldIndex << (SHIFT_FOR_WORD)), valuePointer);\r}\r\rsqInt success(sqInt successValue) {\rregister struct foo * foo = &fum;\r\tfoo->successFlag = successValue && foo->successFlag;\r}\r\r\r/*\tReturn true if there is enough free space after doing a garbage collection. If not, signal that space is low. */\r\rsqInt sufficientSpaceAfterGC(usqInt minFree) {\rregister struct foo * foo = &fum;\r    usqInt growSize;\r    usqInt minFreePlus;\r\r\tincrementalGC();\r\tif (oopisLessThan((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), minFree)) {\r\t\tif (foo->signalLowSpace) {\r\t\t\treturn 0;\r\t\t}\r\t\tfullGC();\r\t\tminFreePlus = minFree + 15000;\r\t\tif (minFreePlus < minFree) {\r\t\t\treturn 0;\r\t\t}\r\t\tif (oopisGreaterThanOrEqualTo((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), minFreePlus)) {\r\t\t\treturn 1;\r\t\t}\r\t\tgrowSize = (minFree - ((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK))) + foo->growHeadroom;\r\t\tgrowObjectMemory(growSize);\r\t\tif (oopisGreaterThanOrEqualTo((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), minFreePlus)) {\r\t\t\treturn 1;\r\t\t}\r\t\treturn 0;\r\t}\r\treturn 1;\r}\r\r\r/*\tReturn true if there is enough space to allocate the given number of bytes,\r\tperhaps after doing a garbage collection. Sender is responsible for ensuring\r\tthat requested size does result in arithmetic overflow, see note below. */\r\rsqInt sufficientSpaceToAllocate(usqInt bytes) {\rregister struct foo * foo = &fum;\r    usqInt minFree;\r\r\r\t/* Note: Arithmetic overflow may occur in calculation of minFree (indicated by\r\tminFree < bytes after calculation of minFree). The check is performed by sender\r\tto avoid redundant test here. */\r\t/* check for low-space */\r\r\tminFree = (foo->lowSpaceThreshold + bytes) + (BASE_HEADER_SIZE);\r\tif (oopisGreaterThanOrEqualTo((longAt(foo->freeBlock)) & (ALL_BUT_TYPE_MASK), minFree)) {\r\t\treturn 1;\r\t} else {\r\t\treturn sufficientSpaceAfterGC(minFree);\r\t}\r}\r\rsqInt superclassOf(sqInt classPointer) {\r\treturn longAt((classPointer + (BASE_HEADER_SIZE)) + (SuperclassIndex << (SHIFT_FOR_WORD)));\r}\r\r\r/*\tSweep memory from youngStart through the end of memory. Free all \r\tinaccessible objects and coalesce adjacent free chunks. Clear the mark \r\tbits of accessible objects. Compute the starting point for the first pass of \r\tincremental compaction (compStart). Return the number of surviving \r\tobjects.  */\r/*\tDetails: Each time a non-free object is encountered, decrement the \r\tnumber of available forward table entries. If all entries are spoken for \r\t(i.e., entriesAvailable reaches zero), set compStart to the last free \r\tchunk before that object or, if there is no free chunk before the given \r\tobject, the first free chunk after it. Thus, at the end of the sweep \r\tphase, compStart through compEnd spans the highest collection of \r\tnon-free objects that can be accomodated by the forwarding table. This \r\tinformation is used by the first pass of incremental compaction to \r\tensure that space is initially freed at the end of memory. Note that \r\tthere should always be at least one free chunk--the one at the end of \r\tthe heap. */\r\rsqInt sweepPhase(void) {\rregister struct foo * foo = &fum;\r    usqInt endOfMemoryLocal;\r    sqInt entriesAvailable;\r    sqInt firstFree;\r    sqInt freeChunk;\r    sqInt freeChunkSize;\r    sqInt hdrBytes;\r    usqInt oop;\r    sqInt oopHeader;\r    sqInt oopHeaderType;\r    sqInt oopSize;\r    sqInt survivors;\r\r\tentriesAvailable = fwdTableInit((BYTES_PER_WORD) * 2);\r\tsurvivors = 0;\r\r\t/* an invalid object pointer, note that 0 may refer to a meaningful slot */\r\r\tfreeChunk = -1;\r\r\t/* will be updated later */\r\r\tfirstFree = -1;\r\tendOfMemoryLocal = foo->endOfMemory;\r\toop = foo->youngStart + (foo->headerTypeBytes[(longAt(foo->youngStart)) & TypeMask]);\r\twhile (oop < endOfMemoryLocal) {\r\r\t\t/* get oop's header, header type, size, and header size */\r\r\t\tfoo->statSweepCount += 1;\r\t\toopHeader = longAt(oop);\r\t\toopHeaderType = oopHeader & TypeMask;\r\t\thdrBytes = foo->headerTypeBytes[oopHeaderType];\r\t\tif ((oopHeaderType & 1) == 1) {\r\t\t\toopSize = oopHeader & (SIZE_MASK);\r\t\t} else {\r\t\t\tif (oopHeaderType == HeaderTypeSizeAndClass) {\r\t\t\t\toopSize = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t} else {\r\r\t\t\t\t/* free chunk */\r\r\t\t\t\toopSize = oopHeader & (LONG_SIZE_MASK);\r\t\t\t}\r\t\t}\r\t\tif ((oopHeader & (MARK_BIT)) == 0) {\r\t\t\tlongAtput(oop - hdrBytes, HeaderTypeFree);\r\t\t\tif (freeChunk != -1) {\r\r\t\t\t\t/* enlarge current free chunk to include this oop */\r\r\t\t\t\tfreeChunkSize = (freeChunkSize + oopSize) + hdrBytes;\r\t\t\t} else {\r\r\t\t\t\t/* start a new free chunk */\r\t\t\t\t/* chunk may start 4 or 8 bytes before oop */\r\r\t\t\t\tfreeChunk = oop - hdrBytes;\r\r\t\t\t\t/* adjust size for possible extra header bytes */\r\r\t\t\t\tfreeChunkSize = oopSize + (oop - freeChunk);\r\t\t\t\tif (firstFree == -1) {\r\t\t\t\t\tfirstFree = freeChunk;\r\t\t\t\t}\r\t\t\t}\r\t\t} else {\r\t\t\tlongAtput(oop, oopHeader & (ALL_BUT_MARK_BIT));\r\t\t\tif (((((usqInt) (longAt(oop))) >> 8) & 15) == 4) {\r\t\t\t\tfinalizeReference(oop);\r\t\t\t}\r\t\t\tif (entriesAvailable > 0) {\r\t\t\t\tentriesAvailable -= 1;\r\t\t\t} else {\r\r\t\t\t\t/* start compaction at the last free chunk before this object */\r\r\t\t\t\tfirstFree = freeChunk;\r\t\t\t}\r\t\t\tif (freeChunk != -1) {\r\t\t\t\tlongAtput(freeChunk, (freeChunkSize & (LONG_SIZE_MASK)) | HeaderTypeFree);\r\t\t\t\tfreeChunk = -1;\r\t\t\t}\r\t\t\tsurvivors += 1;\r\t\t}\r\t\toop = (oop + oopSize) + (foo->headerTypeBytes[(longAt(oop + oopSize)) & TypeMask]);\r\t}\r\tif (freeChunk != -1) {\r\t\tlongAtput(freeChunk, (freeChunkSize & (LONG_SIZE_MASK)) | HeaderTypeFree);\r\t}\r\tif (!(oop == foo->endOfMemory)) {\r\t\terror(\"sweep failed to find exact end of memory\");\r\t}\r\tif (firstFree == -1) {\r\t\terror(\"expected to find at least one free object\");\r\t} else {\r\t\tfoo->compStart = firstFree;\r\t}\r\treturn survivors;\r}\r\r\r/*\tSignal the given semaphore from within the interpreter. */\r\rsqInt synchronousSignal(sqInt aSemaphore) {\rregister struct foo * foo = &fum;\r    sqInt excessSignals;\r\r\tif ((longAt((aSemaphore + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)))) == foo->nilObj) {\r\r\t\t/* no process is waiting on this semaphore */\r\r\t\texcessSignals = fetchIntegerofObject(ExcessSignalsIndex, aSemaphore);\r\t\t/* begin storeInteger:ofObject:withValue: */\r\t\tif (\r# ifdef SQ_HOST32  // cast to int for 64 bit image on 32 bit host\r\t\t\t(((((int) (excessSignals + 1))) ^ ((((int) (excessSignals + 1))) << 1)) >= 0)\r# else\r\t\t\t(((excessSignals + 1) >= -1073741824) && ((excessSignals + 1) <= 1073741823))\r# endif  // SQ_HOST32\r\t\t) {\r\t\t\tlongAtput((aSemaphore + (BASE_HEADER_SIZE)) + (ExcessSignalsIndex << (SHIFT_FOR_WORD)), (((excessSignals + 1) << 1) | 1));\r\t\t} else {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t}\r\t} else {\r\t\tresume(removeFirstLinkOfList(aSemaphore));\r\t}\r}\r\r\r/*\tRecord a process to be awoken on the next interpreter cycle. \r\tikp 11/24/1999 06:07 -- added hook for external runtime \r\tcompiler  */\r\rsqInt transferTo(sqInt aProc) {\rregister struct foo * foo = &fum;\r    sqInt newProc;\r    sqInt oldProc;\r    sqInt sched;\r    sqInt valuePointer;\r    sqInt aContext;\r    sqInt valuePointer1;\r    sqInt oop;\r    sqInt activeCntx;\r    sqInt valuePointer2;\r    sqInt valuePointer11;\r    sqInt tmp;\r    sqInt oop1;\r\r\tnewProc = aProc;\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\toop1 = foo->specialObjectsOop;\r\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\tsched = longAt((oop + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\toldProc = longAt((sched + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)));\r\t/* begin storePointer:ofObject:withValue: */\r\tif ((((usqInt) sched)) < (((usqInt) foo->youngStart))) {\r\t\tpossibleRootStoreIntovalue(sched, newProc);\r\t}\r\tlongAtput((sched + (BASE_HEADER_SIZE)) + (ActiveProcessIndex << (SHIFT_FOR_WORD)), newProc);\r\tif (foo->compilerInitialized) {\r\t\tcompilerProcessChangeto(oldProc, newProc);\r\t} else {\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer = foo->activeContext;\r\t\tif ((((usqInt) oldProc)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(oldProc, valuePointer);\r\t\t}\r\t\tlongAtput((oldProc + (BASE_HEADER_SIZE)) + (SuspendedContextIndex << (SHIFT_FOR_WORD)), valuePointer);\r\t\t/* begin newActiveContext: */\r\t\taContext = longAt((newProc + (BASE_HEADER_SIZE)) + (SuspendedContextIndex << (SHIFT_FOR_WORD)));\r\t\t/* begin storeContextRegisters: */\r\t\tactiveCntx = foo->activeContext;\r\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\tvaluePointer2 = ((((foo->instructionPointer - foo->method) - ((BASE_HEADER_SIZE) - 2)) << 1) | 1);\r\t\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)), valuePointer2);\r\t\t/* begin storePointerUnchecked:ofObject:withValue: */\r\t\tvaluePointer11 = (((((((usqInt) ((foo->stackPointer - foo->activeContext) - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD)) - TempFrameStart) + 1) << 1) | 1);\r\t\tlongAtput((activeCntx + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)), valuePointer11);\r\t\tif ((((usqInt) aContext)) < (((usqInt) foo->youngStart))) {\r\t\t\tbeRootIfOld(aContext);\r\t\t}\r\t\tfoo->activeContext = aContext;\r\t\t/* begin fetchContextRegisters: */\r\t\ttmp = longAt((aContext + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\t\tif ((tmp & 1)) {\r\t\t\ttmp = longAt((aContext + (BASE_HEADER_SIZE)) + (HomeIndex << (SHIFT_FOR_WORD)));\r\t\t\tif ((((usqInt) tmp)) < (((usqInt) foo->youngStart))) {\r\t\t\t\tbeRootIfOld(tmp);\r\t\t\t}\r\t\t} else {\r\t\t\ttmp = aContext;\r\t\t}\r\t\tfoo->theHomeContext = tmp;\r\t\tfoo->receiver = longAt((tmp + (BASE_HEADER_SIZE)) + (ReceiverIndex << (SHIFT_FOR_WORD)));\r\t\tfoo->method = longAt((tmp + (BASE_HEADER_SIZE)) + (MethodIndex << (SHIFT_FOR_WORD)));\r\t\ttmp = ((longAt((aContext + (BASE_HEADER_SIZE)) + (InstructionPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\t\tfoo->instructionPointer = ((foo->method + tmp) + (BASE_HEADER_SIZE)) - 2;\r\t\ttmp = ((longAt((aContext + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)))) >> 1);\r\t\tfoo->stackPointer = (aContext + (BASE_HEADER_SIZE)) + (((TempFrameStart + tmp) - 1) * (BYTES_PER_WORD));\r\t\t/* begin storePointer:ofObject:withValue: */\r\t\tvaluePointer1 = foo->nilObj;\r\t\tif ((((usqInt) newProc)) < (((usqInt) foo->youngStart))) {\r\t\t\tpossibleRootStoreIntovalue(newProc, valuePointer1);\r\t\t}\r\t\tlongAtput((newProc + (BASE_HEADER_SIZE)) + (SuspendedContextIndex << (SHIFT_FOR_WORD)), valuePointer1);\r\t}\r\tfoo->reclaimableContextCount = 0;\r}\r\rsqInt trueObject(void) {\r\treturn foo->trueObj;\r}\r\r\r/*\tupdate pointers in the given memory range */\r\rsqInt updatePointersInRangeFromto(sqInt memStart, sqInt memEnd) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r    sqInt fwdBlock;\r    sqInt header;\r    sqInt realHeader;\r    sqInt sz;\r    sqInt fieldOffset;\r    sqInt fieldOop;\r    sqInt fwdBlock3;\r    sqInt newOop;\r    sqInt contextSize;\r    sqInt fmt;\r    sqInt fwdBlock1;\r    sqInt header1;\r    sqInt methodHeader;\r    sqInt size;\r    sqInt sp;\r    sqInt classHeader;\r    sqInt classOop;\r    sqInt fwdBlock2;\r    sqInt newClassHeader;\r    sqInt newClassOop;\r    sqInt sz1;\r    sqInt header2;\r\r\toop = memStart + (foo->headerTypeBytes[(longAt(memStart)) & TypeMask]);\r\twhile ((((usqInt) oop)) < (((usqInt) memEnd))) {\r\t\tif (!(((longAt(oop)) & TypeMask) == HeaderTypeFree)) {\r\t\t\t/* begin remapFieldsAndClassOf: */\r\t\t\t/* begin lastPointerWhileForwarding: */\r\t\t\theader1 = longAt(oop);\r\t\t\tif ((header1 & (MARK_BIT)) != 0) {\r\t\t\t\tfwdBlock1 = (header1 & (ALL_BUT_MARK_BIT_AND_TYPE_MASK)) << 1;\r\t\t\t\tif (DoAssertionChecks) {\r\t\t\t\t\t/* begin fwdBlockValidate: */\r\t\t\t\t\tif (!(((((usqInt) fwdBlock1)) > (((usqInt) foo->endOfMemory))) && (((((usqInt) fwdBlock1)) <= (((usqInt) foo->fwdTableNext))) && ((fwdBlock1 & 3) == 0)))) {\r\t\t\t\t\t\terror(\"invalid fwd table entry\");\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\theader1 = longAt(fwdBlock1 + (BYTES_PER_WORD));\r\t\t\t}\r\t\t\tfmt = (((usqInt) header1) >> 8) & 15;\r\t\t\tif (fmt <= 4) {\r\t\t\t\tif ((fmt == 3) && ((((((usqInt) header1) >> 12) & 31) == 13) || ((((((usqInt) header1) >> 12) & 31) == 14) || (((((usqInt) header1) >> 12) & 31) == 4)))) {\r\t\t\t\t\t/* begin fetchStackPointerOf: */\r\t\t\t\t\tsp = longAt((oop + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t\tif (!((sp & 1))) {\r\t\t\t\t\t\tcontextSize = 0;\r\t\t\t\t\t\tgoto l4;\r\t\t\t\t\t}\r\t\t\t\t\tcontextSize = (sp >> 1);\r\t\t\t\tl4:\t/* end fetchStackPointerOf: */;\r\t\t\t\t\tfieldOffset = (CtxtTempFrameStart + contextSize) * (BYTES_PER_WORD);\r\t\t\t\t\tgoto l2;\r\t\t\t\t}\r\t\t\t\tif ((header1 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\t\tsize = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (ALL_BUT_TYPE_MASK);\r\t\t\t\t} else {\r\t\t\t\t\tsize = header1 & (SIZE_MASK);\r\t\t\t\t}\r\t\t\t\tfieldOffset = size - (BASE_HEADER_SIZE);\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\t\tif (fmt < 12) {\r\t\t\t\tfieldOffset = 0;\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\t\tmethodHeader = longAt(oop + (BASE_HEADER_SIZE));\r\t\t\tfieldOffset = (((((usqInt) methodHeader) >> 10) & 255) * (BYTES_PER_WORD)) + (BASE_HEADER_SIZE);\r\t\tl2:\t/* end lastPointerWhileForwarding: */;\r\t\t\twhile (fieldOffset >= (BASE_HEADER_SIZE)) {\r\t\t\t\tfieldOop = longAt(oop + fieldOffset);\r\t\t\t\tif (((fieldOop & 1) == 0) && (((longAt(fieldOop)) & (MARK_BIT)) != 0)) {\r\t\t\t\t\tfwdBlock3 = ((longAt(fieldOop)) & (ALL_BUT_MARK_BIT_AND_TYPE_MASK)) << 1;\r\t\t\t\t\tif (DoAssertionChecks) {\r\t\t\t\t\t\t/* begin fwdBlockValidate: */\r\t\t\t\t\t\tif (!(((((usqInt) fwdBlock3)) > (((usqInt) foo->endOfMemory))) && (((((usqInt) fwdBlock3)) <= (((usqInt) foo->fwdTableNext))) && ((fwdBlock3 & 3) == 0)))) {\r\t\t\t\t\t\t\terror(\"invalid fwd table entry\");\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tnewOop = longAt(fwdBlock3);\r\t\t\t\t\tlongAtput(oop + fieldOffset, newOop);\r\t\t\t\t\tif (((((usqInt) oop)) < (((usqInt) foo->youngStart))) && ((((usqInt) newOop)) >= (((usqInt) foo->youngStart)))) {\r\t\t\t\t\t\tbeRootWhileForwarding(oop);\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\tfieldOffset -= BYTES_PER_WORD;\r\t\t\t}\r\t\t\t/* begin remapClassOf: */\r\t\t\tif (((longAt(oop)) & TypeMask) == HeaderTypeShort) {\r\t\t\t\tgoto l3;\r\t\t\t}\r\t\t\tclassHeader = longAt(oop - (BYTES_PER_WORD));\r\t\t\tclassOop = classHeader & (ALL_BUT_TYPE_MASK);\r\t\t\tif (((classOop & 1) == 0) && (((longAt(classOop)) & (MARK_BIT)) != 0)) {\r\t\t\t\tfwdBlock2 = ((longAt(classOop)) & (ALL_BUT_MARK_BIT_AND_TYPE_MASK)) << 1;\r\t\t\t\tif (DoAssertionChecks) {\r\t\t\t\t\t/* begin fwdBlockValidate: */\r\t\t\t\t\tif (!(((((usqInt) fwdBlock2)) > (((usqInt) foo->endOfMemory))) && (((((usqInt) fwdBlock2)) <= (((usqInt) foo->fwdTableNext))) && ((fwdBlock2 & 3) == 0)))) {\r\t\t\t\t\t\terror(\"invalid fwd table entry\");\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\tnewClassOop = longAt(fwdBlock2);\r\t\t\t\tnewClassHeader = newClassOop | (classHeader & TypeMask);\r\t\t\t\tlongAtput(oop - (BYTES_PER_WORD), newClassHeader);\r\t\t\t\tif (((((usqInt) oop)) < (((usqInt) foo->youngStart))) && ((((usqInt) newClassOop)) >= (((usqInt) foo->youngStart)))) {\r\t\t\t\t\tbeRootWhileForwarding(oop);\r\t\t\t\t}\r\t\t\t}\r\t\tl3:\t/* end remapClassOf: */;\r\t\t}\r\t\t/* begin objectAfterWhileForwarding: */\r\t\theader = longAt(oop);\r\t\tif ((header & (MARK_BIT)) == 0) {\r\t\t\t/* begin objectAfter: */\r\t\t\tif (DoAssertionChecks) {\r\t\t\t\tif ((((usqInt) oop)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t\t}\r\t\t\t}\r\t\t\tif (((longAt(oop)) & TypeMask) == HeaderTypeFree) {\r\t\t\t\tsz1 = (longAt(oop)) & (ALL_BUT_TYPE_MASK);\r\t\t\t} else {\r\t\t\t\t/* begin sizeBitsOf: */\r\t\t\t\theader2 = longAt(oop);\r\t\t\t\tif ((header2 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\t\tsz1 = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\t\tgoto l5;\r\t\t\t\t} else {\r\t\t\t\t\tsz1 = header2 & (SIZE_MASK);\r\t\t\t\t\tgoto l5;\r\t\t\t\t}\r\t\t\tl5:\t/* end sizeBitsOf: */;\r\t\t\t}\r\t\t\toop = (oop + sz1) + (foo->headerTypeBytes[(longAt(oop + sz1)) & TypeMask]);\r\t\t\tgoto l1;\r\t\t}\r\t\tfwdBlock = (header & (ALL_BUT_MARK_BIT_AND_TYPE_MASK)) << 1;\r\t\tif (DoAssertionChecks) {\r\t\t\t/* begin fwdBlockValidate: */\r\t\t\tif (!(((((usqInt) fwdBlock)) > (((usqInt) foo->endOfMemory))) && (((((usqInt) fwdBlock)) <= (((usqInt) foo->fwdTableNext))) && ((fwdBlock & 3) == 0)))) {\r\t\t\t\terror(\"invalid fwd table entry\");\r\t\t\t}\r\t\t}\r\t\trealHeader = longAt(fwdBlock + (BYTES_PER_WORD));\r\t\tif ((realHeader & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t} else {\r\t\t\tsz = realHeader & (SIZE_MASK);\r\t\t}\r\t\toop = (oop + sz) + (foo->headerTypeBytes[(longAt(oop + sz)) & TypeMask]);\r\tl1:\t/* end objectAfterWhileForwarding: */;\r\t}\r}\r\r\r/*\tupdate pointers in root objects */\r\rsqInt updatePointersInRootObjectsFromto(sqInt memStart, sqInt memEnd) {\rregister struct foo * foo = &fum;\r    sqInt i;\r    sqInt oop;\r    sqInt fieldOffset;\r    sqInt fieldOop;\r    sqInt fwdBlock;\r    sqInt newOop;\r    sqInt contextSize;\r    sqInt fmt;\r    sqInt fwdBlock1;\r    sqInt header;\r    sqInt methodHeader;\r    sqInt size;\r    sqInt sp;\r    sqInt classHeader;\r    sqInt classOop;\r    sqInt fwdBlock2;\r    sqInt newClassHeader;\r    sqInt newClassOop;\r\r\tfor (i = 1; i <= foo->rootTableCount; i += 1) {\r\t\toop = foo->rootTable[i];\r\t\tif (((((usqInt) oop)) < (((usqInt) memStart))) || ((((usqInt) oop)) >= (((usqInt) memEnd)))) {\r\t\t\t/* begin remapFieldsAndClassOf: */\r\t\t\t/* begin lastPointerWhileForwarding: */\r\t\t\theader = longAt(oop);\r\t\t\tif ((header & (MARK_BIT)) != 0) {\r\t\t\t\tfwdBlock1 = (header & (ALL_BUT_MARK_BIT_AND_TYPE_MASK)) << 1;\r\t\t\t\tif (DoAssertionChecks) {\r\t\t\t\t\t/* begin fwdBlockValidate: */\r\t\t\t\t\tif (!(((((usqInt) fwdBlock1)) > (((usqInt) foo->endOfMemory))) && (((((usqInt) fwdBlock1)) <= (((usqInt) foo->fwdTableNext))) && ((fwdBlock1 & 3) == 0)))) {\r\t\t\t\t\t\terror(\"invalid fwd table entry\");\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\theader = longAt(fwdBlock1 + (BYTES_PER_WORD));\r\t\t\t}\r\t\t\tfmt = (((usqInt) header) >> 8) & 15;\r\t\t\tif (fmt <= 4) {\r\t\t\t\tif ((fmt == 3) && ((((((usqInt) header) >> 12) & 31) == 13) || ((((((usqInt) header) >> 12) & 31) == 14) || (((((usqInt) header) >> 12) & 31) == 4)))) {\r\t\t\t\t\t/* begin fetchStackPointerOf: */\r\t\t\t\t\tsp = longAt((oop + (BASE_HEADER_SIZE)) + (StackPointerIndex << (SHIFT_FOR_WORD)));\r\t\t\t\t\tif (!((sp & 1))) {\r\t\t\t\t\t\tcontextSize = 0;\r\t\t\t\t\t\tgoto l1;\r\t\t\t\t\t}\r\t\t\t\t\tcontextSize = (sp >> 1);\r\t\t\t\tl1:\t/* end fetchStackPointerOf: */;\r\t\t\t\t\tfieldOffset = (CtxtTempFrameStart + contextSize) * (BYTES_PER_WORD);\r\t\t\t\t\tgoto l2;\r\t\t\t\t}\r\t\t\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\t\tsize = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (ALL_BUT_TYPE_MASK);\r\t\t\t\t} else {\r\t\t\t\t\tsize = header & (SIZE_MASK);\r\t\t\t\t}\r\t\t\t\tfieldOffset = size - (BASE_HEADER_SIZE);\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\t\tif (fmt < 12) {\r\t\t\t\tfieldOffset = 0;\r\t\t\t\tgoto l2;\r\t\t\t}\r\t\t\tmethodHeader = longAt(oop + (BASE_HEADER_SIZE));\r\t\t\tfieldOffset = (((((usqInt) methodHeader) >> 10) & 255) * (BYTES_PER_WORD)) + (BASE_HEADER_SIZE);\r\t\tl2:\t/* end lastPointerWhileForwarding: */;\r\t\t\twhile (fieldOffset >= (BASE_HEADER_SIZE)) {\r\t\t\t\tfieldOop = longAt(oop + fieldOffset);\r\t\t\t\tif (((fieldOop & 1) == 0) && (((longAt(fieldOop)) & (MARK_BIT)) != 0)) {\r\t\t\t\t\tfwdBlock = ((longAt(fieldOop)) & (ALL_BUT_MARK_BIT_AND_TYPE_MASK)) << 1;\r\t\t\t\t\tif (DoAssertionChecks) {\r\t\t\t\t\t\t/* begin fwdBlockValidate: */\r\t\t\t\t\t\tif (!(((((usqInt) fwdBlock)) > (((usqInt) foo->endOfMemory))) && (((((usqInt) fwdBlock)) <= (((usqInt) foo->fwdTableNext))) && ((fwdBlock & 3) == 0)))) {\r\t\t\t\t\t\t\terror(\"invalid fwd table entry\");\r\t\t\t\t\t\t}\r\t\t\t\t\t}\r\t\t\t\t\tnewOop = longAt(fwdBlock);\r\t\t\t\t\tlongAtput(oop + fieldOffset, newOop);\r\t\t\t\t\tif (((((usqInt) oop)) < (((usqInt) foo->youngStart))) && ((((usqInt) newOop)) >= (((usqInt) foo->youngStart)))) {\r\t\t\t\t\t\tbeRootWhileForwarding(oop);\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\tfieldOffset -= BYTES_PER_WORD;\r\t\t\t}\r\t\t\t/* begin remapClassOf: */\r\t\t\tif (((longAt(oop)) & TypeMask) == HeaderTypeShort) {\r\t\t\t\tgoto l3;\r\t\t\t}\r\t\t\tclassHeader = longAt(oop - (BYTES_PER_WORD));\r\t\t\tclassOop = classHeader & (ALL_BUT_TYPE_MASK);\r\t\t\tif (((classOop & 1) == 0) && (((longAt(classOop)) & (MARK_BIT)) != 0)) {\r\t\t\t\tfwdBlock2 = ((longAt(classOop)) & (ALL_BUT_MARK_BIT_AND_TYPE_MASK)) << 1;\r\t\t\t\tif (DoAssertionChecks) {\r\t\t\t\t\t/* begin fwdBlockValidate: */\r\t\t\t\t\tif (!(((((usqInt) fwdBlock2)) > (((usqInt) foo->endOfMemory))) && (((((usqInt) fwdBlock2)) <= (((usqInt) foo->fwdTableNext))) && ((fwdBlock2 & 3) == 0)))) {\r\t\t\t\t\t\terror(\"invalid fwd table entry\");\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\tnewClassOop = longAt(fwdBlock2);\r\t\t\t\tnewClassHeader = newClassOop | (classHeader & TypeMask);\r\t\t\t\tlongAtput(oop - (BYTES_PER_WORD), newClassHeader);\r\t\t\t\tif (((((usqInt) oop)) < (((usqInt) foo->youngStart))) && ((((usqInt) newClassOop)) >= (((usqInt) foo->youngStart)))) {\r\t\t\t\t\tbeRootWhileForwarding(oop);\r\t\t\t\t}\r\t\t\t}\r\t\tl3:\t/* end remapClassOf: */;\r\t\t}\r\t}\r}\r\r\r/*\tVerify that every old object that points to a new object \r\t\thas its root bit set, and\r\t\tappears in the rootTable.\r\tThis method should not be called if the rootTable is full, because roots\r\tare no longer recorded, and incremental collections are not attempted.\r\tIf DoAssertionChecks is true, this routine will halt on an unmarked root.\r\tOtherwise, this routine will merely return true in that case. */\r\rsqInt validateRoots(void) {\rregister struct foo * foo = &fum;\r    sqInt badRoot;\r    usqInt fieldAddr;\r    usqInt fieldOop;\r    sqInt header;\r    usqInt oop;\r    sqInt sz;\r    sqInt header1;\r\r\tbadRoot = 0;\r\toop = memory + (foo->headerTypeBytes[(longAt(memory)) & TypeMask]);\r\twhile (oop < foo->youngStart) {\r\t\tif (!(((longAt(oop)) & TypeMask) == HeaderTypeFree)) {\r\t\t\tfieldAddr = oop + (lastPointerOf(oop));\r\t\t\twhile (fieldAddr > oop) {\r\t\t\t\tfieldOop = longAt(fieldAddr);\r\t\t\t\tif ((fieldOop >= foo->youngStart) && (!((fieldOop & 1)))) {\r\r\t\t\t\t\t/* fieldOop is a pointer to a young object */\r\r\t\t\t\t\theader = longAt(oop);\r\t\t\t\t\tif ((header & (ROOT_BIT)) == 0) {\r\t\t\t\t\t\tif (DoAssertionChecks) {\r\t\t\t\t\t\t\terror(\"root bit not set\");\r\t\t\t\t\t\t}\r\t\t\t\t\t\tbadRoot = 1;\r\t\t\t\t\t} else {\r\t\t\t\t\t\tnull;\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t\tfieldAddr -= BYTES_PER_WORD;\r\t\t\t}\r\t\t}\r\t\t/* begin objectAfter: */\r\t\tif (DoAssertionChecks) {\r\t\t\tif ((((usqInt) oop)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t}\r\t\t}\r\t\tif (((longAt(oop)) & TypeMask) == HeaderTypeFree) {\r\t\t\tsz = (longAt(oop)) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader1 = longAt(oop);\r\t\t\tif ((header1 & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tsz = header1 & (SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\tl1:\t/* end sizeBitsOf: */;\r\t\t}\r\t\toop = (oop + sz) + (foo->headerTypeBytes[(longAt(oop + sz)) & TypeMask]);\r\t}\r\treturn badRoot;\r}\r\rsqInt verifyCleanHeaders(void) {\rregister struct foo * foo = &fum;\r    sqInt oop;\r    sqInt sz;\r    sqInt header;\r\r\toop = memory + (foo->headerTypeBytes[(longAt(memory)) & TypeMask]);\r\twhile ((((usqInt) oop)) < (((usqInt) foo->endOfMemory))) {\r\t\tif (((longAt(oop)) & TypeMask) == HeaderTypeFree) {\r\t\t\tif (!((objectAfter(oop)) == foo->endOfMemory)) {\r\t\t\t\terror(\"Invalid obj with HeaderTypeBits = Free.\");\r\t\t\t}\r\t\t} else {\r\t\t\tif (!(((longAt(oop)) & (MARK_BIT)) == 0)) {\r\t\t\t\terror(\"Invalid obj with MarkBit set.\");\r\t\t\t}\r\t\t}\r\t\t/* begin objectAfter: */\r\t\tif (DoAssertionChecks) {\r\t\t\tif ((((usqInt) oop)) >= (((usqInt) foo->endOfMemory))) {\r\t\t\t\terror(\"no objects after the end of memory\");\r\t\t\t}\r\t\t}\r\t\tif (((longAt(oop)) & TypeMask) == HeaderTypeFree) {\r\t\t\tsz = (longAt(oop)) & (ALL_BUT_TYPE_MASK);\r\t\t} else {\r\t\t\t/* begin sizeBitsOf: */\r\t\t\theader = longAt(oop);\r\t\t\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\t\t\tsz = (longAt(oop - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t} else {\r\t\t\t\tsz = header & (SIZE_MASK);\r\t\t\t\tgoto l1;\r\t\t\t}\r\t\tl1:\t/* end sizeBitsOf: */;\r\t\t}\r\t\toop = (oop + sz) + (foo->headerTypeBytes[(longAt(oop + sz)) & TypeMask]);\r\t}\r}\r\r\r/*\treturn 0 for little endian, 1 for big endian */\r\rsqInt vmEndianness(void) {\r\tif (isBigEnder()) {\r\t\treturn 1;\r\t} else {\r\t\treturn 0;\r\t}\r}\r\r\r/*\tReturn the highest priority process that is ready to run. */\r/*\tNote: It is a fatal VM error if there is no runnable process. */\r\rsqInt wakeHighestPriority(void) {\rregister struct foo * foo = &fum;\r    sqInt p;\r    sqInt processList;\r    sqInt schedLists;\r    sqInt oop;\r    sqInt sz;\r    sqInt oop1;\r    sqInt header;\r    sqInt oop2;\r\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\t/* begin fetchPointer:ofObject: */\r\toop2 = foo->specialObjectsOop;\r\toop1 = longAt((oop2 + (BASE_HEADER_SIZE)) + (SchedulerAssociation << (SHIFT_FOR_WORD)));\r\toop = longAt((oop1 + (BASE_HEADER_SIZE)) + (ValueIndex << (SHIFT_FOR_WORD)));\r\tschedLists = longAt((oop + (BASE_HEADER_SIZE)) + (ProcessListsIndex << (SHIFT_FOR_WORD)));\r\t/* begin fetchWordLengthOf: */\r\t/* begin sizeBitsOf: */\r\theader = longAt(schedLists);\r\tif ((header & TypeMask) == HeaderTypeSizeAndClass) {\r\t\tsz = (longAt(schedLists - ((BYTES_PER_WORD) * 2))) & (LONG_SIZE_MASK);\r\t\tgoto l1;\r\t} else {\r\t\tsz = header & (SIZE_MASK);\r\t\tgoto l1;\r\t}\rl1:\t/* end sizeBitsOf: */;\r\tp = ((usqInt) (sz - (BASE_HEADER_SIZE))) >> (SHIFT_FOR_WORD);\r\r\t/* index of last indexable field */\r\r\tp -= 1;\r\tprocessList = longAt((schedLists + (BASE_HEADER_SIZE)) + (p << (SHIFT_FOR_WORD)));\r\twhile ((longAt((processList + (BASE_HEADER_SIZE)) + (FirstLinkIndex << (SHIFT_FOR_WORD)))) == foo->nilObj) {\r\t\tp -= 1;\r\t\tif (p < 0) {\r\t\t\terror(\"scheduler could not find a runnable process\");\r\t\t}\r\t\tprocessList = longAt((schedLists + (BASE_HEADER_SIZE)) + (p << (SHIFT_FOR_WORD)));\r\t}\r\treturn removeFirstLinkOfList(processList);\r}\r\r\r/*\tReturn the given 64-bit integer with its halves in the reverse order. */\r\rsqInt wordSwapped(sqInt w) {\r\t\r# if (BYTES_PER_WORD == 8)  // swap 32-bit ends of a 64-bit object word\r\treturn ((((usqInt) w >> 32)) & Bytes3to0Mask) + ((((usqInt) w << 32)) & Bytes7to4Mask);\r# else\r\terror(\"This cannot happen.\");\r# endif  // BYTES_PER_WORD == 8\r\t\r}\r\rsqInt writeImageFile(sqInt imageBytes) {\r    void *fn;\r\r\twriteImageFileIO(imageBytes);\r\tfn = ioLoadFunctionFrom(\"setMacFileTypeAndCreator\", \"FilePlugin\");\r\tif (!(fn == 0)) {\r\t\t((sqInt (*)(char*, char*, char*))fn)(imageName, \"STim\", \"FAST\");\r\t}\r}\r\rsqInt writeImageFileIO(sqInt imageBytes) {\rregister struct foo * foo = &fum;\r    size_t bytesWritten;\r    sqImageFile f;\r    sqInt headerSize;\r    squeakFileOffsetType  headerStart;\r    sqInt i;\r    sqInt okToWrite;\r    void *sCWIfn;\r    char *memoryAddress;\r\r\r\t/* If the security plugin can be loaded, use it to check for write permission.\r\tIf not, assume it's ok */\r\r\tsCWIfn = ioLoadFunctionFrom(\"secCanWriteImage\", \"SecurityPlugin\");\r\tif (sCWIfn != 0) {\r\t\tokToWrite = ((sqInt (*)(void))sCWIfn)();\r\t\tif (!(okToWrite)) {\r\t\t\t/* begin primitiveFail */\r\t\t\tfoo->successFlag = 0;\r\t\t\treturn null;\r\t\t}\r\t}\r\theaderStart = 0;\r\r\t/* header size in bytes; do not change! */\r\r\theaderSize = 16 * (BYTES_PER_WORD);\r\tf = sqImageFileOpen(imageName, \"wb\");\r\tif (f == null) {\r\t\t/* begin success: */\r\t\tfoo->successFlag = 0 && foo->successFlag;\r\t\treturn null;\r\t}\r\theaderStart = sqImageFileStartLocation(f,imageName,headerSize+imageBytes);\r\t/* Note: on Unix systems one could put an exec command here, padded to 512 bytes */;\r\tsqImageFileSeek(f, headerStart);\r\tputLongtoFile(imageFormatVersionNumber, f);\r\tputLongtoFile(headerSize, f);\r\tputLongtoFile(imageBytes, f);\r\tputLongtoFile(memory, f);\r\tputLongtoFile(foo->specialObjectsOop, f);\r\tputLongtoFile(foo->lastHash, f);\r\tputLongtoFile(ioScreenSize(), f);\r\tputLongtoFile(foo->fullScreenFlag, f);\r\tputLongtoFile(extraVMMemory, f);\r\tfor (i = 1; i <= 7; i += 1) {\r\t\tputLongtoFile(0, f);\r\t}\r\tif (!(foo->successFlag)) {\r\t\tsqImageFileClose(f);\r\t\treturn null;\r\t}\r\tsqImageFileSeek(f, headerStart + headerSize);\r\t/* begin sqImage:write:size:length: */\r\tmemoryAddress = pointerForOop(memory);\r\tbytesWritten = sqImageFileWrite(memoryAddress, sizeof(unsigned char), imageBytes, f);\r\t/* begin success: */\r\tfoo->successFlag = (bytesWritten == imageBytes) && foo->successFlag;\r\tsqImageFileClose(f);\r}\r\r\rvoid* vm_exports[][3] = {\r\t{\"\", \"primitiveLessOrEqualLargeIntegers\", (void*)primitiveLessOrEqualLargeIntegers},\r\t{\"\", \"primitiveLessThanLargeIntegers\", (void*)primitiveLessThanLargeIntegers},\r\t{\"\", \"internalIsMutable\", (void*)internalIsMutable},\r\t{\"\", \"primitiveGreaterOrEqualLargeIntegers\", (void*)primitiveGreaterOrEqualLargeIntegers},\r\t{\"\", \"primitiveDisablePowerManager\", (void*)primitiveDisablePowerManager},\r\t{\"\", \"primitiveRootTable\", (void*)primitiveRootTable},\r\t{\"\", \"primitiveImageFormatVersion\", (void*)primitiveImageFormatVersion},\r\t{\"\", \"dumpImage\", (void*)dumpImage},\r\t{\"\", \"callInterpreter\", (void*)callInterpreter},\r\t{\"\", \"primitiveDivLargeIntegers\", (void*)primitiveDivLargeIntegers},\r\t{\"\", \"sendInvokeCallbackStackRegistersJmpbuf\", (void*)sendInvokeCallbackStackRegistersJmpbuf},\r\t{\"\", \"removeGCRoot\", (void*)removeGCRoot},\r\t{\"\", \"primitiveDivideLargeIntegers\", (void*)primitiveDivideLargeIntegers},\r\t{\"\", \"internalIsImmutable\", (void*)internalIsImmutable},\r\t{\"\", \"primitiveQuoLargeIntegers\", (void*)primitiveQuoLargeIntegers},\r\t{\"\", \"readImageFormatFromFileStartingAt\", (void*)readImageFormatFromFileStartingAt},\r\t{\"\", \"primitiveAddLargeIntegers\", (void*)primitiveAddLargeIntegers},\r\t{\"\", \"primitiveSubtractLargeIntegers\", (void*)primitiveSubtractLargeIntegers},\r\t{\"\", \"primitiveMicrosecondClock\", (void*)primitiveMicrosecondClock},\r\t{\"\", \"primitiveSetGCBiasToGrow\", (void*)primitiveSetGCBiasToGrow},\r\t{\"\", \"primitiveScreenDepth\", (void*)primitiveScreenDepth},\r\t{\"\", \"primitiveForceTenure\", (void*)primitiveForceTenure},\r\t{\"\", \"primitiveMultiplyLargeIntegers\", (void*)primitiveMultiplyLargeIntegers},\r\t{\"\", \"primitiveIsRoot\", (void*)primitiveIsRoot},\r\t{\"\", \"moduleUnloaded\", (void*)moduleUnloaded},\r\t{\"\", \"primitiveRootTableAt\", (void*)primitiveRootTableAt},\r\t{\"\", \"addGCRoot\", (void*)addGCRoot},\r\t{\"\", \"getStackPointer\", (void*)getStackPointer},\r\t{\"\", \"primitiveNotEqualLargeIntegers\", (void*)primitiveNotEqualLargeIntegers},\r\t{\"\", \"callbackEnter\", (void*)callbackEnter},\r\t{\"\", \"extraHeaderBytes\", (void*)extraHeaderBytes},\r\t{\"\", \"primitiveVMVersion\", (void*)primitiveVMVersion},\r\t{\"\", \"primitiveBitOrLargeIntegers\", (void*)primitiveBitOrLargeIntegers},\r\t{\"\", \"primitiveBitXorLargeIntegers\", (void*)primitiveBitXorLargeIntegers},\r\t{\"\", \"reestablishContextPriorToCallback\", (void*)reestablishContextPriorToCallback},\r\t{\"\", \"primitiveBitShiftLargeIntegers\", (void*)primitiveBitShiftLargeIntegers},\r\t{\"\", \"primitiveSetGCSemaphore\", (void*)primitiveSetGCSemaphore},\r\t{\"\", \"primitivePlatformSourceVersion\", (void*)primitivePlatformSourceVersion},\r\t{\"\", \"primitiveSetGCBiasToGrowGCLimit\", (void*)primitiveSetGCBiasToGrowGCLimit},\r\t{\"\", \"primitiveChangeClassWithClass\", (void*)primitiveChangeClassWithClass},\r\t{\"\", \"primitiveUtcWithOffset\", (void*)primitiveUtcWithOffset},\r\t{\"\", \"primitiveBitAndLargeIntegers\", (void*)primitiveBitAndLargeIntegers},\r\t{\"\", \"primitiveInterpreterSourceVersion\", (void*)primitiveInterpreterSourceVersion},\r\t{\"\", \"callbackLeave\", (void*)callbackLeave},\r\t{\"\", \"primitiveEqualLargeIntegers\", (void*)primitiveEqualLargeIntegers},\r\t{\"\", \"primitiveModLargeIntegers\", (void*)primitiveModLargeIntegers},\r\t{\"\", \"primitiveGreaterThanLargeIntegers\", (void*)primitiveGreaterThanLargeIntegers},\r\t{\"\", \"primitiveIsYoung\", (void*)primitiveIsYoung},\r\t{\"\", \"printAllStacks\", (void*)printAllStacks},\r\t{NULL, NULL, NULL}\r};\r"
  },
  {
    "path": "vm/src/from_squeak/unix/src/vm/interp.h",
    "content": "/* Automatically generated from Squeak on 23 January 2011 3:55:10 pm \r   by VMMaker 4.4.7\r */\r\r#define VMMAKER_VERSION \"4.4.7\"\r\r/*\r * define SQ_VI_BYTES_PER_WORD 8 for a 64-bit word size VM\r * and default to SQ_VI_BYTES_PER_WORD 4 for a 32-bit word size VM\r */\r#ifndef SQ_VI_BYTES_PER_WORD\r# define SQ_VI_BYTES_PER_WORD 4\r#endif\r\r#define BYTES_PER_WORD SQ_VI_BYTES_PER_WORD\r#define BASE_HEADER_SIZE SQ_VI_BYTES_PER_WORD\r#if (BYTES_PER_WORD == 4) // 32-bit object memory\r# define WORD_MASK 0xffffffff\r# define SHIFT_FOR_WORD 2\r# define SMALL_CONTEXT_SIZE 92\r# define LARGE_CONTEXT_SIZE 252\r# define SIZE_MASK 0xfc\r# define LONG_SIZE_MASK 0xfffffffc\r# define SIZE_4_BIT 0\r# define MARK_BIT 0x80000000\r# define ROOT_BIT 0x40000000\r# define ALL_BUT_MARK_BIT 0x7fffffff\r# define ALL_BUT_ROOT_BIT 0xbfffffff\r# define ALL_BUT_TYPE_MASK 0xfffffffc\r# define ALL_BUT_MARK_BIT_AND_TYPE_MASK 0x7ffffffc\r# define ALL_BUT_HASH_BITS 0xe001ffff\r#else // 64-bit object memory\r# define WORD_MASK 0xffffffffffffffff\r# define SHIFT_FOR_WORD 3\r# define SMALL_CONTEXT_SIZE 184\r# define LARGE_CONTEXT_SIZE 504\r# define SIZE_MASK 0xf8\r# define LONG_SIZE_MASK 0xfffffffffffffff8\r# define SIZE_4_BIT 4\r# define MARK_BIT 0x8000000000000000\r# define ROOT_BIT 0x4000000000000000\r# define ALL_BUT_MARK_BIT 0x7fffffffffffffff\r# define ALL_BUT_ROOT_BIT 0xbfffffffffffffff\r# define ALL_BUT_TYPE_MASK 0xfffffffffffffffc\r# define ALL_BUT_MARK_BIT_AND_TYPE_MASK 0x7ffffffffffffffc\r# define ALL_BUT_HASH_BITS 0xffffffffe001ffff\r#endif //  (BYTES_PER_WORD == 4)\r\r"
  },
  {
    "path": "vm/src/from_squeak/unix/src/vm/sqNamedPrims.h",
    "content": "/* Automatically generated from Squeak on 23 January 2011 6:34:01 pm \r   by VMMaker 4.4.7\r */\r/* This is an automatically generated table of all builtin modules in the VM */\r\rextern sqExport vm_exports[];\rextern sqExport os_exports[];\rextern sqExport ADPCMCodecPlugin_exports[];\rextern sqExport AsynchFilePlugin_exports[];\rextern sqExport BMPReadWriterPlugin_exports[];\rextern sqExport B2DPlugin_exports[];\rextern sqExport BitBltPlugin_exports[];\rextern sqExport CroquetPlugin_exports[];\rextern sqExport DSAPrims_exports[];\rextern sqExport ZipPlugin_exports[];\rextern sqExport DropPlugin_exports[];\rextern sqExport FFTPlugin_exports[];\rextern sqExport FT2Plugin_exports[];\rextern sqExport FilePlugin_exports[];\rextern sqExport FloatArrayPlugin_exports[];\rextern sqExport FloatMathPlugin_exports[];\rextern sqExport GeniePlugin_exports[];\rextern sqExport JPEGReadWriter2Plugin_exports[];\rextern sqExport JPEGReaderPlugin_exports[];\rextern sqExport JoystickTabletPlugin_exports[];\rextern sqExport Klatt_exports[];\rextern sqExport LargeIntegers_exports[];\rextern sqExport LocalePlugin_exports[];\rextern sqExport Matrix2x3Plugin_exports[];\rextern sqExport MiscPrimitivePlugin_exports[];\rextern sqExport RePlugin_exports[];\rextern sqExport SecurityPlugin_exports[];\rextern sqExport SerialPlugin_exports[];\rextern sqExport SlangTestSupportPlugin_exports[];\rextern sqExport SocketPlugin_exports[];\rextern sqExport SoundCodecPrims_exports[];\rextern sqExport SoundGenerationPlugin_exports[];\rextern sqExport SoundPlugin_exports[];\rextern sqExport StarSqueakPlugin_exports[];\rextern sqExport SurfacePlugin_exports[];\r\rsqExport *pluginExports[] = {\r\tvm_exports,\r\tos_exports,\r\tADPCMCodecPlugin_exports,\r\tAsynchFilePlugin_exports,\r\tBMPReadWriterPlugin_exports,\r\tB2DPlugin_exports,\r\tBitBltPlugin_exports,\r\tCroquetPlugin_exports,\r\tDSAPrims_exports,\r\tZipPlugin_exports,\r\tDropPlugin_exports,\r\tFFTPlugin_exports,\r\tFT2Plugin_exports,\r\tFilePlugin_exports,\r\tFloatArrayPlugin_exports,\r\tFloatMathPlugin_exports,\r\tGeniePlugin_exports,\r\tJPEGReadWriter2Plugin_exports,\r\tJPEGReaderPlugin_exports,\r\tJoystickTabletPlugin_exports,\r\tKlatt_exports,\r\tLargeIntegers_exports,\r\tLocalePlugin_exports,\r\tMatrix2x3Plugin_exports,\r\tMiscPrimitivePlugin_exports,\r\tRePlugin_exports,\r\tSecurityPlugin_exports,\r\tSerialPlugin_exports,\r\tSlangTestSupportPlugin_exports,\r\tSocketPlugin_exports,\r\tSoundCodecPrims_exports,\r\tSoundGenerationPlugin_exports,\r\tSoundPlugin_exports,\r\tStarSqueakPlugin_exports,\r\tSurfacePlugin_exports,\r\tNULL\r};\r"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/Makefile.in",
    "content": "# Makefile for core VM\t\t\t\t-*- makefile -*-\n# \n#   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n#                              listed elsewhere in this file.\n#   All rights reserved.\n#   \n#   This file is part of Unix Squeak.\n# \n#      You are NOT ALLOWED to distribute modified versions of this file\n#      under its original name.  If you modify this file then you MUST\n#      rename it before making your modifications available publicly.\n# \n#   This file is distributed in the hope that it will be useful, but WITHOUT\n#   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n#   FITNESS FOR A PARTICULAR PURPOSE.\n#   \n#   You may use and/or distribute this file ONLY as part of Squeak, under\n#   the terms of the Squeak License as described in `LICENSE' in the base of\n#   this distribution, subject to the following additional restrictions:\n# \n#   1. The origin of this software must not be misrepresented; you must not\n#      claim that you wrote the original software.  If you use this software\n#      in a product, an acknowledgment to the original author(s) (and any\n#      other contributors mentioned herein) in the product documentation\n#      would be appreciated but is not required.\n# \n#   2. You must not distribute (or make publicly available by any\n#      means) a modified copy of this file unless you first rename it.\n# \n#   3. This notice must not be removed or altered in any source distribution.\n# \n#   Using (or modifying this file for use) in any context other than Squeak\n#   changes these copyright conditions.  Read the file `COPYING' in the\n#   directory `platforms/unix/doc' before proceeding with any such use.\n# \n# Author: ian.piumarta@inria.fr\n# \n# Last edited: 2003-08-22 22:54:19 by piumarta on emilia.inria.fr\n\n[make_cfg]\n[make_plg]\n\nTARGET\t\t= vm$a\nOBJS\t\t= $(INTERP)$o cogit$o sqNamedPrims$o sqVirtualMachine$o sqHeapMap$o\\\n\t\t\tsqExternalSemaphores$o sqTicker$o aio$o debug$o osExports$o \\\n\t\t\tsqUnixExternalPrims$o sqUnixMemory$o sqUnixCharConv$o sqUnixMain$o \\\n\t\t\tsqUnixVMProfile$o sqUnixHeartbeat$o sqUnixThreads$o\n\nXINCLUDES\t= [includes] \\\n\t\t  -I$(topdir)/platforms/Cross/plugins/FilePlugin \\\n\t\t  -I$(topdir)/platforms/unix/plugins/B3DAcceleratorPlugin \\\n\t\t  $(X_INCLUDES)\n\n$(TARGET) : $(OBJS) Makefile\n\t$(LINK) $(TARGET) $(OBJS)\n\t$(RANLIB) $(TARGET)\n\n$(blddir)/sqNamedPrims.h:\t$(vmmcfg)/plugins.int\n\t$(topdir)/unixbuild/mkNamedPrims.sh $(vmmcfg)/plugins.int >$(blddir)/sqNamedPrims.h\n\n# rebuild sqNamedPrims.o if sqNamedPrims.h changes\n\nsqNamedPrims$o : $(blddir)/sqNamedPrims.h\n\n# rebuild sqExtPrims sqUnixMain (VM_VERSION) if config.h changes\n\nsqUnixExternalPrims$o sqUnixMain$o : ../config.h $(topdir)/platforms/unix/vm/dlfcn-dyld.c\n\n[make_targets]\n\n# Ensure the heartbeat is compiled with less aggressive optimization.  At\n# least with gcc 4.1.2 compiling with -O2 results in an apparently flakey VM;\n# so flakey the Squeak4.2-10856-beta.image image won't even start-up.\n#sqUnixHeartbeat$o : $(topdir)/platforms/unix/vm/sqUnixHeartbeat.c\n#\t$(COMPILE) sqUnixHeartbeat$o -O1 -fno-omit-frame-pointer -mno-rtd -mno-accumulate-outgoing-args $(topdir)/platforms/unix/vm/sqUnixHeartbeat.c\n\n# Ensure the cointerpreter is compiled with less aggressive optimization.  At\n# least with gcc 4.1.2 compiling with -O2 results in an apparently flakey VM.\n#gcc3x-cointerp$o : $(srcdir)/vm/gcc3x-cointerp.c\n#\t$(COMPILE) gcc3x-cointerp$o -O1 -fno-omit-frame-pointer -momit-leaf-frame-pointer -mno-rtd -mno-accumulate-outgoing-args $(srcdir)/vm/gcc3x-cointerp.c\n\n# Ensure the cogit is compiled with less aggressive optimization.  The cogit\n# contains a function that does two alloca's which is miscompiled by a number of\n# optimizing compilers (at least gcc 4.0.x 4.1.x & Intel icc 10.1) under the\n# -fomit-frame-pointer regime.  Also on gcc 4.1 linux -O2 causes an abort on\n# shutdown even though the VM starts correctly.  You have been warned :)\n#cogit$o : $(srcdir)/vm/cogit.c\n#\t$(COMPILE) cogit$o -O1 -fno-omit-frame-pointer -momit-leaf-frame-pointer -mno-rtd -mno-accumulate-outgoing-args $(srcdir)/vm/cogit.c\n\n.force :\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/SqDisplay.h",
    "content": "#ifndef __sq_SqDisplay_h\n#define __sq_SqDisplay_h\n\n#define USE_VM_STRUCT 1\n\nextern int    uxDropFileCount;\nextern char **uxDropFileNames;\n\n#define SqDisplayVersionMajor\t1\n#define SqDisplayVersionMinor\t4\n#define SqDisplayVersion\t((SqDisplayVersionMajor << 16) | (SqDisplayVersionMinor))\n\n#if (AVOID_OPENGL_H)\n  typedef struct glRenderer glRenderer;\n#else\n# include \"sqUnixOpenGL.h\"\n#endif\n\nstruct SqDisplay\n{\n  int     version;\n  /* system attributes */\n  char  *(*winSystemName)(void);\n  /* window startup/shutown */\n  void \t (*winInit)(void);\n  void \t (*winOpen)(int argc, char *dropFiles[]);\n  void \t (*winSetName)(char *title);\n  int  \t (*winImageFind)(char *imageName, int size);\n  void \t (*winImageNotFound)(void);\n  void \t (*winExit)(void);\n  /* display primitives */\n  sqInt  (*ioFormPrint)(sqInt bitsAddr, sqInt width, sqInt height, sqInt depth, double hScale, double vScale, sqInt landscapeFlag);\n  sqInt  (*ioBeep)(void);\n  sqInt  (*ioRelinquishProcessorForMicroseconds)(sqInt microSeconds);\n  sqInt  (*ioProcessEvents)(void);\n  sqInt  (*ioScreenDepth)(void);\n  sqInt  (*ioScreenSize)(void);\n  sqInt  (*ioSetCursorWithMask)(sqInt cursorBitsIndex, sqInt cursorMaskIndex, sqInt offsetX, sqInt offsetY);\n  sqInt  (*ioSetCursorARGB)(sqInt cursorBitsIndex, sqInt extentX, sqInt extentY, sqInt offsetX, sqInt offsetY);\n  sqInt  (*ioSetFullScreen)(sqInt fullScreen);\n  sqInt  (*ioForceDisplayUpdate)(void);\n  sqInt  (*ioShowDisplay)(sqInt dispBitsIndex, sqInt width, sqInt height, sqInt depth, sqInt l, sqInt r, sqInt t, sqInt b);\n  sqInt  (*ioHasDisplayDepth)(sqInt i);\n  sqInt  (*ioSetDisplayMode)(sqInt width, sqInt height, sqInt depth, sqInt fullscreenFlag);\n  sqInt  (*clipboardSize)(void);\n  sqInt  (*clipboardWriteFromAt)(sqInt count, sqInt byteArrayIndex, sqInt startIndex);\n  sqInt  (*clipboardReadIntoAt)(sqInt count, sqInt byteArrayIndex, sqInt startIndex);\n  char **(*clipboardGetTypeNames)(void);\n  sqInt  (*clipboardSizeWithType)(char *typeName, int ntypeName);\n  void   (*clipboardWriteWithType)(char *data, size_t nData, char *typeName, size_t nTypeName, int isDnd, int isClaiming);\n  sqInt  (*dndOutStart)(char *types, int ntypes);\n  sqInt  (*dndOutAcceptedType)(char *type, int ntype);\n  void   (*dndOutSend)(char *bytes, int nbytes);\n  sqInt  (*dndReceived)(char *fileName);\n  sqInt  (*ioGetButtonState)(void);\n  sqInt  (*ioPeekKeystroke)(void);\n  sqInt  (*ioGetKeystroke)(void);\n  sqInt  (*ioGetNextEvent)(sqInputEvent *evt);\n  sqInt  (*ioMousePoint)(void);\n  /* OpenGL */\n  void  *(*ioGetDisplay)(void);\n  void  *(*ioGetWindow)(void);\n  sqInt  (*ioGLinitialise)(void);\n  sqInt  (*ioGLcreateRenderer)(glRenderer *r, sqInt x, sqInt y, sqInt w, sqInt h, sqInt flags);\n  sqInt  (*ioGLmakeCurrentRenderer)(glRenderer *r);\n  void   (*ioGLdestroyRenderer)(glRenderer *r);\n  void   (*ioGLswapBuffers)(glRenderer *r);\n  void   (*ioGLsetBufferRect)(glRenderer *r, sqInt x, sqInt y, sqInt w, sqInt h);\n  /* browser plugin */\n  sqInt  (*primitivePluginBrowserReady)(void);\n  sqInt  (*primitivePluginRequestURLStream)(void);\n  sqInt  (*primitivePluginRequestURL)(void);\n  sqInt  (*primitivePluginPostURL)(void);\n  sqInt  (*primitivePluginRequestFileHandle)(void);\n  sqInt  (*primitivePluginDestroyRequest)(void);\n  sqInt  (*primitivePluginRequestState)(void);\n  /* host window support */\n  int    (*hostWindowClose)(int index);\n  int    (*hostWindowCreate)(int w, int h, int x, int y, char * list, int attributeListLength);\n  int    (*hostWindowShowDisplay)(unsigned* dispBitsIndex, int width, int height, int depth, int affectedL, int affectedR, int affectedT, int affectedB, int windowIndex);\n  int    (*hostWindowGetSize)(int windowIndex);\n  int    (*hostWindowSetSize)(int windowIndex, int w, int h);\n  int    (*hostWindowGetPosition)(int windowIndex);\n  int    (*hostWindowSetPosition)(int windowIndex, int x, int y);\n  int    (*hostWindowSetTitle)(int windowIndex, char * newTitle, int sizeOfTitle);\n  int    (*hostWindowCloseAll)(void);\n\n  int    (*ioPositionOfScreenWorkArea)(int windowIndex);\n  int    (*ioSizeOfScreenWorkArea)(int windowIndex);\n  sqInt  (*ioSetCursorPositionXY)(sqInt x, sqInt y);\n\n  void  *(*ioGetWindowHandle)(void);\n  int    (*ioPositionOfNativeDisplay)(void *);\n  int    (*ioSizeOfNativeDisplay)(void *);\n  int    (*ioPositionOfNativeWindow)(void *);\n  int    (*ioSizeOfNativeWindow)(void *);\n};\n\n\n#define SqDisplayDefine(NAME)\t\t\t\\\nstatic struct SqDisplay display_##NAME##_itf= {\t\\\n  SqDisplayVersion,\t\t\t\t\\\n  display_winSystemName,\t\t\t\\\n  display_winInit,\t\t\t\t\\\n  display_winOpen,\t\t\t\t\\\n  display_winSetName,\t\t\t\t\\\n  display_winImageFind,\t\t\t\t\\\n  display_winImageNotFound,\t\t\t\\\n  display_winExit,\t\t\t\t\\\n  display_ioFormPrint,\t\t\t\t\\\n  display_ioBeep,\t\t\t\t\\\n  display_ioRelinquishProcessorForMicroseconds,\t\\\n  display_ioProcessEvents,\t\t\t\\\n  display_ioScreenDepth,\t\t\t\\\n  display_ioScreenSize,\t\t\t\t\\\n  display_ioSetCursorWithMask,\t\t\t\\\n  display_ioSetCursorARGB,\t\t\t\\\n  display_ioSetFullScreen,\t\t\t\\\n  display_ioForceDisplayUpdate,\t\t\t\\\n  display_ioShowDisplay,\t\t\t\\\n  display_ioHasDisplayDepth,\t\t\t\\\n  display_ioSetDisplayMode,\t\t\t\\\n  display_clipboardSize,\t\t\t\\\n  display_clipboardWriteFromAt,\t\t\t\\\n  display_clipboardReadIntoAt,\t\t\t\\\n  display_clipboardGetTypeNames,\t\t\\\n  display_clipboardSizeWithType,\t\t\\\n  display_clipboardWriteWithType,\t\t\\\n  display_dndOutStart,\t\t\t\t\\\n  display_dndOutAcceptedType,  \t\t\t\\\n  display_dndOutSend,\t\t\t\t\\\n  display_dndReceived,\t\t\t\t\\\n  display_ioGetButtonState,\t\t\t\\\n  display_ioPeekKeystroke,\t\t\t\\\n  display_ioGetKeystroke,\t\t\t\\\n  display_ioGetNextEvent,\t\t\t\\\n  display_ioMousePoint,\t\t\t\t\\\n  display_ioGetDisplay,\t\t\t\t\\\n  display_ioGetWindow,\t\t\t\t\\\n  display_ioGLinitialise,\t\t\t\\\n  display_ioGLcreateRenderer,\t\t\t\\\n  display_ioGLmakeCurrentRenderer,\t\t\\\n  display_ioGLdestroyRenderer,\t\t\t\\\n  display_ioGLswapBuffers,\t\t\t\\\n  display_ioGLsetBufferRect,\t\t\t\\\n  display_primitivePluginBrowserReady,\t\t\\\n  display_primitivePluginRequestURLStream,\t\\\n  display_primitivePluginRequestURL,\t\t\\\n  display_primitivePluginPostURL,\t\t\\\n  display_primitivePluginRequestFileHandle,\t\\\n  display_primitivePluginDestroyRequest,\t\\\n  display_primitivePluginRequestState,\t\t\\\n  display_hostWindowClose,\t\t\t\\\n  display_hostWindowCreate,\t\t\t\\\n  display_hostWindowShowDisplay,\t\t\\\n  display_hostWindowGetSize,\t\t\t\\\n  display_hostWindowSetSize,\t\t\t\\\n  display_hostWindowGetPosition,\t\t\\\n  display_hostWindowSetPosition,\t\t\\\n  display_hostWindowSetTitle,\t\t\t\\\n  display_hostWindowCloseAll,\t\t\t\\\n  display_ioPositionOfScreenWorkArea,\t\\\n  display_ioSizeOfScreenWorkArea,\t\t\\\n  display_ioSetCursorPositionXY,\t\t\\\n  display_ioGetWindowHandle,\t\t\t\\\n  display_ioPositionOfNativeDisplay,\t\\\n  display_ioSizeOfNativeDisplay,\t\\\n  display_ioPositionOfNativeWindow,\t\\\n  display_ioSizeOfNativeWindow\t\\\n}\n\n\nextern struct SqDisplay *ioGetDisplayModule(void);\n\n\n#endif /* __sq_SqDisplay_h */\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/SqModule.h",
    "content": "#ifndef __sq_SqModule_h\n#define __sq_SqModule_h\n\n\n#define SqModuleVersionMajor\t1\n#define SqModuleVersionMinor\t1\n#define SqModuleVersion\t\t((SqModuleVersionMajor << 16) | (SqModuleVersionMinor))\n\nstruct SqModule\n{\n  int\t\t   version;\n  char\t\t  *name;\n  char\t\t  *type;\n  int\t\t   (*parseArgument)(int, char **);\n  void\t\t   (*parseEnvironment)(void);\n  void\t\t   (*printUsage)(void);\n  void\t\t   (*printUsageNotes)(void);\n  void\t\t  *(*makeInterface)(void);\n  struct SqModule *next;\n};\n\n#define SqModuleDefine(TYPE, NAME)\t\t\\\nstruct SqModule TYPE##_##NAME= {\t\t\\\n  SqModuleVersion,\t\t\t\t\\\n  #NAME,\t\t\t\t\t\\\n  #TYPE,\t\t\t\t\t\\\n  TYPE##_parseArgument,\t\t\t\t\\\n  TYPE##_parseEnvironment,\t\t\t\\\n  TYPE##_printUsage,\t\t\t\t\\\n  TYPE##_printUsageNotes,\t\t\t\\\n  TYPE##_makeInterface,\t\t\t\t\\\n  0\t\t\t\t\t\t\\\n}\n\n\n#endif /* __sq_SqModule_h */\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/SqSound.h",
    "content": "#ifndef __sq_SqSound_h\n#define __sq_SqSound_h\n\n\n#define SqSoundVersionMajor\t1\n#define SqSoundVersionMinor\t1\n#define SqSoundVersion\t\t((SqSoundVersionMajor << 16) | (SqSoundVersionMinor))\n\n\nstruct SqSound\n{\n  int    version;\n  /* output */\n  sqInt  (*snd_AvailableSpace)(void);\n  sqInt  (*snd_InsertSamplesFromLeadTime)(sqInt frameCount, void *srcBufPtr, sqInt samplesOfLeadTime);\n  sqInt  (*snd_PlaySamplesFromAtLength)(sqInt frameCount, void *arrayIndex, sqInt startIndex);\n  sqInt  (*snd_PlaySilence)(void);\n  sqInt  (*snd_Start)(sqInt frameCount, sqInt samplesPerSec, sqInt stereo, sqInt semaIndex);\n  sqInt  (*snd_Stop)(void);\n  /* input */\n  sqInt  (*snd_StartRecording)(sqInt desiredSamplesPerSec, sqInt stereo, sqInt semaIndex);\n  sqInt  (*snd_StopRecording)(void);\n  double (*snd_GetRecordingSampleRate)(void);\n  sqInt  (*snd_RecordSamplesIntoAtLength)(void *buf, sqInt startSliceIndex, sqInt bufferSizeInBytes);\n  /* mixer */\n  void   (*snd_Volume)(double *left, double *right);\n  void   (*snd_SetVolume)(double left, double right);\n  sqInt  (*snd_SetRecordLevel)(sqInt level);\n  sqInt  (*snd_GetSwitch)(int id, int captureFlag, int channel);\n  sqInt  (*snd_SetSwitch)(int id, int captureFlag, int parameter);\n  sqInt  (*snd_SetDevice)(int id, char *name);\n};\n\n\n#define SqSoundDefine(NAME)\t\t\t\\\nstatic struct SqSound sound_##NAME##_itf= {\t\\\n  SqSoundVersion,\t\t\t\t\\\n  sound_AvailableSpace,\t\t\t\t\\\n  sound_InsertSamplesFromLeadTime,\t\t\\\n  sound_PlaySamplesFromAtLength,\t\t\\\n  sound_PlaySilence,\t\t\t\t\\\n  sound_Start,\t\t\t\t\t\\\n  sound_Stop,\t\t\t\t\t\\\n  sound_StartRecording,\t\t\t\t\\\n  sound_StopRecording,\t\t\t\t\\\n  sound_GetRecordingSampleRate,\t\t\t\\\n  sound_RecordSamplesIntoAtLength,\t\t\\\n  sound_Volume,\t\t\t\t\t\\\n  sound_SetVolume,\t\t\t\t\\\n  sound_SetRecordLevel,\t\t\t\t\\\n  sound_GetSwitch,\t\t\t\t\\\n  sound_SetSwitch,\t\t\t\t\\\n  sound_SetDevice\t\t\t\t\\\n}\n\n\n#endif /* __sq_SqSound_h */\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/acinclude.m4",
    "content": "AC_DEFUN([AC_LANGINFO_CODESET], [\n  AC_CACHE_CHECK([for nl_langinfo and CODESET], ac_cv_langinfo_codeset,\n    [AC_TRY_LINK([#include <langinfo.h>], [char *cs= nl_langinfo(CODESET);],\n      ac_cv_langinfo_codeset=yes,\n      ac_cv_langinfo_codeset=no)\n    ])\n  if test $ac_cv_langinfo_codeset = yes; then\n    AC_DEFINE(HAVE_LANGINFO_CODESET, 1,\n      [Define if you have <langinfo.h> and nl_langinfo(CODESET).])\n  fi\n  AC_SUBST(HAVE_LANGINFO_CODESET)\n])\n\nAC_DEFUN([AC_ICONV], [\n  AC_CHECK_FUNC(_dyld_present,[],[\n    AC_CHECK_LIB(iconv, iconv_open, ac_cv_iconv=yes, [\n      AC_CHECK_LIB(iconv, libiconv_open, ac_cv_iconv=yes, ac_cv_iconv=no)\n    ])\n    if test $ac_cv_iconv = yes; then\n      LIBS=\"$LIBS -liconv\"\n    fi\n  ])\n])\n\nAC_ARG_ENABLE(iconv,\n[  --disable-iconv         disable iconv support [default=enabled]],\n  [with_iconv=\"$withval\"],\n  [with_iconv=\"yes\"])\n\n\ncase $host_os in\n  darwin*) LIBS=\"$LIBS -framework CoreFoundation -framework CoreServices\";;\n  *)       ;;\nesac\n\nif test \"$with_iconv\" = \"yes\"; then\n  AC_CHECK_HEADERS(iconv.h)\n  AC_ICONV\n  AC_LANGINFO_CODESET\nelse\n  AC_MSG_RESULT([******** disabling iconv])\nfi\n\nAC_CHECK_FUNC(nanosleep, [\n  AC_DEFINE(HAVE_NANOSLEEP, 1)\n  AC_SUBST(HAVE_NANOSLEEP)\n])\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/aio.c",
    "content": "/* aio.c -- asynchronous file i/o\n * \n *   Copyright (C) 1996-2006 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n */\n\n/* Author: Ian.Piumarta@squeakland.org\n * \n * Last edited: 2006-04-23 12:55:59 by piumarta on emilia.local\n */\n\n#include \"sqaio.h\"\n\n#ifdef HAVE_CONFIG_H\n\n# include \"config.h\"\n\n# ifdef HAVE_UNISTD_H\n#   include <sys/types.h>\n#   include <unistd.h>\n# endif /* HAVE_UNISTD_H */\n  \n# ifdef NEED_GETHOSTNAME_P\n    extern int gethostname();\n# endif\n  \n# include <stdio.h>\n# include <signal.h>\n# include <errno.h>\n# include <fcntl.h>\n# include <sys/ioctl.h>\n  \n# ifdef HAVE_SYS_TIME_H\n#   include <sys/time.h>\n# else\n#   include <time.h>\n# endif\n  \n# ifdef HAS_SYS_SELECT_H\n#   include <sys/select.h>\n# endif\n  \n# ifndef FIONBIO\n#   ifdef HAVE_SYS_FILIO_H\n#     include <sys/filio.h>\n#   endif\n#   ifndef FIONBIO\n#     ifdef FIOSNBIO\n#       define FIONBIO FIOSNBIO\n#     else\n#       error: FIONBIO is not defined\n#     endif\n#   endif\n# endif\n\n#else /* !HAVE_CONFIG_H -- assume lowest common demoninator */\n\n# include <stdio.h>\n# include <stdlib.h>\n# include <unistd.h>\n# include <errno.h>\n# include <signal.h>\n# include <sys/types.h>\n# include <sys/time.h>\n# include <sys/select.h>\n# include <sys/ioctl.h>\n# include <fcntl.h>\n\n#endif\n\n\n#undef\tDEBUG\n\n#if defined(DEBUG)\n  int aioLastTick= 0;\n  int aioThisTick= 0;\n# define FPRINTF(X) { aioThisTick= ioMSecs();  fprintf(stderr, \"%8d %8d \", aioThisTick, aioThisTick - aioLastTick);  aioLastTick= aioThisTick;  fprintf X; }\n#else\n# define FPRINTF(X)\n#endif\n\n#define _DO_FLAG_TYPE()\tdo { _DO(AIO_R, rd) _DO(AIO_W, wr) _DO(AIO_X, ex) } while (0)\n\nstatic int one= 1;\n\nstatic aioHandler  rdHandler[FD_SETSIZE];\nstatic aioHandler  wrHandler[FD_SETSIZE];\nstatic aioHandler  exHandler[FD_SETSIZE];\n\nstatic void       *clientData[FD_SETSIZE];\n\nstatic int\tmaxFd;\nstatic fd_set\tfdMask;\t/* handled by aio\t*/\nstatic fd_set\trdMask; /* handle read\t\t*/\nstatic fd_set\twrMask; /* handle write\t\t*/\nstatic fd_set\texMask; /* handle exception\t*/\nstatic fd_set\txdMask; /* external descriptor\t*/\n\n\nstatic void undefinedHandler(int fd, void *clientData, int flags)\n{\n  fprintf(stderr, \"undefined handler called (fd %d, flags %x)\\n\", fd, flags);\n}\n\n#ifdef DEBUG\nstatic char *handlerName(aioHandler h)\n{\n  if (h == undefinedHandler) return \"undefinedHandler\";\n#ifdef DEBUG_SOCKETS\n {\n   extern char *socketHandlerName(aioHandler);\n   return socketHandlerName(h);\n }\n#endif\n return \"***unknown***\";\n}\n#endif\n\n/* initialise asynchronous i/o */\n\nvoid aioInit(void)\n{\n  extern void forceInterruptCheck(int);\t/* not really, but hey */\n\n  FD_ZERO(&fdMask);\n  FD_ZERO(&rdMask);\n  FD_ZERO(&wrMask);\n  FD_ZERO(&exMask);\n  FD_ZERO(&xdMask);\n  maxFd= 0;\n  signal(SIGPIPE, SIG_IGN);\n  signal(SIGIO,   forceInterruptCheck);\n}\n\n\n/* disable handlers and close all handled non-exteral descriptors */\n\nvoid aioFini(void)\n{\n  int fd;\n  for (fd= 0;  fd < maxFd;  fd++)\n    if (FD_ISSET(fd, &fdMask) && !(FD_ISSET(fd, &xdMask)))\n      {\n\taioDisable(fd);\n\tclose(fd);\n\tFD_CLR(fd, &fdMask);\n\tFD_CLR(fd, &rdMask);\n\tFD_CLR(fd, &wrMask);\n\tFD_CLR(fd, &exMask);\n      }\n  while (maxFd && !FD_ISSET(maxFd - 1, &fdMask))\n    --maxFd;\n  signal(SIGPIPE, SIG_DFL);\n  signal(SIGIO,   SIG_DFL);\n}\n\n\n/* answer whether i/o becomes possible within the given number of microSeconds */\n#define max(x,y) (((x)>(y))?(x):(y))\n\nlong pollpip = 0; /* set in sqUnixMain.c by -pollpip arg */\n#if COGMTVM\n/* If on the MT VM and pollpip > 1 only pip if a threaded FFI call is in\n * progress, which we infer from disownCount being non-zero.\n */\nextern long disownCount;\n# define SHOULD_TICK() (pollpip == 1 || (pollpip > 1 && disownCount))\n#else\n# define SHOULD_TICK() pollpip\n#endif\n\nstatic char *ticks= \"-\\\\|/\";\nstatic char *ticker= \"\";\nstatic int tickCount = 0;\n#define TICKS_PER_CHAR 10\n#define DO_TICK(bool)\t\t\t\t\\\ndo if ((bool) && !(++tickCount % TICKS_PER_CHAR)) {\t\t\\\n\tfprintf(stderr, \"\\r%c\\r\", *ticker);\t\t\\\n\tif (!*ticker++) ticker= ticks;\t\t\t\\\n} while (0)\n\nint aioPoll(int microSeconds)\n{\n  int\t fd;\n  fd_set rd, wr, ex;\n  unsigned long long us;\n\n  FPRINTF((stderr, \"aioPoll(%d)\\n\", microSeconds));\n  DO_TICK(SHOULD_TICK());\n\n  /* get out early if there is no pending i/o and no need to relinquish cpu */\n\n#ifdef TARGET_OS_IS_IPHONE\n  if (maxFd == 0)\n    return 0;\n#else\n  if ((maxFd == 0) && (microSeconds == 0))\n    return 0;\n#endif\n\n  rd= rdMask;\n  wr= wrMask;\n  ex= exMask;\n  us= ioUTCMicroseconds();\n\n  for (;;)\n    {\n      struct timeval tv;\n      int n;\n      unsigned long long now;\n      tv.tv_sec=  microSeconds / 1000000;\n      tv.tv_usec= microSeconds % 1000000;\n      n= select(maxFd, &rd, &wr, &ex, &tv);\n      if (n  > 0) break;\n      if (n == 0) return 0;\n      if (errno && (EINTR != errno))\n\t{\n\t  fprintf(stderr, \"errno %d\\n\", errno);\n\t  perror(\"select\");\n\t  return 0;\n\t}\n      now= ioUTCMicroseconds();\n      microSeconds -= max(now - us,1);\n      if (microSeconds <= 0)\n\treturn 0;\n      us= now;\n    }\n\n  for (fd= 0; fd < maxFd; ++fd)\n    {\n#     define _DO(FLAG, TYPE)\t\t\t\t\\\n      {\t\t\t\t\t\t\t\\\n\tif (FD_ISSET(fd, &TYPE))\t\t\t\\\n\t  {\t\t\t\t\t\t\\\n\t    aioHandler handler= TYPE##Handler[fd];\t\\\n\t    FD_CLR(fd, &TYPE##Mask);\t\t\t\\\n\t    TYPE##Handler[fd]= undefinedHandler;\t\\\n\t    handler(fd, clientData[fd], FLAG);\t\t\\\n\t  }\t\t\t\t\t\t\\\n      }\n      _DO_FLAG_TYPE();\n#     undef _DO\n    }\n  return 1;\n}\n\n\n/* sleep for microSeconds or until i/o becomes possible, avoiding\n   sleeping in select() if timeout too small */\n\nint aioSleepForUsecs(int microSeconds)\n{\n#if defined(HAVE_NANOSLEEP)\n  if (microSeconds < (1000000/60))\t/* < 1 timeslice? */\n    {\n      if (!aioPoll(0))\n\t{\n\t  struct timespec rqtp= { 0, microSeconds * 1000 };\n\t  struct timespec rmtp;\n\t  nanosleep(&rqtp, &rmtp);\n\t  microSeconds= 0;\t\t\t/* poll but don't block */\n\t}\n    }\n#endif\n  return aioPoll(microSeconds);\n}\n\n\n/* enable asynchronous notification for a descriptor */\n\nvoid aioEnable(int fd, void *data, int flags)\n{\n  FPRINTF((stderr, \"aioEnable(%d)\\n\", fd));\n  if (fd < 0)\n    {\n      FPRINTF((stderr, \"aioEnable(%d): IGNORED\\n\", fd));\n      return;\n    }\n  if (FD_ISSET(fd, &fdMask))\n    {\n      fprintf(stderr, \"aioEnable: descriptor %d already enabled\\n\", fd);\n      return;\n    }\n  clientData[fd]= data;\n  rdHandler[fd]= wrHandler[fd]= exHandler[fd]= undefinedHandler;\n  FD_SET(fd, &fdMask);\n  FD_CLR(fd, &rdMask);\n  FD_CLR(fd, &wrMask);\n  FD_CLR(fd, &exMask);\n  if (fd >= maxFd)\n    maxFd= fd + 1;\n  if (flags & AIO_EXT)\n    {\n      FD_SET(fd, &xdMask);\n      /* we should not set NBIO ourselves on external descriptors! */\n    }\n  else\n    {\n      /* enable non-blocking asynchronous i/o and delivery of SIGIO to the active process */\n      int arg;\n      FD_CLR(fd, &xdMask);\n\n#    if defined(O_ASYNC)\n      if (      fcntl(fd, F_SETOWN, getpid()                  )  < 0)\n\t\tperror(\"fcntl(F_SETOWN, getpid())\");\n      if ((arg= fcntl(fd, F_GETFL,  0                         )) < 0)\n\t\tperror(\"fcntl(F_GETFL)\");\n      if (      fcntl(fd, F_SETFL,  arg | O_NONBLOCK | O_ASYNC)  < 0)\n\t\tperror(\"fcntl(F_SETFL, O_ASYNC)\");\n\n#    elif defined(FASYNC)\n      if (      fcntl(fd, F_SETOWN, getpid()                  )  < 0)\n\t\tperror(\"fcntl(F_SETOWN, getpid())\");\n      if ((arg= fcntl(fd, F_GETFL,  0                         )) < 0)\n\t\tperror(\"fcntl(F_GETFL)\");\n      if (      fcntl(fd, F_SETFL,  arg | O_NONBLOCK | FASYNC )  < 0)\n\t\tperror(\"fcntl(F_SETFL, FASYNC)\");\n\n#    elif defined(FIOASYNC)\n      arg= getpid();\n\t  if (ioctl(fd, SIOCSPGRP, &arg) < 0)\n\t\tperror(\"ioctl(SIOCSPGRP, getpid())\");\n      arg= 1;\n\t  if (ioctl(fd, FIOASYNC,  &arg) < 0)\n\t\tperror(\"ioctl(FIOASYNC, 1)\");\n#    endif\n    }\n}\n\n\n/* install/change the handler for a descriptor */\n\nvoid aioHandle(int fd, aioHandler handlerFn, int mask)\n{\n  FPRINTF((stderr, \"aioHandle(%d, %s, %d)\\n\", fd, handlerName(handlerFn), mask));\n  if (fd < 0)\n    {\n      FPRINTF((stderr, \"aioHandle(%d): IGNORED\\n\", fd));\n      return;\n    }\n# define _DO(FLAG, TYPE)\t\t\t\\\n    if (mask & FLAG) {\t\t\t\t\\\n      FD_SET(fd, &TYPE##Mask);\t\t\t\\\n      TYPE##Handler[fd]= handlerFn;\t\t\\\n    }\n  _DO_FLAG_TYPE();\n# undef _DO\n}\n\n\n/* temporarily suspend asynchronous notification for a descriptor */\n\nvoid aioSuspend(int fd, int mask)\n{\n  if (fd < 0)\n    {\n      FPRINTF((stderr, \"aioSuspend(%d): IGNORED\\n\", fd));\n      return;\n    }\n  FPRINTF((stderr, \"aioSuspend(%d)\\n\", fd));\n# define _DO(FLAG, TYPE)\t\t\t\\\n  {\t\t\t\t\t\t\\\n    if (mask & FLAG)\t\t\t\t\\\n      {\t\t\t\t\t\t\\\n\tFD_CLR(fd, &TYPE##Mask);\t\t\\\n\tTYPE##Handler[fd]= undefinedHandler;\t\\\n      }\t\t\t\t\t\t\\\n  }\n  _DO_FLAG_TYPE();\n# undef _DO\n}\n\n\n/* definitively disable asynchronous notification for a descriptor */\n\nvoid aioDisable(int fd)\n{\n  if (fd < 0)\n    {\n      FPRINTF((stderr, \"aioDisable(%d): IGNORED\\n\", fd));\n      return;\n    }\n  FPRINTF((stderr, \"aioDisable(%d)\\n\", fd));\n  aioSuspend(fd, AIO_RWX);\n  FD_CLR(fd, &xdMask);\n  FD_CLR(fd, &fdMask);\n  rdHandler[fd]= wrHandler[fd]= exHandler[fd]= 0;\n  clientData[fd]= 0;\n  /* keep maxFd accurate (drops to zero if no more sockets) */\n  while (maxFd && !FD_ISSET(maxFd - 1, &fdMask))\n    --maxFd;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/build.cmake",
    "content": "LINK_DIRECTORIES (${vm_link_directories})\n\nADD_EXECUTABLE (squeakvm\n  ${bld}/${interp}.c\n  ${unix}/vm/aio.c\n  ${unix}/vm/debug.c\n  ${unix}/vm/osExports.c\n  ${unix}/vm/sqUnixCharConv.c\n  ${unix}/vm/sqUnixExternalPrims.c\n  ${unix}/vm/sqUnixMain.c\n  ${unix}/vm/sqUnixMemory.c\n  ${cross}/vm/sqNamedPrims.c\n  ${cross}/vm/sqVirtualMachine.c\n  ${bld}/version.c\n  ${bld}/disabledPlugins.c\n)\n\nADD_CUSTOM_COMMAND (\n  OUTPUT  version.c\n  COMMAND ${config}/verstamp ${bld}/version.c ${CMAKE_C_COMPILER}\n)\n\nADD_CUSTOM_COMMAND (\n  DEPENDS ${src}/vm/interp.c\n  OUTPUT  ${bld}/interp.c\n  COMMAND tr '\\\\015' '\\\\012' < ${src}/vm/interp.c > ${bld}/interp.c\n)\n\nADD_CUSTOM_COMMAND (\n  DEPENDS ${bld}/interp.c\n  OUTPUT  ${bld}/gnu-interp.c\n  COMMAND ${config}/gnuify ${config}/gnuify.awk ${bld}/interp.c ${bld}/gnu-interp.c\n)\n\nINCLUDE_DIRECTORIES (\n  ${bld}\n  ${src}/vm\n  ${unix}/vm\n  ${cross}/vm\n  ${unix}/plugins/B3DAcceleratorPlugin\t# for sqUnixOpenGL.h\n  ${X11_INCLUDE_DIR}\n  ${OPENGL_INCLUDE_DIR}\n  ${vm_include_directories}\n)\n\nSET_TARGET_PROPERTIES (squeakvm PROPERTIES LINK_FLAGS \"${CMAKE_EXE_EXPORTS_C_FLAG}\")\n\nTARGET_LINK_LIBRARIES (squeakvm m ${squeak_libs} ${vm_link_libraries})\n\nINSTALL (PROGRAMS ${bld}/squeakvm DESTINATION ${plgdir})\n\nIF (vm-sound-OSS_disabled)\n  SET (useoss \"false\")\nELSE ()\n  SET (useoss \"true\")\nENDIF ()\n\nCONFIGURE_FILE (${config}/config.in ${bld}/config @ONLY)\n\n# launcher scripts\n\nADD_CUSTOM_TARGET (squeak\n  DEPENDS ${config}/squeak.in\n  COMMAND sh ${bld}/config ${config}/squeak.in ${bld}/squeak\n  COMMAND chmod +x ${bld}/squeak\n)\n\nADD_CUSTOM_TARGET (squeak.sh\n  DEPENDS ${config}/squeak.sh.in\n  COMMAND sh ${bld}/config ${config}/squeak.sh.in ${bld}/squeak.sh\n  COMMAND chmod +x ${bld}/squeak.sh\n)\n\nADD_DEPENDENCIES (squeakvm squeak squeak.sh)\n\nINSTALL (PROGRAMS ${bld}/squeak DESTINATION bin)\nINSTALL (PROGRAMS ${bld}/squeak.sh DESTINATION bin)\n\n# manual page\n\nADD_CUSTOM_TARGET (squeak.1\n  DEPENDS ${unix}/doc/squeak.1\n  COMMAND sh ${bld}/config ${unix}/doc/squeak.1 ${bld}/squeak.1\n)\nADD_DEPENDENCIES (squeakvm squeak.1)\nINSTALL (FILES ${bld}/squeak.1 DESTINATION share/man/man1)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/config.cmake",
    "content": "SET (OS_TYPE \\\"unix\\\")\n\nCONFIG_DEFINE (OS_TYPE)\n\nSTRING (REGEX REPLACE \"(.*)\\\\.(.*)\\\\.(.*)-(.*)\" \"\\\\1\" major   ${version})\nSTRING (REGEX REPLACE \"(.*)\\\\.(.*)\\\\.(.*)-(.*)\" \"\\\\2\" minor   ${version})\nSTRING (REGEX REPLACE \"(.*)\\\\.(.*)\\\\.(.*)-(.*)\" \"\\\\3\" patch   ${version})\nSTRING (REGEX REPLACE \"(.*)\\\\.(.*)\\\\.(.*)-(.*)\" \"\\\\4\" release ${version})\n\nIF (APPLE)\n  SET (DARWIN 1)\n  STRING_APPEND (CMAKE_C_FLAGS -DMACOSX)\t\t# ffi.h\n  USE_FRAMEWORK (CoreFoundation)\n  USE_FRAMEWORK (CoreServices)\nENDIF (APPLE)\n\nCONFIG_DEFINE (DARWIN)\n\nIF (CMAKE_COMPILER_IS_GNUCC)\n  SET (interp gnu-interp)\nELSE ()\n  SET (interp interp)\n  MESSAGE (\"!! Cannot optimise interpreter performance for GCC\")\nENDIF (CMAKE_COMPILER_IS_GNUCC)\n\nINCLUDE (TestBigEndian)\nINCLUDE (CheckIncludeFile)\nINCLUDE (CheckLibraryExists)\nINCLUDE (CheckTypeSize)\nINCLUDE (CheckFunctionExists)\nINCLUDE (CheckVariableExists)\nINCLUDE (CheckStructHasMember)\nINCLUDE (FindPkgConfig)\n\nFIND_PACKAGE (X11)\nIF (X11_FOUND)\n  LIST (REMOVE_DUPLICATES X11_INCLUDE_DIR)\nENDIF ()\n\nIF (NOT without-gl)\n  FIND_PACKAGE (OpenGL)\n  LIST (REMOVE_DUPLICATES OPENGL_INCLUDE_DIR)\nENDIF ()\n\nIF (APPLE AND NOT without-gl)\n  SET (AGL_FOUND\t${OPENGL_FOUND})\n  SET (AGL_INCLUDE_DIR\t${OPENGL_INCLUDE_DIR})\n  SET (AGL_LIBRARIES\t${OPENGL_LIBRARIES})\n  IF (X11_FOUND)\n    FIND_PATH    (GLX_INCLUDE_DIR GL/gl.h /usr/X11/include /usr/X11R6/include)\n    FIND_LIBRARY (GLX_LIBRARIES   GL      /usr/X11/lib /usr/X11R6/lib)\n    IF (GLX_INCLUDE_DIR AND GLX_LIBRARIES)\n      SET (OPENGL_INCLUDE_DIR\t${GLX_INCLUDE_DIR})\n      SET (OPENGL_LIBRARIES\t${GLX_LIBRARIES})\n    ELSE ()\n      SET (OPENGL_FOUND)\n    ENDIF ()\n  ELSE (X11_FOUND)\n    SET (OPENGL_FOUND)\n  ENDIF (X11_FOUND)\nENDIF (APPLE AND NOT without-gl)\n\nIF (NOT OPENGL_FOUND)\n  SET (OPENGL_INCLUDE_DIR \"\")\nENDIF ()\n\n# FOREACH (var AGL_FOUND AGL_INCLUDE_DIR AGL_LIBRARIES OPENGL_FOUND OPENGL_INCLUDE_DIR OPENGL_LIBRARIES)\n#   MESSAGE (\"${var} = ${${var}}\")\n# ENDFOREACH ()\n\nTEST_BIG_ENDIAN (WORDS_BIGENDIAN)\nIF (WORDS_BIGENDIAN)\n  SET (MSB_FIRST 1)\nELSE ()\n  SET (LSB_FIRST 1)\nENDIF ()\n\nCONFIG_DEFINE (WORDS_BIGENDIAN)\nCONFIG_DEFINE (LSB_FIRST)\nCONFIG_DEFINE (MSB_FIRST)\n\nCHECK_FUNCTION_EXISTS (atexit\t\tHAVE_ATEXIT)\nCHECK_FUNCTION_EXISTS (on_exit\t\tHAVE_ON_EXIT)\n\nIF (HAVE_ATEXIT)\n  SET (AT_EXIT atexit)\nELSEIF (HAVE_ON_EXIT)\n  SET (AT_EXIT on_exit)\nENDIF ()\n\nCONFIG_DEFINE (AT_EXIT)\n\n# sqMemoryAccess.h\n\nCHECK_INCLUDE_FILE (interp.h HAVE_INTERP_H -I${src}/vm)\n\nCONFIG_DEFINE (HAVE_INTERP_H)\n\nCHECK_TYPE_SIZE (int SIZEOF_INT)\nCHECK_TYPE_SIZE (long SIZEOF_LONG)\nCHECK_TYPE_SIZE (\"long long\" SIZEOF_LONG_LONG)\nCHECK_TYPE_SIZE (\"void *\" SIZEOF_VOID_P)\n\nCONFIG_DEFINE (SIZEOF_INT)\nCONFIG_DEFINE (SIZEOF_LONG)\nCONFIG_DEFINE (SIZEOF_LONG_LONG)\nCONFIG_DEFINE (SIZEOF_VOID_P)\n\nTRY_RUN (DOUBLE_WORD_ALIGNMENT tmp ${bld} ${config}/testDoubleWordAlignment.c)\nTRY_RUN (DOUBLE_WORD_ORDER tmp ${bld} ${config}/testDoubleWordOrder.c)\n\nCONFIG_DEFINE (DOUBLE_WORD_ALIGNMENT)\nCONFIG_DEFINE (DOUBLE_WORD_ORDER)\n\n# sqPlatformSpecific.h\n\nCHECK_INCLUDE_FILE (alloca.h HAVE_ALLOCA_H)\n\nCONFIG_DEFINE (HAVE_ALLOCA_H)\n\nIF (HAVE_ALLOCA_H)\n  SET (HAVE_ALLOCA 1)\nELSE ()\n  CHECK_FUNCTION_EXISTS (alloca HAVE_ALLOCA)\nENDIF ()\n\nCONFIG_DEFINE (HAVE_ALLOCA)\n\n# aio.c\n\nCHECK_INCLUDE_FILE (sys/time.h HAVE_SYS_TIME_H)\nCHECK_INCLUDE_FILE (sys/filio.h HAVE_SYS_FILIO_H)\n\nCONFIG_DEFINE (HAVE_SYS_TIME_H)\nCONFIG_DEFINE (HAVE_SYS_FILIO_H)\n\nCHECK_FUNCTION_EXISTS (nanosleep HAVE_NANOSLEEP)\n\nCONFIG_DEFINE (HAVE_NANOSLEEP)\n\n# sqUnixCharConv.c\n\nCHECK_INCLUDE_FILE (iconv.h HAVE_ICONV_H)\nCHECK_INCLUDE_FILE (langinfo.h HAVE_LANGINFO_H)\n\nIF (HAVE_LANGINFO_H)\n  TRY_COMPILE (HAVE_LANGINFO_CODESET ${bld} ${config}/testLanginfoCodeset.c)\nENDIF (HAVE_LANGINFO_H)\n\nCONFIG_DEFINE (HAVE_ICONV_H)\nCONFIG_DEFINE (HAVE_LANGINFO_CODESET)\n\n# sqUnixExternalPrims.c\n\nCHECK_INCLUDE_FILE (dlfcn.h HAVE_DLFCN_H)\n\nCHECK_LIBRARY_EXISTS (dl dlopen \"\" HAVE_LIBDL)\nIF (HAVE_LIBDL)\n  USE_LIBRARY (dl)\nENDIF (HAVE_LIBDL)\nIF (HAVE_LIBDL)\n  SET (HAVE_DLOPEN 1)\nELSE ()\n  CHECK_FUNCTION_EXISTS (dlopen HAVE_DLOPEN)\nENDIF (HAVE_LIBDL)\n\nCHECK_FUNCTION_EXISTS (_dyld_present HAVE_DYLD)\nCHECK_FUNCTION_EXISTS (snprintf HAVE_SNPRINTF)\nCHECK_FUNCTION_EXISTS (__snprintf HAVE___SNPRINTF)\n\nCONFIG_DEFINE (HAVE_DLFCN_H)\nCONFIG_DEFINE (HAVE_DLOPEN)\nCONFIG_DEFINE (HAVE_DYLD)\nCONFIG_DEFINE (HAVE_SNPRINTF)\nCONFIG_DEFINE (HAVE___SNPRINTF)\n\nSET (VM_X11DIR \\\"${X11_LIBRARY_DIR}\\\")\n\nCONFIG_DEFINE (VM_X11DIR)\n\nSET (VM_MODULE_PREFIX \\\"${CMAKE_SHARED_MODULE_PREFIX}\\\")\n\nCONFIG_DEFINE (VM_MODULE_PREFIX)\n\nSET (CMAKE_SHARED_MODULE_PREFIX \"so.\")\nSET (CMAKE_SHARED_MODULE_SUFFIX \"\")\n\nSET (MODULE_PREFIX  \\\"${CMAKE_SHARED_MODULE_PREFIX}\\\")\nSET (MODULE_SUFFIX  \\\"${CMAKE_SHARED_MODULE_SUFFIX}\\\")\nSET (LIBRARY_PREFIX \\\"${CMAKE_SHARED_LIBRARY_PREFIX}\\\")\nSET (LIBRARY_SUFFIX \\\"${CMAKE_SHARED_LIBRARY_SUFFIX}\\\")\n\nCONFIG_DEFINE (MODULE_PREFIX)\nCONFIG_DEFINE (MODULE_SUFFIX)\nCONFIG_DEFINE (LIBRARY_PREFIX)\nCONFIG_DEFINE (LIBRARY_SUFFIX)\n\n# sqUnixMain.c\n\nSET (VM_BUILD_STRING \"\\\"Unix built on \\\"__DATE__ \\\" \\\"__TIME__\\\" Compiler: \\\"__VERSION__\")\n\nCONFIG_DEFINE (VM_BUILD_STRING)\n\nSET (VM_LIBDIR \"\\\"${prefix}/${plgdir}\\\"\")\n\nCONFIG_DEFINE (VM_LIBDIR)\n\nSET (VM_HOST        \\\"${VM_HOST}\\\")\nSET (VM_HOST_CPU    \\\"${VM_HOST_CPU}\\\")\nSET (VM_HOST_VENDOR \\\"${VM_HOST_VENDOR}\\\")\nSET (VM_HOST_OS     \\\"${VM_HOST_OS}\\\")\n\nCONFIG_DEFINE (VM_HOST)\nCONFIG_DEFINE (VM_HOST_CPU)\nCONFIG_DEFINE (VM_HOST_VENDOR)\nCONFIG_DEFINE (VM_HOST_OS)\n\nSET (VM_VERSION \\\"${VM_VERSION}\\\")\nSET (PLATFORM_SOURCE_VERSION \\\"${PLATFORM_SOURCE_VERSION}\\\")\n\nCONFIG_DEFINE (VM_VERSION)\nCONFIG_DEFINE (PLATFORM_SOURCE_VERSION)\nCONFIG_DEFINE (SQ_VERSION)\n\nCHECK_FUNCTION_EXISTS (tzset\tHAVE_TZSET)\nCHECK_VARIABLE_EXISTS (timezone\tHAVE_TIMEZONE)\nCHECK_STRUCT_HAS_MEMBER (\"struct tm\" tm_gmtoff time.h HAVE_TM_GMTOFF)\n\nCONFIG_DEFINE (HAVE_TZSET)\nCONFIG_DEFINE (HAVE_TIMEZONE)\nCONFIG_DEFINE (HAVE_TM_GMTOFF)\n\nCONFIG_DEFINE (IMAGE_DUMP)\n\n# sqUnixMemory.c\n\nCHECK_FUNCTION_EXISTS (mmap HAVE_MMAP)\n\nCONFIG_DEFINE (HAVE_MMAP)\n\n# OLPC\n\nIF (NOT without-SUGAR)\n  SET (SUGAR 1)\nENDIF ()\n\nCONFIG_DEFINE (SUGAR)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/debug.c",
    "content": "#include \"debug.h\"\n\n#include <stdio.h>\n#include <stdarg.h>\n#include <string.h>\n\nvoid __sq_DPRINTF(const char *fmt, ...)\n{\n  va_list ap;\n  va_start(ap, fmt);\n  vprintf(fmt, ap);\n  va_end(ap);\n}\n\nvoid __sq_assert(char *file, int line, char *func, char *expr)\n{\n  __sq_errfile= file;\n  __sq_errline= line;\n  __sq_errfunc= func;\n  __sq_eprintf(\"assertion failed: %s\\n\", expr);\n  abort();\n}\n\nchar *__sq_errfile;\nint   __sq_errline;\nchar *__sq_errfunc;\n\nvoid __sq_eprintf(const char *fmt, ...)\n{\n  va_list ap;\n  char *file= strrchr(__sq_errfile, '/');\n  file= file ? file + 1 : __sq_errfile;\n  va_start(ap, fmt);\n  fprintf(stderr, \"%s(%d): %s:\\n\", file, __sq_errline, __sq_errfunc);\n  fprintf(stderr, \"%s(%d): \", file, __sq_errline);\n  vfprintf(stderr, fmt, ap);\n  va_end(ap);\n}\n\n\nvoid sqDebugAnchor(void)\n{\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/debug.h",
    "content": "#ifndef __sq_debug_h\n#define __sq_debug_h\n\n\n#ifndef  DEBUG\n# define DEBUG\t0\n#endif\n\n\n#if (DEBUG)\n  /* the thing to use here is a variadic macro, but Apple's gcc barfs on\n  ** them when running in precomp mode.  did they _really_ have to break\n  ** the preprocessor just to implement precomp?  good _grief_.\n  */\n  extern void __sq_DPRINTF(const char *fmt, ...);\n# define DPRINTF(ARGS) __sq_DPRINTF ARGS\n#else\n# define DPRINTF(ARGS)\t((void)0)\n#endif\n\n\n#undef assert\n\n#if (DEBUG)\n  extern void __sq_assert(char *file, int line, char *func, char *expr);\n# define assert(E) \\\n    ((void)((E) ? 0 : __sq_assert(__FILE__, __LINE__, __FUNCTION__, #E)))\n#else\n# define assert(E)\t((void)0)\n#endif\n\n\nextern char *__sq_errfile;\nextern int   __sq_errline;\nextern char *__sq_errfunc;\n\nextern void __sq_eprintf(const char *fmt, ...);\n\n# define EPRINTF\t\t\t\t\\\n  ( __sq_errfile= __FILE__,\t\t\t\\\n    __sq_errline= __LINE__,\t\t\t\\\n    __sq_errfunc= __FUNCTION__,\t\t\t\\\n    __sq_eprintf )\n\nextern void sqDebugAnchor(void);\n\n#endif /* __sq_debug_h */\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/dlfcn-dyld.c",
    "content": "/* dlfcn-dyld.c -- provides dlopen() and friends as wrappers around Mach dyld\n * \n * Author: Ian.Piumarta@INRIA.Fr\n * \n *   Copyright (C) 1996-2006 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n */\n\n#include <stdio.h>\n#include <stdarg.h>\n#include <mach-o/dyld.h>\n\n#define RTLD_NOW\t0\n#define RTLD_GLOBAL\t0\n\n#define\tDL_APP_CONTEXT\t((void *)-1)\n\nstatic char dlErrorString[256];\nstatic int  dlErrorSet= 0;\n\n\nstatic void dlSetError(const char *fmt, ...)\n{\n  va_list ap;\n  va_start(ap, fmt);\n  vsnprintf(dlErrorString, sizeof(dlErrorString), fmt, ap);\n  va_end(ap);\n  dlErrorSet= 1;\n}\n\n\nstatic const char *dlerror(void)\n{\n  if (dlErrorSet)\n    {\n      dlErrorSet= 0;\n      return (const char *)dlErrorString;\n    }\n  return 0;\n}\n\n\nstatic void dlUndefined(const char *symbol)\n{\n  fprintf(stderr, \"dyld: undefined symbol: %s\\n\", symbol);\n}\n\nstatic NSModule dlMultiple(NSSymbol s, NSModule oldModule, NSModule newModule)\n{\n  DPRINTF((stderr, \"dyld: %s: %s previously defined in %s, new definition in %s\\n\",\n\t   NSNameOfSymbol(s), NSNameOfModule(oldModule), NSNameOfModule(newModule)));\n  return newModule;\n}\n\nstatic void dlLinkEdit(NSLinkEditErrors errorClass, int errorNumber,\n\t\t       const char *fileName, const char *errorString)\n\n{\n  fprintf(stderr, \"dyld: %s: %s\\n\", fileName, errorString);\n}\n\nstatic NSLinkEditErrorHandlers errorHandlers=\n  {\n    dlUndefined,\n    dlMultiple,\n    dlLinkEdit\n  };\n\nstatic void dlinit(void)\n{\n  NSInstallLinkEditErrorHandlers(&errorHandlers);\n}\n\nstatic int dlInitialised= 0;\n\n\nstatic void *dlopen(const char *path, int mode)\n{\n  void\t\t\t*handle= 0;\n  NSObjectFileImage\t ofi= 0;\n\n  if (!dlInitialised)\n    {\n      dlinit();\n      dlInitialised= 1;\n    }\n\n  if (!path)\n    return DL_APP_CONTEXT;\n\n  switch (NSCreateObjectFileImageFromFile(path, &ofi))\n    {\n    case NSObjectFileImageSuccess:\n      handle= NSLinkModule(ofi, path, NSLINKMODULE_OPTION_RETURN_ON_ERROR);\n      NSDestroyObjectFileImage(ofi);\n      break;\n    case NSObjectFileImageInappropriateFile:\n      handle= (void *)NSAddImage(path, NSADDIMAGE_OPTION_RETURN_ON_ERROR);\n      break;\n    default:\n      handle= 0;\n      break;\n    }\n\n  if (!handle)\n    dlSetError(\"could not load shared object: %s\", path);\n\n  DPRINTF((stderr, \"dlopen: %s => %d\\n\", path, (int)handle));\n\n  return handle;\n}\n\n\nstatic void *dlsym(void *handle, const char *symbol)\n{\n  char\t\t_symbol[256];\n  NSSymbol\t*nsSymbol= 0;\n\n  snprintf(_symbol, sizeof(_symbol), \"_%s\", symbol);\n\n  DPRINTF((stderr, \"dlsym: looking for %s (%s) in %d\\n\", symbol, _symbol, (int)handle));\n\n  if (!handle)\n    {\n      DPRINTF((stderr, \"dlsym: setting app context for this handle\\n\"));\n      handle= DL_APP_CONTEXT;\n    }\n\n  if (DL_APP_CONTEXT == handle)\n    {\n      DPRINTF((stderr, \"dlsym: looking in app context\\n\"));\n      if (NSIsSymbolNameDefined(_symbol))\n\tnsSymbol= NSLookupAndBindSymbol(_symbol);\n    }\n  else\n    {\n      if ((  (MH_MAGIC == ((struct mach_header *)handle)->magic))\t/* ppc */\n\t  || (MH_CIGAM == ((struct mach_header *)handle)->magic))\t/* 386 */\n\t{\n\t  if (NSIsSymbolNameDefinedInImage((struct mach_header *)handle, _symbol))\n\t    {\n\t      nsSymbol= NSLookupSymbolInImage\n\t\t((struct mach_header *)handle,\n\t\t _symbol,\n\t\t NSLOOKUPSYMBOLINIMAGE_OPTION_BIND\n\t\t /*| NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR*/);\n\t      DPRINTF((stderr, \"dlsym: bundle (image) lookup returned %p\\n\", nsSymbol));\n\t    }\n\t  else\n\t    DPRINTF((stderr, \"dlsym: bundle (image) symbol not defined\\n\"));\n\t}\n      else\n\t{\n\t  nsSymbol= NSLookupSymbolInModule(handle, _symbol);\n\t  DPRINTF((stderr, \"dlsym: dylib (module) lookup returned %p\\n\", nsSymbol));\n\t}\n    }\n\n  if (!nsSymbol)\n    {\n      dlSetError(\"symbol not found: %s\", _symbol);\n      return 0;\n    }\n\n  return NSAddressOfSymbol(nsSymbol);\n}\n\n\nstatic int dlclose(void *handle)\n{\n  if ((  (MH_MAGIC == ((struct mach_header *)handle)->magic))\t/* ppc */\n      || (MH_CIGAM == ((struct mach_header *)handle)->magic))\t/* 386 */\n    return 0;\t/* can't unlink, but pretend we did */\n\n  if (!NSUnLinkModule(handle, 0))\n    {\n      dlSetError(\"could not unlink shared object: %s\", NSNameOfModule(handle));\n      return -1;\n    }\n\n  return 0;\n}\n\n\n/* autoconf has bugs */\n\n#ifdef HAVE_DLFCN_H\n# undef HAVE_DLFCN_H\n#endif\n\n#ifndef HAVE_LIBDL\n# define HAVE_LIBDL\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/feedback.h",
    "content": ""
  },
  {
    "path": "vm/src/from_squeak/unix/vm/glibc.h",
    "content": "#include <features.h>\n#if defined(__GNUC__) && defined(__GLIBC_PREREQ)\n# if __GLIBC_PREREQ(2,3)\n    /* squash __ctype_to{upper,lower}_loc and avoid including the header */\n#   define _CTYPE_H 1\n#   undef isalnum\n#   undef isalpha\n#   undef isascii\n#   undef isblank\n#   undef iscntrl\n#   undef isdigit\n#   undef isgraph\n#   undef islower\n#   undef isprint\n#   undef ispunct\n#   undef isspace\n#   undef isupper\n#   undef isxdigit\n\n    extern int isalnum(int c);\n    extern int isalpha(int c);\n    extern int isascii(int c);\n    extern int isblank(int c);\n    extern int iscntrl(int c);\n    extern int isdigit(int c);\n    extern int isgraph(int c);\n    extern int islower(int c);\n    extern int isprint(int c);\n    extern int ispunct(int c);\n    extern int isspace(int c);\n    extern int isupper(int c);\n    extern int isxdigit(int c);\n    /* squash realpath@GLIBC_2.3 */\n#   include <stdlib.h>\n/*  asm (\".symver realpath, realpath@GLIBC_2.0\"); */\n# endif\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/interp.h",
    "content": "/* Automatically generated from Squeak on an Array(14 April 2008 3:48:26 pm)\nby VMMaker 3.8b6\n */\n\n#define SQ_VI_BYTES_PER_WORD 4\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/mac-alias.c",
    "content": "/* Based on code contributed by Tom Rushworth.\n * Mutilated beyond recognition by Ian Piumarta.\n * \n * last edited: 2006-04-24 15:38:40 by piumarta on emilia.local\n */\n\n#include <CoreServices/CoreServices.h>\t\t/* see sqGetFilenameFromString() */\n\n/* Answer nonzero if path describes an OS X alias file. */\n\nstatic sqInt isMacAlias(char *path)\n{\n  Boolean  isAlias=  false;\n  Boolean  isFolder= false;\n  FSRef\t   fileRef;\t\t/* No need to dispose of this. */\n  FSRef\t  *frp= &fileRef;\n\n  return (noErr == FSPathMakeRef((UInt8 *)path, frp, &isFolder))\t/* POSIX path -> OS X FSRef */\n    &&   (noErr == FSIsAliasFile(frp, &isAlias, &isFolder))\t\t/* test for alias */\n    &&   isAlias;\n}\n\n\n/* Resolve aliases in the src path leaving the result in dst.\n   Answer nonzero if successful.\n   Note: dst and src may refer to the same buffer. */\n\nstatic sqInt resolveMacAlias(char *dst, char *src, sqInt max_length)\n{\n  Boolean wasAlias= false;\n  Boolean isFolder= false;\n  FSRef\t  fileRef;\t/* No need to dispose of this. */\n  FSRef\t *frp= &fileRef;\n\n  return (noErr == FSPathMakeRef((UInt8 *)src, frp, &isFolder))\t\t\t/* POSIX path -> OS X FSRef */\n    &&   (noErr == FSResolveAliasFileWithMountFlags(frp, true,\t\t\t/* resolve */\n\t\t\t\t\t\t    &isFolder, &wasAlias,\n\t\t\t\t\t\t    kResolveAliasFileNoUI))\n    &&   (noErr == FSRefMakePath(frp, (UInt8 *)dst, PATH_MAX));\t\t\t/* resolved FSRef -> POSIX path */\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/osExports.c",
    "content": "#include <stdio.h>\n\n#define XFN(export) {\"\", #export, (void*)export}\n#define XFN2(plugin, export) {#plugin, #export, (void*)plugin##_##export}\n\n#if !defined(HEADLESS)\nint   primitivePluginBrowserReady(void);\nint   primitivePluginRequestURLStream(void);\nint   primitivePluginRequestURL(void);\nint   primitivePluginPostURL(void);\nint   primitivePluginRequestFileHandle(void);\nint   primitivePluginDestroyRequest(void);\nint   primitivePluginRequestState(void);\nvoid *ioGetDisplay(void);\nvoid *ioGetWindow(void);\n#endif\n\nvoid *os_exports[][3]=\n{\n#if !defined(HEADLESS)\n  XFN(primitivePluginBrowserReady),\n  XFN(primitivePluginRequestURLStream),\n  XFN(primitivePluginRequestURL),\n  XFN(primitivePluginPostURL),\n  XFN(primitivePluginRequestFileHandle),\n  XFN(primitivePluginDestroyRequest),\n  XFN(primitivePluginRequestState),\n  XFN(ioGetDisplay),\n  XFN(ioGetWindow),\n#endif\n  { 0, 0, 0 }\n};\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/sqConfig.h",
    "content": "/* Unix sqConfig.h -- platform identification and configuration */\n\n/* This file has been superseded by autoconf for Unix variants. */\n\n#include \"config.h\"\n\n#ifndef UNIX\n# define UNIX\n#endif\n\n#if !defined(LSB_FIRST)\n#error  \"LSB_FIRST is undefined. Used for setting platform endianesness!\"\n#endif\n\n\n#if LSB_FIRST\n# define VMBIGENDIAN 0\n#else\n# define VMBIGENDIAN 1\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/sqGnu.h",
    "content": "/* Definitions for \"gnuified\" interp.c\n * \n *   Copyright (C) 1996-2005 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n */\n\n/* Author: Ian.Piumarta@squeakland.org\n *\n * December 10th 2008, Eliot Miranda, updated with FP_REG and use of GIV() for\n *      the global struct.\n *\n * NOTES:\n *\tthis file is #included IN PLACE OF sq.h\n */\n\n#include \"sq.h\"\n\n#define CASE(N)\t\tcase N: _##N:\n\n#if defined(__powerpc__) || defined(PPC) || defined(_POWER) || defined(_IBMR2) || defined(__ppc__)\n# define JUMP_TABLE_PTR\t; register void **jumpTableP JP_REG; jumpTableP= &jumpTable[0]\n# define BREAK\t\tgoto *jumpTableP[currentBytecode]\n#else\n# define JUMP_TABLE_PTR\n# define BREAK\t\tgoto *jumpTable[currentBytecode]\n#endif\n\n#if defined(SQ_USE_GLOBAL_STRUCT)\n# define PRIM_DISPATCH\tgoto *jumpTable[GIV(primitiveIndex)]\n#else\n# define PRIM_DISPATCH\tgoto *jumpTable[primitiveIndex]\n#endif\n\n#define JUMP_TABLE \\\n  static void *jumpTable[256]= { \\\n      &&_0,   &&_1,   &&_2,   &&_3,   &&_4,   &&_5,   &&_6,   &&_7,   &&_8,   &&_9, \\\n     &&_10,  &&_11,  &&_12,  &&_13,  &&_14,  &&_15,  &&_16,  &&_17,  &&_18,  &&_19, \\\n     &&_20,  &&_21,  &&_22,  &&_23,  &&_24,  &&_25,  &&_26,  &&_27,  &&_28,  &&_29, \\\n     &&_30,  &&_31,  &&_32,  &&_33,  &&_34,  &&_35,  &&_36,  &&_37,  &&_38,  &&_39, \\\n     &&_40,  &&_41,  &&_42,  &&_43,  &&_44,  &&_45,  &&_46,  &&_47,  &&_48,  &&_49, \\\n     &&_50,  &&_51,  &&_52,  &&_53,  &&_54,  &&_55,  &&_56,  &&_57,  &&_58,  &&_59, \\\n     &&_60,  &&_61,  &&_62,  &&_63,  &&_64,  &&_65,  &&_66,  &&_67,  &&_68,  &&_69, \\\n     &&_70,  &&_71,  &&_72,  &&_73,  &&_74,  &&_75,  &&_76,  &&_77,  &&_78,  &&_79, \\\n     &&_80,  &&_81,  &&_82,  &&_83,  &&_84,  &&_85,  &&_86,  &&_87,  &&_88,  &&_89, \\\n     &&_90,  &&_91,  &&_92,  &&_93,  &&_94,  &&_95,  &&_96,  &&_97,  &&_98,  &&_99, \\\n    &&_100, &&_101, &&_102, &&_103, &&_104, &&_105, &&_106, &&_107, &&_108, &&_109, \\\n    &&_110, &&_111, &&_112, &&_113, &&_114, &&_115, &&_116, &&_117, &&_118, &&_119, \\\n    &&_120, &&_121, &&_122, &&_123, &&_124, &&_125, &&_126, &&_127, &&_128, &&_129, \\\n    &&_130, &&_131, &&_132, &&_133, &&_134, &&_135, &&_136, &&_137, &&_138, &&_139, \\\n    &&_140, &&_141, &&_142, &&_143, &&_144, &&_145, &&_146, &&_147, &&_148, &&_149, \\\n    &&_150, &&_151, &&_152, &&_153, &&_154, &&_155, &&_156, &&_157, &&_158, &&_159, \\\n    &&_160, &&_161, &&_162, &&_163, &&_164, &&_165, &&_166, &&_167, &&_168, &&_169, \\\n    &&_170, &&_171, &&_172, &&_173, &&_174, &&_175, &&_176, &&_177, &&_178, &&_179, \\\n    &&_180, &&_181, &&_182, &&_183, &&_184, &&_185, &&_186, &&_187, &&_188, &&_189, \\\n    &&_190, &&_191, &&_192, &&_193, &&_194, &&_195, &&_196, &&_197, &&_198, &&_199, \\\n    &&_200, &&_201, &&_202, &&_203, &&_204, &&_205, &&_206, &&_207, &&_208, &&_209, \\\n    &&_210, &&_211, &&_212, &&_213, &&_214, &&_215, &&_216, &&_217, &&_218, &&_219, \\\n    &&_220, &&_221, &&_222, &&_223, &&_224, &&_225, &&_226, &&_227, &&_228, &&_229, \\\n    &&_230, &&_231, &&_232, &&_233, &&_234, &&_235, &&_236, &&_237, &&_238, &&_239, \\\n    &&_240, &&_241, &&_242, &&_243, &&_244, &&_245, &&_246, &&_247, &&_248, &&_249, \\\n    &&_250, &&_251, &&_252, &&_253, &&_254, &&_255 \\\n  } JUMP_TABLE_PTR\n\n#define PRIM_TABLE \\\n  static void *jumpTable[700]= { \\\n      &&_0,   &&_1,   &&_2,   &&_3,   &&_4,   &&_5,   &&_6,   &&_7,   &&_8,   &&_9, \\\n     &&_10,  &&_11,  &&_12,  &&_13,  &&_14,  &&_15,  &&_16,  &&_17,  &&_18,  &&_19, \\\n     &&_20,  &&_21,  &&_22,  &&_23,  &&_24,  &&_25,  &&_26,  &&_27,  &&_28,  &&_29, \\\n     &&_30,  &&_31,  &&_32,  &&_33,  &&_34,  &&_35,  &&_36,  &&_37,  &&_38,  &&_39, \\\n     &&_40,  &&_41,  &&_42,  &&_43,  &&_44,  &&_45,  &&_46,  &&_47,  &&_48,  &&_49, \\\n     &&_50,  &&_51,  &&_52,  &&_53,  &&_54,  &&_55,  &&_56,  &&_57,  &&_58,  &&_59, \\\n     &&_60,  &&_61,  &&_62,  &&_63,  &&_64,  &&_65,  &&_66,  &&_67,  &&_68,  &&_69, \\\n     &&_70,  &&_71,  &&_72,  &&_73,  &&_74,  &&_75,  &&_76,  &&_77,  &&_78,  &&_79, \\\n     &&_80,  &&_81,  &&_82,  &&_83,  &&_84,  &&_85,  &&_86,  &&_87,  &&_88,  &&_89, \\\n     &&_90,  &&_91,  &&_92,  &&_93,  &&_94,  &&_95,  &&_96,  &&_97,  &&_98,  &&_99, \\\n    &&_100, &&_101, &&_102, &&_103, &&_104, &&_105, &&_106, &&_107, &&_108, &&_109, \\\n    &&_110, &&_111, &&_112, &&_113, &&_114, &&_115, &&_116, &&_117, &&_118, &&_119, \\\n    &&_120, &&_121, &&_122, &&_123, &&_124, &&_125, &&_126, &&_127, &&_128, &&_129, \\\n    &&_130, &&_131, &&_132, &&_133, &&_134, &&_135, &&_136, &&_137, &&_138, &&_139, \\\n    &&_140, &&_141, &&_142, &&_143, &&_144, &&_145, &&_146, &&_147, &&_148, &&_149, \\\n    &&_150, &&_151, &&_152, &&_153, &&_154, &&_155, &&_156, &&_157, &&_158, &&_159, \\\n    &&_160, &&_161, &&_162, &&_163, &&_164, &&_165, &&_166, &&_167, &&_168, &&_169, \\\n    &&_170, &&_171, &&_172, &&_173, &&_174, &&_175, &&_176, &&_177, &&_178, &&_179, \\\n    &&_180, &&_181, &&_182, &&_183, &&_184, &&_185, &&_186, &&_187, &&_188, &&_189, \\\n    &&_190, &&_191, &&_192, &&_193, &&_194, &&_195, &&_196, &&_197, &&_198, &&_199, \\\n    &&_200, &&_201, &&_202, &&_203, &&_204, &&_205, &&_206, &&_207, &&_208, &&_209, \\\n    &&_210, &&_211, &&_212, &&_213, &&_214, &&_215, &&_216, &&_217, &&_218, &&_219, \\\n    &&_220, &&_221, &&_222, &&_223, &&_224, &&_225, &&_226, &&_227, &&_228, &&_229, \\\n    &&_230, &&_231, &&_232, &&_233, &&_234, &&_235, &&_236, &&_237, &&_238, &&_239, \\\n    &&_240, &&_241, &&_242, &&_243, &&_244, &&_245, &&_246, &&_247, &&_248, &&_249, \\\n    &&_250, &&_251, &&_252, &&_253, &&_254, &&_255, &&_256, &&_257, &&_258, &&_259, \\\n    &&_260, &&_261, &&_262, &&_263, &&_264, &&_265, &&_266, &&_267, &&_268, &&_269, \\\n    &&_270, &&_271, &&_272, &&_273, &&_274, &&_275, &&_276, &&_277, &&_278, &&_279, \\\n    &&_280, &&_281, &&_282, &&_283, &&_284, &&_285, &&_286, &&_287, &&_288, &&_289, \\\n    &&_290, &&_291, &&_292, &&_293, &&_294, &&_295, &&_296, &&_297, &&_298, &&_299, \\\n    &&_300, &&_301, &&_302, &&_303, &&_304, &&_305, &&_306, &&_307, &&_308, &&_309, \\\n    &&_310, &&_311, &&_312, &&_313, &&_314, &&_315, &&_316, &&_317, &&_318, &&_319, \\\n    &&_320, &&_321, &&_322, &&_323, &&_324, &&_325, &&_326, &&_327, &&_328, &&_329, \\\n    &&_330, &&_331, &&_332, &&_333, &&_334, &&_335, &&_336, &&_337, &&_338, &&_339, \\\n    &&_340, &&_341, &&_342, &&_343, &&_344, &&_345, &&_346, &&_347, &&_348, &&_349, \\\n    &&_350, &&_351, &&_352, &&_353, &&_354, &&_355, &&_356, &&_357, &&_358, &&_359, \\\n    &&_360, &&_361, &&_362, &&_363, &&_364, &&_365, &&_366, &&_367, &&_368, &&_369, \\\n    &&_370, &&_371, &&_372, &&_373, &&_374, &&_375, &&_376, &&_377, &&_378, &&_379, \\\n    &&_380, &&_381, &&_382, &&_383, &&_384, &&_385, &&_386, &&_387, &&_388, &&_389, \\\n    &&_390, &&_391, &&_392, &&_393, &&_394, &&_395, &&_396, &&_397, &&_398, &&_399, \\\n    &&_400, &&_401, &&_402, &&_403, &&_404, &&_405, &&_406, &&_407, &&_408, &&_409, \\\n    &&_410, &&_411, &&_412, &&_413, &&_414, &&_415, &&_416, &&_417, &&_418, &&_419, \\\n    &&_420, &&_421, &&_422, &&_423, &&_424, &&_425, &&_426, &&_427, &&_428, &&_429, \\\n    &&_430, &&_431, &&_432, &&_433, &&_434, &&_435, &&_436, &&_437, &&_438, &&_439, \\\n    &&_440, &&_441, &&_442, &&_443, &&_444, &&_445, &&_446, &&_447, &&_448, &&_449, \\\n    &&_450, &&_451, &&_452, &&_453, &&_454, &&_455, &&_456, &&_457, &&_458, &&_459, \\\n    &&_460, &&_461, &&_462, &&_463, &&_464, &&_465, &&_466, &&_467, &&_468, &&_469, \\\n    &&_470, &&_471, &&_472, &&_473, &&_474, &&_475, &&_476, &&_477, &&_478, &&_479, \\\n    &&_480, &&_481, &&_482, &&_483, &&_484, &&_485, &&_486, &&_487, &&_488, &&_489, \\\n    &&_490, &&_491, &&_492, &&_493, &&_494, &&_495, &&_496, &&_497, &&_498, &&_499, \\\n    &&_500, &&_501, &&_502, &&_503, &&_504, &&_505, &&_506, &&_507, &&_508, &&_509, \\\n    &&_510, &&_511, &&_512, &&_513, &&_514, &&_515, &&_516, &&_517, &&_518, &&_519, \\\n    &&_520, &&_521, &&_522, &&_523, &&_524, &&_525, &&_526, &&_527, &&_528, &&_529, \\\n    &&_530, &&_531, &&_532, &&_533, &&_534, &&_535, &&_536, &&_537, &&_538, &&_539, \\\n    &&_540, &&_541, &&_542, &&_543, &&_544, &&_545, &&_546, &&_547, &&_548, &&_549, \\\n    &&_550, &&_551, &&_552, &&_553, &&_554, &&_555, &&_556, &&_557, &&_558, &&_559, \\\n    &&_560, &&_561, &&_562, &&_563, &&_564, &&_565, &&_566, &&_567, &&_568, &&_569, \\\n    &&_570, &&_571, &&_572, &&_573, &&_574, &&_575, &&_576, &&_577, &&_578, &&_579, \\\n    &&_580, &&_581, &&_582, &&_583, &&_584, &&_585, &&_586, &&_587, &&_588, &&_589, \\\n    &&_590, &&_591, &&_592, &&_593, &&_594, &&_595, &&_596, &&_597, &&_598, &&_599, \\\n    &&_600, &&_601, &&_602, &&_603, &&_604, &&_605, &&_606, &&_607, &&_608, &&_609, \\\n    &&_610, &&_611, &&_612, &&_613, &&_614, &&_615, &&_616, &&_617, &&_618, &&_619, \\\n    &&_620, &&_621, &&_622, &&_623, &&_624, &&_625, &&_626, &&_627, &&_628, &&_629, \\\n    &&_630, &&_631, &&_632, &&_633, &&_634, &&_635, &&_636, &&_637, &&_638, &&_639, \\\n    &&_640, &&_641, &&_642, &&_643, &&_644, &&_645, &&_646, &&_647, &&_648, &&_649, \\\n    &&_650, &&_651, &&_652, &&_653, &&_654, &&_655, &&_656, &&_657, &&_658, &&_659, \\\n    &&_660, &&_661, &&_662, &&_663, &&_664, &&_665, &&_666, &&_667, &&_668, &&_669, \\\n    &&_670, &&_671, &&_672, &&_673, &&_674, &&_675, &&_676, &&_677, &&_678, &&_679, \\\n    &&_680, &&_681, &&_682, &&_683, &&_684, &&_685, &&_686, &&_687, &&_688, &&_689, \\\n    &&_690, &&_691, &&_692, &&_693, &&_694, &&_695, &&_696, &&_697, &&_698, &&_699, \\\n  }\n\n  /*\n     IP_REG, SP_REG, CB_REG\n        the machine registers in which to place localIP, localFP, localSP and\n        currentBytecode.  Wins big on register-deficient architectures --\n        especially Intel.\n  */\n#if defined(__mips__)\n# define IP_REG __asm__(\"$16\")\n# define SP_REG __asm__(\"$17\")\n# define CB_REG __asm__(\"$18\")\n#endif\n#if defined(__sparc__)\n# define IP_REG __asm__(\"%l0\")\n# define SP_REG __asm__(\"%l1\")\n# define CB_REG __asm__(\"%l2\")\n#endif\n#if defined(__alpha__)\n# define IP_REG __asm__(\"$9\")\n# define SP_REG __asm__(\"$10\")\n# define CB_REG __asm__(\"$11\")\n#endif\n#if defined(__i386__)\n#   define IP_REG __asm__(\"%esi\")\n#   define SP_REG __asm__(\"%edi\")\n# if (__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 95))\n#     define CB_REG __asm__(\"%ebx\")\n# else\n#   define CB_REG /* avoid undue register pressure */\n# endif\n#endif\n#if defined(__powerpc__) || defined(PPC) || defined(_POWER) || defined(_IBMR2) || defined(__ppc__)\n# define GP_REG __asm__(\"24\")\n# define JP_REG __asm__(\"25\")\n# define IP_REG __asm__(\"26\")\n# define SP_REG __asm__(\"27\")\n# define CB_REG __asm__(\"28\")\n#endif\n#if defined(__hppa__)\n# define IP_REG __asm__(\"%r18\")\n# define SP_REG __asm__(\"%r17\")\n# define CB_REG __asm__(\"%r16\")\n#endif\n#if defined(__mc68000__)\n# define IP_REG __asm__(\"a5\")\n# define SP_REG __asm__(\"a4\")\n# define CB_REG __asm__(\"d7\")\n#endif\n\n#if !defined(JP_REG)\n# define JP_REG\n#endif\n#if !defined(IP_REG)\n# define IP_REG\n#endif\n#if !defined(SP_REG)\n# define SP_REG\n#endif\n#if !defined(CB_REG)\n# define CB_REG\n#endif\n#if !defined(GP_REG)\n# define GP_REG\n#endif\n#if !defined(FOO_REG)\n# define FOO_REG /* nada */\n#endif\n#if !defined(FP_REG)\n# define FP_REG /* nada */\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/sqNamedPrims.h",
    "content": "/* Automatically generated from Squeak on an Array(14 April 2008 3:48:54 pm)\nby VMMaker 3.8b6\n */\n/* This is an automatically generated table of all builtin modules in the VM */\n\nextern sqExport vm_exports[];\nextern sqExport os_exports[];\nextern sqExport ADPCMCodecPlugin_exports[];\nextern sqExport BMPReadWriterPlugin_exports[];\nextern sqExport B2DPlugin_exports[];\nextern sqExport BitBltPlugin_exports[];\nextern sqExport DSAPrims_exports[];\nextern sqExport ZipPlugin_exports[];\nextern sqExport FFTPlugin_exports[];\nextern sqExport FloatArrayPlugin_exports[];\nextern sqExport GeniePlugin_exports[];\nextern sqExport JPEGReaderPlugin_exports[];\nextern sqExport Klatt_exports[];\nextern sqExport LargeIntegers_exports[];\nextern sqExport Matrix2x3Plugin_exports[];\nextern sqExport MiscPrimitivePlugin_exports[];\nextern sqExport StarSqueakPlugin_exports[];\nextern sqExport UnixOSProcessPlugin_exports[];\nextern sqExport XDisplayControlPlugin_exports[];\n\nextern sqExport FilePlugin_exports[]; // xxx_dmu\nextern sqExport RVMPlugin_exports[]; // xxx_dmu\nextern sqExport SocketPlugin_exports[]; // xxx_dmu\n\nsqExport *pluginExports[] = {\n\tvm_exports,\n\tos_exports,\n\nFilePlugin_exports, // xxx_dmu\n\tADPCMCodecPlugin_exports,\n\tBMPReadWriterPlugin_exports,\n\tB2DPlugin_exports,\n\tBitBltPlugin_exports,\n\tDSAPrims_exports,\n\tZipPlugin_exports,\n\tFFTPlugin_exports,\n\tFloatArrayPlugin_exports,\n\tGeniePlugin_exports,\n\tJPEGReaderPlugin_exports,\n\tKlatt_exports,\n\tLargeIntegers_exports,\n\tMatrix2x3Plugin_exports,\n\tMiscPrimitivePlugin_exports,\n\tStarSqueakPlugin_exports,\n\tUnixOSProcessPlugin_exports,\n\tXDisplayControlPlugin_exports,\n  RVMPlugin_exports,\n  SocketPlugin_exports, // xxx_dmu\n\tNULL\n};\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/sqPlatformSpecific.h",
    "content": "/* sqPlatformSpecific.h -- platform-specific modifications to sq.h\n * \n *   Copyright (C) 1996-2005 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n * \n * Author: ian.piumarta@squeakland.org\n * \n */\n\n/* undefine clock macros (these are implemented as functions) */\n\n#undef ioMSecs\n#undef ioMicroMSecs\n#undef ioLowResMSecs\n\n#undef sqAllocateMemory\n#undef sqGrowMemoryBy\n#undef sqShrinkMemoryBy\n#undef sqMemoryExtraBytesLeft\n\n#include \"sqMemoryAccess.h\"\n\nextern sqInt sqAllocateMemory(sqInt minHeapSize, sqInt desiredHeapSize);\n#define allocateMemoryMinimumImageFileHeaderSize(heapSize, minimumMemory, fileStream, headerSize) \\\nsqAllocateMemory(minimumMemory, heapSize)\nextern sqInt sqGrowMemoryBy(sqInt oldLimit, sqInt delta);\nextern sqInt sqShrinkMemoryBy(sqInt oldLimit, sqInt delta);\nextern sqInt sqMemoryExtraBytesLeft(sqInt includingSwap);\n#if COGVM\nextern void sqMakeMemoryExecutableFromTo(unsigned long, unsigned long);\nextern void sqMakeMemoryNotExecutableFromTo(unsigned long, unsigned long);\n\nextern int isCFramePointerInUse(void);\n#endif\n\n/* warnPrintf is provided (and needed) on the win32 platform.\n * But it may be mentioned elsewhere, so provide a suitable def.\n */\n#define warnPrintf printf\n\n/* Thread support for thread-safe signalSemaphoreWithIndex and/or the COGMTVM */\n#if STACKVM\n# define sqLowLevelYield() sched_yield()\n/* linux's sched.h defines clone that conflicts with the interpreter's */\n# define clone NameSpacePollutant\n# include <pthread.h>\n# undef clone\n# define sqOSThread pthread_t\n/* these are used both in the STACKVM & the COGMTVM */\n# define ioOSThreadsEqual(a,b) pthread_equal(a,b)\n# define ioCurrentOSThread() pthread_self()\n# if COGMTVM\n/* Please read the comment for CogThreadManager in the VMMaker package for\n * documentation of this API.\n */\ntypedef struct {\n\t\tpthread_cond_t\tcond;\n\t\tpthread_mutex_t mutex;\n\t\tint\t\t\t\tcount;\n\t} sqOSSemaphore;\n#  define ioDestroyOSSemaphore(ptr) 0\n#  if !ForCOGMTVMImplementation /* this is a read-only export */\nextern const pthread_key_t tltiIndex;\n#  endif\n#  define ioGetThreadLocalThreadIndex() ((long)pthread_getspecific(tltiIndex))\n#  define ioSetThreadLocalThreadIndex(v) (pthread_setspecific(tltiIndex,(void*)(v)))\n#  define ioOSThreadIsAlive(thread) (pthread_kill(thread,0) == 0)\n#  define ioTransferTimeslice() sched_yield()\n#  define ioMilliSleep(ms) usleep((ms) * 1000)\n# endif /* COGMTVM */\n#endif /* STACKVM */\n\n#include <sys/types.h>\n\ntypedef off_t squeakFileOffsetType;\n\n#undef\tsqFilenameFromString\n#undef\tsqFilenameFromStringOpen\n#define sqFilenameFromStringOpen sqFilenameFromString\n\nextern void sqFilenameFromString(char *uxName, sqInt stNameIndex, int sqNameLength);\n\n#undef dispatchFunctionPointer\n#undef dispatchFunctionPointerOnin\n/* we'd like to untypedef fptr too, but such is life */\n\n#include <unistd.h> /* for declaration of ftruncate */\n\n#undef\tsqFTruncate\n/* sqFTruncate should return 0 on success, ftruncate does also */\n#define\tsqFTruncate(f,o) ftruncate(fileno(f), o)\n#define ftell ftello\n#define fseek fseeko\n\n#if defined(__GNUC__)\n# define VM_LABEL(foo) asm(\"\\n.globl L\" #foo \"\\nL\" #foo \":\")\n#else\n# if HAVE_ALLOCA_H\n#   include <alloca.h>\n# else\n#   ifdef _AIX\n#     pragma alloca\n#   else\n#     ifndef alloca /* predefined by HP cc +Olibcalls */\n        char *alloca();\n#     endif\n#   endif\n# endif\n#endif\n\n#if !defined(VM_LABEL) || COGVM\n# undef VM_LABEL\n# define VM_LABEL(foo) 0\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/sqUnixCharConv.c",
    "content": "/* sqUnixCharConv.c -- conversion between character encodings\n * \n * Author: Ian.Piumarta@squeakland.org\n * \n *   Copyright (C) 1996-2005 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a copy\n *   of this software and associated documentation files (the \"Software\"), to deal\n *   in the Software without restriction, including without limitation the rights\n *   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n *   copies of the Software, and to permit persons to whom the Software is\n *   furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n *   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n *   SOFTWARE.\n * \n * Last edited: 2009-08-15 12:59:49 by piumarta on emilia-2.local\n */\n\n# include \"squeak_adapters.h\"\n\n#if !defined(__MACH__)\n# include \"sqMemoryAccess.h\"\n#endif\n#include \"sqUnixCharConv.h\"\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <ctype.h>\n#include <errno.h>\n\nstatic inline int min(int x, int y) { return (x < y) ? x : y; }\n\nstatic int convertCopy(char *from, int fromLen, char *to, int toLen, int term)\n{\n  int len= min(toLen - term, fromLen);\n  strncpy(to, from, len);\n  if (term) to[len]= '\\0';\n  return len;\n}\n\n\n#if defined(__MACH__)\n\n// we have to do something special on MacOSX (surprise surprise) because:\n// - MacOSX is not Unix98 compliant and lacks builtin iconv functions\n// - the free libiconv cannot handle the canonical decomposition used in HFS+\n\n# include <CoreFoundation/CoreFoundation.h>\n# include \"sqMemoryAccess.h\"\n\ntypedef struct\n{\n  char *alias;\n  void *encoding;\n} alias;\n\nstatic alias encodings[]=\n{\n  { \"MACROMAN\",\t\t(void *)kCFStringEncodingMacRoman },\n  { \"MAC\",\t\t(void *)kCFStringEncodingMacRoman },\n  { \"MACINTOSH\",\t(void *)kCFStringEncodingMacRoman },\n  { \"CSMACINTOSH\",\t(void *)kCFStringEncodingMacRoman },\n  { \"UTF8\",\t\t(void *)kCFStringEncodingUTF8 },\n  { \"UTF-8\",\t\t(void *)kCFStringEncodingUTF8 },\n  { \"ISOLATIN9\",\t(void *)kCFStringEncodingISOLatin9 },\n  { \"LATIN9\",\t\t(void *)kCFStringEncodingISOLatin9 },\n  { \"ISO-8859-15\",\t(void *)kCFStringEncodingISOLatin9 },\n  { \"ISOLATIN1\",\t(void *)kCFStringEncodingISOLatin1 },\n  { \"LATIN1\",\t\t(void *)kCFStringEncodingISOLatin1 },\n  { \"ISO-8859-1\",\t(void *)kCFStringEncodingISOLatin1 },\n  // there are many tens of these and I cannot be bothered.\n  { 0,\t\t\t0 }\n};\n\n// defaults\n\nvoid *localeEncoding=   0;\nvoid *sqTextEncoding=\t((void *)kCFStringEncodingMacRoman);\t// xxxFIXME -> kCFStringEncodingISOLatin9\nvoid *uxTextEncoding=\t((void *)kCFStringEncodingISOLatin9);\nvoid *uxPathEncoding=\t((void *)kCFStringEncodingUTF8);\nvoid *uxUTF8Encoding=\t((void *)kCFStringEncodingUTF8);\nvoid *uxXWinEncoding=\t((void *)kCFStringEncodingISOLatin1);\n\nvoid setLocaleEncoding(char *locale) { }\n\nvoid freeEncoding(void *encoding) { }\n\nvoid setEncoding(void **encoding, char *rawName)\n{\n  char *name= strdup(rawName);\n  int   len= strlen(name);\n  int   i;\n  int   utf8= 0;\n  alias *ap= encodings;\n  for (i= 0;  i < len;  ++i)\n    name[i]= toupper(name[i]);\n  while (ap->alias)\n    if (!strcmp(name, ap->alias))\n      {\n\t*encoding= ap->encoding;\n\tgoto done;\n      }\n    else\n      ++ap;\n  fprintf(stderr, \"setEncoding: could not set encoding '%s'\\n\", name);\n done:\n  free(name);\n}\n\nvoid setNEncoding(void **encoding, char *rawName, int n)\n{\n  setEncoding(encoding, rawName);\n}\n\nint convertChars(char *from, int fromLen, void *fromCode, char *to, int toLen, void *toCode, int norm, int term)\n{\n  CFStringRef\t     cfs= CFStringCreateWithBytes(NULL, (unsigned char *)from, fromLen, (CFStringEncoding)fromCode, 0);\n  CFMutableStringRef str= CFStringCreateMutableCopy(NULL, 0, cfs);\n  CFRelease(cfs);\n  if (norm) // HFS+ imposes Unicode2.1 decomposed UTF-8 encoding on all path elements\n    CFStringNormalize(str, kCFStringNormalizationFormD); // canonical decomposition\n  {\n    CFRange rng= CFRangeMake(0, CFStringGetLength(str));\n    CFIndex len= 0;\n    CFIndex num= CFStringGetBytes(str, rng, (CFStringEncoding)toCode, '?', 0, (UInt8 *)to, toLen - term, &len);\n    CFRelease(str);\n    if (!num)\n      return convertCopy(from, fromLen, to, toLen, term);\n    if (term)\n      to[len]= '\\0';\n    return len;\n  }\n}\n\n\n#elif defined(HAVE_ICONV_H)\n\n# include <iconv.h>\n\ntypedef char ichar_t;\n\nstatic char macEncoding[]=     \"MACINTOSH\";\nstatic char utf8Encoding[]=    \"UTF-8\";\nstatic char iso1Encoding[]=    \"ISO-8859-1\";\nstatic char iso15Encoding[]=   \"ISO-8859-15\";\n\nstatic char *preDefinedEncodings[]=\n  {\n    macEncoding,\n    utf8Encoding,\n    iso1Encoding,\n    iso15Encoding\n  };\n\nvoid *localeEncoding=   0;\nvoid *sqTextEncoding=   (void *)macEncoding;\nvoid *uxTextEncoding=   (void *)iso15Encoding;\nvoid *uxPathEncoding=   (void *)utf8Encoding;\nvoid *uxUTF8Encoding=   (void *)utf8Encoding;\nvoid *uxXWinEncoding=   (void *)iso1Encoding;\n\nvoid freeEncoding(void *encoding)\n{\n  int i;\n  for (i= 0;  i < sizeof(preDefinedEncodings) / sizeof(char *);  ++i)\n    if (encoding == preDefinedEncodings[i])\n      return;\n  free(encoding);\n}\n\ntypedef struct\n{\n  char *name;\n  char *encoding;\n} alias;\n\nvoid setNEncoding(void **encoding, char *rawName, int n)\n{\n  char *name= malloc((size_t)((n + 1) * sizeof(char)));\n  int   i;\n\n  static alias aliases[]=\n    {\n      {\"UTF8\",      utf8Encoding},\n      {\"MACROMAN\",  macEncoding},\n      {\"MAC-ROMAN\", macEncoding},\n    };\n\n  for (i= 0;  i < n;  ++i)\n    name[i]= toupper(rawName[i]);\n  name[n]= '\\0';\n  if ((*encoding) && (*encoding != localeEncoding))\n    freeEncoding(*encoding);\n  if (localeEncoding && !strcmp(name, localeEncoding))\n    {\n      *encoding= localeEncoding;\n      free(name);\n      return;\n    }\n  for(i= 0;  i < sizeof(preDefinedEncodings) / sizeof(char *);  ++i)\n    if (!strcmp(name, preDefinedEncodings[i]))\n      {\n\t*encoding= preDefinedEncodings[i];\n\tfree(name);\n\treturn;\n      }\n  for (i= 0;  i < sizeof(aliases) / sizeof(alias);  ++i)\n    if(!strcmp(name, aliases[i].name))\n      {\n\t*encoding= aliases[i].encoding;\n\tfree(name);\n\treturn;\n      }\n  *encoding= name;\n}\n\nvoid setLocaleEncoding(char *locale)\n{\n  while (*locale)\n    if (*locale++ == '.')\n      {\n\tint len= 0;\n\twhile (locale[len] && (locale[len] != '@'))\n\t  ++len;\n\tsetNEncoding(&localeEncoding, locale, len);\n\tsqTextEncoding= uxTextEncoding= uxPathEncoding= uxXWinEncoding= localeEncoding;\n\treturn;\n      }\n}\n\nvoid setEncoding(void **encoding, char *rawName)\n{\n  setNEncoding(encoding, rawName, strlen(rawName));\n}\n\nstatic void iconvFail(char *toCode, char *fromCode)\n{\n  static int warned= 0;\n  if (!warned++)\n    {\n      char buf[256];\n      sprintf(buf, \"iconv_open(%s, %s)\", toCode, fromCode);\n      perror(buf);\n    }\n}\n\nint convertChars(char *from, int fromLen, void *fromCode, char *to, int toLen, void *toCode, int norm, int term)\n{\n  ichar_t     *inbuf= from;\n  size_t     inbytes= fromLen;\n  char       *outbuf= to;\n  size_t    outbytes= toLen - term;\n  static iconv_t  cd= (iconv_t)-1;\n  static void   *pfc= 0;\n  static void   *ptc= 0;\n\n  if ((pfc != fromCode) || (ptc != toCode))\n    {\n      if (cd != (iconv_t)-1) iconv_close(cd);\n      pfc= ptc= (void *)-1;\n      cd= iconv_open((const char *)toCode, (const char *)fromCode);\n      if ((iconv_t)-1 != cd)\n\t{\n\t  pfc= fromCode;\n\t  ptc= toCode;\n\t}\n    }\n\n  if ((iconv_t)-1 != cd)\n    {\n      while (inbytes > 0)\n\t{\n\t  int n= iconv(cd, &inbuf, &inbytes, &outbuf, &outbytes);\n\t  if ((size_t)-1 == n)\n\t    {\n\t      switch (errno)\n\t\t{\n\t\tcase EINVAL:  /* broken multibyte at end of input */\n\t\tcase EILSEQ:  /* broken multibyte in input */\n\t\t  {\n\t\t    unsigned char c= (unsigned char)*inbuf;\n\t\t    unsigned char mask= 0x80;\n\t\t    size_t skip= 0;\n\n\t\t    if (0xfe == c || 0xff == c)\t\t/* invalid */\n\t\t      skip= 1;\n\t\t    else \n\t\t      while ((skip < inbytes) && (mask & c))\n\t\t\t{\n\t\t\t  skip++;\n\t\t\t  mask >>= 1;\n\t\t\t}\n\t\t    inbuf += skip;\n\t\t    inbytes -= skip;\n\t\t    if (outbytes > 0)\n\t\t      {\n\t\t\t*outbuf++ = '?';\n\t\t\toutbytes--;\n\t\t      }\n\t\t  }\n\t\t  break;\n\n\t\tcase E2BIG:   /* out of room in output buffer */\n\t\t  inbytes= 0;\n\t\t  /* fall through */\n\n\t\tdefault:\n\t\t  iconvFail(toCode, fromCode);\n\t\t  break;\n\t\t}\n\t    }\n\t}\n      if (term) *outbuf= '\\0';\n      return outbuf - to;\n    }\n  else\n    iconvFail(toCode, fromCode);\n\n  return convertCopy(from, fromLen, to, toLen, term);\n}\n\n#else /* !__MACH__ && !HAVE_LIBICONV */\n\nvoid *localeEncoding= 0;\nvoid *sqTextEncoding= 0;\nvoid *uxTextEncoding= 0;\nvoid *uxPathEncoding= 0;\nvoid *uxUTF8Encoding= 0;\nvoid *uxXWinEncoding= 0;\n\nvoid setLocaleEncoding(char *locale) { }\n\nvoid freeEncoding(void *encoding) { }\n\nvoid setEncoding(void **encoding, char *name) { }\n\nint convertChars(char *from, int fromLen, void *fromCode, char *to, int toLen, void *toCode, int norm, int term)\n{\n  return convertCopy(from, fromLen, to, toLen, term);\n}\n\n#endif\n\n\nstatic inline void sq2uxLines(char *string, int n)\n{\n  while (n--)\n    {\n      if ('\\015' == *string) *string= '\\012';\n      ++string;\n    }\n}\n\nstatic inline void ux2sqLines(char *string, int n)\n{\n  while (n--)\n    {\n      if ('\\012' == *string) *string= '\\015';\n      ++string;\n    }\n}\n\n\n#define Convert(sq,ux, type, F, T, N, L)\t\t\t\t\t\\\n  int sq##2##ux##type(char *from, int fromLen, char *to, int toLen, int term)\t\\\n  {\t\t\t\t\t\t\t\t\t\t\\\n    int n= convertChars(from, fromLen, F, to, toLen, T, N, term);\t\t\\\n    if (L) sq##2##ux##Lines(to, n);\t\t\t\t\t\t\\\n    return n;\t\t\t\t\t\t\t\t\t\\\n  }\n\nConvert(sq,ux, Text, sqTextEncoding, uxTextEncoding, 0, 1);\nConvert(ux,sq, Text, uxTextEncoding, sqTextEncoding, 0, 1);\n#if defined(__MACH__)\nConvert(sq,ux, Path, sqTextEncoding, uxPathEncoding, 1, 0);\t// normalised paths for HFS+\n#else\nConvert(sq,ux, Path, sqTextEncoding, uxPathEncoding, 0, 0);\t// composed paths for others\n#endif\nConvert(ux,sq, Path, uxPathEncoding, sqTextEncoding, 0, 0);\nConvert(sq,ux, UTF8, sqTextEncoding, uxUTF8Encoding, 0, 1);\nConvert(ux,sq, UTF8, uxUTF8Encoding, sqTextEncoding, 0, 1);\nConvert(ux,sq, XWin, uxXWinEncoding, sqTextEncoding, 0, 1);\n\n#undef Convert\n\n\n\nvoid sqFilenameFromString(char *uxName, sqInt sqNameIndex, int sqNameLength)\n{\n  /*xxx BUG: lots of code generate from the image assumes 1000 chars max path len */\n  sq2uxPath(pointerForIndex_xxx_dmu(sqNameIndex), sqNameLength, uxName, 1000, 1);\n}\n\n\n\n#if defined(CONV_TEST)\n\n\n#if defined(HAVE_LANGINFO_CODESET)\n# include <langinfo.h>\n#endif\n\nint main()\n{\n#if defined(HAVE_LANGINFO_CODESET)\n  if (0 == strcmp(nl_langinfo(CODESET), \"UTF-8\"))\n    printf(\"UTF-8 codeset selected\\n\");\n#else\n  {\n    char *s;\n    if (((   (s = getenv(\"LC_ALL\"))   && *s)\n\t || ((s = getenv(\"LC_CTYPE\")) && *s)\n\t || ((s = getenv(\"LANG\"))     && *s))\n\t&& strstr(s, \"UTF-8\"))\n      printf(\"UTF-8 locale selected\\n\");\n  }\n#endif\n\n  {\n    char *in, out[256];\n    int   n;\n    in= \"tésté\";\t\t// UTF-8 composed Unicode\n    n= convertChars(in, strlen(in), uxPathEncoding, out, sizeof(out), uxTextEncoding, 0, 1);\n    printf(\"%d: %s -> %s\\n\", n, in, out);\n    in= \"tésté\";\t// UTF-8 decomposed Unicode (libiconv fails on this one, MacOSX passes)\n    n= convertChars(in, strlen(in), uxPathEncoding, out, sizeof(out), uxTextEncoding, 0, 1);\n    printf(\"%d: %s -> %s\\n\", n, in, out);\n    in= \"tst\";\t\t// ISO-8859-15\n    n= convertChars(in, strlen(in), uxTextEncoding, out, sizeof(out), uxPathEncoding, 0, 1);\n    printf(\"%d: %s -> %s\\n\", n, in, out); // default composition -- should yield \"tésté\"\n    n= convertChars(in, strlen(in), uxTextEncoding, out, sizeof(out), uxPathEncoding, 1, 1);\n    printf(\"%d: %s -> %s\\n\", n, in, out); // canonical decomposition -- should yield \"tésté\"\n  }\n  return 0;\n}\n\n/*\n  cc -Wall -DCONV_TEST -g -o main sqUnixCharConv.c -framework CoreFoundation\t# MacOSX\n  cc -Wall -DCONV_TEST -g -o main sqUnixCharConv.c\t\t\t\t# glibc >= 2.2\n  cc -Wall -DCONV_TEST -g -o main sqUnixCharConv.c -liconv\t\t\t# others\n*/\n\n#endif /* defined(CONV_TEST) */\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/sqUnixCharConv.h",
    "content": "/* sqUnixCharConv.h -- conversion between character encodings\n * \n * Author: Ian.Piumarta@squeakland.org\n * \n *   Copyright (C) 1996-2005 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a copy\n *   of this software and associated documentation files (the \"Software\"), to deal\n *   in the Software without restriction, including without limitation the rights\n *   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n *   copies of the Software, and to permit persons to whom the Software is\n *   furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n *   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n *   SOFTWARE.\n * \n * Last edited: 2008-03-19 14:43:16 by piumarta on emilia.local\n */\n\n#ifndef __sqUnixCharConv_h\n#define __sqUnixCharConv_h\n\nextern void *sqTextEncoding;\nextern void *uxTextEncoding;\nextern void *uxPathEncoding;\nextern void *uxUTF8Encoding;\nextern void *uxXWinEncoding;\nextern void *localeEncoding;\n\nextern void setEncoding(void **encoding, char *name);\n\nextern int convertChars(char *from, int fromLen, void *fromCode,\n\t\t\tchar *to,   int toLen,   void *toCode,\n\t\t\tint norm, int term);\n\nextern int sq2uxText(char *from, int fromLen, char *to, int toLen, int term);\nextern int ux2sqText(char *from, int fromLen, char *to, int toLen, int term);\nextern int sq2uxPath(char *from, int fromLen, char *to, int toLen, int term);\nextern int ux2sqPath(char *from, int fromLen, char *to, int toLen, int term);\nextern int sq2uxUTF8(char *from, int fromLen, char *to, int toLen, int term);\nextern int ux2sqUTF8(char *from, int fromLen, char *to, int toLen, int term);\nextern int ux2sqXWin(char *from, int fromLen, char *to, int toLen, int term);\n\nextern void freeEncoding(void *encoding);\nextern void setNEncoding(void **encoding, char *rawName, int n);\nextern void setLocaleEncoding(char *locale);\n\n#endif /* __sqUnixCharConv_h */\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/sqUnixEvent.c",
    "content": "/* sqUnixEvent.c -- support for window system events.\n * \n *   Copyright (C) 1996-2007 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a copy\n *   of this software and associated documentation files (the \"Software\"), to deal\n *   in the Software without restriction, including without limitation the rights\n *   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n *   copies of the Software, and to permit persons to whom the Software is\n *   furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n *   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n *   SOFTWARE.\n */\n\n/* Author: Ian Piumarta <ian.piumarta@squeakland.org>\n *\n * Last edited: 2009-08-15 15:39:46 by piumarta on emilia-2.local\n * Last edited: Tue Jan 19 17:10:19 PST 2010 by eliot, nuke\n * setInterruptCheckCounter calls.\n *\n * NOTE: this file is included by the window support files that need it.\n */\n\n#if defined(DEBUG_EVENTS)\n# undef DEBUG_EVENTS\n# define DEBUG_EVENTS 1\n# define DEBUG_KEYBOARD_EVENTS 1\n# define DEBUG_MOUSE_EVENTS 1\n#else\n# if defined(DEBUG_KEYBOARD_EVENTS)\n#\tundef DEBUG_KEYBOARD_EVENTS\n#\tdefine DEBUG_KEYBOARD_EVENTS 1\n# endif\n# if defined(DEBUG_MOUSE_EVENTS)\n#\tundef DEBUG_MOUSE_EVENTS\n#\tdefine DEBUG_MOUSE_EVENTS 1\n# endif\n#endif\n\n#define IEB_SIZE\t 64\t/* must be power of 2 */\n\ntypedef struct\n{\n  int x, y;\n} SqPoint;\n\nSqPoint mousePosition= { 0, 0 };\t/* position at last motion event */\nint\tswapBtn= 0;\t\t\t/* 1 to swap yellow and blue buttons */\n\nsqInputEvent inputEventBuffer[IEB_SIZE];\n\nint iebIn=  0;\t/* next IEB location to write */\nint iebOut= 0;\t/* next IEB location to read  */\n\n#define iebEmptyP()\t(iebIn == iebOut)\n#define iebAdvance(P)\t(P= ((P + 1) & (IEB_SIZE - 1)))\n\nint buttonState= 0;\t\t/* mouse button state or 0 if not pressed */\nint modifierState= 0;\t\t/* modifier key state or 0 if none pressed */\n\n#if DEBUG_EVENTS || DEBUG_KEYBOARD_EVENTS || DEBUG_MOUSE_EVENTS\n\n#include <ctype.h>\n\nstatic void printKey(int key)\n{\n  printf(\" `%c' (%d = 0x%x)\", (isgraph(key) ? key : ' '), key, key);\n}\n\nstatic void printButtons(int buttons)\n{\n  if (buttons & RedButtonBit)    printf(\" red\");\n  if (buttons & YellowButtonBit) printf(\" yellow\");\n  if (buttons & BlueButtonBit)   printf(\" blue\");\n}\n\nstatic void printModifiers(int midofiers)\n{\n  if (midofiers & ShiftKeyBit)   printf(\" Shift\");\n  if (midofiers & CtrlKeyBit)    printf(\" Control\");\n  if (midofiers & CommandKeyBit) printf(\" Command\");\n  if (midofiers & OptionKeyBit)  printf(\" Option\");\n}\n\n#endif /* DEBUG_KEYBOARD_EVENTS || DEBUG_MOUSE_EVENTS */\n\n\nstatic sqInputEvent *allocateInputEvent(int eventType)\n{\n  sqInputEvent *evt= &inputEventBuffer[iebIn];\n  iebAdvance(iebIn);\n  if (iebEmptyP())\n    {\n      /* overrun: discard oldest event */\n      iebAdvance(iebOut);\n    }\n  evt->type= eventType;\n  evt->timeStamp= ioWhicheverMSecs();\n  return evt;\n}\n\n#define allocateMouseEvent() ( \\\n  (sqMouseEvent *)allocateInputEvent(EventTypeMouse) \\\n)\n\n#define allocateKeyboardEvent() ( \\\n  (sqKeyboardEvent *)allocateInputEvent(EventTypeKeyboard) \\\n)\n\n#define allocateDragEvent() ( \\\n  (sqDragDropFilesEvent *)allocateInputEvent(EventTypeDragDropFiles) \\\n)\n\n#define allocateWindowEvent() ( \\\n  (sqWindowEvent *)allocateInputEvent(EventTypeWindow) \\\n)\n\n\nstatic sqInt getButtonState(void)\n{\n  /* red button honours the modifiers:\n   *\tred+ctrl    = yellow button\n   *\tred+command = blue button\n   */\n  int buttons= buttonState;\n  int modifiers= modifierState;\n  if ((buttons == RedButtonBit) && modifiers)\n    {\n      int yellow= swapBtn ? BlueButtonBit   : YellowButtonBit;\n      int blue=   swapBtn ? YellowButtonBit : BlueButtonBit;\n      switch (modifiers)\n\t{\n\tcase CtrlKeyBit:    buttons= yellow; modifiers &= ~CtrlKeyBit;    break;\n\tcase CommandKeyBit: buttons= blue;   modifiers &= ~CommandKeyBit; break;\n\t}\n    }\n#if DEBUG_MOUSE_EVENTS\n  printf(\"BUTTONS\");\n  printModifiers(modifiers);\n  printButtons(buttons);\n  printf(\"\\n\");\n#endif\n  return buttons | (modifiers << 3);\n}\n\n\nstatic void signalInputEvent(void)\n{\n#if DEBUG_EVENTS\n  printf(\"signalInputEvent\\n\");\n#endif\n  if (inputEventSemaIndex > 0)\n    signalSemaphoreWithIndex(inputEventSemaIndex);\n}\n\n\nstatic void recordMouseEvent(void)\n{\n  int state= getButtonState();\n  sqMouseEvent *evt= allocateMouseEvent();\n  evt->x= mousePosition.x;\n  evt->y= mousePosition.y;\n  evt->buttons= (state & 0x7);\n  evt->modifiers= (state >> 3);\n  evt->nrClicks=\n    evt->windowIndex= 0;\n  signalInputEvent();\n#if DEBUG_MOUSE_EVENTS\n  printf(\"EVENT: mouse (%d,%d)\", mousePosition.x, mousePosition.y);\n  printModifiers(state >> 3);\n  printButtons(state & 7);\n  printf(\"\\n\");\n#endif\n}\n\n\nstatic void recordKeyboardEvent(int keyCode, int pressCode, int modifiers, int ucs4)\n{\n  sqKeyboardEvent *evt= allocateKeyboardEvent();\n  if (keyCode < 0) keyCode= 0;\n  evt->charCode= keyCode;\n  evt->pressCode= pressCode;\n  evt->modifiers= modifiers;\n  evt->utf32Code= ucs4;\n  evt->reserved1=\n    evt->windowIndex= 0;\n  signalInputEvent();\n#if DEBUG_KEYBOARD_EVENTS\n  printf(\"EVENT: key\");\n  switch (pressCode)\n    {\n    case EventKeyDown: printf(\" down \"); break;\n    case EventKeyChar: printf(\" char \"); break;\n    case EventKeyUp:   printf(\" up   \"); break;\n    default:           printf(\" ***UNKNOWN***\"); break;\n    }\n  printModifiers(modifiers);\n  printKey(keyCode);\n  printf(\" ucs4 %d\\n\", ucs4);\n#endif\n}\n\n\nstatic void recordDragEvent(int dragType, int numFiles)\n{\n  int state= getButtonState();\n  sqDragDropFilesEvent *evt= allocateDragEvent();\n  evt->dragType= dragType;\n  evt->x= mousePosition.x;\n  evt->y= mousePosition.y;\n  evt->modifiers= (state >> 3);\n  evt->numFiles= numFiles;\n  evt->windowIndex= 0;\n  signalInputEvent();\n#if DEBUG_EVENTS\n  printf(\"EVENT: drag (%d,%d)\", mousePosition.x, mousePosition.y);\n  printModifiers(state >> 3);\n  printButtons(state & 7);\n  printf(\"\\n\");\n#endif\n}\n\n\nstatic void recordWindowEvent(int action, int v1, int v2, int v3, int v4, int windowIndex)\n{\n  sqWindowEvent *evt= allocateWindowEvent();\n  evt->action= action;\n  evt->value1= v1;\n  evt->value2= v2;\n  evt->value3= v3;\n  evt->value4= v4;\n  evt->windowIndex= windowIndex;\n  signalInputEvent();\n#if DEBUG_EVENTS\n  printf(\"EVENT: window (%d %d %d %d %d %d) \", action, v1, v2, v3, v4, 0);\n  switch (action)\n    {\n    case WindowEventMetricChange: printf(\"metric change\");  break;\n    case WindowEventClose:        printf(\"close\");\t    break;\n    case WindowEventIconise:      printf(\"iconise\");\t    break;\n    case WindowEventActivated:    printf(\"activated\");\t    break;\n    case WindowEventPaint:        printf(\"paint\");\t    break;\n    default:                      printf(\"***UNKNOWN***\");  break;\n    }\n  printf(\"\\n\");\n#endif\n}\n\n\n/* retrieve the next input event from the queue */\n\nstatic sqInt display_ioGetNextEvent(sqInputEvent *evt)\n{\n  if (iebEmptyP())\n    ioProcessEvents();\n  if (iebEmptyP())\n    return false;\n  *evt= inputEventBuffer[iebOut];\n  iebAdvance(iebOut);\n  return true;\n}\n\n\n#if !defined(recordKeystroke)\n/*** the following are deprecated and should really go away.  for now\n     we keep them for backwards compatibility with ancient images\t ***/\n\n\n#define KEYBUF_SIZE 64\n\nstatic int keyBuf[KEYBUF_SIZE];\t\t/* circular buffer */\nstatic int keyBufGet= 0;\t\t/* index of next item of keyBuf to read */\nstatic int keyBufPut= 0;\t\t/* index of next item of keyBuf to write */\nstatic int keyBufOverflows= 0;\t\t/* number of characters dropped */\n\nstatic void recordKeystroke(int keyCode)\t\t\t/* DEPRECATED */\n{\n  if (inputEventSemaIndex == 0)\n    {\n      int keystate= keyCode | (modifierState << 8);\n#    if DEBUG_KEYBOARD_EVENTS\n      printf(\"RECORD keystroke\");\n      printModifiers(modifierState);\n      printKey(keyCode);\n      printf(\" = %d 0x%x\\n\", keystate, keystate);\n#    endif\n      if (keystate == getInterruptKeycode())\n\t  setInterruptPending(true);\n      else\n\t{\n\t  keyBuf[keyBufPut]= keystate;\n\t  keyBufPut= (keyBufPut + 1) % KEYBUF_SIZE;\n\t  if (keyBufGet == keyBufPut)\n\t    {\n\t      /* buffer overflow; drop the last character */\n\t      keyBufGet= (keyBufGet + 1) % KEYBUF_SIZE;\n\t      keyBufOverflows++;\n\t    }\n\t}\n    }\n}\n\n\n\n\nstatic sqInt display_ioPeekKeystroke(void)\t\t\t/* DEPRECATED */\n{\n  int keystate;\n\n  ioProcessEvents();  /* process all pending events */\n  if (keyBufGet == keyBufPut)\n    return -1;  /* keystroke buffer is empty */\n  keystate= keyBuf[keyBufGet];\n  return keystate;\n}\n\n\nstatic sqInt display_ioGetKeystroke(void)\t\t\t/* DEPRECATED */\n{\n  int keystate;\n\n  ioProcessEvents();  /* process all pending events */\n  if (keyBufGet == keyBufPut)\n    return -1;  /* keystroke buffer is empty */\n  keystate= keyBuf[keyBufGet];\n  keyBufGet= (keyBufGet + 1) % KEYBUF_SIZE;\n  return keystate;\n}\n#else\nstatic sqInt display_ioPeekKeystroke(void) { return 0; }\t/* DEPRECATED */\nstatic sqInt display_ioGetKeystroke(void) { return 0; }\t/* DEPRECATED */\n#endif /* !defined(recordKeystroke) */\n\n\nstatic sqInt display_ioGetButtonState(void)\n{\n  ioProcessEvents();  /* process all pending events */\n  return getButtonState();\n}\n\n\nstatic sqInt display_ioMousePoint(void)\n{\n  ioProcessEvents();  /* process all pending events */\n  /* x is high 16 bits; y is low 16 bits */\n  return (mousePosition.x << 16) | (mousePosition.y);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/sqUnixExternalPrims.c",
    "content": "/* sqUnixExternalPrims.c -- Unix named primitives and loadable modules\n * \n *   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n */\n\n/* Author: Ian.Piumarta@INRIA.Fr\n */\n\n/* If one really wants debugging output use e.g. -DDEBUG=2 */\n#if DEBUG <= 1\n# undef DEBUG\n#define DEBUG 0\n#endif\n \n#include \"sq.h\"\t\t/* sqUnixConfig.h */\n\n#if (DEBUG)\n# define DPRINTF(ARGS) fprintf ARGS\n#else\n# define DPRINTF(ARGS)\n#endif\n \n#if !defined(HAVE_LIBDL) && defined(HAVE_DYLD)\n# include \"dlfcn-dyld.c\"\n#endif\n\n#if defined(HAVE_LIBDL)\t/* non-starter without this! */\n\n#ifdef HAVE_DLFCN_H\n# include <dlfcn.h>\n#else\n  extern void *dlopen (const char *filename, int flag);\n  extern const char *dlerror(void);\n  extern void *dlsym(void *handle, const char *symbol);\n  extern int dlclose (void *handle);\n#endif\n \n#include <sys/param.h>\n#include <sys/stat.h>\n\n/* get a value for RTLD_NOW, with increasing levels of desperation... */\n\n#if !defined(RTLD_NOW)\n# if defined(DL_NOW)\n#   define RTLD_NOW DL_NOW\n# elif defined(RTLD_LAZY)\n#   define RTLD_NOW RTLD_LAZY\n# elif defined(DL_LAZY)\n#   define RTLD_NOW DL_LAZY\n# else\n#   warning: defining RTLD_NOW as 1\n#   define RTLD_NOW 1\n# endif\n#endif\n\n#if !defined(RTLD_GLOBAL)\n# define RTLD_GLOBAL 0\n#endif\n \n#ifndef NAME_MAX\n# ifdef MAXPATHLEN\n#   define NAME_MAX MAXPATHLEN\n# else\n#   ifdef FILENAME_MAX\n#     define NAME_MAX FILENAME_MAX\n#   else\n#     define NAME_MAX 256\t/* nobody has fewer than this (since the PDP-8 ;) */\n#   endif\n# endif\n#endif\n\n#if !defined(HAVE_SNPRINTF)\n# if defined(HAVE___SNPRINTF)\t/* Solaris 2.5 */\n    extern int __snprintf(char *buf, size_t limit, const char *fmt, ...);\n#   define snprintf __snprintf\n#   define HAVE_SNPRINTF\n# endif\n#endif\n\n#if (DEBUG) || defined(ROAR_VM)\n# define sqIgnorePluginErrors 0\n#else\n  extern int sqIgnorePluginErrors;\n#endif\n\n/*** options ***/\n\n# if !defined(ROAR_VM) || !On_iOS\n  extern char *squeakPlugins;\n# else\n         char *squeakPlugins = NULL;\n# endif\n    \n/*** configured variables ***/\n\nextern char vmLibDir[];\n\n# ifndef ROAR_VM\nextern char vmPath[];\n# else\n  # ifndef VMPATH_SIZE\n    # define VMPATH_SIZE 1000\n  # endif\n\n       char vmPath[VMPATH_SIZE+1];\n# endif\n\n\n/*** local functions ***/\n\n\n#define USE_SIMPLIFIED_PLUGIN_LOGIC 0\n#if USE_SIMPLIFIED_PLUGIN_LOGIC\n\n#if !defined(MODULE_PREFIX)\n/* These are defined by the cmake configuration and I'm not about to go there.\n * eliot Wed Jan 20\n */\n\n# if __linux__ || defined(ROAR_VM)\n    # define MODULE_PREFIX \"\"\n    # define MODULE_SUFFIX \"\"\n    # define LIBRARY_PREFIX \"lib\"\n    # define LIBRARY_SUFFIX \".so\"\n# endif // __linux__ || defined(ROAR_VM)\n#endif !defined(MODULE_PREFIX)\n\n\nstatic void *tryLoadModule(const char *in, char *name)\n{\n  char path[PATH_MAX], *out= path;\n  void *handle= 0;\n  int c;\n  while ((c= *in++) && ':' != c) {\t/* copy next plugin path to path[] */\n    switch (c) {\n    case '%':\n      if ('n' == *in || 'N' == *in) {\t/* replace %n with name of plugin */\n\t++in;\n\tstrcpy(out, name);\n\tout += strlen(name);\n\tcontinue;\n      }\n      if ('%' == *in) {\n\t++in;\n\t*out++= '%';\n\tcontinue;\n      }\n      /* fall through... */\n    default:\n      *out++= c;\n      continue;\n    }\n  }\n  sprintf(out, \"/\" MODULE_PREFIX \"%s\" MODULE_SUFFIX, name);\n  handle= dlopen(path, RTLD_NOW | RTLD_GLOBAL);\n  DPRINTF((stderr, \"tryLoading(%s) = %p\\n\", path, handle));\n  if (!handle) {\n    struct stat buf;\n    if ((0 == stat(path, &buf)) && ! S_ISDIR(buf.st_mode))\n      fprintf(stderr, \"%s\\n\", dlerror());\n  }\n  return handle;\n}\n\n\nvoid *ioLoadModule(const char *pluginName)\n{\n  char  path[PATH_MAX];\n  char *dir= squeakPlugins;\n  void *handle= 0;\n\n  if ((0 == pluginName) || ('\\0' == pluginName[0])) {\t/* find module in main program */\n    handle= dlopen(0, RTLD_NOW | RTLD_GLOBAL);\n    if (handle == 0) {\n      fprintf(stderr, \"ioLoadModule(<intrinsic>): %s\\n\", dlerror());\n    }\n    else {\n      DPRINTF((stderr, \"loaded: <intrinsic>\\n\"));\n    }\n    return handle;\n  }\n\n  /* try loading the name unmodified */\n\n  if ((handle= dlopen(pluginName, RTLD_NOW | RTLD_GLOBAL)))\n    return handle;\n\n  /* try loading {pluginPaths}/MODULE_PREFIX<name>MODULE_SUFFIX */\n  if (dir) {\n    while (*dir) {\n      if ((handle= tryLoadModule(dir, pluginName)))\n        return handle;\n      while (*dir && ':' != *dir++)\n        ;\n    }\n  }\n\n  /* try dlopen()ing LIBRARY_PREFIX<name>LIBRARY_SUFFIX searching only the default locations modulo LD_LIBRARY_PATH et al */\n\n# if defined(HAVE_SNPRINTF)\n  snprintf(path, sizeof(path), \"%s%s%s\", LIBRARY_PREFIX, pluginName, LIBRARY_SUFFIX);\n# else\n  sprintf(path, \"%s%s%s\", LIBRARY_PREFIX, pluginName, LIBRARY_SUFFIX);\n# endif\n\n  handle= dlopen(path, RTLD_NOW | RTLD_GLOBAL);\n  DPRINTF((stderr, \"ioLoadModule(%s) = %p\\n\", path, handle));\n\n  return handle;\n}\n\n\n#else /* USE_SIMPLIFIED_PLUGIN_LOGIC */\n\n/*  Attempt to load the shared library named by the concatenation of prefix,\n *  moduleName and suffix.  Answer the new module entry, or 0 if the shared\n *  library could not be loaded.\n */\nstatic void *tryLoading(const char *dirName, const char *moduleName)\n{\n  static char *prefixes[]= { \"\", \"lib\", 0 };\n  static char *suffixes[]= { \"\", \".so\", \".dylib\", 0 };\n  void        *handle= 0;\n  char\t     **prefix= 0, **suffix= 0;\n\n  for (prefix= prefixes;  *prefix;  ++prefix)\n    for (suffix= suffixes;  *suffix;  ++suffix)\n      {\n\tchar        libName[NAME_MAX + 32];\t/* headroom for prefix/suffix */\n\tstruct stat buf;\n\tint         err;\n\tsprintf(libName, \"%s%s%s%s\", dirName, *prefix, moduleName, *suffix);\n\tif ((!(err= stat(libName, &buf))) && S_ISDIR(buf.st_mode))\n\t  DPRINTF((stderr, \"ignoring directory: %s\\n\", libName));\n\telse\n\t  {\n\t    DPRINTF((stderr, \"tryLoading %s\\n\", libName));\n\t\thandle= dlopen(libName, RTLD_NOW | RTLD_GLOBAL);\n\t\tif (handle == 0)\n\t\t  {\n\t\tif ((!err) && !(sqIgnorePluginErrors))\n\t\t      fprintf(stderr, \"ioLoadModule(%s):\\n  %s\\n\", libName, dlerror());\n\t\t  }\n\t\telse\n\t\t  {\n#\t           if DEBUG\n\t\t    printf(\"squeak: loaded plugin `%s'\\n\", libName);\n#\t           endif\n\t\t    return handle;\n\t\t  }\n\t      }\n\t  }\n  return 0;\n}\n\n\nstatic void *tryLoadingPath(const char *varName, const char *pluginName)\n{\n  char *path= getenv(varName);\n  void *handle= 0;\n\n  if (path)\n    {\n      char pbuf[MAXPATHLEN];\n      DPRINTF((stderr, \"try %s=%s\\n\", varName, path));\n      strncpy(pbuf, path, sizeof(pbuf));\n      pbuf[sizeof(pbuf) - 1]= '\\0';\n      for (path= strtok(pbuf, \":\");\n\t   path != 0;\n\t   path= strtok(0, \":\"))\n\t{\n\t  char buf[MAXPATHLEN];\n\t  sprintf(buf, \"%s/\", path);\n\t  DPRINTF((stderr, \"  path dir = %s\\n\", buf));\n\t  if ((handle= tryLoading(buf, pluginName)) != 0)\n\t    break;\n\t}\n    }\n  return handle;\n}\n\n\n/*  Find and load the named module.  Answer 0 if not found (do NOT fail\n *  the primitive!).\n */\nvoid *ioLoadModule(const char *pluginName)\n{\n  void *handle= 0;\n\n  if ((pluginName == 0) || (pluginName[0] == '\\0'))\n    {\n      handle= dlopen(0, RTLD_NOW | RTLD_GLOBAL);\n      if (handle == 0)\n\tfprintf(stderr, \"ioLoadModule(<intrinsic>): %s\\n\", dlerror());\n      else\n\t{\n\t  DPRINTF((stderr, \"loaded: <intrinsic>\\n\"));\n\t  return handle;\n\t}\n    }\n\n  if (squeakPlugins)\n      {\n\tchar path[NAME_MAX];\n\tchar c, *in= squeakPlugins, *out= path;\n\twhile ((c= *in++))\n\t  {\n\t    if (c == '%' && ((*in == 'n') || (*in == 'N')))\n\t      {\n\t\t++in;\n\t\tstrcpy(out, pluginName);\n\t\tout+= strlen(pluginName);\n\t      }\n\t    else\n\t      *out++= c;\n\t  }\n\t*out= '\\0';\n\tDPRINTF((stderr, \"ioLoadModule plugins = %s\\n                path = %s\\n\",\n\t\t squeakPlugins, path));\n\tif ((handle= tryLoading(path, \"\")))\n\t  return handle;\n\tif (!(out > path && *(out - 1) == '/')) {\n\t*out++= '/';\n\t*out= '\\0';\n\t}\n\tif ((handle= tryLoading(path, pluginName)))\n\t  return handle;\n      }\n\n  if ((   handle= tryLoading(    \"./\",\t\t\tpluginName))\n      || (handle= tryLoadingPath(\"SQUEAK_PLUGIN_PATH\",\tpluginName))\n      || (handle= tryLoadingPath(\"LD_LIBRARY_PATH\",\tpluginName))\n      || (handle= tryLoading(    \"\",\t\t\tpluginName))\n#    if defined(VM_X11DIR)\n      || (handle= tryLoading(VM_X11DIR\"/\",\t\tpluginName))\n#    endif\n      )\n    return handle;\n\n#if defined(DARWIN)\n  // look in the bundle contents dir\n  {\n    static char *contents= 0;\n    if (!contents)\n      {\n\tchar *delim;\n\tcontents= strdup(vmPath);\n\tif ((delim= strrchr(contents, '/')))\n\t  delim[1]= '\\0';\n      }\n    if ((handle= tryLoading(contents, pluginName)))\n      return handle;\n  }\n  // the following is needed so that, for example, the FFI can pick up\n  // things like <cdecl: 'xyz' module: 'CoreServices'>\n  {\n    static char *frameworks[]=\n      {\n\t\"/System/Library/Frameworks\",\n\t\"/System/Library/Frameworks/CoreServices.framework/Frameworks\",\n\t\"/System/Library/Frameworks/ApplicationServices.framework/Frameworks\",\n\t\"/System/Library/Frameworks/Carbon.framework/Frameworks\",\n\t0\n      };\n    char **framework= 0;\n    for (framework= frameworks;  *framework;  ++framework)\n      {\n\tchar path[NAME_MAX];\n\tsprintf(path, \"%s/%s.framework/\", *framework, pluginName);\n\tif ((handle= tryLoading(path, pluginName)))\n\t  return handle;\n      }\n  }\n#endif /* DARWIN */\n\n  /* finally (for VM hackers) try the pre-install build location */\n  {\n    char pluginDir[MAXPATHLEN];\n#  ifdef HAVE_SNPRINTF\n    snprintf(pluginDir, sizeof(pluginDir), \"%s%s/.libs/\", vmPath, pluginName);\n#  else\n    sprintf(pluginDir, \"%s%s/.libs/\", vmPath, pluginName);\n#  endif\n    if ((handle= tryLoading(pluginDir, pluginName)))\n      return handle;\n  }\n\n#if DEBUG\n  fprintf(stderr, \"squeak: could not load plugin `%s'\\n\", pluginName);\n#endif\n  return 0;\n}\n\n#endif /* USE_SIMPLIFIED_PLUGIN_LOGIC */\n\n/*  Find a function in a loaded module.  Answer 0 if not found (do NOT\n *  fail the primitive!).\n */\nvoid *ioFindExternalFunctionIn(const char *lookupName, void *moduleHandle)\n{\n  char buf[256];\n  void *fn;\n\n#ifdef HAVE_SNPRINTF\n  snprintf(buf, sizeof(buf), \"%s\", lookupName);\n#else\n  sprintf(buf, \"%s\", lookupName);\n#endif\n\n  if (!*lookupName) /* avoid errors in dlsym from eitherPlugin: code. */\n    return 0;\n\n  fn= dlsym(moduleHandle, buf);\n\n  DPRINTF((stderr, \"ioFindExternalFunctionIn(%s, %d)\\n\",\n\t   lookupName, moduleHandle));\n\n  if ((fn == 0) && (!sqIgnorePluginErrors)\n      && strcmp(lookupName, \"initialiseModule\")\n      && strcmp(lookupName, \"shutdownModule\")\n      && strcmp(lookupName, \"moduleUnloaded\")\n      && strcmp(lookupName, \"setInterpreter\")\n      && strcmp(lookupName, \"getModuleName\"))\n    fprintf(stderr, \"ioFindExternalFunctionIn(%s, %p):\\n  %s\\n\",\n\t    lookupName, moduleHandle, dlerror());\n\n  if (fn == 0) // xxx_dmu\n    fprintf(stderr, \"ioFindExternalFunctionIn(%s, %p):\\n  %s\\n\", lookupName, moduleHandle, dlerror());\n\n\n  return fn;\n}\n\n\n\n/*  Free the module with the associated handle.  Answer 0 on error (do\n *  NOT fail the primitive!).\n*/\nsqInt ioFreeModule(void *moduleHandle)\n{\n  if (dlclose(moduleHandle))\n    {\n      DPRINTF((stderr, \"ioFreeModule(%d): %s\\n\", moduleHandle, dlerror()));\n      return 0;\n    }\n  return 1;\n}\n\n\n#else /* !HAVE_LIBDL */\n\n\n\nvoid *ioLoadModule(const char *pluginName)\n{\n  return 0;\n}\n\nvoid *ioFindExternalFunctionIn(const char *lookupName, void *moduleHandle)\n{\n  return 0;\n}\n\nsqInt ioFreeModule(void *moduleHandle)\n{\n  return 0;\n}\n\n\n\n#endif /* !HAVE_LIBDL */\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/sqUnixGL.h",
    "content": "extern void *ioGLcreateView(int x, int y, int w, int h, int flags);\nextern void *ioGLcreateContext(void *drawable);\nextern int   ioGLsetCurrentContext(void *ctx);\nextern int   ioGLdestroyContext(void *ctx);\nextern int   ioGLdestroyView(void *drawable);\nextern int   ioGLflushBuffer(void *drawable, void *ctx);\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/sqUnixGlobals.h",
    "content": "#ifndef __sqUnixGlobals_h\n#define __sqUnixGlobals_h\n\n#include \"sqMemoryAccess.h\"\n\nextern sqInt forceInterruptCheck(void);\n#if STACKVM\nextern sqInt forceInterruptCheckFromHeartbeat(void);\n#endif\n\n#if 1 /* use global structure */\n\n  extern sqInt getFullScreenFlag(void);\n  extern void  setFullScreenFlag(sqInt i);\n  extern sqInt getInterruptKeycode(void);\n  extern void  setInterruptKeycode(sqInt i);\n  extern sqInt getInterruptPending(void);\n  extern void  setInterruptPending(sqInt i);\n  extern sqInt getSavedWindowSize(void);\n  extern void  setSavedWindowSize(sqInt i);\n\n#else /* ! global structure */\n\n  extern sqInt fullScreenFlag;\n  extern sqInt interruptCheckCounter;\n  extern sqInt interruptKeycode;\n  extern sqInt interruptPending;\n  extern sqInt savedWindowSize;\n\n# define getFullScreenFlag()\t\t(fullScreenFlag)\n# define setFullScreenFlag(I)\t\t(fullScreenFlag= (I))\n# define getInterruptKeycode()\t\t(interruptKeycode)\n# define setInterruptKeycode(I)\t\t(interruptKeycode= (I))\n# define getInterruptPending()\t\t(interruptPending)\n# define setInterruptPending(I)\t\t(interruptPending= (I))\n# define getSavedWindowSize()\t\t(savedWindowSize)\n# define setSavedWindowSize(I)\t\t(savedWindowSize= (I))\n\n#endif /* !global structure */\n\n#endif /* __sqUnixGlobals_h */\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/sqUnixHeartbeat.c",
    "content": "/****************************************************************************\n*   PROJECT: Unix (pthread or setitimer) heartbeat logic for Stack VM\n*   FILE:    sqUnixHeartbeat.c\n*   CONTENT: \n*\n*   AUTHOR:  Eliot Miranda\n*   ADDRESS: \n*   EMAIL:   eliot@qwaq.com\n*   RCSID:   $Id$\n*\n*   NOTES: \n*  July 31st, 2008, EEM added heart-beat thread.\n*  Aug  20th, 2009, EEM added 64-bit microsecond clock support code\n*\n*****************************************************************************/\n\n#include \"sq.h\"\n#include \"sqAssert.h\"\n#include \"sqMemoryFence.h\"\n#include <errno.h>\n#if ITIMER_HEARTBEAT\n# include <signal.h>\n#else\n# include <pthread.h>\n#endif\n#include <sys/types.h>\n#include <sys/time.h>\n\n#define SecondsFrom1901To1970      2177452800ULL\n#define MicrosecondsFrom1901To1970 2177452800000000ULL\n\n#define MicrosecondsPerSecond 1000000ULL\n#define MillisecondsPerSecond 1000ULL\n\n#define MicrosecondsPerMillisecond 1000ULL\n\nstatic unsigned volatile long long utcMicrosecondClock;\nstatic unsigned volatile long long localMicrosecondClock;\nstatic unsigned volatile long millisecondClock; /* for the ioMSecs clock. */\nstatic unsigned long long utcStartMicroseconds; /* for the ioMSecs clock. */\nstatic long long vmGMTOffset = 0;\nstatic unsigned long long frequencyMeasureStart = 0;\nstatic unsigned long heartbeats;\n\n#define microToMilliseconds(usecs) ((((usecs) - utcStartMicroseconds) \\\n\t\t\t\t\t\t\t\t\t/ MicrosecondsPerMillisecond) \\\n\t\t\t\t\t\t\t\t\t& MillisecondClockMask)\n\n#define LOG_CLOCK 1\n\n#if LOG_CLOCK\n# define LOGSIZE 1024\nstatic unsigned long long useclog[LOGSIZE];\nstatic unsigned long mseclog[LOGSIZE];\nstatic int logClock = 0;\nstatic unsigned int ulogidx = (unsigned int)-1;\nstatic unsigned int mlogidx = (unsigned int)-1;\n# define logusecs(usecs) do { sqLowLevelMFence(); \\\n\t\t\t\t\t\t\tif (logClock) useclog[++ulogidx % LOGSIZE] = (usecs); \\\n\t\t\t\t\t\t} while (0)\n# define logmsecs(msecs) do { sqLowLevelMFence(); \\\n\t\t\t\t\t\t\tif (logClock) mseclog[++mlogidx % LOGSIZE] = (msecs); \\\n\t\t\t\t\t\t} while (0)\nvoid\nioGetClockLogSizeUsecsIdxMsecsIdx(sqInt *runInNOutp, void **usecsp, sqInt *uip, void **msecsp, sqInt *mip)\n{\n\tlogClock = *runInNOutp;\n\tsqLowLevelMFence();\n\t*runInNOutp = LOGSIZE;\n\t*usecsp = useclog;\n\t*uip = ulogidx % LOGSIZE;\n\t*msecsp = mseclog;\n\t*mip = mlogidx % LOGSIZE;\n}\n#else /* LOG_CLOCK */\n# define logusecs(usecs) 0\n# define logmsecs(msecs) 0\nvoid\nioGetClockLogSizeUsecsIdxMsecsIdx(sqInt *np, void **usecsp, sqInt *uip, void **msecsp, sqInt *mip)\n{\n\t*np = *uip = *mip = 0;\n\t*usecsp = *msecsp = 0;\n}\n#endif /* LOG_CLOCK */\n\n/* Compute the current VM time basis, the number of microseconds from 1901. */\n\nstatic unsigned long long\ncurrentUTCMicroseconds()\n{\n\tstruct timeval utcNow;\n\n\tgettimeofday(&utcNow,0);\n\treturn ((utcNow.tv_sec * MicrosecondsPerSecond) + utcNow.tv_usec)\n\t\t\t+ MicrosecondsFrom1901To1970;\n}\n\n/*\n * Update the utc and local microsecond clocks, and the millisecond clock.\n * Since this is invoked from interupt code, and since the clocks are 64-bit values\n * that are read concurrently by the VM, care must be taken to access these values\n * atomically on 32-bit systems.  If they are not accessed atomically there is a\n * possibility of fetching the two halves of the clock from different ticks which\n * would cause a jump in the clock of 2^32 microseconds (1 hr, 11 mins, 34 secs).\n *\n * Since an interrupt could occur between any two instructions the clock must be\n * read atomically as well as written atomically.  If possible this can be\n * implemented without locks using atomic 64-bit reads and writes.\n */\n\n#include \"sqAtomicOps.h\"\n\nstatic void\nupdateMicrosecondClock()\n{\n\tunsigned long long newUtcMicrosecondClock;\n\tunsigned long long newLocalMicrosecondClock;\n\n\tnewUtcMicrosecondClock = currentUTCMicroseconds();\n\n\t/* The native clock may go backwards, e.g. due to NTP adjustments, although\n\t * why it can't avoid small backward steps itself, I don't know.  Simply\n\t * ignore backward steps and wait until the clock catches up again.  Of\n\t * course this will cause problems if the clock is manually adjusted.  To\n\t * which the doctor says, \"don't do that\".\n\t */\n\tif (!asserta(newUtcMicrosecondClock >= utcMicrosecondClock)) {\n\t\tlogusecs(0); /* if logging log a backward step as 0 */\n\t\treturn;\n\t}\n\tnewLocalMicrosecondClock = newUtcMicrosecondClock + vmGMTOffset;\n\n\tset64(utcMicrosecondClock,newUtcMicrosecondClock);\n\tset64(localMicrosecondClock,newLocalMicrosecondClock);\n\tmillisecondClock = microToMilliseconds(newUtcMicrosecondClock);\n\n\tlogusecs(newUtcMicrosecondClock);\n\tlogmsecs(millisecondClock);\n}\n\nvoid\nioUpdateVMTimezone()\n{\n\ttime_t utctt;\n\tupdateMicrosecondClock();\n\tutctt = (get64(utcMicrosecondClock) - MicrosecondsFrom1901To1970)\n\t\t\t\t/ MicrosecondsPerSecond;\n\tvmGMTOffset = localtime(&utctt)->tm_gmtoff * MicrosecondsPerSecond;\n}\n\nsqLong\nioHighResClock(void)\n{\n  /* return the value of the high performance counter */\n  sqLong value = 0;\n#if defined(__GNUC__) && ( defined(i386) || defined(__i386) || defined(__i386__)  \\\n\t\t\t|| defined(i486) || defined(__i486) || defined (__i486__) \\\n\t\t\t|| defined(intel) || defined(x86) || defined(i86pc) )\n    __asm__ __volatile__ (\"rdtsc\" : \"=A\"(value));\n#else\n# error \"no high res clock defined\"\n#endif\n  return value;\n}\n\n#if !macintoshSqueak\nstatic unsigned int   lowResMSecs= 0;\nstatic struct timeval startUpTime;\n\n/*\n * Answer the millisecond clock as computed on Unix prior to the 64-bit\n * microsecond clock.  This is to help verify that the new clock is correct.\n */\nsqInt\nioOldMSecs(void)\n{\n  struct timeval now;\n  unsigned int nowMSecs;\n\n#if 1 /* HAVE_HIGHRES_COUNTER */\n\n  /* if we have a cheap, high-res counter use that to limit\n     the frequency of calls to gettimeofday to something reasonable. */\n  static unsigned int baseMSecs = 0;      /* msecs when we took base tick */\n  static sqLong baseTicks = 0;/* base tick for adjustment */\n  static sqLong tickDelta = 0;/* ticks / msec */\n  static sqLong nextTick = 0; /* next tick to check gettimeofday */\n\n  sqLong thisTick = ioHighResClock();\n\n  if(thisTick < nextTick) return lowResMSecs;\n\n#endif\n\n  gettimeofday(&now, 0);\n  if ((now.tv_usec-= startUpTime.tv_usec) < 0)\n    {\n      now.tv_usec+= 1000000;\n      now.tv_sec-= 1;\n    }\n  now.tv_sec-= startUpTime.tv_sec;\n  nowMSecs = (now.tv_usec / 1000 + now.tv_sec * 1000);\n\n#if 1 /* HAVE_HIGHRES_COUNTER */\n  {\n    unsigned int msecsDelta;\n    /* Adjust our rdtsc rate every 10...100 msecs as needed.\n       This also covers msecs clock-wraparound. */\n    msecsDelta = nowMSecs - baseMSecs;\n    if(msecsDelta < 0 || msecsDelta > 100) {\n      /* Either we've hit a clock-wraparound or we are being\n\t sampled in intervals larger than 100msecs.\n\t Don't try any fancy adjustments */\n      baseMSecs = nowMSecs;\n      baseTicks = thisTick;\n      nextTick = 0;\n      tickDelta = 0;\n    } else if(msecsDelta >= 10) {\n      /* limit the rate of adjustments to 10msecs */\n      baseMSecs = nowMSecs;\n      tickDelta = (thisTick - baseTicks) / msecsDelta;\n      nextTick = baseTicks = thisTick;\n    }\n    nextTick += tickDelta;\n  }\n#endif\n  return lowResMSecs= nowMSecs;\n}\n#endif /* !macintoshSqueak */\n\nusqLong\nioUTCMicroseconds() { return get64(utcMicrosecondClock); }\n\nusqLong\nioLocalMicroseconds() { return get64(localMicrosecondClock); }\n\n/* This is an expensive interface for use by profiling code that wants the time\n * now rather than as of the last heartbeat.\n */\nusqLong\nioUTCMicrosecondsNow() { return currentUTCMicroseconds(); }\n\nint\nioMSecs() { return millisecondClock; }\n\n/* Note: ioMicroMSecs returns *milli*seconds */\nint ioMicroMSecs(void) { return microToMilliseconds(currentUTCMicroseconds()); }\n\n/* returns the local wall clock time */\nint\nioSeconds(void) { return get64(localMicrosecondClock) / MicrosecondsPerSecond; }\n\nint\nioUTCSeconds(void) { return get64(utcMicrosecondClock) / MicrosecondsPerSecond; }\n\n/*\n * On Mac OS X use the following.\n * On Unix use dpy->ioRelinquishProcessorForMicroseconds\n */\n#if macintoshSqueak\nint\nioRelinquishProcessorForMicroseconds(int microSeconds)\n{\n    long\trealTimeToWait;\n\textern usqLong getNextWakeupUsecs();\n\tusqLong nextWakeupUsecs = getNextWakeupUsecs();\n\tusqLong utcNow = get64(utcMicrosecondClock);\n\n    if (nextWakeupUsecs <= utcNow) {\n\t\t/* if nextWakeupUsecs is non-zero the next wakeup time has already\n\t\t * passed and we should not wait.\n\t\t */\n        if (nextWakeupUsecs != 0)\n\t\t\treturn 0;\n\t\trealTimeToWait = microSeconds;\n    }\n    else {\n        realTimeToWait = nextWakeupUsecs - utcNow;\n\t\tif (realTimeToWait > microSeconds)\n\t\t\trealTimeToWait = microSeconds;\n\t}\n\n\taioSleepForUsecs(realTimeToWait);\n\n\treturn 0;\n}\n#endif /* !macintoshSqueak */\n\nvoid\nioInitTime(void)\n{\n\tioUpdateVMTimezone(); /* does updateMicrosecondClock as a side-effect */\n\tupdateMicrosecondClock(); /* this can now compute localUTCMicroseconds */\n\tutcStartMicroseconds = utcMicrosecondClock;\n#if !macintoshSqueak\n\t/* This is only needed for ioOldMSecs */\n\tgettimeofday(&startUpTime, 0);\n#endif\n}\n\nstatic void\nheartbeat()\n{\n\tint saved_errno = errno;\n\n\tupdateMicrosecondClock();\n\tif (get64(frequencyMeasureStart) == 0) {\n\t\tset64(frequencyMeasureStart,utcMicrosecondClock);\n\t\theartbeats = 0;\n\t}\n\telse\n\t\theartbeats += 1;\n#if ITIMER_HEARTBEAT\n\t/* While we use SA_RESTART to ensure system calls are restarted, this is\n\t * not universally effective.  In particular, connect calls can abort if\n\t * a system call is made in the signal handler, i.e. the pthread_kill in\n\t * prodHighPriorityThread.  So we avoid this if possible by not prodding\n\t * the high-priority thread unless there are high-priority tickees as\n\t * indicated by numAsyncTickees > 0.\n\t */\n\tif (numAsyncTickees > 0) {\n\t\tvoid prodHighPriorityThread(void);\n\t\tprodHighPriorityThread();\n\t}\n#else\n\tcheckHighPriorityTickees(utcMicrosecondClock);\n#endif\n\tforceInterruptCheckFromHeartbeat();\n\n\terrno = saved_errno;\n}\n\n#if ITIMER_HEARTBEAT\n\t/* Hack for linux server to avoid the thread priority issue, i.e. that\n\t * linux doesn't provide priorities for SCHED_OTHER and won't let a non-\n\t * superuser process set the scheduling policy to anything else).\n\t *\n\t * Solution is to drive heartbeat from an interval timer instead of a high-\n\t * priority thread blocking in a sleep.  We use ITIMER_REAL/SIGALRM (see\n\t * below).  setitimer(2) claims max itimer resolution on 2.6.13 is 4\n\t * milliseconds, but on 2.6.18-128.el5 one can see periods of 1.2ms.\n\t *\n\t * The high-priority tickees cannot be run from the interrupt-driven heart-\n\t * beat and must be run from a separate thread to avoid numerous sources\n\t * of deadlock (e.g. the lock in malloc).  But since the thread has the\n\t * same priority as the VM thread we arrange that the VM yields to the\n\t * high-priority ticker when it is running.  This is co-ordinated in\n\t * sqTicker.c by ioSynchronousCheckForEvents (the synchronous ticker)\n\t * yielding if requested by checkHighPriorityTickees.  To perform the yield,\n\t * these functions use yieldToHighPriorityTickerThread and\n\t * unblockVMThreadAfterYieldToHighPriorityTickerThread to do the dirty work.\n\t *\n\t * The itimer signal handler ensures it is running on the VM thread and\n\t * then invokes a signal handler on the high-priority thread (see\n\t * prodHighPriorityThread).  This signal breaks the high-priority thread\n\t * out of its nanosleep and it calls checkHighPriorityTickees.\n\t */\n#define TICKER_SIGNAL SIGUSR2 /* SIGURSR1 dumps the stack */\nstatic pthread_t tickerThread;\n\nvoid\nprodHighPriorityThread()\n{\n\t/* invoke the tickerThread's signal handler */\n\tpthread_kill(tickerThread, TICKER_SIGNAL);\n}\n\nstatic void\nhigh_performance_tick_handler(int sig, struct siginfo *sig_info, void *context)\n{\nstatic int tickCheckInProgress;\n\n\tif (tickCheckInProgress) return;\n\n\ttickCheckInProgress = 1;\n\tcheckHighPriorityTickees(ioUTCMicroseconds());\n\ttickCheckInProgress = 0;\n}\n\nstatic void *\ntickerSleepCycle(void *ignored)\n{\n\tstruct timespec naptime;\n\n\tnaptime.tv_sec = 3600;\n\tnaptime.tv_nsec = 0;\n\n\twhile (1)\n\t\t(void)nanosleep(&naptime, 0);\n\treturn 0;\n}\n\n/* We require the error check because we're lazy in preventing multiple\n * attempts at locking yield_mutex in yieldToHighPriorityTickerThread.\n */\n#if defined(PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP)\n# define THE_MUTEX_INITIALIZER PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP\n#elif defined(PTHREAD_ERRORCHECK_MUTEX_INITIALIZER)\n# define THE_MUTEX_INITIALIZER PTHREAD_ERRORCHECK_MUTEX_INITIALIZER\n#else\n# define THE_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER\n#endif\nstatic pthread_mutex_t yield_sync = THE_MUTEX_INITIALIZER;\nstatic pthread_mutex_t yield_mutex = THE_MUTEX_INITIALIZER;\nstatic pthread_cond_t yield_cond = PTHREAD_COND_INITIALIZER;\n\n/* Private to sqTicker.c ioSynchronousCheckForEvents */\nvoid\nyieldToHighPriorityTickerThread()\n{\n\tint err;\n\n\tif ((err = pthread_mutex_lock(&yield_mutex))) {\n\t\tif (err != EDEADLK)\n\t\t\tfprintf(stderr,\"pthread_mutex_lock yield_mutex %s\\n\", strerror(err));\n\t}\n\t/* If lock fails then unblockVMThreadAfterYieldToHighPriorityTickerThread\n\t * has locked and we should not block.\n\t */\n\tif ((err = pthread_mutex_lock(&yield_sync))) {\n\t\tif (err != EDEADLK)\n\t\t\tfprintf(stderr,\"pthread_mutex_lock yield_sync %s\\n\", strerror(err));\n\t}\n\telse if ((err = pthread_cond_wait(&yield_cond, &yield_mutex)))\n\t\tfprintf(stderr,\"pthread_cond_wait %s\\n\", strerror(err));\n}\n\n/* Private to sqTicker.c checkHighPriorityTickees */\nvoid\nunblockVMThreadAfterYieldToHighPriorityTickerThread()\n{\n\t/* If yield_sync is already locked the VM thread is very likely blocking in\n\t * yieldToHighPriorityTickerThread and so yield_cond should be signalled.\n\t */\n\tif (pthread_mutex_trylock(&yield_sync) == 0) /* success */\n\t\tpthread_mutex_unlock(&yield_sync);\n\telse\n\t\tpthread_cond_signal(&yield_cond);\n}\n\n\n#if !defined(DEFAULT_BEAT_MS)\n# define DEFAULT_BEAT_MS 2\n#endif\nstatic int beatMilliseconds = DEFAULT_BEAT_MS;\n\n/* Use ITIMER_REAL/SIGALRM because the VM can enter a sleep in the OS via\n * e.g. ioRelinquishProcessorForMicroseconds in which the OS will assume the\n * process is not running and not deliver the signals.\n */\n#if 0\n# define THE_ITIMER ITIMER_PROF\n# define ITIMER_SIGNAL SIGPROF\n#elif 0\n# define THE_ITIMER ITIMER_VIRTUAL\n# define ITIMER_SIGNAL SIGVTALRM\n#else\n# define THE_ITIMER ITIMER_REAL\n# define ITIMER_SIGNAL SIGALRM\n#endif\n\n/* With ticker support it may be that a ticker function invoked heartbeat takes\n * so long that another timer interrupt occurs before heartbeat has finished.\n * The absence of SA_NODEFER in heartbeat_handler_action.sa_flags prevents\n * reentrancy, if available.\n *\n * With lots of threads it may be that the kernel delivers the signal on some\n * other thread.\n */\n#if !defined(SA_NODEFER)\nstatic int handling_heartbeat = 0;\n#endif\n\nstatic void\nheartbeat_handler(int sig, struct siginfo *sig_info, void *context)\n{\n\tif (!ioOSThreadsEqual(ioCurrentOSThread(),getVMOSThread())) {\n\t\tpthread_kill(getVMOSThread(),sig);\n\t\treturn;\n\t}\n\n#if !defined(SA_NODEFER)\n  {\tint zeroAndPreviousHandlingHeartbeat = 0;\n    sqCompareAndSwap(handling_heartbeat,zeroAndPreviousHandlingHeartbeat,1);\n\tif (zeroAndPreviousHandlingHeartbeat)\n\t\treturn;\n  }\n\n\thandling_heartbeat = 1;\n#endif\n\n\theartbeat();\n\n#if 0\n\tif (heartbeats % 250 == 0) {\n\t\tprintf(\".\");\n\t\tfflush(stdout);\n\t}\n#endif\n#if !defined(SA_NODEFER)\n\thandling_heartbeat = 0;\n#endif\n}\n\n#define NEED_SIGALTSTACK 1 /* for safety; some time need to turn off and test */\n#if NEED_SIGALTSTACK\n/* If the ticker is run from the heartbeat signal handler one needs to use an\n * alternative stack to avoid overflowing the VM's stack pages.  Keep\n * the structure around for reference during debugging.\n */\n#define SIGNAL_STACK_SIZE (1024 * sizeof(void *) * 16)\nstatic stack_t signal_stack;\n#endif /* NEED_SIGALTSTACK */\n\nvoid\nioInitHeartbeat()\n{\nextern sqInt suppressHeartbeatFlag;\n\tint er;\n\tstruct timespec halfAMo;\n\tstruct sigaction heartbeat_handler_action, ticker_handler_action;\n\tstruct itimerval pulse;\n\n\tif (suppressHeartbeatFlag) return;\n\n#if NEED_SIGALTSTACK\n\tsignal_stack.ss_flags = 0;\n\tsignal_stack.ss_size = SIGNAL_STACK_SIZE;\n\tif (!(signal_stack.ss_sp = malloc(signal_stack.ss_size))) {\n\t\tperror(\"ioInitHeartbeat malloc\");\n\t\texit(1);\n\t}\n\tif (sigaltstack(&signal_stack, 0) < 0) {\n\t\tperror(\"ioInitHeartbeat sigaltstack\");\n\t\texit(1);\n\t}\n#endif /* NEED_SIGALTSTACK */\n\n\thalfAMo.tv_sec  = 0;\n\thalfAMo.tv_nsec = 1000 * 100;\n\tif ((er= pthread_create(&tickerThread,\n\t\t\t\t\t\t\t(const pthread_attr_t *)0,\n\t\t\t\t\t\t\ttickerSleepCycle,\n\t\t\t\t\t\t\t0))) {\n\t\terrno = er;\n\t\tperror(\"beat thread creation failed\");\n\t\texit(errno);\n\t}\n\n\tticker_handler_action.sa_sigaction = high_performance_tick_handler;\n\t/* N.B. We _do not_ include SA_NODEFER to specifically prevent reentrancy\n\t * during the heartbeat. We /must/ include SA_RESTART to avoid issues with\n     * e.g. ODBC connections.\n\t */\n\tticker_handler_action.sa_flags = SA_RESTART | SA_ONSTACK;\n\tsigemptyset(&ticker_handler_action.sa_mask);\n\tif (sigaction(TICKER_SIGNAL, &ticker_handler_action, 0)) {\n\t\tperror(\"ioInitHeartbeat sigaction\");\n\t\texit(1);\n\t}\n\n\theartbeat_handler_action.sa_sigaction = heartbeat_handler;\n\t/* N.B. We _do not_ include SA_NODEFER to specifically prevent reentrancy\n\t * during the heartbeat.  We *must* include SA_RESTART to avoid breaking\n\t * lots of external code (e.g. the mysql odbc connect).\n\t */\n\theartbeat_handler_action.sa_flags = SA_RESTART | SA_ONSTACK;\n\tsigemptyset(&heartbeat_handler_action.sa_mask);\n\tif (sigaction(ITIMER_SIGNAL, &heartbeat_handler_action, 0)) {\n\t\tperror(\"ioInitHeartbeat sigaction\");\n\t\texit(1);\n\t}\n\n\tpulse.it_interval.tv_sec = beatMilliseconds / 1000;\n\tpulse.it_interval.tv_usec = (beatMilliseconds % 1000) * 1000;\n\tpulse.it_value = pulse.it_interval;\n\tif (setitimer(THE_ITIMER, &pulse, &pulse)) {\n\t\tperror(\"ioInitHeartbeat setitimer\");\n\t\texit(1);\n\t}\n}\n\nvoid\nioSetHeartbeatMilliseconds(int ms)\n{\n\tbeatMilliseconds = ms;\n\tioInitHeartbeat();\n}\n#else /* ITIMER_HEARTBEAT */\ntypedef enum { dead, condemned, nascent, quiescent, active } machine_state;\n\nstatic int\t\t\t\t\tstateMachinePolicy;\nstatic struct sched_param\tstateMachinePriority;\n\nstatic machine_state beatState = nascent;\n\n#if !defined(DEFAULT_BEAT_MS)\n# define DEFAULT_BEAT_MS 2\n#endif\nstatic int beatMilliseconds = DEFAULT_BEAT_MS;\nstatic struct timespec beatperiod = { 0, DEFAULT_BEAT_MS * 1000 * 1000 };\n\nstatic void *\nbeatStateMachine(void *careLess)\n{\n\tint er;\n\tif ((er = pthread_setschedparam(pthread_self(),\n\t\t\t\t\t\t\t\t\tstateMachinePolicy,\n\t\t\t\t\t\t\t\t\t&stateMachinePriority))) {\n\t\t/* linux pthreads as of 2009 does not support setting the priority of\n\t\t * threads other than with real-time scheduling policies.  But such\n\t\t * policies are only available to processes with superuser privileges.\n\t\t */\n\t\terrno = er;\n\t\tperror(\"pthread_setschedparam failed; consider using ITIMER_HEARTBEAT\");\n\t\texit(errno);\n\t}\n\tbeatState = active;\n\twhile (beatState != condemned) {\n# define MINSLEEPNS 2000 /* don't bother sleeping for short times */\n\t\tstruct timespec naptime = beatperiod;\n\n\t\twhile (nanosleep(&naptime, &naptime) == -1\n\t\t\t&& naptime.tv_sec >= 0 /* oversleeps can return tv_sec < 0 */\n\t\t\t&& (naptime.tv_sec > 0 || naptime.tv_nsec > MINSLEEPNS)) /*repeat*/\n\t\t\tif (errno != EINTR) {\n\t\t\t\tperror(\"nanosleep\");\n\t\t\t\texit(1);\n\t\t\t}\n\t\theartbeat();\n\t}\n\tbeatState = dead;\n\treturn 0;\n}\n\nvoid\nioInitHeartbeat()\n{\n\tint er;\n\tstruct timespec halfAMo;\n\tpthread_t careLess;\n\n\tif ((er = pthread_getschedparam(pthread_self(),\n\t\t\t\t\t\t\t\t\t&stateMachinePolicy,\n\t\t\t\t\t\t\t\t\t&stateMachinePriority))) {\n\t\terrno = er;\n\t\tperror(\"pthread_getschedparam failed\");\n\t\texit(errno);\n\t}\n\t++stateMachinePriority.sched_priority;\n\thalfAMo.tv_sec  = 0;\n\thalfAMo.tv_nsec = 1000 * 100;\n\tif ((er= pthread_create(&careLess,\n\t\t\t\t\t\t\t(const pthread_attr_t *)0,\n\t\t\t\t\t\t\tbeatStateMachine,\n\t\t\t\t\t\t\t0))) {\n\t\terrno = er;\n\t\tperror(\"beat thread creation failed\");\n\t\texit(errno);\n\t}\n\twhile (beatState == nascent)\n\t\tnanosleep(&halfAMo, 0);\n}\n\nvoid\nioSetHeartbeatMilliseconds(int ms)\n{\n\tbeatMilliseconds = ms;\n\tbeatperiod.tv_sec = beatMilliseconds / 1000;\n\tbeatperiod.tv_nsec = (beatMilliseconds % 1000) * 1000 * 1000;\n}\n#endif /* ITIMER_HEARTBEAT */\n\nint\nioHeartbeatMilliseconds() { return beatMilliseconds; }\n\n\n/* Answer the average heartbeats per second since the stats were last reset.\n */\nunsigned long\nioHeartbeatFrequency(int resetStats)\n{\n\tunsigned duration = (ioUTCMicroseconds() - get64(frequencyMeasureStart))\n\t\t\t\t\t\t/ MicrosecondsPerSecond;\n\tunsigned frequency = duration ? heartbeats / duration : 0;\n\n\tif (resetStats) {\n\t\tunsigned long long zero = 0;\n\t\tset64(frequencyMeasureStart,zero);\n\t}\n\treturn frequency;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/sqUnixMain.c",
    "content": "/* sqUnixMain.c -- support for Unix.\n * \n *   Copyright (C) 1996-2007 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n */\n\n/* Author: Ian Piumarta <ian.piumarta@squeakland.org>\n * Merged with\n *\thttp://squeakvm.org/svn/squeak/trunk/platforms/unix/vm/sqUnixMain.c\n *\tRevision: 2148\n *\tLast Changed Rev: 2132\n * by eliot Wed Jan 20 10:57:26 PST 2010\n */\n\n#include \"sq.h\"\n#include \"sqMemoryAccess.h\"\n#include \"sqaio.h\"\n#include \"sqUnixCharConv.h\"\n#include \"debug.h\"\n\n# ifdef ROAR_VM\n  # if __tile__\n    # include <arch/cycle.h>\n  # endif\n# endif // ROAR_VM\n\n#ifdef ioMSecs\n# undef ioMSecs\n#endif\n\n#include <ctype.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n#include <sys/time.h>\n#include <sys/types.h>\n#include <sys/param.h>\n#include <sys/utsname.h>\n#include <sys/stat.h>\n#include <unistd.h>\n#include <errno.h>\n#include <signal.h>\n#include <fcntl.h>\n#if !defined(NOEXECINFO)\n# include <execinfo.h>\n# define BACKTRACE_DEPTH 64\n#endif\n#if __FreeBSD__ || __linux__\n# include <sys/ucontext.h>\n#endif\n\n#if defined(__alpha__) && defined(__osf__)\n# include <sys/sysinfo.h>\n# include <sys/proc.h>\n#endif\n\n#undef\tDEBUG_MODULES\n\n#undef\tIMAGE_DUMP\t\t\t\t/* define to enable SIGHUP and SIGQUIT handling */\n\n#define IMAGE_NAME_SIZE MAXPATHLEN\n\n#define DefaultHeapSize\t\t  20\t     \t/* megabytes BEYOND actual image size */\n#define DefaultMmapSize\t\t1024     \t/* megabytes of virtual memory */\n\n       char  *documentName= 0;\t\t\t/* name if launced from document */\n       char   shortImageName[MAXPATHLEN+1];\t/* image name */\n       char   imageName[MAXPATHLEN+1];\t\t/* full path to image */\nstatic char   vmName[MAXPATHLEN+1];\t\t/* full path to vm */\n       char   vmPath[MAXPATHLEN+1];\t\t/* full path to image directory */\n\n       int    argCnt=\t\t0;\t/* global copies for access from plugins */\n       char **argVec=\t\t0;\n       char **envVec=\t\t0;\n\nstatic int    vmArgCnt=\t\t0;\t/* for getAttributeIntoLength() */\nstatic char **vmArgVec=\t\t0;\nstatic int    squeakArgCnt=\t0;\nstatic char **squeakArgVec=\t0;\n\nstatic int    extraMemory=\t0;\n       int    useMmap=\t\tDefaultMmapSize * 1024 * 1024;\n\nstatic int    useItimer=\t1;\t/* 0 to disable itimer-based clock */\nstatic int    installHandlers=\t1;\t/* 0 to disable sigusr1 & sigsegv handlers */\n       int    noEvents=\t\t0;\t/* 1 to disable new event handling */\n       int    noSoundMixer=\t0;\t/* 1 to disable writing sound mixer levels */\n       char  *squeakPlugins=\t0;\t/* plugin path */\n       int    runAsSingleInstance=0;\n#if !STACKVM && !COGVM\n       int    useJit=\t\t0;\t/* use default */\n       int    jitProcs=\t\t0;\t/* use default */\n       int    jitMaxPIC=\t0;\t/* use default */\n#else\n# define useJit 0\n#endif\n\n# ifndef ROAR_VM\n       int    withSpy=\t\t0;\n# endif // ROAR_VM\n\n       int    uxDropFileCount=\t0;\t/* number of dropped items\t*/\n       char **uxDropFileNames=\t0;\t/* dropped filenames\t\t*/\n\n       int    textEncodingUTF8= 0;\t/* 1 if copy from external selection uses UTF8 */\n\n#if defined(IMAGE_DUMP)\nstatic int    dumpImageFile=\t0;\t/* 1 after SIGHUP received */\n#endif\n\n#if defined(DARWIN) && !defined(ROAR_VM)\nint inModalLoop= 0;\n#endif\n\nint sqIgnorePluginErrors\t= 0;\nint runInterpreter\t\t= 1;\n\n#include \"SqDisplay.h\"\n#include \"SqSound.h\"\n\nstruct SqDisplay *dpy= 0;\nstruct SqSound   *snd= 0;\n\nextern void dumpPrimTraceLog(void);\n\n\n/*\n * In the Cog VMs time management is in platforms/unix/vm/sqUnixHeartbeat.c.\n */\n#if !STACKVM\n/*** timer support ***/\n\n#define\tLOW_RES_TICK_MSECS\t20\t/* 1/50 second resolution */\n\nstatic unsigned int   lowResMSecs= 0;\nstatic struct timeval startUpTime;\n\nstatic void sigalrm(int signum)\n{\n  lowResMSecs+= LOW_RES_TICK_MSECS;\n  forceInterruptCheck();\n}\n\nstatic void initTimers(void)\n{\n  /* set up the micro/millisecond clock */\n  # ifdef ROAR_VM\n    // cannot use gettimeofday here because time is different on each core -- dmu 3/09\n    fprintf(stderr, \"itimer is %sbeing used\\n\",  useItimer ? \"\" : \"not \"); // xxx_dmu\n  # else\n    gettimeofday(&startUpTime, 0);\n  # endif\n\n  if (useItimer)\n    {\n      /* set up the low-res (50th second) millisecond clock */\n      /* WARNING: all system calls must check for EINTR!!! */\n      {\n\tstruct sigaction sa;\n\tsigset_t ss1, ss2;\n\tsigemptyset(&ss1);\n\tsigprocmask(SIG_BLOCK, &ss1, &ss2);\n\tsa.sa_handler= sigalrm;\n\tsa.sa_mask= ss2;\n#      ifdef SA_RESTART\t/* we're probably on Linux */\n\tsa.sa_flags= SA_RESTART;\n#      else\n\tsa.sa_flags= 0;\t/* assume we already have BSD behaviour */\n#      endif\n#      if defined(__linux__) && !defined(__ia64) && !defined(__alpha__)\n\tsa.sa_restorer= 0;\n#      endif\n\tsigaction(SIGALRM, &sa, 0);\n      }\n      {\n\tstruct itimerval iv;\n\tiv.it_interval.tv_sec= 0;\n\tiv.it_interval.tv_usec= LOW_RES_TICK_MSECS * 1000;\n\tiv.it_value= iv.it_interval;\n\tsetitimer(ITIMER_REAL, &iv, 0);\n      }\n    }\n}\n\nsqInt ioLowResMSecs(void)\n{\n  return (useItimer)\n    ? lowResMSecs\n    : ioMSecs();\n}\n\n# ifdef ROAR_VM\nusqLong\nioUTCMicroseconds()\n{\n  return ioMSecs();\n}\n\n// For the RoarVM we corrently do not use the new timer infrastructure, thus, we use the old code here\nsqInt ioMSecs(void)\n{\n  struct timeval now;\n  gettimeofday(&now, 0);\n  if ((now.tv_usec-= startUpTime.tv_usec) < 0)\n  {\n    now.tv_usec+= 1000000;\n    now.tv_sec-= 1;\n  }\n  now.tv_sec-= startUpTime.tv_sec;\n  return lowResMSecs= (now.tv_usec / 1000 + now.tv_sec * 1000);\n}\n\n# else // ROAR_VM\nsqInt ioMSecs(void)\n{\n  struct timeval now;\n  unsigned int nowMSecs;\n\n#if 1 /* HAVE_HIGHRES_COUNTER */\n\n  /* if we have a cheap, high-res counter use that to limit\n     the frequency of calls to gettimeofday to something reasonable. */\n  static unsigned int baseMSecs = 0;      /* msecs when we took base tick */\n  static sqLong baseTicks = 0;/* base tick for adjustment */\n  static sqLong tickDelta = 0;/* ticks / msec */\n  static sqLong nextTick = 0; /* next tick to check gettimeofday */\n\n  sqLong thisTick = ioHighResClock();\n\n  if(thisTick < nextTick) return lowResMSecs;\n\n#endif\n\n  gettimeofday(&now, 0);\n  if ((now.tv_usec-= startUpTime.tv_usec) < 0)\n    {\n      now.tv_usec+= 1000000;\n      now.tv_sec-= 1;\n    }\n  now.tv_sec-= startUpTime.tv_sec;\n  nowMSecs = (now.tv_usec / 1000 + now.tv_sec * 1000);\n\n#if 1 /* HAVE_HIGHRES_COUNTER */\n  {\n    unsigned int msecsDelta;\n    /* Adjust our rdtsc rate every 10...100 msecs as needed.\n       This also covers msecs clock-wraparound. */\n    msecsDelta = nowMSecs - baseMSecs;\n    if(msecsDelta < 0 || msecsDelta > 100) {\n      /* Either we've hit a clock-wraparound or we are being\n\t sampled in intervals larger than 100msecs.\n\t Don't try any fancy adjustments */\n      baseMSecs = nowMSecs;\n      baseTicks = thisTick;\n      nextTick = 0;\n      tickDelta = 0;\n    } else if(msecsDelta >= 10) {\n      /* limit the rate of adjustments to 10msecs */\n      baseMSecs = nowMSecs;\n      tickDelta = (thisTick - baseTicks) / msecsDelta;\n      nextTick = baseTicks = thisTick;\n    }\n    nextTick += tickDelta;\n  }\n#endif\n  return lowResMSecs= nowMSecs;\n}\n# endif // ROAR_VM\n\n\nsqInt ioMicroMSecs(void)\n{\n  /* return the highest available resolution of the millisecond clock */\n  return ioMSecs();\t/* this already to the nearest millisecond */\n}\n\ntime_t convertToSqueakTime(time_t unixTime);\n\n/* returns the local wall clock time */\nsqInt ioSeconds(void)\n{\n  return convertToSqueakTime(time(0));\n}\n#endif /* STACKVM */\n\ntime_t convertToSqueakTime(time_t unixTime)\n{\n#ifdef HAVE_TM_GMTOFF\n  unixTime+= localtime(&unixTime)->tm_gmtoff;\n#else\n# ifdef HAVE_TIMEZONE\n  unixTime+= ((daylight) * 60*60) - timezone;\n# else\n#  error: cannot determine timezone correction\n# endif\n#endif\n  /* Squeak epoch is Jan 1, 1901.  Unix epoch is Jan 1, 1970: 17 leap years\n     and 52 non-leap years later than Squeak. */\n  return unixTime + ((52*365UL + 17*366UL) * 24*60*60UL);\n}\n\n\n/*** VM & Image File Naming ***/\n\n\n/* copy src filename to target, if src is not an absolute filename,\n * prepend the cwd to make target absolute\n  */\nstatic void pathCopyAbs(char *target, const char *src, size_t targetSize)\n{\n  if (src[0] == '/')\n    strcpy(target, src);\n  else\n    {\n      0 == getcwd(target, targetSize);\n      strcat(target, \"/\");\n      strcat(target, src);\n    }\n}\n\n\nstatic void recordFullPathForVmName(const char *localVmName)\n{\n#if defined(__linux__)\n  char\t name[MAXPATHLEN+1];\n  int    len;\n\n  if ((len= readlink(\"/proc/self/exe\", name, sizeof(name))) > 0)\n    {\n      struct stat st;\n      name[len]= '\\0';\n      if (!stat(name, &st))\n\tlocalVmName= name;\n    }\n#endif\n\n  /* get canonical path to vm */\n  if (realpath(localVmName, vmPath) == 0)\n    pathCopyAbs(vmPath, localVmName, sizeof(vmPath));\n\n  /* truncate vmPath to dirname */\n  {\n    int i= 0;\n    for (i= strlen(vmPath); i >= 0; i--)\n      if ('/' == vmPath[i])\n\t{\n\t  vmPath[i+1]= '\\0';\n\t  break;\n\t}\n  }\n}\n\nstatic void recordFullPathForImageName(const char *localImageName)\n{\n  struct stat s;\n  /* get canonical path to image */\n  if ((stat(localImageName, &s) == -1) || (realpath(localImageName, imageName) == 0))\n    pathCopyAbs(imageName, localImageName, sizeof(imageName));\n}\n\n/* vm access */\n\nsqInt imageNameSize(void)\n{\n  return strlen(imageName);\n}\n\nsqInt imageNameGetLength(sqInt sqImageNameIndex, sqInt length)\n{\n  char *sqImageName= (char*)pointerForIndex_xxx_dmu(sqImageNameIndex);\n  int count, i;\n\n  count= strlen(imageName);\n  count= (length < count) ? length : count;\n\n  /* copy the file name into the Squeak string */\n  for (i= 0; i < count; i++)\n    sqImageName[i]= imageName[i];\n\n  return count;\n}\n\n\nsqInt imageNamePutLength(sqInt sqImageNameIndex, sqInt length)\n{\n  char *sqImageName= (char*)pointerForIndex_xxx_dmu(sqImageNameIndex);\n  int count, i;\n\n  count= (IMAGE_NAME_SIZE < length) ? IMAGE_NAME_SIZE : length;\n\n  /* copy the file name into a null-terminated C string */\n  for (i= 0; i < count; i++)\n    imageName[i]= sqImageName[i];\n  imageName[count]= 0;\n\n  dpy->winSetName(imageName);\n\n  return count;\n}\n\n\nchar *getImageName(void)\n{\n  return imageName;\n}\n\n\n/*** VM Home Directory Path ***/\n\n\nsqInt vmPathSize(void)\n{\n  return strlen(vmPath);\n}\n\nsqInt vmPathGetLength(sqInt sqVMPathIndex, sqInt length)\n{\n  char *stVMPath= (char*)pointerForIndex_xxx_dmu(sqVMPathIndex);\n  int count, i;\n\n  count= strlen(vmPath);\n  count= (length < count) ? length : count;\n\n  /* copy the file name into the Squeak string */\n  for (i= 0; i < count; i++)\n    stVMPath[i]= vmPath[i];\n\n  return count;\n}\n\nchar* ioGetLogDirectory(void) { return \"\"; };\nsqInt ioSetLogDirectoryOfSize(void* lblIndex, sqInt sz){ return 1; }\n\n\n/*** power management ***/\n\n\nsqInt ioDisablePowerManager(sqInt disableIfNonZero)\n{\n  return true;\n}\n\n\n/*** Access to system attributes and command-line arguments ***/\n\n\n/* OS_TYPE may be set in configure.in and passed via the Makefile */\n\n#ifndef OS_TYPE\n# ifdef UNIX\n#   define OS_TYPE \"unix\"\n# else\n#  define OS_TYPE \"unknown\"\n# endif\n#endif\n\nstatic char *getAttribute(sqInt id)\n{\n  if (id < 0)\t/* VM argument */\n    {\n      if (-id  < vmArgCnt)\n\treturn vmArgVec[-id];\n    }\n  else\n    switch (id)\n      {\n      case 0:\n\treturn vmName[0] ? vmName : vmArgVec[0];\n      case 1:\n\treturn imageName;\n      case 1001:\n\t/* OS type: \"unix\", \"win32\", \"mac\", ... */\n\treturn OS_TYPE;\n      case 1002:\n\t/* OS name: \"solaris2.5\" on unix, \"win95\" on win32, ... */\n\treturn VM_HOST_OS;\n      case 1003:\n\t/* processor architecture: \"68k\", \"x86\", \"PowerPC\", ...  */\n\treturn VM_HOST_CPU;\n      case 1004:\n\t/* Interpreter version string */\n\treturn  (char *)interpreterVersion;\n      case 1005:\n\t/* window system name */\n\treturn  dpy->winSystemName();\n      case 1006:\n\t/* vm build string */\n\treturn VM_BUILD_STRING;\n#if STACKVM\n      case 1007: { /* interpreter build info */\n\textern char *__interpBuildInfo;\n\treturn __interpBuildInfo;\n      }\n# if COGVM\n      case 1008: { /* cogit build info */\n\textern char *__cogitBuildInfo;\n\treturn __cogitBuildInfo;\n      }\n# endif\n#endif\n      default:\n\tif ((id - 2) < squeakArgCnt)\n\t  return squeakArgVec[id - 2];\n      }\n  success(false);\n  return \"\";\n}\n\nsqInt attributeSize(sqInt id)\n{\n  return strlen(getAttribute(id));\n}\n\nsqInt getAttributeIntoLength(sqInt id, sqInt byteArrayIndex, sqInt length)\n{\n  if (length > 0)\n    strncpy((char*)pointerForIndex_xxx_dmu(byteArrayIndex), getAttribute(id), length);\n  return 0;\n}\n\n\n/*** event handling ***/\n\n\nsqInt inputEventSemaIndex= 0;\n\n\n/* set asynchronous input event semaphore  */\n\nsqInt ioSetInputSemaphore(sqInt semaIndex)\n{\n  if ((semaIndex == 0) || (noEvents == 1))\n    success(false);\n  else\n    inputEventSemaIndex= semaIndex;\n  return true;\n}\n\n\n/*** display functions ***/\n\nsqInt ioFormPrint(sqInt bitsAddr, sqInt width, sqInt height, sqInt depth, double hScale, double vScale, sqInt landscapeFlag)\n{\n  return dpy->ioFormPrint(bitsAddr, width, height, depth, hScale, vScale, landscapeFlag);\n}\n\n\n#if ROAR_VM\nsqInt ioRelinquishProcessorForMicroseconds(sqInt us)\n{\n  dpy->ioRelinquishProcessorForMicroseconds(0);\n  setInterruptCheckCounter(0);\n  return 0;\n}\n#elif STACKVM\nsqInt ioRelinquishProcessorForMicroseconds(sqInt us)\n{\n  dpy->ioRelinquishProcessorForMicroseconds(us);\n  return 0;\n}\n#else /* !ROARVM && !STACKVM */\nstatic int lastInterruptCheck= 0;\n\nsqInt ioRelinquishProcessorForMicroseconds(sqInt us)\n{\n  int now;\n  dpy->ioRelinquishProcessorForMicroseconds(us);\n  now= ioLowResMSecs();\n  if (now - lastInterruptCheck > (1000/25))\t/* avoid thrashing intr checks from 1ms loop in idle proc  */\n    {\n      forceInterruptCheck();\t/* ensure timely poll for semaphore activity */\n      lastInterruptCheck= now;\n    }\n  return 0;\n}\n#endif /* STACKVM */\n\nsqInt ioBeep(void)\t\t\t\t { return dpy->ioBeep(); }\n\n#if defined(IMAGE_DUMP)\n\nstatic void emergencyDump(int quit)\n{\n  extern sqInt preSnapshot(void);\n  extern sqInt postSnapshot(void);\n  extern void writeImageFile(sqInt);\n  char savedName[MAXPATHLEN];\n  char baseName[MAXPATHLEN];\n  char *term;\n  int  dataSize, i;\n  strncpy(savedName, imageName, MAXPATHLEN);\n  strncpy(baseName, imageName, MAXPATHLEN);\n  if ((term= strrchr(baseName, '.')))\n    *term= '\\0';\n  for (i= 0; ++i;)\n    {\n      struct stat sb;\n      sprintf(imageName, \"%s-emergency-dump-%d.image\", baseName, i);\n      if (stat(imageName, &sb))\n\tbreak;\n    }\n  dataSize= preSnapshot();\n  writeImageFile(dataSize);\n\n  printf(\"\\nMost recent primitives\\n\");\n  dumpPrimTraceLog();\n  fprintf(stderr, \"\\n\");\n  printCallStack();\n  fprintf(stderr, \"\\nTo recover valuable content from this image:\\n\");\n  fprintf(stderr, \"    squeak %s\\n\", imageName);\n  fprintf(stderr, \"and then evaluate\\n\");\n  fprintf(stderr, \"    Smalltalk processStartUpList: true\\n\");\n  fprintf(stderr, \"in a workspace.  DESTROY the dumped image after recovering content!\");\n\n  if (quit) abort();\n  strncpy(imageName, savedName, sizeof(imageName));\n}\n\n#endif\n\nsqInt ioProcessEvents(void)\n{\n#if defined(IMAGE_DUMP)\n  if (dumpImageFile)\n    {\n      emergencyDump(0);\n      dumpImageFile= 0;\n    }\n#endif\n  return dpy->ioProcessEvents();\n}\n\nsqInt ioScreenDepth(void)\t\t { return dpy->ioScreenDepth(); }\nsqInt ioScreenSize(void)\t\t { return dpy->ioScreenSize(); }\n\nsqInt ioSetCursorWithMask(sqInt cursorBitsIndex, sqInt cursorMaskIndex, sqInt offsetX, sqInt offsetY)\n{\n  return dpy->ioSetCursorWithMask(cursorBitsIndex, cursorMaskIndex, offsetX, offsetY);\n}\n\nsqInt ioSetCursorARGB(sqInt cursorBitsIndex, sqInt extentX, sqInt extentY, sqInt offsetX, sqInt offsetY)\n{\n  return dpy->ioSetCursorARGB(cursorBitsIndex, extentX, extentY, offsetX, offsetY);\n}\n\nsqInt ioSetCursor(sqInt cursorBitsIndex, sqInt offsetX, sqInt offsetY)\n{\n  return ioSetCursorWithMask(cursorBitsIndex, 0, offsetX, offsetY);\n}\n\nsqInt ioSetFullScreen(sqInt fullScreen)\t{ return dpy->ioSetFullScreen(fullScreen); }\nsqInt ioForceDisplayUpdate(void)\t{ return dpy->ioForceDisplayUpdate(); }\n\nsqInt ioShowDisplay(sqInt dispBitsIndex, sqInt width, sqInt height, sqInt depth, sqInt l, sqInt r, sqInt t, sqInt b)\n{\n  return dpy->ioShowDisplay(dispBitsIndex, width, height, depth, l, r, t, b);\n}\n\nsqInt ioHasDisplayDepth(sqInt i) { return dpy->ioHasDisplayDepth(i); }\n\nsqInt ioSetDisplayMode(sqInt width, sqInt height, sqInt depth, sqInt fullscreenFlag)\n{\n  return dpy->ioSetDisplayMode(width, height, depth, fullscreenFlag);\n}\n\nsqInt clipboardSize(void)\n{\n  return dpy->clipboardSize();\n}\n\nsqInt clipboardWriteFromAt(sqInt count, sqInt byteArrayIndex, sqInt startIndex)\n{\n  return dpy->clipboardWriteFromAt(count, byteArrayIndex, startIndex);\n}\n\nsqInt clipboardReadIntoAt(sqInt count, sqInt byteArrayIndex, sqInt startIndex)\n{\n  return dpy->clipboardReadIntoAt(count, byteArrayIndex, startIndex);\n}\n\nchar **clipboardGetTypeNames(void)\n{\n  return dpy->clipboardGetTypeNames();\n}\n\nsqInt clipboardSizeWithType(char *typeName, int ntypeName)\n{\n  return dpy->clipboardSizeWithType(typeName, ntypeName);\n}\n\nvoid clipboardWriteWithType(char *data, size_t nData, char *typeName, size_t nTypeNames, int isDnd, int isClaiming)\n{\n  dpy->clipboardWriteWithType(data, nData, typeName, nTypeNames, isDnd, isClaiming);\n}\n\nsqInt ioGetButtonState(void)\t\t{ return dpy->ioGetButtonState(); }\nsqInt ioPeekKeystroke(void)\t\t{ return dpy->ioPeekKeystroke(); }\nsqInt ioGetKeystroke(void)\t\t{ return dpy->ioGetKeystroke(); }\nsqInt ioGetNextEvent(sqInputEvent *evt)\t{ return dpy->ioGetNextEvent(evt); }\nsqInt ioMousePoint(void)\t\t{ return dpy->ioMousePoint(); }\n\n/*** Window labeling ***/\nchar* ioGetWindowLabel(void) {return \"\";}\n\nsqInt ioSetWindowLabelOfSize(void* lbl, sqInt size)\n{ return dpy->hostWindowSetTitle((long)dpy->ioGetWindowHandle(), lbl, size); }\n\nsqInt ioIsWindowObscured(void) {return false;}\n\n/** Misplaced Window-Size stubs, so the VM will link. **/\nsqInt ioGetWindowWidth()\n{ int wh = dpy->hostWindowGetSize((long)dpy->ioGetWindowHandle());\n  return wh >> 16; } \n\nsqInt ioGetWindowHeight()\n{ int wh = dpy->hostWindowGetSize((long)dpy->ioGetWindowHandle());\n  return (short)wh; } \n\nvoid* ioGetWindowHandle(void) { return dpy->ioGetWindowHandle(); }\n\nsqInt ioSetWindowWidthHeight(sqInt w, sqInt h)\n{ return dpy->hostWindowSetSize((long)dpy->ioGetWindowHandle(),w,h); }\n\n/*** Drag and Drop ***/\n\nsqInt dndOutStart(char *types, int ntypes)\t{ return dpy->dndOutStart(types, ntypes); }\nsqInt dndOutAcceptedType(char *type, int ntype)\t{ return dpy->dndOutAcceptedType(type, ntype); }\nvoid  dndOutSend(char *bytes, int nbytes)\t{        dpy->dndOutSend(bytes, nbytes); }\nvoid  dndReceived(char *fileName)\t\t\t{        dpy->dndReceived(fileName); }\n\n/*** OpenGL ***/\n\nint verboseLevel= 1;\n\nstruct SqDisplay *ioGetDisplayModule(void)\t{ return dpy; }\n\nvoid *ioGetDisplay(void)\t\t\t{ return dpy->ioGetDisplay(); }\nvoid *ioGetWindow(void)\t\t\t\t{ return dpy->ioGetWindow(); }\nsqInt ioGLinitialise(void)\t\t\t{ return dpy->ioGLinitialise(); }\n\nsqInt  ioGLcreateRenderer(glRenderer *r, sqInt x, sqInt y, sqInt w, sqInt h, sqInt flags)\n{\n  return dpy->ioGLcreateRenderer(r, x, y, w, h, flags);\n}\n\nsqInt ioGLmakeCurrentRenderer(glRenderer *r)\t{ return dpy->ioGLmakeCurrentRenderer(r); }\nvoid  ioGLdestroyRenderer(glRenderer *r)\t{\t dpy->ioGLdestroyRenderer(r); }\nvoid  ioGLswapBuffers(glRenderer *r)\t\t{\t dpy->ioGLswapBuffers(r); }\n\nvoid  ioGLsetBufferRect(glRenderer *r, sqInt x, sqInt y, sqInt w, sqInt h)\n{\n  dpy->ioGLsetBufferRect(r, x, y, w, h);\n}\n\n\nsqInt  primitivePluginBrowserReady(void)\t{ return dpy->primitivePluginBrowserReady(); }\nsqInt  primitivePluginRequestURLStream(void)\t{ return dpy->primitivePluginRequestURLStream(); }\nsqInt  primitivePluginRequestURL(void)\t\t{ return dpy->primitivePluginRequestURL(); }\nsqInt  primitivePluginPostURL(void)\t\t{ return dpy->primitivePluginPostURL(); }\nsqInt  primitivePluginRequestFileHandle(void)\t{ return dpy->primitivePluginRequestFileHandle(); }\nsqInt  primitivePluginDestroyRequest(void)\t{ return dpy->primitivePluginDestroyRequest(); }\nsqInt  primitivePluginRequestState(void)\t{ return dpy->primitivePluginRequestState(); }\n\n\n/*** errors ***/\n\nstatic void outOfMemory(void)\n{\n  /* pushing stderr outputs the error report on stderr instead of stdout */\n  pushOutputFile((char *)STDERR_FILENO);\n  error(\"out of memory\\n\");\n}\n\n# ifndef ROAR_VM\n/* Print an error message, possibly a stack trace, do /not/ exit.\n * Allows e.g. writing to a log file and stderr.\n */\nstatic void\nreportStackState(char *msg, char *date, int printAll, ucontext_t *uap)\n{\n#if !defined(NOEXECINFO)\n\tvoid *addrs[BACKTRACE_DEPTH];\n\tint depth;\n#endif\n\t/* flag prevents recursive error when trying to print a broken stack */\n\tstatic sqInt printingStack = false;\n\n\tprintf(\"\\n%s%s%s\\n\\n\", msg, date ? \" \" : \"\", date ? date : \"\");\n\n#if !defined(NOEXECINFO)\n\tprintf(\"C stack backtrace:\\n\");\n\tfflush(stdout); /* backtrace_symbols_fd uses unbuffered i/o */\n\tdepth = backtrace(addrs, BACKTRACE_DEPTH);\n\tbacktrace_symbols_fd(addrs, depth, fileno(stdout));\n#endif\n\n\tif (ioOSThreadsEqual(ioCurrentOSThread(),getVMOSThread())) {\n\t\tif (!printingStack) {\n#if COGVM\n\t\t\t/* If we're in generated machine code then the only way the stack\n\t\t\t * dump machinery has of giving us an accurate report is if we set\n\t\t\t * stackPointer & framePointer to the native stack & frame pointers.\n\t\t\t */\n# if __APPLE__ && __MACH__ && __i386__\n\t\t\tvoid *fp = (void *)(uap ? uap->uc_mcontext->ss.ebp: 0);\n\t\t\tvoid *sp = (void *)(uap ? uap->uc_mcontext->ss.esp: 0);\n# elif __linux__ && __i386__\n\t\t\tvoid *fp = (void *)(uap ? uap->uc_mcontext.gregs[REG_EBP]: 0);\n\t\t\tvoid *sp = (void *)(uap ? uap->uc_mcontext.gregs[REG_ESP]: 0);\n# elif __FreeBSD__ && __i386__\n\t\t\tvoid *fp = (void *)(uap ? uap->uc_mcontext.mc_ebp: 0);\n\t\t\tvoid *sp = (void *)(uap ? uap->uc_mcontext.mc_esp: 0);\n# else\n#\terror need to implement extracting pc from a ucontext_t on this system\n# endif\n\t\t\tchar *savedSP, *savedFP;\n\n\t\t\tifValidWriteBackStackPointersSaveTo(fp,sp,&savedFP,&savedSP);\n#endif\n\n\t\t\tprintingStack = true;\n\t\t\tif (printAll) {\n\t\t\t\tprintf(\"\\n\\nAll Smalltalk process stacks (active first):\\n\");\n\t\t\t\tprintAllStacks();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tprintf(\"\\n\\nSmalltalk stack dump:\\n\");\n\t\t\t\tprintCallStack();\n\t\t\t}\n\t\t\tprintingStack = false;\n#if COGVM\n\t\t\t/* Now restore framePointer and stackPointer via same function */\n\t\t\tifValidWriteBackStackPointersSaveTo(savedFP,savedSP,0,0);\n#endif\n\t\t}\n\t}\n\telse\n\t\tprintf(\"\\nCan't dump Smalltalk stack(s). Not in VM thread\\n\");\n\tprintf(\"\\nMost recent primitives\\n\");\n\tdumpPrimTraceLog();\n\tfflush(stdout);\n}\n\n/* Print an error message, possibly a stack trace, and exit. */\n/* Disable Intel compiler inlining of error which is used for breakpoints */\n#pragma auto_inline off\nvoid\nerror(char *msg)\n{\n\treportStackState(msg,0,0,0);\n\tabort();\n}\n#pragma auto_inline on\n\n# endif // ROAR_VM\n\n/* construct /dir/for/image/crash.dmp if a / in imageName else crash.dmp */\nstatic void\ngetCrashDumpFilenameInto(char *buf)\n{\n  char *slash;\n\n  strcpy(buf,imageName);\n  slash = strrchr(buf,'/');\n  strcpy(slash ? slash + 1 : buf, \"crash.dmp\");\n}\n\nstatic void\nsigusr1(int sig, siginfo_t *info, ucontext_t *uap)\n{\n\tint saved_errno = errno;\n\ttime_t now = time(NULL);\n\tchar ctimebuf[32];\n\tchar crashdump[IMAGE_NAME_SIZE+1];\n\tunsigned long pc;\n\n# ifndef ROAR_VM\n\tif (!ioOSThreadsEqual(ioCurrentOSThread(),getVMOSThread())) {\n\t\tpthread_kill(getVMOSThread(),sig);\n\t\terrno = saved_errno;\n\t\treturn;\n\t}\n# endif\n\n\tgetCrashDumpFilenameInto(crashdump);\n\tctime_r(&now,ctimebuf);\n\tpushOutputFile(crashdump);\n# ifndef ROAR_VM\n\treportStackState(\"SIGUSR1\", ctimebuf, 1, uap);\n# endif\n\tpopOutputFile();\n# ifndef ROAR_VM\n\treportStackState(\"SIGUSR1\", ctimebuf, 1, uap);\n# endif\n  \n\terrno = saved_errno;\n}\n\nstatic void\nsigsegv(int sig, siginfo_t *info, ucontext_t *uap)\n{\n\ttime_t now = time(NULL);\n\tchar ctimebuf[32];\n\tchar crashdump[IMAGE_NAME_SIZE+1];\n\n\tgetCrashDumpFilenameInto(crashdump);\n\tctime_r(&now,ctimebuf);\n\tpushOutputFile(crashdump);\n# ifndef ROAR_VM\n\treportStackState(\"Segmentation fault\", ctimebuf, 0, uap);\n# endif\n\tpopOutputFile();\n# ifndef ROAR_VM\n\treportStackState(\"Segmentation fault\", ctimebuf, 0, uap);\n# endif\n\tabort();\n}\n\n\n\n#if defined(IMAGE_DUMP)\nstatic void\nsighup(int ignore) { dumpImageFile= 1; }\n\nstatic void\nsigquit(int ignore) { emergencyDump(1); }\n#endif\n\n\n/*** modules ***/\n\n\n#include \"SqModule.h\"\n\nstruct SqModule *displayModule=\t0;\nstruct SqModule *soundModule=\t0;\nstruct SqModule *modules= 0;\n\n#define modulesDo(M)\tfor (M= modules;  M;  M= M->next)\n\nstruct moduleDescription\n{\n  struct SqModule **addr;\n  char\t\t   *type;\n  char\t\t   *name;\n};\n\nstatic struct moduleDescription moduleDescriptions[]=\n{\n  { &displayModule, \"display\", \"X11\"    },\t/*** NO DEFAULT ***/\n  { &displayModule, \"display\", \"fbdev\"  },\t/*** NO DEFAULT ***/\n  { &displayModule, \"display\", \"null\"   },\t/*** NO DEFAULT ***/\n  { &displayModule, \"display\", \"custom\" },\t/*** NO DEFAULT ***/\n  { &soundModule,   \"sound\",   \"NAS\"    },\t/*** NO DEFAULT ***/\n  { &soundModule,   \"sound\",   \"custom\" },\t/*** NO DEFAULT ***/\n  /* when adding an entry above be sure to change the defaultModules offset below */\n  { &displayModule, \"display\", \"Quartz\" },\t/* defaults... */\n  { &soundModule,   \"sound\",   \"OSS\"    },\n  { &soundModule,   \"sound\",   \"MacOSX\" },\n  { &soundModule,   \"sound\",   \"Sun\"    },\n  { &soundModule,   \"sound\",   \"pulse\"  },\n  { &soundModule,   \"sound\",   \"ALSA\"   },\n  { &soundModule,   \"sound\",   \"null\"   },\n  { 0,              0,         0\t}\n};\n\nstatic struct moduleDescription *defaultModules= moduleDescriptions + 6;\n\n\nstruct SqModule *queryLoadModule(char *type, char *name, int query)\n{\n  char modName[MAXPATHLEN], itfName[32];\n  struct SqModule *module= 0;\n  void *itf= 0;\n  sprintf(modName, \"vm-%s-%s\", type, name);\n#ifdef DEBUG_MODULES\n  printf(\"looking for module %s\\n\", modName);\n#endif\n  modulesDo (module)\n    if (!strcmp(module->name, modName))\n      return module;\n  sprintf(itfName, \"%s_%s\", type, name);\n  itf= ioFindExternalFunctionIn(itfName, ioLoadModule(0));\n  if (!itf)\n    {\n      void *handle= ioLoadModule(modName);\n      if (handle)\n\titf= ioFindExternalFunctionIn(itfName, handle);\n      else\n\tif (!query)\n\t  {\n\t    fprintf(stderr, \"could not find module %s\\n\", modName);\n\t    return 0;\n\t  }\n    }\n  if (itf)\n    {\n      module= (struct SqModule *)itf;\n      if (SqModuleVersion != module->version)\n\t{\n\t  fprintf(stderr, \"module %s version %x does not have required version %x\\n\",\n\t\t  modName, module->version, SqModuleVersion);\n\t  abort();\n\t}\n      module->next= modules;\n      modules= module;\n      module->name= strdup(modName);\n      module->parseEnvironment();\n      return module;\n    }\n  if (!query)\n    fprintf(stderr, \"could not find interface %s in module %s\\n\", itfName, modName);\n  return 0;\n}\n\n\nstruct SqModule *queryModule(char *type, char *name)\n{\n  return queryLoadModule(type, name, 1);\n}\n\nstruct SqModule *loadModule(char *type, char *name)\n{\n  return queryLoadModule(type, name, 0);\n}\n\nstruct SqModule *requireModule(char *type, char *name)\n{\n  struct SqModule *m= loadModule(type, name);\n  if (!m) abort();\n  return m;\n}\n\n\nstatic char *canonicalModuleName(char *name)\n{\n  struct moduleDescription *md;\n\n  for (md= moduleDescriptions;  md->addr;  ++md)\n    if (!strcasecmp(name, md->name))\n      return md->name;\n  if (!strcasecmp(name, \"none\"))\n    return \"null\";\n  return name;\n}\n\n\nstatic void requireModuleNamed(char *type)\t/*** NOTE: MODIFIES THE ARGUMENT! ***/\n{\n  if      (!strncmp(type,  \"vm-\", 3)) type+= 3;\n  else if (!strncmp(type, \"-vm-\", 4)) type+= 4;\n  /* we would like to use strsep() here, but neither OSF1 nor Solaris have it */\n  {\n    char *name= type;\n\n    while (*name && ('-' != *name) && ('=' != *name))\n      ++name;\n    if (*name) *name++= '\\0';\n\n#  if defined(DEBUG_MODULES)\n    printf(\"type %s name %s\\n\", type, name);\n#  endif\n    {\n      struct SqModule **addr= 0, *module= 0;\n\n      if      (!strcmp(type, \"display\")) addr= &displayModule;\n      else if (!strcmp(type, \"sound\"))   addr= &soundModule;\n      /* let unknown types through to the following to generate a more informative diagnostic */\n      name= canonicalModuleName(name);\n      module= requireModule(type, name);\n      if (!addr)\n\t{\n\t  fprintf(stderr, \"this cannot happen\\n\");\n\t  abort();\n\t}\n      *addr= module;\n    }\n  }\n}\n\nstatic void requireModulesNamed(char *specs)\n{\n  char *vec= strdup(specs);\n  char *pos= vec;\n\n  while (*pos)\n    {\n      char *end= pos;\n      while (*end && (' ' <= *end) && (',' != *end))\n\t++end;\n      if (*end) *end++= '\\0';\n      requireModuleNamed(pos);\n      pos= end;\n    }\n  free(vec);\n}\n\n\nstatic void checkModuleVersion(struct SqModule *module, int required, int actual)\n{\n  if (required != actual)\n    {\n      fprintf(stderr, \"module %s interface version %x does not have required version %x\\n\",\n\t      module->name, actual, required);\n      abort();\n    }\n}\n\n\nstatic void loadImplicit(struct SqModule **addr, char *evar, char *type, char *name)\n{\n  if ((!*addr) && getenv(evar) && !(*addr= queryModule(type, name)))\n    {\n      fprintf(stderr, \"could not find %s driver vm-%s-%s; either:\\n\", type, type, name);\n      fprintf(stderr, \"  - check that %s/vm-%s-%s.so exists, or\\n\", vmPath, type, name);\n      fprintf(stderr, \"  - use the '-plugins <path>' option to tell me where it is, or\\n\");\n      fprintf(stderr, \"  - remove %s from your environment.\\n\", evar);\n      abort();\n    }\n}\n\nstatic void loadModules(void)\n{\n# if Configure_Squeak_Code_for_Tilera\n    extern struct SqModule display_X11,sound_null;\n    displayModule = &display_X11;\n    soundModule = &sound_null;\n# else\n  loadImplicit(&displayModule, \"DISPLAY\",     \"display\", \"X11\");\n  loadImplicit(&soundModule,   \"AUDIOSERVER\", \"sound\",   \"NAS\");\n# endif\n  {\n    struct moduleDescription *md;\n\n    for (md= defaultModules;  md->addr;  ++md)\n      if (!*md->addr)\n\tif ((*md->addr= queryModule(md->type, md->name)))\n#\t if defined(DEBUG_MODULES)\n\t  fprintf(stderr, \"squeak: %s driver defaulting to vm-%s-%s\\n\", md->type, md->type, md->name)\n#\t endif\n\t    ;\n  }\n\n  if (!displayModule)\n    {\n      fprintf(stderr, \"squeak: could not find any display driver\\n\");\n      abort();\n    }\n  if (!soundModule)\n    {\n      fprintf(stderr, \"squeak: could not find any sound driver\\n\");\n      abort();\n    }\n\n  dpy= (struct SqDisplay *)displayModule->makeInterface();\n  snd= (struct SqSound   *)soundModule  ->makeInterface();\n\n  checkModuleVersion(displayModule, SqDisplayVersion, dpy->version);\n  checkModuleVersion(soundModule,   SqSoundVersion,   snd->version);\n}\n\n/* built-in main vm module */\n\n\nstatic int strtobkm(const char *str)\n{\n  char *suffix;\n  int value= strtol(str, &suffix, 10);\n  switch (*suffix)\n    {\n    case 'k': case 'K':\n      value*= 1024;\n      break;\n    case 'm': case 'M':\n      value*= 1024*1024;\n      break;\n    }\n  return value;\n}\n\n#if !STACKVM && !COGVM && !defined(ROAR_VM)\nstatic int jitArgs(char *str)\n{\n  char *endptr= str;\n  int  args= 3;\t\t\t\t/* default JIT mode = fast compiler */\n  \n  if (*str == '\\0') return args;\n  if (*str != ',')\n    args= strtol(str, &endptr, 10);\t/* mode */\n  while (*endptr == ',')\t\t/* [,debugFlag]* */\n    args|= (1 << (strtol(endptr + 1, &endptr, 10) + 8));\n  return args;\n}\n#endif /* !STACKVM && !COGVM && !defined(ROAR_VM) */\n\n\n# include <locale.h>\nstatic void vm_parseEnvironment(void)\n{\n  char *ev= setlocale(LC_CTYPE, \"\");\n  if (ev)\n    setLocaleEncoding(ev);\n  else\n    fprintf(stderr, \"setlocale() failed (check values of LC_CTYPE, LANG and LC_ALL)\\n\");\n\n  if (documentName)\n    strcpy(shortImageName, documentName);\n  else if ((ev= getenv(\"SQUEAK_IMAGE\")))\n    strcpy(shortImageName, ev);\n  else\n    strcpy(shortImageName, \"squeak.image\");\n\n  if ((ev= getenv(\"SQUEAK_MEMORY\")))\textraMemory= strtobkm(ev);\n  if ((ev= getenv(\"SQUEAK_MMAP\")))\tuseMmap= strtobkm(ev);\n  if ((ev= getenv(\"SQUEAK_PLUGINS\")))\tsqueakPlugins= strdup(ev);\n  if ((ev= getenv(\"SQUEAK_NOEVENTS\")))\tnoEvents= 1;\n  if ((ev= getenv(\"SQUEAK_NOTIMER\")))\tuseItimer= 0;\n#if !STACKVM && !COGVM\n  # ifndef ROAR_VM\n  if ((ev= getenv(\"SQUEAK_JIT\")))\tuseJit= jitArgs(ev);\n  # endif // !ROAR_VM\n  if ((ev= getenv(\"SQUEAK_PROCS\")))\tjitProcs= atoi(ev);\n  if ((ev= getenv(\"SQUEAK_MAXPIC\")))\tjitMaxPIC= atoi(ev);\n#endif /* !STACKVM && !COGVM */\n  # ifndef ROAR_VM\n  if ((ev= getenv(\"SQUEAK_ENCODING\")))\tsetEncoding(&sqTextEncoding, ev);\n  if ((ev= getenv(\"SQUEAK_PATHENC\")))\tsetEncoding(&uxPathEncoding, ev);\n  if ((ev= getenv(\"SQUEAK_TEXTENC\")))\tsetEncoding(&uxTextEncoding, ev);\n  # endif // !ROAR_VM\n\n  if ((ev= getenv(\"SQUEAK_VM\")))\trequireModulesNamed(ev);\n}\n\n\nstatic void usage(void);\n\n# ifndef ROAR_VM\nstatic void versionInfo(void);\n# endif // !ROAR_VM\n\nstatic int parseModuleArgument(int argc, char **argv, struct SqModule **addr, char *type, char *name)\n{\n  if (*addr)\n    {\n      fprintf(stderr, \"option '%s' conflicts with previously-loaded module '%s'\\n\", *argv, (*addr)->name);\n      exit(1);\n    }\n  *addr= requireModule(type, name);\n  return (*addr)->parseArgument(argc, argv);\n}\n\n\nstatic int vm_parseArgument(int argc, char **argv)\n{\n  /* deal with arguments that implicitly load modules */\n\n  if (!strncmp(argv[0], \"-psn_\", 5))\n    {\n      displayModule= requireModule(\"display\", \"Quartz\");\n      return displayModule->parseArgument(argc, argv);\n    }\n\n  if ((!strcmp(argv[0], \"-vm\")) && (argc > 1))\n    {\n      requireModulesNamed(argv[1]);\n      return 2;\n    }\n\n  if (!strncmp(argv[0], \"-vm-\", 4))\n    {\n      requireModulesNamed(argv[0] + 4);\n      return 1;\n    }\n\n  /* legacy compatibility */\t\t/*** XXX to be removed at some time ***/\n\n# define moduleArg(arg, type, name)\t\t\t\t\t\t\\\n    if (!strcmp(argv[0], arg))\t\t\t\t\t\t\t\\\n      return parseModuleArgument(argc, argv, &type##Module, #type, name);\n\n  moduleArg(\"-nodisplay\",\tdisplay, \"null\");\n  moduleArg(\"-display\",\t\tdisplay, \"X11\");\n  moduleArg(\"-headless\",\tdisplay, \"X11\");\n  moduleArg(\"-quartz\",\t\tdisplay, \"Quartz\");\n  moduleArg(\"-nosound\",\t\tsound,   \"null\");\n\n# undef moduleArg\n\n  /* vm arguments */\n\n  if      (!strcmp(argv[0], \"-help\"))\t\t{ usage();\t\treturn 1; }\n  else if (!strcmp(argv[0], \"-noevents\"))\t{ noEvents\t= 1;\treturn 1; }\n  else if (!strcmp(argv[0], \"-nomixer\"))\t{ noSoundMixer\t= 1;\treturn 1; }\n  else if (!strcmp(argv[0], \"-notimer\"))\t{ useItimer\t= 0;\treturn 1; }\n  else if (!strcmp(argv[0], \"-nohandlers\"))\t{ installHandlers= 0;\treturn 1; }\n#if !STACKVM && !COGVM && !defined(ROAR_VM)\n  else if (!strncmp(argv[0],\"-jit\", 4))\t\t{ useJit\t= jitArgs(argv[0]+4);\treturn 1; }\n  else if (!strcmp(argv[0], \"-nojit\"))\t\t{ useJit\t= 0;\treturn 1; }\n  else if (!strcmp(argv[0], \"-spy\"))\t\t{ withSpy\t= 1;\treturn 1; }\n#endif /* !STACKVM && !COGVM && !defined(ROAR_VM) */\n  # ifndef ROAR_VM\n  else if (!strcmp(argv[0], \"-version\"))\t{ versionInfo();\treturn 1; }\n  # endif // !ROAR_VM\n  else if (!strcmp(argv[0], \"-single\"))\t\t{ runAsSingleInstance=1; return 1; }\n  /* option requires an argument */\n  else if (argc > 1)\n    {\n      if (!strcmp(argv[0], \"-memory\"))\t{ extraMemory=\t strtobkm(argv[1]);\t return 2; }\n#if !STACKVM && !COGVM\n      else if (!strcmp(argv[0], \"-procs\"))\t{ jitProcs=\t atoi(argv[1]);\t\t return 2; }\n      else if (!strcmp(argv[0], \"-maxpic\"))\t{ jitMaxPIC=\t atoi(argv[1]);\t\t return 2; }\n#endif /* !STACKVM && !COGVM */\n      else if (!strcmp(argv[0], \"-mmap\"))\t{ useMmap=\t strtobkm(argv[1]);\t return 2; }\n      else if (!strcmp(argv[0], \"-plugins\"))\t{ squeakPlugins= strdup(argv[1]);\t return 2; }\n      # ifndef ROAR_VM\n      else if (!strcmp(argv[0], \"-encoding\"))\t{ setEncoding(&sqTextEncoding, argv[1]); return 2; }\n      else if (!strcmp(argv[0], \"-pathenc\"))\t{ setEncoding(&uxPathEncoding, argv[1]); return 2; }\n      # endif // !ROAR_VM\n#if STACKVM\n      else if (!strcmp(argv[0], \"-eden\")) {\n\t\textern sqInt desiredEdenBytes;\n\t\tdesiredEdenBytes = strtobkm(argv[1]);\n\t\treturn 2; }\n      else if (!strcmp(argv[0], \"-leakcheck\")) { \n\t\textern sqInt checkForLeaks;\n\t\tcheckForLeaks = atoi(argv[1]);\t \n\t\treturn 2; }\n      else if (!strcmp(argv[0], \"-stackpages\")) {\n\t\textern sqInt desiredNumStackPages;\n\t\tdesiredNumStackPages = atoi(argv[1]);\n\t\treturn 2; }\n      else if (!strcmp(argv[0], \"-breaksel\")) { \n\t\textern void setBreakSelector(char *);\n\t\tsetBreakSelector(argv[1]);\n\t\treturn 2; }\n      else if (!strcmp(argv[0], \"-noheartbeat\")) { \n\t\textern sqInt suppressHeartbeatFlag;\n\t\tsuppressHeartbeatFlag = 1;\n\t\treturn 1; }\n      else if (!strcmp(argv[0], \"-pollpip\")) { \n\t\textern sqInt pollpip;\n\t\tpollpip = atoi(argv[1]);\t \n\t\treturn 2; }\n#endif /* STACKVM */\n#if COGVM\n      else if (!strcmp(argv[0], \"-codesize\")) { \n\t\textern sqInt desiredCogCodeSize;\n\t\tdesiredCogCodeSize = strtobkm(argv[1]);\t \n\t\treturn 2; }\n# define TLSLEN (sizeof(\"-sendtrace\")-1)\n      else if (!strncmp(argv[0], \"-sendtrace\", TLSLEN)) { \n\t\textern int traceLinkedSends;\n\t\tchar *equalsPos = strchr(argv[0],'=');\n\n\t\tif (!equalsPos) {\n\t\t\ttraceLinkedSends = 1;\n\t\t\treturn 1;\n\t\t}\n\t\tif (equalsPos - argv[0] != TLSLEN\n\t\t  || (equalsPos[1] != '-' && !isdigit(equalsPos[1])))\n\t\t\treturn 0;\n\n\t\ttraceLinkedSends = atoi(equalsPos + 1);\n\t\treturn 1; }\n      else if (!strcmp(argv[0], \"-tracestores\")) { \n\t\textern sqInt traceStores;\n\t\ttraceStores = 1;\n\t\treturn 1; }\n      else if (!strcmp(argv[0], \"-cogmaxlits\")) { \n\t\textern sqInt maxLiteralCountForCompile;\n\t\tmaxLiteralCountForCompile = strtobkm(argv[1]);\t \n\t\treturn 2; }\n      else if (!strcmp(argv[0], \"-cogminjumps\")) { \n\t\textern sqInt minBackwardJumpCountForCompile;\n\t\tminBackwardJumpCountForCompile = strtobkm(argv[1]);\t \n\t\treturn 2; }\n#endif /* COGVM */\n      else if (!strcmp(argv[0], \"-textenc\"))\n\t{\n\t  char *buf= (char *)malloc(strlen(argv[1]) + 1);\n\t  int len, i;\n\t  strcpy(buf, argv[1]);\n\t  len= strlen(buf);\n\t  for (i= 0;  i < len;  ++i)\n\t    buf[i]= toupper(buf[i]);\n    # ifndef ROAR_VM\n\t  if ((!strcmp(buf, \"UTF8\")) || (!strcmp(buf, \"UTF-8\")))\n\t    textEncodingUTF8= 1;\n\t  else\n\t    setEncoding(&uxTextEncoding, buf);\n     # endif // !ROAR_VM\n\t  free(buf);\n\t  return 2;\n\t}\n    }\n  return 0;\t/* option not recognised */\n}\n\n\nstatic void vm_printUsage(void)\n{\n  printf(\"\\nCommon <option>s:\\n\");\n  printf(\"  -encoding <enc>       set the internal character encoding (default: MacRoman)\\n\");\n  printf(\"  -help                 print this help message, then exit\\n\");\n  printf(\"  -memory <size>[mk]    use fixed heap size (added to image size)\\n\");\n  printf(\"  -mmap <size>[mk]      limit dynamic heap size (default: %dm)\\n\", DefaultMmapSize);\n#if STACKVM\n  printf(\"  -eden <size>[mk]      use given eden size\\n\");\n  printf(\"  -stackpages <num>     use given number of stack pages\\n\");\n#endif\n  printf(\"  -noevents             disable event-driven input support\\n\");\n  printf(\"  -notimer              disable interval timer for low-res clock \\n\");\n  printf(\"  -nohandlers           disable sigsegv & sigusr1 handlers\\n\");\n  printf(\"  -pathenc <enc>        set encoding for pathnames (default: UTF-8)\\n\");\n  printf(\"  -plugins <path>       specify alternative plugin location (see manpage)\\n\");\n  printf(\"  -textenc <enc>        set encoding for external text (default: UTF-8)\\n\");\n  printf(\"  -version              print version information, then exit\\n\");\n  printf(\"  -vm-<sys>-<dev>       use the <dev> driver for <sys> (see below)\\n\");\n#if COGVM\n  printf(\"  -codesize <size>[mk]  set machine code memory to bytes\\n\");\n  printf(\"  -sendtrace[=num]      enable send tracing (optionally to a specific value)\\n\");\n  printf(\"  -tracestores          enable store tracing (assert check stores)\\n\");\n  printf(\"  -cogmaxlits <n>       set max number of literals for methods compiled to machine code\\n\");\n  printf(\"  -cogminjumps <n>      set min number of backward jumps for interpreted methods to be considered for compilation to machine code\\n\");\n#endif\n#if 1\n  printf(\"Deprecated:\\n\");\n# if !(STACKVM || COGVM)\n  printf(\"  -jit                  enable the dynamic compiler (if available)\\n\");\n# endif\n  printf(\"  -notimer              disable interval timer for low-res clock \\n\");\n  printf(\"  -display <dpy>        equivalent to '-vm-display-X11 -display <dpy>'\\n\");\n  printf(\"  -headless             equivalent to '-vm-display-X11 -headless'\\n\");\n  printf(\"  -nodisplay            equivalent to '-vm-display-null'\\n\");\n  printf(\"  -nomixer              disable modification of mixer settings\\n\");\n  printf(\"  -nosound              equivalent to '-vm-sound-null'\\n\");\n  printf(\"  -quartz               equivalent to '-vm-display-Quartz'\\n\");\n#endif\n}\n\n\nstatic void vm_printUsageNotes(void)\n{\n  printf(\"  If `-memory' is not specified then the heap will grow dynamically.\\n\");\n  printf(\"  <argument>s are ignored, but are processed by the Squeak image.\\n\");\n  printf(\"  The first <argument> normally names a Squeak `script' to execute.\\n\");\n  printf(\"  Precede <arguments> by `--' to use default image.\\n\");\n}\n\n\nstatic void *vm_makeInterface(void)\n{\n  fprintf(stderr, \"this cannot happen\\n\");\n  abort();\n}\n\n\nSqModuleDefine(vm, Module);\n\n\n/*** options processing ***/\n\n\nstatic void usage(void)\n{\n  struct SqModule *m= 0;\n  printf(\"Usage: %s [<option>...] [<imageName> [<argument>...]]\\n\", argVec[0]);\n  printf(\"       %s [<option>...] -- [<argument>...]\\n\", argVec[0]);\n  sqIgnorePluginErrors= 1;\n  {\n    struct moduleDescription *md;\n    for (md= moduleDescriptions;  md->addr;  ++md)\n      queryModule(md->type, md->name);\n  }\n  modulesDo(m)\n    m->printUsage();\n  if (useJit)\n    {\n      printf(\"\\njit <option>s:\\n\");\n      printf(\"  -align <n>            align functions at <n>-byte boundaries\\n\");\n      printf(\"  -jit<o>[,<d>...]      set optimisation [and debug] levels\\n\");\n      printf(\"  -maxpic <n>           set maximum PIC size to <n> entries\\n\");\n      printf(\"  -procs <n>            allow <n> concurrent volatile processes\\n\");\n      printf(\"  -spy                  enable the system spy\\n\");\n    }\n  printf(\"\\nNotes:\\n\");\n  printf(\"  <imageName> defaults to `squeak.image'.\\n\");\n  modulesDo(m)\n    m->printUsageNotes();\n  printf(\"\\nAvailable drivers:\\n\");\n  for (m= modules;  m->next;  m= m->next)\n    printf(\"  %s\\n\", m->name);\n  exit(1);\n}\n\n# ifndef ROAR_VM\n\nchar *getVersionInfo(int verbose)\n{\n  extern int   vm_serial;\n  extern char *vm_date, *cc_version, *ux_version;\n  char *info= (char *)malloc(4096);\n  info[0]= '\\0';\n\n  if (verbose)\n    sprintf(info+strlen(info), \"Squeak VM version: \");\n  sprintf(info+strlen(info), \"%s #%d\", VM_VERSION, vm_serial);\n#if defined(USE_XSHM)\n  sprintf(info+strlen(info), \" XShm\");\n#endif\n  sprintf(info+strlen(info), \" %s %s\\n\", vm_date, cc_version);\n  if (verbose)\n    sprintf(info+strlen(info), \"Built from: \");\n  sprintf(info+strlen(info), \"%s\\n\", interpreterVersion);\n  if (verbose)\n    sprintf(info+strlen(info), \"Build host: \");\n  sprintf(info+strlen(info), \"%s\\n\", ux_version);\n  sprintf(info+strlen(info), \"plugin path: %s [default: %s]\\n\", squeakPlugins, vmPath);\n  return info;\n}\n\n\nstatic void versionInfo(void)\n{\n  printf(\"%s\", getVersionInfo(0));\n  exit(0);\n}\n\n# endif // !ROAR_VM\n\nstatic void parseArguments(int argc, char **argv)\n{\n# define skipArg()\t(--argc, argv++)\n# define saveArg()\t(vmArgVec[vmArgCnt++]= *skipArg())\n\n  saveArg();\t/* vm name */\n\n  while ((argc > 0) && (**argv == '-'))\t/* more options to parse */\n    {\n      struct SqModule *m= 0;\n      int n= 0;\n      if (!strcmp(*argv, \"--\"))\t\t/* escape from option processing */\n\tbreak;\n      modulesDo (m)\n\tif ((n= m->parseArgument(argc, argv)))\n\t  break;\n#    ifdef DEBUG_IMAGE\n      printf(\"parseArgument n = %d\\n\", n);\n#    endif\n      if (n == 0)\t\t\t/* option not recognised */\n\t{\n\t  fprintf(stderr, \"unknown option: %s\\n\", argv[0]);\n\t  usage();\n\t}\n      while (n--)\n\tsaveArg();\n    }\n  if (!argc)\n    return;\n  if (!strcmp(*argv, \"--\"))\n    skipArg();\n  else\t\t\t\t\t/* image name */\n    {\n      if (!documentName)\n\tstrcpy(shortImageName, saveArg());\n      if (!strstr(shortImageName, \".image\"))\n\tstrcat(shortImageName, \".image\");\n    }\n  /* save remaining arguments as Squeak arguments */\n  while (argc > 0)\n    squeakArgVec[squeakArgCnt++]= *skipArg();\n\n# undef saveArg\n# undef skipArg\n}\n\n# ifndef ROAR_VM\n\n\n/*** main ***/\n\n\nstatic void imageNotFound(char *imageName)\n{\n  /* image file is not found */\n  fprintf(stderr,\n\t  \"Could not open the Squeak image file `%s'.\\n\"\n\t  \"\\n\"\n\t  \"There are three ways to open a Squeak image file.  You can:\\n\"\n\t  \"  1. Put copies of the default image and changes files in this directory.\\n\"\n\t  \"  2. Put the name of the image file on the command line when you\\n\"\n\t  \"     run squeak (use the `-help' option for more information).\\n\"\n\t  \"  3. Set the environment variable SQUEAK_IMAGE to the name of the image\\n\"\n\t  \"     that you want to use by default.\\n\"\n\t  \"\\n\"\n\t  \"For more information, type: `man squeak' (without the quote characters).\\n\",\n\t  imageName);\n  exit(1);\n}\n\n\nvoid imgInit(void)\n{\n  /* read the image file and allocate memory for Squeak heap */\n  for (;;)\n    {\n      FILE *f= 0;\n      struct stat sb;\n      char imageName[MAXPATHLEN];\n      sq2uxPath(shortImageName, strlen(shortImageName), imageName, 1000, 1);\n      if ((  (-1 == stat(imageName, &sb)))\n\t  || ( 0 == (f= fopen(imageName, \"r\"))))\n\t{\n\t  if (dpy->winImageFind(shortImageName, sizeof(shortImageName)))\n\t    continue;\n\t  dpy->winImageNotFound();\n\t  imageNotFound(shortImageName);\n\t}\n      {\n\tint fd= open(imageName, O_RDONLY);\n\tif (fd < 0) abort();\n#      ifdef DEBUG_IMAGE\n\tprintf(\"fstat(%d) => %d\\n\", fd, fstat(fd, &sb));\n#      endif\n      }\n      recordFullPathForImageName(shortImageName); /* full image path */\n      if (extraMemory)\n\tuseMmap= 0;\n      else\n\textraMemory= DefaultHeapSize * 1024 *1024;\n#    ifdef DEBUG_IMAGE\n      printf(\"image size %d + heap size %d (useMmap = %d)\\n\", (int)sb.st_size, extraMemory, useMmap);\n#    endif\n      extraMemory += (int)sb.st_size;\n      readImageFromFileHeapSizeStartingAt(f, extraMemory, 0);\n      sqImageFileClose(f);\n      break;\n    }\n}\n# endif // !ROAR_VM\n\n\n#if defined(__GNUC__) && ( defined(i386) || defined(__i386) || defined(__i386__)  \\\n\t\t\t|| defined(i486) || defined(__i486) || defined (__i486__) \\\n\t\t\t|| defined(intel) || defined(x86) || defined(i86pc) )\n  static void fldcw(unsigned int cw)\n  {\n    __asm__(\"fldcw %0\" :: \"m\"(cw));\n  }\n#else\n# define fldcw(cw)\n#endif\n\n#if defined(__GNUC__) && ( defined(ppc) || defined(__ppc) || defined(__ppc__)  \\\n\t\t\t|| defined(POWERPC) || defined(__POWERPC) || defined (__POWERPC__) )\n  void mtfsfi(unsigned long long fpscr)\n  {\n    __asm__(\"lfd   f0, %0\" :: \"m\"(fpscr));\n    __asm__(\"mtfsf 0xff, f0\");\n  }\n#else\n# define mtfsfi(fpscr)\n#endif\n\nint main(int argc, char **argv, char **envp)\n{\n  fldcw(0x12bf);\t/* signed infinity, round to nearest, REAL8, disable intrs, disable signals */\n  mtfsfi(0);\t\t/* disable signals, IEEE mode, round to nearest */\n\n  /* Make parameters global for access from plugins */\n\n  argCnt= argc;\n  argVec= argv;\n  envVec= envp;\n\n#ifdef DEBUG_IMAGE\n  {\n    int i= argc;\n    char **p= argv;\n    while (i--)\n      printf(\"arg: %s\\n\", *p++);\n  }\n#endif\n\n  /* Allocate arrays to store copies of pointers to command line\n     arguments.  Used by getAttributeIntoLength(). */\n\n  if ((vmArgVec= calloc(argc + 1, sizeof(char *))) == 0)\n    outOfMemory();\n\n  if ((squeakArgVec= calloc(argc + 1, sizeof(char *))) == 0)\n    outOfMemory();\n\n#if defined(__alpha__) && defined(__osf__)\n  /* disable printing of unaligned access exceptions */\n  {\n    int buf[2]= { SSIN_UACPROC, UAC_NOPRINT };\n    if (setsysinfo(SSI_NVPAIRS, buf, 1, 0, 0, 0) < 0)\n      {\n\tperror(\"setsysinfo(UAC_NOPRINT)\");\n      }\n  }\n#endif\n\n#if defined(HAVE_TZSET)\n  tzset();\t/* should _not_ be necessary! */\n#endif\n\n  recordFullPathForVmName(argv[0]); /* full vm path */\n  squeakPlugins= vmPath;\t\t/* default plugin location is VM directory */\n\n#if !DEBUG\n  sqIgnorePluginErrors= 1;\n#endif\n  if (!modules)\n    modules= &vm_Module;\n  vm_Module.parseEnvironment();\n  parseArguments(argc, argv);\n  if ((!dpy) || (!snd))\n    loadModules();\n#if !DEBUG\n  sqIgnorePluginErrors= 0;\n#endif\n\n#if defined(DEBUG_MODULES)\n  printf(\"displayModule %p %s\\n\", displayModule, displayModule->name);\n  if (soundModule)\n    printf(\"soundModule   %p %s\\n\", soundModule,   soundModule->name);\n#endif\n\n# ifndef ROAR_VM\n  if (!realpath(argv[0], vmName))\n    vmName[0]= 0; /* full VM name */\n\n#ifdef DEBUG_IMAGE\n  printf(\"vmName: %s -> %s\\n\", argv[0], vmName);\n  printf(\"viName: %s\\n\", shortImageName);\n  printf(\"documentName: %s\\n\", documentName);\n#endif\n# endif // !ROAR_VM\n\n#if STACKVM || COGVM\n  ioInitTime();\n  ioInitThreads();\n#else\n  initTimers();\n#endif\n  aioInit();\n  dpy->winInit();\n# ifndef ROAR_VM\n  imgInit();\n# endif // !ROAR_VM\n  /* If running as a single instance and there are arguments after the image\n   * and any are files then try and drop these on the existing instance.\n   */\n  dpy->winOpen(runAsSingleInstance ? squeakArgCnt : 0, squeakArgVec);\n\n# ifndef ROAR_VM\n#if defined(HAVE_LIBDL) && !(STACKVM || COGVM)\n  if (useJit)\n    {\n      /* first try to find an internal dynamic compiler... */\n      void *handle= ioLoadModule(0);\n      void *comp= ioFindExternalFunctionIn(\"j_interpret\", handle);\n      /* ...and if that fails... */\n      if (comp == 0)\n\t{\n\t  /* ...try to find an external one */\n\t  handle= ioLoadModule(\"SqueakCompiler\");\n\t  if (handle != 0)\n\t    comp= ioFindExternalFunctionIn(\"j_interpret\", handle);\n\t}\n      if (comp)\n\t{\n\t  ((void (*)(void))comp)();\n\t  fprintf(stderr, \"handing control back to interpret() -- have a nice day\\n\");\n\t}\n      else\n\tprintf(\"could not find j_interpret\\n\");\n      exit(1);\n    }\n#endif /* defined(HAVE_LIBDL) && !(STACKVM || COGVM || defined(ROAR_VM)) */\n\n  if (installHandlers) {\n\tstruct sigaction sigusr1_handler_action, sigsegv_handler_action;\n\n\tsigsegv_handler_action.sa_sigaction = sigsegv;\n\tsigsegv_handler_action.sa_flags = SA_NODEFER | SA_SIGINFO;\n\tsigemptyset(&sigsegv_handler_action.sa_mask);\n    (void)sigaction(SIGSEGV, &sigsegv_handler_action, 0);\n\n\tsigusr1_handler_action.sa_sigaction = sigusr1;\n\tsigusr1_handler_action.sa_flags = SA_NODEFER | SA_SIGINFO;\n\tsigemptyset(&sigusr1_handler_action.sa_mask);\n    (void)sigaction(SIGUSR1, &sigusr1_handler_action, 0);\n  }\n\n#if defined(IMAGE_DUMP)\n  signal(SIGHUP,  sighup);\n  signal(SIGQUIT, sigquit);\n#endif\n\n  /* run Squeak */\n  if (runInterpreter)\n    interpret();\n\n  /* we need these, even if not referenced from main executable */\n  (void)sq2uxPath;\n  (void)ux2sqPath;\n  sqDebugAnchor();\n\n# else\n\n  extern void sigint(int);\n  signal(SIGINT, sigint);\n\n# endif // !ROAR_VM\n\n  return 0;\n}\n\nint ioExit(void) { return ioExitWithErrorCode(0); }\n\nsqInt\nioExitWithErrorCode(int ec)\n{\n  if (dpy != NULL)\n    dpy->winExit();\n\n# ifdef ROAR_VM\n  rvm_exit(); // xxx_dmu\n# endif // ROAR_VM\n\n  exit(ec);\n  return ec;\n}\n\n#if defined(DARWIN)\n# include \"mac-alias.c\"\n#endif\n\n\n/* Copy aFilenameString to aCharBuffer and optionally resolveAlias (or\n   symbolic link) to the real path of the target.  Answer 0 if\n   successful of -1 to indicate an error.  Assume aCharBuffer is at\n   least PATH_MAX bytes long.  Note that MAXSYMLINKS is a lower bound\n   on the (potentially unlimited) number of symlinks allowed in a\n   path, but calling sysconf() seems like overkill. */\n\nsqInt sqGetFilenameFromString(char *aCharBuffer, char *aFilenameString, sqInt filenameLength, sqInt resolveAlias)\n{\n  int numLinks= 0;\n  struct stat st;\n\n  memcpy(aCharBuffer, aFilenameString, filenameLength);\n  aCharBuffer[filenameLength]= 0;\n\n  if (resolveAlias)\n    for (;;)\t/* aCharBuffer might refer to link or alias */\n      {\n\tif (!lstat(aCharBuffer, &st) && S_ISLNK(st.st_mode))\t/* symlink */\n\t  { char linkbuf[PATH_MAX+1];\n\t    if (++numLinks > MAXSYMLINKS)\n\t      return -1;\t/* too many levels of indirection */\n\n\t    filenameLength= readlink(aCharBuffer, linkbuf, PATH_MAX);\n\t    if ((filenameLength < 0) || (filenameLength >= PATH_MAX))\n\t      return -1;\t/* link unavailable or path too long */\n\n\t    linkbuf[filenameLength]= 0;\n\n\t    if (filenameLength > 0 && *linkbuf == '/') /* absolute */\n\t      strcpy(aCharBuffer, linkbuf);\n\t    else {\n\t      char *lastSeparator = strrchr(aCharBuffer,'/');\n\t      char *append = lastSeparator ? lastSeparator + 1 : aCharBuffer;\n\t      if (append - aCharBuffer + strlen(linkbuf) > PATH_MAX)\n\t\treturn -1; /* path too long */\n\t      strcpy(append,linkbuf);\n\t    }\n\n\t    continue;\n\t  }\n\n#    if defined(DARWIN)\n\tif (isMacAlias(aCharBuffer))\n\t  {\n\t    if ((++numLinks > MAXSYMLINKS) || !resolveMacAlias(aCharBuffer, aCharBuffer, PATH_MAX))\n\t      return -1;\t\t/* too many levels or bad alias */\n\t    continue;\n\t  }\n#    endif\n\n\tbreak;\t\t\t/* target is no longer a symlink or alias */\n      }\n\n  return 0;\n}\n\n\nsqInt ioGatherEntropy(char *buffer, sqInt bufSize)\n{\n  int fd, count= 0;\n\n  if ((fd= open(\"/dev/urandom\", O_RDONLY)) < 0)\n    return 0;\n\n  while (count < bufSize)\n    {\n      int n;\n      if ((n= read(fd, buffer + count, bufSize)) < 1)\n\tbreak;\n      count += n;\n    }\n\n  close(fd);\n\n  return count == bufSize;\n}\n\n\n#if COGVM\n/*\n * Support code for Cog.\n * a) Answer whether the C frame pointer is in use, for capture of the C stack\n *    pointers.\n */\n# if defined(i386) || defined(__i386) || defined(__i386__)\n/*\n * Cog has already captured CStackPointer  before calling this routine.  Record\n * the original value, capture the pointers again and determine if CFramePointer\n * lies between the two stack pointers and hence is likely in use.  This is\n * necessary since optimizing C compilers for x86 may use %ebp as a general-\n * purpose register, in which case it must not be captured.\n */\nint\nisCFramePointerInUse()\n{\n\textern unsigned long CStackPointer, CFramePointer;\n\textern void (*ceCaptureCStackPointers)(void);\n\tunsigned long currentCSP = CStackPointer;\n\n\tcurrentCSP = CStackPointer;\n\tceCaptureCStackPointers();\n\tassert(CStackPointer < currentCSP);\n\treturn CFramePointer >= CStackPointer && CFramePointer <= currentCSP;\n}\n# endif /* defined(i386) || defined(__i386) || defined(__i386__) */\n#endif /* COGVM */\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/sqUnixMain.h",
    "content": "#ifndef __sqUnixMain_h\n#define __sqUnixMain_h\n\nextern char   imageName[];\nextern char   shortImageName[];\nextern int    inputEventSemaIndex;\nextern char   vmPath[];\nextern char **argVec;\n\nextern int    fullScreenFlag;\nextern int    textEncodingUTF8;\n\nextern void   imgInit(void);\n\n#define\tEventTypeUpdate\t100\n\n#endif /* __sqUnixMain_h */\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/sqUnixMemory.c",
    "content": "/* sqUnixMemory.c -- dynamic memory management\n * \n * Author: Ian.Piumarta@squeakland.org\n * \n *   Copyright (C) 1996-2005 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n */\n\n/* Note:\n * \n *   The code allows memory to be overallocated; i.e., the initial\n *   block is reserved via mmap() and then the unused portion\n *   munmap()ped from the top end.  This is INHERENTLY DANGEROUS since\n *   malloc() may randomly map new memory in the block we \"reserved\"\n *   and subsequently unmap()ped.  Enabling this causes crashes in\n *   Croquet, which makes heavy use of the FFI and thus calls malloc()\n *   all over the place.\n *   \n *   For this reason, overallocateMemory is DISABLED by default.\n *   \n *   The upshot of all this is that Squeak will claim (and hold on to)\n *   ALL of the available virtual memory (or at least 75% of it) when\n *   it starts up.  If you can't live with that, use the -memory\n *   option to allocate a fixed size heap.\n */\n\n\n#include \"sq.h\"\n#include \"sqMemoryAccess.h\"\n#include \"config.h\"\n#include \"debug.h\"\n\n#if defined(HAVE_MMAP)\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <unistd.h>\n#include <sys/types.h>\n#include <sys/mman.h>\n#include <fcntl.h>\n\n#if !defined(MAP_ANON)\n# if defined(MAP_ANONYMOUS)\n#   define MAP_ANON MAP_ANONYMOUS\n# else\n#   define MAP_ANON 0\n# endif\n#endif\n\n#define MAP_PROT\t(PROT_READ | PROT_WRITE)\n#define MAP_FLAGS\t(MAP_ANON | MAP_PRIVATE)\n\nextern int useMmap;\n/* Since Cog needs to make memory executable via mprotect, and since mprotect\n * only works on mmapped memory we must always use mmap in Cog.\n */\n#if COGVM\n# define ALWAYS_USE_MMAP 1\n#endif\n\nvoid *uxAllocateMemory(sqInt minHeapSize, sqInt desiredHeapSize);\nchar *uxGrowMemoryBy(char *oldLimit, sqInt delta);\nchar *uxShrinkMemoryBy(char *oldLimit, sqInt delta);\nsqInt uxMemoryExtraBytesLeft(sqInt includingSwap);\n\n#if defined(SQ_IMAGE32) && defined(SQ_HOST64)\nchar *sqMemoryBase= (char *)-1;\n#endif\n\n/*xxx THESE SHOULD BE COMMAND-LINE/ENVIRONMENT OPTIONS */\nint overallocateMemory\t= 0;\t/* see notes above */\n\nstatic int   devZero\t= -1;\nstatic char *heap\t=  0;\nstatic int   heapSize\t=  0;\nstatic int   heapLimit\t=  0;\n\nstatic int\t    pageSize = 0;\nstatic unsigned int pageMask = 0;\n\n#define valign(x)\t((x) & pageMask)\n\nstatic int min(int x, int y) { return (x < y) ? x : y; }\nstatic int max(int x, int y) { return (x > y) ? x : y; }\n\n\n/* answer the address of (minHeapSize <= N <= desiredHeapSize) bytes of memory. */\n\nvoid *uxAllocateMemory(sqInt minHeapSize, sqInt desiredHeapSize)\n{\n#if !ALWAYS_USE_MMAP\n  if (!useMmap)\n    return malloc(desiredHeapSize);\n#endif\n\n  if (heap)\n    {\n      fprintf(stderr, \"uxAllocateMemory: already called\\n\");\n      exit(1);\n    }\n  pageSize= getpagesize();\n  pageMask= ~(pageSize - 1);\n\n  DPRINTF((\"uxAllocateMemory: pageSize 0x%x (%d), mask 0x%x\\n\", pageSize, pageSize, pageMask));\n\n#if (!MAP_ANON)\n  if ((devZero= open(\"/dev/zero\", O_RDWR)) < 0)\n    {\n      perror(\"uxAllocateMemory: /dev/zero\");\n      return 0;\n    }\n#endif\n\n  DPRINTF((\"uxAllocateMemory: /dev/zero descriptor %d\\n\", devZero));\n  DPRINTF((\"uxAllocateMemory: min heap %d, desired %d\\n\", minHeapSize, desiredHeapSize));\n\n  heapLimit= valign(max(desiredHeapSize, useMmap));\n\n  while ((!heap) && (heapLimit >= minHeapSize))\n    {\n      DPRINTF((\"uxAllocateMemory: mapping 0x%08x bytes (%d Mbytes)\\n\", heapLimit, heapLimit >> 20));\n      if (MAP_FAILED == (heap= mmap(0, heapLimit, MAP_PROT, MAP_FLAGS, devZero, 0)))\n\t{\n\t  heap= 0;\n\t  heapLimit= valign(heapLimit / 4 * 3);\n\t}\n    }\n\n  if (!heap)\n    {\n      fprintf(stderr, \"uxAllocateMemory: failed to allocate at least %lld bytes)\\n\", (long long)minHeapSize);\n      useMmap= 0;\n      return malloc(desiredHeapSize);\n    }\n\n  heapSize= heapLimit;\n\n  if (overallocateMemory)\n    uxShrinkMemoryBy(heap + heapLimit, heapLimit - desiredHeapSize);\n\n  return heap;\n}\n\n\nstatic int log_mem_delta = 0;\n#define MDPRINTF(foo) if (log_mem_delta) DPRINTF(foo); else 0\n\n/* grow the heap by delta bytes.  answer the new end of memory. */\n\nchar *uxGrowMemoryBy(char *oldLimit, sqInt delta)\n{\n  if (useMmap)\n    {\n      int newSize=  min(valign(oldLimit - heap + delta), heapLimit);\n      int newDelta= newSize - heapSize;\n      MDPRINTF((\"uxGrowMemory: %p By: %d(%d) (%d -> %d)\\n\", oldLimit, newDelta, delta, heapSize, newSize));\n      assert(0 == (newDelta & ~pageMask));\n      assert(0 == (newSize  & ~pageMask));\n      assert(newDelta >= 0);\n      if (newDelta)\n\t{\n\t  MDPRINTF((\"was: %p %p %p = 0x%x (%d) bytes\\n\", heap, heap + heapSize, heap + heapLimit, heapSize, heapSize));\n\t  if (overallocateMemory)\n\t    {\n\t      char *base= heap + heapSize;\n\t      MDPRINTF((\"remap: %p + 0x%x (%d)\\n\", base, newDelta, newDelta));\n\t      if (MAP_FAILED == mmap(base, newDelta, MAP_PROT, MAP_FLAGS | MAP_FIXED, devZero, heapSize))\n\t\t{\n\t\t  perror(\"mmap\");\n\t\t  return oldLimit;\n\t\t}\n\t    }\n\t  heapSize += newDelta;\n\t  MDPRINTF((\"now: %p %p %p = 0x%x (%d) bytes\\n\", heap, heap + heapSize, heap + heapLimit, heapSize, heapSize));\n\t  assert(0 == (heapSize  & ~pageMask));\n\t}\n      return heap + heapSize;\n    }\n  return oldLimit;\n}\n\n\n/* shrink the heap by delta bytes.  answer the new end of memory. */\n\nchar *uxShrinkMemoryBy(char *oldLimit, sqInt delta)\n{\n  if (useMmap)\n    {\n      int newSize=  max(0, valign((char *)oldLimit - heap - delta));\n      int newDelta= heapSize - newSize;\n      MDPRINTF((\"uxGrowMemory: %p By: %d(%d) (%d -> %d)\\n\", oldLimit, newDelta, delta, heapSize, newSize));\n      assert(0 == (newDelta & ~pageMask));\n      assert(0 == (newSize  & ~pageMask));\n      assert(newDelta >= 0);\n      if (newDelta)\n\t{\n\t  MDPRINTF((\"was: %p %p %p = 0x%x (%d) bytes\\n\", heap, heap + heapSize, heap + heapLimit, heapSize, heapSize));\n\t  if (overallocateMemory)\n\t    {\n\t      char *base= heap + heapSize - newDelta;\n\t      MDPRINTF((\"unmap: %p + 0x%x (%d)\\n\", base, newDelta, newDelta));\n\t      if (munmap(base, newDelta) < 0)\n\t\t{\n\t\t  perror(\"unmap\");\n\t\t  return oldLimit;\n\t\t}\n\t    }\n\t  heapSize -= newDelta;\n\t  MDPRINTF((\"now: %p %p %p = 0x%x (%d) bytes\\n\", heap, heap + heapSize, heap + heapLimit, heapSize, heapSize));\n\t  assert(0 == (heapSize  & ~pageMask));\n\t}\n      return heap + heapSize;\n    }\n  return oldLimit;\n}\n\n\n/* answer the number of bytes available for growing the heap. */\n\nsqInt uxMemoryExtraBytesLeft(sqInt includingSwap)\n{\n  return useMmap ? (heapLimit - heapSize) : 0;\n}\n\n\n#else  /* !HAVE_MMAP */\n\nvoid *uxAllocateMemory(sqInt minHeapSize, sqInt desiredHeapSize)\t{ return malloc(desiredHeapSize); }\nchar *uxGrowMemoryBy(char * oldLimit, sqInt delta)\t\t\t{ return oldLimit; }\nchar *uxShrinkMemoryBy(char *oldLimit, sqInt delta)\t\t\t{ return oldLimit; }\nsqInt uxMemoryExtraBytesLeft(sqInt includingSwap)\t\t\t{ return 0; }\n\n#endif\n\n\n\n#if defined(SQ_IMAGE32) && defined(SQ_HOST64)\n\nsqInt sqAllocateMemory(sqInt minHeapSize, sqInt desiredHeapSize)\n{\n  sqMemoryBase= uxAllocateMemory(minHeapSize, desiredHeapSize);\n  if (!sqMemoryBase) return 0;\n  sqMemoryBase -= SQ_FAKE_MEMORY_OFFSET;\n  return (sqInt)SQ_FAKE_MEMORY_OFFSET;\n}\n\nsqInt sqGrowMemoryBy(sqInt oldLimit, sqInt delta)\n{\n  return oopForPointer(uxGrowMemoryBy(pointerForOop(oldLimit), delta));\n}\n\nsqInt sqShrinkMemoryBy(sqInt oldLimit, sqInt delta)\n{\n  return oopForPointer(uxShrinkMemoryBy(pointerForOop(oldLimit), delta));\n}\n\nsqInt sqMemoryExtraBytesLeft(sqInt includingSwap)\n{\n  return uxMemoryExtraBytesLeft(includingSwap);\n}\n\n#else\n\nsqInt sqAllocateMemory(sqInt minHeapSize, sqInt desiredHeapSize)\t{ return (sqInt)(long)uxAllocateMemory(minHeapSize, desiredHeapSize); }\nsqInt sqGrowMemoryBy(sqInt oldLimit, sqInt delta)\t\t\t{ return (sqInt)(long)uxGrowMemoryBy((char *)(long)oldLimit, delta); }\nsqInt sqShrinkMemoryBy(sqInt oldLimit, sqInt delta)\t\t\t{ return (sqInt)(long)uxShrinkMemoryBy((char *)(long)oldLimit, delta); }\nsqInt sqMemoryExtraBytesLeft(sqInt includingSwap)\t\t\t{ return uxMemoryExtraBytesLeft(includingSwap); }\n\n#endif\n\n#if COGVM\n# define roundDownToPageBoundary(v) ((v)&pageMask)\n# define roundUpToPageBoundary(v) (((v)+pageSize-1)&pageMask)\nvoid\nsqMakeMemoryExecutableFromTo(unsigned long startAddr, unsigned long endAddr)\n{\n\tunsigned long firstPage = roundDownToPageBoundary(startAddr);\n\tif (mprotect((void *)firstPage,\n\t\t\t\t roundUpToPageBoundary(endAddr - firstPage),\n\t\t\t\t PROT_READ | PROT_WRITE | PROT_EXEC) < 0)\n\t\tperror(\"mprotect(x,y,PROT_READ | PROT_WRITE | PROT_EXEC)\");\n}\n\nvoid\nsqMakeMemoryNotExecutableFromTo(unsigned long startAddr, unsigned long endAddr)\n{\n\tunsigned long firstPage = roundDownToPageBoundary(startAddr);\n\tif (mprotect((void *)firstPage,\n\t\t\t\t roundUpToPageBoundary(endAddr - firstPage),\n\t\t\t\t PROT_READ | PROT_WRITE) < 0)\n\t\tperror(\"mprotect(x,y,PROT_READ | PROT_WRITE)\");\n}\n#endif /* COGVM */\n\n\n#if defined(TEST_MEMORY)\n\n#define MBytes\t*1024*1024\n\nint main()\n{\n  char *mem= sqAllocateMemory(4 MBytes, 40 MBytes);\n  printf(\"memory allocated at %p\\n\", mem);\n  sqShrinkMemoryBy((int)heap + heapSize, 5 MBytes);\n  sqGrowMemoryBy((int)heap + heapSize, 1 MBytes);\n  sqGrowMemoryBy((int)heap + heapSize, 1 MBytes);\n  sqGrowMemoryBy((int)heap + heapSize, 1 MBytes);\n  sqGrowMemoryBy((int)heap + heapSize, 100 MBytes);\n  sqShrinkMemoryBy((int)heap + heapSize, 105 MBytes);\n  return 0;\n}\n\n#endif /* defined(TEST_MEMORY) */\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/sqUnixThreads.c",
    "content": "/****************************************************************************\n*   PROJECT: Unix (pthreads) thread support code for Stack & Cog VM\n*   FILE:    sqUnixThreads.c\n*   CONTENT: \n*\n*   AUTHOR:  Eliot Miranda\n*   ADDRESS: \n*   EMAIL:   eliot@teleplace.com\n*   RCSID:   $Id$\n*\n*   NOTES: See the comment of CogThreadManager in the VMMaker package for\n*          overall design documentation.\n*\n*****************************************************************************/\n\n#define ForCOGMTVMImplementation 1\n\n#include \"sq.h\"\n\n#if COGMTVM\n\n#include <unistd.h>\t\t\t/* for ioNumProcesors */\n#include <sys/types.h>\t\t/* for ioNumProcesors */\n#include <sys/sysctl.h>\t\t/* for ioNumProcesors */\n#include <errno.h>\n#include <pthread.h>\n\nint\nioNewOSThread(void (*func)(void *), void *arg)\n{\n\tpthread_t newThread;\n\tint err;\n\n\tif ((err = pthread_create(\n\t\t\t\t&newThread,\t\t\t\t/* pthread_t *new_thread_ID */ \n\t\t\t\t0,\t\t\t\t\t\t/* const pthread_attr_t *attr */\n\t\t\t\t(void *(*)(void *))func,/* void * (*thread_execp)(void *) */\n\t\t\t\t(void *)arg\t\t\t\t/* void *arg */))) {\n\t\tperror(\"pthread_create\");\n\t\treturn err;\n\t}\n\treturn 0;\n}\n\nvoid\nioExitOSThread(pthread_t thread)\n{\n\tif (thread == pthread_self())\n\t\tpthread_exit(0);\n\terror(\"not yet implemented\");\n}\n\nint\nioNewOSSemaphore(sqOSSemaphore *sem)\n{\n\tint err;\n\n\tsem->count = 0;\n\treturn (err = pthread_cond_init(&sem->cond,0))\n\t\t|| (err = pthread_mutex_init(&sem->mutex,0))\n\t\t? err\n\t\t: 0;\n}\n\n#define DEBUG 1\n#if DEBUG\n# include \"sqAtomicOps.h\"\nint thrlogidx = 0;\nchar *thrlog[THRLOGSZ];\n\nvoid\ndumpThreadLog()\n{\n\tint f = thrlogidx,\t\t\t\t/* first used entry if non-null */\n\t\tl = (f-1) & (THRLOGSZ-1),\t/* last used entry */\n\t\ts = thrlog[f] ? f : 0;\t\t/* start */\n\n\tif (!thrlog[s])\n\t\treturn;\n\n\tdo {\n\t\tprintf(thrlog[s]);\n\t\tif (s == l) break;\n\t\ts = (s + 1) & (THRLOGSZ-1);\n\t}\n\twhile (1);\n}\n\nextern pthread_key_t tltiIndex;\n#endif\nvoid\nioSignalOSSemaphore(sqOSSemaphore *sem)\n{\n#if DEBUG\n\tint tid = ioGetThreadLocalThreadIndex();\n\tint err;\n\n\tif ((err = pthread_mutex_lock(&sem->mutex)))\n\t\tTHRLOG(\"%d !! SIGN pthread_mutex_lock 0x%p => %d\\n\", tid, sem, err);\n\tif (++sem->count <= 0) {\n\t\tTHRLOG(\"%d pthread_cond_signal 0x%x\\n\", tid, sem);\n\t\terr = pthread_cond_signal(&sem->cond);\n\t\tTHRLOG(\"%d pthread_cond_signal 0x%x => %d\\n\", tid, sem, err);\n\t}\n\telse\n\t\tTHRLOG(\"%d ioSig 0x%x ++count = %d\\n\", tid, sem, sem->count);\n\tif ((err = pthread_mutex_unlock(&sem->mutex)))\n\t\tTHRLOG(\"%d !!pthread_mutex_unlock 0x%p => %d\\n\", tid, sem, err);\n#else\n\t(void)pthread_mutex_lock(&sem->mutex);\n\tif (++sem->count <= 0)\n\t\t(void)pthread_cond_signal(&sem->cond);\n\t(void)pthread_mutex_unlock(&sem->mutex);\n#endif\n}\n\nvoid\nioWaitOnOSSemaphore(sqOSSemaphore *sem)\n{\n#if DEBUG\n\tint tid = ioGetThreadLocalThreadIndex();\n\tint err;\n\n\tif ((err = pthread_mutex_lock(&sem->mutex)))\n\t\tTHRLOG(\"%d !! WAIT pthread_mutex_lock 0x%p => %d\\n\", tid, sem, err);\n\tif (--sem->count < 0) {\n\t\tTHRLOG(\"%d pthread_cond_wait 0x%x\\n\", tid, sem);\n\t\terr = pthread_cond_wait(&sem->cond, &sem->mutex);\n\t\tTHRLOG(\"%d proceeding 0x%x (pcw err %d)\\n\", tid, sem, err);\n\t}\n\telse\n\t\tTHRLOG(\"%d ioWait 0x%x --count = %d\\n\", tid, sem, sem->count);\n\tif ((err = pthread_mutex_unlock(&sem->mutex)))\n\t\tTHRLOG(\"%d !! WAIT pthread_mutex_unlock 0x%p => %d\\n\", tid, sem, err);\n#else\n\t(void)pthread_mutex_lock(&sem->mutex);\n\tif (--sem->count < 0)\n\t\t(void)pthread_cond_wait(&sem->cond, &sem->mutex);\n\t(void)pthread_mutex_unlock(&sem->mutex);\n#endif\n}\n\n\npthread_key_t tltiIndex; /* clients see this as a const read-only export */\n\nstatic void\ninitThreadLocalThreadIndices(void)\n{\n\tint err = pthread_key_create(&tltiIndex,0);\n\tif (err)\n\t\terror(\"pthread_key_create\");\n}\n\n/*\n * ioGetThreadLocalThreadIndex & ioSetThreadLocalThreadIndex are defined in\n * sqPlatformSpecific.h.\n */\n\n/* ioOSThreadIsAlive is defined in sqPlatformSpecific.h.\n */\n\nint\nioNumProcessors(void)\n{\n# if defined(CTL_HW) && defined(HW_AVAILCPU)\n\tint count;\n\tsize_t size = sizeof(count);\n\tint hw_availproc[2];\n\n\thw_availproc[0] = CTL_HW;\n\thw_availproc[1] = HW_AVAILCPU;\n\n\treturn sysctl(hw_availproc, 2, &count, &size, 0, 0)\n\t\t\t? 1\n\t\t\t: count;\n# elif defined(_SC_NPROCESSORS_ONLN)\n\tint count;\n\n\treturn (count = sysconf(_SC_NPROCESSORS_ONLN)) == -1\n\t\t\t? 1\n\t\t\t: count;\n# else\n\textern void warning(char *);\n\twarning(\"could not determine number of processors; assuming 1\");\n\treturn 1;\n# endif\n}\n#else /* COGMTVM */\n/* This is for sqVirtualMachine.h's default ownVM implementation. */\nsqInt\namInVMThread() { return ioOSThreadsEqual(ioCurrentOSThread(),getVMOSThread()); }\n#endif /* COGMTVM */\n\nvoid\nioInitThreads()\n{\n\textern void ioInitExternalSemaphores(void);\n#if !COGMTVM\n\t/* Set the current VM thread.  If the main thread isn't the VM thread then\n\t * when that thread is spawned it can reassign ioVMThread.\n\t */\n\tioVMThread = ioCurrentOSThread();\n#endif\n#if COGMTVM\n\tinitThreadLocalThreadIndices();\n#endif\n\tioInitExternalSemaphores();\n}\n\n/* this for testing crash dumps */\nstatic sqInt\nindirect(long p)\n{\n\treturn p > 99\n\t\t? indirect(p - 100), indirect(p - 50) /* evade tail recursion opt */\n\t\t: *(sqInt *)p;\n}\n\nsqInt\ncrashInThisOrAnotherThread(sqInt inThisThread)\n{\n\tif (inThisThread)\n\t\treturn indirect(0);\n\telse {\n\t\tpthread_t newThread;\n\n\t\t(void)pthread_create(\n\t\t\t\t&newThread,\t\t\t\t\t/* pthread_t *new_thread_ID */ \n\t\t\t\t0,\t\t\t\t\t\t\t/* const pthread_attr_t *attr */\n\t\t\t\t(void *(*)(void *))indirect,/* void * (*thread_execp)(void *) */\n\t\t\t\t(void *)300\t\t\t\t\t/* void *arg */);\n\t\tsleep(1);\n\t}\n\treturn 0;\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/sqUnixVMProfile.c",
    "content": "/****************************************************************************\n*   PROJECT: Unix (pthread/nanosleep/sigaction/SIGPROF) profiling logic for\n*\t\t\t statistical profiling of the VM\n*   FILE:    sqUnixVMProfile.c\n*   CONTENT: \n*\n*   AUTHOR:  Eliot Miranda\n*   ADDRESS: \n*   EMAIL:   eliot@qwaq.com\n*   RCSID:   $Id$\n*\n*   NOTES: \n*  August 5th, 2008, EEM wrote pc sampling code\n*\n*****************************************************************************/\n \n#if NO_VM_PROFILE\n#include \"sq.h\"\n\nvoid \nioNewProfileStatus(sqInt *running, long *buffersize)\n{\n\tif (running)\n\t\t*running = 0;\n\tif (buffersize)\n\t\t*buffersize = 0;\n}\n\nlong\nioNewProfileSamplesInto(void *sampleBuffer)\n{\n\treturn 0;\n}\n\nlong\nioControlNewProfile(int on, unsigned long buffer_size)\n{\n\treturn 0;\n}\n\nvoid\nioClearProfile(void)\n{\n}\n#else /* NO_VM_PROFILE */\n#include <pthread.h>\n#if __linux__\n# if !defined(__USE_GNU)\n#\tdefine UNDEF__USE_GNU 1\n# endif\n# define __USE_GNU /* to get register defines in sys/ucontext.h */\n#endif\n#include <sys/ucontext.h>\n#if  __linux__ && UNDEF__USE_GNU\n# undef __USE_GNU\n#endif\n#include <signal.h>\n#include <sys/time.h>\n#if __APPLE__ && __MACH__ /* Mac OS X */\n# include <mach-o/getsect.h>\nextern unsigned long _start;\n#elif defined(__linux__)\nextern unsigned long _start;\nextern unsigned long _etext;\n#endif\n\n#include <errno.h>\n\n#include \"sq.h\"\n\n#define HISTOGRAM 1\n#define PCBUFFER 2\n\n#define SCHEME PCBUFFER\n\n/*\n * There are two schemes here.  HISTOGRAM is a pair of histograms, one for\n * the VM and one for the entire address space.  The EAS histogram necessarily\n * has poor resolution. PCBUFFER, the other scheme is an event buffer into which\n * are written pcs.  The image then builds up the histogram from the samples.\n * 8 meg of buffer is 23 minutes of 32-bit pc samples at 1.5KHz, so one gets\n * much better resolution throughout the adress space using less memory with\n * the buffer technique.\n */\n\ntypedef unsigned long pctype;\n\nstatic void\nbail_out(int err, char *err_string)\n{\n\terrno = err;\n\tperror(err_string);\n\texit(1);\n}\n\ntypedef enum { dead, nascent, quiescent, active } machine_state;\nmachine_state profileState = dead,\n\t\t\t  nextState = dead;\n\n#define PROFILE_USECS 666 /* chosen to be out of phase with the delay resolution of 1000 */\nstatic volatile struct timespec proftime = { 0, PROFILE_USECS * 1000};\n\nstatic int\t\t\t\t\tprofThreadPolicy;\nstatic struct sched_param\tprofThreadPriority;\nstatic pthread_t mainThread;\n\nstatic void *\nprofileStateMachine(void *ignored)\n{\n\tint er;\n\tif ((er = pthread_setschedparam(pthread_self(),\n\t\t\t\t\t\t\t\t\tprofThreadPolicy,\n\t\t\t\t\t\t\t\t\t&profThreadPriority)))\n\t\tbail_out(er,\"pthread_getschedparam failed\");\n\n\tprofileState = quiescent;\n\twhile (profileState != dead) {\n\t\tstruct timespec naptime;\n\t\tnaptime = proftime;\n\t\twhile (nanosleep(&naptime, &naptime) == -1) /* repeat */;\n\t\tif (profileState == active)\n\t\t\tpthread_kill(mainThread, SIGPROF);\n\t\tprofileState = nextState;\n\t}\n\treturn 0;\n}\n\nstatic void\nsetState(machine_state desiredState)\n{\n\tstruct timespec halfAMo;\n\n\tif (profileState == desiredState)\n\t\treturn;\n\tnextState = desiredState;\n\thalfAMo.tv_sec  = 0;\n\thalfAMo.tv_nsec = 1000 * 100;\n\twhile (profileState != desiredState)\n\t\tnanosleep(&halfAMo, 0);\n}\n\n#if SCHEME == HISTOGRAM\n/*\n * In this scheme we have to determine the range of the VM so we can have a\n * high-resolution histogram for the VM and a low resolution one for the\n * entire address space.\n */\nstatic pctype first_vm_pc;\nstatic pctype limit_vm_pc;\n\nstatic void\nioProfileTextRange(void **startpc, void **endpc)\n{\n#if __APPLE__ && __MACH__ /* Mac OS X */\n\t/* _start disagrees with the _mh_execute_header's addr.  Use addr to match\n\t * QVMProfileMacSupportPlugin.c's primitiveExecutableModulesAndOffsets\n\t */\n# if 0\n\t*startpc = &_start;\n# else\n\t*startpc = getsectbyname(SEG_TEXT,SECT_TEXT)->addr;\n# endif\n\t*endpc   = (void *)get_etext();\n#elif defined(__linux__)\n\t*startpc = &_start;\n\t*endpc   = &_etext;\n#else\n# error obtaining the start and end of the text segment is not implemented on this OS\n#endif\n}\n\n\n/*\n * We can get 16k resolution of the entire address space for 1Meg of profile.\n * Each bin is 4 bytes on 32-bit machines, so\n *\t(2 raisedTo: 32 - (16384 log: 2) asInteger) * 4 1048576\n */\n#define EAS_SCALE 14 /* (16384 log: 2) asInteger */\n#define EAS_BYTES (sizeof(*eas_bins) * (1 << (32 - EAS_SCALE)))\nstatic pctype *eas_bins; /* eas = entire address space */\nstatic pctype *vm_bins;\n#define VM_BYTES(firstpc,limitpc) (sizeof(*vm_bins) * ((limitpc) - (firstpc)))\n\nstatic void\nhistogramSIGPROFhandler(int sig, siginfo_t *info, ucontext_t *uap)\n{\n#if __APPLE__ && __MACH__ && __i386__\n\tpctype pc = uap->uc_mcontext->ss.eip;\n#elif __APPLE__ && __MACH__ && __ppc__\n\tpctype pc = uap->uc_mcontext->ss.srr0;\n#elif __linux__ && __i386__\n\tpctype pc = uap->uc_mcontext.gregs[REG_EIP];\n#else\n# error need to implement extracting pc from a ucontext_t on this system\n#endif\n\tif (pc >= first_vm_pc && pc < limit_vm_pc)\n\t\t++vm_bins[pc - first_vm_pc];\n\telse\n\t\t++eas_bins[pc >> EAS_SCALE];\n}\n\n\nstatic void\ninitProfile(void)\n{\n\tint er;\n\tstruct sigaction sigprof_handler_action;\n\tpthread_t careLess;\n\n\tioProfileTextRange((void **)&first_vm_pc, (void **)&limit_vm_pc);\n\tvm_bins = malloc(VM_BYTES(first_vm_pc,limit_vm_pc));\n\teas_bins = malloc(EAS_BYTES);\n\n\tsigprof_handler_action.sa_sigaction = histogramSIGPROFhandler;\n\tsigprof_handler_action.sa_flags = SA_NODEFER | SA_SIGINFO;\n\tsigemptyset(&sigprof_handler_action.sa_mask);\n    (void)sigaction(SIGPROF, &sigprof_handler_action, 0);\n\n\tmainThread = pthread_self();\n\tif ((er = pthread_getschedparam(pthread_self(),\n\t\t\t\t\t\t\t\t\t&profThreadPolicy,\n\t\t\t\t\t\t\t\t\t&profThreadPriority)))\n\t\tbail_out(er,\"pthread_getschedparam failed\");\n\t/* add 2 to priority to be above poll heartbeat thread, which we\n\t * want to profile.\n\t */\n\tprofThreadPriority.sched_priority += 2;\n\tprofileState = nascent;\n\tif ((er= pthread_create(&careLess,\n\t\t\t\t\t\t\t(const pthread_attr_t *)0,\n\t\t\t\t\t\t\tprofileStateMachine,\n\t\t\t\t\t\t\t(void *)0)))\n\t\tbail_out(er,\"profile thread creation failed\");\n\tsetState(quiescent);\n}\n\nvoid\nioControlProfile(int on,\n\t\t\t\t void **vmHistogramPtr, long *vmHistogramBins,\n\t\t\t\t void **easHistogramPtr, long *easHistogramBins)\n{\n\tioProfileStatus(0, 0, 0,\n\t\t\t\t\tvmHistogramPtr, vmHistogramBins,\n\t\t\t\t\teasHistogramPtr, easHistogramBins);\n    setState(on ? active : quiescent);\n}\n\nvoid \nioProfileStatus(sqInt *running, void **exestartpc, void **exelimitpc,\n\t\t\t\tvoid **vmHistogramPtr, long *vmHistogramBins,\n\t\t\t\tvoid **easHistogramPtr, long *easHistogramBins)\n{\n\tif (!vm_bins)\n\t\tinitProfile();\n\tif (running)\n\t\t*running = profileState == active;\n\tif (exestartpc)\n\t\t*exestartpc = first_vm_pc;\n\tif (exelimitpc)\n\t\t*exelimitpc = limit_vm_pc;\n\tif (vmHistogramBins)\n\t\t*vmHistogramBins = VM_BYTES(first_vm_pc,limit_vm_pc) / sizeof(*vm_bins);\n\tif (vmHistogramPtr)\n\t\t*vmHistogramPtr = vm_bins;\n\tif (easHistogramBins)\n\t\t*easHistogramBins = EAS_BYTES / sizeof(*eas_bins);\n\tif (easHistogramPtr)\n\t\t*easHistogramPtr = eas_bins;\n}\n\nvoid\nioClearProfile(void)\n{\n\tif (vm_bins) {\n\t\tmemset(vm_bins, 0, VM_BYTES(first_vm_pc,limit_vm_pc));\n\t\tmemset(eas_bins, 0, EAS_BYTES);\n\t}\n}\n#elif SCHEME == PCBUFFER\n\n/*\n * Example of 2meg buffer (512k samples) gives nearly 6 minutes of profile.\n *\n * 2 * 1024 * 1024  = 512 * 1024 pcs (each pc 4 bytes)\n * Sampling frequency is 1000000 usecs / 666 usecs = 1501 Hz (1501 pcs / sec)\n * 512 * 1024 / 1501 = 349 seconds = 5.8 minutes\n */\n\nstatic pctype *pc_buffer;\nstatic long pc_buffer_index;\nstatic long pc_buffer_size;\nstatic long pc_buffer_wrapped;\n\nstatic void\npcbufferSIGPROFhandler(int sig, siginfo_t *info, ucontext_t *uap)\n{\n#if __DARWIN_UNIX03 && __APPLE__ && __MACH__ && __i386__\n\tpctype pc = uap->uc_mcontext->__ss.__eip;\n#elif __APPLE__ && __MACH__ && __i386__\n\tpctype pc = uap->uc_mcontext->ss.eip;\n#elif __APPLE__ && __MACH__ && __ppc__\n\tpctype pc = uap->uc_mcontext->ss.srr0;\n#elif __linux__ && __i386__\n\tpctype pc = uap->uc_mcontext.gregs[REG_EIP];\n#else\n# error need to implement extracting pc from a ucontext_t on this system\n#endif\n\tpc_buffer[pc_buffer_index] = pc;\n\tif (++pc_buffer_index >= pc_buffer_size) {\n\t\tpc_buffer_index = 0;\n\t\tpc_buffer_wrapped = 1;\n\t}\n}\n\n\nstatic void\ninitProfileThread()\n{\n\tint er;\n\tstruct sigaction sigprof_handler_action;\n\tpthread_t careLess;\n\n\tsigprof_handler_action.sa_sigaction = pcbufferSIGPROFhandler;\n\tsigprof_handler_action.sa_flags = SA_NODEFER | SA_SIGINFO;\n\tsigemptyset(&sigprof_handler_action.sa_mask);\n    (void)sigaction(SIGPROF, &sigprof_handler_action, 0);\n\n\tmainThread = pthread_self();\n\tif ((er = pthread_getschedparam(pthread_self(),\n\t\t\t\t\t\t\t\t\t&profThreadPolicy,\n\t\t\t\t\t\t\t\t\t&profThreadPriority)))\n\t\tbail_out(er,\"pthread_getschedparam failed\");\n\t/* add 2 to priority to be above poll heartbeat thread, which we\n\t * want to profile.\n\t */\n\tprofThreadPriority.sched_priority += 2;\n\tprofileState = nascent;\n\tif ((er= pthread_create(&careLess,\n\t\t\t\t\t\t\t(const pthread_attr_t *)0,\n\t\t\t\t\t\t\tprofileStateMachine,\n\t\t\t\t\t\t\t(void *)0)))\n\t\tbail_out(er,\"profile thread creation failed\");\n\tsetState(quiescent);\n}\n\nlong\nioControlNewProfile(int on, unsigned long buffer_size)\n{\n\tif (buffer_size\n\t && pc_buffer_size < buffer_size) {\n\t\tif (profileState == active)\n\t\t\tsetState(quiescent);\n\t\tif (pc_buffer)\n\t\t\tfree(pc_buffer);\n\t\tpc_buffer = malloc(buffer_size * sizeof(pctype));\n\t\tpc_buffer_index = 0;\n\t\tpc_buffer_size = buffer_size;\n\t\tpc_buffer_wrapped = 0;\n\t}\n\tif (profileState == dead)\n\t\tinitProfileThread();\n    setState(on ? active : quiescent);\n\treturn pc_buffer_wrapped ? pc_buffer_size : pc_buffer_index;\n}\n\nvoid \nioNewProfileStatus(sqInt *running, long *buffersize)\n{\n\tif (running)\n\t\t*running = profileState == active;\n\tif (buffersize)\n\t\t*buffersize = pc_buffer_size;\n}\n\nlong\nioNewProfileSamplesInto(void *sampleBuffer)\n{\n\tif (!pc_buffer_wrapped) {\n\t\tmemcpy(sampleBuffer,pc_buffer,pc_buffer_index * sizeof(pctype));\n\t\treturn pc_buffer_index;\n\t}\n\tmemcpy(sampleBuffer,\n\t\t   pc_buffer + pc_buffer_index,\n\t\t   (pc_buffer_size - pc_buffer_index) * sizeof(pctype));\n\tmemcpy((pctype *)sampleBuffer + pc_buffer_index,\n\t\t   pc_buffer,\n\t\t   pc_buffer_index * sizeof(pctype));\n\treturn pc_buffer_size;\n}\n\nvoid\nioClearProfile(void)\n{\n\tpc_buffer_index = pc_buffer_wrapped = 0;\n}\n#endif /* SCHEME == HISTOGRAM elif SCHEME == PCBUFFER */\n#endif /* NO_VM_PROFILE */\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/sqUnixWindow.h",
    "content": ""
  },
  {
    "path": "vm/src/from_squeak/unix/vm/sqaio.h",
    "content": "/* sqaio.h -- asynchronous file i/o\n *\n *   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n */\n\n/* author: ian.piumarta@inria.fr\n */\n\n#ifndef __sqaio_h\n#define __sqaio_h\n\n\n#define AIO_X\t(1<<0)\t/* handle for exceptions */\n#define AIO_R\t(1<<1)\t/* handle for read */\n#define AIO_W\t(1<<2)\t/* handle for write */\n#define AIO_SEQ\t(1<<3)\t/* call handlers sequentially  */\n#define AIO_EXT\t(1<<4)\t/* external fd -- don't close on aio shutdown  */\n\n#define AIO_RW\t(AIO_R | AIO_W)\n#define AIO_RX\t(AIO_R | AIO_X)\n#define AIO_WX\t(AIO_W | AIO_X)\n\n#define AIO_RWX\t(AIO_R | AIO_W | AIO_X)\n\nextern void aioInit(void);\nextern void aioFini(void);\n\n/* Initialise `fd' for handling by AIO.  `flags' can be 0 (aio takes\n * over the descriptor entirely and the application should not assume\n * anything about its subsequent behaviour) or AIO_EXT (aio will never\n * set NBIO on `fd' or close it on behalf of the client).\n */\nextern void aioEnable(int fd, void *clientData, int flags);\n\n/* Declare an interest in one or more events on `fd'.  `mask' can be\n * any combination in AIO_[R][W][X].  `handlerFn' will be called the\n * next time any event in `mask' arrives on `fd' and will receive\n * `fd', the original `clientData' (see aioEnable) and a `flag'\n * containing ONE of AIO_{R,W,X} indicating which event occurred.  In\n * the event that the same handler is set for multiple events (either\n * by setting more than one bit in `mask', or by calling aioHandle\n * several times with different `mask's) and several events arrive\n * simultaneously for the descriptor, then `handlerFn' is called\n * multiple times -- once for each event in `mask'.  The `handlerFn'\n * will NOT be called again for the same event until the client calls\n * aioHandle with an appropriate `mask' (the handled event is removed\n * implicitly from the current mask before calling `handlerFn') .\n * (Calls to aioHandle are cumulative: successive `mask's are ORed\n * with the mask currently in effect for `fd'.)\n */\ntypedef void (*aioHandler)(int fd, void *clientData, int flag);\nextern void aioHandle(int fd, aioHandler handlerFn, int mask);\n\n/* Suspend handling of the events in `mask' for `fd'.\n */\nextern void aioSuspend(int fd, int mask);\n\n/* Disable further AIO handling of `fd'.  The descriptor is reset to its\n * default state (w.r.t. NBIO, etc.) but is NOT closed.\n */\nextern void aioDisable(int fd);\n\n/* Sleep for at most `microSeconds'.  Any event(s) arriving for\n * handled fd(s) will terminate the sleep, with the appropriate\n * handler(s) being called before returning.\n */\nextern int aioPoll(int microSeconds);\n\n/* As above, but avoid sleeping in select() if microSeconds is small\n * (less than a timeslice).  Handlers are called, if neccessary, at\n * the start and end of the sleep.\n */\nextern int aioSleepForUsecs(int microSeconds);\n\n\n#endif /* __sqaio_h */\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm/sunos.h",
    "content": "/* It's a mystery to me why they even bothered with /usr/include on SunOS\n * \n *   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n */\n\n/* Author: Ian Piumarta\n */\n\n#ifndef __squeak__sunos_h\n#define __squeak__sunos_h\n\n/* stdio.h */\n\nextern int printf();\n\n#define SEEK_SET\t0\n#define SEEK_CUR\t1\n#define SEEK_END\t2\n\nextern int fread();\nextern int fclose();\nextern int fseek();\nextern int fprintf();\n\nextern int sscanf();\n\nextern int perror();\n\n/* stdlib.h */\n\nextern int strtol();\n\n/* unistd.h */\n\nextern int gethostname();\nextern int gettimeofday();\nextern int lstat();\nextern int realpath();\n\n/* string.h */\n\nextern int bzero();\n#include <memory.h>\n\n/* netdb.h */\n\nextern int h_errno;\n\n/* dlfcn.h */\n\n#define RTLD_NOW\t1\n\n/* time.h */\n\n#include <sys/param.h>\n\n#define CLK_TCK\t\tHZ\n\nextern int clock();\nextern int time();\n\n/* sys/types.h */\n\ntypedef int ssize_t;\n\n/* sys/time.h */\n\nextern int setitimer();\n\n/* sys/socket.h */\n\nextern int accept();\nextern int bind();\nextern int connect();\nextern int getsockname();\nextern int getpeername();\nextern int listen();\nextern int recvfrom();\nextern int select();\nextern int sendto();\nextern int setsockopt();\nextern int socket();\n\n/* sys/ioctl.h */\n\nextern int ioctl();\n\n#endif /* !__squeak__sunos_h */\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-Quartz/CPS.h",
    "content": "// CPS.h --  generously provided by Bob Ippolito (bob@redivi.com)\n\n#pragma once\n\n#include <Carbon/Carbon.h>\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#if PRAGMA_STRUCT_ALIGN\n    #pragma options align=mac68k\n#elif PRAGMA_STRUCT_PACKPUSH\n    #pragma pack(push, 2)\n#elif PRAGMA_STRUCT_PACK\n    #pragma pack(2)\n#endif\n\n\nstruct CPSProcessSerNum\n{\n\tUInt32\t\tlo;\n\tUInt32\t\thi;\n};\n\ntypedef struct CPSProcessSerNum\tCPSProcessSerNum;\n\nenum\n{\n\tkCPSNoProcess\t\t=\t0,\n\tkCPSSystemProcess\t=\t1,\n\tkCPSCurrentProcess\t=\t2\n};\n\n\nenum\n{\n\tbfCPSIntraProcessSwitch =\t1,\n\tbfCPSDeathBySignal\t=\t2\n};\n\ntypedef UInt16\tCPSEventFlags;\n\nenum\n{\n\tkCPSBlueApp\t=\t0,\n\tkCPSBlueBox\t=\t1,\n\tkCPSCarbonApp\t=\t2,\n\tkCPSYellowApp\t=\t3,\n\tkCPSUnknownApp\t=\t4\n};\n\ntypedef UInt32\tCPSAppFlavour;\n\n\nenum\n{\n\tkCPSBGOnlyAttr\t\t=\t1024,\n\tkCPSUIElementAttr\t=\t65536,\n\tkCPSHiddenAttr\t\t=\t131072,\n\tkCPSNoConnectAttr\t=\t262144,\n\tkCPSFullScreenAttr\t=\t524288,\n\tkCPSClassicReqAttr\t=\t1048576,\n\tkCPSNativeReqAttr\t=\t2097152\n};\n\ntypedef UInt32\tCPSProcAttributes;\n\nstruct CPSProcessInfoRec\n{\n\tCPSProcessSerNum \tParent;\n\tUInt64\t\t\tLaunchDate;\n\tCPSAppFlavour\t\tFlavour;\n\tCPSProcAttributes\tAttributes;\n\tUInt32\t\t\tExecFileType;\n\tUInt32\t\t\tExecFileCreator;\n\tUInt32\t\t\tUnixPID;\n};\n\ntypedef struct CPSProcessInfoRec\tCPSProcessInfoRec;\n\nenum\n{\n\tkCPSNotifyChildDeath\t=\t1,\n\tkCPSNotifyNewFront\t=\t2,\n\tkCPSNotifyAppBirth\t=\t4,\n\tkCPSNotifyAppDeath\t=\t8,\n\tkCPSNotifyLaunch\t=\t9,\n\tkCPSNotifyServiceReq\t=\t16,\n\tkCPSNotifyAppHidden\t=\t32,\n\tkCPSNotifyAppRevealed\t=\t64,\n\tkCPSNotifyFGEnabled\t=\t128,\n\tkCPSNotifyLaunchStart\t=\t256,\n\tkCPSNotifyAppReady\t=\t512,\n\tkCPSNotifyLaunchFail\t=\t1024,\n\tkCPSNotifyAppDeathExt\t=\t2048,\n\tkCPSNotifyLostKeyFocus\t=\t4096\n};\n\ntypedef UInt32\tCPSNotificationCodes;\n\nenum\n{\n\tbfCPSLaunchInhibitDaemon\t=\t128,\n\tbfCPSLaunchDontSwitch\t\t=\t512,\n\tbfCPSLaunchNoProcAttr\t\t=\t2048,\n\tbfCPSLaunchAsync\t\t=\t65536,\n\tbfCPSLaunchStartClassic\t\t=\t131072,\n\tbfCPSLaunchInClassic\t\t=\t262144,\n\tbfCPSLaunchInstance\t\t=\t524288,\n\tbfCPSLaunchAndHide\t\t=\t1048576,\n\tbfCPSLaunchAndHideOthers\t=\t2097152\n};\n\ntypedef UInt32\tCPSLaunchOptions;\ntypedef\tUInt8\t*CPSLaunchRefcon;\ntypedef\tUInt8\t*CPSLaunchData;\n\nenum\n{\n\tbfCPSExtLaunchWithData\t=\t2,\n\tbfCPSExtLaunchByParent\t=\t4,\n\tbfCPSExtLaunchAsUidGid\t=\t8\n};\n\ntypedef UInt32\tCPSLaunchPBFields;\n\nstruct CPSLaunchPB\n{\n\tCPSLaunchPBFields\tContents;\n\tCPSLaunchData\t\tpData;\n\tUInt32\t\t\tDataLen;\n\tUInt32\t\t\tDataTag;\n\tUInt32\t\t\tRefCon;\n\tCPSProcessSerNum\tParent;\n\tUInt32\t\t\tChildUID;\n\tUInt32\t\t\tChildGID;\n};\n\ntypedef struct CPSLaunchPB\tCPSLaunchPB;\n\n\nenum\n{\n\tbfCPSKillHard\t\t=\t1,\n\tbfCPSKillAllClassicApps\t=\t2\n};\n\ntypedef UInt32\tCPSKillOptions;\n\n\nenum\n{\n\tkCPSLaunchService\t=\t0,\n\tkCPSKillService\t\t=\t1,\n\tkCPSHideService\t\t=\t2,\n\tkCPSShowService\t\t=\t3,\n\tkCPSPrivService\t\t=\t4,\n\tkCPSExtDeathNoteService\t=\t5\n};\n\ntypedef UInt32\tCPSServiceReqType;\n\n\nstruct CPSLaunchRequest\n{\n\tCPSProcessSerNum\tTargetPSN;\n\tCPSLaunchOptions \tOptions;\n\tCPSProcAttributes \tProcAttributes;\n\tUInt8\t\t\t*pUTF8TargetPath;\n\tUInt32\t\t\tPathLen;\n};\n\ntypedef struct CPSLaunchRequest\tCPSLaunchRequest;\n\n\nstruct CPSKillRequest\n{\n\tCPSProcessSerNum\tTargetPSN;\n\tCPSKillOptions\t\tOptions;\n};\n\ntypedef struct CPSKillRequest\tCPSKillRequest;\n\n\nstruct CPSHideRequest\n{\n\tCPSProcessSerNum \tTargetPSN;\n};\n\ntypedef struct CPSHideRequest\tCPSHideRequest;\n\n\nstruct CPSShowRequest\n{\n\tCPSProcessSerNum \tTargetPSN;\n};\n\ntypedef struct CPSShowRequest\tCPSShowRequest;\n\n\nstruct CPSExtDeathNotice\n{\n\tCPSProcessSerNum \tDeadPSN;\n\tUInt32\t\t\tFlags;\n\tUInt8\t\t\t*pUTF8AppPath;\n\tUInt32\t\t\tPathLen;\n};\n\ntypedef struct CPSExtDeathNotice\tCPSExtDeathNotice;\n\n\nunion CPSRequestDetails\n{\n\tCPSLaunchRequest \tLaunchReq;\n\tCPSKillRequest \t\tKillReq;\n\tCPSHideRequest \t\tHideReq;\n\tCPSShowRequest \t\tShowReq;\n\tCPSExtDeathNotice \tDeathNotice;\n};\n\ntypedef union CPSRequestDetails\tCPSRequestDetails;\n\n\nstruct CPSServiceRequest\n{\n\tCPSServiceReqType \tType;\n\tSInt32\t\t\tID;\n\tCPSRequestDetails \tDetails;\n};\n\ntypedef struct CPSServiceRequest\tCPSServiceRequest;\n\n\nenum\n{\n\tkCPSProcessInterruptKey\t=\t0,\n\tkCPSAppSwitchFwdKey\t=\t1,\n\tkCPSAppSwitchBackKey\t=\t2,\n\tkCPSSessionInterruptKey\t=\t3,\n\tkCPSScreenSaverKey\t=\t4,\n\tkCPSDiskEjectKey\t=\t5,\n\tkCPSSpecialKeyCount\t=\t6\n};\n\ntypedef SInt32\tCPSSpecialKeyID;\n\nextern Boolean\tCPSEqualProcess( CPSProcessSerNum *psn1, CPSProcessSerNum *psn2);\nextern OSErr\tCPSGetCurrentProcess( CPSProcessSerNum *psn);\nextern OSErr\tCPSGetFrontProcess( CPSProcessSerNum *psn);\nextern OSErr\tCPSGetNextProcess( CPSProcessSerNum *psn);\nextern OSErr\tCPSGetNextToFrontProcess( CPSProcessSerNum *psn);\nextern OSErr\tCPSGetProcessInfo( CPSProcessSerNum *psn, CPSProcessInfoRec *info, char *path, int maxPathLen, int *len, char *name, int maxNameLen);\nextern OSErr\tCPSPostHideMostReq( CPSProcessSerNum *psn);\nextern OSErr\tCPSPostHideReq( CPSProcessSerNum *psn);\nextern OSErr\tCPSPostKillRequest( CPSProcessSerNum *psn, CPSKillOptions options);\nextern OSErr\tCPSPostShowAllReq( CPSProcessSerNum *psn);\nextern OSErr\tCPSPostShowReq( CPSProcessSerNum *psn);\nextern OSErr\tCPSSetFrontProcess( CPSProcessSerNum *psn);\nextern OSErr\tCPSReleaseKeyFocus( CPSProcessSerNum *psn);\nextern OSErr\tCPSStealKeyFocus( CPSProcessSerNum *psn);\nextern OSErr \tCPSSetProcessName ( CPSProcessSerNum *psn, char *processname);\nextern OSErr \tCPSEnableForegroundOperation( CPSProcessSerNum *psn, UInt32 _arg2, UInt32 _arg3, UInt32 _arg4, UInt32 _arg5);\n\n\n#if PRAGMA_STRUCT_ALIGN\n    #pragma options align=reset\n#elif PRAGMA_STRUCT_PACKPUSH\n    #pragma pack(pop)\n#elif PRAGMA_STRUCT_PACK\n    #pragma pack()\n#endif\n\n#ifdef __cplusplus\n}\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-Quartz/Info.plist.in",
    "content": "<!-- Info.plist -- bundle info file for Unix Squeak on Mac OS X\t\t -*- html -*-\t-->\n<!--               (based on John McIntosh's Info.plist for Carbonised MacSqueak)\t-->\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC\n\t  \"-//Apple Computer//DTD PLIST 1.0//EN\"\n\t  \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n  <dict>\n    <key>CFBundleDevelopmentRegion</key>\t<string>English</string>\n    <key>CFBundleInfoDictionaryVersion</key>\t<string>6.0</string>\n    <key>CFBundleExecutable</key>\t\t<string>squeak</string>\n    <key>CFBundlePackageType</key>\t\t<string>APPL</string>\n    <key>CFBundleSignature</key>\t\t<string>FAST</string>\n    <key>CFBundleName</key>\t\t\t<string>Squeak</string>\n    <key>CFBundleVersion</key>\t\t\t<string>@BNDL_VERSION@</string>\n    <key>CFBundleShortVersionString</key>\t<string>Squeak @BNDL_VERSION@</string>\n    <key>CFBundleGetInfoString</key>\t\t<string>Squeak @BNDL_VERSION@ http://www.squeak.org </string>\n    <key>CFBundleIdentifier</key>\t\t<string>org.squeak.Squeak</string>\n    <key>CFBundleIconFile</key>\t\t\t<string>SqueakVM.icns</string>\n    <key>CFBundleHelpBookFolder</key>\t\t<string>SqueakHelp</string>\n    <key>CFBundleHelpBookName</key>\t\t<string>Squeak Help</string>\n    <key>CFBundleDocumentTypes</key>\n    <array>\n      <dict>\n\t<key>CFBundleTypeExtensions</key>\t<array><string>image</string></array>\n\t<key>CFBundleTypeIconFile</key>\t\t<string>SqueakImage.icns</string>\n\t<key>CFBundleTypeName</key>\t\t<string>Squeak Image File</string>\n\t<key>CFBundleTypeOSTypes</key>\t\t<array><string>STim</string></array>\n\t<key>CFBundleTypeRole</key>\t\t<string>Editor</string>\n\t<key>LSIsAppleDefaultForType</key>\t<string>Yes</string>\n      </dict>\n      <dict>\n\t<key>CFBundleTypeExtensions</key>\t<array><string>changes</string></array>\n\t<key>CFBundleTypeIconFile</key>\t\t<string>SqueakChanges.icns</string>\n\t<key>CFBundleTypeName</key>\t\t<string>Squeak Changes File</string>\n\t<key>CFBundleTypeOSTypes</key>\t\t<array><string>STch</string></array>\n\t<key>CFBundleTypeRole</key>\t\t<string>Editor</string>\n\t<key>LSIsAppleDefaultForType</key>\t<string>Yes</string>\n      </dict>\n      <dict>\n\t<key>CFBundleTypeExtensions</key>\t<array><string>sources</string></array>\n\t<key>CFBundleTypeIconFile</key>\t\t<string>SqueakSources.icns</string>\n\t<key>CFBundleTypeName</key>\t\t<string>Squeak Sources File</string>\n\t<key>CFBundleTypeOSTypes</key>\t\t<array><string>STso</string></array>\n\t<key>CFBundleTypeRole</key>\t\t<string>Editor</string>\n      </dict>\n      <dict>\n\t<key>CFBundleTypeExtensions</key>\t<array><string>pr</string></array>\n\t<key>CFBundleTypeIconFile</key>\t\t<string>SqueakProject.icns</string>\n\t<key>CFBundleTypeName</key>\t\t<string>Squeak Project File</string>\n\t<key>CFBundleTypeOSTypes</key>\t\t<array><string>STpr</string></array>\n\t<key>CFBundleTypeRole</key>\t\t<string>Editor</string>\n      </dict>\n      <dict>\n\t<key>CFBundleTypeExtensions</key>\t<array><string>sobj</string></array>\n\t<key>CFBundleTypeIconFile</key>\t\t<string>SqueakProject.icns</string>\n\t<key>CFBundleTypeName</key>\t\t<string>Squeak Script File</string>\n\t<key>CFBundleTypeOSTypes</key>\t\t<array><string>SOBJ</string></array>\n\t<key>CFBundleTypeRole</key>\t\t<string>Editor</string>\n      </dict>\n<!--\n      <dict>\n\t<key>CFBundleTypeExtensions</key>\t<array><string>bundle</string></array>\n\t<key>CFBundleTypeIconFile</key>\t\t<string>SqueakPlugin.icns</string>\n\t<key>CFBundleTypeName</key>\t\t<string>Squeak Plugin</string>\n\t<key>CFBundleTypeOSTypes</key>\t\t<array><string>BNDL</string></array>\n\t<key>CFBundleTypeRole</key>\t\t<string>Editor</string>\n      </dict>\n-->\n      <dict>\n\t<key>CFBundleTypeName</key>\t\t<string>JPEG</string>\n\t<key>CFBundleTypeOSTypes</key>\t\t<array><string>JPEG</string></array>\n\t<key>CFBundleTypeRole</key>\t\t<string>Viewer</string>\n      </dict>\n      <dict>\n\t<key>CFBundleTypeName</key>\t\t<string>TEXT</string>\n\t<key>CFBundleTypeOSTypes</key>\t\t<array><string>TEXT</string></array>\n\t<key>CFBundleTypeRole</key>\t\t<string>Viewer</string>\n      </dict>\n      <dict>\n\t<key>CFBundleTypeName</key>\t\t<string>ttro</string>\n\t<key>CFBundleTypeOSTypes</key>\t\t<array><string>ttro</string></array>\n\t<key>CFBundleTypeRole</key>\t\t<string>Viewer</string></dict>\n      <dict>\n\t<key>CFBundleTypeName</key>\t\t<string>HTML</string>\n\t<key>CFBundleTypeOSTypes</key>\t\t<array><string>HTML</string></array>\n\t<key>CFBundleTypeRole</key>\t\t<string>Viewer</string></dict>\n      <dict>\n\t<key>CFBundleTypeName</key>\t\t<string>RTF</string>\n\t<key>CFBundleTypeOSTypes</key>\t\t<array><string>RTF</string></array>\n\t<key>CFBundleTypeRole</key>\t\t<string>Viewer</string></dict>\n      <dict>\n\t<key>CFBundleTypeName</key>\t\t<string>TIFF</string>\n\t<key>CFBundleTypeOSTypes</key>\t\t<array><string>TIFF</string></array>\n\t<key>CFBundleTypeRole</key>\t\t<string>Viewer</string>\n      </dict>\n      <dict>\n\t<key>CFBundleTypeName</key>\t\t<string>PICT</string>\n\t<key>CFBundleTypeOSTypes</key>\t\t<array><string>PICT</string></array>\n\t<key>CFBundleTypeRole</key>\t\t<string>Viewer</string>\n      </dict>\n      <dict>\n\t<key>CFBundleTypeName</key>\t\t<string>URL </string>\n\t<key>CFBundleTypeOSTypes</key>\t\t<array><string>URL</string></array>\n\t<key>CFBundleTypeRole</key>\t\t<string>Viewer</string>\n      </dict>\n      <dict>\n\t<key>CFBundleTypeName</key>\t\t<string>ZIP </string>\n\t<key>CFBundleTypeOSTypes</key>\t\t<array><string>ZIP</string></array>\n\t<key>CFBundleTypeRole</key>\t\t<string>Viewer</string>\n      </dict>\n      <dict>\n\t<key>CFBundleTypeName</key>\t\t<string>zip </string>\n\t<key>CFBundleTypeOSTypes</key>\t\t<array><string>zip</string></array>\n\t<key>CFBundleTypeRole</key>\t\t<string>Viewer</string>\n      </dict>\n      <dict>\n\t<key>CFBundleTypeName</key>\t\t<string>BINA</string>\n\t<key>CFBundleTypeOSTypes</key>\t\t<array><string>BINA</string></array>\n\t<key>CFBundleTypeRole</key>\t\t<string>Viewer</string>\n      </dict>\n      <dict>\n\t<key>CFBundleTypeName</key>\t\t<string>GIFf</string>\n\t<key>CFBundleTypeOSTypes</key>\t\t<array><string>GIFf</string></array>\n\t<key>CFBundleTypeRole</key>\t\t<string>Viewer</string>\n      </dict>\n      <dict>\n\t<key>CFBundleTypeName</key>\t\t<string>PNGf</string>\n\t<key>CFBundleTypeOSTypes</key>\t\t<array><string>PNGf</string></array>\n\t<key>CFBundleTypeRole</key>\t\t<string>Viewer</string>\n      </dict>\n      <dict>\n\t<key>CFBundleTypeName</key>\t\t<string>MP3 </string>\n\t<key>CFBundleTypeOSTypes</key>\t\t<array><string>MP3</string></array>\n\t<key>CFBundleTypeRole</key>\t\t<string>Viewer</string>\n      </dict>\n      <dict>\n\t<key>CFBundleTypeName</key>\t\t<string>MP3!</string>\n\t<key>CFBundleTypeOSTypes</key>\t\t<array><string>MP3!</string></array>\n\t<key>CFBundleTypeRole</key>\t\t<string>Viewer</string>\n      </dict>\n      <dict>\n\t<key>CFBundleTypeName</key>\t\t<string>MP3U</string>\n\t<key>CFBundleTypeOSTypes</key>\t\t<array><string>MP3U</string></array>\n\t<key>CFBundleTypeRole</key>\t\t<string>Viewer</string>\n      </dict>\n      <dict>\n\t<key>CFBundleTypeName</key>\t\t<string>MPEG</string>\n\t<key>CFBundleTypeOSTypes</key>\t\t<array><string>MPEG</string></array>\n\t<key>CFBundleTypeRole</key>\t\t<string>Viewer</string>\n      </dict>\n      <dict>\n\t<key>CFBundleTypeName</key>\t\t<string>mp3!</string>\n\t<key>CFBundleTypeOSTypes</key>\t\t<array><string>mp3!</string></array>\n\t<key>CFBundleTypeRole</key>\t\t<string>Viewer</string>\n      </dict>\n      <dict>\n\t<key>CFBundleTypeName</key>\t\t<string>MPG2</string>\n\t<key>CFBundleTypeOSTypes</key>\t\t<array><string>MPG2</string></array>\n\t<key>CFBundleTypeRole</key>\t\t<string>Viewer</string>\n      </dict>\n      <dict>\n\t<key>CFBundleTypeName</key>\t\t<string>MPG3</string>\n\t<key>CFBundleTypeOSTypes</key>\t\t<array><string>MPG3</string></array>\n\t<key>CFBundleTypeRole</key>\t\t<string>Viewer</string>\n      </dict>\n      <dict>\n\t<key>CFBundleTypeName</key>\t\t<string>MPG </string>\n\t<key>CFBundleTypeOSTypes</key>\t\t<array><string>MPG</string></array>\n\t<key>CFBundleTypeRole</key>\t\t<string>Viewer</string>\n      </dict>\n      <dict>\n\t<key>CFBundleTypeName</key>\t\t<string>Mp3</string>\n\t<key>CFBundleTypeOSTypes</key>\t\t<array><string>mp3</string></array>\n\t<key>CFBundleTypeRole</key>\t\t<string>Viewer</string>\n      </dict>\n      <dict>\n\t<key>CFBundleTypeName</key>\t\t<string>M3U</string>\n\t<key>CFBundleTypeOSTypes</key>\t\t<array><string>M3U</string></array>\n\t<key>CFBundleTypeRole</key>\t\t<string>Viewer</string>\n      </dict>\n      <dict>\n\t<key>CFBundleTypeName</key>\t\t<string>SRCS</string>\n\t<key>CFBundleTypeOSTypes</key>\t\t<array><string>SRCS</string></array>\n\t<key>CFBundleTypeRole</key>\t\t<string>Viewer</string>\n      </dict>\n      <dict>\n\t<key>CFBundleTypeName</key>\t\t<string>Chng</string>\n\t<key>CFBundleTypeOSTypes</key>\t\t<array><string>Chng</string></array>\n\t<key>CFBundleTypeRole</key>\t\t<string>Viewer</string>\n      </dict>\n      <dict>\n\t<key>CFBundleTypeName</key>\t\t<string>HPS5</string>\n\t<key>CFBundleTypeOSTypes</key>\t\t<array><string>HPS5</string></array>\n\t<key>CFBundleTypeRole</key>\t\t<string>Viewer</string>\n      </dict>\n    </array>\n  </dict>\n</plist>\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-Quartz/Makefile.in",
    "content": "# Makefile for Quartz Window System support\t\t\t-*- makefile -*-\n# \n#   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n#                              listed elsewhere in this file.\n#   All rights reserved.\n#   \n#   This file is part of Unix Squeak.\n# \n#      You are NOT ALLOWED to distribute modified versions of this file\n#      under its original name.  If you modify this file then you MUST\n#      rename it before making your modifications available publicly.\n# \n#   This file is distributed in the hope that it will be useful, but WITHOUT\n#   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n#   FITNESS FOR A PARTICULAR PURPOSE.\n#   \n#   You may use and/or distribute this file ONLY as part of Squeak, under\n#   the terms of the Squeak License as described in `LICENSE' in the base of\n#   this distribution, subject to the following additional restrictions:\n# \n#   1. The origin of this software must not be misrepresented; you must not\n#      claim that you wrote the original software.  If you use this software\n#      in a product, an acknowledgment to the original author(s) (and any\n#      other contributors mentioned herein) in the product documentation\n#      would be appreciated but is not required.\n# \n#   2. You must not distribute (or make publicly available by any\n#      means) a modified copy of this file unless you first rename it.\n# \n#   3. This notice must not be removed or altered in any source distribution.\n# \n#   Using (or modifying this file for use) in any context other than Squeak\n#   changes these copyright conditions.  Read the file `COPYING' in the\n#   directory `platforms/unix/doc' before proceeding with any such use.\n# \n# Author: ian.piumarta@inria.fr\n# \n# Last edited: 2003-02-23 18:09:56 by piumarta on emilia.inria.fr\n\n[make_cfg]\n[make_plg]\n\nTARGET=\t\tvm-display-Quartz$a\nOBJS=\t\tsqUnixQuartz$o\n\nXINCLUDES=\t[includes] \\\n\t\t-I$(topdir)/platforms/Cross/plugins/B3DAcceleratorPlugin \\\n\t\t-I$(topdir)/platforms/unix/plugins/B3DAcceleratorPlugin\n\n#XCFLAGS=\t-framework Cocoa -framework OpenGL\n\nPLIBS=\t\t-Wl,-framework -Wl,Cocoa \\\n\t\t-Wl,-framework -Wl,OpenGL\n\n$(TARGET) : $(OBJS) Makefile\n\t$(LINK) $(TARGET) $(OBJS) $(PLIBS)\n\t$(RANLIB) $(TARGET)\n\n[make_targets]\n\nDEPS=\t\t$(OBJS:$o=.d)\n\ninclude $(DEPS)\n\n%.d : $(topdir)/platforms/unix/vm-display-Quartz/%.m\n\t$(SHELL) -ec '$(CC) -MM $(CFLAGS) $(INCLUDES) $(XINCLUDES) $< \\\n\t  | sed '\\''s/\\($*\\)\\.o[ :]*/\\1.o $@ : /g'\\'' > $@; \\\n\t  [ -s $@ ] || rm -f $@'\n\n%.d : $(topdir)/platforms/unix/vm-display-Quartz/%.c\n\t$(SHELL) -ec '$(CC) -MM $(CFLAGS) $(INCLUDES) $(XINCLUDES) $< \\\n\t  | sed '\\''s/\\($*\\)\\.o[ :]*/\\1.o $@ : /g'\\'' > $@; \\\n\t  [ -s $@ ] || rm -f $@'\n\n.force :\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-Quartz/Makefile.inc",
    "content": "XCPPFLAGS=\t-I$(topdir)/platforms/Cross/plugins/B3DAcceleratorPlugin \\\n\t\t-I$(topdir)/platforms/unix/plugins/B3DAcceleratorPlugin \\\n\t\t-framework Cocoa -framework OpenGL\n\nPLIBS=\t\t-Wl,-framework -Wl,Cocoa \\\n\t\t-Wl,-framework -Wl,OpenGL\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-Quartz/PkgInfo",
    "content": "APPLFAST"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-Quartz/Resources/GLXUnix-ikp.2.cs",
    "content": "'From TeaSqueak3.2 of 19 September 2002 [latest update: #362] on 5 February 2003 at 10:43:22 am'!\rGLX subclass: #GLXUnixQuartz\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tea-GLX'!\rGLX subclass: #GLXUnixX11BE\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tea-GLX'!\rGLXUnixX11BE subclass: #GLXUnixX11LE\r\tinstanceVariableNames: ''\r\tclassVariableNames: ''\r\tpoolDictionaries: ''\r\tcategory: 'Tea-GLX'!\r\r!GLX class methodsFor: 'instance creation' stamp: 'ikp 2/3/2003 17:06'!\rnew\r\tSmalltalk platformName = 'Win32' ifTrue:[^GLXWin32 basicNew initialize].\r\tSmalltalk platformName = 'unix'\r\t\tifTrue:\r\t\t\t[(Smalltalk windowSystemName = 'X11')\r\t\t\t\tifTrue: [Smalltalk isLittleEndian\r\t\t\t\t\tifTrue: [^GLXUnixX11LE basicNew initialize]\r\t\t\t\t\tifFalse: [^GLXUnixX11BE basicNew initialize]].\r\t\t\t (Smalltalk windowSystemName = 'Quartz')\r\t\t\t\t\"implicitly big endian\"\r\t\t\t\tifTrue: [^GLXUnixQuartz basicNew initialize].\r\t\t\t self error: 'I cannot create a GLX for this window system'].\r\tSmalltalk platformName = 'Mac OS' ifTrue:[\r\t\tSmalltalk osVersion asNumber < 1000 \r\t\t\tifTrue: [^GLXMacOS9 basicNew initialize]\r\t\t\tifFalse:[^GLXMacOSX basicNew initialize].\r\t].\r\t^self error:'Cannot identify platform'! !\r\r\r!GLXUnixQuartz methodsFor: 'accessing' stamp: 'ikp 1/7/2003 21:14'!\rimagePixelFormat32\r\t^GLBgra! !\r\r!GLXUnixQuartz methodsFor: 'accessing' stamp: 'ikp 1/7/2003 21:14'!\rimagePixelType32\r\t^GLUnsignedInt8888Rev! !\r\r!GLXUnixQuartz methodsFor: 'accessing' stamp: 'ikp 1/7/2003 21:14'!\rtextureInternalFormat\r\t^GLRgba! !\r\r!GLXUnixQuartz methodsFor: 'accessing' stamp: 'ikp 1/7/2003 21:14'!\rtexturePixelFormat\r\t^GLBgra! !\r\r!GLXUnixQuartz methodsFor: 'accessing' stamp: 'ikp 1/7/2003 21:14'!\rtexturePixelType\r\t^GLUnsignedInt8888Rev! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglAccum: op with: value\r\t\"This method was automatically generated.\"\r\t\"void glAccum(GLenum op, GLfloat value);\"\r\t<cdecl: void 'glAccum' (ulong float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglActiveTextureARB: texture\r\t\"This method was automatically generated.\"\r\t\"void glActiveTextureARB(GLenum texture);\"\r\t<cdecl: void 'glActiveTextureARB' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglAlphaFunc: func with: ref\r\t\"This method was automatically generated.\"\r\t\"void glAlphaFunc(GLenum func, GLclampf ref);\"\r\t<cdecl: void 'glAlphaFunc' (ulong float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglAreTexturesResident: n with: texturez with: residences\r\t\"This method was automatically generated.\"\r\t\"GLboolean glAreTexturesResident(GLsizei n, GLuint* textures, GLboolean* residences);\"\r\t<cdecl: bool 'glAreTexturesResident' (long ulong* ulong*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglAreTexturesResidentEXT: n with: texturez with: residences\r\t\"This method was automatically generated.\"\r\t\"GLboolean glAreTexturesResidentEXT(GLsizei n, GLuint* textures, GLboolean* residences);\"\r\t<cdecl: bool 'glAreTexturesResidentEXT' (long ulong* ulong*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglArrayElement: i\r\t\"This method was automatically generated.\"\r\t\"void glArrayElement(GLint i);\"\r\t<cdecl: void 'glArrayElement' (long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglArrayElementEXT: i\r\t\"This method was automatically generated.\"\r\t\"void glArrayElementEXT(GLint i);\"\r\t<cdecl: void 'glArrayElementEXT' (long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglBegin: mode\r\t\"This method was automatically generated.\"\r\t\"void glBegin(GLenum mode);\"\r\t<cdecl: void 'glBegin' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglBindTexture: targt with: texture\r\t\"This method was automatically generated.\"\r\t\"void glBindTexture(GLenum target, GLuint texture);\"\r\t<cdecl: void 'glBindTexture' (ulong ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglBitmap: width with: height with: xorig with: yorig with: xmove with: ymove with: bitmap\r\t\"This method was automatically generated.\"\r\t\"void glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, GLubyte* bitmap);\"\r\t<cdecl: void 'glBitmap' (long long float float float float void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglBlendColor: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);\"\r\t<cdecl: void 'glBlendColor' (float float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglBlendEquation: mode\r\t\"This method was automatically generated.\"\r\t\"void glBlendEquation(GLenum mode);\"\r\t<cdecl: void 'glBlendEquation' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglBlendFunc: sfactor with: dfactor\r\t\"This method was automatically generated.\"\r\t\"void glBlendFunc(GLenum sfactor, GLenum dfactor);\"\r\t<cdecl: void 'glBlendFunc' (ulong ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglCallList: list\r\t\"This method was automatically generated.\"\r\t\"void glCallList(GLuint list);\"\r\t<cdecl: void 'glCallList' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglCallLists: n with: type with: lists\r\t\"This method was automatically generated.\"\r\t\"void glCallLists(GLsizei n, GLenum type, GLvoid* lists);\"\r\t<cdecl: void 'glCallLists' (long ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglClear: mask\r\t\"This method was automatically generated.\"\r\t\"void glClear(GLbitfield mask);\"\r\t<cdecl: void 'glClear' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglClearAccum: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);\"\r\t<cdecl: void 'glClearAccum' (float float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglClearColor: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);\"\r\t<cdecl: void 'glClearColor' (float float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglClearDepth: depth\r\t\"This method was automatically generated.\"\r\t\"void glClearDepth(GLclampd depth);\"\r\t<cdecl: void 'glClearDepth' (double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglClearIndex: c\r\t\"This method was automatically generated.\"\r\t\"void glClearIndex(GLfloat c);\"\r\t<cdecl: void 'glClearIndex' (float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglClearStencil: s\r\t\"This method was automatically generated.\"\r\t\"void glClearStencil(GLint s);\"\r\t<cdecl: void 'glClearStencil' (long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglClientActiveTextureARB: texture\r\t\"This method was automatically generated.\"\r\t\"void glClientActiveTextureARB(GLenum texture);\"\r\t<cdecl: void 'glClientActiveTextureARB' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglClipPlane: plane with: equation\r\t\"This method was automatically generated.\"\r\t\"void glClipPlane(GLenum plane, GLdouble* equation);\"\r\t<cdecl: void 'glClipPlane' (ulong double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor3b: red with: green with: blue\r\t\"This method was automatically generated.\"\r\t\"void glColor3b(GLbyte red, GLbyte green, GLbyte blue);\"\r\t<cdecl: void 'glColor3b' (byte byte byte) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor3bv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor3bv(GLbyte* v);\"\r\t<cdecl: void 'glColor3bv' (byte*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor3d: red with: green with: blue\r\t\"This method was automatically generated.\"\r\t\"void glColor3d(GLdouble red, GLdouble green, GLdouble blue);\"\r\t<cdecl: void 'glColor3d' (double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor3dv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor3dv(GLdouble* v);\"\r\t<cdecl: void 'glColor3dv' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor3f: red with: green with: blue\r\t\"This method was automatically generated.\"\r\t\"void glColor3f(GLfloat red, GLfloat green, GLfloat blue);\"\r\t<cdecl: void 'glColor3f' (float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor3fv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor3fv(GLfloat* v);\"\r\t<cdecl: void 'glColor3fv' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor3i: red with: green with: blue\r\t\"This method was automatically generated.\"\r\t\"void glColor3i(GLint red, GLint green, GLint blue);\"\r\t<cdecl: void 'glColor3i' (long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor3iv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor3iv(GLint* v);\"\r\t<cdecl: void 'glColor3iv' (long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor3s: red with: green with: blue\r\t\"This method was automatically generated.\"\r\t\"void glColor3s(GLshort red, GLshort green, GLshort blue);\"\r\t<cdecl: void 'glColor3s' (short short short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor3sv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor3sv(GLshort* v);\"\r\t<cdecl: void 'glColor3sv' (short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor3ub: red with: green with: blue\r\t\"This method was automatically generated.\"\r\t\"void glColor3ub(GLubyte red, GLubyte green, GLubyte blue);\"\r\t<cdecl: void 'glColor3ub' (byte byte byte) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor3ubv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor3ubv(GLubyte* v);\"\r\t<cdecl: void 'glColor3ubv' (byte*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor3ui: red with: green with: blue\r\t\"This method was automatically generated.\"\r\t\"void glColor3ui(GLuint red, GLuint green, GLuint blue);\"\r\t<cdecl: void 'glColor3ui' (ulong ulong ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor3uiv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor3uiv(GLuint* v);\"\r\t<cdecl: void 'glColor3uiv' (ulong*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor3us: red with: green with: blue\r\t\"This method was automatically generated.\"\r\t\"void glColor3us(GLushort red, GLushort green, GLushort blue);\"\r\t<cdecl: void 'glColor3us' (ushort ushort ushort) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor3usv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor3usv(GLushort* v);\"\r\t<cdecl: void 'glColor3usv' (ushort*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor4b: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);\"\r\t<cdecl: void 'glColor4b' (byte byte byte byte) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor4bv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor4bv(GLbyte* v);\"\r\t<cdecl: void 'glColor4bv' (byte*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor4d: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);\"\r\t<cdecl: void 'glColor4d' (double double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor4dv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor4dv(GLdouble* v);\"\r\t<cdecl: void 'glColor4dv' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor4f: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);\"\r\t<cdecl: void 'glColor4f' (float float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor4fv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor4fv(GLfloat* v);\"\r\t<cdecl: void 'glColor4fv' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor4i: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColor4i(GLint red, GLint green, GLint blue, GLint alpha);\"\r\t<cdecl: void 'glColor4i' (long long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor4iv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor4iv(GLint* v);\"\r\t<cdecl: void 'glColor4iv' (long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor4s: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha);\"\r\t<cdecl: void 'glColor4s' (short short short short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor4sv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor4sv(GLshort* v);\"\r\t<cdecl: void 'glColor4sv' (short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor4ub: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);\"\r\t<cdecl: void 'glColor4ub' (byte byte byte byte) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor4ubv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor4ubv(GLubyte* v);\"\r\t<cdecl: void 'glColor4ubv' (byte*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor4ui: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha);\"\r\t<cdecl: void 'glColor4ui' (ulong ulong ulong ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor4uiv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor4uiv(GLuint* v);\"\r\t<cdecl: void 'glColor4uiv' (ulong*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor4us: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha);\"\r\t<cdecl: void 'glColor4us' (ushort ushort ushort ushort) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColor4usv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor4usv(GLushort* v);\"\r\t<cdecl: void 'glColor4usv' (ushort*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColorMask: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);\"\r\t<cdecl: void 'glColorMask' (bool bool bool bool) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColorMaterial: face with: mode\r\t\"This method was automatically generated.\"\r\t\"void glColorMaterial(GLenum face, GLenum mode);\"\r\t<cdecl: void 'glColorMaterial' (ulong ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColorPointer: size with: type with: stride with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glColorPointer(GLint size, GLenum type, GLsizei stride, GLvoid* pointer);\"\r\t<cdecl: void 'glColorPointer' (long ulong long void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColorPointerEXT: size with: type with: stride with: count with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glColorPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid* pointer);\"\r\t<cdecl: void 'glColorPointerEXT' (long ulong long long void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColorSubTable: targt with: start with: count with: format with: type with: data\r\t\"This method was automatically generated.\"\r\t\"void glColorSubTable(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, GLvoid* data);\"\r\t<cdecl: void 'glColorSubTable' (ulong long long ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColorTable: targt with: internalformat with: width with: format with: type with: table\r\t\"This method was automatically generated.\"\r\t\"void glColorTable(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, GLvoid* table);\"\r\t<cdecl: void 'glColorTable' (ulong ulong long ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColorTableParameterfv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glColorTableParameterfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glColorTableParameterfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglColorTableParameteriv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glColorTableParameteriv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glColorTableParameteriv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglConvolutionFilter1D: targt with: internalformat with: width with: format with: type with: image\r\t\"This method was automatically generated.\"\r\t\"void glConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, GLvoid* image);\"\r\t<cdecl: void 'glConvolutionFilter1D' (ulong ulong long ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglConvolutionFilter2D: targt with: internalformat with: width with: height with: format with: type with: image\r\t\"This method was automatically generated.\"\r\t\"void glConvolutionFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* image);\"\r\t<cdecl: void 'glConvolutionFilter2D' (ulong ulong long long ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglConvolutionParameterf: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glConvolutionParameterf(GLenum target, GLenum pname, GLfloat params);\"\r\t<cdecl: void 'glConvolutionParameterf' (ulong ulong float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglConvolutionParameterfv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glConvolutionParameterfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glConvolutionParameterfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglConvolutionParameteri: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glConvolutionParameteri(GLenum target, GLenum pname, GLint params);\"\r\t<cdecl: void 'glConvolutionParameteri' (ulong ulong long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglConvolutionParameteriv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glConvolutionParameteriv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glConvolutionParameteriv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglCopyColorSubTable: targt with: start with: x with: y with: width\r\t\"This method was automatically generated.\"\r\t\"void glCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);\"\r\t<cdecl: void 'glCopyColorSubTable' (ulong long long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglCopyColorTable: targt with: internalformat with: x with: y with: width\r\t\"This method was automatically generated.\"\r\t\"void glCopyColorTable(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);\"\r\t<cdecl: void 'glCopyColorTable' (ulong ulong long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglCopyConvolutionFilter1D: targt with: internalformat with: x with: y with: width\r\t\"This method was automatically generated.\"\r\t\"void glCopyConvolutionFilter1D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);\"\r\t<cdecl: void 'glCopyConvolutionFilter1D' (ulong ulong long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglCopyConvolutionFilter2D: targt with: internalformat with: x with: y with: width with: height\r\t\"This method was automatically generated.\"\r\t\"void glCopyConvolutionFilter2D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);\"\r\t<cdecl: void 'glCopyConvolutionFilter2D' (ulong ulong long long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglCopyPixels: x with: y with: width with: height with: type\r\t\"This method was automatically generated.\"\r\t\"void glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);\"\r\t<cdecl: void 'glCopyPixels' (long long long long ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglCopyTexImage1D: targt with: level with: internalformat with: x with: y with: width with: border\r\t\"This method was automatically generated.\"\r\t\"void glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);\"\r\t<cdecl: void 'glCopyTexImage1D' (ulong long ulong long long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglCopyTexImage2D: targt with: level with: internalformat with: x with: y with: width with: height with: border\r\t\"This method was automatically generated.\"\r\t\"void glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);\"\r\t<cdecl: void 'glCopyTexImage2D' (ulong long ulong long long long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglCopyTexSubImage1D: targt with: level with: xoffset with: x with: y with: width\r\t\"This method was automatically generated.\"\r\t\"void glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);\"\r\t<cdecl: void 'glCopyTexSubImage1D' (ulong long long long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglCopyTexSubImage2D: targt with: level with: xoffset with: yoffset with: x with: y with: width with: height\r\t\"This method was automatically generated.\"\r\t\"void glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);\"\r\t<cdecl: void 'glCopyTexSubImage2D' (ulong long long long long long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglCopyTexSubImage3D: targt with: level with: xoffset with: yoffset with: zoffset with: x with: y with: width with: height\r\t\"This method was automatically generated.\"\r\t\"void glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\"\r\t<cdecl: void 'glCopyTexSubImage3D' (ulong long long long long long long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglCullFace: mode\r\t\"This method was automatically generated.\"\r\t\"void glCullFace(GLenum mode);\"\r\t<cdecl: void 'glCullFace' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglDeleteLists: list with: range\r\t\"This method was automatically generated.\"\r\t\"void glDeleteLists(GLuint list, GLsizei range);\"\r\t<cdecl: void 'glDeleteLists' (ulong long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglDeleteTextures: n with: textures\r\t\"This method was automatically generated.\"\r\t\"void glDeleteTextures(GLsizei n, GLuint* textures);\"\r\t<cdecl: void 'glDeleteTextures' (long ulong*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglDeleteTexturesEXT: n with: textures\r\t\"This method was automatically generated.\"\r\t\"void glDeleteTexturesEXT(GLsizei n, GLuint* textures);\"\r\t<cdecl: void 'glDeleteTexturesEXT' (long ulong*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglDepthFunc: func\r\t\"This method was automatically generated.\"\r\t\"void glDepthFunc(GLenum func);\"\r\t<cdecl: void 'glDepthFunc' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglDepthMask: flag\r\t\"This method was automatically generated.\"\r\t\"void glDepthMask(GLboolean flag);\"\r\t<cdecl: void 'glDepthMask' (bool) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglDepthRange: zNear with: zFar\r\t\"This method was automatically generated.\"\r\t\"void glDepthRange(GLclampd zNear, GLclampd zFar);\"\r\t<cdecl: void 'glDepthRange' (double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglDisable: cap\r\t\"This method was automatically generated.\"\r\t\"void glDisable(GLenum cap);\"\r\t<cdecl: void 'glDisable' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglDisableClientState: array\r\t\"This method was automatically generated.\"\r\t\"void glDisableClientState(GLenum array);\"\r\t<cdecl: void 'glDisableClientState' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglDrawArrays: mode with: first with: count\r\t\"This method was automatically generated.\"\r\t\"void glDrawArrays(GLenum mode, GLint first, GLsizei count);\"\r\t<cdecl: void 'glDrawArrays' (ulong long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglDrawArraysEXT: mode with: first with: count\r\t\"This method was automatically generated.\"\r\t\"void glDrawArraysEXT(GLenum mode, GLint first, GLsizei count);\"\r\t<cdecl: void 'glDrawArraysEXT' (ulong long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglDrawBuffer: mode\r\t\"This method was automatically generated.\"\r\t\"void glDrawBuffer(GLenum mode);\"\r\t<cdecl: void 'glDrawBuffer' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglDrawElements: mode with: count with: type with: indices\r\t\"This method was automatically generated.\"\r\t\"void glDrawElements(GLenum mode, GLsizei count, GLenum type, GLvoid* indices);\"\r\t<cdecl: void 'glDrawElements' (ulong long ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglDrawPixels: width with: height with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glDrawPixels' (long long ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglDrawRangeElements: mode with: start with: end with: count with: type with: indices\r\t\"This method was automatically generated.\"\r\t\"void glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLvoid* indices);\"\r\t<cdecl: void 'glDrawRangeElements' (ulong ulong ulong long ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEdgeFlag: flag\r\t\"This method was automatically generated.\"\r\t\"void glEdgeFlag(GLboolean flag);\"\r\t<cdecl: void 'glEdgeFlag' (bool) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEdgeFlagPointer: stride with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glEdgeFlagPointer(GLsizei stride, GLboolean* pointer);\"\r\t<cdecl: void 'glEdgeFlagPointer' (long ulong*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEdgeFlagPointerEXT: stride with: count with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glEdgeFlagPointerEXT(GLsizei stride, GLsizei count, GLboolean* pointer);\"\r\t<cdecl: void 'glEdgeFlagPointerEXT' (long long ulong*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEdgeFlagv: flag\r\t\"This method was automatically generated.\"\r\t\"void glEdgeFlagv(GLboolean* flag);\"\r\t<cdecl: void 'glEdgeFlagv' (ulong*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEnable: cap\r\t\"This method was automatically generated.\"\r\t\"void glEnable(GLenum cap);\"\r\t<cdecl: void 'glEnable' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEnableClientState: array\r\t\"This method was automatically generated.\"\r\t\"void glEnableClientState(GLenum array);\"\r\t<cdecl: void 'glEnableClientState' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEnd\r\t\"This method was automatically generated.\"\r\t\"void glEnd();\"\r\t<cdecl: void 'glEnd' (void) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEndList\r\t\"This method was automatically generated.\"\r\t\"void glEndList();\"\r\t<cdecl: void 'glEndList' (void) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEvalCoord1d: u\r\t\"This method was automatically generated.\"\r\t\"void glEvalCoord1d(GLdouble u);\"\r\t<cdecl: void 'glEvalCoord1d' (double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEvalCoord1dv: u\r\t\"This method was automatically generated.\"\r\t\"void glEvalCoord1dv(GLdouble* u);\"\r\t<cdecl: void 'glEvalCoord1dv' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEvalCoord1f: u\r\t\"This method was automatically generated.\"\r\t\"void glEvalCoord1f(GLfloat u);\"\r\t<cdecl: void 'glEvalCoord1f' (float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEvalCoord1fv: u\r\t\"This method was automatically generated.\"\r\t\"void glEvalCoord1fv(GLfloat* u);\"\r\t<cdecl: void 'glEvalCoord1fv' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEvalCoord2d: u with: v\r\t\"This method was automatically generated.\"\r\t\"void glEvalCoord2d(GLdouble u, GLdouble v);\"\r\t<cdecl: void 'glEvalCoord2d' (double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEvalCoord2dv: u\r\t\"This method was automatically generated.\"\r\t\"void glEvalCoord2dv(GLdouble* u);\"\r\t<cdecl: void 'glEvalCoord2dv' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEvalCoord2f: u with: v\r\t\"This method was automatically generated.\"\r\t\"void glEvalCoord2f(GLfloat u, GLfloat v);\"\r\t<cdecl: void 'glEvalCoord2f' (float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEvalCoord2fv: u\r\t\"This method was automatically generated.\"\r\t\"void glEvalCoord2fv(GLfloat* u);\"\r\t<cdecl: void 'glEvalCoord2fv' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEvalMesh1: mode with: i1 with: i2\r\t\"This method was automatically generated.\"\r\t\"void glEvalMesh1(GLenum mode, GLint i1, GLint i2);\"\r\t<cdecl: void 'glEvalMesh1' (ulong long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEvalMesh2: mode with: i1 with: i2 with: j1 with: j2\r\t\"This method was automatically generated.\"\r\t\"void glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);\"\r\t<cdecl: void 'glEvalMesh2' (ulong long long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEvalPoint1: i\r\t\"This method was automatically generated.\"\r\t\"void glEvalPoint1(GLint i);\"\r\t<cdecl: void 'glEvalPoint1' (long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglEvalPoint2: i with: j\r\t\"This method was automatically generated.\"\r\t\"void glEvalPoint2(GLint i, GLint j);\"\r\t<cdecl: void 'glEvalPoint2' (long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglFeedbackBuffer: size with: type with: buffer\r\t\"This method was automatically generated.\"\r\t\"void glFeedbackBuffer(GLsizei size, GLenum type, GLfloat* buffer);\"\r\t<cdecl: void 'glFeedbackBuffer' (long ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglFinish\r\t\"This method was automatically generated.\"\r\t\"void glFinish();\"\r\t<cdecl: void 'glFinish' (void) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglFlush\r\t\"This method was automatically generated.\"\r\t\"void glFlush();\"\r\t<cdecl: void 'glFlush' (void) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglFogf: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glFogf(GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glFogf' (ulong float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglFogfv: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glFogfv(GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glFogfv' (ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglFogi: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glFogi(GLenum pname, GLint param);\"\r\t<cdecl: void 'glFogi' (ulong long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglFogiv: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glFogiv(GLenum pname, GLint* params);\"\r\t<cdecl: void 'glFogiv' (ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglFrontFace: mode\r\t\"This method was automatically generated.\"\r\t\"void glFrontFace(GLenum mode);\"\r\t<cdecl: void 'glFrontFace' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglFrustum: left with: right with: bottom with: top with: zNear with: zFar\r\t\"This method was automatically generated.\"\r\t\"void glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);\"\r\t<cdecl: void 'glFrustum' (double double double double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/8/2003 00:18'!\rglGenLists: range\r\t\"This method was automatically generated.\"\r\t\"GLuint glGenLists(GLsizei range);\"\r\t<cdecl: ulong 'glGenLists' (long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGenTextures: n with: textures\r\t\"This method was automatically generated.\"\r\t\"void glGenTextures(GLsizei n, GLuint* textures);\"\r\t<cdecl: void 'glGenTextures' (long ulong*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGenTexturesEXT: n with: textures\r\t\"This method was automatically generated.\"\r\t\"void glGenTexturesEXT(GLsizei n, GLuint* textures);\"\r\t<cdecl: void 'glGenTexturesEXT' (long ulong*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetBooleanv: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetBooleanv(GLenum pname, GLboolean* params);\"\r\t<cdecl: void 'glGetBooleanv' (ulong ulong*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetClipPlane: plane with: equation\r\t\"This method was automatically generated.\"\r\t\"void glGetClipPlane(GLenum plane, GLdouble* equation);\"\r\t<cdecl: void 'glGetClipPlane' (ulong double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetColorTable: targt with: format with: type with: table\r\t\"This method was automatically generated.\"\r\t\"void glGetColorTable(GLenum target, GLenum format, GLenum type, GLvoid* table);\"\r\t<cdecl: void 'glGetColorTable' (ulong ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetColorTableParameterfv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetColorTableParameterfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetColorTableParameterfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetColorTableParameteriv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetColorTableParameteriv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetColorTableParameteriv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetConvolutionFilter: targt with: format with: type with: image\r\t\"This method was automatically generated.\"\r\t\"void glGetConvolutionFilter(GLenum target, GLenum format, GLenum type, GLvoid* image);\"\r\t<cdecl: void 'glGetConvolutionFilter' (ulong ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetConvolutionParameterfv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetConvolutionParameterfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetConvolutionParameteriv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetConvolutionParameteriv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetConvolutionParameteriv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetDoublev: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetDoublev(GLenum pname, GLdouble* params);\"\r\t<cdecl: void 'glGetDoublev' (ulong double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetError\r\t\"This method was automatically generated.\"\r\t\"GLenum glGetError();\"\r\t<cdecl: ulong 'glGetError' (void) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetFloatv: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetFloatv(GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetFloatv' (ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetHistogram: targt with: reset with: format with: type with: values\r\t\"This method was automatically generated.\"\r\t\"void glGetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid* values);\"\r\t<cdecl: void 'glGetHistogram' (ulong bool ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetHistogramParameterfv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetHistogramParameterfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetHistogramParameterfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetHistogramParameteriv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetHistogramParameteriv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetHistogramParameteriv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetIntegerv: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetIntegerv(GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetIntegerv' (ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetLightfv: light with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetLightfv(GLenum light, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetLightfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetLightiv: light with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetLightiv(GLenum light, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetLightiv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetMapdv: targt with: query with: v\r\t\"This method was automatically generated.\"\r\t\"void glGetMapdv(GLenum target, GLenum query, GLdouble* v);\"\r\t<cdecl: void 'glGetMapdv' (ulong ulong double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetMapfv: targt with: query with: v\r\t\"This method was automatically generated.\"\r\t\"void glGetMapfv(GLenum target, GLenum query, GLfloat* v);\"\r\t<cdecl: void 'glGetMapfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetMapiv: targt with: query with: v\r\t\"This method was automatically generated.\"\r\t\"void glGetMapiv(GLenum target, GLenum query, GLint* v);\"\r\t<cdecl: void 'glGetMapiv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetMaterialfv: face with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetMaterialfv(GLenum face, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetMaterialfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetMaterialiv: face with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetMaterialiv(GLenum face, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetMaterialiv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetMinmax: targt with: reset with: format with: type with: values\r\t\"This method was automatically generated.\"\r\t\"void glGetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid* values);\"\r\t<cdecl: void 'glGetMinmax' (ulong bool ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetMinmaxParameterfv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetMinmaxParameterfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetMinmaxParameteriv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetMinmaxParameteriv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetMinmaxParameteriv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetPixelMapfv: map with: values\r\t\"This method was automatically generated.\"\r\t\"void glGetPixelMapfv(GLenum map, GLfloat* values);\"\r\t<cdecl: void 'glGetPixelMapfv' (ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetPixelMapuiv: map with: values\r\t\"This method was automatically generated.\"\r\t\"void glGetPixelMapuiv(GLenum map, GLuint* values);\"\r\t<cdecl: void 'glGetPixelMapuiv' (ulong ulong*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetPixelMapusv: map with: values\r\t\"This method was automatically generated.\"\r\t\"void glGetPixelMapusv(GLenum map, GLushort* values);\"\r\t<cdecl: void 'glGetPixelMapusv' (ulong ushort*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetPointerv: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetPointerv(GLenum pname, GLvoid** params);\"\r\t<cdecl: void 'glGetPointerv' (ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetPointervEXT: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetPointervEXT(GLenum pname, GLvoid** params);\"\r\t<cdecl: void 'glGetPointervEXT' (ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetPolygonStipple: mask\r\t\"This method was automatically generated.\"\r\t\"void glGetPolygonStipple(GLubyte* mask);\"\r\t<cdecl: void 'glGetPolygonStipple' (byte*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetSeparableFilter: targt with: format with: type with: row with: column with: span\r\t\"This method was automatically generated.\"\r\t\"void glGetSeparableFilter(GLenum target, GLenum format, GLenum type, GLvoid* row, GLvoid* column, GLvoid* span);\"\r\t<cdecl: void 'glGetSeparableFilter' (ulong ulong ulong void* void* void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetString: name\r\t\"This method was automatically generated.\"\r\t\"GLubyte* glGetString(GLenum name);\"\r\t<cdecl: byte* 'glGetString' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetTexEnvfv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexEnvfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetTexEnvfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetTexEnviv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexEnviv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetTexEnviv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetTexGendv: coord with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexGendv(GLenum coord, GLenum pname, GLdouble* params);\"\r\t<cdecl: void 'glGetTexGendv' (ulong ulong double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetTexGenfv: coord with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexGenfv(GLenum coord, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetTexGenfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetTexGeniv: coord with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexGeniv(GLenum coord, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetTexGeniv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetTexImage: targt with: level with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glGetTexImage' (ulong long ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetTexLevelParameterfv: targt with: level with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetTexLevelParameterfv' (ulong long ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetTexLevelParameteriv: targt with: level with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetTexLevelParameteriv' (ulong long ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetTexParameterfv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetTexParameterfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglGetTexParameteriv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexParameteriv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetTexParameteriv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglHint: targt with: mode\r\t\"This method was automatically generated.\"\r\t\"void glHint(GLenum target, GLenum mode);\"\r\t<cdecl: void 'glHint' (ulong ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglHistogram: targt with: width with: internalformat with: sink\r\t\"This method was automatically generated.\"\r\t\"void glHistogram(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);\"\r\t<cdecl: void 'glHistogram' (ulong long ulong bool) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIndexMask: mask\r\t\"This method was automatically generated.\"\r\t\"void glIndexMask(GLuint mask);\"\r\t<cdecl: void 'glIndexMask' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIndexPointer: type with: stride with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glIndexPointer(GLenum type, GLsizei stride, GLvoid* pointer);\"\r\t<cdecl: void 'glIndexPointer' (ulong long void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIndexPointerEXT: type with: stride with: count with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glIndexPointerEXT(GLenum type, GLsizei stride, GLsizei count, GLvoid* pointer);\"\r\t<cdecl: void 'glIndexPointerEXT' (ulong long long void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIndexd: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexd(GLdouble c);\"\r\t<cdecl: void 'glIndexd' (double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIndexdv: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexdv(GLdouble* c);\"\r\t<cdecl: void 'glIndexdv' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIndexf: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexf(GLfloat c);\"\r\t<cdecl: void 'glIndexf' (float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIndexfv: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexfv(GLfloat* c);\"\r\t<cdecl: void 'glIndexfv' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIndexi: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexi(GLint c);\"\r\t<cdecl: void 'glIndexi' (long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIndexiv: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexiv(GLint* c);\"\r\t<cdecl: void 'glIndexiv' (long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIndexs: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexs(GLshort c);\"\r\t<cdecl: void 'glIndexs' (short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIndexsv: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexsv(GLshort* c);\"\r\t<cdecl: void 'glIndexsv' (short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIndexub: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexub(GLubyte c);\"\r\t<cdecl: void 'glIndexub' (byte) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIndexubv: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexubv(GLubyte* c);\"\r\t<cdecl: void 'glIndexubv' (byte*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglInitNames\r\t\"This method was automatically generated.\"\r\t\"void glInitNames();\"\r\t<cdecl: void 'glInitNames' (void) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglInterleavedArrays: format with: stride with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glInterleavedArrays(GLenum format, GLsizei stride, GLvoid* pointer);\"\r\t<cdecl: void 'glInterleavedArrays' (ulong long void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIsEnabled: cap\r\t\"This method was automatically generated.\"\r\t\"GLboolean glIsEnabled(GLenum cap);\"\r\t<cdecl: bool 'glIsEnabled' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIsList: list\r\t\"This method was automatically generated.\"\r\t\"GLboolean glIsList(GLuint list);\"\r\t<cdecl: bool 'glIsList' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIsTexture: texture\r\t\"This method was automatically generated.\"\r\t\"GLboolean glIsTexture(GLuint texture);\"\r\t<cdecl: bool 'glIsTexture' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglIsTextureEXT: texture\r\t\"This method was automatically generated.\"\r\t\"GLboolean glIsTextureEXT(GLuint texture);\"\r\t<cdecl: bool 'glIsTextureEXT' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglLightModelf: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glLightModelf(GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glLightModelf' (ulong float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglLightModelfv: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glLightModelfv(GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glLightModelfv' (ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglLightModeli: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glLightModeli(GLenum pname, GLint param);\"\r\t<cdecl: void 'glLightModeli' (ulong long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglLightModeliv: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glLightModeliv(GLenum pname, GLint* params);\"\r\t<cdecl: void 'glLightModeliv' (ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglLightf: light with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glLightf(GLenum light, GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glLightf' (ulong ulong float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglLightfv: light with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glLightfv(GLenum light, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glLightfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglLighti: light with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glLighti(GLenum light, GLenum pname, GLint param);\"\r\t<cdecl: void 'glLighti' (ulong ulong long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglLightiv: light with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glLightiv(GLenum light, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glLightiv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglLineStipple: factor with: pattern\r\t\"This method was automatically generated.\"\r\t\"void glLineStipple(GLint factor, GLushort pattern);\"\r\t<cdecl: void 'glLineStipple' (long ushort) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglLineWidth: width\r\t\"This method was automatically generated.\"\r\t\"void glLineWidth(GLfloat width);\"\r\t<cdecl: void 'glLineWidth' (float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglListBase: base\r\t\"This method was automatically generated.\"\r\t\"void glListBase(GLuint base);\"\r\t<cdecl: void 'glListBase' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglLoadIdentity\r\t\"This method was automatically generated.\"\r\t\"void glLoadIdentity();\"\r\t<cdecl: void 'glLoadIdentity' (void) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglLoadMatrixd: m\r\t\"This method was automatically generated.\"\r\t\"void glLoadMatrixd(GLdouble* m);\"\r\t<cdecl: void 'glLoadMatrixd' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglLoadMatrixf: m\r\t\"This method was automatically generated.\"\r\t\"void glLoadMatrixf(GLfloat* m);\"\r\t<cdecl: void 'glLoadMatrixf' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglLoadName: name\r\t\"This method was automatically generated.\"\r\t\"void glLoadName(GLuint name);\"\r\t<cdecl: void 'glLoadName' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglLockArraysEXT: first with: count\r\t\"This method was automatically generated.\"\r\t\"void glLockArraysEXT(GLint first, GLsizei count);\"\r\t<cdecl: void 'glLockArraysEXT' (long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglLogicOp: opcode\r\t\"This method was automatically generated.\"\r\t\"void glLogicOp(GLenum opcode);\"\r\t<cdecl: void 'glLogicOp' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMap1d: targt with: u1 with: u2 with: stride with: order with: points\r\t\"This method was automatically generated.\"\r\t\"void glMap1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, GLdouble* points);\"\r\t<cdecl: void 'glMap1d' (ulong double double long long double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMap1f: targt with: u1 with: u2 with: stride with: order with: points\r\t\"This method was automatically generated.\"\r\t\"void glMap1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, GLfloat* points);\"\r\t<cdecl: void 'glMap1f' (ulong float float long long float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMap2d: targt with: u1 with: u2 with: ustride with: uorder with: v1 with: v2 with: vstride with: vorder with: points\r\t\"This method was automatically generated.\"\r\t\"void glMap2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble* points);\"\r\t<cdecl: void 'glMap2d' (ulong double double long long double double long long double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMap2f: targt with: u1 with: u2 with: ustride with: uorder with: v1 with: v2 with: vstride with: vorder with: points\r\t\"This method was automatically generated.\"\r\t\"void glMap2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat* points);\"\r\t<cdecl: void 'glMap2f' (ulong float float long long float float long long float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMapGrid1d: un with: u1 with: u2\r\t\"This method was automatically generated.\"\r\t\"void glMapGrid1d(GLint un, GLdouble u1, GLdouble u2);\"\r\t<cdecl: void 'glMapGrid1d' (long double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMapGrid1f: un with: u1 with: u2\r\t\"This method was automatically generated.\"\r\t\"void glMapGrid1f(GLint un, GLfloat u1, GLfloat u2);\"\r\t<cdecl: void 'glMapGrid1f' (long float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMapGrid2d: un with: u1 with: u2 with: vn with: v1 with: v2\r\t\"This method was automatically generated.\"\r\t\"void glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);\"\r\t<cdecl: void 'glMapGrid2d' (long double double long double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMapGrid2f: un with: u1 with: u2 with: vn with: v1 with: v2\r\t\"This method was automatically generated.\"\r\t\"void glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);\"\r\t<cdecl: void 'glMapGrid2f' (long float float long float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMaterialf: face with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glMaterialf(GLenum face, GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glMaterialf' (ulong ulong float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMaterialfv: face with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glMaterialfv(GLenum face, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glMaterialfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMateriali: face with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glMateriali(GLenum face, GLenum pname, GLint param);\"\r\t<cdecl: void 'glMateriali' (ulong ulong long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMaterialiv: face with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glMaterialiv(GLenum face, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glMaterialiv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMatrixMode: mode\r\t\"This method was automatically generated.\"\r\t\"void glMatrixMode(GLenum mode);\"\r\t<cdecl: void 'glMatrixMode' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMinmax: targt with: internalformat with: sink\r\t\"This method was automatically generated.\"\r\t\"void glMinmax(GLenum target, GLenum internalformat, GLboolean sink);\"\r\t<cdecl: void 'glMinmax' (ulong ulong bool) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultMatrixd: m\r\t\"This method was automatically generated.\"\r\t\"void glMultMatrixd(GLdouble* m);\"\r\t<cdecl: void 'glMultMatrixd' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultMatrixf: m\r\t\"This method was automatically generated.\"\r\t\"void glMultMatrixf(GLfloat* m);\"\r\t<cdecl: void 'glMultMatrixf' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord1dARB: targt with: s\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord1dARB(GLenum target, GLdouble s);\"\r\t<cdecl: void 'glMultiTexCoord1dARB' (ulong double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord1dvARB: targt with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord1dvARB(GLenum target, GLdouble* v);\"\r\t<cdecl: void 'glMultiTexCoord1dvARB' (ulong double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord1fARB: targt with: s\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord1fARB(GLenum target, GLfloat s);\"\r\t<cdecl: void 'glMultiTexCoord1fARB' (ulong float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord1fvARB: targt with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord1fvARB(GLenum target, GLfloat* v);\"\r\t<cdecl: void 'glMultiTexCoord1fvARB' (ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord1iARB: targt with: s\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord1iARB(GLenum target, GLint s);\"\r\t<cdecl: void 'glMultiTexCoord1iARB' (ulong long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord1ivARB: targt with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord1ivARB(GLenum target, GLint* v);\"\r\t<cdecl: void 'glMultiTexCoord1ivARB' (ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord1sARB: targt with: s\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord1sARB(GLenum target, GLshort s);\"\r\t<cdecl: void 'glMultiTexCoord1sARB' (ulong short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord1svARB: targt with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord1svARB(GLenum target, GLshort* v);\"\r\t<cdecl: void 'glMultiTexCoord1svARB' (ulong short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord2dARB: targt with: s with: t\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t);\"\r\t<cdecl: void 'glMultiTexCoord2dARB' (ulong double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord2dvARB: targt with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord2dvARB(GLenum target, GLdouble* v);\"\r\t<cdecl: void 'glMultiTexCoord2dvARB' (ulong double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord2fARB: targt with: s with: t\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t);\"\r\t<cdecl: void 'glMultiTexCoord2fARB' (ulong float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord2fvARB: targt with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord2fvARB(GLenum target, GLfloat* v);\"\r\t<cdecl: void 'glMultiTexCoord2fvARB' (ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord2iARB: targt with: s with: t\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord2iARB(GLenum target, GLint s, GLint t);\"\r\t<cdecl: void 'glMultiTexCoord2iARB' (ulong long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord2ivARB: targt with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord2ivARB(GLenum target, GLint* v);\"\r\t<cdecl: void 'glMultiTexCoord2ivARB' (ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord2sARB: targt with: s with: t\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t);\"\r\t<cdecl: void 'glMultiTexCoord2sARB' (ulong short short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord2svARB: targt with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord2svARB(GLenum target, GLshort* v);\"\r\t<cdecl: void 'glMultiTexCoord2svARB' (ulong short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord3dARB: targt with: s with: t with: r\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r);\"\r\t<cdecl: void 'glMultiTexCoord3dARB' (ulong double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord3dvARB: targt with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord3dvARB(GLenum target, GLdouble* v);\"\r\t<cdecl: void 'glMultiTexCoord3dvARB' (ulong double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord3fARB: targt with: s with: t with: r\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r);\"\r\t<cdecl: void 'glMultiTexCoord3fARB' (ulong float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord3fvARB: targt with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord3fvARB(GLenum target, GLfloat* v);\"\r\t<cdecl: void 'glMultiTexCoord3fvARB' (ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord3iARB: targt with: s with: t with: r\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r);\"\r\t<cdecl: void 'glMultiTexCoord3iARB' (ulong long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord3ivARB: targt with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord3ivARB(GLenum target, GLint* v);\"\r\t<cdecl: void 'glMultiTexCoord3ivARB' (ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord3sARB: targt with: s with: t with: r\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r);\"\r\t<cdecl: void 'glMultiTexCoord3sARB' (ulong short short short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord3svARB: targt with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord3svARB(GLenum target, GLshort* v);\"\r\t<cdecl: void 'glMultiTexCoord3svARB' (ulong short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord4dARB: targt with: s with: t with: r with: q\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);\"\r\t<cdecl: void 'glMultiTexCoord4dARB' (ulong double double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord4dvARB: targt with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord4dvARB(GLenum target, GLdouble* v);\"\r\t<cdecl: void 'glMultiTexCoord4dvARB' (ulong double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord4fARB: targt with: s with: t with: r with: q\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);\"\r\t<cdecl: void 'glMultiTexCoord4fARB' (ulong float float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord4fvARB: targt with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord4fvARB(GLenum target, GLfloat* v);\"\r\t<cdecl: void 'glMultiTexCoord4fvARB' (ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord4iARB: targt with: s with: t with: r with: q\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q);\"\r\t<cdecl: void 'glMultiTexCoord4iARB' (ulong long long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord4ivARB: targt with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord4ivARB(GLenum target, GLint* v);\"\r\t<cdecl: void 'glMultiTexCoord4ivARB' (ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord4sARB: targt with: s with: t with: r with: q\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);\"\r\t<cdecl: void 'glMultiTexCoord4sARB' (ulong short short short short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglMultiTexCoord4svARB: targt with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord4svARB(GLenum target, GLshort* v);\"\r\t<cdecl: void 'glMultiTexCoord4svARB' (ulong short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglNewList: list with: mode\r\t\"This method was automatically generated.\"\r\t\"void glNewList(GLuint list, GLenum mode);\"\r\t<cdecl: void 'glNewList' (ulong ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglNormal3b: nx with: ny with: nz\r\t\"This method was automatically generated.\"\r\t\"void glNormal3b(GLbyte nx, GLbyte ny, GLbyte nz);\"\r\t<cdecl: void 'glNormal3b' (byte byte byte) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglNormal3bv: v\r\t\"This method was automatically generated.\"\r\t\"void glNormal3bv(GLbyte* v);\"\r\t<cdecl: void 'glNormal3bv' (byte*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglNormal3d: nx with: ny with: nz\r\t\"This method was automatically generated.\"\r\t\"void glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz);\"\r\t<cdecl: void 'glNormal3d' (double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglNormal3dv: v\r\t\"This method was automatically generated.\"\r\t\"void glNormal3dv(GLdouble* v);\"\r\t<cdecl: void 'glNormal3dv' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglNormal3f: nx with: ny with: nz\r\t\"This method was automatically generated.\"\r\t\"void glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz);\"\r\t<cdecl: void 'glNormal3f' (float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglNormal3fv: v\r\t\"This method was automatically generated.\"\r\t\"void glNormal3fv(GLfloat* v);\"\r\t<cdecl: void 'glNormal3fv' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglNormal3i: nx with: ny with: nz\r\t\"This method was automatically generated.\"\r\t\"void glNormal3i(GLint nx, GLint ny, GLint nz);\"\r\t<cdecl: void 'glNormal3i' (long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglNormal3iv: v\r\t\"This method was automatically generated.\"\r\t\"void glNormal3iv(GLint* v);\"\r\t<cdecl: void 'glNormal3iv' (long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglNormal3s: nx with: ny with: nz\r\t\"This method was automatically generated.\"\r\t\"void glNormal3s(GLshort nx, GLshort ny, GLshort nz);\"\r\t<cdecl: void 'glNormal3s' (short short short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglNormal3sv: v\r\t\"This method was automatically generated.\"\r\t\"void glNormal3sv(GLshort* v);\"\r\t<cdecl: void 'glNormal3sv' (short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglNormalPointer: type with: stride with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glNormalPointer(GLenum type, GLsizei stride, GLvoid* pointer);\"\r\t<cdecl: void 'glNormalPointer' (ulong long void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglNormalPointerEXT: type with: stride with: count with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glNormalPointerEXT(GLenum type, GLsizei stride, GLsizei count, GLvoid* pointer);\"\r\t<cdecl: void 'glNormalPointerEXT' (ulong long long void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglOrtho: left with: right with: bottom with: top with: zNear with: zFar\r\t\"This method was automatically generated.\"\r\t\"void glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);\"\r\t<cdecl: void 'glOrtho' (double double double double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPassThrough: token\r\t\"This method was automatically generated.\"\r\t\"void glPassThrough(GLfloat token);\"\r\t<cdecl: void 'glPassThrough' (float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPixelMapfv: map with: mapsize with: values\r\t\"This method was automatically generated.\"\r\t\"void glPixelMapfv(GLenum map, GLint mapsize, GLfloat* values);\"\r\t<cdecl: void 'glPixelMapfv' (ulong long float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPixelMapuiv: map with: mapsize with: values\r\t\"This method was automatically generated.\"\r\t\"void glPixelMapuiv(GLenum map, GLint mapsize, GLuint* values);\"\r\t<cdecl: void 'glPixelMapuiv' (ulong long ulong*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPixelMapusv: map with: mapsize with: values\r\t\"This method was automatically generated.\"\r\t\"void glPixelMapusv(GLenum map, GLint mapsize, GLushort* values);\"\r\t<cdecl: void 'glPixelMapusv' (ulong long ushort*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPixelStoref: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glPixelStoref(GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glPixelStoref' (ulong float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPixelStorei: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glPixelStorei(GLenum pname, GLint param);\"\r\t<cdecl: void 'glPixelStorei' (ulong long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPixelTransferf: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glPixelTransferf(GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glPixelTransferf' (ulong float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPixelTransferi: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glPixelTransferi(GLenum pname, GLint param);\"\r\t<cdecl: void 'glPixelTransferi' (ulong long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPixelZoom: xfactor with: yfactor\r\t\"This method was automatically generated.\"\r\t\"void glPixelZoom(GLfloat xfactor, GLfloat yfactor);\"\r\t<cdecl: void 'glPixelZoom' (float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPointSize: size\r\t\"This method was automatically generated.\"\r\t\"void glPointSize(GLfloat size);\"\r\t<cdecl: void 'glPointSize' (float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPolygonMode: face with: mode\r\t\"This method was automatically generated.\"\r\t\"void glPolygonMode(GLenum face, GLenum mode);\"\r\t<cdecl: void 'glPolygonMode' (ulong ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPolygonOffset: factor with: units\r\t\"This method was automatically generated.\"\r\t\"void glPolygonOffset(GLfloat factor, GLfloat units);\"\r\t<cdecl: void 'glPolygonOffset' (float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPolygonStipple: mask\r\t\"This method was automatically generated.\"\r\t\"void glPolygonStipple(GLubyte* mask);\"\r\t<cdecl: void 'glPolygonStipple' (byte*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPopAttrib\r\t\"This method was automatically generated.\"\r\t\"void glPopAttrib();\"\r\t<cdecl: void 'glPopAttrib' (void) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPopClientAttrib\r\t\"This method was automatically generated.\"\r\t\"void glPopClientAttrib();\"\r\t<cdecl: void 'glPopClientAttrib' (void) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPopMatrix\r\t\"This method was automatically generated.\"\r\t\"void glPopMatrix();\"\r\t<cdecl: void 'glPopMatrix' (void) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPopName\r\t\"This method was automatically generated.\"\r\t\"void glPopName();\"\r\t<cdecl: void 'glPopName' (void) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPrioritizeTextures: n with: texturez with: priorities\r\t\"This method was automatically generated.\"\r\t\"void glPrioritizeTextures(GLsizei n, GLuint* textures, GLclampf* priorities);\"\r\t<cdecl: void 'glPrioritizeTextures' (long ulong* float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPushAttrib: mask\r\t\"This method was automatically generated.\"\r\t\"void glPushAttrib(GLbitfield mask);\"\r\t<cdecl: void 'glPushAttrib' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPushClientAttrib: mask\r\t\"This method was automatically generated.\"\r\t\"void glPushClientAttrib(GLbitfield mask);\"\r\t<cdecl: void 'glPushClientAttrib' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPushMatrix\r\t\"This method was automatically generated.\"\r\t\"void glPushMatrix();\"\r\t<cdecl: void 'glPushMatrix' (void) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglPushName: name\r\t\"This method was automatically generated.\"\r\t\"void glPushName(GLuint name);\"\r\t<cdecl: void 'glPushName' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos2d: x with: y\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos2d(GLdouble x, GLdouble y);\"\r\t<cdecl: void 'glRasterPos2d' (double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos2dv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos2dv(GLdouble* v);\"\r\t<cdecl: void 'glRasterPos2dv' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos2f: x with: y\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos2f(GLfloat x, GLfloat y);\"\r\t<cdecl: void 'glRasterPos2f' (float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos2fv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos2fv(GLfloat* v);\"\r\t<cdecl: void 'glRasterPos2fv' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos2i: x with: y\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos2i(GLint x, GLint y);\"\r\t<cdecl: void 'glRasterPos2i' (long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos2iv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos2iv(GLint* v);\"\r\t<cdecl: void 'glRasterPos2iv' (long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos2s: x with: y\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos2s(GLshort x, GLshort y);\"\r\t<cdecl: void 'glRasterPos2s' (short short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos2sv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos2sv(GLshort* v);\"\r\t<cdecl: void 'glRasterPos2sv' (short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos3d: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos3d(GLdouble x, GLdouble y, GLdouble z);\"\r\t<cdecl: void 'glRasterPos3d' (double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos3dv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos3dv(GLdouble* v);\"\r\t<cdecl: void 'glRasterPos3dv' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos3f: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos3f(GLfloat x, GLfloat y, GLfloat z);\"\r\t<cdecl: void 'glRasterPos3f' (float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos3fv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos3fv(GLfloat* v);\"\r\t<cdecl: void 'glRasterPos3fv' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos3i: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos3i(GLint x, GLint y, GLint z);\"\r\t<cdecl: void 'glRasterPos3i' (long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos3iv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos3iv(GLint* v);\"\r\t<cdecl: void 'glRasterPos3iv' (long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos3s: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos3s(GLshort x, GLshort y, GLshort z);\"\r\t<cdecl: void 'glRasterPos3s' (short short short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos3sv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos3sv(GLshort* v);\"\r\t<cdecl: void 'glRasterPos3sv' (short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos4d: x with: y with: z with: w\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w);\"\r\t<cdecl: void 'glRasterPos4d' (double double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos4dv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos4dv(GLdouble* v);\"\r\t<cdecl: void 'glRasterPos4dv' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos4f: x with: y with: z with: w\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w);\"\r\t<cdecl: void 'glRasterPos4f' (float float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos4fv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos4fv(GLfloat* v);\"\r\t<cdecl: void 'glRasterPos4fv' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos4i: x with: y with: z with: w\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos4i(GLint x, GLint y, GLint z, GLint w);\"\r\t<cdecl: void 'glRasterPos4i' (long long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos4iv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos4iv(GLint* v);\"\r\t<cdecl: void 'glRasterPos4iv' (long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos4s: x with: y with: z with: w\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w);\"\r\t<cdecl: void 'glRasterPos4s' (short short short short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRasterPos4sv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos4sv(GLshort* v);\"\r\t<cdecl: void 'glRasterPos4sv' (short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglReadBuffer: mode\r\t\"This method was automatically generated.\"\r\t\"void glReadBuffer(GLenum mode);\"\r\t<cdecl: void 'glReadBuffer' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglReadPixels: x with: y with: width with: height with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glReadPixels' (long long long long ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRectd: x1 with: y1 with: x2 with: y2\r\t\"This method was automatically generated.\"\r\t\"void glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);\"\r\t<cdecl: void 'glRectd' (double double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRectdv: v1 with: v2\r\t\"This method was automatically generated.\"\r\t\"void glRectdv(GLdouble* v1, GLdouble* v2);\"\r\t<cdecl: void 'glRectdv' (double* double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRectf: x1 with: y1 with: x2 with: y2\r\t\"This method was automatically generated.\"\r\t\"void glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);\"\r\t<cdecl: void 'glRectf' (float float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRectfv: v1 with: v2\r\t\"This method was automatically generated.\"\r\t\"void glRectfv(GLfloat* v1, GLfloat* v2);\"\r\t<cdecl: void 'glRectfv' (float* float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRecti: x1 with: y1 with: x2 with: y2\r\t\"This method was automatically generated.\"\r\t\"void glRecti(GLint x1, GLint y1, GLint x2, GLint y2);\"\r\t<cdecl: void 'glRecti' (long long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRectiv: v1 with: v2\r\t\"This method was automatically generated.\"\r\t\"void glRectiv(GLint* v1, GLint* v2);\"\r\t<cdecl: void 'glRectiv' (long* long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRects: x1 with: y1 with: x2 with: y2\r\t\"This method was automatically generated.\"\r\t\"void glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2);\"\r\t<cdecl: void 'glRects' (short short short short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRectsv: v1 with: v2\r\t\"This method was automatically generated.\"\r\t\"void glRectsv(GLshort* v1, GLshort* v2);\"\r\t<cdecl: void 'glRectsv' (short* short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRenderMode: mode\r\t\"This method was automatically generated.\"\r\t\"GLint glRenderMode(GLenum mode);\"\r\t<cdecl: long 'glRenderMode' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglResetHistogram: target\r\t\"This method was automatically generated.\"\r\t\"void glResetHistogram(GLenum target);\"\r\t<cdecl: void 'glResetHistogram' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglResetMinmax: target\r\t\"This method was automatically generated.\"\r\t\"void glResetMinmax(GLenum target);\"\r\t<cdecl: void 'glResetMinmax' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRotated: angle with: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);\"\r\t<cdecl: void 'glRotated' (double double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglRotatef: angle with: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);\"\r\t<cdecl: void 'glRotatef' (float float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglScaled: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glScaled(GLdouble x, GLdouble y, GLdouble z);\"\r\t<cdecl: void 'glScaled' (double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglScalef: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glScalef(GLfloat x, GLfloat y, GLfloat z);\"\r\t<cdecl: void 'glScalef' (float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglScissor: x with: y with: width with: height\r\t\"This method was automatically generated.\"\r\t\"void glScissor(GLint x, GLint y, GLsizei width, GLsizei height);\"\r\t<cdecl: void 'glScissor' (long long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglSelectBuffer: size with: buffer\r\t\"This method was automatically generated.\"\r\t\"void glSelectBuffer(GLsizei size, GLuint* buffer);\"\r\t<cdecl: void 'glSelectBuffer' (long ulong*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglSeparableFilter2D: targt with: internalformat with: width with: height with: format with: type with: row with: column\r\t\"This method was automatically generated.\"\r\t\"void glSeparableFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* row, GLvoid* column);\"\r\t<cdecl: void 'glSeparableFilter2D' (ulong ulong long long ulong ulong void* void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglShadeModel: mode\r\t\"This method was automatically generated.\"\r\t\"void glShadeModel(GLenum mode);\"\r\t<cdecl: void 'glShadeModel' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglStencilFunc: func with: ref with: mask\r\t\"This method was automatically generated.\"\r\t\"void glStencilFunc(GLenum func, GLint ref, GLuint mask);\"\r\t<cdecl: void 'glStencilFunc' (ulong long ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglStencilMask: mask\r\t\"This method was automatically generated.\"\r\t\"void glStencilMask(GLuint mask);\"\r\t<cdecl: void 'glStencilMask' (ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglStencilOp: fail with: zfail with: zpass\r\t\"This method was automatically generated.\"\r\t\"void glStencilOp(GLenum fail, GLenum zfail, GLenum zpass);\"\r\t<cdecl: void 'glStencilOp' (ulong ulong ulong) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord1d: s\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord1d(GLdouble s);\"\r\t<cdecl: void 'glTexCoord1d' (double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord1dv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord1dv(GLdouble* v);\"\r\t<cdecl: void 'glTexCoord1dv' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord1f: s\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord1f(GLfloat s);\"\r\t<cdecl: void 'glTexCoord1f' (float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord1fv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord1fv(GLfloat* v);\"\r\t<cdecl: void 'glTexCoord1fv' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord1i: s\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord1i(GLint s);\"\r\t<cdecl: void 'glTexCoord1i' (long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord1iv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord1iv(GLint* v);\"\r\t<cdecl: void 'glTexCoord1iv' (long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord1s: s\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord1s(GLshort s);\"\r\t<cdecl: void 'glTexCoord1s' (short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord1sv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord1sv(GLshort* v);\"\r\t<cdecl: void 'glTexCoord1sv' (short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord2d: s with: t\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord2d(GLdouble s, GLdouble t);\"\r\t<cdecl: void 'glTexCoord2d' (double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord2dv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord2dv(GLdouble* v);\"\r\t<cdecl: void 'glTexCoord2dv' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord2f: s with: t\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord2f(GLfloat s, GLfloat t);\"\r\t<cdecl: void 'glTexCoord2f' (float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord2fv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord2fv(GLfloat* v);\"\r\t<cdecl: void 'glTexCoord2fv' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord2i: s with: t\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord2i(GLint s, GLint t);\"\r\t<cdecl: void 'glTexCoord2i' (long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord2iv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord2iv(GLint* v);\"\r\t<cdecl: void 'glTexCoord2iv' (long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord2s: s with: t\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord2s(GLshort s, GLshort t);\"\r\t<cdecl: void 'glTexCoord2s' (short short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord2sv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord2sv(GLshort* v);\"\r\t<cdecl: void 'glTexCoord2sv' (short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord3d: s with: t with: r\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord3d(GLdouble s, GLdouble t, GLdouble r);\"\r\t<cdecl: void 'glTexCoord3d' (double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord3dv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord3dv(GLdouble* v);\"\r\t<cdecl: void 'glTexCoord3dv' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord3f: s with: t with: r\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord3f(GLfloat s, GLfloat t, GLfloat r);\"\r\t<cdecl: void 'glTexCoord3f' (float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord3fv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord3fv(GLfloat* v);\"\r\t<cdecl: void 'glTexCoord3fv' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord3i: s with: t with: r\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord3i(GLint s, GLint t, GLint r);\"\r\t<cdecl: void 'glTexCoord3i' (long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord3iv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord3iv(GLint* v);\"\r\t<cdecl: void 'glTexCoord3iv' (long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord3s: s with: t with: r\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord3s(GLshort s, GLshort t, GLshort r);\"\r\t<cdecl: void 'glTexCoord3s' (short short short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord3sv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord3sv(GLshort* v);\"\r\t<cdecl: void 'glTexCoord3sv' (short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord4d: s with: t with: r with: q\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q);\"\r\t<cdecl: void 'glTexCoord4d' (double double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord4dv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord4dv(GLdouble* v);\"\r\t<cdecl: void 'glTexCoord4dv' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord4f: s with: t with: r with: q\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q);\"\r\t<cdecl: void 'glTexCoord4f' (float float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord4fv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord4fv(GLfloat* v);\"\r\t<cdecl: void 'glTexCoord4fv' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord4i: s with: t with: r with: q\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord4i(GLint s, GLint t, GLint r, GLint q);\"\r\t<cdecl: void 'glTexCoord4i' (long long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord4iv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord4iv(GLint* v);\"\r\t<cdecl: void 'glTexCoord4iv' (long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord4s: s with: t with: r with: q\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q);\"\r\t<cdecl: void 'glTexCoord4s' (short short short short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoord4sv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord4sv(GLshort* v);\"\r\t<cdecl: void 'glTexCoord4sv' (short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoordPointer: size with: type with: stride with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glTexCoordPointer(GLint size, GLenum type, GLsizei stride, GLvoid* pointer);\"\r\t<cdecl: void 'glTexCoordPointer' (long ulong long void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexCoordPointerEXT: size with: type with: stride with: count with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glTexCoordPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid* pointer);\"\r\t<cdecl: void 'glTexCoordPointerEXT' (long ulong long long void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexEnvf: targt with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glTexEnvf(GLenum target, GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glTexEnvf' (ulong ulong float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexEnvfv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glTexEnvfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glTexEnvfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexEnvi: targt with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glTexEnvi(GLenum target, GLenum pname, GLint param);\"\r\t<cdecl: void 'glTexEnvi' (ulong ulong long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexEnviv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glTexEnviv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glTexEnviv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexGend: coord with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glTexGend(GLenum coord, GLenum pname, GLdouble param);\"\r\t<cdecl: void 'glTexGend' (ulong ulong double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexGendv: coord with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glTexGendv(GLenum coord, GLenum pname, GLdouble* params);\"\r\t<cdecl: void 'glTexGendv' (ulong ulong double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexGenf: coord with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glTexGenf(GLenum coord, GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glTexGenf' (ulong ulong float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexGenfv: coord with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glTexGenfv(GLenum coord, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glTexGenfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexGeni: coord with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glTexGeni(GLenum coord, GLenum pname, GLint param);\"\r\t<cdecl: void 'glTexGeni' (ulong ulong long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexGeniv: coord with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glTexGeniv(GLenum coord, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glTexGeniv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexImage1D: targt with: level with: internalformat with: width with: border with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glTexImage1D' (ulong long long long long ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexImage2D: targt with: level with: internalformat with: width with: height with: border with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glTexImage2D' (ulong long long long long long ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexImage3D: targt with: level with: internalformat with: width with: height with: depth with: border with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glTexImage3D' (ulong long ulong long long long long ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexParameterf: targt with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glTexParameterf(GLenum target, GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glTexParameterf' (ulong ulong float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexParameterfv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glTexParameterfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glTexParameterfv' (ulong ulong float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexParameteri: targt with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glTexParameteri(GLenum target, GLenum pname, GLint param);\"\r\t<cdecl: void 'glTexParameteri' (ulong ulong long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexParameteriv: targt with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glTexParameteriv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glTexParameteriv' (ulong ulong long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexSubImage1D: targt with: level with: xoffset with: width with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glTexSubImage1D' (ulong long long long ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexSubImage2D: targt with: level with: xoffset with: yoffset with: width with: height with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glTexSubImage2D' (ulong long long long long long ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTexSubImage3D: targt with: level with: xoffset with: yoffset with: zoffset with: width with: height with: depth with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glTexSubImage3D' (ulong long long long long long long long ulong ulong void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTranslated: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glTranslated(GLdouble x, GLdouble y, GLdouble z);\"\r\t<cdecl: void 'glTranslated' (double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglTranslatef: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glTranslatef(GLfloat x, GLfloat y, GLfloat z);\"\r\t<cdecl: void 'glTranslatef' (float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglUnlockArraysEXT\r\t\"This method was automatically generated.\"\r\t\"void glUnlockArraysEXT();\"\r\t<cdecl: void 'glUnlockArraysEXT' (void) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex2d: x with: y\r\t\"This method was automatically generated.\"\r\t\"void glVertex2d(GLdouble x, GLdouble y);\"\r\t<cdecl: void 'glVertex2d' (double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex2dv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex2dv(GLdouble* v);\"\r\t<cdecl: void 'glVertex2dv' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex2f: x with: y\r\t\"This method was automatically generated.\"\r\t\"void glVertex2f(GLfloat x, GLfloat y);\"\r\t<cdecl: void 'glVertex2f' (float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex2fv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex2fv(GLfloat* v);\"\r\t<cdecl: void 'glVertex2fv' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex2i: x with: y\r\t\"This method was automatically generated.\"\r\t\"void glVertex2i(GLint x, GLint y);\"\r\t<cdecl: void 'glVertex2i' (long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex2iv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex2iv(GLint* v);\"\r\t<cdecl: void 'glVertex2iv' (long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex2s: x with: y\r\t\"This method was automatically generated.\"\r\t\"void glVertex2s(GLshort x, GLshort y);\"\r\t<cdecl: void 'glVertex2s' (short short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex2sv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex2sv(GLshort* v);\"\r\t<cdecl: void 'glVertex2sv' (short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex3d: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glVertex3d(GLdouble x, GLdouble y, GLdouble z);\"\r\t<cdecl: void 'glVertex3d' (double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex3dv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex3dv(GLdouble* v);\"\r\t<cdecl: void 'glVertex3dv' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex3f: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glVertex3f(GLfloat x, GLfloat y, GLfloat z);\"\r\t<cdecl: void 'glVertex3f' (float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex3fv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex3fv(GLfloat* v);\"\r\t<cdecl: void 'glVertex3fv' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex3i: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glVertex3i(GLint x, GLint y, GLint z);\"\r\t<cdecl: void 'glVertex3i' (long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex3iv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex3iv(GLint* v);\"\r\t<cdecl: void 'glVertex3iv' (long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex3s: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glVertex3s(GLshort x, GLshort y, GLshort z);\"\r\t<cdecl: void 'glVertex3s' (short short short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex3sv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex3sv(GLshort* v);\"\r\t<cdecl: void 'glVertex3sv' (short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex4d: x with: y with: z with: w\r\t\"This method was automatically generated.\"\r\t\"void glVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w);\"\r\t<cdecl: void 'glVertex4d' (double double double double) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex4dv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex4dv(GLdouble* v);\"\r\t<cdecl: void 'glVertex4dv' (double*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex4f: x with: y with: z with: w\r\t\"This method was automatically generated.\"\r\t\"void glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w);\"\r\t<cdecl: void 'glVertex4f' (float float float float) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex4fv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex4fv(GLfloat* v);\"\r\t<cdecl: void 'glVertex4fv' (float*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex4i: x with: y with: z with: w\r\t\"This method was automatically generated.\"\r\t\"void glVertex4i(GLint x, GLint y, GLint z, GLint w);\"\r\t<cdecl: void 'glVertex4i' (long long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex4iv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex4iv(GLint* v);\"\r\t<cdecl: void 'glVertex4iv' (long*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex4s: x with: y with: z with: w\r\t\"This method was automatically generated.\"\r\t\"void glVertex4s(GLshort x, GLshort y, GLshort z, GLshort w);\"\r\t<cdecl: void 'glVertex4s' (short short short short) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertex4sv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex4sv(GLshort* v);\"\r\t<cdecl: void 'glVertex4sv' (short*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertexPointer: size with: type with: stride with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glVertexPointer(GLint size, GLenum type, GLsizei stride, GLvoid* pointer);\"\r\t<cdecl: void 'glVertexPointer' (long ulong long void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglVertexPointerEXT: size with: type with: stride with: count with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glVertexPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid* pointer);\"\r\t<cdecl: void 'glVertexPointerEXT' (long ulong long long void*) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r!GLXUnixQuartz methodsFor: 'OpenGL API' stamp: 'ikp 1/7/2003 21:14'!\rglViewport: x with: y with: width with: height\r\t\"This method was automatically generated.\"\r\t\"void glViewport(GLint x, GLint y, GLsizei width, GLsizei height);\"\r\t<cdecl: void 'glViewport' (long long long long) module: 'OpenGL'>\r\t^self externalCallFailed! !\r\r\r!GLXUnixQuartz class methodsFor: 'as yet unclassified' stamp: 'ikp 1/16/2003 05:38'!\rtest\r\t\"GLXUnixOSX test\"\r\r\t<cdecl: void 'ffiTest2' (long long) module: 'B3DAcceleratorPlugin'>\r\t^self error: 'test failed'! !\r\r!GLXUnixQuartz class methodsFor: 'as yet unclassified' stamp: 'ikp 1/16/2003 05:39'!\rtest: x with: y\r\t\"GLXUnixOSX test: 6 with: 7\"\r\r\t<cdecl: void 'ffiTest2' (long long) module: 'B3DAcceleratorPlugin'>\r\t^self error: 'test failed'! !\r\r\r!GLXUnixX11BE methodsFor: 'accessing' stamp: 'bf 10/21/2002 19:10'!\rimagePixelFormat32\r\t^GLBgra! !\r\r!GLXUnixX11BE methodsFor: 'accessing' stamp: 'ikp 2/3/2003 17:01'!\rimagePixelType32\r\t^GLUnsignedInt8888Rev! !\r\r!GLXUnixX11BE methodsFor: 'accessing' stamp: 'bf 10/21/2002 19:15'!\rtextureInternalFormat\r\t^GLRgba! !\r\r!GLXUnixX11BE methodsFor: 'accessing' stamp: 'bf 10/21/2002 19:09'!\rtexturePixelFormat\r\t^GLBgra! !\r\r!GLXUnixX11BE methodsFor: 'accessing' stamp: 'ikp 2/3/2003 17:02'!\rtexturePixelType\r\t^GLUnsignedInt8888Rev! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglAccum: op with: value\r\t\"This method was automatically generated.\"\r\t\"void glAccum(GLenum op, GLfloat value);\"\r\t<cdecl: void 'glAccum' (ulong float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglActiveTextureARB: texture\r\t\"This method was automatically generated.\"\r\t\"void glActiveTextureARB(GLenum texture);\"\r\t<cdecl: void 'glActiveTextureARB' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglAlphaFunc: func with: ref\r\t\"This method was automatically generated.\"\r\t\"void glAlphaFunc(GLenum func, GLclampf ref);\"\r\t<cdecl: void 'glAlphaFunc' (ulong float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglAreTexturesResident: n with: textures with: residences\r\t\"This method was automatically generated.\"\r\t\"GLboolean glAreTexturesResident(GLsizei n, GLuint* textures, GLboolean* residences);\"\r\t<cdecl: bool 'glAreTexturesResident' (long ulong* ulong*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglAreTexturesResidentEXT: n with: textures with: residences\r\t\"This method was automatically generated.\"\r\t\"GLboolean glAreTexturesResidentEXT(GLsizei n, GLuint* textures, GLboolean* residences);\"\r\t<cdecl: bool 'glAreTexturesResidentEXT' (long ulong* ulong*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglArrayElement: i\r\t\"This method was automatically generated.\"\r\t\"void glArrayElement(GLint i);\"\r\t<cdecl: void 'glArrayElement' (long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglArrayElementEXT: i\r\t\"This method was automatically generated.\"\r\t\"void glArrayElementEXT(GLint i);\"\r\t<cdecl: void 'glArrayElementEXT' (long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglBegin: mode\r\t\"This method was automatically generated.\"\r\t\"void glBegin(GLenum mode);\"\r\t<cdecl: void 'glBegin' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglBindTexture: target with: texture\r\t\"This method was automatically generated.\"\r\t\"void glBindTexture(GLenum target, GLuint texture);\"\r\t<cdecl: void 'glBindTexture' (ulong ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglBitmap: width with: height with: xorig with: yorig with: xmove with: ymove with: bitmap\r\t\"This method was automatically generated.\"\r\t\"void glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, GLubyte* bitmap);\"\r\t<cdecl: void 'glBitmap' (long long float float float float void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglBlendColor: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);\"\r\t<cdecl: void 'glBlendColor' (float float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglBlendEquation: mode\r\t\"This method was automatically generated.\"\r\t\"void glBlendEquation(GLenum mode);\"\r\t<cdecl: void 'glBlendEquation' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglBlendFunc: sfactor with: dfactor\r\t\"This method was automatically generated.\"\r\t\"void glBlendFunc(GLenum sfactor, GLenum dfactor);\"\r\t<cdecl: void 'glBlendFunc' (ulong ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglCallList: list\r\t\"This method was automatically generated.\"\r\t\"void glCallList(GLuint list);\"\r\t<cdecl: void 'glCallList' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglCallLists: n with: type with: lists\r\t\"This method was automatically generated.\"\r\t\"void glCallLists(GLsizei n, GLenum type, GLvoid* lists);\"\r\t<cdecl: void 'glCallLists' (long ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglClear: mask\r\t\"This method was automatically generated.\"\r\t\"void glClear(GLbitfield mask);\"\r\t<cdecl: void 'glClear' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglClearAccum: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);\"\r\t<cdecl: void 'glClearAccum' (float float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglClearColor: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);\"\r\t<cdecl: void 'glClearColor' (float float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglClearDepth: depth\r\t\"This method was automatically generated.\"\r\t\"void glClearDepth(GLclampd depth);\"\r\t<cdecl: void 'glClearDepth' (double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglClearIndex: c\r\t\"This method was automatically generated.\"\r\t\"void glClearIndex(GLfloat c);\"\r\t<cdecl: void 'glClearIndex' (float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglClearStencil: s\r\t\"This method was automatically generated.\"\r\t\"void glClearStencil(GLint s);\"\r\t<cdecl: void 'glClearStencil' (long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglClientActiveTextureARB: texture\r\t\"This method was automatically generated.\"\r\t\"void glClientActiveTextureARB(GLenum texture);\"\r\t<cdecl: void 'glClientActiveTextureARB' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglClipPlane: plane with: equation\r\t\"This method was automatically generated.\"\r\t\"void glClipPlane(GLenum plane, GLdouble* equation);\"\r\t<cdecl: void 'glClipPlane' (ulong double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor3b: red with: green with: blue\r\t\"This method was automatically generated.\"\r\t\"void glColor3b(GLbyte red, GLbyte green, GLbyte blue);\"\r\t<cdecl: void 'glColor3b' (byte byte byte) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor3bv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor3bv(GLbyte* v);\"\r\t<cdecl: void 'glColor3bv' (byte*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor3d: red with: green with: blue\r\t\"This method was automatically generated.\"\r\t\"void glColor3d(GLdouble red, GLdouble green, GLdouble blue);\"\r\t<cdecl: void 'glColor3d' (double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor3dv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor3dv(GLdouble* v);\"\r\t<cdecl: void 'glColor3dv' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor3f: red with: green with: blue\r\t\"This method was automatically generated.\"\r\t\"void glColor3f(GLfloat red, GLfloat green, GLfloat blue);\"\r\t<cdecl: void 'glColor3f' (float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor3fv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor3fv(GLfloat* v);\"\r\t<cdecl: void 'glColor3fv' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor3i: red with: green with: blue\r\t\"This method was automatically generated.\"\r\t\"void glColor3i(GLint red, GLint green, GLint blue);\"\r\t<cdecl: void 'glColor3i' (long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor3iv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor3iv(GLint* v);\"\r\t<cdecl: void 'glColor3iv' (long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor3s: red with: green with: blue\r\t\"This method was automatically generated.\"\r\t\"void glColor3s(GLshort red, GLshort green, GLshort blue);\"\r\t<cdecl: void 'glColor3s' (short short short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor3sv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor3sv(GLshort* v);\"\r\t<cdecl: void 'glColor3sv' (short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor3ub: red with: green with: blue\r\t\"This method was automatically generated.\"\r\t\"void glColor3ub(GLubyte red, GLubyte green, GLubyte blue);\"\r\t<cdecl: void 'glColor3ub' (byte byte byte) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor3ubv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor3ubv(GLubyte* v);\"\r\t<cdecl: void 'glColor3ubv' (byte*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor3ui: red with: green with: blue\r\t\"This method was automatically generated.\"\r\t\"void glColor3ui(GLuint red, GLuint green, GLuint blue);\"\r\t<cdecl: void 'glColor3ui' (ulong ulong ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor3uiv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor3uiv(GLuint* v);\"\r\t<cdecl: void 'glColor3uiv' (ulong*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor3us: red with: green with: blue\r\t\"This method was automatically generated.\"\r\t\"void glColor3us(GLushort red, GLushort green, GLushort blue);\"\r\t<cdecl: void 'glColor3us' (ushort ushort ushort) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor3usv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor3usv(GLushort* v);\"\r\t<cdecl: void 'glColor3usv' (ushort*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor4b: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);\"\r\t<cdecl: void 'glColor4b' (byte byte byte byte) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor4bv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor4bv(GLbyte* v);\"\r\t<cdecl: void 'glColor4bv' (byte*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor4d: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);\"\r\t<cdecl: void 'glColor4d' (double double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor4dv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor4dv(GLdouble* v);\"\r\t<cdecl: void 'glColor4dv' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor4f: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);\"\r\t<cdecl: void 'glColor4f' (float float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor4fv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor4fv(GLfloat* v);\"\r\t<cdecl: void 'glColor4fv' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor4i: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColor4i(GLint red, GLint green, GLint blue, GLint alpha);\"\r\t<cdecl: void 'glColor4i' (long long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor4iv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor4iv(GLint* v);\"\r\t<cdecl: void 'glColor4iv' (long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor4s: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha);\"\r\t<cdecl: void 'glColor4s' (short short short short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor4sv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor4sv(GLshort* v);\"\r\t<cdecl: void 'glColor4sv' (short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor4ub: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);\"\r\t<cdecl: void 'glColor4ub' (byte byte byte byte) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor4ubv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor4ubv(GLubyte* v);\"\r\t<cdecl: void 'glColor4ubv' (byte*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor4ui: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha);\"\r\t<cdecl: void 'glColor4ui' (ulong ulong ulong ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor4uiv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor4uiv(GLuint* v);\"\r\t<cdecl: void 'glColor4uiv' (ulong*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor4us: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha);\"\r\t<cdecl: void 'glColor4us' (ushort ushort ushort ushort) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColor4usv: v\r\t\"This method was automatically generated.\"\r\t\"void glColor4usv(GLushort* v);\"\r\t<cdecl: void 'glColor4usv' (ushort*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColorMask: red with: green with: blue with: alpha\r\t\"This method was automatically generated.\"\r\t\"void glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);\"\r\t<cdecl: void 'glColorMask' (bool bool bool bool) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColorMaterial: face with: mode\r\t\"This method was automatically generated.\"\r\t\"void glColorMaterial(GLenum face, GLenum mode);\"\r\t<cdecl: void 'glColorMaterial' (ulong ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColorPointer: size with: type with: stride with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glColorPointer(GLint size, GLenum type, GLsizei stride, GLvoid* pointer);\"\r\t<cdecl: void 'glColorPointer' (long ulong long void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColorPointerEXT: size with: type with: stride with: count with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glColorPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid* pointer);\"\r\t<cdecl: void 'glColorPointerEXT' (long ulong long long void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColorSubTable: target with: start with: count with: format with: type with: data\r\t\"This method was automatically generated.\"\r\t\"void glColorSubTable(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, GLvoid* data);\"\r\t<cdecl: void 'glColorSubTable' (ulong long long ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColorTable: target with: internalformat with: width with: format with: type with: table\r\t\"This method was automatically generated.\"\r\t\"void glColorTable(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, GLvoid* table);\"\r\t<cdecl: void 'glColorTable' (ulong ulong long ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColorTableParameterfv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glColorTableParameterfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glColorTableParameterfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglColorTableParameteriv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glColorTableParameteriv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glColorTableParameteriv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglConvolutionFilter1D: target with: internalformat with: width with: format with: type with: image\r\t\"This method was automatically generated.\"\r\t\"void glConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, GLvoid* image);\"\r\t<cdecl: void 'glConvolutionFilter1D' (ulong ulong long ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglConvolutionFilter2D: target with: internalformat with: width with: height with: format with: type with: image\r\t\"This method was automatically generated.\"\r\t\"void glConvolutionFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* image);\"\r\t<cdecl: void 'glConvolutionFilter2D' (ulong ulong long long ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglConvolutionParameterf: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glConvolutionParameterf(GLenum target, GLenum pname, GLfloat params);\"\r\t<cdecl: void 'glConvolutionParameterf' (ulong ulong float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglConvolutionParameterfv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glConvolutionParameterfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glConvolutionParameterfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglConvolutionParameteri: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glConvolutionParameteri(GLenum target, GLenum pname, GLint params);\"\r\t<cdecl: void 'glConvolutionParameteri' (ulong ulong long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglConvolutionParameteriv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glConvolutionParameteriv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glConvolutionParameteriv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglCopyColorSubTable: target with: start with: x with: y with: width\r\t\"This method was automatically generated.\"\r\t\"void glCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);\"\r\t<cdecl: void 'glCopyColorSubTable' (ulong long long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglCopyColorTable: target with: internalformat with: x with: y with: width\r\t\"This method was automatically generated.\"\r\t\"void glCopyColorTable(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);\"\r\t<cdecl: void 'glCopyColorTable' (ulong ulong long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglCopyConvolutionFilter1D: target with: internalformat with: x with: y with: width\r\t\"This method was automatically generated.\"\r\t\"void glCopyConvolutionFilter1D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);\"\r\t<cdecl: void 'glCopyConvolutionFilter1D' (ulong ulong long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglCopyConvolutionFilter2D: target with: internalformat with: x with: y with: width with: height\r\t\"This method was automatically generated.\"\r\t\"void glCopyConvolutionFilter2D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);\"\r\t<cdecl: void 'glCopyConvolutionFilter2D' (ulong ulong long long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglCopyPixels: x with: y with: width with: height with: type\r\t\"This method was automatically generated.\"\r\t\"void glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);\"\r\t<cdecl: void 'glCopyPixels' (long long long long ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglCopyTexImage1D: target with: level with: internalformat with: x with: y with: width with: border\r\t\"This method was automatically generated.\"\r\t\"void glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);\"\r\t<cdecl: void 'glCopyTexImage1D' (ulong long ulong long long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglCopyTexImage2D: target with: level with: internalformat with: x with: y with: width with: height with: border\r\t\"This method was automatically generated.\"\r\t\"void glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);\"\r\t<cdecl: void 'glCopyTexImage2D' (ulong long ulong long long long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglCopyTexSubImage1D: target with: level with: xoffset with: x with: y with: width\r\t\"This method was automatically generated.\"\r\t\"void glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);\"\r\t<cdecl: void 'glCopyTexSubImage1D' (ulong long long long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglCopyTexSubImage2D: target with: level with: xoffset with: yoffset with: x with: y with: width with: height\r\t\"This method was automatically generated.\"\r\t\"void glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);\"\r\t<cdecl: void 'glCopyTexSubImage2D' (ulong long long long long long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglCopyTexSubImage3D: target with: level with: xoffset with: yoffset with: zoffset with: x with: y with: width with: height\r\t\"This method was automatically generated.\"\r\t\"void glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\"\r\t<cdecl: void 'glCopyTexSubImage3D' (ulong long long long long long long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglCullFace: mode\r\t\"This method was automatically generated.\"\r\t\"void glCullFace(GLenum mode);\"\r\t<cdecl: void 'glCullFace' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglDeleteLists: list with: range\r\t\"This method was automatically generated.\"\r\t\"void glDeleteLists(GLuint list, GLsizei range);\"\r\t<cdecl: void 'glDeleteLists' (ulong long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglDeleteTextures: n with: textures\r\t\"This method was automatically generated.\"\r\t\"void glDeleteTextures(GLsizei n, GLuint* textures);\"\r\t<cdecl: void 'glDeleteTextures' (long ulong*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglDeleteTexturesEXT: n with: textures\r\t\"This method was automatically generated.\"\r\t\"void glDeleteTexturesEXT(GLsizei n, GLuint* textures);\"\r\t<cdecl: void 'glDeleteTexturesEXT' (long ulong*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglDepthFunc: func\r\t\"This method was automatically generated.\"\r\t\"void glDepthFunc(GLenum func);\"\r\t<cdecl: void 'glDepthFunc' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglDepthMask: flag\r\t\"This method was automatically generated.\"\r\t\"void glDepthMask(GLboolean flag);\"\r\t<cdecl: void 'glDepthMask' (bool) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglDepthRange: zNear with: zFar\r\t\"This method was automatically generated.\"\r\t\"void glDepthRange(GLclampd zNear, GLclampd zFar);\"\r\t<cdecl: void 'glDepthRange' (double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglDisable: cap\r\t\"This method was automatically generated.\"\r\t\"void glDisable(GLenum cap);\"\r\t<cdecl: void 'glDisable' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglDisableClientState: array\r\t\"This method was automatically generated.\"\r\t\"void glDisableClientState(GLenum array);\"\r\t<cdecl: void 'glDisableClientState' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglDrawArrays: mode with: first with: count\r\t\"This method was automatically generated.\"\r\t\"void glDrawArrays(GLenum mode, GLint first, GLsizei count);\"\r\t<cdecl: void 'glDrawArrays' (ulong long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglDrawArraysEXT: mode with: first with: count\r\t\"This method was automatically generated.\"\r\t\"void glDrawArraysEXT(GLenum mode, GLint first, GLsizei count);\"\r\t<cdecl: void 'glDrawArraysEXT' (ulong long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglDrawBuffer: mode\r\t\"This method was automatically generated.\"\r\t\"void glDrawBuffer(GLenum mode);\"\r\t<cdecl: void 'glDrawBuffer' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglDrawElements: mode with: count with: type with: indices\r\t\"This method was automatically generated.\"\r\t\"void glDrawElements(GLenum mode, GLsizei count, GLenum type, GLvoid* indices);\"\r\t<cdecl: void 'glDrawElements' (ulong long ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglDrawPixels: width with: height with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glDrawPixels' (long long ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglDrawRangeElements: mode with: start with: end with: count with: type with: indices\r\t\"This method was automatically generated.\"\r\t\"void glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLvoid* indices);\"\r\t<cdecl: void 'glDrawRangeElements' (ulong ulong ulong long ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEdgeFlag: flag\r\t\"This method was automatically generated.\"\r\t\"void glEdgeFlag(GLboolean flag);\"\r\t<cdecl: void 'glEdgeFlag' (bool) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEdgeFlagPointer: stride with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glEdgeFlagPointer(GLsizei stride, GLboolean* pointer);\"\r\t<cdecl: void 'glEdgeFlagPointer' (long ulong*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEdgeFlagPointerEXT: stride with: count with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glEdgeFlagPointerEXT(GLsizei stride, GLsizei count, GLboolean* pointer);\"\r\t<cdecl: void 'glEdgeFlagPointerEXT' (long long ulong*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEdgeFlagv: flag\r\t\"This method was automatically generated.\"\r\t\"void glEdgeFlagv(GLboolean* flag);\"\r\t<cdecl: void 'glEdgeFlagv' (ulong*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEnable: cap\r\t\"This method was automatically generated.\"\r\t\"void glEnable(GLenum cap);\"\r\t<cdecl: void 'glEnable' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEnableClientState: array\r\t\"This method was automatically generated.\"\r\t\"void glEnableClientState(GLenum array);\"\r\t<cdecl: void 'glEnableClientState' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEnd\r\t\"This method was automatically generated.\"\r\t\"void glEnd();\"\r\t<cdecl: void 'glEnd' (void) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEndList\r\t\"This method was automatically generated.\"\r\t\"void glEndList();\"\r\t<cdecl: void 'glEndList' (void) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEvalCoord1d: u\r\t\"This method was automatically generated.\"\r\t\"void glEvalCoord1d(GLdouble u);\"\r\t<cdecl: void 'glEvalCoord1d' (double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEvalCoord1dv: u\r\t\"This method was automatically generated.\"\r\t\"void glEvalCoord1dv(GLdouble* u);\"\r\t<cdecl: void 'glEvalCoord1dv' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEvalCoord1f: u\r\t\"This method was automatically generated.\"\r\t\"void glEvalCoord1f(GLfloat u);\"\r\t<cdecl: void 'glEvalCoord1f' (float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEvalCoord1fv: u\r\t\"This method was automatically generated.\"\r\t\"void glEvalCoord1fv(GLfloat* u);\"\r\t<cdecl: void 'glEvalCoord1fv' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEvalCoord2d: u with: v\r\t\"This method was automatically generated.\"\r\t\"void glEvalCoord2d(GLdouble u, GLdouble v);\"\r\t<cdecl: void 'glEvalCoord2d' (double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEvalCoord2dv: u\r\t\"This method was automatically generated.\"\r\t\"void glEvalCoord2dv(GLdouble* u);\"\r\t<cdecl: void 'glEvalCoord2dv' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEvalCoord2f: u with: v\r\t\"This method was automatically generated.\"\r\t\"void glEvalCoord2f(GLfloat u, GLfloat v);\"\r\t<cdecl: void 'glEvalCoord2f' (float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEvalCoord2fv: u\r\t\"This method was automatically generated.\"\r\t\"void glEvalCoord2fv(GLfloat* u);\"\r\t<cdecl: void 'glEvalCoord2fv' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEvalMesh1: mode with: i1 with: i2\r\t\"This method was automatically generated.\"\r\t\"void glEvalMesh1(GLenum mode, GLint i1, GLint i2);\"\r\t<cdecl: void 'glEvalMesh1' (ulong long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEvalMesh2: mode with: i1 with: i2 with: j1 with: j2\r\t\"This method was automatically generated.\"\r\t\"void glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);\"\r\t<cdecl: void 'glEvalMesh2' (ulong long long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEvalPoint1: i\r\t\"This method was automatically generated.\"\r\t\"void glEvalPoint1(GLint i);\"\r\t<cdecl: void 'glEvalPoint1' (long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglEvalPoint2: i with: j\r\t\"This method was automatically generated.\"\r\t\"void glEvalPoint2(GLint i, GLint j);\"\r\t<cdecl: void 'glEvalPoint2' (long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglFeedbackBuffer: size with: type with: buffer\r\t\"This method was automatically generated.\"\r\t\"void glFeedbackBuffer(GLsizei size, GLenum type, GLfloat* buffer);\"\r\t<cdecl: void 'glFeedbackBuffer' (long ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglFinish\r\t\"This method was automatically generated.\"\r\t\"void glFinish();\"\r\t<cdecl: void 'glFinish' (void) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglFlush\r\t\"This method was automatically generated.\"\r\t\"void glFlush();\"\r\t<cdecl: void 'glFlush' (void) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglFogf: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glFogf(GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glFogf' (ulong float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglFogfv: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glFogfv(GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glFogfv' (ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglFogi: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glFogi(GLenum pname, GLint param);\"\r\t<cdecl: void 'glFogi' (ulong long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglFogiv: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glFogiv(GLenum pname, GLint* params);\"\r\t<cdecl: void 'glFogiv' (ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglFrontFace: mode\r\t\"This method was automatically generated.\"\r\t\"void glFrontFace(GLenum mode);\"\r\t<cdecl: void 'glFrontFace' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglFrustum: left with: right with: bottom with: top with: zNear with: zFar\r\t\"This method was automatically generated.\"\r\t\"void glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);\"\r\t<cdecl: void 'glFrustum' (double double double double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGenLists: range\r\t\"This method was automatically generated.\"\r\t\"GLuint glGenLists(GLsizei range);\"\r\t<cdecl: ulong 'glGenLists' (long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGenTextures: n with: textures\r\t\"This method was automatically generated.\"\r\t\"void glGenTextures(GLsizei n, GLuint* textures);\"\r\t<cdecl: void 'glGenTextures' (long ulong*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGenTexturesEXT: n with: textures\r\t\"This method was automatically generated.\"\r\t\"void glGenTexturesEXT(GLsizei n, GLuint* textures);\"\r\t<cdecl: void 'glGenTexturesEXT' (long ulong*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetBooleanv: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetBooleanv(GLenum pname, GLboolean* params);\"\r\t<cdecl: void 'glGetBooleanv' (ulong ulong*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetClipPlane: plane with: equation\r\t\"This method was automatically generated.\"\r\t\"void glGetClipPlane(GLenum plane, GLdouble* equation);\"\r\t<cdecl: void 'glGetClipPlane' (ulong double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetColorTable: target with: format with: type with: table\r\t\"This method was automatically generated.\"\r\t\"void glGetColorTable(GLenum target, GLenum format, GLenum type, GLvoid* table);\"\r\t<cdecl: void 'glGetColorTable' (ulong ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetColorTableParameterfv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetColorTableParameterfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetColorTableParameterfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetColorTableParameteriv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetColorTableParameteriv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetColorTableParameteriv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetConvolutionFilter: target with: format with: type with: image\r\t\"This method was automatically generated.\"\r\t\"void glGetConvolutionFilter(GLenum target, GLenum format, GLenum type, GLvoid* image);\"\r\t<cdecl: void 'glGetConvolutionFilter' (ulong ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetConvolutionParameterfv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetConvolutionParameterfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetConvolutionParameteriv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetConvolutionParameteriv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetConvolutionParameteriv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetDoublev: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetDoublev(GLenum pname, GLdouble* params);\"\r\t<cdecl: void 'glGetDoublev' (ulong double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetError\r\t\"This method was automatically generated.\"\r\t\"GLenum glGetError();\"\r\t<cdecl: ulong 'glGetError' (void) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetFloatv: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetFloatv(GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetFloatv' (ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetHistogram: target with: reset with: format with: type with: values\r\t\"This method was automatically generated.\"\r\t\"void glGetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid* values);\"\r\t<cdecl: void 'glGetHistogram' (ulong bool ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetHistogramParameterfv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetHistogramParameterfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetHistogramParameterfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetHistogramParameteriv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetHistogramParameteriv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetHistogramParameteriv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetIntegerv: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetIntegerv(GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetIntegerv' (ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetLightfv: light with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetLightfv(GLenum light, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetLightfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetLightiv: light with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetLightiv(GLenum light, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetLightiv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetMapdv: target with: query with: v\r\t\"This method was automatically generated.\"\r\t\"void glGetMapdv(GLenum target, GLenum query, GLdouble* v);\"\r\t<cdecl: void 'glGetMapdv' (ulong ulong double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetMapfv: target with: query with: v\r\t\"This method was automatically generated.\"\r\t\"void glGetMapfv(GLenum target, GLenum query, GLfloat* v);\"\r\t<cdecl: void 'glGetMapfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetMapiv: target with: query with: v\r\t\"This method was automatically generated.\"\r\t\"void glGetMapiv(GLenum target, GLenum query, GLint* v);\"\r\t<cdecl: void 'glGetMapiv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetMaterialfv: face with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetMaterialfv(GLenum face, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetMaterialfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetMaterialiv: face with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetMaterialiv(GLenum face, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetMaterialiv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetMinmax: target with: reset with: format with: type with: values\r\t\"This method was automatically generated.\"\r\t\"void glGetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid* values);\"\r\t<cdecl: void 'glGetMinmax' (ulong bool ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetMinmaxParameterfv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetMinmaxParameterfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetMinmaxParameteriv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetMinmaxParameteriv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetMinmaxParameteriv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetPixelMapfv: map with: values\r\t\"This method was automatically generated.\"\r\t\"void glGetPixelMapfv(GLenum map, GLfloat* values);\"\r\t<cdecl: void 'glGetPixelMapfv' (ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetPixelMapuiv: map with: values\r\t\"This method was automatically generated.\"\r\t\"void glGetPixelMapuiv(GLenum map, GLuint* values);\"\r\t<cdecl: void 'glGetPixelMapuiv' (ulong ulong*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetPixelMapusv: map with: values\r\t\"This method was automatically generated.\"\r\t\"void glGetPixelMapusv(GLenum map, GLushort* values);\"\r\t<cdecl: void 'glGetPixelMapusv' (ulong ushort*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetPointerv: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetPointerv(GLenum pname, GLvoid** params);\"\r\t<cdecl: void 'glGetPointerv' (ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetPointervEXT: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetPointervEXT(GLenum pname, GLvoid** params);\"\r\t<cdecl: void 'glGetPointervEXT' (ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetPolygonStipple: mask\r\t\"This method was automatically generated.\"\r\t\"void glGetPolygonStipple(GLubyte* mask);\"\r\t<cdecl: void 'glGetPolygonStipple' (byte*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetSeparableFilter: target with: format with: type with: row with: column with: span\r\t\"This method was automatically generated.\"\r\t\"void glGetSeparableFilter(GLenum target, GLenum format, GLenum type, GLvoid* row, GLvoid* column, GLvoid* span);\"\r\t<cdecl: void 'glGetSeparableFilter' (ulong ulong ulong void* void* void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetString: name\r\t\"This method was automatically generated.\"\r\t\"GLubyte* glGetString(GLenum name);\"\r\t<cdecl: byte* 'glGetString' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetTexEnvfv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexEnvfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetTexEnvfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetTexEnviv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexEnviv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetTexEnviv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetTexGendv: coord with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexGendv(GLenum coord, GLenum pname, GLdouble* params);\"\r\t<cdecl: void 'glGetTexGendv' (ulong ulong double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetTexGenfv: coord with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexGenfv(GLenum coord, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetTexGenfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetTexGeniv: coord with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexGeniv(GLenum coord, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetTexGeniv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetTexImage: target with: level with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glGetTexImage' (ulong long ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetTexLevelParameterfv: target with: level with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetTexLevelParameterfv' (ulong long ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetTexLevelParameteriv: target with: level with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetTexLevelParameteriv' (ulong long ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetTexParameterfv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glGetTexParameterfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglGetTexParameteriv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glGetTexParameteriv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glGetTexParameteriv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglHint: target with: mode\r\t\"This method was automatically generated.\"\r\t\"void glHint(GLenum target, GLenum mode);\"\r\t<cdecl: void 'glHint' (ulong ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglHistogram: target with: width with: internalformat with: sink\r\t\"This method was automatically generated.\"\r\t\"void glHistogram(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);\"\r\t<cdecl: void 'glHistogram' (ulong long ulong bool) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIndexMask: mask\r\t\"This method was automatically generated.\"\r\t\"void glIndexMask(GLuint mask);\"\r\t<cdecl: void 'glIndexMask' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIndexPointer: type with: stride with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glIndexPointer(GLenum type, GLsizei stride, GLvoid* pointer);\"\r\t<cdecl: void 'glIndexPointer' (ulong long void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIndexPointerEXT: type with: stride with: count with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glIndexPointerEXT(GLenum type, GLsizei stride, GLsizei count, GLvoid* pointer);\"\r\t<cdecl: void 'glIndexPointerEXT' (ulong long long void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIndexd: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexd(GLdouble c);\"\r\t<cdecl: void 'glIndexd' (double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIndexdv: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexdv(GLdouble* c);\"\r\t<cdecl: void 'glIndexdv' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIndexf: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexf(GLfloat c);\"\r\t<cdecl: void 'glIndexf' (float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIndexfv: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexfv(GLfloat* c);\"\r\t<cdecl: void 'glIndexfv' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIndexi: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexi(GLint c);\"\r\t<cdecl: void 'glIndexi' (long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIndexiv: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexiv(GLint* c);\"\r\t<cdecl: void 'glIndexiv' (long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIndexs: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexs(GLshort c);\"\r\t<cdecl: void 'glIndexs' (short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIndexsv: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexsv(GLshort* c);\"\r\t<cdecl: void 'glIndexsv' (short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIndexub: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexub(GLubyte c);\"\r\t<cdecl: void 'glIndexub' (byte) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIndexubv: c\r\t\"This method was automatically generated.\"\r\t\"void glIndexubv(GLubyte* c);\"\r\t<cdecl: void 'glIndexubv' (byte*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglInitNames\r\t\"This method was automatically generated.\"\r\t\"void glInitNames();\"\r\t<cdecl: void 'glInitNames' (void) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglInterleavedArrays: format with: stride with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glInterleavedArrays(GLenum format, GLsizei stride, GLvoid* pointer);\"\r\t<cdecl: void 'glInterleavedArrays' (ulong long void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIsEnabled: cap\r\t\"This method was automatically generated.\"\r\t\"GLboolean glIsEnabled(GLenum cap);\"\r\t<cdecl: bool 'glIsEnabled' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIsList: list\r\t\"This method was automatically generated.\"\r\t\"GLboolean glIsList(GLuint list);\"\r\t<cdecl: bool 'glIsList' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIsTexture: texture\r\t\"This method was automatically generated.\"\r\t\"GLboolean glIsTexture(GLuint texture);\"\r\t<cdecl: bool 'glIsTexture' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglIsTextureEXT: texture\r\t\"This method was automatically generated.\"\r\t\"GLboolean glIsTextureEXT(GLuint texture);\"\r\t<cdecl: bool 'glIsTextureEXT' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglLightModelf: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glLightModelf(GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glLightModelf' (ulong float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglLightModelfv: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glLightModelfv(GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glLightModelfv' (ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglLightModeli: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glLightModeli(GLenum pname, GLint param);\"\r\t<cdecl: void 'glLightModeli' (ulong long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglLightModeliv: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glLightModeliv(GLenum pname, GLint* params);\"\r\t<cdecl: void 'glLightModeliv' (ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglLightf: light with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glLightf(GLenum light, GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glLightf' (ulong ulong float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglLightfv: light with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glLightfv(GLenum light, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glLightfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglLighti: light with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glLighti(GLenum light, GLenum pname, GLint param);\"\r\t<cdecl: void 'glLighti' (ulong ulong long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglLightiv: light with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glLightiv(GLenum light, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glLightiv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglLineStipple: factor with: pattern\r\t\"This method was automatically generated.\"\r\t\"void glLineStipple(GLint factor, GLushort pattern);\"\r\t<cdecl: void 'glLineStipple' (long ushort) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglLineWidth: width\r\t\"This method was automatically generated.\"\r\t\"void glLineWidth(GLfloat width);\"\r\t<cdecl: void 'glLineWidth' (float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglListBase: base\r\t\"This method was automatically generated.\"\r\t\"void glListBase(GLuint base);\"\r\t<cdecl: void 'glListBase' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglLoadIdentity\r\t\"This method was automatically generated.\"\r\t\"void glLoadIdentity();\"\r\t<cdecl: void 'glLoadIdentity' (void) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglLoadMatrixd: m\r\t\"This method was automatically generated.\"\r\t\"void glLoadMatrixd(GLdouble* m);\"\r\t<cdecl: void 'glLoadMatrixd' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglLoadMatrixf: m\r\t\"This method was automatically generated.\"\r\t\"void glLoadMatrixf(GLfloat* m);\"\r\t<cdecl: void 'glLoadMatrixf' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglLoadName: name\r\t\"This method was automatically generated.\"\r\t\"void glLoadName(GLuint name);\"\r\t<cdecl: void 'glLoadName' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglLockArraysEXT: first with: count\r\t\"This method was automatically generated.\"\r\t\"void glLockArraysEXT(GLint first, GLsizei count);\"\r\t<cdecl: void 'glLockArraysEXT' (long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglLogicOp: opcode\r\t\"This method was automatically generated.\"\r\t\"void glLogicOp(GLenum opcode);\"\r\t<cdecl: void 'glLogicOp' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMap1d: target with: u1 with: u2 with: stride with: order with: points\r\t\"This method was automatically generated.\"\r\t\"void glMap1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, GLdouble* points);\"\r\t<cdecl: void 'glMap1d' (ulong double double long long double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMap1f: target with: u1 with: u2 with: stride with: order with: points\r\t\"This method was automatically generated.\"\r\t\"void glMap1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, GLfloat* points);\"\r\t<cdecl: void 'glMap1f' (ulong float float long long float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMap2d: target with: u1 with: u2 with: ustride with: uorder with: v1 with: v2 with: vstride with: vorder with: points\r\t\"This method was automatically generated.\"\r\t\"void glMap2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble* points);\"\r\t<cdecl: void 'glMap2d' (ulong double double long long double double long long double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMap2f: target with: u1 with: u2 with: ustride with: uorder with: v1 with: v2 with: vstride with: vorder with: points\r\t\"This method was automatically generated.\"\r\t\"void glMap2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat* points);\"\r\t<cdecl: void 'glMap2f' (ulong float float long long float float long long float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMapGrid1d: un with: u1 with: u2\r\t\"This method was automatically generated.\"\r\t\"void glMapGrid1d(GLint un, GLdouble u1, GLdouble u2);\"\r\t<cdecl: void 'glMapGrid1d' (long double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMapGrid1f: un with: u1 with: u2\r\t\"This method was automatically generated.\"\r\t\"void glMapGrid1f(GLint un, GLfloat u1, GLfloat u2);\"\r\t<cdecl: void 'glMapGrid1f' (long float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMapGrid2d: un with: u1 with: u2 with: vn with: v1 with: v2\r\t\"This method was automatically generated.\"\r\t\"void glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);\"\r\t<cdecl: void 'glMapGrid2d' (long double double long double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMapGrid2f: un with: u1 with: u2 with: vn with: v1 with: v2\r\t\"This method was automatically generated.\"\r\t\"void glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);\"\r\t<cdecl: void 'glMapGrid2f' (long float float long float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMaterialf: face with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glMaterialf(GLenum face, GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glMaterialf' (ulong ulong float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMaterialfv: face with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glMaterialfv(GLenum face, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glMaterialfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMateriali: face with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glMateriali(GLenum face, GLenum pname, GLint param);\"\r\t<cdecl: void 'glMateriali' (ulong ulong long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMaterialiv: face with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glMaterialiv(GLenum face, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glMaterialiv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMatrixMode: mode\r\t\"This method was automatically generated.\"\r\t\"void glMatrixMode(GLenum mode);\"\r\t<cdecl: void 'glMatrixMode' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMinmax: target with: internalformat with: sink\r\t\"This method was automatically generated.\"\r\t\"void glMinmax(GLenum target, GLenum internalformat, GLboolean sink);\"\r\t<cdecl: void 'glMinmax' (ulong ulong bool) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultMatrixd: m\r\t\"This method was automatically generated.\"\r\t\"void glMultMatrixd(GLdouble* m);\"\r\t<cdecl: void 'glMultMatrixd' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultMatrixf: m\r\t\"This method was automatically generated.\"\r\t\"void glMultMatrixf(GLfloat* m);\"\r\t<cdecl: void 'glMultMatrixf' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord1dARB: target with: s\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord1dARB(GLenum target, GLdouble s);\"\r\t<cdecl: void 'glMultiTexCoord1dARB' (ulong double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord1dvARB: target with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord1dvARB(GLenum target, GLdouble* v);\"\r\t<cdecl: void 'glMultiTexCoord1dvARB' (ulong double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord1fARB: target with: s\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord1fARB(GLenum target, GLfloat s);\"\r\t<cdecl: void 'glMultiTexCoord1fARB' (ulong float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord1fvARB: target with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord1fvARB(GLenum target, GLfloat* v);\"\r\t<cdecl: void 'glMultiTexCoord1fvARB' (ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord1iARB: target with: s\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord1iARB(GLenum target, GLint s);\"\r\t<cdecl: void 'glMultiTexCoord1iARB' (ulong long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord1ivARB: target with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord1ivARB(GLenum target, GLint* v);\"\r\t<cdecl: void 'glMultiTexCoord1ivARB' (ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord1sARB: target with: s\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord1sARB(GLenum target, GLshort s);\"\r\t<cdecl: void 'glMultiTexCoord1sARB' (ulong short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord1svARB: target with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord1svARB(GLenum target, GLshort* v);\"\r\t<cdecl: void 'glMultiTexCoord1svARB' (ulong short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord2dARB: target with: s with: t\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t);\"\r\t<cdecl: void 'glMultiTexCoord2dARB' (ulong double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord2dvARB: target with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord2dvARB(GLenum target, GLdouble* v);\"\r\t<cdecl: void 'glMultiTexCoord2dvARB' (ulong double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord2fARB: target with: s with: t\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t);\"\r\t<cdecl: void 'glMultiTexCoord2fARB' (ulong float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord2fvARB: target with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord2fvARB(GLenum target, GLfloat* v);\"\r\t<cdecl: void 'glMultiTexCoord2fvARB' (ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord2iARB: target with: s with: t\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord2iARB(GLenum target, GLint s, GLint t);\"\r\t<cdecl: void 'glMultiTexCoord2iARB' (ulong long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord2ivARB: target with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord2ivARB(GLenum target, GLint* v);\"\r\t<cdecl: void 'glMultiTexCoord2ivARB' (ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord2sARB: target with: s with: t\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t);\"\r\t<cdecl: void 'glMultiTexCoord2sARB' (ulong short short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord2svARB: target with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord2svARB(GLenum target, GLshort* v);\"\r\t<cdecl: void 'glMultiTexCoord2svARB' (ulong short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord3dARB: target with: s with: t with: r\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r);\"\r\t<cdecl: void 'glMultiTexCoord3dARB' (ulong double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord3dvARB: target with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord3dvARB(GLenum target, GLdouble* v);\"\r\t<cdecl: void 'glMultiTexCoord3dvARB' (ulong double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord3fARB: target with: s with: t with: r\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r);\"\r\t<cdecl: void 'glMultiTexCoord3fARB' (ulong float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord3fvARB: target with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord3fvARB(GLenum target, GLfloat* v);\"\r\t<cdecl: void 'glMultiTexCoord3fvARB' (ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord3iARB: target with: s with: t with: r\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r);\"\r\t<cdecl: void 'glMultiTexCoord3iARB' (ulong long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord3ivARB: target with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord3ivARB(GLenum target, GLint* v);\"\r\t<cdecl: void 'glMultiTexCoord3ivARB' (ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord3sARB: target with: s with: t with: r\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r);\"\r\t<cdecl: void 'glMultiTexCoord3sARB' (ulong short short short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord3svARB: target with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord3svARB(GLenum target, GLshort* v);\"\r\t<cdecl: void 'glMultiTexCoord3svARB' (ulong short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord4dARB: target with: s with: t with: r with: q\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);\"\r\t<cdecl: void 'glMultiTexCoord4dARB' (ulong double double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord4dvARB: target with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord4dvARB(GLenum target, GLdouble* v);\"\r\t<cdecl: void 'glMultiTexCoord4dvARB' (ulong double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord4fARB: target with: s with: t with: r with: q\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);\"\r\t<cdecl: void 'glMultiTexCoord4fARB' (ulong float float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord4fvARB: target with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord4fvARB(GLenum target, GLfloat* v);\"\r\t<cdecl: void 'glMultiTexCoord4fvARB' (ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord4iARB: target with: s with: t with: r with: q\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q);\"\r\t<cdecl: void 'glMultiTexCoord4iARB' (ulong long long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord4ivARB: target with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord4ivARB(GLenum target, GLint* v);\"\r\t<cdecl: void 'glMultiTexCoord4ivARB' (ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord4sARB: target with: s with: t with: r with: q\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);\"\r\t<cdecl: void 'glMultiTexCoord4sARB' (ulong short short short short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglMultiTexCoord4svARB: target with: v\r\t\"This method was automatically generated.\"\r\t\"void glMultiTexCoord4svARB(GLenum target, GLshort* v);\"\r\t<cdecl: void 'glMultiTexCoord4svARB' (ulong short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglNewList: list with: mode\r\t\"This method was automatically generated.\"\r\t\"void glNewList(GLuint list, GLenum mode);\"\r\t<cdecl: void 'glNewList' (ulong ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglNormal3b: nx with: ny with: nz\r\t\"This method was automatically generated.\"\r\t\"void glNormal3b(GLbyte nx, GLbyte ny, GLbyte nz);\"\r\t<cdecl: void 'glNormal3b' (byte byte byte) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:48'!\rglNormal3bv: v\r\t\"This method was automatically generated.\"\r\t\"void glNormal3bv(GLbyte* v);\"\r\t<cdecl: void 'glNormal3bv' (byte*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglNormal3d: nx with: ny with: nz\r\t\"This method was automatically generated.\"\r\t\"void glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz);\"\r\t<cdecl: void 'glNormal3d' (double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglNormal3dv: v\r\t\"This method was automatically generated.\"\r\t\"void glNormal3dv(GLdouble* v);\"\r\t<cdecl: void 'glNormal3dv' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglNormal3f: nx with: ny with: nz\r\t\"This method was automatically generated.\"\r\t\"void glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz);\"\r\t<cdecl: void 'glNormal3f' (float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglNormal3fv: v\r\t\"This method was automatically generated.\"\r\t\"void glNormal3fv(GLfloat* v);\"\r\t<cdecl: void 'glNormal3fv' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglNormal3i: nx with: ny with: nz\r\t\"This method was automatically generated.\"\r\t\"void glNormal3i(GLint nx, GLint ny, GLint nz);\"\r\t<cdecl: void 'glNormal3i' (long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglNormal3iv: v\r\t\"This method was automatically generated.\"\r\t\"void glNormal3iv(GLint* v);\"\r\t<cdecl: void 'glNormal3iv' (long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglNormal3s: nx with: ny with: nz\r\t\"This method was automatically generated.\"\r\t\"void glNormal3s(GLshort nx, GLshort ny, GLshort nz);\"\r\t<cdecl: void 'glNormal3s' (short short short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglNormal3sv: v\r\t\"This method was automatically generated.\"\r\t\"void glNormal3sv(GLshort* v);\"\r\t<cdecl: void 'glNormal3sv' (short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglNormalPointer: type with: stride with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glNormalPointer(GLenum type, GLsizei stride, GLvoid* pointer);\"\r\t<cdecl: void 'glNormalPointer' (ulong long void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglNormalPointerEXT: type with: stride with: count with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glNormalPointerEXT(GLenum type, GLsizei stride, GLsizei count, GLvoid* pointer);\"\r\t<cdecl: void 'glNormalPointerEXT' (ulong long long void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglOrtho: left with: right with: bottom with: top with: zNear with: zFar\r\t\"This method was automatically generated.\"\r\t\"void glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);\"\r\t<cdecl: void 'glOrtho' (double double double double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPassThrough: token\r\t\"This method was automatically generated.\"\r\t\"void glPassThrough(GLfloat token);\"\r\t<cdecl: void 'glPassThrough' (float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPixelMapfv: map with: mapsize with: values\r\t\"This method was automatically generated.\"\r\t\"void glPixelMapfv(GLenum map, GLint mapsize, GLfloat* values);\"\r\t<cdecl: void 'glPixelMapfv' (ulong long float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPixelMapuiv: map with: mapsize with: values\r\t\"This method was automatically generated.\"\r\t\"void glPixelMapuiv(GLenum map, GLint mapsize, GLuint* values);\"\r\t<cdecl: void 'glPixelMapuiv' (ulong long ulong*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPixelMapusv: map with: mapsize with: values\r\t\"This method was automatically generated.\"\r\t\"void glPixelMapusv(GLenum map, GLint mapsize, GLushort* values);\"\r\t<cdecl: void 'glPixelMapusv' (ulong long ushort*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPixelStoref: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glPixelStoref(GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glPixelStoref' (ulong float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPixelStorei: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glPixelStorei(GLenum pname, GLint param);\"\r\t<cdecl: void 'glPixelStorei' (ulong long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPixelTransferf: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glPixelTransferf(GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glPixelTransferf' (ulong float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPixelTransferi: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glPixelTransferi(GLenum pname, GLint param);\"\r\t<cdecl: void 'glPixelTransferi' (ulong long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPixelZoom: xfactor with: yfactor\r\t\"This method was automatically generated.\"\r\t\"void glPixelZoom(GLfloat xfactor, GLfloat yfactor);\"\r\t<cdecl: void 'glPixelZoom' (float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPointSize: size\r\t\"This method was automatically generated.\"\r\t\"void glPointSize(GLfloat size);\"\r\t<cdecl: void 'glPointSize' (float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPolygonMode: face with: mode\r\t\"This method was automatically generated.\"\r\t\"void glPolygonMode(GLenum face, GLenum mode);\"\r\t<cdecl: void 'glPolygonMode' (ulong ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPolygonOffset: factor with: units\r\t\"This method was automatically generated.\"\r\t\"void glPolygonOffset(GLfloat factor, GLfloat units);\"\r\t<cdecl: void 'glPolygonOffset' (float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPolygonStipple: mask\r\t\"This method was automatically generated.\"\r\t\"void glPolygonStipple(GLubyte* mask);\"\r\t<cdecl: void 'glPolygonStipple' (byte*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPopAttrib\r\t\"This method was automatically generated.\"\r\t\"void glPopAttrib();\"\r\t<cdecl: void 'glPopAttrib' (void) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPopClientAttrib\r\t\"This method was automatically generated.\"\r\t\"void glPopClientAttrib();\"\r\t<cdecl: void 'glPopClientAttrib' (void) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPopMatrix\r\t\"This method was automatically generated.\"\r\t\"void glPopMatrix();\"\r\t<cdecl: void 'glPopMatrix' (void) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPopName\r\t\"This method was automatically generated.\"\r\t\"void glPopName();\"\r\t<cdecl: void 'glPopName' (void) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPrioritizeTextures: n with: textures with: priorities\r\t\"This method was automatically generated.\"\r\t\"void glPrioritizeTextures(GLsizei n, GLuint* textures, GLclampf* priorities);\"\r\t<cdecl: void 'glPrioritizeTextures' (long ulong* float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPushAttrib: mask\r\t\"This method was automatically generated.\"\r\t\"void glPushAttrib(GLbitfield mask);\"\r\t<cdecl: void 'glPushAttrib' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPushClientAttrib: mask\r\t\"This method was automatically generated.\"\r\t\"void glPushClientAttrib(GLbitfield mask);\"\r\t<cdecl: void 'glPushClientAttrib' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPushMatrix\r\t\"This method was automatically generated.\"\r\t\"void glPushMatrix();\"\r\t<cdecl: void 'glPushMatrix' (void) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglPushName: name\r\t\"This method was automatically generated.\"\r\t\"void glPushName(GLuint name);\"\r\t<cdecl: void 'glPushName' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos2d: x with: y\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos2d(GLdouble x, GLdouble y);\"\r\t<cdecl: void 'glRasterPos2d' (double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos2dv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos2dv(GLdouble* v);\"\r\t<cdecl: void 'glRasterPos2dv' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos2f: x with: y\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos2f(GLfloat x, GLfloat y);\"\r\t<cdecl: void 'glRasterPos2f' (float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos2fv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos2fv(GLfloat* v);\"\r\t<cdecl: void 'glRasterPos2fv' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos2i: x with: y\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos2i(GLint x, GLint y);\"\r\t<cdecl: void 'glRasterPos2i' (long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos2iv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos2iv(GLint* v);\"\r\t<cdecl: void 'glRasterPos2iv' (long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos2s: x with: y\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos2s(GLshort x, GLshort y);\"\r\t<cdecl: void 'glRasterPos2s' (short short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos2sv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos2sv(GLshort* v);\"\r\t<cdecl: void 'glRasterPos2sv' (short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos3d: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos3d(GLdouble x, GLdouble y, GLdouble z);\"\r\t<cdecl: void 'glRasterPos3d' (double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos3dv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos3dv(GLdouble* v);\"\r\t<cdecl: void 'glRasterPos3dv' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos3f: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos3f(GLfloat x, GLfloat y, GLfloat z);\"\r\t<cdecl: void 'glRasterPos3f' (float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos3fv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos3fv(GLfloat* v);\"\r\t<cdecl: void 'glRasterPos3fv' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos3i: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos3i(GLint x, GLint y, GLint z);\"\r\t<cdecl: void 'glRasterPos3i' (long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos3iv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos3iv(GLint* v);\"\r\t<cdecl: void 'glRasterPos3iv' (long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos3s: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos3s(GLshort x, GLshort y, GLshort z);\"\r\t<cdecl: void 'glRasterPos3s' (short short short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos3sv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos3sv(GLshort* v);\"\r\t<cdecl: void 'glRasterPos3sv' (short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos4d: x with: y with: z with: w\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w);\"\r\t<cdecl: void 'glRasterPos4d' (double double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos4dv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos4dv(GLdouble* v);\"\r\t<cdecl: void 'glRasterPos4dv' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos4f: x with: y with: z with: w\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w);\"\r\t<cdecl: void 'glRasterPos4f' (float float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos4fv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos4fv(GLfloat* v);\"\r\t<cdecl: void 'glRasterPos4fv' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos4i: x with: y with: z with: w\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos4i(GLint x, GLint y, GLint z, GLint w);\"\r\t<cdecl: void 'glRasterPos4i' (long long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos4iv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos4iv(GLint* v);\"\r\t<cdecl: void 'glRasterPos4iv' (long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos4s: x with: y with: z with: w\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w);\"\r\t<cdecl: void 'glRasterPos4s' (short short short short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRasterPos4sv: v\r\t\"This method was automatically generated.\"\r\t\"void glRasterPos4sv(GLshort* v);\"\r\t<cdecl: void 'glRasterPos4sv' (short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglReadBuffer: mode\r\t\"This method was automatically generated.\"\r\t\"void glReadBuffer(GLenum mode);\"\r\t<cdecl: void 'glReadBuffer' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglReadPixels: x with: y with: width with: height with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glReadPixels' (long long long long ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRectd: x1 with: y1 with: x2 with: y2\r\t\"This method was automatically generated.\"\r\t\"void glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);\"\r\t<cdecl: void 'glRectd' (double double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRectdv: v1 with: v2\r\t\"This method was automatically generated.\"\r\t\"void glRectdv(GLdouble* v1, GLdouble* v2);\"\r\t<cdecl: void 'glRectdv' (double* double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRectf: x1 with: y1 with: x2 with: y2\r\t\"This method was automatically generated.\"\r\t\"void glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);\"\r\t<cdecl: void 'glRectf' (float float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRectfv: v1 with: v2\r\t\"This method was automatically generated.\"\r\t\"void glRectfv(GLfloat* v1, GLfloat* v2);\"\r\t<cdecl: void 'glRectfv' (float* float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRecti: x1 with: y1 with: x2 with: y2\r\t\"This method was automatically generated.\"\r\t\"void glRecti(GLint x1, GLint y1, GLint x2, GLint y2);\"\r\t<cdecl: void 'glRecti' (long long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRectiv: v1 with: v2\r\t\"This method was automatically generated.\"\r\t\"void glRectiv(GLint* v1, GLint* v2);\"\r\t<cdecl: void 'glRectiv' (long* long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRects: x1 with: y1 with: x2 with: y2\r\t\"This method was automatically generated.\"\r\t\"void glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2);\"\r\t<cdecl: void 'glRects' (short short short short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRectsv: v1 with: v2\r\t\"This method was automatically generated.\"\r\t\"void glRectsv(GLshort* v1, GLshort* v2);\"\r\t<cdecl: void 'glRectsv' (short* short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRenderMode: mode\r\t\"This method was automatically generated.\"\r\t\"GLint glRenderMode(GLenum mode);\"\r\t<cdecl: long 'glRenderMode' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglResetHistogram: target\r\t\"This method was automatically generated.\"\r\t\"void glResetHistogram(GLenum target);\"\r\t<cdecl: void 'glResetHistogram' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglResetMinmax: target\r\t\"This method was automatically generated.\"\r\t\"void glResetMinmax(GLenum target);\"\r\t<cdecl: void 'glResetMinmax' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRotated: angle with: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);\"\r\t<cdecl: void 'glRotated' (double double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglRotatef: angle with: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);\"\r\t<cdecl: void 'glRotatef' (float float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglScaled: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glScaled(GLdouble x, GLdouble y, GLdouble z);\"\r\t<cdecl: void 'glScaled' (double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglScalef: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glScalef(GLfloat x, GLfloat y, GLfloat z);\"\r\t<cdecl: void 'glScalef' (float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglScissor: x with: y with: width with: height\r\t\"This method was automatically generated.\"\r\t\"void glScissor(GLint x, GLint y, GLsizei width, GLsizei height);\"\r\t<cdecl: void 'glScissor' (long long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglSelectBuffer: size with: buffer\r\t\"This method was automatically generated.\"\r\t\"void glSelectBuffer(GLsizei size, GLuint* buffer);\"\r\t<cdecl: void 'glSelectBuffer' (long ulong*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglSeparableFilter2D: target with: internalformat with: width with: height with: format with: type with: row with: column\r\t\"This method was automatically generated.\"\r\t\"void glSeparableFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* row, GLvoid* column);\"\r\t<cdecl: void 'glSeparableFilter2D' (ulong ulong long long ulong ulong void* void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglShadeModel: mode\r\t\"This method was automatically generated.\"\r\t\"void glShadeModel(GLenum mode);\"\r\t<cdecl: void 'glShadeModel' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglStencilFunc: func with: ref with: mask\r\t\"This method was automatically generated.\"\r\t\"void glStencilFunc(GLenum func, GLint ref, GLuint mask);\"\r\t<cdecl: void 'glStencilFunc' (ulong long ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglStencilMask: mask\r\t\"This method was automatically generated.\"\r\t\"void glStencilMask(GLuint mask);\"\r\t<cdecl: void 'glStencilMask' (ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglStencilOp: fail with: zfail with: zpass\r\t\"This method was automatically generated.\"\r\t\"void glStencilOp(GLenum fail, GLenum zfail, GLenum zpass);\"\r\t<cdecl: void 'glStencilOp' (ulong ulong ulong) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord1d: s\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord1d(GLdouble s);\"\r\t<cdecl: void 'glTexCoord1d' (double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord1dv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord1dv(GLdouble* v);\"\r\t<cdecl: void 'glTexCoord1dv' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord1f: s\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord1f(GLfloat s);\"\r\t<cdecl: void 'glTexCoord1f' (float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord1fv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord1fv(GLfloat* v);\"\r\t<cdecl: void 'glTexCoord1fv' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord1i: s\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord1i(GLint s);\"\r\t<cdecl: void 'glTexCoord1i' (long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord1iv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord1iv(GLint* v);\"\r\t<cdecl: void 'glTexCoord1iv' (long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord1s: s\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord1s(GLshort s);\"\r\t<cdecl: void 'glTexCoord1s' (short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord1sv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord1sv(GLshort* v);\"\r\t<cdecl: void 'glTexCoord1sv' (short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord2d: s with: t\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord2d(GLdouble s, GLdouble t);\"\r\t<cdecl: void 'glTexCoord2d' (double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord2dv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord2dv(GLdouble* v);\"\r\t<cdecl: void 'glTexCoord2dv' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord2f: s with: t\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord2f(GLfloat s, GLfloat t);\"\r\t<cdecl: void 'glTexCoord2f' (float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord2fv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord2fv(GLfloat* v);\"\r\t<cdecl: void 'glTexCoord2fv' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord2i: s with: t\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord2i(GLint s, GLint t);\"\r\t<cdecl: void 'glTexCoord2i' (long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord2iv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord2iv(GLint* v);\"\r\t<cdecl: void 'glTexCoord2iv' (long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord2s: s with: t\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord2s(GLshort s, GLshort t);\"\r\t<cdecl: void 'glTexCoord2s' (short short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord2sv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord2sv(GLshort* v);\"\r\t<cdecl: void 'glTexCoord2sv' (short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord3d: s with: t with: r\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord3d(GLdouble s, GLdouble t, GLdouble r);\"\r\t<cdecl: void 'glTexCoord3d' (double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord3dv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord3dv(GLdouble* v);\"\r\t<cdecl: void 'glTexCoord3dv' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord3f: s with: t with: r\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord3f(GLfloat s, GLfloat t, GLfloat r);\"\r\t<cdecl: void 'glTexCoord3f' (float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord3fv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord3fv(GLfloat* v);\"\r\t<cdecl: void 'glTexCoord3fv' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord3i: s with: t with: r\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord3i(GLint s, GLint t, GLint r);\"\r\t<cdecl: void 'glTexCoord3i' (long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord3iv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord3iv(GLint* v);\"\r\t<cdecl: void 'glTexCoord3iv' (long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord3s: s with: t with: r\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord3s(GLshort s, GLshort t, GLshort r);\"\r\t<cdecl: void 'glTexCoord3s' (short short short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord3sv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord3sv(GLshort* v);\"\r\t<cdecl: void 'glTexCoord3sv' (short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord4d: s with: t with: r with: q\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q);\"\r\t<cdecl: void 'glTexCoord4d' (double double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord4dv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord4dv(GLdouble* v);\"\r\t<cdecl: void 'glTexCoord4dv' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord4f: s with: t with: r with: q\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q);\"\r\t<cdecl: void 'glTexCoord4f' (float float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord4fv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord4fv(GLfloat* v);\"\r\t<cdecl: void 'glTexCoord4fv' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord4i: s with: t with: r with: q\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord4i(GLint s, GLint t, GLint r, GLint q);\"\r\t<cdecl: void 'glTexCoord4i' (long long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord4iv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord4iv(GLint* v);\"\r\t<cdecl: void 'glTexCoord4iv' (long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord4s: s with: t with: r with: q\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q);\"\r\t<cdecl: void 'glTexCoord4s' (short short short short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoord4sv: v\r\t\"This method was automatically generated.\"\r\t\"void glTexCoord4sv(GLshort* v);\"\r\t<cdecl: void 'glTexCoord4sv' (short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoordPointer: size with: type with: stride with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glTexCoordPointer(GLint size, GLenum type, GLsizei stride, GLvoid* pointer);\"\r\t<cdecl: void 'glTexCoordPointer' (long ulong long void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexCoordPointerEXT: size with: type with: stride with: count with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glTexCoordPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid* pointer);\"\r\t<cdecl: void 'glTexCoordPointerEXT' (long ulong long long void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexEnvf: target with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glTexEnvf(GLenum target, GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glTexEnvf' (ulong ulong float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexEnvfv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glTexEnvfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glTexEnvfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexEnvi: target with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glTexEnvi(GLenum target, GLenum pname, GLint param);\"\r\t<cdecl: void 'glTexEnvi' (ulong ulong long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexEnviv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glTexEnviv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glTexEnviv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexGend: coord with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glTexGend(GLenum coord, GLenum pname, GLdouble param);\"\r\t<cdecl: void 'glTexGend' (ulong ulong double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexGendv: coord with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glTexGendv(GLenum coord, GLenum pname, GLdouble* params);\"\r\t<cdecl: void 'glTexGendv' (ulong ulong double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexGenf: coord with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glTexGenf(GLenum coord, GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glTexGenf' (ulong ulong float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexGenfv: coord with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glTexGenfv(GLenum coord, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glTexGenfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexGeni: coord with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glTexGeni(GLenum coord, GLenum pname, GLint param);\"\r\t<cdecl: void 'glTexGeni' (ulong ulong long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexGeniv: coord with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glTexGeniv(GLenum coord, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glTexGeniv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexImage1D: target with: level with: internalformat with: width with: border with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glTexImage1D' (ulong long long long long ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexImage2D: target with: level with: internalformat with: width with: height with: border with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glTexImage2D' (ulong long long long long long ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexImage3D: target with: level with: internalformat with: width with: height with: depth with: border with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glTexImage3D' (ulong long ulong long long long long ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexParameterf: target with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glTexParameterf(GLenum target, GLenum pname, GLfloat param);\"\r\t<cdecl: void 'glTexParameterf' (ulong ulong float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexParameterfv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glTexParameterfv(GLenum target, GLenum pname, GLfloat* params);\"\r\t<cdecl: void 'glTexParameterfv' (ulong ulong float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexParameteri: target with: pname with: param\r\t\"This method was automatically generated.\"\r\t\"void glTexParameteri(GLenum target, GLenum pname, GLint param);\"\r\t<cdecl: void 'glTexParameteri' (ulong ulong long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexParameteriv: target with: pname with: params\r\t\"This method was automatically generated.\"\r\t\"void glTexParameteriv(GLenum target, GLenum pname, GLint* params);\"\r\t<cdecl: void 'glTexParameteriv' (ulong ulong long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexSubImage1D: target with: level with: xoffset with: width with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glTexSubImage1D' (ulong long long long ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexSubImage2D: target with: level with: xoffset with: yoffset with: width with: height with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glTexSubImage2D' (ulong long long long long long ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTexSubImage3D: target with: level with: xoffset with: yoffset with: zoffset with: width with: height with: depth with: format with: type with: pixels\r\t\"This method was automatically generated.\"\r\t\"void glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid* pixels);\"\r\t<cdecl: void 'glTexSubImage3D' (ulong long long long long long long long ulong ulong void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTranslated: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glTranslated(GLdouble x, GLdouble y, GLdouble z);\"\r\t<cdecl: void 'glTranslated' (double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglTranslatef: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glTranslatef(GLfloat x, GLfloat y, GLfloat z);\"\r\t<cdecl: void 'glTranslatef' (float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglUnlockArraysEXT\r\t\"This method was automatically generated.\"\r\t\"void glUnlockArraysEXT();\"\r\t<cdecl: void 'glUnlockArraysEXT' (void) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex2d: x with: y\r\t\"This method was automatically generated.\"\r\t\"void glVertex2d(GLdouble x, GLdouble y);\"\r\t<cdecl: void 'glVertex2d' (double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex2dv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex2dv(GLdouble* v);\"\r\t<cdecl: void 'glVertex2dv' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex2f: x with: y\r\t\"This method was automatically generated.\"\r\t\"void glVertex2f(GLfloat x, GLfloat y);\"\r\t<cdecl: void 'glVertex2f' (float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex2fv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex2fv(GLfloat* v);\"\r\t<cdecl: void 'glVertex2fv' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex2i: x with: y\r\t\"This method was automatically generated.\"\r\t\"void glVertex2i(GLint x, GLint y);\"\r\t<cdecl: void 'glVertex2i' (long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex2iv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex2iv(GLint* v);\"\r\t<cdecl: void 'glVertex2iv' (long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex2s: x with: y\r\t\"This method was automatically generated.\"\r\t\"void glVertex2s(GLshort x, GLshort y);\"\r\t<cdecl: void 'glVertex2s' (short short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex2sv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex2sv(GLshort* v);\"\r\t<cdecl: void 'glVertex2sv' (short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex3d: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glVertex3d(GLdouble x, GLdouble y, GLdouble z);\"\r\t<cdecl: void 'glVertex3d' (double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex3dv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex3dv(GLdouble* v);\"\r\t<cdecl: void 'glVertex3dv' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex3f: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glVertex3f(GLfloat x, GLfloat y, GLfloat z);\"\r\t<cdecl: void 'glVertex3f' (float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex3fv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex3fv(GLfloat* v);\"\r\t<cdecl: void 'glVertex3fv' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex3i: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glVertex3i(GLint x, GLint y, GLint z);\"\r\t<cdecl: void 'glVertex3i' (long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex3iv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex3iv(GLint* v);\"\r\t<cdecl: void 'glVertex3iv' (long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex3s: x with: y with: z\r\t\"This method was automatically generated.\"\r\t\"void glVertex3s(GLshort x, GLshort y, GLshort z);\"\r\t<cdecl: void 'glVertex3s' (short short short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex3sv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex3sv(GLshort* v);\"\r\t<cdecl: void 'glVertex3sv' (short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex4d: x with: y with: z with: w\r\t\"This method was automatically generated.\"\r\t\"void glVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w);\"\r\t<cdecl: void 'glVertex4d' (double double double double) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex4dv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex4dv(GLdouble* v);\"\r\t<cdecl: void 'glVertex4dv' (double*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex4f: x with: y with: z with: w\r\t\"This method was automatically generated.\"\r\t\"void glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w);\"\r\t<cdecl: void 'glVertex4f' (float float float float) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex4fv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex4fv(GLfloat* v);\"\r\t<cdecl: void 'glVertex4fv' (float*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex4i: x with: y with: z with: w\r\t\"This method was automatically generated.\"\r\t\"void glVertex4i(GLint x, GLint y, GLint z, GLint w);\"\r\t<cdecl: void 'glVertex4i' (long long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex4iv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex4iv(GLint* v);\"\r\t<cdecl: void 'glVertex4iv' (long*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex4s: x with: y with: z with: w\r\t\"This method was automatically generated.\"\r\t\"void glVertex4s(GLshort x, GLshort y, GLshort z, GLshort w);\"\r\t<cdecl: void 'glVertex4s' (short short short short) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertex4sv: v\r\t\"This method was automatically generated.\"\r\t\"void glVertex4sv(GLshort* v);\"\r\t<cdecl: void 'glVertex4sv' (short*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertexPointer: size with: type with: stride with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glVertexPointer(GLint size, GLenum type, GLsizei stride, GLvoid* pointer);\"\r\t<cdecl: void 'glVertexPointer' (long ulong long void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglVertexPointerEXT: size with: type with: stride with: count with: pointer\r\t\"This method was automatically generated.\"\r\t\"void glVertexPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid* pointer);\"\r\t<cdecl: void 'glVertexPointerEXT' (long ulong long long void*) module: 'GL'>\r\t^self externalCallFailed! !\r\r!GLXUnixX11BE methodsFor: 'OpenGL API' stamp: 'bf 10/21/2002 19:49'!\rglViewport: x with: y with: width with: height\r\t\"This method was automatically generated.\"\r\t\"void glViewport(GLint x, GLint y, GLsizei width, GLsizei height);\"\r\t<cdecl: void 'glViewport' (long long long long) module: 'GL'>\r\t^self externalCallFailed! !\r\r\r!GLXUnixX11LE methodsFor: 'intitialize' stamp: 'ikp 2/3/2003 17:00'!\rbeginFrame\r\tsuper beginFrame.\r\tself glPixelStorei: GLUnpackLsbFirst with: 0.\r! !\r\r!GLXUnixX11LE methodsFor: 'accessing' stamp: 'ikp 2/3/2003 17:01'!\rimagePixelType32\r\t^GLUnsignedByte! !\r\r!GLXUnixX11LE methodsFor: 'accessing' stamp: 'ikp 2/3/2003 17:02'!\rtexturePixelType\r\t^GLUnsignedByte! !\r\r\r!SystemDictionary methodsFor: 'miscellaneous' stamp: 'ikp 2/3/2003 16:56'!\rwindowSystemName\t\t\t\"Smalltalk windowSystemName\"\r\r\t\"Answer the name of the window system currently being used for display.\"\r\t^self getSystemAttribute: 1005! !\r\r"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-Quartz/Resources/SqueakHelp/SqueakHelp.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html>\n<head>\n  <meta http-equiv=\"content-type\" content=\"text/html\">\n  <title>Squeak Help</title>\n  <meta name=\"DP\" content=\"1.9.1/3.1.1\">\n  <meta name=\"AppleTitle\" content=\"Squeak Help\">\n  <meta name=\"AppleIcon\" content=\"SqueakHelp/images/bookicon.gif\">\n  <meta name=\"ROBOTS\" content=\"NOINDEX\">\n</head>\n<body bgcolor=\"#ffffff\" link=\"#cc6600\" alink=\"#aa3a00\" vlink=\"#aa3300\">\n<font face=\"Geneva,Arial\">\n       \n<center><font size=\"+3\">\nWelcome to Unix Squeak! <br> (Mac OS X edition)\n</font></center>\n\n<h1> Preface </h1>\n\nThe help viewer is buggy (at least mine is).  This document is more\nthan a page long, but there's no scroll bar.  To get a scroll bar,\nresize the window slightly.\n\n<h1> Introduction </h1>\n\nThis software is still very much in <font color=\"red\">alpha test</font>.\nThis means that it will crash (frequently) at random times for no obvious\nreason.  By continuing to use this software you agree implicitly to act as\nan alpha tester and hence to the following:\n\n  <blockquote>\n  Subsequent to any and all crashes you will send the contents of the file\n  <tt>Library/Logs/CrashReporter/squeak.crash.log</tt> (relative to your\n  home directory), along with a brief description of what you were doing at\n  the time, by email to: <tt>ian.piumarta@squeakland.org</tt>&nbsp; (If you can\n  also concoct a recipe to reproduce the crash reliably then you'll\n  [probably] win a faster resolution of the problem.)\n  </blockquote>\n\n<h1> Installing Squeak </h1>\n\nThe '.app' bundle does not come with '.image/.changes' or '.sources'\nfiles.  You will have to get these from elsewhere (at the Squeak\nFoundation <a href=\"ftp://ftp.squeakfoundation.org/official-dist\">ftp site</a>,\nfor example).  If you keep the '.sources' file (or a link to it) in\nthe same directory as your image(s) you'll be fine.  Otherwise you can\nput it (or a link to it) in the 'Contents/MacOS' folder of the app\nbundle.  You can also put the distributed '.image/.changes' files in the\n'Contents/Resources' folder too, if you want a convenient place from\nwhich to begin working in a fresh image (see\n<a href=\"#default\"><b>Providing a default image</b></a> below).\n\n\n<h1> Starting Squeak </h1>\n\nSqueak can be started either from the Finder (by double-clicking on the VM\nor an image file) or from the command line in a terminal window.  If it is\nstarted from the command line then various features (that are not available\nwhen launching it from the Finder) become available through command line\noptions, such as running without a window (useful if the application is a\nSwiki or some other kind of server, for example).  (Some of these options\nwill soon be available via a preferences panel in Quartz, when I get round\nto implementing it.)  A list of the available options is available by\nrunning Squeak from the command line and giving it the option `<tt>-help</tt>'.\n\n<p> If X11 is installed then display can be via X11 or via Quartz.  The\ndefault is X11 if the environment variable DISPLAY is set and Quartz if\nSqueak is launched from the Finder.  To force one or the other, Squeak can\nbe run from the command line with the option `<tt>-quartz</tt>' or\n`<tt>-display&nbsp;&lt;your-display&gt;</tt>' as desired.\n\n<p> Note that to run Squeak in a remote window the X11 libraries must be\ninstalled on the client machine, i.e., the one on which Squeak is running.\n(More accurately, Squeak requires at least <tt>libX11</tt>\nand <tt>libXext</tt> installed for it to be able to connect to a remote\ndisplay server).\n\n<p> Note also that options relating to the display are only\nrecognised <i>after</i> Squeak has been told which kind of display is to be\nused.  This applies even to the `<tt>-help</tt>' option.  For example, to\nsee a list of options that includes those specific to Quartz, Squeak must be\nrun with the options `<tt>-quartz&nbsp;-help</tt>', <b>in that order</b>.\n\n \n<h1> Providing a default image </h1><a name=\"default\">\n\nWhen launched from the Finder, if Squeak cannot find a default image to run\nin the current directory then it looks for the files <tt>squeak.image</tt>\nand <tt>squeak.changes</tt> in the <tt>Squeak.app/Contents/Resources</tt>\ndirectory.  If these files exist then Squeak will offer to copy them (with a\ndialogue to choose the destination) before launching.  (If these files do\nnot exist and there is no obvious default image to run in the current\ndirectory, then double-clicking the VM will enter an `open' dialogue to\nlocate an existing image to use.)\n\n\n<h1> Known bugs, limitiations and quirks </h1>\n  \n<ul>\n  <li> Croquet requires some new support code (containing GLX classes\n       appropriate for Quartz and big-endian X11).  If these haven't been\n       filed-in then Croquet probably won't work.  (Forgetfulness on my part\n       not withstanding, a copy of the required changeset should be in\n       the <tt>Squeak.app/Contents/Resources</tt> directory, for\n       convenience.)  </li>\n\n  <li> The Squeak window will refuse to resize if there are any TeapotMorphs\n       open.  This is to avoid a very nasty bug (that freezes the entire\n       machine) in Mac OS X, which cannot cope with the VM thread updating\n       OpenGL content while the (separate) UI thread is trying to invalidate\n       the corresponding graphics state during window resizing.  (Switching\n       to/from fullscreen mode with open TeapotMorphs does work\n       properly.)  </li>\n\n  <li> Croquet might run slower than normal since there is no MatrixPlugin\n       included with Unix Squeak.  The plugin is not included since I do not\n       have (nor can I find anywhere) the sources for it.  </li>\n\n  <li> In order to support Croquet under Mac OS X (which has no way to\n       associate a default memory size with an application) Squeak will\n       determine how much virtual memory is available (up to a maximum of 1\n       gigabyte) and reserve that amount for dynamically growing the object\n       memory.  (This memory will only be <i>physically</i> allocated\n       if/when the image tries to grow disproportionately, so this behaviour\n       shouldn't rattle the disk under normal circumstances.)  </li>\n\n  <li> To display Croquet in an X11 window it is currently necessary to set\n       the environment\n       variable <tt>LD_LIBRARY_PATH=/usr/X11R6/lib:/usr/lib:/lib</tt> before\n       starting the VM.  (This is necessary because of a bug in the Mac OS X\n       dynamic linker, although a subsequent version of Unix Squeak might\n       elect to cure this problem by brute force inside the VM.)\n\n  <li> There must be a SqueakV3.sources file (or a link/alias to one) in the\n       same directory as the image.  There is currently no start-up dialogue\n       to locate a sources file in an alternate location.  (This is fairly\n       high on the to-do list.  If it becomes a nuisance then placing a\n       copy/link/alias of/to the sources file in\n       the <tt>Squeak.app/Contents/MacOS</tt> directory will probably do the\n       trick.)  </li>\n\n  <li> Command-tab (fullscreen switch) does not work.  There appears to be\n       no way in Mac OS X to intercept the corresponding key event before\n       it's snarfed by the dock (to cycle the key window between the\n       currently active applications).  </li>\n\n  <li> When starting sound recording, input will revert to the default\n       device.  This is almost certainly not the device from which you\n       wanted to record.  (The input can be pointed back to a more suitable\n       source using the sound pane in the system preferences, <i>after</i>\n       the sound recorder has been started in Squeak.)  </li>\n\n  <li> There is currently no support for MIDI, tablets or joysticks.  </li>\n\n  <li> Printing from the File menu is not yet implemented (although the menu\n       items are already there as placeholders).  </li>\n\n  <li> Printing a Form from within Squeak is only partially implemented.\n       (The output is monochrome and scaling/orientation options are\n       ignored.)  </li>\n\n  <li> The Squeak window does not accept `first click'.  (In other words,\n       clicking in the window while it's inactive will activate Squeak but\n       the click will otherwise be ignored.)  If this bothers you, then it\n       shouldn't.  </li>\n\n  <li> There is (currently) no way to open multiple images at the same time\n       from the Finder.  (Squeak can be run multiple times from the command\n       line if working with more than one image at the same time is\n       required.)  </li>\n\n  <li> If the VM locks up for any reason while in fullscreen mode there is a\n       chance that Option-Command-Escape will not work.  (The `Force Quit'\n       dialog is actually there, it's just completely obscured by the Squeak\n       window which is at a higher level [in fact, the highest] in the\n       display order.)  If this occurs then the first thing to try is\n       pressing RETURN twice (after pressing Option-Command-Escape).  If\n       that doesn't kill Squeak then the only other escape route is to log\n       in to the machine remotely and kill the Squeak process by hand.  (An\n       `emergency exit' key combination will soon be implemented by the VM\n       itself to cater for this situation.  This is right at the top of the\n       to-do list.)  </li>\n\n  <li> There is a small danger of the Window Server becoming catatonic while\n       running Croquet (since there may be outstanding issues with\n       multithreaded OpenGL that I've not yet caught and eliminated).  The\n       symptoms are a spinning `coloured carousel' cursor and absolutely no\n       response whatsoever from any window on the screen.  If this happens,\n       the only way out is logging in to the machine remotely (as root) and\n       then typing:&nbsp;<tt>sync; reboot</tt>&nbsp;&nbsp;(There could well\n       be a several-minute delay while the kernel tries to kill an already\n       undead Window Server before the reboot actually happens.)  </li>\n\n  <li> Enabling (or disabling) the command keys via the Window menu causes\n       the Squeak menu title to lose boldface.  This is a bit of a\n       mystery...  </li>\n\n  <li> Help is only available when Squeak is launched from the Finder.  (I\n       haven't figured out why it behaves that way, but it's on the\n       list.)  </li>\n\n  <li> The Squeak Help Book (this document) has not yet been written.  </li>\n\n  <li> As you've no doubt just discovered, the Help Viewer refuses to\n       display a scroll bar when the content is too large until you try to\n       resize the window.  It's also incapable of scrolling in response to\n       the arrow keys.  Ho hum.  </li>\n</ul>\n\n<h1> Support </h1>\n\nThe <a href=\"http://squeak.org\">Squeak home page</a> contains useful\ninformation and links to various resources.\n\n<p> The <a href=\"http://squeak.hpl.hp.com/~piumarta/squeak/\">Unix\nSqueak home page</a> has further information, source code, and the\nlatest downloads specific to Unix and MacOSX.\n\n<p> If you have problems, questions, bugs to report, or specific\nfeature requests concerning the Unix Squeak VM, contact\n<a href=\"mailto:ian.piumarta@squeakland.org\">me</a> directly.\n\n</font>\n</body>\n</html>\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-Quartz/Squeak.h",
    "content": "// -*- ObjC -*-\n\n@interface Squeak : NSApplication\n- (void) applicationDidFinishLaunching: (NSNotification *)note;\n- (void) applicationDidChangeScreenParameters: (NSNotification *)note;\n- (void) unhideAllApplications: (id)sender;\n- (BOOL) windowShouldClose: (id)sender;\n- (void) maybeTerminate: (id)sender;\n- (void) terminate: (id)sender;\n- (void) performEnableKeys: (id)sender;\n- (void) performDisableKeys: (id)sender;\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-Quartz/Squeak.m",
    "content": "#import <Cocoa/Cocoa.h>\n\n@implementation Squeak\n\n\n+ (void) initialize\n{\n  NSMutableDictionary *dict;\n  NSUserDefaults *defaults;\n\n  defaults= [NSUserDefaults standardUserDefaults];\n  dict= [NSMutableDictionary dictionary];\n    \n  [dict setObject: @\"YES\" forKey: @\"AppleDockIconEnabled\"];\n  [defaults registerDefaults: dict];\n}\n\n\nstatic char *documentName= 0;\n\n\n-(BOOL) application: (NSApplication *) theApplication\n\topenFile:    (NSString *)      filename\n{\n  if (fromFinder)\n    documentName= strdup([filename cString]);\n  return YES;\n}\n\n\n-(void) applicationDidFinishLaunching: (NSNotification *)note\n{\n  int fds[2];\n\n  // this saves an awful lot of tedious mutex contention (and besides\n  // is essentially free, since there's no way to avoid writing a\n  // socket to inform aio of the availability of the event)\n#if 0\n  if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds) != 0)\n    {\n      perror(\"socketpair\");\n      exit(1);\n    }\n  osXfd= fds[0];\n  stXfd= fds[1];\n#else\n  if (pipe(fds))\n    {\n      perror(\"pipe\");\n      exit(1);\n    }\n  stXfd= fds[0];\n  osXfd= fds[1];\n#endif\n  aioEnable(stXfd, 0, 0);\n  aioHandle(stXfd, evtHandler, AIO_RX);\n#if (!USE_SPINLOCK)\n  {\n    pthread_mutexattr_t attr;\n    pthread_mutexattr_init(&attr);\n#  ifndef NDEBUG\n    pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK);\n#  endif\n    if (pthread_mutex_init(&displayMx, &attr))\n      {\n\tperror(\"pthread_mutex_init\");\n\texit(1);\n      }\n    pthread_mutexattr_destroy(&attr);\n  }\n#endif\n\n  if (fromFinder)\n    {\n      char *ptr= 0;\n      strncpy(resourcePath, argVec[0], sizeof(resourcePath));\t// .app/Contents/MacOS/squeak\n      if ((ptr= strrchr(resourcePath, '/')))\n\t{\n\t  *ptr= '\\0';\t\t\t\t\t\t// .app/Contents/MacOS\n\t  if ((ptr= strrchr(resourcePath, '/')))\n\t    {\n\t      *ptr= '\\0';\t\t\t\t\t\t// .app/Contents\n\t      strcpy(ptr, \"/Resources/\");\t\t\t\t// .app/Contents/Resources/\n\t    }\n\t  else\n\t    resourcePath[0]= '\\0';\n\t}\n      else\n\tresourcePath[0]= '\\0';\n    }\n\n  imgInit();\n\n  // vmPath has been set to the realpath() of the VM, which might be\n  // bogus (since the more cultivated OS X user will make it a symlink\n  // to /usr/local/bin/squeak).  put it back where it should be.  note\n  // that we would also like to pick up the sources file from\n  // resourcePath/SqueakV*.sources, but I guess the stupid image is\n  // going to look for it in the vmPath.  ho hum.\n  {\n    char *ptr;\n    assert(strlen(argVec[0]) < MAXPATHLEN);\n    strcpy(vmPath, argVec[0]);\n    if ((ptr= strrchr(vmPath, '/')))\n      ptr[1]= '\\0';\n  }\n\n  setUpDisplay();\n  printf(\"fullScreenFlag %d\\n\", getFullScreenFlag());\n  setUpWindow(fullscreen= getFullScreenFlag());\n\n  [NSThread\n    detachNewThreadSelector: @selector(interpret:)\n    toTarget:\t\t     self\n    withObject:\t\t     nil];\n}\n\n\n- (void) interpret: (id)context\n{\n  [[NSAutoreleasePool alloc] init];\t// running in new thread\n  interpret();\n  (void)recordMouseEvent;\n  (void)recordKeyboardEvent;\n  (void)recordDragEvent;\n}\n\n\n- (void) applicationDidChangeScreenParameters: (NSNotification *)note\n{\n  //xxx this one might be tricky in the absence of appWillChangeScreenParams:\n  fprintf(stderr, \"\\nDISPLAY PARAMETERS CHANGED\\n\\n\");\n  //  lock(display);\n  pixWidth= pixHeight= pixDepth= 0;\n  setUpDisplay();\n  //setUpWindow(getFullScreenFlag());\n  updatePix();\n  //  unlock(display);\n  //setUpMenus();\n  fullDisplayUpdate();\n}\n\n\n- (void) unhideAllApplications: (id)sender\n{\n  [super unhideAllApplications: sender];\n  [win orderFront: self]; // so that unhinding once more will reveal the Sq window\n}\n\n\n- (BOOL) windowShouldClose: (id)sender\n{\n  return NO;\n}\n\n\n- (void) terminate: (id)sender\n{\n  [super terminate: sender];\n  exit(0);\n}\n\n- (void) maybeTerminate: (id)sender\n{\n  switch (NSRunAlertPanel(@\"Really quit?\",\n\t\t\t  @\"All changes since your last save will be lost.\\n\\nIf you want to save your changes, press `Cancel' and then choose `save and quit' from the background menu in the Squeak window.\",\n\t\t\t  @\"Quit\",\n\t\t\t  @\"Cancel\",\n\t\t\t  nil))\n    {\n    case NSAlertDefaultReturn:\t[self terminate: self];\n    }\n}\n\n\n- (void) performAbout: (id)sender\n{\n  extern char *getVersionInfo(int verbose);\n  char *info= getVersionInfo(1);\n  NSPanel *panel= NSGetInformationalAlertPanel(@\"About Squeak\",\n\t\t\t\t\t       @\"%s\",\n\t\t\t\t\t       @\"Dismiss\",\n\t\t\t\t\t       nil,\n\t\t\t\t\t       nil,\n\t\t\t\t\t       info);\n  NSRect frame= [panel frame];\n  frame.size.width *= 1.5;\n  [panel setFrame: frame display: NO];\n  [NSApp runModalForWindow: panel];\n  [panel close];\n  free(info);\n}\n\n\n\n//xxx why does rebuilding the menu lose boldface on the Apple menu item???\n\n- (void) performEnableKeys:  (id)sender\t{ cmdKeys= 1;  setUpMenus(); }\n- (void) performDisableKeys: (id)sender\t{ cmdKeys= 0;  setUpMenus(); }\n\n\n- (void) windowWillMove: (NSNotification *)note\n{\n  //xxx FIXME SOON: there are other ways to enter this (and ways other than\n  // noteEvent to escape from it)\n  inModalLoop= 1;\n}\n\n\n- (NSSize) windowWillResize: (NSWindow *)sender toSize: (NSSize)size\n{\n  return glActive ? [sender frame].size : size;\n}\n\n\n- (void) windowDidResize: (NSNotification *)note\n{\n  reframeRenderers();\n}\n\n\n-(void) sendEvent: (NSEvent *)event\n{\n  int\t  type=     [event type];\n  NSPoint loc=      [event locationInWindow];\n  NSWindow *evtWin= [event window];\n#if 0\n  NSPoint loc=      (fullscreen\n\t\t     ? [NSEvent mouseLocation]\t//xxx should use deltas\n\t\t     : [event locationInWindow]);\n#endif\n\n  if (evtWin && ((NSWindow *)win != [event window]))\n    {\n      [super sendEvent: event];\n      return;\n    }\n\n  switch (type)\n    {\n#     define down buttonState |= qz2sqButton([event buttonNumber])\n#     define move\n#     define up\t  buttonState &= ~qz2sqButton([event buttonNumber])\n\n#     define recordEvent(delta)\t\t\t\t\t\\\n      if (fullscreen || NSPointInRect(loc, [view frame]))\t\\\n\t{\t\t\t\t\t\t\t\\\n\t  noteMousePoint(loc);\t\t\t\t\t\\\n\t  delta;\t\t\t\t\t\t\\\n\t  modifierState= qz2sqModifiers([event modifierFlags]);\t\\\n\t  noteMouseEvent();\t\t\t\t\t\\\n\t}\t\t\t\t\t\t\t\\\n      else\t\t\t\t\t\t\t\\\n\t[super sendEvent: event]\t// don't track outside window\n\n    case NSLeftMouseDown: case NSOtherMouseDown: case NSRightMouseDown:\n      if ((!active) || NSPointInRect(loc, resizeRect))\n\t[super sendEvent: event];\t// first click, or start resize\n      else\n\trecordEvent(down);\n      break;\n\n    case NSLeftMouseDragged: case NSRightMouseDragged: case NSOtherMouseDragged:\n      if (!(buttonState & qz2sqButton([event buttonNumber])))\n\t{\n\t  [super sendEvent: event];\t// already tracking window move\n\t  break;\n\t}\n      // fall through...\n    case NSMouseMoved:\n      recordEvent(move);\n      break;\n\n    case NSLeftMouseUp: case NSOtherMouseUp: case NSRightMouseUp:\n      recordEvent(up);\n      break;\n\n#     undef recordEvent\n#     undef down\n#     undef move\n#     undef up\n\n    case NSKeyDown:\n      {\n\tint keyCode;\n\tmodifierState= qz2sqModifiers([event modifierFlags]);\n\tkeyCode= [view composeKeyDown: event]; //qz2sqKey(event);\n\tif (keyCode >= 0)\n\t  {\n\t    if (cmdKeys)\n\t      {\n\t\tif ((modifierState == CommandKeyBit) || (modifierState == CommandKeyBit + ShiftKeyBit))\n\t\t  switch (keyCode)\n\t\t    {\n\t\t    case '?': [NSApp showHelp: self];\t\t\tkeyCode= -1; break;\n\t\t    case 'h': [NSApp hide: self];\t\t\tkeyCode= -1; break;\n\t\t    case 'k': [NSApp performDisableKeys: self];\t\tkeyCode= -1; break;\n\t\t    case 'm': [win   performMiniaturize: self];\t\tkeyCode= -1; break;\n\t\t    case 'q': [NSApp maybeTerminate: self];\t\tkeyCode= -1; break;\n\t\t    }\n\t\telse if (modifierState == CommandKeyBit + OptionKeyBit)\n\t\t  switch (keyCode)\n\t\t    {\n\t\t    case 'h': [NSApp hideOtherApplications: self];\tkeyCode= -1; break;\n\t\t    }\n\t      }\n\t    if (keyCode >= 0)\n\t      {\n\t\tif (![event isARepeat])\n\t\t  noteKeyboardEvent(keyCode, EventKeyDown, modifierState);\n\t\tnoteKeyboardEvent(keyCode, EventKeyChar, modifierState);\n\t\trecordKeystroke(keyCode);\t\t\t/* DEPRECATED */\n\t      }\n\t    else // key up not interesting\n\t      [view composeKeyUp: event];\n\t  }\n      }\n      break;\n\n    case NSKeyUp:\n      {\n\tint keyCode;\n\tmodifierState= qz2sqModifiers([event modifierFlags]);\n\tkeyCode= [view composeKeyUp: event]; //qz2sqKey(event);\n\tif (keyCode >= 0)\n\t  {\n\t    noteKeyboardEvent(keyCode, EventKeyUp, modifierState);\n\t    //accentMap= 0;\n\t  }\n      }\n      break;\n\n    case NSScrollWheel:\n      {\n\tint keyCode= ([event deltaY] >= 0.0) ? 30 : 31;\n\tnoteKeyboardEvent(keyCode, EventKeyDown, modifierState);\n\tnoteKeyboardEvent(keyCode, EventKeyChar, modifierState);\n\tnoteKeyboardEvent(keyCode, EventKeyUp,   modifierState);\n      }\n      break;\n\n    case NSAppKitDefined:\n      switch ([event subtype])\n\t{\n\tcase NSApplicationActivatedEventType:\n\t  active= 1;\n\t  break;\n\n\tcase NSApplicationDeactivatedEventType:\n\t  active= 0;\n\t  break;\n\t  // case NSScreenChangedEventType: //xxx this means the window\n\t  // changed to a different physical screen, which is useless\n\t  // info (we'd far rather be informed that the current screen's\n\t  // depth has changed)\n\t}\n      //DPRINTF((\"AppKitDefinedEvent subtype %d\\n\", [event subtype]));\n      [super sendEvent: event];\n      break;\n\n      // case NSFlagsChanged:\n      // case NSApplicationDefined: break;\n      // case NSPeriodic: break;\n      // case NSCursorUpdate: break;\n\n    default: // almost always NSSystemDefined\n      //DPRINTF((\"Event type %d subtype %d\\n\", [event type], [event subtype]));\n      [super sendEvent: event];\n    }\n}\n\n\n@end // Squeak\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-Quartz/SqueakView.h",
    "content": "// -*- ObjC -*-\n\n// Why QDView?  Well...\n// \n//   1) we can trivially obtain a raw pointer to its backing store, so\n//   2) no need to putz around with the lockFocus/DataProvider/ImageRep crap; plus\n//   3) its buffer's coordinate system is already the right way up for Squeak, so\n//   4) we avoid potential recopy (just to have CG recopy again); besides\n//   5) QDFlushBuffer is _blindingly_ fast (even compared to drawing directly on\n//      the framebuffer [go measure it if you don't believe me]); but most importantly\n//   6) the QD API is completely free of ObjC and attendant inefficiencies.\n\n@interface SqueakView : NSQuickDrawView <NSTextInput>\n- (BOOL) acceptsFirstResponder;\n- (BOOL) becomeFirstResponder;\n- (BOOL) isOpaque;\n- (BOOL) isFlipped;\n- (id)   initWithFrame: (NSRect)frame;\n- (void) setFrame: (NSRect)rect;\n- (void) drawRect: (NSRect)rect;\n- (void) viewWillStartLiveResize;\n- (void) viewDidEndLiveResize;\n- (int)  draggingEntered: (id<NSDraggingInfo>)sender;\n- (int)  draggingUpdated: (id<NSDraggingInfo>)sender;\n- (void) draggingExited: (id<NSDraggingInfo>)sender;\n- (BOOL) performDragOperation: (id<NSDraggingInfo>)sender;\n- (int) composeKeyDown: (NSEvent *)event;\n- (int) composeKeyUp: (NSEvent *)event;\n@end\n\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-Quartz/SqueakView.m",
    "content": "@implementation SqueakView\n\n- (BOOL) isOpaque\t\t{ return YES; }\n- (BOOL) isFlipped\t\t{ return YES; }\n- (BOOL) acceptsFirstResponder\t{ return YES; }\n- (BOOL) becomeFirstResponder\t{ return YES; }\n- (BOOL) resignFirstResponder\t{ return NO; }\n\n- (void) renewGState\n{\n  printf(\"\\nRENEW GSTATE\\n\\n\");\n  [super renewGState];\n}\n\nstatic NSRange inputMark;\nstatic NSRange inputSelection;\nstatic int     inputCharCode;\n\n- (id) initWithFrame: (NSRect)frame\n{\n  id result= [super initWithFrame: frame];\n  if (self == result)\n    [self registerForDraggedTypes:\n\t    [NSArray arrayWithObjects:\n\t\t       NSFilenamesPboardType, nil]];\n  inputCharCode=  -1;\n  inputMark=\t  NSMakeRange(NSNotFound, 0);\n  inputSelection= NSMakeRange(0, 0);\n  return result;\n}\n\n\n- (void) setFrame: (NSRect)rect\n{\n  lock(display);\n  [super setFrame: rect];\n  if ([self inLiveResize])\n    {\n#    if (RESIZE_IN_TITLE)\n      display_winSetName(shortImageName);\n#    endif\n    }\n  else\n    if ([self qdPort])\n      updatePix();\n  unlock(display);\n}\n\n\n- (void) drawRect: (NSRect)rect\t\t// view already has focus\n{\n  printf(\"drawRect:\\n\");\n  if ([self inLiveResize])\n    {\n      [[NSColor whiteColor] set];\n      NSRectFill(rect);\n      drawImage([[NSGraphicsContext currentContext] graphicsPort], 0);\n    }\n  else\n    {\n      if (!pixBase)\n\t{\n\t  printf(\"drawRect: calling updatePix\\n\");\n\t  assert([self qdPort]);\n\t  updatePix();\n\t}\n      fullDisplayUpdate();\n    }\n}\n\n- (void) viewWillStartLiveResize\n{\n  captureImage(1);\n  [win setShowsResizeIndicator: YES];\n  \n#if (RESIZE_IN_TITLE)\n  showExtent= 1;\n  display_winSetName(shortImageName);\n#endif\n  pixWidth= 0;\n  pixHeight= 0;\n}\n\n- (void) viewDidEndLiveResize\n{\n  releaseImage(1);\n  [win setShowsResizeIndicator: NO];\n#if (RESIZE_IN_TITLE)\n  showExtent= 0;\n  display_winSetName(shortImageName);\n#endif\n  updatePix();\n  fullDisplayUpdate(); // gets rid of the resize icon if window didn't resize\n}\n\n\n- (int) draggingEntered: (id<NSDraggingInfo>)info\n{\n  if ((dragCount == 0) // cannot drag again until previous drag completes\n      && ([info draggingSourceOperationMask] & NSDragOperationCopy))\n    {\n      int count= [[[info draggingPasteboard]\n\t\t    propertyListForType: NSFilenamesPboardType] count];\n      noteMousePoint([info draggingLocation]);\n      noteDragEvent(DragEnter, dragCount= count);\n      return NSDragOperationCopy;\n    }\n  return NSDragOperationNone;\n}\n\n- (int) draggingUpdated: (id<NSDraggingInfo>)info\n{\n  noteMousePoint([info draggingLocation]);\n  noteDragEvent(DragMove, dragCount);\n  return NSDragOperationCopy;\n}\n\n- (void) draggingExited: (id<NSDraggingInfo>)info\n{\n  noteMousePoint([info draggingLocation]);\n  noteDragEvent(DragLeave, dragCount);\n  dragCount= 0;\n}\n\n- (BOOL) performDragOperation: (id<NSDraggingInfo>)info\n{\n  NSPasteboard *pboard= [info draggingPasteboard];\n  noteMousePoint([info draggingLocation]);\n  if ([[pboard types] containsObject: NSFilenamesPboardType])\n    {\n      NSArray *files= [pboard propertyListForType: NSFilenamesPboardType];\n      int i;\n      if (uxDropFileCount)\n\t{\n\t  assert(uxDropFileNames);\n\t  for (i= 0;  i < uxDropFileCount;  ++i)\n\t    free(uxDropFileNames[i]);\n\t  free(uxDropFileNames);\n\t  uxDropFileNames= 0;\n\t}\n      if ((  (!(uxDropFileCount= [files count])))\n\t  || (!(uxDropFileNames= (char **)malloc(uxDropFileCount * sizeof(char *)))))\n\t{\n\t  uxDropFileCount= 0;\n\t  return NO;\n\t}\n      for (i= 0;  i < uxDropFileCount;  ++i)\n\tuxDropFileNames[i]= strdup([[files objectAtIndex: i] cString]);\n    }\n  noteDragEvent(DragDrop, uxDropFileCount);\n  dragCount= 0;\n\n  return YES;\t// under some duress, I might add (see sqUxDragDrop.c)\n}\n\n\nenum { KeyMapSize= 32 };\n\ntypedef struct\n{\n  int keyCode;\n  int keyChar;\n} KeyMapping;\n\nstatic KeyMapping keyMap[KeyMapSize];\n\nstatic int keyMapSize=\t   0;\nstatic int inputCharCode= -1;\n\nstatic int addToKeyMap(int keyCode, int keyChar)\n{\n  if (keyMapSize > KeyMapSize) { fprintf(stderr, \"keymap overflow\\n\");  return -1; }\n  keyMap[keyMapSize++]= (KeyMapping){ keyCode, keyChar };\n  return keyChar;\n}\n\nstatic int indexInKeyMap(int keyCode)\n{\n  int i;\n  for (i= 0;  i < keyMapSize;  ++i)\n    if (keyMap[i].keyCode == keyCode)\n      return i;\n  return -1;\n}\n\nstatic int findInKeyMap(int keyCode)\n{\n  int idx= indexInKeyMap(keyCode);\n  return (idx >= 0) ? keyMap[idx].keyChar : -1;\n}\n\nstatic int removeFromKeyMap(int keyCode)\n{\n  int idx= indexInKeyMap(keyCode);\n  int keyChar= -1;\n  if (idx < 0) { fprintf(stderr, \"keymap underflow\\n\");  return -1; }\n  keyChar= keyMap[idx].keyChar;\n  for (; idx < keyMapSize - 1;  ++idx)\n    keyMap[idx]= keyMap[idx + 1];\n  --keyMapSize;\n  return keyChar;\n}\n\n\n// the following (to @end) must be installed in the first responder\n\n- (int) composeKeyDown: (NSEvent *)event\n{\n  int keyCode= [event keyCode];\n  inputCharCode= -1;\n\n  if (modifierState & CommandKeyBit)\n    inputCharCode= qz2sqKey(event);\n  else\n    {\n      if ([event isARepeat])\n\t{\n\t  int keyChar= findInKeyMap(keyCode);\n\t  //printf(\"%d REP keyCode %x -> keyChar %x\\n\", keyMapSize, keyCode, keyChar);\n\t  return keyChar;\n\t}\n      else\n\t{\n\t  [self interpretKeyEvents: [NSArray arrayWithObject: event]];\n\t  if (inputCharCode < 0)\n\t    inputCharCode= qz2sqKey(event);\n\t}\n    }\n\n  if (inputCharCode >= 0)\n    {\n      //printf(\"%d ADD keyCode %x -> keyChar %x\\n\", keyMapSize, keyCode, inputCharCode);\n      addToKeyMap(keyCode, inputCharCode);\n    }\n\n  return inputCharCode;\n}\n\n- (int) composeKeyUp: (NSEvent *)event\n{\n  int keyCode= [event keyCode];\n  int keyChar= removeFromKeyMap(keyCode);\n  //printf(\"%d DEL keyCode %x -> charCode %x\\n\", keyMapSize, keyCode, keyChar);\n  return keyChar;\n}\n\n- (void) insertText: (NSString *)text\n{\n  //printf(\"insertText\\n\");\n  inputMark= NSMakeRange(NSNotFound, 0);\n  inputSelection= NSMakeRange(0, 0);\n  if ([text length])\n    {\n      UInt8 buf[4];\n      CFIndex nUsed;\n      if (CFStringGetBytes((CFStringRef)text, CFRangeMake(0, CFStringGetLength((CFStringRef)text)),\n\t\t\t   kCFStringEncodingMacRoman, 0, FALSE,\n\t\t\t   buf, sizeof(buf), &nUsed))\n\tinputCharCode= buf[0];\n    }\n}\n\n// ParagraphEditor's map looks like this:\n// \n//   0\tnoop cursorHome noop noop cursorEnd noop noop noop\n//   8\tbackspace noop noop cursorPageUp cursorPageDown crWithIndent noop noop\n//  16\tnoop noop noop noop noop noop noop noop\n//  24\tnoop noop noop offerMenuFromEsc cursorLeft cursorRight cursorUp cursorDown\n// 127  forwardDelete\n\n- (void) doCommandBySelector: (SEL)aSelector\n{\n  // why doesn't @selector() reduce to a constant??\n# define encode(c, s)  if (aSelector == @selector(s)) inputCharCode= c\n  // my (subjective) approximation of usage frequency...\n       encode(  8, deleteBackward:);\n  else encode( 13, insertNewline:);\n  else encode(  9, insertTab:);\n  else encode( 28, moveLeft:);\n  else encode( 29, moveRight:);\n  else encode( 30, moveUp:);\n  else encode( 31, moveDown:);\n  else encode( 11, pageUp:);\n  else encode( 12, pageDown:);\n  else encode(  1, moveToBeginningOfDocument:);\n  else encode(  4, moveToEndOfDocument:);\n  else encode(127, deleteForward:);\n  else encode( 27, _cancelKey:);\n  else\n    printf(\"doCommandBySelector: %s\\n\", sel_getName(aSelector));\n# undef encode\n}\n\n- (void) setMarkedText: (id)aString selectedRange: (NSRange)selRange\n{\n  inputMark= NSMakeRange(0, 1);\n  inputSelection= NSMakeRange(NSNotFound, 0);\n}\n\n- (void)\t\t unmarkText\t\t\t\t\t\t{ inputMark= NSMakeRange(NSNotFound, 0); }\n- (BOOL)\t\t hasMarkedText\t\t\t\t\t\t{ return inputMark.location != NSNotFound; }\n- (long)\t\t conversationIdentifier\t\t\t\t\t{ return (long)self; }\n- (NSAttributedString *) attributedSubstringFromRange: (NSRange)theRange\t{ return nil; }\n- (NSRange)\t\t markedRange\t\t\t\t\t\t{ return inputMark; }\n- (NSRange)\t\t selectedRange\t\t\t\t\t\t{ return inputSelection; }\n- (NSRect)\t\t firstRectForCharacterRange: (NSRange)theRange\t\t{ return NSMakeRect(0,0, 0,0); }\n- (unsigned int)\t characterIndexForPoint: (NSPoint)thePoint\t\t{ return 0; }\n- (NSArray *)\t\t validAttributesForMarkedText\t\t\t\t{ return nil; }\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-Quartz/SqueakWindow.h",
    "content": "// -*- ObjC -*-\n\n@interface SqueakWindow : NSWindow\n{\n  NSImage *icon;\n}\n- (BOOL) isOpaque;\n- (BOOL) canBecomeKeyWindow;\n- (void) setIcon;\n- (void) performMiniaturize: (id)sender;\n- (void) miniaturize: (id)sender;\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-Quartz/SqueakWindow.m",
    "content": "@implementation SqueakWindow\n\n- (BOOL) isOpaque\t\t{ return YES; }\n- (BOOL) canBecomeKeyWindow\t{ return YES; }\n\n- (void) setIcon\n{\n  /////////////xxxxxxxxxxxxxxxxxxxxxxxxxx REMOVE\n  icon= [[NSImage alloc] initWithContentsOfFile: @\"transp.icns\"];\n  if (icon)\n    [NSApp setApplicationIconImage: icon];\n}\n\n- (NSImage *) dockImage\n{\n  NSBitmapImageRep *rep= [NSBitmapImageRep alloc];\n  if ([rep initWithFocusedViewRect: topRect])\n    {\n      NSImage *image= [[NSImage alloc] init];\n      [image addRepresentation: rep];\n      if (icon)\n\t{\n\t  [image lockFocus];\n\t  [icon drawInRect: NSMakeRect(0, 0, [image size].width, [image size].height)\n\t\tfromRect:   NSMakeRect(0, 0, [icon size].width, [icon size].height)\n\t\toperation:  NSCompositeSourceOver\n\t\tfraction:   1.0];\n\t  [image unlockFocus];\n\t}\n      return image;\n    }\n  return nil;\n}\n\n- (void) performMiniaturize: (id)sender\n{\n  if (!glActive)\n    [super performMiniaturize: sender];\n}\n\n- (void) miniaturize: (id)sender\n{\n  NSImage *image= [self dockImage];\n  if (image)\n    [self setMiniwindowImage: image];\n  [image release];\n  [super miniaturize: sender];\n}\n\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-Quartz/acinclude.m4",
    "content": "# -*- sh -*-\n\nAC_ARG_WITH(quartz,\n[  --without-quartz        disable MacOSX Window System support [default=enabled]],\n  [have_quartz=\"$withval\"],\n  [have_quartz=\"yes\"])\n\ncase $host_os in\n  darwin*) ;;\n  *)       have_quartz=\"no\";;\nesac\n\nif test \"$have_quartz\" = \"yes\"; then\n  AC_DEFINE(USE_QUARTZ, [1])\n  if test \"$have_gl\" = \"\"; then have_gl=\"no\"; fi\n  AC_CHECK_HEADERS(OpenGL/gl.h, [\n    have_gl=yes\n    AC_DEFINE(USE_QUARTZ_CGL, [1])\n  ])\nelse\n  AC_PLUGIN_DISABLE\nfi\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-Quartz/build.cmake",
    "content": "EXPECT_UNDEFINED_SYMBOLS ()\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-Quartz/config.cmake",
    "content": "IF (NOT APPLE)\n  PLUGIN_DISABLE ()\nELSE ()\n  PLUGIN_INCLUDE_DIRECTORIES (${cross}/plugins/B3DAcceleratorPlugin ${AGL_INCLUDE_DIR})\n  PLUGIN_LINK_LIBRARIES (${AGL_LIBRARIES} \"-framework Cocoa\")\nENDIF (NOT APPLE)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-Quartz/mkinfo",
    "content": "#!/bin/sh\n\nIN=$1; shift\nOUT=$1; shift\nBNDL_VERSION=\"$@\"\n\nsed \"s%\\@BNDL_VERSION@%${BNDL_VERSION}%g\" < ${IN} > ${OUT}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-Quartz/sqUnixQuartz.m",
    "content": "/* sqUnixQuartz.m -- display via native windows on Mac OS X\t-*- ObjC -*-\n * \n * Author: Ian Piumarta <ian.piumarta@squeakland.org>\n * \n *   Copyright (C) 1996-2005 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *      You are NOT ALLOWED to distribute modified versions of this file\n *      under its original name.  If you modify this file then you MUST\n *      rename it before making your modifications available publicly.\n * \n *   This file is distributed in the hope that it will be useful, but WITHOUT\n *   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n *   FITNESS FOR A PARTICULAR PURPOSE.\n *   \n *   You may use and/or distribute this file ONLY as part of Squeak, under\n *   the terms of the Squeak License as described in `LICENSE' in the base of\n *   this distribution, subject to the following additional restrictions:\n * \n *   1. The origin of this software must not be misrepresented; you must not\n *      claim that you wrote the original software.  If you use this software\n *      in a product, an acknowledgment to the original author(s) (and any\n *      other contributors mentioned herein) in the product documentation\n *      would be appreciated but is not required.\n * \n *   2. You must not distribute (or make publicly available by any\n *      means) a modified copy of this file unless you first rename it.\n * \n *   3. This notice must not be removed or altered in any source distribution.\n * \n *   Using (or modifying this file for use) in any context other than Squeak\n *   changes these copyright conditions.  Read the file `COPYING' in the\n *   directory `platforms/unix/doc' before proceeding with any such use.\n * \n * Last edited: 2006-04-17 16:56:53 by piumarta on margaux.local\n */\n\n\n//xxx ...\n// \n// check use of winRect and titleRect.  reduce to (int)winHeight and\n// (int)titleHeight in setRects.\n// \n// investigate creating sq events in the UI thread and then sending\n// them down the notification pipe, instead of locking the event\n// queue.\n\n\n#import <Cocoa/Cocoa.h>\n\n#include \"sqUnixMain.h\"\n#include \"sqUnixGlobals.h\"\n#include \"sqUnixCharConv.h\"\n\n#include \"sq.h\"\n#include \"sqaio.h\"\n\n#include <unistd.h>\n#include <stdlib.h>\n#include <stdarg.h>\n#include <stdio.h>\n#include <string.h>\n#include <sys/param.h>\n#include <sys/types.h>\n#include <sys/stat.h>\n#include <sys/socket.h>\n#include <sys/ioctl.h>\n#include <fcntl.h>\n#include <pthread.h>\n#include <sched.h>\n\n#include \"debug.h\"\n\n#include \"config.h\"\n#undef HAVE_GL_GL_H\n#include \"SqDisplay.h\"\n\n\n/// \n/// Things you can tweak, if you're curious/bored enough to want to...\n/// \n\n// do we draw the current screen extent (width x height) in the title\n// bar during live resize?\n// \n#define\tRESIZE_IN_TITLE\t 1\n\n// how large a (square) area, in the lower right of the window, should\n// respond to mouse down by initiating window resize?  (the resize\n// icon itself is, when we allow it to be shown, 13x13 pixels.)\n// \n#define\tRESIZE_EXTENT\t 8\n\n// do we fade the screen out and back in gently when changing to\n// fullscreen mode, or just switch with one big violent click?  if\n// this is defined then it represents the incr/decrement per\n// millisecond of the gamma multiplier (1.0 to 0.0 and back); if\n// undefined then the switch is immediate.\n// \n#undef\tFULLSCREEN_FADE\t 0.02\n\n/// \n/// No more user-serviceable parts in this file.  Stop Tweaking Now!\n/// \n\n#define USE_SPINLOCK\t1\n#define USE_OWN_ICON\t0\n\nstatic inline int min(int x, int y) { return x < y ? x : y; }\nstatic inline int max(int x, int y) { return x > y ? x : y; }\n\n\n// -*- ObjC -*-\n\n@interface Squeak : NSApplication\n- (void) applicationDidFinishLaunching: (NSNotification *)note;\n- (void) applicationDidChangeScreenParameters: (NSNotification *)note;\n- (void) unhideAllApplications: (id)sender;\n- (BOOL) windowShouldClose: (id)sender;\n- (void) maybeTerminate: (id)sender;\n- (void) terminate: (id)sender;\n- (void) performEnableKeys: (id)sender;\n- (void) performDisableKeys: (id)sender;\n@end\n\n\n@interface SqueakWindow : NSWindow\n{\n  NSImage *icon;\n}\n- (BOOL) isOpaque;\n- (BOOL) canBecomeKeyWindow;\n- (void) setIcon;\n#if 0\n- (NSImage *) dockImage\n- (void) miniaturize: (id)sender;\n#endif\n- (void) performMiniaturize: (id)sender;\n@end\n\n\n// Why QDView?  Well...\n// \n//   1) we can trivially obtain a raw pointer to its backing store, so\n//   2) no need to putz around with the lockFocus/DataProvider/ImageRep crap; plus\n//   3) its buffer's coordinate system is already the right way up for Squeak, so\n//   4) we avoid potential recopy (just to have CG recopy again); besides\n//   5) QDFlushBuffer is _blindingly_ fast (even compared to drawing directly on\n//      the framebuffer [go measure it if you don't believe me]); but most importantly\n//   6) the QD API is completely free of ObjC and attendant inefficiencies.\n\n@interface SqueakView : NSQuickDrawView <NSTextInput>\n- (BOOL) acceptsFirstResponder;\n- (BOOL) becomeFirstResponder;\n- (BOOL) isOpaque;\n- (BOOL) isFlipped;\n- (id)   initWithFrame: (NSRect)frame;\n- (void) setFrame: (NSRect)rect;\n- (void) drawRect: (NSRect)rect;\n- (void) viewWillStartLiveResize;\n- (void) viewDidEndLiveResize;\n- (int)  draggingEntered: (id<NSDraggingInfo>)sender;\n- (int)  draggingUpdated: (id<NSDraggingInfo>)sender;\n- (void) draggingExited: (id<NSDraggingInfo>)sender;\n- (BOOL) performDragOperation: (id<NSDraggingInfo>)sender;\n- (int) composeKeyDown: (NSEvent *)event;\n- (int) composeKeyUp: (NSEvent *)event;\n@end\n\n\nstatic SqueakView\t*view\t    = 0; /* app view (occupies topRect)\t\t */\n\n\n@interface TopView : NSView\n- (void) setFrame: (NSRect)rect;\n@end\n\n@implementation TopView\n- (void) setFrame: (NSRect)rect\n{\n  [super setFrame: rect];\n  if (view) [view setFrame: rect];\n}\n@end\n\n\nstatic int\t\t styleMask  = 0; /* window style mask\t\t\t*/\nstatic int\t\t dragCount  = 0; /* number of items during drag/drop\t*/\nstatic int\t\t showExtent = 0; /* 1 if title bar shows view extent\t*/\n       int\t\t inModalLoop= 0; /* 1 when WS is in tracking loop\t*/\nstatic int\t\t active     = 0; /* 1 when app window is active\t\t*/\n\n//static CFArrayRef\t   dpyModes   = 0; /* one of these days... */\n\nstatic CGDirectDisplayID dpy\t    = 0;\nstatic NSDictionary\t*dpyMode    = 0;\nstatic int\t\t dpyWidth   = 0;\nstatic int\t\t dpyHeight  = 0;\nstatic int\t\t dpyDepth   = 0;\n       char\t\t*dpyPixels  = 0;\n       int\t\t dpyPitch   = 0;\n\nstatic SqueakWindow\t*win\t    = 0; /* main application window\t\t */\nstatic NSRect\t\t topRect;\t /* main window frame (excl. decoration) */\nstatic NSRect\t\t titleRect;\t /* decoration area (above topRect)\t */\nstatic NSRect\t\t resizeRect;\t /* area sensitive to resize\t\t */\n\nstatic TopView\t\t*topView    = 0; /* top view (occupies topRect)\t\t */\n\nstatic char\t\t*pixBase    = 0;\nstatic int\t\t pixWidth   = 0; /* pixmap width (pixels)\t\t */\nstatic int\t\t pixHeight  = 0; /* pixmap height\t\t\t */\nstatic int\t\t pixDepth   = 0; /* pixmap depth\t\t\t */\nstatic int\t\t pixPitch   = 0;\nstatic RgnHandle\t pixRegion  = 0;\n\nstatic int\t\t cmdKeys    = 0; /* 1 if app command keys enabled\t */\nstatic int\t\t fromFinder = 0; /* 1 if app launched from finder\t */\nstatic int\t\t noTitle    = 0; /* 1 if app window is undecorated\t */\nstatic int\t\t headless   = 0; /* 1 if app has no window\t\t */\nstatic int\t\t noDock     = 0; /* 1 if app window is undocked\t\t */\nstatic int\t\t fullscreen = 0; /* 1 if window fullscreen and on top\t */\n\nstatic char\t\t*clipboard  = 0;\n\nstatic int\t\t stXfd\t    = -1;\nstatic int\t\t osXfd\t    = -1;\n\n#if (USE_SPINLOCK)\nstatic int\t\t displayMx  = 0;\n#else\nstatic pthread_mutex_t\t displayMx  = PTHREAD_MUTEX_INITIALIZER;\n#endif\n\nstatic char\t\t resourcePath[MAXPATHLEN];\n\nstatic int  glActive= 0;\nstatic void reframeRenderers(void);\nstatic void updateRenderers(void);\n\n\n\n#if 0 //xxx REMOVE ME\n\n#define RED\t0xff0000\n#define GREEN\t0x00ff00\n#define BLUE\t0x0000ff\n#define WHITE\t0xffffff\n#define BLACK\t0x000000\n\nvoid feedback(int offset, int pixel)\n{\n  const int width= 4, height= 4;\n  long *base=  CGDisplayBaseAddress(dpy);\n  int   pitch= CGDisplayBytesPerRow(dpy);\n  int x, y;\n\n  base= base + width * offset;\n\n  for (y= 0; y < height; ++y)\n    {\n      for (x= 0; x < width; ++x)\n\tbase[x]= pixel;\n      base= (long *)((char *)base + pitch);\n    }\n}\n\n#endif\n\n\n#if (USE_SPINLOCK)\n\nextern inline int testAndSet(int *lock)\n{\n  int valu;\n  asm volatile(\"        lwarx   %0, 0, %1       \\n\"\n               \"        cmpwi   %0, 0           \\n\"\n               \"        bne-    1f              \\n\"\n               \"        li      %0, 1           \\n\"\n               \"        stwcx.  %0, 0, %1       \\n\"\n               \"        bne-    1f              \\n\"\n               \"        li      %0, 0           \\n\"\n               \"1:                              \\n\"\n               : \"=&r\"(valu) : \"r\"(lock) : \"cr0\",\"memory\");\n  return valu;\n}\n\nextern inline int doLock(int *lock, const char *who)\n{\n  while (testAndSet(lock))\n    ;\n  return 1;\n}\n\nextern inline void doUnlock(int *lock)\n{\n  *lock= 0;\n}\n\n#else\n\n//xxx FIXME SOON: check all uses of lock() and conditionalise the\n//  sections where failure could cause SEGV (rather than just\n//  inconsistent geometry or whatever)\n\nstatic int doLock(pthread_mutex_t *mx, char *who)\n{\n  static char *owner= \"<none>\";\n  int backoff, i= 0;\n  // wait about 1 second before giving up (10000 == timeslice quantum)\n  for (backoff= 10000;  backoff < 1280000;  ++i, backoff <<= 1)\n    if (0 == pthread_mutex_trylock(mx))\n      {\n\towner= who;\n\treturn 1;\n      }\n    else\n      {\n#      ifndef NDEBUG\n\tfprintf(stderr, \"lock %d: %s waiting for %-20s\\n\", i, who, owner);\n#      endif\n\tusleep(backoff);\n      }\n  perror(\"pthread_mutex_trylock\");\n  return 0;\n}\n\nstatic void doUnlock(pthread_mutex_t *mx)\n{\n  if (pthread_mutex_unlock(mx))\n    perror(\"pthread_mutex_unlock\");\n}\n\n#endif\n\n\n#define lock(MX)\tdoLock(&MX##Mx, __FUNCTION__)\n#define unlock(MX)\tdoUnlock(&MX##Mx)\n\n\n#include \"sqUnixEvent.c\"\n\n\n\n//xxx FIXME: this is currently monochrome\n\nstatic sqInt display_ioFormPrint(sqInt bitsAddr, sqInt width, sqInt height, sqInt depth,\n\t\t\t\t double hScale, double vScale, sqInt landscapeFlag)\n{\n  //xxx hScale and vScale are ppi.  is there a way to use this\n  // meaningfully with PrintInfo or NSPrinter?\n\n  NSAutoreleasePool *pool= [[NSAutoreleasePool alloc] init];\n  int opp=     depth / 8;\n  int success= 1;\n\n  DPRINTF((\"ioFormPrint %f %f\\n\", hScale, vScale));\n  {\n    unsigned char    *planes[1]= { (unsigned char *)pointerForOop(bitsAddr) };\n    NSBitmapImageRep *bitmap= \t 0;\n    NSImage\t     *image=  \t 0;\n    NSImageView\t     *view=   \t 0;\n\n    bitmap= [[NSBitmapImageRep alloc]\n\t      initWithBitmapDataPlanes: planes\n\t      pixelsWide:\t\twidth\n\t      pixelsHigh:\t\theight\n\t      bitsPerSample:\t\tdepth\n\t      samplesPerPixel:\t\t1\n\t      hasAlpha:\t\t\tNO\n\t      isPlanar:\t\t\tNO\n\t      colorSpaceName:\t\tNSCalibratedBlackColorSpace\n\t      bytesPerRow:\t\twidth * opp\n\t      bitsPerPixel:\t\tdepth];\n    if (!bitmap) { DPRINTF((\"bitmap fail\\n\")); success= 0; goto done; }\n    image= [NSImage alloc];\n    //[image setSize: NSMakeSize(width, height)];\n    [image addRepresentation: bitmap];\n    if (!image) { DPRINTF((\"image fail\\n\")); success= 0; goto done; }\n    view= [[NSImageView alloc] initWithFrame: NSMakeRect(0, 0, width, height)];\n    [view setImage: image];\n    {\n      NSPrintOperation *op=  [NSPrintOperation printOperationWithView: view];\n      [op setShowPanels: YES];\n      DPRINTF((\"launch print operation\\n\"));\n      [op runOperation];\n    }\n  }\n\n done:\n  DPRINTF((\"ioFormPrint done.\\n\"));\n  [pool release];\n  return success;\n}\n\n\nstatic sqInt display_ioBeep(void)\n{\n  NSBeep();\n  return 0;\n}\n\n\nstatic sqInt display_ioRelinquishProcessorForMicroseconds(sqInt microSeconds)\n{\n  aioSleepForUsecs(microSeconds);\n  return 0;\n}\n\n\n\n///\n/// events\n/// \n\n\nstatic unsigned int qz2sqModifiers(unsigned int qz)\n{\n  return\n    ( ((qz & (NSShiftKeyMask | NSAlphaShiftKeyMask)) ? ShiftKeyBit   : 0))\n    | ((qz &  NSControlKeyMask)\t\t\t     ? CtrlKeyBit    : 0)\n    | ((qz &  NSAlternateKeyMask)\t\t     ? OptionKeyBit  : 0)\n    | ((qz &  NSCommandKeyMask)\t\t\t     ? CommandKeyBit : 0);\n}\n\nstatic unsigned int qz2sqButton(unsigned int button)\n{\n  // the image has blue and yellow back-to-front.  fix that here...\n  switch (button)\n    {\n    case 0: return RedButtonBit;\n    case 1: return (swapBtn ? YellowButtonBit : BlueButtonBit);\n    case 2: return (swapBtn ? BlueButtonBit   : YellowButtonBit);\n    }\n  DPRINTF((\"unknown mouse button %d\\n\", button));\n  return RedButtonBit;\n}\n\n\nstatic unsigned int qz2sqKey(NSEvent *event)\n{\n  NSAutoreleasePool *pool=  [[NSAutoreleasePool alloc] init];\n  NSString\t    *chars= [event characters];\n  UInt32\t     enc=   CFStringConvertEncodingToNSStringEncoding((CFStringEncoding)sqTextEncoding);\n  NSData\t    *data=  [chars dataUsingEncoding: enc allowLossyConversion: NO];\n  int keyCode= -1;\n\n# define returnKey(N)\tkeyCode= (N);  goto done\n\n  if ([data length])\n    {\n      keyCode= ((unsigned char *)[data bytes])[0];\n      if (keyCode == 127)\n\tkeyCode= 8;\n      goto done;\n    }\n  \n  if ([chars length])\n    {\n      keyCode= [chars characterAtIndex: 0];\n      switch (keyCode)\n\t{\n\tcase NSDeleteFunctionKey:\treturnKey( 8);\n\tcase NSUpArrowFunctionKey:\treturnKey(30);\n\tcase NSDownArrowFunctionKey:\treturnKey(31);\n\tcase NSLeftArrowFunctionKey:\treturnKey(28);\n\tcase NSRightArrowFunctionKey:\treturnKey(29);\n\tcase NSHomeFunctionKey:\t\treturnKey( 1);\n\tcase NSEndFunctionKey:\t\treturnKey( 4);\n\tcase NSPageUpFunctionKey:\treturnKey(11);\n\tcase NSPageDownFunctionKey:\treturnKey(12);\n\t  /* -- these should probably be implemented -- */\n#\tdefine unknown(KEY) printf(KEY\"\\n\"); returnKey(-1)\n\tcase NSClearLineFunctionKey:\tunknown(\"Clear/Num Lock\");\n\tcase NSHelpFunctionKey:\t\tunknown(\"Help\");\n\t  /* -- the rest are missing on most mac keyboards -- */\n\tcase NSBeginFunctionKey:\tunknown(\"Begin\");\n\tcase NSPrintScreenFunctionKey:\tunknown(\"Print Screen\");\n\tcase NSScrollLockFunctionKey:\tunknown(\"Scroll Lock\");\n\tcase NSPauseFunctionKey:\tunknown(\"Pause\");\n\tcase NSSysReqFunctionKey:\tunknown(\"System Request\");\n\tcase NSBreakFunctionKey:\tunknown(\"Break\");\n\tcase NSResetFunctionKey:\tunknown(\"Reset\");\n\tcase NSStopFunctionKey:\t\tunknown(\"Stop\");\n\tcase NSMenuFunctionKey:\t\tunknown(\"Menu\");\n\tcase NSUserFunctionKey:\t\tunknown(\"User\");\n\tcase NSSystemFunctionKey:\tunknown(\"System\");\n\tcase NSPrintFunctionKey:\tunknown(\"Print\");\n\tcase NSClearDisplayFunctionKey:\tunknown(\"Clear Display\");\n\tcase NSInsertLineFunctionKey:\tunknown(\"Insert Line\");\n\tcase NSDeleteLineFunctionKey:\tunknown(\"Delete Line\");\n\tcase NSInsertCharFunctionKey:\tunknown(\"Insert Character\");\n\tcase NSDeleteCharFunctionKey:\tunknown(\"Delete Character\");\n\tcase NSPrevFunctionKey:\t\tunknown(\"Previous\");\n\tcase NSNextFunctionKey:\t\tunknown(\"Next\");\n\tcase NSSelectFunctionKey:\tunknown(\"Select\");\n\tcase NSExecuteFunctionKey:\tunknown(\"Execute\");\n\tcase NSUndoFunctionKey:\t\tunknown(\"Undo\");\n\tcase NSRedoFunctionKey:\t\tunknown(\"Redo\");\n\tcase NSFindFunctionKey:\t\tunknown(\"Find\");\n\tcase NSModeSwitchFunctionKey:\tunknown(\"Mode Switch\");\n#\tundef unknown\n\t}\n      if (keyCode & 0xff00)\n\tkeyCode= -1;\n    }\n\n done:\n  [pool release];\n  return keyCode;\n}\n\n\n\nstatic inline void noteMousePoint(NSPoint loc)\n{\n  int x= (int)loc.x;\n  int y= (int)topRect.size.height - (int)loc.y;\n  // mouse motion/up is tracked outside of topRect when active, so\n  // clamp it explicitly\n  // (note: there's a race here, but it's benign)\n  mousePosition.x= max(0, min(x, pixWidth  - 1));\n  mousePosition.y= max(0, min(y, pixHeight - 1));\n}\n\n\nstatic void evtHandler(int fd, void *data, int flags)\n{\n  for (;;)\n    {\n      sqInputEvent evt;\n      int n= read(fd, (void *)&evt, sizeof(evt));\n      if (n < 0)\n\t{\n\t  if ((EINTR == errno) || (EAGAIN == errno))\n\t    break;\n\t  perror(\"evtHandler: read\");\n\t}\n      else if (n == 0)\n\tbreak;\n      else if (n != sizeof(evt))\n\tfprintf(stderr, \"evtHandler: read returned %d -- why?\\n\", n);\n      else\n\t{\n\t  sqInputEvent *evp= allocateInputEvent(0);\n\t  *evp= evt;\n\t  signalInputEvent();\n\t}\n    }\n  aioHandle(fd, evtHandler, AIO_RX);\n}\n\n\nstatic void sendEvent(sqInputEvent *evt)\n{\n  if (inModalLoop)    //xxx there are other ways to escape from one of these\n    inModalLoop= 0;\n  if (sizeof(*evt) != write(osXfd, evt, sizeof(*evt)))\n    perror(\"sendEvent: write\");\n}\n\n\nstatic int makeButtonState(void)\n{\n  int btn= buttonState;\n  int mod= modifierState;\n  if (btn == RedButtonBit)\n    switch (mod)\n      {\n      case OptionKeyBit:\tbtn= YellowButtonBit;\tmod= 0;\tbreak;\n      case CommandKeyBit:\tbtn= BlueButtonBit;\tmod= 0;\tbreak;\n      }\n  return (mod << 3) | btn;\n}\n\n\nstatic void noteMouseEvent(void)\n{\n  int state= makeButtonState();\n  sqMouseEvent evt;\n  evt.type= EventTypeMouse;\n  evt.timeStamp= ioMSecs();\n  evt.x= mousePosition.x;\n  evt.y= mousePosition.y;\n  evt.buttons= (state & 0x7);\n  evt.modifiers= (state >> 3);\n  evt.reserved1= 0;\n  evt.windowIndex= 0;\n#ifdef DEBUG_EVENTS\n  printf(\"EVENT: mouse (%d,%d)\", mousePosition.x, mousePosition.y);\n  printModifiers(state >> 3);\n  printButtons(state & 7);\n  printf(\"\\n\");\n#endif\n  sendEvent((sqInputEvent *)&evt);\n}\n\n\nstatic void noteKeyboardEvent(int keyCode, int pressCode, int modifiers)\n{\n  sqKeyboardEvent evt;\n  evt.type= EventTypeKeyboard;\n  evt.timeStamp= ioMSecs();\n  evt.charCode= keyCode;\n  evt.pressCode= pressCode;\n  evt.modifiers= modifiers;\n  evt.utf32Code= 0;\t/* xxx TODO xxx */\n  evt.reserved1= 0;\n  evt.windowIndex= 0;\n#ifdef DEBUG_EVENTS\n  printf(\"EVENT: keyboard\");\n  printModifiers(modifiers);\n  printKey(keyCode);\n  printf(\"\\n\");\n#endif\n  sendEvent((sqInputEvent *)&evt);\n}\n\n\nstatic void noteDragEvent(int dragType, int numFiles)\n{\n  int state= makeButtonState();\n  sqDragDropFilesEvent evt;\n  evt.type= EventTypeDragDropFiles;\n  evt.timeStamp= ioMSecs();\n  evt.dragType= dragType;\n  evt.x= mousePosition.x;\n  evt.y= mousePosition.y;\n  evt.modifiers= (state >> 3);\n  evt.numFiles= numFiles;\n  evt.windowIndex= 0;\n  sendEvent((sqInputEvent *)&evt);\n}\n\n\nstatic sqInt display_ioProcessEvents(void)\n{\n  return aioPoll(0);\n}\n\n\nstatic sqInt display_ioScreenDepth(void)\n{\n  return headless ? 1 : dpyDepth;\n}\n\nstatic int displayChanged= 0;\n\nstatic sqInt display_ioScreenSize(void)\n{\n  int size;\n  if (headless)\n    return ((16 << 16) | 16);\n  if (displayChanged)\n    {\n      displayChanged= 0;\n      [win setFrame: [win frame] display: YES];\n      return 0;\n    }\n  lock(display);\n  size= getSavedWindowSize();\n  unlock(display);\n  return size;\n}\n\n\nstatic sqInt display_ioSetCursorWithMask(sqInt cursorBitsIndex, sqInt cursorMaskIndex, sqInt offsetX, sqInt offsetY)\n{\n  if (headless)\n    return 0;\n\n  if ([view lockFocusIfCanDraw])\n    {\n      NSAutoreleasePool *pool= [[NSAutoreleasePool alloc] init];\n      NSBitmapImageRep *bitmap= 0;\n      NSImage          *image=  0;\n      NSCursor         *cursor= 0;\n\n      if (cursorMaskIndex == 0)\n\tcursorMaskIndex= cursorBitsIndex;\n\n      bitmap= [[NSBitmapImageRep alloc]\n\t\tinitWithBitmapDataPlanes: 0 pixelsWide: 16 pixelsHigh: 16\n\t\tbitsPerSample: 1 samplesPerPixel: 2\n\t\thasAlpha: YES isPlanar: YES\n\t\tcolorSpaceName: NSCalibratedBlackColorSpace\n\t\tbytesPerRow: 2\n\t\tbitsPerPixel: 0];\n      {\n\tunsigned char *planes[5];\n\t[bitmap getBitmapDataPlanes: planes];\n\t{\n\t  unsigned char *data= planes[0];\n\t  unsigned char *mask= planes[1];\n\t  int            i;\n\n\t  for (i= 0; i < 16; ++i)\n\t    {\n\t      unsigned int word= ((unsigned int *)pointerForOop(cursorBitsIndex))[i];\n\t      data[i*2 + 0]= (word >> 24) & 0xFF;\n\t      data[i*2 + 1]= (word >> 16) & 0xFF;\n\t      word= ((unsigned int *)pointerForOop(cursorMaskIndex))[i];\n\t      mask[i*2 + 0]= (word >> 24) & 0xFF;\n\t      mask[i*2 + 1]= (word >> 16) & 0xFF;\n\t    }\n\t}\n      }\n      image= [[NSImage alloc] init];\n      [image addRepresentation: bitmap];\n      {\n\tNSPoint hotSpot= { -offsetX, -offsetY };\n\tcursor= [[NSCursor alloc] initWithImage: image hotSpot: hotSpot];\n      }\n      [cursor set];\n      [pool release];\n      [view unlockFocus];\n    }\n  return 1;\n}\n\n#if 0\nstatic sqInt display_ioSetCursor(sqInt cursorBitsIndex, sqInt offsetX, sqInt offsetY)\n{\n  return ioSetCursorWithMask(cursorBitsIndex, cursorBitsIndex, offsetX, offsetY);\n}\n#endif\n\n\nstatic sqInt display_ioForceDisplayUpdate(void)\n{\n  return 0;\n}\n\n\n#if 0\n\nstatic void setRects(int w, int h)\n{\n  DPRINTF((\"setRects %d %d\\n\", w, h));\n  topRect= NSMakeRect(0,0, w,h);\n  if (fullscreen)\n    {\n      titleRect=  NSMakeRect(0, dpyHeight, dpyWidth, 0);\n      resizeRect= NSMakeRect(dpyWidth, 0, 0, 0);\n    }\n  else\n    {\n      void *port= [view qdPort];\n      titleRect  = [NSWindow frameRectForContentRect: topRect styleMask: styleMask];\n      titleRect.origin.y += h;\n      titleRect.size.height -= h;\n      resizeRect= NSMakeRect(pixWidth - RESIZE_EXTENT, 0, RESIZE_EXTENT, RESIZE_EXTENT);\n      if (port)\t// no port while window is deferred\n\t{\n\t  PixMapHandle pix;\n\t  LockPortBits(port);\n\t  {\n\t    pix      = GetPortPixMap(port);\n\t    pixPitch = GetPixRowBytes(pix);\n\t    pixBase  = ((char *)GetPixBaseAddr(pix)\n\t\t\t+ ((int)titleRect.size.height * pixPitch));\n\t  }\n\t  UnlockPortBits(port);\n\t}\n    }\n  setSavedWindowSize((w << 16) | h);\t// assume this is atomic\n}\n\n#endif\n\n\nstatic char *updatePix(void)\n{\n  void *port= [view qdPort];\n  assert(win);  assert(topView);  assert(view);\n  if (port)\t// no port while window is deferred\n    {\n      int w, h;\n      NSRect winRect= [win frame];\n      winRect.origin= NSMakePoint(0, 0);\t// window coordinates\n      topRect= [NSWindow contentRectForFrameRect: winRect styleMask: styleMask];\n      w= NSWidth(topRect);\n      h= NSHeight(topRect);\n      DPRINTF((\"updatePix w=%d h=%d\\n\", w, h));\n      setSavedWindowSize((w << 16) | h);\t\t\t// assume this is atomic\n      if (fullscreen)\n\t{\n\t  titleRect=  NSMakeRect(0, dpyHeight, dpyWidth, 0);\t// empty & offscreen\n\t  resizeRect= NSMakeRect(dpyWidth, 0, 0, 0);\t\t// empty & offscreen\n\t}\n      else\n\t{\n\t  titleRect= winRect;\n\t  titleRect.origin.y    += h;\n\t  titleRect.size.height -= h;\n\t  resizeRect= NSMakeRect(w - RESIZE_EXTENT, 0, RESIZE_EXTENT, RESIZE_EXTENT);\n\t}\n      pixWidth= w;\n      pixHeight= h;\n      LockPortBits(port);\n      {\n\tPixMapHandle pix= GetPortPixMap(port);\n\tpixDepth= GetPixDepth(pix);\n\tpixPitch= GetPixRowBytes(pix);\n\tassert(pixPitch);\n\tassert(pixPitch >= w * (pixDepth / 8));\n\tpixBase= ((char *)GetPixBaseAddr(pix) + ((int)NSHeight(titleRect) * pixPitch));\n\tassert(pixBase);\n      }\n      UnlockPortBits(port);\n    }\n  else\n    {\n      DPRINTF((\"updatePix: NO PORT!\\n\"));\n      pixBase= 0;\n    }\n  DPRINTF((\"pixBase %p, width %d, height %d, depth %d, pitch %d\\n\",\n\t   pixBase, pixWidth, pixHeight, pixDepth, pixPitch));\n  return pixBase;\n}\n\n\n\n#define bytesPerLine(width, depth)\t((((width)*(depth) + 31) >> 5) << 2)\n\nstatic sqInt display_ioShowDisplay(sqInt dispBitsIndex, sqInt width, sqInt height, sqInt depth,\n\t\t\t\t   sqInt affectedL, sqInt affectedR, sqInt affectedT, sqInt affectedB)\n{\n  int affectedW, affectedH;\n\n  if (headless\n      || (width != pixWidth) || (width < 1) || (height != pixHeight) || (height < 1) || (depth != pixDepth)\n      || ((!pixBase) && !updatePix())\n      || (displayChanged)\n      || (![view lockFocusIfCanDraw]))\n    {\n      DPRINTF((\"ioShowDisplay squashed: dpy %dx%dx%d pix %dx%dx%d\\n\",\n\t       (int)width, (int)height, (int)depth,\n\t       (int)pixWidth, (int)pixHeight, (int)pixDepth));\n      return 0;\n    }\n\n  DPRINTF((\"ioShowDisplay %p %ldx%ldx%ld %ld,%ld-%ld,%ld\\n\",\n\t   (void *)dispBitsIndex, width, height, depth,\n\t   affectedL, affectedR, affectedT, affectedB));\n\n  lock(display);\n  affectedR= min(affectedR, min(width,  pixWidth ));\n  affectedB= min(affectedB, min(height, pixHeight));\n  affectedW= affectedR - affectedL;\n  affectedH= affectedB - affectedT;\n  if ((affectedW > 0) && (affectedH > 0))\n    {\n      int   opp=\tdepth / 8;\t// octets per pixel\n      char *out=\tpixBase;\n      int   outPitch=\tpixPitch;\n      void *port=\t[view qdPort];\n      LockPortBits(port);\n      //xxx FIXME SOON: cope with dpy depth mismatch (share the code\n      // used by the other types of Unix display)\n      {\n\tint   pitch= bytesPerLine(width, depth);\n\tchar *in=    pointerForOop(dispBitsIndex) + affectedL * opp + affectedT * pitch;\n\tint   lines= affectedH;\n\tint   bytes= affectedW * opp;\n\n\tout += (affectedL * opp) + (affectedT * outPitch);\n\n\tif ((bytes == pitch) && (bytes == outPitch))\n\t  memcpy(out, in, bytes * lines);\n\telse if (bytes < 9) // empirical\n\t  while (lines--)\n\t    {\n\t      register char *to=    out;\n\t      register char *from=  in;\n\t      register int   count= bytes;\n\t      while (count--)\n\t\t*to++= *from++;\n\t      in  += pitch;\n\t      out += outPitch;\n\t    }\n\telse\n\t  while (lines--)\n\t    {\n\t      memcpy((void *)out, (void *)in, bytes);\n\t      in  += pitch;\n\t      out += outPitch;\n\t    }\n      }\n      SetRectRgn(pixRegion, affectedL, affectedT, affectedR, affectedB);\n      QDFlushPortBuffer([view qdPort], pixRegion);\n      UnlockPortBits(port);\n    }\n  unlock(display);\n  [view unlockFocus];\n\n  return 0;\n}\n\n\n#if 0\n\nstatic void display_ioFlushDisplay(void)\n{\n  void *port;\n  lock(display);\n  port= [view qdPort];\n  LockPortBits(port);\n  SetRectRgn(pixRegion, 0, 0, pixWidth, pixHeight);\n  QDFlushPortBuffer([view qdPort], pixRegion);\n  UnlockPortBits(port);\n  unlock(display);\n}\n\n#endif\n\nstatic sqInt display_ioHasDisplayDepth(sqInt i)\n{\n  return i == (headless ? 1 : dpyDepth);\n}\n\nstatic sqInt display_ioSetDisplayMode(sqInt width, sqInt height, sqInt depth, sqInt fullscreenFlag)\n{\n  if (headless)\n    return 0;\n\n  printf(\"ioSetDisplayMode: IMPLEMENT ME\\n\");\n  return ((width == dpyWidth) && (height == dpyHeight) && (depth == dpyDepth));\n}\n\n\nstatic void *display_ioGetDisplay(void)\n{\n  if (headless)\n    return 0;\n\n  DPRINTF((\"ioGetDisplay: WARNING: check the client to see it knows what it's doing\\n\"));\n  return dpy;\n}\n\nstatic void *display_ioGetWindow(void)\n{\n  if (headless)\n    return 0;\n\n  printf(\"ioGetWindow: WARNING: check the client to see it knows what it's doing\\n\");\n  return 0;\n}\n\nstatic sqInt display_clipboardWriteFromAt(sqInt count, sqInt byteArrayIndex, sqInt startIndex)\n{\n  NSAutoreleasePool *pool=   [[NSAutoreleasePool alloc] init];\n  NSPasteboard      *pboard= [NSPasteboard generalPasteboard];\n  char\t\t    *buf= malloc(count * 2);\n  int\t\t     len= sq2uxText(pointerForOop(byteArrayIndex) + startIndex, count, buf, count * 2, 1);\n  NSString\t    *string= [NSString stringWithCString: buf length: len];\n  [pboard declareTypes: [NSArray arrayWithObject: NSStringPboardType] owner: nil];\n  [pboard setString: string forType: NSStringPboardType];\n  free(buf);\n  [pool release];\n  return 0;\n}\n\n\nstatic sqInt display_clipboardSize(void)\n{\n  NSAutoreleasePool *pool=   [[NSAutoreleasePool alloc] init];\n  NSPasteboard      *pboard= [NSPasteboard generalPasteboard];\n  NSString          *type=   [pboard availableTypeFromArray:\n\t\t\t\t       [NSArray arrayWithObject:\n\t\t\t\t\t\t  NSStringPboardType]];\n  int clipSize= 0;\n  if (clipboard)\n    free(clipboard);\n  clipboard= 0;\n  if (type != nil)\n    {\n      NSString *contents= [pboard stringForType: type];\n      if (contents != nil)\n\t{\n\t  const char *cString= [contents cString];\n\t  int len= [contents length];\n\t  if (len)\n\t    {\n\t      clipboard= (char *)malloc(len * 2);\n\t      if (!clipboard)\n\t\tfprintf(stderr, \"could not allocate clipboard\\n\");\n\t      else\n\t\tclipSize= ux2sqText((char *)cString, len, clipboard, len * 2, 1);\n\t    }\n\t}\n    }\n  [pool release];\n  return clipSize;\n}\n\nstatic sqInt display_clipboardReadIntoAt(sqInt count, sqInt byteArrayIndex, sqInt startIndex)\n{\n  if (clipboard)\n    {\n      memcpy(pointerForOop(byteArrayIndex) + startIndex, clipboard, count);\n      return count;\n    }\n  return 0;\n}\n\n\nstatic void display_winExit(void)\n{\n  [win close];\n}\n\n\nstatic void display_winSetName(char *title)\n{\n  char *base= strrchr(title, '/');\n  if (base) title= base + 1;\n#if (RESIZE_IN_TITLE)\n  if (showExtent)\n    {\n      char buf[NAME_MAX];\n      NSRect frame= [view frame];\n      sprintf(buf, \"%s (%dx%d)\", title, (int)NSWidth(frame), (int)NSHeight(frame));\n      title= buf;\n    }\n#endif\n  [win setTitle: [NSString stringWithCString: title]];\n}\n\n\nstatic void  display_parseEnvironment(void) {}\n\nstatic int display_parseArgument(int argc, char **argv)\n{\n  if     (!strncmp(*argv, \"-psn_\", 5))\t\treturn fromFinder= 1;\n  else if (!strcmp(*argv, \"-quartz\"))\t\treturn 1;\n  else if (!strcmp(*argv, \"-fullscreen\"))\treturn fullscreen= 1;\n  else if (!strcmp(*argv, \"-headless\"))\t\treturn headless= 1;\n  else if (!strcmp(*argv, \"-notitle\"))\t\treturn noTitle= 1;\n  else if (!strcmp(*argv, \"-nodock\"))\t\treturn noDock= 1;\n  else if (!strcmp(*argv, \"-swapbtn\"))\t\treturn swapBtn= 1;\n  return 0;\n}\n\nstatic void display_printUsage(void)\n{\n  printf(\"\\nQuartz/Aqua <option>s:\\n\");\n  printf(\"  -fullscreen           occupy the entire screen\\n\");\n  printf(\"  -headless             run in headless (no window) mode\\n\");\n  printf(\"  -nodock               don't show Squeak in the dock\\n\");\n  printf(\"  -notitle              disable the Squeak window title bar\\n\");\n  printf(\"  -swapbtn              swap mouse buttons 2 (yellow) and 3 (blue)\\n\");\n}\n\nstatic void display_printUsageNotes(void)\n{\n  printf(\"  -nodock is only useful with `-headless'.\\n\");\n}\n\n\n/// \n/// window initialization\n/// \n\n\nstatic void menuAddItem(NSMenu *menu, NSString *title, SEL action,\n\t\t\tNSString *key, int opt)\n{\n  NSMenuItem *item= [[NSMenuItem alloc]\n\t\t      initWithTitle: title\n\t\t      action:        action\n\t\t      keyEquivalent: (cmdKeys ? key : @\"\")];\n  [menu addItem: item];\n  if (opt)\n    [item setKeyEquivalentModifierMask: (NSCommandKeyMask | NSAlternateKeyMask)];\n  [item release];\n}\n\nstatic void installMenu(SEL install, NSMenu *menu)\n{\n  NSMenuItem *item= [[NSMenuItem alloc]\n\t\t      initWithTitle: @\"\"\n\t\t      action:\t nil\n\t\t      keyEquivalent: @\"\"];\n  [item setSubmenu: menu];\n  [[NSApp mainMenu] addItem: item];\n  if (install != NULL)\n    {\n      extern id objc_msgSend(id theReceiver, SEL theSelector, ...);\n      objc_msgSend(NSApp, install, menu);\n    }\n  [item release];\n  [menu release];\n}\n\n\n// InterfaceBuilder?  Just Say No!\n\nstatic void setUpMenus(void)\n{\n  if (headless && noDock)\n    return;\n\n  [NSApp setMainMenu: [[NSMenu alloc] init]];\n  {\n    NSMenu *menu= [[NSMenu alloc] initWithTitle: @\"Squeak\"];\n    menuAddItem(menu, @\"About Squeak\",   @selector(performAbout:),          @\"\",  0);\n    [menu addItem: [NSMenuItem separatorItem]];\n    menuAddItem(menu, @\"Preferences...\", @selector(performPreferences:),    @\"y\", 0);\n    [menu addItem: [NSMenuItem separatorItem]];\n    menuAddItem(menu, @\"Hide Squeak\",    @selector(hide:),                  @\"h\", 0);\n    menuAddItem(menu, @\"Hide Others\",    @selector(hideOtherApplications:), @\"h\", 1);\n    menuAddItem(menu, @\"Show All\",       @selector(unhideAllApplications:), @\"\",  0);\n    [menu addItem: [NSMenuItem separatorItem]];\n    menuAddItem(menu, @\"Quit Squeak\",    @selector(terminate:),             @\"q\", 0);\n    installMenu(@selector(setAppleMenu:), menu);\n  }\n  {\n    NSMenu *menu= [[NSMenu alloc] initWithTitle: @\"File\"];\n    menuAddItem(menu, @\"Page Setup...\", @selector(performPageSetup:), @\"P\", 0);\n    menuAddItem(menu, @\"Print\",         @selector(performPrint:),     @\"p\", 0);\n    installMenu(NULL, menu);\n  }\n  {\n    NSMenu *menu= [[NSMenu alloc] initWithTitle: @\"Window\"];\n    menuAddItem(menu, @\"Minimise\", @selector(performMiniaturize:), @\"m\", 0);\n    if (cmdKeys)\n      menuAddItem(menu, @\"Disable Command Keys\", @selector(performDisableKeys:), @\"k\", 0);\n    else\n      menuAddItem(menu, @\"Enable Command Keys\",  @selector(performEnableKeys:),  @\"\",  0);\n    installMenu(@selector(setWindowsMenu:), menu);\n  }\n  {\n    NSMenu *menu= [[NSMenu alloc] initWithTitle: @\"Help\"];\n    menuAddItem(menu, @\"Squeak Help\", @selector(showHelp:), @\"?\", 0);\n    installMenu(NULL, menu);\n  }\n}\n\n\n#include \"CPS.h\"\n\nstatic char *str4(UInt32 chars)\n{\n  static char str[5];\n  *(int *)&str= chars;\n  str[4]= '\\0';\n  return str;\n}\n\nstatic void setUpDock(void)\n{\n  // this was passed to us in argv, but we have to pick it up from CPS\n  // anyway if the VM was started from a command line or script\n  CPSProcessSerNum psn;\n  OSErr err;\n\n  if (headless && noDock)\n    return;\n\n# define try(FN, ARGS, CAVEAT)\t\t\t\t\t\t\\\n    if ((err= FN ARGS)) fprintf(stderr, \"%s: error %d%s\\n\", #FN, err, CAVEAT)\n\n  try(CPSGetCurrentProcess, (&psn), \"\");\n  else try(CPSSetProcessName, (&psn, \"Squeak\"), \"\");\n  else\n    {\n      CPSEnableForegroundOperation(&psn, 0x03, 0x3c, 0x2c, 0x1103);\n      try(CPSSetFrontProcess, (&psn), \"\");\n    }\n# undef try\n# if defined(DEBUG_APP)\n  {\n    CPSProcessInfoRec info;\n    char path[4096];\n    int  len;\n    char name[4096];\n    CPSGetProcessInfo(&psn, &info, path, sizeof(path), &len, name, sizeof(name));\n    printf(\"process:\\n\");\n    printf(\"  pid:     %d\\n\", info.UnixPID);\n    printf(\"  path:    %s\\n\", path);\n    printf(\"  name:    %s\\n\", name);\n    printf(\"  creator: %s\\n\", str4(info.ExecFileCreator));\n    printf(\"  type:    %s\\n\", str4(info.ExecFileType));\n    printf(\"  flavour: \");\n    switch(info.Flavour)\n      {\n      case kCPSBlueApp:\t   printf(\"BlueApp\\n\"); break;\n      case kCPSBlueBox:\t   printf(\"BlueBox\\n\"); break;\n      case kCPSCarbonApp:  printf(\"Carbon\\n\"); break;\n      case kCPSYellowApp:  printf(\"YellowApp\\n\"); break;\n      case kCPSUnknownApp: printf(\"unknown\\n\"); break;\n      }\n    printf(\"  attrs:   %d\", info.Attributes);\n    if (info.Attributes & kCPSBGOnlyAttr)\tprintf(\" BGOnly\");\n    if (info.Attributes & kCPSUIElementAttr)\tprintf(\" UIElement\");\n    if (info.Attributes & kCPSHiddenAttr)\tprintf(\" Hidden\");\n    if (info.Attributes & kCPSNoConnectAttr)\tprintf(\" NoConnect\");\n    if (info.Attributes & kCPSFullScreenAttr)\tprintf(\" FullScreen\");\n    if (info.Attributes & kCPSClassicReqAttr)\tprintf(\" ClassicReq\");\n    if (info.Attributes & kCPSNativeReqAttr)\tprintf(\" NativeReq\");\n    printf(\"\\n\");\n  }\n#endif\n}\n\n\nstatic char *display_winSystemName(void)\n{\n  return \"Quartz\";\n}\n\n\nstatic void display_winInit(void)\n{\n  [[NSAutoreleasePool alloc] init];\n  [Squeak sharedApplication];\n  [NSApp setDelegate: NSApp];\n  // from winOpen()...\n  setUpMenus();\n  setUpDock();\n  [NSApp run];\n}\n\n\nstatic void display_winOpen(void) {}\n\n\nstatic void setUpDisplay(void)\n{\n  if (headless)\n    return;\n\n  if (!dpy)\n    pixRegion= NewRgn();\n\n  dpy        = kCGDirectMainDisplay;\n  dpyMode    = (NSDictionary *)CGDisplayCurrentMode(dpy);\n  dpyWidth   = [[dpyMode objectForKey: (id)kCGDisplayWidth] intValue];\n  dpyHeight  = [[dpyMode objectForKey: (id)kCGDisplayHeight] intValue];\n  dpyDepth   = [[dpyMode objectForKey: (id)kCGDisplayBitsPerPixel] intValue];\n  dpyPixels  = CGDisplayBaseAddress(dpy);\n  dpyPitch   = CGDisplayBytesPerRow(dpy);\n\n  DPRINTF((\"display is %dx%dx%d at %p pitch %d\\n\", dpyWidth, dpyHeight, dpyDepth, dpyPixels, dpyPitch));\n}\n\n\nstatic void setUpWindow(int fs)\n{\n  if (!headless)\n    {\n      int w, h;\n      NSRect contentRect;\n      if (fs)\n\t{\n\t  w= dpyWidth;\n\t  h= dpyHeight;\n\t}\n      else\n\t{\n\t  int winSize= getSavedWindowSize();\n\t  if (winSize)\n\t    {\n\t      w= winSize >> 16;\n\t      h= winSize & 0xffff;\n\t    }\n\t  else\n\t    {\n\t      w= 640;\n\t      h= 480;\n\t    }\n\t}\n      DPRINTF((\"initial winSize %d %d\\n\", w, h));\n      styleMask= (fs\n\t\t  ? (NSBorderlessWindowMask)\n\t\t  : (  NSTitledWindowMask\n\t\t     | NSMiniaturizableWindowMask\n\t\t     | NSResizableWindowMask));\n      //xxx does quartz _really_ have _no_ mechanism to set window bit gravity?!?\n      win= [[SqueakWindow alloc]\n\t     initWithContentRect: NSMakeRect(0,0, w,h)\n\t     styleMask:           styleMask\n\t     backing:             NSBackingStoreBuffered\n\t     defer:               NO];\n\n      contentRect= [[win contentView] frame];\n      w= NSWidth(contentRect);\n      h= NSHeight(contentRect);\n      DPRINTF((\"alloc winSize %d %d\\n\", w, h));\n      setSavedWindowSize((w << 16) | h);\n\n      view= [[SqueakView alloc] initWithFrame: contentRect];\n      [view setAutoresizingMask: (NSViewWidthSizable | NSViewHeightSizable)];\n\n      [win setReleasedWhenClosed: YES];\n      [win setAcceptsMouseMovedEvents: YES];\n      [win setShowsResizeIndicator: NO];\n\n      topView= [[TopView alloc] initWithFrame: contentRect];\n\n      [win setInitialFirstResponder: view];\n      [win setDelegate: NSApp];\n      [win useOptimizedDrawing: YES];\n\n      //      [win setBackgroundColor: [NSColor clearColor]];\n      //      [win setAlphaValue: 1.0];\n      //      [win setOpaque: YES];\n      //      [win setAutodisplay: YES];\n      //[win disableFlushWindow];\n\n      if (fs)\n\t[win setLevel: CGShieldingWindowLevel()];\n      else\n\t{\n\t  [win center];\n\t  if (!fromFinder)\n\t    [win setIcon];\n\t  display_winSetName(shortImageName);\n\t}\n\n      [topView addSubview: view];\t//[view release];\n      [win setContentView: topView];\t//[topView release];\n      [win makeKeyAndOrderFront: nil];\t// need platform window to get pixBase\n    }\n}\n\n\nstatic int\t\t  imageWidth;\nstatic int\t\t  imageHeight;\nstatic char\t\t *imageData;\nstatic CGDataProviderRef  imageDataProvider;\nstatic CGImageRef\t  imageRef;\n\nstatic void cgdpRelease(void *info, const void *data, size_t size) {}\n\nstatic void captureImage(int inverted)\n{\n  imageWidth=  pixWidth;\n  imageHeight= pixHeight;\n  imageData=   (char *)malloc(pixPitch * imageHeight);\n  if (inverted)\n    {\n      char *in= pixBase, *out= imageData + ((imageHeight - 1) * pixPitch);\n      int   y;\n      for (y= pixHeight;  y--;  (in += pixPitch), (out -= pixPitch))\n\tmemcpy(out, in, pixPitch);\n    }\n  else\n    {\n      memcpy(imageData, pixBase, imageHeight * pixPitch);\n    }\n  imageDataProvider=\n    CGDataProviderCreateWithData(0, imageData, pixPitch*imageHeight,\n\t\t\t\t cgdpRelease);\n  imageRef=\n    CGImageCreate(imageWidth, imageHeight, 8, 32, pixPitch,\n\t\t  CGColorSpaceCreateDeviceRGB(),\n\t\t  kCGImageAlphaNoneSkipFirst,\n\t\t  imageDataProvider, 0, 0,\n\t\t  kCGRenderingIntentDefault);\n}\n\n\nstatic void drawImage(CGContextRef cgc, int offset)\n{\n  CGContextDrawImage(cgc, CGRectMake(0, offset, imageWidth, imageHeight), imageRef);\n}\n\n\nstatic void releaseImage(int malloced)\n{\n  CGImageRelease(imageRef);\n  CGDataProviderRelease(imageDataProvider);\n  if (malloced)\n    free(imageData);\n}\n\n  \n#ifdef FULLSCREEN_FADE\n\n// YES, I know there's a CG API to do this.  But it sucks.\n\nstatic struct\n{\n  CGGammaValue r[256], g[256], b[256];\n} dpyGamma;\n\nstatic void fadeOut(float delta)\n{\n  CGGammaValue r[256], g[256], b[256];\n  int sz;\n\n  if ((CGDisplayNoErr == CGGetDisplayTransferByTable\n\t\t\t   (dpy, 256, dpyGamma.r, dpyGamma.g, dpyGamma.b, &sz))\n      && (256 == sz))\n    {\n      float scale;\n      memcpy(r, dpyGamma.r, sizeof(r));\n      memcpy(g, dpyGamma.g, sizeof(g));\n      memcpy(b, dpyGamma.b, sizeof(b));\n      for (scale= 1.0;  scale >= 0.0;  scale -= delta)\n\t{\n\t  int i;\n\t  for (i= 256;  i--;)\n\t    {\n\t      r[i]= dpyGamma.r[i] * scale;\n\t      g[i]= dpyGamma.g[i] * scale;\n\t      b[i]= dpyGamma.b[i] * scale;\n\t    }\n\t  if (CGDisplayNoErr != CGSetDisplayTransferByTable(dpy, 256, r, g, b))\n\t    {\n\t      printf(\"failed to set transfer table\\n\");\n\t      CGDisplayRestoreColorSyncSettings();\n\t      return;\n\t    }\n\t  usleep(10000);\n\t}\n    }\n  else\n    {\n      printf(\"failed to get display transfer table (%d)\\n\", sz);\n    }\n}\n\nstatic void fadeIn(float delta)\n{\n  CGGammaValue r[256], g[256], b[256];\n  float scale;\n  memset(r, 0, sizeof(r));\n  memset(g, 0, sizeof(g));\n  memset(b, 0, sizeof(b));\n  for (scale= 0.0;  scale <= 1.0;  scale += delta)\n    {\n      int i;\n      for (i= 256; i--;)\n\t{\n\t  r[i] = dpyGamma.r[i] * scale;\n\t  g[i] = dpyGamma.g[i] * scale;\n\t  b[i] = dpyGamma.b[i] * scale;\n\t}\n      if (CGDisplayNoErr != CGSetDisplayTransferByTable(dpy, 256, r, g, b))\n\tbreak;\n      usleep(10000);\n    }\n  CGDisplayRestoreColorSyncSettings();\n}\n\n#endif\n\n\n#if 1\n\nstatic sqInt display_ioSetFullScreen(sqInt flag)\n{\n  static sqInt originalWindowSize= 0;\n  SqueakWindow *old;\n\n  DPRINTF((\"ioSetFullScreen(%d)\\n\", flag));\n\n  if (headless || (fullscreen == flag))\n    return 0;\t// nothing to do\n  old= win;\n  win= 0;  view= 0;  topView= 0;  pixBase= 0; pixWidth= 0; pixHeight= 0; pixPitch= 0;\n  if (flag)\n    originalWindowSize= getSavedWindowSize();\n  else if (originalWindowSize)\n    setSavedWindowSize(originalWindowSize);\n  setFullScreenFlag(fullscreen= flag);\n  setUpWindow(flag);\n  reframeRenderers();\n  [old close];\n  return 1;\n}\n\n#else\n\nstatic sqInt display_ioSetFullScreen(sqInt flag)\n{\n  static sqInt originalWindowSize= (800 << 16) | 600;\n\n  DPRINTF((\"ioSetFullScreen(%d)\\n\", flag));\n\n  if (headless || (fullscreen == flag) || glActive)\n    return 0;\t// nothing to do\n\n  if (flag)\t// switch to fullscreen\n    {\n      CGDisplayHideCursor(dpy);\n#    ifdef FULLSCREEN_FADE\n      captureImage(0);\n      fadeOut(FULLSCREEN_FADE);\n#    endif\n      if (CGDisplayNoErr != CGDisplayCapture(dpy))\n\tDPRINTF((\"failed to capture display\\n\"));\n      else\n\t{\n#        ifdef FULLSCREEN_FADE\n\t  CGContextRef cgc;\n\t  memset(dpyPixels, -1U, dpyPitch * dpyHeight);\n\t  cgc= CGBitmapContextCreate(dpyPixels, dpyWidth, dpyHeight,\n\t\t\t\t     8, dpyPitch,\n\t\t\t\t     CGColorSpaceCreateDeviceRGB(),\n\t\t\t\t     kCGImageAlphaNoneSkipFirst);\n\t  drawImage(cgc, dpyHeight - pixHeight);\n\t  CGContextRelease(cgc);\n#\t endif\n\t  lock(display);\n\t  originalWindowSize= getSavedWindowSize();\n\t  pixWidth=   dpyWidth;\n\t  pixHeight=  dpyHeight;\n\t  fullscreen= 1;\n\t  updatePix();\n\t  unlock(display);\n\t  [NSMenu setMenuBarVisible: NO];\n\t}\n#    ifdef FULLSCREEN_FADE\n      fadeIn(FULLSCREEN_FADE);\n      releaseImage(0);\n#    endif\n      mousePosition.x= mousePosition.y= -1;\n      CGDisplayShowCursor(dpy);\n    }\n  else\t\t// switch to windowed\n    {\n#    ifdef FULLSCREEN_FADE\n      fadeOut(FULLSCREEN_FADE);\n#    endif\n      [NSMenu setMenuBarVisible: YES];\n      CGDisplayRelease(dpy);\n      fullscreen= 0;\n      lock(display);\n      setSavedWindowSize(originalWindowSize);\n      pixWidth=  originalWindowSize >> 16;\n      pixHeight= originalWindowSize & 0xffff;\n      updatePix();\n      unlock(display);\n#    ifdef FULLSCREEN_FADE\n      fadeIn(FULLSCREEN_FADE);\n#    endif\n    }\n\n  return 1;\n}\n\n#endif\n\n\n\n@implementation Squeak\n\n\n+ (void) initialize\n{\n  NSMutableDictionary *dict;\n  NSUserDefaults *defaults;\n\n  defaults= [NSUserDefaults standardUserDefaults];\n  dict= [NSMutableDictionary dictionary];\n    \n  [dict setObject: @\"YES\" forKey: @\"AppleDockIconEnabled\"];\n  [defaults registerDefaults: dict];\n}\n\n\nstatic char *documentName= 0;\n\n\n-(BOOL) application: (NSApplication *) theApplication\n\topenFile:    (NSString *)      filename\n{\n  if (fromFinder)\n    documentName= strdup([filename cString]);\n  return YES;\n}\n\n\n#if 0 // only for running with increased stack size\nstatic void *runInterpreter(void *arg)\n{\n  [(id)arg interpret: nil];\n}\n#endif\n\n\n-(void) applicationDidFinishLaunching: (NSNotification *)note\n{\n  int fds[2];\n\n  // this saves an awful lot of tedious mutex contention (and besides\n  // is essentially free, since there's no way to avoid writing a\n  // socket to inform aio of the availability of the event)\n#if 0\n  if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds) != 0)\n    {\n      perror(\"socketpair\");\n      exit(1);\n    }\n  osXfd= fds[0];\n  stXfd= fds[1];\n#else\n  if (pipe(fds))\n    {\n      perror(\"pipe\");\n      exit(1);\n    }\n  stXfd= fds[0];\n  osXfd= fds[1];\n#endif\n  aioEnable(stXfd, 0, 0);\n  aioHandle(stXfd, evtHandler, AIO_RX);\n#if (!USE_SPINLOCK)\n  {\n    pthread_mutexattr_t attr;\n    pthread_mutexattr_init(&attr);\n#  ifndef NDEBUG\n    pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK);\n#  endif\n    if (pthread_mutex_init(&displayMx, &attr))\n      {\n\tperror(\"pthread_mutex_init\");\n\texit(1);\n      }\n    pthread_mutexattr_destroy(&attr);\n  }\n#endif\n\n  if (fromFinder)\n    {\n      char *ptr= 0;\n      strncpy(resourcePath, argVec[0], sizeof(resourcePath));\t// .app/Contents/MacOS/squeak\n      if ((ptr= strrchr(resourcePath, '/')))\n\t{\n\t  *ptr= '\\0';\t\t\t\t\t\t// .app/Contents/MacOS\n\t  if ((ptr= strrchr(resourcePath, '/')))\n\t    {\n\t      *ptr= '\\0';\t\t\t\t\t\t// .app/Contents\n\t      strcpy(ptr, \"/Resources/\");\t\t\t\t// .app/Contents/Resources/\n\t    }\n\t  else\n\t    resourcePath[0]= '\\0';\n\t}\n      else\n\tresourcePath[0]= '\\0';\n    }\n\n  imgInit();\n  setUpDisplay();\n  setUpWindow(fullscreen= getFullScreenFlag());\n\n#if 1\n  [NSThread\n    detachNewThreadSelector: @selector(interpret:)\n    toTarget:\t\t     self\n    withObject:\t\t     nil];\n#else\n  // ensure cocoa is initialised for threads\n  {\n    id obj= [NSObject new];\n    [NSThread detachNewThreadSelector: @selector(self) toTarget: obj withObject: nil];\n    [obj release];\n  }\n  // run interpreter with stack size > default\n  {\n    pthread_t\t   thread;\n    pthread_attr_t attr;\n    pthread_attr_init(&attr);\n    pthread_attr_setstacksize(&attr, 8192*1024);\n    pthread_create(&thread, &attr, runInterpreter, (void *)self);\n  }\n#endif\n}\n\n\n- (void) interpret: (id)context\n{\n  [[NSAutoreleasePool alloc] init];\t// running in new thread\n  interpret();\n  (void)recordMouseEvent;\n  (void)recordKeyboardEvent;\n  (void)recordDragEvent;\n}\n\n\n- (void) applicationDidChangeScreenParameters: (NSNotification *)note\n{\n  //xxx this one might be tricky in the absence of appWillChangeScreenParams:\n  fprintf(stderr, \"\\nDISPLAY PARAMETERS CHANGED\\n\\n\");\n  //  lock(display);\n  pixWidth= pixHeight= pixDepth= 0;\n  setUpDisplay();\n  //setUpWindow(getFullScreenFlag());\n  updatePix();\n  //  unlock(display);\n  //setUpMenus();\n  displayChanged= 1;\n  //fullDisplayUpdate();\n}\n\n\n- (void) unhideAllApplications: (id)sender\n{\n  [super unhideAllApplications: sender];\n  [win orderFront: self]; // so that unhinding once more will reveal the Sq window\n}\n\n\n- (BOOL) windowShouldClose: (id)sender\n{\n  return NO;\n}\n\n\n- (void) terminate: (id)sender\n{\n  [super terminate: sender];\n  exit(0);\n}\n\n- (void) maybeTerminate: (id)sender\n{\n  switch (NSRunAlertPanel(@\"Really quit?\",\n\t\t\t  @\"All changes since your last save will be lost.\\n\\nIf you want to save your changes, press `Cancel' and then choose `save and quit' from the background menu in the Squeak window.\",\n\t\t\t  @\"Quit\",\n\t\t\t  @\"Cancel\",\n\t\t\t  nil))\n    {\n    case NSAlertDefaultReturn:\t[self terminate: self];\n    }\n}\n\n\n- (void) performAbout: (id)sender\n{\n  extern char *getVersionInfo(int verbose);\n  char *info= getVersionInfo(1);\n  NSPanel *panel= NSGetInformationalAlertPanel(@\"About Squeak\",\n\t\t\t\t\t       @\"%s\",\n\t\t\t\t\t       @\"Dismiss\",\n\t\t\t\t\t       nil,\n\t\t\t\t\t       nil,\n\t\t\t\t\t       info);\n  NSRect frame= [panel frame];\n  frame.size.width *= 1.5;\n  [panel setFrame: frame display: NO];\n  [NSApp runModalForWindow: panel];\n  [panel close];\n  free(info);\n}\n\n\n\n//xxx why does rebuilding the menu lose boldface on the Apple menu item???\n\n- (void) performEnableKeys:  (id)sender\t{ cmdKeys= 1;  setUpMenus(); }\n- (void) performDisableKeys: (id)sender\t{ cmdKeys= 0;  setUpMenus(); }\n\n\n- (void) windowWillMove: (NSNotification *)note\n{\n  //xxx FIXME SOON: there are other ways to enter this (and ways other than\n  // noteEvent to escape from it)\n  inModalLoop= 1;\n}\n\n\n- (NSSize) windowWillResize: (NSWindow *)sender toSize: (NSSize)size\n{\n  return glActive ? [sender frame].size : size;\n}\n\n\n- (void) windowDidResize: (NSNotification *)note\n{\n  reframeRenderers();\n}\n\n\n-(void) sendEvent: (NSEvent *)event\n{\n  int\t  type=     [event type];\n  NSPoint loc=      [event locationInWindow];\n  NSWindow *evtWin= [event window];\n#if 0\n  NSPoint loc=      (fullscreen\n\t\t     ? [NSEvent mouseLocation]\t//xxx should use deltas\n\t\t     : [event locationInWindow]);\n#endif\n\n  if (evtWin && ((NSWindow *)win != [event window]))\n    {\n      //printf(\"evtWin not local\\n\");\n      [super sendEvent: event];\n      return;\n    }\n\n  switch (type)\n    {\n#     define down buttonState |= qz2sqButton([event buttonNumber])\n#     define move\n#     define up\t  buttonState &= ~qz2sqButton([event buttonNumber])\n\n#     define recordEvent(delta)\t\t\t\t\t\t\\\n      if (fullscreen || NSPointInRect(loc, [view frame]))\t\t\\\n\t{\t\t\t\t\t\t\t\t\\\n\t  noteMousePoint(loc);\t\t\t\t\t\t\\\n\t  delta;\t\t\t\t\t\t\t\\\n\t  modifierState= qz2sqModifiers([event modifierFlags]);\t\t\\\n\t  noteMouseEvent();\t\t\t\t\t\t\\\n\t}\t\t\t\t\t\t\t\t\\\n      else\t\t\t\t\t\t\t\t\\\n\t{\t\t\t\t\t\t\t\t\\\n          /* printf(\"recordEvent fullscreen %d inRect %d\\n\", fullscreen, NSPointInRect(loc, [view frame])); */  \\\n\t  [super sendEvent: event];\t/* don't track outside window */ \\\n        }\n\n    case NSLeftMouseDown: case NSOtherMouseDown: case NSRightMouseDown:\n      if ((!active) || NSPointInRect(loc, resizeRect))\n\t{\n\t  //printf(\"evt down active %d inRect %d\\n\", active, NSPointInRect(loc, resizeRect));\n\t  [super sendEvent: event];\t// first click, or start resize\n\t}\n      else\n\trecordEvent(down);\n      break;\n\n    case NSLeftMouseDragged: case NSRightMouseDragged: case NSOtherMouseDragged:\n      if (!(buttonState & qz2sqButton([event buttonNumber])))\n\t{\n\t  [super sendEvent: event];\t// already tracking window move\n\t  break;\n\t}\n      // fall through...\n    case NSMouseMoved:\n      recordEvent(move);\n      break;\n\n    case NSLeftMouseUp: case NSOtherMouseUp: case NSRightMouseUp:\n      recordEvent(up);\n      break;\n\n#     undef recordEvent\n#     undef down\n#     undef move\n#     undef up\n\n    case NSKeyDown:\n      {\n\tint keyCode;\n\tmodifierState= qz2sqModifiers([event modifierFlags]);\n\tkeyCode= [view composeKeyDown: event]; //qz2sqKey(event);\n\tif (keyCode >= 0)\n\t  {\n\t    if (cmdKeys)\n\t      {\n\t\tif ((modifierState == CommandKeyBit) || (modifierState == CommandKeyBit + ShiftKeyBit))\n\t\t  switch (keyCode)\n\t\t    {\n\t\t    case '?': [NSApp showHelp: self];\t\t\tkeyCode= -1; break;\n\t\t    case 'h': [NSApp hide: self];\t\t\tkeyCode= -1; break;\n\t\t    case 'k': [NSApp performDisableKeys: self];\t\tkeyCode= -1; break;\n\t\t    case 'm': [win   performMiniaturize: self];\t\tkeyCode= -1; break;\n\t\t    case 'q': [NSApp maybeTerminate: self];\t\tkeyCode= -1; break;\n\t\t    }\n\t\telse if (modifierState == CommandKeyBit + OptionKeyBit)\n\t\t  switch (keyCode)\n\t\t    {\n\t\t    case 'h': [NSApp hideOtherApplications: self];\tkeyCode= -1; break;\n\t\t    }\n\t      }\n\t    if (keyCode >= 0)\n\t      {\n\t\tif (![event isARepeat])\n\t\t  noteKeyboardEvent(keyCode, EventKeyDown, modifierState);\n\t\tnoteKeyboardEvent(keyCode, EventKeyChar, modifierState);\n\t\trecordKeystroke(keyCode);\t\t\t/* DEPRECATED */\n\t      }\n\t    else // key up not interesting\n\t      [view composeKeyUp: event];\n\t  }\n      }\n      break;\n\n    case NSKeyUp:\n      {\n\tint keyCode;\n\tmodifierState= qz2sqModifiers([event modifierFlags]);\n\tkeyCode= [view composeKeyUp: event]; //qz2sqKey(event);\n\tif (keyCode >= 0)\n\t  {\n\t    noteKeyboardEvent(keyCode, EventKeyUp, modifierState);\n\t    //accentMap= 0;\n\t  }\n      }\n      break;\n\n    case NSScrollWheel:\n      {\n\tint keyCode, modifiers;\n\tkeyCode= ([event deltaY] >= 0.0) ? 30 : 31;\n\tmodifierState= qz2sqModifiers([event modifierFlags]);\n\tmodifiers= modifierState ^ CtrlKeyBit;\n\tnoteKeyboardEvent(keyCode, EventKeyDown, modifiers);\n\tnoteKeyboardEvent(keyCode, EventKeyChar, modifiers);\n\tnoteKeyboardEvent(keyCode, EventKeyUp,   modifiers);\n      }\n      break;\n\n    case NSAppKitDefined:\n      switch ([event subtype])\n\t{\n\tcase NSApplicationActivatedEventType:\n\t  active= 1;\n\t  break;\n\n\tcase NSApplicationDeactivatedEventType:\n\t  active= 0;\n\t  break;\n\t  // case NSScreenChangedEventType: //xxx this means the window\n\t  // changed to a different physical screen, which is useless\n\t  // info (we'd far rather be informed that the current screen's\n\t  // depth has changed)\n\t}\n      //DPRINTF((\"AppKitDefinedEvent subtype %d\\n\", [event subtype]));\n      [super sendEvent: event];\n      break;\n\n      // case NSFlagsChanged:\n      // case NSApplicationDefined: break;\n      // case NSPeriodic: break;\n      // case NSCursorUpdate: break;\n\n    default: // almost always NSSystemDefined\n      //DPRINTF((\"Event type %d subtype %d\\n\", [event type], [event subtype]));\n      [super sendEvent: event];\n    }\n}\n\n\n@end // Squeak\n\n\n\n@implementation SqueakWindow\n\n- (BOOL) isOpaque\t\t{ return YES; }\n- (BOOL) canBecomeKeyWindow\t{ return YES; }\n\nstatic NSImage *tryLoadingIcon(char *dir)\n{\n  char buf[MAXPATHLEN];\n  sprintf(buf, \"%s/SqueakVM.icns\", dir);\n  return [[NSImage alloc]\n\t   initWithContentsOfFile:\n\t     [NSString stringWithCString: buf]];\n}\n\n- (void) setIcon\n{\n  icon= 0;\n  if ((   icon= tryLoadingIcon(\".\"))\n      || (icon= tryLoadingIcon(\"/usr/local/lib/squeak\"))\n      || (icon= tryLoadingIcon(resourcePath)))\n    [NSApp setApplicationIconImage: icon];\n}\n\n#if 0\n\n- (NSImage *) dockImage\n{\n  NSBitmapImageRep *rep= [NSBitmapImageRep alloc];\n  if ([rep initWithFocusedViewRect: topRect])\n    {\n      NSImage *image= [[NSImage alloc] init];\n      [image addRepresentation: rep];\n      if (icon)\n\t{\n\t  [image lockFocus];\n\t  [icon drawInRect: NSMakeRect(0, 0, [image size].width, [image size].height)\n\t\tfromRect:   NSMakeRect(0, 0, [icon size].width, [icon size].height)\n\t\toperation:  NSCompositeSourceOver\n\t\tfraction:   1.0];\n\t  [image unlockFocus];\n\t}\n      return image;\n    }\n  return nil;\n}\n\n- (void) miniaturize: (id)sender\n{\n  NSImage *image= [self dockImage];\n  if (image)\n    [self setMiniwindowImage: image];\n  [image release];\n  [super miniaturize: sender];\n}\n\n#endif\n\n\n- (void) performMiniaturize: (id)sender\n{\n  if (!glActive)\n    [super performMiniaturize: sender];\n}\n\n\n@end // SqueakWindow\n\n\n\n@implementation SqueakView\n\n- (BOOL) isOpaque\t\t{ return YES; }\n- (BOOL) isFlipped\t\t{ return YES; }\n- (BOOL) acceptsFirstResponder\t{ return YES; }\n- (BOOL) becomeFirstResponder\t{ return YES; }\n- (BOOL) resignFirstResponder\t{ return NO; }\n\n#if 0\n- (void) renewGState\n{\n  printf(\"\\nRENEW GSTATE\\n\\n\");\n  [super renewGState];\n}\n#endif\n\nstatic NSRange inputMark;\nstatic NSRange inputSelection;\nstatic int     inputCharCode;\n\n- (id) initWithFrame: (NSRect)frame\n{\n  id result= [super initWithFrame: frame];\n  if (self == result)\n    [self registerForDraggedTypes:\n\t    [NSArray arrayWithObjects:\n\t\t       NSFilenamesPboardType, nil]];\n  inputCharCode=  -1;\n  inputMark=\t  NSMakeRange(NSNotFound, 0);\n  inputSelection= NSMakeRange(0, 0);\n  return result;\n}\n\n\n- (void) setFrame: (NSRect)rect\n{\n  lock(display);\n  [super setFrame: rect];\n  if ([self inLiveResize])\n    {\n#    if (RESIZE_IN_TITLE)\n      display_winSetName(shortImageName);\n#    endif\n    }\n  else\n    if ([self qdPort])\n      updatePix();\n  unlock(display);\n}\n\n\n- (void) drawRect: (NSRect)rect\t\t// view already has focus\n{\n#if 0\n  printf(\"drawRect:\\n\");\n#endif\n  if ([self inLiveResize])\n    {\n      [[NSColor whiteColor] set];\n      NSRectFill(rect);\n      drawImage([[NSGraphicsContext currentContext] graphicsPort], 0);\n    }\n  else\n    {\n      if (!pixBase)\n\t{\n#\t if 0\n\t  printf(\"drawRect: calling updatePix\\n\");\n#\t endif\n\t  assert([self qdPort]);\n\t  updatePix();\n\t}\n      fullDisplayUpdate();\n    }\n}\n\n- (void) viewWillStartLiveResize\n{\n  captureImage(1);\n  [win setShowsResizeIndicator: YES];\n  \n#if (RESIZE_IN_TITLE)\n  showExtent= 1;\n  display_winSetName(shortImageName);\n#endif\n  pixWidth= 0;\n  pixHeight= 0;\n}\n\n- (void) viewDidEndLiveResize\n{\n  releaseImage(1);\n  [win setShowsResizeIndicator: NO];\n#if (RESIZE_IN_TITLE)\n  showExtent= 0;\n  display_winSetName(shortImageName);\n#endif\n  updatePix();\n  fullDisplayUpdate(); // gets rid of the resize icon if window didn't resize\n}\n\n\n- (int) draggingEntered: (id<NSDraggingInfo>)info\n{\n  if ((dragCount == 0) // cannot drag again until previous drag completes\n      && ([info draggingSourceOperationMask] & NSDragOperationCopy))\n    {\n      int count= [[[info draggingPasteboard]\n\t\t    propertyListForType: NSFilenamesPboardType] count];\n      noteMousePoint([info draggingLocation]);\n      noteDragEvent(DragEnter, dragCount= count);\n      return NSDragOperationCopy;\n    }\n  return NSDragOperationNone;\n}\n\n- (int) draggingUpdated: (id<NSDraggingInfo>)info\n{\n  noteMousePoint([info draggingLocation]);\n  noteDragEvent(DragMove, dragCount);\n  return NSDragOperationCopy;\n}\n\n- (void) draggingExited: (id<NSDraggingInfo>)info\n{\n  noteMousePoint([info draggingLocation]);\n  noteDragEvent(DragLeave, dragCount);\n  dragCount= 0;\n}\n\n- (BOOL) performDragOperation: (id<NSDraggingInfo>)info\n{\n  NSPasteboard *pboard= [info draggingPasteboard];\n  noteMousePoint([info draggingLocation]);\n  if ([[pboard types] containsObject: NSFilenamesPboardType])\n    {\n      NSArray *files= [pboard propertyListForType: NSFilenamesPboardType];\n      int i;\n      if (uxDropFileCount)\n\t{\n\t  assert(uxDropFileNames);\n\t  for (i= 0;  i < uxDropFileCount;  ++i)\n\t    free(uxDropFileNames[i]);\n\t  free(uxDropFileNames);\n\t  uxDropFileNames= 0;\n\t}\n      if ((  (!(uxDropFileCount= [files count])))\n\t  || (!(uxDropFileNames= (char **)malloc(uxDropFileCount * sizeof(char *)))))\n\t{\n\t  uxDropFileCount= 0;\n\t  return NO;\n\t}\n      for (i= 0;  i < uxDropFileCount;  ++i)\n\tuxDropFileNames[i]= strdup([[files objectAtIndex: i] cString]);\n    }\n  noteDragEvent(DragDrop, uxDropFileCount);\n  dragCount= 0;\n\n  return YES;\t// under some duress, I might add (see sqUxDragDrop.c)\n}\n\n\nenum { KeyMapSize= 32 };\n\ntypedef struct\n{\n  int keyCode;\n  int keyChar;\n} KeyMapping;\n\nstatic KeyMapping keyMap[KeyMapSize];\n\nstatic int keyMapSize=\t   0;\nstatic int inputCharCode= -1;\n\nstatic int addToKeyMap(int keyCode, int keyChar)\n{\n  if (keyMapSize > KeyMapSize) { fprintf(stderr, \"keymap overflow\\n\");  return -1; }\n  keyMap[keyMapSize++]= (KeyMapping){ keyCode, keyChar };\n  return keyChar;\n}\n\nstatic int indexInKeyMap(int keyCode)\n{\n  int i;\n  for (i= 0;  i < keyMapSize;  ++i)\n    if (keyMap[i].keyCode == keyCode)\n      return i;\n  return -1;\n}\n\nstatic int findInKeyMap(int keyCode)\n{\n  int idx= indexInKeyMap(keyCode);\n  return (idx >= 0) ? keyMap[idx].keyChar : -1;\n}\n\nstatic int removeFromKeyMap(int keyCode)\n{\n  int idx= indexInKeyMap(keyCode);\n  int keyChar= -1;\n  if (idx < 0) { fprintf(stderr, \"keymap underflow\\n\");  return -1; }\n  keyChar= keyMap[idx].keyChar;\n  for (; idx < keyMapSize - 1;  ++idx)\n    keyMap[idx]= keyMap[idx + 1];\n  --keyMapSize;\n  return keyChar;\n}\n\n\n// the following (to @end) must be installed in the first responder\n\n- (int) composeKeyDown: (NSEvent *)event\n{\n  int keyCode= [event keyCode];\n  inputCharCode= -1;\n\n  if (modifierState & CommandKeyBit)\n    inputCharCode= qz2sqKey(event);\n  else\n    {\n      if ([event isARepeat])\n\treturn findInKeyMap(keyCode);\n      else\n\t{\n\t  [self interpretKeyEvents: [NSArray arrayWithObject: event]];\n\t  if (inputCharCode < 0)\n\t    inputCharCode= qz2sqKey(event);\n\t}\n    }\n\n  if (inputCharCode >= 0)\n    addToKeyMap(keyCode, inputCharCode);\n\n  return inputCharCode;\n}\n\n- (int) composeKeyUp: (NSEvent *)event\n{\n  return removeFromKeyMap([event keyCode]);\n}\n\n- (void) insertText: text\n{\n  inputMark= NSMakeRange(NSNotFound, 0);\n  inputSelection= NSMakeRange(0, 0);\n  if ([text length])\n    {\n      UInt8 buf[4];\n      CFIndex nUsed;\n      if (CFStringGetBytes((CFStringRef)text, CFRangeMake(0, CFStringGetLength((CFStringRef)text)),\n\t\t\t   (CFStringEncoding)sqTextEncoding, 0, FALSE,\n\t\t\t   buf, sizeof(buf), &nUsed))\n\tinputCharCode= buf[0];\n    }\n}\n\n// ParagraphEditor's map looks like this:\n// \n//   0\tnoop cursorHome noop noop cursorEnd noop noop noop\n//   8\tbackspace noop noop cursorPageUp cursorPageDown crWithIndent noop noop\n//  16\tnoop noop noop noop noop noop noop noop\n//  24\tnoop noop noop offerMenuFromEsc cursorLeft cursorRight cursorUp cursorDown\n// 127  forwardDelete\n\n- (void) doCommandBySelector: (SEL)aSelector\n{\n  // why doesn't @selector() reduce to a constant??\n# define encode(c, s)  if (aSelector == @selector(s)) inputCharCode= c\n  // my (subjective) approximation of usage frequency...\n       encode(  8, deleteBackward:);\n  else encode( 13, insertNewline:);\n  else encode(  9, insertTab:);\n  else encode( 28, moveLeft:);\n  else encode( 29, moveRight:);\n  else encode( 30, moveUp:);\n  else encode( 31, moveDown:);\n  else encode( 11, pageUp:);\n  else encode( 12, pageDown:);\n  else encode(  1, moveToBeginningOfDocument:);\n  else encode(  4, moveToEndOfDocument:);\n  else encode(127, deleteForward:);\n  else encode( 27, _cancelKey:);\n  else\n    printf(\"doCommandBySelector: %s\\n\", sel_getName(aSelector));\n# undef encode\n}\n\n- (void) setMarkedText: (id)aString selectedRange: (NSRange)selRange\n{\n  inputMark= NSMakeRange(0, 1);\n  inputSelection= NSMakeRange(NSNotFound, 0);\n}\n\n- (void)\t\t unmarkText\t\t\t\t\t\t{ inputMark= NSMakeRange(NSNotFound, 0); }\n- (BOOL)\t\t hasMarkedText\t\t\t\t\t\t{ return inputMark.location != NSNotFound; }\n- (long)\t\t conversationIdentifier\t\t\t\t\t{ return (long)self; }\n- (NSAttributedString *) attributedSubstringFromRange: (NSRange)theRange\t{ return nil; }\n- (NSRange)\t\t markedRange\t\t\t\t\t\t{ return inputMark; }\n- (NSRange)\t\t selectedRange\t\t\t\t\t\t{ return inputSelection; }\n- (NSRect)\t\t firstRectForCharacterRange: (NSRange)theRange\t\t{ return NSMakeRect(0,0, 0,0); }\n- (unsigned int)\t characterIndexForPoint: (NSPoint)thePoint\t\t{ return 0; }\n- (NSArray *)\t\t validAttributesForMarkedText\t\t\t\t{ return nil; }\n\n@end // SqueakView\n\n\n\n/// \n/// Dialogues for sqUnixMain\n/// \n\n\n@interface ProgressBar : NSPanel\n{\n  NSText\t\t*message;\n  NSProgressIndicator\t*indicator;\n  int\t\t\t value;\n  NSModalSession\t session;\n}\n+(ProgressBar *) openWithTitle: (NSString *) title message: (NSString *) message;\n-(void) displayProgressFrom: (int) min to: (int) max during: (void (*)(ProgressBar *)) thunk;\n-(id)   value: (int) value;\n-(id)   setMinValue: (int) value;\n-(id)   setMaxValue: (int) value;\n-(void) close;\n@end\n\n@implementation ProgressBar\n\n-(id) initWithTitle: (NSString *) titleString message: (NSString *) messageString\n{\n  NSSize messageSize;\n  NSProgressIndicator *ind;\n  NSText *text;\n  int inset, y, w;\n\n  message= 0;\n  indicator= 0;\n  value= 0;\n  messageSize= (nil == messageString)\n    ? NSMakeSize(0,0)\n    : [messageString sizeWithAttributes: nil];\n  inset= 10;\n  y= inset;\n  w= max(100, messageSize.width + 50);\n  ind= [[NSProgressIndicator alloc]\n\t initWithFrame: NSMakeRect(inset, y, w, NSProgressIndicatorPreferredThickness)];\n  [ind setIndeterminate: NO];\n  y += NSProgressIndicatorPreferredThickness + inset;\n  text= [[NSText alloc] initWithFrame: NSMakeRect(inset, y, w, messageSize.height)];\n  [text setString: messageString];\n  [text setEditable: NO];\n  y += messageSize.height + inset;\n  if ((self= [super initWithContentRect: NSMakeRect(0, 0, w + inset * 2, y)\n\t\t    styleMask:           ((nil == titleString)\n\t\t\t\t\t  ? NSBorderlessWindowMask\n\t\t\t\t\t  : NSTitledWindowMask)\n\t\t    backing:             NSBackingStoreBuffered\n\t\t    defer:               NO]))\n    {\n      [[self contentView] addSubview: (indicator= ind)];\n      [[self contentView] addSubview: (message= text)];\n      if (nil != titleString)\n\t[self setTitle: titleString];\n      session= [NSApp beginModalSessionForWindow: self];\n    }\n  return self;\n}\n\n+(ProgressBar *) openWithTitle: (NSString *) titleString\n\t\t       message: (NSString *) messageString\n{\n  ProgressBar *bar= [[ProgressBar alloc] initWithTitle: titleString message: messageString];\n  [bar center];\n  [bar makeKeyAndOrderFront: nil];\n  return bar;\n}\n\n-(id) setMinValue: (int) min\n{\n  [indicator setMinValue: (double)min];\n  return self;\n}\n\n-(id) setMaxValue: (int) max\n{\n  [indicator setMaxValue: (double)max];\n  return self;\n}\n\n-(id) value: (int) newValue\n{\n  if (newValue != value)\n    {\n      value= newValue;\n      [indicator setDoubleValue: (double) value];\n      [indicator displayIfNeeded];\n      [NSApp runModalSession: session];\n    }\n  return self;\n}\n\n-(void) dealloc\n{\n  if (message) [message release];\n  if (indicator) [indicator release];\n  [super dealloc];\n}\n\n-(void) close\n{\n  [NSApp endModalSession: session];\n  [super close];\n  [self release];\n}\n\n-(void) displayProgressFrom: (int) min to: (int) max during: (void (*)(ProgressBar *)) thunk\n{\n  [indicator setMinValue: (double)min];\n  [indicator setMaxValue: (double)max];\n  thunk(self);\n}\n\n@end // ProgressBar\n\n\nstatic int fileCopy(char *src, char *dst)\n{\n  int in, out, r= -1;\n  struct stat st;\n  if (stat(src, &st)) return (errno= ENOENT);\n  if ((in=  open(src, O_RDONLY)) < 0) return (errno= ENOENT);\n  if ((out= open(dst, O_WRONLY | O_CREAT | O_TRUNC, 0755)) >= 0)\n    {\n      char *buf;\n      int  done;\n      ProgressBar *bar= [ProgressBar openWithTitle: @\"Writing...\"\n\t\t\t\t     message: [NSString stringWithCString: dst]];\n      [bar setMaxValue: (double)st.st_size];\n      buf= (char *)alloca(st.st_blksize);\n      done= 0;\n      while ((r= read(in, buf, st.st_blksize)) > 0)\n\tif (r == write(out, buf, r))\n\t  {\n\t    done += r;\n\t    [bar value: done];\n\t  }\n\telse\n\t  {\n\t    r= -1;\n\t    break;\n\t  }\n      [bar close];\n      close(out);\n    }\n  close(in);\n  return (r == 0) ? 0 : errno;\n}\n\n\nstatic void copyFile(const char *filename, char *ext, char *source)\n{\n  char dest[MAXPATHLEN], *ptr= 0;\n  strncpy(dest, filename, sizeof(dest));\n  if ((ptr= strrchr(dest, '.')))\n    {\n      strcpy(ptr, ext);\n      if (fileCopy(source, dest))\n\t{\n\t  perror(\"FileCopy\");\n\t  NSRunCriticalAlertPanel(@\"Oops...\",\n\t\t\t\t  @\"I encountered an error while copying the image/changes files.  The system told me `%s'.  Sorry.\"\n\t\t\t\t  @\"Quit\",\n\t\t\t\t  nil,\n\t\t\t\t  nil,\n\t\t\t\t  [NSString stringWithCString: strerror(errno)]);\n\t  exit(1);\n\t}\n    }\n}\n\n\nstatic void display_winImageNotFound(void)\t{}\n\n\nstatic int winCopyOrOpen(void)\n{\n  switch (NSRunAlertPanel(@\"Create a new image?\",\n\t\t\t  @\"You have started Squeak without specifying an image file.  Would you like to create a new image or open an image that you saved earlier?\",\n\t\t\t  @\"Open\",\n\t\t\t  @\"Cancel\",\n\t\t\t  @\"New\"))\n    {\n    case NSAlertDefaultReturn:\treturn 0;\t// open\n    case NSAlertOtherReturn:\treturn 1;\t// new\n    default:\t\t\t\t\t// cancel or error\n      exit(0);\n    }\n  return 0;\n}\n\n\nstatic int winImageCopy(char *buf, int len, char *image, char *changes)\n{\n  NSSavePanel *panel= [NSSavePanel savePanel];\n  NSString    *home=  [NSString stringWithCString: getenv(\"HOME\")];\n  int          reply;\n  //xxx release the string\n\n  [panel setTitle: @\"Where should I save the new image file?\"];\n  [panel setRequiredFileType: @\"image\"];\n  [panel setFloatingPanel: YES];\n  [panel setOneShot: YES];\n  [panel setReleasedWhenClosed: YES]; //xxx does the previous imply this???\n//[panel setContentSize: NSMakeSize(400, 350)];\n  [panel center];\n\n  reply= [panel runModalForDirectory: home file: @\"squeak.image\"];\n//[home release];\n\n  if (NSFileHandlingPanelOKButton == reply)\n    {\n      const char *path= [[panel filename]  cString];\n      copyFile(path, \".image\",   image);\n      copyFile(path, \".changes\", changes);\n      strncpy(buf, path, len);\n      return 1;\n    }\n  return 0;\n}\n\n\nstatic int winImageOpen(char *buf, int len)\n{\n  NSOpenPanel *panel= [NSOpenPanel openPanel];\n\n  [panel setTitle: @\"Which image file should I open?\"];\n  [panel setFloatingPanel: YES];\n  [panel setOneShot: YES];\n  [panel setReleasedWhenClosed: YES]; //xxx does the previous imply this???\n//[panel setContentSize: NSMakeSize(400, 350)];\n  [panel center];\n\n  if (NSOKButton == [panel runModalForTypes: [NSArray arrayWithObject: @\"image\"]])\n    {\n      NSArray *files= [panel filenames];\n      if (1 == [files count])\n\t{\n\t  strncpy(buf, [[files objectAtIndex: 0] cString], len);\n\t  return 1;\n\t}\n    }\n  return 0;\n}\n\n\nstatic int display_winImageFind(char *buf, int len)\n{\n  if (documentName)\n    {\n      strncpy(buf, documentName, len);\n      free(documentName);\n      documentName= 0;\n      return 1;\n    }\n  else\n    {\n      char image[MAXPATHLEN], changes[MAXPATHLEN];\n      strlcat(strncpy(image, resourcePath, sizeof(image)),\n\t      \"squeak.image\",\n\t      sizeof(image));\n      strlcat(strncpy(changes, resourcePath, sizeof(changes)),\n\t      \"squeak.changes\",\n\t      sizeof(changes));\n      return ((  (0 == access(image,   R_OK)))\n\t      && (0 == access(changes, R_OK))\n\t      && winCopyOrOpen())\n\t? winImageCopy(buf, len, image, changes)\n\t: winImageOpen(buf, len);\n    }\n  return 0;\n}\n\n\nstatic sqInt display_primitivePluginBrowserReady(void)\t\t{ return primitiveFail(); }\nstatic sqInt display_primitivePluginRequestURLStream(void)\t{ return primitiveFail(); }\nstatic sqInt display_primitivePluginRequestURL(void)\t\t{ return primitiveFail(); }\nstatic sqInt display_primitivePluginPostURL(void)\t\t{ return primitiveFail(); }\nstatic sqInt display_primitivePluginRequestFileHandle(void)\t{ return primitiveFail(); }\nstatic sqInt display_primitivePluginDestroyRequest(void)\t{ return primitiveFail(); }\nstatic sqInt display_primitivePluginRequestState(void)\t\t{ return primitiveFail(); }\n\n\n/// \n/// OpenGL stuff\n/// \n\n\n#include <OpenGL/OpenGL.h>\n\n#include \"B3DAcceleratorPlugin.h\"\n#include \"sqOpenGLRenderer.h\"\n#include \"sqUnixQuartzGL.h\"\n\n#define renderView(R)\t\t(assert(R), (NSOpenGLView    *)((R)->drawable))\n#define renderContext(R)\t(assert(R), (NSOpenGLContext *)((R)->context))\n\nstatic glRenderer *renderers[MAX_RENDERER];\n\nstatic sqInt display_ioGLinitialise(void)\n{\n  int i;\n  for (i= 0;  i < MAX_RENDERER;  ++i)\n    renderers[i]= 0;\n  glActive= 0;\n  return 1;\n}\n\nstatic void addRenderer(glRenderer *r)\n{\n  int i;\n  for (i= 0;  i < MAX_RENDERER;  ++i)\n    if (!renderers[i])\n      {\n\trenderers[i]= r;\n\t++glActive;\n\treturn;\n      }\n  assert(!\"this cannot happen\");\n}\n\nstatic void removeRenderer(glRenderer *r)\n{\n  int i;\n  for (i= 0;  i < MAX_RENDERER;  ++i)\n    if (renderers[i] == r)\n      {\n\trenderers[i]= 0;\n\t--glActive;\n\treturn;\n      }\n  assert(!\"this cannot happen\");\n}\n\n// fix dumb inverted coordinates after window geometry change\n\nstatic void reframeRenderer(glRenderer *r)\n{\n  NSRect frame= NSMakeRect(r->bufferRect[0], r->bufferRect[1],\n\t\t\t   r->bufferRect[2], r->bufferRect[3]);\n  frame.origin.y= [topView bounds].size.height - frame.size.height - frame.origin.y;\n  [renderView(r) removeFromSuperview];\n  [renderView(r) setFrame: frame];\n  [topView addSubview: renderView(r)];\n}\n\nstatic void reframeRenderers(void)\n{\n  int i;\n  for (i= 0;  i < MAX_RENDERER;  ++i)\n    if (renderers[i])\n      reframeRenderer(renderers[i]);\n}\n\n#if 0\n\nstatic void updateRenderer(glRenderer *r)\n{\n  [[renderView(r) openGLContext] makeCurrentContext];\n}\n\nstatic void updateRenderers(void)\n{\n  int i;\n  for (i= 0;  i < MAX_RENDERER;  ++i)\n    if (renderers[i])\n      updateRenderer(renderers[i]);\n}\n\n#endif\n\n\nstatic sqInt display_ioGLcreateRenderer(glRenderer *r, sqInt x, sqInt y, sqInt w, sqInt h, sqInt flags)\n{\n  long swapInterval;\n  NSOpenGLView *drawable;\n  NSOpenGLPixelFormatAttribute attrs[]=\n    {\n      NSOpenGLPFANoRecovery,\n      NSOpenGLPFAWindow,\n      NSOpenGLPFAAccelerated,\n      NSOpenGLPFADoubleBuffer,\n      //NSOpenGLPFAColorSize,\t16, //24\n      NSOpenGLPFAAlphaSize,\t 8, //8\n      NSOpenGLPFADepthSize,\t24, //16\n      NSOpenGLPFAStencilSize,\t((flags & B3D_STENCIL_BUFFER) ? 8 : 0),\n      NSOpenGLPFAAccumSize, 0,\n      0\n    };\n  NSOpenGLPixelFormat *fmt= [[NSOpenGLPixelFormat alloc] initWithAttributes: attrs];\n  if (!fmt)\n    {\n      fprintf(stderr, \"ioGLcreateRenderer: illegal pixel format\\n\");\n      return 0;\n    }\n\n  if (verboseLevel >= 3)\n    printFormatInfo(fmt);\n\n  drawable= [[NSOpenGLView alloc]\n\t      initWithFrame: NSMakeRect(x, [topView bounds].size.height - h - y, w, h)\n\t      pixelFormat:   fmt];\n  [fmt release];\n  if (!drawable)\n    {\n      fprintf(stderr, \"ioGLcreateRenderer: could not create view\\n\");\n      return 0;\n    }\n  r->drawable= drawable;\n  r->context=  [drawable openGLContext];\n  addRenderer(r);\n\n  swapInterval= 0;\n\n  [renderContext(r) setValues: &swapInterval forParameter: NSOpenGLCPSwapInterval];\n  [topView addSubview: drawable];\n\n  return 1;\n\n  (void)glErrString;\t// declared static in sqOpenGLRenderer.h, but never used\n}\n\n\nstatic sqInt display_ioGLmakeCurrentRenderer(glRenderer *r)\n{\n  if (r)\n    {\n      assert(r->context);\n      [renderContext(r) makeCurrentContext];\n    }\n  else\n    [NSOpenGLContext clearCurrentContext];\n\n  return 1;\n}\n\n\nstatic void display_ioGLdestroyRenderer(glRenderer *r)\n{\n  [NSOpenGLContext clearCurrentContext];\n  assert(r->drawable);\n  [renderView(r) removeFromSuperview];\n  [renderView(r) release];\n  removeRenderer(r);\n}\n\n\nstatic void display_ioGLswapBuffers(glRenderer *r)\n{\n  assert(r->context);\n  [renderContext(r) flushBuffer];\n}\n\n\nstatic void display_ioGLsetBufferRect(glRenderer *r, sqInt x, sqInt y, sqInt w, sqInt h)\n{\n  NSRect frame= NSMakeRect(x, y, w, h);\n  fprintf(stderr, \"ioGLsetBufferRect(%p, %d, %d, %d, %d)\\n\", r->context, x, y, w, h);\n  assert(r->context);\n  frame.origin.y= [topView bounds].size.height - frame.size.height - frame.origin.y;\n  fprintf(stderr, \"view setFrame: %d %d %d %d\\n\",\n\t  (int)frame.origin.x, (int)frame.origin.y, (int)frame.size.width, (int)frame.size.height);\n  [renderView(r) setFrame: frame];\n}\n\n\n\nSqDisplayDefine(Quartz);\n\n\n#include \"SqModule.h\"\n\nstatic void *display_makeInterface(void)\n{\n  return &display_Quartz_itf;\n}\n\nSqModuleDefine(display, Quartz);\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-Quartz/sqUnixQuartzGL.h",
    "content": "#if (DEBUG)\n\nstatic long getFormatAttribute(NSOpenGLPixelFormat *fmt,\n                                   NSOpenGLPixelFormatAttribute attr)\n{\n  long val;\n  [fmt getValues: &val forAttribute: attr forVirtualScreen: 0];\n  return val;\n}\n\nvoid printFormatInfo(NSOpenGLPixelFormat *fmt)\n{\n  printf(\"GL pixel format:\\n\");\n  // valued\n  printf(\"  RendererID     0x%lx\\n\", getFormatAttribute(fmt, NSOpenGLPFARendererID ));\n  printf(\"  AuxBuffers     %ld\\n\",   getFormatAttribute(fmt, NSOpenGLPFAAuxBuffers ));\n  printf(\"  ColorSize      %ld\\n\",   getFormatAttribute(fmt, NSOpenGLPFAColorSize  ));\n  printf(\"  AlphaSize      %ld\\n\",   getFormatAttribute(fmt, NSOpenGLPFAAlphaSize  ));\n  printf(\"  DepthSize      %ld\\n\",   getFormatAttribute(fmt, NSOpenGLPFADepthSize  ));\n  printf(\"  StencilSize    %ld\\n\",   getFormatAttribute(fmt, NSOpenGLPFAStencilSize));\n  printf(\"  AccumSize      %ld\\n\",   getFormatAttribute(fmt, NSOpenGLPFAAccumSize  ));\n  printf(\"  ScreenMask     %ld\\n\",   getFormatAttribute(fmt, NSOpenGLPFAScreenMask ));\n  // bool\n  printf(\"  AllRenderers   %ld\\n\",   getFormatAttribute(fmt, NSOpenGLPFAAllRenderers  ));\n  printf(\"  Stereo         %ld\\n\",   getFormatAttribute(fmt, NSOpenGLPFAStereo        ));\n  printf(\"  MinimumPolicy  %ld\\n\",   getFormatAttribute(fmt, NSOpenGLPFAMinimumPolicy ));\n  printf(\"  MaximumPolicy  %ld\\n\",   getFormatAttribute(fmt, NSOpenGLPFAMaximumPolicy ));\n  printf(\"  OffScreen      %ld\\n\",   getFormatAttribute(fmt, NSOpenGLPFAOffScreen     ));\n  printf(\"  FullScreen     %ld\\n\",   getFormatAttribute(fmt, NSOpenGLPFAFullScreen    ));\n  printf(\"  SingleRenderer %ld\\n\",   getFormatAttribute(fmt, NSOpenGLPFASingleRenderer));\n  printf(\"  NoRecovery     %ld\\n\",   getFormatAttribute(fmt, NSOpenGLPFANoRecovery    ));\n  printf(\"  Accelerated    %ld\\n\",   getFormatAttribute(fmt, NSOpenGLPFAAccelerated   ));\n  printf(\"  ClosestPolicy  %ld\\n\",   getFormatAttribute(fmt, NSOpenGLPFAClosestPolicy ));\n  printf(\"  Robust         %ld\\n\",   getFormatAttribute(fmt, NSOpenGLPFARobust        ));\n  printf(\"  BackingStore   %ld\\n\",   getFormatAttribute(fmt, NSOpenGLPFABackingStore  ));\n  printf(\"  Window         %ld\\n\",   getFormatAttribute(fmt, NSOpenGLPFAWindow        ));\n  printf(\"  MultiScreen    %ld\\n\",   getFormatAttribute(fmt, NSOpenGLPFAMultiScreen   ));\n  printf(\"  Compliant      %ld\\n\",   getFormatAttribute(fmt, NSOpenGLPFACompliant     ));\n}\n\nstatic long getCtxParam(NSOpenGLContext *ctx, NSOpenGLContextParameter param)\n{\n  long val;\n  [ctx getValues: &val forParameter: param];\n  return val;\n}\n\nvoid printContextInfo(NSOpenGLContext *ctx)\n{\n  long vals[4];\n  printf(\"GL Context Parameters:\\n\");\n  [ctx getValues: vals forParameter: NSOpenGLCPSwapRectangle];\n  printf(\"  SwapRectangle       %ld,%ld %ldx%ld\\n\", vals[0], vals[1], vals[2], vals[3]);\n  printf(\"  SwapRectangleEnable %ld\\n\", getCtxParam(ctx, NSOpenGLCPSwapRectangleEnable));\n  printf(\"  RasterizationEnable %ld\\n\", getCtxParam(ctx, NSOpenGLCPRasterizationEnable));\n  printf(\"  SwapInterval        %ld\\n\", getCtxParam(ctx, NSOpenGLCPSwapInterval));\n  printf(\"  SurfaceOrder        %ld\\n\", getCtxParam(ctx, NSOpenGLCPSurfaceOrder));\n  printf(\"  SurfaceOpacity      %ld\\n\", getCtxParam(ctx, NSOpenGLCPSurfaceOpacity));\n  printf(\"  StateValidation     %ld\\n\", getCtxParam(ctx, NSOpenGLCPStateValidation));\n}\n\n#else /* !DEBUG */\n\n# define printFormatInfo(fmt)\n# define printContextInfo(ctx)\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-Quartz/zzz/Squeak.h",
    "content": "// -*- ObjC -*-\n\n@interface Squeak : NSApplication\n- (void) applicationDidFinishLaunching: (NSNotification *)note;\n- (void) applicationDidChangeScreenParameters: (NSNotification *)note;\n- (void) unhideAllApplications: (id)sender;\n- (BOOL) windowShouldClose: (id)sender;\n- (void) maybeTerminate: (id)sender;\n- (void) terminate: (id)sender;\n- (void) performEnableKeys: (id)sender;\n- (void) performDisableKeys: (id)sender;\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-Quartz/zzz/Squeak.m",
    "content": "#import <Cocoa/Cocoa.h>\n\n@implementation Squeak\n\n\n+ (void) initialize\n{\n  NSMutableDictionary *dict;\n  NSUserDefaults *defaults;\n\n  defaults= [NSUserDefaults standardUserDefaults];\n  dict= [NSMutableDictionary dictionary];\n    \n  [dict setObject: @\"YES\" forKey: @\"AppleDockIconEnabled\"];\n  [defaults registerDefaults: dict];\n}\n\n\nstatic char *documentName= 0;\n\n\n-(BOOL) application: (NSApplication *) theApplication\n\topenFile:    (NSString *)      filename\n{\n  if (fromFinder)\n    documentName= strdup([filename cString]);\n  return YES;\n}\n\n\n-(void) applicationDidFinishLaunching: (NSNotification *)note\n{\n  int fds[2];\n\n  // this saves an awful lot of tedious mutex contention (and besides\n  // is essentially free, since there's no way to avoid writing a\n  // socket to inform aio of the availability of the event)\n#if 0\n  if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds) != 0)\n    {\n      perror(\"socketpair\");\n      exit(1);\n    }\n  osXfd= fds[0];\n  stXfd= fds[1];\n#else\n  if (pipe(fds))\n    {\n      perror(\"pipe\");\n      exit(1);\n    }\n  stXfd= fds[0];\n  osXfd= fds[1];\n#endif\n  aioEnable(stXfd, 0, 0);\n  aioHandle(stXfd, evtHandler, AIO_RX);\n#if (!USE_SPINLOCK)\n  {\n    pthread_mutexattr_t attr;\n    pthread_mutexattr_init(&attr);\n#  ifndef NDEBUG\n    pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK);\n#  endif\n    if (pthread_mutex_init(&displayMx, &attr))\n      {\n\tperror(\"pthread_mutex_init\");\n\texit(1);\n      }\n    pthread_mutexattr_destroy(&attr);\n  }\n#endif\n\n  if (fromFinder)\n    {\n      char *ptr= 0;\n      strncpy(resourcePath, argVec[0], sizeof(resourcePath));\t// .app/Contents/MacOS/squeak\n      if ((ptr= strrchr(resourcePath, '/')))\n\t{\n\t  *ptr= '\\0';\t\t\t\t\t\t// .app/Contents/MacOS\n\t  if ((ptr= strrchr(resourcePath, '/')))\n\t    {\n\t      *ptr= '\\0';\t\t\t\t\t\t// .app/Contents\n\t      strcpy(ptr, \"/Resources/\");\t\t\t\t// .app/Contents/Resources/\n\t    }\n\t  else\n\t    resourcePath[0]= '\\0';\n\t}\n      else\n\tresourcePath[0]= '\\0';\n    }\n\n  imgInit();\n\n  // vmPath has been set to the realpath() of the VM, which might be\n  // bogus (since the more cultivated OS X user will make it a symlink\n  // to /usr/local/bin/squeak).  put it back where it should be.  note\n  // that we would also like to pick up the sources file from\n  // resourcePath/SqueakV*.sources, but I guess the stupid image is\n  // going to look for it in the vmPath.  ho hum.\n  {\n    char *ptr;\n    assert(strlen(argVec[0]) < MAXPATHLEN);\n    strcpy(vmPath, argVec[0]);\n    if ((ptr= strrchr(vmPath, '/')))\n      ptr[1]= '\\0';\n  }\n\n  setUpDisplay();\n  printf(\"fullScreenFlag %d\\n\", getFullScreenFlag());\n  setUpWindow(fullscreen= getFullScreenFlag());\n\n  [NSThread\n    detachNewThreadSelector: @selector(interpret:)\n    toTarget:\t\t     self\n    withObject:\t\t     nil];\n}\n\n\n- (void) interpret: (id)context\n{\n  [[NSAutoreleasePool alloc] init];\t// running in new thread\n  interpret();\n  (void)recordMouseEvent;\n  (void)recordKeyboardEvent;\n  (void)recordDragEvent;\n}\n\n\n- (void) applicationDidChangeScreenParameters: (NSNotification *)note\n{\n  //xxx this one might be tricky in the absence of appWillChangeScreenParams:\n  fprintf(stderr, \"\\nDISPLAY PARAMETERS CHANGED\\n\\n\");\n  //  lock(display);\n  pixWidth= pixHeight= pixDepth= 0;\n  setUpDisplay();\n  //setUpWindow(getFullScreenFlag());\n  updatePix();\n  //  unlock(display);\n  //setUpMenus();\n  fullDisplayUpdate();\n}\n\n\n- (void) unhideAllApplications: (id)sender\n{\n  [super unhideAllApplications: sender];\n  [win orderFront: self]; // so that unhinding once more will reveal the Sq window\n}\n\n\n- (BOOL) windowShouldClose: (id)sender\n{\n  return NO;\n}\n\n\n- (void) terminate: (id)sender\n{\n  [super terminate: sender];\n  exit(0);\n}\n\n- (void) maybeTerminate: (id)sender\n{\n  switch (NSRunAlertPanel(@\"Really quit?\",\n\t\t\t  @\"All changes since your last save will be lost.\\n\\nIf you want to save your changes, press `Cancel' and then choose `save and quit' from the background menu in the Squeak window.\",\n\t\t\t  @\"Quit\",\n\t\t\t  @\"Cancel\",\n\t\t\t  nil))\n    {\n    case NSAlertDefaultReturn:\t[self terminate: self];\n    }\n}\n\n\n- (void) performAbout: (id)sender\n{\n  extern char *getVersionInfo(int verbose);\n  char *info= getVersionInfo(1);\n  NSPanel *panel= NSGetInformationalAlertPanel(@\"About Squeak\",\n\t\t\t\t\t       @\"%s\",\n\t\t\t\t\t       @\"Dismiss\",\n\t\t\t\t\t       nil,\n\t\t\t\t\t       nil,\n\t\t\t\t\t       info);\n  NSRect frame= [panel frame];\n  frame.size.width *= 1.5;\n  [panel setFrame: frame display: NO];\n  [NSApp runModalForWindow: panel];\n  [panel close];\n  free(info);\n}\n\n\n\n//xxx why does rebuilding the menu lose boldface on the Apple menu item???\n\n- (void) performEnableKeys:  (id)sender\t{ cmdKeys= 1;  setUpMenus(); }\n- (void) performDisableKeys: (id)sender\t{ cmdKeys= 0;  setUpMenus(); }\n\n\n- (void) windowWillMove: (NSNotification *)note\n{\n  //xxx FIXME SOON: there are other ways to enter this (and ways other than\n  // noteEvent to escape from it)\n  inModalLoop= 1;\n}\n\n\n- (NSSize) windowWillResize: (NSWindow *)sender toSize: (NSSize)size\n{\n  return glActive ? [sender frame].size : size;\n}\n\n\n- (void) windowDidResize: (NSNotification *)note\n{\n  reframeRenderers();\n}\n\n\n-(void) sendEvent: (NSEvent *)event\n{\n  int\t  type=     [event type];\n  NSPoint loc=      [event locationInWindow];\n  NSWindow *evtWin= [event window];\n#if 0\n  NSPoint loc=      (fullscreen\n\t\t     ? [NSEvent mouseLocation]\t//xxx should use deltas\n\t\t     : [event locationInWindow]);\n#endif\n\n  if (evtWin && ((NSWindow *)win != [event window]))\n    {\n      [super sendEvent: event];\n      return;\n    }\n\n  switch (type)\n    {\n#     define down buttonState |= qz2sqButton([event buttonNumber])\n#     define move\n#     define up\t  buttonState &= ~qz2sqButton([event buttonNumber])\n\n#     define recordEvent(delta)\t\t\t\t\t\\\n      if (fullscreen || NSPointInRect(loc, [view frame]))\t\\\n\t{\t\t\t\t\t\t\t\\\n\t  noteMousePoint(loc);\t\t\t\t\t\\\n\t  delta;\t\t\t\t\t\t\\\n\t  modifierState= qz2sqModifiers([event modifierFlags]);\t\\\n\t  noteMouseEvent();\t\t\t\t\t\\\n\t}\t\t\t\t\t\t\t\\\n      else\t\t\t\t\t\t\t\\\n\t[super sendEvent: event]\t// don't track outside window\n\n    case NSLeftMouseDown: case NSOtherMouseDown: case NSRightMouseDown:\n      if ((!active) || NSPointInRect(loc, resizeRect))\n\t[super sendEvent: event];\t// first click, or start resize\n      else\n\trecordEvent(down);\n      break;\n\n    case NSLeftMouseDragged: case NSRightMouseDragged: case NSOtherMouseDragged:\n      if (!(buttonState & qz2sqButton([event buttonNumber])))\n\t{\n\t  [super sendEvent: event];\t// already tracking window move\n\t  break;\n\t}\n      // fall through...\n    case NSMouseMoved:\n      recordEvent(move);\n      break;\n\n    case NSLeftMouseUp: case NSOtherMouseUp: case NSRightMouseUp:\n      recordEvent(up);\n      break;\n\n#     undef recordEvent\n#     undef down\n#     undef move\n#     undef up\n\n    case NSKeyDown:\n      {\n\tint keyCode;\n\tmodifierState= qz2sqModifiers([event modifierFlags]);\n\tkeyCode= [view composeKeyDown: event]; //qz2sqKey(event);\n\tif (keyCode >= 0)\n\t  {\n\t    if (cmdKeys)\n\t      {\n\t\tif ((modifierState == CommandKeyBit) || (modifierState == CommandKeyBit + ShiftKeyBit))\n\t\t  switch (keyCode)\n\t\t    {\n\t\t    case '?': [NSApp showHelp: self];\t\t\tkeyCode= -1; break;\n\t\t    case 'h': [NSApp hide: self];\t\t\tkeyCode= -1; break;\n\t\t    case 'k': [NSApp performDisableKeys: self];\t\tkeyCode= -1; break;\n\t\t    case 'm': [win   performMiniaturize: self];\t\tkeyCode= -1; break;\n\t\t    case 'q': [NSApp maybeTerminate: self];\t\tkeyCode= -1; break;\n\t\t    }\n\t\telse if (modifierState == CommandKeyBit + OptionKeyBit)\n\t\t  switch (keyCode)\n\t\t    {\n\t\t    case 'h': [NSApp hideOtherApplications: self];\tkeyCode= -1; break;\n\t\t    }\n\t      }\n\t    if (keyCode >= 0)\n\t      {\n\t\tif (![event isARepeat])\n\t\t  noteKeyboardEvent(keyCode, EventKeyDown, modifierState);\n\t\tnoteKeyboardEvent(keyCode, EventKeyChar, modifierState);\n\t\trecordKeystroke(keyCode);\t\t\t/* DEPRECATED */\n\t      }\n\t    else // key up not interesting\n\t      [view composeKeyUp: event];\n\t  }\n      }\n      break;\n\n    case NSKeyUp:\n      {\n\tint keyCode;\n\tmodifierState= qz2sqModifiers([event modifierFlags]);\n\tkeyCode= [view composeKeyUp: event]; //qz2sqKey(event);\n\tif (keyCode >= 0)\n\t  {\n\t    noteKeyboardEvent(keyCode, EventKeyUp, modifierState);\n\t    //accentMap= 0;\n\t  }\n      }\n      break;\n\n    case NSScrollWheel:\n      {\n\tint keyCode= ([event deltaY] >= 0.0) ? 30 : 31;\n\tnoteKeyboardEvent(keyCode, EventKeyDown, modifierState);\n\tnoteKeyboardEvent(keyCode, EventKeyChar, modifierState);\n\tnoteKeyboardEvent(keyCode, EventKeyUp,   modifierState);\n      }\n      break;\n\n    case NSAppKitDefined:\n      switch ([event subtype])\n\t{\n\tcase NSApplicationActivatedEventType:\n\t  active= 1;\n\t  break;\n\n\tcase NSApplicationDeactivatedEventType:\n\t  active= 0;\n\t  break;\n\t  // case NSScreenChangedEventType: //xxx this means the window\n\t  // changed to a different physical screen, which is useless\n\t  // info (we'd far rather be informed that the current screen's\n\t  // depth has changed)\n\t}\n      //dprintf((\"AppKitDefinedEvent subtype %d\\n\", [event subtype]));\n      [super sendEvent: event];\n      break;\n\n      // case NSFlagsChanged:\n      // case NSApplicationDefined: break;\n      // case NSPeriodic: break;\n      // case NSCursorUpdate: break;\n\n    default: // almost always NSSystemDefined\n      //dprintf((\"Event type %d subtype %d\\n\", [event type], [event subtype]));\n      [super sendEvent: event];\n    }\n}\n\n\n@end // Squeak\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-Quartz/zzz/SqueakView.h",
    "content": "// -*- ObjC -*-\n\n// Why QDView?  Well...\n// \n//   1) we can trivially obtain a raw pointer to its backing store, so\n//   2) no need to putz around with the lockFocus/DataProvider/ImageRep crap; plus\n//   3) its buffer's coordinate system is already the right way up for Squeak, so\n//   4) we avoid potential recopy (just to have CG recopy again); besides\n//   5) QDFlushBuffer is _blindingly_ fast (even compared to drawing directly on\n//      the framebuffer [go measure it if you don't believe me]); but most importantly\n//   6) the QD API is completely free of ObjC and attendant inefficiencies.\n\n@interface SqueakView : NSQuickDrawView <NSTextInput>\n- (BOOL) acceptsFirstResponder;\n- (BOOL) becomeFirstResponder;\n- (BOOL) isOpaque;\n- (BOOL) isFlipped;\n- (id)   initWithFrame: (NSRect)frame;\n- (void) setFrame: (NSRect)rect;\n- (void) drawRect: (NSRect)rect;\n- (void) viewWillStartLiveResize;\n- (void) viewDidEndLiveResize;\n- (int)  draggingEntered: (id<NSDraggingInfo>)sender;\n- (int)  draggingUpdated: (id<NSDraggingInfo>)sender;\n- (void) draggingExited: (id<NSDraggingInfo>)sender;\n- (BOOL) performDragOperation: (id<NSDraggingInfo>)sender;\n- (int) composeKeyDown: (NSEvent *)event;\n- (int) composeKeyUp: (NSEvent *)event;\n@end\n\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-Quartz/zzz/SqueakView.m",
    "content": "@implementation SqueakView\n\n- (BOOL) isOpaque\t\t{ return YES; }\n- (BOOL) isFlipped\t\t{ return YES; }\n- (BOOL) acceptsFirstResponder\t{ return YES; }\n- (BOOL) becomeFirstResponder\t{ return YES; }\n- (BOOL) resignFirstResponder\t{ return NO; }\n\n- (void) renewGState\n{\n  printf(\"\\nRENEW GSTATE\\n\\n\");\n  [super renewGState];\n}\n\nstatic NSRange inputMark;\nstatic NSRange inputSelection;\nstatic int     inputCharCode;\n\n- (id) initWithFrame: (NSRect)frame\n{\n  id result= [super initWithFrame: frame];\n  if (self == result)\n    [self registerForDraggedTypes:\n\t    [NSArray arrayWithObjects:\n\t\t       NSFilenamesPboardType, nil]];\n  inputCharCode=  -1;\n  inputMark=\t  NSMakeRange(NSNotFound, 0);\n  inputSelection= NSMakeRange(0, 0);\n  return result;\n}\n\n\n- (void) setFrame: (NSRect)rect\n{\n  lock(display);\n  [super setFrame: rect];\n  if ([self inLiveResize])\n    {\n#    if (RESIZE_IN_TITLE)\n      display_winSetName(shortImageName);\n#    endif\n    }\n  else\n    if ([self qdPort])\n      updatePix();\n  unlock(display);\n}\n\n\n- (void) drawRect: (NSRect)rect\t\t// view already has focus\n{\n  printf(\"drawRect:\\n\");\n  if ([self inLiveResize])\n    {\n      [[NSColor whiteColor] set];\n      NSRectFill(rect);\n      drawImage([[NSGraphicsContext currentContext] graphicsPort], 0);\n    }\n  else\n    {\n      if (!pixBase)\n\t{\n\t  printf(\"drawRect: calling updatePix\\n\");\n\t  assert([self qdPort]);\n\t  updatePix();\n\t}\n      fullDisplayUpdate();\n    }\n}\n\n- (void) viewWillStartLiveResize\n{\n  captureImage(1);\n  [win setShowsResizeIndicator: YES];\n  \n#if (RESIZE_IN_TITLE)\n  showExtent= 1;\n  display_winSetName(shortImageName);\n#endif\n  pixWidth= 0;\n  pixHeight= 0;\n}\n\n- (void) viewDidEndLiveResize\n{\n  releaseImage(1);\n  [win setShowsResizeIndicator: NO];\n#if (RESIZE_IN_TITLE)\n  showExtent= 0;\n  display_winSetName(shortImageName);\n#endif\n  updatePix();\n  fullDisplayUpdate(); // gets rid of the resize icon if window didn't resize\n}\n\n\n- (int) draggingEntered: (id<NSDraggingInfo>)info\n{\n  if ((dragCount == 0) // cannot drag again until previous drag completes\n      && ([info draggingSourceOperationMask] & NSDragOperationCopy))\n    {\n      int count= [[[info draggingPasteboard]\n\t\t    propertyListForType: NSFilenamesPboardType] count];\n      noteMousePoint([info draggingLocation]);\n      noteDragEvent(DragEnter, dragCount= count);\n      return NSDragOperationCopy;\n    }\n  return NSDragOperationNone;\n}\n\n- (int) draggingUpdated: (id<NSDraggingInfo>)info\n{\n  noteMousePoint([info draggingLocation]);\n  noteDragEvent(DragMove, dragCount);\n  return NSDragOperationCopy;\n}\n\n- (void) draggingExited: (id<NSDraggingInfo>)info\n{\n  noteMousePoint([info draggingLocation]);\n  noteDragEvent(DragLeave, dragCount);\n  dragCount= 0;\n}\n\n- (BOOL) performDragOperation: (id<NSDraggingInfo>)info\n{\n  NSPasteboard *pboard= [info draggingPasteboard];\n  noteMousePoint([info draggingLocation]);\n  if ([[pboard types] containsObject: NSFilenamesPboardType])\n    {\n      NSArray *files= [pboard propertyListForType: NSFilenamesPboardType];\n      int i;\n      if (uxDropFileCount)\n\t{\n\t  assert(uxDropFileNames);\n\t  for (i= 0;  i < uxDropFileCount;  ++i)\n\t    free(uxDropFileNames[i]);\n\t  free(uxDropFileNames);\n\t  uxDropFileNames= 0;\n\t}\n      if ((  (!(uxDropFileCount= [files count])))\n\t  || (!(uxDropFileNames= (char **)malloc(uxDropFileCount * sizeof(char *)))))\n\t{\n\t  uxDropFileCount= 0;\n\t  return NO;\n\t}\n      for (i= 0;  i < uxDropFileCount;  ++i)\n\tuxDropFileNames[i]= strdup([[files objectAtIndex: i] cString]);\n    }\n  noteDragEvent(DragDrop, uxDropFileCount);\n  dragCount= 0;\n\n  return YES;\t// under some duress, I might add (see sqUxDragDrop.c)\n}\n\n\nenum { KeyMapSize= 32 };\n\ntypedef struct\n{\n  int keyCode;\n  int keyChar;\n} KeyMapping;\n\nstatic KeyMapping keyMap[KeyMapSize];\n\nstatic int keyMapSize=\t   0;\nstatic int inputCharCode= -1;\n\nstatic int addToKeyMap(int keyCode, int keyChar)\n{\n  if (keyMapSize > KeyMapSize) { fprintf(stderr, \"keymap overflow\\n\");  return -1; }\n  keyMap[keyMapSize++]= (KeyMapping){ keyCode, keyChar };\n  return keyChar;\n}\n\nstatic int indexInKeyMap(int keyCode)\n{\n  int i;\n  for (i= 0;  i < keyMapSize;  ++i)\n    if (keyMap[i].keyCode == keyCode)\n      return i;\n  return -1;\n}\n\nstatic int findInKeyMap(int keyCode)\n{\n  int idx= indexInKeyMap(keyCode);\n  return (idx >= 0) ? keyMap[idx].keyChar : -1;\n}\n\nstatic int removeFromKeyMap(int keyCode)\n{\n  int idx= indexInKeyMap(keyCode);\n  int keyChar= -1;\n  if (idx < 0) { fprintf(stderr, \"keymap underflow\\n\");  return -1; }\n  keyChar= keyMap[idx].keyChar;\n  for (; idx < keyMapSize - 1;  ++idx)\n    keyMap[idx]= keyMap[idx + 1];\n  --keyMapSize;\n  return keyChar;\n}\n\n\n// the following (to @end) must be installed in the first responder\n\n- (int) composeKeyDown: (NSEvent *)event\n{\n  int keyCode= [event keyCode];\n  inputCharCode= -1;\n\n  if (modifierState & CommandKeyBit)\n    inputCharCode= qz2sqKey(event);\n  else\n    {\n      if ([event isARepeat])\n\t{\n\t  int keyChar= findInKeyMap(keyCode);\n\t  //printf(\"%d REP keyCode %x -> keyChar %x\\n\", keyMapSize, keyCode, keyChar);\n\t  return keyChar;\n\t}\n      else\n\t{\n\t  [self interpretKeyEvents: [NSArray arrayWithObject: event]];\n\t  if (inputCharCode < 0)\n\t    inputCharCode= qz2sqKey(event);\n\t}\n    }\n\n  if (inputCharCode >= 0)\n    {\n      //printf(\"%d ADD keyCode %x -> keyChar %x\\n\", keyMapSize, keyCode, inputCharCode);\n      addToKeyMap(keyCode, inputCharCode);\n    }\n\n  return inputCharCode;\n}\n\n- (int) composeKeyUp: (NSEvent *)event\n{\n  int keyCode= [event keyCode];\n  int keyChar= removeFromKeyMap(keyCode);\n  //printf(\"%d DEL keyCode %x -> charCode %x\\n\", keyMapSize, keyCode, keyChar);\n  return keyChar;\n}\n\n- (void) insertText: (NSString *)text\n{\n  //printf(\"insertText\\n\");\n  inputMark= NSMakeRange(NSNotFound, 0);\n  inputSelection= NSMakeRange(0, 0);\n  if ([text length])\n    {\n      UInt8 buf[4];\n      CFIndex nUsed;\n      if (CFStringGetBytes((CFStringRef)text, CFRangeMake(0, CFStringGetLength((CFStringRef)text)),\n\t\t\t   kCFStringEncodingMacRoman, 0, FALSE,\n\t\t\t   buf, sizeof(buf), &nUsed))\n\tinputCharCode= buf[0];\n    }\n}\n\n// ParagraphEditor's map looks like this:\n// \n//   0\tnoop cursorHome noop noop cursorEnd noop noop noop\n//   8\tbackspace noop noop cursorPageUp cursorPageDown crWithIndent noop noop\n//  16\tnoop noop noop noop noop noop noop noop\n//  24\tnoop noop noop offerMenuFromEsc cursorLeft cursorRight cursorUp cursorDown\n// 127  forwardDelete\n\n- (void) doCommandBySelector: (SEL)aSelector\n{\n  // why doesn't @selector() reduce to a constant??\n# define encode(c, s)  if (aSelector == @selector(s)) inputCharCode= c\n  // my (subjective) approximation of usage frequency...\n       encode(  8, deleteBackward:);\n  else encode( 13, insertNewline:);\n  else encode(  9, insertTab:);\n  else encode( 28, moveLeft:);\n  else encode( 29, moveRight:);\n  else encode( 30, moveUp:);\n  else encode( 31, moveDown:);\n  else encode( 11, pageUp:);\n  else encode( 12, pageDown:);\n  else encode(  1, moveToBeginningOfDocument:);\n  else encode(  4, moveToEndOfDocument:);\n  else encode(127, deleteForward:);\n  else encode( 27, _cancelKey:);\n  else\n    printf(\"doCommandBySelector: %s\\n\", sel_getName(aSelector));\n# undef encode\n}\n\n- (void) setMarkedText: (id)aString selectedRange: (NSRange)selRange\n{\n  inputMark= NSMakeRange(0, 1);\n  inputSelection= NSMakeRange(NSNotFound, 0);\n}\n\n- (void)\t\t unmarkText\t\t\t\t\t\t{ inputMark= NSMakeRange(NSNotFound, 0); }\n- (BOOL)\t\t hasMarkedText\t\t\t\t\t\t{ return inputMark.location != NSNotFound; }\n- (long)\t\t conversationIdentifier\t\t\t\t\t{ return (long)self; }\n- (NSAttributedString *) attributedSubstringFromRange: (NSRange)theRange\t{ return nil; }\n- (NSRange)\t\t markedRange\t\t\t\t\t\t{ return inputMark; }\n- (NSRange)\t\t selectedRange\t\t\t\t\t\t{ return inputSelection; }\n- (NSRect)\t\t firstRectForCharacterRange: (NSRange)theRange\t\t{ return NSMakeRect(0,0, 0,0); }\n- (unsigned int)\t characterIndexForPoint: (NSPoint)thePoint\t\t{ return 0; }\n- (NSArray *)\t\t validAttributesForMarkedText\t\t\t\t{ return nil; }\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-Quartz/zzz/SqueakWindow.h",
    "content": "// -*- ObjC -*-\n\n@interface SqueakWindow : NSWindow\n{\n  NSImage *icon;\n}\n- (BOOL) isOpaque;\n- (BOOL) canBecomeKeyWindow;\n- (void) setIcon;\n- (void) performMiniaturize: (id)sender;\n- (void) miniaturize: (id)sender;\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-Quartz/zzz/SqueakWindow.m",
    "content": "@implementation SqueakWindow\n\n- (BOOL) isOpaque\t\t{ return YES; }\n- (BOOL) canBecomeKeyWindow\t{ return YES; }\n\n- (void) setIcon\n{\n  /////////////xxxxxxxxxxxxxxxxxxxxxxxxxx REMOVE\n  icon= [[NSImage alloc] initWithContentsOfFile: @\"transp.icns\"];\n  if (icon)\n    [NSApp setApplicationIconImage: icon];\n}\n\n- (NSImage *) dockImage\n{\n  NSBitmapImageRep *rep= [NSBitmapImageRep alloc];\n  if ([rep initWithFocusedViewRect: topRect])\n    {\n      NSImage *image= [[NSImage alloc] init];\n      [image addRepresentation: rep];\n      if (icon)\n\t{\n\t  [image lockFocus];\n\t  [icon drawInRect: NSMakeRect(0, 0, [image size].width, [image size].height)\n\t\tfromRect:   NSMakeRect(0, 0, [icon size].width, [icon size].height)\n\t\toperation:  NSCompositeSourceOver\n\t\tfraction:   1.0];\n\t  [image unlockFocus];\n\t}\n      return image;\n    }\n  return nil;\n}\n\n- (void) performMiniaturize: (id)sender\n{\n  if (!glActive)\n    [super performMiniaturize: sender];\n}\n\n- (void) miniaturize: (id)sender\n{\n  NSImage *image= [self dockImage];\n  if (image)\n    [self setMiniwindowImage: image];\n  [image release];\n  [super miniaturize: sender];\n}\n\n\n@end\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-Quartz/zzz/sqUnixQuartz.m",
    "content": "/* sqUnixQuartz.m -- display via native windows on Mac OS X\t-*- ObjC -*-\n * \n * Author: Ian Piumarta <ian.piumarta@inria.fr>\n * \n *   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *      You are NOT ALLOWED to distribute modified versions of this file\n *      under its original name.  If you modify this file then you MUST\n *      rename it before making your modifications available publicly.\n * \n *   This file is distributed in the hope that it will be useful, but WITHOUT\n *   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n *   FITNESS FOR A PARTICULAR PURPOSE.\n *   \n *   You may use and/or distribute this file ONLY as part of Squeak, under\n *   the terms of the Squeak License as described in `LICENSE' in the base of\n *   this distribution, subject to the following additional restrictions:\n * \n *   1. The origin of this software must not be misrepresented; you must not\n *      claim that you wrote the original software.  If you use this software\n *      in a product, an acknowledgment to the original author(s) (and any\n *      other contributors mentioned herein) in the product documentation\n *      would be appreciated but is not required.\n * \n *   2. You must not distribute (or make publicly available by any\n *      means) a modified copy of this file unless you first rename it.\n * \n *   3. This notice must not be removed or altered in any source distribution.\n * \n *   Using (or modifying this file for use) in any context other than Squeak\n *   changes these copyright conditions.  Read the file `COPYING' in the\n *   directory `platforms/unix/doc' before proceeding with any such use.\n * \n * Last edited: 2005-04-06 08:08:38 by piumarta on squeak.hpl.hp.com\n */\n\n\n//xxx ...\n// \n// check use of winRect and titleRect.  reduce to (int)winHeight and\n// (int)titleHeight in setRects.\n// \n// investigate creating sq events in the UI thread and then sending\n// them down the notification pipe, instead of locking the event\n// queue.\n\n\n#import <Cocoa/Cocoa.h>\n\n#include \"sqUnixMain.h\"\n#include \"sqUnixGlobals.h\"\n\n#include \"sq.h\"\n#include \"sqaio.h\"\n\n#include <unistd.h>\n#include <stdlib.h>\n#include <stdarg.h>\n#include <stdio.h>\n#include <string.h>\n#include <sys/param.h>\n#include <sys/types.h>\n#include <sys/stat.h>\n#include <sys/socket.h>\n#include <sys/ioctl.h>\n#include <fcntl.h>\n#include <pthread.h>\n#include <sched.h>\n\n#include \"debug.h\"\n\n#include \"config.h\"\n#undef HAVE_GL_GL_H\n#include \"SqDisplay.h\"\n\n\n/// \n/// Things you can tweak, if you're curious/bored enough to want to...\n/// \n\n// do we draw the current screen extent (width x height) in the title\n// bar during live resize?\n// \n#define\tRESIZE_IN_TITLE\t 1\n\n// how large a (square) area, in the lower right of the window, should\n// respond to mouse down by initiating window resize?  (the resize\n// icon itself is, when we allow it to be shown, 13x13 pixels.)\n// \n#define\tRESIZE_EXTENT\t 8\n\n// do we fade the screen out and back in gently when changing to\n// fullscreen mode, or just switch with one big violent click?  if\n// this is defined then it represents the incr/decrement per\n// millisecond of the gamma multiplier (1.0 to 0.0 and back); if\n// undefined then the switch is immediate.\n// \n#undef\tFULLSCREEN_FADE\t 0.02\n\n/// \n/// No more user-serviceable parts in this file.  Stop Tweaking Now!\n/// \n\n\nstatic inline int min(int x, int y) { return x < y ? x : y; }\nstatic inline int max(int x, int y) { return x > y ? x : y; }\n\n\n@interface Squeak : NSApplication\n- (void) applicationDidFinishLaunching: (NSNotification *)note;\n- (void) applicationDidChangeScreenParameters: (NSNotification *)note;\n- (void) unhideAllApplications: (id)sender;\n- (BOOL) windowShouldClose: (id)sender;\n- (void) maybeTerminate: (id)sender;\n- (void) terminate: (id)sender;\n- (void) performEnableKeys: (id)sender;\n- (void) performDisableKeys: (id)sender;\n@end\n\n\n@interface SqueakWindow : NSWindow\n{\n  NSImage *icon;\n}\n- (BOOL) isOpaque;\n- (BOOL) canBecomeKeyWindow;\n- (void) setIcon;\n- (void) performMiniaturize: (id)sender;\n- (void) miniaturize: (id)sender;\n@end\n\n\n// Why QDView?  Well...\n// \n//   1) we can trivially obtain a raw pointer to its backing store, so\n//   2) no need to putz around with the lockFocus/DataProvider/ImageRep crap; plus\n//   3) its buffer's coordinate system is already the right way up for Squeak, so\n//   4) we avoid potential recopy (just to have CG recopy again); besides\n//   5) QDFlushBuffer is _blindingly_ fast (even compared to drawing directly on\n//      the framebuffer [go measure it if you don't believe me]); but most importantly\n//   6) the QD API is completely free of ObjC and attendant inefficiencies.\n\n@interface SqueakView : NSQuickDrawView\n- (BOOL) acceptsFirstResponder;\n- (BOOL) becomeFirstResponder;\n- (BOOL) isOpaque;\n- (BOOL) isFlipped;\n- (id)   initWithFrame: (NSRect)frame;\n- (void) setFrame: (NSRect)rect;\n- (void) drawRect: (NSRect)rect;\n- (void) viewWillStartLiveResize;\n- (void) viewDidEndLiveResize;\n- (int)  draggingEntered: (id<NSDraggingInfo>)sender;\n- (int)  draggingUpdated: (id<NSDraggingInfo>)sender;\n- (void) draggingExited: (id<NSDraggingInfo>)sender;\n- (BOOL) performDragOperation: (id<NSDraggingInfo>)sender;\n@end\n\n\nstatic SqueakView\t*view\t    = 0; /* app view (occupies topRect)\t\t */\n\n\n@interface TopView : NSView\n- (void) setFrame: (NSRect)rect;\n@end\n\n@implementation TopView\n- (void) setFrame: (NSRect)rect\n{\n  [super setFrame: rect];\n  if (view)\n    [view setFrame: rect];\n}\n@end\n\n\nstatic int\t\t styleMask  = 0; /* window style mask\t\t\t*/\nstatic int\t\t dragCount  = 0; /* number of items during drag/drop\t*/\nstatic int\t\t showExtent = 0; /* 1 if title bar shows view extent\t*/\n       int\t\t inModalLoop= 0; /* 1 when WS is in tracking loop\t*/\nstatic int\t\t active     = 0; /* 1 when app window is active\t\t*/\n\n//static CFArrayRef\t   dpyModes   = 0; /* one of these days... */\n\nstatic CGDirectDisplayID dpy\t    = 0;\nstatic NSDictionary\t*dpyMode    = 0;\nstatic int\t\t dpyWidth   = 0;\nstatic int\t\t dpyHeight  = 0;\nstatic int\t\t dpyDepth   = 0;\n       char\t\t*dpyPixels  = 0;\n       int\t\t dpyPitch   = 0;\n\nstatic SqueakWindow\t*win\t    = 0; /* main application window\t\t */\nstatic NSRect\t\t topRect;\t /* main window frame (excl. decoration) */\nstatic NSRect\t\t titleRect;\t /* decoration area (above topRect)\t */\nstatic NSRect\t\t resizeRect;\t /* area sensitive to resize\t\t */\n\nstatic TopView\t\t*topView    = 0; /* top view (occupies topRect)\t\t */\n\nstatic char\t\t*pixBase    = 0;\nstatic int\t\t pixPitch   = 0;\nstatic int\t\t pixWidth   = 0; /* pixmap width (pixels)\t\t */\nstatic int\t\t pixHeight  = 0; /* pixmap height\t\t\t */\nstatic RgnHandle\t pixRegion  = 0;\n\nstatic int\t\t cmdKeys    = 0; /* 1 if app command keys enabled\t */\nstatic int\t\t fromFinder = 0; /* 1 if app launched from finder\t */\nstatic int\t\t noTitle    = 0; /* 1 if app window is undecorated\t */\nstatic int\t\t headless   = 0; /* 1 if app has no window\t\t */\nstatic int\t\t noDock     = 0; /* 1 if app window is undocked\t\t */\nstatic int\t\t fullscreen = 0; /* 1 if window fullscreen and on top\t */\n\nstatic int\t\t stXfd\t    = -1;\nstatic int\t\t osXfd\t    = -1;\n\nstatic pthread_mutex_t\t displayMx  = PTHREAD_MUTEX_INITIALIZER;\n\nstatic char\t\t resourcePath[MAXPATHLEN];\n\nstatic int  glActive= 0;\nstatic void reframeRenderers(void);\nstatic void updateRenderers(void);\n\n\n\n#if 1 //xxx REMOVE ME\n\n#define RED\t0xff0000\n#define GREEN\t0x00ff00\n#define BLUE\t0x0000ff\n#define WHITE\t0xffffff\n#define BLACK\t0x000000\n\nvoid feedback(int offset, int pixel)\n{\n  const int width= 4, height= 4;\n  long *base=  CGDisplayBaseAddress(dpy);\n  int   pitch= CGDisplayBytesPerRow(dpy);\n  int x, y;\n\n  base= base + width * offset;\n\n  for (y= 0; y < height; ++y)\n    {\n      for (x= 0; x < width; ++x)\n\tbase[x]= pixel;\n      base= (long *)((char *)base + pitch);\n    }\n}\n\n#endif\n\n\n//xxx FIXME SOON: check all uses of lock() and conditionalise the\n//  sections where failure could cause SEGV (rather than just\n//  inconsistent geometry or whatever)\n\nstatic int doLock(pthread_mutex_t *mx, char *who)\n{\n  static char *owner= \"<none>\";\n  int backoff, i= 0;\n  // wait about 1 second before giving up (10000 == timeslice quantum)\n  for (backoff= 10000;  backoff < 1280000;  ++i, backoff <<= 1)\n    if (0 == pthread_mutex_trylock(mx))\n      {\n\towner= who;\n\treturn 1;\n      }\n    else\n      {\n#      ifndef NDEBUG\n\tfprintf(stderr, \"lock %d: %s waiting for %-20s\\n\", i, who, owner);\n#      endif\n\tusleep(backoff);\n      }\n  perror(\"pthread_mutex_trylock\");\n  return 0;\n}\n\nstatic void doUnlock(pthread_mutex_t *mx)\n{\n  if (pthread_mutex_unlock(mx))\n    perror(\"pthread_mutex_unlock\");\n}\n\n\n#define lock(MX)\tdoLock(&MX##Mx, __FUNCTION__)\n#define unlock(MX)\tdoUnlock(&MX##Mx)\n\n\n#include \"sqUnixEvent.c\"\n\n\n\n//xxx FIXME: this is currently monochrome\n\nstatic int display_ioFormPrint(int bitsAddr, int width, int height, int depth,\n\t\t\t       double hScale, double vScale, int landscapeFlag)\n{\n  //xxx hScale and vScale are ppi.  is there a way to use this\n  // meaningfully with PrintInfo or NSPrinter?\n\n  NSAutoreleasePool *pool= [[NSAutoreleasePool alloc] init];\n  int opp=     depth / 8;\n  int success= 1;\n\n  DPRINTF((\"ioFormPrint %f %f\\n\", hScale, vScale));\n  {\n    unsigned char    *planes[1]= { (char *)bitsAddr };\n    NSBitmapImageRep *bitmap= \t 0;\n    NSImage\t     *image=  \t 0;\n    NSImageView\t     *view=   \t 0;\n\n    bitmap= [[NSBitmapImageRep alloc]\n\t      initWithBitmapDataPlanes: planes\n\t      pixelsWide:\t\twidth\n\t      pixelsHigh:\t\theight\n\t      bitsPerSample:\t\tdepth\n\t      samplesPerPixel:\t\t1\n\t      hasAlpha:\t\t\tNO\n\t      isPlanar:\t\t\tNO\n\t      colorSpaceName:\t\tNSCalibratedBlackColorSpace\n\t      bytesPerRow:\t\twidth * opp\n\t      bitsPerPixel:\t\tdepth];\n    if (!bitmap) { DPRINTF((\"bitmap fail\\n\")); success= 0; goto done; }\n    image= [NSImage alloc];\n    //[image setSize: NSMakeSize(width, height)];\n    [image addRepresentation: bitmap];\n    if (!image) { DPRINTF((\"image fail\\n\")); success= 0; goto done; }\n    view= [[NSImageView alloc] initWithFrame: NSMakeRect(0, 0, width, height)];\n    [view setImage: image];\n    {\n      NSPrintOperation *op=  [NSPrintOperation printOperationWithView: view];\n      [op setShowPanels: YES];\n      DPRINTF((\"launch print operation\\n\"));\n      [op runOperation];\n    }\n  }\n\n done:\n  DPRINTF((\"ioFormPrint done.\\n\"));\n  [pool release];\n  return success;\n}\n\n\nstatic int display_ioBeep(void)\n{\n  NSBeep();\n  return 0;\n}\n\n\nstatic int display_ioRelinquishProcessorForMicroseconds(int microSeconds)\n{\n  return aioPoll(microSeconds);\n}\n\n\n\n///\n/// events\n/// \n\n\nstatic unsigned int qz2sqModifiers(unsigned int qz)\n{\n  return\n    ( ((qz & (NSShiftKeyMask | NSAlphaShiftKeyMask)) ? ShiftKeyBit   : 0))\n    | ((qz &  NSControlKeyMask)\t\t\t     ? CtrlKeyBit    : 0)\n    | ((qz &  NSAlternateKeyMask)\t\t     ? OptionKeyBit  : 0)\n    | ((qz &  NSCommandKeyMask)\t\t\t     ? CommandKeyBit : 0);\n}\n\nstatic unsigned int qz2sqButton(unsigned int button)\n{\n#if 0\n  // the image has blue and yellow back-to-front.  fix that here...\n  switch (button)\n    {\n    case 0: return RedButtonBit;\n    case 1: return (swapBtn ? YellowButtonBit : BlueButtonBit);\n    case 2: return (swapBtn ? BlueButtonBit   : YellowButtonBit);\n    }\n  DPRINTF((\"unknown mouse button %d\\n\", button));\n#endif\n  return RedButtonBit;\n}\n\n\n// there appears to be no way to persuade OSX to do multi key\n// composition for us without entirely relinquishing control of\n// events...\n\n#define makeMap(name, A,E,I,N,O,U,Y,a,e,i,n,o,u,y)\t\\\nstatic int name##Map(int key)\t\t\t\t\\\n{\t\t\t\t\t\t\t\\\n  switch (key)\t\t\t\t\t\t\\\n    {\t\t\t\t\t\t\t\\\n    case 'A': return A;\t\t\t\t\t\\\n    case 'E': return E;\t\t\t\t\t\\\n    case 'I': return I;\t\t\t\t\t\\\n    case 'N': return N;\t\t\t\t\t\\\n    case 'O': return O;\t\t\t\t\t\\\n    case 'U': return U;\t\t\t\t\t\\\n    case 'Y': return Y;\t\t\t\t\t\\\n    case 'a': return a;\t\t\t\t\t\\\n    case 'e': return e;\t\t\t\t\t\\\n    case 'i': return i;\t\t\t\t\t\\\n    case 'n': return n;\t\t\t\t\t\\\n    case 'o': return o;\t\t\t\t\t\\\n    case 'u': return u;\t\t\t\t\t\\\n    case 'y': return y;\t\t\t\t\t\\\n    }\t\t\t\t\t\t\t\\\n  return 0;\t\t\t\t\t\t\\\n}\n\nmakeMap(acute,\t\t0347, 0203, 0352, 0000, 0356, 0362, 0000, 0207, 0216, 0222, 0000, 0227, 0234, 0000);\nmakeMap(grave,\t\t0313, 0351, 0355, 0000, 0361, 0364, 0000, 0210, 0217, 0223, 0000, 0230, 0235, 0000);\nmakeMap(circumflex,\t0345, 0346, 0353, 0000, 0357, 0363, 0000, 0211, 0220, 0224, 0000, 0231, 0236, 0000);\nmakeMap(tilde,\t\t0314, 0000, 0000, 0204, 0315, 0000, 0000, 0213, 0000, 0000, 0226, 0233, 0000, 0000);\nmakeMap(umlaut,\t\t0200, 0350, 0354, 0000, 0205, 0206, 0331, 0212, 0221, 0225, 0000, 0232, 0237, 0330);\n\n#undef makeMap\n\nstatic int (*accentMap)(int)= 0;\n\n\nstatic int characterCodeFromEvent(NSEvent *event)\n{\n  static int fnKeys[256], keyMapInited= NO;\n  char theCharacter= 0;\n  int keyFlags= [event modifierFlags];\n  if (!keyMapInited)\n    {\n      int i;\n      memset(fnKeys, 0, sizeof fnKeys);\n      for (i= 0;  i < 4;  ++i)\n\tfnKeys[i]= 28 + (i^2);\n      fnKeys[0x28]= 127;\n      fnKeys[0x29]= 1;\n      fnKeys[0x2b]= 4;\n      fnKeys[0x2c]= 11;\n      fnKeys[0x2d]= 12;\n      keyMapInited= YES;\n    }\n  if ([[event characters] cStringLength] == 1)\n    {\n      [[event characters] getCString: &theCharacter maxLength: 1];\n      if (theCharacter == 127)\n\ttheCharacter= 8;\n      if (theCharacter == '.' && keyFlags & NSCommandKeyMask)\n\t{\n\t  setInterruptPending(1);\n\t  setInterruptCheckCounter(0);\n        }\n      printf(\"character %d %x\\n\", theCharacter, theCharacter);\n    }\n  else\n    {\n      unichar codes[32];\n      NSRange zeroToOne= { 0, [[event characters] length] };\n      [[event characters] getCharacters: &codes[0] range: zeroToOne];\n      printf(\"unichar %d %x\\n\", codes[0], codes[0]);\n      if (codes[0] >> 8 == 0xf7)\n\t{\n\t  theCharacter= fnKeys[codes[0] & 0xff];\n\t  printf(\"  => %d %x\\n\", theCharacter, theCharacter);\n\t}\n    }\n  return theCharacter;\n}\n\n\n\nstatic unsigned int qz2sqKey(NSEvent *event)\n{\n  NSAutoreleasePool *pool=  [[NSAutoreleasePool alloc] init];\n  NSString\t    *chars= [event characters];\n  NSData\t    *data=  [chars dataUsingEncoding: NSMacOSRomanStringEncoding allowLossyConversion: NO];\n  int keyCode= 0;\n\n# define returnKey(N)\tkeyCode= (N);  goto done\n\n  characterCodeFromEvent(event);\n\n  if ([data length])\n    {\n      keyCode= ((unsigned char *)[data bytes])[0];\n      //printf(\"data keyCode %d\\n\", keyCode);\n      if (accentMap)\n\t{\n\t  unsigned char alt= accentMap(keyCode);\n\t  //printf(\"data alt %d\\n\", alt);\n\t  if (alt)\n\t    keyCode= alt;\n\t  if (NSKeyUp == [event type])\n\t    accentMap= 0;\n\t}\n      if (keyCode == 127)\n\tkeyCode= 8;\n      goto done;\n    }\n\n  if ([chars length])\n    {\n      keyCode= [chars characterAtIndex: 0];\n      switch (keyCode)\n\t{\n\tcase 127:\t// this is not up for discussion.  PERIOD.\n\tcase NSDeleteFunctionKey:\treturnKey( 8);\n\tcase NSUpArrowFunctionKey:\treturnKey(30);\n\tcase NSDownArrowFunctionKey:\treturnKey(31);\n\tcase NSLeftArrowFunctionKey:\treturnKey(28);\n\tcase NSRightArrowFunctionKey:\treturnKey(29);\n\tcase NSHomeFunctionKey:\t\treturnKey( 1);\n\tcase NSEndFunctionKey:\t\treturnKey( 4);\n\tcase NSPageUpFunctionKey:\treturnKey(11);\n\tcase NSPageDownFunctionKey:\treturnKey(12);\n\t  /* -- these should probably be implemented --\n\t     NSClearLineFunctionKey\tClear/Num Lock\n\t     NSHelpFunctionKey\t\tHelp\n\t     -- the rest are missing on most mac keyboards --\n\t     NSBeginFunctionKey\t\tBegin\n\t     NSPrintScreenFunctionKey\tPrint Screen\n\t     NSScrollLockFunctionKey\tScroll Lock\n\t     NSPauseFunctionKey\t\tPause\n\t     NSSysReqFunctionKey\tSystem Request\n\t     NSBreakFunctionKey\t\tBreak\n\t     NSResetFunctionKey\t\tReset\n\t     NSStopFunctionKey\t\tStop\n\t     NSMenuFunctionKey\t\tMenu\n\t     NSUserFunctionKey\t\tUser\n\t     NSSystemFunctionKey\tSystem\n\t     NSPrintFunctionKey\t\tPrint\n\t     NSClearDisplayFunctionKey\tClear Display\n\t     NSInsertLineFunctionKey\tInsert Line\n\t     NSDeleteLineFunctionKey\tDelete Line\n\t     NSInsertCharFunctionKey\tInsert Character\n\t     NSDeleteCharFunctionKey\tDelete Character\n\t     NSPrevFunctionKey\t\tPrevious\n\t     NSNextFunctionKey\t\tNext\n\t     NSSelectFunctionKey\tSelect\n\t     NSExecuteFunctionKey\tExecute\n\t     NSUndoFunctionKey\t\tUndo\n\t     NSRedoFunctionKey\t\tRedo\n\t     NSFindFunctionKey\t\tFind\n\t     NSModeSwitchFunctionKey\tMode Switch\n\t  */\n\t}\n      if (keyCode & 0xff00)\n\tkeyCode= 0;\n    }\n\n  if (keyCode)\n    goto done;\n\n  if (NSAlternateKeyMask == [event modifierFlags])\n    {\n      int key, type;\n      chars= [event charactersIgnoringModifiers];\n      key=   [chars characterAtIndex: 0];\n      type=  [event type];\n      //printf(\"chars key %d\\n\", key);\n      switch (key)\n\t{\n#       define mapAccent(code,name) \\\n\t  /*printf(#name\"'n\");*/ if (accentMap) keyCode= code; else if (NSKeyUp == type) accentMap= name##Map\n\tcase 'e': mapAccent(0253, acute);\tbreak;\n\tcase 'i': mapAccent(0366, circumflex);\tbreak;\n\tcase 'u': mapAccent(0254, umlaut);\tbreak;\n\tcase '`': mapAccent(0140, grave);\tbreak;\n\tcase 'n': mapAccent(0367, tilde);\tbreak;\n#\tundef mapAccent\n\t}\n    }\n\n done:\n  [pool release];\n\n  //printf(\"KEY %d\\n\", keyCode);\n  return keyCode;\n}\n\n\n\nstatic inline void noteMousePoint(NSPoint loc)\n{\n  int x= (int)loc.x;\n  int y= (int)topRect.size.height - (int)loc.y;\n  // mouse motion/up is tracked outside of topRect when active, so\n  // clamp it explicitly\n  // (note: there's a race here, but it's benign)\n  mousePosition.x= max(0, min(x, pixWidth  - 1));\n  mousePosition.y= max(0, min(y, pixHeight - 1));\n}\n\n\nstatic void evtHandler(int fd, void *data, int flags)\n{\n  for (;;)\n    {\n      sqInputEvent evt;\n      int n= read(fd, (void *)&evt, sizeof(evt));\n      if (n < 0)\n\t{\n\t  if ((EINTR == errno) || (EAGAIN == errno))\n\t    break;\n\t  perror(\"evtHandler: read\");\n\t}\n      else if (n == 0)\n\tbreak;\n      else if (n != sizeof(evt))\n\tfprintf(stderr, \"evtHandler: read returned %d -- why?\\n\", n);\n      else\n\t{\n\t  sqInputEvent *evp= allocateInputEvent(0);\n\t  *evp= evt;\n\t  signalInputEvent();\n\t}\n    }\n  aioHandle(fd, evtHandler, AIO_RX);\n}\n\n\nstatic void sendEvent(sqInputEvent *evt)\n{\n  if (inModalLoop)    //xxx there are other ways to escape from one of these\n    inModalLoop= 0;\n  if (sizeof(*evt) != write(osXfd, evt, sizeof(*evt)))\n    perror(\"sendEvent: write\");\n}\n\n\nstatic int makeButtonState(void)\n{\n  int btn= buttonState;\n  int mod= modifierState;\n  if (btn == RedButtonBit)\n    switch (mod)\n      {\n      case OptionKeyBit:\tbtn= YellowButtonBit;\tmod= 0;\tbreak;\n      case CommandKeyBit:\tbtn= BlueButtonBit;\tmod= 0;\tbreak;\n      }\n  return (mod << 3) | btn;\n}\n\n\nstatic void noteMouseEvent(void)\n{\n  int state= makeButtonState();\n  sqMouseEvent evt;\n  evt.type= EventTypeMouse;\n  evt.timeStamp= ioMSecs();\n  evt.x= mousePosition.x;\n  evt.y= mousePosition.y;\n  evt.buttons= (state & 0x7);\n  evt.modifiers= (state >> 3);\n  evt.reserved1= 0;\n  evt.reserved2= 0;\n#ifdef DEBUG_EVENTS\n  printf(\"EVENT: mouse (%d,%d)\", mousePosition.x, mousePosition.y);\n  printModifiers(state >> 3);\n  printButtons(state & 7);\n  printf(\"\\n\");\n#endif\n  sendEvent((sqInputEvent *)&evt);\n}\n\n\nstatic void noteKeyboardEvent(int keyCode, int pressCode, int modifiers)\n{\n  sqKeyboardEvent evt;\n  evt.type= EventTypeKeyboard;\n  evt.timeStamp= ioMSecs();\n  evt.charCode= keyCode;\n  evt.pressCode= pressCode;\n  evt.modifiers= modifiers;\n  evt.reserved1= 0;\n  evt.reserved2= 0;\n  evt.reserved3= 0;\n#ifdef DEBUG_EVENTS\n  printf(\"EVENT: keyboard\");\n  printModifiers(modifiers);\n  printKey(keyCode);\n  printf(\"\\n\");\n#endif\n  sendEvent((sqInputEvent *)&evt);\n}\n\n\nstatic void noteDragEvent(int dragType, int numFiles)\n{\n  int state= makeButtonState();\n  sqDragDropFilesEvent evt;\n  evt.type= EventTypeDragDropFiles;\n  evt.timeStamp= ioMSecs();\n  evt.dragType= dragType;\n  evt.x= mousePosition.x;\n  evt.y= mousePosition.y;\n  evt.modifiers= (state >> 3);\n  evt.numFiles= numFiles;\n  evt.reserved1= 0;\n  sendEvent((sqInputEvent *)&evt);\n}\n\n\nstatic int display_ioProcessEvents(void)\n{\n  return aioPoll(0);\n}\n\n\nstatic int display_ioScreenDepth(void)\n{\n  return headless ? 1 : dpyDepth;\n}\n\nstatic int display_ioScreenSize(void)\n{\n  int size;\n  if (headless)\n    return ((16 << 16) | 16);\n  lock(display);\n  size= getSavedWindowSize();\n  unlock(display);\n  return size;\n}\n\n\nstatic int display_ioSetCursorWithMask(int cursorBitsIndex, int cursorMaskIndex,\n\t\t\t\t       int offsetX, int offsetY)\n{\n  if (headless)\n    return 0;\n\n  if ([view lockFocusIfCanDraw])\n    {\n      NSAutoreleasePool *pool= [[NSAutoreleasePool alloc] init];\n      NSBitmapImageRep *bitmap= 0;\n      NSImage          *image=  0;\n      NSCursor         *cursor= 0;\n\n      if (cursorMaskIndex == 0)\n\tcursorMaskIndex= cursorBitsIndex;\n\n      bitmap= [[NSBitmapImageRep alloc]\n\t\tinitWithBitmapDataPlanes: 0 pixelsWide: 16 pixelsHigh: 16\n\t\tbitsPerSample: 1 samplesPerPixel: 2\n\t\thasAlpha: YES isPlanar: YES\n\t\tcolorSpaceName: NSCalibratedBlackColorSpace\n\t\tbytesPerRow: 2\n\t\tbitsPerPixel: 0];\n      {\n\tunsigned char *planes[5];\n\t[bitmap getBitmapDataPlanes: planes];\n\t{\n\t  unsigned char *data= planes[0];\n\t  unsigned char *mask= planes[1];\n\t  int            i;\n\n\t  for (i= 0; i < 16; ++i)\n\t    {\n\t      unsigned int word= ((unsigned int *)cursorBitsIndex)[i];\n\t      data[i*2 + 0]= (word >> 24) & 0xFF;\n\t      data[i*2 + 1]= (word >> 16) & 0xFF;\n\t      word= ((unsigned int *)cursorMaskIndex)[i];\n\t      mask[i*2 + 0]= (word >> 24) & 0xFF;\n\t      mask[i*2 + 1]= (word >> 16) & 0xFF;\n\t    }\n\t}\n      }\n      image= [[NSImage alloc] init];\n      [image addRepresentation: bitmap];\n      {\n\tNSPoint hotSpot= { -offsetX, -offsetY };\n\tcursor= [[NSCursor alloc] initWithImage: image hotSpot: hotSpot];\n      }\n      [cursor set];\n      [pool release];\n      [view unlockFocus];\n    }\n  return 1;\n}\n\n#if 0\nstatic int display_ioSetCursor(int cursorBitsIndex, int offsetX, int offsetY)\n{\n  return ioSetCursorWithMask(cursorBitsIndex, cursorBitsIndex, offsetX, offsetY);\n}\n#endif\n\n\nstatic int display_ioForceDisplayUpdate(void)\n{\n  return 0;\n}\n\n\n#if 0\n\nstatic void setRects(int w, int h)\n{\n  DPRINTF((\"setRects %d %d\\n\", w, h));\n  topRect= NSMakeRect(0,0, w,h);\n  if (fullscreen)\n    {\n      titleRect=  NSMakeRect(0, dpyHeight, dpyWidth, 0);\n      resizeRect= NSMakeRect(dpyWidth, 0, 0, 0);\n    }\n  else\n    {\n      void *port= [view qdPort];\n      titleRect  = [NSWindow frameRectForContentRect: topRect styleMask: styleMask];\n      titleRect.origin.y += h;\n      titleRect.size.height -= h;\n      resizeRect= NSMakeRect(pixWidth - RESIZE_EXTENT, 0, RESIZE_EXTENT, RESIZE_EXTENT);\n      if (port)\t// no port while window is deferred\n\t{\n\t  PixMapHandle pix;\n\t  LockPortBits(port);\n\t  {\n\t    pix      = GetPortPixMap(port);\n\t    pixPitch = GetPixRowBytes(pix);\n\t    pixBase  = ((char *)GetPixBaseAddr(pix)\n\t\t\t+ ((int)titleRect.size.height * pixPitch));\n\t  }\n\t  UnlockPortBits(port);\n\t}\n    }\n  setSavedWindowSize((w << 16) | h);\t// assume this is atomic\n}\n\n#endif\n\n\nstatic char *updatePix(void)\n{\n  void *port= [view qdPort];\n  assert(win);  assert(topView);  assert(view);\n  if (port)\t// no port while window is deferred\n    {\n      int w, h;\n      NSRect winRect= [win frame];\n      winRect.origin= NSMakePoint(0, 0);\t// window coordinates\n      topRect= [NSWindow contentRectForFrameRect: winRect styleMask: styleMask];\n      DPRINTF((\"updatePix w=%d h=%d\\n\", (int)NSWidth(topRect), (int)NSHeight(topRect)));\n      w= NSWidth(topRect);\n      h= NSHeight(topRect);\n      setSavedWindowSize((w << 16) | h);\t\t\t// assume this is atomic\n      if (fullscreen)\n\t{\n\t  titleRect=  NSMakeRect(0, dpyHeight, dpyWidth, 0);\t// empty & offscreen\n\t  resizeRect= NSMakeRect(dpyWidth, 0, 0, 0);\t\t// empty & offscreen\n\t}\n      else\n\t{\n\t  titleRect= winRect;\n\t  titleRect.origin.y    += h;\n\t  titleRect.size.height -= h;\n\t  resizeRect= NSMakeRect(w - RESIZE_EXTENT, 0, RESIZE_EXTENT, RESIZE_EXTENT);\n\t}\n      pixWidth= w;\n      pixHeight= h;\n      LockPortBits(port);\n      {\n\tPixMapHandle pix= GetPortPixMap(port);\n\tpixPitch= GetPixRowBytes(pix);\n\tassert(pixPitch);\n\tassert(pixPitch >= w * 4);\t\t\t\t//xxx FIXME for 16-bit depth\n\tpixBase= ((char *)GetPixBaseAddr(pix) + ((int)NSHeight(titleRect) * pixPitch));\n\tassert(pixBase);\n      }\n      UnlockPortBits(port);\n    }\n  else\n    {\n      DPRINTF((\"updatePix: NO PORT!\\n\"));\n      pixBase= 0;\n    }\n  DPRINTF((\"pixBase %p, width %d, height %d, pitch %d\\n\", pixBase, pixWidth, pixHeight, pixPitch));\n  return pixBase;\n}\n\n\n\n#define bytesPerLine(width, depth)\t((((width)*(depth) + 31) >> 5) << 2)\n\nstatic int display_ioShowDisplay(int dispBitsIndex, int width, int height, int depth,\n\t\t\t\t int affectedL, int affectedR, int affectedT, int affectedB)\n{\n  int   affectedW, affectedH;\n\n  if (headless\n      || (width != pixWidth) || (width < 1) || (height != pixHeight) || (height < 1)\n      || ((!pixBase) && !updatePix())\n      || (![view lockFocusIfCanDraw]))\n    return 0;\n\n  lock(display);\n  affectedR= min(affectedR, min(width,  pixWidth ));\n  affectedB= min(affectedB, min(height, pixHeight));\n  affectedW= affectedR - affectedL;\n  affectedH= affectedB - affectedT;\n  if ((affectedW > 0) && (affectedH > 0))\n    {\n      int   opp=\tdepth / 8;\t// octets per pixel\n      char *out=\tpixBase;\n      int   outPitch=\tpixPitch;\n      void *port=\t[view qdPort];\n      LockPortBits(port);\n      //xxx FIXME SOON: cope with dpy depth mismatch (share the code\n      // used by the other types of Unix display)\n      {\n\tint   pitch= bytesPerLine(width, depth);\n\tchar *in=    (char *)dispBitsIndex + affectedL * opp + affectedT * pitch;\n\tint   lines= affectedH;\n\tint   bytes= affectedW * opp;\n\n\tout += (affectedL * opp) + (affectedT * outPitch);\n\n\tif ((bytes == pitch) && (bytes == outPitch))\n\t  memcpy(out, in, bytes * lines);\n\telse if (bytes < 9) // empirical\n\t  while (lines--)\n\t    {\n\t      register char *to=    out;\n\t      register char *from=  in;\n\t      register int   count= bytes;\n\t      while (count--)\n\t\t*to++= *from++;\n\t      in  += pitch;\n\t      out += outPitch;\n\t    }\n\telse\n\t  while (lines--)\n\t    {\n\t      memcpy((void *)out, (void *)in, bytes);\n\t      in  += pitch;\n\t      out += outPitch;\n\t    }\n      }\n      SetRectRgn(pixRegion, affectedL, affectedT, affectedR, affectedB);\n      QDFlushPortBuffer([view qdPort], pixRegion);\n      UnlockPortBits(port);\n    }\n  unlock(display);\n  [view unlockFocus];\n\n  return 0;\n}\n\n\n#if 0\n\nstatic void display_ioFlushDisplay(void)\n{\n  void *port;\n  lock(display);\n  port= [view qdPort];\n  LockPortBits(port);\n  SetRectRgn(pixRegion, 0, 0, pixWidth, pixHeight);\n  QDFlushPortBuffer([view qdPort], pixRegion);\n  UnlockPortBits(port);\n  unlock(display);\n}\n\n#endif\n\nstatic int display_ioHasDisplayDepth(int i)\n{\n  return i == (headless ? 1 : dpyDepth);\n}\n\nstatic int display_ioSetDisplayMode(int width, int height, int depth, int fullscreenFlag)\n{\n  if (headless)\n    return 0;\n\n  printf(\"ioSetDisplayMode: IMPLEMENT ME\\n\");\n  return ((width == dpyWidth) && (height == dpyHeight) && (depth == dpyDepth));\n}\n\n\nstatic void *display_ioGetDisplay(void)\n{\n  if (headless)\n    return 0;\n\n  DPRINTF((\"ioGetDisplay: WARNING: check the client to see it knows what it's doing\\n\"));\n  return dpy;\n}\n\nstatic void *display_ioGetWindow(void)\n{\n  if (headless)\n    return 0;\n\n  printf(\"ioGetWindow: WARNING: check the client to see it knows what it's doing\\n\");\n  return 0;\n}\n\n\nstatic char *clipboard= 0;\n\n\nstatic int display_clipboardWriteFromAt(int count, int byteArrayIndex, int startIndex)\n{\n  NSAutoreleasePool *pool=   [[NSAutoreleasePool alloc] init];\n  NSPasteboard      *pboard= [NSPasteboard generalPasteboard];\n  NSString          *string= [NSString\n\t\t\t       stringWithCString: (char *)byteArrayIndex + startIndex\n\t\t\t       length:            count];\n  [pboard declareTypes: [NSArray arrayWithObject: NSStringPboardType] owner: nil];\n  [pboard setString: string forType: NSStringPboardType];\n  [pool release];\n  return 0;\n}\n\n\nstatic int display_clipboardSize(void)\n{\n  NSAutoreleasePool *pool=   [[NSAutoreleasePool alloc] init];\n  NSPasteboard      *pboard= [NSPasteboard generalPasteboard];\n  NSString          *type=   [pboard availableTypeFromArray:\n\t\t\t\t       [NSArray arrayWithObject:\n\t\t\t\t\t\t  NSStringPboardType]];\n  if (clipboard) free(clipboard);\n  clipboard= 0;\n  if (type != nil)\n    {\n      NSString *contents= [pboard stringForType: type];\n      if (contents != nil)\n\tclipboard= strdup([contents cString]);\n    }\n  [pool release];\n  return clipboard ? strlen(clipboard) : 0;\n}\n\n\nstatic int display_clipboardReadIntoAt(int count, int byteArrayIndex, int startIndex)\n{\n  if (clipboard)\n    {\n      strncpy((char *)byteArrayIndex + startIndex, clipboard, count);\n      return count;\n    }\n  return 0;\n}\n\n\n\nstatic void display_winExit(void)\n{\n  [win close];\n}\n\n\nstatic void display_winSetName(char *title)\n{\n  char *base= strrchr(title, '/');\n  if (base) title= base + 1;\n#if (RESIZE_IN_TITLE)\n  if (showExtent)\n    {\n      char buf[NAME_MAX];\n      NSRect frame= [view frame];\n      sprintf(buf, \"%s (%dx%d)\", title, (int)NSWidth(frame), (int)NSHeight(frame));\n      title= buf;\n    }\n#endif\n  [win setTitle: [NSString stringWithCString: title]];\n}\n\n\nstatic void  display_parseEnvironment(void) {}\n\nstatic int display_parseArgument(int argc, char **argv)\n{\n  if     (!strncmp(*argv, \"-psn_\", 5))\t\treturn fromFinder= 1;\n  else if (!strcmp(*argv, \"-quartz\"))\t\treturn 1;\n  else if (!strcmp(*argv, \"-fullscreen\"))\treturn fullscreen= 1;\n  else if (!strcmp(*argv, \"-headless\"))\t\treturn headless= 1;\n  else if (!strcmp(*argv, \"-notitle\"))\t\treturn noTitle= 1;\n  else if (!strcmp(*argv, \"-nodock\"))\t\treturn noDock= 1;\n  else if (!strcmp(*argv, \"-swapbtn\"))\t\treturn swapBtn= 1;\n  return 0;\n}\n\nstatic void display_printUsage(void)\n{\n  printf(\"\\nQuartz/Aqua <option>s:\\n\");\n  printf(\"  -fullscreen           occupy the entire screen\\n\");\n  printf(\"  -headless             run in headless (no window) mode\\n\");\n  printf(\"  -nodock               don't show Squeak in the dock\\n\");\n  printf(\"  -notitle              disable the Squeak window title bar\\n\");\n  printf(\"  -swapbtn              swap mouse buttons 2 (yellow) and 3 (blue)\\n\");\n}\n\nstatic void display_printUsageNotes(void)\n{\n  printf(\"  -nodock is only useful with `-headless'.\\n\");\n}\n\n\n/// \n/// window initialization\n/// \n\n\nstatic void menuAddItem(NSMenu *menu, NSString *title, SEL action,\n\t\t\tNSString *key, int opt)\n{\n  NSMenuItem *item= [[NSMenuItem alloc]\n\t\t      initWithTitle: title\n\t\t      action:        action\n\t\t      keyEquivalent: (cmdKeys ? key : @\"\")];\n  [menu addItem: item];\n  if (opt)\n    [item setKeyEquivalentModifierMask: (NSCommandKeyMask | NSAlternateKeyMask)];\n  [item release];\n}\n\nstatic void installMenu(SEL install, NSMenu *menu)\n{\n  NSMenuItem *item= [[NSMenuItem alloc]\n\t\t      initWithTitle: @\"\"\n\t\t      action:\t nil\n\t\t      keyEquivalent: @\"\"];\n  [item setSubmenu: menu];\n  [[NSApp mainMenu] addItem: item];\n  if (install != NULL)\n    {\n      extern id objc_msgSend(id theReceiver, SEL theSelector, ...);\n      objc_msgSend(NSApp, install, menu);\n    }\n  [menu release];\n  [item release];\n}\n\n\n// InterfaceBuilder?  Just Say No!\n\nstatic void setUpMenus(void)\n{\n  if (headless && noDock)\n    return;\n\n  [NSApp setMainMenu: [[NSMenu alloc] init]];\n  {\n    NSMenu *menu= [[NSMenu alloc] initWithTitle: @\"Squeak\"];\n    menuAddItem(menu, @\"About Squeak\",   @selector(performAbout:),          @\"\",  0);\n    [menu addItem: [NSMenuItem separatorItem]];\n    menuAddItem(menu, @\"Preferences...\", @selector(performPreferences:),    @\"y\", 0);\n    [menu addItem: [NSMenuItem separatorItem]];\n    menuAddItem(menu, @\"Hide Squeak\",    @selector(hide:),                  @\"h\", 0);\n    menuAddItem(menu, @\"Hide Others\",    @selector(hideOtherApplications:), @\"h\", 1);\n    menuAddItem(menu, @\"Show All\",       @selector(unhideAllApplications:), @\"\",  0);\n    [menu addItem: [NSMenuItem separatorItem]];\n    menuAddItem(menu, @\"Quit Squeak\",    @selector(terminate:),             @\"q\", 0);\n    installMenu(@selector(setAppleMenu:), menu);\n  }\n  {\n    NSMenu *menu= [[NSMenu alloc] initWithTitle: @\"File\"];\n    menuAddItem(menu, @\"Page Setup...\", @selector(performPageSetup:), @\"P\", 0);\n    menuAddItem(menu, @\"Print\",         @selector(performPrint:),     @\"p\", 0);\n    installMenu(NULL, menu);\n  }\n  {\n    NSMenu *menu= [[NSMenu alloc] initWithTitle: @\"Window\"];\n    menuAddItem(menu, @\"Minimise\", @selector(performMiniaturize:), @\"m\", 0);\n    if (cmdKeys)\n      menuAddItem(menu, @\"Disable Command Keys\",\n\t\t  @selector(performDisableKeys:), @\"k\", 0);\n    else\n      menuAddItem(menu, @\"Enable Command Keys\",\n\t\t  @selector(performEnableKeys:),  @\"\",  0);\n    installMenu(@selector(setWindowsMenu:), menu);\n  }\n  {\n    NSMenu *menu= [[NSMenu alloc] initWithTitle: @\"Help\"];\n    menuAddItem(menu, @\"Squeak Help\", @selector(showHelp:), @\"?\", 0);\n    installMenu(NULL, menu);\n  }\n}\n\n\nstatic void setUpDock(void)\n{\n  typedef struct CPSProcessSerNum { UInt32 lo, hi; } CPSProcessSerNum;\n\n  extern OSErr CPSGetCurrentProcess(CPSProcessSerNum *psn);\n  extern OSErr CPSSetProcessName(CPSProcessSerNum *psn, char *name);\n  extern OSErr CPSEnableForegroundOperation(CPSProcessSerNum *psn,\n\t\t\t\t\t    UInt32 arg1, UInt32 arg2,\n\t\t\t\t\t    UInt32 arg3, UInt32 arg4);\n  extern OSErr CPSSetFrontProcess(CPSProcessSerNum *psn);\n\n  // this was passed to us in argv, but we have to pick it up from CPS\n  // anyway if the VM was started from a command line or script\n  CPSProcessSerNum psn;\n\n  if (headless && noDock)\n    return;\n\n  if ((  CPSGetCurrentProcess(&psn))\n      || CPSSetProcessName(&psn, \"Squeak\") // regardless of the bundle name\n      || CPSEnableForegroundOperation(&psn, 0x03, 0x3c, 0x2c, 0x1103)\n      || CPSSetFrontProcess(&psn))\n    fprintf(stderr, \"the court failed to put Squeak in the dock\\n\");\n}\n\n\nstatic char *display_winSystemName(void)\n{\n  return \"Quartz\";\n}\n\n\nstatic void display_winInit(void)\n{\n  [[NSAutoreleasePool alloc] init];\n  [Squeak sharedApplication];\n  [NSApp setDelegate: NSApp];\n  // from winOpen()...\n  setUpMenus();\n  setUpDock();\n  [NSApp run];\n}\n\n\nstatic void display_winOpen(void) {}\n\n\nstatic void setUpDisplay(void)\n{\n  if (headless)\n    return;\n\n  dpy        = kCGDirectMainDisplay;\n  dpyMode    = (NSDictionary *)CGDisplayCurrentMode(dpy);\n  dpyWidth   = [[dpyMode objectForKey: (id)kCGDisplayWidth] intValue];\n  dpyHeight  = [[dpyMode objectForKey: (id)kCGDisplayHeight] intValue];\n  dpyDepth   = [[dpyMode objectForKey: (id)kCGDisplayBitsPerPixel] intValue];\n  dpyPixels  = CGDisplayBaseAddress(dpy);\n  dpyPitch   = CGDisplayBytesPerRow(dpy);\n\n  pixRegion  = NewRgn();\n\n  DPRINTF((\"display is %dx%dx%d at %p pitch %d\\n\",\n\t   dpyWidth, dpyHeight, dpyDepth, dpyPixels, dpyPitch));\n}\n\n\nstatic void setUpWindow(int fs)\n{\n  if (!headless)\n    {\n      int w, h;\n      NSRect contentRect;\n      if (fs)\n\t{\n\t  w= dpyWidth;\n\t  h= dpyHeight;\n\t}\n      else\n\t{\n\t  int winSize= getSavedWindowSize();\n\t  w= winSize >> 16;\n\t  h= winSize & 0xffff;\n\t}\n      DPRINTF((\"initial winSize %d %d\\n\", w, h));\n      styleMask= (fs\n\t\t  ? (NSBorderlessWindowMask)\n\t\t  : (  NSTitledWindowMask\n\t\t     | NSMiniaturizableWindowMask\n\t\t     | NSResizableWindowMask));\n      //xxx does quartz _really_ have _no_ mechanism to set window bit gravity?!?\n      win= [[SqueakWindow alloc]\n\t     initWithContentRect: NSMakeRect(0,0, w,h)\n\t     styleMask:           styleMask\n\t     backing:             NSBackingStoreBuffered\n\t     defer:               NO];\n      contentRect= [[win contentView] frame];\n      w= NSWidth(contentRect);\n      h= NSHeight(contentRect);\n      setSavedWindowSize((w << 16) | h);\n      view= [[SqueakView alloc] initWithFrame: contentRect];\n      [view setAutoresizingMask: (NSViewWidthSizable | NSViewHeightSizable)];\n      [win setReleasedWhenClosed: YES];\n      [win setAcceptsMouseMovedEvents: YES];\n      [win setShowsResizeIndicator: NO];\n      topView= [[TopView alloc] initWithFrame: contentRect];\n      [win setInitialFirstResponder: view];\n      [win setDelegate: NSApp];\n      [win useOptimizedDrawing: YES];\n      if (fs)\n\t[win setLevel: CGShieldingWindowLevel()];\n      else\n\t{\n\t  [win center];\n\t  [win setIcon];\n\t  display_winSetName(shortImageName);\n\t}\n      [topView addSubview: view];\t[view release];\n      [win setContentView: topView];\t[topView release];\n      [win makeKeyAndOrderFront: nil];\t// need platform window to get pixBase\n    }\n}\n\n\nstatic int\t\t  imageWidth;\nstatic int\t\t  imageHeight;\nstatic char\t\t *imageData;\nstatic CGDataProviderRef  imageDataProvider;\nstatic CGImageRef\t  imageRef;\n\nstatic void cgdpRelease(void *info, const void *data, size_t size) {}\n\nstatic void captureImage(int inverted)\n{\n  imageWidth=  pixWidth;\n  imageHeight= pixHeight;\n  imageData=   (char *)malloc(pixPitch * imageHeight);\n  if (inverted)\n    {\n      char *in= pixBase, *out= imageData + ((imageHeight - 1) * pixPitch);\n      int   y;\n      for (y= pixHeight;  y--;  (in += pixPitch), (out -= pixPitch))\n\tmemcpy(out, in, pixPitch);\n    }\n  else\n    {\n      memcpy(imageData, pixBase, imageHeight * pixPitch);\n    }\n  imageDataProvider=\n    CGDataProviderCreateWithData(0, imageData, pixPitch*imageHeight,\n\t\t\t\t cgdpRelease);\n  imageRef=\n    CGImageCreate(imageWidth, imageHeight, 8, 32, pixPitch,\n\t\t  CGColorSpaceCreateDeviceRGB(),\n\t\t  kCGImageAlphaNoneSkipFirst,\n\t\t  imageDataProvider, 0, 0,\n\t\t  kCGRenderingIntentDefault);\n}\n\n\nstatic void drawImage(CGContextRef cgc, int offset)\n{\n  CGContextDrawImage(cgc, CGRectMake(0, offset, imageWidth, imageHeight), imageRef);\n}\n\n\nstatic void releaseImage(int malloced)\n{\n  CGImageRelease(imageRef);\n  CGDataProviderRelease(imageDataProvider);\n  if (malloced)\n    free(imageData);\n}\n\n  \n#ifdef FULLSCREEN_FADE\n\n// YES, I know there's a CG API to do this.  But it sucks.\n\nstatic struct\n{\n  CGGammaValue r[256], g[256], b[256];\n} dpyGamma;\n\nstatic void fadeOut(float delta)\n{\n  CGGammaValue r[256], g[256], b[256];\n  int sz;\n\n  if ((CGDisplayNoErr == CGGetDisplayTransferByTable\n\t\t\t   (dpy, 256, dpyGamma.r, dpyGamma.g, dpyGamma.b, &sz))\n      && (256 == sz))\n    {\n      float scale;\n      memcpy(r, dpyGamma.r, sizeof(r));\n      memcpy(g, dpyGamma.g, sizeof(g));\n      memcpy(b, dpyGamma.b, sizeof(b));\n      for (scale= 1.0;  scale >= 0.0;  scale -= delta)\n\t{\n\t  int i;\n\t  for (i= 256;  i--;)\n\t    {\n\t      r[i]= dpyGamma.r[i] * scale;\n\t      g[i]= dpyGamma.g[i] * scale;\n\t      b[i]= dpyGamma.b[i] * scale;\n\t    }\n\t  if (CGDisplayNoErr != CGSetDisplayTransferByTable(dpy, 256, r, g, b))\n\t    {\n\t      printf(\"failed to set transfer table\\n\");\n\t      CGDisplayRestoreColorSyncSettings();\n\t      return;\n\t    }\n\t  usleep(10000);\n\t}\n    }\n  else\n    {\n      printf(\"failed to get display transfer table (%d)\\n\", sz);\n    }\n}\n\nstatic void fadeIn(float delta)\n{\n  CGGammaValue r[256], g[256], b[256];\n  float scale;\n  memset(r, 0, sizeof(r));\n  memset(g, 0, sizeof(g));\n  memset(b, 0, sizeof(b));\n  for (scale= 0.0;  scale <= 1.0;  scale += delta)\n    {\n      int i;\n      for (i= 256; i--;)\n\t{\n\t  r[i] = dpyGamma.r[i] * scale;\n\t  g[i] = dpyGamma.g[i] * scale;\n\t  b[i] = dpyGamma.b[i] * scale;\n\t}\n      if (CGDisplayNoErr != CGSetDisplayTransferByTable(dpy, 256, r, g, b))\n\tbreak;\n      usleep(10000);\n    }\n  CGDisplayRestoreColorSyncSettings();\n}\n\n#endif\n\n\n#if 1\n\nstatic int display_ioSetFullScreen(int flag)\n{\n  static int originalWindowSize= 0;\n  SqueakWindow *old;\n\n  printf(\"ioSetFullScreen(%d)\\n\", flag);\n\n  if (headless || (fullscreen == flag))\n    return 0;\t// nothing to do\n  old= win;\n  win= 0;  view= 0;  topView= 0;  pixBase= 0; pixWidth= 0; pixHeight= 0; pixPitch= 0;\n  if (flag)\n    originalWindowSize= getSavedWindowSize();\n  else if (originalWindowSize)\n    setSavedWindowSize(originalWindowSize);\n  setFullScreenFlag(fullscreen= flag);\n  setUpWindow(flag);\n  reframeRenderers();\n  [old close];\n  return 1;\n}\n\n#else\n\nstatic int display_ioSetFullScreen(int flag)\n{\n  static int originalWindowSize= (800 << 16) | 600;\n\n  printf(\"ioSetFullScreen(%d)\\n\", flag);\n\n  if (headless || (fullscreen == flag) || glActive)\n    return 0;\t// nothing to do\n\n  if (flag)\t// switch to fullscreen\n    {\n      CGDisplayHideCursor(dpy);\n#    ifdef FULLSCREEN_FADE\n      captureImage(0);\n      fadeOut(FULLSCREEN_FADE);\n#    endif\n      if (CGDisplayNoErr != CGDisplayCapture(dpy))\n\tDPRINTF((\"failed to capture display\\n\"));\n      else\n\t{\n#        ifdef FULLSCREEN_FADE\n\t  CGContextRef cgc;\n\t  memset(dpyPixels, -1U, dpyPitch * dpyHeight);\n\t  cgc= CGBitmapContextCreate(dpyPixels, dpyWidth, dpyHeight,\n\t\t\t\t     8, dpyPitch,\n\t\t\t\t     CGColorSpaceCreateDeviceRGB(),\n\t\t\t\t     kCGImageAlphaNoneSkipFirst);\n\t  drawImage(cgc, dpyHeight - pixHeight);\n\t  CGContextRelease(cgc);\n#\t endif\n\t  lock(display);\n\t  originalWindowSize= getSavedWindowSize();\n\t  pixWidth=   dpyWidth;\n\t  pixHeight=  dpyHeight;\n\t  fullscreen= 1;\n\t  updatePix();\n\t  unlock(display);\n\t  [NSMenu setMenuBarVisible: NO];\n\t}\n#    ifdef FULLSCREEN_FADE\n      fadeIn(FULLSCREEN_FADE);\n      releaseImage(0);\n#    endif\n      mousePosition.x= mousePosition.y= -1;\n      CGDisplayShowCursor(dpy);\n    }\n  else\t\t// switch to windowed\n    {\n#    ifdef FULLSCREEN_FADE\n      fadeOut(FULLSCREEN_FADE);\n#    endif\n      [NSMenu setMenuBarVisible: YES];\n      CGDisplayRelease(dpy);\n      fullscreen= 0;\n      lock(display);\n      setSavedWindowSize(originalWindowSize);\n      pixWidth=  originalWindowSize >> 16;\n      pixHeight= originalWindowSize & 0xffff;\n      updatePix();\n      unlock(display);\n#    ifdef FULLSCREEN_FADE\n      fadeIn(FULLSCREEN_FADE);\n#    endif\n    }\n\n  return 1;\n}\n\n#endif\n\n\n\n@implementation Squeak\n\n\n-(void) sendEvent: (NSEvent *)event\n{\n  int\t  type=     [event type];\n  NSPoint loc=      [event locationInWindow];\n  NSWindow *evtWin= [event window];\n#if 0\n  NSPoint loc=      (fullscreen\n\t\t     ? [NSEvent mouseLocation]\t//xxx should use deltas\n\t\t     : [event locationInWindow]);\n#endif\n\n  if (evtWin && ((NSWindow *)win != [event window]))\n    {\n      [super sendEvent: event];\n      return;\n    }\n\n  switch (type)\n    {\n#     define down buttonState |= qz2sqButton([event buttonNumber])\n#     define move\n#     define up\t  buttonState &= ~qz2sqButton([event buttonNumber])\n\n#     define recordEvent(delta)\t\t\t\t\t\\\n      if (fullscreen || NSPointInRect(loc, [view frame]))\t\\\n\t{\t\t\t\t\t\t\t\\\n\t  noteMousePoint(loc);\t\t\t\t\t\\\n\t  delta;\t\t\t\t\t\t\\\n\t  modifierState= qz2sqModifiers([event modifierFlags]);\t\\\n\t  noteMouseEvent();\t\t\t\t\t\\\n\t}\t\t\t\t\t\t\t\\\n      else\t\t\t\t\t\t\t\\\n\t[super sendEvent: event]\t// don't track outside window\n\n    case NSLeftMouseDown: case NSOtherMouseDown: case NSRightMouseDown:\n      if ((!active) || NSPointInRect(loc, resizeRect))\n\t[super sendEvent: event];\t// first click, or start resize\n      else\n\trecordEvent(down);\n      break;\n\n    case NSLeftMouseDragged: case NSRightMouseDragged: case NSOtherMouseDragged:\n      if (!(buttonState & qz2sqButton([event buttonNumber])))\n\t{\n\t  [super sendEvent: event];\t// already tracking window move\n\t  break;\n\t}\n      // fall through...\n    case NSMouseMoved:\n      recordEvent(move);\n      break;\n\n    case NSLeftMouseUp: case NSOtherMouseUp: case NSRightMouseUp:\n      recordEvent(up);\n      break;\n\n#     undef recordEvent\n#     undef down\n#     undef move\n#     undef up\n\n    case NSKeyDown:\n      {\n\tint keyCode= qz2sqKey(event);\n\tif (keyCode)\n\t  {\n\t    modifierState= qz2sqModifiers([event modifierFlags]);\n\t    if (cmdKeys)\n\t      {\n\t\tif ((modifierState == CommandKeyBit) || (modifierState == CommandKeyBit + ShiftKeyBit))\n\t\t  switch (keyCode)\n\t\t    {\n\t\t    case '?': [self showHelp: self];\t\tkeyCode= 0; break;\n\t\t    case 'h': [self hide: self];\t\tkeyCode= 0; break;\n\t\t    case 'k': [self performDisableKeys: self];\tkeyCode= 0; break;\n\t\t    case 'm': [win  performMiniaturize: self];\tkeyCode= 0; break;\n\t\t    case 'q': [self maybeTerminate: self];\tkeyCode= 0; break;\n\t\t    }\n\t\telse if (modifierState == CommandKeyBit + OptionKeyBit)\n\t\t  switch (keyCode)\n\t\t    {\n\t\t    case 'h': [self hideOtherApplications: self];\tkeyCode= 0; break;\n\t\t    }\n\t      }\n\t    if (keyCode)\n\t      {\n\t\tnoteKeyboardEvent(keyCode, EventKeyDown, modifierState);\n\t\tnoteKeyboardEvent(keyCode, EventKeyChar, modifierState);\n\t\trecordKeystroke(keyCode);\t\t\t/* DEPRECATED */\n\t      }\n\t  }\n      }\n      break;\n\n    case NSKeyUp:\n      {\n\tint keyCode= qz2sqKey(event);\n\tif (keyCode)\n\t  {\n\t    modifierState= qz2sqModifiers([event modifierFlags]);\n\t    noteKeyboardEvent(keyCode, EventKeyUp, modifierState);\n\t    accentMap= 0;\n\t  }\n      }\n      break;\n\n    case NSScrollWheel:\n      {\n\tint keyCode= ([event deltaY] >= 0.0) ? 30 : 31;\n\tnoteKeyboardEvent(keyCode, EventKeyDown, modifierState);\n\tnoteKeyboardEvent(keyCode, EventKeyChar, modifierState);\n\tnoteKeyboardEvent(keyCode, EventKeyUp,   modifierState);\n      }\n      break;\n\n    case NSAppKitDefined:\n      switch ([event subtype])\n\t{\n\tcase NSApplicationActivatedEventType:\n\t  active= 1;\n\t  break;\n\n\tcase NSApplicationDeactivatedEventType:\n\t  active= 0;\n\t  break;\n\t  // case NSScreenChangedEventType: //xxx this means the window\n\t  // changed to a different physical screen, which is useless\n\t  // info (we'd far rather be informed that the current screen's\n\t  // depth has changed)\n\t}\n      //DPRINTF((\"AppKitDefinedEvent subtype %d\\n\", [event subtype]));\n      [super sendEvent: event];\n      break;\n\n      // case NSFlagsChanged:\n      // case NSApplicationDefined: break;\n      // case NSPeriodic: break;\n      // case NSCursorUpdate: break;\n\n    default: // almost always NSSystemDefined\n      //DPRINTF((\"Event type %d subtype %d\\n\", [event type], [event subtype]));\n      [super sendEvent: event];\n    }\n}\n\n\n+ (void) initialize\n{\n  NSMutableDictionary *dict;\n  NSUserDefaults *defaults;\n\n  defaults= [NSUserDefaults standardUserDefaults];\n  dict= [NSMutableDictionary dictionary];\n    \n  [dict setObject: @\"YES\" forKey: @\"AppleDockIconEnabled\"];\n  [defaults registerDefaults: dict];\n}\n\n\nstatic char *documentName= 0;\n\n\n-(BOOL) application: (NSApplication *) theApplication\n\topenFile:    (NSString *)      filename\n{\n  if (fromFinder)\n    documentName= strdup([filename cString]);\n  return YES;\n}\n\n\n-(void) applicationDidFinishLaunching: (NSNotification *) note\n{\n  int fds[2];\n\n  // this saves an awful lot of tedious mutex contention (and besides\n  // is essentially free, since there's no way to avoid writing a\n  // socket to inform aio of the availability of the event)\n#if 0\n  if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds) != 0)\n    {\n      perror(\"socketpair\");\n      exit(1);\n    }\n  osXfd= fds[0];\n  stXfd= fds[1];\n#else\n  if (pipe(fds))\n    {\n      perror(\"pipe\");\n      exit(1);\n    }\n  stXfd= fds[0];\n  osXfd= fds[1];\n#endif\n  aioEnable(stXfd, 0, 0);\n  aioHandle(stXfd, evtHandler, AIO_RX);\n  {\n    pthread_mutexattr_t attr;\n    pthread_mutexattr_init(&attr);\n#  ifndef NDEBUG\n    pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK);\n#  endif\n    if (pthread_mutex_init(&displayMx, &attr))\n      {\n\tperror(\"pthread_mutex_init\");\n\texit(1);\n      }\n    pthread_mutexattr_destroy(&attr);\n  }\n\n  if (fromFinder)\n    {\n      char *ptr= 0;\n      strncpy(resourcePath, argVec[0], sizeof(resourcePath));\t// .app/Contents/MacOS/squeak\n      if ((ptr= strrchr(resourcePath, '/')))\n\t{\n\t  *ptr= '\\0';\t\t\t\t\t\t// .app/Contents/MacOS\n\t  if ((ptr= strrchr(resourcePath, '/')))\n\t    {\n\t      *ptr= '\\0';\t\t\t\t\t\t// .app/Contents\n\t      strcpy(ptr, \"/Resources/\");\t\t\t\t// .app/Contents/Resources/\n\t    }\n\t  else\n\t    resourcePath[0]= '\\0';\n\t}\n      else\n\tresourcePath[0]= '\\0';\n    }\n\n  imgInit();\n\n  // vmPath has been set to the realpath() of the VM, which might be\n  // bogus (since the more cultivated OS X user will make it a symlink\n  // to /usr/local/bin/squeak).  put it back where it should be.  note\n  // that we would also like to pick up the sources file from\n  // resourcePath/SqueakV*.sources, but I guess the stupid image is\n  // going to look for it in the vmPath.  ho hum.\n  {\n    char *ptr;\n    assert(strlen(argVec[0]) < MAXPATHLEN);\n    strcpy(vmPath, argVec[0]);\n    if ((ptr= strrchr(vmPath, '/')))\n      ptr[1]= '\\0';\n  }\n\n  setUpDisplay();\n  printf(\"fullScreenFlag %d\\n\", getFullScreenFlag());\n  setUpWindow(fullscreen= getFullScreenFlag());\n\n  [NSThread\n    detachNewThreadSelector: @selector(interpret:)\n    toTarget:\t\t     self\n    withObject:\t\t     nil];\n}\n\n\n- (void) interpret: (id)context\n{\n  [[NSAutoreleasePool alloc] init];\t// running in new thread\n  interpret();\n  (void)recordMouseEvent;\n  (void)recordKeyboardEvent;\n  (void)recordDragEvent;\n}\n\n\n- (void) applicationDidChangeScreenParameters: (NSNotification *)note\n{\n  //xxx this one might be tricky in the absence of appWillChangeScreenParams:\n  fprintf(stderr, \"your Squeak is probably about to dump core...\\n\");\t//xxx FIXME SOON!\n}\n\n\n- (void) unhideAllApplications: (id)sender\n{\n  [super unhideAllApplications: sender];\n  [win orderFront: self]; // so that unhinding once more will reveal the Sq window\n}\n\n\n- (BOOL) windowShouldClose: (id)sender\n{\n  return NO;\n}\n\n\n- (void) terminate: (id)sender\n{\n  [super terminate: sender];\n  exit(0);\n}\n\n- (void) maybeTerminate: (id)sender\n{\n  switch (NSRunAlertPanel(@\"Really quit?\",\n\t\t\t  @\"All changes since your last save will be lost.\\n\\nIf you want to save your changes, press `Cancel' and then choose `save and quit' from the background menu in the Squeak window.\",\n\t\t\t  @\"Quit\",\n\t\t\t  @\"Cancel\",\n\t\t\t  nil))\n    {\n    case NSAlertDefaultReturn:\t[self terminate: self];\n    }\n}\n\n\n- (void) performAbout: (id)sender\n{\n  extern char *getVersionInfo(int verbose);\n  char *info= getVersionInfo(1);\n  NSPanel *panel= NSGetInformationalAlertPanel(@\"About Squeak\",\n\t\t\t\t\t       @\"%s\",\n\t\t\t\t\t       @\"Dismiss\",\n\t\t\t\t\t       nil,\n\t\t\t\t\t       nil,\n\t\t\t\t\t       info);\n  NSRect frame= [panel frame];\n  frame.size.width *= 1.5;\n  [panel setFrame: frame display: NO];\n  [NSApp runModalForWindow: panel];\n  [panel close];\n  free(info);\n}\n\n\n\n//xxx why does rebuilding the menu lose boldface on the Apple menu item???\n\n- (void) performEnableKeys:  (id)sender\t{ cmdKeys= 1;  setUpMenus(); }\n- (void) performDisableKeys: (id)sender\t{ cmdKeys= 0;  setUpMenus(); }\n\n\n- (void) windowWillMove: (NSNotification *)note\n{\n  //xxx FIXME SOON: there are other ways to enter this (and ways other than\n  // noteEvent to escape from it)\n  inModalLoop= 1;\n}\n\n\n- (NSSize) windowWillResize: (NSWindow *)sender toSize: (NSSize)size\n{\n  return glActive ? [sender frame].size : size;\n}\n\n\n- (void) windowDidResize: (NSNotification *)note\n{\n  reframeRenderers();\n}\n\n\n@end // Squeak\n\n\n\n@implementation SqueakWindow\n\n- (BOOL) isOpaque\t\t{ return YES; }\n- (BOOL) canBecomeKeyWindow\t{ return YES; }\n\n- (void) setIcon\n{\n  /////////////xxxxxxxxxxxxxxxxxxxxxxxxxx REMOVE\n  icon= [[NSImage alloc] initWithContentsOfFile: @\"transp.icns\"];\n  if (icon)\n    [NSApp setApplicationIconImage: icon];\n}\n\n- (NSImage *) dockImage\n{\n  NSBitmapImageRep *rep= [NSBitmapImageRep alloc];\n  if ([rep initWithFocusedViewRect: topRect])\n    {\n      NSImage *image= [[NSImage alloc] init];\n      [image addRepresentation: rep];\n      if (icon)\n\t{\n\t  [image lockFocus];\n\t  [icon drawInRect: NSMakeRect(0, 0, [image size].width, [image size].height)\n\t\tfromRect:   NSMakeRect(0, 0, [icon size].width, [icon size].height)\n\t\toperation:  NSCompositeSourceOver\n\t\tfraction:   1.0];\n\t  [image unlockFocus];\n\t}\n      return image;\n    }\n  return nil;\n}\n\n- (void) performMiniaturize: (id)sender\n{\n  if (!glActive)\n    [super performMiniaturize: sender];\n}\n\n- (void) miniaturize: (id)sender\n{\n  NSImage *image= [self dockImage];\n  if (image)\n    [self setMiniwindowImage: image];\n  [image release];\n  [super miniaturize: sender];\n}\n\n\n@end // SqueakWindow\n\n\n\n@implementation SqueakView\n\n- (BOOL) isOpaque\t\t{ return YES; }\n- (BOOL) isFlipped\t\t{ return YES; }\n- (BOOL) acceptsFirstResponder\t{ return YES; }\n- (BOOL) becomeFirstResponder\t{ return YES; }\n- (BOOL) resignFirstResponder\t{ return NO; }\n\n- (id) initWithFrame: (NSRect)frame\n{\n  id result= [super initWithFrame: frame];\n  if (self == result)\n    [self registerForDraggedTypes:\n\t    [NSArray arrayWithObjects:\n\t\t       NSFilenamesPboardType, nil]];\n  return result;\n}\n\n\n- (void) setFrame: (NSRect)rect\n{\n  lock(display);\n  [super setFrame: rect];\n  if ([self inLiveResize])\n    {\n#    if (RESIZE_IN_TITLE)\n      display_winSetName(shortImageName);\n#    endif\n    }\n  else\n    if ([self qdPort])\n      updatePix();\n  unlock(display);\n}\n\n\n- (void) drawRect: (NSRect)rect\t\t// view already has focus\n{\n  printf(\"drawRect:\\n\");\n  if ([self inLiveResize])\n    {\n      [[NSColor whiteColor] set];\n      NSRectFill(rect);\n      drawImage([[NSGraphicsContext currentContext] graphicsPort], 0);\n    }\n  else\n    {\n      if (!pixBase)\n\t{\n\t  printf(\"drawRect: calling updatePix\\n\");\n\t  assert([self qdPort]);\n\t  updatePix();\n\t}\n      fullDisplayUpdate();\n    }\n}\n\n- (void) viewWillStartLiveResize\n{\n  captureImage(1);\n  [win setShowsResizeIndicator: YES];\n  \n#if (RESIZE_IN_TITLE)\n  showExtent= 1;\n  display_winSetName(shortImageName);\n#endif\n  pixWidth= 0;\n  pixHeight= 0;\n}\n\n- (void) viewDidEndLiveResize\n{\n  releaseImage(1);\n  [win setShowsResizeIndicator: NO];\n#if (RESIZE_IN_TITLE)\n  showExtent= 0;\n  display_winSetName(shortImageName);\n#endif\n  updatePix();\n  fullDisplayUpdate(); // gets rid of the resize icon if window didn't resize\n}\n\n\n- (int) draggingEntered: (id<NSDraggingInfo>)info\n{\n  if ((dragCount == 0) // cannot drag again until previous drag completes\n      && ([info draggingSourceOperationMask] & NSDragOperationCopy))\n    {\n      int count= [[[info draggingPasteboard]\n\t\t    propertyListForType: NSFilenamesPboardType] count];\n      noteMousePoint([info draggingLocation]);\n      noteDragEvent(DragEnter, dragCount= count);\n      return NSDragOperationCopy;\n    }\n  return NSDragOperationNone;\n}\n\n- (int) draggingUpdated: (id<NSDraggingInfo>)info\n{\n  noteMousePoint([info draggingLocation]);\n  noteDragEvent(DragMove, dragCount);\n  return NSDragOperationCopy;\n}\n\n- (void) draggingExited: (id<NSDraggingInfo>)info\n{\n  noteMousePoint([info draggingLocation]);\n  noteDragEvent(DragLeave, dragCount);\n  dragCount= 0;\n}\n\n- (BOOL) performDragOperation: (id<NSDraggingInfo>)info\n{\n  NSPasteboard *pboard= [info draggingPasteboard];\n  noteMousePoint([info draggingLocation]);\n  if ([[pboard types] containsObject: NSFilenamesPboardType])\n    {\n      NSArray *files= [pboard propertyListForType: NSFilenamesPboardType];\n      int i;\n      if (uxDropFileCount)\n\t{\n\t  assert(uxDropFileNames);\n\t  for (i= 0;  i < uxDropFileCount;  ++i)\n\t    free(uxDropFileNames[i]);\n\t  free(uxDropFileNames);\n\t  uxDropFileNames= 0;\n\t}\n      if ((  (!(uxDropFileCount= [files count])))\n\t  || (!(uxDropFileNames= (char **)malloc(uxDropFileCount * sizeof(char *)))))\n\t{\n\t  uxDropFileCount= 0;\n\t  return NO;\n\t}\n      for (i= 0;  i < uxDropFileCount;  ++i)\n\tuxDropFileNames[i]= strdup([[files objectAtIndex: i] cString]);\n    }\n  noteDragEvent(DragDrop, uxDropFileCount);\n  dragCount= 0;\n\n  return YES;\t// under some duress, I might add (see sqUxDragDrop.c)\n}\n\n\n@end // SqueakView\n\n\n\n/// \n/// Dialogues for sqUnixMain\n/// \n\n\n@interface ProgressBar : NSPanel\n{\n  NSText\t\t*message;\n  NSProgressIndicator\t*indicator;\n  int\t\t\t value;\n  NSModalSession\t session;\n}\n+(ProgressBar *) openWithTitle: (NSString *) title message: (NSString *) message;\n-(void) displayProgressFrom: (int) min to: (int) max during: (void (*)(ProgressBar *)) thunk;\n-(id)   value: (int) value;\n-(id)   setMinValue: (int) value;\n-(id)   setMaxValue: (int) value;\n-(void) close;\n@end\n\n@implementation ProgressBar\n\n-(id) initWithTitle: (NSString *) titleString message: (NSString *) messageString\n{\n  NSSize messageSize;\n  NSProgressIndicator *ind;\n  NSText *text;\n  int inset, y, w;\n\n  message= 0;\n  indicator= 0;\n  value= 0;\n  messageSize= (nil == messageString)\n    ? NSMakeSize(0,0)\n    : [messageString sizeWithAttributes: nil];\n  inset= 10;\n  y= inset;\n  w= max(100, messageSize.width + 50);\n  ind= [[NSProgressIndicator alloc]\n\t initWithFrame: NSMakeRect(inset, y, w, NSProgressIndicatorPreferredThickness)];\n  [ind setIndeterminate: NO];\n  y += NSProgressIndicatorPreferredThickness + inset;\n  text= [[NSText alloc] initWithFrame: NSMakeRect(inset, y, w, messageSize.height)];\n  [text setString: messageString];\n  [text setEditable: NO];\n  y += messageSize.height + inset;\n  if ((self= [super initWithContentRect: NSMakeRect(0, 0, w + inset * 2, y)\n\t\t    styleMask:           ((nil == titleString)\n\t\t\t\t\t  ? NSBorderlessWindowMask\n\t\t\t\t\t  : NSTitledWindowMask)\n\t\t    backing:             NSBackingStoreBuffered\n\t\t    defer:               NO]))\n    {\n      [[self contentView] addSubview: (indicator= ind)];\n      [[self contentView] addSubview: (message= text)];\n      if (nil != titleString)\n\t[self setTitle: titleString];\n      session= [NSApp beginModalSessionForWindow: self];\n    }\n  return self;\n}\n\n+(ProgressBar *) openWithTitle: (NSString *) titleString\n\t\t       message: (NSString *) messageString\n{\n  ProgressBar *bar= [[ProgressBar alloc] initWithTitle: titleString message: messageString];\n  [bar center];\n  [bar makeKeyAndOrderFront: nil];\n  return bar;\n}\n\n-(id) setMinValue: (int) min\n{\n  [indicator setMinValue: (double)min];\n  return self;\n}\n\n-(id) setMaxValue: (int) max\n{\n  [indicator setMaxValue: (double)max];\n  return self;\n}\n\n-(id) value: (int) newValue\n{\n  if (newValue != value)\n    {\n      value= newValue;\n      [indicator setDoubleValue: (double) value];\n      [indicator displayIfNeeded];\n      [NSApp runModalSession: session];\n    }\n  return self;\n}\n\n-(void) dealloc\n{\n  if (message) [message release];\n  if (indicator) [indicator release];\n  [super dealloc];\n}\n\n-(void) close\n{\n  [NSApp endModalSession: session];\n  [super close];\n  [self release];\n}\n\n-(void) displayProgressFrom: (int) min to: (int) max during: (void (*)(ProgressBar *)) thunk\n{\n  [indicator setMinValue: (double)min];\n  [indicator setMaxValue: (double)max];\n  thunk(self);\n}\n\n@end // ProgressBar\n\n\nstatic int fileCopy(char *src, char *dst)\n{\n  int in, out, r= -1;\n  struct stat st;\n  if (stat(src, &st)) return (errno= ENOENT);\n  if ((in=  open(src, O_RDONLY)) < 0) return (errno= ENOENT);\n  if ((out= open(dst, O_WRONLY | O_CREAT | O_TRUNC, 0755)) >= 0)\n    {\n      char *buf;\n      int  done;\n      ProgressBar *bar= [ProgressBar openWithTitle: @\"Writing...\"\n\t\t\t\t     message: [NSString stringWithCString: dst]];\n      [bar setMaxValue: (double)st.st_size];\n      buf= (char *)alloca(st.st_blksize);\n      done= 0;\n      while ((r= read(in, buf, st.st_blksize)) > 0)\n\tif (r == write(out, buf, r))\n\t  {\n\t    done += r;\n\t    [bar value: done];\n\t  }\n\telse\n\t  {\n\t    r= -1;\n\t    break;\n\t  }\n      [bar close];\n      close(out);\n    }\n  close(in);\n  return (r == 0) ? 0 : errno;\n}\n\n\nstatic void copyFile(const char *filename, char *ext, char *source)\n{\n  char dest[MAXPATHLEN], *ptr= 0;\n  strncpy(dest, filename, sizeof(dest));\n  if ((ptr= strrchr(dest, '.')))\n    {\n      strcpy(ptr, ext);\n      if (fileCopy(source, dest))\n\t{\n\t  perror(\"FileCopy\");\n\t  NSRunCriticalAlertPanel(@\"Oops...\",\n\t\t\t\t  @\"I encountered an error while copying the image/changes files.  The system told me `%s'.  Sorry.\"\n\t\t\t\t  @\"Quit\",\n\t\t\t\t  nil,\n\t\t\t\t  nil,\n\t\t\t\t  [NSString stringWithCString: strerror(errno)]);\n\t  exit(1);\n\t}\n    }\n}\n\n\nstatic void display_winImageNotFound(void)\t{}\n\n\nstatic int winCopyOrOpen(void)\n{\n  switch (NSRunAlertPanel(@\"Create a new image?\",\n\t\t\t  @\"You have started Squeak without specifying an image file.  Would you like to create a new image or open an image that you saved earlier?\",\n\t\t\t  @\"Open\",\n\t\t\t  @\"Cancel\",\n\t\t\t  @\"New\"))\n    {\n    case NSAlertDefaultReturn:\treturn 0;\t// open\n    case NSAlertOtherReturn:\treturn 1;\t// new\n    default:\t\t\t\t\t// cancel or error\n      exit(0);\n    }\n  return 0;\n}\n\n\nstatic int winImageCopy(char *buf, int len, char *image, char *changes)\n{\n  NSSavePanel *panel= [NSSavePanel savePanel];\n  NSString    *home=  [NSString stringWithCString: getenv(\"HOME\")];\n  int          reply;\n  //xxx release the string\n\n  [panel setTitle: @\"Where should I save the new image file?\"];\n  [panel setRequiredFileType: @\"image\"];\n  [panel setFloatingPanel: YES];\n  [panel setOneShot: YES];\n  [panel setReleasedWhenClosed: YES]; //xxx does the previous imply this???\n//[panel setContentSize: NSMakeSize(400, 350)];\n  [panel center];\n\n  reply= [panel runModalForDirectory: home file: @\"squeak.image\"];\n//[home release];\n\n  if (NSFileHandlingPanelOKButton == reply)\n    {\n      const char *path= [[panel filename]  cString];\n      copyFile(path, \".image\",   image);\n      copyFile(path, \".changes\", changes);\n      strncpy(buf, path, len);\n      return 1;\n    }\n  return 0;\n}\n\n\nstatic int winImageOpen(char *buf, int len)\n{\n  NSOpenPanel *panel= [NSOpenPanel openPanel];\n\n  [panel setTitle: @\"Which image file should I open?\"];\n  [panel setFloatingPanel: YES];\n  [panel setOneShot: YES];\n  [panel setReleasedWhenClosed: YES]; //xxx does the previous imply this???\n//[panel setContentSize: NSMakeSize(400, 350)];\n  [panel center];\n\n  if (NSOKButton == [panel runModalForTypes: [NSArray arrayWithObject: @\"image\"]])\n    {\n      NSArray *files= [panel filenames];\n      if (1 == [files count])\n\t{\n\t  strncpy(buf, [[files objectAtIndex: 0] cString], len);\n\t  return 1;\n\t}\n    }\n  return 0;\n}\n\n\nstatic int display_winImageFind(char *buf, int len)\n{\n  if (documentName)\n    {\n      strncpy(buf, documentName, len);\n      free(documentName);\n      documentName= 0;\n      return 1;\n    }\n  else\n    {\n      char image[MAXPATHLEN], changes[MAXPATHLEN];\n      strlcat(strncpy(image, resourcePath, sizeof(image)),\n\t      \"squeak.image\",\n\t      sizeof(image));\n      strlcat(strncpy(changes, resourcePath, sizeof(changes)),\n\t      \"squeak.changes\",\n\t      sizeof(changes));\n      return ((  (0 == access(image,   R_OK)))\n\t      && (0 == access(changes, R_OK))\n\t      && winCopyOrOpen())\n\t? winImageCopy(buf, len, image, changes)\n\t: winImageOpen(buf, len);\n    }\n  return 0;\n}\n\n\nstatic int display_primitivePluginBrowserReady()\t{ return primitiveFail(); }\nstatic int display_primitivePluginRequestURLStream()\t{ return primitiveFail(); }\nstatic int display_primitivePluginRequestURL()\t\t{ return primitiveFail(); }\nstatic int display_primitivePluginPostURL()\t\t{ return primitiveFail(); }\nstatic int display_primitivePluginRequestFileHandle()\t{ return primitiveFail(); }\nstatic int display_primitivePluginDestroyRequest()\t{ return primitiveFail(); }\nstatic int display_primitivePluginRequestState()\t{ return primitiveFail(); }\n\n\n/// \n/// OpenGL stuff\n/// \n\n\n#include <OpenGL/OpenGL.h>\n\n#include \"B3DAcceleratorPlugin.h\"\n#include \"sqOpenGLRenderer.h\"\n#include \"sqUnixQuartzGL.h\"\n\n#define renderView(R)\t\t(assert(R), (NSOpenGLView    *)((R)->drawable))\n#define renderContext(R)\t(assert(R), (NSOpenGLContext *)((R)->context))\n\nstatic glRenderer *renderers[MAX_RENDERER];\n\nstatic int display_ioGLinitialise(void)\n{\n  int i;\n  for (i= 0;  i < MAX_RENDERER;  ++i)\n    renderers[i]= 0;\n  glActive= 0;\n  return 1;\n}\n\nstatic void addRenderer(glRenderer *r)\n{\n  int i;\n  for (i= 0;  i < MAX_RENDERER;  ++i)\n    if (!renderers[i])\n      {\n\trenderers[i]= r;\n\t++glActive;\n\treturn;\n      }\n  assert(!\"this cannot happen\");\n}\n\nstatic void removeRenderer(glRenderer *r)\n{\n  int i;\n  for (i= 0;  i < MAX_RENDERER;  ++i)\n    if (renderers[i] == r)\n      {\n\trenderers[i]= 0;\n\t--glActive;\n\treturn;\n      }\n  assert(!\"this cannot happen\");\n}\n\n// fix dumb inverted coordinates after window geometry change\n\nstatic void reframeRenderer(glRenderer *r)\n{\n  NSRect frame= NSMakeRect(r->bufferRect[0], r->bufferRect[1],\n\t\t\t   r->bufferRect[2], r->bufferRect[3]);\n  frame.origin.y= [topView bounds].size.height - frame.size.height - frame.origin.y;\n  [renderView(r) removeFromSuperview];\n  [renderView(r) setFrame: frame];\n  [topView addSubview: renderView(r)];\n}\n\nstatic void reframeRenderers(void)\n{\n  int i;\n  for (i= 0;  i < MAX_RENDERER;  ++i)\n    if (renderers[i])\n      reframeRenderer(renderers[i]);\n}\n\n#if 0\n\nstatic void updateRenderer(glRenderer *r)\n{\n  [[renderView(r) openGLContext] makeCurrentContext];\n}\n\nstatic void updateRenderers(void)\n{\n  int i;\n  for (i= 0;  i < MAX_RENDERER;  ++i)\n    if (renderers[i])\n      updateRenderer(renderers[i]);\n}\n\n#endif\n\n\nstatic int display_ioGLcreateRenderer(glRenderer *r, int x, int y, int w, int h, int flags)\n{\n  long swapInterval;\n  NSOpenGLView *drawable;\n  NSOpenGLPixelFormatAttribute attrs[]=\n    {\n      NSOpenGLPFANoRecovery,\n      NSOpenGLPFAWindow,\n      NSOpenGLPFAAccelerated,\n      NSOpenGLPFADoubleBuffer,\n      //NSOpenGLPFAColorSize,\t16, //24\n      NSOpenGLPFAAlphaSize,\t 8, //8\n      NSOpenGLPFADepthSize,\t24, //16\n      NSOpenGLPFAStencilSize,\t((flags & B3D_STENCIL_BUFFER) ? 8 : 0),\n      NSOpenGLPFAAccumSize, 0,\n      0\n    };\n  NSOpenGLPixelFormat *fmt= [[NSOpenGLPixelFormat alloc] initWithAttributes: attrs];\n  if (!fmt)\n    {\n      fprintf(stderr, \"ioGLcreateRenderer: illegal pixel format\\n\");\n      return 0;\n    }\n\n  if (verboseLevel >= 3)\n    printFormatInfo(fmt);\n\n  drawable= [[NSOpenGLView alloc]\n\t      initWithFrame: NSMakeRect(x, [topView bounds].size.height - h - y, w, h)\n\t      pixelFormat:   fmt];\n  [fmt release];\n  if (!drawable)\n    {\n      fprintf(stderr, \"ioGLcreateRenderer: could not create view\\n\");\n      return 0;\n    }\n  r->drawable= drawable;\n  r->context=  [drawable openGLContext];\n  addRenderer(r);\n\n  swapInterval= 0;\n\n  [renderContext(r) setValues: &swapInterval forParameter: NSOpenGLCPSwapInterval];\n  [topView addSubview: drawable];\n\n  return 1;\n\n  (void)glErrString;\t// declared static in sqOpenGLRenderer.h, but never used\n}\n\n\nstatic int display_ioGLmakeCurrentRenderer(glRenderer *r)\n{\n  if (r)\n    {\n      assert(r->context);\n      [renderContext(r) makeCurrentContext];\n    }\n  else\n    [NSOpenGLContext clearCurrentContext];\n\n  return 1;\n}\n\n\nstatic void display_ioGLdestroyRenderer(glRenderer *r)\n{\n  [NSOpenGLContext clearCurrentContext];\n  assert(r->drawable);\n  [renderView(r) removeFromSuperview];\n  [renderView(r) release];\n  removeRenderer(r);\n}\n\n\nstatic void display_ioGLswapBuffers(glRenderer *r)\n{\n  assert(r->context);\n  [renderContext(r) flushBuffer];\n}\n\n\nstatic void display_ioGLsetBufferRect(glRenderer *r, int x, int y, int w, int h)\n{\n  NSRect frame= NSMakeRect(x, y, w, h);\n  fprintf(stderr, \"ioGLsetBufferRect(%p, %d, %d, %d, %d)\\n\", r->context, x, y, w, h);\n  assert(r->context);\n  frame.origin.y= [topView bounds].size.height - frame.size.height - frame.origin.y;\n  fprintf(stderr, \"view setFrame: %d %d %d %d\\n\",\n\t  (int)frame.origin.x, (int)frame.origin.y, (int)frame.size.width, (int)frame.size.height);\n  [renderView(r) setFrame: frame];\n}\n\n\n\nSqDisplayDefine(Quartz);\n\n\n#include \"SqModule.h\"\n\nstatic void *display_makeInterface(void)\n{\n  return &display_Quartz_itf;\n}\n\nSqModuleDefine(display, Quartz);\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-X11/Makefile.in",
    "content": "# Makefile for X11 Window System support\t\t\t-*- makefile -*-\n# \n#   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n#                              listed elsewhere in this file.\n#   All rights reserved.\n#   \n#   This file is part of Unix Squeak.\n# \n#      You are NOT ALLOWED to distribute modified versions of this file\n#      under its original name.  If you modify this file then you MUST\n#      rename it before making your modifications available publicly.\n# \n#   This file is distributed in the hope that it will be useful, but WITHOUT\n#   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n#   FITNESS FOR A PARTICULAR PURPOSE.\n#   \n#   You may use and/or distribute this file ONLY as part of Squeak, under\n#   the terms of the Squeak License as described in `LICENSE' in the base of\n#   this distribution, subject to the following additional restrictions:\n# \n#   1. The origin of this software must not be misrepresented; you must not\n#      claim that you wrote the original software.  If you use this software\n#      in a product, an acknowledgment to the original author(s) (and any\n#      other contributors mentioned herein) in the product documentation\n#      would be appreciated but is not required.\n# \n#   2. You must not distribute (or make publicly available by any\n#      means) a modified copy of this file unless you first rename it.\n# \n#   3. This notice must not be removed or altered in any source distribution.\n# \n#   Using (or modifying this file for use) in any context other than Squeak\n#   changes these copyright conditions.  Read the file `COPYING' in the\n#   directory `platforms/unix/doc' before proceeding with any such use.\n# \n# Author: ian.piumarta@inria.fr\n# \n# Last edited: 2003-02-02 17:23:09 by piumarta on emilia.local.\n\n[make_cfg]\n[make_plg]\n\nTARGET\t\t= vm-display-X11$a\nOBJS\t\t= sqUnixX11$o sqUnixMozilla$o\n\nXCFLAGS\t\t= $(X_CFLAGS)\n\nXINCLUDES\t= [includes] $(X_INCLUDES) \\\n\t\t  -I$(topdir)/platforms/Cross/plugins/FilePlugin \\\n\t\t  -I$(topdir)/platforms/Cross/plugins/B3DAcceleratorPlugin \\\n\t\t  -I$(topdir)/platforms/unix/plugins/B3DAcceleratorPlugin \\\n\t\t  -I/usr/X11R6/include\n\n$(TARGET) : $(OBJS) Makefile\n\t$(LINK) $(TARGET) $(OBJS) $(X_LIBS)\n\t$(RANLIB) $(TARGET)\n\n[make_targets]\n\n.force :\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-X11/acinclude.m4",
    "content": "# -*- sh -*-\n\nAC_ARG_WITH(x,\n[  --without-x             disable X Window System support [default=enabled]],\n  [have_x=\"$withval\"],\n  [have_x=\"yes\"])\n\nAC_ARG_WITH(gl,\n[  --without-gl            disable OpenGL support [default=enabled]],\n  [have_gl=\"$withval\"],\n  [have_gl=\"yes\"])\n\n###xxx FIXME (AGAIN): mandrake needs explicit -lpthread\n\nVMLIBS=${LIBS}\nVMCFLAGS=${CFLAGS}\nVMCPPFLAGS=${CPPFLAGS}\nVMINCLUDES=${INCLUDES}\n\nif test \"$have_x\" = \"yes\"; then\n  AC_PATH_XTRA\n  LIBS=\"${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS} ${LIBS}\"\n#  if test \"${x_libraries}\" != \"\"; then\n#    CFLAGS=\"${X_CFLAGS} ${CFLAGS} -L${x_libraries}\"\n#  fi\n  if test \"${x_includes}\" != \"\"; then\n    CPPFLAGS=\"${CPPFLAGS} -I${x_includes}\"\n    INCLUDES=\"${INCLUDES} -I${x_includes}\"\n    X_INCLUDES=\"-I${x_includes}\"\n  fi\n  AC_CHECK_LIB(X11, XOpenDisplay, [\n    AC_DEFINE(USE_X11, [1])\n    AC_DEFINE_UNQUOTED(VM_X11DIR, \"${x_libraries}\")\n    LIBS=\"${LIBS} -lX11\"\n    AC_CHECK_LIB(Xext, XShmAttach)\n    if test \"$have_gl\" = \"\"; then have_gl=\"no\"; fi\n    AC_CHECK_HEADERS(GL/gl.h, [\n      have_gl=yes\n      AC_DEFINE(USE_X11_GLX, [1])\n      AC_CHECK_LIB(GL,glIsEnabled)\n    ])\n  ],[\n    AC_PLUGIN_DISABLE\n  ])\nelse\n  AC_PLUGIN_DISABLE\nfi\n\nX_LIBS=${LIBS}\nAC_SUBST(X_LIBS)\nX_CFLAGS=${CFLAGS}\nAC_SUBST(X_CFLAGS)\nX_CPPFLAGS=${CPPFLAGS}\nAC_SUBST(X_CPPFLAGS)\nX_INCLUDES=${INCLUDES}\nAC_SUBST(X_INCLUDES)\n\nLIBS=${VMLIBS}\nCFLAGS=${VMCFLAGS}\nCPPFLAGS=${VMCPPFLAGS}\nINCLUDES=${VMINCLUDES}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-X11/build.cmake",
    "content": "EXPECT_UNDEFINED_SYMBOLS ()\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-X11/config.cmake",
    "content": "SET (${plugin}_sources ${unix}/${plugin}/sqUnixX11.c ${unix}/${plugin}/sqUnixMozilla.c)\n\nIF (NOT X11_FOUND)\n  PLUGIN_DISABLE ()\nELSE ()\n  SET (USE_X11 1)\n  IF (X11_Xext_FOUND)\n    SET (HAVE_LIBXEXT 1)\n    CHECK_LIBRARY_EXISTS (Xext XShmAttach ${X11_LIBRARY_DIR} USE_XSHM)\n  ENDIF ()\n  CHECK_INCLUDE_FILE (X11/extensions/Xrender.h HAVE_X11_EXTENSIONS_XRENDER_H -I${X11_INCLUDE_DIR})\n  IF (HAVE_X11_EXTENSIONS_XRENDER_H)\n    CHECK_LIBRARY_EXISTS (Xrender XRenderQueryVersion ${X11_LIBRARY_DIR} HAVE_LIBXRENDER)\n    IF (HAVE_LIBXRENDER)\n      PLUGIN_LINK_LIBRARIES (${X11_Xrender_LIB})\n    ENDIF ()\n  ENDIF (HAVE_X11_EXTENSIONS_XRENDER_H)\n  IF (OPENGL_FOUND)\n    CHECK_INCLUDE_FILE (GL/gl.h HAVE_GL_GL_H -I${X11_INCLUDE_DIR})\n    CHECK_INCLUDE_FILE (GL/glx.h HAVE_GL_GLX_H -I${X11_INCLUDE_DIR})\n    IF (HAVE_GL_GL_H AND HAVE_GL_GLX_H)\n      SET (USE_X11_GLX 1)\n    ENDIF (HAVE_GL_GL_H AND HAVE_GL_GLX_H)\n  ENDIF (OPENGL_FOUND)\n  PLUGIN_INCLUDE_DIRECTORIES (${cross}/plugins/B3DAcceleratorPlugin ${cross}/plugins/FilePlugin)\n  PLUGIN_INCLUDE_DIRECTORIES (${X11_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR})\n  PLUGIN_LINK_LIBRARIES (${X11_LIBRARIES} ${OPENGL_LIBRARIES})\nENDIF ()\n\nCONFIG_DEFINE (USE_X11)\nCONFIG_DEFINE (USE_X11_GLX)\n\nCONFIG_DEFINE (HAVE_LIBXEXT)\nCONFIG_DEFINE (HAVE_LIBXRENDER)\n\nCONFIG_DEFINE (USE_XSHM)\n\nCONFIG_DEFINE (USE_XICFONT_OPTION)\nCONFIG_DEFINE (USE_XICFONT_DEFAULT)\nCONFIG_DEFINE (USE_XICFONT_RESOURCE)\n\nCHECK_FUNCTION_EXISTS (snprintf\tHAVE_SNPRINTF)\nCHECK_FUNCTION_EXISTS (__snprintf\tHAVE___SNPRINTF)\n\nCONFIG_DEFINE (HAVE_SNPRINTF)\nCONFIG_DEFINE (HAVE___SNPRINTF)\n\nCHECK_INCLUDE_FILE (sys/select.h HAVE_SYS_SELECT_H)\n\nCONFIG_DEFINE (HAVE_SYS_SELECT_H)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-X11/sqUnixMozilla.c",
    "content": "/* sqUnixMozilla.c -- support for Squeak Netscape plugin\n *\n * Author: Bert Freudenberg <bert@isg.cs.uni-magdeburg.de>\n * \n * Last edited: 2007-09-07 13:53:35 by piumarta on emilia\n *\n * Originally based on Andreas Raab's sqWin32PluginSupport\n * \n * Notes: The plugin window handling stuff is in sqXWindow.c.\n *        browserProcessCommand() is called when data is available\n */\n\n#include \"sq.h\"\n\n#if defined(USE_X11)\n\n#include <X11/Xlib.h>\n#include <X11/Xatom.h>\n#include <unistd.h>\n#include <stdarg.h>\n#include <fcntl.h>\n#include <errno.h>\n\n#include \"FilePlugin.h\"\n\n#undef DEBUG\n\n#ifdef DEBUG\nvoid DPRINT(char *format, ...)\n{\n  static int debug= 42;\n  if (42 == debug) \n    debug= (NULL != getenv(\"NPSQUEAK_DEBUG\"));\n\n  if (!debug)\n    {\n      return;\n    }\n  else\n    {\n      static FILE *file= 0;\n      if (!file) \n\t{\n\t  file= fopen(\"/tmp/npsqueak.log\", \"a+\");\n\t}\n\n      if (file) {\n\tva_list ap;\n\tva_start(ap, format);\n\tvfprintf(file, format, ap);\n\tva_end(ap);\n\tfflush(file);\n      }\n    }\n}\n#else\nvoid DPRINT(char *format, ...) { }\n#endif\n\n/* from sqXWindow.c */\nextern Display* stDisplay;\nextern Window   stWindow;\nextern Window   browserWindow;\nextern Window   stParent;\nextern int      browserPipes[2];\n\n/* from interpret.c */\nsqInt stackObjectValue(sqInt);\nsqInt stackIntegerValue(sqInt);\nsqInt isBytes(sqInt);\nsqInt byteSizeOf(sqInt);\nvoid *firstIndexableField(sqInt);\nsqInt push(sqInt);\nsqInt pop(sqInt);\nsqInt positive32BitIntegerFor(sqInt);\nsqInt nilObject(void);\nsqInt instantiateClassindexableSize(sqInt, sqInt);\nsqInt classByteArray(void);\nsqInt failed(void);\nsqInt pushBool(sqInt);\n\n/* prototypes */\n\nstatic void browserReceive(void *buf, size_t count);\nstatic void browserSend(const void *buf, size_t count);\nstatic void browserSendInt(int value);\nstatic void browserReceiveData();\nstatic void browserGetURLRequest(int id, char* url, int urlSize,\n\t\t\t\tchar* target, int targetSize);\nstatic void browserPostURLRequest(int id, char* url, int urlSize, \n\t\t\t\t char* target, int targetSize, \n\t\t\t\t char* postData, int postDataSize);\n\ntypedef struct sqStreamRequest {\n  char *localName;\n  int semaIndex;\n  int state;\n} sqStreamRequest;\n\n#define MAX_REQUESTS 128\n\n#define SQUEAK_READ 0\n#define SQUEAK_WRITE 1\n\n#define inBrowser\\\n  (-1 != browserPipes[SQUEAK_READ])\n\n#define CMD_BROWSER_WINDOW 1\n#define CMD_GET_URL        2\n#define CMD_POST_URL       3\n#define CMD_RECEIVE_DATA   4\n\nstatic sqStreamRequest *requests[MAX_REQUESTS];\n\n\n\n/* primitives called from Squeak */\n\n\n\n/*\n  primitivePluginBrowserReady\n  Return true if a connection to the browser\n  has been established. Only necessary if some\n  sort of asynchronous communications are used.\n*/\nint display_primitivePluginBrowserReady()\n{\n  if (inBrowser)\n    {\n      pop(1);\n      pushBool(1);\n    }\n  else\n    primitiveFail();\n  return 1;\n}\n\n\n/*\n  primitivePluginRequestUrlStream: url with: semaIndex\n  Request a URL from the browser. Signal semaIndex\n  when the result of the request can be queried.\n  Returns a handle used in subsequent calls to plugin\n  stream functions.\n  Note: A request id is the index into requests[].\n*/\nint display_primitivePluginRequestURLStream()\n{\n  sqStreamRequest *req;\n  int id, url, length, semaIndex;\n\n  if (!inBrowser) return primitiveFail();\n\n  DPRINT(\"VM: primitivePluginRequestURLStream()\\n\");\n\n  for (id=0; id<MAX_REQUESTS; id++) {\n    if (!requests[id]) break;\n  }\n  if (id >= MAX_REQUESTS) return primitiveFail();\n\n  semaIndex= stackIntegerValue(0);\n  url= stackObjectValue(1);\n  if (failed()) return 0;\n\n  if (!isBytes(url)) return primitiveFail();\n\n  req= calloc(1, sizeof(sqStreamRequest));\n  if (!req) return primitiveFail();\n  req->localName= NULL;\n  req->semaIndex= semaIndex;\n  req->state= -1;\n  requests[id]= req;\n\n  length= byteSizeOf(url);\n  browserGetURLRequest(id, firstIndexableField(url), length, NULL, 0);\n  pop(3);\n  push(positive32BitIntegerFor(id));\n  DPRINT(\"VM:   request id: %i\\n\", id);\n  return 1;\n}\n\n\n/*\n  primitivePluginRequestURL: url target: target semaIndex: semaIndex\n  Request a URL into the given target.\n*/\nint display_primitivePluginRequestURL()\n{\n  sqStreamRequest *req;\n  int url, urlLength;\n  int target, targetLength;\n  int id, semaIndex;\n\n  if (!browserWindow) return primitiveFail();\n  for (id=0; id<MAX_REQUESTS; id++) {\n    if (!requests[id]) break;\n  }\n\n  if (id >= MAX_REQUESTS) return primitiveFail();\n\n  semaIndex= stackIntegerValue(0);\n  target= stackObjectValue(1);\n  url= stackObjectValue(2);\n\n  if (failed()) return 0;\n  if (!isBytes(url) || !isBytes(target)) return primitiveFail();\n\n  urlLength= byteSizeOf(url);\n  targetLength= byteSizeOf(target);\n\n  req= calloc(1, sizeof(sqStreamRequest));\n  if(!req) return primitiveFail();\n  req->localName= NULL;\n  req->semaIndex= semaIndex;\n  req->state= -1;\n  requests[id]= req;\n\n  browserGetURLRequest(id, firstIndexableField(url), urlLength, firstIndexableField(target), targetLength);\n  pop(4);\n  push(positive32BitIntegerFor(id));\n  return 1;\n}\n\n\n/*\n  primitivePluginPostURL: url target: target data: data semaIndex: semaIndex\n  Post data to a URL into the given target.\n*/\nint display_primitivePluginPostURL()\n{\n  sqStreamRequest *req;\n  int url, urlLength;\n  int target, targetLength;\n  int data, dataLength;\n  int id, semaIndex;\n\n  if (!browserWindow) return primitiveFail();\n  for (id=0; id<MAX_REQUESTS; id++) {\n    if (!requests[id]) break;\n  }\n\n  if (id >= MAX_REQUESTS) return primitiveFail();\n\n  semaIndex= stackIntegerValue(0);\n  data= stackObjectValue(1);\n  target= stackObjectValue(2);\n  url= stackObjectValue(3);\n\n  if (failed()) return 0;\n  if (target == nilObject()) target= 0;\n  if (!isBytes(url) || !isBytes(data) || !(!target || isBytes(target))) return primitiveFail();\n\n  urlLength= byteSizeOf(url);\n  targetLength= target ? byteSizeOf(target) : 0;\n  dataLength= byteSizeOf(data);\n\n  req= calloc(1, sizeof(sqStreamRequest));\n  if(!req) return primitiveFail();\n  req->localName= NULL;\n  req->semaIndex= semaIndex;\n  req->state= -1;\n  requests[id]= req;\n\n  browserPostURLRequest(id, firstIndexableField(url), urlLength, \n\t\t\ttarget ? firstIndexableField(target) : NULL, targetLength,\n\t\t\tfirstIndexableField(data), dataLength);\n  pop(4);\n  push(positive32BitIntegerFor(id));\n  return 1;\n}\n\n/* \n  primitivePluginRequestFileHandle: id\n  After a URL file request has been successfully\n  completed, return a file handle for the received\n  data. Note: The file handle must be read-only for\n  security reasons.\n*/\nint display_primitivePluginRequestFileHandle()\n{\n  sqStreamRequest *req;\n  int id, fileOop;\n  void *openFn;\n\n  id= stackIntegerValue(0);\n  if (failed()) return 0;\n  if (id < 0 || id >= MAX_REQUESTS) return primitiveFail();\n\n  req= requests[id];\n  if (!req || !req->localName) return primitiveFail();\n\n  fileOop= nilObject();\n\n  if (req->localName)\n    {\n      DPRINT(\"VM: Creating file handle for %s\\n\", req->localName);\n \n      openFn= ioLoadFunctionFrom(\"fileOpenNamesizewritesecure\", \"FilePlugin\");\n      if (!openFn)\n      {\n\tDPRINT(\"VM:   Couldn't load fileOpenName:size:write:secure: from FilePlugin!\\n\");\n\treturn primitiveFail();\n      }\n  \n      fileOop= ((sqInt (*)(char *, sqInt, sqInt, sqInt))openFn)\n\t(req->localName, strlen(req->localName), 0 /* readonly */, 0 /* insecure */);\n \n      /* if file ends in a $, it was a temp link created by the plugin */\n      if ('$' == req->localName[strlen(req->localName) - 1])\n      {\n\tDPRINT(\"VM:   unlink %s\\n\", req->localName);\n\tif (-1 == unlink(req->localName))\n\t  DPRINT(\"VM:   unlink failed: %s\\n\", strerror(errno));\n      }\n\n      if (failed()) \n\t{\n\t  DPRINT(\"VM:   file open failed\\n\");\n\t  return 0;\n\t}\n    }\n  pop(2);\n  push(fileOop);\n  return 1;\n}\n\n\n/*\n  primitivePluginDestroyRequest: id\n  Destroy a request that has been issued before.\n*/\nsqInt display_primitivePluginDestroyRequest()\n{\n  sqStreamRequest *req;\n  int id;\n\n  id= stackIntegerValue(0);\n  if (id < 0 || id >= MAX_REQUESTS) return primitiveFail();\n  req= requests[id];\n  if (req) {\n    if (req->localName) free(req->localName);\n    free(req);\n  }\n  requests[id]= NULL;\n  pop(1);\n  return 1;\n}\n\n\n/*\n  primitivePluginRequestState: id\n  Return true if the operation was successfully completed.\n  Return false if the operation was aborted.\n  Return nil if the operation is still in progress.\n*/\nsqInt display_primitivePluginRequestState()\n{\n  sqStreamRequest *req;\n  int id;\n\n  id= stackIntegerValue(0);\n  if (id < 0 || id >= MAX_REQUESTS) return primitiveFail();\n  req= requests[id];\n  if (!req) return primitiveFail();\n  pop(2);\n  if (req->state == -1) push(nilObject());\n  else pushBool(req->state);\n  return 1;\n}\n\n\n\n/* helper functions */\n\nstatic void browserReceive(void *buf, size_t count)\n{\n  ssize_t n;\n  n= read(browserPipes[SQUEAK_READ], buf, count);\n  if (n == -1)\n    perror(\"Squeak read failed:\");\n  if (n < count)\n    fprintf(stderr, \"Squeak read too few data from pipe\\n\");\n}\n\n\nstatic void browserSend(const void *buf, size_t count)\n{\n  ssize_t n;\n  n= write(browserPipes[SQUEAK_WRITE], buf, count);\n  if (n == -1)\n    perror(\"Squeak plugin write failed:\");\n  if (n < count)\n    fprintf(stderr, \"Squeak wrote too few data to pipe\\n\");\n}\n\nstatic void browserSendInt(int value)\n{\n  browserSend(&value, 4);\n}\n\n\n/*\n  browserReceiveData:\n  Called in response to a CMD_RECEIVE_DATA message.\n  Retrieves the data file name and signals the semaphore.\n*/\nstatic void browserReceiveData()\n{\n  char *localName= NULL;\n  int id, ok;\n\n  browserReceive(&id, 4);\n  browserReceive(&ok, 4);\n\n  DPRINT(\"VM:  receiving data id: %i state %i\\n\", id, ok);\n\n  if (ok == 1) {\n    int length= 0;\n    browserReceive(&length, 4);\n    if (length) {\n      localName= malloc(length+1);\n      browserReceive(localName, length);\n      localName[length]= 0;\n      DPRINT(\"VM:   got filename %s\\n\", localName);\n    }\n  }\n  if (id >= 0 && id < MAX_REQUESTS) {\n    sqStreamRequest *req= requests[id];\n    if (req) {\n      req->localName= localName;\n      req->state= ok;\n      DPRINT(\"VM:  signaling semaphore, state=%i\\n\", ok);\n      /*  synchronizedSignalSemaphoreWithIndex(req->semaIndex);*/\n      signalSemaphoreWithIndex(req->semaIndex);\n    }\n  }\n}\n\n\n/*\n  browserGetURLRequest:\n  Notify plugin to get the specified url into target\n*/\nstatic void browserGetURLRequest(int id, char* url, int urlSize, \n\t\t\t\tchar* target, int targetSize)\n{\n  if (!inBrowser) {\n    fprintf(stderr, \"Cannot submit URL request -- \"\n\t    \"there is no connection to a browser\\n\");\n    return;\n  }\n\n  browserSendInt(CMD_GET_URL);\n  browserSendInt(id);\n\n  browserSendInt(urlSize);\n  if (urlSize > 0)\n    browserSend(url, urlSize);\n\n  browserSendInt(targetSize);\n  if (targetSize > 0)\n    browserSend(target, targetSize);\n}\n\n\n/*\n  browserPostURLRequest:\n  Notify plugin to post data to the specified url and get result into target\n*/\nstatic void browserPostURLRequest(int id, char* url, int urlSize, \n\t\t\t\t char* target, int targetSize, \n\t\t\t\t char* postData, int postDataSize)\n{\n  if (!inBrowser) {\n    fprintf(stderr, \"Cannot submit URL post request -- \"\n\t    \"there is no connection to a browser\\n\");\n    return;\n  }\n\n  browserSendInt(CMD_POST_URL);\n  browserSendInt(id);\n\n  browserSendInt(urlSize);\n  if (urlSize > 0)\n    browserSend(url, urlSize);\n\n  browserSendInt(targetSize);\n  if (targetSize > 0)\n    browserSend(target, targetSize);\n\n  browserSendInt(postDataSize);\n  if (postDataSize > 0)\n    browserSend(postData, postDataSize);\n}\n\n\n/***************************************************************\n * Functions called from sqXWindow.c\n ***************************************************************/\n\n/*\n  browserProcessCommand:\n  Handle commands sent by the plugin.\n*/\nvoid browserProcessCommand(void)\n{\n  static int firstTime= 1;\n  int cmd, n;\n\n  if (firstTime)\n    {\n      firstTime= 0;\n      /* enable non-blocking reads */\n      fcntl(browserPipes[SQUEAK_READ], F_SETFL, O_NONBLOCK);\n    }\n  DPRINT(\"VM: browserProcessCommand()\\n\");\n\n  n= read(browserPipes[SQUEAK_READ], &cmd, 4);\n  if (0 == n || (-1 == n && EAGAIN == errno))\n    return;\n\n  switch (cmd)\n    {\n    case CMD_RECEIVE_DATA:\n      /* Data is coming in */\n      browserReceiveData();\n      break;\n    case CMD_BROWSER_WINDOW:\n      /* Parent window has changed () */\n      browserReceive(&browserWindow, 4);\n      stParent= browserWindow;\n      DPRINT(\"VM:  got browser window 0x%X\\n\", browserWindow);\n      break;\n    default:\n      fprintf(stderr, \"Unknown command from Plugin: %i\\n\", cmd);\n    }\n}\n\n\n#else /* !defined(USE_X11) */\n\nsqInt display_primitivePluginBrowserReady()\t\t{ return primitiveFail(); }\nsqInt display_primitivePluginRequestURLStream()\t\t{ return primitiveFail(); }\nsqInt display_primitivePluginRequestURL()\t\t{ return primitiveFail(); }\nsqInt display_primitivePluginPostURL()\t\t\t{ return primitiveFail(); }\nsqInt display_primitivePluginRequestFileHandle()\t{ return primitiveFail(); }\nsqInt display_primitivePluginDestroyRequest()\t\t{ return primitiveFail(); }\nsqInt display_primitivePluginRequestState()\t\t{ return primitiveFail(); }\n\n#endif\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-X11/sqUnixOpenGL.X11",
    "content": "/* sqUnixOpenGLX11.c -- support for accelerated 3D rendering under X11 -*- C -*-\n *\n * Author: Bert Freudenberg <bert@isg.cs.uni-magdeburg.de>\n * \n * Based on Andreas Raab's sqWin32OpenGL.c\n * \n * Last edited: 2003-01-31 22:40:39 by piumarta on emilia.local.\n *\n * History\n *    Nov 02: added TGraphicsTest conformant log support\n *    Oct 02: added Tea initialization support w/ stencil\n *    May 01: initial revision\n */\n\n#include <sys/types.h>\n#include \"sqVirtualMachine.h\"\n#include \"sqConfig.h\"\n#include \"sqPlatformSpecific.h\"\n#include \"B3DAcceleratorPlugin.h\"\n\n#if defined (B3DX_GL)\n\n#include \"sqUnixOpenGL.h\"\n#include <X11/X.h>\n#include <stdio.h>\n\n#include \"sqOpenGLRenderer.h\"\n\n/* Plugin refs */\nextern struct VirtualMachine *interpreterProxy;\n\nstatic void printVisual(XVisualInfo* visinfo);\nstatic void listVisuals();\n\nstatic Display *stDisplay= NULL; /* Squeak's display */\nstatic Window   stWindow=  0;    /* Squeak's main window */\n\nstatic glRenderer *current= NULL;\nstatic glRenderer allRenderer[MAX_RENDERER];\n\n\nstatic int visualAttributes[]= {\n  GLX_STENCIL_SIZE,     0,  /* filled in later - must be first item! */\n  GLX_ALPHA_SIZE,       1,  /* filled in later - must be second item! */\n  GLX_RGBA,                 /* no indexed colors */\n  GLX_DOUBLEBUFFER,         /* will swap */\n  GLX_LEVEL,            0,  /* frame buffer, not overlay */\n  GLX_DEPTH_SIZE,       16, /* decent depth */   \n  GLX_AUX_BUFFERS,      0,  /* no aux buffers */\n  GLX_ACCUM_RED_SIZE,   0,  /* no accumulation */\n  GLX_ACCUM_GREEN_SIZE, 0,\n  GLX_ACCUM_BLUE_SIZE,  0,\n  GLX_ACCUM_ALPHA_SIZE, 0,\n  None\n};\n\nstatic float blackLight[4]= { 0.0f, 0.0f, 0.0f, 0.0f };\n\n/* Verbose level for debugging purposes:\n   0 - print NO information ever\n   1 - print critical debug errors\n   2 - print debug warnings\n   3 - print extra information\n   4 - print extra warnings\n   5 - print information about primitive execution\n\n   10 - print information about each vertex and face\n*/\nint verboseLevel= 1;\n\n\n/*** create / destroy a renderer ***/\n\nint glCreateRendererFlags(int x, int y, int w, int h, int flags)\n{\n  glRenderer *renderer;\n  XVisualInfo* visinfo= 0;\n  int index= -1;\n\n  if (flags & ~(B3D_HARDWARE_RENDERER | B3D_SOFTWARE_RENDERER | B3D_STENCIL_BUFFER))\n    {\n      DPRINTF3D(1, (fp, \"ERROR: Unsupported renderer flags (%d)\\r\", flags));\n      return -1;\n    }\n\n  if (flags & B3D_STENCIL_BUFFER)\n    visualAttributes[1]= 1;\n  else \n    visualAttributes[1]= 0;\n\n  /* find unused renderer */\n  {\n    int i;\n    for (i= 0; i < MAX_RENDERER; i++)\n      {\n\tif (!allRenderer[i].used)\n\t  {\n\t    index= i;\n\t    break;\n\t  }\n      }\n  }\n\n  if (index == -1)\n    {\n      DPRINTF3D(1, (fp, \"ERROR: Maximum number of renderers (%d) exceeded\\r\", MAX_RENDERER));\n      return 0;\n    }\n\n\n  renderer= &allRenderer[index];\n  renderer->used= True;\n  renderer->window= 0;\n  renderer->context= NULL;\n\n  DPRINTF3D(3, (fp, \"---- Creating new renderer ----\\r\\r\"));\n\n  /* sanity checks */\n\n  if (w < 0 || h < 0)\n    {\n      DPRINTF3D(1, (fp, \"Negative extent (%i@%i)!\\r\", w, h));\n      goto FAILED;\n    }\n\n  /* choose visual and create context */\n\n  if (verboseLevel >= 3)\n    listVisuals();\n\n  {\n    visinfo= glXChooseVisual(stDisplay, \n\t\t\t     DefaultScreen(stDisplay), \n\t\t\t     visualAttributes);\n\n    if (!visinfo)\n      {\n\t/* retry without alpha */\n\tvisualAttributes[3]= 0;\n\tvisinfo= glXChooseVisual(stDisplay, \n\t\t\t\t DefaultScreen(stDisplay), \n\t\t\t\t visualAttributes);\n      }\n\n    if (!visinfo)\n      {\n\tDPRINTF3D(1, (fp, \"No OpenGL visual found!\\r\"));\n\tgoto FAILED;\n      }\n\n    DPRINTF3D(3, (fp, \"\\r#### Selected GLX visual ID 0x%lx ####\\r\", \n\t\tvisinfo->visualid));\n    if (verboseLevel >= 3)\n      printVisual(visinfo);\n\n    renderer->context= glXCreateContext(stDisplay, visinfo, 0, GL_TRUE);\n\n    if (!renderer->context)\n      {\n\tDPRINTF3D(1, (fp, \"Creating GLX context failed!\\r\"));\n\tgoto FAILED;\n      }\n\n    DPRINTF3D(3, (fp, \"\\r#### Created GLX context ####\\r\"  ));\n\n    /* create window */\n    {\n      XSetWindowAttributes attributes;\n      unsigned long valuemask= 0;\n\n      attributes.colormap= XCreateColormap(stDisplay,\n\t\t\t\t\t   DefaultRootWindow(stDisplay),\n\t\t\t\t\t   visinfo->visual,\n\t\t\t\t\t   AllocNone);\n      valuemask|= CWColormap;\n\n      attributes.background_pixel= BlackPixel(stDisplay, DefaultScreen(stDisplay));\n      valuemask|= CWBackPixel;\n\n      renderer->window= XCreateWindow(stDisplay, stWindow, x, y, w, h, 0,\n\t\t\t\t    visinfo->depth, InputOutput, visinfo->visual, \n\t\t\t\t    valuemask, &attributes);\n      if (!renderer->window) \n\t{\n\t  DPRINTF3D(1, (fp, \"Failed to create client window\\r\"));\n\t  goto FAILED;\n\t}\n\n      XMapWindow(stDisplay, renderer->window);\n\n    }\n\n    DPRINTF3D(3, (fp, \"\\r#### Created window ####\\r\"  ));\n\n    XFree(visinfo);\n    visinfo= 0;\n  }\n\n  /* Make the context current */\n  if (!glXMakeCurrent(stDisplay, renderer->window, renderer->context))\n    {\n      DPRINTF3D(1, (fp, \"Failed to make context current\\r\"));\n      goto FAILED;\n    }\n   \n  renderer->bufferRect[0]= x;\n  renderer->bufferRect[1]= y;\n  renderer->bufferRect[2]= w;\n  renderer->bufferRect[3]= h;\n\n  DPRINTF3D(3, (fp, \"\\r### Renderer created! ###\\r\"));\n\n  /* setup user context */\n  glDisable(GL_LIGHTING);\n  glDisable(GL_COLOR_MATERIAL);\n  glDisable(GL_BLEND);\n  glDisable(GL_ALPHA_TEST);\n  glEnable(GL_DITHER);\n  glEnable(GL_DEPTH_TEST);\n  glEnable(GL_NORMALIZE);\n  glDepthFunc(GL_LEQUAL);\n  glClearDepth(1.0);\n  glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);\n  glShadeModel(GL_SMOOTH);\n  glLightModelfv(GL_LIGHT_MODEL_AMBIENT, blackLight);\n  ERROR_CHECK;\n  return index;\n\nFAILED:\n  /* do necessary cleanup */\n  DPRINTF3D(1, (fp, \"OpenGL initialization failed\\r\"));\n\n  if (visinfo)\n    XFree(visinfo);\n  if (renderer->context)\n    glXDestroyContext(stDisplay, renderer->context);\n  if (renderer->window)\n    XDestroyWindow(stDisplay, renderer->window);\n\n  return -1;\n}\n\n\nint glDestroyRenderer(int handle)\n{\n  glRenderer *renderer= glRendererFromHandle(handle);\n\n  DPRINTF3D(3, (fp, \"\\r--- Destroying renderer ---\\r\"));\n\n  if (!renderer)\n    return 1; /* already destroyed */\n\n  if (!glMakeCurrentRenderer(NULL))\n    return 0;\n\n  glXDestroyContext(stDisplay, renderer->context);\n  XDestroyWindow(stDisplay, renderer->window);\n\n  renderer->window= 0;\n  renderer->context= NULL;\n  renderer->used= False;\n\n  return 1;\n}\n\n\n\n/*** helpers ***/\n\n\nglRenderer *glRendererFromHandle(int handle)\n{\n  DPRINTF3D(7, (fp, \"Looking for renderer id: %i\\r\", handle));\n\n  if (handle < 0 || handle >= MAX_RENDERER) \n    return NULL;\n\n  if (allRenderer[handle].used)\n    return allRenderer+handle;\n\n  return NULL;\n}\n\n\nint glIsOverlayRenderer(int handle)\n{\n  /* we always use overlay renderers */\n  return 1;\n}\n\n\nint glSwapBuffers(glRenderer *renderer)\n{\n  if (!renderer || !renderer->used)\n    return 0;\n\n  glXSwapBuffers(stDisplay, renderer->window);\n\n  return 1;\n}\n\n\nint glMakeCurrentRenderer(glRenderer *renderer)\n{\n  if (current == renderer)\n    return 1;\n\n  if (renderer && !renderer->used)\n    return 0;\n\n  if (renderer)\n    {\n      if (!glXMakeCurrent(stDisplay, renderer->window, renderer->context))\n\t{\n\t  DPRINTF3D(1, (fp, \"Failed to make context current\\r\"));\n\t  return 0;\n\t}\n    }\n  else\n    {\n      glXMakeCurrent(stDisplay, 0, NULL);\n    }\n  \n  current= renderer;\n  return 1;\n}\n\n\nint glSetBufferRect(int handle, int x, int y, int w, int h)\n{\n  glRenderer *renderer= glRendererFromHandle(handle);\n\n  if (!renderer || !glMakeCurrentRenderer(renderer))\n    return 0;\n\n  if (w < 1 || h < 1)\n    return 0;\n\n  XMoveResizeWindow(stDisplay, renderer->window, x, y, w, h);\n\n  renderer->bufferRect[0]= x;\n  renderer->bufferRect[1]= y;\n  renderer->bufferRect[2]= w;\n  renderer->bufferRect[3]= h;\n\n  return 1;\n}\n\n\nint glSetVerboseLevel(int level)\n{\n  verboseLevel= level;\n  return 1;\n}\n\n\nint glGetIntPropertyOS(int handle, int prop)\n{\n  GLint v;\n  glRenderer *renderer= glRendererFromHandle(handle);\n  if (!renderer || !glMakeCurrentRenderer(renderer))\n    return 0;\n\n  switch(prop) {\n  case 1: /* backface culling */\n    if (!glIsEnabled(GL_CULL_FACE)) return 0;\n    glGetIntegerv(GL_FRONT_FACE, &v);\n    if (v == GL_CW) return 1;\n    if (v == GL_CCW) return -1;\n    return 0;\n  case 2: /* polygon mode */\n    glGetIntegerv(GL_POLYGON_MODE, &v);\n    ERROR_CHECK;\n    return v;\n  case 3: /* point size */\n    glGetIntegerv(GL_POINT_SIZE, &v);\n    ERROR_CHECK;\n    return v;\n  case 4: /* line width */\n    glGetIntegerv(GL_LINE_WIDTH, &v);\n    ERROR_CHECK;\n    return v;\n  }\n  return 0;\n}\n\n\nint glSetIntPropertyOS(int handle, int prop, int value)\n{\n  glRenderer *renderer= glRendererFromHandle(handle);\n  if (!renderer || !glMakeCurrentRenderer(renderer))\n    return 0;\n\n  switch(prop) {\n  case 1: /* backface culling */\n    if (!value) {\n      glDisable(GL_CULL_FACE);\n      ERROR_CHECK;\n      return 1;\n    }\n    glEnable(GL_CULL_FACE);\n    glFrontFace(value == 1 ? GL_CCW : GL_CW);\n    ERROR_CHECK;\n    return 1;\n  case 2: /* polygon mode */\n    if (value == 0) glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);\n    else if (value == 1) glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);\n    else if (value == 2) glPolygonMode(GL_FRONT_AND_BACK, GL_POINT);\n    else return 0;\n    ERROR_CHECK;\n    return 1;\n  case 3: /* point size */\n    glPointSize(value);\n    ERROR_CHECK;\n    return 1;\n  case 4: /* line width */\n    glLineWidth(value);\n    ERROR_CHECK;\n    return 1;\n  }\n  return 0;\n}\n\n\n/* GLX_CONFIG_CAVEAT might not be supported */\n/* but the test below is worded so it does not matter */\n#ifndef GLX_CONFIG_CAVEAT\n# define GLX_CONFIG_CAVEAT  0x20\n# define GLX_SLOW_CONFIG    0x8001\n#endif\n\nstatic void printVisual(XVisualInfo* visinfo)\n{\n  int isOpenGL; \n  glXGetConfig(stDisplay, visinfo, GLX_USE_GL, &isOpenGL);\n  if (isOpenGL) \n    {\n      int slow= 0;\n      int red, green, blue, alpha, stencil, depth;\n      glXGetConfig(stDisplay, visinfo, GLX_CONFIG_CAVEAT, &slow);\n      glXGetConfig(stDisplay, visinfo, GLX_RED_SIZE,      &red);\n      glXGetConfig(stDisplay, visinfo, GLX_GREEN_SIZE,    &green);\n      glXGetConfig(stDisplay, visinfo, GLX_BLUE_SIZE,     &blue);\n      glXGetConfig(stDisplay, visinfo, GLX_ALPHA_SIZE,    &alpha);\n      glXGetConfig(stDisplay, visinfo, GLX_STENCIL_SIZE,  &stencil);\n      glXGetConfig(stDisplay, visinfo, GLX_DEPTH_SIZE,    &depth);\n\n      if (slow != GLX_SLOW_CONFIG)\n\tDPRINTF3D(3, (fp,\"===> OpenGL visual\\r\"))\n      else\n\tDPRINTF3D(3, (fp,\"---> slow OpenGL visual\\r\"));\n\n      DPRINTF3D(3, (fp,\"rgbaBits = %i+%i+%i+%i\\r\", red, green, blue, alpha));\n      DPRINTF3D(3, (fp,\"stencilBits = %i\\r\", stencil));\n      DPRINTF3D(3, (fp,\"depthBits = %i\\r\", depth));\n    }\n}\n\nstatic void listVisuals()\n{\n  XVisualInfo* visinfo;\n  int nvisuals, i;\n   \n  visinfo= XGetVisualInfo(stDisplay, VisualNoMask, NULL, &nvisuals);\n\n  for (i= 0; i < nvisuals; i++)\n    {\n      DPRINTF3D(3, (fp,\"#### Checking pixel format (visual ID 0x%lx)\\r\", visinfo[i].visualid));\n      printVisual(&visinfo[i]);\n    }\n  XFree(visinfo);\n}\n\n\n/*** Module initializers ***/\n\n\n\nint glInitialize(void)\n{\n  int i, p;\n  int fn;\n\n  fn= interpreterProxy->ioLoadFunctionFrom(\"ioGetDisplay\", NULL);\n  stDisplay= (fn ? ((Display *(*)(void))fn)() : 0);\n  if (!stDisplay)\n    {\n      DPRINTF3D(1,(fp,\"ERROR: Failed to look up stDisplay\\r\"));\n      return 0;\n    }\n\n  fn= interpreterProxy->ioLoadFunctionFrom(\"ioGetWindow\", NULL);\n  stWindow= (fn ? ((Window (*)(void))fn)() : 0);\n  if (!stWindow)\n    {\n      DPRINTF3D(1,(fp,\"ERROR: Failed to look up stWindow\\r\"));\n      return 0;\n    }\n\n  for (i= 0; i < MAX_RENDERER; i++)\n    {\n      allRenderer[i].used= False;\n    }\n\n  return 1;\n}\n\n\nint glShutdown(void)\n{\n  int i;\n\n  for (i=0; i< MAX_RENDERER; i++)\n    {\n      if (allRenderer[i].used)\n\t{\n\t  glDestroyRenderer(i);\n\t}\n    }\n\n  return 1;\n}\n\n#endif /* defined(B3DX_GL) */\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-X11/sqUnixX11.c",
    "content": "/* sqUnixX11.c -- support for display via the X Window System.\n * \n *   Copyright (C) 1996-2008 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a copy\n *   of this software and associated documentation files (the \"Software\"), to deal\n *   in the Software without restriction, including without limitation the rights\n *   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n *   copies of the Software, and to permit persons to whom the Software is\n *   furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n *   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n *   SOFTWARE.\n */\n\n/* Author: Ian Piumarta <ian.piumarta@squeakland.org>\n *\n * Support for more intelligent CLIPBOARD selection handling contributed by:\n *\tNed Konz <ned@bike-nomad.com>\n * \n * Support for displays deeper than 8 bits contributed by: Kazuki YASUMATSU\n *\t<kyasu@crl.fujixerox.co.jp> <Kazuki.Yasumatsu@fujixerox.co.jp>\n *\n * Support for cursor and keypad editing keys based on code contributed by:\n *\tStefan Matthias Aust <sma@kiel.netsurf.de>\n *\n * Support for intelligent visual class selection contributed by:\n *\tBill Cattey <wdc@MIT.EDU>\n *\n * Support for European accented characters in selections, and\n * Support for displays shallower than 8 bits contributed, and\n * Support for browser plugins, and\n * Support for accelerated OpenGL contributed by:\n *\tBert Freudenberg <bert@freudenbergs.de>\n *\n * Support for 24bpp TrueColour X display devices contributed by:\n *\tTim Rowledge <tim@sumeru.stanford.edu>\n *\n * Support for OSProcess plugin contributed by:\n *\tDave Lewis <lewis@mail.msen.com> Mon Oct 18 20:36:54 EDT 1999\n */\n\n# include \"squeak_adapters.h\"\n\n#include \"sq.h\"\n#include \"sqMemoryAccess.h\"\n\n#include \"sqUnixMain.h\"\n#include \"sqUnixGlobals.h\"\n#include \"sqUnixCharConv.h\"\n#include \"sqaio.h\"\n\n#undef HAVE_OPENGL_GL_H\t\t/* don't include Quartz OpenGL if configured */\n#include \"SqDisplay.h\"\n\n#if defined(ioMSecs)\n# undef ioMSecs\n#endif\n\n#define NO_ICON\n#define PRINT_PS_FORMS\n#define SQ_FORM_FILENAME\t\"squeak-form.ppm\"\n#undef\tFULL_UPDATE_ON_EXPOSE\n\n#if 0 /* The following is a pain.  Leave it to the command line. */\n# undef\tDEBUG_FOCUS\n# undef\tDEBUG_XIM\n# undef\tDEBUG_CONV\n# undef\tDEBUG_EVENTS\n# undef\tDEBUG_SELECTIONS\n# undef\tDEBUG_BROWSER\n# undef\tDEBUG_WINDOW\n# undef  DEBUG_VISUAL\n#endif\n\n#define\tUSE_XICFONT_OPTION\n#undef\tUSE_XICFONT_RESOURCE\n#undef\tUSE_XICFONT_DEFAULT\n\n#if defined(HAVE_LIBXEXT)\n# define USE_XSHM\n#endif\n\n#include <stdio.h>\n#include <time.h>\n#include <sys/time.h>\n#include <sys/types.h>\n#include <sys/param.h>\n#include <sys/utsname.h>\n#include <sys/stat.h>\n#include <unistd.h>\n#include <errno.h>\n#include <signal.h>\n#include <fcntl.h>\n#include <locale.h>\n\n#if defined(HAVE_SYS_SELECT_H)\n# include <sys/select.h>\n#endif\n\n#include <X11/Xlib.h>\n#include <X11/Xutil.h>\n#include <X11/Xatom.h>\n#define XK_MISCELLANY\n#define XK_XKB_KEYS\n#include <X11/keysymdef.h>\n#if defined(SUGAR)\n# include <X11/XF86keysym.h>\n#endif\n#if defined(USE_XSHM)\n#  include <sys/ipc.h>\n#  include <sys/shm.h>\n#  include <X11/extensions/XShm.h>\n#endif\n#if defined(HAVE_LIBXRENDER)\n#  include <X11/extensions/Xrender.h>\n#endif\n#if !defined(NO_ICON)\n#  include \"squeakIcon.bitmap\"\n#endif\n\n#if defined(HAVE_DLFCN_H)\n# include <dlfcn.h>\n#endif\n\n#include <assert.h>\n\n#define isAligned(T, V)\t(((V) % sizeof(T)) == 0)\n#define align(T, V)\t(((V) / sizeof(T)) * sizeof(T))\n\n#if defined(SQ_IMAGE32)\n# define BytesPerOop\t4\n#elif defined(SQ_IMAGE64)\n# define BytesPerOop\t8\n#else\n# error cannot determine image word size\n#endif\n\n#define BaseHeaderSize\tBytesPerOop\n\n/*** Variables -- Imported from Virtual Machine ***/\n\n/*** Variables -- X11 Related ***/\n\n/* name of Squeak windows in Xrm and the WM */\n#define xResClass\t\"Squeak\"\n#define xResName\t\"squeak\"\n\nchar\t\t*displayName= 0;\t/* name of display, or 0 for $DISPLAY */\nDisplay\t\t*stDisplay= null;\t/* Squeak display */\nint\t\t isConnectedToXServer=0;/* True when connected to an X server */\nint\t\t stXfd= -1;\t\t/* X connection file descriptor */\nWindow\t\t stParent= null;\t/* Squeak parent window */\nWindow\t\t stWindow= null;\t/* Squeak window */\nint\t\t stWidth= 0;\nint\t\t stHeight= 0;\nint\t\t xWidth= 0;\nint\t\t xHeight= 0;\nVisual\t\t*stVisual;\t\t/* the default visual */\nGC\t\t stGC;\t\t\t/* graphics context used for rendering */\nColormap\t stColormap= null;\t/* Squeak color map */\nint\t\t scrW= 0;\nint\t\t scrH= 0;\nXImage\t\t*stImage= 0;\t\t/* ...and it's client-side pixmap */\nchar\t\t*stEmptySelection= \"\";\t/* immutable \"empty string\" value */\nchar\t\t*stPrimarySelection;\t/* buffer holding selection */\nint\t\t stPrimarySelectionSize;/* size of buffer holding selection */\nint\t\t stOwnsSelection= 0;\t/* true if we own the X selection */\nint\t\t stOwnsClipboard= 0;\t/* true if we own the X clipboard */\nint\t\t usePrimaryFirst= 0;\t/* true if we should look to PRIMARY before CLIPBOARD */\nTime\t\t stSelectionTime;\t/* Time of setting the selection */\nAtom\t\t stSelectionName= None; /* None or XdndSelection */\nAtom\t\t stSelectionType= None; /* type to send selection (multiple types should be supported) */\nXColor\t\t stColorBlack;\t\t/* black pixel value in stColormap */\nXColor\t\t stColorWhite;\t\t/* white pixel value in stColormap */\nint\t\t savedWindowOrigin= -1;\t/* initial origin of window */\n\n#define\t\t SELECTION_ATOM_COUNT  10\n/* http://www.freedesktop.org/standards/clipboards-spec/clipboards.txt */\nAtom\t\t selectionAtoms[SELECTION_ATOM_COUNT];\nchar\t\t*selectionAtomNames[SELECTION_ATOM_COUNT]= {\n         \"CLIPBOARD\",\n#define xaClipboard\tselectionAtoms[0]\n\t \"CUT_BUFFER0\",\n#define xaCutBuffer0\tselectionAtoms[1]\n\t \"TARGETS\",\n#define xaTargets\tselectionAtoms[2]\n\t \"MULTIPLE\",\n#define xaMultiple\tselectionAtoms[3]\n\t \"UTF8_STRING\",\n#define xaUTF8String\tselectionAtoms[4]\n\t \"COMPOUND_TEXT\",\n#define xaCompoundText\tselectionAtoms[5]\n\t \"TIMESTAMP\",\n#define xaTimestamp     selectionAtoms[6]\n\t \"SQUEAK_SELECTION\",\t\t/* used for XGetSelectionOwner() data */\n#define selectionAtom   selectionAtoms[7]\n\t \"INCR\",\n#define xaINCR\t\tselectionAtoms[8]\n\t \"XdndSelection\",\n#define xaXdndSelection selectionAtoms[9]\n};\n\nAtom\t\t wmProtocolsAtom;\t/* for window deletion messages */\nAtom\t\t wmDeleteWindowAtom;\n\n#if defined(USE_XSHM)\nXShmSegmentInfo  stShmInfo;\t\t/* shared memory descriptor */\nint\t\t completions= 0;\t/* outstanding completion events */\nint\t\t completionType;\t/* the type of XShmCompletionEvent */\nint\t\t useXshm= 0;\t\t/* 1 if shared memory is in use */\nint\t\t asyncUpdate= 0;\t/* 1 for asynchronous screen updates */\n#endif\n\nint\t\t mapDelBs= 0;\t\t/* 1 to map delete to backspace */\nint\t\t optMapIndex= 0;\t/* Option key modifier map index */\nint\t\t cmdMapIndex= 0;\t/* Command key modifier map index */\nint\t\t stDepth= 0;\nint\t\t stBitsPerPixel= 0;\nunsigned int\t stColors[256];\nunsigned int\t stDownGradingColors[256];\nint\t\t stHasSameRGBMask16;\nint\t\t stHasSameRGBMask32;\nint\t\t stRNMask, stGNMask, stBNMask;\nint\t\t stRShift, stGShift, stBShift;\nchar\t\t*stDisplayBitmap= 0;\nWindow           browserWindow= 0;      /* parent window */\nint\t\t browserPipes[]= {-1, -1}; /* read/write fd for browser communication */\nint\t\t headless= 0;\n\nint\t\t useXdnd= 1;\t\t/* true if we should handle XDND protocol messages */\n\n#if defined(SUGAR)\nchar\t\t*sugarBundleId= 0;\nchar\t\t*sugarActivityId= 0;\n#endif\n\ntypedef int (*x2sqKey_t)(XKeyEvent *xevt, KeySym *symbolic);\n\nstatic int x2sqKeyPlain(XKeyEvent *xevt, KeySym *symbolic);\nstatic int x2sqKeyInput(XKeyEvent *xevt, KeySym *symbolic);\nstatic int x2sqKeyCompositionInput(XKeyEvent *xevt, KeySym *symbolic);\n\nstatic x2sqKey_t x2sqKey= x2sqKeyPlain;\n\nstatic int multi_key_pressed = 0;\nstatic KeySym multi_key_buffer = 0;\nstatic int compositionInput = 0;\n\n/* #define INIT_INPUT_WHEN_KEY_PRESSED */\n/* #define INIT_INPUT_WHEN_FOCUSED_IN */\n/* #define INIT_INPUT_WHEN_MAPPED */\n\n#if defined(INIT_INPUT_WHEN_KEY_PRESSED)\n#  undef INIT_INPUT_WHEN_FOCUSED_IN\n#  undef INIT_INPUT_WHEN_MAPPED\n#elif defined(INIT_INPUT_WHEN_FOCUSED_IN)\n#  undef INIT_INPUT_WHEN_MAPPED\n#elif !defined(INIT_INPUT_WHEN_MAPPED)\n#  define INIT_INPUT_WHEN_MAPPED\n#endif\n\n#if defined(USE_XICFONT_RESOURCE)\n#  include <X11/Xresource.h>\n#  define xicFontResClass \"XIC.FontSet\"\n#  define xicFontResName  \"xic.fontSet\"\n#elif defined(USE_XICFONT_DEFAULT)\n#  define xicFontDefRes  \"fontSet\"\n#endif\n\n#define  xicDefaultFont  \"-*-*-medium-r-normal--*\"\n\n#if defined(USE_XICFONT_OPTION)\nstatic char    *inputFontStr= xicDefaultFont;\n#endif\n\nstatic XFontSet inputFont= NULL;\nstatic XIMStyle inputStyle;\nstatic XIC      inputContext= 0;\nstatic XPoint   inputSpot= {0, 0};\n\nstatic unsigned char  inputString[128];\nstatic unsigned char *inputBuf= inputString;\nstatic unsigned char *pendingKey= NULL;\nstatic int\t      inputCount= 0;\n/* static int\t      inputSymbol= 0; */\n\nstatic void initInputI18n();\n\n#if !defined(INIT_INPUT_WHEN_KEY_PRESSED)\nstatic void initInputNone();\nstatic void (*initInput)()= initInputNone;\n#endif\n\n#define inBrowser()\t(-1 != browserPipes[0])\n\n/* window states */\n\n#define WIN_NORMAL\t0\n#define WIN_CHANGED\t1\n#define WIN_ZOOMED\t2\n\nint windowState= WIN_CHANGED;\n\n#define noteWindowChange()\t\t\t\\\n  {\t\t\t\t\t\t\\\n    if (windowState == WIN_NORMAL)\t\t\\\n      windowState= WIN_CHANGED;\t\t\t\\\n  }\n\n#define recordKeystroke(ignored) 0\n\n#include \"sqUnixEvent.c\"\n\n#ifdef DEBUG_CONV\n# define DCONV_PRINTF(...) printf(__VA_ARGS__)\n# define DCONV_FPRINTF(...) fprintf(stderr,__VA_ARGS__)\n#else\n# define DCONV_PRINTF(...) 0\n# define DCONV_FPRINTF(...) 0\n#endif\n\n\n#define SqueakWhite\t0\n#define SqueakBlack\t1\n\nint sleepWhenUnmapped=\t0;\nint noTitle=\t\t0;\nint fullScreen=\t\t0;\nint iconified=\t\t0;\nint withSpy=\t\t0;\n\n\n/*xxx REMOVE REFS TO THESE IN sqUnixSound*.* */\n\nvoid feedback(int offset, int pixel)\t{}\nint inModalLoop= 0, dpyPitch= 0, dpyPixels= 0;\n\n/* we are interested in these events...\n */\n#define EVENTMASK   \tButtonPressMask | ButtonReleaseMask | \\\n\t\t\tKeyPressMask | KeyReleaseMask | PointerMotionMask | \\\n\t\t      \tExposureMask | VisibilityChangeMask | FocusChangeMask\n\n#define WM_EVENTMASK\tStructureNotifyMask | FocusChangeMask \n\n/* largest X selection that we will attempt to handle (bytes) */\n#define MAX_SELECTION_SIZE\t100*1024\n\n/* longest we're prepared to wait for the selection owner to convert it (seconds) */\n#define SELECTION_TIMEOUT\t3\n\n/* To coordinate default window title with dndLaunchFile */\nstatic char *defaultWindowLabel = shortImageName;\nstatic long launchDropTimeoutMsecs = 1000; /* 1 second default launch drop timeout */\n\n\n/*** Functions ***/\n\nstatic void xHandler(int fd, void *data, int flags);\nstatic void npHandler(int fd, void *data, int flags);\nstatic void handleEvent(XEvent *event);\nstatic int  handleEvents(void);\nstatic void waitForCompletions(void);\nstatic Time getXTimestamp(void);\nstatic void claimSelection(void);\n\n#if defined(DEBUG_SELECTIONS)\nstatic void printAtomName(Atom atom);\n#endif\n\nvoid setWindowSize(void);\nvoid getMaskbit(unsigned long ul, int *nmask, int *shift);\n\nvoid initDownGradingColors(void);\n\nvoid copyReverseImageBytes(int *fromImageData, int *toImageData, int depth, int width, int height,\n\t\t\t   int affectedL, int affectedT, int affectedR, int affectedB);\n\nvoid copyReverseImageWords(int *fromImageData, int *toImageData, int depth, int width, int height,\n\t\t\t   int affectedL, int affectedT, int affectedR, int affectedB);\n\n#define declareCopyFunction(NAME) \\\n  void NAME (int *fromImageData, int *toImageData, int width, int height, \\\n\t     int affectedL, int affectedT, int affectedR, int affectedB)\n\ndeclareCopyFunction(copyImage1To8);\ndeclareCopyFunction(copyImage1To16);\ndeclareCopyFunction(copyImage1To24);\ndeclareCopyFunction(copyImage1To32);\n\ndeclareCopyFunction(copyImage2To8);\ndeclareCopyFunction(copyImage2To16);\ndeclareCopyFunction(copyImage2To24);\ndeclareCopyFunction(copyImage2To32);\n\ndeclareCopyFunction(copyImage4To8);\ndeclareCopyFunction(copyImage4To16);\ndeclareCopyFunction(copyImage4To24);\ndeclareCopyFunction(copyImage4To32);\n\ndeclareCopyFunction(copyImage8To8);\ndeclareCopyFunction(copyImage8To16);\ndeclareCopyFunction(copyImage8To24);\ndeclareCopyFunction(copyImage8To32);\n\ndeclareCopyFunction(copyImage16To8);\ndeclareCopyFunction(copyImage16To16);\ndeclareCopyFunction(copyImage16To24);\ndeclareCopyFunction(copyImage16To32);\n\ndeclareCopyFunction(copyImage32To8);\ndeclareCopyFunction(copyImage32To16);\ndeclareCopyFunction(copyImage32To24);\ndeclareCopyFunction(copyImage32To32);\ndeclareCopyFunction(copyImage32To32Same);\n\n#undef declareCopyFunction\n\nstatic void  redrawDisplay(int l, int r, int t, int b);\n\n/* Selection functions */\n\ntypedef struct _SelectionChunk\n{\n  unsigned char\t\t *data;\n  size_t\t\t  size;\n  struct _SelectionChunk *next;\n  struct _SelectionChunk *last;\n} SelectionChunk;\n\nstatic int   sendSelection(XSelectionRequestEvent *requestEv, int isMultiple);\nstatic void  getSelection(void);\nstatic char *getSelectionData(Atom selection, Atom target, size_t *bytes);\nstatic char *getSelectionFrom(Atom source);\nstatic int   translateCode(KeySym symbolic, int *modp, XKeyEvent *evt);\n\n#if defined(USE_XSHM)\nint    XShmGetEventBase(Display *);\n#endif\nvoid   browserProcessCommand(void);       /* see sqUnixMozilla.c */\n\n\nstatic inline int min(int x, int y) { return (x < y) ? x : y; }\n\n\n#if 0\n\n/* Conversion table from X to Squeak (reversible) */\n\nstatic unsigned char X_to_Squeak[256] =\n{\n  0,   1,   2,   3,   4,   5,   6,   7,       /*   0 -   7 */\n  8,   9,   13,  11,  12,  10,  14,  15,      /*   8 -  15 */\n  16,  17,  18,  19,  20,  21,  22,  23,      /*  16 -  23 */\n  24,  25,  26,  27,  28,  29,  30,  31,      /*  24 -  31 */\n  32,  33,  34,  35,  36,  37,  38,  39,      /*  32 -  39 */\n  40,  41,  42,  43,  44,  45,  46,  47,      /*  40 -  47 */\n  48,  49,  50,  51,  52,  53,  54,  55,      /*  48 -  55 */\n  56,  57,  58,  59,  60,  61,  62,  63,      /*  56 -  63 */\n  64,  65,  66,  67,  68,  69,  70,  71,      /*  64 -  71 */\n  72,  73,  74,  75,  76,  77,  78,  79,      /*  72 -  79 */\n  80,  81,  82,  83,  84,  85,  86,  87,      /*  80 -  87 */\n  88,  89,  90,  91,  92,  93,  94,  95,      /*  88 -  95 */\n  96,  97,  98,  99, 100, 101, 102, 103,      /*  96 - 103 */\n  104, 105, 106, 107, 108, 109, 110, 111,     /* 104 - 111 */\n  112, 113, 114, 115, 116, 117, 118, 119,     /* 112 - 119 */\n  120, 121, 122, 123, 124, 125, 126, 127,     /* 120 - 127 */\n  196, 197, 165, 201, 209, 247, 220, 225,     /* 128 - 135 */\n  224, 226, 228, 227, 198, 176, 170, 248,     /* 136 - 143 */\n  213, 206, 195, 207, 211, 212, 210, 219,     /* 144 - 151 */\n  218, 221, 246, 245, 250, 249, 251, 252,     /* 152 - 159 */\n  160, 193, 162, 163, 223, 180, 182, 164,     /* 160 - 167 */\n  172, 169, 187, 199, 194, 173, 168, 255,     /* 168 - 175 */\n  161, 177, 178, 179, 171, 181, 166, 183,     /* 176 - 183 */\n  184, 185, 188, 200, 186, 189, 202, 192,     /* 184 - 191 */\n  203, 231, 229, 204, 128, 129, 174, 130,     /* 192 - 199 */\n  233, 131, 230, 232, 237, 234, 235, 236,     /* 200 - 207 */\n  208, 132, 241, 238, 239, 205, 133, 215,     /* 208 - 215 */\n  175, 244, 242, 243, 134, 217, 222, 167,     /* 216 - 223 */\n  136, 135, 137, 139, 138, 140, 190, 141,     /* 224 - 231 */\n  143, 142, 144, 145, 147, 146, 148, 149,     /* 232 - 239 */\n  240, 150, 152, 151, 153, 155, 154, 214,     /* 240 - 247 */\n  191, 157, 156, 158, 159, 253, 254, 216,     /* 248 - 255 */\n};\n\nunsigned char Squeak_to_X[256];\n\nvoid initCharmap(void)\n{\n  int i;\n  for(i= 0; i < 256; i++)\n    Squeak_to_X[X_to_Squeak[i]]= i;\n}\n\nvoid st2ux(unsigned char *string)\n{\n  if (!string) return;\n  while (*string)\n    {\n     *string= Squeak_to_X[*string];\n      string++;\n    }\n}\n\nvoid ux2st(unsigned char *string)\n{\n  if (!string) return;\n  while (*string)\n    {\n      *string= X_to_Squeak[*string];\n      string++;\n    }\n}\n\n#endif\n\n/*** X-related Functions ***/\n\n/* Called prior to forking a squeak session.\n */\nint synchronizeXDisplay(void)\n{\n  if (isConnectedToXServer)\n    XSync(stDisplay, False);\n  return 0;\n}\n\nstatic Bool timestampPredicate(Display *dpy, XEvent *evt, XPointer arg)\n{\n  return ((  (PropertyNotify   == evt->type))\n\t  && (stWindow         == evt->xproperty.window)\n\t  && (xaTimestamp      == evt->xproperty.atom)\n\t  && (PropertyNewValue == evt->xproperty.state))\n    ? True : False;\n}\n\n/* answer the real current server time */\n\nstatic Time getXTimestamp(void)\n{\n  unsigned char dummy;\n  XEvent evt;\n\n  XWindowAttributes xwa;\n  XGetWindowAttributes(stDisplay, stWindow, &xwa);\n  XSelectInput(stDisplay, stWindow, xwa.your_event_mask | PropertyChangeMask);\n  XChangeProperty(stDisplay, stWindow, xaTimestamp, XA_INTEGER, 8, PropModeAppend, &dummy, 0);\n  XIfEvent(stDisplay, &evt, timestampPredicate, 0);\n  XSelectInput(stDisplay, stWindow, xwa.your_event_mask);\n  return evt.xproperty.time;\n}\n\n\n#if defined(DEBUG_VISUAL)\nstatic char *debugVisual(int x)\n{\n  switch (x)\n    {\n    case 0: return \"StaticGray\";\n    case 1: return \"GrayScale\";\n    case 2: return \"StaticColor\";\n    case 3: return \"PseudoColor\";\n    case 4: return \"TrueColor\";\n    case 5: return \"DirectColor\";\n    default: return \"Invalid\";\n    }\n}\n#endif\n\n\nstatic void noteResize(int w, int h)\n{\n  xWidth= w;\n  xHeight= h;\n#if defined(USE_XSHM)\n  if (asyncUpdate)\n    waitForCompletions();\n#endif\n  noteWindowChange();\n}\n\n\nstatic int resized(void)\n{\n  return ((stWidth != xWidth) || (stHeight != xHeight));\n}\n\n\n/*** selection handling ***/\n\n\n#if defined(DEBUG_SELECTIONS)\n\nstatic void dumpSelectionData(const char *data, int n, int newline)\n{\n  if (NULL == data)\n    fprintf(stderr, \"dumpSelectionData: data is NULL\\n\");\n  else\n    {\n      for (n= min(30, n);  n > 0;  --n)\n\t{\n\t  unsigned char c= (unsigned char)*data++;\n\t  fprintf(stderr, (0x20 <= c && c <= 0x7e) ? \"%c\" : \"<%02x>\", c);\n\t}\n      if (newline)\n\tfprintf(stderr, \"\\n\");\n    }\n}\n\n/* this is needed because the atom names must be freed */\nstatic void printAtomName(Atom atom)\n{\n  if (None == atom)\n    {\n      fprintf(stderr, \"None\");\n    }\n  else\n    {\n      char *atomName= XGetAtomName(stDisplay, atom);\n      fprintf(stderr, \"%s\", atomName);\n      XFree((void *)atomName);\n    }\n}\n\n#endif\n\n\nstatic int allocateSelectionBuffer(int count)\n{\n/*if (count + 1 > stPrimarySelectionSize)*/\t\t/* XXX test removed for dnd out; maybe should be left in? XXX */\n    {\n      if (stPrimarySelection != stEmptySelection)\n\t{\n\t  free(stPrimarySelection);\n\t  stPrimarySelection= stEmptySelection;\n\t  stPrimarySelectionSize= 0;\n\t}\n      if (!(stPrimarySelection= (char *)malloc(count + 1)))\n\t{\n\t  fprintf(stderr, \"failed to allocate X selection buffer\\n\");\n\t  stPrimarySelection= stEmptySelection;\n \t  stPrimarySelectionSize= 0;\n\t  return 0;\n\t}\n      stPrimarySelectionSize= count;\n    }\n  return 1;\n}\n\n\n/* answers true if selection could be handled */\nstatic int sendSelection(XSelectionRequestEvent *requestEv, int isMultiple)\n{\n  int xError= 0;\n  XSelectionEvent notifyEv;\n  Atom targetProperty= ((None == requestEv->property)\n\t\t\t? requestEv->target \n\t\t\t: requestEv->property);\n\n  /* XSelectionRequestEvent is used for both clipboard and Xdnd.  In\n   * the case of Xdnd, XSelectionEvent is answered asynchronously\n   * after the image prepares data because target (data type) is\n   * informed only when the SelectionRequest is sent.\n   * dndOutSelectionRequest() sends a DragRequest event to the image\n   * for that.  Finally, the image calls\n   * HandMorph>>primitiveDndOutSend: to send the SelectionRequest.\n   */\n  if (xaXdndSelection == requestEv->selection) return 0;\n\n  notifyEv.property= targetProperty;\n\n#if defined(DEBUG_SELECTIONS)\n  fprintf(stderr, \"%d selection request sel \", isMultiple);\n  printAtomName(requestEv->selection);\n  fprintf(stderr, \" prop \");\n  printAtomName(requestEv->property);\n  fprintf(stderr, \" target \");\n  printAtomName(requestEv->target);\n  fprintf(stderr, \"\\n\");\n#endif\n\n  if ((XA_STRING == requestEv->target) || (xaUTF8String == requestEv->target))\n    {\n      int   len= strlen(stPrimarySelection);\n      char *buf= (char *)malloc(len * 3 + 1);\n      int   n;\n\n#    if defined(DEBUG_SELECTIONS)\n      fprintf(stderr, \"sendSelection: len=%d, sel=\", len);\n      dumpSelectionData(stPrimarySelection, len, 1);\n#    endif\n      if (xaUTF8String == requestEv->target)\n        n= sq2uxUTF8(stPrimarySelection, len, buf, len * 3 + 1, 1);\n      else\n        n= sq2uxText(stPrimarySelection, len, buf, len * 3 + 1, 1);\n#    if defined(DEBUG_SELECTIONS)\n      fprintf(stderr, \"sendSelection: n=%d, buf=\", n);\n      dumpSelectionData(buf, n, 1);\n#    endif\n      XChangeProperty(requestEv->display, requestEv->requestor,\n\t\t      targetProperty, requestEv->target,\n\t\t      8, PropModeReplace, (const unsigned char *)buf, n);\n      free(buf);\n    }\n  else if ((stSelectionType == requestEv->target) && (None != stSelectionType))\n    {\n      /* In case of type other than image/png */\n      XChangeProperty(requestEv->display, requestEv->requestor,\n\t\t      targetProperty, requestEv->target,\n\t\t      8, PropModeReplace,\n\t\t      (const unsigned char *) stPrimarySelection,\n\t\t      stPrimarySelectionSize);\n    }\n  else if (xaTargets == requestEv->target)\n    {\n      /* If we don't report COMPOUND_TEXT in this list, KMail (and maybe other\n       * Qt/KDE apps) don't accept pastes from Squeak. Of course, they'll use\n       * UTF8_STRING anyway... */\n      Atom targets[7];\n      int targetsSize= 6;\n      targets[0]= xaTargets;\n      targets[1]= xaMultiple;\n      targets[2]= xaTimestamp;\t        /* required by ICCCM */\n      targets[3]= xaUTF8String;\n      targets[4]= XA_STRING;\n      targets[5]= xaCompoundText;\n      if (stSelectionType != None)\n\t{\n\t  targetsSize += 1;\n\t  targets[6]= stSelectionType;\n\t}\n      xError= XChangeProperty(requestEv->display, requestEv->requestor,\n                              targetProperty, XA_ATOM,\n                              32, PropModeReplace, (unsigned char *)targets, targetsSize);\n    }\n  else if (xaCompoundText == requestEv->target)\n    {\n      /* COMPOUND_TEXT is handled here for older clients that don't handle UTF-8 */\n      XTextProperty  textProperty;\n      char          *list[]= { stPrimarySelection, NULL };\n\n      if (localeEncoding == sqTextEncoding)\n\txError= XmbTextListToTextProperty(requestEv->display, list, 1, XCompoundTextStyle, &textProperty);\n#    if defined(X_HAVE_UTF8_STRING)\n      else if (uxUTF8Encoding == sqTextEncoding)\n\txError= Xutf8TextListToTextProperty(requestEv->display, list, 1, XCompoundTextStyle, &textProperty);\n#    endif\n      else\n\t{\n\t  int\tlen= strlen(stPrimarySelection);\n\t  char *buf= (char *)malloc(len * 3 + 1);\n\n\t  list[0]= buf;\n\t  sq2uxText(stPrimarySelection, len, buf, len * 3 + 1, 1);\n\t  xError= XmbTextListToTextProperty(requestEv->display, list, 1, XCompoundTextStyle, &textProperty);\n\t  free(buf);\n\t}\n\n      if (Success == xError)\n        {\n\t  xError= XChangeProperty(requestEv->display, requestEv->requestor,\n\t\t\t\t  targetProperty, xaCompoundText,\n\t\t\t\t  8, PropModeReplace, textProperty.value, textProperty.nitems);\n          XFree((void *)textProperty.value);\n        }\n      else\n        {\n          fprintf(stderr, \"XmbTextListToTextProperty returns %d\\n\", xError);\n          notifyEv.property= None;\n        }\n    }\n  else if (xaTimestamp == requestEv->target)\n    {\n      xError= XChangeProperty(requestEv->display, requestEv->requestor,\n                              targetProperty, XA_INTEGER,\n                              32, PropModeReplace, (unsigned char *)&stSelectionTime, 1);\n    }\n  else if (xaMultiple == requestEv->target)\n    {\n      /* The ICCCM requires MULTIPLE, but I'm not sure who sends it. */\n      if (None == requestEv->property)\n\t  notifyEv.property= None;\t/* illegal request */\n      else\n\t{\n\t  Atom* multipleAtoms= NULL;\n\t  int\tformat;\n\t  Atom  type;\n\t  unsigned long numberOfItems, bytesAfter;\n\n\t  xError= XGetWindowProperty(requestEv->display,\n\t\t\t\t      requestEv->requestor,\n\t\t\t\t      requestEv->property,\n\t\t\t\t      0, 100, False,\n\t\t\t\t      AnyPropertyType,  /* XA_ATOM */\n\t\t\t\t      &type, &format,\n\t\t\t\t      &numberOfItems,\n\t\t\t\t      &bytesAfter,\n\t\t\t\t      (unsigned char **)&multipleAtoms);\n\t  if ((xError != Success) || (bytesAfter != 0)\n\t      || (format != 32) || (type == None))\n\t    {\n\t      notifyEv.property= None;\n\t    }\n\t  else\n\t    {\n\t      unsigned long i;\n\t      for (i= 0; i < numberOfItems; i+= 2)\n\t\t{\n\t\t  XSelectionRequestEvent individualRequestEv;\n\n\t\t  memcpy(&individualRequestEv, requestEv, sizeof(XSelectionRequestEvent));\n\t\t  individualRequestEv.target= multipleAtoms[i];\n\t\t  individualRequestEv.property= multipleAtoms[i+1];\n\t\t  if (individualRequestEv.target == None)\n\t\t    {\n\t\t      multipleAtoms[i+1]= None;\n\t\t    }\n\t\t  else\n\t\t    {\n\t\t      /* call this function recursively for each target/property pair */\n\t\t      if (!sendSelection(&individualRequestEv, i/2 + 1))\n\t\t\t{\n\t\t\t  multipleAtoms[i+1]= None;\n\t\t\t}\n\t\t    }\n\t\t}\n\t    }\n\t}\n    }\n  else\n    {\n      notifyEv.property= None;\t/* couldn't handle it */\n    }\n\n#if defined(DEBUG_SELECTIONS)\n  if (xError == BadAlloc || xError == BadAtom || xError == BadMatch \n      || xError == BadValue || xError == BadWindow)\n    fprintf(stderr, \"sendSelection: XChangeProperty err %d\\n\", xError);\n#endif\n\n  /* on MULTIPLE requests, we notify only once */\n  if (!isMultiple)\n    {\n      notifyEv.type= SelectionNotify;\n      notifyEv.display= requestEv->display;\n      notifyEv.requestor= requestEv->requestor;\n      notifyEv.selection= requestEv->selection;\n      notifyEv.target= requestEv->target;\n   /* notifyEv.property set above */\n      notifyEv.time= requestEv->time;\n      notifyEv.send_event= True;\n\n      XSendEvent(requestEv->display, requestEv->requestor, False, 0, (XEvent *)&notifyEv);\n      XFlush(stDisplay);\n    }\n\n  return notifyEv.property != None;\n}\n\n\nstatic void getSelection(void)\n{\n  char *data;\n\n  if (usePrimaryFirst)\n    {\n      data= getSelectionFrom(XA_PRIMARY);     /* try PRIMARY first */\n      if (stEmptySelection == data)\n\tdata= getSelectionFrom(xaClipboard);  /* then try CLIPBOARD (TODO CUT_BUFFER0?) */\n    }\n  else\n    {\n      data= getSelectionFrom(xaClipboard);    /* try clipboard first */\n      if (stEmptySelection == data)\n\tdata= getSelectionFrom(XA_PRIMARY);   /* then try PRIMARY */\n    }\n}\n\n\nstatic char *getSelectionFrom(Atom source)\n{\n  char * data= NULL;\n  size_t bytes= 0;\n\n  /* request the selection */\n  Atom target= textEncodingUTF8 ? xaUTF8String : (localeEncoding ? xaCompoundText : XA_STRING);\n\n  data= getSelectionData(source, target, &bytes);\n\n  if (bytes == 0)\n    return stEmptySelection;\n  \n  /* convert the encoding if necessary */\n  if (bytes && allocateSelectionBuffer(bytes))\n    {\n      if (textEncodingUTF8)\n\tbytes= ux2sqUTF8(data, bytes, stPrimarySelection, bytes + 1, 1);\n      else if (localeEncoding)\n\t{\n\t  char        **strList= NULL;\n\t  int           i, n, s= 0;\n\t  XTextProperty textProperty;\n\n\t  textProperty.encoding= xaCompoundText;\n\t  textProperty.format=   8;\n\t  textProperty.value=    data;\n\t  textProperty.nitems=   bytes;\n# if defined(X_HAVE_UTF8_STRING)\n\t  if (uxUTF8Encoding == sqTextEncoding)\n\t    Xutf8TextPropertyToTextList(stDisplay, &textProperty, &strList, &n);\n\t  else\n# endif\n\t    XmbTextPropertyToTextList(stDisplay, &textProperty, &strList, &n);\n\t  for (i= 0;  i < n;  ++i)\n\t    s+= strlen(strList[i]);\n\t  if (s > bytes)\n\t    {\n\t      bytes= min(s, MAX_SELECTION_SIZE - 1);\n\t      if (! allocateSelectionBuffer(bytes))\n\t\t{\n#                if defined(DEBUG_SELECTIONS)\n\t\t  fprintf(stderr, \"no bytes\\n\");\n#                endif    \n\t\t  goto nobytes;\n\t\t}\n\t    }\n\t  if ((localeEncoding == sqTextEncoding)\n#            if defined(X_HAVE_UTF8_STRING)\n\t      || (uxUTF8Encoding == sqTextEncoding)\n#            endif\n\t      )\n\t    {\n\t      strcpy(stPrimarySelection, strList[0]);\n\t      for (i= 1;  i < n;  ++i)\n\t\tstrcat(stPrimarySelection, strList[i]);\n\t    }\n\t  else\n\t    {\n\t      char *to= stPrimarySelection;\n\t      for (i= 0;  i < n - 1;  ++i)\n\t\t{\n\t\t  s= strlen(strList[i]);\n\t\t  s= ux2sqText(strList[i], s, to, bytes, 0);\n\t\t  bytes -= s;\n\t\t  to    += s;\n\t\t}\n\t      s= strlen(strList[n - 1]);\n\t      s= ux2sqText(strList[n - 1], s, to, bytes + 1, 1);\n\t    }\n\t  if (strList)\n\t    XFreeStringList(strList);\n\n\t  /* translate LF -> CR */\n\t  for (i= 0;  stPrimarySelection[i] != '\\0';  ++i)\n\t    if ('\\n' == stPrimarySelection[i])\n\t      stPrimarySelection[i]= '\\r';\n\t}\n      else\n\tbytes= ux2sqText(data, bytes, stPrimarySelection, bytes + 1, 1);\n      /* wrong type check was omitted */\n    }\n  else\n    {\n#     if defined(DEBUG_SELECTIONS)\n      fprintf(stderr, \"no bytes\\n\");\n#     endif\n    }\n nobytes:\n#  if defined(DEBUG_SELECTIONS)\n  fprintf(stderr, \"selection=\");\n  dumpSelectionData(stPrimarySelection, bytes, 1);\n#  endif\n\n  XFree((void *)data);\n  return stPrimarySelection;\n}\n\n\n/* Wait specific event to get property change.\n * Return 1 if success.\n */\nstatic int waitNotify(XEvent *ev, int (*condition)(XEvent *ev))\n{\n  fd_set  fdMask;\n\n  /* wait for selection notification, ignoring (most) other events. */\n  FD_ZERO(&fdMask);\n  if (stXfd >= 0)\n    FD_SET(stXfd, &fdMask);\n  \n  do\n    {\n      if (XPending(stDisplay) == 0)\n\t{\n\t  int status;\n\t  struct timeval timeout= { SELECTION_TIMEOUT, 0 };\n\n\t  while (((status= select(FD_SETSIZE, &fdMask, 0, 0, &timeout)) < 0) && (errno == EINTR))\n\t    ;\n\t  if (status < 0)\n\t    {\n\t      perror(\"select(stDisplay)\");\n\t      return 0; /* stEmptySelection */\n\t    }\n\t  if (status == 0)\n\t    {\n#           if defined(DEBUG_SELECTIONS)\n\t      fprintf(stderr, \"getSelection: select() timeout\\n\");\n#           endif\n\t      if (isConnectedToXServer)\n\t\tXBell(stDisplay, 0);\n\t      return 0;\n\t    }\n\t}\n\n      XNextEvent(stDisplay, ev);\n      switch (ev->type)\n\t{\n\tcase ConfigureNotify:\n\t  noteResize(ev->xconfigure.width, ev->xconfigure.height);\n\t  break;\n\n        /* this is necessary so that we can supply our own selection when we\n\t   are the requestor -- this could (should) be optimised to return the\n\t   stored selection value instead! */\n\tcase SelectionRequest:\n#\t if defined(DEBUG_SELECTIONS)\n\t  fprintf(stderr, \"getSelection: sending own selection\\n\");\n#\t endif\n\t  sendSelection(&ev->xselectionrequest, 0);\n\t  break;\n\n#       if defined(USE_XSHM)\n\tdefault:\n\t  if (ev->type == completionType)\n\t    --completions;\n#       endif\n\t}\n    }\n  while (!condition(ev));\n\n  return 1;\n}\n\nstatic int waitSelectionNotify(XEvent *ev)\n{\n  return ev->type == SelectionNotify;\n}\n\nstatic int waitPropertyNotify(XEvent *ev)\n{\n  return (ev->type == PropertyNotify) && (ev->xproperty.state == PropertyNewValue);\n}\n\n\n/* SelectionChunk functions.\n * SelectionChunk remembers (not copies) buffers from selections.\n * It is useful to handle partial data transfar with XGetWindowProperty.\n */\n\nstatic SelectionChunk *newSelectionChunk(void)\n{\n  SelectionChunk * chunk= malloc(sizeof(SelectionChunk));\n  chunk->data= NULL;\n  chunk->size= 0;\n  chunk->next= NULL;\n  chunk->last=chunk;\n  return chunk;\n}\n\nstatic void destroySelectionChunk(SelectionChunk *chunk)\n{\n  SelectionChunk * i;\n  for (i= chunk; i != NULL;) {\n    SelectionChunk * next= i->next;\n    XFree(i->data);\n    free(i);\n    i= next;\n  }\n}\n\nstatic void addSelectionChunk(SelectionChunk *chunk, unsigned char *src, size_t size)\n{\n  chunk->last->data= src;\n  chunk->last->size= size;\n  chunk->last->next= newSelectionChunk();\n  chunk->last= chunk->last->next;\n}\n\nstatic size_t sizeSelectionChunk(SelectionChunk *chunk)\n{\n  size_t totalSize= 0;\n  SelectionChunk * i;\n  for (i= chunk; i != NULL; i= i->next)\n    totalSize += i->size;\n  return totalSize;\n}\n\nstatic void copySelectionChunk(SelectionChunk *chunk, char *dest)\n{\n  SelectionChunk *i;\n  char *j= dest;\n  for (i= chunk;  i;  j+= i->size, i= i->next)\n    memcpy(j, i->data, i->size);\n}\n\n\n/* get the value of the selection from the containing property */\nstatic size_t getSelectionProperty(SelectionChunk *chunk, Window requestor, Atom property, Atom *actualType)\n{\n  unsigned long bytesAfter= 0, nitems= 0, nread= 0;\n  unsigned char *data= 0;\n  size_t size;\n  int format;\n  \n  do\n    {\n      XGetWindowProperty(stDisplay, requestor, property,\n\t\t\t nread, (MAX_SELECTION_SIZE / 4),\n\t\t\t True, AnyPropertyType,\n\t\t\t actualType, &format, &nitems, &bytesAfter,\n\t\t\t &data);\n      \n      size= nitems * format / 8;\n      nread += size / 4;\n      \n#    if defined(DEBUG_SELECTIONS)\n      fprintf(stderr, \"getprop type \");\n      printAtomName(*actualType);\n      fprintf(stderr, \" format %d nitems %ld bytesAfter %ld\\ndata=\",\n\t      format, nitems, bytesAfter);\n      dumpSelectionData((char *) data, nitems, 1);\n#    endif\n\n      addSelectionChunk(chunk, data, size);\n    }\n  while (bytesAfter);\n\n  return size;\n}\n\nstatic void getSelectionIncr(SelectionChunk *chunk, Window requestor, Atom property)\n{\n  XEvent ev;\n  size_t size;\n  Atom   actualType;\n  do {\n    fprintf(stderr, \"getSelectionIncr: wait next chunk\\n\");\n    waitNotify(&ev, waitPropertyNotify);\n    size= getSelectionProperty(chunk, requestor, property, &actualType);\n  } while (size > 0);\n}\n\n/* Read selection data from the target in the selection,\n * or chunk of zero length if unavailable.\n * Caller must free the returned data with destroySelectionChunk().\n */\nstatic void getSelectionChunk(SelectionChunk *chunk, Atom selection, Atom target)\n{\n  Time\t timestamp= getXTimestamp();\n  XEvent evt;\n  int    success;\n  Atom   actualType;\n  Window requestor;\n  Atom   property;\n\n  XDeleteProperty(stDisplay, stWindow, selectionAtom);\n  XConvertSelection(stDisplay, selection, target, selectionAtom, stWindow, timestamp);\n\n  success= waitNotify(&evt, waitSelectionNotify);\n  if (success == 0) return;\n  requestor= evt.xselection.requestor;\n  property= evt.xselection.property;\n\n  /* check if the selection was refused */\n  if (None == property)\n    {\n#    if defined(DEBUG_SELECTIONS)\n      fprintf(stderr, \"getSelection: xselection.property == None\\n\");\n#    endif\n      if (isConnectedToXServer)\n\tXBell(stDisplay, 0);\n      return;\n    }\n\n  getSelectionProperty(chunk, requestor, property, &actualType);\n\n  if (actualType == xaINCR)\n    {\n      destroySelectionChunk(chunk);\n      chunk= newSelectionChunk();\n      getSelectionIncr(chunk, requestor, property);\n    }\n}\n\n/* Get selection data from the target in the selection.\n * Return NULL if there is no selection data.\n * Caller must free the return data.\n */\nstatic char *getSelectionData(Atom selection, Atom target, size_t *bytes)\n{\n  char *data;\n  SelectionChunk *chunk= newSelectionChunk();\n  getSelectionChunk(chunk, selection, target);\n  *bytes= sizeSelectionChunk(chunk);\n  data= malloc(*bytes);\n  copySelectionChunk(chunk, data);\n  destroySelectionChunk(chunk);\n  return data;\n}\n\n\n/* claim ownership of the X selection, providing the given string to requestors */\n\nstatic void claimSelection(void)\n{\n  Time selectionTime= getXTimestamp();\n\n  XSetSelectionOwner(stDisplay, XA_PRIMARY, stWindow, selectionTime);\n  XSetSelectionOwner(stDisplay, xaClipboard, stWindow, selectionTime);\n  stSelectionTime= selectionTime;\n  XFlush(stDisplay);\n  stOwnsClipboard= (XGetSelectionOwner(stDisplay, xaClipboard) == stWindow);\n  stOwnsSelection= (XGetSelectionOwner(stDisplay, XA_PRIMARY) == stWindow);\n#if defined(DEBUG_SELECTIONS)\n  fprintf(stderr, \"claim selection stOwnsClipboard=%d, stOwnsSelection=%d\\n\",\n\t  stOwnsClipboard, stOwnsSelection);\n#endif\n}\n\n\nvoid initClipboard(void)\n{\n  stPrimarySelection= stEmptySelection;\n  stPrimarySelectionSize= 0;\n  stOwnsSelection= 0;\n  stOwnsClipboard= 0;\n  stSelectionType= None;\n}\n\n\nstatic Atom stringToAtom(char *target, size_t size)\n{\n  char *formatString;\n  Atom  result;\n \n  formatString= (char *) malloc(size + 1);\n  memcpy(formatString, target, size);\n  formatString[size]= 0;\n  result= XInternAtom(stDisplay, formatString, False);\n  free(formatString);\n  return result;\n}\n\n\n/* Prepare to write typed data for the selection; add a 0-terminator\n * at end of the data for safety.\n *\n * selectionName : None (CLIPBOARD and PRIMARY), or XdndSelection\n * type : None (various string), or target type ('image/png' etc.)\n * data : data\n * ndata : size of the data\n * typeName : 0 (various string), or target name ('image/png' etc.)\n * ntypeName : length of typeName\n * isDnd : true if XdndSelection, false if CLIPBOARD or PRIMARY\n * isClaiming : true if XGetSelectionOwner is needed\n */\nstatic void display_clipboardWriteWithType(char *data, size_t ndata, char *typeName, size_t nTypeName, int isDnd, int isClaiming)\n{\n  if (allocateSelectionBuffer(ndata))\n    {\n      Atom type= stringToAtom(typeName, nTypeName);\n      stSelectionName= isDnd ? xaXdndSelection : None;\n      memcpy((void *)stPrimarySelection, data, ndata);\n      stPrimarySelection[ndata]= '\\0';\n      stSelectionType= type;\n      if (isClaiming) claimSelection();\n    }\n}\n\n\nstatic sqInt display_clipboardSize(void)\n{\n  if (stOwnsClipboard) return 0;\n  getSelection();\n  return stPrimarySelectionSize;\n}\n\n\nstatic sqInt display_clipboardWriteFromAt(sqInt count, sqInt byteArrayIndex, sqInt startIndex)\n{\n  display_clipboardWriteWithType(pointerForIndex_xxx_dmu(byteArrayIndex + startIndex), count, NULL, 0, 0, 1);\n  return 0;\n}\n\n/* Transfer the X selection into the given byte array; optimise local requests. */\n/* Call clipboardSize() or clipboardSizeWithType() before this. */\n\nstatic sqInt display_clipboardReadIntoAt(sqInt count, sqInt byteArrayIndex, sqInt startIndex)\n{\n  int clipSize;\n\n  if (!isConnectedToXServer)\n    return 0;\n  clipSize= min(count, stPrimarySelectionSize);\n#if defined(DEBUG_SELECTIONS)\n  fprintf(stderr, \"clipboard read: %d selectionSize %d\\n\", count, stPrimarySelectionSize);\n#endif\n  memcpy((char*)pointerForIndex_xxx_dmu(byteArrayIndex + startIndex), (void *)stPrimarySelection, clipSize);\n  return clipSize;\n}\n\n/* a modified copy of fullDisplayUpdate() that redraws\n   only the damaged parts of the window according to each\n   expose event on the queue.\n   Note: if the format of Form or Bitmap changes, or if\n   the special object index of Display is changed, this\n   version of the code WILL FAIL!  Otherwise it is to be\n   preferred.\n*/\nstatic void redrawDisplay(int l, int r, int t, int b)\n{\n  extern sqInt displayObject(void);\n  extern sqInt lengthOf(sqInt);\n  extern sqInt fetchPointerofObject(sqInt, sqInt);\n\n  sqInt displayObj= displayObject();\n\n  if ((((((unsigned)(oopAt(displayObj))) >> 8) & 15) <= 4)\n      && ((lengthOf(displayObj)) >= 4))\n    {\n      sqInt dispBits= fetchPointerofObject(0, displayObj); // OK xxx_dmu\n      sqInt w= fetchIntegerofObject(1, displayObj);\n      sqInt h= fetchIntegerofObject(2, displayObj);\n      sqInt d= fetchIntegerofObject(3, displayObj);\n      // sqInt dispBitsIndex= dispBits + BaseHeaderSize; xxx_dmu\n      sqInt dispBitsIndex = (sqInt)firstFixedField(dispBits); // xxx_dmu\n      ioShowDisplay(dispBitsIndex, w, h, d, (sqInt)l, (sqInt)r, (sqInt)t, (sqInt)b);\n    }\n}\n\n\nstatic void getMousePosition(void)\n{\n  Window root, child;\n  int rootX, rootY, winX, winY;\n  unsigned int mask;\n  if (True == XQueryPointer(stDisplay, stWindow, &root, &child,\n\t\t\t    &rootX, &rootY, &winX, &winY, &mask))\n    {\n      mousePosition.x= winX;\n      mousePosition.y= winY;\n      /* could update modifiers from mask too, but I can't be bothered... */\n    }\n}\n\n\nint recode(int charCode)\n{\n  if (charCode >= 128)\n    {\n      unsigned char buf[32];\n      unsigned char out[32];\n      buf[0]= charCode;\n      if (convertChars((char *)buf, 1, uxXWinEncoding,\n\t\t       (char *)out, sizeof(out),\n\t\t       sqTextEncoding, 0, 1))\n\tcharCode= out[0];\n#    if DEBUG_KEYBOARD_EVENTS\n      fprintf(stderr, \"  8-bit: %d=%02x [%c->%c]\\n\", charCode, charCode,\n\t      (char *)uxXWinEncoding, (char *)sqTextEncoding);\n#    endif\n    }\n  return charCode;\n}\n\nchar *setLocale(char *localeName, size_t len)\n{\n  char  name[len + 1];\n  char *locale;\n  if (inputContext)\n    {\n      XIM im= XIMOfIC(inputContext);\n      XDestroyIC(inputContext);\n      if (im) XCloseIM(im);\n    }\n  strncpy(name, localeName, len);\n  name[len]= '\\0';\n  if ((locale= setlocale(LC_CTYPE, name)))\n    {\n      setLocaleEncoding(locale);\n      initInputI18n();\n      return locale;\n    }\n  else\n    {\n      if (localeEncoding)\n\t{\n\t  freeEncoding(localeEncoding);\n\t  localeEncoding= NULL;\n\t}\n      inputContext= 0;\n      x2sqKey= x2sqKeyPlain;\n      if (len)\n\tfprintf(stderr, \"setlocale() failed for %s\\n\", name);\n      else\n \tfprintf(stderr, \"setlocale() failed (check values of LC_CTYPE, LANG and LC_ALL)\\n\");\n      return NULL;\n    }\n}\n\nint setCompositionFocus(int focus)\n{\n  if (!inputContext)\n    return 0;\n  if (focus)\n    XSetICFocus(inputContext);\n  else\n    XUnsetICFocus(inputContext);\n  return 1;\n}\n\nint setCompositionWindowPosition(int x, int y)\n{\n  int ret= 1;\n  inputSpot.x= x;\n  inputSpot.y= y;\n  if (inputContext && (inputStyle & XIMPreeditPosition))\n    {\n      XVaNestedList vlist= XVaCreateNestedList(0, XNSpotLocation, &inputSpot, NULL);\n#    if defined(DEBUG_XIM)\n      fprintf(stderr, \"Set Preedit Spot %d %d\\n\", x, y);\n#    endif\n      if (XSetICValues(inputContext, XNPreeditAttributes, vlist, NULL))\n\t{\n\t  fprintf(stderr, \"Failed to Set Preedit Spot\\n\");\n\t  ret= 0;\n\t}\n      XFree(vlist);\n    }\n  return ret;\n}\n\nstatic void setInputContextArea(void)\n{\n    XWindowAttributes wa;\n    XVaNestedList     vlist;\n    XRectangle        pa, sa, *rect;\n    if ((!inputContext) || (inputStyle & XIMPreeditPosition))\n      return;\n    if (inputStyle & XIMPreeditArea)\n      {\n\tXGetWindowAttributes(stDisplay, stWindow, &wa);\n#      if defined(DEBUG_XIM)\n\tfprintf(stderr, \"window geometry %d %d %d %d %d\\n\", wa.x, wa.y, wa.width, wa.height, wa.border_width);\n#      endif\n\twa.width  -= wa.border_width * 2;\n\twa.height -= wa.border_width * 2;\n\tvlist= XVaCreateNestedList(0, XNAreaNeeded, &rect, NULL);\n\tif (XGetICValues(inputContext, XNPreeditAttributes, vlist, NULL))\n\t  {\n\t    fprintf(stderr, \"Failed to Get Needed PreeditArea\\n\");\n\t    pa.x= pa.y= pa.width= pa.height= 0;\n\t  }\n\telse\n\t  {\n\t    pa= *rect;\n#          if defined(DEBUG_XIM)\n\t    fprintf(stderr, \"PreeditArea needs %d %d %u %u\\n\", pa.x, pa.y, pa.width, pa.height);\n#          endif\n\t  }\n\tXFree(vlist);\n\tif (inputStyle & XIMStatusArea)\n\t  {\n\t    static int minWidth= 0, minHeight= 0;\n\t    static XFontSetExtents *extents= NULL;\n\t    if (!extents) \n\t      {\n\t\textents= XExtentsOfFontSet(inputFont);\n\t\tminWidth= extents->max_logical_extent.width * 3;\n\t\tminHeight= extents->max_logical_extent.height - extents->max_logical_extent.y;\n\t      }\n\t    vlist= XVaCreateNestedList(0, XNAreaNeeded, &rect, NULL);\n\t    if (XGetICValues(inputContext, XNStatusAttributes, vlist, NULL))\n\t      {\n\t\tfprintf(stderr, \"Failed to Get Needed StatusArea\\n\");\n\t\tsa.x= sa.y= sa.width= sa.height= 0;\n\t      }\n\t    else\n\t      {\n\t\tsa= *rect;\n#              if defined(DEBUG_XIM)\n\t\tfprintf(stderr, \"StatusArea needs %d %d %u %u\\n\", sa.x, sa.y, sa.width, sa.height);\n#              endif\n\t      }\n\t    XFree(vlist);\n\t    if (minHeight > sa.height)\n\t      pa.height= sa.height= minHeight;\n\t    if (minWidth > sa.width)\n\t      sa.width= minWidth;\n\t    wa.width -= sa.width;\n\t    if (wa.width > pa.width)\n\t      pa.width= wa.width;\n\t    sa.x= wa.border_width;\n\t    pa.x= sa.x + sa.width;\n\t    sa.y= pa.y= wa.height + wa.border_width - sa.height;\n\t    vlist= XVaCreateNestedList(0, XNArea, &sa, NULL);\n\t    if (XSetICValues(inputContext, XNStatusAttributes, vlist, NULL))\n\t      {\n\t\tfprintf(stderr, \"Failed to Set StatusArea %d %d %u %u\\n\", sa.x, sa.y, sa.width, sa.height);\n\t      }\n#          if defined(DEBUG_XIM)\n\t    else\n\t      {\n\t\tXFree(vlist);\n\t\tvlist= XVaCreateNestedList(0, XNArea, &rect, NULL);\n\t\tXGetICValues(inputContext, XNStatusAttributes, vlist, NULL);\n\t\tfprintf(stderr, \"Setted StatusArea %d %d %u %u\\n\", rect->x, rect->y, rect->width, rect->height);\n\t      }\n#          endif\n\t    XFree(vlist);\n\t  }\n\telse\n\t  {\n\t    pa.x= wa.border_width;\n\t    pa.y= wa.border_width;\n\t    if (wa.width > pa.width)\n\t      pa.width= wa.width;\n\t    if (wa.height > pa.height)\n\t      pa.height= wa.height;\n\t  }\n\tvlist= XVaCreateNestedList(0, XNArea, &pa, NULL);\n\tif (XSetICValues(inputContext, XNPreeditAttributes, vlist, NULL))\n\t  {\n\t    fprintf(stderr, \"Failed to Set PreeditArea %d %d %u %u\\n\", pa.x, pa.y, pa.width, pa.height);\n\t  }\n\tXFree(vlist);\n    }\n}\n\n# if !defined(INIT_INPUT_WHEN_KEY_PRESSED)\nstatic void initInputNone(void)\n{\n  /* do nothing */\n}\n# endif\n\nstatic void initInputI18n(void)\n{\n  XIM im;\n# if !defined(INIT_INPUT_WHEN_KEY_PRESSED)\n  initInput= initInputNone;\n# endif\n\n  if (!compositionInput)\n    return;\n\n  x2sqKey= x2sqKeyPlain;\n  if (XSupportsLocale() != True)\n    fprintf(stderr, \"XSupportsLocale() failed.\\n\");\n  else if (!XSetLocaleModifiers(\"\"))\n    fprintf(stderr, \"XSetLocaleModifiers() failed.\\n\");\n  else if (!(im= XOpenIM(stDisplay, 0, 0, 0)))\n    fprintf(stderr, \"XOpenIM() failed\\n\");\n  else\n    {\n      static const XIMStyle pstyle[]= { XIMPreeditPosition, XIMPreeditArea, XIMPreeditNothing, XIMPreeditNone };\n      static const XIMStyle sstyle[]= { XIMStatusArea, XIMStatusNothing, XIMStatusNone, 0 };\n      XIMStyles      *styles;\n      int             i, j, k;\n      XVaNestedList   vlist;\n# if defined(DEBUG_XIM)\n      static const char const *stylename[]= { \"Position\", \"Area\", \"Nothing\", \"None\" };\n      char *locale= XLocaleOfIM(im);\n      fprintf(stderr, \"Locale of im is %s\\n\", locale); \n# endif\n      XGetIMValues(im, XNQueryInputStyle, &styles, NULL);\n      for (i= 0;  i < styles->count_styles;  ++i)\n\tfor (j= 0;  j < sizeof(pstyle)/sizeof(XIMStyle);  ++j)\n\t  for (k= 0;  k < sizeof(pstyle)/sizeof(XIMStyle);  ++k)\n\t    {\n\t      inputStyle= (pstyle[j] | sstyle[k]);\n\t      if (styles->supported_styles[i] == inputStyle)\n\t\tgoto foundStyle;\n\t    }\n      fprintf(stderr, \"Preffered XIMStyles are not Supported.\\n\");\n      return;\n\n    foundStyle:\n# if defined(DEBUG_XIM)\n      fprintf(stderr, \"XIMStyle is Preedit%s and Status%s\\n\", stylename[j], stylename[k + 1]);\n# endif\n      if (!inputFont)\n\t{\n\t  char      **misscharset, *tmpstr;\n# if defined(USE_XICFONT_RESOURCE)\n\t  XrmDatabase db;\n# endif\n# if !defined(USE_XICFONT_OPTION)\n#  if defined(USE_XICFONT_RESOURCE) || defined(USE_XICFONT_DEFAULT)\n\t  char       *inputFontStr;\n#  else\n\t  static char const *inputFontStr= xicDefaultFont;\n#  endif\n# else\n\t  if (!inputFontStr)\n# endif\n\t    {\n#            if defined(USE_XICFONT_RESOURCE)\n\t      static int rmInitialized= 0;\n\n\t      inputFontStr= xicDefaultFont;\n\n\t      if (!rmInitialized)\n\t\t{\n\t\t  XrmInitialize();\n\t\t  rmInitialized= 1;\n\t\t}\n\t      if ((tmpstr= XResourceManagerString(stDisplay)))\n\t\t{\n\t\t  XrmValue val;\n\t\t  char    *type;\n\t\t  db= XrmGetStringDatabase(tmpstr);\n\t\t  if (XrmGetResource(db, xResName  \".\" xicFontResName, xResClass \".\" xicFontResClass, &type, &val))\n\t\t    inputFontStr= (char*)val.addr;\n\t\t}\n#            elif defined(USE_XICFONT_DEFAULT)\n\t      inputFontStr= XGetDefault(stDisplay, xResName, xicFontDefRes);\n\t      if (!inputFontStr)\n\t\tinputFontStr= xicDefaultFont;\n#            endif\n\t    }\n\t  inputFont= XCreateFontSet(stDisplay, inputFontStr, &misscharset, &k, &tmpstr);\n# if defined(USE_XICFONT_RESOURCE)\n\t  /* if db is NULL, XrmDestroyDatabase returns immediatelly */\n\t  XrmDestroyDatabase(db);\n# endif\n\t  if (!inputFont)\n\t    {\n\t      fprintf(stderr, \"XCreateFontSet() failed for \\\"%s\\\"\\n\", inputFontStr);\n\t      /* XNFontSet is mandatory */\n\t      return;\n\t    }\n\t}\n      vlist= XVaCreateNestedList(0,\n\t\t\t\t XNFontSet,       inputFont,\n\t\t\t\t XNSpotLocation, &inputSpot,\n\t\t\t\t NULL);\n      inputContext= XCreateIC(im,\n\t\t\t      XNInputStyle,        inputStyle,\n\t\t\t      XNClientWindow,      stWindow,\n\t\t\t      XNFocusWindow,       stWindow,\n\t\t\t      XNPreeditAttributes, vlist,\n\t\t\t      XNStatusAttributes,  vlist,\n\t\t\t      NULL);\n      XFree(vlist);\n      if (inputContext)\n\t{\n\t  unsigned int mask;\n\t  XWindowAttributes xwa;\n\t  XGetWindowAttributes(stDisplay, stWindow, &xwa);\n\t  XGetICValues(inputContext, XNFilterEvents, &mask, NULL);\n\t  XSelectInput(stDisplay, stWindow, mask | xwa.your_event_mask);\n# if defined(INIT_INPUT_WHEN_KEY_PRESSED)\n\t  setInputContextArea();\n# endif\n\t  x2sqKey= x2sqKeyCompositionInput;\n\t}\n      else\n\tfprintf(stderr, \"XCreateIC() failed\\n\");\n    }\n}\n\n/* Try to read keys into string using lookup function.\n   If buffer overflows, allocate another buffer.\n   Answer the buffer, that the caller must free if it != string.\n*/\n\nstatic unsigned char *lookupKeys(int (*lookup)(XIC, XKeyPressedEvent*, char*, int, KeySym*, Status*),\n\t\t\t\t XKeyEvent *xevt,\n\t\t\t\t unsigned char *string, int size,\n\t\t\t\t int *count, KeySym *symbolic, Status *status)\n{\n  *count= lookup(inputContext, (XKeyPressedEvent *)xevt, string, size, symbolic, status);\n  if (*status == XBufferOverflow)\n    {\n      unsigned char *buf= (unsigned char*)malloc((size_t)(*count * sizeof(unsigned char)));\n      if (buf)\n\t*count= lookup(inputContext, (XKeyPressedEvent *)xevt, buf, *count, symbolic, status);\n      else\n\tfprintf(stderr, \"lookupKeys: out of memory\\n\");\n      return buf;\n    }\n# if defined(DEBUG_XIM)\n  fprintf(stderr, \"lookupKeys: '%s'\\n\", string);\n# endif \n  return string;\n}\n\n/*\n  Answer 1 if some keys are still pending.\n*/\n\nstatic int recordPendingKeys(void)\n{\n  if (inputCount > 0)\n    {\n      int i= iebOut - iebIn;\n      for (i= (i > 0 ? i : IEB_SIZE + i) / 4; i > 0; -- i)\n\t{\n# if defined(DEBUG_XIM)\n\t  fprintf(stderr, \"%3d pending key %2d=0x%02x\\n\", inputCount, i, *pendingKey);\n# endif\n\t  recordKeyboardEvent(*pendingKey, EventKeyDown, modifierState, 0);\n\t  recordKeyboardEvent(*pendingKey, EventKeyChar, modifierState, 0);\n\t  recordKeystroke(*pendingKey);  /* DEPRECATED */\n\t  ++pendingKey;\n\t  if (--inputCount == 0) break;\n\t}\n      return 1;\n    }\n  /* inputBuf is allocated by lookupKeys */\n  if (inputBuf != inputString)\n    {\n      free(inputBuf);\n      inputBuf= inputString;\n    }\n  return 0;\n}\n\nstatic int xkeysym2ucs4(KeySym keysym);\n\nstatic int x2sqKeyInput(XKeyEvent *xevt, KeySym *symbolic)\n{\n  static int initialised= 0;\n  static XIM im= 0;\n  static XIC ic= 0;\n  static int lastKey= -1;\n\n  if (!initialised)\n    {\n      initialised= 1;\n      if (!setlocale(LC_CTYPE, \"\"))\n\t{\n\t  fprintf(stderr, \"setlocale() failed (check values of LC_CTYPE, LANG and LC_ALL)\\n\");\n\t  goto revertInput;\n\t}\n      if (!(im= XOpenIM(stDisplay, 0, 0, 0)))\n\t{\n\t  fprintf(stderr, \"XOpenIM() failed\\n\");\n\t  goto revertInput;\n\t}\n      else\n\t{\n\t  if (!(ic= XCreateIC(im, XNInputStyle, XIMPreeditNothing | XIMStatusNothing, XNClientWindow, stWindow, NULL)))\n\t    {\n\t      fprintf(stderr, \"XCreateIC() failed\\n\");\n\t      goto revertInput;\n\t    }\n\t  else\n\t    {\n\t      unsigned int mask;\n\t      XWindowAttributes xwa;\n\t      XGetWindowAttributes(stDisplay, stWindow, &xwa);\n\t      XGetICValues(ic, XNFilterEvents, &mask, NULL);\n\t      mask |= xwa.your_event_mask;\n\t      XSelectInput(stDisplay, stWindow, mask);\n\t    }\n\t}\n    }\n\n  if (KeyPress != xevt->type)\n    {\n      int key= lastKey;\n      lastKey= -1;\n      return key;\n    }\n\n  DCONV_PRINTF(\"keycode %u\\n\", xevt->keycode);\n\n  {\n    char string[128];\t/* way too much */\n    Status status;\n    int count= XmbLookupString(ic, (XKeyPressedEvent *)xevt, string, sizeof(string), symbolic, &status);\n    switch (status)\n      {\n      case XLookupNone:\t\t/* still composing */\n\tDCONV_FPRINTF(stderr, \"x2sqKey XLookupNone\\n\");\n\treturn -1;\n\n      case XLookupChars:\n\tDCONV_FPRINTF(stderr, \"x2sqKey XLookupChars count %d\\n\", count);\n      case XLookupBoth:\n\tDCONV_FPRINTF(stderr, \"x2sqKey XLookupBoth count %d\\n\", count);\n\tlastKey= (count ? recode(string[0]) : -1);\n\tDCONV_FPRINTF(stderr, \"x2sqKey == %d\\n\", lastKey);\n\treturn lastKey;\n\n      case XLookupKeySym:\n\tDCONV_FPRINTF(stderr, \"x2sqKey XLookupKeySym\\n\");\n\t{\n\t  int charCode= translateCode(*symbolic, 0, xevt);\n\t  DCONV_FPRINTF(\"SYM %d -> %d\\n\", symbolic, charCode);\n\t  if (charCode < 0)\n\t    return -1;\t/* unknown key */\n\t  if ((charCode == 127) && mapDelBs)\n\t    charCode= 8;\n\t  return lastKey= charCode;\n\t}\n\n      default:\n\tfprintf(stderr, \"this cannot happen\\n\");\n\treturn lastKey= -1;\n      }\n    return lastKey= -1;\n  }\n\n revertInput:\n  x2sqKey= x2sqKeyPlain;\n  return x2sqKey(xevt, symbolic);\n}\n\nstatic int x2sqKeyCompositionInput(XKeyEvent *xevt, KeySym *symbolic)\n{\n  static int lastKey= -1;\n\n# if defined(INIT_INPUT_WHEN_KEY_PRESSED)\n  if (!inputContext)\n    {\n      initInputI18n();\n      if (!inputContext)\n\treturn x2sqKeyPlain(xevt, symbolic);\n    }\n# endif\n\n  if (KeyPress != xevt->type)\n    {\n      int key= lastKey;\n      lastKey= -1;\n      return key;\n    }\n\n  DCONV_FPRINTF(stderr, \"keycode %u\\n\", xevt->keycode);\n\n  {\n    Status status;\n    int i;\n    if (localeEncoding == sqTextEncoding)\n      {\n\tif (!(inputBuf= lookupKeys(XmbLookupString, xevt, inputString, sizeof(inputString), &inputCount, symbolic, &status)))\n\t  return lastKey= -1;\n      }\n#  if defined(X_HAVE_UTF8_STRING)\n    else if (uxUTF8Encoding == sqTextEncoding)\n      {\n\tif (!(inputBuf= lookupKeys(Xutf8LookupString, xevt, inputString, sizeof(inputString), &inputCount, symbolic, &status)))\n\t  return lastKey= -1;\n      }\n#  endif\n    else\n      {\n\tunsigned char  aStr[128], *aBuf;\n\tif (!(aBuf= lookupKeys(XmbLookupString, xevt, aStr, sizeof(aStr), &inputCount, symbolic, &status)))\n\t  {\n\t    fprintf(stderr, \"status xmb2: %d\\n\", status);\n\t    return lastKey= -1;\n\t  }\n\tif (inputCount > sizeof(inputString))\n\t  {\n\t    inputBuf= (unsigned char *) malloc((size_t) (inputCount * sizeof(unsigned char)));\n\t    if (!inputBuf)\n\t      {\n\t\t fprintf(stderr, \"x2sqKeyInput: out of memory\\n\");\n\t\t if (aStr != aBuf)\n\t\t   free(aBuf);\n\t\t return lastKey= -1;\n\t      }\n\t  }\n\telse\n\t  inputBuf= inputString;\n\tinputCount= ux2sqXWin(aBuf, inputCount, inputBuf, inputCount, 0);\n\tif (aStr != aBuf)\n\t  free(aBuf);\n      }\n    switch (status)\n      {\n      case XLookupNone:\t\t/* still composing */\n\tDCONV_FPRINTF(stderr, \"x2sqKey XLookupNone\\n\");\n\treturn -1;\n\n      case XLookupChars:\n\tDCONV_FPRINTF(stderr, \"x2sqKey XLookupChars count %d\\n\", inputCount);\n      case XLookupBoth:\n\tDCONV_FPRINTF(stderr, \"x2sqKey XLookupBoth count %d\\n\", inputCount);\n\tif (inputCount == 0)\n\t  return lastKey= -1;\n\telse if (inputCount == 1)\n\t  {\n\t    inputCount= 0;\n\t    return lastKey= recode(inputBuf[0]);\n\t  }\n\telse\n\t  {\n#          if defined(DEBUG_XIM)\n\t    int inputSymbol= xkeysym2ucs4(*symbolic);\n\t    fprintf(stderr, \"x2sqKey string '%s' count %d\\n\", inputBuf, inputCount);\t\n\t    fprintf(stderr, \"x2sqKey symbol 0x%08x => 0x%08x\\n\", *symbolic, inputSymbol);\n#          endif\n\t    /* record the key events here */\n\t    pendingKey= inputBuf;\n\t    recordPendingKeys();\n\n\t    /* unclear which is best value for lastKey... */\n#          if 1\n\t    lastKey= (inputCount == 1 ? inputBuf[0] : -1);\n#          else\n\t    lastKey= (inputCount ? inputBuf[0] : -1);\n\t    lastKey= (inputCount > 0 ? inputBuf[inputCount - 1] : -1);\n#          endif\n\t\n\t    return -1; /* we've already recorded the key events */\n\t  }\n\n      case XLookupKeySym:\n\tDCONV_FPRINTF(stderr, \"x2sqKey XLookupKeySym\\n\");\n\t{\n\t  int charCode;\n\t  if (*symbolic == XK_Multi_key)\n\t    {\n\t      multi_key_pressed= 1;\n\t      multi_key_buffer= 0;\n\t      DCONV_FPRINTF(stderr, \"multi_key was pressed\\n\");\n\t      return -1;\n\t  }\n\t  \n\t  charCode= translateCode(*symbolic, 0, xevt);\n\t  DCONV_PRINTF(\"SYM %x -> %d\\n\", *symbolic, charCode);\n\t  if (charCode < 0)\n\t    return -1;\t/* unknown key */\n\t  if ((charCode == 127) && mapDelBs)\n\t    charCode= 8;\n\t  return lastKey= charCode;\n\t}\n\n      default:\n\tfprintf(stderr, \"this cannot happen\\n\");\n\treturn lastKey= -1;\n      }\n    return lastKey= -1;\n  }\n}\n\n#if DEBUG_KEYBOARD_EVENTS\nstatic const char *nameForKeycode(int keycode);\n#endif\n\nstatic int x2sqKeyPlain(XKeyEvent *xevt, KeySym *symbolic)\n{\n  unsigned char buf[32];\n  int nConv= XLookupString(xevt, (char *)buf, sizeof(buf), symbolic, 0);\n  int charCode= buf[0];\n#if DEBUG_KEYBOARD_EVENTS\n  int i;\n  fprintf(stderr, \"convert keycode\");\n  for (i = 0; i < nConv; i++) {\n\tif (!i) fprintf(stderr, \" [\");\n\tfprintf(stderr, \"%d(%02x)%c\", buf[i], buf[i], i + 1 < nConv ? ',' : ']');\n  }\n  fprintf(stderr, \" %d(%02x) -> %d(%02x) (keysym %p %s)\\n\",\n\t xevt->keycode, xevt->keycode, charCode, charCode, symbolic, nameForKeycode(*symbolic));\n#endif\n  if (!nConv && (charCode= translateCode(*symbolic, &modifierState, xevt)) < 0)\n      return -1;\t/* unknown key */\n  if ((charCode == 127) && mapDelBs)\n    charCode= 8;\n  return nConv == 0 && (modifierState & (CommandKeyBit+CtrlKeyBit+OptionKeyBit))\n\t\t\t? charCode\n\t\t\t: recode(charCode);\n}\n\n\nstatic int xkeysym2ucs4(KeySym keysym)\n{\n  static unsigned short const ucs4_01a1_01ff[] = {\n            0x0104, 0x02d8, 0x0141, 0x0000, 0x013d, 0x015a, 0x0000, /* 0x01a0-0x01a7 */\n    0x0000, 0x0160, 0x015e, 0x0164, 0x0179, 0x0000, 0x017d, 0x017b, /* 0x01a8-0x01af */\n    0x0000, 0x0105, 0x02db, 0x0142, 0x0000, 0x013e, 0x015b, 0x02c7, /* 0x01b0-0x01b7 */\n    0x0000, 0x0161, 0x015f, 0x0165, 0x017a, 0x02dd, 0x017e, 0x017c, /* 0x01b8-0x01bf */\n    0x0154, 0x0000, 0x0000, 0x0102, 0x0000, 0x0139, 0x0106, 0x0000, /* 0x01c0-0x01c7 */\n    0x010c, 0x0000, 0x0118, 0x0000, 0x011a, 0x0000, 0x0000, 0x010e, /* 0x01c8-0x01cf */\n    0x0110, 0x0143, 0x0147, 0x0000, 0x0000, 0x0150, 0x0000, 0x0000, /* 0x01d0-0x01d7 */\n    0x0158, 0x016e, 0x0000, 0x0170, 0x0000, 0x0000, 0x0162, 0x0000, /* 0x01d8-0x01df */\n    0x0155, 0x0000, 0x0000, 0x0103, 0x0000, 0x013a, 0x0107, 0x0000, /* 0x01e0-0x01e7 */\n    0x010d, 0x0000, 0x0119, 0x0000, 0x011b, 0x0000, 0x0000, 0x010f, /* 0x01e8-0x01ef */\n    0x0111, 0x0144, 0x0148, 0x0000, 0x0000, 0x0151, 0x0000, 0x0000, /* 0x01f0-0x01f7 */\n    0x0159, 0x016f, 0x0000, 0x0171, 0x0000, 0x0000, 0x0163, 0x02d9  /* 0x01f8-0x01ff */\n  };\n\n  static unsigned short const ucs4_02a1_02fe[] = {\n            0x0126, 0x0000, 0x0000, 0x0000, 0x0000, 0x0124, 0x0000, /* 0x02a0-0x02a7 */\n    0x0000, 0x0130, 0x0000, 0x011e, 0x0134, 0x0000, 0x0000, 0x0000, /* 0x02a8-0x02af */\n    0x0000, 0x0127, 0x0000, 0x0000, 0x0000, 0x0000, 0x0125, 0x0000, /* 0x02b0-0x02b7 */\n    0x0000, 0x0131, 0x0000, 0x011f, 0x0135, 0x0000, 0x0000, 0x0000, /* 0x02b8-0x02bf */\n    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x010a, 0x0108, 0x0000, /* 0x02c0-0x02c7 */\n    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x02c8-0x02cf */\n    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0120, 0x0000, 0x0000, /* 0x02d0-0x02d7 */\n    0x011c, 0x0000, 0x0000, 0x0000, 0x0000, 0x016c, 0x015c, 0x0000, /* 0x02d8-0x02df */\n    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x010b, 0x0109, 0x0000, /* 0x02e0-0x02e7 */\n    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x02e8-0x02ef */\n    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0121, 0x0000, 0x0000, /* 0x02f0-0x02f7 */\n    0x011d, 0x0000, 0x0000, 0x0000, 0x0000, 0x016d, 0x015d          /* 0x02f8-0x02ff */\n  };\n\n  static unsigned short const ucs4_03a2_03fe[] = {\n                    0x0138, 0x0156, 0x0000, 0x0128, 0x013b, 0x0000, /* 0x03a0-0x03a7 */\n    0x0000, 0x0000, 0x0112, 0x0122, 0x0166, 0x0000, 0x0000, 0x0000, /* 0x03a8-0x03af */\n    0x0000, 0x0000, 0x0000, 0x0157, 0x0000, 0x0129, 0x013c, 0x0000, /* 0x03b0-0x03b7 */\n    0x0000, 0x0000, 0x0113, 0x0123, 0x0167, 0x014a, 0x0000, 0x014b, /* 0x03b8-0x03bf */\n    0x0100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x012e, /* 0x03c0-0x03c7 */\n    0x0000, 0x0000, 0x0000, 0x0000, 0x0116, 0x0000, 0x0000, 0x012a, /* 0x03c8-0x03cf */\n    0x0000, 0x0145, 0x014c, 0x0136, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x03d0-0x03d7 */\n    0x0000, 0x0172, 0x0000, 0x0000, 0x0000, 0x0168, 0x016a, 0x0000, /* 0x03d8-0x03df */\n    0x0101, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x012f, /* 0x03e0-0x03e7 */\n    0x0000, 0x0000, 0x0000, 0x0000, 0x0117, 0x0000, 0x0000, 0x012b, /* 0x03e8-0x03ef */\n    0x0000, 0x0146, 0x014d, 0x0137, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x03f0-0x03f7 */\n    0x0000, 0x0173, 0x0000, 0x0000, 0x0000, 0x0169, 0x016b          /* 0x03f8-0x03ff */\n  };\n\n  static unsigned short const ucs4_04a1_04df[] = {\n            0x3002, 0x3008, 0x3009, 0x3001, 0x30fb, 0x30f2, 0x30a1, /* 0x04a0-0x04a7 */\n    0x30a3, 0x30a5, 0x30a7, 0x30a9, 0x30e3, 0x30e5, 0x30e7, 0x30c3, /* 0x04a8-0x04af */\n    0x30fc, 0x30a2, 0x30a4, 0x30a6, 0x30a8, 0x30aa, 0x30ab, 0x30ad, /* 0x04b0-0x04b7 */\n    0x30af, 0x30b1, 0x30b3, 0x30b5, 0x30b7, 0x30b9, 0x30bb, 0x30bd, /* 0x04b8-0x04bf */\n    0x30bf, 0x30c1, 0x30c4, 0x30c6, 0x30c8, 0x30ca, 0x30cb, 0x30cc, /* 0x04c0-0x04c7 */\n    0x30cd, 0x30ce, 0x30cf, 0x30d2, 0x30d5, 0x30d8, 0x30db, 0x30de, /* 0x04c8-0x04cf */\n    0x30df, 0x30e0, 0x30e1, 0x30e2, 0x30e4, 0x30e6, 0x30e8, 0x30e9, /* 0x04d0-0x04d7 */\n    0x30ea, 0x30eb, 0x30ec, 0x30ed, 0x30ef, 0x30f3, 0x309b, 0x309c  /* 0x04d8-0x04df */\n  };\n\n  static unsigned short const ucs4_0590_05fe[] = {\n    0x06f0, 0x06f1, 0x06f2, 0x06f3, 0x06f4, 0x06f5, 0x06f6, 0x06f7, /* 0x0590-0x0597 */\n    0x06f8, 0x06f9, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x0598-0x059f */\n    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x066a, 0x0670, 0x0679, /* 0x05a0-0x05a7 */\n\t\n    0x067e, 0x0686, 0x0688, 0x0691, 0x060c, 0x0000, 0x06d4, 0x0000, /* 0x05ac-0x05af */\n    0x0660, 0x0661, 0x0662, 0x0663, 0x0664, 0x0665, 0x0666, 0x0667, /* 0x05b0-0x05b7 */\n    0x0668, 0x0669, 0x0000, 0x061b, 0x0000, 0x0000, 0x0000, 0x061f, /* 0x05b8-0x05bf */\n    0x0000, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627, /* 0x05c0-0x05c7 */\n    0x0628, 0x0629, 0x062a, 0x062b, 0x062c, 0x062d, 0x062e, 0x062f, /* 0x05c8-0x05cf */\n    0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637, /* 0x05d0-0x05d7 */\n    0x0638, 0x0639, 0x063a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x05d8-0x05df */\n    0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647, /* 0x05e0-0x05e7 */\n    0x0648, 0x0649, 0x064a, 0x064b, 0x064c, 0x064d, 0x064e, 0x064f, /* 0x05e8-0x05ef */\n    0x0650, 0x0651, 0x0652, 0x0653, 0x0654, 0x0655, 0x0698, 0x06a4, /* 0x05f0-0x05f7 */\n    0x06a9, 0x06af, 0x06ba, 0x06be, 0x06cc, 0x06d2, 0x06c1          /* 0x05f8-0x05fe */\n  };\n\n  static unsigned short ucs4_0680_06ff[] = {\n    0x0492, 0x0496, 0x049a, 0x049c, 0x04a2, 0x04ae, 0x04b0, 0x04b2, /* 0x0680-0x0687 */\n    0x04b6, 0x04b8, 0x04ba, 0x0000, 0x04d8, 0x04e2, 0x04e8, 0x04ee, /* 0x0688-0x068f */\n    0x0493, 0x0497, 0x049b, 0x049d, 0x04a3, 0x04af, 0x04b1, 0x04b3, /* 0x0690-0x0697 */\n    0x04b7, 0x04b9, 0x04bb, 0x0000, 0x04d9, 0x04e3, 0x04e9, 0x04ef, /* 0x0698-0x069f */\n    0x0000, 0x0452, 0x0453, 0x0451, 0x0454, 0x0455, 0x0456, 0x0457, /* 0x06a0-0x06a7 */\n    0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x0491, 0x045e, 0x045f, /* 0x06a8-0x06af */\n    0x2116, 0x0402, 0x0403, 0x0401, 0x0404, 0x0405, 0x0406, 0x0407, /* 0x06b0-0x06b7 */\n    0x0408, 0x0409, 0x040a, 0x040b, 0x040c, 0x0490, 0x040e, 0x040f, /* 0x06b8-0x06bf */\n    0x044e, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, /* 0x06c0-0x06c7 */\n    0x0445, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, /* 0x06c8-0x06cf */\n    0x043f, 0x044f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, /* 0x06d0-0x06d7 */\n    0x044c, 0x044b, 0x0437, 0x0448, 0x044d, 0x0449, 0x0447, 0x044a, /* 0x06d8-0x06df */\n    0x042e, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, /* 0x06e0-0x06e7 */\n    0x0425, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, /* 0x06e8-0x06ef */\n    0x041f, 0x042f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, /* 0x06f0-0x06f7 */\n    0x042c, 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a  /* 0x06f8-0x06ff */\n  };\n\n  static unsigned short const ucs4_07a1_07f9[] = {\n            0x0386, 0x0388, 0x0389, 0x038a, 0x03aa, 0x0000, 0x038c, /* 0x07a0-0x07a7 */\n    0x038e, 0x03ab, 0x0000, 0x038f, 0x0000, 0x0000, 0x0385, 0x2015, /* 0x07a8-0x07af */\n    0x0000, 0x03ac, 0x03ad, 0x03ae, 0x03af, 0x03ca, 0x0390, 0x03cc, /* 0x07b0-0x07b7 */\n    0x03cd, 0x03cb, 0x03b0, 0x03ce, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x07b8-0x07bf */\n    0x0000, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, /* 0x07c0-0x07c7 */\n    0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, /* 0x07c8-0x07cf */\n    0x03a0, 0x03a1, 0x03a3, 0x0000, 0x03a4, 0x03a5, 0x03a6, 0x03a7, /* 0x07d0-0x07d7 */\n    0x03a8, 0x03a9, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x07d8-0x07df */\n    0x0000, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, /* 0x07e0-0x07e7 */\n    0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, /* 0x07e8-0x07ef */\n    0x03c0, 0x03c1, 0x03c3, 0x03c2, 0x03c4, 0x03c5, 0x03c6, 0x03c7, /* 0x07f0-0x07f7 */\n    0x03c8, 0x03c9                                                  /* 0x07f8-0x07ff */\n  };\n\n  static unsigned short const ucs4_08a4_08fe[] = {\n                                    0x2320, 0x2321, 0x0000, 0x231c, /* 0x08a0-0x08a7 */\n    0x231d, 0x231e, 0x231f, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x08a8-0x08af */\n    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x08b0-0x08b7 */\n    0x0000, 0x0000, 0x0000, 0x0000, 0x2264, 0x2260, 0x2265, 0x222b, /* 0x08b8-0x08bf */\n    0x2234, 0x0000, 0x221e, 0x0000, 0x0000, 0x2207, 0x0000, 0x0000, /* 0x08c0-0x08c7 */\n    0x2245, 0x2246, 0x0000, 0x0000, 0x0000, 0x0000, 0x22a2, 0x0000, /* 0x08c8-0x08cf */\n    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x221a, 0x0000, /* 0x08d0-0x08d7 */\n    0x0000, 0x0000, 0x2282, 0x2283, 0x2229, 0x222a, 0x2227, 0x2228, /* 0x08d8-0x08df */\n    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x08e0-0x08e7 */\n    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x08e8-0x08ef */\n    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0192, 0x0000, /* 0x08f0-0x08f7 */\n    0x0000, 0x0000, 0x0000, 0x2190, 0x2191, 0x2192, 0x2193          /* 0x08f8-0x08ff */\n  };\n\n  static unsigned short const ucs4_09df_09f8[] = {\n                                                            0x2422, /* 0x09d8-0x09df */\n    0x2666, 0x25a6, 0x2409, 0x240c, 0x240d, 0x240a, 0x0000, 0x0000, /* 0x09e0-0x09e7 */\n    0x240a, 0x240b, 0x2518, 0x2510, 0x250c, 0x2514, 0x253c, 0x2500, /* 0x09e8-0x09ef */\n    0x0000, 0x0000, 0x0000, 0x0000, 0x251c, 0x2524, 0x2534, 0x252c, /* 0x09f0-0x09f7 */\n    0x2502                                                          /* 0x09f8-0x09ff */\n  };\n\n  static unsigned short const ucs4_0aa1_0afe[] = {\n            0x2003, 0x2002, 0x2004, 0x2005, 0x2007, 0x2008, 0x2009, /* 0x0aa0-0x0aa7 */\n    0x200a, 0x2014, 0x2013, 0x0000, 0x0000, 0x0000, 0x2026, 0x2025, /* 0x0aa8-0x0aaf */\n    0x2153, 0x2154, 0x2155, 0x2156, 0x2157, 0x2158, 0x2159, 0x215a, /* 0x0ab0-0x0ab7 */\n    0x2105, 0x0000, 0x0000, 0x2012, 0x2039, 0x2024, 0x203a, 0x0000, /* 0x0ab8-0x0abf */\n    0x0000, 0x0000, 0x0000, 0x215b, 0x215c, 0x215d, 0x215e, 0x0000, /* 0x0ac0-0x0ac7 */\n    0x0000, 0x2122, 0x2120, 0x0000, 0x25c1, 0x25b7, 0x25cb, 0x25ad, /* 0x0ac8-0x0acf */\n    0x2018, 0x2019, 0x201c, 0x201d, 0x211e, 0x0000, 0x2032, 0x2033, /* 0x0ad0-0x0ad7 */\n    0x0000, 0x271d, 0x0000, 0x220e, 0x25c2, 0x2023, 0x25cf, 0x25ac, /* 0x0ad8-0x0adf */\n    0x25e6, 0x25ab, 0x25ae, 0x25b5, 0x25bf, 0x2606, 0x2022, 0x25aa, /* 0x0ae0-0x0ae7 */\n    0x25b4, 0x25be, 0x261a, 0x261b, 0x2663, 0x2666, 0x2665, 0x0000, /* 0x0ae8-0x0aef */\n    0x2720, 0x2020, 0x2021, 0x2713, 0x2612, 0x266f, 0x266d, 0x2642, /* 0x0af0-0x0af7 */\n    0x2640, 0x2121, 0x2315, 0x2117, 0x2038, 0x201a, 0x201e          /* 0x0af8-0x0aff */\n  };\n\n  static unsigned short const ucs4_0cdf_0cfa[] = {\n                                                            0x2017, /* 0x0cd8-0x0cdf */\n    0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x05d5, 0x05d6, 0x05d7, /* 0x0ce0-0x0ce7 */\n    0x05d8, 0x05d9, 0x05da, 0x05db, 0x05dc, 0x05dd, 0x05de, 0x05df, /* 0x0ce8-0x0cef */\n    0x05e0, 0x05e1, 0x05e2, 0x05e3, 0x05e4, 0x05e5, 0x05e6, 0x05e7, /* 0x0cf0-0x0cf7 */\n    0x05e8, 0x05e9, 0x05ea                                          /* 0x0cf8-0x0cff */\n  };\n\n  static unsigned short const ucs4_0da1_0df9[] = {\n            0x0e01, 0x0e02, 0x0e03, 0x0e04, 0x0e05, 0x0e06, 0x0e07, /* 0x0da0-0x0da7 */\n    0x0e08, 0x0e09, 0x0e0a, 0x0e0b, 0x0e0c, 0x0e0d, 0x0e0e, 0x0e0f, /* 0x0da8-0x0daf */\n    0x0e10, 0x0e11, 0x0e12, 0x0e13, 0x0e14, 0x0e15, 0x0e16, 0x0e17, /* 0x0db0-0x0db7 */\n    0x0e18, 0x0e19, 0x0e1a, 0x0e1b, 0x0e1c, 0x0e1d, 0x0e1e, 0x0e1f, /* 0x0db8-0x0dbf */\n    0x0e20, 0x0e21, 0x0e22, 0x0e23, 0x0e24, 0x0e25, 0x0e26, 0x0e27, /* 0x0dc0-0x0dc7 */\n    0x0e28, 0x0e29, 0x0e2a, 0x0e2b, 0x0e2c, 0x0e2d, 0x0e2e, 0x0e2f, /* 0x0dc8-0x0dcf */\n    0x0e30, 0x0e31, 0x0e32, 0x0e33, 0x0e34, 0x0e35, 0x0e36, 0x0e37, /* 0x0dd0-0x0dd7 */\n    0x0e38, 0x0e39, 0x0e3a, 0x0000, 0x0000, 0x0000, 0x0e3e, 0x0e3f, /* 0x0dd8-0x0ddf */\n    0x0e40, 0x0e41, 0x0e42, 0x0e43, 0x0e44, 0x0e45, 0x0e46, 0x0e47, /* 0x0de0-0x0de7 */\n    0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x0e4d, 0x0000, 0x0000, /* 0x0de8-0x0def */\n    0x0e50, 0x0e51, 0x0e52, 0x0e53, 0x0e54, 0x0e55, 0x0e56, 0x0e57, /* 0x0df0-0x0df7 */\n    0x0e58, 0x0e59                                                  /* 0x0df8-0x0dff */\n  };\n\n  static unsigned short const ucs4_0ea0_0eff[] = {\n    0x0000, 0x1101, 0x1101, 0x11aa, 0x1102, 0x11ac, 0x11ad, 0x1103, /* 0x0ea0-0x0ea7 */\n    0x1104, 0x1105, 0x11b0, 0x11b1, 0x11b2, 0x11b3, 0x11b4, 0x11b5, /* 0x0ea8-0x0eaf */\n    0x11b6, 0x1106, 0x1107, 0x1108, 0x11b9, 0x1109, 0x110a, 0x110b, /* 0x0eb0-0x0eb7 */\n    0x110c, 0x110d, 0x110e, 0x110f, 0x1110, 0x1111, 0x1112, 0x1161, /* 0x0eb8-0x0ebf */\n    0x1162, 0x1163, 0x1164, 0x1165, 0x1166, 0x1167, 0x1168, 0x1169, /* 0x0ec0-0x0ec7 */\n    0x116a, 0x116b, 0x116c, 0x116d, 0x116e, 0x116f, 0x1170, 0x1171, /* 0x0ec8-0x0ecf */\n    0x1172, 0x1173, 0x1174, 0x1175, 0x11a8, 0x11a9, 0x11aa, 0x11ab, /* 0x0ed0-0x0ed7 */\n    0x11ac, 0x11ad, 0x11ae, 0x11af, 0x11b0, 0x11b1, 0x11b2, 0x11b3, /* 0x0ed8-0x0edf */\n    0x11b4, 0x11b5, 0x11b6, 0x11b7, 0x11b8, 0x11b9, 0x11ba, 0x11bb, /* 0x0ee0-0x0ee7 */\n    0x11bc, 0x11bd, 0x11be, 0x11bf, 0x11c0, 0x11c1, 0x11c2, 0x0000, /* 0x0ee8-0x0eef */\n    0x0000, 0x0000, 0x1140, 0x0000, 0x0000, 0x1159, 0x119e, 0x0000, /* 0x0ef0-0x0ef7 */\n    0x11eb, 0x0000, 0x11f9, 0x0000, 0x0000, 0x0000, 0x0000, 0x20a9, /* 0x0ef8-0x0eff */\n  };\n\n  static unsigned short ucs4_12a1_12fe[] = {\n            0x1e02, 0x1e03, 0x0000, 0x0000, 0x0000, 0x1e0a, 0x0000, /* 0x12a0-0x12a7 */\n    0x1e80, 0x0000, 0x1e82, 0x1e0b, 0x1ef2, 0x0000, 0x0000, 0x0000, /* 0x12a8-0x12af */\n    0x1e1e, 0x1e1f, 0x0000, 0x0000, 0x1e40, 0x1e41, 0x0000, 0x1e56, /* 0x12b0-0x12b7 */\n    0x1e81, 0x1e57, 0x1e83, 0x1e60, 0x1ef3, 0x1e84, 0x1e85, 0x1e61, /* 0x12b8-0x12bf */\n    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x12c0-0x12c7 */\n    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x12c8-0x12cf */\n    0x0174, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1e6a, /* 0x12d0-0x12d7 */\n    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0176, 0x0000, /* 0x12d8-0x12df */\n    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x12e0-0x12e7 */\n    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x12e8-0x12ef */\n    0x0175, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1e6b, /* 0x12f0-0x12f7 */\n    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0177          /* 0x12f0-0x12ff */\n  };\n\t\t\n  static unsigned short const ucs4_13bc_13be[] = {\n                                    0x0152, 0x0153, 0x0178          /* 0x13b8-0x13bf */\n  };\n\n  static unsigned short ucs4_14a1_14ff[] = {\n            0x2741, 0x00a7, 0x0589, 0x0029, 0x0028, 0x00bb, 0x00ab, /* 0x14a0-0x14a7 */\n    0x2014, 0x002e, 0x055d, 0x002c, 0x2013, 0x058a, 0x2026, 0x055c, /* 0x14a8-0x14af */\n    0x055b, 0x055e, 0x0531, 0x0561, 0x0532, 0x0562, 0x0533, 0x0563, /* 0x14b0-0x14b7 */\n    0x0534, 0x0564, 0x0535, 0x0565, 0x0536, 0x0566, 0x0537, 0x0567, /* 0x14b8-0x14bf */\n    0x0538, 0x0568, 0x0539, 0x0569, 0x053a, 0x056a, 0x053b, 0x056b, /* 0x14c0-0x14c7 */\n    0x053c, 0x056c, 0x053d, 0x056d, 0x053e, 0x056e, 0x053f, 0x056f, /* 0x14c8-0x14cf */\n    0x0540, 0x0570, 0x0541, 0x0571, 0x0542, 0x0572, 0x0543, 0x0573, /* 0x14d0-0x14d7 */\n    0x0544, 0x0574, 0x0545, 0x0575, 0x0546, 0x0576, 0x0547, 0x0577, /* 0x14d8-0x14df */\n    0x0548, 0x0578, 0x0549, 0x0579, 0x054a, 0x057a, 0x054b, 0x057b, /* 0x14e0-0x14e7 */\n    0x054c, 0x057c, 0x054d, 0x057d, 0x054e, 0x057e, 0x054f, 0x057f, /* 0x14e8-0x14ef */\n    0x0550, 0x0580, 0x0551, 0x0581, 0x0552, 0x0582, 0x0553, 0x0583, /* 0x14f0-0x14f7 */\n    0x0554, 0x0584, 0x0555, 0x0585, 0x0556, 0x0586, 0x2019, 0x0027, /* 0x14f8-0x14ff */\n  };\n\n  static unsigned short ucs4_15d0_15f6[] = {\n    0x10d0, 0x10d1, 0x10d2, 0x10d3, 0x10d4, 0x10d5, 0x10d6, 0x10d7, /* 0x15d0-0x15d7 */\n    0x10d8, 0x10d9, 0x10da, 0x10db, 0x10dc, 0x10dd, 0x10de, 0x10df, /* 0x15d8-0x15df */\n    0x10e0, 0x10e1, 0x10e2, 0x10e3, 0x10e4, 0x10e5, 0x10e6, 0x10e7, /* 0x15e0-0x15e7 */\n    0x10e8, 0x10e9, 0x10ea, 0x10eb, 0x10ec, 0x10ed, 0x10ee, 0x10ef, /* 0x15e8-0x15ef */\n    0x10f0, 0x10f1, 0x10f2, 0x10f3, 0x10f4, 0x10f5, 0x10f6          /* 0x15f0-0x15f7 */\n  };\n\n  static unsigned short ucs4_16a0_16f6[] = {\n    0x0000, 0x0000, 0xf0a2, 0x1e8a, 0x0000, 0xf0a5, 0x012c, 0xf0a7, /* 0x16a0-0x16a7 */\n    0xf0a8, 0x01b5, 0x01e6, 0x0000, 0x0000, 0x0000, 0x0000, 0x019f, /* 0x16a8-0x16af */\n    0x0000, 0x017e, 0xf0b2, 0x1e8b, 0x01d1, 0xf0b5, 0x012d, 0xf0b7, /* 0x16b0-0x16b7 */\n    0xf0b8, 0x01b6, 0x01e7, 0x01d2, 0x0000, 0x0000, 0x0000, 0x0275, /* 0x16b8-0x16bf */\n    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x018f, 0x0000, /* 0x16c0-0x16c7 */\n    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x16c8-0x16cf */\n    0x0000, 0x1e36, 0xf0d2, 0xf0d3, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x16d0-0x16d7 */\n    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x16d8-0x16df */\n    0x0000, 0x1e37, 0xf0e2, 0xf0e3, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x16e0-0x16e7 */\n    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x16e8-0x16ef */\n    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0259          /* 0x16f0-0x16f6 */\n  };\n\n  static unsigned short const ucs4_1e9f_1eff[] = {\n                                                            0x0303,\n    0x1ea0, 0x1ea1, 0x1ea2, 0x1ea3, 0x1ea4, 0x1ea5, 0x1ea6, 0x1ea7, /* 0x1ea0-0x1ea7 */\n    0x1ea8, 0x1ea9, 0x1eaa, 0x1eab, 0x1eac, 0x1ead, 0x1eae, 0x1eaf, /* 0x1ea8-0x1eaf */\n    0x1eb0, 0x1eb1, 0x1eb2, 0x1eb3, 0x1eb4, 0x1eb5, 0x1eb6, 0x1eb7, /* 0x1eb0-0x1eb7 */\n    0x1eb8, 0x1eb9, 0x1eba, 0x1ebb, 0x1ebc, 0x1ebd, 0x1ebe, 0x1ebf, /* 0x1eb8-0x1ebf */\n    0x1ec0, 0x1ec1, 0x1ec2, 0x1ec3, 0x1ec4, 0x1ec5, 0x1ec6, 0x1ec7, /* 0x1ec0-0x1ec7 */\n    0x1ec8, 0x1ec9, 0x1eca, 0x1ecb, 0x1ecc, 0x1ecd, 0x1ece, 0x1ecf, /* 0x1ec8-0x1ecf */\n    0x1ed0, 0x1ed1, 0x1ed2, 0x1ed3, 0x1ed4, 0x1ed5, 0x1ed6, 0x1ed7, /* 0x1ed0-0x1ed7 */\n    0x1ed8, 0x1ed9, 0x1eda, 0x1edb, 0x1edc, 0x1edd, 0x1ede, 0x1edf, /* 0x1ed8-0x1edf */\n    0x1ee0, 0x1ee1, 0x1ee2, 0x1ee3, 0x1ee4, 0x1ee5, 0x1ee6, 0x1ee7, /* 0x1ee0-0x1ee7 */\n    0x1ee8, 0x1ee9, 0x1eea, 0x1eeb, 0x1eec, 0x1eed, 0x1eee, 0x1eef, /* 0x1ee8-0x1eef */\n    0x1ef0, 0x1ef1, 0x0300, 0x0301, 0x1ef4, 0x1ef5, 0x1ef6, 0x1ef7, /* 0x1ef0-0x1ef7 */\n    0x1ef8, 0x1ef9, 0x01a0, 0x01a1, 0x01af, 0x01b0, 0x0309, 0x0323  /* 0x1ef8-0x1eff */\n  };\n\n  static unsigned short const ucs4_20a0_20ac[] = {\n    0x20a0, 0x20a1, 0x20a2, 0x20a3, 0x20a4, 0x20a5, 0x20a6, 0x20a7, /* 0x20a0-0x20a7 */\n    0x20a8, 0x20a9, 0x20aa, 0x20ab, 0x20ac                          /* 0x20a8-0x20af */\n  };\n\n  static unsigned short const sqSpecialKey[] = {1, 28, 30, 29, 31, 11, 12, 4, 1};\n\n  /* Latin-1 */\n  if (   (keysym >= 0x0020 && keysym <= 0x007e)\n      || (keysym >= 0x00a0 && keysym <= 0x00ff)) return keysym;\n\n  /* 24-bit UCS */\n  if ((keysym & 0xff000000) == 0x01000000) return keysym & 0x00ffffff;\n\n  /* control keys with ASCII equivalents */\n  if (keysym > 0xff00 && keysym < 0xff10) return keysym & 0x001f;\n  if (keysym > 0xff4f && keysym < 0xff59)\n    {\n      return sqSpecialKey[keysym - 0xff50];\n    }\n  if (keysym > 0xff58 && keysym < 0xff5f) return keysym & 0x007f; /* could be return 0; */\n  if (keysym > 0xff94 && keysym < 0xff9d)\n    {\n      return sqSpecialKey[keysym - 0xff95];\n    }\n  if (keysym          ==          0xff1b) return keysym & 0x001f;\n  if (keysym          ==          0xffff) return keysym & 0x007f;\n\n  /* explicitly mapped */\n#define map(lo, hi) if (keysym >= 0x##lo && keysym <= 0x##hi) return ucs4_##lo##_##hi[keysym - 0x##lo];\n  map(01a1, 01ff);  map(02a1, 02fe);  map(03a2, 03fe);  map(04a1, 04df);\n  map(0590, 05fe);  map(0680, 06ff);  map(07a1, 07f9);  map(08a4, 08fe);\n  map(09df, 09f8);  map(0aa1, 0afe);  map(0cdf, 0cfa);  map(0da1, 0df9);\n  map(0ea0, 0eff);  map(12a1, 12fe);  map(13bc, 13be);  map(14a1, 14ff);\n  map(15d0, 15f6);  map(16a0, 16f6);  map(1e9f, 1eff);  map(20a0, 20ac);\n#undef map\n\n#if defined(XF86XK_Start)\n  if (keysym == XF86XK_Start)                       /* OLPC view source */\n    {\n      modifierState |= CommandKeyBit;\n      return ',';\n    }\n#endif\n\n  /* convert to chinese char noe-qwan-doo */\n  return 0;\n}\n\n\nstatic int x2sqButton(int button)\n{\n  /* ASSUME: (button >= 1) & (button <= 3) */\n  static int rybMap[4]= { 0, RedButtonBit, YellowButtonBit, BlueButtonBit };\n  static int rbyMap[4]= { 0, RedButtonBit, BlueButtonBit, YellowButtonBit };\n  return (swapBtn ? rbyMap : rybMap)[button];\n}\n\nstatic int x2sqModifier(int state)\n{\n  int mods= 0;\n  if (optMapIndex || cmdMapIndex)\n    {\n      int shift= 1 & (state >> ShiftMapIndex);\n      int ctrl=  1 & (state >> ControlMapIndex);\n      int cmd=   1 & (state >> cmdMapIndex);\n      int opt=   1 & (state >> optMapIndex);\n      mods= (shift ? ShiftKeyBit   : 0)\n\t|   (ctrl  ? CtrlKeyBit    : 0)\n\t|   (cmd   ? CommandKeyBit : 0)\n\t|   (opt   ? OptionKeyBit  : 0);\n#    if DEBUG_KEYBOARD_EVENTS || DEBUG_MOUSE_EVENTS\n      fprintf(stderr, \"X mod %x -> Sq mod %x (extended opt=%d cmd=%d)\\n\", state, mods,\n\t      optMapIndex, cmdMapIndex);\n#    endif\n    }\n  else\n    {\n      enum { _= 0, S= ShiftKeyBit, C= CtrlKeyBit, O= OptionKeyBit, M= CommandKeyBit };\n      static char midofiers[32]= {\t/* ALT=Cmd, META=ignored, C-ALT=Opt, META=ignored */\n       \t/*                - -       - S       L -       L S */\n       \t/* - - - - */ _|_|_|_,  _|_|_|S,  _|_|_|_,  _|_|_|S,\n       \t/* - - - C */ _|_|C|_,  _|_|C|S,  _|_|C|_,  _|_|C|S,\n       \t/* - - A - */ _|M|_|_,  _|M|_|S,  _|M|_|_,  _|M|_|S,\n       \t/* - - A C */ O|_|_|_,  O|_|_|S,  O|_|_|_,  O|_|_|S,\n       \t/*                - -       - S       L -       L S */\n       \t/* M - - - */ _|M|_|_,  _|M|_|S,  _|M|_|_,  _|M|_|S,\n       \t/* M - - C */ _|M|C|_,  _|M|C|S,  _|M|C|_,  _|M|C|S,\n       \t/* M - A - */ _|M|_|_,  _|M|_|S,  _|M|_|_,  _|M|_|S,\n       \t/* M - A C */ O|_|_|_,  O|M|_|S,  O|M|_|_,  O|M|_|S,\n      };\n#    if defined(__POWERPC__) || defined(__ppc__) || Configure_Squeak_Code_for_Tilera // xxx_dmu\n      mods= midofiers[state & 0x1f];\n#    else\n      mods= midofiers[state & 0x0f];\n#    endif\n#    if DEBUG_KEYBOARD_EVENTS || DEBUG_MOUSE_EVENTS\n\tif (mods)\n      fprintf(stderr, \"X mod %x -> Sq mod %x (default)\\n\", state & 0xf, mods);\n#    endif\n    }\n  return mods;\n}\n\n/* wait for pending completion events to arrive */\n\nstatic void waitForCompletions(void)\n{\n#if defined(USE_XSHM)\n  while (completions > 0)\n    handleEvents();\n#endif\n}\n\n\n#include \"sqUnixXdnd.c\"\n\n/* Answers the available types (like \"image/png\") in XdndSelection or\n * CLIPBOARD as a NULL-terminated array of strings, or 0 on error.\n * The caller must free() the returned array.\n */\nstatic char **display_clipboardGetTypeNames(void)\n{\n  Atom    *targets= NULL;\n  size_t   bytes= 0;\n  char   **typeNames= NULL;\n  Status   success= 0;\n  int      nTypeNames= 0;\n\n  if (dndAvailable())\n    dndGetTargets(&targets, &nTypeNames);\n  else \n    {\n      if (stOwnsClipboard) return 0;\n      targets= (Atom *)getSelectionData(xaClipboard, xaTargets, &bytes);\n      if (0 == bytes) return 0;\n      nTypeNames= bytes / sizeof(Atom);\n    }\n\n  typeNames= calloc(nTypeNames + 1, sizeof(char *));\n  if (!XGetAtomNames(stDisplay, targets, nTypeNames, typeNames)) return 0;\n  typeNames[nTypeNames]= 0;\n\n  return typeNames;\n}\n\n/* Read the clipboard data associated with the typeName to\n * stPrimarySelection.  Answer the size of the data.\n */\nstatic sqInt display_clipboardSizeWithType(char *typeName, int nTypeName)\n{\n  size_t \t  bytes;\n  Atom   \t  type;\n  int    \t  isDnd= 0;\n  Atom   \t  inputSelection;\n  SelectionChunk *chunk;\n  \n  isDnd= dndAvailable();\n  inputSelection= isDnd ? xaXdndSelection : xaClipboard;\n\n  if ((!isDnd) && stOwnsClipboard) return 0;\n\n  chunk= newSelectionChunk();\n  type= stringToAtom(typeName, nTypeName);\n  getSelectionChunk(chunk, inputSelection, type);\n  bytes= sizeSelectionChunk(chunk);\n\n  allocateSelectionBuffer(bytes);\n  copySelectionChunk(chunk, stPrimarySelection);\n  destroySelectionChunk(chunk);\n  if (isDnd) dndHandleEvent(DndInFinished, 0);\n\n  return stPrimarySelectionSize;\n}\n\n\n#if DEBUG_KEYBOARD_EVENTS\n/*\ngrep '^#[ \t]*define[ \t][ \t]*XK_.*0x[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][^0-9a-fA-F]' /usr/include/X11/*.h |  sed 's/^.*\\(XK_[^     ]*\\)[   ]*\\(0x[0-9a-fA-F]*\\).*$/{ \"\\1\", \\2 }, /'\n*/\ntypedef struct { char *name; int code; } KeyNameEntry;\nstatic KeyNameEntry codes[] = {\n{ \"XK_BackSpace\", 0xff08 }, \n{ \"XK_Linefeed\", 0xff0a }, \n{ \"XK_Return\", 0xff0d }, \n{ \"XK_Pause\", 0xff13 }, \n{ \"XK_Delete\", 0xffff }, \n{ \"XK_Multi_key\", 0xff20 }, \n{ \"XK_Kanji\", 0xff21 }, \n{ \"XK_Muhenkan\", 0xff22 }, \n{ \"XK_Henkan_Mode\", 0xff23 }, \n{ \"XK_Henkan\", 0xff23 }, \n{ \"XK_Romaji\", 0xff24 }, \n{ \"XK_Hiragana\", 0xff25 }, \n{ \"XK_Katakana\", 0xff26 }, \n{ \"XK_Hiragana_Katakana\", 0xff27 }, \n{ \"XK_Zenkaku\", 0xff28 }, \n{ \"XK_Hankaku\", 0xff29 }, \n{ \"XK_Zenkaku_Hankaku\", 0xff2a }, \n{ \"XK_Touroku\", 0xff2b }, \n{ \"XK_Massyo\", 0xff2c }, \n{ \"XK_Kana_Lock\", 0xff2d }, \n{ \"XK_Kana_Shift\", 0xff2e }, \n{ \"XK_Eisu_Shift\", 0xff2f }, \n{ \"XK_Eisu_toggle\", 0xff30 }, \n{ \"XK_Kanji_Bangou\", 0xff37 }, \n{ \"XK_Zen_Koho\", 0xff3d }, \n{ \"XK_Mae_Koho\", 0xff3e }, \n{ \"XK_Left\", 0xff51 }, \n{ \"XK_Up\", 0xff52 }, \n{ \"XK_Right\", 0xff53 }, \n{ \"XK_Down\", 0xff54 }, \n{ \"XK_Prior\", 0xff55 }, \n{ \"XK_Next\", 0xff56 }, \n{ \"XK_End\", 0xff57 }, \n{ \"XK_Begin\", 0xff58 }, \n{ \"XK_Select\", 0xff60 }, \n{ \"XK_Execute\", 0xff62 }, \n{ \"XK_Insert\", 0xff63 }, \n{ \"XK_Redo\", 0xff66 }, \n{ \"XK_Find\", 0xff68 }, \n{ \"XK_Cancel\", 0xff69 }, \n{ \"XK_Help\", 0xff6a }, \n{ \"XK_Mode_switch\", 0xff7e }, \n{ \"XK_script_switch\", 0xff7e }, \n{ \"XK_KP_Space\", 0xff80 }, \n{ \"XK_KP_Enter\", 0xff8d }, \n{ \"XK_KP_F1\", 0xff91 }, \n{ \"XK_KP_Equal\", 0xffbd }, \n{ \"XK_KP_Separator\", 0xffac }, \n{ \"XK_Shift_L\", 0xffe1 }, \n{ \"XK_Shift_R\", 0xffe2 }, \n{ \"XK_Control_L\", 0xffe3 }, \n{ \"XK_Control_R\", 0xffe4 }, \n{ \"XK_Caps_Lock\", 0xffe5 }, \n{ \"XK_Shift_Lock\", 0xffe6 }, \n{ \"XK_Meta_L\", 0xffe7 }, \n{ \"XK_Meta_R\", 0xffe8 }, \n{ \"XK_Alt_L\", 0xffe9 }, \n{ \"XK_Alt_R\", 0xffea }, \n{ \"XK_Super_L\", 0xffeb }, \n{ \"XK_Super_R\", 0xffec }, \n{ \"XK_Hyper_L\", 0xffed }, \n{ \"XK_Hyper_R\", 0xffee }, \n{ \"XK_ISO_Group_Shift\", 0xff7e }, \n{ \"XK_space\", 0x0020 }, \n{ \"XK_exclam\", 0x0021 }, \n{ \"XK_quotedbl\", 0x0022 }, \n{ \"XK_numbersign\", 0x0023 }, \n{ \"XK_dollar\", 0x0024 }, \n{ \"XK_percent\", 0x0025 }, \n{ \"XK_ampersand\", 0x0026 }, \n{ \"XK_apostrophe\", 0x0027 }, \n{ \"XK_quoteright\", 0x0027 }, \n{ \"XK_parenleft\", 0x0028 }, \n{ \"XK_parenright\", 0x0029 }, \n{ \"XK_asterisk\", 0x002a }, \n{ \"XK_plus\", 0x002b }, \n{ \"XK_comma\", 0x002c }, \n{ \"XK_minus\", 0x002d }, \n{ \"XK_period\", 0x002e }, \n{ \"XK_slash\", 0x002f }, \n{ \"XK_0\", 0x0030 }, \n{ \"XK_1\", 0x0031 }, \n{ \"XK_2\", 0x0032 }, \n{ \"XK_3\", 0x0033 }, \n{ \"XK_4\", 0x0034 }, \n{ \"XK_5\", 0x0035 }, \n{ \"XK_6\", 0x0036 }, \n{ \"XK_7\", 0x0037 }, \n{ \"XK_8\", 0x0038 }, \n{ \"XK_9\", 0x0039 }, \n{ \"XK_colon\", 0x003a }, \n{ \"XK_semicolon\", 0x003b }, \n{ \"XK_less\", 0x003c }, \n{ \"XK_equal\", 0x003d }, \n{ \"XK_greater\", 0x003e }, \n{ \"XK_question\", 0x003f }, \n{ \"XK_at\", 0x0040 }, \n{ \"XK_A\", 0x0041 }, \n{ \"XK_B\", 0x0042 }, \n{ \"XK_C\", 0x0043 }, \n{ \"XK_D\", 0x0044 }, \n{ \"XK_E\", 0x0045 }, \n{ \"XK_F\", 0x0046 }, \n{ \"XK_G\", 0x0047 }, \n{ \"XK_H\", 0x0048 }, \n{ \"XK_I\", 0x0049 }, \n{ \"XK_J\", 0x004a }, \n{ \"XK_K\", 0x004b }, \n{ \"XK_L\", 0x004c }, \n{ \"XK_M\", 0x004d }, \n{ \"XK_N\", 0x004e }, \n{ \"XK_O\", 0x004f }, \n{ \"XK_P\", 0x0050 }, \n{ \"XK_Q\", 0x0051 }, \n{ \"XK_R\", 0x0052 }, \n{ \"XK_S\", 0x0053 }, \n{ \"XK_T\", 0x0054 }, \n{ \"XK_U\", 0x0055 }, \n{ \"XK_V\", 0x0056 }, \n{ \"XK_W\", 0x0057 }, \n{ \"XK_X\", 0x0058 }, \n{ \"XK_Y\", 0x0059 }, \n{ \"XK_Z\", 0x005a }, \n{ \"XK_bracketleft\", 0x005b }, \n{ \"XK_backslash\", 0x005c }, \n{ \"XK_bracketright\", 0x005d }, \n{ \"XK_asciicircum\", 0x005e }, \n{ \"XK_underscore\", 0x005f }, \n{ \"XK_grave\", 0x0060 }, \n{ \"XK_quoteleft\", 0x0060 }, \n{ \"XK_a\", 0x0061 }, \n{ \"XK_b\", 0x0062 }, \n{ \"XK_c\", 0x0063 }, \n{ \"XK_d\", 0x0064 }, \n{ \"XK_e\", 0x0065 }, \n{ \"XK_f\", 0x0066 }, \n{ \"XK_g\", 0x0067 }, \n{ \"XK_h\", 0x0068 }, \n{ \"XK_i\", 0x0069 }, \n{ \"XK_j\", 0x006a }, \n{ \"XK_k\", 0x006b }, \n{ \"XK_l\", 0x006c }, \n{ \"XK_m\", 0x006d }, \n{ \"XK_n\", 0x006e }, \n{ \"XK_o\", 0x006f }, \n{ \"XK_p\", 0x0070 }, \n{ \"XK_q\", 0x0071 }, \n{ \"XK_r\", 0x0072 }, \n{ \"XK_s\", 0x0073 }, \n{ \"XK_t\", 0x0074 }, \n{ \"XK_u\", 0x0075 }, \n{ \"XK_v\", 0x0076 }, \n{ \"XK_w\", 0x0077 }, \n{ \"XK_x\", 0x0078 }, \n{ \"XK_y\", 0x0079 }, \n{ \"XK_z\", 0x007a }, \n{ \"XK_braceleft\", 0x007b }, \n{ \"XK_bar\", 0x007c }, \n{ \"XK_braceright\", 0x007d }, \n{ \"XK_asciitilde\", 0x007e }, \n{ \"XK_nobreakspace\", 0x00a0 }, \n{ \"XK_exclamdown\", 0x00a1 }, \n{ \"XK_cent\", 0x00a2 }, \n{ \"XK_sterling\", 0x00a3 }, \n{ \"XK_currency\", 0x00a4 }, \n{ \"XK_yen\", 0x00a5 }, \n{ \"XK_brokenbar\", 0x00a6 }, \n{ \"XK_section\", 0x00a7 }, \n{ \"XK_diaeresis\", 0x00a8 }, \n{ \"XK_copyright\", 0x00a9 }, \n{ \"XK_ordfeminine\", 0x00aa }, \n{ \"XK_guillemotleft\", 0x00ab }, \n{ \"XK_notsign\", 0x00ac }, \n{ \"XK_hyphen\", 0x00ad }, \n{ \"XK_registered\", 0x00ae }, \n{ \"XK_macron\", 0x00af }, \n{ \"XK_degree\", 0x00b0 }, \n{ \"XK_plusminus\", 0x00b1 }, \n{ \"XK_twosuperior\", 0x00b2 }, \n{ \"XK_threesuperior\", 0x00b3 }, \n{ \"XK_acute\", 0x00b4 }, \n{ \"XK_mu\", 0x00b5 }, \n{ \"XK_paragraph\", 0x00b6 }, \n{ \"XK_periodcentered\", 0x00b7 }, \n{ \"XK_cedilla\", 0x00b8 }, \n{ \"XK_onesuperior\", 0x00b9 }, \n{ \"XK_masculine\", 0x00ba }, \n{ \"XK_guillemotright\", 0x00bb }, \n{ \"XK_onequarter\", 0x00bc }, \n{ \"XK_onehalf\", 0x00bd }, \n{ \"XK_threequarters\", 0x00be }, \n{ \"XK_questiondown\", 0x00bf }, \n{ \"XK_Agrave\", 0x00c0 }, \n{ \"XK_Aacute\", 0x00c1 }, \n{ \"XK_Acircumflex\", 0x00c2 }, \n{ \"XK_Atilde\", 0x00c3 }, \n{ \"XK_Adiaeresis\", 0x00c4 }, \n{ \"XK_Aring\", 0x00c5 }, \n{ \"XK_AE\", 0x00c6 }, \n{ \"XK_Ccedilla\", 0x00c7 }, \n{ \"XK_Egrave\", 0x00c8 }, \n{ \"XK_Eacute\", 0x00c9 }, \n{ \"XK_Ecircumflex\", 0x00ca }, \n{ \"XK_Ediaeresis\", 0x00cb }, \n{ \"XK_Igrave\", 0x00cc }, \n{ \"XK_Iacute\", 0x00cd }, \n{ \"XK_Icircumflex\", 0x00ce }, \n{ \"XK_Idiaeresis\", 0x00cf }, \n{ \"XK_ETH\", 0x00d0 }, \n{ \"XK_Eth\", 0x00d0 }, \n{ \"XK_Ntilde\", 0x00d1 }, \n{ \"XK_Ograve\", 0x00d2 }, \n{ \"XK_Oacute\", 0x00d3 }, \n{ \"XK_Ocircumflex\", 0x00d4 }, \n{ \"XK_Otilde\", 0x00d5 }, \n{ \"XK_Odiaeresis\", 0x00d6 }, \n{ \"XK_multiply\", 0x00d7 }, \n{ \"XK_Oslash\", 0x00d8 }, \n{ \"XK_Ooblique\", 0x00d8 }, \n{ \"XK_Ugrave\", 0x00d9 }, \n{ \"XK_Uacute\", 0x00da }, \n{ \"XK_Ucircumflex\", 0x00db }, \n{ \"XK_Udiaeresis\", 0x00dc }, \n{ \"XK_Yacute\", 0x00dd }, \n{ \"XK_THORN\", 0x00de }, \n{ \"XK_Thorn\", 0x00de }, \n{ \"XK_ssharp\", 0x00df }, \n{ \"XK_agrave\", 0x00e0 }, \n{ \"XK_aacute\", 0x00e1 }, \n{ \"XK_acircumflex\", 0x00e2 }, \n{ \"XK_atilde\", 0x00e3 }, \n{ \"XK_adiaeresis\", 0x00e4 }, \n{ \"XK_aring\", 0x00e5 }, \n{ \"XK_ae\", 0x00e6 }, \n{ \"XK_ccedilla\", 0x00e7 }, \n{ \"XK_egrave\", 0x00e8 }, \n{ \"XK_eacute\", 0x00e9 }, \n{ \"XK_ecircumflex\", 0x00ea }, \n{ \"XK_ediaeresis\", 0x00eb }, \n{ \"XK_igrave\", 0x00ec }, \n{ \"XK_iacute\", 0x00ed }, \n{ \"XK_icircumflex\", 0x00ee }, \n{ \"XK_idiaeresis\", 0x00ef }, \n{ \"XK_eth\", 0x00f0 }, \n{ \"XK_ntilde\", 0x00f1 }, \n{ \"XK_ograve\", 0x00f2 }, \n{ \"XK_oacute\", 0x00f3 }, \n{ \"XK_ocircumflex\", 0x00f4 }, \n{ \"XK_otilde\", 0x00f5 }, \n{ \"XK_odiaeresis\", 0x00f6 }, \n{ \"XK_division\", 0x00f7 }, \n{ \"XK_oslash\", 0x00f8 }, \n{ \"XK_ooblique\", 0x00f8 }, \n{ \"XK_ugrave\", 0x00f9 }, \n{ \"XK_uacute\", 0x00fa }, \n{ \"XK_ucircumflex\", 0x00fb }, \n{ \"XK_udiaeresis\", 0x00fc }, \n{ \"XK_yacute\", 0x00fd }, \n{ \"XK_thorn\", 0x00fe }, \n{ \"XK_ydiaeresis\", 0x00ff }, \n{ \"XK_Aogonek\", 0x01a1 }, \n{ \"XK_breve\", 0x01a2 }, \n{ \"XK_Lstroke\", 0x01a3 }, \n{ \"XK_Lcaron\", 0x01a5 }, \n{ \"XK_Sacute\", 0x01a6 }, \n{ \"XK_Scaron\", 0x01a9 }, \n{ \"XK_Scedilla\", 0x01aa }, \n{ \"XK_Tcaron\", 0x01ab }, \n{ \"XK_Zacute\", 0x01ac }, \n{ \"XK_Zcaron\", 0x01ae }, \n{ \"XK_Zabovedot\", 0x01af }, \n{ \"XK_aogonek\", 0x01b1 }, \n{ \"XK_ogonek\", 0x01b2 }, \n{ \"XK_lstroke\", 0x01b3 }, \n{ \"XK_lcaron\", 0x01b5 }, \n{ \"XK_sacute\", 0x01b6 }, \n{ \"XK_caron\", 0x01b7 }, \n{ \"XK_scaron\", 0x01b9 }, \n{ \"XK_scedilla\", 0x01ba }, \n{ \"XK_tcaron\", 0x01bb }, \n{ \"XK_zacute\", 0x01bc }, \n{ \"XK_doubleacute\", 0x01bd }, \n{ \"XK_zcaron\", 0x01be }, \n{ \"XK_zabovedot\", 0x01bf }, \n{ \"XK_Racute\", 0x01c0 }, \n{ \"XK_Abreve\", 0x01c3 }, \n{ \"XK_Lacute\", 0x01c5 }, \n{ \"XK_Cacute\", 0x01c6 }, \n{ \"XK_Ccaron\", 0x01c8 }, \n{ \"XK_Eogonek\", 0x01ca }, \n{ \"XK_Ecaron\", 0x01cc }, \n{ \"XK_Dcaron\", 0x01cf }, \n{ \"XK_Dstroke\", 0x01d0 }, \n{ \"XK_Nacute\", 0x01d1 }, \n{ \"XK_Ncaron\", 0x01d2 }, \n{ \"XK_Odoubleacute\", 0x01d5 }, \n{ \"XK_Rcaron\", 0x01d8 }, \n{ \"XK_Uring\", 0x01d9 }, \n{ \"XK_Udoubleacute\", 0x01db }, \n{ \"XK_Tcedilla\", 0x01de }, \n{ \"XK_racute\", 0x01e0 }, \n{ \"XK_abreve\", 0x01e3 }, \n{ \"XK_lacute\", 0x01e5 }, \n{ \"XK_cacute\", 0x01e6 }, \n{ \"XK_ccaron\", 0x01e8 }, \n{ \"XK_eogonek\", 0x01ea }, \n{ \"XK_ecaron\", 0x01ec }, \n{ \"XK_dcaron\", 0x01ef }, \n{ \"XK_dstroke\", 0x01f0 }, \n{ \"XK_nacute\", 0x01f1 }, \n{ \"XK_ncaron\", 0x01f2 }, \n{ \"XK_odoubleacute\", 0x01f5 }, \n{ \"XK_udoubleacute\", 0x01fb }, \n{ \"XK_rcaron\", 0x01f8 }, \n{ \"XK_uring\", 0x01f9 }, \n{ \"XK_tcedilla\", 0x01fe }, \n{ \"XK_abovedot\", 0x01ff }, \n{ \"XK_Hstroke\", 0x02a1 }, \n{ \"XK_Hcircumflex\", 0x02a6 }, \n{ \"XK_Iabovedot\", 0x02a9 }, \n{ \"XK_Gbreve\", 0x02ab }, \n{ \"XK_Jcircumflex\", 0x02ac }, \n{ \"XK_hstroke\", 0x02b1 }, \n{ \"XK_hcircumflex\", 0x02b6 }, \n{ \"XK_idotless\", 0x02b9 }, \n{ \"XK_gbreve\", 0x02bb }, \n{ \"XK_jcircumflex\", 0x02bc }, \n{ \"XK_Cabovedot\", 0x02c5 }, \n{ \"XK_Ccircumflex\", 0x02c6 }, \n{ \"XK_Gabovedot\", 0x02d5 }, \n{ \"XK_Gcircumflex\", 0x02d8 }, \n{ \"XK_Ubreve\", 0x02dd }, \n{ \"XK_Scircumflex\", 0x02de }, \n{ \"XK_cabovedot\", 0x02e5 }, \n{ \"XK_ccircumflex\", 0x02e6 }, \n{ \"XK_gabovedot\", 0x02f5 }, \n{ \"XK_gcircumflex\", 0x02f8 }, \n{ \"XK_ubreve\", 0x02fd }, \n{ \"XK_scircumflex\", 0x02fe }, \n{ \"XK_kra\", 0x03a2 }, \n{ \"XK_kappa\", 0x03a2 }, \n{ \"XK_Rcedilla\", 0x03a3 }, \n{ \"XK_Itilde\", 0x03a5 }, \n{ \"XK_Lcedilla\", 0x03a6 }, \n{ \"XK_Emacron\", 0x03aa }, \n{ \"XK_Gcedilla\", 0x03ab }, \n{ \"XK_Tslash\", 0x03ac }, \n{ \"XK_rcedilla\", 0x03b3 }, \n{ \"XK_itilde\", 0x03b5 }, \n{ \"XK_lcedilla\", 0x03b6 }, \n{ \"XK_emacron\", 0x03ba }, \n{ \"XK_gcedilla\", 0x03bb }, \n{ \"XK_tslash\", 0x03bc }, \n{ \"XK_ENG\", 0x03bd }, \n{ \"XK_eng\", 0x03bf }, \n{ \"XK_Amacron\", 0x03c0 }, \n{ \"XK_Iogonek\", 0x03c7 }, \n{ \"XK_Eabovedot\", 0x03cc }, \n{ \"XK_Imacron\", 0x03cf }, \n{ \"XK_Ncedilla\", 0x03d1 }, \n{ \"XK_Omacron\", 0x03d2 }, \n{ \"XK_Kcedilla\", 0x03d3 }, \n{ \"XK_Uogonek\", 0x03d9 }, \n{ \"XK_Utilde\", 0x03dd }, \n{ \"XK_Umacron\", 0x03de }, \n{ \"XK_amacron\", 0x03e0 }, \n{ \"XK_iogonek\", 0x03e7 }, \n{ \"XK_eabovedot\", 0x03ec }, \n{ \"XK_imacron\", 0x03ef }, \n{ \"XK_ncedilla\", 0x03f1 }, \n{ \"XK_omacron\", 0x03f2 }, \n{ \"XK_kcedilla\", 0x03f3 }, \n{ \"XK_uogonek\", 0x03f9 }, \n{ \"XK_utilde\", 0x03fd }, \n{ \"XK_umacron\", 0x03fe }, \n{ \"XK_OE\", 0x13bc }, \n{ \"XK_oe\", 0x13bd }, \n{ \"XK_Ydiaeresis\", 0x13be }, \n{ \"XK_overline\", 0x047e }, \n{ \"XK_kana_fullstop\", 0x04a1 }, \n{ \"XK_kana_openingbracket\", 0x04a2 }, \n{ \"XK_kana_closingbracket\", 0x04a3 }, \n{ \"XK_kana_comma\", 0x04a4 }, \n{ \"XK_kana_conjunctive\", 0x04a5 }, \n{ \"XK_kana_middledot\", 0x04a5 }, \n{ \"XK_kana_WO\", 0x04a6 }, \n{ \"XK_kana_a\", 0x04a7 }, \n{ \"XK_kana_i\", 0x04a8 }, \n{ \"XK_kana_u\", 0x04a9 }, \n{ \"XK_kana_e\", 0x04aa }, \n{ \"XK_kana_o\", 0x04ab }, \n{ \"XK_kana_ya\", 0x04ac }, \n{ \"XK_kana_yu\", 0x04ad }, \n{ \"XK_kana_yo\", 0x04ae }, \n{ \"XK_kana_tsu\", 0x04af }, \n{ \"XK_kana_tu\", 0x04af }, \n{ \"XK_prolongedsound\", 0x04b0 }, \n{ \"XK_kana_A\", 0x04b1 }, \n{ \"XK_kana_I\", 0x04b2 }, \n{ \"XK_kana_U\", 0x04b3 }, \n{ \"XK_kana_E\", 0x04b4 }, \n{ \"XK_kana_O\", 0x04b5 }, \n{ \"XK_kana_KA\", 0x04b6 }, \n{ \"XK_kana_KI\", 0x04b7 }, \n{ \"XK_kana_KU\", 0x04b8 }, \n{ \"XK_kana_KE\", 0x04b9 }, \n{ \"XK_kana_KO\", 0x04ba }, \n{ \"XK_kana_SA\", 0x04bb }, \n{ \"XK_kana_SHI\", 0x04bc }, \n{ \"XK_kana_SU\", 0x04bd }, \n{ \"XK_kana_SE\", 0x04be }, \n{ \"XK_kana_SO\", 0x04bf }, \n{ \"XK_kana_TA\", 0x04c0 }, \n{ \"XK_kana_CHI\", 0x04c1 }, \n{ \"XK_kana_TI\", 0x04c1 }, \n{ \"XK_kana_TSU\", 0x04c2 }, \n{ \"XK_kana_TU\", 0x04c2 }, \n{ \"XK_kana_TE\", 0x04c3 }, \n{ \"XK_kana_TO\", 0x04c4 }, \n{ \"XK_kana_NA\", 0x04c5 }, \n{ \"XK_kana_NI\", 0x04c6 }, \n{ \"XK_kana_NU\", 0x04c7 }, \n{ \"XK_kana_NE\", 0x04c8 }, \n{ \"XK_kana_NO\", 0x04c9 }, \n{ \"XK_kana_HA\", 0x04ca }, \n{ \"XK_kana_HI\", 0x04cb }, \n{ \"XK_kana_FU\", 0x04cc }, \n{ \"XK_kana_HU\", 0x04cc }, \n{ \"XK_kana_HE\", 0x04cd }, \n{ \"XK_kana_HO\", 0x04ce }, \n{ \"XK_kana_MA\", 0x04cf }, \n{ \"XK_kana_MI\", 0x04d0 }, \n{ \"XK_kana_MU\", 0x04d1 }, \n{ \"XK_kana_ME\", 0x04d2 }, \n{ \"XK_kana_MO\", 0x04d3 }, \n{ \"XK_kana_YA\", 0x04d4 }, \n{ \"XK_kana_YU\", 0x04d5 }, \n{ \"XK_kana_YO\", 0x04d6 }, \n{ \"XK_kana_RA\", 0x04d7 }, \n{ \"XK_kana_RI\", 0x04d8 }, \n{ \"XK_kana_RU\", 0x04d9 }, \n{ \"XK_kana_RE\", 0x04da }, \n{ \"XK_kana_RO\", 0x04db }, \n{ \"XK_kana_WA\", 0x04dc }, \n{ \"XK_kana_N\", 0x04dd }, \n{ \"XK_voicedsound\", 0x04de }, \n{ \"XK_semivoicedsound\", 0x04df }, \n{ \"XK_kana_switch\", 0xff7e }, \n{ \"XK_Arabic_comma\", 0x05ac }, \n{ \"XK_Arabic_semicolon\", 0x05bb }, \n{ \"XK_Arabic_question_mark\", 0x05bf }, \n{ \"XK_Arabic_hamza\", 0x05c1 }, \n{ \"XK_Arabic_maddaonalef\", 0x05c2 }, \n{ \"XK_Arabic_hamzaonalef\", 0x05c3 }, \n{ \"XK_Arabic_hamzaonwaw\", 0x05c4 }, \n{ \"XK_Arabic_hamzaunderalef\", 0x05c5 }, \n{ \"XK_Arabic_hamzaonyeh\", 0x05c6 }, \n{ \"XK_Arabic_alef\", 0x05c7 }, \n{ \"XK_Arabic_beh\", 0x05c8 }, \n{ \"XK_Arabic_tehmarbuta\", 0x05c9 }, \n{ \"XK_Arabic_teh\", 0x05ca }, \n{ \"XK_Arabic_theh\", 0x05cb }, \n{ \"XK_Arabic_jeem\", 0x05cc }, \n{ \"XK_Arabic_hah\", 0x05cd }, \n{ \"XK_Arabic_khah\", 0x05ce }, \n{ \"XK_Arabic_dal\", 0x05cf }, \n{ \"XK_Arabic_thal\", 0x05d0 }, \n{ \"XK_Arabic_ra\", 0x05d1 }, \n{ \"XK_Arabic_zain\", 0x05d2 }, \n{ \"XK_Arabic_seen\", 0x05d3 }, \n{ \"XK_Arabic_sheen\", 0x05d4 }, \n{ \"XK_Arabic_sad\", 0x05d5 }, \n{ \"XK_Arabic_dad\", 0x05d6 }, \n{ \"XK_Arabic_tah\", 0x05d7 }, \n{ \"XK_Arabic_zah\", 0x05d8 }, \n{ \"XK_Arabic_ain\", 0x05d9 }, \n{ \"XK_Arabic_ghain\", 0x05da }, \n{ \"XK_Arabic_tatweel\", 0x05e0 }, \n{ \"XK_Arabic_feh\", 0x05e1 }, \n{ \"XK_Arabic_qaf\", 0x05e2 }, \n{ \"XK_Arabic_kaf\", 0x05e3 }, \n{ \"XK_Arabic_lam\", 0x05e4 }, \n{ \"XK_Arabic_meem\", 0x05e5 }, \n{ \"XK_Arabic_noon\", 0x05e6 }, \n{ \"XK_Arabic_ha\", 0x05e7 }, \n{ \"XK_Arabic_heh\", 0x05e7 }, \n{ \"XK_Arabic_waw\", 0x05e8 }, \n{ \"XK_Arabic_alefmaksura\", 0x05e9 }, \n{ \"XK_Arabic_yeh\", 0x05ea }, \n{ \"XK_Arabic_fathatan\", 0x05eb }, \n{ \"XK_Arabic_dammatan\", 0x05ec }, \n{ \"XK_Arabic_kasratan\", 0x05ed }, \n{ \"XK_Arabic_fatha\", 0x05ee }, \n{ \"XK_Arabic_damma\", 0x05ef }, \n{ \"XK_Arabic_kasra\", 0x05f0 }, \n{ \"XK_Arabic_shadda\", 0x05f1 }, \n{ \"XK_Arabic_sukun\", 0x05f2 }, \n{ \"XK_Arabic_switch\", 0xff7e }, \n{ \"XK_Serbian_dje\", 0x06a1 }, \n{ \"XK_Macedonia_gje\", 0x06a2 }, \n{ \"XK_Cyrillic_io\", 0x06a3 }, \n{ \"XK_Ukrainian_ie\", 0x06a4 }, \n{ \"XK_Ukranian_je\", 0x06a4 }, \n{ \"XK_Macedonia_dse\", 0x06a5 }, \n{ \"XK_Ukrainian_i\", 0x06a6 }, \n{ \"XK_Ukranian_i\", 0x06a6 }, \n{ \"XK_Ukrainian_yi\", 0x06a7 }, \n{ \"XK_Ukranian_yi\", 0x06a7 }, \n{ \"XK_Cyrillic_je\", 0x06a8 }, \n{ \"XK_Serbian_je\", 0x06a8 }, \n{ \"XK_Cyrillic_lje\", 0x06a9 }, \n{ \"XK_Serbian_lje\", 0x06a9 }, \n{ \"XK_Cyrillic_nje\", 0x06aa }, \n{ \"XK_Serbian_nje\", 0x06aa }, \n{ \"XK_Serbian_tshe\", 0x06ab }, \n{ \"XK_Macedonia_kje\", 0x06ac }, \n{ \"XK_Ukrainian_ghe_with_upturn\", 0x06ad }, \n{ \"XK_Byelorussian_shortu\", 0x06ae }, \n{ \"XK_Cyrillic_dzhe\", 0x06af }, \n{ \"XK_Serbian_dze\", 0x06af }, \n{ \"XK_numerosign\", 0x06b0 }, \n{ \"XK_Serbian_DJE\", 0x06b1 }, \n{ \"XK_Macedonia_GJE\", 0x06b2 }, \n{ \"XK_Cyrillic_IO\", 0x06b3 }, \n{ \"XK_Ukrainian_IE\", 0x06b4 }, \n{ \"XK_Ukranian_JE\", 0x06b4 }, \n{ \"XK_Macedonia_DSE\", 0x06b5 }, \n{ \"XK_Ukrainian_I\", 0x06b6 }, \n{ \"XK_Ukranian_I\", 0x06b6 }, \n{ \"XK_Ukrainian_YI\", 0x06b7 }, \n{ \"XK_Ukranian_YI\", 0x06b7 }, \n{ \"XK_Cyrillic_JE\", 0x06b8 }, \n{ \"XK_Serbian_JE\", 0x06b8 }, \n{ \"XK_Cyrillic_LJE\", 0x06b9 }, \n{ \"XK_Serbian_LJE\", 0x06b9 }, \n{ \"XK_Cyrillic_NJE\", 0x06ba }, \n{ \"XK_Serbian_NJE\", 0x06ba }, \n{ \"XK_Serbian_TSHE\", 0x06bb }, \n{ \"XK_Macedonia_KJE\", 0x06bc }, \n{ \"XK_Ukrainian_GHE_WITH_UPTURN\", 0x06bd }, \n{ \"XK_Byelorussian_SHORTU\", 0x06be }, \n{ \"XK_Cyrillic_DZHE\", 0x06bf }, \n{ \"XK_Serbian_DZE\", 0x06bf }, \n{ \"XK_Cyrillic_yu\", 0x06c0 }, \n{ \"XK_Cyrillic_a\", 0x06c1 }, \n{ \"XK_Cyrillic_be\", 0x06c2 }, \n{ \"XK_Cyrillic_tse\", 0x06c3 }, \n{ \"XK_Cyrillic_de\", 0x06c4 }, \n{ \"XK_Cyrillic_ie\", 0x06c5 }, \n{ \"XK_Cyrillic_ef\", 0x06c6 }, \n{ \"XK_Cyrillic_ghe\", 0x06c7 }, \n{ \"XK_Cyrillic_ha\", 0x06c8 }, \n{ \"XK_Cyrillic_i\", 0x06c9 }, \n{ \"XK_Cyrillic_shorti\", 0x06ca }, \n{ \"XK_Cyrillic_ka\", 0x06cb }, \n{ \"XK_Cyrillic_el\", 0x06cc }, \n{ \"XK_Cyrillic_em\", 0x06cd }, \n{ \"XK_Cyrillic_en\", 0x06ce }, \n{ \"XK_Cyrillic_o\", 0x06cf }, \n{ \"XK_Cyrillic_pe\", 0x06d0 }, \n{ \"XK_Cyrillic_ya\", 0x06d1 }, \n{ \"XK_Cyrillic_er\", 0x06d2 }, \n{ \"XK_Cyrillic_es\", 0x06d3 }, \n{ \"XK_Cyrillic_te\", 0x06d4 }, \n{ \"XK_Cyrillic_u\", 0x06d5 }, \n{ \"XK_Cyrillic_zhe\", 0x06d6 }, \n{ \"XK_Cyrillic_ve\", 0x06d7 }, \n{ \"XK_Cyrillic_softsign\", 0x06d8 }, \n{ \"XK_Cyrillic_yeru\", 0x06d9 }, \n{ \"XK_Cyrillic_ze\", 0x06da }, \n{ \"XK_Cyrillic_sha\", 0x06db }, \n{ \"XK_Cyrillic_e\", 0x06dc }, \n{ \"XK_Cyrillic_shcha\", 0x06dd }, \n{ \"XK_Cyrillic_che\", 0x06de }, \n{ \"XK_Cyrillic_hardsign\", 0x06df }, \n{ \"XK_Cyrillic_YU\", 0x06e0 }, \n{ \"XK_Cyrillic_A\", 0x06e1 }, \n{ \"XK_Cyrillic_BE\", 0x06e2 }, \n{ \"XK_Cyrillic_TSE\", 0x06e3 }, \n{ \"XK_Cyrillic_DE\", 0x06e4 }, \n{ \"XK_Cyrillic_IE\", 0x06e5 }, \n{ \"XK_Cyrillic_EF\", 0x06e6 }, \n{ \"XK_Cyrillic_GHE\", 0x06e7 }, \n{ \"XK_Cyrillic_HA\", 0x06e8 }, \n{ \"XK_Cyrillic_I\", 0x06e9 }, \n{ \"XK_Cyrillic_SHORTI\", 0x06ea }, \n{ \"XK_Cyrillic_KA\", 0x06eb }, \n{ \"XK_Cyrillic_EL\", 0x06ec }, \n{ \"XK_Cyrillic_EM\", 0x06ed }, \n{ \"XK_Cyrillic_EN\", 0x06ee }, \n{ \"XK_Cyrillic_O\", 0x06ef }, \n{ \"XK_Cyrillic_PE\", 0x06f0 }, \n{ \"XK_Cyrillic_YA\", 0x06f1 }, \n{ \"XK_Cyrillic_ER\", 0x06f2 }, \n{ \"XK_Cyrillic_ES\", 0x06f3 }, \n{ \"XK_Cyrillic_TE\", 0x06f4 }, \n{ \"XK_Cyrillic_U\", 0x06f5 }, \n{ \"XK_Cyrillic_ZHE\", 0x06f6 }, \n{ \"XK_Cyrillic_VE\", 0x06f7 }, \n{ \"XK_Cyrillic_SOFTSIGN\", 0x06f8 }, \n{ \"XK_Cyrillic_YERU\", 0x06f9 }, \n{ \"XK_Cyrillic_ZE\", 0x06fa }, \n{ \"XK_Cyrillic_SHA\", 0x06fb }, \n{ \"XK_Cyrillic_E\", 0x06fc }, \n{ \"XK_Cyrillic_SHCHA\", 0x06fd }, \n{ \"XK_Cyrillic_CHE\", 0x06fe }, \n{ \"XK_Cyrillic_HARDSIGN\", 0x06ff }, \n{ \"XK_Greek_ALPHAaccent\", 0x07a1 }, \n{ \"XK_Greek_EPSILONaccent\", 0x07a2 }, \n{ \"XK_Greek_ETAaccent\", 0x07a3 }, \n{ \"XK_Greek_IOTAaccent\", 0x07a4 }, \n{ \"XK_Greek_IOTAdieresis\", 0x07a5 }, \n{ \"XK_Greek_IOTAdiaeresis\", 0x07a5 }, \n{ \"XK_Greek_OMICRONaccent\", 0x07a7 }, \n{ \"XK_Greek_UPSILONaccent\", 0x07a8 }, \n{ \"XK_Greek_UPSILONdieresis\", 0x07a9 }, \n{ \"XK_Greek_OMEGAaccent\", 0x07ab }, \n{ \"XK_Greek_accentdieresis\", 0x07ae }, \n{ \"XK_Greek_horizbar\", 0x07af }, \n{ \"XK_Greek_alphaaccent\", 0x07b1 }, \n{ \"XK_Greek_epsilonaccent\", 0x07b2 }, \n{ \"XK_Greek_etaaccent\", 0x07b3 }, \n{ \"XK_Greek_iotaaccent\", 0x07b4 }, \n{ \"XK_Greek_iotadieresis\", 0x07b5 }, \n{ \"XK_Greek_iotaaccentdieresis\", 0x07b6 }, \n{ \"XK_Greek_omicronaccent\", 0x07b7 }, \n{ \"XK_Greek_upsilonaccent\", 0x07b8 }, \n{ \"XK_Greek_upsilondieresis\", 0x07b9 }, \n{ \"XK_Greek_upsilonaccentdieresis\", 0x07ba }, \n{ \"XK_Greek_omegaaccent\", 0x07bb }, \n{ \"XK_Greek_ALPHA\", 0x07c1 }, \n{ \"XK_Greek_BETA\", 0x07c2 }, \n{ \"XK_Greek_GAMMA\", 0x07c3 }, \n{ \"XK_Greek_DELTA\", 0x07c4 }, \n{ \"XK_Greek_EPSILON\", 0x07c5 }, \n{ \"XK_Greek_ZETA\", 0x07c6 }, \n{ \"XK_Greek_ETA\", 0x07c7 }, \n{ \"XK_Greek_THETA\", 0x07c8 }, \n{ \"XK_Greek_IOTA\", 0x07c9 }, \n{ \"XK_Greek_KAPPA\", 0x07ca }, \n{ \"XK_Greek_LAMDA\", 0x07cb }, \n{ \"XK_Greek_LAMBDA\", 0x07cb }, \n{ \"XK_Greek_MU\", 0x07cc }, \n{ \"XK_Greek_NU\", 0x07cd }, \n{ \"XK_Greek_XI\", 0x07ce }, \n{ \"XK_Greek_OMICRON\", 0x07cf }, \n{ \"XK_Greek_PI\", 0x07d0 }, \n{ \"XK_Greek_RHO\", 0x07d1 }, \n{ \"XK_Greek_SIGMA\", 0x07d2 }, \n{ \"XK_Greek_TAU\", 0x07d4 }, \n{ \"XK_Greek_UPSILON\", 0x07d5 }, \n{ \"XK_Greek_PHI\", 0x07d6 }, \n{ \"XK_Greek_CHI\", 0x07d7 }, \n{ \"XK_Greek_PSI\", 0x07d8 }, \n{ \"XK_Greek_OMEGA\", 0x07d9 }, \n{ \"XK_Greek_alpha\", 0x07e1 }, \n{ \"XK_Greek_beta\", 0x07e2 }, \n{ \"XK_Greek_gamma\", 0x07e3 }, \n{ \"XK_Greek_delta\", 0x07e4 }, \n{ \"XK_Greek_epsilon\", 0x07e5 }, \n{ \"XK_Greek_zeta\", 0x07e6 }, \n{ \"XK_Greek_eta\", 0x07e7 }, \n{ \"XK_Greek_theta\", 0x07e8 }, \n{ \"XK_Greek_iota\", 0x07e9 }, \n{ \"XK_Greek_kappa\", 0x07ea }, \n{ \"XK_Greek_lamda\", 0x07eb }, \n{ \"XK_Greek_lambda\", 0x07eb }, \n{ \"XK_Greek_mu\", 0x07ec }, \n{ \"XK_Greek_nu\", 0x07ed }, \n{ \"XK_Greek_xi\", 0x07ee }, \n{ \"XK_Greek_omicron\", 0x07ef }, \n{ \"XK_Greek_pi\", 0x07f0 }, \n{ \"XK_Greek_rho\", 0x07f1 }, \n{ \"XK_Greek_sigma\", 0x07f2 }, \n{ \"XK_Greek_finalsmallsigma\", 0x07f3 }, \n{ \"XK_Greek_tau\", 0x07f4 }, \n{ \"XK_Greek_upsilon\", 0x07f5 }, \n{ \"XK_Greek_phi\", 0x07f6 }, \n{ \"XK_Greek_chi\", 0x07f7 }, \n{ \"XK_Greek_psi\", 0x07f8 }, \n{ \"XK_Greek_omega\", 0x07f9 }, \n{ \"XK_Greek_switch\", 0xff7e }, \n{ \"XK_leftradical\", 0x08a1 }, \n{ \"XK_topleftradical\", 0x08a2 }, \n{ \"XK_horizconnector\", 0x08a3 }, \n{ \"XK_topintegral\", 0x08a4 }, \n{ \"XK_botintegral\", 0x08a5 }, \n{ \"XK_vertconnector\", 0x08a6 }, \n{ \"XK_topleftsqbracket\", 0x08a7 }, \n{ \"XK_botleftsqbracket\", 0x08a8 }, \n{ \"XK_toprightsqbracket\", 0x08a9 }, \n{ \"XK_botrightsqbracket\", 0x08aa }, \n{ \"XK_topleftparens\", 0x08ab }, \n{ \"XK_botleftparens\", 0x08ac }, \n{ \"XK_toprightparens\", 0x08ad }, \n{ \"XK_botrightparens\", 0x08ae }, \n{ \"XK_leftmiddlecurlybrace\", 0x08af }, \n{ \"XK_rightmiddlecurlybrace\", 0x08b0 }, \n{ \"XK_lessthanequal\", 0x08bc }, \n{ \"XK_notequal\", 0x08bd }, \n{ \"XK_greaterthanequal\", 0x08be }, \n{ \"XK_integral\", 0x08bf }, \n{ \"XK_therefore\", 0x08c0 }, \n{ \"XK_variation\", 0x08c1 }, \n{ \"XK_infinity\", 0x08c2 }, \n{ \"XK_nabla\", 0x08c5 }, \n{ \"XK_approximate\", 0x08c8 }, \n{ \"XK_similarequal\", 0x08c9 }, \n{ \"XK_ifonlyif\", 0x08cd }, \n{ \"XK_implies\", 0x08ce }, \n{ \"XK_identical\", 0x08cf }, \n{ \"XK_radical\", 0x08d6 }, \n{ \"XK_includedin\", 0x08da }, \n{ \"XK_includes\", 0x08db }, \n{ \"XK_intersection\", 0x08dc }, \n{ \"XK_union\", 0x08dd }, \n{ \"XK_logicaland\", 0x08de }, \n{ \"XK_logicalor\", 0x08df }, \n{ \"XK_partialderivative\", 0x08ef }, \n{ \"XK_function\", 0x08f6 }, \n{ \"XK_leftarrow\", 0x08fb }, \n{ \"XK_uparrow\", 0x08fc }, \n{ \"XK_rightarrow\", 0x08fd }, \n{ \"XK_downarrow\", 0x08fe }, \n{ \"XK_soliddiamond\", 0x09e0 }, \n{ \"XK_checkerboard\", 0x09e1 }, \n{ \"XK_ht\", 0x09e2 }, \n{ \"XK_ff\", 0x09e3 }, \n{ \"XK_cr\", 0x09e4 }, \n{ \"XK_lf\", 0x09e5 }, \n{ \"XK_nl\", 0x09e8 }, \n{ \"XK_vt\", 0x09e9 }, \n{ \"XK_lowrightcorner\", 0x09ea }, \n{ \"XK_uprightcorner\", 0x09eb }, \n{ \"XK_upleftcorner\", 0x09ec }, \n{ \"XK_lowleftcorner\", 0x09ed }, \n{ \"XK_crossinglines\", 0x09ee }, \n{ \"XK_horizlinescan1\", 0x09ef }, \n{ \"XK_horizlinescan3\", 0x09f0 }, \n{ \"XK_horizlinescan5\", 0x09f1 }, \n{ \"XK_horizlinescan7\", 0x09f2 }, \n{ \"XK_horizlinescan9\", 0x09f3 }, \n{ \"XK_leftt\", 0x09f4 }, \n{ \"XK_rightt\", 0x09f5 }, \n{ \"XK_bott\", 0x09f6 }, \n{ \"XK_topt\", 0x09f7 }, \n{ \"XK_vertbar\", 0x09f8 }, \n{ \"XK_emspace\", 0x0aa1 }, \n{ \"XK_enspace\", 0x0aa2 }, \n{ \"XK_em3space\", 0x0aa3 }, \n{ \"XK_em4space\", 0x0aa4 }, \n{ \"XK_digitspace\", 0x0aa5 }, \n{ \"XK_punctspace\", 0x0aa6 }, \n{ \"XK_thinspace\", 0x0aa7 }, \n{ \"XK_hairspace\", 0x0aa8 }, \n{ \"XK_emdash\", 0x0aa9 }, \n{ \"XK_endash\", 0x0aaa }, \n{ \"XK_signifblank\", 0x0aac }, \n{ \"XK_ellipsis\", 0x0aae }, \n{ \"XK_doubbaselinedot\", 0x0aaf }, \n{ \"XK_onethird\", 0x0ab0 }, \n{ \"XK_twothirds\", 0x0ab1 }, \n{ \"XK_onefifth\", 0x0ab2 }, \n{ \"XK_twofifths\", 0x0ab3 }, \n{ \"XK_threefifths\", 0x0ab4 }, \n{ \"XK_fourfifths\", 0x0ab5 }, \n{ \"XK_onesixth\", 0x0ab6 }, \n{ \"XK_fivesixths\", 0x0ab7 }, \n{ \"XK_careof\", 0x0ab8 }, \n{ \"XK_figdash\", 0x0abb }, \n{ \"XK_leftanglebracket\", 0x0abc }, \n{ \"XK_decimalpoint\", 0x0abd }, \n{ \"XK_rightanglebracket\", 0x0abe }, \n{ \"XK_oneeighth\", 0x0ac3 }, \n{ \"XK_threeeighths\", 0x0ac4 }, \n{ \"XK_fiveeighths\", 0x0ac5 }, \n{ \"XK_seveneighths\", 0x0ac6 }, \n{ \"XK_trademark\", 0x0ac9 }, \n{ \"XK_signaturemark\", 0x0aca }, \n{ \"XK_leftopentriangle\", 0x0acc }, \n{ \"XK_rightopentriangle\", 0x0acd }, \n{ \"XK_emopencircle\", 0x0ace }, \n{ \"XK_emopenrectangle\", 0x0acf }, \n{ \"XK_leftsinglequotemark\", 0x0ad0 }, \n{ \"XK_rightsinglequotemark\", 0x0ad1 }, \n{ \"XK_leftdoublequotemark\", 0x0ad2 }, \n{ \"XK_rightdoublequotemark\", 0x0ad3 }, \n{ \"XK_prescription\", 0x0ad4 }, \n{ \"XK_minutes\", 0x0ad6 }, \n{ \"XK_seconds\", 0x0ad7 }, \n{ \"XK_latincross\", 0x0ad9 }, \n{ \"XK_filledrectbullet\", 0x0adb }, \n{ \"XK_filledlefttribullet\", 0x0adc }, \n{ \"XK_filledrighttribullet\", 0x0add }, \n{ \"XK_emfilledcircle\", 0x0ade }, \n{ \"XK_emfilledrect\", 0x0adf }, \n{ \"XK_enopencircbullet\", 0x0ae0 }, \n{ \"XK_enopensquarebullet\", 0x0ae1 }, \n{ \"XK_openrectbullet\", 0x0ae2 }, \n{ \"XK_opentribulletup\", 0x0ae3 }, \n{ \"XK_opentribulletdown\", 0x0ae4 }, \n{ \"XK_openstar\", 0x0ae5 }, \n{ \"XK_enfilledcircbullet\", 0x0ae6 }, \n{ \"XK_enfilledsqbullet\", 0x0ae7 }, \n{ \"XK_filledtribulletup\", 0x0ae8 }, \n{ \"XK_filledtribulletdown\", 0x0ae9 }, \n{ \"XK_leftpointer\", 0x0aea }, \n{ \"XK_rightpointer\", 0x0aeb }, \n{ \"XK_club\", 0x0aec }, \n{ \"XK_diamond\", 0x0aed }, \n{ \"XK_heart\", 0x0aee }, \n{ \"XK_maltesecross\", 0x0af0 }, \n{ \"XK_dagger\", 0x0af1 }, \n{ \"XK_doubledagger\", 0x0af2 }, \n{ \"XK_checkmark\", 0x0af3 }, \n{ \"XK_ballotcross\", 0x0af4 }, \n{ \"XK_musicalsharp\", 0x0af5 }, \n{ \"XK_musicalflat\", 0x0af6 }, \n{ \"XK_malesymbol\", 0x0af7 }, \n{ \"XK_femalesymbol\", 0x0af8 }, \n{ \"XK_telephone\", 0x0af9 }, \n{ \"XK_telephonerecorder\", 0x0afa }, \n{ \"XK_phonographcopyright\", 0x0afb }, \n{ \"XK_caret\", 0x0afc }, \n{ \"XK_singlelowquotemark\", 0x0afd }, \n{ \"XK_doublelowquotemark\", 0x0afe }, \n{ \"XK_leftcaret\", 0x0ba3 }, \n{ \"XK_rightcaret\", 0x0ba6 }, \n{ \"XK_downcaret\", 0x0ba8 }, \n{ \"XK_upcaret\", 0x0ba9 }, \n{ \"XK_overbar\", 0x0bc0 }, \n{ \"XK_downtack\", 0x0bc2 }, \n{ \"XK_upshoe\", 0x0bc3 }, \n{ \"XK_downstile\", 0x0bc4 }, \n{ \"XK_underbar\", 0x0bc6 }, \n{ \"XK_jot\", 0x0bca }, \n{ \"XK_quad\", 0x0bcc }, \n{ \"XK_uptack\", 0x0bce }, \n{ \"XK_circle\", 0x0bcf }, \n{ \"XK_upstile\", 0x0bd3 }, \n{ \"XK_downshoe\", 0x0bd6 }, \n{ \"XK_rightshoe\", 0x0bd8 }, \n{ \"XK_leftshoe\", 0x0bda }, \n{ \"XK_lefttack\", 0x0bdc }, \n{ \"XK_righttack\", 0x0bfc }, \n{ \"XK_hebrew_doublelowline\", 0x0cdf }, \n{ \"XK_hebrew_aleph\", 0x0ce0 }, \n{ \"XK_hebrew_bet\", 0x0ce1 }, \n{ \"XK_hebrew_beth\", 0x0ce1 }, \n{ \"XK_hebrew_gimel\", 0x0ce2 }, \n{ \"XK_hebrew_gimmel\", 0x0ce2 }, \n{ \"XK_hebrew_dalet\", 0x0ce3 }, \n{ \"XK_hebrew_daleth\", 0x0ce3 }, \n{ \"XK_hebrew_he\", 0x0ce4 }, \n{ \"XK_hebrew_waw\", 0x0ce5 }, \n{ \"XK_hebrew_zain\", 0x0ce6 }, \n{ \"XK_hebrew_zayin\", 0x0ce6 }, \n{ \"XK_hebrew_chet\", 0x0ce7 }, \n{ \"XK_hebrew_het\", 0x0ce7 }, \n{ \"XK_hebrew_tet\", 0x0ce8 }, \n{ \"XK_hebrew_teth\", 0x0ce8 }, \n{ \"XK_hebrew_yod\", 0x0ce9 }, \n{ \"XK_hebrew_finalkaph\", 0x0cea }, \n{ \"XK_hebrew_kaph\", 0x0ceb }, \n{ \"XK_hebrew_lamed\", 0x0cec }, \n{ \"XK_hebrew_finalmem\", 0x0ced }, \n{ \"XK_hebrew_mem\", 0x0cee }, \n{ \"XK_hebrew_finalnun\", 0x0cef }, \n{ \"XK_hebrew_nun\", 0x0cf0 }, \n{ \"XK_hebrew_samech\", 0x0cf1 }, \n{ \"XK_hebrew_samekh\", 0x0cf1 }, \n{ \"XK_hebrew_ayin\", 0x0cf2 }, \n{ \"XK_hebrew_finalpe\", 0x0cf3 }, \n{ \"XK_hebrew_pe\", 0x0cf4 }, \n{ \"XK_hebrew_finalzade\", 0x0cf5 }, \n{ \"XK_hebrew_finalzadi\", 0x0cf5 }, \n{ \"XK_hebrew_zade\", 0x0cf6 }, \n{ \"XK_hebrew_zadi\", 0x0cf6 }, \n{ \"XK_hebrew_qoph\", 0x0cf7 }, \n{ \"XK_hebrew_kuf\", 0x0cf7 }, \n{ \"XK_hebrew_resh\", 0x0cf8 }, \n{ \"XK_hebrew_shin\", 0x0cf9 }, \n{ \"XK_hebrew_taw\", 0x0cfa }, \n{ \"XK_hebrew_taf\", 0x0cfa }, \n{ \"XK_Hebrew_switch\", 0xff7e }, \n{ \"XK_Thai_kokai\", 0x0da1 }, \n{ \"XK_Thai_khokhai\", 0x0da2 }, \n{ \"XK_Thai_khokhuat\", 0x0da3 }, \n{ \"XK_Thai_khokhwai\", 0x0da4 }, \n{ \"XK_Thai_khokhon\", 0x0da5 }, \n{ \"XK_Thai_khorakhang\", 0x0da6 }, \n{ \"XK_Thai_ngongu\", 0x0da7 }, \n{ \"XK_Thai_chochan\", 0x0da8 }, \n{ \"XK_Thai_choching\", 0x0da9 }, \n{ \"XK_Thai_chochang\", 0x0daa }, \n{ \"XK_Thai_soso\", 0x0dab }, \n{ \"XK_Thai_chochoe\", 0x0dac }, \n{ \"XK_Thai_yoying\", 0x0dad }, \n{ \"XK_Thai_dochada\", 0x0dae }, \n{ \"XK_Thai_topatak\", 0x0daf }, \n{ \"XK_Thai_thothan\", 0x0db0 }, \n{ \"XK_Thai_thonangmontho\", 0x0db1 }, \n{ \"XK_Thai_thophuthao\", 0x0db2 }, \n{ \"XK_Thai_nonen\", 0x0db3 }, \n{ \"XK_Thai_dodek\", 0x0db4 }, \n{ \"XK_Thai_totao\", 0x0db5 }, \n{ \"XK_Thai_thothung\", 0x0db6 }, \n{ \"XK_Thai_thothahan\", 0x0db7 }, \n{ \"XK_Thai_thothong\", 0x0db8 }, \n{ \"XK_Thai_nonu\", 0x0db9 }, \n{ \"XK_Thai_bobaimai\", 0x0dba }, \n{ \"XK_Thai_popla\", 0x0dbb }, \n{ \"XK_Thai_phophung\", 0x0dbc }, \n{ \"XK_Thai_fofa\", 0x0dbd }, \n{ \"XK_Thai_phophan\", 0x0dbe }, \n{ \"XK_Thai_fofan\", 0x0dbf }, \n{ \"XK_Thai_phosamphao\", 0x0dc0 }, \n{ \"XK_Thai_moma\", 0x0dc1 }, \n{ \"XK_Thai_yoyak\", 0x0dc2 }, \n{ \"XK_Thai_rorua\", 0x0dc3 }, \n{ \"XK_Thai_ru\", 0x0dc4 }, \n{ \"XK_Thai_loling\", 0x0dc5 }, \n{ \"XK_Thai_lu\", 0x0dc6 }, \n{ \"XK_Thai_wowaen\", 0x0dc7 }, \n{ \"XK_Thai_sosala\", 0x0dc8 }, \n{ \"XK_Thai_sorusi\", 0x0dc9 }, \n{ \"XK_Thai_sosua\", 0x0dca }, \n{ \"XK_Thai_hohip\", 0x0dcb }, \n{ \"XK_Thai_lochula\", 0x0dcc }, \n{ \"XK_Thai_oang\", 0x0dcd }, \n{ \"XK_Thai_honokhuk\", 0x0dce }, \n{ \"XK_Thai_paiyannoi\", 0x0dcf }, \n{ \"XK_Thai_saraa\", 0x0dd0 }, \n{ \"XK_Thai_maihanakat\", 0x0dd1 }, \n{ \"XK_Thai_saraaa\", 0x0dd2 }, \n{ \"XK_Thai_saraam\", 0x0dd3 }, \n{ \"XK_Thai_sarai\", 0x0dd4 }, \n{ \"XK_Thai_saraii\", 0x0dd5 }, \n{ \"XK_Thai_saraue\", 0x0dd6 }, \n{ \"XK_Thai_sarauee\", 0x0dd7 }, \n{ \"XK_Thai_sarau\", 0x0dd8 }, \n{ \"XK_Thai_sarauu\", 0x0dd9 }, \n{ \"XK_Thai_phinthu\", 0x0dda }, \n{ \"XK_Thai_baht\", 0x0ddf }, \n{ \"XK_Thai_sarae\", 0x0de0 }, \n{ \"XK_Thai_saraae\", 0x0de1 }, \n{ \"XK_Thai_sarao\", 0x0de2 }, \n{ \"XK_Thai_saraaimaimuan\", 0x0de3 }, \n{ \"XK_Thai_saraaimaimalai\", 0x0de4 }, \n{ \"XK_Thai_lakkhangyao\", 0x0de5 }, \n{ \"XK_Thai_maiyamok\", 0x0de6 }, \n{ \"XK_Thai_maitaikhu\", 0x0de7 }, \n{ \"XK_Thai_maiek\", 0x0de8 }, \n{ \"XK_Thai_maitho\", 0x0de9 }, \n{ \"XK_Thai_maitri\", 0x0dea }, \n{ \"XK_Thai_maichattawa\", 0x0deb }, \n{ \"XK_Thai_thanthakhat\", 0x0dec }, \n{ \"XK_Thai_nikhahit\", 0x0ded }, \n{ \"XK_Thai_leksun\", 0x0df0 }, \n{ \"XK_Thai_leknung\", 0x0df1 }, \n{ \"XK_Thai_leksong\", 0x0df2 }, \n{ \"XK_Thai_leksam\", 0x0df3 }, \n{ \"XK_Thai_leksi\", 0x0df4 }, \n{ \"XK_Thai_lekha\", 0x0df5 }, \n{ \"XK_Thai_lekhok\", 0x0df6 }, \n{ \"XK_Thai_lekchet\", 0x0df7 }, \n{ \"XK_Thai_lekpaet\", 0x0df8 }, \n{ \"XK_Thai_lekkao\", 0x0df9 }, \n{ \"XK_Hangul\", 0xff31 }, \n{ \"XK_Hangul_Start\", 0xff32 }, \n{ \"XK_Hangul_End\", 0xff33 }, \n{ \"XK_Hangul_Hanja\", 0xff34 }, \n{ \"XK_Hangul_Jamo\", 0xff35 }, \n{ \"XK_Hangul_Romaja\", 0xff36 }, \n{ \"XK_Hangul_Codeinput\", 0xff37 }, \n{ \"XK_Hangul_Jeonja\", 0xff38 }, \n{ \"XK_Hangul_Banja\", 0xff39 }, \n{ \"XK_Hangul_PreHanja\", 0xff3a }, \n{ \"XK_Hangul_PostHanja\", 0xff3b }, \n{ \"XK_Hangul_SingleCandidate\", 0xff3c }, \n{ \"XK_Hangul_MultipleCandidate\", 0xff3d }, \n{ \"XK_Hangul_PreviousCandidate\", 0xff3e }, \n{ \"XK_Hangul_Special\", 0xff3f }, \n{ \"XK_Hangul_switch\", 0xff7e }, \n{ \"XK_Korean_Won\", 0x0eff }, \n{ \"XK_EuroSign\", 0x20ac }, \n{ 0, 0 }};\n\nstatic const char *\nnameForKeycode(int keycode)\n{\tKeyNameEntry *kne;\n\n\tfor (kne = codes; kne->name; kne++)\n\t\tif (kne->code == keycode)\n\t\t\treturn kne->name;\n\n\treturn \"UNKNOWN CODE\";\n}\n\nstatic const char *\nnameForKeyboardEvent(XEvent *evt) { return nameForKeycode(evt->xkey.keycode); }\n#endif /* DEBUG_EVENTS */\n\nstatic void handleEvent(XEvent *evt)\n{\n#if DEBUG_EVENTS\n  switch (evt->type)\n    {\n    case ButtonPress:\n      fprintf(stderr, \"\\nX ButtonPress   state 0x%x button %d\\n\",\n\t      evt->xbutton.state, evt->xbutton.button);\n      break;\n    case ButtonRelease:\n      fprintf(stderr, \"\\nX ButtonRelease state 0x%x button %d\\n\",\n\t      evt->xbutton.state, evt->xbutton.button);\n      break;\n    case KeyPress:\n      fprintf(stderr, \"\\nX KeyPress      state 0x%x raw keycode %d\\n\",\n\t      evt->xkey.state, evt->xkey.keycode);\n      break;\n    case KeyRelease:\n      fprintf(stderr, \"\\nX KeyRelease    state 0x%x raw keycode %d\\n\",\n\t      evt->xkey.state, evt->xkey.keycode);\n      break;\n    }\n#endif /* DEBUG_EVENTS */\n\n# define noteEventPosition(evt)\t\t\t\t\\\n  {\t\t\t\t\t\t\t\\\n    mousePosition.x= evt.x;\t\t\t\t\\\n    mousePosition.y= evt.y;\t\t\t\t\\\n  }\n\n# define noteEventState(evt)\t\t\t\t\\\n  {\t\t\t\t\t\t\t\\\n    noteEventPosition(evt);\t\t\t\t\\\n    modifierState= x2sqModifier(evt.state);\t\t\\\n  }\n\n#if defined(DEBUG_FOCUS)\n  if ((evt->type != EnterNotify) && (evt->type != LeaveNotify) && (evt->type != MotionNotify))\n    {\n      static char *eventName[]=\t{\n\t\"KeyPress\", \"KeyRelease\", \"ButtonPress\", \"ButtonRelease\",\n\t\"MotionNotify\", \"EnterNotify\", \"LeaveNotify\", \"FocusIn\",\n\t\"FocusOut\", \"KeymapNotify\", \"Expose\", \"GraphicsExpose\",\n\t\"NoExpose\", \"VisibilityNotify\", \"CreateNotify\", \"DestroyNotify\",\n\t\"UnmapNotify\", \"MapNotify\", \"MapRequest\", \"ReparentNotify\",\n\t\"ConfigureNotify\", \"ConfigureRequest\", \"GravityNotify\",\n\t\"ResizeRequest\", \"CirculateNotify\", \"CirculateRequest\",\n\t\"PropertyNotify\", \"SelectionClear\", \"SelectionRequest\",\n\t\"SelectionNotify\", \"ColormapNotify\", \"ClientMessage\",\n\t\"MappingNotify\", \"LASTEvent\", 0\n      };\n      static char *modeName[]= { \"Normal\", \"Grab\", \"Ungrab\", \"WhileGrabbed\", 0 };\n      static char *detailName[]= {\n\t\"Ancestor\", \"Virtual\", \"Inferior\", \"Nonlinear\", \"NonlinearVirtual\",\n\t\"Pointer\", \"PointerRoot\", \"DetailNone\", 0\n      };\n      fprintf(stderr, eventName[evt->type-2]);\n      if (evt->xany.window == stParent)\n\tfprintf(stderr, \" window=stParent\");\n      else if (evt->xany.window ==  stWindow)\n\tfprintf(stderr, \" window=stWindow\");\n      else\n\tfprintf(stderr, \" window=%x\", evt->xany.window);\n      if (evt->type == FocusIn || evt->type == FocusOut)\n\tfprintf(stderr, \" mode=Notify%s detail=Notify%s\\n\", modeName[evt->xfocus.mode],\tdetailName[evt->xfocus.detail]);\n      else\n\tfprintf(stderr, \"\\n\");\n    }\n#endif\n  if (True == XFilterEvent(evt, 0))\n    return;\n\n  switch (evt->type)\n    {\n    case MotionNotify:\n      noteEventState(evt->xmotion);\n      recordMouseEvent();\n      break;\n\n    case FocusIn:\n      if (evt->xfocus.mode == NotifyNormal || evt->xfocus.mode == NotifyUngrab)\n\t{\n\t  switch (evt->xfocus.detail)\n\t    {\n\t    case NotifyNonlinear:\n\t    case NotifyInferior:\n\t      XSetInputFocus(stDisplay, stWindow, RevertToNone, CurrentTime);\n\t      break;\n\t    case NotifyAncestor:\n#            if defined(INIT_INPUT_WHEN_FOCUSED_IN)\n\t      initInput();\n#            endif\n\t      if (inputContext)\n\t\t{\n\t\t  setInputContextArea();\n\t\t  XSetICFocus(inputContext);\n\t\t}\n\t      break;\n\t    }\n\t}\n      break;\n\n    case FocusOut:\n      if (inputContext && (evt->xfocus.mode == NotifyNormal) && (evt->xfocus.detail == NotifyNonlinear))\n\tXUnsetICFocus(inputContext);\n      break;\n\n#if 0\n    case EnterNotify:\n      if (inputContext && evt->xcrossing.focus && !(inputStyle & XIMPreeditPosition))\n\t{\n\t  setInputContextArea();\n\t  XSetICFocus(inputContext);\n\t}\n      break;\n\n    case LeaveNotify:\n      if (inputContext && evt->xcrossing.focus && !(inputStyle & XIMPreeditPosition))\n\tXUnsetICFocus(inputContext);\n      break;\n#endif\n\n    case ButtonPress:\n      noteEventState(evt->xbutton);\n      switch (evt->xbutton.button)\n\t{\n\tcase 1: case 2: case 3:\n\t  buttonState |= x2sqButton(evt->xbutton.button);\n\t  recordMouseEvent();\n\t  break;\n\tcase 4: case 5:\t/* mouse wheel */\n\t  {\n\t    int keyCode= evt->xbutton.button + 26;\t/* up/down */\n\t    int modifiers= modifierState ^ CtrlKeyBit;\n\t    recordKeyboardEvent(keyCode, EventKeyDown, modifiers, keyCode);\n\t    recordKeyboardEvent(keyCode, EventKeyChar, modifiers, keyCode);\n\t    recordKeyboardEvent(keyCode, EventKeyUp,   modifiers, keyCode);\n\t  }\n\t  break;\n\tdefault:\n\t  ioBeep();\n\t  break;\n\t}\n      break;\n\n    case ButtonRelease:\n      noteEventState(evt->xbutton);\n      switch (evt->xbutton.button)\n\t{\n\tcase 1: case 2: case 3:\n\t  buttonState &= ~x2sqButton(evt->xbutton.button);\n\t  recordMouseEvent();\n\t  break;\n\tcase 4: case 5:\t/* mouse wheel */\n\t  break;\n\tdefault:\n\t  ioBeep();\n\t  break;\n\t}\n      break;\n\n    case KeyPress:\n      noteEventState(evt->xkey);\n      {\n\tKeySym symbolic;\n\tint keyCode= x2sqKey(&evt->xkey, &symbolic);\n\n    if (keyCode == 1  &&  modifierState == 3)  signal_emergency_semaphore();\n    if (keyCode == 1  &&  modifierState == 2)    /* ^a */ print_vm_info();\n# if Multiple_Tileras\n    extern void connect_to_other_chips();\n    extern void send_test_message();\n        \n    if (keyCode == 2  &&  modifierState == 3)  connect_to_other_chips();\n    if (keyCode == 5  &&  modifierState == 3)  send_test_message();//ctrl shift e\n# endif\n\n\tint ucs4= xkeysym2ucs4(symbolic);\n\tDCONV_FPRINTF(stderr, \"symbolic, keyCode, ucs4: %x, %d, %d\\n\", symbolic, keyCode, ucs4);\n\tDCONV_FPRINTF(stderr, \"pressed, buffer: %d, %x\\n\", multi_key_pressed, multi_key_buffer);\n\tif (multi_key_pressed && multi_key_buffer == 0)\n\t  {\n\t    switch (ucs4)\n\t      {\n#              define key_case(sym, code)\t\t\\\n\t        case sym:\t\t\t\t\\\n\t          multi_key_buffer= (code);\t\t\\\n\t\t  keyCode= -1;\t\t\t\t\\\n\t          ucs4= -1;\t\t\t\t\\\n\t          break;\n\t\tkey_case(0x60, 0x0300); /* grave */\n\t\tkey_case(0x27, 0x0301); /* apostrophe */\n\t\tkey_case(0x5e, 0x0302); /* circumflex */\n\t\tkey_case(0x7e, 0x0303); /* tilde */\n\t\tkey_case(0x22, 0x0308); /* double quote */\n\t\tkey_case(0x61, 0x030a); /* a */\n#              undef key_case\n\t      }\n\t  }\n\telse\n\t  {\n\t  switch (symbolic)\n\t    {\n#            define dead_key_case(sym, code, orig)\t\\\n\t      case sym:\t\t\t\t\t\\\n\t        if (multi_key_buffer == code)\t\t\\\n\t\t  {\t\t\t\t\t\\\n\t\t    multi_key_buffer= 0;\t\t\\\n\t\t    keyCode= orig;\t\t\t\\\n\t\t    ucs4= orig;\t\t\t\t\\\n\t\t  }\t\t\t\t\t\\\n\t\telse\t\t\t\t\t\\\n\t\t  {\t\t\t\t\t\\\n\t\t    multi_key_buffer= (code);\t\t\\\n\t\t    keyCode= -1;\t\t\t\\\n\t\t    ucs4= -1;\t\t\t\t\\\n\t\t  }\t\t\t\t\t\\\n\t        break;\n\t      dead_key_case(XK_dead_grave, 0x0300, 0x60);\n\t      dead_key_case(XK_dead_acute, 0x0301, 0x27);\n\t      dead_key_case(XK_dead_circumflex, 0x0302, 0x5e);\n\t      dead_key_case(XK_dead_tilde, 0x0303, 0x7e);\n\t      dead_key_case(XK_dead_macron, 0x0304, 0x0304);\n\t      dead_key_case(XK_dead_abovedot, 0x0307, 0x0307);\n\t      dead_key_case(XK_dead_diaeresis, 0x0308, 0x0308);\n\t      dead_key_case(XK_dead_abovering, 0x030A, 0x030A);\n\t      dead_key_case(XK_dead_doubleacute, 0x030B, 0x030B);\n\t      dead_key_case(XK_dead_caron, 0x030C, 0x030C);\n\t      dead_key_case(XK_dead_cedilla, 0x0327, 0x0327);\n\t      dead_key_case(XK_dead_ogonek, 0x0328, 0x0328);\n\t      dead_key_case(XK_dead_iota, 0x0345, 0x0345);\n\t      dead_key_case(XK_dead_voiced_sound, 0x3099, 0x3099);\n\t      dead_key_case(XK_dead_semivoiced_sound, 0x309a, 0x309a);\n\t      dead_key_case(XK_dead_belowdot, 0x0323, 0x0323);\n\t      dead_key_case(XK_dead_hook, 0x0309, 0x0309);\n\t      dead_key_case(XK_dead_horn, 0x031b, 0x031b);\n#            undef dead_key_case\n\t    }\n\t  if (symbolic != XK_Multi_key)\n\t    {\n\t      multi_key_pressed= 0; \n\t      DCONV_FPRINTF(stderr, \"multi_key reset\\n\");\n\t    }\n\t  }\n\tDCONV_FPRINTF(stderr, \"keyCode, ucs4, multi_key_buffer: %d, %d, %x\\n\", keyCode, ucs4, multi_key_buffer);\n\tif (keyCode >= 0)\n\t  {\n\t    recordKeystroke(keyCode);\t\t\t/* DEPRECATED */\n\t    if (multi_key_buffer != 0)\n\t      recordKeystroke(multi_key_buffer);\n\t  }\n\tif ((keyCode >= 0) || (ucs4 > 0))\n\t  {\n\t    recordKeyboardEvent(keyCode, EventKeyDown, modifierState, ucs4);\n\t    if (ucs4) /* only generate a key char event if there's a code. */\n\t\trecordKeyboardEvent(keyCode, EventKeyChar, modifierState, ucs4);\n\t    if (multi_key_buffer != 0)\n\t      {\n\t\trecordKeyboardEvent(multi_key_buffer, EventKeyDown, modifierState, multi_key_buffer);\n\t\trecordKeyboardEvent(multi_key_buffer, EventKeyChar, modifierState, multi_key_buffer);\n\t\tmulti_key_buffer= 0;\n\t      }\n\t  }\n      }\n      break;\n\n    case KeyRelease:\n      noteEventState(evt->xkey);\n      {\n\tKeySym symbolic;\n\tint keyCode, ucs4;\n\tif (XPending(stDisplay))\n\t  {\n\t    XEvent evt2;\n\t    XPeekEvent(stDisplay, &evt2);\n\t    if ((evt2.type == KeyPress) && (evt2.xkey.keycode == evt->xkey.keycode) && ((evt2.xkey.time - evt->xkey.time < 2)))\n\t      break;\n\t  }\n\tkeyCode= x2sqKey(&evt->xkey, &symbolic);\n\tucs4= xkeysym2ucs4(symbolic);\n\tif ((keyCode >= 0) || (ucs4 > 0))\n\t  recordKeyboardEvent(keyCode, EventKeyUp, modifierState, ucs4);\n      }\n      break;\n\n    case SelectionClear:\n      if (xaClipboard == evt->xselectionclear.selection)\n\t{\n#\t if defined(DEBUG_SELECTIONS)\n\t  fprintf(stderr, \"SelectionClear(xaClipboard)\\n\");\n#\t endif\n\t  stOwnsClipboard= 0;\n\t  stOwnsSelection= 0;   /* clear both CLIPBOARD and PRIMARY */\n\t  usePrimaryFirst= 0;\n\t}\n      else if (XA_PRIMARY == evt->xselectionclear.selection)\n\t{\n#\t if defined(DEBUG_SELECTIONS)\n\t  fprintf(stderr, \"SelectionClear(XA_PRIMARY)\\n\");\n#\t endif\n\t  stOwnsSelection= 0;   /* but maintain CLIPBOARD if we have it */\n\t}\n      break;\n\n    case SelectionRequest:\n      sendSelection(&evt->xselectionrequest, 0);\n      break;\n\n    case PropertyNotify:\n      if (evt->xproperty.atom == xaCutBuffer0)\n\t{\n#\t if defined(DEBUG_SELECTIONS)\n\t  fprintf(stderr, \"CUT_BUFFER0 changed\\n\");\n#\t endif\n\t  stOwnsClipboard= 0;\n\t  usePrimaryFirst= 1;\n\t}\n      break;\n\n    case Expose:\n      {\n\tXExposeEvent *ex= &evt->xexpose;\n#      if defined(USE_XSHM)\n\tif (asyncUpdate)\n\t  waitForCompletions();\n#      endif\n#      if defined(FULL_UPDATE_ON_EXPOSE)\n\t/* ignore it if there are other exposures upstream */\n\tif (ex->count == 0)\n\t  fullDisplayUpdate();  /* this makes VM call ioShowDisplay */\n#      else\n\tredrawDisplay(ex->x, ex->x + ex->width, ex->y, ex->y + ex->height);\n#      endif /*!FULL_UPDATE_ON_EXPOSE*/\n      }\n      break;\n\n#  if 0\n    case VisibilityNotify:\n      {\n\tstatic int previousState= VisibilityFullyObscured;\n\tXVisibilityEvent *ex= &evt->xvisibility;\n\tif (ex->state < previusState)\n\t  fullDisplayUpdate();\n\tpreviousState= ex->state;\n      }\n#  endif\n\n    case MapNotify:\n      /* The window has just been mapped, possibly for the first\n\t time: update mousePosition (which otherwise may not be\n\t set before the first button event). */\n      getMousePosition();\n      noteWindowChange();\n      fullDisplayUpdate();\n#    if defined(INIT_INPUT_WHEN_MAPPED)\n      initInput();\n#    endif\n      break;\n\n    case UnmapNotify:\n      {\n\tXEvent ev;\n\tif (sleepWhenUnmapped)\n\t  do\n\t    {\n\t      /* xxx SelectInput() ??? -- need to filter key events? */\n\t      XNextEvent(stDisplay, &ev);\n\t      handleEvent(&ev);\n\t    }\n\t  while (ev.type != MapNotify);\n\tgetMousePosition();\n      }\n      noteWindowChange();\n      break;\n\n    case ConfigureNotify:\n      noteResize(evt->xconfigure.width, evt->xconfigure.height);\n      break;\n\n    case MappingNotify:\n      XRefreshKeyboardMapping(&evt->xmapping);\n      break;\n\n    case ClientMessage:\n      if (wmProtocolsAtom == evt->xclient.message_type && wmDeleteWindowAtom == evt->xclient.data.l[0])\n\trecordWindowEvent(WindowEventClose, 0, 0, 0, 0, 1); /* windowIndex 1 is main window */\n      break;\n\n#  if defined(USE_XSHM)\n    default:\n      if (evt->type == completionType)\n\t--completions;\n      break;\n#  endif\n    }\n\n  if (useXdnd)\n    dndHandleEvent(evt->type, evt);\n\n# undef noteEventState\n}\n\n\nint handleEvents(void)\n{\n  if (recordPendingKeys())\n    return 0;\n  if (!isConnectedToXServer || !XPending(stDisplay))\n    return !iebEmptyP();\n\n  while (XPending(stDisplay))\n    {\n      XEvent evt;\n      XNextEvent(stDisplay, &evt);\n      handleEvent(&evt);\n    }\n  return 1;\n}\n\n\nstatic void xHandler(int fd, void *data, int flags)\n{\n  handleEvents();\t/* XPending() drains display connection input */\n  aioHandle(stXfd, xHandler, AIO_RX);\n}\n\n\nstatic void npHandler(int fd, void *data, int flags)\n{\n  browserProcessCommand();\n  aioHandle(browserPipes[0], npHandler, AIO_RX);\n}\n\n\nvoid getMaskbit(unsigned long ul, int *nmask, int *shift)\n{\n  int i;\n  unsigned long hb;\n\n  *nmask= *shift= 0;\n  hb= 0x8000;  hb= (hb<<16);  /* hb = 0x80000000UL */\n  for (i= 31; ((ul & hb) == 0) && i >= 0; --i, ul<<= 1)\n    ;\n  for (; ((ul & hb) != 0) && i >= 0; --i, ul<<= 1)\n    (*nmask)++;\n  *shift= i+1;\n}\n\nvoid initDownGradingColors(void)\n{\n  int r, g, b, i;\n\n  if (stVisual->class == PseudoColor)\n    {\n      for (r= 0; r < 0x8; r++)\n\tfor (g= 0; g < 0x8; g++)\n\t  for (b= 0; b < 0x4; b++)\n\t    {\n\t      int mindiff= 0x7*0x7 + 0x7*0x7 + 0x3*0x3 + 1;\n\t      for (i= 0; i < 256; i++)\n\t\t{\n\t\t  int rdiff, gdiff, bdiff, diff;\n\t\t  rdiff= r - ((stColors[i]>>5) & 0x7);\n\t\t  gdiff= g - ((stColors[i]>>2) & 0x7);\n\t\t  bdiff= b -  (stColors[i] & 0x3);\n\t\t  diff= rdiff*rdiff + gdiff*gdiff + bdiff*bdiff;\n\t\t  if (diff < mindiff)\n\t\t    {\n\t\t      mindiff= diff;\n\t\t      stDownGradingColors[(r << 5) + (g << 2) + b]= i;\n\t\t    }\n\t\t}\n\t    }\n    }\n  else\n    for (i= 0; i < 256; i++)\n      stDownGradingColors[i]=\n\t(  ((i >> 5) & ((1 << stRNMask) - 1)) << stRShift)\n\t| (((i >> 2) & ((1 << stGNMask) - 1)) << stGShift)\n\t| (((i >> 0) & ((1 << stBNMask) - 1)) << stBShift);\n}\n\nvoid initColourmap(int index, int red, int green, int blue)\n{\n  if (index >= 256)\n    return;\n\n  if (stVisual->class == TrueColor || stVisual->class == DirectColor)\n    {\n      unsigned int r, g, b;\n      r= red;\n      g= green;\n      b= blue;\n\n      stColors[index]= (((r>>(16-stRNMask))<<stRShift) |\n\t\t\t((g>>(16-stGNMask))<<stGShift) |\n\t\t\t((b>>(16-stBNMask))<<stBShift));\n    }\n  else\n    {\n      XColor color;\n      color.pixel= index;\n      color.red= red;\n      color.green= green;\n      color.blue= blue;\n      color.flags= DoRed|DoGreen|DoBlue;\n      XStoreColor(stDisplay, stColormap, &color);\n      /* map rgb weight=332 */\n      stColors[index]= ((((unsigned int)red  >>(16-3))<<5) |\n\t\t\t(((unsigned int)green>>(16-3))<<2) |\n\t\t\t((unsigned int)blue >>(16-2)));\n    }\n}\n\nvoid initPixmap(void)\n{\n  int count;\n  XPixmapFormatValues *xpv;\n\n  xpv= XListPixmapFormats(stDisplay, &count);\n\n  if (xpv)\n    {\n      while (--count >= 0)\n\t{\n\t  if (stDepth == xpv[count].depth)\n\t    stBitsPerPixel= xpv[count].bits_per_pixel;\n\t}\n      XFree((void *)xpv);\n    }\n  if (stBitsPerPixel == 0)\n    stBitsPerPixel= stDepth;\n\n  switch (stVisual->class)\n    {\n    case PseudoColor:\n      if (stBitsPerPixel == 8)\n\tbreak;\n      else\n\t{\n\t  fprintf(stderr, \"Visual class PseudoColor is not supported at depth %d\\n\", stBitsPerPixel);\n\t  exit(1);\n\t  return;\n\t}\n    case TrueColor:\n    case DirectColor:\n      getMaskbit(stVisual->red_mask,   &stRNMask, &stRShift);\n      getMaskbit(stVisual->green_mask, &stGNMask, &stGShift);\n      getMaskbit(stVisual->blue_mask,  &stBNMask, &stBShift);\n      if (stBitsPerPixel == 16)\n\t{\n\t  stHasSameRGBMask16= (stVisual->red_mask   == (0x1f << 10) &&\n\t\t\t       stVisual->green_mask == (0x1f << 5) &&\n\t\t\t       stVisual->blue_mask  == (0x1f));\n\t  break;\n\t}\n      else if (stBitsPerPixel == 32)\n\t{\n\t  stHasSameRGBMask32= (stVisual->red_mask   == (0xff << 16) &&\n\t\t\t       stVisual->green_mask == (0xff << 8) &&\n\t\t\t       stVisual->blue_mask  == (0xff));\n\t  break;\n\t}\n      else if (stBitsPerPixel == 24)\n\t{\n\t  /* nothing to do... */\n\t  break;\n\t}\n      else\n\t{\n\t  fprintf(stderr, \"Visual class TrueColor is not supported at depth %d\\n\", stBitsPerPixel);\n\t  exit(1);\n\t  return;\n\t}\n    case GrayScale:\n    case StaticColor:\n    case StaticGray:\n    default:\n      fprintf(stderr, \"This visual class is not supported\\n\");\n      exit(1);\n      return;\n    }\n\n  if (stVisual->class == PseudoColor)\n    stColormap= XCreateColormap(stDisplay, stWindow, stVisual, AllocAll);\n\n\n\n  /* 1-bit colors (monochrome) */\n  initColourmap(0, 65535, 65535, 65535);\t/* white or transparent */\n  initColourmap(1,     0,     0,     0);\t/* black */\n\n\t/* additional colors for 2-bit color */\n  initColourmap(2, 65535, 65535, 65535);\t/* opaque white */\n  initColourmap(3, 32768, 32768, 32768);\t/* 1/2 gray */\n\n\t/* additional colors for 4-bit color */\n  initColourmap( 4, 65535,     0,     0);\t/* red */\n  initColourmap( 5,     0, 65535,     0);\t/* green */\n  initColourmap( 6,     0,     0, 65535);\t/* blue */\n  initColourmap( 7,     0, 65535, 65535);\t/* cyan */\n  initColourmap( 8, 65535, 65535,     0);\t/* yellow */\n  initColourmap( 9, 65535,     0, 65535);\t/* magenta */\n  initColourmap(10,  8192,  8192,  8192);\t/* 1/8 gray */\n  initColourmap(11, 16384, 16384, 16384);\t/* 2/8 gray */\n  initColourmap(12, 24576, 24576, 24576);\t/* 3/8 gray */\n  initColourmap(13, 40959, 40959, 40959);\t/* 5/8 gray */\n  initColourmap(14, 49151, 49151, 49151);\t/* 6/8 gray */\n  initColourmap(15, 57343, 57343, 57343);\t/* 7/8 gray */\n\n\t/* additional colors for 8-bit color */\n\t/* 24 more shades of gray (does not repeat 1/8th increments) */\n  initColourmap(16,  2048,  2048,  2048);\t/*  1/32 gray */\n  initColourmap(17,  4096,  4096,  4096);\t/*  2/32 gray */\n  initColourmap(18,  6144,  6144,  6144);\t/*  3/32 gray */\n  initColourmap(19, 10240, 10240, 10240);\t/*  5/32 gray */\n  initColourmap(20, 12288, 12288, 12288);\t/*  6/32 gray */\n  initColourmap(21, 14336, 14336, 14336);\t/*  7/32 gray */\n  initColourmap(22, 18432, 18432, 18432);\t/*  9/32 gray */\n  initColourmap(23, 20480, 20480, 20480);\t/* 10/32 gray */\n  initColourmap(24, 22528, 22528, 22528);\t/* 11/32 gray */\n  initColourmap(25, 26624, 26624, 26624);\t/* 13/32 gray */\n  initColourmap(26, 28672, 28672, 28672);\t/* 14/32 gray */\n  initColourmap(27, 30720, 30720, 30720);\t/* 15/32 gray */\n  initColourmap(28, 34815, 34815, 34815);\t/* 17/32 gray */\n  initColourmap(29, 36863, 36863, 36863);\t/* 18/32 gray */\n  initColourmap(30, 38911, 38911, 38911);\t/* 19/32 gray */\n  initColourmap(31, 43007, 43007, 43007);\t/* 21/32 gray */\n  initColourmap(32, 45055, 45055, 45055);\t/* 22/32 gray */\n  initColourmap(33, 47103, 47103, 47103);\t/* 23/32 gray */\n  initColourmap(34, 51199, 51199, 51199);\t/* 25/32 gray */\n  initColourmap(35, 53247, 53247, 53247);\t/* 26/32 gray */\n  initColourmap(36, 55295, 55295, 55295);\t/* 27/32 gray */\n  initColourmap(37, 59391, 59391, 59391);\t/* 29/32 gray */\n  initColourmap(38, 61439, 61439, 61439);\t/* 30/32 gray */\n  initColourmap(39, 63487, 63487, 63487);\t/* 31/32 gray */\n\n  /* The remainder of color table defines a color cube with six steps\n     for each primary color. Note that the corners of this cube repeat\n     previous colors, but simplifies the mapping between RGB colors and\n     color map indices. This color cube spans indices 40 through 255.\n     */\n  {\n    int r, g, b;\n\n    for (r= 0; r < 6; r++)\n      for (g= 0; g < 6; g++)\n\tfor (b= 0; b < 6; b++)\n\t  {\n\t    int i= 40 + ((36 * r) + (6 * b) + g);\n\t    if (i > 255) error(\"index out of range in color table compuation\");\n\t    initColourmap(i, (r * 65535) / 5, (g * 65535) / 5, (b * 65535) / 5);\n\t  }\n  }\n\n  stColorWhite.red= stColorWhite.green= stColorWhite.blue= 65535;\n  stColorBlack.red= stColorBlack.green= stColorBlack.blue= 0;\n\n  if (stVisual->class == PseudoColor)\n    {\n      XSetWindowColormap(stDisplay, stParent, stColormap);\n      stColorWhite.pixel= 0;\n      stColorBlack.pixel= 1;\n#if 0\n      /* initialise the black and white color values for cursor creation */\n      if (XAllocColor(stDisplay, stColormap, &stColorWhite))\n\tfprintf(stderr, \"failed to find white pixel in Squeak colormap\\n\");\n\n      if (XAllocColor(stDisplay, stColormap, &stColorBlack))\n\tfprintf(stderr, \"failed to find black pixel in Squeak colormap\\n\");\n#endif\n      initDownGradingColors();\n    }\n  else\n    {\n      stColorWhite.pixel= WhitePixel(stDisplay, DefaultScreen(stDisplay));\n      stColorBlack.pixel= BlackPixel(stDisplay, DefaultScreen(stDisplay));\n    }\n}\n\n\nstatic int xError(Display *dpy, XErrorEvent *evt)\n{\n  char buf[1024];\n  XGetErrorText(dpy, evt->error_code, buf, sizeof(buf));\n  fprintf(stderr,\n\t  \"X Error: %s\\n\"\n\t  \"  Major opcode of failed request:  %ld\\n\"\n\t  \"  Minor opcode of failed request:  %ld\\n\"\n\t  \"  Serial number of failed request: %ld\\n\",\n\t  buf,\n\t  (long)evt->request_code,\n\t  (long)evt->minor_code,\n\t  (long)evt->serial);\n  return 0;\n}\n\n\nstatic void initWindow(char *displayName)\n{\n  XRectangle windowBounds= { 0, 0, 640, 480 };  /* default window bounds */\n  int right, bottom;\n\n  XSetErrorHandler(xError);\n\n  // xxx_dmu Tilera sometimes takes time to initialize\n  int xxx_dmu;\n  for (xxx_dmu = 0;  xxx_dmu < 100;  ++xxx_dmu) {\n    stDisplay= XOpenDisplay(displayName);\n    if (stDisplay) break;\n    if (xxx_dmu == 0) fprintf(stderr, \"Retrying display\\n\");\n    sleep(1);\n  }\n  if (!stDisplay)\n    {\n      fprintf(stderr, \"Could not open display `%s'.\\n\", displayName);\n      exit(1);\n    }\n  if (xxx_dmu != 0) fprintf(stderr, \"had to try %d times\\n\", xxx_dmu + 1);\n\n  /* get screen size */\n  scrH= (DisplayHeight(stDisplay, DefaultScreen(stDisplay)));\n  scrW= (DisplayWidth(stDisplay, DefaultScreen(stDisplay)));\n  if ((scrW % sizeof(void *)) != 0)\n    scrW= (scrW / sizeof(void *)) * sizeof(void *);\n\n  stXfd= ConnectionNumber(stDisplay);\n\n  /* find the most suitable Visual */\n  {\n    /* preferred visuals in order of decreasing priority */\n    static int trialVisuals[][2]= {\n      { 24, TrueColor },\n      { 24, DirectColor },\n      { 24, StaticColor },\n      { 24, PseudoColor },\n      { 16, TrueColor },\n      { 16, DirectColor },\n      { 16, StaticColor },\n      { 16, PseudoColor },\n      { 32, TrueColor },    /* 32 has alpha problems when compositing */\n      { 32, DirectColor },\n      { 32, StaticColor },\n      { 32, PseudoColor },\n      {  8, PseudoColor },\n      {  8, DirectColor },\n      {  8, TrueColor },\n      {  8, StaticColor },\n      {  0, 0 }\n    };\n\n    XVisualInfo viz;\n    int i;\n\n    stVisual= DefaultVisual(stDisplay, DefaultScreen(stDisplay));\n    stDepth= DefaultDepth(stDisplay, DefaultScreen(stDisplay));\n\n    if ((24 == stDepth) || (16 == stDepth))\n      {\n#      if defined(DEBUG_VISUAL)\n\tfprintf(stderr, \"Using default visual (%d bits).\\n\", stDepth);\n#      endif\n      }\n    else\n      {\n\tfor (i= 0; trialVisuals[i][0] != 0; ++i)\n\t  {\n#          if defined(DEBUG_VISUAL)\n\t    fprintf(stderr, \"Trying %d bit %s.\\n\", trialVisuals[i][0], debugVisual(trialVisuals[i][1]));\n#          endif\n\t    if (XMatchVisualInfo(stDisplay, DefaultScreen(stDisplay), trialVisuals[i][0], trialVisuals[i][1], &viz) != 0)\n\t      break;\n\t  }\n\tif (trialVisuals [i][0] == 0)\n\t  {\n#\t   if defined(DEBUG_VISUAL)\n\t    fprintf(stderr, \"Using default visual (%d bits).\\n\", stDepth);\n#\t   endif\n\t  }\n\telse\n\t  {\n\t    stVisual= viz.visual;\n\t    stDepth= trialVisuals[i][0];\n\t  }\n      }\n  }\n\n  if (fullScreen)\n    {\n      right=  scrW;\n      bottom= scrH;\n    }\n  else\n    {\n      int savedWindowSize= getSavedWindowSize();\n      if (savedWindowSize != 0)\n\t{\n\t  right=  windowBounds.x + ((unsigned)savedWindowSize >> 16);\n\t  bottom= windowBounds.y + (savedWindowSize & 0xFFFF);\n\t}\n      else\n\t{\n\t  right= windowBounds.x + windowBounds.width;\n\t  bottom= windowBounds.y + windowBounds.height;\n\t}\n    }\n  /* minimum size is 64 x 64 */\n  right= ( right > (windowBounds.x + 64)) ?  right : (windowBounds.x + 64);\n  bottom= (bottom > (windowBounds.y + 64)) ? bottom : (windowBounds.y + 64);\n\n  /* maximum bottom-right is screen bottom-right */\n  right=  ( right <= DisplayWidth(stDisplay, DefaultScreen(stDisplay)))\n    ?  right : (DisplayWidth(stDisplay, DefaultScreen(stDisplay))  - 8);\n  bottom= (bottom <= DisplayHeight(stDisplay, DefaultScreen(stDisplay)))\n    ? bottom : (DisplayHeight(stDisplay, DefaultScreen(stDisplay)) - 8);\n\n  windowBounds.width= right - windowBounds.x;\n  windowBounds.height= bottom - windowBounds.y;\n\n  if (windowBounds.width % sizeof(void *))\n    windowBounds.width= (windowBounds.width / sizeof(void *)) * sizeof(void *);\n\n  stWidth= windowBounds.width;\n  stHeight= windowBounds.height;\n\n  /* create the Squeak window */\n  {\n    XSetWindowAttributes attributes;\n    unsigned long valuemask, parentValuemask;\n\n    attributes.border_pixel= WhitePixel(stDisplay, DefaultScreen(stDisplay));\n    attributes.background_pixel= WhitePixel(stDisplay, DefaultScreen(stDisplay));\n    attributes.event_mask= WM_EVENTMASK;\n    attributes.backing_store= NotUseful;\n\n    if (useXdnd)\n      attributes.event_mask |= EnterWindowMask;\n\n    valuemask= CWEventMask | CWBackingStore | CWBorderPixel | CWBackPixel;\n    parentValuemask= CWEventMask | CWBackingStore | CWBorderPixel;\n\n    /* A visual that is not DefaultVisual requires its own color map.\n       If visual is PseudoColor, the new color map is made elsewhere. */\n    if ((stVisual != DefaultVisual(stDisplay, DefaultScreen(stDisplay))) &&\n\t(stVisual->class != PseudoColor))\n      {\n\tstColormap= XCreateColormap(stDisplay,\n\t\t\t\t    RootWindow(stDisplay, DefaultScreen(stDisplay)),\n\t\t\t\t    stVisual,\n\t\t\t\t    AllocNone);\n\tattributes.colormap= stColormap;\n\tvaluemask |= CWColormap;\n\tparentValuemask |= CWColormap;\n      }\n\n#  if defined(DEBUG_BROWSER)\n    fprintf(stderr, \"browser window %d\\n\", browserWindow);\n#  endif\n\n    if (browserWindow != 0)\n      {\n\tWindow root;\n\tint s;\n\tunsigned int w, h, u;\n\tstParent= browserWindow;\n\tXGetGeometry(stDisplay, stParent, &root, &s, &s, &w, &h, &u, &u);\n\tstWidth= xWidth= w;\n\tstHeight= xHeight= h;\n\tsetSavedWindowSize((w << 16) | h);\n      }\n    else\n      {\n\tint s= getSavedWindowSize();\n\tif (s)\n\t  {\n\t    stWidth=  s >> 16;\n\t    stHeight= s &  0xffff;\n\t  }\n\tstParent= XCreateWindow(stDisplay,\n\t\t\t\tDefaultRootWindow(stDisplay),\n\t\t\t\twindowBounds.x, windowBounds.y,\n\t\t\t\tstWidth, stHeight,\n\t\t\t\t0,\n\t\t\t\tstDepth, InputOutput, stVisual,\n\t\t\t\tparentValuemask, &attributes);\n#      if defined(SUGAR)\n        if (sugarBundleId)\n          XChangeProperty(stDisplay, stParent,\n                          XInternAtom(stDisplay, \"_SUGAR_BUNDLE_ID\", 0), XA_STRING, 8,\n\t\t\t  PropModeReplace, (unsigned char *)sugarBundleId, strlen(sugarBundleId));\n\n        if (sugarActivityId)\n          XChangeProperty(stDisplay, stParent,\n                          XInternAtom(stDisplay, \"_SUGAR_ACTIVITY_ID\", 0), XA_STRING, 8,\n                          PropModeReplace, (unsigned char *)sugarActivityId, strlen(sugarActivityId));\n#      endif /* defined(SUGAR) */\n\n        { unsigned long pid = getpid();\n\tXChangeProperty(stDisplay, stParent,\n\t\t\tXInternAtom(stDisplay, \"_NET_WM_PID\", 0),\n\t\t\tXA_CARDINAL, 32, PropModeReplace,\n\t\t\t(unsigned char *)&pid, 1);\n\t}\n\t/* This is needed for PersonalShare, see sqUnixX11PShare.c */\n\t{ Atom normal = XInternAtom(stDisplay, \"_NET_WM_WINDOW_TYPE_NORMAL\", 0);\n\tXChangeProperty(stDisplay, stParent,\n\t\t\tXInternAtom(stDisplay, \"_NET_WM_WINDOW_TYPE\", 0),\n\t\t\tXA_ATOM, 32, PropModeReplace, \n\t\t\t(unsigned char *)&normal, 1);\n\t}\n      }\n\n    attributes.event_mask= EVENTMASK;\n    attributes.backing_store= NotUseful;\n\n    stWindow= XCreateWindow(stDisplay, stParent,\n\t\t\t    0, 0,\n\t\t\t    stWidth, stHeight,\n\t\t\t    0,\n\t\t\t    stDepth, InputOutput, stVisual,\n\t\t\t    valuemask, &attributes);\n  }\n\n  /* look for property changes on root window to track selection */\n  XSelectInput(stDisplay, DefaultRootWindow(stDisplay), PropertyChangeMask);\n\n  /* set the geometry hints */\n  if (!browserWindow)\n    {\n      XSizeHints *sizeHints= XAllocSizeHints();\n      sizeHints->min_width= 16;\n      sizeHints->min_height= 16;\n      sizeHints->width_inc= sizeof(void *);\n      sizeHints->height_inc= 1;\n      sizeHints->win_gravity= NorthWestGravity;\n      sizeHints->flags= PWinGravity | PResizeInc;\n      XSetWMNormalHints(stDisplay, stWindow, sizeHints);\n      XSetWMNormalHints(stDisplay, stParent, sizeHints);\n      XFree((void *)sizeHints);\n    }\n\n  /* set the window title and resource/class names */\n  {\n    XClassHint *classHints= XAllocClassHint();\n    classHints->res_class= xResClass;\n    classHints->res_name= xResName;\n    if (browserWindow == 0)\n      {\n\tXSetClassHint(stDisplay, stParent, classHints);\n\tXStoreName(stDisplay, stParent, defaultWindowLabel);\n      }\n    XFree((void *)classHints);\n  }\n\n  /* tell the WM that we can't be bothered managing focus for ourselves */\n  {\n    XWMHints *wmHints= XAllocWMHints();\n    wmHints->input= True;\n    wmHints->initial_state= NormalState;\n    wmHints->flags= InputHint|StateHint;\n# if !defined(NO_ICON)\n    wmHints->icon_pixmap=\n      XCreateBitmapFromData(stDisplay, DefaultRootWindow(stDisplay),\n\t\t\t    sqXIcon_bits, sqXIcon_width, sqXIcon_height);\n    if (wmHints->icon_pixmap != None)\n      wmHints->flags |= IconPixmapHint;\n# endif\n    if (iconified)\n      {\n\twmHints->initial_state= IconicState;\n\twmHints->flags |= StateHint;\n      }\n    XSetWMHints(stDisplay, stParent, wmHints);\n    XFree((void *)wmHints);\n  }\n\n  /* tell the WM that we do not want to be destroyed from the title bar close button */\n  {\n    wmProtocolsAtom=    XInternAtom(stDisplay, \"WM_PROTOCOLS\", False);\n    wmDeleteWindowAtom= XInternAtom(stDisplay, \"WM_DELETE_WINDOW\", False);\n    XSetWMProtocols(stDisplay, stParent, &wmDeleteWindowAtom, 1);\n  }\n\n  /* create a suitable graphics context */\n  {\n    XGCValues gcValues;\n\n    gcValues.function= GXcopy;\n    gcValues.line_width= 0;\n    gcValues.subwindow_mode= IncludeInferiors;\n    gcValues.clip_x_origin= 0;\n    gcValues.clip_y_origin= 0;\n    gcValues.clip_mask= None;\n    gcValues.foreground= SqueakWhite;\n    gcValues.background= SqueakWhite;\n    gcValues.fill_style= FillSolid;\n    stGC= XCreateGC(stDisplay,\n\t\t    stWindow,\n\t\t    GCFunction | GCLineWidth | GCSubwindowMode |\n\t\t    GCClipXOrigin | GCClipYOrigin | GCClipMask |\n\t\t    GCForeground | GCBackground | GCFillStyle,\n\t\t    &gcValues);\n  }\n\n  if (noTitle || fullScreen)\n    /* naughty, but effective */\n    XSetTransientForHint(stDisplay, stParent, DefaultRootWindow(stDisplay));\n\n# if defined(USE_XSHM)\n  if (useXshm)\n    completionType= XShmGetEventBase(stDisplay) + ShmCompletion;\n# endif\n\n  XInternAtoms(stDisplay, selectionAtomNames, SELECTION_ATOM_COUNT, False, selectionAtoms);\n\n  if (useXdnd)\n    dndInitialise();\n}\n\n\nvoid setWindowSize(void)\n{\n  int width, height, maxWidth, maxHeight;\n  int winSize= getSavedWindowSize();\n\n#if defined(DEBUG_BROWSER)\n  fprintf(stderr, \"browserWindow %d\\n\", browserWindow);\n#endif\n\n  if (browserWindow) return;\n\n#if defined(DEBUG_WINDOW)\n  fprintf(stderr, \"savedWindowSize %x (%d %d)\\n\", winSize, winSize >> 16, winSize & 0xffff);\n#endif\n\n  if (winSize != 0)\n    {\n      width=  (unsigned)winSize >> 16;\n      height= winSize & 0xFFFF;\n    }\n  else\n    {\n      width=  640;\n      height= 480;\n    }\n\n  /* minimum size is 64 x 64 */\n  width=  ( width > 64) ?   width : 64;\n  height= (height > 64) ?  height : 64;\n\n  /* maximum size is screen size */\n  maxWidth=  (DisplayWidth(stDisplay, DefaultScreen(stDisplay)));\n  maxHeight= (DisplayHeight(stDisplay, DefaultScreen(stDisplay)));\n  width=  ( width <= maxWidth)  ?  width : maxWidth;\n  height= (height <= maxHeight) ? height : maxHeight;\n\n  if (fullScreen)\n    {\n      width= maxWidth;\n      height= maxHeight;\n    }\n\n#if defined(DEBUG_WINDOW)\n  fprintf(stderr, \"resize %d %d\\n\", width, height);\n#endif\n\n  noteResize(stWidth= width, stHeight= height);\n}\n\n\n/*** Event Recording Functions ***/\n\n/* Support for translateCode.  For KeyPress set meta.  For KeyRelease clear\n * notmeta.  Of course this is simplistic and wrong because it doesn't deal\n * with left and right versions of the key.  e.g. the key sequence\n * press left press right lift left lift right will release before lift right.\n */\nstatic inline int\nwithMetaSet(int code, int meta, int notmeta, int *modStatp, XKeyEvent *evt)\n{\n\tif (modStatp)\n\t\t*modStatp = evt->type == KeyPress\n\t\t\t\t\t\t? x2sqModifier(evt->state) | meta\n\t\t\t\t\t\t: x2sqModifier(evt->state) & ~notmeta;\n\treturn code;\n}\n\nstatic int\ntranslateCode(KeySym symbolic, int *modp, XKeyEvent *evt)\n{\n  switch (symbolic)\n    {\n    case XK_Left:\treturn 28;\n    case XK_Up:\t\treturn 30;\n    case XK_Right:\treturn 29;\n    case XK_Down:\treturn 31;\n    case XK_Insert:\treturn  5;\n    case XK_Prior:\treturn 11;\t/* page up */\n    case XK_Next:\treturn 12;\t/* page down */\n    case XK_Home:\treturn  1;\n    case XK_End:\treturn  4;\n\n    case XK_KP_Left:\treturn 28;\n    case XK_KP_Up:\treturn 30;\n    case XK_KP_Right:\treturn 29;\n    case XK_KP_Down:\treturn 31;\n    case XK_KP_Insert:\treturn  5;\n    case XK_KP_Prior:\treturn 11;\t/* page up */\n    case XK_KP_Next:\treturn 12;\t/* page down */\n    case XK_KP_Home:\treturn  1;\n    case XK_KP_End:\treturn  4;\n\n    /* \"aliases\" for Sun keyboards */\n    case XK_R9:\t\treturn 11;\t/* page up */\n    case XK_R15:\treturn 12;\t/* page down */\n    case XK_R7:\t\treturn  1;\t/* home */\n    case XK_R13:\treturn  4;\t/* end */\n\n\t/* if this is a key down event return the char with ALT/CommandKey set */\n    case XK_L1: /* stop */\n\t\treturn withMetaSet('.',CommandKeyBit,CommandKeyBit,modp,evt);\n    case XK_L2: /* again */\n\t\treturn withMetaSet('j',CommandKeyBit,CommandKeyBit,modp,evt);\n    case XK_L4: /* undo */\n\t\treturn withMetaSet('z',CommandKeyBit,CommandKeyBit,modp,evt);\n    case XK_L6: /* copy */\n\t\treturn withMetaSet('c',CommandKeyBit,CommandKeyBit,modp,evt);\n    case XK_L8: /* paste */\n\t\treturn withMetaSet('v',CommandKeyBit,CommandKeyBit,modp,evt);\n    case XK_L9: /* find */\n\t\treturn withMetaSet('f',CommandKeyBit,CommandKeyBit,modp,evt);\n    case XK_L10:/* cut */\n\t\treturn withMetaSet('x',CommandKeyBit,CommandKeyBit,modp,evt);\n\n    /* XKB extensions */\n# if defined(XK_ISO_Left_Tab)\n    case XK_ISO_Left_Tab: return  9;\t/* shift-tab */\n# endif\n\n# if defined(XF86XK_Start)\n    case XF86XK_Start: /* OLPC view source */\n\t\treturn withMetaSet(',',CommandKeyBit,CommandKeyBit,modp,evt);\n# endif\n\n# if defined(XK_Control_L)\n\t/* For XK_Shift_L, XK_Shift_R, XK_Caps_Lock & XK_Shift_Lock we can't just\n\t * use the SHIFT metastate since it would generate key codes. We use\n\t * META + SHIFT as these are all meta keys (meta == OptionKeyBit).\n\t */\n\tcase XK_Shift_L:\n\t\treturn withMetaSet(255,OptionKeyBit+ShiftKeyBit,ShiftKeyBit,modp,evt);\n\tcase XK_Shift_R:\n\t\treturn withMetaSet(254,OptionKeyBit+ShiftKeyBit,ShiftKeyBit,modp,evt);\n\tcase XK_Caps_Lock:\n\t\treturn withMetaSet(253,OptionKeyBit+ShiftKeyBit,ShiftKeyBit,modp,evt);\n\tcase XK_Shift_Lock:\n\t\treturn withMetaSet(252,OptionKeyBit+ShiftKeyBit,ShiftKeyBit,modp,evt);\n\tcase XK_Control_L:\n\t\treturn withMetaSet(251,OptionKeyBit+CtrlKeyBit,CtrlKeyBit,modp,evt);\n\tcase XK_Control_R:\n\t\treturn withMetaSet(250,OptionKeyBit+CtrlKeyBit,CtrlKeyBit,modp,evt);\n\tcase XK_Meta_L:\n\t\treturn withMetaSet(249,OptionKeyBit,0,modp,evt);\n\tcase XK_Meta_R:\n\t\treturn withMetaSet(248,OptionKeyBit,0,modp,evt);\n\tcase XK_Alt_L:\n\t\treturn withMetaSet(247,OptionKeyBit+CommandKeyBit,OptionKeyBit,modp,evt);\n\tcase XK_Alt_R:\n\t\treturn withMetaSet(246,OptionKeyBit+CommandKeyBit,OptionKeyBit,modp,evt);\n# endif\n\n    default:;\n    }\n  return -1;\n}\n\n\n\n/*** I/O Primitives ***/\n\n\n#if !defined(HAVE_SNPRINTF)\n# if defined(HAVE___SNPRINTF)\t/* Solaris 2.5 */\n    extern int __snprintf(char *buf, size_t limit, const char *fmt, ...);\n#   define snprintf __snprintf\n#   define HAVE_SNPRINTF\n# endif\n#endif\n\n\nstatic sqInt display_ioFormPrint(sqInt bitsIndex, sqInt width, sqInt height, sqInt depth, double hScale, double vScale, sqInt landscapeFlag)\n{\n# if defined(PRINT_PS_FORMS)\n\n  char *bitsAddr= pointerForIndex_xxx_dmu(bitsIndex);\n  FILE *ppm;\n  float scale;\t\t\t/* scale to use with pnmtops */\n  char printCommand[1000];\n  unsigned int *form32;\t\t/* the form data, in 32 bits */\n\n  /* convert the form to 32 bits */\n\n  typedef void (*copyFn)(int *, int *, int, int, int, int, int, int);\n  static copyFn copyFns[33]= {\n    0,\n    copyImage1To32,\t/* 1 */\n    copyImage2To32,\t/* 2 */\n    0,\n    copyImage4To32,\t/* 4 */\n    0, 0, 0,\n    copyImage8To32,\t/* 8 */\n    0, 0, 0, 0, 0, 0,\n    copyImage16To32,\t/* 15 */\n    copyImage16To32,\t/* 16 */\n    0, 0, 0, 0, 0, 0, 0, 0,\n    0, 0, 0, 0, 0, 0, 0,\n    copyImage32To32\t/* 32 */\n  };\n\n  copyFn copy= ((depth > 0) && (depth <= 32)) ? copyFns[depth] : 0;\n  if (!copy)\n    {\n      fprintf(stderr, \"ioFormPrint: depth %d not supported\\n\", depth);\n      return false;\n    }\n\n  form32= malloc(width * height * 4);\n  if (!form32)\n    {\n      fprintf(stderr, \"ioFormPrint: out of memory\\n\");\n      return false;\n    }\n\n  copy((int *)bitsAddr, (int *)form32, width, height, 1, 1, width, height);\n\n  /* pick a scale. unfortunately, pnmtops requires the same scale\n     horizontally and vertically */\n  if (hScale < vScale)\n    scale= hScale;\n  else\n    scale= vScale;\n\n  /* assemble the command for printing.  pnmtops is part of \"netpbm\",\n     a widely-available set of tools that eases image manipulation */\n#if defined(HAVE_SNPRINTF)\n  snprintf(printCommand, sizeof(printCommand),\n\t   \"pnmtops -scale %f %s | lpr\",\n\t   scale,\n\t   (landscapeFlag ? \"-turn\" : \"-noturn\"));\n#else /* if your OS is broken then so might be this code */\n  sprintf(printCommand,\n\t  \"pnmtops -scale %f %s | lpr\",\n\t  scale,\n\t  (landscapeFlag ? \"-turn\" : \"-noturn\"));\n#endif\n\n  /* open a pipe to print through */\n  if ((ppm= popen(printCommand, \"w\")) == 0)\n    {\n      free(form32);\n      return false;\n    }\n\n  /* print the PPM magic number */\n  fprintf(ppm, \"P3\\n%d %d 255\\n\", width, height);\n\n  /* write the pixmap */\n  {\n    int y;\n    for (y= 0; y < height; ++y)\n      {\n\tint x;\n\tfor (x= 0; x < width; ++x)\n\t  {\n\t    int pixel= form32[y*width + x];\n\t    int red=   (pixel >> 16) & 0xFF;\n\t    int green= (pixel >> 8)  & 0xFF;\n\t    int blue=  (pixel >> 0)  & 0xFF;\n\t    fprintf(ppm, \"%d %d %d\\n\", red, green, blue);\n\t  }\n      }\n  }\n  free(form32);\n  pclose(ppm);\n  return true;\n\n# else  /* !PRINT_PS_FORMS */\n\n  /* Write the form as a PPM (Portable PixMap) file, from which it can\n     be converted into almost any existing graphical format (including\n     PostScript).  See the \"netpbm\" utilities for a huge collection of\n     image manipulation tools that understand the PPM format.\n     Note that \"xv\" can also read, convert, and do image processing on\n     PPM files.\n     The output filename is defined in \"sqPlatformSpecific.h\". */\n\n  FILE *ppm;\n  int ok= true;\n\n  if ((ppm= fopen(SQ_FORM_FILENAME, \"wb\")) == 0)\n    return false;\n\n  /* PPM magic number and pixmap header */\n  fprintf(ppm, \"P3\\n%d %d 65535\\n\", width, height);\n\n  switch (depth)\n    {\n    case 8:\n      {\n\tunsigned char *bits= (unsigned char *) bitsAddr;\n\tint ppw= 32 / depth;\n\tint raster= ((width + ppw - 1) / ppw) * 4;\n\t/* stColors[] is too approximate: query the real colormap */\n\tXColor colors[256];\n\tint i;\n\tfor (i= 0; i < 256; ++i) colors[i].pixel= i;\n\t/* all colors in one query reduces server traffic */\n\tXQueryColors(stDisplay, stColormap, colors, 256);\n\t/* write the pixmap */\n\t{\n\t  int y;\n\t  for (y= 0; y < height; ++y) {\n\t    int x;\n\t    for (x= 0; x < width; ++x) {\n\t      /* everything is backwards (as usual ;) */\n\t      int index= y * raster + x;\n\t      int byte= 3 - (index & 0x00000003);\n\t      int word= index & -4;\n\t      int pixel= bits[word + byte];\n\t      fprintf(ppm, \"%d %d %d\\n\",\n\t\t      colors[pixel].red, colors[pixel].green, colors[pixel].blue);\n\t    }\n\t  }\n\t}\n\tbreak;\n      } /* case 8 */\n    default:\n      fprintf(stderr, \"ioFormPrint: depth %d not supported.\\n\", depth);\n      ok= false;\n      break;\n    } /* switch */\n\n  fclose(ppm);\n  return ok;\n\n# endif /* !PRINT_PS_FORMS */\n}\n\n\nstatic sqInt display_ioBeep(void)\n{\n  if (isConnectedToXServer)\n    XBell(stDisplay, 0);\t/* ring at default volume */\n  return 0;\n}\n\n\nstatic sqInt display_ioRelinquishProcessorForMicroseconds(sqInt microSeconds)\n{\n  aioSleepForUsecs(handleEvents() ? 0 : microSeconds);\n  return 0;\n}\n\n\nstatic sqInt display_ioProcessEvents(void)\n{\n  handleEvents();\n  aioPoll(0);\n  return 0;\n}\n\n\n/* returns the depth of the Squeak window */\nstatic sqInt display_ioScreenDepth(void)\n{\n  Window root;\n  int x, y;\n  unsigned int w, h, b, d;\n\n  if (!isConnectedToXServer)\n    return 1;\n\n  XGetGeometry(stDisplay, stParent, &root, &x, &y, &w, &h, &b, &d);\n  return d;\n}\n\n\n/* returns the size of the Squeak window */\nstatic sqInt display_ioScreenSize(void)\n{\n  int winSize= getSavedWindowSize();\n\n  if (headless || !isConnectedToXServer)\n    return winSize ? winSize : ((64 << 16) | 64);\n\n  if ((windowState == WIN_ZOOMED) && !resized())\n    return (scrW << 16) | scrH;\n\n  if (resized())\n    {\n      windowState= WIN_NORMAL;\n#    if defined (USE_XSHM)\n      if (useXshm && !isAligned(void *, xWidth))\n\t{\n\t  xWidth= align(void *, xWidth);\n\t  if (!browserWindow)\n\t    {\n\t      XResizeWindow(stDisplay, stParent, xWidth, xHeight);\n\t    }\n\t}\n#    endif\n      XResizeWindow(stDisplay, stWindow, (stWidth= xWidth), (stHeight= xHeight));\n    }\n  return (stWidth << 16) | stHeight;  /* w is high 16 bits; h is low 16 bits */\n}\n\n\nstatic unsigned char swapBits(unsigned char in)\n{\n  unsigned char out= 0;\n  int i;\n  for (i= 0; i < 8; i++)\n    {\n      out= (out << 1) + (in & 1);\n      in >>= 1;\n    }\n  return out;\n}\n\nstatic int fakeBigCursor()\n{\n  static int fake= -1;\n\n  if (-1 == fake)\n    { \n      char *value= getenv(\"SQUEAK_FAKEBIGCURSOR\");\n      fake= value && (atoi(value) > 0);\n    }\n\n  return fake;\n}\n\nstatic sqInt display_ioSetCursorWithMaskBig(sqInt cursorBitsIndex, sqInt cursorMaskIndex, sqInt offsetX, sqInt offsetY);\n\nstatic sqInt display_ioSetCursorWithMask(sqInt cursorBitsIndex, sqInt cursorMaskIndex, sqInt offsetX, sqInt offsetY)\n{\n  unsigned int *cursorBits= (unsigned int *)pointerForIndex_xxx_dmu(cursorBitsIndex);\n  unsigned int *cursorMask= (unsigned int *)pointerForIndex_xxx_dmu(cursorMaskIndex);\n  unsigned char data[32], mask[32];\t/* cursors are always 16x16 */\n  int i;\n  Cursor cursor;\n  Pixmap dataPixmap, maskPixmap;\n\n  if (!isConnectedToXServer)\n    return 0;\n\n  if (fakeBigCursor())\n    return display_ioSetCursorWithMaskBig(cursorBitsIndex, cursorMaskIndex, offsetX, offsetY);\n\n  if (cursorMaskIndex == null)\n    cursorMask= cursorBits;\n\n  for (i= 0; i < 16; i++)\n    {\n      data[i*2+0]= (cursorBits[i] >> 24) & 0xFF;\n      data[i*2+1]= (cursorBits[i] >> 16) & 0xFF;\n      mask[i*2+0]= (cursorMask[i] >> 24) & 0xFF;\n      mask[i*2+1]= (cursorMask[i] >> 16) & 0xFF;\n    }\n\n  /*  if (BitmapBitOrder(stDisplay) == LSBFirst)*/\n    {\n      /* the bytes are always in the right order: swap only bits within bytes */\n      char *dp= (char *)data;\n      char *mp= (char *)mask;\n      for (i= 0; i < 32; i++)\n\t{\n\t  dp[i]= swapBits(dp[i]);\n\t  mp[i]= swapBits(mp[i]);\n\t}\n    }\n\n  dataPixmap= XCreateBitmapFromData(stDisplay,\n\t\t\t\t    DefaultRootWindow(stDisplay),\n\t\t\t\t    (char *)data, 16, 16);\n  maskPixmap= XCreateBitmapFromData(stDisplay,\n\t\t\t\t    DefaultRootWindow(stDisplay),\n\t\t\t\t    (char *)mask, 16, 16);\n  cursor= XCreatePixmapCursor(stDisplay, dataPixmap, maskPixmap,\n\t\t\t      &stColorBlack, &stColorWhite,\n\t\t\t      -offsetX, -offsetY);\n\n  XFreePixmap(stDisplay, dataPixmap);\n  XFreePixmap(stDisplay, maskPixmap);\n\n  if (cursor != None)\n    XDefineCursor(stDisplay, stWindow, cursor);\n\n  XFreeCursor(stDisplay, cursor);\n\n  return 0;\n}\n\n\nstatic sqInt display_ioSetCursorWithMaskBig(sqInt cursorBitsIndex, sqInt cursorMaskIndex, sqInt offsetX, sqInt offsetY)\n{\n  unsigned int *cursorBits= (unsigned int *)pointerForIndex_xxx_dmu(cursorBitsIndex);\n  unsigned int *cursorMask= (unsigned int *)pointerForIndex_xxx_dmu(cursorMaskIndex);\n  unsigned int data[32], mask[32], d, m;\t/* cursors are rescaled from 16x16 to 32x32*/\n  int i, j;\n  Cursor cursor;\n  Pixmap dataPixmap, maskPixmap;\n\n  if (!isConnectedToXServer)\n    return 0;\n\n  if (cursorMaskIndex == null)\n    cursorMask= cursorBits;\n\n  for (i= 0; i < 32; i++)\n    {\n      for (j= 0; j < 32; j++)\n\t{\n\t  d= (d<<1) | ((cursorBits[i/2] >> (16 + j/2)) & 1);\n\t  m= (m<<1) | ((cursorMask[i/2] >> (16 + j/2)) & 1);\n\t}\n      data[i]= d;\n      mask[i]= m;\n    }\n \n  dataPixmap= XCreateBitmapFromData(stDisplay,\n\t\t\t\t    DefaultRootWindow(stDisplay),\n\t\t\t\t    (char *)data, 32, 32);\n  maskPixmap= XCreateBitmapFromData(stDisplay,\n\t\t\t\t    DefaultRootWindow(stDisplay),\n\t\t\t\t    (char *)mask, 32, 32);\n  cursor= XCreatePixmapCursor(stDisplay, dataPixmap, maskPixmap,\n\t\t\t      &stColorBlack, &stColorWhite,\n\t\t\t      -offsetX*2, -offsetY*2);\n\n  XFreePixmap(stDisplay, dataPixmap);\n  XFreePixmap(stDisplay, maskPixmap);\n\n  if (cursor != None)\n    XDefineCursor(stDisplay, stWindow, cursor);\n\n  XFreeCursor(stDisplay, cursor);\n\n  return 0;\n}\n\n\n#if 0\nsqInt ioSetCursor(sqInt cursorBitsIndex, sqInt offsetX, sqInt offsetY)\n{\n  /* Deprecated: forward to new version with explicit mask. */\n  ioSetCursorWithMask(cursorBitsIndex, null, offsetX, offsetY);\n  return 0;\n}\n#endif\n\n\nstatic sqInt display_ioSetCursorARGB(sqInt cursorBitsIndex, sqInt extentX, sqInt extentY, sqInt offsetX, sqInt offsetY)\n{\n#if defined(HAVE_LIBXRENDER) && (RENDER_MAJOR > 0 || RENDER_MINOR >= 5)\n  int eventbase, errorbase;\n  int major= 0, minor= 0; \n  XImage *image;\n  Pixmap pixmap;\n  GC gc;\n  XRenderPictFormat *pictformat;\n  Picture picture;\n  Cursor cursor;\n\n  if (fakeBigCursor())\n    return 0;\n\n  if (!XRenderQueryExtension(stDisplay, &eventbase, &errorbase))\n    return 0;\n\n  XRenderQueryVersion(stDisplay, &major, &minor);\n  if (!(major > 0 || minor >= 5))\n    return 0;\n\n  image= XCreateImage(stDisplay, DefaultVisual(stDisplay, DefaultScreen(stDisplay)), 32, ZPixmap, 0, (char *)pointerForIndex_xxx_dmu(cursorBitsIndex), extentX, extentY, 32, 0);\n  pixmap= XCreatePixmap (stDisplay, DefaultRootWindow(stDisplay), extentX, extentY, 32);\n  gc= XCreateGC(stDisplay, pixmap, 0, 0);\n  XPutImage(stDisplay, pixmap, gc, image, 0, 0, 0, 0, extentX, extentY);\n  image->data= 0; /* otherwise XDestroyImage tries to free this */\n  pictformat= XRenderFindStandardFormat(stDisplay, PictStandardARGB32);\n  picture= XRenderCreatePicture(stDisplay, pixmap, pictformat, 0, 0);\n  cursor= XRenderCreateCursor(stDisplay, picture, -offsetX, -offsetY);\n\n  XDefineCursor(stDisplay, stWindow, cursor);\n  XDestroyImage(image);\n  XFreeGC(stDisplay, gc);\n  XFreeCursor(stDisplay, cursor);\n  XRenderFreePicture(stDisplay, picture);\n  XFreePixmap(stDisplay, pixmap);\n\n  return 1;\n#else\n  return 0;\n#endif\n}\n\n\nstatic void overrideRedirect(Display *dpy, Window win, int flag)\n{\n  XSetWindowAttributes attrs;\n  attrs.override_redirect= flag;\n  XChangeWindowAttributes(dpy, win, CWOverrideRedirect, &attrs);\n}\n\n\nstatic sqInt display_ioSetFullScreen(sqInt fullScreen)\n{\n  int winX, winY;\n  unsigned int winW, winH;\n\n  if (!isConnectedToXServer)\n    return 0;\n\n  if (fullScreen)\n    {\n      /* setting full-screen mode */\n      if (savedWindowOrigin == -1)\n\t{\n\t  /* EITHER: no previous call, OR: previous call disabled full-screen mode */\n\t  Window root;\n\t  {\n\t    /* need extent only */\n\t    unsigned int b, d;\n\t    XGetGeometry(stDisplay, stWindow, &root, &winX, &winY, &winW, &winH, &b, &d);\n\t  }\n\t  /* width must be a multiple of sizeof(void *), or X[Shm]PutImage goes gaga */\n\t  if ((winW % sizeof(void *)) != 0)\n\t    winW= (winW / sizeof(void *)) * sizeof(void *);\n\t  setSavedWindowSize((winW << 16) + (winH & 0xFFFF));\n\t  savedWindowOrigin= (winX << 16) + (winY & 0xFFFF);\n\t  XSynchronize(stDisplay, True);\n\t  overrideRedirect(stDisplay, stWindow, True);\n\t  XReparentWindow(stDisplay, stWindow, root, 0, 0);\n#\t if 1\n\t  XResizeWindow(stDisplay, stWindow, scrW, scrH);\n#\t else\n\t  XResizeWindow(stDisplay, stParent, scrW, scrH);\n#\t endif\n\t  XLowerWindow(stDisplay, stParent);\n\t  XRaiseWindow(stDisplay, stWindow);\n\t  XSetInputFocus(stDisplay, stWindow, RevertToPointerRoot, CurrentTime);\n\t  XSynchronize(stDisplay, False);\n\t  windowState= WIN_ZOOMED;\n\t  fullDisplayUpdate();\n\t}\n    }\n  else\n    {\n      /* reverting to sub-screen mode */\n      if (savedWindowOrigin != -1)\n\t{ /* previous call enabled full-screen mode */\n\t  /* get old window size */\n\t  int winSize= getSavedWindowSize();\n\t  winW= (unsigned)winSize >> 16;\n\t  winH= winSize & 0xFFFF;\n\t  /* minimum size is 64 x 64 */\n\t  winW= (winW > 64) ? winW : 64;\n\t  winH= (winH > 64) ? winH : 64;\n\t  /* old origin */\n\t  winX= savedWindowOrigin >> 16;\n\t  winY= savedWindowOrigin & 0xFFFF;\n\t  savedWindowOrigin= -1; /* prevents consecutive full-screen disables */\n\t  XSynchronize(stDisplay, True);\n\t  XRaiseWindow(stDisplay, stParent);\n\t  XReparentWindow(stDisplay, stWindow, stParent, 0, 0);\n\t  overrideRedirect(stDisplay, stWindow, False);\n#\t if 1\n\t  XResizeWindow(stDisplay, stWindow, scrW, scrH);\n#\t else\n\t  XResizeWindow(stDisplay, stParent, winW, winH);\n#\t endif\n\t  XSetInputFocus(stDisplay, stWindow, RevertToPointerRoot, CurrentTime);\n\t  XSynchronize(stDisplay, False);\n\t  windowState= WIN_CHANGED;\n\t}\n    }\n  /* sync avoids race with ioScreenSize() reading geometry before resize event */\n  XSync(stDisplay, False);\n  getMousePosition();\n\n  return 0;\n}\n\n\n\n/*** shared-memory stuff ***/\n\n\n\n# if defined(USE_XSHM)\nstatic int shmError(Display *dpy, XErrorEvent *evt)\n{\n  char buf[2048];\n  XGetErrorText(stDisplay, evt->error_code, buf, sizeof(buf));\n  fprintf(stderr, \"XShmAttach: %s\\n\", buf);\n  return 0;\n}\n#endif\n\n\nstatic void *stMalloc(size_t lbs)\n{\n# if defined(USE_XSHM)\n  if (useXshm)\n    {\n      if ((stShmInfo.shmid= shmget(IPC_PRIVATE, lbs, IPC_CREAT|0777)) == -1)\n\tperror(\"shmget\");\n      else\n\t{\n\t  if ((long)(stShmInfo.shmaddr= (char *)shmat(stShmInfo.shmid, 0, 0)) == -1)\n\t    perror(\"shmat\");\n\t  else\n\t    {\n\t      /* temporarily install error handler */\n\t      XErrorHandler prev= XSetErrorHandler(shmError);\n\t      int result= 0;\n\t      stShmInfo.readOnly= False;\n\t      result= XShmAttach(stDisplay, &stShmInfo);\n\t      XSync(stDisplay, False);\n\t      XSetErrorHandler(prev);\n\t      if (result)\n\t\t{\n#\t\t if defined(__linux__)\n\t\t  /* destroy ID now; segment will be destroyed at exit */\n\t\t  shmctl(stShmInfo.shmid, IPC_RMID, 0);\n#\t\t endif\n\t\t  return stShmInfo.shmaddr;\n\t\t}\n\t      shmdt(stShmInfo.shmaddr);\n\t    }\n\t  /* could not attach to allocated shared memory segment */\n\t  shmctl(stShmInfo.shmid, IPC_RMID, 0);\n\t}\n      /* could not allocate shared memory segment */\n      useXshm= 0;\n    }\n# endif /* USE_XSHM */\n  return (void *)malloc(lbs);\n}\n\n\nstatic void stFree(void *addr)\n{\n#if defined(USE_XSHM)\n  if (!useXshm)\n#endif\n    {\n      free(addr);\n      return;\n    }\n#if defined(USE_XSHM)\n  shmdt(stShmInfo.shmaddr);\n  shmctl(stShmInfo.shmid, IPC_RMID, NULL);\n#endif\n}\n\n#if defined(USE_XSHM)\nstatic void shmExit(void)\n{\n  if (stDisplayBitmap && useXshm)\n    {\n      stFree(stDisplayBitmap);\n      stDisplayBitmap= 0;\n    }\n}\n#endif\n\n\nstatic XImage *stXCreateImage(Display *display, Visual *visual,\n\t\t\t      int depth, int format, int flags, char *data,\n\t\t\t      int width, int height, int bpp, int pad)\n{\n#if defined(USE_XSHM)\n  if (!useXshm)\n#endif\n    return XCreateImage(display, visual, depth, format, flags,\n\t\t\tdata, width, height, bpp, pad);\n#if defined(USE_XSHM)\n  return XShmCreateImage(display, visual, depth, format, data,\n\t\t\t &stShmInfo, width, height);\n#endif\n}\n\n\nstatic void stXPutImage(Display *display, Window window, GC gc, XImage *image,\n\t\t\tint src_x, int src_y, int dst_x, int dst_y, int w, int h)\n{\n#if defined(USE_XSHM)\n  if (!useXshm)\n#endif\n    {\n      XPutImage(display, window, gc, image, src_x, src_y, dst_x, dst_y, w, h);\n      return;\n    }\n#if defined(USE_XSHM)\n  XShmPutImage(display, window, gc, image, src_x, src_y, dst_x, dst_y, w, h, True);\n  ++completions;\n  if (!asyncUpdate)\n    waitForCompletions();\n#endif\n}\n\n\nstatic void stXDestroyImage(XImage *image)\n{\n#if defined(USE_XSHM)\n  if (useXshm)\n    XShmDetach(stDisplay, &stShmInfo);\n#endif\n  XDestroyImage(image);\n}\n\n\n#define bytesPerLine(width, depth)\t((((width)*(depth) + 31) >> 5) << 2)\n#define bytesPerLineRD(width, depth)\t((((width)*(depth)) >> 5) << 2)\n\n\nstatic sqInt display_ioForceDisplayUpdate(void)\n{\n#if defined(USE_XSHM)\n  if (asyncUpdate && isConnectedToXServer)\n    {\n      XFlush(stDisplay);\n      waitForCompletions();\n    }\n#endif\n  return 0;\n}\n\n\nstatic sqInt display_ioShowDisplay(sqInt dispBitsIndex, sqInt width, sqInt height, sqInt depth,\n\t\t\t\t   sqInt affectedL, sqInt affectedR, sqInt affectedT, sqInt affectedB)\n{\n  static char *stDisplayBits= 0;\t/* last known oop of the VM's Display */\n  static sqInt  stDisplayWidth= 0;\t/* ditto width */\n  static sqInt  stDisplayHeight= 0;\t/* ditto height */\n  static sqInt  stDisplayDepth= 0;\t/* ditto depth */\n\n  char *dispBits= pointerForIndex_xxx_dmu(dispBitsIndex);\n\n  int geometryChanged= ((stDisplayBits != dispBits)\n\t\t\t|| (stDisplayWidth  != width)\n\t\t\t|| (stDisplayHeight != height)\n\t\t\t|| (stDisplayDepth  != depth));\n\n  if (stWindow == 0)\n    return 0;\n\n  if ((width < 1) || (height < 1))\n    return 0;\n\n  if (affectedL > width)  affectedL= width;\n  if (affectedR > width)  affectedR= width;\n  if (affectedT > height) affectedT= height;\n  if (affectedB > height) affectedB= height;\n\n  if ((affectedL > affectedR) || (affectedT > affectedB))\n    return 0;\n\n  if (!(depth == 1 || depth == 2 || depth == 4\n\t|| depth == 8 || depth == 16 || depth == 32))\n    {\n      fprintf(stderr, \"depth %d is not supported\\n\", depth);\n      exit(1);\n      return 0;\n    }\n\n  if (resized())\n    return 0;\n\n  if (geometryChanged)\n    {\n      stDisplayBits= dispBits;\n      stDisplayWidth= width;\n      stDisplayHeight= height;\n      stDisplayDepth= depth;\n\n# if defined(USE_XSHM)\n      if (asyncUpdate)\n\t/* wait for pending updates to complete before freeing the XImage */\n\twaitForCompletions();\n# endif\n      stDisplayBits= dispBits;\n      if (stImage)\n\t{\n\t  stImage->data= 0; /* don't you dare free() Display's Bitmap! */\n\t  stXDestroyImage(stImage);\n\t  if (stDisplayBitmap)\n\t    {\n\t      stFree(stDisplayBitmap);\n\t      stDisplayBitmap= 0;\n\t    }\n\t}\n\n# if !defined(USE_XSHM)\n#  define useXshm 0\n# endif\n\n#    if defined(WORDS_BIGENDIAN)\n      if (!useXshm && depth == stBitsPerPixel &&\n\t  (depth != 16 || stHasSameRGBMask16) &&\n\t  (depth != 32 || stHasSameRGBMask32))\n#    else\n      if (!useXshm && depth == stBitsPerPixel && depth == 32 && stHasSameRGBMask32)\n#    endif\n\t{\n\t  stDisplayBitmap= 0;\n\t}\n      else\n\t{\n\t  stDisplayBitmap= stMalloc(bytesPerLine(width, stBitsPerPixel) * height);\n\t}\n\n# if !defined(USE_XSHM)\n#  undef useXshm\n# endif\n\n      stImage= stXCreateImage(stDisplay,\n\t\t\t      DefaultVisual(stDisplay, DefaultScreen(stDisplay)),\n\t\t\t      stDepth,\n\t\t\t      ZPixmap,\n\t\t\t      0,\n\t\t\t      (stDisplayBitmap\n\t\t\t         ? stDisplayBitmap\n\t\t\t         : stDisplayBits),\n\t\t\t      width,\n\t\t\t      height,\n\t\t\t      32,\n\t\t\t      0);\n      /* Xlib ignores the following */\n# if defined(WORDS_BIGENDIAN)\n      stImage->byte_order= MSBFirst;\n      stImage->bitmap_bit_order= MSBFirst;\n# else\n      stImage->byte_order= LSBFirst;\n      stImage->bitmap_bit_order= LSBFirst;\n# endif\n      /* not really required (since we never call Get/PutPixel), but what the hey */\n      /*\n      if (!XInitImage(stImage))\n\tfprintf(stderr, \"XInitImage failed (but we don't care)\\n\");\n      */\n    }\n\n  /* this can happen after resizing the window */\n  if (affectedR > width) affectedR= width;\n  if (affectedB > height) affectedB= height;\n  if ((affectedR <= affectedL) || (affectedT >= affectedB))\n    return 1;\n\n  if (depth != stBitsPerPixel)\n    {\n      if (depth == 1)\n\t{\n\t  if (stBitsPerPixel == 8)\n\t    {\n\t      copyImage1To8((int *)dispBits, (int *)stDisplayBitmap,\n\t\t\t    width, height,\n\t\t\t    affectedL, affectedT, affectedR, affectedB);\n\t    }\n\t  if (stBitsPerPixel == 16)\n\t    {\n\t      copyImage1To16((int *)dispBits, (int *)stDisplayBitmap,\n\t\t\t     width, height,\n\t\t\t     affectedL, affectedT, affectedR, affectedB);\n\t    }\n\t  else if (stBitsPerPixel == 24)\n\t    {\n\t      copyImage1To24((int *)dispBits, (int *)stDisplayBitmap,\n\t\t\t     width, height,\n\t\t\t     affectedL, affectedT, affectedR, affectedB);\n\t    }\n\t  else /* stBitsPerPixel == 32 */\n\t    {\n\t      copyImage1To32((int *)dispBits, (int *)stDisplayBitmap,\n\t\t\t     width, height,\n\t\t\t     affectedL, affectedT, affectedR, affectedB);\n\t    }\n\t}\n\n      else if (depth == 2)\n\t{\n\t  if (stBitsPerPixel == 8)\n\t    {\n\t      copyImage2To8((int *)dispBits, (int *)stDisplayBitmap,\n\t\t\t    width, height,\n\t\t\t    affectedL, affectedT, affectedR, affectedB);\n\t    }\n\t  if (stBitsPerPixel == 16)\n\t    {\n\t      copyImage2To16((int *)dispBits, (int *)stDisplayBitmap,\n\t\t\t     width, height,\n\t\t\t     affectedL, affectedT, affectedR, affectedB);\n\t    }\n\t  else if (stBitsPerPixel == 24)\n\t    {\n\t      copyImage2To24((int *)dispBits, (int *)stDisplayBitmap,\n\t\t\t     width, height,\n\t\t\t     affectedL, affectedT, affectedR, affectedB);\n\t    }\n\t  else /* stBitsPerPixel == 32 */\n\t    {\n\t      copyImage2To32((int *)dispBits, (int *)stDisplayBitmap,\n\t\t\t     width, height,\n\t\t\t     affectedL, affectedT, affectedR, affectedB);\n\t    }\n\t}\n\n      else if (depth == 4)\n\t{\n\t  if (stBitsPerPixel == 8)\n\t    {\n\t      copyImage4To8((int *)dispBits, (int *)stDisplayBitmap,\n\t\t\t    width, height,\n\t\t\t    affectedL, affectedT, affectedR, affectedB);\n\t    }\n\t  if (stBitsPerPixel == 16)\n\t    {\n\t      copyImage4To16((int *)dispBits, (int *)stDisplayBitmap,\n\t\t\t     width, height,\n\t\t\t     affectedL, affectedT, affectedR, affectedB);\n\t    }\n\t  else if (stBitsPerPixel == 24)\n\t    {\n\t      copyImage4To24((int *)dispBits, (int *)stDisplayBitmap,\n\t\t\t     width, height,\n\t\t\t     affectedL, affectedT, affectedR, affectedB);\n\t    }\n\t  else /* stBitsPerPixel == 32 */\n\t    {\n\t      copyImage4To32((int *)dispBits, (int *)stDisplayBitmap,\n\t\t\t     width, height,\n\t\t\t     affectedL, affectedT, affectedR, affectedB);\n\t    }\n\t}\n\n      else if (depth == 8)\n\t{\n\t  if (stBitsPerPixel == 16)\n\t    {\n\t      copyImage8To16((int *)dispBits, (int *)stDisplayBitmap,\n\t\t\t     width, height,\n\t\t\t     affectedL, affectedT, affectedR, affectedB);\n\t    }\n\t  else if (stBitsPerPixel == 24)\n\t    {\n\t      copyImage8To24((int *)dispBits, (int *)stDisplayBitmap,\n\t\t\t     width, height,\n\t\t\t     affectedL, affectedT, affectedR, affectedB);\n\t    }\n\t  else /* stBitsPerPixel == 32 */\n\t    {\n\t      copyImage8To32((int *)dispBits, (int *)stDisplayBitmap,\n\t\t\t     width, height,\n\t\t\t     affectedL, affectedT, affectedR, affectedB);\n\t    }\n\t}\n      else if (depth == 16)\n\t{\n\t  if (stBitsPerPixel == 8)\n\t    {\n\t      copyImage16To8((int *)dispBits, (int *)stDisplayBitmap,\n\t\t\t     width, height,\n\t\t\t     affectedL, affectedT, affectedR, affectedB);\n\t    }\n\t  else if ( stBitsPerPixel == 24)\n\t    {\n\t      copyImage16To24((int *)dispBits, (int *)stDisplayBitmap,\n\t\t\t      width, height,\n\t\t\t      affectedL, affectedT, affectedR, affectedB);\n\t    }\n\t  else /* stBitsPerPixel == 32 */\n\t    {\n\t      copyImage16To32((int *)dispBits, (int *)stDisplayBitmap,\n\t\t\t      width, height,\n\t\t\t      affectedL, affectedT, affectedR, affectedB);\n\t    }\n\t}\n      else /* depth == 32 */\n\t{\n\t  if (stBitsPerPixel == 8)\n\t    {\n\t      copyImage32To8((int *)dispBits, (int *)stDisplayBitmap,\n\t\t\t     width, height,\n\t\t\t     affectedL, affectedT, affectedR, affectedB);\n\t    }\n\t  else if (stBitsPerPixel == 16)\n\t    {\n\t      copyImage32To16((int *)dispBits, (int *)stDisplayBitmap,\n\t\t\t      width, height,\n\t\t\t      affectedL, affectedT, affectedR, affectedB);\n\t    }\n\t  else /* stBitPerPixel == 24 */\n\t    {\n\t      copyImage32To24((int *)dispBits, (int *)stDisplayBitmap,\n\t\t\t      width, height,\n\t\t\t      affectedL, affectedT, affectedR, affectedB);\n\t    }\n\t}\n    }\n  else /* depth == stBitsPerPixel */\n    {\n      if (depth == 16 && !stHasSameRGBMask16)\n\t{\n\t  copyImage16To16((int *)dispBits, (int *)stDisplayBitmap,\n\t\t\t  width, height,\n\t\t\t  affectedL, affectedT, affectedR, affectedB);\n\t}\n      else if (depth == 32 && !stHasSameRGBMask32)\n\t{\n\t  copyImage32To32((int *)dispBits, (int *)stDisplayBitmap,\n\t\t\t  width, height,\n\t\t\t  affectedL, affectedT, affectedR, affectedB);\n\t}\n# if defined(WORDS_BIGENDIAN)\n#   if defined(USE_XSHM)\n      else if (useXshm)\n\t{\n\t  if (depth == 8)\n\t    {\n\t      copyImage8To8((int *)dispBits, (int *)stDisplayBitmap,\n\t\t\t    width, height,affectedL, affectedT, affectedR, affectedB);\n\t    }\n\t  else if (depth == 16)\n\t    {\n\t      copyImage16To16((int *)dispBits, (int *)stDisplayBitmap,\n\t\t\t      width, height,affectedL, affectedT, affectedR, affectedB);\n\t    }\n\t  else if (depth == 32)\n\t    {\n\t      copyImage32To32((int *)dispBits, (int *)stDisplayBitmap,\n\t\t\t      width, height,affectedL, affectedT, affectedR, affectedB);\n\t    }\n\t  else\n\t    {\n\t      fprintf(stderr, \"shared memory not supported for this depth/byte-order\\n\");\n\t      exit(1);\n\t    }\n\t}\n#   endif\n# else /* !WORDS_BIGENDIAN */\n      else if (depth == 8)\n\t{\n\t  copyReverseImageBytes((int *)dispBits, (int *)stDisplayBitmap,\n\t\t\t\tdepth, width, height,\n\t\t\t\taffectedL, affectedT, affectedR, affectedB);\n\t}\n      else if (depth == 16)\n\t{\n\t  copyReverseImageWords((int *)dispBits, (int *)stDisplayBitmap,\n\t\t\t\tdepth, width, height,\n\t\t\t\taffectedL, affectedT, affectedR, affectedB);\n\t}\n      else if (stDisplayBitmap != 0)\n\t{\n\t  /* there is a separate map, so we still need to copy */\n\t  if (depth == 32)\n\t    {\n\t      copyImage32To32Same((int *)dispBits, (int *)stDisplayBitmap,\n\t\t\t\t  width, height,\n\t\t\t\t  affectedL, affectedT, affectedR, affectedB);\n\t    }\n\t}\n# endif\n    }\n\n  stXPutImage(stDisplay, stWindow, stGC, stImage,\n\t      affectedL, affectedT,\t/* src_x, src_y */\n\t      affectedL, affectedT,\t/* dst_x, dst_y */\n\t      affectedR-affectedL,\t/* width */\n\t      affectedB-affectedT);\t/* height */\n\n  return 0;\n}\n\n\nstatic sqInt display_ioHasDisplayDepth(sqInt i)\n{\n  switch (i)\n    {\n    case 1:\n    case 2:\n    case 4:\n      return stBitsPerPixel == 32;\n    case 8:\n    case 16:\n    case 32:\n      return true;\n    }\n  return false;\n}\n\n\nstatic sqInt display_ioSetDisplayMode(sqInt width, sqInt height, sqInt depth, sqInt fullscreenFlag)\n{\n  fprintf(stderr, \"ioSetDisplayMode(%d, %d, %d, %d)\\n\",\n\t  width, height, depth, fullscreenFlag);\n  return 0;\n}\n\n\nvoid copyReverseImageBytes(int *fromImageData, int *toImageData, int depth, int width, int height,\n\t\t\t   int affectedL, int affectedT, int affectedR, int affectedB)\n{\n  register int scanLine, firstWord, lastWord;\n  register int line;\n\n  scanLine= bytesPerLine(width, depth);\n  firstWord= scanLine*affectedT + bytesPerLineRD(affectedL, depth);\n  lastWord= scanLine*affectedT + bytesPerLine(affectedR, depth);\n\n  for (line= affectedT; line < affectedB; line++)\n  {\n    register unsigned char *from= (unsigned char *)((long)fromImageData+firstWord);\n    register unsigned char *limit= (unsigned char *)((long)fromImageData+lastWord);\n    register unsigned char *to= (unsigned char *)((long)toImageData+firstWord);\n    while (from < limit)\n      {\n\tto[0]= from[3];\n\tto[1]= from[2];\n\tto[2]= from[1];\n\tto[3]= from[0];\n\tfrom+= 4;\n\tto+= 4;\n      }\n    firstWord+= scanLine;\n    lastWord+= scanLine;\n  }\n}\n\nvoid copyReverseImageWords(int *fromImageData, int *toImageData, int depth, int width, int height,\n\t\t\t   int affectedL, int affectedT, int affectedR, int affectedB)\n{\n  register int scanLine, firstWord, lastWord;\n  register int line;\n\n  scanLine= bytesPerLine(width, depth);\n  firstWord= scanLine*affectedT + bytesPerLineRD(affectedL, depth);\n  lastWord= scanLine*affectedT + bytesPerLine(affectedR, depth);\n\n  for (line= affectedT; line < affectedB; line++)\n    {\n      register unsigned short *from= (unsigned short *)((long)fromImageData+firstWord);\n      register unsigned short *limit= (unsigned short *)((long)fromImageData+lastWord);\n      register unsigned short *to= (unsigned short *)((long)toImageData+firstWord);\n      while (from < limit)\n\t{\n\t  to[0]= from[1];\n\t  to[1]= from[0];\n\t  from+= 2;\n\t  to+= 2;\n\t}\n      firstWord+= scanLine;\n      lastWord+= scanLine;\n    }\n}\n\nvoid copyImage1To8(int *fromImageData, int *toImageData, int width, int height,\n\t\t   int affectedL, int affectedT, int affectedR, int affectedB)\n{\n  fprintf(stderr, \"depth 1 not yet implemented in 8 bpp\\n\");\n  exit(1);\n}\n\nvoid copyImage2To8(int *fromImageData, int *toImageData, int width, int height,\n\t\t   int affectedL, int affectedT, int affectedR, int affectedB)\n{\n  fprintf(stderr, \"depth 2 not yet implemented in 8 bpp\\n\");\n  exit(1);\n}\n\nvoid copyImage4To8(int *fromImageData, int *toImageData, int width, int height,\n\t\t   int affectedL, int affectedT, int affectedR, int affectedB)\n{\n  fprintf(stderr, \"depth 4 not yet implemented in 8 bpp\\n\");\n  exit(1);\n}\n\nvoid copyImage8To8(int *fromImageData, int *toImageData, int width, int height,\n\t\t   int affectedL, int affectedT, int affectedR, int affectedB)\n{\n  register int scanLine, firstWord, lastWord;\n  register int line;\n\n  scanLine= bytesPerLine(width, 8);\n  firstWord= scanLine*affectedT + bytesPerLineRD(affectedL, 8);\n  lastWord= scanLine*affectedT + bytesPerLine(affectedR, 8);\n\n  for (line= affectedT; line < affectedB; line++) {\n    register unsigned int *from= (unsigned int *)((long)fromImageData+firstWord);\n    register unsigned int *limit= (unsigned int *)((long)fromImageData+lastWord);\n    register unsigned int *to= (unsigned int *)((long)toImageData+firstWord);\n    while (from < limit)\n      *to++= *from++;\n    firstWord+= scanLine;\n    lastWord+= scanLine;\n  }\n}\n\nvoid copyImage1To16(int *fromImageData, int *toImageData, int width, int height,\n\t\t    int affectedL, int affectedT, int affectedR, int affectedB)\n{\n  fprintf(stderr, \"depth 1 not yet implemented in 16 bpp\\n\");\n  exit(1);\n}\n\nvoid copyImage2To16(int *fromImageData, int *toImageData, int width, int height,\n\t\t    int affectedL, int affectedT, int affectedR, int affectedB)\n{\n  fprintf(stderr, \"depth 2 not yet implemented in 16 bpp\\n\");\n  exit(1);\n}\n\nvoid copyImage4To16(int *fromImageData, int *toImageData, int width, int height,\n\t\t    int affectedL, int affectedT, int affectedR, int affectedB)\n{\n  fprintf(stderr, \"depth 4 not yet implemented in 16 bpp\\n\");\n  exit(1);\n}\n\nvoid copyImage8To16(int *fromImageData, int *toImageData, int width, int height,\n\t\t    int affectedL, int affectedT, int affectedR, int affectedB)\n{\n  int scanLine8, firstWord8, lastWord8;\n  int scanLine16, firstWord16;\n  register int line;\n\n  scanLine8= bytesPerLine(width, 8);\n  firstWord8= scanLine8*affectedT + bytesPerLineRD(affectedL, 8);\n  lastWord8= scanLine8*affectedT + bytesPerLine(affectedR, 8);\n  scanLine16= bytesPerLine(width, 16);\n  firstWord16= scanLine16*affectedT + (bytesPerLineRD(affectedL, 8) << 1);\n\n  for (line= affectedT; line < affectedB; line++)\n    {\n      register unsigned char *from= (unsigned char *)((long)fromImageData+firstWord8);\n      register unsigned char *limit= (unsigned char *)((long)fromImageData+lastWord8);\n      register unsigned short *to= (unsigned short *)((long)toImageData+firstWord16);\n      while (from < limit)\n\t{\n#\t if defined(WORDS_BIGENDIAN)\n\t  to[0]= stColors[from[0]];\n\t  to[1]= stColors[from[1]];\n\t  to[2]= stColors[from[2]];\n\t  to[3]= stColors[from[3]];\n#\t else\n\t  to[0]= stColors[from[3]];\n\t  to[1]= stColors[from[2]];\n\t  to[2]= stColors[from[1]];\n\t  to[3]= stColors[from[0]];\n#\t endif\n\t  from+= 4;\n\t  to+= 4;\n\t}\n      firstWord8+= scanLine8;\n      lastWord8+= scanLine8;\n      firstWord16+= scanLine16;\n    }\n}\n\nvoid copyImage16To8(int *fromImageData, int *toImageData, int width, int height,\n\t\t    int affectedL, int affectedT, int affectedR, int affectedB)\n{\n  int scanLine16, firstWord16, lastWord16;\n  int scanLine8, firstWord8;\n  int line;\n\n#define map16To8(w) (col= (w), stDownGradingColors[ \\\n  (((col >> (10+(5-3))) & 0x7) << 5) | \\\n  (((col >> (5+(5-3)))  & 0x7) << 2) | \\\n   ((col >> (0+(5-2)))  & 0x7)])\n\n  scanLine16= bytesPerLine(width, 16);\n  firstWord16= scanLine16*affectedT + bytesPerLineRD(affectedL, 16);\n  lastWord16= scanLine16*affectedT + bytesPerLine(affectedR, 16);\n  scanLine8= bytesPerLine(width, 8);\n  firstWord8= scanLine8*affectedT + (bytesPerLineRD(affectedL, 16) >> 1);\n\n  for (line= affectedT; line < affectedB; line++)\n    {\n      register int col;\n      register unsigned short *from= (unsigned short *)((long)fromImageData+firstWord16);\n      register unsigned short *limit= (unsigned short *)((long)fromImageData+lastWord16);\n      register unsigned char *to= (unsigned char *)((long)toImageData+firstWord8);\n\n      while (from < limit)\n\t{\n#\t if defined(WORDS_BIGENDIAN)\n\t  to[0]= map16To8(from[0]);\n\t  to[1]= map16To8(from[1]);\n#\t else\n\t  to[0]= map16To8(from[1]);\n\t  to[1]= map16To8(from[0]);\n#\t endif\n\t  from+= 2;\n\t  to+= 2;\n\t}\n      firstWord16+= scanLine16;\n      lastWord16+= scanLine16;\n      firstWord8+= scanLine8;\n    }\n#undef map16To8\n}\n\nvoid copyImage1To32(int *fromImageData, int *toImageData, int width, int height,\n\t\t    int affectedL, int affectedT, int affectedR, int affectedB)\n{\n  int scanLine1, firstWord1, firstShift1;\n  int scanLine32, firstWord32, lastWord32;\n  int line;\n\n  scanLine1= bytesPerLine(width, 1);\n  firstWord1= scanLine1*affectedT + bytesPerLineRD(affectedL, 1);\n  firstShift1= 31 - (affectedL & 31);\n\n  scanLine32= bytesPerLine(width, 32);\n  firstWord32= scanLine32*affectedT + bytesPerLine(affectedL, 32);\n  lastWord32= scanLine32*affectedT + bytesPerLine(affectedR, 32);\n\n  for (line= affectedT; line < affectedB; line++)\n    {\n      register unsigned int *from= (unsigned int *)((long)fromImageData+firstWord1);\n      register unsigned int *to= (unsigned int *)((long)toImageData+firstWord32);\n      register unsigned int *limit= (unsigned int *)((long)toImageData+lastWord32);\n      register int shift= firstShift1;\n      while (to < limit)\n\t{\n\t  *to= stColors[(*from >> shift) & 1];\n\t  to++;\n\t  shift--;\n\t  if (shift < 0)\n\t    {\n\t      shift= 31;\n\t      from++;\n\t    }\n\t}\n      firstWord1+= scanLine1;\n      firstWord32+= scanLine32;\n      lastWord32+= scanLine32;\n    }\n}\n\nvoid copyImage2To32(int *fromImageData, int *toImageData, int width, int height,\n\t\t    int affectedL, int affectedT, int affectedR, int affectedB)\n{\n  int scanLine2, firstWord2, firstShift2;\n  int scanLine32, firstWord32, lastWord32;\n  int line;\n\n  scanLine2= bytesPerLine(width, 2);\n  firstWord2= scanLine2*affectedT + bytesPerLineRD(affectedL, 2);\n  firstShift2= 30 - ((affectedL & 15) * 2);\n\n  scanLine32= bytesPerLine(width, 32);\n  firstWord32= scanLine32*affectedT + bytesPerLineRD(affectedL, 32);\n  lastWord32= scanLine32*affectedT + bytesPerLineRD(affectedR, 32);\n\n  for (line= affectedT; line < affectedB; line++)\n    {\n      register unsigned int *from= (unsigned int *)((long)fromImageData+firstWord2);\n      register unsigned int *to= (unsigned int *)((long)toImageData+firstWord32);\n      register unsigned int *limit= (unsigned int *)((long)toImageData+lastWord32);\n      register int shift= firstShift2;\n      while (to < limit)\n\t{\n\t  *to= stColors[(*from >> shift) & 3];\n\t  to++;\n\t  shift-= 2;\n\t  if (shift < 0)\n\t    {\n\t      shift= 30;\n\t      from++;\n\t    }\n\t}\n      firstWord2+= scanLine2;\n      firstWord32+= scanLine32;\n      lastWord32+= scanLine32;\n    }\n}\n\nvoid copyImage4To32(int *fromImageData, int *toImageData, int width, int height,\n\t\t    int affectedL, int affectedT, int affectedR, int affectedB)\n{\n  int scanLine4, firstWord4, firstShift4;\n  int scanLine32, firstWord32, lastWord32;\n  int line;\n\n  scanLine4= bytesPerLine(width, 4);\n  firstWord4= scanLine4*affectedT + bytesPerLineRD(affectedL, 4);\n  firstShift4= 28 - ((affectedL & 7) * 4);\n\n  scanLine32= bytesPerLine(width, 32);\n  firstWord32= scanLine32*affectedT + bytesPerLineRD(affectedL, 32);\n  lastWord32= scanLine32*affectedT + bytesPerLineRD(affectedR, 32);\n\n  for (line= affectedT; line < affectedB; line++)\n    {\n      register unsigned int *from= (unsigned int *)((long)fromImageData+firstWord4);\n      register unsigned int *to= (unsigned int *)((long)toImageData+firstWord32);\n      register unsigned int *limit= (unsigned int *)((long)toImageData+lastWord32);\n      register int shift= firstShift4;\n      while (to < limit)\n\t{\n\t  *to= stColors[(*from >> shift) & 15];\n\t  to++;\n\t  shift-= 4;\n\t  if (shift < 0)\n\t    {\n\t      shift= 28;\n\t      from++;\n\t    }\n\t}\n      firstWord4+= scanLine4;\n      firstWord32+= scanLine32;\n      lastWord32+= scanLine32;\n    }\n}\n\nvoid copyImage8To32(int *fromImageData, int *toImageData, int width, int height,\n\t\t    int affectedL, int affectedT, int affectedR, int affectedB)\n{\n  int scanLine8, firstWord8, lastWord8;\n  int scanLine32, firstWord32;\n  int line;\n\n  scanLine8= bytesPerLine(width, 8);\n  firstWord8= scanLine8*affectedT + bytesPerLineRD(affectedL, 8);\n  lastWord8= scanLine8*affectedT + bytesPerLine(affectedR, 8);\n  scanLine32= bytesPerLine(width, 32);\n  firstWord32= scanLine32*affectedT + (bytesPerLineRD(affectedL, 8) << 2);\n\n  for (line= affectedT; line < affectedB; line++)\n    {\n      register unsigned char *from= (unsigned char *)((long)fromImageData+firstWord8);\n      register unsigned char *limit= (unsigned char *)((long)fromImageData+lastWord8);\n      register unsigned int *to= (unsigned int *)((long)toImageData+firstWord32);\n      while (from < limit)\n\t{\n#\t if defined(WORDS_BIGENDIAN)\n\t  to[0]= stColors[from[0]];\n\t  to[1]= stColors[from[1]];\n\t  to[2]= stColors[from[2]];\n\t  to[3]= stColors[from[3]];\n#\t else\n\t  to[0]= stColors[from[3]];\n\t  to[1]= stColors[from[2]];\n\t  to[2]= stColors[from[1]];\n\t  to[3]= stColors[from[0]];\n#\t endif\n\t  from+= 4;\n\t  to+= 4;\n\t}\n      firstWord8+= scanLine8;\n      lastWord8+= scanLine8;\n      firstWord32+= scanLine32;\n    }\n}\n\nvoid copyImage1To24(int *fromImageData, int *toImageData, int width, int height,\n\t\t    int affectedL, int affectedT, int affectedR, int affectedB)\n{\n  fprintf(stderr, \"depth 1 not yet implemented in 24 bpp\\n\");\n  exit(1);\n}\n\nvoid copyImage2To24(int *fromImageData, int *toImageData, int width, int height,\n\t\t    int affectedL, int affectedT, int affectedR, int affectedB)\n{\n  fprintf(stderr, \"depth 2 not yet implemented in 24 bpp\\n\");\n  exit(1);\n}\n\nvoid copyImage4To24(int *fromImageData, int *toImageData, int width, int height,\n\t\t    int affectedL, int affectedT, int affectedR, int affectedB)\n{\n  fprintf(stderr, \"depth 4 not yet implemented in 24 bpp\\n\");\n  exit(1);\n}\n\nvoid copyImage8To24(int *fromImageData, int *toImageData, int width, int height,\n\t\t    int affectedL, int affectedT, int affectedR, int affectedB)\n{\n  int scanLine8, firstWord8, lastWord8;\n  int scanLine24, firstWord24;\n  int line;\n\n  scanLine8= bytesPerLine(width, 8);\n  firstWord8= scanLine8*affectedT + bytesPerLineRD(affectedL, 8);\n  lastWord8= scanLine8*affectedT + bytesPerLine(affectedR, 8);\n  scanLine24= bytesPerLine(width, 24);\n  firstWord24= scanLine24*affectedT + ((affectedL>>2) * 12);\n\n  for (line= affectedT; line < affectedB; line++)\n    {\n      register unsigned char *from= (unsigned char *)((long)fromImageData+firstWord8);\n      register unsigned char *limit= (unsigned char *)((long)fromImageData+lastWord8);\n      register unsigned char *to= (unsigned char *)((long)toImageData+firstWord24);\n      register unsigned int newpix= 0;\n      while (from < limit)\n\t{\n#\t if defined(WORDS_BIGENDIAN)\n\t  newpix= stColors[from[0]];\n#\t else\n\t  newpix= stColors[from[3]];\n#\t endif\n\t  *to= (unsigned char) (newpix & 0xff);\n\t  newpix= newpix >> 8;\n\t  to++;\n\t  *to= (unsigned char) (newpix & 0xff);\n\t  newpix= newpix >> 8;\n\t  to++;\n\t  *to= (unsigned char) (newpix & 0xff);\n\t  to++;\n#\t if defined(WORDS_BIGENDIAN)\n\t  newpix= stColors[from[1]];\n#\t else\n\t  newpix= stColors[from[2]];\n#\t endif\n\t  *to= (unsigned char) (newpix & 0xff);\n\t  newpix= newpix >> 8;\n\t  to++;\n\t  *to= (unsigned char) (newpix & 0xff);\n\t  newpix= newpix >> 8;\n\t  to++;\n\t  *to= (unsigned char) (newpix & 0xff);\n\t  to++;\n#\t if defined(WORDS_BIGENDIAN)\n\t  newpix= stColors[from[2]];\n#\t else\n\t  newpix= stColors[from[1]];\n#\t endif\n\t  *to= (unsigned char) (newpix & 0xff);\n\t  newpix= newpix >> 8;\n\t  to++;\n\t  *to= (unsigned char) (newpix & 0xff);\n\t  newpix= newpix >> 8;\n\t  to++;\n\t  *to= (unsigned char) (newpix & 0xff);\n\t  to++;\n#\t if defined(WORDS_BIGENDIAN)\n\t  newpix= stColors[from[3]];\n#\t else\n\t  newpix= stColors[from[0]];\n#\t endif\n\t  *to= (unsigned char) (newpix & 0xff);\n\t  newpix= newpix >> 8;\n\t  to++;\n\t  *to= (unsigned char) (newpix & 0xff);\n\t  newpix= newpix >> 8;\n\t  to++;\n\t  *to= (unsigned char) (newpix & 0xff);\n\t  to++;\n\t  from+= 4;\n\t}\n      firstWord8+= scanLine8;\n      lastWord8+= scanLine8;\n      firstWord24+= scanLine24;\n    }\n}\n\nvoid copyImage32To8(int *fromImageData, int *toImageData, int width, int height,\n\t\t    int affectedL, int affectedT, int affectedR, int affectedB)\n{\n  int scanLine32, firstWord32, lastWord32;\n  int scanLine8, firstWord8;\n  int line;\n\n#define map32To8(w) (col= (w), stDownGradingColors[\\\n  (((col >> (16+(8-3))) & 0x7) << 5) | \\\n  (((col >> ( 8+(8-3))) & 0x7) << 2) | \\\n   ((col >> ( 0+(8-2))) & 0x7)])\n\n  scanLine32= bytesPerLine(width, 32);\n  firstWord32= scanLine32*affectedT + bytesPerLineRD(affectedL, 32);\n  lastWord32= scanLine32*affectedT + bytesPerLine(affectedR, 32);\n  scanLine8= bytesPerLine(width, 8);\n  firstWord8= scanLine8*affectedT + (bytesPerLineRD(affectedL, 32) >> 2);\n\n  for (line= affectedT; line < affectedB; line++)\n  {\n    register int col;\n    register unsigned int *from= (unsigned int *)((long)fromImageData+firstWord32);\n    register unsigned int *limit= (unsigned int *)((long)fromImageData+lastWord32);\n    register unsigned char *to= (unsigned char *)((long)toImageData+firstWord8);\n    while (from < limit)\n    {\n      to[0]= map32To8(from[0]);\n      from++;\n      to++;\n    }\n    firstWord32+= scanLine32;\n    lastWord32+= scanLine32;\n    firstWord8+= scanLine8;\n  }\n#undef map32To8\n}\n\nvoid copyImage16To32(int *fromImageData, int *toImageData, int width, int height,\n\t\t     int affectedL, int affectedT, int affectedR, int affectedB)\n{\n  int scanLine16, firstWord16, lastWord16;\n  int scanLine32, firstWord32;\n  int line;\n  int rshift, gshift, bshift;\n  register unsigned int col;\n\n#if defined(DEBUG)\n  fprintf(stderr, \"copyImg16to32 %p -> %p (%d %d) %d %d %d %d\\n\",\n\t  fromImageData, toImageData, width, height,\n\t  affectedL, affectedT, affectedR, affectedB);\n#endif\n\n  rshift= stRNMask-5 + stRShift;\n  gshift= stGNMask-5 + stGShift;\n  bshift= stBNMask-5 + stBShift;\n\n#define map16To32(w) (col= (w), \\\n  (((col >> 10) & 0x1f) << rshift) | \\\n  (((col >> 5)  & 0x1f) << gshift) | \\\n   ((col & 0x1f) << bshift))\n\n  scanLine16= bytesPerLine(width, 16);\n  firstWord16= scanLine16*affectedT + bytesPerLineRD(affectedL, 16);\n  lastWord16= scanLine16*affectedT + bytesPerLine(affectedR, 16);\n  scanLine32= bytesPerLine(width, 32);\n  firstWord32= scanLine32*affectedT + (bytesPerLineRD(affectedL, 16) << 1);\n\n  for (line= affectedT; line < affectedB; line++)\n    {\n      register unsigned short *from= (unsigned short *)((long)fromImageData+firstWord16);\n      register unsigned short *limit= (unsigned short *)((long)fromImageData+lastWord16);\n      register unsigned int *to= (unsigned int *)((long)toImageData+firstWord32);\n      while (from < limit)\n\t{\n#\t if defined(WORDS_BIGENDIAN)\n\t  to[0]= map16To32(from[0]);\n\t  to[1]= map16To32(from[1]);\n#\t else\n\t  to[0]= map16To32(from[1]);\n\t  to[1]= map16To32(from[0]);\n#\t endif\n\t  from+= 2;\n\t  to+= 2;\n\t}\n      firstWord16+= scanLine16;\n      lastWord16+= scanLine16;\n      firstWord32+= scanLine32;\n    }\n#undef map16To32\n}\n\nvoid copyImage16To24(int *fromImageData, int *toImageData, int width, int height,\n\t\t     int affectedL, int affectedT, int affectedR, int affectedB)\n{\n  int scanLine16, firstWord16, lastWord16;\n  int scanLine24, firstWord24;\n  int line;\n\n  int rshift, gshift, bshift;\n  register unsigned int col;\n\n  rshift= stRNMask-5 + stRShift;\n  gshift= stGNMask-5 + stGShift;\n  bshift= stBNMask-5 + stBShift;\n\n#define map16To24(w) (col= (w), \\\n  (((col >> 10) & 0x1f) << rshift) | \\\n  (((col >> 5)  & 0x1f) << gshift) | \\\n   ((col & 0x1f) << bshift))\n\n  scanLine16= bytesPerLine(width, 16);\n  firstWord16= scanLine16*affectedT + bytesPerLineRD(affectedL, 16);\n  lastWord16= scanLine16*affectedT + bytesPerLine(affectedR, 16);\n  scanLine24= bytesPerLine(width, 24);\n  firstWord24= scanLine24*affectedT + ((affectedL>>1) * 6);\n\n  for (line= affectedT; line < affectedB; line++)\n    {\n      register unsigned short *from= (unsigned short *)((long)fromImageData+firstWord16);\n      register unsigned short *limit= (unsigned short *)((long)fromImageData+lastWord16);\n      register unsigned char *to= (unsigned char *)((long)toImageData+firstWord24);\n      register unsigned int newpix= 0;\n      while (from < limit)\n\t{\n#\t if defined(WORDS_BIGENDIAN)\n\t  newpix= map16To24(from[0]);\n#\t else\n\t  newpix= map16To24(from[1]);\n#\t endif\n\t  *to= (unsigned char) (newpix & 0xff);\n\t  newpix= newpix >> 8;\n\t  to++;\n\t  *to= (unsigned char) (newpix & 0xff);\n\t  newpix= newpix >> 8;\n\t  to++;\n\t  *to= (unsigned char) (newpix & 0xff);\n\t  to++;\n#\t if defined(WORDS_BIGENDIAN)\n\t  newpix= map16To24(from[1]);\n#\t else\n\t  newpix= map16To24(from[0]);\n#\t endif\n\t  *to= (unsigned char) (newpix & 0xff);\n\t  newpix= newpix >> 8;\n\t  to++;\n\t  *to= (unsigned char) (newpix & 0xff);\n\t  newpix= newpix >> 8;\n\t  to++;\n\t  *to= (unsigned char) (newpix & 0xff);\n\t  to++;\n\t  from+= 2;\n\t}\n      firstWord16+= scanLine16;\n      lastWord16+= scanLine16;\n      firstWord24+= scanLine24;\n    }\n#undef map16To24\n}\n\n\nvoid copyImage32To16(int *fromImageData, int *toImageData, int width, int height,\n\t\t     int affectedL, int affectedT, int affectedR, int affectedB)\n{\n  int scanLine32, firstWord32, lastWord32;\n  int scanLine16, firstWord16;\n  int line;\n  int rshift, gshift, bshift;\n  register unsigned int col;\n\n  rshift= stRNMask-5 + stRShift;\n  gshift= stGNMask-5 + stGShift;\n  bshift= stBNMask-5 + stBShift;\n\n#define map32To16(w) (col= (w), \\\n  (((col >> 19) & 0x1f) << rshift) | \\\n  (((col >> 11) & 0x1f) << gshift) | \\\n  (((col >>  3) & 0x1f) << bshift))\n\n  scanLine32= bytesPerLine(width, 32);\n  firstWord32= scanLine32*affectedT + bytesPerLineRD(affectedL, 32);\n  lastWord32= scanLine32*affectedT + bytesPerLine(affectedR, 32);\n  scanLine16= bytesPerLine(width, 16);\n  firstWord16= scanLine16*affectedT + (bytesPerLineRD(affectedL, 32) >> 1);\n\n  for (line= affectedT; line < affectedB; line++)\n    {\n      register unsigned int *from= (unsigned int *)((long)fromImageData+firstWord32);\n      register unsigned int *limit= (unsigned int *)((long)fromImageData+lastWord32);\n      register unsigned short *to= (unsigned short *)((long)toImageData+firstWord16);\n      while (from < limit)\n\t{\n\t  to[0]= map32To16(from[0]);\n\t  from++;\n\t  to++;\n\t}\n      firstWord32+= scanLine32;\n      lastWord32+= scanLine32;\n      firstWord16+= scanLine16;\n    }\n#undef map32To16\n}\n\nvoid copyImage16To16(int *fromImageData, int *toImageData, int width, int height,\n\t\t     int affectedL, int affectedT, int affectedR, int affectedB)\n{\n  int scanLine16, firstWord16, lastWord16;\n  int line;\n  int rshift, gshift, bshift;\n  register unsigned int col;\n\n  rshift= stRNMask-5 + stRShift;\n  gshift= stGNMask-5 + stGShift;\n  bshift= stBNMask-5 + stBShift;\n\n#define map16To16(w) (col= (w), \\\n  (((col >> 10) & 0x1f) << rshift) | \\\n  (((col >> 5)  & 0x1f) << gshift) | \\\n   ((col & 0x1f) << bshift))\n\n  scanLine16= bytesPerLine(width, 16);\n  firstWord16= scanLine16*affectedT + bytesPerLineRD(affectedL, 16);\n  lastWord16= scanLine16*affectedT + bytesPerLine(affectedR, 16);\n\n  for (line= affectedT; line < affectedB; line++)\n    {\n      register unsigned short *from= (unsigned short *)((long)fromImageData+firstWord16);\n      register unsigned short *limit= (unsigned short *)((long)fromImageData+lastWord16);\n      register unsigned short *to= (unsigned short *)((long)toImageData+firstWord16);\n      while (from < limit)\n\t{\n#\t if defined(WORDS_BIGENDIAN)\n\t  to[0]= map16To16(from[0]);\n\t  to[1]= map16To16(from[1]);\n#\t else\n\t  to[0]= map16To16(from[1]);\n\t  to[1]= map16To16(from[0]);\n#\t endif\n\t  from+= 2;\n\t  to+= 2;\n\t}\n      firstWord16+= scanLine16;\n      lastWord16+= scanLine16;\n    }\n#undef map16To16\n}\n\nvoid copyImage32To32(int *fromImageData, int *toImageData, int width, int height,\n\t\t     int affectedL, int affectedT, int affectedR, int affectedB)\n{\n  int scanLine32, firstWord32, lastWord32;\n  int line;\n  int rshift, gshift, bshift;\n  register unsigned int col;\n\n  rshift= stRNMask-8 + stRShift;\n  gshift= stGNMask-8 + stGShift;\n  bshift= stBNMask-8 + stBShift;\n\n#define map32To32(w) (col= (w), \\\n  (((col >> 16) & 0xff) << rshift) | \\\n  (((col >> 8)  & 0xff) << gshift) | \\\n   ((col & 0xff) << bshift))\n\n  scanLine32= bytesPerLine(width, 32);\n  firstWord32= scanLine32*affectedT + bytesPerLineRD(affectedL, 32);\n  lastWord32= scanLine32*affectedT + bytesPerLine(affectedR, 32);\n\n  for (line= affectedT; line < affectedB; line++)\n    {\n      register unsigned int *from= (unsigned int *)((long)fromImageData+firstWord32);\n      register unsigned int *limit= (unsigned int *)((long)fromImageData+lastWord32);\n      register unsigned int *to= (unsigned int *)((long)toImageData+firstWord32);\n      while (from < limit)\n\t{\n\t  *to= map32To32(*from);\n\t  from++;\n\t  to++;\n\t}\n      firstWord32+= scanLine32;\n      lastWord32+= scanLine32;\n    }\n#undef map32To32\n}\n\nvoid copyImage32To32Same(int *fromImageData, int *toImageData,\n\t\t\t int width, int height,\n\t\t\t int affectedL, int affectedT, int affectedR, int affectedB)\n{\n  int scanLine32, firstWord32, lastWord32;\n  int line;\n\n  scanLine32= bytesPerLine(width, 32);\n  firstWord32= scanLine32*affectedT + bytesPerLineRD(affectedL, 32);\n  lastWord32= scanLine32*affectedT + bytesPerLine(affectedR, 32);\n\n  for (line= affectedT; line < affectedB; line++)\n    {\n      register unsigned int *from= (unsigned int *)((long)fromImageData+firstWord32);\n      register unsigned int *limit= (unsigned int *)((long)fromImageData+lastWord32);\n      register unsigned int *to= (unsigned int *)((long)toImageData+firstWord32);\n      while (from < limit)\n\t{\n\t  *to= *from;\n\t  from++;\n\t  to++;\n\t}\n      firstWord32+= scanLine32;\n      lastWord32+= scanLine32;\n    }\n}\n\nvoid copyImage32To24(int *fromImageData, int *toImageData, int width, int height,\n\t\t     int affectedL, int affectedT, int affectedR, int affectedB)\n{\n  int scanLine24, firstWord24;\n  int scanLine32, firstWord32, lastWord32;\n  int line;\n  int rshift, gshift, bshift;\n  register unsigned int col;\n  rshift= stRNMask-8 + stRShift;\n  gshift= stGNMask-8 + stGShift;\n  bshift= stBNMask-8 + stBShift;\n\n#define map32To24(w) (col= (w), \\\n  (((col >> 16) & 0xff) << rshift) | \\\n  (((col >> 8)  & 0xff) << gshift) | \\\n   ((col & 0xff) << bshift))\n\n  /* offsets for the 24bpp destination */\n  scanLine24= bytesPerLine(width, 24);\n  firstWord24= scanLine24*affectedT + (affectedL * 3) /* NOT bytesPerLineRD(affectedL, 24) ! */ ;\n\n  /* offsets for the 32bpp source */\n  scanLine32= bytesPerLine(width, 32);\n  firstWord32= scanLine32*affectedT + bytesPerLineRD(affectedL, 32);\n  lastWord32= scanLine32*affectedT + bytesPerLine(affectedR, 32);\n\n  for (line= affectedT; line < affectedB; line++)\n    {\n      register unsigned int *from= (unsigned int *)((long)fromImageData+firstWord32);\n      register unsigned int *limit= (unsigned int *)((long)fromImageData+lastWord32);\n      register unsigned char *to= (unsigned char *)((long)toImageData+firstWord24);\n      register unsigned int newpix= 0;\n      while (from < limit)\n\t{\n\t  newpix= map32To24(*from);\n\t  from++;\n\t  *to= (unsigned char) (newpix & 0xff);\n\t  newpix= newpix >> 8;\n\t  to++;\n\t  *to= (unsigned char) (newpix & 0xff);\n\t  newpix= newpix >> 8;\n\t  to++;\n\t  *to= (unsigned char) (newpix & 0xff);\n\t  to++;\n\t}\n      firstWord24+= scanLine24;\n      firstWord32+= scanLine32;\n      lastWord32+= scanLine32;\n    }\n#undef map32To24\n}\n\n\nstatic void display_winSetName(char *imageName)\n{\n  /* update the window title */\n  if (isConnectedToXServer)\n    XStoreName(stDisplay, stParent, imageName);\n}\n\n\n/*** display connection ***/\n\n\nstatic int openXDisplay(void)\n{\n  /* open the Squeak window. */\n  if (!isConnectedToXServer)\n    {\n      initClipboard();\n      initWindow(displayName);\n      initPixmap();\n      if (inBrowser()) /* if so we will be reparented and mapped by plugin */\n\t{\n\t  /* tell browser our window */\n#        if defined(DEBUG_BROWSER)\n\t  fprintf(stderr, \"browser: sending squeak window = 0x%x\\n\", stWindow);\n#        endif\n\t  4 == write(browserPipes[1], &stWindow, 4);\n#        if defined(DEBUG_BROWSER)\n\t  fprintf(stderr, \"browser: squeak window sent\\n\");\n#        endif\n\t  /* listen for commands */\n\t  aioEnable(browserPipes[0], 0, AIO_EXT);\n\t  aioHandle(browserPipes[0], npHandler, AIO_RX);\n\t}\n      isConnectedToXServer= 1;\n      aioEnable(stXfd, 0, AIO_EXT);\n      aioHandle(stXfd, xHandler, AIO_RX);\n    }\n  return 0;\n}\n\nstatic void\nmapXDisplay(void)\n{\n  if (!inBrowser()) {\n    setWindowSize();\n    XMapWindow(stDisplay, stParent);\n    XMapWindow(stDisplay, stWindow);\n  }\n}\n\nstatic int forgetXDisplay(void)\n{\n  /* Initialise variables related to the X connection, and\n     make the existing connection to the X Display invalid\n     for any further access from this Squeak image.  Any socket\n     connection to the X server is closed, but the server is\n     not told to terminate any windows or X sessions.  This\n     is used to support fork() for an existing Squeak image,\n     where the child is expected to continue as a headless\n     image, and the parent continues its normal execution. */\n\n  displayName= 0;       /* name of display, or 0 for $DISPLAY   */\n  stDisplay= null;      /* Squeak display                       */\n  if (isConnectedToXServer)\n    close(stXfd);\n  if (stXfd >= 0)\n    aioDisable(stXfd);\n  stXfd= -1;\t\t/* X connection file descriptor         */\n  stParent= null;\n  stWindow= null;       /* Squeak window                        */\n  inputContext= 0;\n  inputFont= NULL;\n  isConnectedToXServer= 0;\n  return 0;\n}\n\n\nint disconnectXDisplay(void)\n{\n  if (isConnectedToXServer)\n    {\n      XSync(stDisplay, False);\n      handleEvents();\n      XDestroyWindow(stDisplay, stWindow);\n      if (browserWindow == 0)\n\tXDestroyWindow(stDisplay, stParent);\n      if (inputContext)\n        {\n\t  XIM im= XIMOfIC(inputContext);\n\t  XDestroyIC(inputContext);\n\t  if (im) XCloseIM(im);\n\t}\n      if (inputFont)\n\tXFreeFontSet(stDisplay, inputFont);\n      XCloseDisplay(stDisplay);\n    }\n  forgetXDisplay();\n  return 0;\n}\n\n\n/*** OpenGL ***/\n\nstatic void *display_ioGetDisplay(void)\t{ return (void *)stDisplay; }\nstatic void *display_ioGetWindow(void)\t{ return (void *)stWindow; }\n\n#if (!USE_X11_GLX)\n\nstatic sqInt display_ioGLinitialise(void) { return 0; }\nstatic sqInt display_ioGLcreateRenderer(glRenderer *r, sqInt x, sqInt y, sqInt w, sqInt h, sqInt flags) { return 0; }\nstatic void display_ioGLdestroyRenderer(glRenderer *r) {}\nstatic void display_ioGLswapBuffers(glRenderer *r) {}\nstatic sqInt display_ioGLmakeCurrentRenderer(glRenderer *r) { return 0; }\nstatic void display_ioGLsetBufferRect(glRenderer *r, sqInt x, sqInt y, sqInt w, sqInt h) {}\n\n#else\n\n# include \"B3DAcceleratorPlugin.h\"\n# include \"sqOpenGLRenderer.h\"\n\n# include <GL/gl.h>\n# include <GL/glx.h>\n\nstatic void printVisual(XVisualInfo* visinfo);\nstatic void listVisuals();\n\nstatic int visualAttributes[]= {\n  GLX_STENCIL_SIZE,     0,  /* filled in later - must be first item! */\n  GLX_ALPHA_SIZE,       1,  /* filled in later - must be second item! */\n  GLX_RGBA,                 /* no indexed colors */\n  GLX_DOUBLEBUFFER,         /* will swap */\n  GLX_LEVEL,            0,  /* frame buffer, not overlay */\n  GLX_DEPTH_SIZE,       16, /* decent depth */   \n  GLX_AUX_BUFFERS,      0,  /* no aux buffers */\n  GLX_ACCUM_RED_SIZE,   0,  /* no accumulation */\n  GLX_ACCUM_GREEN_SIZE, 0,\n  GLX_ACCUM_BLUE_SIZE,  0,\n  GLX_ACCUM_ALPHA_SIZE, 0,\n  None\n};\n\nextern int verboseLevel;\n\nstatic sqInt display_ioGLinitialise(void) { return 1; }\n\n#define _renderWindow(R)\t((R)->drawable)\n#define renderWindow(R)\t\t((Window)(R)->drawable)\n#define _renderContext(R)\t((R)->context)\n#define renderContext(R)\t((GLXContext)(R)->context)\n\nstatic sqInt display_ioGLcreateRenderer(glRenderer *r, sqInt x, sqInt y, sqInt w, sqInt h, sqInt flags)\n{\n  XVisualInfo* visinfo= 0;\n\n  if (flags & B3D_STENCIL_BUFFER)\n    visualAttributes[1]= 1;\n  else \n    visualAttributes[1]= 0;\n  _renderWindow(r)= 0;\n  _renderContext(r)= 0;\n\n  DPRINTF3D(3, (fp, \"---- Creating new renderer ----\\r\\r\"));\n\n  /* sanity checks */\n  if (w < 0 || h < 0)\n    {\n      DPRINTF3D(1, (fp, \"Negative extent (%i@%i)!\\r\", w, h));\n      goto fail;\n    }\n  /* choose visual and create context */\n  if (verboseLevel >= 3)\n    listVisuals();\n  {\n    visinfo= glXChooseVisual(stDisplay, DefaultScreen(stDisplay), visualAttributes);\n    if (!visinfo)\n      {\n\t/* retry without alpha */\n\tvisualAttributes[3]= 0;\n\tvisinfo= glXChooseVisual(stDisplay, DefaultScreen(stDisplay), visualAttributes);\n      }\n    if (!visinfo)\n      {\n\tDPRINTF3D(1, (fp, \"No OpenGL visual found!\\r\"));\n\tgoto fail;\n      }\n    DPRINTF3D(3, (fp, \"\\r#### Selected GLX visual ID 0x%lx ####\\r\", visinfo->visualid));\n    if (verboseLevel >= 3)\n      printVisual(visinfo);\n\n    /* create context */\n    if (!(_renderContext(r)= glXCreateContext(stDisplay, visinfo, 0, GL_TRUE)))\n      {\n\tDPRINTF3D(1, (fp, \"Creating GLX context failed!\\r\"));\n\tgoto fail;\n      }\n    DPRINTF3D(3, (fp, \"\\r#### Created GLX context ####\\r\"  ));\n\n    /* create window */\n    {\n      XSetWindowAttributes attributes;\n      unsigned long valuemask= 0;\n\n      attributes.colormap= XCreateColormap(stDisplay, DefaultRootWindow(stDisplay),\n\t\t\t\t\t   visinfo->visual, AllocNone);\n      valuemask |= CWColormap;\n\n      attributes.background_pixel= BlackPixel(stDisplay, DefaultScreen(stDisplay));\n      valuemask |= CWBackPixel;\n\n      attributes.border_pixel= 0;\n      valuemask |= CWBorderPixel;\n\n      if (!(_renderWindow(r)= (void *)XCreateWindow(stDisplay, stWindow, x, y, w, h, 0,\n\t\t\t\t\t\t    visinfo->depth, InputOutput, visinfo->visual, \n\t\t\t\t\t\t    valuemask, &attributes)))\n\t{\n\t  DPRINTF3D(1, (fp, \"Failed to create client window\\r\"));\n\t  goto fail;\n\t}\n      XMapWindow(stDisplay, renderWindow(r));\n    }\n    DPRINTF3D(3, (fp, \"\\r#### Created window ####\\r\"  ));\n    XFree(visinfo);\n    visinfo= 0;\n  }\n\n  /* Make the context current */\n  if (!glXMakeCurrent(stDisplay, renderWindow(r), renderContext(r)))\n    {\n      DPRINTF3D(1, (fp, \"Failed to make context current\\r\"));\n      goto fail;\n    }\n  DPRINTF3D(3, (fp, \"\\r### Renderer created! ###\\r\"));\n  return 1;\n\n fail:\n  DPRINTF3D(1, (fp, \"OpenGL initialization failed\\r\"));\n  if (visinfo)\n    XFree(visinfo);\n  if (renderContext(r))\n    glXDestroyContext(stDisplay, renderContext(r));\n  if (renderWindow(r))\n    XDestroyWindow(stDisplay, renderWindow(r));\n  return 0;\n}\n\n\nstatic void display_ioGLdestroyRenderer(glRenderer *r)\n{\n  glXDestroyContext(stDisplay, renderContext(r));\n  XDestroyWindow(stDisplay, renderWindow(r));\n}\n\n\nstatic void display_ioGLswapBuffers(glRenderer *r)\n{\n  glXSwapBuffers(stDisplay, renderWindow(r));\n}\n\n\nstatic sqInt display_ioGLmakeCurrentRenderer(glRenderer *r)\n{\n  if (r)\n    {\n      if (!glXMakeCurrent(stDisplay, renderWindow(r), renderContext(r)))\n\t{\n\t  DPRINTF3D(1, (fp, \"Failed to make context current\\r\"));\n\t  return 0;\n\t}\n    }\n  else\n    glXMakeCurrent(stDisplay, 0, 0);\n  return 1;\n}\n\n\nstatic void display_ioGLsetBufferRect(glRenderer *r, sqInt x, sqInt y, sqInt w, sqInt h)\n{\n  XMoveResizeWindow(stDisplay, renderWindow(r), x, y, w, h);\n}\n\n\n/* GLX_CONFIG_CAVEAT might not be supported */\n/* but the test below is worded so it does not matter */\n# if !defined(GLX_CONFIG_CAVEAT)\n#   define GLX_CONFIG_CAVEAT  0x20\n#   define GLX_SLOW_CONFIG    0x8001\n# endif\n\nstatic void printVisual(XVisualInfo* visinfo)\n{\n  int isOpenGL; \n  glXGetConfig(stDisplay, visinfo, GLX_USE_GL, &isOpenGL);\n  if (isOpenGL) \n    {\n      int slow= 0;\n      int red, green, blue, alpha, stencil, depth;\n      glXGetConfig(stDisplay, visinfo, GLX_CONFIG_CAVEAT, &slow);\n      glXGetConfig(stDisplay, visinfo, GLX_RED_SIZE,      &red);\n      glXGetConfig(stDisplay, visinfo, GLX_GREEN_SIZE,    &green);\n      glXGetConfig(stDisplay, visinfo, GLX_BLUE_SIZE,     &blue);\n      glXGetConfig(stDisplay, visinfo, GLX_ALPHA_SIZE,    &alpha);\n      glXGetConfig(stDisplay, visinfo, GLX_STENCIL_SIZE,  &stencil);\n      glXGetConfig(stDisplay, visinfo, GLX_DEPTH_SIZE,    &depth);\n\n      if (slow != GLX_SLOW_CONFIG)\n        { DPRINTF3D(3, (fp,\"===> OpenGL visual\\r\")) }\n      else\n        { DPRINTF3D(3, (fp,\"---> slow OpenGL visual\\r\")) }\n\n      DPRINTF3D(3, (fp,\"rgbaBits = %i+%i+%i+%i\\r\", red, green, blue, alpha));\n      DPRINTF3D(3, (fp,\"stencilBits = %i\\r\", stencil));\n      DPRINTF3D(3, (fp,\"depthBits = %i\\r\", depth));\n    }\n  glGetError();\t/* reset error flag */\n}\n\nstatic void listVisuals(void)\n{\n  XVisualInfo* visinfo;\n  int nvisuals, i;\n   \n  visinfo= XGetVisualInfo(stDisplay, VisualNoMask, NULL, &nvisuals);\n\n  for (i= 0; i < nvisuals; i++)\n    {\n      DPRINTF3D(3, (fp,\"#### Checking pixel format (visual ID 0x%lx)\\r\", visinfo[i].visualid));\n      printVisual(&visinfo[i]);\n    }\n  XFree(visinfo);\n}\n\n#endif /* defined(USE_X11_GLX) */\n\n\n\n/*** browser plugin (from sqUnixMozilla.c) ***/\n\nsqInt display_primitivePluginBrowserReady(void);\nsqInt display_primitivePluginRequestURLStream(void);\nsqInt display_primitivePluginRequestURL(void);\nsqInt display_primitivePluginPostURL(void);\nsqInt display_primitivePluginRequestFileHandle(void);\nsqInt display_primitivePluginDestroyRequest(void);\nsqInt display_primitivePluginRequestState(void);\n\n\n/*** host window support ***/\n\n#if (SqDisplayVersionMajor >= 1 && SqDisplayVersionMinor >= 2)\n\nstatic int display_hostWindowCreate(int w, int h, int x, int y, char *list, int attributeListLength)\n\t\t\t\t\t\t\t\t\t\t\t    { return 0; }\nstatic int display_hostWindowClose(int index)                                               { return 0; }\nstatic int display_hostWindowCloseAll(void)                                                 { return 0; }\nstatic int display_hostWindowShowDisplay(unsigned *dispBitsIndex, int width, int height, int depth,\n\t\t\t\t\t int affectedL, int affectedR, int affectedT, int affectedB, int windowIndex)\n\t\t\t\t\t\t\t\t\t\t\t    { return 0; }\n\n#define isWindowHandle(winIdx) ((winIdx) >= 65536)\n\nstatic int display_ioSizeOfNativeWindow(void *windowHandle);\nstatic int display_hostWindowGetSize(int windowIndex)\n{\n\treturn isWindowHandle(windowIndex)\n\t\t\t? display_ioSizeOfNativeWindow((void *)windowIndex)\n\t\t\t: -1;\n}\n\n/* ioSizeOfWindowSetxy: args are int windowIndex, int w & h for the\n * width / height to make the window. Return the actual size the OS\n * produced in (width<<16 | height) format or -1 for failure as above. */\nstatic int display_hostWindowSetSize(int windowIndex, int w, int h)\n{\n\tXWindowAttributes attrs;\n\tint real_border_width;\n\n\tif (!isWindowHandle(windowIndex)\n\t || !XGetWindowAttributes(stDisplay, (Window)windowIndex, &attrs))\n\t\treturn -1;\n\n\t/* At least under Gnome a window's border width in its attributes is zero\n\t * but the relative position of the left-hand edge is the actual border\n\t * width.\n\t */\n\treal_border_width = attrs.border_width ? attrs.border_width : attrs.x;\n\treturn XResizeWindow(stDisplay, (Window)windowIndex,\n\t\t\t\t\t\t w - 2 * real_border_width,\n\t\t\t\t\t\t h - attrs.y - real_border_width)\n\t\t? display_ioSizeOfNativeWindow((void *)windowIndex)\n\t\t: -1;\n}\n\nstatic int display_ioPositionOfNativeWindow(void *windowHandle);\nstatic int display_hostWindowGetPosition(int windowIndex)\n{\n\treturn isWindowHandle(windowIndex)\n\t\t\t? display_ioPositionOfNativeWindow((void *)windowIndex)\n\t\t\t: -1;\n}\n\n/* ioPositionOfWindowSetxy: args are int windowIndex, int x & y for the\n * origin x/y for the window. Return the actual origin the OS\n * produced in (left<<16 | top) format or -1 for failure, as above */\nstatic int display_hostWindowSetPosition(int windowIndex, int x, int y)\n{\n\tif (!isWindowHandle(windowIndex))\n\t\treturn -1;\n\treturn XMoveWindow(stDisplay, (Window)windowIndex, x, y)\n\t\t? display_ioPositionOfNativeWindow((void *)windowIndex)\n\t\t: -1;\n}\n\n\nstatic int display_hostWindowSetTitle(int windowIndex, char *newTitle, int sizeOfTitle)\n{ \n  if (windowIndex != 1 && windowIndex != stWindow)\n    return -1;\n\n  XChangeProperty(stDisplay, stParent,\n\t\t  XInternAtom(stDisplay, \"_NET_WM_NAME\", False),\n\t\t  XInternAtom(stDisplay, \"UTF8_STRING\",  False),\n\t\t  8, PropModeReplace, newTitle, sizeOfTitle);\n\n  return 0;\n}\n\n#endif /* (SqDisplayVersionMajor >= 1 && SqDisplayVersionMinor >= 2) */\n\n\nstatic char *display_winSystemName(void)\n{\n  return \"X11\";\n}\n\n\nstatic void display_winInit(void)\n{\n  if (!strcmp(argVec[0], \"headlessSqueak\"))\n    headless= 1;\n\n#if defined(USE_XSHM)\n  {\n#  if defined(AT_EXIT)\n    AT_EXIT(shmExit);\n    AT_EXIT((void(*)(void))ioShutdownAllModules);\n#  else\n#    warning: cannot free display bitmap on exit!\n#    warning: cannot shut down module system on exit!\n#   endif\n  }\n#endif\n\n  /* avoid compiler warning */\n  (void)recordDragEvent;\n}\n\n\nstatic void display_winOpen(int argc, char *dropFiles[])\n{\n#if defined(DEBUG_WINDOW)\n  int sws= getSavedWindowSize();\n  fprintf(stderr, \"saved window size is %d %d\\n\", sws >> 16, sws & 0xffff);\n#endif\n  int i, launched = 0;\n  if (headless) {\n    forgetXDisplay();\n    return;\n  }\n  openXDisplay();\n\n  for (i = 0; i < argc; i++)\n    if (dndLaunchFile(dropFiles[i]))\n      launched = 1;\n\n  if (launched)\n    exit(0);\n\n  mapXDisplay();\n}\n\n\nstatic void display_winExit(void)\n{\n  disconnectXDisplay();\n}\n\n\nstatic int  display_winImageFind(char *buf, int len)\t{ return 0; }\nstatic void display_winImageNotFound(void)\t\t{}\n\n#if SqDisplayVersionMajor >= 1 && SqDisplayVersionMinor >= 3\n\n/* eem Mar 22 2010 - new code to come up to level of Qwaq host window support\n * on Mac & Win32.\n * In the following functions \"Display\" refers to the user area of a window and\n * \"Window\" refers to the entire window including border & title bar.\n */\nstatic sqInt\ndisplay_ioSetCursorPositionXY(sqInt x, sqInt y)\n{\n\tif (!XWarpPointer(stDisplay, None, DefaultRootWindow(stDisplay),\n\t\t\t\t\t  0, 0, 0, 0, x, y))\n\t\treturn -1;\n\tXFlush(stDisplay);\n\treturn 0;\n}\n\n/* Return the pixel origin (topleft) of the platform-defined working area\n   for the screen containing the given window. */\nstatic int\ndisplay_ioPositionOfScreenWorkArea(int windowIndex)\n{\n/* We simply hard-code this.  There's no obvious window-manager independent way\n * to discover this that doesn't involve creating a window.\n * We're also not attempting multi-monitor support; attempting to configure a\n * laptop with a second monitor via ATI's \"control center\" resulted in no\n * cursor and no ATI control center once the multi-monitor mode was enabled.\n */\n#define NominalMenubarHeight 24 /* e.g. Gnome default */\n\treturn (0 << 16) | NominalMenubarHeight;\n}\n\n/* Return the pixel extent of the platform-defined working area\n   for the screen containing the given window. */\nstatic int\ndisplay_ioSizeOfScreenWorkArea(int windowIndex)\n{\n\tXWindowAttributes attrs;\n\n\tif (!XGetWindowAttributes(stDisplay, DefaultRootWindow(stDisplay), &attrs))\n\t\treturn -1;\n\n\treturn (attrs.width << 16) | attrs.height;\n}\n\nvoid *display_ioGetWindowHandle() { return (void *)stParent; }\n\nstatic int\ndisplay_ioPositionOfNativeDisplay(void *windowHandle)\n{\n\tXWindowAttributes attrs;\n\tWindow neglected_child;\n\tint rootx, rooty;\n\n\tif (!XGetWindowAttributes(stDisplay, (Window)windowHandle, &attrs)\n\t || !XTranslateCoordinates(stDisplay, (Window)windowHandle, attrs.root,\n\t\t\t\t\t\t\t\t-attrs.border_width, -attrs.border_width,\n\t\t\t\t\t\t\t\t&rootx, &rooty, &neglected_child))\n\t\treturn -1;\n\n\treturn (rootx << 16) | rooty;\n}\n\nstatic int\ndisplay_ioSizeOfNativeDisplay(void *windowHandle)\n{\n\tXWindowAttributes attrs;\n\tint rootx, rooty;\n\n\tif (!XGetWindowAttributes(stDisplay, (Window)windowHandle, &attrs))\n\t\treturn -1;\n\n\treturn (attrs.width << 16) | attrs.height;\n}\n\nstatic int\ndisplay_ioPositionOfNativeWindow(void *windowHandle)\n{\n\tXWindowAttributes attrs;\n\tWindow neglected_child;\n\tint rootx, rooty;\n\n\tif (!XGetWindowAttributes(stDisplay, (Window)windowHandle, &attrs)\n\t || !XTranslateCoordinates(stDisplay, (Window)windowHandle, attrs.root,\n\t\t\t\t\t\t\t   -attrs.border_width, -attrs.border_width,\n\t\t\t\t\t\t\t   &rootx, &rooty, &neglected_child))\n\t\treturn -1;\n\n\treturn (rootx - attrs.x << 16) | (rooty - attrs.y);\n}\n\nstatic int\ndisplay_ioSizeOfNativeWindow(void *windowHandle)\n{\n\tXWindowAttributes attrs;\n\tint real_border_width;\n\n\tif (!XGetWindowAttributes(stDisplay, (Window)windowHandle, &attrs))\n\t\treturn -1;\n\n\t/* At least under Gnome a window's border width in its attributes is zero\n\t * but the relative position of the left-hand edge is the actual border\n\t * width.\n\t */\n\treal_border_width = attrs.border_width ? attrs.border_width : attrs.x;\n\treturn (attrs.width + 2 * real_border_width << 16)\n\t\t | (attrs.height + attrs.y + real_border_width);\n}\n#endif /* SqDisplayVersionMajor >= 1 && SqDisplayVersionMinor >= 3 */\n\n\nSqDisplayDefine(X11);\n\n\n/*** module ***/\n\n\nstatic void display_printUsage(void)\n{\n  printf(\"\\nX11 <option>s:\\n\");\n  printf(\"  -browserWindow <wid>  run in window <wid>\\n\");\n  printf(\"  -browserPipes <r> <w> run as Browser plugin using descriptors <r> <w>\\n\");\n  printf(\"  -cmdmod <n>           map Mod<n> to the Command key\\n\");\n  printf(\"  -compositioninput     enable overlay window for composed characters\\n\");\n  printf(\"  -display <dpy>        display on <dpy> (default: $DISPLAY)\\n\");\n  printf(\"  -fullscreen           occupy the entire screen\\n\");\n#if (USE_X11_GLX)\n  printf(\"  -glxdebug <n>         set GLX debug verbosity level to <n>\\n\");\n#endif\n  printf(\"  -headless             run in headless (no window) mode\\n\");\n  printf(\"  -iconic               start up iconified\\n\");\n  printf(\"  -lazy                 go to sleep when main window unmapped\\n\");\n  printf(\"  -mapdelbs             map Delete key onto Backspace\\n\");\n  printf(\"  -nointl               disable international keyboard support\\n\");\n  printf(\"  -notitle              disable the Squeak window title bar\\n\");\n  printf(\"  -title <t>            use t as the Squeak window title instead of the image name\\n\");\n  printf(\"  -ldtoms <n>           launch drop timeout milliseconds\\n\");\n  printf(\"  -noxdnd               disable X drag-and-drop protocol support\\n\");\n  printf(\"  -optmod <n>           map Mod<n> to the Option key\\n\");\n#if defined(SUGAR)\n  printf(\"  -sugarBundleId <id>   set window property _SUGAR_BUNDLE_ID to <id>\\n\");\n  printf(\"  -sugarActivityId <id> set window property _SUGAR_ACTIVITY_ID to <id>\\n\");\n#endif\n  printf(\"  -swapbtn              swap yellow (middle) and blue (right) buttons\\n\");\n  printf(\"  -xasync               don't serialize display updates\\n\");\n#if defined(USE_XICFONT_OPTION)\n  printf(\"  -xicfont <f>          use font set <f> for the input context overlay\\n\");\n#endif\n  printf(\"  -xshm                 use X shared memory extension\\n\");\n}\n\nstatic void display_printUsageNotes(void)\n{\n  printf(\"  Using `unix:0' for <dpy> may improve local display performance.\\n\");\n  printf(\"  -xshm only works when Squeak is running on the X server host.\\n\");\n}\n\n\nstatic void display_parseEnvironment(void)\n{\n  char *ev= 0;\n\n  if (getenv(\"LC_CTYPE\") || getenv(\"LC_ALL\"))\n    x2sqKey= x2sqKeyInput;\n\n  if (localeEncoding) \n    {\n      if (getenv(\"SQUEAK_COMPOSITIONINPUT\"))\n\t{\n\t  compositionInput= 1;\n\t  initInput= initInputI18n;\n\t  x2sqKey= x2sqKeyCompositionInput;\n\t}\n    }\n\n  if (getenv(\"SQUEAK_LAZY\"))\t\tsleepWhenUnmapped= 1;\n  if (getenv(\"SQUEAK_SPY\"))\t\twithSpy= 1;\n#if !defined (INIT_INPUT_WHEN_KEY_PRESSED)\n  if (getenv(\"SQUEAK_NOINTL\"))\t\tinitInput= initInputNone;\n#else\n  if (getenv(\"SQUEAK_NOINTL\"))\t\tx2sqKey= x2sqKeyPlain;\n#endif\n  if (getenv(\"SQUEAK_NOTITLE\"))\t\tnoTitle= 1;\n  if (getenv(\"SQUEAK_NOXDND\"))\t\tuseXdnd= 0;\n  if (getenv(\"SQUEAK_FULLSCREEN\"))\tfullScreen= 1;\n  if (getenv(\"SQUEAK_ICONIC\"))\t\ticonified= 1;\n  if (getenv(\"SQUEAK_MAPDELBS\"))\tmapDelBs= 1;\n  if (getenv(\"SQUEAK_SWAPBTN\"))\t\tswapBtn= 1;\n  if ((ev= getenv(\"SQUEAK_OPTMOD\")))\toptMapIndex= Mod1MapIndex + atoi(ev) - 1;\n  if ((ev= getenv(\"SQUEAK_CMDMOD\")))\tcmdMapIndex= Mod1MapIndex + atoi(ev) - 1;\n#if defined(USE_XSHM)\n  if (getenv(\"SQUEAK_XSHM\"))\t\tuseXshm= 1;\n  if (getenv(\"SQUEAK_XASYNC\"))\t\tasyncUpdate= 1;\n#endif\n}\n\n\n\nstatic int display_parseArgument(int argc, char **argv)\n{\n  int n= 1;\n  char *arg= argv[0];\n\n  if      (!strcmp(arg, \"-headless\"))\theadless= 1;\n#if defined(USE_XSHM)\n  else if (!strcmp(arg, \"-xshm\"))\tuseXshm= 1;\n  else if (!strcmp(arg, \"-xasync\"))\tasyncUpdate= 1;\n#else\n  else if (!strcmp(arg, \"-xshm\") ||\n           !strcmp(arg, \"-xasync\"))\tfprintf(stderr, \"ignoring %s (not supported by this VM)\\n\", arg);\n#endif\n  else if (!strcmp(arg, \"-lazy\"))\tsleepWhenUnmapped= 1;\n  else if (!strcmp(arg, \"-notitle\"))\tnoTitle= 1;\n  else if (!strcmp(arg, \"-mapdelbs\"))\tmapDelBs= 1;\n  else if (!strcmp(arg, \"-swapbtn\"))\tswapBtn= 1;\n  else if (!strcmp(arg, \"-fullscreen\"))\tfullScreen= 1;\n  else if (!strcmp(arg, \"-iconic\"))\ticonified= 1;\n#if !defined (INIT_INPUT_WHEN_KEY_PRESSED)\n  else if (!strcmp(arg, \"-nointl\"))\tinitInput= initInputNone;\n#else\n  else if (!strcmp(arg, \"-nointl\"))\tx2sqKey= x2sqKeyPlain;\n#endif\n  else if (!strcmp(arg, \"-compositioninput\"))\n    {\n      compositionInput= 1;\n      x2sqKey= x2sqKeyCompositionInput;\n      initInput= initInputI18n;\n    }\n  else if (!strcmp(arg, \"-noxdnd\"))\tuseXdnd= 0;\n  else if (argv[1])\t/* option requires an argument */\n    {\n      n= 2;\n      if      (!strcmp(arg, \"-display\")) displayName= argv[1];\n      else if (!strcmp(arg, \"-optmod\"))\t optMapIndex= Mod1MapIndex + atoi(argv[1]) - 1;\n      else if (!strcmp(arg, \"-cmdmod\"))  cmdMapIndex= Mod1MapIndex + atoi(argv[1]) - 1;\n#    if defined(SUGAR)\n      else if (!strcmp(arg, \"-sugarBundleId\"))   sugarBundleId= argv[1];\n      else if (!strcmp(arg, \"-sugarActivityId\")) sugarActivityId= argv[1];\n#    endif\n#    if defined(USE_XICFONT_OPTION)\n      else if (!strcmp(arg, \"-xicfont\")) inputFontStr= argv[1];  \n#    endif\n      else if (!strcmp(arg, \"-browserWindow\"))\n\t{\n\t  sscanf(argv[1], \"%lu\", (unsigned long *)&browserWindow);\n\t  if (browserWindow == 0)\n\t    {\n\t      fprintf(stderr, \"Error: invalid argument for `-browserWindow'\\n\");\n\t      exit(1);\n\t    }\n\t}\n      else if (!strcmp(arg, \"-browserPipes\"))\n\t{\n\t  if (!argv[2]) return 0;\n\t  sscanf(argv[1], \"%i\", &browserPipes[0]);\n\t  sscanf(argv[2], \"%i\", &browserPipes[1]);\n\t  /* receive browserWindow */\n#\t if defined(DEBUG_BROWSER)\n\t  fprintf(stderr, \"browser: reading window\\n\");\n#\t endif\n\t  if (sizeof(browserWindow) !=\n\t      read(browserPipes[0], (void *)&browserWindow, sizeof(browserWindow)))\n\t    {\n\t      perror(\"reading browserWindow\");\n\t      exit(1);\n\t    }\n#\t if defined(DEBUG_BROWSER)\n\t  fprintf(stderr, \"browser: window = 0x%x\\n\", browserWindow);\n#\t endif\n\t  return 3;\n\t}\n#    if (USE_X11_GLX)\n      else if (!strcmp(arg, \"-glxdebug\"))\n\t{\n\t  sscanf(argv[1], \"%d\", &verboseLevel);\n\t}\n#    endif\n      else if (!strcmp(arg, \"-title\")) defaultWindowLabel = argv[1];\n      else if (!strcmp(arg, \"-ldtoms\")) launchDropTimeoutMsecs = atol(argv[1]);\n      else\n\tn= 0;\t/* not recognised */\n    }\n  else\n    n= 0;\n  return n;\n}\n\nstatic void *display_makeInterface(void) { return &display_X11_itf; }\n\n#include \"SqModule.h\"\n\nSqModuleDefine(display, X11);\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-X11/sqUnixXdnd.c",
    "content": "/* sqUnixXdnd.c -- drag-and-drop for the X Window System.\t-*- C -*-\n * \n *   Copyright (C) 1996-2007 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a copy\n *   of this software and associated documentation files (the \"Software\"), to deal\n *   in the Software without restriction, including without limitation the rights\n *   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n *   copies of the Software, and to permit persons to whom the Software is\n *   furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n *   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n *   SOFTWARE.\n */\n\n/* Author: Ian Piumarta <ian.piumarta@inria.fr>\n * \n * Last edited: 2009-08-19 04:21:30 by piumarta on emilia-2.local\n * \n * BUGS\n * \n * - This only works with version 3 and higher of the XDND protocol.\n *   No attempt whatsoever is made to check for and deal with earlier\n *   versions.  Since version 3 is at least six years old now, I doubt\n *   this matters much.\n * \n * - Some memory could be released between drop operations, but it's\n *   only a few tens of bytes so who cares?\n * \n * - Only filenames (MIME type text/uri-list) are handled, although\n *   it would be trivial to extend the code to cope with dropping text\n *   selections into the Squeak clipboard.  I'm simply too lazy to be\n *   bothered.\n * \n * - No attempt is made to verify that XDND protocol messages arrive\n *   in the correct order.  (If your WM or file manager is broken, you\n *   get to keep all the shrapnel that will be left behind after\n *   dragging something onto Squeak).\n */\n\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdarg.h>\n#include <string.h>\n#include <ctype.h>\n\n#include <X11/Xlib.h>\n#include <X11/Xatom.h>\n\n\n#if !defined(DEBUG_XDND)\n# define DEBUG_XDND\t0\n#endif\n\n\nstatic\tAtom\t  XdndVersion= (Atom)3;\n\nstatic\tAtom\t  XdndAware;\nstatic\tAtom\t  XdndSelection;\nstatic\tAtom\t  XdndEnter;\nstatic\tAtom\t  XdndLeave;\nstatic\tAtom\t  XdndPosition;\nstatic\tAtom\t  XdndDrop;\nstatic\tAtom\t  XdndFinished;\nstatic\tAtom\t  XdndStatus;\nstatic\tAtom\t  XdndActionCopy;\nstatic\tAtom\t  XdndActionMove;\nstatic\tAtom\t  XdndActionLink;\nstatic\tAtom\t  XdndActionAsk;\nstatic\tAtom\t  XdndActionPrivate;\nstatic\tAtom\t  XdndTypeList;\nstatic\tAtom\t  XdndTextUriList;\nstatic\tAtom\t  XdndSelectionAtom;\nstatic\tAtom\t  XdndSqueakLaunchDrop;\nstatic\tAtom\t  XdndSqueakLaunchAck;\n\nstatic\tWindow\t  xdndSourceWindow= 0;\nstatic\tint\t  isUrlList= 0;\nstatic\tint\t  xdndWillAccept= 0;\n\n/* To keep backword compatibitily, xdndWillAccept is always 1.\n * isUrlList is 1 only if the dropped type includes \"text/uri-list\".\n * \n * case isUrlList == 1: Get url list and send dndFinished immediately.  Then record drag event.\n * case isUrlList == 0: Record drag event anyway (uxDropFileCount= 0).  The image will get the data and send dndFinished.\n */\n\nstatic Atom\t *xdndInTypes= 0;   /* all targets in clipboard */\n\nstatic Window     xdndOutTarget= None;\nstatic Atom      *xdndOutTypes= 0;  /* Types offered by source window */\n\nstatic XSelectionRequestEvent xdndOutRequestEvent; /* RequestEvent from target */\n\nenum XdndState {\n  XdndStateIdle,\n  XdndStateEntered,\n  XdndStateTracking,\n  XdndStateOutTracking,\n  XdndStateOutAccepted\n};\n\nenum {\n  DndOutStart\t= -1,\n  DndInFinished\t= -2\n};\n\n#define xdndEnter_sourceWindow(evt)\t\t( (evt)->data.l[0])\n#define xdndEnter_version(evt)\t\t\t( (evt)->data.l[1] >> 24)\n#define xdndEnter_hasThreeTypes(evt)\t\t(((evt)->data.l[1] & 0x1UL) == 0)\n#define xdndEnter_typeAt(evt, idx)\t\t( (evt)->data.l[2 + (idx)])\n#define xdndEnter_targets(evt)\t\t\t( (evt)->data.l + 2)\n\n#define xdndPosition_sourceWindow(evt)\t\t((Window)((evt)->data.l[0]))\n#define xdndPosition_rootX(evt)\t\t\t((evt)->data.l[2] >> 16)\n#define xdndPosition_rootY(evt)\t\t\t((evt)->data.l[2] & 0xffffUL)\n#define xdndPosition_action(evt)\t\t((Atom)((evt)->data.l[4]))\n\n#define xdndStatus_targetWindow(evt)\t\t((evt)->data.l[0])\n#define xdndStatus_setWillAccept(evt, b)\t((evt)->data.l[1]= (((evt)->data.l[1] & ~1UL) | ((b) ? 1 : 0)))\n#define xdndStatus_setWantPosition(evt, b)\t((evt)->data.l[1]= (((evt)->data.l[1] & ~2UL) | ((b) ? 2 : 0)))\n#define xdndStatus_action(evt)\t\t\t((evt)->data.l[4])\n\n#define xdndDrop_sourceWindow(evt)\t\t((Window)((evt)->data.l[0]))\n#define xdndDrop_time(evt)\t\t\t((evt)->data.l[2])\n\n#define xdndFinished_targetWindow(evt)\t\t((evt)->data.l[0])\n\n\n#if (DEBUG_XDND)\n# define fdebugf(ARGS) do { fprintf ARGS; } while (0)\n#else\n# define fdebugf(ARGS) 0\n#endif\n\nstatic void updateCursor(int state);\n\nvoid getMousePosition(void);\n\n\nstatic void *xmalloc(size_t size)\n{\n  void *ptr= malloc(size);\n  if (!ptr)\n    {\n      fprintf(stderr, \"out of memory\\n\");\n      exit(1);\n    }\n  return ptr;\n}\n\n\nstatic void *xcalloc(size_t nmemb, size_t size)\n{\n  void *ptr= calloc(nmemb, size);\n  if (!ptr)\n    {\n      fprintf(stderr, \"out of memory\\n\");\n      exit(1);\n    }\n  return ptr;\n}\n\n\nstatic void *xrealloc(void *ptr, size_t size)\n{\n  ptr= realloc(ptr, size);\n  if (!ptr)\n    {\n      fprintf(stderr, \"out of memory\\n\");\n      exit(1);\n    }\n  return ptr;\n}\n\n\nstatic int hexValue(const int c)\n{\n  if (c <  '0') return 0;\n  if (c <= '9') return c - '0';\n  if (c <  'A') return 0;\n  if (c <= 'F') return c - 'A' + 10;\n  if (c <  'a') return 0;\n  if (c <= 'f') return c - 'a' + 10;\n  return 0;\n}\n\n\n/* e.g. StandardFileStream>>requestDropStream: doesn't deal with file: URIs.\n * Neither does unix/plugins/DropPlugin/sqUnixDragDrop.c::dropRequestFileHandle.\n * Simplest thing is to convert file: URIs to file names at source.\n */\n#define USE_FILE_URIs 0\n#if !USE_FILE_URIs\nstatic char *uri2string(const char *uri)\n{\n  size_t len= strlen(uri);\n  char *string= (char *)xmalloc(len + 3);\n  /* whoever wrote the URL stuff in the the image was too damn stupid to understand file URIs */\n  if (!strncmp(uri, \"file:\", 5))\n    {\n      char *in= string, *out= string;\n      strncpy(string, /* chop file:///absolute/path to /absolute/path */\n\t      uri + (uri[5] == '/' && uri[6] == '/' && uri[7] == '/' ? 7 : 5),\n\t      len);\n      while (*in)\n\tif ((in[0] == '%') && isxdigit(in[1]) && isxdigit(in[2]))\n\t  {\n\t    *out++= hexValue(in[1]) * 16 + hexValue(in[2]);\n\t    in += 3;\n\t  }\n\telse\n\t  *out++= *in++;\n      *out= '\\0';\n    }\n  else\n    {\n      strncpy(string, uri, len+1);\n    }\n  fdebugf((stderr, \"  uri2string: <%s>\\n\", string));\n  return string;\n}\n#endif /* !USE_FILE_URIs */\n\n\n/*** Handle DnD Output ***/\n\n\n#define DndWindow stParent\n\n/* Answer dndAware window under the cursor, or None if not found.\n */\nstatic Window dndAwareWindow(Window root, Window child, int *versionReturn)\n{\n  Atom actualType;\n  int actualFormat;\n  unsigned long nitems, bytesAfter;\n  unsigned char *data;\n  Window rootReturn, childReturn;\n  int rootX, rootY, winX, winY;\n  unsigned int mask;\n\n  if (None == child) return None;\n  XGetWindowProperty(stDisplay, child, XdndAware,\n\t\t     0, 0x8000000L, False, XA_ATOM,\n\t\t     &actualType, &actualFormat, &nitems,\n\t\t     &bytesAfter, &data);\n  if (nitems > 0)\n    {\n      *versionReturn= (int)*data;\n      return child;\n    }\n  \n  XQueryPointer(stDisplay, child, &rootReturn, &childReturn, &rootX, &rootY, &winX, &winY, &mask);\n\n  if (childReturn == None) return None;\n\n  return dndAwareWindow(root, childReturn, versionReturn);\n}\n\n\n/* Send ClientMessage to drop target.\n *\n * long data[5] : event specific data\n * Window source : source window (stParent)\n * Window target : target window\n * char * type : event type name\n */\nstatic void sendClientMessage(long *data, Window source, Window target, Atom type)\n{\n  XEvent e;\n  XClientMessageEvent *evt= &e.xclient;\n  if (None == target) return;\n  evt->type= ClientMessage;\n  evt->serial= 0;\n  evt->send_event= 0;\n  evt->display= stDisplay;\n  evt->window= target;\n  evt->message_type= type;\n  evt->format= 32;\n  evt->data.l[0]= source;\n  evt->data.l[1]= data[1];\n  evt->data.l[2]= data[2];\n  evt->data.l[3]= data[3];\n  evt->data.l[4]= data[4];\n  XSendEvent(stDisplay, target, 0, 0, &e);\n/*fdebugf((stderr, \"Send %s to: 0x%lx\\n\", type, target));*/\n}\n\nstatic void sendEnter(Window target, Window source)\n{\n  long data[5]= { 0, 0, 0, 0, 0 };\n  data[1] |= 0x0UL; /* just three data types */\n  data[1] |= XdndVersion << 24; /* version num */\n\n  if (0 != xdndOutTypes)\n    {\n      data[2]= xdndOutTypes[0];\n      if (None != xdndOutTypes[1])\n\t{\n\t  data[3]= xdndOutTypes[1];\n\t  if (None != xdndOutTypes[2])\n\t    {\n\t      data[4]= xdndOutTypes[1];\n\t    }\n\t}\n    }\n  fdebugf((stderr, \"Send XdndEnter (output) source: 0x%lx target: 0x%lx\\n\", source, target));\n  sendClientMessage(data, source, target, XdndEnter);\n}\n\n\nstatic void sendPosition(Window target, Window source, int rootX, int rootY, Time timestamp)\n{\n  long data[5]= { 0, 0, 0, 0, 0 };\n  data[2]= (rootX << 16) | rootY;\n  data[3]= timestamp;\n  data[4]= XdndActionCopy;\n  sendClientMessage(data, source, target, XdndPosition);\n}\n\n\nstatic void sendDrop(Window target, Window source, Time timestamp)\n{\n  long data[5]= { 0, 0, 0, 0, 0 };\n  data[2]= timestamp;\n  fdebugf((stderr, \"Send XdndDrop (output) source: 0x%lx target: 0x%lx\\n\", source, target));\n\n  sendClientMessage(data, source, target, XdndDrop);\n}\n\n\nstatic void sendLeave(Window target, Window source)\n{\n  long data[5]= { 0, 0, 0, 0, 0 };\n  fdebugf((stderr, \"Send XdndLeave (output) source: 0x%lx target: 0x%lx\\n\", source, target));\n  sendClientMessage(data, source, target, XdndLeave);\n}\n\n\nstatic enum XdndState dndOutInitialize(enum XdndState state)\n{\n  fdebugf((stderr, \"Internal signal DndOutStart (output)\\n\"));\n  memset(&xdndOutRequestEvent, 0, sizeof(xdndOutRequestEvent));\n  XSetSelectionOwner(stDisplay, XdndSelection, DndWindow, CurrentTime);\n  updateCursor(-1);\n  return XdndStateOutTracking;\n}\n\n\n/* Track the current mouse position.\n */\nstatic enum XdndState dndOutMotion(enum XdndState state, XMotionEvent *evt)\n{\n  Window currentWindow= None;\n  int versionReturn= 0;\n\n  if ((XdndStateOutTracking != state) && (XdndStateOutAccepted != state)) return state;\n\n  currentWindow= dndAwareWindow(evt->root, evt->root, &versionReturn);\n  if (DndWindow == currentWindow) /* Cursor is on myself */\n    {\n      xdndOutTarget= None;\n      return XdndStateOutTracking;\n    }\n  \n  updateCursor(XdndStateOutAccepted == state);\n\n  if ((XdndVersion > versionReturn)\t/* Target's version is too low. */\n      || (None == currentWindow))\t/* I can't find XdndAware window. */\n    {\n      xdndOutTarget= None;\n      return XdndStateOutTracking;\n    }\n  \n  fdebugf((stderr, \"Receive MotionNotify (output) root: 0x%lx awareWindow: 0x%lx\\n\", evt->root, currentWindow));\n  if (currentWindow != xdndOutTarget)\n    {\n      sendLeave(xdndOutTarget, DndWindow);\n      sendEnter(currentWindow, DndWindow);\n    }\n\n  sendPosition(currentWindow, DndWindow, evt->x_root, evt->y_root, evt->time);\n  xdndOutTarget= currentWindow;\n\n  return state;\n}\n\n\n/* A status message to know accept or not is received.\n */\nstatic enum XdndState dndOutStatus(enum XdndState state, XClientMessageEvent *evt)\n{\n  long *ldata= evt->data.l;\n  fdebugf((stderr, \"Receive XdndStatus (output) status: 0x%lx target: 0x%lx\\n\", ldata[1], ldata[0]));\n\n  if ((XdndStateOutTracking != state) && (XdndStateOutAccepted != state))\n    {\n      /*printf(\"%i is not expected in XdndStatus\\n\", state);*/\n      sendLeave(ldata[0], DndWindow);\n      return state;\n    }\n  \n  if (xdndOutTarget != ldata[0]) return state;\n\n  if (ldata[1] && 0x1UL)\n    return XdndStateOutAccepted;\n  else\n    return XdndStateOutTracking;\n}\n\n\n/* The mouse button was released.\n*/\nstatic enum XdndState dndOutRelease(enum XdndState state, XButtonEvent *evt)\n{\n  if (XdndStateIdle == state) return XdndStateIdle;\n  fdebugf((stderr, \"Receive ButtonRelease (output) window: 0x%lx\\n\", evt->window));\n\n  if (XdndStateOutAccepted == state)\n    {\n      sendDrop(xdndOutTarget, DndWindow, evt->time);\n      return XdndStateOutAccepted;\n    }\n  sendLeave(xdndOutTarget, DndWindow);\n  return XdndStateIdle;\n}\n\n\n/* Another application is requesting the selection.\n*/\nstatic enum XdndState dndOutSelectionRequest(enum XdndState state, XSelectionRequestEvent *req)\n{\n  fdebugf((stderr, \"Receive SelectionRequest for %s (output) owner: 0x%lx : requestor: 0x%lx\\n\",\n           XGetAtomName(stDisplay, req->target), req->owner, req->requestor));\n  if (XdndStateOutAccepted != state)\n    {\n      /*printf(\"%i is not expected in SelectionRequest\\n\", state);*/\n      return state;\n    }\n  memcpy(&xdndOutRequestEvent, req, sizeof(xdndOutRequestEvent));\n  recordDragEvent(DragRequest, 1);\n  return state;\n}\n\n\n/* A finished message is received.\n */\nstatic enum XdndState dndOutFinished(enum XdndState state, XClientMessageEvent *evt)\n{\n  fdebugf((stderr, \"Receive XdndFinished (output) source: 0x%lx target: 0x%lx\\n\",\n           DndWindow, xdndFinished_targetWindow(evt)));\n  xdndOutTarget= None;\n  return XdndStateIdle;\n}\n\n\n/* Change cursor\n * TODO: The cursor should be controlled by the image, so it should be removed finally.\n *\n * state = -1 : Cursor is on Squeak window.\n * state =  0 : Target window doesn't accept.\n * state =  1 : Target window accepts.\n */\nstatic void updateCursor(int state)\n{\n  static int lastCursor= -1;\n\n  if (lastCursor == state) return;\n  fdebugf((stderr, \"Cursor change (output) previous: %i new: %i\\n\", lastCursor, state));\n  if (1 == state)\n    {\n      Cursor cursor;\n      cursor= XCreateFontCursor(stDisplay, 90);\n      XDefineCursor(stDisplay, stWindow, cursor);\n    }\n  else\n    XDefineCursor(stDisplay, stWindow, None);\n  \n  lastCursor= state;\n}\n\n\nstatic void dndInDestroyTypes(void)\n{\n  if (xdndInTypes == NULL)\n    return;\n  free(xdndInTypes);\n  xdndInTypes= NULL;\n}\n\n\nstatic void updateInTypes(Atom *newTargets, int targetSize)\n{\n  int i;\n  dndInDestroyTypes();\n  xdndInTypes= (Atom *)calloc(targetSize + 1, sizeof(Atom));\n  for (i= 0;  i < targetSize;  ++i)\n    xdndInTypes[i]= newTargets[i];\n  xdndInTypes[targetSize]= None;\n}\n\n\n/* Answer non-zero if dnd input object is available.\n*/\nstatic int dndAvailable(void)\n{\n  return useXdnd && xdndInTypes;\n}\n\n\n/* Answer types for dropping object.\n * types - returned types (it should be copied by client), or NULL if unavailable.\n * count - number of types.\n */\nstatic void dndGetTargets(Atom **types, int *count)\n{\n  int i;\n  *types= 0;\n  *count= 0;\n  if (!xdndInTypes) return;\n  for (i= 0;  None != xdndInTypes[i];  ++i);\n  *count= i;\n  *types= xdndInTypes;\n}\n\n\nstatic void dndGetTypeList(XClientMessageEvent *evt)\n{\n  xdndWillAccept= 0;\n  isUrlList= 0;\n\n  if (xdndEnter_hasThreeTypes(evt))\n    {\n      fdebugf((stderr, \"  3 types\\n\"));\n      updateInTypes((Atom *) xdndEnter_targets(evt), 3);\n    }\n  else\n    {\n      Atom type;\n      int format;\n      unsigned long count, remaining;\n      unsigned char *data= 0;\n\n      XGetWindowProperty(stDisplay, xdndSourceWindow, XdndTypeList, 0, 0x8000000L, False, XA_ATOM,\n\t\t\t &type, &format, &count, &remaining, &data);\n\n      if ((type != XA_ATOM) || (format != 32) || (count == 0) || !data)\n\t{\n\t  if (data) XFree(data);\n\t  fprintf(stderr, \"XGetWindowProperty failed in xdndGetTypeList\\n\");\n\t  return;\n\t}\n\n      updateInTypes((Atom *) data, count);\n      XFree(data);\n      fdebugf((stderr, \"  %ld types\\n\", count));\n    }\n\n  /* We only accept filenames (MIME type \"text/uri-list\"). */\n  {\n    int i;\n    for (i= 0;  xdndInTypes[i];  ++i)\n      {\n\tfdebugf((stderr, \"  type %d == %ld %s\\n\", i, xdndInTypes[i], XGetAtomName(stDisplay, xdndInTypes[i])));\n\tif (XdndTextUriList == xdndInTypes[i])\n\t  {\n\t    isUrlList= 1;\n\t    xdndWillAccept= 1;\n\t  }\n      }\n  }\n  xdndWillAccept= 1;\n}\n\nstatic void dndSendStatus(int willAccept, Atom action)\n{\n  XClientMessageEvent evt;\n  memset(&evt, 0, sizeof(evt));\n\n  evt.type\t   = ClientMessage;\n  evt.display\t   = stDisplay;\n  evt.window\t   = xdndSourceWindow;\n  evt.message_type = XdndStatus;\n  evt.format\t   = 32;\n\n  xdndStatus_targetWindow(&evt)= DndWindow;\n  xdndStatus_setWillAccept(&evt, willAccept);\n  xdndStatus_setWantPosition(&evt, 0);\n  xdndStatus_action(&evt)= action;\n\n  XSendEvent(stDisplay, xdndSourceWindow, 0, 0, (XEvent *)&evt);\n\n  /* fdebugf((stderr, \"  sent status to 0x%lx willAccept=%d data=%ld action=%s(%ld)\\n\",\n             xdndSourceWindow, willAccept, evt.data.l[1], XGetAtomName(stDisplay, action), action)); */\n}\n\nstatic void dndSendFinished(void)\n{\n    XClientMessageEvent evt;\n    memset(&evt, 0, sizeof(evt));\n\n    evt.type\t     = ClientMessage;\n    evt.display\t     = stDisplay;\n    evt.window\t     = xdndSourceWindow;\n    evt.message_type = XdndFinished;\n    evt.format\t     = 32;\n\n    xdndFinished_targetWindow(&evt)= DndWindow;\n    XSendEvent(stDisplay, xdndSourceWindow, 0, 0, (XEvent *)&evt);\n\n    fdebugf((stderr, \"dndSendFinished target: 0x%lx source: 0x%lx\\n\", DndWindow, xdndSourceWindow));\n}\n\n\nstatic enum XdndState dndInEnter(enum XdndState state, XClientMessageEvent *evt)\n{\n  fdebugf((stderr, \"Receive XdndEnter (input)\\n\"));\n  if (xdndEnter_version(evt) < 3)\n    {\n      fprintf(stderr, \"  xdnd: protocol version %ld not supported\\n\", xdndEnter_version(evt));\n      return state;\n    }\n  xdndSourceWindow= xdndEnter_sourceWindow(evt);\n  dndGetTypeList(evt);\n\n  fdebugf((stderr, \"  dndEnter target: 0x%lx source: 0x%lx\\n\", evt->window, xdndSourceWindow));\n  return XdndStateEntered;\n}\n\n\nstatic enum XdndState dndInLeave(enum XdndState state)\n{\n  fdebugf((stderr, \"Receive XdndLeave (input)\\n\"));\n  recordDragEvent(DragLeave, 1);\n  return XdndStateIdle;\n}\n\n\nstatic enum XdndState dndInPosition(enum XdndState state, XClientMessageEvent *evt)\n{\n  /*fdebugf((stderr, \"Receive XdndPosition (input)\\n\"));*/\n\n  if (xdndSourceWindow != xdndPosition_sourceWindow(evt))\n    {\n      fdebugf((stderr, \"dndInPosition: wrong source window\\n\"));\n      return XdndStateIdle;\n    }\n\n  getMousePosition();\n\n  if ((state != XdndStateEntered) && (state != XdndStateTracking))\n    {\n      fdebugf((stderr, \"dndInPosition: wrong state\\n\"));\n      return XdndStateIdle;\n    }\n  \n  if ((state == XdndStateEntered) && xdndWillAccept)\n    recordDragEvent(DragEnter, 1);\n  \n  if (xdndWillAccept)\n    {\n      Atom action= xdndPosition_action(evt);\n      /*fdebugf((stderr, \"  dndInPosition: action = %ld %s\\n\", action, XGetAtomName(stDisplay, action)));*/\n      xdndWillAccept= (action == XdndActionMove) | (action == XdndActionCopy)\n\t|             (action == XdndActionLink) | (action == XdndActionAsk);\n    }\n\n  if (xdndWillAccept)\n    {\n      /*fdebugf((stderr, \"  dndInPosition: accepting\\n\"));*/\n      dndSendStatus(1, XdndActionCopy);\n      recordDragEvent(DragMove, 1);\n    }\n  else /* won't accept */\n    {\n      /*fdebugf((stderr, \"  dndInPosition: not accepting\\n\"));*/\n      dndSendStatus(0, XdndActionPrivate);\n    }\n  return XdndStateTracking;\n}\n\nstatic void\ninitDropFileNames()\n{\n  if (uxDropFileCount) {\n\t  int i;\n\t  assert(uxDropFileNames);\n\t  for (i= 0;  i < uxDropFileCount;  ++i)\n\t    free(uxDropFileNames[i]);\n\t  free(uxDropFileNames);\n\t  uxDropFileCount= 0;\n\t  uxDropFileNames= 0;\n  }\n}\n\nenum XdndState dndInDrop(enum XdndState state, XClientMessageEvent *evt)\n{\n  fdebugf((stderr, \"Receive XdndDrop (input)\\n\"));\n\n  /* If there is \"text/url-list\" in xdndInTypes, the selection is\n   * processed only in DropFilesEvent. But if none (file count == 0),\n   * the selection is handled ClipboardExtendedPlugin.\n   */\n  if (isUrlList == 0)\n    {\n      fdebugf((stderr, \"  dndInDrop: no url list\\n\"));\n      recordDragEvent(DragDrop, 0);\n      return state;\n    }\n  dndInDestroyTypes();\n\n  if (xdndSourceWindow != xdndDrop_sourceWindow(evt))\n    {\n      fdebugf((stderr, \"  dndInDrop: wrong source window\\n\"));\n    }\n  else if (xdndWillAccept)\n    {\n      Window owner;\n      fdebugf((stderr, \"  dndInDrop: converting selection\\n\"));\n      if (!(owner= XGetSelectionOwner(stDisplay, XdndSelection)))\n\tfprintf(stderr, \"  dndInDrop: XGetSelectionOwner failed\\n\");\n      else\n\tXConvertSelection(stDisplay, XdndSelection, XdndTextUriList, XdndSelectionAtom, stWindow, xdndDrop_time(evt));\n      initDropFileNames();\n    }\n  else\n    {\n      fdebugf((stderr, \"  dndInDrop: refusing selection -- finishing\\n\"));\n    }\n\n  dndSendFinished();\n  recordDragEvent(DragLeave, 1);\n\n  return XdndStateIdle;\n}\n\n\nstatic void addDropFile(char *fileName);\nstatic void generateSqueakDropEventIfDroppedFiles(void);\nstruct { char *fileName; Window sourceWindow; } *launchDrops = 0;\nstatic int numLaunchDrops = 0;\n\n/* drastically simplified case of dndInDrop that leaves out the 8 step dance\n * (see http://www.newplanetsoftware.com/xdnd/).  Instead grab the fileName in\n * the XdndSqueakLaunchDrop property and send an ack message.\n */\nenum XdndState\ndndInLaunchDrop(XClientMessageEvent *evt)\n{\n\tAtom actualType;\n\tint actualFormat;\n\tunsigned long nitems, bytesAfter;\n\tunsigned char *fileName;\n\tunsigned int mask;\n\n\tfdebugf((stderr, \" dndInLaunchDrop <%d> (%d)\\n\", evt->message_type, XdndSqueakLaunchDrop));\n\tXGetWindowProperty(stDisplay, xdndDrop_sourceWindow(evt),\n\t\t\t   XdndSqueakLaunchDrop,\n\t\t\t   0, 0x8000000L, False, XA_ATOM,\n\t\t\t   &actualType, &actualFormat, &nitems,\n\t\t\t   &bytesAfter, &fileName);\n\n\tif (nitems > 0) {\n\t\tint i;\n\t\tfdebugf((stderr, \" got launch drop <%s>\\n\", fileName));\n\t\t/* The convention is that we free the previous uxDropFileNames\n\t\t * and zero uxDropFileCount /before/ each dnd interchange,\n\t\t * which saves having to rely on consumption by the image in the\n\t\t * right order.  But it means that if we want multiple launch\n\t\t * drops we're going to have to send them in one go, e.g. by\n\t\t * concatenating a set of null-terminated names.  Too lazy now.\n\t\t * But, but, but.  This convention means multiple launch drops\n\t\t * can smash previous ones.  Broken.  Needs more thought.\n\t\t */\n\t\tinitDropFileNames();\n\t\taddDropFile(fileName);\n\t\tgenerateSqueakDropEventIfDroppedFiles();\n\t\tfor (i = 0; i < numLaunchDrops; i++)\n\t\t\tif (!launchDrops[i].fileName)\n\t\t\t\tbreak;\n\t\tif (i >= numLaunchDrops) {\n\t\t\ti = numLaunchDrops;\n\t\t\tlaunchDrops = xrealloc(launchDrops,\n\t\t\t\t\t\t\t\t\t++numLaunchDrops * sizeof(*launchDrops));\n\t\t}\n\t\tlaunchDrops[i].fileName = fileName;\n\t\tlaunchDrops[i].sourceWindow = xdndDrop_sourceWindow(evt);\n\t}\n}\n\n/* Send a XdndSqueakLaunchAck essage back to the launch dropper if the filename\n * matches a dndInLaunchDrop event.\n */\nstatic sqInt\ndisplay_dndReceived(char *fileName)\n{\n\tint i;\n\n\tfor (i = 0; i < numLaunchDrops; i++)\n\t\tif (launchDrops[i].fileName\n\t\t && !strcmp(fileName, launchDrops[i].fileName)) {\n\t\t\tlong data[5];\n\t\t\tmemset(data, 0, sizeof(data));\n\t\t\tdata[0] = stParent;\n\t\t\tsendClientMessage(data,\n\t\t\t\t\t  stParent,\n\t\t\t\t\t  launchDrops[i].sourceWindow,\n\t\t\t\t\t  XdndSqueakLaunchAck);\n\t\t\tXFree(launchDrops[i].fileName);\n\t\t\tlaunchDrops[i].fileName = 0;\n\t\t\treturn 0;\n\t\t}\n\treturn 1;\n}\n\nstatic void\naddDropFile(char *fileName)\n{\n  if (uxDropFileCount)\n    uxDropFileNames= (char **)xrealloc(uxDropFileNames, (uxDropFileCount + 1) * sizeof(char *));\n  else\n    uxDropFileNames= (char **)xcalloc(1, sizeof(char *));\n#if USE_FILE_URIs\n    uxDropFileNames[uxDropFileCount++]= strdup(fileName);\n#else\n    uxDropFileNames[uxDropFileCount++]= uri2string(fileName);\n#endif\n}\n\nstatic void\ngenerateSqueakDropEventIfDroppedFiles()\n{\n\tif (uxDropFileCount)\n\t\trecordDragEvent(DragDrop, uxDropFileCount);\n}\n\nstatic void dndGetSelection(Window owner, Atom property)\n{\n  unsigned long remaining;\n  unsigned char *data= 0;\n  Atom actual;\n  int format;\n  unsigned long count;\n\n  if (Success != XGetWindowProperty(stDisplay, owner, property, 0, 65536, 1, AnyPropertyType,\n\t\t\t\t    &actual, &format, &count, &remaining, &data))\n    fprintf(stderr, \"dndGetSelection: XGetWindowProperty failed\\n\");\n  else if (remaining)\n    /* a little violent perhaps */\n    fprintf(stderr, \"dndGetSelection: XGetWindowProperty has more than 64K (why?)\\n\");\n  else\n    {\n      char *tokens= (char *)data;\n      char *item;\n      while ((item= strtok(tokens, \"\\n\\r\")))\n\t{\n\t  fdebugf((stderr, \"  got URI <%s>\\n\", item));\n\t  if (!strncmp(item, \"file:\", 5)) /*** xxx BOGUS -- just while image is broken ***/\n\t    addDropFile(item);\n\t  tokens= 0; /* strtok is weird.  this ensures more tokens, not less. */\n\t}\n      generateSqueakDropEventIfDroppedFiles();\n      fdebugf((stderr, \"  uxDropFileCount = %d\\n\", uxDropFileCount));\n    }\n  XFree(data);\n}\n\n\nstatic enum XdndState dndInSelectionNotify(enum XdndState state, XSelectionEvent *evt)\n{\n  fdebugf((stderr, \"Receive SelectionNotify (input)\\n\"));\n  if (evt->property != XdndSelectionAtom) return state;\n\n  dndGetSelection(evt->requestor, evt->property);\n  dndSendFinished();\n  recordDragEvent(DragLeave, 1);\n  return XdndStateIdle;\n}\n\n\nstatic enum XdndState dndInFinished(enum XdndState state)\n{\n  fdebugf((stderr, \"Internal signal DndInFinished (input)\\n\"));\n  dndSendFinished();\n  recordDragEvent(DragLeave, 1);\n  dndInDestroyTypes();\n  return XdndStateIdle;\n}\n\n\n/* DnD client event handler */\n\nstatic enum XdndState dndHandleClientMessage(enum XdndState state, XClientMessageEvent *evt)\n{\n  Atom type= evt->message_type;\n  if (type == XdndStatus)\n    return dndOutStatus(state, evt);\n  if (type == XdndFinished)\n    return dndOutFinished(state, evt);\n  if (type == XdndEnter)\n    return dndInEnter(state, evt);\n  if (type == XdndPosition)\n    return dndInPosition(state, evt);\n  if (type == XdndDrop)\n    return dndInDrop(state, evt);\n  if (type == XdndLeave)\n    return dndInLeave(state);\n  if (type == XdndSqueakLaunchDrop)\n    return dndInLaunchDrop(evt);\n  return state;\n}\n\n\n/* DnD event handler */\n\nstatic void dndHandleEvent(int type, XEvent *evt)\n{\n  static enum XdndState state= XdndStateIdle;\n\n  switch(type)\n    {\n    case DndOutStart:\t   state= dndOutInitialize(state);\t\t\t\t\tbreak;\n    case MotionNotify:\t   state= dndOutMotion(state, &evt->xmotion);\t\t\t\tbreak;\n    case ButtonRelease:\t   state= dndOutRelease(state, &evt->xbutton);\t\t\t\tbreak;\n    case SelectionRequest: state= dndOutSelectionRequest(state, &evt->xselectionrequest);\tbreak;\n    case SelectionNotify:  state= dndInSelectionNotify(state, &evt->xselection);\t\tbreak;\n    case DndInFinished:\t   state= dndInFinished(state);\t\t\t\t\t\tbreak;\n    case ClientMessage:\t   state= dndHandleClientMessage(state, &evt->xclient);\t\t\tbreak;\n    }\n}\n\n\nstatic sqInt display_dndOutStart(char *types, int ntypes)\n{\n  int pos, i;\n  int typesSize= 0;\n\n  if (xdndOutTypes != 0)\n    {\n      free(xdndOutTypes);\n      xdndOutTypes= 0;\n    }\n\n  for (pos= 0; pos < ntypes; pos += strlen(types + pos) + 1)\n    typesSize++;\n\n  if (typesSize > 3) return 0; /* Supported types are up to 3 now */\n\n  xdndOutTypes= xmalloc(sizeof(Atom) * (typesSize + 1));\n  xdndOutTypes[typesSize]= None;\n\n  for (pos= 0, i= 0; pos < ntypes; pos += strlen(types + pos) + 1, i++)\n    xdndOutTypes[i]= XInternAtom(stDisplay, types + pos, False);\n\n  for (i= 0; i < typesSize; i++)\n    fdebugf((stderr, \"dndOutStart: %s\\n\", XGetAtomName(stDisplay, xdndOutTypes[i])));\n  dndHandleEvent(DndOutStart, 0);\n\n  return 1;\n}\n\nstatic void display_dndOutSend (char *bytes, int nbytes)\n{\n  XEvent notify;\n  XSelectionEvent *res= &notify.xselection;\n  Atom targetProperty= ((None == xdndOutRequestEvent.property)\n\t\t\t? xdndOutRequestEvent.target\n\t\t\t: xdndOutRequestEvent.property);\n\n  res->type\t  = SelectionNotify;\n  res->display\t  = xdndOutRequestEvent.display;\n  res->requestor  = xdndOutRequestEvent.requestor;\n  res->selection  = xdndOutRequestEvent.selection;\n  res->target\t  = xdndOutRequestEvent.target;\n  res->time\t  = xdndOutRequestEvent.time;\n  res->send_event = True;\n  res->property\t  = targetProperty; /* override later if error */\n\n  XChangeProperty(stDisplay, res->requestor,\n\t\t  targetProperty, xdndOutRequestEvent.target,\n\t\t  8, PropModeReplace,\n\t\t  (unsigned char *)bytes,\n\t\t  nbytes);\n\n  XSendEvent(stDisplay, res->requestor, False, 0, &notify);\n  fdebugf((stderr, \"Send data for %s (output) requestor: 0x%lx\\n\",\n           XGetAtomName(stDisplay, res->target), res->requestor));\n}\n\nstatic sqInt display_dndOutAcceptedType(char * buf, int nbuf)\n{\n  char *type;\n  if (xdndOutRequestEvent.target == None) return 0;\n  type= XGetAtomName(stDisplay, xdndOutRequestEvent.target);\n  strncpy(buf, type, nbuf);\n  XFree(type);\n  return 1;\n}\n\n/* support for findWindowWithLabel */\nstatic inline int\nwindowHasLabel(Window w, char *label)\n{\n\tXTextProperty win_text;\n\tint hasLabel;\n\n\tif (!XGetWMName(stDisplay, w, &win_text)) {\n\t\tchar *win_name;\n\t\tif (!XFetchName(stDisplay, w, &win_name))\n\t\t\treturn 0;\n\t\thasLabel = !strcmp(label, win_name);\n\t\t(void)XFree(win_name);\n\t\treturn hasLabel;\n\t}\n\t/* If there are multiple items and we need to support that see use of\n\t * XmbTextPropertyToTextList in xwininfo.\n\t * If UTF8 is required see stringprep_locale_to_utf8 & libidn.\n\t */\n\tif (win_text.nitems <= 0)\n\t\treturn 0;\n\thasLabel = !strcmp(label, win_text.value);\n\t(void)XFree(win_text.value);\n\treturn hasLabel;\n}\n\nstatic Window\nfindWindowWithLabel(Window w, char *label)\n{\n\tWindow pane = 0, root, parent, *children;\n\tunsigned int nwindows, i;\n\n\tif (w == stParent) /* ignore this process's labelled main window */\n\t\treturn 0;\n\n\tif (windowHasLabel(w, label))\n\t\treturn w;\n\n\tif (!XQueryTree(stDisplay, w, &root, &parent, &children, &nwindows))\n\t\treturn 0;\n\n\tfor (i = 0; i < nwindows && !pane; i++)\n\t\tpane = findWindowWithLabel(children[i], label);\n\n\tXFree(children);\n\treturn pane;\n}\n\nstatic Bool\nisDropAck(Display *dpy, XEvent *evt, XPointer arg)\n{\n  return ClientMessage == evt->type\n      && XdndSqueakLaunchAck == ((XClientMessageEvent *)evt)->message_type;\n}\n\nstatic void\nyieldCyclesToRecipient()\n{\n# define MINSLEEPNS 2000 /* don't bother sleeping for short times */\n\tstruct timespec naptime;\n\n\tnaptime.tv_sec = 0; naptime.tv_nsec = 10000000; /* 10 ms */\n\n\twhile (nanosleep(&naptime, &naptime) == -1\n\t\t&& (naptime.tv_sec > 0 || naptime.tv_nsec > MINSLEEPNS)) /*repeat*/\n\t\tif (errno != EINTR) {\n\t\t\tperror(\"nanosleep\");\n\t\t\texit(1);\n\t\t}\n}\n\n/* If the VM is running as a single instance and there is a pre-existing\n * instance then look for a pre-existing instance and if found send it a\n * drop event of the argument and if successful exit.  Otherwise return\n * and allow the normal start-up sequence to continue.\n */\nstatic int\ndndLaunchFile(char *filename)\n{\n\tlong data[5];\n\tchar abspath[MAXPATHLEN+1];\n\tstruct timeval start, now, timeout;\n\ttime_t tnow;\n\tint pid = getpid();\n\tWindow target;\n\n\ttnow = time(0);\n\tprintf(\"dndLaunchFile(%s,%d) \\\"%s\\\" %s\", filename, pid, defaultWindowLabel, ctime(&tnow));\n\ttarget = findWindowWithLabel(DefaultRootWindow(stDisplay), defaultWindowLabel);\n\n\tif (!target) {\n\t\ttnow = time(0);\n\t\tprintf(\"dndLaunchFile(%s,%d) %s\\tFAILED TO FIND WINDOW:\\\"%s\\\"\\n\", filename, pid, ctime(&tnow), defaultWindowLabel);\n\t\treturn 0;\n\t}\n\n\tif (*filename == '/')\n\t\tstrcpy(abspath,filename);\n\telse {\n\t\t/* For consistency with drops files should be relative to the image.\n\t\t * For sanity creating streams drops should be absolute paths (i.e.\n\t\t * primDropRequestFileHandle: doesn't know what the image path is and\n\t\t * so interprets things relative to pwd, so give it an absolute path).\n\t\t * So by default make the full path by prepending the image.\n\t\t */\n#if !defined(DROP_FILENAMES_RELATIVE_TO_PWD)\n# define DROP_FILENAMES_RELATIVE_TO_PWD 0\n#endif\n#if DROP_FILENAMES_RELATIVE_TO_PWD\n\t\tgetcwd(abspath,sizeof(abspath));\n\t\tabspath[strlen(abspath)] = '/';\n\t\tstrcat(abspath,filename);\n#else\n\t\tstrcpy(abspath,imageName);\n\t\tstrcpy(strrchr(abspath,'/')+1,filename);\n#endif\n\t}\n\n\t/* Only drop if the file exists. */\n    if (access(abspath, F_OK|R_OK)) {\n\t\ttnow = time(0);\n\t\tprintf(\"dndLaunchFile(%s,%d) %s\\tFAILED TO VALIDATE:\\\"%s\\\"\\n\", filename, pid, ctime(&tnow), abspath);\n\t\treturn 0;\n\t}\n\n\ttnow = time(0);\n\tprintf(\"dndLaunchFile(%s,%d) %s\\tvalidated:\\\"%s\\\"\\n\", filename, pid, ctime(&tnow), abspath);\n\n\t/* Include the null in the filename so that we're immune to XGetWindowProp'\n\t * answering the size in 32-bit units.\n\t */\n\tXChangeProperty(stDisplay, stParent,\n\t\t\tXdndSqueakLaunchDrop, XA_ATOM, 8, PropModeReplace,\n\t\t\t(unsigned char *)abspath, strlen(abspath) + 1);\n\n\tmemset(data, 0, sizeof(data));\n\tdata[0] = stParent; /* => xdndDrop_sourceWindow */\n\tsendClientMessage(data, stParent, target, XdndSqueakLaunchDrop);\n\n\t/* How can there be 10 odd get event functions and yet none provide\n\t * peek with timeout functionality?  X is sad.\n\t */\n\ttimeout.tv_sec = launchDropTimeoutMsecs / 1000;\n\ttimeout.tv_usec = (launchDropTimeoutMsecs % 1000) * 1000;\n\tgettimeofday(&start, 0);\n\ttimeradd(&start, &timeout, &timeout);\n\n\tdo {\n\t\tXEvent evt;\n\t\t/* Don't spin hard; the dnd recipient needs cycles to receive and ack. */\n\t\tyieldCyclesToRecipient();\n\t\tif (XCheckIfEvent(stDisplay, &evt, isDropAck, 0)) {\n\t\t\ttnow = time(0);\n\t\t\tprintf(\"dndLaunchFile(%s,%d) %s\\tgot drop ack for:\\\"%s\\\"\\n\", filename, pid, ctime(&tnow), abspath);\n\t\t\treturn 1;\n\t\t}\n\t\tgettimeofday(&now, 0);\n\t}\n\twhile (timercmp(&now, &timeout, <));\n\ttnow = time(0);\n\tprintf(\"dndLaunchFile(%s,%d) %s\\t%ld msec DROP TIMEOUT FOR:\\\"%s\\\"\\n\", filename, pid, ctime(&tnow), launchDropTimeoutMsecs, abspath);\n\treturn 0;\n}\n\nstatic void dndInitialise(void)\n{\n  XdndAware=\t\t XInternAtom(stDisplay, \"XdndAware\", False);\n  XdndSelection=\t XInternAtom(stDisplay, \"XdndSelection\", False);\n  XdndEnter=\t\t XInternAtom(stDisplay, \"XdndEnter\", False);\n  XdndLeave=\t\t XInternAtom(stDisplay, \"XdndLeave\", False);\n  XdndPosition=\t\t XInternAtom(stDisplay, \"XdndPosition\", False);\n  XdndDrop=\t\t XInternAtom(stDisplay, \"XdndDrop\", False);\n  XdndFinished=\t\t XInternAtom(stDisplay, \"XdndFinished\", False);\n  XdndStatus=\t\t XInternAtom(stDisplay, \"XdndStatus\", False);\n  XdndActionCopy=\t XInternAtom(stDisplay, \"XdndActionCopy\", False);\n  XdndActionMove=\t XInternAtom(stDisplay, \"XdndActionMove\", False);\n  XdndActionLink=\t XInternAtom(stDisplay, \"XdndActionLink\", False);\n  XdndActionAsk=\t XInternAtom(stDisplay, \"XdndActionAsk\", False);\n  XdndActionPrivate=\t XInternAtom(stDisplay, \"XdndActionPrivate\", False);\n  XdndTypeList=\t\t XInternAtom(stDisplay, \"XdndTypeList\", False);\n  XdndTextUriList=\t XInternAtom(stDisplay, \"text/uri-list\", False);\n  XdndSelectionAtom=\t XInternAtom(stDisplay, \"XdndSqueakSelection\", False);\n  XdndSqueakLaunchDrop=\t XInternAtom(stDisplay, \"XdndSqueakLaunchDrop\", False);\n  XdndSqueakLaunchAck=\t XInternAtom(stDisplay, \"XdndSqueakLaunchAck\", False);\n\n  XChangeProperty(stDisplay, DndWindow, XdndAware, XA_ATOM, 32, PropModeReplace, (unsigned char *)&XdndVersion, 1);\n}\n\n\n#if (TEST_XDND)\n\n\n#define fail(why)\tdo { fprintf(stderr, \"%s\\n\", why);  exit(1); } while (0)\n\n\nstatic void run(void)\n{\n  for (;;)\n    {\n      XEvent evt;\n      XNextEvent(stDisplay, &evt);\n      switch (evt.type)\n\t{\n\tcase MotionNotify:\tprintf(\"MotionNotify\\n\");\t\t\tbreak;\n\tcase EnterNotify:\tprintf(\"EnterNotify\\n\");\t\t\tbreak;\n\tcase LeaveNotify:\tprintf(\"LeaveNotify\\n\");\t\t\tbreak;\n\tcase ButtonPress:\tprintf(\"ButtonPress\\n\");\t\t\tbreak;\n\tcase ButtonRelease:\tprintf(\"ButtonRelease\\n\");\t\t\tbreak;\n\tcase KeyPress:\t\tprintf(\"KeyPress\\n\");\t\t\t\tbreak;\n\tcase KeyRelease:\tprintf(\"KeyRelease\\n\");\t\t\t\tbreak;\n\tcase SelectionClear:\tprintf(\"SelectionClear\\n\");\t\t\tbreak;\n\tcase SelectionRequest:\tprintf(\"SelectionRequest\\n\");\t\t\tbreak;\n\tcase PropertyNotify:\tprintf(\"PropertyNotify\\n\");\t\t\tbreak;\n\tcase Expose:\t\tprintf(\"Expose\\n\");\t\t\t\tbreak;\n\tcase MapNotify:\t\tprintf(\"MapNotify\\n\");\t\t\t\tbreak;\n\tcase UnmapNotify:\tprintf(\"UnmapNotify\\n\");\t\t\tbreak;\n\tcase ConfigureNotify:\tprintf(\"ConfigureNotify\\n\");\t\t\tbreak;\n\tcase MappingNotify:\tprintf(\"MappingNotify\\n\");\t\t\tbreak;\n\tcase ClientMessage:\tdndHandleClientMessage(&evt.xclient);\t\tbreak;\n\tcase SelectionNotify:\tdndHandleSelectionNotify(&evt.xselection);\tbreak;\n\tdefault:\t\tprintf(\"unknown event type %d\\n\", evt.type);\tbreak;\n\t}\n    }\n}\n\n\nint main(int argc, char **argv)\n{\n  stDisplay= XOpenDisplay(0);\n  if (!stDisplay) fail(\"cannot open display\");\n\n  dndInitialise();\n\n  {\n    XSetWindowAttributes attributes;\n    unsigned long valuemask= 0;\n\n    attributes.event_mask= ButtonPressMask | ButtonReleaseMask\n      |\t\t\t   KeyPressMask | KeyReleaseMask\n      |\t\t\t   PointerMotionMask\n      |\t\t\t   EnterWindowMask | LeaveWindowMask | ExposureMask;\n    valuemask |= CWEventMask;\n\n    win= XCreateWindow(stDisplay, DefaultRootWindow(stDisplay),\n\t\t       100, 100, 100, 100,\t/* geom */\n\t\t       0,\t\t\t/* border */\n\t\t       CopyFromParent,\t\t/* depth */\n\t\t       CopyFromParent,\t\t/* class */\n\t\t       CopyFromParent,\t\t/* visual */\n\t\t       valuemask,\n\t\t       &attributes);\n  }\n  if (!win) fail(\"cannot create window\");\n\n  XChangeProperty (stDisplay, win, XdndAware, XA_ATOM, 32, PropModeReplace, (unsigned char *)&XdndVersion, 3);\n  XMapWindow(stDisplay, stWindow);\n  run();\n  XCloseDisplay(stDisplay);\n\n  return 0;\n}\n\n\n#endif /* TEST_XDND */\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-custom/Makefile.in",
    "content": "# Makefile for custom window support\t\t\t\t-*- makefile -*-\n# \n# Last edited: 2005-04-06 05:20:50 by piumarta on pauillac.hpl.hp.com\n\n[make_cfg]\n[make_plg]\n\nTARGET\t\t= vm-display-custom$a\nOBJS\t\t= sqUnixCustomWindow$o\n\nXINCLUDES\t= [includes] \\\n\t\t  -I$(topdir)/platforms/Cross/plugins/FilePlugin \\\n\t\t  -I$(topdir)/platforms/Cross/plugins/B3DAcceleratorPlugin \\\n\t\t  -I$(topdir)/platforms/unix/plugins/B3DAcceleratorPlugin\n\n$(TARGET) : $(OBJS) Makefile\n\t$(LINK) $(TARGET) $(OBJS) ## put additional libraries here\n\t$(RANLIB) $(TARGET)\n\n[make_targets]\n\n.force :\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-custom/acinclude.m4",
    "content": "# -*- sh -*-\n\nAC_MSG_CHECKING([for custom display support])\n\nAC_ARG_WITH(custom-display,\n[  --with-custom-display   enable custom window support [default=disabled]],\n  [have_dpy_custom=\"$withval\"],\n  [have_dpy_custom=\"no\"])\n\nif test \"$have_dpy_custom\" = \"yes\"; then\n  # check for libraries, headers, etc., here...\n  AC_MSG_RESULT([yes])\nelse\n  AC_MSG_RESULT([no])\n  AC_PLUGIN_DISABLE\nfi\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-custom/build.cmake",
    "content": "EXPECT_UNDEFINED_SYMBOLS ()\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-custom/sqUnixCustomWindow.c",
    "content": "/* sqUnixCustomWindow.c -- support for display via your custom window system.\n * \n * Last edited: 2006-04-17 16:57:12 by piumarta on margaux.local\n * \n * This is a template for creating your own window drivers for Squeak:\n * \n *   - copy the entire contents of this directory to some other name\n *   - rename this file to be something more appropriate\n *   - modify acinclude.m4, Makefile.in, and ../vm/sqUnixMain accordingly\n *   - implement all the stubs in this file that currently do nothing\n * \n */\n\n#include \"sq.h\"\n#include \"sqMemoryAccess.h\"\n\n#include \"sqUnixMain.h\"\n#include \"sqUnixGlobals.h\"\n#include \"sqUnixCharConv.h\"\t\t/* not required, but probably useful */\n#include \"aio.h\"\t\t\t/* ditto */\n\n#include \"SqDisplay.h\"\n\n#include <stdio.h>\n\n#include \"sqUnixEvent.c\"\t\t/* see X11 and/or Quartz drivers for examples */\n\n\n#define trace() fprintf(stderr, \"%s:%d %s\\n\", __FILE__, __LINE__, __FUNCTION__)\n\nstatic int handleEvents(void)\n{\n  printf(\"handle custom events here...\\n\");\n  return 0;\t/* 1 if events processed */\n}\n\nstatic sqInt display_clipboardSize(void)\n{\n  trace();\n  return 0;\n}\n\nstatic sqInt display_clipboardWriteFromAt(sqInt count, sqInt byteArrayIndex, sqInt startIndex)\n{\n  trace();\n  return 0;\n}\n\nstatic sqInt display_clipboardReadIntoAt(sqInt count, sqInt byteArrayIndex, sqInt startIndex)\n{\n  trace();\n  return 0;\n}\n\n\nstatic sqInt display_ioFormPrint(sqInt bitsIndex, sqInt width, sqInt height, sqInt depth, double hScale, double vScale, sqInt landscapeFlag)\n{\n  trace();\n  return false;\n}\n\nstatic sqInt display_ioBeep(void)\n{\n  trace();\n  return 0;\n}\n\nstatic sqInt display_ioRelinquishProcessorForMicroseconds(sqInt microSeconds)\n{\n  aioSleepForUsecs(handleEvents() ? 0 : microSeconds);\n  return 0;\n}\n\nstatic sqInt display_ioProcessEvents(void)\n{\n  handleEvents();\n  aioPoll(0);\n  return 0;\n}\n\nstatic sqInt display_ioScreenDepth(void)\n{\n  trace();\n  return 16;\n}\n\nstatic sqInt display_ioScreenSize(void)\n{\n  trace();\n  return (600 << 16) | 400;\n}\n\nstatic sqInt display_ioSetCursorWithMask(sqInt cursorBitsIndex, sqInt cursorMaskIndex, sqInt offsetX, sqInt offsetY)\n{\n  trace();\n  return 0;\n}\n\nstatic sqInt display_ioSetFullScreen(sqInt fullScreen)\n{\n  trace();\n  return 0;\n}\n\nstatic sqInt display_ioForceDisplayUpdate(void)\n{\n  trace();\n  return 0;\n}\n\nstatic sqInt display_ioShowDisplay(sqInt dispBitsIndex, sqInt width, sqInt height, sqInt depth,\n\t\t\t\t   sqInt affectedL, sqInt affectedR, sqInt affectedT, sqInt affectedB)\n{\n  trace();\n  return 0;\n}\n\nstatic sqInt display_ioHasDisplayDepth(sqInt i)\n{\n  trace();\n  return 16 == i;\n}\n\nstatic sqInt display_ioSetDisplayMode(sqInt width, sqInt height, sqInt depth, sqInt fullscreenFlag)\n{\n  trace();\n  return 0;\n}\n\nstatic void display_winSetName(char *imageName)\n{\n  trace();\n}\n\nstatic void *display_ioGetDisplay(void)\t{ return 0; }\nstatic void *display_ioGetWindow(void)\t{ return 0; }\n\nstatic sqInt display_ioGLinitialise(void) { trace();  return 0; }\nstatic sqInt display_ioGLcreateRenderer(glRenderer *r, sqInt x, sqInt y, sqInt w, sqInt h, sqInt flags) { trace();  return 0; }\nstatic void  display_ioGLdestroyRenderer(glRenderer *r) { trace(); }\nstatic void  display_ioGLswapBuffers(glRenderer *r) { trace(); }\nstatic sqInt display_ioGLmakeCurrentRenderer(glRenderer *r) { trace();  return 0; }\nstatic void  display_ioGLsetBufferRect(glRenderer *r, sqInt x, sqInt y, sqInt w, sqInt h) { trace(); }\n\nstatic char *display_winSystemName(void)\n{\n  trace();\n  return \"Custom\";\n}\n\nstatic void display_winInit(void)\n{\n  trace();\n  printf(\"Initialise your Custom Window system here\\n\");\n}\n\nstatic void display_winOpen(void)\n{\n  trace();\n  printf(\"map your Custom Window here\\n\");\n}\n\n\nstatic void display_winExit(void)\n{\n  trace();\n  printf(\"shut down your Custom Window system here\\n\");\n}\n\nstatic int  display_winImageFind(char *buf, int len)\t\t{ trace();  return 0; }\nstatic void display_winImageNotFound(void)\t\t\t{ trace(); }\n\nstatic sqInt display_primitivePluginBrowserReady(void)\t\t{ return primitiveFail(); }\nstatic sqInt display_primitivePluginRequestURLStream(void)\t{ return primitiveFail(); }\nstatic sqInt display_primitivePluginRequestURL(void)\t\t{ return primitiveFail(); }\nstatic sqInt display_primitivePluginPostURL(void)\t\t{ return primitiveFail(); }\nstatic sqInt display_primitivePluginRequestFileHandle(void)\t{ return primitiveFail(); }\nstatic sqInt display_primitivePluginDestroyRequest(void)\t{ return primitiveFail(); }\nstatic sqInt display_primitivePluginRequestState(void)\t\t{ return primitiveFail(); }\n\nSqDisplayDefine(custom);\t/* name must match that in makeInterface() below */\n\n\n/*** module ***/\n\n\nstatic void display_printUsage(void)\n{\n  printf(\"\\nCustom Window <option>s: (none)\\n\");\n  /* otherwise... */\n}\n\nstatic void display_printUsageNotes(void)\n{\n  trace();\n}\n\nstatic void display_parseEnvironment(void)\n{\n  trace();\n}\n\nstatic int display_parseArgument(int argc, char **argv)\n{\n  return 0;\t/* arg not recognised */\n}\n\nstatic void *display_makeInterface(void)\n{\n  return &display_custom_itf;\t\t/* name must match that in SqDisplayDefine() above */\n}\n\n#include \"SqModule.h\"\n\nSqModuleDefine(display, custom);\t/* name must match that in sqUnixMain.c's moduleDescriptions */\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-fbdev/00_README.fbdev",
    "content": "0. WARNING\n\nTHIS IS BETA CODE!  It might work for you, it might not work for you,\nit might cause Squeak to crash, it might put your machine into a state\nwhere the keyboard and screen become *unusable*.\n\n\n1. INTRO\n\nThis is a driver for Squeak running on the Linux framebuffer.\nGraphics are displayed directly in the video memory, keyboard input is\ntaken from the console, and mouse input from the raw mouse device.\n\n\n2. HARDWARE REQUIREMENTS\n\nYou will need a graphics card that provides a framebuffer interface\n(which is by no means all of them).  If you see a penguin logo while\nLinux is booting, or if your console font suddenly changes during\nboot, then you have a framebuffer device.\n\nOtherwise, check for one by running\n\n\t/usr/sbin/fbset\n\nand if it says \"/dev/fb0: no such device\" then you don't have a\nframebuffer device.  (This program can be used to set the framebuffer\ndepth before running Squeak.)\n\nOtherwise there might be a module you can load: look in\n/lib/modules/X.Y.Z/kernel/drivers/video for a file called \"cardfb.o\",\nwhere \"card\" is the name of your graphics card.  If you find one, load\nit (as root) like this:\n\n\tmodprobe cardfb\n\nThe following configurations are known to work at all screen depths:\n\n\tarch\tkernel\tgraphics card\t\tos driver\n\t----\t------\t-------------\t\t---------\n\tPowerPC\t2.4.20\tATI Radeon 9000 (M9)\tradeonfb.o\n\tPowerPC\t2.2.18\tPowerMac Valkyrie\tvalkyriefb.o\n\t386\t2.4.18\tNeoMagic 256AV\t\tneofb.o\n\n\n3. SYSTEM REQUIREMENTS\n\nTo use this driver you must be logged in on the console with no window\nsystem running.\n\nYou MUST have WRITE PERMISSION for the following devices:\n\n  - the console\n\tthis is either /dev/console or /dev/tty0 or the device\n\treported by running the program \"tty\"\n\n  - the framebuffer\n\tthis is usually /dev/fb0\n\n  - the mouse\n\tthis is either /dev/psaux (if you have a real PS/2 mouse) or\n\t/dev/input/mice (which emulates PS/2 when you have some other\n\tkind of mouse)\n\nIn case of difficulty, the following might help:\n\n\tchmod a+rw /dev/tty* /dev/fb* /dev/psaux /dev/input/mice\n\nalthough this will somewhat compromise the security of your machine.\n\nDepending on your system you might also have to have ownership of the\nabove devices.  In extreme cases you might even have to run Squeak as\nroot to use this driver.\n\n\n4. INVOCATION\n\nYou need to tell Squeak explicitly that you want to use the\nframebuffer.  Either run Squeak with the '-vm-display-fbdev' option:\n\n\tsqueak -vm-display-fbdev your.image\n\nor set the variable SQUEAK_VM in your environment:\n\n\texport SQUEAK_VM=display-fbdev\n\n\n5. RECOVERY\n\nIf the VM becomes unresponsive for any reason you will have no option\nother than to log into your machine remotely and kill the VM.  If you\ndo this (or if the VM crashes) you will likely be left with the\nkeyboard and screen in an unusable state.  To recover from this, log\ninto the machine remotely and run\n\n\tkbd_mode -a\n\nto restore the keyboard.  The screen is a little trickier; the most\nreliable way to put it back into a sane state is to start the X server\n\n\t/usr/X11R6/bin/X :0\n\nand then quit it by pressing Ctrl+Alt+Backspace.\n\n\n6. MISSING\n\nThere is no rule number six.\n\n\n7. LIABILITY\n\nIf this driver breaks your machine, you get to keep all the pieces.\n\n\n8. CONTACTS\n\nPlease report bugs (and success stories) by email to: ian.piumarta@squeakland.org\n\nThanks!\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-fbdev/Makefile.in",
    "content": "# Makefile for framebuffer support\t\t\t\t-*- makefile -*-\n# \n#   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n#                              listed elsewhere in this file.\n#   All rights reserved.\n#   \n#   This file is part of Unix Squeak.\n# \n#      You are NOT ALLOWED to distribute modified versions of this file\n#      under its original name.  If you modify this file then you MUST\n#      rename it before making your modifications available publicly.\n# \n#   This file is distributed in the hope that it will be useful, but WITHOUT\n#   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n#   FITNESS FOR A PARTICULAR PURPOSE.\n#   \n#   You may use and/or distribute this file ONLY as part of Squeak, under\n#   the terms of the Squeak License as described in `LICENSE' in the base of\n#   this distribution, subject to the following additional restrictions:\n# \n#   1. The origin of this software must not be misrepresented; you must not\n#      claim that you wrote the original software.  If you use this software\n#      in a product, an acknowledgment to the original author(s) (and any\n#      other contributors mentioned herein) in the product documentation\n#      would be appreciated but is not required.\n# \n#   2. You must not distribute (or make publicly available by any\n#      means) a modified copy of this file unless you first rename it.\n# \n#   3. This notice must not be removed or altered in any source distribution.\n# \n#   Using (or modifying this file for use) in any context other than Squeak\n#   changes these copyright conditions.  Read the file `COPYING' in the\n#   directory `platforms/unix/doc' before proceeding with any such use.\n# \n# Author: ian.piumarta@inria.fr\n# \n# Last edited: 2004-04-12 11:56:39 by piumarta on emilia.local\n\n[make_cfg]\n[make_plg]\n\nTARGET\t\t= vm-display-fbdev$a\nOBJS\t\t= sqUnixFBDev$o\n\nXCFLAGS\t\t= $(X_CFLAGS) -Wall -Werror\n\nXINCLUDES\t= [includes] $(X_INCLUDES) \\\n\t\t  -I$(topdir)/platforms/Cross/plugins/FilePlugin \\\n\t\t  -I$(topdir)/platforms/Cross/plugins/B3DAcceleratorPlugin \\\n\t\t  -I$(topdir)/platforms/unix/plugins/B3DAcceleratorPlugin\n\n$(TARGET) : $(OBJS) Makefile\n\t$(LINK) $(TARGET) $(OBJS)\n\t$(RANLIB) $(TARGET)\n\n[make_targets]\n\n.force :\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-fbdev/TODO",
    "content": "option: fb mode switch at startup\noption: mapdelbs for 127 -> 8\noption: find and run on a free VT rather than taking over the active one\noption: mouse acceleration\n\nattempt auto mode switch for 16-bit (565 -> 555 to eliminate pixel repack)\n\nImPS/2 and USB mouse protocols\n\nkeyboard maps from /usr/share/keymaps or /lib/kbd/keymaps\n\nprinting\n\nmake it play nice when launched from within X11\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-fbdev/acinclude.m4",
    "content": "# -*- sh -*-\n\nAC_CHECK_HEADERS(linux/fb.h,,AC_PLUGIN_DISABLE)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-fbdev/config.cmake",
    "content": "PLUGIN_REQUIRE_INCLUDE (LINUX_FB linux/fb.h)\nPLUGIN_SOURCES (${unix}/${plugin}/sqUnixFBDev.c)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-fbdev/sqUnixFBDev.c",
    "content": "/* sqUnixFBDev.c -- display driver for the Linux framebuffer\n * \n * Author: Ian Piumarta <ian.piumarta@squeakland.org>\n */\n\n\n/* The framebuffer display driver was donated to the Squeak community by:\n * \n *\tWeather Dimensions, Inc.\n *\t13271 Skislope Way, Truckee, CA 96161\n *\thttp://www.weatherdimensions.com\n *\n * Copyright (C) 2003-2005 Ian Piumarta\n * All Rights Reserved.\n * \n * This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n */\n\n\n#include \"config.h\"\n#include \"sq.h\"\n#include \"sqUnixMain.h\"\n#include \"sqUnixGlobals.h\"\n#include \"sqaio.h\"\n\n#include \"SqDisplay.h\"\n\n#if defined(ioMSecs)\n# undef ioMSecs\n#endif\n\n#include <stdio.h>\n#include <time.h>\n#include <sys/time.h>\n#include <sys/types.h>\n#include <sys/param.h>\n#include <sys/stat.h>\n#include <unistd.h>\n#include <errno.h>\n#include <signal.h>\n#include <fcntl.h>\n#include <sys/select.h>\n#include <stdarg.h>\n#include <assert.h>\n\n#if !defined(DEBUG)\n# define DEBUG\t0\n#endif\n\n\nstatic void DPRINTF(const char *fmt, ...)\n{\n#if (DEBUG)\n  va_list ap;\n  va_start(ap, fmt);\n  vprintf(fmt, ap);\n  va_end(ap);\n#endif\n}\n\nstatic void fatalError(const char *who)\n{\n  perror(who);\n  exit(1);\n}\n\nstatic void fatal(const char *fmt, ...)\n{\n  va_list ap;\n  va_start(ap, fmt);\n  vfprintf(stderr, fmt, ap);\n  va_end(ap);\n  fprintf(stderr, \"\\n\");\n  exit(1);\n}\n\nstatic void outOfMemory(void)\n{\n  fatal(\"out of memory\");\n}\n\n\n/*#define DEBUG_EVENTS\t1*/\n\n#include \"sqUnixEvent.c\"\n\nstatic inline int min(int a, int b) { return a < b ? a : b; }\nstatic inline int max(int a, int b) { return a > b ? a : b; }\n\nstatic void failPermissions(const char *who);\n\nstatic char *msDev=    0;\nstatic char *msProto=  0;\nstatic char *kmPath=   0;\nstatic char *fbDev=    0;\nstatic int   vtLock=   0;\nstatic int   vtSwitch= 0;\n\nstruct kb;\nstruct ms;\nstruct fb;\n\nstatic struct ms *ms= 0;\nstatic struct kb *kb= 0;\nstatic struct fb *fb= 0;\n\n#include \"sqUnixFBDevUtil.c\"\n#include \"sqUnixFBDevMouse.c\"\n#include \"sqUnixFBDevKeyboard.c\"\n#include \"sqUnixFBDevFramebuffer.c\"\n\nstatic void openFramebuffer(void)\n{\n  fb= fb_new();\n  fb_open(fb, kb, fbDev);\n}\n\n\nstatic void closeFramebuffer(void)\n{\n  if (fb)\n    {\n      fb_close(fb);\n      fb_delete(fb);\n      fb= 0;\n    }\n}\n\n\nstatic void enqueueKeyboardEvent(int key, int up, int modifiers)\n{\n  DPRINTF(\"KEY %3d %02x %c %s mod %02x\\n\",\n\t  key, key, ((key > 32) && (key < 127)) ? key : ' ',\n\t  up ? \"UP\" : \"DOWN\", modifiers);\n\n  modifierState= modifiers;\n  if (up)\n    {\n      recordKeyboardEvent(key, EventKeyUp, modifiers, key);\n    }\n  else\n    {\n      recordKeyboardEvent(key, EventKeyDown, modifiers, key);\n      recordKeyboardEvent(key, EventKeyChar, modifiers, key);\n    }\n}\n\nstatic void openKeyboard(void)\n{\n  kb= kb_new();\n  kb_open(kb, vtSwitch, vtLock);\n  kb_setCallback(kb, enqueueKeyboardEvent);\n}\n\nstatic void closeKeyboard(void)\n{\n  if (kb)\n    {\n      kb_setCallback(kb, 0);\n      kb_close(kb);\n      kb_delete(kb);\n      kb= 0;\n    }\n}\n\n\nstatic void enqueueMouseEvent(int b, int dx, int dy)\n{\n  fb_advanceCursor(fb, dx, dy);\n  buttonState= b;\n  mousePosition= fb->cursorPosition;\n  if (b)\n    DPRINTF(\"mouse %02x at %4d,%4d mod %02x\\n\",\n\t    b, mousePosition.x, mousePosition.y, modifierState);\n  recordMouseEvent();\n}\n\nstatic void openMouse(void)\n{\n  ms= ms_new();\n  ms_open(ms, msDev, msProto);\n  ms_setCallback(ms, enqueueMouseEvent);\n}\n\nstatic void closeMouse(void)\n{\n  if (ms)\n    {\n      ms_setCallback(ms, 0);\n      ms_close(ms);\n      ms_delete(ms);\n      ms= 0;\n    }\n}\n\n\nstatic sqInt display_ioBeep(void)\n{\n  kb_bell(kb);\n  return 0;\n}\n\n\nstatic sqInt display_ioRelinquishProcessorForMicroseconds(sqInt microSeconds)\n{\n  aioSleepForUsecs(microSeconds);\n  return 0;\n}\n\n\nstatic sqInt display_ioProcessEvents(void)\n{\n  aioPoll(0);\n  return 0;\n}\n\n\nstatic sqInt display_ioScreenDepth(void)\n{\n  // we could match negative depths for little-endian machines here, but:\n  //   1. some kinds of BitBlt seem to be broken at depth -8;\n  //   2. doing our own conversionis 20% faster than having BitBlt do it.\n  return fb_depth(fb);\n}\n\n\nstatic sqInt display_ioScreenSize(void)\n{\n  return ((fb_width(fb) << 16) | fb_height(fb));\n}\n\n\nstatic sqInt display_ioSetCursorWithMask(sqInt cursorBitsIndex, sqInt cursorMaskIndex, sqInt offsetX, sqInt offsetY)\n{\n  fb_setCursor(fb, pointerForOop(cursorBitsIndex), pointerForOop(cursorMaskIndex), offsetX, offsetY);\n  return 1;\n}\n\n\nstatic sqInt display_ioSetCursorARGB(sqInt cursorBitsIndex, sqInt extentX, sqInt extentY, sqInt offsetX, sqInt offsetY)\n{\n  return 0;\n}\n\n\nstatic sqInt display_ioShowDisplay(sqInt dispBitsIndex, sqInt width, sqInt height, sqInt depth, sqInt affectedL, sqInt affectedR, sqInt affectedT, sqInt affectedB)\n{\n  if ((depth  != fb_depth(fb)) || (width  != fb_width(fb)) || (height != fb_height(fb))\n      || (affectedR < affectedL) || (affectedB < affectedT))\n    return 0;\n  fb->copyBits(fb, pointerForOop(dispBitsIndex), affectedL, affectedR, affectedT, affectedB);\n  return 1;\n}\n\n\nstatic sqInt display_ioHasDisplayDepth(sqInt i)\n{\n  DPRINTF(\"hasDisplayDepth %d (%d) => %d\\n\", i, fb_depth(fb), (i == fb_depth(fb)));\n  return (i == fb_depth(fb));\n}\n\n\nstatic void openDisplay(void)\n{\n  DPRINTF(\"openDisplay\\n\");\n  openMouse();\n  openKeyboard();\n  openFramebuffer();\n  // init mouse after setting graf mode on tty avoids packets being\n  // snarfed by gpm\n  ms->init(ms);\n}\n\n\nstatic void closeDisplay(void)\n{\n  DPRINTF(\"closeDisplay\\n\");\n  closeFramebuffer();\n  closeKeyboard();\n  closeMouse();\n}\n\n\nstatic char *display_winSystemName(void)\n{\n  return \"fbdev\";\n}\n\n\nstatic void display_winInit(void)\n{\n#if defined(AT_EXIT)\n  AT_EXIT(closeDisplay);\n#else\n# warning: cannot release /dev/fb on exit!\n# endif\n\n  (void)recordMouseEvent;\n  (void)recordKeyboardEvent;\n  (void)recordKeystroke;\n  (void)recordDragEvent;\n  (void)recordWindowEvent;\n}\n\n\nstatic void display_winOpen(void)\n{\n  openDisplay();\n}\n\n\nstatic void failPermissions(const char *who)\n{\n  fprintf(stderr, \"cannot open %s\\n\", who);\n  fprintf(stderr, \"either:\\n\");\n  fprintf(stderr, \"  -  you don't have a framebuffer driver for your graphics card\\n\");\n  fprintf(stderr, \"     (you might be able to load one with 'modprobe'; look in\\n\");\n  fprintf(stderr, \"     /lib/modules for something called '<your-card>fb.o'\\n\");\n  fprintf(stderr, \"  -  you don't have write permission on some of the following\\n\");\n  fprintf(stderr, \"       /dev/tty*, /dev/fb*, /dev/psaux, /dev/input/mice\\n\");\n  fprintf(stderr, \"  -  you need to run Squeak as root on your machine\\n\");\n  exit(1);\n}\n\n\nstatic void display_printUsage(void)\n{\n  printf(\"\\nFBDev <option>s:\\n\");\n  printf(\"  -fbdev <dev>          use framebuffer device <dev> (default: /dev/fb)\\n\");\n  printf(\"  -kbmap <file>         load keymap from <file> (default: use kernel keymap)\\n\");\n  printf(\"  -msdev <dev>          use mouse device <dev> (default: /dev/psaux)\\n\");\n  printf(\"  -msproto <protocol>   use the given <protocol> for the mouse (default: ps2)\\n\");\n  printf(\"  -vtlock               disallow all vt switching (for any reason)\\n\");\n  printf(\"  -vtswitch             enable keyboard vt switching (Alt+FNx)\\n\");\n}\n\n\nstatic void display_printUsageNotes(void)\n{\n  printf(\"  -vtlock disables keyboard vt switching even when -vtswitch is enabled\\n\");\n}\n\n\nstatic void display_parseEnvironment(void)\n{\n  char *ev= 0;\n  if ((ev= getenv(\"SQUEAK_FBDEV\")))\tfbDev=    strdup(ev);\n  if ((ev= getenv(\"SQUEAK_KBMAP\")))\tkmPath=   strdup(ev);\n  if ((ev= getenv(\"SQUEAK_MSDEV\")))\tmsDev=    strdup(ev);\n  if ((ev= getenv(\"SQUEAK_MSPROTO\")))\tmsProto=  strdup(ev);\n  if ((ev= getenv(\"SQUEAK_VTLOCK\")))\tvtLock=   1;\n  if ((ev= getenv(\"SQUEAK_VTSWITCH\")))\tvtSwitch= 1;\n}\n\n\nstatic int display_parseArgument(int argc, char **argv)\n{\n  int n= 1;\n  char *arg= argv[0];\n\n  if      (!strcmp(arg, \"-vtlock\"))\t vtLock=   1;\n  else if (!strcmp(arg, \"-vtswitch\"))\t vtSwitch= 1;\n  else if (argv[1])\t/* option requires an argument */\n    {\n      n= 2;\n      if      (!strcmp(arg, \"-fbdev\"))\t fbDev=   argv[1];\n      else if (!strcmp(arg, \"-kbmap\"))\t kmPath=  argv[1];\n      else if (!strcmp(arg, \"-msdev\"))\t msDev=   argv[1];\n      else if (!strcmp(arg, \"-msproto\")) msProto= argv[1];\n      else\n\tn= 0;\t/* not recognised */\n    }\n  else\n    n= 0;\n  return n;\n}\n\n\nstatic sqInt display_clipboardSize(void)\t\t\t\t\t\t\t\t\t{ return 0; }\nstatic sqInt display_clipboardWriteFromAt(sqInt n, sqInt ptr, sqInt off)\t\t\t\t\t{ return 0; }\nstatic sqInt display_clipboardReadIntoAt(sqInt n, sqInt ptr, sqInt off)\t\t\t\t\t{ return 0; }\nstatic char **display_clipboardGetTypeNames(void)\t\t\t\t\t\t\t\t{ return 0; }\nstatic sqInt  display_clipboardSizeWithType(char *typeName, int ntypeName)\t\t\t\t\t{ return 0; }\n\nstatic void  display_clipboardWriteWithType(char *data, size_t ndata, char *typeName, size_t ntypeName, int isDnd, int isClaiming) {}\n\nstatic sqInt display_dndOutStart(char *types, int ntypes)\t{ return 0; }\nstatic void  display_dndOutSend(char *bytes, int nbytes)\t{ return  ; }\nstatic void  display_dndLaunchFile(char *fileName)\t{ return ; }\nstatic sqInt display_dndOutAcceptedType(char * buf, int nbuf)\t{ return 0; }\nstatic sqInt display_dndReceived(char *fileName)\t{ return 0; }\n\nstatic sqInt display_ioFormPrint(sqInt bits, sqInt w, sqInt h, sqInt d, double hs, double vs, sqInt l)\t{ return 0; }\nstatic sqInt display_ioSetFullScreen(sqInt fullScreen)\t\t\t\t\t\t\t{ return 0; }\nstatic sqInt display_ioForceDisplayUpdate(void)\t\t\t\t\t\t\t\t{ return 0; }\nstatic sqInt display_ioSetDisplayMode(sqInt width, sqInt height, sqInt depth, sqInt fullscreenFlag)\t\t{ return 0; }\nstatic void display_winSetName(char *imageName)\t\t\t\t\t\t\t\t{ return  ; }\nstatic void display_winExit(void)\t\t\t\t\t\t\t\t\t{ return  ; }\nstatic int  display_winImageFind(char *buf, int len)\t\t\t\t\t\t\t{ return 0; }\nstatic void display_winImageNotFound(void)\t\t\t\t\t\t\t\t{ return  ; }\n\n\n//----------------------------------------------------------------\n\n// OSPP\n\nvoid openXDisplay(void)\t\t{}\nvoid closeXDisplay(void)\t{}\nvoid synchronizeXDisplay(void)\t{}\nvoid forgetXDisplay(void)\t{}\n\nstatic void *display_ioGetDisplay(void)\t{ return 0; }\nstatic void *display_ioGetWindow(void)\t{ return 0; }\n\n// OpenGL\n\nstatic sqInt  display_ioGLinitialise(void)\t\t\t\t\t\t\t\t{ return 0; }\nstatic sqInt  display_ioGLcreateRenderer(glRenderer *r, sqInt x, sqInt y, sqInt w, sqInt h, sqInt flags)\t{ return 0; }\nstatic void  display_ioGLdestroyRenderer(glRenderer *r)\t\t\t\t\t\t\t{ return  ; }\nstatic void  display_ioGLswapBuffers(glRenderer *r)\t\t\t\t\t\t\t{ return  ; }\nstatic sqInt  display_ioGLmakeCurrentRenderer(glRenderer *r)\t\t\t\t\t\t{ return 0; }\nstatic void  display_ioGLsetBufferRect(glRenderer *r, sqInt x, sqInt y, sqInt w, sqInt h)\t\t\t{ return  ; }\n\n// Mozilla\n\nstatic sqInt display_primitivePluginBrowserReady()\t{ return primitiveFail(); }\nstatic sqInt display_primitivePluginRequestURLStream()\t{ return primitiveFail(); }\nstatic sqInt display_primitivePluginRequestURL()\t{ return primitiveFail(); }\nstatic sqInt display_primitivePluginPostURL()\t\t{ return primitiveFail(); }\nstatic sqInt display_primitivePluginRequestFileHandle()\t{ return primitiveFail(); }\nstatic sqInt display_primitivePluginDestroyRequest()\t{ return primitiveFail(); }\nstatic sqInt display_primitivePluginRequestState()\t{ return primitiveFail(); }\n\n// Host Windows\n\n#if (SqDisplayVersionMajor >= 1 && SqDisplayVersionMinor >= 2)\nstatic int display_hostWindowClose(int index)                                               { return 0; }\nstatic int display_hostWindowCreate(int w, int h, int x, int y,\n  char *list, int attributeListLength)                                                      { return 0; }\nstatic int display_hostWindowShowDisplay(unsigned *dispBitsIndex, int width, int height, int depth,\n  int affectedL, int affectedR, int affectedT, int affectedB, int windowIndex)              { return 0; }\nstatic int display_hostWindowGetSize(int windowIndex)                                       { return -1; }\nstatic int display_hostWindowSetSize(int windowIndex, int w, int h)                         { return -1; }\nstatic int display_hostWindowGetPosition(int windowIndex)                                   { return -1; }\nstatic int display_hostWindowSetPosition(int windowIndex, int x, int y)                     { return -1; }\nstatic int display_hostWindowSetTitle(int windowIndex, char *newTitle, int sizeOfTitle)     { return -1; }\nstatic int display_hostWindowCloseAll(void)                                                 { return 0; }\n#endif\n\n\n//----------------------------------------------------------------\n\n\n#include \"SqModule.h\"\n\nSqDisplayDefine(fbdev);\n\nstatic void *display_makeInterface(void)\n{\n  return &display_fbdev_itf;\n}\n\nSqModuleDefine(display,\tfbdev);\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-fbdev/sqUnixFBDevFramebuffer.c",
    "content": "/* sqUnixFBDevFramebuffer.c -- abstraction over the framebuffer device\n * \n * Author: Ian Piumarta <ian.piumarta@inria.fr>\n * \n * Last edited: 2003-10-31 13:32:59 by piumarta on emilia.inria.fr\n */\n\n\n/* The framebuffer display driver was donated to the Squeak community by:\n * \n *\tWeather Dimensions, Inc.\n *\t13271 Skislope Way, Truckee, CA 96161\n *\thttp://www.weatherdimensions.com\n *\n * Copyright (C) 2003 Ian Piumarta\n * All Rights Reserved.\n * \n * This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n */\n\n\n#include <unistd.h>\n#include <sys/mman.h>\n#include <sys/ioctl.h>\n\n#include <linux/fb.h>\n#include <linux/vt.h>\n#include <linux/kd.h>\n\n\n#define _self\tstruct fb *self\n\n\nstruct fb;\n\ntypedef void\t\t(*fb_copyBits_t )(_self, char *bits, int l, int r, int t, int b);\ntypedef void\t\t(*fb_drawPixel_t)(_self, int x, int y, int r, int g, int b);\ntypedef unsigned long\t(*fb_getPixel_t )(_self, int x, int y);\ntypedef void\t\t(*fb_putPixel_t )(_self, int x, int y, unsigned long pixel);\n\nstruct fb\n{\n  char\t\t\t\t *fbName;\n  int\t\t\t\t  fd;\n  struct kb\t\t\t *kb;\n  long int\t\t\t  size;\n  char\t\t\t\t *addr;\n  struct fb_var_screeninfo\t  var;\n  struct fb_fix_screeninfo\t  fix;\n  long int\t\t\t  pitch;\n  int\t\t\t\t  bpp;\n  fb_copyBits_t\t\t\t  copyBits;\n  fb_drawPixel_t\t\t  drawPixel;\n  fb_getPixel_t\t\t\t  getPixel;\n  fb_putPixel_t\t\t\t  putPixel;\n  unsigned long\t\t\t  whitePixel;\n  unsigned long\t\t\t  blackPixel;\n  SqPoint\t\t\t  cursorPosition;\n  SqPoint\t\t\t  cursorOffset;\n  int\t\t\t\t  cursorVisible;\n  unsigned short\t\t  cursorBits[16];\n  unsigned short\t\t  cursorMask[16];\n  unsigned long\t\t\t  cursorBack[16][16];\n};\n\n\n#define swab32(X)     ({ __u32 __x= (X);\t\t\t\t\t\t\\\n                         ((__u32)((((__u32)(__x) & (__u32)0x000000ffUL) << 24)\t\t\\\n\t\t\t\t| (((__u32)(__x) & (__u32)0x0000ff00UL) <<  8)\t\t\\\n\t\t\t\t| (((__u32)(__x) & (__u32)0x00ff0000UL) >>  8)\t\t\\\n\t\t\t\t| (((__u32)(__x) & (__u32)0xff000000UL) >> 24) )); })\n\n\nstatic char *visualName(_self)\n{\n  switch (self->fix.visual)\n    {\n    case FB_VISUAL_MONO01:\t\treturn \"MONO01\";\n    case FB_VISUAL_MONO10:\t\treturn \"MONO10\";\n    case FB_VISUAL_TRUECOLOR:\t\treturn \"TRUECOLOR\";\n    case FB_VISUAL_PSEUDOCOLOR:\t\treturn \"PSEUDOCOLOR\";\n    case FB_VISUAL_DIRECTCOLOR:\t\treturn \"DIRECTCOLOR\";\n    case FB_VISUAL_STATIC_PSEUDOCOLOR:\treturn \"STATIC_PSEUDOCOLOR\";\n    }\n  return \"UNKNOWN\";\n}\n\n\nstatic inline int fb_width(_self)\t{ return self->var.xres; }\nstatic inline int fb_pitch(_self)\t{ return self->pitch; }\nstatic inline int fb_height(_self)\t{ return self->var.yres; }\nstatic inline int fb_depth(_self)\t{ return self->var.bits_per_pixel; }\n\n\nstatic inline unsigned long fb_getPixel_32(_self, int x, int y)\n{\n  return ((x >= 0) && (y >= 0) && (x < fb_width(self)) && (y < fb_height(self)))\n    ? *((unsigned long *)(self->addr\n\t\t\t   + (x + self->var.xoffset) * (32 / 8)\n\t\t\t   + (y + self->var.yoffset) * (self->fix.line_length)))\n    : 0;\n}\n\nstatic inline void fb_putPixel_32(_self, int x, int y, unsigned long pix)\n{\n  if ((x >= 0) && (y >= 0) && (x < fb_width(self)) && (y < fb_height(self)))\n    {\n      *((unsigned long *)(self->addr\n\t\t\t  + (x + self->var.xoffset) * (32 / 8)\n\t\t\t  + (y + self->var.yoffset) * (self->fix.line_length)))\n\t= pix;\n    }\n}\n\n\nstatic inline unsigned long fb_getPixel_16(_self, int x, int y)\n{\n  return ((x >= 0) && (y >= 0) && (x < fb_width(self)) && (y < fb_height(self)))\n    ? *((unsigned short *)(self->addr\n\t\t\t   + (x + self->var.xoffset) * (16 / 8)\n\t\t\t   + (y + self->var.yoffset) * (self->fix.line_length)))\n    : 0;\n}\n\nstatic inline void fb_putPixel_16(_self, int x, int y, unsigned long pix)\n{\n  if ((x >= 0) && (y >= 0) && (x < fb_width(self)) && (y < fb_height(self)))\n    {\n      *((unsigned short *)(self->addr\n\t\t\t   + (x + self->var.xoffset) * (16 / 8)\n\t\t\t   + (y + self->var.yoffset) * (self->fix.line_length)))\n\t= pix;\n    }\n}\n\n\nstatic inline unsigned long fb_getPixel_8(_self, int x, int y)\n{\n  return ((x >= 0) && (y >= 0) && (x < fb_width(self)) && (y < fb_height(self)))\n    ? *((unsigned char *)(self->addr\n\t\t\t  + (x + self->var.xoffset)\n\t\t\t  + (y + self->var.yoffset) * (self->fix.line_length)))\n    : 0;\n}\n\n\nstatic inline void fb_putPixel_8(_self, int x, int y, unsigned long pix)\n{\n  if ((x >= 0) && (y >= 0) && (x < fb_width(self)) && (y < fb_height(self)))\n    {\n      *((unsigned char *)(self->addr\n\t\t\t  + (x + self->var.xoffset)\n\t\t\t  + (y + self->var.yoffset) * (self->fix.line_length)))\n\t= pix;\n    }\n}\n\n\nstatic void fb_drawPixel_rgb8888(_self, int x, int y, int r, int g, int b)\n{\n  fb_putPixel_32(self, x, y, (r << 16) | (g << 8) | (b << 0));\n}\n\nstatic void fb_drawPixel_rgb565(_self, int x, int y, int r, int g, int b)\n{\n  fb_putPixel_16(self, x, y, (((r >> 3) & 31) << 11) | (((g >> 2) & 63) <<  5) | (((b >> 3) & 31) <<  0));\n}\n\nstatic void fb_drawPixel_rgb555(_self, int x, int y, int r, int g, int b)\n{\n  fb_putPixel_16(self, x, y, (((r >> 3) & 31) << 10) | (((g >> 3) & 31) <<  5) | (((b >> 3) & 31) <<  0));\n}\n\nstatic void fb_drawPixel_rgb332(_self, int x, int y, int r, int g, int b)\n{\n  unsigned char t;\n  if      ((r == 0)   && (g == 0)   && (b == 255)) t= 0;\n  else if ((r == 255) && (g == 255) && (b == 255)) t= 1;\n  else\t  t= (40 + (r / 43) * 36 + (g / 43) * 6 + (b / 43) * 1);\n  fb_putPixel_8(self, x, y, t);\n}\n\n\nstatic void hideCursor(_self)\n{\n  if (self->cursorVisible)\n    {\n      int xo= self->cursorPosition.x + self->cursorOffset.x;\n      int yo= self->cursorPosition.y + self->cursorOffset.y;\n      int x, y;\n      for (y= 0;  y < 16;  ++y)\n\tfor (x= 0;  x < 16;  ++x)\n\t  self->putPixel(self, xo + x, yo + y, self->cursorBack[y][x]);\n      self->cursorVisible= 0;\n    }\n}\n\n\nstatic void showCursor(_self)\n{\n  if (!self->cursorVisible)\n    {\n      int xo= self->cursorPosition.x + self->cursorOffset.x;\n      int yo= self->cursorPosition.y + self->cursorOffset.y;\n      int y;\n      for (y= 0;  y < 16;  ++y)\n\t{\n\t  unsigned short bits= self->cursorBits[y];\n\t  unsigned short mask= self->cursorMask[y];\n\t  int x;\n\t  for (x= 0;  x < 16;  ++x)\n\t    {\n\t      self->cursorBack[y][x]= self->getPixel(self, xo + x, yo + y);\n\t      if      (bits & 0x8000) self->putPixel(self, xo + x, yo + y, self->blackPixel);\n\t      else if (mask & 0x8000) self->putPixel(self, xo + x, yo + y, self->whitePixel);\n\t      bits <<= 1;\n\t      mask <<= 1;\n\t    }\n\t}\n      self->cursorVisible= 1;\n    }\n}\n\n\nstatic int cursorIn(_self, int l, int r, int t, int b)\n{\n  int cl= self->cursorPosition.x + self->cursorOffset.x;\n  int cr= cl + 15;\n  int ct= self->cursorPosition.y + self->cursorOffset.y;\n  int cb= ct + 15;\n  return !((cr < l) || (cl > r) || (ct > b) || (cb < t));\n}\n\nstatic inline void hideCursorIn(_self, int l, int r, int t, int b)\n{\n  if (cursorIn(self, l, r, t, b))\n    hideCursor(self);\n}\n\nstatic inline void showCursorIn(_self, int l, int r, int t, int b)\n{\n  if (cursorIn(self, l, r, t, b))\n    showCursor(self);\n}\n\n\nstatic void fb_setCursor(_self, char *bits, char *mask, int xoff, int yoff)\n{\n  int y;\n  hideCursor(self);\n  self->cursorOffset.x= xoff;\n  self->cursorOffset.y= yoff;\n  for (y= 0;  y < 16;  ++y)\n    {\n      self->cursorBits[y]= (((unsigned long *)bits)[y]) >> 16;\n      self->cursorMask[y]= (((unsigned long *)mask)[y]) >> 16;\n    }\n  showCursor(self);\n}\n\n\nstatic void fb_advanceCursor(_self, int dx, int dy)\n{\n  hideCursor(self);\n  self->cursorPosition.x= max(0, min(self->cursorPosition.x + dx, fb_width(self) - 1));\n  self->cursorPosition.y= max(0, min(self->cursorPosition.y + dy, fb_height(self) - 1));\n  showCursor(self);\n}\n\n\nstatic void fb_copyBits_32(_self, char *bits, int l, int r, int t, int b)\n{\n  int x, y;\n  hideCursorIn(self, l, r, t, b);\n  for (y= t;  y < b;  ++y)\n    {\n      unsigned long *in= (unsigned long *)(bits + ((l + (y * fb_width(self))) * 4));\n      unsigned long *out= (unsigned long *)(self->addr + ((l + (y * fb_pitch(self))) * 4));\n      for (x= l;  x < r;  x += 1, in += 1, out += 1)\n\t{\n\t  out[0]= in[0];\n\t}\n    }\n  showCursorIn(self, l, r, t, b);\n}\n\n\nstatic inline unsigned short fb_repack565(unsigned short pixel)\n{\n  return ((pixel & 0x7c00) << 1)\n    |    ((pixel & 0x03e0) << 1)\n    |    ((pixel & 0x001f) << 0);\n}\n\n\nstatic void fb_copyBits_16(_self, char *bits, int l, int r, int t, int b)\n{\n  int x, y;\n  l &= 0xfffe;\n  hideCursorIn(self, l, r, t, b);\n  for (y= t;  y < b;  ++y)\n    {\n      unsigned short *in= (unsigned short *)(bits + ((l + (y * fb_width(self))) * 2));\n      unsigned short *out= (unsigned short *)(self->addr + ((l + (y * fb_pitch(self))) * 2));\n      for (x= l;  x < r;  x += 2, in += 2, out += 2)\n\t{\n#\t if defined(WORDS_BIGENDIAN)\n\t  out[0]= fb_repack565(in[0]);\n\t  out[1]= fb_repack565(in[1]);\n#\t else\n\t  out[0]= fb_repack565(in[1]);\n\t  out[1]= fb_repack565(in[0]);\n#\t endif\n\t}\n    }\n  showCursorIn(self, l, r, t, b);\n}\n\nstatic void fb_copyBits_15(_self, char *bits, int l, int r, int t, int b)\n{\n  int x, y;\n  l &= 0xfffe;\n  hideCursorIn(self, l, r, t, b);\n  for (y= t;  y < b;  ++y)\n    {\n      unsigned short *in= (unsigned short *)(bits + ((l + (y * fb_width(self))) * 2));\n      unsigned short *out= (unsigned short *)(self->addr + ((l + (y * fb_pitch(self))) * 2));\n      for (x= l;  x < r;  x += 2, in += 2, out += 2)\n\t{\n#\t if defined(WORDS_BIGENDIAN)\n\t  *(unsigned long *)out= *(unsigned long *)in;\n#\t else\n\t  out[0]= in[1];\n\t  out[1]= in[0];\n#\t endif\n\t}\n    }\n  showCursorIn(self, l, r, t, b);\n}\n\nstatic void fb_copyBits_8(_self, char *bits, int l, int r, int t, int b)\n{\n  int x, y;\n  l &= 0xfffc;\n  hideCursorIn(self, l, r, t, b);\n  for (y= t;  y < b;  ++y)\n    {\n      unsigned char *in= (unsigned char *)(bits + ((l + (y * fb_pitch(self)))));\n      unsigned char *out= (unsigned char *)(self->addr + ((l + (y * fb_pitch(self)))));\n      for (x= l;  x < r;  x += 4, in += 4, out += 4)\n\t{\n\t  unsigned long pix= *(unsigned long *)out= *(unsigned long *)in;\n#        if !defined(WORDS_BIGENDIAN)\n\t  pix= swab32(pix);\n#        endif\n\t  *(unsigned long *)out= pix;\n\t}\n    }\n  showCursorIn(self, l, r, t, b);\n}\n\n\n\nstatic void fb_initPseudoColour(_self)\n{\n  struct fb_cmap cmap;\n  unsigned short red, green, blue, transp;\n\n  cmap.len   \t= 1;\n  cmap.red   \t= &red;\n  cmap.green \t= &green;\n  cmap.blue  \t= &blue;\n  cmap.transp = &transp;\n  transp = 0;\n\n# define SetColour(I, R, G, B)\t\t\t\t\t\t\t\t\\\n  {\t\t\t\t\t\t\t\t\t\t\t\\\n    cmap.start= (I);\t\t\t\t\t\t\t\t\t\\\n    red=   (R);\t\t\t\t\t\t\t\t\t\t\\\n    green= (G);\t\t\t\t\t\t\t\t\t\t\\\n    blue=  (B);\t\t\t\t\t\t\t\t\t\t\\\n    if (-1 == ioctl(self->fd, FBIOPUTCMAP, (void *)&cmap)) fatalError(\"FBIOPUTCMAP\");\t\\\n  }\n\n  /* 1-bit colours (monochrome) */\n  SetColour(0, 65535, 65535, 65535);\t/* white or transparent */\n  SetColour(1,     0,     0,     0);\t/* black */\n\n  /* additional colours for 2-bit colour */\n  SetColour(2, 65535, 65535, 65535);\t/* opaque white */\n  SetColour(3, 32768, 32768, 32768);\t/* 1/2 gray */\n\n  /* additional colours for 4-bit colour */\n  SetColour( 4, 65535,     0,     0);\t/* red */\n  SetColour( 5,     0, 65535,     0);\t/* green */\n  SetColour( 6,     0,     0, 65535);\t/* blue */\n  SetColour( 7,     0, 65535, 65535);\t/* cyan */\n  SetColour( 8, 65535, 65535,     0);\t/* yellow */\n  SetColour( 9, 65535,     0, 65535);\t/* magenta */\n  SetColour(10,  8192,  8192,  8192);\t/* 1/8 gray */\n  SetColour(11, 16384, 16384, 16384);\t/* 2/8 gray */\n  SetColour(12, 24576, 24576, 24576);\t/* 3/8 gray */\n  SetColour(13, 40959, 40959, 40959);\t/* 5/8 gray */\n  SetColour(14, 49151, 49151, 49151);\t/* 6/8 gray */\n  SetColour(15, 57343, 57343, 57343);\t/* 7/8 gray */\n\n  /* additional colours for 8-bit colour */\n  /* 24 more shades of gray (does not repeat 1/8th increments) */\n  SetColour(16,  2048,  2048,  2048);\t/*  1/32 gray */\n  SetColour(17,  4096,  4096,  4096);\t/*  2/32 gray */\n  SetColour(18,  6144,  6144,  6144);\t/*  3/32 gray */\n  SetColour(19, 10240, 10240, 10240);\t/*  5/32 gray */\n  SetColour(20, 12288, 12288, 12288);\t/*  6/32 gray */\n  SetColour(21, 14336, 14336, 14336);\t/*  7/32 gray */\n  SetColour(22, 18432, 18432, 18432);\t/*  9/32 gray */\n  SetColour(23, 20480, 20480, 20480);\t/* 10/32 gray */\n  SetColour(24, 22528, 22528, 22528);\t/* 11/32 gray */\n  SetColour(25, 26624, 26624, 26624);\t/* 13/32 gray */\n  SetColour(26, 28672, 28672, 28672);\t/* 14/32 gray */\n  SetColour(27, 30720, 30720, 30720);\t/* 15/32 gray */\n  SetColour(28, 34815, 34815, 34815);\t/* 17/32 gray */\n  SetColour(29, 36863, 36863, 36863);\t/* 18/32 gray */\n  SetColour(30, 38911, 38911, 38911);\t/* 19/32 gray */\n  SetColour(31, 43007, 43007, 43007);\t/* 21/32 gray */\n  SetColour(32, 45055, 45055, 45055);\t/* 22/32 gray */\n  SetColour(33, 47103, 47103, 47103);\t/* 23/32 gray */\n  SetColour(34, 51199, 51199, 51199);\t/* 25/32 gray */\n  SetColour(35, 53247, 53247, 53247);\t/* 26/32 gray */\n  SetColour(36, 55295, 55295, 55295);\t/* 27/32 gray */\n  SetColour(37, 59391, 59391, 59391);\t/* 29/32 gray */\n  SetColour(38, 61439, 61439, 61439);\t/* 30/32 gray */\n  SetColour(39, 63487, 63487, 63487);\t/* 31/32 gray */\n\n  /* The remainder of colour table defines a colour cube with six steps\n     for each primary colour.  Note that the corners of this cube repeat\n     previous colours, but simplifies the mapping between RGB colours and\n     colour map indices.  The colour cube spans indices 40 through 255.\n  */\n  {\n    int r, g, b;\n    for (r= 0; r < 6; r++)\n      for (g= 0; g < 6; g++)\n\tfor (b= 0; b < 6; b++)\n\t  SetColour(40 + ((36 * r) + (6 * b) + g), (r * 65535) / 5, (g * 65535) / 5, (b * 65535) / 5);\n  }\n# undef SetColour\n}\n\n\nstatic void fb_initDirectColour(_self)\n{\n  /* Create a linear ramp for each colour channel.  Channels can be up\n     to 8 bits wide and of unequal widths.\n  */\n  int rpad= 16 - self->var.red  .length;\n  int gpad= 16 - self->var.green.length;\n  int bpad= 16 - self->var.blue .length;\n\n  struct fb_cmap cmap;\n  unsigned short red, green, blue, transp;\n  unsigned int   i;\n\n  cmap.len   \t= 1;\n  cmap.red   \t= &red;\n  cmap.green \t= &green;\n  cmap.blue  \t= &blue;\n  cmap.transp = &transp;\n  transp = 0;\n  for (i= 0;  i < 256;  ++i)\t/* wraps for channels < 8 bits */\n    {\n      cmap.start= i;\n      red    = (i << rpad);\n      green  = (i << gpad);\n      blue   = (i << bpad);\n      if (-1 == ioctl(self->fd, FBIOPUTCMAP, (void *)&cmap)) fatalError(\"FBIOPUTCMAP\");\n    }\n}\n\n\nstatic void fb_initVisual(_self)\n{\n  if (ioctl(self->fd, FBIOGET_FSCREENINFO, &self->fix))  fatalError(\"FBIOGET FSCREENINFO\");\n  if (ioctl(self->fd, FBIOGET_VSCREENINFO, &self->var))  fatalError(\"FBIOGET VSCREENINFO\");\n\n  self->var.xoffset=  0;\n  self->var.yoffset=  0;\n  self->var.activate= FB_ACTIVATE_NOW;\n  ioctl(self->fd, FBIOPAN_DISPLAY, &self->var);\n\n  self->size= fb_height(self) * self->fix.line_length;\n  self->pitch= self->fix.line_length / self->var.bits_per_pixel * 8;\n\n  DPRINTF(\"%s: %dx%dx%d+%x+%x (%dx%d) %s, rgb %d+%d %d+%d %d+%d pitch %d(%d)\\n\", self->fbName,\n\t  self->var.xres, self->var.yres, self->var.bits_per_pixel, self->var.xoffset, self->var.yoffset,\n\t  self->var.xres_virtual, self->var.yres_virtual,\n\t  visualName(self),\n\t  self->var.red  .offset, self->var.red  .length,\n\t  self->var.green.offset, self->var.green.length,\n\t  self->var.blue .offset, self->var.blue .length,\n\t  self->fix.line_length, self->pitch);\n\n  if (self->var.bits_per_pixel == 8)\n    self->bpp= 8;\n  else\n    self->bpp= self->var.red.length + self->var.green.length + self->var.blue.length;\n\n  if ((24 == self->bpp) && (32 == self->var.bits_per_pixel))\n    self->bpp= 32;\n\n  switch (self->bpp)\n    {\n    case 32:\n      self->copyBits=  \tfb_copyBits_32;\n      self->drawPixel= \tfb_drawPixel_rgb8888;\n      self->getPixel=  \tfb_getPixel_32;\n      self->putPixel=  \tfb_putPixel_32;\n      self->whitePixel= 0xffffffff;\n      self->blackPixel= 0x00000000;\n      break;\n\n    case 16:\n      self->copyBits=  \tfb_copyBits_16;\n      self->drawPixel= \tfb_drawPixel_rgb565;\n      self->getPixel=  \tfb_getPixel_16;\n      self->putPixel=  \tfb_putPixel_16;\n      self->whitePixel= 0xffff;\n      self->blackPixel= 0x0000;\n      break;\n\n    case 15:\n      self->copyBits=   fb_copyBits_15;\n      self->drawPixel=  fb_drawPixel_rgb555;\n      self->getPixel=  \tfb_getPixel_16;\n      self->putPixel=  \tfb_putPixel_16;\n      self->whitePixel= 0x7fff;\n      self->blackPixel= 0x0000;\n      break;\n\n    case 8:\n      self->copyBits=   fb_copyBits_8;\n      self->drawPixel=  fb_drawPixel_rgb332;\n      self->getPixel=  \tfb_getPixel_8;\n      self->putPixel=  \tfb_putPixel_8;\n      self->whitePixel= 0x00;\n      self->blackPixel= 0x01;\n      break;\n\n    default:\n      fprintf(stderr, \"%s: %d bpp (%d+%d+%d) not supported\\n\", self->fbName, self->bpp,\n\t      self->var.red.length, self->var.green.length, self->var.blue.length);\n      exit(1);\n    }\n\n  switch (self->fix.visual)\n    {\n    case FB_VISUAL_TRUECOLOR:\t/* nothing to do */\n      break;\n\n    case FB_VISUAL_DIRECTCOLOR:\n      if (self->bpp > 8)\n\tfb_initDirectColour(self);\n      else\n\t{\n\t  fprintf(stderr, \"%s: DIRECTCOLOR visual not supported at depth %d\\n\", self->fbName, self->bpp);\n\t  exit(1);\n\t}\n      break;\n\n    case FB_VISUAL_PSEUDOCOLOR:\n      if (self->bpp == 8)\n\tfb_initPseudoColour(self);\n      else\n\t{\n\t  fprintf(stderr, \"%s: PSEUDOCOLOR visual not supported at depth %d\\n\", self->fbName, self->bpp);\n\t  exit(1);\n\t}\n      break;\n\n    default:\n      fprintf(stderr, \"%s: %s visual not supported\\n\", self->fbName, visualName(self));\n      exit(1);\n      break;\n    }\n}\n\n\nstatic void fb_initBuffer(_self)\n{\n  assert(self->addr == 0);\n  self->addr= (char *)mmap(0, self->size, PROT_READ | PROT_WRITE, MAP_SHARED, self->fd, 0);\n  if (self->addr == (char *)MAP_FAILED) fatalError(\"mmap\");\n  DPRINTF(\"%s: mapped at %p + %ld\\n\", self->fbName, self->addr, self->size);\n}\n\n\nstatic void fb_freeBuffer(_self)\n{\n  if (self->addr)\n    {\n      munmap(self->addr, self->size);\n      self->addr= 0;\n      DPRINTF(\"%s: unmapped\\n\", self->fbName);\n    }\n}\n\n\nstatic void fb_initGraphics(_self)\n{\n  int x, y;\n  assert(self->kb);\n  kb_initGraphics(self->kb);\n  for (y= 0;  y < fb_height(self);  ++y)\n    for (x= 0;  x < fb_width(self);  ++x)\n      self->putPixel(self, x, y, self->whitePixel);\n}\n\n\nstatic void fb_freeGraphics(_self)\n{\n  if (self->putPixel)\n    {\n      int x, y;\n      for (y= 0;  y < fb_height(self);  ++y)\n\tfor (x= 0;  x < fb_width(self);  ++x)\n\t  self->putPixel(self, x, y, 0);\n    }\n  if (self->kb)\n    kb_freeGraphics(self->kb);\n}\n\n\nstatic void fb_initCursor(_self)\n{\n  self->cursorPosition.x= fb_width(self) / 2;\n  self->cursorPosition.y= fb_height(self) / 2;\n}\n\n\nstatic int fb_open(_self, struct kb *kb, char *fbDev)\n{\n  assert(self->fd == -1);\n  if (fbDev)\n    self->fd= open(self->fbName= fbDev, O_RDWR);\n  else\n    {\n      char *fbs[]= { \"/dev/fb\", \"/dev/fb0\", \"/dev/fb0current\", 0 };\n      int i;\n      for (i= 0;  fbs[i];  ++i)\n\tif ((self->fd= open(self->fbName= fbs[i], O_RDWR)) >= 0)\n\t  break;\n      else\n\tperror(fbs[i]);\n    }\n  if (self->fd < 0)\n    failPermissions(\"framebuffer\");\n\n  self->kb= kb;\n\n  DPRINTF(\"using: %s (%d)\\n\", self->fbName, self->fd);\n\n  fb_initVisual(self);\n  fb_initBuffer(self);\n  fb_initGraphics(self);\n  fb_initCursor(self);\n\n  return 1;\n}\n\n\nstatic void fb_close(_self)\n{\n  fb_freeGraphics(self);\n  fb_freeBuffer(self);\n  if (self->fd >= 0)\n    {\n      close(self->fd);\n      DPRINTF(\"%s (%d) closed\\n\", self->fbName, self->fd);\n      self->fd= -1;\n    }\n  self->kb= 0;\n}\n\n\nstatic struct fb *fb_new(void)\n{\n  _self= (struct fb *)calloc(1, sizeof(struct fb));\n  if (!self) outOfMemory();\n  self->fd=  -1;\n  return self;\n}\n\n\nstatic void fb_delete(_self)\n{\n  assert(self->addr ==  0);\n  assert(self->fd   == -1);\n  free(self);\n}\n\n\n#undef _self\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-fbdev/sqUnixFBDevKeyboard.c",
    "content": "/* sqUnixFBDevKeyboard.c -- abstraction over the keyboard\n * \n * Author: Ian Piumarta <ian.piumarta@squeakland.org>\n * \n * Last edited: 2005-03-17 21:35:14 by piumarta on squeak.hpl.hp.com\n */\n\n\n/* The framebuffer display driver was donated to the Squeak community by:\n * \n *\tWeather Dimensions, Inc.\n *\t13271 Skislope Way, Truckee, CA 96161\n *\thttp://www.weatherdimensions.com\n *\n * Copyright (C) 2003-2005 Ian Piumarta\n * All Rights Reserved.\n * \n * This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n */\n\n\n#include <termios.h>\n#include <sys/ioctl.h>\n\n#include <linux/keyboard.h>\n#include <linux/kd.h>\n#include <linux/vt.h>\n\n\n#define _self\tstruct kb *self\n\n\ntypedef void (*kb_callback_t)(int key, int up, int mod);\n\nstruct kb\n{\n  char\t\t\t *kbName;\n  int\t\t\t  fd;\n  int\t\t\t  kbMode;\n  struct termios\t  tcAttr;\n  int\t\t\t  vtActive;\n  int\t\t\t  vtLock;\n  int\t\t\t  vtSwitch;\n  int\t\t\t  state;\n  kb_callback_t\t\t  callback;\n  unsigned short\t**keyMaps;\n};\n\n#include \"sqUnixFBDevKeymap.c\"\n\n\nstatic void updateModifiers(int kstate)\n{\n  modifierState= 0;\n  if (kstate & (1 << KG_SHIFT))\tmodifierState |= ShiftKeyBit;\n  if (kstate & (1 << KG_CTRL))\tmodifierState |= CtrlKeyBit;\n  if (kstate & (1 << KG_ALT))\tmodifierState |= CommandKeyBit;\n  if (kstate & (1 << KG_ALTGR))\tmodifierState |= OptionKeyBit;\n  DPRINTF(\"state %02x mod %02x\\n\", kstate, modifierState);\n}\n\n\nstatic void kb_chvt(_self, int vt)\n{\n  if (ioctl(self->fd, VT_ACTIVATE, vt))\n    perror(\"chvt: VT_ACTIVATE\");\n  else\n    {\n      while (ioctl(self->fd, VT_WAITACTIVE, vt))\n\t{\n\t  if (EINTR == errno)\n\t    continue;\n\t  perror(\"VT_WAITACTIVE\");\n\t  break;\n\t}\n      updateModifiers(self->state= 0);\n    }\n}\n\n\nstatic void kb_post(_self, int code, int up)\n{\n  if (code == 127) code= 8;\t\t//xxx OPTION!!!\n  self->callback(code, up, modifierState);\n}\n\n\nstatic void kb_translate(_self, int code, int up)\n{\n  static int prev= 0;\n  unsigned short *keyMap= self->keyMaps[self->state];\n  int rep= (!up) && (prev == code);\n  prev= up ? 0 : code;\n\n  DPRINTF(\"+++ code %d up %d prev %d rep %d map %p\\n\", code, up, prev, rep, keyMap);\n\n  if (keyMap)\n    {\n      int sym=  keyMap[code];\n      int type= KTYP(sym);\n      DPRINTF(\"+++ sym %x (%02x) type %d\\n\", sym, sym & 255, type);\n      sym &= 255;\n      if (type >= 0xf0)\t\t// shiftable\n\ttype -= 0xf0;\n      if (KT_LETTER == type)\t// lockable\n\ttype= KT_LATIN;\n      DPRINTF(\"+++ type %d\\n\", type);\n      switch (type)\n\t{\n\tcase KT_LATIN:\n\tcase KT_META:\n\t  kb_post(self, sym, up);\n\t  break;\n\n\tcase KT_SHIFT:\n\t  if      (rep) break;\n\t  else if (up)  self->state &= ~(1 << sym);\n\t  else          self->state |=  (1 << sym);\n\t  updateModifiers(self->state);\n\t  break;\n\n\tcase KT_FN:\n\tcase KT_SPEC:\n\tcase KT_CUR:\n\t  switch (K(type,sym))\n\t    {\n\t      // FN\n\t    case K_FIND:\tkb_post(self,  1, up);\tbreak;\t// home\n\t    case K_INSERT:\tkb_post(self,  5, up);\tbreak;\n\t    case K_SELECT:\tkb_post(self,  4, up);\tbreak;\t// end\n\t    case K_PGUP:\tkb_post(self, 11, up);\tbreak;\n\t    case K_PGDN:\tkb_post(self, 12, up);\tbreak;\n\t      // SPEC\n\t    case K_ENTER:\tkb_post(self, 13, up);\tbreak;\n\t      // CUR\n\t    case K_DOWN:\tkb_post(self, 31, up);\tbreak;\n\t    case K_LEFT:\tkb_post(self, 28, up);\tbreak;\n\t    case K_RIGHT:\tkb_post(self, 29, up);\tbreak;\n\t    case K_UP:\t\tkb_post(self, 30, up);\tbreak;\n\t    }\n\t  break;\n\n\tcase KT_CONS:\n\t  if (self->vtSwitch && !self->vtLock)\n\t    kb_chvt(self, sym + 1);\n\t  break;\n\n\tdefault:\n\t  if (type > KT_SLOCK)\n\t    DPRINTF(\"ignoring unknown scancode %d.%d\\n\", type, sym);\n\t  break;\n\t}\n    }\n}\n\n\nstatic void kb_noCallback(int k, int u, int s) {}\n\n\nstatic int kb_handleEvents(_self)\n{\n  DPRINTF(\"+++ kb_handleEvents\\n\");\n  while (fdReadable(self->fd, 0))\n    {\n      unsigned char buf;\n      if (1 == read(self->fd, &buf, 1))\n\t{\n\t  DPRINTF(\"+++ kb_translate %3d %02x + %d\\n\", buf & 127, buf & 127, (buf >> 7) & 1);\n\t  kb_translate(self, buf & 127, (buf >> 7) & 1);\n\t}\n    }\n  return 0;\n}\n\n\nstatic void kbHandler(int fd, void *self, int flags)\n{\n  kb_handleEvents((struct kb *)self);\n  aioHandle(fd, kbHandler, AIO_RX);\n}\n\n\nstatic kb_callback_t kb_setCallback(_self, kb_callback_t callback)\n{\n  kb_callback_t old= self->callback;\n  if (callback)\n    {\n      self->callback= callback;\n      aioEnable(self->fd, self, AIO_EXT);\n      aioHandle(self->fd, kbHandler, AIO_RX);\n    }\n  else\n    {\n      aioDisable(self->fd);\n      self->callback= kb_noCallback;\n    }\n  return old;\n}\n\n\nstatic void kb_bell(_self)\n{\n  ioctl(self->fd, KDMKTONE, (100 << 16) | ((1193190 / 400) & 0xffff));\n}\n\n\nstatic void sigusr1(int sig)\n{\n  _self= kb;\t\t\t\t\t// ugh\n  struct vt_stat v;\n\n  if (ioctl(self->fd, VT_GETSTATE, &v))\t\tfatalError(\"VT_GETSTATE\");\n  if (self->vtActive && !self->vtLock)\n    {\n      ioctl(self->fd, VT_RELDISP, 1);\n      self->vtActive= 0;\n      updateModifiers(self->state= 0);\n    }\n  else\n    {\n      extern sqInt fullDisplayUpdate(void);\n      self->vtActive= 1;\n      updateModifiers(self->state= 0);\n      fullDisplayUpdate();\n    }\n}\n\n\nstatic void kb_initGraphics(_self)\n{\n  struct vt_mode vt;\n\n  if (ioctl(self->fd, KDSETMODE, KD_GRAPHICS)) perror(\"KDSETMODE(KDGRAPHICS)\");\n    \n  if (ioctl(self->fd, VT_GETMODE, &vt) < 0)\n    perror(\"VT_GETMODE\");\n  else\n    {\n      struct sigaction sa;\n      sa.sa_handler= sigusr1;\n      sigemptyset(&sa.sa_mask);\n      sa.sa_flags= 0;\n#    if !defined(__ia64)\n      sa.sa_restorer= 0;\n#    endif\n      sigaction(SIGUSR1, &sa, 0);\n      vt.mode=   VT_PROCESS;\n      vt.relsig= SIGUSR1;\n      vt.acqsig= SIGUSR1;\n      if (ioctl(self->fd, VT_SETMODE, &vt) < 0) \n\tperror(\"VT_SETMODE\");\n    }\n}\n\nstatic void kb_freeGraphics(_self)\n{\n  if (ioctl(self->fd, KDSETMODE, KD_TEXT)) perror(\"KDSETMODE(KDTEXT)\");\n}\n\n\nvoid kb_open(_self, int vtSwitch, int vtLock)\n{\n  struct termios nattr;\n\n  assert(self->fd == -1);\n  {\n    char *cons[]= { \"/dev/console\", \"/dev/tty0\", 0 };\n    int i;\n    for (i= 0;  cons[i];  ++i)\n      if ((self->fd= open(self->kbName= cons[i], O_RDWR | O_NDELAY)) >= 0)\n\tbreak;\n      else\n\tperror(cons[i]);\n  }\n  if (self->fd < 0)\n    if ((self->fd= open(self->kbName= ttyname(0), O_RDWR | O_NDELAY)) < 0)\n      perror(self->kbName);\n  if (self->fd < 0)\n    failPermissions(\"console\");\n  {\n    struct vt_stat v;\n    static char vtname[32];\n    if (ioctl(self->fd, VT_GETSTATE, &v))\n      fatalError(\"VT_GETSTATE\");\n    close(self->fd);\n    sprintf(vtname, \"/dev/tty%d\", v.v_active);\n    if ((self->fd= open(self->kbName= vtname, O_RDWR | O_NDELAY)) < 0)\n      fatalError(vtname);\n    self->vtActive= 1;\n    self->vtSwitch= vtSwitch;\n    self->vtLock=   vtLock;\n  }\n\n  if (ioctl(self->fd, KDGKBMODE, &self->kbMode))\tperror(\"KDGKBMODE\");\n  if (ioctl(self->fd, KDSKBMODE, K_MEDIUMRAW))\t\tperror(\"KDSKBMODE(K_MEDIUMRAW)\");\n  tcgetattr(self->fd, &self->tcAttr);\n\n  nattr= self->tcAttr;\n  nattr.c_iflag= (IGNPAR | IGNBRK) & (~PARMRK) & (~ISTRIP);\n  nattr.c_cflag= CREAD | CS8;\n  nattr.c_lflag= 0;\n  nattr.c_cc[VTIME]= 0;\n  nattr.c_cc[VMIN]= 1;\n  cfsetispeed(&nattr, 9600);\n  cfsetospeed(&nattr, 9600);\n  tcsetattr(self->fd, TCSANOW, &nattr);\n\n  kb_initKeyMap(self, kmPath);\n}\n\n\nvoid kb_close(_self)\n{\n  if (self->fd >= 0)\n    {\n      ioctl(self->fd, KDSKBMODE, self->kbMode);\n      tcsetattr(self->fd, TCSANOW, &self->tcAttr);\n      close(self->fd);\n      DPRINTF(\"%s (%d) closed\\n\", self->kbName, self->fd);\n      self->fd= -1;\n    }\n}\n\n\nstruct kb *kb_new(void)\n{\n  _self= (struct kb *)calloc(1, sizeof(struct kb));\n  self->fd= -1;\n  self->callback= kb_noCallback;\n  return self;\n}\n\n\nvoid kb_delete(_self)\n{\n  free(self);\n}\n\n\n#undef _self\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-fbdev/sqUnixFBDevKeymap.c",
    "content": "/* sqUnixFBDevKeymap.c -- load a console keymap file\n * \n * Author: Ian Piumarta <ian.piumarta@inria.fr>\n * \n * Last edited: 2003-08-21 16:03:28 by piumarta on felina.inria.fr\n */\n\n\n/* The framebuffer display driver was donated to the Squeak community by:\n * \n *\tWeather Dimensions, Inc.\n *\t13271 Skislope Way, Truckee, CA 96161\n *\thttp://www.weatherdimensions.com\n *\n * Copyright (C) 2003 Ian Piumarta\n * All Rights Reserved.\n * \n * This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n */\n\n\n#define\tkmprintf(args...)\n\n\nstatic void kb_freeKeys(_self)\n{\n  int column;\n  for (column= 0;  column < MAX_NR_KEYMAPS;  ++column)\n    if (self->keyMaps[column])\n      free(self->keyMaps[column]);\n  free(self->keyMaps);\n  self->keyMaps= 0;\n}\n\n\nstatic int kb_loadKeys(_self, char *mapfile)\n{\n  char\t\t   line[1024];\n  char\t\t  *err;\n  int\t\t   mapline= 0;\n  FILE\t\t  *fp;\n  char\t\t  *field;\n  char\t\t  *end;\n  int\t\t   column;\n\n  if (!(fp= fopen(mapfile, \"r\")))\n    {\n      perror(mapfile);\n      return 0;\n    }\n\n  if (!(self->keyMaps= (unsigned short **)calloc(MAX_NR_KEYMAPS, sizeof(unsigned short *))))\n    outOfMemory();\n\n  if (!fgets(line, sizeof(line), fp)) goto noKeyMaps;\n  ++mapline;\n  kmprintf(\"<%s\", line);\n  if (strncmp(line, \"keymaps \", 8)) goto noKeyMaps;\n  kmprintf(\">KEYMAPS\");\n\n  field= line + 8;\n  for (;;)\n    {\n      int last;\n      column= last= strtol(field, &end, 0);\n      if (field == end) break;\n      field= end;\n      kmprintf(\" [%d\", column);\n      if ('-' == *field)\n\t{\n\t  ++field;\n\t  last= strtol(field, &end, 0);\n\t  if (field == end) goto badKeyMaps;\n\t  field= end;\n\t}\n      kmprintf(\"-%d]\", last);\n      while (column <= last)\n\t{\n\t  kmprintf(\" %d\", column);\n\t  self->keyMaps[column]= (unsigned short *)calloc(NR_KEYS, sizeof(unsigned short));\n\t  if (!self->keyMaps[column]) outOfMemory();\n\t  ++column;\n\t}\n      if (',' == *field) ++field;\n    }\n\n  kmprintf(\"\\n\");\n\n  while (!feof(fp))\n    {\n      int   code;\n      int   offset;\n      if (!fgets(line, sizeof(line), fp)) break;\n      ++mapline;\n      kmprintf(\"<%s\", line);\n      if (1 != sscanf(line, \"keycode %d =%n\", &code, &offset)) goto noKeyCode;\n      kmprintf(\">KEYCODE %d\", code);\n      field= line + offset;\n      column= 0;\n      for (;;)\n\t{\n\t  long sym= strtol(field, &end, 0);\n\t  if (field == end) break;\n\t  while ((!self->keyMaps[column]) && (column < MAX_NR_KEYMAPS))\n\t    {\n\t      kmprintf(\"  -  \");\n\t      ++column;\n\t    }\n\t  if (column > 255) goto tooManySyms;\n\t  self->keyMaps[column][code]= sym;\n\t  kmprintf(\" %04lx\", sym);\n\t  ++column;\n\t  field= end;\n\t}\n      kmprintf(\"\\n\");\n    }\n  fclose(fp);\n\n  return 1;\n\n  for (;;)\n    {\n    noKeyMaps:\t err= \"no 'keymaps' entry\";\t\t\tbreak;\n    badKeyMaps:\t err= \"bad 'keymaps' entry\";\t\t\tbreak;\n    noKeyCode:\t err= \"bad 'keycode' entry\";\t\t\tbreak;\n    tooManySyms: err= \"too many columns to fit declared table\";\tbreak;\n    }\n  fprintf(stderr, \"%s:%d: %s\\n\", mapfile, mapline, err);\n\n  fclose(fp);\n  kb_freeKeys(self);\n\n  return 0;\n}\n\n\nstatic void kb_loadKernelKeyMap(_self)\n{\n  int map;\n\n  DPRINTF(\"loading kernel keymap\\n\");\n\n  if (!(self->keyMaps= (unsigned short **)calloc(MAX_NR_KEYMAPS, sizeof(unsigned short *))))\n    outOfMemory();\n\n  for (map= 0;  map < MAX_NR_KEYMAPS;  ++map)\n    {\n      struct kbentry kb;\n      int key;\n\n      kb.kb_index= 0;\n      kb.kb_table= map;\n\n      if (ioctl(self->fd, KDGKBENT, (unsigned long)&kb))\n\tfatalError(\"KDGKBENT\");\n      if (K_NOSUCHMAP == kb.kb_value)\n\tcontinue;\n\n      if (!(self->keyMaps[map]= (unsigned short *)calloc(NR_KEYS, sizeof(unsigned short))))\n\toutOfMemory();\n\n      for (key= 0;  key < NR_KEYS;  ++key)\n\t{\n\t  kb.kb_index= key;\n\t  if (ioctl(self->fd, KDGKBENT, (unsigned long)&kb))\n\t    fatalError(\"KDGKBENT\");\n\t  self->keyMaps[map][key]= kb.kb_value;\n\t}\n    }\n\n  DPRINTF(\"kernel keymap loaded\\n\");\n}\n\n\nstatic void kb_initKeyMap(_self, char *mapfile)\n{\n  if (!mapfile)\n    kb_loadKernelKeyMap(self);\n  else if ((kb_loadKeys(self, mapfile)))\n    DPRINTF(\"using keymap '%s'\\n\", mapfile);\n  else\n    fatal(\"could not load keymap '%s'\\n\", mapfile);\n}\n\n\n#undef kmprintf\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-fbdev/sqUnixFBDevMouse.c",
    "content": "/* sqUnixFBDevMouse.c -- abstraction over the mouse (Squeak!)\n * \n * Author: Ian.Piumarta@INRIA.Fr\n * \n * Last edited: 2003-08-21 15:02:15 by piumarta on felina.inria.fr\n */\n\n\n/* The framebuffer display driver was donated to the Squeak community by:\n * \n *\tWeather Dimensions, Inc.\n *\t13271 Skislope Way, Truckee, CA 96161\n *\thttp://www.weatherdimensions.com\n *\n * Copyright (C) 2003 Ian Piumarta\n * All Rights Reserved.\n * \n * This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n */\n\n\n#define _self\tstruct ms *self\n\n\nstruct ms;\n\ntypedef void (*ms_callback_t)(int buttons, int dx, int dy);\ntypedef void (*ms_init_t)(_self);\ntypedef void (*ms_handler_t)(_self);\n\nstruct ms\n{\n  char\t\t*msName;\n  int\t\t fd;\n  ms_init_t\t init;\n  ms_handler_t\t handleEvents;\n  ms_callback_t  callback;\n  unsigned char\t buf[3*64];\n  int\t\t bufSize;\n};\n\n\nstatic int ms_read(_self, unsigned char *out, int limit, int quant, int usecs)\n{\n  unsigned char *buf=   self->buf;\n  int\t\t count= self->bufSize;\n  int\t\t len=   min(limit, sizeof(self->buf));\n\n  len -= count;\n  buf += count;\n\n  while ((len > 0) && fdReadable(self->fd, usecs))\n    {\n      int n= read(self->fd, buf, len);\n      if (n > 0)\n\t{\n\t  buf   += n;\n\t  count += n;\n\t  len   -= n;\n\t}\n      if ((count % quant) == 0)\n\tbreak;\n    }\n\n  self->bufSize= count;\n  count= min(count, limit);\n  count= (count / quant) * quant;\n\n  if (count)\n    {\n      memcpy(out, self->buf, count);\n#    if DEBUG_AN_AWFUL_LOT\n      {\n\tint i= 0;\n\twhile (i < count)\n\t  {\n\t    DPRINTF(\"<%02x\\n\", out[i]);\n\t    ++i;\n\t  }\n      }\n#    endif\n      self->bufSize -= count;\n      if (self->bufSize)\n\tmemcpy(self->buf, self->buf + count, self->bufSize);\n    }\n\n  return count;\n}\n\n\n#include \"sqUnixFBDevMousePS2.c\"\n#include \"sqUnixFBDevMouseADB.c\"\n\n\nstatic void ms_noCallback(int b, int x, int y) {}\n\n\nstatic void msHandler(int fd, void *data, int flags)\n{\n  _self= (struct ms *)data;\n  self->handleEvents(self);\n  aioHandle(fd, msHandler, AIO_RX);\n}\n\n\nstatic ms_callback_t ms_setCallback(_self, ms_callback_t callback)\n{\n  ms_callback_t old= self->callback;\n  if (callback)\n    {\n      self->callback= callback;\n      aioEnable(self->fd, self, AIO_EXT);\n      aioHandle(self->fd, msHandler, AIO_RX);\n    }\n  else\n    {\n      aioDisable(self->fd);\n      self->callback= ms_noCallback;\n    }\n  return old;\n}\n\n\nstatic int ms_open(_self, char *msDev, char *msProto)\n{\n  ms_init_t init= 0;\n  ms_handler_t handler= 0;\n\n  assert(self->fd == -1);\n\n  if (msDev)\n    self->fd= open(self->msName= msDev, O_RDWR);\n  else\n    {\n      static struct _mstab {\n  \t  char *dev;\t\tchar *proto;\n      } mice[]=\t{\n\t{ \"/dev/psaux\",\t\t\"ps2\"\t},\n\t{ \"/dev/input/mice\",\t\"ps2\"\t},\n\t{ \"/dev/adbmouse\",\t\"adb\"\t},\n\t{ 0, 0 }\n      };\n      int i;\n      for (i= 0;  mice[i].dev;  ++i)\n\tif ((self->fd= open(self->msName= mice[i].dev,  O_RDWR)) >= 0)\n\t  {\n\t    if (!msProto)\n\t      msProto= mice[i].proto;\n\t    break;\n\t  }\n\telse\n\t  perror(mice[i].dev);\n    }\n  if (self->fd < 0)\n    failPermissions(\"mouse\");\n\n  if (msProto)\n    {\n      static struct _mptab {\n\tchar *name;\tms_init_t init;\tms_handler_t handler;\n      } protos[]= {\n\t{ \"ps2\",\tms_ps2_init,\tms_ps2_handleEvents,\t},\n\t{ \"adb\",\tms_adb_init,\tms_adb_handleEvents,\t},\n\t{ 0, 0, 0 }\n      };\n      int i;\n      for (i= 0;  protos[i].name;  ++i)\n\tif (!strcmp(msProto, protos[i].name))\n\t  {\n\t    init=    protos[i].init;\n\t    handler= protos[i].handler;\n\t    break;\n\t  }\n      if (!init)\n\t{\n\t  fprintf(stderr, \"unknown mouse protocol: '%s'\\n\", msProto);\n\t  fprintf(stderr, \"supported protocols:\");\n\t  for (i= 0;  protos[i].name;  ++i)\n\t    fprintf(stderr, \" %s\", protos[i].name);\n\t  fprintf(stderr, \"\\n\");\n\t  exit(1);\n\t}\n    }\n\n  DPRINTF(\"using: %s (%d), %s\\n\", self->msName, self->fd, msProto);\n\n  self->init= init;\n  self->handleEvents= handler;\n\n  return 1;\n}\n\n\nstatic void ms_close(_self)\n{\n  if (self->fd >= 0)\n    {\n      close(self->fd);\n      DPRINTF(\"%s (%d) closed\\n\", self->msName, self->fd);\n      self->fd= -1;\n    }\n}\n\n\nstatic struct ms *ms_new(void)\n{\n  _self= (struct ms *)calloc(1, sizeof(struct ms));\n  if (!self) outOfMemory();\n  self->fd= -1;\n  self->callback= ms_noCallback;\n  return self;\n}\n\n\nstatic void ms_delete(_self)\n{\n  free(self);\n}\n\n\n#undef _self\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-fbdev/sqUnixFBDevMouseADB.c",
    "content": "/* sqUnixFBDevMouseADB.c -- simplicity unique to the Apple Desktop Bus mouse\n * \n * Author: Ian.Piumarta@INRIA.Fr\n * \n * Last edited: 2003-08-20 01:14:47 by piumarta on felina.inria.fr\n */\n\n\n/* The framebuffer display driver was donated to the Squeak community by:\n * \n *\tWeather Dimensions, Inc.\n *\t13271 Skislope Way, Truckee, CA 96161\n *\thttp://www.weatherdimensions.com\n *\n * Copyright (C) 2003 Ian Piumarta\n * All Rights Reserved.\n * \n * This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n */\n\n\nstatic void ms_adb_init(_self) { DPRINTF(\"ADB init\\n\"); }\n\n\nstatic void ms_adb_handleEvents(_self)\n{\n  unsigned char cmd[3];\n\n  while (3 == ms_read(self, cmd, 3, 3, 0))\n    if (0x80 == (cmd[0] & 0xf8))\n      self->callback((cmd[0] & 7) ^ 7, (signed char)cmd[1], -(signed char)cmd[2]);\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-fbdev/sqUnixFBDevMousePS2.c",
    "content": "/* sqUnixFBDevMousePS2.c -- weirdness unique to PS/2 mice\n * \n * Author: Ian.Piumarta@INRIA.Fr\n * \n * Last edited: 2003-10-31 11:42:56 by piumarta on emilia.inria.fr\n */\n\n/* The framebuffer display driver was donated to the Squeak community by:\n * \n *\tWeather Dimensions, Inc.\n *\t13271 Skislope Way, Truckee, CA 96161\n *\thttp://www.weatherdimensions.com\n *\n * Copyright (C) 2003 Ian Piumarta\n * All Rights Reserved.\n * \n * This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n */\n\n#define PS2_DISABLE_DELAY   100*1000\n#define PS2_RESET_DELAY\t   1500*1000\n#define PS2_FLUSH_DELAY\t    100*1000\n#define PS2_READ_DELAY\t    100*1000\n#define PS2_SEND_DELAY\t    100*1000\n\n#define\tPS2_RESET\t\t0xff\n#define\tPS2_RESEND\t\t0xfe\n#define\tPS2_ERROR\t\t0xfc\n#define\tPS2_OK\t\t\t0xfa\n#define\tPS2_SET_DEFAULTS\t0xf6\n#define\tPS2_DISABLE\t\t0xf5\n#define\tPS2_ENABLE\t\t0xf4\n#define\tPS2_SET_SAMPLE_RATE\t0xf3\n#define\tPS2_GET_ID\t\t0xf2\n#define\tPS2_SET_REMOTE_MODE\t0xf0\n#define\tPS2_SET_WRAP_MODE\t0xee\n#define\tPS2_RESET_WRAP_MODE\t0xec\n#define\tPS2_READ_DATA\t\t0xeb\n#define\tPS2_SET_STREAM_MODE\t0xea\n#define\tPS2_STATUS_REQUEST\t0xe9\n#define\tPS2_SELFTEST_OK\t\t0xaa\n\n\nstatic void ms_ps2_flush(_self)\n{\n  unsigned char buf[32];\n  DPRINTF(\"%s: flush\\n\", self->msName);\n  while (ms_read(self, buf, sizeof(buf), 1, PS2_FLUSH_DELAY))\n    ;\n}\n\n\nstatic void ms_ps2_handleEvents(_self)\n{\n  unsigned char buf[3*8];\n  int\t\tn;\n  \n  if ((n= ms_read(self, buf, sizeof(buf), 3, PS2_READ_DELAY)) >= 3)\n    {\n      unsigned char *cmd= buf;\n      while (n >= 3)\n\t{\n\t  int b= 0, dx, dy;\n\t  // The protocol requires the top 2 bits clear and bit 3 set.\n\t  // Some Micro$oft mice violate this, but any luser stupid\n\t  // enough to buy a M$ mouse deserves what they get.\n\t  if (0x08 != (cmd[0] & 0xc8))\n\t    {\n\t      fprintf(stderr, \"%s: illegal command: %02x %02x %02x\\n\", self->msName,\n\t\t      cmd[0], cmd[1], cmd[2]);\n\t      ms_ps2_flush(self);\t// resync the stream\n\t      return;\n\t    }\n\t  if (cmd[0] & 1) b |= RedButtonBit;\n\t  if (cmd[0] & 2) b |= BlueButtonBit;\n\t  if (cmd[0] & 4) b |= YellowButtonBit;\n\t  dx= cmd[1];  if (cmd[0] & 0x10) dx -= 256;\n\t  dy= cmd[2];  if (cmd[0] & 0x20) dy -= 256;\n\t  dy= -dy;\n\t  self->callback(b, dx, dy);\n\t  n -= 3;  cmd += 3;\n\t}\n    }\n}\n\n\nstatic int ms_ps2_send(_self, unsigned char *command, int len)\n{\n  unsigned char buf[1];\n  int i;\n  DPRINTF(\"%s: send\\n\", self->msName);\n  for (i= 0;  i < len;  ++i)\n    {\n    resend:\n      write(self->fd, command + i, 1);\n      DPRINTF(\">%02x\\n\", command[i]);\n      if (1 != ms_read(self, buf, 1, 1, PS2_SEND_DELAY))\n\t{\n\t  DPRINTF(\"%s: send failed\\n\", self->msName);\n\t  return 0;\n\t}\n      switch (buf[0])\n\t{\n\tcase PS2_OK:\n\tcase PS2_SELFTEST_OK:\t/* /dev/input/mice emulation is broken */\n\t  break;\n\tcase PS2_ERROR:\n\t  fprintf(stderr, \"%s: error response in send\\n\", self->msName);\n\t  return 0;\n\tcase PS2_RESEND:\n\t  DPRINTF(\"%s: resend\\n\", self->msName);\n\t  goto resend;\n\tdefault:\n\t  fprintf(stderr, \"%s: illegal response %02x in send\\n\", self->msName, buf[0]);\n\t  break;\n\t}\n    }\n  return 1;\n}\n\n\nstatic void ms_ps2_disable(_self)\n{\n  unsigned char command[]= { PS2_DISABLE };\n  DPRINTF(\"%s: disable\\n\", self->msName);\n  write(self->fd, command, 1);\n  DPRINTF(\">%02x\\n\", command[0]);\n  while (1 == ms_read(self, command, 1, 1, PS2_DISABLE_DELAY))\n    if (PS2_OK == command[0])\n      break;\n}\n\n\nstatic int ms_ps2_enable(_self)\n{\n  unsigned char command[]= { PS2_ENABLE };\n  DPRINTF(\"%s: enable\\n\", self->msName);\n  return ms_ps2_send(self, command, sizeof(command));\n}\n\n\nstatic int ms_ps2_reset(_self)\n{\n  unsigned char command[]= { PS2_RESET }, buf[2];\n  DPRINTF(\"%s: reset\\n\", self->msName);\n  if (!ms_ps2_send(self, command, sizeof(command)))\n    return -1;\n  if (2 == ms_read(self, buf, 2, 2, PS2_RESET_DELAY))\n    {\n      DPRINTF(\"%s: response %02x %02x\\n\", self->msName, buf[0], buf[1]);\n      switch (buf[0])\n\t{\n\tcase PS2_SELFTEST_OK:\n\t  return buf[1];\t// mouse device id\n\t  break;\n\tcase PS2_ERROR:\n\t  fprintf(stderr, \"%s: self-test failed\\n\", self->msName);\n\t  break;\n\tdefault:\n\t  DPRINTF(\"%s: bad response\\n\", self->msName);\n\t  break;\n\t}\n    }\n  /* /dev/input/mice emulation returns PS2_SELFTEST_OK where send()\n     expects PS2_OK, causing control to fall through to here.  we pick\n     up the mouse id immediately in the flush(), so the only harm done\n     is a misleading \"reset failed\" message while debugging.  */\n  ms_ps2_flush(self);\n  DPRINTF(\"%s: reset failed\\n\", self->msName);\n  return -1;\n}\n\n\nstatic void ms_ps2_init(_self)\n{\n  int id;\n  ms_ps2_disable(self);\n  id= ms_ps2_reset(self);\n  DPRINTF(\"%s: mouse id %02x\\n\", self->msName, id);\n  ms_ps2_enable(self);\n}\n\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-fbdev/sqUnixFBDevUtil.c",
    "content": "/* sqUnixFBDevUtil.c -- sundries used in more than one place\n * \n * Author: Ian Piumarta  <ian.piumarta@inria.fr>\n * \n * Last edited: 2003-08-20 01:11:12 by piumarta on felina.inria.fr\n */\n\n\nstatic int fdReadable(int fd, int usecs)\n{\n  fd_set fds;\n  struct timeval tv;\n  FD_ZERO(&fds);\n  FD_SET(fd, &fds);\n  tv.tv_sec=  usecs / 1000000;\n  tv.tv_usec= usecs % 1000000;\n  for (;;)\n    {\n      int err= select(fd + 1, &fds, 0, 0, &tv);\n      if ((err < 0) && (errno == EINTR))\n\tcontinue;\n      return (err > 0);\n    }\n}\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-null/Makefile.inc",
    "content": "XCPPFLAGS=\t-I$(topdir)/platforms/unix/plugins/B3DAcceleratorPlugin\nXCFLAGS=\t$(WFLAGS) $(X_CFLAGS) $(X_INCLUDES)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-null/build.cmake",
    "content": "EXPECT_UNDEFINED_SYMBOLS ()\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-display-null/sqUnixDisplayNull.c",
    "content": "#include \"sq.h\"\n#include \"sqaio.h\"\n\n#include \"SqDisplay.h\"\n#include \"sqUnixGlobals.h\"\n\nstatic char *display_winSystemName(void) { return \"none\"; }\nstatic void  display_winInit(void) {}\nstatic void  display_winOpen(void) {}\nstatic void  display_winSetName(char *title) {}\nstatic int   display_winImageFind(char *imageName, int size) { return 0; }\nstatic void  display_winImageNotFound(void) {}\nstatic void  display_winExit(void) {}\n\n\nstatic sqInt display_ioFormPrint(sqInt b, sqInt w, sqInt h, sqInt d, double hS, double vS, sqInt ls)\n{\n  return 0;\n}\n\nstatic sqInt display_ioBeep(void) { return 0; }\n\nstatic sqInt display_ioRelinquishProcessorForMicroseconds(sqInt microSeconds)\n{\n  aioSleepForUsecs(microSeconds);\n  return 0;\n}\n\nstatic sqInt display_ioProcessEvents(void)\n{\n  aioPoll(0);\n  return 0;\n}\n\nstatic sqInt display_ioScreenDepth(void)\n{\n  return 1;\n}\n\nstatic sqInt display_ioScreenSize(void)\n{\n  int sws= getSavedWindowSize();\n  return sws ? sws : ((64 << 16) | 64);\n}\n\nstatic sqInt display_ioSetCursorWithMask(sqInt bits, sqInt mask, sqInt x, sqInt y)\n{\n  return 0;\n}\n\nstatic sqInt display_ioSetCursorARGB(sqInt cursorBitsIndex, sqInt extentX, sqInt extentY, sqInt offsetX, sqInt offsetY)\n{\n  return 0;\n}\n\nstatic sqInt display_ioSetFullScreen(sqInt fullScreen)\n{\n  return 0;\n}\n\nstatic sqInt display_ioForceDisplayUpdate(void)\n{\n  return 0;\n}\n\nstatic sqInt display_ioShowDisplay(sqInt bits, sqInt w, sqInt h, sqInt d, sqInt l, sqInt r, sqInt t, sqInt b)\n{\n  return 0;\n}\n\nstatic sqInt display_ioHasDisplayDepth(sqInt i)\n{\n  return 1;\n}\n\nstatic sqInt display_ioSetDisplayMode(sqInt w, sqInt h, sqInt d, sqInt fullscreenFlag)\n{\n  return 0;\n}\n\nstatic sqInt display_clipboardSize(void)\n{\n  return 0;\n}\n\nstatic sqInt display_clipboardWriteFromAt(sqInt count, sqInt byteArrayIndex, sqInt startIndex)\n{\n  return 0;\n}\n\nstatic sqInt display_clipboardReadIntoAt(sqInt count, sqInt byteArrayIndex, sqInt startIndex)\n{\n  return 0;\n}\n\nstatic char **display_clipboardGetTypeNames(void)\n{\n  return 0;\n}\n\nstatic sqInt display_clipboardSizeWithType(char *typeName, int nTypeName)\n{\n  return 0;\n}\n\nstatic void display_clipboardWriteWithType(char *data, size_t ndata, char *typeName, size_t nTypeName, int isDnd, int isClaiming)\n{\n  return;\n}\n\nstatic sqInt display_dndOutStart(char *types, int ntypes)\t{ return 0; }\nstatic void  display_dndOutSend (char *bytes, int nbytes)\t{ return  ; }\nstatic sqInt display_dndOutAcceptedType(char *buf, int nbuf)\t{ return 0; }\nstatic sqInt display_dndReceived(char *fileName)\t{ return 0; }\n\nstatic sqInt display_ioGetButtonState(void)\t\t{ return 0; }\nstatic sqInt display_ioPeekKeystroke(void)\t\t{ return 0; }\nstatic sqInt display_ioGetKeystroke(void)\t\t{ return 0; }\nstatic sqInt display_ioGetNextEvent(sqInputEvent *evt)\t{ return 0; }\nstatic sqInt display_ioMousePoint(void)\t\t\t{ return 0; }\n\nstatic void  *display_ioGetDisplay(void)\t\t\t\t\t\t\t\t\t{ return 0; }\nstatic void  *display_ioGetWindow(void)\t\t\t\t\t\t\t\t\t\t{ return 0; }\nstatic sqInt  display_ioGLinitialise(void)\t\t\t\t\t\t\t\t\t{ return 0; }\nstatic sqInt  display_ioGLcreateRenderer(glRenderer *r, sqInt x, sqInt y, sqInt w, sqInt h, sqInt flags)\t{ return 0; }\nstatic sqInt  display_ioGLmakeCurrentRenderer(glRenderer *r)\t\t\t\t\t\t\t{ return 0; }\nstatic void   display_ioGLdestroyRenderer(glRenderer *r)\t\t\t\t\t\t\t{}\nstatic void   display_ioGLswapBuffers(glRenderer *r)\t\t\t\t\t\t\t\t{}\nstatic void   display_ioGLsetBufferRect(glRenderer *r, sqInt x, sqInt y, sqInt w, sqInt h)\t\t\t{}\n\nstatic sqInt display_primitivePluginBrowserReady(void)\t\t{ return primitiveFail(); }\nstatic sqInt display_primitivePluginRequestURLStream(void)\t{ return primitiveFail(); }\nstatic sqInt display_primitivePluginRequestURL(void)\t\t{ return primitiveFail(); }\nstatic sqInt display_primitivePluginPostURL(void)\t\t{ return primitiveFail(); }\nstatic sqInt display_primitivePluginRequestFileHandle(void)\t{ return primitiveFail(); }\nstatic sqInt display_primitivePluginDestroyRequest(void)\t{ return primitiveFail(); }\nstatic sqInt display_primitivePluginRequestState(void)\t\t{ return primitiveFail(); }\n\n#if (SqDisplayVersionMajor >= 1 && SqDisplayVersionMinor >= 2)\nstatic int display_hostWindowClose(int index)                                               { return 0; }\nstatic int display_hostWindowCreate(int w, int h, int x, int y,\n  char *list, int attributeListLength)                                                      { return 0; }\nstatic int display_hostWindowShowDisplay(unsigned *dispBitsIndex, int width, int height, int depth,\n  int affectedL, int affectedR, int affectedT, int affectedB, int windowIndex)              { return 0; }\nstatic int display_hostWindowGetSize(int windowIndex)                                       { return -1; }\nstatic int display_hostWindowSetSize(int windowIndex, int w, int h)                         { return -1; }\nstatic int display_hostWindowGetPosition(int windowIndex)                                   { return -1; }\nstatic int display_hostWindowSetPosition(int windowIndex, int x, int y)                     { return -1; }\nstatic int display_hostWindowSetTitle(int windowIndex, char *newTitle, int sizeOfTitle)     { return -1; }\nstatic int display_hostWindowCloseAll(void)                                                 { return 0; }\n#endif\n\n#if (SqDisplayVersionMajor >= 1 && SqDisplayVersionMinor >= 3)\n\nsqInt display_ioSetCursorPositionXY(sqInt x, sqInt y) { return 0; }\n\nint display_ioPositionOfScreenWorkArea (int windowIndex) { return -1; }\n\nint display_ioSizeOfScreenWorkArea (int windowIndex) { return -1; }\n\nvoid *display_ioGetWindowHandle() { return 0; }\n\nint display_ioPositionOfNativeDisplay(void *windowHandle) { return -1; }\n\nint display_ioSizeOfNativeDisplay(void *windowHandle) { return -1; }\n\nint display_ioPositionOfNativeWindow(void *windowHandle) { return -1; }\n\nint display_ioSizeOfNativeWindow(void *windowHandle) { return -1; }\n\n#endif /* (SqDisplayVersionMajor >= 1 && SqDisplayVersionMinor >= 3) */\n\nSqDisplayDefine(null);\n\n\n#include \"SqModule.h\"\n\nstatic void  display_parseEnvironment(void) {}\n\nstatic int   display_parseArgument(int argc, char **argv)\n{\n  if (!strcmp(argv[0], \"-nodisplay\")) return 1;\n  if (!strcmp(argv[0], \"-headless\"))  return 1;\n  return 0;\n}\n\nstatic void  display_printUsage(void) {}\nstatic void  display_printUsageNotes(void) {}\nstatic void *display_makeInterface(void) { return &display_null_itf; }\n\nSqModuleDefine(display, null);\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-sound-ALSA/Makefile.inc",
    "content": "PLIBS=-lasound\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-sound-ALSA/acinclude.m4",
    "content": "# -*- sh -*-\n\nAC_MSG_CHECKING([for Advanced Linux Sound Architecture])\nAC_TRY_COMPILE([#include <alsa/asoundlib.h>],[(void)snd_pcm_open;],[\n  AC_MSG_RESULT(yes)\n],[\n  AC_MSG_RESULT(no)\n  AC_PLUGIN_DISABLE\n])\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-sound-ALSA/config.cmake",
    "content": "PLUGIN_REQUIRE_INCLUDE (ALSA_SOUNDLIB alsa/asoundlib.h)\nPLUGIN_REQUIRE_LIBRARY (ASOUND asound)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-sound-ALSA/sqUnixSoundALSA.c",
    "content": "/* sqUnixSoundALSA.c -- cheap and cheerful sound for Advanced Linux Sound Architecture\n *\n * Author: Ian.Piumarta@squeakland.org\n * \n * Last edited: 2009-12-17 10:26:20 by piumarta on ubuntu\n *\n *   Copyright (C) 2006 by Ian Piumarta\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a copy\n *   of this software and associated documentation files (the \"Software\"), to deal\n *   in the Software without restriction, including without limitation the rights\n *   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n *   copies of the Software, and to permit persons to whom the Software is\n *   furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n *   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n *   SOFTWARE.\n */\n\n#include \"sq.h\"\n#include \"SqSound.h\"\n\n#include <alsa/asoundlib.h>\n#include <errno.h>\n#include <signal.h>\n\n\n\n#define FAIL(X)\t\t\\\n{\t\t\t\\\n  success(false);\t\\\n  return X;\t\t\\\n}\n\n#define snd(expr, what)\t\t\t\t\t\t\\\n  if ((err= snd_##expr) < 0)\t\t\t\t\t\\\n    {\t\t\t\t\t\t\t\t\\\n      fprintf(stderr, \"%s: %s\\n\", what, snd_strerror(err));\t\\\n      success(false);\t\t\t\t\t\t\\\n      return err;\t\t\t\t\t\t\\\n    }\n\n#define MIN(X, Y)\t((X) < (Y) ? (X) : (Y))\n#define MAX(X, Y)\t((X) > (Y) ? (X) : (Y))\n\n#if WORK_AROUND_BROKEN_LIBASOUND\nstatic void sigio_save(void);\nstatic void sigio_restore(void);\n#endif\n\n#define HARDWIRE_DEFAULT 1\n\n#define DEVICE_NAME_LEN 128\n\nstatic char sound_device[DEVICE_NAME_LEN]   = \"default\";\nstatic char sound_playback[DEVICE_NAME_LEN] = \"default\";\nstatic char sound_capture[DEVICE_NAME_LEN]\t= \"default\";\n\n#define PlaybackSetting 0 /* value for captureFlag */\n#define CaptureSetting 1 /* value for captureFlag */\n\nstatic int hardware_name(int captureFlag, char *name_out); /* e.g. hw:0 */\n\n/* output */\n\n#define SQ_SND_PLAY_START_THRESHOLD\t7/8\n#define SQ_SND_PLAY_AVAIL_MIN\t\t4/8\n\nstatic snd_pcm_t\t\t*playback_handle= 0;\nstatic snd_async_handler_t\t*playback_handler= 0;\nstatic int\t\t\t output_semaphore= 0;\nstatic int\t\t\t output_channels= 0;\nstatic snd_pcm_uframes_t\t output_buffer_period_size= 0;\nstatic snd_pcm_uframes_t\t output_buffer_size= 0;\nstatic double\t\t\t max_delay_frames= 0;\n\nstatic int\nensure_playback_handle()\n{\n\tstatic char playback_handle_device[DEVICE_NAME_LEN] = \"bogus\";\n\tchar device_name[16];\n\tint err;\n\n\tif (!hardware_name(PlaybackSetting,device_name))\n\t\treturn -EACCES;\n\n\tif (playback_handle) {\n\t\tif (!strcmp(sound_playback,playback_handle_device))\n\t\t\treturn 0;\n\n\t\tsnd_pcm_close(playback_handle);\n\t}\n#if 0\n\tprintf(\"ensure_playback_handle opening '%s' as '%s'\\n\",\n\t\t\tsound_playback, device_name);\n#endif\n\tif ((err= snd_pcm_open(&playback_handle, device_name, SND_PCM_STREAM_PLAYBACK, 0)) < 0)\n\t\tfprintf(stderr, \"ensure_playback_handle snd_pcm_open: %s\\n\", snd_strerror(err));\n\telse\n\t\tstrcpy(playback_handle_device,sound_playback);\n\tif (!playback_handle) assert(err);\n\treturn err;\n}\n\nstatic void playback_callback(snd_async_handler_t *handler)\n{\n  signalSemaphoreWithIndex(output_semaphore);\n}\n\nstatic snd_pcm_t\t\t*capture_handle= 0;\nstatic snd_async_handler_t\t*capture_handler= 0;\nstatic int\t\t\t input_semaphore= 0;\nstatic int\t\t\t input_channels= 0;\nstatic unsigned int\t\t input_rate= 0;\n\nstatic int\nensure_capture_handle()\n{\n\tstatic char capture_handle_device[DEVICE_NAME_LEN] = \"bogus\";\n\tchar device_name[16];\n\tint err;\n\n\tif (!hardware_name(CaptureSetting,device_name))\n\t\treturn -EACCES;\n\n\tif (capture_handle) {\n\t\tif (!strcmp(sound_capture,capture_handle_device))\n\t\t\treturn 0;\n\n\t\tsnd_pcm_drain(capture_handle);\n\t\tsnd_pcm_close(capture_handle);\n\t}\n\tprintf(\"ensure_capture_handle opening '%s' as '%s'\\n\",\n\t\t\tsound_capture, device_name);\n\tif ((err= snd_pcm_open(&capture_handle, device_name, SND_PCM_STREAM_CAPTURE, 0)) < 0)\n\t\tfprintf(stderr, \"ensure_capture_handle snd_pcm_open: %s\\n\", snd_strerror(err));\n\telse\n\t\tstrcpy(capture_handle_device,sound_capture);\n\tif (!capture_handle) assert(err);\n\treturn err;\n}\n\nstatic void capture_callback(snd_async_handler_t *handler)\n{\n  signalSemaphoreWithIndex(input_semaphore);\n}\n\n\nstatic sqInt sound_Stop(void)\n{\n\tif (playback_handle) {\n\t\tsnd_pcm_drain(playback_handle);\n\t\tsnd_pcm_close(playback_handle);\n\t\tplayback_handle= 0;\n#if WORK_AROUND_BROKEN_LIBASOUND\n\t\tif (!capture_handle)\n\t\t\tsigio_restore();\n#endif\n\t}\n\treturn 0;\n}\n\nstatic sqInt sound_Start(sqInt frameCount, sqInt samplesPerSec, sqInt stereo, sqInt semaIndex)\n{\n  int\t\t\t err;\n  snd_pcm_hw_params_t\t*hwparams;\n  snd_pcm_sw_params_t\t*swparams;\n  unsigned int\t\t uval;\n  int\t\t\t dir;\n\n  if (playback_handle) sound_Stop();\n\n  output_semaphore= semaIndex;\n  output_channels= stereo ? 2 : 1;\n  printf(\"sound_Start(%s)\\n\", sound_playback);\n  if ((err = ensure_playback_handle())) {\n\t\tsuccess(false);\n\t\treturn err;\n  }\n\n  snd_pcm_hw_params_alloca(&hwparams);\n  snd_pcm_hw_params_any(playback_handle, hwparams);\n  snd_pcm_hw_params_set_access(playback_handle, hwparams, SND_PCM_ACCESS_RW_INTERLEAVED);\n  snd_pcm_hw_params_set_format(playback_handle, hwparams, SND_PCM_FORMAT_S16_LE);\n  snd_pcm_hw_params_set_channels(playback_handle, hwparams, output_channels);\n  uval= samplesPerSec;\n  snd_pcm_hw_params_set_rate_near(playback_handle, hwparams, &uval, &dir);\n  output_buffer_period_size= frameCount;\n  snd_pcm_hw_params_set_period_size_near(playback_handle, hwparams, &output_buffer_period_size, &dir);\n  snd(pcm_hw_params(playback_handle, hwparams), \"sound_Start: snd_pcm_hw_params\");\n\n  snd_pcm_sw_params_alloca(&swparams);\n  snd(pcm_sw_params_current(playback_handle, swparams), \"sound_Start: snd_pcm_sw_params_current\");\n  snd(pcm_sw_params_set_start_threshold(playback_handle, swparams, frameCount * SQ_SND_PLAY_START_THRESHOLD), \"sound_Start: snd_pcm_sw_params_set_start_threshold\");\n  snd(pcm_sw_params_set_avail_min(playback_handle, swparams, frameCount * SQ_SND_PLAY_AVAIL_MIN), \"sound_Start: snd_pcm_sw_parama_set_avail_min\");\n#if 0 // snd_pcm_sw_params_set_xfer_align is deprecated\n  snd(pcm_sw_params_set_xfer_align(playback_handle, swparams, 1), \"sound_Start: snd_pcm_sw_params_set_xfer_align\");\n#endif\n  snd(pcm_sw_params(playback_handle, swparams), \"sound_Start: snd_pcm_sw_params\");\n  snd(pcm_hw_params_get_buffer_size(hwparams, &output_buffer_size), \"sound_Start: pcm_hw_params_get_buffer_size\");\n  max_delay_frames= output_buffer_period_size * 2;\t/* set initial delay frames */\n\n  snd(pcm_nonblock(playback_handle, 1), \"sound_Start: snd_pcm_nonblock\");\n  snd(async_add_pcm_handler(&playback_handler, playback_handle, playback_callback, 0), \"soundStart: snd_add_pcm_handler\");\n\n  if ((err= snd_pcm_start(playback_handle)) < 0)\n    {\n      if (err != -EPIPE)\n\t{\n\t  fprintf(stderr, \"snd_pcm_start(1): %s\\n\", snd_strerror(err));\n\t  success(false);\n\t  return 0;\n\t}\n    }\n\n  if ((err= snd_pcm_prepare(playback_handle)) < 0)\n    fprintf(stderr, \"snd_pcm_prepare: %s\\n\", snd_strerror(err));\n\n  if ((err= snd_pcm_start(playback_handle)) < 0)\n    {\n      if (err != -EPIPE)\n\t{\n\t  fprintf(stderr, \"snd_pcm_start(2): %s\\n\", snd_strerror(err));\n\t  success(false);\n\t  return 0;\n\t}\n    }\n\n  return 1;\n}\n\nstatic sqInt sound_AvailableSpace(void)\n{\n#if 1\n  snd_pcm_sframes_t delay;    /* distance to playback point (in frames) */\n  snd_pcm_state_t   state;    /* current state of the stream */\n  sqInt             avail= 0; /* available space for the answer (in bytes) */\n\n  if (!playback_handle) return 0;\n\n  snd_pcm_delay(playback_handle, &delay);\n  snd_pcm_avail_update(playback_handle);\n  state= snd_pcm_state(playback_handle);\n\n  /* if underrun causes, max delay is loosened */\n  if (state == SND_PCM_STATE_XRUN)\n    max_delay_frames=\tMIN(max_delay_frames * 1.5, output_buffer_size - output_buffer_period_size);\n\n  /* if the state is not running, new sound is needed because nobody can signal the semaphore */\n  if (delay <= max_delay_frames || state != SND_PCM_STATE_RUNNING)\n    {\n      avail= output_buffer_period_size;\n      max_delay_frames= MAX(max_delay_frames * 0.9995, output_buffer_period_size);\n    }\n  /*fprintf(stderr, \"delay=%i, ans_avail=%i, state=%i, real_delay=%.1fms\\n\", (int) delay, avail, state, 1000 * max_delay_frames / 22050);*/\n  return avail * output_channels * 2;\t/* bytes */\n#else\n  if (playback_handle)\n    {\n      int count= snd_pcm_avail_update(playback_handle);\n      if (count >= 0)\n\treturn count;\n      fprintf(stderr, \"sound_AvailableSpace: snd_pcm_avail_update: %s\\n\", snd_strerror(count));\n      snd_pcm_prepare(playback_handle);\n    }\n  return 0;\n#endif\n}\n\nstatic sqInt  sound_InsertSamplesFromLeadTime(sqInt frameCount, sqInt srcBufPtr, sqInt samplesOfLeadTime)\tFAIL(frameCount)\n\nstatic sqInt  sound_PlaySamplesFromAtLength(sqInt frameCount, sqInt arrayIndex, sqInt startIndex)\n{\n  if (playback_handle)\n    {\n      void *samples= (void *)arrayIndex + startIndex * output_channels * 2;\n      int   count=   snd_pcm_writei(playback_handle, samples, frameCount);\n      if (count < 0)\n\t{\n\t  if (count == -EPIPE)    /* underrun */\n\t    {\n\t      int err;\n\t      snd(pcm_prepare(playback_handle), \"sound_PlaySamples: snd_pcm_prepare\");\n\t      return 0;\n\t    }\n\t  fprintf(stderr, \"snd_pcm_writei returned %i\\n\", count);\n\t  return 0;\n\t}\n      return count;\n    }\n  success(false);\n  return 0;\n}\n\nstatic sqInt  sound_PlaySilence(void)\tFAIL(8192)\n\n\n/* input */\n\n\n#define SQ_SND_REC_START_THRESHOLD\t4/8\n#define SQ_SND_REC_AVAIL_MIN\t\t4/8\n\nstatic sqInt sound_StopRecording(void)\n{\n\tif (capture_handle) {\n\t\t/*snd_pcm_drain(capture_handle);*/\n\t\tsnd_pcm_close(capture_handle);\n\t\tcapture_handle= 0;\n#if WORK_AROUND_BROKEN_LIBASOUND\n\t\tif (!playback_handle)\n\t\t\tsigio_restore();\n#endif\n\t}\n\treturn 0;\n}\n\nstatic sqInt sound_StartRecording(sqInt desiredSamplesPerSec, sqInt stereo, sqInt semaIndex)\n{\n  int\t\t\t err;\n  snd_pcm_hw_params_t\t*hwparams;\n  snd_pcm_sw_params_t\t*swparams;\n  snd_pcm_uframes_t\t frames;\n  int\t\t\t dir;\n\n  if (capture_handle) sound_StopRecording();\n\n  input_semaphore= semaIndex;\n  input_channels= stereo ? 2 : 1;\n  printf(\"sound_StartRecording(%s)\\n\", sound_capture);\n  if ((err = ensure_capture_handle())) {\n\t\tsuccess(false);\n\t\treturn err;\n  }\n\n  snd_pcm_hw_params_alloca(&hwparams);\n  snd_pcm_hw_params_any(capture_handle, hwparams);\n  snd_pcm_hw_params_set_access(capture_handle, hwparams, SND_PCM_ACCESS_RW_INTERLEAVED);\n  snd_pcm_hw_params_set_format(capture_handle, hwparams, SND_PCM_FORMAT_S16_LE);\n  snd_pcm_hw_params_set_channels(capture_handle, hwparams, input_channels);\n  input_rate= desiredSamplesPerSec;\n  snd_pcm_hw_params_set_rate_near(capture_handle, hwparams, &input_rate, &dir);\n  frames= 4096;\n  snd_pcm_hw_params_set_period_size_near(capture_handle, hwparams, &frames, &dir);\n  snd(pcm_hw_params(capture_handle, hwparams), \"sound_StartRecording: snd_pcm_hw_params\");\n\n  snd_pcm_sw_params_alloca(&swparams);\n  snd(pcm_sw_params_current(capture_handle, swparams), \"sound_StartRecording: snd_pcm_sw_params_current\");\n  snd(pcm_sw_params_set_start_threshold(capture_handle, swparams, frames * SQ_SND_REC_START_THRESHOLD), \"sound_StartRecording: snd_pcm_sw_params_set_start_threshold\");\n  snd(pcm_sw_params_set_avail_min(capture_handle, swparams, frames * SQ_SND_REC_AVAIL_MIN), \"sound_StartRecording: snd_pcm_sw_parama_set_avail_min\");\n#if 0 // snd_pcm_sw_params_set_xfer_align is deprecated\n  snd(pcm_sw_params_set_xfer_align(capture_handle, swparams, 1), \"sound_StartRecording: snd_pcm_sw_params_set_xfer_align\");\n#endif\n  snd(pcm_sw_params(capture_handle, swparams), \"sound_StartRecording: snd_pcm_sw_params\");\n\n  snd(pcm_nonblock(capture_handle, 1), \"sound_StartRecording: snd_pcm_nonblock\");\n  snd(async_add_pcm_handler(&capture_handler, capture_handle, capture_callback, 0), \"sound_StartRecording: snd_add_pcm_handler\");\n  snd(pcm_start(capture_handle), \"sound_StartRecording: snd_pcm_start\");\n  return 1;\n}\n\nstatic double sound_GetRecordingSampleRate(void)\n{\n  return (double)input_rate;\n}\n\n#define PROTECT_RECORD_SAMPLES 0\n\n#if PROTECT_RECORD_SAMPLES\n# include <sys/types.h>\n# include <sys/time.h>\n\nstatic sqInt\nprotected_sound_RecordSamplesIntoAtLength(sqInt buf, sqInt startSliceIndex, sqInt bufferSizeInBytes)\n{\n\t/* see git://android.git.kernel.org/platform/hardware/alsa_sound.git/\n\t *\t\tAudioStreamInALSA.cpp: AudioStreamInALSA::read\n\t */\n\tif (capture_handle) {\n\t\tvoid *samples=    (void *)buf + (startSliceIndex * 2);\n# if 1\n\t\tint   frameCount= ((bufferSizeInBytes / 2) - startSliceIndex) / input_channels;\n# else\n\t\tint   bytes = bufferSizeInBytes - (startSliceIndex * 2);\n\t\tint   frameCount= snd_pcm_bytes_to_frames(capture_handle, bytes);\n# endif\n\t\tint   count;\n\n\t\tdo {\n\t\t\tcount = snd_pcm_readi(capture_handle, samples, frameCount);\n\t\t\tif (count < frameCount) {    \n\t\t\t\tint old_count = count;\n\t\t\t\tif (capture_handle) {\n#define SILENT 1\n#define REPORT 0\n\t\t\t\t\tif (count < 0)\n\t\t\t\t\t\tcount = snd_pcm_recover(capture_handle, count, REPORT);\n#undef SILENT\n#undef REPORT\n\t\t\t\t\telse\n\t\t\t\t\t\tcount = snd_pcm_prepare(capture_handle);\n\t\t\t\t\tprintf(\"\\tsnd_pcm_readi(%d) %d -> %d\\n\", frameCount, old_count, count);\n\t\t\t\t\treturn count * input_channels;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\twhile (count == -EAGAIN);\n\t\tprintf(\"\\tsnd_pcm_readi(%d) %d\\n\", frameCount, count);\n\t\treturn count * input_channels;\n\t}\n\tsuccess(false);\n\treturn 0;\n}\n#endif /* PROTECT_RECORD_SAMPLES */\n\nstatic sqInt sound_RecordSamplesIntoAtLength(sqInt buf, sqInt startSliceIndex, sqInt bufferSizeInBytes)\n{\n#if 0\n  if (capture_handle)\n    {\n      void *samples=    (void *)buf + (startSliceIndex * 2);\n      int   frameCount= ((bufferSizeInBytes / 2) - startSliceIndex) / input_channels;\n      int   count=      snd_pcm_readi(capture_handle, samples, frameCount);\n      if (count < 0)\n\t{    \n\t  if (count == -EPIPE)\n\t    snd_pcm_prepare(capture_handle);\n\t  else if (count != -EAGAIN)\n\t    fprintf(stderr, \"snd_pcm_readi returned %i\\n\", count);\n\t  return 0;\n\t}\n      return count * input_channels;\n    }\n  success(false);\n  return 0;\n#elif 1\n\tif (capture_handle) {\n\t\tvoid *samples=    (void *)buf + (startSliceIndex * 2);\n\t\tint   frameCount= ((bufferSizeInBytes / 2) - startSliceIndex) / input_channels;\n\t\tint   count;\n\n\t\tdo {\n\t\t\tcount = snd_pcm_readi(capture_handle, samples, frameCount);\n\t\t\tif (count < 0) {    \n\t\t\t\tif (count == -EINTR) {\n\t\t\t\t\tfprintf(stderr,\".\");\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (count == -EPIPE)\n\t\t\t\t\tsnd_pcm_prepare(capture_handle);\n\t\t\t\telse if (count != -EAGAIN)\n\t\t\t\t\tfprintf(stderr, \"snd_pcm_readi returned %i\\n\", count);\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\twhile (count < 0);\n\t\treturn count * input_channels;\n\t}\n\tsuccess(false);\n\treturn 0;\n#elif 0\n\t/* see git://android.git.kernel.org/platform/hardware/alsa_sound.git/\n\t *\t\tAudioStreamInALSA.cpp: AudioStreamInALSA::read\n\t */\n\tif (capture_handle) {\n\t\tvoid *samples=    (void *)buf + (startSliceIndex * 2);\n# if 0\n\t\tint   frameCount= ((bufferSizeInBytes / 2) - startSliceIndex) / input_channels;\n# else\n\t\tint   bytes = bufferSizeInBytes - (startSliceIndex * 2);\n\t\tint   frameCount= snd_pcm_bytes_to_frames(capture_handle, bytes);\n# endif\n\t\tint   count;\n\n\t\tdo {\n\t\t\tcount = snd_pcm_readi(capture_handle, samples, frameCount);\n\t\t\tif (count < frameCount) {    \n\t\t\t\tif (capture_handle) {\n#define SILENT 1\n#define REPORT 0\n\t\t\t\t\tif (count < 0)\n\t\t\t\t\t\tcount = snd_pcm_recover(capture_handle, count, REPORT);\n#undef SILENT\n#undef REPORT\n\t\t\t\t\telse\n\t\t\t\t\t\tcount = snd_pcm_prepare(capture_handle);\n\t\t\t\t\treturn count * input_channels;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\twhile (count == -EAGAIN);\n\t\treturn count * input_channels;\n\t}\n\tsuccess(false);\n\treturn 0;\n#elif PROTECT_RECORD_SAMPLES\n\tstruct itimerval saved_itimer, disable;\n\tint result;\n\n\ttimerclear(&disable.it_value);\n\t(void)setitimer(ITIMER_REAL, &disable, &saved_itimer);\n\n\tresult = protected_sound_RecordSamplesIntoAtLength(buf, startSliceIndex, bufferSizeInBytes);\n\n\t(void)setitimer(ITIMER_REAL, &saved_itimer, 0);\n\treturn result;\n#else\n# error you must choose at least one version fo StartRecording\n#endif\n}\n\n\n/* mixer */\n\n\nstatic int\t\t sound_nomixer\t= 0;\n\n/*\nNotes:\nCache output mixer handle with output handle?\nCache input mixer handle with input handle?\n\nFilter out from devices those that have no controls.\ne.g. hw:1 has no controls so why include it in the list of devices?\nWe can do an enumerate over devices at some point (but how do we discover\nwhether a new device is inserted?  The Smalltalk layer contnues to poll\noccasionally so not out problem).  We can set a bit in a flag word to exclude\ndevices.\n*/\ntypedef struct {\n\tint\t\t\t\t\terror;\n\tsnd_mixer_t\t\t\t*handle;\n} mixer;\n\nstatic int\nnumDevicesOfType(int stream_type);\nstatic char *\nnameOfNthDeviceOfType(int n, int stream_type);\n\n#define SND_PCM_STREAM_ANY (SND_PCM_STREAM_CAPTURE+SND_PCM_STREAM_PLAYBACK+1)\n\nstatic int\nhardware_name(int captureFlag, char *name_out) /* i.e. default hw:0 hw:1 etc */\n{\n\tchar *device_name = captureFlag ? sound_capture : sound_playback;\n\tint i, n;\n\n\tif (!strcmp(device_name,\"default\")) {\n\t\tstrcpy(name_out,\"default\");\n\t\treturn 1;\n\t}\n\n\tfor (i = 0, n = numDevicesOfType(SND_PCM_STREAM_ANY); i < n; i++)\n\t\tif (!strcmp(device_name,nameOfNthDeviceOfType(i,SND_PCM_STREAM_ANY))) {\n\t\t\tsprintf(name_out,\"hw:%d\", i);\n\t\t\treturn 1;\n\t\t}\n\n\treturn 0;\n}\n\nstatic mixer\nmixer_open(int captureFlag)\n{\n  mixer mixer;\n  int err;\n  char device_name[16];\n\n  memset(&mixer,0,sizeof(mixer));\n  if (sound_nomixer) {\n\tmixer.error = EACCES;\n\treturn mixer;\n  }\n  if (!hardware_name(captureFlag,device_name)) {\n    fprintf(stderr, \"mixer_open: can't find device %s\\n\", device_name);\n\tmixer.error = EACCES;\n\treturn mixer;\n  }\n\n#define mix(expr, what)\t\t\t\t\t\t\t\t\t\t\\\n  if ((err= snd_##expr) < 0) {\t\t\t\t\t\t\t\t\\\n      fprintf(stderr, \"%s: %s\\n\", what, snd_strerror(err));\t\\\n      success(false);\t\t\t\t\t\t\t\t\t\t\\\n      mixer.error = err;\t\t\t\t\t\t\t\t\t\\\n      return mixer;\t\t\t\t\t\t\t\t\t\t\t\\\n  }\n\n  mix(mixer_open(&mixer.handle, 0),\t\t\t\"snd_mixer_open\");\n  mix(mixer_attach(mixer.handle, device_name),\t\"snd_mixer_attach\");\n  mix(mixer_selem_register(mixer.handle,0,0),\"snd_mixer_selem_register\");\n  mix(mixer_load(mixer.handle),\t\t\t\t\"snd_mixer_load\");\n\n  return mixer;\n}\n\nstatic void\nmixer_close(mixer *mixer)\n{\n  if (mixer->handle)\n\tsnd_mixer_close(mixer->handle);\n  else\n\tfprintf(stderr, \"mixer_close: mixer already closed\\n\");\n  mixer->handle= 0;\n}\n\n/* hardwired likely master control names.  This from HP EliteBook 8530p.\n * Built-in hw:0 has \"Master\" playback volume/switch.\n * Built-in hw:0 has \"PCM\" playbac what it says  volume/switch.\n * Plugin USB headset hw:2 has \"Speaker\" playback volume/switch.\n * Built-in hw:0 has \"Capture\" (4 & 5) capture volume/switch. but only 4 seems to work\n * Plugin USB headset hw:2 has \"Mic\" capture volume/switch.\n * USB plays back at 8 x tempo (but not 8 x freq)\n */\nstatic char *playback_controls[] = { \"PCM\" };\nstatic char *capture_controls[] = { \"Capture\" };\n\n\nstatic inline int\nnames_contains(char *names[], int n, const char *name)\n{\n\twhile (--n >= 0)\n\t\tif (!strcmp(names[n], name))\n\t\t\treturn 1;\n\treturn 0;\n}\n\n/* Enumerate over the mixer elements for the current sound_playback or \n * sound_capture device, as selected by captureFlag, and either return its\n * volume as a value in the range 0.0 to 1.0 through *get, if set, or set\n * its volume as a value in the range 0.0 to 1.0 if *get is null.\n * Answer 0 on success or an alsa error on failure.\n */\nstatic int\nmixer_default_volume_get_set(int captureFlag, double *get, double set)\n{\n\tint turn_on = set > 0.001, result = 0;\n\tsnd_mixer_elem_t *elem;\n\tchar **controls = captureFlag ? capture_controls : playback_controls;\n\tint num_controls = (captureFlag\n\t\t\t\t\t\t\t? sizeof(capture_controls)\n\t\t\t\t\t\t\t: sizeof(playback_controls)) / sizeof(char *);\n\tint (*has_volume)(snd_mixer_elem_t *) = captureFlag\n\t\t\t\t\t\t\t\t\t\t? snd_mixer_selem_has_capture_volume\n\t\t\t\t\t\t\t\t\t\t: snd_mixer_selem_has_playback_volume;\n\tint (*get_volume_range)(snd_mixer_elem_t *,long *,long *) = captureFlag\n\t\t\t\t\t\t\t\t\t? snd_mixer_selem_get_capture_volume_range\n\t\t\t\t\t\t\t\t\t: snd_mixer_selem_get_playback_volume_range;\n\tint (*set_volume_all)(snd_mixer_elem_t *, long) = captureFlag\n\t\t\t\t\t\t\t\t\t? snd_mixer_selem_set_capture_volume_all\n\t\t\t\t\t\t\t\t\t: snd_mixer_selem_set_playback_volume_all;\n\tint (*set_switch_all)(snd_mixer_elem_t *, int) = captureFlag\n\t\t\t\t\t\t\t\t\t? snd_mixer_selem_set_capture_switch_all\n\t\t\t\t\t\t\t\t\t: snd_mixer_selem_set_playback_switch_all;\n\tint (*get_volume)(snd_mixer_elem_t *, snd_mixer_selem_channel_id_t, long *) = captureFlag\n\t\t\t\t\t\t\t\t\t? snd_mixer_selem_get_capture_volume\n\t\t\t\t\t\t\t\t\t: snd_mixer_selem_get_playback_volume;\n\n\tmixer mixer = mixer_open(captureFlag);\n\n\tif (mixer.error) {\n\t\tmixer_close(&mixer);\n\t\treturn;\n\t}\n\n\t/* Iterate over all mixer controls */\n\tfor (elem = snd_mixer_first_elem(mixer.handle);\n\t\t elem;\n\t\t elem = snd_mixer_elem_next(elem)) {\n\t\tlong range_min, range_max, value;\n\t\tconst char *elem_name;\n\t\tint ret;\n\n#define DEFAULT_CHANNEL SND_MIXER_SCHN_MONO  /** Mono (Front left alias) */\n\t\t\t\t\t\t/* SND_MIXER_SCHN_MONO = SND_MIXER_SCHN_FRONT_LEFT */\n\n\t\tif (!snd_mixer_selem_is_active(elem))\n\t\t\tcontinue;\n\n\t\telem_name = snd_mixer_selem_get_name(elem);\n\n\t\tif (names_contains(controls, num_controls, elem_name)) {\n\t\t\tret = get_volume_range(elem, &range_min, &range_max);\n\t\t\tif (ret < 0) {\n\t\t\t\tfprintf(stderr,\"get_volume_range error: %s\", snd_strerror(ret));\n\t\t\t\tresult = -ret;\n\t\t\t}\n\t\t\tassert(has_volume(elem));\n\t\t\tif (!get) {\n\t\t\t\tlong vol = (range_max - range_min) * set + range_min;\n#if 0\n\t\t\t\tif (vol < range_min)\n\t\t\t\t\tvol = range_min;\n\t\t\t\telse if (vol > range_max)\n\t\t\t\t\tvol = range_max;\n#endif\n\t\t\t\tret = set_volume_all(elem, vol);\n\t\t\t\tif (ret < 0) {\n\t\t\t\t\tfprintf(stderr,\"set_volume_all error: %s\", snd_strerror(ret));\n\t\t\t\t\tresult = -ret;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tret = set_switch_all(elem, turn_on);\n\t\t\t\t\tif (ret < 0) {\n\t\t\t\t\t\tfprintf(stderr,\"set_switch_all error: %s\", snd_strerror(ret));\n\t\t\t\t\t\tresult = -ret;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tget_volume(elem, DEFAULT_CHANNEL, &value);\n\t\t\t\t*get = (double)(value - range_min)\n\t\t\t\t\t / (double)(range_max - range_min);\n\t\t\t}\n\t\t\tmixer_close(&mixer);\n\t\t\treturn result;\n\t\t}\n\t}\n\tmixer_close(&mixer);\n\treturn result;\n}\n\nstatic int mixer_setSwitch(char *name, int captureFlag, int parameter)\n{\n#if 0\n  int chn;\n  mixer mixer = mixer_open(captureFlag);\n\n  if (mixer.error) {\n      mixer_close(&mixer);\n      return;\n  }\n\n  if (!(captureFlag ? snd_mixer_selem_has_capture_switch : snd_mixer_selem_has_playback_switch)(mixer.element))\n    {\n      mixer_close(&mixer);\n      return 0;\n    }\n\n  for (chn= 0;  chn <= SND_MIXER_SCHN_LAST;  ++chn)\n    {\n      if (!(captureFlag ? snd_mixer_selem_has_capture_channel : snd_mixer_selem_has_playback_channel)(mixer.element, chn))\n\tcontinue;\n\n      if ((captureFlag ? snd_mixer_selem_set_capture_switch : snd_mixer_selem_set_playback_switch)(mixer.element, chn, parameter) < 0)\n\tcontinue;\n    }\n\n  mixer_close(&mixer);\n  return 1;\n#else\n\treturn -1;\n#endif\n}\n\nstatic int mixer_getSwitch(char *name, int captureFlag, int channel)\n{\n#if 0\n  int ival;\n  mixer mixer;\n\n  if (channel < 0 || channel > SND_MIXER_SCHN_LAST)\n      return -1;\n\n  mixer = mixer_open(captureFlag);\n  if (mixer.error) {\n      mixer_close(&mixer);\n      return;\n  }\n\n  if (!(captureFlag ? snd_mixer_selem_has_capture_switch : snd_mixer_selem_has_playback_switch)(mixer.element))\n    {\n      mixer_close(&mixer);\n      return -1;\n    }\n\n  if (!(captureFlag ? snd_mixer_selem_has_capture_channel : snd_mixer_selem_has_playback_channel)(mixer.element, channel))\n    {\n      mixer_close(&mixer);\n      return -1;\n    }\n\n  if ((captureFlag ? snd_mixer_selem_get_capture_switch : snd_mixer_selem_get_playback_switch)(mixer.element, channel, &ival) < 0)\n    ival= -1;\n\n  mixer_close(&mixer);\n  return ival;\n#else\n\treturn -1;\n#endif\n}\n\n/* Squeak Prim: Return sound as array of doubles left then right channel, range\n * is 0.0 to 1.0 but may be overdriven.\n */\nstatic void sound_Volume(double *left, double *right)\n{\n\tdouble level;\n\tmixer_default_volume_get_set(PlaybackSetting, &level, 0.0);\n\n\t*left = *right = level;\n}\n\n/* Squeak Prim: Set sound pass in float 0.0-1.0 for left and right channel,\n * with possible 2.0 or higher to overdrive sound channel.\n */\nstatic void sound_SetVolume(double left, double right)\n{\n  mixer_default_volume_get_set(PlaybackSetting, 0, (left + right) / 2.0);\n}\n\n/* Squeak Prim: Set the recording level to the given value in the range 0-1000,\n * where 0 is the lowest recording level and 1000 is the maximum.  Do nothing\n * if the sound input hardware does not support changing the recording level.\n */\nstatic sqInt sound_SetRecordLevel(sqInt level)\n{\n\tmixer_default_volume_get_set(CaptureSetting, 0, (double)level / 1000.0);\n\treturn 1;\n}\n\n/* Squeak Prim: Get the recording level to the given value in the range 0-1000,\n * where 0 is the lowest recording level and 1000 is the maximum.  Do nothing\n * if the sound input hardware does not support changing the recording level.\n */\nstatic sqInt sound_GetRecordLevel(void) /* eem Feb 7 2010 after hrs' SoundRecorder extras. */\n{ double level = 0.0;\n\n  mixer_default_volume_get_set(CaptureSetting, &level, 0.0);\n  return level * 1000.0L;\n}\n\nstatic sqInt sound_SetDevice(sqInt id, char *arg)\n{ \n#if  HARDWIRE_DEFAULT \n\treturn 1;\n#else\n  char *dest= NULL; \n  printf(\"sound_SetDevice(%d,%s)\\n\", id, arg);\n  if (!arg)\n\targ = \"default\";\n  if (id == 0)\n      dest= sound_device;\n  else if (id == 1)\n      dest= sound_playback;\n  else if (id == 2)\n      dest= sound_capture;\n\n  if (dest) {\n      strncpy(dest, arg, DEVICE_NAME_LEN);\n      return 1;\n    }\n  return -1;\n#endif\n}\n\nstatic sqInt sound_GetSwitch(sqInt id, sqInt captureFlag, sqInt channel)\n{\n  if (id == 0)\n    return mixer_getSwitch(sound_device, captureFlag, channel);\n  if (id == 1)\n    return mixer_getSwitch(sound_playback, captureFlag, channel);\n  if (id == 2)\n      return mixer_getSwitch(sound_capture, captureFlag, channel);\n  return -1;\n}\n\nstatic sqInt sound_SetSwitch(sqInt id, sqInt captureFlag, sqInt parameter)\n{\n  if (id == 0)\n      return mixer_setSwitch(sound_device, captureFlag, parameter);\n  if (id == 1)\n      return mixer_setSwitch(sound_playback, captureFlag, parameter);\n  if (id == 2)\n      return mixer_setSwitch(sound_capture, captureFlag, parameter);\n  return -1;\n}\n\n\n/* eem Feb 7 2010 after hrs' SoundRecorder extras. */\nstatic int\nnumDevicesOfType(int stream_type)\n{\n\t/* derived from aplay.c in alsa-utils-1.0.22 */\n\tsnd_ctl_t *handle;\n\tint card = -1, err, count = 0;\n\tsnd_ctl_card_info_t *info;\n\tsnd_pcm_info_t *pcminfo;\n\tsnd_ctl_card_info_alloca(&info);\n\tsnd_pcm_info_alloca(&pcminfo);\n\n\tif (snd_card_next(&card) < 0 || card < 0)\n\t\treturn 0;\n\n\twhile (card >= 0) {\n\t\tint dev = -1;\n\t\tchar name[32];\n\n\t\tsprintf(name, \"hw:%d\", card);\n\t\tif ((err = snd_ctl_open(&handle, name, 0)) < 0) {\n\t\t\tfprintf(stderr,\"control open (%i): %s\\n\", card, snd_strerror(err));\n\t\t\tgoto next_card;\n\t\t}\n\t\tif ((err = snd_ctl_card_info(handle, info)) < 0) {\n\t\t\tfprintf(stderr,\"control hardware info (%i): %s\\n\", card, snd_strerror(err));\n\t\t\tsnd_ctl_close(handle);\n\t\t\tgoto next_card;\n\t\t}\n\t\twhile (1) {\n\t\t\tif (snd_ctl_pcm_next_device(handle, &dev)<0)\n\t\t\t\tfprintf(stderr,\"snd_ctl_pcm_next_device\\n\");\n\t\t\tif (dev < 0)\n\t\t\t\tbreak;\n\t\t\tif (stream_type != SND_PCM_STREAM_ANY) {\n\t\t\t\t/* if looking for a specific stream type then\n\t\t\t\t * dig deeper to see if that type is supported */\n\t\t\t\tsnd_pcm_info_set_device(pcminfo, dev);\n\t\t\t\tsnd_pcm_info_set_subdevice(pcminfo, 0);\n\t\t\t\tsnd_pcm_info_set_stream(pcminfo, stream_type);\n\t\t\t\tif ((err = snd_ctl_pcm_info(handle, pcminfo)) < 0) {\n\t\t\t\t\tif (err != -ENOENT)\n\t\t\t\t\t\tfprintf(stderr,\"snd_ctl_pcm_info (%i): %s\\n\",\n\t\t\t\t\t\t\t\tcard, snd_strerror(err));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcount += 1;\n\t\t}\n\t\tsnd_ctl_close(handle);\n\tnext_card:\n\t\tif (snd_card_next(&card) < 0) {\n\t\t\tfprintf(stderr,\"snd_card_next\\n\");\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn count;\n}\n\n/* in the libasound source include/sound/asound.h defines the max len as 80 */\n#define MAX_NAME_LEN 128\nstatic char devname[MAX_NAME_LEN];\n\nstatic char *\nnameOfNthDeviceOfType(int n, int stream_type)\n{\n\t/* derived from aplay.c in alsa-utils-1.0.22 */\n\tsnd_ctl_t *handle;\n\tint card = -1, err, count = 0;\n\tsnd_ctl_card_info_t *info;\n\tsnd_pcm_info_t *pcminfo;\n\tsnd_ctl_card_info_alloca(&info);\n\tsnd_pcm_info_alloca(&pcminfo);\n\n\tif (snd_card_next(&card) < 0 || card < 0)\n\t\treturn 0;\n\n\twhile (card >= 0) {\n\t\tint dev = -1;\n\t\tchar name[32];\n\n\t\tsprintf(name, \"hw:%d\", card);\n\t\tif ((err = snd_ctl_open(&handle, name, 0)) < 0) {\n\t\t\tfprintf(stderr,\"control open (%i): %s\\n\", card, snd_strerror(err));\n\t\t\tgoto next_card;\n\t\t}\n\t\tif ((err = snd_ctl_card_info(handle, info)) < 0) {\n\t\t\tfprintf(stderr,\"control hardware info (%i): %s\\n\", card, snd_strerror(err));\n\t\t\tsnd_ctl_close(handle);\n\t\t\tgoto next_card;\n\t\t}\n\t\twhile (1) {\n\t\t\tif (snd_ctl_pcm_next_device(handle, &dev)<0)\n\t\t\t\tfprintf(stderr,\"snd_ctl_pcm_next_device\\n\");\n\t\t\tif (dev < 0)\n\t\t\t\tbreak;\n\t\t\tif (stream_type != SND_PCM_STREAM_ANY) {\n\t\t\t\t/* if looking for a specific stream type then\n\t\t\t\t * dig deeper to see if that type is supported */\n\t\t\t\tsnd_pcm_info_set_device(pcminfo, dev);\n\t\t\t\tsnd_pcm_info_set_subdevice(pcminfo, 0);\n\t\t\t\tsnd_pcm_info_set_stream(pcminfo, stream_type);\n\t\t\t\tif ((err = snd_ctl_pcm_info(handle, pcminfo)) < 0) {\n\t\t\t\t\tif (err != -ENOENT)\n\t\t\t\t\t\tfprintf(stderr,\"snd_ctl_pcm_info (%i): %s\\n\",\n\t\t\t\t\t\t\t\tcard, snd_strerror(err));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (n == count) {\n\t\t\t\tstrncpy(devname,snd_ctl_card_info_get_name(info),MAX_NAME_LEN);\n#if 0\n\t\t\t\tprintf(\"snd_name '%s' -> dev_name '%s'\\n\",\n\t\t\t\t\t\tsnd_ctl_card_info_get_name(info),\n\t\t\t\t\t\tdevname);\n#endif\n\t\t\t\treturn devname;\n\t\t\t}\n\t\t\tcount += 1;\n\t\t}\n\t\tsnd_ctl_close(handle);\n\tnext_card:\n\t\tif (snd_card_next(&card) < 0) {\n\t\t\tfprintf(stderr,\"snd_card_next\\n\");\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn 0;\n}\n\n#if HARDWIRE_DEFAULT\nstatic int sound_GetNumberOfSoundPlayerDevices(void) { return 1; }\n\nstatic int sound_GetNumberOfSoundRecorderDevices(void) { return 1; }\n\nstatic char* sound_GetDefaultSoundPlayer(void) { return \"default\"; }\n\nstatic char* sound_GetDefaultSoundRecorder(void) { return \"default\"; }\n\nstatic char* sound_GetSoundPlayerDeviceName(int n) { return \"default\"; }\n\nstatic char* sound_GetSoundRecorderDeviceName(int n) { return \"default\"; }\n\n#else /* HARDWIRE_DEFAULT */\nstatic int sound_GetNumberOfSoundPlayerDevices(void)\n{\n\treturn numDevicesOfType(SND_PCM_STREAM_PLAYBACK);\n}\n\nstatic int sound_GetNumberOfSoundRecorderDevices(void)\n{\n\treturn numDevicesOfType(SND_PCM_STREAM_CAPTURE);\n}\n\nstatic char* sound_GetDefaultSoundPlayer(void)\n{\n\treturn sound_playback;\n}\n\nstatic char* sound_GetDefaultSoundRecorder(void)\n{\n\treturn sound_capture;\n}\n\nstatic char* sound_GetSoundPlayerDeviceName(int n)\n{\n\treturn nameOfNthDeviceOfType(n, SND_PCM_STREAM_PLAYBACK);\n}\n\nstatic char* sound_GetSoundRecorderDeviceName(int n)\n{\n\treturn nameOfNthDeviceOfType(n, SND_PCM_STREAM_CAPTURE);\n}\n#endif /* HARDWIRE_DEFAULT */\n\nstatic void sound_SetDefaultSoundPlayer(char *deviceName)\n{\n\tprintf(\"sound_SetDefaultSoundPlayer(%s)\\n\", deviceName);\n\t// a.k.a. sound_SetDevice(1 /* playback */,deviceName);\n\tstrncpy(sound_playback, deviceName, DEVICE_NAME_LEN);\n}\n\nstatic void sound_SetDefaultSoundRecorder(char *deviceName)\n{\n\tprintf(\"sound_SetDefaultSoundRecorder(%s)\\n\", deviceName);\n\t// a.k.a. sound_SetDevice(2 /* capture */,deviceName);\n\tstrncpy(sound_capture, deviceName, DEVICE_NAME_LEN);\n}\n\n#if SqSoundVersionMajor > 1 || SqSoundVersionMinor >= 3\n/* Acoustic echo-cancellation (AEC) is not supported on Linux yet. */\nint sound_SupportsAEC(void)                 { return 0; }\n\n/* Acoustic echo-cancellation (AEC) is not supported on Linux yet. */\nint sound_EnableAEC(int trueOrFalse)\n{\n\tif (trueOrFalse) return PrimErrUnsupported;\n\telse return 0; /* success */\n}\n#endif /* SqSoundVersionMajor > 1 || SqSoundVersionMinor >= 3 */\n\n\n/* signal support */\n/* At least up until version 1.0.22 libasound/ALSO is badly broken w.r.t. signal\n * handling.\n * The library as it is usually built (i.e. without SND_ASYNC_RT_SIGNAL)\n * installs a SIGIO signal handler as part of snd_async_add_handler and\n * uninstalls it as part of snd_async_del_handler.  Any previous handler\n * is ignored. There are two bugs here.\n *\n * 1. once snd_async_add_handler has been invoked any previous SIGIO handler\n * is not invoked.\n *\n * 2. the sequence of snd_async_add_handler followed by snd_async_del_handler\n * always restores SIGIO hanbdling to SIG_DLF which is to terminate the\n * program.  So if one has an X comnection open the program will exit after\n * snd_async_del_handler removes the last handler.\n *\n * There is an inadequate work-around implemented here to install the previous\n * handler ASAP.  But we prefer to build our own libasound with the issue fixed\n * in unixbuild/third-party/alsa-lib-1.0.17a/src/async.h.\n */\n#if WORK_AROUND_BROKEN_LIBASOUND\nstatic void *previous_sigio_handler= 0;\n\nstatic void sigio_save(void)\n{\n  if (!previous_sigio_handler) {\n\t/* Discover the existing sigio handler before libasound installs its own\n\t * so that we can restore it on unload/close.\n\t */\n    previous_sigio_handler= signal(SIGIO, SIG_IGN);\n    signal(SIGIO, previous_sigio_handler);\n  }\n}\n\nstatic void sigio_restore(void)\n{ \n  if (previous_sigio_handler)\n    signal(SIGIO, previous_sigio_handler);\n}\n#endif /* WORK_AROUND_BROKEN_LIBASOUND */\n\n\n/* module */\n\n\nSqSoundDefine(ALSA);\n\n#include \"SqModule.h\"\n\nstatic void sound_parseEnvironment(void)\n{\n  char *ev= 0;\n\n  sound_SetDevice(0, NULL);\n  sound_SetDevice(1, NULL);\n  sound_SetDevice(2, NULL);\n\n  if (     getenv(\"SQUEAK_NOMIXER\"   ))\tsound_nomixer= 1;\n  if ((ev= getenv(\"SQUEAK_SOUNDCARD\")))\tsound_SetDevice(0, ev);\n  if ((ev= getenv(\"SQUEAK_PLAYBACK\" )))\tsound_SetDevice(1, ev);\n  if ((ev= getenv(\"SQUEAK_CAPTURE\"  )))\tsound_SetDevice(2, ev);\n}\n\nstatic int  sound_parseArgument(int argc, char **argv)\n{\n  if     (!strcmp(argv[0], \"-nomixer\"  )) { sound_nomixer= 1;\t\treturn 1; }\n  else if (argv[1])\n    {\n      if (!strcmp(argv[0], \"-soundcard\")) { sound_SetDevice(0, argv[1]);\treturn 2; }\n      if (!strcmp(argv[0], \"-playback\" )) { sound_SetDevice(1, argv[1]);\treturn 2; }\n      if (!strcmp(argv[0], \"-capture\"  )) { sound_SetDevice(2, argv[1]);\treturn 2; }\n    }\n  return 0;\n}\n\nstatic void  sound_printUsage(void)\n{\n  printf(\"\\nALSA <option>s:\\n\");\n  printf(\"  -nomixer              disable mixer (volume) adjustment\\n\");\n  printf(\"  -soundcard <name>     open the named sound card (default: %s)\\n\", sound_device);\n  printf(\"  -playback <name>      play to the named sound device (default: %s)\\n\", sound_playback);\n  printf(\"  -capture <name>       record from the named sound device (default: %s)\\n\", sound_capture);\n}\n\nstatic void  sound_printUsageNotes(void) {}\n\nstatic void *sound_makeInterface(void)\n{\n#if WORK_AROUND_BROKEN_LIBASOUND\n  sigio_save();\n#endif\n  return &sound_ALSA_itf;\n}\n\nSqModuleDefine(sound, ALSA);\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-sound-MacOSX/Makefile.inc",
    "content": "PLIBS=\t\t-Wl,-framework -Wl,CoreAudio \\\n\t\t-Wl,-framework -Wl,AudioToolbox\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-sound-MacOSX/acinclude.m4",
    "content": "# -*- sh -*-\n\nAC_MSG_CHECKING([for Mac OS X CoreAudio])\nAC_TRY_COMPILE([#include <CoreAudio/CoreAudio.h>],[kAudioHardwareNoError;],[\n  AC_MSG_RESULT(yes)\n\n],[\n  AC_MSG_RESULT(no)\n  AC_PLUGIN_DISABLE\n])\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-sound-MacOSX/build.cmake",
    "content": "SET (CMAKE_SHARED_MODULE_CREATE_C_FLAGS \"${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} -framework CoreAudio -framework AudioToolbox\")\nEXPECT_UNDEFINED_SYMBOLS ()\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-sound-MacOSX/config.cmake",
    "content": "IF (NOT APPLE)\n  PLUGIN_DISABLE ()\nENDIF ()\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-sound-MacOSX/sqUnixSoundDebug.h",
    "content": "#if 0\n\n# define startSpy();\n# define stopSpy();\n\n#else\n\n#define RED\t0xff0000\n#define GREEN\t0x00ff00\n#define BLUE\t0x0000ff\n#define WHITE\t0xffffff\n#define BLACK\t0x000000\n\n#include <pthread.h>\n\nvoid rect(int h, int c, float l, float r)\n{\n  extern long *dpyPixels;\n  extern int   dpyPitch;\n  int left= 250, width= 100, height= 2;\n  long *base=  dpyPixels;\n  int   pitch= dpyPitch / sizeof(long);\n  int x, y;\n\n  //printf(\"rect %d %d %g %g\\n\", h, c, l, r);\n  assert(l >= 0.0);  assert(r >= 0.0);\n  assert(l <= 1.0);  assert(r <= 1.0);\n\n  base+= (int)left;\n  base+= (int)(h * height * pitch);\n\n  for (y= 0; y < height; ++y)\n    {\n      for (x= (int)(width * l); x < (int)(width * r); ++x)\n\t((long *)base)[x]= c;\n      base+= pitch;\n    }\n}\n\nvoid fill(int h, int c, float l, float r)\n{\n  if (r > 1.0)\n    {\n      rect(h, c, l, 1.0);\n      rect(h, c, 0.0, r - 1.0);\n    }\n  else\n    rect(h, c, l, r);\n}\n\n\n#if (USE_FIFO)\n\nvoid update(void)\n{\n  if (output)\n    {\n      Buffer *b=   output->buffer;\n      static int phase= 0;\n      float size=  b->size;\n      float out=   b->optr / size;\n      float avail= b->avail / size;\n      extern long *dpyPixels;\n\n      fill(0,BLACK, 0.0, out);\n      fill(0,GREEN, out, out+avail);\n      if (out + avail < 1.0)\n\tfill(0,BLACK, out+avail, 1.0);\n      fill(2,GREEN, 0.0, avail);\n      fill(2,BLACK, avail, 1.0);\n\n      phase= 1 - phase;\n      feedback(10, phase * WHITE);\n\n      memcpy(dpyPixels + 400, output->buffer->data, 400);\n    }\n}\n\n#else\n\nvoid update(void)\n{\n}\n\n#endif\n\n\nstatic int       running= 0;\nstatic pthread_t spyThread;\n\nstatic void *spy(void *ignored)\n{\n  struct sched_param params;\n  int                policy;\n  if (pthread_getschedparam(pthread_self(), &policy, &params))\n    perror(\"getschedparam\");\n  params.sched_priority+= 9;\n  if (pthread_setschedparam(pthread_self(), SCHED_RR, &params))\n    perror(\"setschedparam\");\n  for (;;)\n    {\n      update();\n      usleep(10000);\n    }\n}\n\nvoid startSpy(void)\n{\n  if (!pthread_create(&spyThread, 0, spy, 0))\n    running= 1;\n  else\n    perror(\"pthread_create(spy)\");\n}\n\nvoid stopSpy(void)\n{\n  if (running)\n    {\n      if (!pthread_cancel(spyThread))\n\trunning= 0;\n      else\n\tperror(\"pthread_cancel(spy)\");\n      running= 0;\n    }\n}\n\n\n#endif // (DEBUG)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-sound-MacOSX/sqUnixSoundMacOSX.c",
    "content": "# if !Configure_Squeak_Code_for_Tilera  // xxx_dmu\n/* sqUnixSoundMacOSX.c -- sound support for CoreAudio on Mac OS 10\n *\n * Author: Ian.Piumarta@squeakland.org\n * \n * Last edited: 2005-03-17 21:36:05 by piumarta on squeak.hpl.hp.com\n *\n *   Copyright (C) 1996-2005 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n */\n\n// Notes:\n// \n// The image always generates stereo samples.  Since the only\n// supported hardware format is stereo, I cheerfully ignore the stereo\n// flag in snd_Start().  (Mixing everything down to mono only to have\n// the format converter break it back into stereo seems pointless.)\n\n\n/// \n/// Things you can tweak, should you really want to...\n/// \n\n// Do we obey the (huge) default \"lead\" time of 1024 frames (supplied\n// by the image) when mixing frames into the buffer, or do we reduce\n// the lead time to to an absolute (safe) minimum?\n//\n#define OBEY_LEAD_TIME\t0\n\n/// \n/// No more user-serviceable parts in this file.  Stop Tweaking Now!\n/// \n\n\n#include <CoreAudio/CoreAudio.h>\n#include <AudioToolbox/AudioConverter.h>\n\n# include \"squeak_adapters.h\"\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdarg.h>\n#include <unistd.h>\n#include <string.h>\n#include <assert.h>\n\n#define SqueakFrameSize\t4\t// guaranteed (see class SoundPlayer)\n#define DeviceFrameSize\t8\t// ditto (<CoreAudio/AudioHardware.h>, para 9)\n\nstatic inline int min(int i, int j) { return (i < j) ? i : j; }\nstatic inline int max(int i, int j) { return (i > j) ? i : j; }\n\n#define DEBUG\t0\n#define TESTING\t0\n\n#if (!TESTING)\n# include \"sq.h\"\n#else\n  static int noSoundMixer= 0;\n  static inline int signalSemaphoreWithIndex(int sema) { return 0; }\n  static inline int success(int flag) { return 0; }\n  static inline int primitiveFail(void) { return -1; }\n#endif\n\n#if (DEBUG)\n\nstatic void dumpFormat(AudioStreamBasicDescription *fmt); // atend\n\nstatic void DPRINTF(const char *fmt, ...)\n{\n  va_list ap;\n  va_start(ap, fmt);\n  vprintf(fmt, ap);\n  va_end(ap);\n}\n\n#else // !DEBUG\n\nstatic inline void dumpFormat(AudioStreamBasicDescription *fmt) {}\nstatic inline void DPRINTF(const char *fmt, ...) {}\n\n#endif // !DEBUG\n\nstatic void EPRINTF(const char *fmt, ...)\n{\n  va_list ap;\n  va_start(ap, fmt);\n  vfprintf(stderr, fmt, ap);\n  va_end(ap);\n}\n\n\n// Apple error codes are really (rather contrived) 4-byte chars with\n// (almost) meaningful content.\n// \nstatic char *str4(UInt32 chars)\n{\n  static char str[5];\n  *(int *)&str= chars;\n  str[4]= '\\0';\n  return str;\n}\n\nstatic inline int checkError(OSStatus err, char *op, char *param)\n{\n  if (kAudioHardwareNoError != noErr)\n    {\n      EPRINTF(\"sound: %s(%s): error %ld (%s)\\n\", op, param, err, str4(err));\n      return 1;\n    }\n  return 0;\n}\n\n\n/// \n/// (ring) Buffer -- a FIFO of bytes\n/// \n\n\ntypedef struct\n{\n  char *data;\n  int   size;\t// capacity\n  int   avail;\t// available data (not available space)\n  int   iptr;\t// next position to write\n  int   optr;\t// next position to read\n} Buffer;\n\n\n// allocate a new, empty buffer\n// \nBuffer *Buffer_new(int size)\n{\n  Buffer *b= (Buffer *)malloc(sizeof(Buffer));\n  if (!b)\n    return 0;\n  if (!(b->data= (char *)malloc(size)))\n    {\n      free(b);\n      return 0;\n    }\n  b->size=  size;\n  b->avail= 0;\n  b->iptr=  0;\n  b->optr=  0;\n  return b;\n}\n\n// deallocate a buffer\n// \nvoid Buffer_delete(Buffer *b)\n{\n  assert(b && b->data);\n  free(b->data);\n  free(b);\n}\n\n// answer how many bytes are available for reading\n// \ninline int Buffer_avail(Buffer *b)\n{\n  return b->avail;\n}\n\n// answer how many bytes can be written\n// \ninline int Buffer_free(Buffer *b)\n{\n  return b->size - Buffer_avail(b);\n}\n\n// set outputs to address and size of zero (empty), one (contiguous) or two\n// (wrapped, fragmented) populated regions in the buffer\n// \ninline int Buffer_getOutputPointers(Buffer *b, char **p1, int *n1, char **p2, int *n2)\n{\n  int optr=     b->optr;\n  int avail=    Buffer_avail(b);\n  int headroom= b->size - optr;\n  if (avail == 0)\n    {\n      *p1=\t\t\t*p2= 0;\n      *n1=\t\t\t*n2= 0;\n      return 0;\n    }\n  else if (avail <= headroom)\n    {\n      *p1= b->data + optr;\t*p2= 0;\n      *n1= avail;\t\t*n2= 0;\n      return 1;\n    }\n  else\n    {\n      *p1= b->data + optr;\t*p2= b->data;\n      *n1= headroom;\t\t*n2= avail - headroom;\n      return 2;\n    }\n}\n\n// set the output to the current read position and answer the amount of\n// data at that location\n// \ninline int Buffer_getOutputPointer(Buffer *b, char **ptr)\n{\n  int optr=     b->optr;\n  int avail=    Buffer_avail(b);\n  int headroom= b->size - optr;\n  if (headroom < avail) avail= headroom;\n  assert((optr + avail) <= b->size);\n  *ptr= b->data + optr;\n  return avail;\n}\n\n// set the output to the current write location and answer the number of\n// bytes that can be written to that location\n// \ninline int Buffer_getInputPointer(Buffer *b, char **ptr)\n{\n  int iptr=     b->iptr;\n  int nfree=    Buffer_free(b);\n  int headroom= b->size - iptr;\n  if (headroom < nfree) nfree= headroom;\n  assert((iptr + nfree) <= b->size);\n  *ptr= b->data + iptr;\n  return nfree;\n}\n\n// increment the output pointer over a contiguous section of buffer\n// \ninline void Buffer_advanceOutputPointer(Buffer *b, int size)\n{\n  int optr=  b->optr;\n  int avail= b->avail;\n  optr+=  size;\n  avail-= size;\n  assert(optr <= b->size);\n  assert(avail >= 0);\n  if (optr == b->size) optr= 0;\n  b->optr=  optr;\n  b->avail= avail;\n}\n\n// advance the input pointer over a contiguous section of buffer\n// \ninline void Buffer_advanceInputPointer(Buffer *b, int size)\n{\n  int iptr= b->iptr;\n  int nfree= Buffer_free(b);\n  nfree -= size;\n  assert(nfree >= 0);\n  iptr += size;\n  assert(iptr <= b->size);\n  if (iptr == b->size) iptr= 0;\n  b->iptr= iptr;\n  b->avail += size;\n}\n\n// clear the given number of bytes at the input position and advance the\n// input pointer past them\n// \ninline void Buffer_prefill(Buffer *b, int bytes)\n{\n  char *ptr;\n  int   size= Buffer_getInputPointer(b, &ptr);\n  assert(bytes <= size);\n  memset(ptr, 0, size);\n  Buffer_advanceInputPointer(b, bytes);\n}\n\n// write at most nbytes from buf into the buffer, wrapping in the middle if\n// necessary.  answer the actual number of bytes written.\n// \ninline int Buffer_write(Buffer *b, char *buf, int nbytes)\n{\n  int iptr= b->iptr;\n  int bytesToCopy= min(nbytes, Buffer_free(b));\n  int headroom= b->size - iptr;\n  int bytesCopied= 0;\n\n  if (bytesToCopy >= headroom)\n    {\n      memcpy(b->data + iptr, buf, headroom);\n      iptr= 0;\n      bytesCopied += headroom;\n      bytesToCopy -= headroom;\n    }\n  if (bytesToCopy)\n    {\n      memcpy(b->data + iptr, buf + bytesCopied, bytesToCopy);\n      iptr += bytesToCopy;\n      bytesCopied += bytesToCopy;\n    }\n  b->iptr= iptr;\n  b->avail += bytesCopied;\n  assert(b->avail <= b->size);\n  return bytesCopied;\n}\n\n// read at most nbytes from the buffer into buf, wrapping in the middle if\n// necessary.  answer the actual number of bytes read.\n// \ninline int Buffer_read(Buffer *b, char *buf, int nbytes)\n{\n  int optr= b->optr;\n  int bytesToCopy= min(nbytes, Buffer_avail(b));\n  int headroom= b->size - optr;\n  int bytesCopied= 0;\n\n  if (bytesToCopy >= headroom)\n    {\n      memcpy(buf, b->data + optr, headroom);\n      optr= 0;\n      bytesToCopy -= headroom;\n      bytesCopied += headroom;\n      if (bytesToCopy)\n\t{\n\t  memcpy(buf + bytesCopied, b->data, bytesToCopy);\n\t  optr= bytesToCopy;\n\t  bytesCopied += bytesToCopy;\n\t}\n    }\n  else\n    {\n      memcpy(buf, b->data + optr, bytesToCopy);\n      optr += bytesToCopy;\n      bytesCopied= bytesToCopy;\n    }\n  b->optr= optr;\n  b->avail -= bytesCopied;\n  return bytesCopied;\n}\n\n\n/// \n/// Stream -- abstraction over CoreAudio devices and streams\n/// \n\n\ntypedef struct Stream\n{\n  AudioDeviceID\t\t id;\t\t\t// associated with this stream\n  int\t\t\t direction;\t\t// 1nput/0utput\n  int\t\t\t sampleRate;\t\t// Squeak frames per second\n  int\t\t\t channels;\t\t// channels per Squeak frame\n  int\t\t\t devBufSize;\t\t// bytes per device buffer\n  int\t\t\t imgBufSize;\t\t// bytes per Squeak buffer\n  int\t\t\t cvtBufSize;\t\t// bytes per converter buffer\n  Buffer\t\t*buffer;\t\t// fifo\n  AudioConverterRef\t converter;\t\t// frame format converter\n  int\t\t\t semaphore;\t\t// ping me!\n  u_int64_t\t\t timestamp;\t\t// nominal buffer tail time (uSecs)\n} Stream;\n\n\nstatic Stream *output= 0;\nstatic Stream *input=  0;\n\n\n#if (!TESTING)\n# include \"sqUnixSoundDebug.h\"\n#endif\n\n\n// tell the SoundPlayer that output can be written.\n//\nstatic void ioProcSignal(int semaphore)\n{\n  if (semaphore)\n    signalSemaphoreWithIndex(semaphore);\n}\n\n\nstatic OSStatus bufferDataProc(AudioConverterRef inAudioConverter, UInt32 *ioDataSize, void  **outData, void  *context)\n{\n  Stream *s= (Stream *)context;\n  Buffer *b= s->buffer;\n  char *p1, *p2;\n  int   n1,  n2;\n  Buffer_getOutputPointers(b, &p1, &n1, &p2, &n2);\n  if (!n1)\n    {\n      static char empty[256];\n      *ioDataSize= min(256, *ioDataSize);\n      *outData= (void *)empty;\n#    if (DEBUG)\n      putchar('-');  fflush(stdout);\n#    endif\n    }\n  else\n    {\n      *ioDataSize= n1= min(n1, *ioDataSize);\n      *outData= (void *)p1;\n      Buffer_advanceOutputPointer(b, n1);\n#     if (DEBUG)\n      putchar('+');  fflush(stdout);\n#     endif\n    }\n  return kAudioHardwareNoError;\n}\n\n\n// shipout to device (usually 512 frames at 44k1 for builtin audio and\n// USB).  this is asynchronous and runs (implicitly) in its own thread.\n// \nstatic OSStatus ioProcOutput(AudioDeviceID\t    device,\n\t\t\t     const AudioTimeStamp  *currentTime,\n\t\t\t     const AudioBufferList *inputData,\n\t\t\t     const AudioTimeStamp  *inputTime,\n\t\t\t     AudioBufferList\t   *outputData,\t// io param\n\t\t\t     const AudioTimeStamp  *outputTime,\n\t\t\t     void\t\t   *context)\n{\n  Stream *s= (Stream *)context;\n  Buffer *b= s->buffer;\n  if (Buffer_free(b) >= s->imgBufSize)\n    ioProcSignal(s->semaphore);\t\t// restart SoundRecorder\n  return AudioConverterFillBuffer(((Stream *)context)->converter, bufferDataProc, context,\n\t\t\t\t  &outputData->mBuffers[0].mDataByteSize,\n\t\t\t\t  outputData->mBuffers[0].mData);\n}\n\n\n// shipin from device (usually 512 frames at 44k1).  this is asynchronous and\n// runs (implicitly) in its own thread.\n// \nstatic OSStatus ioProcInput(AudioDeviceID\t    device,\n\t\t\t    const AudioTimeStamp  *currentTime,\n\t\t\t    const AudioBufferList *inputData,\n\t\t\t    const AudioTimeStamp  *inputTime,\n\t\t\t    AudioBufferList\t   *outputData,\t// io param\n\t\t\t    const AudioTimeStamp  *outputTime,\n\t\t\t    void\t\t   *context)\n{\n  Stream *s= (Stream *)context;\n  Buffer *b= s->buffer;\n  int     n= Buffer_free(b);\n  if (n >= inputData->mBuffers[0].mDataByteSize)\n    Buffer_write(b, inputData->mBuffers[0].mData, inputData->mBuffers[0].mDataByteSize);\n  if (Buffer_avail(b) >= s->imgBufSize)\n    ioProcSignal(s->semaphore);\t\t// restart SoundRecorder\n  return kAudioHardwareNoError;\n}\n\n\nstatic int getDefaultDevice(AudioDeviceID *id, int direction)\n{\n  UInt32 sz= sizeof(*id);\n  return (!checkError(AudioHardwareGetProperty((direction\n\t\t\t\t\t\t? kAudioHardwarePropertyDefaultInputDevice\n\t\t\t\t\t\t: kAudioHardwarePropertyDefaultOutputDevice),\n\t\t\t\t\t       &sz, (void *)id),\n\t\t      \"GetProperty\", (direction ? \"DefaultInput\" : \"DefaultOutput\")));\n}\n\n\n// allocate and a Stream and associate it with a suitable device.\n//\nstatic Stream *Stream_new(int dir)\n{\n  AudioDeviceID id= 0;\n  Stream       *s=  0;\n\n  if (!getDefaultDevice(&id, dir))\n    return 0;\t// no device available\n\n  if (!(s= (Stream *)calloc(1, sizeof(Stream))))\n    {\n      EPRINTF(\"out of memory\");\n      return 0;\n    }\n  s->id=\tid;\n  s->direction= dir;\n  DPRINTF(\"stream %p[%d] created for device %ld\\n\", s, dir, id);\n\n  return s;\n}\n\n\n// deallocate a Stream.\n//\nstatic void Stream_delete(Stream *s)\n{\n  assert(s && s->buffer);\n  Buffer_delete(s->buffer);\n  DPRINTF(\"stream %p[%d] deleted\\n\", s, s->direction);\n  free(s);\n}\n\n\n// setup conversion from Squeak to device frame format, or vice-versa.\n// requires: stereo for output, stereo or mono for input.\n//\nstatic int Stream_setFormat(Stream *s, int frameCount, int sampleRate, int stereo)\n{\n  int nChannels=\t1 + stereo;\n  AudioStreamBasicDescription imgFmt, devFmt;\n  UInt32 sz= sizeof(devFmt);\n\n  if (0 == s->direction) nChannels= 2;\t// insist\n\n  if (checkError(AudioDeviceGetProperty(s->id, 0, s->direction,\n\t\t\t\t\tkAudioDevicePropertyStreamFormat,\n\t\t\t\t\t&sz, &devFmt),\n\t\t \"GetProperty\", \"StreamFormat\"))\n    return 0;\n\n  DPRINTF(\"stream %p[%d] device format:\\n\", s, s->direction);  dumpFormat(&devFmt);\n\n  imgFmt.mSampleRate\t   = sampleRate;\n  imgFmt.mFormatID\t   = kAudioFormatLinearPCM;\n  imgFmt.mFormatFlags\t   = kLinearPCMFormatFlagIsBigEndian | kLinearPCMFormatFlagIsSignedInteger;\n  imgFmt.mBytesPerPacket   = SqueakFrameSize / (3 - nChannels);\n  imgFmt.mFramesPerPacket  = 1;\n  imgFmt.mBytesPerFrame    = SqueakFrameSize / (3 - nChannels);\n  imgFmt.mChannelsPerFrame = nChannels;\n  imgFmt.mBitsPerChannel   = 16;\n\n  DPRINTF(\"stream %p[%d] image format:\\n\", s, s->direction);  dumpFormat(&imgFmt);\n\n  if (s->direction) // input\n    {\n      if (checkError(AudioConverterNew(&devFmt, &imgFmt, &s->converter), \"AudioConverter\", \"New\"))\n\treturn 0;\n      sz= sizeof(s->cvtBufSize);\n      s->cvtBufSize= 512 * devFmt.mBytesPerFrame;\n      if (checkError(AudioConverterGetProperty(s->converter, kAudioConverterPropertyCalculateOutputBufferSize,\n\t\t\t\t\t       &sz, &s->cvtBufSize), \n\t\t     \"GetProperty\", \"OutputBufferSize\"))\n\treturn 0;\n    }\n  else // output\n    {\n      if (checkError(AudioConverterNew(&imgFmt, &devFmt, &s->converter), \"AudioConverter\", \"New\"))\n\treturn 0;\n    }\n\n  s->channels=   nChannels;\n  s->sampleRate= sampleRate;\n  s->imgBufSize= SqueakFrameSize * nChannels * frameCount;\n\n  frameCount= max(frameCount, 512 * sampleRate / devFmt.mSampleRate);\n\n  s->buffer= Buffer_new((s->direction ? DeviceFrameSize : SqueakFrameSize) * nChannels * frameCount * 2);\n\n  DPRINTF(\"stream %p[%d] sound buffer size %d/%d (%d)\\n\", s, s->direction, s->imgBufSize, s->buffer->size, frameCount);\n\n  return 1;\n}\n\n\n// start the device attached to the stream.\n// \nstatic int Stream_startSema(Stream *s, int semaIndex)\n{\n  AudioDeviceIOProc ioProc= s->direction ? ioProcInput : ioProcOutput;\n\n  DPRINTF(\"stream %p[%d] startSema: %d\\n\", s, s->direction, semaIndex);\n  \n  s->semaphore= semaIndex;\t// can be zero\n  if (checkError(AudioDeviceAddIOProc(s->id, ioProc, (void *)s),\n\t\t \"Add\", \"ioProcOut\"))\n    return 0;\n  if (checkError(AudioDeviceStart(s->id, ioProc),\n\t\t \"DeviceStart\", \"ioProcOut\"))\n    {\n      AudioDeviceRemoveIOProc(s->id, ioProc);\n      return 0;\n    }\n  DPRINTF(\"stream %p[%d] running\\n\", s, s->direction);\n  return 1;\n}\n\n\n// stop the device attached to a stream.\n// \nstatic int Stream_stop(Stream *s)\n{\n  AudioDeviceIOProc ioProc= s->direction ? ioProcInput : ioProcOutput;\n  checkError(AudioDeviceStop(s->id, ioProc),\n\t     \"DeviceStop\", s->direction ? \"ioProcIn\" : \"ioProcOut\");\n  checkError(AudioDeviceRemoveIOProc(s->id, ioProc),\n\t     \"Remove\", s->direction ? \"ioProcIn\" : \"ioProcOut\");\n  DPRINTF(\"stream %p[%d] stopped\\n\", s, s->direction);\n  return 1;\n}\n\n\n/// \n/// sound output primitives\n/// \n\n\nstatic sqInt sound_AvailableSpace(void)\n{\n  if (output)\n    return Buffer_free(output->buffer);\n  success(false);\n  return 8192;\t// so that older images can cope\n}\n\n\n// mix nFrames of samples into an output buffer.\n// \nstatic void mixFrames(short *out, short *in, int nFrames)\n{\n  while (nFrames--)\n    {\n      int sample;\n      sample= (int)*out + (int)*in++;  *out++= (short)max(-32768, min(32767, sample));\n      sample= (int)*out + (int)*in++;  *out++= (short)max(-32768, min(32767, sample));\n    }\n}\n\n\n// insert up to frameCount (and no less than frameCount/2 -- see SoundPlayer\n// class>>startPlayingImmediately: for the [bogus] reasons why) frames into\n// the front and back buffers, leaving some number of framesOfLeadTime\n// intact before starging the insertion.  (this last parameter is\n// meaningless for us and could be reduced to zero, but ignoring it causes\n// strange things to happen.  time to rething the image code, methinks.)\n// \n// Note: this is only used when the \"sound quick start\" preference is\n// enabled in the image.\n// \nstatic sqInt sound_InsertSamplesFromLeadTime(sqInt frameCount, sqInt srcBufPtr, sqInt framesOfLeadTime)\n{\n  Stream *s= output;\n\n  DPRINTF(\"snd_InsertSamples %d From %p LeadTime %d\\n\", frameCount, srcBufPtr, framesOfLeadTime);\n\n  if (s)\n    {\n      // data already sent to the device is lost forever, although latency\n      // is only a few hundred frames (and is certainly much lower than the\n      // standard value of `framesOfLeadTime').  instead of putzing around\n      // why not just mix the samples in right away, leaving one h/w\n      // buffer's worth of lead time in case we're interrupted in the\n      // middle?\n\n      char *frontData=   0, *backData=   0;\n      int   frontFrames= 0,  backFrames= 0;\n      int   framesDone=  0;\n      int   leadBytes;\n\n#    if (OBEY_LEAD_TIME)\n      {\n\tAudioTimeStamp timeStamp;\n\tu_int64_t      then, now;\n\n\ttimeStamp.mFlags= kAudioTimeStampHostTimeValid;\n\tcheckError(AudioDeviceGetCurrentTime(s->id, &timeStamp),\n\t\t   \"AudioDeviceGetCurrentTime\", \"\");\n\tnow= AudioConvertHostTimeToNanos(timeStamp.mHostTime) / 1000ull;\n\tthen= s->timestamp;\n\tleadBytes= ( ((now - then) * (u_int64_t)s->sampleRate) / 1000000ull\n\t\t     + framesOfLeadTime ) * SqueakFrameSize;\n      }\n#    else\n      {\n\tleadBytes= s->devBufSize;\t// quantum shipped to the hardware\n      }\n#    endif\n\n      {\n\tint   availBytes;\n\tint   byteCount= frameCount * SqueakFrameSize;\n\tBuffer_getOutputPointers(s->buffer,\n\t\t\t\t &frontData, &frontFrames,\t// bytes!\n\t\t\t\t &backData,  &backFrames);\t// bytes!\n\tavailBytes= frontFrames + backFrames;\n\t// don't consume more than frameCount - 1 frames\n\tleadBytes= max(leadBytes, availBytes - byteCount + SqueakFrameSize);\n\n\tassert((availBytes - leadBytes) <  (byteCount));\n\n\tif (leadBytes < frontFrames)\t// skip leadBytes into first fragment\n\t  {\n\t    frontData   += leadBytes;\n\t    frontFrames -= leadBytes;\n\t  }\n\telse\t\t\t\t// omit the first fragment\n\t  {\n\t    leadBytes -= frontFrames;\t// lead in second fragment\n\t    frontFrames= 0;\n\t    backData   += leadBytes;\t// skip leadBytes into second fragment\n\t    backFrames -= leadBytes;\n\t  }\n\tfrontFrames /= SqueakFrameSize;\n\tbackFrames  /= SqueakFrameSize;\n      }\n\n      assert((frontFrames + backFrames) < frameCount);\t// avoid bug in image\n\n      if ((frontFrames + backFrames) >= (frameCount / 2))\n\t{\n\t  mixFrames((short *)frontData, (short *)pointerForIndex_xxx_dmu(srcBufPtr), frontFrames);\n\t  srcBufPtr += frontFrames * SqueakFrameSize;\n\t  mixFrames((short *)backData,  (short *)pointerForIndex_xxx_dmu(srcBufPtr), backFrames);\n\t  framesDone= frontFrames + backFrames;\n\t}\n      return framesDone;\n    }\n\n  success(false);\n  return frameCount;\n}\n\n\n// play (exactly) frameCount of samples (and no less, since the result is\n// ignored).\n// \nstatic sqInt sound_PlaySamplesFromAtLength(sqInt frameCount, sqInt arrayIndex, sqInt startIndex)\n{\n  if (output)\n    {\n      int byteCount= frameCount * SqueakFrameSize;\n      if (Buffer_free(output->buffer) >= byteCount)\n\t{\n\t  Buffer_write(output->buffer,\n\t\t       pointerForIndex_xxx_dmu(arrayIndex) + (startIndex * SqueakFrameSize),\n\t\t       byteCount);\n\t  return frameCount;\n\t}\n      return 0;\n    }\n  success(false);\n  return 8192;\n}\n\n\n// play a buffer's worth of silence (as quietly as possible).\n// \nstatic sqInt sound_PlaySilence(void)\n{\n  success(false);\n  return 8192;\n}\n\n\n// shut down sound output.\n// \nstatic sqInt sound_Stop(void)\n{\n  DPRINTF(\"snd_Stop\\n\");\n  \n  if (output)\n    {\n      Stream_stop(output);\n      Stream_delete(output);\n      output= 0;\n    }\n  return 1;\n}\n\n\n// start up sound output.\n// \nstatic sqInt sound_Start(sqInt frameCount, sqInt samplesPerSec, sqInt stereo, sqInt semaIndex)\n{\n  Stream *s= 0;\n\n  DPRINTF(\"snd_Start frames: %d samplesPerSec: %d stereo: %d semaIndex: %d\\n\",\n\t   frameCount, samplesPerSec, stereo, semaIndex);\n  \n  if (output)\t// there might be a change of sample rate\n    sound_Stop();\n\n  if ((s= Stream_new(0)))\t// 0utput\n    {\n      if ((  Stream_setFormat(s, frameCount, samplesPerSec, stereo))\n\t  && Stream_startSema(s, semaIndex))\n\t{\n\t  output= s;\n\t  return 1;\n\t}\n      Stream_delete(s);\n    }\n  return primitiveFail();\n}\n\n\n/// \n/// sound input\n/// \n\n\n// answer the input sample rate.  (this is guaranteed to be the same\n// as the sample rate that was requested.)\n// \nstatic double sound_GetRecordingSampleRate(void)\n{\n  if (input)\n    return (double)input->sampleRate;\t//xxx FIXME: this should be FP\n\n  primitiveFail();\n  return 0.0L;\n}\n\n\nstatic sqInt sound_StopRecording(void)\n{\n  DPRINTF(\"snd_StopRecording\\n\");\n\n  if (input)\n    {\n      Stream_stop(input);\n      Stream_delete(input);\n      input= 0;\n    }\n  return 1;\n}\n\n\n// start up sound input.\n// \nstatic sqInt sound_StartRecording(sqInt samplesPerSec, sqInt stereo, sqInt semaIndex)\n{\n  Stream *s= 0;\n\n  DPRINTF(\"snd_StartRecording rate: %d stereo: %d semaIndex: %d\\n\",\n\t   samplesPerSec, stereo, semaIndex);\n  \n  if (input)\t// there might be a change of sample rate\n    sound_StopRecording();\n\n  if ((s= Stream_new(1)))\t// 1nput\n    {\n      // approximate the frameCount that output uses for the same sample rate\n      int frameCount= 5288 * samplesPerSec / 44100;\n      if ((  Stream_setFormat(s, frameCount, samplesPerSec, stereo))\n\t  && Stream_startSema(s, semaIndex))\n\t{\n\t  input= s;\n\t  return 1;\n\t}\n      Stream_delete(s);\n    }\n  return primitiveFail();\n}\n\n\nstatic sqInt sound_RecordSamplesIntoAtLength(sqInt buf, sqInt startSliceIndex, sqInt bufferSizeInBytes)\n{\n  if (input)\n    {\n      if (Buffer_avail(input->buffer) >= (512 * DeviceFrameSize))\n\t{\n\t  int    start= startSliceIndex * SqueakFrameSize / 2;\n\t  UInt32 count= min(input->cvtBufSize, bufferSizeInBytes - start);\n\t  if (kAudioHardwareNoError == AudioConverterFillBuffer(input->converter, bufferDataProc, input,\n\t\t\t\t\t\t\t\t&count, pointerForIndex_xxx_dmu(buf) + start))\n\t    return count / (SqueakFrameSize / 2) / input->channels;\n\t}\n      return 0;\n    }\n  success(false);\n  return 0;\n}\n\n\n/// \n/// mixer\n/// \n\n\nstatic int getVolume(int dir, double *left, double *right)\n{\n  UInt32\tsz;\n  AudioDeviceID\tid;\n  Float32\tchan1, chan2;\n\n  if (!getDefaultDevice(&id, dir))\n    return 0;\n\n  sz= sizeof(chan1);\n  if (checkError(AudioDeviceGetProperty(id, 1, // left\n\t\t\t\t\tdir, kAudioDevicePropertyVolumeScalar,\n\t\t\t\t\t&sz, &chan1),\n\t\t \"GetProperty\", \"VolumeScalar\"))\n    return 0;\n  sz= sizeof(chan2);\n  if (checkError(AudioDeviceGetProperty(id, 2, // right\n\t\t\t\t\tdir, kAudioDevicePropertyVolumeScalar,\n\t\t\t\t\t&sz, &chan2),\n\t\t \"GetProperty\", \"VolumeScalar\"))\n    chan2= chan1;\n  \n  *left=  chan1;\n  *right= chan2;\n\n  return 1;\n}\n\n\nstatic int setVolume(int dir, double dleft, double dright)\n{\n  Float32 left=  (Float32)dleft;\n  Float32 right= (Float32)dright;\n  UInt32\t sz;\n  AudioDeviceID\t id;\n\n  if (!getDefaultDevice(&id, dir))\n    return 0;\n\n  sz= sizeof(left);\n  if (checkError(AudioDeviceSetProperty(id, 0, 1, // left\n\t\t\t\t\tdir, kAudioDevicePropertyVolumeScalar,\n\t\t\t\t\tsz, &left),\n\t\t \"SetProperty\", \"VolumeScalar\"))\n    return 0;\n\n  sz= sizeof(right);\n  if (checkError(AudioDeviceSetProperty(id, 0, 2, // right\n\t\t\t\t\tdir, kAudioDevicePropertyVolumeScalar,\n\t\t\t\t\tsz, &right),\n\t\t \"SetProperty\", \"VolumeScalar\"))\n    return 0;\n\n  return 1;\n}\n\n\n// get output gain, 0.0 <= { left, right } <= 1.0\n// \nstatic void sound_Volume(double *left, double *right)\n{\n  getVolume(0, left, right);\n}\n\n\n// set output gain, 0.0 <= { left, right } <= 1.0\n// \nstatic void sound_SetVolume(double left, double right)\n{\n  extern int noSoundMixer;\t//xxx FIXME: this should not be a global option\n\n  if (noSoundMixer)\n    return;\n\n  setVolume(0, left, right);\n}\n\n\n// set recording gain, 0 <= level <= 1000\n// \nstatic sqInt sound_SetRecordLevel(sqInt level)\n{\n  extern int noSoundMixer;\n\n  if (noSoundMixer)\n    return 0;\n\n  return setVolume(1, (double)level / 1000.0L, (double)level / 1000.0L);\n}\n\n\n/// \n/// debugging\n/// \n\n\n#if (DEBUG)\n\nstatic void dumpFormat(AudioStreamBasicDescription *fmt)\n{\n  UInt32 flags= fmt->mFormatFlags;\n\n  printf(\"  sample rate         %g\\n\",\tfmt->mSampleRate);\n  printf(\"  format              %s\\n\",  str4(fmt->mFormatID));\n  printf(\"  flags               %08lx\",\tflags);\n\n  if\t  (flags & kAudioFormatFlagIsBigEndian)\t\tprintf(\" big-endian\");\n  else\t\t\t\t\t\t\tprintf(\" little-endian\");\n\n  if\t  (flags & kAudioFormatFlagIsFloat)\t\tprintf(\" float\");\n  else if (flags & kAudioFormatFlagIsSignedInteger)\tprintf(\" signed-int\");\n  else\t\t\t\t\t\t\tprintf(\" unsigned-int\");\n\n  if\t  (flags & kAudioFormatFlagIsPacked)\t\tprintf(\" packed\");\n  else if (flags & kAudioFormatFlagIsAlignedHigh)\tprintf(\" aligned-high\");\n  else\t\t\t\t\t\t\tprintf(\" aligned-low\");\n\n  if\t  (flags & kAudioFormatFlagIsNonInterleaved)\tprintf(\" interleaved\");\n  else\t\t\t\t\t\t\tprintf(\" non-interleaved\");\n  printf(\"\\n\");\n\n  printf(\"  bytes per packet    %ld\\n\",\tfmt->mBytesPerPacket);\n  printf(\"  frames per packet   %ld\\n\",\tfmt->mFramesPerPacket);\n  printf(\"  channels per frame  %ld\\n\",\tfmt->mChannelsPerFrame);\n  printf(\"  bytes per frame     %ld\\n\",\tfmt->mBytesPerFrame);\n  printf(\"  bits per channel    %ld\\n\",\tfmt->mBitsPerChannel);\n}\n\n#endif // (DEBUG)\n\n\n#if (!TESTING)\n\n# include \"SqSound.h\"\n\n  SqSoundDefine(MacOSX);\n\n# include \"SqModule.h\"\n\n  static void  sound_parseEnvironment(void) {}\n  static int   sound_parseArgument(int argc, char **argv) { return 0; }\n  static void  sound_printUsage(void) {}\n  static void  sound_printUsageNotes(void) {}\n  static void *sound_makeInterface(void) { return &sound_MacOSX_itf; }\n\n  void *np_sound_makeInterface(void) { return &sound_MacOSX_itf; }\n\n  SqModuleDefine(sound, MacOSX);\n\n#else // TESTING\n\n# include \"math.h\"\n\n# define RATE\t48000.0\t\t\t// samples per second\n# define FRAMES\t5288 * RATE / 44100\t// nominal buffer size requested by Squeak\n# define FREQ\t440.0\t\t\t// tuning fork required to verify this ;)\n\nstatic short sound[(int)(FRAMES * 2)];\n\nstatic void warble(int n)\n{\n  static double phase = 0.0;\n  static double amp   = 0.5;\n  static double pan   = 0.5;\n  static double freq  = FREQ * 2.0 * 3.14159265359 / RATE;\n\n  short *out= sound;\n  while (n--)\n    {\n      float wave= sin(phase) * amp;\n      phase= phase + freq;\n      *out++= 32767.0 * wave * (1.0-pan);\t// left channel\n      *out++= 32767.0 * wave * pan;\t\t// right channel\n    }\n}\n\nint main()\n{\n  sound_Start(FRAMES, RATE, 1, 3);\n  for (;;)\n    {\n      int n= min(sizeof(sound), sound_AvailableSpace()) / 4;\n      if (n)\n\t{\n\t  warble(n);\n\t  sound_PlaySamplesFromAtLength(n, (int)sound, 0);\n#        if (DEBUG)\n\t  putchar('.');  fflush(stdout);\n#        endif\n\t}\n      else\n\tusleep(1000);\n    }\n  (void)sound_InsertSamplesFromLeadTime;\n  (void)sound_PlaySilence;\n  (void)sound_GetRecordingSampleRate;\n  (void)sound_StartRecording;\n  (void)sound_RecordSamplesIntoAtLength;\n  (void)sound_Volume;\n  (void)sound_SetVolume;\n  (void)sound_SetRecordLevel;\n  return 0;\n}\n\n/*\n  cc -g -Wall -DTESTING=1 -o sqUnixSoundMacOSX sqUnixSoundMacOSX.c -framework CoreAudio -framework AudioToolbox\n*/\n\n#endif // TESTING\n# endif // !Configure_Squeak_Code_for_Tilera xxx_dmu\n\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-sound-NAS/Makefile.inc",
    "content": "PLIBS=-laudio\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-sound-NAS/acinclude.m4",
    "content": "# -*- sh -*-\n\nAC_MSG_CHECKING([for Network Audio System])\nAC_TRY_COMPILE([#include <audio/audio.h>],[AuElementNotifyKindLowWater;],[\n  AC_MSG_RESULT(yes)\n],[\n  AC_MSG_RESULT(no)\n  AC_PLUGIN_DISABLE\n])\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-sound-NAS/config.cmake",
    "content": "PLUGIN_REQUIRE_INCLUDE (AUDIO_AUDIO_H audio/audio.h)\nPLUGIN_REQUIRE_LIBRARY (AUDIO audio)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-sound-NAS/sqUnixSoundNAS.c",
    "content": "/* sqUnixSoundNAS.c -- sound support for the Network Audio System\n *\n * Author: Lex Spoon <lex@cc.gatech.edu>\n *\n *   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n */\n\n#include \"sq.h\"\n#include \"sqaio.h\"\n\n#include <audio/audiolib.h>\n#include <assert.h>\n\n#ifdef DEBUG\n# define DPRINTF printf\n#else\n  static void DPRINTF(char *fmt, ...) {}\n#endif\n\n\n#ifdef WORDS_BIGENDIAN\n# define AU_FORMAT\tAuFormatLinearSigned16MSB\n#else\n# define AU_FORMAT\tAuFormatLinearSigned16LSB\n#endif\n\n\nstatic int sound_Stop(void);\n\n/** routines for converting samples to different formats **/\n\n/* XXX actually, I don't think NAS will need conversion.  However,\n   SunOS could use it... */\n\n#define BYTES_PER_SAMPLE\t2\t\t/* Squeak always uses 16-bit samples */\n\n#ifdef HAS_MSB_FIRST\n# define IS_BIGENDIAN 1\n#else\n# define IS_BIGENDIAN 0\n#endif\n\n\n/* specification of the output format.  (Squeak's format is fixed:\n   stereo, 16-bit, host-endian, signed) */\n\nstatic int fmtBytes=             2;  /* bytes per sample the device is using */\nstatic int fmtSigned=            1;  /* whether the device uses signed samples */\nstatic int fmtStereo=\t\t 0;  /* whether the device is in stereo */\nstatic int fmtIsBigendian=       0;  /* whether the device is big-endion */\n\n\n/* whether the device is differently-ended than Squeak */\n\n#define auSwapBytes (fmtIsBigendian != IS_BIGENDIAN)\n\n\n/* calculate number of bytes per frame, given the current mode */\n\nstatic int bytesPerPlayFrame(void)\n{\n#if 1\t\t/* ikp doesn't understand why this ... */\n  int bytes= 1;\n  bytes *= fmtBytes;\n  if (fmtStereo)\n    bytes *= 2;\n  return bytes;\n#else\t\t/* ... doesn't look like this */\n  return fmtBytes * (fmtStereo ? 2 : 1);\n#endif\n}\n\n\n#define FAIL(X) { success(false); return X; }\n\nstatic AuServer *server = NULL;   /* the audio server to write to */\nstatic int recording=0;        /* whether this module is recording\n\t\t\t\t  or playing.  Only valid if\n\t\t\t\t  server!= NULL . */\nstatic AuFlowID flow;          /* the NAS flow being used */\nstatic int semaIndex;          /* the semaphore to signal Squeak with */\nstatic int stereo;             /* whether Squeak sees stereo or not */\nstatic int bytesAvail;         /* current number of bytes that may be written\n\t\t\t\t  or read from the server */\nstatic int sampleRate;         /* the sample rate of the device.\n\t\t\t\t  Currently not accurate. */\n\n\nstatic int sound_AvailableSpace(void) \n{\n  if(server == NULL)\n    return 0;\n\n  return bytesAvail;\n}\n\nstatic int sound_InsertSamplesFromLeadTime(int frameCount, int srcBufPtr,\n\t\t\t\t  int samplesOfLeadTime)\n{\n  /* not possible, I don't think using NAS */\n  success(false);\n  return 0;\n}\n\n\nstatic int sound_Stop(void)\n{\n  if(server != NULL) {\n    aioDisable(AuServerConnectionNumber(server));\n\t\t    \n    AuCloseServer(server);\n    server = NULL;\n  }\n\n  return 0;\n}\n\n\n     \n\n     \nstatic int sound_PlaySamplesFromAtLength(int frameCount, int arrayIndex, int startIndex)\n{\n  int bytesToPlay;\n  int framesToPlay;\n  char *buf;   /* buffer to play from; it may not be arrayIndex if a\n                  conversion is necessary */\n\n  DPRINTF(\"PlaySamples(frameCount=%d, arrayIndex=%d, startIndex=%d\\n\",\n\t  frameCount, arrayIndex, startIndex);\n  \n  /* figure out how much to play */\n  bytesToPlay = frameCount * bytesPerPlayFrame();\n  if (bytesToPlay > bytesAvail)\n    bytesToPlay = bytesAvail;\n  \n  framesToPlay = bytesToPlay / bytesPerPlayFrame();\n\n  /* convert the buffer when not in stereo; when playing back, Squeak\n     will send mono data as stereo, where the right channel is to be\n     ignored */\n  if(stereo)\n    {\n      buf= (char *) (arrayIndex + 4*startIndex);\n    }\n  else\n    {\n      int i;\n      short *sbuf;  /* the buffer, as short's instead of char's */\n\n      DPRINTF(\"converting\\n\");\n      \n      buf= malloc(2 * frameCount);\n      if(buf == NULL)\n\t{\n\t  fprintf(stderr, \"out of memory\\n\");\n\t  return 0;\n\t}\n      sbuf= (short *) buf;\n      \n\n      for(i=0; i<frameCount; i++)\n\t{\n\t  sbuf[i]= ((short *) (arrayIndex + 4*startIndex)) [2*i];\n\t}\n    }\n      \n\t\n  DPRINTF(\"writing %d bytes (%d frames)\\n\", bytesToPlay, framesToPlay);\n  AuWriteElement(server, flow, 0,\n\t\t bytesToPlay,\n\t\t buf,\n\t\t AuFalse,\n\t\t NULL);\n  AuFlush(server);\n  \n\n  bytesAvail -= bytesToPlay;\n\n  if(!stereo)\n    {\n      free(buf);\n    }\n  \n  return framesToPlay;\n}\n\n\n/* Process audio events from the NAS server.  The same routine is used\n   whether we are recording or playing back */\nstatic void handleAudioEvents(int fd, void *data, int flags)\n{\n  if(!server) {\n    DPRINTF( \"handleAudioEvents called while unconnected!\\n\");\n    return;\n  }\n\n  /* read events once */\n  AuEventsQueued(server, AuEventsQueuedAfterReading);\n\n  /* then loop through the read queue */\n  while(AuEventsQueued(server, AuEventsQueuedAlready)) {\n    AuEvent event;\n    AuNextEvent(server, AuTrue, &event);\n    DPRINTF(\"event of type %d\\n\", event.type);\n    \n    switch(event.type) {\n    case 0:\n      {\n\tAuErrorEvent *errEvent = (AuErrorEvent *) &event;\n\tchar errdesc[1000];\n      \n\tAuGetErrorText(server, errEvent->error_code, errdesc, sizeof(errdesc));\n\tfprintf(stderr, \"audio error: %s\\n\", errdesc);\n\tsound_Stop();\n\treturn;  /* return, not break, so that we don't\n\t\t    process the now-closed server any longer! */\n      }\n    \n\n    case AuEventTypeElementNotify:\n      {\n\tAuElementNotifyEvent *enEvent = (AuElementNotifyEvent *)&event;\n\n\tswitch(enEvent->kind) {\n\tcase AuElementNotifyKindLowWater:\n\t  DPRINTF(\"low water event\\n\");\n\t  bytesAvail += enEvent->num_bytes;\n\t  break;\n\tcase AuElementNotifyKindHighWater:\n\t  DPRINTF(\"high water event\\n\");\n\t  bytesAvail += enEvent->num_bytes;\n\t  break;\n\tcase AuElementNotifyKindState:\n\t  DPRINTF(\"state change (%d->%d)\\n\",\n\t\t  enEvent->prev_state,\n\t\t  enEvent->cur_state);\n\t  bytesAvail += enEvent->num_bytes;\n\t  if(enEvent->cur_state == AuStatePause) {\n\t       /* if the flow has stopped, then arrange for it to get started again */\n\t       /* XXX there is probably a more intelligent place to do\n                  this, in case there is a real reason it has paused */\n\t       DPRINTF(\"unpausing\\n\");\n\t       AuStartFlow(server, flow, NULL);\n\t       AuFlush(server);\n\t  }\n\n\t  break;\n\t}\n      }\n    }\n  }\n\n  if(bytesAvail > 0) {\n    DPRINTF(\"bytesAvail: %d\\n\", bytesAvail);\n    signalSemaphoreWithIndex(semaIndex);\n  }\n\n  aioHandle(fd, handleAudioEvents, flags & AIO_RW);\n}\n\nstatic int sound_PlaySilence(void) \n{\n     return 0;\n}\n\n\nstatic AuDeviceID choose_nas_device(AuServer *server, int samplesPerSec, int stereo, int recording) \n{\n  int desiredDeviceKind=\n    recording ?\n       AuComponentKindPhysicalInput :\n       AuComponentKindPhysicalOutput;\n  int desired_channels= stereo ? 2 : 1;\n  int i;\n  \n  /* look for a physical device of the proper kind, with the proper number of channels */\n  for (i = 0; i < AuServerNumDevices(server); i++) {\n    if((AuDeviceKind(AuServerDevice(server, i))\n\t==  desiredDeviceKind)\n       && (AuDeviceNumTracks(AuServerDevice(server, i))\n\t   ==  desired_channels))\n\t return AuDeviceIdentifier(AuServerDevice(server, i));\n  }\n\n\n\n  /* look for a physical device of the proper kind; ignore number of channels */\n  for (i = 0; i < AuServerNumDevices(server); i++) {\n    if(AuDeviceKind(AuServerDevice(server, i))\n       ==  desiredDeviceKind)\n\t return AuDeviceIdentifier(AuServerDevice(server, i));\n  }\n\n\n\n  return AuNone;\n}\n\nstatic int sound_Start(int frameCount, int samplesPerSec, int stereo0, int semaIndex0)\n{\n  AuElement elements[2];  /* first is a client element, second is\n\t\t\t     a device output element */\n  AuDeviceID device;        /* ID of the device to play to */\n  \n\n  /* open the server */\n  DPRINTF(\"opening server\\n\");\n  server = AuOpenServer(NULL, 0, NULL, 0, NULL, NULL);\n  if(server == NULL) {\n    DPRINTF(\"failed to open audio server\\n\");\n    return false;\n  }\n\n  /* XXX should check the protocol version! */\n\n  /* record requested info */\n  semaIndex = semaIndex0;\n  stereo = stereo0;\n  sampleRate= samplesPerSec;\n  \n  /* pick a device to play to */ \n  device = choose_nas_device(server, samplesPerSec, stereo, 0);\n  if(device == AuNone) {\n    DPRINTF(\"no available device on the server!\\n\");\n    AuCloseServer(server);\n    server = NULL;\n    return false;\n  }\n\n  /* set up output parameters */\n  fmtBytes=2;\n  fmtSigned=1;\n  fmtStereo=stereo;\n  fmtIsBigendian=0;\n  recording=0;\n  \n\n\n  /* create a flow to write on */\n  DPRINTF(\"creating flow\\n\");\n  flow = AuCreateFlow(server, NULL);\n\n\n  /* create client and device elements to play with */\n  DPRINTF(\"creating elements(%d,%d)\\n\",\n\t frameCount, frameCount / 4);\n  AuMakeElementImportClient(&elements[0],\n\t\t\t    samplesPerSec,\n\t\t\t    AuFormatLinearSigned16LSB,  /* XXX this should be chosen based on the platform */\n\t\t\t    stereo ? 2 : 1,\n\t\t\t    AuTrue,\n\t\t\t    2*frameCount,   /* max: 2 buffers */\n\t\t\t    frameCount,   /* low */\n\t\t\t    0, NULL);\n\t\n  AuMakeElementExportDevice(&elements[1],\n\t\t\t    0,\n\t\t\t    device,\n\t\t\t    samplesPerSec,\n\t\t\t    AuUnlimitedSamples,\n\t\t\t    0, NULL);\n\n  /* set up the flow with these elements */\n  AuSetElements(server,\tflow,\n\t\tAuTrue,\n\t\t2, elements,\n\t\tNULL);\n\n  /* start her up */\n  DPRINTF(\"starting flow\\n\");\n  AuStartFlow(server, flow, NULL);\n  AuFlush(server);\n  \n\n  /* initialize the space indication */\n  bytesAvail = 0;\n\n  \n  /* arrange to be informed when events come in from the server */\n  aioEnable(AuServerConnectionNumber(server), 0, AIO_EXT);\n  aioHandle(AuServerConnectionNumber(server), handleAudioEvents, AIO_R);\n\n\n\n  return true;\n}\n\n\n\n/* StartRecording: open the device for recording.\n\n   XXX this routine is almost identical to snd_Start().  The two should\n   be factored into a single function!\n*/\nstatic int sound_StartRecording(int desiredSamplesPerSec, int stereo0, int semaIndex0)\n{\n  AuElement elements[2];  /* elements for the NAS flow to assemble:\n   \t\t\t        element 0 = physical input\n\t\t\t        element 1 = client export */\n  AuDeviceID device;      /* physical device ID to use */\n  \n  DPRINTF(\"StartRecording\\n\");\n  \n  sound_Stop();\n\n  DPRINTF(\"opening server\\n\");\n  server = AuOpenServer(NULL, 0, NULL, 0, NULL, NULL);\n  if(server == NULL) {\n    DPRINTF(\"failed to open audio server\\n\");\n    return false;\n  }\n\n  /* XXX check protocol version of the server */\n\n  semaIndex= semaIndex0;\n  stereo= stereo0;\n  sampleRate= desiredSamplesPerSec;\n\n  device= choose_nas_device(server, desiredSamplesPerSec, stereo, 1);\n  if(device == AuNone) {\n    DPRINTF(\"no available device on the server!\\n\");\n    AuCloseServer(server);\n    server = NULL;\n    return false;\n  }\n\n  /* record format info */\n  fmtBytes=2;\n  fmtSigned=1;\n  fmtStereo=stereo;\n  fmtIsBigendian=0;\n  recording=1;\n\n\n  \n\n  /* create a flow to read from */\n  DPRINTF(\"creating flow\\n\");\n  flow = AuCreateFlow(server, NULL);\n\n\n  /* create client and device elements to record with */\n  DPRINTF(\"creating elements\\n\");\n\n  \n  AuMakeElementImportDevice(&elements[0],\n\t\t\t    desiredSamplesPerSec,  /* XXX should use the actual sampling rate of device */\n\t\t\t    device,\n\t\t\t    AuUnlimitedSamples,\n\t\t\t    0, NULL);\n\n  AuMakeElementExportClient(&elements[1],\n\t\t\t    0,\n\t\t\t    desiredSamplesPerSec,\n\t\t\t    AuFormatLinearSigned16LSB,  /* XXX this should be chosen based on the platform */\n\t\t\t    stereo ? 2 : 1,\n\t\t\t    AuTrue,\n\t\t\t    1000000,  /* was AuUnlimitedSamples */\n\t\t\t    1000, /* water mark: go ahead and send frequently! */\n\t\t\t    0, NULL);\n\t\n\n\n  /* set up the flow with these elements */\n  AuSetElements(server,\tflow,\n\t\tAuTrue,\n\t\t2, elements,\n\t\tNULL);\n\n  /* start her up */\n  DPRINTF(\"starting flow\\n\");\n  AuStartFlow(server, flow, NULL);\n  AuFlush(server);\n  \n\n  /* initialize the space indication */\n  bytesAvail = 0;\n\n  \n  /* arrange to be informed when events come in from the server */\n  aioEnable(AuServerConnectionNumber(server), NULL, AIO_EXT);\n  aioHandle(AuServerConnectionNumber(server), handleAudioEvents, AIO_W);\n\n  return true;\n}\n\n\nstatic int sound_StopRecording(void) \n{\n     return sound_Stop();\n}\n\n\n\nstatic double sound_GetRecordingSampleRate(void) \n{\n  return sampleRate;\n}\n\n     \nstatic int sound_RecordSamplesIntoAtLength(int buf, int startSliceIndex,\n\t\t\t\t  int bufferSizeInBytes)\n{\n  int bytesToRead;\n  int sliceSize= (stereo ? 4 : 2);   /* a \"slice\" seems to be a \"frame\": one sample from each channel */\n  \n\n  DPRINTF(\"RecordSamplesIntoAtLength(buf=%d, startSliceIndex=%d, bufferSizeInBytes=%d\\n\",\n\t  buf, startSliceIndex, bufferSizeInBytes);\n  \n  \n  /* sanity checks */\n  if(server==NULL || !recording) {\n    success(false);\n    return 0;\n  }\n\n  if(bytesAvail <= 0)\n    return 0;\n\n  /* figure out how much to read */\n  bytesToRead= bufferSizeInBytes - (startSliceIndex * sliceSize);\n  if(bytesToRead > bytesAvail)\n    bytesToRead= bytesAvail;\n\n  DPRINTF(\"reading %d bytes\\n\", bytesToRead);\n  \n\n  /* read it */\n  AuReadElement(server,\n\t\tflow,\n\t\t1,     /* element 1 is the client export */\n\t\tbytesToRead,\n\t\t(char *) (buf + startSliceIndex*sliceSize),\n\t\tNULL);\n\n  bytesAvail -= bytesToRead;\n  \n  return bytesToRead/sliceSize;  /* return number of samples read (or slices?!) */\n}\n\n\n\n\n/* mixer settings */\nstatic int sound_SetRecordLevel(int level) \n{\n  return level;\n}\n\n\n\nstatic void sound_Volume(double *left, double *right)\n{\n  return;\n}\n\n\nstatic void sound_SetVolume(double left, double right)\n{\n  return;\n}\n\n\n#include \"SqSound.h\"\n\nSqSoundDefine(NAS);\n\n\n#include \"SqModule.h\"\n\nstatic void  sound_parseEnvironment(void) {}\n\nstatic int   sound_parseArgument(int argc, char **argv)\n{\n  if (!strcmp(argv[0], \"-nas\")) return 1;\n  return 0;\n}\n\nstatic void  sound_printUsage(void) {}\nstatic void  sound_printUsageNotes(void) {}\nstatic void *sound_makeInterface(void) { return &sound_NAS_itf; }\n\nSqModuleDefine(sound, NAS);\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-sound-OSS/Makefile.inc",
    "content": "PLIBS=-lasound\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-sound-OSS/acinclude.m4",
    "content": "# -*- sh -*-\n\nif test \"$with_vm_sound_OSS\"=\"yes\"; then\n\tAC_MSG_CHECKING([for Open Sound System])\n\tAC_TRY_COMPILE([#include <sys/soundcard.h>],[OPEN_SOUND_SYSTEM;],[\n\t  AC_MSG_RESULT(yes)\n\t],[\n\t  AC_MSG_RESULT(no)\n\t  AC_PLUGIN_DISABLE\n\t])\nfi\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-sound-OSS/config.cmake",
    "content": "PLUGIN_REQUIRE_INCLUDE (ALSA_SOUNDLIB alsa/asoundlib.h)\nPLUGIN_REQUIRE_LIBRARY (ASOUND asound)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-sound-OSS/sqUnixSoundOSS.c",
    "content": "/* sqUnixSoundOSS.c -- sound module for Open Sound System\n *\n * Author: Ian.Piumarta@squeakland.org\n * \n * Last edited: 2008-04-21 14:51:45 by piumarta on emilia\n *\n *   Copyright (C) 1996-2005 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n *   THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n */\n\n#include \"sq.h\"\n\n/* The SoundPlayer playLoop does not attempt to play sounds unless at\n * least 100 frames of output space are available.  select() says\n * output space is available when one byte can be written.  Net\n * result: Squeak sits at 100% CPU thrashing between playSema wait and\n * select() signaling the playSema.  OSS does not provide any means to\n * increase the output low water mark from one byte (to 100 frames, or\n * even an entire fragment) either.  Disabling the Semaphore entirely\n * increases audio performace noticably and Squeak idles for almost\n * all of the time (consuming < 1% CPU) when only playing sound.\n * \n * If you turn the play Semaphore back on then you should at least\n * consider also turning on `soundStopWhenDone' in the image\n * preferences, otherwise Squeak WILL eat ALL of your CPU from the\n * moment you play the first sound.\n */\n#define\tUSE_PLAY_SEMAPHORE\n\n#undef\tDEBUG\n#undef\tNDEBUG\n\n#if 0\n#define\tTEST_FMT\tAFMT_U8\t\t/* forced h/w format for input/output */\n#define\tTEST_CHANS\t2\t\t/* forced h/w channels for input/output */\n#endif\n\n#include \"sqaio.h\"\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <unistd.h>\n#include <string.h>\n#include <fcntl.h>\n#include <sys/ioctl.h>\n#include <sys/soundcard.h>\n#include <assert.h>\n#include <errno.h>\n\n\n#ifdef WORDS_BIGENDIAN\n# define AFMT_S16_HE\tAFMT_S16_BE\n# define AFMT_U16_HE\tAFMT_U16_BE\n# define AFMT_S16_RE\tAFMT_S16_LE\n# define AFMT_U16_RE\tAFMT_U16_LE\n#else\n# define AFMT_S16_HE\tAFMT_S16_LE\n# define AFMT_U16_HE\tAFMT_U16_LE\n# define AFMT_S16_RE\tAFMT_S16_BE\n# define AFMT_U16_RE\tAFMT_U16_BE\n#endif\n\n#define ERROR(MSG) (\t\t\t\t\t\t\\\n  fprintf(stderr, \"%s:%d: %s\\n\", __FILE__, __LINE__, MSG)\t\\\n)\n\n#define PERROR(MSG) (\t\t\t\t\t\t\\\n  fprintf(stderr, \"%s:%d: \", __FILE__, __LINE__),\t\t\\\n  perror(MSG)\t\t\t\t\t\t\t\\\n)\n\n#define IOCTL(FD,CMD,ARG)\t\t\t\t\t\\\n  ((ioctl(FD, CMD, ARG) == -1) ? (PERROR(#CMD), -1) : 0)\n\n#define min(A,B)\t(((A)<(B)) ? (A) : (B))\n\nstruct dsp;\n\ntypedef int (*reader)(struct dsp *dsp, void *buffer, int nFrames);\ntypedef int (*writer)(struct dsp *dsp, void *buffer, int nFrames);\n\n#ifdef DEBUG\n# define PRINTF(ARGS) ((printf ARGS), fflush(stdout))\n  static char *afmtName(int i);\n  static char *capName(int i);\n  static char *rdName(reader rd);\n  static char *wrName(writer wr);\n  static char *devName(int dev);\n#else\n# define PRINTF(ARGS)\n#endif\n\n\nstruct format\n{\n  int\tformat;\t\t/* internal format */\n# define FMT_S\t 0x0000\t/* default: 16-bit, signed, native order, stereo */\n# define FMT_U\t 0x0001\t/* unsigned */\n# define FMT_E\t 0x0002\t/* byte-swapped */\n# define FMT_8\t 0x0004\t/* 8-bit */\n# define FMT_M\t 0x0008\t/* mono */\n# define FMT_MAX (FMT_8 | FMT_U)\n  int\tchannels;\t/* number of channels */\n  int\trate;\t\t/* frames per second */\n  int\tbpf;\t\t/* bytes per frame */\n  int\tfragSize;\t/* bytes per fragment */\n};\n\nstruct dsp\n{\n  char\t*path;\n  int\t fd;\n  int\t caps;\t\t/* capabilities */\n  int\t fmts;\t\t/* driver formats */\n  struct format hw;\t/* h/w frame format */\n  struct format sq;\t/* Squeak frame format (FMT_S or FMT_M) */\n  reader read;\t\t/* input function */\n  writer write;\t\t/* output function */\n  int\t semaphore;\t/* read/write semaphore */\n  int\t running;\n};\n\n\nstruct dsp dev_dsp1 = { \"/dev/dsp1\", -1 };\nstruct dsp dev_dsp  = { \"/dev/dsp\",  -1 };\n\nstatic struct dsp *in=  0;\nstatic struct dsp *out= 0;\n\nstatic int noSoundMixer= 0;\n\ntypedef   signed char  sbyte;\ntypedef unsigned char  ubyte;\ntypedef   signed short sword;\ntypedef unsigned short uword;\n\n#define CVI\tsample= *in++;\n#define CVIM\tCVI; sample= (sample / 2) + (*in++ / 2);\n#define CVU\tsample^= 0x8000;\n#define CVE\tsample= ((sample >> 8) & 0xff) | (sample << 8);\n#define CVB\tsample>>= 8;\n#define CVW\tsample<<= 8;\n#define CVO\t*out++= sample;\n#define CVOS\tCVO CVO\n\n#define CV__U\t    CVU\n#define CV_E_\t        CVE\n#define CV_EU\t    CVU CVE\n#define CVB__\t            CVB\n#define CVB_U\t    CVU     CVB\n#define CVW__\tCVW\n#define CVW_U\tCVW CVU\n\nstatic int output(struct dsp *dsp, void *buf, int frames)\n{\n  int m= frames * dsp->hw.bpf;\n  /* try to ensure that the entire buffer is written.  (the write\n     should complete fully in all cases, but some alsa drivers\n     apparently don't behave quite right in write() and/or\n     select().) */\n  while (m)\n    {\n      int n= write(dsp->fd, buf, m);\n      if (n < 0)\n\t{\n\t  if (errno != EAGAIN)\n\t    {\n\t      fprintf(stderr, \"sound: \");\n\t      PERROR(dsp->path);\n\t      return 0;\n\t    }\n\t}\n      else\n\tm -= n;\n    }\n  return frames;\n}\n\n#define outputFn(TYPE, CVT) (struct dsp *dsp, void *buf, int frames)\t\\\n{\t\t\t\t\t\t\t\t\t\\\n  TYPE *cvt= (TYPE *)alloca(dsp->hw.bpf * frames);\t\t\t\\\n  register short *in= (short *)buf;\t\t\t\t\t\\\n  register TYPE *out= cvt;\t\t\t\t\t\t\\\n  register int n= frames;\t\t\t\t\t\t\\\n  while (n--) { register short sample; CVT; }\t\t\t\t\\\n  return output(dsp, cvt, frames);\t\t\t\t\t\\\n}\n\n#define    wrMM___ output\nstatic int wrMM__U outputFn(uword, CVI  CV__U CVO);\nstatic int wrMM_E_ outputFn(sword, CVI  CV_E_ CVO);\nstatic int wrMM_EU outputFn(uword, CVI  CV_EU CVO);\nstatic int wrMM8__ outputFn(sbyte, CVI  CVB__ CVO);\nstatic int wrMM8_U outputFn(ubyte, CVI  CVB_U CVO);\nstatic int wrMS___ outputFn(sword, CVI \t      CVOS);\nstatic int wrMS__U outputFn(uword, CVI  CV__U CVOS);\nstatic int wrMS_E_ outputFn(sword, CVI  CV_E_ CVOS);\nstatic int wrMS_EU outputFn(uword, CVI  CV_EU CVOS);\nstatic int wrMS8__ outputFn(sbyte, CVI  CVB__ CVOS);\nstatic int wrMS8_U outputFn(ubyte, CVI  CVB_U CVOS);\nstatic int wrSM___ outputFn(sword, CVIM       CVO);\nstatic int wrSM__U outputFn(uword, CVIM CV__U CVO);\nstatic int wrSM_E_ outputFn(sword, CVIM CV_E_ CVO);\nstatic int wrSM_EU outputFn(uword, CVIM CV_EU CVO);\nstatic int wrSM8__ outputFn(sbyte, CVIM CVB__ CVO);\nstatic int wrSM8_U outputFn(ubyte, CVIM CVB_U CVO);\n#define    wrSS___ output\nstatic int wrSS__U outputFn(uword, CVI  CV__U CVO  CVI CV__U CVO);\nstatic int wrSS_E_ outputFn(sword, CVI  CV_E_ CVO  CVI CV_E_ CVO);\nstatic int wrSS_EU outputFn(uword, CVI  CV_EU CVO  CVI CV_EU CVO);\nstatic int wrSS8__ outputFn(sbyte, CVI  CVB__ CVO  CVI CVB__ CVO);\nstatic int wrSS8_U outputFn(ubyte, CVI  CVB_U CVO  CVI CVB_U CVO);\n\n#undef outputFn\n\nstatic writer writers[4][FMT_MAX+1]= {\n  { wrSS___, wrSS__U, wrSS_E_, wrSS_EU, wrSS8__, wrSS8_U },\n  { wrSM___, wrSM__U, wrSM_E_, wrSM_EU, wrSM8__, wrSM8_U },\n  { wrMS___, wrMS__U, wrMS_E_, wrMS_EU, wrMS8__, wrMS8_U },\n  { wrMM___, wrMM__U, wrMM_E_, wrMM_EU, wrMM8__, wrMM8_U }\n};\n\nstatic int input(struct dsp *dsp, void *buf, int frames)\n{\n  int m= frames * dsp->hw.bpf;\n  int n= read(dsp->fd, buf, m);\n  if (n < 0)\n    {\n      fprintf(stderr, \"sound: \");\n      PERROR(dsp->path);\n      return 0;\n    }\n  return n / dsp->hw.bpf;\n}\n\n#define inputFn(TYPE, CVT) (struct dsp *dsp, void *buf, register int frames)\t\\\n{\t\t\t\t\t\t\t\t\t\t\\\n  register short *out= (short *)buf;\t\t\t\t\t\t\\\n  register TYPE *in= (TYPE *)alloca(dsp->hw.bpf * frames);\t\t\t\\\n  frames= input(dsp, (void *)in, frames);\t\t\t\t\t\\\n  {\t\t\t\t\t\t\t\t\t\t\\\n    register int n= frames;\t\t\t\t\t\t\t\\\n    while (n--) { register short sample; CVT; }\t\t\t\t\t\\\n  }\t\t\t\t\t\t\t\t\t\t\\\n  return frames;\t\t\t\t\t\t\t\t\\\n}\n\n#define    rdMM___ input\nstatic int rdMM__U inputFn(uword, CVI  CV__U CVO);\nstatic int rdMM_E_ inputFn(sword, CVI  CV_E_ CVO);\nstatic int rdMM_EU inputFn(uword, CVI  CV_EU CVO);\nstatic int rdMM8__ inputFn(sbyte, CVI  CVW__ CVO);\nstatic int rdMM8_U inputFn(ubyte, CVI  CVW_U CVO);\nstatic int rdMS___ inputFn(sword, CVI \t      CVOS);\nstatic int rdMS__U inputFn(uword, CVI  CV__U CVOS);\nstatic int rdMS_E_ inputFn(sword, CVI  CV_E_ CVOS);\nstatic int rdMS_EU inputFn(uword, CVI  CV_EU CVOS);\nstatic int rdMS8__ inputFn(sbyte, CVI  CVW__ CVOS);\nstatic int rdMS8_U inputFn(ubyte, CVI  CVW_U CVOS);\nstatic int rdSM___ inputFn(sword, CVIM       CVO);\nstatic int rdSM__U inputFn(uword, CVIM CV__U CVO);\nstatic int rdSM_E_ inputFn(sword, CVIM CV_E_ CVO);\nstatic int rdSM_EU inputFn(uword, CVIM CV_EU CVO);\nstatic int rdSM8__ inputFn(sbyte, CVIM CVW__ CVO);\nstatic int rdSM8_U inputFn(ubyte, CVIM CVW_U CVO);\n#define    rdSS___ input\nstatic int rdSS__U inputFn(uword, CVI  CV__U CVO  CVI CV__U CVO);\nstatic int rdSS_E_ inputFn(sword, CVI  CV_E_ CVO  CVI CV_E_ CVO);\nstatic int rdSS_EU inputFn(uword, CVI  CV_EU CVO  CVI CV_EU CVO);\nstatic int rdSS8__ inputFn(sbyte, CVI  CVW__ CVO  CVI CVW__ CVO);\nstatic int rdSS8_U inputFn(ubyte, CVI  CVW_U CVO  CVI CVW_U CVO);\n\nstatic reader readers[4][FMT_MAX+1]= {\n  { rdSS___, rdSS__U, rdSS_E_, rdSS_EU, rdSS8__, rdSS8_U },\n  { rdSM___, rdSM__U, rdSM_E_, rdSM_EU, rdSM8__, rdSM8_U },\n  { rdMS___, rdMS__U, rdMS_E_, rdMS_EU, rdMS8__, rdMS8_U },\n  { rdMM___, rdMM__U, rdMM_E_, rdMM_EU, rdMM8__, rdMM8_U }\n};\n\n/* NOTE: The vast majority of the above functions will almost\n   certainly never be used since OSS appears to guarantee support for\n   at least one of AFMT_S16_NE, AFMT_S16_LE and AFMT_U8 on all cards\n   regardless of the h/w capabilities [OSS Programmer's Guide,\n   revision 1.11, 7 Nov 2000, page 32].  Nonetheless, we're going to\n   implement every possible conversion explicitly since the first\n   person with a weirdo card/driver that doesn't work as advertised is\n   bound to scream and moan (loudly and in public).  The result is\n   that this file is much larger and more complicated than necessary,\n   but that's the price you pay for my avoiding any possibility of\n   disproportionate criticism. */\n\n\n/* Close dsp.\n */\nstatic void dspClose(struct dsp *dsp)\n{\n  assert(dsp->fd >= 0);\n  if (dsp->semaphore > 0)\n    {\n      aioDisable(dsp->fd);\n      dsp->semaphore= 0;\n      PRINTF((\"sound: %s: aio disabled\\n\", dsp->path));\n    }\n  close(dsp->fd);\n  dsp->fd= -1;\n}\n\n\n/* Open dsp for playback.  If the dsp is capable of full-duplex\n * operation and recording is currently in progress with a compatible\n * sample format then attempt to open the dsp in parallel.  (For this\n * to even be possible it is first necessary to enable the\n * `canRecordWhilePlaying' preference in the image which will\n * otherwise ensure mutual exclusion beteen sound input and output.)\n * If full-duplex is not supported (or if the current sample format is\n * incompatible) then stop recording before opening for playback.\n * Answer whether we successfully opened the device for output.\n * \n * NOTE: for full-duplex operation we simply attempt to open the\n * device twice (O_RDONLY and O_WRONLY) which is NOT supported by all\n * versions of OSS [1].  If this fails we should try at least two\n * alternative approaches:\n * 1) close and reopen /dev/dsp with O_RDWR, and then share it between\n *    recording and playback; or, if pressed,\n * 2) find and open a shadow device /dev/dspN (N > 0).\n * Unfortunately I'm feeling too lazy to implement all that nonsense\n * today.\n * \n * [1] http://www.opensound.com/readme/README.fullduplex.html\n */\nstatic struct dsp *dspOpen(struct dsp *dsp, int mode)\n{\n  assert(dsp);\n  assert(dsp->fd < 0);\n  if ((dsp->fd= open(dsp->path, mode, 0)) < 0)\n    {\n      if (dsp == &dev_dsp)\n\t{\n\t  fprintf(stderr, \"sound: \");\n\t  perror(dsp->path);\n\t}\n      return 0;\n    }\n  PRINTF((\"sound: %s: opened with mode %d\\n\", dsp->path, mode));\n\n  dsp->semaphore= 0;\n\n  ioctl(dsp->fd, SNDCTL_DSP_SETDUPLEX,  0);\t/* allow this to fail silently */\n  if ((  IOCTL(dsp->fd, SNDCTL_DSP_GETCAPS, &dsp->caps))\n      || IOCTL(dsp->fd, SNDCTL_DSP_GETFMTS, &dsp->fmts))\n    {\n      /* driver is hosed */\n      fprintf(stderr, \"sound: %s: could not read driver capabilities\\n\", dsp->path);\n      dspClose(dsp);\n      return 0;\n    }\n\n#ifdef TEST_FMT\n  dsp->fmts = TEST_FMT;\n#endif\n\n#ifdef DEBUG\n  {\n    int i;\n    printf(\"sound: %s: driver formats (%x):\", dsp->path, dsp->fmts);\n    for (i= 1; i; i <<= 1) if (dsp->fmts & i) printf(\" %s\", afmtName(i));\n    printf(\"\\nsound: %s: driver capabilities (%x):\", dsp->path, dsp->caps);\n    for (i= 0x100; i; i <<= 1) if (dsp->caps & i) printf(\" %s\", capName(i));\n    printf(\"\\n\");\n  }\n#endif\n\n  return dsp;\n}\n\n\n/* Find and set a supported sample format as close as possible to\n * Squeak's native format (16-bit signed).\n * Answer whether a format was found and set.\n */\nstatic int dspSetFormat(struct dsp *dsp)\n{\n  assert(dsp);\n  assert(dsp->fd >= 0);\n\n  /* find the closest driver format */\n  {\n    static struct { int dsp, fmt; } formats[]= {\n      { AFMT_S16_HE, FMT_S         },\n      { AFMT_U16_HE, FMT_U         },\n      { AFMT_S16_RE, FMT_E         },\n      { AFMT_U16_RE, FMT_E | FMT_U },\n      { AFMT_S8,     FMT_8         },\n      { AFMT_U8,     FMT_8 | FMT_U },\n      { 0,           0 }\n    };\n    int found= -1;\n    int i;\n    for (i= 0;  formats[i].dsp;  ++i)\n      if (dsp->fmts & formats[i].dsp)\n\t{\n\t  /* try query before set (driver format might be locked) */\n\t  int fmt= AFMT_QUERY;\n\t  PRINTF((\"sound: %s: trying format %x: %s\\n\", dsp->path,\n\t\t  formats[i].dsp, afmtName(formats[i].dsp)));\n\t  if (IOCTL(dsp->fd, SNDCTL_DSP_SETFMT, &fmt))\n\t    fprintf(stderr, \"sound: %s: could not query driver format\\n\", dsp->path);\n\t  else if (fmt == formats[i].dsp)\n\t    {\n\t      found= i;\n\t      break;\n\t    }\n\t  fmt= formats[i].dsp;\n\t  if ((ioctl(dsp->fd, SNDCTL_DSP_SETFMT, &fmt) == 0) && (fmt == formats[i].dsp))\n\t    {\n\t      found= i;\n\t      break;\n\t    }\n\t}\n    if (found < 0)\n      {\n\tfprintf(stderr, \"sound: %s: driver has no usable sample format\\n\", dsp->path);\n\treturn 0;\n      }\n    PRINTF((\"sound: %s: selected driver format %x: %s\\n\", dsp->path,\n\t    formats[found].dsp, afmtName(formats[found].dsp)));\n\n    dsp->hw.format= formats[found].fmt;\n    dsp->hw.bpf= ((dsp->hw.format & FMT_8) ? 1 : 2);\t/* bytes per sample */\n  }\n\n  /* the Squeak side is always S16_NE */\n  dsp->sq.format= FMT_S;\t/* until modified by dspSetChannels() */\n  dsp->sq.bpf= 2;\t\t/* bytes per sample */\n\n  return 1;\n}\n\n\n/* Set the number of channels.  Answer whether a suitable number of channels was set.\n */\nstatic int dspSetChannels(struct dsp *dsp, int nChannels)\n{\n  int chans= nChannels;\n  PRINTF((\"sound: %s: requesting %d channels\\n\", dsp->path, nChannels));\n  assert(chans >= 1);\n  assert(chans <= 2);\n\n  dsp->sq.channels= nChannels;\n\n  if (nChannels == 1)\n    dsp->sq.format |= FMT_M;\n\n#ifdef TEST_CHANS\n  chans= TEST_CHANS;\n#endif\n  IOCTL(dsp->fd, SNDCTL_DSP_CHANNELS, &chans);\n  if (chans != nChannels)\n    {\n      nChannels= ((nChannels == 2) ? 1 : 2);\n      chans= nChannels;\n      IOCTL(dsp->fd, SNDCTL_DSP_CHANNELS, &chans);\n      if (chans != nChannels)\n\t{\n\t  fprintf(stderr, \"sound: %s: could not set a suitable number of channels\\n\",\n\t\t  dsp->path);\n\t  return 0;\n\t}\n    }\n  dsp->hw.channels= chans;\n\n  if (chans == 1) dsp->hw.format |= FMT_M;\n\n  dsp->hw.bpf *= dsp->hw.channels;\t/* samples per frame */\n  dsp->sq.bpf *= dsp->sq.channels;\t/* samples per frame */\n\n  PRINTF((\"sound: %s: using %d channels\\n\",      dsp->path, dsp->hw.channels));\n  PRINTF((\"sound: %s: driver: %d bytes/frame\\n\", dsp->path, dsp->hw.bpf));\n  PRINTF((\"sound: %s: squeak: %d bytes/frame\\n\", dsp->path, dsp->sq.bpf));\n\n  return 1;\n}\n\n\n/* Set the sample rate.  Answer whether a suitable rate was set.\n */\nstatic int dspSetSpeed(struct dsp *dsp, int speed)\n{\n  int arg= speed;\n  dsp->sq.rate= speed;\n  if (IOCTL(dsp->fd, SNDCTL_DSP_SPEED, &arg))\n    {\n      fprintf(stderr, \"sound: %s: failed to set sample rate\\n\", dsp->path);\n      return 0;\n    }\n  dsp->hw.rate= arg;\n  PRINTF((\"sound: %s: %d samples/sec\\n\", dsp->path, dsp->hw.rate));\n\n  if (dsp->hw.rate != dsp->sq.rate)\n    fprintf(stderr, \"sound: %s: using %d samples/sec (requested %d)\\n\", dsp->path,\n\t    dsp->hw.rate, dsp->sq.rate);\n\n  return 1;\n}\n\n\n/* Request a fragment size approximating the number of frames of lead\n * time requested by Squeak, and record the actual fragment size set\n * by the driver.  Answer whether the fragment size was successfuly\n * modified.\n */\nstatic int dspSetFragSize(struct dsp *dsp, int nFrames, int nChannels)\n{\n  int fragSize= nFrames * dsp->hw.bpf;\n  int i;\n  for (i= 0;  fragSize;  i++) fragSize >>= 1;\n  fragSize= (4 /* fragments */ << 16) | (i - 1) /* ^2 bytesPerFragment */;\n\n  if ((  IOCTL(dsp->fd, SNDCTL_DSP_SETFRAGMENT, &fragSize))\n      || IOCTL(dsp->fd, SNDCTL_DSP_GETBLKSIZE,  &fragSize))\n    {\n      fprintf(stderr, \"sound: %s: failed to set fragment size\\n\", dsp->path);\n      return 0;\n    }\n  assert(fragSize > 0);\n  dsp->hw.fragSize= fragSize;\n  dsp->sq.fragSize= fragSize / dsp->hw.bpf * dsp->sq.bpf;\n\n  PRINTF((\"sound: %s: fragment size set to %d (%d frames requested in %d channels)\\n\",\n\t  dsp->path, fragSize, nFrames, nChannels));\n\n  return 1;\n}\n\n\n/* Set the input/output functions according to the current sq/hw\n * formats.\n */\nstatic int dspSetConversion(struct dsp *dsp)\n{\n  int sm, io;\n  assert(dsp->sq.format >= 0);\n  assert(dsp->sq.format <= (FMT_MAX | FMT_M));\n  assert(dsp->hw.format >= 0);\n  assert(dsp->hw.format <= (FMT_MAX | FMT_M));\n  io= dsp->hw.format & 0x7;\t/* don't care about channels */\n  assert(io >= 0);\n  assert(io <= FMT_MAX);\n  /* output */\n  sm= (((dsp->sq.format & FMT_M) << 1) | (dsp->hw.format & FMT_M)) >> 3;\n  assert(sm >= 0);\n  assert(sm <= 3);\n  dsp->write= writers[sm][io];\n  assert(dsp->write != 0);\n  /* input */\n  sm= (((dsp->hw.format & FMT_M) << 1) | (dsp->sq.format & FMT_M)) >> 3;\n  assert(sm >= 0);\n  assert(sm <= 3);\n  dsp->read= readers[sm][io];\n  assert(dsp->read != 0);\n#ifdef DEBUG\n  printf(\"sound: input conversion: %s (%p)\\n\", rdName(dsp->read), dsp->read);\n  printf(\"sound: output conversion: %s (%p)\\n\", wrName(dsp->write), dsp->write);\n#endif /* DEBUG */\n  return 1;\n}\n\n\nstatic int dspSetSemaphore(struct dsp *dsp, int semaIndex)\n{\n  if (semaIndex > 0)\n    {\n      dsp->semaphore= semaIndex;\n      aioEnable(dsp->fd, (void *)dsp, AIO_EXT);\n      PRINTF((\"sound: %s: aio enabled, semaphore %d\\n\", dsp->path, dsp->semaphore));\n    }\n  return 1;\n}\n\n\nstatic void dspSetTrigger(struct dsp *dsp, int mask)\n{\n  if (dsp->caps & DSP_CAP_TRIGGER)\n    {\n      int triggers= 0, toggle= 0;\n      IOCTL(dsp->fd, SNDCTL_DSP_GETTRIGGER, &triggers);\n      toggle= triggers & ~mask;\n      IOCTL(in->fd, SNDCTL_DSP_SETTRIGGER, &toggle);\n      toggle= triggers | mask;\n      IOCTL(in->fd, SNDCTL_DSP_SETTRIGGER, &toggle);\n    }\n}\n\n\nstatic int dspGetInputSpace(struct dsp *dsp)\n{\n  struct audio_buf_info info;\n  if (ioctl(dsp->fd, SNDCTL_DSP_GETISPACE, &info) < 0)\n    {\n      fprintf(stderr, \"sound: %s: \", dsp->path);\n      perror(\"GETISPACE\");\n      return -1;\n    }\n  return info.bytes;\n}\n\n\nstatic int dspGetOutputSpace(struct dsp *dsp)\n{\n  struct audio_buf_info info;\n  if (ioctl(dsp->fd, SNDCTL_DSP_GETOSPACE, &info) < 0)\n    {\n      fprintf(stderr, \"sound: %s: \", dsp->path);\n      perror(\"GETOSPACE\");\n      return -1;\n    }\n  return info.bytes;\n}\n\n\n/*** aio ***/\n\n\nstatic void dspHandler(int fd, void *data, int flags)\n{\n  struct dsp *dsp= (struct dsp *)data;\n  assert(dsp != 0);\n  assert(dsp->semaphore > 0);\n  signalSemaphoreWithIndex(dsp->semaphore);\n  aioHandle(fd, dspHandler, flags);\n}\n\n\n/*** sound output ***/\n\n\nstatic sqInt sound_Stop(void)\n{\n  PRINTF((\"sound: stop\\n\"));\n  if (out)\n    {\n      if (out != in)\n\t{\n\t  dspClose(out);\n\t  PRINTF((\"sound: %s: device closed\\n\", out->path));\n\t}\n      else\n\t{\n\t  aioSuspend(out->fd, AIO_W);\n\t  PRINTF((\"sound: %s: aio suspended\\n\", out->path));\n\t}\n      out= 0;\n    }\n  return true;\n}\n\n\nstatic sqInt sound_Start(sqInt frameCount, sqInt samplesPerSec, sqInt stereo, sqInt semaIndex)\n{\n  int nChannels= (stereo ? 2 : 1);\n  PRINTF((\"sound: start\\n\"));\n\n#ifndef USE_PLAY_SEMAPHORE\n  if (semaIndex > 0)\n    {\n      PRINTF((\"sound: asynchronous output disabled\\n\"));\n      return success(false);\n    }\n#endif\n\n  if ((out= dspOpen(&dev_dsp, O_WRONLY | O_NONBLOCK)))\n    {\n      /* NOTE: The OSSPG says we should set fragsize immediately after\n\t opening the device (before setting sampling parameters) but this\n\t causes some drivers to refuse subsequent changes to the sample\n\t format.  We therefore set it after the sampling parameters.\n\t (This normally won't cause problems since the block size should\n\t not yet have been locked by OSS.  The worst that can happen is\n\t that we'll get a longer than optimal lead time if the blocking\n\t size cannot be successfully changed -- which is a far lesser evil\n\t than being unable to change the sample format.) */\n      if ((  dspSetFormat(out))\n\t  && dspSetChannels(out, nChannels)\n\t  && dspSetSpeed(out, samplesPerSec)\n\t  && dspSetFragSize(out, frameCount, nChannels)\n\t  && dspSetConversion(out)\n#        ifdef USE_PLAY_SEMAPHORE\n\t  && dspSetSemaphore(out, semaIndex)\n#        endif\n\t  )\n\t{\n\t  out->running= 0;\n\t  return true;\n\t}\n      sound_Stop();\n    }\n  PRINTF((\"sound: could not start\\n\"));\n  return false;\n}\n\n\nstatic sqInt sound_AvailableSpace(void)\n{\n  int bytes= 0;\n\n  if (out)\n    {\n      if (!out->running)\n\t{\n#        ifdef USE_PLAY_SEMAPHORE\n\t  if (out->semaphore)\n\t    aioHandle(out->fd, dspHandler, AIO_W);\n#        endif\n\t  out->running= 1;\n\t}\n      bytes= dspGetOutputSpace(out);\n      if (bytes >= 0)\n\t/* hardware bytes -> frames -> squeak bytes */\n\treturn bytes / out->hw.bpf * out->sq.bpf;\n    }\n  PRINTF((\"sound: available space: 0 bytes\\n\"));\n  return 0;\n}\n\n\nstatic sqInt sound_InsertSamplesFromLeadTime(sqInt frameCount, sqInt srcBufPtr, sqInt samplesOfLeadTime)\n{\n  return success(false);\n}\n\n\nstatic sqInt sound_PlaySamplesFromAtLength(sqInt frameCount, sqInt arrayIndex, sqInt startIndex)\n{\n  assert(out->write != 0);\n  return out->write(out, pointerForOop(arrayIndex) + startIndex * out->sq.bpf, frameCount);\n}\n\n\nstatic sqInt sound_PlaySilence(void)\n{\n  if (!out) return success(false);\n  return out->sq.fragSize;\n}\n\n\n/* sound input */\n\n\nstatic sqInt sound_StopRecording(void)\n{\n  PRINTF((\"sound: stop recording\\n\"));\n  if (in)\n    {\n      if (in != out)\n\t{\n\t  dspClose(in);\n\t  PRINTF((\"sound: %s: device closed\\n\", in->path));\n\t}\n      else\n\t{\n\t  aioSuspend(in->fd, AIO_R);\n\t  PRINTF((\"sound: %s: aio suspended\\n\", in->path));\n\t}\n      in= 0;\n    }\n  return true;\n}\n\n\nstatic sqInt sound_StartRecording(sqInt desiredSamplesPerSec, sqInt stereo, sqInt semaIndex)\n{\n  int nChannels= (stereo ? 2 : 1);\n  PRINTF((\"sound: start recording\\n\"));\n\n  if ((  (in= dspOpen(&dev_dsp1, O_RDONLY)))\n      || (in= dspOpen(&dev_dsp,  O_RDONLY)))\n    {\n      if ((  dspSetFormat(in))\n\t  && dspSetChannels(in, nChannels)\n\t  && dspSetSpeed(in, desiredSamplesPerSec)\n\t  /* try for 1/10 second input latency */\n\t  && dspSetFragSize(in, desiredSamplesPerSec / 10, nChannels)\n\t  && dspSetConversion(in)\n\t  && dspSetSemaphore(in, semaIndex))\n\t{\n\t  dspSetTrigger(in, PCM_ENABLE_INPUT);\n\t  aioHandle(in->fd, dspHandler, AIO_R);\n\t  in->running= 0;\n\t  return true;\n\t}\n      sound_StopRecording();\n    }\n  PRINTF((\"sound: could not start recording\\n\"));\n  return false;\n}\n\n\nstatic double sound_GetRecordingSampleRate(void)\n{\n  return in ? (double)in->hw.rate : 0.0l;\n}\n\n\nstatic sqInt sound_RecordSamplesIntoAtLength(sqInt buf, sqInt startSliceIndex, sqInt bufferSizeInBytes)\n{\n  /*PRINTF((\"record %d %d %d\\n\", buf, startSliceIndex, bufferSizeInBytes));*/\n\n  if (in)\n    {\n      /* start index is in samples (rather than bytes or frames???) */\n      int frameCount= ((bufferSizeInBytes / 2) - startSliceIndex) / in->sq.channels;\n      int bytesAvail= 0;\n      int framesAvail= 0;\n      if (in->running)\n\t{\n\t  bytesAvail= dspGetInputSpace(in);\n\t  if (bytesAvail <= 0)\n\t    return 0;\t\t/* underrun */\n\t}\n      else /* initial read required to start recording on some devices */\n\t{\n\t  bytesAvail= in->hw.fragSize;\n\t  in->running= 1;\n\t}\n      assert(bytesAvail > 0);\n      framesAvail= bytesAvail / in->hw.bpf;\n      frameCount= min(frameCount, framesAvail);\n      /*PRINTF((\"<%d\", frameCount * in->hw.bpf));*/\n      return in->read(in,\n\t\t      pointerForOop(buf) + startSliceIndex * 2,\n\t\t      frameCount)\n\t* in->sq.channels;\n    }\n  return 0;\n}\n\n\n/*** mixer ***/\n\n\n/* NOTES:\n * \n *   - output volume is connected to PCM unless there is no such\n *     device, in which case we try master VOLUME instead.\n * \n *   - input volume is connected to RECLEVEL unless there is no such\n *     device, in which case we try IGAIN instead.\n */\n\n#define\tLEVEL_MAX\t100\n\nstruct mixer\n{\n  char\t*path;\n  int\t fd;\n  int\t devices;\t/* available mixer devices */\n};\n\nstruct mixer dev_mixer= { \"/dev/mixer\", -1 };\n\nstruct mixer *mixer= 0;\n\n\nstatic struct mixer *mixerOpen(struct mixer *mix)\n{\n  assert(mix);\n  assert(mix->fd == -1);\n\n  if ((mix->fd= open(mix->path, O_RDWR, 0)) < 0)\n    {\n      fprintf(stderr, \"sound: \");\n      perror(mix->path);\n      return 0;\n    }\n  PRINTF((\"sound: %s: opened with mode %d\\n\", mix->path, O_RDWR));\n\n  /* read available devices */\n  {\n    if (IOCTL(mix->fd, SOUND_MIXER_READ_DEVMASK, &mix->devices))\n      mix->devices= 0;\n#  ifdef DEBUG\n    printf(\"sound: %s: available devices:\", mix->path);\n    {\n      int i= 0;\n      for (i= 0; i < SOUND_MIXER_NRDEVICES; ++i)\n\tif (mix->devices & (1 << i))\n\t  printf(\" %s\", devName(i));\n    }\n    printf(\"\\n\");\n#  endif\n  }\n\n  return mix;\n}\n\n\nstatic int mixerGetLevel(struct mixer *mix, int device, int *left, int *right)\n{\n  assert(mix);\n  assert(mix->fd >= 0);\n\n  if (mix->devices & (1 << device))\n    {\n      int vol= 0;\n      if (IOCTL(mix->fd, MIXER_READ(device), &vol) >= 0)\n\t{\n\t  *left=  (vol >> 8) & 0xff;\n\t  *right= (vol     ) & 0xff;\n\t  return 1;\n\t}\n    }\n  return 0;\n}\n\n\nstatic int mixerSetLevel(struct mixer *mix, int device, int left, int right)\n{\n  assert(mix);\n  assert(mix->fd >= 0);\n  assert((left  >= 0) && (left  <= LEVEL_MAX));\n  assert((right >= 0) && (right <= LEVEL_MAX));\n\n  if (mix->devices & (1 << device))\n    {\n      int vol= (left << 8) | right;\n      if (IOCTL(mix->fd, MIXER_WRITE(device), &vol) >= 0)\n\t{\n\t  PRINTF((\"sound: %s: %s: level set to %d%% + %d%%\\n\", mix->path,\n\t\t  devName(device), left, right));\n\t  return 1;\n\t}\n    }\n  PRINTF((\"sound: %s: %s: device not available\\n\", mix->path, devName(device)));\n  return 0;\n}\n\n\n\nstatic void sound_Volume(double *left, double *right)\n{\n  if (mixer || (mixer= mixerOpen(&dev_mixer)))\n    {\n      int l= 0, r= 0;\n      if ((  mixerGetLevel(mixer, SOUND_MIXER_PCM,     &l, &r))\n\t  || mixerGetLevel(mixer, SOUND_MIXER_VOLUME,  &l, &r))\n\t{\n\t  *left=  (double)l / (double)LEVEL_MAX;\n\t  *right= (double)r / (double)LEVEL_MAX;\n\t  return;\n\t}\n    }\n  success(false);\n}\n\n\n/* NOTE: I have a fundamental objection to the existence of this\n * primitive (and snd_SetRecLevel).  Unix audio philosophy is that\n * sound input/output and mixer control are totally seperate\n * activities.  Choice of input source, output destination and device\n * levels should always be left to an external mixer program.  The\n * option `-nommixer' therefore disables all writing to the mixer\n * device for those of us who object to Squeak abritrarily resetting\n * our carefully-adjusted input levels whenever sound recording is\n * started.\n */\nstatic void sound_SetVolume(double left, double right)\n{\n  if (noSoundMixer) return;\n  if (mixer || (mixer= mixerOpen(&dev_mixer)))\n    {\n      int l= (int)(left  * (double)LEVEL_MAX);\n      int r= (int)(right * (double)LEVEL_MAX);\n      if (l < 0) l= 0; if (l > LEVEL_MAX) l= LEVEL_MAX;\n      if (r < 0) r= 0; if (r > LEVEL_MAX) r= LEVEL_MAX;\n      if ((  mixerSetLevel(mixer, SOUND_MIXER_PCM,    l, r))\n\t  || mixerSetLevel(mixer, SOUND_MIXER_VOLUME, l, r))\n\treturn;\n    }\n  success(false);\n}\n\n\n#if 0\nstatic int sound_RecordLevel(int *level)\n{\n  if (mixer || (mixer= mixerOpen(&dev_mixer)))\n    {\n      int l= 0, r= 0;\n      if ((  mixerGetLevel(mixer, SOUND_MIXER_RECLEV, &l, &r))\n\t  || mixerGetLevel(mixer, SOUND_MIXER_IGAIN,  &l, &r))\n\t{\n\t  /* record level is average of l+r in the range 0..1000 */\n\t  *level= 1000 * (l + r) / 2 / 100;\n\t  return 1;\n\t}\n    }\n  return success(false);\n}\n#endif\n\n\nstatic sqInt sound_SetRecordLevel(sqInt level)\n{\n  if (noSoundMixer) return 1;\n  if (mixer || (mixer= mixerOpen(&dev_mixer)))\n    {\n      level= level * LEVEL_MAX / 1000;\n      if (level < 0)\n\tlevel= 0;\n      else if (level > 255)\n\tlevel= 255;\n\n      if (mixerSetLevel(mixer, SOUND_MIXER_RECLEV, level, level)) return 1;\n      if (mixerSetLevel(mixer, SOUND_MIXER_IGAIN,  level, level)) return 1;\n    }\n  return 0;\n}\n\nstatic sqInt sound_SetSwitch(sqInt id, sqInt captureFlag, sqInt parameter)\n{\n  return -1;\n}\n\nstatic sqInt sound_GetSwitch(sqInt id, sqInt captureFlag, sqInt channel)\n{\n  return -1;\n}\n\nstatic sqInt sound_SetDevice(sqInt id, char *arg)\n{\n  return -1;\n}\n\n/*** debugging ***/\n\n\n#ifdef DEBUG\n\nstatic char *afmtName(int i)\n{\n  switch (i)\n    {\n    case AFMT_MU_LAW:\t return \"MU_LAW\";\n    case AFMT_A_LAW:\t return \"A_LAW\";\n    case AFMT_IMA_ADPCM: return \"IMA_ADPCM\";\n    case AFMT_U8:\t return \"U8\";\n    case AFMT_S16_LE:\t return \"S16_LE\";\n    case AFMT_S16_BE:\t return \"S16_BE\";\n    case AFMT_S8:\t return \"S8\";\n    case AFMT_U16_LE:\t return \"U16_LE\";\n    case AFMT_U16_BE:\t return \"U16_BE\";\n    case AFMT_MPEG:\t return \"MPEG\";\n    }\n  return \"*** UNKNOWN ***\";\n}\n\nstatic char *capName(int i)\n{\n  switch (i)\n    {\n      case DSP_CAP_DUPLEX:   return \"DUPLEX\";\n      case DSP_CAP_REALTIME: return \"REALTIME\";\n      case DSP_CAP_BATCH:    return \"BATCH\";\n      case DSP_CAP_COPROC:   return \"COPROC\";\n      case DSP_CAP_TRIGGER:  return \"TRIGGER\";\n      case DSP_CAP_MMAP:     return \"MMAP\";\n    }\n  return \"*** UNKNOWN ***\";\n}\n\nstatic char *devName(int dev)\n{\n  static char *names[]= SOUND_DEVICE_NAMES;\n  if ((dev >= 0) && (dev <SOUND_MIXER_NRDEVICES)) return names[dev];\n  return \"*** ILLEGAL ***\";\n}\n\nstatic char *rdName(reader rd)\n{\n  if (rd == input)   return \"none\";\n  if (rd == rdMM__U) return \"MM__U\";\n  if (rd == rdMM_E_) return \"MM_E_\";\n  if (rd == rdMM_EU) return \"MM_EU\";\n  if (rd == rdMM8__) return \"MM8__\";\n  if (rd == rdMM8_U) return \"MM8_U\";\n  if (rd == rdMS___) return \"MS___\";\n  if (rd == rdMS__U) return \"MS__U\";\n  if (rd == rdMS_E_) return \"MS_E_\";\n  if (rd == rdMS_EU) return \"MS_EU\";\n  if (rd == rdMS8__) return \"MS8__\";\n  if (rd == rdMS8_U) return \"MS8_U\";\n  if (rd == rdSM___) return \"SM___\";\n  if (rd == rdSM__U) return \"SM__U\";\n  if (rd == rdSM_E_) return \"SM_E_\";\n  if (rd == rdSM_EU) return \"SM_EU\";\n  if (rd == rdSM8__) return \"SM8__\";\n  if (rd == rdSM8_U) return \"SM8_U\";\n  if (rd == rdSS__U) return \"SS__U\";\n  if (rd == rdSS_E_) return \"SS_E_\";\n  if (rd == rdSS_EU) return \"SS_EU\";\n  if (rd == rdSS8__) return \"SS8__\";\n  if (rd == rdSS8_U) return \"SS8_U\";\n  if (rd == 0)       return \"*** NULL ***\";\n  return \"*** ILLEGAL ***\";\n}\n\nstatic char *wrName(writer wr)\n{\n  if (wr == output)  return \"none\";\n  if (wr == wrMM__U) return \"MM__U\";\n  if (wr == wrMM_E_) return \"MM_E_\";\n  if (wr == wrMM_EU) return \"MM_EU\";\n  if (wr == wrMM8__) return \"MM8__\";\n  if (wr == wrMM8_U) return \"MM8_U\";\n  if (wr == wrMS___) return \"MS___\";\n  if (wr == wrMS__U) return \"MS__U\";\n  if (wr == wrMS_E_) return \"MS_E_\";\n  if (wr == wrMS_EU) return \"MS_EU\";\n  if (wr == wrMS8__) return \"MS8__\";\n  if (wr == wrMS8_U) return \"MS8_U\";\n  if (wr == wrSM___) return \"SM___\";\n  if (wr == wrSM__U) return \"SM__U\";\n  if (wr == wrSM_E_) return \"SM_E_\";\n  if (wr == wrSM_EU) return \"SM_EU\";\n  if (wr == wrSM8__) return \"SM8__\";\n  if (wr == wrSM8_U) return \"SM8_U\";\n  if (wr == wrSS__U) return \"SS__U\";\n  if (wr == wrSS_E_) return \"SS_E_\";\n  if (wr == wrSS_EU) return \"SS_EU\";\n  if (wr == wrSS8__) return \"SS8__\";\n  if (wr == wrSS8_U) return \"SS8_U\";\n  if (wr == 0)       return \"*** NULL ***\";\n  return \"*** ILLEGAL ***\";\n}\n\n#endif /* DEBUG */\n\n\n#include \"SqSound.h\"\n\nSqSoundDefine(OSS);\n\n\n#include \"SqModule.h\"\n\nstatic void  sound_parseEnvironment(void)\n{\n  if (getenv(\"SQUEAK_NOMIXER\")) noSoundMixer= 1;\n}\n\nstatic int   sound_parseArgument(int argc, char **argv)\n{\n  if (!strcmp(argv[0], \"-nomixer\")) return noSoundMixer= 1;\n  return 0;\n}\n\nstatic void  sound_printUsage(void)\n{\n  printf(\"\\nOSS <option>s:\\n\");\n  printf(\"  -nomixer              disable mixer (volume) adjustment\\n\");\n}\n\nstatic void  sound_printUsageNotes(void)\n{\n}\n\nstatic void *sound_makeInterface(void)\n{\n  return &sound_OSS_itf;\n}\n\nSqModuleDefine(sound, OSS);\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-sound-Sun/acinclude.m4",
    "content": "# -*- sh -*-\n\nAC_MSG_CHECKING([for SunOS/Solaris audio])\nAC_TRY_COMPILE([#include <sys/audioio.h>],[AUDIO_SUNVTS;],[\n  AC_MSG_RESULT(yes)\n  AC_DEFINE_UNQUOTED(HAVE_SYS_AUDIOIO_H,1)\n],[\n  AC_TRY_COMPILE([#include <sun/audioio.h>],[AUDIO_SUNVTS;],[\n    AC_MSG_RESULT(yes)\n    AC_DEFINE_UNQUOTED(HAVE_SUN_AUDIOIO_H,1)\n  ],[\n    AC_MSG_RESULT(no)\n    AC_PLUGIN_DISABLE\n  ])\n])\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-sound-Sun/config.cmake",
    "content": "PLUGIN_FIND_INCLUDE (SYS_AUDIOIO sys/audioio.h)\nPLUGIN_FIND_INCLUDE (SUN_AUDIOIO sun/audioio.h)\nPLUGIN_REQUIRE_INCLUDE (STROPTS stropts.h)\n\nIF (NOT VM_HOST_OS MATCHES \"solaris.*\")\n  PLUGIN_DISABLE ()\nELSE ()\n  IF (NOT HAVE_SYS_AUDIOIO_H AND NOT HAVE_SUN_AUDIOIO_H)\n    PLUGIN_DISABLE ()\n  ENDIF ()\nENDIF ()\n\nCONFIG_DEFINE (HAVE_SYS_AUDIOIO_H)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-sound-Sun/sqUnixSoundSun.c",
    "content": "/* sqUnixSoundSun.c -- sound support for SunOS and Solaris\n *\n *   Copyright (C) 1996-2004 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n *\n * Authors: Ian.Piumarta@inria.fr and Lex Spoon <lex@cc.gatech.edu>\n * \n * This support is rudimentary and is implemented largely by reading\n * header files and guessing what to do.\n */\n\n#include \"sq.h\"\n\n#undef\tDEBUG\n\n#include \"sqaio.h\"\n\n#include <stdio.h>\n#include <unistd.h>\n#include <fcntl.h>\n#include <sys/ioctl.h>\n#ifdef HAVE_SYS_AUDIOIO_H\n# include <sys/audioio.h>\n#else\n# include <sun/audioio.h>\n#endif\n#include <errno.h>\n\n#ifdef DEBUG\n# define PRINTF(ARGS) printf ARGS\n# define TRACE 1\n#elsen\n# define PRINTF(ARGS)\n#endif\n\nstatic int sound_Stop(void);\n\nstatic int auFd=\t       -1;   /* open on /dev/dsp */\nstatic int fmtStereo=\t\t0;   /* whether we are playing in stereo or not */\nstatic int auPlaySemaIndex=\t0;   /* an index to signal when new data may be played */\nstatic int auBufBytes=\t\t0;   /*  buffer size to use for playback.\n\t\t\t\t\t unfortunately, this bears no relationship to\n\t\t\t\t\t whatever the kernel and soundcard are using  */\nstatic int auBuffersPlayed=\t0;\n\n\nstatic void auHandle(int fd, void *data, int flags)\n{\n  if (auFd < 0) return;\n  if (sound_AvailableSpace() > 0)\n    signalSemaphoreWithIndex(auPlaySemaIndex);\n  aioHandle(fd, auHandle, flags);\n}\n\n\n/*** exported sound output functions ***/\n\n\nstatic int sound_Stop(void)\n{\n  if (auFd == -1) return;\n\n  aioDisable(auFd);\n  close(auFd);\n  auFd= -1;\n\n  return 0;\n}\n\n\nstatic int sound_Start(int frameCount, int samplesPerSec, int stereo, int semaIndex)\n{\n  int bytesPerFrame=\t(stereo ? 4 : 2);\n  int bufferBytes=\t((frameCount * bytesPerFrame) / 8) * 8;\n  struct audio_info info;\n  int err;\n     \n  if (auFd != -1) sound_Stop();\n  auPlaySemaIndex= semaIndex;\n  fmtStereo= stereo;\n  auBufBytes= bytesPerFrame * frameCount;\n\n  if ((auFd= open(\"/dev/audio\", O_WRONLY)) == -1)\n    {\n      perror(\"/dev/audio\");\n      return false;\n    }\n  /* set up device */\n  if (ioctl(auFd, AUDIO_GETINFO, &info))\n    {\n      perror(\"AUDIO_GETINFO\");\n      goto closeAndFail;\n    }\n  info.play.gain= 100;\n  info.play.precision= 16;\n  info.play.encoding= AUDIO_ENCODING_LINEAR;\n  info.play.channels= fmtStereo ? 2 : 1;\n  info.play.sample_rate= samplesPerSec;\n\n  auBuffersPlayed= info.play.eof;\n\n  while ((err= ioctl(auFd, AUDIO_SETINFO, &info)) && errno == EINTR)\n    ;\n  if (err)\n    {\n      perror(\"AUDIO_SETINFO\");\n      goto closeAndFail;\n    }\n  aioEnable(auFd, 0, 0);\n  aioHandle(auFd, auHandle, AIO_RX);\n  return true;\n  \n closeAndFail:\n  close(auFd);\n  auFd= -1;\n  return false;\n}\n\n\nstatic int sound_AvailableSpace(void)\n{\n  struct audio_info info;\n\n  if (auFd < 0) return 0;\n\n  if (ioctl(auFd, AUDIO_GETINFO, &info))\n    {\n      perror(\"AUDIO_GETINFO\");\n      sound_Stop();\n    }\n  return (auBufBytes * (info.play.eof - auBuffersPlayed + 2));\n}\n\n\nstatic int sound_PlaySamplesFromAtLength(int frameCount, int arrayIndex, int startIndex)\n{\n  short *src= (short *) (arrayIndex + 4*startIndex);\n  short buf[2*frameCount];\n  int i;\n  int bytes;\n\n  if (auFd < 0) return -1;\n\n  if (fmtStereo)\n    {\n      bytes= 4 * frameCount;\n      for (i= 0;  i < 2 * frameCount;  i++)\n\tbuf[i]= src[i];\n    }\n  else\n    {\n      bytes= 2 * frameCount;\n      for (i= 0;  i < frameCount;  i++)\n\tbuf[i]= src[2*i];\n    }\n  /* write data to device from auBuf to dst */\n  while (bytes > 0)\n    {\n      int len;\n      char *pos= (char *) buf;\n\t  \n      len= write(auFd, pos, bytes);\n      if (len < 0)\n\t{\n\t  perror(\"/dev/audio\");\n\t  return 0;\n\t}\n      bytes -= len;\n      pos += len;\n    }\n  /* add an eof marker */\n  write(auFd, buf, 0);\n  auBuffersPlayed += 1;\n  \n  return frameCount;\n}\n\n\nstatic int sound_InsertSamplesFromLeadTime(int frameCount, int srcBufPtr,\n\t\t\t\t  int samplesOfLeadTime)\n{\n  return 0;\n}\n\n\nstatic int sound_PlaySilence(void)\n{\n     return 0;\n}\n\n\n/** recording not supported **/\nstatic int sound_SetRecordLevel(int level)\n{\n  success(false);\n  return;\n}\n\n\nstatic int sound_StartRecording(int desiredSamplesPerSec, int stereo, int semaIndex)\n{\n  success(false);\n  return;\n}\n\n\nstatic int sound_StopRecording(void)\n{\n  return;\n}\n\n\nstatic double sound_GetRecordingSampleRate(void)\n{\n  success(false);\n  return 0.0;\n}\n\n\nstatic int sound_RecordSamplesIntoAtLength(int buf, int startSliceIndex, int bufferSizeInBytes)\n{\n  success(false);\n  return 0;\n}\n\n\n\nstatic void sound_Volume(double *left, double *right)\n{\n  success(false);\n  return;\n}\n\n\nstatic void sound_SetVolume(double left, double right)\n{\n  success(false);\n  return;\n}\n\n\n\n#include \"SqSound.h\"\n\nSqSoundDefine(Sun);\n\n\n#include \"SqModule.h\"\n\nstatic void  sound_parseEnvironment(void) {}\nstatic int   sound_parseArgument(int argc, char **argv) { return 0; }\nstatic void  sound_printUsage(void) {}\nstatic void  sound_printUsageNotes(void) {}\nstatic void *sound_makeInterface(void) { return &sound_Sun_itf; }\n\nSqModuleDefine(sound, Sun);\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-sound-custom/acinclude.m4",
    "content": "# -*- sh -*-\n\nAC_MSG_CHECKING([for custom sound support])\n\nAC_ARG_WITH(custom-sound,\n[  --with-custom-sound     enable custom sound support [default=disabled]],\n  [have_snd_custom=\"$withval\"],\n  [have_snd_custom=\"no\"])\n\nif test \"$have_snd_custom\" = \"yes\"; then\n  # check for libraries, headers, etc., here...\n  AC_MSG_RESULT([yes])\nelse\n  AC_MSG_RESULT([no])\n  AC_PLUGIN_DISABLE\nfi\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-sound-custom/sqUnixCustomSound.c",
    "content": "/* sqUnixCustomSound.c -- sound module for custom sound system\n *\n * Last edited: 2005-04-06 05:44:40 by piumarta on pauillac.hpl.hp.com\n *\n * This is a template for creating your own sound drivers for Squeak:\n * \n *   - copy the entire contents of this directory to some other name\n *   - rename this file to be something more appropriate\n *   - modify acinclude.m4, Makefile.in, and ../vm/sqUnixMain accordingly\n *   - implement all the stubs in this file that currently do nothing\n */\n\n#include \"sq.h\"\n#include \"sqaio.h\"\n\n#include <stdio.h>\n\n\n#define trace() fprintf(stderr, \"%s:%d %s\\n\", __FILE__, __LINE__, __FUNCTION__)\n\n\n/*** sound output ***/\n\n\nstatic sqInt sound_AvailableSpace(void)\n{\n  trace();\n  return 8192;\n}\n\nstatic sqInt sound_InsertSamplesFromLeadTime(sqInt frameCount, sqInt srcBufPtr, sqInt samplesOfLeadTime)\n{\n  trace();\n  return frameCount;\n}\n\nstatic sqInt sound_PlaySamplesFromAtLength(sqInt frameCount, sqInt arrayIndex, sqInt startIndex)\n{\n  trace();\n  return frameCount;\n}\n\nstatic sqInt sound_PlaySilence(void)\n{\n  trace();\n  return 8192;\n}\n\nstatic sqInt sound_Start(sqInt frameCount, sqInt samplesPerSec, sqInt stereo, sqInt semaIndex)\n{\n  trace();\n  return true;\n}\n\nstatic sqInt sound_Stop(void)\n{\n  trace();\n  return 0;\n}\n\n\n/*** sound input ***/\n\n\nstatic sqInt sound_StartRecording(sqInt desiredSamplesPerSec, sqInt stereo, sqInt semaIndex)\n{\n  trace();\n  return 0;\n}\n\nstatic sqInt sound_StopRecording(void)\n{\n  trace();\n  return 0;\n}\n\nstatic double sound_GetRecordingSampleRate(void)\n{\n  trace();\n  return 8192;\n}\n\nstatic sqInt sound_RecordSamplesIntoAtLength(sqInt buf, sqInt startSliceIndex, sqInt bufferSizeInBytes)\n{\n  trace();\n  return 8192;\n}\n\n/*** sound mixer ***/\n\nstatic void sound_Volume(double *left, double *right)\n{\n  trace();\n  *left= 1.0;\n  *right= 1.0;\n}\n\nstatic void sound_SetVolume(double left, double right)\n{\n  trace();\n}\n\nstatic sqInt sound_SetRecordLevel(sqInt level)\n{\n  trace();\n  return level;\n}\n\nstatic sqInt sound_GetSwitch(sqInt id, sqInt captureFlag, sqInt channel)\n{\n  trace();\n  return 0;\n}\n\nstatic sqInt sound_SetSwitch(sqInt id, sqInt captureFlag, sqInt parameter)\n{\n  trace();\n  return 0;\n}\n\nstatic sqInt sound_SetDevice(sqInt id, char *arg)\n{\n  trace();\n  return 0;\n}\n\n\n#include \"SqSound.h\"\n\nSqSoundDefine(custom);\t\t\t\t/* must match name in makeInterface() below */\n\n#include \"SqModule.h\"\n\nstatic void sound_parseEnvironment(void) {}\n\nstatic int sound_parseArgument(int argc, char **argv)\n{\n  if (!strcmp(argv[0], \"-nosound\")) return 1;\n  return 0;\n}\n\nstatic void  sound_printUsage(void)\t\t{}\nstatic void  sound_printUsageNotes(void)\t{}\n\nstatic void *sound_makeInterface(void)\n{\n  return &sound_custom_itf;\t\t\t/* must match name in SqSoundDefine() above */\n}\n\nSqModuleDefine(sound, custom);\t\t\t/* must match name in sqUnixMain.c's moduleDescriptions */\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-sound-null/acinclude.m4",
    "content": "# -*- sh -*-\n# empty to provoke config/mkacinc into including vm-sound-null for consideration\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-sound-null/build.cmake",
    "content": "EXPECT_UNDEFINED_SYMBOLS ()\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-sound-null/sqUnixSoundNull.c",
    "content": "/* sqUnixSoundNull.c -- sound module for no sound\n *\n * Author: Ian.Piumarta@squeakland.org\n * \n * Last edited: 2008-04-21 14:51:23 by piumarta on emilia\n *\n *   Copyright (C) 1996-2005 by Ian Piumarta and other authors/contributors\n *                              listed elsewhere in this file.\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *      You are NOT ALLOWED to distribute modified versions of this file\n *      under its original name.  If you modify this file then you MUST\n *      rename it before making your modifications available publicly.\n * \n *   This file is distributed in the hope that it will be useful, but WITHOUT\n *   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n *   FITNESS FOR A PARTICULAR PURPOSE.\n *   \n *   You may use and/or distribute this file ONLY as part of Squeak, under\n *   the terms of the Squeak License as described in `LICENSE' in the base of\n *   this distribution, subject to the following additional restrictions:\n * \n *   1. The origin of this software must not be misrepresented; you must not\n *      claim that you wrote the original software.  If you use this software\n *      in a product, an acknowledgment to the original author(s) (and any\n *      other contributors mentioned herein) in the product documentation\n *      would be appreciated but is not required.\n * \n *   2. You must not distribute (or make publicly available by any\n *      means) a modified copy of this file unless you first rename it.\n * \n *   3. This notice must not be removed or altered in any source distribution.\n * \n *   Using (or modifying this file for use) in any context other than Squeak\n *   changes these copyright conditions.  Read the file `COPYING' in the\n *   directory `platforms/unix/doc' before proceeding with any such use.\n */\n\n#include \"sq.h\"\n#include \"SqSound.h\"\n\n\n#define FAIL(X) { success(false); return X; }\n\n/* output */\nstatic sqInt  sound_AvailableSpace(void)\t\t\t\t\t\t\t\t\tFAIL(8192)\nstatic sqInt  sound_InsertSamplesFromLeadTime(sqInt frameCount, sqInt srcBufPtr, sqInt samplesOfLeadTime)\tFAIL(frameCount)\nstatic sqInt  sound_PlaySamplesFromAtLength(sqInt frameCount, sqInt arrayIndex, sqInt startIndex)\t\tFAIL(8192)\nstatic sqInt  sound_PlaySilence(void)\t\t\t\t\t\t\t\t\t\tFAIL(8192)\nstatic sqInt  sound_Start(sqInt frameCount, sqInt samplesPerSec, sqInt stereo, sqInt semaIndex)\t\t\tFAIL(1)\nstatic sqInt  sound_Stop(void)\t\t\t\t\t\t\t\t\t\t\tFAIL(0)\n/* input */\nstatic sqInt  sound_StartRecording(sqInt desiredSamplesPerSec, sqInt stereo, sqInt semaIndex)\t\t\tFAIL(0)\nstatic sqInt  sound_StopRecording(void)\t\t\t\t\t\t\t\t\t\tFAIL(0)\nstatic double sound_GetRecordingSampleRate(void)\t\t\t\t\t\t\t\tFAIL(0)\nstatic sqInt  sound_RecordSamplesIntoAtLength(sqInt buf, sqInt startSliceIndex, sqInt bufferSizeInBytes)\tFAIL(0)\n/* mixer */\nstatic void   sound_Volume(double *left, double *right)\t\t\t\t\t\t\t\t{ return; }\nstatic void   sound_SetVolume(double left, double right)\t\t\t\t\t\t\t{ return; }\nstatic sqInt  sound_SetRecordLevel(sqInt level)\t\t\t\t\t\t\t\t\t{ return level; }\n\nstatic sqInt  sound_SetSwitch(sqInt id, sqInt captureFlag, sqInt parameter)\t\t\t\t\tFAIL(-1)\nstatic sqInt  sound_GetSwitch(sqInt id, sqInt captureFlag, sqInt channel)\t\t\t\t\tFAIL(-1)\nstatic sqInt  sound_SetDevice(sqInt id, char *arg)\t\t\t\t\t\t\t\tFAIL(-1)\n\n\n/* eem Feb 7 2010 after hrs' SoundRecorder extras. */\nstatic sqInt sound_GetRecordLevel(void) { return 0; }\n\nstatic int sound_GetNumberOfSoundPlayerDevices(void) { return 0; }\n\nstatic int sound_GetNumberOfSoundRecorderDevices(void) { return 0; }\n\nstatic char* sound_GetDefaultSoundPlayer(void) { return 0; }\n\nstatic char* sound_GetDefaultSoundRecorder(void) { return 0; }\n\nstatic char* sound_GetSoundPlayerDeviceName(int n) { return 0; }\n\nstatic char* sound_GetSoundRecorderDeviceName(int n) { return 0; }\n\nstatic void sound_SetDefaultSoundPlayer(char *deviceName) {}\n\nstatic void sound_SetDefaultSoundRecorder(char *deviceName) {}\n\n#if SqSoundVersionMajor > 1 || SqSoundVersionMinor >= 3\n/* Acoustic echo-cancellation (AEC) is not supported on Linux yet. */\nint sound_SupportsAEC(void)                 { return 0; }\n\n/* Acoustic echo-cancellation (AEC) is not supported on Linux yet. */\nint sound_EnableAEC(int trueOrFalse)\n{\n\tif (trueOrFalse) return PrimErrUnsupported;\n\telse return 0; /* success */\n}\n#endif /* SqSoundVersionMajor > 1 || SqSoundVersionMinor >= 3 */\n\n\nSqSoundDefine(null);\n\n#include \"SqModule.h\"\n\nstatic void sound_parseEnvironment(void) {}\n\nstatic int  sound_parseArgument(int argc, char **argv)\n{\n  if (!strcmp(argv[0], \"-nosound\")) return 1;\n  return 0;\n}\n\nstatic void  sound_printUsage(void) {}\nstatic void  sound_printUsageNotes(void) {}\nstatic void *sound_makeInterface(void) { return &sound_null_itf; }\n\nSqModuleDefine(sound, null);\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-sound-pulse/config.cmake",
    "content": "PLUGIN_REQUIRE_LIBRARY (PULSE pulse-simple)\n"
  },
  {
    "path": "vm/src/from_squeak/unix/vm-sound-pulse/sqUnixSoundPulseAudio.c",
    "content": "/* sqUnixSoundPulseAudio.c -- sound module for Pulse Audio\n *\n * Author: Derek O'Connell <doc@doconnel.f9.co.uk>\n * \n *   Copyright (C) 2009--2010 by Derek O'Connell\n *   All rights reserved.\n *   \n *   This file is part of Unix Squeak.\n * \n *   Permission is hereby granted, free of charge, to any person obtaining a\n *   copy of this software and associated documentation files (the \"Software\"),\n *   to deal in the Software without restriction, including without limitation\n *   the rights to use, copy, modify, merge, publish, distribute, sublicense,\n *   and/or sell copies of the Software, and to permit persons to whom the\n *   Software is furnished to do so, subject to the following conditions:\n * \n *   The above copyright notice and this permission notice shall be included in\n *   all copies or substantial portions of the Software.\n * \n *   THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n *   THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n *   DEALINGS IN THE SOFTWARE.\n *\n * Last edited: 2010-04-13 07:45:37 by piumarta on ubuntu\n */\n\n/* ========== */\n/* INCLUDES   */\n/* ========== */\n\n#include \"sq.h\"\n#include <errno.h>\n#include <signal.h>\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <sys/errno.h>\n#include <sys/mman.h>\n#include <string.h>\n#include <unistd.h>\n\n/*\n#include <glib.h>\n*/\n#include <pthread.h>\n\n#include <pulse/simple.h>\n#include <pulse/error.h>\n/*\n#include <pulse/gccmacro.h>\n*/\n\n/* ========== */\n/* MACROS     */\n/* ========== */\n\n#define FAIL(X)   \\\n{     \\\n\tsuccess(false); \\\n\treturn X;   \\\n}\n\n#define snd(expr, what)\t\t\t\t\t\t\\\n  if ((rc = snd_##expr) < 0)\t\t\t\t\t\\\n    {\t\t\t\t\t\t\t\t\\\n      fprintf(stderr, \"%s: %s\\n\", what, snd_strerror(rc));\t\\\n      success(false);\t\t\t\t\t\t\\\n      return rc;\t\t\t\t\t\t\\\n    }\n\n\n/* ================================== DEBUGGING  */\n\n#define xDBG\n\n#ifdef DBG\n\t#define DBG_MSG_MAX_LEN 128\n\n\tchar *dbg_msg[DBG_MSG_MAX_LEN];\n\n\t#define DBGMSG(M) { \\\n\t\tprintf(\"DBG: sqUnixSoundMaemo: %s (%d, %s)\\n\", M, errno, strerror (errno)); \\\n\t\terrno = 0; \\\n\t}\n\n\t#define DBGERR(M, E) { \\\n\t\tsprintf(*dbg_msg, M, E); \\\n\t\tDBGMSG(dbg_msg); \\\n\t}\n\n#else\n\t#define DBGMSG(M) \n\t#define DBGERR(M, E)\n#endif\n\n\n/* ================================== TYPES */\n\ntypedef struct {\n\tshort *buffer;\n\tunsigned long samples;\n\tint isFree;\n} audioBuffer_t;\n\ntypedef struct {\n\tpthread_mutex_t *mutex;\n\tpthread_cond_t \t*cond;\n\tunsigned int count;\n} gen_sig_t;\n\ntypedef struct {\n\t/* Left in for debugging >>> */\n\tconst char *dbgName;\n\tconst char *device;\n\t/* <<< */\n\t\n\tint open;\n\t\n\tunsigned long maxSamples;\n\tunsigned long maxWords;\n\tunsigned long maxBytes;\n\t\n\taudioBuffer_t *buffer;\n\t\n\tint maxBuffers;\n\tint buffersAllocated;\n\tint bufferFree;\n\tint bufferNext;\n\tint bufferCount;\n\tint bufferFull;\n\t\n\tpthread_mutex_t *bufferMutex;\n\t\n\tvoid *\t\tthreadFunc;\n\tpthread_t thread;\n\n\tgen_sig_t sigRun;\n\tgen_sig_t sigStalled;\n\t\n\tint running;\n\tint exit;\n\tint stall;\n\tint sqSemaphore;\n\t\n\tint rateID;\n\tint bytesPerFrame;\n\t\n\t/* PULSE, Simple API parameters */\n\tpa_simple *pa_conn;\n  pa_sample_spec pa_spec;\n } audioIO_t;\n\n\n/* ================================== FUNCTION PROTOTYPES */\n\nstatic int rate(int rateID);\nstatic int rateID(int rate);\n\nstatic inline unsigned short _swapw(unsigned short v); /* From io.h */\n\nstatic int devInputReady(int dev_fd);\n\nstatic void sigWait(gen_sig_t *sig);\nstatic void sigReset(gen_sig_t *sig);\nstatic void sigSignal(gen_sig_t *sig);\n\nstatic void ioThreadWaitToRun(audioIO_t *audioIO);\nstatic void ioThreadExit(audioIO_t *audioIO);\nstatic int  ioThreadStart(audioIO_t *audioIO);\nstatic int  ioThreadIsRunning(audioIO_t *audioIO);\nstatic void ioThreadStall(audioIO_t *audioIO);\n\nstatic void ioZeroBuffers(audioIO_t *audioIO);\nstatic void ioFreeBuffers(audioIO_t *audioIO);\nstatic int  ioFreeBytes(audioIO_t *audioIO);\nstatic int  ioIsFull(audioIO_t *audioIO);\nstatic int  ioAddPlayBuffer(void *buffer, int frameCount);\nstatic int  ioGetRecordBuffer(void *buffer, int bufferBytes);\nstatic int  ioAllocBuffers(audioIO_t *audioIO, int frameCount);\nstatic int  ioGetBufferData(audioIO_t *audioIO, void **buffer, int *frames);\nstatic int  ioNextBuffer(audioIO_t *audioIO);\n\nstatic void *writerThread(void *ptr);\nstatic void *readerThread(void *ptr);\n\nstatic int  ioInit();\n\n/* SQUEAK INTERFACE */\n\nstatic int trace();\n\nstatic sqInt sound_AvailableSpace(void);\nstatic sqInt sound_InsertSamplesFromLeadTime(int frameCount, int srcBufPtr, int samplesOfLeadTime);\nstatic sqInt sound_PlaySamplesFromAtLength(int frameCount, int arrayIndex, int startIndex);\nstatic sqInt sound_PlaySilence(void);\nstatic sqInt sound_Start(int frameCount, int samplesPerSec, int stereo, int semaIndex);\nstatic sqInt sound_Stop(void);\n\nstatic sqInt sound_StartRecording(int desiredSamplesPerSec, int stereo, int semaIndex);\nstatic sqInt sound_StopRecording(void);\nstatic double sound_GetRecordingSampleRate(void);\nstatic sqInt sound_RecordSamplesIntoAtLength(int buf, int startSliceIndex, int bufferSizeInBytes);\n\nstatic int mixer_open(char *name);\nstatic void mixer_close(void);\nstatic inline void mixer_getVolume(char *name, int captureFlag, double *leftLevel, double *rightLevel);\nstatic inline void mixer_setVolume(char *name, int captureFlag, double leftLevel, double rightLevel);\nstatic int mixer_setSwitch(char *name, int captureFlag, int parameter);\nstatic int mixer_getSwitch(char *name, int captureFlag, int channel);\nstatic void sound_Volume(double *left, double *right);\nstatic void sound_SetVolume(double left, double right);\nstatic sqInt sound_SetRecordLevel(sqInt level);\nstatic sqInt sound_SetDevice(sqInt id, char *arg);\nstatic sqInt sound_GetSwitch(sqInt id, sqInt captureFlag, sqInt channel);\nstatic sqInt sound_SetSwitch(sqInt id, sqInt captureFlag, sqInt parameter);\n\n\n/* ==================== \t\t\t\t*/\n/* ==================== GLOBALS */\n/* ==================== \t\t\t\t*/\n\n/* Left in but not used >>> */\n#define SQ_SND_PLAY_START_THRESHOLD\t7/8\n#define SQ_SND_PLAY_AVAIL_MIN\t\t4/8\n/* <<< */\n\n/* Arbitrary (apart from minmising latency) >>> */\n#define MAX_INPUT_BUFFERS 10\n#define MAX_OUTPUT_BUFFERS 2\n/* <<< */\n\naudioBuffer_t iBuffer[MAX_INPUT_BUFFERS];\naudioBuffer_t oBuffer[MAX_OUTPUT_BUFFERS];\n\n/* STATICALLY INITIALISED SO AUTO-DESTROYED (ON CRASHING FOR INSTANCE) >>> */\n\n/* input */\n\npthread_mutex_t audioInBufferMutex\t\t= PTHREAD_MUTEX_INITIALIZER;\n\npthread_mutex_t audioInRunMutex\t\t\t\t= PTHREAD_MUTEX_INITIALIZER;\npthread_cond_t \taudioInRunCond\t\t\t\t= PTHREAD_COND_INITIALIZER;\n\npthread_mutex_t audioInStalledMutex\t\t= PTHREAD_MUTEX_INITIALIZER;\npthread_cond_t \taudioInStalledCond\t\t= PTHREAD_COND_INITIALIZER;\n\n/* output */\n\npthread_mutex_t audioOutBufferMutex\t\t= PTHREAD_MUTEX_INITIALIZER;\n\npthread_mutex_t audioOutRunMutex\t\t\t= PTHREAD_MUTEX_INITIALIZER;\npthread_cond_t \taudioOutRunCond\t\t\t\t= PTHREAD_COND_INITIALIZER;\n\npthread_mutex_t audioOutStalledMutex\t= PTHREAD_MUTEX_INITIALIZER;\npthread_cond_t \taudioOutStalledCond\t\t= PTHREAD_COND_INITIALIZER;\n\n/* <<< */\n\n\naudioIO_t audioIn, audioOut;\n\nint initDone = false;\n\n/* EXTRA FOR ALSA BUT UNUSED >>> */\n/*\nstatic int\t\toutput_buffer_frames_available = 1;\nstatic double\tmax_delay_frames = 0;\n*/\n/* <<< */\n\n\n/* ================================== UTILS */\n\n/* RATE CONVERSION: from dsp code but not used (yet). Maybe not needed at all with AlSA */\n/* RATE CONVERSION: fixed preset rates are used. TBD: choose nearest to requested */\n/*\nstatic int rate(int rateID) {\n\tif (SAMPLE_RATE_8KHZ\t  \t== rateID) return  8000;\n\tif (SAMPLE_RATE_16KHZ\t  \t== rateID) return 16000;\n\tif (SAMPLE_RATE_11_025KHZ == rateID) return 11025;\n\tif (SAMPLE_RATE_22_05KHZ  == rateID) return 22050;\n\tif (SAMPLE_RATE_44_1KHZ\t  == rateID) return 44100;\n\treturn -1;\n}\n\nstatic int rateID(int rate) {\n\tif ( 8000 == rate) return SAMPLE_RATE_8KHZ;\n\tif ( 8192 == rate) return SAMPLE_RATE_8KHZ;\n\tif (16000 == rate) return SAMPLE_RATE_16KHZ;\n\tif (11025 == rate) return SAMPLE_RATE_11_025KHZ;\n\tif (22050 == rate) return SAMPLE_RATE_22_05KHZ;\n\tif (44100 == rate) return SAMPLE_RATE_44_1KHZ;\n\treturn -1;\n}\n*/\n\n/* From io.h because recorded data has to be Big Endian */\nstatic inline unsigned short _swapw(unsigned short v) {\n\treturn ((v << 8) | (v >> 8));\n}\n\n\n/* Not used but maybe useful */\n/*\nstatic int devInputReady(int dev_fd) {\n\tstruct pollfd pfd;\n\tpfd.fd = dev_fd;\n\tpfd.events = POLLIN;\n\tif (poll (&pfd,1,0)>0) return true;\n\treturn false;\n}\n*/\n\nstatic void printPALatency() {\n\tpa_usec_t latency;\n\tint error;\n\t\n\tif ((latency = pa_simple_get_latency(audioOut.pa_conn, &error)) == (pa_usec_t) -1)\n\t\tfprintf(stderr, __FILE__\": pa_simple_get_latency() failed: %s\\n\", pa_strerror(error));\n\telse\n\t\tfprintf(stderr, \"%0.0f usec    \\r\", (float)latency);\n}\n\n/* ================================== Signal Ops */\n\nstatic void sigWait(gen_sig_t *sig) {\n\tpthread_mutex_lock(sig->mutex);\n\t\twhile( !sig->count )\n\t\t\tpthread_cond_wait(sig->cond, sig->mutex);\n\t\tsig->count -= 1;\n\tpthread_mutex_unlock(sig->mutex);\n}\n\nstatic void sigReset(gen_sig_t *sig) {\n\tpthread_mutex_lock(sig->mutex);\n\t\tsig->count = 0;\n\tpthread_mutex_unlock(sig->mutex);\n}\n\nstatic void sigSignal(gen_sig_t *sig) {\n\tpthread_mutex_lock(sig->mutex);\n\t\tsig->count += 1;\n\t\tpthread_cond_signal(sig->cond);\n\tpthread_mutex_unlock(sig->mutex);\n}\n\n/* Here for debugging but direct calls would be ok >>> */\nstatic void signalSqueak(audioIO_t *audioIO) {\n/*\tprintf(\"@%d\",audioIO->sqSemaphore);\n*/\n\tif (0 < audioIO->sqSemaphore)\n\t\tsignalSemaphoreWithIndex(audioIO->sqSemaphore);\n}\n/* <<< */\n\n\n/* ================================== Thread Ops */\n\nstatic void ioThreadExit(audioIO_t *audioIO) {\n\tif (!audioIO->thread) return;\n\taudioIO->exit = 1;\n\tsigSignal(&audioIO->sigRun);\n\tpthread_join(audioIO->thread, NULL);\n\taudioIO->thread = 0;\n}\n\nstatic int ioThreadStart(audioIO_t *audioIO) {\n\tint rc;\n\tif (audioIO->thread) return true;\n\trc = pthread_create(&audioIO->thread, NULL, audioIO->threadFunc, NULL);\n\tif (0 != rc) DBGERR(\"ioThreadStart(): %d\", rc);\n\treturn rc;\n}\n\nstatic int ioThreadIsRunning(audioIO_t *audioIO) {\n\treturn audioIO->running;\n}\n\nstatic void ioThreadStall(audioIO_t *audioIO) {\n\taudioIO->stall = true;\n\tsigSignal(&audioIO->sigRun);\n\tsigWait(&audioIO->sigStalled);\n}\n\n/* Don't attempt to signal Sq here as we may not have a semaphore! */\nstatic void ioThreadWaitToRun(audioIO_t *audioIO) {\n\tsigSignal(&audioIO->sigStalled);\n\t\n\tpthread_mutex_lock(audioIO->sigRun.mutex);\n\t\taudioIO->running = false;\n\t\t\n\t\tif (audioIO->stall) audioIO->sigRun.count = 0;\n\t\taudioIO->stall = false;\n\t\t\n\t\twhile( !audioIO->sigRun.count )\n\t\t\tpthread_cond_wait(audioIO->sigRun.cond, audioIO->sigRun.mutex);\n\t\taudioIO->sigRun.count -= 1;\n\t\n\t\taudioIO->running = true;\n\tpthread_mutex_unlock(audioIO->sigRun.mutex);\n\t\n\tsigReset(&audioIO->sigStalled);\t\t\n}\n\n/* ================================== Buffer ops */\n\nstatic void ioZeroBuffers(audioIO_t *audioIO) {\n\tint i;\n\tfor(i=0; i < audioIO->maxBuffers; i++) {\n\t\taudioIO->buffer[i].samples = 0;\n\t\taudioIO->buffer[i].isFree  = true;\n\t}\n}\n\nstatic void ioFreeBuffers(audioIO_t *audioIO) {\n\tint i;\n\tfor(i=0; i < audioIO->maxBuffers; i++) {\n\t\tfree(audioIO->buffer[i].buffer);\n\t\taudioIO->buffer[i].buffer  = 0;\n\t\taudioIO->buffer[i].samples = 0;\n\t}\n\taudioIO->bufferFree  = audioIO->bufferNext = 0;\n\t/* audioIO->bufferCount differs for play/record */\n}\n\n/* Only used for playing, not for recording */\nstatic int ioFreeBytes(audioIO_t *audioIO) {\n\tint freeBytes;\n\tpthread_mutex_lock(audioIO->bufferMutex);\n\t\tfreeBytes = audioIO->maxBytes * audioIO->bufferCount;\n\tpthread_mutex_unlock(audioIO->bufferMutex);\n\treturn freeBytes;\n}\n\nstatic int ioAllocBuffers(audioIO_t *audioIO, int frameCount) {\n\tint i;\n\t\n\t/* Not preserving buffers when play/record stopped */\n\t/* Choosing memory conservation over speed of starting play/record */\n\t\n\tioFreeBuffers(audioIO);\n\taudioIO->maxSamples = frameCount;\n\taudioIO->maxBytes   = audioIO->maxSamples * audioIO->bytesPerFrame;\n\taudioIO->maxWords   = audioIO->maxBytes >> 1;\n\tfor(i=0; i < audioIO->maxBuffers; i++) {\n\t\taudioIO->buffer[i].buffer = (short *)calloc(audioIO->maxBytes, 1);\n\t\taudioIO->buffer[i].isFree = true;\n\t}\n\taudioIO->buffersAllocated = true;\n}\n\nstatic int ioIsFull(audioIO_t *audioIO) {\n\tpthread_mutex_lock(audioIO->bufferMutex);\n\t\taudioIO->bufferFull = (0 < audioIO->buffer[audioIO->bufferFree].samples);\n\tpthread_mutex_unlock(audioIO->bufferMutex);\n\treturn audioIO->bufferFull;\n}\n\n/* Could combine some of the following but makes debugging difficult */\n\nstatic int ioAddPlayBuffer(void *buffer, int frameCount) {\n\tlong bytes;\n\tif (ioIsFull(&audioOut)) return 0;\n\tpthread_mutex_lock(audioOut.bufferMutex);\n\t\tbytes = MIN(audioOut.maxBytes, frameCount * audioOut.bytesPerFrame);\n\t\tmemcpy(audioOut.buffer[audioOut.bufferFree].buffer, buffer, bytes);\n\t\taudioOut.buffer[audioOut.bufferFree].samples = frameCount;\n\t\taudioOut.buffer[audioOut.bufferFree].isFree  = false;\n\t\taudioOut.bufferFree = (audioOut.bufferFree + 1) % audioOut.maxBuffers;\n\t\taudioOut.bufferCount -= 1;\n\tpthread_mutex_unlock(audioOut.bufferMutex);\n\treturn bytes;\n}\n\nstatic int ioGetRecordBuffer(void *buffer, int bufferBytes) {\n\tlong samples, sampleBytes;\n\t\n\tif (bufferBytes <= 0) return 0;\n/*\tif (audioIn.buffer[audioIO->bufferNext].samples <=0) return 0;\n*/\t\n\tif (audioIn.buffer[audioIn.bufferNext].isFree) return 0;\n\t\n\tpthread_mutex_lock(audioIn.bufferMutex);\n\t\tsamples = audioIn.buffer[audioIn.bufferNext].samples;\n\t\tsampleBytes = MIN(2 * audioIn.pa_spec.channels * samples, bufferBytes);\n\t\tmemcpy(buffer, (char *)audioIn.buffer[audioIn.bufferNext].buffer, sampleBytes);\n\t/* DMOC 090909 1800: Hmmmm, what if Squeak does not read whole buffer? ATM remaining buffer data lost since */\n\t/*   ioGetRecordBuffer() frees the buffer after single visit. Needs more work */\n\t\taudioIn.buffer[audioIn.bufferNext].samples = 0;\n\t\taudioIn.buffer[audioIn.bufferNext].isFree = true;\n\t\taudioIn.bufferNext = (audioIn.bufferNext + 1) % audioIn.maxBuffers;\n\t\taudioIn.bufferCount -= 1;\n\tpthread_mutex_unlock(audioIn.bufferMutex);\n\treturn sampleBytes;\n}\n\nstatic int ioGetBufferData(audioIO_t *audioIO, void **buffer, int *frames) {\n\tif (audioIO->buffer[audioIO->bufferNext].isFree) return false;\n\tpthread_mutex_lock(audioIO->bufferMutex);\n\t\t*buffer = (void *)(audioIO->buffer[audioIO->bufferNext].buffer);\n\t\t*frames = audioIO->buffer[audioIO->bufferNext].samples;\n\tpthread_mutex_unlock(audioIO->bufferMutex);\n\treturn true;\n}\n\nstatic int ioNextPlayBuffer() {\n\tpthread_mutex_lock(audioOut.bufferMutex);\n\t\taudioOut.buffer[audioOut.bufferNext].samples = 0;\n\t\taudioOut.buffer[audioOut.bufferNext].isFree  = true;\n\t\taudioOut.bufferNext = (audioOut.bufferNext + 1) % audioOut.maxBuffers;\n\t\taudioOut.stall = (audioOut.bufferNext == audioOut.bufferFree);\n\t\taudioOut.bufferCount += 1;\n\tpthread_mutex_unlock(audioOut.bufferMutex);\n}\n\nstatic int ioNextRecordBuffer() {\n\tpthread_mutex_lock(audioIn.bufferMutex);\n\t\taudioIn.buffer[audioIn.bufferNext].isFree  = false;\n\t\taudioIn.bufferFree = (audioIn.bufferNext + 1) % audioIn.maxBuffers;\n\t\taudioIn.stall = (audioIn.bufferNext == audioIn.bufferFree);\n\t\taudioIn.bufferCount += 1;\n\tpthread_mutex_unlock(audioIn.bufferMutex);\n}\n\n/* ================================== IO THREADS */\n\nstatic void *writerThread(void *ptr) {\n\tstruct timespec tm = {0, 1000 * 1000};\n\tint rc;\n\tint nextBuffer, frames;\n\tvoid *buffer;\n\t\n\tDBGMSG(\"[writerThread: started]\");\n\t\n\taudioOut.exit = 0;\n\n\tfor (;;) {\n\t\tDBGMSG(\"[writerThread: waiting]\");\n\t\t\n\t\t/* No point signalling squeak *before* running as there may not be a semaphore */\n\t\tioThreadWaitToRun(&audioOut);\n\n\t\tif (audioOut.exit) break;\n\t\tif (!audioOut.open || audioOut.stall) continue;\n\t\t\n\t\tDBGMSG(\"[writerThread: running]\");\n\t\t\n\t\tfor (;;) {\n\t\t\tif (!audioOut.open || audioOut.stall || audioOut.exit) break;\n\n\t\t\tif (!ioGetBufferData(&audioOut, &buffer, &frames)) {\n\t\t\t\tsignalSqueak(&audioOut);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n/*printf(\"writerThread: buffer: %d, frames %d\\n\", audioOut.bufferNext, frames);\n*/\n\t\t\t\n\t\t\twhile (frames > 0) {\n\t\t\t\tif (!audioOut.open || audioOut.stall || audioOut.exit) break;\n/*\t\t\t\tif ((rc = snd_pcm_writei(audioOut.alsaHandle, buffer, frames)) < frames) {\n*/\n        \n        /* PA: Have to assume for now that all frames were written */\n        if (pa_simple_write(audioOut.pa_conn, buffer, (size_t) (frames * audioOut.bytesPerFrame), &rc) < 0) {\n          fprintf(stderr, __FILE__\": pa_simple_write() failed: %s\\n\", pa_strerror(rc));\n/*\t\t\t\t\tprintf(\"writerThread: sent %d, actual %d\\n\", frames, rc);\n*/\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n        /* PA: Have to assume for now that all frames were written */\n/*\t\t\t\tbuffer = (short *)((char *)buffer + rc * audioOut.bytesPerFrame);\n\t\t\t\tframes -= rc;\n*/\n\t\t\t\t/* *** SO FOLLOWING CODE *AND* THE ENCLOSING WHILE-LOOP REDUNDANT!!! (so just break out of loop) *** */\n/*\t\t\t\tbuffer = (short *)((char *)buffer + frames * audioOut.bytesPerFrame);\n\t\t\t\tframes -= frames;\n*/\n\t\t\t\tbreak;\n\t\t\t} /* while */\n\t\t\t\n\t\t\tif (!audioOut.open || audioOut.stall || audioOut.exit) break;\n\t\t\tioNextPlayBuffer();\t\n\t\t\tif (!audioOut.open || audioOut.stall || audioOut.exit) break;\n\t\t\t\n\t\t\tsignalSqueak(&audioOut);\n\t\t}\n\t\t\n\t\tif (audioOut.exit) break;\n\t}\n\n\tDBGMSG(\"[writerThread: stopped]\");\n\n}\n\n\nstatic void *readerThread(void *ptr) {\n\tint rc;\n\tint wc;\n\tunsigned short *p;\n\n\tDBGMSG(\"[readerThread: started]\");\n\t\n\taudioIn.exit = 0;\n\t\n\tfor (;;) {\n\t\tDBGMSG(\"[readerThread: waiting]\");\n\t\t\n\t\tioThreadWaitToRun(&audioIn);\n\t\t\n\t\tif (audioIn.exit) break;\n\t\tif (!audioIn.open || audioIn.stall) continue;\n\n\t\tDBGMSG(\"[readerThread: running]\");\n\t\t\n\t\tfor (;;) {\n\t\t\tif (!audioIn.open || audioIn.stall || audioIn.exit) break;\n\t\t\t\n\t\t\t/* NB: PA Simple API does not return number of bytes/samples recorded */\n\t\t\t/*   (so have to assume full buffer everytime (poss padded if less than requested) */\n\t\t\t\n/*\t\t\trc = snd_pcm_readi(audioIn.alsaHandle, audioIn.alsaBuffer, audioIn.alsaFrames);\n*/\t\t\t\n\t\t\tif (pa_simple_read(audioIn.pa_conn, (char *)(audioIn.buffer[audioIn.bufferFree].buffer), audioIn.maxBytes, &rc) < 0) {\n\t\t\t\tfprintf(stderr, __FILE__\": pa_simple_read() failed: %s\\n\", pa_strerror(rc));\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (!audioIn.open || audioIn.stall || audioIn.exit) break;\n\t\t\t\n\t\t\t/* PA: Assume max buffer frames returned... */\n\t\t\trc = audioIn.maxSamples;\n\t\t\t\n\t\t\t/* EPIPE means overrun */\n/*\t\t\t\n\t\t\tif (rc == -EPIPE) {\n\t\t\t\tprintf(\"readerThread: overrun occurred\\n\");\n\t\t\t\tsnd_pcm_prepare(audioIn.alsaHandle);\n\t\t\t\tcontinue;\n\t\t\t} \n\t\t\t\n\t\t\tif (rc < 0) {\n\t\t\t\tprintf(\"readerThread: error from read: %s\\n\", snd_strerror(rc));\n\t\t\t\tcontinue;\n\t\t\t} \n\t\t\t\n\t\t\tif (rc != (int)audioIn.alsaFrames) {\n\t\t\t\tprintf(\"readerThread: short read, read %d frames\\n\", rc);\n\t\t\t\tcontinue;\n\t\t\t}\n*/\t\t\t\n\t\t\tif (!audioIn.buffer[audioIn.bufferFree].isFree) {\n\t\t\t\tprintf(\"readerThread: No free buffers!\\n\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tif (!audioIn.open || audioIn.stall || audioIn.exit) break;\n\n\t\t\t/* PA: Complete buffer should be returned so skipping check and moving guts to end of loop */\n/*\n\t\t\tif ((audioIn.buffer[audioIn.bufferFree].samples + rc) > audioIn.maxSamples) {\n\t\t\t\tioNextRecordBuffer();\n\t\t\t\tif (!audioIn.open || audioIn.stall || audioIn.exit) break;\n\t\t\t\tsignalSqueak(&audioIn);\n\t\t\t}\n*/\n\n/* Next won't get called anyway because of \"stall\" in ioNextRecordBuffer() */\n/* Left here in case needed for debugging */\n/*\n\t\t\tif (!audioIn.buffer[audioIn.bufferFree].isFree) {\n\t\t\t\tprintf(\"readerThread: No free buffers!\\n\");\n\t\t\t\tcontinue;\n\t\t\t}\n*/\n\t\t\t\t\n\t\t\t/* PA: Endian swap may not be needed... */\n\n\t\t\t/* Endian Swap (rc = frames = Word Count in this case) */\n/*\t\t\t\n\t\t\tp = (unsigned short *)(audioIn.buffer[audioIn.bufferFree].buffer);\n\t\t\twc = rc;\n\t\t\twhile (wc--)\n\t\t\t\t*p = _swapw(*p);\n*/\n\t\n\t\t\t/* PA: No copy required since record buffer used directly... */\n/*\t\n\t\t\tmemcpy((char *)(audioIn.buffer[audioIn.bufferFree].buffer) + 2 * audioIn.buffer[audioIn.bufferFree].samples, audioIn.alsaBuffer, rc*2);\n\t\t\taudioIn.buffer[audioIn.bufferFree].samples += rc;\n*/\n\t\t\t\n\t\t\t/* PA: No indication of actual bytes/samples read so assuming full buffer read (or padded)... */\n\t\t\taudioIn.buffer[audioIn.bufferFree].samples = audioIn.maxSamples;\n\t\t\t\n\t\t\tif (!audioIn.open || audioIn.stall || audioIn.exit) break;\n\t\t\n\t\t\t/* PA: These three lines moved from above (since assuming full buffers are read every time) */\n\t\t\tioNextRecordBuffer();\n\t\t\tif (!audioIn.open || audioIn.stall || audioIn.exit) break;\n\t\t\tsignalSqueak(&audioIn);\n\t\t\t\n\t\t}\n\t\tif (audioIn.exit) break;\n\t}\nDBGMSG(\"[readerThread: stopped]\");\n}\n\n\n/* ================================== IO INIT */\n\nstatic int ioInit() {\n\tif (initDone) return true;\n\tinitDone = true; \n\t\n\t/* AUDIO OUT */\n\t\n/* NOT USED >>> */\n\taudioOut.dbgName = \"play\";\n\taudioOut.device = \"pa-simple\"; \n/* <<< */\n\n\taudioOut.open = false;\n\t\n\taudioOut.maxSamples\t= 0;\n\taudioOut.maxWords\t\t= 0;\n\taudioOut.maxBytes\t\t= 0;\n\t\n\taudioOut.maxBuffers\t\t= MAX_OUTPUT_BUFFERS;\n\taudioOut.buffer\t\t\t\t= oBuffer;\n\taudioOut.bufferFree\t\t= 0;\n\taudioOut.bufferNext\t\t= 0;\n\taudioOut.bufferCount\t= audioOut.maxBuffers;\n\taudioOut.bufferFull\t\t= 0;\n\taudioOut.bufferMutex\t= &audioOutBufferMutex;\n\taudioOut.buffersAllocated = false;\n\t\n\taudioOut.threadFunc = writerThread;\n\taudioOut.thread\t\t\t= 0;\n\n\taudioOut.sigRun.mutex\t= &audioOutRunMutex;\n\taudioOut.sigRun.cond\t= &audioOutRunCond;\n\tsigReset(&audioOut.sigRun);\n\t\n\taudioOut.sigStalled.mutex = &audioOutStalledMutex;\n\taudioOut.sigStalled.cond  = &audioOutStalledCond;\n\tsigReset(&audioOut.sigStalled);\n\t\n\taudioOut.running\t= 0;\n\taudioOut.exit\t\t\t= 0;\n\taudioOut.stall\t\t= 0;\n\t\n\taudioOut.sqSemaphore = 0;\n\t\n\taudioOut.rateID = 0;\n\taudioOut.bytesPerFrame = 4; /* Stereo S16LE */\n\n\taudioOut.pa_conn = null;\n\t\n\tioThreadStart(&audioOut);\n\t\n\t/* AUDIO IN */\n\t\n\taudioIn.dbgName = \"rec\";\n\t\n/* NOT USED >>> */\n\taudioIn.device = \"pa-simple\"; \n/* <<< */\n\t\n\taudioIn.open = false;\n\t\n\taudioIn.maxSamples\t= 0;\n\taudioIn.maxWords\t\t= 0;\n\taudioIn.maxBytes\t\t= 0;\n\t\n\taudioIn.maxBuffers\t= MAX_INPUT_BUFFERS;\n\taudioIn.buffer\t\t\t= iBuffer;\n\taudioIn.bufferFree\t= 0;\n\taudioIn.bufferNext\t= 0;\n\taudioIn.bufferCount\t= 0; /* No buffers yet. Was audioIn.maxBuffers; */\n\taudioIn.bufferFull\t= 0;\n\taudioIn.bufferMutex\t= &audioInBufferMutex;\n\taudioIn.buffersAllocated = false;\n\t\n\taudioIn.threadFunc= readerThread;\n\taudioIn.thread\t\t= 0;\n\t\n\taudioIn.sigRun.mutex\t\t \t= &audioInRunMutex;\n\taudioIn.sigRun.cond\t\t \t\t= &audioInRunCond;\n\tsigReset(&audioIn.sigRun);\n\t\n\taudioIn.sigStalled.mutex\t= &audioInStalledMutex;\n\taudioIn.sigStalled.cond\t\t= &audioInStalledCond;\n\tsigReset(&audioIn.sigStalled);\n\t\n\taudioIn.running\t= 0;\n\taudioIn.exit\t\t= 0;\n\taudioIn.stall\t\t= 0;\n\t\n\taudioIn.sqSemaphore\t= 0;\n\t\n\taudioIn.rateID = 0;\n\taudioIn.bytesPerFrame = 2; /* Mono S16LE */\n\t\n\taudioIn.pa_conn = null;\n\t\n\tioThreadStart(&audioIn);\n}\n\n/* ============================================ */\n/* ================================== VM PLUGIN */\n/* ============================================ */\n\nstatic int trace() {\n}\n\n/* ================================== AUDIO OUT */\n\nstatic sqInt sound_AvailableSpace(void) {\n\treturn ioFreeBytes(&audioOut);\n}\n\nstatic sqInt sound_InsertSamplesFromLeadTime(int frameCount, int srcBufPtr, int samplesOfLeadTime) {\nDBGMSG(\">sound_InsertSamplesFromLeadTime()\");\n\treturn 0; /* or maxBytes? */\n}\n\n\nstatic sqInt sound_PlaySamplesFromAtLength(int frameCount, int arrayIndex, int startIndex) {\n\tunsigned int bufferNext, samples, sampleBytes;\n\n\tif (0 >= frameCount) return 0;\n\t\n\tsamples = MIN(audioOut.maxSamples, frameCount);\n\t\n\tif (0 == (sampleBytes = ioAddPlayBuffer((void *)(arrayIndex + startIndex * 2 * audioOut.pa_spec.channels), samples)))\n\t\tDBGMSG(\"sound_PlaySamplesFromAtLength(): No free buffers!\");\n\t\n\tsigSignal(&audioOut.sigRun);\n\t\n\treturn samples;\n}\n\nstatic sqInt sound_PlaySilence(void) {\nDBGMSG(\">sound_PlaySilence()\");\n\tioThreadStall(&audioOut);\n\treturn 0; /* or maxBytes? */\n}\n\n\nstatic sqInt sound_Start(int frameCount, int samplesPerSec, int stereo, int semaIndex) {\n\tint rc;\n\t\nDBGMSG(\">sound_Start()\");\n\n#ifdef DBG\nprintf(\"\\tframeCount: %d, samplesPerSec: %d, stereo: %d, semaIndex: %d\\n\", frameCount, samplesPerSec, stereo, semaIndex);\n#endif\n\n\tif (audioOut.open) return true;\n\t\n  audioOut.pa_spec.format = PA_SAMPLE_S16LE;\n  audioOut.pa_spec.rate = samplesPerSec; /* rate(SAMPLE_RATE_22_05KHZ) for Squeak */\n  audioOut.pa_spec.channels = stereo ? 2 : 1;\n  audioOut.pa_conn = NULL;\n\n\t/* Create a new playback stream */\n\tif (!(audioOut.pa_conn = pa_simple_new(NULL, \"Scratch\", PA_STREAM_PLAYBACK, NULL, \"playback\", &audioOut.pa_spec, NULL, NULL, &rc))) {\n\t\t\tfprintf(stderr, __FILE__\": pa_simple_new() failed: %s\\n\", pa_strerror(rc));\n\t\t\tsuccess(false);\n\t\t\treturn false;\n\t}\n  \n\tioAllocBuffers(&audioOut, frameCount);\n\taudioOut.bufferCount = audioOut.maxBuffers; /* Has to be reset everytime */\n\t\n\taudioOut.sqSemaphore = semaIndex;\n\n\taudioOut.open = true;\n\t\n\tsigSignal(&audioOut.sigRun);\n\t\n\t/* error possibly left over from dsp-protocol.c code */\n\t/* dsp-protocol.c in current ALSA not capturing EINTR/EAGAIN */\n\t/* EINTR/EAGAIN from dsp-protocol.c not raised up to ALSA so not caught by ALSA */\n\t/* Clearing errno here to see if Squeak can continue regardless */\n\terrno = 0; \n\t\nDBGMSG(\"<sound_Start()\");\n\treturn true;\n}\n\n\nstatic sqInt sound_Stop(void) {\n\tint rc;\n\t\nDBGMSG(\">sound_Stop()\");\n\n\tif (!audioOut.open) return true;\n\taudioOut.open = false;\n\t\n\tif (NULL == audioOut.pa_conn) return true;\n\t\n\tioThreadStall(&audioOut);\n\n\tif (pa_simple_drain(audioOut.pa_conn, &rc) < 0) {\n\t\tfprintf(stderr, __FILE__\": pa_simple_drain() failed: %s\\n\", pa_strerror(rc));\n\t}\n\n  if (NULL != audioOut.pa_conn)\n     pa_simple_free(audioOut.pa_conn);\n\t\n\tioFreeBuffers(&audioOut);\n\n\taudioOut.pa_conn = NULL;\n\taudioOut.sqSemaphore = 0;\n\nDBGMSG(\"<sound_Stop()\");\n\treturn true;\n}\n\n\n\n/* ================================== AUDIO IN */\n\nstatic sqInt sound_StartRecording(int desiredSamplesPerSec, int stereo, int semaIndex) {\n\tint rc;\n\tpa_buffer_attr pa_buffer_metrics; /* For recording */\n\nDBGMSG(\">sound_StartRecording()\");\n\n\tif (audioIn.open) return true;\n\t\n\taudioIn.pa_spec.format = PA_SAMPLE_S16LE;\n\taudioIn.pa_spec.rate = desiredSamplesPerSec;\n\taudioIn.pa_spec.channels = stereo ? 2 : 1;\n\taudioIn.pa_conn = NULL;\n    \n\tpa_buffer_metrics.maxlength\t= (uint32_t) -1;\n\tpa_buffer_metrics.tlength\t= (uint32_t) -1; /* playback only */\n\tpa_buffer_metrics.prebuf\t= (uint32_t) -1; /* playback only */ \n\tpa_buffer_metrics.minreq\t= (uint32_t) -1; /* playback only */\n\tpa_buffer_metrics.fragsize\t= pa_usec_to_bytes(20*1000, &audioIn.pa_spec); \n\n\t/* Create the recording stream */\n\tif (!(audioIn.pa_conn = pa_simple_new(\tNULL, \n\t\t\t\t\t\t\t\t\t\t\t\"Scratch\", \n\t\t\t\t\t\t\t\t\t\t\tPA_STREAM_RECORD, \n\t\t\t\t\t\t\t\t\t\t\tNULL, \n\t\t\t\t\t\t\t\t\t\t\t\"record\", \n\t\t\t\t\t\t\t\t\t\t\t&audioIn.pa_spec, \n\t\t\t\t\t\t\t\t\t\t\tNULL, \n\t\t\t\t\t\t\t\t\t\t\t&pa_buffer_metrics, \n\t\t\t\t\t\t\t\t\t\t\t&rc)))\n\t{\n\t\t\tfprintf(stderr, __FILE__\": pa_simple_new() failed: %s\\n\", pa_strerror(rc));\n\t\t\tsuccess(false);\n\t\t\treturn false;\n\t}\n\n  /* Only rate supported on the N810 (atm) is 8000 */\n/*  \n  audioIn.alsaRate = 8000; \n*/\n  \n  /* 20Hz update freq for Squeak sounds reasonable, so... */\n  audioIn.maxSamples = audioIn.pa_spec.rate / 20;\n\t\n  /* Use a buffer large enough to hold one period (assuming 2 bytes/sample) */\n/*  \n  audioIn.alsaBufferSize = audioIn.maxSamples * 2 * audioIn.pa_spec.channels; \n  audioIn.alsaBuffer = (char *) malloc(audioIn.alsaBufferSize);\n*/\n\n\t/* Buffers will be filled before signalling Squeak. So rate & buffer size determined signalling freq... */\n\tioAllocBuffers(&audioIn, audioIn.pa_spec.rate / 20 ); /* for Sq signalling rate of 20Hz */\n\taudioIn.bufferCount\t= 0; /* Has to be reset everytime */\n\n\taudioIn.sqSemaphore = semaIndex;\n\t\n\taudioIn.open = true;\n\t\n\tsigSignal(&audioIn.sigRun);\n\t\t\nDBGMSG(\"<sound_StartRecording()\");\n\treturn true;\n}\n\nstatic sqInt sound_StopRecording(void) {\nDBGMSG(\">sound_StopRecording()\");\n\n\tif (!audioIn.open) return;\n\taudioIn.open = false;\n\t\n\tif (NULL == audioIn.pa_conn) return;\n\t\n\tioThreadStall(&audioIn);\n\n  pa_simple_free(audioIn.pa_conn);\n  \n\tioFreeBuffers(&audioIn);\n\t\n\taudioIn.pa_conn = NULL;\n\t\n\taudioIn.sqSemaphore = 0;\n\nDBGMSG(\"<sound_StopRecording()\");\n\treturn true;\n}\n\nstatic double sound_GetRecordingSampleRate(void) {\n\treturn (double)audioIn.pa_spec.rate;\n}\n\nstatic sqInt sound_RecordSamplesIntoAtLength(int buf, int startSliceIndex, int bufferSizeInBytes) {\n\tunsigned int bufferNext, bufferBytes, sampleBytes;\n\n\tbufferBytes = MAX(0, bufferSizeInBytes - (startSliceIndex * 2));\n\tif (0 == bufferBytes) {\n\t\tprintf(\"***(%d) sound_RecordSamplesIntoAtLength(): No space in Squeak buffer!\\n\", startSliceIndex);\n\t\treturn 0;\n\t}\n\t\n\t/* DMOC 090909 1800: Hmmmm, what if Squeak does not read whole buffer? ATM remaining buffer data lost since */\n\t/*   ioGetRecordBuffer() frees the buffer after single visit. Needs more work */\n\t\n\tbufferNext = audioIn.bufferNext; /* preserved for debug output */\n\tsampleBytes = ioGetRecordBuffer((void *)(buf + (startSliceIndex * 2)), bufferBytes);\n/*\n\tif (0 < sampleBytes)\n\t\tprintf(\"   sound_RecordSamplesIntoAtLength(%d, %d, %d) %d, %d\\n\", buf, startSliceIndex, bufferSizeInBytes, bufferNext, sampleBytes);\n\telse\n\t\tprintf(\"***sound_RecordSamplesIntoAtLength(%d, %d, %d) %d, %d\\n\", buf, startSliceIndex, bufferSizeInBytes, bufferNext, sampleBytes);\n*/\t\n\treturn MAX(0, sampleBytes)/(2 * audioIn.pa_spec.channels);\n}\n\n\n/* ================================== sound mixer */\n\n/*\nstatic int     sound_nomixer  = 0;\nstatic snd_mixer_t  *mixer_handle = 0;\nstatic snd_mixer_elem_t *mixer_element  = 0;\n*/\n\nstatic int mixer_open(char *name) {\n  trace();\n  return -EACCES;\n}\n\nstatic void mixer_close(void) {\n  trace();\n}\n\nstatic inline void mixer_getVolume(char *name, int captureFlag, double *leftLevel, double *rightLevel) {\n  trace();\n}\n\nstatic inline void mixer_setVolume(char *name, int captureFlag, double leftLevel, double rightLevel) {\n  trace();\n}\n\nstatic int mixer_setSwitch(char *name, int captureFlag, int parameter) {\n  trace();\n  return 0;\n}\n\nstatic int mixer_getSwitch(char *name, int captureFlag, int channel) {\n  trace();\n  return -1;\n}\n\nstatic void sound_Volume(double *left, double *right) {\n  trace();\n  *left= 1.0;\n  *right= 1.0;\n}\n\nstatic void sound_SetVolume(double left, double right) {\n  trace();\n}\n\nstatic sqInt sound_SetRecordLevel(sqInt level) {\n  trace();\n  return 1;\n  return level;\n}\n\nstatic sqInt sound_SetDevice(sqInt id, char *arg) {\n  trace();\n  return -1;\n}\n\nstatic sqInt sound_GetSwitch(sqInt id, sqInt captureFlag, sqInt channel) {\n  trace();\n  return -1;\n}\n\nstatic sqInt sound_SetSwitch(sqInt id, sqInt captureFlag, sqInt parameter) {\n  trace();\n  return -1;\n}\n\n\n/* module */\n\n#include \"SqSound.h\"\n\nSqSoundDefine(PA);\n\n#include \"SqModule.h\"\n\nstatic void sound_parseEnvironment(void) {\n/*\n  char *ev= 0;\n\n  sound_SetDevice(0, NULL);\n  sound_SetDevice(1, NULL);\n  sound_SetDevice(2, NULL);\n\n  if (     getenv(\"SQUEAK_NOMIXER\"   )) sound_nomixer= 1;\n  if ((ev= getenv(\"SQUEAK_SOUNDCARD\"))) sound_SetDevice(0, ev);\n  if ((ev= getenv(\"SQUEAK_PLAYBACK\" ))) sound_SetDevice(1, ev);\n  if ((ev= getenv(\"SQUEAK_CAPTURE\"  ))) sound_SetDevice(2, ev);\n*/\n}\n\nstatic int sound_parseArgument(int argc, char **argv) {\n/*\n  if     (!strcmp(argv[0], \"-nomixer\"  )) { sound_nomixer= 1;   return 1; }\n  else if (argv[1])\n    {\n      if (!strcmp(argv[0], \"-soundcard\")) { sound_SetDevice(0, argv[1]);  return 2; }\n      if (!strcmp(argv[0], \"-playback\" )) { sound_SetDevice(1, argv[1]);  return 2; }\n      if (!strcmp(argv[0], \"-capture\"  )) { sound_SetDevice(2, argv[1]);  return 2; }\n    }\n*/\n  return 0;\n}\n\nstatic void  sound_printUsage(void) {\n  printf(\"\\nPulseAudio <option>s: <none>\\n\");\n/*\n  printf(\"  -nomixer              disable mixer (volume) adjustment\\n\");\n  printf(\"  -soundcard <name>     open the named sound card (default: %s)\\n\", sound_device);\n  printf(\"  -playback <name>      play to the named sound device (default: %s)\\n\", sound_playback);\n  printf(\"  -capture <name>       record from the named sound device (default: %s)\\n\", sound_capture);\n*/\n}\n\nstatic void  sound_printUsageNotes(void) {\n}\n\nstatic void *sound_makeInterface(void) {\n/*#ifdef NEWSIG\n//  sigalrm_save(); // DMOC: Being here assumes old handler same for run duration! Same for sigio handler.\n//#else\n// DMOC: Rethink: Signal captured once, preserved and restored when/where necessary?\n//  sigio_save();\n//#endif\n*/\n\t\n#ifdef USE_RESOURCE_MANAGER\nprintf(\"USE_RESOURCE_MANAGER\\n\");\n#endif\n\t\n\tioInit();\n\t\n  return &sound_PA_itf;\n}\n\nSqModuleDefine(sound, pulse);\n"
  },
  {
    "path": "vm/src/heap/abstract_mark_sweep_collector.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\n\nbool Abstract_Mark_Sweep_Collector::print_gc = true;\n\n\nAbstract_Mark_Sweep_Collector::Abstract_Mark_Sweep_Collector() {\n  mark_stack = NULL;\n  weakRootCount = 0;\n  weakRoot_accessor = NULL;\n}\n\n\nvoid Abstract_Mark_Sweep_Collector::gc() {\n  int rank_on_threads_or_zero_on_processes = Memory_Semantics::rank_on_threads_or_zero_on_processes();\n\n  if (Trace_Execution  &&  The_Squeak_Interpreter()->execution_tracer() != NULL)\n    The_Squeak_Interpreter()->execution_tracer()->record_gc();\n  if (Trace_GC_For_Debugging  &&  The_Squeak_Interpreter()->debugging_tracer() != NULL)\n    The_Squeak_Interpreter()->debugging_tracer()->record_gc();\n\n  Safepoint_for_moving_objects sf(\"gc\");\n  Safepoint_Ability sa(false);\n  \n  // Relies on implicit init to false below:\n  static bool recursing[Memory_Semantics::max_num_threads_on_threads_or_1_on_processes]; // threadsafe, GC are started concurrently on multiple cores as far as I can see, Stefan 2009-09-05\n\n  if (recursing[rank_on_threads_or_zero_on_processes] == true) fatal(\"recursing in fullGC\");\n  recursing[rank_on_threads_or_zero_on_processes] = true;\n\n  assert(The_Squeak_Interpreter()->safepoint_tracker->have_acquired_safepoint());\n  flushFreeContextsMessage_class().send_to_all_cores();\n  prepare(true);\n  do_it();\n  finish();\n\n  recursing[rank_on_threads_or_zero_on_processes] = false;\n}\n\nvoid Abstract_Mark_Sweep_Collector::mark_only_for_debugging() {\n  prepare(false);\n  mark();\n}\n\n\nvoid Abstract_Mark_Sweep_Collector::prepare(bool verify) {\n  if (print_gc)\n    dittoing_stdout_printer->printf(\"starting gc on %d\\n\", Logical_Core::my_rank());\n\n  mark_stack = new GC_Oop_Stack();\n  The_Memory_System()->verify_if(check_many_assertions && verify);\n  The_Squeak_Interpreter()->preGCAction_everywhere(true);\n}\n\n\nvoid Abstract_Mark_Sweep_Collector::do_it() {\n  if (print_gc)\n    lprintf(\"finished preparing; about to mark\\n\");\n  mark();\n  if (check_assertions)\n    The_Memory_System()->object_table->verify_after_mark();\n  if (print_gc)\n    lprintf(\"finished marking, starting sweeping\\n\");\n  finalize_weak_arrays();\n  sweep_unmark_and_compact_or_free(this);\n}\n\n\nvoid Abstract_Mark_Sweep_Collector::finalize_weak_arrays() {\n  for (u_int32 i = 0;  i < weakRootCount; ++i)\n    finalizeReference(weakRoots[i].as_object());\n  weakRootCount = 0;\n}\n\n\n\nvoid Abstract_Mark_Sweep_Collector::finish() {\n  The_Squeak_Interpreter()->postGCAction_everywhere(true);\n\n  The_Memory_System()->verify_if(check_many_assertions);\n\n  if (print_gc)\n    dittoing_stdout_printer->printf(\"finishing gc\\n\");\n}\n\n\n\nclass Mark_Closure: public Oop_Closure {\n  Abstract_Mark_Sweep_Collector* gc;\npublic:\n  Mark_Closure(Abstract_Mark_Sweep_Collector* x) : Oop_Closure() {gc = x;}\n  void value(Oop* p, Object_p) { gc->mark(p); }\n  virtual const char* class_name(char*) { return \"Mark_Closure\"; }\n};\n\n\nvoid Abstract_Mark_Sweep_Collector::mark() {\n  The_Memory_System()->enforce_coherence_before_this_core_stores_into_all_heaps();\n  Mark_Closure mc(this);\n  The_Interactions.do_all_roots_here(&mc);\n\n  while (!mark_stack->is_empty())\n    mark_an_object(mark_stack->pop());\n\n  The_Memory_System()->enforce_coherence_after_this_core_has_stored_into_all_heaps();\n\n  if (!mark_stack->is_empty()) fatal(\"\");\n  delete mark_stack;\n  mark_stack = NULL;\n\n}\n\n\n\nvoid Abstract_Mark_Sweep_Collector::sweep_unmark_and_compact_or_free(Abstract_Mark_Sweep_Collector* gc_or_null) {\n  unmark_maybe_compact_set_translation_buffer_if_no_OT(gc_or_null);\n}\n\nvoid Abstract_Mark_Sweep_Collector::unmark_maybe_compact_set_translation_buffer_if_no_OT(Abstract_Mark_Sweep_Collector* gc_or_null) {\n  The_Memory_System()->scan_compact_or_make_free_objects_everywhere(true, gc_or_null);\n}\n\n\nbool Abstract_Mark_Sweep_Collector::add_weakRoot(Oop x) {\n  if (weakRoot_accessor == NULL)  weakRoot_accessor = Logical_Core::my_core();\n  else if (weakRoot_accessor != Logical_Core::my_core()) fatal(\"must be accessed from same core\");\n\n  if (weakRootCount >= sizeof(weakRoots) / sizeof(weakRoots[0]))\n    return false;\n\n  weakRoots[weakRootCount++] = x;\n  return true;\n}\n\n\n\n\n\n/*\n xxxxxx_weak\n\n finalizeReference: oop\n \"During sweep phase we have encountered a weak reference.\n Check if  its object has gone away (or is about to) and if so, signal a\n semaphore. \"\n \"Do *not* inline this in sweepPhase - it is quite an unlikely\n case to run into a weak reference\"\n | weakOop oopGone chunk firstField lastField |\n self inline: false.\n firstField := BaseHeaderSize + ((self nonWeakFieldsOf: oop) << ShiftForWord).\n lastField := self lastPointerOf: oop.\n firstField to: lastField by: BytesPerWord do: [:i |\n weakOop := self longAt: oop + i.\n \"ar 1/18/2005: Added oop < youngStart test to make sure we're not testing\n objects in non-GCable region. This could lead to a forward reference in\n old space with the oop pointed to not being marked and thus treated as free.\"\n (weakOop == nilObj or: [(self isIntegerObject: weakOop) or:[weakOop < youngStart]])\n\n ifFalse: [\"Check if the object is being collected.\n If the weak reference points\n * backward: check if the weakOops chunk is free\n * forward: check if the weakOoop has been marked by GC\"\n weakOop < oop\n ifTrue: [\n chunk := self chunkFromOop: weakOop.\n oopGone := ((self longAt: chunk) bitAnd: TypeMask) = HeaderTypeFree]\n ifFalse: [oopGone := ((self baseHeader: weakOop) bitAnd: MarkBit) = 0].\n oopGone ifTrue: [\"Store nil in the pointer and signal the  interpreter \"\n self longAt: oop + i put: nilObj.\n self signalFinalization: oop]]]\n\n\n */\n\nvoid Abstract_Mark_Sweep_Collector::finalizeReference(Object_p weak_obj) {\n  int nonWeakCnt = weak_obj->nonWeakFieldsOf();\n  FOR_EACH_WEAK_OOP_IN_OBJECT(weak_obj, oop_ptr) {\n    Oop x = *oop_ptr;\n    if (    x.is_mem()\n        &&  x != The_Squeak_Interpreter()->roots.nilObj\n        &&  has_been_or_will_be_freed_by_this_ongoing_gc(x)) {\n      *oop_ptr = The_Squeak_Interpreter()->roots.nilObj; // no store checks, no coherence operations, in the midst of GC\n      if (nonWeakCnt >= 2) weak_obj->weakFinalizerCheckOf();\n      The_Squeak_Interpreter()->signalFinalization(x);\n    }\n  }\n}\n\n\nbool Abstract_Mark_Sweep_Collector::has_been_or_will_be_freed_by_this_ongoing_gc(Oop x) {\n  return x.is_mem()\n     &&  x != The_Squeak_Interpreter()->roots.nilObj\n     &&  ( The_Memory_System()->object_table->is_OTE_free(x) ||  !x.as_object()->is_marked());\n}\n\n"
  },
  {
    "path": "vm/src/heap/abstract_mark_sweep_collector.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Abstract_Mark_Sweep_Collector {\npublic:\n  static bool print_gc; // threadsafe: set-once config flag\n\n  Abstract_Mark_Sweep_Collector();\n\n  void gc();\n\n  void mark_only_for_debugging();\n\n\nprotected:\n  virtual void prepare(bool);\n  virtual void do_it();\n  virtual void finish();\n\n  void mark();\n  GC_Oop_Stack* mark_stack;\n\n  u_int32   weakRootCount;\n  Oop       weakRoots[10000];\n  Logical_Core* weakRoot_accessor;\n public:\n  bool add_weakRoot(Oop);\n\n public:\n\n  void mark(Oop* p) {\n    if (!p->is_mem()) return;\n    Object* o = p->as_untracked_object_ptr();\n    if (o->isFreeObject())\n      fatal();\n    if (o->is_marked())\n      return;\n    mark_stack->push(o);\n    o->mark_without_store_barrier();\n  }\n\n  void mark_an_object(Object* o) {\n    // was o->do_all_oops_of_object(&mark_closure);\n    o->do_all_oops_of_object_for_marking(this);\n  }\n protected:\n  void sweep_unmark_and_compact_or_free(Abstract_Mark_Sweep_Collector*);\n  void unmark_maybe_compact_set_translation_buffer_if_no_OT(Abstract_Mark_Sweep_Collector*);\n\n\n public:\n  void finalizeReference(Object_p);\n protected:\n  bool has_been_or_will_be_freed_by_this_ongoing_gc(Oop x);\n  void finalize_weak_arrays();\n };\n\n"
  },
  {
    "path": "vm/src/heap/abstract_object_heap.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\n\n\nvoid Abstract_Object_Heap::initialize() {\n  int size_in_oops = heap_byte_size() / sizeof(Oop);\n  int size_in_bytes = size_in_oops * sizeof(Oop);\n  initialize(allocate_my_space(size_in_bytes), size_in_bytes);\n }\n\nvoid Abstract_Object_Heap::initialize(void* mem, int size) {\n  _start = _next = (Oop*)mem;\n  _end = _next + size/sizeof(Oop);\n  zap_unused_portion();\n  lowSpaceThreshold = 1000;\n}\n\n\n// ObjectMemory object enumeration\n\nObject* Abstract_Object_Heap::firstAccessibleObject() {\n  FOR_EACH_OBJECT_IN_HEAP(this, obj)\n    if (!obj->isFreeObject())  return obj;\n  return NULL;\n}\n\n\nOop Abstract_Object_Heap::initialInstanceOf(Oop classPointer) {\n  // \"Support for instance enumeration. Return the first instance of the given class, or nilObj if it has no instances.\"\n  FOR_EACH_OBJECT_IN_HEAP(this, obj)\n    if (!obj->isFreeObject()  &&  obj->fetchClass() == classPointer )\n      return obj->as_oop();\n  return The_Squeak_Interpreter()->roots.nilObj;\n}\n\n\nObject* Abstract_Object_Heap::first_object_or_null() {\n  if (_start == _next)\n    return NULL;\n  return object_from_chunk((Chunk*)startOfMemory());\n}\n\nObject* Abstract_Object_Heap::first_object_without_preheader() {\n  if (_start == _next)\n    return NULL;\n  return object_from_chunk_without_preheader((Chunk*)startOfMemory());\n}\n\n\nbool Abstract_Object_Heap::verify() {\n  if (!is_initialized()) return true;\n\n  bool ok = true;\n  Object *prev_obj = NULL;\n  __attribute__((unused)) Object *prev_prev_obj = NULL; // debugging\n  FOR_EACH_OBJECT_IN_HEAP(this, obj) {\n    if (obj->is_marked()) {\n      lprintf(\"object 0x%x should not be marked but is; header is 0x%x, in heaps[%d][%d]\\n\",\n      obj, obj->baseHeader, obj->rank(), obj->mutability());\n      fatal(\"\");\n    }\n    if (!obj->isFreeObject() &&  obj->is_current_copy())\n      ok = obj->verify() && ok;\n    \n    if (!ok) dittoing_stdout_printer->printf(\"Failed to verify obj at %p\\n\", obj);\n    \n    prev_prev_obj = prev_obj;\n    prev_obj = obj;\n  }\n  dittoing_stdout_printer->printf(\"Object_Heap %sverified\\n\", ok ? \"\" : \"NOT \");\n  return ok;\n}\n\nvoid Abstract_Object_Heap::check_multiple_stores_for_generations_only( Oop dsts[], oop_int_t n) {\n  return; // unused\n  for (oop_int_t i = 0;  i < n;  ++i)\n    check_store( &dsts[i] );\n}\n\nvoid Abstract_Object_Heap::multistore( Oop* dst, Oop* end, Oop src) {\n  multistore(dst, src, end - dst);\n}\nvoid Abstract_Object_Heap::multistore( Oop* dst, Oop src, oop_int_t n) {\n  assert(The_Memory_System()->contains(dst));\n  oopset_no_store_check(dst, src, n /* never read-mostly */);\n  check_multiple_stores_for_generations_only(dst, n);\n}\nvoid Abstract_Object_Heap::multistore( Oop* dst, Oop* src, oop_int_t n) {\n  assert(The_Memory_System()->contains(dst));\n\n  The_Memory_System()->enforce_coherence_before_store(dst, n << ShiftForWord /* never read-mostly */);\n  DEBUG_MULTIMOVE_CHECK(dst, src, n);\n  memmove(dst, src, n * bytes_per_oop);\n  The_Memory_System()->enforce_coherence_after_store(dst, n << ShiftForWord);\n  check_multiple_stores_for_generations_only(dst, n);\n}\n\n\n\n// verify does it anyway\nvoid Abstract_Object_Heap::ensure_all_unmarked() {\n  FOR_EACH_OBJECT_IN_HEAP(this, obj)\n    assert_always(!obj->is_marked());\n}\n\n\nvoid Abstract_Object_Heap::do_all_oops(Oop_Closure* oc) {\n  FOR_EACH_OBJECT_IN_HEAP(this, obj)\n    obj->do_all_oops_of_object(oc);\n}\n\nvoid Abstract_Object_Heap::scan_compact_or_make_free_objects(bool compacting, Abstract_Mark_Sweep_Collector* gc_or_null) {\n  bool for_gc = gc_or_null != NULL;\n  // enforce mutability at higher level\n  if (for_gc || compacting)\n    The_Memory_System()->object_table->pre_store_whole_enchillada();\n\n  if (compacting) ++compactionsSinceLastQuery;\n\n  Chunk* dst_chunk = (Chunk*)startOfMemory();\n  for (__attribute__((unused))\n       Chunk *src_chunk = dst_chunk,\n        *next_src_chunk = NULL,\n        *prev_src_chunk = NULL; // prev is only for debugging\n       src_chunk  <  (Chunk*)end_objects();\n       prev_src_chunk = src_chunk,  src_chunk = next_src_chunk) {\n\n\n    Object* obj = src_chunk->object_from_chunk();\n    next_src_chunk = obj->nextChunk();\n\n    if (obj->isFreeObject())\n      continue;\n\n    Oop oop = obj->as_oop();\n\n    if (for_gc) {\n      if (!obj->is_marked()) {\n        The_Memory_System()->object_table->free_oop(oop  COMMA_FALSE_OR_NOTHING);\n        if (!compacting)\n          src_chunk->make_free_object((char*)next_src_chunk - (char*)src_chunk, 0);\n        continue;\n      }\n      obj->unmark_without_store_barrier();\n    }\n    if (!compacting)\n      continue;\n\n    Object_p new_obj_addr = (Object_p)(Object*)((char*)dst_chunk + ((char*)obj - (char*)src_chunk));\n\n    if (src_chunk == dst_chunk)\n      dst_chunk = next_src_chunk;\n\n    else {\n      The_Memory_System()->object_table->set_object_for(oop, new_obj_addr  COMMA_FALSE_OR_NOTHING); // noop unless indirect oops\n      int n_oops = (Oop*)next_src_chunk - (Oop*)src_chunk;\n      // no mutability barrier wanted here, may need generational store barrier in the future\n      \n      DEBUG_MULTIMOVE_CHECK(dst_chunk, src_chunk, n_oops);\n      memmove(dst_chunk, src_chunk, n_oops * sizeof(Oop));\n      src_chunk = next_src_chunk;\n      dst_chunk = (Chunk*)&((Oop*)dst_chunk)[n_oops];\n    }\n  }\n  if (compacting)\n    set_end_objects((Oop*)dst_chunk);\n\n\n  if (for_gc || compacting)\n    The_Memory_System()->object_table->post_store_whole_enchillada();\n\n  // enforce coherence at higher level\n}\n\n\nvoid Abstract_Object_Heap::zap_unused_portion() {\n  assert_always(end_of_space() != NULL);\n  if (check_many_assertions) {\n    enforce_coherence_before_store(end_objects(), (char*)end_of_space() - (char*)end_objects());\n\n    for (Oop* p = (Oop*)end_objects();\n         p < (Oop*)end_of_space();\n         *p++ = Oop::from_bits(Oop::Illegals::zapped)) {}\n\n    enforce_coherence_after_store(end_objects(), (char*)end_of_space() - (char*)end_objects());\n  }\n}\n\n\n\nvoid Abstract_Object_Heap::print(FILE*) {\n  lprintf(\"start 0x%x, next 0x%x, end 0x%x\\n\", _start, _next, _end);\n}\n\n"
  },
  {
    "path": "vm/src/heap/abstract_object_heap.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Abstract_Object_Heap {\n protected:\n\n  Oop* _start;\n  Oop* _next;\n  Oop* _end;\n\n public:\n  int allocationsSinceLastQuery;\n  int compactionsSinceLastQuery;\n\n  int32 lowSpaceThreshold;\n\n  Abstract_Object_Heap() {\n    _start = _next = _end = NULL; lowSpaceThreshold = 0;\n    allocationsSinceLastQuery = compactionsSinceLastQuery = 0;\n  }\n  bool is_initialized() { return _start != NULL; }\n\n\n  int   heap_byte_size()       { fatal(\"abstract\"); }\n  void* allocate_my_space(int) { fatal(\"abstract\"); }\n  void saveProcessSignallingLowSpace() {}\n\n  // make these static as an optimization for how\n\n\n  static void check_store( Oop* /* p */) {\n    // gc\n  }\n  void check_multiple_stores_for_generations_only( Oop dsts[], oop_int_t n);\n  void multistore( Oop* dst, Oop* src, oop_int_t n);\n  void multistore( Oop* dst, Oop  src, oop_int_t n);\n  void multistore( Oop* dst, Oop* end, Oop src);\n  static void record_class_header(Object* /* obj */, Oop klass) { if (klass.is_new()) unimplemented();  }\n\n  static void possibleRootStore(Oop /* holder */, Oop /* contents */) { /*unimplemented*/ }\n  static void clearRootsTable() { lprintf(\"no clearRootsTable()\\n\"); }\n\n\n public:\n  void initialize();\n  void initialize(void* mem, int size);\n\n\n  bool sufficientSpaceToAllocate(oop_int_t bytes);\n  Chunk* allocateChunk(oop_int_t total_bytes);\n  Object_p object_address_unchecked(Oop)  { fatal(\"abstract\"); }\n\n  Object* accessibleObjectAfter(Object*);\n  Object* firstAccessibleObject();\n  Oop     initialInstanceOf(Oop);\n\n  Object* first_object_or_null();\n  inline Object*  next_object(Object*);\n  Object*   end_objects() const { return (Object*)_next; } // addr past objects\n  Oop*     end_of_space() { return (Oop*)_end; }\n\n  Object* first_object_without_preheader();\n  Object* next_object_without_preheader(Object*);\n  Object*  end_objects_without_preheader() { return (Object*)_next; } // addr past objects\n\n  u_int32 bytesLeft() { return (char*)_end - (char*)_next; }\n  int bytesUsed() { return (char*)_next - (char*)_start; }\n\n  void     set_end_objects(Oop* x) {\n    Oop* old_next = check_many_assertions ? _next : NULL;\n    assert(x >= _start);\n    _next = x;\n    if (check_many_assertions &&  _next < old_next)\n      for (Oop* p = x;  p < old_next;  ++p)\n        *p = Oop::from_bits(Oop::Illegals::trimmed_end);\n  }\n\n\n\n  Oop* startOfMemory() const { return _start; }\n\n  bool contains(void* p) { Oop* pp = (Oop*)p;  return _start <= pp  &&  pp < _next; }\n\n  u_int32    approx_object_count() {\n    return bytesUsed() / sizeof(Oop) / 10;\n  }\n  \n  inline int rank();\n\n\n  bool verify();\n  bool verify_address_in_heap(void*);\n  void ensure_all_unmarked();\n\n  void zap_unused_portion();\n  void scan_compact_or_make_free_objects(bool compacting, Abstract_Mark_Sweep_Collector* gc_or_null);\n\n\n  Oop get_stats() { fatal(\"abstract\"); }\n\n  inline bool is_read_mostly();\n  inline bool is_read_write();\n\n  inline void enforce_coherence_before_store(void*, int nbytes);\n  inline void enforce_coherence_after_store(void*, int nbytes);\n\n  void enforce_coherence_before_store_into_object_by_interpreter(void*, int nbytes, Object_p dst);\n  void enforce_coherence_after_store_into_object_by_interpreter(void*, int nbytes);\n\n  void enforce_coherence_in_whole_heap_before_store() { enforce_coherence_before_store(startOfMemory(), bytesUsed()); }\n  void enforce_coherence_in_whole_heap_after_store()  { enforce_coherence_after_store (startOfMemory(), bytesUsed()); }\n\n  void invalidate_whole_heap() { OS_Interface::invalidate_mem(startOfMemory(), bytesUsed()); }\n\n  void do_all_oops(Oop_Closure*);\n\n  void print(FILE* f = stdout);\n\n private:\n  Object* object_from_chunk(Chunk*);\n  Object* object_from_chunk_without_preheader(Chunk*);\n};\n\n# define FOR_EACH_OBJECT_IN_HEAP(a_heap, object_ptr) \\\nfor ( Object* object_ptr  =  (a_heap)->first_object_or_null(); \\\n              object_ptr !=  NULL; \\\n              object_ptr  =  (a_heap)->next_object(object_ptr) )\n\n"
  },
  {
    "path": "vm/src/heap/abstract_object_heap.inline.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\ninline bool Abstract_Object_Heap::is_read_mostly() { return The_Memory_System()->is_address_read_mostly(startOfMemory()); }\n\ninline bool Abstract_Object_Heap::is_read_write() { return !is_read_mostly(); }\n\ninline void Abstract_Object_Heap:: enforce_coherence_before_store(void* p, int nbytes) {\n  assert(The_Memory_System()->contains(p));\n  if (is_read_mostly()) The_Memory_System()->pre_cohere(p, nbytes);\n}\n\ninline void Abstract_Object_Heap::enforce_coherence_after_store(void* p, int nbytes) {\n  if (is_read_mostly()) The_Memory_System()->post_cohere(p, nbytes);\n}\n\n\ninline void Abstract_Object_Heap::enforce_coherence_before_store_into_object_by_interpreter(void* p, int nbytes, Object_p dst_obj_to_be_evacuated) {\n  assert(The_Memory_System()->contains(p));\n  The_Memory_System()->enforce_coherence_before_store_into_object_by_interpreter(p, nbytes, dst_obj_to_be_evacuated);\n}\n\ninline void Abstract_Object_Heap::enforce_coherence_after_store_into_object_by_interpreter(void* p, int nbytes) {\n  if (is_read_mostly()) The_Memory_System()->post_cohere(p, nbytes);\n}\n\n\n\ninline bool Abstract_Object_Heap::sufficientSpaceToAllocate(oop_int_t bytes) {\n  u_oop_int_t minFree = lowSpaceThreshold + bytes + Object::BaseHeaderSize;\n\n  if (Trace_GC_For_Debugging && The_Squeak_Interpreter()->debugging_tracer() != NULL  &&  The_Squeak_Interpreter()->debugging_tracer()->force_gc())\n    ;\n  else if (bytesLeft() >= minFree)\n    return true;\n\n  if (The_Squeak_Interpreter()->safepoint_ability->is_able()) // might be allocating a context\n    The_Memory_System()->fullGC(\"sufficientSpaceToAllocate\");\n\n  if (bytesLeft() >= minFree)\n    return true;\n\n  /*  implement this\n   The_Memory_System()->balanceHeaps();\n\n\n   if (bytesLeft() >= minFree)\n   return true;\n   */\n\n\n  return false;\n}\n\n\ninline Chunk* Abstract_Object_Heap::allocateChunk(oop_int_t total_bytes) {\n\n  bool enoughSpace = sufficientSpaceToAllocate(total_bytes);\n  if (!enoughSpace) {\n    The_Squeak_Interpreter()->set_signalLowSpace(true);\n\n    lowSpaceThreshold = 0;\n    saveProcessSignallingLowSpace();\n    The_Squeak_Interpreter()->forceInterruptCheck();\n  }\n  int n = convert_byte_count_to_oop_count(total_bytes);\n  if (_next + n  >=  _end) {\n    fatal(\"allocateChunk should never fail, but there is not enough space for the requested bytes\");\n    return NULL;\n  }\n  Oop* r = _next;\n  _next += n;\n  if (check_assertions) {\n    // make sure the heaps are only modified by the associated cores\n    assert(rank()  ==  Logical_Core::my_rank()\n           || Safepoint_for_moving_objects::is_held());\n\n    assert(The_Memory_System()->contains(r));\n    assert(_next >= _start);\n    assert(_next <= _end); // I may need to remove this -- dmu 6/22/09\n    oopset_no_store_check(r, Oop::from_bits(Oop::Illegals::allocated), total_bytes/sizeof(Oop));\n  }\n\n  return (Chunk*)r;\n}\n\n\n\ninline Object* Abstract_Object_Heap::accessibleObjectAfter(Object* obj) {\n  for (;;) {\n    obj = next_object(obj);\n    if (obj == NULL  ||  !obj->isFreeObject())\n      return obj;\n  }\n}\n\n\ninline int Abstract_Object_Heap::rank() { return The_Memory_System()->rank_for_address(_start); }\n\n\n\ninline Object* Abstract_Object_Heap::object_from_chunk(Chunk* c) {\n  // word after last object might cause object_from_chunk to wrap to low addresses\n  return c < (Chunk*)end_objects() ? c->object_from_chunk() : NULL;\n}\n\n\ninline Object* Abstract_Object_Heap::object_from_chunk_without_preheader(Chunk* c) {\n  // word after last object might cause object_from_chunk to wrap to low addresses\n  return c < (Chunk*)end_objects() ? c->object_from_chunk_without_preheader() : NULL;\n}\n\n\ninline Object* Abstract_Object_Heap::next_object(Object* obj) {\n  return object_from_chunk(obj->nextChunk());\n}\n\n\ninline Object* Abstract_Object_Heap::next_object_without_preheader(Object* obj) {\n  return object_from_chunk_without_preheader(obj->nextChunk());\n}\n\n\ninline bool Abstract_Object_Heap::verify_address_in_heap(void* addr) {\n  assert_always_msg(_start <= (Oop*)addr\n                    &&                (Oop*)addr < _next,\n                    \"object is not a valid address\");\n  assert_always_msg((oop_int_t(addr) & (sizeof(Object*)-1)) == 0,\n                    \"object is not aligned\");\n  return true;\n}\n\n"
  },
  {
    "path": "vm/src/heap/abstract_object_table.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Abstract_Object_Table {\n public:\n  Abstract_Object_Table() {}\n\n  Oop allocate_OTE_for_object_in_snapshot(Object*)  { fatal(); return Oop::from_bits(0); }\n  int rank_for_adding_object_from_snapshot(Oop)     { fatal(); return -1; }\n\n  Oop allocate_oop_and_set_backpointer(Object*, int           COMMA_DCL_ESB) { fatal(); return Oop::from_bits(0); }\n  Oop allocate_oop_and_set_preheader(Object* /* obj */, int   COMMA_DCL_ESB) { fatal(); return Oop::from_bits(0); }\n\n  void prepare_for_objects(int /* about_how_many */) { }\n\n  void save_baseHeader(Oop, Object*)    { fatal(); }\n  void restore_baseHeader(Oop, Object*) { fatal(); }\n\n  Object* local_object_for(Oop) { fatal(); return NULL; }\n  void set_local_object_for(Oop, Object*) { fatal(); }\n\n  bool is_local_copy_in_use(Oop) { fatal(); return false; }\n\n  Object* global_object_for(Oop) { fatal(); return NULL; }\n  Object* global_object_for_unchecked(Oop) { fatal(); return NULL; }\n  void set_global_object_for(Oop, Object*, bool /* do_check = true */ ) { fatal(); }\n\n  Object* object_for(Oop) { fatal(); return NULL; }\n  Object* object_for_unchecked(Oop) { fatal(); return NULL; }\n  void set_object_for(Oop, Object_p, bool /* do_check = true */ ) { fatal(); }\n\n  bool spare_bit_for(Oop)  { fatal(); return false; }\n  void set_spare_bit_for(Oop, bool /* dont */ )  { fatal(); }\n\n  void save_to_checkpoint(FILE*) { fatal(); }\n  static bool restore_from_checkpoint(FILE*) { fatal(); return false; }\n\n\n\n  void do_in_reverse_allocation_order(Oop_Closure*) { fatal(); }\n\n  void clear_words() { fatal(); }\n\n  void free_oop(Oop) { fatal(); }\n\n  bool verify() { fatal(); return false; }\n  bool verify_no_local_objects() { fatal(); return false; }\n  bool verify_after_mark() { fatal(); return false; }\n\n  bool probably_contains(void*) const { fatal(); return false; }\n\n  Oop get_stats(int) { fatal(); return Oop::from_bits(0); }\n\n  void print() { fatal(); }\n\n protected:\n};\n\n"
  },
  {
    "path": "vm/src/heap/gc_oop_stack.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass GC_Oop_Stack {\n  static const int N = 10000;\n  struct Contents {\n    Object* objs[N];\n    Contents* next_contents;\n    Contents(Contents* last) { next_contents = last; }\n    ~Contents() { if (next_contents != NULL) { delete next_contents; next_contents = NULL;  } }\n } *contents, *free_contents;\n  int next_elem;\n\npublic:\n   GC_Oop_Stack() { contents = NULL;  free_contents = NULL; next_elem = N; }\n    ~GC_Oop_Stack() {\n      if (contents != NULL) { delete contents; contents = NULL;  }\n      if (free_contents != NULL) { delete free_contents; free_contents = NULL; }\n    }\n\n  void push(Object* x) {\n    if (next_elem < N)\n      contents->objs[next_elem++] = x;\n    else {\n      if (free_contents == NULL)\n        contents = new Contents(contents);\n      else {\n        Contents* c = free_contents;\n        free_contents = c->next_contents;\n        c->next_contents = contents;\n        contents = c;\n      }\n      next_elem = 0;\n      push(x);\n    }\n  }\n\n  bool is_empty() { return next_elem == N  &&  contents == NULL; }\n\n  Object* pop() {\n    Object* r = contents->objs[--next_elem];\n    if (next_elem == 0) {\n      next_elem = N;\n      if (contents != NULL) {\n        Contents* c = contents;\n        contents = c->next_contents;\n\n        c->next_contents = free_contents;\n        free_contents = c;\n      }\n    }\n    return r;\n  }\n};\n\n"
  },
  {
    "path": "vm/src/heap/indirect_oop_mark_sweep_collector.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Indirect_Oop_Mark_Sweep_Collector: public Abstract_Mark_Sweep_Collector {\n\npublic:\n  Indirect_Oop_Mark_Sweep_Collector() : Abstract_Mark_Sweep_Collector() {}\n\n};\n\n"
  },
  {
    "path": "vm/src/heap/mark_sweep_collector.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\ntypedef Indirect_Oop_Mark_Sweep_Collector Mark_Sweep_Collector;\n"
  },
  {
    "path": "vm/src/heap/memory_system.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\nbool     Memory_System::use_huge_pages = On_Tilera;\nbool     Memory_System::replicate_methods = false; // if true methods are put on read-mostly heap\nbool     Memory_System::replicate_all = true; // if true, all (non-contexts) are allowed in read-mostly heap\nbool     Memory_System::OS_mmaps_up = On_Apple;\nu_int32  Memory_System::memory_per_read_write_heap = 0;\nu_int32  Memory_System::log_memory_per_read_mostly_heap = 0;\nu_int32  Memory_System::memory_per_read_mostly_heap = 0;\nu_int32  Memory_System::log_memory_per_read_write_heap = 0;\n  int    Memory_System::round_robin_period = 1;\n  size_t Memory_System::min_heap_MB =  On_iOS ? 32 : On_Tilera ? 256 : 1024; // Fewer GCs on Mac\n\n# define FOR_ALL_HEAPS(rank, mutability) \\\n  FOR_ALL_RANKS(rank) \\\n    for (int mutability = 0;  mutability < max_num_mutabilities;  ++mutability)  \\\n\n\nMemory_System::Memory_System() {\n  image_name = new char[1]; *image_name = '\\0';\n\n  global_GC_values = (struct global_GC_values*)Memory_Semantics::shared_malloc(sizeof(struct global_GC_values));\n  global_GC_values->growHeadroom = 4 * Mega;\n  global_GC_values->shrinkThreshold = 8 * Mega;\n  global_GC_values->gcCycles = 0;\n  global_GC_values->gcCount = 0;\n  global_GC_values->gcMilliseconds = 0;\n  global_GC_values->mutator_start_time = 0;\n  global_GC_values->last_gc_ms = 0;\n  global_GC_values->inter_gc_ms = 0;\n\n  page_size_used_in_heap = 0;\n\n  for (int rank = 0;  rank < Max_Number_Of_Cores;  ++rank)\n    for (int mutability = 0;  mutability < max_num_mutabilities;  ++mutability)\n      heaps[rank][mutability] = NULL;\n}\n\n\nvoid Memory_System::finished_adding_objects_from_snapshot() {\n  object_table->post_store_whole_enchillada();\n  The_Squeak_Interpreter()->set_am_receiving_objects_from_snapshot(false);\n  enforce_coherence_after_each_core_has_stored_into_its_own_heap();\n  \n  // now all objects are in the heap, so we are also sure that this file is\n  // in memory and the filesystem link is not to be used by mmap anymore\n  OS_Interface::unlink_heap_file();\n}\n\nvoid Memory_System::enforce_coherence_after_each_core_has_stored_into_its_own_heap() {\n  if (!replicate_methods &&  !replicate_all) return;  // should not need this statement, but there was a bug without it, and anyway it's faster with it\n  OS_Interface::mem_fence(); // ensure all cores see same heap _next's\n  \n  enforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapMessage_class().send_to_other_cores();\n  \n  heaps[Logical_Core::my_rank()][read_mostly]->enforce_coherence_in_whole_heap_after_store();\n}\n\nvoid Memory_System::enforce_coherence_before_each_core_stores_into_its_own_heap() {\n  if (!replicate_methods &&  !replicate_all) return; // should not need this statement, but there was a bug without it, and anyway it's faster with it\n  enforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapMessage_class().send_to_other_cores();\n  invalidate_heaps_and_fence(false);\n}\n\n\nvoid Memory_System::enforce_coherence_before_this_core_stores_into_all_heaps() {\n  if (!replicate_methods &&  !replicate_all) return; // should not need this statement, but there was a bug without it, and anyway it's faster with it\n  OS_Interface::mem_fence(); // ensure all cores see same heap _next's\n  enforceCoherenceBeforeSenderStoresIntoAllHeapsMessage_class().send_to_other_cores();\n}\n\n\n\nbool Memory_System::verify_if(bool condition) {\n  if (!condition)\n    return true;\n\n  // do this one at a time because the read_mostly heap messages are really flying around\n  zapUnusedPortionOfHeapMessage_class().send_to_all_cores();\n\n  verifyInterpreterAndHeapMessage_class().send_to_all_cores();\n\n  return object_table->verify();\n}\n\n\nOop Memory_System::get_stats(int what_to_sample) {\n  int s = The_Squeak_Interpreter()->makeArrayStart();\n  if (what_to_sample & (1 << SampleValues::gcStats)) {\n    PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(global_GC_values->gcCount);\n    PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(global_GC_values->gcMilliseconds);\n    PUSH_POSITIVE_64_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(global_GC_values->gcCycles);\n    global_GC_values->gcCycles = global_GC_values->gcCount = global_GC_values->gcMilliseconds = 0;\n  }\n  if (what_to_sample & (1 << SampleValues::heapStats)) {\n    Oop readWriteHeapStats = The_Memory_System()->heaps[Logical_Core::my_rank()][Memory_System::read_write]->get_stats();\n    PUSH_WITH_STRING_FOR_MAKE_ARRAY(readWriteHeapStats);\n    Oop readMostlyHeapStats = The_Memory_System()->heaps[Logical_Core::my_rank()][Memory_System::read_mostly]->get_stats();\n    PUSH_WITH_STRING_FOR_MAKE_ARRAY(readMostlyHeapStats);\n  }\n\n  return The_Squeak_Interpreter()->makeArray(s);\n}\n\n\nvoid Memory_System::fullGC(const char* why) {\n  Squeak_Interpreter * const interp = The_Squeak_Interpreter();\n  if (interp->am_receiving_objects_from_snapshot())\n    fatal(\"cannot gc now\");\n  \n  PERF_CNT(interp, count_full_gc());\n\n  lprintf(\"about to fullGC: %s\\n\", why);\n  global_GC_values->inter_gc_ms = global_GC_values->mutator_start_time ? interp->ioWhicheverMSecs() - global_GC_values->mutator_start_time : 0;\n  u_int32 last_gc_start = interp->ioWhicheverMSecs();\n  \n  global_GC_values->gcCycles -= OS_Interface::get_cycle_count();\n  \n  Mark_Sweep_Collector msc;\n  msc.gc();\n  \n  ++global_GC_values->gcCount;\n  global_GC_values->gcMilliseconds += (global_GC_values->last_gc_ms = interp->ioWhicheverMSecs() - last_gc_start);\n  global_GC_values->gcCycles += OS_Interface::get_cycle_count();\n  \n  global_GC_values->mutator_start_time = interp->ioWhicheverMSecs();\n\n  level_out_heaps_if_needed();\n}\n\n\nvoid Memory_System::level_out_heaps_if_needed() {\n  if (global_GC_values->inter_gc_ms  <  global_GC_values->last_gc_ms) {\n    lprintf(\"inter_gc_ms is %d, last_gc_ms is %d; may level out\\n\",\n            global_GC_values->inter_gc_ms, global_GC_values->last_gc_ms);\n    \n    Multicore_Object_Heap* biggest = biggest_heap();\n    int mutability = biggest->firstAccessibleObject()->mutability();\n    Multicore_Object_Heap* smallest = heaps[smallest_heap(mutability)][mutability];\n    \n    if (biggest->bytesUsed() * 4  >  smallest->bytesUsed() * 5) {\n      lprintf(\"biggest bytesUsed is %d, smallest bytesUsed is %d; will level out\\n\",\n              biggest->bytesUsed(), smallest->bytesUsed());\n\n      Safepoint_for_moving_objects sf(\"level_out_heaps_if_needed\");\n      Safepoint_Ability sa(false);\n\n      Object* first = biggest->firstAccessibleObject();\n      Object* first_object_to_spread;\n      \n      for (first_object_to_spread = first; \n           first_object_to_spread  &&  ((char*)first_object_to_spread - (char*)first)  <  smallest->bytesUsed();  \n           first_object_to_spread = biggest->accessibleObjectAfter(first_object_to_spread)) {}\n      \n      if (first_object_to_spread) {\n        lprintf(\"Spreading objects around to prevent GC storms\\n\"); // by spreading only excess if needed\n        The_Squeak_Interpreter()->preGCAction_everywhere(false); // false because caches are oop-based, and we just move objs\n        flushFreeContextsMessage_class().send_to_all_cores();\n        shuffle_or_spread_last_part_of_a_heap(first_object_to_spread, 0, Logical_Core::num_cores - 1, false, false, true);\n        The_Squeak_Interpreter()->postGCAction_everywhere(false);\n        The_Memory_System()->verify_if(check_many_assertions);\n        lprintf(\"Done spreading objects around to prevent GC storms\\n\"); // by spreading only excess if needed\n      }\n    }\n  }\n}\n\n\nMulticore_Object_Heap* Memory_System::biggest_heap() {\n  Multicore_Object_Heap* biggest = NULL;\n  FOR_ALL_HEAPS(rank, mutability) {\n    Multicore_Object_Heap* h = heaps[rank][mutability];\n    if (biggest == NULL  ||  h->bytesUsed() > biggest->bytesUsed()) \n      biggest = h; \n  }\n  return biggest;\n}\n\n\nvoid Memory_System::finalize_weak_arrays_since_we_dont_do_incrementalGC() {\n  fullGC(\"finalize_weak_arrays_since_we_dont_do_incrementalGC\");\n}\n\n\nvoid Memory_System::swapOTEs(Oop* o1, Oop* o2, int len) {\n  for (int i = 0;  i < len;  ++i) {\n    Object_p obj1 = o1[i].as_object();\n    Object_p obj2 = o2[i].as_object();\n\n    obj2->set_object_address_and_backpointer(o1[i]  COMMA_TRUE_OR_NOTHING);\n    obj1->set_object_address_and_backpointer(o2[i]  COMMA_TRUE_OR_NOTHING);\n  }\n}\n\n\nstatic bool containOnlyOops(Object_p a1, Object_p a2) {\n  for (u_oop_int_t fieldOffset = a1->lastPointer() / sizeof(Oop);\n       fieldOffset >= Object::BaseHeaderSize / sizeof(Oop);\n       --fieldOffset )\n    if (   !a1->as_oop_p()[fieldOffset].is_mem()\n        || !a2->as_oop_p()[fieldOffset].is_mem() )\n      return false;\n  return true;\n}\n\n\n\n\n\nclass Abstract_Become_Closure: public Oop_Closure {\nprotected:\n  Object_p array1;\n  Object_p array2;\n  Oop *o1, *o2;\n  int len;\n  bool twoWay, copyHash;\n\n  Abstract_Become_Closure(Object_p a1, Object_p a2, bool t, bool c) : Oop_Closure() {\n    array1 = a1;\n    array2 = a2;\n    o1 = array1->as_oop_p() + Object::BaseHeaderSize/sizeof(Oop);\n    o2 = array2->as_oop_p() + Object::BaseHeaderSize/sizeof(Oop);\n    len = (a1->lastPointer() - Object::BaseHeaderSize) / sizeof(Oop)  +  1;\n    twoWay = t;  copyHash = c;\n  }\npublic:\n  void copyHashes() {\n    if (!copyHash) return;\n    for (int i = 0;  i < len;  ++i) {\n      Object_p obj1 = o1[i].as_object();  oop_int_t* hdr1p = &obj1->baseHeader;  oop_int_t hdr1 = *hdr1p;\n      Object_p obj2 = o2[i].as_object();  oop_int_t* hdr2p = &obj2->baseHeader;  oop_int_t hdr2 = *hdr2p;\n      if (twoWay) {\n        The_Memory_System()->store_enforcing_coherence(hdr1p, (hdr1 & ~Object::HashMask)  |  (hdr2 & Object::HashMask), obj1);\n      }\n      The_Memory_System()->store_enforcing_coherence(hdr2p, (hdr2 & ~Object::HashMask)  |  (hdr1 & Object::HashMask), obj2);\n    }\n  }\n\n  virtual const char* class_name() { return \"Abstract_Become_Closure\"; }\n};\n\nclass One_Way_Become_Closure: public Abstract_Become_Closure {\npublic:\n  One_Way_Become_Closure(Object_p a1, Object_p a2, bool c) : Abstract_Become_Closure(a1, a2, false, c) {  }\n\n  void value(Oop* p, Object_p containing_obj_or_null) {\n    if (containing_obj_or_null != array1)\n      for (int i = 0;  i < len;  ++i)\n        if (*p == o1[i]) {\n          The_Memory_System()->store_enforcing_coherence_if_in_heap(p, o2[i], containing_obj_or_null);\n        }\n  }\n  virtual const char* class_name() { return \"One_Way_Become_Closure\"; }\n};\n\nclass Two_Way_Become_Closure: public Abstract_Become_Closure {\npublic:\n  Two_Way_Become_Closure(Object_p a1, Object_p a2, bool c) : Abstract_Become_Closure(a1, a2, true, c) {}\n\n\n  void value(Oop* p, Object_p containing_obj_or_null) {\n    if (containing_obj_or_null != array1  &&  containing_obj_or_null != array2)\n      for (int i = 0;  i < len;  ++i) {\n        Oop x = *p;\n\n             if (x == o1[i]) { The_Memory_System()->store_enforcing_coherence_if_in_heap(p, o2[i], containing_obj_or_null); }\n        else if (x == o2[i]) { The_Memory_System()->store_enforcing_coherence_if_in_heap(p, o1[i], containing_obj_or_null); }\n      }\n  }\n  virtual const char* class_name() { return \"Two_Way_Become_Closure\"; }\n};\n\n\n\n\nbool Memory_System::become_with_twoWay_copyHash(Oop array1, Oop array2, bool twoWayFlag, bool copyHashFlag) {\n  Safepoint_for_moving_objects sf(\"become\");\n  Safepoint_Ability sa(false);\n\n  if (!array1.isArray()  ||  !array2.isArray())  return false;\n  Object_p a1o = array1.as_object();\n  Object_p a2o = array2.as_object();\n  if (a1o->lastPointer() != a2o->lastPointer()) return false;\n  if (!containOnlyOops(a1o, a2o)) return false;\n  \n  Oop classP = The_Squeak_Interpreter()->splObj(Special_Indices::ClassProcess);\n  for (int i = 0, n = a1o->fetchWordLength(); i < n; ++i)\n    if (a1o->fetchPointer(i) == classP  ||  a2o->fetchPointer(i) == classP)\n      The_Squeak_Interpreter()->set_process_object_layout_timestamp(The_Squeak_Interpreter()->process_object_layout_timestamp() + 1);\n\n\n  // sync?\n  if (twoWayFlag  &&  copyHashFlag) {\n    swapOTEs(a1o->as_oop_p() + Object::BaseHeaderSize/sizeof(Oop),\n             a2o->as_oop_p() + Object::BaseHeaderSize/sizeof(Oop),\n             (a1o->lastPointer() - Object::BaseHeaderSize) / sizeof(Oop)  +  1);\n    return true;\n  }\n\n  if (twoWayFlag) {\n    Two_Way_Become_Closure bc(a1o, a2o, copyHashFlag);\n    do_all_oops_including_roots_here(&bc, true); // will not do the contents of the arrays themselves\n  }\n  else {\n    One_Way_Become_Closure bc(a1o, a2o, copyHashFlag);\n    do_all_oops_including_roots_here(&bc, true); // will not do the contents of the arrays themselves\n  }\n  flushInterpreterCachesMessage_class().send_to_all_cores();\n  return true;\n}\n\n\n\nLogical_Core* Memory_System::coreWithSufficientSpaceToAllocate(oop_int_t bytes, int mutability) {\n  Multicore_Object_Heap* h = heaps[Logical_Core::my_rank()][mutability];\n  int minFree = bytes + 10000 + h->lowSpaceThreshold; // may not be necessary\n  if  ( h->sufficientSpaceToAllocate(minFree) )\n    return Logical_Core::my_core();\n\n  if  ( heaps[second_chance_cores_for_allocation[mutability]][mutability]->sufficientSpaceToAllocate(minFree))\n    return &logical_cores[second_chance_cores_for_allocation[mutability]];\n\n  set_second_chance_cores_for_allocation(mutability);\n  if  ( heaps[second_chance_cores_for_allocation[mutability]][mutability]->sufficientSpaceToAllocate(minFree))\n    return &logical_cores[second_chance_cores_for_allocation[mutability]];\n\n  if (!sufficientSpaceAfterGC(minFree, mutability))\n    return NULL;\n  set_second_chance_cores_for_allocation(mutability);\n  if  ( heaps[second_chance_cores_for_allocation[mutability]][mutability]->sufficientSpaceToAllocate(minFree))\n    return &logical_cores[second_chance_cores_for_allocation[mutability]];\n  else return NULL;\n}\n\n\nbool Memory_System::sufficientSpaceAfterGC(oop_int_t minFree, int mutability) {\n  The_Memory_System()->incrementalGC();\n  set_second_chance_cores_for_allocation(mutability);\n\n  if (heaps[second_chance_cores_for_allocation[mutability]][mutability]->sufficientSpaceToAllocate(minFree))\n    return true;\n\n  if (The_Squeak_Interpreter()->signalLowSpace())\n    return false;\n  fullGC(\"sufficientSpaceAfterGC\");\n  static const int extra = 15000;\n  set_second_chance_cores_for_allocation(mutability);\n  if (heaps[second_chance_cores_for_allocation[mutability]][mutability]->sufficientSpaceToAllocate(minFree + extra))\n    return true;\n\n  fatal(\"growObjectMemory\");\n  // oop_int_t growSize = minFree - bytesLeft() + The_Memory_System()->get_growHeadroom();\n  //growObjectMemory(growSize);\n  return heaps[second_chance_cores_for_allocation[mutability]][mutability]->sufficientSpaceToAllocate(minFree + extra);\n}\n\n\n\nu_int32 Memory_System::maxContiguousBytesLeft() {\n  u_int32 r = 0;\n  FOR_ALL_RANKS(i)\n    if (heaps[i][read_write]->bytesLeft() > r)  r = heaps[i][read_write]->bytesLeft();\n  return r;\n}\n\n\n\nvoid Memory_System::imageNamePut_on_this_core(const char* n, int len) {\n  delete[] image_name;\n  image_name = new char[len + 1];\n  bcopy(n, image_name, len);\n  image_name[len] = '\\0';\n}\n\n\nvoid Memory_System::imageNameGet(Object_p dst, int len) {\n  char* n = dst->as_char_p() + Object::BaseHeaderSize;\n  assert(contains(n));\n\n  enforce_coherence_before_store_into_object_by_interpreter(n, len, dst);\n  strncpy(n, image_name, len);\n  enforce_coherence_after_store_into_object_by_interpreter(n, len);\n}\nint Memory_System::imageNameSize() { return strlen(image_name); }\n\nchar* Memory_System::imageName() { return image_name; }\n\nvoid Memory_System::flushExternalPrimitives() {\n  FOR_ALL_HEAPS(rank, mutability) {\n    heaps[rank][mutability]->flushExternalPrimitives();\n  }\n}\n\nvoid Memory_System::handle_low_space_signals() {\n  FOR_ALL_HEAPS(rank, mutability) {\n    heaps[rank][mutability]->handle_low_space_signal();\n  }\n}\n\n\nOop Memory_System::initialInstanceOf(Oop x) {\n  Oop r;\n  FOR_ALL_HEAPS(rank, mutability) {\n    if ((r = heaps[rank][mutability]->initialInstanceOf(x)) != The_Squeak_Interpreter()->roots.nilObj)\n      return r;\n  }\n  return r;\n}\n\n\nOop Memory_System::nextInstanceAfter(Oop x) {\n  if (!x.is_mem()) return The_Squeak_Interpreter()->roots.nilObj;\n  Oop klass = x.fetchClass();\n  int start_rank = x.rank_of_object();\n  int start_mutability = x.mutability();\n\n  Oop r = heaps[start_rank][start_mutability]->next_instance_of_after(klass, x);\n  if (r != The_Squeak_Interpreter()->roots.nilObj)\n    return r;\n\n  FOR_ALL_HEAPS(rank, mutability)\n    if (&heaps[rank][mutability] > &heaps[start_rank][start_mutability]) {\n      r = heaps[rank][mutability]->initialInstanceOf(klass);\n      if (r != The_Squeak_Interpreter()->roots.nilObj)\n        return r;\n    }\n  return r;\n}\n\n\nvoid Memory_System::snapshotCleanUp() {\n  FOR_ALL_HEAPS(rank, mutability)\n    heaps[rank][mutability]->snapshotCleanUp();\n}\n\n\nu_int32 Memory_System::bytesLeft() {\n  u_int32 sum = 0;\n  FOR_ALL_RANKS(i)\n    sum += heaps[i][read_write]->bytesLeft();\n  return sum;\n}\n\n\nvoid Memory_System::writeImageFile(char* image_name) {\n  writeImageFileIO(image_name);\n  fn_t setMacType = The_Interactions.load_function_from_plugin(Logical_Core::main_rank, \"setMacFileTypeAndCreator\", \"FilePlugin\");\n  if (setMacType != NULL)  (*setMacType)(The_Memory_System()->imageName(), \"STim\", \"FAST\");\n}\n\n\n\n\nint32 Memory_System::max_lastHash() {\n  int r = 0;\n  FOR_ALL_HEAPS(rank, mutability) {\n    r = max(r, heaps[rank][mutability]->get_lastHash());\n  }\n  return r;\n}\n\n\nstatic const int32 headerSize = 64;\n\n\n\n\nvoid Memory_System::writeImageFileIO(char* image_name) {\n  // int32 headerStart = 0;\n  FILE* f = fopen(image_name, \"wb\");\n  if (f == NULL) {\n    perror(\"could not open file for writing\");\n    The_Squeak_Interpreter()->success(false);\n    return;\n  }\n  u_int32 heap_offsets[sizeof(heaps)/sizeof(heaps[0][0])];\n  compute_snapshot_offsets(heap_offsets);\n\n  write_snapshot_header(f, heap_offsets);\n\n  if (!The_Squeak_Interpreter()->successFlag) {\n    fclose(f);\n    return;\n  }\n\n  if (fseek(f, headerSize, SEEK_SET)) {\n    perror(\"seek\");\n    The_Squeak_Interpreter()->success(false);\n    return;\n  }\n  bool is_first_object = true; // see comment in write_image_file\n  FOR_ALL_HEAPS(rank, mutability) {\n    heaps[rank][mutability]->write_image_file(f, heap_offsets, is_first_object /* passed by REF */ );\n  }\n  fclose(f);\n  return;\n}\n\nvoid Memory_System::write_snapshot_header(FILE* f, u_int32* heap_offsets) {\n  putLong(The_Squeak_Interpreter()->image_version, f);\n  putLong(headerSize, f);\n  putLong(bytesUsed() - preheader_byte_size /* Squeak 64-bit VM bug workaround */, f);\n  // For explanation of preheader_byte_size above and below, see long comment about Squeak compatibility in write_image_file -- dmu 6/10\n  putLong((int32)read_mostly_memory_base + preheader_byte_size/* Squeak 64-bit VM bug workaround */, f); // start of memory;\n  putLong(adjust_for_snapshot(The_Squeak_Interpreter()->roots.specialObjectsOop.as_object(), heap_offsets), f);\n  putLong(max_lastHash(), f);\n  int screenSize, fullScreenFlag;\n  The_Interactions.get_screen_info(&screenSize, &fullScreenFlag);\n  putLong(screenSize, f);\n  putLong(fullScreenFlag, f);\n  int32 extraVMMemory = 0;\n  putLong(extraVMMemory, f);\n  for (int i = 1;  i <= 7;  ++i)\n    putLong(0, f);\n}\n\n\n\nvoid Memory_System::compute_snapshot_offsets(u_int32* offsets) {\n  int last_offset = 0;\n  Multicore_Object_Heap* last_heap = NULL;\n  FOR_ALL_HEAPS(rank, mutability) {\n    Multicore_Object_Heap** hp = &heaps[rank][mutability];\n    Multicore_Object_Heap*  h = *hp;\n    offsets[hp - &heaps[0][0]] =\n      last_offset +=\n        last_heap == NULL  ?  0\n                           :  (char*)h->startOfMemory() - (char*)last_heap->end_objects();\n    last_heap = h;\n  }\n}\n\n\nOop Memory_System::firstAccessibleObject() {\n  FOR_ALL_HEAPS(rank, mutability)  {\n    Object* obj = heaps[rank][mutability]->firstAccessibleObject();\n    if (obj != NULL)\n      return obj->as_oop();\n  }\n  return The_Squeak_Interpreter()->roots.nilObj;\n}\n\n\nOop Memory_System::nextObject(Oop x) {\n  Object_p obj = x.as_object();\n  int start_rank = obj->rank();\n  int start_mutability = obj->mutability();\n  Object* inst = heaps[start_rank][start_mutability]->accessibleObjectAfter(obj);\n  if (inst != NULL)  return inst->as_oop();\n  bool past_start = false;\n  FOR_ALL_HEAPS(rank, mutability) {\n    if (!past_start) {\n      if (&heaps[rank][mutability] > &heaps[start_rank][start_mutability])\n        past_start = true;\n    }\n    else {\n      Object* inst = heaps[rank][mutability]->firstAccessibleObject();\n      if (inst != NULL)\n        return inst->as_oop();\n    }\n  }\n  return  Oop::from_int(0);\n}\n\n\nvoid  Memory_System::set_lowSpaceThreshold(int32 x)  {\n  FOR_ALL_HEAPS(rank, mutability)\n    heaps[rank][mutability]->set_lowSpaceThreshold(x);\n}\n\nint Memory_System::round_robin_rank() {\n  assert(Logical_Core::running_on_main());\n  static int i = 0; // threadsafe? think its ok, there is no need for 100% monotony, Stefan, 2009-09-05\n  return i++ % Logical_Core::group_size;\n}\n\n\nint Memory_System::calculate_total_read_write_pages(int page_size) {\n  int min_heap_bytes_for_all_cores = min_heap_MB * Mega;\n  int min_heap_bytes_per_core = divide_and_round_up(min_heap_bytes_for_all_cores, Logical_Core::group_size);\n  int min_pages_per_core = divide_and_round_up(min_heap_bytes_per_core, page_size);\n  int pages_per_core = round_up_to_power_of_two(min_pages_per_core); // necessary so per-core bytes is power of two\n  // lprintf(\"page_size %d, Mega %d, min_heap_bytes_for_all_cores %d, Logical_Core::group_size %d,  min_pages_per_core %d,  pages_per_core %d, pages_per_core * Logical_Core::group_size %d\\n\",\n          // page_size, Mega, min_heap_bytes_for_all_cores, Logical_Core::group_size,  min_pages_per_core,  pages_per_core, pages_per_core * Logical_Core::group_size);\n  return pages_per_core * Logical_Core::group_size;\n}\n\n\nint Memory_System::calculate_bytes_per_read_mostly_heap(int /* page_size */) {\n  int min_bytes_per_core = divide_and_round_up(min_heap_MB * Mega,  Logical_Core::group_size);\n  return round_up_to_power_of_two(min_bytes_per_core);\n}\n\n\nint Memory_System::calculate_total_read_mostly_pages(int page_size) {\n  return divide_and_round_up(calculate_bytes_per_read_mostly_heap(page_size) * Logical_Core::group_size, page_size);\n}\n\nvoid Memory_System::initialize_from_snapshot(int32 snapshot_bytes, int32 sws, int32 fsf, int32 lastHash) {\n  set_page_size_used_in_heap();\n\n  int rw_pages = calculate_total_read_write_pages (page_size_used_in_heap);\n  int rm_pages = calculate_total_read_mostly_pages(page_size_used_in_heap);\n  // lprintf(\"rw_pages %d, rm_pages %d\\n\", rw_pages, rm_pages);\n\n\n  snapshot_window_size.initialize(sws, fsf);\n\n\n  u_int32 total_read_write_memory_size     =  rw_pages *  page_size_used_in_heap;\n  u_int32 total_read_mostly_memory_size    =  rm_pages *  page_size_used_in_heap;\n\n  OS_Interface::check_requested_heap_size(total_read_mostly_memory_size + total_read_write_memory_size);\n\n  read_mostly_memory_base = read_write_memory_base = NULL;\n\n  map_read_write_and_read_mostly_memory(getpid(), total_read_write_memory_size, total_read_mostly_memory_size);\n\n  memory_per_read_write_heap  = total_read_write_memory_size   / Logical_Core::group_size;\n  memory_per_read_mostly_heap = calculate_bytes_per_read_mostly_heap(page_size_used_in_heap);\n  \n  assert(memory_per_read_write_heap                             <=  total_read_write_memory_size);\n  assert(memory_per_read_write_heap * Logical_Core::group_size  <=  total_read_write_memory_size);\n\n  assert(memory_per_read_mostly_heap                            <=  total_read_mostly_memory_size);\n  assert(memory_per_read_mostly_heap * Logical_Core::group_size <=  total_read_mostly_memory_size);\n  \n  \n  log_memory_per_read_write_heap = log_of_power_of_two(memory_per_read_write_heap);\n  log_memory_per_read_mostly_heap = log_of_power_of_two(memory_per_read_mostly_heap);\n  object_table = new Multicore_Object_Table();\n\n  init_buf ib = {\n    snapshot_bytes, sws, fsf, lastHash,\n    read_mostly_memory_base, read_write_memory_base,\n    total_read_write_memory_size, memory_per_read_write_heap, log_memory_per_read_write_heap,\n    total_read_mostly_memory_size, memory_per_read_mostly_heap, log_memory_per_read_mostly_heap,\n    page_size_used_in_heap, getpid(),\n    object_table,\n    global_GC_values\n  };\n\n  initialize_main(&ib);\n}\n\n\nvoid Memory_System::set_page_size_used_in_heap() {\n  if (use_huge_pages) {\n    int   co_pages = calculate_total_read_write_pages(huge_page_size);\n    int inco_pages = calculate_total_read_mostly_pages(huge_page_size);\n    if (!OS_Interface::ask_for_huge_pages(co_pages + inco_pages))\n      use_huge_pages = false;\n  }\n  lprintf(\"Using %s pages.\\n\", use_huge_pages ? \"huge\" : \"normal\");\n  int hps = huge_page_size,  nps = normal_page_size; // compiler bug, need to alias these\n  page_size_used_in_heap = use_huge_pages ? hps : nps;\n}\n\n\n/** Allocate heaps in two steps, to be able to set the flag for incoherent\n    memory */\nvoid Memory_System::map_heap_memory_separately(int pid,\n                                               size_t grand_total,\n                                               size_t inco_size,\n                                               size_t co_size) {\n  if (OS_mmaps_up) {\n    read_mostly_memory_base     = OS_Interface::map_heap_memory(grand_total, inco_size,\n                                                  read_mostly_memory_base,\n                                                  0, pid,\n                                                  MAP_SHARED | MAP_CACHE_INCOHERENT);\n    read_mostly_memory_past_end = read_mostly_memory_base + inco_size;\n\n    read_write_memory_base      = OS_Interface::map_heap_memory(grand_total, co_size,\n                                                  read_mostly_memory_past_end,\n                                                  inco_size, pid,\n                                                  MAP_SHARED);\n    read_write_memory_past_end  = read_write_memory_base  + co_size;\n  }\n  else {\n    read_write_memory_base      = OS_Interface::map_heap_memory(grand_total, co_size,\n                                                  read_write_memory_base,\n                                                  0, pid,\n                                                  MAP_SHARED);\n    read_write_memory_past_end  = read_write_memory_base + co_size;\n\n    read_mostly_memory_past_end = read_write_memory_base;\n    read_mostly_memory_base     = OS_Interface::map_heap_memory(grand_total, inco_size,\n                                                  read_mostly_memory_past_end - inco_size,\n                                                  co_size, pid,\n                                                  MAP_SHARED | MAP_CACHE_INCOHERENT);\n  }\n}\n\n\n/** The noinline attribute is necessary here to guarantee that LLVM-GCC,\n    and Clang do not optimize the consistency checks at the point where this\n    method is used.\n    LLVM-GCC and Clang make the assumption that allocations are never as large\n    as 2 GB and thus, convert the assertions to constant checks, which will\n    fail for a 2 GB heap */\n__attribute__((noinline))  // Important attribute for LLVM-GCC and Clang\nvoid Memory_System::map_heap_memory_in_one_request(int pid,\n                                                   size_t grand_total,\n                                                   size_t inco_size,\n                                                   size_t co_size) {\n  read_mostly_memory_base = OS_Interface::map_heap_memory(grand_total, grand_total,\n                                            NULL, 0, pid, MAP_SHARED);\n  read_mostly_memory_past_end = read_mostly_memory_base + inco_size;\n\n  read_write_memory_base      = read_mostly_memory_past_end;\n  read_write_memory_past_end  = read_write_memory_base + co_size;\n  }\n\n\nvoid Memory_System::map_read_write_and_read_mostly_memory(int pid, size_t total_read_write_memory_size, size_t total_read_mostly_memory_size) {\n  size_t     co_size = total_read_write_memory_size;\n  size_t   inco_size = total_read_mostly_memory_size;\n  size_t grand_total = co_size + inco_size;\n\n  if (On_Tilera)\n    map_heap_memory_separately(pid, grand_total, inco_size, co_size);\n  else\n    map_heap_memory_in_one_request(pid, grand_total, inco_size, co_size);\n\n  assert(read_mostly_memory_base < read_mostly_memory_past_end);\n  assert(read_mostly_memory_past_end <= read_write_memory_base);\n  assert(read_write_memory_base < read_write_memory_past_end);\n  if (read_mostly_memory_base >= read_write_memory_past_end) {\n    OS_Interface::unlink_heap_file();\n    fatal(\"contains will fail\");\n}\n}\n\n\nvoid Memory_System::initialize_main(init_buf* ib) {\n  // Each core homes its own shared Multicore_Object_Heap object\n  // Each core has its own private Memory_System object\n  // The actual memory for the heap is one contiguous address space, but each core homes a piece of it,\n  // managed by each Multicore_Object_Heap object.\n\n\n  // Create the Multicore_Object_Heap object on each core for homing.\n  FOR_ALL_RANKS(i)\n    if (i == Logical_Core::my_rank())\n      create_my_heaps(ib);\n    else {\n      logical_cores[i].message_queue.buffered_send_buffer(ib, sizeof(*ib));  // ensure that helper is delayed till now, even if Force_Direct_Memory_Access\n      if (check_many_assertions)\n        lprintf(\"finished sending init buffer\\n\");\n      \n      Logical_Core* sender;\n      Multicore_Object_Heap** heaps_buf = (Multicore_Object_Heap**)Message_Queue::buffered_receive_from_anywhere(true, &sender, Logical_Core::my_core());\n      heaps[i][read_mostly] = *heaps_buf;\n      sender->message_queue.release_oldest_buffer(heaps_buf);\n      \n      heaps_buf = (Multicore_Object_Heap**)Message_Queue::buffered_receive_from_anywhere(true, &sender, Logical_Core::my_core());\n      heaps[i][read_write ] = *heaps_buf;\n      sender->message_queue.release_oldest_buffer(heaps_buf);\n    }\n  // don't need to ilib_mem_invalidate(p, nbytes) other read_mostly heaps because we haven't written anything to them yet\n\n  if (check_many_assertions)\n    lprintf(\"finished creating all heaps\\n\");\n\n  if (Replicate_PThread_Memory_System || Using_Processes) {\n    // Now, send the addresses of these.\n    FOR_ALL_OTHER_RANKS(i)\n      logical_cores[i].message_queue.buffered_send_buffer(&heaps[0][0],  sizeof(heaps));\n  }\n\n  if (check_many_assertions)\n    lprintf(\"finished sending heaps\\n\");\n\n  for (int i = 0;  i < max_num_mutabilities;  ++i)\n    set_second_chance_cores_for_allocation(i);\n\n  object_table->pre_store_whole_enchillada();\n}\n\n\n// TODO: the implementation of this function breaks abstraction. It should use messages instead using directly the low-level functions\nvoid Memory_System::initialize_helper() {\n  Logical_Core* sender;\n  init_buf* ib = (init_buf*)Message_Queue::buffered_receive_from_anywhere(true, &sender, Logical_Core::my_core());\n  \n  if (Replicate_PThread_Memory_System  ||  Using_Processes)\n    init_values_from_buffer(ib); // not needed with common structure\n\n  if (Using_Processes)\n    map_read_write_and_read_mostly_memory(ib->main_pid, ib->total_read_write_memory_size, ib->total_read_mostly_memory_size);\n  \n  create_my_heaps(ib);\n  \n  sender->message_queue.release_oldest_buffer(ib);\n  \n  Logical_Core::main_core()->message_queue.buffered_send_buffer(&heaps[Logical_Core::my_rank()][read_mostly], sizeof(Multicore_Object_Heap*));\n  Logical_Core::main_core()->message_queue.buffered_send_buffer(&heaps[Logical_Core::my_rank()][read_write ], sizeof(Multicore_Object_Heap*));\n  if (check_many_assertions) lprintf(\"finished sending my heaps\\n\");\n\n  if (!Replicate_PThread_Memory_System && Using_Threads)\n    return;\n  \n  void* heaps_buf = Message_Queue::buffered_receive_from_anywhere(true, &sender, Logical_Core::my_core());\n  \n  memcpy(&heaps, heaps_buf, sizeof(heaps));  \n  sender->message_queue.release_oldest_buffer(heaps_buf);\n\n  // don't need to ilib_mem_invalidate(p, nbytes) other read_mostly heaps because we haven't written anything to them yet\n  for (int i = 0;  i < max_num_mutabilities;  ++i)\n    set_second_chance_cores_for_allocation(i);\n}\n\n\n\nvoid Memory_System::init_values_from_buffer(init_buf* ib) {\n  memory_per_read_write_heap = ib->memory_per_read_write_heap;\n  log_memory_per_read_write_heap = ib->log_memory_per_read_write_heap;\n  memory_per_read_mostly_heap = ib->memory_per_read_mostly_heap;\n  log_memory_per_read_mostly_heap = ib->log_memory_per_read_mostly_heap;\n\n  page_size_used_in_heap = ib->page_size;\n  \n  read_write_memory_base = ib->read_write_memory_base;\n  read_mostly_memory_base = ib->read_mostly_memory_base;\n  object_table = ib->object_table;\n\n  snapshot_window_size.initialize(ib->sws, ib->fsf);\n\n  global_GC_values = ib->global_GC_values;\n}\n\n\n// memory system is private; but heaps is shared\n\nvoid Memory_System::create_my_heaps(init_buf* ib) {\n  const int my_rank = Logical_Core::my_rank();\n\n  Multicore_Object_Heap* h = new Multicore_Object_Heap();\n  h->initialize_multicore( ib->lastHash + my_rank,\n                 &read_write_memory_base[memory_per_read_write_heap * my_rank],\n                 memory_per_read_write_heap,\n                 page_size_used_in_heap,\n                 On_Tilera );\n  heaps[my_rank][read_write] = h;\n\n  h = new Multicore_Object_Heap();\n  h->initialize_multicore(ib->lastHash  +  Logical_Core::group_size + my_rank,\n                          &read_mostly_memory_base[memory_per_read_mostly_heap * my_rank],\n                          memory_per_read_mostly_heap,\n                          page_size_used_in_heap,\n                          false );\n  heaps[my_rank][read_mostly] = h;\n}\n\n\n// three phases (for read-mostly heaps); all machines pre-cohere all heaps, then scan, the all post-cohere\n\n// We used to do each core's heap in parallel, but when we introduced the read-mostly heap\n// went back to serial, because of intercore cache-line invalidation message deadlock worries.\n// xxxxxx I bet we could go back to parallel. -- dmu 4/09\n\nvoid Memory_System::scan_compact_or_make_free_objects_everywhere(bool compacting, Abstract_Mark_Sweep_Collector* gc_or_null) {\n  \n  enforce_coherence_before_each_core_stores_into_its_own_heap();\n  scanCompactOrMakeFreeObjectsMessage_class m(compacting, gc_or_null);\n  m.send_to_all_cores();\n  enforce_coherence_after_each_core_has_stored_into_its_own_heap();\n}\n\n\nvoid Memory_System::scan_compact_or_make_free_objects_here(bool compacting, Abstract_Mark_Sweep_Collector* gc_or_null) {\n  heaps[Logical_Core::my_rank()][read_write ]->scan_compact_or_make_free_objects(compacting, gc_or_null);\n  heaps[Logical_Core::my_rank()][read_mostly]->scan_compact_or_make_free_objects(compacting, gc_or_null);\n}\n\n\n\n\nu_int32 Memory_System::bytesUsed() {\n  u_int32 sum = 0;\n  FOR_ALL_HEAPS(rank, mutability)\n    sum += heaps[rank][mutability]->bytesUsed();\n  return sum;\n}\n\n\nvoid Memory_System::set_second_chance_cores_for_allocation(int mutability) {\n  second_chance_cores_for_allocation[mutability] = -1;\n  int max_bytesLeft = 0;\n  FOR_ALL_RANKS(i) {\n    int bl = heaps[i][mutability]->bytesLeft();\n    if (bl > max_bytesLeft) {\n      max_bytesLeft = bl;\n      second_chance_cores_for_allocation[mutability] = i;\n    }\n  }\n  assert_always(second_chance_cores_for_allocation[mutability] != -1);\n}\n\n\n\nbool Memory_System::shuffle_or_spread(int first, int last,\n                                      bool move_read_write_to_read_mostly,\n                                      bool move_read_mostly_to_read_write,\n                                      bool spread) {\n  Safepoint_for_moving_objects sf(\"shuffle\");\n  Safepoint_Ability sa(false);\n  fullGC(\"shuffle_or_spread\");\n  The_Squeak_Interpreter()->preGCAction_everywhere(false); // false because caches are oop-based, and we just move objs\n  flushFreeContextsMessage_class().send_to_all_cores();\n\n  Object* ends[sizeof(heaps) / sizeof(heaps[0][0])];\n  FOR_ALL_HEAPS(rank, mutability)\n    ends[&heaps[rank][mutability] - &heaps[0][0]] = heaps[rank][mutability]->end_objects();\n\n\n  FOR_ALL_HEAPS(rank, mutability) {\n    Object* first_obj = heaps[rank][mutability]->first_object_or_null();\n    if (first_obj == NULL)\n      continue;\n    if (!shuffle_or_spread_last_part_of_a_heap(first_obj, \n                                               first, last, \n                                               move_read_write_to_read_mostly, \n                                               move_read_mostly_to_read_write, \n                                               spread)) {\n      The_Squeak_Interpreter()->postGCAction_everywhere(false);\n      return false;\n    }\n  }\n  The_Squeak_Interpreter()->postGCAction_everywhere(false);\n  if (spread) {\n    FOR_ALL_RANKS(r)\n      fprintf(stderr, \"%d post spread: %d, %d\\n\", r, heaps[r][read_write]->bytesUsed(), heaps[r][read_mostly]->bytesUsed());\n  }\n  return true;\n}\n\n\nint32 Memory_System::smallest_heap(int mutability) {\n  int result = 0;\n  FOR_ALL_RANKS(rank)\n    if ( heaps[result][mutability]->bytesUsed()  >  heaps[rank][mutability]->bytesUsed() )\n      result = rank;\n  return result;\n}\n\n\n\nbool Memory_System::shuffle_or_spread_last_part_of_a_heap(Object* first_obj,\n                                                                   int first, int last,\n                                                                   bool move_read_write_to_read_mostly,\n                                                                   bool move_read_mostly_to_read_write,\n                                                                   bool spread) {\n  u_int32 old_gcCount = global_GC_values->gcCount; // cannot tolerate GCs, ends gets messed up\n  Multicore_Object_Heap* source_heap = first_obj->my_heap();\n\n  int num_cores = last - first + 1;\n  int j = 0;\n\n  for ( Object* obj = first_obj, *next = NULL;\n     obj != NULL;\n     obj = next ) {\n    next = source_heap->next_object(obj);\n    if (obj >= source_heap->end_objects() )\n      break;\n    else if (obj->isFreeObject())\n      continue;\n    int dst_mutability = !obj->is_suitable_for_replication()  ? read_write  :\n    move_read_write_to_read_mostly       ? read_mostly :\n    move_read_mostly_to_read_write       ? read_write  :\n    obj->mutability();\n    int dst_rank = spread ?  smallest_heap(dst_mutability)  :   j++ % num_cores  +  first;\n    if (u_int32(obj->sizeBits() + 2500)  >  heaps[dst_rank][dst_mutability]->bytesLeft()) {\n      return false;\n    }\n    else {\n      obj->move_to_heap(dst_rank, dst_mutability, false);\n      if (global_GC_values->gcCount != old_gcCount) {\n        break;\n      }\n    }\n  }\n# warning DMU: reset end of heap here if didnt extend the heap\n  return global_GC_values->gcCount == old_gcCount;\n}\n\n\n\n\nbool Memory_System::moveAllToRead_MostlyHeaps() {\n  Safepoint_for_moving_objects sm(\"moveAllToRead_MostlyHeaps\");\n  Safepoint_Ability sa(false);\n\n  flushFreeContextsMessage_class().send_to_all_cores();\n\n  fullGC(\"moveAllToRead_MostlyHeaps\");\n  The_Squeak_Interpreter()->preGCAction_everywhere(false);  // false because caches are oop-based, and we just move objs\n  u_int32 old_gcCount = global_GC_values->gcCount; // cannot tolerate GCs, ends gets messed up\n\n  Timeout_Deferral td;\n\n  FOR_ALL_RANKS(i) {\n    Multicore_Object_Heap* h = heaps[i][read_write];\n    for ( Object* obj = h->first_object_or_null(), *next = NULL;\n         obj != NULL;\n         obj = next ) {\n      next = h->next_object(obj);\n      if (obj->isFreeObject()  ||  !obj->is_suitable_for_replication())\n        continue;\n\n      for (int dst_rank = i, n = 0;\n           n < Logical_Core::group_size;\n           ++n, ++dst_rank, dst_rank %= Logical_Core::group_size)  {\n\n        if (n == Logical_Core::group_size) {\n          lprintf(\"moveAllToRead_MostlyHeaps failing; out of space\\n\", i);\n          return false;\n        }\n\n        if (u_int32(obj->sizeBits() + 32 + heaps[dst_rank][read_mostly]->lowSpaceThreshold)  >  heaps[dst_rank][read_mostly]->bytesLeft())\n          continue;\n\n        obj->move_to_heap(dst_rank, read_mostly, false);\n        if (global_GC_values->gcCount != old_gcCount) {\n          The_Squeak_Interpreter()->postGCAction_everywhere(false);\n          lprintf(\"moveAllToRead_MostlyHeaps failing for core %d; GCed\\n\", i);\n          return false;\n        }\n        break;\n      }\n    }\n    fprintf(stderr, \"finished rank %d\\n\", i);\n  }\n  The_Squeak_Interpreter()->postGCAction_everywhere(false);\n  return true;\n}\n\n\n\n\nstatic const char check_mark[4] = \"sqi\";\n\n\nvoid Memory_System::save_to_checkpoint(FILE* f) {\n  write_mark(f, check_mark);\n\n  int32 len = strlen(image_name);\n  xfwrite(&len, sizeof(len), 1, f);\n  xfwrite(image_name, 1, len,  f);\n\n  xfwrite(&Logical_Core::group_size, sizeof(Logical_Core::group_size), 1, f);\n\n  xfwrite(this, sizeof(*this), 1, f);\n\n  FOR_ALL_HEAPS(rank,mutability)\n    heaps[rank][mutability]->save_to_checkpoint(f);\n\n  object_table->save_to_checkpoint(f);\n}\n\n\nvoid Memory_System::restore_from_checkpoint(FILE* /* f */, int /* dataSize */, int /* lastHash */, int /* savedWindowSize */, int /* fullScreenFlag */) {\n# if true\n  assert_always_msg(false, \"deactivated checkpointing until threadsafe memory_system is ready for Tilera\");\n# else\n\n  lprintf(\"restoring memory system...\\n\");\n  read_mark(f, check_mark);\n\n  int32 len;\n  xfread(&len, sizeof(len), 1, f);\n  char buf[BUFSIZ];\n  if (len >= BUFSIZ-1) fatal(\"\");\n  xfread(buf, 1, len, f);\n  // Squeak_Image_Reader::imageNamePut_on_all_cores(buf, len);\n\n  int32 gs;\n  xfread(&gs, sizeof(gs), 1, f);\n  if (gs != Logical_Core::group_size) fatal(\"group_size mismatch\");\n\n  initialize_from_snapshot(dataSize, savedWindowSize, fullScreenFlag, lastHash);\n\n  Memory_System local_ms;\n\n  xfread(&local_ms, sizeof(local_ms), 1, f);\n\n  tl->growHeadroom = local_ms.growHeadroom;\n  tl->shrinkThreshold = local_ms.shrinkThreshold;\n\n  FOR_ALL_HEAPS(rank,mutability)\n    heaps[rank][mutability]->restore_from_checkpoint(f);\n\n\n  if (tl->read_write_memory_base != local_ms.read_write_memory_base) fatal(\"read_write_memory_base mismatch\");\n  if (tl->read_write_memory_past_end != local_ms.read_write_memory_past_end) fatal(\"memory_past_end mismatch\");\n  if (page_size_used_in_heap != local_ms.page_size_used_in_heap) fatal(\"page_size_used_in_heap mismatch\");\n\n  bcopy(local_ms.second_chance_cores_for_allocation,\n        tl->second_chance_cores_for_allocation,\n        sizeof(second_chance_cores_for_allocation));\n  tl->gcCount = local_ms.gcCount;\n  tl->gcMilliseconds = local_ms.gcMilliseconds;\n  tl->gcCycles = local_ms.gcCycles;\n\n  object_table->restore_from_checkpoint(f);\n\n  finished_adding_objects_from_snapshot();\n# endif\n}\n\n\nvoid Memory_System::invalidate_heaps_and_fence(bool mine_too) {\n  FOR_ALL_RANKS(i)\n    if (mine_too  ||  i != Logical_Core::my_rank())\n      heaps[i][read_mostly]->invalidate_whole_heap();\n  OS_Interface::mem_fence();\n}\n\nvoid Memory_System::enforce_coherence_before_store_into_object_by_interpreter(void* p, int /* nbytes */, Object_p dst_obj_to_be_evacuated) {\n  // to avoid deadlock caused by asking other cores to invalidate lines in the middle of interpreter and not being able to gc when another core asks me,\n  // just move this object to read-write heap afterwards. Don't do enforce_coherence_before_store stuff.\n  assert(contains(p));\n  if (is_address_read_mostly(p))\n    The_Squeak_Interpreter()->remember_to_move_mutated_read_mostly_object(dst_obj_to_be_evacuated->as_oop());\n}\n\n\nvoid Memory_System::pre_cohere(void* start, int nbytes) {\n  if (nbytes == 0)  return;\n  if (The_Squeak_Interpreter()->am_receiving_objects_from_snapshot()) return; // will be done at higher level\n  // lprintf(\"pre_cohere start 0x%x %d\\n\", start, nbytes);\n\n  if (!contains(start) && !object_table->probably_contains(start)) {\n    lprintf(\"pid %d, about_to_write_read_mostly_memory to bad address 0x%x 0x%x\\n\", getpid(), start, nbytes);\n    fatal();\n  }\n  aboutToWriteReadMostlyMemoryMessage_class(start, nbytes).send_to_other_cores();\n\n  // lprintf(\"pre_cohere end\\n\");\n}\n\n\nvoid Memory_System::post_cohere(void* start, int nbytes) {\n  if (nbytes == 0)  return;\n  if (The_Squeak_Interpreter()->am_receiving_objects_from_snapshot()) return; // will be done at higher level\n  // lprintf(post_cohere start 0x%x %d\\n\", start, nbytes);\n  OS_Interface::mem_flush(start, nbytes);\n  OS_Interface::mem_fence();\n  // lprintf(\"post_cohere end\\n\");\n}\n\n\nvoid Memory_System::enforce_coherence_after_this_core_has_stored_into_all_heaps() {\n  FOR_ALL_RANKS(i)\n    heaps[i][read_mostly]->enforce_coherence_in_whole_heap_after_store();\n}\n\n\nvoid Memory_System::do_all_oops_including_roots_here(Oop_Closure* oc, bool sync_with_roots)  {\n  The_Interactions.do_all_roots_here(oc);\n  for (int mutability = 0;  mutability < max_num_mutabilities;  ++mutability)\n    FOR_ALL_RANKS(r)\n      heaps[r][mutability]->do_all_oops(oc);\n  if (sync_with_roots)\n    The_Squeak_Interpreter()->sync_with_roots();\n}\n\n\n\nvoid Memory_System::print() {\n  lprintf(\"Memory_System:n\");\n  lprintf(\"use_huge_pages: %d, min_heap_MB %d, replicate_methods %d, replicate_all %d, memory_per_read_write_heap 0x%x, log_memory_per_read_write_heap %d, , memory_per_read_mostly_heap 0x%x, log_memory_per_read_mostly_heap %d\\n\"\n                  \"read_write_memory_base 0x%x, read_write_memory_past_end 0x%x, read_mostly_memory_base 0x%x, read_mostly_memory_past_end 0x%x, \"\n                  \"page_size_used_in_heap %d, round_robin_period %d, second_chance_cores_for_allocation[read_write] %d, second_chance_cores_for_allocation[read_mostly] %d,\\n\"\n                  \"gcCount %d, gcMilliseconds %d, gcCycles %lld\\n\",\n                  use_huge_pages, min_heap_MB, replicate_methods, replicate_all, memory_per_read_write_heap, log_memory_per_read_write_heap, memory_per_read_mostly_heap, log_memory_per_read_mostly_heap,\n                  read_write_memory_base, read_write_memory_past_end, read_mostly_memory_base, read_mostly_memory_past_end,\n                  page_size_used_in_heap, round_robin_period, second_chance_cores_for_allocation[read_write], second_chance_cores_for_allocation[read_mostly],\n                  global_GC_values->gcCount, global_GC_values->gcMilliseconds, global_GC_values->gcCycles);\n  if ( object_table != NULL)\n    object_table->print();\n\n  print_heaps();\n}\n\n\nvoid Memory_System::print_heaps() {\n  FOR_ALL_HEAPS(rank,mutability) {\n    lprintf(\"heap %d, %d:\\n\", rank, mutability);\n    heaps[rank][mutability]->print(stdout);\n  }\n}\n\n\n# define DEF_SEC(T) \\\nvoid Memory_System::store_enforcing_coherence(T* p, T x, Object_p dst_obj_to_be_evacuated_or_null) { \\\n  if (sizeof(T) == bytes_per_oop) { DEBUG_STORE_CHECK((oop_int_t*)(p), (oop_int_t)(x)); } \\\n  assert(contains(p)); \\\n  if (is_address_read_write(p)) { *p = x; return; } \\\n  assert(!Safepoint_Ability::is_interpreter_able()); \\\n  if (*p == x) return; \\\n  pre_cohere(p, sizeof(x));  \\\n  *p = x;  \\\n  post_cohere(p, sizeof(x)); \\\n    if (dst_obj_to_be_evacuated_or_null) \\\n    The_Squeak_Interpreter()->remember_to_move_mutated_read_mostly_object(dst_obj_to_be_evacuated_or_null->as_oop()); \\\n}\n\n\nFOR_ALL_STORE_ENFORCING_COHERENCE_FUNCTIONS(DEF_SEC)\n\n\nvoid Memory_System::store_bytes_enforcing_coherence(void* dst, const void* src, int nbytes,   Object_p dst_obj_to_be_evacuated_or_null) {\n  assert(contains(dst));\n  \n  DEBUG_MULTIMOVE_CHECK(dst, src, nbytes / bytes_per_oop);\n  \n  if (is_address_read_write(dst)) {     memmove(dst, src, nbytes);  return; }\n\n  if (!Safepoint_Ability::is_interpreter_able())  memmove(dst, src, nbytes);\n  else {\n    pre_cohere(dst, nbytes);\n    memmove(dst, src, nbytes);\n    post_cohere(dst, nbytes);\n  }\n  if (dst_obj_to_be_evacuated_or_null != NULL)\n    The_Squeak_Interpreter()->remember_to_move_mutated_read_mostly_object(dst_obj_to_be_evacuated_or_null->as_oop());\n}\n\n\nvoid Memory_System::store_2_enforcing_coherence(int32* p1, int32 i1, int32 i2,  Object_p dst_obj_to_be_evacuated_or_null) {\n  assert(contains(p1));\n  DEBUG_STORE_CHECK(p1, i1);\n  DEBUG_STORE_CHECK(&p1[1], i2);\n  if (is_address_read_write(p1)) { *p1 = i1; p1[1] = i2; return; }\n  if (*p1 == i1  &&  p1[1] == i2)  return;\n\n  if (!Safepoint_Ability::is_interpreter_able())   { *p1 = i1;  p1[1] = i2;  }\n  else {\n    pre_cohere(p1, 2 * sizeof(i1));\n     *p1 = i1;  p1[1] = i2;;\n    post_cohere(p1, 2 * sizeof(i1));\n  }\n  if (dst_obj_to_be_evacuated_or_null != NULL)\n    The_Squeak_Interpreter()->remember_to_move_mutated_read_mostly_object(dst_obj_to_be_evacuated_or_null->as_oop());\n}\n\nint Memory_System::assign_rank_for_snapshot_object() {\n  return round_robin_rank();\n}\n"
  },
  {
    "path": "vm/src/heap/memory_system.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n/**\n * The Memory_System manages the heap structure that is used for Smalltalk\n * objects.\n *\n * The heap is allocated per core and the memory of each core is divided\n * into a read-mostly and a read-write part.\n *\n * \n * Conceptual Structure\n * --------------------\n *   TODO: add something about the object table\n *   A typical structure in memory could look like this:\n *\n *     +-----------------+-----------------+\n *     |   read-mostly   |   read-write    |\n *     +----+----+----+--+----+----+----+--+\n *     | c1 | c2 | c3 |..| c1 | c2 | c3 |..|\n *     +----+----+----+--+----+----+----+--+\n *     0                n/2                n\n *\n * Implementation Structure\n * ------------------------\n *\n * The heap is allocated with mmap in two parts but at consecutive addesses.\n * The first region is allocated for the read-mostly heap, and\n * the second region is allocated for the read-write heap.\n * See Memory_System::map_read_write_and_read_mostly_memory.\n *\n * The memory allocation is done on the main core and all other cores\n * receive the base address via a message to map the same memory regions\n * into the same addresses.\n * For thread-based systems, this is only done on the main core, and the other\n * cores do not need to map in any memory.\n *\n * A temporary file is used to ensure that all cores are working on the same\n * memory.\n */\nclass Memory_System {\n\nprivate:\n  char* image_name;\n\npublic:\n  static const int max_num_mutabilities = 2;\n  static const int read_mostly = 0;\n  static const int read_write = 1;\n  Multicore_Object_Heap* heaps[Max_Number_Of_Cores][max_num_mutabilities];\n\nprivate:\n  static const size_t normal_page_size =       PAGE_SIZE;\n  static const size_t   huge_page_size = LARGE_PAGE_SIZE;\n\n  // On the Tilera it might be necessary to specifiy the number of required\n  // huge pages at boot time to use the use_huge_pages flag (hugepages=56)\npublic:\n  static bool use_huge_pages;   // threadsafe readonly config value\n  static size_t min_heap_MB;      // threadsafe readonly\n  static bool replicate_methods;// threadsafe readonly\n  static bool replicate_all;    // threadsafe readonly\n  static bool OS_mmaps_up;      // threadsafe readonly\n\nprivate:\n  static u_int32 memory_per_read_write_heap; // threadsafe readonly, will always be power of two\n  static u_int32 memory_per_read_mostly_heap; // threadsafe readonly, will always be power of two\n  static u_int32 log_memory_per_read_write_heap;  // threadsafe readonly\n  static u_int32 log_memory_per_read_mostly_heap; // threadsafe readonly\n\n  char * read_write_memory_base,   * read_write_memory_past_end;\n  char * read_mostly_memory_base,  * read_mostly_memory_past_end;\n\n  struct global_GC_values {\n    int32 growHeadroom;\n    int32 shrinkThreshold;\n    u_int32 gcCount, gcMilliseconds;\n    u_int64 gcCycles;\n    u_int32 mutator_start_time, last_gc_ms, inter_gc_ms;\n  };\n  struct global_GC_values* global_GC_values;\n\n  int second_chance_cores_for_allocation[max_num_mutabilities];  // made threadsafe to increase the reliability of the value\n\n  size_t page_size_used_in_heap;\n\n  static int round_robin_period;\n\n\n\n\npublic:\n  Memory_System();\n\n  class Snapshot_Window_Size {\n    int32 _fullScreenFlag;\n    int32 _savedWindowSize;\n  public:\n    void initialize(int32 sws, int32 fsf) {\n      _savedWindowSize = sws;\n      _fullScreenFlag = fsf;\n    }\n    int32 fullScreenFlag() { return _fullScreenFlag; }\n    int32 savedWindowSize() { return _savedWindowSize; }\n    void fullScreenFlag(int32 fsf) { _fullScreenFlag = fsf; }\n    void savedWindowSize(int32 sws) { _savedWindowSize = sws; }\n  } snapshot_window_size;     // threadsafe readonly\n\n  struct init_buf {\n    int32 snapshot_bytes, sws, fsf, lastHash;\n    char* read_mostly_memory_base;\n    char* read_write_memory_base;\n    u_int32 total_read_write_memory_size;\n    u_int32 memory_per_read_write_heap;\n    u_int32 log_memory_per_read_write_heap;\n    u_int32 total_read_mostly_memory_size;\n    u_int32 memory_per_read_mostly_heap;\n    u_int32 log_memory_per_read_mostly_heap;\n    int32 page_size;\n    int32 main_pid;\n    Multicore_Object_Table* object_table;\n    struct global_GC_values* global_GC_values;\n  };\n\n\n  Multicore_Object_Table* object_table;   // threadsafe readonly\n\n\n\n  void initialize_from_snapshot(int32 snapshot_bytes, int32 sws, int32 fsf, int32 lastHash);\n  inline Object* allocate_chunk_on_this_core_for_object_in_snapshot(Multicore_Object_Heap*, Object*);\n\n  void finished_adding_objects_from_snapshot();\n  static void set_round_robin_period(int x) { round_robin_period = x; }\n\n\n  void compute_snapshot_offsets(u_int32 *offsets);\n  \n \n  int32 adjust_for_snapshot(void* addr, u_int32* address_offsets) const {\n    return (int32)addr - address_offsets[&heaps[rank_for_address(addr)][mutability_for_address(addr)] - &heaps[0][0]];\n  }\n\n\nprivate:\n  void set_page_size_used_in_heap();\n  int calculate_total_read_write_pages(int);\n  int calculate_total_read_mostly_pages(int);\n  int calculate_bytes_per_read_mostly_heap(int);\n  bool ask_Linux_for_huge_pages(int);\n  int how_many_huge_pages();\n  void request_huge_pages(int);\n\n  void map_read_write_and_read_mostly_memory(int pid, size_t, size_t);\n  void map_heap_memory_separately(int pid, size_t grand_total,\n                                  size_t inco_size, size_t co_size);\n  void map_heap_memory_in_one_request(int pid, size_t grand_total,\n                                      size_t inco_size, size_t co_size);\n\n\n  \n  void set_second_chance_cores_for_allocation(int);\n\npublic:\n\n  void initialize_main(init_buf*);\n  void initialize_helper();\n\n  void create_my_heaps(init_buf*);\n  void init_values_from_buffer(init_buf*);\n\n\n  void ask_cpu_core_to_add_object_from_snapshot_allocating_chunk(Oop dst_oop, Object* src_obj_wo_preheader) {\n    int rank = object_table->rank_for_adding_object_from_snapshot(dst_oop);\n    Object_p dst_obj = (Object_p)The_Interactions.add_object_from_snapshot_allocating_chunk(rank, dst_oop, src_obj_wo_preheader);\n    object_table->set_object_for(dst_oop, dst_obj  COMMA_FALSE_OR_NOTHING);\n  }\n\n\n  Object* add_object_from_snapshot_to_a_local_heap_allocating_chunk(Oop dst_oop, Object* src_obj_wo_preheader) {\n    Multicore_Object_Heap* h = local_heap_for_snapshot_object(src_obj_wo_preheader);\n    Object* dst_obj = allocate_chunk_on_this_core_for_object_in_snapshot(h, src_obj_wo_preheader);\n    if (check_many_assertions) assert(((u_int32)dst_obj & (sizeof(Oop) - 1)) == 0);\n    h->add_object_from_snapshot(dst_oop, dst_obj, src_obj_wo_preheader);\n    return dst_obj;\n  }\n\nprivate:\n\n  Multicore_Object_Heap* local_heap_for_snapshot_object(Object* src_obj_wo_preheader) {\n    return heaps[Logical_Core::my_rank()][src_obj_wo_preheader->mutability_for_snapshot_object()];\n  }\n\npublic:\n\n  int round_robin_rank();\n  int assign_rank_for_snapshot_object();\n\n \n  bool contains(void* p) const {\n    return read_mostly_memory_base <= (char*)p  &&  (char*)p < read_write_memory_past_end;\n  }\n  \n  int mutability_for_address(void* p) const {\n    // compiler bug:\n    static const int c = read_write;\n    static const int i = read_mostly;\n    return is_address_read_write(p) ? c : i;\n  }\n  \n  int rank_for_address(void* p) const {\n    bool is_rw = is_address_read_write(p);\n    u_int32 delta  = (char*)p - (is_rw ? read_write_memory_base : read_mostly_memory_base);\n    u_int32 result = delta >> (is_rw ? log_memory_per_read_write_heap : log_memory_per_read_mostly_heap);\n    assert(result ==  delta / (is_rw ? memory_per_read_write_heap : memory_per_read_mostly_heap));\n    assert(result < (u_int32)Logical_Core::group_size);\n    return (int)result;\n  }\n\n  Multicore_Object_Heap* heap_containing(void* obj) {\n    return heaps[rank_for_address(obj)][mutability_for_address(obj)];\n  }\n\n\n\n\n\n  Object*  object_for_unchecked(Oop x) {\n    Object* r = object_table->object_for(x);\n    assert(!object_table->probably_contains(r));\n    return r;\n  }\n\n\n  Object*  object_for(Oop x) {\n    return object_table->object_for(x);\n  }\n\n\n\n  Logical_Core* coreWithSufficientSpaceToAllocate(oop_int_t bytes, int);\n  bool sufficientSpaceAfterGC(oop_int_t, int);\n\n  void scan_compact_or_make_free_objects_everywhere(bool compacting, Abstract_Mark_Sweep_Collector*);\n  void scan_compact_or_make_free_objects_here(bool compacting, Abstract_Mark_Sweep_Collector*);\n  u_int32 bytesLeft();\n  u_int32 maxContiguousBytesLeft();\n\n  void set_lowSpaceThreshold(int32);\n\n  int32 get_lowSpaceThreshold()  {\n    return heaps[Logical_Core::my_rank()][read_write]->get_lowSpaceThreshold();\n  }\n\n  void set_growHeadroom(int32 h) { global_GC_values->growHeadroom = h; }\n  void set_shrinkThreshold(int32 s) { global_GC_values->shrinkThreshold = s; }\n  int32 get_growHeadroom() { return global_GC_values->growHeadroom; }\n  int32 get_shrinkThreshold() { return global_GC_values->shrinkThreshold; }\n\n  void fullGC(const char*);\n  void incrementalGC() {  if (check_assertions) lprintf(\"no incremental GC\\n\"); }\n  void finalize_weak_arrays_since_we_dont_do_incrementalGC();\n\n  bool become_with_twoWay_copyHash(Oop, Oop, bool, bool);\nprotected:\n  void swapOTEs(Oop* o1, Oop* o2, int len);\n  void level_out_heaps_if_needed();\npublic:\n\n  Oop initialInstanceOf(Oop);\n  Oop nextInstanceAfter(Oop);\n\n  Oop firstAccessibleObject();\n  Oop nextObject(Oop obj);\n\n\n  void handle_low_space_signals();\n\n\n  void  imageNamePut_on_this_core(const char*, int);\n  void  imageNameGet(Object_p, int);\n  int   imageNameSize();\n  char* imageName();\n\n  void flushExternalPrimitives();\n\n  void snapshotCleanUp();\n  void writeImageFile(char*);\nprivate:\n  void writeImageFileIO(char* image_name);\n  void write_snapshot_header(FILE*, u_int32*);\n  int32 max_lastHash();\n\n\npublic:\n\n  void putLong(int32 x, FILE* f);\n\npublic:\n\n  u_int32 bytesUsed();\n  bool shuffle_or_spread(int, int, bool, bool, bool);\n  bool shuffle_or_spread_last_part_of_a_heap(Object*, int, int, bool, bool, bool);\nprivate:\n  Multicore_Object_Heap* biggest_heap();\n  int32 smallest_heap(int mutability);\npublic:\n  bool moveAllToRead_MostlyHeaps();\n\n\n  Oop get_stats(int);\n\n  bool verify_if(bool);\n  bool verify() { return verify_if(true); }\n\n  void save_to_checkpoint(FILE*);\n  void restore_from_checkpoint(FILE*, int dataSize, int lastHash, int savedWindowSize, int fullScreenFlag);\n\n  // Cannot accept GC requests, defers to next BC boundary\n  void enforce_coherence_before_store_into_object_by_interpreter(void* p, int nbytes, Object_p dst_obj_to_be_evacuated);\n\n  // OK to accept GC requests, so don't use inside of interpreter\n  void  enforce_coherence_before_store(void* p, int nbytes) {\n    assert(contains(p));\n    if (is_address_read_mostly(p))  pre_cohere(p, nbytes);\n  }\n  \n  void enforce_coherence_after_store_into_object_by_interpreter(void* /* p */, int /* nbytes */) {}\n  \n  void enforce_coherence_after_store(void* p, int nbytes)  {\n    assert(contains(p));\n    if (is_address_read_mostly(p)) post_cohere(p, nbytes);\n  }\n\n  void store_enforcing_coherence(Oop* p, Oop x, Object_p dst_obj_to_be_evacuated_or_null) {\n    assert(contains(p));\n    store_enforcing_coherence((oop_int_t*)p, x.bits(), dst_obj_to_be_evacuated_or_null);\n  }\n  // used when p may be either in the heap or in a C++ structure\n  void store_enforcing_coherence_if_in_heap(Oop* p, Oop x, Object_p dst_obj_to_be_evacuated_or_null) {\n    if (contains(p))\n      store_enforcing_coherence((oop_int_t*)p, x.bits(), dst_obj_to_be_evacuated_or_null);\n    else *p = x;\n  }\n\n  void store_2_enforcing_coherence(int32* p1, int32 i1, int32 i2,  Object_p dst_obj_to_be_evacuated_or_null);\n\n# define FOR_ALL_STORE_ENFORCING_COHERENCE_FUNCTIONS(template) \\\n    template(oop_int_t) \\\n    template(Object*) \\\n    template(int16) \\\n    template(char) \\\n    template(u_char)\n\n# define DCL_SEC(T) void store_enforcing_coherence(T* p, T x, Object_p dst_obj_to_be_evacuated_or_null);\n  FOR_ALL_STORE_ENFORCING_COHERENCE_FUNCTIONS(DCL_SEC)\n# undef DCL_SEC\n\n  void store_bytes_enforcing_coherence(void* dst, const void* src, int nbytes,   Object_p dst_obj_to_be_evacuated_or_null);\n\n  void  pre_cohere_object_table(void* p, int sz) {  pre_cohere(p, sz); }\n  void post_cohere_object_table(void* p, int sz) { post_cohere(p, sz); }\n\n  void pre_cohere(void*, int);\n  void post_cohere(void*, int);\n\n  void enforce_coherence_before_this_core_stores_into_all_heaps();\n  void enforce_coherence_after_this_core_has_stored_into_all_heaps();\n\n  void enforce_coherence_before_each_core_stores_into_its_own_heap();\n  void enforce_coherence_after_each_core_has_stored_into_its_own_heap();\n  void invalidate_heaps_and_fence(bool);\n\n\n  void print_heaps();\n  void print();\n\n  inline bool is_address_read_mostly(void* p) const {\n    // don't use read_mostly_heap->contains(p) because that is slower, as it tests the bottom before the top\n    // in the common case, p is in the read_write heap, which is above the read_mostly one.\n    return (char*)p < read_mostly_memory_past_end;\n  }\n  inline bool is_address_read_write(void* p) const { return !is_address_read_mostly(p); }\n\n  void do_all_oops_including_roots_here(Oop_Closure* oc, bool sync_with_roots);\n};\n\n"
  },
  {
    "path": "vm/src/heap/memory_system.inline.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\ninline void Memory_System::putLong(int32 x, FILE* f) {\n  if (The_Squeak_Interpreter()->successFlag) {\n    if (fwrite(&x, sizeof(x), 1, f) != 1) {\n      perror(\"write: \");\n      The_Squeak_Interpreter()->primitiveFail();\n    }\n  }\n}\n\n\ninline Object* Memory_System::allocate_chunk_on_this_core_for_object_in_snapshot(Multicore_Object_Heap* h, Object* src_obj_wo_preheader) {\n  Chunk* c = h->allocateChunk(src_obj_wo_preheader->total_byte_size());\n  Object* obj = (Object*)&((char*)c)[src_obj_wo_preheader->extra_header_bytes()];\n  return obj;\n}\n\n"
  },
  {
    "path": "vm/src/heap/multicore_object_heap.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\n\nvoid* Multicore_Object_Heap::operator new(size_t size) {\n  return Memory_Semantics::shared_calloc(1, size);\n}\n\n\nvoid Multicore_Object_Heap::initialize_multicore(int hash, char* mem, int size, int page_size, bool do_homing) {\n  Abstract_Object_Heap::initialize(mem,size);\n  lastHash = hash;\n  if (do_homing  &&  Logical_Core::group_size > 1)\n    home_to_this_tile(page_size);\n}\n\nvoid Multicore_Object_Heap::home_to_this_tile(int page_size) {\n  for (char* p = (char*)_start;  p < (char*)_end;  p += page_size)\n    *p = '\\xff';\n  if (!The_Squeak_Interpreter()->use_checkpoint()) // save time\n    verify_homing(page_size);\n}\n\nint a_global;\n\nbool Multicore_Object_Heap::verify_homing(int page_size) {\n  // lprintf(\"beginning homing test...\\n\");\n  OS_Interface::get_cycle_count_quickly_t baseline = 1000000;\n  OS_Interface::get_cycle_count_quickly_t min_read_time = 1000000, max_read_time = 0;\n  int min_time_page = -1, max_time_page = -1;\n  const int N = 10;\n  for (int i = 0;  i < N;  ++i) {\n    OS_Interface::get_cycle_count_quickly_t start = GET_CYCLE_COUNT_QUICKLY();\n    a_global = i;\n    OS_Interface::get_cycle_count_quickly_t end = GET_CYCLE_COUNT_QUICKLY();\n    OS_Interface::get_cycle_count_quickly_t d = end - start;\n    if (d > 0  &&  d  <  baseline)  baseline = d;\n  }\n  for (char* p = (char*)_start;  p < (char*)_end;  p += page_size) {\n    OS_Interface::get_cycle_count_quickly_t min_this_page = 10000;\n    for (int i = 0;  i < N;  i++) {\n      OS_Interface::get_cycle_count_quickly_t start = GET_CYCLE_COUNT_QUICKLY();\n      a_global = *p;\n      OS_Interface::get_cycle_count_quickly_t end = GET_CYCLE_COUNT_QUICKLY();\n      OS_Interface::get_cycle_count_quickly_t d = end - start;\n      if (d > 1000)  continue;\n      if (d < min_this_page) min_this_page = d;\n    }\n    if (min_this_page  <  min_read_time)  { min_read_time = min_this_page;  min_time_page = (p - (char*)_start) / page_size; }\n    if (min_this_page  >  max_read_time)  { max_read_time = min_this_page;  max_time_page = (p - (char*)_start) / page_size; }\n  }\n  min_read_time -= baseline;  max_read_time -= baseline;\n  // lprintf(\"finishing homing test...\\n\");\n  if (max_read_time <= 5  ||  /* might be neg, but is unsigned*/ max_read_time + 10  <=  10)\n    return true;\n  lprintf(\"read_time = \" GET_CYCLE_COUNT_QUICKLY_FMT \"(page %d)-\" GET_CYCLE_COUNT_QUICKLY_FMT \"(page %d)\\n\",\n          min_read_time, min_time_page, max_read_time, max_time_page);\n  fatal(\"homing\");\n  return false;\n}\n\n\nvoid Multicore_Object_Heap::add_object_from_snapshot(Oop dst_oop, Object* dst_obj, Object* src_obj_wo_preheader) {\n  int extra_header_oops_wo_preheader = src_obj_wo_preheader->extra_header_oops_without_preheader();\n  Oop* dst_chunk_wo_preheader = &dst_obj         ->as_oop_p()[-extra_header_oops_wo_preheader];\n  Oop* src_chunk_wo_preheader = &src_obj_wo_preheader->as_oop_p()[-extra_header_oops_wo_preheader];\n\n  int total_src_bytes = src_obj_wo_preheader->total_byte_size_without_preheader();\n\n\n  // avoid store barrier; do it in caller:\n  IMAGE_READING_DEBUG_MULTIMOVE_CHECK(dst_chunk_wo_preheader, src_chunk_wo_preheader, total_src_bytes / bytes_per_oop);\n  memcpy(dst_chunk_wo_preheader,  src_chunk_wo_preheader,  total_src_bytes);\n  // beRootIfOld -- What to do about old-young barrier?\n\n  dst_obj->set_preheader(dst_oop); // now that baseHeader is set, can do this\n}\n\n\n\n\nvoid Multicore_Object_Heap::flushExternalPrimitives() {\n  FOR_EACH_OBJECT_IN_HEAP(this, oop) {\n    if (!oop->isFreeObject()\n        &&   oop->isCompiledMethod()\n        &&   oop->primitiveIndex() == Squeak_Interpreter::PrimitiveExternalCallIndex)\n      oop->flushExternalPrimitive();\n  }\n}\n\n\nvoid Multicore_Object_Heap::handle_low_space_signal() {\n  if (The_Squeak_Interpreter()->signalLowSpace())  {\n    The_Squeak_Interpreter()->set_signalLowSpace(false);\n    The_Squeak_Interpreter()->signalSema(Special_Indices::TheLowSpaceSemaphore, \"handle_low_space_signal\");\n  }\n}\n\n\n\nOop Multicore_Object_Heap::next_instance_of_after(Oop klass, Oop x) {\n  for (Object* r = x.as_untracked_object_ptr();  ;  ) {\n    r = accessibleObjectAfter(r);\n    if (r == NULL)\n      return The_Squeak_Interpreter()->roots.nilObj;\n    if (r->fetchClass() == klass)\n      return r->as_oop();\n  }\n}\n\n\n\nvoid Multicore_Object_Heap::snapshotCleanUp() {\n  FOR_EACH_OBJECT_IN_HEAP(this, obj) {\n    if (obj->isFreeObject())\n      continue;\n    if (Object::Format::might_be_context(obj->format()) && obj->hasContextHeader()) {\n      int bytes_to_last_pointer = obj->lastPointer();\n      int bytes_to_pointer_after_last = bytes_to_last_pointer + sizeof(Oop);\n      int total_bytes = obj->sizeBits();\n      int oops_to_zap = (total_bytes - bytes_to_pointer_after_last) >> ShiftForWord;\n      Oop* zap_start = obj->as_oop_p() + (bytes_to_pointer_after_last >> ShiftForWord);\n      assert(The_Memory_System()->contains(zap_start));\n      oopset_no_store_check(\n                            zap_start,\n                            The_Squeak_Interpreter()->roots.nilObj,\n                            oops_to_zap);\n    }\n    else if (Object::Format::isCompiledMethod(obj->format())\n             &&  obj->primitiveIndex() == Squeak_Interpreter::PrimitiveExternalCallIndex)\n      obj->flushExternalPrimitive();\n  }\n}\n\n\n\nvoid Multicore_Object_Heap::write_image_file(FILE* f, u_int32* address_offsets, bool& is_first_object) {\n  \n\n  const oop_int_t preheader_placeholder = Object::make_free_object_header(preheader_byte_size);\n  __attribute__((unused)) Object* last_obj = NULL; // debugging aid\n  \n  // Squeak 64-bit VM bug workaround\n  // 64-bit Squeak VM starts oops at zero and uses squeakMemoryBase\n  // But it uses nil tests in for firstFree and freeChunk in the sweep phase\n  // If after it does a GC, the first word is free, \"sweepPhase\" fails!!! -- dmu 6/13/10\n  // So, we need to not output those first free words. Since our snapshot just did a GC, this should be only the preheader. -- dmu 6/10\n  \n  \n  FOR_EACH_OBJECT_IN_HEAP(this, obj) {\n    if (obj->isFreeObject()) {\n      assert_always_msg(!is_first_object, \"first object must not be free to work with Squeak 64 bit VM\"); // Squeak 64-bit VM bug workaround\n      int bytes = obj->sizeOfFree();\n      oop_int_t* p = obj->as_oop_int_p();\n      for (int i = 0;  i < bytes;  i += sizeof(int32))\n        The_Memory_System()->putLong(*p++, f);\n      last_obj = obj;\n      continue;\n    }\n\n    assert(sizeof(long) == sizeof(Oop));\n    if (preheader_oop_size  &&  !is_first_object /* see long comment above */) { // Squeak 64-bit VM bug workaround\n      The_Memory_System()->putLong(preheader_placeholder, f);\n      for (int i = 1;  i  <  preheader_oop_size;  ++i)\n        The_Memory_System()->putLong(Oop::Illegals::free_extra_preheader_words, f);\n    }\n\n    if (obj->contains_sizeHeader())\n      The_Memory_System()->putLong(obj->sizeHeader(), f);\n\n    if (obj->contains_class_and_type_word())\n      The_Memory_System()->putLong(\n              Header_Type::extract_from( obj->class_and_type_word() )\n              |  Header_Type::without_type( The_Memory_System()->adjust_for_snapshot(obj->get_class_oop().as_object(), address_offsets) ),\n              f);\n    The_Memory_System()->putLong(obj->baseHeader, f);\n\n    oop_int_t* p;\n    for ( p = &obj->baseHeader + 1;\n         (Oop*)p <= obj->last_pointer_addr();\n         ++p ) {\n       Oop oop = *(Oop*)p;\n       The_Memory_System()->putLong( oop.is_int()\n            ? oop.bits()\n            : The_Memory_System()->adjust_for_snapshot(oop.as_object(), address_offsets),  f);\n    }\n    for (Chunk* next = obj->nextChunk();  p < (oop_int_t*)next;  The_Memory_System()->putLong(*p++, f))\n      ; // bytes\n    last_obj = obj;\n    \n    is_first_object = false;\n  }\n}\n\nOop Multicore_Object_Heap::get_stats() {\n  int s = The_Squeak_Interpreter()->makeArrayStart();\n  PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(bytesUsed());\n  PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(bytesLeft());\n  PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(allocationsSinceLastQuery);\n  PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(compactionsSinceLastQuery);\n  allocationsSinceLastQuery = compactionsSinceLastQuery = 0;\n  return The_Squeak_Interpreter()->makeArray(s);\n}\n\n\nstatic const char check_mark[4] = \"moh\";\n\n\nvoid Multicore_Object_Heap::save_to_checkpoint(FILE* f) {\n  write_mark(f, check_mark);\n  xfwrite(this, sizeof(*this), 1, f);\n  xfwrite(_start, sizeof(*_start), _next - _start, f);\n}\n\nvoid Multicore_Object_Heap::restore_from_checkpoint(FILE* f) {\n  lprintf( \"restoring a heap...\\n\");\n  read_mark(f, check_mark);\n\n  Multicore_Object_Heap lcl;\n  xfread(&lcl, sizeof(lcl), 1, f);\n\n  lastHash = lcl.lastHash;\n  if (_start != lcl._start) fatal(\"_start mismatch\");\n  _next = lcl._next;\n  if (_end != lcl._end) fatal(\"_end mismatch\");\n  xfread(_start, sizeof(*_start), lcl._next - lcl._start, f);\n\n  allocationsSinceLastQuery = lcl.allocationsSinceLastQuery;\n  compactionsSinceLastQuery = lcl.compactionsSinceLastQuery;\n  lowSpaceThreshold = lcl.lowSpaceThreshold;\n}\n\n\nvoid Multicore_Object_Heap::print(FILE* f) {\n  Abstract_Object_Heap::print(f);\n}\n\n"
  },
  {
    "path": "vm/src/heap/multicore_object_heap.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Multicore_Object_Heap: public Abstract_Object_Heap {\n  int lastHash;\n\n  public:\n  void* operator new(size_t size);\n\n  void initialize_multicore(int hash, char* mem, int size, int page_size, bool do_homing);\n  private:\n  void home_to_this_tile(int);\n  bool verify_homing(int);\n  public:\n\n  int heap_byte_size() { fatal(\"innapropriate\"); return -1; }\n  void* allocate_my_space(int) { fatal(\"innapropriate\"); return NULL; }\n\n  inline int32 newObjectHash();\n  void set_lastHash(int x) { lastHash = x; }\n  int  get_lastHash() { return lastHash; }\n  inline Object_p allocate(oop_int_t byteSize, oop_int_t hdrSize,\n                          oop_int_t baseHeader, Oop classOop, oop_int_t extendedSize, bool doFill = false,\n                          bool fillWithNill = false);\n  inline Chunk* allocateChunk_for_a_new_object(oop_int_t total_bytes);\n  inline Chunk* allocateChunk_for_a_new_object_and_safepoint_if_needed(int total_bytes);\n\n  void add_object_from_snapshot(Oop, Object*, Object*);\n  void flushExternalPrimitives();\n  void handle_low_space_signal();\n\n\n\n  Oop next_instance_of_after(Oop, Oop);\n\n  void snapshotCleanUp();\n  void write_image_file(FILE*, u_int32*, bool&);\n\n  Object_p object_address_unchecked(Oop);\n\n  void set_lowSpaceThreshold(int x) { lowSpaceThreshold = x; }\n  int32 get_lowSpaceThreshold()  { return lowSpaceThreshold; }\n\n  Oop get_stats();\n\n  void save_to_checkpoint(FILE* f);\n  void restore_from_checkpoint(FILE* f);\n\n  // Unlike check_store, etc., this is used for the inchorent heap, so even integer oops matter\n  // See memory_system declarations of store_enforcing_coherence\n  inline void      store_enforcing_coherence(Oop* p, Oop x, Object_p dst_obj_to_be_evacuated_or_null);\n  inline void      store_enforcing_coherence(oop_int_t*, oop_int_t, Object_p dst_obj_to_be_evacuated_or_null);\n  inline void      store_bytes_enforcing_coherence(void*, const void*, int, Object_p dst_obj_to_be_evacuated_or_null);\n\n  void print(FILE*);\n\n\n};\n\n"
  },
  {
    "path": "vm/src/heap/multicore_object_heap.inline.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\ninline void Multicore_Object_Heap::store_enforcing_coherence(oop_int_t* p, oop_int_t x, Object_p dst_obj_to_be_evacuated_or_null) {\n  if (is_read_write()) {\n    DEBUG_STORE_CHECK(p, x);\n    *p = x;\n  }\n  else The_Memory_System()->store_enforcing_coherence(p, x, dst_obj_to_be_evacuated_or_null);\n}\n\ninline void Multicore_Object_Heap::store_enforcing_coherence(Oop* p, Oop x, Object_p dst_obj_to_be_evacuated_or_null) {\n  store_enforcing_coherence((oop_int_t*)p, x.bits(), dst_obj_to_be_evacuated_or_null);\n}\n\ninline void Multicore_Object_Heap::store_bytes_enforcing_coherence(void* dst, const void* src, int nbytes, Object_p dst_obj_to_be_evacuated_or_null) {\n  if (is_read_write())  {\n    DEBUG_MULTIMOVE_CHECK( dst, src, nbytes / bytes_per_oop);\n    memmove(dst, src, nbytes);\n  }\n  else The_Memory_System()->store_bytes_enforcing_coherence(dst, src, nbytes, dst_obj_to_be_evacuated_or_null);\n}\n\n\n\ninline Object_p Multicore_Object_Heap::allocate(oop_int_t byteSize, oop_int_t hdrSize,\n                 oop_int_t baseHeader, Oop classOop, oop_int_t extendedSize,\n                 bool doFill,\n                 bool fillWithNil) {\n\n  /* \"Allocate a new object of the given size and number of header words.\n      (Note: byteSize already includes space for the base header word.)\n      Initialize the header fields of the new object and fill the remainder of\n      the object with the given value.\n      \n      May cause a GC\" */\n\n  // \"remap classOop in case GC happens during allocation\"\n  if (hdrSize > 1) The_Squeak_Interpreter()->pushRemappableOop(classOop);\n  oop_int_t hdrSize_with_preheader = hdrSize + preheader_oop_size ;\n  int total_bytes = byteSize  +  (hdrSize_with_preheader - 1) * bytesPerWord;\n  \n  Object* chunk = (Object*)allocateChunk_for_a_new_object_and_safepoint_if_needed(total_bytes);\n  \n  Safepoint_Ability sa(false); // from here on, no GCs!\n  \n  Oop remappedClassOop = hdrSize > 1  ?  The_Squeak_Interpreter()->popRemappableOop() : Oop::from_int(0);\n  Chunk* saved_next = !check_assertions ? NULL : (Chunk*) chunk->my_heap()->end_objects();\n  Object_p newObj = chunk->fill_in_after_allocate(byteSize, hdrSize, baseHeader,\n                                                 remappedClassOop, extendedSize, doFill, fillWithNil);\n  assert_eq(newObj->nextChunk(), saved_next, \"allocate bug: did not set header of new oop correctly\");\n  \n\n  return newObj;\n}\n\n\ninline Chunk* Multicore_Object_Heap::allocateChunk_for_a_new_object_and_safepoint_if_needed(int total_bytes) {\n  Safepoint_for_moving_objects* sp = NULL;\n  if (The_Memory_System()->rank_for_address(_next) != Logical_Core::my_rank()) \n    sp = new Safepoint_for_moving_objects(\"inter-core allocate\");\n\n  Chunk* chunk = allocateChunk_for_a_new_object(total_bytes);\n  \n  if (sp != NULL) \n    delete sp;\n\n  return chunk;\n}\n\n\ninline Chunk* Multicore_Object_Heap::allocateChunk_for_a_new_object(oop_int_t total_bytes) {\n  // Since interpreter EXPECTS GC at this point (only if the SafepointAbility is able),\n  // can flush objects from local to global heap,\n  // or even resort to allocation in global heap.\n  return allocateChunk(total_bytes);\n}\n\n\ninline int32 Multicore_Object_Heap::newObjectHash() {\n  // \"Answer a new 16-bit pseudo-random number for use as an identity hash.\"\n  return lastHash = (13849 + (27181 * (lastHash + Logical_Core::my_rank()))) & 65535;\n}\n\ninline Object_p Multicore_Object_Heap::object_address_unchecked(Oop x) {\n  return x.as_object_unchecked();\n}\n\n"
  },
  {
    "path": "vm/src/heap/multicore_object_table.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\nbool Multicore_Object_Table::replicate = false  &&  !Omit_Duplicated_OT_Overhead;\n // cannot dup if overhead omitted\n\nMulticore_Object_Table::Entry* Multicore_Object_Table::Segment::construct_free_list() {\n  Entry* r = NULL;\n  for (int i = n - 1;  i >= 0;  --i) {\n    words[i].i = oop_int_t(r);\n    r = Entry::from_word_addr(&words[i]);\n  }\n  return r;\n}\n\nMulticore_Object_Table::Multicore_Object_Table() : Abstract_Object_Table() {\n  turn = 0;\n  FOR_ALL_RANKS(i) {\n    first_segment[i] = NULL;\n    first_free_entry[i] = NULL;\n    lowest_address[i] = (void*)~0;\n    lowest_address_after_me[i] = NULL;\n    allocatedEntryCount[i] = entryCount[i] = allocationsSinceLastQuery[i] = entriesFreedSinceLastQuery[i] = 0;\n  }\n  Entry::verify_from_oop_optimization();\n  OS_Interface::abort_if_error(\"Segment heap creation\", OS_Interface::mem_create_heap_if_on_Tilera(&heap, replicate));\n}\n\nvoid Multicore_Object_Table::update_bounds(Segment* s, int rank) {\n  void* start = (void*)s;\n  void* end = (void*)&s[1];\n  if (lowest_address[rank] >= start)  lowest_address[rank] = start;\n  if (lowest_address_after_me[rank] <  end)  lowest_address_after_me[rank] = end;\n}\n\nvoid Multicore_Object_Table::update_segment_list(Segment* s, int rank  COMMA_DCL_ESB) {\n  s->set_next(first_segment[rank]  COMMA_USE_ESB);\n  first_segment[rank] = s;\n}\n\n\nvoid Multicore_Object_Table::update_free_list(Segment* s, int rank) {\n  first_free_entry[rank] = s->construct_free_list();\n  entryCount[rank] += Segment::n;\n}\n\n\nMulticore_Object_Table::Segment::Segment(Multicore_Object_Table* mot, int rank  COMMA_DCL_ESB) {\n  h._rank = rank;\n  if (mot != NULL) {\n    mot->update_bounds(this, rank);\n    mot->update_segment_list(this, rank  COMMA_USE_ESB);\n    mot->update_free_list(this, rank);\n  }\n}\n\nvoid* Multicore_Object_Table::Segment::operator new(size_t /* s */) {\n  void* p = OS_Interface::rvm_memalign_shared(The_Memory_System()->object_table->heap, alignment_and_size, sizeof(Segment));\n  assert(sizeof(Segment) <= alignment_and_size);\n  if (p == NULL) fatal(\"OT Segment allocation\");\n  // xxxxxx Should home segments appropriately someday.\n  if (!The_Squeak_Interpreter()->use_checkpoint()) bzero(p, sizeof(Segment));\n  return p;\n}\n\n\n\nbool Multicore_Object_Table::is_on_free_list(Entry* e, int rank) {\n  for (Entry* ee = first_free_entry[rank];  ee;  ee = ee->word()->get_entry())\n    if (ee == e)\n      return true;\n  return false;\n}\n\nbool Multicore_Object_Table::is_OTE_free(Oop x) { return !The_Memory_System()->contains(word_for(x)->obj()); }\n\n\nbool Multicore_Object_Table::verify_entry_address(Entry* e) {\n  FOR_ALL_RANKS(r)\n    for (Segment* p = first_segment[r];  p != NULL;  p = p->next())\n        if (p->contains_entry(e)) return true;\n  fatal(\"bad entry\");\n  return false;\n}\n\nbool Multicore_Object_Table::verify() {\n  return verify_all_free_lists()  &&  verify_all_segments(false);\n}\n\nbool Multicore_Object_Table::verify_after_mark() {\n  return verify_all_free_lists()  &&  verify_all_segments(true);\n}\n\nbool Multicore_Object_Table::verify_all_free_lists() {\n  FOR_ALL_RANKS(r) verify_free_list(r);\n  return true;\n}\n\nbool Multicore_Object_Table::verify_free_list(int rank) {\n  bool ok = true;\n  for (Entry* e = first_free_entry[rank];  e != NULL;  e = e->word()->get_entry())\n    ok = e->verify_free_entry(this) && ok;\n  return ok;\n}\n\nbool Multicore_Object_Table::verify_all_segments(bool live_ones_are_marked) {\n  bool ok = true;\n  FOR_ALL_RANKS(r)\n    for (Segment* p = first_segment[r];  p != NULL;  p = p->next())\n      ok = p->verify(this, live_ones_are_marked) && ok;\n  return ok;\n}\n\nbool Multicore_Object_Table::Segment::verify(Multicore_Object_Table* ot, bool live_ones_are_marked) {\n  bool ok = true;\n  for ( Multicore_Object_Table::Entry* e = first_entry();  e < end_entry();  e = e->next() )\n    ok = e->verify(ot, live_ones_are_marked) && ok;\n  return ok;\n}\n\nbool Multicore_Object_Table::Entry::verify(Multicore_Object_Table* ot, bool live_ones_are_marked) {\n  return is_free(ot) || verify_used_entry(live_ones_are_marked);\n}\n\n\n// Slow; only for verification\nbool Multicore_Object_Table::Entry::is_free(Multicore_Object_Table* ot) {\n  const bool go_faster = true; // less precise\n  Entry* f = word()->get_entry();\n  if (f == NULL)  return true; // last free entry\n  if (go_faster) return ot->probably_contains(f);\n  FOR_ALL_RANKS(r)\n    for (Segment* p = ot->first_segment[r];  p != NULL;  p = p->next())\n      if ( p->contains_entry(f) )\n        return true;\n  return false;\n}\n\nbool Multicore_Object_Table::Entry::verify_free_entry(Multicore_Object_Table* ot) {\n  assert_always(is_free(ot));\n  return true;\n}\n\nbool Multicore_Object_Table::Entry::verify_used_entry(bool live_ones_are_marked) {\n  Object* obj = word()->obj();\n  if (obj != NULL) {\n    assert_always(The_Memory_System()->contains(obj));\n    assert_always(!obj->is_marked() || live_ones_are_marked);\n  }\n  else\n    fatal(\"no addr\");\n  return true;\n}\n\n\nOop Multicore_Object_Table::get_stats(int rank) {\n  int s = The_Squeak_Interpreter()->makeArrayStart();\n  PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(allocatedEntryCount[rank]);\n  PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(entryCount[rank]);\n  PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(allocationsSinceLastQuery[rank]);\n  PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(entriesFreedSinceLastQuery[rank]);\n  allocationsSinceLastQuery[rank] = entriesFreedSinceLastQuery[rank] = 0;\n  return The_Squeak_Interpreter()->makeArray(s);\n}\n\n\nstatic const char check_mark[4] = \"mot\", seg_cm[4] = \"seg\";\n\n# define FOR_EACH_SEGMENT(s) \\\n  FOR_ALL_RANKS(r) \\\n    for (Segment* s = first_segment[r];  s != NULL;  s = s->next()) \\\n\nvoid Multicore_Object_Table::save_to_checkpoint(FILE* f) {\n  write_mark(f, check_mark);\n  xfwrite(this, sizeof(*this), 1, f);\n  int n_segs = 0;\n  FOR_EACH_SEGMENT(s) ++n_segs;\n  xfwrite(&n_segs, sizeof(n_segs), 1, f);\n\n  FOR_EACH_SEGMENT(s) s->save_to_checkpoint(f, r);\n\n}\n\n\nvoid Multicore_Object_Table::Segment::save_to_checkpoint(FILE* f, int rank) {\n  Segment* me = this;\n  write_mark(f, seg_cm);\n  xfwrite(&rank, sizeof(rank), 1, f);\n  xfwrite(&me, sizeof(me), 1, f);\n  xfwrite(this, sizeof(*this), 1, f);\n  // fprintf(stderr, \"wrote a segment for %d at 0x%x, file is at 0x%x\\n\", rank, this, ftell(f));\n}\n\n\nvoid Multicore_Object_Table::restore_from_checkpoint(FILE* f) {\n  lprintf(\"restoring object table...\\n\");\n  read_mark(f, check_mark);\n  xfread(this, sizeof(*this), 1, f);\n  int n_segs = -1;\n  xfread(&n_segs, sizeof(n_segs), 1, f);\n  Segment** segs = (Segment**)alloca(n_segs * sizeof(Segment*));\n  for (int i = 0;  i < n_segs;  ++i)\n    segs[i] = new Segment(NULL, -1  COMMA_FALSE_OR_NOTHING);\n\n  for (int i = 0;  i < n_segs;  ++i)\n    Segment::restore_from_checkpoint(f, segs, n_segs);\n}\n\nvoid Multicore_Object_Table::Segment::restore_from_checkpoint(FILE* f, Segment* segs[], int n_segs) {\n  read_mark(f, seg_cm);\n  int rank;\n  xfread(&rank, sizeof(rank), 1, f);\n\n  Segment* s;\n  xfread(&s, sizeof(s), 1, f);\n  lprintf(\"restoring a segment\\n\");\n\n  for (int i = 0;  i < n_segs;  ++i)\n    if (segs[i] == s) {\n      segs[i] = NULL;\n      xfread(s, sizeof(*s), 1, f);\n      // fprintf(stderr, \"read a segment for %d at 0x%x, file is at 0x%x\\n\", rank, s, ftell(f));\n      return;\n    }\n  fprintf(stderr, \"segment mismatch for %d got %p, but wanted: \", rank, s);\n  for (int i = 0;  i < n_segs;  ++i)\n    if (segs[i] != NULL) fprintf(stderr, \"%p%s\", segs[i], i  <  n_segs - 1   ?  \", \"  :  \"\\n\");\n  fatal(\"Segment mismatch\");\n}\n\n\n\nvoid Multicore_Object_Table::pre_store_whole_enchillada() {\n  if (!replicate) return;\n  FOR_ALL_RANKS(rank)\n    for (Segment* p = first_segment[rank];  p != NULL;  p = p->next())\n      The_Memory_System()->pre_cohere_object_table(p, sizeof(*p));\n}\n\nvoid Multicore_Object_Table::post_store_whole_enchillada() {\n  if (!replicate) return;\n  FOR_ALL_RANKS(rank)\n    for (Segment* p = first_segment[rank];  p != NULL;  p = p->next())\n      The_Memory_System()->post_cohere(p, sizeof(*p));\n}\n\nvoid Multicore_Object_Table::word_union:: pre_cohere_OTE() {\n  The_Memory_System()-> pre_cohere_object_table(this, sizeof(*this));\n}\nvoid Multicore_Object_Table::word_union::post_cohere_OTE() {\n  The_Memory_System()->post_cohere_object_table(this, sizeof(*this));\n}\n\n\n\nvoid Multicore_Object_Table::print() {\n  FOR_ALL_RANKS(r) {\n    lprintf(\"Multicore_Object_Table: rank %d,  \", r);\n    lprintf(\"first_segment 0x%x, first_free_entry 0x%x, allocatedEntryCount %d, entryCount %d, allocationsSinceLastQuery %d, entriesFreedSinceLastQuery %d, lowest_address 0x%x, lowest_address_after_me 0x%x\\n\",\n     first_segment[r], first_free_entry[r], allocatedEntryCount[r], entryCount[r], allocationsSinceLastQuery[r], entriesFreedSinceLastQuery[r], lowest_address[r], lowest_address_after_me[r]);\n     for (Segment* s = first_segment[r];  s != NULL;  s = s->next())\n       s->print();\n  }\n}\n\n\nvoid Multicore_Object_Table::Segment::set_next(Segment* s  COMMA_DCL_ESB) {\n  if (!ESB_OR_FALSE || !Multicore_Object_Table::replicate) h._next = s;\n  else {\n    The_Memory_System()->pre_cohere_object_table(&h, sizeof(h));\n    h._next = s;\n    The_Memory_System()->post_cohere_object_table(&h, sizeof(h));\n  }\n}\n\nvoid Multicore_Object_Table::Segment::print() {\n  lprintf(\"\\tSegment: first_entry 0x%x, end_entry 0x%x\\n\", first_entry(), end_entry());\n}\n\n\nvoid Multicore_Object_Table::check_for_debugging(Oop x) {\n  if (!probably_contains((void*)x.bits())) {\n    lprintf(\"object_for caught one\\n\");\n    fatal(\"caught it\");\n  }\n}\n\n"
  },
  {
    "path": "vm/src/heap/multicore_object_table.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Multicore_Object_Table: public Abstract_Object_Table {\n public:\n   static bool replicate;\n private:\n  class Entry;\n  static const int bit_mask = 3;\n  static const int obj_mask = ~bit_mask;\n  static const int spare_bit = 1;\n  union word_union {\n# if Extra_OTE_Words_for_Debugging_Block_Context_Method_Change_Bug\n    struct { oop_int_t x, y, z, t; };\n# endif\n    oop_int_t i;\n    Entry* _e;\n    Entry* get_entry() { return _e; }\n    void set_entry(Entry* e COMMA_DCL_ESB) { set(oop_int_t(e)  COMMA_USE_ESB); }// async\n\n    Object* obj() { return (Object*)(i & obj_mask); }\n        \n    void set_obj(Object* x  COMMA_DCL_ESB)  {\n      set(((oop_int_t)x & obj_mask)  |  (i & bit_mask)  COMMA_USE_ESB);\n    }\n    int bits() {  return i & bit_mask; }\n    void set_bits(int x  COMMA_DCL_ESB) { set((i & obj_mask)  |  (x & bit_mask)  COMMA_USE_ESB); }\n    bool get_spare_bit() {\n      return i & spare_bit;\n    }\n    void set_spare_bit(bool x  COMMA_DCL_ESB) {\n      if (Omit_Spare_Bit) return;\n      if (x)  set(i |  spare_bit  COMMA_USE_ESB);\n      else    set(i & ~spare_bit  COMMA_USE_ESB);\n    }\n    void set_obj_and_spare_bit(Object* obj,  bool spare  COMMA_DCL_ESB) {\n      set((oop_int_t(obj) & ~bit_mask)  |  (spare ? spare_bit : 0)  COMMA_USE_ESB);\n    }\n    void set(oop_int_t x  COMMA_DCL_ESB) {\n      if (!ESB_OR_FALSE  ||  !replicate) i = x;\n      else { pre_cohere_OTE();  i = x;  post_cohere_OTE(); }\n    }\n    void  pre_cohere_OTE();\n    void post_cohere_OTE();\n    void clear_debugging_words() {\n#     if Extra_OTE_Words_for_Debugging_Block_Context_Method_Change_Bug\n         y = z = t = 0;\n#     endif\n    }\n  };\n  class Segment {\n    struct header {\n      Segment* _next;\n      int _rank;\n    } h;\n    static const int alignment_and_size = PAGE_SIZE; // needed to find rank and later, for homing\n  public:\n    Segment* next() { return h._next; }\n    int rank() { return h._rank; }\n    static Segment* enclosing(void* p) { return (Segment*) ( int(p) & ~(alignment_and_size - 1)); }\n    void set_next(Segment* s  COMMA_DCL_ESB);\n    static const int n = (alignment_and_size - sizeof(header)) / sizeof(word_union);\n    // parallel arrays to optimize caching, system uses word shift, see bits_for_hash in oop.h\n    union word_union words[n];\n\n    void* operator new(size_t);\n    Segment(Multicore_Object_Table*,int  COMMA_DCL_ESB);\n    Entry* construct_free_list();\n    Entry*   end_entry() { return Entry::from_word_addr(&words[n]); }\n    Entry*  last_entry() { return Entry::from_word_addr(&words[n-1]); }\n    Entry* first_entry() { return Entry::from_word_addr(&words[0]); }\n    bool contains_entry(Entry* e) { return first_entry() <= e  &&  e < end_entry(); }\n\n    bool verify(Multicore_Object_Table*, bool);\n\n    void save_to_checkpoint(FILE*, int);\n    static void restore_from_checkpoint(FILE*, Segment* segs[], int n);\n    void print();\n  };\n  class Entry {\n  public:\n    static Entry* from_word_addr(word_union* x) { return (Entry*)x; }\n    word_union* word() { return (word_union*)this; }\n    oop_int_t mem_bits() { return (oop_int_t)this / sizeof(Object*); }\n    static Entry* from_mem_bits(oop_int_t x) { return (Entry*)(x * sizeof(Object*)); }\n    static Entry* from_oop(Oop x) {\n      return /*from_mem_bits(x.mem_bits())*/ (Entry*)x.bits();\n    }\n    static bool verify_from_oop_optimization() {\n      assert_always((int)from_mem_bits(Oop::from_bits(Oop::Illegals::magic).mem_bits()) == Oop::Illegals::magic);\n      return true;\n    }\n    Entry* prev() { return from_word_addr(word() - 1); }\n    Entry* next() { return from_word_addr(word() + 1); }\n    Oop oop() { return Oop::from_mem_bits(mem_bits()); }\n    int rank() { return enclosing_segment()->rank(); }\n    Segment* enclosing_segment() { return Segment::enclosing(this); }\n\n    bool is_free(Multicore_Object_Table*);\n\n    bool is_used();\n    bool verify_free_entry(Multicore_Object_Table*);\n    bool verify_used_entry(bool);\n    bool verify(Multicore_Object_Table*, bool);\n  };\n\n  OS_Interface::OS_Heap heap;\n\n  Segment* first_segment[Max_Number_Of_Cores];\n  Entry* first_free_entry[Max_Number_Of_Cores];\n\n  u_int32 allocatedEntryCount[Max_Number_Of_Cores];\n  u_int32 entryCount[Max_Number_Of_Cores];\n  u_int32 allocationsSinceLastQuery[Max_Number_Of_Cores];\n  u_int32 entriesFreedSinceLastQuery[Max_Number_Of_Cores]; // how many frees have happened\n\n  void* lowest_address[Max_Number_Of_Cores];\n  void* lowest_address_after_me[Max_Number_Of_Cores];\n\n  int turn; // out of place here but need shared memory\n\n\npublic:\n  void* operator new(size_t size) {\n    return Memory_Semantics::shared_malloc(size);\n  }\n  Multicore_Object_Table();\n\n\n  inline Oop allocate_OTE_for_object_in_snapshot(Object*);\n  inline int rank_for_adding_object_from_snapshot(Oop);\n\n\n\n  inline Oop allocate_oop_and_set_backpointer(Object_p obj, int rank  COMMA_DCL_ESB);\n  inline Oop allocate_oop_and_set_preheader(Object_p obj, int r   COMMA_DCL_ESB);\n\nprivate:\n  Oop allocate_oop(int rank COMMA_DCL_ESB);\n\n  // need to be able to save and return a word\nprivate:\n\n  word_union* word_for(Oop x) {\n    return entry_from_oop(x)->word();\n  }\n\n  void check_for_debugging(Oop x);\n\npublic:\n\n  Object* object_for(Oop x) {\n    if (check_many_assertions) check_for_debugging(x);\n    return word_for(x)->obj();\n  }\n  void set_object_for(Oop x, Object_p obj  COMMA_DCL_ESB) {\n    word_for(x)->set_obj(obj  COMMA_USE_ESB);\n  }\n\n  bool spare_bit_for(Oop x)  { return word_for(x)->get_spare_bit(); }\n  void set_spare_bit_for(Oop x, bool spare  COMMA_DCL_ESB)  { word_for(x)->set_spare_bit(spare  COMMA_USE_ESB); }\n\n\n  void free_oop(Oop x  COMMA_DCL_ESB) {\n    Entry* e = entry_from_oop(x);\n    int rank = e->rank();\n    e->word()->set_obj_and_spare_bit(NULL, false  COMMA_USE_ESB);\n    add_entry_to_free_list(e, rank  COMMA_USE_ESB);\n    --allocatedEntryCount[rank];\n    ++entriesFreedSinceLastQuery[rank];\n  }\n\n  bool is_OTE_free(Oop x);\n\n\n# if Extra_OTE_Words_for_Debugging_Block_Context_Method_Change_Bug\n  void set_dbg_y(Oop x, oop_int_t m) { word_for(x)->y = m; }\n  void set_dbg_z(Oop x, oop_int_t m) { word_for(x)->z = m; }\n  void set_dbg_t(Oop x, oop_int_t m) { word_for(x)->t = m; }\n\n  oop_int_t get_dbg_y(Oop x) { return word_for(x)->y; }\n  oop_int_t get_dbg_z(Oop x) { return word_for(x)->z; }\n  oop_int_t get_dbg_t(Oop x) { return word_for(x)->t; }\n# endif\n\n\nprivate:\n\n  void add_entry_to_free_list(Entry* e, int rank  COMMA_DCL_ESB) {\n    assert( e->word()->obj() == NULL);\n    Entry*& first_free = first_free_entry[rank];\n    e->word()->set_entry(first_free  COMMA_USE_ESB);\n    first_free = e;\n    --allocatedEntryCount[rank];\n  }\n\n  Entry* entry_from_oop(Oop x) {\n    Entry* e = Entry::from_oop(x);\n    if (check_many_assertions)\n      verify_entry_address(e);\n    return e;\n  }\npublic:\n  bool verify();\n  bool verify_after_mark();\n\n  inline bool probably_contains(void*) const;\n\n  Oop get_stats(int);\n\nprivate:\n  bool verify_entry_address(Entry*);\n  bool verify_all_segments(bool);\n  bool verify_free_list(int rank);\n  bool verify_all_free_lists();\n\n  void update_bounds(Segment*, int);\n  void update_segment_list(Segment*, int  COMMA_DCL_ESB);\n  void update_free_list(Segment*, int);\n\n  bool is_on_free_list(Entry*, int);\n\n\n public:\n  void save_to_checkpoint(FILE*);\n  void restore_from_checkpoint(FILE*);\n\n  void  pre_store_whole_enchillada();\n  void post_store_whole_enchillada();\n\n\n  void print();\n\n};\n\n"
  },
  {
    "path": "vm/src/heap/multicore_object_table.inline.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\ninline Oop Multicore_Object_Table::allocate_oop(int rank COMMA_DCL_ESB)  {\n  if (check_many_assertions  &&  The_Squeak_Interpreter()->is_initialized())\n    verify_free_list(rank);\n  \n  Entry*& first_free = first_free_entry[rank];\n  Entry* e = first_free;\n  if (e == NULL) {\n    new Segment(this, rank  COMMA_USE_ESB);\n    e = first_free;\n   }\n  __attribute__((unused)) Entry* last_first_free = e; // debugging\n  first_free = (Entry*)e->word()->get_entry();\n\n  e->word()->clear_debugging_words();\n\n  return Oop::from_mem_bits(e->mem_bits());\n}\n\n\n\ninline Oop Multicore_Object_Table::allocate_OTE_for_object_in_snapshot(Object*)  {\n  int rank = The_Memory_System()->assign_rank_for_snapshot_object();\n  return  allocate_oop(rank COMMA_FALSE_OR_NOTHING);\n}\n\n\ninline int Multicore_Object_Table::rank_for_adding_object_from_snapshot(Oop x) { return entry_from_oop(x)->rank(); }\n\n\n\ninline Oop Multicore_Object_Table::allocate_oop_and_set_backpointer(Object_p obj, int rank  COMMA_DCL_ESB) {\n  Oop r = allocate_oop(rank COMMA_USE_ESB);\n  obj->set_backpointer(r); // should never be a read-mostly obj anyway\n  set_object_for(r, obj  COMMA_USE_ESB);\n  ++allocatedEntryCount[rank];\n  ++allocationsSinceLastQuery[rank];\n  return r;\n}\n\ninline Oop Multicore_Object_Table::allocate_oop_and_set_preheader(Object_p obj, int r  COMMA_DCL_ESB) { \n  obj->init_extra_preheader_word();\n  return allocate_oop_and_set_backpointer(obj, r  COMMA_USE_ESB); \n}\n\n\n\n\ninline bool Multicore_Object_Table::Entry::is_used() {\n  Object* ow = word()->obj();\n  return The_Memory_System()->contains(ow);\n}\n\ninline bool Multicore_Object_Table::probably_contains(void* p) const {\n  if (The_Memory_System()->contains(p))\n    return false;\n  FOR_ALL_RANKS(r)\n  if (lowest_address[r] <= p  &&  p  < lowest_address_after_me[r])\n    return true;\n  return false;\n}\n\n"
  },
  {
    "path": "vm/src/heap/oop_closure.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Oop_Closure {\n public:\n  Oop_Closure() {}\n  virtual void value(Oop* x, Object_p containing_obj_or_null) = 0;\n  virtual const char* class_name(char*) { return \"Oop_Closure\"; }\n};\n\n"
  },
  {
    "path": "vm/src/image_readers/squeak_image_reader.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\n# include <fcntl.h>\n# include <unistd.h>\n\n\nvoid Squeak_Image_Reader::read(char* fileName, Memory_System* ms, Squeak_Interpreter* i) {\n  Squeak_Image_Reader* sir = new Squeak_Image_Reader(fileName, ms, i);\n  sir->read_image();\n  dittoing_stdout_printer->printf(\"finished reading %s\\n\", fileName);\n}\n\nvoid Squeak_Image_Reader::fake_read(char* fileName, Memory_System* ms, Squeak_Interpreter* i) {\n  Squeak_Image_Reader* sir = new Squeak_Image_Reader(fileName, ms, i);\n  sir->read_header();\n\n  //mimic reader\n  Memory_Semantics::shared_malloc(sir->dataSize);\n  malloc(sir->dataSize);\n\n  i->restore_all_from_checkpoint(sir->dataSize, sir->lastHash, sir->savedWindowSize, sir->fullScreenFlag);\n  imageNamePut_on_all_cores(sir->file_name, strlen(sir->file_name));\n}\n\nSqueak_Image_Reader::Squeak_Image_Reader(char* fn, Memory_System* ms, Squeak_Interpreter* i) {\n  dittoing_stdout_printer->printf(\"Reading %s\\n\", fn);\n  memory_system = ms;\n  interpreter = i;\n\n  file_name = fn;\n  image_file = fopen(file_name, \"r\");\n  swap_bytes = false;\n  if (image_file == NULL) {\n    char buf[BUFSIZ];\n    snprintf(buf, sizeof(buf), \"Could not open image file %s\", file_name);\n    perror(buf);\n    abort();\n  }\n}\n\nvoid Squeak_Image_Reader::read_image() {\n/*\n\nreadImageFromFile: f HeapSize: desiredHeapSize StartingAt: imageOffset\n   \"Read an image from the given file stream, allocating the given amount of\n    memory to its object heap. Fail if the image has an unknown format or\n    requires more than the given amount of memory.\"\n    \n   \"Details: This method detects when the image was stored on a machine with\n    the opposite byte ordering from this machine and swaps the bytes\n    automatically. Furthermore, it allows the header information to start 512\n    bytes into the file, since some file transfer programs for the Macintosh\n    apparently prepend a Mac-specific header of this size. Note that this same\n    512 bytes of prefix area could also be used to store an exec command on\n    Unix systems, allowing one to launch Smalltalk by invoking the image name\n    as a command.\"\n    \n   \"This code is based on C code by Ian Piumarta and Smalltalk code by Tim\n    Rowledge. Many thanks to both of you!!\"\n*/\n\n  Object::verify_constants();\n\n  read_header();\n\n  if (Verbose_Debug_Prints) fprintf(stdout, \"allocating memory for snapshot\\n\");\n\n  // \"allocate a contiguous block of memory for the Squeak heap\"\n  memory = (char*)Memory_Semantics::shared_malloc(dataSize);\n  assert_always(memory != NULL);\n\n  /*\n\tmemStart := self startOfMemory.\n\tmemoryLimit := (memStart + heapSize) - 24.  \"decrease memoryLimit a tad for safety\"\n\tendOfMemory := memStart + dataSize.\n  */\n\n  // \"position file after the header\"\n  if (Verbose_Debug_Prints) fprintf(stdout, \"reading objects in snapshot\\n\");\n  if (fseek(image_file, headerStart + headerSize, SEEK_SET)) {\n    perror(\"seek\");\n    fatal();\n  }\n\n  // \"read in the image in bulk, then swap the bytes if necessary\"\n  xfread(memory, 1, dataSize, image_file);\n\n  // \"First, byte-swap every word in the image. This fixes objects headers.\"\n  if (swap_bytes) reverseBytes((int32*)&memory[0], (int32*)&memory[dataSize]);\n\n  // \"Second, return the bytes of bytes-type objects to their orginal order.\"\n  if (swap_bytes) byteSwapByteObjects();\n  \n  Safepoint_Ability sa(false); // for distributing objects and putting image name\n  distribute_objects();\n  imageNamePut_on_all_cores(file_name, strlen(file_name));\n  \n  // we need to reoder floats if the image was a Cog image\n  if (is_cog_image_with_reodered_floats()) {\n    normalize_float_ordering_in_image();\n  }\n}\n\n\n/** Inspired by:\n !Interpreter methodsFor: 'image save/restore' stamp: 'dtl 10/5/2010 23:54'!\n normalizeFloatOrderingInImage\n \n \"Float objects were saved in platform word ordering. Reorder them into the\n traditional object format.\"\n*/\nvoid Squeak_Image_Reader::normalize_float_ordering_in_image() {\n  Squeak_Interpreter* const interp = The_Squeak_Interpreter();\n  Memory_System* const mem_sys = The_Memory_System();\n  \n  Oop cls = interp->splObj(Special_Indices::ClassFloat);\n  for (Oop floatInstance = mem_sys->initialInstanceOf(cls);\n       floatInstance != interp->roots.nilObj;\n       floatInstance  = mem_sys->nextInstanceAfter(floatInstance) ) {\n    /* Swap words within Float objects, taking them out of native platform ordering */\n    floatInstance.as_object()->swapFloatParts_for_cog_compatibility();\n  }\n}\n\n\nvoid Squeak_Image_Reader::imageNamePut_on_all_cores(char* bytes, unsigned int len) {\n  // Use a shared buffer to reduce the size of the message to optimize the\n  // footprint of message buffer allocation -- dmu & sm\n  char* shared_buffer = (char*)Memory_Semantics::shared_malloc(len);\n  \n  bcopy(bytes, shared_buffer, len);\n  imageNamePutMessage_class m(shared_buffer, len);\n  if (Using_Processes) m.send_to_all_cores();\n  else                 m.handle_me();\n  \n  Memory_Semantics::shared_free(shared_buffer);\n}\n\n\nvoid Squeak_Image_Reader::read_header() {\n  if (Verbose_Debug_Prints) fprintf(stdout, \"reading snapshot header\\n\");\n  \n  check_image_version();\n  // headerStart := (self sqImageFilePosition: f) - bytesPerWord.  \"record header start position\"\n  headerStart = ftell(image_file) - bytesPerWord;\n  headerSize         = get_long();\n  dataSize           = get_long();\n  oldBaseAddr        = (char*)get_long();\n  specialObjectsOop = Oop::from_bits(get_long());\n\n  lastHash = get_long();\n  if (lastHash == 0) lastHash = 999;\n\n  savedWindowSize    = get_long();\n  fullScreenFlag     = get_long();\n\n\n  extraVMMemory      = get_long();\n}\n\nvoid Squeak_Image_Reader::check_image_version() {\n    int32 first_version = get_long();\n    interpreter->image_version = first_version;\n    \n  if (readable_format(interpreter->image_version))\n    return;\n  \n    swap_bytes = true;\n    if (fseek(image_file, -sizeof(int32), SEEK_CUR) != 0) {\n    perror(\"seek in image file failed\"); fatal();\n    }\n  \n    interpreter->image_version = get_long();\n  if (readable_format(interpreter->image_version))\n    return;\n\n  fatal(\"Given image file seems to be incompatible.\");\n}\n\nint32 Squeak_Image_Reader::get_long() {\n  int32 x;\n  xfread(&x, sizeof(x), 1, image_file);\n  if (swap_bytes) swap_bytes_long(&x);\n  return x;\n}\n\nbool Squeak_Image_Reader::readable_format(int32 version) {\n  /* Check against a magic constant that changes when the image format\n     changes. Since the image reading code uses this to detect byte ordering,\n     one must avoid version numbers that are invariant under byte reversal. */\n  return   version == Pre_Closure_32_Bit_Image_Version\n       ||  version == Post_Closure_32_Bit_Image_Version\n       ||  version == Post_Closure_With_Reordered_Floats_32_Bit_Image_Version;\n}\n\nbool Squeak_Image_Reader::is_cog_image_with_reodered_floats() {\n  return interpreter->image_version == Post_Closure_With_Reordered_Floats_32_Bit_Image_Version;\n}\n\n\nvoid Squeak_Image_Reader::byteSwapByteObjects() {\n  fprintf(stdout, \"swapping bytes back in byte objects\\n\");\n  for (Chunk* c = (Chunk*)memory;\n       (char*)c <  &memory[dataSize]; ) {\n    Object* obj = c->object_from_chunk_without_preheader();\n    obj->byteSwapIfByteObject();\n    c = obj->nextChunk();\n  }\n  fprintf(stdout, \"done swapping bytes back in byte objects\\n\");\n}\n\n\nvoid Squeak_Image_Reader::distribute_objects() {\n  if (Verbose_Debug_Prints) fprintf(stdout, \"distributing objects\\n\");\n  \n  u_int64 start = OS_Interface::get_cycle_count();\n  char* base = memory;\n  u_int32 total_bytes = dataSize;\n\n  object_oops = (Oop*)malloc(total_bytes);\n  bzero(object_oops, total_bytes);\n\n  memory_system->initialize_from_snapshot(dataSize, savedWindowSize, fullScreenFlag, lastHash);\n  \n  for (Chunk *c = (Chunk*)base, *nextChunk = NULL;\n       (char*)c <  &base[total_bytes];\n       c = nextChunk) {\n    Object* obj = c->object_from_chunk_without_preheader();\n    if (check_many_assertions &&  (char*)obj - memory == (char*)specialObjectsOop.bits() - oldBaseAddr)\n      lprintf(\"about to do specialObjectsOop\");\n    nextChunk = obj->nextChunk();\n    if (!obj->isFreeObject()) {\n      obj->do_all_oops_of_object_for_reading_snapshot(this);\n      memory_system->ask_cpu_core_to_add_object_from_snapshot_allocating_chunk(oop_for_addr(obj), obj);\n    }\n  }\n  // Remap specialObjectsOop\n  specialObjectsOop = oop_for_oop(specialObjectsOop);\n\n  memory_system->finished_adding_objects_from_snapshot();\n  free(object_oops);\n  fprintf(stdout, \"done distributing objects, %lld cycles\\n\",\n    OS_Interface::get_cycle_count() - start);\n\n  interpreter->initialize(specialObjectsOop, false);\n}\n\n\n\nOop Squeak_Image_Reader::oop_for_oop(Oop x) {\n  return oop_for_relative_addr(x.bits() - (int)oldBaseAddr);\n}\n\nOop Squeak_Image_Reader::oop_for_addr(Object* obj) {\n  return oop_for_relative_addr(int(obj) - int(memory));\n}\n\n\nOop Squeak_Image_Reader::oop_for_relative_addr(int relative_addr) {\n  assert(u_int32(relative_addr) < dataSize);\n  Oop* addr_in_table = &object_oops[relative_addr / sizeof(Oop)];\n  Object* obj = (Object*) &memory[relative_addr];\n  if (addr_in_table->bits() == 0) {\n    Multicore_Object_Table* ot = memory_system->object_table;\n    *addr_in_table = ot->allocate_OTE_for_object_in_snapshot(obj);\n  }\n  return *addr_in_table;\n}\n\n"
  },
  {
    "path": "vm/src/image_readers/squeak_image_reader.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Squeak_Image_Reader {\n  friend class Convert_Closure;\n private:\n  char* file_name;\n  FILE* image_file;\n  Memory_System* memory_system;\n  Squeak_Interpreter* interpreter;\n\n  u_int32 headerStart, headerSize, dataSize, extraVMMemory;\n\n  char *oldBaseAddr, *memory;\n  Oop* object_oops;\n\n\n  // need to be passed on\n  Oop specialObjectsOop; // -> The_Squeak_Interpreter()->roots.specialObjectsOop\n  int32 lastHash;\n  int32 savedWindowSize;\n  int32 fullScreenFlag;\n\n\n  bool swap_bytes;\n  void check_image_version();\n  int32 get_long();\n  static bool readable_format(int32);\n  bool is_cog_image_with_reodered_floats();\n  static int32 image_format_version();\n  void read_header();\n\n  void byteSwapByteObjects();\n  void normalize_float_ordering_in_image();\n  void distribute_objects();\n  \n\n\npublic:\n  static void imageNamePut_on_all_cores(char*  b, unsigned int n);\n  Oop oop_for_oop(Oop);\nprivate:\n  Oop oop_for_addr(Object*);\n  Oop oop_for_relative_addr(int);\n\n  Squeak_Image_Reader(char* file_name, Memory_System* , Squeak_Interpreter* i);\n\n public:\n  static void read(char*, Memory_System* h, Squeak_Interpreter* i);\n  static void fake_read(char*, Memory_System* h, Squeak_Interpreter* i);\n  void read_image();\n  \n  static const int Pre_Closure_32_Bit_Image_Version = 6502;\n  static const int Post_Closure_32_Bit_Image_Version = 6504;\n  static const int Post_Closure_With_Reordered_Floats_32_Bit_Image_Version = 6505;\n };\n\n"
  },
  {
    "path": "vm/src/interpreter/abstract_primitive_table.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Abstract_Primitive_Table {\npublic:\n  fn_t *contents;\n  bool *execute_on_main;\n\n  // special 1-origin index values for external prims\n  static const oop_int_t lookup_needed = 0;\n  static const oop_int_t lookup_failed = -1;\n  static bool  is_index_valid(oop_int_t index) { return index > 0; }\n\n\n  Abstract_Primitive_Table(int s, bool must_be_shared) {\n    size = s;\n    contents        = must_be_shared ? (fn_t*)Memory_Semantics::shared_malloc(s * sizeof(fn_t)) : new fn_t[s];\n    execute_on_main = must_be_shared ? (bool*)Memory_Semantics::shared_malloc(s * sizeof(bool)) : new bool[s];\n    flush();\n  }\n  int size;\n  void flush() {\n    for (int i = 0;  i < size;  ++i)\n      contents[i] = 0;\n  }\n};\n\n"
  },
  {
    "path": "vm/src/interpreter/at_cache.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\nvoid At_Cache::Entry::install(Oop rcvr, bool stringy) {\n  Object_p ro = rcvr.as_object();\n  int rcvr_fmt = ro->format();\n  if (Object::Format::might_be_context(rcvr_fmt) && ro->hasContextHeader()) {\n    The_Squeak_Interpreter()->primitiveFail();\n    return;\n  }\n  oop_int_t totalLength = ro->lengthOf();\n  oop_int_t rcvr_fixedFields = ro->fixedFieldsOfArray();\n\n  oop = rcvr;\n  fmt = stringy ? rcvr_fmt + 16 : rcvr_fmt;\n  fixedFields = rcvr_fixedFields;\n  size = totalLength - rcvr_fixedFields;\n}\n\n"
  },
  {
    "path": "vm/src/interpreter/at_cache.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass At_Cache {\n  static const int Num_Entries = 1 << 3; // must be power of two\n public:\n  class Entry {\n   public:\n    Oop oop;\n    oop_int_t size;\n    oop_int_t fmt;\n    oop_int_t fixedFields;\n\n    void flush() { oop = Oop::from_bits(0); }\n    void install(Oop x, bool stringy);\n    bool matches(Oop x) { return oop == x; }\n    bool verify() { return oop.verify_object_or_null(); }\n  } ats[Num_Entries], at_puts[Num_Entries];\n  Entry* get_entry(Oop rcvr, bool isPut) {\n    return &(isPut ? at_puts : ats)[rcvr.bits_for_hash() & (Num_Entries - 1)];\n  }\n  void flush_at_cache() {\n    for (int i = 0;  i < Num_Entries;  ++i){\n      ats[i].flush();\n      at_puts[i].flush();\n    }\n  }\n\n  bool verify() {\n    for (int i = 0;  i < Num_Entries; ++i) {\n      ats[i].verify();\n      at_puts[i].verify();\n    }\n    return true;\n  }\n};\n\n"
  },
  {
    "path": "vm/src/interpreter/external_primitive_table.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass External_Primitive_Table: public Abstract_Primitive_Table {\npublic:\n\n\n  void* operator new(size_t size) {\n    return Memory_Semantics::shared_malloc(size);\n  }\n\n  External_Primitive_Table() : Abstract_Primitive_Table(4096, true) { }\n\n  int add(fn_t addr, bool on_main) {\n    for (int i = 0;  i < size;  ++i)\n      if (contents[i] == NULL) {\n        // Entry is empty, lets try to set it\n        if (OS_Interface::atomic_compare_and_swap((int*)&contents[i], (int)NULL, (int)addr)) {\n          execute_on_main[i] = on_main;\n          return i + 1;\n        }\n        else {\n          // Setting new address failed because of a concurrent modification\n          assert(contents[i] != NULL);\n        }\n      }\n    lprintf(\"External_Primitive_Table is too small!\");\n    return lookup_failed;\n  }\n\n};\n\n"
  },
  {
    "path": "vm/src/interpreter/interpreter_bytecodes.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\nvoid Squeak_Interpreter::pushReceiverVariableBytecode() {\n  fetchNextBytecode();\n  pushReceiverVariable(prevBytecode & 0xf);\n}\nvoid Squeak_Interpreter::pushTemporaryVariableBytecode() {\n  fetchNextBytecode();\n  pushTemporaryVariable(prevBytecode & 0xf);\n}\nvoid Squeak_Interpreter::pushLiteralConstantBytecode() {\n  fetchNextBytecode();\n  pushLiteralConstant(prevBytecode & 0x1f);\n}\nvoid Squeak_Interpreter::pushLiteralVariableBytecode() {\n  fetchNextBytecode();\n  pushLiteralVariable(prevBytecode & 0x1f);\n}\n\nvoid Squeak_Interpreter::storeAndPopReceiverVariableBytecode() {\n  fetchNextBytecode();\n  // could watch for suspended context change here\n  receiver_obj()->storePointer(prevBytecode & 7, stackTop());\n  pop(1);\n}\n\nvoid Squeak_Interpreter::storeAndPopTemporaryVariableBytecode() {\n  fetchNextBytecode();\n  assert(theHomeContext() != roots.nilObj);\n\ttheHomeContext_obj()->storePointerIntoContext((prevBytecode & 7) + Object_Indices::TempFrameStart, stackTop());\n\tpop(1);\n\n}\nvoid Squeak_Interpreter::pushReceiverBytecode() {\n  fetchNextBytecode();\n  push(roots.receiver);\n}\nvoid Squeak_Interpreter::pushConstantTrueBytecode() {\n  fetchNextBytecode();\n  push(roots.trueObj);\n}\nvoid Squeak_Interpreter::pushConstantFalseBytecode() {\n  fetchNextBytecode();\n  push(roots.falseObj);\n}\nvoid Squeak_Interpreter::pushConstantNilBytecode() {\n  fetchNextBytecode();\n  push(roots.nilObj);\n}\nvoid Squeak_Interpreter::pushConstantMinusOneBytecode() {\n  fetchNextBytecode();\n  push(Oop::from_int(-1));\n}\nvoid Squeak_Interpreter::pushConstantZeroBytecode() {\n  fetchNextBytecode();\n  push(Oop::from_int(0));\n}\nvoid Squeak_Interpreter::pushConstantOneBytecode() {\n  fetchNextBytecode();\n  push(Oop::from_int(1));\n}\nvoid Squeak_Interpreter::pushConstantTwoBytecode() {\n  fetchNextBytecode();\n  push(Oop::from_int(2));\n}\n\nvoid Squeak_Interpreter::returnReceiver() {\n  commonReturn(sender(), roots.receiver);\n}\nvoid Squeak_Interpreter::returnTrue() {\n  commonReturn(sender(), roots.trueObj);\n}\nvoid Squeak_Interpreter::returnFalse() {\n  commonReturn(sender(), roots.falseObj);\n}\nvoid Squeak_Interpreter::returnNil() {\n  commonReturn(sender(), roots.nilObj);\n}\n\nvoid Squeak_Interpreter::returnTopFromMethod() {\n  commonReturn(sender(), stackTop());\n}\nvoid Squeak_Interpreter::returnTopFromBlock() {\n  commonReturn(caller(), stackTop());\n}\n\n\nvoid Squeak_Interpreter::unknownBytecode() {\n  untested();\n  fatal(\"unknown bytecode\");\n}\n\nvoid Squeak_Interpreter::extendedPushBytecode() {\n  u_char descriptor = fetchByte();\n  fetchNextBytecode();\n  int i = descriptor & 0x3f;\n  switch ((descriptor >> 6) & 3) {\n    case 0: pushReceiverVariable(i);  break;\n    case 1: pushTemporaryVariable(i); break;\n    case 2: pushLiteralConstant(i); break;\n    case 3: pushLiteralVariable(i); break;\n  }\n}\n\nvoid Squeak_Interpreter::extendedStoreBytecode() {\n  u_char d = fetchByte();\n  fetchNextBytecode();\n  u_char vi = d & 63;\n  switch ((d >> 6) & 3) {\n    case 0:\n      // could watch for suspended context change here\n      receiver_obj()->storePointer(vi, stackTop());\n      break;\n    case 1:\n      theHomeContext_obj()->storePointerIntoContext(\n                                                vi + Object_Indices::TempFrameStart, stackTop());\n      break;\n    case 2:\n      fatal(\"illegal store\");\n    case 3:\n      literal(vi).as_object()->storePointer(Object_Indices::ValueIndex, stackTop());\n      break;\n  }\n}\n\nvoid Squeak_Interpreter::extendedStoreAndPopBytecode() {\n  extendedStoreBytecode();\n  pop(1);\n}\nvoid Squeak_Interpreter::singleExtendedSendBytecode() {\n  u_char d = fetchByte();\n  roots.messageSelector = literal(d & 0x1f);\n  set_argumentCount( d >> 5 );\n  normalSend();\n}\nvoid Squeak_Interpreter::doubleExtendedDoAnythingBytecode() {\n  /*\n   \"Replaces the Blue Book double-extended send [132], in which the first byte \n    was wasted on 8 bits of argument count.\n    Here we use 3 bits for the operation sub-type (opType),  and the remaining\n    5 bits for argument count where needed.\n    The last byte give access to 256 instVars or literals.\n    See also secondExtendedSendBytecode\"\n   */\n  u_char b2 = fetchByte();\n  u_char b3 = fetchByte();\n  switch (b2 >> 5) {\n    case 0:\n      roots.messageSelector = literal(b3);\n      set_argumentCount( b2 & 31 );\n      normalSend();\n      break;\n    case 1:\n      roots.messageSelector = literal(b3);\n      set_argumentCount( b2 & 31);\n      superclassSend();\n      break;\n    case 2:\n      fetchNextBytecode();\n      pushReceiverVariable(b3);\n      break;\n    case 3:\n      fetchNextBytecode();\n      pushLiteralConstant(b3);\n      break;\n    case 4:\n      fetchNextBytecode();\n      pushLiteralVariable(b3);\n      break;\n    case 5:\n      fetchNextBytecode();\n      // could watch for suspended context change here\n      receiver_obj()->storePointer(b3, stackTop());\n      break;\n    case 6: {\n      fetchNextBytecode();\n      Oop top = stackTop();\n      pop(1);\n      // could watch for suspended context change here\n      receiver_obj()->storePointer(b3, top);\n      break;\n    }\n    case 7:\n      fetchNextBytecode();\n      literal(b3).as_object()->storePointer(Object_Indices::ValueIndex, stackTop());\n      break;\n  }\n}\nvoid Squeak_Interpreter::singleExtendedSuperBytecode() {\n  u_char d = fetchByte();\n  roots.messageSelector = literal(d & 0x1f);\n  set_argumentCount( d >> 5 );\n  superclassSend();\n}\n\nvoid Squeak_Interpreter::secondExtendedSendBytecode() {\n  /*\n   This replaces the Blue Book double-extended super-send [134],\n   which is subsumed by the new double-extended do-anything [132].\n   It offers a 2-byte send of 0-3 args for up to 63 literals, for which\n   the Blue Book opcode set requires a 3-byte instruction.\"\n   */\n  u_char descriptor = fetchByte();\n  roots.messageSelector = literal(descriptor & 0x3f);\n  set_argumentCount( descriptor >> 6 );\n  assert (!stackValue(get_argumentCount()).is_mem()\n          || The_Memory_System()->object_table->probably_contains((void*)stackValue(get_argumentCount()).bits()));\n  normalSend();\n}\n\nvoid Squeak_Interpreter::popStackBytecode() { fetchNextBytecode(); pop(1); }\n\nvoid Squeak_Interpreter::duplicateTopBytecode() {\n  fetchNextBytecode();\n  push(stackTop());\n}\nvoid Squeak_Interpreter::pushActiveContextBytecode() {\n  fetchNextBytecode();\n  reclaimableContextCount = 0;\n  push(activeContext());\n}\nvoid Squeak_Interpreter::experimentalBytecode() {\n  untested();\n  unimplemented();\n}\nvoid Squeak_Interpreter::shortUnconditionalJump() { jump((currentBytecode & 7) + 1); }\nvoid Squeak_Interpreter::shortConditionalJump()   { jumpIfFalseBy((currentBytecode & 7) + 1); }\n\n\nvoid Squeak_Interpreter::longUnconditionalJump() {\n  int offset = long_jump_offset();\n  set_instructionPointer(instructionPointer() + offset);\n  if (offset < 0)\n    quickCheckForInterrupts();\n  fetchNextBytecode();\n}\nvoid Squeak_Interpreter::longJumpIfTrue() {\n  jumpIfTrueBy(long_cond_jump_offset());\n}\nvoid Squeak_Interpreter::longJumpIfFalse() {\n  jumpIfFalseBy(long_cond_jump_offset());\n}\n\nvoid Squeak_Interpreter::bytecodePrimAdd() {\n  Oop rcvr = stackValue(1);\n  Oop arg  = stackValue(0);\n  if (areIntegers(rcvr, arg)) {\n    oop_int_t r = rcvr.integerValue() + arg.integerValue();\n    if (Oop::isIntegerValue(r)) {\n      popThenPush(2, Oop::from_int(r));\n      fetchNextBytecode();\n      return;\n    }\n  }\n  else {\n    successFlag = true;\n    {\n      Safepoint_Ability sa(true);\n      primitiveFloatAdd(rcvr, arg);\n    }\n    if (successFlag) {\n      fetchNextBytecode();\n      return;\n    }\n  }\n  roots.messageSelector = specialSelector(0);\n  set_argumentCount(1);\n  normalSend();\n}\n\nvoid Squeak_Interpreter::bytecodePrimSubtract() {\n  Oop rcvr = stackValue(1);\n  Oop arg  = stackValue(0);\n  if (areIntegers(rcvr, arg)) {\n    oop_int_t r = rcvr.integerValue() - arg.integerValue();\n    if (Oop::isIntegerValue(r)) {\n      popThenPush(2, Oop::from_int(r));\n      fetchNextBytecode();\n      return;\n    }\n  }\n  else {\n    successFlag = true;\n    {\n      Safepoint_Ability sa(true);\n      primitiveFloatSubtract(rcvr, arg);\n    }\n    if (successFlag) {\n      fetchNextBytecode();\n      return;\n    }\n  }\n  roots.messageSelector = specialSelector(1);\n  set_argumentCount(1);\n  normalSend();\n}\n\nvoid Squeak_Interpreter::bytecodePrimMultiply() {\n  Oop rcvr = stackValue(1);\n  Oop arg  = stackValue(0);\n  \n  if (areIntegers(rcvr, arg)) {\n    oop_int_t ri = rcvr.integerValue();\n    oop_int_t ai = arg.integerValue();\n    long long result_with_overflow = (long long)ri * ai;\n    if (Oop::isIntegerValue(result_with_overflow)) {\n      popThenPush(2, Oop::from_int(result_with_overflow));\n      fetchNextBytecode();\n      return;\n    }\n  }\n  else {\n    successFlag = true;\n    {\n      Safepoint_Ability sa(true);\n      primitiveFloatMultiply(rcvr, arg);\n    }\n    if (successFlag) {\n      fetchNextBytecode();\n      return;\n    }\n  }\n  roots.messageSelector = specialSelector(8);\n  set_argumentCount(1);\n  normalSend();\n}\n\nvoid Squeak_Interpreter::bytecodePrimDivide() {\n  Oop rcvr = stackValue(1);\n  Oop arg  = stackValue(0);\n  if (areIntegers(rcvr, arg)) {\n    oop_int_t ri = rcvr.integerValue();\n    oop_int_t ai = arg.integerValue();\n    if (ai != 0   &&   ri % ai  == 0) {\n      oop_int_t r = ri / ai;\n      if (Oop::isIntegerValue(r)) {\n        popThenPush(2, Oop::from_int(r));\n        fetchNextBytecode();\n        return;\n      }\n    }\n  }\n  else {\n    successFlag = true;\n    {\n      Safepoint_Ability sa(true);\n      primitiveFloatDivide(rcvr, arg);\n    }\n    if (successFlag) {\n      fetchNextBytecode();\n      return;\n    }\n  }\n  roots.messageSelector = specialSelector(9);\n  set_argumentCount(1);\n  normalSend();\n}\n\nvoid Squeak_Interpreter::bytecodePrimMod() {\n  successFlag = true;\n  int mod = doPrimitiveMod(stackValue(1), stackValue(0));\n  if (successFlag) {\n    popThenPush(2, Oop::from_int(mod));\n    fetchNextBytecode();\n    return;\n  }\n  roots.messageSelector = specialSelector(10);\n  set_argumentCount(1);\n  normalSend();\n}\n\nvoid Squeak_Interpreter::bytecodePrimLessThan() {\n  Oop rcvr = stackValue(1);\n  Oop arg  = stackValue(0);\n  if (areIntegers(rcvr, arg)) {\n    booleanCheat(rcvr.integerValue() < arg.integerValue());\n    return;\n  }\n  else {\n    successFlag = true;\n    bool aBool = primitiveFloatLess(rcvr, arg);\n    if (successFlag) {\n      booleanCheat(aBool);\n      return;\n    }\n  }\n  roots.messageSelector = specialSelector(2);\n  set_argumentCount(1);\n  normalSend();\n}\nvoid Squeak_Interpreter::bytecodePrimGreaterThan() {\n  Oop rcvr = stackValue(1);\n  Oop arg  = stackValue(0);\n  if (areIntegers(rcvr, arg)) {\n    booleanCheat(rcvr.integerValue() > arg.integerValue());\n    return;\n  }\n  else {\n    successFlag = true;\n    bool aBool = primitiveFloatGreater(rcvr, arg);\n    if (successFlag) {\n      booleanCheat(aBool);\n      return;\n    }\n  }\n  roots.messageSelector = specialSelector(3);\n  set_argumentCount(1);\n  normalSend();\n}\n\nvoid Squeak_Interpreter::bytecodePrimLessOrEqual() {\n  Oop rcvr = stackValue(1);\n  Oop arg  = stackValue(0);\n  if (areIntegers(rcvr, arg)) {\n    booleanCheat(rcvr.integerValue() <= arg.integerValue());\n    return;\n  }\n  else {\n    successFlag = true;\n    bool aBool = !primitiveFloatGreater(rcvr, arg);\n    if (successFlag) {\n      booleanCheat(aBool);\n      return;\n    }\n  }\n  roots.messageSelector = specialSelector(4);\n  set_argumentCount(1);\n  normalSend();\n}\n\nvoid Squeak_Interpreter::bytecodePrimGreaterOrEqual() {\n  Oop rcvr = stackValue(1);\n  Oop arg  = stackValue(0);\n  if (areIntegers(rcvr, arg)) {\n    booleanCheat(rcvr.integerValue() >= arg.integerValue());\n    return;\n  }\n  else {\n    successFlag = true;\n    bool aBool = !primitiveFloatLess(rcvr, arg);\n    if (successFlag) {\n      booleanCheat(aBool);\n      return;\n    }\n  }\n  roots.messageSelector = specialSelector(5);\n  set_argumentCount(1);\n  normalSend();\n}\n\nvoid Squeak_Interpreter::bytecodePrimEqual() {\n  Oop rcvr = stackValue(1);\n  Oop arg  = stackValue(0);\n  if (areIntegers(rcvr, arg)) {\n    booleanCheat(rcvr == arg);\n    return;\n  }\n  else {\n    successFlag = true;\n    bool aBool = primitiveFloatEqual(rcvr, arg);\n    if (successFlag) {\n      booleanCheat(aBool);\n      return;\n    }\n  }\n  roots.messageSelector = specialSelector(6);\n  set_argumentCount(1);\n  normalSend();\n}\n\nvoid Squeak_Interpreter::bytecodePrimNotEqual() {\n  Oop rcvr = stackValue(1);\n  Oop arg  = stackValue(0);\n  if (areIntegers(rcvr, arg)) {\n    booleanCheat(rcvr != arg);\n    return;\n  }\n  else {\n    successFlag = true;\n    bool aBool = !primitiveFloatEqual(rcvr, arg);\n    if (successFlag) {\n      booleanCheat(aBool);\n      return;\n    }\n  }\n  roots.messageSelector = specialSelector(7);\n  set_argumentCount(1);\n  normalSend();\n}\n\nvoid Squeak_Interpreter::bytecodePrimMakePoint() {\n  successFlag = true;\n  {\n    Safepoint_Ability sa(true);\n    primitiveMakePoint();\n  }\n  if (successFlag) {\n    fetchNextBytecode();\n    return;\n  }\n  roots.messageSelector = specialSelector(11);\n  set_argumentCount(1);\n  normalSend();\n}\n\nvoid Squeak_Interpreter::bytecodePrimBitShift() {\n  successFlag = true;\n  {\n    Safepoint_Ability sa(true);\n    primitiveBitShift();\n  }\n  if (successFlag) {\n    fetchNextBytecode();\n    return;\n  }\n  roots.messageSelector = specialSelector(12);\n  set_argumentCount(1);\n  normalSend();\n}\nvoid Squeak_Interpreter::bytecodePrimDiv() {\n  successFlag = true;\n  int32 quotient = doPrimitiveDiv(stackValue(1), stackValue(0));\n  if (successFlag) {\n    popThenPush(2, Oop::from_int(quotient));\n    fetchNextBytecode();\n    return;\n  }\n  roots.messageSelector = specialSelector(13);\n  set_argumentCount(1);\n  normalSend();\n}\nvoid Squeak_Interpreter::bytecodePrimBitAnd() {\n  successFlag = true;\n  {\n    Safepoint_Ability sa(true);\n    primitiveBitAnd();\n  }\n  if (successFlag) {\n    fetchNextBytecode();\n    return;\n  }\n  roots.messageSelector = specialSelector(14);\n  set_argumentCount(1);\n  normalSend();\n}\nvoid Squeak_Interpreter::bytecodePrimBitOr() {\n  successFlag = true;\n  {\n    Safepoint_Ability sa(true);\n    primitiveBitOr();\n  }\n  if (successFlag) {\n    fetchNextBytecode();\n    return;\n  }\n  roots.messageSelector = specialSelector(15);\n  set_argumentCount(1);\n  normalSend();\n}\n\nvoid Squeak_Interpreter::bytecodePrimAt() {\n  Oop index = stackTop();\n  Oop rcvr = stackValue(1);\n  successFlag = rcvr.is_mem() && index.is_int();\n  if (successFlag) {\n    At_Cache::Entry* e = atCache.get_entry(rcvr, false);\n    if (e->matches(rcvr)) {\n      Oop result = commonVariableAt(rcvr, index.integerValue(), e, true);\n      if (successFlag) {\n        fetchNextBytecode();\n        popThenPush(2, result);\n        return;\n      }\n    }\n  }\n  roots.messageSelector = specialSelector(16);\n  set_argumentCount(1);\n  normalSend();\n}\n\nvoid Squeak_Interpreter::bytecodePrimAtPut() {\n  Oop value = stackTop();\n  Oop index = stackValue(1);\n  Oop rcvr = stackValue(2);\n  successFlag = rcvr.is_mem() && index.is_int();\n  if (successFlag) {\n    At_Cache::Entry* e = atCache.get_entry(rcvr, true);\n    if (e->matches(rcvr)) {\n      commonVariableAtPut(rcvr, index.integerValue(), value, e);\n      if (successFlag) {\n        fetchNextBytecode();\n        popThenPush(3, value);\n        return;\n      }\n    }\n  }\n  roots.messageSelector = specialSelector(17);\n  set_argumentCount( 2 );\n  normalSend();\n}\n\nvoid Squeak_Interpreter::bytecodePrimSize() {\n  roots.messageSelector = specialSelector(18);\n  set_argumentCount(0);\n  normalSend();\n}\nvoid Squeak_Interpreter::bytecodePrimNext() {\n  roots.messageSelector = specialSelector(19);\n  set_argumentCount(0);\n  normalSend();\n}\nvoid Squeak_Interpreter::bytecodePrimNextPut() {\n  roots.messageSelector = specialSelector(20);\n  set_argumentCount(1);\n  normalSend();\n}\nvoid Squeak_Interpreter::bytecodePrimAtEnd() {\n  roots.messageSelector = specialSelector(21);\n  set_argumentCount(0);\n  normalSend();\n}\nvoid Squeak_Interpreter::bytecodePrimEquivalent() {\n  booleanCheat(stackValue(1) == stackValue(0));\n}\n\nvoid Squeak_Interpreter::bytecodePrimClass() {\n  popThenPush(1, stackTop().fetchClass());\n  fetchNextBytecode();\n}\n\nvoid Squeak_Interpreter::bytecodePrimBlockCopy() {\n  Oop rcvr = stackValue(1);\n  successFlag = true;\n  success(rcvr.as_object()->hasContextHeader());\n  if (successFlag) {\n    {\n      Safepoint_Ability sa(true);\n      primitiveBlockCopy();\n    }\n  }\n  if (!successFlag) {\n    roots.messageSelector = specialSelector(24);\n    set_argumentCount(1);\n    normalSend();\n    return;\n  }\n  fetchNextBytecode();\n}\n\nvoid Squeak_Interpreter::commonBytecodePrimValue(int nargs, int selector_index) {\n  Oop block = stackPointer()[-nargs];\n  successFlag = true;\n  set_argumentCount(nargs);\n  Oop klass = block.fetchClass();\n  bool classOK = true;\n  \n# if Include_Closure_Support\n  if (klass == splObj(Special_Indices::ClassBlockClosure)) {\n    primitiveClosureValue();\n  }\n  else \n# endif\n  if (klass == splObj(Special_Indices::ClassBlockContext)) {\n    primitiveValue();\n  } \n  else\n    classOK = false;\n  \n  if (classOK && successFlag) \n    fetchNextBytecode();\n  else {\n    roots.messageSelector = specialSelector(selector_index);\n    normalSend();\n  }  \n}\n\nvoid Squeak_Interpreter::bytecodePrimValue() {\n  commonBytecodePrimValue(0, 25);\n}\n\nvoid Squeak_Interpreter::bytecodePrimValueWithArg() {\n  commonBytecodePrimValue(1, 26);\n}\n\nvoid Squeak_Interpreter::bytecodePrimDo() {\n  roots.messageSelector = specialSelector(27);\n  set_argumentCount(1);\n  normalSend();\n}\nvoid Squeak_Interpreter::bytecodePrimNew() {\n  roots.messageSelector = specialSelector(28);\n  set_argumentCount(0);\n  normalSend();\n}\nvoid Squeak_Interpreter::bytecodePrimNewWithArg() {\n  roots.messageSelector = specialSelector(29);\n  set_argumentCount(1);\n  normalSend();\n}\n\nvoid Squeak_Interpreter::bytecodePrimPointX() {\n  successFlag = true;\n  Oop rcvr = stackTop();\n  assertClass(rcvr, splObj(Special_Indices::ClassPoint));\n  if (successFlag) {\n    popThenPush(1, rcvr.as_object()->fetchPointer(Object_Indices::XIndex));\n    fetchNextBytecode();\n    return;\n  }\n  roots.messageSelector = specialSelector(30);\n  set_argumentCount(0);\n  normalSend();\n}\n\nvoid Squeak_Interpreter::bytecodePrimPointY() {\n  successFlag = true;\n  Oop rcvr = stackTop();\n  assertClass(rcvr, splObj(Special_Indices::ClassPoint));\n  if (successFlag) {\n    popThenPush(1, rcvr.as_object()->fetchPointer(Object_Indices::YIndex));\n    fetchNextBytecode();\n    return;\n  }\n  roots.messageSelector = specialSelector(31);\n  set_argumentCount(0);\n  normalSend();\n}\n\n\nvoid Squeak_Interpreter::sendLiteralSelectorBytecode() {\n\t// \"Can use any of the first 16 literals for the selector and pass up to 2 arguments.\"\n  assert(method_obj()->isCompiledMethod());\n\troots.messageSelector = literal(currentBytecode & 0xf);\n\n  if (check_assertions && !roots.messageSelector.is_mem()) {\n    Printer* p = error_printer;\n    p->printf(\"on %d: msgSel is int; method bits 0x%x, method->obj 0x%x, method obj 0x%x, method obj as_oop 0x%x, msgSel 0x%x\\n\",\n              Logical_Core::my_rank(), method().bits(), (Object*)method().as_object(), (Object*)method_obj(), method_obj()->as_oop().bits(), roots.messageSelector.bits());\n    method_obj()->print(p);\n    p->nl();\n    method_obj()->print_compiled_method(p);\n    p->nl();\n\n    OS_Interface::abort();\n  }\n  assert(roots.messageSelector.is_mem());\n  set_argumentCount( ((currentBytecode >> 4) & 3) - 1 );\n  normalSend();\n}\n\n# if Include_Closure_Support\n\nvoid Squeak_Interpreter::pushNewArrayBytecode() {\n  u_char size = fetchByte();\n  bool popValues = size > 127;\n  size &= 127;\n  fetchNextBytecode();\n  Object_p array_obj;\n  {\n    Safepoint_Ability sa(true);\n    array_obj = splObj_obj(Special_Indices::ClassArray)->instantiateClass(size);\n  }\n  if (popValues) {\n    for ( int i = 0;  i < size;  ++i )\n      // Assume new Array is young, so use unchecked stores\n      array_obj->storePointerUnchecked(i, stackValue(size - i - 1));\n    pop(size);\n  }\n  push(array_obj->as_oop());\n}\n\n\nvoid Squeak_Interpreter::pushRemoteTempLongBytecode() {\n  u_char remoteTempIndex = fetchByte();\n  u_char tempVectorIndex = fetchByte();\n  fetchNextBytecode();\n  pushRemoteTempInVectorAt(remoteTempIndex, tempVectorIndex);\n}\n\nvoid Squeak_Interpreter::storeRemoteTempLongBytecode() {\n  u_char remoteTempIndex = fetchByte(); // which temp on stack\n  u_char tempVectorIndex = fetchByte(); // which 0-origin index into vector\n  fetchNextBytecode();\n  storeRemoteTempInVectorAt(remoteTempIndex, tempVectorIndex);\n}\n\nvoid Squeak_Interpreter::storeAndPopRemoteTempLongBytecode() {\n  storeRemoteTempLongBytecode();\n  pop(1);\n}\n\n\nvoid Squeak_Interpreter::pushRemoteTempInVectorAt(u_char indexIntoVector, u_char  indexOfVectorIntoContext) {\n  Oop tempVector = temporary(indexOfVectorIntoContext);\n  push(tempVector.as_object()->fetchPointer(indexIntoVector));\n}\n\nvoid Squeak_Interpreter::storeRemoteTempInVectorAt(u_char indexIntoVector, u_char  indexOfVectorIntoContext) {\n  Oop tempVector = temporary(indexOfVectorIntoContext);\n  tempVector.as_object()->storePointer(indexIntoVector, stackTop());\n}\n\n\nvoid Squeak_Interpreter::pushClosureCopyCopiedValuesBytecode() {\n  /* \"The compiler has pushed the values to be copied, if any.  Find numArgs \n      and numCopied in the byte following.\n      Create a Closure with space for the copiedValues and pop numCopied\n      values off the stack into the closure.\n      Set numArgs as specified, and set startpc to the pc following the block\n      size and jump over that code.\"*/\n  \n  image_version = Squeak_Image_Reader::Post_Closure_32_Bit_Image_Version;\n\n  u_char numArgsNumCopied = fetchByte();\n  u_int32 numArgs   = numArgsNumCopied & 0xf;\n  u_int32 numCopied = numArgsNumCopied >> (u_int32)4;\n  \n  u_int32 blockSize = fetchByte() << 8;\n  blockSize += (u_int32)fetchByte();\n  \n  Oop newClosure = closureCopy(numArgs, instructionPointer() + 2 - (method_obj()->as_u_char_p() + Object::BaseHeaderSize), numCopied);\n  // Recover from GC, but no Object* 's\n\n  Object_p newClosure_obj = newClosure.as_object();\n  newClosure_obj->storePointerUnchecked(Object_Indices::ClosureOuterContextIndex, activeContext());\n  reclaimableContextCount = 0; // The closure refers to thisContext so it cannot be reclaimed\n  if (numCopied > 0) {\n    for (u_int32 i = 0;  i < numCopied;  ++i )\n      newClosure_obj->storePointerUnchecked(i + Object_Indices::ClosureFirstCopiedValueIndex, stackValue( numCopied - i - 1));\n    pop(numCopied);\n  }\n  set_instructionPointer(instructionPointer() + blockSize);\n  fetchNextBytecode();\n  push(newClosure);\n}\n\n\nOop Squeak_Interpreter::closureCopy(u_int32 numArgs, u_int32 initialIP, u_int32 numCopied) {\n  Object_p newClosure_obj;\n  {\n    Safepoint_Ability sa(true);\n    newClosure_obj = splObj_obj(Special_Indices::ClassBlockClosure)->instantiateSmallClass(\n                (Object_Indices::ClosureFirstCopiedValueIndex + numCopied) * sizeof(Oop)  +  Object::BaseHeaderSize);\n  }\n  // Assume young, use unchecked\n  newClosure_obj->storePointerUnchecked(Object_Indices::ClosureStartPCIndex, Oop::from_int(initialIP)),\n  newClosure_obj->storePointerUnchecked(Object_Indices::ClosureNumArgsIndex, Oop::from_int(numArgs));\n  return newClosure_obj->as_oop();\n}\n\n\nint Squeak_Interpreter::remoteTempLong_literal_index(u_char* bcp) {\n  return bcp[1]; // also bcp[2] but my framework doesn't support it\n}\n\nint Squeak_Interpreter::pushRemoteTempLongBytecode_literal_index(u_char* bcp) { return remoteTempLong_literal_index(bcp); }\nint Squeak_Interpreter::storeRemoteTempLongBytecode_literal_index(u_char* bcp) { return remoteTempLong_literal_index(bcp); }\nint Squeak_Interpreter::storeAndPopRemoteTempLongBytecode_literal_index(u_char* bcp) { return remoteTempLong_literal_index(bcp); }\n# endif\n\n\nint Squeak_Interpreter::extendedStoreBytecode_literal_index(u_char* bcp) {\n  u_char d = bcp[1];\n  u_char vi = d & 63;\n  if (((d >> 6) & 3) == 3) return vi;\n  return -1;\n}\n\nint Squeak_Interpreter::singleExtendedSendBytecode_literal_index(u_char* bcp) {\n  u_char d = bcp[1];\n  return d & 0x1f;\n}\n\nint Squeak_Interpreter::doubleExtendedDoAnythingBytecode_literal_index(u_char* bcp) {\n  u_char b2 = bcp[1];\n  u_char b3 = bcp[2];\n  switch (b2 >> 5) {\n      default: return -1;\n      case 0: return b3;\n      case 1: return b3;\n      case 7: return b3;\n  }\n}\n\nint Squeak_Interpreter::singleExtendedSuperBytecode_literal_index(u_char* bcp) {\n  return bcp[1] & 0x1f;\n}\n\nint Squeak_Interpreter::secondExtendedSendBytecode_literal_index(u_char* bcp) {\n  u_char descriptor = bcp[1];\n  return descriptor & 0x3f;\n}\n\n\nint Squeak_Interpreter::sendLiteralSelectorBytecode_literal_index(u_char* bcp) {\n  return *bcp & 0xf;\n}\n\n"
  },
  {
    "path": "vm/src/interpreter/interpreter_bytecodes.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n// included INTO THE MIDDLE of Squeak_Interpreter\n\n\nvoid pushReceiverVariableBytecode();\nvoid pushTemporaryVariableBytecode();\nvoid pushLiteralConstantBytecode();\nvoid pushLiteralVariableBytecode();\nvoid storeAndPopReceiverVariableBytecode();\nvoid storeAndPopTemporaryVariableBytecode();\nvoid pushReceiverBytecode();\nvoid pushConstantTrueBytecode();\nvoid pushConstantFalseBytecode();\nvoid pushConstantNilBytecode();\nvoid pushConstantMinusOneBytecode();\nvoid pushConstantZeroBytecode();\nvoid pushConstantOneBytecode();\nvoid pushConstantTwoBytecode();\nvoid returnReceiver();\nvoid returnTrue();\nvoid returnFalse();\nvoid returnNil();\nvoid returnTopFromMethod();\nvoid returnTopFromBlock();\nvoid unknownBytecode();\nvoid extendedPushBytecode();\n\nvoid extendedStoreBytecode();\nvoid extendedStoreAndPopBytecode();\nvoid singleExtendedSendBytecode();\nvoid doubleExtendedDoAnythingBytecode();\nvoid singleExtendedSuperBytecode();\nvoid secondExtendedSendBytecode();\nvoid popStackBytecode();\nvoid duplicateTopBytecode();\nvoid pushActiveContextBytecode();\nvoid experimentalBytecode();\nvoid shortUnconditionalJump();\nvoid shortConditionalJump();\nvoid longUnconditionalJump();\nvoid longJumpIfTrue();\nvoid longJumpIfFalse();\n\n# if Include_Closure_Support\n  void pushNewArrayBytecode();\n  void pushRemoteTempLongBytecode();\n  void storeRemoteTempLongBytecode();\n  void storeAndPopRemoteTempLongBytecode();\n  void pushClosureCopyCopiedValuesBytecode();\n\n  void pushRemoteTempInVectorAt(u_char, u_char);\n  void storeRemoteTempInVectorAt(u_char, u_char);\n  Oop closureCopy(u_int32, u_int32, u_int32);\n# endif\n\n\nvoid bytecodePrimAdd();\nvoid bytecodePrimSubtract();\nvoid bytecodePrimLessThan();\nvoid bytecodePrimGreaterThan();\nvoid bytecodePrimLessOrEqual();\nvoid bytecodePrimGreaterOrEqual();\nvoid bytecodePrimEqual();\nvoid bytecodePrimNotEqual();\nvoid bytecodePrimMultiply();\nvoid bytecodePrimDivide();\nvoid bytecodePrimMod();\nvoid bytecodePrimMakePoint();\nvoid bytecodePrimBitShift();\nvoid bytecodePrimDiv();\nvoid bytecodePrimBitAnd();\nvoid bytecodePrimBitOr();\n\nvoid bytecodePrimAt();\nvoid bytecodePrimAtPut();\nvoid bytecodePrimSize();\nvoid bytecodePrimNext();\nvoid bytecodePrimNextPut();\nvoid bytecodePrimAtEnd();\nvoid bytecodePrimEquivalent();\nvoid bytecodePrimClass();\nvoid bytecodePrimBlockCopy();\nvoid bytecodePrimValue();\nvoid bytecodePrimValueWithArg();\nvoid commonBytecodePrimValue(int, int);\nvoid bytecodePrimDo();\nvoid bytecodePrimNew();\nvoid bytecodePrimNewWithArg();\nvoid bytecodePrimPointX();\nvoid bytecodePrimPointY();\n\nvoid sendLiteralSelectorBytecode();\n\n\n\n\n\nint pushReceiverVariableBytecode_literal_index(u_char*)  { return -1; }\nint pushTemporaryVariableBytecode_literal_index(u_char*)  { return -1; }\nint pushLiteralConstantBytecode_literal_index(u_char*)  { return -1; }\nint pushLiteralVariableBytecode_literal_index(u_char*)  { return -1; }\nint storeAndPopReceiverVariableBytecode_literal_index(u_char*)  { return -1; }\nint storeAndPopTemporaryVariableBytecode_literal_index(u_char*)  { return -1; }\nint pushReceiverBytecode_literal_index(u_char*)  { return -1; }\nint pushConstantTrueBytecode_literal_index(u_char*)  { return -1; }\nint pushConstantFalseBytecode_literal_index(u_char*)  { return -1; }\nint pushConstantNilBytecode_literal_index(u_char*)  { return -1; }\nint pushConstantMinusOneBytecode_literal_index(u_char*)  { return -1; }\nint pushConstantZeroBytecode_literal_index(u_char*)  { return -1; }\nint pushConstantOneBytecode_literal_index(u_char*)  { return -1; }\nint pushConstantTwoBytecode_literal_index(u_char*)  { return -1; }\nint returnReceiver_literal_index(u_char*)  { return -1; }\nint returnTrue_literal_index(u_char*)  { return -1; }\nint returnFalse_literal_index(u_char*)  { return -1; }\nint returnNil_literal_index(u_char*)  { return -1; }\nint returnTopFromMethod_literal_index(u_char*)  { return -1; }\nint returnTopFromBlock_literal_index(u_char*)  { return -1; }\nint unknownBytecode_literal_index(u_char*)  { return -1; }\nint extendedPushBytecode_literal_index(u_char*)  { return -1; }\n\nint extendedStoreBytecode_literal_index(u_char*);\nint extendedStoreAndPopBytecode_literal_index(u_char*)  { return -1; }\nint singleExtendedSendBytecode_literal_index(u_char*);\nint doubleExtendedDoAnythingBytecode_literal_index(u_char*);\nint singleExtendedSuperBytecode_literal_index(u_char*);\nint secondExtendedSendBytecode_literal_index(u_char*);\nint popStackBytecode_literal_index(u_char*)  { return -1; }\nint duplicateTopBytecode_literal_index(u_char*)  { return -1; }\nint pushActiveContextBytecode_literal_index(u_char*)  { return -1; }\nint experimentalBytecode_literal_index(u_char*)  { return -1; }\nint shortUnconditionalJump_literal_index(u_char*)  { return -1; }\nint shortConditionalJump_literal_index(u_char*)  { return -1; }\nint longUnconditionalJump_literal_index(u_char*)  { return -1; }\nint longJumpIfTrue_literal_index(u_char*)  { return -1; }\nint longJumpIfFalse_literal_index(u_char*)  { return -1; }\n\n\nint bytecodePrimAdd_literal_index(u_char*)  { return -1; }\nint bytecodePrimSubtract_literal_index(u_char*)  { return -1; }\nint bytecodePrimLessThan_literal_index(u_char*)  { return -1; }\nint bytecodePrimGreaterThan_literal_index(u_char*)  { return -1; }\nint bytecodePrimLessOrEqual_literal_index(u_char*)  { return -1; }\nint bytecodePrimGreaterOrEqual_literal_index(u_char*)  { return -1; }\nint bytecodePrimEqual_literal_index(u_char*)  { return -1; }\nint bytecodePrimNotEqual_literal_index(u_char*)  { return -1; }\nint bytecodePrimMultiply_literal_index(u_char*)  { return -1; }\nint bytecodePrimDivide_literal_index(u_char*)  { return -1; }\nint bytecodePrimMod_literal_index(u_char*)  { return -1; }\nint bytecodePrimMakePoint_literal_index(u_char*)  { return -1; }\nint bytecodePrimBitShift_literal_index(u_char*)  { return -1; }\nint bytecodePrimDiv_literal_index(u_char*)  { return -1; }\nint bytecodePrimBitAnd_literal_index(u_char*)  { return -1; }\nint bytecodePrimBitOr_literal_index(u_char*)  { return -1; }\n\nint bytecodePrimAt_literal_index(u_char*)  { return -1; }\nint bytecodePrimAtPut_literal_index(u_char*)  { return -1; }\nint bytecodePrimSize_literal_index(u_char*)  { return -1; }\nint bytecodePrimNext_literal_index(u_char*)  { return -1; }\nint bytecodePrimNextPut_literal_index(u_char*)  { return -1; }\nint bytecodePrimAtEnd_literal_index(u_char*)  { return -1; }\nint bytecodePrimEquivalent_literal_index(u_char*)  { return -1; }\nint bytecodePrimClass_literal_index(u_char*)  { return -1; }\nint bytecodePrimBlockCopy_literal_index(u_char*)  { return -1; }\nint bytecodePrimValue_literal_index(u_char*)  { return -1; }\nint bytecodePrimValueWithArg_literal_index(u_char*)  { return -1; }\nint bytecodePrimDo_literal_index(u_char*)  { return -1; }\nint bytecodePrimNew_literal_index(u_char*)  { return -1; }\nint bytecodePrimNewWithArg_literal_index(u_char*)  { return -1; }\nint bytecodePrimPointX_literal_index(u_char*)  { return -1; }\nint bytecodePrimPointY_literal_index(u_char*)  { return -1; }\n\nint sendLiteralSelectorBytecode_literal_index(u_char*);\n\n# if Include_Closure_Support\nint pushNewArrayBytecode_literal_index(u_char*)  { return -1; }\nint pushRemoteTempLongBytecode_literal_index(u_char*);\nint storeRemoteTempLongBytecode_literal_index(u_char*);\nint storeAndPopRemoteTempLongBytecode_literal_index(u_char*);\n\nint remoteTempLong_literal_index(u_char*);\nint pushClosureCopyCopiedValuesBytecode_literal_index(u_char*)  { return -1; }\n\n# endif\n\n\n\n"
  },
  {
    "path": "vm/src/interpreter/interpreter_primitives.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# include \"headers.h\"\n\nvoid Squeak_Interpreter::primitiveAdd() {\n  pop2AndPushIntegerIfOK(stackIntegerValue(1) + stackIntegerValue(0));\n}\n\n# include <math.h>\n\nvoid Squeak_Interpreter::primitiveArctan() {\n  double r = popFloat();\n  if (successFlag) pushFloat(atan(r));\n  else unPop(1);\n}\n\nvoid Squeak_Interpreter::primitiveArrayBecome() {\n  success(The_Memory_System()->become_with_twoWay_copyHash(stackValue(1), stackTop(), true, true));\n  if (successFlag) pop(1);\n  // lprintf(\"primitiveArrayBecome\\n\"); \n}\n\nvoid Squeak_Interpreter::primitiveArrayBecomeOneWay() {\n  success(The_Memory_System()->become_with_twoWay_copyHash(stackValue(1), stackTop(), false, true));\n  if (successFlag) pop(1);\n  // lprintf(\"primitiveArrayBecomeOneWay\\n\");\n}\n\nvoid Squeak_Interpreter::primitiveArrayBecomeOneWayCopyHash() {\n  success(The_Memory_System()->become_with_twoWay_copyHash(stackValue(2), stackValue(1), false, booleanValueOf(stackTop())));\n  if (successFlag) pop(2);\n  // lprintf(\"primitiveArrayBecomeOneWayCopyHash\\n\");\n}\n\n\nvoid Squeak_Interpreter::primitiveAsFloat() {\n  oop_int_t a = popInteger();\n  if (successFlag)\n    pushFloat(double(a));\n  else\n    unPop(1);\n}\n\nvoid Squeak_Interpreter::primitiveAsOop() {\n  Oop r = stackTop();\n  success(r.is_mem());\n  if (successFlag)  popThenPushInteger(1, r.as_object()->hashBits());\n}\n\nvoid Squeak_Interpreter::primitiveAt() {\n  commonAt(false);\n}\n\nvoid Squeak_Interpreter::primitiveAtEnd() {\n  Oop stream = popStack();\n  Object_p so;\n  successFlag = stream.is_mem() && (so = stream.as_object())->isPointers()\n  && so->lengthOf() >= Object_Indices::StreamReadLimitIndex + 1;\n  if (successFlag) {\n    oop_int_t index = so->fetchInteger(Object_Indices::StreamIndexIndex);\n    oop_int_t limit = so->fetchInteger(Object_Indices::StreamReadLimitIndex);\n    if (successFlag)  {\n      pushBool(index >= limit);\n      return;\n    }\n    unPop(1);\n  }\n}\n\nvoid Squeak_Interpreter::primitiveAtPut() {\n  commonAtPut(false);\n}\n\nvoid Squeak_Interpreter::primitiveBeCursor() {\n  Oop cursorObj, maskObj;\n  char* maskBitsIndex;\n\n  if (get_argumentCount() == 0) {\n    cursorObj = stackTop();\n    maskBitsIndex = NULL;\n  }\n  else if (get_argumentCount() == 1) {\n    cursorObj = stackValue(1);\n    maskObj = stackTop();\n  }\n  success(get_argumentCount() < 2);\n\n  Object_p co;\n  success(cursorObj.is_mem() && (co = cursorObj.as_object())->lengthOf() >= 5);\n  Oop bitsObj;\n  Object_p bo;\n  Object_p oo;\n  oop_int_t extentX, extentY, depth;\n  if (successFlag) {\n    bitsObj = co->fetchPointer(0);\n    extentX = co->fetchInteger(1);\n    extentY = co->fetchInteger(2);\n    depth   = co->fetchInteger(3);\n    Oop offsetObj = co->fetchPointer(4);\n    success(offsetObj.is_mem()  &&  (oo = offsetObj.as_object())->lengthOf() >= 2);\n    success(bitsObj.is_mem()  &&  (bo = bitsObj.as_object()));\n  }\n  oop_int_t offsetX, offsetY;\n  char* cursorBitsIndex;\n  if (successFlag) {\n    offsetX = oo->fetchInteger(0);\n    offsetY = oo->fetchInteger(1);\n    success(extentX == 16  &&  extentY == 16  &&  depth == 1);\n    success(offsetX >= -16  &&  offsetX <= 0);\n    success(offsetY >= -16  &&  offsetY <= 0);\n    cursorBitsIndex = bo->as_char_p() + Object::BaseHeaderSize;\n  }\n  if (get_argumentCount() == 1) {\n    Object_p mo;\n    success(maskObj.is_mem() && (mo = maskObj.as_object())->lengthOf() >= 5);\n    if (successFlag) {\n      bitsObj = mo->fetchPointer(0);\n      extentX = mo->fetchInteger(1);\n      extentY = mo->fetchInteger(2);\n      depth = mo->fetchInteger(3);\n    }\n    if (successFlag) {\n      success(extentX == 16  &&  extentY == 16  &&  depth == 1);\n      success(bitsObj.is_mem()  &&  (bo = bitsObj.as_object())  && bo->lengthOf() == 16);\n      maskBitsIndex = bo->as_char_p() + Object::BaseHeaderSize;\n    }\n  }\n  if (successFlag) {\n    if (get_argumentCount() == 0)\n      ioSetCursor(cursorBitsIndex, offsetX, offsetY);\n    else\n      ioSetCursorWithMask(cursorBitsIndex, maskBitsIndex, offsetX, offsetY);\n    pop(get_argumentCount());\n  }\n}\n\nvoid Squeak_Interpreter::primitiveBeDisplay() {\n  Oop rcvr;\n  rcvr = stackTop();\n  success(rcvr.is_mem() &&  rcvr.as_object()->lengthOf() >= 4);\n  if (successFlag)\n    roots.specialObjectsOop.as_object()->storePointer(Special_Indices::TheDisplay, rcvr);\n}\n\nvoid Squeak_Interpreter::primitiveBeep() {\n  untested();\n  ioBeep();\n}\n\nvoid Squeak_Interpreter::primitiveBitAnd() {\n  oop_int_t a = popPos32BitInteger(), r = popPos32BitInteger();\n  if (successFlag)\n    push(Object::positive32BitIntegerFor(r & a));\n  else\n    unPop(2);\n}\n\nvoid Squeak_Interpreter::primitiveBitOr() {\n  oop_int_t a = popPos32BitInteger(), r = popPos32BitInteger();\n  if (successFlag)\n    push(Object::positive32BitIntegerFor(r | a));\n  else\n    unPop(2);\n}\n\nvoid Squeak_Interpreter::primitiveBitShift() {\n  oop_int_t a = popInteger();\n  u_oop_int_t shifted;\n  u_oop_int_t r = popPos32BitInteger();\n  if (successFlag) {\n    if (a >= 0) {\n      success(a <= 31);\n      shifted = r << a;\n      success((shifted >> a) == r);\n    }\n    else {\n      success(a >= -31);\n      shifted = r >> -a;\n    }\n  }\n  if (successFlag)  push(Object::positive32BitIntegerFor(shifted));\n  else unPop(2);\n}\n\nvoid Squeak_Interpreter::primitiveBitXor() {\n  oop_int_t a = popPos32BitInteger(), r = popPos32BitInteger();\n  if (successFlag)\n    push(Object::positive32BitIntegerFor(r ^ a));\n  else\n    unPop(2);\n}\n\nvoid Squeak_Interpreter::primitiveBlockCopy() {\n  Oop methodContext;\n  oop_int_t contextSize;\n  {\n    Oop context = stackValue(1); Object_p co = context.as_object();\n    methodContext = co->home_of_block_or_method_context()->as_oop();\n    assert(methodContext.as_object()->isMethodContext());\n    contextSize = methodContext.as_object()->sizeBits(); // in bytes, incl header\n  }\n  pushRemappableOop(methodContext);\n  Object_p nco = splObj_obj(Special_Indices::ClassBlockContext)->instantiateContext(contextSize);\n  methodContext = popRemappableOop();\n\n  oop_int_t initialIP = (instructionPointer() + 1 + 3) - (method_obj()->as_u_char_p() + Object::BaseHeaderSize);\n  // Was instructionPointer + 3, but now greater by 1 due to preinc\n\n  // Assume new context is young, so use unchecked stores\n  nco->storeIntegerUnchecked_into_context(Object_Indices::InitialIPIndex, initialIP);\n  nco->storeIntegerUnchecked_into_context(Object_Indices::InstructionPointerIndex, initialIP);\n  nco->storeStackPointerValue(0);\n  nco->storePointerIntoYoung(Object_Indices::BlockArgumentCountIndex, stackValue(0));\n  nco->storePointerIntoYoung(Object_Indices::HomeIndex, methodContext);\n  nco->storePointerIntoYoung(Object_Indices::SenderIndex, roots.nilObj);\n\n  nco->save_block_method_and_IP();\n\n  popThenPush(2, nco->as_oop());\n }\n\nvoid Squeak_Interpreter::primitiveBytesLeft() {\n  untested();\n  /*\n   Reports bytes available at this moment. For more meaningful\n   results, calls to this primitive should be preceeded by a full\n   or incremental garbage collection\n   */\n  switch (methodArgumentCount()) {\n    case 0:\n      popThenPushInteger(1, The_Memory_System()->bytesLeft(/* false */));\n      return;\n\n    case 1: {\n      bool swapSpace = booleanValueOf(stackTop());\n      if (!successFlag) return;\n      popThenPushInteger(2, The_Memory_System()->bytesLeft(/* swapSpace */));\n      return;\n    }\n    default:\n      primitiveFail();\n      return;\n  }\n}\n\nvoid Squeak_Interpreter::primitiveCalloutToFFI() {\n\n  untested();\n  /*\n   Perform a function call to a foreign function.\n   Only invoked from method containing explicit external call spec.\n   Due to this we use the pluggable prim mechanism explicitly here\n   (the first literal of any FFI spec'ed method is an ExternalFunction\n   and not an array as used in the pluggable primitive mechanism).\"\n   */\n  // Stefan: this Callout function just loads the callout primitive when it is\n  //         used for the first time, should be no problem to share it,\n  //         concurrent initialization does not pose a risk as far as i can see\n  static fn_t function = NULL;    // should be safe\n\n  static const char* moduleName = \"SqueakFFIPrims\";\n  static const char* functionName = \"primitiveCallout\";\n  assert_on_main();\n  if (function == NULL) {\n    function = ioLoadExternalFunctionOfLengthFromModuleOfLength((char*)functionName, 16, (char*)moduleName, 14);\n    if (function == NULL) {\n      primitiveFail();\n      return;\n    }\n  }\n  (*function)();\n}\n\nvoid Squeak_Interpreter::primitiveChangeClass() {\n  /*\n   \"Primitive. Change the class of the receiver into the class of the argument\n    given that the format of the receiver matches the format of the argument's\n    class. Fail if receiver or argument are SmallIntegers, or the receiver is\n    an instance of a compact class and the argument isn't, or when the\n    argument's class is compact and the receiver isn't, or when the format of\n    the receiver is different from the format of the argument's class, or when\n    the arguments class is fixed and the receiver's size differs from the size\n    that an instance of the argument's class should have.\"\n   */\n  if (methodArgumentCount() != 1) {\n    primitiveFail();\n    return;\n  }\n\n  Oop arg = stackObjectValue(0);\n  Oop rcvr = stackObjectValue(1);\n  Oop argClass = arg.fetchClass();\n  changeClass(rcvr, argClass, true);\n  if (successFlag)  pop(1);\n}\n\nvoid Squeak_Interpreter::primitiveClass() {\n  popThenPush(get_argumentCount() + 1, stackTop().fetchClass());\n}\n\nvoid Squeak_Interpreter::primitiveClipboardText() {\n  /*When called with a single string argument, post the string to\n   the clipboard. When called with zero arguments, return a\n   string containing the current clipboard contents.\"*/\n  if (get_argumentCount() == 1) {\n    Oop s = stackTop();\n    Object_p so;\n    if (!s.is_mem()  || !(so = s.as_object())->isBytes()) {\n      primitiveFail(); return;\n    }\n    if (successFlag) {\n      clipboardWriteFromAt(so->stSize(), so->as_char_p() + Object::BaseHeaderSize, 0);\n      pop(1);\n    }\n  }\n  else {\n    oop_int_t sz = clipboardSize();\n    if (The_Memory_System()->coreWithSufficientSpaceToAllocate(sz, Memory_System::read_write) == NULL) {\n      primitiveFail();  return;\n    }\n    Oop s = classString()->instantiateClass(sz)->as_oop();\n    Object_p so = s.as_object();\n    char* start = so->as_char_p() + Object::BaseHeaderSize;\n    assert(The_Memory_System()->contains(start));\n\n    The_Memory_System()->enforce_coherence_before_store_into_object_by_interpreter(start, sz, so);\n    clipboardReadIntoAt(sz, 0, start);\n    The_Memory_System()->enforce_coherence_after_store_into_object_by_interpreter(start, sz);\n    popThenPush(1, s);\n  }\n}\n\nvoid Squeak_Interpreter::primitiveClone() {\n  Oop x = stackTop();\n  if (x.is_int())\n    return;\n  Oop nc = x.as_object()->clone();\n  if (nc.is_int()) { primitiveFail(); return; }\n  popThenPush(1, nc);\n  assert(nc.fetchClass() != roots.nilObj);\n}\n\nvoid Squeak_Interpreter::primitiveConstantFill() {\n  // rcvr is indexable bytes or words\n  oop_int_t fillValue = positive32BitValueOf(stackTop());\n  Oop rcvr = stackValue(1);\n  Object_p ro;\n  success(rcvr.is_mem()  && (ro = rcvr.as_object())->isWordsOrBytes());\n  if (!successFlag) return;\n  bool isB = ro->isBytes();\n  if (isB) success((fillValue & ~0xff) == 0);\n  if (!successFlag) return;\n\n  char* start = ro->as_char_p()  + Object::BaseHeaderSize;\n  int bytes = ro->sizeBits() - Object::BaseHeaderSize;\n\n  assert(The_Memory_System()->contains(start));\n\n  The_Memory_System()->enforce_coherence_before_store_into_object_by_interpreter(start, bytes, ro);\n  DEBUG_MULTISTORE_CHECK( (Oop*)start, Oop::from_bits(fillValue), bytes >> ShiftForWord);\n  if (isB) memset(         start, fillValue,  bytes);\n  else     wordset((int32*)start, fillValue,  bytes >> ShiftForWord);\n  The_Memory_System()->enforce_coherence_after_store_into_object_by_interpreter(start, bytes);\n\n  pop(1);\n}\n\nvoid Squeak_Interpreter::primitiveCopyObject() {\n  /*\n   \"Primitive. Copy the state of the receiver from the argument.\n   Fail if receiver and argument are of a different class.\n   Fail if the receiver or argument are non-pointer objects.\n   Fail if receiver and argument have different lengths (for indexable objects).\n   \"*/\n  if (methodArgumentCount() != 1) { primitiveFail(); return; }\n  Oop arg = stackObjectValue(0);\n  Oop rcvr = stackObjectValue(1);\n\n  if (failed()) return;\n  Object_p ro;\n  Object_p ao;\n  if (!rcvr.is_mem() || !arg.is_mem()) { primitiveFail(); return; }\n  ro = rcvr.as_object();  ao = arg.as_object();\n  if (ro->fetchClass() != ao->fetchClass()) { primitiveFail(); return; }\n  oop_int_t length = ro->lengthOf();\n\n  for (int i = 0;  i < length;  ++i)\n    ro->storePointer(i, ao->fetchPointer(i));\n\n  pop(1);\n}\n\nvoid Squeak_Interpreter::primitiveDeferDisplayUpdates() {\n   Oop flag = stackTop();\n  if (flag == roots.trueObj)\n    set_deferDisplayUpdates(true);\n  else if (flag == roots.falseObj)\n    set_deferDisplayUpdates(false);\n  else {\n    primitiveFail(); return;\n  }\n  pop(1);\n}\n\nvoid Squeak_Interpreter::primitiveDiv() {\n  pop2AndPushIntegerIfOK( doPrimitiveDiv(stackValue(1), stackTop()));\n}\n\nvoid Squeak_Interpreter::primitiveDivide() {\n  oop_int_t ir = stackIntegerValue(1), ia = stackIntegerValue(0);\n  if (ia != 0  &&  ir % ia == 0)\n    pop2AndPushIntegerIfOK(ir / ia);\n  else\n    primitiveFail();\n}\n\nvoid Squeak_Interpreter::primitiveDoPrimitiveWithArgs() {\n  Oop argumentArray = stackTop();\n  if (!argumentArray.is_mem()) { primitiveFail();  return; }\n  Object_p aao = argumentArray.as_object();\n  oop_int_t arraySize = aao->fetchWordLength();\n  oop_int_t cntxSize = activeContext_obj()->fetchWordLength();\n  success(stackPointerIndex() + arraySize  <  cntxSize);\n  if (!aao->isArray()) {  primitiveFail();  return; }\n\n  int primIdx = stackIntegerValue(1);\n  if (!successFlag)  {  primitiveFail();  return; }\n\n  // pop prim index and argArray, push args\n  pop(2);\n  primitiveIndex = primIdx;\n  set_argumentCount( arraySize );\n  for( oop_int_t index = 1;  index <= arraySize;  ++index )\n    push( aao->fetchPointer(index - 1) );\n\n  // Run the prim (sets successFlag)\n  pushRemappableOop(argumentArray);\n  roots.lkupClass = roots.nilObj;\n  primitiveResponse();\n  aao = NULL; // GC recovery\n  argumentArray = popRemappableOop();\n  if (!successFlag) {\n    // restore state\n    pop(arraySize);\n    pushInteger(primIdx);\n    push(argumentArray);\n    set_argumentCount( 2 );\n  }\n}\n\nvoid Squeak_Interpreter::primitiveDoNamedPrimitiveWithArgs() {\n  /* \"Simulate an primitiveExternalCall invocation (e.g. for the Debugger).\n      Do not cache anything.\n      e.g. ContextPart>>tryNamedPrimitiveIn: aCompiledMethod for: aReceiver withArgs: arguments\"\n  */\n  \n  Oop argumentArray = stackTop();\n  if (!argumentArray.isArray()) { primitiveFail();  return; }\n  Object_p argumentArray_obj = argumentArray.as_object();\n  \n  oop_int_t arraySize = argumentArray_obj->fetchWordLength();\n  success( roomToPushNArgs( arraySize));\n  \n  Oop methodArg = stackObjectValue(2);\n  if ( !successFlag ) { primitiveFail(); return; }\n  Object_p methodArg_object = methodArg.as_object();\n  if (!methodArg_object->isCompiledMethod()) { primitiveFail(); return; }\n  \n  int methodHeader = methodArg_object->methodHeader();\n  \n  if (Object::literalCountOfHeader(methodHeader) <= 2) { primitiveFail(); return; }\n  Oop spec = methodArg_object->fetchPointer(1); // first literal\n  assertClass(spec, splObj(Special_Indices::ClassArray));\n  if (!successFlag) return;\n  Object_p spec_obj = spec.as_object();\n  if ( spec_obj->lengthOf() != 4  \n      ||  Object::primitiveIndex_of_header(methodHeader) != 117\n      ||  Object::argumentCountOfHeader(methodHeader) != arraySize) {\n    primitiveFail(); return; \n  }\n  // Function not loaded yet. Fetch module & func name\n  Oop moduleName = spec_obj->fetchPointer(0);\n  if (!moduleName.is_mem()) { primitiveFail(); return; }\n  Object_p moduleName_obj = moduleName.as_object();\n  int moduleLength = moduleName == roots.nilObj  ?  0  :  moduleName_obj->lengthOf();\n  \n  Oop functionName = spec_obj->fetchPointer(1);\n  success( functionName.isBytes() );\n  if (!successFlag) return;\n  Object_p functionName_obj = functionName.as_object();\n  int functionLength = functionName_obj->lengthOf();\n  \n  fn_t addr;\n  {\n    Safepoint_Ability sa1(true); // load may need to wait for main\n    addr = munge_arguments_and_load_function_from_plugin_on_main(functionName, functionName_obj, functionLength, moduleName, moduleName_obj, moduleLength);\n    \n    // recover from GC\n    argumentArray_obj = argumentArray.as_object();\n    methodArg_object = methodArg.as_object();\n    spec_obj = spec.as_object();\n  }\n  if (addr == NULL) { primitiveFail(); return; }\n  \n  // cannot fail this prim, could fail the external prim\n  pop(1);\n  set_argumentCount(arraySize);\n  for (int i = 1;  i <= arraySize;  ++i)\n    push(argumentArray_obj->fetchPointer(i - 1));\n  \n  // run the prim\n  pushRemappableOop(argumentArray); // might alloc\n  roots.lkupClass = roots.nilObj;\n  dispatchFunctionPointer(addr, true);\n  argumentArray = popRemappableOop();\n  argumentArray_obj = argumentArray.as_object();\n  \n  if (!successFlag) {\n    popThenPush(arraySize, argumentArray);\n    set_argumentCount(3);\n  }\n  \n}\n\nvoid Squeak_Interpreter::primitiveEqual() {\n  checkBooleanResult(compare31or32BitsEqual(popStack(), popStack()));\n}\nvoid Squeak_Interpreter::primitiveEquivalent() {\n  pushBool(popStack() == popStack());\n}\nvoid Squeak_Interpreter::primitiveExecuteMethod() {\n  untested();\n  roots.newMethod = popStack();\n  if (!roots.newMethod.is_mem()) {\n    primitiveFail();\n    unPop(1);\n    return;\n  }\n  Object_p nmo = newMethod_obj();\n  primitiveIndex = nmo->primitiveIndex();\n  success(get_argumentCount() - 1  ==  nmo->argumentCount());\n  if (successFlag)\n      executeNewMethod();\n  else\n    unPop(1);\n}\n\nvoid Squeak_Interpreter::primitiveExecuteMethodArgsArray() {\n  roots.newMethod = popStack();\n  if (!roots.newMethod.is_mem()) {\n    unPop(1);\n    primitiveFail();\n    return;\n  }\n  Object_p nmo = newMethod_obj();\n  primitiveIndex = nmo->primitiveIndex();\n  int argCnt = nmo->argumentCount();\n  Oop argumentArray = popStack();\n  Object_p aao;\n  if (!argumentArray.is_mem()  ||  !(aao = argumentArray.as_object())->isArray()) {\n    unPop(2);\n    primitiveFail();\n    return;\n  }\n  if (successFlag)\n    success(argCnt == aao->fetchWordLength());\n  if (successFlag) {\n    oopcpy_no_store_check(stackPointer() + 1,\n                          aao->as_oop_p() + Object::BaseHeaderSize/sizeof(Oop),\n                          argCnt,\n                          activeContext_obj());\n    unPop(argCnt);\n    set_argumentCount( argCnt );\n    executeNewMethod();\n  }\n  else\n    unPop(2);\n}\n\nvoid Squeak_Interpreter::primitiveExitToDebugger() {\n  untested();\n  fatal(\"you asked for it\");\n}\n\nvoid Squeak_Interpreter::primitiveExponent() {\n  double r = popFloat();\n  if (!successFlag) unPop(1);\n  else {\n    int pwr;\n    frexp(r, &pwr);\n    pushInteger(pwr - 1);\n  }\n}\nvoid Squeak_Interpreter::primitiveExp() {\n  double r = popFloat();\n  if (successFlag)\n    pushFloat(exp(r));\n  else\n    unPop(1);\n}\n\n\n\nfn_t last_external_call_fn[Memory_Semantics::max_num_threads_on_threads_or_1_on_processes]; // for debugging\n\n\n\nvoid Squeak_Interpreter::primitiveExternalCall() {\n  /*\n   Call an external primitive. The external primitive methods\n   contain as first literal an array consisting of:\n   * The module name (String | Symbol)\n   * The function name (String | Symbol)\n   * The session ID (SmallInteger) [OBSOLETE]\n   * The function index (Integer) in the externalPrimitiveTable\n   For fast failures the primitive index of any method where the\n   external prim is not found is rewritten in the method cache\n   with zero. This allows for ultra fast responses as long as the\n   method stays in the cache.\n   The fast failure response relies on roots.lkupClass being properly\n   set. This is done in\n   #addToMethodCacheSel:class:method:primIndex: to\n   compensate for execution of methods that are looked up in a\n   superclass (such as in primitivePerformAt).\n   With the latest modifications (e.g., actually flushing the\n   function addresses from the VM), the session ID is obsolete.\n   But for backward compatibility it is still kept around. Also, a\n   failed lookup is reported specially. If a method has been\n   looked up and not been found, the function address is stored\n   as -1 (e.g., the SmallInteger -1 to distinguish from\n   16rFFFFFFFF which may be returned from the lookup).\n   It is absolutely okay to remove the rewrite if we run into any\n   problems later on. It has an approximate speed difference of\n   30% per failed primitive call which may be noticable but if,\n   for any reasons, we run into problems (like with J3) we can\n   always remove the rewrite.\n   */\n\n  // fetch first literal\n  Safepoint_Ability sa(false);\n  Object_p lo = newMethod_obj()->get_external_primitive_literal_of_method();\n  success(lo != NULL);\n  if (!successFlag) return;\n\n  if (lookup_in_externalPrimitiveTable(lo)) return;\n  // Recover from GC\n  lo = newMethod_obj()->get_external_primitive_literal_of_method();\n\n  lo->cleanup_session_ID_and_ext_prim_index_of_external_primitive_literal();\n\n  // fn not loaded yet, fetch module and fn name\n  Oop moduleName, functionName;\n  Object_p mno;\n  Object_p fno;\n  int moduleLength, functionLength;\n  fetch_module_and_fn_name(lo, moduleName, mno, moduleLength, functionName, fno, functionLength);\n  if (!successFlag) return;\n\n  // attempt to map old-style\n  fn_t addr = NULL;\n  bool on_main = false;\n  lookup_in_obsoleteNamedPrimitiveTable(functionName, fno, functionLength, \n                                        moduleName, mno, moduleLength,\n                                        on_main, addr);\n  \n  if (addr == NULL) {\n    Safepoint_Ability sa1(true); // load may need to wait for main\n    addr = munge_arguments_and_load_function_from_plugin_on_main(functionName, fno, functionLength, moduleName, mno, moduleLength);\n    // recover from GC\n    lo = newMethod_obj()->get_external_primitive_literal_of_method();\n    fno = functionName.as_object();\n    mno = moduleName.as_object();\n\n    //lo = newMethod_obj()->get_external_primitive_literal_of_method();\n\n    on_main = true; // conservative, can correct individuals by added them to obsoleteNamedPrimitiveTable\n  }\n\n  oop_int_t ii =  addr == NULL  ?  Abstract_Primitive_Table::lookup_failed  :  externalPrimitiveTable()->add(addr, on_main);\n  success(Abstract_Primitive_Table::is_index_valid(ii));\n  lo->storeInteger(Object_Indices::EPL_External_Primitive_Table_Index, ii);\n\n  if (successFlag &&  addr != NULL) {\n    update_cache_and_call_external_function(fno, ii, addr, on_main);\n    // recover from GC\n    lo = newMethod_obj()->get_external_primitive_literal_of_method();\n    fno = functionName.as_object();\n    mno = moduleName.as_object();\n  }\n  else\n    update_cache_and_report_failure_to_load_external_function(mno, fno);\n}\n\n\noop_int_t Squeak_Interpreter::compute_primitive_index(Object_p lo) {\n  Oop index = lo->fetchPointer(Object_Indices::EPL_External_Primitive_Table_Index);\n  oop_int_t ii = index.checkedIntegerValue();\n  if (!successFlag) return Abstract_Primitive_Table::lookup_failed;\n  if (ii != Abstract_Primitive_Table::lookup_failed)\n    return ii;\n    \n    // fn addr not found, rewrite mcache\n    methodCache.rewrite(roots.messageSelector, roots.lkupClass, 0);\n  success(false);\n  return Abstract_Primitive_Table::lookup_failed;\n}\n\n\n\nbool Squeak_Interpreter::lookup_in_externalPrimitiveTable(Object_p lo) {\n  oop_int_t ii = compute_primitive_index(lo);\n  if (!successFlag) \n    return true;\n  if (!Abstract_Primitive_Table::is_index_valid(ii)  ||  ii > MaxExternalPrimitiveTableSize)\n    return false;\n  \n  fn_t addr = externalPrimitiveTable()->contents[ii - 1];\n  bool on_main = externalPrimitiveTable()->execute_on_main[ii - 1];\n  if (addr != NULL) {\n    methodCache.rewrite(roots.messageSelector, roots.lkupClass, 1000 + ii, addr, on_main);\n    last_external_call_fn[rank_on_threads_or_zero_on_processes()] = addr;\n    dispatchFunctionPointer(addr, on_main);\n    return true;\n  }\n  // index was kept on ST side though prim table was flushed\n  lprintf(\"prim table rep issue?\\n\");\n  primitiveFail();\n  return true;\n}\n\nvoid Squeak_Interpreter::fetch_module_and_fn_name(Object_p lo, \n                                                  Oop& moduleName, Object_p& mno, int& moduleLength,\n                                                  Oop& functionName, Object_p& fno, int& functionLength) {\n  // fn not loaded yet, fetch module and fn name\n  moduleName = lo->fetchPointer(Object_Indices::EPL_Module_Name);\n  if (!moduleName.is_mem()) { primitiveFail(); return; }\n  mno = moduleName.as_object();\n  if (moduleName == roots.nilObj)\n    moduleLength = 0;\n  else {\n    success(mno->isBytes());\n    moduleLength = mno->lengthOf();\n  }\n  \n  functionName = lo->fetchPointer(Object_Indices::EPL_Function_Name);\n  if (!functionName.is_mem()) { primitiveFail(); return; }\n  fno = functionName.as_object();\n  success(fno->isBytes());\n  functionLength = fno->lengthOf();\n  if (!successFlag) return;\n}\n\n\n\nvoid Squeak_Interpreter::lookup_in_obsoleteNamedPrimitiveTable(Oop functionName, Object_p& fno, int functionLength,\n                                                               Oop  moduleName, Object_p& mno, int moduleLength,\n                                                               bool& on_main, fn_t& addr) { \n  // we use the obs named table to direct RVMPlugin prims to local core\n  oop_int_t ii = obsoleteNamedPrimitiveTable.find( fno->as_char_p() + Object::BaseHeaderSize, functionLength, \n                                                   mno->as_char_p() + Object::BaseHeaderSize, moduleLength);\n  if (!Abstract_Primitive_Table::is_index_valid(ii))\n    return;\n  \n  on_main = obsoleteNamedPrimitiveTable.contents[ii].on_main;\n  \n  addr = The_Interactions.load_function_from_plugin(\n                                                    on_main ? Logical_Core::main_rank : Logical_Core::my_rank(),\n                                                    (char*)obsoleteNamedPrimitiveTable.contents[ii].newName,\n                                                    (char*)obsoleteNamedPrimitiveTable.contents[ii].plugin);\n  // recover from GC\n  fno = functionName.as_object();\n  mno = moduleName.as_object();\n  \n}\n\n\nfn_t Squeak_Interpreter::munge_arguments_and_load_function_from_plugin_on_main(Oop functionName, Object_p& fno, int functionLength,\n                                                                               Oop  moduleName, Object_p& mno, int moduleLength) { \n  char fn[10000], mod[10000];\n  assert_always((size_t)functionLength < sizeof(fn)  &&  (size_t)moduleLength < sizeof(mod));\n  strncpy( fn, fno->as_char_p() + Object::BaseHeaderSize, functionLength);  fn[functionLength] = '\\0';\n  strncpy(mod, mno->as_char_p() + Object::BaseHeaderSize,   moduleLength); mod[  moduleLength] = '\\0';\n  fn_t addr = The_Interactions.load_function_from_plugin(Logical_Core::main_rank, fn, mod);\n  // recover from GC\n  fno = functionName.as_object();\n  mno = moduleName.as_object();\n  \n  return addr;\n}\n\n\nvoid Squeak_Interpreter::update_cache_and_call_external_function(Object_p fno, oop_int_t ii, fn_t addr, bool on_main) {\n  static const bool verbose = false;\n  \n  methodCache.rewrite(roots.messageSelector, roots.lkupClass, 1000 + ii, addr, on_main);\n  \n  if (verbose) {\n    stdout_printer->lprintf(\"in primitiveExternalCall (%d) %s: \",\n                            increment_global_sequence_number(),\n                            on_main ? \"on main\" : \"here\");\n    fno->print_bytes(stdout_printer); stdout_printer->nl();\n  }\n  last_external_call_fn[rank_on_threads_or_zero_on_processes()] = addr;\n  dispatchFunctionPointer(addr, on_main);\n  \n  if (verbose)\n    lprintf(\"returned from prim %s\\n\", successFlag ? \"succeeded\" : \"failed\");\n}\n\n\nvoid Squeak_Interpreter::update_cache_and_report_failure_to_load_external_function(Object_p mno, Object_p fno) {\n  if (mno->equals_string(\"SecurityPlugin\")\n      || fno->equals_string(\"primitivePluginBrowserReady\")\n      || fno->equals_string(\"primSetCompositionWindowPosition\"))\n  {}\n  else {\n    dittoing_stdout_printer->printf(\"Could not load external: \");\n    fno->print(dittoing_stdout_printer); dittoing_stdout_printer->printf(\" in \");\n    mno->print(dittoing_stdout_printer); dittoing_stdout_printer->nl();\n  }\n  \n  methodCache.rewrite(roots.messageSelector, roots.lkupClass, 0);\n}\n\n\n\n\n\nvoid Squeak_Interpreter::primitiveFindHandlerContext() {\n  Oop thisCntx = popStack();\n  Oop nil = roots.nilObj;\n  for (;;) {\n    if (!thisCntx.is_mem()  ||  thisCntx == nil) {\n      push(nil);\n      return;\n    }\n  Object_p tco = thisCntx.as_object();\n  if (tco->isHandlerMarked()) {\n      push(thisCntx);\n      return;\n    }\n    thisCntx = tco->fetchPointer(Object_Indices::SenderIndex);\n  }\n}\nvoid Squeak_Interpreter::primitiveFindNextUnwindContext() {\n  Oop aContext = popStack();\n  Oop nilOop = roots.nilObj;\n  Object_p tco;\n\n  for (Oop thisCntx  = popStack().as_object()->fetchPointer(Object_Indices::SenderIndex);\n           thisCntx != aContext  &&  thisCntx != nilOop;\n           thisCntx  = tco->fetchPointer(Object_Indices::SenderIndex)) {\n    tco = thisCntx.as_object();\n    if (tco->isUnwindMarked()) {\n        push(thisCntx);\n        return;\n     }\n  }\n  push(nilOop);\n}\n\n\nvoid Squeak_Interpreter::primitiveFloatAdd() {\n  primitiveFloatAdd(stackValue(1), stackTop());\n}\nvoid Squeak_Interpreter::primitiveFloatSubtract() {\n  primitiveFloatSubtract(stackValue(1), stackTop());\n}\nvoid Squeak_Interpreter::primitiveFloatMultiply() {\n  primitiveFloatMultiply(stackValue(1), stackTop());\n}\nvoid Squeak_Interpreter::primitiveFloatDivide() {\n  primitiveFloatDivide(stackValue(1), stackTop());\n}\nvoid Squeak_Interpreter::primitiveFloatEqual() {\n  bool b = primitiveFloatEqual(stackValue(1), stackTop());\n  if (successFlag) { pop(2); pushBool(b); }\n}\nvoid Squeak_Interpreter::primitiveFloatGreaterOrEqual() {\n  bool b = primitiveFloatLess(stackValue(1), stackTop());\n  if (successFlag) { pop(2); pushBool(!b); }\n}\n\nvoid Squeak_Interpreter::primitiveFloatGreaterThan() {\n  bool b = primitiveFloatGreater(stackValue(1), stackTop());\n  if (successFlag) { pop(2); pushBool(b); }\n}\nvoid Squeak_Interpreter::primitiveFloatLessOrEqual() {\n  bool b = primitiveFloatGreater(stackValue(1), stackTop());\n  if (successFlag) { pop(2); pushBool(!b); }\n}\nvoid Squeak_Interpreter::primitiveFloatLessThan() {\n  bool b = primitiveFloatLess(stackValue(1), stackTop());\n  if (successFlag) { pop(2); pushBool(b); }\n}\nvoid Squeak_Interpreter::primitiveFloatNotEqual() {\n  bool b = primitiveFloatEqual(stackValue(1), stackTop());\n  if (successFlag) { pop(2); pushBool(!b); }\n}\nvoid Squeak_Interpreter::primitiveFlushCache() {\n  flushMethodCacheMessage_class().send_to_all_cores();\n}\nvoid Squeak_Interpreter::primitiveFlushCacheByMethod() {\n  pushRemappableOop(stackTop()); // in case of gc while message in transit\n  flushByMethodMessage_class(stackTop()).send_to_all_cores();\n  popRemappableOop();\n}\nvoid Squeak_Interpreter::primitiveFlushCacheSelective() {\n  pushRemappableOop(stackTop()); // in case of gc while message in transit\n  flushSelectiveMessage_class(stackTop()).send_to_all_cores();\n  popRemappableOop();\n}\nvoid Squeak_Interpreter::primitiveFlushExternalPrimitives() {\n  untested();\n  flushExternalPrimitives();\n}\nvoid Squeak_Interpreter::primitiveForceDisplayUpdate() {\n  ioForceDisplayUpdate();\n}\n\nvoid Squeak_Interpreter::primitiveFormPrint() {\n  untested();\n  bool landscapeFlag = booleanValueOf(stackTop());\n  double vScale = floatValueOf(stackValue(1));\n  double hScale = floatValueOf(stackValue(2));\n  Oop rcvr = stackValue(3);\n  if (!rcvr.is_mem())\n    success(false);\n  Object_p ro = rcvr.as_object();\n  if (!successFlag) return;\n  success(ro->lengthOf() >= 4);\n  if (!successFlag) return;\n  Oop bitsArray = ro->fetchPointer(0);\n  success(bitsArray.is_mem());\n  if (!successFlag) return;\n  Object_p bo = bitsArray.as_object();\n  int w = ro->fetchInteger(1);\n  int h = ro->fetchInteger(2);\n  int d = ro->fetchInteger(3);\n  int pixelsPerWord = 32 / d;\n  int wordsPerLine = (w + pixelsPerWord - 1) / pixelsPerWord;\n  success(bo->isWordsOrBytes());\n  if (!successFlag) return;\n  int bitsArraySize = bo->byteLength();\n  success(bitsArraySize == wordsPerLine * h * (int)sizeof(int32));\n  if (!successFlag) return;\n  // assume not 64 bit words\n  success(ioFormPrint(bo->as_int32_p() + Object::BaseHeaderSize/sizeof(int32), w, h, d, hScale, vScale, landscapeFlag));\n  if (!successFlag) return;\n  pop(3);\n}\n\nvoid Squeak_Interpreter::primitiveFractionalPart() {\n  double rcvr = popFloat();\n  if (!successFlag) { unPop(1); return; }\n  double trunc;\n  pushFloat(modf(rcvr, &trunc));\n}\n\nvoid Squeak_Interpreter::primitiveFullGC() {\n  pop(1);\n  The_Memory_System()->incrementalGC();\n  The_Memory_System()->fullGC(\"primitiveFullGC\");\n  pushInteger(The_Memory_System()->bytesLeft(/* true */));\n}\n\nvoid Squeak_Interpreter::primitiveGetAttribute() {\n  /*\n   fetch the system attribute with the given integer ID. The\n   result is a string, which will be empty if the attribute is not\n   defined.\n   */\n  int attr = stackIntegerValue(0);\n  if (!successFlag) return;\n  int sz = attributeSize(attr);\n  if (!successFlag) return;\n  Object_p s = classString()->instantiateClass(sz);\n  getAttributeIntoLength(attr, s->as_char_p() + Object::BaseHeaderSize, sz);\n  popThenPush(2, s->as_oop());\n}\n\n\nvoid Squeak_Interpreter::primitiveGetNextEvent() {\n  const bool print = Print_Keys;\n  int evtBuf[evtBuf_size];\n  for (int i = 0;  i < evtBuf_size;  ++i)  evtBuf[i] = 0;\n  bool got_one = The_Interactions.getNextEvent_on_main(evtBuf); // do this from here so we can GC if need be\n  if (!got_one) {\n    primitiveFail();\n    return;\n  }\n  \n  successFlag = true;\n\n  Oop arg = stackTop(); Object_p ao;\n  if (!arg.is_mem() || !(ao = arg.as_object())->isArray() || ao->slotSize() != 8) {\n    primitiveFail(); return;\n  }\n  int eventTypeIs = evtBuf[0];\n  ao->storeInteger(0, evtBuf[0]);\n  \n  if (eventTypeIs == event_type_complex()) {\n    for (int i = 1;  i < evtBuf_size;  ++i) {\n      Oop v = Oop::from_bits(evtBuf[i]);\n      if (check_assertions) v.okayOop();\n      ao->storePointer(i, v);\n    }\n  }\n  else {\n    ao->storeInteger(1, evtBuf[1] & MillisecondClockMask);\n    if (!successFlag) return;\n\n    for (u_int32 i = 2;  i < sizeof(evtBuf)/sizeof(evtBuf[0]);  ++i) {\n      oop_int_t v = evtBuf[i];\n      if (Oop::isIntegerValue(v))\n        ao->storeInteger(i, v);\n      else {\n        // may GC\n        pushRemappableOop(arg);\n        Oop value = Object::positive32BitIntegerFor(v);\n        arg = popRemappableOop();\n        ao = arg.as_object();\n        ao->storePointer(i, value);\n      }\n    }\n  }\n  if (!successFlag) return;\n\n  if (print && evtBuf[0] == 2 /* EventTypeKeyboard*/ )\n    lprintf(\"primitiveGetNextEvent key: %d, state %d '%c'\\n\", evtBuf[2], evtBuf[3], evtBuf[2]);\n  pop(1);\n}\n\n\nvoid Squeak_Interpreter::primitiveGreaterOrEqual() {\n  oop_int_t a = popInteger();\n  oop_int_t r = popInteger();\n  checkBooleanResult(r >= a);\n}\nvoid Squeak_Interpreter::primitiveGreaterThan() {\n  oop_int_t a = popInteger();\n  oop_int_t r = popInteger();\n  checkBooleanResult(r > a);\n}\nvoid Squeak_Interpreter::primitiveImageName() {\n  /*\n   When called with a single string argument, record the string as the current\n   image file name. When called with zero arguments, return a string\n   containing the current image file name.\n   */\n  if (get_argumentCount() == 1) {\n    Oop s = stackTop();\n    assertClass(s, splObj(Special_Indices::ClassString));\n    if (!successFlag) return;\n    Squeak_Image_Reader::imageNamePut_on_all_cores(s.as_object()->as_char_p() + Object::BaseHeaderSize, s.as_object()->stSize());\n    pop(1);\n  }\n  else {\n    oop_int_t sz = The_Memory_System()->imageNameSize();\n    Object_p so = classString()->instantiateClass(sz);\n    The_Memory_System()->imageNameGet(so, sz);\n    pop(1);\n    push(so->as_oop());\n  }\n}\n\nvoid Squeak_Interpreter::primitiveIncrementalGC() {\n  pop(1);\n  The_Memory_System()->finalize_weak_arrays_since_we_dont_do_incrementalGC();\n  pushInteger(The_Memory_System()->bytesLeft(/* false */));\n}\n\nvoid Squeak_Interpreter::primitiveInputSemaphore() {\n  /*\n   \"Register the input semaphore. The argument is an index into the\n    ExternalObjectsArray part of the specialObjectsArray and must have been\n    allocated via 'Smalltalk registerExternalObject: the Semaphore\n   */\n  Oop arg = stackTop();\n  if (arg.is_int()) {\n    // \"If arg is integer, then condsider it as an index  into the external\n    //  objects array and install it  as the new event semaphore\n    ioSetInputSemaphore(arg.integerValue());\n    if (successFlag) pop(1);\n  }\n}\n\nvoid Squeak_Interpreter::primitiveInputWord() {\n  // \"Return an integer indicating the reason for the most recent input interrupt.\"\n\tpopThenPushInteger(1, 0);\t// \"noop for now\",\n}\n\nvoid Squeak_Interpreter::primitiveInstVarAt() {\n  oop_int_t index = stackIntegerValue(0);\n  Oop rcvr = stackValue(1);\n  if (!rcvr.is_mem()) { primitiveFail(); return; }\n  Object_p ro = rcvr.as_object();\n  if (successFlag) {\n    oop_int_t fixedFields = ro->fixedFieldsOfArray();\n    if (index < 1  ||  index > fixedFields)\n      successFlag = false;\n  }\n  if (successFlag) {\n    Oop value = subscript(ro, index);\n    if (successFlag) popThenPush(get_argumentCount() + 1, value);\n  }\n}\nvoid Squeak_Interpreter::primitiveInstVarAtPut() {\n  Oop newValue = stackTop();\n  u_oop_int_t index = stackIntegerValue(1);\n  Oop rcvr = stackValue(2);\n  if (!rcvr.is_mem()) primitiveFail();\n  if (!successFlag) return;\n  Object_p ro = rcvr.as_object();\n  if (index < 1  ||  index > ro->fixedFieldsOfArray()) {\n    primitiveFail();\n    return;\n  }\n  subscript(ro, index, newValue);\n  if (successFlag) popThenPush(get_argumentCount() + 1, newValue);\n}\nvoid Squeak_Interpreter::primitiveInstVarsPutFromStack() {\n  untested();\n  unimplemented(); // obsolete\n}\nvoid Squeak_Interpreter::primitiveIntegerAt() {\n  untested();\n  unimplemented();\n  oop_int_t index = stackIntegerValue(0);\n  Oop rcvr = stackValue(1);\n  Object_p ro;\n  if (!rcvr.is_mem()  ||  !(ro = rcvr.as_object())->isWords()\n      || index < 1  || index > (oop_int_t)ro->lengthOf() ) {\n    success(false); return;\n  }\n  int32 value = ro->as_int32_p()[Object::BaseHeaderSize/sizeof(int32) + index - 1];\n  pop(2);\n  if (Oop::isIntegerValue(value))\n    pushInteger(value);\n  else\n    push(Object::signed32BitIntegerFor(value));\n}\n\n\nvoid Squeak_Interpreter::primitiveIntegerAtPut() {\n  untested();\n  Oop valueOop = stackValue(0);\n  oop_int_t index = stackIntegerValue(1);\n  Oop rcvr = stackValue(2); Object_p ro;\n\n  if (!rcvr.is_mem() || !(ro = rcvr.as_object())->isWords()\n    ||  index < 1\n    ||  index > (oop_int_t)ro->lengthOf() ) {\n    success(false);\n    return;\n  }\n\n  int32 value = valueOop.is_int() ? valueOop.integerValue() : signed32BitValueOf(valueOop);\n  if (!successFlag) return;\n\n  int32* addr = ro->as_int32_p() + Object::BaseHeaderSize/sizeof(int32) + index-1;\n  The_Memory_System()->store_enforcing_coherence(addr, value, ro);\n  pop(3);\n  push(valueOop);\n}\n\n\nvoid Squeak_Interpreter::primitiveInterruptSemaphore() {\n  Oop arg = popStack();\n  roots.specialObjectsOop.as_object()->storePointer(Special_Indices::TheInterruptSemaphore,\n                                                    arg.fetchClass() == splObj(Special_Indices::ClassSemaphore) ? arg : roots.nilObj);\n}\n\nvoid Squeak_Interpreter::primitiveInvokeObjectAsMethod() {\n  if (check_many_assertions) assert(roots.newMethod.verify_oop());\n  Object_p rao = splObj_obj(Special_Indices::ClassArray)->instantiateClass(get_argumentCount());\n  rao->beRootIfOld();\n  oopcpy_no_store_check(rao->as_oop_p() + Object::BaseHeaderSize/sizeof(Oop),\n                        stackPointer() - (get_argumentCount() - 1),\n                        get_argumentCount(),\n                        rao);\n\n  Oop runSelector = roots.messageSelector;\n  Oop runReceiver = stackValue(get_argumentCount());\n  pop(get_argumentCount() + 1);\n\n  Oop newReceiver = roots.newMethod;\n  assert(newReceiver.verify_oop());\n  roots.messageSelector = splObj(Special_Indices::SelectorRunWithIn);\n  set_argumentCount(3);\n\n  push(newReceiver);\n  push(runSelector);\n  push(rao->as_oop());\n  push(runReceiver);\n\n  Oop lookupClass = newReceiver.fetchClass();\n  assert(lookupClass.verify_oop());\n  findNewMethodInClass(lookupClass);\n  executeNewMethodFromCache();\n  successFlag = true;\n}\n\nstatic void print_keystroke_word(int keystrokeWord) {\n  if (Print_Keys  &&  keystrokeWord >= 0) {\n    lprintf(\"%s %u 0x%x 0%o\\n\", \n            \"primitiveKbdPeek\", \n            keystrokeWord,\n            keystrokeWord,\n            keystrokeWord);\n  }\n}\n\nvoid Squeak_Interpreter::primitiveKbdNext() {\n  pop(1);\n  int keystrokeWord = ioGetKeystroke();\n  print_keystroke_word(keystrokeWord);\n  if (keystrokeWord >= 0)  pushInteger(keystrokeWord);\n  else                     push(roots.nilObj);\n\n}\n\nvoid Squeak_Interpreter::primitiveKbdPeek() {\n  pop(1);\n# if On_iOS\n  int keystrokeWord = -1;\n# else\n  int keystrokeWord = ioPeekKeystroke();\n# endif\n  print_keystroke_word(keystrokeWord);\n  if (keystrokeWord >= 0)  pushInteger(keystrokeWord);\n  else                     push(roots.nilObj);\n}\n\nvoid Squeak_Interpreter::primitiveLessOrEqual() {\n  oop_int_t a = popInteger();\n  oop_int_t r = popInteger();\n  checkBooleanResult(r <= a);\n}\nvoid Squeak_Interpreter::primitiveLessThan() {\n  oop_int_t a = popInteger();\n  oop_int_t r = popInteger();\n  checkBooleanResult(r < a);\n}\nvoid Squeak_Interpreter::primitiveListBuiltinModule() {\n  untested();\n  if (methodArgumentCount() != 1)  {\n  primitiveFail(); return;}\n  oop_int_t index = stackIntegerValue(0);\n  if (index <= 0) { primitiveFail(); return; }\n  char* moduleName = ioListBuiltinModule(index);\n  if (moduleName == NULL) {\n    pop(2);\n    push(roots.nilObj);\n    return;\n  }\n  Object_p nameObj = Object::makeString(moduleName);\n  popThenPush(2, nameObj->as_oop());\n  forceInterruptCheck();\n}\n\nvoid Squeak_Interpreter::primitiveListExternalModule() {\n  untested();\n  if (methodArgumentCount() != 1)  {\n  primitiveFail(); return;}\n  oop_int_t index = stackIntegerValue(0);\n  if (index <= 0) { primitiveFail(); return; }\n  char* moduleName = ioListExternalModule(index);\n  if (moduleName == NULL) {\n    pop(2);\n    push(roots.nilObj);\n    return;\n  }\n  Object_p nameObj = Object::makeString(moduleName);\n  popThenPush(2, nameObj->as_oop());\n  forceInterruptCheck();\n}\n\nvoid Squeak_Interpreter::primitiveLoadImageSegment() {\n  untested();\n  /*\n   \"This primitive is called from Squeak as...\n   <imageSegment> loadSegmentFrom: aWordArray outPointers: anArray.\"\n\n   \"This primitive will load a binary image segment created by\n    primitiveStoreImageSegment.  It expects the outPointer array to be of the\n    proper size, and the wordArray to be well formed.  It will return as its\n    value the original array of roots, and the erstwhile segmentWordArray will\n    have been truncated to a size of zero.  If this primitive should fail, the\n    segmentWordArray will, sadly, have been reduced to an unrecognizable and\n    unusable jumble.  But what more could you have done with it anyway?\n   */\n  /*\n  if (check_assertions) verifyCleanHeaders();\n  Oop outPointerArray = stackTop();\n  if (!outPointerArray.is_mem())  { primitiveFail();  return; }\n  Object_p opao = outPointerArray.as_object();\n  Oop* lastOut = opao.as_oop_p()  +  opao->lastPointer() / sizeof(Oop);\n  Oop segmentWordArray = stackValue(1);\n  if (!segmentWordArray.is_mem()) { primitiveFail();  return }\n  Object_p sqao = segmentWordArray.as_object();\n  Oop* endSeg = swao->as_oop_p() + (swao->sizeBits() - Object::BaseHeaderSize) / sizeof(Oop);\n\n  if (apao->format() != Format::indexable_fields_only  ||  swao->format() != Format:indexable_word_fields_only) {\n    primitiveFail();  return;\n  }\n  int32 data = swao->as_int32_p()[Object::BaseHeaderSize/sizeof(int32)];\n  if (!Squeak_Image_Reader::readableFormat(data & 0xffff)) {\n    reverseBytes(swao->as_char_p() + Object::BaseHeaderSize, endSeg + Object::BytesPerWord/sizeof(Oop));\n  }\n   */\n  unimplemented(); // too much work\n}\nvoid Squeak_Interpreter::primitiveLoadInstVar() {\n  Oop r = popStack();\n  if (!r.is_mem()) {unPop(1); primitiveFail(); return; }\n  push(r.as_object()->fetchPointer(primitiveIndex - 264));\n}\nvoid Squeak_Interpreter::primitiveLogN() {\n  double r = popFloat();\n  if (!successFlag) {unPop(1); return; }\n  pushFloat(log(r));\n}\nvoid Squeak_Interpreter::primitiveLowSpaceSemaphore() {\n  Oop arg = popStack();\n  roots.specialObjectsOop.as_object()->storePointer(Special_Indices::TheLowSpaceSemaphore,\n    arg.fetchClass() == splObj(Special_Indices::ClassSemaphore)  ?  arg  :  roots.nilObj);\n}\nvoid Squeak_Interpreter::primitiveMakePoint() {\n  Oop a = stackTop();\n  Oop r = stackValue(1);\n  Object_p pto;\n  if (r.is_int()) {\n    if (a.is_int())\n      pto = Object::makePoint(r.integerValue(), a.integerValue());\n    else {\n      pto = Object::makePoint(r.integerValue(), 0);\n      pto->storePointer(1, stackTop()/*may have been changed by GC*/);\n    }\n  }\n  else {\n    Object_p ro = r.as_object();\n    if (!ro->isFloatObject()) {\n      successFlag = false;\n      return;\n    }\n    pto = Object::makePoint(0,0);\n    pto->storePointer(0, stackValue(1));\n    pto->storePointer(1, stackValue(0));\n  }\n  popThenPush(2, pto->as_oop());\n}\nvoid Squeak_Interpreter::primitiveMarkHandlerMethod() {\n  // Primitive. Mark the method for exception handling. The primitive must\n  // fail after marking the context so that the regular code is run\n  primitiveFail();\n}\nvoid Squeak_Interpreter::primitiveMarkUnwindMethod() {\n  // \"Primitive. Mark the method for exception unwinding.\n  // The primitive must fail after marking the context so that the regular code is run();\n  primitiveFail();\n}\n\n\nint Squeak_Interpreter::ioCPUMSecs() {\n  struct rusage ru;\n  getrusage(RUSAGE_SELF, &ru);\n  return (ru.ru_utime.tv_sec + ru.ru_stime.tv_sec) * 1000  +  (ru.ru_utime.tv_usec + ru.ru_stime.tv_usec) / 1000;\n}\n\n\n\nvoid Squeak_Interpreter::primitiveMillisecondClock() {\n  /*\n   Return the value of the millisecond clock as an integer. Note that the\n   millisecond clock wraps around periodically. On some platforms it can wrap\n   daily. The range is limited to SmallInteger maxVal / 2 to allow delays of\n   up to that length without overflowing a SmallInteger.\n   */\n  popThenPush(1, Oop::from_int(ioWhicheverMSecs() & MillisecondClockMask));\n}\nvoid Squeak_Interpreter::primitiveMod() {\n  pop2AndPushIntegerIfOK(doPrimitiveMod( stackValue(1), stackTop()));\n}\nvoid Squeak_Interpreter::primitiveMouseButtons() {\n  pop(1);\n  pushInteger(ioGetButtonState());\n}\nvoid Squeak_Interpreter::primitiveMousePoint() {\n  // mostly obsolete\n  pop(1);\n  int32 pw = ioMousePoint();\n  push(Object::makePoint( pw >> 16,  (int32)(int16)(pw & 0xffff))->as_oop());\n}\nvoid Squeak_Interpreter::primitiveMultiply() {\n  oop_int_t intRcvr = stackIntegerValue(1);\n  oop_int_t intArg = stackIntegerValue(0);\n  if (!successFlag) return;\n  \n  long long result_with_overflow = (long long)intRcvr * intArg;\n  \n  if (Oop::isIntegerValue(result_with_overflow))\n    pop2AndPushIntegerIfOK(result_with_overflow);\n  else\n    primitiveFail();\n}\n\n\nvoid Squeak_Interpreter::primitiveNew() {\n  Oop klass = stackTop();\n  // may GC\n  Logical_Core* c = coreWithSufficientSpaceToInstantiate(klass, 0);\n  success(c != NULL);\n  if (successFlag)\n    push( popStack().as_object()->instantiateClass(0, c)->as_oop());\n}\n\nvoid Squeak_Interpreter::primitiveNewMethod() {\n  Oop header = popStack();\n  oop_int_t bytecodeCount = popInteger();\n  success(header.is_int());\n  if (!successFlag) { unPop(2); return; }\n  Oop klass = popStack();\n  oop_int_t size = (Object::literalCountOfHeader(header.bits()) + 1) * bytesPerWord + bytecodeCount;\n  Object_p thisMethod = klass.as_object()->instantiateClass(size);\n  thisMethod->storePointer(Object_Indices::HeaderIndex, header);\n  oop_int_t lc = Object::literalCountOfHeader(header.bits());\n  for (int i = 1;  i <= lc;  ++i)\n    thisMethod->storePointer(i, roots.nilObj);\n  push(thisMethod->as_oop());\n}\n\nvoid Squeak_Interpreter::primitiveNewWithArg() {\n  u_int32 size = positive32BitValueOf(stackTop());\n  Oop klass    = stackValue(1);\n  Logical_Core* c = NULL;\n\n  success(int32(size) >= 0);\n  if (successFlag) {\n    c = coreWithSufficientSpaceToInstantiate(klass, size);\n    success(c != NULL);\n    klass = stackValue(1); // GC\n  }\n\n  if (successFlag)\n    popThenPush(2, klass.as_object()->instantiateClass(size, c)->as_oop());\n}\n\nvoid Squeak_Interpreter::primitiveNext() {\n  /*\n   \"PrimitiveNext will succeed only if the stream's array is in the atCache.\n   Otherwise failure will lead to proper message lookup of at: and\n   subsequent installation in the cache if appropriate.\"\n   */\n  Oop stream = stackTop();\n  if (!stream.is_mem()) { primitiveFail(); return; }\n  Object_p so = stream.as_object();\n  if (!so->isPointers()  ||  so->lengthOf() <  Object_Indices::StreamReadLimitIndex + 1) {\n    primitiveFail();\n    return;\n  }\n  Oop array = so->fetchPointer(Object_Indices::StreamArrayIndex);\n  oop_int_t index = so->fetchInteger(Object_Indices::StreamIndexIndex);\n  oop_int_t limit = so->fetchInteger(Object_Indices::StreamReadLimitIndex);\n  At_Cache::Entry* e = atCache.get_entry(array, false);\n  if (index >= limit  ||  !e->matches(array)) {\n    primitiveFail();\n    return;\n  }\n  ++index;\n  Oop result = commonVariableAt(array, index, e, false);\n  // above may GC\n  if (successFlag) {\n    stream = stackTop();\n    stream.as_object()->storeInteger(Object_Indices::StreamIndexIndex, index);\n    popThenPush(1, result);\n  }\n}\n\n\n\nvoid Squeak_Interpreter::primitiveNextInstance() {\n  Oop obj = stackTop();\n  Oop inst = The_Memory_System()->nextInstanceAfter(obj);\n  if (inst == roots.nilObj)\n    primitiveFail();\n  else\n    popThenPush(get_argumentCount() + 1, inst);\n}\n\nvoid Squeak_Interpreter::primitiveNextObject() {\n  Oop obj = stackTop();\n  if (!obj.is_mem())\n    popThenPush(get_argumentCount() + 1, Oop::from_int(0));\n  else {\n    Oop x = The_Memory_System()->nextObject(obj);\n    popThenPush(get_argumentCount() + 1, x);\n  }\n}\n\n\nvoid Squeak_Interpreter::primitiveNextPut() {\n  // only succeed if in atPutCache\n  Oop value = stackTop();\n  Oop stream = stackValue(1);\n  Object_p so;\n  if (!stream.isPointers()  || (so = stream.as_object())->lengthOf() < Object_Indices::StreamReadLimitIndex + 1) {\n    primitiveFail();\n    return;\n  }\n\n  Oop array = so->fetchPointer(Object_Indices::StreamArrayIndex);\n  oop_int_t index = so->fetchInteger(Object_Indices::StreamIndexIndex);\n  oop_int_t limit = so->fetchInteger(Object_Indices::StreamWriteLimitIndex); // Squeak bug, was StreamReadLimitIndex\n  At_Cache::Entry* e = atCache.get_entry(array, true);\n  if (index >= limit  ||  !e->matches(array)) {\n    primitiveFail();\n    return;\n  }\n\n  //cool\n  ++index;\n  commonVariableAtPut(array, index, value, e);\n  if (successFlag) {\n    so->storeInteger(Object_Indices::StreamIndexIndex, index);\n    popThenPush(2, value);\n  }\n}\n\n\nvoid Squeak_Interpreter::primitiveNoop() {\n  pop(get_argumentCount());\n}\nvoid Squeak_Interpreter::primitiveNotEqual() {\n  checkBooleanResult(!compare31or32BitsEqual(popStack(), popStack()));\n}\nvoid Squeak_Interpreter::primitiveObjectAt() {\n  oop_int_t index = popInteger();\n  Oop rcvr = popStack();\n  Object_p ro;\n  // only defined for compiled methods\n  success(index > 0  &&  rcvr.is_mem()  &&   index <= (ro = rcvr.as_object())->literalCount() + Object_Indices::LiteralStart);\n  if (successFlag)\n    push(ro->fetchPointer(index - 1));\n  else\n    unPop(2);\n}\n\nvoid Squeak_Interpreter::primitiveObjectAtPut() {\n  Oop newV = popStack();\n  oop_int_t index = popInteger();\n  Oop rcvr = popStack();\n  Object_p ro;\n  success(index > 0  &&  rcvr.is_mem()  &&  index <= (ro = rcvr.as_object())->literalCount() + Object_Indices::LiteralStart);\n  if (successFlag) {\n    ro->storePointer(index - 1, newV);\n    push(newV);\n  }\n  else\n    unPop(3);\n}\n\nvoid Squeak_Interpreter::primitiveObjectPointsTo() {\n  Oop thang = popStack();\n  Oop rcvr = popStack();\n  if (rcvr.is_int()) {\n    pushBool(false);\n    return;\n  }\n  Object_p ro = rcvr.as_object();\n  oop_int_t lastField = ro->lastPointer() / sizeof(Oop);\n  for( int i = Object::BaseHeaderSize / sizeof(Oop);  i <= lastField;  ++i)\n    if (ro->as_oop_p()[i] == thang) {\n      pushBool(true);\n      return;\n    }\n  pushBool(false);\n}\n\n\nvoid Squeak_Interpreter::primitiveObsoleteIndexedPrimitive() {\n  // \"Primitive. Invoke an obsolete indexed primitive.\"\n  Obsolete_Indexed_Primitive_Table::entry& e = obsoleteIndexedPrimitiveTable.contents[primitiveIndex];\n  if ( e.functionAddress != NULL) {\n    dispatchFunctionPointer(e.functionAddress, true);\n    return;\n  }\n  if ( e.pluginName == NULL  &&  e.functionName == NULL ) {\n    primitiveFail();\n    return;\n  }\n  e.functionAddress = The_Interactions.load_function_from_plugin(Logical_Core::main_rank, e.functionName, e.pluginName);\n  if (e.functionAddress == NULL) {\n    primitiveFail();\n    return;\n  }\n  dispatchFunctionPointer(e.functionAddress, true);\n}\n\nvoid Squeak_Interpreter::primitivePerform() {\n  Oop performSelector = roots.messageSelector;\n  Oop performMethod = roots.newMethod;\n  roots.messageSelector = stackValue(get_argumentCount() - 1);\n  Oop newReceiver = stackValue(get_argumentCount());\n\n  const bool print_startUps = false; // useful for debugging\n  if (print_startUps && roots.messageSelector.as_object()->equals_string(\"startUp:\")) {\n    stdout_printer->printf(\" startUp: \"); newReceiver.print(stdout_printer); stdout_printer->nl();\n    roots.messageSelector.print(dittoing_stdout_printer), stdout_printer->nl();\n  }\n\n  // Note: following lookup may fail\n\n  // slide args down over sel\n  set_argumentCount(get_argumentCount() - 1);\n  int selectorIndex = stackPointerIndex() - get_argumentCount();\n  transferFromIndexOfObjectToIndexOfObject(get_argumentCount(),\n                                           selectorIndex + 1,\n                                           activeContext_obj(),\n                                           selectorIndex,\n                                           activeContext_obj());\n  pop(1);\n  Oop lookupClass = newReceiver.fetchClass();\n  findNewMethodInClass(lookupClass);\n\n  {\n  Object_p nmo = newMethod_obj();\n  if (nmo->isCompiledMethod())\n    success(nmo->argumentCount() == get_argumentCount());\n  }\n\n  if (successFlag) {\n    executeNewMethodFromCache();\n    successFlag = true;\n  }\n  else {\n    for (int i = 1;  i <= get_argumentCount();  ++i)\n      activeContext_obj()->storePointer(get_argumentCount() - i + 1 + selectorIndex,\n                                        activeContext_obj()->fetchPointer(get_argumentCount() - i + selectorIndex));\n    unPop(1);\n    activeContext_obj()->storePointer(selectorIndex, roots.messageSelector);\n    set_argumentCount(get_argumentCount() + 1);\n    roots.newMethod = performMethod;\n    roots.messageSelector = performSelector;\n  }\n}\n\n\nvoid Squeak_Interpreter::primitivePerformInSuperclass() {\n  Oop lookupClass = stackTop();\n  Oop rcvr = stackValue(3);\n\n  if (rcvr.isKindOf(lookupClass)) {\n    popStack();\n    primitivePerformAt(lookupClass);\n    if (!successFlag)\n      push(lookupClass);\n  }\n  else\n    primitiveFail();  \n}\n\n\nvoid Squeak_Interpreter::primitivePerformWithArgs() {\n  primitivePerformAt(stackValue(get_argumentCount()).fetchClass());\n}\n\nvoid Squeak_Interpreter::primitivePushFalse() {\n  popStack();\n  push(roots.falseObj);\n}\nvoid Squeak_Interpreter::primitivePushMinusOne() {\n  untested();\n  popStack();\n  push(Oop::from_int(-1));\n}\nvoid Squeak_Interpreter::primitivePushNil() {\n  popStack();\n  push(roots.nilObj);\n}\nvoid Squeak_Interpreter::primitivePushOne() {\n  popStack();\n  push(Oop::from_int(1));\n}\nvoid Squeak_Interpreter::primitivePushSelf() {\n  push(popStack());\n}\nvoid Squeak_Interpreter::primitivePushTrue() {\n  popStack();\n  push(roots.trueObj);\n}\nvoid Squeak_Interpreter::primitivePushTwo() {\n  untested();\n  popStack();\n  push(Oop::from_int(2));\n}\nvoid Squeak_Interpreter::primitivePushZero() {\n  untested();\n  popStack();\n  push(Oop::from_int(0));\n}\nvoid Squeak_Interpreter::primitiveQuit() {\n  OS_Interface::sim_end_tracing();\n  OS_Interface::profiler_disable();\n  The_Measurements.print();\n  ioExit();\n }\n\nvoid Squeak_Interpreter::primitiveQuo() {\n  oop_int_t intR = stackIntegerValue(1);\n  oop_int_t intA = stackIntegerValue(0);\n  success(intA != 0);\n  if (!successFlag) return;\n  pop2AndPushIntegerIfOK(\n    intR > 0  ?  (intA > 0  ?     intR / intA   :  -intR / -intA)\n              :  (intA > 0  ?  -(-intR / intA)  :  -intR / -intA));\n}\n\n\n// Our VM does not want to run the idle process, since it wastes cycles and power on a multicore CPU\n// We have made the necessary changes to keep event handling going without it.\n// -- dmu 10/1/10\nvoid Squeak_Interpreter::primitiveRelinquishProcessor() {\n  static Oop last_wayward_idle_process = Oop::from_bits(0);\n  Oop this_process = roots.running_process_or_nil;\n  if (last_wayward_idle_process.bits() != this_process.bits())\n      lprintf(\"Deactivating caller process of primitiveRelinquishProcessor; assuming it's the idle process\\n\");;\n  last_wayward_idle_process = this_process;\n  \n  if (Logical_Core::num_cores > 1)\n    this_process.as_object()->store_allowable_cores_of_process(0LL); // not runnable anywhere\n  pop(1);\n  yield(\"stopping idle process\");\n}\n\n\nvoid Squeak_Interpreter::primitiveResume() {\n  Oop proc = stackTop();\n  success(get_argumentCount() == 0);\n  \n  if (!successFlag)\n    return;\n  \n  Oop procClass = splObj(Special_Indices::ClassProcess);\n  if (!proc.isKindOf(procClass)) {\n    primitiveFail();\n    return;\n  }\n  \n  resume(proc, \"primitiveResume\");\n  addedScheduledProcessMessage_class().send_to_other_cores();\n}\n\nvoid Squeak_Interpreter::primitiveScanCharacters() {\n  if (methodArgumentCount() != 6) { primitiveFail();  return; }\n\n  oop_int_t kernDelta = stackIntegerValue(0);\n  Oop stops = stackObjectValue(1);\n  Object_p so = stops.as_object();\n  if (!so->isArray()) { primitiveFail();  return; }\n  if (so->slotSize() < 258)  { primitiveFail();  return; }\n  oop_int_t scanRightX = stackIntegerValue(2);\n  Oop sourceString = stackObjectValue(3);\n  Object_p sso = sourceString.as_object();\n  if (!sso->isBytes()) { primitiveFail();  return; }\n  oop_int_t scanStopIndex = stackIntegerValue(4);\n  oop_int_t scanStartIndex = stackIntegerValue(5);\n  if (scanStartIndex <= 0  ||  scanStopIndex <= 0  ||  scanStopIndex > sso->byteSize()) {\n    primitiveFail();  return;\n  }\n\n\n  Oop rcvr = stackObjectValue(6);\n  Object_p ro = rcvr.as_object();\n  if (!ro->isPointers() || ro->slotSize() < 4) {\n    primitiveFail();  return;\n  }\n  oop_int_t scanDestX = ro->fetchInteger(0);\n  oop_int_t scanLastIndex = ro->fetchInteger(1);\n  Oop scanXTable = ro->fetchPointer(2);\n  Oop scanMap = ro->fetchPointer(3);\n  Object_p sxto;\n  if (!scanXTable.is_mem()  ||  !(sxto = scanXTable.as_object())->isArray()) {\n    primitiveFail();  return;\n  }\n  Object_p smo;\n  if (!scanMap.is_mem()  ||  (smo = scanMap.as_object())->slotSize() != 256) {\n    primitiveFail();  return;\n  }\n  if (!successFlag) return;\n  oop_int_t maxGlyph = sxto->slotSize() - 2;\n\n  Oop nil = roots.nilObj;\n  for ( scanLastIndex = scanStartIndex;  scanLastIndex <= scanStopIndex;  ++scanLastIndex ) {\n    char ascii = sso->fetchByte(scanLastIndex - 1);\n    Oop stopReason = so->fetchPointer( u_char(ascii) );\n    if  ( stopReason != nil ) {\n      if (!Oop::isIntegerValue(scanDestX)) {\n        primitiveFail();  return;\n      }\n      ro->storeInteger(0, scanDestX);\n      ro->storeInteger(1, scanLastIndex);\n      pop(7);\n      push(stopReason);\n      return;\n    }\n     oop_int_t glyphIndex = smo->fetchInteger(u_char(ascii));\n    if (failed() ||  glyphIndex > maxGlyph) {\n      primitiveFail();  return;\n    }\n    oop_int_t sourceX = sxto->fetchInteger(glyphIndex);\n    oop_int_t sourceX2 = sxto->fetchInteger(glyphIndex + 1);\n    if (failed()) { return; }\n    oop_int_t nextDestX = scanDestX + sourceX2 - sourceX;\n    if (nextDestX > scanRightX) {\n      if (!Oop::isIntegerValue(scanDestX))  {\n        primitiveFail(); return;\n      }\n      ro->storeInteger(0, scanDestX);\n      ro->storeInteger(1, scanLastIndex);\n      pop(7);\n      push(so->fetchPointer(Object_Indices::CrossedX - 1));\n      return;\n    }\n    scanDestX = nextDestX + kernDelta;\n  }\n  if (!Oop::isIntegerValue(scanDestX)) {\n    primitiveFail();  return;\n  }\n  ro->storeInteger(0, scanDestX);\n  ro->storeInteger(1, scanStopIndex);\n  pop(7);\n  push(so->fetchPointer(Object_Indices::EndOfRun - 1));\n}\n\nvoid Squeak_Interpreter::primitiveScreenSize() {\n  pop(1);\n  u_int32 pw = ioScreenSize();\n  push( Object::makePoint( pw >> 16,  pw & 0xffff)->as_oop());\n}\n\nvoid Squeak_Interpreter::primitiveSecondsClock() {\n  popThenPush(1, Object::positive32BitIntegerFor(ioSeconds()));\n}\n\nvoid Squeak_Interpreter::primitiveSetDisplayMode() {\n  untested();\n  bool fsFlag = booleanValueOf(stackTop());\n  int h = stackIntegerValue(1);\n  int w = stackIntegerValue(2);\n  int d = stackIntegerValue(3);\n  if (successFlag) {\n    bool okay = ioSetDisplayMode(w, h, d, fsFlag);\n    if (successFlag) {\n      pop(5);\n      pushBool(okay);\n    }\n  }\n}\n\nvoid Squeak_Interpreter::primitiveSetFullScreen() {\n  untested();\n  Oop a = stackTop();\n  if (a == roots.trueObj)\n    ioSetFullScreen(true);\n  else if (a == roots.falseObj)\n    ioSetFullScreen(false);\n  else\n    primitiveFail();\n  if (successFlag) pop(1);\n}\n\nvoid Squeak_Interpreter::primitiveSetGCSemaphore() {\n  oop_int_t index = stackIntegerValue(0);\n  if (successFlag) {\n    set_gcSemaphoreIndex(index);\n    pop(get_argumentCount());\n  }\n}\n\nvoid Squeak_Interpreter::primitiveSetInterruptKey() {\n  oop_int_t keycode = popInteger();\n  if (successFlag)  set_interruptKeycode(keycode);\n  else              unPop(1);\n}\n\nvoid Squeak_Interpreter::primitiveShortAt() {\n  oop_int_t index = stackIntegerValue(0);\n  Oop rcvr = stackValue(1); Object_p ro;\n  success(rcvr.is_mem()  &&  (ro = rcvr.as_object())->isWordsOrBytes());\n  if (!successFlag) return;\n  oop_int_t sz = ro->sizeBits() - Object::BaseHeaderSize/sizeof(int16);\n  success( index >= 1  &&  index <= sz );\n  if (!successFlag) return;\n  popThenPushInteger(2, ((int16*)(ro->as_char_p() + Object::BaseHeaderSize)) [index - 1]);\n}\n\nvoid Squeak_Interpreter::primitiveShortAtPut() {\n  oop_int_t value = stackIntegerValue(0);\n  oop_int_t index = stackIntegerValue(1);\n  Oop rcvr = stackValue(2);  Object_p ro;\n  success(rcvr.is_mem()  &&  (ro = rcvr.as_object())->isWordsOrBytes());\n  if (!successFlag) return;\n  oop_int_t sz = ro->sizeBits() - Object::BaseHeaderSize/sizeof(int16);\n  success( index >= 1  &&  index <= sz );\n  success( -32768 <= value  &&  value < 32768 );\n  if (!successFlag) return;\n  The_Memory_System()->store_enforcing_coherence(&((int16*)(ro->as_char_p() + Object::BaseHeaderSize))[index - 1], value, ro);\n  pop(2);\n}\n\nvoid Squeak_Interpreter::primitiveShowDisplayRect() {\n  displayBitsOf(\n      displayObject(),\n      stackIntegerValue(3), stackIntegerValue(1), stackIntegerValue(2), stackIntegerValue(0));\n  if (successFlag) {\n    ioForceDisplayUpdate();\n    pop(4);\n  }\n}\n\nvoid Squeak_Interpreter::primitiveSignal() {\n  Oop sema = stackTop();\n  assertClass(sema, splObj(Special_Indices::ClassSemaphore));\n  if (successFlag) {\n    Safepoint_Ability sa(false);\n    sema.as_object()->synchronousSignal(\"primitiveSignal\");\n  }\n}\n\nvoid Squeak_Interpreter::primitiveSignalAtBytesLeft() {\n  oop_int_t bytes = popInteger();\n  The_Memory_System()->set_lowSpaceThreshold(successFlag ? bytes : 0);\n  if (!successFlag)\n    unPop(1);\n}\n\n\nvoid Squeak_Interpreter::primitiveSignalAtMilliseconds() {\n  oop_int_t tick = popInteger();\n  Oop sema = popStack();\n  if (!successFlag) {\n    unPop(2);\n    return;\n  }\n  bool b = sema.fetchClass() == splObj(Special_Indices::ClassSemaphore);\n  roots.specialObjectsOop.as_object()->\n    storePointer(Special_Indices::TheTimerSemaphore,\n                 b  ?  sema : roots.nilObj);\n  set_nextWakeupTick(b ? tick : 0);\n  // lprintf(\"set nextwakeuptick tick %d, now %d\\n\", tick, ioWhicheverMSecs() & MillisecondClockMask);\n}\n\n\nvoid Squeak_Interpreter::primitiveSine() {\n  double r = popFloat();\n  if (successFlag)\n    pushFloat(sin(r));\n  else\n    unPop(1);\n}\n\n\nvoid Squeak_Interpreter::primitiveSize() {\n  Oop rcvr = stackTop();\n  if (rcvr.is_int()) {\n    primitiveFail();\n    return;\n  }\n  Object_p ro = rcvr.as_object();\n  if ( Object::Format::has_only_fixed_fields(ro->format())) {\n    primitiveFail();\n    return;\n  }\n  int sz = ro->stSize();\n  if (successFlag)\n    popThenPush(1, Object::positive32BitIntegerFor(sz));\n}\n\n\nvoid Squeak_Interpreter::primitiveSnapshot() {\n  snapshot(false);\n}\nvoid Squeak_Interpreter::primitiveSnapshotEmbedded() {\n  untested();\n  snapshot(true);\n}\nvoid Squeak_Interpreter::primitiveSomeInstance() {\n  Oop klass = stackTop();\n  Oop instance = The_Memory_System()->initialInstanceOf(klass);\n  if (instance == roots.nilObj)\n    primitiveFail();\n  else\n    popThenPush(get_argumentCount() + 1,  instance);\n}\n\nvoid Squeak_Interpreter::primitiveSomeObject() {\n  pop(get_argumentCount() + 1);\n  Oop r = The_Memory_System()->firstAccessibleObject();\n  push(r);\n}\n\nvoid Squeak_Interpreter::primitiveSpecialObjectsOop() {\n  popThenPush(1, roots.specialObjectsOop);\n}\n\nvoid Squeak_Interpreter::primitiveSquareRoot() {\n  double rcvr = popFloat();\n  success(rcvr >= 0.0);\n  if (successFlag)  pushFloat(sqrt(rcvr));\n  else               unPop(1);\n}\n\nvoid Squeak_Interpreter::primitiveStoreImageSegment() {\n  untested();\n  unimplemented();\n}\nvoid Squeak_Interpreter::primitiveStoreStackp() {\n  Oop ctxt = stackValue(1);\n  oop_int_t newStackp = stackIntegerValue(0);\n  success(newStackp >= 0\n      &&  newStackp <=  (Object_Indices::LargeContextSize - Object::BaseHeaderSize) / bytesPerWord  - Object_Indices::CtextTempFrameStart\n      &&  ctxt.is_mem());\n  if (!successFlag) { primitiveFail(); return; }\n  Object_p co = ctxt.as_object();\n  int stackp = co->fetchStackPointer();\n  for (int i = stackp + 1;  i <= newStackp;  ++i)\n    co->storePointer(i + Object_Indices::CtextTempFrameStart - 1,  roots.nilObj);\n  co->storeStackPointerValue(newStackp);\n  pop(1);\n}\n\nvoid Squeak_Interpreter::primitiveStringAt() {\n  commonAt(true);\n}\nvoid Squeak_Interpreter::primitiveStringAtPut() {\n  commonAtPut(true);\n}\n\nvoid Squeak_Interpreter::primitiveStringReplace() {\n  Oop array = stackValue(4);\n  oop_int_t start = stackIntegerValue(3);\n  oop_int_t stop = stackIntegerValue(2);\n  Oop repl = stackValue(1);\n  oop_int_t replStart = stackIntegerValue(0);\n\n  if (!successFlag ||  !array.is_mem()  ||  !repl.is_mem()) {\n    primitiveFail();\n    return;\n  }\n  Object_p ao = array.as_object();\n  oop_int_t totalLength = ao->lengthOf();\n  oop_int_t arrayInstSize = ao->fixedFieldsOfArray();\n  if (start < 1  ||  start - 1 > stop  ||  stop + arrayInstSize > totalLength) {\n    primitiveFail();\n    return;\n  }\n  Object_p ro = repl.as_object();\n  totalLength = ro->lengthOf();\n  oop_int_t replInstSize = ro->fixedFieldsOfArray();\n  if (replStart < 1  &&  stop - start + replStart + replInstSize > totalLength) {\n    primitiveFail();\n    return;\n  }\n  int arrayFmt = ao->format(),  replFmt = ro->format();\n  bool formats_match =\n    Object::Format::has_bytes(arrayFmt)\n      ? (arrayFmt & ~Object::Format::byte_size_bits) == (replFmt & ~Object::Format::byte_size_bits)\n      : arrayFmt == replFmt;\n  if (!formats_match) { primitiveFail(); return; }\n\n  oop_int_t srcIndex = replStart + replInstSize - 1;\n  if (Object::Format::has_only_oops(arrayFmt))\n    for (int i = start + arrayInstSize - 1;  i <= stop + arrayInstSize - 1;  ++i)\n      ao->storePointer(i, ro->fetchPointer(srcIndex++));\n  else if (!Object::Format::has_bytes(arrayFmt))\n    for (int i = start + arrayInstSize - 1;  i <= stop + arrayInstSize - 1;  ++i)\n      ao->storeLong32(i, ro->fetchLong32(srcIndex++));\n  else\n    for (int i = start + arrayInstSize - 1;  i <= stop + arrayInstSize - 1;  ++i)\n      ao->storeByte( i, ro->fetchByte(srcIndex++));\n\n  pop(get_argumentCount());\n}\n\n\nvoid Squeak_Interpreter::primitiveSubtract() {\n  pop2AndPushIntegerIfOK(stackIntegerValue(1) - stackIntegerValue(0));\n}\n\nvoid Squeak_Interpreter::primitiveSuspend() {\n  if (!primitiveThisProcess_was_called()) {\n    static int kvetch_count = 10;\n    if (kvetch_count) {\n      lprintf(\"WARNING: primitiveSuspend called without primitiveThisProcess: this image probably cannot handle multithreading!\\n\");\n      --kvetch_count;\n      if (!kvetch_count) lprintf(\"WARNING: This is your last warning!\\n\");\n    }\n  }\n\n  Oop procToSuspend = stackTop();\n  Oop procClass = splObj(Special_Indices::ClassProcess);\n  if (!procToSuspend.isKindOf(procClass)) {\n    primitiveFail();\n    return;\n  }\n  \n  Oop old_list;\n  {\n    Scheduler_Mutex sm(\"primitiveSuspend\");\n    Object_p proc = procToSuspend.as_object();\n    old_list = proc->remove_process_from_scheduler_list(\"primitiveSuspend\");\n    pop(1);\n    push(old_list);\n    if (get_running_process() == procToSuspend)  {\n      put_running_process_to_sleep(\"primitiveSuspend\");\n      transfer_to_highest_priority(\"primitiveSuspend\");      \n    }\n    else set_yield_requested(true);\n  }\n}\n\n\nstatic void terminate_to(Oop aContext, Oop thisCntx, Oop nilOop) {\n  // Warning: only works if called for this very process\n  Object_p aco = aContext.as_object();\n  Object_p tco = thisCntx.as_object();\n  \n  if (tco->hasSender(aContext)) {\n    Object_p nextCntx;\n    for (Object_p currentCntx = tco->fetchPointer(Object_Indices::SenderIndex).as_object();\n         currentCntx != aco;\n         currentCntx = nextCntx) {\n      nextCntx = currentCntx->fetchPointer(Object_Indices::SenderIndex).as_object();\n      currentCntx->storePointer(Object_Indices::            SenderIndex, nilOop);\n      currentCntx->storePointer(Object_Indices::InstructionPointerIndex, nilOop);\n    }\n  }\n  tco->storePointer(Object_Indices::SenderIndex, aContext);\n}\n\n\nvoid Squeak_Interpreter::primitiveTerminateTo() {\n  // Warning: only works if called for this very process\n  Oop aContext = popStack();\n  Oop thisCntx = popStack();\n\n  if (!aContext.is_mem()  ||  !thisCntx.is_mem()) {\n    unPop(2);\n    primitiveFail();\n    return;\n  }\n  terminate_to(aContext, thisCntx, roots.nilObj);\n  push(thisCntx);\n}\n\n\nvoid Squeak_Interpreter::primitiveTestDisplayDepth() {\n  oop_int_t bitsPerPixel = stackIntegerValue(0);\n  if (!successFlag) return;\n  pop(2);\n  pushBool(ioHasDisplayDepth(bitsPerPixel));\n}\n\nvoid Squeak_Interpreter::primitiveTimesTwoPower() {\n  oop_int_t arg = popInteger();\n  double rcvr = popFloat();\n  if (successFlag)\n    pushFloat(ldexp(rcvr, arg));\n  else\n    unPop(2);\n}\n\nvoid Squeak_Interpreter::primitiveTruncated() {\n  double rcvr = popFloat();\n  double trunc;\n  if (successFlag) {\n    modf(rcvr, &trunc);\n    // XXX ranges wrong if smallints not 31 bits xxx_dmu 64\n    success(double(MinSmallInt) <= trunc  &&  trunc <= double(MaxSmallInt));\n  }\n  if (successFlag)  pushInteger(oop_int_t(trunc));\n  else unPop(1);\n}\n\nvoid Squeak_Interpreter::primitiveUnloadModule() {\n  untested();\n  unimplemented();\n}\n\nvoid Squeak_Interpreter::primitiveVMParameter() {\n  lprintf(\"primitiveVMParameter really not done\\n\");\n  static const int paramsArraySize = 40;\n  if (get_argumentCount() == 0) {\n    Object_p ro = splObj_obj(Special_Indices::ClassArray)->instantiateClass(paramsArraySize);\n    for (int i = 0;  i < paramsArraySize;  ++i)  ro->storePointer(i, Oop::from_int(0));\n    ro->storePointer(23, Oop::from_int(The_Memory_System()->get_shrinkThreshold()));\n    ro->storePointer(24, Oop::from_int(The_Memory_System()->get_growHeadroom()   ));\n\n    popThenPush(1, ro->as_oop());\n  }\n  else if (get_argumentCount() == 1) {\n    Oop arg = stackTop();\n    if (!arg.is_int()) { primitiveFail(); return; }\n    oop_int_t argi = arg.integerValue();\n    oop_int_t result;\n    switch (argi) {\n        default:\n          lprintf(\"primitiveVMParameter: attempt to get %d\\n\", argi);\n          primitiveFail();\n          return;\n        case  0: result = 0x828677; break; // ASCII value of RVM (RoarVM is to long to fit into SmallInt)\n        case 24: result = The_Memory_System()->get_shrinkThreshold(); break;\n        case 25: result = The_Memory_System()->get_growHeadroom(); break;\n    }\n    popThenPush(2, Oop::from_int(result));\n  }\n  else if (get_argumentCount() == 2) {\n    Oop val = stackTop();\n    Oop index = stackValue(1);\n    oop_int_t result;\n    if (!val.is_int() || !index.is_int()) {\n      primitiveFail();\n      return;\n    }\n    oop_int_t vi = val.integerValue();\n    oop_int_t ii = index.integerValue();\n    switch (ii) {\n        default:\n          static bool warned = false;  // Stefan: think, does not need to be threadsafe. 2009-09-05\n          if (!warned) {\n            warned = true;\n            lprintf(\"vmParameter %d = %d unimplemented (suppresing additional warnings)\\n\", ii, vi);\n          }\n          result = 0;\n          break;\n        case 24: result = The_Memory_System()->get_shrinkThreshold();  The_Memory_System()->set_shrinkThreshold(vi);  break;\n        case 25: result = The_Memory_System()->get_growHeadroom();     The_Memory_System()->set_growHeadroom(vi);     break;\n    }\n    popThenPush(3, Oop::from_int(result));\n  }\n  else primitiveFail();\n}\n\nvoid Squeak_Interpreter::primitiveVMPath() {\n  oop_int_t sz = vmPathSize();\n  Object_p s = classString()->instantiateClass(sz);\n  vmPathGetLength(s->as_char_p() + Object::BaseHeaderSize, sz);\n  popThenPush(1, s->as_oop());\n}\n\nvoid Squeak_Interpreter::primitiveValue() {\n  Oop blockContext = stackValue(get_argumentCount());\n  if (!blockContext.is_mem()) { primitiveFail(); return; }\n  Object_p bco = blockContext.as_object();\n  oop_int_t blockArgumentCount = bco->argumentCountOfBlock();\n  success(get_argumentCount() == blockArgumentCount\n      &&  bco->fetchPointer(Object_Indices::CallerIndex) == roots.nilObj);\n  if (!successFlag) return;\n\n  transferFromIndexOfObjectToIndexOfObject(\n                                           get_argumentCount(),\n                                           stackPointerIndex() - get_argumentCount() + 1,\n                                           activeContext_obj(),\n                                           Object_Indices::TempFrameStart,\n                                           bco);\n  // assume prev call made blockContext a root\n\n  pop(get_argumentCount()+1);\n  Oop initialIP = bco->fetchPointer(Object_Indices::InitialIPIndex);\n  assert(initialIP.is_int());\n  bco->storePointerUnchecked(Object_Indices::InstructionPointerIndex, initialIP);\n  bco->storeStackPointerValue(get_argumentCount());\n  bco->storePointerUnchecked(Object_Indices::CallerIndex, activeContext());\n  newActiveContext(blockContext, bco);\n}\n\nvoid Squeak_Interpreter::primitiveValueUninterruptably() {\n  untested();\n  primitiveValue();\n}\nvoid Squeak_Interpreter::primitiveValueWithArgs() {\n  Oop argumentArray = popStack();\n  Oop blockContext = popStack();\n  Object_p argumentArray_obj;\n  Object_p blockContext_obj;\n\n  if (!argumentArray.is_mem()  ||  !blockContext.is_mem()\n      ||  !(argumentArray_obj = argumentArray.as_object())->isArray()) {\n    unPop(2);\n    primitiveFail();\n    return;\n  }\n  blockContext_obj = blockContext.as_object();\n  oop_int_t blockArgumentCount = blockContext_obj->argumentCountOfBlock(), arrayArgumentCount;\n\n  if (successFlag) {\n    arrayArgumentCount = argumentArray_obj->fetchWordLength();\n    success( arrayArgumentCount == blockArgumentCount\n         &&  blockContext_obj->fetchPointer(Object_Indices::CallerIndex) == roots.nilObj );\n  }\n  if (successFlag) {\n    transferFromIndexOfObjectToIndexOfObject(arrayArgumentCount,\n                                             0,\n                                             argumentArray_obj,\n                                             Object_Indices::TempFrameStart,\n                                             blockContext_obj);\n\n    Oop initialIP = blockContext_obj->fetchPointer(Object_Indices::InitialIPIndex);\n    blockContext_obj->storePointerUnchecked(Object_Indices::InstructionPointerIndex, initialIP);\n    blockContext_obj->storeStackPointerValue(arrayArgumentCount);\n    blockContext_obj->storePointerUnchecked(Object_Indices::CallerIndex, activeContext());\n    newActiveContext(blockContext, blockContext_obj);\n  }\n  else\n    unPop(2);\n}\n\n# if Include_Closure_Support\n\nvoid Squeak_Interpreter::primitiveClosureValue() {\n  Oop blockClosure = stackValue(get_argumentCount());\n  if (!blockClosure.is_mem()) { primitiveFail(); return; }\n  Object_p blockClosure_obj = blockClosure.as_object();\n  int blockArgumentCount = blockClosure_obj->argumentCountOfClosure();\n  if ( !successFlag || get_argumentCount() != blockArgumentCount) { \n    primitiveFail(); \n    return; \n  }\n  \n  Oop outerContext = blockClosure_obj->fetchPointer(Object_Indices::ClosureOuterContextIndex);\n  if (!outerContext.isContext()) { primitiveFail(); return; }\n  Object_p outerContext_obj = outerContext.as_object();\n  \n  Oop closureMethod = outerContext_obj->fetchPointer(Object_Indices::MethodIndex);\n  Object_p closureMethod_obj = closureMethod.as_object();\n  if (!closureMethod_obj->isCompiledMethod()) { primitiveFail(); return; }\n  \n  activateNewClosureMethod(blockClosure_obj, (Object_p)NULL);\n  if (!doing_primitiveClosureValueNoContextSwitch)\n    quickCheckForInterrupts();\n}\n\n\n/*\n What follows is an explanation of the following primitive from Eliot Miranda: (dmu 6/8/10)\n \n  Eliot,\n\n  I am currently bringing a ST VM up to 4.1, and saw that the image wants a primitive called:\n  primitiveClosureValueNoContextSwitch\n  What gives? Why is the NoContextSwitch property needed? Can you point me to an explanation?\n \n Eliot writes:\n\n  It is to do with critical sections and unwinds, e.g. Semaphore>>critical: and BlockClosure>>ensure:.\n\n  Take the following def of Semaphore>>critical:\n\n  critical: mutuallyExcludedBlock\n  \"Evaluate mutuallyExcludedBlock only if the receiver is not currently in\n  the process of running the critical: message. If the receiver is, evaluate\n  mutuallyExcludedBlock after the other critical: message is finished.\"\n\n  [self wait.\n   aBlock value] ensure: [self signal]\n\n  If there is a preemption point on block activation (natural since they build frames and so in Peter's VM style,\n testing for events on stack overflow, there is a preemption point on block activation) then the\n process can be preempted after entering  [self wait. aBlock value] but before evaluating\n self wait   and so if the process is unwound (e.g. via Process>>terminate issued form some other process)\n the semaphore can gain an extra signal.\n \n Squeak 4.1 doesn't yet use this knowledge in Semaphore>>critical: but I believe it can.\n \n -- Eliot Miranda 6/2010\n*/                                                    \n\n\nvoid Squeak_Interpreter::primitiveClosureValueNoContextSwitch() {\n  doing_primitiveClosureValueNoContextSwitch = true;\n  primitiveClosureValue(); \n}\n\n\n\nvoid Squeak_Interpreter::primitiveClosureValueWithArgs() {\n  Oop argumentArray = stackTop();\n  if (!argumentArray.is_mem()) { primitiveFail(); return; }\n  Object_p argumentArray_obj = argumentArray.as_object();\n  \n  // check for enough space in thisContext to push all args\n  int arraySize = argumentArray_obj->fetchWordLength();\n  int cntxSize = activeContext_obj()->fetchWordLength();\n  if ( stackPointerIndex() + arraySize  >=  cntxSize) { primitiveFail(); return; }\n  \n  Oop blockClosure = stackValue(get_argumentCount());\n  if (blockClosure.fetchClass() != splObj(Special_Indices::ClassBlockClosure)) { primitiveFail(); return; }\n  Object_p blockClosure_obj = blockClosure.as_object();\n  int blockArgumentCount = blockClosure_obj->argumentCountOfClosure();\n  if ( arraySize != blockArgumentCount ) { primitiveFail(); return; }\n  \n  // paranoid check could discard later\n  Oop outerContext = blockClosure_obj->fetchPointer(Object_Indices::ClosureOuterContextIndex);\n  if (!outerContext.isContext()) { primitiveFail(); return; }\n  Object_p outerContext_obj = outerContext.as_object();\n  \n  Oop closureMethod = outerContext_obj->fetchPointer(Object_Indices::MethodIndex);\n  Object_p closureMethod_obj = closureMethod.as_object();\n  if (!closureMethod_obj->isCompiledMethod()) { primitiveFail(); return; }\n  \n  popStack();\n  \n  // Copy args to stack and activate\n  for (int i = 1;  i <= arraySize;  ++i )\n    push( argumentArray_obj->fetchPointer(i - 1));\n  \n  set_argumentCount(arraySize);\n  activateNewClosureMethod(blockClosure_obj, (Object_p)NULL);\n  quickCheckForInterrupts();\n}\n\n# endif\n\n\nvoid Squeak_Interpreter::primitiveWait() {\n  Oop sema = stackTop();\n  if (!sema.is_mem()) {  primitiveFail(); return; }\n  Object_p so = sema.as_object();\n  assertClass(so, splObj(Special_Indices::ClassSemaphore));\n  Semaphore_Mutex sm(\"primitiveWait\");\n  if (successFlag) {\n    oop_int_t excessSignals = so->fetchInteger(Object_Indices::ExcessSignalsIndex);\n    if (excessSignals > 0)\n      so->storeInteger(Object_Indices::ExcessSignalsIndex, excessSignals - 1);\n    else {\n      Scheduler_Mutex sm(\"primitiveWait\");\n      Oop activeProc = remove_running_process_from_scheduler_lists_and_put_it_to_sleep(\"primitiveWait\");\n      so->addLastLinkToList(activeProc);\n      transfer_to_highest_priority(\"primitiveWait\");\n      if (Check_Prefetch) assert_always(have_executed_currentBytecode);\n    }\n  }\n}\n\nvoid Squeak_Interpreter::primitiveYield() {\n  yield(\"primitiveYield\");\n}\n\n\nvoid Squeak_Interpreter::startProfiling() {\n  untested();\n  unimplemented();\n}\nvoid Squeak_Interpreter::stopProfiling()  {\n  untested();\n  unimplemented();\n}\n\n\n\nvoid Squeak_Interpreter::clearProfile() {\n  untested();\n  unimplemented();\n}\nvoid Squeak_Interpreter::dumpProfile()  {\n  untested();\n  unimplemented();\n}\n\n\n\n\n\n\n\nvoid Squeak_Interpreter::primitiveFloatAdd(Oop r, Oop a) {\n  double rd = loadFloatOrIntFrom(r);\n  double ad = loadFloatOrIntFrom(a);\n  if (successFlag) {\n    pop(2);\n    pushFloat(rd + ad);\n  }\n}\n\nvoid Squeak_Interpreter::primitiveFloatSubtract(Oop r, Oop a) {\n  double rd = loadFloatOrIntFrom(r);\n  double ad = loadFloatOrIntFrom(a);\n  if (successFlag) {\n    pop(2);\n    pushFloat(rd - ad);\n  }\n}\n\nvoid Squeak_Interpreter::primitiveFloatMultiply(Oop r, Oop a) {\n  double rd = loadFloatOrIntFrom(r);\n  double ad = loadFloatOrIntFrom(a);\n  if (successFlag) {\n    pop(2);\n    pushFloat(rd * ad);\n  }\n}\n\nvoid Squeak_Interpreter::primitiveFloatDivide(Oop r, Oop a) {\n  double rd = loadFloatOrIntFrom(r);\n  double ad = loadFloatOrIntFrom(a);\n  if (successFlag) {\n    success(ad != 0.0);\n    if (successFlag) {\n      pop(2);\n      pushFloat(rd / ad);\n    }\n  }\n}\n\nbool Squeak_Interpreter::primitiveFloatLess(Oop r, Oop a) {\n  double rd = loadFloatOrIntFrom(r);\n  double ad = loadFloatOrIntFrom(a);\n  return  successFlag  &&  rd < ad;\n}\n\nbool Squeak_Interpreter::primitiveFloatGreater(Oop r, Oop a) {\n  double rd = loadFloatOrIntFrom(r);\n  double ad = loadFloatOrIntFrom(a);\n  return  successFlag  &&  rd > ad;\n}\n\nbool Squeak_Interpreter::primitiveFloatEqual(Oop r, Oop a) {\n  double rd = loadFloatOrIntFrom(r);\n  double ad = loadFloatOrIntFrom(a);\n  return  successFlag  &&  rd == ad;\n}\n\n# if Include_Closure_Support\nvoid Squeak_Interpreter::primitiveClosureCopyWithCopiedValues() {\n  Safepoint_Ability sa(false);\n  int numArgs = stackIntegerValue(1);\n  Oop copiedValues = stackTop();\n  success( copiedValues.fetchClass() == splObj(Special_Indices::ClassArray) );\n  if (!successFlag)  { return; }  \n  \n  Object_p copiedValues_obj = copiedValues.as_object();\n  int numCopiedValues = copiedValues_obj->fetchWordLength();\n  \n  Oop newClosure = closureCopy(numArgs,\n                               // greater by 1 because of preincre of localIP\n                              instructionPointer() + 2 - (method_obj()->as_u_char_p() + Object::BaseHeaderSize),\n                               numCopiedValues);\n  Object_p newClosure_obj = newClosure.as_object();\n  newClosure_obj->storePointer(Object_Indices::ClosureOuterContextIndex, stackValue(2));\n  if (numCopiedValues > 0) {\n    // alloc for gc may have moved copied values\n    copiedValues = stackTop();\n    copiedValues_obj = copiedValues.as_object();\n    for ( int i = 0;  i < numCopiedValues;  ++i )\n      newClosure_obj->storePointerUnchecked(i + Object_Indices::ClosureFirstCopiedValueIndex, copiedValues_obj->fetchPointer(i));\n  }\n  popThenPush(3, newClosure);\n}\n\n# endif\n"
  },
  {
    "path": "vm/src/interpreter/interpreter_primitives.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n// Included into the middle of squeak_interpreter.h\n\nvoid primitiveAdd();\nvoid primitiveArrayBecome();\nvoid primitiveArrayBecomeOneWay();\nvoid primitiveArrayBecomeOneWayCopyHash();\nvoid primitiveArctan();\nvoid primitiveAsFloat();\nvoid primitiveAsOop();\nvoid primitiveAt();\nvoid primitiveAtEnd();\nvoid primitiveAtPut();\nvoid primitiveBeCursor();\nvoid primitiveBeDisplay();\nvoid primitiveBeep();\nvoid primitiveBitAnd();\nvoid primitiveBitOr();\nvoid primitiveBitShift();\nvoid primitiveBitXor();\nvoid primitiveBlockCopy();\nvoid primitiveBytesLeft();\nvoid primitiveCalloutToFFI();\nvoid primitiveChangeClass();\nvoid primitiveClass();\nvoid primitiveClipboardText();\nvoid primitiveClone();\nvoid primitiveConstantFill();\nvoid primitiveCopyObject();\nvoid primitiveDeferDisplayUpdates();\nvoid primitiveDiv();\nvoid primitiveDivide();\nvoid primitiveDoPrimitiveWithArgs();\nvoid primitiveDoNamedPrimitiveWithArgs();\nvoid primitiveEqual();\nvoid primitiveEquivalent();\nvoid primitiveExecuteMethod();\nvoid primitiveExecuteMethodArgsArray();\nvoid primitiveExitToDebugger();\nvoid primitiveExponent();\nvoid primitiveExp();\nvoid primitiveExternalCall();\nvoid primitiveFindHandlerContext();\nvoid primitiveFindNextUnwindContext();\nvoid primitiveFloatAdd();\nvoid primitiveFloatMultiply();\nvoid primitiveFloatDivide();\nvoid primitiveFloatLess();\nvoid primitiveFloatGreater();\nvoid primitiveFloatEqual();\nvoid primitiveFloatGreaterOrEqual();\nvoid primitiveFloatGreaterThan();\nvoid primitiveFloatLessOrEqual();\nvoid primitiveFloatLessThan();\nvoid primitiveFloatNotEqual();\nvoid primitiveFloatSubtract();\nvoid primitiveFlushCache();\nvoid primitiveFlushCacheByMethod();\nvoid primitiveFlushCacheSelective();\nvoid primitiveFlushExternalPrimitives();\nvoid primitiveForceDisplayUpdate();\nvoid primitiveFormPrint();\nvoid primitiveFractionalPart();\nvoid primitiveFullGC();\nvoid primitiveGetAttribute();\nvoid primitiveGetNextEvent();\nvoid primitiveGreaterOrEqual();\nvoid primitiveGreaterThan();\nvoid primitiveImageName();\nvoid primitiveIncrementalGC();\nvoid primitiveInputSemaphore();\nvoid primitiveInputWord();\nvoid primitiveInstVarAt();\nvoid primitiveInstVarAtPut();\nvoid primitiveInstVarsPutFromStack();\nvoid primitiveIntegerAt();\nvoid primitiveIntegerAtPut();\nvoid primitiveInterruptSemaphore();\nvoid primitiveInvokeObjectAsMethod();\nvoid primitiveKbdNext();\nvoid primitiveKbdPeek();\nvoid primitiveLessOrEqual();\nvoid primitiveLessThan();\nvoid primitiveListBuiltinModule();\nvoid primitiveListExternalModule();\nvoid primitiveLoadImageSegment();\nvoid primitiveLoadInstVar();\nvoid primitiveLogN();\nvoid primitiveLowSpaceSemaphore();\nvoid primitiveMakePoint();\nvoid primitiveMarkHandlerMethod();\nvoid primitiveMarkUnwindMethod();\nvoid primitiveMillisecondClock();\nvoid primitiveMod();\nvoid primitiveMouseButtons();\nvoid primitiveMousePoint();\nvoid primitiveMultiply();\nvoid primitiveNew();\nvoid primitiveNewMethod();\nvoid primitiveNewWithArg();\nvoid primitiveNext();\nvoid primitiveNextInstance();\nvoid primitiveNextObject();\nvoid primitiveNextPut();\nvoid primitiveNoop();\nvoid primitiveNotEqual();\nvoid primitiveObjectAt();\nvoid primitiveObjectAtPut();\nvoid primitiveObjectPointsTo();\nvoid primitiveObsoleteIndexedPrimitive();\nvoid primitivePerform();\nvoid primitivePerformInSuperclass();\nvoid primitivePerformWithArgs();\nvoid primitivePushFalse();\nvoid primitivePushMinusOne();\nvoid primitivePushNil();\nvoid primitivePushOne();\nvoid primitivePushSelf();\nvoid primitivePushTrue();\nvoid primitivePushTwo();\nvoid primitivePushZero();\nvoid primitiveQuit();\nvoid primitiveQuo();\nvoid primitiveRelinquishProcessor();\nvoid primitiveResume();\nvoid primitiveScanCharacters();\nvoid primitiveScreenSize();\nvoid primitiveSecondsClock();\nvoid primitiveSetDisplayMode();\nvoid primitiveSetFullScreen();\nvoid primitiveSetGCSemaphore();\nvoid primitiveSetInterruptKey();\nvoid primitiveShortAt();\nvoid primitiveShortAtPut();\nvoid primitiveShowDisplayRect();\nvoid primitiveSignal();\nvoid primitiveSignalAtBytesLeft();\nvoid primitiveSignalAtMilliseconds();\nvoid primitiveSine();\n\nvoid primitiveSize();\n\nvoid primitiveSnapshot();\nvoid primitiveSnapshotEmbedded();\nvoid primitiveSomeInstance();\nvoid primitiveSomeObject();\nvoid primitiveSpecialObjectsOop();\nvoid primitiveSquareRoot();\nvoid primitiveStoreImageSegment();\nvoid primitiveStoreStackp();\nvoid primitiveStringAt();\nvoid primitiveStringAtPut();\nvoid primitiveStringReplace();\nvoid primitiveSubtract();\nvoid primitiveSuspend();\nvoid primitiveTerminateTo();\nvoid primitiveTestDisplayDepth();\nvoid primitiveTimesTwoPower();\nvoid primitiveTruncated();\nvoid primitiveUnloadModule();\nvoid primitiveVMParameter();\nvoid primitiveVMPath();\nvoid primitiveValue();\nvoid primitiveValueUninterruptably();\nvoid primitiveValueWithArgs();\n# if Include_Closure_Support\nvoid primitiveClosureValue();\nvoid primitiveClosureCopyWithCopiedValues();\nvoid primitiveClosureValueWithArgs();\nvoid primitiveClosureValueNoContextSwitch();\n# endif\nvoid primitiveWait();\nvoid primitiveYield();\nvoid startProfiling();\nvoid stopProfiling();\n\n\nvoid clearProfile();\nvoid dumpProfile();\n\n\nvoid primitiveFloatAdd(Oop r, Oop a);\nvoid primitiveFloatSubtract(Oop r, Oop a);\nvoid primitiveFloatMultiply(Oop r, Oop a);\nvoid primitiveFloatDivide(Oop r, Oop a);\nbool primitiveFloatLess(Oop r, Oop a);\nbool primitiveFloatGreater(Oop r, Oop a);\nbool primitiveFloatEqual(Oop r, Oop a);\n\n"
  },
  {
    "path": "vm/src/interpreter/method_cache.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\nvoid Method_Cache::addNewMethod(Oop sel, Oop klass, Oop method, int prim, Oop native, fn_t primFunction, bool on_main) {\n  /*\n   \"Add the given entry to the method cache.\n   The policy is as follows:\n   Look for an empty entry anywhere in the reprobe chain.\n   If found, install the new entry there.\n   If not found, then install the new entry at the first probe position\n   and delete the entries in the rest of the reprobe chain.\n   This has two useful purposes:\n   If there is active contention over the first slot, the second\n   or third will likely be free for reentry after ejection.\n   Also, flushing is good when reprobe chains are getting full.\"\n   */\n  FOR_EACH_PROBE(sel, klass, i, hash, e) {\n    if (e->is_empty()) {\n      // Found an empty entry -- use it\n      e->set_from(sel, klass, method, prim, native, primFunction, on_main);\n      return;\n    }\n  }\n  // \"OK, we failed to find an entry -- install at the first slot...\"\n  // \"...and zap the following entries\"\n  FOR_EACH_PROBE(sel, klass, i, hash2, e2) {\n    if (i == 0)\n      e2->set_from(sel, klass, method, prim, native, primFunction, on_main);\n    else\n      e2->be_empty();\n  }\n}\n\nvoid Method_Cache::rewrite(Oop sel, Oop klass, int localPrimIndex) {\n  rewrite(sel, klass, localPrimIndex,\n          localPrimIndex == 0 ? NULL  : primitiveTable.contents[localPrimIndex],\n          localPrimIndex == 0 ? false : primitiveTable.execute_on_main[localPrimIndex]);\n}\n\nvoid Method_Cache::rewrite(Oop sel, Oop klass, int prim, fn_t primFunction, bool on_main) {\n  FOR_EACH_PROBE(sel, klass, i, hash, e) {\n    if (e->selector == sel  &&  e->klass == klass) {\n      e->prim = prim;\n      e->primFunction = primFunction;\n      e->do_primitive_on_main = on_main;\n      return;\n    }\n  }\n}\n\nbool Method_Cache::verify() {\n  for (int i = 0;  i < Entries;  ++i) {\n    entry* p = at(i);\n    p->verify();\n  }\n  return true;\n}\n\n"
  },
  {
    "path": "vm/src/interpreter/method_cache.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\ntypedef int32 mc_word;\n\n/*\n \"This class implements a simple method lookup cache. If an entry for the\n  given selector and class is found in the cache, set the values of\n  'newMethod' and 'primitiveIndex' and return true. Otherwise, return false.\"\n  \n \"About the re-probe scheme: The hash is the low bits of the XOR of two large\n  addresses, minus their useless lowest two bits. If a probe doesn't get a\n  hit, the hash is shifted right one bit to compute the next probe,\n  introducing a new randomish bit. The cache is probed CacheProbeMax times\n  before giving up.\"\n  \n \"WARNING: Since the hash computation is based on the object addresses of the\n  class and selector, we must rehash or flush when compacting storage. We've\n  chosen to flush, since that also saves the trouble of updating the addresses\n  of the objects in the cache.\"\n */\n\nclass Method_Cache {\n public:\n  class entry {\n   public:\n    Oop selector;\n    Oop klass;\n    Oop method;\n    int prim; // index\n    Oop native;\n    fn_t primFunction;\n    bool do_primitive_on_main;\n\n    bool matches(Oop s, Oop k) {return s == selector  &&  k == klass;}\n\n    bool is_empty() { return selector.bits() == 0; }\n    void be_empty() { selector = Oop::from_bits(0); }\n    void set_from(Oop sel, Oop k, Oop m, int p, Oop n, fn_t pf, bool om) {\n      selector = sel;  klass = k;  method = m;  native = n; prim = p;  primFunction = pf; do_primitive_on_main = om;\n    }\n    bool verify() {\n      return is_empty()\n      || (  selector.verify_object()  &&  klass.verify_object()\n          &&  method.verify_object()  &&  native.verify_object_or_null());\n    }\n  };\n private:\n  static const int EntryWordsRoundedUp = 8;\n  static const int EntryWRUShift = 3;\n  static const oop_int_t Entries = 512;\n  static const int CacheProbeMax = 3;\n\n  mc_word words[EntryWordsRoundedUp * Entries];\n\n  entry* at(int hash) {\n    return (entry*)&words[(hash & (Entries - 1)) * EntryWordsRoundedUp];\n  }\n\n  int hash_of(Oop sel, Oop klass) { return sel.bits_for_hash() ^ klass.bits_for_hash(); }\n\n # define FOR_EACH_PROBE(sel, klass, i, hash, e) \\\n  int hash = hash_of(sel, klass); \\\n  entry* e; \\\n  for (int i = 0;  e = at(hash), i < CacheProbeMax;  ++i, hash >>= 1)\n\n public:\n  void flush_method_cache() {\n    assert(sizeof(entry)  <=  EntryWordsRoundedUp * sizeof(mc_word));\n    memset(words, 0, sizeof(words));\n  }\n\n\n  entry* at(Oop selector, Oop klass) {\n    FOR_EACH_PROBE(selector, klass, i, hash, e)\n      if (e->matches(selector, klass))\n        return e;\n    return NULL;\n  }\n\n  void addNewMethod(Oop sel, Oop klass, Oop method, int prim, Oop native, fn_t primFunction, bool on_main);\n  void rewrite(Oop sel, Oop klass, int prim);\n  void rewrite(Oop sel, Oop klass, int prim, fn_t primFunction, bool on_main);\n\n  void flushByMethod(Oop method) {\n    for (int i = 0;  i < Entries;  ++i) {\n      entry* p = at(i);\n      if (p->method == method)\n        p->selector = Oop::from_int(0);\n    }\n  }\n\n\n  void flushSelective(Oop sel) {\n    for (int i = 0;  i < Entries;  ++i) {\n      entry* p = at(i);\n      if (p->selector == sel)\n        p->selector = Oop::from_int(0);\n    }\n  }\n\n  bool verify();\n\n};\n\n"
  },
  {
    "path": "vm/src/interpreter/obsolete_indexed_primitive_table.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\nObsolete_Indexed_Primitive_Table obsoleteIndexedPrimitiveTable;\n\nObsolete_Indexed_Primitive_Table::entry Obsolete_Indexed_Primitive_Table::contents[] = {\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ \"BitBltPlugin\", \"primitiveCopyBits\", NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ \"BitBltPlugin\", \"primitiveDrawLoop\", NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ \"JoystickTabletPlugin\", \"primitiveReadJoystick\", NULL },\n{ \"BitBltPlugin\", \"primitiveWarpBits\", NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ \"FilePlugin\", \"primitiveFileAtEnd\", NULL },\n{ \"FilePlugin\", \"primitiveFileClose\", NULL },\n{ \"FilePlugin\", \"primitiveFileGetPosition\", NULL },\n{ \"FilePlugin\", \"primitiveFileOpen\", NULL },\n{ \"FilePlugin\", \"primitiveFileRead\", NULL },\n{ \"FilePlugin\", \"primitiveFileSetPosition\", NULL },\n{ \"FilePlugin\", \"primitiveFileDelete\", NULL },\n{ \"FilePlugin\", \"primitiveFileSize\", NULL },\n{ \"FilePlugin\", \"primitiveFileWrite\", NULL },\n{ \"FilePlugin\", \"primitiveFileRename\", NULL },\n{ \"FilePlugin\", \"primitiveDirectoryCreate\", NULL },\n{ \"FilePlugin\", \"primitiveDirectoryDelimitor\", NULL },\n{ \"FilePlugin\", \"primitiveDirectoryLookup\", NULL },\n{ \"FilePlugin\", \"primitiveDirectoryDelete\", NULL },\n{ \"FilePlugin\", \"primitiveDirectoryGetMacTypeAndCreator\", NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ \"FilePlugin\", \"primitiveDirectorySetMacTypeAndCreator\", NULL },\n{ \"SoundPlugin\", \"primitiveSoundStart\", NULL },\n{ \"SoundPlugin\", \"primitiveSoundStartWithSemaphore\", NULL },\n{ \"SoundPlugin\", \"primitiveSoundStop\", NULL },\n{ \"SoundPlugin\", \"primitiveSoundAvailableSpace\", NULL },\n{ \"SoundPlugin\", \"primitiveSoundPlaySamples\", NULL },\n{ \"SoundPlugin\", \"primitiveSoundPlaySilence\", NULL },\n{ \"SoundGenerationPlugin\", \"primitiveWaveTableSoundMix\", NULL },\n{ \"SoundGenerationPlugin\", \"primitiveFMSoundMix\", NULL },\n{ \"SoundGenerationPlugin\", \"primitivePluckedSoundMix\", NULL },\n{ \"SoundGenerationPlugin\", \"primitiveSampledSoundMix\", NULL },\n{ \"SoundGenerationPlugin\", \"primitiveMixFMSound\", NULL },\n{ \"SoundGenerationPlugin\", \"primitiveMixPluckedSound\", NULL },\n{ \"SoundGenerationPlugin\", \"primitiveOldSampledSoundMix\", NULL },\n{ \"SoundGenerationPlugin\", \"primitiveApplyReverb\", NULL },\n{ \"SoundGenerationPlugin\", \"primitiveMixLoopedSampledSound\", NULL },\n{ \"SoundGenerationPlugin\", \"primitiveMixSampledSound\", NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ \"SoundPlugin\", \"primitiveSoundInsertSamples\", NULL },\n{ \"SoundPlugin\", \"primitiveSoundStartRecording\", NULL },\n{ \"SoundPlugin\", \"primitiveSoundStopRecording\", NULL },\n{ \"SoundPlugin\", \"primitiveSoundGetRecordingSampleRate\", NULL },\n{ \"SoundPlugin\", \"primitiveSoundRecordSamples\", NULL },\n{ \"SoundPlugin\", \"primitiveSoundSetRecordLevel\", NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ \"SocketPlugin\", \"primitiveInitializeNetwork\", NULL },\n{ \"SocketPlugin\", \"primitiveResolverStartNameLookup\", NULL },\n{ \"SocketPlugin\", \"primitiveResolverNameLookupResult\", NULL },\n{ \"SocketPlugin\", \"primitiveResolverStartAddressLookup\", NULL },\n{ \"SocketPlugin\", \"primitiveResolverAddressLookupResult\", NULL },\n{ \"SocketPlugin\", \"primitiveResolverAbortLookup\", NULL },\n{ \"SocketPlugin\", \"primitiveResolverLocalAddress\", NULL },\n{ \"SocketPlugin\", \"primitiveResolverStatus\", NULL },\n{ \"SocketPlugin\", \"primitiveResolverError\", NULL },\n{ \"SocketPlugin\", \"primitiveSocketCreate\", NULL },\n{ \"SocketPlugin\", \"primitiveSocketDestroy\", NULL },\n{ \"SocketPlugin\", \"primitiveSocketConnectionStatus\", NULL },\n{ \"SocketPlugin\", \"primitiveSocketError\", NULL },\n{ \"SocketPlugin\", \"primitiveSocketLocalAddress\", NULL },\n{ \"SocketPlugin\", \"primitiveSocketLocalPort\", NULL },\n{ \"SocketPlugin\", \"primitiveSocketRemoteAddress\", NULL },\n{ \"SocketPlugin\", \"primitiveSocketRemotePort\", NULL },\n{ \"SocketPlugin\", \"primitiveSocketConnectToPort\", NULL },\n{ \"SocketPlugin\", \"primitiveSocketListenWithOrWithoutBacklog\", NULL },\n{ \"SocketPlugin\", \"primitiveSocketCloseConnection\", NULL },\n{ \"SocketPlugin\", \"primitiveSocketAbortConnection\", NULL },\n{ \"SocketPlugin\", \"primitiveSocketReceiveDataBufCount\", NULL },\n{ \"SocketPlugin\", \"primitiveSocketReceiveDataAvailable\", NULL },\n{ \"SocketPlugin\", \"primitiveSocketSendDataBufCount\", NULL },\n{ \"SocketPlugin\", \"primitiveSocketSendDone\", NULL },\n{ \"SocketPlugin\", \"primitiveSocketAccept\", NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ \"MiscPrimitivePlugin\", \"primitiveDecompressFromByteArray\", NULL },\n{ \"MiscPrimitivePlugin\", \"primitiveCompareString\", NULL },\n{ \"MiscPrimitivePlugin\", \"primitiveConvert8BitSigned\", NULL },\n{ \"MiscPrimitivePlugin\", \"primitiveCompressToByteArray\", NULL },\n{ \"SerialPlugin\", \"primitiveSerialPortOpen\", NULL },\n{ \"SerialPlugin\", \"primitiveSerialPortClose\", NULL },\n{ \"SerialPlugin\", \"primitiveSerialPortWrite\", NULL },\n{ \"SerialPlugin\", \"primitiveSerialPortRead\", NULL },\n{ NULL, NULL, NULL },\n{ \"MiscPrimitivePlugin\", \"primitiveTranslateStringWithTable\", NULL },\n{ \"MiscPrimitivePlugin\", \"primitiveFindFirstInString\", NULL },\n{ \"MiscPrimitivePlugin\", \"primitiveIndexOfAsciiInString\", NULL },\n{ \"MiscPrimitivePlugin\", \"primitiveFindSubstring\", NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ \"MIDIPlugin\", \"primitiveMIDIClosePort\", NULL },\n{ \"MIDIPlugin\", \"primitiveMIDIGetClock\", NULL },\n{ \"MIDIPlugin\", \"primitiveMIDIGetPortCount\", NULL },\n{ \"MIDIPlugin\", \"primitiveMIDIGetPortDirectionality\", NULL },\n{ \"MIDIPlugin\", \"primitiveMIDIGetPortName\", NULL },\n{ \"MIDIPlugin\", \"primitiveMIDIOpenPort\", NULL },\n{ \"MIDIPlugin\", \"primitiveMIDIParameterGetOrSet\", NULL },\n{ \"MIDIPlugin\", \"primitiveMIDIRead\", NULL },\n{ \"MIDIPlugin\", \"primitiveMIDIWrite\", NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ \"AsynchFilePlugin\", \"primitiveAsyncFileClose\", NULL },\n{ \"AsynchFilePlugin\", \"primitiveAsyncFileOpen\", NULL },\n{ \"AsynchFilePlugin\", \"primitiveAsyncFileReadResult\", NULL },\n{ \"AsynchFilePlugin\", \"primitiveAsyncFileReadStart\", NULL },\n{ \"AsynchFilePlugin\", \"primitiveAsyncFileWriteResult\", NULL },\n{ \"AsynchFilePlugin\", \"primitiveAsyncFileWriteStart\", NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ \"JoystickTabletPlugin\", \"primitiveGetTabletParameters\", NULL },\n{ \"JoystickTabletPlugin\", \"primitiveReadTablet\", NULL },\n{ \"ADPCMCodecPlugin\", \"primitiveDecodeMono\", NULL },\n{ \"ADPCMCodecPlugin\", \"primitiveDecodeStereo\", NULL },\n{ \"ADPCMCodecPlugin\", \"primitiveEncodeMono\", NULL },\n{ \"ADPCMCodecPlugin\", \"primitiveEncodeStereo\", NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL },\n{ NULL, NULL, NULL }\n};\n\n\nvoid Obsolete_Indexed_Primitive_Table::flush() {\n  for (u_int32 i = 0;  i < sizeof(contents) / sizeof(contents[0]);  ++i)\n    contents[i].functionAddress = NULL;\n}\n\n"
  },
  {
    "path": "vm/src/interpreter/obsolete_indexed_primitive_table.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nextern class Obsolete_Indexed_Primitive_Table {\npublic:\n  struct entry { const char* pluginName; const char* functionName; fn_t functionAddress; };\n  static entry contents[];                                                // threadsafe\n  static void flush();\n} obsoleteIndexedPrimitiveTable;\n\n"
  },
  {
    "path": "vm/src/interpreter/obsolete_named_primitive_table.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\nObsolete_Named_Primitive_Table obsoleteNamedPrimitiveTable;\n\nint Obsolete_Named_Primitive_Table::find(char* name, int name_len, char* module_if_specified, int module_length_if_specified) {\n  for (entry* p = contents;  p->oldName;  ++p)\n    if (strncmp(p->oldName, name, name_len) == 0  &&  p->oldName[name_len] == '\\0')\n      if ( module_length_if_specified == 0  \n      ||  (strncmp(p->plugin, module_if_specified, module_length_if_specified) == 0  &&  p->plugin[module_length_if_specified] == '\\0'))\n        return p - contents;\n  return -1;\n}\n\nObsolete_Named_Primitive_Table::entry Obsolete_Named_Primitive_Table::contents[] = {\n  // xxxxxx most of this prims say on main but maybe many don't have to be\n  {\"needDummyEntryBecauseCodeTreatsZeroSpecially\", \"nothing\", \"needDummyEntryBecauseCodeTreatsZeroSpecially\", true},\n{\"gePrimitiveMergeFillFrom\", \"B2DPlugin\", \"primitiveMergeFillFrom\", true},\n{\"gePrimitiveSetClipRect\", \"B2DPlugin\", \"primitiveSetClipRect\", true},\n{\"gePrimitiveDoProfileStats\", \"B2DPlugin\", \"primitiveDoProfileStats\", true},\n{\"gePrimitiveAddCompressedShape\", \"B2DPlugin\", \"primitiveAddCompressedShape\", true},\n{\"gePrimitiveFinishedProcessing\", \"B2DPlugin\", \"primitiveFinishedProcessing\", true},\n{\"gePrimitiveGetBezierStats\", \"B2DPlugin\", \"primitiveGetBezierStats\", true},\n{\"gePrimitiveSetDepth\", \"B2DPlugin\", \"primitiveSetDepth\", true},\n{\"gePrimitiveAbortProcessing\", \"B2DPlugin\", \"primitiveAbortProcessing\", true},\n{\"gePrimitiveGetTimes\", \"B2DPlugin\", \"primitiveGetTimes\", true},\n{\"gePrimitiveNextActiveEdgeEntry\", \"B2DPlugin\", \"primitiveNextActiveEdgeEntry\", true},\n{\"gePrimitiveAddBezier\", \"B2DPlugin\", \"primitiveAddBezier\", true},\n{\"gePrimitiveRenderScanline\", \"B2DPlugin\", \"primitiveRenderScanline\", true},\n{\"gePrimitiveAddBezierShape\", \"B2DPlugin\", \"primitiveAddBezierShape\", true},\n{\"gePrimitiveAddLine\", \"B2DPlugin\", \"primitiveAddLine\", true},\n{\"gePrimitiveRenderImage\", \"B2DPlugin\", \"primitiveRenderImage\", true},\n{\"gePrimitiveGetAALevel\", \"B2DPlugin\", \"primitiveGetAALevel\", true},\n{\"gePrimitiveRegisterExternalEdge\", \"B2DPlugin\", \"primitiveRegisterExternalEdge\", true},\n{\"gePrimitiveInitializeBuffer\", \"B2DPlugin\", \"primitiveInitializeBuffer\", true},\n{\"gePrimitiveAddRect\", \"B2DPlugin\", \"primitiveAddRect\", true},\n{\"gePrimitiveInitializeProcessing\", \"B2DPlugin\", \"primitiveInitializeProcessing\", true},\n{\"gePrimitiveAddBitmapFill\", \"B2DPlugin\", \"primitiveAddBitmapFill\", true},\n{\"gePrimitiveGetClipRect\", \"B2DPlugin\", \"primitiveGetClipRect\", true},\n{\"gePrimitiveGetFailureReason\", \"B2DPlugin\", \"primitiveGetFailureReason\", true},\n{\"gePrimitiveNextGlobalEdgeEntry\", \"B2DPlugin\", \"primitiveNextGlobalEdgeEntry\", true},\n{\"gePrimitiveNextFillEntry\", \"B2DPlugin\", \"primitiveNextFillEntry\", true},\n{\"gePrimitiveSetColorTransform\", \"B2DPlugin\", \"primitiveSetColorTransform\", true},\n{\"gePrimitiveDisplaySpanBuffer\", \"B2DPlugin\", \"primitiveDisplaySpanBuffer\", true},\n{\"gePrimitiveGetOffset\", \"B2DPlugin\", \"primitiveGetOffset\", true},\n{\"gePrimitiveAddPolygon\", \"B2DPlugin\", \"primitiveAddPolygon\", true},\n{\"gePrimitiveNeedsFlush\", \"B2DPlugin\", \"primitiveNeedsFlush\", true},\n{\"gePrimitiveAddOval\", \"B2DPlugin\", \"primitiveAddOval\", true},\n{\"gePrimitiveSetAALevel\", \"B2DPlugin\", \"primitiveSetAALevel\", true},\n{\"gePrimitiveCopyBuffer\", \"B2DPlugin\", \"primitiveCopyBuffer\", true},\n{\"gePrimitiveAddActiveEdgeEntry\", \"B2DPlugin\", \"primitiveAddActiveEdgeEntry\", true},\n{\"gePrimitiveGetCounts\", \"B2DPlugin\", \"primitiveGetCounts\", true},\n{\"gePrimitiveSetOffset\", \"B2DPlugin\", \"primitiveSetOffset\", true},\n{\"gePrimitiveAddGradientFill\", \"B2DPlugin\", \"primitiveAddGradientFill\", true},\n{\"gePrimitiveChangedActiveEdgeEntry\", \"B2DPlugin\", \"primitiveChangedActiveEdgeEntry\", true},\n{\"gePrimitiveRegisterExternalFill\", \"B2DPlugin\", \"primitiveRegisterExternalFill\", true},\n{\"gePrimitiveGetDepth\", \"B2DPlugin\", \"primitiveGetDepth\", true},\n{\"gePrimitiveSetEdgeTransform\", \"B2DPlugin\", \"primitiveSetEdgeTransform\", true},\n{\"gePrimitiveNeedsFlushPut\", \"B2DPlugin\", \"primitiveNeedsFlushPut\", true},\n\n{\"primitiveFloatArrayAt\", \"FloatArrayPlugin\", \"primitiveAt\", false},\n{\"primitiveFloatArrayMulFloatArray\", \"FloatArrayPlugin\", \"primitiveMulFloatArray\", false},\n{\"primitiveFloatArrayAddScalar\", \"FloatArrayPlugin\", \"primitiveAddScalar\", false},\n{\"primitiveFloatArrayDivFloatArray\", \"FloatArrayPlugin\", \"primitiveDivFloatArray\", false},\n{\"primitiveFloatArrayDivScalar\", \"FloatArrayPlugin\", \"primitiveDivScalar\", false},\n{\"primitiveFloatArrayHash\", \"FloatArrayPlugin\", \"primitiveHashArray\", false},\n{\"primitiveFloatArrayAtPut\", \"FloatArrayPlugin\", \"primitiveAtPut\", false},\n{\"primitiveFloatArrayMulScalar\", \"FloatArrayPlugin\", \"primitiveMulScalar\", false},\n{\"primitiveFloatArrayAddFloatArray\", \"FloatArrayPlugin\", \"primitiveAddFloatArray\", false},\n{\"primitiveFloatArraySubScalar\", \"FloatArrayPlugin\", \"primitiveSubScalar\", false},\n{\"primitiveFloatArraySubFloatArray\", \"FloatArrayPlugin\", \"primitiveSubFloatArray\", false},\n{\"primitiveFloatArrayEqual\", \"FloatArrayPlugin\", \"primitiveEqual\", false},\n{\"primitiveFloatArrayDotProduct\", \"FloatArrayPlugin\", \"primitiveDotProduct\", false},\n\n{\"m23PrimitiveInvertRectInto\", \"Matrix2x3Plugin\", \"primitiveInvertRectInto\", false},\n{\"m23PrimitiveTransformPoint\", \"Matrix2x3Plugin\", \"primitiveTransformPoint\", false},\n{\"m23PrimitiveIsPureTranslation\", \"Matrix2x3Plugin\", \"primitiveIsPureTranslation\", false},\n{\"m23PrimitiveComposeMatrix\", \"Matrix2x3Plugin\", \"primitiveComposeMatrix\", false},\n{\"m23PrimitiveTransformRectInto\", \"Matrix2x3Plugin\", \"primitiveTransformRectInto\", false},\n{\"m23PrimitiveIsIdentity\", \"Matrix2x3Plugin\", \"primitiveIsIdentity\", false},\n{\"m23PrimitiveInvertPoint\", \"Matrix2x3Plugin\", \"primitiveInvertPoint\", false},\n\n{\"primitiveDeflateBlock\", \"ZipPlugin\", \"primitiveDeflateBlock\", false},\n{\"primitiveDeflateUpdateHashTable\", \"ZipPlugin\", \"primitiveDeflateUpdateHashTable\", false},\n{\"primitiveUpdateGZipCrc32\", \"ZipPlugin\", \"primitiveUpdateGZipCrc32\", false},\n{\"primitiveInflateDecompressBlock\", \"ZipPlugin\", \"primitiveInflateDecompressBlock\", false},\n{\"primitiveZipSendBlock\", \"ZipPlugin\", \"primitiveZipSendBlock\", false},\n\n{\"primitiveFFTTransformData\", \"FFTPlugin\", \"primitiveFFTTransformData\", false},\n{\"primitiveFFTScaleData\", \"FFTPlugin\", \"primitiveFFTScaleData\", false},\n{\"primitiveFFTPermuteData\", \"FFTPlugin\", \"primitiveFFTPermuteData\", false},\n\n\n  // added by me to get these to run locally -- dmu\n  // also must add line in rvm_callInitializersInAllModules\n\n  { \"primitiveThisProcess\",              \"RVMPlugin\", \"primitiveThisProcess\",              false },\n  { \"primitivePrint\",                    \"RVMPlugin\", \"primitivePrint\",                    false },\n  { \"primitivePrintStats\",               \"RVMPlugin\", \"primitivePrintStats\",               false },\n  { \"primitiveResetPerfCounters\",        \"RVMPlugin\", \"primitiveResetPerfCounters\",        false },\n\n\n  { \"primitiveAllObjectsInHeap\",         \"RVMPlugin\", \"primitiveAllObjectsInHeap\",         false },\n  { \"primitiveBreakpoint\",               \"RVMPlugin\", \"primitiveBreakpoint\",               false },\n  { \"primitiveCoreCount\",                \"RVMPlugin\", \"primitiveCoreCount\",                false },\n  { \"primitiveForceYields\",              \"RVMPlugin\", \"primitiveForceYields\",              false },\n  { \"primitiveGetCore\",                  \"RVMPlugin\", \"primitiveGetCore\",                  false },\n  { \"primitiveGetCoreIAmRunningOn\",      \"RVMPlugin\", \"primitiveGetCoreIAmRunningOn\",      false },\n  { \"primitiveGetMutability\",            \"RVMPlugin\", \"primitiveGetMutability\",            false },\n  { \"primitiveMoveAllToReadMostlyHeaps\", \"RVMPlugin\", \"primitiveMoveAllToReadMostlyHeaps\", false },\n  { \"primitivePrintExecutionTrace\",      \"RVMPlugin\", \"primitivePrintExecutionTrace\",      false },\n\n  { \"primitivePrintReadWriteReadMostlyBytesUsed\", \"RVMPlugin\", \"primitivePrintReadWriteReadMostlyBytesUsed\", false },\n  { \"primitivePrintStack\",               \"RVMPlugin\", \"primitivePrintStack\",               false },\n  { \"primitiveRunMask\",                  \"RVMPlugin\", \"primitiveRunMask\",                  false },\n  { \"primitiveRunningProcessByCore\",     \"RVMPlugin\", \"primitiveRunningProcessByCore\",     false },\n  { \"primitiveSampleRVM\",                \"RVMPlugin\", \"primitiveSampleRVM\",                false },\n  { \"primitiveSetCoordinatesFor\",        \"RVMPlugin\", \"primitiveSetCoordinatesFor\",        false },\n  { \"primitiveShuffle\",                  \"RVMPlugin\", \"primitiveShuffle\",                  false },\n  { \"primitiveSpread\",                   \"RVMPlugin\", \"primitiveSpread\",                   false },\n  { \"primitiveTraceCores\",               \"RVMPlugin\", \"primitiveTraceCores\",               false },\n  { \"primitiveTraceMutatedReplicatedObjects\", \"RVMPlugin\", \"primitiveTraceMutatedReplicatedObjects\", false },\n\n  { \"primitiveDebugSampleRVM\",            \"RVMPlugin\", \"primitiveDebugSampleRVM\",            false },\n  { \"primitivePrintObjectForVMDebugging\", \"RVMPlugin\", \"primitivePrintObjectForVMDebugging\", false },\n  { \"primitiveGetExtraPreheaderWord\",     \"RVMPlugin\", \"primitiveGetExtraPreheaderWord\",     false },\n  { \"primitiveSetExtraPreheaderWord\",     \"RVMPlugin\", \"primitiveSetExtraPreheaderWord\",     false },\n  { \"primitiveSetExtraWordSelector\",      \"RVMPlugin\", \"primitiveSetExtraWordSelector\",      false },\n  { \"primitiveEmergencySemaphore\",        \"RVMPlugin\", \"primitiveEmergencySemaphore\",        true  },\n  { \"primitiveWriteSnapshot\",             \"RVMPlugin\", \"primitiveWriteSnapshot\",             true  },\n  { \"primitiveMicrosecondClock\",          \"RVMPlugin\", \"primitiveMicrosecondClock\",          false },\n  { \"primitiveCycleCounter\",              \"RVMPlugin\", \"primitiveCycleCounter\",              false },\n  \n  { \"primitiveRunsHeadless\",              \"RVMPlugin\", \"primitiveRunsHeadless\",              false },\n\n\n  // Local versions of bitBlt primitives; don't use when blitting to the screen\n  {\"primitiveDrawLoopLocally\",      \"BitBltPlugin\", \"primitiveDrawLoop\",      Using_Threads },\n  {\"primitiveWarpBitsLocally\",      \"BitBltPlugin\", \"primitiveWarpBits\",      Using_Threads },\n  {\"copyBitsLocally\",               \"BitBltPlugin\", \"copyBits\",               Using_Threads },\n  {\"primitiveCopyBitsLocally\",      \"BitBltPlugin\", \"primitiveCopyBits\",      Using_Threads },\n  {\"copyBitsFromtoatLocally\",       \"BitBltPlugin\", \"copyBitsFromtoat\",       Using_Threads },\n  {\"loadBitBltFromLocally\",         \"BitBltPlugin\", \"loadBitBltFrom\",         Using_Threads },\n  {\"primitiveDisplayStringLocally\", \"BitBltPlugin\", \"primitiveDisplayString\", Using_Threads },\n\n\n\n  { \"primDigitMultiplyNegative\", \"LargeIntegers\", \"primDigitMultiplyNegative\", false },\n  { \"primNormalizePositive\", \"LargeIntegers\", \"primNormalizePositive\", false },\n  { \"primAnyBitFromTo\", \"LargeIntegers\", \"primAnyBitFromTo\", false },\n  { \"primAsLargeInteger\", \"LargeIntegers\", \"primAsLargeInteger\", false },\n  { \"primDigitBitAnd\", \"LargeIntegers\", \"primDigitBitAnd\", false },\n  { \"_primDigitBitShift\", \"LargeIntegers\", \"_primDigitBitShift\", false },\n  { \"primDigitAddWith\", \"LargeIntegers\", \"primDigitAddWith\", false },\n  { \"primDigitCompareWith\", \"LargeIntegers\", \"primDigitCompareWith\", false },\n  { \"primDigitSubtractWith\", \"LargeIntegers\", \"primDigitSubtractWith\", false },\n  { \"primDigitBitShift\", \"LargeIntegers\", \"primDigitBitShift\", false },\n  { \"primDigitSubtract\", \"LargeIntegers\", \"primDigitSubtract\", false },\n  { \"primNormalizeNegative\", \"LargeIntegers\", \"primNormalizeNegative\", false },\n  { \"primDigitBitLogicWithOp\", \"LargeIntegers\", \"primDigitBitLogicWithOp\", false },\n  { \"primDigitAdd\", \"LargeIntegers\", \"primDigitAdd\", false },\n  { \"primDigitDivWithNegative\", \"LargeIntegers\", \"primDigitDivWithNegative\", false },\n  { \"primDigitBitShiftMagnitude\", \"LargeIntegers\", \"primDigitBitShiftMagnitude\", false },\n  { \"primDigitBitOr\", \"LargeIntegers\", \"primDigitBitOr\", false },\n  { \"primDigitMultiplyWithNegative\", \"LargeIntegers\", \"primDigitMultiplyWithNegative\", false },\n  { \"primDigitBitXor\", \"LargeIntegers\", \"primDigitBitXor\", false },\n  { \"primDigitDivNegative\", \"LargeIntegers\", \"primDigitDivNegative\", false },\n  { \"primDigitCompare\", \"LargeIntegers\", \"primDigitCompare\", false },\n  { \"primNormalize\", \"LargeIntegers\", \"primNormalize\", false },\n\n  { \"primitiveCompareString\", \"MiscPrimitivePlugin\", \"primitiveCompareString\", false },\n  { \"primitiveCompressToByteArray\", \"MiscPrimitivePlugin\", \"primitiveCompressToByteArray\", false },\n  { \"primitiveDecompressFromByteArray\", \"MiscPrimitivePlugin\", \"primitiveDecompressFromByteArray\", false },\n  { \"primitiveConvert8BitSigned\", \"MiscPrimitivePlugin\", \"primitiveConvert8BitSigned\", false },\n  { \"primitiveFindFirstInString\", \"MiscPrimitivePlugin\", \"primitiveFindFirstInString\", false },\n  { \"primitiveIndexOfAsciiInString\", \"MiscPrimitivePlugin\", \"primitiveIndexOfAsciiInString\", false },\n  { \"primitiveFindSubstring\", \"MiscPrimitivePlugin\", \"primitiveFindSubstring\", false },\n  { \"primitiveStringHash\", \"MiscPrimitivePlugin\", \"primitiveStringHash\", false },\n  { \"primitiveTranslateStringWithTable\", \"MiscPrimitivePlugin\", \"primitiveTranslateStringWithTable\", false },\n\n\n  {NULL, NULL, NULL, false}\n};\n\n"
  },
  {
    "path": "vm/src/interpreter/obsolete_named_primitive_table.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nextern class Obsolete_Named_Primitive_Table {\npublic:\n  struct entry { const char* oldName; const char* plugin; const char* newName; bool on_main; };\n  static entry contents[];\n  int find(char* name, int name_len, char* plugin, int plugin_len);\n} obsoleteNamedPrimitiveTable;\n\n"
  },
  {
    "path": "vm/src/interpreter/primitive_table.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\nPrimitive_Table primitiveTable;\n\n\nPrimitive_Table::Primitive_Table() : Abstract_Primitive_Table(576, false) {\n  init_here(0, primitiveFail);\n  init_here(1, primitiveAdd);\n  init_here(2, primitiveSubtract);\n  init_here(3, primitiveLessThan);\n  init_here(4, primitiveGreaterThan);\n  init_here(5, primitiveLessOrEqual);\n  init_here(6, primitiveGreaterOrEqual);\n  init_here(7, primitiveEqual);\n  init_here(8, primitiveNotEqual);\n  init_here(9, primitiveMultiply);\n  init_here(10, primitiveDivide);\n  init_here(11, primitiveMod);\n  init_here(12, primitiveDiv);\n  init_here(13, primitiveQuo);\n  init_here(14, primitiveBitAnd);\n  init_here(15, primitiveBitOr);\n  init_here(16, primitiveBitXor);\n  init_here(17, primitiveBitShift);\n  init_here(18, primitiveMakePoint);\n  init_here(19, primitiveFail);\n  init_here(20, 39, primitiveFail);\n  init_here(40, primitiveAsFloat);\n  init_here(41, primitiveFloatAdd);\n  init_here(42, primitiveFloatSubtract);\n  init_here(43, primitiveFloatLessThan);\n  init_here(44, primitiveFloatGreaterThan);\n  init_here(45, primitiveFloatLessOrEqual);\n  init_here(46, primitiveFloatGreaterOrEqual);\n  init_here(47, primitiveFloatEqual);\n  init_here(48, primitiveFloatNotEqual);\n  init_here(49, primitiveFloatMultiply);\n  init_here(50, primitiveFloatDivide);\n  init_here(51, primitiveTruncated);\n  init_here(52, primitiveFractionalPart);\n  init_here(53, primitiveExponent);\n  init_here(54, primitiveTimesTwoPower);\n  init_here(55, primitiveSquareRoot);\n  init_here(56, primitiveSine);\n  init_here(57, primitiveArctan);\n  init_here(58, primitiveLogN);\n  init_here(59, primitiveExp);\n  init_here(60, primitiveAt);\n  init_here(61, primitiveAtPut);\n  init_here(62, primitiveSize);\n  init_here(63, primitiveStringAt);\n  init_here(64, primitiveStringAtPut);\n  init_here(65, primitiveNext);\n  init_here(66, primitiveNextPut);\n  init_here(67, primitiveAtEnd);\n  init_here(68, primitiveObjectAt);\n  init_here(69, primitiveObjectAtPut);\n  init_here(70, primitiveNew);\n  init_here(71, primitiveNewWithArg);\n  init_here(72, primitiveArrayBecomeOneWay);\n  init_here(73, primitiveInstVarAt);\n  init_here(74, primitiveInstVarAtPut);\n  init_here(75, primitiveAsOop);\n  init_here(76, primitiveStoreStackp);\n  init_here(77, primitiveSomeInstance);\n  init_here(78, primitiveNextInstance);\n  init_here(79, primitiveNewMethod);\n  init_here(80, primitiveBlockCopy);\n  init_here(81, primitiveValue);\n  init_here(82, primitiveValueWithArgs);\n  init_here(83, primitivePerform);\n  init_here(84, primitivePerformWithArgs);\n  init_here(85, primitiveSignal);\n  init_here(86, primitiveWait);\n  init_here(87, primitiveResume);\n  init_here(88, primitiveSuspend);\n  init_here(89, primitiveFlushCache);\n  init_main(90, primitiveMousePoint);\n  init_main(91, primitiveTestDisplayDepth);\n  init_main(92, primitiveSetDisplayMode);\n  init_main(93, primitiveInputSemaphore);\n  init_here(94, primitiveGetNextEvent);\n  init_here(95, primitiveInputWord);\n  init_here(96, primitiveObsoleteIndexedPrimitive);\n  init_here(97, primitiveSnapshot); // try it here to avoid deadlock\n  init_main(98, primitiveStoreImageSegment);\n  init_main(99, primitiveLoadImageSegment);\n  init_here(100, primitivePerformInSuperclass);\n  init_main(101, primitiveBeCursor);\n  init_here(102, primitiveBeDisplay);\n  init_here(103, primitiveScanCharacters);\n  init_here(104, primitiveObsoleteIndexedPrimitive);\n  init_here(105, primitiveStringReplace);\n  init_main(106, primitiveScreenSize);\n  init_main(107, primitiveMouseButtons);\n  init_main(108, primitiveKbdNext);\n  init_main(109, primitiveKbdPeek);\n\n\n  init_here(110, primitiveEquivalent);\n  init_here(111, primitiveClass);\n  init_here(112, primitiveBytesLeft);\n  init_main(113, primitiveQuit);\n  init_here(114, primitiveExitToDebugger);\n  init_here(115, primitiveChangeClass);\n  init_here(116, primitiveFlushCacheByMethod);\n  // init_main(117, primitiveExternalCall); // needed to share externalPrimitiveTable to run this here instead of on main\n  init_here(117, primitiveExternalCall);\n  init_here(118, primitiveDoPrimitiveWithArgs);\n  init_here(119, primitiveFlushCacheSelective);\n\n\n  init_main(120, primitiveCalloutToFFI);\n  init_main(121, primitiveImageName);\n  init_here(122, primitiveNoop);\n  init_here(123, primitiveValueUninterruptably);\n  init_here(124, primitiveLowSpaceSemaphore);\n  init_here(125, primitiveSignalAtBytesLeft);\n\n\n\n\n  init_here(126, primitiveDeferDisplayUpdates);\n  init_main(127, primitiveShowDisplayRect);\n  init_here(128, primitiveArrayBecome);\n  init_here(129, primitiveSpecialObjectsOop);\n  init_here(130, primitiveFullGC);\n  init_here(131, primitiveIncrementalGC);\n  init_here(132, primitiveObjectPointsTo);\n  init_here(133, primitiveSetInterruptKey);\n  init_here(134, primitiveInterruptSemaphore);\n  init_here(135, primitiveMillisecondClock);\n  init_here(136, primitiveSignalAtMilliseconds);\n  init_here(137, primitiveSecondsClock);\n  init_here(138, primitiveSomeObject);\n  init_here(139, primitiveNextObject);\n  init_main(140, primitiveBeep);\n  init_main(141, primitiveClipboardText);\n  init_main(142, primitiveVMPath);\n  init_here(143, primitiveShortAt);\n  init_here(144, primitiveShortAtPut);\n  init_here(145, primitiveConstantFill);\n  init_here(146, primitiveObsoleteIndexedPrimitive);\n  init_here(147, primitiveObsoleteIndexedPrimitive);\n  init_here(148, primitiveClone);\n  init_main(149, primitiveGetAttribute);\n\n\n  init_here(150, 164, primitiveObsoleteIndexedPrimitive);\n  init_here(165, primitiveIntegerAt);\n  init_here(166, primitiveIntegerAtPut);\n  init_here(167, primitiveYield);\n  init_here(168, primitiveCopyObject);\n  init_here(169, primitiveObsoleteIndexedPrimitive);\n\n\n  init_here(170, 185, primitiveObsoleteIndexedPrimitive);\n\n\n  init_here(186, primitiveFail);\n  init_here(187, primitiveFail);\n\n\n  init_here(188, primitiveExecuteMethodArgsArray);\n  init_here(189, primitiveExecuteMethod);\n\n\n  init_here(190, 194, primitiveObsoleteIndexedPrimitive);\n\n\n  init_here(195, primitiveFindNextUnwindContext);\n  init_here(196, primitiveTerminateTo);\n  init_here(197, primitiveFindHandlerContext);\n  init_here(198, primitiveMarkUnwindMethod);\n  init_here(199, primitiveMarkHandlerMethod);\n\n# if Include_Closure_Support\n  init_here(200, primitiveClosureCopyWithCopiedValues);\n  init_here(201, 205, primitiveClosureValue); // with 0 to 4 args\n  init_here(206, primitiveClosureValueWithArgs);\n  init_here(207, 209, primitiveFail); \n  init_here(210, primitiveAt); // compat w/ Cog StackInterpreterContext primitives\n  init_here(211, primitiveAtPut); // compat w/ Cog StackInterpreterContext primitives\n  init_here(212, primitiveSize); // compat w/ Cog StackInterpreterContext primitives\n  init_here(213, 217, primitiveFail);\n  init_here(218, primitiveDoNamedPrimitiveWithArgs);\n  init_here(219, primitiveFail);\n  init_here(220, primitiveObsoleteIndexedPrimitive);\n  init_here(221, 222, primitiveClosureValueNoContextSwitch);\n  init_here(223, 225, primitiveObsoleteIndexedPrimitive);\n# else\n  init_here(200, 225, primitiveObsoleteIndexedPrimitive);\n# endif\n\n  init_here(226, primitiveFail);\n  init_here(227, primitiveFail);\n  init_here(228, primitiveFail);\n  init_here(229, primitiveFail);\n\n  init_here(230, primitiveRelinquishProcessor);\n\n  init_main(231, primitiveForceDisplayUpdate);\n  init_main(232, primitiveFormPrint);\n  init_main(233, primitiveSetFullScreen);\n  init_here(234, primitiveObsoleteIndexedPrimitive);\n  init_here(235, primitiveObsoleteIndexedPrimitive);\n  init_here(236, primitiveObsoleteIndexedPrimitive);\n  init_here(237, primitiveObsoleteIndexedPrimitive);\n  init_here(238, 241, primitiveObsoleteIndexedPrimitive);\n  init_here(242, primitiveFail);\n  init_here(243, primitiveObsoleteIndexedPrimitive);\n  init_here(244, primitiveObsoleteIndexedPrimitive);\n  init_here(245, primitiveObsoleteIndexedPrimitive);\n  init_here(246, primitiveObsoleteIndexedPrimitive);\n  init_main(247, primitiveSnapshotEmbedded);\n  init_here(248, primitiveInvokeObjectAsMethod);\n  init_here(249, primitiveArrayBecomeOneWayCopyHash);\n\n\n  init_here(250, clearProfile);\n  init_here(251, dumpProfile);\n  init_here(252, startProfiling);\n  init_here(253, stopProfiling);\n  init_main(254, primitiveVMParameter);\n  init_here(255, primitiveInstVarsPutFromStack);\n\n\n  init_here(256, primitivePushSelf);\n  init_here(257, primitivePushTrue);\n  init_here(258, primitivePushFalse);\n  init_here(259, primitivePushNil);\n  init_here(260, primitivePushMinusOne);\n  init_here(261, primitivePushZero);\n  init_here(262, primitivePushOne);\n  init_here(263, primitivePushTwo);\n\n\n  init_here(264, 519, primitiveLoadInstVar);\n\n  init_here(520, primitiveFail);\n\n  init_here(521, 529, primitiveObsoleteIndexedPrimitive);\n  init_here(530, 539, primitiveFail);\n\n\n  init_here(540, 545, primitiveObsoleteIndexedPrimitive);\n  init_here(546, 547, primitiveFail);\n\n\n  init_here(548, primitiveObsoleteIndexedPrimitive);\n  init_here(549, primitiveObsoleteIndexedPrimitive);\n\n\n  init_here(550, 553, primitiveObsoleteIndexedPrimitive);\n  init_here(554, 569, primitiveFail);\n\n\n  init_here(570, primitiveFlushExternalPrimitives);\n  init_main(571, primitiveUnloadModule);\n  init_main(572, primitiveListBuiltinModule);\n  init_main(573, primitiveListExternalModule);\n  init_here(574, primitiveFail);\n\n\n  init_here(575, primitiveFail);\n}\n\n\n\n# define FWD(n) void* n(...) {The_Squeak_Interpreter()->n(); return 0; }\n\nFOR_ALL_PRIMITIVES_DO(FWD)\n# undef FOR_ALL_PRIMITIVES_DO\n# undef DEF\n\n"
  },
  {
    "path": "vm/src/interpreter/primitive_table.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n/*\n \"This table generates a C function address table use in primitiveResponse along with dispatchFunctionPointerOn:in:\"\n\n\"NOTE: The real limit here is 2047 because of the method header layout but there is no point in going over the needed size\"\nMaxPrimitiveIndex := 575.\n */\n\nclass Primitive_Table: public Abstract_Primitive_Table {\npublic:\n  Primitive_Table();\nprivate:\n  void init_main(int i, fn_t f) {contents[i] = f; execute_on_main[i] = true; }\n  void init_here(int i, fn_t f) {contents[i] = f; execute_on_main[i] = false; }\n  void init_here(int i, int j, fn_t f) { while(i <= j) { execute_on_main[i] = false; contents[i++] = f;} }\n};\nextern Primitive_Table primitiveTable;\n\n# if Include_Closure_Support\n\n  # define FOR_ALL_CLOSURE_PRIMITIVES_DO(template) \\\n    template(primitiveClosureCopyWithCopiedValues) \\\n    template(primitiveClosureValue) \\\n    template (primitiveClosureValueWithArgs) \\\n    template(primitiveClosureValueNoContextSwitch)\n\n  # else\n  # define FOR_ALL_CLOSURE_PRIMITIVES_DO(template)\n\n# endif\n\n#define FOR_ALL_PRIMITIVES_DO(template) \\\n\\\nFOR_ALL_CLOSURE_PRIMITIVES_DO(template) \\\n\\\ntemplate(clearProfile) \\\ntemplate(dumpProfile) \\\ntemplate(primitiveAdd) \\\ntemplate(primitiveArctan) \\\ntemplate(primitiveArrayBecome) \\\ntemplate(primitiveArrayBecomeOneWay) \\\ntemplate(primitiveArrayBecomeOneWayCopyHash) \\\ntemplate(primitiveAsFloat) \\\ntemplate(primitiveAsOop) \\\ntemplate(primitiveAt) \\\ntemplate(primitiveAtEnd) \\\ntemplate(primitiveAtPut) \\\ntemplate(primitiveBeCursor) \\\ntemplate(primitiveBeDisplay) \\\ntemplate(primitiveBeep) \\\ntemplate(primitiveBitAnd) \\\ntemplate(primitiveBitOr) \\\ntemplate(primitiveBitShift) \\\ntemplate(primitiveBitXor) \\\ntemplate(primitiveBlockCopy) \\\ntemplate(primitiveBytesLeft) \\\ntemplate(primitiveCalloutToFFI) \\\ntemplate(primitiveChangeClass) \\\ntemplate(primitiveClass) \\\ntemplate(primitiveClipboardText) \\\ntemplate(primitiveClone) \\\ntemplate(primitiveConstantFill) \\\ntemplate(primitiveCopyObject) \\\ntemplate(primitiveDeferDisplayUpdates) \\\ntemplate(primitiveDiv) \\\ntemplate(primitiveDivide) \\\ntemplate(primitiveDoPrimitiveWithArgs) \\\ntemplate(primitiveEqual) \\\ntemplate(primitiveEquivalent) \\\ntemplate(primitiveExecuteMethod) \\\ntemplate(primitiveExecuteMethodArgsArray) \\\ntemplate(primitiveExitToDebugger) \\\ntemplate(primitiveExponent) \\\ntemplate(primitiveExp) \\\ntemplate(primitiveExternalCall) \\\ntemplate(primitiveFail) \\\ntemplate(primitiveFindHandlerContext) \\\ntemplate(primitiveFindNextUnwindContext) \\\ntemplate(primitiveFloatAdd) \\\ntemplate(primitiveFloatDivide) \\\ntemplate(primitiveFloatEqual) \\\ntemplate(primitiveFloatGreaterOrEqual) \\\ntemplate(primitiveFloatGreaterThan) \\\ntemplate(primitiveFloatLessOrEqual) \\\ntemplate(primitiveFloatLessThan) \\\ntemplate(primitiveFloatMultiply) \\\ntemplate(primitiveFloatNotEqual) \\\ntemplate(primitiveFloatSubtract) \\\ntemplate(primitiveFlushCache) \\\ntemplate(primitiveFlushCacheByMethod) \\\ntemplate(primitiveFlushCacheSelective) \\\ntemplate(primitiveFlushExternalPrimitives) \\\ntemplate(primitiveForceDisplayUpdate) \\\ntemplate(primitiveFormPrint) \\\ntemplate(primitiveFractionalPart) \\\ntemplate(primitiveFullGC) \\\ntemplate(primitiveGetAttribute) \\\ntemplate(primitiveGetNextEvent) \\\ntemplate(primitiveGreaterOrEqual) \\\ntemplate(primitiveGreaterThan) \\\ntemplate(primitiveImageName) \\\ntemplate(primitiveIncrementalGC) \\\ntemplate(primitiveInputSemaphore) \\\ntemplate(primitiveInputWord) \\\ntemplate(primitiveInstVarAt) \\\ntemplate(primitiveInstVarAtPut) \\\ntemplate(primitiveInstVarsPutFromStack) \\\ntemplate(primitiveIntegerAt) \\\ntemplate(primitiveIntegerAtPut) \\\ntemplate(primitiveInterruptSemaphore) \\\ntemplate(primitiveInvokeObjectAsMethod) \\\ntemplate(primitiveKbdNext) \\\ntemplate(primitiveKbdPeek) \\\ntemplate(primitiveLessOrEqual) \\\ntemplate(primitiveLessThan) \\\ntemplate(primitiveListBuiltinModule) \\\ntemplate(primitiveListExternalModule) \\\ntemplate(primitiveLoadImageSegment) \\\ntemplate(primitiveLoadInstVar) \\\ntemplate(primitiveLogN) \\\ntemplate(primitiveLowSpaceSemaphore) \\\ntemplate(primitiveMakePoint) \\\ntemplate(primitiveMarkHandlerMethod) \\\ntemplate(primitiveMarkUnwindMethod) \\\ntemplate(primitiveMillisecondClock) \\\ntemplate(primitiveMod) \\\ntemplate(primitiveMouseButtons) \\\ntemplate(primitiveMousePoint) \\\ntemplate(primitiveMultiply) \\\ntemplate(primitiveNew) \\\ntemplate(primitiveNewMethod) \\\ntemplate(primitiveNewWithArg) \\\ntemplate(primitiveNext) \\\ntemplate(primitiveNextInstance) \\\ntemplate(primitiveNextObject) \\\ntemplate(primitiveNextPut) \\\ntemplate(primitiveNoop) \\\ntemplate(primitiveNotEqual) \\\ntemplate(primitiveObjectAt) \\\ntemplate(primitiveObjectAtPut) \\\ntemplate(primitiveObjectPointsTo) \\\ntemplate(primitiveObsoleteIndexedPrimitive) \\\ntemplate(primitivePerform) \\\ntemplate(primitivePerformInSuperclass) \\\ntemplate(primitivePerformWithArgs) \\\ntemplate(primitivePushFalse) \\\ntemplate(primitivePushMinusOne) \\\ntemplate(primitivePushNil) \\\ntemplate(primitivePushOne) \\\ntemplate(primitivePushSelf) \\\ntemplate(primitivePushTrue) \\\ntemplate(primitivePushTwo) \\\ntemplate(primitivePushZero) \\\ntemplate(primitiveQuit) \\\ntemplate(primitiveQuo) \\\ntemplate(primitiveRelinquishProcessor) \\\ntemplate(primitiveResume) \\\ntemplate(primitiveScanCharacters) \\\ntemplate(primitiveScreenSize) \\\ntemplate(primitiveSecondsClock) \\\ntemplate(primitiveSetDisplayMode) \\\ntemplate(primitiveSetFullScreen) \\\ntemplate(primitiveSetInterruptKey) \\\ntemplate(primitiveShortAt) \\\ntemplate(primitiveShortAtPut) \\\ntemplate(primitiveShowDisplayRect) \\\ntemplate(primitiveSignal) \\\ntemplate(primitiveSignalAtBytesLeft) \\\ntemplate(primitiveSignalAtMilliseconds) \\\ntemplate(primitiveSine) \\\ntemplate(primitiveSize) \\\ntemplate(primitiveSnapshot) \\\ntemplate(primitiveSnapshotEmbedded) \\\ntemplate(primitiveSomeInstance) \\\ntemplate(primitiveSomeObject) \\\ntemplate(primitiveSpecialObjectsOop) \\\ntemplate(primitiveSquareRoot) \\\ntemplate(primitiveStoreImageSegment) \\\ntemplate(primitiveStoreStackp) \\\ntemplate(primitiveStringAt) \\\ntemplate(primitiveStringAtPut) \\\ntemplate(primitiveStringReplace) \\\ntemplate(primitiveSubtract) \\\ntemplate(primitiveSuspend) \\\ntemplate(primitiveTerminateTo) \\\ntemplate(primitiveTestDisplayDepth) \\\ntemplate(primitiveTimesTwoPower) \\\ntemplate(primitiveTruncated) \\\ntemplate(primitiveUnloadModule) \\\ntemplate(primitiveVMParameter) \\\ntemplate(primitiveVMPath) \\\ntemplate(primitiveValue) \\\ntemplate(primitiveValueUninterruptably) \\\ntemplate(primitiveValueWithArgs) \\\ntemplate(primitiveWait) \\\ntemplate(primitiveYield) \\\ntemplate(startProfiling) \\\ntemplate(stopProfiling) \\\ntemplate(primitiveDoNamedPrimitiveWithArgs)\n\n# define DCL(n) void* n(...);\n\nFOR_ALL_PRIMITIVES_DO(DCL)\n# undef DCL\n\n"
  },
  {
    "path": "vm/src/interpreter/squeak_interpreter.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# include \"headers.h\"\n\n\n# define INIT_BROADCAST(REAL_T,BROADCAST_T,name, init_val) _##name = init_val;\n# define INIT_FORMERLY_BROADCAST(REAL_T,BROADCAST_T,name, init_val) _##name = init_val;\n# define INIT_SHARED_MEMORY_VARS(REAL_T,BROADCAST_T,name, init_val) shared_memory_fields->_##name = init_val;\n\n\nSqueak_Interpreter::Squeak_Interpreter() \n#if Using_Threads\n: _my_rank(Logical_Core::my_rank()), _my_core(Logical_Core::my_core()) \n#endif\n{\n  bcCount = 1;\n  remapBufferCount = 0;\n  mutated_read_mostly_objects_count = 0;\n  yieldCount = 0;\n  interruptCheckCount = unforcedInterruptCheckCount = 0;\n  update_times_when_yielding();\n  update_times_when_resuming();\n  cyclesRunning =    cyclesWaiting = 0;\n  numberOfMovedMutatedRead_MostlyObjects = 0;\n  cyclesMovingMutatedRead_MostlyObjects = 0;\n  emergency_semaphore_signal_requested = false;\n\n  static int dummy = 17;\n  global_sequence_number = print_sequence_number = &dummy;\n  running_process_by_core = NULL;\n\n// Not used, but left in for debugging\n/*static bool db = false;\n  debug_flag = &db;\n  static int dbi = 0;\n  debug_int = &dbi;  */\n\n\n  safepoint_tracker = NULL;\n  safepoint_master_control = NULL;\n  safepoint_ability = NULL;\n\n\n\n  added_process_count = 12; // a few for free initiallly\n\n  static Shared_memory_fields dummy_shared;\n  shared_memory_fields = &dummy_shared;\n\n  FOR_ALL_BROADCAST(INIT_BROADCAST)\n  FOR_ALL_FORMERLY_BROADCAST(INIT_FORMERLY_BROADCAST)\n  FOR_ALL_HELD_IN_SHARED_MEMORY(INIT_SHARED_MEMORY_VARS)\n\n  doing_primitiveClosureValueNoContextSwitch = false;\n  \n  suppress_context_switch_for_debugging = false;\n  \n  build_dispatch_table();\n}\n\n\nvoid Squeak_Interpreter::init_rank() {\n#if Using_Threads && false\n  _my_rank = Logical_Core::my_rank();\n  _my_core = Logical_Core::my_core();\n#endif  \n}\n\nbool Squeak_Interpreter::is_initialized() { return roots.is_initialized(); }\n\nvoid Squeak_Interpreter::initialize(Oop soo, bool from_checkpoint) {\n  if (!from_checkpoint) roots.initialize(soo);\n\n  if (Logical_Core::running_on_main()) {\n    \n    timeout_deferral_counters = (int32*)Memory_Semantics::shared_calloc(Max_Number_Of_Cores, sizeof(timeout_deferral_counters[0]));\n    \n    scheduler_mutex.initialize_globals();\n    semaphore_mutex.initialize_globals();\n\n    safepoint_tracker = new Safepoint_Tracker();\n    safepoint_master_control = new Safepoint_Master_Control();\n\n     global_sequence_number = (int*)OS_Interface::malloc_uncacheable_shared(sizeof(int), sizeof(int));\n    *global_sequence_number = 0;\n\n     print_sequence_number = (int*)OS_Interface::malloc_uncacheable_shared(sizeof(int), sizeof(int));\n    *print_sequence_number = 0;\n\n    // STEFAN: looks like it is not used at all\n/*     debug_flag = (bool*)OS_Interface::malloc_uncacheable_shared(sizeof(bool), sizeof(bool));\n    *debug_flag = false;\n\n    debug_int = (int*)OS_Interface::malloc_uncacheable_shared(sizeof(int), sizeof(int));\n    *debug_int = -1; */\n\n    running_process_by_core            = (Oop*)OS_Interface::malloc_uncacheable_shared(sizeof(Oop), Logical_Core::group_size * sizeof(Oop));\n    FOR_ALL_RANKS(i)\n      running_process_by_core[i] = roots.nilObj;\n\n    shared_memory_fields = (Shared_memory_fields*)OS_Interface::malloc_uncacheable_shared(sizeof(long long int), sizeof(Shared_memory_fields));\n    bzero(shared_memory_fields, sizeof(*shared_memory_fields));\n    FOR_ALL_HELD_IN_SHARED_MEMORY(INIT_SHARED_MEMORY_VARS)\n  }\n\n\n  if (!from_checkpoint) {\n    set_activeContext(roots.nilObj);\n    set_theHomeContext(roots.nilObj);\n\n    set_method(roots.nilObj);\n    roots.receiver = roots.nilObj;\n    roots.messageSelector = roots.nilObj;\n    roots.newMethod = roots.nilObj;\n    roots.methodClass = roots.nilObj;\n    roots.lkupClass = roots.nilObj;\n    roots.receiverClass = roots.nilObj;\n    roots.newNativeMethod = roots.nilObj;\n    flushInterpreterCaches();\n    loadInitialContext();\n    initialCleanup();\n    interruptCheckCounter = 0;\n    interruptChecksEveryNms = 1;\n    showSurfaceFn = NULL;\n\n    successFlag = true;\n\n    globalSessionID = 0;\n\n\n    multicore_interrupt_check = false;\n  }\n  \n# if Dump_Bytecode_Cycles\n  bc_cycles_index = 0;\n  OS_Interface::get_cycle_count(); // caching?\n  u_int64 start_tare = OS_Interface::get_cycle_count();\n  u_int64 end_tare = OS_Interface::get_cycle_count();\n  bc_cycles_tare = end_tare - start_tare; // meas time\n# endif\n}\n\n\nvoid Squeak_Interpreter::do_all_roots(Oop_Closure* oc) {\n  FOR_EACH_ROOT(&roots,oopp) oc->value(oopp, (Object_p)NULL);\n  for (int i = 0;  i < remapBufferCount;  ++i)\n    oc->value(&remapBuffer[i], (Object_p)NULL);\n  for (int i = 0;  i < mutated_read_mostly_objects_count;  ++i)\n    oc->value(&mutated_read_mostly_objects[i], (Object_p)NULL);\n  if (mutated_read_mostly_object_tracer() != NULL)\n    mutated_read_mostly_object_tracer()->do_all_roots(oc);\n  if (execution_tracer() != NULL)\n    execution_tracer()->do_all_roots(oc);\n  if (debugging_tracer() != NULL)\n    debugging_tracer()->do_all_roots(oc);\n  if (Logical_Core::running_on_main())\n    FOR_ALL_RANKS(i)\n      oc->value(&running_process_by_core[i], (Object_p)NULL);\n  Deferred_Request::do_all_roots(oc);\n}\n\nvoid Squeak_Interpreter::flushInterpreterCaches() {\n  methodCache.flush_method_cache();\n      atCache.flush_at_cache();\n}\n\n\n\n\nvoid Squeak_Interpreter::loadInitialContext() {\n  if (Logical_Core::running_on_main()) {\n    Scheduler_Mutex sm(\"loadInitialContext\");\n    assert_active_process_not_nil();\n    Oop proc = schedulerPointer_obj()->fetchPointer(Object_Indices::ActiveProcessIndex);\n    proc.as_object()->add_process_to_scheduler_list(); // unlike squeak rvm keeps running procs in lists\n    set_running_process(proc, \"loadInitialContext\");\n    set_activeContext(proc.as_object()->get_suspended_context_of_process_and_mark_running());\n    // (activeContext < youngStart) ifTrue: [ self beRootIfOld: activeContext ].\n    fetchContextRegisters(activeContext(), activeContext_obj());\n  }\n  else\n    unset_running_process();\n  reclaimableContextCount = 0;\n}\n\nvoid Squeak_Interpreter::initialCleanup() {\n\n\t// \"Images written by VMs earlier than 3.6/3.7 will wrongly have the root bit\n  //  set on the active context. Besides clearing the root bit, we treat this\n  //  as a marker that these images also lack a cleanup of external primitives\n  //  (which has been introduced at the same time when the root bit problem was\n  //  fixed). In this case, we merely flush them from here.\"\n\n\tif (!(activeContext_obj()->baseHeader & Object::RootBit)) // \"root bit is clean\"\n    return;\n\n\t// \"Clean root bit of activeContext\"\n\n  activeContext_obj()->baseHeader &= ~Object::RootBit;\n\t// \"Clean external primitives\"\n  if (Logical_Core::running_on_main())\n\t   flushExternalPrimitives();\n}\n\nvoid Squeak_Interpreter::flushExternalPrimitives() {\n  // \"Flush the references to external functions from plugin\n  // primitives. This will force a reload of those primitives when\n  // accessed next.\n  // Note: We must flush the method cache here so that any\n  // failed primitives are looked up again.\"\n  //\n  // return true iff found a call to primitiveThisProcerss\n\n  The_Memory_System()->flushExternalPrimitives();\n  flushInterpreterCachesMessage_class().send_to_all_cores();\n  flushObsoleteIndexedPrimitives();\n  flushExternalPrimitiveTable();\n}\n\nvoid Squeak_Interpreter::flushObsoleteIndexedPrimitives() {\n  //\t\"Flush the pointers in the obsolete indexed primitive table\"\n\tobsoleteIndexedPrimitiveTable.flush();\n}\n\n\nvoid Squeak_Interpreter::flushExternalPrimitiveTable() { externalPrimitiveTable()->flush(); }\n\n\n__attribute__((unused)) static u_char lastBC;\n__attribute__((unused)) static int lastBCCount;\nvoid Squeak_Interpreter::interpret() {\n  /*\n   \"This is the main interpreter loop. It normally loops forever,\n    fetching and executing bytecodes. When running in the context of a browser\n    plugin VM, however, it must return control to the browser periodically.\n    This should done only when the state of the currently running Squeak thread\n    is safely stored in the object heap. Since this is the case at the moment\n    that a check for interrupts is performed, that is when we return to the\n    browser if it is time to do so. Interrupt checks happen quite frequently.\"\n   */\n\n  assert_message(Header_Type::Shift == 0  &&  Header_Type::Width >= Tag_Size,\n         \"lots of code, including Oop packing into class headers, and the mem_bits fns on Oops depends on this\");\n\n  Safepoint_Ability sa(false); // about to internalize things\n\tfetchNextBytecode();\n  \n  for (let_one_through();  ; ) {\n    check_for_multicore_interrupt();\n    if (Collect_Performance_Counters)\n      u_int64 start = OS_Interface::get_cycle_count();\n\n    assert(activeContext_obj()->is_read_write());\n\n    if (check_many_assertions) {\n      verify_active_context_through_stack_top();\n      stackTop().verify_oop();\n      assert(stackTop().is_int() || stackTop().as_object()->baseHeader);\n      assert((activeContext_obj()->baseHeader & ~0xff));\n      Oop s = activeContext_obj()->fetchPointer(Object_Indices::SenderIndex);\n      assert(s.is_mem());\n      Object_p s_obj = s.as_object();\n      assert(s_obj->my_heap_contains_me());\n\n      assert (!roots.freeContexts.is_mem() ||\n               roots.freeContexts.as_object()->hasContextHeader());\n\n      if ( check_assertions\n      &&   roots.freeContexts != Object::NilContext()) {\n        Oop x = roots.freeContexts.as_object()->fetchPointer(Object_Indices::Free_Chain_Index);\n        assert (x.is_mem()  ||  x == Object::NilContext());\n      }\n      assert( stackTop().bits() );\n    }\n    if (check_assertions | CountByteCodesAndStopAt)\n      lastBCCount = bcCount;\n    if (CountByteCodesAndStopAt ) {\n       if (bcCount == CountByteCodesAndStopAt)\n         breakpoint();\n      if (bcCount >= CountByteCodesAndStopAt ) {\n        printBC(currentBytecode, dittoing_stdout_printer);  dittoing_stdout_printer->nl();\n      }\n    }\n    if (Trace_Execution  &&  execution_tracer() != NULL)\n      execution_tracer()->trace(this);\n    assert(get_running_process() != roots.nilObj);\n\n    assert(get_running_process().as_object()->is_process_running());\n\n    assert_method_is_correct(false, \"right before dispatch\");\n\n    if (Hammer_Safepoints && Logical_Core::running_on_main()) { \n      Safepoint_Ability sa(true);\n      while (true) {\n        static int n = 0;\n        printf(\"<%d\", ++n);\n        Safepoint_for_moving_objects sp(\"test safepoint\"); // sends mesgs to other cores to allocate arrays, might cause GC\n        printf(\">\");\n      }\n    }\n    \n    if (doing_primitiveClosureValueNoContextSwitch)\n      doing_primitiveClosureValueNoContextSwitch = false;\n    \n#   if Dump_Bytecode_Cycles\n    bc_cycles[bc_cycles_index] = OS_Interface::get_cycle_count();\n#   endif\n    \n    dispatch(currentBytecode);\n    \n#   if Dump_Bytecode_Cycles\n    bc_cycles[bc_cycles_index] = OS_Interface::get_cycle_count() - bc_cycles[bc_cycles_index] - bc_cycles_tare;\n    ++bc_cycles_index;\n    if (bc_cycles_index == sizeof(bc_cycles)/sizeof(bc_cycles[0])) {\n      FILE* f = fopen(\"bc_cycles.txt\", \"w\");\n      for (int i = 0;  i < sizeof(bc_cycles)/sizeof(bc_cycles[0]); ++i) fprintf(f, \"%lld\\n\", bc_cycles[i]);\n      fclose(f);\n      exit(0);\n    }\n# endif\n\n    assert(!process_is_scheduled_and_executing() || get_running_process().as_object()->is_process_running());\n\n    PERF_CNT(this, add_interpret_cycles(OS_Interface::get_cycle_count() - start));\n    \n    // for debugging check that the stack is not growing to big\n    if (false && (count_stack_depth() > 1000)) {\n      OS_Interface::breakpoint();\n    }\n    \n  }\n  undo_prefetch();\n}\n\n\n\nvoid Squeak_Interpreter::let_one_through() {\n  const int winner = Logical_Core::main_rank;\n  const int my_rank = this->my_rank();\n\n  if (my_rank != winner) {\n    roots.running_process_or_nil = roots.nilObj;\n    if (Track_Processes)\n      running_process_by_core[my_rank] = roots.running_process_or_nil;\n\n    set_activeContext(roots.nilObj);\n    update_times_when_yielding();\n   }\n  update_times_when_resuming();\n  multicore_interrupt_check = true;\n  addedScheduledProcessMessage_class().send_to_other_cores(); // one is enough for now; all tiles will wake up\n}\n\n\n\nvoid Squeak_Interpreter::update_times_when_resuming() {\n  cycles_at_resume = OS_Interface::get_cycle_count();\n  cyclesWaiting       +=    cycles_at_resume -    cycles_at_yield;\n  I_am_running = true;\n}\n\nvoid Squeak_Interpreter::update_times_when_yielding() {\n  ++yieldCount;\n  cycles_at_yield = OS_Interface::get_cycle_count();\n  cyclesRunning       +=    cycles_at_yield -    cycles_at_resume;\n  I_am_running = false;\n}\n\nvoid Squeak_Interpreter::update_times_when_asking() {\n  if (I_am_running)  update_times_when_yielding();\n  else               update_times_when_resuming();\n}\n\n\nvoid Squeak_Interpreter::dispatch(u_char currentByte) {\n  if (Check_Prefetch)  have_executed_currentBytecode = true;\n\n  DISPATCH_BYTECODE(dispatch_table[currentByte]);\n}\n\nvoid Squeak_Interpreter::build_dispatch_table() {\n  for (size_t i = 0; i < 256; i++) {\n    switch (i) {\n      case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9:\n      case 10: case 11: case 12: case 13: case 14: case 15:\n        dispatch_table[i] = &Squeak_Interpreter::pushReceiverVariableBytecode;\n        break;\n        \n      case 16: case 17: case 18: case 19:\n      case 20: case 21: case 22: case 23: case 24: case 25: case 26: case 27: case 28: case 29:\n      case 30: case 31:\n        dispatch_table[i] = &Squeak_Interpreter::pushTemporaryVariableBytecode;\n        break;\n        \n      case 32: case 33: case 34: case 35: case 36: case 37: case 38: case 39:\n      case 40: case 41: case 42: case 43: case 44: case 45: case 46: case 47: case 48: case 49:\n      case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: case 58: case 59:\n      case 60: case 61: case 62: case 63:\n        dispatch_table[i] = &Squeak_Interpreter::pushLiteralConstantBytecode;\n        break;\n      \n      case 64: case 65: case 66: case 67: case 68: case 69:\n      case 70: case 71: case 72: case 73: case 74: case 75: case 76: case 77: case 78: case 79:\n      case 80: case 81: case 82: case 83: case 84: case 85: case 86: case 87: case 88: case 89:\n      case 90: case 91: case 92: case 93: case 94: case 95:\n        dispatch_table[i] = &Squeak_Interpreter::pushLiteralVariableBytecode;\n        break;\n        \n      case 96: case 97: case 98: case 99:\n      case 100: case 101: case 102: case 103:\n        dispatch_table[i] = &Squeak_Interpreter::storeAndPopReceiverVariableBytecode;\n        break;\n        \n      case 104: case 105: case 106: case 107: case 108: case 109:\n      case 110: case 111:\n        dispatch_table[i] = &Squeak_Interpreter::storeAndPopTemporaryVariableBytecode;\n        break;\n        \n      case 112: dispatch_table[i] = &Squeak_Interpreter::pushReceiverBytecode; break;\n      case 113: dispatch_table[i] = &Squeak_Interpreter::pushConstantTrueBytecode; break;\n      case 114: dispatch_table[i] = &Squeak_Interpreter::pushConstantFalseBytecode; break;\n      case 115: dispatch_table[i] = &Squeak_Interpreter::pushConstantNilBytecode; break;\n      case 116: dispatch_table[i] = &Squeak_Interpreter::pushConstantMinusOneBytecode; break;\n      case 117: dispatch_table[i] = &Squeak_Interpreter::pushConstantZeroBytecode; break;\n      case 118: dispatch_table[i] = &Squeak_Interpreter::pushConstantOneBytecode; break;\n      case 119: dispatch_table[i] = &Squeak_Interpreter::pushConstantTwoBytecode; break;\n      case 120: dispatch_table[i] = &Squeak_Interpreter::returnReceiver; break;\n      case 121: dispatch_table[i] = &Squeak_Interpreter::returnTrue; break;\n      case 122: dispatch_table[i] = &Squeak_Interpreter::returnFalse; break;\n      case 123: dispatch_table[i] = &Squeak_Interpreter::returnNil; break;\n      case 124: dispatch_table[i] = &Squeak_Interpreter::returnTopFromMethod; break;\n      case 125: dispatch_table[i] = &Squeak_Interpreter::returnTopFromBlock; break;\n      case 126: dispatch_table[i] = &Squeak_Interpreter::unknownBytecode; break;\n      case 127: dispatch_table[i] = &Squeak_Interpreter::unknownBytecode; break;\n      case 128: dispatch_table[i] = &Squeak_Interpreter::extendedPushBytecode; break;\n      case 129: dispatch_table[i] = &Squeak_Interpreter::extendedStoreBytecode; break;\n      case 130: dispatch_table[i] = &Squeak_Interpreter::extendedStoreAndPopBytecode; break;\n      case 131: dispatch_table[i] = &Squeak_Interpreter::singleExtendedSendBytecode; break;\n      case 132: dispatch_table[i] = &Squeak_Interpreter::doubleExtendedDoAnythingBytecode; break;\n      case 133: dispatch_table[i] = &Squeak_Interpreter::singleExtendedSuperBytecode; break;\n      case 134: dispatch_table[i] = &Squeak_Interpreter::secondExtendedSendBytecode; break;\n      case 135: dispatch_table[i] = &Squeak_Interpreter::popStackBytecode; break;\n      case 136: dispatch_table[i] = &Squeak_Interpreter::duplicateTopBytecode; break;\n      case 137: dispatch_table[i] = &Squeak_Interpreter::pushActiveContextBytecode; break;\n          \n    # if Include_Closure_Support\n        case 138: dispatch_table[i] = &Squeak_Interpreter::pushNewArrayBytecode; break;\n        case 139: dispatch_table[i] = &Squeak_Interpreter::unknownBytecode; break;\n        case 140: dispatch_table[i] = &Squeak_Interpreter::pushRemoteTempLongBytecode; break;\n        case 141: dispatch_table[i] = &Squeak_Interpreter::storeRemoteTempLongBytecode; break;\n        case 142: dispatch_table[i] = &Squeak_Interpreter::storeAndPopRemoteTempLongBytecode; break;\n        case 143: dispatch_table[i] = &Squeak_Interpreter::pushClosureCopyCopiedValuesBytecode; break;\n    # else\n      case 138: case 139: case 140: case 141: case 142: case 143:\n        dispatch_table[i] = &Squeak_Interpreter::experimentalBytecode; break;\n    # endif\n          \n      case 144: case 145: case 146: case 147: case 148: case 149:\n      case 150: case 151:\n        dispatch_table[i] = &Squeak_Interpreter::shortUnconditionalJump;\n        break;\n        \n      case 152: case 153: case 154: case 155: case 156: case 157: case 158: case 159:\n        dispatch_table[i] = &Squeak_Interpreter::shortConditionalJump;\n        break;\n        \n      case 160: case 161: case 162: case 163: case 164: case 165: case 166: case 167:\n        dispatch_table[i] = &Squeak_Interpreter::longUnconditionalJump;\n        break;\n        \n      case 168: case 169: case 170: case 171:\n        dispatch_table[i] = &Squeak_Interpreter::longJumpIfTrue;\n        break;\n        \n      case 172: case 173: case 174: case 175:\n        dispatch_table[i] = &Squeak_Interpreter::longJumpIfFalse;\n        break;\n\n      // sendArithmeticSelector\n      case 176: dispatch_table[i] = &Squeak_Interpreter::bytecodePrimAdd; break;\n      case 177: dispatch_table[i] = &Squeak_Interpreter::bytecodePrimSubtract; break;\n      case 178: dispatch_table[i] = &Squeak_Interpreter::bytecodePrimLessThan; break;\n      case 179: dispatch_table[i] = &Squeak_Interpreter::bytecodePrimGreaterThan; break;\n      case 180: dispatch_table[i] = &Squeak_Interpreter::bytecodePrimLessOrEqual; break;\n      case 181: dispatch_table[i] = &Squeak_Interpreter::bytecodePrimGreaterOrEqual; break;\n      case 182: dispatch_table[i] = &Squeak_Interpreter::bytecodePrimEqual; break;\n      case 183: dispatch_table[i] = &Squeak_Interpreter::bytecodePrimNotEqual; break;\n      case 184: dispatch_table[i] = &Squeak_Interpreter::bytecodePrimMultiply; break;\n      case 185: dispatch_table[i] = &Squeak_Interpreter::bytecodePrimDivide; break;\n      case 186: dispatch_table[i] = &Squeak_Interpreter::bytecodePrimMod; break;\n      case 187: dispatch_table[i] = &Squeak_Interpreter::bytecodePrimMakePoint; break;\n      case 188: dispatch_table[i] = &Squeak_Interpreter::bytecodePrimBitShift; break;\n      case 189: dispatch_table[i] = &Squeak_Interpreter::bytecodePrimDiv; break;\n      case 190: dispatch_table[i] = &Squeak_Interpreter::bytecodePrimBitAnd; break;\n      case 191: dispatch_table[i] = &Squeak_Interpreter::bytecodePrimBitOr; break;\n\n      // sendCommonSelector\n      case 192: dispatch_table[i] = &Squeak_Interpreter::bytecodePrimAt; break;\n      case 193: dispatch_table[i] = &Squeak_Interpreter::bytecodePrimAtPut; break;\n      case 194: dispatch_table[i] = &Squeak_Interpreter::bytecodePrimSize; break;\n      case 195: dispatch_table[i] = &Squeak_Interpreter::bytecodePrimNext; break;\n      case 196: dispatch_table[i] = &Squeak_Interpreter::bytecodePrimNextPut; break;\n      case 197: dispatch_table[i] = &Squeak_Interpreter::bytecodePrimAtEnd; break;\n      case 198: dispatch_table[i] = &Squeak_Interpreter::bytecodePrimEquivalent; break;\n      case 199: dispatch_table[i] = &Squeak_Interpreter::bytecodePrimClass; break;\n      case 200: dispatch_table[i] = &Squeak_Interpreter::bytecodePrimBlockCopy; break;\n      case 201: dispatch_table[i] = &Squeak_Interpreter::bytecodePrimValue; break;\n      case 202: dispatch_table[i] = &Squeak_Interpreter::bytecodePrimValueWithArg; break;\n      case 203: dispatch_table[i] = &Squeak_Interpreter::bytecodePrimDo; break;\n      case 204: dispatch_table[i] = &Squeak_Interpreter::bytecodePrimNew; break;\n      case 205: dispatch_table[i] = &Squeak_Interpreter::bytecodePrimNewWithArg; break;\n      case 206: dispatch_table[i] = &Squeak_Interpreter::bytecodePrimPointX; break;\n      case 207: dispatch_table[i] = &Squeak_Interpreter::bytecodePrimPointY; break;\n\n      case 208: case 209:\n      case 210: case 211: case 212: case 213: case 214: case 215: case 216: case 217: case 218: case 219:\n      case 220: case 221: case 222: case 223: case 224: case 225: case 226: case 227: case 228: case 229:\n      case 230: case 231: case 232: case 233: case 234: case 235: case 236: case 237: case 238: case 239:\n      case 240: case 241: case 242: case 243: case 244: case 245: case 246: case 247: case 248: case 249:\n      case 250: case 251: case 252: case 253: case 254: case 255:\n        dispatch_table[i] = &Squeak_Interpreter::sendLiteralSelectorBytecode;\n        break;\n    }\n  }\n}\n\nvoid Squeak_Interpreter::printBC(u_char bc, Printer* p) {\n  p->printf(\"on %d: %d: %s\", my_rank(), bcCount, bytecode_name(bc));\n}\n\nconst char* Squeak_Interpreter::bytecode_name(u_char bc) {\n  const char* c = \"\";\n    switch (bc) {\n      case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9:\n      case 10: case 11: case 12: case 13: case 14: case 15:\n        c = \"pushReceiverVariableBytecode\"; break;\n      case 16: case 17: case 18: case 19:\n      case 20: case 21: case 22: case 23: case 24: case 25: case 26: case 27: case 28: case 29:\n      case 30: case 31:\n        c = \"pushTemporaryVariableBytecode\"; break;\n      case 32: case 33: case 34: case 35: case 36: case 37: case 38: case 39:\n      case 40: case 41: case 42: case 43: case 44: case 45: case 46: case 47: case 48: case 49:\n      case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: case 58: case 59:\n      case 60: case 61: case 62: case 63:\n        c = \"pushLiteralConstantBytecode\"; break;\n      case 64: case 65: case 66: case 67: case 68: case 69:\n      case 70: case 71: case 72: case 73: case 74: case 75: case 76: case 77: case 78: case 79:\n      case 80: case 81: case 82: case 83: case 84: case 85: case 86: case 87: case 88: case 89:\n      case 90: case 91: case 92: case 93: case 94: case 95:\n        c = \"pushLiteralVariableBytecode\"; break;\n      case 96: case 97: case 98: case 99:\n      case 100: case 101: case 102: case 103:\n        c = \"storeAndPopReceiverVariableBytecode\"; break;\n      case 104: case 105: case 106: case 107: case 108: case 109:\n      case 110: case 111:\n        c = \"storeAndPopTemporaryVariableBytecode\"; break;\n      case 112: c = \"pushReceiverBytecode\"; break;\n      case 113: c = \"pushConstantTrueBytecode\"; break;\n      case 114: c = \"pushConstantFalseBytecode\"; break;\n      case 115: c = \"pushConstantNilBytecode\"; break;\n      case 116: c = \"pushConstantMinusOneBytecode\"; break;\n      case 117: c = \"pushConstantZeroBytecode\"; break;\n      case 118: c = \"pushConstantOneBytecode\"; break;\n      case 119: c = \"pushConstantTwoBytecode\"; break;\n      case 120: c = \"returnReceiver\"; break;\n      case 121: c = \"returnTrue\"; break;\n      case 122: c = \"returnFalse\"; break;\n      case 123: c = \"returnNil\"; break;\n      case 124: c = \"returnTopFromMethod\"; break;\n      case 125: c = \"returnTopFromBlock\"; break;\n      case 126: c = \"unknownBytecode\"; break;\n      case 127: c = \"unknownBytecode\"; break;\n      case 128: c = \"extendedPushBytecode\"; break;\n      case 129: c = \"extendedStoreBytecode\"; break;\n      case 130: c = \"extendedStoreAndPopBytecode\"; break;\n      case 131: c = \"singleExtendedSendBytecode\"; break;\n      case 132: c = \"doubleExtendedDoAnythingBytecode\"; break;\n      case 133: c = \"singleExtendedSuperBytecode\"; break;\n      case 134: c = \"secondExtendedSendBytecode\"; break;\n      case 135: c = \"popStackBytecode\"; break;\n      case 136: c = \"duplicateTopBytecode\"; break;\n      case 137: c = \"pushActiveContextBytecode\"; break;\n\n# if Include_Closure_Support\n      case 138: c = \"pushNewArrayBytecode\"; break;\n      case 139: c = \"unknownBytecode\"; break;\n      case 140: c = \"pushRemoteTempLongBytecode\"; break;\n      case 141: c = \"storeRemoteTempLongBytecode\"; break;\n      case 142: c = \"storeAndPopRemoteTempLongBytecode\"; break;\n      case 143: c = \"pushClosureCopyCopiedValuesBytecode\"; break;\n# else\n      case 138: case 139: case 140: case 141: case 142: case 143:\n        c = \"experimentalBytecode\"; break;\n# endif\n\n      case 144: case 145: case 146: case 147: case 148: case 149:\n      case 150: case 151:\n        c = \"shortUnconditionalJump\"; break;\n      case 152: case 153: case 154: case 155: case 156: case 157: case 158: case 159:\n        c = \"shortConditionalJump\"; break;\n      case 160: case 161: case 162: case 163: case 164: case 165: case 166: case 167:\n        c = \"longUnconditionalJump\"; break;\n      case 168: case 169: case 170: case 171:\n        c = \"longJumpIfTrue\"; break;\n      case 172: case 173: case 174: case 175:\n        c = \"longJumpIfFalse\"; break;\n\n        // sendArithmeticSelector\n      case 176: c = \"bytecodePrimAdd\"; break;\n      case 177: c = \"bytecodePrimSubtract\"; break;\n      case 178: c = \"bytecodePrimLessThan\"; break;\n      case 179: c = \"bytecodePrimGreaterThan\"; break;\n      case 180: c = \"bytecodePrimLessOrEqual\"; break;\n      case 181: c = \"bytecodePrimGreaterOrEqual\"; break;\n      case 182: c = \"bytecodePrimEqual\"; break;\n      case 183: c = \"bytecodePrimNotEqual\"; break;\n      case 184: c = \"bytecodePrimMultiply\"; break;\n      case 185: c = \"bytecodePrimDivide\"; break;\n      case 186: c = \"bytecodePrimMod\"; break;\n      case 187: c = \"bytecodePrimMakePoint\"; break;\n      case 188: c = \"bytecodePrimBitShift\"; break;\n      case 189: c = \"bytecodePrimDiv\"; break;\n      case 190: c = \"bytecodePrimBitAnd\"; break;\n      case 191: c = \"bytecodePrimBitOr\"; break;\n\n        // sendCommonSelector\n      case 192: c = \"bytecodePrimAt\"; break;\n      case 193: c = \"bytecodePrimAtPut\"; break;\n      case 194: c = \"bytecodePrimSize\"; break;\n      case 195: c = \"bytecodePrimNext\"; break;\n      case 196: c = \"bytecodePrimNextPut\"; break;\n      case 197: c = \"bytecodePrimAtEnd\"; break;\n      case 198: c = \"bytecodePrimEquivalent\"; break;\n      case 199: c = \"bytecodePrimClass\"; break;\n      case 200: c = \"bytecodePrimBlockCopy\"; break;\n      case 201: c = \"bytecodePrimValue\"; break;\n      case 202: c = \"bytecodePrimValueWithArg\"; break;\n      case 203: c = \"bytecodePrimDo\"; break;\n      case 204: c = \"bytecodePrimNew\"; break;\n      case 205: c = \"bytecodePrimNewWithArg\"; break;\n      case 206: c = \"bytecodePrimPointX\"; break;\n      case 207: c = \"bytecodePrimPointY\"; break;\n\n      case 208: case 209:\n      case 210: case 211: case 212: case 213: case 214: case 215: case 216: case 217: case 218: case 219:\n      case 220: case 221: case 222: case 223: case 224: case 225: case 226: case 227: case 228: case 229:\n      case 230: case 231: case 232: case 233: case 234: case 235: case 236: case 237: case 238: case 239:\n      case 240: case 241: case 242: case 243: case 244: case 245: case 246: case 247: case 248: case 249:\n      case 250: case 251: case 252: case 253: case 254: case 255:\n        c = \"sendLiteralSelectorBytecode\"; break;\n  }\n  return c;\n}\n\n\nint Squeak_Interpreter::literal_index_of_bytecode(u_char* bcp) {\n  int c = -1;\n  switch (*bcp) {\n    case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9:\n    case 10: case 11: case 12: case 13: case 14: case 15:\n      c = pushReceiverVariableBytecode_literal_index(bcp); break;\n    case 16: case 17: case 18: case 19:\n    case 20: case 21: case 22: case 23: case 24: case 25: case 26: case 27: case 28: case 29:\n    case 30: case 31:\n      c = pushTemporaryVariableBytecode_literal_index(bcp); break;\n    case 32: case 33: case 34: case 35: case 36: case 37: case 38: case 39:\n    case 40: case 41: case 42: case 43: case 44: case 45: case 46: case 47: case 48: case 49:\n    case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: case 58: case 59:\n    case 60: case 61: case 62: case 63:\n      c = pushLiteralConstantBytecode_literal_index(bcp); break;\n    case 64: case 65: case 66: case 67: case 68: case 69:\n    case 70: case 71: case 72: case 73: case 74: case 75: case 76: case 77: case 78: case 79:\n    case 80: case 81: case 82: case 83: case 84: case 85: case 86: case 87: case 88: case 89:\n    case 90: case 91: case 92: case 93: case 94: case 95:\n      c = pushLiteralVariableBytecode_literal_index(bcp); break;\n    case 96: case 97: case 98: case 99:\n    case 100: case 101: case 102: case 103:\n      c = storeAndPopReceiverVariableBytecode_literal_index(bcp); break;\n    case 104: case 105: case 106: case 107: case 108: case 109:\n    case 110: case 111:\n      c = storeAndPopTemporaryVariableBytecode_literal_index(bcp); break;\n    case 112: c = pushReceiverBytecode_literal_index(bcp); break;\n    case 113: c = pushConstantTrueBytecode_literal_index(bcp); break;\n    case 114: c = pushConstantFalseBytecode_literal_index(bcp); break;\n    case 115: c = pushConstantNilBytecode_literal_index(bcp); break;\n    case 116: c = pushConstantMinusOneBytecode_literal_index(bcp); break;\n    case 117: c = pushConstantZeroBytecode_literal_index(bcp); break;\n    case 118: c = pushConstantOneBytecode_literal_index(bcp); break;\n    case 119: c = pushConstantTwoBytecode_literal_index(bcp); break;\n    case 120: c = returnReceiver_literal_index(bcp); break;\n    case 121: c = returnTrue_literal_index(bcp); break;\n    case 122: c = returnFalse_literal_index(bcp); break;\n    case 123: c = returnNil_literal_index(bcp); break;\n    case 124: c = returnTopFromMethod_literal_index(bcp); break;\n    case 125: c = returnTopFromBlock_literal_index(bcp); break;\n    case 126: c = unknownBytecode_literal_index(bcp); break;\n    case 127: c = unknownBytecode_literal_index(bcp); break;\n    case 128: c = extendedPushBytecode_literal_index(bcp); break;\n    case 129: c = extendedStoreBytecode_literal_index(bcp); break;\n    case 130: c = extendedStoreAndPopBytecode_literal_index(bcp); break;\n    case 131: c = singleExtendedSendBytecode_literal_index(bcp); break;\n    case 132: c = doubleExtendedDoAnythingBytecode_literal_index(bcp); break;\n    case 133: c = singleExtendedSuperBytecode_literal_index(bcp); break;\n    case 134: c = secondExtendedSendBytecode_literal_index(bcp); break;\n    case 135: c = popStackBytecode_literal_index(bcp); break;\n    case 136: c = duplicateTopBytecode_literal_index(bcp); break;\n    case 137: c = pushActiveContextBytecode_literal_index(bcp); break;\n\n# if Include_Closure_Support\n    case 138: c = pushNewArrayBytecode_literal_index(bcp); break;\n    case 139: c = unknownBytecode_literal_index(bcp); break;\n    case 140: c = pushRemoteTempLongBytecode_literal_index(bcp); break;\n    case 141: c = storeRemoteTempLongBytecode_literal_index(bcp); break;\n    case 142: c = storeAndPopRemoteTempLongBytecode_literal_index(bcp); break;\n    case 143: c = pushClosureCopyCopiedValuesBytecode_literal_index(bcp); break;\n# else\n    case 138: case 139: case 140: case 141: case 142: case 143:\n      c = experimentalBytecode_literal_index(bcp); break;\n# endif\n\n    case 144: case 145: case 146: case 147: case 148: case 149:\n    case 150: case 151:\n      c = shortUnconditionalJump_literal_index(bcp); break;\n    case 152: case 153: case 154: case 155: case 156: case 157: case 158: case 159:\n      c = shortConditionalJump_literal_index(bcp); break;\n    case 160: case 161: case 162: case 163: case 164: case 165: case 166: case 167:\n      c = longUnconditionalJump_literal_index(bcp); break;\n    case 168: case 169: case 170: case 171:\n      c = longJumpIfTrue_literal_index(bcp); break;\n    case 172: case 173: case 174: case 175:\n      c = longJumpIfFalse_literal_index(bcp); break;\n\n      // sendArithmeticSelector\n    case 176: c = bytecodePrimAdd_literal_index(bcp); break;\n    case 177: c = bytecodePrimSubtract_literal_index(bcp); break;\n    case 178: c = bytecodePrimLessThan_literal_index(bcp); break;\n    case 179: c = bytecodePrimGreaterThan_literal_index(bcp); break;\n    case 180: c = bytecodePrimLessOrEqual_literal_index(bcp); break;\n    case 181: c = bytecodePrimGreaterOrEqual_literal_index(bcp); break;\n    case 182: c = bytecodePrimEqual_literal_index(bcp); break;\n    case 183: c = bytecodePrimNotEqual_literal_index(bcp); break;\n    case 184: c = bytecodePrimMultiply_literal_index(bcp); break;\n    case 185: c = bytecodePrimDivide_literal_index(bcp); break;\n    case 186: c = bytecodePrimMod_literal_index(bcp); break;\n    case 187: c = bytecodePrimMakePoint_literal_index(bcp); break;\n    case 188: c = bytecodePrimBitShift_literal_index(bcp); break;\n    case 189: c = bytecodePrimDiv_literal_index(bcp); break;\n    case 190: c = bytecodePrimBitAnd_literal_index(bcp); break;\n    case 191: c = bytecodePrimBitOr_literal_index(bcp); break;\n\n      // sendCommonSelector\n    case 192: c = bytecodePrimAt_literal_index(bcp); break;\n    case 193: c = bytecodePrimAtPut_literal_index(bcp); break;\n    case 194: c = bytecodePrimSize_literal_index(bcp); break;\n    case 195: c = bytecodePrimNext_literal_index(bcp); break;\n    case 196: c = bytecodePrimNextPut_literal_index(bcp); break;\n    case 197: c = bytecodePrimAtEnd_literal_index(bcp); break;\n    case 198: c = bytecodePrimEquivalent_literal_index(bcp); break;\n    case 199: c = bytecodePrimClass_literal_index(bcp); break;\n    case 200: c = bytecodePrimBlockCopy_literal_index(bcp); break;\n    case 201: c = bytecodePrimValue_literal_index(bcp); break;\n    case 202: c = bytecodePrimValueWithArg_literal_index(bcp); break;\n    case 203: c = bytecodePrimDo_literal_index(bcp); break;\n    case 204: c = bytecodePrimNew_literal_index(bcp); break;\n    case 205: c = bytecodePrimNewWithArg_literal_index(bcp); break;\n    case 206: c = bytecodePrimPointX_literal_index(bcp); break;\n    case 207: c = bytecodePrimPointY_literal_index(bcp); break;\n\n    case 208: case 209:\n    case 210: case 211: case 212: case 213: case 214: case 215: case 216: case 217: case 218: case 219:\n    case 220: case 221: case 222: case 223: case 224: case 225: case 226: case 227: case 228: case 229:\n    case 230: case 231: case 232: case 233: case 234: case 235: case 236: case 237: case 238: case 239:\n    case 240: case 241: case 242: case 243: case 244: case 245: case 246: case 247: case 248: case 249:\n    case 250: case 251: case 252: case 253: case 254: case 255:\n      c = sendLiteralSelectorBytecode_literal_index(bcp); break;\n  }\n  return c;\n}\n\n\n\n\n\n\n\n\nvoid Squeak_Interpreter::findNewMethodInClass(Oop klass) {\n  /*\n   \"Find the compiled method to be run when the current\n   roots.messageSelector is sent to the given class, setting the values\n   of 'roots.newMethod' and 'primitiveIndex'.\n   */\n  if (check_many_assertions) klass.verify_oop();\n\n  if (!lookupInMethodCacheSel(roots.messageSelector, klass)) {\n    // \"entry was not found in the cache; look it up the hard way\"\n    lookupMethodInClass(klass);\n    roots.lkupClass = klass;\n    addNewMethodToCache();\n  }\n}\n\n\n\nOop Squeak_Interpreter::lookupMethodInClass(Oop lkupClass) {\n  assert(safepoint_ability->is_able()); // need to be able to allocate message object without deadlock\n  Object_p currentClass_obj = (Object_p)NULL;\n  for (  Oop currentClass = lkupClass;\n         currentClass != roots.nilObj;\n       currentClass = currentClass_obj->superclass()) {\n\n    assert(currentClass.verify_oop());\n    currentClass_obj = currentClass.as_object();\n    Oop dictionary = currentClass_obj->fetchPointer(Object_Indices::MessageDictionaryIndex);\n    if (dictionary == roots.nilObj) {\n      // \"MethodDict pointer is nil (hopefully due a swapped out stub) -- raise exception #cannotInterpret:.\"\n      pushRemappableOop(currentClass); // GC\n      createActualMessageTo(lkupClass);\n      currentClass_obj = popRemappableOop().as_object();\n      roots.messageSelector = splObj(Special_Indices::SelectorCannotInterpret);\n      return lookupMethodInClass(currentClass_obj->superclass());\n    }\n    if (lookupMethodInDictionary(dictionary)) {\n      return roots.methodClass = currentClass;\n    }\n  }\n  // Could not find #doesNotUnderstand: -- fatal error\n  if ( roots.messageSelector == splObj(Special_Indices::SelectorDoesNotUnderstand)) {\n\n    error_printer->printf(\"Recursive doesNotUnderstand receiver: \");\n    roots.receiver.print(error_printer);\n    error_printer->printf(\"  Lookup class: \");\n    roots.lkupClass.print(error_printer);\n    error_printer->printf(\"  Selector: \");\n    roots.dnuSelector.print(error_printer);\n    error_printer->printf(\"\\n\");\n\n    fatal(\"Recursive not understood error encountered\");\n  }\n\n  // send doesNotUnderstand\n\n  if ( !roots.messageSelector.as_object()->equals_string(\"paragraph\")\n    && !roots.messageSelector.as_object()->equals_string(\"gradientWindowLook\")\n    && !roots.messageSelector.as_object()->equals_string(\"uniformWindowColors\")\n    && !roots.messageSelector.as_object()->equals_string(\"externalServerDefsOnly\")) {// xxx_dmu\n\n    const int enough_already = 7;\n    if (dnu_kvetch_count() < enough_already) {\n      print_time();\n      dittoing_stdout_printer->printf(\"%d: sending doesNotUnderstand: \", my_rank());\n      roots.messageSelector.print(dittoing_stdout_printer);\n      dittoing_stdout_printer->printf(\" for object of \");\n      currentClass_obj->className().as_object()->print_bytes(dittoing_stdout_printer);\n      dittoing_stdout_printer->nl(); // xxx_dmu\n      set_dnu_kvetch_count(dnu_kvetch_count() + 1);\n      if (dnu_kvetch_count() >= enough_already) lprintf(\"Enough already! No more kvetching!\");\n      // breakpoint();\n    }\n    roots.dnuSelector = roots.messageSelector;\n    if (check_assertions && !roots.messageSelector.isBytes()) {\n      lprintf(\"sel not bytes\\n\");\n      fatal(\"Message selector not isBytes\");\n    }\n\n  } // xxx_dmu\n  pushRemappableOop(lkupClass);\n  createActualMessageTo(lkupClass);\n  roots.messageSelector = splObj(Special_Indices::SelectorDoesNotUnderstand);\n  return lookupMethodInClass(popRemappableOop());\n}\n\n#if Extra_Preheader_Word_Experiment\nOop Squeak_Interpreter::modify_send_for_preheader_word(Oop rcvr) {\n  {\n    Safepoint_Ability sa(true);\n    pushRemappableOop(rcvr);\n    createActualMessageTo(rcvr);\n    rcvr = popRemappableOop();      \n  }\n  \n  roots.messageSelector =  roots.extra_preheader_word_selector;\n\n  Oop new_rcvr = Oop::from_bits(rcvr.as_object()->get_extra_preheader_word());\n  DEBUG_STORE_CHECK(&stackPointer()[-get_argumentCount()], new_rcvr);\n  stackPointer()[-get_argumentCount()] = new_rcvr;\n  \n  return new_rcvr;\n}\n#endif\n\n\n\nbool Squeak_Interpreter::balancedStackAfterPrimitive(int delta, int primIdx, int nArgs, Oop pre_prim_active_context) {\n  // Return true if the stack is still balanced after executing primitive\n  // primIndex with nArgs args. Delta is 'stackPointer - activeContext' which\n  // is a relative measure for the stack pointer\n  // (so we don't have to relocate it during the primitive)\n  if (!process_is_scheduled_and_executing())\n    return true; // prim put last executing process to sleep\n  \n  if (activeContext() != pre_prim_active_context)\n    return true; // prim changed process or context\n  \n  switch (primIdx) {\n    default: break;\n    case 81: case 82: case 83: case 84: case 85: case 86: case 87: case 88:\n    case 167: case 188: case 189: case 205: case 206: case 221: case 222:\n      return true;  // control prims that may unbal the stack\n  }\n  if (successFlag) {\n    // must have nArgs popped off\n    if  ( stackPointer() - activeContext_obj()->as_oop_p() + nArgs ==  delta ) return true;\n    lprintf(\"balancedStackAfterPrimitive failed: stackPointer 0x%x, activeContext_obj() 0x%x, nArgs %d, delta %d\\n\",\n            _stackPointer, (Object*)activeContext_obj(), nArgs, delta);\n    return false;\n  }\n  // failed prim leaves stack intact\n  return stackPointer() - activeContext_obj()->as_oop_p() == delta;\n};\n\nvoid Squeak_Interpreter::printUnbalancedStack(int primIdx, fn_t fn) {\n  lprintf(\"printUnbalancedStack primitive: %d 0x%x\\n\", primIdx, fn);\n  print_stack_trace(dittoing_stdout_printer);\n  unimplemented();\n}\n\n\n\n\n\nOop* Squeak_Interpreter::initialize_context(Object_p nco, oop_int_t methodHeader) const {\n  int tempCount = Object::temporaryCountOfHeader(methodHeader);\n  \n  Oop* where = nco->as_oop_p() + Object::BaseHeaderSize/sizeof(oop_int_t);\n  \n  DEBUG_STORE_CHECK(&where[Object_Indices::SenderIndex], activeContext());\n  where[Object_Indices::SenderIndex] = activeContext();\n  \n  Oop initialIP = Oop::from_int(((Object_Indices::LiteralStart + Object::literalCountOfHeader(methodHeader)) * bytesPerWord) + 1);\n  DEBUG_STORE_CHECK(&where[Object_Indices::InstructionPointerIndex], initialIP);\n  where[Object_Indices::InstructionPointerIndex] = initialIP;\n  \n  DEBUG_STORE_CHECK(&where[Object_Indices::StackPointerIndex], Oop::from_int(tempCount));\n  where[Object_Indices::StackPointerIndex] = Oop::from_int(tempCount);\n  \n  DEBUG_STORE_CHECK(&where[Object_Indices::MethodIndex], roots.newMethod);  \n  where[Object_Indices::MethodIndex] = roots.newMethod;\n  \n# if Include_Closure_Support\n  DEBUG_STORE_CHECK(&where[Object_Indices::ClosureIndex], roots.nilObj);  \n  where[Object_Indices::ClosureIndex] = roots.nilObj;\n# endif\n  \n  return where;\n}\n\n\nvoid Squeak_Interpreter::clear_temps_in_context(Oop* const content_part_of_ctx, int argCnt, int tmpCnt) const {\n  // clear remaining temps to nil, in case it has been recycled\n  Oop nnil = roots.nilObj;\n  for (int i = argCnt + 1 + Object_Indices::ReceiverIndex;\n       i <=  tmpCnt + Object_Indices::ReceiverIndex;\n       ++i) {\n    DEBUG_STORE_CHECK(&content_part_of_ctx[i], nnil);\n    content_part_of_ctx[i] = nnil;\n  }\n}\n\n\nvoid Squeak_Interpreter::copy_args_into_context(Oop* const content_part_of_ctx, int argCnt) const {\n  for (int i = 0;  i <= argCnt;  ++i) {\n    DEBUG_STORE_CHECK( &content_part_of_ctx[Object_Indices::ReceiverIndex + i], stackValue(argCnt - i));\n    content_part_of_ctx[Object_Indices::ReceiverIndex + i] = stackValue(argCnt - i);\n  }\n}\n\n\nvoid Squeak_Interpreter::activateNewMethod() {\n  oop_int_t methodHeader = newMethod_obj()->methodHeader();\n  int       tempCount = Object::temporaryCountOfHeader(methodHeader);\n  int       argCount  = get_argumentCount();\n  \n  Object_p nco = allocateOrRecycleContext(methodHeader & Object::LargeContextBit);\n\n  if (check_many_assertions\n      && nco->get_count_of_blocks_homed_to_this_method_ctx() > 0  &&  nco->fetchPointer(Object_Indices::MethodIndex) != roots.newMethod)\n    lprintf(\"ext act changing method from 0x%x to 0x%x in 0x%x, home_flag %d\\n\",\n            nco->fetchPointer(Object_Indices::MethodIndex).bits(),\n            roots.newMethod.bits(),\n            nco->as_oop().bits(),\n            nco->get_count_of_blocks_homed_to_this_method_ctx());\n  Oop newContext = nco->as_oop();\n\n  Oop* const content_part_of_ctx = initialize_context(nco, methodHeader);\n  copy_args_into_context(content_part_of_ctx, argCount);\n  clear_temps_in_context(content_part_of_ctx, argCount, tempCount);\n\n  pop(get_argumentCount() + 1);\n  reclaimableContextCount += 1;\n  newActiveContext(newContext, nco);\n}\n\n# if Include_Closure_Support\n\nvoid Squeak_Interpreter::activateNewClosureMethod(Object_p blockClosure_obj, Object_p argumentArray_obj_or_null) {\n  assert(blockClosure_obj->verify());\n  Oop outerContext = blockClosure_obj->fetchPointer(Object_Indices::ClosureOuterContextIndex);\n  Object_p outerContext_obj = outerContext.as_object();\n  \n  Oop closureMethod = outerContext_obj->fetchPointer(Object_Indices::MethodIndex);\n  Object_p closureMethod_obj = closureMethod.as_object();\n  oop_int_t methodHeader = closureMethod_obj->methodHeader();\n  \n  pushRemappableOop(blockClosure_obj->as_oop());\n  Object_p newContext_obj = allocateOrRecycleContext(methodHeader & Object::LargeContextBit); \n  Oop newContext = newContext_obj->as_oop(); \n  Oop blockClosure = popRemappableOop();\n  blockClosure_obj = blockClosure.as_object();\n  outerContext = blockClosure_obj->fetchPointer(Object_Indices::ClosureOuterContextIndex);\n  outerContext_obj = outerContext.as_object();\n  // Throughout RVM, when implementing standard Squeak VM code, we pretend that GC can alter Oops,\n  // but in RVM it can only alter Object*'s, and I bet some of my code makes that assumption. -- dmu 6/10\n  \n  int numCopied = blockClosure_obj->fetchWordLength() - Object_Indices::ClosureFirstCopiedValueIndex; // should be 0 for nil\n  \n  // Assume newContext will be recorded as a root if necessary by the call to newActiveContext below, so use unchecked stores\n  Oop* where = newContext_obj->as_oop_p() + Object::BaseHeaderSize/sizeof(Oop);\n  \n  DEBUG_STORE_CHECK( &where[Object_Indices::SenderIndex], activeContext());\n  where[Object_Indices::SenderIndex] = activeContext();\n\n  DEBUG_STORE_CHECK( &where[Object_Indices::InstructionPointerIndex], blockClosure_obj->fetchPointer(Object_Indices::ClosureStartPCIndex));\n  where[Object_Indices::InstructionPointerIndex] = blockClosure_obj->fetchPointer(Object_Indices::ClosureStartPCIndex);\n\n  DEBUG_STORE_CHECK( &where[Object_Indices::StackPointerIndex], Oop::from_int(get_argumentCount() + numCopied));\n  where[Object_Indices::StackPointerIndex] = Oop::from_int(get_argumentCount() + numCopied);\n\n  DEBUG_STORE_CHECK( &where[Object_Indices::MethodIndex], outerContext_obj->fetchPointer(Object_Indices::MethodIndex));\n  where[Object_Indices::MethodIndex] = outerContext_obj->fetchPointer(Object_Indices::MethodIndex);\n\n  DEBUG_STORE_CHECK( &where[Object_Indices::ClosureIndex], blockClosure);\n  where[Object_Indices::ClosureIndex] = blockClosure;\n\n  DEBUG_STORE_CHECK( &where[Object_Indices::ReceiverIndex], outerContext_obj->fetchPointer(Object_Indices::ReceiverIndex));\n  where[Object_Indices::ReceiverIndex] = outerContext_obj->fetchPointer(Object_Indices::ReceiverIndex);\n  \n  if (argumentArray_obj_or_null == NULL ) {\n      // copy args\n    for (int i = 1;  i <= get_argumentCount();  ++i) {\n        DEBUG_STORE_CHECK( &where[Object_Indices::ReceiverIndex + i], stackValue(get_argumentCount() - i));\n        where[Object_Indices::ReceiverIndex + i] = stackValue(get_argumentCount() - i);\n    }\n  }\n  else\n    transferFromIndexOfObjectToIndexOfObject(argumentArray_obj_or_null->fetchWordLength(),\n                                             0,\n                                             argumentArray_obj_or_null,\n                                             Object_Indices::TempFrameStart,\n                                             newContext_obj);\n  \n  where = newContext_obj->as_oop_p() + Object::BaseHeaderSize/sizeof(Oop) + (Object_Indices::ReceiverIndex + 1 + get_argumentCount());\n  for (int i = 0;  i < numCopied;  ++i )  {\n    DEBUG_STORE_CHECK( &where[i], blockClosure_obj->fetchPointer(i + Object_Indices::ClosureFirstCopiedValueIndex));\n    where[i] = blockClosure_obj->fetchPointer(i + Object_Indices::ClosureFirstCopiedValueIndex);\n  }\n  \n  pop(get_argumentCount() + 1);\n  newActiveContext(newContext, newContext_obj);\n}\n\n# endif\n\n\nvoid Squeak_Interpreter::signalSemaphoreWithIndex(int index) {\n  if (index < 0) return;\n  \n  oop_int_t& count = semaphoresUseBufferA() ? _semaphoresToSignalCountA : _semaphoresToSignalCountB;\n  oop_int_t* semas = semaphoresUseBufferA() ? _semaphoresToSignalA : _semaphoresToSignalB;\n\n  if (count < SemaphoresToSignalSize)\n    semas[++count] = index;\n\n  broadcast_int32(&count);\n  broadcast_int32(&semas[count]);\n\n  forceInterruptCheck();\n}\n\n\nvoid Squeak_Interpreter::checkForInterrupts(bool is_safe_to_process_events) {\n  if (   doing_primitiveClosureValueNoContextSwitch\n      || suppress_context_switching())\n    return;\n  static bool last_use_cpu_ms = use_cpu_ms();\n  bool use_cpu_ms_changed = last_use_cpu_ms != use_cpu_ms();\n  last_use_cpu_ms = use_cpu_ms();\n\n  multicore_interrupt_check = true;\n  Safepoint_Ability sa(true);\n  \n  // Mask so same wrapping as primitiveMillisecondClock\n  check_method_is_correct(true, \"start of checkForInterrupts\");\n  ++interruptCheckCount;\n  int now = ioWhicheverMSecs() & MillisecondClockMask;\n  if (!interruptCheckForced()  &&  !use_cpu_ms_changed) {\n    ++unforcedInterruptCheckCount;\n    // \"don't play with the feedback if we forced a check. It only makes life difficult\"\n    if (now - lastTick()  <  interruptChecksEveryNms)  {\n      /*\n       \"wrapping is not a concern, it'll get caught quickly\n       enough. This clause is trying to keep a reasonable\n       guess of how many times per \tinterruptChecksEveryNms we are calling\n       quickCheckForInterrupts. Not sure how effective it really is.\"\n       */\n      set_interruptCheckCounterFeedBackReset(interruptCheckCounterFeedBackReset() + 10);\n    }\n    else if (interruptCheckCounterFeedBackReset() <= 1000) {\n      set_interruptCheckCounterFeedBackReset(1000);\n    }\n    else {\n      // too slow to recover: set_interruptCheckCounterFeedBackReset(interruptCheckCounterFeedBackReset() - 12);\n      set_interruptCheckCounterFeedBackReset(interruptCheckCounterFeedBackReset() / 2);\n    }\n  }\n\n  // \"reset the interrupt check counter\"\n  interruptCheckCounter = interruptCheckCounterFeedBackReset();\n\n  The_Memory_System()->handle_low_space_signals();\n\n  if (now < lastTick() ||  use_cpu_ms_changed) {\n    // ms clock wrapped so correct the nextPollTick\n    set_nextPollTick(nextPollTick() - MillisecondClockMask - 1);\n  }\n  if (now >= nextPollTick()  &&  is_safe_to_process_events) {\n    bool s = successFlag; successFlag = true;\n    The_Interactions.run_primitive(Logical_Core::main_rank, (fn_t)ioProcessEvents_wrapper);\n    successFlag = s;\n    // sets interruptPending if interrupt key pressed\n    set_nextPollTick(now + 200);\n    /*\n     msecs to wait before next call to ioProcessEvents.\n     Note that strictly speaking we might need to update\n    'now' at this point since ioProcessEvents could take a\n     very long time on some platforms\"\n     */\n  }\n  if (interruptPending()) {\n    set_interruptPending(false);\n    signalSema(Special_Indices::TheInterruptSemaphore, \"checkForInterrupts 649\");\n  }\n  if (nextWakeupTick() != 0) {\n    if (now < lastTick()) {\n      /*\n       \"the clock has wrapped. Subtract the wrap\n       interval from nextWakeupTick - this might just\n       possibly result in 0. Since this is used as a flag\n       value for 'no timer' we do the 0 check above\"\n       */\n      // lprintf(\"WRAPPED now %d, lastTick %d, nextWakeupTick %d, new nextWakeupTick %d\\n\",\n      //   now, lastTick(), nextWakeupTick(), nextWakeupTick() - MillisecondClockMask - 1);\n      set_nextWakeupTick(nextWakeupTick() - MillisecondClockMask - 1);\n    }\n    if (now >= nextWakeupTick()) {\n      set_nextWakeupTick(0);\n      // set timer interrupt to 0 for no timer\n      // lprintf(\"signalling next\\n\");\n      signalSema(Special_Indices::TheTimerSemaphore, \"checkForInterrupts 664\");\n    }\n  }\n\n  // signal any pending finalizations\n  if (pendingFinalizationSignals() > 0) {\n    Safepoint_Ability sa(false);\n\n    Oop sema = splObj(Special_Indices::TheFinalizationSemaphore);\n    if (sema.fetchClass() == splObj(Special_Indices::ClassSemaphore)) {\n      sema.as_object()->synchronousSignal(\"checkForInterrupts 674\");\n    }\n    set_pendingFinalizationSignals(0);\n  }\n\n  // signal all semas in semasToSignal\n  if (semaphoresToSignalCountA() > 0  ||  semaphoresToSignalCountB() > 0) {\n    signalExternalSemaphores(\"checkForInter 678\");\n  }\n\n  set_lastTick(now);\n  check_method_is_correct(true, \"end of checkForInterrupts\");\n}\n\n\nvoid Squeak_Interpreter::createActualMessageTo(Oop aClass) {\n  /*\n  \"Bundle up the selector, arguments and lookupClass into a Message object.\n\tIn the process it pops the arguments off the stack, and pushes the message object.\n\tThis can then be presented as the argument of e.g. #doesNotUnderstand:.\n\tikp 11/20/1999 03:59 -- added hook for external runtime compilers.\"\n   */\n\t// | argumentArray message lookupClass |\n  pushRemappableOop(aClass);\n  Object_p argumentArray_obj = splObj_obj(Special_Indices::ClassArray)->instantiateClass(get_argumentCount());\n\tOop argumentArray = argumentArray_obj->as_oop();\n  // \"remap argumentArray in case GC happens during allocation\"\n\tpushRemappableOop(argumentArray);\n\tObject_p message_obj = splObj_obj(Special_Indices::ClassMessage)->instantiateClass(0);\n  Oop message = message_obj->as_oop();\n\targumentArray = popRemappableOop(); argumentArray_obj = argumentArray.as_object();\n\tOop lookupClass = popRemappableOop();\n  oopcpy_no_store_check(argumentArray_obj->as_oop_p() + sizeof(argumentArray_obj->baseHeader)/sizeof(Oop),\n         stackPointer() - (get_argumentCount() - 1),\n         get_argumentCount(),\n         argumentArray_obj);\n\targumentArray_obj->beRootIfOld();\n  popThenPush(get_argumentCount(), message);\n\tset_argumentCount(1);\n  message_obj->storePointer(Object_Indices::MessageSelectorIndex,  roots.messageSelector);\n  message_obj->storePointer(Object_Indices::MessageArgumentsIndex, argumentArray);\n\n  // \"Only store lookupClass if message has 3 fields (old images don't)\"\n  if (message_obj->lastPointer()\n      >=  (int)(Object_Indices::MessageLookupClassIndex * sizeof(Oop) + sizeof(message_obj->baseHeader)))\n    message_obj->storePointer(Object_Indices::MessageLookupClassIndex, lookupClass);\n}\n\n\n\nvoid Squeak_Interpreter::transfer_to_highest_priority(const char* why) {\n  Scheduler_Mutex sm(\"transfer_to_highest_priority\");  // protect selection and xfer\n  if (Print_Scheduler_Verbose) {\n    debug_printer->printf(\"on %d: about to transfer_to_highest_priority %s: \", my_rank(), why);\n    print_process_lists(debug_printer);\n    debug_printer->nl();\n  }\n  Oop newProc = find_and_move_to_end_highest_priority_non_running_process();\n  if (newProc == roots.nilObj)\n    return;\n\n  if (check_many_assertions)  assert(!newProc.as_object()->is_process_running());\n\n  if (Print_Scheduler) {\n    debug_printer->printf(\"on %d: in transfer_to_highest_priority %s: \", my_rank(), why);\n    if (Print_Scheduler_Verbose) print_process_lists(debug_printer);\n    debug_printer->printf(\"  found:  \");\n    newProc.print_process_or_nil(debug_printer);\n    debug_printer->nl();\n  }\n  transferTo(newProc, why);\n}\n\n\nvoid Squeak_Interpreter::resume(Oop aProcess, const char* why) {\n  /* I just found a tough bug:\n     Resume is called, and it asked all the other cores to do a yield.\n     The problem is that if a core is in the midst of a remote prim call back to main,\n     its interpreter does not have its running_process set, nor can its state be altered.\n     Thus to fix this I either need to safepoint or to add a flag to request the yield.\n   -- dmu 10/30/08\n   */\n  if (Print_Scheduler_Verbose) {\n    debug_printer->printf(\"on %d: resume: \", my_rank());\n    aProcess.print_process_or_nil(debug_printer);\n    debug_printer->printf(\" because %s\\n\", why);\n    if (Print_Scheduler_Verbose) print_process_lists(debug_printer);\n  }\n\n  {\n    Scheduler_Mutex sm(\"resume\");\n    Object_p aProcess_obj = aProcess.as_object();\n    assert(aProcess_obj->my_list_of_process() == roots.nilObj);\n    aProcess_obj->add_process_to_scheduler_list();\n  }\n  assert(!Scheduler_Mutex::is_held());\n\n  if (Print_Scheduler_Verbose) {\n    debug_printer->printf(\"on %d: mid-resume:\\n\", my_rank());\n    if (Print_Scheduler_Verbose) print_process_lists(debug_printer);\n  }\n  set_yield_requested(true);\n  if (Print_Scheduler_Verbose) {\n    debug_printer->printf(\"on %d: post-resume:\\n\", my_rank());\n    if (Print_Scheduler_Verbose) print_process_lists(debug_printer);\n  }\n}\n\n\nvoid Squeak_Interpreter::signalExternalSemaphores(const char* why) {\n  Safepoint_Ability sa(false);\n\n  set_semaphoresUseBufferA(!semaphoresUseBufferA());\n\n  Object_p xArray = splObj_obj(Special_Indices::ExternalObjectsArray);\n  oop_int_t xSize = xArray->stSize();\n  if (semaphoresUseBufferA()) {\n    // use other buffer during read\n    for (int i = 1;  i <= semaphoresToSignalCountB();  ++i) {\n      int index = _semaphoresToSignalB[i];\n      if (1 <= index  &&  index <= xSize) {\n        Oop sema = xArray->fetchPointer(index - 1);\n        // sema indices 1-based\n        if (sema.fetchClass() == splObj(Special_Indices::ClassSemaphore)) {\n          sema.as_object()->synchronousSignal(why);\n        }\n      }\n    }\n    set_semaphoresToSignalCountB(0);\n  }\n  else {\n    // use other buffer during read\n    for (int i = 1;  i <= semaphoresToSignalCountA();  ++i) {\n      int index = _semaphoresToSignalA[i];\n      if (1 <= index  &&  index <= xSize) {\n        Oop sema = xArray->fetchPointer(index - 1);\n        // sema indices 1-based\n        if (sema.fetchClass() == splObj(Special_Indices::ClassSemaphore))\n          sema.as_object()->synchronousSignal(why);\n      }\n    }\n    set_semaphoresToSignalCountA(0);\n  }\n}\n\n\nvoid Squeak_Interpreter::put_running_process_to_sleep(const char* why) {\n  Scheduler_Mutex sm(\"put_running_process_to_sleep\"); // am changing a process's state\n  Oop aProcess = get_running_process();\n  if (aProcess == roots.nilObj) {\n    return;\n  }\n  if (Print_Scheduler_Verbose) {\n    debug_printer->printf(\"scheduler: on %d, put_running_process_to_sleep: \", my_rank());\n    aProcess.print_process_or_nil(debug_printer);\n    debug_printer->printf(\", %s\\n\", why);\n  }\n\n  assert(activeContext() != roots.nilObj);\n  assert_eq(activeContext_obj(), (void*)activeContext().as_object(), \"active context is messed up\");\n  if (Check_Prefetch)  assert_always(have_executed_currentBytecode);\n  storeContextRegisters(activeContext_obj()); // xxxxxx redundant maybe with newActiveContext call in start_running\n  aProcess.as_object()->set_suspended_context_of_process(activeContext());\n  unset_running_process();\n  if (Print_Scheduler_Verbose) {\n    debug_printer->printf(\"scheduler: on %d, AFTER put_running_process_to_sleep: \", my_rank());\n    aProcess.print_process_or_nil(debug_printer);\n    debug_printer->nl();\n    print_process_lists(debug_printer);\n  }\n}\n\n\nvoid Squeak_Interpreter::yield(const char* why) {\n  if (Print_Scheduler_Verbose) {\n    debug_printer->printf(\"scheduler on %d: pre yield because %s \", my_rank(), why);\n    get_running_process().as_object()->print_process_or_nil(debug_printer);\n    debug_printer->nl();\n    if (Print_Scheduler_Verbose) print_stack_trace(dittoing_stdout_printer);\n  }\n  assert(get_running_process() == roots.nilObj  ||  activeContext() != roots.nilObj );\n  put_running_process_to_sleep(why);\n  transfer_to_highest_priority(why);\n  if (Check_Prefetch && process_is_scheduled_and_executing()) assert_always(have_executed_currentBytecode);\n  if (Print_Scheduler_Verbose) {\n    debug_printer->printf(\"scheduler on %d: post yield because %s \", my_rank(), why);\n    get_running_process().as_object()->print_process_or_nil(debug_printer);\n    debug_printer->nl();\n    print_stack_trace(dittoing_stdout_printer);\n  }\n}\n\n\n\nOop Squeak_Interpreter::get_running_process() {\n  return roots.running_process_or_nil;\n}\nvoid Squeak_Interpreter::set_running_process(Oop proc, const char* why) {\n  if (Print_Scheduler_Verbose) {\n    debug_printer->printf( \"scheduler: on %d: set_running_process: \", my_rank());\n    proc.print_process_or_nil(debug_printer);\n    debug_printer->printf(\", %s prim: 0x%x\\n\", why, Message_Statics::remote_prim_fn);\n  }\n\n  roots.running_process_or_nil = proc;\n  if (Track_Processes)\n    running_process_by_core[my_rank()] = proc;\n  schedulerPointer_obj()->storePointer(Object_Indices::ActiveProcessIndex, proc);\n  multicore_interrupt_check = true;\n}\n\n\n\n\noop_int_t Squeak_Interpreter::doPrimitiveDiv(Oop rcvr, Oop arg) {\n  // rounds neg results towards neg inf, not 0\n  oop_int_t ir, ia;\n  if (areIntegers(rcvr, arg)) {\n    ir = rcvr.integerValue();\n    ia =  arg.integerValue();\n    success(ia != 0);\n  }\n  else\n    primitiveFail();\n  if (!successFlag)\n    return 1.0;\n  oop_int_t result;\n  if (ir > 0) {\n    if (ia > 0)\n      result = ir / ia;\n    else {\n      //round neg res -> neg inf\n      oop_int_t posArg = -ia;\n      result = -( (ir + (posArg - 1)) / posArg);\n    }\n  }\n  else {\n    oop_int_t posRcvr = -ir;\n    if (ia > 0)\n      result = -( (posRcvr + (ia - 1)) / ia );\n    else {\n      oop_int_t posArg = -ia;\n      result = posRcvr / posArg;\n    }\n  }\n  success( Oop::isIntegerValue(result));\n  return result;\n}\n\noop_int_t Squeak_Interpreter::doPrimitiveMod(Oop rcvr, Oop arg) {\n  oop_int_t ir, ia;\n  if (areIntegers(rcvr, arg)) {\n    ir = rcvr.integerValue();\n    ia =  arg.integerValue();\n    success(ia != 0);\n  }\n  else\n    primitiveFail();\n  if (!successFlag)\n    return 1;\n  oop_int_t result = ir % ia;\n  // ensure result same sign as arg\n  // add in arg if one neg, other pos\n  result += ia < 0  ?  (result > 0  ?  ia  :  0)\n                    :  (result < 0  ?  ia  :  0);\n  success( Oop::isIntegerValue(result));\n  return result;\n}\n\n\nint32 Squeak_Interpreter::positive32BitValueOf(Oop x) {\n  if (x.is_int()) {\n    int v = x.integerValue();\n    if (v < 0) {\n      primitiveFail();\n      return 0;\n    }\n    return v;\n  }\n  Object_p xo = x.as_object();\n  assertClass(x, splObj(Special_Indices::ClassLargePositiveInteger));\n  if (!successFlag)\n    return 0;\n\n  int sz = xo->lengthOf();\n  if (sz != sizeof(int32)) {\n    primitiveFail();\n    return 0;\n  }\n  return (int32)xo->fetchByte(0) + ((int32)xo->fetchByte(1) << 8) + ((int32)xo->fetchByte(2) << 16) + ((int32)xo->fetchByte(3) << 24);\n}\n\nint32 Squeak_Interpreter::signed32BitValueOf(Oop x) {\n  if (x.is_int()) return x.integerValue();\n  Object_p xo = x.as_object();\n  Oop largeClass = xo->fetchClass();\n  bool neg =\n    largeClass == splObj(Special_Indices::ClassLargePositiveInteger)  ?  false :\n    largeClass == splObj(Special_Indices::ClassLargeNegativeInteger) ?  true  :\n     (primitiveFail(), false);\n  if (!successFlag) return 0;\n  oop_int_t sz = xo->lengthOf();\n  if (sz != sizeof(int32)) { primitiveFail(); return 0; }\n  int32 v = (int32)xo->fetchByte(0) + ((int32)xo->fetchByte(1) << 8) + ((int32)xo->fetchByte(2) << 16) + ((int32)xo->fetchByte(3) << 24);\n  return neg ? -v : v;\n}\n\n\nint64 Squeak_Interpreter::positive64BitValueOf(Oop x) {\n  if (x.is_int()) {\n    int v = x.integerValue();\n    if (v < 0) {\n      primitiveFail();\n      return 0;\n    }\n    return v;\n  }\n  Object_p xo = x.as_object();\n  assertClass(x, splObj(Special_Indices::ClassLargePositiveInteger));\n  if (!successFlag)\n    return 0;\n\n  u_int32 sz = xo->lengthOf();\n  if (sz > sizeof(int64)) {\n    primitiveFail();\n    return 0;\n  }\n  int64 v = 0;\n  for (u_int32 i = 0;  i < sz;  ++i)\n    v |= int64(xo->fetchByte(i)) << (i * 8);\n               return v;\n}\n\nint64 Squeak_Interpreter::signed64BitValueOf(Oop x) {\n  if (x.is_int()) return x.integerValue();\n  Object_p xo = x.as_object();\n  Oop largeClass = xo->fetchClass();\n  bool neg =\n    largeClass == splObj(Special_Indices::ClassLargePositiveInteger)  ?  false :\n    largeClass == splObj(Special_Indices::ClassLargeNegativeInteger) ?  true  :\n      (primitiveFail(), false);\n  if (!successFlag) return 0;\n  u_oop_int_t sz = xo->lengthOf();\n  if (sz > sizeof(int64)) { primitiveFail(); return 0; }\n  int64 v = 0;\n  for (u_int32 i = 0;  i < sz;  ++i)\n    v |= int64(xo->fetchByte(i)) << (i * 8);\n  return neg ? -v : v;\n}\n\n\nvoid Squeak_Interpreter::print_stack_trace(Printer* p, Object_p proc) {\n  if (proc == NULL) proc = get_running_process().as_object();\n  if (proc == roots.nilObj.as_object()) {\n    p->printf(\"on %d: cannot print stack; no running process\\n\", my_rank());\n    return;\n  }\n  Oop cntxt = proc->fetchPointer(Object_Indices::SuspendedContextIndex);\n  if (cntxt != roots.nilObj) ;\n  else if ((cntxt = activeContext()) != roots.nilObj) ;\n  else {\n    p->printf(\"on %d: cannot print stack, process 0x%x is running elsewhere\\n\", my_rank(), (Object*)proc);\n    return;\n  }\n  for (Oop c = cntxt;\n       c != roots.nilObj;\n       c = c.as_object()->fetchPointer(Object_Indices::SenderIndex)) {\n    if (c.bits() == 0) {\n      p->printf(\"context is zero\\n\");\n      break;\n    }\n    c.as_object()->print_frame(p);\n  }\n}\n\n\nuint32_t Squeak_Interpreter::count_stack_depth() {\n  Object_p proc = get_running_process().as_object();\n  if (proc == roots.nilObj.as_object())\n    return 0;\n\n  Oop cntxt = proc->fetchPointer(Object_Indices::SuspendedContextIndex);\n  if (cntxt != roots.nilObj) ;\n  else if ((cntxt = activeContext()) != roots.nilObj) ;\n  else\n    return 0;\n\n  \n  uint32_t stack_depth = 0;\n  for (Oop c = cntxt;\n       c != roots.nilObj;\n       c = c.as_object()->fetchPointer(Object_Indices::SenderIndex)) {\n    if (c.bits() == 0) {\n      break;\n    }\n    stack_depth++;\n  }\n  \n  return stack_depth;\n}\n\nvoid Squeak_Interpreter::print_all_stack_traces(Printer* pr) {\n  // print_all_processes_in_scheduler(pr, true);\n   print_all_processes_in_scheduler_or_on_a_list(pr, true);\n}\n\n\n\nvoid Squeak_Interpreter::print_process_lists(Printer* pr) {\n  print_all_processes_in_scheduler(pr, false);\n}\n\nvoid Squeak_Interpreter::print_all_instances_of_class_process(Printer* pr, bool print_stacks) {\n  Oop cls = splObj(Special_Indices::ClassProcess);\n  for ( Oop instance  = The_Memory_System()->initialInstanceOf(cls);\n            instance != roots.nilObj;\n            instance  = The_Memory_System()->nextInstanceAfter(instance) ) {\n    \n    instance.as_object()->print_process_or_nil(pr, print_stacks);\n    pr->nl();\n  }\n}\n                                                              \n\nvoid Squeak_Interpreter::print_all_processes_in_scheduler_or_on_a_list(Printer* pr, bool print_stacks) {\n  Oop cls = splObj(Special_Indices::ClassProcess);\n  for ( Oop instance  = The_Memory_System()->initialInstanceOf(cls);\n       instance != roots.nilObj;\n       instance  = The_Memory_System()->nextInstanceAfter(instance) ) {\n    if (   instance.as_object()->my_list_of_process() != roots.nilObj\n        || is_process_on_a_scheduler_list(instance)) {\n      instance.as_object()->print_process_or_nil(pr, print_stacks);\n      pr->nl();\n    }\n  }\n}\n  \n  \nbool Squeak_Interpreter::is_process_on_a_scheduler_list(Oop proc) {\n  Object_p po = proc.as_object();\n  FOR_EACH_READY_PROCESS_LIST(slo, p, processList, this) {\n    for ( Object_p ll = processList->fetchPointer(Object_Indices::FirstLinkIndex).as_object();\n         ll != roots.nilObj.as_object();\n         ll = ll->fetchPointer(Object_Indices::NextLinkIndex).as_object()) {\n      if (ll == po)\n        return true;\n    }\n  }\n  return false;\n}\n  \nbool Squeak_Interpreter::verify_all_processes_in_scheduler() {\n  bool ok = true;\n  FOR_EACH_READY_PROCESS_LIST(slo, p, processList, this) {\n    for ( Object_p ll = processList->fetchPointer(Object_Indices::FirstLinkIndex).as_object();\n         ll != roots.nilObj.as_object();\n         ll = ll->fetchPointer(Object_Indices::NextLinkIndex).as_object()) {\n      ok = ok && ll->verify_process(); \n    }\n  }\n  return ok;\n}\n\n\nvoid Squeak_Interpreter::print_all_processes_in_scheduler(Printer* pr, bool print_stacks) {\n  pr->nl();\n  FOR_EACH_READY_PROCESS_LIST(slo, p, processList, this) {\n    for ( Object_p ll = processList->fetchPointer(Object_Indices::FirstLinkIndex).as_object();\n         ll != roots.nilObj.as_object();\n         ll = ll->fetchPointer(Object_Indices::NextLinkIndex).as_object()) {\n      ll->print_process_or_nil(pr, print_stacks); \n      if (!print_stacks) pr->nl();\n    }\n  }\n  pr->nl();\n  if (print_stacks) pr->nl();\n}\n\n\n\nvoid Squeak_Interpreter::commonAt(bool stringy) {\n  /*\n   \"This code is called if the receiver responds primitively to at:.\n   If this is so, it will be installed in the atCache so that subsequent calls of at:\n   or next may be handled immediately in bytecode primitive routines.\"\n   | index rcvr atIx result |\n   */\n  oop_int_t index = positive32BitValueOf(stackTop());\n  Oop rcvr = stackValue(1);\n  if (!successFlag || !rcvr.is_mem()) { primitiveFail(); return; }\n  Object_p ro = rcvr.as_object();\n  /*\n   \"NOTE:  The at-cache, since it is specific to the non-super response to #at:.\n   Therefore we must determine that the message is #at: (not, eg, #basicAt:),\n   and that the send is not a super-send, before using the at-cache.\"\n   */\n  if (roots.messageSelector == specialSelector(16) &&  roots.lkupClass == ro->fetchClass()) {\n    // look in the at cache\n    At_Cache::Entry* e = atCache.get_entry(rcvr, false);\n    if (!e->matches(rcvr)) {\n      e->install(rcvr, stringy);\n      Oop result;\n      if (successFlag) {\n        result = commonVariableAt(rcvr, index, e, false);\n         ro = rcvr.as_object(); // recover from GC\n      }\n      if (successFlag) {\n        popThenPush(get_argumentCount() + 1, result);\n        return;\n      }\n    }\n  }\n  successFlag = true;\n  Oop result = stObjectAt(ro, index);\n  if (successFlag) {\n    if (stringy)\n      result = characterForAscii(result.integerValue());\n    popThenPush(get_argumentCount() + 1, result);\n  }\n}\n\n\nvoid Squeak_Interpreter::commonAtPut(bool stringy) {\n  /*\n   \"This code is called if the receiver responds primitively to at:Put:.\n   If this is so, it will be installed in the atPutCache so that subsequent calls of at:\n   or  next may be handled immediately in bytecode primitive routines.\"\n   */\n  Oop value = stackTop();\n  oop_int_t index = positive32BitValueOf(stackValue(1));\n  Oop rcvr = stackValue(2);\n  if (!successFlag || !rcvr.is_mem()) {\n    primitiveFail();\n    return;\n  }\n  Object_p ro = rcvr.as_object();\n  if (roots.messageSelector == specialSelector(17)  &&  roots.lkupClass == ro->fetchClass()) {\n    At_Cache::Entry* e = atCache.get_entry(rcvr, true);\n    if (!e->matches(rcvr)) {\n      e->install(rcvr, stringy);\n    }\n    if (successFlag)\n      commonVariableAtPut(rcvr, index, value, e);\n    if (successFlag) {\n      popThenPush(get_argumentCount() + 1, value);\n      return;\n    }\n  }\n  successFlag = true;\n  if (stringy)\n    stObjectAtPut(ro, index, asciiOfCharacter(value));\n  else\n    stObjectAtPut(ro, index, value);\n  if (successFlag)\n    popThenPush(get_argumentCount() + 1, value);\n}\n\n\n\n\nvoid Squeak_Interpreter::changeClass(Oop rcvr, Oop argClass, bool /* defer */) {\n   /*\n   \"Change the class of the receiver into the class specified by the argument\n    given that the format of the receiver matches the format of the argument.\n    \n    Fail if receiver or argument are SmallIntegers, or the receiver is an\n    instance of a compact class and the argument isn't, or when the argument's\n    class is compact and the receiver isn't, or when the format of the receiver\n    is different from the format of the argument's class, or when the arguments\n    class is fixed and the receiver's size differs from the size that an\n    instance of the argument's class should have.\"\n   */\n  Object_p ro = rcvr.as_object();\n  oop_int_t classHdr = argClass.as_object()->formatOfClass();\n\n  // compute size of instances, for fixed field classes\n  oop_int_t sizeHiBits = (classHdr & 0x60000) >> 9;\n  classHdr &= 0x1ffff;\n  int byteSize = (classHdr & (Object::SizeMask | Object::Size4Bit)) | sizeHiBits; // low bits 0\n\n  // check rcvr fmt vs class\n  oop_int_t argFormat = (classHdr >> 8) & 0x15;\n  oop_int_t rcvrFormat = ro->format();\n  if (argFormat != rcvrFormat) { primitiveFail(); return; }\n\n  // for fixed-field classes, sizes must match, byteSize-4 because of baseHeader\n  if (Object::Format::has_only_fixed_fields(argFormat)\n  &&  byteSize - Object::BaseHeaderSize  !=  ro->byteSize()) {\n      primitiveFail();\n      return;\n    }\n\n  if (ro->headerType() == Header_Type::Short) {\n    // compact classes\n    oop_int_t ccIndex = classHdr & Object::CompactClassMask;\n    if (ccIndex == 0) {\n      primitiveFail();  return;\n    }\n    The_Memory_System()->store_enforcing_coherence(&ro->baseHeader,  (ro->baseHeader & ~Object::CompactClassMask) | ccIndex, ro);\n  }\n  else {\n    // exchange class pointer\n\n    The_Memory_System()->store_enforcing_coherence(&ro->class_and_type_word(),  argClass.bits() | ro->headerType(), ro);\n    ro->my_heap()->possibleRootStore(rcvr, argClass);\n  }\n}\n\n\nvoid Squeak_Interpreter::internalExecuteNewMethod() {\n  PERF_CNT(this, count_methods_executed());\n  \n  if (primitiveIndex  > 0) {\n    if (255 < primitiveIndex  &&  primitiveIndex < 520) {\n      // \"Internal return instvars\"\n      if (264 <= primitiveIndex) {\n        popThenPush(1, stackTop().as_object()->fetchPointer(primitiveIndex - 264));\n        return;\n      }\n      // \"Internal return constants\"\n      switch (primitiveIndex) {\n        case 256: return;\n        case 257: popThenPush(1, roots.trueObj); return;\n        case 258: popThenPush(1, roots.falseObj); return;\n        case 259: popThenPush(1, roots.nilObj); return;\n        default:  popThenPush(1, Oop::from_int(primitiveIndex - 261)); return;\n      }\n    }\n\n    // \"self primitiveResponse. <-replaced with  manually inlined code\"\n    {\n      Safepoint_Ability sa(true);\n      int nArgs, delta, pi;\n      Oop pre_prim_active_context;\n      if (DoBalanceChecks) {\n        nArgs = get_argumentCount();\n        delta = stackPointer() - activeContext_obj()->as_oop_p();\n        pi = primitiveIndex; // perform prim can zero out primitiveIndex, compare with pi below (Squeak bug)\n        pre_prim_active_context = activeContext();\n      }\n      successFlag = true;\n      dispatchFunctionPointer(primitiveFunctionPointer, do_primitive_on_main); // \"branch direct to prim function from address stored in mcache\"\n\n      if (DoBalanceChecks  && !balancedStackAfterPrimitive(delta, pi, nArgs, pre_prim_active_context))\n        printUnbalancedStack(primitiveIndex, primitiveFunctionPointer);\n    }\n    \n    if (successFlag)\n      return;\n  }\n  // \"if not primitive, or primitive failed, activate the method\"\n  activateNewMethod();\n  // \"check for possible interrupts at each real send\"\n  quickCheckForInterrupts();\n}\n\n\nvoid Squeak_Interpreter::executeNewMethod() {\n  /*\n   execute a method not found in the mCache - which means\n   that primitiveIndex must be manually set.\n   \n   Used by primitiveValue & primitiveExecuteMethod,\n   where no lookup is previously done\n   */\n  if (primitiveIndex > 0) {\n    primitiveResponse();\n    if (successFlag)  return;\n  }\n  activateNewMethod();\n  quickCheckForInterrupts();\n}\n\n\nbool Squeak_Interpreter::primitiveResponse() {\n  Safepoint_Ability sa(true);\n  int nArgs, delta;\n  Oop pre_prim_active_context;\n  if (DoBalanceChecks)  {\n    nArgs = get_argumentCount();\n    delta = stackPointer() - activeContext_obj()->as_oop_p();\n    pre_prim_active_context = activeContext();\n  }\n  int primIdx = primitiveIndex;\n  successFlag = true;\n  dispatchFunctionPointer(primIdx, &primitiveTable);\n  if (DoBalanceChecks  &&  !balancedStackAfterPrimitive(delta, primIdx, nArgs, pre_prim_active_context))\n    printUnbalancedStack(primIdx, NULL);\n  return successFlag;\n}\n\n\nvoid Squeak_Interpreter::primitivePerformAt(Oop lookupClass) {\n  Oop argumentArray = stackTop();\n  Object_p aao;\n  \n  if (!argumentArray.is_mem() || !(aao = argumentArray.as_object())->isArray()) {\n    primitiveFail();  return;\n  }\n  oop_int_t arraySize;\n  if (successFlag) {\n    arraySize = aao->fetchWordLength();\n    oop_int_t cntxSize  = activeContext_obj()->fetchWordLength();\n    success(stackPointerIndex() + arraySize  <  cntxSize);\n  }\n  if (!successFlag)  return;\n\n  Oop performSelector = roots.messageSelector;\n  Oop performMethod  = roots.newMethod;\n  oop_int_t performArgCount = get_argumentCount();\n  popStack();\n  roots.messageSelector = popStack();\n\n  // copy args, exec\n  for (int index = 1;  index <= arraySize;  ++index)\n    push(aao->fetchPointer(index - 1));\n  set_argumentCount( arraySize );\n\n  findNewMethodInClass(lookupClass);\n\n  {\n  Object_p nmo;\n  if (roots.newMethod.is_mem()  && (nmo = newMethod_obj())->isCompiledMethod())\n    success(nmo->argumentCount() == get_argumentCount());\n  }\n\n  if (successFlag) {\n    executeNewMethodFromCache();\n    successFlag = true;\n  }\n  else {\n    pop(get_argumentCount());\n    push(roots.messageSelector);\n    push(argumentArray);\n    roots.messageSelector = performSelector;\n    roots.newMethod = performMethod;\n    set_argumentCount( performArgCount );\n  }\n}\n\n\nvoid Squeak_Interpreter::snapshot(bool /* embedded */) {\n\n  Oop r = popStack();\n  pushBool(true);\n  \n  lprintf(\"snapshot: quiescing\\n\");\n\n  // not only quiesces others but gets them to write back activeContext into the processes\n  // also puts activeProc to sleep\n  \n  Oop activeProc = get_running_process();\n  {\n    Safepoint_for_moving_objects ss(\"snapshot\");\n    Safepoint_Ability sa(false);\n   \n    lprintf(\"snapshot: quiesced\\n\");\n    {\n      Scheduler_Mutex sm(\"snapshot prep\");\n      if (!process_is_scheduled_and_executing()) \n        transferTo(activeProc, \"snapshot prep\");\n    }\n\n    {\n      Scheduler_Mutex sm(\"snapshot\");\n      storeContextRegisters(activeContext_obj());\n      remove_running_process_from_scheduler_lists_and_put_it_to_sleep(\"snapshot\");  // unlike Squeak, RVM keeps running procs in list\n\n      schedulerPointer_obj()->storePointer(Object_Indices::ActiveProcessIndex, activeProc);\n      assert_active_process_not_nil();\n    }\n    lprintf(\"snapshot: starting GC\\n\");\n    The_Memory_System()->fullGC(\"snapshot\");\n    lprintf(\"snapshot: cleaning up\\n\");\n    The_Memory_System()->snapshotCleanUp();\n    lprintf(\"snapshot: writing image\\n\");\n    assert_active_process_not_nil();\n    The_Memory_System()->writeImageFile(The_Memory_System()->imageName());\n    assert_active_process_not_nil();\n    lprintf(\"snapshot: postGCAction_everywhere\\n\");\n    postGCAction_everywhere(false); // With object table, may have moved things\n\n    {\n      Scheduler_Mutex sm(\"snapshot recovery\");\n\n      activeProc.as_object()->add_process_to_scheduler_list(); // unlike Squeak, we keep running proc in list\n      transferTo(activeProc, \"snapshot\");\n      if (Check_Prefetch) assert_always(have_executed_currentBytecode); // will return from prim and prefetch\n    }\n  }\n  lprintf(\"snapshot: finishing\\n\");\n  activeContext_obj()->beRootIfOld();\n  pop(1);\n  if (successFlag)\n    pushBool(false);\n  else\n    push(r);\n  \n  lprintf(\"snapshot: returning\\n\");\n}\n\n\nvoid Squeak_Interpreter::showDisplayBitsOf(Oop aForm, oop_int_t l, oop_int_t t, oop_int_t r, oop_int_t b) {\n  if (deferDisplayUpdates()) return;\n  displayBitsOf(aForm, l, t, r, b);\n}\n\n\nvoid Squeak_Interpreter::displayBitsOf(Oop aForm, oop_int_t l, oop_int_t t, oop_int_t r, oop_int_t b) {\n  Oop displayObj = displayObject();\n  if (aForm != displayObj)  return;\n  Object_p doo;\n  Oop dispBits;\n  success(displayObj.is_mem()  &&  (doo = displayObj.as_object())->lengthOf() >= 4);\n  oop_int_t w, h, d;\n  if (successFlag) {\n    dispBits = doo->fetchPointer(0);\n    w = doo->fetchInteger(1);\n    h = doo->fetchInteger(2);\n    d = doo->fetchInteger(3);\n  }\n  oop_int_t left = max(0, l);\n  oop_int_t right = min(r, w);\n  oop_int_t top = max(0, t);\n  oop_int_t bottom = min(b, h);\n  if (!successFlag  ||  left > right  ||  top > bottom) {\n    return;\n  }\n  if (dispBits.is_int()) {\n    oop_int_t surfaceHandle = dispBits.integerValue();\n    if (showSurfaceFn == NULL) {\n      showSurfaceFn = The_Interactions.load_function_from_plugin(Logical_Core::main_rank, \"ioShowSurface\", \"SurfacePlugin\");\n      if (showSurfaceFn == NULL) {\n        success(false); return;\n      }\n    }\n    showSurfaceFn(surfaceHandle, left, top, right-left, bottom-top);\n  }\n  else {\n    char* dispBitsIndex = dispBits.as_object()->as_char_p() + Object::BaseHeaderSize;\n    assert_on_main();\n    ioShowDisplay(dispBitsIndex, w, h, d, left, right, top, bottom);\n  }\n}\n\nvoid Squeak_Interpreter::fullDisplayUpdate() {\n  Oop displayObj = displayObject();\n  if (!displayObj.is_mem()) return;\n  Object_p dOo = displayObj.as_object();\n  if (!dOo->isPointers()  ||  dOo->lengthOf() < 4)  return;\n  displayBitsOf(displayObj, 0, 0, dOo->fetchInteger(1), dOo->fetchInteger(2));\n  ioForceDisplayUpdate();\n}\n\n\n// Was: wakeHighestPriority\n// xxxxxx factor with remove_process_from_scheduler_list or not -- dmu 4/09\nOop Squeak_Interpreter::find_and_move_to_end_highest_priority_non_running_process() {\n  if (!is_ok_to_run_on_me()) {\n    return roots.nilObj;\n  }\n  Scheduler_Mutex sm(\"find_and_move_to_end_highest_priority_non_running_process\");\n  // return highest pri ready to run\n  // see find_a_process_to_run_and_start_running_it\n  bool verbose = false;\n  bool found_a_proc = false;\n  FOR_EACH_READY_PROCESS_LIST(slo, p, processList, this)  {\n\n    if (processList->isEmptyList())\n      continue;\n    found_a_proc = true;\n    if (verbose)\n      lprintf(\"find_and_move_to_end_highest_priority_non_running_process searching list %d\\n\", p + 1);\n    Oop  first_proc = processList->fetchPointer(Object_Indices::FirstLinkIndex);\n    Oop   last_proc = processList->fetchPointer(Object_Indices:: LastLinkIndex);\n\n    Oop        proc = first_proc;\n    Object_p proc_obj = proc.as_object();\n    Object_p prior_proc_obj = (Object_p)NULL;\n    for (;;)  {\n      if (verbose) {\n        debug_printer->printf(\"on %d: find_and_move_to_end_highest_priority_non_running_process proc: \",\n                              my_rank());\n        proc_obj->print_process_or_nil(debug_printer);\n        debug_printer->nl();\n      }\n      OS_Interface::mem_fence(); // xxxxxx Is this fence needed? -- dmu 4/09\n      assert(proc_obj->as_oop() == proc  &&  proc.as_object() == proc_obj);\n      if (proc_obj->is_process_running()  ||  !proc_obj->is_process_allowed_to_run_on_this_core())\n        ;\n      else if (last_proc == proc) {\n         return proc;\n      }\n      else if (first_proc == proc) {\n        processList->removeFirstLinkOfList();\n        processList->addLastLinkToList(proc);\n        return proc;\n      }\n      else {\n        processList->removeMiddleLinkOfList(prior_proc_obj, proc_obj);\n        processList->addLastLinkToList(proc);\n        return proc;\n      }\n      if  (last_proc == proc)\n        break;\n\n      prior_proc_obj = proc_obj;\n      proc = proc_obj->fetchPointer(Object_Indices::NextLinkIndex);\n      proc_obj = proc.as_object();\n    }\n  }\n\n  // In a 4.0 image running our prims, there is always at least the idle process in the list\n  if (primitiveThisProcess_was_called()  &&  Object::image_is_pre_4_1()) assert_always(found_a_proc);\n\n  OS_Interface::mem_fence(); // xxxxxx Is this fence needed? -- dmu 4/09\n  return roots.nilObj;\n}\n\n\nint Squeak_Interpreter::count_processes_in_scheduler() {\n  Scheduler_Mutex sm(\"find_and_move_to_end_highest_priority_non_running_process\");\n  // return highest pri ready to run\n  // see find_a_process_to_run_and_start_running_it\n  int count = 0;\n  \n  FOR_EACH_READY_PROCESS_LIST(slo, p, processList, this)  {\n    \n    if (processList->isEmptyList())\n      continue;\n    Oop  first_proc = processList->fetchPointer(Object_Indices::FirstLinkIndex);\n    Oop   last_proc = processList->fetchPointer(Object_Indices:: LastLinkIndex);\n    \n    Oop        proc = first_proc;\n    Object_p proc_obj = proc.as_object();\n    for (;;)  {\n      ++count;\n      if  (last_proc == proc)\n        break;\n      \n      proc = proc_obj->fetchPointer(Object_Indices::NextLinkIndex);\n      proc_obj = proc.as_object();\n    }\n  }\n  \n  return count;\n}\n\n\n\n\n\nvoid Squeak_Interpreter::copyBits() {\n  fn_t f = The_Interactions.load_function_from_plugin(Logical_Core::main_rank, \"copyBits\", \"BitBltPlugin\");\n  assert(f != NULL);\n  if (f == NULL) { primitiveFail(); return; }\n  assert_on_main();\n  f();\n}\n\nvoid Squeak_Interpreter::copyBitsFromtoat(oop_int_t x0, oop_int_t x1, oop_int_t y) {\n  fn_t f = The_Interactions.load_function_from_plugin(Logical_Core::main_rank, \"copyBitsFromtoat\", \"BitBltPlugin\");\n  if (f == NULL) { primitiveFail(); return; }\n  assert_on_main();\n  f(x0, x1, y);\n}\n\noop_int_t Squeak_Interpreter::ioFilenamefromStringofLengthresolveAliases(char* aCharBuffer, char* aFilenameString, oop_int_t filenameLength, oop_int_t resolveFlag) {\n  /*\n   the vm has to convert aFilenameString via any canonicalization and\n   char-mapping and put the result in aCharBuffer.\n   \n   Note the resolveAliases flag - this is an awful artefact of OSX and Apples\n   demented alias handling. When opening a file, the flag must be  true,\n   when closing or renaming it must be false. Sigh.\n   */\n  sqGetFilenameFromString(aCharBuffer, aFilenameString, filenameLength, resolveFlag);\n  return 0;\n}\n\nOop     Squeak_Interpreter::displayObject() {\n  Oop r = splObj(Special_Indices::TheDisplay);\n  assert(r.bits() != 0);\n  return r;\n}\n\n\nbool Squeak_Interpreter::verify() {\n  if (!is_initialized()) return true;\n  return\n       roots.verify()\n    && methodCache.verify()\n    && atCache.verify();\n}\n\nOop Squeak_Interpreter::get_stats(int what_to_sample) {\n  // output number of transitions, cycles, time in each\n\n  update_times_when_asking();\n\n  static unsigned int last_reported_bytecodes[Memory_Semantics::max_num_threads_on_threads_or_1_on_processes]; // implicit 0 init\n  int s = makeArrayStart();\n  if (what_to_sample & (1 << SampleValues::bytecodes)) {\n    int32 bytecodesExecuted = bcCount - last_reported_bytecodes[rank_on_threads_or_zero_on_processes()];\n    PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(bytecodesExecuted);\n    last_reported_bytecodes[rank_on_threads_or_zero_on_processes()] = bcCount;\n  }\n  if (what_to_sample & (1 << SampleValues::yieldCount)) {\n    PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(yieldCount);\n    yieldCount = 0;\n  }\n  if (what_to_sample & (1 << SampleValues::cycleCounts)) {\n    PUSH_POSITIVE_64_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(cyclesRunning);\n    cyclesRunning = 0;\n    PUSH_POSITIVE_64_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(cyclesWaiting);\n    cyclesWaiting = 0;\n  }\n  if (what_to_sample & (1 << SampleValues::interruptChecks)) {\n    PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(interruptCheckCount);\n    interruptCheckCount = 0;\n    PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(unforcedInterruptCheckCount);\n    unforcedInterruptCheckCount = 0;\n  }\n  if (what_to_sample & (1 << SampleValues::movedMutatedObjectStats)) {\n    PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(numberOfMovedMutatedRead_MostlyObjects);\n    numberOfMovedMutatedRead_MostlyObjects = 0;\n    PUSH_POSITIVE_64_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(cyclesMovingMutatedRead_MostlyObjects);\n    cyclesMovingMutatedRead_MostlyObjects = 0;\n  }\n  if (what_to_sample & (1 << SampleValues::mutexStats)) {\n    u_int32 semaphoreMutexAcqCycles = semaphore_mutex.get_and_reset_acq_cycles();\n    u_int32 semaphoreMutexRelCycles = semaphore_mutex.get_and_reset_rel_cycles();\n    u_int32 schedulerMutexAcqCycles = scheduler_mutex.get_and_reset_acq_cycles();\n    u_int32 schedulerMutexRelCycles = scheduler_mutex.get_and_reset_rel_cycles();\n    u_int32 safepointAcqCycles = safepoint_mutex.get_and_reset_acq_cycles();\n    u_int32 safepointRelCycles = safepoint_mutex.get_and_reset_rel_cycles();\n\n    PUSH_POSITIVE_64_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(semaphoreMutexAcqCycles);\n    PUSH_POSITIVE_64_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(semaphoreMutexRelCycles);\n    PUSH_POSITIVE_64_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(schedulerMutexAcqCycles);\n    PUSH_POSITIVE_64_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(schedulerMutexRelCycles);\n    PUSH_POSITIVE_64_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(safepointAcqCycles);\n    PUSH_POSITIVE_64_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(safepointRelCycles);\n  }\n  if (what_to_sample & (1 << SampleValues::interpreterLoopStats)) {\n    PUSH_POSITIVE_64_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(perf_counter.get_interpret_cycles());\n    PUSH_POSITIVE_64_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(perf_counter.get_multicore_interrupt_cycles());\n    PUSH_POSITIVE_64_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(perf_counter.get_mi_cyc_1());\n    PUSH_POSITIVE_64_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(perf_counter.get_mi_cyc_1a());\n    PUSH_POSITIVE_64_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(perf_counter.get_mi_cyc_1a1());\n    PUSH_POSITIVE_64_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(perf_counter.get_mi_cyc_1a2());\n    PUSH_POSITIVE_64_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(perf_counter.get_mi_cyc_1b());\n\n    PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(perf_counter.get_multicore_interrupt_check());\n    PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(perf_counter.get_yield_requested());\n    PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(perf_counter.get_data_available());\n    \n    perf_counter.reset_accumulators();\n  }\n  return  makeArray(s);\n}\n\n\n\nOop Squeak_Interpreter::makeArray(int start) {\n  int n = remapBufferCount - start;\n\n  Object_p r = splObj(Special_Indices::ClassArray).as_object()->instantiateClass(n);\n\n  for (int i = n-1;  i >= 0;  --i)\n    r->storePointer(i, popRemappableOop());\n  return r->as_oop();\n}\n\nbool Squeak_Interpreter::verify_active_context_through_stack_top() {\n  Oop* last = stackPointer();\n  for (Oop* p = &activeContext_obj()->as_oop_p()[Object::BaseHeaderSize/sizeof(Oop)];\n            p <= last;\n          ++p)\n    p->verify_oop();\n  return true;\n}\n\n\nstatic char* checkpoint_file_name() {\n  static char buf[BUFSIZ];\n  snprintf(buf, sizeof(buf) - 1,  \"checkpoint_%d\", Logical_Core::group_size);\n  return buf;\n}\n\nstatic  char end_mark[4] = \"end\";\n\nvoid Squeak_Interpreter::save_all_to_checkpoint() {\n  FILE* f = fopen(checkpoint_file_name(), \"wb\");\n  if (f == NULL) {\n    perror(\"could not open file for writing\");\n    fatal(\"\");\n  }\n  lprintf(\"checkpointing...\\n\");\n\n  The_Memory_System()->save_to_checkpoint(f);\n  save_to_checkpoint(f);\n  // fprintf(stderr, \"about to write final mark at 0x%x\\n\", ftell(f));\n  write_mark(f, end_mark);\n  // fprintf(stderr, \"wrote final mark at 0x%x\\n\", ftell(f));\n  fclose(f);\n  lprintf(\"done checkpointing\\n\");\n  rvm_exit();\n}\n\n\nvoid Squeak_Interpreter::restore_all_from_checkpoint(int dataSize, int lastHash, int savedWindowSize, int fullScreenFlag) {\n  FILE* checkpoint_file = fopen(checkpoint_file_name(), \"r\");\n  if (checkpoint_file == NULL) { perror(\"cannot open checkpoint file\");  OS_Interface::die(\"could not open checkpoint\"); }\n  lprintf(\"restore_all_from_checkpoint...\\n\");\n  The_Memory_System()->restore_from_checkpoint(checkpoint_file, dataSize, lastHash, savedWindowSize, fullScreenFlag);\n  restore_from_checkpoint(checkpoint_file);\n  // fprintf(stderr, \"about to read final mark at 0x%x\\n\", ftell(checkpoint_file));\n  read_mark(checkpoint_file, end_mark);\n  // fprintf(stderr, \"read final mark at 0x%x\\n\", ftell(checkpoint_file));\n  fclose(checkpoint_file);\n  lprintf(\"restore_all_from_checkpoint done\\n\");\n}\n\nstatic char check_mark[4] = \"sqi\";\n\nvoid Squeak_Interpreter::save_to_checkpoint(FILE* f) {\n  write_mark(f, check_mark);\n\n  xfwrite(this, sizeof(*this), 1, f);\n}\n\n\nvoid Squeak_Interpreter::restore_from_checkpoint(FILE* f) {\n  read_mark(f, check_mark);\n\n  u_int64 rm = _run_mask;\n\n  int32 pa = _profile_after, qa = _quit_after;\n  bool mc = _make_checkpoint, uc = _use_checkpoint, fe = _fence;\n\n  xfread(this, sizeof(*this), 1, f);\n  initialize(roots.specialObjectsOop, true);\n\n  _run_mask = rm;\n  _profile_after = pa;  _quit_after = qa;\n  _make_checkpoint = mc;  _use_checkpoint = uc;  _fence = fe;\n}\n\n\n// xxxxxx This routine should be reorganized, redone, cleaned up. -- dmu 4/09\n// Broke out of the interpreter loop to do some multicore stuff:\n\nvoid Squeak_Interpreter::multicore_interrupt() {\n  if (   doing_primitiveClosureValueNoContextSwitch\n      || suppress_context_switching())\n    return;\n  \n  /* Record some performance counters */\n  PERF_CNT(this, count_multicore_interrupts());\n  if (multicore_interrupt_check)\n    PERF_CNT(this, count_multicore_interrupt_check());\n  if (yield_requested())\n    PERF_CNT(this, count_yield_requested());\n  if (Message_Queue::are_data_available(my_core()))\n    PERF_CNT(this, count_data_available());\n\n  if (Collect_Performance_Counters)\n    const u_int64 start = OS_Interface::get_cycle_count();\n\n\n  multicore_interrupt_check = false;\n  assert_method_is_correct(false, \"near start of multicore_interrupt\");\n\n  if (process_is_scheduled_and_executing()) {\n    undo_prefetch();\n  }\n  \n  {\n    Safepoint_Ability sa(true);\n    \n    move_mutated_read_mostly_objects();\n    PERF_CNT(this, add_mi_cyc_1a(OS_Interface::get_cycle_count() - start));\n\n    Message_Statics::process_any_incoming_messages(false);\n    PERF_CNT(this, add_mi_cyc_1a1(OS_Interface::get_cycle_count() - start));\n\n    check_method_is_correct(true, \"after processing incoming messages\");\n    PERF_CNT(this, add_mi_cyc_1a2(OS_Interface::get_cycle_count() - start));\n    \n    safepoint_tracker->spin_if_safepoint_requested();\n    PERF_CNT(this, add_mi_cyc_1b(OS_Interface::get_cycle_count() - start));\n    \n    if (emergency_semaphore_signal_requested) {\n      Safepoint_Ability sa(false);\n\n      if (roots.emergency_semaphore.fetchClass() == splObj(Special_Indices::ClassSemaphore))\n        roots.emergency_semaphore.as_object()->synchronousSignal(\"emergency signal request\");\n      emergency_semaphore_signal_requested = false;\n    }\n\n    if (yield_requested()) {\n      _yield_requested = false;\n      yield(\"yield_requested\");\n      check_method_is_correct(true, \"after fixup_localIP_after_being_transferred_to\");\n    }\n\n    PERF_CNT(this, add_mi_cyc_1(OS_Interface::get_cycle_count() - start));\n\n    while (!process_is_scheduled_and_executing()) \n      try_to_find_a_process_to_run_and_start_running_it();\n  } // end safepoint ability true\n  if (Check_Prefetch) assert_always(have_executed_currentBytecode);\n  fetchNextBytecode(); // redo prefetch\n\n  PERF_CNT(this, add_multicore_interrupt_cycles(OS_Interface::get_cycle_count() - start));\n  \n  assert(is_ok_to_run_on_me());\n}\n\n\n\nvoid Squeak_Interpreter::try_to_find_a_process_to_run_and_start_running_it() {\n  minimize_scheduler_mutex_load_by_spinning_till_there_might_be_a_runnable_process();\n  transfer_to_highest_priority(\"find_a_process_to_run_and_start_running_it\");\n  check_method_is_correct(true, \"after transfer_to_highest_priority\");\n}\n\n\nvoid Squeak_Interpreter::minimize_scheduler_mutex_load_by_spinning_till_there_might_be_a_runnable_process() {\n  uint32_t busyWaitCount = 0;\n  do {\n    safepoint_tracker->spin_if_safepoint_requested(); // since we are about to wait for a message\n    Message_Statics::process_any_incoming_messages(false);\n    \n    if (Logical_Core::running_on_main())  // since we don't run idle process, extra check for events\n      ioRelinquishProcessorForMicroseconds(0);\n    \n    if ( added_process_count < 1  &&  nextPollTick() != 0  &&  idle_cores_relinquish_cpus()) {\n      give_up_CPU_instead_of_spinning(busyWaitCount);\n    }\n\n    // in case a mouse event came in, and asynchronously signaled a semaphore\n    checkForInterrupts(false); // since we don't run idle process, extra check for events\n    // Recover from GC if needed\n    \n  } while (\n              added_process_count < 1 /* there are no new procs to run */\n              && nextPollTick() != 0     /* forceInterruptCheck was not called */\n           ); \n  if (added_process_count) --added_process_count;\n}\n\n\n\n// STEFAN: think we should try to sleep here and avoid busy waiting too much\n// DAVID: the problem is that the sleeps won't wake up if the core receives a request message\n\nvoid Squeak_Interpreter::give_up_CPU_instead_of_spinning(uint32_t& busyWaitCount) {\n  busyWaitCount++;\n  \n  if (busyWaitCount <= 16)\n    return; // NOP\n  \n  if (busyWaitCount <= 32) {\n    if (!Logical_Core::running_on_main())\n      OS_Interface::yield_or_spin_a_bit();\n    return;\n  }\n  \n  useconds_t sleep = 1 << (busyWaitCount - 32); // wait an exponentially growing time span\n  static const u_int32 max_sleep_usecs = 500; // experimentally determined on Mac by watching Kiviats, etc -- dmu 10/1/10\n  if (Logical_Core::running_on_main())\n    ioRelinquishProcessorForMicroseconds(min(max_sleep_usecs, sleep));\n  else \n    usleep(min(max_sleep_usecs, sleep));\n}\n\n\nvoid Squeak_Interpreter::fixup_localIP_after_being_transferred_to() {\n  if (process_is_scheduled_and_executing()) {\n    if (Check_Prefetch)  assert_always(have_executed_currentBytecode);\n    fetchNextBytecode(); // because normally transferTo is called as primitive, and caller does this\n  }\n}\n\n\nvoid Squeak_Interpreter::move_mutated_read_mostly_objects() {\n  if (mutated_read_mostly_objects_count == 0)\n    return;\n\n  Safepoint_for_moving_objects sf(\"move_mutated_read_mostly_objects\");\n  Safepoint_Ability sa(false);\n\n  if ( print_moves_to_read_write() ) {\n    debug_printer->printf(\"moving %d objects from read-mostly to read-write heap: \",  mutated_read_mostly_objects_count);\n  }\n\n  cyclesMovingMutatedRead_MostlyObjects -= OS_Interface::get_cycle_count();\n  numberOfMovedMutatedRead_MostlyObjects += mutated_read_mostly_objects_count;\n\n  for (int i = 0;  i < mutated_read_mostly_objects_count;  ++i) {\n    if (print_moves_to_read_write() ) {\n      mutated_read_mostly_objects[i].as_object()->print(debug_printer);  debug_printer->printf(\", \");\n    }\n    // xxxxxx my_rank() below may not be best--what if heap fills up? -- dmu 4/09\n    mutated_read_mostly_objects[i].as_object()->move_to_heap(my_rank(), Memory_System::read_write, true);\n    if (mutated_read_mostly_object_tracer() != NULL)\n      mutated_read_mostly_object_tracer()->add(mutated_read_mostly_objects[i]);\n  }\n  if (print_moves_to_read_write() ) debug_printer->nl();\n  sync_with_roots(); // don't need full pre/postGCAction_everywhere because we don't move contexts, and caches are oop-based\n  mutated_read_mostly_objects_count = 0;\n  cyclesMovingMutatedRead_MostlyObjects += OS_Interface::get_cycle_count();\n}\n\n\n\n\n\n\nvoid Squeak_Interpreter::run_primitive_on_main_from_elsewhere(fn_t f) {\n  dispatchFunctionPointer(f, false);\n}\n\n\nvoid Squeak_Interpreter::dispatchFunctionPointer(fn_t f, bool on_main) {\n  check_method_is_correct(true, \"start of dispatchFunctionPointer\");\n  assert(f);\n  Safepoint_Ability sa(true); // prims expect to cope w/ GC -- dmu 5/10\n  \n# if Dont_Dump_Primitive_Cycles && Dump_Bytecode_Cycles\n  static int recurse = 0;\n  u_int64 start = OS_Interface::get_cycle_count();\n  ++recurse;\n# endif\n\n  PERF_CNT(this, count_primitive_invokations());\n  \n  if (on_main) {\n    The_Interactions.run_primitive(Logical_Core::main_rank, f);\n    check_method_is_correct(true, \"after run_primitive_on_main\");\n  }\n  else {\n    (*f)();\n    check_method_is_correct(true, \"end of dispatchFunctionPointer\");\n  }\n  \n# if Dont_Dump_Primitive_Cycles && Dump_Bytecode_Cycles\n  --recurse;\n  if (recurse == 0) {\n    u_int64 dur = OS_Interface::get_cycle_count() - start;\n    bc_cycles[bc_cycles_index] += dur - bc_cycles_tare;\n  }\n# endif\n}\n\n\nvoid Squeak_Interpreter::booleanCheat(bool cond) {\n  // \"cheat the interpreter out of the pleasure of handling the next bytecode\n  //  IFF it is a jump-on-boolean. Which it is,\n  //  often enough when the current bytecode is something like bytecodePrimEqual\"\n  u_char bytecode = fetchByte(); // assume next bc is jumpIFalse 99%\n  pop(2);\n  if (151 < bytecode  &&  bytecode < 160) {\n    // short jumpIfFalse\n    if (cond)  fetchNextBytecode();\n    else       jump(bytecode - 151);\n    return;\n  }\n  if (bytecode == 172) {\n    u_char offset = fetchByte();\n    if (cond) fetchNextBytecode();\n    else      jump(offset); // always positive\n    return;\n  }\n  // \"not followed by a jumpIfFalse; undo instruction fetch and push boolean result\"\n  set_instructionPointer(instructionPointer() - 1);\n  fetchNextBytecode();\n  push(cond ? roots.trueObj : roots.falseObj);\n}\n\nvoid Squeak_Interpreter::transferTo(Oop newProc, const char* why) {\n  if (check_many_assertions) assert(!newProc.as_object()->is_process_running());\n\n  Scheduler_Mutex sm(\"transferTo\"); // in case another cpu starts running this\n  if (Print_Scheduler_Verbose) {\n    debug_printer->printf(\"scheduler: on %d: \", my_rank());\n    get_running_process().print_process_or_nil(debug_printer);\n    debug_printer->printf( \" transferTo \");\n    newProc.print_process_or_nil(debug_printer);\n    debug_printer->printf(\", %s\\n\", why);\n  }\n  if (check_many_assertions) assert(!newProc.as_object()->is_process_running());\n  put_running_process_to_sleep(why);\n  if (check_many_assertions) assert(!newProc.as_object()->is_process_running());\n  OS_Interface::mem_fence();\n  start_running(newProc, why);\n}\n\n\nvoid Squeak_Interpreter::start_running(Oop newProc, const char* why) {\n  assert(Scheduler_Mutex::is_held());\n  \n  if (newProc == roots.nilObj) {\n    // print_process_lists(debug_printer);\n    unset_running_process();\n    return;\n  }\n  \n  Object_p newProc_obj = newProc.as_object();\n  if (newProc_obj->is_process_running()) {\n    lprintf(\"releasing/unset currently running process in start_running\\n\");\n    unset_running_process();\n    multicore_interrupt_check = true; // so we stop running\n    return;\n  }\n\n  set_running_process(newProc, why);\n  Oop nac = newProc_obj->get_suspended_context_of_process_and_mark_running();\n  Object_p naco = nac.as_object();\n  nac.beRootIfOld();\n  assert(nac != roots.nilObj); // looking for bug with nil ctx, nonnil proc\n  set_activeContext( nac, naco );\n  fetchContextRegisters(nac, naco);\n  if (Trace_Execution && execution_tracer() != NULL)  execution_tracer()->set_proc(newProc);\n  // if (check_many_assertions) check_method_is_correct(true, \"end of start_running\");\n  if (Check_Prefetch)  have_executed_currentBytecode = true;\n  reclaimableContextCount = 0;\n}\n\n\nvoid Squeak_Interpreter::commonReturn(Oop localCntx, Oop localVal) {\n  Oop nilOop = roots.nilObj;\n  assert(localCntx.is_mem());\n  Object_p localCntx_obj = localCntx.as_object();\n\n  // make sure can return to given ctx\n  if (localCntx == nilOop  ||  localCntx_obj->fetchPointer(Object_Indices::InstructionPointerIndex) == nilOop) {\n    // error: sender's IP or ctx is nil\n    cannotReturn(localVal, localCntx == nilOop, localCntx_obj->fetchPointer(Object_Indices::InstructionPointerIndex) == nilOop, false);\n    return;\n  }\n  // If this return is not to immed predecessor, scan stackfor first unwind marked ctx and inform it.\n  for (Oop thisCntx = activeContext_obj()->fetchPointer(Object_Indices::SenderIndex);\n       // faster test would be cmp homeContext and activeContext-- see ST\n       thisCntx != localCntx;\n       thisCntx = thisCntx.as_object()->fetchPointer(Object_Indices::SenderIndex)) {\n    if (thisCntx == nilOop) {\n      cannotReturn(localVal, false, false, true);\n      return;\n    }\n    // climb up; break out of send of aboutToReturn:through: if an unwind marked ctx is found\n    bool unwindMarked = thisCntx.as_object()->isUnwindMarked();\n    if (unwindMarked) {\n      aboutToReturn(localVal, thisCntx);\n      return;\n    }\n  }\n  // no unwind\n  Oop thisCntx = activeContext();\n  while (thisCntx != localCntx) {\n    Object_p thisCntx_obj = thisCntx.as_object();\n    assert(!The_Memory_System()->object_table->probably_contains(thisCntx_obj));\n\n    Oop contextOfCaller = thisCntx_obj->fetchPointer(Object_Indices::SenderIndex);\n    // zap\n    thisCntx_obj->zapping_ctx();\n    thisCntx_obj->storePointerIntoContext(Object_Indices::SenderIndex, nilOop);\n    thisCntx_obj->storePointerIntoContext(Object_Indices::InstructionPointerIndex, nilOop);\n    if (reclaimableContextCount > 0) {\n      // recycle\n      --reclaimableContextCount;\n      recycleContextIfPossible_on_its_core(thisCntx);\n    }\n    thisCntx = contextOfCaller;\n  }\n  Object_p thisCntx_obj = thisCntx.as_object();\n  assert(thisCntx != roots.nilObj);\n  set_activeContext( thisCntx, thisCntx_obj);\n  thisCntx.beRootIfOld();\n  fetchContextRegisters(thisCntx, thisCntx_obj);\n  fetchNextBytecode();\n  push(localVal);\n  if (Always_Check_Method_Is_Correct | check_assertions)  check_method_is_correct(false, \"end of commonReturn\");\n}\n\nvoid Squeak_Interpreter::cannotReturn(Oop resultObj, bool b1, bool b2, bool b3) {\n\n  lprintf(\"cannotReturn %d %d %d\\n\", b1, b2, b3);\n  lprintf(\"this ctx object is 0x%x\\n\", (Object*)activeContext_obj());\n  // fatal(\"internal cannot return\");\n\n  push(activeContext());\n  push(resultObj);\n  roots.messageSelector = splObj(Special_Indices::SelectorCannotReturn);\n  set_argumentCount(1);\n  normalSend();\n}\n\nvoid Squeak_Interpreter::aboutToReturn(Oop resultObj, Oop aContext) {\n  push(activeContext());\n  push(resultObj);\n  push(aContext);\n  roots.messageSelector = splObj(Special_Indices::SelectorAboutToReturn);\n  set_argumentCount( 2 );\n  normalSend();\n}\n\n\nvoid Squeak_Interpreter::recycleContextIfPossible_on_its_core(Oop ctx) {\n  Object_p ctx_obj = ctx.as_object();\n  int rank = ctx_obj->rank();\n  if (rank == Logical_Core::my_rank()) \n    recycleContextIfPossible_here(ctx); // optimize critical case\n  else {\n    // Don't need to preserve oop because it has to be garbage and also because receiver will just recycle it right away.\n    recycleContextIfPossibleMessage_class(ctx).handle_here_or_send_to(rank);\n  }\n}\n\n\nvoid Squeak_Interpreter::recycleContextIfPossible_here(Oop ctx) {\n  /*\n   \"If possible, save the given context on a list of free contexts to\n   be recycled.\"\n   \"Note: The context is not marked free, so it can be reused\n   with minimal fuss. The recycled context lists are cleared at\n   every garbage collect.\"\n   */\n  Object_p ctx_obj = ctx.as_object();\n  // unimplemented if (ctx.is_old())  return;\n\n  assert(ctx_obj->rank() == my_rank());\n\n  if (!ctx_obj->isMethodContext())\n    return;\n  Oop* free_contexts;\n  switch (ctx_obj->shortSizeBits()) {\n    default: fatal(\"wrong size\"); return;\n    case Object_Indices::SmallContextSize:  free_contexts = &roots.freeContexts;       break;\n    case Object_Indices::LargeContextSize:  free_contexts = &roots.freeLargeContexts;  break;\n  }\n  ctx_obj->storePointerIntoContext(Object_Indices::Free_Chain_Index, *free_contexts);\n  DEBUG_STORE_CHECK(free_contexts, ctx);\n  *free_contexts = ctx;\n}\n\n\n\n\nObject_p Squeak_Interpreter::allocateOrRecycleContext(bool needsLarge) {\n  if (Trace_GC_For_Debugging  &&  debugging_tracer() != NULL\n  &&  debugging_tracer()->force_real_context_allocation())\n    ;\n  else {\n    Oop& freeC = needsLarge ? roots.freeLargeContexts : roots.freeContexts;\n    if (freeC != Object::NilContext()) {\n      Object_p r = freeC.as_object();\n      Oop fc = r->fetchPointer(Object_Indices::Free_Chain_Index);\n      assert(fc.is_mem()  ||  fc == Object::NilContext());\n      freeC = fc;\n      assert(The_Memory_System()->contains(r));\n      // assert_eq(r->rank(), my_rank, \"\");\n      if (check_many_assertions  &&  r->get_count_of_blocks_homed_to_this_method_ctx() > 0)\n        lprintf(\"RECYCLING recycled live one 0x%x, method 0x%x\\n\", r->as_oop().bits(), r->fetchPointer(Object_Indices::MethodIndex).bits());\n      return r;\n    }\n  }\n\n  // xxxxxxxx optimize spl objects by replicating the special objects array someday -- dmu 4/09\n  Object_p class_method_context = splObj_obj(Special_Indices::ClassMethodContext);\n  const int lcs = Object_Indices::LargeContextSize; // this and next needed for C++ bug\n  const int scs = Object_Indices::SmallContextSize;\n  Object_p r = class_method_context->instantiateContext(\n                                                       needsLarge\n                                                       ? lcs\n                                                       : scs);\n\n  // \"Required init -- above does not fill w/nil.  All others get written.\"\n  r->storePointerIntoContext(Object_Indices::InitialIPIndex, roots.nilObj);\n  assert(The_Memory_System()->contains(r));\n  assert_eq(r->rank(), my_rank(), \"\");\n\n  if (check_many_assertions  &&  r->get_count_of_blocks_homed_to_this_method_ctx() > 0)\n    lprintf(\"RECYCLING new live one 0x%x, method 0x%x\\n\", r->as_oop().bits(), r->fetchPointer(Object_Indices::MethodIndex).bits());\n\n  return r;\n}\n\nOop Squeak_Interpreter::stObjectAt(Object_p a, oop_int_t index) {\n  // \"Return what ST would return for <obj> at: index.\"\n  oop_int_t fmt = a->format();\n  oop_int_t fixedFields = a->fixedFieldsOfArray();\n  oop_int_t stSize =  Object::Format::might_be_context(fmt) && a->hasContextHeader()\n  ? a->fetchStackPointer()  :  oop_int_t(a->lengthOf() - fixedFields);\n  if ( u_oop_int_t(index) >= u_oop_int_t(1)  &&  u_oop_int_t(index) <= u_oop_int_t(stSize))\n    return subscript(a, index + fixedFields);\n  successFlag = false;\n  return roots.nilObj;\n}\n\nvoid Squeak_Interpreter::stObjectAtPut(Object_p a, oop_int_t index, Oop value) {\n  oop_int_t fmt = a->format();\n  oop_int_t totalLength = a->lengthOf();\n  oop_int_t fixedFields = a->fixedFieldsOfArray();\n  oop_int_t stSize = Object::Format::might_be_context(fmt) && a->hasContextHeader()\n  ? a->fetchStackPointer()  :  totalLength - fixedFields;\n  if ( u_oop_int_t(index) >= u_oop_int_t(1)  &&  u_oop_int_t(index) <= u_oop_int_t(stSize))\n    subscript(a, index + fixedFields, value);\n  else\n    successFlag = false;\n}\n\n\n\nOop Squeak_Interpreter::subscript(Object_p a, oop_int_t index) {  // rcvr is array\n  // \"Note: This method assumes that the index is within bounds!\"\n  oop_int_t fmt = a->format();\n  oop_int_t index0 = index - 1; // C is 0-based\n  return Object::Format::has_only_oops(fmt)\n  ?  a->fetchPointer(index0)\n  :  ! Object::Format::has_bytes(fmt)\n  ? Object::positive32BitIntegerFor(a->fetchLong32(index0)) // long word objs\n  : Oop::from_int(a->fetchByte(index0));\n}\n\nvoid Squeak_Interpreter::subscript(Object_p a, oop_int_t index, Oop value) {\n  oop_int_t fmt = a->format();\n  if (Object::Format::has_only_oops(fmt))\n    a->storePointer(index - 1, value);\n  else if (!Object::Format::has_bytes(fmt)) {\n    oop_int_t v = positive32BitValueOf(value);\n    if (successFlag)\n      a->storeLong32(index - 1, v);\n  }\n  else if (!value.is_int())\n    successFlag = false;\n  else {\n    oop_int_t v = value.integerValue();\n    if (v & ~0xff) successFlag = false;\n    else a->storeByte(index - 1, v);\n  }\n}\n\nLogical_Core* Squeak_Interpreter::coreWithSufficientSpaceToInstantiate(Oop klass, oop_int_t indexableSize) {\n  /*\n   \"Return the number of bytes required to allocate an instance of the given \n    class with the given number of indexable fields.\"\n   \"Details: For speed, over-estimate space needed for fixed fields or \n    literals; the low space threshold is a blurry line.\"\n   */\n  int fmt = (klass.as_object()->formatOfClass() & Object::FormatMask) >> Object::FormatShift;\n  if (indexableSize != 0  &&  Object::Format::has_only_fixed_fields(fmt)) // non-indexable\n    return NULL;\n  int atomSize = !Object::Format::has_bytes(fmt)  ?  sizeof(oop_int_t)  :  1;\n  return The_Memory_System()->coreWithSufficientSpaceToAllocate(2500 +  indexableSize * atomSize,\n                                                                Memory_System::read_write);\n}\n\n\n\nOop Squeak_Interpreter::commonVariableAt(Oop rcvr, oop_int_t index, At_Cache::Entry* e, bool isInternal) {\n  oop_int_t stSize = e->size;\n  if (1 <= u_int32(index)  &&  u_int32(index) <= u_int32(stSize)) {\n    int fmt = e->fmt;\n    Object_p rcvr_obj = rcvr.as_object();\n    assert_eq(fmt & ~16, rcvr_obj->format(), \"format check\");\n\n    if (Object::Format::has_only_oops(fmt))\n      return rcvr_obj->fetchPointer(index + e->fixedFields - 1);\n\n    if (!Object::Format::has_bytes(fmt)) { // Bitmap\n      Safepoint_Ability sa(true);\n      return Object::positive32BitIntegerFor(rcvr_obj->fetchLong32(index - 1));\n    }\n\n    if (fmt >= 16) // artifical flag for strings\n      return characterForAscii(rcvr_obj->fetchByte(index - 1));\n\n    return Oop::from_int(rcvr_obj->fetchByte(index - 1));  // byteArray\n  }\n  primitiveFail();\n  return Oop::from_int(0);\n}\n\n\nvoid Squeak_Interpreter::commonVariableAtPut(Oop rcvr, oop_int_t index, Oop value, At_Cache::Entry* e) {\n  // assumes rcvr has been id'ed at loc atIx in the atCache\n  oop_int_t stSize = e->size;\n  if (1 <= index  &&  u_int32(index) <= u_int32(stSize) ) {\n    int fmt = e->fmt;\n    assert_eq(fmt & ~16, rcvr.as_object()->format(), \"format check\");\n    if (Object::Format::has_only_oops(fmt)) {\n      int fixedFields = e->fixedFields;\n      assert(value.bits());\n      rcvr.as_object()->storePointer(index + fixedFields - 1, value);\n      return;\n    }\n    if (!Object::Format::has_bytes(fmt)) { // bitmap\n      oop_int_t valToPut = signed32BitValueOf(value); // was positive32BitValueOf\n      if (successFlag)\n        rcvr.as_object()->storeLong32(index - 1, valToPut);\n      return;\n    }\n    Oop valToPut;\n    if (fmt >= 16) { // strings\n      valToPut = asciiOfCharacter(value);\n      if (!successFlag) return;\n    }\n    else\n      valToPut = value;\n    if (valToPut.is_int()) {\n      oop_int_t v = valToPut.integerValue();\n      if (0 <= v  &&  v <= 255)\n        rcvr.as_object()->storeByte(index - 1, v);\n      else\n        primitiveFail();\n      return;\n    }\n  }\n  primitiveFail();\n}\n\n\nvoid Squeak_Interpreter::trace_execution() {\n  if (!Trace_Execution) fatal(\"cannot trace execution if Trace_Execution is not set\");\n\n  Execution_Tracer* tracer;\n\n# if Profile_Image /* necessary, since class will only exists when necessary */\n    tracer = new Profiling_Tracer(1000);\n# else\n    tracer = new Execution_Tracer(1000);\n# endif\n\n  set_execution_tracer(tracer);\n  lprintf(\"Tracing execution -- will run slower!!! \\n\");\n}\n\nvoid Squeak_Interpreter::trace_for_debugging() {\n  if (!Trace_GC_For_Debugging) fatal(\"should never happen\");\n  set_debugging_tracer(new GC_Debugging_Tracer());\n  lprintf(\"Tracing for debugging\\n\");\n}\n\nvoid Squeak_Interpreter::print_execution_trace() {\n  if (execution_tracer() != NULL) execution_tracer()->print();\n}\n\n\nvoid Squeak_Interpreter::unset_running_process() {\n  set_activeContext(roots.nilObj);\n  multicore_interrupt_check = true; // must go into multicore_interrupt to wait for a new process to execute\n\n  assert(    roots.running_process_or_nil == roots.nilObj\n         || !roots.running_process_or_nil.as_object()->is_process_running());\n  \n  roots.running_process_or_nil = roots.nilObj;\n  \n  if (Track_Processes)\n    running_process_by_core[my_rank()] = roots.running_process_or_nil;\n}\n\nbool Squeak_Interpreter::process_is_scheduled_and_executing() {\n  assert(activeContext() == roots.nilObj  ||  roots.running_process_or_nil != roots.nilObj);\n  return activeContext() != roots.nilObj;\n}\n\n\n// for debugging\nvoid Squeak_Interpreter::check_method_is_correct(bool will_be_fetched, const char* where) {\n  const char* msg = \"\";\n  Oop lit;\n  int litx = 0;\n\n  if (!process_is_scheduled_and_executing())\n    return;\n\n\n  Object_p m = method_obj();\n  // m->get_argumentCount()\n  // m->temporaryCount()\n  u_char* bcp = instructionPointer() + (will_be_fetched ? 1 : 0);\n  // only works when regs are stored: u_char* my_ip = activeContext_obj()->next_bc_to_execute_of_context();\n  //                                  assert_always(my_ip == bcp);\n\n  m->check_IP_of_method(bcp, activeContext_obj());\n\n  // if (true) return; // always fails before here\n  if (Check_Prefetch) assert_always_eq(have_executed_currentBytecode, will_be_fetched);\n\n  if (!will_be_fetched  &&   currentBytecode != *instructionPointer())\n    msg = \"currentBytecode != *instructionPointer()\";\n  else if ((litx = literal_index_of_bytecode(bcp)) == -1)\n    return;\n  else if (!(0 <= litx  &&  litx < m->literalCount()))\n    msg = \"literal index out of bounds\";\n  else if (!(lit = literal(litx)).is_int()  &&  !The_Memory_System()->object_table->probably_contains((void*)lit.bits()))\n    msg = \"bad mem literal\";\n  else\n    return;\n\n  error_printer->printf(\"on %d: check_method_is_correct: %s, will_be_fetched %d, instructionPointer - method %d, \"\n                        \"bcp - method %d, *bcp %d, litx %d, literalCount %d, lit 0x%x, nbytes %d, at %s\\nmethod: \",\n                        my_rank(), msg, will_be_fetched,\n                        instructionPointer() - m->as_u_char_p(), bcp - m->as_u_char_p(),\n                        *bcp, litx, m->literalCount(), lit.bits(), m->lengthOf() - sizeof(Oop),\n                        where);\n  m->print_compiled_method(error_printer);\n  error_printer->nl();\n\n  assert_always_eq(activeContext().bits(), activeContext_obj()->as_oop().bits());\n  assert_always_eq(activeContext_obj(), (void*)activeContext().as_object());\n  assert_always_eq(method().bits(), activeContext_obj()->fetchPointer(Object_Indices::MethodIndex).bits());\n  assert_always_eq(method().as_object(), (void*)method_obj());\n  assert_always_eq(method_obj()->as_oop().bits(), method().bits());\n  fatal(\"check_method_is_correct\");\n\n}\n\n\n\n\nvoid Squeak_Interpreter::remember_to_move_mutated_read_mostly_object(Oop x) {\n  if (am_receiving_objects_from_snapshot()) return;\n\n  for (int i = 0;  i < mutated_read_mostly_objects_count;  ++i)\n    if (mutated_read_mostly_objects[i] == x)\n      return;\n\n  multicore_interrupt_check = true;\n  if (mutated_read_mostly_objects_count + 1  <  Mutating_Objects_Size)\n    mutated_read_mostly_objects[mutated_read_mostly_objects_count++] = x;\n  else {\n    lprintf(\"Warning: cannot record mutated_read_mostly object\\n\");\n    breakpoint();\n  }\n}\n\nvoid Squeak_Interpreter::receive_initial_interpreter_from_main(Squeak_Interpreter* sq) {\n  Safepoint_Ability* const sa = safepoint_ability;\n  \n  \n/* The following hack is needed to get away with the const members in the\n   interpreter. The potential optimization should be worth it. */\n#if Using_Processes\n  *this = *sq;\n#else\n  const int           my_rank = this->_my_rank;\n  Logical_Core* const my_core = this->_my_core;\n  \n  memcpy(this, sq, sizeof(Squeak_Interpreter)); // initalize with copy; use memcpy to avoid complains about consts, was: *this = *sq;\n \n  void* const rankAddr = (void* const)&this->_my_rank;\n  void* const coreAddr = (void* const)&this->_my_core;\n  *((int*)rankAddr)           = my_rank;\n  *((Logical_Core**)coreAddr) = my_core;\n#endif\n  \n  safepoint_tracker = new Safepoint_Tracker();\n  safepoint_master_control = NULL;\n  safepoint_ability = sa;\n\n  if (check_assertions) {\n    assert(roots.specialObjectsOop.is_mem());\n    roots.specialObjectsOop.verify_object();\n  }\n\n}\n\nvoid Squeak_Interpreter::print_method_info(const char* msg) {\n  error_printer->printf(\"%d on %d: %s, process_is_scheduled_and_executing %d, method 0x%x, method_obj 0x%x, instructionPointer 0x%x, activeContext_obj() 0x%x, activeContext().as_object() 0x%x, freeContexts 0x%x\\n\",\n                        increment_print_sequence_number(),\n                        my_rank(), msg, process_is_scheduled_and_executing(), method().bits(), (Object*)method_obj(), instructionPointer(),\n                        (Object*)activeContext_obj(), activeContext().as_untracked_object_ptr(),\n                        roots.freeContexts.bits());\n  if (process_is_scheduled_and_executing()) {\n    method_obj()->print_compiled_method(error_printer);\n    error_printer->nl();\n  }\n}\n\nvoid Squeak_Interpreter::print_stack_frame() {\n  // ip + current bytecode\n  // stack\n  \n  int rawIP;\n  int ip;\n  int sp;\n  \n  rawIP = instructionPointer() - method_obj()->as_u_char_p()\n        - Object::BaseHeaderSize + 1;\n  sp = stackPointerIndex() - Object_Indices::TempFrameStart + 1;\n\n  ip = rawIP - \n        (Object_Indices::LiteralStart\n         + method_obj()->literalCount() * bytesPerWord) - 2;\n  \n  error_printer->printf(\"ip %3d (raw %3d), sp %3d\\n\",\n                        ip,\n                        rawIP,\n                        sp);\n  \n  for (int i = sp; i >= 0; i--) {\n    error_printer->printf(\"\\t[%2d]\\t\", i);\n    stackValue(sp - i).dp();\n  }\n}\n\n\nvoid Squeak_Interpreter::preGCAction_here(bool fullGC) {\n  if (check_many_assertions) activeContext_obj()->check_all_IPs_in_chain();\n  const bool print = false;\n  if (print) print_method_info(fullGC ? \"pre preGCAction_here fullGC\" : \"pre preGCAction_here !fullGC\");\n  if (process_is_scheduled_and_executing())\n    storeContextRegisters(activeContext_obj());\n  if (fullGC)   flushInterpreterCaches();\n  if (print) print_method_info(fullGC ? \"post preGCAction_here fullGC\" : \"pre preGCAction_here !fullGC\");\n}\n\n\nvoid Squeak_Interpreter::postGCAction_here(bool fullGC) {\n  const bool print = false;\n  sync_with_roots();\n  if (process_is_scheduled_and_executing()) {\n    // next line is for assertions only, \n    // because none of the routines called below can receive a message -- dmu 7/12/10\n    Safepoint_Ability sa(false); \n    fetchContextRegisters(activeContext(), activeContext_obj());\n    activeContext_obj()->beRootIfOld();\n    theHomeContext_obj()->beRootIfOld();\n\n\n    if (fullGC && Logical_Core::running_on_main()) { // zzzzzz\n      signalSema(gcSemaphoreIndex(), \"postGCAction_here\");\n    }\n  }\n  if (print) print_method_info(fullGC ? \"postGCAction_here fullGC\" : \"postGCAction_here !fullGC\");\n  if (check_many_assertions) activeContext_obj()->check_all_IPs_in_chain();\n  last_gc_bcCount = bcCount;\n}\n\n\nOop Squeak_Interpreter::remove_running_process_from_scheduler_lists_and_put_it_to_sleep(const char* why) {\n  Oop activeProc = get_running_process();\n  // Don't need mutex at this level because we remove it first\n  activeProc.as_object()->remove_process_from_scheduler_list(why);\n  put_running_process_to_sleep(why);\n  return activeProc;\n}\n\nvoid Squeak_Interpreter::handle_sigint() {\n  lprintf(\"received sigint and will abort()\\n\");\n  OS_Interface::abort();\n}\n\nvoid Squeak_Interpreter::print_info() {\n  print_all_stack_traces(error_printer);\n}\n\n\nvoid Squeak_Interpreter::signalFinalization(Oop) {\n  forceInterruptCheck();\n  set_pendingFinalizationSignals(pendingFinalizationSignals() + 1);\n}\n\n\nvoid Squeak_Interpreter::set_run_mask_and_request_yield(u_int64 x) {\n  set_run_mask(x);\n  set_yield_requested(true);\n}\n\n\n\n\nvoid Squeak_Interpreter::broadcast_u_int64(u_int64* d) {\n  broadcast_datum(sizeof(*d), d, (u_int64)*d);\n}\n\n\nvoid Squeak_Interpreter::broadcast_int32(int32* d) {\n  broadcast_datum(sizeof(*d), d, (u_int64)*d);\n}\n\n\nvoid Squeak_Interpreter::broadcast_bool(bool* d) {\n  broadcast_datum(sizeof(*d), d, (u_int64)*d);\n}\n\n\nvoid Squeak_Interpreter::broadcast_datum(int datum_size, void* datum_addr, u_int64 datum) {\n  broadcastInterpreterDatumMessage_class m(datum_size, (char*)datum_addr - (char*)this, datum);\n  m.send_to_other_cores();\n}\n\n\n\nvoid Squeak_Interpreter::distribute_initial_interpreter() {\n  Safepoint_Ability sa(false);\n  assert_always(Memory_Semantics::cores_are_initialized());\n  assert_always(Logical_Core::running_on_main());\n  // lprintf(\"main about to distribute interpreter\\n\");\n  if (check_assertions)  roots.specialObjectsOop.verify_object();\n  \n  // Use a shared buffer to reduce the size of the message to optimize the footprint of message buffer allocation -- dmu & sm\n  Squeak_Interpreter* interp_shared_copy = (Squeak_Interpreter*)Memory_Semantics::shared_malloc(sizeof(Squeak_Interpreter));  \n  memcpy(interp_shared_copy, this, sizeof(Squeak_Interpreter));\n  \n  distributeInitialInterpreterMessage_class m(interp_shared_copy);\n  m.send_to_other_cores();\n  \n  Memory_Semantics::shared_free(interp_shared_copy);\n}\n\n\nvoid Squeak_Interpreter::receive_initial_interpreter() {\n  Safepoint_Ability sa(false);\n  assert_always(!Logical_Core::running_on_main());\n  // lprintf(\"about to wait for interpreter\\n\");\n  WAIT_FOR_MESSAGE(distributeInitialInterpreterMessage, Logical_Core::main_rank);\n  // printf(\"received interpreter\\n\");  \n}\n\n\n\nvoid Squeak_Interpreter::preGCAction_everywhere(bool fullGC) {\n  preGCActionMessage_class(fullGC).send_to_all_cores();\n}\n\nvoid Squeak_Interpreter::postGCAction_everywhere(bool fullGC) {\n  // STEFAN: this looks like a good place to invalidate our tracked_ptr's\n# if Track_OnStackPointer\n  tracked_ptr<Object>::invalidate_all_pointer();\n# endif\n  \n  postGCActionMessage_class(fullGC, safepoint_ability->is_able()).send_to_all_cores();\n}\n\nvoid Squeak_Interpreter::signal_emergency_semaphore() {  \n  emergency_semaphore_signal_requested = true;\n  set_yield_requested(true);\n  multicore_interrupt_check = true;\n}\n\nbool Squeak_Interpreter::roomToPushNArgs(int n) {\n  /*\n   \"Answer if there is room to push n arguments onto the current stack.\n    There may be room in this stackPage but there may not be room if\n    the frame were converted into a context.\"\n   */\n  // compiler bug:\n  int lcs = Object_Indices::LargeContextSize;\n  int scs = Object_Indices::SmallContextSize;\n  \n  int cntxSize = (( method_obj()->methodHeader() & Object::LargeContextBit ) ? lcs : scs) / bytesPerWord  -  Object_Indices::ReceiverIndex;\n  return stackPointerIndex() + n  <=  cntxSize;\n}\n\nbool Squeak_Interpreter::getNextEvent_any_platform(void* p) {\n  bool preserved_successFlag = successFlag;\n  ioGetNextEvent(p);\n  int successFlag_value = successFlag;\n  successFlag = preserved_successFlag;\n  return successFlag_value;\n}\n"
  },
  {
    "path": "vm/src/interpreter/squeak_interpreter.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Squeak_Interpreter {\npublic:\n  Squeak_Interpreter();\n  \n#if Using_Processes\npublic:\n  inline int           my_rank() const { return Logical_Core::my_rank(); }\n  inline Logical_Core* my_core() const { return Logical_Core::my_core(); }\n  inline int rank_on_threads_or_zero_on_processes()  const { return Memory_Semantics::rank_on_threads_or_zero_on_processes(); }\n  \n#else\nprivate:\n  // STEFAN: remember thread local information locally\n  // should be a lot faster, and we have a Interpreter==Core mapping anyway\n  const int _my_rank;\n  Logical_Core* const _my_core;\n  \npublic:\n  inline int my_rank()       const { return _my_rank; }\n  inline Logical_Core* my_core() const { return _my_core; }\n  inline int rank_on_threads_or_zero_on_processes()  const { return _my_rank; }\n#endif\n  void init_rank();\n  \n\n\n\n  static const int SemaphoresToSignalSize = 500;\n\tstatic const int PrimitiveExternalCallIndex = 117; // \"Primitive index for #primitiveExternalCall\"\n\tstatic const int MillisecondClockMask = 0x1FFFFFFF;\n\t// \"Note: The external primitive table should actually be dynamically sized but for the sake of inferior platforms (e.g., Mac :-) who cannot allocate memory in any reasonable way, we keep it static (and cross our fingers...)\"\n\tstatic const int MaxExternalPrimitiveTableSize = 4096; // \"entries\"\n\n  public:\n  Roots roots;\n  Method_Cache methodCache;\n  At_Cache atCache;\n private:\n  friend class Interpreter_Subset_For_Control_Transfer;\n  // these get send for control transfer\n  Object_p _activeContext_obj;  //STEFAN TODO come back here and think about the exact meaning and whether we want Object* here\n  Object_p _method_obj;\n  Object_p _theHomeContext_obj;\n public:\n  u_char* _instructionPointer; u_char* instructionPointer() const { return _instructionPointer; }  void set_instructionPointer(u_char* x) {  _instructionPointer = x; }\n  Oop*    _stackPointer;  Oop* stackPointer() const { return _stackPointer; } void set_stackPointer(Oop* x) { _stackPointer = x; }\n  \n  u_char currentBytecode; // interp version is out of order\n  bool   have_executed_currentBytecode;\n  \n  /** Bytecode dispatch facilities */\n  typedef void (Squeak_Interpreter::* bytecode_fn_t)(void);\n  #define DISPATCH_BYTECODE(bytecodeHandler)  (this->*(bytecodeHandler))()\n  bytecode_fn_t dispatch_table[256];\n  void build_dispatch_table();\n  \n  \n  oop_int_t interruptCheckCounter;\n  static const int interruptCheckCounter_force_value = -0x8000000; // must be neg\n  bool multicore_interrupt_check;\n  bool doing_primitiveClosureValueNoContextSwitch;\n  \n  bool suppress_context_switch_for_debugging;\n  \n  inline bool suppress_context_switching() const {\n    if (Include_Debugging_Code)\n      return suppress_context_switch_for_debugging;\n    else\n      return false;\n  }\n  \n  static const u_int64 all_cores_mask = ~0LL;\n  static u_int64 run_mask_value_for_core(int x) { return 1LL << x; }\n  void set_run_mask_and_request_yield(u_int64);\n\n  oop_int_t reclaimableContextCount;\n  bool  successFlag;\n  int32 primFailCode;\n\n\n# define FOR_ALL_BROADCAST(template) \\\n  template(int32,int32,semaphoresToSignalCountA, 0) \\\n  template(int32,int32,semaphoresToSignalCountB, 0) \\\n  \\\n  template(u_int64,u_int64,run_mask, all_cores_mask) \\\n  template(int32,int32,profile_after, -1) \\\n  template(int32,int32,quit_after, -1) \\\n  template(bool,bool,make_checkpoint, false) \\\n  template(bool,bool,use_checkpoint, false) \\\n  \\\n  template(bool,bool,fence, true) \\\n  template(bool,bool,print_moves_to_read_write, false) \\\n  template(Core_Tracer*,int32,core_tracer, NULL) \\\n  template(Oop_Tracer*,int32,mutated_read_mostly_object_tracer, NULL) \\\n  template(Execution_Tracer*,int32,execution_tracer, NULL) \\\n  template(GC_Debugging_Tracer*,int32,debugging_tracer, NULL) \\\n  \\\n  template(bool,bool,am_receiving_objects_from_snapshot, true) \\\n  \\\n  template(bool,bool,yield_requested, false) \\\n  template(int32,int32,process_object_layout_timestamp, 1) \\\n  template(int32,int32,num_chips, 1) \\\n  template(bool,bool,use_cpu_ms, false)\n\n\n\n# define FOR_ALL_FORMERLY_BROADCAST(template) /* just private now */ \\\n  template(int,int,interruptCheckCounterFeedBackReset,1000) \\\n  template(int32,int32,lastTick, 0) /* was shared, but that breaks Delay causes inter-thread skew causes false wrap in checkForInterrupts -- dmu */\n\n\n# define FOR_ALL_HELD_IN_SHARED_MEMORY(template) \\\n  template(int32,int32,gcSemaphoreIndex, 0) \\\n  template(int32,int32,interruptKeycode, 2094) /*cmd-.*/ \\\n  \\\n  template(int32,int32,nextWakeupTick, 0) \\\n  template(int32,int32,nextPollTick, 0) \\\n  template(int32,int32,pendingFinalizationSignals, 0) \\\n  template(bool,bool,signalLowSpace, false) \\\n  template(bool,bool,deferDisplayUpdates, false) \\\n  template(bool,bool,interruptPending, false) \\\n  template(bool,bool,idle_cores_relinquish_cpus, false) \\\n  \\\n  template(bool,bool,semaphoresUseBufferA, true) \\\n  template(bool,bool,primitiveThisProcess_was_called, false) \\\n  \\\n  template(External_Primitive_Table*, void*,externalPrimitiveTable, new External_Primitive_Table()) \\\n  \\\n  template(int, int,dnu_kvetch_count, 0)\n  \n\n# define DECL(REAL_T,BROADCAST_T,name,x) REAL_T _ ## name;\n  private:\n  FOR_ALL_BROADCAST(DECL)\n  FOR_ALL_FORMERLY_BROADCAST(DECL)\n\n\n  struct Shared_memory_fields {\n    FOR_ALL_HELD_IN_SHARED_MEMORY(DECL)\n# undef DECL\n  } *shared_memory_fields;\n\n  int32 _semaphoresToSignalA[SemaphoresToSignalSize]; // just the changed word\n  int32 _semaphoresToSignalB[SemaphoresToSignalSize]; // just the changed word\n\n\n# define GET_AND_SET(REAL_T,BROADCAST_T,name,init_val) \\\n  REAL_T name() { return _ ## name; }  \\\n  void set_ ## name(REAL_T x) { \\\n    _ ## name = x; \\\n    broadcast_ ## BROADCAST_T((BROADCAST_T*)&_ ## name); \\\n  }\npublic:\n  FOR_ALL_BROADCAST(GET_AND_SET)\n# undef GET_AND_SET\n\n# define GET_AND_SET(REAL_T,BROADCAST_T,name,init_val) \\\n  REAL_T name() { return _ ## name; } \\\n  void set_ ## name(REAL_T x) { _ ## name = x; }\n\n  FOR_ALL_FORMERLY_BROADCAST(GET_AND_SET)\n# undef GET_AND_SET\n\n# define GET_AND_SET(REAL_T,BROADCAST_T,name,init_val) \\\n  REAL_T name() { return shared_memory_fields->_ ## name; } \\\n  void   set_ ## name(REAL_T x) { shared_memory_fields->_ ## name = x; }\n\n  FOR_ALL_HELD_IN_SHARED_MEMORY(GET_AND_SET)\n# undef GET_AND_SET\n\n  int32 semaphoresToSignalA(int i) { return _semaphoresToSignalA[i]; }\n  void set_semaphoresToSignalA(int i, int x)  {\n    _semaphoresToSignalA[i] = x;\n    broadcast_int32(&_semaphoresToSignalA[i]);\n  }\n\n\n private:\n  static const int RemapBufferSize = 1024;\n  Oop remapBuffer[RemapBufferSize];\n  int remapBufferCount;\n\n  static const int Mutating_Objects_Size = 1024;\n  Oop mutated_read_mostly_objects[Mutating_Objects_Size];\n  int mutated_read_mostly_objects_count;\n\n  bool I_am_running;\n\n\n public:\n  void remember_to_move_mutated_read_mostly_object(Oop x);\n\n  \n  Safepoint_Tracker* safepoint_tracker;\n  Safepoint_Master_Control* safepoint_master_control;\n  \n  int32 image_version;\n\n  \n  oop_int_t primitiveIndex;\n\n\n\n  u_char  prevBytecode; // interp version is out of order\n  int     _argumentCount;\n  int     get_argumentCount() const { return _argumentCount; }\n  void    set_argumentCount(int x) { _argumentCount = x; } // for debugging, easy point to catch changes -- dmu 5/10\n\n  fn_t    primitiveFunctionPointer; bool do_primitive_on_main;\n\n\n  oop_int_t interruptChecksEveryNms;\n\n\n\n  fn_t    showSurfaceFn;\n  int     globalSessionID;\n\n  oop_int_t bcCount, last_gc_bcCount;\n\n  int yieldCount;\n  int interruptCheckCount, unforcedInterruptCheckCount;\n  u_int64 cyclesRunning, cyclesWaiting, cycles_at_yield, cycles_at_resume;\n  u_int64 cyclesMovingMutatedRead_MostlyObjects;\n  u_int32 numberOfMovedMutatedRead_MostlyObjects;\n\n  Performance_Counters perf_counter;\n  \n  \n  int     methodArgumentCount() { return get_argumentCount(); }\n  int     methodPrimitiveIndex() { return primitiveIndex; }\n\n private:\n  Object_p get_addr_to_cache(Oop x) { return x.as_object_if_mem(); }\n\n public:\n\n\n# define DO_ALL_CACHED_OBJS(template) \\\n  template(roots._activeContext,_activeContext_obj) \\\n  template(roots._method,_method_obj) \\\n  template(roots._theHomeContext,_theHomeContext_obj)\n\n\n\n  void sync_with_root(Oop x) {\n# define SWR(oopname,objname) if (oopname == x) objname = get_addr_to_cache(oopname);\n    DO_ALL_CACHED_OBJS(SWR)\n# undef SWR\n    assert_eq(activeContext_obj(), (void*)activeContext().as_object(), \"activeContext messed up\");\n  }\n\n  void sync_with_roots() {\n# define SWRS(oopname,objname) objname = get_addr_to_cache(oopname);\n    DO_ALL_CACHED_OBJS(SWRS)\n# undef SWRS\n    assert_eq(activeContext_obj(), (void*)activeContext().as_object(), \"activeContext messed up\");\n  }\n\n\n  bool need_to_sync_with_roots() { // for debugging\n# define NTSWRS(oopname,objname) if (objname != get_addr_to_cache(oopname)) return true;\n    DO_ALL_CACHED_OBJS(NTSWRS)\n# undef NTSWRS\n    return false;\n  }\n\n\n  void pushRemappableOop(Oop x) { remapBuffer[remapBufferCount++] = x; }\n  Oop  popRemappableOop()       { return remapBuffer[--remapBufferCount]; }\n  void popRemappableOops(int n) { remapBufferCount -= n; assert(remapBufferCount >= 0); }\n  Oop  topRemappableOop()       { assert(remapBufferCount > 0); return remapBuffer[remapBufferCount - 1]; }\n\n  void do_all_roots(Oop_Closure* oc);\n\n\n public:\n   int added_process_count;\n\n   OS_Mutex_Interface* get_scheduler_mutex() {  return &scheduler_mutex; }\n   OS_Mutex_Interface* get_semaphore_mutex() {  return &semaphore_mutex; }\n   OS_Mutex_Interface* get_safepoint_mutex() {  return &safepoint_mutex; }\n\n  private:\n   OS_Mutex_Interface scheduler_mutex;\n   OS_Mutex_Interface semaphore_mutex;\n   OS_Mutex_Interface safepoint_mutex; // this is not a complete mutex, it does not use underlying systems mutex\n\n   int* global_sequence_number;\n   int* print_sequence_number;\n   bool* debug_flag;\n\n  public:\n   int* debug_int;\n\n   int get_global_sequence_number() { return *global_sequence_number; }\n   int increment_global_sequence_number() { return ++*global_sequence_number; }\n   int get_print_sequence_number() { return *print_sequence_number; }\n   int increment_print_sequence_number() { return ++*print_sequence_number; }\n\n  bool get_debug_flag() { return *debug_flag; }\n   void set_debug_flag(bool b) { *debug_flag = b; }\n\n  Oop* running_process_by_core; // array per core of which process that core is running\n\n  int32* timeout_deferral_counters; // for deferring timeouts during long ops\n  \n  bool emergency_semaphore_signal_requested;\n\n\n public:\n\n  Oop      activeContext()     const { return roots._activeContext; }\n  Object_p activeContext_obj() const { return _activeContext_obj; }\n\n  void set_activeContext(Oop x, Object_p o) {\n    assert_eq(o->as_oop().bits(), x.bits(), \"activeContext messed up\");\n    roots._activeContext = x;\n    _activeContext_obj   = o;\n  }\n  void set_activeContext(Oop x) { set_activeContext(x, x.as_object()); }\n  void set_activeContext(Object_p x) { set_activeContext( x->as_oop(), x); }\n\n\n  Oop method() { return roots._method; }\n  Object_p method_obj() { return _method_obj; }\n  void set_method(Oop m) { roots._method = m;  _method_obj = m.as_object(); }\n  void set_method_obj(Object_p m) { roots._method = m->as_oop();  _method_obj = m; }\n\n  Oop      theHomeContext()     const { return roots._theHomeContext; }\n  Object_p theHomeContext_obj() const { return _theHomeContext_obj; }\n  void set_theHomeContext(Oop m) {  roots._theHomeContext = m;  _theHomeContext_obj = m.as_object(); }\n  void set_theHomeContext_obj(Object_p m) {  roots._theHomeContext = m->as_oop();  _theHomeContext_obj = m; }\n\n\n  Object_p receiver_obj()  { return roots.receiver.as_object(); }\n  Object_p newMethod_obj() { return roots.newMethod.as_object(); }\n  Object_p lkupClass_obj();\n\n  void print_method_info(const char* msg);\n  void print_stack_frame();\n  void preGCAction_here(bool fullGC);\n  void postGCAction_here(bool fullGC);\n  void preGCAction_everywhere(bool fullGC);\n  void postGCAction_everywhere(bool fullGC);\n\n\n\n  void initialize(Oop, bool from_checkpoint);\n  bool is_initialized();\n\n  void receive_initial_interpreter_from_main(Squeak_Interpreter*);\n\n  void flushInterpreterCaches();\n  void flushObsoleteIndexedPrimitives();\n  void flushExternalPrimitiveTable();\n\n  void inline primitiveFail() { successFlag = false; }\n  void inline primitiveFailFor(int32 reasonCode) { successFlag = false; primFailCode = reasonCode; }\n  bool inline failed() const { return !successFlag; }\n  void inline success(bool b) { successFlag = successFlag && b; }\n\n\n  void loadInitialContext();\n  void initialCleanup();\n\n  void fetchContextRegisters(Oop activeCntx, Object_p activeCntx_obj) {\n    assert(activeCntx_obj->as_oop() == activeCntx);\n    \n    // \"if the MethodIndex field is an integer, activeCntx is a block context\"\n    // \"otherwise, it is a method context and is its own home context \"\n    set_theHomeContext(\n                       activeCntx_obj->is_this_context_a_block_context()\n                       ? activeCntx_obj->fetchPointer(Object_Indices::HomeIndex).beRootIfOld()\n                       : activeCntx);\n    \n    roots.receiver = theHomeContext_obj()->fetchPointer(Object_Indices::ReceiverIndex);\n    set_method(theHomeContext_obj()->fetchPointer(Object_Indices::MethodIndex));\n\n    /*\n     \"the instruction pointer is a pointer variable equal to\n     method oop + ip + BaseHeaderSize\n     -1 for 0-based addressing of fetchByte\n     -1 because it gets incremented BEFORE fetching currentByte \"\n     */\n    oop_int_t ip_int = activeCntx_obj->quickFetchInteger(Object_Indices::InstructionPointerIndex);\n    _instructionPointer = method_obj()->as_u_char_p() + ip_int + Object::BaseHeaderSize - 2;\n\n    // \"the stack pointer is a pointer variable also...\"\n    oop_int_t sp_int = activeCntx_obj->quickFetchInteger(Object_Indices::StackPointerIndex);\n    _stackPointer = (Oop*) (activeCntx_obj->as_char_p() + Object::BaseHeaderSize + (Object_Indices::TempFrameStart + sp_int - 1) * bytesPerWord);\n\n\n    if (PrintFetchedContextRegisters) {\n      dittoing_stdout_printer->printf(\"fetchContextRegisters: theHomeContext(): \");\n      theHomeContext().print(dittoing_stdout_printer);\n      dittoing_stdout_printer->printf(\", activeContext: \");\n      activeCntx.print(dittoing_stdout_printer);\n      dittoing_stdout_printer->printf(\", receiver: \");\n      roots.receiver.print(dittoing_stdout_printer);\n      dittoing_stdout_printer->printf(\", method: \");\n      method().print(dittoing_stdout_printer);\n      dittoing_stdout_printer->printf(\", IP %d, SP %d\\n\", ip_int, sp_int);\n      dittoing_stdout_printer->printf(\"  instructionPointer 0x%x, stackPointer 0x%x\\n\",\n                                      _instructionPointer, _stackPointer);\n    }\n  }\n\n  void storeContextRegisters(Object_p cntx_obj) {\n    /*\n     \"InstructionPointer is a pointer variable equal to\n     method oop + ip + BaseHeaderSize\n     -1 for 0-based addressing of fetchByte\n     -1 because it gets incremented BEFORE fetching currentByte\"\n     */\n    if (!cntx_obj)\n      return;\n    cntx_obj->storeIntegerUnchecked_into_context(Object_Indices::InstructionPointerIndex,\n                                    instructionPointer() - method_obj()->as_u_char_p() - Object::BaseHeaderSize + 2 );\n    cntx_obj->storeIntegerUnchecked_into_context(Object_Indices::StackPointerIndex,\n                                    stackPointerIndex() - Object_Indices::TempFrameStart + 1);\n  }\n  \n\n  void flushExternalPrimitives();\n\n  void interpret();\n\n  inline void traceFetchNextBytecode(u_char currentBytecode) {\n    extern FILE* BytecodeTraceFile;\n\n    if (CheckByteCodeTrace && BytecodeTraceFile != NULL) {\n      static const int n = 10;\n      static bool initStatics = true;\n      static int bc_index[Memory_Semantics::max_num_threads_on_threads_or_1_on_processes];\n\n      if (initStatics) {\n        initStatics = false;\n        for (size_t iter = 0; iter < Memory_Semantics::max_num_threads_on_threads_or_1_on_processes; iter++) {\n          bc_index[iter] = -1;\n        }\n      }\n\n      static u_char bcs[Memory_Semantics::max_num_threads_on_threads_or_1_on_processes][n];   // threadsafe\n      static int counts[Memory_Semantics::max_num_threads_on_threads_or_1_on_processes][n];   // threadsafe\n\n      int rank_on_threads_or_zero_on_processes = Memory_Semantics::rank_on_threads_or_zero_on_processes();\n\n      u_char c = fgetc(BytecodeTraceFile);\n      if (c != currentBytecode) {\n        lprintf(\"mismatch at %d\\n\", bcCount);\n        for (int j = bc_index[rank_on_threads_or_zero_on_processes] +1;  j != bc_index[rank_on_threads_or_zero_on_processes];  ) {\n          if (++j >= n) j = 0;\n          lprintf(\"  %d: \", counts[rank_on_threads_or_zero_on_processes][j]);\n          printBC(bcs[rank_on_threads_or_zero_on_processes][j], dittoing_stdout_printer);  dittoing_stdout_printer->nl();\n        }\n        fatal();\n      }\n      if (++(bc_index[rank_on_threads_or_zero_on_processes]) >= n)  bc_index[rank_on_threads_or_zero_on_processes] = 0;\n      bcs[rank_on_threads_or_zero_on_processes][bc_index[rank_on_threads_or_zero_on_processes]] = currentBytecode;\n      counts[rank_on_threads_or_zero_on_processes][bc_index[rank_on_threads_or_zero_on_processes]] = bcCount;\n    }\n\n    ++bcCount;\n\n    if (MakeByteCodeTrace && BytecodeTraceFile != NULL) {\n      fputc(currentBytecode, BytecodeTraceFile);\n      static int last = 20000;\n      if (bcCount > last) {\n        fflush(BytecodeTraceFile);\n        last += 20000;\n      }\n    }\n    if (profile_after() >= 0  &&  bcCount > profile_after())\n      OS_Interface::profiler_enable();\n    if (quit_after() >= 0  &&  bcCount > quit_after())\n      primitiveQuit();\n  }\n\n  void fetchNextBytecode() {\n    /* \"This method fetches the next instruction (bytecode).\n        Each bytecode method is responsible for fetching the next bytecode,\n        preferably as early as possible to allow the memory system time\n        to process the request before the next dispatch.\" */\n\n    \n# if Track_Last_BC_For_Debugging\n    prev_pc_for_debugging = currentBytecode;\n    prev_bc_addr_for_debugging = bc_addr_for_debugging;\n    bc_addr_for_debugging = localIP();\n# endif\n    \n    prevBytecode = currentBytecode;\n    currentBytecode = fetchByte();\n    if (Check_Prefetch)  have_executed_currentBytecode = false;\n\n    if (!Dont_Trace_Bytecode_Fetching)\n      traceFetchNextBytecode(currentBytecode);\n    \n    PERF_CNT(this, count_bytecodes_executed());\n  }\n\n  u_char fetchByte() {\n    if (check_many_assertions) {\n      int IP_offset = instructionPointer() - method_obj()->as_u_char_p() + 1;\n      assert( IP_offset\n             >= (Object_Indices::LiteralStart + Object::literalCountOfHeader(method_obj()->methodHeader())) * bytesPerWord  +  1);\n      assert(IP_offset  <   method_obj()->byteLength() + Object::BaseHeaderSize);\n    }\n\n    set_instructionPointer(instructionPointer() + 1);\n    return *instructionPointer();\n  }\n\n  void dispatch(u_char currentByte);\n  void printBC(u_char, Printer*);\n  static const char* bytecode_name(u_char bc);\n\n\n\n  void pushReceiverVariable(int i) {\n    push(receiver_obj()->fetchPointer(i));\n  }\n  void pushTemporaryVariable(int temporaryIndex) {\n\t  push(temporary(temporaryIndex));\n  }\n  void pushLiteralConstant(int i) { push(literal(i)); }\n  void pushLiteralVariable(int i) {\n    push(literal(i).as_object()->fetchPointer(Object_Indices::ValueIndex));\n  }\n\n  Oop temporary(int offset) {\n    assert(theHomeContext_obj() != roots.nilObj.as_object());\n    return theHomeContext_obj()->fetchPointer(offset + Object_Indices::TempFrameStart);\n  }\n\n  Oop stackTop() const {return *stackPointer(); }\n  Oop popStack() { Oop r = *stackPointer(); set_stackPointer(stackPointer() - 1); return r; }\n\n  Oop stackValue(oop_int_t offset) const { return stackPointer()[-offset]; }\n\n\n  double stackFloatValue(oop_int_t offset) {\n    Oop floatOop = stackPointer()[-offset];\n    if (floatOop.fetchClass() != splObj(Special_Indices::ClassFloat)) {\n      primitiveFail();  return 0.0;\n    }\n    return floatOop.as_object()->fetchFloatAtinto();\n  }\n\n\n  oop_int_t stackIntegerValue(oop_int_t offset) {\n    return stackPointer()[-offset].checkedIntegerValue();\n  }\n  Oop stackObjectValue(int offset) {\n    Oop oop = stackPointer()[-offset];\n    if (oop.is_mem())  return oop;\n    primitiveFail();\n    return Oop::from_int(0);\n  }\n  oop_int_t integerValueOf(Oop x) {\n    return x.is_int() ? x.integerValue() : (primitiveFail(), 0);\n  }\n  bool booleanValueOf(Oop x) {\n    return\n      x == roots.trueObj ? true :\n      x == roots.falseObj ? false :\n      (successFlag = false);\n  }\n\n  double floatValueOf(Oop x) {\n    return x.is_mem() ? floatValueOf(x.as_object())\n                      : (success(false), 0.0);\n  }\n  double floatValueOf(Object_p x) {\n    assertClass(x, splObj(Special_Indices::ClassFloat));\n    return successFlag ? x->fetchFloatAtinto() : 0.0;\n  }\n\n\n  Oop literal(oop_int_t offset) {\n    return method_obj()->literal(offset);\n  }\n\n  void pop(int n)   { set_stackPointer(stackPointer() - n); }\n  void unPop(int n) { set_stackPointer(stackPointer() + n); }\n\n  void push(Oop x) { set_stackPointer(stackPointer() + 1); DEBUG_STORE_CHECK(stackPointer(), x);  *stackPointer() = x; }\n\n  void pushFloat(double d) { push(Object::floatObject(d)); }\n  void pushBool(bool b) { push(b ? roots.trueObj : roots.falseObj) ; }\n  void pushInteger(oop_int_t i) { push(Oop::from_int(i)); }\n\n#if Extra_Preheader_Word_Experiment\n  Oop modify_send_for_preheader_word(Oop rcvr);\n#endif\n\n  void normalSend() {\n    /*\n     \"Send a message, starting lookup with the receiver's class.\"\n     \"Assume: messageSelector and get_argumentCount() have been set, and that\n     the receiver and arguments have been pushed onto the stack,\"\n     \"Note: This method is inlined into the interpreter dispatch loop.\"\n     */\n    Oop rcvr = stackValue(get_argumentCount());\n\n#if Extra_Preheader_Word_Experiment \n    if (rcvr.is_mem() \n        && Oop::from_bits(rcvr.as_object()->get_extra_preheader_word()) != Oop::from_int(0) \n        && roots.messageSelector != roots.extra_preheader_word_selector\n        && roots.extra_preheader_word_selector != roots.nilObj\n        && !roots.messageSelector.as_object()->starts_with_string(\"perform\") // an escape!\n        ) \n      rcvr = modify_send_for_preheader_word(rcvr);\n#endif\n\n    roots.receiverClass = roots.lkupClass = rcvr.fetchClass();\n\n    assert(  roots.lkupClass.verify_oop()\n           &&     roots.lkupClass.is_mem()\n           &&     roots.lkupClass.as_object()->my_heap_contains_me()\n           &&     roots.lkupClass != roots.nilObj);\n\n    commonSend();\n  }\n\n\n\n  void superclassSend() {\n    /*\n     \"Send a message to self, starting lookup with the superclass of the class\n      containing the currently executing method.\"\n     \"Assume: messageSelector and get_argumentCount() have been set, and that \n      the receiver and arguments have been pushed onto the stack,\"\n     */\n    roots.lkupClass = method_obj()->methodClass().as_object()->superclass();\n    assert(roots.lkupClass.verify_oop());\n    roots.receiverClass = stackValue(get_argumentCount()).fetchClass();\n    commonSend();\n  }\n\n  inline void debugCommonSend() {\n    /* assertions and a breakpoint to aid debugging */\n\n    static int nMatches = 1;    // is not threadsafe, but logic seems to be flawed anyway, nMatches is not reset, so its not the NthSendForStopping, but only after overflow??\n\n    if (PrintSends) {\n      Printer* p = stdout_printer;\n      p->printf(\"commonSend Rcvr: \");\n      stackValue(get_argumentCount()).print(p);\n      p->printf(\" Class: \");\n      roots.receiverClass.print(p);\n      p->printf(\" Sel: \");\n      roots.messageSelector.print(p);\n      for (int i = get_argumentCount() - 1;  i >= 0;  --i)\n        p->printf(\"  \"), stackValue(i).print(p);\n      p->nl();\n\n    }\n    if (StopOnSend && roots.messageSelector.as_object()->equals_string(StopOnSend)\n        &&  (NthSendForStopping <= 0 || nMatches++ == NthSendForStopping))\n      breakpoint();\n    if (check_assertions && roots.messageSelector.as_object()->equals_string(\"error:\")) { // xxx_dmu\n      stdout_printer->printf(\" error: \"); stackTop().print(stdout_printer); stdout_printer->nl();\n      roots.messageSelector.print(dittoing_stdout_printer), stdout_printer->nl();\n    }\n    if (check_assertions && roots.messageSelector.as_object()->equals_string(\"openNotifierContents:label:\")) // xxx_dmu\n      dittoing_stdout_printer->printf(\"on %d: \", my_rank()), roots.messageSelector.print(dittoing_stdout_printer), dittoing_stdout_printer->nl();\n\n    if (check_assertions && roots.messageSelector.as_object()->equals_string(\"primitiveFailed\")) // xxx_dmu\n      roots.messageSelector.print(dittoing_stdout_printer), \n      dittoing_stdout_printer->nl();\n\n    if (check_assertions && roots.messageSelector.as_object()->equals_string(\"yourSelectorHere\")) // xxx_dmu\n      roots.messageSelector.print(dittoing_stdout_printer),\n      dittoing_stdout_printer->nl(),\n      print_all_stack_traces(dittoing_stdout_printer);\n\n    if (check_assertions && roots.messageSelector.as_object()->equals_string(\"cannotReturn:\")) // xxx_dmu\n      print_stack_trace(dittoing_stdout_printer), breakpoint();\n  }\n\n\n  void commonSend() {\n    /*\n     \"Send a message, starting lookup with the receiver's class.\"\n     \"Assume: messageSelector and get_argumentCount() have been set, and that\n     the receiver and arguments have been pushed onto the stack,\"\n     \"Note: This method is inlined into the interpreter dispatch loop.\"\n     */\n\n    debugCommonSend();\n\n    findNewMethod();\n    internalExecuteNewMethod();\n    if (process_is_scheduled_and_executing()) // xxxxxxx predicate only needed to satisfy assertions?\n      fetchNextBytecode();\n  }\n\n\n  void findNewMethod() {\n    /*\n     \"Find the compiled method to be run when the current messageSelector is\n      sent to the class 'roots.lkupClass', setting the values of\n      'roots.newMethod' and 'primitiveIndex'.\"\n     */\n    if (!lookupInMethodCacheSel(roots.messageSelector, roots.lkupClass)) {\n      // \"entry was not found in the cache; look it up the hard way\"\n      {\n        Safepoint_Ability sa(true);\n        lookupMethodInClass(roots.lkupClass); // may have to allocate message obj\n      }\n      addNewMethodToCache();\n    }\n  }\n\n  void internalExecuteNewMethod();\n  \n  void copy_args_into_context(Oop* const content_part_of_ctx, int argCnt) const;\n\n\n  void activateNewMethod();\n# if Include_Closure_Support\n  void activateNewClosureMethod(Object_p, Object_p);\n# endif\n\n\n\n  bool lookupInMethodCacheSel(Oop msgSel, Oop klass) {\n    Method_Cache::entry* e = methodCache.at(msgSel, klass);\n    if (e == NULL)\n      return false;\n    roots.newMethod = e->method;\n    primitiveIndex = e->prim;\n    roots.newNativeMethod = e->native;\n    primitiveFunctionPointer = e->primFunction;\n    assert(primitiveIndex == 0  ||  primitiveFunctionPointer != NULL);\n    do_primitive_on_main = e->do_primitive_on_main;\n    return true;\n  }\n\n  Oop lookupMethodInClass(Oop lkupClass);\n  void findNewMethodInClass(Oop klass);\n\n  void addNewMethodToCache() {\n    primitiveFunctionPointer = primitiveTable.contents[primitiveIndex];\n    do_primitive_on_main = primitiveTable.execute_on_main[primitiveIndex];\n\n    methodCache.addNewMethod(roots.messageSelector, roots.lkupClass, roots.newMethod,\n                             primitiveIndex, roots.newNativeMethod, primitiveFunctionPointer, do_primitive_on_main);\n  }\n\n\n  void popThenPush(int n, Oop x) { set_stackPointer(stackPointer() - (n - 1));  DEBUG_STORE_CHECK(stackPointer(), x);  *stackPointer() = x; }\n  void popThenPushInteger(int n, oop_int_t i) {\n    popThenPush(n, Oop::from_int(i));\n  }\n  void pop2AndPushIntegerIfOK(oop_int_t r) {\n    if (!successFlag)\n      ;\n    else if (Oop::isIntegerValue(r))\n      popThenPush(2, Oop::from_int(r));\n    else\n      successFlag = false;\n  }\n  double popFloat() {\n    Oop top = popStack();\n    assertClass(top, splObj(Special_Indices::ClassFloat));\n    return successFlag  ?  top.as_object()->fetchFloatAtinto() : 0.0;\n  }\n  oop_int_t popInteger() {\n    return popStack().checkedIntegerValue();\n  }\n  oop_int_t popPos32BitInteger() {\n    return positive32BitValueOf(popStack());\n  }\n\n  int stackPointerIndex() {\n    return stackPointer() - activeContext_obj()->as_oop_p() - Object::BaseHeaderSize/sizeof(Oop);\n  }\n    \n  void run_primitive_on_main_from_elsewhere(fn_t);\n  void dispatchFunctionPointer(fn_t f, bool on_main);\n  void dispatchFunctionPointer(int i, Primitive_Table *pt) {\n    dispatchFunctionPointer(pt->contents[i], pt->execute_on_main[i]);\n  }\n\n  bool balancedStackAfterPrimitive(int, int, int, Oop);\n  void printUnbalancedStack(int, fn_t);\n\n\n  void quickCheckForInterrupts() {\n    if (suppress_context_switching())\n      return;\n    \n    /*\n     \"Quick check for possible user or timer interrupts. Decrement a counter\n      and only do a real check when counter reaches zero or when a low space\n      or user interrupt is pending.\"\n     \"Note: Clients that trigger interrupts should set use forceInterruptCheck\n      to set interruptCheckCounter to zero and get immediate results.\"\n     \"Note: Requires that instructionPointer and stackPointer be external.\"\n     */\n    if (--interruptCheckCounter <= 0) {\n      checkForInterrupts();\n    }\n  }\n\n\n  void forceInterruptCheck() {\n    interruptCheckCounter = interruptCheckCounter_force_value;\n    set_nextPollTick(0);\n  }\n\n  void createActualMessageTo(Oop);\n\n  bool lookupMethodInDictionary(Oop dictionary) {\n    /*\n     \"This method lookup tolerates integers as Dictionary keys to\n     support execution of images in which Symbols have been\n     compacted out\"\n     */\n    Object_p dictionary_obj = dictionary.as_object();\n    int length = dictionary_obj->fetchWordLength();\n    oop_int_t mask = length - Object_Indices::SelectorStart - 1;\n    int index =\n    Object_Indices::SelectorStart +\n    (mask &  (roots.messageSelector.is_int() ? roots.messageSelector.integerValue() : roots.messageSelector.as_object()->hashBits()));\n    /*\n     \"It is assumed that there are some nils in this dictionary, and search\n      will stop when one is encountered. However, if there are no nils, then\n      wrapAround\n     will be detected the second time the loop gets to the end of the table.\"\n     */\n    bool wrapAround = false;\n    for (;;) {\n      Oop nextSelector = dictionary_obj->fetchPointer(index);\n      if (nextSelector == roots.nilObj) return false;\n      if (nextSelector == roots.messageSelector)\n        break;\n      ++index;\n\n      if (index == length) {\n        if (wrapAround)\n          return false;\n        wrapAround = true;\n        index = Object_Indices::SelectorStart;\n      }\n    }\n    Oop methodArray = dictionary_obj->fetchPointer(Object_Indices::MethodArrayIndex);\n    Object_p methodArray_obj = methodArray.as_object();\n\n    if (PrintMethodDictionaryLookups) {\n      dittoing_stdout_printer->printf(\"lookupMethodInDictionary: index = %d\\n\", index);\n      for (int i = Object_Indices::SelectorStart;  i < length;  ++i) {\n        dittoing_stdout_printer->printf(\"i = %d, \", i);\n        dictionary_obj->fetchPointer(i).print(dittoing_stdout_printer);\n        dittoing_stdout_printer->printf(\", \");\n        Oop m = methodArray_obj->fetchPointer(i - Object_Indices::SelectorStart);\n        m.print(dittoing_stdout_printer);\n        if (m.as_object()->isCompiledMethod()) {\n          dittoing_stdout_printer->printf(\", Obj 0x%x, firstByte: %d\", (Object*)m.as_object(),\n                                          *(u_char*)(m.as_object()->first_byte_address()));\n        }\n        dittoing_stdout_printer->nl();\n      }\n    }\n    roots.newMethod = methodArray_obj->fetchPointer(index - Object_Indices::SelectorStart);\n    // \"Check if roots.newMethod is a CompiledMethod.\"\n    Object_p nmo = newMethod_obj();\n    if (!nmo->isCompiledMethod()) {\n      // \"indicate that this is no compiled method - use primitiveInvokeObjectAsMethod\"\n      primitiveIndex = 248;\n    }\n    else {\n      primitiveIndex = nmo->primitiveIndex();\n      if (primitiveIndex > Object::MaxPrimitiveIndex()) {\n        /* \"If primitiveIndex is out of range, set to zero before putting in\n         cache. This is equiv to primFail, and avoids the need to check on\n         every send.\"\n         */\n        primitiveIndex = 0;\n      }\n    }\n    return true;\n  }\n\n\n  void booleanCheat(bool cond);\n\n\n  int32 long_jump_offset() {\n    return (((currentBytecode & 7) - 4) << 8)\n    | fetchByte();\n  }\n\n  int32 long_cond_jump_offset() {\n    return ((currentBytecode & 3) << 8)\n    | fetchByte();\n  }\n\n  void jump(int offset) {\n    set_instructionPointer(instructionPointer() + offset + 1);\n    if (check_many_assertions)\n      assert(instructionPointer() - method_obj()->as_u_char_p()\n           >= (Object_Indices::LiteralStart + Object::literalCountOfHeader(method_obj()->methodHeader())) * bytesPerWord  +  1);\n    \n# if Trace_Last_BC_For_Debugging\n    prev_bc_for_debugging = currentBytecode;\n    prev_bc_addr_for_debugging = bc_addr_for_debugging;\n    bc_addr_for_debugging = instructionPointer();\n# endif\n    \n    currentBytecode = byteAtPointer(instructionPointer());\n    if (Check_Prefetch)  have_executed_currentBytecode = false;\n  }\n  \n  void jumpIfFalseBy(int offset) {\n    Oop b = stackTop();\n    if (b == roots.falseObj)\n      jump(offset);\n    else if (b == roots.trueObj)\n      fetchNextBytecode();\n    else {\n      roots.messageSelector = splObj(Special_Indices::SelectorMustBeBoolean);\n      set_argumentCount(0);\n      normalSend();\n      return;\n    }\n    pop(1);\n  }\n  void jumpIfTrueBy(int offset) {\n    Oop b = stackTop();\n    if (b == roots.trueObj)\n      jump(offset);\n    else if (b == roots.falseObj)\n      fetchNextBytecode();\n    else {\n      roots.messageSelector = splObj(Special_Indices::SelectorMustBeBoolean);\n      set_argumentCount(0);\n      normalSend();\n      return;\n    }\n    pop(1);\n  }\n  u_char byteAtPointer(u_char* p) { return *p; }\n  void checkForInterrupts(bool is_safe_to_process_events = true);\n\n  void transfer_to_highest_priority(const char*);\n\n  void resume(Oop, const char*);\n  void yield(const char*);\n  bool interruptCheckForced() {\n    // was forced by outside code?\n    return interruptCheckCounter  <= interruptCheckCounter_force_value;\n  }\n  void signalExternalSemaphores(const char*);\n\n  void signalSema(int index, const char* why) {\n    Oop sema = splObj(index);\n    Safepoint_Ability sa(false);\n    if (sema != roots.nilObj)\n      sema.as_object()->synchronousSignal(why);\n  }\n\n  void signalSemaphoreWithIndex(int index);\n  Oop schedulerPointer() {\n    return splObj_obj(Special_Indices::SchedulerAssociation)\n            ->fetchPointer(Object_Indices::ValueIndex);\n  }\n  Object_p schedulerPointer_obj() { return schedulerPointer().as_object(); }\n\n  Object_p process_lists_of_scheduler() {\n    return schedulerPointer_obj()->fetchPointer(Object_Indices::ProcessListsIndex).as_object();\n  }\n\n  Oop  get_running_process();\n  void set_running_process(Oop, const char*);\n\n\n  void put_running_process_to_sleep(const char*);\n  Oop remove_running_process_from_scheduler_lists_and_put_it_to_sleep(const char*);\n\n  void transferTo(Oop newProc, const char* why);\n  void start_running(Oop newProc, const char*);\n  Oop  find_and_move_to_end_highest_priority_non_running_process();\n  int count_processes_in_scheduler();\n\n  void newActiveContext(Oop aContext, Object_p aContext_obj) {\n    assert(aContext_obj->as_oop() == aContext);\n    // internalNewActiveContext must stay consistent with this\n    if (process_is_scheduled_and_executing())\n      storeContextRegisters(activeContext_obj());\n    aContext.beRootIfOld();\n    assert(aContext != roots.nilObj); // looking for bug with nil ctx, nonnil proc\n    set_activeContext( aContext, aContext_obj );\n    fetchContextRegisters(aContext, aContext_obj);\n  }\n  \n  void commonReturn(Oop localReturnContext, Oop localReturnValue);\n\n# if Include_Closure_Support\n  Oop sender() {\n    Object_p context_obj = theHomeContext_obj();\n    Oop n = roots.nilObj;\n    for (;;) {\n      Oop closureOrNil = context_obj->fetchPointer(Object_Indices::ClosureIndex);\n      if (closureOrNil == n) break;\n      context_obj = closureOrNil.as_object()->fetchPointer(Object_Indices::ClosureOuterContextIndex).as_object();\n    }\n    return context_obj->fetchPointer(Object_Indices::SenderIndex);\n  }\n# else\n  Oop sender() { return localHomeContext()->fetchPointer(Object_Indices::SenderIndex); }\n# endif\n\n  Oop caller() { return activeContext_obj()->fetchPointer(Object_Indices::CallerIndex); }\n\n  void cannotReturn(Oop resultObj, bool, bool, bool);\n\n  void aboutToReturn(Oop resultObj, Oop aContext);\n\n\n  void recycleContextIfPossible_on_its_core(Oop ctx);\n  void recycleContextIfPossible_here(Oop ctx);\n\n  bool areIntegers(Oop r, Oop a) { return r.bits() & a.bits() & Int_Tag; }\n\n# include \"interpreter_primitives.h\"\n# include \"interpreter_bytecodes.h\"\n\n\n  oop_int_t doPrimitiveDiv(Oop rcvr, Oop arg);\n  oop_int_t doPrimitiveMod(Oop rcvr, Oop arg);\n\n\nprivate:\n  bool roomToPushNArgs(int);\n  \n  \npublic:  \n\n\n\n  double loadFloatOrIntFrom(Oop x) {\n    if (x.is_int())  return (double)x.integerValue();\n    Object_p xo = x.as_object();\n    if (xo->fetchClass() == splObj(Special_Indices::ClassFloat))\n      return floatValueOf(xo);\n    successFlag = false;\n    return 0.0;\n  }\n\n  Oop specialSelector(int index) {\n    return splObj_obj(Special_Indices::SpecialSelectors)->fetchPointer(index * 2);\n  }\n\n  Logical_Core* coreWithSufficientSpaceToInstantiate(Oop klass, oop_int_t indexableSize);\n\n\n  Oop commonVariableAt(Oop rcvr, oop_int_t index, At_Cache::Entry* e, bool);\n\n\n  void commonVariableAtPut(Oop rcvr, oop_int_t index, Oop value, At_Cache::Entry* e);\n\n  int32 positive32BitValueOf(Oop x);\n  int32 signed32BitValueOf(Oop x);\n  int64 positive64BitValueOf(Oop x);\n  int64 signed64BitValueOf(Oop x);\n\n  Oop asciiOfCharacter(Oop c) {\n    assertClass(c, splObj(Special_Indices::ClassCharacter));\n    return successFlag ? c.as_object()->fetchPointer(Object_Indices::CharacterValueIndex)\n    : Oop::from_int(0);\n  }\n\n\n  void assertClass(Oop x, Oop klass) {\n    if (x.is_int()) {\n      successFlag = false;\n      return;\n    }\n    assertClass(x.as_object(), klass);\n  }\n\n  void assertClass(Object_p x, Oop klass) {\n    success(x->fetchClass() == klass);\n  }\n\n  void commonAt(bool);\n  void commonAtPut(bool);\n\n\n\n  Oop  stObjectAt(Object_p a, oop_int_t index);\n  void stObjectAtPut(Object_p a, oop_int_t index, Oop value);\n\n\n  Oop  subscript(Object_p a, oop_int_t index);\n  void subscript(Object_p a, oop_int_t index, Oop value);\n\n  void changeClass(Oop rcvr, Oop argClass, bool defer);\n\n\n\n  oop_int_t compare31or32BitsEqual(Oop obj1, Oop obj2) {\n    return\n    obj1.is_int()  &&  obj2.is_int()  ?  obj1 == obj2\n    :  positive32BitValueOf(obj1) == positive32BitValueOf(obj2);\n  }\n\n\n  void checkBooleanResult(bool b) {\n    if (successFlag)  pushBool(b);\n    else              unPop(2);\n  }\n  void executeNewMethod();\n\n\n  void executeNewMethodFromCache() {\n    int nArgs, delta;\n    Oop pre_prim_active_context;\n    if (primitiveIndex > 0) {\n      Safepoint_Ability sa(true);\n      if (DoBalanceChecks) {\n        nArgs = get_argumentCount();\n        delta = stackPointer() - activeContext_obj()->as_oop_p();\n        pre_prim_active_context = activeContext();\n      }\n      successFlag = true;\n      dispatchFunctionPointer(primitiveFunctionPointer, do_primitive_on_main);\n      // branch direct to prim fn\n      if (DoBalanceChecks  &&  !balancedStackAfterPrimitive(delta, primitiveIndex, nArgs, pre_prim_active_context))\n        printUnbalancedStack(primitiveIndex, primitiveFunctionPointer);\n      if (successFlag) return;\n    }\n    activateNewMethod();\n    quickCheckForInterrupts();\n  }\n\n\n  bool primitiveResponse();\n  void primitivePerformAt(Oop);\n\n  Oop characterForAscii(char c) {\n    return splObj_obj(Special_Indices::CharacterTable)->fetchPointer(u_char(c));\n  }\n\n\n  void transferFromIndexOfObjectToIndexOfObject(oop_int_t count,\n                                                oop_int_t firstFrom, Object_p fromObj,\n                                                oop_int_t firstTo,   Object_p   toObj) {\n    // assume beRootIfOld: will be called on toOop\n    static const int offset = Object::BaseHeaderSize / sizeof(Oop);\n    oopcpy_no_store_check(toObj->as_oop_p() + firstTo + offset,  fromObj->as_oop_p() + firstFrom + offset, count, toObj);\n  }\n\n  void snapshot(bool);\n  void snapshotCleanUp();\n\n  void     displayBitsOf(Oop, oop_int_t, oop_int_t, oop_int_t, oop_int_t);\n  void showDisplayBitsOf(Oop, oop_int_t, oop_int_t, oop_int_t, oop_int_t);\n  void fullDisplayUpdate();\n\n  void print_stack_trace(Printer*, Object_p proc = (Object_p)NULL);\n  uint32_t count_stack_depth();\n  void print_all_stack_traces(Printer*);\n  void print_process_lists(Printer*);\n  void print_all_processes_in_scheduler(Printer*, bool);\n  bool verify_all_processes_in_scheduler();\n  void print_all_instances_of_class_process(Printer*, bool);\n  void print_all_processes_in_scheduler_or_on_a_list(Printer*, bool);\n  bool is_process_on_a_scheduler_list(Oop);\n\n  void copyBits();\n  void copyBitsFromtoat(oop_int_t, oop_int_t, oop_int_t);\n\n  oop_int_t ioFilenamefromStringofLengthresolveAliases(char* aCharBuffer, char* filenameIndex, oop_int_t filenameLength, oop_int_t resolveFlag);\n\n\n\n  Oop splObj(oop_int_t i) {\n    return roots.specialObjectsOop.as_object()->fetchPointer(i);\n  }\n\n  Object_p splObj_obj(oop_int_t i) {\n    return splObj(i).as_object();\n  }\n\n\n\n\n  Object_p classString()   { return splObj_obj(Special_Indices::ClassString); }\n\n  Oop     displayObject();\n\n  void obtain_context_object(bool large, Object_p& nco, Oop& newContext);\n  \n  Object_p allocateOrRecycleContext(bool needsLarge);\n\n  Oop* initialize_context(Object_p nco, oop_int_t methodHeader) const;\n  void clear_temps_in_context(Oop* const content_part_of_ctx, int argCnt, int tmpCnt) const;\n  \n  bool verify();\n\n  Oop get_stats(int);\n\n  int makeArrayStart() { return remapBufferCount; }\n  Oop makeArray(int start);\n\n# define PUSH_FOR_MAKE_ARRAY(expr) \\\n  (The_Squeak_Interpreter()->pushRemappableOop(expr))\n\n# define PUSH_STRING_FOR_MAKE_ARRAY(expr)  \\\n  PUSH_FOR_MAKE_ARRAY(Object::makeString(expr)->as_oop())\n\n# define PUSH_POSITIVE_32_BIT_INT_FOR_MAKE_ARRAY(expr)  \\\n  PUSH_FOR_MAKE_ARRAY(Object::positive32BitIntegerFor(expr))\n\n# define PUSH_POSITIVE_64_BIT_INT_FOR_MAKE_ARRAY(expr)  \\\n  PUSH_FOR_MAKE_ARRAY(Object::positive64BitIntegerFor(expr))\n\n# define PUSH_BOOL_FOR_MAKE_ARRAY(expr)  \\\n  PUSH_FOR_MAKE_ARRAY((expr) ? The_Squeak_Interpreter()->roots.trueObj : The_Squeak_Interpreter()->roots.falseObj)\n\n\n\n# define PUSH_WITH_STRING_FOR_MAKE_ARRAY(expr)  \\\n  (PUSH_FOR_MAKE_ARRAY(Object::makeString(#expr)->as_oop()), \\\n   PUSH_FOR_MAKE_ARRAY(expr))\n\n# define PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(expr)  \\\n  ( PUSH_FOR_MAKE_ARRAY(Object::makeString(#expr)->as_oop()), \\\n    PUSH_FOR_MAKE_ARRAY(Object::positive32BitIntegerFor(expr)))\n\n# define PUSH_POSITIVE_64_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(expr)  \\\n  ( PUSH_FOR_MAKE_ARRAY(Object::makeString(#expr)->as_oop()), \\\n    PUSH_FOR_MAKE_ARRAY(Object::positive64BitIntegerFor(expr)))\n\n# define PUSH_BOOL_WITH_STRING_FOR_MAKE_ARRAY(expr)  \\\n( PUSH_FOR_MAKE_ARRAY(Object::makeString(#expr)->as_oop()), \\\n  PUSH_BOOL_FOR_MAKE_ARRAY((expr)))\n\n private:\n  bool verify_active_context_through_stack_top();\n  void let_one_through();\n public:\n\n  \n  void unset_running_process();\n  bool process_is_scheduled_and_executing();\n\n private:\n  void check_for_multicore_interrupt() {\n    assert(multicore_interrupt_check  ||  process_is_scheduled_and_executing());\n    \n    if (suppress_context_switching())\n      return;\n    \n    // xxxxxx If set multicore_interrupt_check whenever yield_requested() \n    //        will be true, could speed up this test.\n    // -- dmu 4/09\n    if (multicore_interrupt_check || yield_requested() || Message_Queue::are_data_available(my_core()))\n       multicore_interrupt();\n  }\n\n  void multicore_interrupt();\n  void try_to_find_a_process_to_run_and_start_running_it();\n  void minimize_scheduler_mutex_load_by_spinning_till_there_might_be_a_runnable_process();\n\n  \n  void give_up_CPU_instead_of_spinning(uint32_t&);\n  void fixup_localIP_after_being_transferred_to();\n private:\n  void move_mutated_read_mostly_objects();\n\n  bool is_ok_to_run_on(int rank) {\n    return ((1LL << u_int64(rank)) & run_mask()) ? true : false;\n  }\n  bool is_ok_to_run_on_me() {\n    return (Logical_Core::my_rank_mask() & run_mask()) ? true : false;\n  }\n\n\n  void update_times_when_resuming();\n  void update_times_when_yielding();\n  void update_times_when_asking();\n\n  void save_to_checkpoint(FILE*);\n  void restore_from_checkpoint(FILE*);\n public:\n  void save_all_to_checkpoint();\n  void restore_all_from_checkpoint(int dataSize, int lastHash, int savedWindowSize, int fullScreenFlag);\n\n  void trace_execution();\n  void print_execution_trace();\n  void trace_for_debugging();\n\n  void assert_method_is_correct(bool will_be_fetched, const char* where) {\n    if (Always_Check_Method_Is_Correct | check_assertions) check_method_is_correct(will_be_fetched, where);\n  }\n  \n  \n  \n\n  void check_method_is_correct(bool, const char*); // for debugging\n\n  void undo_prefetch() {\n    if (Check_Prefetch) assert_always(!have_executed_currentBytecode);\n    set_instructionPointer(instructionPointer() - 1); // send bytecode incremented this in fetchNextBytecode, but we want original value so yield can store it\n    if (Check_Prefetch) have_executed_currentBytecode = true;\n  }\n\n  void signalFinalization(Oop);\n\n  void handle_sigint();\n  void print_info();\n  void signal_emergency_semaphore();\n\nprivate:\n  int literal_index_of_bytecode(u_char*);\n  \n  \n  oop_int_t compute_primitive_index(Object_p lo);\n  \n  bool lookup_in_externalPrimitiveTable(Object_p lo);\n  \n  void fetch_module_and_fn_name(Object_p lo, \n                                Oop& moduleName, Object_p& mno, int& moduleLength,\n                                Oop& functionName, Object_p& fno, int& functionLength);\n  void lookup_in_obsoleteNamedPrimitiveTable(Oop functionName, Object_p& fno, int functionLength,\n                                             Oop  moduleName, Object_p& mno, int moduleLength,\n                                             bool& on_main, fn_t& addr);\n  fn_t munge_arguments_and_load_function_from_plugin_on_main(Oop functionName, Object_p& fno, int functionLength,\n                                                             Oop  moduleName, Object_p& mno, int moduleLength);\n  void update_cache_and_call_external_function(Object_p fno, oop_int_t ii, fn_t addr, bool on_main);  \n  void update_cache_and_report_failure_to_load_external_function(Object_p mno, Object_p fno);  \n  \nprivate:\n  void broadcast_u_int64(u_int64*);\n  void broadcast_int32(int32* w);\n  void broadcast_bool(bool* b);\nprivate:\n  void broadcast_datum(int size, void* p, u_int64 d);\n  \n\n\npublic:\n  Safepoint_Ability *safepoint_ability;\n\n  void distribute_initial_interpreter();\n  void receive_initial_interpreter();\n  \n# if Dump_Bytecode_Cycles\n  u_int64 bc_cycles[10000];\n  u_int64 bc_cycles_tare;\n  int bc_cycles_index;\n# endif\n  \n# if Track_Last_BC_For_Debugging\n  u_char  prev_bc_for_debugging;\n  u_char* prev_bc_addr_for_debugging;\n  u_char* bc_addr_for_debugging;  \n# endif\n  \n  \npublic:\n  inline int ioWhicheverMSecs() {\n    return use_cpu_ms() ? ioCPUMSecs() : ioMSecs();\n  }\n  static int ioCPUMSecs();\n    \n  bool getNextEvent_any_platform(void*);\n};\n\n\n\n\n\n\n# define FOR_EACH_READY_PROCESS_LIST(slo, pri, list_obj, interp) /* highest to lowest priority */ \\\n/* pri must be an int or oop_int_t, list_obj must be an object* */ \\\nObject_p slo = interp->process_lists_of_scheduler(); \\\nObject_p list_obj; \\\noop_int_t pri; \\\nfor ( pri = slo->fetchWordLength() - 1;  \\\n     pri >= 0  &&  (list_obj = slo->fetchPointer(pri).as_object());  \\\n--pri)\n\n"
  },
  {
    "path": "vm/src/linux_bash_profile",
    "content": "# .bash_profile\n\n# Get the aliases and functions\nif [ -f ~/.bashrc ]; then\n\t. ~/.bashrc\nfi\n\n# User specific environment and startup programs\n\nexport PATH=$PATH:$HOME/bin:/sbin:/opt/Tilera/tile64/bin\nexport TILERA_ROOT=/opt/Tilera/tile64\nexport TileraMDE=/opt/Tilera/tile64"
  },
  {
    "path": "vm/src/linux_bashrc",
    "content": "alias setdisp=\"export DISPLAY=10.0.1.250:0\"\nalias setdispa=\"export DISPLAY=10.0.1.250:0\"\n\nalias aprofB=\"tile-monitor --pci --bootrom vmlinux-pci-RVM --export /home/ungar/renaissance --cd /home/ungar/renaissance/rvm/run --profile-init --profile-kernel --profile-events '--event=ONE:750000 --event=MP_BUNDLE_RETIRED:750000'  --profile-flags '--callgraph=10' --rtc --env DISPLAY=10.0.1.250:0 --env SQUEAK_NOTIMER=1 --profile-start --run --- rvm -geom 5,1 /home/ungar/renaissance/rvm/run/basicSqueak_8_25_base_1.image ---\"\nalias aprof2B=\"tile-monitor --pci --bootrom vmlinux-pci-RVM --export /home/ungar/renaissance --cd /home/ungar/renaissance/rvm/run --profile-init --profile-kernel --profile-events '--event=ONE:750000 --event=MP_BUNDLE_RETIRED:750000' --profile-flags '--callgraph=10' --rtc --env DISPLAY=10.0.1.250:0 --env SQUEAK_NOTIMER=1 --profile-start --run --- rvm -geom 5,1 /home/ungar/renaissance/rvm/run/basicSqueak_8_25_base_2.image ---\"\nalias aprofI=\"tile-monitor --pci --bootrom vmlinux-pci-RVM --export /home/ungar/renaissance --cd /home/ungar/renaissance/rvm/run --profile-init --profile-kernel --profile-events '--event=ONE:750000 --event=MP_INSTRUCTION_CACHE_STALL:750000'  --profile-flags '--callgraph=10' --rtc --env DISPLAY=10.0.1.250:0 --env SQUEAK_NOTIMER=1 --profile-start --run --- rvm -geom 5,1 /home/ungar/renaissance/rvm/run/basicSqueak_8_25_base_1.image ---\"\nalias aprof2I=\"tile-monitor --pci --bootrom vmlinux-pci-RVM --export /home/ungar/renaissance --cd /home/ungar/renaissance/rvm/run --profile-init --profile-kernel --profile-events '--event=ONE:750000 --event=MP_INSTRUCTION_CACHE_STALL:750000' --profile-flags '--callgraph=10' --rtc --env DISPLAY=10.0.1.250:0 --env SQUEAK_NOTIMER=1 --profile-start --run --- rvm -geom 5,1 /home/ungar/renaissance/rvm/run/basicSqueak_8_25_base_2.image ---\"\nalias aprofD=\"tile-monitor --pci --bootrom vmlinux-pci-RVM --export /home/ungar/renaissance --cd /home/ungar/renaissance/rvm/run --profile-init --profile-kernel --profile-events '--event=ONE:750000 --event=MP_DATA_CACHE_STALL:750000'  --profile-flags '--callgraph=10' --rtc --env DISPLAY=10.0.1.250:0 --env SQUEAK_NOTIMER=1 --profile-start --run --- rvm -geom 5,1 /home/ungar/renaissance/rvm/run/basicSqueak_8_25_base_1.image ---\"\nalias aprof2D=\"tile-monitor --pci --bootrom vmlinux-pci-RVM --export /home/ungar/renaissance --cd /home/ungar/renaissance/rvm/run --profile-init --profile-kernel --profile-events '--event=ONE:750000 --event=MP_DATA_CACHE_STALL:750000' --profile-flags '--callgraph=10' --rtc --env DISPLAY=10.0.1.250:0 --env SQUEAK_NOTIMER=1 --profile-start --run --- rvm -geom 5,1 /home/ungar/renaissance/rvm/run/basicSqueak_8_25_base_2.image ---\"\nalias aprofT=\"tile-monitor --pci --bootrom vmlinux-pci-RVM --export /home/ungar/renaissance --cd /home/ungar/renaissance/rvm/run --profile-init --profile-kernel --profile-events '--event=ONE:750000 --event=TLB_EXC:75000'  --profile-flags '--callgraph=10' --rtc --env DISPLAY=10.0.1.250:0 --env SQUEAK_NOTIMER=1 --profile-start --run --- rvm -geom 5,1 /home/ungar/renaissance/rvm/run/basicSqueak_8_25_base_1.image ---\"\nalias aprof2T=\"tile-monitor --pci --bootrom vmlinux-pci-RVM --export /home/ungar/renaissance --cd /home/ungar/renaissance/rvm/run --profile-init --profile-kernel --profile-events '--event=ONE:750000 --event=TLB_EXC:75000' --profile-flags '--callgraph=10' --rtc --env DISPLAY=10.0.1.250:0 --env SQUEAK_NOTIMER=1 --profile-start --run --- rvm -geom 5,1 /home/ungar/renaissance/rvm/run/basicSqueak_8_25_base_2.image ---\"\nalias aprofUR=\"tile-monitor --pci --bootrom vmlinux-pci-RVM --export /home/ungar/renaissance --cd /home/ungar/renaissance/rvm/run --profile-init --profile-kernel --profile-events '--event=ONE:750000 --event=MP_UDN_READ_STALL:10000'  --profile-flags '--callgraph=10' --rtc --env DISPLAY=10.0.1.250:0 --env SQUEAK_NOTIMER=1 --profile-start --run --- rvm -geom 5,1 /home/ungar/renaissance/rvm/run/basicSqueak_8_25_base_1.image ---\"\nalias aprof2UR=\"tile-monitor --pci --bootrom vmlinux-pci-RVM --export /home/ungar/renaissance --cd /home/ungar/renaissance/rvm/run --profile-init --profile-kernel --profile-events '--event=ONE:750000 --event=MP_UDN_READ_STALL:10000' --profile-flags '--callgraph=10' --rtc --env DISPLAY=10.0.1.250:0 --env SQUEAK_NOTIMER=1 --profile-start --run --- rvm -geom 5,1 /home/ungar/renaissance/rvm/run/basicSqueak_8_25_base_2.image ---\"\nalias aprofUW=\"tile-monitor --pci --bootrom vmlinux-pci-RVM --export /home/ungar/renaissance --cd /home/ungar/renaissance/rvm/run --profile-init --profile-kernel --profile-events '--event=ONE:750000 --event=MP_UDN_WRITE_STALL:10000'  --profile-flags '--callgraph=10' --rtc --env DISPLAY=10.0.1.250:0 --env SQUEAK_NOTIMER=1 --profile-start --run --- rvm -geom 5,1 /home/ungar/renaissance/rvm/run/basicSqueak_8_25_base_1.image ---\"\nalias aprof2UW=\"tile-monitor --pci --bootrom vmlinux-pci-RVM --export /home/ungar/renaissance --cd /home/ungar/renaissance/rvm/run --profile-init --profile-kernel --profile-events '--event=ONE:750000 --event=MP_UDN_WRITE_STALL:10000' --profile-flags '--callgraph=10' --rtc --env DISPLAY=10.0.1.250:0 --env SQUEAK_NOTIMER=1 --profile-start --run --- rvm -geom 5,1 /home/ungar/renaissance/rvm/run/basicSqueak_8_25_base_2.image ---\"\nalias aprof2IW=\"tile-monitor --pci --bootrom vmlinux-pci-RVM --export /home/ungar/renaissance --cd /home/ungar/renaissance/rvm/run --profile-init --profile-kernel --profile-events '--event=ONE:750000 --event=MP_IDN_WRITE_STALL:10000' --profile-flags '--callgraph=10' --rtc --env DISPLAY=10.0.1.250:0 --env SQUEAK_NOTIMER=1 --profile-start --run --- rvm -geom 5,1 /home/ungar/renaissance/rvm/run/basicSqueak_8_25_base_2.image ---\"\nalias aprof2SW=\"tile-monitor --pci --bootrom vmlinux-pci-RVM --export /home/ungar/renaissance --cd /home/ungar/renaissance/rvm/run --profile-init --profile-kernel --profile-events '--event=ONE:750000 --event=MP_SN_WRITE_STALL:10000' --profile-flags '--callgraph=10' --rtc --env DISPLAY=10.0.1.250:0 --env SQUEAK_NOTIMER=1 --profile-start --run --- rvm -geom 5,1 /home/ungar/renaissance/rvm/run/basicSqueak_8_25_base_2.image ---\"\n\nalias eprofB=\"tile-monitor --pci --bootrom vmlinux-pci-RVM --export /home/ungar/renaissance --cd /home/ungar/renaissance/rvm/run --profile-init --profile-kernel --profile-events '--event=ONE:750000 --event=MP_BUNDLE_RETIRED:750000'  --profile-flags '--callgraph=10' --rtc --env DISPLAY=10.0.1.250:0 --env SQUEAK_NOTIMER=1 --profile-start --run --- rvm -geom 5,1 /home/ungar/renaissance/rvm/run/basicSqueak_8_29_bench10_1.image ---\"\nalias eprof2B=\"tile-monitor --pci --bootrom vmlinux-pci-RVM --export /home/ungar/renaissance --cd /home/ungar/renaissance/rvm/run --profile-init --profile-kernel --profile-events '--event=ONE:750000 --event=MP_BUNDLE_RETIRED:750000' --profile-flags '--callgraph=10' --rtc --env DISPLAY=10.0.1.250:0 --env SQUEAK_NOTIMER=1 --profile-start --run --- rvm -geom 5,1 /home/ungar/renaissance/rvm/run/basicSqueak_8_29_bench10_2.image ---\"\nalias eprofI=\"tile-monitor --pci --bootrom vmlinux-pci-RVM --export /home/ungar/renaissance --cd /home/ungar/renaissance/rvm/run --profile-init --profile-kernel --profile-events '--event=ONE:750000 --event=MP_INSTRUCTION_CACHE_STALL:750000'  --profile-flags '--callgraph=10' --rtc --env DISPLAY=10.0.1.250:0 --env SQUEAK_NOTIMER=1 --profile-start --run --- rvm -geom 5,1 /home/ungar/renaissance/rvm/run/basicSqueak_8_29_bench10_1.image ---\"\nalias eprof2I=\"tile-monitor --pci --bootrom vmlinux-pci-RVM --export /home/ungar/renaissance --cd /home/ungar/renaissance/rvm/run --profile-init --profile-kernel --profile-events '--event=ONE:750000 --event=MP_INSTRUCTION_CACHE_STALL:750000' --profile-flags '--callgraph=10' --rtc --env DISPLAY=10.0.1.250:0 --env SQUEAK_NOTIMER=1 --profile-start --run --- rvm -geom 5,1 /home/ungar/renaissance/rvm/run/basicSqueak_8_29_bench10_2.image ---\"\nalias eprofD=\"tile-monitor --pci --bootrom vmlinux-pci-RVM --export /home/ungar/renaissance --cd /home/ungar/renaissance/rvm/run --profile-init --profile-kernel --profile-events '--event=ONE:750000 --event=MP_DATA_CACHE_STALL:750000'  --profile-flags '--callgraph=10' --rtc --env DISPLAY=10.0.1.250:0 --env SQUEAK_NOTIMER=1 --profile-start --run --- rvm -geom 5,1 /home/ungar/renaissance/rvm/run/basicSqueak_8_29_bench10_1.image ---\"\nalias eprof2D=\"tile-monitor --pci --bootrom vmlinux-pci-RVM --export /home/ungar/renaissance --cd /home/ungar/renaissance/rvm/run --profile-init --profile-kernel --profile-events '--event=ONE:750000 --event=MP_DATA_CACHE_STALL:750000' --profile-flags '--callgraph=10' --rtc --env DISPLAY=10.0.1.250:0 --env SQUEAK_NOTIMER=1 --profile-start --run --- rvm -geom 5,1 /home/ungar/renaissance/rvm/run/basicSqueak_8_29_bench10_2.image ---\"\nalias eprofT=\"tile-monitor --pci --bootrom vmlinux-pci-RVM --export /home/ungar/renaissance --cd /home/ungar/renaissance/rvm/run --profile-init --profile-kernel --profile-events '--event=ONE:750000 --event=TLB_EXC:75000'  --profile-flags '--callgraph=10' --rtc --env DISPLAY=10.0.1.250:0 --env SQUEAK_NOTIMER=1 --profile-start --run --- rvm -geom 5,1 /home/ungar/renaissance/rvm/run/basicSqueak_8_29_bench10_1.image ---\"\nalias eprof2T=\"tile-monitor --pci --bootrom vmlinux-pci-RVM --export /home/ungar/renaissance --cd /home/ungar/renaissance/rvm/run --profile-init --profile-kernel --profile-events '--event=ONE:750000 --event=TLB_EXC:75000' --profile-flags '--callgraph=10' --rtc --env DISPLAY=10.0.1.250:0 --env SQUEAK_NOTIMER=1 --profile-start --run --- rvm -geom 5,1 /home/ungar/renaissance/rvm/run/basicSqueak_8_29_bench10_2.image ---\"\n\nalias eprofUR=\"tile-monitor --pci --bootrom vmlinux-pci-RVM --export /home/ungar/renaissance --cd /home/ungar/renaissance/rvm/run --profile-init --profile-kernel --profile-events '--event=ONE:750000 --event=MP_UDN_READ_STALL:10000'  --profile-flags '--callgraph=10' --rtc --env DISPLAY=10.0.1.250:0 --env SQUEAK_NOTIMER=1 --profile-start --run --- rvm -geom 5,1 /home/ungar/renaissance/rvm/run/basicSqueak_8_29_bench10_1.image ---\"\nalias eprof2UR=\"tile-monitor --pci --bootrom vmlinux-pci-RVM --export /home/ungar/renaissance --cd /home/ungar/renaissance/rvm/run --profile-init --profile-kernel --profile-events '--event=ONE:750000 --event=MP_UDN_READ_STALL:10000' --profile-flags '--callgraph=10' --rtc --env DISPLAY=10.0.1.250:0 --env SQUEAK_NOTIMER=1 --profile-start --run --- rvm -geom 5,1 /home/ungar/renaissance/rvm/run/basicSqueak_8_29_bench10_2.image ---\"\nalias eprofUW=\"tile-monitor --pci --bootrom vmlinux-pci-RVM --export /home/ungar/renaissance --cd /home/ungar/renaissance/rvm/run --profile-init --profile-kernel --profile-events '--event=ONE:750000 --event=MP_UDN_WRITE_STALL:10000'  --profile-flags '--callgraph=10' --rtc --env DISPLAY=10.0.1.250:0 --env SQUEAK_NOTIMER=1 --profile-start --run --- rvm -geom 5,1 /home/ungar/renaissance/rvm/run/basicSqueak_8_29_bench10_1.image ---\"\nalias eprof2UW=\"tile-monitor --pci --bootrom vmlinux-pci-RVM --export /home/ungar/renaissance --cd /home/ungar/renaissance/rvm/run --profile-init --profile-kernel --profile-events '--event=ONE:750000 --event=MP_UDN_WRITE_STALL:10000' --profile-flags '--callgraph=10' --rtc --env DISPLAY=10.0.1.250:0 --env SQUEAK_NOTIMER=1 --profile-start --run --- rvm -geom 5,1 /home/ungar/renaissance/rvm/run/basicSqueak_8_29_bench10_2.image ---\"\nalias eprof2IW=\"tile-monitor --pci --bootrom vmlinux-pci-RVM --export /home/ungar/renaissance --cd /home/ungar/renaissance/rvm/run --profile-init --profile-kernel --profile-events '--event=ONE:750000 --event=MP_IDN_WRITE_STALL:10000' --profile-flags '--callgraph=10' --rtc --env DISPLAY=10.0.1.250:0 --env SQUEAK_NOTIMER=1 --profile-start --run --- rvm -geom 5,1 /home/ungar/renaissance/rvm/run/basicSqueak_8_29_bench10_2.image ---\"\nalias eprof2SW=\"tile-monitor --pci --bootrom vmlinux-pci-RVM --export /home/ungar/renaissance --cd /home/ungar/renaissance/rvm/run --profile-init --profile-kernel --profile-events '--event=ONE:750000 --event=MP_SN_WRITE_STALL:10000' --profile-flags '--callgraph=10' --rtc --env DISPLAY=10.0.1.250:0 --env SQUEAK_NOTIMER=1 --profile-start --run --- rvm -geom 5,1 /home/ungar/renaissance/rvm/run/basicSqueak_8_29_bench10_2.image ---\"\n\n# tile-opreport  --symbols archive:sampleOne_TLB -merge=all\n#tile-monitor --simulator --ide-port 34541 --xml-profile /home/ungar/renaissance/rvm/profile_sim_1 --image 1x1\n#tile-mkboot --output vmlinux-pci-RVM.bootrom config=/opt/Tilera/lib/boot/vmlinux-pci-RVM.hvconfig vmlinux=/opt/Tilera/tile/boot/vmlinux\n\nalias testping=\"tile-monitor --pci --hvd XGBE_ARGS=native_driver --hvx TLR_NETWORK=xgbe/0 --hvx TLR_NETADDR=10.0.1.252 --hvx TLR_NETMASK=255.255.255.0 --hvx TLR_INITSWITCH=y  --env DISPLAY=10.0.1.250:0 --env SQUEAK_NOTIMER=1\"\n\nexport mon_args=\" --debug-on-crash    --hvd XGBE_ARGS=native_driver --hvx TLR_NETWORK=xgbe/0 --hvx TLR_NETADDR=10.0.1.252 --hvx TLR_NETMASK=255.255.255.0 --hvx TLR_INITSWITCH=y --huge-pages 64  --here  --env DISPLAY=10.0.1.250:0 --env SQUEAK_NOTIMER=1  --run -+-\"\n\nexport mon_args_no_eth=\" --debug-on-crash    --hvd XGBE_ARGS=native_driver --hvx TLR_NETWORK=xgbe/0 --hvx TLR_NETMASK=255.255.255.0 --hvx TLR_INITSWITCH=y --huge-pages 64  --here  --env DISPLAY=10.0.1.250:0 --env SQUEAK_NOTIMER=1 \"\n\nexport run_args_1=\"-min_heap_MB 32 -profile_after 5000\"\nexport last_args=\"/home/ungar/renaissance/rvm/run/zauchu-RVM-compiler.image --- --quit\"\nexport last_args929=\"/home/ungar/renaissance/rvm/run/rvm-base-9-29-bench.image --- --quit\"\n\nalias check1=\"tile-monitor --pci --rtc $mon_args rvm -geom 1,1 $run_args_1 -headless -make_checkpoint $last_args\"\nalias check2=\"tile-monitor --pci --rtc $mon_args rvm -geom 2,1 $run_args_1 -headless -make_checkpoint $last_args\"\nalias check32=\"tile-monitor --pci --rtc $mon_args rvm -geom 8,4 $run_args_1 -headless -make_checkpoint $last_args\"\nalias check56=\"tile-monitor --pci --rtc $mon_args rvm -geom 8,7 $run_args_1 -headless -make_checkpoint $last_args\"\n\nalias test1=\"tile-monitor --pci --rtc $mon_args rvm -geom 1,1 $run_args_1 -quit_after 15000 -headless -use_checkpoint $last_args\"\nalias test2=\"tile-monitor --pci --rtc $mon_args rvm -geom 2,1 $run_args_1 -quit_after 15000 -headless -use_checkpoint $last_args\"\nalias test32=\"tile-monitor --pci --rtc $mon_args rvm -geom 8,4 $run_args_1 -headless -use_checkpoint $last_args\"\nalias test56=\"tile-monitor --pci --rtc $mon_args rvm -geom 8,7 $run_args_1 -headless -use_checkpoint $last_args\"\n\nalias run1=\"tile-monitor --pci --rtc --bootrom vmlinux-pci-RVM $mon_args rvm -geom 1,1 $run_args_1 -use_checkpoint $last_args\"\nalias run2=\"tile-monitor --pci --rtc --bootrom vmlinux-pci-RVM $mon_args rvm -geom 2,1 $run_args_1 -use_checkpoint $last_args\"\nalias run56=\"tile-monitor --pci --rtc --bootrom vmlinux-pci-RVM $mon_args rvm -geom 8,7 $run_args_1 -use_checkpoint $last_args\"\n\nalias sim1=\"tile-monitor --simulator --xml-profile profile_sim_1h --image 1x1  $mon_args rvm -geom 1,1 $run_args_1 -headless -use_checkpoint $last_args\"\nalias sim2=\"tile-monitor --simulator --xml-profile profile_sim_2h --image 2x2  $mon_args rvm -geom 2,1 $run_args_1 -headless -use_checkpoint $last_args\"\nalias sim32=\"tile-monitor --simulator --xml-profile profile_sim_32h --image 8x4  $mon_args rvm -geom 8,4 $run_args_1 -headless -use_checkpoint $last_args\"\nalias sim56=\"tile-monitor --simulator --xml-profile profile_sim_56h --image 8x8  $mon_args rvm -geom 8,7 $run_args_1 -headless -use_checkpoint $last_args\"\n\n\n\nalias rbi1rp=\"tile-monitor --pci --rtc --bootrom vmlinux-pci-RVM $mon_args rvm -eschew_huge_pages -geom 1,1 -min_heap_MB 256 /home/ungar/renaissance/rvm/run/rvm-base.image --- --quit\"\n\nalias xbi1=\"tile-monitor --pci --rtc  $mon_args rvm -geom 1,1 -min_heap_MB 64 /home/ungar/renaissance/rvm/run/rvm-base.image -+- --quit\"\nalias xif=\"tile-monitor --pci --rtc  $mon_args ifconfig -a -+- --quit\"\nalias xbi2=\"tile-monitor --pci --rtc  $mon_args rvm -geom 2,1 -min_heap_MB 128 /home/ungar/renaissance/rvm/run/rvm-base.image -+- --quit\"\nalias xbi3=\"tile-monitor --pci --rtc  $mon_args rvm -geom 3,1 -min_heap_MB 128 /home/ungar/renaissance/rvm/run/rvm-base.image -+- --quit\"\nalias xbi4=\"tile-monitor --pci --rtc  $mon_args rvm -geom 4,1 -min_heap_MB 128 /home/ungar/renaissance/rvm/run/rvm-base.image -+- --quit\"\nalias xbi5=\"tile-monitor --pci --rtc  $mon_args rvm -geom 5,1 -min_heap_MB 128 /home/ungar/renaissance/rvm/run/rvm-base.image -+- --quit\"\nalias xbi6=\"tile-monitor --pci --rtc  $mon_args rvm -geom 6,1 -min_heap_MB 128 /home/ungar/renaissance/rvm/run/rvm-base.image -+- --quit\"\nalias xbi7=\"tile-monitor --pci --rtc  $mon_args rvm -geom 7,1 -min_heap_MB 128 /home/ungar/renaissance/rvm/run/rvm-base.image -+- --quit\"\nalias xbi8=\"tile-monitor --pci --rtc  $mon_args rvm -geom 8,1 -min_heap_MB 128 /home/ungar/renaissance/rvm/run/rvm-base.image -+- --quit\"\nalias xbi9=\"tile-monitor --pci --rtc  $mon_args rvm -geom 3,3 -min_heap_MB 128 /home/ungar/renaissance/rvm/run/rvm-base.image -+- --quit\"\nalias xbi10=\"tile-monitor --pci --rtc $mon_args rvm -geom 5,2 -min_heap_MB 128 /home/ungar/renaissance/rvm/run/rvm-base.image -+- --quit\"\nalias xbi16=\"tile-monitor --pci --rtc $mon_args rvm -geom 4,4 -min_heap_MB 128 /home/ungar/renaissance/rvm/run/rvm-base.image -+- --quit\"\nalias xbi24=\"tile-monitor --pci --rtc $mon_args rvm -geom 4,6 -min_heap_MB 128 /home/ungar/renaissance/rvm/run/rvm-base.image -+- --quit\"\nalias xbi32=\"tile-monitor --pci --rtc $mon_args rvm -geom 8,4 -min_heap_MB 128 /home/ungar/renaissance/rvm/run/rvm-base.image -+- --quit\"\nalias xbi40=\"tile-monitor --pci --rtc $mon_args rvm -geom 8,5 -min_heap_MB 128 /home/ungar/renaissance/rvm/run/rvm-base.image -+- --quit\"\nalias xbi48=\"tile-monitor --pci --rtc $mon_args rvm -geom 8,6 -min_heap_MB 128 /home/ungar/renaissance/rvm/run/rvm-base.image -+- --quit\"\nalias xbi56=\"tile-monitor --pci --rtc $mon_args rvm -geom 8,7 -min_heap_MB 128 /home/ungar/renaissance/rvm/run/rvm-base.image -+- --quit\"\nalias xbi59=\"tile-monitor --pci --rtc $mon_args rvm -num_cores 59 -min_heap_MB 128 /home/ungar/renaissance/rvm/run/rvm-base.image -+- --quit\"\nalias xbi56bar=\"tile-monitor --pci --rtc $mon_args rvm -geom 8,7 -min_heap_MB 64 /home/ungar/renaissance/rvm/run/rvm-base.image -+- --quit\"\n\nalias xbi1A=\"tile-monitor --pci-card 0 --rtc  $mon_args_no_eth --hvx TLR_NETADDR=10.0.1.252 --run -+- rvm -num_chips 4 -geom 1,1 -min_heap_MB 64 /home/ungar/renaissance/rvm/run/sam-serially.image -+- --quit\"\nalias xbi1B=\"tile-monitor --pci-card 1 --rtc  $mon_args_no_eth --hvx TLR_NETADDR=10.0.1.251 --run -+- rvm -num_chips 4 -geom 1,1 -min_heap_MB 64 /home/ungar/renaissance/rvm/run/sam-serially.image -+- --quit\"\nalias xbi1C=\"tile-monitor --pci-card 2 --rtc  $mon_args_no_eth --hvx TLR_NETADDR=10.0.1.248 --run -+- rvm -num_chips 4 -geom 1,1 -min_heap_MB 64 /home/ungar/renaissance/rvm/run/sam-serially.image -+- --quit\"\nalias xbi1D=\"tile-monitor --pci-card 3 --rtc  $mon_args_no_eth --hvx TLR_NETADDR=10.0.1.249 --run -+- rvm -num_chips 4 -geom 1,1 -min_heap_MB 64 /home/ungar/renaissance/rvm/run/sam-serially.image -+- --quit\"\n\nalias xbi56A=\"tile-monitor --pci-card 0 --rtc $mon_args_no_eth --hvx TLR_NETADDR=10.0.1.252 --run -+- rvm -num_chips 4 -geom 8,7 -min_heap_MB 64 /home/ungar/renaissance/rvm/run/sam-serially.image -+- --quit\"\nalias xbi56B=\"tile-monitor --pci-card 1 --rtc $mon_args_no_eth --hvx TLR_NETADDR=10.0.1.251 --run -+- rvm -num_chips 4 -geom 8,7 -min_heap_MB 64 /home/ungar/renaissance/rvm/run/sam-serially.image -+- --quit\"\nalias xbi56C=\"tile-monitor --pci-card 2 --rtc $mon_args_no_eth --hvx TLR_NETADDR=10.0.1.248 --run -+- rvm -num_chips 4 -geom 8,7 -min_heap_MB 64 /home/ungar/renaissance/rvm/run/sam-serially.image -+- --quit\"\nalias xbi56D=\"tile-monitor --pci-card 3 --rtc $mon_args_no_eth --hvx TLR_NETADDR=10.0.1.249 --run -+- rvm -num_chips 4 -geom 8,7 -min_heap_MB 64 /home/ungar/renaissance/rvm/run/sam-serially.image -+- --quit\"\n\nalias xbi59A=\"tile-monitor --pci-card 0 --rtc $mon_args_no_eth --hvx TLR_NETADDR=10.0.1.240 --run -+- rvm -num_chips 4 -num_cores 59 -min_heap_MB 64 /home/ungar/renaissance/rvm/runA/rvm-base.image -+- --quit\"\nalias xbi59B=\"tile-monitor --pci-card 1 --rtc $mon_args_no_eth --hvx TLR_NETADDR=10.0.1.241 --run -+- rvm -num_chips 4 -num_cores 59 -min_heap_MB 64 /home/ungar/renaissance/rvm/runB/rvm-base.image -+- --quit\"\nalias xbi59C=\"tile-monitor --pci-card 2 --rtc $mon_args_no_eth --hvx TLR_NETADDR=10.0.1.242 --run -+- rvm -num_chips 4 -num_cores 59 -min_heap_MB 64 /home/ungar/renaissance/rvm/runC/rvm-base.image -+- --quit\"\nalias xbi59D=\"tile-monitor --pci-card 3 --rtc $mon_args_no_eth --hvx TLR_NETADDR=10.0.1.243 --run -+- rvm -num_chips 4 -num_cores 59 -min_heap_MB 64 /home/ungar/renaissance/rvm/runD/rvm-base.image -+- --quit\"\n\nalias A=\"tile-monitor --pci-card 0 --rtc  $mon_args_no_eth --hvx TLR_NETADDR=10.0.1.252 --run -+- rvm -num_chips 2 -geom 1,1 -min_heap_MB 64 /home/ungar/renaissance/rvm/run/sam-serially.image -+- --quit\"\nalias B=\"tile-monitor --pci-card 1 --rtc  $mon_args_no_eth --hvx TLR_NETADDR=10.0.1.251 --run -+- rvm -num_chips 2 -geom 1,1 -min_heap_MB 64 /home/ungar/renaissance/rvm/run/sam-serially.image -+- --quit\"\n\n\n\n\nalias rbi56coin=\"tile-monitor --pci --rtc --bootrom vmlinux-pci-RVM $mon_args rvm -geom 8,7 -min_heap_MB 64 /home/ungar/renaissance/rvm/run/rvm-coin.image --- --quit\"\n\nalias rbi1fy=\"tile-monitor --pci --rtc --bootrom vmlinux-pci-RVM $mon_args rvm -geom 1,1 -min_heap_MB 256 -force_yields /home/ungar/renaissance/rvm/run/rvm-base.image --- --quit\"\nalias rbi1fycro=\"tile-monitor --pci --rtc --bootrom vmlinux-pci-RVM $mon_args rvm -geom 1,1 -min_heap_MB 16 -force_yields -consolidate_replicated_objects /home/ungar/renaissance/rvm/run/rvm-base.image --- --quit\"\nalias rbi1cro=\"tile-monitor --pci --rtc --bootrom vmlinux-pci-RVM $mon_args rvm -geom 1,1 -min_heap_MB 16 -consolidate_replicated_objects /home/ungar/renaissance/rvm/run/rvm-base.image --- --quit\"\nalias rbi2fy=\"tile-monitor --pci --rtc --bootrom vmlinux-pci-RVM $mon_args rvm -geom 2,1 -min_heap_MB 256 -force_yields /home/ungar/renaissance/rvm/run/rvm-base.image --- --quit\"\nalias rbi56fy=\"tile-monitor --pci --rtc --bootrom vmlinux-pci-RVM $mon_args rvm -geom 8,7 -min_heap_MB 16 -force_yields /home/ungar/renaissance/rvm/run/rvm-base.image --- --quit\"\nalias rbi56fycro=\"tile-monitor --pci --rtc --bootrom vmlinux-pci-RVM $mon_args rvm -geom 8,7 -min_heap_MB 16 -force_yields -consolidate_replicated_objects /home/ungar/renaissance/rvm/run/rvm-base.image --- --quit\"\nalias rbi56cro=\"tile-monitor --pci --rtc --bootrom vmlinux-pci-RVM $mon_args rvm -geom 8,7 -min_heap_MB 16 -consolidate_replicated_objects /home/ungar/renaissance/rvm/run/rvm-base.image --- --quit\"\n\nalias rbi1r=\"tile-monitor --pci --rtc --bootrom vmlinux-pci-RVM $mon_args rvm -geom 1,1 -min_heap_MB 16 -replicate_OT  /home/ungar/renaissance/rvm/run/rvm-base.image --- --quit\"\nalias rbi2r=\"tile-monitor --pci --rtc --bootrom vmlinux-pci-RVM $mon_args rvm -geom 2,1 -min_heap_MB 16  -replicate_OT /home/ungar/renaissance/rvm/run/rvm-base.image --- --quit\"\nalias rbi56r=\"tile-monitor --pci --rtc --bootrom vmlinux-pci-RVM $mon_args rvm -geom 8,7 -min_heap_MB 16 -replicate_OT /home/ungar/renaissance/rvm/run/rvm-base.image --- --quit\"\n\nalias rbi1_912=\"tile-monitor --pci --rtc --bootrom vmlinux-pci-RVM $mon_args ../tbuild912.opt/rvm -geom 1,1 -min_heap_MB 16 -force_yields  /home/ungar/renaissance/rvm/run/rvm-base912.image --- --quit\"\nalias rbi2_912=\"tile-monitor --pci --rtc --bootrom vmlinux-pci-RVM $mon_args ../tbuild912.opt/rvm -geom 2,1 -min_heap_MB 16  -force_yields /home/ungar/renaissance/rvm/run/rvm-base912.image --- --quit\"\nalias rbi56_912=\"tile-monitor --pci --rtc --bootrom vmlinux-pci-RVM $mon_args ../tbuild912.opt/rvm -geom 8,7 -min_heap_MB 16 -force_yields /home/ungar/renaissance/rvm/run/rvm-base912.image --- --quit\"\n\n\n\nalias check1dr=\"tile-monitor --pci --rtc $mon_args -geom 1,1 -dont_replicate_OT $run_args_1 -headless -make_checkpoint $last_args\"\nalias check2dr=\"tile-monitor --pci --rtc $mon_args -geom 2,1 -dont_replicate_OT $run_args_1 -headless -make_checkpoint $last_args\"\nalias sim1dr=\"tile-monitor --simulator --xml-profile profile_sim_1h --image 1x1  $mon_args -geom 1,1 -dont_replicate_OT $run_args_1 -headless -use_checkpoint $last_args\"\nalias sim2dr=\"tile-monitor --simulator --xml-profile profile_sim_2h --image 2x2  $mon_args -geom 2,1 -dont_replicate_OT $run_args_1 -headless -use_checkpoint $last_args\"\nalias test1dr=\"tile-monitor --pci --rtc $mon_args -geom 1,1 -dont_replicate_OT $run_args_1 -quit_after 15000 -headless -use_checkpoint $last_args\"\nalias test2dr=\"tile-monitor --pci --rtc $mon_args -geom 2,1 -dont_replicate_OT $run_args_1 -quit_after 15000 -headless -use_checkpoint $last_args\"\n\n\n\n\nalias check1_912=\"tile-monitor --pci --rtc $mon_args ../tbuild912.opt/rvm -geom 1,1 $run_args_1 -headless -force_yields -make_checkpoint $last_args929\"\nalias check2_912=\"tile-monitor --pci --rtc $mon_args ../tbuild912.opt/rvm -geom 2,1 $run_args_1 -headless -force_yields -make_checkpoint $last_args929\"\nalias check32_912=\"tile-monitor --pci --rtc $mon_args ../tbuild912.opt/rvm -geom 8,4 $run_args_1 -headless -force_yields -make_checkpoint $last_args929\"\nalias check56_912=\"tile-monitor --pci --rtc $mon_args ../tbuild912.opt/rvm -geom 8,7 $run_args_1 -headless -force_yields -make_checkpoint $last_args929\"\n\nalias test1_912=\"tile-monitor --pci --rtc $mon_args ../tbuild912.opt/rvm -geom 1,1 $run_args_1 -quit_after 15000 -headless -force_yields -use_checkpoint $last_args929\"\nalias test2_912=\"tile-monitor --pci --rtc $mon_args ../tbuild912.opt/rvm -geom 2,1 $run_args_1 -quit_after 15000 -headless -force_yields -use_checkpoint $last_args929\"\nalias test32_912=\"tile-monitor --pci --rtc $mon_args ../tbuild912.opt/rvm -geom 8,4 $run_args_1 -headless -force_yields -use_checkpoint $last_args929\"\nalias test56_912=\"tile-monitor --pci --rtc $mon_args ../tbuild912.opt/rvm -geom 8,7 $run_args_1 -headless -force_yields -use_checkpoint $last_args929\"\n\nalias run1_912=\"tile-monitor --pci --rtc --bootrom vmlinux-pci-RVM $mon_args ../tbuild912.opt/rvm -geom 1,1 $run_args_1 -force_yields -use_checkpoint $last_args929\"\nalias run2_912=\"tile-monitor --pci --rtc --bootrom vmlinux-pci-RVM $mon_args ../tbuild912.opt/rvm -geom 2,1 $run_args_1 -force_yields -use_checkpoint $last_args929\"\nalias run56_912=\"tile-monitor --pci --rtc --bootrom vmlinux-pci-RVM $mon_args ../tbuild912.opt/rvm -geom 8,7 $run_args_1 -force_yields -use_checkpoint $last_args929\"\n\nalias sim1_912=\"tile-monitor --simulator --xml-profile profile_sim_1h --image 1x1  $mon_args ../tbuild912.opt/rvm -geom 1,1 $run_args_1 -headless -force_yields -use_checkpoint $last_args929\"\nalias sim2_912=\"tile-monitor --simulator --xml-profile profile_sim_2h --image 2x2  $mon_args ../tbuild912.opt/rvm -geom 2,1 $run_args_1 -headless -force_yields -use_checkpoint $last_args929\"\nalias sim32_912=\"tile-monitor --simulator --xml-profile profile_sim_32h --image 8x4  $mon_args ../tbuild912.opt/rvm -geom 8,4 $run_args_1 -headless -force_yields -use_checkpoint $last_args929\"\nalias sim56_912=\"tile-monitor --simulator --xml-profile profile_sim_56h --image 8x8  $mon_args ../tbuild912.opt/rvm -geom 8,7 $run_args_1 -headless -force_yields -use_checkpoint $last_args929\"\n\n\n\n\nalias check1_929=\"tile-monitor --pci --rtc $mon_args ../tbuild.opt/rvm -geom 1,1 $run_args_1 -headless -make_checkpoint $last_args929\"\nalias check2_929=\"tile-monitor --pci --rtc $mon_args ../tbuild.opt/rvm -geom 2,1 $run_args_1 -headless -make_checkpoint $last_args929\"\nalias check32_929=\"tile-monitor --pci --rtc $mon_args ../tbuild.opt/rvm -geom 8,4 $run_args_1 -headless -make_checkpoint $last_args929\"\nalias check56_929=\"tile-monitor --pci --rtc $mon_args ../tbuild.opt/rvm -geom 8,7 $run_args_1 -headless -make_checkpoint $last_args929\"\n\nalias test1_929=\"tile-monitor --pci --rtc $mon_args ../tbuild.opt/rvm -geom 1,1 $run_args_1 -quit_after 15000 -headless -use_checkpoint $last_args929\"\nalias test2_929=\"tile-monitor --pci --rtc $mon_args ../tbuild.opt/rvm -geom 2,1 $run_args_1 -quit_after 15000 -headless -use_checkpoint $last_args929\"\nalias test32_929=\"tile-monitor --pci --rtc $mon_args ../tbuild.opt/rvm -geom 8,4 $run_args_1 -headless -use_checkpoint $last_args929\"\nalias test56_929=\"tile-monitor --pci --rtc $mon_args ../tbuild.opt/rvm -geom 8,7 $run_args_1 -headless -use_checkpoint $last_args929\"\n\nalias run1_929=\"tile-monitor --pci --rtc --bootrom vmlinux-pci-RVM $mon_args ../tbuild.opt/rvm -geom 1,1 $run_args_1 -use_checkpoint $last_args929\"\nalias run2_929=\"tile-monitor --pci --rtc --bootrom vmlinux-pci-RVM $mon_args ../tbuild.opt/rvm -geom 2,1 $run_args_1 -use_checkpoint $last_args929\"\nalias run56_929=\"tile-monitor --pci --rtc --bootrom vmlinux-pci-RVM $mon_args ../tbuild.opt/rvm -geom 8,7 $run_args_1 -use_checkpoint $last_args929\"\n\nalias sim1_929=\"tile-monitor --simulator --xml-profile profile_sim_1h --image 1x1  $mon_args ../tbuild.opt/rvm -geom 1,1 $run_args_1 -headless -use_checkpoint $last_args929\"\nalias sim2_929=\"tile-monitor --simulator --xml-profile profile_sim_2h --image 2x2  $mon_args ../tbuild.opt/rvm -geom 2,1 $run_args_1 -headless -use_checkpoint $last_args929\"\nalias sim32_929=\"tile-monitor --simulator --xml-profile profile_sim_32h --image 8x4  $mon_args ../tbuild.opt/rvm -geom 8,4 $run_args_1 -headless -use_checkpoint $last_args929\"\nalias sim56_929=\"tile-monitor --simulator --xml-profile profile_sim_56h --image 8x8  $mon_args ../tbuild.opt/rvm -geom 8,7 $run_args_1 -headless -use_checkpoint $last_args929\"\n\nalias mt='tile-monitor --pci --rtc --huge-pages 64 --export /home/ungar/renaissance --cd /home/ungar/renaissance/mutex_test --run --- ./a.out --- --quit'\nalias mtr='tile-monitor --pci  --export /home/ungar/renaissance --cd /home/ungar/renaissance/mutex_test --run --- ./a.out --- --quit'\n\n\nalias rbi2in=\"tile-monitor --pci --rtc --bootrom vmlinux-pci-RVM --huge-pages 64 --export /home/ungar/renaissance --cd /home/ungar/renaissance/rvm/run --env DISPLAY=10.0.1.250:0 --env SQUEAK_NOTIMER=1 --debug-tile 0,0 --debug-tile 0,1\n\"\n"
  },
  {
    "path": "vm/src/makefiles/Makefile.common",
    "content": "\n# This is a -*- Makefile -*-\n\n# Standalone makefile for 'getting started' app\n\nSRC_DIR ?= $(shell pwd)/../src\nOS      ?= $(shell uname)\nGTEST   ?= $(SRC_DIR)/../googletest\n\nifeq \"$(OS)\" \"MACOS\"\n  # OS is set by Xcode to MACOS, but we rely on it being Darwin\n  OS = Darwin\nendif\n\nOPTIMIZE_LEVEL ?= -O3\n\n# add some tracking information to identify binaries later\nCONFIG_FLAGS += -DGIT_REVISION_ID=$(shell git rev-parse HEAD)\nCONFIG_FLAGS += -DCOMPILATION_HOSTNAME=$(shell hostname)\n\nifndef PLATFORM\n  # fall back to Tilera as standard platform\n  PLATFORM = Tilera\nendif\n\nifeq \"$(SUPPRESS_CMD_OUTPUT)\" \"1\"\n  AT = @\nelse\n  AT =\nendif\n\n\nifdef TILERA_ROOT\nBIN = $(TILERA_ROOT)/bin/\nendif\n\nINCLUDES = \\\n    -I$(SRC_DIR)/testers \\\n    -I$(SRC_DIR)/externals \\\n    -I$(SRC_DIR)/runtime \\\n    -I$(SRC_DIR)/platform \\\n    -I$(SRC_DIR)/heap \\\n    -I$(SRC_DIR)/interpreter \\\n    -I$(SRC_DIR)/from_squeak \\\n    -I$(SRC_DIR)/from_squeak/Cross \\\n    -I$(SRC_DIR)/from_squeak/Cross/plugins \\\n    -I$(SRC_DIR)/from_squeak/Cross/plugins/SocketPlugin \\\n    -I$(SRC_DIR)/from_squeak/Cross/plugins/SoundPlugin \\\n    -I$(SRC_DIR)/from_squeak/Cross/plugins/FilePlugin \\\n    -I$(SRC_DIR)/from_squeak/Cross/plugins/RePlugin \\\n    -I$(SRC_DIR)/from_squeak/Cross/plugins/B3DAcceleratorPlugin \\\n    -I$(SRC_DIR)/from_squeak/Cross/vm \\\n    -I$(SRC_DIR)/from_squeak/intplugins \\\n    -I$(SRC_DIR)/from_squeak/intplugins/Matrix2x3Plugin \\\n    -I$(SRC_DIR)/from_squeak/intplugins/BitBltPlugin \\\n    -I$(SRC_DIR)/from_squeak/intplugins/SoundPlugin \\\n    -I$(SRC_DIR)/from_squeak/intplugins/LargeIntegers \\\n    -I$(SRC_DIR)/from_squeak/intplugins/B2DPlugin \\\n    -I$(SRC_DIR)/from_squeak/intplugins/FloatArrayPlugin \\\n    -I$(SRC_DIR)/from_squeak/intplugins/UnixOSProcessPlugin \\\n    -I$(SRC_DIR)/from_squeak/intplugins/MiscPrimitivePlugin \\\n    -I$(SRC_DIR)/from_squeak/intplugins/SocketPlugin \\\n    -I$(SRC_DIR)/from_squeak/unix \\\n    -I$(SRC_DIR)/from_squeak/unix/plugins/B3DAcceleratorPlugin \\\n    -I$(SRC_DIR)/from_squeak/unix/vm-display-X11 \\\n    -I$(SRC_DIR)/from_squeak/unix/vm-sound-null \\\n    -I$(SRC_DIR)/from_squeak/unix/vm-sound-custom \\\n    -I$(SRC_DIR)/from_squeak/unix/vm \\\n    -I$(SRC_DIR)/from_squeak/unix/vm-sound-MacOSX \\\n    -I$(SRC_DIR)/image_readers \\\n    -I$(SRC_DIR)/oops \\\n    -I$(SRC_DIR)/nonoops \\\n    -I$(SRC_DIR)/types \\\n    -I$(SRC_DIR)/objects \\\n    -I$(SRC_DIR)/primitives \\\n    -I$(SRC_DIR)/messages \\\n    -I$(SRC_DIR)/multichip\n\n\t\nifeq \"$(PLATFORM)\" \"Intel\"\nINCLUDES += \\\n\t-I$(SRC_DIR)/message_buffers \\\n\t-I$(SRC_DIR)/ibm\nendif\n\n\nCONFIG_FLAGS += -DExtra_Preheader_Word_Experiment=1 -DLSB_FIRST=1 -DROAR_VM\n\n# removed -Winline warning for now, was not useful so far\n# CONFIG_FLAGS += -Winline \n# CXX_CONFIG_FLAGS += -Winline\n\nCFLAGS = $(INCLUDES) $(CONFIG_FLAGS) -include rvm_config.h\nCXXFLAGS = -fno-rtti $(CXX_CONFIG_FLAGS)\nCONLYFLAGS = -w $(CONLY_CONFIG_FLAGS)\n# -I/home/ungar/renaissance/xfree86_include\nLDFLAGS += $(CONFIG_FLAGS)\n# -L$(X11_PATH) -L$(Xext_PATH) \n#-rpath $(X11_PATH) -rpath $(Xext_PATH)\n\nifeq \"$(PLATFORM)\" \"Tilera\"\n  CC  = tile-cc\n  CXX = tile-c++\n  LD  = tile-ld\n  CONLYFLAGS += -I/home/ungar/renaissance/xfree86_include -I/users/smarr/Projects/x11/include/\nendif\n\nTILE_MONITOR = $(BIN)tile-monitor\n\nEXECUTABLE = rvm\n\nMONITOR_COMMON_ARGS = \\\n  --batch-mode \\\n  --mkdir /opt/test \\\n  --cd /opt/test \\\n  --upload $(EXECUTABLE) $(EXECUTABLE) \\\n  -- $(EXECUTABLE)\n\nFILTER = sort\n\nCONSOLE_FILTER = egrep -v \\\n  'Client requested halt|init is exiting, so halting kernel|System halted'\n\n\nSQ_HEADERS = \\\n\tsqueak_adapters.h \\\n\tSocketPlugin.h \\\n\tFilePlugin.h \\\n\tconfig.h \\\n\tsqUnixOpenGL.h \\\n\tB3DAcceleratorPlugin.h \\\n\tsqOpenGLRenderer.h \\\n\tsqVirtualMachine.h \\\n\tSoundPlugin.h \\\n\tsqaio.h \\\n\tSqModule.h \\\n\tsqNamedPrims.h \\\n\tSqSound.h \\\n\tSqDisplay.h \\\n\tinterp.h \\\n\tsqConfig.h \\\n\tsqUnixGlobals.h \\\n\tsqPlatformSpecific.h \\\n\tsq.h \\\n\tsqUnixMain.h \\\n\tsqUnixCharConv.h \\\n\tsqMemoryAccess.h \\\n\tsqUnixSoundDebug.h \\\n\n\nRVM_HEADERS = \\\n  multicore_object_table.inline.h \\\n  memory_system.inline.h \\\n  abstract_object_heap.inline.h \\\n  multicore_object_heap.inline.h \\\n  oop.inline.h \\\n  chunk.inline.h \\\n  object.inline.h \\\n  externals.h \\\n  rvm_bitmap.h \\\n  printer.h \\\n  measurements.h \\\n  bytemap.h \\\n  error_handling.h \\\n  squeak_adapters.h \\\n  runtime_tester.h \\\n  rvm_config.h \\\n  utils.h \\\n  abstract_cpu_coordinate.h \\\n  dummy_cpu_coordinate.h \\\n  tile_cpu_coordinate.h \\\n  logical_core.h \\\n  headers.h \\\n  abstract_mark_sweep_collector.h \\\n  oop_closure.h \\\n  indirect_oop_mark_sweep_collector.h \\\n  abstract_object_heap.h \\\n  mark_sweep_collector.h \\\n  abstract_object_table.h \\\n  obsolete_indexed_primitive_table.h \\\n  obsolete_named_primitive_table.h \\\n  at_cache.h \\\n  interpreter_bytecodes.h \\\n  interpreter_primitives.h \\\n  method_cache.h \\\n  external_primitive_table.h \\\n  primitive_table.h \\\n  squeak_interpreter.h \\\n  abstract_primitive_table.h \\\n  config.h \\\n  tags.h \\\n  oop.h \\\n  abstract_oop.h \\\n  types.h \\\n  object.h \\\n  header_type.h \\\n  special_indices.h \\\n  object_indices.h \\\n  chunk.h \\\n  word_containing_object_type.h \\\n  roots.h \\\n  RVMPlugin.h \\\n  multicore_object_heap.h \\\n  multicore_object_table.h \\\n  memory_system.h \\\n  core_tracer.h \\\n  abstract_tracer.h \\\n  oop_tracer.h \\\n  execution_tracer.h \\\n  profiling_tracer.h \\\n  gc_debugging_tracer.h \\\n  performance_counters.h \\\n  safepoint.h \\\n  abstract_mutex.h \\\n  scheduler_mutex.h \\\n  semaphore_mutex.h \\\n  \\\n  message_stats.h \\\n  message_classes.h \\\n  interpreter_subset_for_control_transfer.h \\\n  interactions.h \\\n  deferred_request.h \\\n  message_or_ack_request.h \\\n  message_statics.h \\\n  receive_marker.h \\\n  \\\n  timeout_timer.h \\\n  timeout_deferral.h \\\n  \\\n  rank_set.h \\\n  safepoint_request_queue.h \\\n  gc_oop_stack.h \\\n  preheader.h \\\n  \\\n  abstract_os_interface.h \\\n  ilib_os_interface.h \\\n  posix_os_interface.h \\\n  osx_os_interface.h \\\n  os_interface.h \\\n  \\\n  safepoint_ability.h \\\n  my_rank.h \\\n  process_field_locator.h\\\n  abstract_message.h \\\n  message_templates.h \\\n  \\\n  abstract_message_queue.h \\\n  shared_memory_message_queue.h \\\n  shared_memory_message_queue_per_sender.h \\\n  ilib_message_queue.h \\\n  tilera_chip_to_chip_message_queue.h \\\n  host_pci_info.h \\\n  abstract_zero_copy_command_queue_endpoint.h \\\n  chip_to_chip_direct_to_hypervisor_zero_copy_endpoint.h \\\n  chip_to_chip_direct_to_hypervisor_zero_copy_sender.h \\\n  chip_to_chip_direct_to_hypervisor_zero_copy_receiver.h \\\n  chip_to_chip_zero_copy_command_queue_endpoint.h \\\n  chip_to_chip_zero_copy_command_sender.h \\\n  chip_to_chip_zero_copy_command_receiver.h \\\n  abstract_memory_semantics.h \\\n  process_memory_semantics.h \\\n  thread_memory_semantics.h \\\n  \\\n  debug_store_checks.h \\\n  debug_helper.h \\\n  tracked_ptr.h \\\n  tracked_ptr_registry.h \\\n  \n\nifeq \"$(PLATFORM)\" \"Intel\"\nRVM_HEADERS += \\\n  buffered_channel.h \\\n  buffered_channel_debug.h \\\n\nendif\n\n# default target\nall: $(EXECUTABLE)\n\ninfo:\n\t@echo Platform: $(PLATFORM)\n\t@echo SRC_DIR: $(SRC_DIR)\n\t@$(CC) --version\n\t@$(CXX) --version\n\n\n#Hack to satisfy make, to force override buildin rules, even if its not able to find all prerequisites.\n$(RVM_HEADERS):\n\t@echo The following RVM_HEADER files have not been found and cause unnecessary rebuilds: $@\n\n#Hack to satisfy make, to force override buildin rules, even if its not able to find all prerequisites.\n$(SQ_HEADERS):\n\nTTY=$(shell test -t 0 && echo \"true\")\nifeq \"$(TTY)\" \"true\"\n\tSTART_BOLD=$(shell tput bold)\n\tSTOP_BOLD=$(shell tput sgr0)\nendif\nPRINT_COMPILATION_INFO=@echo \"$(START_BOLD)Compiling $(notdir $<)$(STOP_BOLD)\"\n\n#the space after %.i is necessary, otherwise the buildin will not be canceled properly\n%.i : %.c $(SQ_HEADERS)\n\t$(PRINT_COMPILATION_INFO)\n\t$(AT)$(CC) $(CFLAGS) $(CONLYFLAGS) -E  $< -o $@\n\n%.o : %.c $(SQ_HEADERS) Makefile\n\t$(PRINT_COMPILATION_INFO)\n\t$(AT)$(CC) $(CFLAGS) $(CONLYFLAGS) $(OPTIMIZE_LEVEL) -c $< -o $@\n\n%.i : %.cpp  $(RVM_HEADERS)\n\t$(PRINT_COMPILATION_INFO)\n\t$(AT)$(CXX) $(CFLAGS) $(CXXFLAGS) -E $< -o $@\n\n%.o : %.cpp $(RVM_HEADERS) Makefile \n\t$(PRINT_COMPILATION_INFO)\n\t$(AT)$(CXX) $(CFLAGS) $(CXXFLAGS) $(OPTIMIZE_LEVEL) -c $< -o $@\n\n\nvpath %.c $(SRC_DIR)/from_squeak\nvpath %.c $(SRC_DIR)/from_squeak/Cross\nvpath %.c $(SRC_DIR)/from_squeak/Cross/plugins\nvpath %.c $(SRC_DIR)/from_squeak/Cross/plugins/B3DAcceleratorPlugin\nvpath %.c $(SRC_DIR)/from_squeak/Cross/plugins/FilePlugin\nvpath %.c $(SRC_DIR)/from_squeak/Cross/plugins/RePlugin\nvpath %.c $(SRC_DIR)/from_squeak/Cross/plugins/SocketPlugin\nvpath %.c $(SRC_DIR)/from_squeak/Cross/vm\nvpath %.c $(SRC_DIR)/from_squeak/intplugins\nvpath %.c $(SRC_DIR)/from_squeak/intplugins/B2DPlugin\nvpath %.c $(SRC_DIR)/from_squeak/intplugins/BitBltPlugin\nvpath %.c $(SRC_DIR)/from_squeak/intplugins/FloatArrayPlugin\nvpath %.c $(SRC_DIR)/from_squeak/intplugins/LargeIntegers\nvpath %.c $(SRC_DIR)/from_squeak/intplugins/Matrix2x3Plugin\nvpath %.c $(SRC_DIR)/from_squeak/intplugins/MiscPrimitivePlugin\nvpath %.c $(SRC_DIR)/from_squeak/intplugins/SoundPlugin\nvpath %.c $(SRC_DIR)/from_squeak/intplugins/UnixOSProcessPlugin\nvpath %.c $(SRC_DIR)/from_squeak/intplugins/SocketPlugin\nvpath %.c $(SRC_DIR)/from_squeak/unix\nvpath %.c $(SRC_DIR)/from_squeak/unix/plugins/FilePlugin\nvpath %.c $(SRC_DIR)/from_squeak/unix/plugins/SocketPlugin\nvpath %.c $(SRC_DIR)/from_squeak/unix/plugins/SoundPlugin\nvpath %.c $(SRC_DIR)/from_squeak/unix/vm\nvpath %.c $(SRC_DIR)/from_squeak/unix/vm-display-X11\nvpath %.c $(SRC_DIR)/from_squeak/unix/vm-sound-custom\nvpath %.c $(SRC_DIR)/from_squeak/unix/vm-sound-MacOSX\nvpath %.c $(SRC_DIR)/from_squeak/unix/vm-sound-null\n\n\nvpath %.h $(SRC_DIR)/from_squeak\nvpath %.h $(SRC_DIR)/from_squeak/Cross\nvpath %.h $(SRC_DIR)/from_squeak/Cross/plugins\nvpath %.h $(SRC_DIR)/from_squeak/Cross/plugins/B3DAcceleratorPlugin\nvpath %.h $(SRC_DIR)/from_squeak/Cross/plugins/FilePlugin\nvpath %.h $(SRC_DIR)/from_squeak/Cross/plugins/RePlugin\nvpath %.h $(SRC_DIR)/from_squeak/Cross/plugins/SocketPlugin\nvpath %.h $(SRC_DIR)/from_squeak/Cross/plugins/SoundPlugin\nvpath %.h $(SRC_DIR)/from_squeak/Cross/vm\nvpath %.h $(SRC_DIR)/from_squeak/intplugins\nvpath %.h $(SRC_DIR)/from_squeak/intplugins/B2DPlugin\nvpath %.h $(SRC_DIR)/from_squeak/intplugins/BitBltPlugin\nvpath %.h $(SRC_DIR)/from_squeak/intplugins/FloatArrayPlugin\nvpath %.h $(SRC_DIR)/from_squeak/intplugins/LargeIntegers\nvpath %.h $(SRC_DIR)/from_squeak/intplugins/Matrix2x3Plugin\nvpath %.h $(SRC_DIR)/from_squeak/intplugins/MiscPrimitivePlugin\nvpath %.h $(SRC_DIR)/from_squeak/intplugins/SoundPlugin\nvpath %.h $(SRC_DIR)/from_squeak/intplugins/UnixOSProcessPlugin\nvpath %.h $(SRC_DIR)/from_squeak/intplugins/SocketPlugin\nvpath %.h $(SRC_DIR)/from_squeak/unix\nvpath %.h $(SRC_DIR)/from_squeak/unix/plugins/B3DAcceleratorPlugin\nvpath %.h $(SRC_DIR)/from_squeak/unix/vm\nvpath %.h $(SRC_DIR)/from_squeak/unix/vm-display-X11\nvpath %.h $(SRC_DIR)/from_squeak/unix/vm-sound-custom\nvpath %.h $(SRC_DIR)/from_squeak/unix/vm-sound-MacOSX\nvpath %.h $(SRC_DIR)/from_squeak/unix/vm-sound-null\n\nvpath %.cpp $(SRC_DIR)/externals\nvpath %.cpp $(SRC_DIR)/heap\nvpath %.cpp $(SRC_DIR)/image_readers\nvpath %.cpp $(SRC_DIR)/interpreter\nvpath %.cpp $(SRC_DIR)/nonoops\nvpath %.cpp $(SRC_DIR)/objects\nvpath %.cpp $(SRC_DIR)/oops\nvpath %.cpp $(SRC_DIR)/runtime\nvpath %.cpp $(SRC_DIR)/platform\nvpath %.cpp $(SRC_DIR)/testers\nvpath %.cpp $(SRC_DIR)/types\nvpath %.cpp $(SRC_DIR)/primitives\nvpath %.cpp $(SRC_DIR)/messages\nvpath %.cpp $(SRC_DIR)/multichip\n\n\nvpath %.h $(SRC_DIR)/externals\nvpath %.h $(SRC_DIR)/heap\nvpath %.h $(SRC_DIR)/image_readers\nvpath %.h $(SRC_DIR)/interpreter\nvpath %.h $(SRC_DIR)/nonoops\nvpath %.h $(SRC_DIR)/objects\nvpath %.h $(SRC_DIR)/oops\nvpath %.h $(SRC_DIR)/runtime\nvpath %.h $(SRC_DIR)/platform\nvpath %.h $(SRC_DIR)/testers\nvpath %.h $(SRC_DIR)/types\nvpath %.h $(SRC_DIR)/primitives\nvpath %.h $(SRC_DIR)/messages\nvpath %.h $(SRC_DIR)/multichip\n\nifeq \"$(PLATFORM)\" \"Intel\"\nvpath %.cpp $(SRC_DIR)/message_buffers\n\nvpath %.h $(SRC_DIR)/message_buffers\nendif\n\n#        UnixOSProcessPlugin.o \n\nOBJS = \\\n  abstract_mark_sweep_collector.o \\\n  abstract_object_heap.o \\\n  aio.o \\\n  at_cache.o \\\n  B2DPlugin.o \\\n  BitBltPlugin.o \\\n  bytemap.o \\\n  core_tracer.o \\\n  abstract_tracer.o \\\n  oop_tracer.o \\\n  error_handling.o \\\n  externals.o \\\n  FilePlugin.o \\\n  FloatArrayPlugin.o \\\n  interpreter_bytecodes.o \\\n  interpreter_primitives.o \\\n  LargeIntegers.o \\\n  Matrix2x3Plugin.o \\\n  measurements.o \\\n  memory_system.o \\\n  method_cache.o \\\n  MiscPrimitivePlugin.o \\\n  multicore_object_heap.o \\\n  multicore_object_table.o \\\n  object.o \\\n  header_type.o \\\n  obsolete_indexed_primitive_table.o \\\n  obsolete_named_primitive_table.o \\\n  oop.o \\\n  primitive_table.o \\\n  printer.o \\\n  roots.o \\\n  rvm_bitmap.o \\\n  rvm_config.o \\\n  RVMPlugin.o \\\n  SoundPlugin.o \\\n  SocketPlugin.o \\\n  sqFilePluginBasicPrims.o \\\n  sqNamedPrims.o \\\n  sqUnixCharConv.o \\\n  sqUnixExternalPrims.o \\\n  sqUnixMain.o \\\n  sqUnixX11.o \\\n  sqVirtualMachine.o \\\n  squeak_adapters.o \\\n  squeak_image_reader.o \\\n  squeak_interpreter.o \\\n  sqUnixFile.o \\\n  sqUnixSound.o \\\n  sqUnixSoundNull.o \\\n  sqUnixSocket.o \\\n  utils.o \\\n  execution_tracer.o \\\n  profiling_tracer.o \\\n  gc_debugging_tracer.o \\\n  performance_counters.o \\\n  safepoint.o \\\n  abstract_mutex.o \\\n  scheduler_mutex.o \\\n  semaphore_mutex.o \\\n  \\\n  message_stats.o \\\n  message_classes.o \\\n  interpreter_subset_for_control_transfer.o \\\n  interactions.o \\\n  timeout_timer.o \\\n  timeout_deferral.o \\\n  \\\n  rank_set.o \\\n  safepoint_request_queue.o \\\n  \\\n  my_rank.o \\\n  safepoint_ability.o \\\n  process_field_locator.o \\\n  abstract_message.o \\\n  deferred_request.o \\\n  message_or_ack_request.o \\\n  \\\n  message_statics.o \\\n  receive_marker.o \\\n  \\\n  abstract_os_interface.o \\\n  logical_core.o \\\n  debug_helper.o \\\n\n\nifeq \"$(PLATFORM)\" \"Intel\"\nOBJS += \\\n  synced_queue.o \\\n  buffered_channel.o \\\n  posix_os_interface.o \\\n  shared_memory_message_queue.o \\\n  shared_memory_message_queue_per_sender.o \\\n  thread_memory_semantics.o \\\n  dummy_cpu_coordinate.o \\\n\nelse\nOBJS += \\\n  ilib_os_interface.o \\\n  ilib_message_queue.o \\\n  tilera_chip_to_chip_message_queue.o \\\n  host_pci_info.o \\\n  abstract_zero_copy_command_queue_endpoint.o \\\n  chip_to_chip_direct_to_hypervisor_zero_copy_endpoint.o \\\n  chip_to_chip_direct_to_hypervisor_zero_copy_sender.o \\\n  chip_to_chip_direct_to_hypervisor_zero_copy_receiver.o \\\n  chip_to_chip_zero_copy_command_queue_endpoint.o \\\n  chip_to_chip_zero_copy_command_sender.o \\\n  chip_to_chip_zero_copy_command_receiver.o \\\n  process_memory_semantics.o \\\n  tile_cpu_coordinate.o \\\n\nendif\n\nifeq \"$(OS)\" \"Darwin\"\nOBJS += osx_os_interface.o \\\n\nendif\n\n\nX11_PATH ?= /home/ungar/renaissance/xfree86/xc/lib/X11\nXext_PATH ?= /home/ungar/renaissance/xfree86/xc/lib/Xext\n\nifeq \"$(PLATFORM)\" \"Tilera\"\n  LIBS_LINKING = -rpath $(X11_PATH) $(X11_PATH)/libX11.a  $(Xext_PATH)/libXext.a\n  TILERA_LIBS = -lilib -ltmc -ldl -ltilepci\n  LDFLAGS += -static\nelse\n  # that should be dynamically on OS X and also standard linux, as far as I know\n  LIBS_LINKING = -L$(X11_PATH) -L$(Xext_PATH)\nendif\n\n\n$(EXECUTABLE): $(OBJS) main.o\n\t$(CXX) $(LDFLAGS) $(OBJS) main.o -lm $(TILERA_LIBS) $(LIBS_LINKING) -o $@\n\n# Test Related targets, we use the googletest framework for unit tests\n\nGTEST_INCLUDES = -I$(GTEST)/include -I$(GTEST)\n\nlibgtest.a:\n\t$(CXX) $(GTEST_INCLUDES) -m32 -c $(GTEST)/src/gtest-all.cc\n\t$(AR) -rv libgtest.a gtest-all.o\n\tranlib libgtest.a\n\n# REM: this will build the object files inside the test folder\n#      this allows us to use the same names for tests and implementation files\nTESTMAIN_WITHOUT_ROARVM := $(SRC_DIR)/tests/main_without_roarvm.cpp\nTEST_SRC  := $(filter-out $(TESTMAIN_WITHOUT_ROARVM),$(wildcard $(SRC_DIR)/tests/*.cpp))\nTEST_H    := $(wildcard $(SRC_DIR)/tests/*.h)\nTEST_OBJS := $(TEST_SRC:.cpp=.o) $(OBJS)\n\n$(TEST_OBJS) : $(TEST_H)\n\nrvm-test : CONFIG_FLAGS+=-g3 -DDebugging=1 -Dcheck_assertions=1 -Dcheck_many_assertions=1 -DUNIT_TESTING\nrvm-test : CXXFLAGS:=$(CXX_CONFIG_FLAGS)\nrvm-test : INCLUDES+=$(GTEST_INCLUDES)\nrvm-test: libgtest.a $(TEST_OBJS) $(TEST_H)\n\t$(CXX) $(LDFLAGS) $(TEST_OBJS) gtest-all.o -lm -lpthread  $(TILERA_LIBS) -L. $(LIBS_LINKING) -o $@\n\ntest: rvm-test\n\t$(AT)./rvm-test\n\ntest-cov : LDFLAGS+=-lgcov -coverage\ntest-cov : CONFIG_FLAGS+=-fprofile-arcs -ftest-coverage \ntest-cov: test\n\tgcov $(TEST_SRC) $(RVM_HEADERS) $(OBJS:.o=.cpp)\n\tlcov --directory . --capture --output-file rvm-gcov.info\n\tgenhtml --output-directory rvm-cov rvm-gcov.info\n\npartial-cov : LDFLAGS+=-lgcov -coverage\npartial-cov : CONFIG_FLAGS:=-fprofile-arcs -ftest-coverage -DWITHOUT_ROAR_VM -DUNIT_TESTING $(filter-out -DROAR_VM,$(CONFIG_FLAGS))\npartial-cov : CXXFLAGS:=$(CXX_CONFIG_FLAGS)\npartial-cov : INCLUDES+=$(GTEST_INCLUDES)\npartial-cov: $(SRC_DIR)/tests/interprocess_allocator.o $(SRC_DIR)/tests/circular_buffer.o $(SRC_DIR)/tests/main_without_roarvm.o libgtest.a\n\t$(AT)echo Coverage generation is currently only supported by GNU GCC not LLVM GCC\n\t$(CXX) $(LDFLAGS) $(SRC_DIR)/tests/interprocess_allocator.o $(SRC_DIR)/tests/circular_buffer.o $(SRC_DIR)/tests/main_without_roarvm.o gtest-all.o -lm -lpthread  $(TILERA_LIBS) -L. $(LIBS_LINKING) -o ./$@\n\t$(AT)./$@\n\tgcov -o $(SRC_DIR)/tests/ interprocess_allocator.cpp interprocess_allocator.h circular_buffer.cpp circular_buffer.h\n\tlcov --directory $(SRC_DIR)/tests/ --capture --output-file rvm-gcov.info\n\tgenhtml --output-directory rvm-cov rvm-gcov.info\n\nclean:\n\trm -f *.o $(EXECUTABLE) rvm-test libgtest.a $(TEST_OBJS)\n\trm -f *.gcno *.gcda *.gcov rvm-gcov.info $(SRC_DIR)/tests/*.gcno $(SRC_DIR)/tests/*.gcda $(SRC_DIR)/tests/*.gcov\n\trm -Rf partial-cov rvm-cov\n\ninstall: $(EXECUTABLE)\n\tinstall $(EXECUTABLE) /usr/local/bin\n\n.PHONY: all clean run test run_pci test_pci info\n"
  },
  {
    "path": "vm/src/makefiles/Makefile.debug",
    "content": "CONFIG_FLAGS = -g -Dcheck_assertions=1 -Dcheck_many_assertions=0 -DMeasure=0 -DWork_Around_Barrier_Bug=1\n# CONFIG_FLAGS = -g -Dcheck_assertions=1 -Dcheck_many_assertions=0 -DMeasure=0 -DWork_Around_Barrier_Bug=1 -DTrace_Execution=1\n\n\ninclude ../src/makefiles/Makefile.common\n\n#CONFIG_FLAGS = -g -Dcheck_assertions=false -DMeasure=1\n#CONLY_CONFIG_FLAGS = -O3\n#CXX_CONFIG_FLAGS = -O3\n\nOPTIMIZE_LEVEL  = -O0\n"
  },
  {
    "path": "vm/src/makefiles/Makefile.opt",
    "content": "CONFIG_FLAGS = -g\n#CONLY_CONFIG_FLAGS = -O0\n#CXX_CONFIG_FLAGS = -g -O0  -DWork_Around_Barrier_Bug=1\nCONLY_CONFIG_FLAGS = -O3\nCXX_CONFIG_FLAGS = -g -O3  -DWork_Around_Barrier_Bug=1\n\n../run/rvm: rvm\n\tcp rvm ../run\n  echo \"WARNING: gcc optimizations turned off for debugging\"\n\ninclude ../src/makefiles/Makefile.common\n\n# run faster on Tilera, low level only needed for some compilers\nLOW_OPTIMIZE_LEVEL  = -O3\n"
  },
  {
    "path": "vm/src/makefiles/configure",
    "content": "#!/bin/bash\n\necho_usage () {\n    echo \"Usage: $0 [options]\"\n    echo\n    echo \"Creates a configured Makefile\"\n    echo\n    echo \"Basic configuration values:\"\n    echo \"    --use-tilera        Enable usage of Tilera libraries\"\n    echo\n    echo \"    --debug\"\n    echo \"    --enforce-opt       Should be used together with --debug to enforce full optimization\"\n    echo \"    --enable-native-opt Enable optimization for current native architecture\"\n    echo \"    --show-cmds         Show the command invocations\"\n    echo \"    --enable-perfcnt    Enable internal performance counters\"\n    echo\n    echo \"Libraries:\"\n    echo \"    --x11-lib <path>    Path to the X11 lib folder\"\n    echo \"    --xext-lib <path>   Path to the X11 extension lib folder\"\n    echo \"    --tile-root <path>  Path to the TILERA infrastructure\"\n    echo\n    echo \"Compiler:\"\n    echo \"    --CC <path>\"\n    echo \"    --CXX <path>\"\n    # return an error code to signal non-success\n    exit 128\n}\n\n# Retrieve system information and set defaults\n\nOPERATING_SYSTEM=`uname`\nUSE_TILERA=0\nFOR_DISTRIBUTION=1\nDEBUG=0\nENFORCE_OPT=0\nSUPPRESS_CMD_OUTPUT=1\nPERF_COUNTERS=0\nOPTIMIZE_LEVEL=-O3\n#CC=\n#CXX=\nCONFIGURE_ARGS=\"$@\"\nCONFIG_FLAGS=\"-m32 -Wextra -Wno-write-strings\"\nPWD=`pwd`\n\n# Not sure whether we need absolute file names, but will preserve it for now.\n# However, spaces do break things, so, try to use relative pathes\n# instead if there is a space in the path.\ncase \"$PWD\" in\n    *\\ * )\n        SRC_DIR=../src\n        ;;\n    *)\n        SRC_DIR=`dirname $PWD`/src\n        ;;\nesac\n\n\n#SYSCTL=\"/sbin/sysctl\"\n#if [ ! -e $SYSCTL ] then SYSCTL=\"/usr$SYSCTL\" fi\n#number_of_cores=`$SYSCTL `\n\nwhile [ $# -gt 0 ]\ndo\n  case $1 in\n    --enable-native-opt)\n      FOR_DISTRIBUTION=0\n      shift 1\n    ;;\n    --use-tilera)\n      USE_TILERA=1\n      shift 1\n    ;;\n    --opt-workaround)\n      # not necessary anymore, just ignored\n      shift 1\n    ;;\n    --debug)\n      DEBUG=1\n      shift 1\n    ;;\n    --enforce-opt)\n      ENFORCE_OPT=1\n      shift 1\n    ;;\n    --enable-perfcnt)\n      PERF_COUNTERS=1\n      shift 1\n    ;;\n    --show-cmds)\n      SUPPRESS_CMD_OUTPUT=0\n      shift 1\n    ;;\n    --x11-lib)\n      X11_PATH=$2\n      shift 2\n    ;;\n    --xext-lib)\n      Xext_PATH=$2\n      shift 2\n    ;;\n    --CC)\n      CC=$2\n      shift 2\n    ;;\n    --CXX)\n      CXX=$2\n      shift 2\n    ;;\n    -h | --help | *)\n      echo_usage\n      shift 1\n    ;;\n  esac\ndone\n\nif [ $DEBUG -eq 0 ]\nthen\n    CONFIG_FLAGS=\"$CONFIG_FLAGS\"\nelse\n    CONFIG_FLAGS=\"$CONFIG_FLAGS \\\\\n        -g3 \\\\\n        -DDebugging=1 \\\\\n        -Dcheck_many_assertions=1 \\\\\n        -DTrace_Execution=0 -DTrack_OnStackPointer=0 \\\\\n       \"\n\tif [ $ENFORCE_OPT -eq 0 ]\n    then\n\t    OPTIMIZE_LEVEL=-O0\n    fi\nfi\n\nif [ $USE_TILERA -eq 0 ]\nthen\n  case $OPERATING_SYSTEM in\n    Darwin)\n        LDFLAGS=\"$LDFLAGS -lX11 -lXext -framework CoreFoundation -lGL -framework CoreServices -framework IOKit -Wl,-no_pie\"\n        X11_PATH=\"/Developer/SDKs/MacOSX10.6.sdk/usr/X11R6/lib\"\n        Xext_PATH=\"/Developer/SDKs/MacOSX10.6.sdk/usr/X11R6/lib\"\n        if [ ! -e $X11_PATH ]\n        then\n            X11_PATH=\"/opt/X11/lib\"\n            Xext_PATH=$X11_PATH\n        fi\n        if [ -z \"$CXX\" ]\n        then\n            CC=gcc\n            CXX=g++\n        fi\n        CONFIG_FLAGS=\"$CONFIG_FLAGS -I/Developer/SDKs/MacOSX10.6.sdk/usr/X11/include/ -I/opt/X11/include/\"\n\n\t\t# for OSX it might be necessary to use a -D__INTEL_COMPILER\n\t\t# Usually some stuff needing CFBundle.h will not compiler otherwise\n\t\t# with non-apple compilers\n\t\tOUTPUT=`$CXX --version | grep -i apple`\n\t\tNONE_APPLE_COMPILE=$?\n\t\tif [ $NONE_APPLE_COMPILE -eq 1 ]\n\t\tthen\n\t\t\tCONFIG_FLAGS=\"$CONFIG_FLAGS -D__INTEL_COMPILER\"\n\t\tfi\n    ;;\n    Linux)\n    \tLDFLAGS=\"$LDFLAGS -ldl -lX11 -lXext -lpthread\"\n        CONFIG_FLAGS=\"$CONFIG_FLAGS -DOn_Intel_Linux=1 -DHAVE_DLFCN_H=1\"\n\n        # WARNING/TODO: currently we enforce native optimization on Linux\n        #               this should be removed to be able to provide \n        #               distributable binaries\n        FOR_DISTRIBUTION=0\n    ;;\n  esac\nfi\n\nif [ $FOR_DISTRIBUTION -eq 0 ]\nthen\n    CONFIG_FLAGS=\"$CONFIG_FLAGS -march=native -mtune=native\"\nfi\n\necho \"# Makefile generated by $0 $CONFIGURE_ARGS\" > Makefile\n\nif [ -z \"$CXX\" ]\nthen\n    if [ $USE_TILERA -eq 1 ]\n    then\n        CC=\"\\$(BIN)tile-cc\"\n        CXX=\"\\$(BIN)tile-c++\"\n\t\tCONFIG_FLAGS=\"$CONFIG_FLAGS -DTrack_OnStackPointer=0\"\n        if [[ `tile-cc --version` == \"2.1.0.98943\"* ]]\n        then\n          CONFIG_FLAGS=\"$CONFIG_FLAGS -DUse_CMem=1\"\n        fi\n    else\n        CC=gcc\n        CXX=g++\n    fi\nfi\n\n# try some locations to find the X11 libs\nif [ -z \"$X11_PATH\" ]\nthen\n    if [ $USE_TILERA -eq 1 ]\n    then\n        if [ -f /users/smarr/Projects/X11-Tilera-libs/current/libX11.a ]\n        then\n            X11_PATH=\"/users/smarr/Projects/X11-Tilera-libs/current/\"\n            Xext_PATH=\"/users/smarr/Projects/X11-Tilera-libs/current/\"\n        else\n            if [ -f /home/ungar/renaissance/xfree86/xc/lib/X11/libX11.a ]\n            then\n                X11_PATH=\"/home/ungar/renaissance/xfree86/xc/lib/X11\"\n                Xext_PATH=\"/home/ungar/renaissance/xfree86/xc/lib/Xext\"\n            fi\n        fi\n    else\n        if [ -x /usr/lib32 ]\n        then\n            X11_PATH=\"/usr/lib32\"\n            Xext_PATH=\"/usr/lib32\"\n        else\n            X11_PATH=\"/usr/lib\"\n            Xext_PATH=\"/usr/lib\"\n        fi\n    fi\nfi\n\nif [ $PERF_COUNTERS -eq 1 ]\nthen\n    CONFIG_FLAGS=\"$CONFIG_FLAGS \\\\\n        -DCollect_Performance_Counters=1 -DCount_Cycles=1\"\nfi\n\nif [ $USE_TILERA -eq 1 ]\nthen\n    echo \"TILERA_ROOT=$TILERA_ROOT\"   >> Makefile\n    echo \"BIN=\\$(TILERA_ROOT)/bin/\"   >> Makefile\n    echo \"PLATFORM=Tilera\"            >> Makefile\n    echo \"OS=Linux\"                   >> Makefile\n    echo \"CONFIG_FLAGS = $CONFIG_FLAGS\">>Makefile\nelse\n    # for now suppress a number of known warnings\n    # won't work with the tile-cc\n    CONFIG_FLAGS=\"$CONFIG_FLAGS  \\\\\n        -fdiagnostics-show-option -Wno-unused-variable -Wno-unused-value\"\n\n    echo \"CONFIG_FLAGS = $CONFIG_FLAGS -DMeasure=0\"         >> Makefile\n    echo \"PLATFORM=Intel\"             >> Makefile\nfi\n\necho \"CC = $CC\"                >> Makefile\necho \"CXX= $CXX\"               >> Makefile\necho \"LDFLAGS=$LDFLAGS\"        >> Makefile\necho \"X11_PATH=$X11_PATH\"      >> Makefile\necho \"Xext_PATH=$Xext_PATH\"    >> Makefile\necho \"SRC_DIR=$SRC_DIR\"        >> Makefile\necho \"OPTIMIZE_LEVEL = $OPTIMIZE_LEVEL\"  >> Makefile\necho \"SUPPRESS_CMD_OUTPUT= $SUPPRESS_CMD_OUTPUT\" >> Makefile\n\necho \"include $SRC_DIR/makefiles/Makefile.common\" >> Makefile\n\n# after successful run, preserve this configure call for later reuse\necho \"#!/bin/sh\n$0 $CONFIGURE_ARGS \\\"\\$@\\\" &\" > config.last\nchmod +x config.last\n"
  },
  {
    "path": "vm/src/message_buffers/buffered_channel.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    Stefan Marr, Vrije Universiteit Brussel - Initial Implementation\n *\n ******************************************************************************/\n\n\n#include <string.h>\n#include <assert.h> //make sure it is only included if we are using the unittests\n\n#include \"buffered_channel.h\"\n\nvoid BufferedChannel::initialize(size_t numberOfBuffers, size_t sizeOfSingleBuffer) {\n  syncedqueue_initialize(&free_list, (int32_t*)free_list_buffer, numberOfBuffers);\n  syncedqueue_initialize(&waiting_list, (int32_t*)waiting_list_buffer, numberOfBuffers);\n  syncedqueue_initialize(&used_list, (int32_t*)used_list_buffer, numberOfBuffers);\n\n  for (size_t i = 0; i < numberOfBuffers; i++) {\n    int32_t buffer_address = int32_t(buffer_memory) + i * (sizeOfSingleBuffer + sizeof(buffer));\n    syncedqueue_enqueue(&free_list, &buffer_address, 1);\n  }\n}\n\nvoid BufferedChannel::send(const void* data, size_t size) {\n  // check size of data\n  assert(size <= size_of_single_buffer);\n\n  // aquire buffer\n  buffer* buffer;\n  syncedqueue_dequeue(&free_list, (int32_t*)&buffer, 1);\n\n  // copy data to buffer\n  memcpy(buffer->buffer, data, size);\n  buffer->used = size;\n\n  // put buffer into used list\n  syncedqueue_enqueue(&waiting_list, (int32_t*)&buffer, 1);\n}\n\nconst void* BufferedChannel::receive(size_t& size) {\n  buffer* buffer;\n\n  // block until data available\n  syncedqueue_dequeue(&waiting_list, (int32_t*)&buffer, 1);\n\n  // put into used list\n  syncedqueue_enqueue(&used_list, (int32_t*)&buffer, 1);\n\n  size = buffer->used;\n  return (const void*)buffer->buffer;\n}\n\nvoid BufferedChannel::releaseOldest(void* buffer_to_be_released_for_debugging) {\n  // get latest used buffer\n  buffer* buffer;\n\n  syncedqueue_dequeue(&used_list, (int32_t*)&buffer, 1);\n  assert((void*)buffer->buffer == buffer_to_be_released_for_debugging);\n\n  // set used to 0\n  buffer->used = 0;\n\n  // enqueue to free list\n  syncedqueue_enqueue(&free_list, (int32_t*)&buffer, 1);\n}\n\nbool BufferedChannel::hasData() {\n  // check whether waiting list is not empty\n  return !syncedqueue_is_empty(&waiting_list);\n}\n\n"
  },
  {
    "path": "vm/src/message_buffers/buffered_channel.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    Stefan Marr, Vrije Universiteit Brussel - Initial Implementation\n *\n ******************************************************************************/\n\n\n#include <stdint.h>\n#include <stdlib.h>\n\n#include \"synced_queue.h\"\n\nclass BufferedChannel {\nprivate:\n  const void* buffer_memory;\n  const size_t num_buffers;\n  const size_t size_of_single_buffer;\n\n  typedef struct buffer {\n    size_t used;\n    char buffer[0];\n  } buffer, *pBuffer;\n\n  syncedqueue free_list;          // free buffers to be used\n  const void* free_list_buffer;\n\n  syncedqueue waiting_list;       // waiting buffers to be received, have been free before, will be come used after receiving\n  const void* waiting_list_buffer;\n\n  syncedqueue used_list;          // buffers used in the client program, can be released to free buffers\n  const void* used_list_buffer;\n\n  void initialize(size_t numberOfBuffers, size_t sizeOfSingleBuffer);\n\npublic:\n  BufferedChannel(size_t numberOfBuffers, size_t sizeOfSingleBuffer)\n  : buffer_memory(malloc(numberOfBuffers * (sizeOfSingleBuffer + sizeof(buffer)))),\n    num_buffers(numberOfBuffers),\n\tsize_of_single_buffer(sizeOfSingleBuffer),\n\tfree_list_buffer(malloc(sizeof(int32_t) * numberOfBuffers)),\n    waiting_list_buffer(malloc(sizeof(int32_t) * numberOfBuffers)),\n    used_list_buffer(malloc(sizeof(int32_t) * numberOfBuffers))\n  {\n    //num_buffers = numberOfBuffers;\n    initialize(numberOfBuffers, sizeOfSingleBuffer);\n  }\n\n  ~BufferedChannel() {\n    free((void*)buffer_memory);\n    free((void*)free_list_buffer);\n    free((void*)waiting_list_buffer);\n    free((void*)used_list_buffer);\n  }\n\n  void send(const void* data, size_t size);\n  const void* receive(size_t& size);\n  void releaseOldest(void*);\n  bool hasData();\n\n};\n\n"
  },
  {
    "path": "vm/src/message_buffers/buffered_channel_debug.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    Stefan Marr, Vrije Universiteit Brussel - Initial Implementation\n *\n *  \n *  This is the debug version of our buffered channel implementation.\n *  While the buffered_channel.h implementation was build from scratch, to\n *  be highly optimized, it might be buggy.\n *  This version is implemented using the simples possible strategy and std::queue\n *  to ensure that is correct. But it might be less performant.\n *\n ******************************************************************************/\n\n\n#include <stdint.h>\n#include <queue>\n#include <pthread.h>\n\nusing namespace std;\n\nclass BufferedChannelDebug {\nprivate:\n  queue<void*> channel;\n  pthread_mutex_t lock; \n\npublic:\n  BufferedChannelDebug() {\n    pthread_mutex_init(&lock, NULL);\n  }\n\n  /**\n   * TODO: This is inherently unsafe!\n   * I will not care about it at the moment, but this behavior is undefined.\n   * Especially since I cannot reliably destroy a locked mutex.\n   */\n  ~BufferedChannelDebug() {\n    pthread_mutex_lock(&lock);\n    \n    while (!channel.empty()) {\n      free(channel.front());\n      channel.pop();\n    }\n    \n    pthread_mutex_unlock(&lock);\n    \n    pthread_mutex_destroy(&lock);\n  }\n\n  void send(const void* data, size_t size) {\n    void* const buffer = malloc(size);\n    memcpy(buffer, data, size);\n  \n    pthread_mutex_lock(&lock);\n    channel.push(buffer);\n    pthread_mutex_unlock(&lock);\n  }\n  \n  void* receive(size_t&) {\n    pthread_mutex_lock(&lock);\n    void* const result = channel.front();\n    channel.pop();\n    pthread_mutex_unlock(&lock);\n    \n    return result;\n  }\n  \n  void releaseOldest(void* const buffer) const {\n    free(buffer);\n  }\n\n// STEFAN: performance hack, not using the lock here is usually safe, depending on the queue implementation\n/* On OSX that it is safe, the queue is based on a deque which uses a \n   pointer compare, the object storing the pointers is allocated\n   on initalization,\n   so there is a race, but there is no problem with corrupted memory.\n   the result might be wrong (ignoring avilable data), but it will not crash,\n   and it is a lot faster */\n#define _SKIP_HAS_DATA_LOCKING 1\n  \n#if _SKIP_HAS_DATA_LOCKING\n  __attribute__((noinline)) // seems to be necessary, otherwise the volatile hack does not work\n#endif\n  bool hasData() {\n    if (!_SKIP_HAS_DATA_LOCKING) pthread_mutex_lock(&lock);\n    \n    // assign to volatile bool to avoid to optimize that out of any loop\n    // does on the tested GCC 4.5 only work if the function is not inlined\n    volatile bool result = !channel.empty();  \n\n    if (!_SKIP_HAS_DATA_LOCKING) pthread_mutex_unlock(&lock);\n\n    return result;\n  }\n\n};\n\n"
  },
  {
    "path": "vm/src/message_buffers/synced_queue.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    Stefan Marr, Vrije Universiteit Brussel - Initial Implementation\n *\n ******************************************************************************/\n\n\n#include <unistd.h>\n#include <stdio.h>\n#include <limits.h>\n#include <pthread.h>\n#include <algorithm>\n\n#include <assert.h>\n\n#include \"synced_queue.h\"\n\n# ifndef __APPLE__\n  # define pthread_yield_np pthread_yield\n# endif\n\nvoid syncedqueue_initialize(p_syncedqueue sq, int32_t* const buffer, size_t item_count) {\n  assert(item_count <= USHRT_MAX);\n  assert(sizeof(atomic_status) == sizeof(int32_t));\n\n  sq->buffer      = buffer;\n  sq->buffer_end  = sq->buffer + item_count;\n\n\tsq->writer.wrt.write_offset = 0;\n  sq->writer.wrt.free_items   = item_count;\n\n  sq->reader.rd.read_offset = 0;\n  sq->reader.rd.avail_items = 0;\n\n  sq->max_number_of_items = item_count;\n\n  sq->initialized = true;\n}\n\n/**\n * Helper function to do the acutal copying into the ringbuffer\n */\nvoid _store(p_syncedqueue sq, uint16_t start_offset, int32_t* const data, const size_t item_count) {\n  // do we need a wrap around?\n  if (start_offset + item_count > sq->max_number_of_items) {\n    uint16_t num_items_tail = sq->max_number_of_items - start_offset;   // this number of items is going to the tail\n    uint16_t num_items_head = item_count - num_items_tail;              // this number of items is going to the head\n\n    int32_t* writer = sq->buffer + start_offset;\n    int32_t* reader = data;\n\n    while (num_items_tail--) {\n      *writer++ = *reader++;\n    }\n\n    // wrap around and at the front of the ring buffer\n    writer = sq->buffer;\n    while (num_items_head--) {\n      *writer++ = *reader++;\n    }\n  }\n  else {\n    uint16_t num_items = item_count;\n\n    int32_t* writer = sq->buffer + start_offset;\n    int32_t* reader = data;\n\n    while (num_items--) {\n      *writer++ = *reader++;\n    }\n  }\n}\n\n/**\n * Helper function to do the acutal copying out of ringbuffer\n *\n * !! COPY_PAST + swap reader/writer\n *  copy is otherwise identical to _store\n */\nvoid _read(p_syncedqueue sq, const uint16_t start_offset, int32_t* const data, const size_t item_count) {\n  // do we need a wrap around?\n  if (start_offset + item_count > sq->max_number_of_items) {\n    uint16_t num_items_tail = sq->max_number_of_items - start_offset;   // this number of items is going to the tail\n    uint16_t num_items_head = item_count - num_items_tail;              // this number of items is going to the head\n\n    int32_t* reader = sq->buffer + start_offset;\n    int32_t* writer = data;\n\n    while (num_items_tail--) {\n      *writer++ = *reader++;\n    }\n\n    // wrap around and at the front of the ring buffer\n    reader = sq->buffer;\n    while (num_items_head--) {\n      *writer++ = *reader++;\n    }\n  }\n  else {\n    uint16_t num_items = item_count;\n\n    int32_t* reader = sq->buffer + start_offset;\n    int32_t* writer = data;\n\n    while (num_items--) {\n      *writer++ = *reader++;\n    }\n  }\n}\n\n\n/**\n We dont allow requests larger then the buffer size anymore.\n For all relevant usages in the RVM i.e. messages, we can effort\n to have a buffer of a size larger then the largest message\n */\n/* void syncedqueue_enqueue_ext(p_syncedqueue sq, int32_t* const data, const size_t item_count) {\n ...\n}*/\n\n\nvoid syncedqueue_enqueue(p_syncedqueue sq, int32_t* const data, const size_t item_count) {\n  assert(item_count <= sq->max_number_of_items);\n\n  bool done = false;\n\n  uint32_t numTries = 0;\n\n  while (!done) {\n    atomic_status cur_writer = sq->writer;\n\n    if (cur_writer.wrt.free_items >= item_count) {\n      atomic_status new_writer;\n\n      new_writer.wrt.write_offset =\n          (cur_writer.wrt.write_offset + item_count) % sq->max_number_of_items;\n      new_writer.wrt.free_items = cur_writer.wrt.free_items - item_count;\n\n      if (__sync_bool_compare_and_swap(&sq->writer.atomic_value,\n                                       cur_writer.atomic_value,\n                                       new_writer.atomic_value)) {\n        _store(sq, cur_writer.wrt.write_offset, data, item_count);\n        done = true;\n\n        // update available items\n        bool updateAvail = false;\n\n        while (!updateAvail) {\n          atomic_status reader = sq->reader;\n          atomic_status new_reader = reader;\n          new_reader.rd.avail_items += item_count;\n\n          if (__sync_bool_compare_and_swap(&sq->reader.atomic_value,\n                                           reader.atomic_value,\n                                           new_reader.atomic_value)) {\n            updateAvail = true;\n          }\n          //else {\n          //  pthread_yield_np();\n          //}\n        }\n      }\n    }\n    else {\n      // STEFAN: check here with a textbook what the most efficient strategie is to wait\n      numTries++;\n\n      //if (numTries > 32) {\n      //  useconds_t sleep = 1 << (numTries - 32); // wait an expentially growing time span\n      //  usleep(std::min((useconds_t)500000, sleep));              // do not sleep longer than 0.5sec\n      //}\n      //else if (numTries > 16) {\n      //  pthread_yield_np();\n      //}\n      //else { /* NOP */ }\n    }\n  }\n}\n\n\n\n/**\n * Dequeuing elements safely with multiple readers\n */\nvoid syncedqueue_dequeue(p_syncedqueue sq, int32_t* const data, const size_t item_count) {\n  assert(item_count <= sq->max_number_of_items);\n\n  bool done = false;\n\n  uint32_t numTries = 0;\n\n  while (!done) {\n    atomic_status reader = sq->reader;\n\n    if (reader.rd.avail_items >= item_count) {\n      atomic_status new_reader;\n\n      new_reader.rd.read_offset = (reader.rd.read_offset + item_count) % sq->max_number_of_items;\n      new_reader.rd.avail_items =  reader.rd.avail_items - item_count;\n\n      if (__sync_bool_compare_and_swap(&sq->reader.atomic_value,\n                                       reader.atomic_value,\n                                       new_reader.atomic_value)) {\n        _read(sq, reader.rd.read_offset, data, item_count);\n        done = true;\n\n        // update free items\n        bool updateFree = false;\n\n        while (!updateFree) {\n          atomic_status writer = sq->writer;\n          atomic_status new_writer = writer;\n          new_writer.wrt.free_items += item_count;\n\n          if (__sync_bool_compare_and_swap(&sq->writer.atomic_value,\n                                           writer.atomic_value,\n                                           new_writer.atomic_value)) {\n            updateFree = true;\n          }\n          //else {\n          //  pthread_yield_np();\n          //}\n        }\n      }\n    }\n    else {\n      // STEFAN: check here with a textbook what the most efficient strategie is to wait\n      numTries++;\n\n      if (numTries > 32) {\n        useconds_t sleep = 1 << (numTries - 32); // wait an expentially growing time span\n        usleep(std::min((useconds_t)500000, sleep));              // do not sleep longer than 0.5sec\n      }\n      else if (numTries > 16) {\n        pthread_yield_np();\n      }\n      else { /* NOP */ }\n    }\n  }\n}\n\n\nbool syncedqueue_is_initialized(p_syncedqueue sq) {\n  return sq->initialized;\n}\n\nbool syncedqueue_is_empty(p_syncedqueue sq) {\n  return sq->reader.rd.avail_items == 0;\n}\n\nbool syncedqueue_is_full(p_syncedqueue sq) {\n  return sq->reader.wrt.free_items == 0;\n}\n\n"
  },
  {
    "path": "vm/src/message_buffers/synced_queue.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    Stefan Marr, Vrije Universiteit Brussel - Initial Implementation\n *\n *\n *  Implemented with a fixed size ring buffer.\n *  The buffer containts elements of a given size (sizeof(int32_t) for the moment).\n *  It can contain max. 64k elements.\n *  This is restricted by the available 32-bit compare-and-swap operation.\n *  The lock-free implementation is based on strong the writing offset and\n *  the number of free items in an int32_t to allow atomic updates on CPU level.\n *\n *  Origninally inspired by Ring_Buffer, 1997-06-19, Jarno Elonen <elonen@iki.fi>\n *  http://elonen.iki.fi/code/misc-notes/ringbuffer/\n *  Current implementation is completely rewritten to be entierly lock-free and\n *  supports multi-writers and a single-reader.\n *\n ******************************************************************************/\n\n\n#include <pthread.h>\n#include <stdint.h>\n\n#ifndef __SYNCED_QUEUE_H__\n#define __SYNCED_QUEUE_H__\n\ntypedef union {\n\n  int32_t atomic_value;\n\n  struct {\n    uint16_t write_offset;  // offset for the write pointer into the ringbuffer\n    uint16_t free_items;    // number of free entries in the buffer, an entry should be a int32_t i.e. 4byte\n  } wrt;\n\n  struct {\n    uint16_t read_offset;   // offset for the read pointer into the ringbuffer\n    uint16_t avail_items;   // number of available entries in the buffer, an entry should be a int32_t i.e. 4byte\n  } rd;\n\n} atomic_status;\n\n\ntypedef struct syncedqueue {\n  int32_t* buffer;        // pointer of the start of the buffer (read-only)\n  int32_t* buffer_end;    // pointer to the end of the buffer   (read-only)\n\n  atomic_status writer;   // status data for all writers\n  atomic_status reader;   // status data for all readers\n\n\tuint16_t max_number_of_items;\n\n  bool initialized;\n} syncedqueue, *p_syncedqueue;\n\n/**\n * Initialize the given queue.\n *    buffer     - pointer to the buffer of int32_t elements\n *    item_count - max number of items fitting into the buffer\n */\nvoid syncedqueue_initialize(p_syncedqueue sq,   int32_t* const buffer, size_t item_count);\n\nvoid syncedqueue_enqueue(p_syncedqueue sq,      int32_t* const data, const size_t item_count);\nvoid syncedqueue_dequeue(p_syncedqueue sq,      int32_t* const data, const size_t item_count);\nbool syncedqueue_is_initialized(p_syncedqueue sq);\nbool syncedqueue_is_empty(p_syncedqueue sq);\n\n#endif\n\n"
  },
  {
    "path": "vm/src/messages/abstract_message.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\n# if Checksum_Messages\n\nint abstractMessage_class::compute_checksum() {\n  int r = checksum; // this way checksum gets xored with itself, so ignored\n  int n = size_for_transmission_and_copying();\n  for (int* p = (int*)this;  (char*)p - (char*)this  <  n;  r ^= *p++);\n  return r;\n}\n# endif\n\n\n\nbool abstractMessage_class::should_ack(bool has_been_handled, int receiver_rank) {\n  switch (get_ack_setting()) {\n    default:                          { fatal(\"???\"); return false; }\n    case no_ack:                      return false;\n    case post_ack_for_correctness:    return sender != receiver_rank  &&  has_been_handled;\n  }\n}\n\n\nvoid abstractMessage_class::send_then_receive_and_handle_messages_returning_a_match(int rank, const abstractMessage_class& msg_to_rcv) {\n  if  ( get_safepoint_delay_setting() == delay_when_have_acquired_safepoint\n       &&    !Safepoint_Ability::is_interpreter_able() )  {\n    lprintf(\"About to wait for a response(%s) to a message(%s) that won't be processed if %d acquires a safepoint, \"\n            \"but this core is unable to safepoint, so deadlock will result.\\n\",\n            Message_Statics::message_names[msg_to_rcv.get_message_type()], Message_Statics::message_names[get_message_type()], rank);\n    fatal(\"Deadlock possibility\");\n  }\n  send_to(rank);\n  msg_to_rcv.receive_and_handle_messages_returning_a_match(rank);\n}\n\nvoid abstractMessage_class::receive_and_handle_messages_returning_a_match(int from_rank) const {\n  Message_Statics::receive_and_handle_messages_returning_a_match(get_message_type(), this, from_rank);\n}\n\n\nvoid abstractMessage_class::send_to(int r) {\n  assert_always(r != Logical_Core::my_rank()); // should not get here\n  if (get_safepoint_delay_setting() == delay_when_have_acquired_safepoint  &&  !Safepoint_Ability::is_interpreter_able()) \n    fatal(\"Deadlock possible: I may wait for this message to be handled, but if the other core is trying to safepoint, I won't allow it to\");\n  \n# if Checksum_Messages\n  checksum = compute_checksum();\n# endif\n# if  Check_Reliable_At_Most_Once_Message_Delivery\n  // must use get_message_type() cause ackMessage encodes orig type in header -- dmu 5/10\n  transmission_serial_number = Message_Stats::next_transmission_serial_number[get_message_type()][r][rank_on_threads_or_zero_on_processes()]++;\n# endif\n  \n  assert(r < Max_Number_Of_Cores);\n  logical_cores[r].message_queue.send_message(this);\n  if (should_ack( false, r)\n      ||  should_ack(  true, r))\n    Message_Statics::wait_for_ack(header, r);\n}\n\nvoid abstractMessage_class::handle_here_or_send_to(int r) {\n  if (r == Logical_Core::my_rank()) handle_me();\n  else send_to(r);\n}\n\n\nvoid abstractMessage_class::send_to_other_cores() {\n  FOR_ALL_OTHER_RANKS(i)\n    send_to(i);\n}\n\nvoid abstractMessage_class::send_to_all_cores() {\n  handle_me();\n  send_to_other_cores();\n}\n\n\nvoid abstractMessage_class::ack_if_appropriate(bool has_been_handled) {\n  \n  if (should_ack( has_been_handled, Logical_Core::my_rank()))\n    ackMessage_class(get_message_type()).send_to(sender); \n}\n\n\nvoid abstractMessage_class::defer_till_done_with_safepoint() {\n  if (The_Squeak_Interpreter()->safepoint_tracker->am_acquiring_safepoint_while_spinning_for(sender)) {\n    lprintf(\"Deadlock possible: received a message %s from core %d which must be delayed while I am acquiring a safepoint, \"\n            \"but it is the very same core that has safepointed me because %s\\n\",\n            Message_Statics::message_names[get_message_type()], sender, The_Squeak_Interpreter()->safepoint_tracker->why_other_core_needs_me_to_spin());\n    fatal(\"DEADLOCK\");\n  }\n  Deferred_Request::add(this);\n}\n\n\nvoid abstractMessage_class::handle_me_and_ack() { \n  ack_if_appropriate(false); \n  handle_me_or_maybe_delay(); \n  ack_if_appropriate(true); \n} \n\nvoid abstractMessage_class::handle_me_or_maybe_delay() { \n  if (get_safepoint_delay_setting() == delay_when_have_acquired_safepoint \n      &&  The_Squeak_Interpreter()->safepoint_tracker->have_acquired_safepoint()) \n    defer_till_done_with_safepoint(); \n  else  { \n    u_int64 start = OS_Interface::get_cycle_count(); \n    handle_me(); \n    u_int64 end = OS_Interface::get_cycle_count();\n    Message_Stats::record_receive_cycles(get_message_type(), end - start);\n  } \n}\n\nvoid abstractMessage_class::print() { \n  lprintf(\" msg: %s\\n\", Message_Statics::message_names[get_message_type()]);\n}\n"
  },
  {
    "path": "vm/src/messages/abstract_message.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass abstractMessage_class {\nprotected:\n  enum acking { \n    no_ack,\n    post_ack_for_correctness, \n  };\n  bool should_ack(bool, int);\n  \n  enum safepoint_delay_options { delay_when_have_acquired_safepoint, dont_delay_when_have_acquired_safepoint} ;\n  virtual acking get_ack_setting() const = 0;\n  virtual safepoint_delay_options get_safepoint_delay_setting() const = 0;\n  \n  void defer_till_done_with_safepoint();\n  \npublic:\n  abstractMessage_class(                ) { sender = cpu_core_my_rank(); }\n  abstractMessage_class( Receive_Marker*) { }\n  virtual void send_to(int);\n  virtual Message_Statics::messages get_message_type() const = 0;\n  void send_to_other_cores();\n  void send_to_all_cores();\n  void handle_here_or_send_to(int r);\n  virtual int size_for_transmission_and_copying() const { return sizeof(*this); }\n  \n  void send_then_receive_and_handle_messages_returning_a_match(int, const abstractMessage_class&);\n  void receive_and_handle_messages_returning_a_match(int) const;\n  \n  Message_Statics::messages header;\n  int sender;\n  \n  \n# if Checksum_Messages\n  int checksum;\n  int compute_checksum();\n# endif\n  \n# if  Check_Reliable_At_Most_Once_Message_Delivery\n  int transmission_serial_number;\n  static int* next_transmission_serial_number_by_class;\n# endif\n  \n  void ack_if_appropriate(bool);\n  virtual void do_all_roots(Oop_Closure*) {}\n    \n  virtual void handle_me() = 0;\n  virtual void handle_me_and_ack();\n  virtual void handle_me_or_maybe_delay();\n  \n  virtual void print();\n  \n};\n"
  },
  {
    "path": "vm/src/messages/deferred_request.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\n\nDeferred_Request* Deferred_Request::first_request[Memory_Semantics::max_num_threads_on_threads_or_1_on_processes] = { NULL };\n\nvoid Deferred_Request::add(abstractMessage_class* m) {\n  new Deferred_Request(m);\n}\n\nDeferred_Request::Deferred_Request(abstractMessage_class* m) {\n  next = *first_TL();\n  *first_TL() = this;\n  \n  int sz = m->size_for_transmission_and_copying();\n  request = (abstractMessage_class*)malloc(sz);\n  memcpy(request, m, sz);\n}\n\n\nvoid Deferred_Request::service_and_free_all() {\n  for (Deferred_Request* req = *first_TL();  req != NULL;  req = *first_TL()) {\n    req->service();\n    *first_TL() = req->next;\n    delete req;\n  }\n}\n\n\nvoid Deferred_Request::service() {\n  // use a switch statement to avoid a lot of virtual dispatches\n  switch (request->header) {\n    default: fatal(\"what?\"); break;\n    # define MAKE_CASE(name, superclass, constructor_formals, superconstructor_actuals, constructor_body, class_body, ack_setting, safepoint_delay_setting) \\\n      case Message_Statics::name: ((name##_class*)request)->handle_me_or_maybe_delay(); break; \\\n\n      FOR_ALL_MESSAGES_DO(MAKE_CASE)\n    # undef MAKE_CASE\n  }\n}\n\n\nvoid Deferred_Request::do_all_roots(Oop_Closure* oc) {\n  for (Deferred_Request* r = *first_TL();  r != NULL;  r = r->next)\n    r->request->do_all_roots(oc);\n}\n\nvoid Deferred_Request::print_all_messages(int rank) {\n  if (  sizeof(first_request) / sizeof(first_request[0])    == 1  &&  Logical_Core::num_cores > 1)\n    fatal(\"cannot possibly work, need shared memory\");\n  for (Deferred_Request* r = first_request[rank];  r != NULL;  r = r->next) {\n    lprintf(\"printing 0x%x\\n\", r);\n    r->print();\n  }\n}\n"
  },
  {
    "path": "vm/src/messages/deferred_request.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nstruct Deferred_Request {\n  static inline Deferred_Request** first_TL() { return &first_request[rank_on_threads_or_zero_on_processes()]; }\n  static Deferred_Request* first_request[Memory_Semantics::max_num_threads_on_threads_or_1_on_processes];\n  Deferred_Request* next;\n  abstractMessage_class* request;\n  \n  Deferred_Request(abstractMessage_class*);\n  static void add(abstractMessage_class*);\n  static void service_and_free_all();\n  void service();\n  ~Deferred_Request() { free(request); }\n  static void do_all_roots(Oop_Closure*);\n  static void print_all_messages(int);\n  \n  void print() { request->print(); }\n};\n"
  },
  {
    "path": "vm/src/messages/interactions.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\nInteractions The_Interactions;\n\n\nObject_p last_ctx_rcv; // xxx for debugging\n\n\n// me or one other:\n\nfn_t Interactions::load_function_from_plugin(int dst, const char* fn_name, const char* plugin) {\n  const size_t rank_on_threads_or_zero_on_processes = Memory_Semantics::rank_on_threads_or_zero_on_processes();\n\n  if (dst == Logical_Core::my_rank()) return ioLoadFunctionFrom(fn_name, plugin);\n\n  static char* fn_name_buf     = (char*)Memory_Semantics::shared_malloc(BUFSIZ * Memory_Semantics::max_num_threads_on_threads_or_1_on_processes);  // read as fn_name_buf[Memory_Semantics::max_num_threads_on_threads_or_1_on_processes][BUFSIZ]     // threadsafe\n  static char* plugin_name_buf = (char*)Memory_Semantics::shared_malloc(BUFSIZ * Memory_Semantics::max_num_threads_on_threads_or_1_on_processes);  // read as plugin_name_buf[Memory_Semantics::max_num_threads_on_threads_or_1_on_processes][BUFSIZ] // threadsafe\n\n  char* local_fn_name_buf     = fn_name_buf     + (rank_on_threads_or_zero_on_processes * BUFSIZ);  // read as fn_name_buf[rank_on_threads_or_zero_on_processes]\n  char* local_plugin_name_buf = plugin_name_buf + (rank_on_threads_or_zero_on_processes * BUFSIZ);  // read as plugin_name_buf[rank_on_threads_or_zero_on_processes]\n\n  snprintf(local_fn_name_buf, BUFSIZ, \"%s\", fn_name);\n  snprintf(local_plugin_name_buf, BUFSIZ, \"%s\", plugin);\n  \n  SEND_THEN_WAIT_AND_RETURN_MESSAGE( loadFunctionFromPluginMessage_class(local_fn_name_buf, local_plugin_name_buf), dst,\n                                     loadFunctionFromPluginResponse, r);\n\n  return r.fn;\n}\n\n\nvoid Interactions::get_screen_info(int* screenSize, int* fullScreenFlag) {\n  if (Logical_Core::running_on_main()) {\n    *screenSize = ioScreenSize();\n    *fullScreenFlag = The_Memory_System()->snapshot_window_size.fullScreenFlag();\n  }\n  else {\n    SEND_THEN_WAIT_AND_RETURN_MESSAGE(screenInfoMessage_class(), Logical_Core::main_rank, screenInfoResponse, r);\n    *screenSize = r.screenSize;\n    *fullScreenFlag = r.fullScreenFlag;\n  }\n}\n\n\nbool Interactions::getNextEvent_on_main(int* evtBuf) {\n  if (Logical_Core::running_on_main())\n      return The_Squeak_Interpreter()->getNextEvent_any_platform(evtBuf);\n\n  SEND_THEN_WAIT_AND_RETURN_MESSAGE(getNextEventMessage_class(), Logical_Core::main_rank, getNextEventResponse, r);\n  if (!r.got_one) return false;\n  for (int i = 0;  i < evtBuf_size;  ++i) evtBuf[i] = r.evtBuf[i];\n  return true;\n}\n\n\n// return dst_obj so this tile can set OTE since OT can now be in read_mostly memory\nObject* Interactions::add_object_from_snapshot_allocating_chunk(int dst, Oop dst_oop, Object* src_obj_wo_preheader) {\n  if (dst == Logical_Core::my_rank()) {\n    return The_Memory_System()->add_object_from_snapshot_to_a_local_heap_allocating_chunk(dst_oop, src_obj_wo_preheader);\n  }\n  const bool verbose = false;\n  if (verbose)\n    lprintf(\"sending add_object_from_snapshot_allocating_chunk to %d, dst 0x%x, src 0x%x\\n\", dst, dst_oop.bits(), src_obj_wo_preheader);\n\n  SEND_THEN_WAIT_AND_RETURN_MESSAGE(addObjectFromSnapshotMessage_class(dst_oop, src_obj_wo_preheader), dst,\n                                    addObjectFromSnapshotResponse, r);\n  if (verbose)\n    lprintf(\"returned add_object_from_snapshot_allocating_chunk from %d, dst 0x%x\\n\", dst, r.dst_obj);\n\n  return r.dst_obj;\n}\n\n\n\nstatic void run_primitive_print(fn_t f, const char* long_msg, const char* short_msg) {\n  static const bool verbose = false;\n  if (!verbose) return;\n  if (The_Squeak_Interpreter()->get_global_sequence_number() > 20)\n    fprintf(stderr, \"%s\", short_msg);\n  else\n    lprintf(\"%s send of a primitive 0x%x %d\\n\", long_msg, f,\n            The_Squeak_Interpreter()->increment_global_sequence_number());\n}\n\nvoid Interactions::run_primitive(int dst, fn_t f) {\n  Message_Statics::remote_prim_fn = f;\n\n  ++remote_prim_count;\n  u_int64 start = OS_Interface::get_cycle_count();\n\n  if (dst == Logical_Core::my_rank()) {\n    f();\n    remote_prim_cycles += OS_Interface::get_cycle_count() - start;\n    return;\n  }\n  run_primitive_print(f, \"caught\", \"<\");\n  \n  SEND_THEN_WAIT_FOR_MESSAGE( runPrimitiveMessage_class(The_Squeak_Interpreter()->get_argumentCount(), f), dst,\n                              runPrimitiveResponse);\n  \n  remote_prim_cycles += OS_Interface::get_cycle_count() - start;\n\n  run_primitive_print(f, \"returned from\", \">\");\n\n  Message_Statics::remote_prim_fn = 0;\n}\n\n\n\n\n\n//   with waiting one by one\n\nOop Interactions::sample_each_core(int what_to_sample) {\n  int s = The_Squeak_Interpreter()->makeArrayStart();\n  \n  sampleOneCoreMessage_class m(what_to_sample);\n  FOR_ALL_RANKS(i) {\n    Oop cpuCoreStats;\n    if (i == Logical_Core::my_rank())  {\n      cpuCoreStats = sample_one_core(what_to_sample);\n    }\n    else {\n      SEND_THEN_WAIT_AND_RETURN_MESSAGE(m, i, sampleOneCoreResponse, m2);\n      Oop preserved = The_Squeak_Interpreter()->popRemappableOop();\n      cpuCoreStats = m2.result;\n      \n      // Commenting out the next line and using preserved in the line below are temporary workarounds.\n      // The real cause of the assertion failure needs to be found. -- dmu 10/10\n      // TODO: identify the problem leading to the case that the following\n      //       assertion does not hold\n      // assert_always(preserved == cpuCoreStats);\n      if (preserved != cpuCoreStats)\n        lprintf(\"Warning: patched around potential bug in interactions.cpp\\n\");\n\n      // TODO: remove this workaround after identifying the bug causing the assertion to fail\n      cpuCoreStats = preserved;\n    }\n    assert_always(cpuCoreStats.fetchClass() == The_Squeak_Interpreter()->splObj(Special_Indices::ClassArray)); // in case a bug returns\n    PUSH_FOR_MAKE_ARRAY(cpuCoreStats);\n  }\n  return The_Squeak_Interpreter()->makeArray(s);\n}\n\n\n\nvoid Interactions::do_all_roots_here(Oop_Closure* oc) {\n  doAllRootsHereMessage_class m(oc, false); // this closure will run HERE, and no GCs permitted when other side is reported back roots\n\n  FOR_ALL_RANKS(i)\n    if (i != Logical_Core::my_rank()) {\n      SEND_THEN_WAIT_FOR_MESSAGE(m, i, noMoreRootsResponse);\n    }\n    else\n      The_Squeak_Interpreter()->do_all_roots(oc);\n}\n\n\n\n\n\n\n\nOop Interactions::get_stats() {\n  int s = The_Squeak_Interpreter()->makeArrayStart();\n  PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(remote_prim_count );  remote_prim_count  = 0;\n  PUSH_POSITIVE_64_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(remote_prim_cycles);  remote_prim_cycles = 0LL;\n  return The_Squeak_Interpreter()->makeArray(s);\n}\n\n"
  },
  {
    "path": "vm/src/messages/interactions.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Interactions {\npublic:\n  const static bool verbose = false;\n\n  int     remote_prim_count;\n  u_int64 remote_prim_cycles;\n\n  Interactions() {\n    remote_prim_count  = 0;\n    remote_prim_cycles = 0LL;\n  }\n\n  Oop get_stats();\n\n  // xxxxxxx reify interactions and make these funs those\n  // Explanation:\n  // It would probably be better to reify the interactions and I have tried this with one or two.\n  // Never finished the experiment. -- dmu 4/09\n  void recycleContextIfPossible(int dst, Oop, const int current_rank);\n  Object* add_object_from_snapshot_allocating_chunk(int dst, Oop, Object*);\n  void do_all_roots_here(Oop_Closure*);\n  void run_primitive(int dst, fn_t f);\n  fn_t load_function_from_plugin(int dst, const char* fn, const char* plugin);\n\n  void get_screen_info(int*, int*);\n  bool getNextEvent_on_main(int*);\n  // no faster void init_ctx(Object*, Oop, Oop, int, Oop, int, Oop*);\n  Oop sample_each_core(int what_to_sample);\n\n};\n\nextern Interactions The_Interactions;\n\n"
  },
  {
    "path": "vm/src/messages/interpreter_subset_for_control_transfer.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\nvoid Interpreter_Subset_For_Control_Transfer::set_from_interpreter() {\n  // other side will be interpreting so be sure all objects, e.g. active contexts are current to it\n  The_Squeak_Interpreter()->preGCAction_here(false); // in case GC happens during the prim, need to be able to retrieve values of IP and SP later, if this call is for the interp on main core\n  if (The_Squeak_Interpreter()->fence())\n    OS_Interface::mem_fence();\n\n# define SET_FROM(type, my_var, in_var) my_var = The_Squeak_Interpreter()->in_var;\n  FOR_ALL_VARS_IN_SUBSET(SET_FROM)\n# undef SET_FROM\n}\n\n\nvoid Interpreter_Subset_For_Control_Transfer::fill_in_interpreter() {\n  Safepoint_Ability sa(false); // no hanky-panky while we fill\n  \n# define FILL_FROM(type, my_var, in_var) The_Squeak_Interpreter()->in_var = my_var;\n  FOR_ALL_VARS_IN_SUBSET(FILL_FROM)\n# undef FILL_FROM\n  The_Squeak_Interpreter()->postGCAction_here(false); // resync Object*'s and ip and sp with Oops in case GC happened on main while doing the primitive\n\n  if (Track_Processes)\n    The_Squeak_Interpreter()->running_process_by_core[Logical_Core::my_rank()] = running_process_or_nil;\n\n  if (Print_Scheduler) {\n    debug_printer->printf(\"scheduler: on %d receive_for_control_transfer set_running_process: \", Logical_Core::my_rank());\n    running_process_or_nil.as_object()->print_process_or_nil(debug_printer);\n    debug_printer->nl();\n  }\n\n  if (Trace_Execution && The_Squeak_Interpreter()->execution_tracer() != NULL)\n    The_Squeak_Interpreter()->execution_tracer()->received_current_bytecode();\n  assert_eq(The_Squeak_Interpreter()->activeContext_obj(), (void*)The_Squeak_Interpreter()->activeContext().as_object(), \"activeContext\");\n}\n\n\nvoid Interpreter_Subset_For_Control_Transfer::do_all_roots(Oop_Closure* oc) {\n# define INVOKE_CLOSURE(type, my_var, in_var) oc->value(&my_var, (Object_p)NULL);\n  FOR_ALL_OOPS_IN_SUBSET(INVOKE_CLOSURE)\n# undef INVOKE_CLOSURE\n}\n\n"
  },
  {
    "path": "vm/src/messages/interpreter_subset_for_control_transfer.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Interpreter_Subset_For_Control_Transfer {\n\n# define FOR_ALL_OOPS_IN_SUBSET(template) \\\ntemplate(Oop, receiver, roots.receiver) \\\ntemplate(Oop, messageSelector, roots.messageSelector) \\\ntemplate(Oop, newMethod, roots.newMethod) \\\ntemplate(Oop, lkupClass, roots.lkupClass) \\\ntemplate(Oop, _activeContext, roots._activeContext) \\\ntemplate(Oop, _method, roots._method) \\\ntemplate(Oop, _theHomeContext, roots._theHomeContext) \\\ntemplate(Oop, running_process_or_nil, roots.running_process_or_nil) \\\n\n\n# define FOR_ALL_VARS_IN_SUBSET(template) \\\ntemplate(Object_p, activeContext_obj, _activeContext_obj) \\\ntemplate(Object_p, method_obj, _method_obj) \\\ntemplate(Object_p, theHomeContext_obj, _theHomeContext_obj) \\\ntemplate(u_char*, instructionPointer, _instructionPointer) \\\ntemplate(Oop*, stackPointer, _stackPointer) \\\ntemplate(u_char, currentBytecode, currentBytecode) \\\ntemplate(bool, have_executed_currentBytecode, have_executed_currentBytecode) \\\ntemplate(int, interruptCheckCounter, interruptCheckCounter) \\\ntemplate(int, reclaimableContextCount, reclaimableContextCount) \\\ntemplate(bool, successFlag, successFlag) /* for prims */ \\\n\\\nFOR_ALL_OOPS_IN_SUBSET(template)\n\n# define DCL_VAR(type, my_var, in_var) type my_var;\n\n  FOR_ALL_VARS_IN_SUBSET(DCL_VAR)\n\n# undef DCL_VAR\n\n  public:\n  void set_from_interpreter();\n  void fill_in_interpreter();\n  void do_all_roots(Oop_Closure*);\n};\n\n"
  },
  {
    "path": "vm/src/messages/message_classes.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\nvoid updateEnoughInterpreterToTransferControlMessage_class::send_to(int r) {\n  subset.set_from_interpreter(); //include order, sigh\n\n  The_Squeak_Interpreter()->storeContextRegisters(The_Squeak_Interpreter()->activeContext_obj()); // added for the invarients xxxxxx rm when debugged?\n  The_Squeak_Interpreter()->set_activeContext(The_Squeak_Interpreter()->roots.nilObj); // so this core won't try to update active context when GC happens\n  The_Squeak_Interpreter()->multicore_interrupt_check = true; // go into multicore_interrupt to wait for a process to execute; probably not really needed, since interp should get restored before top of interp loop\n  The_Squeak_Interpreter()->set_running_process(The_Squeak_Interpreter()->roots.nilObj, \"send_for_control_transfer\"); // prevent setting saved CTX to nil in the process\n\n  abstractMessage_class::send_to(r);\n}\n\n\n\n\nvoid  aboutToWriteReadMostlyMemoryMessage_class::handle_me() {\n  if (!The_Memory_System()->contains(addr) && !The_Memory_System()->object_table->probably_contains(addr)) {\n    lprintf(\"%d about to do bad remote invalidate %d (%s) 0x%x (%s) 0x%x\\n\",\n            getpid(), sender, Message_Statics::message_names[sender], addr, Message_Statics::message_names[(int)addr], nbytes);\n    OS_Interface::die(\"bad remote invalidate\");\n  }\n  OS_Interface::invalidate_mem(addr, nbytes);\n}\n\n\nvoid addObjectFromSnapshotMessage_class::handle_me() {\n  Object* dst_obj = The_Memory_System()->add_object_from_snapshot_to_a_local_heap_allocating_chunk(dst_oop, src_obj_wo_preheader);\n  addObjectFromSnapshotResponse_class(dst_obj).send_to(sender);\n}\n\nvoid addObjectFromSnapshotResponse_class::handle_me() {}\n\nvoid addedScheduledProcessMessage_class::handle_me()  {\n  ++The_Squeak_Interpreter()->added_process_count;\n}\n\n\n\n\nvoid broadcastInterpreterDatumMessage_class::handle_me() {\n  void* p = (char*)The_Squeak_Interpreter() + datum_byte_offset;\n  assert_always(p < (void*)(The_Squeak_Interpreter() + 1));\n  switch (datum_size) {\n    default: fatal();\n    case sizeof(   char): *(   char*)p = (char)datum;  break;\n    case sizeof(    int): *(    int*)p = ( int)datum;  break;\n    case sizeof(u_int64): *(u_int64*)p =       datum;  break;\n  }\n}\n\n\n\nclass Report_Root_Closure: public Oop_Closure {\nprivate:\n  Oop_Closure* closure;\n  int sender;\n\npublic:\n\n  Report_Root_Closure(Oop_Closure* closure, int sender)\n  : Oop_Closure(),\n  closure(closure),\n  sender(sender) {}\n\n  void value(Oop* p, Object_p containing_obj_or_nil) {\n    SEND_THEN_WAIT_FOR_MESSAGE(hereIsARootResponse_class(*p, p, containing_obj_or_nil, closure), sender, newValueForOopMessage);\n  }\n  \n  virtual const char* class_name(char* buf) { \n    char buf1[BUFSIZ];\n    sprintf(buf, \"Report_Root_Closure for %s\", closure->class_name(buf1));\n    return buf;\n  }\n};\n\n\nvoid doAllRootsHereMessage_class::handle_me() {\n  // no GCs permitted when other side is reporting back roots\n  Report_Root_Closure rc(closure, sender);\n  {\n    Safepoint_Ability sa(false);\n    The_Squeak_Interpreter()->do_all_roots(&rc);\n  }\n  noMoreRootsResponse_class().send_to(sender);\n}\n\n\nvoid hereIsARootResponse_class::handle_me() {\n  closure->value(&root, (Object_p)container_or_null);\n  newValueForOopMessage_class(root, addr).send_to(sender);\n}\n\n\nvoid newValueForOopMessage_class::handle_me() {\n  *addr = newValue;\n}\n\n\n\n\n\nvoid enforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapMessage_class::handle_me() {\n  The_Memory_System()->heaps[Logical_Core::my_rank()][Memory_System::read_mostly]->enforce_coherence_in_whole_heap_after_store();\n}\n\nvoid enforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapMessage_class::handle_me() {\n  The_Memory_System()->invalidate_heaps_and_fence(false);\n}\n\nvoid enforceCoherenceBeforeSenderStoresIntoAllHeapsMessage_class::handle_me() {\n  The_Memory_System()->invalidate_heaps_and_fence(true);\n}\n\n\n\nvoid flushFreeContextsMessage_class::handle_me() {\n  The_Squeak_Interpreter()->roots.flush_freeContexts();\n}\n\nvoid flushInterpreterCachesMessage_class::handle_me() {\n  The_Squeak_Interpreter()->flushInterpreterCaches();\n}\n\nvoid flushMethodCacheMessage_class::handle_me() {\n  The_Squeak_Interpreter()->methodCache.flush_method_cache();\n}\n\nvoid flushSelectiveMessage_class::handle_me() {\n  The_Squeak_Interpreter()->methodCache.flushSelective(selector);\n}\n\nvoid flushByMethodMessage_class::handle_me() {\n  The_Squeak_Interpreter()->methodCache.flushByMethod(method);\n}\n\n\nvoid setExtraWordSelectorMessage_class::handle_me() {\n# if Extra_Preheader_Word_Experiment\n  The_Squeak_Interpreter()->roots.extra_preheader_word_selector = selector;\n# else\n  fatal(\"cannot set extra word, Extra_Preheader_Word_Experiment compiled as 0\");\n# endif\n}\n\n\nvoid setEmergencySemaphoreMessage_class::handle_me() {\n  The_Squeak_Interpreter()->roots.emergency_semaphore = semaphore;\n}\n\n\n\nvoid loadFunctionFromPluginMessage_class::handle_me() {\n  fn_t f = ioLoadFunctionFrom(fn_name, plugin_name);\n  loadFunctionFromPluginResponse_class(f).send_to(sender);\n}\n\n\nvoid loadFunctionFromPluginResponse_class::handle_me() {}\n\n\nvoid imageNamePutMessage_class::handle_me() {\n  The_Memory_System()->imageNamePut_on_this_core(image_name, (int)len);\n}\n\n\nvoid noMessage_class::handle_me() {}\nvoid noMoreRootsResponse_class::handle_me() {}\n\nvoid postGCActionMessage_class::handle_me() {\n  Safepoint_Ability sa(sender_is_able_to_safepoint &&  Safepoint_Ability::is_interpreter_able());\n  The_Squeak_Interpreter()->postGCAction_here(fullGC);\n}\n\n\nvoid preGCActionMessage_class::handle_me() {\n  The_Squeak_Interpreter()->preGCAction_here(fullGC);\n}\n\n\n\n\nvoid recycleContextIfPossibleMessage_class::handle_me() {\n  The_Squeak_Interpreter()->recycleContextIfPossible_here(ctx);\n}\n\n\n\n\n\nvoid requestSafepointOnOtherCoresMessage_class::handle_me() {\n  if (Safepoint_Tracker::verbose)\n    lprintf(\"requestSafepointMessage_class::handle_me for %d, depth %d\\n\",  sender, The_Squeak_Interpreter()->safepoint_tracker->spin_depth());\n\n  The_Squeak_Interpreter()->safepoint_master_control->request_other_cores_to_safepoint(sender, why);\n}\n\n\nvoid grantSafepointMessage_class::handle_me() {\n  The_Squeak_Interpreter()->safepoint_tracker->every_other_core_is_safe(sequence_number);\n}\n\n\n\nvoid releaseOtherCoresFromSafepointMessage_class::handle_me() {\n  The_Squeak_Interpreter()->safepoint_master_control->release_other_cores_from_safepoint(sender);\n}\n\n\nvoid requestCoreToSpinMessage_class::handle_me() {\n  The_Squeak_Interpreter()->safepoint_tracker->another_core_needs_me_to_spin(for_whom, sequence_number, why);\n}\n\n\nvoid tellCoreToStopSpinningMessage_class::handle_me() {\n  The_Squeak_Interpreter()->safepoint_tracker->another_core_no_longer_needs_me_to_spin(sequence_number);\n}\n\n\n\n\nvoid tellCoreIAmSpinningMessage_class::handle_me() {\n  The_Squeak_Interpreter()->safepoint_master_control->a_core_is_now_safe(sender, sequence_number, was_spinning);\n}\n\n\n\nvoid runPrimitiveMessage_class::handle_me() {\n  static const bool verbose = false;\n\n  if (verbose) {\n    lprintf(\"handling runPrimitiveMessage from %d for 0x%x %d\\n\", sender, fn,\n            The_Squeak_Interpreter()->increment_global_sequence_number());\n  }\n\n  if (The_Squeak_Interpreter()->safepoint_tracker->is_every_other_core_safe())\n    fatal(\"the other cores are safe; should not be asking me for something\");\n\n\n  Interpreter_Subset_For_Control_Transfer saved_interp_info;\n\n  saved_interp_info.set_from_interpreter();\n  int saved_arg_count = The_Squeak_Interpreter()->get_argumentCount();\n\n  int saved_root_count = 0;\n# define pushAndCount(type, my_var, in_var) ++saved_root_count, The_Squeak_Interpreter()->pushRemappableOop(The_Squeak_Interpreter()->in_var);\n  FOR_ALL_OOPS_IN_SUBSET(pushAndCount)\n# undef pushAndCount\n\n\n  subset.fill_in_interpreter();\n\n\n\n  Oop proc_before_prim = The_Squeak_Interpreter()->get_running_process();\n  The_Squeak_Interpreter()->set_argumentCount(argCount);\n  Message_Statics::remote_prim_fn = fn;\n  The_Squeak_Interpreter()->run_primitive_on_main_from_elsewhere(fn);\n\n  if (verbose) {\n    lprintf(\"sending runPrimitiveResponse 0x%x %d\\n\", fn,\n            The_Squeak_Interpreter()->increment_global_sequence_number());\n  }\n  runPrimitiveResponse_class().send_to(sender);\n\n  if (verbose) {\n    lprintf(\"sent runPrimitiveResponse 0x%x %d\\n\", fn,\n            The_Squeak_Interpreter()->increment_global_sequence_number());\n  }\n\n  The_Squeak_Interpreter()->popRemappableOops(saved_root_count);\n  saved_interp_info.fill_in_interpreter();\n  The_Squeak_Interpreter()->set_argumentCount(saved_arg_count);\n\n  Message_Statics::remote_prim_fn = 0;\n\n}\n\n\nvoid runPrimitiveResponse_class::handle_me() {\n  static const bool verbose = false;\n  subset.fill_in_interpreter();\n\n  if (verbose) {\n    lprintf(\"handled runPrimitiveResponse %d\\n\",\n            The_Squeak_Interpreter()->increment_global_sequence_number());\n  }\n}\n\n\nvoid sampleOneCoreMessage_class::handle_me() { \n  Oop sample = sample_one_core(what_to_sample);\n  The_Squeak_Interpreter()->pushRemappableOop(sample); // could GC while msg in transit\n  sampleOneCoreResponse_class(sample).send_to(sender);   \n  The_Squeak_Interpreter()->popRemappableOop();\n}\n\nvoid sampleOneCoreResponse_class::handle_me() {\n  The_Squeak_Interpreter()->pushRemappableOop(result); // protect from a GC (may already be spinning)\n}\n\n\nvoid scanCompactOrMakeFreeObjectsMessage_class::handle_me() {\n  The_Memory_System()->scan_compact_or_make_free_objects_here(compacting, gc_or_null);\n}\n\n\nvoid startInterpretingMessage_class::handle_me() {}\n\nvoid transferControlMessage_class::handle_me() {\n  assert(!Logical_Core::my_rank() != sender);\n  subset.fill_in_interpreter();\n}\n\n\nvoid updateEnoughInterpreterToTransferControlMessage_class::handle_me() {\n  fatal(\"only subclasses should actually be used\");\n}\n\n\nvoid distributeInitialInterpreterMessage_class::handle_me() {\n  The_Squeak_Interpreter()->receive_initial_interpreter_from_main(interp);\n}\n\n\nvoid verifyInterpreterAndHeapMessage_class::handle_me() {\n  The_Squeak_Interpreter()->verify();\n  The_Memory_System()->heaps[Logical_Core::my_rank()][Memory_System::read_mostly]->verify();\n  The_Memory_System()->heaps[Logical_Core::my_rank()][Memory_System:: read_write]->verify();\n}\n\n\n\n\nvoid zapUnusedPortionOfHeapMessage_class::handle_me() {\n  The_Memory_System()->heaps[Logical_Core::my_rank()][Memory_System:: read_write]->zap_unused_portion();\n  The_Memory_System()->heaps[Logical_Core::my_rank()][Memory_System::read_mostly]->zap_unused_portion();\n}\n\n\n\nvoid screenInfoMessage_class::handle_me() {\n  screenInfoResponse_class(ioScreenSize(), The_Memory_System()->snapshot_window_size.fullScreenFlag()).send_to(sender);\n}\n\nvoid screenInfoResponse_class::handle_me() {}\n\nvoid getNextEventMessage_class::handle_me() {\n  assert(Logical_Core::running_on_main());\n  getNextEventResponse_class m;\n  m.got_one = The_Squeak_Interpreter()->getNextEvent_any_platform(m.evtBuf);\n  m.send_to(sender);\n}\n\nvoid getNextEventResponse_class::handle_me() {\n  if (false && got_one && evtBuf[0] == 2)\n    lprintf(\"getNextEventResponse_class::handle_me key: %d, state %d\\n\", evtBuf[2], evtBuf[3]);\n}\n\nvoid selfDestructMessage_class::handle_me() {\n  lprintf(\"received self-destruct from %d: %s\\n\", sender, why);\n  fatal(\"self-destruct\");\n}\n\n\nvoid ackMessage_class::handle_me() {}\n\n\n\n\n\nvoid flushSelectiveMessage_class::do_all_roots(Oop_Closure* oc) {\n  oc->value(&selector, (Object_p)NULL);\n}\nvoid sampleOneCoreResponse_class::do_all_roots(Oop_Closure* oc) {\n  oc->value(&result, (Object_p)NULL);\n}\nvoid newValueForOopMessage_class::do_all_roots(Oop_Closure* oc) {\n  oc->value(&newValue, (Object_p)NULL);\n}\nvoid addObjectFromSnapshotMessage_class::do_all_roots(Oop_Closure* oc) {\n  oc->value(&dst_oop, (Object_p)NULL);\n}\nvoid recycleContextIfPossibleMessage_class::do_all_roots(Oop_Closure* oc) {\n  oc->value(&ctx, (Object_p)NULL);\n}\nvoid flushByMethodMessage_class::do_all_roots(Oop_Closure* oc) {\n  oc->value(&method, (Object_p)NULL);\n}\nvoid addObjectFromSnapshotResponse_class::do_all_roots(Oop_Closure* /* oc */) {\n  fatal(\"unimp, but should not be called\");\n}\nvoid hereIsARootResponse_class::do_all_roots(Oop_Closure* /* oc */) {\n  fatal(\"unimp, but should not be called\");\n}\nvoid updateEnoughInterpreterToTransferControlMessage_class::do_all_roots(Oop_Closure* oc) {\n  subset.do_all_roots(oc);\n}\n\n"
  },
  {
    "path": "vm/src/messages/message_classes.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# define DECLARE_MESSAGE_CLASS(name, superclass, constructor_formals, superconstructor_actuals, constructor_body, class_body, ack_setting, safepoint_delay_setting) \\\nclass name##_class : public superclass##_class { \\\nprotected: \\\n acking                  get_ack_setting() const { return ack_setting; } \\\n safepoint_delay_options get_safepoint_delay_setting() const { return safepoint_delay_setting; } \\\n \\\n\\\npublic: \\\n\\\nname##_class constructor_formals  : superclass##_class superconstructor_actuals { header = Message_Statics::name; constructor_body } \\\nname##_class (Receive_Marker* rm) : superclass##_class (rm) { } \\\n\\\nint size_for_transmission_and_copying() const { return sizeof(*this); } \\\nMessage_Statics::messages get_message_type() const { return Message_Statics::name; } \\\n\\\n\\\nvoid handle_me(); \\\nclass_body \\\n};\n\n\nFOR_ALL_MESSAGES_DO(DECLARE_MESSAGE_CLASS)\n\n# undef DECLARE_MESSAGE_CLASS\n\n"
  },
  {
    "path": "vm/src/messages/message_or_ack_request.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\n\nMessage_Or_Ack_Request* Message_Or_Ack_Request::first_msg_or_req[Memory_Semantics::max_num_threads_on_threads_or_1_on_processes] = { NULL };\n"
  },
  {
    "path": "vm/src/messages/message_or_ack_request.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nstruct Message_Or_Ack_Request {\n  static inline Message_Or_Ack_Request** first_TL() { return &first_msg_or_req[rank_on_threads_or_zero_on_processes()]; }\n  static Message_Or_Ack_Request* first_msg_or_req[Memory_Semantics::max_num_threads_on_threads_or_1_on_processes];\n  \n  Message_Or_Ack_Request* next;\n  Message_Statics::messages msg_type;\n  bool is_fulfilled;\n  const abstractMessage_class* buf_or_nil_for_ack;\n  \n  Message_Or_Ack_Request(Message_Statics::messages mt, const abstractMessage_class* b)\n  : msg_type(mt), is_fulfilled(false), buf_or_nil_for_ack(b) {\n    \n    next = *first_TL();\n    *first_TL() = this;\n    \n    assert_eq(Message_Statics::is_encoded_for_ack(mt), buf_or_nil_for_ack == NULL, \"buf should be nil iff ack\");\n  }\n  \n  ~Message_Or_Ack_Request() { *first_TL() = next; }\n  \n  static Message_Or_Ack_Request* find(Message_Statics::messages t) {\n    for (Message_Or_Ack_Request* mr = *first_TL();  mr != NULL;  mr = mr->next)\n      if (!mr->is_fulfilled  &&  t == mr->msg_type)\n        return mr;\n    \n    return NULL;\n  }\n};\n"
  },
  {
    "path": "vm/src/messages/message_statics.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# include \"headers.h\"\n\n\nfn_t Message_Statics::remote_prim_fn = NULL;\nbool Message_Statics::run_timer = false;       // config flag\n\n# define MAKE_STRING(name, superclass, formals, args, ctor_body, body, ack, safepoint_delay_setting) #name,\nconst char* Message_Statics::message_names[] = {\n  FOR_ALL_MESSAGES_DO(MAKE_STRING)\n  NULL\n};\n# undef MAKE_STRING\n\nvoid Message_Statics::process_delayed_requests() {\n  Deferred_Request::service_and_free_all();\n}\n\n\n// must do something special so that if I recurse:\n/*\n #0  0x0016b918 in receive_and_handle_messages_returning_a_match__8MessagesSGbQ2_8Messages8messagesPv (wait=true, msg=flushByMethodResponse__8Messages,\n msg_obj=0xbe37cf50) at ../src/messages/messages.cpp:97\n #1  0x00227a60 in abstractMessage_class::receive_and_handle_messages_returning_a_match (this=0xbe37cf50, wait=true, msg=flushByMethodResponse__8Messages)\n at /home/ungar/renaissance/rvm/src/messages/messages.h:145\n #2  0x001785a8 in Interactions::flushByMethod_on_all_tiles (this=0x3d2dbc, x={_bits = 1101863232}) at ../src/messages/interactions.cpp:482\n #3  0x000aa638 in Squeak_Interpreter::primitiveFlushCacheByMethod (this=0x3ca930) at ../src/interpreter/interpreter_primitives.cpp:741\n #4  0x000fd418 in primitiveFlushCacheByMethod () at ../src/interpreter/primitive_table.cpp:267\n #5  0x0014e228 in dispatchFunctionPointer__18Squeak_InterpreterGPGve_Pvb (this=0x3ca930, f=0xfd3c0 <primitiveFlushCacheByMethod(void,...)>, on_main=false)\n at ../src/interpreter/squeak_interpreter.cpp:1966\n #6  0x0014e048 in run_primitive_on_main_from_elsewhere__18Squeak_InterpreterGPGve_Pv (this=0x3ca930, f=0xfd3c0 <primitiveFlushCacheByMethod(void,...)>)\n at ../src/interpreter/squeak_interpreter.cpp:1956\n #7  0x00176d60 in runPrimitiveMessage_class::handle_me (this=0xbe38459c) at ../src/messages/messages.cpp:515\n #8  0x0016e750 in receive_and_handle_one_raw_message_returning_a_match__8MessagesSGbQ2_8Messages8messagesPv (wait=64, msg=1104347728, msg_obj=0xbe38459c)\n at ../src/messages/messages.cpp:182\n #9  0x0016bb40 in receive_and_handle_one_message_returning_a_match__8MessagesSGbQ2_8Messages8messagesPv (wait=false, msg=runPrimitiveMessage__8Messages,\n msg_obj=0xbadbad00) at ../src/messages/messages.cpp:124\n #10 0x0016b9a8 in receive_and_handle_messages_returning_a_match__8MessagesSGbQ2_8Messages8messagesPv (wait=true,\n msg=broadcastInterpreterDatumResponse__8Messages, msg_obj=0xbe38e444) at ../src/messages/messages.cpp:102\n #11 0x00227a60 in abstractMessage_class::receive_and_handle_messages_returning_a_match (this=0xbe38e444, wait=true,\n msg=broadcastInterpreterDatumResponse__8Messages) at /home/ungar/renaissance/rvm/src/messages/messages.h:145\n #12 0x0017aa40 in broadcast_interpreter_datum__12InteractionsGiPvUL (this=0x3d2dbc, datum_size=4, datum_addr=0x3ceaf4, datum=1)\n at ../src/messages/interactions.cpp:576\n #13 0x0017a720 in Interactions::broadcast_interpreter_int32 (this=0x3d2dbc, d=0x3ceaf4) at ../src/messages/interactions.cpp:36\n #14 0x00150cc0 in Squeak_Interpreter::signalSemaphoreWithIndex (this=0x3ca930, index=1) at ../src/interpreter/squeak_interpreter.cpp:807\n #15 0x00145240 in signalSemaphoreWithIndex (i=1) at ../src/runtime/squeak_adapters.cpp:367\n #16 0x0011f308 in signalInputEvent () at /home/ungar/renaissance/rvm/src/from_squeak/unix/vm/sqUnixEvent.c:153\n #17 0x0011f4f8 in recordMouseEvent () at /home/ungar/renaissance/rvm/src/from_squeak/unix/vm/sqUnixEvent.c:167\n #18 0x00127de0 in handleEvent (evt=0xbe38e5b8) at ../src/from_squeak/unix/vm-display-X11/sqrUnixX11.c:1297\n #19 0x00128df0 in handleEvents () at ../src/from_squeak/unix/vm-display-X11/sqrUnixX11.c:1483\n #20 0x0012f128 in display_ioProcessEvents () at ../src/from_squeak/unix/vm-display-X11/sqrUnixX11.c:2321\n #21 0x00118928 in ioProcessEvents () at ../src/from_squeak/unix/vm/sqrUnixMain.c:536\n #22 0x0011f978 in display_ioGetNextEvent (evt=0xbe38e674) at /home/ungar/renaissance/rvm/src/from_squeak/unix/vm/sqUnixEvent.c:227\n #23 0x00119788 in ioGetNextEvent (evt=0xbe38e674) at ../src/from_squeak/unix/vm/sqrUnixMain.c:585\n #24 0x000ab700 in Squeak_Interpreter::primitiveGetNextEvent (this=0x3ca930) at ../src/interpreter/interpreter_primitives.cpp:821\n #25 0x000fd918 in primitiveGetNextEvent () at ../src/interpreter/primitive_table.cpp:267\n #26 0x0014e228 in dispatchFunctionPointer__18Squeak_InterpreterGPGve_Pvb (this=0x3ca930, f=0xfd8c0 <primitiveGetNextEvent(void,...)>, on_main=false)\n at ../src/interpreter/squeak_interpreter.cpp:1966\n #27 0x0014e048 in run_primitive_on_main_from_elsewhere__18Squeak_InterpreterGPGve_Pv (this=0x3ca930, f=0xfd8c0 <primitiveGetNextEvent(void,...)>)\n at ../src/interpreter/squeak_interpreter.cpp:1956\n #28 0x00176d60 in runPrimitiveMessage_class::handle_me (this=0xbe38459c) at ../src/messages/messages.cpp:515\n #29 0x0016e750 in receive_and_handle_one_raw_message_returning_a_match__8MessagesSGbQ2_8Messages8messagesPv (wait=64, msg=1104347728, msg_obj=0xbe38459c)\n at ../src/messages/messages.cpp:182\n \n */\n// I won't lock up forever.\n// But only need to handle one type of message at a time\n\nint incoming_msg_count = 0; // for debugging\nvoid Message_Statics::process_any_incoming_messages(bool wait) {\n  // incoming_msg_count just for debugging\n  for ( incoming_msg_count = 0;  receive_and_handle_one_message(wait);  wait = false, ++incoming_msg_count) ;\n}\n\n\n// Handle case where while waiting for A, we recursively get a call to wait for B\n// Must not release A, but rather return it eventually\nvoid Message_Statics::receive_and_handle_messages_returning_a_match(messages msg, const abstractMessage_class* result_or_nil_for_ack, int from_rank) {\n  Message_Or_Ack_Request mr(msg, result_or_nil_for_ack); // must live through this stack frame\n  Timeout_Timer tt(message_names[msg], 60, from_rank);\n  if  ( Message_Statics::run_timer )\n    tt.start();\n  do  {\n    // Would things work and be more efficient with true instead false below? -- dmu 4/09\n    // Nope, initial snapshot never loads for some reason. -- dmu 6/10\n    receive_and_handle_one_message(false);\n    The_Squeak_Interpreter()->safepoint_tracker->spin_if_safepoint_requested();\n    // old deadlock detection code used to go here after an else\n  }\n  while (!mr.is_fulfilled);\n}\n\n\n\n\nsize_t Message_Statics::max_message_size() {\n  size_t r = 0;\n# define GET_MAX_SIZE(name, superclass, constructor_formals, superconstructor_actuals, constructor_body, class_body, ack_setting, safepoint_delay_setting) \\\n  r = max(r, sizeof(name##_class));\n  \n  FOR_ALL_MESSAGES_DO(GET_MAX_SIZE)\n# undef GET_MAX_SIZE\n  \n  return r;\n}\n\n// Used only for debugging and optimizing message buffer sizes\n# define PRINT_SIZE(name, superclass, formals, args, ctor_body, body, ack, safepoint_delay_setting) lprintf(\"MsgClass %s has size %d\\n\", #name, sizeof(name##_class)); \nvoid Message_Statics::print_size() {\n  FOR_ALL_MESSAGES_DO(PRINT_SIZE);\n}\n# undef PRINT_SIZE\n\n\n// Receive a message, handle it, store it into one of the Message_Request buffers if there is a matching request in the chain.\n// If wait is true, don't return until a message has been seen.\n// Return true if we got a message.\nMessage_Statics::messages last_msg_type = Message_Statics::noMessage; // for debugging\n\nbool Message_Statics::receive_and_handle_one_message(bool wait) {\n  Squeak_Interpreter* const interp = The_Squeak_Interpreter();\n  const int rank_on_threads_or_zero_on_processes = interp->rank_on_threads_or_zero_on_processes();\n  \n  // Without this check, if the spin request has already been received,\n  // any message received below could have roots that would be missed by GC -- dmu 10/1/10\n  interp->safepoint_tracker->spin_if_safepoint_requested(); \n  \n  abstractMessage_class* buffered_msg;\n  Logical_Core* buffer_owner;\n  messages msg_type_or_encoded_acking_type;\n  \n  messages msg_type;\n  for (;;) {\n    // added this loop and pass in false to receiver prims below in order to do timeout checks\n    const bool do_timeout_checks = true; //  tried false but no speedup loading image -- dmu 6/10\n\n    u_int64 start = OS_Interface::get_cycle_count();\n    buffered_msg = (abstractMessage_class*)Message_Queue::buffered_receive_from_anywhere(wait && !do_timeout_checks, &buffer_owner, interp->my_core());\n    u_int64 end = OS_Interface::get_cycle_count();\n    \n    Message_Stats::record_buffered_recieve(rank_on_threads_or_zero_on_processes, end - start);\n    \n    msg_type_or_encoded_acking_type = buffered_msg == NULL  ?  noMessage  :  buffered_msg->header;\n    \n    msg_type = is_encoded_for_ack(msg_type_or_encoded_acking_type) ? ackMessage : msg_type_or_encoded_acking_type;\n    \n# if  Check_Reliable_At_Most_Once_Message_Delivery\n    if (buffered_msg)\n      Message_Stats::check_received_transmission_sequence_number(msg_type, buffered_msg->transmission_serial_number, buffered_msg->sender);\n# endif\n    \n    if (msg_type_or_encoded_acking_type != noMessage) {\n      PERF_CNT(interp, count_received_intercore_messages());\n      \n      if (Collect_Receive_Message_Statistics)\n        Message_Stats::collect_receive_msg_stats(msg_type_or_encoded_acking_type);\n      break;\n    }\n    \n    Timeout_Timer::check_all();\n    \n    if (!wait)\n      return false;\n  }\n  \n  Message_Or_Ack_Request* matching_msg_or_ack_request = Message_Or_Ack_Request::find(msg_type_or_encoded_acking_type);\n  Message_Or_Ack_Request* matching_msg_request = msg_type == ackMessage ? NULL : matching_msg_or_ack_request;\n  \n  \n# define MAKE_CASE(name, superclass, constructor_formals, superconstructor_actuals, constructor_body, class_body, ack_setting, safepoint_delay_setting) \\\n  case name: { \\\n    name##_class local_buf(&The_Receive_Marker); \\\n    name##_class* final_dest = matching_msg_request != NULL  ?  (name##_class*)matching_msg_request->buf_or_nil_for_ack  :  &local_buf; \\\n    /* Used to try to not copy the buffer, but if handle_me ends up receiving another msg from sender, such as doAllRootsHere, causes problems. Be simple, even if slower -- Ungar 1/10 */ \\\n    *final_dest = *(name##_class*)buffered_msg; \\\n    buffer_owner->message_queue.release_oldest_buffer(buffered_msg); \\\n    final_dest->handle_me_and_ack(); \\\n    \\\n    break; \\\n  }\n  \n  switch (msg_type) {\n    default: { \n      fatal(\"bad message\");\n      return false;\n    }\n\n    /* all other messages */\n      FOR_ALL_MESSAGES_DO(MAKE_CASE)\n  }\n# undef MAKE_CASE\n  \n  interp->safepoint_tracker->spin_if_safepoint_requested(); // xxxxxx  right place for a spin?\n  \n  if (matching_msg_or_ack_request != NULL)\n    matching_msg_or_ack_request->is_fulfilled = true;\n  \n  last_msg_type = msg_type; // for debugging\n  \n  return true;\n}\n\n\nvoid Message_Statics::wait_for_ack(Message_Statics::messages t, int sender) {\n  receive_and_handle_messages_returning_a_match(encode_msg_type_for_ack(t), NULL, sender);\n}\n\n"
  },
  {
    "path": "vm/src/messages/message_statics.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass abstractMessage_class;\n\nclass Message_Statics {\npublic:\n  \n# define MAKE_ENUM(name,superclass,carg,scarg,conbody,body, ack, safepoint_delay_setting) name,\n  \n  enum messages {\n    FOR_ALL_MESSAGES_DO(MAKE_ENUM)\n    end_of_messages\n  };\n# undef MAKE_ENUM\n  \n  static messages encode_msg_type_for_ack(messages t) { return messages(t + end_of_messages); }\n  static messages decode_msg_type_for_ack(messages t) { return messages(t - end_of_messages); }\n  static bool     is_encoded_for_ack(messages t)      { return t >= end_of_messages; }\n  \n  static const char* message_names[];\n  \n  static size_t max_message_size();\n  static void print_size();\n  \n  static void process_any_incoming_messages(bool);\n  static void receive_and_handle_messages_returning_a_match(messages msg, const abstractMessage_class*, int);\n  static bool receive_and_handle_one_message(bool wait_for_msg);\n  static void wait_for_ack(messages, int);\n  static void process_delayed_requests();\n  \npublic:\n  \n  static const bool verbose = false;\n  static       bool run_timer;\n  \n  static fn_t remote_prim_fn; // for debugging\n  \n};\n"
  },
  {
    "path": "vm/src/messages/message_stats.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\nMessage_Stats::statistics Message_Stats::stats[Memory_Semantics::max_num_threads_on_threads_or_1_on_processes] = { 0 };\n\nOop Message_Stats::get_stats(int what_to_sample) {\n  int rank_on_threads_or_zero_on_processes = Memory_Semantics::rank_on_threads_or_zero_on_processes();\n\n  int s = The_Squeak_Interpreter()->makeArrayStart();\n\n  if (what_to_sample & (1 << SampleValues::coreCoords)) {\n# if On_Tilera\n    int x    = CPU_Coordinate::my_x(),  y = CPU_Coordinate::my_y();\n# else\n    int x    = Logical_Core::my_rank(), y = 0;\n# endif\n    int rank = Logical_Core::my_rank();\n    PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(x);\n    PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(y);\n    PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(rank);\n  }\n\n  if (what_to_sample & (1 << SampleValues::sendTallies)) {\n    int r = The_Squeak_Interpreter()->makeArrayStart();\n    for (int j = 0;  j < Message_Statics::end_of_messages;  ++j)\n      PUSH_POSITIVE_32_BIT_INT_FOR_MAKE_ARRAY(stats[rank_on_threads_or_zero_on_processes].send_tallies[j]);\n\n    bzero(stats[rank_on_threads_or_zero_on_processes].send_tallies,\n          sizeof(stats[rank_on_threads_or_zero_on_processes].send_tallies));\n    Oop sendTallies = The_Squeak_Interpreter()->makeArray(r);\n    PUSH_WITH_STRING_FOR_MAKE_ARRAY(sendTallies);\n  }\n  if (what_to_sample & (1 << SampleValues::receiveTallies)) {\n    int r = The_Squeak_Interpreter()->makeArrayStart();\n    for (int j = 0;  j < Message_Statics::end_of_messages;  ++j)\n      PUSH_POSITIVE_32_BIT_INT_FOR_MAKE_ARRAY(stats[rank_on_threads_or_zero_on_processes].receive_tallies[j]);\n\n    bzero(stats[rank_on_threads_or_zero_on_processes].receive_tallies, \n          sizeof(stats[rank_on_threads_or_zero_on_processes].receive_tallies));\n    Oop receiveTallies = The_Squeak_Interpreter()->makeArray(r);\n    PUSH_WITH_STRING_FOR_MAKE_ARRAY(receiveTallies);\n  }\n  if (what_to_sample & (1 << SampleValues::bufferedMessageStats)) {\n    PUSH_POSITIVE_64_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(stats[rank_on_threads_or_zero_on_processes].buf_msg_check_cyc);\n    stats[rank_on_threads_or_zero_on_processes].buf_msg_check_cyc = 0LL;\n    PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(stats[rank_on_threads_or_zero_on_processes].buf_msg_check_count);\n    stats[rank_on_threads_or_zero_on_processes].buf_msg_check_count = 0;\n  }\n  if (what_to_sample & (1 << SampleValues::receiveCycles)) {\n    int r = The_Squeak_Interpreter()->makeArrayStart();\n    for (int j = 0;  j < Message_Statics::end_of_messages;  ++j)\n      PUSH_POSITIVE_64_BIT_INT_FOR_MAKE_ARRAY(stats[rank_on_threads_or_zero_on_processes].receive_cycles[j]);\n    bzero(stats[rank_on_threads_or_zero_on_processes].receive_cycles, \n          sizeof(stats[rank_on_threads_or_zero_on_processes].receive_cycles));\n    Oop receiveCycles = The_Squeak_Interpreter()->makeArray(r);\n    PUSH_WITH_STRING_FOR_MAKE_ARRAY(receiveCycles);\n  }\n  return The_Squeak_Interpreter()->makeArray(s);\n}\n\n\nOop Message_Stats::get_message_names() {\n  int r = The_Squeak_Interpreter()->makeArrayStart();\n  for (int i = 0;  i < Message_Statics::end_of_messages; ++i)\n    PUSH_STRING_FOR_MAKE_ARRAY(Message_Statics::message_names[i]);\n  return The_Squeak_Interpreter()->makeArray(r);\n}\n\n\n# if Check_Reliable_At_Most_Once_Message_Delivery\n\nint Message_Stats::next_transmission_serial_number[Message_Statics::end_of_messages][Max_Number_Of_Cores][Memory_Semantics::max_num_threads_on_threads_or_1_on_processes];\nint Message_Stats::next_receive_serial_number[Message_Statics::end_of_messages][Max_Number_Of_Cores][Memory_Semantics::max_num_threads_on_threads_or_1_on_processes];\n\n\nvoid Message_Stats::check_received_transmission_sequence_number(Message_Statics::messages msg_type, int tsn, int sender) {\n  int should_be = next_receive_serial_number[msg_type][sender][rank_on_threads_or_zero_on_processes()]++;\n  if (tsn != should_be) {\n    lprintf(\"check_received_transmission_sequence_number: message %s from %d to %d is %d should_be %d\\n\",\n            Message_Statics::message_names[msg_type], sender, Logical_Core::my_rank(), tsn, should_be);\n    fatal(\"message delivery error\");\n  }\n}\n# endif\n\n\n"
  },
  {
    "path": "vm/src/messages/message_stats.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Message_Stats {\nprivate:\n  Message_Stats() { fatal(\"Message_Stats is not meant to be instanciated.\"); }\n\n  typedef struct statistics {\n    int     send_tallies   [Message_Statics::end_of_messages];\n    int     receive_tallies[Message_Statics::end_of_messages];\n    u_int64 receive_cycles [Message_Statics::end_of_messages];\n    u_int64 buf_msg_check_cyc;\n    int     buf_msg_check_count;\n  } statistics;\n  \npublic:\n  \n  static statistics stats[Memory_Semantics::max_num_threads_on_threads_or_1_on_processes];    // threadsafe\n  \n  static Oop get_stats(int);\n  static Oop get_message_names();\n\n  static void collect_send_msg_stats(int m) {\n    Performance_Counters::count_send_intercore_messages_static();\n    \n    const bool verbose = false;\n    if (verbose)\n      switch(m) {\n          // case Message_Statics::requestSafepointMessage:\n          // case Message_Statics::noMessage:\n        case Message_Statics::addObjectFromSnapshotMessage:\n        case Message_Statics::addObjectFromSnapshotResponse:\n        case Message_Statics::broadcastInterpreterDatumMessage:\n          break;\n          \n        default: lprintf( \"->%d sending %d %s\\n\", cpu_core_my_rank(), m, Message_Statics::message_names[m]); break;\n      }\n    ++stats[rank_on_threads_or_zero_on_processes()].send_tallies[m];\n  };\n  \n  static void collect_receive_msg_stats(int m) {\n    ++stats[rank_on_threads_or_zero_on_processes()].receive_tallies[m];\n  };\n  \n  static void record_receive_cycles(Message_Statics::messages msg_type, u_int64 cycles) {\n    stats[rank_on_threads_or_zero_on_processes()].receive_cycles[msg_type] += cycles; \n  };\n  \n  static void record_buffered_recieve(const int rank_on_threads_or_zero_on_processes, u_int64 cycles) {\n    stats[rank_on_threads_or_zero_on_processes].buf_msg_check_cyc += cycles;\n  ++stats[rank_on_threads_or_zero_on_processes].buf_msg_check_count;\n  };  \n  \n# if  Check_Reliable_At_Most_Once_Message_Delivery\n  static int next_transmission_serial_number[Message_Statics::end_of_messages][Max_Number_Of_Cores][Memory_Semantics::max_num_threads_on_threads_or_1_on_processes];\n  static int next_receive_serial_number[Message_Statics::end_of_messages][Max_Number_Of_Cores][Memory_Semantics::max_num_threads_on_threads_or_1_on_processes];\n  static void check_received_transmission_sequence_number(Message_Statics::messages, int, int);\n# endif\n  \n  \n};\n\n"
  },
  {
    "path": "vm/src/messages/message_templates.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nstatic const int evtBuf_size = 8;\n\n// TODO: the class macros should be defined where they are actually used, move to correct file\n\n\n// CAVEAT: if a messsage contains an Oop, it will get handled upon reception (unless the receiver holds a safepoint).\n// But if the receiver is spinning in a safepoint, the holder may be doing a GC. If no action has been taken to preserve the Oop,\n// it can get reclaimed by the collector. For instance, sampleOneCoreResponse was getting its array smashed.\n\n// Furthermore, the current Mac Message_Queue is not searched for roots during a GC; enqueued messages could lose roots.\n// Perhaps the safest course would be for the sender to register the oop, and wait for an ack.\n\n// -- dmu 10/1/10\n\n# define FOR_ALL_MESSAGES_DO(template) \\\ntemplate(noMessage,abstractMessage, (), (), , , no_ack, dont_delay_when_have_acquired_safepoint) \\\ntemplate(ackMessage,abstractMessage, (Message_Statics::messages m), (), { header = Message_Statics::encode_msg_type_for_ack(m); /*HACK*/ }, , no_ack, dont_delay_when_have_acquired_safepoint) \\\ntemplate(addedScheduledProcessMessage,abstractMessage, (), (), , , no_ack, dont_delay_when_have_acquired_safepoint) \\\n\\\ntemplate(aboutToWriteReadMostlyMemoryMessage,abstractMessage, (void* p, int n), (), {addr = p; nbytes = n;}, void* addr; int nbytes;, no_ack, dont_delay_when_have_acquired_safepoint) \\\ntemplate(addObjectFromSnapshotMessage,abstractMessage, (Oop d, Object* s), (), {dst_oop = d; src_obj_wo_preheader = s;}, Oop dst_oop; Object* src_obj_wo_preheader; void do_all_roots(Oop_Closure*);, no_ack, dont_delay_when_have_acquired_safepoint) \\\ntemplate(addObjectFromSnapshotResponse,abstractMessage, (Object* d), (), {dst_obj = d;}, Object* dst_obj; void do_all_roots(Oop_Closure*);, no_ack, dont_delay_when_have_acquired_safepoint) \\\ntemplate(broadcastInterpreterDatumMessage,abstractMessage, (int s, int o, u_int64 d), (), {datum_size = s; datum_byte_offset = o; datum = d;}, int datum_size; int datum_byte_offset; u_int64 datum;, no_ack, dont_delay_when_have_acquired_safepoint) /*xxxxxx simple if no wait*/\\\ntemplate(doAllRootsHereMessage,abstractMessage, (Oop_Closure* oc, bool igp), (), { closure = oc; is_gc_permitted = igp; }, Oop_Closure* closure; bool is_gc_permitted; , no_ack, dont_delay_when_have_acquired_safepoint) \\\n\\\ntemplate(getNextEventMessage,abstractMessage, (), (), , , no_ack, dont_delay_when_have_acquired_safepoint) \\\ntemplate(getNextEventResponse,abstractMessage, (), () , {  for (int i = 0;  i < evtBuf_size;  ++i) evtBuf[i] = 0; }, int evtBuf[evtBuf_size]; bool got_one; , no_ack, dont_delay_when_have_acquired_safepoint) \\\n\\\ntemplate(selfDestructMessage,abstractMessage, (const char* w), (), {why = w;}, const char* why; , no_ack, dont_delay_when_have_acquired_safepoint) \\\n\\\ntemplate(enforceCoherenceAfterEachCoreHasStoredIntoItsOwnHeapMessage,abstractMessage, (), (), , , post_ack_for_correctness, dont_delay_when_have_acquired_safepoint) \\\ntemplate(enforceCoherenceBeforeEachCoreStoresIntoItsOwnHeapMessage,abstractMessage, (), (), , , post_ack_for_correctness, dont_delay_when_have_acquired_safepoint) \\\ntemplate(enforceCoherenceBeforeSenderStoresIntoAllHeapsMessage,abstractMessage, (), (), , , post_ack_for_correctness, dont_delay_when_have_acquired_safepoint) \\\ntemplate(flushFreeContextsMessage,abstractMessage, (), (), , , post_ack_for_correctness, dont_delay_when_have_acquired_safepoint) /* xxxxxx could be simple if no waiting */\\\n\\\ntemplate(flushInterpreterCachesMessage,abstractMessage, (), (), , , no_ack, dont_delay_when_have_acquired_safepoint) \\\ntemplate(flushMethodCacheMessage,abstractMessage, (), (), , , no_ack, dont_delay_when_have_acquired_safepoint) \\\ntemplate(flushSelectiveMessage,abstractMessage, (Oop s), (), { selector = s; }, Oop selector; void do_all_roots(Oop_Closure*); , no_ack, dont_delay_when_have_acquired_safepoint) \\\ntemplate(flushByMethodMessage,abstractMessage, (Oop x), (), { method = x; }, Oop method; void do_all_roots(Oop_Closure*); , no_ack, dont_delay_when_have_acquired_safepoint) \\\n\\\ntemplate(setExtraWordSelectorMessage,abstractMessage, (Oop s), (), { selector = s; }, Oop selector; , no_ack, dont_delay_when_have_acquired_safepoint) \\\ntemplate(setEmergencySemaphoreMessage,abstractMessage, (Oop s), (), { semaphore = s; }, Oop semaphore; , no_ack, dont_delay_when_have_acquired_safepoint) \\\n\\\ntemplate(hereIsARootResponse,abstractMessage, (Oop r, Oop* a, Object* c, Oop_Closure* cl), (), { root = r; addr = a; container_or_null = c; closure = cl;}, Oop root; Oop* addr; Object* container_or_null; Oop_Closure* closure; void do_all_roots(Oop_Closure*);, no_ack, dont_delay_when_have_acquired_safepoint) \\\n\\\ntemplate(imageNamePutMessage,abstractMessage, (char* b, unsigned int n), (), { image_name = b; len = n; }, char* image_name; unsigned int len;, post_ack_for_correctness, dont_delay_when_have_acquired_safepoint) /* xxxxxx simple if no wait */ \\\n\\\ntemplate(loadFunctionFromPluginMessage,abstractMessage, (const char* f, const char* p), (), {fn_name = f; plugin_name = p;}, const char* fn_name; const char* plugin_name; , no_ack, dont_delay_when_have_acquired_safepoint) \\\n\\\ntemplate(loadFunctionFromPluginResponse,abstractMessage, (fn_t f), (), { fn = f;}, fn_t fn; , no_ack, dont_delay_when_have_acquired_safepoint) \\\ntemplate(newValueForOopMessage,abstractMessage, (Oop x, Oop*p), (), {addr = p; newValue = x;}, Oop* addr; Oop newValue; void do_all_roots(Oop_Closure*);, no_ack, dont_delay_when_have_acquired_safepoint) \\\n\\\ntemplate(noMoreRootsResponse,abstractMessage, (), (), , , no_ack, dont_delay_when_have_acquired_safepoint)  \\\ntemplate(postGCActionMessage,abstractMessage, (bool f, bool is_a), (), {fullGC = f; sender_is_able_to_safepoint = is_a; }, bool fullGC; bool sender_is_able_to_safepoint; , no_ack, dont_delay_when_have_acquired_safepoint) \\\ntemplate(preGCActionMessage,abstractMessage, (bool f), (), {fullGC = f;}, bool fullGC;, post_ack_for_correctness, dont_delay_when_have_acquired_safepoint) \\\ntemplate(recycleContextIfPossibleMessage,abstractMessage, (Oop c), (), {ctx = c;}, Oop ctx; void do_all_roots(Oop_Closure*); , no_ack, dont_delay_when_have_acquired_safepoint) \\\n\\\ntemplate(screenInfoMessage,abstractMessage, (), (), , , no_ack, dont_delay_when_have_acquired_safepoint) \\\ntemplate(screenInfoResponse,abstractMessage, (int sz, int full), (), { screenSize = sz; fullScreenFlag = full; }, int screenSize; int fullScreenFlag; , no_ack, dont_delay_when_have_acquired_safepoint) \\\n\\\ntemplate(requestSafepointOnOtherCoresMessage,abstractMessage, (const char* w), (), { why = w; }, const char* why; , no_ack, dont_delay_when_have_acquired_safepoint) \\\n\\\ntemplate(grantSafepointMessage,abstractMessage, (int sn), (), { sequence_number = sn; }, int sequence_number;, no_ack, dont_delay_when_have_acquired_safepoint) \\\n\\\ntemplate(releaseOtherCoresFromSafepointMessage,abstractMessage, (), (), , , no_ack, dont_delay_when_have_acquired_safepoint) \\\n\\\ntemplate(requestCoreToSpinMessage,abstractMessage, (int fw, int sn, const char* w), (), { for_whom = fw; sequence_number = sn; why = w; }, int for_whom;  int sequence_number; const char* why;, no_ack, dont_delay_when_have_acquired_safepoint)\\\n\\\ntemplate(tellCoreToStopSpinningMessage,abstractMessage, (int sn), (), {sequence_number = sn;}, int sequence_number;, no_ack, dont_delay_when_have_acquired_safepoint)\\\n\\\ntemplate(tellCoreIAmSpinningMessage,abstractMessage, (int sn, bool was), (), {sequence_number = sn; was_spinning = was;}, int sequence_number; bool was_spinning; , no_ack, dont_delay_when_have_acquired_safepoint) \\\ntemplate(sampleOneCoreMessage,abstractMessage, (int w), (), {what_to_sample = w;}, int what_to_sample;, no_ack, delay_when_have_acquired_safepoint) \\\ntemplate(sampleOneCoreResponse,abstractMessage, (Oop r), (), {result = r;}, Oop result;  void do_all_roots(Oop_Closure*);, post_ack_for_correctness, dont_delay_when_have_acquired_safepoint) \\\ntemplate(scanCompactOrMakeFreeObjectsMessage,abstractMessage, (bool c, Abstract_Mark_Sweep_Collector* g), (), {compacting = c; gc_or_null = g;}, bool compacting; Abstract_Mark_Sweep_Collector* gc_or_null; , post_ack_for_correctness, dont_delay_when_have_acquired_safepoint) \\\ntemplate(startInterpretingMessage,abstractMessage, (), (), , , no_ack, dont_delay_when_have_acquired_safepoint) \\\ntemplate(verifyInterpreterAndHeapMessage,abstractMessage, (), (), , , post_ack_for_correctness, dont_delay_when_have_acquired_safepoint) \\\ntemplate(zapUnusedPortionOfHeapMessage,abstractMessage, (), (), , , post_ack_for_correctness, dont_delay_when_have_acquired_safepoint) \\\n\\\n/* have to do updateWholeInterpreter the hard way because of header order, sigh */ \\\ntemplate(distributeInitialInterpreterMessage,abstractMessage, (Squeak_Interpreter* i), (), { interp = i; }, Squeak_Interpreter* interp;, post_ack_for_correctness, dont_delay_when_have_acquired_safepoint) \\\ntemplate(updateEnoughInterpreterToTransferControlMessage,abstractMessage, (), (), , Interpreter_Subset_For_Control_Transfer subset; void send_to(int); void do_all_roots(Oop_Closure*);, no_ack, dont_delay_when_have_acquired_safepoint) \\\ntemplate(transferControlMessage,updateEnoughInterpreterToTransferControlMessage, (), (), , , no_ack, dont_delay_when_have_acquired_safepoint) \\\ntemplate(runPrimitiveMessage,updateEnoughInterpreterToTransferControlMessage, (int c, fn_t f), (), { argCount = c; fn = f; }, int argCount; fn_t fn; , no_ack, delay_when_have_acquired_safepoint) \\\ntemplate(runPrimitiveResponse, updateEnoughInterpreterToTransferControlMessage, (), (), , , no_ack, dont_delay_when_have_acquired_safepoint) \\\n\\\n\n// TODO: the following macros do not belong here, move them to a better place\n\n# define WAIT_FOR_MESSAGE(msg_type_to_receive, src_rank)  \\\n  msg_type_to_receive##_class(&The_Receive_Marker).receive_and_handle_messages_returning_a_match(src_rank)\n\n# define SEND_THEN_WAIT_FOR_MESSAGE(msg_to_send, dst, msg_type_to_receive) \\\n  (msg_to_send).send_then_receive_and_handle_messages_returning_a_match(dst, msg_type_to_receive##_class(&The_Receive_Marker))\n\n# define SEND_THEN_WAIT_AND_RETURN_MESSAGE(msg_to_send, dst, msg_type_to_receive, var_name) \\\n  msg_type_to_receive##_class var_name(&The_Receive_Marker); \\\n  (msg_to_send).send_then_receive_and_handle_messages_returning_a_match(dst, var_name)\n\n"
  },
  {
    "path": "vm/src/messages/receive_marker.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\nReceive_Marker The_Receive_Marker;\n"
  },
  {
    "path": "vm/src/messages/receive_marker.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nextern class Receive_Marker {} The_Receive_Marker;\n"
  },
  {
    "path": "vm/src/multichip/abstract_zero_copy_command_queue_endpoint.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if Multiple_Tileras\n\n#include \"headers.h\"\n\n\n\nvoid Abstract_Zero_Copy_Command_Queue_Endpoint::open(int i) {\n  chip_index = i;\n  set_data_buf();\n}\n\n\nvoid Abstract_Zero_Copy_Command_Queue_Endpoint::send(const char* data, u_int32 len) {\n  check_send_constraints(len);\n  move_data_to_buffer(data, len);\n  prepare_request(len);\n  write_request();\n  read_completion();\n  check_completion();\n}\n\n\n\nint Abstract_Zero_Copy_Command_Queue_Endpoint::recv(char* data, u_int32 len) {\n  check_recv_constraints(len);\n  prepare_request(len);\n  write_request();\n  read_completion();\n  check_completion();\n  return move_data_from_buffer(data);\n}\n\n\n\nvoid Abstract_Zero_Copy_Command_Queue_Endpoint::check_data_size(u_int32 len) {\n  static const int max_size = 64 * 1024;\n  assert_always(len <= max_size);\n  assert_always(len <= data_buf_size);\n}\nvoid Abstract_Zero_Copy_Command_Queue_Endpoint::check_send_constraints(u_int32 len) {\n  assert_always(is_sender());\n  check_data_size(len);\n}\nvoid Abstract_Zero_Copy_Command_Queue_Endpoint::check_recv_constraints(u_int32 len) {\n  assert_always(!is_sender());\n  check_data_size(len);\n}\n\n\nvoid Abstract_Zero_Copy_Command_Queue_Endpoint::move_data_to_buffer(const char* data, u_int32 len) {\n  memcpy(data_buf, data, len); \n}\n\n\n# endif // Multiple_Tileras\n"
  },
  {
    "path": "vm/src/multichip/abstract_zero_copy_command_queue_endpoint.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if Multiple_Tileras\n\n\nclass Abstract_Zero_Copy_Command_Queue_Endpoint {\n  \npublic:\n  Abstract_Zero_Copy_Command_Queue_Endpoint() { chip_index = -1;  data_buf = NULL;  }\n  static void prepare_to_open_all() {}\n  void open(int);\n  \n  virtual bool is_sender() = 0;\n  bool is_receiver() { return !is_sender(); }\n  const char* send_or_recv() { return is_sender() ? \"send\" : \"recv\"; }\n  \n  void send(const char*, u_int32);\n  int  recv(      char*, u_int32);\n  \n  \nprotected:\n  int chip_index;\n  void* data_buf;\n  static u_int32 data_buf_size;\n  \n  virtual void set_data_buf() = 0;\n  void check_send_constraints(u_int32);\n  void check_recv_constraints(u_int32);\n  void check_data_size(u_int32);\n  \n  virtual void write_request() = 0;\n  virtual void read_completion() = 0;\n  virtual void  check_completion() = 0;\n  virtual int move_data_from_buffer(char* data) = 0;\n  virtual void move_data_to_buffer(const char* data, u_int32 len);\n  virtual void prepare_request(u_int32) = 0;\n  \n};\n\n\n\n\n# endif // Multiple_Tileras\n"
  },
  {
    "path": "vm/src/multichip/chip_to_chip_direct_to_hypervisor_zero_copy_endpoint.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if Multiple_Tileras\n\n#include \"headers.h\"\n\n\n\nChip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Endpoint::Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Endpoint() \n: Abstract_Zero_Copy_Command_Queue_Endpoint() { \n}\n\nvoid Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Endpoint::prepare_to_open_all() {\n  Abstract_Zero_Copy_Command_Queue_Endpoint::prepare_to_open_all();\n  tile_pci_init();\n  allocate_buffer_pages();\n}\n\nvoid Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Endpoint::open(int i) {\n  \n  Abstract_Zero_Copy_Command_Queue_Endpoint::open(i);\n  \n  channel_id = tilepci_channel_id( channel_type(), chip_index);\n  if (channel_id == TILEPCI_EINVAL) {\n    lprintf(\"tilepci_channel_id %s failed: specified channel is not legal\\n\", send_or_recv());\n    fatal(\"\");\n  }\n  char* msg;\n  int r = tilepci_open_channel(&context, channel_id);\n  if (!r) return; // success\n  switch (errno) {\n    case TILEPCI_ECHANNEL: msg = \"TILEPCI_ECHANNEL: channel_id not legal\"; break;\n    case ENXIO: msg = \"ENXIO: channel's link is down\"; break;\n    case EBUSY: msg = \"EBUSY: channel currently in use by the device-file-based zero copy interface\"; break;\n    default: msg = \"unknown error\"; break;\n  }\n  lprintf(\"tilepci_open_channel failed: channel_id %d, chip_index %d, result %d, errno %d: %s\\n\", channel_id, chip_index, r, errno, msg);\n  fatal(\"\");\n}\n\ntilepci_context_t  Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Endpoint::context;\nu_int32            Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Endpoint::credits_per_tile;\n\n\nvoid Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Endpoint::send_cmd() {\n  const char* msg;\n  switch ( tilepci_post_cmds( &context, &command, 1) ) {\n    case 0: return; // success\n    case TILEPCI_EINVAL: msg = \"EINVAL: a packet size was zero\"; break;\n    case TILEPCI_EFAULT: msg = \"EFAULT: some buffer_vas was illegal\"; break;\n    case TILEPCI_ECHANNEL: msg = \"ECHANNEL: some channel was not opened\"; break;\n    case TILEPCI_ECREDITS: msg = \"ECREDITS: tile lacks enough credits\"; break;\n    default: msg = \"unknown error\"; break;\n  }\n  lprintf(\"tilepci_post_cmds failed, errno %d, reason %s\\n\", errno, msg);\n  fatal(\"\");\n}\n\nvoid Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Endpoint::set_data_buf() {\n  data_buf = data_buf_for(chip_index);\n  \n  tilepci_iomem_register(&context, data_buf, data_buf_size);\n}\n\nvoid Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Endpoint::tile_pci_init() {\n  credits_per_tile = TILEPCI_CMD_SLOTS / Max_Number_Of_Cores; // or TILEPCI_MAX_C2C_NCMD\n  int r = ::tilepci_init(&context, device(), credits_per_tile);\n  if (r) {\n    char* msg;\n    switch (errno) {\n      default: msg = \"unknown error\"; break;\n      case -ENOENT: msg = \"ENOENT: device: does not exist\"; break;\n      case  TILEPCI_EBINDCPU: msg = \"TILEPCI_EBINDCPU: process is not bound to a single CPU\"; break;\n      case -EBUSY: msg = \"EBUSY: insufficient credits avaiable\"; break;\n      case -ENXIO: msg = \"ENXIO: device exists but the PCIe link is not up\"; break;\n    }\n    lprintf(\"tile_pci_init of %s for %d credits failed: %s\\n\", device(), credits_per_tile, msg);\n    fatal(\"\");\n  }\n}\n\nvoid* Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Endpoint::data_buf_for(int i) {\n  return &(all_data_bufs)[(2 * i + (is_sender() ? 1 : 0)) *  data_buf_size];\n}\n\n\nu_int32            Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Endpoint::total_data_buf_size = 0;\nchar*              Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Endpoint::all_data_bufs = NULL;\n\n\nvoid Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Endpoint::allocate_buffer_pages() {\n  allocate_huge_pages();\n  register_data_buffer_memory();\n}\n\nvoid Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Endpoint::allocate_huge_pages() {\n  // total_data_buf_size = data_buf_size * TILEPCI_MAX_C2C_NCMD;\n  static const int cmds_per_endpoint = 1;\n  static const int endpoints_per_chip = 2;\n  int num_cmds = The_Tilera_Chip_to_Chip_Message_Queue.num_chips * cmds_per_endpoint * endpoints_per_chip;\n  total_data_buf_size =  data_buf_size * num_cmds;\n  alloc_attr_t attr = ALLOC_INIT;\n  alloc_set_huge(&attr);\n  all_data_bufs = (char*)alloc_map(&attr, total_data_buf_size); // UG227 pg 85\n  if (!all_data_bufs) {\n    lprintf(\"alloc for Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Endpoint buffer memory failed: %d bytes\\n\", total_data_buf_size);\n    fatal(\"\");\n  }\n}\n\nvoid Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Endpoint::register_data_buffer_memory() {\n  int r = tilepci_iomem_register(&context, all_data_bufs, total_data_buf_size);\n  char *msg;\n  switch (r) {\n    case 0: return; // correct!\n    case TILEPCI_EFAULT: msg = \"TILEPCI_EFAULT, specified address was not a huge page.\"; break;\n    case TILEPCI_EREGISTERED: msg = \"TILEPCI_EREGISTERED, specified address was already registered.\"; break;\n    default: msg = \"unknown error code\";\n  }\n  lprintf(\"registration of %d bytes at 0x%x for Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Endpoint failed: %d: %s\\n\", total_data_buf_size, all_data_bufs, r, msg);\n  fatal(\"\");\n}\n\nvoid Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Endpoint::prepare_request(u_int32 len) {\n  command.buffer = data_buf;\n  command.tag = request_tag();\n  command.size = len;\n  command.soc = 1; // if in reset mode, must be set, ignored otherwise\n  command.must_eop = 1; // not straddling data\n  command.may_eop = 1;\n  command.reserved = 0;\n  command.channel_id = channel_id;\n}\n\nvoid Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Endpoint::write_request() {\n  int r = tilepci_post_cmds(&context, &command, 1);\n  char* msg;\n  switch (r) {\n    case 0: return; // success!\n    default: msg = \"unknown error\"; break;\n    case TILEPCI_EINVAL: msg = \"TILEPCI_EINVAL: a packet size was zero\"; break;\n    case TILEPCI_EFAULT: msg = \"TILEPCI_EFAULT: a buffer was illegal\"; break;\n    case TILEPCI_ECHANNEL: msg = \"TILEPCI_ECHANNEL: a channel_id was not open\"; break;\n    case TILEPCI_ECREDITS: msg = \"TILEPCI_ECREDITS: this tile lacks command credits\"; break;\n  }\n  lprintf(\"tilepci_post_cmds addr 0x%x, len %d failed: %d %s\\n\",\n          command.buffer, command.size, r, msg);\n  fatal(\"\");\n}\n\nvoid Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Endpoint::read_completion() {\n  int r = tilepci_get_comps(&context, &completion, 1, 1);\n  if (r != 1) {\n    lprintf(\"tilepci_get_comps expected 1 got %d\\n\", r);\n    fatal(\"\");\n  }\n}\n\nvoid Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Endpoint::check_completion() {\n  assert_always_eq(completion.tag, test_tag);\n  assert_always(!completion.reset);\n  static bool kvetched = false;\n  if (!kvetched && completion.link_down) { kvetched = true; lprintf(\"link down on %d %s\\n\", chip_index, send_or_recv());  }\n  // assert_always(!completion.link_down);\n  assert_always_eq(completion.channel_id, command.channel_id);\n}\n\nvoid Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Endpoint::move_data_to_buffer(const char* data, u_int32 len) {\n  Abstract_Zero_Copy_Command_Queue_Endpoint::move_data_to_buffer(data, len);\n  OS_Interface::mem_flush(data_buf, len);\n}\n\nint Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Endpoint::move_data_from_buffer(char* data) {\n  OS_Interface::invalidate_mem( command.buffer, completion.size);\n  memcpy(data, command.buffer, completion.size);\n  return completion.size;\n}\n\n\n# endif // Multiple_Tileras\n"
  },
  {
    "path": "vm/src/multichip/chip_to_chip_direct_to_hypervisor_zero_copy_endpoint.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if Multiple_Tileras\n\n\nclass Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Endpoint: public Abstract_Zero_Copy_Command_Queue_Endpoint {\n  friend class Tilera_Chip_to_Chip_Message_Queue; // for asap benchmark\n\n\npublic:\n  Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Endpoint();\n  \n  static void prepare_to_open_all();\n  void open(int);\n  \n  \nprotected:\n  static const char* device() { return \"/dev/hostpci/hv_direct_zc\"; }\n  static tilepci_context_t context;\n  static u_int32 credits_per_tile;\n  int channel_id;\n  tilepci_cmd_t  command;\n  tilepci_comp_t completion;\n  \n  virtual tilepci_channel_type_t channel_type() = 0;\n  void send_cmd();\n  \n  void set_data_buf();\n  static void tile_pci_init();\n  \n  void*   data_buf_for(int);\n  static u_int32 total_data_buf_size;\n  static char* all_data_bufs;\n  \n  \n  static void allocate_buffer_pages();\n  static void allocate_huge_pages();\n  static void register_data_buffer_memory();\n  void prepare_request(u_int32);\n  virtual int request_tag() = 0;\n  void write_request();\n  void read_completion();\n  void check_completion();\n  void move_data_to_buffer(const char* data, u_int32 len);\n  int move_data_from_buffer(char* data);\n\n  static const int test_tag = 29;\n};\n\n\n# endif // Multiple_Tileras\n"
  },
  {
    "path": "vm/src/multichip/chip_to_chip_direct_to_hypervisor_zero_copy_receiver.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if Multiple_Tileras\n\n#include \"headers.h\"\n\nvoid Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Receiver::check_completion() {\n  Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Endpoint::check_completion();\n  assert_always(completion.size <= command.size);\n  static bool kvetched = false;\n  if (!kvetched && !completion.eop) { kvetched = true; lprintf(\"completion not eop on %d\\n\", chip_index);  }\n  // assert_always(completion.eop);\n  assert_always(!completion.overflow);\n}\n\n# endif // Multiple_Tileras\n"
  },
  {
    "path": "vm/src/multichip/chip_to_chip_direct_to_hypervisor_zero_copy_receiver.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if Multiple_Tileras\n\nclass Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Receiver: public Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Endpoint {\npublic:\n  bool is_sender() { return false; }\n  \nprotected:\n  tilepci_channel_type_t channel_type() { return TILEPCI_C2C_RECV; }\n  int request_tag() { return test_tag + 2; }\n  void check_completion();\n};\n\n\n\n\n# endif // Multiple_Tileras\n"
  },
  {
    "path": "vm/src/multichip/chip_to_chip_direct_to_hypervisor_zero_copy_sender.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if Multiple_Tileras\n\n#include \"headers.h\"\n\nvoid Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Sender::check_completion() {\n  Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Endpoint::check_completion();\n  assert_always_eq(completion.size, command.size);\n}\n\n\n\n\n# endif // Multiple_Tileras\n"
  },
  {
    "path": "vm/src/multichip/chip_to_chip_direct_to_hypervisor_zero_copy_sender.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if Multiple_Tileras\n\nclass Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Sender: public Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Endpoint {\npublic:\n  bool is_sender() { return true; }\n  \n  \nprotected:\n  tilepci_channel_type_t channel_type() { return TILEPCI_C2C_SEND; }\n  int request_tag() { return test_tag; }\n  void check_completion();\n  \n};\n\n\n# endif // Multiple_Tileras\n"
  },
  {
    "path": "vm/src/multichip/chip_to_chip_zero_copy_command_queue_endpoint.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if Multiple_Tileras\n\n#include \"headers.h\"\n\nChip_to_Chip_Zero_Copy_Command_Queue_Endpoint::Chip_to_Chip_Zero_Copy_Command_Queue_Endpoint() \n: Abstract_Zero_Copy_Command_Queue_Endpoint() { \n  chip_index = -1; \n  fd = -1; \n  file_name[0] = '\\0'; \n}\n\n\nvoid Chip_to_Chip_Zero_Copy_Command_Queue_Endpoint::open(int i) {\n  Abstract_Zero_Copy_Command_Queue_Endpoint::open(i);\n  \n  set_file_name(); \n  fd = ::open(file_name, O_RDWR);\n  if (fd >= 0) lprintf(\"%s open on %d: %d\\n\", file_name, i, fd);\n  else {perror(file_name); fatal(\"\"); }\n}\n\nvoid Chip_to_Chip_Zero_Copy_Command_Queue_Endpoint::get_read_error_string(int err, char* buf) {\n  const char* msg;\n  switch (err) {\n    case EINVAL: msg = \"The read size was not a multiple of sizeof(tilepci_xfer_comp_t).\";  \n      break;\n    case ENXIO: msg = \"Connection is down. This can occur if the TILExpress card is reset while the zero-copy command queue file handle is open.\";  \n      break;\n    case EAGAIN: msg = \"The operation would block. This error is only returned if the file handle has the O_NONBLOCK flag set.\"; \n      break;\n    case EFAULT: msg = \"The completion array is not in accessible address space.\";  \n      break;\n    case EINTR: msg = \"The request was interrupted by a signal before any commands were posted.\";  \n      break;\n    default:\n      sprintf(buf, \"Unknown error: %d\", err);\n      return;\n  }\n  strcpy(buf, msg);\n}\n\nvoid Chip_to_Chip_Zero_Copy_Command_Queue_Endpoint::get_write_error_string(int err, char* buf) {\n  char* msg;\n  switch (err) {\n    case EINVAL: msg = \"The write size was not a multiple of sizeof(tilepci_xfer_req_t), or a buffer specified by one of the requests was not physically contiguous.\";\n      break;\n    case ENOBUFS: msg = \"The number of commands set by the TILEPCI_IOC_SET_NCMD ioctl() is too small to ever transmit this many requests.\";\n      break;\n    case ENXIO: msg = \"Connection is down. This can occur if the TILExpress card is reset while the zero-copy command queue file handle is open\";\n      break;\n    case EAGAIN: msg = \"The operation would block. This error is only returned if the file handle has the O_NONBLOCK flag set.\";\n      break;\n    case EFAULT: msg = \"Either the command array passed to write() or the data buffer specified by one of the written commands were not in accessible address space.\";\n      break;\n    case EINTR: msg = \"The request was interrupted by a signal before any commands were posted.\";\n    default:\n      sprintf(buf, \"Unknown error: %d\", err);\n      return;\n  }\n  strcpy(buf, msg);\n}\n\nvoid Chip_to_Chip_Zero_Copy_Command_Queue_Endpoint::get_flag_string(int flags, char* buf) {\n  if (flags == 0) { strcpy(buf, \"<none>\"); return; }\n  \n  int f = flags;\n  buf[0] = '\\0';\n# define do_flag(flag_name) if (f & flag_name) {f &= ~flag_name; strcat(buf, #flag_name  \" \"); } else\n  do_flag(TILEPCI_SEND_EOP);\n  do_flag(TILEPCI_RCV_MAY_EOP);\n  do_flag(TILEPCI_RCV_MUST_EOP);\n  do_flag(TILEPCI_CPL_EOP);\n  do_flag(TILEPCI_CPL_OVERFLOW);\n  do_flag(TILEPCI_CPL_RESET);\n  do_flag(TILEPCI_CPL_LINK_DOWN);\n  char buf2[BUFSIZ];\n  strcpy(buf2, buf);\n  if (f) sprintf(buf, \"%s <unknown: 0x%x>\", buf2, f);\n}\n\nvoid Chip_to_Chip_Zero_Copy_Command_Queue_Endpoint::flags_should_be(int desired, char* msg) {\n  if (completion.flags == desired) return;\n  char fb[BUFSIZ];\n  get_flag_string(completion.flags, fb);\n  char fb2[BUFSIZ];\n  get_flag_string(desired, fb2);\n  char buf[BUFSIZ];\n  sprintf(buf, \"%s comp flags %s(0x%x) should be %s(0x%x)\\n\", msg, fb, completion.flags, fb2, desired);\n  lprintf(buf);\n  fatal(\"\");\n}\n\nvoid Chip_to_Chip_Zero_Copy_Command_Queue_Endpoint::io_failure(bool is_write) {\n  int err = errno;\n  lprintf(\"%s to zero-copy queue from %d to %s failed: \\n\", \n          (is_write ? \"write\" : \"read\"), The_Tilera_Chip_to_Chip_Message_Queue.my_chip_index, file_name);\n  char msg[BUFSIZ];\n  if (is_write) get_write_error_string(err, msg);\n  else          get_read_error_string( err, msg);\n  lprintf(\"error: %s\\n\", msg);\n  fatal(\"\");\n}\n\nvoid Chip_to_Chip_Zero_Copy_Command_Queue_Endpoint::prepare_request(u_int32 len) {\n  request.addr = data_buf;;\n  request.len = len;\n  request.flags = request_flags();\n  request.cookie = request_cookie();\n}\n\nvoid Chip_to_Chip_Zero_Copy_Command_Queue_Endpoint::write_request() {\n  int r = write(fd, &request, sizeof(request));  \n  if (r != sizeof(request)) io_failure(true);\n}\n\nvoid Chip_to_Chip_Zero_Copy_Command_Queue_Endpoint::read_completion() {\n  int r = read( fd, &completion, sizeof(completion));\n  if (r != sizeof(completion)) io_failure(false);\n}\n\nvoid Chip_to_Chip_Zero_Copy_Command_Queue_Endpoint::check_completion() {\n  assert_always_eq(completion.addr,   request.addr);\n  assert_always_eq(completion.cookie, test_cookie);\n}\n\nint Chip_to_Chip_Zero_Copy_Command_Queue_Endpoint::move_data_from_buffer(char* data) {\n  memcpy(data, request.addr, completion.len);\n  return completion.len;\n}\n\nvoid Chip_to_Chip_Zero_Copy_Command_Queue_Endpoint::set_data_buf() {\n  lprintf(\"FYI, data buf size = %d\\n\", data_buf_size);\n  data_buf = OS_Interface::rvm_memalign(getpagesize(), data_buf_size); \n  assert_always(data_buf);\n}\n\n\n# endif // Multiple_Tileras\n"
  },
  {
    "path": "vm/src/multichip/chip_to_chip_zero_copy_command_queue_endpoint.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if Multiple_Tileras\n\n\nclass Chip_to_Chip_Zero_Copy_Command_Queue_Endpoint: public Abstract_Zero_Copy_Command_Queue_Endpoint {\nprotected:\n  \n  int fd;\n  char file_name[BUFSIZ];\n  \n  tilepci_xfer_req_t  request;  \n  tilepci_xfer_comp_t completion;\n  \n  \npublic:\n  Chip_to_Chip_Zero_Copy_Command_Queue_Endpoint();\n  \n  void open(int i);\n  \n  \nprotected:\n  void set_file_name() { sprintf(file_name, \"/dev/hostpci/c2c_%s/%d\", send_or_recv(), chip_index); }\n  void get_read_error_string(int err, char* buf);\n  void get_write_error_string(int err, char* buf); \n  static void get_flag_string(int flags, char* buf);\n  void flags_should_be(int desired, char* msg);\n  void io_failure(bool);\n  \n  void prepare_request(u_int32);\n  virtual int request_flags() = 0;\n  virtual int request_cookie() = 0;\n  \n  void write_request();\n  void read_completion();\n  \n  void check_completion();\n  int move_data_from_buffer(char* data);  \n  void set_data_buf();\n  static const int test_cookie = 17;\n};\n\n\n# endif // Multiple_Tileras\n"
  },
  {
    "path": "vm/src/multichip/chip_to_chip_zero_copy_command_receiver.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if Multiple_Tileras\n\n\n#include \"headers.h\"\n\nvoid Chip_to_Chip_Zero_Copy_Command_Receiver::check_completion() {\n  Chip_to_Chip_Zero_Copy_Command_Queue_Endpoint::check_completion();\n  \n  assert_always(completion.len <= request.len);\n  flags_should_be(0, \"recv\");\n}\n\n\n# endif // Multiple_Tileras\n"
  },
  {
    "path": "vm/src/multichip/chip_to_chip_zero_copy_command_receiver.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if Multiple_Tileras\n\n\nclass Chip_to_Chip_Zero_Copy_Command_Receiver: public Chip_to_Chip_Zero_Copy_Command_Queue_Endpoint {\npublic:\n  bool is_sender() { return false; }\n  \nprivate:\n  int request_flags() { return TILEPCI_RCV_MUST_EOP; }\n  int request_cookie() { return test_cookie + 2; }\n  void check_completion();\n};\n\n\n\n# endif // Multiple_Tileras\n"
  },
  {
    "path": "vm/src/multichip/chip_to_chip_zero_copy_command_sender.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if Multiple_Tileras\n\n#include \"headers.h\"\n\nvoid Chip_to_Chip_Zero_Copy_Command_Sender::check_completion() {\n  Chip_to_Chip_Zero_Copy_Command_Queue_Endpoint::check_completion();\n  \n  assert_always_eq(completion.len, request.len);\n  \n  if (completion.flags & TILEPCI_CPL_LINK_DOWN) {\n    static bool kvetched = false;\n    if (!kvetched) {\n      lprintf(\"discarding TILEPCI_CPL_LINK_DOWN, no more warnings\\n\");\n      kvetched = true;\n    }\n  }\n  completion.flags &= ~TILEPCI_CPL_LINK_DOWN;\n  flags_should_be(TILEPCI_CPL_EOP, \"send\");\n}\n\n\n# endif // Multiple_Tileras\n"
  },
  {
    "path": "vm/src/multichip/chip_to_chip_zero_copy_command_sender.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if Multiple_Tileras\n\n\nclass Chip_to_Chip_Zero_Copy_Command_Sender:   public Chip_to_Chip_Zero_Copy_Command_Queue_Endpoint {\npublic:\n  bool is_sender() { return true; }\n  \nprivate:\n  int request_flags() { return TILEPCI_SEND_EOP; }\n  int request_cookie() { return test_cookie; };\n  void check_completion();\n};\n\n\n\n# endif // Multiple_Tileras\n"
  },
  {
    "path": "vm/src/multichip/host_pci_info.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\n# if Multiple_Tileras\n\n\nHost_PCI_Info::Host_PCI_Info() {\n  read_info_file();\n}\n\n\n\nvoid Host_PCI_Info::read_info_file() {\n# define init_info_var(name)  name = -1;\n  FOR_ALL_INFOS(init_info_var)\n# undef init_info_var\n\n  \n  static const char info_file_name[] = \"/dev/hostpci/info\";\n  \n  FILE* f = fopen(info_file_name, \"r\");\n  if (f == NULL) { perror(info_file_name); fatal(\"\"); }\n  \n  for (;;) {\n    int r;\n    char key[BUFSIZ];\n    int val;\n    r = fscanf(f, \"%s %d \", key, &val);\n    // lprintf(\"r %d, key %s, val %d\\n\", r, key, val);\n    if (r != 2) break;\n    \n# define match_info(info_name)  else if (strcmp(#info_name, key) == 0) { info_name = val; } \n    \n    if (false) ;\n    FOR_ALL_INFOS(match_info)\n# undef match_info\n    else {\n      lprintf(\"Encountered unknown info value in %s: %s. Add it to FOR_ALL_INFOS.\\n\", info_file_name, key);\n      fatal(\"\");\n    }\n  }\n  fclose(f);\n  \n# define check_info(info_name) \\\nif (info_name < 0) fatal(\"uninitialiaized value was not found in info file: \" #info_name); \\\n  FOR_ALL_INFOS(check_info)\n# undef check_info\n    \n}\n\n\nvoid Host_PCI_Info::print() {\n# define print_info(info_name) if (Logical_Core::running_on_main()) lprintf(#info_name \" = %d\\n\", info_name);\n  FOR_ALL_INFOS(print_info);\n# undef print_info\n}\n\n# endif // Multiple_Tileras\n"
  },
  {
    "path": "vm/src/multichip/host_pci_info.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if Multiple_Tileras\n\nclass Host_PCI_Info {\n\n\n#   define FOR_ALL_INFOS(template) \\\n      template(Host_Link_Index) \\\n      template(Max_Payload_Size) \\\n      template(Max_Read_Size) \\\n      template(Link_Width) \\\n      template(LINK_BAR1_SIZE) \\\n      template(LINK_BAR1_ADDRESS) \\\n      template(PREBOOTER_VERSION)\n  \n  void read_info_file();\n  \n  public:\n\n#   define declare_info_var(name) int name;\n        FOR_ALL_INFOS(declare_info_var)\n#   undef declare_info_var\n  \n  Host_PCI_Info();\n  void print();\n\n};\n\n\n# endif\n"
  },
  {
    "path": "vm/src/multichip/tilera_chip_to_chip_message_queue.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if Multiple_Tileras\n\n#include \"headers.h\"\n\nTilera_Chip_to_Chip_Message_Queue The_Tilera_Chip_to_Chip_Message_Queue;\n\n\n// Use pagesize for now; works for both ways\nu_int32 Abstract_Zero_Copy_Command_Queue_Endpoint::data_buf_size = max(getpagesize(), __ILIB_L2_CACHELINE_SIZE);\n\n\n# define FOR_ALL_CHIPS_BUT_ME(index) \\\nfor (int index = 0;  (index == my_chip_index ? ++index : 0),  index < num_chips;  ++index)\n\nvoid connect_to_other_chips() { The_Tilera_Chip_to_Chip_Message_Queue.init(); }\n\nvoid send_test_message() {\n  The_Tilera_Chip_to_Chip_Message_Queue.send_test_message();\n  The_Tilera_Chip_to_Chip_Message_Queue.send_test_message_asap();\n}\n\n\nvoid Tilera_Chip_to_Chip_Message_Queue::init() {\n  max_request_count = TILEPCI_MAX_C2C_NCMD;\n  num_chips = The_Squeak_Interpreter()->num_chips();\n  my_chip_index = info.Host_Link_Index;\n  lprintf(\"my_chip_index %d, num_chips %d, max_chip_count %d\\n\", num_chips, my_chip_index, max_chip_count);\n  assert_always(num_chips <= max_chip_count  &&  my_chip_index < num_chips);\n  \n  info.print();\n  open_channels();\n}\n\n\nvoid Tilera_Chip_to_Chip_Message_Queue::open_channels() {\n  senders[0].prepare_to_open_all();\n  FOR_ALL_CHIPS_BUT_ME(i) {\n    senders  [i].open(i);\n    receivers[i].open(i);\n  }\n}\n\nvoid Tilera_Chip_to_Chip_Message_Queue::send(u_int32 chip_index, const char* data, u_int32 len) {\n  assert_always(chip_index != my_chip_index);\n  assert_always(chip_index < num_chips);\n  senders[chip_index].send(data, len);\n}\n\nint Tilera_Chip_to_Chip_Message_Queue::recv(u_int32 chip_index, char* data, u_int32 len) {\n  assert_always(chip_index < num_chips);\n  assert_always(chip_index != my_chip_index);\n  return receivers[chip_index].recv(data, len);\n}\n\n\n\nvoid Tilera_Chip_to_Chip_Message_Queue::send_test_message() {\n  int msg1, msg2;\n  char buf[BUFSIZ];\n  static const bool verbose = false;\n  static const int N = 1000;\n  switch (my_chip_index) {\n    default: break;\n    case 0: {\n       lprintf(\"sending test message\\n\");\n       int64 start = OS_Interface::get_cycle_count();\n        for (int i = 1;  i <= N;  ++i) {\n          msg1 = i * 2;\n          send(1, (char*)&msg1, sizeof(msg1));\n          if (verbose)  lprintf(\"sent\\n\");\n          int n = recv(1, buf, sizeof(buf));\n          assert_always_eq(n, sizeof(msg2));\n          assert_always_eq(i * 2  +  1, *(int*)buf);\n          if (verbose)  lprintf(\"received\\n\");\n        }\n        int64 end = OS_Interface::get_cycle_count();\n        lprintf(\"Success!! Send & Received %s in %lld cycles/rt\\n\", buf, (end - start) / (int64)N);\n      }\n      break;\n    case 1: \n      lprintf(\"relaying test message\\n\");\n      for (int i = 1;  i <= N;  ++i) {\n        int n = recv(0, buf, sizeof(buf));\n        if (verbose)  lprintf(\"received\\n\");\n        assert_always_eq(n, sizeof(msg1));\n        assert_always_eq(i * 2, *(int*)buf);\n        msg2 = i * 2  +  1;\n        send(0, (char*)&msg2, sizeof(msg2));\n        if (verbose)  lprintf(\"sent\\n\");\n      }\n      lprintf(\"Success!! Received %s and sent\\n\", buf);\n      break;\n  }\n}\n\n\n\n\nvoid Tilera_Chip_to_Chip_Message_Queue::send_test_message_asap() {\n  int msg1, msg2;\n  char buf[BUFSIZ];\n  static const bool verbose = false;\n  static const int N = 1000;\n  int other_index = 1 - my_chip_index;\n  static Chip_to_Chip_Sender sender = senders[other_index];\n  static Chip_to_Chip_Receiver receiver = receivers[other_index];\n  tilepci_context_t* context = &sender.context;\n  char* s_data_buf = (char*)sender.data_buf;\n  char* r_data_buf = (char*)receiver.data_buf;\n  \n  static tilepci_cmd_t  s_command;\n  s_command.buffer = s_data_buf;\n  s_command.size = 4;\n  s_command.tag = 17;\n  s_command.soc = 1;\n  s_command.must_eop = 1;\n  s_command.may_eop = 1;\n  s_command.reserved = 0;\n  s_command.channel_id = sender.channel_id;\n\n  \n  static tilepci_cmd_t  r_command;\n  r_command.buffer = r_data_buf;\n  r_command.size = getpagesize();\n  r_command.tag = 19;\n  r_command.soc = 1;\n  r_command.must_eop = 1;\n  r_command.may_eop = 1;\n  r_command.reserved = 0;\n  r_command.channel_id = receiver.channel_id;\n\n  \n  static tilepci_comp_t completion;\n  \n  1 + 2;\n  \n  switch (my_chip_index) {\n    default: break;\n    case 0: {\n      lprintf(\"sending test message\\n\");\n      int64 start = OS_Interface::get_cycle_count();\n \n      for (int i = 1;  i <= N;  ++i) {\n        msg1 = i * 2;\n        \n         *(int*)s_data_buf = msg1;\n        OS_Interface::mem_flush(s_data_buf, 4);\n        int r;\n        r = tilepci_post_cmds(context, &s_command, 1);\n        if (r) fatal(\"tilepci_post_cmds\");\n\n        r = tilepci_get_comps(context, &completion, 1, 1);\n        if (r != 1) fatal(\"tilepci_get_comps\");\n              \n              \n        \n        r = tilepci_post_cmds(context, &r_command, 1);\n        if (r) fatal(\"tilepci_post_cmds\");\n        \n        r = tilepci_get_comps(context, &completion, 1, 1);\n        if (r != 1) fatal(\"tilepci_get_comps\");\n\n        OS_Interface::invalidate_mem( r_data_buf, 4);\n        msg1 = *(int*)r_data_buf;\n        assert_always_eq(i * 2  +  1, msg1);\n      }\n      int64 end = OS_Interface::get_cycle_count();\n      lprintf(\"Success!! Send & Received ASAP %s in %lld cycles/rt\\n\", buf, (end - start) / (int64)N);\n    }\n      break;\n      \n    case 1: \n      lprintf(\"relaying test message\\n\");\n      for (int i = 1;  i <= N;  ++i) {\n         \n        int r;\n        r = tilepci_post_cmds(context, &r_command, 1);\n        if (r) fatal(\"tilepci_post_cmds\");\n        \n        r = tilepci_get_comps(context, &completion, 1, 1);\n        if (r != 1) fatal(\"tilepci_get_comps\");\n        \n        OS_Interface::invalidate_mem( r_data_buf, 4);\n        msg2 = *(int*)r_data_buf;\n        assert_always_eq(i * 2 , msg2);\n        \n        \n        \n        msg2 = i * 2 + 1;\n        \n        *(int*)s_data_buf = msg2;\n        OS_Interface::mem_flush(s_data_buf, 4);\n        r = tilepci_post_cmds(context, &s_command, 1);\n        if (r) fatal(\"tilepci_post_cmds\");\n        \n        r = tilepci_get_comps(context, &completion, 1, 1);\n        if (r != 1) fatal(\"tilepci_get_comps\");\n      }\n      lprintf(\"Success!! Received %s and sent\\n\", buf);\n      break;\n  }\n}\n\n\n\n\n# endif\n\n"
  },
  {
    "path": "vm/src/multichip/tilera_chip_to_chip_message_queue.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if Multiple_Tileras\n\n# define Use_File_Based_API 0\n\n# if Use_File_Based_API\ntypedef Chip_to_Chip_Zero_Copy_Command_Sender   Chip_to_Chip_Sender;\ntypedef Chip_to_Chip_Zero_Copy_Command_Receiver Chip_to_Chip_Receiver;\n# else\ntypedef Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Sender   Chip_to_Chip_Sender;\ntypedef Chip_to_Chip_Direct_to_Hypervisor_Zero_Copy_Receiver Chip_to_Chip_Receiver;\n# endif\n\n\nclass Tilera_Chip_to_Chip_Message_Queue {\n\npublic:\n  static const int max_chip_count = 16;\n  int num_chips;\n  int my_chip_index;\n  u_int32 max_request_count;\n  \nprivate:\n  Chip_to_Chip_Sender   senders  [max_chip_count];\n  Chip_to_Chip_Receiver receivers[max_chip_count];\n  \n  Host_PCI_Info info;\n\n  \n  void open_channels();\n  \n  void get_write_error_string(int, char*);\n  void get_read_error_string(int, char*);\n  \n  public:\n  void init();\n  void send(u_int32 chip_index, const char* data, u_int32 len);\n  int recv(u_int32 chip_index, char* data, u_int32 len);\n  \n  void send_test_message();\n  void send_test_message_asap();\n};\n\nextern Tilera_Chip_to_Chip_Message_Queue The_Tilera_Chip_to_Chip_Message_Queue;\n\nextern \"C\" { void connect_to_other_chips(); void send_test_message(); }\n\n# endif\n"
  },
  {
    "path": "vm/src/objects/chunk.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n/*\n A chunk is the unit used by the memory system, the heap to manage the memory.\n \n TODO: add information whether empty chunks are somehow abused to store data.\n       and how it is encoded.\n */\n\nclass Chunk\n# if !Work_Around_Extra_Words_In_Classes\n: public Word_Containing_Object_Type\n# endif\n\n{\n  # if Work_Around_Extra_Words_In_Classes\n    # include \"word_containing_object_type.h\"\n    # define chunk_header (*(oop_int_t*)this)\n  # else\n    oop_int_t chunk_header;\n  # endif\n\n public:\n  \n  /**\n   * Determine the start of the object, i.e., the position of the base header.\n   *\n   * See object.h for details.\n   */\n  Object* object_from_chunk() {\n    Word_Containing_Object_Type* const after_preheader =\n          (Word_Containing_Object_Type*)((char*) this + preheader_byte_size);\n    \n    \n    return (Object*) & ((char*)after_preheader)[after_preheader->extra_header_bytes_without_preheader()];\n  }\n\n  /**\n   * Determine the start of the object, i.e., the position of the base header.\n   *\n   * REMARK: this is used for chunks read from a standard image.\n   *         In such a case, the chunks do NOT contain a preheader.\n   *\n   * See object.h for details.\n   */\n  Object* object_from_chunk_without_preheader() {\n    // \"Compute the oop of this chunk by adding its extra header bytes.\"\n    return (Object*) & ((char*)this)[extra_header_bytes_without_preheader()];\n  }\n\n  void make_free_object(oop_int_t bytes_including_header, int id);\n};\n\n"
  },
  {
    "path": "vm/src/objects/chunk.inline.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\ninline void Chunk::make_free_object(oop_int_t bytes_including_header, int id) {\n  oop_int_t bytes_excluding_preheader = bytes_including_header - preheader_byte_size;\n  assert(bytes_excluding_preheader > 0);\n  \n  static const int hs = Object::BaseHeaderSize/sizeof(Oop);\n  \n  // skip over the preheader and initialize it later properly\n  Object* const first_object_header_word = (Object*)((char*)this + preheader_byte_size);\n  \n  oop_int_t contents = Object::make_free_object_header(bytes_excluding_preheader);\n  \n  DEBUG_STORE_CHECK((oop_int_t*)first_object_header_word, contents);  \n  *(oop_int_t*)first_object_header_word = contents;\n  \n  // only used by GC and IT worries about coherence\n  if (check_assertions) {\n    oop_int_t filler = Oop::Illegals::made_free |  ((id & 15) << 24);\n    assert(The_Memory_System()->contains(first_object_header_word));\n    oopset_no_store_check(((Oop*)first_object_header_word) + hs, Oop::from_bits(filler), bytes_excluding_preheader/sizeof(Oop) - hs);\n    \n    ((Preheader*)this)->mark_all_preheader_words_free_for_debugging();\n  }\n}\n\n"
  },
  {
    "path": "vm/src/objects/header_type.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\n\nchar Header_Type::extra_bytes_without_preheader[4] = {\n  bytesPerWord * 2  , // \"3-word header (type 0)\"\n  bytesPerWord      ,\t// \"2-word header (type 1)\"\n  0                 ,\t// \"free chunk (type 2)\"\n  0                   // \"1-word header (type 3)\"\n};\n\nchar Header_Type::extra_bytes_with_preheader[4] = {\n  bytesPerWord * 2  +  preheader_byte_size, // \"3-word header (type 0)\"\n  bytesPerWord      +  preheader_byte_size,\t// \"2-word header (type 1)\"\n  0                 +  0,\t// \"free chunk (type 2)\"\n  0                 +  preheader_byte_size  // \"1-word header (type 3)\"\n};\n\n\n\nchar Header_Type::extra_oops_without_preheader[4] = {\n  2  , // \"3-word header (type 0)\"\n  1  ,\t// \"2-word header (type 1)\"\n  0  ,\t// \"free chunk (type 2)\"\n  0     // \"1-word header (type 3)\"\n};\n\nchar Header_Type::extra_oops_with_preheader[4] = {\n  2  +  preheader_oop_size, // \"3-word header (type 0)\"\n  1  +  preheader_oop_size,\t// \"2-word header (type 1)\"\n  0  +  0,\t// \"free chunk (type 2)\"\n  0  +  preheader_oop_size  // \"1-word header (type 3)\"\n};\n\n"
  },
  {
    "path": "vm/src/objects/header_type.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Header_Type {\n  // See object.h: both objects and chunks start with a word containing a header type\n\n public:\n\n  static const int Shift = 0;\n  static const int Mask = 3;\n  static const int Width = 2; // 2 bits\n  // type values\n  static const int SizeAndClass = 0; // size and class separate in 3-word header\n  static const int Class = 1; // class separate in 2-word header\n\tstatic const int Free  = 2; // free object, rest of header is size\n\tstatic const int Short = 3; // size and class index in 1 word-header\n\nprivate:\n  static char extra_bytes_without_preheader[4]; // extra header bytes by type, threadsafe, Stefan: is read only, 2009-09-06\n  static char extra_bytes_with_preheader[4]; // extra header bytes by type, threadsafe, Stefan: is read only, 2009-09-06\n  static char* extra_bytes() { return extra_bytes_with_preheader; }\n\n  static char extra_oops_without_preheader[4]; // extra header oops by type, threadsafe, Stefan: is read only, 2009-09-06\n  static char extra_oops_with_preheader[4]; // extra header oops by type, threadsafe, Stefan: is read only, 2009-09-06\n  static char* extra_oops() { return extra_oops_with_preheader; }\n\npublic:\n\n  static int extract_from(int32 word) { return word &  Mask; }\n  static int without_type(int32 word) { return word & ~Mask; }\n\n  static int extraHeaderBytes(int header_type) {\n    //Return the number of extra bytes used by the given object's header.\"\n    // Warning: This method should not be used during marking, when the header type bits of an object may be incorrect.\"\n    // works on chunk or Oop\n    return  extra_bytes()[header_type];\n  }\n\n  static int extraHeaderBytes_without_preheader(int header_type) {\n    //Return the number of extra bytes used by the given object's header.\"\n    // Warning: This method should not be used during marking, when the header type bits of an object may be incorrect.\"\n    // works on chunk or Oop\n    return  extra_bytes_without_preheader[header_type];\n  }\n\n  static int extraHeaderOops(int header_type) {\n    return  extra_oops()[header_type];\n  }\n\n  static int extraHeaderOops_without_preheader(int header_type) {\n    return  extra_oops_without_preheader[header_type];\n  }\n\n  static bool contains_sizeHeader(int32 word) { return extract_from(word) == SizeAndClass; }\n  static bool contains_class_and_type_word(int32 word) { return extract_from(word)<= Class; }\n  static bool is_free_object(int32 word) { return extract_from(word) == Free; }\n\n\n};\n\n"
  },
  {
    "path": "vm/src/objects/object.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# include \"headers.h\"\n\n\nbool Object::verify() {\n  verify_address();\n  if (isFreeObject()) {\n    return true;\n  }\n  assert_always(size_t(sizeBits()) >= sizeof(baseHeader));\n  verify_preheader();\n  FOR_EACH_OOP_IN_OBJECT_EXCEPT_CLASS(this, oop_ptr)\n    oop_ptr->verify_oop();\n  if ( contains_class_and_type_word() )\n    get_class_oop().verify_oop();\n  return okayOop();\n}\n\nbool Object::verify_address() {\n  assert_always(my_heap_contains_me() );\n  return true;\n}\n\n\nbool Object::verify_preheader() {\n  return verify_extra_preheader_word() && verify_backpointer();\n}\n\n\nbool Object::verify_backpointer() {\n  Oop x = backpointer();\n  assert_always_msg(   x.as_object_unchecked() == this, \"bad backpointer\");\n  return true;\n}\n\nbool Object::verify_extra_preheader_word() {\n  return  !Extra_Preheader_Word_Experiment || Oop::from_bits(get_extra_preheader_word()).verify_oop();\n}\n\n\nvoid Object::dp() { print(stderr_printer); stderr_printer->nl(); }\n\nvoid Object::print_with_fields() {\n  dp();\n  \n  int i = 1;\n  \n  FOR_EACH_OOP_IN_OBJECT_EXCEPT_CLASS(this, oopp) {\n    stderr_printer->printf(\"\\t[%3d]\\t\", i);\n    oopp->dp();\n    i++;\n  }\n}\n\nvoid Object::print(Printer* p) {\n  if (!my_heap_contains_me()) {\n    p->printf(\"Wild pointer; object not in any heap\");\n    return;\n  }\n  if (this == NULL) {\n    p->printf(\"NULL\");\n    return;\n  }\n  Oop klass = fetchClass();\n  bool is_meta;\n  Oop className = klass.as_object()->name_of_class_or_metaclass(&is_meta);\n  Object_p class_name_obj = className.as_object();\n  Oop n;\n\n  if (class_name_obj->isBytes() && !class_name_obj->isCompiledMethod())\n    ;\n  else {\n    p->printf(\"bad class\");\n    return;\n  }\n  assert(class_name_obj->isBytes() && !class_name_obj->isCompiledMethod());\n\n  if (\n      (class_name_obj->equals_string(\"ByteSymbol\")\n       || class_name_obj->equals_string(\"ByteString\"))\n      && !is_meta) {\n    p->printf(\"#\");\n    print_bytes(p);\n  }\n  else if (class_name_obj->equals_string(\"Float\") && !is_meta) {\n    p->printf(\"%f(float)\", fetchFloatAtinto());\n  }\n  else if (class_name_obj->equals_string(\"LargePositiveInteger\")) {\n    p->printf(\"%lld(LargePositiveInteger)\", The_Squeak_Interpreter()->signed64BitValueOf(this->as_oop()));\n  }\n  else if (class_name_obj->equals_string(\"LargeNegativeInteger\")) {\n    p->printf(\"%lld(LargeNegativeInteger)\", The_Squeak_Interpreter()->signed64BitValueOf(this->as_oop()));\n  }\n  else {\n    p->printf(\"%s \", is_meta ? \"class\" :  is_vowel(class_name_obj->fetchByte(0)) ? \"an\" : \"a\" );\n    class_name_obj->print_bytes(p);\n    if (isBytes() && !isCompiledMethod()) {\n       p->printf(\"  \");\n      if (klass == The_Squeak_Interpreter()->splObj((Special_Indices::ClassByteArray)))\n        print_bytes_in_array(p);\n      else\n        print_bytes(p);\n    }\n  }\n}\n\n\nvoid Object::print_class(Printer* p) {\n  if (this == NULL) {\n    p->printf(\"NULL\");\n    return;\n  }\n  bool is_meta;\n  Oop className = name_of_class_or_metaclass(&is_meta);\n  Object_p class_name_obj = className.as_object();\n  Oop n;\n\n  if (class_name_obj->isBytes() && !class_name_obj->isCompiledMethod())\n    ;\n  else {\n    p->printf(\"bad class\");\n    return;\n  }\n  assert(class_name_obj->isBytes() && !class_name_obj->isCompiledMethod());\n\n\n  p->printf(\"%s\", is_meta ? \"class \" : \"\");\n  class_name_obj->print_bytes(p);\n}\n\nvoid Object::print_bytes(Printer* p) {\n  p->printf(\"%.*s\", lengthOf(), first_byte_address());\n}\n\nvoid Object::print_bytes_in_array(Printer* p ) {\n  p->dittoing_off();\n  for (u_int32 i = 0;  i < lengthOf();  ++i)\n    p->printf(\"0x%x \", (u_char)(first_byte_address()[i]));\n  p->dittoing_on();\n}\n\n\nvoid Object::print_compiled_method(Printer* p) {\n  if (!isCompiledMethod()) fatal(\"not a method\");\n  for (int i = 0;  i < literalCount();  ++i) {\n    p->printf(\"literal %d: \", i);  literal(i).print(p); p->nl();\n  }\n  for (size_t i = 0;  i < byteSize() - sizeof(oop_int_t);  ++i) {\n    u_char* bcp = (u_char*)&first_byte_address()[i];\n    u_char bc = *bcp;\n    p->printf(\"0x%x: byte %d: %d %s\\n\", bcp, i,  bc, Squeak_Interpreter::bytecode_name(bc));\n  }\n  p->nl();\n}\n\n\nOop Object::className() const {\n  return fetchWordLength() <= Object_Indices::Class_Name_Index\n    ?  The_Squeak_Interpreter()->roots.nilObj\n    :  fetchPointer(Object_Indices::Class_Name_Index);\n}\n\nOop Object::name_of_class_or_metaclass(bool* is_meta) const {\n  Oop cn = className();\n  if (!cn.is_mem()  ||  !The_Memory_System()->object_table->probably_contains((void*)cn.bits())  ||  !The_Memory_System()->contains(cn.as_object()))\n    return The_Squeak_Interpreter()->roots.nilObj;\n  return (*is_meta = !(cn.bits() != 0  && cn.isBytes()))\n    ? fetchPointer(Object_Indices::This_Class_Index).as_object()->className()\n    : cn;\n}\n\nOop Object::positive32BitIntegerFor(u_int32 integerValue) {\n  // \"Note - integerValue is interpreted as POSITIVE, eg, as the result of Bitmap>at:, or integer>bitAnd:.\"\n  // Changed test below from integerValue >= 0  to !(integerValue & 0xc0000000 because \n  // value of 0x40000000 when shifted up will yield a negative number -- dmu 6/13/11\n  if (!(integerValue & 0xc0000000)  &&  Oop::isIntegerValue(integerValue))\n    return Oop::from_int(integerValue);\n  Object_p clpi = The_Squeak_Interpreter()->splObj_obj(Special_Indices::ClassLargePositiveInteger);\n  Object_p newLargeInteger =\n    bytesPerWord == 4\n    // \"Faster instantiateSmallClass: currently only works with integral word size.\"\n    ? clpi->instantiateSmallClass(BaseHeaderSize + sizeof(int32))\n      // \"Cant use instantiateSmallClass: due to integral word requirement.\"\n    : clpi->instantiateClass(sizeof(int32));\n\n  newLargeInteger->storeByte( 3, u_char(integerValue >> 24)  &  '\\xff');\n  newLargeInteger->storeByte( 2, u_char(integerValue >> 16)  &  '\\xff');\n  newLargeInteger->storeByte( 1, u_char(integerValue >>  8)  &  '\\xff');\n  newLargeInteger->storeByte( 0, u_char(integerValue      )  &  '\\xff');\n\n  return newLargeInteger->as_oop();\n}\n\n\nOop Object::signed32BitIntegerFor(int32 integerValue) {\n  if (Oop::isIntegerValue(integerValue))\n    return Oop::from_int(integerValue);\n  int32 v = integerValue < 0 ? -integerValue : integerValue;\n  Object_p klass =\n    integerValue < 0\n    ?  The_Squeak_Interpreter()->splObj_obj(Special_Indices::ClassLargeNegativeInteger)\n    :  The_Squeak_Interpreter()->splObj_obj(Special_Indices::ClassLargePositiveInteger);\n  Object_p newLargeInteger = klass->instantiateClass(sizeof(int32));\n\n  newLargeInteger->storeByte( 3, u_char(v >> 24)  &  '\\xff');\n  newLargeInteger->storeByte( 2, u_char(v >> 16)  &  '\\xff');\n  newLargeInteger->storeByte( 1, u_char(v >>  8)  &  '\\xff');\n  newLargeInteger->storeByte( 0, u_char(v      )  &  '\\xff');\n\n  return newLargeInteger->as_oop();\n}\n\n\nOop Object::positive64BitIntegerFor(u_int64 integerValue) {\n  // \"Note - integerValue is interpreted as POSITIVE, eg, as the result of Bitmap>at:, or integer>bitAnd:.\"\n  if (Oop::isIntegerValue(integerValue))\n    return Object::positive32BitIntegerFor(int32(integerValue));\n\n  Object_p clpi = The_Squeak_Interpreter()->splObj_obj(Special_Indices::ClassLargePositiveInteger);\n  Object_p newLargeInteger = clpi->instantiateClass(sizeof(int64));\n\n  newLargeInteger->storeByte( 7, u_char(integerValue >> 56LL)  &  '\\xff');\n  newLargeInteger->storeByte( 6, u_char(integerValue >> 48LL)  &  '\\xff');\n  newLargeInteger->storeByte( 5, u_char(integerValue >> 40LL)  &  '\\xff');\n  newLargeInteger->storeByte( 4, u_char(integerValue >> 32LL)  &  '\\xff');\n  newLargeInteger->storeByte( 3, u_char(integerValue >> 24LL)  &  '\\xff');\n  newLargeInteger->storeByte( 2, u_char(integerValue >> 16LL)  &  '\\xff');\n  newLargeInteger->storeByte( 1, u_char(integerValue >>  8LL)  &  '\\xff');\n  newLargeInteger->storeByte( 0, u_char(integerValue       )  &  '\\xff');\n\n  return newLargeInteger->as_oop();\n}\n\n\nOop Object::signed64BitIntegerFor(int64 integerValue) {\n  if (Oop::isIntegerValue(integerValue))\n    return Oop::from_int(integerValue);\n  if (int64(int32(integerValue)) == integerValue)\n    return signed32BitIntegerFor(int32(integerValue));\n\n  int64 v = integerValue < 0LL ? -integerValue : integerValue;\n  Object_p klass =\n  integerValue < 0LL\n  ?  The_Squeak_Interpreter()->splObj_obj(Special_Indices::ClassLargeNegativeInteger)\n  :  The_Squeak_Interpreter()->splObj_obj(Special_Indices::ClassLargePositiveInteger);\n  Object_p newLargeInteger = klass->instantiateClass(sizeof(int64));\n\n  newLargeInteger->storeByte( 7, u_char(v >> 56LL)  &  '\\xff');\n  newLargeInteger->storeByte( 6, u_char(v >> 48LL)  &  '\\xff');\n  newLargeInteger->storeByte( 5, u_char(v >> 40LL)  &  '\\xff');\n  newLargeInteger->storeByte( 4, u_char(v >> 32LL)  &  '\\xff');\n  newLargeInteger->storeByte( 3, u_char(v >> 24LL)  &  '\\xff');\n  newLargeInteger->storeByte( 2, u_char(v >> 16LL)  &  '\\xff');\n  newLargeInteger->storeByte( 1, u_char(v >>  8LL)  &  '\\xff');\n  newLargeInteger->storeByte( 0, u_char(v      )   &  '\\xff');\n\n  return newLargeInteger->as_oop();\n}\n\n\n/*\tAnswer the number of slots in a class. For example the instanceSizeOf: \n    ClassPoint is 2, for the x & y slots. The instance size of non-pointer\n    classes is 0. */\noop_int_t Object::instanceSizeOfClass() {\n  // STEFAN: this is extracted from below, needs testing!!\n#warning Untested and too many magic numbers here. Please fix!\n\n  oop_int_t classFormat = formatOfClass();\n  oop_int_t sizeHiBits = (classFormat & 0x60000) >> 9;\n  oop_int_t byteSize = (classFormat & (SizeMask | Size4Bit)) | sizeHiBits; // low bits 0\n  return ((byteSize - BaseHeaderSize) >> 2);\n}\n\n\nObject_p Object::instantiateClass(oop_int_t size, Logical_Core* where) {\n    /*\n     \"NOTE: This method supports the backward-compatible split instSize field of the\n     class format word. The sizeHiBits will go away and other shifts change by 2\n     when the split fields get merged in an (incompatible) image change.\"\n     */\n  assert(size >= 0); // size is indexable field count\n\n  // xxxxxx do it on that core instead of remotely? -- dmu\n  // Explanation: This code allocates an object onto another core's heap (if where is passed in).\n  // It might be faster to ask the core that owns the heap to do the allocation, rather than may the\n  // memory penalty. -- dmu 4/09\n\n  Multicore_Object_Heap* h =  The_Memory_System()->heaps[where == NULL  ?  Logical_Core::my_rank()  :  where->rank()][Memory_System::read_write];\n\n  int hash = h->newObjectHash();\n  oop_int_t classFormat = formatOfClass();\n  // low 2 bits are 0\n  oop_int_t header1 = (classFormat & 0x1ff00) | ((hash << HashShift) & HashMask);\n  Oop header2 = as_oop();\n  oop_int_t header3 = 0;\n  oop_int_t cClass = header1 & CompactClassMask;\n  oop_int_t sizeHiBits = (classFormat & 0x60000) >> 9;\n  int byteSize = (classFormat & (SizeMask | Size4Bit)) | sizeHiBits; // low bits 0\n  int format = (classFormat >> 8) & 15;\n\n  if (!Format::has_bytes(format)) {\n    if (format == Format::indexable_word_fields_only) {\n      // long32 bitmaps\n      byteSize += size * sizeof(int32);\n      byteSize = round_up_by_power_of_two(byteSize, sizeof(int32));\n      // XXX if 64bit, must do more here, see ST\n    }\n    else\n      byteSize += size * sizeof(int32); // Arrays and 64-bit bitmaps\n  }\n  else {\n    // strings and methods\n    byteSize += round_up_by_power_of_two(size, sizeof(int32));\n    // redo next bit for 64 XXX\n    // size info goes in format field\n    // how many bytes true size is less than format\n    // see lengthOf\n    header1 |= ((byteSize - size)  &  (sizeof(int32)-1))   <<   FormatShift;\n  }\n  if (byteSize > 255) // need size header\n    header3 = byteSize;\n  else\n    header1 |= byteSize;\n  int hdrSize = header3 > 0  ?  3  :    cClass == 0  ?  2  :  1;\n\n  return h->allocate(byteSize, hdrSize, header1, header2, header3, true, Format::has_only_oops(format));\n}\n\n\nbool Object::okayOop() {\n  // \"Verify that the given oop is legitimate. Check address, header, and size but not class.\"\n\n  // address and size checks\n  Abstract_Object_Heap* h = my_heap();\n  bool ok = h->contains(this)  &&  h->contains(&as_char_p()[sizeBits()-1]);\n\n  assert_always_msg( ok, \"oop not in heap or size would extend beyond end of memory\");\n\n  // header type checks\n  switch(headerType()) {\n      default: fatal(\"illegal header type\");\n      case Header_Type::Free:  fatal(\"oop is a free chunk, not an object\");\n\n      case Header_Type::Short:\n        if ( compact_class_index() == 0 ) {\n            lprintf(\"found zero compact class field in short header: Oop 0x%x, Object_p 0x%x\\n\",\n                    as_oop().bits(), this);\n            fatal(\"cannot have zero compact class field in a short header\");\n        }\n        break;\n\n    case Header_Type::SizeAndClass:\n        assert_always_msg( h->contains(&sizeHeader()),\n                          \"size header is before start\");\n        assert_always_msg( Header_Type::extract_from(sizeHeader()) == headerType(), \"size header has wrong type\");\n\n      // fall through\n      case Header_Type::Class:\n        assert_always_msg(  h->contains(&class_and_type_word()), \"class header word is before start\");\n        assert_always_msg( Header_Type::extract_from(class_and_type_word()) == headerType(), \"class header word has wrong type\" );\n        break;\n  }\n\n\t// \"format check\"\n  assert_always_msg( Format::is_valid(format()), \"oop has unknown format type\");\n\n\t/*\n   \"mark and root bit checks\"\n\tunusedBit := 16r20000000.\n\tbytesPerWord = 8\nifTrue:\n  [unusedBit := unusedBit << 16.\n   unusedBit := unusedBit << 16].\n\t((self longAt: oop) bitAnd: unusedBit) = 0\nifFalse: [ self error: 'unused header bit 30 is set; should be zero' ].\n  \"xxx_dmu\n\t((self longAt: oop) bitAnd: MarkBit) = 0\n  ifFalse: [ self error: 'mark bit should not be set except during GC' ].\n  xxx_dmu\"\n\t(((self longAt: oop) bitAnd: RootBit) = 1 and:\n\t [oop >= youngStart])\nifTrue: [ self error: 'root bit is set in a young object' ].\n   */\n   return true;\n}\n\nbool Object::hasOkayClass() {\n  // \"Attempt to verify that the given oop has a reasonable behavior. The class must be a valid, non-integer oop and must not be nilObj. It must be a pointers object with three or more fields. Finally, the instance specification field of the behavior must match that of the instance.\"\n  okayOop();\n  Oop klass_oop = fetchClass();\n  assert_always_msg(klass_oop.is_mem(), \"a SmallInteger is not a valid class or behavior\");\n  Object_p klass = klass_oop.as_object();\n  klass->okayOop();\n  assert_always(klass->isPointers());\n  assert_always_msg(klass->lengthOf() >= 3,\n                    \"a class (behavior) must be a pointers object of size >= 3\");\n  oop_int_t formatMask = isBytes() ? 0xc00 /* ignore extra bytes size bits */ : 0xf00;\n  oop_int_t behaviorFormatBits = klass->formatOfClass() & formatMask;\n  oop_int_t oopFormatBits = baseHeader & formatMask;\n  assert_always_msg(behaviorFormatBits == oopFormatBits,\n                    \"object and its class (behavior) formats differ'\");\n  return true;\n}\n\n\n\n\n// ObjectMemory object enumeration\n\nOop* Object::last_pointer_addr() const {\n  return (Oop*)&as_char_p()[lastPointer()];\n}\n\nOop* Object::last_strong_pointer_addr() const {\n  return &as_oop_p()[nonWeakFieldsOf()];\n}\n\nOop* Object::last_strong_pointer_addr_remembering_weak_roots(Abstract_Mark_Sweep_Collector *gc) {\n  return  isWeak()  &&  gc->add_weakRoot(as_oop())  ?  last_strong_pointer_addr()  :  last_pointer_addr();\n}\n\n// ObjectMemory intialization\n\n\nvoid Object::do_all_oops_of_object(Oop_Closure* oc, bool do_checks) {\n  if (isFreeObject())\n    return;\n  \n  FOR_EACH_OOP_IN_OBJECT_EXCEPT_CLASS(this, oopp) {\n    if (do_checks)\n      my_heap()->contains(oopp);\n    oc->value(oopp, (Object_p)this);\n  }\n  if (contains_class_and_type_word()) {\n    Oop c = get_class_oop();\n    Oop new_c = c;\n    oc->value(&new_c, (Object_p)this);\n    if (new_c != c)\n      set_class_oop(new_c);\n  }\n  if (Extra_Preheader_Word_Experiment)\n    oc->value((Oop*)extra_preheader_word(), (Object_p)this);\n}\n\n\nvoid Object::do_all_oops_of_object_for_reading_snapshot(Squeak_Image_Reader* r) {\n  if (isFreeObject())\n    return;\n  \n  FOR_EACH_OOP_IN_OBJECT_EXCEPT_CLASS(this, oopp) {\n    Oop x = *oopp;\n    if (x.is_mem()) {\n      Oop contents = r->oop_for_oop(x);\n      IMAGE_READING_DEBUG_STORE_CHECK(oopp, contents); \n      *oopp = contents;\n    }\n  }\n  if (contains_class_and_type_word()) {\n    Oop c = get_class_oop();\n    set_class_oop_no_barrier(r->oop_for_oop(c));\n  }\n}\n\n\nvoid Object::do_all_oops_of_object_for_marking(Abstract_Mark_Sweep_Collector* gc, bool do_checks) {\n  FOR_EACH_STRONG_OOP_IN_OBJECT_EXCEPT_CLASS_RECORDING_WEAK_ROOTS(this, oopp, gc) {\n    if (do_checks)\n      my_heap()->contains(oopp);\n    gc->mark(oopp);\n  }\n  if (contains_class_and_type_word()) {\n    Oop c = get_class_oop();\n    gc->mark(&c);\n  }\n  if (Extra_Preheader_Word_Experiment)\n    gc->mark((Oop*)extra_preheader_word());\n}\n\n\n\n\n// ObjectMemory allocation\nOop Object::clone() {\n  // Return a shallow copy, may GC\n  int extraHdrBytes = extra_header_bytes();\n  int32 bytes = sizeBits() + extraHdrBytes;\n\n  // alloc space, remap in case of GC\n  The_Squeak_Interpreter()->pushRemappableOop(as_oop());\n  // is it safe?\n  Logical_Core* c = The_Memory_System()->coreWithSufficientSpaceToAllocate( 2500 + bytes, Memory_System::read_write);\n  if ( c == NULL) {\n    The_Squeak_Interpreter()->popRemappableOop();\n    return Oop::from_int(0);\n  }\n  Multicore_Object_Heap* h = The_Memory_System()->heaps[c->rank()][Memory_System::read_write];\n  \n  // Follow the pattern in Multicore_Object_Heap::allocate -- dmu & sm:\n  \n  Oop* newChunk = (Oop*)h->allocateChunk_for_a_new_object_and_safepoint_if_needed(bytes);\n  Safepoint_Ability sa(false); // from here on, no GCs!\n\n\n  Oop remappedOop = The_Squeak_Interpreter()->popRemappableOop();\n  Object_p remappedObject = remappedOop.as_object(); // GC may have moved it; cannot use THIS in rest of method\n  Object_p newObj = (Object_p)(Object*) ((char*)newChunk + extraHdrBytes);\n\n  // copy old to new incl all header words, fix backpointer later, might include extra header words\n  The_Memory_System()->store_bytes_enforcing_coherence(\n                               newChunk, // dst\n                               remappedObject->my_chunk(), // src\n                               bytes,\n                               newObj); // n bytes\n\n  // fix base header: compute new hash and clear Mark and Root bits\n  oop_int_t hash = h->newObjectHash(); // even though newChunk may be in global heap\n  The_Memory_System()->store_enforcing_coherence(&newObj->baseHeader,\n                                              (newObj->baseHeader & (Header_Type::Mask | SizeMask | CompactClassMask | FormatMask))\n                                              |   ((hash << HashShift) & HashMask),\n                                              newObj);\n\n  The_Memory_System()->object_table->allocate_oop_and_set_preheader(newObj, Logical_Core::my_rank()  COMMA_TRUE_OR_NOTHING);\n  \n# if Extra_Preheader_Word_Experiment\n  oop_int_t ew = remappedObject->get_extra_preheader_word();\n  assert_always(ew && (!Oop::from_bits(ew).is_int()  ||  ew == Oop::from_int(0).bits())); // bug hunt\n  newObj->set_extra_preheader_word(ew);\n# endif\n  \n  // newObj->beRootIfOld();\n  \n  return newObj->as_oop();\n}\n\n\nObject_p Object::process_list_for_priority_of_process() {\n  int priority = priority_of_process();\n  Object_p processLists = The_Squeak_Interpreter()->process_lists_of_scheduler();\n  assert(priority - 1  <=  processLists->fetchWordLength());\n  return processLists->fetchPointer(priority - 1).as_object();\n}\n\n// Save on given list for priority\nvoid Object::add_process_to_scheduler_list() {\n  process_list_for_priority_of_process()->addLastLinkToList(as_oop());\n}\n\n\nOop Object::get_suspended_context_of_process_and_mark_running() {\n  assert(Scheduler_Mutex::is_held());\n  Oop ctx = fetchPointer(Object_Indices::SuspendedContextIndex);\n  assert(ctx != The_Squeak_Interpreter()->roots.nilObj);\n  if (Print_Scheduler_Verbose) {\n    debug_printer->printf(\"scheduler: on %d get_suspended_context_of_process_and_mark_running \", Logical_Core::my_rank());\n    this->print_process_or_nil(debug_printer);\n    debug_printer->printf(\" to nil\");\n    debug_printer->nl();\n  }\n\n  storePointer(Object_Indices::SuspendedContextIndex, The_Squeak_Interpreter()->roots.nilObj);\n  store_host_core_of_process(Logical_Core::my_rank());\n  return ctx;\n}\n\nvoid Object::set_suspended_context_of_process(Oop ctx) {\n  assert(Scheduler_Mutex::is_held());\n  assert(ctx != fetchPointer(Object_Indices::SuspendedContextIndex));\n  assert(is_process_running());\n  if (Print_Scheduler_Verbose) {\n    debug_printer->printf(\"scheduler: on %d set_suspended_context_of_process \", Logical_Core::my_rank());\n    this->print_process_or_nil(debug_printer);\n    debug_printer->printf(\" to \");\n    ctx.print(debug_printer);\n    debug_printer->nl();\n  }\n  storePointer(Object_Indices::SuspendedContextIndex, ctx);\n  store_host_core_of_process(-1);\n}\n\nint Object::priority_of_process_or_nil() {\n  return (this == (Object*)The_Squeak_Interpreter()->roots.nilObj.as_object()) ? -1 : priority_of_process();\n}\n\nbool Object::is_process_running() {\n  return fetchPointer(Object_Indices::SuspendedContextIndex) == The_Squeak_Interpreter()->roots.nilObj;\n}\n\n\n\n\nbool Object::is_process_allowed_to_run_on_this_core() {\n  int acm = The_Process_Field_Locator.index_of_process_inst_var(Process_Field_Locator::coreMask);\n  if (acm < 0) return true;\n\n  The_Squeak_Interpreter()->successFlag = true;\n  u_int64 mask = The_Squeak_Interpreter()->positive64BitValueOf(fetchPointer(acm));\n  if (!The_Squeak_Interpreter()->successFlag) {\n    The_Squeak_Interpreter()->successFlag = true;\n    return true;\n  }\n  \n  bool r =  ((1LL << Logical_Core::my_rank()) & mask) ? true : false;\n  return r;\n}\n\nvoid Object::store_host_core_of_process(int r) {\n  int hc = The_Process_Field_Locator.index_of_process_inst_var(Process_Field_Locator::hostCore);\n  if (hc < 0) return;\n  storeIntegerUnchecked(hc, r);\n}\n\nvoid Object::store_allowable_cores_of_process(u_int64 bitMask) {\n  int acm = The_Process_Field_Locator.index_of_process_inst_var(Process_Field_Locator::coreMask);\n  if (acm < 0) return;\n  storePointer(acm, positive64BitIntegerFor(bitMask));\n}\n\nvoid Object::kvetch_nil_list_of_process(const char* why) {\n  if (my_list_of_process() == The_Squeak_Interpreter()->roots.nilObj ) {\n    static int kvetch_count = 10;\n    if (kvetch_count) {\n      lprintf(\"WARNING: image has not been modified to allow dynamic priority changes; cannot nil out myList before calling remove_process_from_scheduler_list(%s)\\n\", why);\n      --kvetch_count;\n    }\n  }\n}\n\n// Returns list if any process was on\n\nOop Object::remove_process_from_scheduler_list(const char* why) {\n  Scheduler_Mutex sm(\"remove_process_from_scheduler_list\");\n\n  Oop processListOop = my_list_of_process();\n  Object_p processList =  \n    processListOop == The_Squeak_Interpreter()->roots.nilObj  \n      ? process_list_for_priority_of_process() \n      : processListOop.as_object();\n\n  if (processList->isEmptyList()) {\n    static const bool tolerate_stock_images = true; // Running process not in scheduler list\n    if (tolerate_stock_images  &&  Logical_Core::group_size == 1  &&  !The_Squeak_Interpreter()->primitiveThisProcess_was_called())\n      return The_Squeak_Interpreter()->roots.nilObj;\n    // Next statement may fail if halfway through converting image for RVM -- dmu 6/10\n    // if (check_assertions) { lprintf(\"not in empty list: %s\\n\", why); fatal(\"not in list\"); }\n    return The_Squeak_Interpreter()->roots.nilObj;\n  }\n  Oop  first_proc = processList->fetchPointer(Object_Indices::FirstLinkIndex);\n  Oop   last_proc = processList->fetchPointer(Object_Indices:: LastLinkIndex);\n\n  Oop        proc = first_proc;\n  Object_p proc_obj = proc.as_object();\n  Object_p prior_proc_obj  = (Object_p)NULL;\n\n  while (proc_obj != this) {\n    prior_proc_obj = proc_obj;\n    proc = proc_obj->fetchPointer(Object_Indices::NextLinkIndex);\n    if (proc == The_Squeak_Interpreter()->roots.nilObj) {\n      kvetch_nil_list_of_process(why);\n      // normal with suspend change lprintf( \"WARNING: process not found in list\");\n      nil_out_my_list_and_next_link_fields_of_process();\n      return The_Squeak_Interpreter()->roots.nilObj;\n    }\n    proc_obj = proc.as_object();\n  }\n  \n  kvetch_nil_list_of_process(why);\n\n  if (first_proc == proc)\n    processList->removeFirstLinkOfList();\n\n  else if (last_proc == proc)\n    processList->removeLastLinkOfList(prior_proc_obj);\n\n  else\n    processList->removeMiddleLinkOfList(prior_proc_obj, proc_obj);\n  \n  return processList->as_oop();\n}\n\n\nOop Object::removeFirstLinkOfList() {\n  // rm first process\n  const int fl = Object_Indices::FirstLinkIndex;\n  const int ll = Object_Indices:: LastLinkIndex;\n  const int nl = Object_Indices:: NextLinkIndex;\n  Oop nil = The_Squeak_Interpreter()->roots.nilObj;\n\n  Oop first = fetchPointer(fl);  Oop last  = fetchPointer(ll);\n  Object_p fo = first.as_object();\n  if (first == last) {\n    storePointer(fl, nil);\n    storePointer(ll, nil);\n  }\n  else\n    storePointer(fl, fo->fetchPointer(nl));\n  fo->nil_out_my_list_and_next_link_fields_of_process();\n  return first;\n}\n\nOop  Object::removeLastLinkOfList(Object_p penultimate) {\n  const int nl = Object_Indices::NextLinkIndex;\n  Oop nil = The_Squeak_Interpreter()->roots.nilObj;\n  Oop last = fetchPointer(Object_Indices::LastLinkIndex);\n  storePointer(Object_Indices::LastLinkIndex, penultimate->as_oop());\n  penultimate->storePointer(nl, nil);\n  assert(last.as_object()->fetchPointer(nl) == nil);\n  last.as_object()->nil_out_my_list_and_next_link_fields_of_process();\n  return last;\n}\n\nOop Object::removeMiddleLinkOfList(Object_p prior, Object_p mid) {\n  const int nl = Object_Indices::NextLinkIndex;\n  prior->storePointer(nl, mid->fetchPointer(nl));\n  mid->nil_out_my_list_and_next_link_fields_of_process();\n  return mid->as_oop();\n}\n\nvoid Object::addLastLinkToList(Oop aProcess) {\n  // Add given proc to linked list receiver, set backpointer\n  if (isEmptyList())\n    storePointer(Object_Indices::FirstLinkIndex, aProcess);\n  else\n    fetchPointer(Object_Indices::LastLinkIndex).as_object()->storePointer(Object_Indices::NextLinkIndex, aProcess);\n\n  storePointer(Object_Indices::LastLinkIndex, aProcess);\n  aProcess.as_object()->storePointer(Object_Indices::MyListIndex, as_oop());\n}\n\n\nvoid Object::nil_out_my_list_and_next_link_fields_of_process() {\n  Oop nil = The_Squeak_Interpreter()->roots.nilObj;\n  storePointer(Object_Indices::  MyListIndex, nil);\n  storePointer(Object_Indices::NextLinkIndex, nil);\n}\n\nbool Object::isEmptyList() {\n  Oop first = fetchPointer(Object_Indices::FirstLinkIndex);\n  assert(first.bits() != 0);\n  return first == The_Squeak_Interpreter()->roots.nilObj;\n}\n\n\nvoid Object::print_process_or_nil(Printer* p, bool print_stack) {\n  Oop my_oop = as_oop();\n  if (my_oop == The_Squeak_Interpreter()->roots.nilObj) {\n    p->printf(\"nil\");\n    return;\n  }\n  print(p);\n  \n  p->printf(\"(0x%x, hash %d, pri %d, %s, \", as_oop().bits(), hashBits(), priority_of_process(), is_process_running() ? \"running\" : \"not running\");\n\n  if (Print_Scheduler_Verbose) {\n    p->printf(\"myList: \");    my_list_of_process().print(p);  p->printf(\", \");\n    p->printf(\"nextLink: \");  fetchPointer(Object_Indices::NextLinkIndex).print(p);  p->printf(\", \");\n  }\n  \n  Oop name = name_of_process();\n  if (name != The_Squeak_Interpreter()->roots.nilObj) {\n    p->printf(\"name: \"); name.as_object()->print_bytes(p); p->printf(\"0x%x  \", name.as_object()->first_byte_address());\n    //if (strncasecmp(name.as_object()->first_byte_address(), \"ScreenController\", 16) == 0) {\n    //  print_stack = true;\n    //}    \n  }\n\n  int core = Object::core_where_process_is_running();\n\n  if (core != -1)  p->printf(\"running on %d, \", core);\n  p->printf(\")\");\n  \n  if (print_stack) {\n    p->nl();\n    The_Squeak_Interpreter()->print_stack_trace(p, (Object_p)this);\n    p->nl();\n  }\n}\n\n\nbool Object::verify_process() {\n  assert_always(my_list_of_process().is_mem());\n  Oop& p = pointer_at(Object_Indices::NextLinkIndex);\n  assert_always(p.is_mem());\n  return true;\n}\n\n\nvoid Object::print_frame(Printer* p) {\n  Oop sender = fetchPointer(Object_Indices::SenderIndex);\n  int sp = fetchInteger(Object_Indices::StackPointerIndex);\n\n  Object_p home = home_of_block_or_method_context();\n  Oop method = home->fetchPointer(Object_Indices::MethodIndex);\n  bool is_block = is_this_context_a_block_context();\n  if (method.bits() == 0) {\n    p->printf(\"method oop is zero\\n\");\n    return;\n  }\n  Object_p mo = method.is_mem() ? method.as_object() : (Object_p)NULL;\n\n  Oop rcvr = home->fetchPointer(Object_Indices::ReceiverIndex);\n  Object_p klass = rcvr.fetchClass().as_object();\n\n\n  Oop* stack = &as_oop_p()[Object_Indices::ContextFixedSizePlusHeader];\n  int ip = mo == NULL ? -17 :\n    fetchInteger(Object_Indices::InstructionPointerIndex)\n      - ((Object_Indices::LiteralStart + mo->literalCount() * bytesPerWord) + 1);\n\n  p->printf(\"0x%x, ip %3d, sp %2d:  \", this, ip, sp);\n\n\n  Oop sel, mclass;\n  bool have_sel_and_mclass = klass->selector_and_class_of_method_in_me_or_ancestors(method, &sel, &mclass);\n\n  if (have_sel_and_mclass) {\n    if (mclass == The_Squeak_Interpreter()->roots.nilObj)\n      mclass = rcvr.fetchClass();\n\n    p->printf(\" \"); rcvr.print(p);\n    if (rcvr.is_mem()) p->printf(\"<0x%x>\", rcvr.as_untracked_object_ptr());\n    if (mclass.as_object() != klass) {\n      p->printf(\"(\");\n      bool is_meta;\n      Oop mclassName = mclass.as_object()->name_of_class_or_metaclass(&is_meta);\n      if (is_meta) p->printf(\"class \");\n      mclassName.as_object()->print_bytes(p);\n      p->printf(\")\");\n    }\n    p->printf(\" \");\n\n    p->printf(\">>   \");\n    if (sel.is_int()) p->printf(\"bad sel\");\n    else if (sel != The_Squeak_Interpreter()->roots.nilObj) {\n      sel.as_object()->print_bytes(p);\n    }\n  }\n  p->printf(is_block ? \" [] \" : \"    \");\n\n  p->printf(\"  \");\n  for (int i = 0; i < sp;  ++i) {\n    stack[i].print(p);\n    if (i < sp-1) p->printf(\", \");\n  }\n  p->nl();\n  // int blockArgCount = method.integerValue();\n}\n\n\nbool Object::selector_and_class_of_method_in_me_or_ancestors(Oop method, Oop* selp, Oop* classp) {\n  if (!method.is_mem())  {\n    lprintf( \"selector_and_class_of_method_in_me_or_ancestors: method 0x%x is an int\\n\", method.bits());\n    return false;\n  }\n  Object_p mo = method.as_object();\n  if (!The_Memory_System()->contains(mo)) {\n    lprintf( \"selector_and_class_of_method_in_me_or_ancestors: method 0x%x is not in heap\\n\", (Object*)mo);\n    return false;\n  }\n  Oop    methodDictOop = fetchPointer(Object_Indices::MessageDictionaryIndex);\n  if (!methodDictOop.is_mem()) {\n    lprintf( \"selector_and_class_of_method_in_me_or_ancestors: methodDictOop 0x%x is an int\\n\", methodDictOop.bits());\n    return false;\n  }\n  Object_p methodDict = methodDictOop.as_object();\n  if (!The_Memory_System()->contains(methodDict)) {\n    lprintf( \"selector_and_class_of_method_in_me_or_ancestors: methodDict 0x%x is not in heap\\n\", (Object*)methodDict);\n    return false;\n  }\n  Oop sel = methodDict->key_at_identity_value(method);\n  if (sel.bits() != Oop::Illegals::uninitialized) {\n    *selp = sel;\n    *classp = as_oop();\n    return true;\n  }\n  Oop superclass = fetchPointer(Object_Indices::SuperclassIndex);\n  if (superclass == The_Squeak_Interpreter()->roots.nilObj) {\n    static bool warned = false; // Stefan: is set only once, thus it is threadsafe\n    if (!warned) {\n      warned = true;\n      lprintf( \"selector_and_class_of_method_in_me_or_ancestors: did not find method 0x%x in class 0x%x\\n\",\n              (Object*)mo,  this);\n    }\n    return false;\n  }\n  return superclass.as_object()->selector_and_class_of_method_in_me_or_ancestors(method, selp, classp);\n}\n\n\nOop Object::key_at_identity_value(Oop val) {\n  if (!isPointers())\n    lprintf(\"key_at_identity_value: this is pointers 0x%x\\n\", this);\n\n  else {\n\n    Oop methodsOop = fetchPointer(Object_Indices::MethodArrayIndex);\n    if (!methodsOop.isPointers())\n      lprintf(\"key_at_identity_value: methodsOop is not pointers 0x%x\\n\", methodsOop.bits());\n\n    else {\n      Object_p methods = methodsOop.as_object();\n      int length = fetchWordLength() - Object_Indices::SelectorStart;\n      for (int index = 0;  index < length;  ++index)\n        if (methods->fetchPointer(index) == val)\n          return fetchPointer(index + Object_Indices::SelectorStart);\n    }\n  }\n\n  return Oop::from_bits(Oop::Illegals::uninitialized);\n}\n\n\n\nObject_p Object::makePoint(oop_int_t x, oop_int_t y) {\n  Object_p pt = The_Squeak_Interpreter()->splObj_obj(Special_Indices::ClassPoint)->instantiateSmallClass(3 * bytesPerWord);\n  pt->storeIntegerUnchecked(Object_Indices::XIndex, x);\n  pt->storeIntegerUnchecked(Object_Indices::YIndex, y);\n  return pt;\n}\n\nObject_p Object::makeString(const char* str) {\n  return makeString(str, strlen(str));\n}\n\nObject_p Object::makeString(const char* str, int n) {\n  Object_p r = The_Squeak_Interpreter()->classString()->instantiateClass(n);\n  The_Memory_System()->store_bytes_enforcing_coherence(r->as_char_p() + Object::BaseHeaderSize, str, n, r); // dst src n\n  return r;\n}\n\n\nvoid Object::move_to_heap(int r, int rw_or_rm, bool do_sync) {\n  if (The_Memory_System()->rank_for_address(this) == r\n  &&  The_Memory_System()->mutability_for_address(this) == rw_or_rm)\n    return;\n\n  int ehb = extra_header_bytes();\n  int bnc = bytes_to_next_chunk();\n  Multicore_Object_Heap* h = The_Memory_System()->heaps[r][rw_or_rm];\n\n  assert_always(rw_or_rm == Memory_System::read_write  ||  is_suitable_for_replication());\n\n  Safepoint_for_moving_objects sf(\"move_to_heap\");\n  Safepoint_Ability sa(false);\n\n  Oop oop = as_oop();\n  if (do_sync) {\n    The_Squeak_Interpreter()->preGCAction_everywhere(false);  // false because caches are oop-based, and we just move objs\n    flushFreeContextsMessage_class().send_to_all_cores(); // might move a free context, then it would not be in right place\n  }\n\n\n  The_Squeak_Interpreter()->pushRemappableOop(oop);\n\n  Chunk* dst_chunk = h->allocateChunk(ehb + bnc);\n  oop = The_Squeak_Interpreter()->popRemappableOop();\n  char* src_chunk = as_char_p() - ehb;\n  \n  Object_p new_obj = (Object_p)(Object*) (((char*)dst_chunk) + ehb);\n\n  h->enforce_coherence_before_store(dst_chunk, ehb + bnc);\n  DEBUG_MULTIMOVE_CHECK(dst_chunk, src_chunk, (ehb + bnc) / bytes_per_oop );\n  bcopy(src_chunk, dst_chunk, ehb + bnc);\n  \n  // update the oop entry in the OT and set backpointer\n  // setting the backpointer is redundant but this routine does the safepoint\n  new_obj->set_object_address_and_backpointer(oop  COMMA_TRUE_OR_NOTHING);\n  // this is also redundant, depending on the logic behind set_extra_preheader_word\n  if (Extra_Preheader_Word_Experiment)\n    new_obj->set_extra_preheader_word(get_extra_preheader_word());\n  \n  h->enforce_coherence_after_store(dst_chunk, ehb + bnc);\n\n  ((Chunk*)src_chunk)->make_free_object(ehb + bnc, 2); // without this GC screws up\n\n  if (do_sync) The_Squeak_Interpreter()->postGCAction_everywhere(false);\n}\n\n\nvoid Object::test() { assert_always(sizeof(Object) == 4); }\n\nint Object::core_where_process_is_running() {\n  if (!Track_Processes) fatal(\"Track_Processes must be set\");\n  Oop my_oop = as_oop();\n  int running_where = -1;\n  FOR_ALL_RANKS(i) {\n    if (my_oop == The_Squeak_Interpreter()->running_process_by_core[i]) {\n      if (running_where != -1) {\n        error_printer->printf(\"ERROR: process pri %d running on two cores: %d and %d: \",\n                              priority_of_process_or_nil(), running_where, i);\n\n      }\n      else\n        running_where = i;\n    }\n  }\n  return running_where;\n}\n\n\n\n// xxxxxx factor all places that IP is calculated someday -- dmu\n// Explanation: The original interpreter does a lot of adding/subtracting to get the instruction pointer from the\n// method address. I have partially but not completely factored this. -- dmu 4/09\nu_char* Object::next_bc_to_execute_of_context() {\n  /*\n   \"the instruction pointer is a pointer variable equal to\n   method oop + ip + BaseHeaderSize\n   -1 for 0-based addressing of fetchByte\"\n   */\n  Object_p meth = home_of_block_or_method_context()->fetchPointer(Object_Indices::MethodIndex).as_object();\n  oop_int_t ip_int = quickFetchInteger(Object_Indices::InstructionPointerIndex);\n  return meth->as_u_char_p() + ip_int + Object::BaseHeaderSize - 1;\n}\n\n\nvoid Object::check_all_IPs_in_chain() {\n  if (as_oop() == The_Squeak_Interpreter()->roots.nilObj) return;\n  check_IP_in_context();\n  fetchPointer(Object_Indices::SenderIndex).as_object()->check_all_IPs_in_chain();\n}\n\nvoid Object::check_IP_in_context() {\n# if Extra_OTE_Words_for_Debugging_Block_Context_Method_Change_Bug\n  Object* meth = home_of_block_or_method_context()->fetchPointer(Object_Indices::MethodIndex).as_object();\n  u_char* my_ip = next_bc_to_execute_of_context();\n  meth->check_IP_of_method(my_ip, this);\n# endif\n}\n\n\nvoid Object::check_IP_of_method(u_char* bcp, Object_p ctx) {\n  if (!isCompiledMethod()) fatal(\"check_method_is_correct: not a method\");\n\n  u_char* first_bc = (u_char*)first_byte_address();\n  u_char* past_bc =  (u_char*)nextChunk();\n\n  if (bcp < first_bc) {\n    lprintf(\"bcp 0x%x < first_bc 0x%x:  past_bc 0x%x, method header 0x%x, at 0x%x, sizeBits: 0x%x, isBlock %d, ctx obj 0x%x\\n\",\n            bcp, first_bc, past_bc, *as_oop_int_p(), this, sizeBits(), !ctx->isMethodContext(), (Object*)ctx);\n    fatal(\"bcp < first_bc\");\n  }\n  if (past_bc < bcp) {\n    Oop orig_meth = ctx->get_orig_block_method();\n    Oop curr_meth = as_oop();\n    Object* orig_home = ctx->get_orig_block_home();\n    Oop curr_home = ctx->fetchPointer(Object_Indices::HomeIndex);\n    lprintf(\"past_bc 0x%x < bcp 0x%x:  first_bc 0x%x, method header 0x%x, at 0x%x, sizeBits: 00x%x, isBlock %d, ctx 0x%x, %s %s\\n\",\n            past_bc, bcp, first_bc, *as_oop_int_p(), this, sizeBits(), !ctx->isMethodContext(), (Object*)ctx,\n            orig_meth == curr_meth ? \"method same\" : \"method changed\",\n            orig_home == curr_home.as_untracked_object_ptr() ? \"home OBJ same\" : \"home OBJ changed\");\n\n    lprintf(\"home 0x%x, orig_method 0x%x, curr_method 0x%x\\n\",\n            curr_home.bits(), orig_meth.bits(), curr_meth.bits());\n\n    debug_printer->printf(\"orig_method: \");\n    orig_meth.as_object()->print_compiled_method(debug_printer);\n    debug_printer->nl();\n\n    debug_printer->printf(\"curr_method: \");\n    curr_meth.as_object()->print_compiled_method(debug_printer);\n    debug_printer->nl();\n\n    assert_always(curr_meth.as_object() == this);\n\n    fatal(\"past_bc < bcp\");\n  }\n\n}\n\nvoid Object::cleanup_session_ID_and_ext_prim_index_of_external_primitive_literal() {\n  storeIntegerUnchecked(Object_Indices::EPL_Session_ID,                                                           0);\n  storeIntegerUnchecked(Object_Indices::EPL_External_Primitive_Table_Index, Abstract_Primitive_Table::lookup_needed);\n}\n\nObject_p Object::get_external_primitive_literal_of_method() {\n  if (literalCount() <= Object_Indices::External_Primitive_Literal_Index)  return (Object_p)NULL;\n  Oop lit = literal(Object_Indices::External_Primitive_Literal_Index);\n  if (!lit.is_mem()) return (Object_p)NULL;\n  Object_p lo = lit.as_object();\n  return lo->isArray()  &&  lo->lengthOf() == u_oop_int_t(Object_Indices::EPL_Length)  ?  lo  :  (Object_p)NULL;\n}\n\n\noop_int_t Object::nonWeakFieldsOf() const {\n  /*\n\n  \"Return the number of non-weak fields in oop (i.e. the number of fixed fields).\n   Note: The following is copied from fixedFieldsOf:format:length: since we do know\n   the format of the oop (e.g. format = 4) and thus don't need the length.\"\n   | class classFormat |\n   self inline: false. \"No need to inline - we won't call this often\"\n\n   (self isWeakNonInt: oop) ifFalse:[self error:'Called fixedFieldsOfWeak: with a non-weak oop'].\n\n   \"fmt = 3 or 4: mixture of fixed and indexable fields, so must look at class format word\"\n   class := self fetchClassOf: oop.\n   classFormat := self formatOfClass: class.\n   ^ (classFormat >> 11 bitAnd: 16rC0) + (classFormat >> 2 bitAnd: 16r3F) - 1\n*/\n\n  assert_always(isWeak());\n\n  return ClassFormat::fixedFields(fetchClass().as_object()->formatOfClass());\n}\n\n\nvoid Object::weakFinalizerCheckOf() {\n  /* \"Our oop has at least 2 non-weak fixed slots (this is assured before entering this method, in\n   #finalizeReference:.\n   We are assuming that if its first non-weak field is an instance of WeakFinalizer class,\n   then we should add this oop to that list, by storing it to list's first field and\n   also, updating the oop's 2nd fixed slot to point to the value which we overridden:\n  */\n  Oop list = fetchPointer(0);\n  Oop listClass = list.fetchClass();\n  if (listClass == The_Squeak_Interpreter()->splObj(Special_Indices::ClassWeakFinalizer)) {\n    Object_p list_obj = list.as_object();\n    Oop first = list_obj->fetchPointer(0);\n    storePointer(1, first);\n    list_obj->storePointer(0, as_oop());\n  }\n}\n\n\nint Object::instance_variable_names_index_of_class(const char* some_instance_variable_name) {\n  static int cached_index = -1;\n  if (cached_index >= 0) return cached_index;\n \n  for (Oop* oopp = as_oop_p();  oopp <= last_pointer_addr();  ++oopp) {\n\n    int index = oopp - as_oop_p() - BaseHeaderSize/sizeof(Oop);\n    Oop oop = *oopp;\n    if (!oop.isArray())\n      continue;\n    Object_p array_obj = oop.as_object();\n    int n = array_obj->fetchWordLength();\n    bool found_var_name = false;\n    bool found_non_string = false;\n    for (int i = 0;  i < n;  ++i)  { \n      Oop contents = array_obj->fetchPointer(i);\n      if (!contents.isBytes()  ||  contents.isContext())\n        found_non_string = true;\n      else if (contents.as_object()->equals_string(some_instance_variable_name))\n        found_var_name = true;\n    }\n    if (found_var_name  &&  !found_non_string)\n      return cached_index = index;\n  }\n  fatal(\"could not find instance variable name array in a class\");\n  return -1;\n}\n\n\n\nint Object::index_of_string_in_array(const char* aString) {\n  for (int i = 0, n = fetchWordLength();  i < n;  ++i)\n    if (fetchPointer(i).as_object()->equals_string(aString))\n      return i;\n  return -1;\n}\n\n"
  },
  {
    "path": "vm/src/objects/object.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n/*\n Pointer and Object Representation\n =================================\n\n This class describes a 32-bit direct-pointer object memory for Smalltalk.\n\n Pointer\n -------\n \n The model is very simple in principle:  \n     a pointer is either a SmallInteger \n     or a 32-bit direct object pointer.\n\n SmallIntegers are tagged with a low-order bit equal to 1,\n  and an immediate 31-bit 2s-complement signed value in the rest of the word.\n\n All object pointers point to a header, which may be followed by a number of \n data fields.\n \n Thus, the pointer to an object always points at the begin of the _base header_,\n which is after additional variable-sized _extra headers_, and the RoarVM\n specific _preheaders_.\n\n \n Object Representation\n ---------------------\n \n        === Object Representation in Memory, Including all Headers ===\n +-------------+-----------------+--------------------+---------------------+\n |Pre (k words)|Extra (0-2 words)|Base Header (1 word)|Data/Fields (n words)|\n +-------------+-----------------+--------------------+---------------------+\n                                 ↑\n                                 Target of Object*|Object_p|Oop\n \n This object memory achieves considerable compactness by using\n a variable header size (the one complexity of the design).\n\n\n The format of the 0th header word is as follows:\n\n\t3 bits\treserved for gc (mark, root, unused)\n\t12 bits\tobject hash (for HashSets)\n\t5 bits\tcompact class index\n\t4 bits\tobject format\n\t6 bits\tobject size in 32-bit words\n\t2 bits\theader type (0: 3-word, 1: 2-word, 2: forbidden, 3: 1-word)\n\n If a class is in the compact class table, then this is the only header\n information needed.  If it is not, then it will have another header word at\n offset -4 bytes with its class in the high 30 bits, and the header type\n repeated in its low 2 bits.\n \n If the objects size is greater than 255 bytes, then it will have yet another\n header word at offset -8 bytes with its full word size in the high 30 bits and\n its header type repeated in the low two bits.\n\n The object format field provides the remaining information as given in the\n formatOf: method (including isPointers, isVariable, isBytes,\n and the low 2 size bits of byte-sized objects).\n\n \n Note on the original Squeak VM Garbage Collector\n ------------------------------------------------\n \n Note: the following two lines were true of the original Squeak VM, \n but are not true in this this VM as of 11/15/10. -- dmu & sm\n \n (This implementation includes incremental (2-generation) and full garbage\n collection, each with compaction and rectification of direct pointers.)\n \n It also supports a bulk-become (exchange object identity) feature that allows\n many objects to be becomed at once, as when all instances of a class must be\n grown or shrunk.\n\n*/\n\nclass Object\n# if !Work_Around_Extra_Words_In_Classes\n: public Word_Containing_Object_Type\n# endif\n\n {\n   # if Work_Around_Extra_Words_In_Classes\n    # include \"word_containing_object_type.h\"\n  # endif\n\npublic:\n\n  static oop_int_t primitiveIndex_of_header(oop_int_t header) {\n    return ((header & Object_Indices::Primitive_Index_Low_Mask ) >> Object_Indices::Primitive_Index_Low_Shift)\n        |  ((header & Object_Indices::Primitive_Index_High_Mask) >> Object_Indices::Primitive_Index_High_Shift);\n  }\n  static int MaxPrimitiveIndex() { return primitiveIndex_of_header(~0); }\n\n  inline oop_int_t primitiveIndex() const;\n\n\n  int32 baseHeader;\n  static const int BaseHeaderSize = sizeof(int32);\n\n\n  char*      as_char_p()     const { return (char*)this; }\n  u_char*    as_u_char_p()   const { return (u_char*)this; }\n  oop_int_t* as_oop_int_p()  const { return (oop_int_t*)this; }\n  int32*     as_int32_p()    const { return (int32*)this; }\n  Oop*       as_oop_p()      const { return (Oop*)this; }\n\n  bool contains_sizeHeader() const {\n    return Header_Type::contains_sizeHeader(baseHeader);\n  }\n  oop_int_t& sizeHeader() const {\n    assert(contains_sizeHeader());\n    return as_oop_int_p()[-2];  // -2: See comment at the top, it is the extra header for which we need to adjust\n  }\n  bool contains_class_and_type_word() const {\n    return Header_Type::contains_class_and_type_word(baseHeader);\n  }\n  oop_int_t& class_and_type_word() const { return as_oop_int_p()[-1]; } // -1: See comment at the top, it is the extra header for which we need to adjust\n   \n  Oop  get_class_oop() const {\n    Oop r = Oop::from_bits(Header_Type::without_type(class_and_type_word()));\n    if (check_many_assertions)\n      assert(r == Oop::from_mem_bits(u_oop_int_t(class_and_type_word()) >> Header_Type::Width));\n    return r;\n  }\n  void set_class_oop(Oop x);\n  void set_class_oop_no_barrier(Oop);\n  Oop backpointer() const { return oop_from_backpointer(get_backpointer_word()); }\n\n  void set_backpointer(Oop x) {\n      set_backpointer_word(backpointer_from_oop(x));\n  }\n  void set_preheader(Oop x) { \n    init_extra_preheader_word();\n      set_backpointer(x);\n  }\n \n  static Oop oop_from_backpointer(oop_int_t bp) {\n    return Oop::from_mem_bits(u_oop_int_t(bp) >> Header_Type::Width);\n  }\n  oop_int_t backpointer_from_oop(Oop x) {\n    return (x.mem_bits() << Header_Type::Width) | (headerType() << Header_Type::Shift);\n  }\n   \n  Preheader* preheader() const { return  (Preheader*)&as_oop_int_p()[-extra_header_oops()]; }\n\n  oop_int_t get_backpointer_word() const { return *backpointer_word(); }\n  \n  inline void set_backpointer_word(oop_int_t w);\n  \n  oop_int_t* backpointer_word() const {\n    return &preheader()->backpointer;\n  }\n\n\n  oop_int_t* extra_preheader_word() const {\n    return preheader()->extra_preheader_word_address();\n  }\n   \n   oop_int_t get_extra_preheader_word() { return *extra_preheader_word(); }\n   inline void set_extra_preheader_word(oop_int_t w);\n\n   void init_extra_preheader_word() { preheader()->init_extra_preheader_word(); }\n\n\npublic:\n\n  static const int SizeShift = Header_Type::Width + Header_Type::Shift; // but never used since size is in words, and we need it by bytes anyway\n  static const int SizeWidth = 6;\n  static const int SizeMask = ((1 << SizeWidth) - 1) << SizeShift; // should be 0xfc\n  static const int Size4Bit = 0; // changes for 64 bit oops\n\n  static const int LongSizeMask = ~Header_Type::Mask;\n\n  inline oop_int_t sizeBits() const;\n  inline oop_int_t sizeBitsSafe() const;\n  oop_int_t shortSizeBits() const { return baseHeader & SizeMask; }\n  oop_int_t longSizeBits()  const { return sizeHeader() & LongSizeMask; }\n  oop_int_t total_byte_size() const;\n  oop_int_t total_byte_size_without_preheader() const;\n\n  oop_int_t stSize() const;\n\n  static const int FormatShift = SizeShift + SizeWidth;\n  static const int FormatWidth = 4;\n  static const int FormatMask = ((1 << FormatWidth) - 1) << FormatShift;\n\n\n  static const int CompactClassShift = FormatShift + FormatWidth;\n  static const int CompactClassWidth = 5;\n  static const int CompactClassMask = ((1 << CompactClassWidth) - 1) << CompactClassShift; // should be 0x1f000\n\n  oop_int_t compact_class_index() const { return (baseHeader & CompactClassMask) >> CompactClassShift; }\n\n\n  static const int HashShift = CompactClassShift + CompactClassWidth; // should be 17\n  static const int HashWidth = 12;\n  static const int HashBitsOffset = HashShift; // squeak name\n  static const int HashMask = ((1 << HashWidth) - 1) << HashShift;\n  static const int HashBits = HashMask; // squeak name, should be 0x1ffe0000;\n\n\n  // \"masks for root and mark bits\"\n  static const int UnusedWidth = 1;\n\tstatic const int RootShift = HashShift + HashWidth + UnusedWidth; // \"Next-to-Top bit\"\n\tstatic const int MarkShift = RootShift + 1;  // \"Top bit\"\n\tstatic const int32 RootBit = 1 << RootShift;\n\tstatic const int32 MarkBit = 1 << MarkShift;\n\n  static bool verify_constants() {\n    assert_eq(SizeMask,                0xfc, \"\");\n    assert_eq(FormatShift, 8, \"\");\n    assert_eq(FormatMask,             0xf00, \"\");\n    assert_eq(CompactClassMask,     0x1f000, \"\");\n    assert_eq(HashBits,          0x1ffe0000, \"\");\n    assert_eq(RootShift, 30, \"\");\n    assert_eq(MarkShift, 31, \"\");\n    return true;\n  }\n\n\n\tstatic const int LargeContextBit = 0x40000; // \"This bit set in method headers if large context is needed.\"\n  static Oop NilContext() { return Oop::from_int(0); }  // \"the oop for the integer 0; used to mark the end of context lists\"\n\n  bool isHandlerMarked() { // for contexts\n    if (!isMethodContext())  return false;\n    Oop m =  fetchPointer(Object_Indices::MethodIndex);\n    return m.is_mem()  &&  m.as_object()->primitiveIndex() == 199;\n  }\n\n public:\n  bool is_marked() { return header_is_marked(baseHeader); }\n  static bool header_is_marked(int32 hdr) { return hdr & MarkBit; }\n\n  inline void   mark_without_store_barrier();\n  inline void unmark_without_store_barrier();\n\n public:\n\n  Oop as_oop() const { return Oop::from_object(this); }\n\n  inline static int rightType(oop_int_t headerWord);\n\n\n  static oop_int_t make_free_object_header(oop_int_t bytes_including_header) {\n    return round_up_by_power_of_two(bytes_including_header, sizeof(Oop)) | Header_Type::Free;\n  }\n\n  oop_int_t sizeOfFree() const { return Header_Type::without_type(baseHeader); }\n\n  bool isFreeObject() const { return is_free(); } // Squeakish name\n\n  Chunk* my_chunk() const  { return my_chunk(extra_header_bytes()); }\n  Chunk* my_chunk(int extra_header_bytes) const { return (Chunk*)&as_char_p()[-extra_header_bytes]; }\n  Chunk* nextChunk() const {\n    return (Chunk*)&as_char_p()[bytes_to_next_chunk()];\n  }\n\n  Chunk* my_chunk_without_preheader() const { return (Chunk*)&as_char_p()[-extra_header_bytes_without_preheader()]; }\n\n  oop_int_t bytes_to_next_chunk() const { return isFreeObject() ? sizeOfFree() : sizeBits(); }\n\n  void* firstFixedField() const { return as_char_p() + BaseHeaderSize; }\n\n\n  class Format {\n    /*\n     \"       0      no fields\n     1      fixed fields only (all containing pointers)\n     2      indexable fields only (all containing pointers)\n     3      both fixed and indexable fields (all containing pointers)\n     4      both fixed and indexable weak fields (all containing pointers).\n\n     5      unused\n     6      indexable word fields only (no pointers)\n     7      indexable long (64-bit) fields (only in 64-bit images)\n\n     8-11      indexable byte fields only (no pointers) (low 2 bits are low 2 bits of size)\n     12-15     compiled methods:\n     # of literal oops specified in method header,\n     followed by indexable bytes (same interpretation of low 2 bits as above)\n     \"\n     */\n  public:\n    static const int no_fields = 0;\n    static const int fixed_fields_only = 1; // all pointers\n    static const int indexable_fields_only = 2; // all pointers\n    static const int both_fixed_and_indexable_fields = 3; // all pointers\n    static const int both_fixed_and_indexable_weak_fields = 4; // all pointers\n    static const int unused = 5;\n    static const int indexable_word_fields_only = 6; // no pointers\n    static const int indexable_long_fields_only = 7; // only in 64-bit images\n    static const int indexable_byte_fields_only_0 = 8; // low 2 bits are low 2 bits of size\n    static const int indexable_byte_fields_only_1 = 8 + 1; // low 2 bits are low 2 bits of size\n    static const int indexable_byte_fields_only_2 = 8 + 2; // low 2 bits are low 2 bits of size\n    static const int indexable_byte_fields_only_3 = 8 + 3; // low 2 bits are low 2 bits of size\n    static const int compiled_method_0 = 12 + 0; // # literal oops speced in method header followed by indexable bytes\n    static const int compiled_method_1 = 12 + 1; // # literal oops speced in method header followed by indexable bytes\n    static const int compiled_method_2 = 12 + 2; // # literal oops speced in method header followed by indexable bytes\n    static const int compiled_method_3 = 12 + 3; // # literal oops speced in method header followed by indexable bytes\n    static const int byte_size_bits = 3;\n\n    static const int first_byte = indexable_byte_fields_only_0;\n\n   public:\n    static bool has_fields(int fmt) { return fmt != 0; }\n    static bool has_only_fixed_fields(int fmt) { return fmt <= fixed_fields_only; }\n    static bool has_bytes(int fmt)  { return fmt >= first_byte; }\n    static bool isCompiledMethod(int fmt) { return fmt >= compiled_method_0; }\n    static bool isWeak(int fmt) { return fmt == both_fixed_and_indexable_weak_fields; }\n    static bool has_only_oops(int fmt) { return fmt <= both_fixed_and_indexable_weak_fields; }\n    static bool might_be_context(int fmt) { return fmt == both_fixed_and_indexable_fields; }\n    static bool has_no_oops(int fmt) { return fmt >= indexable_word_fields_only  &&  fmt <= indexable_byte_fields_only_3; }\n    static bool has_only_indexable_fields(int fmt) {\n      return  fmt >= indexable_word_fields_only\n         ||   fmt == indexable_fields_only;\n    }\n    static bool isArray(int fmt) { return fmt == indexable_fields_only; }\n    static bool is_valid(int fmt) { return fmt != unused  &&  fmt != indexable_long_fields_only; }\n    static bool isWordsOrBytes(int fmt) {\n      return fmt == indexable_word_fields_only\n      ||   ( has_bytes(fmt)  &&  !isCompiledMethod(fmt) );\n    }\n    static bool isIndexable(int fmt) { return fmt >= indexable_fields_only; }\n    static bool isWords(int fmt) { return fmt == indexable_word_fields_only; }\n  };\n\n\n  class CompactClass {\n   public:\n    static const oop_int_t MethodContext = 14; // ST VM switches these!\n    static const oop_int_t  BlockContext = 13;\n    static const oop_int_t PseudoContext =  4;\n\n    static bool isContextHeader(oop_int_t aHeader) {\n      oop_int_t h = aHeader & CompactClassMask;\n      return  h == (MethodContext << CompactClassShift)\n          ||  h == ( BlockContext << CompactClassShift)\n          ||  h == (PseudoContext << CompactClassShift);\n    }\n    static bool isMethodContextHeader(oop_int_t aHeader) {\n      return (aHeader & CompactClassMask) == (MethodContext << CompactClassShift);\n    }\n  };\n\n\n\n  bool is_this_context_a_block_context() const { return fetchPointer(Object_Indices::MethodIndex).is_int(); }\n\n  bool isMethodContext() const { return CompactClass::isMethodContextHeader(baseHeader); }\n  bool hasContextHeader() const { return CompactClass::isContextHeader(baseHeader); }\n  bool hasSender(Oop) const;\n  Object_p home_of_block_or_method_context() {\n    return is_this_context_a_block_context() ? fetchPointer(Object_Indices::HomeIndex).as_object() : (Object_p)this;\n  }\n  Oop key_at_identity_value(Oop);\n\n  void byteSwapIfByteObject();\n  inline char* first_byte_address() const;\n  inline int32 methodHeader() const; // use instead of header()\n  inline void beRootIfOld();\n  bool is_new() const { /*unimplemented();*/ return false; }\n\n\n  // ObjectMemory object enumeration\n  Oop* last_pointer_addr() const;\n  Oop* last_strong_pointer_addr() const;\n  Oop* last_strong_pointer_addr_remembering_weak_roots(Abstract_Mark_Sweep_Collector*);\n  oop_int_t lastPointer() const;\n  oop_int_t nonWeakFieldsOf() const;\n\n  // ObjectMemory initialization\n  void do_all_oops_of_object(Oop_Closure*, bool do_checks = check_assertions);\n  void do_all_oops_of_object_for_reading_snapshot(Squeak_Image_Reader* r);\n  void do_all_oops_of_object_for_marking(Abstract_Mark_Sweep_Collector*, bool do_checks = check_assertions);\n\n  // ObjectMemory allocation\n  Object_p fill_in_after_allocate(oop_int_t byteSize, oop_int_t hdrSize,\n                                  oop_int_t baseHeader, Oop classOop, oop_int_t extendedSize,\n                                  bool doFill = false,\n                                  bool fillWithNil = false);\n  Oop clone();\n\n  // ObjectMemory interpreter access\n  inline Object_p instantiateContext(oop_int_t byteSize);\n\n  // ObjectMemory header access\n  int32 classHeader() { return class_and_type_word(); }\n  oop_int_t format() const {\n    assert(FormatMask > 0);\n    return (baseHeader & FormatMask) >> FormatShift;\n  }\n  int32 hashBits() const { return (baseHeader & HashMask) >> HashShift; }\n\n  inline bool isArray() const;\n  inline bool isBytes() const;\n  inline bool isPointers() const;\n  bool isFloatObject() const;\n  inline bool isWordsOrBytes() const;\n  bool isIndexable() const { return Format::isIndexable(format()); }\n  bool isWeak() const { return Format::isWeak(format()); }\n  bool isWords() const { return Format::isWords(format()); }\n\n\n\n  inline bool isUnwindMarked();\n\n\n\n\n  private:\n  inline Oop& pointer_at(oop_int_t fieldIndex) const;\n  u_char& byte_at(oop_int_t byteIndex) const;\n  int32& long32_at(oop_int_t fieldIndex) const;\n\n  public:\n  inline Oop  fetchPointer(oop_int_t fieldIndex) const;\n  inline void storePointer(oop_int_t fieldIndex, Oop oop);\n  inline void storePointerUnchecked( oop_int_t fieldIndex, Oop oop);\n  inline void storePointerIntoContext(oop_int_t i, Oop x);\n\n  void storePointerIntoYoung(oop_int_t i, Oop x) {\n    storePointerUnchecked(i, x);\n  }\n\n  inline u_char fetchByte(oop_int_t byteIndex) const;\n  inline void storeByte( oop_int_t byteIndex, u_char valueByte);\n\n  inline oop_int_t fetchLong32(oop_int_t fieldIndex) const;\n  inline void storeLong32(oop_int_t fieldIndex, int32 x);\n\n  oop_int_t fetchInteger(oop_int_t fieldIndex) const;\n  void storeInteger(oop_int_t fieldIndex, oop_int_t x);\n  void storeIntegerUnchecked(oop_int_t fieldIndex, oop_int_t x) {\n    storePointerUnchecked(fieldIndex, Oop::from_int(x));\n  }\n  void storeIntegerUnchecked_into_context(oop_int_t fieldIndex, oop_int_t x) {\n    storePointerUnchecked(fieldIndex, Oop::from_int(x));\n  }\n\n\n  inline double fetchFloatAtinto() const;\n  double fetchFloatofObject(oop_int_t fieldIndex) const;\n\n\n  oop_int_t fetchLong32Length() const;\n  oop_int_t fetchWordLength() const {\n    // size appropriate for fetchPointer, but not in general for fetchLong32, etc\n    return (sizeBits() - BaseHeaderSize) >> ShiftForWord;\n  }\n\n  void* fetchArray(oop_int_t fieldIndex) const {\n    return fetchPointer(fieldIndex).arrayValue();\n  }\n\n\n  static Oop positive32BitIntegerFor(u_int32 integerValue);\n  static Oop   signed32BitIntegerFor(int32 integerValue);\n  static Oop positive64BitIntegerFor(u_int64 integerValue);\n  static Oop   signed64BitIntegerFor(int64 integerValue);\n\n\n  inline oop_int_t quickFetchInteger(oop_int_t fieldIndex) const;\n\n\n\n  inline Oop fetchClass() const;\n  Oop className() const;\n  Oop name_of_class_or_metaclass(bool* is_meta) const;\n\n  inline u_oop_int_t lengthOf() const;\n  oop_int_t byteSize() const { return isBytes() ? slotSize() : oop_int_t(slotSize() * sizeof(Oop)); }\n  inline oop_int_t byteLength() const;\n  oop_int_t slotSize() const { return lengthOf(); }\n  inline u_oop_int_t fixedFieldsOfArray() const;\n  inline void* arrayValue() const;\n  inline oop_int_t formatOfClass() const;\n\n  class ClassFormat {\n   public:\n    // from fixedFieldsOfArray\n    static u_oop_int_t fixedFields(oop_int_t cfmt) { return ((cfmt >> 11) & 0xc0) + ((cfmt >> 2) & 0x3f) - 1; }\n  };\n\n\n  inline oop_int_t fetchStackPointer() const; // rcvr is a ContextObject\n\n\n  Object_p instantiateSmallClass(oop_int_t sizeInBytes);\n  Object_p instantiateClass(oop_int_t sizeInBytes, Logical_Core* where = NULL);\n  oop_int_t instanceSizeOfClass();\n\n  inline void set_object_address_and_backpointer(Oop x  COMMA_DCL_ESB);\n\n\n  inline bool isCompiledMethod() const;\n\n  void flushExternalPrimitive();\n\n\n  inline oop_int_t literalCount() const;\n  inline Oop literal(oop_int_t offset) const;\n  inline static oop_int_t literalCountOfHeader(oop_int_t header);\n  oop_int_t argumentCount() const { // of method\n    return argumentCountOfHeader(methodHeader());\n  }\n  inline static oop_int_t argumentCountOfHeader(oop_int_t header);\n  inline static oop_int_t temporaryCountOfHeader(oop_int_t header);\n  oop_int_t temporaryCount() const { return temporaryCountOfHeader(methodHeader()); }\n\n\n  void cleanup_session_ID_and_ext_prim_index_of_external_primitive_literal();\n  Object_p get_external_primitive_literal_of_method();\n\n  inline Oop superclass();\n   \n  Oop methodClass() {\n    return literal(literalCount() - 1).as_object()->fetchPointer(Object_Indices::ValueIndex);\n  }\n\n\n\n  inline void synchronousSignal(const char*);\n  inline int priority_of_process();\n  inline Oop name_of_process();\n  inline Oop my_list_of_process();\n  int core_where_process_is_running();\n  int priority_of_process_or_nil();\n  Object_p process_list_for_priority_of_process();\n  Oop get_suspended_context_of_process_and_mark_running();\n  bool is_process_running();\n  bool is_process_allowed_to_run_on_this_core();\n  void store_host_core_of_process(int);\n  void store_allowable_cores_of_process(u_int64 bitMask);\n  void add_process_to_scheduler_list();\n  void set_suspended_context_of_process(Oop ctx);\n  Oop removeFirstLinkOfList();\n  Oop removeLastLinkOfList(Object_p);\n  Oop removeMiddleLinkOfList(Object_p, Object_p);\n  Oop remove_process_from_scheduler_list(const char*);\n  void kvetch_nil_list_of_process(const char*);\n  void addLastLinkToList(Oop);\n  void nil_out_my_list_and_next_link_fields_of_process();\n\n\n\n  bool isEmptyList();\n  inline static Oop floatObject(double);\n  inline void storeFloat(double);\n\n   /** Floats are stored in platform order in Cog images.\n    This function here is used during image load to make sure that\n    the floats are stored in normalized, i.e., swaped order, since\n    the standard interpreter and the RoarVM do not use platform order.\n    \n    REM: should NOT be called in normal operation. */\n  inline void swapFloatParts_for_cog_compatibility();\n   \n  void storeStackPointerValue(oop_int_t v) {\n    storePointerUnchecked(Object_Indices::StackPointerIndex, Oop::from_int(v));\n  }\n\n\n  private:\n  inline char* first_byte_address_after_header() const;\n  public:\n  void print(Printer* p = dittoing_stdout_printer);\n  void print_with_fields();\n  void print_class(Printer*);\n  void print_bytes(Printer*);\n  void print_bytes_in_array(Printer*);\n  void print_compiled_method(Printer*);\n  void print_frame(Printer*);\n  void print_process_or_nil(Printer*, bool print_stack = false);\n  bool verify_process();\n  bool selector_and_class_of_method_in_me_or_ancestors(Oop, Oop*, Oop*);\n\n  inline bool equals_string(const char*);\n  inline bool starts_with_string(const char*);\n  void dp();\n\n\n  bool verify();\n  bool verify_address();\n  bool verify_preheader();\n  bool verify_extra_preheader_word();\n  bool verify_backpointer();\n  bool okayOop();\n  bool hasOkayClass();\n\n\n  static Object_p makePoint(oop_int_t, oop_int_t);\n  static Object_p makeString(const char* str);\n  static Object_p makeString(const char* str, int n);\n\n  void* firstIndexableField_for_primitives();\n  char* pointerForOop_for_primitives();\n\n  oop_int_t argumentCountOfBlock();\n# if Include_Closure_Support\n   oop_int_t argumentCountOfClosure();\n# endif\n  static oop_int_t sizeOfSTArrayFromCPrimitive(void* p);\n\n  inline Multicore_Object_Heap* my_heap();\n  bool my_heap_contains_me() {\n    Multicore_Object_Heap* h = my_heap();\n    return h->contains(this);\n  }\n\n  bool is_current_copy() { return as_oop().as_object() == this; }\n\n  inline int rank();\n  inline int mutability();\n  inline bool is_read_write();\n  inline bool is_read_mostly();\n\n  void move_to_heap(int, int, bool do_sync);\n\n  inline bool is_suitable_for_replication();\n  inline int  mutability_for_snapshot_object();\n\n  void check_IP_in_context();\n  void check_all_IPs_in_chain();\n  u_char* next_bc_to_execute_of_context();\n  void check_IP_of_method(u_char* bcp, Object_p);\n\n  inline void save_block_method_and_IP();\n  inline Oop  get_orig_block_method();\n  inline Object*  get_orig_block_home();\n  inline Oop  get_original_block_IP();\n  inline void zapping_ctx();\n\n  inline void set_count_of_blocks_homed_to_this_method(oop_int_t x);\n  inline oop_int_t get_count_of_blocks_homed_to_this_method_ctx();\n\n  inline void catch_stores_of_method_in_home_ctxs(Oop*,int,Oop);\n   \n  static inline bool image_is_pre_4_1();\n\n  void weakFinalizerCheckOf();\n   \n  int instance_variable_names_index_of_class(const char*);\n  static Object_p instance_variable_names_of_Process();\n  int index_of_string_in_array(const char* aString);\n  \n\n  static void test();\n};\n\n# define FOR_EACH_OOP_IN_OBJECT_EXCEPT_CLASS(obj, oop_ptr) \\\n  for (Oop* oop_ptr = (obj)->last_pointer_addr();  oop_ptr > (obj)->as_oop_p();  --oop_ptr)\n\n\n# define FOR_EACH_STRONG_OOP_IN_OBJECT_EXCEPT_CLASS_RECORDING_WEAK_ROOTS(obj, oop_ptr, gc) \\\n  for (Oop* oop_ptr = (obj)->last_strong_pointer_addr_remembering_weak_roots(gc);  oop_ptr > (obj)->as_oop_p();  --oop_ptr)\n\n# define FOR_EACH_WEAK_OOP_IN_OBJECT(obj, oop_ptr) \\\n  for ( Oop *oop_ptr  = obj->last_strong_pointer_addr() + 1, \\\n      *last_oop_ptr  =  obj->last_pointer_addr(); \\\n            oop_ptr <= last_oop_ptr ; \\\n          ++oop_ptr)\n\n"
  },
  {
    "path": "vm/src/objects/object.inline.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\ninline void Object::set_object_address_and_backpointer(Oop x  COMMA_DCL_ESB) {\n  Safepoint_for_moving_objects::assert_held();\n  The_Memory_System()->object_table->set_object_for(x, (Object_p)this  COMMA_USE_ESB);\n  set_backpointer(x);\n}\n\n\n\n\ninline void Object::set_class_oop(Oop x) {\n  The_Memory_System()->store_enforcing_coherence(&class_and_type_word(),\n                                              Header_Type::extract_from(class_and_type_word())\n                                              |  Header_Type::without_type(x.bits()),\n                                              (Object_p)this);\n}\n\ninline void Object::set_class_oop_no_barrier(Oop x) {\n  class_and_type_word() = Header_Type::extract_from(class_and_type_word())\n                       |  Header_Type::without_type(x.bits());\n}\n\ninline void Object::  mark_without_store_barrier() { baseHeader |=  MarkBit; }\ninline void Object::unmark_without_store_barrier() { baseHeader &= ~MarkBit; }\n\n\n\ninline void Object::set_backpointer_word(oop_int_t w) {\n  oop_int_t* dst = backpointer_word();\n  The_Memory_System()->store_enforcing_coherence(dst, w, (Object_p)this);\n}\n\ninline void Object::set_extra_preheader_word(oop_int_t w) {\n  assert_always(w); // bug hunt qqq\n  oop_int_t* dst = extra_preheader_word();\n  The_Memory_System()->store_enforcing_coherence(dst, w, (Object_p)this);\n}\n\ninline bool Object::hasSender(Oop aContext) const {\n  // rcvr must be a context\n  Object_p aco = aContext.as_object();\n  if (this == (Object*)aco)  return false;\n  Oop nilOop = The_Squeak_Interpreter()->roots.nilObj;\n  for (Oop s = fetchPointer(Object_Indices::SenderIndex);\n       s != nilOop;\n       s = s.as_object()->fetchPointer(Object_Indices::SenderIndex))\n    if (s == aContext)  return true;\n  return false;\n}\n\n\n\ninline oop_int_t Object::fetchInteger(oop_int_t fieldIndex) const {\n  Oop x = fetchPointer(fieldIndex);\n  return x.checkedIntegerValue();\n}\n\ninline oop_int_t Object::fetchStackPointer() const { // rcvr is a ContextObject\n  Oop sp = fetchPointer(Object_Indices::StackPointerIndex);\n  return sp.is_int() ? sp.integerValue() : 0;\n}\n\n\ninline u_oop_int_t Object::fixedFieldsOfArray() const {\n  /* \"NOTE: This code supports the backward-compatible extension to 8 bits of instSize.\n   When we revise the image format, it should become...\n   ^ (classFormat >> 2 bitAnd: 16rFF) - 1 */\n\n  oop_int_t fmt = format();\n  return\n  Format::has_only_indexable_fields(fmt)\n  ?  0 :\n  Format::has_only_fixed_fields(fmt)\n  ? lengthOf()  :  // \"fixed fields only (zero or more)\"\n  // \"fmt = 3 or 4: mixture of fixed and indexable fields, so must look at class format word\"\n  ClassFormat::fixedFields(fetchClass().as_object()->formatOfClass());\n}\n\n\ninline u_oop_int_t Object::lengthOf() const {\n  // Return the number of indexable bytes or words in the given object. Assume the given oop is not an integer. For a CompiledMethod, the size of the method header (in bytes) should be subtracted from the result of this method.\"\n  u_oop_int_t sz = sizeBits();\n  if (Size4Bit) sz -= baseHeader & Size4Bit;\n  sz -= BaseHeaderSize;\n  oop_int_t fmt = format();\n  return  fmt <= Format::both_fixed_and_indexable_weak_fields\n  ?  sz >> ShiftForWord // words\n  :  fmt <= Format::indexable_long_fields_only\n  ?  sz >> 2 // 32-bit longs\n  :  sz - (fmt & Format::byte_size_bits); // bytes\n}\n\n\ninline Oop Object::fetchClass() const {\n  oop_int_t ccIndex = compact_class_index();\n  return ccIndex == 0  ?  get_class_oop()\n  :  The_Squeak_Interpreter()->splObj(Special_Indices::CompactClasses).as_object()->fetchPointer(ccIndex - 1);\n}\n\n\ninline oop_int_t Object::lastPointer() const {\n  /*\n   \"Return the byte offset of the last pointer field of the given object.\n   Works with CompiledMethods, as well as ordinary objects.\n   Can be used even when the type bits are not correct.\"\n   */\n  int fmt = format();\n  // ordered this way for optimization\n  if (Format::has_only_oops(fmt)) {\n    if (Format::might_be_context(fmt) && hasContextHeader())\n      return  (Object_Indices::CtextTempFrameStart + fetchStackPointer()) * bytesPerWord;\n\n    return  sizeBitsSafe() - sizeof(Oop);\n  }\n  if (Format::has_no_oops(fmt))\n    return  0;\n  if (Format::isCompiledMethod(fmt))\n    return  literalCount() * bytesPerWord  +  BaseHeaderSize;\n\n  fatal(\"should not be here\");  return 0;\n}\n\n\ninline char* Object::first_byte_address() const {\n  if (isFreeObject()) return NULL;\n  int32 fmt = format();\n  if (!Format::has_bytes(fmt)) return NULL;\n  return  first_byte_address_after_header()\n  + (Format::isCompiledMethod(fmt)\n     ? (Object_Indices::LiteralStart + literalCount()) * bytesPerWord\n     : 0);\n}\n\ninline char* Object::first_byte_address_after_header() const { return as_char_p() + BaseHeaderSize; }\n\ninline oop_int_t Object::methodHeader() const { return fetchPointer(Object_Indices::HeaderIndex).bits(); }\n\ninline void Object::byteSwapIfByteObject() {\n  char* b = first_byte_address();\n  if (b == NULL) return;\n  reverseBytes((int32*)b, (int32*)nextChunk());\n  // no store barrier, only for reading snapshots\n}\n\ninline oop_int_t Object::total_byte_size() const {\n  oop_int_t r = bytes_to_next_chunk() + extra_header_bytes();\n  if (check_many_assertions) assert(!(r & (sizeof(oop_int_t) - 1)));\n  return r;\n}\n\ninline oop_int_t Object::total_byte_size_without_preheader() const {\n  return bytes_to_next_chunk() + extra_header_bytes_without_preheader();\n}\n\ninline oop_int_t Object::sizeBits() const {\n  // \"Answer the number of bytes in the given object, including its base header, rounded up to an integral number of words.\"\n  // \"Note: byte indexable objects need to have low bits subtracted from this size.\"\n  if (check_many_assertions) assert_always(!isFreeObject());\n  oop_int_t r = contains_sizeHeader()\n                  ?  longSizeBits()\n                  :  shortSizeBits();\n  if (check_many_assertions) assert_always((size_t)r >= sizeof(baseHeader));\n  return r;\n}\ninline oop_int_t Object::sizeBitsSafe() const {\n  // \"Compute the size of the given object from the cc and size fields in its header. This works even if its type bits are not correct.\"\n  oop_int_t header = baseHeader;\n  return rightType(header) ==  Header_Type::SizeAndClass\n  ?  Header_Type::without_type(sizeHeader())\n  :  shortSizeBits();\n}\n\ninline oop_int_t Object::stSize() const {\n  // return number of indexable fields in given object, e.g. ST size\n  return Format::might_be_context(format()) && hasContextHeader()\n  ? fetchStackPointer()\n  : oop_int_t(lengthOf() - fixedFieldsOfArray());\n}\n\ninline int Object::rightType(oop_int_t headerWord) {\n  // \"Compute the correct header type for an object based on the size and compact class fields of the given base header word, rather than its type bits. This is used during marking, when the header type bits are used to record the state of tracing.\"\n  if (!(headerWord & SizeMask        ))  return Header_Type::SizeAndClass;\n  if (!(headerWord & CompactClassMask))  return Header_Type::Class;\n  return Header_Type::Short;\n}\n\ninline void* Object::arrayValue() const {\n  return isWordsOrBytes() ? as_char_p() + BaseHeaderSize : (char*)(The_Squeak_Interpreter()->primitiveFail(), 0);\n}\n\n\ninline oop_int_t Object::formatOfClass() const {\n  /* \"**should be in-lined**\"\n   \"Note that, in Smalltalk, the instSpec will be equal to the inst spec\n   part of the base header of an instance (without hdr type) shifted left 1.\n   In this way, apart from the smallInt bit, the bits\n   are just where you want them for the first header word.\"\n   \"Callers expect low 2 bits (header type) to be zero!\"*/\n  return fetchPointer(Object_Indices::InstanceSpecificationIndex).bits() & ~Int_Tag;\n}\n\ninline oop_int_t Object::quickFetchInteger(oop_int_t fieldIndex) const { return fetchPointer(fieldIndex).integerValue(); }\n\ninline oop_int_t Object::fetchLong32Length() const {\n  // Gives size appropriate for fetchLong32\n  return (sizeBits() - BaseHeaderSize) >> 2;\n}\n\n\ninline u_char& Object::byte_at(oop_int_t byteIndex) const { return as_u_char_p()[BaseHeaderSize + byteIndex]; }\ninline u_char  Object::fetchByte(oop_int_t byteIndex) const { return byte_at(byteIndex); }\ninline void    Object::storeByte( oop_int_t byteIndex, u_char valueByte) {\n  The_Memory_System()->store_enforcing_coherence(&byte_at(byteIndex), valueByte, (Object_p)this); // used in interpreter, mostly for new objects\n}\n\n\ninline Oop& Object::pointer_at(oop_int_t fieldIndex) const {\n  return as_oop_p()[BaseHeaderSize / sizeof(Oop)  +  fieldIndex];\n}\n\ninline Oop  Object::fetchPointer(oop_int_t fieldIndex) const {\n  assert(fieldIndex >= 0); // STEFAN that should always hold, shouldn't it?\n  Oop r;\n  MEASURE(fetch_pointer, r.bits(), r = pointer_at(fieldIndex));\n  return r;\n}\n\n# if Extra_OTE_Words_for_Debugging_Block_Context_Method_Change_Bug\ninline void Object::catch_stores_of_method_in_home_ctxs(Oop* /* addr */, int n,  Oop x) {\n  if (n != Object_Indices::MethodIndex)  return;\n  if (get_count_of_blocks_homed_to_this_method_ctx() <= 0)   return;\n  lprintf(\"caught storePointer of method in Oop 0x%x, changing method 0x%x to 0x%x\\n\",\n          as_oop().bits(), fetchPointer(Object_Indices::MethodIndex).bits(), x.bits());\n}\n# else\ninline void Object::catch_stores_of_method_in_home_ctxs(Oop* /* addr */, int,  Oop) {}\n# endif\n\n\n\ninline void Object::storePointer( oop_int_t fieldIndex, Oop oop) {\n  Oop* addr = &pointer_at(fieldIndex);\n  catch_stores_of_method_in_home_ctxs(addr, fieldIndex, oop);\n  The_Memory_System()->store_enforcing_coherence(addr, oop, (Object_p)this);\n}\ninline void Object::storePointerUnchecked( oop_int_t fieldIndex, Oop oop) {\n  // \"Like storePointer:ofObject:withValue:, \n  //  but the caller guarantees that the object being stored into\n  //  is a young object or is already marked as a root.\"\n  \n  // Must NOT send any messages; may be called with safepoint ability true, but caller is not safe.\n  Oop* addr = &pointer_at(fieldIndex);\n  catch_stores_of_method_in_home_ctxs(addr, fieldIndex, oop);\n  The_Memory_System()->store_enforcing_coherence(addr, oop, (Object_p)this);\n}\n\nvoid Object::storePointerIntoContext(oop_int_t fieldIndex, Oop x) {\n  Oop* addr = &pointer_at(fieldIndex);\n  catch_stores_of_method_in_home_ctxs(addr, fieldIndex, x);\n  DEBUG_STORE_CHECK(addr, x);\n  *addr = x;\n}\n\n\ninline int32& Object::long32_at(oop_int_t fieldIndex) const { return as_int32_p()[BaseHeaderSize / sizeof(int32)  +  fieldIndex]; }\ninline int32  Object::fetchLong32(oop_int_t fieldIndex) const {\n  // \" index by 32-bit units, and return a 32-bit value. Intended to replace fetchWord:ofObject:\"\n  return long32_at(fieldIndex);\n}\ninline void   Object::storeLong32(oop_int_t fieldIndex, int32 x) {\n  The_Memory_System()->store_enforcing_coherence(&long32_at(fieldIndex), x, (Object_p)this);\n}\n\ninline void   Object::storeInteger(oop_int_t fieldIndex, oop_int_t x) {\n  if (Oop::isIntegerValue(x))  storePointerUnchecked(fieldIndex, Oop::from_int(x));\n  else                         The_Squeak_Interpreter()->primitiveFail();\n}\n\n\ninline Object_p Object::instantiateSmallClass(oop_int_t sizeInBytes) {\n  /* \"This version of instantiateClass assumes that the total object\n   size is under 256 bytes, the limit for objects with only one or\n   two header words. Note that the size is specified in bytes\n   and should include 4 or 8 bytes for the base header word.\n   NOTE this code will only work for sizes that are an integral number of words\n   (like not a 32-bit LargeInteger in a 64-bit system).\n   May cause a GC.\n   Note that the created small object IS NOT FILLED and must be completed before returning it to Squeak. Since this call is used in routines that do jsut that we are safe. Break this rule and die.\"\n   */\n\n  if (sizeInBytes & (bytesPerWord - 1))  { fatal(\"size must be integral number of words\"); }\n  Multicore_Object_Heap* h = The_Memory_System()->heaps[Logical_Core::my_rank()][Memory_System::read_write];\n  oop_int_t hash = h->newObjectHash();\n\toop_int_t header1 = ((hash << HashBitsOffset) & HashBits)  |  formatOfClass();\n\tOop header2 = as_oop();\n  int hdrSize =\n  (header1 & CompactClassMask) > 0 // \"is this a compact class\"\n  ? 1  :  2;\n\n\theader1 += sizeInBytes - (header1 & (SizeMask+Size4Bit));\n  return h->allocate( sizeInBytes, hdrSize, header1, header2, 0);\n}\n\n\n\ninline bool Object::isPointers() const {\n  //\t\"Answer true if the argument has only fields that can hold oops. See comment in formatOf:\"\n  return Format::has_only_oops(format());\n}\n\ninline bool Object::isBytes() const {\n  // Answer true if the argument contains indexable bytes. See comment in formatOf:\"\n  //  \"Note: Includes CompiledMethods.\"\n  return Format::has_bytes(format());\n}\n\ninline bool Object::isArray() const {\n\treturn Format::isArray(format());\n}\n\ninline bool Object::isWordsOrBytes() const {\n  return Format::isWordsOrBytes(format());\n}\n\n\n\ninline bool Object::isCompiledMethod() const { return Format::isCompiledMethod(format()); }\n\ninline bool Object::isFloatObject() const { return fetchClass() == The_Squeak_Interpreter()->splObj(Special_Indices::ClassFloat); }\n\n\ninline oop_int_t Object::primitiveIndex() const {\n\t// \"Note: We now have 10 bits of primitive index, but they are in two places\n\t// for temporary backward compatibility.  The time to unpack is negligible,\n\t// since the reconstituted full index is stored in the method cache.\"\n  return primitiveIndex_of_header(methodHeader());\n}\n\ninline oop_int_t Object::literalCount() const {  return Object::literalCountOfHeader(methodHeader()); }\ninline oop_int_t Object::literalCountOfHeader(oop_int_t header) { return (header >> Object_Indices::LiteralCountShift) & Object_Indices::LiteralCountMask; }\n\ninline Oop Object::literal(oop_int_t offset) const {\n  Oop r = fetchPointer(offset + Object_Indices::LiteralStart);\n  if (check_many_assertions) {\n    assert_always(r.is_int() || The_Memory_System()->object_table->probably_contains((void*)r.bits()));\n  }\n  return r;\n}\n\ninline oop_int_t Object::argumentCountOfHeader(oop_int_t header) { return (header >> Object_Indices::ArgumentCountShift) & Object_Indices::ArgumentCountMask; }\n\ninline oop_int_t Object::temporaryCountOfHeader(oop_int_t header) { return (header >> Object_Indices::TemporaryCountShift) & Object_Indices::TemporaryCountMask; }\n\n\ninline void Object::flushExternalPrimitive() {\n\t// this is a CompiledMethod containing an external primitive. Flush the function address and session ID of the CM\"\n  Object_p lit = get_external_primitive_literal_of_method();\n  if (!lit)  return; //  \"Something's broken\"\n  lit->cleanup_session_ID_and_ext_prim_index_of_external_primitive_literal();\n}\n\n\ninline Object_p Object::fill_in_after_allocate(oop_int_t byteSize, oop_int_t hdrSize,\n                                       oop_int_t baseHeader, Oop classOop, oop_int_t extendedSize,\n                                       bool doFill,\n                                       bool fillWithNil) {\n  const int my_rank = Logical_Core::my_rank();\n  if (check_many_assertions  &&  hdrSize > 1)\n    classOop.verify_oop();\n  // since new allocs are in read_write heap, no need to mark this for moving to read_write\n  assert(The_Memory_System()->contains(this));\n\n  Preheader* preheader_p = (Preheader*)this;\n  oop_int_t* headerp = (oop_int_t*)&preheader_p[1];\n  Object_p    newObj = (Object_p)(Object*)&headerp[hdrSize - 1];\n  assert(The_Memory_System()->is_address_read_write(this)); // not going to bother with coherence\n\n  Multicore_Object_Heap* h = The_Memory_System()->heaps[my_rank][Memory_System::read_write];\n  assert(h == my_heap()  ||  Safepoint_for_moving_objects::is_held());\n\n  if (hdrSize == 3) {\n    oop_int_t contents = extendedSize     |  Header_Type::SizeAndClass;\n    DEBUG_STORE_CHECK(headerp, contents);\n    *headerp++ = contents;\n    \n    contents = classOop.bits()  |  Header_Type::SizeAndClass;\n    DEBUG_STORE_CHECK(headerp, contents);\n    *headerp++ = contents;\n    \n    h->record_class_header((Object*)headerp, classOop);\n    \n    contents   = baseHeader       |  Header_Type::SizeAndClass;\n    DEBUG_STORE_CHECK(headerp, contents);\n    *headerp   = contents;\n  }\n  else if (hdrSize == 2) {\n    oop_int_t contents = classOop.bits()  |  Header_Type::Class;\n    DEBUG_STORE_CHECK(headerp, contents);\n    *headerp++ = contents;\n    \n    h->record_class_header((Object*)headerp, classOop);\n\n    contents   = baseHeader       |  Header_Type::Class;\n    DEBUG_STORE_CHECK(headerp, contents);\n    *headerp   = contents;\n  }\n  else {\n    assert_eq(hdrSize, 1, \"\");\n    \n    oop_int_t contents   = baseHeader       |  Header_Type::Short;\n    DEBUG_STORE_CHECK(headerp, contents);\n    *headerp   = contents;\n  }\n  assert_eq((void*)newObj, (void*)headerp, \"\");\n\n  The_Memory_System()->object_table->allocate_oop_and_set_preheader(newObj, my_rank  COMMA_TRUE_OR_NOTHING);\n\n\n  //  \"clear new object\"\n  if (!doFill)\n    ;\n  else if (fillWithNil) // assume it's an oop if not null\n    h->multistore((Oop*)&headerp[1],\n                  (Oop*)&headerp[byteSize >> ShiftForWord],\n                  The_Squeak_Interpreter()->roots.nilObj);\n  else {\n    DEBUG_MULTISTORE_CHECK( &headerp[1], 0, (byteSize - sizeof(*headerp)) / bytes_per_oop);\n    bzero(&headerp[1], byteSize - sizeof(*headerp));\n  }\n\n  The_Memory_System()->enforce_coherence_after_store_into_object_by_interpreter(this, byteSize);\n\n  if (check_assertions) {\n    newObj->okayOop();\n    newObj->hasOkayClass();\n  }\n  return newObj;\n}\n\n\ninline Object_p Object::instantiateContext(oop_int_t  sizeInBytes ) {\n  /*\n   \"This version of instantiateClass assumes that the total object\n   size is under 256 bytes, the limit for objects with only one or\n   two header words. Note that the size is specified in bytes\n   and should include four bytes for the base header word.\"\n   */\n  Multicore_Object_Heap* h = The_Memory_System()->heaps[Logical_Core::my_rank()][Memory_System::read_write];\n\tint hash = h->newObjectHash();\n  oop_int_t\theader1 = ((hash << HashShift) & HashMask) | formatOfClass();\n\tOop header2 = as_oop();\n\tint hdrSize =\n  header1 & CompactClassMask  // \"are contexts compact?\"\n  ? 1 : 2;\n  header1 &= ~SizeMask;\n\tif (sizeInBytes <= SizeMask)\n    //  \"OR size into header1.  Must not do this if size > SizeMask\"\n    header1 |= sizeInBytes;\n  else\n    hdrSize = 3;\n  // why never small context size?, Cause h3 is only used when large\n  return h->allocate(sizeInBytes, hdrSize, header1, header2, sizeInBytes);\n}\n\n\ninline Oop Object::superclass() {\n  return fetchPointer(Object_Indices::SuperclassIndex);\n}\n\n\ninline void Object::synchronousSignal(const char* why) {\n  assert(The_Squeak_Interpreter()->safepoint_ability->is_unable());\n\n  bool added = false;\n  Oop proc_to_resume;\n  bool will_resume = false;\n  {\n    Semaphore_Mutex sm(\"synchronousSignal\");\n    if (isEmptyList()) {\n      // no proc waiting\n      int excessSignals = fetchInteger(Object_Indices::ExcessSignalsIndex);\n      storeInteger(Object_Indices::ExcessSignalsIndex, excessSignals + 1);\n    }\n    else {\n      // must surrender sema before resuming to avoid deadlock\n      // inside resume, could spin on safepoint\n      added = true;\n      will_resume = true;\n      proc_to_resume = removeFirstLinkOfList();\n    }\n  }\n  if (will_resume)\n      The_Squeak_Interpreter()->resume(proc_to_resume, why);\n  if (added)\n    addedScheduledProcessMessage_class().send_to_other_cores(); // must be outside the semaphore to avoid deadlock\n}\n\n\n\ninline bool Object::isUnwindMarked() {\n  // is this a methodcontext whose method has prim 198?\n  return isMethodContext()\n  && fetchPointer(Object_Indices::MethodIndex).as_object()->primitiveIndex() == 198;\n}\n\ninline double Object::fetchFloatAtinto() const {\n  // assumes arg is BaseHeaderSize, built into long32_at\n  int32 r[2];\n  r[0] = long32_at(1);\n  r[1] = long32_at(0);\n  return *((double*)&r);\n}\n\ninline double Object::fetchFloatofObject(oop_int_t fieldIndex) const {\n  return The_Squeak_Interpreter()->floatValueOf(fetchPointer(fieldIndex).as_object());\n}\n\n\n\ninline Oop Object::floatObject(double d) {\n  Object_p r = The_Squeak_Interpreter()->splObj_obj(Special_Indices::ClassFloat)\n  ->instantiateSmallClass(sizeof(double) + BaseHeaderSize);\n  r->storeFloat(d);\n  return r->as_oop();\n}\n\ninline void Object::storeFloat(double d) {\n  The_Memory_System()->store_2_enforcing_coherence(\n    &as_int32_p()[0 + BaseHeaderSize/sizeof(int32)], ((int32*)&d)[1],((int32*)&d)[0], (Object_p)this);\n}\n\n/** Floats are stored in platform order in Cog images.\n    This function here is used during image load to make sure that\n    the floats are stored in normalized, i.e., swaped order, since\n    the standard interpreter and the RoarVM do not use platform order.\n \n REM: should NOT be called in normal operation. */\ninline void Object::swapFloatParts_for_cog_compatibility() {\n  int32* data = &as_int32_p()[0 + BaseHeaderSize/sizeof(int32)];\n  \n  The_Memory_System()->store_2_enforcing_coherence(\n    data, data[1], data[0], (Object_p)this);\n}\n\n\ninline bool Object::equals_string(const char* s) {\n  return strlen(s) == lengthOf()  &&  strncmp(s, first_byte_address(), lengthOf()) == 0;\n}\n\ninline bool Object::starts_with_string(const char* s) {\n  return strncmp(s, first_byte_address(), strlen(s)) == 0;\n}\n\n\n\ninline oop_int_t Object::byteLength() const {\n  // Return the number of indexable bytes in the given object. This is basically a special copy of lengthOf: for BitBlt.\n  oop_int_t sz = sizeBits();\n  int fmt = format();\n  return sz - BaseHeaderSize - (Format::has_bytes(fmt) ? (fmt & 3) : 0);\n}\n\n\n\ninline oop_int_t Object::argumentCountOfBlock() {\n  return fetchPointer(Object_Indices::BlockArgumentCountIndex).checkedIntegerValue();\n}\n\n# if Include_Closure_Support\ninline oop_int_t Object::argumentCountOfClosure() {\n  return quickFetchInteger(Object_Indices::ClosureNumArgsIndex);\n}\n# endif\n\n\ninline void* Object::firstIndexableField_for_primitives() {\n  // problematic for store barrier; lots of C code uses this\n  if (is_read_mostly()) {\n    The_Squeak_Interpreter()->remember_to_move_mutated_read_mostly_object(as_oop());\n  }\n  oop_int_t fmt = format();\n  int sz = Format::has_bytes(fmt)\n  ? 1\n  :  fmt == Format::indexable_word_fields_only\n  ? sizeof(int32) : sizeof(oop_int_t);\n  void* r = as_char_p()  +  BaseHeaderSize  +  fixedFieldsOfArray() * sz;\n  return r;\n}\n\n\ninline char* Object::pointerForOop_for_primitives() {\n  // problematic for store barrier; lots of C code uses this\n  if (is_read_mostly()) {\n    The_Squeak_Interpreter()->remember_to_move_mutated_read_mostly_object(as_oop());\n  }\n  return as_char_p();\n}\n\n\ninline oop_int_t Object::sizeOfSTArrayFromCPrimitive(void* p) {\n  Object* x = (Object*)((char*)p - BaseHeaderSize);\n  return x->isWordsOrBytes() ? x->lengthOf() : 0;\n}\n\ninline int Object::rank() { return The_Memory_System()->rank_for_address(this); }\ninline int Object::mutability() { return The_Memory_System()->mutability_for_address(this); }\n\ninline bool Object::is_read_write() { return The_Memory_System()->is_address_read_write(this); }\ninline bool Object::is_read_mostly() { return The_Memory_System()->is_address_read_mostly(this); }\n\ninline Multicore_Object_Heap* Object::my_heap() {\n  return The_Memory_System()->heap_containing(this);\n}\n\n\ninline void Object::beRootIfOld() {\n  if (true) return;\n#ifdef _REMEMBER_OLD_CODE // below is old code\n  unimplemented();\n  if (is_new()) return;\n  FOR_EACH_OOP_IN_OBJECT_EXCEPT_CLASS(this, oop_ptr)\n    if (oop_ptr->is_new())\n      ; // remember\n    if (contains_class_and_type_word()  &&  get_class_oop().as_object()->is_new())\n      ;\n#endif\n}\n\n\ninline bool Object::is_suitable_for_replication() {\n  // no forms: bitblt primitives\n  // no contexts; lots of optimizations\n\n  // Because now each core looks at scheduler, semaphores, processes, these much be coherent\n  Oop klass = fetchClass();\n  if (klass == The_Squeak_Interpreter()->splObj(Special_Indices::ClassProcess  )) return false;\n  if (klass == The_Squeak_Interpreter()->splObj(Special_Indices::ClassSemaphore)) return false;\n  if (klass == The_Squeak_Interpreter()->roots.sched_list_class                 ) return false;\n\n\n  return (The_Memory_System()->replicate_methods &&  isCompiledMethod())\n    ||   (The_Memory_System()->replicate_all     && !hasContextHeader());\n}\n\n\ninline int Object::mutability_for_snapshot_object() {\n\n  // compiler bug:\n  static const int c = Memory_System::read_write;\n  static const int i = Memory_System::read_mostly;\n\n  // Used to be is_suitable_for_replication() before multithreading, but now\n  // need to exclude certainly classes that we don't know till AFTER reading the snapshot -- dmu 3/30/09\n  // So, put everything in read_write, and let image move objects to read_mostly later. -- dmu 5/25/10\n  // bool repl =  is_suitable_for_replication();\n  const bool repl = false;\n\n  return repl ? i :  c;\n}\n\n\n\ninline int Object::priority_of_process() {\n  assert(fetchPointer(Object_Indices::PriorityIndex).is_int());\n  return quickFetchInteger(Object_Indices::PriorityIndex);\n}\n\ninline Oop Object::name_of_process() {\n  assert(fetchPointer(Object_Indices::ProcessName).is_mem());\n  return fetchPointer(Object_Indices::ProcessName);\n}\n\ninline Oop Object::my_list_of_process() {\n  assert(fetchPointer(Object_Indices::MyListIndex).is_mem());\n  return fetchPointer(Object_Indices::MyListIndex);\n}\n\n\n\ninline void Object::save_block_method_and_IP() {\n  // used to find bug where a block ctx home's method got changed because reclaimableContextCount was not zeroed in transferTo\n# if Extra_OTE_Words_for_Debugging_Block_Context_Method_Change_Bug\n  Oop h = fetchPointer(Object_Indices::HomeIndex); Object* ho = h.as_object();\n  Oop me = as_oop();\n  The_Memory_System()->object_table->set_dbg_y(me,ho->fetchPointer(Object_Indices::MethodIndex).bits());\n  The_Memory_System()->object_table->set_dbg_z(me,(oop_int_t)ho);\n  ho->set_count_of_blocks_homed_to_this_method(ho->get_count_of_blocks_homed_to_this_method_ctx() + 1);\n  //The_Memory_System()->object_table->set_dbg_t(me,fetchPointer(Object_Indices::InstructionPointerIndex).bits());\n# endif\n\n}\n\ninline Oop Object::get_orig_block_method() {\n# if Extra_OTE_Words_for_Debugging_Block_Context_Method_Change_Bug\n  return Oop::from_bits(The_Memory_System()->object_table->get_dbg_y(as_oop()));\n# else\n  return Oop::from_int(-1);\n# endif\n}\n\ninline void Object::zapping_ctx() {\n// called when zapping a ctx to help find the bug\n# if Extra_OTE_Words_for_Debugging_Block_Context_Method_Change_Bug\n  if (isMethodContext()) return;\n  Oop h = fetchPointer(Object_Indices::HomeIndex); Object* ho = h.as_object();\n  ho->set_count_of_blocks_homed_to_this_method(ho->get_count_of_blocks_homed_to_this_method_ctx() - 1);\n  Oop me = as_oop();\n  The_Memory_System()->object_table->set_dbg_y(me, 0);\n  The_Memory_System()->object_table->set_dbg_z(me, 0);\n# endif\n}\n\n\ninline Object* Object::get_orig_block_home() {\n# if Extra_OTE_Words_for_Debugging_Block_Context_Method_Change_Bug\n  return (Object*) The_Memory_System()->object_table->get_dbg_z(as_oop());\n# else\n  return NULL;\n# endif\n}\n\n\n\ninline Oop Object::get_original_block_IP() {\n# if Extra_OTE_Words_for_Debugging_Block_Context_Method_Change_Bug\n  return Oop::from_bits(The_Memory_System()->object_table->get_dbg_t(as_oop()));\n# else\n  return Oop::from_int(-17);\n# endif\n}\n\n# if Extra_OTE_Words_for_Debugging_Block_Context_Method_Change_Bug\ninline void Object::set_count_of_blocks_homed_to_this_method(oop_int_t x) {\n  The_Memory_System()->object_table->set_dbg_t(as_oop(), x);\n}\n# else\ninline void Object::set_count_of_blocks_homed_to_this_method(oop_int_t) {}\n# endif\n\ninline oop_int_t Object::get_count_of_blocks_homed_to_this_method_ctx() {\n# if Extra_OTE_Words_for_Debugging_Block_Context_Method_Change_Bug\n  return The_Memory_System()->object_table->get_dbg_t(as_oop());\n# else\n  return 0;\n# endif\n}\n\ninline bool Object::image_is_pre_4_1() { \n  return The_Squeak_Interpreter()->image_version == Squeak_Image_Reader::Pre_Closure_32_Bit_Image_Version; \n}\n"
  },
  {
    "path": "vm/src/objects/object_indices.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Object_Indices {\npublic:\n  // Association indices\n  static const int ValueIndex = 1;\n\n  static const int CharacterValueIndex = 0;\n\n  // CharacterScanner\n  static const int CrossedX = 258;\n  static const int EndOfRun = 257;\n\n  // Class indices\n  // \"Class Class\"\n  static const int SuperclassIndex = 0;\n  static const int MessageDictionaryIndex = 1;\n  static const int InstanceSpecificationIndex = 2;\n  static const int Class_Name_Index = 6; // not in Squeak VM\n  static const int This_Class_Index = 5;\n  // \"Fields of a message dictionary\"\n  static const int MethodArrayIndex = 1;\n  static const int SelectorStart = 2;\n\n  // Context indices\n  // \"Class MethodContext\"\n  static const int SenderIndex = 0;\n  static const int InstructionPointerIndex = 1;\n  static const int StackPointerIndex = 2;\n  static const int MethodIndex = 3;\n# if Include_Closure_Support\n  static const int ClosureIndex = 4; // called receiverMap in image\n# endif\n  static const int ReceiverIndex = 5;\n  static const int CtextTempFrameStart = 6; // copy of TempFrameStart in interp\n  static const int ContextFixedSizePlusHeader = CtextTempFrameStart + 1;\n  static const int SmallContextSize = (ContextFixedSizePlusHeader + 16) * bytesPerWord; // 16 indexable fields\n\n  // \"Large contexts have 56 indexable fileds.  Max with single header word.\"\n  // \"However note that in 64 bits, for now, large contexts have 3-word headers\"\n  static const int LargeContextSize = (ContextFixedSizePlusHeader + 56) * bytesPerWord;\n\n\n\n  static const int TempFrameStart = CtextTempFrameStart;\n  // \"Class BlockContext\"\n  static const int CallerIndex = 0;\n  static const int Free_Chain_Index = 0;\n  static const int BlockArgumentCountIndex = 3;\n  static const int InitialIPIndex = 4;\n  static const int HomeIndex = 5;\n  \n  // \"Class BlockClosure\"\n  static const int BlockMethodIndex = 0;\n  \n# if Include_Closure_Support\n  static const int ClosureOuterContextIndex = 0;\n  static const int ClosureStartPCIndex = 1;\n  static const int ClosureNumArgsIndex = 2;\n  static const int ClosureFirstCopiedValueIndex = 3;\n  static const int ClosureWordCount = 4;\n# endif\n\n  // directory lookup\n  static const int DirEntryFound = 0;\n  static const int DirNoMoreEntries = 1;\n  static const int DirBadPath = 2;\n\n  // Message indices\n  static const int MessageSelectorIndex = 0;\n  static const int MessageArgumentsIndex = 1;\n  static const int MessageLookupClassIndex = 2;\n\n  // CompiledMethod indices\n  static const int HeaderIndex = 0;\n  static const int LiteralStart = 1;\n  static const int LiteralCountShift = 10;\n  static const int LiteralCountMask = 0xff;\n  static const int ArgumentCountShift = 25;\n  static const int ArgumentCountMask = 0xf;\n  static const int TemporaryCountShift = 19;\n  static const int TemporaryCountMask = 0x3f;\n  static const int Primitive_Index_Low_Shift  =      Tag_Size;\n  static const int Primitive_Index_High_Shift = 19 + Tag_Size;\n  static const int Primitive_Index_Low_Mask =       0x1FF << Tag_Size;\n  static const int Primitive_Index_High_Mask = 0x10000000 << Tag_Size;\n\n  static const int External_Primitive_Literal_Index = 0;\n\n  // External_Primitive_Literal indices\n  static const int EPL_Module_Name = 0;\n  static const int EPL_Function_Name = 1;\n  static const int EPL_Session_ID = 2;\n  static const int EPL_External_Primitive_Table_Index = 3;\n  static const int EPL_Length = 4;\n\n  // Point indices\n  static const int XIndex = 0;\n  static const int YIndex = 1;\n\n\n  /*\n   static const Oop ConstMinusOne = Oop::from_int(-1);\n   static const Oop ConstZero = Oop::from_int(0);\n   static const Oop ConstOne = Oop::from_int(1);\n   static const Oop ConstTwo = Oop::from_int(2);\n   */\n\n  // Stream\n  static const int StreamArrayIndex = 0;\n  static const int StreamIndexIndex = 1;\n  static const int StreamReadLimitIndex = 2;\n  static const int StreamWriteLimitIndex = 3;\n\n  // Scheduler\n  // \"Class ProcessorScheduler\"\n  static const int ProcessListsIndex = 0;\n  static const int ActiveProcessIndex = 1;\n  // \"Class LinkedList\"\n  static const int FirstLinkIndex = 0;\n  static const int LastLinkIndex = 1;\n  // \"Class Semaphore\"\n  static const int ExcessSignalsIndex = 2;\n  // \"Class Link\"\n  static const int NextLinkIndex = 0;\n  // \"Class Process\"\n  static const int SuspendedContextIndex = 1;\n  static const int PriorityIndex = 2;\n  static const int MyListIndex = 3;\n  static const int ProcessName = 5;\n\n\n};\n\n"
  },
  {
    "path": "vm/src/objects/object_p.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if Track_OnStackPointer\n  typedef tracked_ptr<Object> Object_p;\n# else\n  typedef Object* Object_p;\n# endif\n"
  },
  {
    "path": "vm/src/objects/preheader.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n// The stuff that comes before the squeak header word(s):\n//  the backpointer, and maybe other things, too.\n// Each word must be tagged with the low order two bits encoding the type of object just as the header must be.\n// This invariant was included so that the preheader words could be marked as free and contain the size of the object\n//  to speed heap scanning (as best as I can recall).\n// -- dmu 3/2010\n\nstruct Preheader {\n  public:\n  oop_int_t backpointer; // must be first, for instance for free chuck this is set to give the length\n# if Extra_Preheader_Word_Experiment\n  oop_int_t extra_preheader_word;\n# endif\n  \n  static oop_int_t* backpointer_address_from_header_address(void* p) { return &((Preheader*)p)[-1].backpointer; }\n  \n  oop_int_t* extra_preheader_word_address() {\n# if Extra_Preheader_Word_Experiment\n      return &extra_preheader_word;\n# else\n      return NULL;\n# endif\n  }\n  \n  void init_extra_preheader_word() {\n# if Extra_Preheader_Word_Experiment\n    extra_preheader_word = (0 << Tag_Size) | Int_Tag;\n# endif\n  }\n  \n  void mark_all_preheader_words_free_for_debugging() {\n    if (check_assertions) {\n      backpointer = 0xe0e0e0e0 /* Oop::Illegals::free_extra_preheader_words, not used because of include dependencies */;\n      \n      # if Extra_Preheader_Word_Experiment\n      extra_preheader_word = 0xe0e0e0e0 /* Oop::Illegals::free_extra_preheader_words, not used because of include dependencies */;\n      # endif\n    }\n  }\n};\n\nstatic const int backpointer_oop_size = 1;\nstatic const int backpointer_byte_size = sizeof(oop_int_t);\n\nstatic const int preheader_byte_size = sizeof(Preheader);\nstatic const int preheader_oop_size = sizeof(Preheader) / sizeof(oop_int_t);\n"
  },
  {
    "path": "vm/src/objects/process_field_locator.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n#include \"headers.h\"\n\nProcess_Field_Locator The_Process_Field_Locator;\n\nObject_p Process_Field_Locator::instance_variable_names_of_Process() {\n  return class_process()->fetchPointer(class_process()->instance_variable_names_index_of_class(\"suspendedContext\")).as_object();\n}\n\nint Process_Field_Locator::instance_variable_count_of_superclasses_of_Process() {\n  return Object::ClassFormat::fixedFields( class_process()->superclass().as_object()->formatOfClass() );\n}\n\nvoid Process_Field_Locator::update_indices() {\n  if (The_Squeak_Interpreter()->process_object_layout_timestamp() == last_timestamp)  return;\n  Object_p instance_variable_names = instance_variable_names_of_Process();\n  int n = instance_variable_count_of_superclasses_of_Process();\n  for (int i = 0; i < count;  ++i) {\n    int index =  instance_variable_names->index_of_string_in_array(names[i]);\n   indices[i] = index < 0  ?  index  :  index + n; // if -1 must keep -1 for none\n  }\n  last_timestamp = The_Squeak_Interpreter()->process_object_layout_timestamp();\n  if (check_assertions) print_results();\n  if (Object_Indices::SuspendedContextIndex != indices[suspendedContext]) {\n    print_results();\n    lprintf(\"Object_Indices::SuspendedContextIndex = %d\\n\", Object_Indices::SuspendedContextIndex);\n    fatal(\"Process_Field_Locator inconsistent with Object_Indices\");\n  }\n}\n\nint Process_Field_Locator::index_of_process_inst_var(Fields f) { // or -1\n  update_indices();\n  return indices[f];\n}\n\n\nvoid Process_Field_Locator::print_results() {\n  for (int i = 0; i < count; i++) \n    lprintf(\"indices[%s] = %d\\n\", names[i], indices[i]);\n}\n\n\nObject_p Process_Field_Locator::class_process() { return The_Squeak_Interpreter()->splObj_obj(Special_Indices::ClassProcess); }\n"
  },
  {
    "path": "vm/src/objects/process_field_locator.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Process_Field_Locator {\n  public:  \n  Process_Field_Locator () {\n    names[suspendedContext] = \"suspendedContext\";\n    names[hostCore] = \"hostCore\";\n    names[coreMask] = \"coreMask\";\n    last_timestamp = -1;\n  }\n\n  enum Fields {\n    suspendedContext, // don't really need this one, but it allows assertion checking -- dmu 7/10\n    hostCore,\n    coreMask,\n    count\n  };\n  private:\n  \n  oop_int_t indices[count];\n  const char* names[count];\n  int32 last_timestamp;\n  \n  Object_p instance_variable_names_of_Process();  \n  int instance_variable_count_of_superclasses_of_Process();\n  void update_indices();\n  static Object_p class_process();\n  \n  public:\n  int index_of_process_inst_var(Fields);\n  bool processes_have_RVM_fields();\n  void print_results();\n};\n\nextern Process_Field_Locator The_Process_Field_Locator;\n"
  },
  {
    "path": "vm/src/objects/roots.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\nRoots::Roots() {\n  FOR_EACH_ROOT(this,oopp) *oopp = uninitialized_value();\n}\n\nvoid Roots::initialize(Oop soo) {\n  specialObjectsOop = soo;\n\n    nilObj = The_Squeak_Interpreter()->splObj(Special_Indices::  NilObject);\n  falseObj = The_Squeak_Interpreter()->splObj(Special_Indices::FalseObject);\n   trueObj = The_Squeak_Interpreter()->splObj(Special_Indices:: TrueObject);\n\n  running_process_or_nil = nilObj;\n  \n# if Extra_Preheader_Word_Experiment\n  extra_preheader_word_selector = nilObj;\n# endif\n  emergency_semaphore = nilObj;\n  \n  FOR_EACH_READY_PROCESS_LIST(slo, p, processList, The_Squeak_Interpreter()) {\n    sched_list_class = processList->fetchClass();\n    break;\n  }\n\n  flush_freeContexts();\n}\n\n\nvoid Roots::flush_freeContexts() {\n  freeContexts      = Object::NilContext();\n  freeLargeContexts = Object::NilContext();\n}\n\n\nbool Roots::verify() {\n  FOR_EACH_ROOT(this,oopp) oopp->verify_object();\n  return true;\n}\n\n"
  },
  {
    "path": "vm/src/objects/roots.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Roots {\n  Oop uninitialized_value() { return Oop::from_int(0); }\n public:\n  Roots();\n  void initialize(Oop);\n  bool is_initialized() { return nilObj != uninitialized_value(); }\n\n  Oop specialObjectsOop;\n  Oop nilObj, falseObj, trueObj;\n  Oop freeContexts, freeLargeContexts;\n\n  Oop receiverClass;\n  Oop newNativeMethod;\n  Oop methodClass; // unused?\n  Oop sched_list_class;\n  Oop dnuSelector; // for debugging\n\n  // these get sent for control transfers\n  Oop _activeContext;\n  Oop _method;\n  Oop _theHomeContext;\n  Oop receiver;\n  Oop messageSelector;\n  Oop newMethod;\n  Oop lkupClass;\n  Oop running_process_or_nil;\n  \n# if Extra_Preheader_Word_Experiment\n  Oop extra_preheader_word_selector;\n# endif\n  Oop emergency_semaphore;\n\n\n  void flush_freeContexts();\n\n  bool verify();\n\n};\n\n# define FOR_EACH_ROOT(roots_ptr,oop_ptr) \\\n  for ( Oop* oop_ptr = (Oop*) (roots_ptr); \\\n             oop_ptr < (Oop*)((roots_ptr) + 1); \\\n           ++oop_ptr )\n\n"
  },
  {
    "path": "vm/src/objects/special_indices.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Special_Indices {\npublic:\n  static const oop_int_t NilObject = 0;\n  static const oop_int_t FalseObject = 1;\n  static const oop_int_t TrueObject = 2;\n  static const oop_int_t SchedulerAssociation = 3;\n  static const oop_int_t ClassBitmap = 4;\n  static const oop_int_t ClassInteger = 5;\n  static const oop_int_t ClassString = 6;\n  static const oop_int_t ClassArray = 7;\n  static const oop_int_t SmalltalkDictionary = 8; //\"Do not delete!\"\n  static const oop_int_t ClassFloat = 9;\n  static const oop_int_t ClassMethodContext = 10;\n  static const oop_int_t ClassBlockContext = 11;\n  static const oop_int_t ClassPoint = 12;\n  static const oop_int_t ClassLargePositiveInteger = 13;\n  static const oop_int_t TheDisplay = 14;\n  static const oop_int_t ClassMessage = 15;\n  static const oop_int_t ClassCompiledMethod = 16;\n  static const oop_int_t TheLowSpaceSemaphore = 17;\n  static const oop_int_t ClassSemaphore = 18;\n  static const oop_int_t ClassCharacter = 19;\n  static const oop_int_t SelectorDoesNotUnderstand = 20;\n  static const oop_int_t SelectorCannotReturn = 21;\n  static const oop_int_t ProcessSignalingLowSpace = 22;\t//\"was TheInputSemaphore\"\n  static const oop_int_t SpecialSelectors = 23;\n  static const oop_int_t CharacterTable = 24;\n  static const oop_int_t SelectorMustBeBoolean = 25;\n  static const oop_int_t ClassByteArray = 26;\n  static const oop_int_t ClassProcess = 27;\n  static const oop_int_t CompactClasses = 28;\n  static const oop_int_t TheTimerSemaphore = 29;\n  static const oop_int_t TheInterruptSemaphore = 30;\n  static const oop_int_t SelectorCannotInterpret = 34;\n  static const oop_int_t MethodContextProto = 35;\n# if Include_Closure_Support\n  static const oop_int_t ClassBlockClosure = 36;\n# endif\n  static const oop_int_t BlockContextProto = 37;\n  static const oop_int_t ExternalObjectsArray = 38;\n  static const oop_int_t ClassPseudoContext = 39;\n  static const oop_int_t ClassTranslatedMethod = 40;\n  static const oop_int_t TheFinalizationSemaphore = 41;\n  static const oop_int_t ClassLargeNegativeInteger = 42;\n\n  static const oop_int_t ClassExternalAddress = 43;\n  static const oop_int_t ClassExternalStructure = 44;\n  static const oop_int_t ClassExternalData = 45;\n  static const oop_int_t ClassExternalFunction = 46;\n  static const oop_int_t ClassExternalLibrary = 47;\n\n  static const oop_int_t SelectorAboutToReturn = 48;\n  static const oop_int_t SelectorRunWithIn = 49;\n# if !Include_Closure_Support\n  static const oop_int_t end = 50;\n# else\n  static const oop_int_t SelectorAttemptToAssign = 50;\n  static const oop_int_t PrimErrTableIndex = 51; // in Interpreter initializePrimitiveErrorCodes\n  static const oop_int_t ClassAlien = 52;\n  static const oop_int_t InvokeCallbackSelector = 53;\n  static const oop_int_t ClassUnsafeAlien = 54;\n  static const oop_int_t ClassWeakFinalizer = 55;\n  static const oop_int_t end = 56;\n# endif\n};\n\n"
  },
  {
    "path": "vm/src/objects/word_containing_object_type.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n// see comment at top of object.h\n\n/** This header uses the fact that every header should normally be included\n    only once, in the beginnging by headers.h in the RoarVM codebase.\n \n    After it is included the first time, an include guard will be defined,\n    that allows to reinclude the file later again without redefining the class,\n    but only inlining the method definitions instead.\n \n    This is done to avoid compiler problems on some platforms, where additional\n    words are introduced into C++ objects when inheritance is used.\n */\n\n# ifndef __WORD_CONTAINING_OBJECT_TYPE_MEMBERS__PARTICAL_INCLUDE_GUARD__\n\nclass Word_Containing_Object_Type {\n  \n# endif\n  \nprivate:\n  /* could be object header word, size header word,\n    class header word, backpointer, or any other preheader word  */\n  oop_int_t some_word_in_an_object_header() const { return *(oop_int_t*)this; }\n\npublic:\n\n  int headerType() const {\n    return Header_Type::extract_from(some_word_in_an_object_header());\n  }\n \n  int extra_header_bytes() const {\n    return Header_Type::extraHeaderBytes(headerType());\n  }\n \n  int extra_header_bytes_without_preheader() const {\n    return Header_Type::extraHeaderBytes_without_preheader(headerType());\n  }\n \n  int extra_header_oops() const {\n    return Header_Type::extraHeaderOops(headerType());\n  }\n \n  int extra_header_oops_without_preheader() const {\n    return Header_Type::extraHeaderOops_without_preheader(headerType());\n  }\n \n  bool is_free() const {\n    return Header_Type::Free == headerType();\n  }\n\n# ifndef __WORD_CONTAINING_OBJECT_TYPE_MEMBERS__PARTICAL_INCLUDE_GUARD__\n\n};\n\n// Here we eventually define the include guard, which should be after\n// the first usage of this header.\n# define __WORD_CONTAINING_OBJECT_TYPE_MEMBERS__PARTICAL_INCLUDE_GUARD__\n\n# endif\n\n\n\n"
  },
  {
    "path": "vm/src/oops/abstract_oop.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n// Placeholder for now\nclass Abstract_Oop {\n};\n\n"
  },
  {
    "path": "vm/src/oops/oop.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\n\nvoid Oop::print(Printer* p) {\n  if (is_int())\n    p->printf(\"%d\", integerValue());\n  else\n    as_object()->print(p);\n}\nvoid Oop::print_briefly(Printer* /* p */) {\n  unimplemented();\n}\nvoid Oop::print_process_or_nil(Printer* p) {\n  as_object()->print_process_or_nil(p);\n}\n\nbool Oop::isMemberOf(char* className) const {\n  return fetchClass().as_object()->className().as_object()->equals_string(className);\n}\n\nbool Oop::isKindOf(char* className) const {\n  Oop const nilObj = The_Squeak_Interpreter()->roots.nilObj;\n  \n  for (Oop klass = fetchClass();  klass != nilObj;  klass = klass.as_object()->superclass())\n    if (klass.as_object()->className().as_object()->equals_string(className))\n      return true;\n  \n  return false;\n}\n\nbool Oop::isKindOf(Oop aClass) const {\n  Oop const nilObj = The_Squeak_Interpreter()->roots.nilObj;\n  \n  for (Oop klass = fetchClass();  klass != nilObj;  klass = klass.as_object()->superclass())\n    if (klass == aClass)\n      return true;\n  \n  return false;\n}\n\nvoid Oop::test() { assert_always(sizeof(Oop) == 4); }\n\n# if 0\nOop Oop::check_after_munging() {\n  if (check_many_assertions) {\n    verify_object();\n  }\n  return *this;\n}\n\n# endif\n"
  },
  {
    "path": "vm/src/oops/oop.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Int_Oop;\nclass Mem_Oop;\n\ntypedef int32 oop_int_t;\n\n# define oop_int_t_contents int32_contents\n\nclass Oop\n\n# if !Work_Around_Extra_Words_In_Classes\n\n: public Abstract_Oop\n\n# endif\n\n{\nprivate:\n  oop_int_t _bits;\n  Oop(oop_int_t b) { this->_bits = b; }\n\n public:\n  class Illegals {\n    public:\n    // should all be even to look like bad pointers\n    static const oop_int_t uninitialized = 0xbadbad00;\n    static const oop_int_t magic = 0xabcdabdc;\n    static const oop_int_t shifted = 0xbadcad00; // low-order bits are different\n    static const oop_int_t zapped = 0xdeaddeac;\n    static const oop_int_t trimmed_end = 0xdead1100;\n    static const oop_int_t allocated = 0xfefefefe;\n    static const oop_int_t made_free = 0xd0dedede; // 2nd nibble is different; look for dede\n    static const oop_int_t free_extra_preheader_words = 0xe0e0e0e0;\n  };\n\n\n\n  static Oop from_bits(oop_int_t b) { return Oop(b); }\n  static Oop from_int(oop_int_t i ) { return Oop((i << Tag_Size) | Int_Tag); }\n  inline static Oop from_object(const Object* p);\n  inline static Oop from_mem_bits(u_oop_int_t mem_bits);\n\n\n\n  Oop() { _bits = (Illegals::uninitialized & ~Tag_Mask)  |  Mem_Tag; } // illegal\n\n\n  inline oop_int_t bits()   const { return _bits; }\n  oop_int_t bits_for_hash() const { return u_oop_int_t(bits()) >> ShiftForWord;   } // for method cache\n  oop_int_t integerValue()  const { assert(is_int());  return _bits >> Tag_Size; }\n\n  static bool isIntegerValue(oop_int_t i)   { return (i ^ (i << Tag_Size)) >= 0; }\n  static bool isIntegerValue(u_oop_int_t i) { return isIntegerValue((oop_int_t)i); }\n\n  static bool isIntegerValue(int64 i)   { return int64(oop_int_t(i))   == i  &&  isIntegerValue(oop_int_t(i)); }\n  static bool isIntegerValue(u_int64 i) { return u_int64(oop_int_t(i)) == i  &&  isIntegerValue(u_oop_int_t(i)); }\n  inline oop_int_t mem_bits() const;\n\n\n  inline oop_int_t checkedIntegerValue() const;\n\n  bool operator == (Oop x) const {  return bits() == x.bits(); }\n  bool operator != (Oop x) const {  return bits() != x.bits(); }\n\n  bool is_mem() const { return (bits() & Tag_Mask) == Mem_Tag; }\n  bool is_int() const { return (bits() & Tag_Mask) == Int_Tag; }\n\n  inline Object_p as_object() const;\n  inline Object_p as_object_unchecked() const;\n  inline Object_p as_object_if_mem() const;\n  inline Object*  as_untracked_object_ptr() const;  // this should only be used when it is absolutly necessary! otherwise use always as_object()\n\n  inline Oop fetchClass() const;\n  bool isMemberOf(char*) const;\n  bool isKindOf(char* className) const;\n  bool isKindOf(Oop aClass) const;\n\n  // subclass forwarders:\n\n  inline bool verify_oop();\n  inline bool verify_object();\n  bool verify_object_or_null() { return bits() == 0  ||  verify_object(); }\n  bool okayOop();\n\n\n  void print(Printer* p = dittoing_stdout_printer);\n  void print_process_or_nil(Printer* p);\n  void print_briefly(Printer*); // used for slot contents\n  void dp();\n\n  bool is_new() { return false; /* unimplemented */ }\n\n  // ObjectMemory headerAccess\n  bool isPointers();\n  bool isBytes();\n  bool isWordsOrBytes();\n  bool isArray();\n  bool isIndexable();\n  bool isWeak();\n  bool isWords();\n  bool isContext();\n\n  inline void* arrayValue();\n\n  oop_int_t byteSize();\n  oop_int_t slotSize();\n\n  // Object Memory allocation\n  Oop beRootIfOld() { /* unimplemented */ return *this; }\n\n  inline int  rank_of_object();\n  inline int  mutability();\n\n  static void test();\n};\n\nstatic const int bytes_per_oop = sizeof(Oop);\n\n\ninline int convert_byte_count_to_oop_count(int x) {\n  return divide_by_power_of_two_and_round_up(x, bytes_per_oop);\n}\n\n\n\ninline void oopcpy_no_store_check(Oop* dst, const Oop* src, int n, Object_p dstObj);\ninline void oopset_no_store_check(Oop* dst, Oop src, int n);\n\n"
  },
  {
    "path": "vm/src/oops/oop.inline.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\ninline void oopcpy_no_store_check(Oop* const dst, const Oop* src, int n, Object_p dst_obj_to_be_evacuated) {\n  assert(The_Memory_System()->contains(dst));\n\n  The_Memory_System()->enforce_coherence_before_store_into_object_by_interpreter(dst, n << ShiftForWord, dst_obj_to_be_evacuated);\n  DEBUG_MULTIMOVE_CHECK(dst, src, n);\n  memmove(dst, src, n * bytes_per_oop);\n  The_Memory_System()->enforce_coherence_after_store_into_object_by_interpreter(dst, n << ShiftForWord);\n}\n\ninline void oopset_no_store_check(Oop* const dst, Oop src, int n) {\n  assert(The_Memory_System()->contains(dst));\n  The_Memory_System()->enforce_coherence_before_store(dst, n << ShiftForWord); // not into an object we need\n  DEBUG_MULTISTORE_CHECK(dst, src, n);\n  \n  Oop* destination = dst;\n  for (int i = 0;  i < n;  ++i)  {\n    *destination++ = src;\n  }\n  The_Memory_System()->enforce_coherence_after_store(dst, n << ShiftForWord);\n}\n\ninline Oop Oop::fetchClass() const {\n  return is_int() ? The_Squeak_Interpreter()->splObj(Special_Indices::ClassInteger)\n  : as_object()->fetchClass();\n}\n\n\ninline bool Oop::isPointers()     { return is_mem()  &&  as_object()->isPointers(); }\ninline bool Oop::isBytes()        { return is_mem()  &&  as_object()->isBytes(); }\ninline bool Oop::isWordsOrBytes() { return is_mem()  &&  as_object()->isWordsOrBytes(); }\ninline bool Oop::isArray()        { return is_mem()  &&  as_object()->isArray(); }\ninline bool Oop::isIndexable()    { return is_mem()  &&  as_object()->isIndexable(); }\ninline bool Oop::isWeak()         { return is_mem()  &&  as_object()->isWeak(); }\ninline bool Oop::isWords()        { return is_mem()  &&  as_object()->isWords(); }\ninline bool Oop::isContext()      { return is_mem()  &&  as_object()->hasContextHeader(); }\n\n\n\ninline Oop Oop::from_object(const Object* p) {\n  if (check_many_assertions)\n    assert_message(p != NULL,\n                   \"used to count on being able to do this, fix these uses\");\n  return p->backpointer();\n}\n\n\n// TODO: perhaps it should be moved to the point right after getting it out\n//       of the object table...\ninline Object_p Oop::as_object_unchecked() const {\n  return (Object_p)The_Memory_System()->object_for_unchecked(*this);\n}\n\ninline Object* Oop::as_untracked_object_ptr() const {\n  return The_Memory_System()->object_for(*this);\n}\n\ninline Object_p Oop::as_object() const {\n  return (Object_p)The_Memory_System()->object_for(*this);\n}\n\ninline Object_p Oop::as_object_if_mem() const {\n  return is_mem() ? as_object() : (Object_p)NULL;\n}\n\n\n\ninline Oop Oop::from_mem_bits(u_oop_int_t mem_bits) { return Oop((mem_bits << Header_Type::Width) | Mem_Tag); }\ninline oop_int_t Oop::mem_bits() const { return u_oop_int_t(bits()) >> Header_Type::Width; }\n\ninline oop_int_t Oop::checkedIntegerValue() const {\n  return is_int() ? integerValue() : (The_Squeak_Interpreter()->primitiveFail(), 0);\n}\n\n\n\n\ninline bool Oop::verify_oop() {\n  return !is_mem()  ||  as_object()->verify_address();\n}\ninline bool Oop::verify_object() {\n  return !is_mem()  ||  as_object()->verify();\n}\n\ninline bool Oop::okayOop() { return  !is_mem()  ||  as_object()->okayOop(); }\n\n\n\ninline oop_int_t Oop::byteSize() { return is_int() ? 0 : as_object()->byteSize(); }\ninline oop_int_t Oop::slotSize() { return is_int() ? 0 : as_object()->lengthOf(); }\n\ninline void* Oop::arrayValue() {\n  return is_mem() ? as_object()->arrayValue() : (void*)(The_Squeak_Interpreter()->primitiveFail(), 0);\n}\n\ninline int  Oop::rank_of_object()       {  return is_int()  ?  Logical_Core::my_rank()          :  The_Memory_System()->     rank_for_address(as_object()); }\ninline int  Oop::mutability()           {  return is_int()  ?  Memory_System::read_mostly  :  The_Memory_System()->mutability_for_address(as_object()); }\n\n\n"
  },
  {
    "path": "vm/src/oops/tags.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nconst int Tag_Size = 1;\nconst int Tag_Mask = 1;\nconst int Int_Tag  = 1;\nconst int Mem_Tag  = 0;\n\n"
  },
  {
    "path": "vm/src/platform/abstract_cpu_coordinate.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Abstract_CPU_Coordinate {\npublic:\n  void initialize(int rank);\n  bool print(char* /* buf */, int /* buf_size */) { fatal(); return false; }\n  static Oop get_stats() { fatal(); return Oop(); }\n};\n\n"
  },
  {
    "path": "vm/src/platform/abstract_memory_semantics.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n/**\n * The memory semantics are defined by the used concurrency abstraction\n * of the underlying system. It is distingushed between models,\n * which base on the assumption of shared memory as the default\n * and models which base on the notion of private memory is the default.\n *\n * This is based on \n *   -     threads   (shared-by-default) \n *   - and processes (private-by-default).\n */\nclass Abstract_Memory_Semantics {\npublic:\n  static inline u_int64  my_rank_mask() { fatal(); return -1; }\n\n  static inline void initialize_memory_system()       { fatal(); }\n  static inline void initialize_local_memory_system() { fatal(); }\n  \n  static inline void initialize_interpreter()         { fatal(); }\n  static inline void initialize_local_interpreter()   { fatal(); }\n  \n  static inline void initialize_timeout_timer()       { fatal(); }\n  static inline void initialize_local_timeout_timer() { fatal(); }\n  \n  static void go_parallel(void (*)(/* helper_core_main */), char* /* argv */[]) { fatal (); };\n  static inline int get_group_rank() { fatal(); return -1; }\n  \n  static inline void* shared_malloc(u_int32 /* sz */) { fatal(); return NULL; }\n  static inline void* shared_calloc(u_int32 /* num_members */, u_int32 /* mem_size */) { fatal(); return NULL; }\n  static inline void  shared_free(void*) { fatal(); }\n  \n  static inline bool is_using_threads() { fatal(); return 0; }\n  \n};\n"
  },
  {
    "path": "vm/src/platform/abstract_message_queue.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Logical_Core; // forward declaration to resolve cyclic dependency\n\nclass Abstract_Message_Queue {\npublic:\n  void send_message(abstractMessage_class*) { fatal(); };\n  \n  void buffered_send_buffer(void*, int) { fatal(); };\n  static void* buffered_receive_from_anywhere(bool /* wait */, Logical_Core** /* buffer_owner */, Logical_Core* const /* receiver */) { fatal(); return NULL; };\n  void release_oldest_buffer(void*) { fatal(); };\n  \n  /**\n   * Depending on the platform, this might not be efficiently implementable.\n   *\n   * If it is not implemented, the latency to notice an incoming message\n   * increases. However, it seems to be not a problem, in the sense that\n   * the VM works on Tilera where it is not implemented at the moment.\n   *                                                         (Stefan 2010-08-02)\n   */\n  static bool are_data_available(Logical_Core* const) { return false; };\n};\n\n"
  },
  {
    "path": "vm/src/platform/abstract_os_interface.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\nvoid rvm_exit() {\n  Performance_Counters::print();\n  OS_Interface::exit();\n}\n\nchar Abstract_OS_Interface::mmap_filename[BUFSIZ] = { 0 };\n\nvoid Abstract_OS_Interface::unlink_heap_file() {\n  assert_always(Logical_Core::running_on_main());\n  if (mmap_filename[0]) {\n    lprintf(\"Unlinked mmap_filename: %s\\n\", mmap_filename);\n    unlink(mmap_filename);\n    mmap_filename[0] = 0;\n  }\n}\n\nchar* Abstract_OS_Interface::map_heap_memory(size_t total_size,\n                                           size_t bytes_to_map,\n                                           void*  where,\n                                           off_t  offset,\n                                           int    main_pid,\n                                           int    flags) {\n  assert_always(Max_Number_Of_Cores >= Logical_Core::group_size);\n  \n  assert( Memory_Semantics::cores_are_initialized() );\n  assert( Using_Processes || Logical_Core::running_on_main() );\n  \n  \n  const bool print = false;\n  \n  snprintf(mmap_filename, sizeof(mmap_filename), Memory_System::use_huge_pages ? \"/dev/hugetlb/rvm-%d\" : \"/tmp/rvm-%d\", main_pid);\n  int open_flags = (Logical_Core::running_on_main()  ?  O_CREAT  :  0) | O_RDWR;\n  \n  int mmap_fd = open(mmap_filename, open_flags, 0600);\n  if (mmap_fd == -1)  {\n    char buf[BUFSIZ];\n    snprintf(buf, sizeof(buf), \"could not open mmap file, on %d, name %s, flags 0x%x\",\n             Logical_Core::my_rank(), mmap_filename, open_flags);\n    perror(buf);\n    fatal(\"open mmap_filename failed.\");\n  }\n  \n  if (!Memory_System::use_huge_pages && ftruncate(mmap_fd, total_size)) {\n    char buf[BUFSIZ];\n    snprintf(buf, sizeof(buf), \"The mmap-file could not be extended to the required heap-size. Requested size was %.2f MB. ftruncate\", (float) total_size / 1024.0 / 1024.0);\n    perror(buf);\n    unlink_heap_file();\n    fatal(\"ftruncate\");\n  }\n  \n  assert_always(Logical_Core::running_on_main() || where != NULL);\n  \n  // Cannot use MAP_ANONYMOUS below because all cores need to map the same file\n  void* mmap_result = map_memory(bytes_to_map, mmap_fd, flags, where, offset,\n                                 (where == NULL) ? \"object heap part (initial request)\" : \"object heap part\");\n  \n  if (mmap_result == MAP_FAILED) {\n    char buf[BUFSIZ];\n    snprintf(buf, sizeof(buf),\n             \"mmap failed on core %d. Requested %.2f MB for %s. mmap\", \n             Logical_Core::my_rank(),\n             (float)bytes_to_map / 1024.0 / 1024.0, \n             (where == NULL) ? \"object heap part (initial request)\" : \"object heap part\");\n    perror(buf);\n    unlink_heap_file();\n    fatal(\"mmap\");\n  }\n\n  char* mem = (char*)mmap_result;\n  close(mmap_fd);\n  \n  if (print)\n    lprintf(\"mmap(<requested address> 0x%x, <byte count to map> 0x%x, PROT_READ | PROT_WRITE, <flags> 0x%x, open(%s, 0x%x, 0600), <offset> 0x%x) returned 0x%x\\n\",\n            where, bytes_to_map, flags, mmap_filename, open_flags, offset, mmap_result);\n \n  assert_always( mem != NULL );\n  return mem;\n}\n\nvoid* Abstract_OS_Interface::map_memory(size_t bytes_to_map,\n                                        int    mmap_fd,\n                                        int    flags,\n                                        void*  start_address,\n                                        off_t  offset_in_backing_file,\n                                        const char* const usage) {\n  if (Debugging)\n    lprintf(\"mmap: About to mmap memory for %s\\n\", usage);\n  \n  if (start_address != NULL)\n    flags |= MAP_FIXED;\n  \n  void* mmap_result = mmap(start_address, bytes_to_map, \n                           PROT_READ | PROT_WRITE,\n                           flags, mmap_fd, offset_in_backing_file);\n  \n  if (mmap_result == MAP_FAILED)\n    return MAP_FAILED;\n\n  if (Debugging) {\n    lprintf(\"mmap: address requested 0x%x, result 0x%x, bytes 0x%x, flags 0x%x, offset in file 0x%x\\n\",\n            start_address, mmap_result, bytes_to_map, flags, 0);\n    lprintf(\"mmap: address range %p - %p\\n\", mmap_result, (uintptr_t)mmap_result + bytes_to_map);\n  }\n\n  if (start_address != NULL  &&  start_address != (void*)mmap_result) {\n    lprintf(\"mmap asked for memory at 0x%x, but got it at 0x%x\\n\",\n            start_address, mmap_result);\n    return MAP_FAILED;\n  }\n\n  return mmap_result;\n}\n\nstatic const char meminfo_file_name[] = \"/proc/meminfo\";\nstatic const char MemTotal[] = \"MemTotal\";\n\nint64_t Abstract_OS_Interface::get_available_main_mem_in_kb() {\n  int64_t result = -1;\n  \n  // printf(\"get_available_main_mem\\n\");\n  FILE* f = fopen(meminfo_file_name, \"r\");\n  if (f == NULL) { return -1; }\n  \n  for (;;) {\n    int  r;\n    char key[BUFSIZ];\n    int  val;\n    char unit[BUFSIZ];\n    r = fscanf(f, \"%s %d %s\", key, &val, unit);\n    // lprintf(\"r %d, key %s, val %d, unit %s\\n\", r, key, val, unit);\n    \n    if (r != 3)\n      break;\n\n    if (strncmp(key, MemTotal, sizeof(MemTotal) - 1) == 0) {\n      result = val;\n      break;\n    }    \n  }\n  fclose(f);\n\n  return result;\n}\n\nvoid Abstract_OS_Interface::check_requested_heap_size(size_t heap_size) {\n  size_t const max_heap_on_32bit = 3 * 1024 * Mega; // rough guess, depends a bit on the system \n  size_t const estimate_for_other_required_memory = 580 * Mega;\n  \n  size_t const expected_mem_required = heap_size + estimate_for_other_required_memory;\n\n  bool might_fail = expected_mem_required > max_heap_on_32bit;\n  \n  if (!might_fail) {\n    might_fail = expected_mem_required > (OS_Interface::get_available_main_mem_in_kb() * 1024u);\n  }\n  \n  if (might_fail)\n    lprintf(\"WARNING! Your requested heap might be to large, and the VM might fail during startup.\\n\"\n            \"WARNING! The required memory is about %d MB\\n\", expected_mem_required / Mega);\n}\n\n"
  },
  {
    "path": "vm/src/platform/abstract_os_interface.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nextern \"C\" { void rvm_exit(); }\n\nclass Abstract_OS_Interface {\npublic:\n  \n  static inline void abort()                         __attribute__((noreturn)) { ::exit(255); }\n  static inline void die(const char* /* err_msg */)  __attribute__((noreturn)) { ::exit(255); }\n  static inline void exit()                          __attribute__((noreturn)) { ::exit(255); }\n  static inline void breakpoint() {}\n  \n  static inline void initialize() {}\n  \n  static void ensure_Time_Machine_backs_up_run_directory() { fatal(); }\n  \n  static inline void profiler_enable()  { fatal(); }\n  static inline void profiler_disable() { fatal(); }\n  static inline void profiler_clear()   { fatal(); }\n  static inline void sim_end_tracing()  { fatal(); }\n  \n  typedef int  get_cycle_count_quickly_t;\n  static inline u_int64 get_cycle_count() { fatal(); return 0; }\n  \n  typedef int Mutex;\n  static inline void mutex_init(Mutex*, void*) { fatal(); }\n  static inline void mutex_destruct(Mutex*)    { fatal(); }\n  static inline int  mutex_lock(Mutex*)        { fatal(); return 0; }\n  static inline bool mutex_trylock(Mutex*)     { fatal(); return false; }\n  static inline int  mutex_unlock(Mutex*)      { fatal(); return 0; }\n  \n  static inline int atomic_fetch_and_add(int*, int) { fatal(); return 0; }\n  \n  /**\n   * Atomically compare the memory location with the old value, and \n   * if they are equal set the new value and return true, false otherwise.\n   */\n  static inline bool atomic_compare_and_swap(int* /* ptr */, int /* old_value */, int /* new_value */) { fatal(); return false; }\n  \n  /**\n   * Atomically compare the memory location with the old value, and \n   * if they are equal set the new value, otherwise don't set anything.\n   * \n   * Returns the initial value at ptr.\n   */\n  static inline int atomic_compare_and_swap_val(int* ptr, int /* old_value */, int /* new_value */) { fatal(); return *ptr; }\n  \n  static inline uint32_t leading_zeros   (uint32_t /* x */) { fatal(); return 0; }\n  static inline uint32_t population_count(uint32_t /* x */) { fatal(); return 0; }\n  \n  struct OS_Heap {};\n  \n  static inline void* rvm_malloc_shared(uint32_t /* sz */)                                    { fatal(); return NULL; }\n  static inline void* rvm_calloc_shared(uint32_t /* num_members */, uint32_t /* mem_size */)  { fatal(); return NULL; }\n  static inline void* rvm_memalign_shared(OS_Heap, int /* al */, int /* sz */)                { fatal(); return NULL; }\n  static inline void* rvm_memalign(int /* al */, int /* sz */)                                { fatal(); return NULL; }\n  static inline void* malloc_uncacheable_shared(int /* alignment */, int /* size */)          { fatal(); return NULL; }\n  static inline void  invalidate_mem(void*, size_t)                                           {}\n  static inline void  mem_flush(void* /* ptr */, size_t /* size */)                           {}\n  static inline void  mem_fence()                                                             { fatal(); }\n  static inline int   mem_create_heap_if_on_Tilera(OS_Heap* /* heap */, bool /* replicate */) { fatal(); return 0; }\n  \n  /* To enable the RVM to use more than one core, one of the following functions\n     has to be implemented.\n     Either threads or processes are chosen by configuring shared-by-default\n     or private-by-default memory semantics in rvm_config.h. */\n  static void start_threads  (void (*)(/* helper_core_main */), char* /* argv */[]) { fatal(); }\n  static void start_processes(void (*)(/* helper_core_main */), char* /* argv */[]) { fatal(); }\n  \n  static inline int get_process_rank() { fatal(); return -1; } \n  static inline int get_thread_rank()  { fatal(); return -1; }\n  \n  static inline int abort_if_error(const char*, int) { fatal(); return -1; }  \n  \n  enum Power_Source { AC, battery, unknown };\n  static Power_Source get_power_source() { return unknown; }\n  \n  static inline void yield_or_spin_a_bit() { fatal(); }\n  \n  static bool AmIBeingDebugged() { fatal(); return false; }\n  \nprotected:\n  static char  mmap_filename[BUFSIZ];\n\npublic:  \n  static void check_requested_heap_size(size_t heap_size);\n  static int64_t get_available_main_mem_in_kb();\n  \n  static bool ask_for_huge_pages(int /* desired_huge_pages */) { fatal(); }\n  static char* map_heap_memory(size_t total_size, size_t bytes_to_map,\n                               void* where, off_t offset,\n                               int main_pid, int flags);  \n  static void unlink_heap_file();\n  \n  static void* map_memory(size_t bytes_to_map, int    mmap_fd,\n                          int    flags, void*  start_address,\n                          off_t  offset_in_backing_file,\n                          const char* const usage);\n\n};\n"
  },
  {
    "path": "vm/src/platform/cacheline_aligned.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nstatic const size_t CACHELINE_SIZE = 64;\n\ntemplate <typename T>\nunion cacheline_aligned {                                     \n  T value;\n  char alignment[(CACHELINE_SIZE > sizeof(T))\n                 ? CACHELINE_SIZE\n                 \n                 : (CACHELINE_SIZE * 2 > sizeof(T))\n                 ? CACHELINE_SIZE * 2\n                 \n                 : (CACHELINE_SIZE * 3 > sizeof(T))\n                 ? CACHELINE_SIZE * 3\n                 \n                 : (CACHELINE_SIZE * 13 > sizeof(T))\n                 ? CACHELINE_SIZE * 13\n                 \n                 : CACHELINE_SIZE * 0];\n#warning STEFAN: do not have a better idea how to do that here... \\\n                 but clearly that is not fit for arbitrary data types\n};"
  },
  {
    "path": "vm/src/platform/cpu_coordinate.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if On_Tilera\n  class   Tile_CPU_Coordinate;\n  typedef Tile_CPU_Coordinate  CPU_Coordinate;\n# else\n  class   Dummy_CPU_Coordinate;\n  typedef Dummy_CPU_Coordinate CPU_Coordinate;\n# endif\n\n"
  },
  {
    "path": "vm/src/platform/dummy_cpu_coordinate.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# include \"headers.h\"\n\nOop Dummy_CPU_Coordinate::get_stats() {\n  \n  int s = The_Squeak_Interpreter()->makeArrayStart();\n  int mainRank = Logical_Core::main_rank;\n  int mainX = Logical_Core::my_rank(), mainY = 0;\n  PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(mainX);\n  PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(mainY);\n  PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(mainRank);\n  PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(Logical_Core::group_size);\n  PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(1);\n  PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(Logical_Core::group_size);\n  PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(Logical_Core::remaining);\n  \n  Oop groupStats = The_Squeak_Interpreter()->makeArray(s);\n  PUSH_WITH_STRING_FOR_MAKE_ARRAY(groupStats);\n  \n  return The_Squeak_Interpreter()->makeArray(s);\n}\n"
  },
  {
    "path": "vm/src/platform/dummy_cpu_coordinate.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if !On_Tilera\n\nclass Dummy_CPU_Coordinate : public Abstract_CPU_Coordinate {\npublic:\n  void initialize(int /* rank */) {};\n  bool print(char* /* buf */, int /* buf_size */) { return false; }\n\n  static Oop get_stats();\n  \n};\n\n# endif // !On_Tilera\n\n"
  },
  {
    "path": "vm/src/platform/ilib_message_queue.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n# if On_Tilera\n\n#include \"headers.h\"\n\n\nvoid ILib_Message_Queue::setup_channels() {\n  setup_buffered_channels();\n}\n\nvoid ILib_Message_Queue::setup_buffered_channels() {\n  if (Logical_Core::running_on_main())\n    FOR_ALL_RANKS(sender) {\n      FOR_ALL_RANKS(receiver) {\n        if (sender != receiver)\n          OS_Interface::abort_if_error(\"buffchan_connect\",\n                         ilib_bufchan_connect(ILIB_GROUP_SIBLINGS, sender, receiver,\n                                              receiver, sender));\n      }\n    }\n  int buf_size =  ilib_bufchan_calc_buffer_size(Number_Of_Channel_Buffers,\n                                                Message_Statics::max_message_size());\n  ilibRequest send_requests[Max_Number_Of_Cores];\n  FOR_ALL_OTHER_RANKS(other_end) {\n    Logical_Core *other = &logical_cores[other_end];\n    OS_Interface::abort_if_error(\"open buffered sender\",\n                   ilib_bufchan_start_open_sender( other_end, &other->message_queue.buffered_send_port, &send_requests[other_end]));\n  }\n  FOR_ALL_OTHER_RANKS(other_end) {\n    Logical_Core *other = &logical_cores[other_end];\n    char* buffer = (char*)malloc(buf_size);\n    OS_Interface::abort_if_error(\"open buffered receiver\",\n                   ilib_bufchan_open_receiver(other_end, buffer, buf_size, &other->message_queue.buffered_receive_port));\n  }\n  FOR_ALL_OTHER_RANKS(other_end) {\n    ilibStatus status;\n    OS_Interface::abort_if_error(\"wait for buffered open\", ilib_wait( &send_requests[other_end], &status));\n  }\n}\n\n\nvoid ILib_Message_Queue::buffered_send_buffer(void* p, int sz) {\n  OS_Interface::abort_if_error(\"buffered send\", ilib_bufchan_send(buffered_send_port, p, sz));\n}\n\nvoid* ILib_Message_Queue::buffered_receive_from_anywhere(bool wait, Logical_Core** buffer_owner, Logical_Core* const /*me*/) {\n  do {\n    FOR_ALL_OTHER_RANKS(r) {\n      size_t sz;\n      void* p = ilib_bufchan_receive_noblock( logical_cores[r].message_queue.buffered_receive_port, &sz );\n      if (p != NULL) {\n        *buffer_owner = &logical_cores[r];\n        return p;\n      }\n    }\n  }\n  while (wait);\n  *buffer_owner = NULL;\n  return NULL;\n}\n\nvoid ILib_Message_Queue::release_oldest_buffer(void*) {\n  ilib_bufchan_release_one(buffered_receive_port);\n}\n\n\n#warning The following code is not maintained, needs to be tested whether it \\\n         still works (Stefan 2010-08-03)\n\nvoid ILib_Message_Queue::measure_communication() {\n  if (Logical_Core::my_rank() >= 2) {\n    rvm_exit();\n    return;\n  }\n  if (Logical_Core::num_cores < 2)\n    fatal(\"not enough cores to measure it\");\n  measure_point_to_point_message();\n  measure_buffered_channel();\n  measure_streaming_channel();\n  measure_raw_channel();\n  The_Measurements.print();\n  rvm_exit();\n}\n\n\nstatic const int msg_size_in_bytes = 40;\nstatic char msg_buf[msg_size_in_bytes];\n\nstatic inline void sync_for_measuring() {\n  if (Print_Barriers) lprintf(\"Barrier in sync_for_measuring()\");\n  OS_Interface::abort_if_error(\"barrier\", ilib_msg_barrier(ILIB_GROUP_SIBLINGS));\n  if (Print_Barriers) lprintf(\"Barrier done\\n\");\n}\n\nvoid ILib_Message_Queue::measure_point_to_point_message() {\n  for (int i = 0;  i < 1000; ++i) {\n    sync_for_measuring();\n    int err;\n    if (Logical_Core::my_rank() == 0) {\n      MEASURE(send_point_to_point_message, err, err = ilib_msg_send(ILIB_GROUP_SIBLINGS, 1, 0, msg_buf, sizeof(msg_buf)));\n    }\n    else {\n      ilibStatus status;\n      MEASURE(receive_point_to_point_message, err,  err = ilib_msg_receive(ILIB_GROUP_SIBLINGS, 0, 0, msg_buf, sizeof(msg_buf), &status));\n    }\n    OS_Interface::abort_if_error(\"measure_point_to_point_message send/rcv\", err);\n  }\n}\n\nvoid ILib_Message_Queue::measure_buffered_channel() {\n  if (Logical_Core::my_rank() == 0)\n    OS_Interface::abort_if_error(\"measure_buffered_channel connect\", ilib_bufchan_connect(ILIB_GROUP_SIBLINGS, 0, 0, 1, 0));\n  \n  ilibBufChanSendPort send_port;\n  ilibBufChanReceivePort receive_port;\n  char* rcv_buf;\n  if (Logical_Core::my_rank() == 0)   OS_Interface::abort_if_error(\"measure_buffered_channel open sender\",  ilib_bufchan_open_sender(0, &send_port) );\n  else {\n    int sz = ilib_bufchan_calc_buffer_size(2, sizeof(msg_buf));\n    rcv_buf = (char*)malloc(sz);\n    OS_Interface::abort_if_error(\"measure_buffered_channel open receiver\",  ilib_bufchan_open_receiver(0, rcv_buf, sz, &receive_port ));\n  }\n  \n  for (int i = 0;  i < 1000; ++i) {\n    sync_for_measuring();\n    int err;\n    if (Logical_Core::my_rank() == 0) {\n      MEASURE(send_bufchan_message, err, err = ilib_bufchan_send(send_port, msg_buf, sizeof(msg_buf)));\n      OS_Interface::abort_if_error(\"measure_buffered_channel send\", err);\n    }\n    else {\n      int err;\n      __attribute__((unused)) void* str;\n      MEASURE(receive_bufchan_message, str,  str = ilib_bufchan_receive(receive_port, (size_t*)&err));\n      OS_Interface::abort_if_error(\"measure_buffered_channel receive\", err);\n      MEASURE(release_bufchan_message, err, err = (ilib_bufchan_release_one(receive_port), 0));\n    }\n  }\n  if (Logical_Core::my_rank() == 1)\n    free(rcv_buf);\n}\n\n\nstatic u_int32 wb[10];\n\n\n\nvoid ILib_Message_Queue::measure_streaming_channel() {\n  if (Logical_Core::my_rank() == 0)\n    OS_Interface::abort_if_error(\"measure_streaming_channel connect\", ilib_strchan_connect(ILIB_GROUP_SIBLINGS, 0, 0, 1, 0));\n  \n  ILIB_STR_SEND_PORT(send_port, 1);\n  ILIB_STR_RECEIVE_PORT(receive_port, 1);\n  \n  if (Logical_Core::my_rank() == 0)   OS_Interface::abort_if_error(\"measure_streaming_channel open sender\",  ilib_strchan_open_sender(0, send_port) );\n  else             OS_Interface::abort_if_error(\"measure_streaming_channel open receiver\",  ilib_strchan_open_receiver(0, receive_port ));\n  \n  for (int i = 0;  i < 1000; ++i) {\n    __attribute__((unused))  int err;\n    if (Logical_Core::my_rank() == 0) {\n      sync_for_measuring();\n# define P(x) fprintf(stderr, \"%s\\n\", #x);\n      MEASURE(send_strchan, err, {\n        ilib_strchan_send_10(send_port, wb[0], wb[1], wb[2], wb[3], wb[4], wb[5], wb[6], wb[7], wb[8], wb[9]);\n        err = 0; });\n    }\n    else {\n      sync_for_measuring();\n      MEASURE( receive_strchan, err, {\n        ilib_strchan_receive_10(receive_port, wb[0], wb[1], wb[2], wb[3], wb[4], wb[5], wb[6], wb[7], wb[8], wb[9]);\n        err = 0;\n      });\n    }\n  }\n}\n\nvoid ILib_Message_Queue::measure_raw_channel() {\n  if (Logical_Core::my_rank() == 0)\n    OS_Interface::abort_if_error(\"measure_raw_channel connect\", ilib_rawchan_connect(ILIB_GROUP_SIBLINGS, 0, 0, 1, 0));\n  \n  ILIB_RAW_SEND_PORT(raw_send_port, 2);\n  ILIB_RAW_RECEIVE_PORT(receive_port, 2);\n  \n  if (Logical_Core::my_rank() == 0)   OS_Interface::abort_if_error(\"measure_raw_channel open sender\",  ilib_rawchan_open_sender(0, raw_send_port) );\n  else             OS_Interface::abort_if_error(\"measure_raw_channel open receiver\",  ilib_rawchan_open_receiver(0, receive_port ));\n  \n  for (int i = 0;  i < 1000; ++i) {\n    sync_for_measuring();\n    __attribute__((unused)) int err;\n    if (Logical_Core::my_rank() == 0) {\n      MEASURE(send_rawchan, err, {\n        ilib_rawchan_send_10(raw_send_port, wb[0], wb[1], wb[2], wb[3], wb[4], wb[5], wb[6], wb[7], wb[8], wb[9]);\n        err = 0;\n      });\n    }\n    else {\n      MEASURE( receive_rawchan, err, {\n        ilib_rawchan_receive(receive_port);\n        ilib_rawchan_receive(receive_port);\n        ilib_rawchan_receive(receive_port);\n        ilib_rawchan_receive(receive_port);\n        ilib_rawchan_receive(receive_port);\n        ilib_rawchan_receive(receive_port);\n        ilib_rawchan_receive(receive_port);\n        ilib_rawchan_receive(receive_port);\n        ilib_rawchan_receive(receive_port);\n        ilib_rawchan_receive(receive_port);\n        err = 0;\n      });\n    }\n  }\n}\n\n\n\n\n\n\n\n# include <signal.h>\n\n\nvoid ILib_Message_Queue::send_message(abstractMessage_class* msg) {\n  Message_Stats::collect_send_msg_stats(msg->header);\n  bool verbose = false;\n  switch(msg->header) {\n      // case Message_Statics::requestSafepointMessage:\n      // case Message_Statics::noMessage:\n    case Message_Statics::addObjectFromSnapshotMessage:\n    case Message_Statics::addObjectFromSnapshotResponse:\n    case Message_Statics::broadcastInterpreterDatumMessage:\n      verbose = false;\n  }\n  \n  if (verbose) lprintf(\"send_message about to send header %d, three words: 0x%x, 0x%x, 0x%x\\n\",\n                       msg->header, ((int*)msg)[0], ((int*)msg)[1], ((int*)msg)[2]);\n  \n  \n  if (verbose) lprintf(\"send_message about to send %d bytes, three words: 0x%x, 0x%x, 0x%x\\n\",\n                       Logical_Core::my_rank(), msg->size_for_transmission_and_copying(), ((int*)msg)[0], ((int*)msg)[1], ((int*)msg)[2]);\n  \n  buffered_send_buffer(msg, msg->size_for_transmission_and_copying());\n  \n  if (verbose) lprintf( \"send_message sent\\n\");\n}\n\n\n\n\n# endif // On_Tilera\n"
  },
  {
    "path": "vm/src/platform/ilib_message_queue.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if On_Tilera\n\nclass ILib_Message_Queue : public Abstract_Message_Queue {\nprivate:\n   ilibBufChanSendPort    buffered_send_port;\n   ilibBufChanReceivePort buffered_receive_port;\n      \n   void measure_point_to_point_message();\n   void measure_buffered_channel();\n   void measure_streaming_channel();\n   void measure_raw_channel();\n  \n  \n  \npublic:\n  static void setup_channels();\n  static void setup_buffered_channels();\n  static void setup_sink();\n\n  void send_message(abstractMessage_class*);\n  \n  void buffered_send_buffer(void*, int);\n  static void* buffered_receive_from_anywhere(bool wait, Logical_Core** buffer_owner, Logical_Core* const /*me*/);\n  void release_oldest_buffer(void*);\n  \n  void measure_communication();\n  \n  static bool are_data_available(Logical_Core* const) {\n#warning needs to be implemented, or disabled if not possible\n    return false;\n    //return  ilib_rawchan_available(my_raw_receive_port) > 0;\n  }\n  \n};\n\n# endif\n"
  },
  {
    "path": "vm/src/platform/ilib_os_interface.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if On_Tilera\n\n#include \"headers.h\"\n\nstatic ILib_OS_Interface::OS_Heap us_heap;\nstatic bool created = false;\nconst char* ILib_OS_Interface::hugepages_control_file = \"/proc/sys/vm/nr_hugepages\";\n\nvoid* ILib_OS_Interface::malloc_uncacheable_shared(int alignment, int size) {\n  if (alignment == 0)\n    alignment = ilib_mem_get_cacheline_size();\n  \n  if (!created) {\n    int err = ilib_mem_create_heap(ILIB_MEM_UNCACHEABLE | ILIB_MEM_SHARED,\n                                   &us_heap);\n    abort_if_error(\"malloc_uncacheable_shared\", err);\n    created = true;\n  }\n  void* r = ilib_mem_memalign_heap(us_heap, alignment, size);\n  if (r == NULL)\n    fatal(\"malloc_uncacheable_shared\");\n  return r;\n}\n\n\n\nvoid ILib_OS_Interface::start_processes(void (*helper_core_main)(), char* argv[]) {\n  // go parallel; one core returns; others run helper_core_main fn\n  \n  # warning STEFAN: refactor, add a setter method for initializing those values.\n  Logical_Core::remaining = ilib_proc_remaining();\n  Logical_Core::group_size = ilib_group_size(ILIB_GROUP_SIBLINGS);\n  Memory_Semantics::_my_rank = ilib_group_rank(ILIB_GROUP_SIBLINGS);\n  Memory_Semantics::_my_rank_mask = 1LL << u_int64(Memory_Semantics::_my_rank);\n  CPU_Coordinate::_my_x = udn_tile_coord_x();\n  CPU_Coordinate::_my_y = udn_tile_coord_y();\n  \n  if (Logical_Core::group_size == 1  &&  Logical_Core::group_size < Logical_Core::num_cores) {\n    ilibProcParam params;\n    memset(&params, 0, sizeof(params));\n    params.num_procs = Logical_Core::num_cores;\n    params.binary_name = NULL;\n    params.argv = argv;\n    \n    params.tiles.x      = params.tiles.y = 0;\n    params.tiles.width  = CPU_Coordinate::width;\n    params.tiles.height = CPU_Coordinate::height;\n    \n    // skip params.init_block/size\n\n    lprintf(\"Will ask for num_proc: %d on w:%d;h:%d\\n\", params.num_procs, params.tiles.width, params.tiles.height);\n    \n    int err = ilib_proc_exec(1, &params);\n    abort_if_error(\"exec\", err);\n    ilib_die(\"impossible\");\n  }\n  \n  Logical_Core::initialize_all_cores();\n  Memory_Semantics::_my_core = &logical_cores[Memory_Semantics::_my_rank];\n  \n  Memory_Semantics::initialize_interpreter();\n  Memory_Semantics::initialize_local_interpreter();\n  \n  ILib_Message_Queue::setup_channels();\n  \n  if (Measure_Communication)\n    Logical_Core::my_core()->message_queue.measure_communication();\n  \n  // lprintf(\"is_center: %s, center_rank: %d, main_rank: %d, my_rank: %d\\n\",\n  //         CPU_Coordinate::is_center() ? \"true\" : \"false\",\n  //         CPU_Coordinate::center_rank,\n  //         Logical_Core::main_rank,\n  //         Logical_Core::my_rank());\n  //\n  // lprintf(\"center_x: %d, center_y: %d, my_x: %d, my_y: %d\\n\",\n  //         Tile_CPU_Coordinate::center_x,\n  //         Tile_CPU_Coordinate::center_y,\n  //         Tile_CPU_Coordinate::_my_x,\n  //         Tile_CPU_Coordinate::_my_y);\n  \n  if (CPU_Coordinate::is_center() != (CPU_Coordinate::center_rank == Logical_Core::my_rank()))\n    fatal(\"center_rank is wrong\\n\");\n  \n  if (Logical_Core::running_on_main()) {\n    fprintf(stdout, \"spawned %d helpers\\n\", Logical_Core::group_size - 1);\n    return;\n  }\n  else {\n    (*helper_core_main)();\n    char buf[BUFSIZ];\n    Logical_Core::my_print_string(buf, sizeof(buf));\n    lprintf( \"helper finsihed: %s\\n\", buf);\n    rvm_exit();\n  }\n  \n}\n\n\nint ILib_OS_Interface::abort_if_error(const char* msg, int err) {\n  if (err >= 0)  return err;\n  lprintf( \"%s failed: %s\\n\", msg, ilib_debug_strerror(err));\n  ilib_abort();\n  return 0;\n}\n\n\n\n\n# endif // On_Tilera\n"
  },
  {
    "path": "vm/src/platform/ilib_os_interface.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if On_Tilera && !On_Tilera_With_GCC\n\n# include <atomic.h>\n\nclass ILib_OS_Interface : public Abstract_OS_Interface {\npublic:\n  \n  static inline void abort() __attribute__((noreturn))  { ilib_abort(); }\n  static inline void die(const char* err_msg) __attribute__((noreturn)) { ilib_die(err_msg); }\n  static inline void exit() __attribute__((noreturn)) {\n    // set_sim_tracing(SIM_TRACE_NONE);\n    profiler_disable();\n    ilib_terminate();\n    ::exit(0);\n  }\n  \n  static inline void initialize() {\n    ilib_init();\n  }\n  \n  static inline void ensure_Time_Machine_backs_up_run_directory() {}\n  \n  \n  static inline void profiler_enable()  { sim_profiler_enable();  }\n  static inline void profiler_disable() { sim_profiler_disable(); }\n  static inline void profiler_clear()   { sim_profiler_clear();   }\n  static inline void sim_end_tracing()  { sim_set_tracing(SIM_TRACE_NONE); };\n  \n  # if 0\n    typedef u_int64 get_cycle_count_quickly_t;\n    # define GET_CYCLE_COUNT_QUICKLY OS_Interface::get_cycle_count\n    # define GET_CYCLE_COUNT_QUICKLY_FMT \"%lld\"\n  # else\n    typedef uint32_t get_cycle_count_quickly_t;\n    # define GET_CYCLE_COUNT_QUICKLY  get_cycle_count_low\n    # define GET_CYCLE_COUNT_QUICKLY_FMT \"%ld\"\n  # endif\n  static inline u_int64 get_cycle_count() { return ::get_cycle_count(); }\n\n  \n  typedef ilibMutex Mutex;\n  \n  static inline void mutex_init(Mutex* mutex, const void* = NULL) {\n    ilib_mutex_init(mutex);\n  }\n  \n  static inline void mutex_destruct(Mutex* mutex) {\n    ilib_mutex_destroy(mutex);\n  }\n  \n  static inline int mutex_lock(Mutex* mutex) {\n    return ilib_mutex_lock(mutex);\n  }\n  \n  static inline bool mutex_trylock(Mutex* mutex) {\n    return 0 == ilib_mutex_trylock(mutex);\n  }\n  \n  static inline int mutex_unlock(Mutex* mutex) {\n    return ilib_mutex_unlock(mutex);\n  }\n  \n  static inline int atomic_fetch_and_add(int* mem, int increment) {\n    return atomic_add_val(mem, increment);\n  }\n  \n  /**\n   * Atomically compare the memory location with the old value, and \n   * if they are equal set the new value and return true, false otherwise.\n   */\n  static inline bool atomic_compare_and_swap(int* ptr, int old_value, int new_value) {\n    return (0 == atomic_compare_and_exchange_bool_acq(ptr, new_value, old_value)); // Not sure whether that is stable, this API is unintuitive for me, got it wrong twice!! make sure the test cases are rerun on new lib versions\n  }\n  \n  /**\n   * Atomically compare the memory location with the old value, and \n   * if they are equal set the new value, otherwise don't set anything.\n   * \n   * Returns the initial value at ptr.\n   */\n  static inline int atomic_compare_and_swap_val(int* ptr, int old_value, int new_value) {\n    return atomic_compare_and_exchange_val_acq(ptr, new_value, old_value);\n  }\n  \n    \n  static inline uint32_t leading_zeros(uint32_t x)    { return __insn_clz(x);  }\n  static inline uint32_t population_count(uint32_t x) { return __insn_pcnt(x); }\n  \n# if Use_CMem\n  // About tmc_cmem_init:\n  // It would be more sensible to call it indirectly from main, but static constructors\n  // run before main, so that won't work.\n  // It might seem better to only call it on the first allocation, which would require this code\n  // to keep and test a static flag. However, the Tilera documentation implies that the tmc_cmem_init\n  // routine itself handles this case, so why complicate our code to do it, too?\n  // See tile64/doc/html/application_libraries_reference/index.html\n  \n  \n  // Named rvm_?alloc_shared since Tilera headers are using macros with the same name\n  static inline void* rvm_malloc_shared(size_t sz) {\n    rvm_malloc_shared_init(); // called by static ctor, so need to do it here, sigh\n    return tmc_cmem_malloc(sz);\n  }\n  static inline void* rvm_calloc_shared(size_t num_members, size_t mem_size)  {\n    rvm_malloc_shared_init(); // called by static ctor, so need to do it here, sigh\n    return tmc_cmem_calloc(num_members, mem_size);\n  }\n  static inline void rvm_free_shared(void* mem) {\n    free(mem);\n  }\nprivate:\n  static inline void rvm_malloc_shared_init() {  \n    abort_if_error(\"tmc_cmem_init failed\", tmc_cmem_init(0)); \n  }\npublic:\n# else\n  static inline void* rvm_malloc_shared(size_t sz) {\n    return malloc_shared(sz);\n  }\n  static inline void* rvm_calloc_shared(size_t num_members, size_t mem_size)  {\n    return calloc_shared(num_members, mem_size);\n  }\n  static inline void  rvm_free_shared(void* mem) {\n    free(mem);\n  }\n  \nprivate:\n  static inline void* rvm_malloc_shared_init() {}\n# endif\n  \npublic:\n  typedef ilibHeap OS_Heap;\n  \n  static inline void* rvm_memalign(int al, int sz) { return memalign(al, sz); }\n  static inline void* rvm_memalign_shared(OS_Heap heap, int al, int sz) { return ilib_mem_memalign_heap(heap, al, sz); }\n  static        void* malloc_uncacheable_shared(int alignment, int size);\n  static inline void  invalidate_mem(void* ptr, size_t size) { ilib_mem_invalidate(ptr, size); }\n  static inline void  mem_flush(void* ptr, size_t size) { ilib_mem_flush(ptr, size); }\n  static inline void  mem_fence() { ilib_mem_fence(); }\n  static inline int   mem_create_heap_if_on_Tilera(OS_Heap* heap, bool replicate) {\n    return ilib_mem_create_heap(ILIB_MEM_SHARED | (replicate ? ILIB_MEM_USER_MANAGED : 0), heap);\n  }\n  \n  static inline int get_process_rank() { return ilib_group_rank(ILIB_GROUP_SIBLINGS); }\n  \n  static void start_processes(void (*helper_core_main)(), char* argv[]);\n  \n  static int abort_if_error(const char*, int); \n\n  static bool AmIBeingDebugged() { return false; }\n\n  /**\n  * this is a local spin, it avoids putting any memory presure\n  * on the tile network while waiting for a few instruction\n  * busy-local-only-loop\n  */\n  static inline void yield_or_spin_a_bit() {\n    float a = 0.0;\n    for (int i = 0;  i < 50;  i++)  a += i;\n  }\n\npublic:\n  \n  static bool ask_for_huge_pages(int desired_huge_pages) {\n    if ((On_Apple | On_Intel_Linux) || desired_huge_pages == 0)\n      return true;\n    \n    int initially_available_huge_pages = how_many_huge_pages();\n    if (initially_available_huge_pages >= desired_huge_pages) {\n      lprintf(\"Linux has enough huges pages: %d >= %d\\n\", initially_available_huge_pages, desired_huge_pages);\n      return true;\n    }\n    request_huge_pages(desired_huge_pages);\n    int available_huge_pages = how_many_huge_pages();\n    if ( available_huge_pages >= desired_huge_pages ) {\n      lprintf(\"Started with %d huge pages, needed %d, acquired %d. Will use huge pages.\\n\",\n              initially_available_huge_pages, desired_huge_pages, available_huge_pages);\n      return true;\n    }\n    lprintf(\"Unable to procure huge_pages, started with %d, wanted %d, got %d; consider --huge_pages %d when starting tile-monitor. Reverting to normal pages. This will slow things down.\\n\",\n            initially_available_huge_pages, desired_huge_pages, available_huge_pages, desired_huge_pages);\n    return false;\n  }\n  \nprivate:\n  static const char* hugepages_control_file;\n  \n  static int how_many_huge_pages() {\n    FILE* hpf = fopen(hugepages_control_file, \"r\");\n    if (hpf == NULL) { perror(\"could not open nr_hugepages\"); die(\"nr_hugepages\"); }\n    int available_huge_pages = -1;\n    fscanf(hpf, \"%d%%\", &available_huge_pages);\n    fclose(hpf);\n    return available_huge_pages;\n  }\n  \n  \n  static void request_huge_pages(int desired_huge_pages) {\n    FILE* hpf = fopen(hugepages_control_file, \"w\");\n    if (hpf == NULL) { perror(\"could not open nr_hugepages\"); die(\"nr_hugepages\"); }\n    fprintf(hpf, \"%d\\n\", desired_huge_pages);\n    fclose(hpf);\n  }\n};\n\n# endif  // if On_Tilera  && !On_Tilera_With_GCC\n"
  },
  {
    "path": "vm/src/platform/logical_core.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# include \"headers.h\"\n\nLogical_Core* logical_cores;\n\nint Logical_Core::num_cores  =  1;\nint Logical_Core::main_rank  =  0;\n\nint Logical_Core::group_size = -1;\nint Logical_Core::remaining  = -1;\n\n\nvoid Logical_Core::initialize_all_cores() {\n  logical_cores = new Logical_Core[num_cores];\n\n  for (size_t i = 0;  i < size_t(num_cores);  ++i)\n    logical_cores[i].initialize(i);\n}\n"
  },
  {
    "path": "vm/src/platform/logical_core.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nextern Logical_Core* logical_cores;\n\nclass Logical_Core {\nprivate:\n  int     _rank;\n  u_int64 _rank_mask;\n  \npublic:\n  Message_Queue  message_queue;\n  CPU_Coordinate coordinate;\n  \n  void initialize(int rank) {\n    _rank = rank;\n    _rank_mask = 1LL << u_int64(rank);\n    coordinate.initialize(rank);\n  }\n  \n  inline int      rank()      const { assert(this != NULL); return _rank; }\n  inline u_int64  rank_mask() const { assert(this != NULL); return _rank_mask; }\n  inline bool     is_main()   const { return main_rank == _rank; }\n  \n  void print_string(char* buf, int buf_size) {\n    char coord[16] = { 0 };\n    \n    if (coordinate.print(coord, 16))\n      snprintf(buf, buf_size,\n             \"%s: [%s], %d of %d (%d remaining)\\n\",\n             (is_main() ? \"main\" : \"helper\"),\n             coord, _rank,\n             group_size, remaining);\n    else\n      snprintf(buf, buf_size,\n               \"%s: %d of %d (%d remaining)\\n\",\n               (is_main() ? \"main\" : \"helper\"),\n               _rank,\n               group_size, remaining);\n  }\n  \n\n// static:\n  \n  static int num_cores;     // threadsafe, read only after init, Stefan: 2009-09-06\n  static int main_rank;     // threadsafe, read only after init, Stefan: 2009-09-06\n  static int group_size;    // group_size is different from num_cores, since it indicates the actually\n                            // used number of logical cores, instead of the desired num_cores\n                            // Should be only used to guide initialization\n\n  static int remaining;     // Indicates the remaining number of physical cores, those not executing a logical_core/interpreter\n\n  static inline bool is_initialized()   { return Memory_Semantics::cores_are_initialized(); }\n  \n  static inline Logical_Core* my_core() { return Memory_Semantics::my_core();      }\n  static inline int           my_rank() { return Memory_Semantics::my_rank();      }\n  static inline u_int64  my_rank_mask() { return Memory_Semantics::my_rank_mask(); }\n  \n  static void my_print_string(char* buf, int buf_size) {\n    my_core()->print_string(buf, buf_size);\n  }\n  \n  \n  static void initialize_all_cores();\n  \n  static inline Logical_Core* main_core() { return &logical_cores[main_rank]; }\n  static inline bool running_on_main() {\n    return main_rank == my_rank();\n  }\n};\n\n# define FOR_ALL_RANKS(r) \\\n  for (int r = 0;  r < Logical_Core::group_size;  ++r)\n\n# define FOR_ALL_OTHER_RANKS(r) \\\n  FOR_ALL_RANKS(r) if (r != Logical_Core::my_rank())\n\n# define FOR_ALL_RANKS_IN_REVERSE_ORDER(r) \\\n  for (int r = Logical_Core::group_size - 1;  r >= 0;  --r)\n\n"
  },
  {
    "path": "vm/src/platform/memory_semantics.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if   Using_Processes\n\nclass   Process_Memory_Semantics;\ntypedef Process_Memory_Semantics Memory_Semantics;\n\n# else // if Using_Threads\n\nclass   Thread_Memory_Semantics;\ntypedef Thread_Memory_Semantics  Memory_Semantics;\n\n# endif\n"
  },
  {
    "path": "vm/src/platform/message_queue.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if   On_Tilera\n\nclass   ILib_Message_Queue;\ntypedef ILib_Message_Queue                     Message_Queue;\n\n# elif Use_PerSender_Message_Queue\n\nclass   Shared_Memory_Message_Queue_Per_Sender;\ntypedef Shared_Memory_Message_Queue_Per_Sender Message_Queue;\n\n# else\n\nclass   Shared_Memory_Message_Queue;\ntypedef Shared_Memory_Message_Queue            Message_Queue;\n\n# endif\n"
  },
  {
    "path": "vm/src/platform/os_interface.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if   On_Tilera\n  # if On_Tilera_With_GCC\n  class   TMC_OS_Interface;\n  typedef TMC_OS_Interface  OS_Interface;\n  # else\n  class   ILib_OS_Interface;\n  typedef ILib_OS_Interface  OS_Interface;\n  # endif\n# elif On_Apple\n\n  class   OSX_OS_Interface;\n  typedef OSX_OS_Interface   OS_Interface;\n\n# else\n\n  class   POSIX_OS_Interface;\n  typedef POSIX_OS_Interface OS_Interface;\n\n# endif\n"
  },
  {
    "path": "vm/src/platform/osx_os_interface.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# include \"headers.h\"\n\n# if !On_iOS\n# include <CoreServices/CoreServices.h>\n# include <CoreFoundation/CoreFoundation.h>\n# include <IOKit/ps/IOPowerSources.h>\n# include <IOKit/ps/IOPSKeys.h>\n\nvoid OSX_OS_Interface::ensure_Time_Machine_backs_up_run_directory() {\n  // Since we put images in same directory as compiled rvm, tell TM to back up that directory,\n  // contradicting what Xcode does. -- dmu 4/05/10\n  OSStatus err;\n  \n  char* the_directory = getcwd(NULL, 0);\n  if (the_directory == NULL) {\n    lprintf(\"Warning: could not get Xcode to backup run directory, getenv\\n\");\n    return;\n  }\n  CFURLRef dir_url_ref = CFURLCreateFromFileSystemRepresentation( kCFAllocatorDefault, \n                                                                 (const UInt8*)the_directory,\n                                                                 strlen(the_directory),\n                                                                 true);\n  if (dir_url_ref == NULL) {\n    lprintf(\"Warning: could not get Xcode to backup run directory, CFURLCreateFromFileSystemRepresentation\\n\");\n    return;\n  }\n  \n  for (   ;\n       dir_url_ref != NULL;\n       dir_url_ref = CFURLCreateCopyDeletingLastPathComponent(kCFAllocatorDefault, dir_url_ref) ) {\n    \n      char buf[BUFSIZ];\n      CFURLGetFileSystemRepresentation(dir_url_ref, false, (UInt8*)buf, BUFSIZ);\n      if (strcmp(\"/Volumes\", buf) == 0)\n        break;\n      if ( (err = CSBackupSetItemExcluded( dir_url_ref, false, true) ) != noErr)\n          printf(\"Warning: could not get Xcode to backup run directory, CSBackupSetItemExcluded: %s\\n\", buf);\n      if (strcmp(\"/\", buf) == 0)\n        break;\n  }\n\n  free(the_directory);\n}\n\n// Following contributed by Kristen McIntyre:\n\nAbstract_OS_Interface::Power_Source OSX_OS_Interface::get_power_source() {\n  CFTypeRef powerInfo = IOPSCopyPowerSourcesInfo();\n  CFArrayRef powerSources = IOPSCopyPowerSourcesList(powerInfo);\n  CFIndex count = CFArrayGetCount(powerSources);\n  int ac_count = 0, battery_count = 0, offline_count = 0;\n  for ( int i = 0;  i < count;  i++) {\n    CFTypeRef source = (CFTypeRef)CFArrayGetValueAtIndex(powerSources, i);\n    CFDictionaryRef dict = IOPSGetPowerSourceDescription(powerInfo, source);\n    if (dict != NULL) {\n      CFStringRef state = (CFStringRef)CFDictionaryGetValue(dict, CFSTR(kIOPSPowerSourceStateKey));\n           if (CFStringCompare(state, CFSTR(kIOPSACPowerValue), 0) == kCFCompareEqualTo) ++ac_count;\n      else if (CFStringCompare(state, CFSTR(kIOPSBatteryPowerValue), 0) == kCFCompareEqualTo) ++battery_count;\n      else if (CFStringCompare(state, CFSTR(kIOPSOffLineValue), 0) == kCFCompareEqualTo) ++offline_count;\n    }\n  }\n  CFRelease(powerInfo);\n  CFRelease(powerSources);\n  return ac_count ? AC :  battery_count ? battery : AC;\n}\n\n# else\n\nvoid OSX_OS_Interface::ensure_Time_Machine_backs_up_run_directory() {}\nAbstract_OS_Interface::Power_Source OSX_OS_Interface::get_power_source() { return AC; }\n\n# endif\n\n\nvoid OSX_OS_Interface::pin_thread_to_core(int32_t /* rank */) {\n  // Mac OS X does not support setting explicit affinity to a PU\n  // It only supports expressing cache affinity\n  // and this is only for one process i.e. threads in a process\n  // http://developer.apple.com/ReleaseNotes/Performance/RN-AffinityAPI/index.html\n}\n\nint64_t OSX_OS_Interface::get_available_main_mem_in_kb() {\n  int mib[2];\n  int64_t physical_memory;\n  size_t length;\n  \n  // Get the Physical memory size\n  mib[0] = CTL_HW;\n  mib[1] = HW_MEMSIZE;\n  length = sizeof(int64);\n  sysctl(mib, 2, &physical_memory, &length, NULL, 0);\n\n  return physical_memory / 1024;\n}\n"
  },
  {
    "path": "vm/src/platform/osx_os_interface.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if On_Apple\n\n#include <sys/sysctl.h>\n\nclass OSX_OS_Interface : public POSIX_OS_Interface {\npublic:\n  \n  /**\n   * Returns true if the current process is being debugged (either \n   * running under the debugger or has a debugger attached post facto).\n   * Source: http://developer.apple.com/library/mac/qa/qa1361/\n   */\n  static bool AmIBeingDebugged(void)\n  {\n    int                 junk;\n    int                 mib[4];\n    struct kinfo_proc   info;\n    size_t              size;\n    \n    // Initialize the flags so that, if sysctl fails for some bizarre \n    // reason, we get a predictable result.\n    \n    info.kp_proc.p_flag = 0;\n    \n    // Initialize mib, which tells sysctl the info we want, in this case\n    // we're looking for information about a specific process ID.\n    \n    mib[0] = CTL_KERN;\n    mib[1] = KERN_PROC;\n    mib[2] = KERN_PROC_PID;\n    mib[3] = getpid();\n    \n    // Call sysctl.\n    \n    size = sizeof(info);\n    junk = sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, NULL, 0);\n    assert(junk == 0);\n    \n    // We're being debugged if the P_TRACED flag is set.\n    \n    return ( (info.kp_proc.p_flag & P_TRACED) != 0 );\n  }\n  \n  static inline void breakpoint() { \n    if (AmIBeingDebugged())\n      raise(SIGTRAP);\n  }\n  \n  static void ensure_Time_Machine_backs_up_run_directory();\n\n# if On_iOS\n  static inline void moncontrol(int) {}\n# endif\n\n  static inline void profiler_enable()  { moncontrol(1); }\n  static inline void profiler_disable() { moncontrol(0); }\n  static inline void profiler_clear()   {}\n  \n  static Power_Source get_power_source();\n  \n  static void pin_thread_to_core(int32_t rank);\n  \n  \n# if Use_Spin_Locks\n  typedef OSSpinLock Mutex;\n  \n  static inline void mutex_init(Mutex* mutex, const void* _ = NULL) {\n    *mutex = 0;\n  }\n  \n  static inline void mutex_destruct(Mutex* mutex) {}\n  \n  static inline int mutex_lock(Mutex* mutex) {\n    OSSpinLockLock(mutex);\n    return 0;\n  }\n  \n  static inline bool mutex_trylock(Mutex* mutex) {\n    return OSSpinLockTry(mutex);\n  }\n  \n  static inline int mutex_unlock(Mutex* mutex) {\n    OSSpinLockUnlock(mutex);\n    return 0;\n  }\n  \n# endif\n  \n# if On_iOS\n# warning STEFAN: we might want to reconsider this hack\n  static char* map_heap_memory(size_t total_size,\n                               size_t /* bytes_to_map */,\n                               void*  /* where */,      off_t  /* offset */,\n                               int    /* main_pid */,   int    /* flags */) {\n    return (char*)malloc(total_size);\n  }\n# endif\n\n  static int64_t get_available_main_mem_in_kb();\n  \n};\n\n# endif // On_Apple\n"
  },
  {
    "path": "vm/src/platform/posix_os_interface.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\n\npthread_t     POSIX_OS_Interface::threads[Max_Number_Of_Cores];\npthread_key_t POSIX_OS_Interface::rank_key = 0;\n\n/**\n * This function makes sure that each rank of the process group is running on\n * a dedicated processing unit (PU) reported by the OS.\n * It does not mean a physical unit, but includes also logical units like hyper\n * threads.\n */\nvoid POSIX_OS_Interface::pin_thread_to_core(int32_t rank) {\n# if On_Intel_Linux\n  // On Linux, it looks pretty easy:\n  // http://www.linuxjournal.com/article/6799\n  // http://www.ibm.com/developerworks/linux/library/l-affinity.html\n  cpu_set_t affinity_mask;\n  CPU_ZERO(&affinity_mask);\n  CPU_SET(rank, &affinity_mask);\n  \n  #include <sys/syscall.h>\n  pid_t tid = (pid_t) syscall (SYS_gettid);\n  \n  if (sched_setaffinity(tid, sizeof(affinity_mask), &affinity_mask) < 0) {\n    perror(\"Failed to set affinity\");\n    abort();\n  }\n  sleep(0); // make sure the OS schedule has a chance to do as we told him\n# endif\n}\n\n\nint32_t POSIX_OS_Interface::last_rank = 0;\n\nvoid* POSIX_OS_Interface::pthread_thread_main(void* param) {\n  void (*routine)() = (void (*)())param;\n\n  int32_t my_rank = __sync_add_and_fetch(&last_rank, 1);\n\n  pthread_setspecific(rank_key, (const void*)my_rank);\n\n  OS_Interface::pin_thread_to_core(my_rank);\n  \n  routine();\n  \n  pthread_exit(NULL);\n}\n\n\nvoid POSIX_OS_Interface::create_threads(const size_t num_of_threads, void (*helper_core_main)()) { \n  for (size_t i = 1; i < num_of_threads; i++) {    \n    int err = pthread_create(&threads[i], NULL, pthread_thread_main, (void*)helper_core_main);\n    if (err < 0) {\n      // error\n      // TODO: do it properly\n      perror(\"Failed to create a thread.\");\n    }\n  }\n}\n\n\nvoid POSIX_OS_Interface::start_threads(void (*helper_core_main)(), char** /* argv[] */) {\n  // first initialize the main core, always rank==0 for threads\n  threads[0] = pthread_self();\n  pthread_key_create(&rank_key, NULL);\n  pthread_setspecific(rank_key, (const void*)0);\n  \n  Logical_Core::initialize_all_cores();\n  \n  Memory_Semantics::initialize_logical_cores();\n\n  Memory_Semantics::initialize_interpreter();\n  Memory_Semantics::initialize_local_interpreter();\n  \n  create_threads(Logical_Core::num_cores, helper_core_main);\n  \n  Logical_Core::group_size = Logical_Core::num_cores;\n  \n  if (Logical_Core::group_size > 1)\n    if (Force_Direct_Squeak_Interpreter_Access | Force_Direct_Timeout_Timer_List_Head_Access | Omit_PThread_Locks)\n      fatal(\"A flag is set for performance measurement that is incompatible with multiple pthreads\");\n  \n  Logical_Core* me = Logical_Core::my_core();\n  if (me->rank() != get_thread_rank()) {\n    fatal(\"OS_Interface::start_threads: rank id is inconsistently initialized!\");\n  }\n  \n  fprintf(stdout, \"spawned %d helpers\\n\", Logical_Core::group_size - 1);\n  OS_Interface::pin_thread_to_core(0);\n}\n\n\n\nint POSIX_OS_Interface::abort_if_error(const char* msg, int err) {\n  if (err == 0)  return err;\n  lprintf( \"%s failed, error: %d\\n\", msg, err);\n  abort();\n  return 0;\n}\n\n\n"
  },
  {
    "path": "vm/src/platform/posix_os_interface.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if !On_Tilera\n\n# define PAGE_SIZE 64 * 1024\n# define LARGE_PAGE_SIZE 16 * Mega\n\n# define MAP_CACHE_INCOHERENT 0\n\n# if On_Intel_Linux\n  # include <sys/gmon.h>\n  # define pthread_yield_np pthread_yield\n# endif\n\n#include <err.h>\n\nclass POSIX_OS_Interface : public Abstract_OS_Interface {\npublic:\n  \n  static inline void abort() __attribute__((noreturn)) { ::abort(); }\n  static inline void die(const char* err_msg) __attribute__((noreturn)) {\n    warnx(\"%s\", err_msg);\n    abort();\n  }\n  static inline void exit() __attribute__((noreturn))  { ::exit(0); }\n  static inline void breakpoint() {\n    if (Include_Debugging_Code) {\n      /* asm (\"int 3\"); */\n      raise(SIGTRAP);\n    }\n  }\n  \n  static void ensure_Time_Machine_backs_up_run_directory() {}\n\n  static inline void profiler_enable()  {}\n  static inline void profiler_disable() {}\n  static inline void profiler_clear()   {}\n  static inline void sim_end_tracing()  {}\n  \n  \n  typedef int get_cycle_count_quickly_t;\n  # define GET_CYCLE_COUNT_QUICKLY  OS_Interface::dummy_get_cycle_count\n  # define GET_CYCLE_COUNT_QUICKLY_FMT \"%ld\"\n  static inline int dummy_get_cycle_count() { return 0; }\n  static inline u_int64 get_cycle_count() {\n    uint64_t result;\n    \n    if (Count_Cycles) {\n      asm volatile(\"rdtsc\" : \"=A\" (result));\n      return result;\n    }\n    else\n      return 0;\n  }\n  \n  \n  \n# if Omit_PThread_Locks\n  \n  typedef int Mutex;\n  static inline void mutex_init(Mutex*, void*) {}\n  static inline void mutex_destruct(Mutex*)    {}\n  static inline int  mutex_lock(Mutex*)        { return 0; }\n  static inline bool mutex_trylock(Mutex*)     { return false; }\n  static inline int  mutex_unlock(Mutex*)      { return 0; }\n  \n# elif Use_Spin_Locks && !On_Apple \n  \n  typedef pthread_spinlock_t Mutex;\n  \n  static inline void mutex_init(Mutex* mutex, const void* _ = NULL) {\n    pthread_spin_init(mutex, 0);\n  }\n  \n  static inline void mutex_destruct(Mutex* mutex) {\n    pthread_spin_destroy(mutex);\n  }\n  \n  static inline int mutex_lock(Mutex* mutex) {\n    return pthread_spin_lock(mutex);\n  }\n  \n  static inline bool mutex_trylock(Mutex* mutex) {\n    return 0 == pthread_spin_trylock(mutex);\n  }\n  \n  static inline int mutex_unlock(Mutex* mutex) {\n    return pthread_spin_unlock(mutex);\n  }\n  \n# else\n\n  typedef pthread_mutex_t Mutex;\n  \n  static inline void mutex_init(Mutex* mutex, const pthread_mutexattr_t* attr = NULL) {\n    pthread_mutex_init(mutex, attr);\n  }\n  \n  static inline void mutex_destruct(Mutex* mutex) {\n    pthread_mutex_destroy(mutex);\n  }\n  \n  static inline int mutex_lock(Mutex* mutex) {\n    return pthread_mutex_lock(mutex);\n  }\n  \n  static inline bool mutex_trylock(Mutex* mutex) {\n    return 0 == pthread_mutex_trylock(mutex);\n  }\n  \n  static inline int mutex_unlock(Mutex* mutex) {\n    return pthread_mutex_unlock(mutex);\n  }\n  \n# endif // Omit_PThread_Locks elif Use_Spin_Locks\n  \n  static inline int atomic_fetch_and_add(int* mem, int increment) {\n    return __sync_fetch_and_add(mem, increment);\n  }\n  \n  /**\n   * Atomically compare the memory location with the old value, and \n   * if they are equal set the new value and return true, false otherwise.\n   */\n  static inline bool atomic_compare_and_swap(int* ptr, int old_value, int new_value) {\n    return __sync_bool_compare_and_swap(ptr, old_value, new_value);\n  }\n\n  /**\n   * Atomically compare the memory location with the old value, and \n   * if they are equal set the new value, otherwise don't set anything.\n   * \n   * Returns the initial value at ptr.\n   */\n  static inline int atomic_compare_and_swap_val(int* ptr, int old_value, int new_value) {\n    return __sync_val_compare_and_swap(ptr, old_value, new_value);\n  }\n  \n  \n# ifdef __GNUC__\n  static inline uint32_t leading_zeros(uint32_t x)    { return __builtin_clz(x);      }\n  static inline uint32_t population_count(uint32_t x) { return __builtin_popcount(x); }\n# else\n  # warning check whether your compiler provides the following functions as intrinsics \n  uint32_t leading_zeros(uint32_t x) {\n    for (int i = 0;  i < 32;  ++i)\n      if ( x  &   (1 << (31-i)))  return i;\n    return 32;\n  }\n  \n  uint32_t population_count(uint32_t x)  {\n    int sum = 0;\n    for (int i = 0;  i < 32;  ++i)\n      if (x  &  (1 << i))  ++sum;\n    return sum;\n  }\n# endif\n  \n  \n  static inline void* rvm_malloc_shared(size_t sz) { return malloc(sz); }\n  static inline void* rvm_calloc_shared(size_t num_members, size_t mem_size) { return calloc(num_members, mem_size); }\n  static inline void  rvm_free_shared(void* mem)   { free(mem); }\n  \n  static inline void  mem_fence() { __sync_synchronize(); /*This is a GCC build-in might need to be replaced */ }\n  \nprivate:\n  static inline void* memalign(int align, int sz) { return (void*) ( (int(malloc(sz + align)) + align - 1) & ~(align-1) ); }\npublic:\n  static inline void* rvm_memalign(int al, int sz) {\n    return memalign(al, sz);\n  }\n  \n  static inline void* rvm_memalign_shared(OS_Heap, int align, int sz) {\n    return (void*) ( (int(rvm_malloc_shared(sz + align)) + align - 1) & ~(align-1) );\n  }\n  \n  static inline void* malloc_uncacheable_shared(int alignment, int size) {\n    OS_Heap heap;\n    return rvm_memalign_shared(heap, alignment, size);\n  }\n  \n  static inline int   mem_create_heap_if_on_Tilera(OS_Heap* heap, bool /* replicate */) {\n    heap = NULL; /* unused on POSIX */\n    return 0;\n  }\n  \n  static void start_threads  (void (* /* helper_core_main */)(), char* /* argv */[]);\n  static void start_processes(void (* /* helper_core_main */)(), char* /* argv */[]) { fatal(); }\n  \n  static inline int get_thread_rank()  { return (int)pthread_getspecific(rank_key); }\n  \n  static int abort_if_error(const char*, int); \n  \n  static inline void yield_or_spin_a_bit() { assert_always(/*Memory_Semantics::is_using_threads()*/ !On_Tilera); pthread_yield_np(); }\n\n  static void pin_thread_to_core(int32_t rank);\n\nprivate:\n  static void* pthread_thread_main(void* param);\n  static int32_t       last_rank;  // needs to be accessed atomically (__sync_fetch_and_add)\n  static pthread_key_t rank_key;\n  static pthread_t     threads  [Max_Number_Of_Cores];\n  static void create_threads(const size_t num_of_threads, void (*helper_core_main)());\n\n  \npublic:\n  \n  static bool ask_for_huge_pages(int desired_huge_pages) {\n    if ((On_Apple | On_Intel_Linux) || desired_huge_pages == 0)\n      return true;\n    return false;\n  }\n\n};\n\n# endif // !On_Tilera\n"
  },
  {
    "path": "vm/src/platform/process_memory_semantics.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# include \"headers.h\"\n\n# if Using_Processes\n\nLogical_Core* Process_Memory_Semantics::_my_core = NULL;\nint Process_Memory_Semantics::_my_rank = -1;\nu_int64 Process_Memory_Semantics::_my_rank_mask = -1;\n\n\nMemory_System _memory_system;\nSqueak_Interpreter _interpreter;\nTimeout_Timer_List_Head _timeout_head;\n\n# endif\n\n"
  },
  {
    "path": "vm/src/platform/process_memory_semantics.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if Using_Processes\n\nclass Process_Memory_Semantics : public Abstract_Memory_Semantics {\npublic:\n  static Logical_Core* _my_core;\n  static int           _my_rank;\n  static u_int64       _my_rank_mask;\n\npublic:\n  static const size_t max_num_threads_on_threads_or_1_on_processes = 1;\n  static inline size_t rank_on_threads_or_zero_on_processes() { return 0; }\n\n  static inline void initialize_memory_system()       {}\n  static inline void initialize_local_memory_system() {}\n  static inline void initialize_interpreter()         {}\n  static inline void initialize_local_interpreter()   {}\n  static inline void initialize_timeout_timer()       {}\n  static inline void initialize_local_timeout_timer() {}\n\n\n  static inline bool cores_are_initialized() { return true; }\n  static inline Logical_Core* my_core() { return _my_core; }\n  static inline int           my_rank() { return _my_rank; }\n  static inline u_int64       my_rank_mask() { return _my_rank_mask; }\n  \n  static inline void initialize_logical_core() {}\n  static inline void initialize_local_logical_core() {}\n  \n  static void go_parallel(void (*helper_core_main)(), char* argv[]) {\n    OS_Interface::start_processes(helper_core_main, argv);\n  }\n  \n  static inline int get_group_rank() { return OS_Interface::get_process_rank(); }\n  \n  static inline void* shared_malloc(u_int32 sz) {\n    return OS_Interface::rvm_malloc_shared(sz);\n  }\n  static inline void* shared_calloc(u_int32 num_members, u_int32 mem_size)  {\n    return OS_Interface::rvm_calloc_shared(num_members, mem_size);\n  }\n\n  static inline void shared_free(void* ptr) {\n    OS_Interface::rvm_free_shared(ptr);\n  }  \n\n  static inline bool is_using_threads() { return false; }\n};\n\nclass  Memory_System;\nextern Memory_System _memory_system;\n\n//#define The_Memory_System() (&_memory_system)\n// At least the Tilera compiler does not like the inlines, costs about 2-5% performance\ninline  FORCE_INLINE  Memory_System* The_Memory_System() { return &_memory_system;  };\n\n\nextern Squeak_Interpreter _interpreter;\n\n//#define The_Squeak_Interpreter() (&_interpreter)\n// At least the Tilera compiler does not like the inlines, costs about 2-5% performance\ninline  FORCE_INLINE Squeak_Interpreter* The_Squeak_Interpreter() { return &_interpreter;  }\n\n\nclass  Timeout_Timer_List_Head;\nextern Timeout_Timer_List_Head _timeout_head;\ninline FORCE_INLINE Timeout_Timer_List_Head* The_Timeout_Timer_List_Head() { return &_timeout_head; }\n\n\n# endif\n\n"
  },
  {
    "path": "vm/src/platform/shared_memory_message_queue.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\n# if !Use_PerSender_Message_Queue\n\nvoid Shared_Memory_Message_Queue::buffered_send_buffer(void* p, int size) {\n  buffered_channel.send(p, size);\n}\n\n\nvoid* Shared_Memory_Message_Queue::buffered_receive_from_anywhere(bool wait, Logical_Core** buffer_owner, Logical_Core* const me) {\n  do {\n    size_t size;\n    if (me->message_queue.buffered_channel.hasData()) {\n      *buffer_owner = me;\n      return (void*)me->message_queue.buffered_channel.receive(size);\n    }\n  }\n  while (wait);\n  *buffer_owner = NULL;\n  return NULL;\n}\n\n\nvoid Shared_Memory_Message_Queue::release_oldest_buffer(void* buffer_to_be_released_for_debugging) {\n  buffered_channel.releaseOldest(buffer_to_be_released_for_debugging);\n}\n\n\n\n# include <signal.h>\n\n\nvoid Shared_Memory_Message_Queue::send_message(abstractMessage_class* msg) {\n#warning STEFAN: needs to be refactored. Shared_Memory_Message_Queue_Per_Sender and Shared_Memory_Message_Queue have identical implementations.\n  \n  Message_Stats::collect_send_msg_stats(msg->header);\n  bool verbose = false;\n  switch(msg->header) {\n      // case Message_Statics::requestSafepointMessage:\n      // case Message_Statics::noMessage:\n    case Message_Statics::addObjectFromSnapshotMessage:\n    case Message_Statics::addObjectFromSnapshotResponse:\n    case Message_Statics::broadcastInterpreterDatumMessage:\n      verbose = false;\n  }\n  \n  if (verbose) lprintf( \"send_message about to send header %d, three words: 0x%x, 0x%x, 0x%x\\n\",\n                       msg->header, ((int*)msg)[0], ((int*)msg)[1], ((int*)msg)[2]);\n  \n  \n  if (verbose) lprintf( \"send_message about to send to %d, size: %d bytes, three words: 0x%x, 0x%x, 0x%x\\n\",\n                       cpu_core_my_rank(), msg->size_for_transmission_and_copying(), ((int*)msg)[0], ((int*)msg)[1], ((int*)msg)[2]);\n  \n  buffered_send_buffer(msg, msg->size_for_transmission_and_copying());\n  \n  if (verbose) lprintf( \"send_message sent\\n\");\n}\n\n# endif // !Use_PerSender_Message_Queue\n"
  },
  {
    "path": "vm/src/platform/shared_memory_message_queue.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if !On_Tilera\n\nclass Shared_Memory_Message_Queue : public Abstract_Message_Queue {\nprotected:\n  #if Use_BufferedChannelDebug\n    BufferedChannelDebug buffered_channel;\n  #else\n    BufferedChannel      buffered_channel;\n  #endif\n\npublic:\n  Shared_Memory_Message_Queue() :\n    #if Use_BufferedChannelDebug\n      buffered_channel(BufferedChannelDebug()) {}\n    #else\n      buffered_channel(BufferedChannel(Number_Of_Channel_Buffers, Message_Statics::max_message_size())) {}\n    #endif\n  \n  \n  void send_message(abstractMessage_class*);\n  \n  void buffered_send_buffer(void*, int);\n  static void* buffered_receive_from_anywhere(bool wait, Logical_Core** buffer_owner, Logical_Core* const receiver);\n  void release_oldest_buffer(void*);\n  \n  \n  static bool are_data_available(Logical_Core* const /* receiver */) {\n    // TODO STEFAN: was never implemented for buffered channels, \n    //    there is no api on tilera for that, on x86 I should fix my queue,\n    //    or measure whether the debug version would slow it down,\n    //    if it would use hasData() to implement this here.\n    return false; //buffered_channel.hasData();\n  }\n  \n};\n\n# endif\n"
  },
  {
    "path": "vm/src/platform/shared_memory_message_queue_per_sender.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\n# if Use_PerSender_Message_Queue\n\nvoid Shared_Memory_Message_Queue_Per_Sender::buffered_send_buffer(void* p, int size) {\n  buffered_channels[Logical_Core::my_rank()].channel.send(p, size);\n}\n\n\nvoid* Shared_Memory_Message_Queue_Per_Sender::buffered_receive_from_anywhere(bool wait, Logical_Core** buffer_owner, Logical_Core* const me) {\n  do {\n    size_t size;\n    FOR_ALL_OTHER_RANKS(i) {\n      if (me->message_queue.buffered_channels[i].channel.hasData()) {\n        *buffer_owner = me;\n        return (void*)me->message_queue.buffered_channels[i].channel.receive(size);\n      }\n    }\n    OS_Interface::mem_fence();\n  }\n  while (wait);\n  *buffer_owner = NULL;\n  return NULL;\n}\n\n\nvoid Shared_Memory_Message_Queue_Per_Sender::release_oldest_buffer(void* buffer_to_be_released_for_debugging) {\n  Memory_Semantics::shared_free(buffer_to_be_released_for_debugging);\n}\n\n\n\n# include <signal.h>\n\n\nvoid Shared_Memory_Message_Queue_Per_Sender::send_message(abstractMessage_class* msg) {\n#warning STEFAN: needs to be refactored. Shared_Memory_Message_Queue_Per_Sender and Shared_Memory_Message_Queue have identical implementations.\n  \n  Message_Stats::collect_send_msg_stats(msg->header);\n  bool verbose = false;\n  switch(msg->header) {\n      // case Message_Statics::requestSafepointMessage:\n      // case Message_Statics::noMessage:\n    case Message_Statics::addObjectFromSnapshotMessage:\n    case Message_Statics::addObjectFromSnapshotResponse:\n    case Message_Statics::broadcastInterpreterDatumMessage:\n      verbose = false;\n  }\n  \n  if (verbose) lprintf( \"send_message about to send header %d, three words: 0x%x, 0x%x, 0x%x\\n\",\n                       msg->header, ((int*)msg)[0], ((int*)msg)[1], ((int*)msg)[2]);\n  \n  \n  if (verbose) lprintf( \"send_message about to send to %d, size: %d bytes, three words: 0x%x, 0x%x, 0x%x\\n\",\n                       cpu_core_my_rank(), msg->size_for_transmission_and_copying(), ((int*)msg)[0], ((int*)msg)[1], ((int*)msg)[2]);\n  \n  buffered_send_buffer(msg, msg->size_for_transmission_and_copying());\n  \n  if (verbose) lprintf( \"send_message sent\\n\");\n}\n\n# endif // !Use_PerSender_Message_Queue\n"
  },
  {
    "path": "vm/src/platform/shared_memory_message_queue_per_sender.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if !On_Tilera\n\nclass Shared_Memory_Message_Queue_Per_Sender : public Abstract_Message_Queue {\nprotected:\n  #if Use_BufferedChannelDebug\n  struct {\n    BufferedChannelDebug channel;\n    // TODO: STEFAN: this is ad-hoc but does the job for the moment, should be changed\n    # define INTEL_CACHELINE_SIZE 64\n    # define SIZE_TO_FIT_IN_CHANNEL (INTEL_CACHELINE_SIZE * 2)\n    char cacheline_alignment[SIZE_TO_FIT_IN_CHANNEL - sizeof(BufferedChannelDebug)];\n  } buffered_channels[Max_Number_Of_Cores];\n  #else\n    BufferedChannel      buffered_channel;\n  #endif\n\npublic:\n  Shared_Memory_Message_Queue_Per_Sender()\n    #if Use_BufferedChannelDebug\n      {}\n    #else\n      : buffered_channel(BufferedChannel(Number_Of_Channel_Buffers, Message_Statics::max_message_size())) {}\n    #endif\n  \n  \n  void send_message(abstractMessage_class*);\n  \n  void buffered_send_buffer(void*, int);\n  static void* buffered_receive_from_anywhere(bool wait, Logical_Core** buffer_owner, Logical_Core* const receiver);\n  void release_oldest_buffer(void*);\n  \n  \n  static bool are_data_available(Logical_Core* const /* receiver */) {\n    // TODO STEFAN: was never implemented for buffered channels, \n    //    there is no api on tilera for that, on x86 I should fix my queue,\n    //    or measure whether the debug version would slow it down,\n    //    if it would use hasData() to implement this here.\n    return false; //buffered_channel.hasData();\n  }\n  \n};\n\n# endif\n"
  },
  {
    "path": "vm/src/platform/thread_memory_semantics.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# include \"headers.h\"\n\n\n#pragma mark Memory System\n\n# if !Replicate_PThread_Memory_System\n  Memory_System _memory_system;\n  void Thread_Memory_Semantics::initialize_memory_system() {}\n  void Thread_Memory_Semantics::initialize_local_memory_system() {}\n# else\n  # if Use_ThreadLocals\n    __thread Memory_System* Thread_Memory_Semantics::memory_system = NULL;\n\n    void Thread_Memory_Semantics::initialize_memory_system() {}\n\n    void Thread_Memory_Semantics::initialize_local_memory_system() {\n      memory_system = new Memory_System();\n    }\n  # else\n    pthread_key_t Thread_Memory_Semantics::memory_system_key = 0;\n\n    void Thread_Memory_Semantics::initialize_memory_system() {\n      pthread_key_create(&memory_system_key, _dtor_memory_system_key);\n    }\n\n    void Thread_Memory_Semantics::_dtor_memory_system_key(void* local_obj) {\n      Memory_System* mem_sys = (Memory_System*)local_obj;\n      delete mem_sys;\n    }\n\n    void Thread_Memory_Semantics::initialize_local_memory_system() {\n      Memory_System* mem_sys = new Memory_System();\n      pthread_setspecific(memory_system_key, mem_sys);\n    }\n  # endif  // !Use_ThreadLocals\n# endif // Replicate_PThread_Memory_System\n\n#pragma mark Interpreter\n\n# if Force_Direct_Squeak_Interpreter_Access\n  Squeak_Interpreter _interpreter;\n  void Thread_Memory_Semantics::initialize_interpreter() { }\n# else\n  # if Use_ThreadLocals\n    __thread Squeak_Interpreter* Thread_Memory_Semantics::interpreter = NULL;\n\n    void Thread_Memory_Semantics::initialize_interpreter() {}\n\n    void Thread_Memory_Semantics::initialize_local_interpreter() {\n      interpreter = new Squeak_Interpreter();\n    }\n\n  # else\n    pthread_key_t Thread_Memory_Semantics::interpreter_key;\n\n    void Thread_Memory_Semantics::initialize_interpreter() {\n      interpreter_key = 0;\n      pthread_key_create(&interpreter_key, _dtor_interpreter);\n    }\n\n    void Thread_Memory_Semantics::_dtor_interpreter(void* local) {\n      Squeak_Interpreter* interp = (Squeak_Interpreter*)local;\n      delete interp;\n    }\n\n    void Thread_Memory_Semantics::initialize_local_interpreter() {\n      Squeak_Interpreter* interp = new Squeak_Interpreter();\n      \n      assert(interpreter_key != 0 /* i.e. thread local storage is initialized */);\n      \n      pthread_setspecific(interpreter_key, interp);\n    }\n  # endif // !Use_ThreadLocals\n# endif // Force_Direct_Squeak_Interpreter_Access\n\n\n#pragma mark Timeout Timers\n\n# if !Force_Direct_Timeout_Timer_List_Head_Access\n  # if Use_ThreadLocals\n    __thread Timeout_Timer_List_Head* Thread_Memory_Semantics::timeout_head = NULL;\n\n    void Thread_Memory_Semantics::initialize_timeout_timer() {}\n\n    void Thread_Memory_Semantics::initialize_local_timeout_timer() {\n      timeout_head = new Timeout_Timer_List_Head();\n    }\n  # else\n    pthread_key_t Thread_Memory_Semantics::timeout_key;\n\n    void Thread_Memory_Semantics::initialize_timeout_timer() {\n      timeout_key = 0;\n      pthread_key_create(&timeout_key, _dtor_timeout);\n    }\n\n    void Thread_Memory_Semantics::_dtor_timeout(void* local_head) {\n      Timeout_Timer_List_Head* head = (Timeout_Timer_List_Head*)local_head;\n      delete head;\n    }\n\n    void Thread_Memory_Semantics::initialize_local_timeout_timer() {\n      Timeout_Timer_List_Head* head = new Timeout_Timer_List_Head();\n      pthread_setspecific(timeout_key, head);\n    }\n  # endif // !Use_ThreadLocals\n# endif // !Force_Direct_Timeout_Timer_List_Head_Access\n\n\n#pragma mark Miscellaneous\n\n# if Use_ThreadLocals\n  __thread Logical_Core* Thread_Memory_Semantics::_my_core = NULL;\n\n  void Thread_Memory_Semantics::initialize_logical_cores() {\n    initialize_local_logical_core();\n  }\n\n  Logical_Core* Thread_Memory_Semantics::my_core() {\n    assert(_my_core != NULL);\n    return _my_core;\n  }\n# else\n  pthread_key_t Thread_Memory_Semantics::my_core_key = 0;\n\n  void Thread_Memory_Semantics::initialize_logical_cores() {\n    my_core_key = 0;\n    pthread_key_create(&my_core_key, _dtor_my_core_key);\n    assert_always(my_core_key != 0);\n    initialize_local_logical_core();\n  }\n\n  Logical_Core* Thread_Memory_Semantics::my_core() {\n    assert(my_core_key != 0);\n    return (Logical_Core*)pthread_getspecific(my_core_key);\n  }\n# endif // !Use_ThreadLocals\n\n\nvoid Thread_Memory_Semantics::initialize_local_logical_core() {\n  initialize_local_logical_core(Memory_Semantics::get_group_rank());\n}\n\n\nvoid Thread_Memory_Semantics::initialize_local_logical_core(int rank) {\n# if Use_ThreadLocals\n  _my_core = &logical_cores[rank];\n# else\n  pthread_setspecific(my_core_key, &logical_cores[rank]);\n# endif // !Use_ThreadLocals\n  initialize_local_timeout_timer();\n  if (!Logical_Core::running_on_main())\n    initialize_local_interpreter(); // must precede argument processing\n  initialize_local_memory_system();\n}\n\n\nint Thread_Memory_Semantics::my_rank() {\n  assert(cores_are_initialized());\n  return my_core()->rank();\n}\n\n\nu_int64 Thread_Memory_Semantics::my_rank_mask() {\n  assert(cores_are_initialized());\n  return my_core()->rank_mask();\n}\n\n"
  },
  {
    "path": "vm/src/platform/thread_memory_semantics.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if Using_Threads\n\nclass Timeout_Timer_List_Head;\n\nclass Thread_Memory_Semantics : public Abstract_Memory_Semantics {\n\n#pragma mark Memory System\n  \n// It is not necessary to replicate the memory system in shared-memory\n// environments, this is the standard case for the RVM.\n// However, to have a version with equal functionallity, this flag can be\n// used to enforce replication.\n# if  Replicate_PThread_Memory_System\nprivate:\n  static void _dtor_memory_system_key(void* local_obj);\npublic:\n  # if Use_ThreadLocals\n    static __thread Memory_System* memory_system;\n  # else\n    static pthread_key_t memory_system_key;\n  # endif // !Use_ThreadLocals\n# endif\n  \npublic:\n  static void initialize_memory_system();\n  static void initialize_local_memory_system();\n\n\n#pragma mark Interpreter\n  \n# if !Force_Direct_Squeak_Interpreter_Access\n  // For test it can be enforced to use the same strategy as for processes\n  // to allocate the interpreter, but that is usually not done.\n  // Furthermore, if Force_Direct_Squeak_Interpreter_Access would be set,\n  // the RVM could only use a single core.\n  # if Use_ThreadLocals\n  public:\n    static __thread Squeak_Interpreter* interpreter;\n  # else\n  private:\n    static void _dtor_interpreter(void* interpreter);\n  public:\n    static pthread_key_t interpreter_key;\n  # endif // !Use_ThreadLocals\n# endif\n  \n  static void initialize_interpreter();\n  static void initialize_local_interpreter();\n  \n#pragma mark Timeout Timers\n  \n# if Force_Direct_Timeout_Timer_List_Head_Access\nprivate:\n  static Timeout_Timer_List_Head _head;\npublic:\n  static void initialize_timeout_timer()       {}\n  static void initialize_local_timeout_timer() {}\n  \n# else\n  # if Use_ThreadLocals\n    static __thread Timeout_Timer_List_Head* timeout_head;\n  # else\n  private:\n    static void _dtor_timeout(void* local_head);\n  public:\n    static pthread_key_t timeout_key;\n  # endif // !Use_ThreadLocals\n  static void initialize_timeout_timer();\n  static void initialize_local_timeout_timer();\n# endif\n\n\n#pragma mark Miscellaneous\n  \nprivate:\n# if Use_ThreadLocals\n  static __thread Logical_Core* _my_core;\n# else\n  static pthread_key_t my_core_key;\n  \n  static void _dtor_my_core_key(void*) {\n    pthread_setspecific(my_core_key, NULL);\n  }\n# endif // if !Use_ThreadLocals\n\npublic:\n# if Use_ThreadLocals\n  static inline bool cores_are_initialized() { return _my_core != NULL; }\n# else\n  static inline bool cores_are_initialized() { return my_core_key != 0; }\n# endif\n  \n  static const size_t max_num_threads_on_threads_or_1_on_processes = Max_Number_Of_Cores;\n  \n  static Logical_Core* my_core();\n  static int           my_rank();\n  static u_int64       my_rank_mask();\n  static inline size_t rank_on_threads_or_zero_on_processes() { return my_rank(); } \n\n  static void initialize_logical_cores();\n  static void initialize_local_logical_core();\n  static void initialize_local_logical_core(int rank);\n\n  \n  static void go_parallel(void (*helper_core_main)(), char* argv[]) { \n    OS_Interface::start_threads(helper_core_main, argv);\n  }\n  \n  static inline int get_group_rank() { return OS_Interface::get_thread_rank(); }\n  \n  static inline void* shared_malloc(u_int32 sz) {\n    return malloc(sz);\n  }\n  static inline void* shared_calloc(u_int32 num_members, u_int32 mem_size)  {\n    return calloc(num_members, mem_size);\n  }\n  static inline void  shared_free(void* ptr) {\n    free(ptr);\n  }\n      \n  static inline bool is_using_threads() { return true; }\n};\n\n#pragma mark -\n#pragma mark Global Accessor Functions\n\nclass Memory_System;\n# if  !Replicate_PThread_Memory_System\n  extern Memory_System _memory_system;\n\n  inline FORCE_INLINE Memory_System* The_Memory_System() {\n    return &_memory_system;\n  }\n# else\n  # if Use_ThreadLocals\n    inline FORCE_INLINE Memory_System* The_Memory_System() {\n      assert(Memory_Semantics::memory_system != NULL /* ensure it is initialized */);\n      return Memory_Semantics::memory_system;\n    }\n  # else\n    inline FORCE_INLINE Memory_System* The_Memory_System() {\n      assert(Memory_Semantics::memory_system_key != 0 /* ensure it is initialized */);\n      return (Memory_System*)pthread_getspecific(Memory_Semantics::memory_system_key);\n    }\n  # endif // !Use_ThreadLocals\n# endif\n\n\n\n# if Force_Direct_Squeak_Interpreter_Access\n  extern Squeak_Interpreter _interpreter;\n\n  //#define The_Squeak_Interpreter() (&_interpreter)\n  // At least the Tilera compiler does not like the inlines, costs about 2-5% performance\n  inline FORCE_INLINE Squeak_Interpreter* The_Squeak_Interpreter() { return &_interpreter;  }\n# else\n  # if Use_ThreadLocals\n    inline FORCE_INLINE Squeak_Interpreter* The_Squeak_Interpreter() {\n      assert(Memory_Semantics::interpreter != NULL /* ensure it is initialized */);\n      return Memory_Semantics::interpreter;\n    }\n  # else\n    inline FORCE_INLINE Squeak_Interpreter* The_Squeak_Interpreter() {\n      assert(Memory_Semantics::interpreter_key != 0 /* ensure it is initialized */);\n      return (Squeak_Interpreter*)pthread_getspecific(Memory_Semantics::interpreter_key);\n    }\n  # endif\n# endif\n\nclass Timeout_Timer_List_Head;\n# if Force_Direct_Timeout_Timer_List_Head_Access\n  extern Timeout_Timer_List_Head _timeout_head;\n\n  inline FORCE_INLINE Timeout_Timer_List_Head* The_Timeout_Timer_List_Head() {\n    return &_head;\n  }\n# else\n  # if Use_ThreadLocals\n    inline FORCE_INLINE Timeout_Timer_List_Head* The_Timeout_Timer_List_Head() {\n      return Memory_Semantics::timeout_head;\n    }\n  # else\n    inline FORCE_INLINE Timeout_Timer_List_Head* The_Timeout_Timer_List_Head() {\n      return (Timeout_Timer_List_Head*)pthread_getspecific(Memory_Semantics::timeout_key);\n    }\n  # endif // !Use_ThreadLocals\n# endif\n\n# endif // Using_Threads\n\n"
  },
  {
    "path": "vm/src/platform/tile_cpu_coordinate.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# include \"headers.h\"\n\n# if On_Tilera\n\nint Tile_CPU_Coordinate::_my_x = -1;\nint Tile_CPU_Coordinate::_my_y = -1;\n\nvoid Tile_CPU_Coordinate::initialize(int /* rank */) {\n  /*if (rank == Logical_Core::my_rank()  &&  (x != _my_x || y != _my_y)) {\n    fprintf(stderr, \"_my_x: %d, _my_y: %d\\n\", _my_x, _my_y);\n    fatal(\"x and y?\");\n  }*/\n}\n\n\nint Tile_CPU_Coordinate::width;\nint Tile_CPU_Coordinate::height;\n\nint Tile_CPU_Coordinate::center_x;\nint Tile_CPU_Coordinate::center_y;\nint Tile_CPU_Coordinate::center_rank;\n\nint Tile_CPU_Coordinate::main_x;\nint Tile_CPU_Coordinate::main_y;\n\n\n\n\nvoid Tile_CPU_Coordinate::set_width_height(int w, int h) {\n  if (Measure_Communication) {\n    if (Logical_Core::running_on_main())\n      fprintf(stderr, \"Measure_Communication is set; overriding your settings for width and height\\n\");\n    really_set_width_height(1, 2);\n  }\n  else\n    really_set_width_height(w, h);\n}\n\n\nvoid Tile_CPU_Coordinate::really_set_width_height(int w, int h) {\n  width = w,  height = h;\n  \n  center_x = (width-1) / 2,  center_y = (height-1) / 2;\n  center_rank = center_x  +  center_y * width;\n  \n  \n  Logical_Core::main_rank = center_rank;\n  main_x = center_x;  main_y = center_y;\n  \n  if (Logical_Core::running_on_main())\n    fprintf(stderr, \"width, height  ==  %d, %d\\n\", width, height);\n}\n\n\nOop Tile_CPU_Coordinate::get_stats() {\n  \n  int s = The_Squeak_Interpreter()->makeArrayStart();\n  int mainRank = Logical_Core::main_rank;\n  int mainX = CPU_Coordinate::main_x, mainY = CPU_Coordinate::main_y;\n  PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(mainX);\n  PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(mainY);\n  PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(mainRank);\n  PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(CPU_Coordinate::width);\n  PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(CPU_Coordinate::height);\n  \n  int groupSize = Logical_Core::group_size;\n  PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(groupSize);\n  PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(Logical_Core::remaining);\n  \n  Oop groupStats = The_Squeak_Interpreter()->makeArray(s);\n  PUSH_WITH_STRING_FOR_MAKE_ARRAY(groupStats);\n  \n  return The_Squeak_Interpreter()->makeArray(s);\n}\n\n\n# endif // On_Tilera\n\n"
  },
  {
    "path": "vm/src/platform/tile_cpu_coordinate.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Tile_CPU_Coordinate : public Abstract_CPU_Coordinate {\npublic:\n  \n  bool print(char* buf, int buf_size) {\n    snprintf(buf, buf_size, \"%d, %d\", _my_x, _my_y);\n    return true;\n  }\n  \n  \n  \n  static int _my_x, _my_y;\n  static int center_x, center_y;               // threadsafe, read only after init, Stefan: 2009-09-06\n  static int center_rank;                      // threadsafe, read only after init, Stefan: 2009-09-06\n  static int main_x, main_y;                   // threadsafe, read only after init, Stefan: 2009-09-06\n  \n  static  int width, height;                   // threadsafe, read only after init, Stefan: 2009-09-06\n  static void set_width_height(int w, int h);  // threadsafe, read only after init, Stefan: 2009-09-06\n\n  \n  static bool is_center() { return _my_x == center_x  &&  _my_y == center_y; }\n  static int my_x() { return _my_x; }\n  static int my_y() { return _my_y; }\n\n  static void initialize_all_cores();\n         void initialize(int rank);\n  static bool is_initialized() { return true; }\n\n\n  static Oop get_stats();\n  \nprivate:\n  static void really_set_width_height(int, int);\n};\n\n"
  },
  {
    "path": "vm/src/platform/tmc_os_interface.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if On_Tilera_With_GCC\n\n#include \"headers.h\"\n\n/*\n STEFAN: Discuss with david why he needed uncacheable here \n \n static TMC_OS_Interface::OS_Heap os_heap;\nstatic bool created = false;\n\nvoid* TMC_OS_Interface::malloc_uncacheable_shared(int alignment, int size) {\n  if (alignment == 0)\n    alignment = ilib_mem_get_cacheline_size();\n  \n  if (!created) {\n    int err = ilib_mem_create_heap(ILIB_MEM_UNCACHEABLE | ILIB_MEM_SHARED,\n                                   &us_heap);\n    abort_if_error(\"malloc_uncacheable_shared\", err);\n    created = true;\n  }\n  void* r = ilib_mem_memalign_heap(us_heap, alignment, size);\n  if (r == NULL)\n    fatal(\"malloc_uncacheable_shared\");\n  return r;\n}*/\n\n\n\nvoid TMC_OS_Interface::start_processes(void (*helper_core_main)(), char* argv[]) {\n  // go parallel; one core returns; others run helper_core_main fn\n  \n  # warning STEFAN: refactor, add a setter method for initializing those values.\n  Logical_Core::remaining = ilib_proc_remaining();\n  Logical_Core::group_size = ilib_group_size(ILIB_GROUP_SIBLINGS);\n  Memory_Semantics::_my_rank = ilib_group_rank(ILIB_GROUP_SIBLINGS);\n  Memory_Semantics::_my_rank_mask = 1LL << u_int64(Memory_Semantics::_my_rank);\n  CPU_Coordinate::_my_x = udn_tile_coord_x();\n  CPU_Coordinate::_my_y = udn_tile_coord_y();\n  \n  if (Logical_Core::group_size == 1  &&  Logical_Core::group_size < Logical_Core::num_cores) {\n    ilibProcParam params;\n    memset(&params, 0, sizeof(params));\n    params.num_procs = Logical_Core::num_cores;\n    params.binary_name = NULL;\n    params.argv = argv;\n    \n    params.tiles.x      = params.tiles.y = 0;\n    params.tiles.width  = CPU_Coordinate::width;\n    params.tiles.height = CPU_Coordinate::height;\n    \n    // skip params.init_block/size\n\n    lprintf(\"Will ask for num_proc: %d on w:%d;h:%d\\n\", params.num_procs, params.tiles.width, params.tiles.height);\n    \n    int err = ilib_proc_exec(1, &params);\n    abort_if_error(\"exec\", err);\n    die(\"impossible\");\n  }\n  \n  Logical_Core::initialize_all_cores();\n  Memory_Semantics::_my_core = &logical_cores[Memory_Semantics::_my_rank];\n  \n  Memory_Semantics::initialize_interpreter();\n  Memory_Semantics::initialize_local_interpreter();\n  \n  ILib_Message_Queue::setup_channels();\n  \n  if (Measure_Communication)\n    Logical_Core::my_core()->message_queue.measure_communication();\n  \n  // lprintf(\"is_center: %s, center_rank: %d, main_rank: %d, my_rank: %d\\n\",\n  //         CPU_Coordinate::is_center() ? \"true\" : \"false\",\n  //         CPU_Coordinate::center_rank,\n  //         Logical_Core::main_rank,\n  //         Logical_Core::my_rank());\n  //\n  // lprintf(\"center_x: %d, center_y: %d, my_x: %d, my_y: %d\\n\",\n  //         Tile_CPU_Coordinate::center_x,\n  //         Tile_CPU_Coordinate::center_y,\n  //         Tile_CPU_Coordinate::_my_x,\n  //         Tile_CPU_Coordinate::_my_y);\n  \n  if (CPU_Coordinate::is_center() != (CPU_Coordinate::center_rank == Logical_Core::my_rank()))\n    fatal(\"center_rank is wrong\\n\");\n  \n  if (Logical_Core::running_on_main()) {\n    fprintf(stdout, \"spawned %d helpers\\n\", Logical_Core::group_size - 1);\n    return;\n  }\n  else {\n    (*helper_core_main)();\n    char buf[BUFSIZ];\n    Logical_Core::my_print_string(buf, sizeof(buf));\n    lprintf( \"helper finsihed: %s\\n\", buf);\n    rvm_exit();\n  }\n  \n}\n\n\nint TMC_OS_Interface::abort_if_error(const char* msg, int err) {\n  if (err >= 0)  return err;\n  lprintf( \"%s failed: %s\\n\", msg, ilib_debug_strerror(err));\n  abort();\n  return 0;\n}\n\n\n\n\n# endif // On_Tilera\n"
  },
  {
    "path": "vm/src/platform/tmc_os_interface.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if On_Tilera_With_GCC\n\n# include <arch/atomic.h>\n# include <tmc/spin.h>\n# include <tmc/mspace.h>\n# include <tmc/task.h>\n# include <tmc/cpus.h>\n\n/* The page size values correspond to the systems standard of Tilera MDE 3.0.1\n   PAGE_SIZE       == getpagesize() \n   LARGE_PAGE_SIZE == tmc_alloc_get_huge_pagesize() */\n# define PAGE_SIZE 64 * 1024\n# define LARGE_PAGE_SIZE 16 * Mega\n\nclass TMC_OS_Interface : public Abstract_OS_Interface {\npublic:\n  \n  static inline void abort() __attribute__((noreturn))  { ::abort(); }\n  static inline void die(const char* err_msg) __attribute__((noreturn)) { tmc_task_die(err_msg); }\n  static inline void exit() __attribute__((noreturn)) {\n    // set_sim_tracing(SIM_TRACE_NONE);\n    profiler_disable();\n    tmc_task_terminate_app();\n    ::exit(0);\n  }\n  \n  static inline void initialize() {}\n  \n  static inline void ensure_Time_Machine_backs_up_run_directory() {}\n  \n  \n  static inline void profiler_enable()  { sim_profiler_enable();  }\n  static inline void profiler_disable() { sim_profiler_disable(); }\n  static inline void profiler_clear()   { sim_profiler_clear();   }\n  static inline void sim_end_tracing()  { sim_set_tracing(SIM_TRACE_NONE); };\n  \n  # if 0\n    typedef u_int64 get_cycle_count_quickly_t;\n    # define GET_CYCLE_COUNT_QUICKLY OS_Interface::get_cycle_count\n    # define GET_CYCLE_COUNT_QUICKLY_FMT \"%lld\"\n  # else\n    typedef uint32_t get_cycle_count_quickly_t;\n    # define GET_CYCLE_COUNT_QUICKLY  get_cycle_count_low\n    # define GET_CYCLE_COUNT_QUICKLY_FMT \"%ld\"\n  # endif\n  static inline u_int64 get_cycle_count() { return ::get_cycle_count(); }\n\n  \n  typedef tmc_spin_mutex_t Mutex;\n  \n  static inline void mutex_init(Mutex* mutex, const void* = NULL) {\n    tmc_spin_mutex_init(mutex);\n  }\n  \n  static inline void mutex_destruct(Mutex* mutex) {}\n  \n  static inline int mutex_lock(Mutex* mutex) {\n    tmc_spin_mutex_lock(mutex);\n    return 0;\n  }\n  \n  static inline bool mutex_trylock(Mutex* mutex) {\n    return 0 == tmc_spin_mutex_trylock(mutex);\n  }\n  \n  static inline int mutex_unlock(Mutex* mutex) {\n    tmc_spin_mutex_unlock(mutex);\n    return 0;\n  }\n  \n  static inline int atomic_fetch_and_add(int* mem, int increment) {\n    return atomic_add(mem, increment);\n  }\n  \n  /**\n   * Atomically compare the memory location with the old value, and \n   * if they are equal set the new value and return true, false otherwise.\n   */\n  static inline bool atomic_compare_and_swap(int* ptr, int old_value, int new_value) {\n    return atomic_bool_compare_and_exchange(ptr, old_value, new_value);\n  }\n  \n  /**\n   * Atomically compare the memory location with the old value, and \n   * if they are equal set the new value, otherwise don't set anything.\n   * \n   * Returns the initial value at ptr.\n   */\n  static inline int atomic_compare_and_swap_val(int* ptr, int old_value, int new_value) {\n    return atomic_val_compare_and_exchange(ptr, old_value, new_value);\n  }\n  \n    \n  static inline uint32_t leading_zeros(uint32_t x)    { return __insn_clz(x);  }\n  static inline uint32_t population_count(uint32_t x) { return __insn_pcnt(x); }\n  \n  // About tmc_cmem_init:\n  // It would be more sensible to call it indirectly from main, but static constructors\n  // run before main, so that won't work.\n  // It might seem better to only call it on the first allocation, which would require this code\n  // to keep and test a static flag. However, the Tilera documentation implies that the tmc_cmem_init\n  // routine itself handles this case, so why complicate our code to do it, too?\n  // See tile64/doc/html/application_libraries_reference/index.html\n  \n  \n  // Named rvm_?alloc_shared since Tilera headers are using macros with the same name\n  static inline void* rvm_malloc_shared(size_t sz) {\n    rvm_malloc_shared_init(); // called by static ctor, so need to do it here, sigh\n    return tmc_cmem_malloc(sz);\n  }\n  static inline void* rvm_calloc_shared(size_t num_members, size_t mem_size)  {\n    rvm_malloc_shared_init(); // called by static ctor, so need to do it here, sigh\n    return tmc_cmem_calloc(num_members, mem_size);\n  }\nprivate:\n  static inline void rvm_malloc_shared_init() {  \n    abort_if_error(\"tmc_cmem_init failed\", tmc_cmem_init(0)); \n  }\npublic:\n  \n  typedef tmc_mspace OS_Heap;\n  \n  static inline void* rvm_memalign(int al, int sz)               { return tmc_cmem_memalign(al, sz); }\n  static inline void* rvm_memalign_shared(OS_Heap heap, int al, int sz) { return tmc_mspace_memalign(heap, al, sz); }\n  static        void* malloc_uncacheable_shared(int alignment, int size){ return rvm_memalign(alignment, size); }\n  static inline void  invalidate_mem(void* ptr, size_t size)     { tmc_mem_inv(ptr, size); }\n  static inline void  mem_flush(void* ptr, size_t size)          { tmc_mem_flush(ptr, size); }\n  static inline void  mem_fence()                                { tmc_mem_fence(); }\n  static inline int   mem_create_heap_if_on_Tilera(OS_Heap* heap, bool replicate) {\n    tmc_alloc_t flags = TMC_ALLOC_INIT;\n    if (replicate)\n      tmc_alloc_set_home(&flags, TMC_ALLOC_HOME_INCOHERENT);\n    \n    *heap = tmc_mspace_create_special(0, 0, &flags);\n    return 0;\n  }\n  \n  static inline int get_process_rank() { return tmc_cpus_get_task_current_cpu(tmc_task_gettid()); }\n  \n  static void start_processes(void (*helper_core_main)(), char* argv[]);\n  \n  static int abort_if_error(const char*, int); \n\n  /**\n  * this is a local spin, it avoids putting any memory presure\n  * on the tile network while waiting for a few instruction\n  * busy-local-only-loop\n  */\n  static inline void yield_or_spin_a_bit() {\n    float a = 0.0;\n    for (int i = 0;  i < 50;  i++)  a += i;\n  }\n\n};\n\n# endif\n"
  },
  {
    "path": "vm/src/primitives/RVMPlugin.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# include \"headers.h\"\n# include \"sys/time.h\"\n# include <time.h>\n# include <math.h>\n\n\nstatic const char *moduleName =\n#ifdef SQUEAK_BUILTIN_PLUGIN\n\"RVMPlugin v1.5 14 April 2008 (i)\"\n#else\n\"RVMPlugin v1.5 14 April 2008 (e)\"\n#endif\n;\n\nstatic u_int64 cycle_count_at_last_sample[Memory_Semantics::max_num_threads_on_threads_or_1_on_processes] = { 0 };  // threadsafe\n\n\n/**\n * Was used to find a bug with sampling, primitives, and safepoint interaction.\n * Might still be usefull for other debugging purposes.  2011-05-23 dmu+sm\n */\nvoid* primitiveDebugSampleRVM() {\n  static int n = 0;\n  printf(\"<%d\", ++n);\n  Safepoint_for_moving_objects sp(\"primitiveDebugSampleRVM\"); // sends mesgs to other cores to allocate arrays, might cause GC\n  \n  switch (The_Squeak_Interpreter()->get_argumentCount()) {\n    case 0:\n     break;\n \n    default:\n      The_Squeak_Interpreter()->primitiveFail();\n      break;\n  }\n\n  printf(\">\");\n  return NULL;\n}\n\n\n\nvoid* primitiveSampleRVM() { \n  // Commented out the next line because otherwise there is potential for a deadlock\n  // if a core whom I ask for stats needs to do a GC to allocate the stats object. \n  // Seems to work, despite my earlier comment below. -- dmu 8/10\n  \n  // Safepoint_for_moving_objects sp(\"primitiveSampleRVM\"); // sends mesgs to other cores to allocate arrays, might cause GC, doesn't work right without this -- dmu 5/10\n  \n  int what_to_sample;\n   switch (The_Squeak_Interpreter()->get_argumentCount()) {\n    case 0:\n      what_to_sample = ~0;\n      break;\n\n    case 1:\n      what_to_sample = The_Squeak_Interpreter()->stackIntegerValue(0);\n      break;\n\n    default:\n      The_Squeak_Interpreter()->primitiveFail();\n      return 0;\n  }\n  if (The_Squeak_Interpreter()->failed()) { return 0; }\n\n  The_Squeak_Interpreter()->pop(The_Squeak_Interpreter()->get_argumentCount() + 1);\n\n  if ((what_to_sample & (1 << SampleValues::allCoreStats)) == 0) {\n    The_Squeak_Interpreter()->push(sample_one_core(what_to_sample));\n    return 0;\n  }\n  \n  int s = The_Squeak_Interpreter()->makeArrayStart();\n  if (what_to_sample & (1 << SampleValues::runMask)) {\n    Oop runMask = Object::positive64BitIntegerFor(The_Squeak_Interpreter()->run_mask());\n    PUSH_WITH_STRING_FOR_MAKE_ARRAY(runMask);\n  }\n  \n  if (what_to_sample & (1 << SampleValues::messageNames)) {\n    Oop messageNames = Message_Stats::get_message_names();\n    PUSH_WITH_STRING_FOR_MAKE_ARRAY(messageNames);\n  }\n  \n  if (what_to_sample & (1 << SampleValues::cpuCoreStats)) {\n    Oop cpuCoreStats = CPU_Coordinate::get_stats();\n    PUSH_WITH_STRING_FOR_MAKE_ARRAY(cpuCoreStats);\n  }\n  \n  if (what_to_sample & (1 << SampleValues::allCoreStats)) {\n    Oop allCoreStats = The_Interactions.sample_each_core(what_to_sample);\n    PUSH_WITH_STRING_FOR_MAKE_ARRAY(allCoreStats);\n  }\n\n  if (what_to_sample & (1 << SampleValues::fence)) {\n    Oop fence = The_Squeak_Interpreter()->fence() ? The_Squeak_Interpreter()->roots.trueObj :  The_Squeak_Interpreter()->roots.falseObj;\n    PUSH_WITH_STRING_FOR_MAKE_ARRAY(fence);\n  }\n\n  The_Squeak_Interpreter()->push(The_Squeak_Interpreter()->makeArray(s));\n  \n  return NULL;\n}\n\n\nOop sample_one_core(int what_to_sample) {\n  const int rank_on_threads_or_zero_on_processes = Memory_Semantics::rank_on_threads_or_zero_on_processes();\n\n  static int ms_buf[Memory_Semantics::max_num_threads_on_threads_or_1_on_processes] = { 0 };                                   // threadsafe\n  int* const ms = &(ms_buf[rank_on_threads_or_zero_on_processes]);\n\n  int millisecs = The_Squeak_Interpreter()->ioWhicheverMSecs() - (*ms);  (*ms) = (*ms) + millisecs;\n\n  const u_int64 current_cycles = OS_Interface::get_cycle_count();\n  const u_int64 cycles = current_cycles - cycle_count_at_last_sample[rank_on_threads_or_zero_on_processes];\n  cycle_count_at_last_sample[rank_on_threads_or_zero_on_processes] = current_cycles;\n\n  int s = The_Squeak_Interpreter()->makeArrayStart();\n  if (what_to_sample & (1 << SampleValues::millisecs))\n    PUSH_POSITIVE_32_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(millisecs);\n\n  if (what_to_sample & (1 << SampleValues::cycles))\n    PUSH_POSITIVE_64_BIT_INT_WITH_STRING_FOR_MAKE_ARRAY(cycles);\n\n  if (what_to_sample & (1 << SampleValues::messageStats)) {\n    Oop messageStats = Message_Stats::get_stats(what_to_sample);\n    PUSH_WITH_STRING_FOR_MAKE_ARRAY( messageStats );\n  }\n  if (what_to_sample & (1 << SampleValues::memorySystemStats)) {\n    Oop memorySystemStats = The_Memory_System()->get_stats(what_to_sample);\n    PUSH_WITH_STRING_FOR_MAKE_ARRAY(memorySystemStats);\n  }\n  if (what_to_sample & (1 << SampleValues::interpreterStats)) {\n    Oop interpreterStats = The_Squeak_Interpreter()->get_stats(what_to_sample);\n    PUSH_WITH_STRING_FOR_MAKE_ARRAY(interpreterStats);\n  }\n  if (what_to_sample & (1 << SampleValues::objectTableStats)) {\n    Oop objectTableStats = The_Memory_System()->object_table->get_stats(Logical_Core::my_rank());\n    PUSH_WITH_STRING_FOR_MAKE_ARRAY(objectTableStats);\n  }\n  if (what_to_sample & (1 << SampleValues::interactionStats)) {\n    Oop interactionsStats = The_Interactions.get_stats();\n    PUSH_WITH_STRING_FOR_MAKE_ARRAY(interactionsStats);\n  }\n\n  return The_Squeak_Interpreter()->makeArray(s);\n}\n\n\nvoid* primitiveBreakpoint() {\n  if (The_Squeak_Interpreter()->get_argumentCount()) { The_Squeak_Interpreter()->primitiveFail(); }\n  breakpoint();\n  return NULL;\n}\n\nvoid* primitiveRunMask() {\n  if (The_Squeak_Interpreter()->get_argumentCount() == 0) {\n    The_Squeak_Interpreter()->pop(1);\n    The_Squeak_Interpreter()->push(Object::positive64BitIntegerFor(The_Squeak_Interpreter()->run_mask()));\n    The_Squeak_Interpreter()->success(true);\n    return 0;\n  }\n  if (The_Squeak_Interpreter()->get_argumentCount() == 1) {\n    u_int64 old = The_Squeak_Interpreter()->run_mask();\n    u_int64 n = The_Squeak_Interpreter()->positive64BitValueOf(The_Squeak_Interpreter()->stackTop());\n    if (The_Squeak_Interpreter()->failed())  return 0;\n    if (n == 0)  n = ~n; // zero means all\n    u_int64 possible_cores = (1LL << u_int64(Logical_Core::group_size)) - 1;\n    if ( (n & possible_cores)  ==  0 ) {\n      The_Squeak_Interpreter()->primitiveFail();\n      return 0;\n    }\n    The_Squeak_Interpreter()->pop(2);\n    The_Squeak_Interpreter()->push(Object::positive64BitIntegerFor(old));\n    The_Squeak_Interpreter()->success(true);\n    The_Squeak_Interpreter()->set_run_mask_and_request_yield(n);\n    return 0;\n  }\n  The_Squeak_Interpreter()->success(false);\n  return 0;\n}\n\n\nvoid* primitiveSetCoordinatesFor() {\n  const bool print = false;\n  if (print)  lprintf(\"starting\\n\");\n  // Args are: object, rank (int), [mutability (int)]\n  Oop oop;\n  int rank;\n  int mutability;\n  const int c = Memory_System::read_write;  const int i = Memory_System::read_mostly; // compiler bug\n\n  switch (The_Squeak_Interpreter()->get_argumentCount()) {\n    case 2:\n      oop = The_Squeak_Interpreter()->stackObjectValue(1);\n      if (!The_Squeak_Interpreter()->successFlag) { return 0; }\n      rank = The_Squeak_Interpreter()->stackIntegerValue(0);\n      mutability = oop.mutability();\n      break;\n\n    case 3:\n      oop = The_Squeak_Interpreter()->stackObjectValue(2);\n      rank = The_Squeak_Interpreter()->stackIntegerValue(1);\n      mutability = The_Squeak_Interpreter()->booleanValueOf(The_Squeak_Interpreter()->stackValue(0)) ? c : i;\n      if (!The_Squeak_Interpreter()->successFlag) { return 0; }\n      break;\n\n    default: The_Squeak_Interpreter()->primitiveFail();  return 0;\n  }\n  if (print)  lprintf(\"params %d %d\\n\", rank, mutability);\n  Object_p obj = oop.as_object();\n  int32 total_bytes = obj->extra_header_bytes() + obj->sizeBits();\n\n  if ( rank < 0\n  ||  rank >= Logical_Core::group_size\n  ||  (mutability == Memory_System::read_mostly  &&  !obj->is_suitable_for_replication())\n  ||  !The_Memory_System()->heaps[rank][mutability]->sufficientSpaceToAllocate(2500 + total_bytes)) {\n    The_Squeak_Interpreter()->primitiveFail();\n  }\n  else {\n    The_Squeak_Interpreter()->popThenPush(The_Squeak_Interpreter()->get_argumentCount() + 1, oop);\n    obj->move_to_heap(rank, mutability, true);\n    if (print)  lprintf(\"success %d %d\\n\", rank, mutability);\n  }\n  return 0;\n}\n\n\nvoid* primitiveGetCore() {\n  // Return rank of receiver's core.\n  // Fail if receiver is smallInt.\n\n  if (The_Squeak_Interpreter()->get_argumentCount() != 1) { The_Squeak_Interpreter()->primitiveFail(); return 0; }\n  Oop rcvr = The_Squeak_Interpreter()->stackTop();\n  if (!rcvr.is_mem()) { The_Squeak_Interpreter()->primitiveFail(); return 0; }\n\n  Object_p ro = rcvr.as_object();\n  The_Squeak_Interpreter()->popThenPushInteger(2, The_Memory_System()->rank_for_address(ro));\n  return 0;\n}\n\n\nvoid* primitiveGetCoreIAmRunningOn() {\n  if (The_Squeak_Interpreter()->get_argumentCount() != 0) { The_Squeak_Interpreter()->primitiveFail(); return 0; }\n  The_Squeak_Interpreter()->popThenPushInteger(1, Logical_Core::my_rank());\n  return 0;\n}\n\n\nvoid* primitiveGetMutability() {\n  if (The_Squeak_Interpreter()->get_argumentCount() != 1) { The_Squeak_Interpreter()->primitiveFail(); return 0; }\n  Oop rcvr = The_Squeak_Interpreter()->stackTop();\n  if (!rcvr.is_mem()) { The_Squeak_Interpreter()->primitiveFail(); return 0; }\n\n  Object_p ro = rcvr.as_object();\n  The_Squeak_Interpreter()->pop(2);\n  The_Squeak_Interpreter()->pushBool(ro->is_read_write());\n  return 0;\n}\n\nextern int headless;\n\nvoid* primitiveRunsHeadless() {\n  if (The_Squeak_Interpreter()->get_argumentCount() != 0) { The_Squeak_Interpreter()->primitiveFail(); return 0; }\n  The_Squeak_Interpreter()->pop(1);\n  The_Squeak_Interpreter()->pushBool(headless);\n  return 0;\n}\n\n\n// args for the primitive are first core, last core, move_read_write_to_read_mostly, move_read_mostly_to_read_write\nvoid* shuffle_or_spread(bool spread)  {\n  Oop first, last;\n  int f = 0, L = Logical_Core::group_size - 1;\n  bool move_read_write_to_read_mostly = false,  move_read_mostly_to_read_write = false;\n  switch (The_Squeak_Interpreter()->get_argumentCount()) {\n    default: break;\n    case 4:\n      move_read_write_to_read_mostly = The_Squeak_Interpreter()->booleanValueOf(The_Squeak_Interpreter()->stackValue(1));\n      move_read_mostly_to_read_write = The_Squeak_Interpreter()->booleanValueOf(The_Squeak_Interpreter()->stackValue(0));\n      if (!The_Squeak_Interpreter()->successFlag) return 0;\n      // FALL THROUGH\n    case 2:\n      first = The_Squeak_Interpreter()->stackValue(The_Squeak_Interpreter()->get_argumentCount() - 1);\n      last  = The_Squeak_Interpreter()->stackValue(The_Squeak_Interpreter()->get_argumentCount() - 2);\n      if (!first.is_int() ||  !last.is_int())  break;\n      f = first.integerValue();\n      L = last.integerValue();\n      if (!(0 <= f  &&  f <= L  &&  L < Logical_Core::group_size))\n        break;\n      // FALL THROUGH\n    case 0:\n      if (!The_Memory_System()->shuffle_or_spread(f, L, move_read_write_to_read_mostly, move_read_mostly_to_read_write, spread))\n        break;\n      The_Squeak_Interpreter()->pop(The_Squeak_Interpreter()->get_argumentCount());\n      return 0;\n  }\n  The_Squeak_Interpreter()->primitiveFail();\n  return 0;\n}\n\n\nvoid* primitiveShuffle() { return shuffle_or_spread(false); }\nvoid* primitiveSpread()  { return shuffle_or_spread(true); }\n\n\nvoid* primitiveMoveAllToReadMostlyHeaps() {\n  switch (The_Squeak_Interpreter()->get_argumentCount()) {\n    default: break;\n    case 0:\n      if (!The_Memory_System()->moveAllToRead_MostlyHeaps())\n        break;\n      return 0;\n  }\n  The_Squeak_Interpreter()->primitiveFail();\n  return 0;\n}\n\n\nvoid* primitiveTraceCores() {\n  switch (The_Squeak_Interpreter()->get_argumentCount()) {\n    case 1: { // start tracing, size arg\n      int n = The_Squeak_Interpreter()->stackIntegerValue(0);\n      if (!The_Squeak_Interpreter()->successFlag  ||  n < 0) break;\n      Core_Tracer* t = The_Squeak_Interpreter()->core_tracer();\n      if (t != NULL) {\n        The_Squeak_Interpreter()->set_core_tracer(NULL);\n        delete t;\n      }\n      if (n > 0)\n        The_Squeak_Interpreter()->set_core_tracer(new Core_Tracer(n));\n      The_Squeak_Interpreter()->pop(1);\n      return 0;\n    }\n\n    case 0:\n      if (The_Squeak_Interpreter()->core_tracer() == NULL)\n        break;\n      The_Squeak_Interpreter()->popThenPush(1, The_Squeak_Interpreter()->core_tracer()->get());\n      return 0;\n\n    default:\n      break;\n  }\n  The_Squeak_Interpreter()->primitiveFail();\n  return 0;\n}\n\nvoid* primitivePrintReadWriteReadMostlyBytesUsed() {\n  FOR_ALL_RANKS(r)\n    lprintf(\"%d: %d @ %d\\n\",\n            r,\n            The_Memory_System()->heaps[r][Memory_System::read_write ]->bytesUsed(),\n            The_Memory_System()->heaps[r][Memory_System::read_mostly]->bytesUsed());\n  return 0;\n}\n\n\n// given rcvr, rank, isRead_Write, return array of all objs in that heap\n\nvoid* primitiveAllObjectsInHeap() {\n  switch (The_Squeak_Interpreter()->get_argumentCount()) {\n    default: break;\n    case 2: {\n      bool isRead_Write = The_Squeak_Interpreter()->booleanValueOf(The_Squeak_Interpreter()->stackTop());\n      if (!The_Squeak_Interpreter()->successFlag)\n        break;\n      int rank = The_Squeak_Interpreter()->stackIntegerValue(1);\n      if (The_Squeak_Interpreter()->successFlag &&  0 <= rank  &&  rank < Logical_Core::group_size)\n        ;\n      else\n        break;\n      static const int rw = Memory_System::read_write;\n      static const int rm = Memory_System::read_mostly;\n      int mutability = isRead_Write ? rw : rm;\n      Multicore_Object_Heap* h = The_Memory_System()->heaps[rank][mutability];\n      int n = 0;\n      FOR_EACH_OBJECT_IN_HEAP(h, p)\n        if (!p->isFreeObject())\n          ++n;\n      Object_p r = The_Squeak_Interpreter()->splObj(Special_Indices::ClassArray).as_object()->instantiateClass(n);\n      int i = 0;\n      FOR_EACH_OBJECT_IN_HEAP(h, p) {\n        if (p->isFreeObject())\n          continue;\n        if (i >= n)\n          break;\n        r->storePointer(i, p->as_oop());\n        ++i;\n      }\n      The_Squeak_Interpreter()->popThenPush(3, r->as_oop());\n      return 0;\n    }\n  }\n  The_Squeak_Interpreter()->primitiveFail();\n  return 0;\n}\n\n\nvoid* primitiveTraceMutatedReplicatedObjects() {\n  switch (The_Squeak_Interpreter()->get_argumentCount()) {\n    case 1: { // start tracing, size arg\n      int n = The_Squeak_Interpreter()->stackIntegerValue(0);\n      if (!The_Squeak_Interpreter()->successFlag  ||  n < 0) break;\n      Oop_Tracer* t = The_Squeak_Interpreter()->mutated_read_mostly_object_tracer();\n      if (t != NULL) {\n        The_Squeak_Interpreter()->set_mutated_read_mostly_object_tracer(NULL);\n        delete t;\n      }\n      if (n > 0)\n        The_Squeak_Interpreter()->set_mutated_read_mostly_object_tracer(new Oop_Tracer(n));\n      The_Squeak_Interpreter()->pop(1);\n      return 0;\n    }\n\n    case 0:\n      if (The_Squeak_Interpreter()->mutated_read_mostly_object_tracer() == NULL)\n        break;\n      The_Squeak_Interpreter()->popThenPush(1, The_Squeak_Interpreter()->mutated_read_mostly_object_tracer()->get());\n      return 0;\n\n      default:\n      break;\n  }\n  The_Squeak_Interpreter()->primitiveFail();\n  return 0;\n}\n\n\n\nstatic const char* getModuleName() { return moduleName; }\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nstatic int setInterpreter(struct VirtualMachine* /* anInterpreter */) {\n\treturn 1;\n}\n\nstatic int primitivePrintStack() { \n  The_Squeak_Interpreter()->print_stack_trace(dittoing_stdout_printer);\n  return 0;\n}\n\nstatic int primitivePrint() {\n  if (The_Squeak_Interpreter()->get_argumentCount() != 1) {\n    The_Squeak_Interpreter()->primitiveFail();\n    return 0;\n  }\n  Oop x = The_Squeak_Interpreter()->stackTop();\n  if (!x.isBytes()) {\n    The_Squeak_Interpreter()->primitiveFail();\n    return 0;\n  }\n  stdout_printer->lprintf(\"primitivePrint: \");\n  x.as_object()->print_bytes(stdout_printer);\n  stdout_printer->nl();\n  The_Squeak_Interpreter()->pop(1);\n  return 0;\n}\n\n\n// A numbers print for debugging\nstatic int primitivePrintObjectForVMDebugging() {\n  if (The_Squeak_Interpreter()->get_argumentCount() != 1) {\n    The_Squeak_Interpreter()->primitiveFail();\n    return 0;\n  }\n  Oop x = The_Squeak_Interpreter()->stackTop();\n  stdout_printer->lprintf(\"primitivePrintObjectForVMDebugging: Oop 0x%x, Object* 0x%x, \", x.bits(),\n                            x.is_mem() ? x.as_untracked_object_ptr() : NULL\n                          );\n\n  \n  x.print(stdout_printer);\n  stdout_printer->nl();\n  The_Squeak_Interpreter()->pop(1);\n  return 0;\n}\n\n\n\nstatic int primitivePrintStats() {\n  lprintf( \"Semaphore_Mutex: \");\n  The_Squeak_Interpreter()->get_semaphore_mutex()->print_stats();\n\n  lprintf( \"Scheduler_Mutex: \");\n  The_Squeak_Interpreter()->get_scheduler_mutex()->print_stats();\n\n  lprintf( \"Safepoint_Mutex: \");\n  The_Squeak_Interpreter()->get_safepoint_mutex()->print_stats();\n\n/*  lprintf( \"interpret_cycles = %lld,  multicore_interrupt_cycles = %lld, mi_cyc_1a = %lld, mi_cyc_1a1 = %lld, mi_cyc_1a2 = %lld, mi_cyc_1b = %lld, mi_cyc_1 = %lld\\n\",\n          The_Squeak_Interpreter()->interpret_cycles,  The_Squeak_Interpreter()->multicore_interrupt_cycles,\n          The_Squeak_Interpreter()->mi_cyc_1a, The_Squeak_Interpreter()->mi_cyc_1a1, The_Squeak_Interpreter()->mi_cyc_1a2, \n          The_Squeak_Interpreter()->mi_cyc_1b, The_Squeak_Interpreter()->mi_cyc_1);*/\n\n/*  lprintf( \"multicore_interrupt_check_count = %d, yield_request_count = %d, data_available_count = %d\\n\",\n            The_Squeak_Interpreter()->multicore_interrupt_check_count,\n          The_Squeak_Interpreter()->yield_request_count,\n          The_Squeak_Interpreter()->data_available_count);*/\n\n  int rank_on_threads_or_zero_on_processes = Memory_Semantics::rank_on_threads_or_zero_on_processes();\n\n  lprintf(\"buf_msg_check_count = %d, buf_msg_check_cyc = %lld\\n\", \n          Message_Stats::stats[rank_on_threads_or_zero_on_processes].buf_msg_check_count, \n          Message_Stats::stats[rank_on_threads_or_zero_on_processes].buf_msg_check_cyc);\n\n  bool did_one = false;\n  for (int i = 0;  i < Message_Statics::end_of_messages;  ++i) {\n    if (Message_Stats::stats[rank_on_threads_or_zero_on_processes].receive_tallies[i]) {\n      lprintf(\"\\n%s: %d %lld\", Message_Statics::message_names[i], \n              Message_Stats::stats[rank_on_threads_or_zero_on_processes].receive_tallies[i],\n              Message_Stats::stats[rank_on_threads_or_zero_on_processes].receive_cycles[i]);\n      did_one = true;\n    }\n  }\n  if (!did_one) lprintf(\"no msgs received\\n\");\n  else  lprintf(\"\\n\");\n\n  lprintf(\"remote_prim_count = %d,  remote_prim_cycles = %lld\\n\",\n          The_Interactions.remote_prim_count,  The_Interactions.remote_prim_cycles);\n\n  The_Squeak_Interpreter()->pop(The_Squeak_Interpreter()->get_argumentCount());\n  \n  Performance_Counters::print();\n  \n  return 0;\n}\n\nstatic int primitiveResetPerfCounters() {\n  Performance_Counters::reset();\n  return 0;\n}\n  \nstatic int primitivePrintExecutionTrace() { The_Squeak_Interpreter()->print_execution_trace(); return 0; }\n\n\nstatic int primitiveThisProcess() {\n  The_Squeak_Interpreter()->pop(The_Squeak_Interpreter()->get_argumentCount() + 1);\n  The_Squeak_Interpreter()->push(The_Squeak_Interpreter()->get_running_process());\n  The_Squeak_Interpreter()->set_primitiveThisProcess_was_called(true);\n  return 0;\n}\n\nstatic int primitiveCoreCount() {\n  if (The_Squeak_Interpreter()->get_argumentCount()) { The_Squeak_Interpreter()->primitiveFail(); return 0; }\n  The_Squeak_Interpreter()->popThenPush(1, Oop::from_int(Logical_Core::group_size));\n  return 0;\n}\n\nstatic int primitiveGetExtraPreheaderWord() {\n  if (The_Squeak_Interpreter()->get_argumentCount() != 1) {\n    The_Squeak_Interpreter()->primitiveFail();\n    return 0;\n  }\n  Oop x = The_Squeak_Interpreter()->stackObjectValue(0);\n\n  if (The_Squeak_Interpreter()->failed())\n    return 0;\n  \n  oop_int_t* p = x.as_object()->extra_preheader_word();\n\n  if (p == NULL) {\n    The_Squeak_Interpreter()->primitiveFail();\n    return 0;\n  }\n  The_Squeak_Interpreter()->popThenPush(2, Oop::from_bits(*p));\n  return 0;\n}\n\n\n// for compatability's sake, if one arg, set the extra word in the arg to the value of the receiver\n// Newer form: if two args, set the extra word in arg 1 to the value of arg2 -- dmu 6/10\nstatic int primitiveSetExtraPreheaderWord() {\n  Oop w, x;\n  switch (The_Squeak_Interpreter()->get_argumentCount()) {\n    default:\n      The_Squeak_Interpreter()->primitiveFail();\n      return 0;\n  \n    case 1: \n      w = The_Squeak_Interpreter()->stackValue(1); // receiver is word to set\n      x = The_Squeak_Interpreter()->stackObjectValue(0); // arg gets word set\n      break;\n  \n    case 2: \n      w = The_Squeak_Interpreter()->stackValue(0); // arg 2 is word to set\n      x = The_Squeak_Interpreter()->stackObjectValue(1); // arg 1 gets word set\n      break;\n  }\n  if (The_Squeak_Interpreter()->failed()) return 0;\n  \n  oop_int_t* p = x.as_object()->extra_preheader_word();  if (p == NULL) {The_Squeak_Interpreter()->primitiveFail(); return 0; }\n  \n  Oop old = Oop::from_bits(*p);\n  x.as_object()->set_extra_preheader_word(w.bits());\n  The_Squeak_Interpreter()->popThenPush(The_Squeak_Interpreter()->get_argumentCount() + 1,  old);\n  return 0;\n}\n\n\nstatic int primitiveSetExtraWordSelector() {\n  if (The_Squeak_Interpreter()->get_argumentCount() != 1) {\n    The_Squeak_Interpreter()->primitiveFail();\n    return 0;\n  }\n  Oop nnew = The_Squeak_Interpreter()->stackValue(0);\n  Oop selectorClass = The_Squeak_Interpreter()->splObj(Special_Indices::SelectorDoesNotUnderstand).fetchClass();\n  Oop nnewClass = nnew.fetchClass();\n  if (selectorClass != nnewClass  &&  nnew != The_Squeak_Interpreter()->roots.nilObj)  {\n    The_Squeak_Interpreter()->primitiveFail();\n    return 0;\n  }\n# if Extra_Preheader_Word_Experiment\n    The_Squeak_Interpreter()->pushRemappableOop(The_Squeak_Interpreter()->roots.extra_preheader_word_selector);\n    The_Squeak_Interpreter()->pushRemappableOop(nnew);\n  \n    setExtraWordSelectorMessage_class m(nnew);\n    m.send_to_all_cores();\n    The_Squeak_Interpreter()->popRemappableOop();\n\n    The_Squeak_Interpreter()->popThenPush(2, The_Squeak_Interpreter()->popRemappableOop());\n# else\n    The_Squeak_Interpreter()->primitiveFail();\n# endif\n  return 0;\n}\n\n\nstatic int primitiveEmergencySemaphore() {\n  int ac = The_Squeak_Interpreter()->get_argumentCount();\n  if (ac == 0) {\n    The_Squeak_Interpreter()->popThenPush(1, The_Squeak_Interpreter()->roots.emergency_semaphore);\n    return 0;\n  }\n  if (ac != 1) {\n    The_Squeak_Interpreter()->primitiveFail();\n    return 0;\n  }\n  Oop nnew = The_Squeak_Interpreter()->stackValue(0);\n  if (nnew.fetchClass() != The_Squeak_Interpreter()->splObj(Special_Indices::ClassSemaphore)) {\n    The_Squeak_Interpreter()->primitiveFail();\n    return 0;\n  }\n  The_Squeak_Interpreter()->pushRemappableOop( The_Squeak_Interpreter()->roots.emergency_semaphore );\n  The_Squeak_Interpreter()->pushRemappableOop( nnew );\n  setEmergencySemaphoreMessage_class m(nnew);\n  m.send_to_all_cores();\n  The_Squeak_Interpreter()->popRemappableOop();\n  \n  The_Squeak_Interpreter()->popThenPush(ac + 1, The_Squeak_Interpreter()->popRemappableOop());\n\n  return 0;\n}\n\n\n// WARNING: currently only works if always_track_running_processes_is_set\nstatic int primitiveRunningProcessByCore() {\n  if (!Track_Processes) {\n    The_Squeak_Interpreter()->primitiveFail();\n    return 0;\n  }\n  int s = The_Squeak_Interpreter()->makeArrayStart();\n  FOR_ALL_RANKS(r)\n    PUSH_FOR_MAKE_ARRAY(The_Squeak_Interpreter()->running_process_by_core[r]);\n  The_Squeak_Interpreter()->popThenPush(1, The_Squeak_Interpreter()->makeArray(s));\n  return 0;\n}\n\nstatic int primitiveWriteSnapshot() {\n  // for debugging\n  if (The_Squeak_Interpreter()->get_argumentCount() == 0)\n    The_Memory_System()->imageNamePut_on_this_core(\"x.image\", 7);\n  else {\n    Oop s = The_Squeak_Interpreter()->stackTop();\n    Squeak_Image_Reader::imageNamePut_on_all_cores(s.as_object()->as_char_p() + Object::BaseHeaderSize, s.as_object()->stSize());\n  }\n  The_Squeak_Interpreter()->primitiveSnapshot();\n  The_Squeak_Interpreter()->pop(The_Squeak_Interpreter()->get_argumentCount());\n  return 0;\n}\n\n\nstatic int primitiveMicrosecondClock() {\n  // return a microsecond clock\n  struct timeval now;\n  gettimeofday(&now, 0);\n  int r = now.tv_usec;\n  The_Squeak_Interpreter()->popThenPush(1, Oop::from_int(r));\n  return 0;\n}\n\n# if On_iOS\n# include <mach/mach_time.h>\n# endif\n\n\nstatic int primitiveCycleCounter() {\n  if (The_Squeak_Interpreter()->get_argumentCount() != 0) {\n    The_Squeak_Interpreter()->primitiveFail();\n    return 0;\n  }\n  uint64_t cycles;\n\n  // burrow down below OS_Interface level to avoid effect of Count_Cycles flag\n  \n# if On_iOS\n  // Source: https://developer.apple.com/library/mac/#qa/qa1398/_index.html\n  uint64_t absolute_time = mach_absolute_time();\n  \n  mach_timebase_info_data_t info;\n  mach_timebase_info(&info);\n  \n  /* Convert to nanoseconds */\n  absolute_time *= info.numer;\n  absolute_time /= info.denom;\n  \n  cycles = absolute_time;\n\n# elif On_Tilera\n  cycles = ::get_cycle_count();\n  \n# else\n  // this value is specifc to a core, it does not reflect a 'global' time.\n  asm volatile(\"rdtsc\" : \"=A\" (cycles));\n# endif\n  \n  The_Squeak_Interpreter()->popThenPush(1, Object::positive64BitIntegerFor(cycles)); \n  return 0;\n}\n\n  \n\nvoid* primitiveUseCPUTime() {\n  bool use_cpu_ms;\n  switch (The_Squeak_Interpreter()->get_argumentCount()) {\n     case 1:\n      use_cpu_ms = The_Squeak_Interpreter()->booleanValueOf(The_Squeak_Interpreter()->stackValue(0));\n      if (!The_Squeak_Interpreter()->successFlag) { return 0; }\n      break;\n      \n    default: The_Squeak_Interpreter()->primitiveFail();  return 0;\n  }\n  \n  // There's a bit of a race in the code below; it's clunky, too. -- dmu\n  bool fix_wakeup_time = false;\n  int delta = 0;\n  if (use_cpu_ms != The_Squeak_Interpreter()->use_cpu_ms()  &&  The_Squeak_Interpreter()->nextWakeupTick() != 0) {\n    delta = The_Squeak_Interpreter()->nextWakeupTick() - The_Squeak_Interpreter()->ioWhicheverMSecs();\n    fix_wakeup_time = true;\n  }\n  The_Squeak_Interpreter()->forceInterruptCheck();\n  The_Squeak_Interpreter()->set_use_cpu_ms(use_cpu_ms);\n  if (fix_wakeup_time)\n    The_Squeak_Interpreter()->set_nextWakeupTick( The_Squeak_Interpreter()->ioWhicheverMSecs() + delta);\n  The_Squeak_Interpreter()->pop(The_Squeak_Interpreter()->get_argumentCount());\n  return 0;\n}\n\n\n\nvoid* RVMPlugin_exports[][3] = {\n  {(void*) \"RVMPlugin\", (void*)\"primitiveDebugSampleRVM\", (void*)primitiveDebugSampleRVM},\n  {(void*) \"RVMPlugin\", (void*)\"primitiveSampleRVM\", (void*)primitiveSampleRVM},\n  {(void*) \"RVMPlugin\", (void*)\"primitiveRunMask\", (void*)primitiveRunMask},\n  {(void*) \"RVMPlugin\", (void*)\"primitiveBreakpoint\", (void*)primitiveBreakpoint},\n  {(void*) \"RVMPlugin\", (void*)\"primitiveSetCoordinatesFor\", (void*)primitiveSetCoordinatesFor},\n  {(void*) \"RVMPlugin\", (void*)\"primitiveGetCore\", (void*)primitiveGetCore},\n  {(void*) \"RVMPlugin\", (void*)\"primitiveGetCoreIAmRunningOn\", (void*)primitiveGetCoreIAmRunningOn},\n  {(void*) \"RVMPlugin\", (void*)\"primitiveGetMutability\", (void*)primitiveGetMutability},\n  {(void*) \"RVMPlugin\", (void*)\"primitiveShuffle\", (void*)primitiveShuffle},\n  {(void*) \"RVMPlugin\", (void*)\"primitiveSpread\", (void*)primitiveSpread},\n  {(void*) \"RVMPlugin\", (void*)\"primitiveMoveAllToReadMostlyHeaps\", (void*)primitiveMoveAllToReadMostlyHeaps},\n  {(void*) \"RVMPlugin\", (void*)\"primitiveTraceCores\", (void*)primitiveTraceCores},\n  {(void*) \"RVMPlugin\", (void*)\"primitiveTraceMutatedReplicatedObjects\", (void*)primitiveTraceMutatedReplicatedObjects},\n  {(void*) \"RVMPlugin\", (void*)\"primitivePrintReadWriteReadMostlyBytesUsed\", (void*)primitivePrintReadWriteReadMostlyBytesUsed},\n\n  {(void*) \"RVMPlugin\", (void*)\"primitiveAllObjectsInHeap\", (void*)primitiveAllObjectsInHeap},\n  {(void*) \"RVMPlugin\", (void*)\"primitivePrintStack\", (void*)primitivePrintStack},\n  {(void*) \"RVMPlugin\", (void*)\"primitivePrintObjectForVMDebugging\", (void*) primitivePrintObjectForVMDebugging},\n  {(void*) \"RVMPlugin\", (void*)\"primitivePrintExecutionTrace\", (void*)primitivePrintExecutionTrace},\n  {(void*) \"RVMPlugin\", (void*)\"primitiveThisProcess\", (void*)primitiveThisProcess},\n  {(void*) \"RVMPlugin\", (void*)\"primitivePrint\", (void*)primitivePrint},\n  {(void*) \"RVMPlugin\", (void*)\"primitivePrintStats\", (void*)primitivePrintStats},\n  {(void*) \"RVMPlugin\", (void*)\"primitiveResetPerfCounters\", (void*)primitiveResetPerfCounters},\n  {(void*) \"RVMPlugin\", (void*)\"primitiveCoreCount\", (void*)primitiveCoreCount},\n  {(void*) \"RVMPlugin\", (void*)\"primitiveRunningProcessByCore\", (void*)primitiveRunningProcessByCore},\n\n  {(void*) \"RVMPlugin\", (void*)\"primitiveGetExtraPreheaderWord\", (void*)primitiveGetExtraPreheaderWord},\n  {(void*) \"RVMPlugin\", (void*)\"primitiveSetExtraPreheaderWord\", (void*)primitiveSetExtraPreheaderWord},\n  {(void*) \"RVMPlugin\", (void*)\"primitiveSetExtraWordSelector\", (void*)primitiveSetExtraWordSelector},\n\n  {(void*) \"RVMPlugin\", (void*)\"primitiveWriteSnapshot\", (void*)primitiveWriteSnapshot},\n\n  {(void*) \"RVMPlugin\", (void*)\"primitiveEmergencySemaphore\", (void*)primitiveEmergencySemaphore},\n  {(void*) \"RVMPlugin\", (void*)\"primitiveMicrosecondClock\", (void*)primitiveMicrosecondClock},\n  {(void*) \"RVMPlugin\", (void*)\"primitiveCycleCounter\", (void*)primitiveCycleCounter},\n  \n  {(void*) \"RVMPlugin\", (void*)\"primitiveUseCPUTime\", (void*)primitiveUseCPUTime},\n\n \n  {(void*) \"RVMPlugin\", (void*)\"setInterpreter\", (void*)setInterpreter},\n  \n  {(void*) \"RVMPlugin\", (void*)\"primitiveRunsHeadless\", (void*)primitiveRunsHeadless},\n\n  {NULL, NULL, NULL}\n};\n\n\nvoid ioProcessEvents_wrapper() {\n  static bool recurse = false;  // threadsafe, this function is exclusivly executed on the main core, Stefan 2009-09-05 (hope there is not reflective call by name anywhere else...)\n  if (recurse) return;\n  recurse = true;\n  ioProcessEvents();\n  recurse = false;\n}\n\n"
  },
  {
    "path": "vm/src/primitives/RVMPlugin.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nOop sample_one_core(int);\n\nvoid ioProcessEvents_wrapper();\n\nclass SampleValues {\n  public:\n  enum {\n    allCores, // 0\n\n    runMask,\n    messageNames,\n    cpuCoreStats,\n    allCoreStats,\n    fence,\n\n    millisecs, // 6\n    cycles,\n    messageStats,\n    memorySystemStats,\n    interpreterStats,\n    objectTableStats,\n    interactionStats,\n\n    // Message_Statics:get_stats\n    coreCoords, // 13\n    sendTallies,\n    receiveTallies,\n    bufferedMessageStats,\n    receiveCycles,\n\n    // memory system\n    gcStats, // 18\n    heapStats,\n\n    // interpreter\n    bytecodes, // 20\n    yieldCount,\n    cycleCounts,\n    interruptChecks,\n    movedMutatedObjectStats,\n    mutexStats,\n    interpreterLoopStats // 26\n  };\n};\n\n"
  },
  {
    "path": "vm/src/runtime/abstract_mutex.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\nvoid trace_mutex_evt(int x, const char* why) {\n  if (Trace_Execution  &&  The_Squeak_Interpreter()->execution_tracer() != NULL)\n    The_Squeak_Interpreter()->execution_tracer()->set_aux(x, why);\n  //lprintf( \"trace_mutex_evt %d\\n\", x);\n}\n\n"
  },
  {
    "path": "vm/src/runtime/abstract_mutex.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n// Linux compiler doesn't like templates\n\nvoid trace_mutex_evt(int, const char*);\n\nclass OS_Mutex_Interface {\nprivate:\n  struct {\n    int recursion_count;\n    bool is_held;\n    u_int64 acq_cycles;\n    u_int64 rel_cycles;\n  } logical_core_local;\n\n  struct {\n    int* holder;    // rank of the holding process\n    OS_Interface::Mutex* os_mutex;  // mutex provided by the underlying system\n  } logical_core_global;\n\npublic:\n  OS_Mutex_Interface() {\n    logical_core_local.recursion_count = 0;\n    logical_core_local.is_held = false;\n    logical_core_local.acq_cycles = 0;\n    logical_core_local.rel_cycles = 0;\n\n    logical_core_global.holder = NULL;\n    logical_core_global.os_mutex = NULL;\n  }\n\n  void initialize_globals() {\n    logical_core_global.os_mutex = (OS_Interface::Mutex*)Memory_Semantics::shared_malloc(sizeof(OS_Interface::Mutex));\n    OS_Interface::mutex_init(logical_core_global.os_mutex);\n\n    logical_core_global.holder = (int*)OS_Interface::malloc_uncacheable_shared(sizeof(int), sizeof(int));\n    *logical_core_global.holder = -1;\n  }\n\n  inline bool is_initialized() {\n    return logical_core_global.holder != NULL;\n  }\n\n  inline bool is_held() {\n    return logical_core_local.is_held;\n  }\n\n  inline int get_holder() {\n    return *logical_core_global.holder;\n  }\n\n  inline void set_holder(int holder) {\n    *logical_core_global.holder = holder;\n  }\n\n  inline void aquire() {\n    logical_core_local.is_held = true;\n  }\n\n  inline void release() {\n    logical_core_local.is_held = false;\n  }\n\n  inline int check_and_inc_recursion_depth() {\n    return logical_core_local.recursion_count++;\n  }\n\n  inline int dec_and_check_recursion_depth() {\n    return --logical_core_local.recursion_count;\n  }\n\n  inline void add_acq_cycles(u_int64 inc) {\n    logical_core_local.acq_cycles += inc;\n  }\n\n  inline u_int64 get_and_reset_acq_cycles() {\n    u_int64 result = logical_core_local.acq_cycles;\n    logical_core_local.acq_cycles = 0;\n    return result;\n  }\n\n  inline void add_rel_cycles(u_int64 inc) {\n    logical_core_local.rel_cycles += inc;\n  }\n\n  inline u_int64 get_and_reset_rel_cycles() {\n    u_int64 result = logical_core_local.rel_cycles;\n    logical_core_local.rel_cycles = 0;\n    return result;\n  }\n\n  void print_stats() {\n    lprintf( \"acq cycles = %lld, rel cycles = %lld\\n\",\n            logical_core_local.acq_cycles, logical_core_local.rel_cycles);\n  }\n\n  inline bool try_lock() {\n    return OS_Interface::mutex_trylock(logical_core_global.os_mutex);\n  }\n\n  inline int unlock() {\n    return OS_Interface::mutex_unlock(logical_core_global.os_mutex);\n  }\n};\n\n\n# define Define_RVM_Mutex(Class_Name, Actions, acquire_ID, release_ID) \\\nclass Class_Name { \\\nprivate: \\\n  Safepoint_Ability sa; \\\n  friend class Actions; \\\n  const char* why; \\\n  \\\npublic: \\\n  static bool is_held()  { return Actions::is_held(); } \\\n  static void assert_held()  { assert(!Actions::is_initialized() || is_held()); } \\\n  Class_Name(const char* w = \"\") : sa(Safepoint_Ability::is_interpreter_able()) /* must be true while waiting to acquire, otherwise could deadlock */ { \\\n    \\\n    why = w; \\\n    u_int64 start = OS_Interface::get_cycle_count(); \\\n    \\\n    if (acquire_ID) trace_mutex_evt(acquire_ID, why);\\\n    \\\n    OS_Mutex_Interface* mutex = Actions::get_mutex(); \\\n    /* Tricky; some mutexes may recurse since they have a receive_and_handle_one_message. \\\n       If so, need to acquire mutex even though are recursing, so delay increment of recursion_count \\\n       However, clients of this macro must also manipulate recursion_count: see them! */ \\\n     if (mutex->check_and_inc_recursion_depth() == 0  &&  Actions::is_initialized()) { \\\n      Actions::acquire_action(why); \\\n      sa.be_unable(); \\\n      mutex->aquire(); \\\n      if (acquire_ID) trace_mutex_evt(100+acquire_ID, why);\\\n    } \\\n    mutex->add_acq_cycles(OS_Interface::get_cycle_count() - start); \\\n  } \\\n  ~Class_Name() { \\\n    \\\n    u_int64 start = OS_Interface::get_cycle_count(); \\\n\\\n    if (release_ID) trace_mutex_evt(release_ID, why);\\\n    \\\n    OS_Mutex_Interface* mutex = Actions::get_mutex(); \\\n    if (mutex->dec_and_check_recursion_depth() <= 0  &&  Actions::is_initialized()) { \\\n      if (release_ID) trace_mutex_evt(100+release_ID, why);\\\n      /* assert_always(mutex->local.recursion_count == 0); */ \\\n      Actions::release_action(why); \\\n      mutex->release(); \\\n    } \\\n    mutex->add_rel_cycles(OS_Interface::get_cycle_count() - start); \\\n  } \\\n};\n\n"
  },
  {
    "path": "vm/src/runtime/abstract_tracer.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\n\nOop Abstract_Tracer::get() {\n  int n = wrapped  ?  size  :  next;\n  Object_p r = array_class().as_object()->instantiateClass(n * elem_gotten_elem_size);\n  void* p = r->firstIndexableField_for_primitives();\n\n  if (!wrapped)\n    copy_elements(0, p, 0, n, r);\n  else {\n    copy_elements( next,  p,            0,  size - next,  r);\n    copy_elements(    0,  p,  size - next,         next,  r);\n  }\n  next = 0; wrapped = false;\n  return r->as_oop();\n}\n\n"
  },
  {
    "path": "vm/src/runtime/abstract_tracer.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Abstract_Tracer {\n protected:\n  void* buffer;\n  int size;\n  int next;\n  bool wrapped;\n  int elem_byte_size;\n  int elem_gotten_elem_size;\n  OS_Interface::Mutex mutex;\n public:\n  void* operator new(size_t s)   { return Memory_Semantics::shared_malloc(s); }\n  void  operator delete(void* p) { Memory_Semantics::shared_free(p); }\n\n  Abstract_Tracer(int n, int ebs, int eges)  {\n    elem_byte_size = ebs;\n    elem_gotten_elem_size = eges;\n    buffer = Memory_Semantics::shared_malloc( n * elem_byte_size );\n    size = n;\n    next = 0;\n    wrapped = false;\n    OS_Interface::mutex_init(&mutex);\n  }\n  ~Abstract_Tracer() { Memory_Semantics::shared_free(buffer); }\n\n  virtual Oop get();\n\n protected:\n  virtual Oop array_class()  = 0;\n  virtual void copy_elements(int src_offset, void* dst, int dst_offset, int num_elems, Object_p dst_obj)  = 0;\n  int end_of_live_data() { return wrapped ? size : next; }\n\n\n  int get_free_entry() {\n     OS_Interface::abort_if_error(\"Tracer\", OS_Interface::mutex_lock(&mutex));\n\n    int r = next++;\n    if (next < size) ;\n    else if (next == size) { next = 0;  wrapped = true; }\n    else fatal(\"should never happen\");\n\n     OS_Interface::abort_if_error(\"Tracer\", OS_Interface::mutex_unlock(&mutex));\n    return r;\n  }\n\n};\n\n"
  },
  {
    "path": "vm/src/runtime/bytemap.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\n\nvoid Bytemap::test() {\n  Bytemap b(5);\n  for (char i = 0; i < 100;  ++i)  {\n    b.set(i, i);\n    assert_always_eq(b.get(i), i);\n  }\n  for (char i = 0; i < 100;  ++i)\n    assert_always_eq(b.get(i), i);\n  b.clear_all();\n  for (int i = 0;  i < 100;  ++i) assert_always(!b.get(i));\n}\n\n"
  },
  {
    "path": "vm/src/runtime/bytemap.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Bytemap {\n  // state\n\n  int   _map_length;\n  char* _map;\n\n\npublic:\n  // constructors / destructors / growing\n  Bytemap(int len) {\n    _map_length = len;\n    _map = new char[_map_length];\n  }\n\n  ~Bytemap() { delete[] _map; }\n\nprivate:\n\n  void grow_if_needed(int len) {\n    if (len < _map_length)  return;\n    int new_len = max(len, 2 * _map_length);\n\n    char* new_map = new char[new_len];\n    memcpy(new_map, _map, _map_length);\n    memset(new_map + _map_length,  0,  new_len - _map_length);\n\n    delete[] _map;\n    _map_length = new_len;\n    _map        = new_map;\n  }\n\n  char& byte_for(int i) {\n    grow_if_needed(i);\n    return _map[i];\n  }\n\npublic:\n\n  // mutating\n\n  void set(int i, char c) { byte_for(i) = c; }\n  char get(int i) { return byte_for(i); }\n  void clear_all() { memset(_map, 0, _map_length); }\n\n  void ensure_clear_then_set(int i, char c) {\n    char& b = byte_for(i);\n    assert_always(!b);\n    b = c;\n  }\n  static void test();\n};\n\n"
  },
  {
    "path": "vm/src/runtime/core_tracer.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\n\nOop Core_Tracer::array_class() { return The_Squeak_Interpreter()->splObj(Special_Indices::ClassByteArray); }\n\n"
  },
  {
    "path": "vm/src/runtime/core_tracer.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Core_Tracer: public Abstract_Tracer {\n public:\n  Core_Tracer(int n) : Abstract_Tracer(n, sizeof(char), 1) {}\n  void add(char i) {\n    ((char*)buffer)[get_free_entry()] = i;\n  }\n  void copy_elements(int src_offset, void* dst, int dst_offset, int num_elems, Object_p /* dst_obj */) {\n    bcopy((char*)buffer + src_offset, (char*)dst + dst_offset, num_elems * sizeof(char));\n  }\n\n\n protected:\n  Oop array_class();\n};\n\n"
  },
  {
    "path": "vm/src/runtime/debug_helper.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\n/**\n * This file defines helper functions to facilitate debugging.\n * Helper like pst() can be used from GDB with 'call pst()' easily.\n */\n\n// OOP\n\nvoid dp(Oop x) { x.dp(); }\nvoid Oop::dp() { print(stderr_printer); stderr_printer->nl(); }  // debugging print routines\nvoid dp(Object* x) {x->dp(); } // print Object\n\nvoid dpf(Oop x)     { x.as_object()->print_with_fields(); }\nvoid dpf(Object* x) { x->print_with_fields(); } \n\nOop at(Oop x, oop_int_t i) {\n  return x.as_object()->fetchPointer(i);\n}\n\nvoid dpf_top() {\n  dpf_n(0);\n}\nvoid dpf_n(int offset) {\n  Squeak_Interpreter* const interp = The_Squeak_Interpreter();\n  dpf(interp->stackValue(offset));\n}\n\n\n\n// Interpreter\n\nvoid pet() {\n  if (Trace_Execution && The_Squeak_Interpreter()->execution_tracer() != NULL)\n    The_Squeak_Interpreter()->execution_tracer()->print();\n}\n\nvoid pst() {\n  The_Squeak_Interpreter()->print_stack_trace(dittoing_stdout_printer);\n}\n\nint printCallStack() { pst(); return 0; }\n\nvoid pat() {\n  The_Squeak_Interpreter()->print_all_stack_traces(dittoing_stdout_printer);\n}\nint printAllStacks() { pat(); return 0; }\n\nvoid print_current_method() {\n  The_Squeak_Interpreter()->print_method_info(\"debug helper\");\n}\n\nvoid print_stack_frame() {\n  The_Squeak_Interpreter()->print_stack_frame();\n}\n\nvoid disable_context_switches() {\n  The_Squeak_Interpreter()->suppress_context_switch_for_debugging = true;\n}\nvoid reenable_context_switches() {\n  The_Squeak_Interpreter()->suppress_context_switch_for_debugging = false;\n}\n\n\n"
  },
  {
    "path": "vm/src/runtime/debug_helper.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nvoid dp(Oop x); // print Oop\nvoid dp(int x); // print Oop\nvoid dp(Object* x); // print Object\n\nOop  at(Oop x, oop_int_t i); // get value at index i in object x\n\nvoid dpf(Oop x);\nvoid dpf(Object* x);\n\nvoid dpf_top(); // print fields of the object on the top of the stack\nvoid dpf_n(int offset); // prints fields of the object at the offset in the stack\n\nvoid pat(); // print all stack traces\nvoid pet(); // print execution trace\nvoid pst(); // print stack trace\n\nvoid print_current_method();\nvoid print_stack_frame();\n\nvoid disable_context_switches();\nvoid reenable_context_switches();\n\nextern \"C\" {\n  int printCallStack();\n  int printAllStacks();\n}\n"
  },
  {
    "path": "vm/src/runtime/debug_store_checks.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n\n// When debugging, if you need to catch a store into the object heap, you can:\n// 1. Make sure Compile_Debug_Store_Checks is set to 1 in rvm_config, and\n// 2. Put your check into debug_store_check, where it says: \"your code here\"\n// -- dmu 10/1/10\n\n# define IMAGE_READING_DEBUG_STORE_CHECK(x, y) DEBUG_STORE_CHECK(x, y)\n# define IMAGE_READING_DEBUG_MULTIMOVE_CHECK(dstp, srcp, n) DEBUG_MULTIMOVE_CHECK(dstp, srcp, n)\n\n# if ! Compile_Debug_Store_Checks\n\n# define DEBUG_STORE_CHECK(x, y)\n# define DEBUG_MULTISTORE_CHECK(dst, src, n)\n# define DEBUG_MULTIMOVE_CHECK(dst, src, n)\n\n# else\n\n# define DEBUG_STORE_CHECK(x, y)                Debug_Store_Checks::debug_store_check(x, y)\n# define DEBUG_MULTISTORE_CHECK(dstp, src, n)   Debug_Store_Checks::debug_multistore_check(dstp, src, n)\n# define DEBUG_MULTIMOVE_CHECK(dstp, srcp, n)   Debug_Store_Checks::debug_multimove_check(dstp, srcp, n)\n\n\n\nclass Debug_Store_Checks {\n  public:\n  \n  static void debug_store_check(const oop_int_t* /* addr */, oop_int_t /* contents */) {\n    // your code here\n  }\n  \n  \n  static void debug_store_check(const Oop* addr, Oop contents) { debug_store_check((oop_int_t*)addr, contents.bits()); }\n  \n  static void debug_store_check(const Object** addr, Object* contents) { debug_store_check((oop_int_t*)addr, (oop_int_t)contents); }\n  \n  \n  static void debug_multistore_check(const oop_int_t* addr, oop_int_t src, int n) {\n    for (int i = 0;  i < n;  ++i)\n      debug_store_check(&addr[i], src);\n  }\n  \n  static void debug_multistore_check(const Oop* addr, Oop src, int n) {\n    debug_multistore_check((oop_int_t*)addr, src.bits(), n);\n  }\n  \n  static void debug_multimove_check(const void* dstp, const void* srcp, int n) {\n    for (int i = 0;  i < n;  ++i)\n      debug_store_check(&((Oop*)dstp)[i], ((Oop*)srcp)[i]);\n  }\n  \n};\n\n\n\n# endif\n"
  },
  {
    "path": "vm/src/runtime/error_handling.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\nON_TILERA_OR_ELSE(int, void) assert_failure(const char* func, const char* file, const int line, const char* pred, const char* msg) {\n   const char* safe_func = On_Tilera ? \"<unknown>\" : func;\n\n  if (Memory_Semantics::cores_are_initialized())\n    error_printer->printf(\"%s: file %s, line %d, function %s, predicate %s, rank %d, main_rank %d, pid %d\\n\",\n        msg, file, line, safe_func, pred, Logical_Core::my_rank(), Logical_Core::main_rank, getpid());\n  else\n    fprintf(stderr, \"%s: file %s, line %d, function %s, predicate %s, pid %d\\n\",\n                          msg, file, line, safe_func, pred, getpid());\n\n  OS_Interface::abort();\n  ON_TILERA_OR_ELSE(return 0, );\n}\n\nON_TILERA_OR_ELSE(int, void) assert_eq_failure(const char* func, const char* file, const int line, const char* pred, const char* msg, void* a, void* b) {\n  static char buf[10000];   // threadsafe? does not really matter here anymore...\n  error_printer->printf(\"%s: file %s, line %d, function %s, predicate %s, pid %d, 0x%x != 0x%x\",\n          msg, file, line, func, pred, getpid(), a, b);\n  error_printer->printf(\"%s\\n\", buf);\n  \n  OS_Interface::abort();\n  ON_TILERA_OR_ELSE(return 0, );\n}\n\nON_TILERA_OR_ELSE(int, void) assert_eq_failure(const char* func, const char* file, const int line, const char* pred, const char* msg, int a, int b) {\n  assert_eq_failure(func, file, line, pred, msg, (void*)a, (void*)b);\n  ON_TILERA_OR_ELSE(return 0, );\n}\n\nvoid breakpoint() {\n  OS_Interface::breakpoint();\n  dittoing_stdout_printer->printf(\"breakpoint\\n\");\n}\n\nvoid unt(const char* m, const char* f) {\n  dittoing_stdout_printer->printf(\"%s: %s\\n\", m, f);\n}\n\n\nvoid unte(const char* m, const char* f) {\n  dittoing_stdout_printer->printf(\"%s: %s\\n\", m, f);\n}\n\n"
  },
  {
    "path": "vm/src/runtime/error_handling.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# undef assert\n\n/* Making the assert_* void and adapting the macros to not give warnings on GCC and Clang triggers a bug in the tile-cc\n * Thus, we use the following hack to work around this problem.\n */\n\n# if On_Tilera\n  # define ON_TILERA_OR_ELSE(tilera, or_else) tilera\n# else\n  # define ON_TILERA_OR_ELSE(tilera, or_else) or_else\n# endif\n\n\n\nextern ON_TILERA_OR_ELSE(int, void) assert_failure(   const char* func, const char* file, const int line, const char* pred, const char* msg) __attribute__((noreturn));\nextern ON_TILERA_OR_ELSE(int, void) assert_eq_failure(const char* func, const char* file, const int line, const char* pred, const char* msg, void*, void*) __attribute__((noreturn));\nextern ON_TILERA_OR_ELSE(int, void) assert_eq_failure(const char* func, const char* file, const int line, const char* pred, const char* msg, int, int) __attribute__((noreturn));\n\n\n// use this in verify:\n# define assert_always(pred) assert_always_msg(pred, \"\")\n# define assert_always_msg(pred, msg) ((pred) ? ON_TILERA_OR_ELSE(0, ({})) : assert_failure(__func__, __FILE__, __LINE__, #pred, msg))\n# define assert_always_eq(a, b) \\\n  ((a) == (b) ? ON_TILERA_OR_ELSE(0, ({})) : assert_eq_failure(__func__, __FILE__, __LINE__, #a \"  ==  \" #b, \"\", (a), (b)))\n\n\n# define assert_message(pred, msg) \\\n  assert_always_msg((!check_assertions || (pred)), msg)\n\n# define assert(pred) assert_message(pred, \"\")\n\n# define assert_on_main() assert_eq(Logical_Core::my_rank(), Logical_Core::main_rank, \"main?\")\n\n\n\n\n# define assert_eq(a, b, msg) \\\n  (!check_assertions ||  (a) == (b) ? ON_TILERA_OR_ELSE(0, ({})) : assert_eq_failure(__func__, __FILE__, __LINE__, #a \"  ==  \" #b, msg, (a), (b)))\n\n# define fatal(msg) assert_always_msg(0, \"Fatal: \" msg)\n# define unimplemented() assert_message(0, \"Unimplemented\")\n\n\n#define untested() {unt(\"untested\", __func__); }\n\n# define unimpExt() {unte(\"unimplemented external\", __func__); }\n\nextern void breakpoint();\nextern void unt(const char*, const char*);\nextern void unte(const char*, const char*);\n\n\n#define unimp_608() (fatal(\"stub used during June 2008 reorg\\n\"), 0)\n\n#define assert_active_process_not_nil() \\\n  if ( \\\n    The_Squeak_Interpreter()->schedulerPointer_obj()->fetchPointer(Object_Indices::ActiveProcessIndex) == The_Squeak_Interpreter()->roots.nilObj ) \\\n  { assert_failure(__func__, __FILE__, __LINE__, \"Processor activeProcess must not be nil\", \"activeProcess is nil\"); }\n\n"
  },
  {
    "path": "vm/src/runtime/execution_tracer.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\n\nExecution_Tracer::Execution_Tracer(int n) : Abstract_Tracer(n, max_sizes, e_N) {\n  gc_count = 0;\n  ctx = Oop::from_int(0);\n}\n\n\nOop Execution_Tracer::array_class() { return The_Squeak_Interpreter()->splObj(Special_Indices::ClassArray); }\n\nvoid Execution_Tracer::do_all_roots(Oop_Closure* oc) {\n  oc->value(&ctx, (Object_p)NULL);\n  for (int i = 0;  i < end_of_live_data();  ++i) {\n    bc* bcp = (bc*)entry_ptr(i);  proc* procp = (proc*)bcp;\n    switch (bcp->kind) {\n        default: fatal(); break;\n        case k_bc:\n          oc->value(&bcp->method, (Object_p)NULL);\n          oc->value(&bcp->rcvr, (Object_p)NULL);\n          break;\n        case k_gc:\n        case k_rcved_interp:\n        case k_aux:\n          break;\n        case k_proc:\n          oc->value(&procp->process, (Object_p)NULL);\n          break;\n    }\n  }\n}\n\n\nvoid Execution_Tracer::trace(Squeak_Interpreter* si) {\n  int pc = si->instructionPointer() - si->method_obj()->as_u_char_p();\n  add_bc(si->method(), si->roots.receiver, pc, si->activeContext_obj()->is_this_context_a_block_context(), si->bcCount);\n}\n\n\nvoid Execution_Tracer::print() {\n  lprintf( \"printing history\\n\");\n  The_Squeak_Interpreter()->print_all_stack_traces(dittoing_stdout_printer);\n  lprintf( \"\\n\\n\\nprinting last bytecodes\\n\");\n  Oop entries = get();\n  check_it(entries);\n\n  print_entries(entries, debug_printer);\n}\n\nOop Execution_Tracer::get() {\n  Oop r = Abstract_Tracer::get();\n  check_it(r);\n  return r;\n}\n\n\nvoid Execution_Tracer::copy_elements(int src_offset, void* dst, int dst_offset, int num_elems, Object_p dst_obj) {\n  lprintf( \"copy_elements src_offset %d, buffer 0x%x, dst 0x%x, dst_offset %d, num_elems %d, dst_obj 0x%x, next %d\\n\",\n          src_offset, buffer, dst, dst_offset, num_elems, (Object*)dst_obj, next);\n\n\n\n  Oop* dst_oop = (Oop*)dst  +  dst_offset * e_N;\n  // zero-fill for GC sake\n  for (int i = 0;  i < num_elems;  ++i)\n    for (int j = 0;  j < e_N;  ++j)\n      dst_oop[i * e_N  +  j] = Oop::from_int(0);\n\n  for (int i = 0;  i < num_elems;  ++i, dst_oop += e_N) {\n    bc* bcp = (bc*)entry_ptr(i);  gc* gcp = (gc*)bcp;  proc* procp = (proc*)bcp; rcved_interp* rip = (rcved_interp*)bcp; aux* auxp = (aux*)bcp;\n    dst_oop[e_kind] = Oop::from_int(bcp->kind);\n    switch (bcp->kind) {\n      default: fatal(); break;\n      case k_aux: {\n        dst_oop[e_id      ] = Oop::from_int(auxp->id);\n        dst_oop[e_aux1    ] = Oop::from_int(auxp->aux1);\n        dst_oop[e_aux2    ] = Oop::from_int(auxp->aux2);\n        dst_oop[e_rank    ] = Oop::from_int(auxp->rank);\n      }\n        break;\n      case k_bc: {\n        dst_oop[e_method  ] = bcp->method;  Object_p mo = dst_oop[e_method].as_object();\n        dst_oop[e_rcvr    ] = bcp->rcvr;\n\n        dst_oop[e_rank    ] = Oop::from_int(bcp->rank);\n        dst_oop[e_bcCount ] = Oop::from_int(bcp->bcCount);\n        dst_oop[e_pc      ] = Oop::from_int(bcp->pc  -  (mo->first_byte_address() - mo->as_char_p()));\n        dst_oop[e_aux1    ] = Oop::from_int(bcp->aux1);\n        dst_oop[e_aux2    ] = Oop::from_int(bcp->aux2);\n        dst_oop[e_is_block] = bcp->is_block ? The_Squeak_Interpreter()->roots.trueObj : The_Squeak_Interpreter()->roots.falseObj;\n\n        assert_always(dst_oop[e_method ].is_mem());\n        assert_always(dst_oop[e_pc  ].is_int());\n        assert_always(dst_oop[e_rank].is_int());\n        assert_always(dst_oop[e_is_block] == The_Squeak_Interpreter()->roots.trueObj  ||  dst_oop[e_is_block] == The_Squeak_Interpreter()->roots.falseObj);\n        assert_always( (int(dst_oop) - int(dst_obj) - Object::BaseHeaderSize) % e_N  == 0 );\n      }\n        break;\n      case k_gc:\n        dst_oop[e_gc  ] = Oop::from_int(gcp->gc);\n        dst_oop[e_rank] = Oop::from_int(gcp->rank);\n        break;\n      case k_proc:\n        dst_oop[e_rank]     = Oop::from_int(procp->rank);\n        dst_oop[e_process ] = procp->process;\n        break;\n      case k_rcved_interp:\n        dst_oop[e_rank] = Oop::from_int(rip->to_rank);\n        break;\n    }\n  }\n  dst_obj->my_heap()->check_multiple_stores_for_generations_only(dst_oop, num_elems * e_N);\n}\n\n\n\nvoid Execution_Tracer::check_it(Oop ents) {\n  Object_p eo = ents.as_object();\n  int wl = eo->fetchWordLength();\n  int n = wl / e_N;\n\n  for (int i = 0;  i < n;  ++i) {\n    int x = -1;\n    Oop rank = eo->fetchPointer(x   =   i * e_N  +  e_rank);\n    assert_always( rank.is_int());\n    switch (eo->fetchPointer(i * e_N  +  e_kind).integerValue()) {\n        default: fatal();\n      case k_bc: {\n          Oop meth         = eo->fetchPointer(x   =   i * e_N  +  e_method); assert_always(meth.is_mem());\n          Oop rcvr         = eo->fetchPointer(x   =   i * e_N  +  e_rcvr);\n          Oop pc           = eo->fetchPointer(x   =   i * e_N  +  e_pc  );  assert_always(pc.is_int());\n          Oop is_block     = eo->fetchPointer(x   =   i * e_N  +  e_is_block); assert_always(is_block == The_Squeak_Interpreter()->roots.trueObj || is_block == The_Squeak_Interpreter()->roots.falseObj);\n          break;\n      }\n        case k_gc: {\n          Oop gc           = eo->fetchPointer(x   =   i * e_N  +  e_gc      ); assert_always(gc.is_int());\n        }\n          break;\n        case k_proc: {\n          Oop process      = eo->fetchPointer(x   =   i * e_N  +  e_process); assert_always(process.is_mem());\n        }\n          break;\n        case k_rcved_interp:\n          break;\n        case k_aux: break;\n    }\n  }\n}\n\nvoid Execution_Tracer::print_entries(Oop ents, Printer* p) {\n  Object_p eo = ents.as_object();\n  int n = eo->fetchWordLength()  /  e_N;\n  int x;\n\n  for (int i = 0;  i < n;  ++i) {\n    int rank = eo->fetchPointer(x   =   i * e_N  +  e_rank).integerValue();\n    p->printf(\"%3d on %2d: \", i - n, rank);\n\n    switch (eo->fetchPointer(i * e_N  +  e_kind).integerValue()) {\n        default: fatal(); break;\n        case k_proc: {\n          Oop process      = eo->fetchPointer(i * e_N  +  e_process); assert(process.is_mem());\n          p->printf(\"switch to process 0x%x\", process.as_untracked_object_ptr());\n        }\n          break;\n\n      case k_aux: {\n        int rank         = eo->fetchPointer(i * e_N  +  e_rank).integerValue();\n        int aux1         = eo->fetchPointer(i * e_N  +  e_aux1).integerValue();\n        //int aux2         = eo->fetchPointer(i * e_N  +  e_aux2).integerValue();\n        int id           = eo->fetchPointer(i * e_N  +  e_id  ).integerValue();\n        // p->printf(\"on %d: aux1 0x%x aux2 0x%x id %d\", rank, aux1, aux2, id);\n        p->printf(\"on %d: aux1 %s id %d\", rank, aux1, id);\n      }\n        break;\n\n        case k_gc:\n          p->printf(\"gc: %d\",  eo->fetchPointer(i * e_N  + e_gc).integerValue());\n          break;\n\n        case k_rcved_interp:\n          p->printf(\"received interp\");\n          break;\n\n        case k_bc: {\n          Oop meth         = eo->fetchPointer(i * e_N  +  e_method); assert(meth.is_mem());\n          Oop rcvr         = eo->fetchPointer(i * e_N  +  e_rcvr);\n          int pc           = eo->fetchPointer(i * e_N  +  e_pc  ).integerValue();\n          bool is_block    = eo->fetchPointer(i * e_N  +  e_is_block) == The_Squeak_Interpreter()->roots.trueObj;\n          int aux1         = eo->fetchPointer(i * e_N  +  e_aux1).integerValue();\n          int aux2         = eo->fetchPointer(i * e_N  +  e_aux2).integerValue();\n\n          Oop klass = rcvr.fetchClass();\n          Oop sel, mclass;\n          bool have_sel_and_mclass = klass.as_object()->selector_and_class_of_method_in_me_or_ancestors(meth, &sel, &mclass);\n          if (!have_sel_and_mclass) continue;\n          if (mclass == The_Squeak_Interpreter()->roots.nilObj)\n            mclass = rcvr.fetchClass();\n\n          p->printf(\"rcvr: \");  rcvr.print(p);\n          if (mclass != klass) {\n            p->printf(\"(\");\n            bool is_meta;\n            Oop mclassName = mclass.as_object()->name_of_class_or_metaclass(&is_meta);\n            if (is_meta) p->printf(\"class \");\n            mclassName.as_object()->print_bytes(p);\n            p->printf(\")\");\n          }\n          p->printf(\"  >>  \");\n          sel.as_object()->print_bytes(p);\n          p->printf(is_block ? \" [] \" : \"    \");\n          p->printf(\", pc: %d, \", pc);\n\n          Object_p mo = meth.as_object();\n          u_char bc = mo->first_byte_address()[pc];\n          The_Squeak_Interpreter()->printBC(bc, p);\n\n          p->printf(\", bcCount %d\", eo->fetchPointer(i * e_N  +  e_bcCount).integerValue());\n          if (aux1)  p->printf(\", aux1 = 0x%x\", aux1);\n          if (aux1)  p->printf(\", aux1 = 0x%x\", aux2);\n\n\n        }\n        break;\n    }\n    p->nl();\n  }\n}\n\n"
  },
  {
    "path": "vm/src/runtime/execution_tracer.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n/**\n * The Execution_Tracer recordes a number of events and reporting for them.\n *\n * Currently supported events:\n *   - k_proc:         scheduling a process\n *   - k_aux:          mutex events\n *   - k_gc:           GCs\n *   - k_rcved_interp: received interpreter instance\n *   - k_bc:           execution of a bytecode\n */\nclass Execution_Tracer: public Abstract_Tracer {\n  int gc_count;\n  void check_it(Oop);\n  Oop ctx; // for debugging\n\npublic:\n  Oop get();\n  enum { k_bc, k_gc, k_proc, k_rcved_interp, k_aux } kind;\n  struct bc {\n    int kind;\n    Oop method;\n    Oop rcvr;\n    int    rank    :  7;\n    u_int1 is_block:  1;\n    int    pc      : 12;\n    int bcCount;\n    int aux1;\n    int aux2;\n   };\n  struct gc {\n    int kind;\n    int rank;\n    int gc;\n  };\n  struct proc {\n    int kind;\n    int rank;\n    Oop process;\n  };\n  struct rcved_interp {\n    int kind;\n    int to_rank;\n  };\n  struct aux {\n    int kind;\n    int rank;\n    int aux1;\n    int aux2;\n    int id;\n  };\n   enum { e_kind, e_method, e_gc = e_method, e_proc = e_method, e_id = e_method, e_rcvr, e_process, e_rank, e_pc, e_is_block, e_bcCount, e_aux1, e_aux2, e_N};\n  static const int max_sizes = max(sizeof(bc), max(sizeof(gc), max(sizeof(proc), max(sizeof(rcved_interp), sizeof(aux)))));\n\n  private:\n    void* entry_ptr(int i) { return (char*)buffer +  i * max_sizes; }\n  public:\n  void set_context(Oop c) {ctx = c;}\n\n  Execution_Tracer(int n);\n  void do_all_roots(Oop_Closure*);\n  virtual void trace(Squeak_Interpreter* si);\n\n  void set_aux(int id, const char* why) {\n    aux* e = (aux*)entry_ptr(get_free_entry());\n    e->kind = k_aux;\n    e->id = id;\n    e->rank = Logical_Core::my_rank();\n    e->aux1 = (int)why;\n    e->aux2 = 0;\n    /*\n    if (ctx.is_mem()) {\n      e->aux1 = (int)ctx.as_object();\n      e->aux2 = ctx.as_object()->fetchPointer(Object_Indices::InstructionPointerIndex).integerValue();\n    }\n    else\n      e->aux1 = e->aux2 = 0;\n     */\n  }\n  void received_current_bytecode() {\n    rcved_interp* e = (rcved_interp*)entry_ptr(get_free_entry());\n    e->kind = k_rcved_interp;\n    e->to_rank = Logical_Core::my_rank();\n  }\n  void set_proc(Oop p) {\n    proc* e = (proc*)entry_ptr(get_free_entry());\n    e->kind = k_proc;\n    e->rank = Logical_Core::my_rank();\n    e->process = p;\n  }\n  void record_gc() {\n    gc* e = (gc*)entry_ptr(get_free_entry());\n    e->kind = k_gc;\n    e->rank = Logical_Core::my_rank();\n    e->gc = gc_count++;\n  }\n\n  void add_bc(Oop method, Oop rcvr, int pc, bool is_block, int bc_count) {\n    bc* e = (bc*)entry_ptr(get_free_entry());\n    e->kind = k_bc;\n    e->method = method;\n    e->rcvr = rcvr;\n    e->pc = pc;\n    e->is_block = is_block ? 1 : 0;\n    e->rank = Logical_Core::my_rank();\n    e->bcCount = bc_count;\n\n    if (ctx.is_mem()) {\n      e->aux1 = (int)ctx.as_object();\n      e->aux2 = ctx.as_object()->fetchPointer(Object_Indices::InstructionPointerIndex).integerValue();\n    }\n  }\n\n  virtual void print();\n  static void print_entries(Oop, Printer*);\n\nprotected:\n  Oop array_class();\n  void copy_elements(int src_offset, void* dst, int dst_offset, int num_elems, Object_p dst_obj);\n\n};\n\n"
  },
  {
    "path": "vm/src/runtime/gc_debugging_tracer.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\nbool GC_Debugging_Tracer::force_real_context_allocation() {\n  const int period = 1;\n  if (!is_during_remote_context_allocation)\n    return false;\n  if (remote_context_allocation_requests % period != 0)\n    return false;\n  return true;\n}\n\nbool GC_Debugging_Tracer::force_gc() {\n  const int period = 2;\n  if (!is_during_remote_context_allocation)\n    return false;\n  ++remote_context_allocations;\n   if (remote_context_allocations % period  != 0)\n    return false;\n  lprintf( \"forcing GC for debugging, %dth chance out of every %d\\n\",\n          remote_context_allocation_requests, period);\n  return true;\n}\n\nvoid GC_Debugging_Tracer::record_gc() {\n  ++gc_count;\n  if (is_during_remote_context_allocation)\n    lprintf( \"GC during remote context allocation, %d RCA, %d gc\\n\",\n            remote_context_allocation_requests, gc_count);\n}\n\n"
  },
  {
    "path": "vm/src/runtime/gc_debugging_tracer.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n/**\n * Record basic GC execution information.\n * Similar to some of the new performance counters.\n */\nclass GC_Debugging_Tracer : public Abstract_Tracer {\n  bool is_during_remote_context_allocation;\n  int remote_context_allocation_requests;\n  int remote_context_allocations;\n  int gc_count;\n public:\n  GC_Debugging_Tracer() : Abstract_Tracer(1, 1, 1) {\n    is_during_remote_context_allocation = false;\n    remote_context_allocation_requests = 0;\n    remote_context_allocations = 0;\n  }\n  void do_all_roots(Oop_Closure*) {}\n  void starting_remote_context_allocation() {\n    ++remote_context_allocation_requests;\n    is_during_remote_context_allocation = true;\n  }\n  void finishing_remote_context_allocation() {\n    is_during_remote_context_allocation = false;\n  }\n  bool force_gc();\n  bool force_real_context_allocation();\n  void record_gc();\n\nprotected:\n  Oop array_class() { fatal(\"inappropriate\"); return Oop::from_bits(0); }\n  void copy_elements(int /* src_offset */, void* /* dst */, int /* dst_offset */, int /* num_elems */, Object_p /* dst_obj */) {\n    fatal(\"inappropriate\");\n  }\n};\n\n"
  },
  {
    "path": "vm/src/runtime/headers.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n/**\n * Naming conventions\n *\n *  files   - names are lower-case, words are separated by underscores\n *          - names of Squeak-related files like RVMPlugin keep their\n *            Squeak-like naming scheme\n *\n *  classes - words start with a capital letter\n *          - words are separated by an underscore\n *          - abbreviations are completely capitalized\n *          - Oop isn't an abbreviation of object-oriented pointer ;)\n */\n\n# include <stdio.h>\n# include <stdlib.h>\n# include <string.h>\n# include <stdarg.h>\n# include <ctype.h>\n# include <sys/mman.h>\n# include <fcntl.h>\n# include <unistd.h>\n# include <signal.h>\n# include <errno.h>\n\n# if On_Tilera\n#  include <tmc/mem.h>\n#  include <arch/sim.h>\n#  include <arch/cycle.h>\n#  include <arch/udn.h> \n#  if Multiple_Tileras\n#    include <tilepci.h>\n#  endif\n\n#  if Use_CMem\n#   include <tmc/cmem.h>\n#  endif\n#  if On_Tilera_With_GCC\n#   \n#  else /* Tilera MDE before 3.x */\n#    include <ilib.h>\n#    include <asm/page.h>\n#  endif\n# else\n#  include \"synced_queue.h\"\n#  include \"buffered_channel.h\"\n#  include \"buffered_channel_debug.h\"\n# endif\n\n# if On_iOS\n#  include <libkern/OSAtomic.h>\n# elif On_Apple\n#  include <monitor.h>\n#  include <libkern/OSAtomic.h>\n# else\n#  include <sys/resource.h>\n# endif\n\n\n// # include \"rvm_config.h\" // makefile (or Prefix Header setting in Xcode language settings) includes this before EVERY .c or .cpp or .m file\n\n# include \"my_rank.h\"\n\n# include \"tags.h\"\n# include \"error_handling.h\"\n# include \"printer.h\"\n# include \"types.h\"\n# include \"utils.h\"\n\n# include \"os_interface.h\"\n\n\n# if !On_iOS\n# include \"host_pci_info.h\"\n\n# include \"abstract_zero_copy_command_queue_endpoint.h\"\n\n# include \"chip_to_chip_direct_to_hypervisor_zero_copy_endpoint.h\"\n# include \"chip_to_chip_direct_to_hypervisor_zero_copy_sender.h\"\n# include \"chip_to_chip_direct_to_hypervisor_zero_copy_receiver.h\"\n\n# include \"chip_to_chip_zero_copy_command_queue_endpoint.h\"\n# include \"chip_to_chip_zero_copy_command_sender.h\"\n# include \"chip_to_chip_zero_copy_command_receiver.h\"\n\n# include \"tilera_chip_to_chip_message_queue.h\"\n# endif\n\n\n# include \"message_queue.h\"\n# include \"cpu_coordinate.h\"\n\n# include \"abstract_os_interface.h\"\n# include \"ilib_os_interface.h\"\n# include \"tmc_os_interface.h\"\n# include \"posix_os_interface.h\"\n# include \"osx_os_interface.h\"\n\n# include \"performance_counters.h\"\n\n# include \"safepoint_ability.h\"\n# include \"safepoint_request_queue.h\"\n\n# include \"rank_set.h\"\n\n# include \"measurements.h\"\n\n# include \"rvm_bitmap.h\"\n# include \"bytemap.h\"\n\n# include \"preheader.h\"\n\n\n# include \"tracked_ptr_registry.h\"\n# include \"tracked_ptr.h\"\n\n# include \"object_p.h\"\n\n# include \"abstract_oop.h\"\n# include \"oop.h\"\n# include \"oop_closure.h\"\n\n# include \"abstract_cpu_coordinate.h\"\n# include \"dummy_cpu_coordinate.h\"\n# include \"tile_cpu_coordinate.h\"\n\n# include \"receive_marker.h\"\n# include \"message_templates.h\"\n# include \"message_statics.h\"\n# include \"abstract_message.h\"\n\n# include \"abstract_message_queue.h\"\n# include \"shared_memory_message_queue.h\"\n# include \"shared_memory_message_queue_per_sender.h\"\n# include \"ilib_message_queue.h\"\n\n# include \"memory_semantics.h\"\n# include \"abstract_memory_semantics.h\"\n# include \"thread_memory_semantics.h\"\n# include \"process_memory_semantics.h\"\n\n# include \"logical_core.h\"\n\n# include \"interpreter_subset_for_control_transfer.h\"\n# include \"message_stats.h\"\n# include \"message_classes.h\"\n\n# include \"message_or_ack_request.h\"\n# include \"deferred_request.h\"\n# include \"interactions.h\"\n\n# include \"timeout_timer.h\"\n# include \"timeout_deferral.h\"\n\n# include \"special_indices.h\"\n# include \"roots.h\"\n# include \"object_indices.h\"\n\n# include \"abstract_mutex.h\"\n# include \"safepoint.h\"\n# include \"scheduler_mutex.h\"\n# include \"semaphore_mutex.h\"\n\n# include \"abstract_object_heap.h\"\n# include \"multicore_object_heap.h\"\n\n# include \"header_type.h\"\n# include \"word_containing_object_type.h\"\n# include \"chunk.h\"\n# include \"object.h\"\n# include \"process_field_locator.h\"\n\n# include  \"abstract_tracer.h\"\n# include      \"core_tracer.h\"\n# include       \"oop_tracer.h\"\n# include \"execution_tracer.h\"\n# include \"profiling_tracer.h\"\n# include \"gc_debugging_tracer.h\"\n\n\n\n# include \"abstract_object_table.h\"\n# include \"multicore_object_table.h\"\n\n# include \"memory_system.h\"\n\n# include \"runtime_tester.h\"\n\n# include \"method_cache.h\"\n# include \"at_cache.h\"\n\n# include \"externals.h\"\n# include \"abstract_primitive_table.h\"\n# include \"primitive_table.h\"\n# include \"obsolete_indexed_primitive_table.h\"\n# include \"obsolete_named_primitive_table.h\"\n# include \"external_primitive_table.h\"\n# include \"debug_store_checks.h\"\n# include \"squeak_interpreter.h\"\n\n# include \"squeak_image_reader.h\"\n\n\n# include \"gc_oop_stack.h\"\n# include \"abstract_mark_sweep_collector.h\"\n# include \"indirect_oop_mark_sweep_collector.h\"\n# include \"mark_sweep_collector.h\"\n\n# include \"RVMPlugin.h\"\n\n# include \"oop.inline.h\"\n# include \"chunk.inline.h\"\n# include \"object.inline.h\"\n# include \"abstract_object_heap.inline.h\"\n# include \"multicore_object_heap.inline.h\"\n# include \"multicore_object_table.inline.h\"\n# include \"memory_system.inline.h\"\n\n# include \"debug_helper.h\"\n\n"
  },
  {
    "path": "vm/src/runtime/main.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# include \"headers.h\"\n# include <limits.h>\n# include <math.h>\n\nFILE* BytecodeTraceFile;\nextern char* displayName;\n# if On_iOS\n  char* displayName;\n# endif\n\nstatic void consume_argument(int& argc, char**& argv, int n) {\n  argv[n] = argv[0];\n  argv += n;\n  argc -= n;\n}\n\n\nstatic bool have_set_core_count = false;\n\nstatic void set_geom(char* sizes) {\n#if On_Tilera\n  int w, h;\n  if (isdigit(w = sizes[0])  &&  sizes[1] ==','  &&  isdigit(h = sizes[2])  &&  sizes[3] == '\\0' ) {\n    // convert from ascii\n    w = w - '0';\n    h = h - '0';\n    \n    CPU_Coordinate::set_width_height(w,  h);\n    Logical_Core::num_cores = w * h;\n    have_set_core_count = true;\n  }\n  else\n    OS_Interface::die(\"bad argument syntax: needs to be `-geom <digit>,<digit>'\\n\");\n#else\n  OS_Interface::die(\"bad argument: -geom only supported on Tilera, use -num_cores instead.'\\n\");\n#endif\n}\n\nvoid set_num_cores(char* num_cores_str) {\n  /* parses strings with 1 or 2 digits <digit{1,2}> */\n  int num_cores;\n  if (isdigit(num_cores = num_cores_str[0])  &&  num_cores_str[1] == '\\0' ) {\n    num_cores = num_cores - '0';\n    Logical_Core::num_cores = num_cores;\n    have_set_core_count = true;\n    \n  }\n  else if (isdigit(num_cores_str[0])  &&  isdigit(num_cores_str[1])  &&  num_cores_str[2] == '\\0' ) {\n\t  num_cores = (num_cores_str[0] - '0') * 10 + (num_cores_str[1] - '0');\n\t  Logical_Core::num_cores = num_cores;\n    have_set_core_count = true;\n  }\n  else\n    OS_Interface::die(\"bad argument syntax: needs to be `-num_cores <digit>'\\n\");\n\n# if On_Tilera\n  // TODO: put this into its own routine, and avoid the #if\n\n  // Calculate the dimensions of the rectangle fitting all cores\n  int w, h;\n  h = sqrt(num_cores);\n  w = num_cores / h;\n  if (w * h < num_cores) {\n    if   (w == h)  w += 1;\n    else           h += 1;\n\n    assert(w * h >= num_cores);\n  }\n\n  CPU_Coordinate::set_width_height(w,  h);\n# endif\n}\n\nstatic void set_trace_file(char* f) {\n  BytecodeTraceFile = fopen(f, \"r\");\n  if (BytecodeTraceFile == NULL) {\n    perror(\"bytecode trace file:\");\n    exit(1);\n  }\n}\n\nextern int headless;\n# if On_iOS\nint headless = false;\n# endif\n\n\n\n# define FOR_ALL_ARGS_WITH_PARAMS_DO(template) \\\ntemplate(\"-display\",            displayName=STRING,                               \"<display>\") \\\ntemplate(\"-geom\",               set_geom(STRING),                                 \"<digit,digit>\") \\\ntemplate(\"-num_cores\",          set_num_cores(STRING),                            \"<digit{1,2}>\") \\\ntemplate(\"-min_heap_MB\",        Memory_System::min_heap_MB = NUMBER,              \"N\") \\\ntemplate(\"-profile_after\",      The_Squeak_Interpreter()->set_profile_after(NUMBER), \"N\") \\\ntemplate(\"-quit_after\",         The_Squeak_Interpreter()->set_quit_after(NUMBER),    \"N\") \\\ntemplate(\"-round_robin_period\", Memory_System::set_round_robin_period(NUMBER),    \"N\") \\\ntemplate(\"-run_mask\",           The_Squeak_Interpreter()->set_run_mask(NUMBER64),    \"N\") \\\ntemplate(\"-trace\",              set_trace_file(STRING),                           \"file-name\") \\\ntemplate(\"-num_chips\",          The_Squeak_Interpreter()->set_num_chips(NUMBER),    \"N\")\n\n\n\n# define FOR_ALL_BOOLEAN_ARGS_DO(template) \\\ntemplate(\"-dont_replicate_all\",    Memory_System::replicate_all = false, \"not replicating everything\") \\\ntemplate(\"-eschew_huge_pages\",  Memory_System::use_huge_pages = false, \"not using huge pages\") \\\ntemplate(\"-headless\",           headless = 1, \"headless\") \\\ntemplate(\"-make_checkpoint\",    The_Squeak_Interpreter()->set_make_checkpoint(true), \"making checkpoint\") \\\ntemplate(\"-no_fence\",           The_Squeak_Interpreter()->set_fence(false), \"not fencing memory on control transfers\") \\\ntemplate(\"-print_moves_to_read_write\",  The_Squeak_Interpreter()->set_print_moves_to_read_write(true), \"printing moves to read_write heaps\") \\\ntemplate(\"-replicate_methods\",  Memory_System::replicate_methods = true, \"replicating methods\") \\\ntemplate(\"-use_checkpoint\",     The_Squeak_Interpreter()->set_use_checkpoint(true), \"using checkpoint\") \\\ntemplate(\"-replicate_OT\",       Multicore_Object_Table::replicate = true, \"let hardware replicate the object table\") \\\ntemplate(\"-print_gc\",           Abstract_Mark_Sweep_Collector::print_gc = true, \"Print GC\") \\\ntemplate(\"-version\",            print_version_info(), \"Print full version information\") \\\ntemplate(\"-use_cpu_ms\",         The_Squeak_Interpreter()->set_use_cpu_ms(true), \"use CPU time instead of elapsed time\")\n\n\nstatic void print_version_info() {\n  // compiling machine\n#define stringify(s) expstr(s)\n#define expstr(s) #s\n  \n  printf(\"Compiled code:\\t\\t%s\\n\", __FILE__);\n#if defined(GIT_REVISION_ID)\n  printf(\"Git Revision Id:\\t%s\\n\", stringify(GIT_REVISION_ID));\n#endif  \n  printf(\"Compilation date:\\t%s %s\\n\", __DATE__, __TIME__);\n   \n#if defined(COMPILATION_HOSTNAME)\n  printf(\"Compiled on:\\t\\t%s\\n\", stringify(COMPILATION_HOSTNAME));\n#endif\n    \n  printf(\"Used compiler:\\t\\t\");\n#if defined(__tile__)\n  #if defined(__TILECC__)\n  printf(\"tile-cc version %d.%d.%d\\n\", __TILECC__, __TILECC_MINOR__, __TILECC_PATCHLEVEL__);\n  #else\n  printf(\"tile-c++ (GCC-based) version %s\\n\", __VERSION__);\n  #endif\n#else\n  printf(\"%s\\n\", __VERSION__);\n#endif\n  \n#if defined(__OPTIMIZE__)\n  printf(\"Optimization on\\n\");\n#endif\n  \n  printf(\"\\n\\n\");\n  print_config();\n  exit(0);\n}\n\nstatic void usage(char** argv) {\n  fprintf(stderr, \"Usage: %s\", argv[0]);\n\n# define print_arg_with_param(argName,setExpr,symbolicVal) fprintf(stderr, \" [%s %s]\", argName, symbolicVal);\n# define print_boolean_arg(argName,setExpr,explanation) fprintf(stderr, \" [%s]\", argName);\n\n  FOR_ALL_ARGS_WITH_PARAMS_DO(print_arg_with_param)\n  FOR_ALL_BOOLEAN_ARGS_DO(print_boolean_arg)\n# undef print_arg_with_param\n# undef print_boolean_arg\n\n    fprintf(stderr, \" <snapshot-file-name.image>\\n\");\n    exit(1);\n}\n\n\nstatic void process_arguments(int& argc, char**& argv) {\n   if (argc < 2) {\n    usage(argv);\n  }\n\n  bool do_print = 0 == Memory_Semantics::get_group_rank(); // it is not safe to use Logical_Core:my_rank() here, since it is not initialized yet\n\n  for (int old_argc = -1;  old_argc != argc;  ) {\n    old_argc = argc;\n\n    if (argc < 2)  /* this means we only have the binary name */\n      break;\n\n    # define parse_arg_with_param(argName,setExpr,symbolicVal) \\\n      if (strcmp(argv[1], argName) == 0) { \\\n        __attribute__((unused)) char* STRING = argv[2]; \\\n        __attribute__((unused)) int NUMBER = atoi(argv[2]); \\\n        __attribute__((unused)) int64 NUMBER64 = atoll(argv[2]); \\\n        setExpr; \\\n        if (do_print)  fprintf(stdout, \"%s = %s\\n\", argName, argv[2]); \\\n        consume_argument(argc, argv, 2); \\\n        continue; \\\n       }\n\n    # define parse_boolean_arg(argName,setExpr,explanation) \\\n      if (strcmp(argv[1], argName) == 0) { \\\n        setExpr; \\\n        if (do_print)  fprintf(stdout, \"%s\\n\", explanation); \\\n        consume_argument(argc, argv, 1); \\\n      }\n      FOR_ALL_ARGS_WITH_PARAMS_DO(parse_arg_with_param);\n      FOR_ALL_BOOLEAN_ARGS_DO(parse_boolean_arg);\n\n    # undef parse_arg_with_param\n    # undef parse_boolean_arg\n  }\n\n  if (!have_set_core_count)\n    Logical_Core::num_cores = 1;\n\n  if (argc < 2)  // looks like the image parameter is missing\n    usage(argv);\n  \n  if (argv[1][0] == '-') {\n    fprintf(stderr, \"bad argument: %s\\n\", argv[1]);\n    usage(argv);\n  }\n}\n\n\nvoid helper_core_main() {\n  if ( Using_Threads )\n    Memory_Semantics::initialize_local_logical_core();\n\n  The_Memory_System()->initialize_helper();\n  The_Squeak_Interpreter()->receive_initial_interpreter();\n  {\n    Safepoint_Ability sa(true);\n    WAIT_FOR_MESSAGE(startInterpretingMessage, Logical_Core::main_rank);\n  }\n  extern void initip();\n  initip();\n  // Because BitBltPlugin only gets initialized when the literal in the ST method\n  //  gets set for that prim, bit blt locally prims don't init it on all cores.\n  //  Do it by brute force here. HACK -- dmu 4/09\n  rvm_callInitializersInAllModules();\n  Message_Statics::run_timer = true;\n  The_Squeak_Interpreter()->interpret();\n\n  char buf[BUFSIZ];\n  Logical_Core::my_print_string(buf, sizeof(buf));\n  lprintf( \"helper finsihed: %s\\n\", buf);\n  if ( Using_Processes ) {\n    rvm_exit();\n  }\n}\n\n\nvoid initialize_basic_subsystems() {\n  OS_Interface::profiler_disable();\n  OS_Interface::profiler_clear();\n  \n  OS_Interface::initialize();\n  \n  Memory_Semantics::initialize_timeout_timer();\n  Memory_Semantics::initialize_memory_system();\n  \n  Printer::init_globals();\n}\n\nvoid read_image(char* image_path) {\n  if (The_Squeak_Interpreter()->use_checkpoint())\n    Squeak_Image_Reader::fake_read(image_path, The_Memory_System(), The_Squeak_Interpreter());\n  else\n    Squeak_Image_Reader::read(image_path, The_Memory_System(), The_Squeak_Interpreter());\n}\n   \nvoid begin_interpretation() {\n  if (The_Squeak_Interpreter()->make_checkpoint())\n    The_Squeak_Interpreter()->save_all_to_checkpoint();\n  \n  assert_always(The_Squeak_Interpreter()->safepoint_ability == NULL);\n  The_Squeak_Interpreter()->distribute_initial_interpreter();\n  Message_Statics::run_timer = true;\n  {\n    Safepoint_Ability sa(true);\n    The_Memory_System()->verify_if(check_assertions);\n    if (check_assertions)\n      The_Squeak_Interpreter()->verify_all_processes_in_scheduler();\n    if (Trace_Execution) The_Squeak_Interpreter()->trace_execution();\n    if (Trace_GC_For_Debugging) The_Squeak_Interpreter()->trace_for_debugging();\n    startInterpretingMessage_class().send_to_other_cores();\n  }\n  \n  if (OS_Interface::get_power_source() == OS_Interface::battery) {\n    fprintf(stdout, \"running on battery power: saving cycles but idle cores will slow things down\\n\");\n    The_Squeak_Interpreter()->set_idle_cores_relinquish_cpus(true);\n  }\n  \n  // Doesn't work yet:  The_Memory_System()->moveAllToRead_MostlyHeaps();\n  The_Squeak_Interpreter()->interpret();\n  ioExit();\n}\n\nvoid initialize_interpreter_instances_selftest_and_interpreter_proxy(char** orig_argv) {\n  Memory_Semantics::go_parallel(helper_core_main, orig_argv);\n  \n  char buf[BUFSIZ];\n  Logical_Core::my_print_string(buf, sizeof(buf));\n  fprintf(stdout, \"main running: %s\\n\", buf);\n  print_time(); fprintf(stderr, \"\\n\");\n  \n  \n  print_config();\n  \n  Runtime_Tester::test();\n    \n  \n  extern void initip();\n  initip();\n  \n}\n\n\n# if !On_iOS\nint main(int argc, char *argv[]) {\n  struct rlimit rl = {100000000, 100000000}; //{ RLIM_INFINITY, RLIM_INFINITY };\n  // The rlimit was an attempt to get core dumps for a MDE version that broke them.\n  // It didn't work, but we might need it someday. -- dmu 4/09\n  if (false && setrlimit( RLIMIT_CORE, &rl)) {\n    perror(\"setrlimit\");\n    fatal(\"rlimit\");\n  }\n  // set_sim_tracing(SIM_TRACE_NONE);\n  \n  initialize_basic_subsystems();\n  \n  char** orig_argv = new char*[argc + 1];\n  for (int i = 0;  i <= argc;  ++i)  orig_argv[i] = argv[i];\n  process_arguments(argc, argv);\n\n  if (MakeByteCodeTrace) {\n    BytecodeTraceFile = fopen(\"bytecode_trace\", \"w\");\n    if (BytecodeTraceFile == NULL) {\n      perror(\"bytecode trace file\");\n      exit(1);\n    }\n  }\n      \n  OS_Interface::ensure_Time_Machine_backs_up_run_directory();\n\n  initialize_interpreter_instances_selftest_and_interpreter_proxy(orig_argv);\n  \n  char image_path[PATH_MAX];\n  realpath(argv[1], image_path);\n  \n  read_image(image_path);\n  \n  extern char** environ;\n  sqr_main(argc, argv, environ);\n  \n  begin_interpretation();\n  \n  return 0;\n}\n# endif /* ! On_iOS */\n\n\n"
  },
  {
    "path": "vm/src/runtime/measurements.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# include \"headers.h\"\n\nMeasurements The_Measurements;\n\n# define  NAME_STRING(name) #name ,\n\nconst char* Measurements::labels[Measurements::N + 1] = {\n  FOR_EACH_MEAS_DO(NAME_STRING)\n  \"\"\n  };\n# undef NAME_STRING\nint Measurements::force_op_to_complete;\n\nu_int32 e_dummy;\n\nMeasurements::Measurements() {\n  baseline = 0;\n\n  for (int i = 0;  i < N;  ++i)\n    measurements[i].init();\n\n  GET_CYCLE_COUNT_QUICKLY(); // avoid blips\n  for (int i = 0; i < 100; ++i)\n    MEASURE(control, i, {});\n\n  Measurement& cntrl = measurements[control];\n  baseline = cntrl.mode_inliers(0);\n\n  __attribute__((unused)) u_int32 dummy;\n  for (int i = 0; i < 100; ++i)\n    MEASURE(measurement_cycles, dummy, dummy = GET_CYCLE_COUNT_QUICKLY());\n}\n\n\nvoid Measurements::print() {\n  if (!Measure)\n    return;\n  fprintf(stdout, \"\\n\\nMeasurements (baseline = %ld):\\n\", baseline);\n\n  print_details();\n  print_summaries();\n}\n\nvoid Measurements::print_summaries() {\n  print_config_for_spreadsheet();\n  fprintf(stdout, \"\\n\\nMeasurements summary (baseline = %ld):\\n\", baseline);\n\n   fprintf(stdout, \"description\\tmean\\tmode\\tmin\\t10%%\\t25%%\\tmedian\\t75%%\\t90%%\\tmax\\tinliers\\toutliers\\t< baseline\\n\");\n   fprintf(stdout, \"description\\tmean\\tmode\\tmin\\t10%%\\t25%%\\tmedian\\t75%%\\t90%%\\tmax\\tinliers\\toutliers\\t< baseline\\n\");\n\n\n  for (int i = 0;  i < N;  ++i)\n    measurements[i].print_summary(labels[i], baseline);\n  fprintf(stdout, \"\\n\");\n}\n\n\nvoid Measurements::print_details() {\n  print_config_for_spreadsheet();\n  fprintf(stdout, \"\\n\\nMeasurements details (baseline = %ld):\\n\", baseline);\n\n  for (int i = 0;  i < N;  ++i)\n    if (measurements[i].total_inliers())\n      fprintf(stdout, \"\\t%s\", labels[i]);\n\n  FOR_ALL_BUCKETS(b) {\n    if (b < baseline) continue;\n    fprintf(stdout, \"\\n%ld\", b - baseline);\n    for (int i = 0;  i < N;  ++i)\n      if (measurements[i].total_inliers())\n        fprintf(stdout, \"\\t%ld%%\", measurements[i].percentage_in_bucket(b));\n  }\n  fprintf(stdout, \"\\n\\n\");\n}\n\n\n void Measurements::Measurement::print_summary(const char* lbl, int32 baseline) {\n  fprintf(stdout, \"%s\" \"\\t%.1f\" \"\\t%ld\" \"\\t%ld\" \"\\t%ld\" \"\\t%ld\" \"\\t%ld\" \"\\t%ld\" \"\\t%ld\" \"\\t%ld\" \"\\t%lld\" \"\\t%ld\" \"\\t%ld\",\n    lbl,\n    mean_inliers(baseline),\n    mode_inliers(baseline),\n    total_inliers() + outliers ?  min_in_or_out  :  0,\n    inlier_at_percentile(baseline,  10),\n    inlier_at_percentile(baseline,  25),\n    inlier_at_percentile(baseline,  50),\n    inlier_at_percentile(baseline,  75),\n    inlier_at_percentile(baseline,  90),\n    total_inliers() + outliers ?  max_in_or_out - baseline  : 0,\n    total_inliers(),\n    outliers,\n    inliers_below_baseline(baseline));\n\n\n  fprintf(stdout, \"\\n\");\n}\n\n"
  },
  {
    "path": "vm/src/runtime/measurements.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#ifndef MEASUREMENTS_H_\n#define MEASUREMENTS_H_\n\n\n\n\nclass Measurements {\n  public:\n\n  static int force_op_to_complete;\n\n\n  public:\n\n  # define FOR_EACH_MEAS_DO(template) \\\n    template(control) \\\n    template(measurement_cycles) \\\n    template(object_table_accesses) \\\n    template(fetch_pointer) \\\n    template(send_point_to_point_message) \\\n    template(receive_point_to_point_message) \\\n    template(send_bufchan_message) \\\n    template(receive_bufchan_message) \\\n    template(release_bufchan_message) \\\n    template(send_strchan) \\\n    template(receive_strchan) \\\n    template(send_rawchan) \\\n    template(receive_rawchan) \\\n    template(context_initialization)\n\n  # define ENUM_ELEM(name) name,\n  enum what {\n    FOR_EACH_MEAS_DO(ENUM_ELEM)\n    N };\n  # undef ENUM_ELEM\n\n\n  static const char* labels[N+1];\n  class Measurement {\n     public:\n\n    static const int largest_bucket = 500;\n    # define FOR_ALL_BUCKETS(i) for (int i = 0;  i <= Measurements::Measurement::largest_bucket;  ++i)\n\n    int32 cycles[largest_bucket + 1], outliers, min_in_or_out, max_in_or_out;\n    void init() {\n      for (int i = 0;  i <= largest_bucket;  ++i)\n        cycles[i] = 0;\n      outliers = 0;\n      max_in_or_out = 0x80000000;\n      min_in_or_out = max_in_or_out - 1;\n    }\n\n    void update(OS_Interface::get_cycle_count_quickly_t c1, OS_Interface::get_cycle_count_quickly_t c2) {\n      int32 c = int32(c2 - c1);\n      if (c > largest_bucket  ||  c < 0)\n        ++outliers;\n      else\n        ++cycles[c];\n      if (min_in_or_out > c) min_in_or_out = c;\n      if (max_in_or_out < c) max_in_or_out = c;\n    }\n\n\n    int64 total_inliers() {\n      int32 s = 0;\n      FOR_ALL_BUCKETS(i) s += cycles[i];\n      return s;\n    }\n    int32 inlier_at_percentile(int32 baseline, int32 percentile) {\n      int64 part_sum = 0, target = max(1, total_inliers() * (int64)percentile / (int64)100);\n      FOR_ALL_BUCKETS(i) {\n        part_sum += cycles[i];\n        if (part_sum >= target)\n          return i - baseline;\n      }\n     return 0;\n    }\n    double mean_inliers(int32 baseline) {\n      int64 w_sum = 0;\n      FOR_ALL_BUCKETS(i) w_sum += i * cycles[i];\n      int64 t = total_inliers();\n      if (t == 0LL) return 0.0;\n      return double(w_sum) / t  -  baseline;\n    }\n    int32 mode_inliers(int32 baseline) {\n      int32 m = 0;\n      FOR_ALL_BUCKETS(i)\n        if (cycles[i] > cycles[m]) m = i;\n      if (cycles[m] == 0)  return 0;\n      return m - baseline;\n    }\n    int32 inliers_below_baseline(int32 baseline) {\n      int32 s = 0;\n      FOR_ALL_BUCKETS(i) {\n        if (i >= baseline) break;\n        s += cycles[i];\n      }\n      return s;\n    }\n\n    int32 percentage_in_bucket(int32 bucket) {\n      return cycles[bucket] * 100 / max(1, total_inliers());\n    }\n\n\n\n    void print_summary(const char* lbl, int32 baseline);\n   } measurements[N];\n  int32 baseline; // overhead of basic measurement\n\n  Measurements();\n\n\n  void print(), print_summaries(), print_details();\n};\n\nextern Measurements The_Measurements;\n\n\n\n# if Measure\n\n// take a value argument, to force the load to complete\n\n# define MEASURE(what, value, stmtOrBlock) \\\n  if (0) ; else { \\\n    OS_Interface::get_cycle_count_quickly_t c1 = GET_CYCLE_COUNT_QUICKLY(); \\\n    stmtOrBlock; \\\n    Measurements::force_op_to_complete = (int)(value); \\\n    OS_Interface::get_cycle_count_quickly_t c2 = GET_CYCLE_COUNT_QUICKLY(); \\\n    The_Measurements.measurements[Measurements::what].update(c1, c2); \\\n  }\n\n\n# else\n\n# define MEASURE(what, value, stmtOrBlock) \\\n  if (0) ; else { stmtOrBlock; }\n\n# endif\n\n#endif /*MEASUREMENTS_H_*/\n\n"
  },
  {
    "path": "vm/src/runtime/my_rank.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\nint cpu_core_my_rank() {\n  return Logical_Core::my_rank();\n}\n\nint rank_on_threads_or_zero_on_processes() {\n  return Memory_Semantics::rank_on_threads_or_zero_on_processes();\n}\n\n"
  },
  {
    "path": "vm/src/runtime/my_rank.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n/* Is used to avoid include order problems.\n   Was introduced to have threadlocals for the threaded version*/\nint cpu_core_my_rank();\nint rank_on_threads_or_zero_on_processes();\n\n"
  },
  {
    "path": "vm/src/runtime/oop_tracer.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\n\n\n\nOop Oop_Tracer::array_class() { return The_Squeak_Interpreter()->splObj(Special_Indices::ClassArray); }\n\nvoid Oop_Tracer::do_all_roots(Oop_Closure* oc) {\n  for (int i = 0;  i < end_of_live_data();  ++i)\n    oc->value(&((Oop*)buffer)[i], (Object_p)NULL);\n}\n\n"
  },
  {
    "path": "vm/src/runtime/oop_tracer.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Oop_Tracer: public Abstract_Tracer {\npublic:\n  Oop_Tracer(int n) : Abstract_Tracer(n, sizeof(Oop), 1) {}\n  void do_all_roots(Oop_Closure*);\n  void add(Oop x) {\n    ((Oop*)buffer)[get_free_entry()] = x;\n  }\n\nprotected:\n  Oop array_class();\n  void copy_elements(int src_offset, void* dst, int dst_offset, int num_elems, Object_p dst_obj) {\n    bcopy((Oop*)buffer + src_offset, (Oop*)dst + dst_offset, num_elems * sizeof(Oop));\n    dst_obj->my_heap()->check_multiple_stores_for_generations_only((Oop*)dst, num_elems);\n  }\n\n};\n\n"
  },
  {
    "path": "vm/src/runtime/performance_counters.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    Stefan Marr, Vrije Universiteit Brussel - Initial Implementation\n ******************************************************************************/\n\n\n# include \"headers.h\"\n\n\nPerformance_Counters* Performance_Counters::_all_perf_counters[Max_Number_Of_Cores] = { NULL };\n\nPerformance_Counters::Performance_Counters() {\n  // First, lets register this performce counter in the static array\n  // this will allow us to easily get all instances for printing, etc.\n  _all_perf_counters[Logical_Core::my_rank()] = this;\n  \n  // Now initialize everything with its initial value\n  # define INITIALIZE(name, type, initial_value) \\\n    name = initial_value;\n  \n  FOR_ALL_PERFORMANCE_COUNTERS_DO(INITIALIZE)\n  FOR_ALL_PERFORMANCE_ACCUMULATORS_DO(INITIALIZE)\n  \n  # undef INITIALIZE\n}\n\n# if Collect_Performance_Counters\n\n# define IMPL_STATIC_COUNTER_METHODS(name, type, initial_value) \\\n  void Performance_Counters::count_##name##_static() {\\\n    The_Squeak_Interpreter()->perf_counter.count_##name(); \\\n  }\n\n# define IMPL_STATIC_ACCUMULATOR_METHODS(name, type, initial_value) \\\n  void Performance_Counters::add_##name##_static(type value) {\\\n    The_Squeak_Interpreter()->perf_counter.add_##name(value); \\\n  }\n\n\nFOR_ALL_PERFORMANCE_COUNTERS_DO(IMPL_STATIC_COUNTER_METHODS)\n\nFOR_ALL_PERFORMANCE_ACCUMULATORS_DO(IMPL_STATIC_ACCUMULATOR_METHODS)\n\n# undef IMPL_STATIC_COUNTER_METHODS\n# undef IMPL_STATIC_ACCUMULATOR_METHODS\n\n\n# endif // Collect_Performance_Counters\n\n\nvoid Performance_Counters::print() {\n  if (!Collect_Performance_Counters)\n    return;\n  \n  fprintf(stdout, \"Performance Counters:\\n\");\n  \n  FOR_ALL_RANKS(r) {\n    fprintf(stdout, \"\\tRank %d:\\n\", r);\n    \n    # define PRINT(name, type, initial_value) fprintf(stdout, \"\\t %-30s = %10d\\n\", #name, _all_perf_counters[r]->name);\n\n    FOR_ALL_PERFORMANCE_COUNTERS_DO(PRINT)\n    \n    # undef PRINT\n\n    \n    # define PRINT(name, type, initial_value) fprintf(stdout, \"\\t %-30s = %10lld\\n\", #name, _all_perf_counters[r]->name);\n    \n    FOR_ALL_PERFORMANCE_ACCUMULATORS_DO(PRINT)\n    \n    # undef PRINT\n\n    fprintf(stdout, \"\\n\");\n    \n  }\n\n}\n\nvoid Performance_Counters::reset() {\n  if (!Collect_Performance_Counters)\n    return;\n  \n  FOR_ALL_RANKS(r) {\n  \n    # define RESET_ALL_COUNTERS(name, type, initial_value) \\\n      _all_perf_counters[r]->name = initial_value;\n  \n    FOR_ALL_PERFORMANCE_COUNTERS_DO(RESET_ALL_COUNTERS)\n  \n    # undef RESET_ALL_COUNTERS\n  \n    OS_Interface::mem_fence(); // STEFAN: I think, I actually want a flush here, but do not see it in the GCC manual\n  }\n}\n\n"
  },
  {
    "path": "vm/src/runtime/performance_counters.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    Stefan Marr, Vrije Universiteit Brussel - Initial Implementation\n ******************************************************************************/\n\n\n# if Collect_Performance_Counters\n  // use like PERF_CNT(The_Squeak_Interpreter(), add_interpret_cycles(foo - start));\n  # define PERF_CNT(interp, counter_or_accumulator_call) interp->perf_counter.counter_or_accumulator_call\n  \n# else\n  # define PERF_CNT(interp, counter_or_accumulator_call)\n\n# endif  // Collect_Performance_Counters\n\n\n\nclass Performance_Counters {\nprivate:\n\n  static Performance_Counters* _all_perf_counters[Max_Number_Of_Cores];\n  \n  # define FOR_ALL_PERFORMANCE_COUNTERS_DO(template) \\\n    template(acquire_safepoint,           int, 0) \\\n    template(acquire_scheduler_mutex,     int, 0) \\\n    template(send_intercore_messages,     int, 0) \\\n    template(received_intercore_messages, int, 0) \\\n    template(full_gc,                     int, 0) \\\n    template(methods_executed,            int, 0) \\\n    template(primitive_invokations,       int, 0) \\\n    template(bytecodes_executed,          int, 0) \\\n    \\\n    /* Stats from within Squeak_Interpreter::multicore_interrupt() */ \\\n    template(multicore_interrupts,        int, 0) \\\n    template(multicore_interrupt_check,   int, 0) \\\n    template(yield_requested,             int, 0) \\\n    template(data_available,              int, 0) \\\n \n \n  # define FOR_ALL_PERFORMANCE_ACCUMULATORS_DO(template) \\\n    template(interpret_cycles,            u_int64, 0LL) \\\n    template(multicore_interrupt_cycles,  u_int64, 0LL) \\\n    template(mi_cyc_1,                    u_int64, 0LL) \\\n    template(mi_cyc_1a,                   u_int64, 0LL) \\\n    template(mi_cyc_1a1,                  u_int64, 0LL) \\\n    template(mi_cyc_1a2,                  u_int64, 0LL) \\\n    template(mi_cyc_1b,                   u_int64, 0LL) \\\n\n\n  # define DECLARE_MEMBERS(name, type, initial_value) \\\n    type name;\n  \n  FOR_ALL_PERFORMANCE_COUNTERS_DO(DECLARE_MEMBERS)\n\n  FOR_ALL_PERFORMANCE_ACCUMULATORS_DO(DECLARE_MEMBERS)\n  \n  # undef DECLARE_MEMBERS\n\n  \npublic:\n  \n  Performance_Counters();\n  \n# if Collect_Performance_Counters\n  \n  # define DECLARE_COUNTER_METHODS(name, type, initial_value) \\\n    FORCE_INLINE void count_##name() { \\\n      /* Not necessary anymore OS_Interface::atomic_fetch_and_add(&name, 1); */ \\\n      name += 1; \\\n    } \\\n    \\\n    static void count_##name##_static();\n\n  #define DECLARE_ACCUMULATOR_METHODS(name, type, initial_value) \\\n    FORCE_INLINE void add_##name(type value) {\\\n      name += value; \\\n    } \\\n    \\\n    static void add_##name##_static(type value);\n  \n# else\n\n  # define DECLARE_COUNTER_METHODS(name, type, initial_value) \\\n    FORCE_INLINE void count_##name() const {} \\\n    \\\n    static FORCE_INLINE void count_##name##_static() {};\n  \n  # define DECLARE_ACCUMULATOR_METHODS(name, type, initial_value) \\\n    FORCE_INLINE void add_##name(type) const {} \\\n    \\\n    static void add_##name##_static(type) {}\n\n# endif  \n\n  \n  FOR_ALL_PERFORMANCE_COUNTERS_DO    (DECLARE_COUNTER_METHODS)\n  FOR_ALL_PERFORMANCE_ACCUMULATORS_DO(DECLARE_ACCUMULATOR_METHODS)\n  \n  \n  # undef DECLARE_COUNTER_METHODS\n  # undef DECLARE_ACCUMULATOR_METHODS\n  \n  \n  # define DECLARE_GETTERS(name, type, initial_value) \\\n    type get_##name() const {\\\n      return name; \\\n    }\n  \n  FOR_ALL_PERFORMANCE_COUNTERS_DO    (DECLARE_GETTERS)\n  FOR_ALL_PERFORMANCE_ACCUMULATORS_DO(DECLARE_GETTERS)\n\n  # undef DECLARE_GETTERS\n  \n\n  \n  static void print();\n  static void reset();\n  \n  void reset_accumulators() {\n    # define INITIALIZE(name, type, initial_value) \\\n      name = initial_value;\n    \n    FOR_ALL_PERFORMANCE_ACCUMULATORS_DO(INITIALIZE)\n    \n    # undef INITIALIZE\n  }\n  \n};\n"
  },
  {
    "path": "vm/src/runtime/printer.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\nPrinter*          stdout_printer;\nPrinter*          stderr_printer;\nPrinter*           debug_printer;\nPrinter*           error_printer;\nPrinter* dittoing_stdout_printer;\n\nvoid Printer::init_globals() {\n\n           stdout_printer = new FilePointerPrinter(stdout);\n           stderr_printer = new FilePointerPrinter(stderr);\n            debug_printer = new FilePointerPrinter(stdout, true);\n            error_printer = new FilePointerPrinter(stderr, true);\n  dittoing_stdout_printer = new DittoingPrinter(stdout_printer);\n}\n\n\nvoid Printer::printf(const char* fmt, ...) {\n  va_list ap;\n  va_start(ap, fmt);\n  print_to_wherever(fmt, ap);\n  va_end(ap);\n}\n\n\n\nvoid Printer::lprintf(const char* fmt, ...) {\n  va_list ap;\n  va_start(ap, fmt);\n  printf(\"%d on %d: \",\n         The_Squeak_Interpreter()->increment_print_sequence_number(),\n         Logical_Core::my_rank());\n  print_to_wherever(fmt, ap);\n  va_end(ap);\n}\n\n\nvoid FilePointerPrinter::print_to_wherever(const char* fmt, va_list ap) {\n  // just stdout for now\n  vfprintf(fp, fmt, ap);\n  // for sanity's sake, keep 'em synced\n  if (fp == stdout) fflush(stderr);  if (fp == stderr) fflush(stdout);\n  fflush(fp);\n}\n\nvoid StringPrinter::print_to_wherever(const char* fmt, va_list ap) {\n  if (used_len_without_null < buf_len - 1) {\n    int n = vsnprintf(buf + used_len_without_null, buf_len - used_len_without_null - 1 /* for null*/, fmt, ap);\n    used_len_without_null += n /*- 1 Stefan this -1 seems to be wrong, always cuts of last char*/  /* null */;\n  }\n}\n\n\nvoid DittoingPrinter::print_to_wherever(const char* fmt, va_list ap) {\n  char buf[buf_len];\n  /*int n =*/ vsnprintf(buf, buf_len - 1, fmt, ap);\n  if (!allow_dittoing ||  strncmp(buf, last_line, buf_len) != 0) {\n    if (dittoing) {\n      dittoing = false;\n      real_printer->printf(\"\\n\");\n    }\n    real_printer->printf(\"%s\", buf);\n    snprintf(last_line, sizeof(last_line), \"%s\", buf);\n  }\n  else {\n    dittoing = true;\n    real_printer->printf(\"\\\"\");\n  }\n}\n\n"
  },
  {
    "path": "vm/src/runtime/printer.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n// A class for printing that can be subclassed to print to a string, a file, etc.\nclass Printer {\n public:\n  static void init_globals();\n  Printer(bool iid = false) { include_implementation_details = iid; }\n  virtual ~Printer() {}\n  bool include_implementation_details;\n  void printf(const char* fmt, ...);\n  void lprintf(const char* fmt, ...);\n  void nl() { printf(\"\\n\"); }\n  virtual void dittoing_off() {}\n  virtual void dittoing_on() {}\n private:\n  virtual void print_to_wherever(const char* fmt, va_list) = 0;\n};\n\nclass FilePointerPrinter: public Printer {\n private:\n  FILE* fp;\n public:\n  FilePointerPrinter(FILE* x, bool iid = false) : Printer(iid) {fp = x;}\n  void print_to_wherever(const char* fmt, va_list);\n};\n\nclass StringPrinter: public Printer {\n private:\n  char* buf;\n  int buf_len;\n  int used_len_without_null;\n  bool dittoing;\n public:\n  StringPrinter(char* b, int n, bool iid = false) : Printer(iid) {\n    buf = b; buf_len = n;  used_len_without_null = 0;}\n  void print_to_wherever(const char* fmt, va_list);\n};\n\n// only works if printf's are for whole lines at a time\nclass DittoingPrinter: public Printer {\n private:\n  Printer* real_printer;\n  static const int buf_len = 10000;\n  char last_line[buf_len];\n  bool dittoing;\n  bool allow_dittoing;\n public:\n  DittoingPrinter(Printer* rp, bool iid = false) : Printer(iid) {\n    real_printer = rp;  dittoing = false;  last_line[0] = '\\0';  allow_dittoing = true;\n  }\n  void print_to_wherever(const char* fmt, va_list);\n  void dittoing_off() { allow_dittoing = false; }\n  void dittoing_on()  { allow_dittoing = true; }\n};\n\n\nextern Printer *debug_printer, *error_printer, *stdout_printer, *stderr_printer, *dittoing_stdout_printer;\n\n"
  },
  {
    "path": "vm/src/runtime/profiling_tracer.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\n# if Profile_Image\n\n#include  <string>\n#include  <map>\n\n\nvoid Profiling_Tracer::trace(Squeak_Interpreter* si) {\n  Execution_Tracer::trace(si);\n\n  record_for_profile(si->method(), si->roots.receiver, si->activeContext_obj()->is_this_context_a_block_context());\n}\n\nvoid get_profile(std::map<std::string, int>** prof) {\n  static std::map<std::string, int> profile;\n#warning Stefan: warning, not threadsafe\n\n  *prof = &profile;\n}\n\n\nvoid Profiling_Tracer::record_for_profile(Oop meth, Oop rcvr, bool is_block) {\n  if (Logical_Core::num_cores > 1)\n    return;\n\n  static std::string lastSignature;\n  std::map<std::string, int>* profile;\n#warning Stefan: warning, not threadsafe\n  get_profile(&profile);\n\n  static char buff[2024];\n  StringPrinter p(buff, 2023);\n\n  Oop klass = rcvr.fetchClass();\n  Oop sel, mclass;\n  bool have_sel_and_mclass = klass.as_object()->selector_and_class_of_method_in_me_or_ancestors(meth, &sel, &mclass);\n  if (!have_sel_and_mclass) return;\n  if (mclass == The_Squeak_Interpreter()->roots.nilObj)\n    mclass = rcvr.fetchClass();\n\n  rcvr.print(&p);\n  if (mclass != klass) {\n    p.printf(\"(\");\n    bool is_meta;\n    Oop mclassName = mclass.as_object()->name_of_class_or_metaclass(&is_meta);\n    if (is_meta) p.printf(\"class \");\n    mclassName.as_object()->print_bytes(&p);\n    p.printf(\")\");\n  }\n  p.printf(\">>\");\n  sel.as_object()->print_bytes(&p);\n  if (is_block) p.printf(\"[]\");\n\n  buff[2023] = 0;\n  std::string signature(buff);\n\n  if (lastSignature != signature) {\n    lastSignature = signature;\n    ++(*profile)[lastSignature];\n  }\n\n\n  // STEFAN: a little hack to be able to get the printout during debugging, any better ways to do so?\n  static bool print_profile = false;\n  if (print_profile) {\n    this->print_profile(debug_printer);\n  }\n}\n\nvoid Profiling_Tracer::print() {\n  Execution_Tracer::print();\n\n  if (Logical_Core::num_cores > 1)\n    return;\n\n\n  std::map<std::string, int>* profile;\n  get_profile(&profile);\n\n  for(std::map<std::string, int>::const_iterator it = profile->begin();\n      it != profile->end();\n      ++it) {\n    debug_printer->printf(it->first.c_str());\n    debug_printer->printf(\",\");\n    debug_printer->printf(\"%d\", it->second);\n    debug_printer->printf(\"\\n\");\n  }\n}\n\n# endif\n\n"
  },
  {
    "path": "vm/src/runtime/profiling_tracer.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# if Profile_Image\n\n/**\n * The Profiling_Tracer counts all Smalltalk message sends.\n * The messages are counted individually depending on their name/class.\n#warning STEFAN: currently not threadsafe...\n */\nclass Profiling_Tracer: public Execution_Tracer {\npublic:\n  Profiling_Tracer(int n): Execution_Tracer(n) {};\n\n  void record_for_profile(Oop method, Oop rcvr, bool is_block);\n\n  void print();\n\n  void trace(Squeak_Interpreter* si);\n\n  static void print_entries(Oop, Printer*);\n  static void print_profile(Printer*);\n};\n\n# endif\n\n"
  },
  {
    "path": "vm/src/runtime/rank_set.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\nvoid Rank_Set::unit_test() {\n  Rank_Set rs;\n  assert_always_eq(capacity(), Max_Number_Of_Cores);\n  rs.verify_includes_only();\n\n  rs.add(17);\n  rs.add(23);\n  rs.verify_includes_only(17, 23);\n\n  Rank_Set rs2 = rs - 23;\n  rs2.verify_includes_only(17);\n\n\n  Rank_Set rs3; rs3.add(17); Rank_Set rs4 = rs - rs3;\n  rs4.verify_includes_only(23);\n\n  rs.verify_includes_only(17, 23);\n\n  rs.remove(17);\n  rs.verify_includes_only(23);\n}\n\nvoid Rank_Set::verify_includes_only(int a, int b) const {\n  for (int r = 0;  r < capacity();  ++r)\n    assert_always( r == a  ||  r == b  ?  includes(r) : !includes(r) );\n}\n\n"
  },
  {
    "path": "vm/src/runtime/rank_set.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Rank_Set {\n  typedef u_int64 contents_t;\n\n  contents_t _contents;\n\n\npublic:\n  static void unit_test();\n\n  static int capacity() { return sizeof(contents_t) * 8; }\n\n  Rank_Set() { _contents = 0LL; }\n  Rank_Set(const Rank_Set& rs) { _contents = rs._contents; }\n\n  static Rank_Set all_up_to(const int x) {\n    Rank_Set r;\n    r._contents = contents_for_all_up_to(x);\n    return r;\n  }\n  static Rank_Set with_contents(const contents_t x) {\n    Rank_Set r;\n    r._contents = x;\n    return r;\n  }\n\n  contents_t contents() const { return _contents; }\n\n  bool is_empty() { return contents() == 0LL; }\n  static const int none = -1;\n  int  first_or_none() { return is_empty() ? none : least_significant_bit_position(contents()); }\n\n  void add(int x) { _contents |= bit_for(x); }\n  void remove(int x) { _contents &= ~bit_for(x); }\n  bool includes(int x)  const { return (_contents & bit_for(x)) ? true : false; }\n\n  Rank_Set operator + (const Rank_Set rs) const {\n    return Rank_Set::with_contents(contents() |  rs.contents());\n  }\n\n  Rank_Set operator + (int x) const {\n    return Rank_Set::with_contents(contents() |  bit_for(x));\n  }\n\n  Rank_Set operator - (const Rank_Set rs) const {\n    return Rank_Set::with_contents(contents() & ~rs.contents());\n  }\n\n  Rank_Set operator - (int x) const {\n    return Rank_Set::with_contents(contents() & ~bit_for(x));\n  }\n\n  bool operator  == (const Rank_Set rs) const { return contents() == rs.contents(); }\n  bool operator  != (const Rank_Set rs) const { return contents() != rs.contents(); }\n\n private:\n  static contents_t bit_for(int x) { return 1LL << contents_t(x); }\n  static contents_t contents_for_all_up_to(int x)  { return x == 64 ? ~0ULL : bit_for(x) - 1ULL; }\n\n  void verify_includes_only(int a = -1, int b = -1) const;\n\n};\n\n\n# define FOR_EACH_RANK_IN_SET(set, rank) \\\n  for (int rank = 0;  rank < Rank_Set::capacity();  ++rank) if (!set.includes(rank)); else\n\n"
  },
  {
    "path": "vm/src/runtime/runtime_tester.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Runtime_Tester {\n public:\n  static void test() {\n    Bitmap::test();\n    Bytemap::test();\n    typedefs::check_typedefs();\n    Object::test();\n    Oop::test();\n    Rank_Set::unit_test();\n    Safepoint_Request_Queue::unit_test();\n  }\n};\n\n"
  },
  {
    "path": "vm/src/runtime/rvm_bitmap.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\nvoid Bitmap::test() {\n  Bitmap b(5);\n  for (int i = 0; i < 100;  i += 7)  b.set(i);\n  for (int i = 0; i < 100;  ++i)\n    assert_always(b.is_set_bool(i) == (i % 7  ==  0));\n  for (int i = 0;  i < 100;  ++i) b.set(i);\n  for (int i = 0; i < 100;  i += 7)  b.clear(i);\n  for (int i = 0; i < 100;  ++i)\n    assert_always(b.is_set_bool(i) != (i % 7  ==  0));\n}\n\n"
  },
  {
    "path": "vm/src/runtime/rvm_bitmap.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Bitmap {\n  // state\n\n  int   _bit_length;\n  int   _map_length;\n  typedef char map_t;  static const int map_elem_shift = 3;\n  map_t* _map;\n\n  static const int map_elem_byte_size = sizeof(map_t);\n  static const int map_elem_bit_size = map_elem_byte_size * 8;\n  static map_t mask_for(int bit_index) { return 1 << (bit_index & (map_elem_bit_size - 1)); }\n\n  static int map_index(int bit_index) { return bit_index >> map_elem_shift;  }\n  static int map_length(int bit_length) { return map_index(bit_length - 1) + 1; }\n\n\npublic:\n  // constructors / destructors / growing\n  Bitmap(int bit_length) {\n    assert_eq((1 << map_elem_shift),  map_elem_bit_size, \"should be log\");\n    assert_message((int)sizeof(int) >= map_elem_byte_size, \"mask_for needs this\");\n    _bit_length = bit_length;\n    _map_length = map_length(_bit_length);\n    _map = new char[_map_length];\n    bzero(_map, _map_length);\n  }\n\n  ~Bitmap() { delete[] _map; }\n\nprivate:\n\n  void grow_if_needed(int bit_index) {\n    if (bit_index < _bit_length)  return;\n    int required_bit_length = bit_index + 1;\n    int new_bit_length = max(required_bit_length,  _bit_length * 2);\n    int new_map_length = map_length(new_bit_length);\n    int new_map_byte_length = new_map_length * map_elem_byte_size;\n    int map_byte_length = _map_length * map_elem_byte_size;\n\n    map_t* new_map = (map_t*)new char[new_map_byte_length];\n    memcpy(new_map, _map, map_byte_length);\n    memset((void*)((intptr_t)new_map + map_byte_length),  0,  new_map_byte_length - map_byte_length);\n\n    delete[] _map;\n    _bit_length = new_bit_length;\n    _map_length = new_map_length;\n    _map        = new_map;\n  }\n\n  map_t& element_for(int bit_index) {\n    grow_if_needed(bit_index);\n    return _map[map_index(bit_index)];\n  }\n\npublic:\n  // accessing\n\n  bool is_set(int i) { return element_for(i) & mask_for(i); }\n\n  bool is_set_bool(int i) { return !(!is_set(i));  } // returns 0 or 1\n\n  // mutating\n\n  void set(int i, bool b) { b ? set(i) : clear(i); }\n  void clear(int i) { element_for(i) &= ~mask_for(i); }\n  void set  (int i) { element_for(i) |=  mask_for(i); }\n\n  void clear_all() { memset(_map, 0, _map_length * map_elem_byte_size); }\n\n  void ensure_clear_then_set(int i) {\n    map_t& b = element_for(i);  char m = mask_for(i);\n    assert_always(!(b & m));\n    b |= m;\n  }\n  static void test();\n};\n\n"
  },
  {
    "path": "vm/src/runtime/rvm_config.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# include \"headers.h\"\n\n\nvoid print_config() {\n  fprintf(stdout, \"Configuration flags:\\n\");\n  # define PRINT(name) fprintf(stdout, \" %s%s\", name ? \" \" : \"!\", #name);\n  DO_ALL_CONFIG_FLAGS(PRINT)\n  fprintf(stdout, \"\\n\");\n  # undef PRINT\n}\n\n\n\nvoid print_config_for_spreadsheet() {\n\n  # define PRINT( name) fprintf(stdout, \"%s\\t%d\\n\", #name, name);\n\n  DO_ALL_CONFIG_FLAGS(PRINT)\n  fprintf(stdout, \"\\n\");\n}\n\n\n# undef PRINT\n\n"
  },
  {
    "path": "vm/src/runtime/rvm_config.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n// Makefile forces inclusion of this file before EVERY .c or .cpp file\n\n// A collection of all the ifdefs we use for configuring RVM.\n\n// This should be always defined if code is compiled for the RVM/RoarVM.\n// We use it in original Squeak code to indicate our adaptations.\n# ifndef ROAR_VM\n  # define ROAR_VM\n# endif\n\n# ifdef __cplusplus\n  # define RVM_CODE_NOT_SQUEAK_CODE // for decls already in Squeak code that we need\n# endif\n\n// for IOS\n\n#ifdef __OBJC__\n#import <Foundation/Foundation.h>\n#import <UIKit/UIKit.h>\n#endif\n\n\n// can invoke with -notimer or setenv SQUEAK_NOTIMER for debugging\n\n# ifdef __APPLE__\n  # define On_Apple 1\n# else\n  # define On_Apple 0\n# endif\n\n# if On_Apple\n  # ifdef TARGET_OS_IS_FOR_IPHONE\n    # define On_iOS 1\n    # define On_OSX 0\n  # else\n    # define On_OSX 1\n    # define On_iOS 0\n  # endif\n# else\n  # define On_iOS 0\n  # define On_OSX 0\n# endif\n\n\n// This is necessary to allow large heaps on Linux\n# define _FILE_OFFSET_BITS 64\n\n// invoke template with name and default\n# define DO_ALL_CONFIG_FLAGS(template) \\\n  template(On_Intel_Linux) \\\n  template(On_Tilera) \\\n  template(Enforce_Threads) \\\n  template(Using_Threads) \\\n  template(Using_Processes) \\\n  template(Replicate_PThread_Memory_System) /* true makes system on pthreads like Tilera, but slower */ \\\n  template(Max_Number_Of_Cores) \\\n  template(Number_Of_Channel_Buffers) \\\n  template(Configure_Squeak_Code_for_Tilera) \\\n  template(Work_Around_Extra_Words_In_Classes) \\\n  template(check_assertions) \\\n  template(check_many_assertions) \\\n  template(Measure) \\\n  template(DoBalanceChecks) \\\n  template(PrintFetchedContextRegisters) \\\n  template(Collect_Receive_Message_Statistics) \\\n  template(CountByteCodesAndStopAt) \\\n  template(CheckByteCodeTrace) \\\n  template(MakeByteCodeTrace) \\\n  template(PrintSends) \\\n  template(StopOnSend) \\\n  template(NthSendForStopping) \\\n  template(PrintMethodDictionaryLookups) \\\n  template(Print_Barriers) \\\n  template(Include_Debugging_Code) \\\n  template(Debugging) \\\n  template(Verbose_Debug_Prints) \\\n  template(Track_OnStackPointer) \\\n  template(Omit_Duplicated_OT_Overhead) \\\n  template(Omit_Spare_Bit) \\\n  template(Trace_Execution) \\\n  template(Trace_GC_For_Debugging) \\\n  template(Track_Last_BC_For_Debugging) \\\n  template(Collect_Performance_Counters) \\\n  template(Compile_Debug_Store_Checks) \\\n  template(Profile_Image) \\\n  template(Print_Scheduler) \\\n  template(Print_Scheduler_Verbose) \\\n  template(Checksum_Messages) \\\n  template(Always_Check_Method_Is_Correct) \\\n  template(Check_Prefetch) \\\n  template(Extra_OTE_Words_for_Debugging_Block_Context_Method_Change_Bug) \\\n  template(Check_Reliable_At_Most_Once_Message_Delivery) \\\n  template(Use_CMem) \\\n  template(Track_Processes) \\\n  template(Multiple_Tileras) \\\n  \\\n  /* The following are all used to analyze the unicore performance regression in porting to phthreads -- dmu 1/10 */ \\\n  template(Force_Direct_Squeak_Interpreter_Access) \\\n  template(Dont_Trace_Bytecode_Fetching) \\\n  template(Force_Direct_Timeout_Timer_List_Head_Access) \\\n  template(Omit_PThread_Locks) \\\n  template(Use_Spin_Locks) \\\n  template(Use_ThreadLocals) \\\n  template(Count_Cycles) \\\n  \\\n  template(Extra_Preheader_Word_Experiment) \\\n  template(Use_BufferedChannelDebug) \\\n  template(Use_PerSender_Message_Queue) \\\n  template(Include_Closure_Support) \\\n  template(Hammer_Safepoints) /* for debugging */ \\\n  \\\n  template(Dump_Bytecode_Cycles) \\\n  template(Dont_Dump_Primitive_Cycles) \\\n  \\\n  template(Print_Keys)\n\n\n\n// Flag to indicate the VM is meant for debugging.\n// This will ensure that the code itself is as debuggable\n// as possible (for instance disabling FORCE_INLINE)\n// without enforcing any extra debugging capabilities to\n// be included.\n// Will be used by some other flags as an indication if they\n// have not been defined explicitly.\n# ifndef Debugging\n  # define Debugging 0\n# endif\n\n\n# ifndef On_Intel_Linux\n  # define On_Intel_Linux 0\n# endif\n\n# ifndef On_Tilera\n  # define On_Tilera (!On_Apple && !On_Intel_Linux)\n# endif\n\n# define On_Tilera_With_GCC (On_Tilera && !defined(__TILECC__))\n\n\n# ifndef Enforce_Threads\n  # define Enforce_Threads !On_Tilera\n# endif\n\n# define Using_Threads    Enforce_Threads\n# define Using_Processes !Enforce_Threads\n\n# ifndef Replicate_PThread_Memory_System\n  # define Replicate_PThread_Memory_System 0\n# endif\n\n/* Used as the upper limit for some data structures */\n# ifndef Max_Number_Of_Cores\n  # define Max_Number_Of_Cores 64\n# endif\n\n# define Work_Around_Extra_Words_In_Classes On_Tilera\n\n\n# ifndef Configure_Squeak_Code_for_Tilera\n  # define Configure_Squeak_Code_for_Tilera 1 // Keep things consistent, even when not on Tilera\n# endif\n\n# ifndef Number_Of_Channel_Buffers\n  # if On_Tilera\n    # define Number_Of_Channel_Buffers 10 /*xxxxxx Seems to work, is this a good value? -- dmu 4/09?*/\n  # else\n    # define Number_Of_Channel_Buffers 100\n  # endif\n# endif\n\n# ifndef Measure\n  # define Measure 0\n# endif\n\n# ifndef Measure_Communication\n  # define Measure_Communication 0\n# elif Measure_Communication\n  # undef Measure\n  # define Measure 1\n# endif\n\n\n# ifndef Print_Barriers\n# define Print_Barriers 0\n# endif\n\n// Flag to include general debugging code\n# ifndef Include_Debugging_Code\n# define Include_Debugging_Code Debugging\n# endif\n\n# ifndef Verbose_Debug_Prints\n# define Verbose_Debug_Prints Include_Debugging_Code\n# endif\n\n# ifndef check_assertions\n# define check_assertions Debugging\n# endif\n\n# ifndef check_many_assertions\n# define check_many_assertions 0\n# endif\n\n# ifndef Track_OnStackPointer\n# define Track_OnStackPointer check_many_assertions\n# endif\n\n# ifndef DoBalanceChecks\n#  define DoBalanceChecks check_assertions\n# endif\n\n# ifndef PrintFetchedContextRegisters\n#  define PrintFetchedContextRegisters 0\n# endif\n\n# ifndef Print_Keys\n#  define Print_Keys 0\n# endif\n\n// Keeping a tally of the received messages seems to have an impact on performance.\n// Thus, it is only enabled when assertions are checked currently. STEFAN 2011-01-28\n# ifndef Collect_Receive_Message_Statistics\n# define Collect_Receive_Message_Statistics check_assertions\n# endif\n\n# ifndef Collect_Performance_Counters\n#  define Collect_Performance_Counters 0\n# endif\n\n# ifndef CountByteCodesAndStopAt\n#  define CountByteCodesAndStopAt 0\n# endif\n\n# ifndef CheckByteCodeTrace\n#  define CheckByteCodeTrace 0\n# endif\n\n# ifndef MakeByteCodeTrace\n#  define MakeByteCodeTrace 0\n# endif\n\n# ifndef PrintSends\n#  define PrintSends 0\n# endif\n\n# ifndef StopOnSend\n#  define StopOnSend ((const char *const)0)\n# endif\n\n# ifndef NthSendForStopping\n#  define NthSendForStopping 0\n# endif\n\n# ifndef PrintMethodDictionaryLookups\n#  define PrintMethodDictionaryLookups 0\n# endif\n\n# ifndef Omit_Duplicated_OT_Overhead\n#  define Omit_Duplicated_OT_Overhead 1\n# endif\n\n# ifndef Omit_Spare_Bit\n#  define Omit_Spare_Bit 1\n# endif\n\n# ifndef Checksum_Messages\n#  define Checksum_Messages 0\n# endif\n\n# ifndef Always_Check_Method_Is_Correct\n#  define Always_Check_Method_Is_Correct 0\n# endif\n\n// xxxxxx This flag was originall for debugging, but now I think the VM depends on it being set. -- dmu 4/09\n// The Squeak VM includes an optimization to fetch a bytecode ahead to avoid memory latency.\n// This flag ensures that the bytecode has been fetched ahead and stored properly.\n# ifndef Check_Prefetch\n#  define Check_Prefetch 1\n# endif\n\n# ifndef Use_CMem\n#  define Use_CMem 1\n# endif\n\n// This flag is for debugging. -- dmu 6/10\n// Track which processes are running in an uncached array\n// However, primitiveRunningProcessByCore requires this to be set, and the kiviats use it.\n// The primitive could be better implemented by asking each core with a message, someday. -- dmu 6/10\n# ifndef Track_Processes\n#  define Track_Processes 1\n# endif\n\n\n# ifndef Trace_Execution\n#  define Trace_Execution 0 // or could be: check_assertions\n# endif\n\n# ifndef Trace_GC_For_Debugging\n#  define Trace_GC_For_Debugging 0\n# endif\n\n# ifndef Track_Last_BC_For_Debugging\n#  define Track_Last_BC_For_Debugging 0\n# endif\n\n# ifndef Compile_Debug_Store_Checks\n#  define Compile_Debug_Store_Checks check_assertions\n# endif\n\n# ifndef Profile_Image\n#  define Profile_Image 0\n# endif\n\n# ifndef Print_Scheduler\n#  define Print_Scheduler 0\n# endif\n\n# ifndef Print_Scheduler_Verbose\n#  define Print_Scheduler_Verbose 0\n# endif\n\n\n# ifndef Extra_OTE_Words_for_Debugging_Block_Context_Method_Change_Bug // for debugging\n#  define Extra_OTE_Words_for_Debugging_Block_Context_Method_Change_Bug 0\n# endif\n\n# ifndef Check_Reliable_At_Most_Once_Message_Delivery // for debugging\n#  define Check_Reliable_At_Most_Once_Message_Delivery check_assertions\n# endif\n\n# ifndef Force_Direct_Squeak_Interpreter_Access\n# define Force_Direct_Squeak_Interpreter_Access 0\n# endif\n\n# ifndef Dont_Trace_Bytecode_Fetching\n# define Dont_Trace_Bytecode_Fetching 0\n# endif\n\n# ifndef Force_Direct_Timeout_Timer_List_Head_Access\n# define Force_Direct_Timeout_Timer_List_Head_Access 0\n# endif\n\n# ifndef Omit_PThread_Locks\n# define Omit_PThread_Locks 0\n# endif\n\n# ifndef Use_Spin_Locks\n# define Use_Spin_Locks 0\n# endif\n\n# ifndef Use_ThreadLocals\n# define Use_ThreadLocals !On_Apple\n# endif\n\n# ifndef Dump_Bytecode_Cycles\n# define Dump_Bytecode_Cycles 0 // measuring speed, dmu, 8.2010\n# endif\n\n# ifndef Dont_Dump_Primitive_Cycles\n# define Dont_Dump_Primitive_Cycles 1\n# endif\n\n# ifndef Count_Cycles\n# define Count_Cycles 0 //xxxxxxx was 0, when I needed to find a deadlock -- dmu 5/10, but it slows image loading -- dmu 6/10\n# endif\n\n# if Dump_Bytecode_Cycles\n# undef  Count_Cycles\n# define Count_Cycles 1\n# endif\n\n\n# ifndef Extra_Preheader_Word_Experiment\n# define Extra_Preheader_Word_Experiment 0\n# endif\n\n# ifndef Use_BufferedChannelDebug\n// If you turn this off, run on Mac, and run with Hammer_Safepoints with >2 cores, you can see the system break -- dmu 5/21/10\n// E.g.: check_received_transmission_sequence_number: message tellCoreIAmSpinningMessage from 2 to 0 is 5730 should_be 5731\n//  Fatal: message delivery error: file /Users/ungar/renaissance/rvm/src/messages/messages.cpp, line 204, function check_received_transmission_sequence_number, predicate 0, rank 0, main_rank 0, pid 95221\n// STEFAN: 2011-01-14, I just tried it, and the system reliably breaks down with an assertion on sequence numbers for spin requests.\n# define Use_BufferedChannelDebug 1\n# endif\n\n# ifndef Use_PerSender_Message_Queue\n// This will use Shared_Memory_Queue_Per_Sender class\n// It is the new default.\n# define Use_PerSender_Message_Queue 1\n# endif\n\n# ifndef Include_Closure_Support\n// as per: http://www.mirandabanda.org/cogblog/2008/07/22/closures-part-ii-the-bytecodes/ -- dmu 6/10\n# define Include_Closure_Support 1\n# endif\n\n// Keep safepointing instead of running Smalltalk in order to find deadlock bugs\n# ifndef Hammer_Safepoints\n# define Hammer_Safepoints 0\n# endif\n\n# ifndef Multiple_Tileras\n# define Multiple_Tileras On_Tilera\n# endif\n\n\n\n// Macro to ensure that the compiler does inlining\n# ifndef FORCE_INLINE\n  # if Debugging\n    # define FORCE_INLINE\n  # else\n    # ifdef __GNUC__\n      # define FORCE_INLINE __attribute__((always_inline))\n    # else\n      # define FORCE_INLINE inline\n      # warning Try to find some compiler pragma or directive to enforce inlining for this compiler\n    # endif\n  # endif\n# endif\n\n// for Squeak:\n# ifndef USE_INLINE_MEMORY_ACCESSORS\n# define USE_INLINE_MEMORY_ACCESSORS\n# endif\n\n# ifndef SQUEAK_BUILTIN_PLUGIN\n# define SQUEAK_BUILTIN_PLUGIN\n# endif\n\n# ifdef __cplusplus\nextern \"C\" {\n  # endif\nvoid print_config();\nvoid print_config_for_spreadsheet();\n# ifdef __cplusplus\n}\n# endif\n\n// To implement OT replication, I needd to add an extra argument to all\n// OT-mutating operations, called esb, for enforce-store-barrier.\n// To see how much overhead this caused, I have added these macros. -- dmu 9/08\n# if Omit_Duplicated_OT_Overhead\n#  define       DCL_ESB\n#  define COMMA_DCL_ESB\n#  define       USE_ESB\n#  define COMMA_USE_ESB\n#  define           ESB_OR_FALSE  false\n#  define                  FALSE_OR_NOTHING\n#  define            COMMA_FALSE_OR_NOTHING\n#  define            COMMA_TRUE_OR_NOTHING\n# else\n#  define       DCL_ESB bool esb\n#  define COMMA_DCL_ESB ,  bool esb\n#  define       USE_ESB esb\n#  define COMMA_USE_ESB , esb\n#  define           ESB_OR_FALSE  esb\n#  define                  FALSE_OR_NOTHING false\n#  define            COMMA_FALSE_OR_NOTHING , false\n#  define            COMMA_TRUE_OR_NOTHING  , true\n# endif\n\n// Include our version of the config.h which would be generated by Squeaks build system:\n# if !defined(__cplusplus) && !defined(__OBJC__) && !On_iOS\n  # include \"rvm_squeak_config.h\"\n# endif\n\n"
  },
  {
    "path": "vm/src/runtime/rvm_squeak_config.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n/** \n  Adapted version of the file that used to be sqr_config.h\n  \n  This is a file which is supposed to be generated by the Squeak build system,\n  however, for the RoarVM, we avoid the trouble and hardcode the settings for\n  our supported platforms here.\n \n  File has been moved from the 'from_squeak' code into the RoarVM code base,\n  to simplify synchronization with the upstream code.\n **/\n\n#ifndef __sq_config_h\n#define __sq_config_h\n\n\n# if On_Apple\n# define DARWIN 1\n# endif\n\n/* explicit image width */\n# define\tHAVE_INTERP_H 1\n\n# if !Configure_Squeak_Code_for_Tilera\n# define\tUSE_X11_GLX 1\n# define\tUSE_QUARTZ 1\n# define\tUSE_QUARTZ_CGL 1\n# endif\n\n# define\tHAVE_LIBXEXT 1\n\n# if Configure_Squeak_Code_for_Tilera\n# define HAVE_LIBDL\n# endif\n\n# if Configure_Squeak_Code_for_Tilera\n# undef   HAVE_DYLD\n# else\n# define\tHAVE_DYLD 1\n# endif\n\n/* header files */\n# define\tHAVE_UNISTD_H 1\n# define\tHAVE_DIRENT_H 1\n# define\tHAVE_DLFCN_H 1\n\n# if !Configure_Squeak_Code_for_Tilera\n# define\tHAVE_ICONV_H 1\n# endif\n\n# define\tHAVE_SYS_TIME_H 1\n# define\tTIME_WITH_SYS_TIME 1\n# define\tHAVE_SYS_FILIO_H 1\n# define\tHAVE_UTIL_H 1\n\n# if !Configure_Squeak_Code_for_Tilera\n# define\tHAVE_GL_GL_H 1\n# define\tHAVE_OPENGL_GL_H 1\n# endif\n\n/* system calls/library functions */\n# define\tAT_EXIT atexit\n# define\tHAVE_TZSET 1\n# define\tHAVE_OPENPTY 1\n# define\tHAVE_SNPRINTF 1\n# define\tHAVE_MMAP 1\n# define\tHAVE_LANGINFO_CODESET 1\n# define\tHAVE_ALLOCA 1\n# define\tHAVE_ALLOCA_H 1\n# define\tHAVE_UNSETENV 1\n\n/* widths of primitive types */\n# define\tSIZEOF_INT 4\n# define\tSIZEOF_LONG 4\n# define\tSIZEOF_LONG_LONG 8\n# define\tSIZEOF_VOID_P 4\n\n/* structures */\n# define\tHAVE_TM_GMTOFF 1\n# define\tHAVE_TIMEZONE 1\n\n/* typedefs */\n# define\tsqueakInt64 long long\n\n/* architecture */\n# define\tOS_TYPE \"unix\"\n# define\tVM_HOST_CPU \"i386\"\n# define\tVM_HOST_OS \"darwin9.2.2\"\n# define\tVM_BUILD_STRING \"Unix built on \"__DATE__ \" \"__TIME__\" Compiler: \"__VERSION__\n# define\tDOUBLE_WORD_ORDER 1\n\n/* other configured variables */\n# define SQ_VERSION \"3.9a-7021\"\n# define VM_VERSION \"3.9-4\"\n# define VM_LIBDIR \"/Users/ungar/renaissance/Squeak/vm/newVMbuild/lib/squeak/3.9-4\"\n# define VM_MODULE_PREFIX \"\"\n# define VM_X11DIR \"/usr/X11/lib\"\n\n#endif /* __sq_config_h */\n"
  },
  {
    "path": "vm/src/runtime/safepoint.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\n\nOS_Mutex_Interface* Safepoint_Actions::get_mutex() {\n  return The_Squeak_Interpreter()->get_safepoint_mutex();\n}\n\nbool Safepoint_Actions::is_held() {\n  return get_mutex()->is_held();\n}\n\n\nvoid Safepoint_Actions::acquire_action(const char* why) {\n  OS_Mutex_Interface* mutex = get_mutex();\n  mutex->dec_and_check_recursion_depth();\n  The_Squeak_Interpreter()->safepoint_tracker->request_other_cores_to_safepoint(why);\n  mutex->check_and_inc_recursion_depth();\n}\n\nvoid Safepoint_Actions::release_action(const char* why) {\n  The_Squeak_Interpreter()->safepoint_tracker->release_other_cores_from_safepoint(why);\n}\n\nbool Safepoint_Actions::is_initialized() {\n  return The_Squeak_Interpreter()->is_initialized();\n}\n\n\nvoid Safepoint_Tracker::print_msg_for_request_safepoint(const char* msg, const char* why) {\n  if (Safepoint_Tracker::verbose)\n    lprintf(\"%s %s, depth %d\\n\",\n            msg, why, The_Squeak_Interpreter()->safepoint_tracker->spin_depth());\n}\n\n\nvoid Safepoint_Tracker::request_other_cores_to_safepoint(const char* why) {\n  if (verbose) lprintf(\"request_other_cores_to_safepoint()\\n\");\n  if (!Safepoint_Ability::is_interpreter_able())\n      fatal(\"deadlock possibility: asking for a safepoint when I am not ready to\");\n  \n  print_msg_for_request_safepoint(\"requesting safepoint\", why);\n  assert_always(_am_requesting_other_cores_to_safepoint >= 0);\n  ++_am_requesting_other_cores_to_safepoint;\n  acquisition_timer.start();\n  \n  requestSafepointOnOtherCoresMessage_class(why).handle_here_or_send_to(Logical_Core::main_rank);\n  \n  do {\n    // xxxxxx Would things work and be more efficient with true instead false below? -- dmu 4/09\n    Message_Statics::process_any_incoming_messages(false);\n  } while (!is_every_other_core_safe());\n  \n  acquisition_timer.stop();\n  --_am_requesting_other_cores_to_safepoint;\n  assert_always(_am_requesting_other_cores_to_safepoint >= 0);\n  print_msg_for_request_safepoint(\"got safepoint\", why);\n}\n\n\nvoid Safepoint_Tracker::release_other_cores_from_safepoint(const char* why) {\n  every_other_core_no_longer_safe();\n  releaseOtherCoresFromSafepointMessage_class().handle_here_or_send_to(Logical_Core::main_rank);\n  if (verbose)\n    lprintf(\"relinquishing safepoint %s, depth %d\\n\",\n            why, spin_depth());\n  if (verbose) lprintf(\"release_other_cores_from_safepoint() released\\n\");\n  Message_Statics::process_delayed_requests();\n}\n\n\nvoid Safepoint_Tracker::spin_if_safepoint_requested_with_arguments(const char* fn, const char* file, int line) {\n  if (!Safepoint_Ability::is_interpreter_able())\n    return;\n\n  // need !is_spinning because otherwise will spin waiting for response\n  // message to I am spinning message\n  if (does_another_core_need_me_to_spin()  &&  !am_spinning()) {\n    if (verbose) lprintf( \"spin_if_safepoint_requested about to spin, spin_depth %d\\n\", spin_depth());\n    spin_in_safepoint(fn, file, line);\n    if (verbose) lprintf( \"spin_if_safepoint_requested done spinning, spin_depth %d\\n\", spin_depth());\n  }\n}\n\nvoid Safepoint_Tracker::another_core_needs_me_to_spin(int for_whom, int seq_no, const char* why) {\n  if (verbose) lprintf(\"another_core_needs_me_to_spin( %d, %d, <%s> )\\n\", for_whom, seq_no, why);\n\n  if (am_spinning())\n    assert_always(_seq_no_of_another_needs_me_to_spin < seq_no);\n\n  _does_another_core_need_me_to_spin = true;\n  _which_other_core_needs_me_to_spin = for_whom;\n  _seq_no_of_another_needs_me_to_spin = seq_no;\n  _why_another_core_needs_me_to_spin = why;\n  \n  if (am_spinning())\n    tell_core_I_am_spinning(seq_no, true);\n}\n\nvoid Safepoint_Tracker::another_core_no_longer_needs_me_to_spin(int seq_no) {\n  if (verbose) lprintf(\"another_core_no_longer_needs_me_to_spin() %d\\n\", seq_no);\n  _does_another_core_need_me_to_spin = false;\n  _which_other_core_needs_me_to_spin = -1;\n  // maybe it's OK: assert_always_eq(_seq_no_of_another_needs_me_to_spin, seq_no); // I was spinning for a different request!\n  _why_another_core_needs_me_to_spin = \"\";\n}\n\n\nvoid Safepoint_Tracker::spin_in_safepoint(const char* /* fn */, const char* /* file */,  int /* line */) {\n  assert(_spin_depth == 0);\n  ++_spin_depth;\n\n  Timeout_Timer tt(\"spinning in safepoint\", 60, Logical_Core::main_rank);\n  tt.start();\n\n  tell_core_I_am_spinning(_seq_no_of_another_needs_me_to_spin, false);\n  while (does_another_core_need_me_to_spin())\n    Message_Statics::process_any_incoming_messages(false);\n\n  --_spin_depth;\n}\n\nvoid Safepoint_Tracker::tell_core_I_am_spinning(int seq_no_of_request, bool was_spinning) {\n  tellCoreIAmSpinningMessage_class(seq_no_of_request, was_spinning).handle_here_or_send_to(Logical_Core::main_rank);\n}\n\n\nvoid Safepoint_Tracker::self_destruct_all() {\n  FOR_ALL_OTHER_RANKS(r)  {\n    lprintf( \"sending destruct to  %d\\n\", r);\n    selfDestructMessage_class(\"waiting too long for safepoint\").send_to(r);\n  }\n  *(int*)0 = 17;\n  OS_Interface::abort();\n}\n\n\n\n\n\nint Safepoint_Master_Control::request_depth = 0;\n\nvoid Safepoint_Master_Control::request_other_cores_to_safepoint(int requester, const char* why) {\n  Top_Level tl;\n\n  ++global_safepoint_request_sequence_number;\n  if (verbose)  smc_printf(\"request_other_cores_to_safepoint(%d, %s, %d)\", requester, why,\n                           global_safepoint_request_sequence_number);\n  cores_asking_for_a_global_safepoint.add(requester, why, global_safepoint_request_sequence_number);\n\n  run();\n}\n\n\nvoid Safepoint_Master_Control::release_other_cores_from_safepoint(int requester) {\n  Top_Level tl;\n  if (verbose)  smc_printf(\"release_other_cores_from_safepoint(%d)\", requester);\n  assert_always_eq(core_holding_global_safepoint, requester);\n  core_holding_global_safepoint = none;\n\n  // since recursion is blocked, must release myself up here so I can run more at top level\n  if (spinners.includes(Logical_Core::my_rank()))\n    tell_core_to_stop_spinning(Logical_Core::my_rank(), current_safepoint_sequence_number);\n\n  run();\n}\n\n\nvoid Safepoint_Master_Control::a_core_is_now_safe(int r, int seq_no, bool was_spinning) {\n  Top_Level tl;\n  if (verbose)  smc_printf(\"a_core_is_now_safe(%d)\", r);\n  assert_always_eq(core_holding_global_safepoint, none);\n  assert(!cores_asking_for_a_global_safepoint.is_empty());\n  \n  assert_always_eq(prior_outstanding_spin_requests_sequence_numbers[r], seq_no);\n  assert_always_eq(      outstanding_spin_requests_sequence_numbers[r], seq_no);\n  \n  assert_always(was_spinning || !spinners.includes(r));\n\n  outstanding_spin_requests.remove(r);\n  spin_request_timers[r]->stop();\n  \n  spinners.add(r);\n  \n  spinners_sequence_numbers[r] = prior_outstanding_spin_requests_sequence_numbers[r]; outstanding_spin_requests_sequence_numbers[r] = -1; \n  \n  run();\n}\n\n\n\nvoid Safepoint_Master_Control::run() {\n  // Cannot just ask all needed spinners to spin because things change while \n  // waiting for the answer\n  // Instead loop till outstanding requests matches what's needed\n  while (step());\n}\n\n\nbool Safepoint_Master_Control::step() {\n  // Cannot just ask all needed spinners to spin because things change while \n  // waiting for the answer\n  // Do one step, return true if did something\n  if (verbose)  smc_printf(\"step\");\n  if (step_recurse_level > 0  &&  !spinners.includes(Logical_Core::my_rank()) /* might never run if I am spinning*/) {\n    return false;\n  }\n\n  ++step_recurse_level;\n\n  bool r =\n    core_holding_global_safepoint != none           ?  false :\n   !cores_asking_for_a_global_safepoint.is_empty()  ?  step_towards_granting()  :\n                                                       maybe_release_a_spinner();\n  --step_recurse_level;\n  return r;\n}\n\n\nbool Safepoint_Master_Control::step_towards_granting() {\n\n  Rank_Set spinners_needed_for_next_grantee = all_cores - next_grantee();\n\n  if (verbose)  smc_printf(\"step_towards_granting: spinners_needed_for_next_grantee 0x%llx\", spinners_needed_for_next_grantee.contents());\n\n  // must ask myself to spin last, otherwise, recursion block will prevent me \n  // from finishing safepoint\n\n  return maybe_stop_a_spinner()\n  ||     maybe_cancel_a_spin_request()\n  ||     maybe_make_a_spin_request_to_another_core(spinners_needed_for_next_grantee)\n  ||     maybe_ask_myself_to_spin()\n  ||     maybe_grant_safepoint_to_next_requester(  spinners_needed_for_next_grantee);\n}\n\nbool Safepoint_Master_Control::maybe_stop_a_spinner() {\n  if (verbose)  smc_printf(\"maybe_stop_a_spinner\");\n  if ( !spinners.includes(next_grantee()))\n    return false;\n  tell_core_to_stop_spinning( next_grantee(), next_sequence_number());\n  return true;\n}\n\nbool Safepoint_Master_Control::maybe_cancel_a_spin_request() {\n  if (verbose)  smc_printf(\"maybe_cancel_a_spin_request\");\n  if ( !outstanding_spin_requests.includes(next_grantee()))\n    return false;\n  tell_core_to_stop_spinning(next_grantee(), next_sequence_number());\n  return true;\n}\n\nbool Safepoint_Master_Control::maybe_make_a_spin_request_to_another_core(Rank_Set spinners_needed_for_next_grantee) {\n  if (verbose)  smc_printf(\"maybe_make_a_spin_request_to_another_core\");\n  int  first_spin_request_needed = (spinners_needed_for_next_grantee - (spinners + outstanding_spin_requests) - Logical_Core::my_rank()).first_or_none();\n  if ( first_spin_request_needed == Rank_Set::none )\n    return false;\n\n  request_core_to_spin(first_spin_request_needed, next_grantee(), next_sequence_number(), next_grantee_why());\n  return true;\n}\n\nbool Safepoint_Master_Control::maybe_ask_myself_to_spin() {\n  if (verbose)  smc_printf(\"maybe_ask_myself_to_spin\");\n  if ((spinners + outstanding_spin_requests).includes(Logical_Core::my_rank())  ||  next_grantee() == Logical_Core::my_rank())\n    return false;\n\n  request_core_to_spin(Logical_Core::my_rank(), next_grantee(), next_sequence_number(), next_grantee_why());\n  return true;\n}\n\nbool Safepoint_Master_Control::maybe_grant_safepoint_to_next_requester(Rank_Set spinners_needed_for_next_grantee) {\n  if (verbose)  smc_printf(\"maybe_grant_safepoint_to_next_requester\");\n  if (spinners_needed_for_next_grantee != spinners)\n    return false;\n\n  grant_safepoint_to_next_asker();\n  return true;\n}\n\nbool Safepoint_Master_Control::maybe_release_a_spinner() {\n  if (verbose)  smc_printf(\"maybe_release_a_spinners()\");\n  int r = spinners.first_or_none();\n  if (r == Rank_Set::none) return false;\n  tell_core_to_stop_spinning(r, current_safepoint_sequence_number);\n  return true;\n}\n\n\n\n\n\nvoid Safepoint_Master_Control::request_core_to_spin(int r, int for_whom, int seq_no, const char* why) {\n  if (verbose)  smc_printf(\"request_core_to_spin(%d, %d, %d, %s)\", r, for_whom, seq_no, why);\n  if  (cores_asking_for_a_global_safepoint.is_empty())\n    fatal(\"should not be asking for a spin\");\n  outstanding_spin_requests.add(r);\n  prior_outstanding_spin_requests_sequence_numbers[r] = outstanding_spin_requests_sequence_numbers[r] = seq_no;\n  spin_request_timers[r]->start();\n  requestCoreToSpinMessage_class(for_whom, seq_no, why).handle_here_or_send_to(r);\n}\n\nvoid Safepoint_Master_Control::tell_core_to_stop_spinning(int r, int seq_no) {\n  if (verbose)  smc_printf(\"tell_core_to_stop_spinning(%d)\", r);\n  assert(r < Logical_Core::group_size);\n  outstanding_spin_requests.remove(r); // may be redundant\n  spinners.remove(r);\n  tellCoreToStopSpinningMessage_class(seq_no).handle_here_or_send_to(r);\n}\n\nvoid Safepoint_Master_Control::grant_safepoint_to_next_asker() {\n  // lprintf(\"grant_safepoint_to_next_asker(%d %d(%s))\\n\", next_grantee(), next_sequence_number(), next_grantee_why());\n  // if (verbose)  smc_printf(\"grant_safepoint_to_next_asker(%d %d(%s))\", next_grantee(), next_sequence_number(), next_grantee_why());\n  assert_always_eq(core_holding_global_safepoint, none);\n  core_holding_global_safepoint = next_grantee();\n  current_safepoint_sequence_number = next_sequence_number();\n  cores_asking_for_a_global_safepoint.remove();\n  \n  if (verbose)\n    lprintf(\"Interactions::grant_safepoint_to(%d), seq_no(%d)\\n\",\n            core_holding_global_safepoint, current_safepoint_sequence_number);\n  \n  grantSafepointMessage_class(current_safepoint_sequence_number).handle_here_or_send_to(core_holding_global_safepoint);\n}\n\n\n\nvoid Safepoint_Master_Control::smc_printf(const char* msg, ...) {\n  va_list ap;\n  va_start(ap, msg);\n  smc_vprintf(msg, ap);\n  va_end(ap);\n}\n\nvoid Safepoint_Master_Control::smc_vprintf(const char* msg, va_list args) {\n  char buf[BUFSIZ];\n  char ps_buf[BUFSIZ];\n  print_string(ps_buf, sizeof(ps_buf));\n  snprintf(buf, sizeof(buf),\n           \"%*s%s: %s\\n\", request_depth * 2, \"\", msg, ps_buf);\n  ::vlprintf(buf, args);\n}\n\n\nvoid Safepoint_Master_Control::print_string(char* buf, int buf_size) {\n  char cafgs_buf[BUFSIZ];\n  cores_asking_for_a_global_safepoint.print_string(cafgs_buf, sizeof(cafgs_buf));\n  snprintf(buf, buf_size,\n           \"Safepoint_Master_Control: askers: %s, open spin reqs 0x%llx, \"\n           \"spinners 0x%llx, winner %d, seq_no %d:  \",\n           cafgs_buf, outstanding_spin_requests.contents(),\n           spinners.contents(), core_holding_global_safepoint, current_safepoint_sequence_number);\n}\n\nvoid Safepoint_Master_Control::smc_white_space() { if (verbose) lprintf(\"\\n\\n\"); }\n\n"
  },
  {
    "path": "vm/src/runtime/safepoint.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Safepoint_Actions {\n  public:\n  static void acquire_action(const char*);\n  static void release_action(const char*);\n  static bool is_initialized();\n  static OS_Mutex_Interface* get_mutex();\n  static bool is_held();\n};\n\n// typedef Abstract_Mutex<Safepoint_Actions> Safepoint;\n\n// NOTE: Safepoint_for_moving_objects means I may do a GC, or move objects.\n// In other words, change the locations of objects, \n// or change the allocation pointers.\n\n\nDefine_RVM_Mutex(Safepoint_for_moving_objects, Safepoint_Actions,17,18)\n\n\nclass Safepoint_Tracker {\n  int    _spin_depth;\n  bool  _is_every_other_core_safe;\n  int   _sequence_number_of_last_granted_safepoint;\n  bool  _does_another_core_need_me_to_spin;\n  int   _which_other_core_needs_me_to_spin;\n  int   _seq_no_of_another_needs_me_to_spin; \n  const char* _why_another_core_needs_me_to_spin;\n  int   _am_requesting_other_cores_to_safepoint;\n\n  public:\n  Safepoint_Acquisition_Timer acquisition_timer;\n  static const bool verbose = false;\n\n\n public:\n  Safepoint_Tracker() : acquisition_timer() {\n    _spin_depth = 0;\n    _is_every_other_core_safe = false;\n    _sequence_number_of_last_granted_safepoint = 0;\n    _does_another_core_need_me_to_spin = false;\n    _which_other_core_needs_me_to_spin = -1;\n    _seq_no_of_another_needs_me_to_spin = -1;\n    _why_another_core_needs_me_to_spin = \"\";\n    assert(acquisition_timer.is_on_list());\n    _am_requesting_other_cores_to_safepoint = 0;\n  }\n\n  void request_other_cores_to_safepoint(const char*);\n# define spin_if_safepoint_requested() spin_if_safepoint_requested_with_arguments(__FUNCTION__, __FILE__, __LINE__ )\n  void spin_if_safepoint_requested_with_arguments(const char*, const char*, int);\n\n  void release_other_cores_from_safepoint(const char*);\n\n  bool is_every_other_core_safe() { return _is_every_other_core_safe; }\n  void every_other_core_is_safe(int seq_no)  {\n    if (verbose) lprintf(\"every_other_core_is_safe()\\n\");\n    _is_every_other_core_safe = true;\n    _sequence_number_of_last_granted_safepoint = seq_no;\n    \n    Performance_Counters::count_acquire_safepoint_static();\n  }\n  void every_other_core_no_longer_safe() {\n    if (verbose) lprintf(\"every_other_core_no_longer_safe()\\n\");\n    _is_every_other_core_safe = false;\n  }\n\n  bool does_another_core_need_me_to_spin() { return _does_another_core_need_me_to_spin; }\n\n  int which_other_core_needs_me_to_spin() { return _which_other_core_needs_me_to_spin; }\n  const char* why_other_core_needs_me_to_spin() { return _why_another_core_needs_me_to_spin; }\n\n  void another_core_needs_me_to_spin(int for_whom, int, const char* why);\n  void another_core_no_longer_needs_me_to_spin(int);\n  int spin_depth() { return _spin_depth; }\n  bool am_spinning() { return spin_depth() > 0; }\n  bool am_trying_to_acquire_safepoint() { return _am_requesting_other_cores_to_safepoint > 0; }\n  \n  bool have_acquired_safepoint() {  return is_every_other_core_safe(); }\n  bool am_acquiring_safepoint_while_spinning_for(int r) {\n    return am_trying_to_acquire_safepoint() && am_spinning() && which_other_core_needs_me_to_spin() == r;\n  }\n\n  void self_destruct_all();\n\n\n  private:\n  void spin_in_safepoint(const char*, const char*, int);\n  void tell_core_I_am_spinning(int seq_no_of_request, bool was_spinning);\n  void print_msg_for_request_safepoint(const char* msg, const char* why);\n\n};\n\n\nclass Safepoint_Master_Control {\n  Safepoint_Request_Queue cores_asking_for_a_global_safepoint;\n  Rank_Set outstanding_spin_requests;\n  Rank_Set spinners;\n  Timeout_Timer* spin_request_timers[Max_Number_Of_Cores]; // xxxxxx These timers help debugging but may slow us down. -- dmu 4/09\n  Rank_Set all_cores;\n  static const int none = -1;\n  int     core_holding_global_safepoint;\n  static int request_depth; // top-level request recursion, threadsafe?: not critical, does no have a functional purpose, Stefan 2009-09-06\n  int step_recurse_level; // redundant with request_depth\n  \n  // For debugging checks that might as well be left in the code, since safepoints are expensive anyway -- dmu 5/21/10\n  int*    prior_outstanding_spin_requests_sequence_numbers;\n  int*    outstanding_spin_requests_sequence_numbers;\n  int*    spinners_sequence_numbers; \n  int     current_safepoint_sequence_number; \n  int     global_safepoint_request_sequence_number;\n\npublic:\n  static const bool verbose = false;\n  void smc_printf(const char*, ...);\n  void smc_vprintf(const char*, va_list);\n  static void smc_white_space();\n\n  Safepoint_Master_Control() :\n    cores_asking_for_a_global_safepoint(Max_Number_Of_Cores),\n    outstanding_spin_requests(), spinners(), all_cores() {\n    core_holding_global_safepoint = none;\n    all_cores = Rank_Set::all_up_to(Logical_Core::group_size);\n    FOR_ALL_RANKS(r)\n      spin_request_timers[r] = new Timeout_Timer(\"spin request\", 45 /* shorter than default */, r);\n    step_recurse_level = 0;\n      \n    current_safepoint_sequence_number = -1;\n    global_safepoint_request_sequence_number = 0;\n\n    prior_outstanding_spin_requests_sequence_numbers = new int[Max_Number_Of_Cores];\n          outstanding_spin_requests_sequence_numbers = new int[Max_Number_Of_Cores];\n \n    spinners_sequence_numbers = new int[Max_Number_Of_Cores];\n    for (int i = 0;  i < Max_Number_Of_Cores; ++i) \n      prior_outstanding_spin_requests_sequence_numbers[i] = outstanding_spin_requests_sequence_numbers[i] = spinners_sequence_numbers[i] = -1;\n  }\n\n\n  void request_other_cores_to_safepoint(int, const char* why);\n  void release_other_cores_from_safepoint(int);\n  void a_core_is_now_safe(int, int, bool);\n\nprivate:\n\n  void run();\n  bool step();\n  bool step_towards_granting();\n  bool maybe_stop_a_spinner();\n  bool maybe_cancel_a_spin_request();\n  bool maybe_make_a_spin_request_to_another_core(Rank_Set);\n  bool maybe_ask_myself_to_spin();\n\n  bool maybe_grant_safepoint_to_next_requester(Rank_Set);\n\n\n  bool maybe_release_a_spinner();\n\n  void request_core_to_spin(int, int, int, const char*);\n  void tell_core_to_stop_spinning(int, int);\n  void grant_safepoint_to_next_asker();\n\n  int         next_grantee()      { return cores_asking_for_a_global_safepoint.oldest_rank(); }\n  int         next_sequence_number() { return cores_asking_for_a_global_safepoint.oldest_sequence_number(); }\n  const char* next_grantee_why()  { return cores_asking_for_a_global_safepoint.oldest_why();  }\n\n  void print_string(char* buf, int buf_size);\n  struct Top_Level {\n    Top_Level() { ++request_depth; }\n    ~Top_Level() { --request_depth; smc_white_space(); }\n  };\n\n};\n\n"
  },
  {
    "path": "vm/src/runtime/safepoint_ability.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\nSafepoint_Ability::Safepoint_Ability(bool is_a) {\n  prev = The_Squeak_Interpreter()->safepoint_ability;\n  _is_able = is_a;\n  The_Squeak_Interpreter()->safepoint_ability = this;\n}\n\nSafepoint_Ability::~Safepoint_Ability() {\n  The_Squeak_Interpreter()->safepoint_ability = prev;\n}\n\nbool Safepoint_Ability::is_interpreter_able() { return The_Squeak_Interpreter()->safepoint_ability->is_able(); }\n"
  },
  {
    "path": "vm/src/runtime/safepoint_ability.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n// Is the interpreter in a state where another core could move objects around?\n// Stack-allocated\n\n// CAVEAT: where ever the code says Safepoint_Ability sa(true),\n// there may be a GC if any messages are sent.\n// You much look all the way up the call stack to ensure there are no Object* local variables,\n// because a GC will cause these to be incorrect! They need to be recalculated from Oops after the GC.\n// If you wanted to be really careful, you would push the oops on the mapped oop stack in the interpreter,\n// in case a future GC algorithm actually changes the Oops. -- dmu 10/1/10\n// REM: for this reason we are using now Object_p instead of plain Object*, this\n// will allow us to identify such invalid uses in debug mode.\n\nclass Safepoint_Ability {\n  bool _is_able;\n  Safepoint_Ability* prev;\npublic:\n  bool is_able()   { return _is_able; }\n  bool is_unable() { return !is_able(); }\n  void be_unable() { _is_able = false; }\n\n  Safepoint_Ability(bool);\n  ~Safepoint_Ability();\n  void* operator new(size_t) { fatal(\"should be stack-allocated\"); return (Safepoint_Ability*)NULL; }\n  static bool is_interpreter_able();\n};\n"
  },
  {
    "path": "vm/src/runtime/safepoint_request_queue.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\nvoid Safepoint_Request_Queue::unit_test() {\n  Safepoint_Request_Queue q1(3);\n  assert_always(q1.is_empty());\n\n  q1.add(3, \"a\", 1);\n  assert_always(!q1.is_empty());\n  q1.add(4, \"b\", 2);\n  assert_always(!q1.is_empty());\n  q1.add(5, \"c\", 3);\n  assert_always(!q1.is_empty());\n  // should fail! q1.add(6, \"d\");\n\n  assert_always(q1.oldest_rank() == 3  &&  strcmp(q1.oldest_why(), \"a\") == 0);\n  q1.remove();\n  assert_always(!q1.is_empty());\n  assert_always(q1.oldest_rank() == 4  &&  strcmp(q1.oldest_why(), \"b\") == 0);\n  q1.remove();\n  assert_always(!q1.is_empty());\n  assert_always(q1.oldest_rank() == 5  &&  strcmp(q1.oldest_why(), \"c\") == 0);\n  q1.remove();\n  assert_always(q1.is_empty());\n  // q1.remove(); // should fail\n\n  q1.add(17, \"d\", 4);\n  q1.add(18, \"e\", 5);\n  q1.add(19, \"f\", 6);\n  assert_always(q1.oldest_rank() == 17  &&  strcmp(q1.oldest_why(), \"d\") == 0); q1.remove();\n  q1.add(20, \"g\", 7);\n  assert_always(q1.oldest_rank() == 18  &&  strcmp(q1.oldest_why(), \"e\") == 0); q1.remove();\n  q1.add(21, \"h\", 8);\n\n  assert_always(q1.oldest_rank() == 19  &&  strcmp(q1.oldest_why(), \"f\") == 0); q1.remove();\n  assert_always(q1.oldest_rank() == 20  &&  strcmp(q1.oldest_why(), \"g\") == 0); q1.remove();\n  assert_always(q1.oldest_rank() == 21  &&  strcmp(q1.oldest_why(), \"h\") == 0); q1.remove();\n  assert_always(q1.is_empty());\n\n}\n\n\nvoid Safepoint_Request_Queue::print_string(char* buf, int buf_size) {\n  if (is_empty()) {\n    strncpy(buf, \"<empty>\", buf_size);\n    return;\n  }\n  char *p = buf;\n  for (int i = oldest(), elems_to_do = _occupancy; \n       elems_to_do;  \n       advance(i), --elems_to_do) {\n    int n = snprintf(p, buf_size - (p - buf),\n                     \"%d<%d>(%s)%s\",\n                     contents[i].rank, contents[i].sequence_number, contents[i].why, elems_to_do > 1  ? \", \" : \"\");\n    p += n;\n    if (p - buf >= buf_size) fatal(\"buf too small\");\n  }\n  return;\n}\n\n"
  },
  {
    "path": "vm/src/runtime/safepoint_request_queue.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Safepoint_Request_Queue {\n  struct elem {\n    int rank;\n    const char* why;\n    int sequence_number; \n  };\n  elem *contents;\n  int _size;\n  int _occupancy;\n  int _next_free;\n  \n public:\n  bool is_empty() { return _occupancy <= 0; }\n private:\n  bool is_full()  { return _occupancy >= _size; }\n  \n  int oldest() {\n    if (is_empty())  fatal(\"empty\");\n    return  (_next_free + _size - _occupancy)  %  _size;\n  }\n  \n  void advance(int& i) { ++i; i %= _size; }\n  \n  elem* oldest_elem() {\n    if (is_empty()) fatal(\"empty\");\n    return &contents[oldest()];\n  }\n\n  public:\n  static void unit_test();\n\n  Safepoint_Request_Queue(int sz) {\n    _size = sz;\n    contents = new elem[sz];\n    _occupancy = _next_free = 0;\n  }\n\n  void add(int x, const char* why, int seq_no) {\n    if (is_full()) fatal(\"out of space\");\n    contents[_next_free].rank = x;  contents[_next_free].why = why;  \n    contents[_next_free].sequence_number = seq_no;\n    ++_occupancy;  advance(_next_free);\n  }\n\n  int oldest_rank() { return oldest_elem()->rank; }\n  int oldest_sequence_number() { return oldest_elem()->sequence_number; }\n  const char* oldest_why()  { return oldest_elem()->why; }\n  \n  void remove() {\n    if (is_empty()) fatal(\"empty\");\n    --_occupancy;\n  }\n\n\n  void print_string(char* buf, int buf_size);\n};\n\n"
  },
  {
    "path": "vm/src/runtime/scheduler_mutex.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# include \"headers.h\"\n\nOS_Mutex_Interface* Scheduler_Mutex_Actions::get_mutex() {\n  return The_Squeak_Interpreter()->get_scheduler_mutex();\n}\n\nbool Scheduler_Mutex_Actions::is_held() {\n  return get_mutex()->is_held();\n}\n\nvoid Scheduler_Mutex_Actions::acquire_action(const char* /* why */) {\n  OS_Mutex_Interface* mutex = get_mutex();\n\n  // spin and receive to avoid deadlock; other core may be trying to send US something\n  Timeout_Timer tt(\"scheduler mutex\", 60, mutex->get_holder()); tt.start();\n  while (!mutex->try_lock()) {\n    Timeout_Timer::check_all();\n    mutex->dec_and_check_recursion_depth();\n    Message_Statics::process_any_incoming_messages(false); // could check to ensure no_message\n    mutex->check_and_inc_recursion_depth();\n  }\n  if (tracking) mutex->set_holder(Logical_Core::my_rank());\n  \n  The_Squeak_Interpreter()->perf_counter.count_acquire_scheduler_mutex();\n}\n\nvoid Scheduler_Mutex_Actions::release_action(const char*) {\n  OS_Mutex_Interface* mutex = get_mutex();\n  if (tracking)  mutex->set_holder(-1);\n  OS_Interface::abort_if_error(\"Scheduler_Mutex\", mutex->unlock());\n}\n\n\nbool Scheduler_Mutex_Actions::is_initialized() {\n  return get_mutex()->is_initialized();\n}\n\n"
  },
  {
    "path": "vm/src/runtime/scheduler_mutex.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Scheduler_Mutex_Actions {\n  static const bool tracking = false;\npublic:\n  static void acquire_action(const char*);\n  static void release_action(const char*);\n  static bool is_initialized();\n\n  static OS_Mutex_Interface* get_mutex();\n  static bool is_held();\n};\n\n// typedef Abstract_Mutex<Scheduler_Mutex_Actions> Scheduler_Mutex;\n\nDefine_RVM_Mutex(Scheduler_Mutex, Scheduler_Mutex_Actions,13,14)\n\n"
  },
  {
    "path": "vm/src/runtime/semaphore_mutex.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\n// Templates don't work with Tilera -- dmu 4/09\n\n\nOS_Mutex_Interface* Semaphore_Mutex_Actions::get_mutex() {\n  return The_Squeak_Interpreter()->get_semaphore_mutex();\n}\n\nbool Semaphore_Mutex_Actions::is_held() {\n  return get_mutex()->is_held();\n}\n\nvoid Semaphore_Mutex_Actions::acquire_action(const char*) {\n  // xxxxxx This code could/should be better factored across the various mutexes. -- dmu 4/09\n\n  // spin and receive to avoid deadlock; other core may be trying to send US something\n\n  OS_Mutex_Interface* mutex = get_mutex();\n\n  assert_always(!mutex->is_held()); // deadlock check\n  Timeout_Timer tt(\"semaphore mutex\", check_assertions ? 300 : 60, mutex->get_holder()); tt.start();\n  while (!mutex->try_lock()) {\n    Timeout_Timer::check_all();\n    mutex->dec_and_check_recursion_depth();\n    Message_Statics::process_any_incoming_messages(false); // could check to ensure no_message\n    mutex->check_and_inc_recursion_depth();\n  }\n  if (tracking) mutex->set_holder(Logical_Core::my_rank());\n\n}\n\nvoid Semaphore_Mutex_Actions::release_action(const char*) {\n  OS_Mutex_Interface* mutex = get_mutex();\n  if (tracking)  mutex->set_holder(-1);\n  OS_Interface::abort_if_error(\"Semaphore_Mutex\", mutex->unlock());\n}\n\n\nbool Semaphore_Mutex_Actions::is_initialized() {\n  return The_Squeak_Interpreter()->is_initialized();\n}\n\n"
  },
  {
    "path": "vm/src/runtime/semaphore_mutex.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Semaphore_Mutex_Actions {\n  static const bool tracking = false;\npublic:\n  static void acquire_action(const char*);\n  static void release_action(const char*);\n  static bool is_initialized();\n\n  static OS_Mutex_Interface* get_mutex();\n  static bool is_held();\n};\n\n// typedef Abstract_Mutex<Scheduler_Mutex_Actions> Scheduler_Mutex;\n\nDefine_RVM_Mutex(Semaphore_Mutex, Semaphore_Mutex_Actions, 11, 12)\n\n"
  },
  {
    "path": "vm/src/runtime/squeak_adapters.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n#include \"squeak_adapters.h\"\n\n\n\nextern \"C\" {\n    sqInt  argumentCountOf(sqInt methodPointer);\n  void*  arrayValueOf(sqInt oop);\n  sqInt becomewith(sqInt array1, sqInt array2);\n    sqInt  booleanValueOf(sqInt obj);\n  sqInt byteSizeOf(sqInt);\n  sqInt byteSwapped(sqInt);\n    sqInt characterTable(void);\n  sqInt checkedIntegerValueOf(sqInt);\n    sqInt classAlien(void);\n    sqInt classArray(void);\n    sqInt classBitmap(void);\n  sqInt classByteArray(void);\n    sqInt classCharacter(void);\n  sqInt classExternalAddress(void);\n  sqInt classExternalData(void);\n  sqInt classExternalFunction(void);\n  sqInt classExternalLibrary(void);\n  sqInt classExternalStructure(void);\n    sqInt classFloat(void);\n  sqInt classLargeNegativeInteger(void);\n    sqInt classLargePositiveInteger(void);\n    sqInt classPoint(void);\n    sqInt classSemaphore(void);\n    sqInt classSmallInteger(void);\n    sqInt classString(void);\n  sqInt sqr_clone(sqInt oop);\n  sqInt copyBits();\n  sqInt copyBitsFromtoat(sqInt, sqInt, sqInt);\n  sqInt displayObject();\n  void   error(char*);\n  sqInt failed(void);\n    sqInt falseObject(void);\n  void*  fetchArrayofObject(sqInt fieldIndex, sqInt objectPointer);\n  sqInt fetchClassOf(sqInt oop);\n  double fetchFloatofObject(sqInt fieldIndex, sqInt objectPointer);\n  sqInt fetchIntegerofObject(sqInt, sqInt);\n  sqInt  fetchLong32ofObject(sqInt index, sqInt oop);\n  sqInt fetchPointerofObject(sqInt, sqInt);\n    sqInt  floatObjectOf(double aFloat);\n  void   forceInterruptCheck(sqInt);\n  void*  firstFixedField(sqInt oop);\n  void*  firstIndexableField(sqInt);\n  double floatValueOf(sqInt oop);\n  void   fullDisplayUpdate();\n  void  tenuringIncrementalGC();\n  sqInt fullGC(void);\n  sqInt getInterruptKeycode();\n  sqInt getNextWakeupTick();\n  sqInt ioWhicheverMSecs();\n  sqInt getSavedWindowSize();\n  sqInt getThisSessionID();\n  sqInt incrementalGC(void);\n  sqInt instanceSizeOf(sqInt);\n  sqInt instantiateClassindexableSize(sqInt, sqInt);\n  sqInt  integerObjectOf(sqInt value);\n  sqInt  integerValueOf(sqInt oop);\n  sqInt isBytes(sqInt);\n    sqInt isFloatObject(sqInt oop);\n    sqInt isInMemory(sqInt address);\n    sqInt isKindOf(sqInt oop, char *aString);\n  sqInt isKindOfClass(sqInt oop, sqInt aClass);\n\n  sqInt includesBehaviorThatOf(sqInt aClass, sqInt aSuperClass);\n  sqInt isArray(sqInt oop);\n  sqInt isIndexable(sqInt oop);\n  sqInt isIntegerObject(sqInt objectPointer);\n  sqInt isIntegerValue(sqInt intValue);\n  sqInt isMemberOf(sqInt oop, char *aString);\n  sqInt isPointers(sqInt oop);\n  sqInt isWeak(sqInt oop);\n  sqInt isWords(sqInt oop);\n  sqInt isWordsOrBytes(sqInt oop);\n  sqInt lengthOf(sqInt);\n    sqInt  literalCountOf(sqInt methodPointer);\n  sqInt  literalofMethod(sqInt offset, sqInt methodPointer);\n    sqInt loadBitBltFrom(sqInt bbOop);\n    sqInt makePointwithxValueyValue(sqInt xValue, sqInt yValue);\n  sqInt  methodArgumentCount(void);\n  sqInt  methodPrimitiveIndex(void);\n  sqInt  methodReturnValue(sqInt oop);\n  sqInt nilObject(void);\n  sqInt  primitiveIndexOf(sqInt methodPointer);\n  sqInt  obsoleteDontUseThisFetchWordofObject(sqInt index, sqInt oop);\n  sqInt pop(sqInt);\n  sqInt popRemappableOop(void);\n  sqInt topRemappableOop(void);  \n  sqInt  popthenPush(sqInt nItems, sqInt oop);\n  sqInt positive32BitIntegerFor(sqInt);\n  sqInt  positive32BitValueOf(sqInt oop);\n  sqInt  positive64BitIntegerFor(sqLong integerValue);\n  sqLong positive64BitValueOf(sqInt oop);\n  sqInt primitiveFail();\n  sqInt primitiveFailFor(sqInt);\n  sqInt primitiveFailureCode();\n    sqInt primitiveMethod(void);\n  sqInt push(sqInt);\n  sqInt pushBool(sqInt);\n  sqInt  pushFloat(double f);\n  sqInt  pushInteger(sqInt integerValue);\n  sqInt pushRemappableOop(sqInt oop);\n  sqInt setInterruptCheckCounter(sqInt);\n  sqInt setInterruptPending(sqInt);\n  sqInt setSavedWindowSize(sqInt);\n  sqInt showDisplayBitsLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b);\n  sqInt signalSemaphoreWithIndex(sqInt);\n  sqInt  signed32BitIntegerFor(sqInt integerValue);\n  sqInt  signed32BitValueOf(sqInt oop);\n    sqInt  signed64BitIntegerFor(sqLong integerValue);\n  sqLong signed64BitValueOf(sqInt oop);\n    sqInt  sizeOfSTArrayFromCPrimitive(void *cPtr);\n  sqInt  slotSizeOf(sqInt oop);\n  double stackFloatValue(sqInt offset);\n  sqInt stackIntegerValue(sqInt);\n  sqInt stackObjectValue(sqInt);\n  sqInt  stackValue(sqInt offset);\n  sqInt  stObjectat(sqInt array, sqInt fieldIndex);\n  sqInt  stObjectatput(sqInt array, sqInt fieldIndex, sqInt value);\n  sqInt  storeIntegerofObjectwithValue(sqInt index, sqInt oop, sqInt integer);\n  sqInt  storePointerofObjectwithValue(sqInt index, sqInt oop, sqInt valuePointer);\n  sqInt  stSizeOf(sqInt oop);\n  sqInt success(sqInt);\n  sqInt superclassOf(sqInt classPointer);\n  sqInt trueObject(void);\n  sqInt  vmEndianness(void);\n\n  char *pointerForOop(sqInt oop);\n  sqInt oopForPointer(char *ptr);\n\n  void   browserProcessCommand(void);\n  sqInt display_primitivePluginBrowserReady(void);\n  sqInt display_primitivePluginRequestURLStream(void);\n  sqInt display_primitivePluginRequestURL(void);\n  sqInt display_primitivePluginPostURL(void);\n  sqInt display_primitivePluginRequestFileHandle(void);\n  sqInt display_primitivePluginDestroyRequest(void);\n  sqInt display_primitivePluginRequestState(void);\n\n  bool verify_heap(void);\n\n  void print_vm_info(void);\n  void signal_emergency_semaphore(void);\n}\n\n\nconst char* interpreterVersion = \"Renaissance\";\n\n\nsqInt  argumentCountOf(sqInt methodPointer) {\n  return Oop::from_bits(methodPointer).as_object()->argumentCount();\n}\n\nvoid*  arrayValueOf(sqInt oop) { return Oop::from_bits(oop).arrayValue(); }\n\n\nsqInt becomewith(sqInt /* array1 */, sqInt /* array2 */) {\n  unimpExt(); return 0;\n}\n\nsqInt  booleanValueOf(sqInt obj) {\n  return The_Squeak_Interpreter()->booleanValueOf(Oop::from_bits(obj));\n}\n\nsqInt byteSizeOf(sqInt i) { return Oop::from_bits(i).as_object()->byteSize(); }\n\nsqInt byteSwapped(sqInt i) {assert(sizeof(sqInt) == sizeof(int32)); swap_bytes_long((int32*)&i); return i; }\n\nsqInt characterTable(void) { return The_Squeak_Interpreter()->splObj(Special_Indices::CharacterTable).bits(); }\n\nsqInt  checkedIntegerValueOf(sqInt intOop) { return Oop::from_bits(intOop).checkedIntegerValue(); }\n\n\nsqInt classAlien(void) { return The_Squeak_Interpreter()->splObj(Special_Indices::ClassAlien).bits(); }\nsqInt classArray(void) { return The_Squeak_Interpreter()->splObj(Special_Indices::ClassArray).bits(); }\nsqInt classBitmap(void) { return The_Squeak_Interpreter()->splObj(Special_Indices::ClassBitmap).bits(); }\nsqInt classByteArray() { return The_Squeak_Interpreter()->splObj(Special_Indices::ClassByteArray).bits(); }\nsqInt classCharacter(void) { return The_Squeak_Interpreter()->splObj(Special_Indices::ClassCharacter).bits(); }\n\nsqInt classExternalAddress() { return The_Squeak_Interpreter()->splObj(Special_Indices::ClassExternalAddress).bits(); }\nsqInt classExternalData() { return The_Squeak_Interpreter()->splObj(Special_Indices::ClassExternalData).bits(); }\nsqInt classExternalFunction() { return The_Squeak_Interpreter()->splObj(Special_Indices::ClassExternalFunction).bits(); }\nsqInt classExternalLibrary() { return The_Squeak_Interpreter()->splObj(Special_Indices::ClassExternalLibrary).bits(); }\nsqInt classExternalStructure() { return The_Squeak_Interpreter()->splObj(Special_Indices::ClassExternalStructure).bits(); }\n\nsqInt classFloat(void) { return The_Squeak_Interpreter()->splObj(Special_Indices::ClassFloat).bits(); }\nsqInt classLargeNegativeInteger(void) { return The_Squeak_Interpreter()->splObj(Special_Indices::ClassLargeNegativeInteger).bits(); }\nsqInt classLargePositiveInteger(void) { return The_Squeak_Interpreter()->splObj(Special_Indices::ClassLargePositiveInteger).bits(); }\nsqInt classPoint(void) { return The_Squeak_Interpreter()->splObj(Special_Indices::ClassPoint).bits(); }\nsqInt classSemaphore(void) { return The_Squeak_Interpreter()->splObj(Special_Indices::ClassSemaphore).bits(); }\nsqInt classSmallInteger(void) { return The_Squeak_Interpreter()->splObj(Special_Indices::ClassInteger).bits(); }\nsqInt classString(void) { return The_Squeak_Interpreter()->classString()->as_oop().bits(); }\n\n# undef clone\n\nsqInt sqr_clone(sqInt oop) {\n  return Oop::from_bits(oop).as_object()->clone().bits();\n}\n\nsqInt copyBits() { The_Squeak_Interpreter()->copyBits(); return 0; }\n\nsqInt copyBitsFromtoat(sqInt x0, sqInt x1, sqInt y) {\n  The_Squeak_Interpreter()->copyBitsFromtoat(x0, x1, y);\n  return 0;\n}\n\n\nsqInt displayObject() { return The_Squeak_Interpreter()->displayObject().bits(); }\n\nvoid error(char* s) { assert_always_msg(0, s); }\n\nsqInt failed() { return The_Squeak_Interpreter()->failed(); }\n\nvoid*  fetchArrayofObject(sqInt fieldIndex, sqInt objectPointer) { return Oop::from_bits(objectPointer).as_object()->fetchArray(fieldIndex); }\n\nsqInt falseObject() { return The_Squeak_Interpreter()->roots.falseObj.bits(); }\n\n\nsqInt  fetchClassOf(sqInt oop) { return Oop::from_bits(oop).fetchClass().bits(); }\n\ndouble fetchFloatofObject(sqInt fieldIndex, sqInt objectPointer) {\n  return Oop::from_bits(objectPointer).as_object()->fetchFloatofObject(fieldIndex);\n}\n\nsqInt fetchIntegerofObject(sqInt x, sqInt y) { return Oop::from_bits(y).as_object()->fetchInteger(x); }\n\nsqInt  fetchLong32ofObject(sqInt index, sqInt oop) { return Oop::from_bits(oop).as_object()->fetchLong32(index); }\n\nsqInt fetchPointerofObject(sqInt x, sqInt y) {\n  Oop r = Oop::from_bits(y).as_object()->fetchPointer(x);\n  if (check_many_assertions) r.verify_oop();\n  return r.bits();\n}\n\nsqInt  floatObjectOf(double aFloat) { return Object::floatObject(aFloat).bits(); }\n\nvoid* firstFixedField(sqInt oop) { return Oop::from_bits(oop).as_object()->firstFixedField(); }\n\nvoid* firstIndexableField(sqInt oop) { return Oop::from_bits(oop).as_object()->firstIndexableField_for_primitives(); }\n\ndouble floatValueOf(sqInt oop) { return The_Squeak_Interpreter()->floatValueOf(Oop::from_bits(oop)); }\n\nvoid forceInterruptCheck(sqInt) { The_Squeak_Interpreter()->forceInterruptCheck(); }\n\nvoid fullDisplayUpdate() { The_Squeak_Interpreter()->fullDisplayUpdate(); }\n\nsqInt fullGC() { The_Memory_System()->fullGC(\"fullGC from original Squeak code\"); return 0; }\n\nsqInt getInterruptKeycode() { return The_Squeak_Interpreter()->interruptKeycode(); }\n\nsqInt getNextWakeupTick() { return The_Squeak_Interpreter()->nextWakeupTick(); }\n\nsqInt ioWhicheverMSecs() { return The_Squeak_Interpreter()->ioWhicheverMSecs(); }\n\nsqInt getSavedWindowSize() { return The_Memory_System()->snapshot_window_size.savedWindowSize(); }\n\nsqInt getThisSessionID() { return The_Squeak_Interpreter()->globalSessionID; }\n\nsqInt incrementalGC(void) { The_Memory_System()->incrementalGC(); return 0; }\nvoid  tenuringIncrementalGC(void) { The_Memory_System()->incrementalGC(); }\n\n\nsqInt instantiateClassindexableSize(sqInt k, sqInt s) { return Oop::from_bits(k).as_object()->instantiateClass(s)->as_oop().bits(); }\n\nsqInt instanceSizeOf(sqInt classObj) { return Oop::from_bits(classObj).as_object()->instanceSizeOfClass(); }\n\nsqInt  integerObjectOf(sqInt v) { return Oop::from_int(v).bits(); }\n\nsqInt  integerValueOf(sqInt oop) { return Oop::from_bits(oop).integerValue(); }\n\nsqInt isBytes(sqInt x) { return Oop::from_bits(x).isBytes(); }\n\nsqInt isFloatObject(sqInt oop) { return Oop::from_bits(oop).is_mem() && Oop::from_bits(oop).as_object()->isFloatObject(); }\n\nsqInt isInMemory(sqInt /* address */) { unimpExt(); return 1;}\n\nsqInt isKindOf(sqInt oop, char *aString) { return Oop::from_bits(oop).isKindOf(aString); }\nsqInt isKindOfClass(sqInt oop, sqInt aClass_oop)  {\n  return Oop::from_bits(oop).isKindOf(Oop::from_bits(aClass_oop));\n}\n\n\nsqInt includesBehaviorThatOf(sqInt /* aClass */, sqInt /* aSuperClass */) { unimpExt(); return 0; }\nsqInt isArray(sqInt oop) { return Oop::from_bits(oop).isArray(); }\nsqInt isIndexable(sqInt oop) { return Oop::from_bits(oop).isIndexable(); }\nsqInt isIntegerObject(sqInt objectPointer) { return Oop::from_bits(objectPointer).is_int(); }\nsqInt isIntegerValue(sqInt intValue) { return Oop::isIntegerValue((oop_int_t)intValue); }\nsqInt isMemberOf(sqInt oop, char *aString) { return Oop::from_bits(oop).isMemberOf(aString); }\nsqInt isPointers(sqInt oop) { return Oop::from_bits(oop).isPointers(); }\nsqInt isWeak(sqInt oop) { return Oop::from_bits(oop).isWeak(); }\nsqInt isWords(sqInt oop) { return Oop::from_bits(oop).isWords(); }\nsqInt isWordsOrBytes(sqInt oop) { return Oop::from_bits(oop).isWordsOrBytes(); }\n\n\n\n\n\n\nsqInt lengthOf(sqInt x)  {  return Oop::from_bits(x).as_object()->lengthOf(); }\n\nsqInt  literalCountOf(sqInt methodPointer) { return Oop::from_bits(methodPointer).as_object()->literalCount(); }\n\nsqInt  literalofMethod(sqInt offset, sqInt methodPointer) { return Oop::from_bits(methodPointer).as_object()->literal(offset).bits(); }\n\nsqInt loadBitBltFrom(sqInt /* bbOop */) { unimpExt(); return 0; }\n\nsqInt makePointwithxValueyValue(sqInt xValue, sqInt yValue) { return Object::makePoint(xValue, yValue)->as_oop().bits(); }\n\n\nsqInt  methodArgumentCount(void) { return The_Squeak_Interpreter()->methodArgumentCount(); }\nsqInt  methodPrimitiveIndex(void)  { return The_Squeak_Interpreter()->methodPrimitiveIndex(); }\nsqInt  methodReturnValue(sqInt /* oop */) { unimpExt(); return 0; }\n\nsqInt nilObject() { return The_Squeak_Interpreter()->roots.nilObj.bits(); }\n\nsqInt  obsoleteDontUseThisFetchWordofObject(sqInt /* index */, sqInt /* oop */) {unimpExt(); return 0;}\n\nsqInt popRemappableOop(void) { return The_Squeak_Interpreter()->popRemappableOop().bits(); }\nsqInt topRemappableOop(void) { return The_Squeak_Interpreter()->topRemappableOop().bits(); }\n\nsqInt  popthenPush(sqInt nItems, sqInt oop) { The_Squeak_Interpreter()->popThenPush(nItems, Oop::from_bits(oop)); return 0; }\n\nsqInt  positive32BitIntegerFor(sqInt x) { return Object::positive32BitIntegerFor(x).bits(); }\n\nsqInt  positive64BitIntegerFor(sqLong x) { return Object::positive64BitIntegerFor(x).bits(); }\n\nsqInt  positive32BitValueOf(sqInt oop) { return The_Squeak_Interpreter()->positive32BitValueOf(Oop::from_bits(oop)); }\n\nsqLong positive64BitValueOf(sqInt oop) { return The_Squeak_Interpreter()->positive64BitValueOf(Oop::from_bits(oop)); }\n\nsqInt  primitiveIndexOf(sqInt methodPointer) { return Oop::from_bits(methodPointer).as_object()->primitiveIndex(); }\n\nsqInt primitiveFail() { The_Squeak_Interpreter()->primitiveFail(); return 0; }\nsqInt primitiveFailFor(sqInt reasonCode) { \n  The_Squeak_Interpreter()->primitiveFailFor(reasonCode);\n  return 0;\n}\nsqInt primitiveFailureCode() { return The_Squeak_Interpreter()->primFailCode; }\n\nsqInt primitiveMethod(void) { unimpExt(); return 0; }\n\nsqInt pop(sqInt x) {  The_Squeak_Interpreter()->pop(x);  return 0; }\n\n\nsqInt push(sqInt x) { The_Squeak_Interpreter()->push(Oop::from_bits(x)); return 0; }\n\nsqInt pushBool(sqInt b)  { The_Squeak_Interpreter()->pushBool(b); return 0; }\n\nsqInt pushFloat(double f) { The_Squeak_Interpreter()->pushFloat(f); return 0; }\nsqInt pushInteger(sqInt integerValue) { The_Squeak_Interpreter()->pushInteger(integerValue); return 0; }\nsqInt pushRemappableOop(sqInt oop) { The_Squeak_Interpreter()->pushRemappableOop(Oop::from_bits(oop)); return 0; }\n\n\nsqInt setInterruptCheckCounter(sqInt i) {\n  The_Squeak_Interpreter()->interruptCheckCounter = i;\n  return 0; }\n\nsqInt setInterruptPending(sqInt i) {\n  The_Squeak_Interpreter()->set_interruptPending(i);\n  return 0; }\n\nsqInt setSavedWindowSize(sqInt s) { The_Memory_System()->snapshot_window_size.savedWindowSize(s); return 0; }\n\nsqInt  signed32BitIntegerFor(sqInt integerValue) { return Object::signed32BitIntegerFor(integerValue).bits(); }\n\nsqInt  signed64BitIntegerFor(sqLong integerValue) { return Object::signed64BitIntegerFor(integerValue).bits(); }\n\nsqInt  signed32BitValueOf(sqInt oop) { return The_Squeak_Interpreter()->signed32BitValueOf(Oop::from_bits(oop)); }\n\nsqLong signed64BitValueOf(sqInt oop) { return The_Squeak_Interpreter()->signed64BitValueOf(Oop::from_bits(oop)); }\n\n\nsqInt showDisplayBitsLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b) {\n  The_Squeak_Interpreter()->showDisplayBitsOf(Oop::from_bits(aForm), l, t, r, b);\n  return 0;\n}\n\n\nsqInt signalSemaphoreWithIndex(sqInt i) { The_Squeak_Interpreter()->signalSemaphoreWithIndex(i); return 0; }\n\nsqInt  sizeOfSTArrayFromCPrimitive(void *cPtr) {\n  return Object::sizeOfSTArrayFromCPrimitive(cPtr);\n}\n\nsqInt  slotSizeOf(sqInt oop) { return Oop::from_bits(oop).as_object()->slotSize(); }\n\ndouble stackFloatValue(sqInt offset) { return The_Squeak_Interpreter()->stackFloatValue(offset); }\n\n\nsqInt stackIntegerValue(sqInt i) { return The_Squeak_Interpreter()->stackIntegerValue(i); }\n\nsqInt stackObjectValue(sqInt i) { return The_Squeak_Interpreter()->stackObjectValue(i).bits(); }\n\nsqInt  stackValue(sqInt offset) { return The_Squeak_Interpreter()->stackValue(offset).bits(); }\n\nsqInt  stObjectat(sqInt array, sqInt fieldIndex) {\nreturn The_Squeak_Interpreter()->stObjectAt(Oop::from_bits(array).as_object(), fieldIndex).bits(); }\n\nsqInt  stObjectatput(sqInt array, sqInt fieldIndex, sqInt value) {\n  The_Squeak_Interpreter()->stObjectAtPut(Oop::from_bits(array).as_object(), fieldIndex, Oop::from_bits(value)); return 0; }\n\nsqInt  storeIntegerofObjectwithValue(sqInt index, sqInt oop, sqInt integer) {\n  Oop::from_bits(oop).as_object()->storeInteger(index, integer);  return 0;\n}\n\nsqInt  storePointerofObjectwithValue(sqInt index, sqInt oop, sqInt valuePointer) {\n  Oop::from_bits(oop).as_object()->storePointer(index, Oop::from_bits(valuePointer));  return 0;\n}\n\n\nsqInt stSizeOf(sqInt oop) { return Oop::from_bits(oop).as_object()->stSize(); }\n\nsqInt success(sqInt b) { The_Squeak_Interpreter()->success(b); return The_Squeak_Interpreter()->successFlag; }\n\nsqInt superclassOf(sqInt classPointer) { return Oop::from_bits(classPointer).as_object()->superclass().bits(); }\n\nsqInt trueObject() { return The_Squeak_Interpreter()->roots.trueObj.bits(); }\n\nsqInt  vmEndianness(void) { unimpExt(); return 0; }\n\nextern \"C\" {\nsqInt ioFilenamefromStringofLengthresolveAliases(char* aCharBuffer, char* filenameIndex, sqInt filenameLength, sqInt resolveFlag);\n}\n\nsqInt ioFilenamefromStringofLengthresolveAliases(char* aCharBuffer, char* filenameIndex, sqInt filenameLength, sqInt resolveFlag) {\n  return The_Squeak_Interpreter()->ioFilenamefromStringofLengthresolveAliases(aCharBuffer, filenameIndex, filenameLength, resolveFlag); }\n\n\n\nchar *pointerForOop(sqInt oop)\t\t\t{ return Oop::from_bits(oop).as_object()->pointerForOop_for_primitives(); }\nsqInt oopForPointer(char *ptr)\t\t\t  { return (sqInt) ((Object*)ptr)->as_oop().bits(); }\n\n// squeak code used to use pointerForOop for these\nchar* pointerForIndex_xxx_dmu(sqInt index)  {\n  if (check_assertions && index)\n    assert( ((Object*)index)->my_heap_contains_me());\n  return (char*)index;\n}\n\n\ntypedef struct {\n  char *pluginName;\n  char *primitiveName;\n  void *primitiveAddress;\n} sqExport;\n\n// xxx_dmu include these in compilation?\nsqExport vm_exports[1];\n\n# if !On_iOS\n  sqExport os_exports[1];\n  sqExport ADPCMCodecPlugin_exports[1];\n  sqExport BMPReadWriterPlugin_exports[1];\n  sqExport DSAPrims_exports[1];\n  sqExport ZipPlugin_exports[1];\n  sqExport FFTPlugin_exports[1];\n  sqExport GeniePlugin_exports[1];\n  sqExport JPEGReaderPlugin_exports[1];\n  sqExport Klatt_exports[1];\n  sqExport StarSqueakPlugin_exports[1];\n  sqExport XDisplayControlPlugin_exports[1];\n# endif\n\n# if Configure_Squeak_Code_for_Tilera\nsqExport UnixOSProcessPlugin_exports[1];\n# endif\n\nextern \"C\" {extern void* sqGetInterpreterProxy();}\n\n\nvoid* interpreterProxy;\n\nvoid initip() {\ninterpreterProxy = sqGetInterpreterProxy();\n}\n\n\nvoid   browserProcessCommand(void) {}\n\nsqInt display_primitivePluginBrowserReady(void) { return 0; }\nsqInt display_primitivePluginRequestURLStream(void) { return 0; }\nsqInt display_primitivePluginRequestURL(void) { return 0; }\nsqInt display_primitivePluginPostURL(void) { return 0; }\nsqInt display_primitivePluginRequestFileHandle(void) { return 0; }\nsqInt display_primitivePluginDestroyRequest(void) { return 0; }\nsqInt display_primitivePluginRequestState(void) { return 0; }\n\n\nbool verify_heap() { return The_Memory_System()->verify(); }\n\nvoid print_vm_info() { The_Squeak_Interpreter()->print_info(); }\nvoid signal_emergency_semaphore() { The_Squeak_Interpreter()->signal_emergency_semaphore(); }\n\n"
  },
  {
    "path": "vm/src/runtime/squeak_adapters.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# define main sqr_main\n\n# define clone sqr_clone\n\n\n# include \"types.h\"\n# define BASE_HEADER_SIZE  /* BaseHeaderSize */ sizeof(int32)\n\n// STEFAN: added this and set it to 7 since that seems to be the\n//         verion the original RVM/RoarVM was start of with\n# define VM_PROXY_MINOR 7\n\n# if On_Tilera && !defined(__APPLE__) || defined(RVM_CODE_NOT_SQUEAK_CODE)\ntypedef int sqInt;\ntypedef long long sqLong;\n# endif\n\n# ifdef __cplusplus\nextern \"C\" { char* pointerForIndex_xxx_dmu(sqInt); }\n# else\nextern char* pointerForIndex_xxx_dmu();\n# endif\n\n# ifdef __cplusplus\nextern \"C\" {\n# endif\n\nvoid rvm_exit();\nvoid print_vm_info();\n\n# ifdef __cplusplus\n}\n# endif\n\n# ifndef __cplusplus\n  # ifndef assert\n  # define assert(b) \\\n      if (!b) { \\\n        lprintf(\"assert in squeak_adapters: file \", __FILE__, \" line %d\\n\", __LINE__); \\\n        fatal(\"assert in squeak_adapters\"); \\\n      } \\\n      else\n  # endif\n# endif\n"
  },
  {
    "path": "vm/src/runtime/timeout_deferral.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\n\nTimeout_Deferral:: Timeout_Deferral() {\n  ++The_Squeak_Interpreter()->timeout_deferral_counters[Logical_Core::my_rank()];\n}\n\n\nTimeout_Deferral::~Timeout_Deferral() {\n  if (--The_Squeak_Interpreter()->timeout_deferral_counters[Logical_Core::my_rank()] == 0)\n    Timeout_Timer::restart_all();\n}\n\n\nbool Timeout_Deferral::are_timeouts_deferred() {\n  FOR_ALL_RANKS(i) {\n    if (The_Squeak_Interpreter()->timeout_deferral_counters[i])\n      return true;\n  }\n  return false;\n}\n\n"
  },
  {
    "path": "vm/src/runtime/timeout_deferral.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Timeout_Deferral {\n  public:\n  Timeout_Deferral();\n  ~Timeout_Deferral();\n  static bool are_timeouts_deferred();\n};\n\n"
  },
  {
    "path": "vm/src/runtime/timeout_timer.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include \"headers.h\"\n\n\nvoid Timeout_Timer::check() {\n  //static const char* check_for = NULL; // \"addedScheduledProcessResponse\";\n  if (!has_timed_out()  ||  Timeout_Deferral::are_timeouts_deferred())\n    return;\n  complain();\n  stop();\n  // if (strcmp(\"spinning in safepoint\", why) == 0)\n  //   for (;;);\n  act();\n}\n\n\nvoid Timeout_Timer::restart() {\n  if (!is_running())  return;\n  start();\n}\n\n\nvoid Timeout_Timer::complain() {\n  if (strcmp(why, Message_Statics::message_names[Message_Statics::runPrimitiveResponse]) == 0 )\n    lprintf(\"timed out waiting for %s from %d after %d secs, remote_prim_fn: 0x%x\\n\",\n            why, who_I_am_waiting_for, elapsed_seconds(), Message_Statics::remote_prim_fn);\n\n  else\n    lprintf(\"timed out waiting for %s from %d after %d secs\\n\",\n            why, who_I_am_waiting_for, elapsed_seconds());\n}\n\nvoid Timeout_Timer::act() {\n  if (who_I_am_waiting_for != any) {\n    lprintf( \"sending destruct\\n\");\n    selfDestructMessage_class(\"cause of my timoeout\").send_to(who_I_am_waiting_for);\n    kill(who_I_am_waiting_for - Logical_Core::my_rank() + getpid(), SIGBUS);\n  }\n  for (;;);\n  fatal(\"timeout\");\n}\n\nvoid Timeout_Timer::check_all() {\n  FOR_ALL_TIMEOUT_TIMERS(p) p->check();\n}\n\nvoid Timeout_Timer::restart_all() {\n  FOR_ALL_TIMEOUT_TIMERS(p) p->restart();\n}\n\nvoid Safepoint_Acquisition_Timer::complain() {\n  lprintf( \"too long to get safepoint: %ld s\\n\", elapsed_seconds());\n}\n\nvoid Safepoint_Acquisition_Timer::act() {\n  lprintf( \"sending destruct to the holdouts\\n\");\n  The_Squeak_Interpreter()->safepoint_tracker->self_destruct_all();\n  for(;;);\n}\n\n"
  },
  {
    "path": "vm/src/runtime/timeout_timer.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\nclass Timeout_Timer_List_Head {\n public: // should be protected but C++ is broken\n  Timeout_Timer_List_Head* next;\n  Timeout_Timer_List_Head* prev;\n  const char* why;\n\n  void remove_me()  { prev->next = next;  next->prev = prev;}\n  void add_me(Timeout_Timer_List_Head* x)     { next = x->next; prev = x;  next->prev = prev->next = this; }\n  void init_links() { next = prev = this; }\n\n  Timeout_Timer_List_Head()                   { init_links(); why = \"head\"; }\n};\n\n\nclass Timeout_Timer : public Timeout_Timer_List_Head {\n protected:\n  // STEFAN: TODO: Read this from sysctl on osx or /proc/cpuinfo on linux\n  /*\n   long long get_cycles_persecond() {\n   FILE *f;\n   double result;\n   int s;\n\n   f = fopen(\"/proc/cpuinfo\",\"r\");\n   if (!f) return 0;\n\n   for (;;) {\n   s = fscanf(f,\"cpu MHz : %lf\",&result);\n   if (s > 0) break;\n   if (s == 0) s = fscanf(f,\"%*[^\\n]\\n\");\n   if (s < 0) { result = 0; break; }\n   }\n\n   fclose(f);\n   return 1000000.0 * result;\n   }\n   */\n  static const u_int64 cycles_per_sec =\n# if On_Tilera\n   660000000LL;\n# else\n  2800000000LL;\n# endif\n\n\n  u_int64 start_time;\n  int timeout_secs;\n  u_int64 timeout_cycles;\n  static const u_int64 never = ~0; // cannot be 0, that's what get_cycle_count returns when stubbed out -- dmu 5/10\n  static const u_int64 default_timeout_secs = 30;\n  static const int any = -1;\n\n  int who_I_am_waiting_for;\n\n  virtual void complain();\n  virtual void act();\n\n\npublic:\n  Timeout_Timer(const char* w, int ts = default_timeout_secs, int r = any) {\n    add_me(The_Timeout_Timer_List_Head());\n    why = w;\n    stop();\n    timeout_secs = ts;\n    timeout_cycles = timeout_secs * cycles_per_sec;\n    who_I_am_waiting_for = r;\n  }\n  \n  ~Timeout_Timer() { stop(); remove_me(); }\n\n  void start() { start_time = OS_Interface::get_cycle_count(); assert(is_running()); }\n  void stop()  { start_time = never; assert(!is_running()); }\n  void check();\n  void restart();\n  bool is_running() { return start_time != never; }\n  bool has_timed_out() { return is_running()  &&  elapsed_cycles()  >  timeout_cycles; }\n  u_int64 elapsed_cycles()  { return OS_Interface::get_cycle_count() - start_time; }\n  u_int64 elapsed_seconds() { return elapsed_cycles() / cycles_per_sec; }\n  static void check_all();\n  static void restart_all();\n\n# define FOR_ALL_TIMEOUT_TIMERS(p) \\\n  Timeout_Timer_List_Head* head = The_Timeout_Timer_List_Head(); \\\n  for ( Timeout_Timer* p  = (Timeout_Timer*)head->next;  \\\n                       p != (Timeout_Timer*)head; \\\n                       p  = (Timeout_Timer*)p->next)\n\n  bool is_on_list() {\n    FOR_ALL_TIMEOUT_TIMERS(tt)\n      if (tt == this) return true;\n    return false;\n  }\n};\n\n\nclass Safepoint_Acquisition_Timer: public Timeout_Timer {\n  protected:\n  virtual void complain();\n  virtual void act();\n public:\n  Safepoint_Acquisition_Timer() : Timeout_Timer(\"safepoint acquisition\", 60) {}\n};\n\n"
  },
  {
    "path": "vm/src/runtime/tracked_ptr.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    Stefan Marr, Vrije Universiteit Brussel - Initial Implementation\n ******************************************************************************/\n\n\n# if Track_OnStackPointer\n\n#include <assert.h>\n\n/**\n * This class is used to track pointers on the stack.\n * The idea is that a global event can occur that invalidates the pointers\n * and this class is meant to signal all cases in which an invalid pointer\n * is used.\n */\ntemplate<typename T>\nclass tracked_ptr {\nprivate:\n  typedef tracked_ptr_registry< tracked_ptr<T> > registry_t;\n  typedef typename tracked_ptr_registry< tracked_ptr<T> >::iterator iterator;\n  \n  friend class tracked_ptr_registry< tracked_ptr<T> >;\n  \n  static registry_t registry;\n  \n  T*       ptr;\n  bool     valid;\n  iterator it;\n  \n  iterator register_this() {\n    return registry.register_tracked_ptr(this);\n  }\n    \n  void unregister_and_invalidate() {\n    registry.unregister_tracked_ptr(this, it);\n    valid = false;\n  }\n\npublic:\n  \n  /**\n   * This operation will invalidate all pointers that are tracked\n   * and on subsequent use, an assertion will fail.\n   */\n  static void invalidate_all_pointer() {\n    registry.invalidate_all_pointer();\n  }\n\n  \n  \n  /**\n   * The simple constructor will initialize the tracker to be invalid.\n   * It will also register it, then we don't need to care about to many\n   * different cases, I think.\n   * The only thing we have to keep track is the pointer passed trough\n   * in copy operations, and its validity.\n   */\n  explicit tracked_ptr() :\n    ptr(NULL), valid(false), it(register_this()) {}\n  \n  /**\n   * Constructor initialized with the pointer to be tracked.\n   */\n  explicit tracked_ptr(T* const ptr) :\n    ptr(ptr), valid(true), it(register_this()) {}\n  \n  /**\n   * Copy constructor\n   */\n  tracked_ptr(const tracked_ptr & t_ptr) :\n    ptr(t_ptr.ptr), valid(t_ptr.valid), it(register_this()) {}\n  \n  ~tracked_ptr() {\n    unregister_and_invalidate();\n  }  \n  \n  tracked_ptr& operator=(tracked_ptr const & t_ptr) {\n    ptr   = t_ptr.ptr;\n    valid = t_ptr.valid;\n    return *this;\n  }\n\n  tracked_ptr& operator=(T* const p) {\n    ptr   = p;\n    valid = true;\n    return *this;\n  }  \n  \n  /**\n   * Cast operator to bool\n   */\n  operator bool() const {\n    return valid && ptr;\n  }\n  \n  /**\n   * Cast operator to void*\n   */\n  operator void*() const {\n    assert(is_valid());  // not sure why that was not here before, Stefan 2011-01-06\n    return ptr;\n  }\n  \n  operator T*() const {\n    assert(is_valid());\n    return ptr;\n  }\n  \n  inline T& operator* () const {\n    assert(is_valid());\n    assert(ptr != NULL);\n    return *ptr;\n  }\n  \n  inline T* operator-> () const {\n    assert(is_valid());\n    assert(ptr != NULL);\n    return ptr;\n  }\n  \n  /**\n   * Make sure there is nobody doing something stupid with the address.\n   * Lets have it fail for now. In case there is a real need for it to work,\n   * it can be changed by removing the assert.\n   */\n  inline T* const * operator& () const {\n    assert(false); // This assert is added to avoid surprises. Remove with caution!\n    return &ptr;\n  }\n  \n  inline bool operator==(tracked_ptr const & t_ptr) const {\n    return ptr == t_ptr.ptr;\n  }\n\n  inline bool operator!=(tracked_ptr const & t_ptr) const {\n    return ptr != t_ptr.ptr;\n  }\n\n  /*inline bool operator==(const T* const p) const {\n    return ptr == p;\n  }\n  \n  inline bool operator!=(const T* const p) const {\n    return ptr != p;\n  }*/\n\n  inline bool operator==(int const p) const {\n    return ptr == (void*)p;\n  }\n  \n  inline bool operator!=(int const p) const {\n    return ptr != (void*)p;\n  }\n  \n  inline T* get() const {\n    return ptr;\n  }\n  \n  static size_t pointers_on_stack() {\n    return registry.size();\n  }  \n  \n  bool is_valid() const {\n    return valid;\n  }\n    \n}; // tracked_ptr\n\n/* STEFAN: this is not necessary for the moment, the bool() conversion operator\n           is sufficient. And, overloading && breaks short circuiting, so stay\n           away here! -- 2010-12-09\ntemplate<typename T>\ninline bool operator&&(const bool a, tracked_ptr<T> const & t_ptr) {\n  return a && t_ptr.is_valid() && t_ptr.get();\n} */\n\ntemplate<typename T>\ninline bool operator==(const bool a, tracked_ptr<T> const & t_ptr) {\n  return a && t_ptr.is_valid() && t_ptr.get();\n} \n\n\ntemplate<typename T>\ntypename tracked_ptr<T>::registry_t tracked_ptr<T>::registry;\n\n# endif // Track_OnStackPointer\n"
  },
  {
    "path": "vm/src/runtime/tracked_ptr_registry.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    Stefan Marr, Vrije Universiteit Brussel - Initial Implementation\n ******************************************************************************/\n\n\n# if Track_OnStackPointer\n\n#include <set>\n#include <assert.h>\n#include <stdint.h>\n\nusing namespace std;\n\n/**\n * This class implements the registry for the tracked pointers.\n * Currently it is a std::set with a simple mutex to guard the set\n * from concurrent modification.\n */\ntemplate<typename TrackedPtr>\nclass tracked_ptr_registry {\nprivate:\n  \n  typedef set<TrackedPtr*> registry_t;\n  registry_t* registries[Max_Number_Of_Cores];\n  \n  int32_t next_rank;\n  pthread_key_t registry_key;\n  \n  inline registry_t* get_registry() {\n    registry_t* registry = (registry_t*)pthread_getspecific(registry_key);\n    if (registry == NULL) {\n      registry = new registry_t();\n      pthread_setspecific(registry_key, registry);\n      int32_t my_rank = OS_Interface::atomic_fetch_and_add(&next_rank, 1);\n      registries[my_rank] = registry;\n    }\n    return registry;\n  }\n  \npublic:\n  \n  typedef typename registry_t::iterator iterator;\n  \n  \n  tracked_ptr_registry() : next_rank(0) {\n    for (size_t i = 0; i < Max_Number_Of_Cores; i++) {\n      registries[i] = NULL;\n    }\n    pthread_key_create(&registry_key, NULL);\n  }\n  \n  ~tracked_ptr_registry() {\n    pthread_key_delete(registry_key);\n  }\n  \n  iterator register_tracked_ptr(TrackedPtr* t_ptr) {\n    registry_t* const registry = get_registry();\n    \n    pair<typename registry_t::iterator, bool> p = registry->insert(t_ptr);\n    \n    assert(p.second);\n    \n    return p.first;\n  }\n  \n  void unregister_tracked_ptr(TrackedPtr* t_ptr, iterator it) {\n    registry_t* const registry = get_registry();\n    \n    if (it != registry->end()) {\n      // ensure that the iterator is stable\n      assert(*it == t_ptr);\n      \n      registry->erase(it);\n    }\n  }\n  \n  void invalidate_all_pointer() const {\n    for (size_t rank = 0; rank < Max_Number_Of_Cores; rank++) {\n      registry_t* const registry = registries[rank];\n      if (registry) {\n        iterator i;\n        for (i = registry->begin(); i != registry->end(); i++) {\n          (*i)->valid = false;\n        }\n      }\n    }\n  }\n  \n  /* rather useless at the moment */\n  size_t size() {\n    registry_t* const registry = get_registry();\n    return registry->size();\n  }\n  \n}; // tracked_ptr_registry\n\n# endif // Track_OnStackPointer\n"
  },
  {
    "path": "vm/src/runtime/utils.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# include \"headers.h\"\n# include \"sys/time.h\"\n#include <time.h>\n\nvoid wordset( int32* start, int32 contents, int n) {\n  for (int i = 0;  i < n;  start[i++] = contents)\n    ;\n}\n\n\nint round_up_to_power_of_two(int x) {\n  if (x == 0)  return x;\n  if (OS_Interface::population_count(x) == 1)  return x;\n  int lz = OS_Interface::leading_zeros(x);\n  int number_of_bits_after_leading_zeros = 32 - lz;\n  int result = 1 << number_of_bits_after_leading_zeros;\n  assert_always((result >> 1) < x  &&  x <= result);\n  return result;\n}\n\n\nint log_of_power_of_two(int x) {\n  int lz = OS_Interface::leading_zeros(x);\n  int number_of_bits_after_leading_zeros = 32 - lz;\n  int result = number_of_bits_after_leading_zeros - 1;\n  assert_always((1 << result) == x);\n  return result;\n}\n\nvoid print_time() {\n  struct timeval tv;\n  if (gettimeofday(&tv, NULL))\n    fprintf(stderr, \"gettimeofday failed\\n\");\n  fprintf(stderr, \"%s\", ctime(&tv.tv_sec));\n}\n\nint least_significant_bit_position(u_int64 x) {\n  for (int i = 0;  i < 64;  ++i, (x >>= 1))\n    if (x & 1) return i;\n  return 64;\n}\n\n\n\nextern \"C\" void lprintf(const char* msg, ...) {\n  va_list ap;\n  va_start(ap, msg);\n  vlprintf(msg, ap);\n  va_end(ap);\n}\n\nvoid vlprintf(const char* msg, va_list ap) {\n  FILE* f = stderr;\n  fprintf(f, \"%d on %d (%d): \",\n          The_Squeak_Interpreter()->increment_print_sequence_number(),\n          Logical_Core::my_rank(),\n          getpid());\n  vfprintf(f, msg, ap);\n}\n\n"
  },
  {
    "path": "vm/src/runtime/utils.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\ninline int round_up_by_power_of_two(int x, int power_of_two) {\n  return (x + power_of_two - 1) & ~(power_of_two - 1);\n}\n\ninline int divide_by_power_of_two_and_round_up(int x, int power_of_two) {\n  return round_up_by_power_of_two(x, power_of_two) / power_of_two;\n}\n\ninline int divide_and_round_up(int x, int y) {\n  return (x + y - 1) / y;\n}\ninline int round_up(int x, int y) {\n  return divide_and_round_up(x, y) * y;\n}\n\n\n# define min(a,b) ((a) <= (b)  ?  (a)  :  (b))\n# define max(a,b) ((a) >= (b)  ?  (a)  :  (b))\n\ninline void swap_bytes_long(int32* p) {\n  *p = (*p << 24)  |  ((*p << 8) & 0xff0000)  |  ((*p >> 8) & 0xff00)  |  ((*p >> 24) & 0xff);\n}\ninline void reverseBytes(int32* start, int32* stop) {\n  fprintf(stdout, \"reversing bytes\\n\");\n\n  for (int32* p = start;  p < stop;  ++p)\n    swap_bytes_long(p);\n\n  fprintf(stdout, \"done reversing bytes\\n\");\n}\n\n\ninline bool is_vowel(char c) {\n  switch ( tolower(c) ) {\n    case 'a':\n    case 'e':\n    case 'i':\n    case 'o':\n    case 'u':\n      return true;\n    default: return false;\n  }\n}\n\nvoid wordset( int32*, int32, int n);\n\ninline int xfread(void* p, int sz, int n, FILE* f) {\n  int r = fread(p, sz, n, f);\n  if (r != n) { fatal(\"xfread\"); }\n  return r;\n}\n\ninline int xfwrite(const void* p, int sz, int n, FILE* f) {\n  int r = fwrite(p, sz, n, f);\n  if (r != n) { fatal(\"xfwrite\"); }\n  return r;\n}\n\n\ninline void write_mark(FILE* f, const char* m) { if (check_assertions) xfwrite(m, 4, 1, f); }\ninline void read_mark(FILE* f, const char* m) {\n  if (!check_assertions) return;\n  int mm;\n  xfread(&mm, sizeof(mm), 1, f);\n  if (mm != *(int*)m) fatal(\"mark mismatch\");\n}\n\nint round_up_to_power_of_two(int);\nint log_of_power_of_two(int);\nint least_significant_bit_position(u_int64);\n\nvoid print_time();\n\n\nextern \"C\" void lprintf(const char* msg, ...);\nvoid vlprintf(const char* msg, va_list ap);\n\n"
  },
  {
    "path": "vm/src/tests/buffered_channel.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    Stefan Marr, Vrije Universiteit Brussel - Initial Implementation\n ******************************************************************************/\n\n\n# if !On_Tilera\n\n#include <gtest/gtest.h>\n#include \"buffered_channel.h\"\n\nTEST(BufferedChannelTest, hasData) {\n  char sampleData[10] = { 3, 5, 4, 88, 66, 77, 22, 44, 45, 11 };\n  BufferedChannel channel(10, 10);\n\n  EXPECT_FALSE(channel.hasData());\n\n  channel.send(sampleData, 10);\n\n  EXPECT_TRUE(channel.hasData());\n}\n\nTEST(BufferedChannelTest, releaseOldest) {\n  char sampleData[10] = { 3, 5, 4, 88, 66, 77, 22, 44, 45, 11 };\n  BufferedChannel channel(10, 10);\n  channel.send(sampleData, 10);\n\n  size_t size;\n  void* result = (void*)channel.receive(size);\n\n  EXPECT_FALSE(channel.hasData());\n\n  channel.releaseOldest(result);\n\n  EXPECT_FALSE(channel.hasData());\n}\n\nTEST(BufferedChannelTest, simpleSend) {\n  char sampleData[10] = { 3, 5, 4, 88, 66, 77, 22, 44, 45, 11 };\n  const char* receiveBuffer = NULL;\n\n  BufferedChannel channel(10, 10);\n  channel.send(sampleData, 10);\n\n  size_t size;\n  receiveBuffer = (const char*)channel.receive(size);\n\n  EXPECT_NE((intptr_t)NULL, (intptr_t)receiveBuffer);\n  EXPECT_EQ(10, size);\n\n  for (size_t i = 0; i < size; i++) {\n    EXPECT_EQ(sampleData[i], receiveBuffer[i]);\n  }\n}\n\nTEST(BufferedChannelTest, simpleSendReleaseSend) {\n  char sampleData[10] = { 3, 5, 4, 88, 66, 77, 22, 44, 45, 11 };\n  const char* receiveBuffer = NULL;\n\n  BufferedChannel channel(1, 10);\n  channel.send(sampleData, 10);\n\n  size_t size;\n  receiveBuffer = (const char*)channel.receive(size);\n\n  EXPECT_NE((intptr_t)NULL, (intptr_t)receiveBuffer);\n  EXPECT_EQ(10, size);\n\n  for (size_t i = 0; i < size; i++) {\n    EXPECT_EQ(sampleData[i], receiveBuffer[i]);\n  }\n\n  channel.releaseOldest((void*)receiveBuffer);\n\n  char sampleData2[10] = { 9, 1, 8, 7, 6, 5, 4, 3, 2, 1 };\n  channel.send(sampleData2, 10);\n\n  receiveBuffer = (const char*)channel.receive(size);\n\n  EXPECT_NE((intptr_t)NULL, (intptr_t)receiveBuffer);\n  EXPECT_EQ(10, size);\n\n  for (size_t i = 0; i < size; i++) {\n    EXPECT_EQ(sampleData2[i], receiveBuffer[i]);\n  }\n\n}\n\n# endif // !On_Tilera\n"
  },
  {
    "path": "vm/src/tests/cacheline_alignment.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n# include <stdlib.h>\n# include <gtest/gtest.h>\n\n# include \"cacheline_aligned.h\"\n\nTEST(CacheAligned, OneLine) {\n  ASSERT_EQ(64, CACHELINE_SIZE);\n  ASSERT_EQ(64, sizeof(cacheline_aligned<int>));\n  \n  ASSERT_EQ(64, sizeof(cacheline_aligned<bool>));\n  \n  ASSERT_EQ(64, sizeof(cacheline_aligned<char[4]>));\n}\n\nTEST(CacheAligned, TwoLines) {\n  ASSERT_EQ(64, CACHELINE_SIZE);\n  \n  ASSERT_EQ(72 , sizeof(int64_t[9]));\n  ASSERT_EQ(64 * 2, sizeof(cacheline_aligned<int64_t[9]>));\n  \n  ASSERT_EQ(64 * 2, sizeof(cacheline_aligned<char[65]>));\n}\n\n\nTEST(CacheAligned, ThreeLines) {\n  ASSERT_EQ(64, CACHELINE_SIZE);\n  ASSERT_EQ(64 * 3, sizeof(cacheline_aligned<int64_t[17]>));\n  \n  ASSERT_EQ(64 * 3, sizeof(cacheline_aligned<char[129]>));\n  ASSERT_EQ(64 * 3, sizeof(cacheline_aligned<char[191]>));\n}\n\nTEST(CacheAligned, Arrays) {\n  cacheline_aligned<int> myIntArray[1];\n  ASSERT_EQ(64, sizeof(myIntArray));\n  \n  ASSERT_EQ(64 * 4, sizeof(cacheline_aligned<char>[4]));\n  ASSERT_EQ(64 * 15, sizeof(cacheline_aligned<char>[15]));\n}\n\n"
  },
  {
    "path": "vm/src/tests/external_primitive_table.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    Stefan Marr, Vrije Universiteit Brussel - Initial Implementation\n ******************************************************************************/\n\n\n# include <gtest/gtest.h>\n\n# include \"headers.h\"\n\n/**\n * It is supposed to be filled with NULL on initialization.\n */\nTEST(ExternalPrimitiveTable, Initialization) {\n  External_Primitive_Table* table = new External_Primitive_Table();\n  \n  ASSERT_TRUE(table->size > 0);\n  \n  for (size_t i = 0; i < table->size; i++) {\n    ASSERT_EQ(NULL, table->contents[i]);\n  }\n}\n\n\n/**\n * Make sure that add works as expected\n */\nTEST(ExternalPrimitiveTable, Add) {\n  External_Primitive_Table* table = new External_Primitive_Table();\n  \n  ASSERT_EQ(NULL, table->contents[0]);\n  \n  ASSERT_EQ(1,    table->add((fn_t)4, true));\n  ASSERT_EQ((fn_t)4, table->contents[0]);\n  \n  \n  ASSERT_EQ(2,    table->add((fn_t)17, true));\n  ASSERT_EQ((fn_t)17, table->contents[1]);\n\n  ASSERT_EQ(3,    table->add((fn_t)43, true));\n  ASSERT_EQ((fn_t)43, table->contents[2]);\n\n  \n  ASSERT_EQ(NULL, table->contents[3]);\n}\n\n"
  },
  {
    "path": "vm/src/tests/main.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    Stefan Marr, Vrije Universiteit Brussel - Initial Implementation\n ******************************************************************************/\n\n\n#include <gtest/gtest.h>\n\nint main(int argc, char** argv) {\n\n  ::testing::InitGoogleTest(&argc, argv);\n\n  return RUN_ALL_TESTS();\n}\n\n"
  },
  {
    "path": "vm/src/tests/os_interface.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    Stefan Marr, Vrije Universiteit Brussel - Initial Implementation\n ******************************************************************************/\n\n\n# include <gtest/gtest.h>\n\n# include \"headers.h\"\n\n\n/**\n * Test the semantics of atomic_fetch_and_add\n */\nTEST(OS_Interface, AtomicFetchAndAdd) {\n  int i = 42;\n  \n  \n  ASSERT_EQ(42,     OS_Interface::atomic_fetch_and_add(&i, 4));\n  ASSERT_EQ(42 + 4, i);\n  \n  ASSERT_EQ(42 + 4, OS_Interface::atomic_fetch_and_add(&i, 5));\n  \n  ASSERT_EQ(42 + 4 + 5, i);\n}\n\n\n/**\n * Test the semantics of atomic_compare_and_swap\n */\nTEST(OS_Interface, AtomicCompareAndSwap) {\n  int i = 42;\n  \n  ASSERT_FALSE(OS_Interface::atomic_compare_and_swap(&i, 33, 66));\n  ASSERT_EQ(42, i);  // Remains unchanged on failure\n  \n  ASSERT_TRUE(OS_Interface::atomic_compare_and_swap(&i, 42, 66));\n  ASSERT_EQ(66, i);  // Only changed when old_value == i\n}\n\n\n/**\n * Test the semantics of atomic_compare_and_swap_val\n */\nTEST(OS_Interface, AtomicCompareAndSwapVal) {\n  int i = 42;\n  \n  ASSERT_EQ(42, OS_Interface::atomic_compare_and_swap_val(&i, 33, 66));\n  ASSERT_EQ(42, i);  // Remains unchanged on failure\n  \n  ASSERT_EQ(42, OS_Interface::atomic_compare_and_swap_val(&i, 42, 66));\n  ASSERT_EQ(66, i);  // Only changed when old_value == i\n}\n"
  },
  {
    "path": "vm/src/tests/starter.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    Stefan Marr, Vrije Universiteit Brussel - Initial Implementation\n *\n *  This file encode all necessary helper functionallity to start\n *  threads and make sure they registered on the barriers correctly before\n *  going on in the spawing thread.\n *\n *  This is basically equal to a 'clocked' or 'phased' statement in X10/Habanero. \n *\n ******************************************************************************/\n\n\n// Currently not needed on Tilera STEFAN: 2011-04-17\n# ifndef __tile__\n\n#ifndef __tile__\n  #define _GNU_SOURCE\n#endif\n#include <stdlib.h>\n#include <stdio.h>\n#include <pthread.h>\n\n#include \"starter.h\"\n\n#if defined(__tile__)\n  #include <tmc/cpus.h>\n#else\n//  #include <sys/syscall.h>\n//  #include <sched.h>\n#endif\n\n#include \"starter.h\"\n\nvoid thread_param_init(thread_param_t* const param, starter_t* const starter, int id) {\n  param->starter     = starter;\n  param->id          = id;\n  param->initialized = false;\n  pthread_mutex_init(&param->lock, NULL);\n  pthread_cond_init (&param->cond, NULL);\n}\n\nvoid thread_param_ensure_child_initialization(thread_param_t* const tp) {\n  pthread_mutex_lock(&tp->lock);\n  if (!tp->initialized) {\n    pthread_cond_wait(&tp->cond, &tp->lock);\n  }\n  pthread_mutex_unlock(&tp->lock);\n}\n\nvoid starter_await_initalization_to_finish(starter_t* const starter) {\n  pthread_mutex_lock(&starter->global_init_mtx);\n  \n  if (!starter->init_completed) {\n    pthread_cond_wait(&starter->global_init_sig, &starter->global_init_mtx);\n  }\n  \n  pthread_mutex_unlock(&starter->global_init_mtx);\n}\n\nvoid thread_param_signalAndAwaitInitialization(thread_param_t* const tp) {\n  // signal that this thread has registered with all barriers\n  pthread_mutex_lock(&tp->lock);\n  tp->initialized = true;\n  pthread_cond_broadcast(&tp->cond);\n  pthread_mutex_unlock  (&tp->lock);\n  \n  // synchronize all participants before the actual benchmark\n  starter_await_initalization_to_finish(tp->starter);\n}\n\n\n#ifdef __tile__\nint _find_next_cpu(cpu_set_t* cpus, int* const next_cpu) {\n  (*next_cpu)++;\n  while ((*next_cpu) < TMC_CPUS_MAX_COUNT && !tmc_cpus_has_cpu(cpus, *next_cpu)) {\n    (*next_cpu)++;\n  }\n  \n  return (*next_cpu);\n}\n#endif\n\n\nvoid starter_init(starter_t* const starter, const int numParticipants) {\n  starter->num_participants = numParticipants;\n  starter->init_completed   = false;\n  pthread_mutex_init(&starter->global_init_mtx, NULL);\n  pthread_cond_init (&starter->global_init_sig, NULL);  \n}\n\n\nvoid* _benchmark(void* threadParam) {\n  thread_param_t* param = (thread_param_t*)threadParam;\n  \n  // set affinitiy of this thread\n#if defined(__tile__)\n  // printf(\"Run thread id: %d on tile: %d\\n\", param->id, param->cpu_id);\n  if (tmc_cpus_set_my_cpu(param->cpu_id) != 0) {\n    perror(\"tmc_cpus_set_my_cpu(..) failed\\n\");\n    exit(1);\n  }\n#elif false\n  cpu_set_t affinity_mask;\n  CPU_ZERO(&affinity_mask);\n  CPU_SET(param->cpu_id, &affinity_mask);\n  \n  if (pthread_setaffinity_np(pthread_self(), sizeof(affinity_mask), &affinity_mask) < 0) {\n  //if (sched_setaffinity(syscall(SYS_gettid) /* gettid() */, sizeof(affinity_mask), &affinity_mask) < 0) { //stefan changed getpid to gettid, without testing\n    perror(\"Failed to set affinity\");\n    abort();\n  }\n#endif\n  \n  // execute\n  (param->func)(param);\n  \n  free(param);\n  pthread_exit(NULL);\n}\n\n\nvoid starter_spawn_threads(starter_t* const starter, void (*func)(thread_param_t*), pthread_t* threads) {\n  // on the tilera we can set the thread affinity, but we need some infos for that\n  int next_cpu = -1;  // to make sure the first found cpu has id 0\n#ifdef __tile__\n  cpu_set_t cpus;\n  if (tmc_cpus_get_online_cpus(&cpus)) {\n    perror(\"tmc_cpus_get_online_cpus failed\\n\");\n    exit(1);\n  }\n  \n  _find_next_cpu(&cpus, &next_cpu);  //should be 0 or something else if that tile is not available to linux\n  \n  // printf(\"Run main thread on tile id: %d\\n\", next_cpu);\n  // now set the current thread to the right CPU\n  if (tmc_cpus_set_my_cpu(next_cpu) != 0) {\n    perror(\"tmc_cpus_set_my_cpu(..) failed\\n\");\n    exit(1);\n  }\n#endif\n  int i;\n  for (i = 0; i < starter->num_participants; i++) {\n    thread_param_t* param = (thread_param_t*)malloc(sizeof(thread_param_t));\n    thread_param_init(param, starter, i);\n    param->func = func;\n    \n#if defined(__tile__)\n    // find a cpu and give it to the new thread\n    param->cpu_id = _find_next_cpu(&cpus, &next_cpu);\n#else\n    next_cpu++;\n    param->cpu_id = next_cpu;\n#endif\n    \n    const int rc = pthread_create(&threads[i], NULL, \n                                  _benchmark,\n                                  (void*)param);\n    \n    if (rc){\n      printf(\"ERROR; return code from pthread_create() is %d\\n\", rc);\n      exit(-1);\n    }\n    \n    // make sure the spawned thread registerd on the barrier\n    thread_param_ensure_child_initialization(param);\n  }\n}\n\n/**\n * To be called from the managing thread to conclude initialization globally\n */\nvoid starter_signal_initalization_finished(starter_t* const starter) {\n  pthread_mutex_lock    (&starter->global_init_mtx);\n  pthread_cond_broadcast(&starter->global_init_sig);\n  pthread_mutex_unlock  (&starter->global_init_mtx);\n}\n\n# endif // # ifndef __tile__\n"
  },
  {
    "path": "vm/src/tests/starter.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    Stefan Marr, Vrije Universiteit Brussel - Initial Implementation\n *\n *  This file encode all necessary helper functionallity to start\n *  threads and make sure they registered on the barriers correctly before\n *  going on in the spawing thread.\n *\n *  This is basically equal to a 'clocked' or 'phased' statement in X10/Habanero. \n *\n ******************************************************************************/\n\n\n#ifndef __STARTER_H__\n#define __STARTER_H__\n\n#include <pthread.h>\n//#include <misc/misc.h>\n\n\n//#include <stdlib.h>\n//#include <stdio.h>\n//#include <barriers/barrier.h>\n\ntypedef struct starter_t {\n  int num_participants;\n  volatile bool init_completed;\n  pthread_mutex_t global_init_mtx;\n  pthread_cond_t  global_init_sig;\n} starter_t;\n\ntypedef struct thread_param_t {\n  starter_t* starter;\n  int        id;\n  void      (*func)(struct thread_param_t*);\n  int        cpu_id;  // only used on tilera at the moment\n  pthread_mutex_t lock;\n  pthread_cond_t  cond;\n  volatile bool initialized;\n} thread_param_t;\n\nvoid thread_param_init(thread_param_t* const param, starter_t* const starter, int id);\nvoid thread_param_ensure_child_initialization(thread_param_t* const tp);\nvoid thread_param_signalAndAwaitInitialization(thread_param_t* const tp);\n\nvoid starter_init(starter_t* const starter, const int numParticipants);\nvoid starter_await_initalization_to_finish(starter_t* const starter);\nvoid starter_spawn_threads(starter_t* const starter, void (*func)(thread_param_t*), pthread_t* threads);\n\n/**\n * To be called from the managing thread to conclude initialization globally\n */\nvoid starter_signal_initalization_finished(starter_t* const starter);\n\n#endif\n\n"
  },
  {
    "path": "vm/src/tests/synced_queue.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    Stefan Marr, Vrije Universiteit Brussel - Initial Implementation\n ******************************************************************************/\n\n\n# if !On_Tilera\n\n#include \"synced_queue.h\"\n\n#include <gtest/gtest.h>\n\nvoid _initBufferWithNumberSequence(int32_t* buffer, size_t size) {\n  for (size_t i = 0; i < size; i++) {\n    buffer[i] = i;\n  }\n}\n\nTEST(SyncedQueue, Init) {\n  syncedqueue sq = { 0 }; // init with 0 to allow proper check of initialization\n  int32_t buffer[10];\n\n  EXPECT_FALSE(syncedqueue_is_initialized(&sq));\n\n  syncedqueue_initialize(&sq, buffer, 10);\n\n  EXPECT_TRUE(syncedqueue_is_initialized(&sq));\n}\n\nTEST(SyncedQueue, SimpleEnqueueDequeue) {\n  syncedqueue sq = { 0 }; // init with 0 to allow proper check of initialization\n  int32_t buffer[10];\n  syncedqueue_initialize(&sq, buffer, 10);\n  _initBufferWithNumberSequence(buffer, 10);\n\n  int32_t sample[4] = { 42, 21, 11, 4 };\n\n  syncedqueue_enqueue(&sq, sample, 4);\n\n  // implementation specific, but I like to check that it works already here\n  for (size_t i = 0; i < 4; i++) {\n    EXPECT_EQ(sample[i], buffer[i]);\n  }\n\n  int32_t dequeuedSample[4] = { 0 };\n\n  syncedqueue_dequeue(&sq, dequeuedSample, 4);\n\n  for (size_t i = 0; i < 4; i++) {\n    EXPECT_EQ(sample[i], dequeuedSample[i]);\n  }\n}\n\nTEST(SyncedQueue, IsEmpty) {\n  syncedqueue sq = { 0 }; // init with 0 to allow proper check of initialization\n  int32_t buffer[10] = { 0 };\n\n  syncedqueue_initialize(&sq, buffer, 10);\n  EXPECT_TRUE(syncedqueue_is_empty(&sq));\n\n  int32_t sample[4] = { 0 };\n  syncedqueue_enqueue(&sq, sample, 4);\n  EXPECT_FALSE(syncedqueue_is_empty(&sq));\n\n  int32_t dequeuedSample[4] = { 0 };\n  syncedqueue_dequeue(&sq, dequeuedSample, 4);\n  EXPECT_TRUE(syncedqueue_is_empty(&sq));\n}\n\nTEST(SyncedQueue, SubsequentEnqueueDequeue) {\n  syncedqueue sq = { 0 }; // init with 0 to allow proper check of initialization\n  int32_t buffer[10];\n  syncedqueue_initialize(&sq, buffer, 10);\n  _initBufferWithNumberSequence(buffer, 10);\n\n  int32_t sample[5] = { 42, 21, 11, 4, 754 };\n  syncedqueue_enqueue(&sq, sample, 5);\n  // implementation specific, but I like to check that it works already here\n  for (size_t i = 0; i < 5; i++) {\n    EXPECT_EQ(sample[i], buffer[i]);\n  }\n\n  int32_t sample2[5] = { 55, 66, 77, 88, 99 };\n  syncedqueue_enqueue(&sq, sample2, 5);\n  for (size_t i = 0; i < 5; i++) {\n    EXPECT_EQ(sample2[i], buffer[i + 5]);\n  }\n\n  int32_t dequeuedSample[5] = { 0 };\n  syncedqueue_dequeue(&sq, dequeuedSample, 5);\n  for (size_t i = 0; i < 5; i++) {\n    EXPECT_EQ(sample[i], dequeuedSample[i]);\n  }\n\n  int32_t sample3[5] = { 7, 8, 9, 0, 1 };\n  syncedqueue_enqueue(&sq, sample3, 5);\n  for (size_t i = 0; i < 5; i++) {\n    EXPECT_EQ(sample3[i], buffer[i]);\n  }\n\n  // second time\n  syncedqueue_dequeue(&sq, dequeuedSample, 5);\n  for (size_t i = 0; i < 5; i++) {\n    EXPECT_EQ(sample2[i], dequeuedSample[i]);\n  }\n\n  // 3rd time\n  syncedqueue_dequeue(&sq, dequeuedSample, 5);\n  for (size_t i = 0; i < 5; i++) {\n    EXPECT_EQ(sample3[i], dequeuedSample[i]);\n  }\n\n}\n\nTEST(SyncedQueue, WrappingEnqueueDequeue) {\n  syncedqueue sq = { 0 }; // init with 0 to allow proper check of initialization\n  int32_t buffer[10];\n  syncedqueue_initialize(&sq, buffer, 10);\n  _initBufferWithNumberSequence(buffer, 10);\n\n  int32_t sample[7] = { 42, 21, 11, 4, 754, 33, 21 };\n  syncedqueue_enqueue(&sq, sample, 7);\n  for (size_t i = 0; i < 7; i++) {\n    EXPECT_EQ(sample[i], buffer[i]);\n  }\n\n  int32_t dequeuedSample[10] = { 0 };\n  syncedqueue_dequeue(&sq, dequeuedSample, 7);\n  for (size_t i = 0; i < 7; i++) {\n    EXPECT_EQ(sample[i], dequeuedSample[i]);\n  }\n\n  int32_t sample2[5] = { 77, 88, 99, -1, 11 };\n  syncedqueue_enqueue(&sq, sample2, 5);\n  EXPECT_EQ(sample2[0], buffer[7]);\n  EXPECT_EQ(sample2[1], buffer[8]);\n  EXPECT_EQ(sample2[2], buffer[9]);\n  EXPECT_EQ(sample2[3], buffer[0]);\n  EXPECT_EQ(sample2[4], buffer[1]);\n\n  syncedqueue_dequeue(&sq, dequeuedSample, 5);\n  for (size_t i = 0; i < 5; i++) {\n    EXPECT_EQ(sample2[i], dequeuedSample[i]);\n  }\n}\n\n# endif // !On_Tilera\n\n"
  },
  {
    "path": "vm/src/tests/synced_queue_threaded.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    Stefan Marr, Vrije Universiteit Brussel - Initial Implementation\n ******************************************************************************/\n\n\n# if !On_Tilera\n\n#include <gtest/gtest.h>\n#include <limits.h>\n\n#include \"synced_queue.h\"\n#include \"starter.h\"\n\nsyncedqueue sq = { 0 }; // init with 0 to allow proper check of initialization\n\nconst int NUM_PRODUCERS = 2;\nconst int64_t NUM_ITEMS     = int64_t(USHRT_MAX) * 1024 * 1024;\nconst int BUF_SIZE      = USHRT_MAX;//NUM_ITEMS * NUM_PRODUCERS;\nconst int HISTORY       = NUM_PRODUCERS * 1024;\n\nvoid _procuderThread(thread_param_t* const tp) {\n  thread_param_signalAndAwaitInitialization(tp);\n  \n  for (int64_t i = tp->id * NUM_ITEMS; i < (tp->id + 1) * NUM_ITEMS; i++) {\n    int32_t val = (int32_t)i;\n    syncedqueue_enqueue(&sq, &val, 1);\n  }\n}\n\n\nTEST(SyncedQueueThreaded, DISABLED_Pressure) {\n  int32_t buffer[BUF_SIZE];\n  syncedqueue_initialize(&sq, buffer, BUF_SIZE);\n  EXPECT_TRUE(syncedqueue_is_initialized(&sq));\n  \n  starter_t starter;\n  starter_init(&starter, NUM_PRODUCERS);\n  \n  pthread_t threads[NUM_PRODUCERS];\n  \n  starter_spawn_threads(&starter, _procuderThread, (pthread_t*)&threads);\n  \n  starter_signal_initalization_finished(&starter);\n  \n  int32_t last_items[HISTORY] = { -1 };\n  int64_t remaining_items = NUM_ITEMS * NUM_PRODUCERS;\n  int32_t history_current = 0;\n  int32_t history_count   = 0;\n  \n  while (remaining_items > 0) {\n    // read the item\n    int32_t val;\n    syncedqueue_dequeue(&sq, &val, 1);\n\n    // determine whether there are any duplicates in the history\n    for (size_t i = 0; i < history_count; i++) {\n      EXPECT_NE(last_items[i], val);\n      if (last_items[i] == val) {\n        printf(\"Expect failed: hC: %d, i: %lu, remaining: %lld\\n\", history_count, i, remaining_items);\n      }\n    }\n    \n    // place it in the history\n    last_items[history_current] = val;\n    history_count   = std::min(history_count + 1, HISTORY);\n    history_current = (history_current + 1) % HISTORY;\n\n    remaining_items--;\n  }\n}\n\n# endif // !On_Tilera\n"
  },
  {
    "path": "vm/src/tests/test_os_interface.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n\n#include <pthread.h>\n\n# define Max_Number_Of_Cores 64\n\n/**\n * A simplified version of the OS_Interface used in the RoarVM.\n * It provides only functionallity required by tests.\n *\n * It is defined here as the standard OS_Interface for tests.\n */\n\n/** STEFAN: Not used anymore. We are now using the OS_Interface implementation \n            directly. (2011-04-17) */\n\nclass Test_OS_Interface {\npublic:\n  \n  typedef pthread_mutex_t Mutex;\n  \n  static inline void mutex_init(Mutex* mutex, const pthread_mutexattr_t* attr = NULL) {\n    pthread_mutex_init(mutex, attr);\n  }\n  \n  static inline void mutex_destruct(Mutex* mutex) {\n    pthread_mutex_destroy(mutex);\n  }\n  \n  static inline int mutex_lock(Mutex* mutex) {\n    return pthread_mutex_lock(mutex);\n  }\n  \n  static inline bool mutex_trylock(Mutex* mutex) {\n    return 0 == pthread_mutex_trylock(mutex);\n  }\n  \n  static inline int mutex_unlock(Mutex* mutex) {\n    return pthread_mutex_unlock(mutex);\n  }\n\n  static inline int atomic_fetch_and_add(int* mem, int increment) {\n    return __sync_fetch_and_add(mem, increment);\n  }\n  \n};\n\n"
  },
  {
    "path": "vm/src/tests/tracked_ptr.cpp",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    Stefan Marr, Vrije Universiteit Brussel - Initial Implementation\n ******************************************************************************/\n\n\n# if !On_Tilera\n\n# define Track_OnStackPointer 1  /* Enforce this here for the tests */\n\n# include <gtest/gtest.h>\n\n# include \"headers.h\"\n\n\n/** A simple class used in the tests **/\nclass MyClass {\npublic:\n  int foo() { return 42; }\n};\n\n/**\n * Test the simplest use case that a pointer was used in\n * a scope, gets properly registered, and then also properly\n * cleaned up from the registery after it is not used anymore.\n */\nTEST(TrackedPointer, DirectUse) {\n  int i = 42;\n  \n  // nothing done yet, so the pointer should not be registered\n  ASSERT_EQ(0u, tracked_ptr<int>::pointers_on_stack());\n  \n  { // open new scope for the test\n    tracked_ptr<int> i_p(&i);\n    ASSERT_EQ(42, *i_p);\n    \n    // now the pointer is registered and valid for use\n    ASSERT_EQ(1u, tracked_ptr<int>::pointers_on_stack());\n    ASSERT_TRUE(i_p.is_valid());\n  }\n  \n  // after closing the scope, everything should be cleaned up\n  ASSERT_EQ(0u, tracked_ptr<int>::pointers_on_stack());\n}\n\n/**\n * Similar to the test before, but this time invalidate\n * all pointers in-between.\n */\nTEST(TrackedPointer, DirectUseInvalidationInBetween) {\n  int i = 42;\n  \n  ASSERT_EQ(0u, tracked_ptr<int>::pointers_on_stack());\n  \n  { // open new scope for the test\n    tracked_ptr<int> i_p(&i);\n    ASSERT_EQ(42, *i_p);\n    \n    // now the pointer is registered and valid for use\n    ASSERT_EQ(1u, tracked_ptr<int>::pointers_on_stack());\n    ASSERT_TRUE(i_p.is_valid());\n    \n    tracked_ptr<int>::invalidate_all_pointer();\n    \n    // now the pointer is invalidated and should not be used anymore\n    ASSERT_EQ(1u, tracked_ptr<int>::pointers_on_stack());\n    ASSERT_FALSE(i_p.is_valid());\n  }\n  \n  // after closing the scope, everything should be cleaned up\n  ASSERT_EQ(0u, tracked_ptr<int>::pointers_on_stack());\n}\n\n/**\n * Allow invalid pointers that are still on the stack\n */\nTEST(TrackedPointer, InvalidationThenDestruction) {\n  int i = 42;\n  \n  { // open new scope for the test\n    tracked_ptr<int> i_p(&i);\n    ASSERT_EQ(42, *i_p);\n    \n    ASSERT_TRUE(i_p.is_valid());\n    \n    tracked_ptr<int>::invalidate_all_pointer();\n    \n    ASSERT_EQ(1u, tracked_ptr<int>::pointers_on_stack());\n    ASSERT_FALSE(i_p.is_valid());\n  }\n\n  ASSERT_EQ(0u, tracked_ptr<int>::pointers_on_stack());\n  \n  // Ensure subsequent use is still possible\n  \n  { // open new scope for the test\n    tracked_ptr<int> i_p(&i);\n    ASSERT_EQ(42, *i_p);\n    \n    ASSERT_TRUE(i_p.is_valid());\n    \n    tracked_ptr<int>::invalidate_all_pointer();\n    \n    ASSERT_EQ(1u, tracked_ptr<int>::pointers_on_stack());\n    ASSERT_FALSE(i_p.is_valid());\n  }\n  \n  \n  // after closing the scope, everything should be cleaned up\n  ASSERT_EQ(0u, tracked_ptr<int>::pointers_on_stack());\n}\n\n/**\n * The subsequent creation of a new valid pointer to the same\n * object needs to be allowed.\n */\nTEST(TrackedPointer, CleanSeparationBetweenTrackedPointers) {\n  int i = 42;\n  \n  { // open new scope for the test\n    tracked_ptr<int> i_p(&i);\n    ASSERT_EQ(42, *i_p);\n    \n    ASSERT_TRUE(i_p.is_valid());\n    \n    tracked_ptr<int>::invalidate_all_pointer();\n    \n    // now that one is invalid, however, we can obtain a new one\n    ASSERT_EQ(1u, tracked_ptr<int>::pointers_on_stack());\n    ASSERT_FALSE(i_p.is_valid());\n    \n    \n    // obtain a new one\n    tracked_ptr<int> i_p2(&i);\n    ASSERT_EQ(42, *i_p2);\n    \n    ASSERT_TRUE(i_p2.is_valid());\n    ASSERT_FALSE(i_p.is_valid()); // the old is unchanged\n    \n    // and both are still tracked\n    ASSERT_EQ(2u, tracked_ptr<int>::pointers_on_stack()); \n    \n    tracked_ptr<int>::invalidate_all_pointer();\n    \n    // now both need to be invalid\n    ASSERT_FALSE(i_p.is_valid());\n    ASSERT_FALSE(i_p2.is_valid());\n    \n    // and both are still tracked\n    ASSERT_EQ(2u, tracked_ptr<int>::pointers_on_stack()); \n  }\n  \n  // after closing the scope, everything should be cleaned up\n  ASSERT_EQ(0u, tracked_ptr<int>::pointers_on_stack());\n}\n\n\n/**\n * Make sure the use of an invalid pointer triggers an error.\n */\nTEST(TrackedPointer, InvalidUseTriggersErrorArrow) {\n  MyClass* bar = new MyClass();\n  \n  { // open new scope for the test\n    tracked_ptr<MyClass> bar_p(bar);\n    ASSERT_EQ(42, bar_p->foo());\n        \n    tracked_ptr<MyClass>::invalidate_all_pointer();\n    \n    ASSERT_DEATH(bar_p->foo(), \"\");\n  }\n  \n  delete bar;\n}\n\n/**\n * Make sure the use of an invalid pointer triggers an error.\n */\nTEST(TrackedPointer, InvalidUseTriggersErrorStar) {\n  MyClass* bar = new MyClass();\n  \n  { // open new scope for the test\n    tracked_ptr<MyClass> bar_p(bar);\n    ASSERT_EQ(42, bar_p->foo());\n    \n    tracked_ptr<MyClass>::invalidate_all_pointer();\n    \n    ASSERT_DEATH((*bar_p).foo(), \"\");\n  }\n  \n  delete bar;\n}\n\n/**\n * Testing the assignment semantics, it has to be possible to pass on\n * the tracked_ptr between variables without losing its semantics.\n */\nTEST(TrackedPointer, AssignmentSemantics) {\n  // make sure everything is clean\n  EXPECT_EQ(0u, tracked_ptr<MyClass>::pointers_on_stack());\n  EXPECT_EQ(0u, tracked_ptr<int>::pointers_on_stack());\n  \n  MyClass* bar = new MyClass();\n  \n  // this one is not yet initialized, but it already gets registered\n  tracked_ptr<MyClass> bar_p;\n  \n  EXPECT_EQ(1u, tracked_ptr<MyClass>::pointers_on_stack());\n  EXPECT_FALSE(bar_p.is_valid()); // not initialize so it should also be invalid\n  \n  // now for convinence, we just assign the pointer, and it should be converted\n  // implicitly\n  bar_p = bar;\n  EXPECT_EQ(1u, tracked_ptr<MyClass>::pointers_on_stack());\n  \n  { // open new scope for the test\n    \n    // have a second pointer, this one should be tracked separatly I think (?)\n    tracked_ptr<MyClass> bar_p2 = bar_p;\n    EXPECT_EQ(2u, tracked_ptr<MyClass>::pointers_on_stack());\n    EXPECT_TRUE(bar_p2.is_valid());\n    \n  } // and we clean things up immediately \n  EXPECT_EQ(1u, tracked_ptr<MyClass>::pointers_on_stack()); \n  \n  EXPECT_TRUE(bar_p.is_valid()); // nothing should have invalidated it\n  \n  // lets do the same again\n  { // open new scope for the test\n    \n    // have a second tracked pointer\n    tracked_ptr<MyClass> bar_p2 = bar_p;\n    EXPECT_EQ(2u, tracked_ptr<MyClass>::pointers_on_stack());\n    EXPECT_TRUE(bar_p2.is_valid());\n    \n    // but now we invalidate everything\n    tracked_ptr<MyClass>::invalidate_all_pointer();\n    \n    EXPECT_FALSE(bar_p.is_valid());\n    EXPECT_FALSE(bar_p2.is_valid());\n  } // and we clean things up immediately \n  EXPECT_EQ(1u, tracked_ptr<MyClass>::pointers_on_stack()); \n  \n  EXPECT_FALSE(bar_p.is_valid());\n  \n  // however, when we obtain a new one that should be fine again\n  bar_p = bar;\n  EXPECT_TRUE(bar_p.is_valid());\n  \n  // but still only a single object\n  EXPECT_EQ(1u, tracked_ptr<MyClass>::pointers_on_stack()); \n  \n  delete bar;\n}\n\n\n/**\n * Testing the assignment semantics, the first test was passing\n * stuff up the stack, don't know whether it makes a lot difference,\n * but just to be sure, lets test the other direction.\n */\nTEST(TrackedPointer, AssignmentSemantics2) {\n  // make sure everything is clean\n  EXPECT_EQ(0u, tracked_ptr<MyClass>::pointers_on_stack());\n  EXPECT_EQ(0u, tracked_ptr<int>::pointers_on_stack());\n  \n  MyClass* bar = new MyClass();\n  \n  // this one is not yet initialized\n  tracked_ptr<MyClass> bar_p;\n  \n  EXPECT_EQ(1u, tracked_ptr<MyClass>::pointers_on_stack());\n  EXPECT_FALSE(bar_p.is_valid()); // not initialize so it should be invalid\n  \n  { // open new scope for the test\n    \n    // have a second tracked pointer\n    tracked_ptr<MyClass> bar_p2(bar);\n    EXPECT_EQ(2u, tracked_ptr<MyClass>::pointers_on_stack());\n    EXPECT_TRUE(bar_p2.is_valid());\n    \n    // now pass it back to the first one\n    bar_p = bar_p2;\n    EXPECT_EQ(2u, tracked_ptr<MyClass>::pointers_on_stack());\n    EXPECT_TRUE(bar_p.is_valid());\n  } // and we clean things up immediately \n  EXPECT_EQ(1u, tracked_ptr<MyClass>::pointers_on_stack()); \n  \n  EXPECT_TRUE(bar_p.is_valid()); // nothing should have invalidated it\n    \n  delete bar;\n}\n\n\n/**\n * Bascially a compilation test, to ensure that the interfaces\n * are correct and tracked_ptr<T> can be used substituting T*\n */\nTEST(TrackedPointer, DesignTest) {\n  MyClass* bar = new MyClass();\n\n  EXPECT_EQ(42, bar->foo());\n  EXPECT_EQ(42, (*bar).foo());\n  \n  tracked_ptr<MyClass> bar_p(bar);\n  \n  ASSERT_EQ(42, bar_p->foo());\n  ASSERT_EQ(42, (*bar_p).foo());\n  \n  // Can I get the wrapped pointer out of the address in the same way\n  // I can get it from a standard pointer?\n  ASSERT_EQ(&(*bar), &(*bar_p));\n  ASSERT_EQ(&(*bar), bar);\n  ASSERT_EQ(&(*bar_p), bar);\n  ASSERT_TRUE(&(*bar_p) == bar);\n  \n  delete bar;\n}\n\n/**\n * Two tracked_ptr compared for equality with each other should be equal\n * if the wrapped pointer are equal.\n * They should be different, when their wrapped pointer are different.\n *\n * REM: This is no < or > comparison, since this is needed in the contain\n *      i.e. in the registry we are currently using...\n */\nTEST(TrackedPointer, Equality) {\n  MyClass* bar = new MyClass();\n  MyClass* foo = new MyClass();\n  \n  // two wrapper for the same pointer\n  tracked_ptr<MyClass> bar_p(bar);\n  tracked_ptr<MyClass> bar_p2(bar);\n  \n  // a wrapper for another pointer\n  tracked_ptr<MyClass> foo_p(foo);\n  \n  // this is the basic assumption, independent of any test-framework specifics\n  ASSERT_TRUE (bar_p == bar_p2);\n  ASSERT_FALSE(bar_p != bar_p2);\n  \n  ASSERT_FALSE(bar_p == foo_p);\n  ASSERT_TRUE (bar_p != foo_p);\n  \n  // the EQ and NE macros introduce const quantifiers a long the way\n  // so that has to work, too.\n  ASSERT_EQ(bar_p, bar_p2);\n  ASSERT_NE(bar_p, foo_p);\n  \n  delete bar;\n  delete foo;\n}\n\n/**\n * A tracked_ptr compared with T or void* for equality with each other should be equal\n * if the pointer are equal.\n * They should be different, when their pointer are different.\n *\n * REM: This is no < or > comparison, since this is needed in the contain\n *      i.e. in the registry we are currently using...\n */\nTEST(TrackedPointer, EqualityWithPointer) {\n  MyClass* bar = new MyClass();\n  MyClass* foo = new MyClass();\n  \n  tracked_ptr<MyClass> bar_p(bar);\n  \n  // a wrapper for another pointer\n  tracked_ptr<MyClass> foo_p(foo);\n  \n  // this is the basic assumption, independent of any test-framework specifics\n  ASSERT_TRUE (bar_p == bar);\n  ASSERT_FALSE(bar_p != bar);  \n  ASSERT_FALSE(bar_p == foo);\n  ASSERT_TRUE (bar_p != foo_p);\n  \n  // the EQ and NE macros introduce const quantifiers a long the way\n  // so that has to work, too.\n  ASSERT_EQ(bar_p, bar);\n  ASSERT_NE(bar_p, foo);\n  ASSERT_EQ(foo_p, foo);\n  ASSERT_NE(foo_p, bar);\n  \n  // and now make sure everything works with a void* and NULL, too\n  //void* bar_v = bar;\n\n  //ASSERT_EQ(bar_p, bar_v);\n  ASSERT_NE(bar_p, NULL);\n  //ASSERT_NE(foo_p, bar_v);\n\n  foo_p = NULL;\n  ASSERT_EQ(foo_p, NULL);\n  \n  delete bar;\n  delete foo;\n}\n\n/**\n * The getter function \n */\nTEST(TrackedPointer, Getter) {\n  MyClass* bar = new MyClass();\n  MyClass* foo = new MyClass();\n  \n  // two wrapper for the same pointer\n  tracked_ptr<MyClass> bar_p(bar);\n  tracked_ptr<MyClass> bar_p2(bar);\n  \n  // a wrapper for another pointer\n  tracked_ptr<MyClass> foo_p(foo);\n  \n  ASSERT_EQ(bar, bar_p.get());\n  ASSERT_EQ(bar, bar_p2.get());\n  \n  ASSERT_EQ(foo, foo_p.get());\n  \n  delete bar;\n  delete foo;\n}\n\n/**\n * This should implicitly lead to an error most of the time,\n * but make sure it also errors explicitly. Fail Early!\n */\nTEST(TrackedPointer, NullPointerAreInvalidForDeref) {\n  MyClass* bar = NULL;\n\n  tracked_ptr<MyClass> bar_p(bar);\n\n  ASSERT_DEATH((*bar_p).foo(), \"\");\n  \n  ASSERT_DEATH(bar_p->foo(), \"\");\n    \n  delete bar;\n}\n\n/**\n * Comparison with boolean should work equally as with its pointer.\n * The question is, should I take validity into account?\n * I think, yes.\n */\nTEST(TrackedPointer, ComparisonWithBoolean) {\n  MyClass* bar = new MyClass();\n  \n  tracked_ptr<MyClass> bar_p(bar);\n  tracked_ptr<MyClass> bar_p2;\n  \n  // the simple one with AND\n  ASSERT_TRUE(true && bar);    // that is what is expected\n  ASSERT_TRUE(true && bar_p);\n  \n  // ok, invalidate the pointer\n  tracked_ptr<MyClass>::invalidate_all_pointer();\n  \n  EXPECT_FALSE(bar_p.is_valid());\n  ASSERT_FALSE(true && bar_p);\n  \n  // make a new one that is valid\n  bar_p = bar;\n  EXPECT_TRUE(bar_p.is_valid());\n  \n  // try it with an assignment, its one of the use-cases in RoarVM\n  ASSERT_TRUE(true && (bar_p2 = bar_p));\n  \n  // and just to make sure that the false case is covered as well\n  bar_p = NULL;\n  ASSERT_FALSE(true && bar_p);\n  \n  delete bar;\n}\n\n/**\n * Ensure that the short-circuiting of && works properly.\n */\ntracked_ptr<MyClass> _helperThatShouldBeNeverCalled(bool& wasNeverCalled, MyClass* bar) {\n  wasNeverCalled = false;\n  return tracked_ptr<MyClass>(bar);\n}\nbool _helperThatShouldBeCalledAlways(bool& wasCalled) {\n  wasCalled = true;\n  return false;\n}\nTEST(TrackedPointer, ShortCircuiting) {\n  MyClass* bar = new MyClass();\n  \n  bool shouldStayTrue = true;\n  bool shouldBecomeTrue = false;\n  \n  bool testResult = _helperThatShouldBeCalledAlways(shouldBecomeTrue) && _helperThatShouldBeNeverCalled(shouldStayTrue, bar);\n  ASSERT_FALSE(testResult);\n  ASSERT_TRUE(shouldStayTrue);\n  ASSERT_TRUE(shouldBecomeTrue);\n}\n\n/**\n * Do casts do the right thing?\n */\nTEST(TrackedPointer, Casts) {\n  MyClass* bar = new MyClass();\n  \n  tracked_ptr<MyClass> bar_p = (tracked_ptr<MyClass>)bar;\n  \n  ASSERT_EQ(bar_p, bar);\n  ASSERT_NE(bar_p, (tracked_ptr<MyClass>)NULL);\n  \n  ASSERT_EQ(1u, tracked_ptr<MyClass>::pointers_on_stack());\n}\n\n/**\n * The ternary operator should convert the tracked pointer to a bool.\n */ \nTEST(TrackedPointer, TernaryOperator) {\n  MyClass* bar = new MyClass();\n  \n  tracked_ptr<MyClass> bar_p = (tracked_ptr<MyClass>)bar;\n  \n  ASSERT_TRUE(bar_p ? true : false);\n  \n  bar_p = NULL;\n  ASSERT_FALSE(bar_p ? true : false);\n}\n\nTEST(TrackedPointer, ReferenceOperator) {\n  // compiler check\n  int i = 0;\n  int* i_p = &i;\n  // compiler check done\n  \n  MyClass* bar = new MyClass();\n  \n  tracked_ptr<MyClass> bar_p = (tracked_ptr<MyClass>)bar;\n  MyClass* const * bar_pp;\n  \n  ASSERT_DEATH(bar_pp = &bar_p, \"\");  //We want that to fail for the moment!\n  \n  // REM: if we don't want it to fail, then the following should hold:\n  //  ASSERT_EQ(*bar_pp, bar);\n  //  ASSERT_NE((MyClass*)NULL, bar);\n}\n\nTEST(TrackedPointer, CastVoidP) {\n  MyClass* bar = new MyClass();\n  \n  tracked_ptr<MyClass> bar_p = (tracked_ptr<MyClass>)bar;\n  void* bar_v = (void*)bar_p;\n  \n  ASSERT_EQ(bar_v, bar);\n  ASSERT_NE((void*)NULL, bar_v);\n}\n\nTEST(TrackedPointer, CastToContainedPointer) {\n  MyClass* bar = new MyClass();\n  \n  tracked_ptr<MyClass> bar_p = (tracked_ptr<MyClass>)bar;\n  MyClass* bar2 = (MyClass*)bar_p;\n  MyClass* bar3 = bar_p;\n  \n  \n  ASSERT_EQ(bar2, bar);\n  ASSERT_NE((MyClass*)NULL, bar2);\n}\n\n/**\n * It should be possible to catch somehow the invalidation of ``this``\n * during a method call.\n */\nclass InvalidationDuringCall {\npublic:\n  volatile bool testField1;\n  volatile bool testField2;\n  \n  InvalidationDuringCall() : testField1(true), testField2(true) {}\n  \n  void someMethodChangingFields() {\n    testField1 = !testField1 or testField2;\n    this->testField2 = !this->testField2;\n  }\n  \n  void somethingComplexWhichWillProvokeInvalidationInTheMiddle() {\n    testField1 = true; // that should work with a valid this\n    \n    tracked_ptr<InvalidationDuringCall>::invalidate_all_pointer();\n    \n    // well, and that should fail. Not sure yet how to achieve that\n    testField2 = true;\n  }\n  \n  inline InvalidationDuringCall* operator-> () {\n    return this;\n  }\n};\n// currently diabled since it does not seem to be possible to capture this and \n// do magic with it in the method body\nTEST(TrackedPointer, DISABLED_InvalidationDuringCall) {\n  tracked_ptr<InvalidationDuringCall> t = (tracked_ptr<InvalidationDuringCall>)new InvalidationDuringCall();\n  \n  t->someMethodChangingFields();\n  t->somethingComplexWhichWillProvokeInvalidationInTheMiddle();\n  t->someMethodChangingFields();\n}\n\n# endif // !On_Tilera\n\n"
  },
  {
    "path": "vm/src/types/types.h",
    "content": "/******************************************************************************\n *  Copyright (c) 2008 - 2010 IBM Corporation and others.\n *  All rights reserved. This program and the accompanying materials\n *  are made available under the terms of the Eclipse Public License v1.0\n *  which accompanies this distribution, and is available at\n *  http://www.eclipse.org/legal/epl-v10.html\n * \n *  Contributors:\n *    David Ungar, IBM Research - Initial Implementation\n *    Sam Adams, IBM Research - Initial Implementation\n *    Stefan Marr, Vrije Universiteit Brussel - Port to x86 Multi-Core Systems\n ******************************************************************************/\n\n# ifndef __ROARVM_TYPES__\n# define __ROARVM_TYPES__\n\ntypedef long int      int32;\ntypedef long long int int64;\ntypedef short int     int16;\n\ntypedef unsigned int           u_int1;   // used for 1-bit fields, Tilera compiler complains if its not unsigned\ntypedef unsigned long int      u_int32;\ntypedef unsigned long long int u_int64;\n\ntypedef unsigned char u_char;\n\ntypedef   int32   oop_int_t;\ntypedef u_int32 u_oop_int_t;\n\n# ifdef __cplusplus\n\ntypedef void* (*fn_t)(...);\n\n\nclass Object;\nclass Chunk;\nclass Abstract_Mark_Sweep_Collector;\nclass Squeak_Image_Reader;\nclass Squeak_Interpreter;\n\nclass typedefs {\n public:\n  static void check_typedefs() {\n    assert_eq(sizeof(u_int32), 4, \"\");\n    assert_eq(sizeof(int32), 4, \"\");\n    assert_eq(sizeof(int16), 2, \"\");\n    assert_eq(sizeof(int64), 8, \"\");\n    assert_eq(sizeof(u_int64), 8, \"\");\n    debug_printer->printf(\"typedefs::check_assertions passed\\n\");\n  }\n\n};\n\nstatic const int bytesPerWord = sizeof(int32);\nstatic const int ShiftForWord = 2;\nstatic const int BitsPerByte = 8;\nstatic const int BitsPerWord = sizeof(oop_int_t) * BitsPerByte;\nstatic const int BitsPerSmallInt = BitsPerWord - Tag_Size;\n\nstatic const int MinSmallInt = (1 << BitsPerSmallInt);\nstatic const int MaxSmallInt = ~MinSmallInt;\n\nstatic const int Mega = 1024 * 1024;\n\n# endif // __cplusplus\n\n# endif // __ROARVM_TYPES__\n"
  },
  {
    "path": "vm/tests/__init__.py",
    "content": ""
  },
  {
    "path": "vm/tests/test_startup.py",
    "content": "from twisted.trial import unittest\n\nimport multiprocessing\nimport subprocess\nimport os\nimport exceptions\nimport tempfile\n\ndef determine_launch_executable():\n    \"\"\"\n        Here we try to figure out whether it is a standard binary, or\n        whether it might be the Tilera binary.\n        If it complains that it cannot be executed, we make the guess\n        that it is a Tilera binary.\n    \"\"\"\n    devnull = open(os.devnull, 'w')\n    binary = os.path.dirname(__file__) + \"/../build/rvm\"\n    try:\n        exitcode = subprocess.call([binary], stdout=devnull, stderr=devnull)\n    except exceptions.OSError as e:\n        if e.errno  == 8:\n            exitcode = 126\n        else:\n           raise e\n\n    assert(exitcode == 1 or exitcode == 126)\n    if exitcode == 1:\n        return [binary]\n    else:\n        return [os.path.dirname(__file__) + \"/../run/tile-runner\",\n                binary]\n\nclass StartupTest(unittest.TestCase):\n    \n    image = os.path.dirname(__file__) + \"/../../../images/benchmarks/benchmarks.image\"\n    rvm = determine_launch_executable()\n    on_tilera = len(rvm) == 2\n    cpu_count = 59 if on_tilera else multiprocessing.cpu_count()\n    \n    \n    def test_hello_world(self):\n        (tmp, tmp_name) = tempfile.mkstemp()\n        cmd = self.rvm + [\"-headless\", self.image, \"HelloWorld\"]\n        p = subprocess.Popen(cmd, stdout=tmp)\n        self.assertEquals(0, p.wait(), \"Execution failed\" + \" \".join(cmd)) # ends without error\n        os.close(tmp)\n        \n        # output containts a line like this: 11 on 0: primitivePrint: Hello World!\n        gotHelloWorld = False\n        for l in file(tmp_name):\n            gotHelloWorld = gotHelloWorld or l.endswith(\"Hello World!\\n\")\n        os.remove(tmp_name)\n\t\n        self.assertTrue(gotHelloWorld, \"Failed to read Hello World! in output\")\n    \n    def test_mmap_bug(self):\n        self.assertTrue(self.cpu_count > 1)\n        devnull = open(os.devnull, 'w')\n        \n        max_heap_size = 512 if self.on_tilera else 1024\n        \n        for heap in [128, max_heap_size]:\n            for c in [n for n in [1,2,3,7,11,15,55,57,59] if self.cpu_count >= n]:\n                cmd = self.rvm + [\"-num_cores\", str(c),\n                                  \"-min_heap_MB\", str(heap),\n                                  \"-headless\", self.image, \"HelloWorld\"]\n                print cmd\n                print \"\\n\\n\\n\\n----------\\n\\n\"\n                (tmp, tmp_name) = tempfile.mkstemp()\n                p = subprocess.Popen(cmd, stderr=tmp)\n                exitcode = p.wait()\n                print \"Exitcode: %d\"%exitcode\n                os.close(tmp)\n                \n                errmsgFound = False\n                if exitcode is not 0:\n                    f = file(tmp_name)\n                    i = iter(f)\n                    for l in i:\n                        found = ((l.find(\"mmap failed on core\") is not -1)\n                                 or (l.find(\"WARNING! Your requested heap might be to large\") is not -1))\n                        if found:\n                           errmsgFound = True\n                           print l\n                           print i.next()\n                           break\n                    f.close()\n\n                os.remove(tmp_name)\n                self.assertTrue(exitcode is 0 or (errmsgFound and heap is not 128),\n                    \"Failed starting rvm with -num_cores %d -min_heap_MB %d and no useful error: %s\" %(c, heap, \" \".join(cmd)))\n                \n                subprocess.call([\"killall\", \"-9\", \"rvm\"    ])\n                subprocess.call([\"killall\", \"-9\", \"rvm.bin\"])\n                    \n    def test_reliability(self):\n        self.assertTrue(self.cpu_count > 1)\n        devnull = open(os.devnull, 'w')\n        cmd = self.rvm + [\"-num_cores\", str(self.cpu_count),\n                         \"-min_heap_MB\", \"256\" if self.on_tilera else \"1024\",\n                         \"-headless\", self.image, \"HelloWorld\"]\n        for i in range(1, 10):    \n            self.assertEquals(0,\n                subprocess.call(cmd, stdout=devnull, stderr=devnull),\n                \"Failed reliability test at iteration %d: %s\" %(i, \" \".join(cmd)))\n\n    # disable this test, we have the benchmarks now in place,\n    # they should be much better indicators\n    test_reliability.skip = \"Replaced by usage of benchmarks\"\n"
  }
]